diff --git a/.codecov.yml b/.codecov.yml index 1a43c767b19b..5da2f9bd4818 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,4 +1,4 @@ -comment: off +comment: false coverage: status: diff --git a/.editorconfig b/.editorconfig index 3e5834d004f0..f814943c3ecc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,5 +17,5 @@ trim_trailing_whitespace = false [tests/{**/__snapshots__/*, tests/format/**/*}] trim_trailing_whitespace = false -[tests/format/**/jsfmt.spec.js] +[tests/format/**/format.test.js] trim_trailing_whitespace = true diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ec4144d4ee68..000000000000 --- a/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -.tmp -!/*.js -/tests/format/**/*.js -/tests/integration/cli/ -!/tests/format/**/jsfmt.spec.js -!/**/.eslintrc.js -/test*.* -/scripts/release/node_modules -/coverage/ -/dist/ -**/node_modules/** -/website/build/ -/website/static/playground.js -/website/static/lib/ -/vendors/ diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index bc48344c80ca..000000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,334 +0,0 @@ -"use strict"; -const { isCI } = require("ci-info"); - -module.exports = { - root: true, - env: { - es2022: true, - node: true, - }, - parserOptions: { - ecmaVersion: "latest", - }, - reportUnusedDisableDirectives: true, - extends: ["eslint:recommended", "prettier"], - plugins: [ - "prettier-internal-rules", - "import", - "regexp", - "unicorn", - "@typescript-eslint", - ], - settings: { - "import/internal-regex": "^linguist-languages/", - }, - rules: { - "@typescript-eslint/prefer-ts-expect-error": "error", - "arrow-body-style": ["error", "as-needed"], - curly: "error", - "dot-notation": "error", - eqeqeq: "error", - "no-console": isCI ? "error" : "warn", - "no-else-return": [ - "error", - { - allowElseIf: false, - }, - ], - "no-implicit-coercion": "error", - "no-inner-declarations": "error", - "no-restricted-syntax": [ - "error", - // `!foo === bar` and `!foo !== bar` - 'BinaryExpression[operator=/^[!=]==$/] > UnaryExpression.left[operator="!"]', - ], - "no-return-await": "error", - "no-unneeded-ternary": "error", - "no-useless-return": "error", - "no-unused-vars": [ - "error", - { - ignoreRestSiblings: true, - }, - ], - "no-var": "error", - "object-shorthand": "error", - "one-var": ["error", "never"], - "prefer-arrow-callback": "error", - "prefer-const": [ - "error", - { - destructuring: "all", - }, - ], - "prefer-destructuring": [ - "error", - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: false, - object: false, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - "prefer-object-spread": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "prettier-internal-rules/jsx-identifier-case": "error", - "prettier-internal-rules/no-identifier-n": "error", - quotes: [ - "error", - "double", - { - avoidEscape: true, - }, - ], - "require-await": "error", - strict: "error", - "symbol-description": "error", - yoda: [ - "error", - "never", - { - exceptRange: true, - }, - ], - - "import/extensions": ["error", "ignorePackages"], - "import/no-extraneous-dependencies": [ - "error", - { - devDependencies: ["tests*/**", "scripts/**"], - }, - ], - "import/order": "error", - "import/no-anonymous-default-export": "error", - - "regexp/match-any": [ - "error", - { - allows: ["dotAll"], - }, - ], - "regexp/no-unused-capturing-group": "error", - "regexp/no-useless-flag": [ - "error", - { - strictTypes: false, - }, - ], - "regexp/no-useless-lazy": "error", - - "unicorn/better-regex": "error", - "unicorn/explicit-length-check": "error", - "unicorn/filename-case": "error", - "unicorn/new-for-builtins": "error", - "unicorn/no-array-for-each": "error", - "unicorn/no-array-push-push": "error", - "unicorn/no-new-array": "error", - "unicorn/no-unreadable-iife": "error", - "unicorn/no-useless-length-check": "error", - "unicorn/no-useless-promise-resolve-reject": "error", - "unicorn/no-useless-undefined": "error", - "unicorn/prefer-array-flat": [ - "error", - { - functions: ["flat", "flatten"], - }, - ], - "unicorn/prefer-array-flat-map": "error", - "unicorn/prefer-array-some": "error", - "unicorn/prefer-includes": "error", - "unicorn/prefer-json-parse-buffer": "error", - "unicorn/prefer-logical-operator-over-ternary": "error", - "unicorn/prefer-native-coercion-functions": "error", - "unicorn/prefer-number-properties": "error", - "unicorn/prefer-optional-catch-binding": "error", - "unicorn/prefer-regexp-test": "error", - "unicorn/prefer-spread": "error", - "unicorn/prefer-string-slice": "error", - "unicorn/prefer-string-starts-ends-with": "error", - "unicorn/prefer-switch": "error", - "unicorn/prefer-type-error": "error", - "unicorn/template-indent": "error", - "unicorn/text-encoding-identifier-case": "error", - }, - overrides: [ - { - files: [ - "scripts/**/*.js", - "scripts/**/*.mjs", - "tests/config/install-prettier.js", - ], - rules: { - "no-console": "off", - }, - }, - { - files: ["scripts/**/*.mjs"], - rules: { - "unicorn/prefer-top-level-await": "error", - }, - }, - { - files: [ - "**/*.mjs", - "scripts/release/**/*.js", - "scripts/tools/bundle-test/**/*.js", - ], - parserOptions: { - sourceType: "module", - }, - rules: { - "unicorn/prefer-module": "error", - "unicorn/prefer-node-protocol": "error", - }, - }, - { - files: [ - "tests/format/**/jsfmt.spec.js", - "tests/config/**/*.js", - "tests/integration/**/*.js", - "scripts/release/__tests__/**/*.spec.js", - ], - env: { - jest: true, - }, - plugins: ["jest"], - rules: { - "jest/valid-expect": [ - "error", - { - alwaysAwait: true, - }, - ], - "jest/prefer-to-be": "error", - }, - }, - { - files: ["tests/integration/**/*.js"], - rules: { - "prettier-internal-rules/await-cli-tests": "error", - }, - }, - { - files: ["tests/**/*.js"], - rules: { - strict: "off", - "unicorn/prefer-array-flat": "off", - "unicorn/prefer-array-flat-map": "off", - }, - globals: { - run_spec: false, - }, - }, - { - files: ["src/cli/*.js"], - rules: { - "no-restricted-modules": [ - "error", - { - patterns: ["../"], - }, - ], - }, - }, - { - files: ["src/cli/*/*.js"], - rules: { - "no-restricted-modules": [ - "error", - { - patterns: ["../../"], - }, - ], - }, - }, - { - files: "src/language-js/needs-parens.js", - rules: { - "prettier-internal-rules/better-parent-property-check-in-needs-parens": - "error", - }, - }, - { - files: "src/**/*.js", - rules: { - "prettier-internal-rules/consistent-negative-index-access": "error", - "prettier-internal-rules/flat-ast-path-call": "error", - "prettier-internal-rules/no-conflicting-comment-check-flags": "error", - "prettier-internal-rules/no-doc-builder-concat": "error", - "prettier-internal-rules/no-empty-flat-contents-for-if-break": "error", - "prettier-internal-rules/no-unnecessary-ast-path-call": "error", - "prettier-internal-rules/prefer-ast-path-each": "error", - "prettier-internal-rules/prefer-indent-if-break": "error", - "prettier-internal-rules/prefer-is-non-empty-array": "error", - }, - }, - { - files: ["src/language-*/**/*.js"], - rules: { - "prettier-internal-rules/directly-loc-start-end": "error", - }, - }, - { - files: ["src/language-js/**/*.js"], - rules: { - "prettier-internal-rules/no-node-comments": [ - "error", - { - file: "src/language-js/utils/index.js", - functions: ["hasComment", "getComments"], - }, - "src/language-js/pragma.js", - "src/language-js/parse/postprocess/*.js", - "src/language-js/parse/babel.js", - "src/language-js/parse/meriyah.js", - "src/language-js/parse/json.js", - "src/language-js/parse/acorn.js", - ], - }, - }, - { - files: ["website/**/*"], - env: { - browser: true, - worker: true, - }, - extends: ["plugin:react/recommended"], - settings: { - react: { - version: "17", - }, - }, - rules: { - "import/no-extraneous-dependencies": "off", - "react/display-name": "off", - "react/no-deprecated": "off", - "react/prop-types": "off", - "unicorn/filename-case": "off", - }, - }, - { - files: ["website/playground/**/*"], - parserOptions: { - sourceType: "module", - }, - }, - { - files: ["bin/prettier.js"], - parserOptions: { - ecmaVersion: 5, - }, - rules: { - "no-var": "off", - }, - }, - ], -}; diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 6a1f1bf41f44..1e000668701f 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -5,62 +5,38 @@ # See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt # Prettier bump after release -# 2.8.5 -c1808e86a3c7c2c8f43093f99e78fce3b6d0a97d -# 2.8.4 -f3b23ab63c9387329dc1993e1d0aa71583d67a0b -# 2.8.3 -9e9f8ec13f0420a4825fdba85d79ddeaaef1e00c +# 3.5.0 +cac3858a34b8be0487befab7d55170f5ed14d452 +# 3.3.3 +060ef1b2ae29348eec056619af5752f20369b010 +# 3.2.3 +4985be553e911fef7d83f3341eb143c443473c58 +# 3.2.0 +ee0d667fa2bf175c194f2f93c98c25a575454476 +# 3.1.1 +1178b4dff2cd78c76e8028b6deb5882348c970d9 +# 3.1.0 +eebf0e4b5ec8ac24393c56ced4b4819d4c551f31 +# 3.0.3 +29f88611542ed7a8da5df4aa21c59d4610553147 +# 3.0.2 +73668b5973eb616062cfc0a6f100eedde3e4c430 +# 3.0.1 +64b6e83884c2fa513ec6199b1812e03315ebbb4e +# 3.0.0 +fa484156174a6553b4155a0a7455f69e404b61a7 # 2.8.2 b9c3cd4c7016dfb1bb3539c5b3db15fdd54b9f6f -# 2.8.1 -b87de09bcf9a523fe3da31394ba0e6f5d107cf3e -# 2.8.0 -4049e49fe2a939facd6f46be338a3be9c1c0489e -# 2.7.1 -1f9baef429df2516ff8eb835fd8c020b5e854a5f # 2.7.0 59ec4f2ef4aef37c10a265aa7fc568c596fb4427 -# 2.6.2 -e2d9e9139d34043c8e6c45cda2777de013340e2e -# 2.6.1 -678fe1562dc1347fc0539334ee5cbaea79ea8af7 # 2.6.0 f7c44237331348c001c2907e844cd0d1530b23ff -# 2.5.1 -4683a6284d53b913f129694a5be666fc55b06982 -# 2.5.0 -846dbdd7e8c9deb315b3e663b3103c559e798a89 -# 2.4.1 -2b5b22056e7e180ba52b04c849b6e8a1e26d87d1 -# 2.4.0 -ef514b9b5c817cf5105bac31a59e88cbdbdf189b -# 2.3.2 -0747d9204113ee4bb4e3c2bab113dc3772a5e8d9 # 2.3.1 a34b4a711ed9928f8809bed3f4c8572dc3a40efb # 2.3.0 3d8dc612b54cef741a1c31da1011a2d48748a1dd -# 2.2.1 -80961835a68e3de1b14819a7b77583a54d2b63d7 -# 2.2.0 -cf354c205de9841a2d306387473dac369359ca2b -# 2.1.2 -c4d3014b95122f4ad19c319a9b3f5f9625d6003f -# 2.1.1 -a8363197118e530d948978da6e5c414a765ba9c0 # 2.1.0 cef4bcafc7867050582d3107632bde7e722575d1 -# 2.0.5 -d33f8a3e2c0a59cb9f383ddec5bbf8d296bb1a23 -# 2.0.4 -592149791e4fea656d8c5fa34c25d4d19076a07a -# 2.0.3 -64b3ac9e8e933a09f049b7cace540ee526f4d5a4 -# 2.0.2 -c1dd17cf383b78fd8fd43442bb5db59b51900410 -# 2.0.1 -f56d620be529b60c13032681446c1eb76e0fb088 # 2.0.0 9dad95b35f935edce4c3d6cfa45c79a0b9c82b9f @@ -72,3 +48,10 @@ b585bd6fa4d750a98e277303c428edfc48fea3f4 f8c5b1fd1da4d67bc09d12bc3411b70d0fa4f4a1 b6225788966a4a6b49e652044337436642dcd627 7ad515111e79a3f304d5480d6586314222052333 + +# Reverted changes to the printer (#13210 #13104) +cdb149417068f3de364fd8db5e9baaf9d2ff4f8c +8dae4abf41e1ccec3515e8acea159505bbd55f33 + +# Format test file rename (#16259) +16449ce9140cac682eab3fb11e15beed14960da6 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index f34e74976614..000000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -open_collective: prettier -tidelift: npm/prettier diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b79df98b9c3b..412b2fe67a12 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: true contact_links: + - name: Issue with experimental CLI + url: https://github.com/prettier/prettier-cli/issues + about: The experimental CLI currently lives in a separate repo, open an issue there instead. - name: 🤔 Support question url: https://stackoverflow.com/questions/ask?tags=prettier about: Issues are dedicated to development purposes. If you have questions, please use Stack Overflow. + - name: 📝 Help with Visual Studio Code extension for Prettier + url: https://github.com/prettier/prettier-vscode/issues + about: Bugs and feature requests for the Visual Studio Code extension for Prettier diff --git a/.github/ISSUE_TEMPLATE/formatting.md b/.github/ISSUE_TEMPLATE/formatting.md index c790749e9b0e..c03f96790fe9 100644 --- a/.github/ISSUE_TEMPLATE/formatting.md +++ b/.github/ISSUE_TEMPLATE/formatting.md @@ -16,7 +16,7 @@ BEFORE SUBMITTING AN ISSUE: 2. We get a lot of requests for adding options, but Prettier is built on the principle of being opinionated about code formatting. This means we add options only in the case of strict technical necessity. - Find out more: https://prettier.io/docs/en/option-philosophy.html + Find out more: https://prettier.io/docs/option-philosophy Don't fill the form below manually! Let a program create a report for you: @@ -26,7 +26,7 @@ Don't fill the form below manually! Let a program create a report for you: --> -**Prettier 2.8.8** +**Prettier 3.6.2** [Playground link](https://prettier.io/playground/#.....) ```sh @@ -46,4 +46,12 @@ Don't fill the form below manually! Let a program create a report for you: // code snippet ``` -**Expected behavior:** +**Expected output:** + +```jsx +// code snippet +``` + +**Why?** + + diff --git a/.github/ISSUE_TEMPLATE/integration.md b/.github/ISSUE_TEMPLATE/integration.md index 7a0204a67921..2e8a7d8fb45c 100644 --- a/.github/ISSUE_TEMPLATE/integration.md +++ b/.github/ISSUE_TEMPLATE/integration.md @@ -20,7 +20,7 @@ BEFORE SUBMITTING AN ISSUE: **Environments:** -- Prettier Version: 2.8.8 +- Prettier Version: 3.6.2 - Running Prettier via: - Runtime: - Operating System: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9cac6f57f918..fffe23f823b2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ ## Description - + ## Checklist @@ -11,7 +11,3 @@ - [ ] (If changing the API or CLI) I’ve documented the changes I’ve made (in the `docs/` directory). - [ ] (If the change is user-facing) I’ve added my changes to `changelog_unreleased/*/XXXX.md` file following `changelog_unreleased/TEMPLATE.md`. - [ ] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/main/CONTRIBUTING.md). - - - -**✨[Try the playground for this PR](https://prettier.io/playground-redirect)✨** diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 000000000000..efc04c70be31 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,4 @@ +name: "CodeQL config" +paths-ignore: + - tests/format + - tests/integration/cli diff --git a/.github/dependabot.yml b/.github/dependabot.yml index be949de20321..6cc7948036ce 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: time: "01:00" labels: - scope:dependency - target-branch: "next" + target-branch: "main" diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 74f9dfb2f5c8..acd897b04323 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,36 +1,99 @@ { $schema: "https://docs.renovatebot.com/renovate-schema.json", + dependencyDashboardApproval: true, labels: ["dependency"], - baseBranches: ["next"], + baseBranches: ["main"], schedule: ["after 01:00 on sunday"], postUpdateOptions: ["yarnDedupeHighest"], + prHourlyLimit: 0, + prConcurrentLimit: 0, packageRules: [ { - matchPackageNames: ["react", "react-dom"], groupName: "react", + matchPackageNames: ["react", "react-dom"], }, { - matchPackagePrefixes: ["@babel/"], - excludePackageNames: ["@babel/parser"], groupName: "babel", + matchPackageNames: ["@babel/*"], }, { - matchPackagePrefixes: ["@typescript-eslint/"], groupName: "typescript-eslint", + matchPackageNames: ["@typescript-eslint/*"], + }, + { + groupName: "glimmer", + matchPackageNames: ["@glimmer/*"], + }, + { + groupName: "flow-parser", + matchPackageNames: ["flow-parser", "hermes-parser"], + }, + { + groupName: "ESLint related dependencies", + matchPackageNames: [ + "eslint", + "@eslint/*", + "@eslint-react/eslint-plugin", + "@stylistic/eslint-plugin", + "eslint-config-prettier", + "eslint-plugin-compat", + "eslint-plugin-jest", + "eslint-plugin-n", + "eslint-plugin-regexp", + "eslint-plugin-simple-import-sort", + "eslint-plugin-unicorn", + "globals", + ], + }, + { + groupName: "Angular Estree", + matchPackageNames: ["@angular/compiler", "angular-estree-parser"], + }, + { + groupName: "Regex related dependencies", + matchPackageNames: ["regexp-util", "unicode-regex", "cjk-regex"], + }, + { + groupName: "Config search related dependencies", + matchPackageNames: ["url-or-path", "search-closest"], }, { branchPrefix: "renovate/website/", - matchPaths: ["website/package.json"], + matchFileNames: ["website/package.json"], labels: ["dependency:website"], }, { branchPrefix: "renovate/tools/", - matchPaths: [ + matchFileNames: [ "scripts/release/package.json", "scripts/tools/bundle-test/package.json", "scripts/tools/eslint-plugin-prettier-internal-rules/package.json", ], labels: ["dependency:tools"], }, + { + groupName: "GitHub Actions", + matchManagers: ["github-actions"], + }, + // Forbid codemirror@6.65.7 + // https://github.com/prettier/prettier/pull/13171#issuecomment-1258427561 + { + matchPackageNames: ["codemirror"], + allowedVersions: "!/^6\\.65\\.7$/", + }, + { + matchPackageNames: ["react", "react-dom"], + allowedVersions: "^18.0.0", + }, + { + groupName: "docusaurus", + matchPackageNames: ["@docusaurus/*"], + }, + ], + ignoreDeps: [ + // It's a dependency of `remark-parse`, use same version to reduce size + "collapse-white-space", + // It will be updated by release script + "prettier", ], } diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml new file mode 100644 index 000000000000..0d2b2de87381 --- /dev/null +++ b/.github/workflows/_build.yml @@ -0,0 +1,33 @@ +name: Build + +on: + workflow_call: + +permissions: + contents: read + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: "yarn" + + - name: Install Dependencies + run: yarn install --immutable + + - name: Build Package + run: yarn build --clean + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist + if-no-files-found: error diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000000..23104d40b754 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,16 @@ +name: autofix.ci # needed to securely identify the workflow + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + fix: + name: Run automated fix + uses: prettier/shared-workflows/.github/workflows/automated-fix.yml@main + permissions: {} + with: + repository: prettier/prettier diff --git a/.github/workflows/bundler-friendly.yml b/.github/workflows/bundler-friendly.yml index b9bd035a85d6..da43cd592cfb 100644 --- a/.github/workflows/bundler-friendly.yml +++ b/.github/workflows/bundler-friendly.yml @@ -10,55 +10,46 @@ on: # This workflow file - ".github/workflows/bundler-friendly.yml" +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: if: github.event_name != 'schedule' || github.repository == 'prettier/prettier' name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --frozen-lockfile - - - name: Build Package - run: yarn build - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist + uses: ./.github/workflows/_build.yml webpack: if: github.event_name != 'schedule' || github.repository == 'prettier/prettier' name: Bundle Prettier with webpack runs-on: ubuntu-latest needs: [build] - defaults: - run: - working-directory: scripts/tools/bundle-test steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v2.5.1 + uses: actions/setup-node@v4 + with: + cache: "yarn" + + - name: Install Dependencies + run: yarn install --immutable - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable + working-directory: scripts/tools/bundle-test - name: Test run: yarn test + working-directory: scripts/tools/bundle-test diff --git a/.github/workflows/check-sizes.yml b/.github/workflows/check-sizes.yml index 68b1bd877d71..27980c10d8d8 100644 --- a/.github/workflows/check-sizes.yml +++ b/.github/workflows/check-sizes.yml @@ -3,24 +3,31 @@ name: Check Sizes on: pull_request: +permissions: + contents: read + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-sizes: name: Check Sizes runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: "yarn" - # This step calls `git reset` - # It should be the last step - name: Check Sizes - uses: preactjs/compressed-size-action@2.5.0 + uses: preactjs/compressed-size-action@2.8.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" pattern: "./dist/**/*" compression: none + build-script: "build --clean" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000000..459e599b9368 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,40 @@ +name: CodeQL + +on: + push: + branches: + - main + - patch-release + - next + - "!renovate/**" + pull_request: + branches: + - main + - patch-release + - next + - "!renovate/**" + +permissions: + actions: read + contents: read + security-events: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + config-file: ./.github/codeql/codeql-config.yml + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dev-package-test.yml b/.github/workflows/dev-package-test.yml index 6bfe936af3db..85e41f2a5d0c 100644 --- a/.github/workflows/dev-package-test.yml +++ b/.github/workflows/dev-package-test.yml @@ -12,43 +12,50 @@ on: - ".github/workflows/dev-package-test.yml" - "tests/config/install-prettier.js" +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: if: github.event_name != 'schedule' || github.repository == 'prettier/prettier' - timeout-minutes: 60 + timeout-minutes: 15 strategy: fail-fast: false matrix: os: - "ubuntu-latest" node: - # Run tests on minimal version we support - - "14" + # Minimal version for development + - "20" NPM_CLIENT: - "yarn" - "npm" - "pnpm" env: INSTALL_PACKAGE: true - NPM_CLIENT: ${{ matrix.NPM_CLIENT }} + PRETTIER_INSTALL_NPM_CLIENT: ${{ matrix.NPM_CLIENT }} name: Test with ${{ matrix.NPM_CLIENT }} runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Install Client Package if: ${{ matrix.NPM_CLIENT == 'pnpm' }} run: npm install --global pnpm - name: Run Tests - run: yarn test:dev-package --maxWorkers=2 + run: yarn test:dev-package diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 44d7e72896d5..c73eb06e7ed8 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -5,11 +5,19 @@ on: branches: - main - patch-release + - next pull_request: +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: - timeout-minutes: 60 + timeout-minutes: 15 strategy: fail-fast: false matrix: @@ -18,62 +26,53 @@ jobs: - "macos-latest" - "windows-latest" node: - - "18" - - "16" - - "14" + # Latest even version + - "24" + # Minimal version for development + - "20" include: - # only enable coverage on the fastest job - os: "ubuntu-latest" - node: "18" + # Pick a version that is fast (normally highest LTS version) + node: "24" ENABLE_CODE_COVERAGE: true FULL_TEST: true CHECK_TEST_PARSERS: true - exclude: - - os: "macos-latest" - node: "16" - - os: "windows-latest" - node: "16" + # Versions not tested on linux, normally only even versions + # If latest version is an odd number, it can be listed below too + - os: "ubuntu-latest" + node: "22" env: ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }} FULL_TEST: ${{ matrix.FULL_TEST }} CHECK_TEST_PARSERS: ${{ matrix.CHECK_TEST_PARSERS }} - name: Node.js ${{ matrix.node }} on ${{ matrix.os }} + name: ${{ matrix.FULL_TEST && '[Full Test] ' || '' }} Node.js ${{ matrix.node }} on ${{ startsWith(matrix.os, 'macos') && 'MacOS' || startsWith(matrix.os, 'windows') && 'Windows' || 'Linux' }} runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - - name: Run Tests (macOS) - if: ${{ matrix.os == 'macos-latest' }} - run: yarn test --maxWorkers=4 + - name: Run Tests + if: ${{ !matrix.ENABLE_CODE_COVERAGE }} + run: yarn test - - name: Run Tests (Linux and Windows) - if: ${{ matrix.os != 'macos-latest' }} - run: yarn test --maxWorkers=2 - - - name: Upload Coverage - uses: codecov/codecov-action@v3.1.0 + - name: Run Tests (coverage) if: ${{ matrix.ENABLE_CODE_COVERAGE }} - with: - fail_ci_if_error: true + run: yarn c8 yarn test - # #8073 test - - name: Run Tests (PRETTIER_FALLBACK_RESOLVE) - run: yarn test "tests/integration/__tests__/(config|plugin)" - env: - PRETTIER_FALLBACK_RESOLVE: true - - - name: Upload Coverage (PRETTIER_FALLBACK_RESOLVE) - uses: codecov/codecov-action@v3.1.0 + - name: Upload Coverage + uses: codecov/codecov-action@v5 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true + disable_search: true + files: coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/eslint-rules.yml b/.github/workflows/eslint-rules.yml index 475e46651fc6..5a7eb5b8dca0 100644 --- a/.github/workflows/eslint-rules.yml +++ b/.github/workflows/eslint-rules.yml @@ -2,6 +2,10 @@ name: Internal_ESLint_Rules_Test on: push: + branches: + - main + - patch-release + - next paths: - "scripts/tools/eslint-plugin-prettier-internal-rules/**" # This workflow file @@ -12,21 +16,28 @@ on: # This workflow file - ".github/workflows/eslint-rules.yml" +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Test runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Test run: cd scripts/tools/eslint-plugin-prettier-internal-rules && yarn test-coverage diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 94d8f09b2b4a..8bd02f3c92ee 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,23 +5,31 @@ on: branches: - main - patch-release + - next pull_request: +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: name: Lint runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Check Dependencies run: yarn lint:deps @@ -41,11 +49,60 @@ jobs: - name: Lint Changelog run: yarn lint:changelog + - name: Lint "format test" + run: yarn lint:format-test + + - name: Lint docs code block + run: yarn prettier "{docs,website/versioned_docs/version-stable}/**/*.md" --check + env: + # Make Prettier throws on embeded format + PRETTIER_DEBUG: true + - name: Lint workflow files - run: yarn lint:actionlint + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + ./actionlint -color + shell: bash + + - name: Dependency Review + # Doesn't support push event https://github.com/actions/dependency-review-action/issues/826 + if: github.event_name == 'pull_request' + uses: actions/dependency-review-action@v4 - name: Validate renovate config - run: npx --package renovate -c renovate-config-validator + run: npx --package renovate --call renovate-config-validator + + - name: Run yarn (/) + run: | + yarn + yarn dedupe --check + + - name: Run yarn (/website) + run: | + yarn + yarn dedupe --check + working-directory: website + + - name: Run yarn (/scripts/release) + run: | + yarn + yarn dedupe --check + working-directory: scripts/release + + - name: Run yarn (/scripts/tools/bundle-test) + run: | + yarn + yarn dedupe --check + working-directory: scripts/tools/bundle-test + + - name: Run yarn (/scripts/tools/eslint-plugin-prettier-internal-rules) + run: | + yarn + yarn dedupe --check + working-directory: scripts/tools/eslint-plugin-prettier-internal-rules + + - name: Knip + run: yarn lint:knip - - name: Check Lock File Changes - run: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint." + - name: Check File Changes + run: echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint." diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 7c37a1a5a757..7cd90919f80c 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -5,12 +5,15 @@ on: # “At 00:00.” https://crontab.guru/#0_0_*_*_* - cron: "0 0 * * *" +permissions: + issues: write + jobs: lock: if: github.event_name != 'schedule' || github.repository == 'prettier/prettier' runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v3 + - uses: dessant/lock-threads@v5 with: # https://github.com/dessant/lock-threads github-token: ${{ github.token }} diff --git a/.github/workflows/mark-issue-duplicate.yml b/.github/workflows/mark-issue-duplicate.yml index fd7d1cd0018e..47fad8cf8901 100644 --- a/.github/workflows/mark-issue-duplicate.yml +++ b/.github/workflows/mark-issue-duplicate.yml @@ -5,12 +5,15 @@ on: types: - created +permissions: + issues: write + jobs: mark-duplicate: runs-on: ubuntu-latest if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, 'Duplicate of ') }} steps: - - uses: actions-cool/issues-helper@v3 + - uses: actions-cool/issues-helper@v3.6.0 with: actions: "mark-duplicate" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml index da740ab6008b..1b2a9b9d0118 100644 --- a/.github/workflows/prevent-file-change.yml +++ b/.github/workflows/prevent-file-change.yml @@ -1,17 +1,24 @@ name: Prevent File change on: - pull_request: + pull_request_target: paths: - "website/data/users.yml" +permissions: + pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: prevent-add-users: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Prevent file change - uses: xalvarez/prevent-file-change-action@v1 + uses: xalvarez/prevent-file-change-action@v2.0.0 with: githubToken: ${{ secrets.GITHUB_TOKEN }} pattern: website/data/users.yml diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 70f721f9a49a..f7883a3ff4d0 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -5,32 +5,20 @@ on: branches: - main - patch-release + - next pull_request: +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --frozen-lockfile - - - name: Build Package - run: yarn build - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist + uses: ./.github/workflows/_build.yml lint: name: Lint @@ -38,27 +26,27 @@ jobs: needs: [build] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist - name: Lint Code - run: yarn test:dist-lint + run: yarn test:production-lint test: - timeout-minutes: 90 + timeout-minutes: 15 strategy: fail-fast: false matrix: @@ -67,78 +55,78 @@ jobs: - "macos-latest" - "windows-latest" node: - - "18" - - "16" + # Latest even version + - "24" + # Minimal version for production - "14" - - "12" - - "10" include: - os: "ubuntu-latest" - node: "18" + # Pick a version that is fast (normally highest LTS version) + node: "24" FULL_TEST: true - exclude: - - os: "macos-latest" + # Versions not tested on linux, normally only even versions + # If latest version is an odd number, it can be listed below too + - os: "ubuntu-latest" + node: "22" + - os: "ubuntu-latest" + node: "20" + - os: "ubuntu-latest" + node: "18" + - os: "ubuntu-latest" node: "16" - - os: "macos-latest" + # Tests on Intel Mac x Node.js 14 ( https://github.com/prettier/prettier/issues/16248 ) + - os: "macos-13" node: "14" + # setup-node does not support Node.js 14 x M1 Mac + exclude: - os: "macos-latest" - node: "12" - - os: "windows-latest" - node: "16" - - os: "windows-latest" node: "14" - - os: "windows-latest" - node: "12" env: FULL_TEST: ${{ matrix.FULL_TEST }} - name: Node.js ${{ matrix.node }} on ${{ matrix.os }} + name: ${{ matrix.FULL_TEST && '[Full Test] ' || '' }} Node.js ${{ matrix.node }} on ${{ startsWith(matrix.os, 'macos') && 'MacOS' || startsWith(matrix.os, 'windows') && 'Windows' || 'Linux' }} runs-on: ${{ matrix.os }} needs: [build] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Install yarn@3 + if: ${{ matrix.node == '14' || matrix.node == '16' }} + run: | + yarn set version 3 + yarn config set httpRetry 10 + cat .yarnrc.yml - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: "yarn" - - name: Config `ignore-engines=true` (Node.js < 14) - if: ${{ matrix.node == '10' || matrix.node == '12' }} - run: yarn config set ignore-engines true + - name: Downgrade Jest + if: ${{ matrix.node == '14' || matrix.node == '16' }} + run: node ./scripts/prepare-test-for-legacy-nodejs.js --node-version ${{ matrix.node }} + + - name: Install Dependencies(yarn@3,mutable) + if: ${{ matrix.node == '14' || matrix.node == '16' }} + env: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + run: yarn install - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist - - name: Run Tests (macOS) - if: ${{ matrix.os == 'macos-latest' }} - run: yarn test:dist --maxWorkers=4 + - name: Run Tests + run: yarn test:production - - name: Run Tests (Linux and Windows) - if: ${{ matrix.os != 'macos-latest' }} - run: yarn test:dist --maxWorkers=2 - - - name: Run Tests (standalone) (macOS) - if: ${{ matrix.os == 'macos-latest' }} - run: yarn test:dist-standalone --maxWorkers=4 - - - name: Run Tests (standalone) (Linux and Windows) - if: ${{ matrix.os != 'macos-latest' }} - run: yarn test:dist-standalone --maxWorkers=2 - - # #8073 test - - name: Run Tests (PRETTIER_FALLBACK_RESOLVE) - run: yarn test "tests/integration/__tests__/(config|plugin)" - env: - NODE_ENV: production - PRETTIER_FALLBACK_RESOLVE: true + - name: Run Format Tests (standalone) + run: yarn test:production-standalone cli: name: CLI @@ -146,15 +134,15 @@ jobs: needs: [build] steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v2.5.1 + uses: actions/setup-node@v4 with: node-version: "0.10.48" - name: Download Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist @@ -163,4 +151,32 @@ jobs: run: node -v | grep "v0.10.48" || exit 1 - name: Run CLI on Node.js v0.10.48 - run: node dist/bin-prettier --version 2>&1 >/dev/null | grep "prettier requires at least version 10.13.0 of Node, please upgrade" || exit 1 + run: node dist/prettier/bin/prettier.cjs --version 2>&1 >/dev/null | grep "prettier requires at least version 14 of Node, please upgrade" || exit 1 + + preview: + if: github.repository == 'prettier/prettier' + name: Preview release + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Checkout + uses: actions/checkout@v4 + + # `pkg-pr-new` requires Node.js v20 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - name: Release + # Use `--compact` after we publish `@prettier/plugin-oxc` + # run: | + # npx pkg-pr-new publish "./dist/*" --compact --packageManager=yarn + run: | + npx pkg-pr-new publish "./dist/*" --packageManager=yarn diff --git a/.github/workflows/release-script-test.yml b/.github/workflows/release-script-test.yml index b4a4a8255686..4b3e6a7e8af9 100644 --- a/.github/workflows/release-script-test.yml +++ b/.github/workflows/release-script-test.yml @@ -4,8 +4,19 @@ defaults: run: working-directory: scripts/release +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: push: + branches: + - main + - patch-release + - next paths: - "scripts/release/**" - ".github/workflows/release-script-test.yml" @@ -20,15 +31,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: + # Minimal version the release script required + node-version: "20" cache: "yarn" - name: Install Dependencies - run: yarn install --frozen-lockfile + run: yarn install --immutable - name: Test run: yarn test diff --git a/.github/workflows/support.yml b/.github/workflows/support.yml index 1caae50591be..52e0b71add31 100644 --- a/.github/workflows/support.yml +++ b/.github/workflows/support.yml @@ -4,11 +4,14 @@ on: issues: types: [labeled, unlabeled, reopened] +permissions: + issues: write + jobs: support: runs-on: ubuntu-latest steps: - - uses: dessant/support-requests@v2 + - uses: dessant/support-requests@v4.0.0 with: github-token: ${{ github.token }} support-label: "type:question" diff --git a/.github/workflows/validate-vendors.yml b/.github/workflows/validate-vendors.yml deleted file mode 100644 index 3b88b080ffb7..000000000000 --- a/.github/workflows/validate-vendors.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Validate_Vendors - -on: - push: - branches: - - main - - patch-release - paths: - - "package.json" - pull_request: - paths: - - "package.json" - -jobs: - validate-vendor-versions: - name: Validate Vendor Versions - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --frozen-lockfile - - - name: Validate Vendors - run: yarn run vendors:bundle && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed." diff --git a/.gitignore b/.gitignore index ba3f64a175af..1fdac1a6a402 100644 --- a/.gitignore +++ b/.gitignore @@ -8,14 +8,18 @@ .tmp *.log +*.tgz /errors /test*.* -/.vscode -/dist +/.vscode/**/* +!/.vscode/extensions.json +!/.vscode/settings.example.json +/dist* /website/build /website/i18n -/website/static/playground.js +/website/static/playground /website/static/lib +/website/.docusaurus .DS_Store /coverage .idea @@ -25,9 +29,16 @@ package-lock.json !.yarn/plugins !.yarn/sdks !.yarn/versions -.pnp.* +**/.pnp.* .nyc_output .devcontainer .node-version # When installing software on gitpod.io, `core.*` files are generated /core.* +*.swp + +# For 0x flamegraph directory (https://github.com/davidmarkclements/0x) +*.0x/ + +# For Node.js builtin cpu profile file +*.cpuprofile diff --git a/.gitpod.yml b/.gitpod.yml index 543c194cb3a5..cf602b03403c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,22 +4,3 @@ tasks: - init: | brew install hyperfine yarn - -github: - # https://www.gitpod.io/docs/prebuilds/#configure-prebuilds - prebuilds: - master: true # enable for the default branch (even if it's not named "master") - branches: true - pullRequests: true - pullRequestsFromForks: true - addCheck: true - addComment: false - addBadge: true - addLabel: false - -vscode: - extensions: - - esbenp.prettier-vscode - - dbaeumer.vscode-eslint - - editorconfig.editorconfig - - streetsidesoftware.code-spell-checker diff --git a/.prettierignore b/.prettierignore index 97e6e231a3f2..112dc9763689 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,14 +1,22 @@ -.tmp -dist/ -.cache/ -coverage/ +**/.yarn/* + +# Ignore directories and files in 'tests/format' /tests/format/**/*.* -!/tests/format/**/jsfmt.spec.js +# Unignore directories and 'format.test.js' file +!/tests/format/**/ +!/tests/format/**/format.test.js /tests/integration/cli/ -/tests/integration/plugins/ +/tests/integration/plugins/**/*.* +!/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/index.js +!/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js +!/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js +!/tests/integration/plugins/automatic/package.json +!/tests/integration/plugins/automatic/prettier-plugin-bar.js +!/tests/integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js +!/tests/integration/plugins/defaultOptions/plugin.cjs +!/tests/integration/plugins/extensions/plugin.cjs +!/tests/integration/plugins/flushLineSuffix/plugin.cjs +!/tests/integration/plugins/options-string/plugin.cjs +!/tests/integration/plugins/options/plugin.cjs +!/tests/integration/plugins/preprocess/plugin.cjs /tests/integration/custom-parsers/ -/website/build/ -/website/static/lib/ -/website/static/playground.js -.nyc_output -/vendors/ diff --git a/.prettierrc b/.prettierrc index 865c74b2a5e1..a4a081f5f04f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,3 +2,11 @@ overrides: - files: "**/*.{js,mjs,cjs}" options: parser: meriyah + - files: "bin/prettier.cjs" + options: + trailingComma: none + - files: + - ".vscode/*.json" + - "tsconfig.json" + options: + parser: jsonc diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..ebce3d3e0697 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "esbenp.prettier-vscode", + "editorconfig.editorconfig", + "dbaeumer.vscode-eslint", + "streetsidesoftware.code-spell-checker", + ], +} diff --git a/.vscode/settings.example.json b/.vscode/settings.example.json new file mode 100644 index 000000000000..dd2c51bf1a99 --- /dev/null +++ b/.vscode/settings.example.json @@ -0,0 +1,19 @@ +{ + "[javascript][typescript][json][jsonc][markdown][yaml]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + }, + "[javascript][typescript]": { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + }, + }, + "prettier.requireConfig": true, + "files.exclude": { + "dist*": true, + "website/.docusaurus": true, + "website/build": true, + "website/static/playground": true, + "website/static/lib": true, + }, +} diff --git a/.yarn/plugins/plugin-setup-editor.cjs b/.yarn/plugins/plugin-setup-editor.cjs new file mode 100644 index 000000000000..a6de9ac2d82d --- /dev/null +++ b/.yarn/plugins/plugin-setup-editor.cjs @@ -0,0 +1,30 @@ +const fs = require("node:fs"); +const path = require("node:path"); + +module.exports = { + name: "plugin-setup-editor", + factory: () => ({ + hooks: { + afterAllInstalled() { + const settingsFile = path.join( + __dirname, + "../../.vscode/settings.json", + ); + + const settingsExampleFile = path.join( + __dirname, + "../../.vscode/settings.example.json", + ); + + if ( + fs.existsSync(settingsFile) || + !fs.existsSync(settingsExampleFile) + ) { + return; + } + + fs.copyFileSync(settingsExampleFile, settingsFile); + }, + }, + }), +}; diff --git a/.yarn/releases/yarn-4.9.2.cjs b/.yarn/releases/yarn-4.9.2.cjs new file mode 100644 index 000000000000..28f25b14bca0 --- /dev/null +++ b/.yarn/releases/yarn-4.9.2.cjs @@ -0,0 +1,942 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var UVe=Object.create;var E_=Object.defineProperty;var HVe=Object.getOwnPropertyDescriptor;var jVe=Object.getOwnPropertyNames;var qVe=Object.getPrototypeOf,GVe=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ct=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)E_(t,r,{get:e[r],enumerable:!0})},WVe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of jVe(e))!GVe.call(t,a)&&a!==r&&E_(t,a,{get:()=>e[a],enumerable:!(s=HVe(e,a))||s.enumerable});return t};var et=(t,e,r)=>(r=t!=null?UVe(qVe(t)):{},WVe(e||!t||!t.__esModule?E_(r,"default",{value:t,enumerable:!0}):r,t));var fi={};Vt(fi,{SAFE_TIME:()=>d$,S_IFDIR:()=>rx,S_IFLNK:()=>nx,S_IFMT:()=>_f,S_IFREG:()=>N2});var _f,rx,N2,nx,d$,m$=Ct(()=>{_f=61440,rx=16384,N2=32768,nx=40960,d$=456789e3});var or={};Vt(or,{EBADF:()=>Uo,EBUSY:()=>YVe,EEXIST:()=>XVe,EINVAL:()=>KVe,EISDIR:()=>ZVe,ENOENT:()=>JVe,ENOSYS:()=>VVe,ENOTDIR:()=>zVe,ENOTEMPTY:()=>e7e,EOPNOTSUPP:()=>t7e,EROFS:()=>$Ve,ERR_DIR_CLOSED:()=>I_});function wc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function YVe(t){return wc("EBUSY",t)}function VVe(t,e){return wc("ENOSYS",`${t}, ${e}`)}function KVe(t){return wc("EINVAL",`invalid argument, ${t}`)}function Uo(t){return wc("EBADF",`bad file descriptor, ${t}`)}function JVe(t){return wc("ENOENT",`no such file or directory, ${t}`)}function zVe(t){return wc("ENOTDIR",`not a directory, ${t}`)}function ZVe(t){return wc("EISDIR",`illegal operation on a directory, ${t}`)}function XVe(t){return wc("EEXIST",`file already exists, ${t}`)}function $Ve(t){return wc("EROFS",`read-only filesystem, ${t}`)}function e7e(t){return wc("ENOTEMPTY",`directory not empty, ${t}`)}function t7e(t){return wc("EOPNOTSUPP",`operation not supported, ${t}`)}function I_(){return wc("ERR_DIR_CLOSED","Directory handle was closed")}var ix=Ct(()=>{});var el={};Vt(el,{BigIntStatsEntry:()=>rE,DEFAULT_MODE:()=>B_,DirEntry:()=>C_,StatEntry:()=>tE,areStatsEqual:()=>v_,clearStats:()=>sx,convertToBigIntStats:()=>n7e,makeDefaultStats:()=>y$,makeEmptyStats:()=>r7e});function y$(){return new tE}function r7e(){return sx(y$())}function sx(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):w_.types.isDate(r)&&(t[e]=new Date(0))}return t}function n7e(t){let e=new rE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s=="number"?e[r]=BigInt(s):w_.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function v_(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var w_,B_,C_,tE,rE,S_=Ct(()=>{w_=et(Ie("util")),B_=33188,C_=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},tE=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=B_;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},rE=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(B_);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function l7e(t){let e,r;if(e=t.match(o7e))t=e[1];else if(r=t.match(a7e))t=`\\\\${r[1]?".\\":""}${r[2]}`;else return t;return t.replace(/\//g,"\\")}function c7e(t){t=t.replace(/\\/g,"/");let e,r;return(e=t.match(i7e))?t=`/${e[1]}`:(r=t.match(s7e))&&(t=`/unc/${r[1]?".dot/":""}${r[2]}`),t}function ox(t,e){return t===ue?I$(e):D_(e)}var O2,vt,Er,ue,K,E$,i7e,s7e,o7e,a7e,D_,I$,tl=Ct(()=>{O2=et(Ie("path")),vt={root:"/",dot:".",parent:".."},Er={home:"~",nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",pnpData:".pnp.data.json",pnpEsmLoader:".pnp.loader.mjs",rc:".yarnrc.yml",env:".env"},ue=Object.create(O2.default),K=Object.create(O2.default.posix);ue.cwd=()=>process.cwd();K.cwd=process.platform==="win32"?()=>D_(process.cwd()):process.cwd;process.platform==="win32"&&(K.resolve=(...t)=>t.length>0&&K.isAbsolute(t[0])?O2.default.posix.resolve(...t):O2.default.posix.resolve(K.cwd(),...t));E$=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?".":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};ue.contains=(t,e)=>E$(ue,t,e);K.contains=(t,e)=>E$(K,t,e);i7e=/^([a-zA-Z]:.*)$/,s7e=/^\/\/(\.\/)?(.*)$/,o7e=/^\/([a-zA-Z]:.*)$/,a7e=/^\/unc\/(\.dot\/)?(.*)$/;D_=process.platform==="win32"?c7e:t=>t,I$=process.platform==="win32"?l7e:t=>t;ue.fromPortablePath=I$;ue.toPortablePath=D_});async function ax(t,e){let r="0123456789abcdef";await t.mkdirPromise(e.indexPath,{recursive:!0});let s=[];for(let a of r)for(let n of r)s.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(s),e.indexPath}async function C$(t,e,r,s,a){let n=t.pathUtils.normalize(e),c=r.pathUtils.normalize(s),f=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:gd,mtime:gd}:await r.lstatPromise(c);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await b_(f,p,t,n,r,c,{...a,didParentExist:!0});for(let C of f)await C();await Promise.all(p.map(C=>C()))}async function b_(t,e,r,s,a,n,c){let f=c.didParentExist?await w$(r,s):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=c.stableTime?{atime:gd,mtime:gd}:p,C;switch(!0){case p.isDirectory():C=await f7e(t,e,r,s,f,a,n,p,c);break;case p.isFile():C=await h7e(t,e,r,s,f,a,n,p,c);break;case p.isSymbolicLink():C=await g7e(t,e,r,s,f,a,n,p,c);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(c.linkStrategy?.type!=="HardlinkFromIndex"||!p.isFile())&&((C||f?.mtime?.getTime()!==E.getTime()||f?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(s,h,E)),C=!0),(f===null||(f.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(s,p.mode&511)),C=!0)),C}async function w$(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function f7e(t,e,r,s,a,n,c,f,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(s,{mode:f.mode})}catch(S){if(S.code!=="EEXIST")throw S}}),h=!0);let E=await n.readdirPromise(c),C=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let S of E.sort())await b_(t,e,r,r.pathUtils.join(s,S),n,n.pathUtils.join(c,S),C)&&(h=!0);else(await Promise.all(E.map(async P=>{await b_(t,e,r,r.pathUtils.join(s,P),n,n.pathUtils.join(c,P),C)}))).some(P=>P)&&(h=!0);return h}async function A7e(t,e,r,s,a,n,c,f,p,h){let E=await n.checksumFilePromise(c,{algorithm:"sha1"}),C=420,S=f.mode&511,P=`${E}${S!==C?S.toString(8):""}`,I=r.pathUtils.join(h.indexPath,E.slice(0,2),`${P}.dat`),R;(ce=>(ce[ce.Lock=0]="Lock",ce[ce.Rename=1]="Rename"))(R||={});let N=1,U=await w$(r,I);if(a){let ie=U&&a.dev===U.dev&&a.ino===U.ino,Ae=U?.mtimeMs!==u7e;if(ie&&Ae&&h.autoRepair&&(N=0,U=null),!ie)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1}let W=!U&&N===1?`${I}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}`:null,te=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(I,async()=>{let ie=await n.readFilePromise(c);await r.writeFilePromise(I,ie)}),N===1&&W)){let ie=await n.readFilePromise(c);await r.writeFilePromise(W,ie);try{await r.linkPromise(W,I)}catch(Ae){if(Ae.code==="EEXIST")te=!0,await r.unlinkPromise(W);else throw Ae}}a||await r.linkPromise(I,s)}),e.push(async()=>{U||(await r.lutimesPromise(I,gd,gd),S!==C&&await r.chmodPromise(I,S)),W&&!te&&await r.unlinkPromise(W)}),!1}async function p7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(c);await r.writeFilePromise(s,h)}),!0}async function h7e(t,e,r,s,a,n,c,f,p){return p.linkStrategy?.type==="HardlinkFromIndex"?A7e(t,e,r,s,a,n,c,f,p,p.linkStrategy):p7e(t,e,r,s,a,n,c,f,p)}async function g7e(t,e,r,s,a,n,c,f,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(s)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(ox(r.pathUtils,await n.readlinkPromise(c)),s)}),!0}var gd,u7e,P_=Ct(()=>{tl();gd=new Date(456789e3*1e3),u7e=gd.getTime()});function lx(t,e,r,s){let a=()=>{let n=r.shift();if(typeof n>"u")return null;let c=t.pathUtils.join(e,n);return Object.assign(t.statSync(c),{name:n,path:void 0})};return new L2(e,a,s)}var L2,B$=Ct(()=>{ix();L2=class{constructor(e,r,s={}){this.path=e;this.nextDirent=r;this.opts=s;this.closed=!1}throwIfClosed(){if(this.closed)throw I_()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<"u"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<"u"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function v$(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var S$,cx,D$=Ct(()=>{S$=Ie("events");S_();cx=class t extends S$.EventEmitter{constructor(r,s,{bigint:a=!1}={}){super();this.status="ready";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=s,this.bigint=a,this.lastStats=this.stat()}static create(r,s,a){let n=new t(r,s,a);return n.start(),n}start(){v$(this.status,"ready"),this.status="running",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit("change",this.lastStats,this.lastStats)},3)}stop(){v$(this.status,"running"),this.status="stopped",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit("stop")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let r=this.bigint?new rE:new tE;return sx(r)}}makeInterval(r){let s=setInterval(()=>{let a=this.stat(),n=this.lastStats;v_(a,n)||(this.lastStats=a,this.emit("change",a,n))},r.interval);return r.persistent?s:s.unref()}registerChangeListener(r,s){this.addListener("change",r),this.changeListeners.set(r,this.makeInterval(s))}unregisterChangeListener(r){this.removeListener("change",r);let s=this.changeListeners.get(r);typeof s<"u"&&clearInterval(s),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function nE(t,e,r,s){let a,n,c,f;switch(typeof r){case"function":a=!1,n=!0,c=5007,f=r;break;default:({bigint:a=!1,persistent:n=!0,interval:c=5007}=r),f=s;break}let p=ux.get(t);typeof p>"u"&&ux.set(t,p=new Map);let h=p.get(e);return typeof h>"u"&&(h=cx.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(f,{persistent:n,interval:c}),h}function dd(t,e,r){let s=ux.get(t);if(typeof s>"u")return;let a=s.get(e);typeof a>"u"||(typeof r>"u"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),s.delete(e)))}function md(t){let e=ux.get(t);if(!(typeof e>"u"))for(let r of e.keys())dd(t,r)}var ux,x_=Ct(()=>{D$();ux=new WeakMap});function d7e(t){let e=t.match(/\r?\n/g);if(e===null)return P$.EOL;let r=e.filter(a=>a===`\r +`).length,s=e.length-r;return r>s?`\r +`:` +`}function yd(t,e){return e.replace(/\r?\n/g,d7e(t))}var b$,P$,Ep,Uf,Ed=Ct(()=>{b$=Ie("crypto"),P$=Ie("os");P_();tl();Ep=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let s=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,b$.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!=="EBUSY"&&c.code!=="ENOTEMPTY")throw c;nsetTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await C$(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(ox(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let c=s?yd(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let c=s?yd(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,"wx")}catch(p){if(p.code==="EEXIST"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw p}await this.writePromise(c,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(c),await this.unlinkPromise(s)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,"utf8");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}readJsonSync(e){let r=this.readFileSync(e,"utf8");try{return JSON.parse(r)}catch(s){throw s.message+=` (in ${e})`,s}}async writeJsonPromise(e,r,{compact:s=!1}={}){let a=s?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)} +`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)} +`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends Ep{constructor(){super(K)}}});var js,Ip=Ct(()=>{Ed();js=class extends Ep{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(c,a,s)}symlinkSync(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(c,a,s)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,s){return this.baseFs.watch(this.mapToBase(e),r,s)}watchFile(e,r,s){return this.baseFs.watchFile(this.mapToBase(e),r,s)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}}});var Hf,x$=Ct(()=>{Ip();Hf=class extends js{constructor(e,{baseFs:r,pathUtils:s}){super(s),this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}});function k$(t){let e=t;return typeof t.path=="string"&&(e.path=ue.toPortablePath(t.path)),e}var Q$,Yn,Id=Ct(()=>{Q$=et(Ie("fs"));Ed();tl();Yn=class extends Uf{constructor(e=Q$.default){super(),this.realFs=e}getExtractHint(){return!1}getRealPath(){return vt.root}resolve(e){return K.resolve(e)}async openPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.open(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}openSync(e,r,s){return this.realFs.openSync(ue.fromPortablePath(e),r,s)}async opendirPromise(e,r){return await new Promise((s,a)=>{typeof r<"u"?this.realFs.opendir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.opendir(ue.fromPortablePath(e),this.makeCallback(s,a))}).then(s=>{let a=s;return Object.defineProperty(a,"path",{value:e,configurable:!0,writable:!0}),a})}opendirSync(e,r){let a=typeof r<"u"?this.realFs.opendirSync(ue.fromPortablePath(e),r):this.realFs.opendirSync(ue.fromPortablePath(e));return Object.defineProperty(a,"path",{value:e,configurable:!0,writable:!0}),a}async readPromise(e,r,s=0,a=0,n=-1){return await new Promise((c,f)=>{this.realFs.read(e,r,s,a,n,(p,h)=>{p?f(p):c(h)})})}readSync(e,r,s,a,n){return this.realFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return await new Promise((c,f)=>typeof r=="string"?this.realFs.write(e,r,s,this.makeCallback(c,f)):this.realFs.write(e,r,s,a,n,this.makeCallback(c,f)))}writeSync(e,r,s,a,n){return typeof r=="string"?this.realFs.writeSync(e,r,s):this.realFs.writeSync(e,r,s,a,n)}async closePromise(e){await new Promise((r,s)=>{this.realFs.close(e,this.makeCallback(r,s))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createReadStream(s,r)}createWriteStream(e,r){let s=e!==null?ue.fromPortablePath(e):e;return this.realFs.createWriteStream(s,r)}async realpathPromise(e){return await new Promise((r,s)=>{this.realFs.realpath(ue.fromPortablePath(e),{},this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}realpathSync(e){return ue.toPortablePath(this.realFs.realpathSync(ue.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(ue.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(ue.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((s,a)=>{this.realFs.access(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}existsSync(e){return this.realFs.existsSync(ue.fromPortablePath(e))}async statPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.stat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.stat(ue.fromPortablePath(e),this.makeCallback(s,a))})}statSync(e,r){return r?this.realFs.statSync(ue.fromPortablePath(e),r):this.realFs.statSync(ue.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.fstat(e,r,this.makeCallback(s,a)):this.realFs.fstat(e,this.makeCallback(s,a))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.lstat(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.lstat(ue.fromPortablePath(e),this.makeCallback(s,a))})}lstatSync(e,r){return r?this.realFs.lstatSync(ue.fromPortablePath(e),r):this.realFs.lstatSync(ue.fromPortablePath(e))}async fchmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.fchmod(e,r,this.makeCallback(s,a))})}fchmodSync(e,r){return this.realFs.fchmodSync(e,r)}async chmodPromise(e,r){return await new Promise((s,a)=>{this.realFs.chmod(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}chmodSync(e,r){return this.realFs.chmodSync(ue.fromPortablePath(e),r)}async fchownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.fchown(e,r,s,this.makeCallback(a,n))})}fchownSync(e,r,s){return this.realFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.chown(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}chownSync(e,r,s){return this.realFs.chownSync(ue.fromPortablePath(e),r,s)}async renamePromise(e,r){return await new Promise((s,a)=>{this.realFs.rename(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}renameSync(e,r){return this.realFs.renameSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async copyFilePromise(e,r,s=0){return await new Promise((a,n)=>{this.realFs.copyFile(ue.fromPortablePath(e),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}copyFileSync(e,r,s=0){return this.realFs.copyFileSync(ue.fromPortablePath(e),ue.fromPortablePath(r),s)}async appendFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.appendFile(c,r,s,this.makeCallback(a,n)):this.realFs.appendFile(c,r,this.makeCallback(a,n))})}appendFileSync(e,r,s){let a=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.appendFileSync(a,r,s):this.realFs.appendFileSync(a,r)}async writeFilePromise(e,r,s){return await new Promise((a,n)=>{let c=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.writeFile(c,r,s,this.makeCallback(a,n)):this.realFs.writeFile(c,r,this.makeCallback(a,n))})}writeFileSync(e,r,s){let a=typeof e=="string"?ue.fromPortablePath(e):e;s?this.realFs.writeFileSync(a,r,s):this.realFs.writeFileSync(a,r)}async unlinkPromise(e){return await new Promise((r,s)=>{this.realFs.unlink(ue.fromPortablePath(e),this.makeCallback(r,s))})}unlinkSync(e){return this.realFs.unlinkSync(ue.fromPortablePath(e))}async utimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.utimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}utimesSync(e,r,s){this.realFs.utimesSync(ue.fromPortablePath(e),r,s)}async lutimesPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.lutimes(ue.fromPortablePath(e),r,s,this.makeCallback(a,n))})}lutimesSync(e,r,s){this.realFs.lutimesSync(ue.fromPortablePath(e),r,s)}async mkdirPromise(e,r){return await new Promise((s,a)=>{this.realFs.mkdir(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}mkdirSync(e,r){return this.realFs.mkdirSync(ue.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rmdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rmdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmdirSync(e,r){return this.realFs.rmdirSync(ue.fromPortablePath(e),r)}async rmPromise(e,r){return await new Promise((s,a)=>{r?this.realFs.rm(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.rm(ue.fromPortablePath(e),this.makeCallback(s,a))})}rmSync(e,r){return this.realFs.rmSync(ue.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((s,a)=>{this.realFs.link(ue.fromPortablePath(e),ue.fromPortablePath(r),this.makeCallback(s,a))})}linkSync(e,r){return this.realFs.linkSync(ue.fromPortablePath(e),ue.fromPortablePath(r))}async symlinkPromise(e,r,s){return await new Promise((a,n)=>{this.realFs.symlink(ue.fromPortablePath(e.replace(/\/+$/,"")),ue.fromPortablePath(r),s,this.makeCallback(a,n))})}symlinkSync(e,r,s){return this.realFs.symlinkSync(ue.fromPortablePath(e.replace(/\/+$/,"")),ue.fromPortablePath(r),s)}async readFilePromise(e,r){return await new Promise((s,a)=>{let n=typeof e=="string"?ue.fromPortablePath(e):e;this.realFs.readFile(n,r,this.makeCallback(s,a))})}readFileSync(e,r){let s=typeof e=="string"?ue.fromPortablePath(e):e;return this.realFs.readFileSync(s,r)}async readdirPromise(e,r){return await new Promise((s,a)=>{r?r.recursive&&process.platform==="win32"?r.withFileTypes?this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(k$)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(n=>s(n.map(ue.toPortablePath)),a)):this.realFs.readdir(ue.fromPortablePath(e),r,this.makeCallback(s,a)):this.realFs.readdir(ue.fromPortablePath(e),this.makeCallback(s,a))})}readdirSync(e,r){return r?r.recursive&&process.platform==="win32"?r.withFileTypes?this.realFs.readdirSync(ue.fromPortablePath(e),r).map(k$):this.realFs.readdirSync(ue.fromPortablePath(e),r).map(ue.toPortablePath):this.realFs.readdirSync(ue.fromPortablePath(e),r):this.realFs.readdirSync(ue.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,s)=>{this.realFs.readlink(ue.fromPortablePath(e),this.makeCallback(r,s))}).then(r=>ue.toPortablePath(r))}readlinkSync(e){return ue.toPortablePath(this.realFs.readlinkSync(ue.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.truncate(ue.fromPortablePath(e),r,this.makeCallback(s,a))})}truncateSync(e,r){return this.realFs.truncateSync(ue.fromPortablePath(e),r)}async ftruncatePromise(e,r){return await new Promise((s,a)=>{this.realFs.ftruncate(e,r,this.makeCallback(s,a))})}ftruncateSync(e,r){return this.realFs.ftruncateSync(e,r)}watch(e,r,s){return this.realFs.watch(ue.fromPortablePath(e),r,s)}watchFile(e,r,s){return this.realFs.watchFile(ue.fromPortablePath(e),r,s)}unwatchFile(e,r){return this.realFs.unwatchFile(ue.fromPortablePath(e),r)}makeCallback(e,r){return(s,a)=>{s?r(s):e(a)}}}});var Sn,T$=Ct(()=>{Id();Ip();tl();Sn=class extends js{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.normalize(e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?K.normalize(e):this.baseFs.resolve(K.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}});var R$,jf,F$=Ct(()=>{Id();Ip();tl();R$=vt.root,jf=class extends js{constructor(e,{baseFs:r=new Yn}={}){super(K),this.target=this.pathUtils.resolve(vt.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(vt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){let r=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(R$,e));if(r.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(R$,this.pathUtils.relative(this.target,e))}}});var iE,N$=Ct(()=>{Ip();iE=class extends js{constructor(r,s){super(s);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var Cd,rl,r0,O$=Ct(()=>{Cd=Ie("fs");Ed();Id();x_();ix();tl();rl=4278190080,r0=class extends Uf{constructor({baseFs:r=new Yn,filter:s=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:c=!0,maxAge:f=5e3,typeCheck:p=Cd.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:C}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error("The magic byte must be set to a round value between 1 and 127 included");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=c?new Map:null,this.factoryPromise=E,this.factorySync=C,this.filter=s,this.getMountPoint=h,this.magic=a<<24,this.maxAge=f,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(md(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(md(this),this.mountInstances)for(let[r,{childFs:s}]of this.mountInstances.entries())s.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,s){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,s]),a}async openPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,s,a),async(n,{subPath:c})=>this.remapFd(n,await n.openPromise(c,s,a)))}openSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,s,a),(n,{subPath:c})=>this.remapFd(n,n.openSync(c,s,a)))}async opendirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,s),async(a,{subPath:n})=>await a.opendirPromise(n,s),{requireSubpath:!1})}opendirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,s),(a,{subPath:n})=>a.opendirSync(n,s),{requireSubpath:!1})}async readPromise(r,s,a,n,c){if((r&rl)!==this.magic)return await this.baseFs.readPromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("read");let[p,h]=f;return await p.readPromise(h,s,a,n,c)}readSync(r,s,a,n,c){if((r&rl)!==this.magic)return this.baseFs.readSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("readSync");let[p,h]=f;return p.readSync(h,s,a,n,c)}async writePromise(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s=="string"?await this.baseFs.writePromise(r,s,a):await this.baseFs.writePromise(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("write");let[p,h]=f;return typeof s=="string"?await p.writePromise(h,s,a):await p.writePromise(h,s,a,n,c)}writeSync(r,s,a,n,c){if((r&rl)!==this.magic)return typeof s=="string"?this.baseFs.writeSync(r,s,a):this.baseFs.writeSync(r,s,a,n,c);let f=this.fdMap.get(r);if(typeof f>"u")throw Uo("writeSync");let[p,h]=f;return typeof s=="string"?p.writeSync(h,s,a):p.writeSync(h,s,a,n,c)}async closePromise(r){if((r&rl)!==this.magic)return await this.baseFs.closePromise(r);let s=this.fdMap.get(r);if(typeof s>"u")throw Uo("close");this.fdMap.delete(r);let[a,n]=s;return await a.closePromise(n)}closeSync(r){if((r&rl)!==this.magic)return this.baseFs.closeSync(r);let s=this.fdMap.get(r);if(typeof s>"u")throw Uo("closeSync");this.fdMap.delete(r);let[a,n]=s;return a.closeSync(n)}createReadStream(r,s){return r===null?this.baseFs.createReadStream(r,s):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,s),(a,{archivePath:n,subPath:c})=>{let f=a.createReadStream(c,s);return f.path=ue.fromPortablePath(this.pathUtils.join(n,c)),f})}createWriteStream(r,s){return r===null?this.baseFs.createWriteStream(r,s):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,s),(a,{subPath:n})=>a.createWriteStream(n,s))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>"u"&&(c=await this.baseFs.realpathPromise(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,await s.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(s,{archivePath:a,subPath:n})=>{let c=this.realPaths.get(a);return typeof c>"u"&&(c=this.baseFs.realpathSync(a),this.realPaths.set(a,c)),this.pathUtils.join(c,this.pathUtils.relative(vt.root,s.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(s,{subPath:a})=>await s.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(s,{subPath:a})=>s.existsSync(a))}async accessPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,s),async(a,{subPath:n})=>await a.accessPromise(n,s))}accessSync(r,s){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,s),(a,{subPath:n})=>a.accessSync(n,s))}async statPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,s),async(a,{subPath:n})=>await a.statPromise(n,s))}statSync(r,s){return this.makeCallSync(r,()=>this.baseFs.statSync(r,s),(a,{subPath:n})=>a.statSync(n,s))}async fstatPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatPromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fstat");let[n,c]=a;return n.fstatPromise(c,s)}fstatSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fstatSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fstatSync");let[n,c]=a;return n.fstatSync(c,s)}async lstatPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,s),async(a,{subPath:n})=>await a.lstatPromise(n,s))}lstatSync(r,s){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,s),(a,{subPath:n})=>a.lstatSync(n,s))}async fchmodPromise(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodPromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fchmod");let[n,c]=a;return n.fchmodPromise(c,s)}fchmodSync(r,s){if((r&rl)!==this.magic)return this.baseFs.fchmodSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("fchmodSync");let[n,c]=a;return n.fchmodSync(c,s)}async chmodPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,s),async(a,{subPath:n})=>await a.chmodPromise(n,s))}chmodSync(r,s){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,s),(a,{subPath:n})=>a.chmodSync(n,s))}async fchownPromise(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownPromise(r,s,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Uo("fchown");let[c,f]=n;return c.fchownPromise(f,s,a)}fchownSync(r,s,a){if((r&rl)!==this.magic)return this.baseFs.fchownSync(r,s,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Uo("fchownSync");let[c,f]=n;return c.fchownSync(f,s,a)}async chownPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,s,a),async(n,{subPath:c})=>await n.chownPromise(c,s,a))}chownSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,s,a),(n,{subPath:c})=>n.chownSync(c,s,a))}async renamePromise(r,s){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.renamePromise(r,s),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(a,{subPath:n})=>await this.makeCallPromise(s,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await a.renamePromise(n,f)}))}renameSync(r,s){return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.renameSync(r,s),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(a,{subPath:n})=>this.makeCallSync(s,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(c,{subPath:f})=>{if(a!==c)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return a.renameSync(n,f)}))}async copyFilePromise(r,s,a=0){let n=async(c,f,p,h)=>{if(a&Cd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:"EXDEV"});if(a&Cd.constants.COPYFILE_EXCL&&await this.existsPromise(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:"EEXIST"});let E;try{E=await c.readFilePromise(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:"EINVAL"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(s,async()=>await this.baseFs.copyFilePromise(r,s,a),async(c,{subPath:f})=>await n(this.baseFs,r,c,f)),async(c,{subPath:f})=>await this.makeCallPromise(s,async()=>await n(c,f,this.baseFs,s),async(p,{subPath:h})=>c!==p?await n(c,f,p,h):await c.copyFilePromise(f,h,a)))}copyFileSync(r,s,a=0){let n=(c,f,p,h)=>{if(a&Cd.constants.COPYFILE_FICLONE_FORCE)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${f}' -> ${h}'`),{code:"EXDEV"});if(a&Cd.constants.COPYFILE_EXCL&&this.existsSync(f))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${f}' -> '${h}'`),{code:"EEXIST"});let E;try{E=c.readFileSync(f)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${f}' -> '${h}'`),{code:"EINVAL"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(s,()=>this.baseFs.copyFileSync(r,s,a),(c,{subPath:f})=>n(this.baseFs,r,c,f)),(c,{subPath:f})=>this.makeCallSync(s,()=>n(c,f,this.baseFs,s),(p,{subPath:h})=>c!==p?n(c,f,p,h):c.copyFileSync(f,h,a)))}async appendFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,s,a),async(n,{subPath:c})=>await n.appendFilePromise(c,s,a))}appendFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,s,a),(n,{subPath:c})=>n.appendFileSync(c,s,a))}async writeFilePromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,s,a),async(n,{subPath:c})=>await n.writeFilePromise(c,s,a))}writeFileSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,s,a),(n,{subPath:c})=>n.writeFileSync(c,s,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(s,{subPath:a})=>await s.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(s,{subPath:a})=>s.unlinkSync(a))}async utimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,s,a),async(n,{subPath:c})=>await n.utimesPromise(c,s,a))}utimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,s,a),(n,{subPath:c})=>n.utimesSync(c,s,a))}async lutimesPromise(r,s,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,s,a),async(n,{subPath:c})=>await n.lutimesPromise(c,s,a))}lutimesSync(r,s,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,s,a),(n,{subPath:c})=>n.lutimesSync(c,s,a))}async mkdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,s),async(a,{subPath:n})=>await a.mkdirPromise(n,s))}mkdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,s),(a,{subPath:n})=>a.mkdirSync(n,s))}async rmdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,s),async(a,{subPath:n})=>await a.rmdirPromise(n,s))}rmdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,s),(a,{subPath:n})=>a.rmdirSync(n,s))}async rmPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,s),async(a,{subPath:n})=>await a.rmPromise(n,s))}rmSync(r,s){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,s),(a,{subPath:n})=>a.rmSync(n,s))}async linkPromise(r,s){return await this.makeCallPromise(s,async()=>await this.baseFs.linkPromise(r,s),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,s){return this.makeCallSync(s,()=>this.baseFs.linkSync(r,s),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,s,a){return await this.makeCallPromise(s,async()=>await this.baseFs.symlinkPromise(r,s,a),async(n,{subPath:c})=>await n.symlinkPromise(r,c))}symlinkSync(r,s,a){return this.makeCallSync(s,()=>this.baseFs.symlinkSync(r,s,a),(n,{subPath:c})=>n.symlinkSync(r,c))}async readFilePromise(r,s){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,s),async(a,{subPath:n})=>await a.readFilePromise(n,s))}readFileSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,s),(a,{subPath:n})=>a.readFileSync(n,s))}async readdirPromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,s),async(a,{subPath:n})=>await a.readdirPromise(n,s),{requireSubpath:!1})}readdirSync(r,s){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,s),(a,{subPath:n})=>a.readdirSync(n,s),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(s,{subPath:a})=>await s.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(s,{subPath:a})=>s.readlinkSync(a))}async truncatePromise(r,s){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,s),async(a,{subPath:n})=>await a.truncatePromise(n,s))}truncateSync(r,s){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,s),(a,{subPath:n})=>a.truncateSync(n,s))}async ftruncatePromise(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncatePromise(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("ftruncate");let[n,c]=a;return n.ftruncatePromise(c,s)}ftruncateSync(r,s){if((r&rl)!==this.magic)return this.baseFs.ftruncateSync(r,s);let a=this.fdMap.get(r);if(typeof a>"u")throw Uo("ftruncateSync");let[n,c]=a;return n.ftruncateSync(c,s)}watch(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,s,a),(n,{subPath:c})=>n.watch(c,s,a))}watchFile(r,s,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,s,a),()=>nE(this,r,s,a))}unwatchFile(r,s){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,s),()=>dd(this,r,s))}async makeCallPromise(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return await s();let c=this.resolve(r),f=this.findMount(c);return f?n&&f.subPath==="/"?await s():await this.getMountPromise(f.archivePath,async p=>await a(p,f)):await s()}makeCallSync(r,s,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return s();let c=this.resolve(r),f=this.findMount(c);return!f||n&&f.subPath==="/"?s():this.getMountSync(f.archivePath,p=>a(p,f))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let s="";for(;;){let a=r.substring(s.length),n=this.getMountPoint(a,s);if(!n)return null;if(s=this.pathUtils.join(s,n),!this.isMount.has(s)){if(this.notMount.has(s))continue;try{if(this.typeCheck!==null&&(this.baseFs.statSync(s).mode&Cd.constants.S_IFMT)!==this.typeCheck){this.notMount.add(s);continue}}catch{return null}this.isMount.add(s)}return{archivePath:s,subPath:this.pathUtils.join(vt.root,r.substring(s.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let s=Date.now(),a=s+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[c,{childFs:f,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||f.hasOpenFileHandles?.())){if(s>=p){f.saveAndClose?.(),this.mountInstances.delete(c),n-=1;continue}else if(r===null||n<=0){a=p;break}f.saveAndClose?.(),this.mountInstances.delete(c),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-s).unref())}async getMountPromise(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await s(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await s(a)}finally{a.saveAndClose?.()}}}getMountSync(r,s){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,s(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return s(a)}finally{a.saveAndClose?.()}}}}});var er,fx,L$=Ct(()=>{Ed();tl();er=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),fx=class t extends Ep{static{this.instance=new t}constructor(){super(K)}getExtractHint(){throw er()}getRealPath(){throw er()}resolve(){throw er()}async openPromise(){throw er()}openSync(){throw er()}async opendirPromise(){throw er()}opendirSync(){throw er()}async readPromise(){throw er()}readSync(){throw er()}async writePromise(){throw er()}writeSync(){throw er()}async closePromise(){throw er()}closeSync(){throw er()}createWriteStream(){throw er()}createReadStream(){throw er()}async realpathPromise(){throw er()}realpathSync(){throw er()}async readdirPromise(){throw er()}readdirSync(){throw er()}async existsPromise(e){throw er()}existsSync(e){throw er()}async accessPromise(){throw er()}accessSync(){throw er()}async statPromise(){throw er()}statSync(){throw er()}async fstatPromise(e){throw er()}fstatSync(e){throw er()}async lstatPromise(e){throw er()}lstatSync(e){throw er()}async fchmodPromise(){throw er()}fchmodSync(){throw er()}async chmodPromise(){throw er()}chmodSync(){throw er()}async fchownPromise(){throw er()}fchownSync(){throw er()}async chownPromise(){throw er()}chownSync(){throw er()}async mkdirPromise(){throw er()}mkdirSync(){throw er()}async rmdirPromise(){throw er()}rmdirSync(){throw er()}async rmPromise(){throw er()}rmSync(){throw er()}async linkPromise(){throw er()}linkSync(){throw er()}async symlinkPromise(){throw er()}symlinkSync(){throw er()}async renamePromise(){throw er()}renameSync(){throw er()}async copyFilePromise(){throw er()}copyFileSync(){throw er()}async appendFilePromise(){throw er()}appendFileSync(){throw er()}async writeFilePromise(){throw er()}writeFileSync(){throw er()}async unlinkPromise(){throw er()}unlinkSync(){throw er()}async utimesPromise(){throw er()}utimesSync(){throw er()}async lutimesPromise(){throw er()}lutimesSync(){throw er()}async readFilePromise(){throw er()}readFileSync(){throw er()}async readlinkPromise(){throw er()}readlinkSync(){throw er()}async truncatePromise(){throw er()}truncateSync(){throw er()}async ftruncatePromise(e,r){throw er()}ftruncateSync(e,r){throw er()}watch(){throw er()}watchFile(){throw er()}unwatchFile(){throw er()}}});var n0,M$=Ct(()=>{Ip();tl();n0=class extends js{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return ue.fromPortablePath(e)}mapToBase(e){return ue.toPortablePath(e)}}});var m7e,k_,y7e,Ao,_$=Ct(()=>{Id();Ip();tl();m7e=/^[0-9]+$/,k_=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,y7e=/^([^/]+-)?[a-f0-9]+$/,Ao=class t extends js{static makeVirtualPath(e,r,s){if(K.basename(e)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!K.basename(r).match(y7e))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let n=K.relative(K.dirname(e),s).split("/"),c=0;for(;c{Q_=et(Ie("buffer")),U$=Ie("url"),H$=Ie("util");Ip();tl();Ax=class extends js{constructor(e){super(ue),this.baseFs=e}mapFromBase(e){return e}mapToBase(e){if(typeof e=="string")return e;if(e instanceof URL)return(0,U$.fileURLToPath)(e);if(Buffer.isBuffer(e)){let r=e.toString();if(!E7e(e,r))throw new Error("Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942");return r}throw new Error(`Unsupported path type: ${(0,H$.inspect)(e)}`)}}});var V$,Ho,Cp,i0,px,hx,sE,Nu,Ou,q$,G$,W$,Y$,M2,K$=Ct(()=>{V$=Ie("readline"),Ho=Symbol("kBaseFs"),Cp=Symbol("kFd"),i0=Symbol("kClosePromise"),px=Symbol("kCloseResolve"),hx=Symbol("kCloseReject"),sE=Symbol("kRefs"),Nu=Symbol("kRef"),Ou=Symbol("kUnref"),M2=class{constructor(e,r){this[Y$]=1;this[W$]=void 0;this[G$]=void 0;this[q$]=void 0;this[Ho]=r,this[Cp]=e}get fd(){return this[Cp]}async appendFile(e,r){try{this[Nu](this.appendFile);let s=(typeof r=="string"?r:r?.encoding)??void 0;return await this[Ho].appendFilePromise(this.fd,e,s?{encoding:s}:void 0)}finally{this[Ou]()}}async chown(e,r){try{return this[Nu](this.chown),await this[Ho].fchownPromise(this.fd,e,r)}finally{this[Ou]()}}async chmod(e){try{return this[Nu](this.chmod),await this[Ho].fchmodPromise(this.fd,e)}finally{this[Ou]()}}createReadStream(e){return this[Ho].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Ho].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(e,r,s,a){try{this[Nu](this.read);let n;return Buffer.isBuffer(e)?n=e:(e??={},n=e.buffer??Buffer.alloc(16384),r=e.offset||0,s=e.length??n.byteLength,a=e.position??null),r??=0,s??=0,s===0?{bytesRead:s,buffer:n}:{bytesRead:await this[Ho].readPromise(this.fd,n,r,s,a),buffer:n}}finally{this[Ou]()}}async readFile(e){try{this[Nu](this.readFile);let r=(typeof e=="string"?e:e?.encoding)??void 0;return await this[Ho].readFilePromise(this.fd,r)}finally{this[Ou]()}}readLines(e){return(0,V$.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Nu](this.stat),await this[Ho].fstatPromise(this.fd,e)}finally{this[Ou]()}}async truncate(e){try{return this[Nu](this.truncate),await this[Ho].ftruncatePromise(this.fd,e)}finally{this[Ou]()}}utimes(e,r){throw new Error("Method not implemented.")}async writeFile(e,r){try{this[Nu](this.writeFile);let s=(typeof r=="string"?r:r?.encoding)??void 0;await this[Ho].writeFilePromise(this.fd,e,s)}finally{this[Ou]()}}async write(...e){try{if(this[Nu](this.write),ArrayBuffer.isView(e[0])){let[r,s,a,n]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,s,a]=e;return{bytesWritten:await this[Ho].writePromise(this.fd,r,s,a),buffer:r}}}finally{this[Ou]()}}async writev(e,r){try{this[Nu](this.writev);let s=0;if(typeof r<"u")for(let a of e){let n=await this.write(a,void 0,void 0,r);s+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);s+=n.bytesWritten}return{buffers:e,bytesWritten:s}}finally{this[Ou]()}}readv(e,r){throw new Error("Method not implemented.")}close(){if(this[Cp]===-1)return Promise.resolve();if(this[i0])return this[i0];if(this[sE]--,this[sE]===0){let e=this[Cp];this[Cp]=-1,this[i0]=this[Ho].closePromise(e).finally(()=>{this[i0]=void 0})}else this[i0]=new Promise((e,r)=>{this[px]=e,this[hx]=r}).finally(()=>{this[i0]=void 0,this[hx]=void 0,this[px]=void 0});return this[i0]}[(Ho,Cp,Y$=sE,W$=i0,G$=px,q$=hx,Nu)](e){if(this[Cp]===-1){let r=new Error("file closed");throw r.code="EBADF",r.syscall=e.name,r}this[sE]++}[Ou](){if(this[sE]--,this[sE]===0){let e=this[Cp];this[Cp]=-1,this[Ho].closePromise(e).then(this[px],this[hx])}}}});function _2(t,e){e=new Ax(e);let r=(s,a,n)=>{let c=s[a];s[a]=n,typeof c?.[oE.promisify.custom]<"u"&&(n[oE.promisify.custom]=c[oE.promisify.custom])};{r(t,"exists",(s,...a)=>{let c=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(s).then(f=>{c(f)},()=>{c(!1)})})}),r(t,"read",(...s)=>{let[a,n,c,f,p,h]=s;if(s.length<=3){let E={};s.length<3?h=s[1]:(E=s[1],h=s[2]),{buffer:n=Buffer.alloc(16384),offset:c=0,length:f=n.byteLength,position:p}=E}if(c==null&&(c=0),f|=0,f===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,c,f,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let s of J$){let a=s.replace(/Promise$/,"");if(typeof t[a]>"u")continue;let n=e[s];if(typeof n>"u")continue;r(t,a,(...f)=>{let h=typeof f[f.length-1]=="function"?f.pop():()=>{};process.nextTick(()=>{n.apply(e,f).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,"existsSync",s=>{try{return e.existsSync(s)}catch{return!1}}),r(t,"readSync",(...s)=>{let[a,n,c,f,p]=s;return s.length<=3&&({offset:c=0,length:f=n.byteLength,position:p}=s[2]||{}),c==null&&(c=0),f|=0,f===0?0:(p==null&&(p=-1),e.readSync(a,n,c,f,p))});for(let s of I7e){let a=s;if(typeof t[a]>"u")continue;let n=e[s];typeof n>"u"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let s=t.promises;for(let a of J$){let n=a.replace(/Promise$/,"");if(typeof s[n]>"u")continue;let c=e[a];typeof c>"u"||a!=="open"&&r(s,n,(f,...p)=>f instanceof M2?f[n].apply(f,p):c.call(e,f,...p))}r(s,"open",async(...a)=>{let n=await e.openPromise(...a);return new M2(n,e)})}t.read[oE.promisify.custom]=async(s,a,...n)=>({bytesRead:await e.readPromise(s,a,...n),buffer:a}),t.write[oE.promisify.custom]=async(s,a,...n)=>({bytesWritten:await e.writePromise(s,a,...n),buffer:a})}function gx(t,e){let r=Object.create(t);return _2(r,e),r}var oE,I7e,J$,z$=Ct(()=>{oE=Ie("util");j$();K$();I7e=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","fchownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","rmSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),J$=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","fchownPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","rmPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"])});function Z$(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${t}${e}`}function X$(){if(T_)return T_;let t=ue.toPortablePath($$.default.tmpdir()),e=le.realpathSync(t);return process.once("exit",()=>{le.rmtempSync()}),T_={tmpdir:t,realTmpdir:e}}var $$,Lu,T_,le,eee=Ct(()=>{$$=et(Ie("os"));Id();tl();Lu=new Set,T_=null;le=Object.assign(new Yn,{detachTemp(t){Lu.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=X$();for(;;){let s=Z$("xfs-");try{this.mkdirSync(K.join(e,s))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>"u")return a;try{return t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=X$();for(;;){let s=Z$("xfs-");try{await this.mkdirPromise(K.join(e,s))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=K.join(r,s);if(Lu.add(a),typeof t>"u")return a;try{return await t(a)}finally{if(Lu.has(a)){Lu.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Lu.values()).map(async t=>{try{await le.removePromise(t,{maxRetries:0}),Lu.delete(t)}catch{}}))},rmtempSync(){for(let t of Lu)try{le.removeSync(t),Lu.delete(t)}catch{}}})});var U2={};Vt(U2,{AliasFS:()=>Hf,BasePortableFakeFS:()=>Uf,CustomDir:()=>L2,CwdFS:()=>Sn,FakeFS:()=>Ep,Filename:()=>Er,JailFS:()=>jf,LazyFS:()=>iE,MountFS:()=>r0,NoFS:()=>fx,NodeFS:()=>Yn,PortablePath:()=>vt,PosixFS:()=>n0,ProxiedFS:()=>js,VirtualFS:()=>Ao,constants:()=>fi,errors:()=>or,extendFs:()=>gx,normalizeLineEndings:()=>yd,npath:()=>ue,opendir:()=>lx,patchFs:()=>_2,ppath:()=>K,setupCopyIndex:()=>ax,statUtils:()=>el,unwatchAllFiles:()=>md,unwatchFile:()=>dd,watchFile:()=>nE,xfs:()=>le});var bt=Ct(()=>{m$();ix();S_();P_();B$();x_();Ed();tl();tl();x$();Ed();T$();F$();N$();O$();L$();Id();M$();Ip();_$();z$();eee()});var see=L((wGt,iee)=>{iee.exports=nee;nee.sync=w7e;var tee=Ie("fs");function C7e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var s=0;s{cee.exports=aee;aee.sync=B7e;var oee=Ie("fs");function aee(t,e,r){oee.stat(t,function(s,a){r(s,s?!1:lee(a,e))})}function B7e(t,e){return lee(oee.statSync(t),e)}function lee(t,e){return t.isFile()&&v7e(t,e)}function v7e(t,e){var r=t.mode,s=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),f=parseInt("100",8),p=parseInt("010",8),h=parseInt("001",8),E=f|p,C=r&h||r&p&&a===c||r&f&&s===n||r&E&&n===0;return C}});var Aee=L((SGt,fee)=>{var vGt=Ie("fs"),dx;process.platform==="win32"||global.TESTING_WINDOWS?dx=see():dx=uee();fee.exports=R_;R_.sync=S7e;function R_(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(s,a){R_(t,e||{},function(n,c){n?a(n):s(c)})})}dx(t,e||{},function(s,a){s&&(s.code==="EACCES"||e&&e.ignoreErrors)&&(s=null,a=!1),r(s,a)})}function S7e(t,e){try{return dx.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Eee=L((DGt,yee)=>{var aE=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pee=Ie("path"),D7e=aE?";":":",hee=Aee(),gee=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),dee=(t,e)=>{let r=e.colon||D7e,s=t.match(/\//)||aE&&t.match(/\\/)?[""]:[...aE?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],a=aE?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",n=aE?a.split(r):[""];return aE&&t.indexOf(".")!==-1&&n[0]!==""&&n.unshift(""),{pathEnv:s,pathExt:n,pathExtExe:a}},mee=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:s,pathExt:a,pathExtExe:n}=dee(t,e),c=[],f=h=>new Promise((E,C)=>{if(h===s.length)return e.all&&c.length?E(c):C(gee(t));let S=s[h],P=/^".*"$/.test(S)?S.slice(1,-1):S,I=pee.join(P,t),R=!P&&/^\.[\\\/]/.test(t)?t.slice(0,2)+I:I;E(p(R,h,0))}),p=(h,E,C)=>new Promise((S,P)=>{if(C===a.length)return S(f(E+1));let I=a[C];hee(h+I,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)c.push(h+I);else return S(h+I);return S(p(h,E,C+1))})});return r?f(0).then(h=>r(null,h),r):f(0)},b7e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:s,pathExtExe:a}=dee(t,e),n=[];for(let c=0;c{"use strict";var Iee=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};F_.exports=Iee;F_.exports.default=Iee});var See=L((PGt,vee)=>{"use strict";var wee=Ie("path"),P7e=Eee(),x7e=Cee();function Bee(t,e){let r=t.options.env||process.env,s=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let c;try{c=P7e.sync(t.command,{path:r[x7e({env:r})],pathExt:e?wee.delimiter:void 0})}catch{}finally{n&&process.chdir(s)}return c&&(c=wee.resolve(a?t.options.cwd:"",c)),c}function k7e(t){return Bee(t)||Bee(t,!0)}vee.exports=k7e});var Dee=L((xGt,O_)=>{"use strict";var N_=/([()\][%!^"`<>&|;, *?])/g;function Q7e(t){return t=t.replace(N_,"^$1"),t}function T7e(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(N_,"^$1"),e&&(t=t.replace(N_,"^$1")),t}O_.exports.command=Q7e;O_.exports.argument=T7e});var Pee=L((kGt,bee)=>{"use strict";bee.exports=/^#!(.*)/});var kee=L((QGt,xee)=>{"use strict";var R7e=Pee();xee.exports=(t="")=>{let e=t.match(R7e);if(!e)return null;let[r,s]=e[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return a==="env"?s:s?`${a} ${s}`:a}});var Tee=L((TGt,Qee)=>{"use strict";var L_=Ie("fs"),F7e=kee();function N7e(t){let r=Buffer.alloc(150),s;try{s=L_.openSync(t,"r"),L_.readSync(s,r,0,150,0),L_.closeSync(s)}catch{}return F7e(r.toString())}Qee.exports=N7e});var Oee=L((RGt,Nee)=>{"use strict";var O7e=Ie("path"),Ree=See(),Fee=Dee(),L7e=Tee(),M7e=process.platform==="win32",_7e=/\.(?:com|exe)$/i,U7e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function H7e(t){t.file=Ree(t);let e=t.file&&L7e(t.file);return e?(t.args.unshift(t.file),t.command=e,Ree(t)):t.file}function j7e(t){if(!M7e)return t;let e=H7e(t),r=!_7e.test(e);if(t.options.forceShell||r){let s=U7e.test(e);t.command=O7e.normalize(t.command),t.command=Fee.command(t.command),t.args=t.args.map(n=>Fee.argument(n,s));let a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function q7e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let s={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?s:j7e(s)}Nee.exports=q7e});var _ee=L((FGt,Mee)=>{"use strict";var M_=process.platform==="win32";function __(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function G7e(t,e){if(!M_)return;let r=t.emit;t.emit=function(s,a){if(s==="exit"){let n=Lee(a,e);if(n)return r.call(t,"error",n)}return r.apply(t,arguments)}}function Lee(t,e){return M_&&t===1&&!e.file?__(e.original,"spawn"):null}function W7e(t,e){return M_&&t===1&&!e.file?__(e.original,"spawnSync"):null}Mee.exports={hookChildProcess:G7e,verifyENOENT:Lee,verifyENOENTSync:W7e,notFoundError:__}});var j_=L((NGt,lE)=>{"use strict";var Uee=Ie("child_process"),U_=Oee(),H_=_ee();function Hee(t,e,r){let s=U_(t,e,r),a=Uee.spawn(s.command,s.args,s.options);return H_.hookChildProcess(a,s),a}function Y7e(t,e,r){let s=U_(t,e,r),a=Uee.spawnSync(s.command,s.args,s.options);return a.error=a.error||H_.verifyENOENTSync(a.status,s),a}lE.exports=Hee;lE.exports.spawn=Hee;lE.exports.sync=Y7e;lE.exports._parse=U_;lE.exports._enoent=H_});var qee=L((OGt,jee)=>{"use strict";function V7e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function wd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,wd)}V7e(wd,Error);wd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C>",b=ur(">>",!1),y=">&",F=ur(">&",!1),z=">",Z=ur(">",!1),$="<<<",oe=ur("<<<",!1),xe="<&",Te=ur("<&",!1),lt="<",It=ur("<",!1),qt=function(O){return{type:"argument",segments:[].concat(...O)}},ir=function(O){return O},Pt="$'",gn=ur("$'",!1),Pr="'",Ir=ur("'",!1),Nr=function(O){return[{type:"text",text:O}]},nn='""',ai=ur('""',!1),wo=function(){return{type:"text",text:""}},ns='"',to=ur('"',!1),Bo=function(O){return O},ji=function(O){return{type:"arithmetic",arithmetic:O,quoted:!0}},ro=function(O){return{type:"shell",shell:O,quoted:!0}},vo=function(O){return{type:"variable",...O,quoted:!0}},RA=function(O){return{type:"text",text:O}},pf=function(O){return{type:"arithmetic",arithmetic:O,quoted:!1}},yh=function(O){return{type:"shell",shell:O,quoted:!1}},Eh=function(O){return{type:"variable",...O,quoted:!1}},no=function(O){return{type:"glob",pattern:O}},jn=/^[^']/,Fs=Zi(["'"],!0,!1),io=function(O){return O.join("")},lu=/^[^$"]/,cu=Zi(["$",'"'],!0,!1),uu=`\\ +`,FA=ur(`\\ +`,!1),NA=function(){return""},aa="\\",la=ur("\\",!1),OA=/^[\\$"`]/,gr=Zi(["\\","$",'"',"`"],!1,!1),So=function(O){return O},Me="\\a",fu=ur("\\a",!1),Cr=function(){return"a"},hf="\\b",LA=ur("\\b",!1),MA=function(){return"\b"},Au=/^[Ee]/,pu=Zi(["E","e"],!1,!1),ac=function(){return"\x1B"},ve="\\f",Nt=ur("\\f",!1),lc=function(){return"\f"},Li="\\n",so=ur("\\n",!1),Rt=function(){return` +`},xn="\\r",ca=ur("\\r",!1),qi=function(){return"\r"},Mi="\\t",Oa=ur("\\t",!1),dn=function(){return" "},Jn="\\v",hu=ur("\\v",!1),Ih=function(){return"\v"},La=/^[\\'"?]/,Ma=Zi(["\\","'",'"',"?"],!1,!1),Ua=function(O){return String.fromCharCode(parseInt(O,16))},Xe="\\x",Ha=ur("\\x",!1),gf="\\u",cc=ur("\\u",!1),wn="\\U",ua=ur("\\U",!1),_A=function(O){return String.fromCodePoint(parseInt(O,16))},UA=/^[0-7]/,fa=Zi([["0","7"]],!1,!1),vl=/^[0-9a-fA-f]/,Mt=Zi([["0","9"],["a","f"],["A","f"]],!1,!1),kn=Ef(),Aa="{}",ja=ur("{}",!1),is=function(){return"{}"},uc="-",gu=ur("-",!1),fc="+",qa=ur("+",!1),_i=".",ws=ur(".",!1),Sl=function(O,J,re){return{type:"number",value:(O==="-"?-1:1)*parseFloat(J.join("")+"."+re.join(""))}},df=function(O,J){return{type:"number",value:(O==="-"?-1:1)*parseInt(J.join(""))}},Ac=function(O){return{type:"variable",...O}},Bi=function(O){return{type:"variable",name:O}},Qn=function(O){return O},pc="*",Je=ur("*",!1),st="/",St=ur("/",!1),lr=function(O,J,re){return{type:J==="*"?"multiplication":"division",right:re}},ee=function(O,J){return J.reduce((re,de)=>({left:re,...de}),O)},Ee=function(O,J,re){return{type:J==="+"?"addition":"subtraction",right:re}},Oe="$((",gt=ur("$((",!1),yt="))",Dt=ur("))",!1),tr=function(O){return O},fn="$(",li=ur("$(",!1),Gi=function(O){return O},Tn="${",Ga=ur("${",!1),gy=":-",X1=ur(":-",!1),Do=function(O,J){return{name:O,defaultValue:J}},dy=":-}",Ch=ur(":-}",!1),$1=function(O){return{name:O,defaultValue:[]}},bo=":+",wh=ur(":+",!1),Bh=function(O,J){return{name:O,alternativeValue:J}},du=":+}",vh=ur(":+}",!1),Rg=function(O){return{name:O,alternativeValue:[]}},Fg=function(O){return{name:O}},Ng="$",my=ur("$",!1),mf=function(O){return e.isGlobPattern(O)},Po=function(O){return O},Dl=/^[a-zA-Z0-9_]/,Sh=Zi([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Og=function(){return Cy()},bl=/^[$@*?#a-zA-Z0-9_\-]/,Pl=Zi(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),yy=/^[()}<>$|&; \t"']/,HA=Zi(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Ey=/^[<>&; \t"']/,Iy=Zi(["<",">","&",";"," "," ",'"',"'"],!1,!1),jA=/^[ \t]/,qA=Zi([" "," "],!1,!1),Y=0,xt=0,GA=[{line:1,column:1}],xo=0,yf=[],mt=0,mu;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Cy(){return t.substring(xt,Y)}function Lg(){return If(xt,Y)}function e2(O,J){throw J=J!==void 0?J:If(xt,Y),WA([Mg(O)],t.substring(xt,Y),J)}function Dh(O,J){throw J=J!==void 0?J:If(xt,Y),di(O,J)}function ur(O,J){return{type:"literal",text:O,ignoreCase:J}}function Zi(O,J,re){return{type:"class",parts:O,inverted:J,ignoreCase:re}}function Ef(){return{type:"any"}}function Wa(){return{type:"end"}}function Mg(O){return{type:"other",description:O}}function yu(O){var J=GA[O],re;if(J)return J;for(re=O-1;!GA[re];)re--;for(J=GA[re],J={line:J.line,column:J.column};rexo&&(xo=Y,yf=[]),yf.push(O))}function di(O,J){return new wd(O,null,null,J)}function WA(O,J,re){return new wd(wd.buildMessage(O,J),O,J,re)}function Ya(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=pa(),re===r&&(re=null),re!==r?(xt=O,J=n(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function pa(){var O,J,re,de,Ke;if(O=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de!==r?(Ke=Va(),Ke===r&&(Ke=null),Ke!==r?(xt=O,J=c(J,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,J=bh(),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de===r&&(de=null),de!==r?(xt=O,J=f(J,de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Va(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=pa(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=p(re),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function _g(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,mt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=C,Y++):(O=r,mt===0&&wt(S))),O}function bh(){var O,J,re;return O=Y,J=YA(),J!==r?(re=Ug(),re===r&&(re=null),re!==r?(xt=O,J=P(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Ug(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=wy(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=bh(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=I(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function wy(){var O;return t.substr(Y,2)===R?(O=R,Y+=2):(O=r,mt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,mt===0&&wt(W))),O}function YA(){var O,J,re;return O=Y,J=Cf(),J!==r?(re=Hg(),re===r&&(re=null),re!==r?(xt=O,J=te(J,re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Hg(){var O,J,re,de,Ke,ft,dr;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(re=Eu(),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=YA(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=ie(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function Eu(){var O;return t.substr(Y,2)===Ae?(O=Ae,Y+=2):(O=r,mt===0&&wt(ce)),O===r&&(t.charCodeAt(Y)===124?(O=me,Y++):(O=r,mt===0&&wt(pe))),O}function Iu(){var O,J,re,de,Ke,ft;if(O=Y,J=kh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,mt===0&&wt(Ce)),re!==r)if(de=VA(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(xt=O,J=g(J,de),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;else Y=O,O=r;if(O===r)if(O=Y,J=kh(),J!==r)if(t.charCodeAt(Y)===61?(re=Be,Y++):(re=r,mt===0&&wt(Ce)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=we(J),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function Cf(){var O,J,re,de,Ke,ft,dr,Br,_n,mi,Bs;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===40?(re=ye,Y++):(re=r,mt===0&&wt(fe)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===41?(dr=se,Y++):(dr=r,mt===0&&wt(X)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],mi=qn();mi!==r;)_n.push(mi),mi=qn();if(_n!==r){for(mi=[],Bs=kt();Bs!==r;)mi.push(Bs),Bs=kt();mi!==r?(xt=O,J=De(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r)if(t.charCodeAt(Y)===123?(re=Re,Y++):(re=r,mt===0&&wt(dt)),re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r)if(Ke=pa(),Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();if(ft!==r)if(t.charCodeAt(Y)===125?(dr=j,Y++):(dr=r,mt===0&&wt(rt)),dr!==r){for(Br=[],_n=kt();_n!==r;)Br.push(_n),_n=kt();if(Br!==r){for(_n=[],mi=qn();mi!==r;)_n.push(mi),mi=qn();if(_n!==r){for(mi=[],Bs=kt();Bs!==r;)mi.push(Bs),Bs=kt();mi!==r?(xt=O,J=Fe(Ke,_n),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){for(re=[],de=Iu();de!==r;)re.push(de),de=Iu();if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();if(de!==r){if(Ke=[],ft=Cu(),ft!==r)for(;ft!==r;)Ke.push(ft),ft=Cu();else Ke=r;if(Ke!==r){for(ft=[],dr=kt();dr!==r;)ft.push(dr),dr=kt();ft!==r?(xt=O,J=Ne(re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r}else Y=O,O=r;if(O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=Iu(),de!==r)for(;de!==r;)re.push(de),de=Iu();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Pe(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r}}}return O}function Ns(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r){if(re=[],de=ki(),de!==r)for(;de!==r;)re.push(de),de=ki();else re=r;if(re!==r){for(de=[],Ke=kt();Ke!==r;)de.push(Ke),Ke=kt();de!==r?(xt=O,J=Ye(re),O=J):(Y=O,O=r)}else Y=O,O=r}else Y=O,O=r;return O}function Cu(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();if(J!==r?(re=qn(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r){for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();J!==r?(re=ki(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r)}return O}function qn(){var O,J,re,de,Ke;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(it.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(_e)),re===r&&(re=null),re!==r?(de=ss(),de!==r?(Ke=ki(),Ke!==r?(xt=O,J=x(re,de,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function ss(){var O;return t.substr(Y,2)===w?(O=w,Y+=2):(O=r,mt===0&&wt(b)),O===r&&(t.substr(Y,2)===y?(O=y,Y+=2):(O=r,mt===0&&wt(F)),O===r&&(t.charCodeAt(Y)===62?(O=z,Y++):(O=r,mt===0&&wt(Z)),O===r&&(t.substr(Y,3)===$?(O=$,Y+=3):(O=r,mt===0&&wt(oe)),O===r&&(t.substr(Y,2)===xe?(O=xe,Y+=2):(O=r,mt===0&&wt(Te)),O===r&&(t.charCodeAt(Y)===60?(O=lt,Y++):(O=r,mt===0&&wt(It))))))),O}function ki(){var O,J,re;for(O=Y,J=[],re=kt();re!==r;)J.push(re),re=kt();return J!==r?(re=VA(),re!==r?(xt=O,J=ke(re),O=J):(Y=O,O=r)):(Y=O,O=r),O}function VA(){var O,J,re;if(O=Y,J=[],re=wf(),re!==r)for(;re!==r;)J.push(re),re=wf();else J=r;return J!==r&&(xt=O,J=qt(J)),O=J,O}function wf(){var O,J;return O=Y,J=mn(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=jg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=qg(),J!==r&&(xt=O,J=ir(J)),O=J,O===r&&(O=Y,J=os(),J!==r&&(xt=O,J=ir(J)),O=J))),O}function mn(){var O,J,re,de;return O=Y,t.substr(Y,2)===Pt?(J=Pt,Y+=2):(J=r,mt===0&&wt(gn)),J!==r?(re=yn(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,mt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,J,re,de;return O=Y,t.charCodeAt(Y)===39?(J=Pr,Y++):(J=r,mt===0&&wt(Ir)),J!==r?(re=Bf(),re!==r?(t.charCodeAt(Y)===39?(de=Pr,Y++):(de=r,mt===0&&wt(Ir)),de!==r?(xt=O,J=Nr(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function qg(){var O,J,re,de;if(O=Y,t.substr(Y,2)===nn?(J=nn,Y+=2):(J=r,mt===0&&wt(ai)),J!==r&&(xt=O,J=wo()),O=J,O===r)if(O=Y,t.charCodeAt(Y)===34?(J=ns,Y++):(J=r,mt===0&&wt(to)),J!==r){for(re=[],de=xl();de!==r;)re.push(de),de=xl();re!==r?(t.charCodeAt(Y)===34?(de=ns,Y++):(de=r,mt===0&&wt(to)),de!==r?(xt=O,J=Bo(re),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function os(){var O,J,re;if(O=Y,J=[],re=ko(),re!==r)for(;re!==r;)J.push(re),re=ko();else J=r;return J!==r&&(xt=O,J=Bo(J)),O=J,O}function xl(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=ji(J)),O=J,O===r&&(O=Y,J=xh(),J!==r&&(xt=O,J=ro(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=vo(J)),O=J,O===r&&(O=Y,J=vf(),J!==r&&(xt=O,J=RA(J)),O=J))),O}function ko(){var O,J;return O=Y,J=Xr(),J!==r&&(xt=O,J=pf(J)),O=J,O===r&&(O=Y,J=xh(),J!==r&&(xt=O,J=yh(J)),O=J,O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Eh(J)),O=J,O===r&&(O=Y,J=By(),J!==r&&(xt=O,J=no(J)),O=J,O===r&&(O=Y,J=Ph(),J!==r&&(xt=O,J=RA(J)),O=J)))),O}function Bf(){var O,J,re;for(O=Y,J=[],jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs));re!==r;)J.push(re),jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs));return J!==r&&(xt=O,J=io(J)),O=J,O}function vf(){var O,J,re;if(O=Y,J=[],re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(cu))),re!==r)for(;re!==r;)J.push(re),re=kl(),re===r&&(lu.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(cu)));else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function kl(){var O,J,re;return O=Y,t.substr(Y,2)===uu?(J=uu,Y+=2):(J=r,mt===0&&wt(FA)),J!==r&&(xt=O,J=NA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(OA.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(gr)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r)),O}function yn(){var O,J,re;for(O=Y,J=[],re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs)));re!==r;)J.push(re),re=Qo(),re===r&&(jn.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Fs)));return J!==r&&(xt=O,J=io(J)),O=J,O}function Qo(){var O,J,re;return O=Y,t.substr(Y,2)===Me?(J=Me,Y+=2):(J=r,mt===0&&wt(fu)),J!==r&&(xt=O,J=Cr()),O=J,O===r&&(O=Y,t.substr(Y,2)===hf?(J=hf,Y+=2):(J=r,mt===0&&wt(LA)),J!==r&&(xt=O,J=MA()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(Au.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(pu)),re!==r?(xt=O,J=ac(),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===ve?(J=ve,Y+=2):(J=r,mt===0&&wt(Nt)),J!==r&&(xt=O,J=lc()),O=J,O===r&&(O=Y,t.substr(Y,2)===Li?(J=Li,Y+=2):(J=r,mt===0&&wt(so)),J!==r&&(xt=O,J=Rt()),O=J,O===r&&(O=Y,t.substr(Y,2)===xn?(J=xn,Y+=2):(J=r,mt===0&&wt(ca)),J!==r&&(xt=O,J=qi()),O=J,O===r&&(O=Y,t.substr(Y,2)===Mi?(J=Mi,Y+=2):(J=r,mt===0&&wt(Oa)),J!==r&&(xt=O,J=dn()),O=J,O===r&&(O=Y,t.substr(Y,2)===Jn?(J=Jn,Y+=2):(J=r,mt===0&&wt(hu)),J!==r&&(xt=O,J=Ih()),O=J,O===r&&(O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(La.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Ma)),re!==r?(xt=O,J=So(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=wu()))))))))),O}function wu(){var O,J,re,de,Ke,ft,dr,Br,_n,mi,Bs,zA;return O=Y,t.charCodeAt(Y)===92?(J=aa,Y++):(J=r,mt===0&&wt(la)),J!==r?(re=ha(),re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Xe?(J=Xe,Y+=2):(J=r,mt===0&&wt(Ha)),J!==r?(re=Y,de=Y,Ke=ha(),Ke!==r?(ft=Os(),ft!==r?(Ke=[Ke,ft],de=Ke):(Y=de,de=r)):(Y=de,de=r),de===r&&(de=ha()),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===gf?(J=gf,Y+=2):(J=r,mt===0&&wt(cc)),J!==r?(re=Y,de=Y,Ke=Os(),Ke!==r?(ft=Os(),ft!==r?(dr=Os(),dr!==r?(Br=Os(),Br!==r?(Ke=[Ke,ft,dr,Br],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=Ua(re),O=J):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===wn?(J=wn,Y+=2):(J=r,mt===0&&wt(ua)),J!==r?(re=Y,de=Y,Ke=Os(),Ke!==r?(ft=Os(),ft!==r?(dr=Os(),dr!==r?(Br=Os(),Br!==r?(_n=Os(),_n!==r?(mi=Os(),mi!==r?(Bs=Os(),Bs!==r?(zA=Os(),zA!==r?(Ke=[Ke,ft,dr,Br,_n,mi,Bs,zA],de=Ke):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r)):(Y=de,de=r),de!==r?re=t.substring(re,Y):re=de,re!==r?(xt=O,J=_A(re),O=J):(Y=O,O=r)):(Y=O,O=r)))),O}function ha(){var O;return UA.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(fa)),O}function Os(){var O;return vl.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(Mt)),O}function Ph(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,mt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,mt===0&&wt(ja)),de!==r&&(xt=re,de=is()),re=de,re===r&&(re=Y,de=Y,mt++,Ke=vy(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r))),re!==r)for(;re!==r;)J.push(re),re=Y,t.charCodeAt(Y)===92?(de=aa,Y++):(de=r,mt===0&&wt(la)),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re===r&&(re=Y,t.substr(Y,2)===Aa?(de=Aa,Y+=2):(de=r,mt===0&&wt(ja)),de!==r&&(xt=re,de=is()),re=de,re===r&&(re=Y,de=Y,mt++,Ke=vy(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r)));else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function KA(){var O,J,re,de,Ke,ft;if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,mt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,mt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e));else re=r;if(re!==r)if(t.charCodeAt(Y)===46?(de=_i,Y++):(de=r,mt===0&&wt(ws)),de!==r){if(Ke=[],it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,mt===0&&wt(_e)),ft!==r)for(;ft!==r;)Ke.push(ft),it.test(t.charAt(Y))?(ft=t.charAt(Y),Y++):(ft=r,mt===0&&wt(_e));else Ke=r;Ke!==r?(xt=O,J=Sl(J,re,Ke),O=J):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;if(O===r){if(O=Y,t.charCodeAt(Y)===45?(J=uc,Y++):(J=r,mt===0&&wt(gu)),J===r&&(t.charCodeAt(Y)===43?(J=fc,Y++):(J=r,mt===0&&wt(qa))),J===r&&(J=null),J!==r){if(re=[],it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e)),de!==r)for(;de!==r;)re.push(de),it.test(t.charAt(Y))?(de=t.charAt(Y),Y++):(de=r,mt===0&&wt(_e));else re=r;re!==r?(xt=O,J=df(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;if(O===r&&(O=Y,J=JA(),J!==r&&(xt=O,J=Ac(J)),O=J,O===r&&(O=Y,J=hc(),J!==r&&(xt=O,J=Bi(J)),O=J,O===r)))if(O=Y,t.charCodeAt(Y)===40?(J=ye,Y++):(J=r,mt===0&&wt(fe)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=oo(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.charCodeAt(Y)===41?(ft=se,Y++):(ft=r,mt===0&&wt(X)),ft!==r?(xt=O,J=Qn(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r}return O}function Sf(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=KA(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,mt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,mt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===42?(ft=pc,Y++):(ft=r,mt===0&&wt(Je)),ft===r&&(t.charCodeAt(Y)===47?(ft=st,Y++):(ft=r,mt===0&&wt(St))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=KA(),Br!==r?(xt=de,Ke=lr(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function oo(){var O,J,re,de,Ke,ft,dr,Br;if(O=Y,J=Sf(),J!==r){for(re=[],de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,mt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,mt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ee(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r;for(;de!==r;){for(re.push(de),de=Y,Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();if(Ke!==r)if(t.charCodeAt(Y)===43?(ft=fc,Y++):(ft=r,mt===0&&wt(qa)),ft===r&&(t.charCodeAt(Y)===45?(ft=uc,Y++):(ft=r,mt===0&&wt(gu))),ft!==r){for(dr=[],Br=kt();Br!==r;)dr.push(Br),Br=kt();dr!==r?(Br=Sf(),Br!==r?(xt=de,Ke=Ee(J,ft,Br),de=Ke):(Y=de,de=r)):(Y=de,de=r)}else Y=de,de=r;else Y=de,de=r}re!==r?(xt=O,J=ee(J,re),O=J):(Y=O,O=r)}else Y=O,O=r;return O}function Xr(){var O,J,re,de,Ke,ft;if(O=Y,t.substr(Y,3)===Oe?(J=Oe,Y+=3):(J=r,mt===0&&wt(gt)),J!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();if(re!==r)if(de=oo(),de!==r){for(Ke=[],ft=kt();ft!==r;)Ke.push(ft),ft=kt();Ke!==r?(t.substr(Y,2)===yt?(ft=yt,Y+=2):(ft=r,mt===0&&wt(Dt)),ft!==r?(xt=O,J=tr(de),O=J):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;return O}function xh(){var O,J,re,de;return O=Y,t.substr(Y,2)===fn?(J=fn,Y+=2):(J=r,mt===0&&wt(li)),J!==r?(re=pa(),re!==r?(t.charCodeAt(Y)===41?(de=se,Y++):(de=r,mt===0&&wt(X)),de!==r?(xt=O,J=Gi(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O}function JA(){var O,J,re,de,Ke,ft;return O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===gy?(de=gy,Y+=2):(de=r,mt===0&&wt(X1)),de!==r?(Ke=Ns(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,mt===0&&wt(rt)),ft!==r?(xt=O,J=Do(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===dy?(de=dy,Y+=3):(de=r,mt===0&&wt(Ch)),de!==r?(xt=O,J=$1(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,2)===bo?(de=bo,Y+=2):(de=r,mt===0&&wt(wh)),de!==r?(Ke=Ns(),Ke!==r?(t.charCodeAt(Y)===125?(ft=j,Y++):(ft=r,mt===0&&wt(rt)),ft!==r?(xt=O,J=Bh(re,Ke),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.substr(Y,3)===du?(de=du,Y+=3):(de=r,mt===0&&wt(vh)),de!==r?(xt=O,J=Rg(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.substr(Y,2)===Tn?(J=Tn,Y+=2):(J=r,mt===0&&wt(Ga)),J!==r?(re=hc(),re!==r?(t.charCodeAt(Y)===125?(de=j,Y++):(de=r,mt===0&&wt(rt)),de!==r?(xt=O,J=Fg(re),O=J):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r),O===r&&(O=Y,t.charCodeAt(Y)===36?(J=Ng,Y++):(J=r,mt===0&&wt(my)),J!==r?(re=hc(),re!==r?(xt=O,J=Fg(re),O=J):(Y=O,O=r)):(Y=O,O=r)))))),O}function By(){var O,J,re;return O=Y,J=Gg(),J!==r?(xt=Y,re=mf(J),re?re=void 0:re=r,re!==r?(xt=O,J=Po(J),O=J):(Y=O,O=r)):(Y=O,O=r),O}function Gg(){var O,J,re,de,Ke;if(O=Y,J=[],re=Y,de=Y,mt++,Ke=Qh(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r),re!==r)for(;re!==r;)J.push(re),re=Y,de=Y,mt++,Ke=Qh(),mt--,Ke===r?de=void 0:(Y=de,de=r),de!==r?(t.length>Y?(Ke=t.charAt(Y),Y++):(Ke=r,mt===0&&wt(kn)),Ke!==r?(xt=re,de=So(Ke),re=de):(Y=re,re=r)):(Y=re,re=r);else J=r;return J!==r&&(xt=O,J=io(J)),O=J,O}function kh(){var O,J,re;if(O=Y,J=[],Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Sh)),re!==r)for(;re!==r;)J.push(re),Dl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Sh));else J=r;return J!==r&&(xt=O,J=Og()),O=J,O}function hc(){var O,J,re;if(O=Y,J=[],bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Pl)),re!==r)for(;re!==r;)J.push(re),bl.test(t.charAt(Y))?(re=t.charAt(Y),Y++):(re=r,mt===0&&wt(Pl));else J=r;return J!==r&&(xt=O,J=Og()),O=J,O}function vy(){var O;return yy.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(HA)),O}function Qh(){var O;return Ey.test(t.charAt(Y))?(O=t.charAt(Y),Y++):(O=r,mt===0&&wt(Iy)),O}function kt(){var O,J;if(O=[],jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,mt===0&&wt(qA)),J!==r)for(;J!==r;)O.push(J),jA.test(t.charAt(Y))?(J=t.charAt(Y),Y++):(J=r,mt===0&&wt(qA));else O=r;return O}if(mu=a(),mu!==r&&Y===t.length)return mu;throw mu!==r&&Y!1}){try{return(0,Gee.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function cE(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:s},a)=>`${Ex(r)}${s===";"?a!==t.length-1||e?";":"":" &"}`).join(" ")}function Ex(t){return`${uE(t.chain)}${t.then?` ${q_(t.then)}`:""}`}function q_(t){return`${t.type} ${Ex(t.line)}`}function uE(t){return`${W_(t)}${t.then?` ${G_(t.then)}`:""}`}function G_(t){return`${t.type} ${uE(t.chain)}`}function W_(t){switch(t.type){case"command":return`${t.envs.length>0?`${t.envs.map(e=>mx(e)).join(" ")} `:""}${t.args.map(e=>Y_(e)).join(" ")}`;case"subshell":return`(${cE(t.subshell)})${t.args.length>0?` ${t.args.map(e=>H2(e)).join(" ")}`:""}`;case"group":return`{ ${cE(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>H2(e)).join(" ")}`:""}`;case"envs":return t.envs.map(e=>mx(e)).join(" ");default:throw new Error(`Unsupported command type: "${t.type}"`)}}function mx(t){return`${t.name}=${t.args[0]?Bd(t.args[0]):""}`}function Y_(t){switch(t.type){case"redirection":return H2(t);case"argument":return Bd(t);default:throw new Error(`Unsupported argument type: "${t.type}"`)}}function H2(t){return`${t.subtype} ${t.args.map(e=>Bd(e)).join(" ")}`}function Bd(t){return t.segments.map(e=>V_(e)).join("")}function V_(t){let e=(s,a)=>a?`"${s}"`:s,r=s=>s===""?"''":s.match(/[()}<>$|&;"'\n\t ]/)?s.match(/['\t\p{C}]/u)?s.match(/'/)?`"${s.replace(/["$\t\p{C}]/u,z7e)}"`:`$'${s.replace(/[\t\p{C}]/u,Yee)}'`:`'${s}'`:s;switch(t.type){case"text":return r(t.text);case"glob":return t.pattern;case"shell":return e(`$(${cE(t.shell)})`,t.quoted);case"variable":return e(typeof t.defaultValue>"u"?typeof t.alternativeValue>"u"?`\${${t.name}}`:t.alternativeValue.length===0?`\${${t.name}:+}`:`\${${t.name}:+${t.alternativeValue.map(s=>Bd(s)).join(" ")}}`:t.defaultValue.length===0?`\${${t.name}:-}`:`\${${t.name}:-${t.defaultValue.map(s=>Bd(s)).join(" ")}}`,t.quoted);case"arithmetic":return`$(( ${Ix(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${t.type}"`)}}function Ix(t){let e=a=>{switch(a){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${a}"`)}},r=(a,n)=>n?`( ${a} )`:a,s=a=>r(Ix(a),!["number","variable"].includes(a.type));switch(t.type){case"number":return String(t.value);case"variable":return t.name;default:return`${s(t.left)} ${e(t.type)} ${s(t.right)}`}}var Gee,Wee,J7e,Yee,z7e,Vee=Ct(()=>{Gee=et(qee());Wee=new Map([["\f","\\f"],[` +`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),J7e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(Wee,([t,e])=>[t,`"$'${e}'"`])]),Yee=t=>Wee.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,z7e=t=>J7e.get(t)??`"$'${Yee(t)}'"`});var Jee=L((zGt,Kee)=>{"use strict";function Z7e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function vd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,vd)}Z7e(vd,Error);vd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;CAe&&(Ae=W,ce=[]),ce.push(_e))}function rt(_e,x){return new vd(_e,null,null,x)}function Fe(_e,x,w){return new vd(vd.buildMessage(_e,x),_e,x,w)}function Ne(){var _e,x,w,b;return _e=W,x=Pe(),x!==r?(t.charCodeAt(W)===47?(w=n,W++):(w=r,me===0&&j(c)),w!==r?(b=Pe(),b!==r?(te=_e,x=f(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Pe(),x!==r&&(te=_e,x=p(x)),_e=x),_e}function Pe(){var _e,x,w,b;return _e=W,x=Ye(),x!==r?(t.charCodeAt(W)===64?(w=h,W++):(w=r,me===0&&j(E)),w!==r?(b=it(),b!==r?(te=_e,x=C(x,b),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=Ye(),x!==r&&(te=_e,x=S(x)),_e=x),_e}function Ye(){var _e,x,w,b,y;return _e=W,t.charCodeAt(W)===64?(x=h,W++):(x=r,me===0&&j(E)),x!==r?(w=ke(),w!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(te=_e,x=P(),_e=x):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r)):(W=_e,_e=r),_e===r&&(_e=W,x=ke(),x!==r&&(te=_e,x=P()),_e=x),_e}function ke(){var _e,x,w;if(_e=W,x=[],I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R)),w!==r)for(;w!==r;)x.push(w),I.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(R));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}function it(){var _e,x,w;if(_e=W,x=[],N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U)),w!==r)for(;w!==r;)x.push(w),N.test(t.charAt(W))?(w=t.charAt(W),W++):(w=r,me===0&&j(U));else x=r;return x!==r&&(te=_e,x=P()),_e=x,_e}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W{zee=et(Jee())});var Dd=L((XGt,Sd)=>{"use strict";function Xee(t){return typeof t>"u"||t===null}function $7e(t){return typeof t=="object"&&t!==null}function eKe(t){return Array.isArray(t)?t:Xee(t)?[]:[t]}function tKe(t,e){var r,s,a,n;if(e)for(n=Object.keys(e),r=0,s=n.length;r{"use strict";function j2(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}j2.prototype=Object.create(Error.prototype);j2.prototype.constructor=j2;j2.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};$ee.exports=j2});var rte=L((e5t,tte)=>{"use strict";var ete=Dd();function K_(t,e,r,s,a){this.name=t,this.buffer=e,this.position=r,this.line=s,this.column=a}K_.prototype.getSnippet=function(e,r){var s,a,n,c,f;if(!this.buffer)return null;for(e=e||4,r=r||75,s="",a=this.position;a>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=" ... ",a+=5;break}for(n="",c=this.position;cr/2-1){n=" ... ",c-=5;break}return f=this.buffer.slice(a,c),ete.repeat(" ",e)+s+f+n+` +`+ete.repeat(" ",e+this.position-a+s.length)+"^"};K_.prototype.toString=function(e){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`: +`+r)),s};tte.exports=K_});var bs=L((t5t,ite)=>{"use strict";var nte=fE(),iKe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],sKe=["scalar","sequence","mapping"];function oKe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function aKe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(iKe.indexOf(r)===-1)throw new nte('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=oKe(e.styleAliases||null),sKe.indexOf(this.kind)===-1)throw new nte('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}ite.exports=aKe});var bd=L((r5t,ote)=>{"use strict";var ste=Dd(),Bx=fE(),lKe=bs();function J_(t,e,r){var s=[];return t.include.forEach(function(a){r=J_(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function cKe(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e{"use strict";var uKe=bs();ate.exports=new uKe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var ute=L((i5t,cte)=>{"use strict";var fKe=bs();cte.exports=new fKe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var Ate=L((s5t,fte)=>{"use strict";var AKe=bs();fte.exports=new AKe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var vx=L((o5t,pte)=>{"use strict";var pKe=bd();pte.exports=new pKe({explicit:[lte(),ute(),Ate()]})});var gte=L((a5t,hte)=>{"use strict";var hKe=bs();function gKe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function dKe(){return null}function mKe(t){return t===null}hte.exports=new hKe("tag:yaml.org,2002:null",{kind:"scalar",resolve:gKe,construct:dKe,predicate:mKe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var mte=L((l5t,dte)=>{"use strict";var yKe=bs();function EKe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function IKe(t){return t==="true"||t==="True"||t==="TRUE"}function CKe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}dte.exports=new yKe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:EKe,construct:IKe,predicate:CKe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var Ete=L((c5t,yte)=>{"use strict";var wKe=Dd(),BKe=bs();function vKe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function SKe(t){return 48<=t&&t<=55}function DKe(t){return 48<=t&&t<=57}function bKe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var wte=L((u5t,Cte)=>{"use strict";var Ite=Dd(),kKe=bs(),QKe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function TKe(t){return!(t===null||!QKe.test(t)||t[t.length-1]==="_")}function RKe(t){var e,r,s,a;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,a=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,s=1,a.forEach(function(n){e+=n*s,s*=60}),r*e):r*parseFloat(e,10)}var FKe=/^[-+]?[0-9]+e/;function NKe(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ite.isNegativeZero(t))return"-0.0";return r=t.toString(10),FKe.test(r)?r.replace("e",".e"):r}function OKe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ite.isNegativeZero(t))}Cte.exports=new kKe("tag:yaml.org,2002:float",{kind:"scalar",resolve:TKe,construct:RKe,predicate:OKe,represent:NKe,defaultStyle:"lowercase"})});var z_=L((f5t,Bte)=>{"use strict";var LKe=bd();Bte.exports=new LKe({include:[vx()],implicit:[gte(),mte(),Ete(),wte()]})});var Z_=L((A5t,vte)=>{"use strict";var MKe=bd();vte.exports=new MKe({include:[z_()]})});var Pte=L((p5t,bte)=>{"use strict";var _Ke=bs(),Ste=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dte=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function UKe(t){return t===null?!1:Ste.exec(t)!==null||Dte.exec(t)!==null}function HKe(t){var e,r,s,a,n,c,f,p=0,h=null,E,C,S;if(e=Ste.exec(t),e===null&&(e=Dte.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],s=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,s,a));if(n=+e[4],c=+e[5],f=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+="0";p=+p}return e[9]&&(E=+e[10],C=+(e[11]||0),h=(E*60+C)*6e4,e[9]==="-"&&(h=-h)),S=new Date(Date.UTC(r,s,a,n,c,f,p)),h&&S.setTime(S.getTime()-h),S}function jKe(t){return t.toISOString()}bte.exports=new _Ke("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:UKe,construct:HKe,instanceOf:Date,represent:jKe})});var kte=L((h5t,xte)=>{"use strict";var qKe=bs();function GKe(t){return t==="<<"||t===null}xte.exports=new qKe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:GKe})});var Rte=L((g5t,Tte)=>{"use strict";var Pd;try{Qte=Ie,Pd=Qte("buffer").Buffer}catch{}var Qte,WKe=bs(),X_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function YKe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=X_;for(r=0;r64)){if(e<0)return!1;s+=6}return s%8===0}function VKe(t){var e,r,s=t.replace(/[\r\n=]/g,""),a=s.length,n=X_,c=0,f=[];for(e=0;e>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),Pd?Pd.from?Pd.from(f):new Pd(f):f}function KKe(t){var e="",r=0,s,a,n=t.length,c=X_;for(s=0;s>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function JKe(t){return Pd&&Pd.isBuffer(t)}Tte.exports=new WKe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:YKe,construct:VKe,predicate:JKe,represent:KKe})});var Nte=L((m5t,Fte)=>{"use strict";var zKe=bs(),ZKe=Object.prototype.hasOwnProperty,XKe=Object.prototype.toString;function $Ke(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r{"use strict";var tJe=bs(),rJe=Object.prototype.toString;function nJe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e{"use strict";var sJe=bs(),oJe=Object.prototype.hasOwnProperty;function aJe(t){if(t===null)return!0;var e,r=t;for(e in r)if(oJe.call(r,e)&&r[e]!==null)return!1;return!0}function lJe(t){return t!==null?t:{}}Mte.exports=new sJe("tag:yaml.org,2002:set",{kind:"mapping",resolve:aJe,construct:lJe})});var pE=L((I5t,Ute)=>{"use strict";var cJe=bd();Ute.exports=new cJe({include:[Z_()],implicit:[Pte(),kte()],explicit:[Rte(),Nte(),Lte(),_te()]})});var jte=L((C5t,Hte)=>{"use strict";var uJe=bs();function fJe(){return!0}function AJe(){}function pJe(){return""}function hJe(t){return typeof t>"u"}Hte.exports=new uJe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:fJe,construct:AJe,predicate:hJe,represent:pJe})});var Gte=L((w5t,qte)=>{"use strict";var gJe=bs();function dJe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),s="";return!(e[0]==="/"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!=="/"))}function mJe(t){var e=t,r=/\/([gim]*)$/.exec(t),s="";return e[0]==="/"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function yJe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function EJe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}qte.exports=new gJe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:dJe,construct:mJe,predicate:EJe,represent:yJe})});var Vte=L((B5t,Yte)=>{"use strict";var Sx;try{Wte=Ie,Sx=Wte("esprima")}catch{typeof window<"u"&&(Sx=window.esprima)}var Wte,IJe=bs();function CJe(t){if(t===null)return!1;try{var e="("+t+")",r=Sx.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function wJe(t){var e="("+t+")",r=Sx.parse(e,{range:!0}),s=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,"return "+e.slice(a[0],a[1]))}function BJe(t){return t.toString()}function vJe(t){return Object.prototype.toString.call(t)==="[object Function]"}Yte.exports=new IJe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:CJe,construct:wJe,predicate:vJe,represent:BJe})});var q2=L((S5t,Jte)=>{"use strict";var Kte=bd();Jte.exports=Kte.DEFAULT=new Kte({include:[pE()],explicit:[jte(),Gte(),Vte()]})});var hre=L((D5t,G2)=>{"use strict";var wp=Dd(),rre=fE(),SJe=rte(),nre=pE(),DJe=q2(),o0=Object.prototype.hasOwnProperty,Dx=1,ire=2,sre=3,bx=4,$_=1,bJe=2,zte=3,PJe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xJe=/[\x85\u2028\u2029]/,kJe=/[,\[\]\{\}]/,ore=/^(?:!|!!|![a-z\-]+!)$/i,are=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zte(t){return Object.prototype.toString.call(t)}function qf(t){return t===10||t===13}function kd(t){return t===9||t===32}function nl(t){return t===9||t===32||t===10||t===13}function hE(t){return t===44||t===91||t===93||t===123||t===125}function QJe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function TJe(t){return t===120?2:t===117?4:t===85?8:0}function RJe(t){return 48<=t&&t<=57?t-48:-1}function Xte(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?` +`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function FJe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var lre=new Array(256),cre=new Array(256);for(xd=0;xd<256;xd++)lre[xd]=Xte(xd)?1:0,cre[xd]=Xte(xd);var xd;function NJe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||DJe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ure(t,e){return new rre(e,new SJe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Rr(t,e){throw ure(t,e)}function Px(t,e){t.onWarning&&t.onWarning.call(null,ure(t,e))}var $te={YAML:function(e,r,s){var a,n,c;e.version!==null&&Rr(e,"duplication of %YAML directive"),s.length!==1&&Rr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),a===null&&Rr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Rr(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&Px(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var a,n;s.length!==2&&Rr(e,"TAG directive accepts exactly two arguments"),a=s[0],n=s[1],ore.test(a)||Rr(e,"ill-formed tag handle (first argument) of the TAG directive"),o0.call(e.tagMap,a)&&Rr(e,'there is a previously declared suffix for "'+a+'" tag handle'),are.test(n)||Rr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function s0(t,e,r,s){var a,n,c,f;if(e1&&(t.result+=wp.repeat(` +`,e-1))}function OJe(t,e,r){var s,a,n,c,f,p,h,E,C=t.kind,S=t.result,P;if(P=t.input.charCodeAt(t.position),nl(P)||hE(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96||(P===63||P===45)&&(a=t.input.charCodeAt(t.position+1),nl(a)||r&&hE(a)))return!1;for(t.kind="scalar",t.result="",n=c=t.position,f=!1;P!==0;){if(P===58){if(a=t.input.charCodeAt(t.position+1),nl(a)||r&&hE(a))break}else if(P===35){if(s=t.input.charCodeAt(t.position-1),nl(s))break}else{if(t.position===t.lineStart&&xx(t)||r&&hE(P))break;if(qf(P))if(p=t.line,h=t.lineStart,E=t.lineIndent,ls(t,!1,-1),t.lineIndent>=e){f=!0,P=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(s0(t,n,c,!1),tU(t,t.line-p),n=c=t.position,f=!1),kd(P)||(c=t.position+1),P=t.input.charCodeAt(++t.position)}return s0(t,n,c,!1),t.result?!0:(t.kind=C,t.result=S,!1)}function LJe(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(s0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else qf(r)?(s0(t,s,a,!0),tU(t,ls(t,!1,e)),s=a=t.position):t.position===t.lineStart&&xx(t)?Rr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Rr(t,"unexpected end of the stream within a single quoted scalar")}function MJe(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return s0(t,r,t.position,!0),t.position++,!0;if(f===92){if(s0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),qf(f))ls(t,!1,e);else if(f<256&&lre[f])t.result+=cre[f],t.position++;else if((c=TJe(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=QJe(f))>=0?n=(n<<4)+c:Rr(t,"expected hexadecimal character");t.result+=FJe(n),t.position++}else Rr(t,"unknown escape sequence");r=s=t.position}else qf(f)?(s0(t,r,s,!0),tU(t,ls(t,!1,e)),r=s=t.position):t.position===t.lineStart&&xx(t)?Rr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Rr(t,"unexpected end of the stream within a double quoted scalar")}function _Je(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,C,S={},P,I,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,C=!1,n=[];else if(N===123)p=125,C=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(ls(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=C?"mapping":"sequence",t.result=n,!0;r||Rr(t,"missed comma between flow collection entries"),I=P=R=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),nl(f)&&(h=E=!0,t.position++,ls(t,!0,e))),s=t.line,dE(t,e,Dx,!1,!0),I=t.tag,P=t.result,ls(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),ls(t,!0,e),dE(t,e,Dx,!1,!0),R=t.result),C?gE(t,n,S,I,P,R):h?n.push(gE(t,null,S,I,P,R)):n.push(P),ls(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Rr(t,"unexpected end of the stream within a flow collection")}function UJe(t,e){var r,s,a=$_,n=!1,c=!1,f=e,p=0,h=!1,E,C;if(C=t.input.charCodeAt(t.position),C===124)s=!1;else if(C===62)s=!0;else return!1;for(t.kind="scalar",t.result="";C!==0;)if(C=t.input.charCodeAt(++t.position),C===43||C===45)$_===a?a=C===43?zte:bJe:Rr(t,"repeat of a chomping mode identifier");else if((E=RJe(C))>=0)E===0?Rr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Rr(t,"repeat of an indentation width identifier"):(f=e+E-1,c=!0);else break;if(kd(C)){do C=t.input.charCodeAt(++t.position);while(kd(C));if(C===35)do C=t.input.charCodeAt(++t.position);while(!qf(C)&&C!==0)}for(;C!==0;){for(eU(t),t.lineIndent=0,C=t.input.charCodeAt(t.position);(!c||t.lineIndentf&&(f=t.lineIndent),qf(C)){p++;continue}if(t.lineIndente)&&p!==0)Rr(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(dE(t,e,bx,!0,a)&&(I?S=t.result:P=t.result),I||(gE(t,h,E,C,S,P,n,c),C=S=P=null),ls(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Rr(t,"bad indentation of a mapping entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),C=0,S=t.implicitTypes.length;C tag; it should be "'+P.kind+'", not "'+t.kind+'"'),P.resolve(t.result)?(t.result=P.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Rr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):Rr(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||E}function WJe(t){var e=t.position,r,s,a,n=!1,c;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(c=t.input.charCodeAt(t.position))!==0&&(ls(t,!0,-1),c=t.input.charCodeAt(t.position),!(t.lineIndent>0||c!==37));){for(n=!0,c=t.input.charCodeAt(++t.position),r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);for(s=t.input.slice(r,t.position),a=[],s.length<1&&Rr(t,"directive name must not be less than one character in length");c!==0;){for(;kd(c);)c=t.input.charCodeAt(++t.position);if(c===35){do c=t.input.charCodeAt(++t.position);while(c!==0&&!qf(c));break}if(qf(c))break;for(r=t.position;c!==0&&!nl(c);)c=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}c!==0&&eU(t),o0.call($te,s)?$te[s](t,s,a):Px(t,'unknown document directive "'+s+'"')}if(ls(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ls(t,!0,-1)):n&&Rr(t,"directives end mark is expected"),dE(t,t.lineIndent-1,bx,!1,!0),ls(t,!0,-1),t.checkLineBreaks&&xJe.test(t.input.slice(e,t.position))&&Px(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xx(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ls(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var s=fre(t,r);if(typeof e!="function")return s;for(var a=0,n=s.length;a"u"&&(r=e,e=null),Are(t,e,wp.extend({schema:nre},r))}function VJe(t,e){return pre(t,wp.extend({schema:nre},e))}G2.exports.loadAll=Are;G2.exports.load=pre;G2.exports.safeLoadAll=YJe;G2.exports.safeLoad=VJe});var Lre=L((b5t,sU)=>{"use strict";var Y2=Dd(),V2=fE(),KJe=q2(),JJe=pE(),wre=Object.prototype.toString,Bre=Object.prototype.hasOwnProperty,zJe=9,W2=10,ZJe=13,XJe=32,$Je=33,eze=34,vre=35,tze=37,rze=38,nze=39,ize=42,Sre=44,sze=45,Dre=58,oze=61,aze=62,lze=63,cze=64,bre=91,Pre=93,uze=96,xre=123,fze=124,kre=125,jo={};jo[0]="\\0";jo[7]="\\a";jo[8]="\\b";jo[9]="\\t";jo[10]="\\n";jo[11]="\\v";jo[12]="\\f";jo[13]="\\r";jo[27]="\\e";jo[34]='\\"';jo[92]="\\\\";jo[133]="\\N";jo[160]="\\_";jo[8232]="\\L";jo[8233]="\\P";var Aze=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function pze(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a0?t.charCodeAt(n-1):null,S=S&&mre(c,f)}else{for(n=0;ns&&t[C+1]!==" ",C=n);else if(!mE(c))return kx;f=n>0?t.charCodeAt(n-1):null,S=S&&mre(c,f)}h=h||E&&n-C-1>s&&t[C+1]!==" "}return!p&&!h?S&&!a(t)?Tre:Rre:r>9&&Qre(t)?kx:h?Nre:Fre}function Eze(t,e,r,s){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Aze.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return gze(t,p)}switch(yze(e,c,t.indent,n,f)){case Tre:return e;case Rre:return"'"+e.replace(/'/g,"''")+"'";case Fre:return"|"+yre(e,t.indent)+Ere(dre(e,a));case Nre:return">"+yre(e,t.indent)+Ere(dre(Ize(e,n),a));case kx:return'"'+Cze(e,n)+'"';default:throw new V2("impossible error: invalid scalar style")}}()}function yre(t,e){var r=Qre(t)?String(e):"",s=t[t.length-1]===` +`,a=s&&(t[t.length-2]===` +`||t===` +`),n=a?"+":s?"":"-";return r+n+` +`}function Ere(t){return t[t.length-1]===` +`?t.slice(0,-1):t}function Ize(t,e){for(var r=/(\n+)([^\n]*)/g,s=function(){var h=t.indexOf(` +`);return h=h!==-1?h:t.length,r.lastIndex=h,Ire(t.slice(0,h),e)}(),a=t[0]===` +`||t[0]===" ",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===" ",s+=f+(!a&&!n&&p!==""?` +`:"")+Ire(p,e),a=n}return s}function Ire(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p="";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=` +`+t.slice(a,n),a=n+1),c=f;return p+=` +`,t.length-a>e&&c>a?p+=t.slice(a,c)+` +`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function Cze(t){for(var e="",r,s,a,n=0;n=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=gre((r-55296)*1024+s-56320+65536),n++;continue}a=jo[r],e+=!a&&mE(r)?t[n]:a||gre(r)}return e}function wze(t,e,r){var s="",a=t.tag,n,c;for(n=0,c=r.length;n1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Qd(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump="{"+s+"}"}function Sze(t,e,r,s){var a="",n=t.tag,c=Object.keys(r),f,p,h,E,C,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys=="function")c.sort(t.sortKeys);else if(t.sortKeys)throw new V2("sortKeys must be a boolean or a function");for(f=0,p=c.length;f1024,C&&(t.dump&&W2===t.dump.charCodeAt(0)?S+="?":S+="? "),S+=t.dump,C&&(S+=rU(t,e)),Qd(t,e+1,E,!0,C)&&(t.dump&&W2===t.dump.charCodeAt(0)?S+=":":S+=": ",S+=t.dump,a+=S));t.tag=n,t.dump=a||"{}"}function Cre(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n tag resolver accepts not "'+p+'" style');t.dump=s}return!0}return!1}function Qd(t,e,r,s,a,n){t.tag=null,t.dump=r,Cre(t,r,!1)||Cre(t,r,!0);var c=wre.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c==="[object Object]"||c==="[object Array]",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c==="[object Object]")s&&Object.keys(t.dump).length!==0?(Sze(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(vze(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(c==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(Bze(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(wze(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(c==="[object String]")t.tag!=="?"&&Eze(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new V2("unacceptable kind of an object to dump "+c)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function Dze(t,e){var r=[],s=[],a,n;for(nU(t,r,s),a=0,n=s.length;a{"use strict";var Qx=hre(),Mre=Lre();function Tx(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Wi.exports.Type=bs();Wi.exports.Schema=bd();Wi.exports.FAILSAFE_SCHEMA=vx();Wi.exports.JSON_SCHEMA=z_();Wi.exports.CORE_SCHEMA=Z_();Wi.exports.DEFAULT_SAFE_SCHEMA=pE();Wi.exports.DEFAULT_FULL_SCHEMA=q2();Wi.exports.load=Qx.load;Wi.exports.loadAll=Qx.loadAll;Wi.exports.safeLoad=Qx.safeLoad;Wi.exports.safeLoadAll=Qx.safeLoadAll;Wi.exports.dump=Mre.dump;Wi.exports.safeDump=Mre.safeDump;Wi.exports.YAMLException=fE();Wi.exports.MINIMAL_SCHEMA=vx();Wi.exports.SAFE_SCHEMA=pE();Wi.exports.DEFAULT_SCHEMA=q2();Wi.exports.scan=Tx("scan");Wi.exports.parse=Tx("parse");Wi.exports.compose=Tx("compose");Wi.exports.addConstructor=Tx("addConstructor")});var Hre=L((x5t,Ure)=>{"use strict";var Pze=_re();Ure.exports=Pze});var qre=L((k5t,jre)=>{"use strict";function xze(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Td(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Td)}xze(Td,Error);Td.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C({[gt]:Oe})))},Ae=function(ee){return ee},ce=function(ee){return ee},me=La("correct indentation"),pe=" ",Be=dn(" ",!1),Ce=function(ee){return ee.length===lr*St},g=function(ee){return ee.length===(lr+1)*St},we=function(){return lr++,!0},ye=function(){return lr--,!0},fe=function(){return ca()},se=La("pseudostring"),X=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,De=Jn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Re=/^[^\r\n\t ,\][{}:#"']/,dt=Jn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),j=function(){return ca().replace(/^ *| *$/g,"")},rt="--",Fe=dn("--",!1),Ne=/^[a-zA-Z\/0-9]/,Pe=Jn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ye=/^[^\r\n\t :,]/,ke=Jn(["\r",` +`," "," ",":",","],!0,!1),it="null",_e=dn("null",!1),x=function(){return null},w="true",b=dn("true",!1),y=function(){return!0},F="false",z=dn("false",!1),Z=function(){return!1},$=La("string"),oe='"',xe=dn('"',!1),Te=function(){return""},lt=function(ee){return ee},It=function(ee){return ee.join("")},qt=/^[^"\\\0-\x1F\x7F]/,ir=Jn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',gn=dn('\\"',!1),Pr=function(){return'"'},Ir="\\\\",Nr=dn("\\\\",!1),nn=function(){return"\\"},ai="\\/",wo=dn("\\/",!1),ns=function(){return"/"},to="\\b",Bo=dn("\\b",!1),ji=function(){return"\b"},ro="\\f",vo=dn("\\f",!1),RA=function(){return"\f"},pf="\\n",yh=dn("\\n",!1),Eh=function(){return` +`},no="\\r",jn=dn("\\r",!1),Fs=function(){return"\r"},io="\\t",lu=dn("\\t",!1),cu=function(){return" "},uu="\\u",FA=dn("\\u",!1),NA=function(ee,Ee,Oe,gt){return String.fromCharCode(parseInt(`0x${ee}${Ee}${Oe}${gt}`))},aa=/^[0-9a-fA-F]/,la=Jn([["0","9"],["a","f"],["A","F"]],!1,!1),OA=La("blank space"),gr=/^[ \t]/,So=Jn([" "," "],!1,!1),Me=La("white space"),fu=/^[ \t\n\r]/,Cr=Jn([" "," ",` +`,"\r"],!1,!1),hf=`\r +`,LA=dn(`\r +`,!1),MA=` +`,Au=dn(` +`,!1),pu="\r",ac=dn("\r",!1),ve=0,Nt=0,lc=[{line:1,column:1}],Li=0,so=[],Rt=0,xn;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function ca(){return t.substring(Nt,ve)}function qi(){return Ua(Nt,ve)}function Mi(ee,Ee){throw Ee=Ee!==void 0?Ee:Ua(Nt,ve),gf([La(ee)],t.substring(Nt,ve),Ee)}function Oa(ee,Ee){throw Ee=Ee!==void 0?Ee:Ua(Nt,ve),Ha(ee,Ee)}function dn(ee,Ee){return{type:"literal",text:ee,ignoreCase:Ee}}function Jn(ee,Ee,Oe){return{type:"class",parts:ee,inverted:Ee,ignoreCase:Oe}}function hu(){return{type:"any"}}function Ih(){return{type:"end"}}function La(ee){return{type:"other",description:ee}}function Ma(ee){var Ee=lc[ee],Oe;if(Ee)return Ee;for(Oe=ee-1;!lc[Oe];)Oe--;for(Ee=lc[Oe],Ee={line:Ee.line,column:Ee.column};OeLi&&(Li=ve,so=[]),so.push(ee))}function Ha(ee,Ee){return new Td(ee,null,null,Ee)}function gf(ee,Ee,Oe){return new Td(Td.buildMessage(ee,Ee),ee,Ee,Oe)}function cc(){var ee;return ee=_A(),ee}function wn(){var ee,Ee,Oe;for(ee=ve,Ee=[],Oe=ua();Oe!==r;)Ee.push(Oe),Oe=ua();return Ee!==r&&(Nt=ee,Ee=n(Ee)),ee=Ee,ee}function ua(){var ee,Ee,Oe,gt,yt;return ee=ve,Ee=vl(),Ee!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Rt===0&&Xe(f)),Oe!==r?(gt=Qn(),gt!==r?(yt=fa(),yt!==r?(Nt=ee,Ee=p(yt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function _A(){var ee,Ee,Oe;for(ee=ve,Ee=[],Oe=UA();Oe!==r;)Ee.push(Oe),Oe=UA();return Ee!==r&&(Nt=ee,Ee=h(Ee)),ee=Ee,ee}function UA(){var ee,Ee,Oe,gt,yt,Dt,tr,fn,li;if(ee=ve,Ee=Qn(),Ee===r&&(Ee=null),Ee!==r){if(Oe=ve,t.charCodeAt(ve)===35?(gt=E,ve++):(gt=r,Rt===0&&Xe(C)),gt!==r){if(yt=[],Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r),Dt!==r)for(;Dt!==r;)yt.push(Dt),Dt=ve,tr=ve,Rt++,fn=st(),Rt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Rt===0&&Xe(S)),fn!==r?(tr=[tr,fn],Dt=tr):(ve=Dt,Dt=r)):(ve=Dt,Dt=r);else yt=r;yt!==r?(gt=[gt,yt],Oe=gt):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(gt=[],yt=Je(),yt!==r)for(;yt!==r;)gt.push(yt),yt=Je();else gt=r;gt!==r?(Nt=ee,Ee=P(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r}else ve=ee,ee=r;if(ee===r&&(ee=ve,Ee=vl(),Ee!==r?(Oe=ja(),Oe!==r?(gt=Qn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(ve)===58?(yt=I,ve++):(yt=r,Rt===0&&Xe(R)),yt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ee=N(Oe,tr),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ee=vl(),Ee!==r?(Oe=is(),Oe!==r?(gt=Qn(),gt===r&&(gt=null),gt!==r?(t.charCodeAt(ve)===58?(yt=I,ve++):(yt=r,Rt===0&&Xe(R)),yt!==r?(Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(tr=fa(),tr!==r?(Nt=ee,Ee=N(Oe,tr),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))){if(ee=ve,Ee=vl(),Ee!==r)if(Oe=is(),Oe!==r)if(gt=Qn(),gt!==r)if(yt=gu(),yt!==r){if(Dt=[],tr=Je(),tr!==r)for(;tr!==r;)Dt.push(tr),tr=Je();else Dt=r;Dt!==r?(Nt=ee,Ee=N(Oe,yt),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;else ve=ee,ee=r;if(ee===r)if(ee=ve,Ee=vl(),Ee!==r)if(Oe=is(),Oe!==r){if(gt=[],yt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=is(),li!==r?(Nt=yt,Dt=te(Oe,li),yt=Dt):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r),yt!==r)for(;yt!==r;)gt.push(yt),yt=ve,Dt=Qn(),Dt===r&&(Dt=null),Dt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Rt===0&&Xe(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=is(),li!==r?(Nt=yt,Dt=te(Oe,li),yt=Dt):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r)):(ve=yt,yt=r);else gt=r;gt!==r?(yt=Qn(),yt===r&&(yt=null),yt!==r?(t.charCodeAt(ve)===58?(Dt=I,ve++):(Dt=r,Rt===0&&Xe(R)),Dt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(fn=fa(),fn!==r?(Nt=ee,Ee=ie(Oe,gt,fn),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r}return ee}function fa(){var ee,Ee,Oe,gt,yt,Dt,tr;if(ee=ve,Ee=ve,Rt++,Oe=ve,gt=st(),gt!==r?(yt=Mt(),yt!==r?(t.charCodeAt(ve)===45?(Dt=c,ve++):(Dt=r,Rt===0&&Xe(f)),Dt!==r?(tr=Qn(),tr!==r?(gt=[gt,yt,Dt,tr],Oe=gt):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Rt--,Oe!==r?(ve=Ee,Ee=void 0):Ee=r,Ee!==r?(Oe=Je(),Oe!==r?(gt=kn(),gt!==r?(yt=wn(),yt!==r?(Dt=Aa(),Dt!==r?(Nt=ee,Ee=Ae(yt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,Ee=st(),Ee!==r?(Oe=kn(),Oe!==r?(gt=_A(),gt!==r?(yt=Aa(),yt!==r?(Nt=ee,Ee=Ae(gt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r))if(ee=ve,Ee=uc(),Ee!==r){if(Oe=[],gt=Je(),gt!==r)for(;gt!==r;)Oe.push(gt),gt=Je();else Oe=r;Oe!==r?(Nt=ee,Ee=ce(Ee),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function vl(){var ee,Ee,Oe;for(Rt++,ee=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ee!==r?(Nt=ve,Oe=Ce(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),Rt--,ee===r&&(Ee=r,Rt===0&&Xe(me)),ee}function Mt(){var ee,Ee,Oe;for(ee=ve,Ee=[],t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));Oe!==r;)Ee.push(Oe),t.charCodeAt(ve)===32?(Oe=pe,ve++):(Oe=r,Rt===0&&Xe(Be));return Ee!==r?(Nt=ve,Oe=g(Ee),Oe?Oe=void 0:Oe=r,Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),ee}function kn(){var ee;return Nt=ve,ee=we(),ee?ee=void 0:ee=r,ee}function Aa(){var ee;return Nt=ve,ee=ye(),ee?ee=void 0:ee=r,ee}function ja(){var ee;return ee=Sl(),ee===r&&(ee=fc()),ee}function is(){var ee,Ee,Oe;if(ee=Sl(),ee===r){if(ee=ve,Ee=[],Oe=qa(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=qa();else Ee=r;Ee!==r&&(Nt=ee,Ee=fe()),ee=Ee}return ee}function uc(){var ee;return ee=_i(),ee===r&&(ee=ws(),ee===r&&(ee=Sl(),ee===r&&(ee=fc()))),ee}function gu(){var ee;return ee=_i(),ee===r&&(ee=Sl(),ee===r&&(ee=qa())),ee}function fc(){var ee,Ee,Oe,gt,yt,Dt;if(Rt++,ee=ve,X.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(De)),Ee!==r){for(Oe=[],gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(dt)),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);gt!==r;)Oe.push(gt),gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Re.test(t.charAt(ve))?(Dt=t.charAt(ve),ve++):(Dt=r,Rt===0&&Xe(dt)),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);Oe!==r?(Nt=ee,Ee=j(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(se)),ee}function qa(){var ee,Ee,Oe,gt,yt;if(ee=ve,t.substr(ve,2)===rt?(Ee=rt,ve+=2):(Ee=r,Rt===0&&Xe(Fe)),Ee===r&&(Ee=null),Ee!==r)if(Ne.test(t.charAt(ve))?(Oe=t.charAt(ve),ve++):(Oe=r,Rt===0&&Xe(Pe)),Oe!==r){for(gt=[],Ye.test(t.charAt(ve))?(yt=t.charAt(ve),ve++):(yt=r,Rt===0&&Xe(ke));yt!==r;)gt.push(yt),Ye.test(t.charAt(ve))?(yt=t.charAt(ve),ve++):(yt=r,Rt===0&&Xe(ke));gt!==r?(Nt=ee,Ee=j(),ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;else ve=ee,ee=r;return ee}function _i(){var ee,Ee;return ee=ve,t.substr(ve,4)===it?(Ee=it,ve+=4):(Ee=r,Rt===0&&Xe(_e)),Ee!==r&&(Nt=ee,Ee=x()),ee=Ee,ee}function ws(){var ee,Ee;return ee=ve,t.substr(ve,4)===w?(Ee=w,ve+=4):(Ee=r,Rt===0&&Xe(b)),Ee!==r&&(Nt=ee,Ee=y()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,5)===F?(Ee=F,ve+=5):(Ee=r,Rt===0&&Xe(z)),Ee!==r&&(Nt=ee,Ee=Z()),ee=Ee),ee}function Sl(){var ee,Ee,Oe,gt;return Rt++,ee=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&Xe(xe)),Ee!==r?(t.charCodeAt(ve)===34?(Oe=oe,ve++):(Oe=r,Rt===0&&Xe(xe)),Oe!==r?(Nt=ee,Ee=Te(),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r),ee===r&&(ee=ve,t.charCodeAt(ve)===34?(Ee=oe,ve++):(Ee=r,Rt===0&&Xe(xe)),Ee!==r?(Oe=df(),Oe!==r?(t.charCodeAt(ve)===34?(gt=oe,ve++):(gt=r,Rt===0&&Xe(xe)),gt!==r?(Nt=ee,Ee=lt(Oe),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)),Rt--,ee===r&&(Ee=r,Rt===0&&Xe($)),ee}function df(){var ee,Ee,Oe;if(ee=ve,Ee=[],Oe=Ac(),Oe!==r)for(;Oe!==r;)Ee.push(Oe),Oe=Ac();else Ee=r;return Ee!==r&&(Nt=ee,Ee=It(Ee)),ee=Ee,ee}function Ac(){var ee,Ee,Oe,gt,yt,Dt;return qt.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(ir)),ee===r&&(ee=ve,t.substr(ve,2)===Pt?(Ee=Pt,ve+=2):(Ee=r,Rt===0&&Xe(gn)),Ee!==r&&(Nt=ee,Ee=Pr()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===Ir?(Ee=Ir,ve+=2):(Ee=r,Rt===0&&Xe(Nr)),Ee!==r&&(Nt=ee,Ee=nn()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===ai?(Ee=ai,ve+=2):(Ee=r,Rt===0&&Xe(wo)),Ee!==r&&(Nt=ee,Ee=ns()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===to?(Ee=to,ve+=2):(Ee=r,Rt===0&&Xe(Bo)),Ee!==r&&(Nt=ee,Ee=ji()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===ro?(Ee=ro,ve+=2):(Ee=r,Rt===0&&Xe(vo)),Ee!==r&&(Nt=ee,Ee=RA()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===pf?(Ee=pf,ve+=2):(Ee=r,Rt===0&&Xe(yh)),Ee!==r&&(Nt=ee,Ee=Eh()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===no?(Ee=no,ve+=2):(Ee=r,Rt===0&&Xe(jn)),Ee!==r&&(Nt=ee,Ee=Fs()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===io?(Ee=io,ve+=2):(Ee=r,Rt===0&&Xe(lu)),Ee!==r&&(Nt=ee,Ee=cu()),ee=Ee,ee===r&&(ee=ve,t.substr(ve,2)===uu?(Ee=uu,ve+=2):(Ee=r,Rt===0&&Xe(FA)),Ee!==r?(Oe=Bi(),Oe!==r?(gt=Bi(),gt!==r?(yt=Bi(),yt!==r?(Dt=Bi(),Dt!==r?(Nt=ee,Ee=NA(Oe,gt,yt,Dt),ee=Ee):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)):(ve=ee,ee=r)))))))))),ee}function Bi(){var ee;return aa.test(t.charAt(ve))?(ee=t.charAt(ve),ve++):(ee=r,Rt===0&&Xe(la)),ee}function Qn(){var ee,Ee;if(Rt++,ee=[],gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(So)),Ee!==r)for(;Ee!==r;)ee.push(Ee),gr.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(So));else ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(OA)),ee}function pc(){var ee,Ee;if(Rt++,ee=[],fu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(Cr)),Ee!==r)for(;Ee!==r;)ee.push(Ee),fu.test(t.charAt(ve))?(Ee=t.charAt(ve),ve++):(Ee=r,Rt===0&&Xe(Cr));else ee=r;return Rt--,ee===r&&(Ee=r,Rt===0&&Xe(Me)),ee}function Je(){var ee,Ee,Oe,gt,yt,Dt;if(ee=ve,Ee=st(),Ee!==r){for(Oe=[],gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Dt=st(),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);gt!==r;)Oe.push(gt),gt=ve,yt=Qn(),yt===r&&(yt=null),yt!==r?(Dt=st(),Dt!==r?(yt=[yt,Dt],gt=yt):(ve=gt,gt=r)):(ve=gt,gt=r);Oe!==r?(Ee=[Ee,Oe],ee=Ee):(ve=ee,ee=r)}else ve=ee,ee=r;return ee}function st(){var ee;return t.substr(ve,2)===hf?(ee=hf,ve+=2):(ee=r,Rt===0&&Xe(LA)),ee===r&&(t.charCodeAt(ve)===10?(ee=MA,ve++):(ee=r,Rt===0&&Xe(Au)),ee===r&&(t.charCodeAt(ve)===13?(ee=pu,ve++):(ee=r,Rt===0&&Xe(ac)))),ee}let St=2,lr=0;if(xn=a(),xn!==r&&ve===t.length)return xn;throw xn!==r&&ve"u"?!0:typeof t=="object"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>Vre(t[e])):!1}function oU(t,e,r){if(t===null)return`null +`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()} +`;if(typeof t=="string")return`${Wre(t)} +`;if(Array.isArray(t)){if(t.length===0)return`[] +`;let s=" ".repeat(e);return` +${t.map(n=>`${s}- ${oU(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[s,a]=t instanceof Rx?[t.data,!1]:[t,!0],n=" ".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=Gre.indexOf(p),C=Gre.indexOf(h);return E===-1&&C===-1?ph?1:0:E!==-1&&C===-1?-1:E===-1&&C!==-1?1:E-C});let f=c.filter(p=>!Vre(s[p])).map((p,h)=>{let E=s[p],C=Wre(p),S=oU(E,e+1,!0),P=h>0||r?n:"",I=C.length>1024?`? ${C} +${P}:`:`${C}:`,R=S.startsWith(` +`)?S:` ${S}`;return`${P}${I}${R}`}).join(e===0?` +`:"")||` +`;return r?` +${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function il(t){try{let e=oU(t,0,!1);return e!==` +`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function Tze(t){return t.endsWith(` +`)||(t+=` +`),(0,Yre.parse)(t)}function Fze(t){if(Rze.test(t))return Tze(t);let e=(0,Fx.safeLoad)(t,{schema:Fx.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function cs(t){return Fze(t)}var Fx,Yre,Qze,Gre,Rx,Rze,Kre=Ct(()=>{Fx=et(Hre()),Yre=et(qre()),Qze=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,Gre=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],Rx=class{constructor(e){this.data=e}};il.PreserveOrdering=Rx;Rze=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var K2={};Vt(K2,{parseResolution:()=>Cx,parseShell:()=>yx,parseSyml:()=>cs,stringifyArgument:()=>Y_,stringifyArgumentSegment:()=>V_,stringifyArithmeticExpression:()=>Ix,stringifyCommand:()=>W_,stringifyCommandChain:()=>uE,stringifyCommandChainThen:()=>G_,stringifyCommandLine:()=>Ex,stringifyCommandLineThen:()=>q_,stringifyEnvSegment:()=>mx,stringifyRedirectArgument:()=>H2,stringifyResolution:()=>wx,stringifyShell:()=>cE,stringifyShellLine:()=>cE,stringifySyml:()=>il,stringifyValueArgument:()=>Bd});var Bc=Ct(()=>{Vee();Zee();Kre()});var zre=L((N5t,aU)=>{"use strict";var Nze=t=>{let e=!1,r=!1,s=!1;for(let a=0;a{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=Nze(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};aU.exports=Jre;aU.exports.default=Jre});var Zre=L((O5t,Oze)=>{Oze.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var Rd=L(_l=>{"use strict";var $re=Zre(),Ps=process.env;Object.defineProperty(_l,"_vendors",{value:$re.map(function(t){return t.constant})});_l.name=null;_l.isPR=null;$re.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(s){return Xre(s)});if(_l[t.constant]=r,!!r)switch(_l.name=t.name,typeof t.pr){case"string":_l.isPR=!!Ps[t.pr];break;case"object":"env"in t.pr?_l.isPR=t.pr.env in Ps&&Ps[t.pr.env]!==t.pr.ne:"any"in t.pr?_l.isPR=t.pr.any.some(function(s){return!!Ps[s]}):_l.isPR=Xre(t.pr);break;default:_l.isPR=null}});_l.isCI=!!(Ps.CI!=="false"&&(Ps.BUILD_ID||Ps.BUILD_NUMBER||Ps.CI||Ps.CI_APP_ID||Ps.CI_BUILD_ID||Ps.CI_BUILD_NUMBER||Ps.CI_NAME||Ps.CONTINUOUS_INTEGRATION||Ps.RUN_ID||_l.name));function Xre(t){return typeof t=="string"?!!Ps[t]:"env"in t?Ps[t.env]&&Ps[t.env].includes(t.includes):"any"in t?t.any.some(function(e){return!!Ps[e]}):Object.keys(t).every(function(e){return Ps[e]===t[e]})}});var ei,En,Fd,lU,Nx,ene,cU,uU,Ox=Ct(()=>{(function(t){t.StartOfInput="\0",t.EndOfInput="",t.EndOfPartialInput=""})(ei||(ei={}));(function(t){t[t.InitialNode=0]="InitialNode",t[t.SuccessNode=1]="SuccessNode",t[t.ErrorNode=2]="ErrorNode",t[t.CustomNode=3]="CustomNode"})(En||(En={}));Fd=-1,lU=/^(-h|--help)(?:=([0-9]+))?$/,Nx=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,ene=/^-[a-zA-Z]{2,}$/,cU=/^([^=]+)=([\s\S]*)$/,uU=process.env.DEBUG_CLI==="1"});var nt,yE,Lx,fU,Mx=Ct(()=>{Ox();nt=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},yE=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(s=>s.reason!==null&&s.reason===r[0].reason)){let[{reason:s}]=this.candidates;this.message=`${s} + +${this.candidates.map(({usage:a})=>`$ ${a}`).join(` +`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean: + +$ ${s} +${fU(e)}`}else this.message=`Command not found; did you mean one of: + +${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(` +`)} + +${fU(e)}`}},Lx=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: + +${this.usages.map((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(` +`)} + +${fU(e)}`}},fU=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function Lze(t){let e=t.split(` +`),r=e.filter(a=>a.match(/\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(` +`)}function qo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,` +`),t=Lze(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 + +`),t=t.replace(/\n(\n)?\n*/g,(s,a)=>a||" "),r&&(t=t.split(/\n/).map(s=>{let a=s.match(/^\s*[*-][\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(` +`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((c,f)=>" ".repeat(n)+(f===0?"- ":" ")+c).join(` +`)}).join(` + +`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t} +`:""}var AU,tne,rne,pU=Ct(()=>{AU=Array(80).fill("\u2501");for(let t=0;t<=24;++t)AU[AU.length-t]=`\x1B[38;5;${232+t}m\u2501`;tne={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<75?` ${AU.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},rne={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ea(t){return{...t,[J2]:!0}}function Gf(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function _x(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!=="."||!e?`${s.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function z2(t,e){return e.length===1?new nt(`${t}${_x(e[0],{mergeName:!0})}`):new nt(`${t}: +${e.map(r=>` +- ${_x(r)}`).join("")}`)}function Nd(t,e,r){if(typeof r>"u")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw z2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var J2,Bp=Ct(()=>{Mx();J2=Symbol("clipanion/isOption")});var Ia={};Vt(Ia,{KeyRelationship:()=>Wf,TypeAssertionError:()=>l0,applyCascade:()=>$2,as:()=>rZe,assert:()=>$ze,assertWithErrors:()=>eZe,cascade:()=>qx,fn:()=>nZe,hasAtLeastOneKey:()=>IU,hasExactLength:()=>ane,hasForbiddenKeys:()=>wZe,hasKeyRelationship:()=>tB,hasMaxLength:()=>sZe,hasMinLength:()=>iZe,hasMutuallyExclusiveKeys:()=>BZe,hasRequiredKeys:()=>CZe,hasUniqueItems:()=>oZe,isArray:()=>Ux,isAtLeast:()=>yU,isAtMost:()=>cZe,isBase64:()=>mZe,isBoolean:()=>Wze,isDate:()=>Vze,isDict:()=>zze,isEnum:()=>po,isHexColor:()=>dZe,isISO8601:()=>gZe,isInExclusiveRange:()=>fZe,isInInclusiveRange:()=>uZe,isInstanceOf:()=>Xze,isInteger:()=>EU,isJSON:()=>yZe,isLiteral:()=>ine,isLowerCase:()=>AZe,isMap:()=>Jze,isNegative:()=>aZe,isNullable:()=>IZe,isNumber:()=>dU,isObject:()=>sne,isOneOf:()=>mU,isOptional:()=>EZe,isPartial:()=>Zze,isPayload:()=>Yze,isPositive:()=>lZe,isRecord:()=>jx,isSet:()=>Kze,isString:()=>IE,isTuple:()=>Hx,isUUID4:()=>hZe,isUnknown:()=>gU,isUpperCase:()=>pZe,makeTrait:()=>one,makeValidator:()=>Wr,matchesRegExp:()=>X2,softAssert:()=>tZe});function ti(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function EE(t,e){if(t.length===0)return"nothing";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(", ")}${a}${ti(s)}`}function a0(t,e){var r,s,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:Mze.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function hU(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function qze(t,e){return r=>{t[e]=r}}function Yf(t,e){return r=>{let s=t[e];return t[e]=r,Yf(t,e).bind(null,s)}}function Z2(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function gU(){return Wr({test:(t,e)=>!0})}function ine(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function IE(){return Wr({test:(t,e)=>typeof t!="string"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function po(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),s=new Set(e);return s.size===1?ine([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${EE(e,"or")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function Wze(){return Wr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s=Gze.get(t);if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function dU(){return Wr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function Yze(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>"u")return mr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return mr(r,"Unbound coercion result");if(typeof e!="string")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Yf(n,"value")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:".",r.coercion.bind(null,n.value)]),!0):!1}})}function Vze(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"&&nne.test(t))s=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function Ux(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof s?.coercions<"u"){if(typeof s?.coercion>"u")return mr(s,"Unbound coercion result");r=r.split(e)}if(!Array.isArray(r))return mr(s,`Expected an array (got ${ti(r)})`);let c=!0;for(let f=0,p=r.length;f{var n,c;if(Object.getPrototypeOf(s).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");let f=[...s],p=[...s];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,C)=>E!==f[C])?new Set(p):s;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",Z2(a.coercion,s,h)]),!0}else{let f=!0;for(let p of s)if(f=t(p,Object.assign({},a))&&f,!f&&a?.errors==null)break;return f}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");let f={value:s};return r(s,Object.assign(Object.assign({},a),{coercion:Yf(f,"value")}))?(a.coercions.push([(c=a.p)!==null&&c!==void 0?c:".",Z2(a.coercion,s,()=>new Set(f.value))]),!0):!1}return mr(a,`Expected a set (got ${ti(s)})`)}})}function Jze(t,e){let r=Ux(Hx([t,e])),s=jx(e,{keys:t});return Wr({test:(a,n)=>{var c,f,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return mr(n,"Unbound coercion result");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let C=()=>E.some((S,P)=>S[0]!==h[P][0]||S[1]!==h[P][1])?new Map(E):a;return n.coercions.push([(c=n.p)!==null&&c!==void 0?c:".",Z2(n.coercion,a,C)]),!0}else{let h=!0;for(let[E,C]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(C,Object.assign(Object.assign({},n),{p:a0(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return mr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(f=n.p)!==null&&f!==void 0?f:".",Z2(n.coercion,a,()=>new Map(h.value))]),!0):!1:s(a,Object.assign(Object.assign({},n),{coercion:Yf(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",Z2(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return mr(n,`Expected a map (got ${ti(a)})`)}})}function Hx(t,{delimiter:e}={}){let r=ane(t.length);return Wr({test:(s,a)=>{var n;if(typeof s=="string"&&typeof e<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");s=s.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,s)])}if(!Array.isArray(s))return mr(a,`Expected a tuple (got ${ti(s)})`);let c=r(s,Object.assign({},a));for(let f=0,p=s.length;f{var n;if(Array.isArray(s)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?mr(a,"Unbound coercion result"):r(s,Object.assign(Object.assign({},a),{coercion:void 0}))?(s=Object.fromEntries(s),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,s)]),!0):!1;if(typeof s!="object"||s===null)return mr(a,`Expected an object (got ${ti(s)})`);let c=Object.keys(s),f=!0;for(let p=0,h=c.length;p{if(typeof a!="object"||a===null)return mr(n,`Expected an object (got ${ti(a)})`);let c=new Set([...r,...Object.keys(a)]),f={},p=!0;for(let h of c){if(h==="constructor"||h==="__proto__")p=mr(Object.assign(Object.assign({},n),{p:a0(n,h)}),"Unsafe property name");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,C=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<"u"?p=E(C,Object.assign(Object.assign({},n),{p:a0(n,h),coercion:Yf(a,h)}))&&p:e===null?p=mr(Object.assign(Object.assign({},n),{p:a0(n,h)}),`Extraneous property (got ${ti(C)})`):Object.defineProperty(f,h,{enumerable:!0,get:()=>C,set:qze(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(f,n)&&p),p}});return Object.assign(s,{properties:t})}function Zze(t){return sne(t,{extra:jx(gU())})}function one(t){return()=>t}function Wr({test:t}){return one(t)()}function $ze(t,e){if(!e(t))throw new l0}function eZe(t,e){let r=[];if(!e(t,{errors:r}))throw new l0({errors:r})}function tZe(t,e){}function rZe(t,e,{coerce:r=!1,errors:s,throw:a}={}){let n=s?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new l0({errors:n});return{value:void 0,errors:n??!0}}let c={value:t},f=Yf(c,"value"),p=[];if(!e(t,{errors:n,coercion:f,coercions:p})){if(a)throw new l0({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?c.value:{value:c.value,errors:void 0}}function nZe(t,e){let r=Hx(t);return(...s)=>{if(!r(s))throw new l0;return e(...s)}}function iZe(t){return Wr({test:(e,r)=>e.length>=t?!0:mr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function sZe(t){return Wr({test:(e,r)=>e.length<=t?!0:mr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function ane(t){return Wr({test:(e,r)=>e.length!==t?mr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function oZe({map:t}={}){return Wr({test:(e,r)=>{let s=new Set,a=new Set;for(let n=0,c=e.length;nt<=0?!0:mr(e,`Expected to be negative (got ${t})`)})}function lZe(){return Wr({test:(t,e)=>t>=0?!0:mr(e,`Expected to be positive (got ${t})`)})}function yU(t){return Wr({test:(e,r)=>e>=t?!0:mr(r,`Expected to be at least ${t} (got ${e})`)})}function cZe(t){return Wr({test:(e,r)=>e<=t?!0:mr(r,`Expected to be at most ${t} (got ${e})`)})}function uZe(t,e){return Wr({test:(r,s)=>r>=t&&r<=e?!0:mr(s,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function fZe(t,e){return Wr({test:(r,s)=>r>=t&&re!==Math.round(e)?mr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?mr(r,`Expected to be a safe integer (got ${e})`):!0})}function X2(t){return Wr({test:(e,r)=>t.test(e)?!0:mr(r,`Expected to match the pattern ${t.toString()} (got ${ti(e)})`)})}function AZe(){return Wr({test:(t,e)=>t!==t.toLowerCase()?mr(e,`Expected to be all-lowercase (got ${t})`):!0})}function pZe(){return Wr({test:(t,e)=>t!==t.toUpperCase()?mr(e,`Expected to be all-uppercase (got ${t})`):!0})}function hZe(){return Wr({test:(t,e)=>jze.test(t)?!0:mr(e,`Expected to be a valid UUID v4 (got ${ti(t)})`)})}function gZe(){return Wr({test:(t,e)=>nne.test(t)?!0:mr(e,`Expected to be a valid ISO 8601 date string (got ${ti(t)})`)})}function dZe({alpha:t=!1}){return Wr({test:(e,r)=>(t?_ze.test(e):Uze.test(e))?!0:mr(r,`Expected to be a valid hexadecimal color string (got ${ti(e)})`)})}function mZe(){return Wr({test:(t,e)=>Hze.test(t)?!0:mr(e,`Expected to be a valid base 64 string (got ${ti(t)})`)})}function yZe(t=gU()){return Wr({test:(e,r)=>{let s;try{s=JSON.parse(e)}catch{return mr(r,`Expected to be a valid JSON string (got ${ti(e)})`)}return t(s,r)}})}function qx(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Wr({test:(s,a)=>{var n,c;let f={value:s},p=typeof a?.coercions<"u"?Yf(f,"value"):void 0,h=typeof a?.coercions<"u"?[]:void 0;if(!t(s,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<"u")for(let[,C]of h)E.push(C());try{if(typeof a?.coercions<"u"){if(f.value!==s){if(typeof a?.coercion>"u")return mr(a,"Unbound coercion result");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,f.value)])}(c=a?.coercions)===null||c===void 0||c.push(...h)}return r.every(C=>C(f.value,a))}finally{for(let C of E)C()}}})}function $2(t,...e){let r=Array.isArray(e[0])?e[0]:e;return qx(t,r)}function EZe(t){return Wr({test:(e,r)=>typeof e>"u"?!0:t(e,r)})}function IZe(t){return Wr({test:(e,r)=>e===null?!0:t(e,r)})}function CZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)||p.push(h);return p.length>0?mr(c,`Missing required ${hU(p.length,"property","properties")} ${EE(p,"and")}`):!0}})}function IU(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>Object.keys(n).some(h=>a(s,h,n))?!0:mr(c,`Missing at least one property from ${EE(Array.from(s),"or")}`)})}function wZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>0?mr(c,`Forbidden ${hU(p.length,"property","properties")} ${EE(p,"and")}`):!0}})}function BZe(t,e){var r;let s=new Set(t),a=eB[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Wr({test:(n,c)=>{let f=new Set(Object.keys(n)),p=[];for(let h of s)a(f,h,n)&&p.push(h);return p.length>1?mr(c,`Mutually exclusive properties ${EE(p,"and")}`):!0}})}function tB(t,e,r,s){var a,n;let c=new Set((a=s?.ignore)!==null&&a!==void 0?a:[]),f=eB[(n=s?.missingIf)!==null&&n!==void 0?n:"missing"],p=new Set(r),h=vZe[e],E=e===Wf.Forbids?"or":"and";return Wr({test:(C,S)=>{let P=new Set(Object.keys(C));if(!f(P,t,C)||c.has(C[t]))return!0;let I=[];for(let R of p)(f(P,R,C)&&!c.has(C[R]))!==h.expect&&I.push(R);return I.length>=1?mr(S,`Property "${t}" ${h.message} ${hU(I.length,"property","properties")} ${EE(I,E)}`):!0}})}var Mze,_ze,Uze,Hze,jze,nne,Gze,Xze,mU,l0,eB,Wf,vZe,Ul=Ct(()=>{Mze=/^[a-zA-Z_][a-zA-Z0-9_]*$/;_ze=/^#[0-9a-f]{6}$/i,Uze=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,Hze=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,jze=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,nne=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/;Gze=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]);Xze=t=>Wr({test:(e,r)=>e instanceof t?!0:mr(r,`Expected an instance of ${t.name} (got ${ti(e)})`)}),mU=(t,{exclusive:e=!1}={})=>Wr({test:(r,s)=>{var a,n,c;let f=[],p=typeof s?.errors<"u"?[]:void 0;for(let h=0,E=t.length;h1?mr(s,`Expected to match exactly a single predicate (matched ${f.join(", ")})`):(c=s?.errors)===null||c===void 0||c.push(...p),!1}});l0=class extends Error{constructor({errors:e}={}){let r="Type mismatch";if(e&&e.length>0){r+=` +`;for(let s of e)r+=` +- ${s}`}super(r)}};eB={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Wf||(Wf={}));vZe={[Wf.Forbids]:{expect:!1,message:"forbids using"},[Wf.Requires]:{expect:!0,message:"requires using"}}});var ot,c0=Ct(()=>{Bp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),Ia)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw z2("Invalid option schema",p);for(let[,C]of h)C()}else if(r!=null)throw new Error("Invalid command schema");let s=await this.execute();return typeof s<"u"?s:0}};ot.isOption=J2;ot.Default=[]});function sl(t){uU&&console.log(t)}function cne(){let t={nodes:[]};for(let e=0;e{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let C of h)E.some(({to:S})=>C.to===S)||E.push(C)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:C}])=>p===E&&h.to===C)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function bZe(t,{prefix:e=""}={}){if(uU){sl(`${e}Nodes are:`);for(let r=0;rE!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new yE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=kZe(h)}if(s.length>0){sl(" Results:");for(let n of s)sl(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else sl(" No results");return s}function xZe(t,e,{endToken:r=ei.EndOfInput}={}){let s=PZe(t,[...e,r]);return QZe(e,s.map(({state:a})=>a))}function kZe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function QZe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Fd||S.requiredOptions.every(P=>P.some(I=>S.options.find(R=>R.name===I))));if(a.length===0)throw new yE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:P})=>!P).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S})=>S),C=TZe(E);if(C.length>1)throw new Lx(t,C.map(S=>S.candidateUsage));return C[0]}function TZe(t){let e=[],r=[];for(let s of t)s.selectedIndex===Fd?r.push(s):e.push(s);return r.length>0&&e.push({...lne,path:une(...r.map(s=>s.path)),options:r.reduce((s,a)=>s.concat(a.options),[])}),e}function une(t,e,...r){return e===void 0?Array.from(t):une(t.filter((s,a)=>s===e[a]),...r)}function Hl(){return{dynamics:[],shortcuts:[],statics:{}}}function fne(t){return t===En.SuccessNode||t===En.ErrorNode}function CU(t,e=0){return{to:fne(t.to)?t.to:t.to>=En.CustomNode?t.to+e-En.CustomNode+1:t.to+e,reducer:t.reducer}}function RZe(t,e=0){let r=Hl();for(let[s,a]of t.dynamics)r.dynamics.push([s,CU(a,e)]);for(let s of t.shortcuts)r.shortcuts.push(CU(s,e));for(let[s,a]of Object.entries(t.statics))r.statics[s]=a.map(n=>CU(n,e));return r}function qs(t,e,r,s,a){t.nodes[e].dynamics.push([r,{to:s,reducer:a}])}function CE(t,e,r,s){t.nodes[e].shortcuts.push({to:r,reducer:s})}function Ca(t,e,r,s,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:s,reducer:a})}function Gx(t,e,r,s,a){if(Array.isArray(e)){let[n,...c]=e;return t[n](r,s,a,...c)}else return t[e](r,s,a)}var lne,FZe,wU,jl,BU,Wx,Yx=Ct(()=>{Ox();Mx();lne={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Fd,partial:!1,tokens:[]};FZe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(t,e)=>t.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(t,e,r,s)=>!t.ignoreOptions&&e===s,isBatchOption:(t,e,r,s)=>!t.ignoreOptions&&ene.test(e)&&[...e.slice(1)].every(a=>s.has(`-${a}`)),isBoundOption:(t,e,r,s,a)=>{let n=e.match(cU);return!t.ignoreOptions&&!!n&&Nx.test(n[1])&&s.has(n[1])&&a.filter(c=>c.nameSet.includes(n[1])).every(c=>c.allowBinding)},isNegatedOption:(t,e,r,s)=>!t.ignoreOptions&&e===`--no-${s.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&lU.test(e),isUnsupportedOption:(t,e,r,s)=>!t.ignoreOptions&&e.startsWith("-")&&Nx.test(e)&&!s.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith("-")&&!Nx.test(e)},wU={setCandidateState:(t,e,r,s)=>({...t,...s}),setSelectedIndex:(t,e,r,s)=>({...t,selectedIndex:s}),setPartialIndex:(t,e,r,s)=>({...t,selectedIndex:s,partial:!0}),pushBatch:(t,e,r,s)=>{let a=t.options.slice(),n=t.tokens.slice();for(let c=1;c{let[,s,a]=e.match(cU),n=t.options.concat({name:s,value:a}),c=t.tokens.concat([{segmentIndex:r,type:"option",slice:[0,s.length],option:s},{segmentIndex:r,type:"assign",slice:[s.length,s.length+1]},{segmentIndex:r,type:"value",slice:[s.length+1,s.length+a.length+1]}]);return{...t,options:n,tokens:c}},pushPath:(t,e,r)=>{let s=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:"path"});return{...t,path:s,tokens:a}},pushPositional:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushExtra:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let s=t.positionals.concat({value:e,extra:jl}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:s,tokens:a}},pushTrue:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:s});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,s)=>{let a=t.options.concat({name:s,value:!1}),n=t.tokens.concat({segmentIndex:r,type:"option",option:s});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,s)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var s;let a=t.options[t.options.length-1],n=t.options.slice(),c=t.tokens.concat({segmentIndex:r,type:"value"});return a.value=((s=a.value)!==null&&s!==void 0?s:[]).concat([e]),{...t,options:n,tokens:c}},setStringValue:(t,e,r)=>{let s=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:"value"});return s.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,s)=>{let[,,a]=e.match(lU);return typeof a<"u"?{...t,options:[{name:"-c",value:String(s)},{name:"-i",value:a}]}:{...t,options:[{name:"-c",value:String(s)}]}},setError:(t,e,r,s)=>e===ei.EndOfInput||e===ei.EndOfPartialInput?{...t,errorMessage:`${s}.`}:{...t,errorMessage:`${s} ("${e}").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},jl=Symbol(),BU=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:s=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:s,proxy:a})}addPositional({name:e="arg",required:r=!0}={}){if(!r&&this.arity.extra===jl)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!r&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!r&&this.arity.extra!==jl?this.arity.extra.push(e):this.arity.extra!==jl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:r=0}={}){if(this.arity.extra===jl)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let s=0;s1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(s))throw new Error(`The arity must be an integer, got ${s}`);if(s<0)throw new Error(`The arity must be positive, got ${s}`);let f=e.reduce((p,h)=>h.length>p.length?h:p,"");for(let p of e)this.allOptionNames.set(p,f);this.options.push({preferredName:f,nameSet:e,description:r,arity:s,hidden:a,required:n,allowBinding:c})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let s=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&s.push(...this.paths[0]),e){for(let{preferredName:c,nameSet:f,arity:p,hidden:h,description:E,required:C}of this.options){if(h)continue;let S=[];for(let I=0;I`:`[${P}]`)}s.push(...this.arity.leading.map(c=>`<${c}>`)),this.arity.extra===jl?s.push("..."):s.push(...this.arity.extra.map(c=>`[${c}]`)),s.push(...this.arity.trailing.map(c=>`<${c}>`))}return{usage:s.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=cne(),r=En.InitialNode,s=this.usage().usage,a=this.options.filter(f=>f.required).map(f=>f.nameSet);r=Mu(e,Hl()),Ca(e,En.InitialNode,ei.StartOfInput,r,["setCandidateState",{candidateUsage:s,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",c=this.paths.length>0?this.paths:[[]];for(let f of c){let p=r;if(f.length>0){let S=Mu(e,Hl());CE(e,p,S),this.registerOptions(e,S),p=S}for(let S=0;S0||!this.arity.proxy){let S=Mu(e,Hl());qs(e,p,"isHelp",S,["useHelp",this.cliIndex]),qs(e,S,"always",S,"pushExtra"),Ca(e,S,ei.EndOfInput,En.SuccessNode,["setSelectedIndex",Fd]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Ca(e,p,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,p,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex]));let h=p;for(let S=0;S0||S+1!==this.arity.leading.length)&&(Ca(e,P,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,P,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex])),qs(e,h,"isNotOptionLike",P,"pushPositional"),h=P}let E=h;if(this.arity.extra===jl||this.arity.extra.length>0){let S=Mu(e,Hl());if(CE(e,h,S),this.arity.extra===jl){let P=Mu(e,Hl());this.arity.proxy||this.registerOptions(e,P),qs(e,h,n,P,"pushExtraNoLimits"),qs(e,P,n,P,"pushExtraNoLimits"),CE(e,P,S)}else for(let P=0;P0)&&this.registerOptions(e,I),qs(e,E,n,I,"pushExtra"),CE(e,I,S),E=I}E=S}this.arity.trailing.length>0&&(Ca(e,E,ei.EndOfInput,En.ErrorNode,["setError","Not enough positional arguments"]),Ca(e,E,ei.EndOfPartialInput,En.SuccessNode,["setPartialIndex",this.cliIndex]));let C=E;for(let S=0;S=0&&e{let c=n?ei.EndOfPartialInput:ei.EndOfInput;return xZe(s,a,{endToken:c})}}}}});function pne(){return Vx.default&&"getColorDepth"in Vx.default.WriteStream.prototype?Vx.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}function hne(t){let e=Ane;if(typeof e>"u"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=Ie("async_hooks");e=Ane=new r;let s=process.stdout._write;process.stdout._write=function(n,c,f){let p=e.getStore();return typeof p>"u"?s.call(this,n,c,f):p.stdout.write(n,c,f)};let a=process.stderr._write;process.stderr._write=function(n,c,f){let p=e.getStore();return typeof p>"u"?a.call(this,n,c,f):p.stderr.write(n,c,f)}}return r=>e.run(t,r)}var Vx,Ane,gne=Ct(()=>{Vx=et(Ie("tty"),1)});var Kx,dne=Ct(()=>{c0();Kx=class t extends ot{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let s=new t(r);s.path=e.path;for(let a of e.options)switch(a.name){case"-c":s.commands.push(Number(a.value));break;case"-i":s.index=Number(a.value);break}return s}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: +`),this.context.stdout.write(` +`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(` +`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. +`)}}}});async function Ene(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cne(t);return wa.from(r,e).runExit(s,a)}async function Ine(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=Cne(t);return wa.from(r,e).run(s,a)}function Cne(t){let e,r,s,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function yne(t){return t()}var mne,wa,wne=Ct(()=>{Ox();Yx();pU();gne();c0();dne();mne=Symbol("clipanion/errorCommand");wa=class t{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Wx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<"u")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Fd:{let E=Kx.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],C=this.registrations.get(E);if(typeof C>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[P,{transformer:I}]of C.specs.entries())S[P]=I(C.builder,P,p,h);return S}catch(P){throw P[mne]=S,P}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,C)=>this.error(E,C),format:E=>this.format(E),process:(E,C)=>this.process(E,{...c,...C}),run:(E,C)=>this.run(E,{...c,...C}),usage:(E,C)=>this.usage(E,C)};let p=this.enableCapture&&(a=hne(c))!==null&&a!==void 0?a:yne,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<"u"?qo(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<"u"?qo(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?qo(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,C])=>[qo(E,{format:this.format(r),paragraphs:!1}),C.replace(/\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(P=>P.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f="";if(c)if(s){let{description:p="",details:h="",examples:E=[]}=c.usage||{};p!==""&&(f+=qo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,P=>P.toUpperCase()),f+=` +`),(h!==""||E.length>0)&&(f+=`${this.format(r).header("Usage")} +`,f+=` +`);let{usage:C,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${C} +`,S.length>0){f+=` +`,f+=`${this.format(r).header("Options")} +`;let P=S.reduce((I,R)=>Math.max(I,R.definition.length),0);f+=` +`;for(let{definition:I,description:R}of S)f+=` ${this.format(r).bold(I.padEnd(P))} ${qo(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(f+=` +`,f+=`${this.format(r).header("Details")} +`,f+=` +`,f+=qo(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=` +`,f+=`${this.format(r).header("Examples")} +`;for(let[P,I]of E)f+=` +`,f+=qo(P,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)} +`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p} +`}else{let p=new Map;for(let[S,{index:P}]of this.registrations.entries()){if(typeof S.usage>"u")continue;let I=typeof S.usage.category<"u"?qo(S.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(I);typeof R>"u"&&p.set(I,R=[]);let{usage:N}=this.getUsageByIndex(P);R.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,P)=>S===null?-1:P===null?1:S.localeCompare(P,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",C=typeof this.binaryVersion<"u";E||C?(E&&C?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)} + +`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)} +`:f+=`${this.format(r).header(`${this.binaryVersion}`)} +`,f+=` ${this.format(r).bold(a)}${this.binaryName} +`):f+=`${this.format(r).bold(a)}${this.binaryName} +`;for(let S of h){let P=p.get(S).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),I=S!==null?S.trim():"General commands";f+=` +`,f+=`${this.format(r).header(`${I}`)} +`;for(let{commandClass:R,usage:N}of P){let U=R.usage.description||"undocumented";f+=` +`,f+=` ${this.format(r).bold(N)} +`,f+=` ${qo(U,{format:this.format(r),paragraphs:!1})}`}}f+=` +`,f+=qo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return f}error(e,r){var s,{colored:a,command:n=(s=e[mne])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c="",f=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}: ${e.message} +`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(c+=` +`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\n/,"")} +`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?tne:rne}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};wa.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:pne()}});var rB,Bne=Ct(()=>{c0();rB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} +`)}};rB.paths=[["--clipanion=definitions"]]});var nB,vne=Ct(()=>{c0();nB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};nB.paths=[["-h"],["--help"]]});function Jx(t={}){return Ea({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var vU=Ct(()=>{Bp()});var iB,Sne=Ct(()=>{c0();vU();iB=class extends ot{constructor(){super(...arguments),this.args=Jx()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)} +`)}};iB.paths=[["--clipanion=tokens"]]});var sB,Dne=Ct(()=>{c0();sB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} +`)}};sB.paths=[["-v"],["--version"]]});var SU={};Vt(SU,{DefinitionsCommand:()=>rB,HelpCommand:()=>nB,TokensCommand:()=>iB,VersionCommand:()=>sB});var bne=Ct(()=>{Bne();vne();Sne();Dne()});function Pne(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let C,S=typeof s<"u"?[...s]:void 0;for(let{name:P,value:I}of E.options)f.has(P)&&(C=P,S=S??[],S.push(I));return typeof S<"u"?Nd(C??h,S,a.validator):S}})}var xne=Ct(()=>{Bp()});function kne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E=S);return E}})}var Qne=Ct(()=>{Bp()});function Tne(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return Ea({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:C,value:S}of h.options)c.has(C)&&(E??(E=0),S?E+=1:E=0);return E}})}var Rne=Ct(()=>{Bp()});function Fne(t={}){return Ea({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===jl||f.extra===!1&&cc)}})}var Nne=Ct(()=>{Yx();Bp()});function NZe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return Ea({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,C){let S,P=s;typeof a.env<"u"&&C.env[a.env]&&(S=a.env,P=C.env[a.env]);for(let{name:I,value:R}of E.options)f.has(I)&&(S=I,P=R);return typeof P=="string"?Nd(S??h,P,a.validator):P}})}function OZe(t={}){let{required:e=!0}=t;return Ea({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c{Yx();Bp()});var ge={};Vt(ge,{Array:()=>Pne,Boolean:()=>kne,Counter:()=>Tne,Proxy:()=>Jx,Rest:()=>Fne,String:()=>One,applyValidator:()=>Nd,cleanValidationError:()=>_x,formatError:()=>z2,isOptionSymbol:()=>J2,makeCommandOption:()=>Ea,rerouteArguments:()=>Gf});var Mne=Ct(()=>{Bp();vU();xne();Qne();Rne();Nne();Lne()});var oB={};Vt(oB,{Builtins:()=>SU,Cli:()=>wa,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>qo,run:()=>Ine,runExit:()=>Ene});var Wt=Ct(()=>{Mx();pU();c0();wne();bne();Mne()});var _ne=L((q9t,LZe)=>{LZe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var qne=L((G9t,vp)=>{var Une=Ie("fs"),bU=Ie("path"),MZe=Ie("os"),_Ze=Ie("crypto"),UZe=_ne(),PU=UZe.version,HZe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function jZe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,` +`);let s;for(;(s=HZe.exec(r))!=null;){let a=s[1],n=s[2]||"";n=n.trim();let c=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(n=n.replace(/\\n/g,` +`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function qZe(t){let e=jne(t),r=Gs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=Hne(t).split(","),a=s.length,n;for(let c=0;c=a)throw f}return Gs.parse(n)}function GZe(t){console.log(`[dotenv@${PU}][INFO] ${t}`)}function WZe(t){console.log(`[dotenv@${PU}][WARN] ${t}`)}function DU(t){console.log(`[dotenv@${PU}][DEBUG] ${t}`)}function Hne(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function YZe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):f}let s=r.password;if(!s)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function jne(t){let e=bU.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function VZe(t){return t[0]==="~"?bU.join(MZe.homedir(),t.slice(1)):t}function KZe(t){GZe("Loading env from encrypted .env.vault");let e=Gs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),Gs.populate(r,e,t),{parsed:e}}function JZe(t){let e=bU.resolve(process.cwd(),".env"),r="utf8",s=!!(t&&t.debug);t&&(t.path!=null&&(e=VZe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=Gs.parse(Une.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),Gs.populate(n,a,t),{parsed:a}}catch(a){return s&&DU(`Failed to load ${e} ${a.message}`),{error:a}}}function zZe(t){let e=jne(t);return Hne(t).length===0?Gs.configDotenv(t):Une.existsSync(e)?Gs._configVault(t):(WZe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Gs.configDotenv(t))}function ZZe(t,e){let r=Buffer.from(e.slice(-64),"hex"),s=Buffer.from(t,"base64"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=_Ze.createDecipheriv("aes-256-gcm",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message==="Invalid key length",h=c.message==="Unsupported state or unable to authenticate data";if(f||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function XZe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&DU(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var Gs={configDotenv:JZe,_configVault:KZe,_parseVault:qZe,config:zZe,decrypt:ZZe,parse:jZe,populate:XZe};vp.exports.configDotenv=Gs.configDotenv;vp.exports._configVault=Gs._configVault;vp.exports._parseVault=Gs._parseVault;vp.exports.config=Gs.config;vp.exports.decrypt=Gs.decrypt;vp.exports.parse=Gs.parse;vp.exports.populate=Gs.populate;vp.exports=Gs});var Wne=L((W9t,Gne)=>{"use strict";Gne.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Od=L((Y9t,xU)=>{"use strict";var $Ze=Wne(),Yne=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=$Ze(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{rnew Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};xU.exports=Yne;xU.exports.default=Yne});function Vf(t){return`YN${t.toString(10).padStart(4,"0")}`}function zx(t){let e=Number(t.slice(2));if(typeof Dr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var Dr,Zx=Ct(()=>{Dr=(Me=>(Me[Me.UNNAMED=0]="UNNAMED",Me[Me.EXCEPTION=1]="EXCEPTION",Me[Me.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Me[Me.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Me[Me.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Me[Me.BUILD_DISABLED=5]="BUILD_DISABLED",Me[Me.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Me[Me.MUST_BUILD=7]="MUST_BUILD",Me[Me.MUST_REBUILD=8]="MUST_REBUILD",Me[Me.BUILD_FAILED=9]="BUILD_FAILED",Me[Me.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Me[Me.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Me[Me.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Me[Me.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",Me[Me.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",Me[Me.REMOTE_INVALID=15]="REMOTE_INVALID",Me[Me.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",Me[Me.RESOLUTION_PACK=17]="RESOLUTION_PACK",Me[Me.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",Me[Me.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",Me[Me.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",Me[Me.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",Me[Me.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",Me[Me.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",Me[Me.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",Me[Me.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",Me[Me.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",Me[Me.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",Me[Me.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",Me[Me.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",Me[Me.FETCH_FAILED=30]="FETCH_FAILED",Me[Me.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",Me[Me.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",Me[Me.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",Me[Me.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",Me[Me.NETWORK_ERROR=35]="NETWORK_ERROR",Me[Me.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",Me[Me.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",Me[Me.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",Me[Me.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",Me[Me.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",Me[Me.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",Me[Me.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",Me[Me.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",Me[Me.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",Me[Me.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",Me[Me.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",Me[Me.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",Me[Me.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",Me[Me.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",Me[Me.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",Me[Me.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",Me[Me.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",Me[Me.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",Me[Me.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",Me[Me.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",Me[Me.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",Me[Me.INVALID_MANIFEST=57]="INVALID_MANIFEST",Me[Me.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",Me[Me.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",Me[Me.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",Me[Me.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",Me[Me.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",Me[Me.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",Me[Me.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",Me[Me.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",Me[Me.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",Me[Me.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",Me[Me.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",Me[Me.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",Me[Me.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",Me[Me.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",Me[Me.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",Me[Me.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",Me[Me.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",Me[Me.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",Me[Me.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",Me[Me.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE",Me[Me.RESOLUTION_MISMATCH=78]="RESOLUTION_MISMATCH",Me[Me.PROLOG_LIMIT_EXCEEDED=79]="PROLOG_LIMIT_EXCEEDED",Me[Me.NETWORK_DISABLED=80]="NETWORK_DISABLED",Me[Me.NETWORK_UNSAFE_HTTP=81]="NETWORK_UNSAFE_HTTP",Me[Me.RESOLUTION_FAILED=82]="RESOLUTION_FAILED",Me[Me.AUTOMERGE_GIT_ERROR=83]="AUTOMERGE_GIT_ERROR",Me[Me.CONSTRAINTS_CHECK_FAILED=84]="CONSTRAINTS_CHECK_FAILED",Me[Me.UPDATED_RESOLUTION_RECORD=85]="UPDATED_RESOLUTION_RECORD",Me[Me.EXPLAIN_PEER_DEPENDENCIES_CTA=86]="EXPLAIN_PEER_DEPENDENCIES_CTA",Me[Me.MIGRATION_SUCCESS=87]="MIGRATION_SUCCESS",Me[Me.VERSION_NOTICE=88]="VERSION_NOTICE",Me[Me.TIPS_NOTICE=89]="TIPS_NOTICE",Me[Me.OFFLINE_MODE_ENABLED=90]="OFFLINE_MODE_ENABLED",Me[Me.INVALID_PROVENANCE_ENVIRONMENT=91]="INVALID_PROVENANCE_ENVIRONMENT",Me))(Dr||{})});var aB=L((K9t,Vne)=>{var eXe="2.0.0",tXe=Number.MAX_SAFE_INTEGER||9007199254740991,rXe=16,nXe=250,iXe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Vne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:rXe,MAX_SAFE_BUILD_LENGTH:nXe,MAX_SAFE_INTEGER:tXe,RELEASE_TYPES:iXe,SEMVER_SPEC_VERSION:eXe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var lB=L((J9t,Kne)=>{var sXe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Kne.exports=sXe});var wE=L((Sp,Jne)=>{var{MAX_SAFE_COMPONENT_LENGTH:kU,MAX_SAFE_BUILD_LENGTH:oXe,MAX_LENGTH:aXe}=aB(),lXe=lB();Sp=Jne.exports={};var cXe=Sp.re=[],uXe=Sp.safeRe=[],rr=Sp.src=[],nr=Sp.t={},fXe=0,QU="[a-zA-Z0-9-]",AXe=[["\\s",1],["\\d",aXe],[QU,oXe]],pXe=t=>{for(let[e,r]of AXe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Kr=(t,e,r)=>{let s=pXe(e),a=fXe++;lXe(t,a,e),nr[t]=a,rr[a]=e,cXe[a]=new RegExp(e,r?"g":void 0),uXe[a]=new RegExp(s,r?"g":void 0)};Kr("NUMERICIDENTIFIER","0|[1-9]\\d*");Kr("NUMERICIDENTIFIERLOOSE","\\d+");Kr("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${QU}*`);Kr("MAINVERSION",`(${rr[nr.NUMERICIDENTIFIER]})\\.(${rr[nr.NUMERICIDENTIFIER]})\\.(${rr[nr.NUMERICIDENTIFIER]})`);Kr("MAINVERSIONLOOSE",`(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})\\.(${rr[nr.NUMERICIDENTIFIERLOOSE]})`);Kr("PRERELEASEIDENTIFIER",`(?:${rr[nr.NUMERICIDENTIFIER]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASEIDENTIFIERLOOSE",`(?:${rr[nr.NUMERICIDENTIFIERLOOSE]}|${rr[nr.NONNUMERICIDENTIFIER]})`);Kr("PRERELEASE",`(?:-(${rr[nr.PRERELEASEIDENTIFIER]}(?:\\.${rr[nr.PRERELEASEIDENTIFIER]})*))`);Kr("PRERELEASELOOSE",`(?:-?(${rr[nr.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${rr[nr.PRERELEASEIDENTIFIERLOOSE]})*))`);Kr("BUILDIDENTIFIER",`${QU}+`);Kr("BUILD",`(?:\\+(${rr[nr.BUILDIDENTIFIER]}(?:\\.${rr[nr.BUILDIDENTIFIER]})*))`);Kr("FULLPLAIN",`v?${rr[nr.MAINVERSION]}${rr[nr.PRERELEASE]}?${rr[nr.BUILD]}?`);Kr("FULL",`^${rr[nr.FULLPLAIN]}$`);Kr("LOOSEPLAIN",`[v=\\s]*${rr[nr.MAINVERSIONLOOSE]}${rr[nr.PRERELEASELOOSE]}?${rr[nr.BUILD]}?`);Kr("LOOSE",`^${rr[nr.LOOSEPLAIN]}$`);Kr("GTLT","((?:<|>)?=?)");Kr("XRANGEIDENTIFIERLOOSE",`${rr[nr.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Kr("XRANGEIDENTIFIER",`${rr[nr.NUMERICIDENTIFIER]}|x|X|\\*`);Kr("XRANGEPLAIN",`[v=\\s]*(${rr[nr.XRANGEIDENTIFIER]})(?:\\.(${rr[nr.XRANGEIDENTIFIER]})(?:\\.(${rr[nr.XRANGEIDENTIFIER]})(?:${rr[nr.PRERELEASE]})?${rr[nr.BUILD]}?)?)?`);Kr("XRANGEPLAINLOOSE",`[v=\\s]*(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${rr[nr.XRANGEIDENTIFIERLOOSE]})(?:${rr[nr.PRERELEASELOOSE]})?${rr[nr.BUILD]}?)?)?`);Kr("XRANGE",`^${rr[nr.GTLT]}\\s*${rr[nr.XRANGEPLAIN]}$`);Kr("XRANGELOOSE",`^${rr[nr.GTLT]}\\s*${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("COERCEPLAIN",`(^|[^\\d])(\\d{1,${kU}})(?:\\.(\\d{1,${kU}}))?(?:\\.(\\d{1,${kU}}))?`);Kr("COERCE",`${rr[nr.COERCEPLAIN]}(?:$|[^\\d])`);Kr("COERCEFULL",rr[nr.COERCEPLAIN]+`(?:${rr[nr.PRERELEASE]})?(?:${rr[nr.BUILD]})?(?:$|[^\\d])`);Kr("COERCERTL",rr[nr.COERCE],!0);Kr("COERCERTLFULL",rr[nr.COERCEFULL],!0);Kr("LONETILDE","(?:~>?)");Kr("TILDETRIM",`(\\s*)${rr[nr.LONETILDE]}\\s+`,!0);Sp.tildeTrimReplace="$1~";Kr("TILDE",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAIN]}$`);Kr("TILDELOOSE",`^${rr[nr.LONETILDE]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("LONECARET","(?:\\^)");Kr("CARETTRIM",`(\\s*)${rr[nr.LONECARET]}\\s+`,!0);Sp.caretTrimReplace="$1^";Kr("CARET",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAIN]}$`);Kr("CARETLOOSE",`^${rr[nr.LONECARET]}${rr[nr.XRANGEPLAINLOOSE]}$`);Kr("COMPARATORLOOSE",`^${rr[nr.GTLT]}\\s*(${rr[nr.LOOSEPLAIN]})$|^$`);Kr("COMPARATOR",`^${rr[nr.GTLT]}\\s*(${rr[nr.FULLPLAIN]})$|^$`);Kr("COMPARATORTRIM",`(\\s*)${rr[nr.GTLT]}\\s*(${rr[nr.LOOSEPLAIN]}|${rr[nr.XRANGEPLAIN]})`,!0);Sp.comparatorTrimReplace="$1$2$3";Kr("HYPHENRANGE",`^\\s*(${rr[nr.XRANGEPLAIN]})\\s+-\\s+(${rr[nr.XRANGEPLAIN]})\\s*$`);Kr("HYPHENRANGELOOSE",`^\\s*(${rr[nr.XRANGEPLAINLOOSE]})\\s+-\\s+(${rr[nr.XRANGEPLAINLOOSE]})\\s*$`);Kr("STAR","(<|>)?=?\\s*\\*");Kr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Kr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Xx=L((z9t,zne)=>{var hXe=Object.freeze({loose:!0}),gXe=Object.freeze({}),dXe=t=>t?typeof t!="object"?hXe:t:gXe;zne.exports=dXe});var TU=L((Z9t,$ne)=>{var Zne=/^[0-9]+$/,Xne=(t,e)=>{let r=Zne.test(t),s=Zne.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:tXne(e,t);$ne.exports={compareIdentifiers:Xne,rcompareIdentifiers:mXe}});var Go=L((X9t,nie)=>{var $x=lB(),{MAX_LENGTH:eie,MAX_SAFE_INTEGER:ek}=aB(),{safeRe:tie,t:rie}=wE(),yXe=Xx(),{compareIdentifiers:BE}=TU(),RU=class t{constructor(e,r){if(r=yXe(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>eie)throw new TypeError(`version is longer than ${eie} characters`);$x("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?tie[rie.LOOSE]:tie[rie.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>ek||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ek||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ek||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let n=[r,a];s===!1&&(n=[r]),BE(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};nie.exports=RU});var Ld=L(($9t,sie)=>{var iie=Go(),EXe=(t,e,r=!1)=>{if(t instanceof iie)return t;try{return new iie(t,e)}catch(s){if(!r)return null;throw s}};sie.exports=EXe});var aie=L((eWt,oie)=>{var IXe=Ld(),CXe=(t,e)=>{let r=IXe(t,e);return r?r.version:null};oie.exports=CXe});var cie=L((tWt,lie)=>{var wXe=Ld(),BXe=(t,e)=>{let r=wXe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};lie.exports=BXe});var Aie=L((rWt,fie)=>{var uie=Go(),vXe=(t,e,r,s,a)=>{typeof r=="string"&&(a=s,s=r,r=void 0);try{return new uie(t instanceof uie?t.version:t,r).inc(e,s,a).version}catch{return null}};fie.exports=vXe});var gie=L((nWt,hie)=>{var pie=Ld(),SXe=(t,e)=>{let r=pie(t,null,!0),s=pie(e,null,!0),a=r.compare(s);if(a===0)return null;let n=a>0,c=n?r:s,f=n?s:r,p=!!c.prerelease.length;if(!!f.prerelease.length&&!p)return!f.patch&&!f.minor?"major":c.patch?"patch":c.minor?"minor":"major";let E=p?"pre":"";return r.major!==s.major?E+"major":r.minor!==s.minor?E+"minor":r.patch!==s.patch?E+"patch":"prerelease"};hie.exports=SXe});var mie=L((iWt,die)=>{var DXe=Go(),bXe=(t,e)=>new DXe(t,e).major;die.exports=bXe});var Eie=L((sWt,yie)=>{var PXe=Go(),xXe=(t,e)=>new PXe(t,e).minor;yie.exports=xXe});var Cie=L((oWt,Iie)=>{var kXe=Go(),QXe=(t,e)=>new kXe(t,e).patch;Iie.exports=QXe});var Bie=L((aWt,wie)=>{var TXe=Ld(),RXe=(t,e)=>{let r=TXe(t,e);return r&&r.prerelease.length?r.prerelease:null};wie.exports=RXe});var vc=L((lWt,Sie)=>{var vie=Go(),FXe=(t,e,r)=>new vie(t,r).compare(new vie(e,r));Sie.exports=FXe});var bie=L((cWt,Die)=>{var NXe=vc(),OXe=(t,e,r)=>NXe(e,t,r);Die.exports=OXe});var xie=L((uWt,Pie)=>{var LXe=vc(),MXe=(t,e)=>LXe(t,e,!0);Pie.exports=MXe});var tk=L((fWt,Qie)=>{var kie=Go(),_Xe=(t,e,r)=>{let s=new kie(t,r),a=new kie(e,r);return s.compare(a)||s.compareBuild(a)};Qie.exports=_Xe});var Rie=L((AWt,Tie)=>{var UXe=tk(),HXe=(t,e)=>t.sort((r,s)=>UXe(r,s,e));Tie.exports=HXe});var Nie=L((pWt,Fie)=>{var jXe=tk(),qXe=(t,e)=>t.sort((r,s)=>jXe(s,r,e));Fie.exports=qXe});var cB=L((hWt,Oie)=>{var GXe=vc(),WXe=(t,e,r)=>GXe(t,e,r)>0;Oie.exports=WXe});var rk=L((gWt,Lie)=>{var YXe=vc(),VXe=(t,e,r)=>YXe(t,e,r)<0;Lie.exports=VXe});var FU=L((dWt,Mie)=>{var KXe=vc(),JXe=(t,e,r)=>KXe(t,e,r)===0;Mie.exports=JXe});var NU=L((mWt,_ie)=>{var zXe=vc(),ZXe=(t,e,r)=>zXe(t,e,r)!==0;_ie.exports=ZXe});var nk=L((yWt,Uie)=>{var XXe=vc(),$Xe=(t,e,r)=>XXe(t,e,r)>=0;Uie.exports=$Xe});var ik=L((EWt,Hie)=>{var e$e=vc(),t$e=(t,e,r)=>e$e(t,e,r)<=0;Hie.exports=t$e});var OU=L((IWt,jie)=>{var r$e=FU(),n$e=NU(),i$e=cB(),s$e=nk(),o$e=rk(),a$e=ik(),l$e=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return r$e(t,r,s);case"!=":return n$e(t,r,s);case">":return i$e(t,r,s);case">=":return s$e(t,r,s);case"<":return o$e(t,r,s);case"<=":return a$e(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};jie.exports=l$e});var Gie=L((CWt,qie)=>{var c$e=Go(),u$e=Ld(),{safeRe:sk,t:ok}=wE(),f$e=(t,e)=>{if(t instanceof c$e)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?sk[ok.COERCEFULL]:sk[ok.COERCE]);else{let p=e.includePrerelease?sk[ok.COERCERTLFULL]:sk[ok.COERCERTL],h;for(;(h=p.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||h.index+h[0].length!==r.index+r[0].length)&&(r=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(r===null)return null;let s=r[2],a=r[3]||"0",n=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",f=e.includePrerelease&&r[6]?`+${r[6]}`:"";return u$e(`${s}.${a}.${n}${c}${f}`,e)};qie.exports=f$e});var Yie=L((wWt,Wie)=>{"use strict";Wie.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var ak=L((BWt,Vie)=>{"use strict";Vie.exports=Fn;Fn.Node=Md;Fn.create=Fn;function Fn(t){var e=this;if(e instanceof Fn||(e=new Fn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,s=arguments.length;r1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;s!==null;a++)r=t(r,s.value,a),s=s.next;return r};Fn.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;s!==null;a--)r=t(r,s.value,a),s=s.prev;return r};Fn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Fn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Fn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Fn;if(ethis.length&&(e=this.length);for(var s=0,a=this.head;a!==null&&sthis.length&&(e=this.length);for(var s=this.length,a=this.tail;a!==null&&s>e;s--)a=a.prev;for(;a!==null&&s>t;s--,a=a.prev)r.push(a.value);return r};Fn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,a=this.head;a!==null&&s{"use strict";var g$e=ak(),_d=Symbol("max"),bp=Symbol("length"),vE=Symbol("lengthCalculator"),fB=Symbol("allowStale"),Ud=Symbol("maxAge"),Dp=Symbol("dispose"),Kie=Symbol("noDisposeOnSet"),Ws=Symbol("lruList"),_u=Symbol("cache"),zie=Symbol("updateAgeOnGet"),LU=()=>1,_U=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[_d]=e.max||1/0,s=e.length||LU;if(this[vE]=typeof s!="function"?LU:s,this[fB]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ud]=e.maxAge||0,this[Dp]=e.dispose,this[Kie]=e.noDisposeOnSet||!1,this[zie]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[_d]=e||1/0,uB(this)}get max(){return this[_d]}set allowStale(e){this[fB]=!!e}get allowStale(){return this[fB]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ud]=e,uB(this)}get maxAge(){return this[Ud]}set lengthCalculator(e){typeof e!="function"&&(e=LU),e!==this[vE]&&(this[vE]=e,this[bp]=0,this[Ws].forEach(r=>{r.length=this[vE](r.value,r.key),this[bp]+=r.length})),uB(this)}get lengthCalculator(){return this[vE]}get length(){return this[bp]}get itemCount(){return this[Ws].length}rforEach(e,r){r=r||this;for(let s=this[Ws].tail;s!==null;){let a=s.prev;Jie(this,e,s,r),s=a}}forEach(e,r){r=r||this;for(let s=this[Ws].head;s!==null;){let a=s.next;Jie(this,e,s,r),s=a}}keys(){return this[Ws].toArray().map(e=>e.key)}values(){return this[Ws].toArray().map(e=>e.value)}reset(){this[Dp]&&this[Ws]&&this[Ws].length&&this[Ws].forEach(e=>this[Dp](e.key,e.value)),this[_u]=new Map,this[Ws]=new g$e,this[bp]=0}dump(){return this[Ws].map(e=>lk(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ws]}set(e,r,s){if(s=s||this[Ud],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let a=s?Date.now():0,n=this[vE](r,e);if(this[_u].has(e)){if(n>this[_d])return SE(this,this[_u].get(e)),!1;let p=this[_u].get(e).value;return this[Dp]&&(this[Kie]||this[Dp](e,p.value)),p.now=a,p.maxAge=s,p.value=r,this[bp]+=n-p.length,p.length=n,this.get(e),uB(this),!0}let c=new UU(e,r,n,a,s);return c.length>this[_d]?(this[Dp]&&this[Dp](e,r),!1):(this[bp]+=c.length,this[Ws].unshift(c),this[_u].set(e,this[Ws].head),uB(this),!0)}has(e){if(!this[_u].has(e))return!1;let r=this[_u].get(e).value;return!lk(this,r)}get(e){return MU(this,e,!0)}peek(e){return MU(this,e,!1)}pop(){let e=this[Ws].tail;return e?(SE(this,e),e.value):null}del(e){SE(this,this[_u].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let a=e[s],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let c=n-r;c>0&&this.set(a.k,a.v,c)}}}prune(){this[_u].forEach((e,r)=>MU(this,r,!1))}},MU=(t,e,r)=>{let s=t[_u].get(e);if(s){let a=s.value;if(lk(t,a)){if(SE(t,s),!t[fB])return}else r&&(t[zie]&&(s.value.now=Date.now()),t[Ws].unshiftNode(s));return a.value}},lk=(t,e)=>{if(!e||!e.maxAge&&!t[Ud])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ud]&&r>t[Ud]},uB=t=>{if(t[bp]>t[_d])for(let e=t[Ws].tail;t[bp]>t[_d]&&e!==null;){let r=e.prev;SE(t,e),e=r}},SE=(t,e)=>{if(e){let r=e.value;t[Dp]&&t[Dp](r.key,r.value),t[bp]-=r.length,t[_u].delete(r.key),t[Ws].removeNode(e)}},UU=class{constructor(e,r,s,a,n){this.key=e,this.value=r,this.length=s,this.now=a,this.maxAge=n||0}},Jie=(t,e,r,s)=>{let a=r.value;lk(t,a)&&(SE(t,r),t[fB]||(a=void 0)),a&&e.call(s,a.value,a.key,t)};Zie.exports=_U});var Sc=L((SWt,rse)=>{var HU=class t{constructor(e,r){if(r=m$e(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof jU)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(a=>!ese(a[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&v$e(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&w$e)|(this.options.loose&&B$e))+":"+e,a=$ie.get(s);if(a)return a;let n=this.options.loose,c=n?ol[Ba.HYPHENRANGELOOSE]:ol[Ba.HYPHENRANGE];e=e.replace(c,F$e(this.options.includePrerelease)),Si("hyphen replace",e),e=e.replace(ol[Ba.COMPARATORTRIM],E$e),Si("comparator trim",e),e=e.replace(ol[Ba.TILDETRIM],I$e),Si("tilde trim",e),e=e.replace(ol[Ba.CARETTRIM],C$e),Si("caret trim",e);let f=e.split(" ").map(C=>S$e(C,this.options)).join(" ").split(/\s+/).map(C=>R$e(C,this.options));n&&(f=f.filter(C=>(Si("loose invalid filter",C,this.options),!!C.match(ol[Ba.COMPARATORLOOSE])))),Si("range list",f);let p=new Map,h=f.map(C=>new jU(C,this.options));for(let C of h){if(ese(C))return[C];p.set(C.value,C)}p.size>1&&p.has("")&&p.delete("");let E=[...p.values()];return $ie.set(s,E),E}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>tse(s,r)&&e.set.some(a=>tse(a,r)&&s.every(n=>a.every(c=>n.intersects(c,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new y$e(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0",v$e=t=>t.value==="",tse=(t,e)=>{let r=!0,s=t.slice(),a=s.pop();for(;r&&s.length;)r=s.every(n=>a.intersects(n,e)),a=s.pop();return r},S$e=(t,e)=>(Si("comp",t,e),t=P$e(t,e),Si("caret",t),t=D$e(t,e),Si("tildes",t),t=k$e(t,e),Si("xrange",t),t=T$e(t,e),Si("stars",t),t),va=t=>!t||t.toLowerCase()==="x"||t==="*",D$e=(t,e)=>t.trim().split(/\s+/).map(r=>b$e(r,e)).join(" "),b$e=(t,e)=>{let r=e.loose?ol[Ba.TILDELOOSE]:ol[Ba.TILDE];return t.replace(r,(s,a,n,c,f)=>{Si("tilde",t,s,a,n,c,f);let p;return va(a)?p="":va(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:va(c)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:f?(Si("replaceTilde pr",f),p=`>=${a}.${n}.${c}-${f} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${c} <${a}.${+n+1}.0-0`,Si("tilde return",p),p})},P$e=(t,e)=>t.trim().split(/\s+/).map(r=>x$e(r,e)).join(" "),x$e=(t,e)=>{Si("caret",t,e);let r=e.loose?ol[Ba.CARETLOOSE]:ol[Ba.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(a,n,c,f,p)=>{Si("caret",t,a,n,c,f,p);let h;return va(n)?h="":va(c)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:va(f)?n==="0"?h=`>=${n}.${c}.0${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.0${s} <${+n+1}.0.0-0`:p?(Si("replaceCaret pr",p),n==="0"?c==="0"?h=`>=${n}.${c}.${f}-${p} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}-${p} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f}-${p} <${+n+1}.0.0-0`):(Si("no pr"),n==="0"?c==="0"?h=`>=${n}.${c}.${f}${s} <${n}.${c}.${+f+1}-0`:h=`>=${n}.${c}.${f}${s} <${n}.${+c+1}.0-0`:h=`>=${n}.${c}.${f} <${+n+1}.0.0-0`),Si("caret return",h),h})},k$e=(t,e)=>(Si("replaceXRanges",t,e),t.split(/\s+/).map(r=>Q$e(r,e)).join(" ")),Q$e=(t,e)=>{t=t.trim();let r=e.loose?ol[Ba.XRANGELOOSE]:ol[Ba.XRANGE];return t.replace(r,(s,a,n,c,f,p)=>{Si("xRange",t,s,a,n,c,f,p);let h=va(n),E=h||va(c),C=E||va(f),S=C;return a==="="&&S&&(a=""),p=e.includePrerelease?"-0":"",h?a===">"||a==="<"?s="<0.0.0-0":s="*":a&&S?(E&&(c=0),f=0,a===">"?(a=">=",E?(n=+n+1,c=0,f=0):(c=+c+1,f=0)):a==="<="&&(a="<",E?n=+n+1:c=+c+1),a==="<"&&(p="-0"),s=`${a+n}.${c}.${f}${p}`):E?s=`>=${n}.0.0${p} <${+n+1}.0.0-0`:C&&(s=`>=${n}.${c}.0${p} <${n}.${+c+1}.0-0`),Si("xRange return",s),s})},T$e=(t,e)=>(Si("replaceStars",t,e),t.trim().replace(ol[Ba.STAR],"")),R$e=(t,e)=>(Si("replaceGTE0",t,e),t.trim().replace(ol[e.includePrerelease?Ba.GTE0PRE:Ba.GTE0],"")),F$e=t=>(e,r,s,a,n,c,f,p,h,E,C,S,P)=>(va(s)?r="":va(a)?r=`>=${s}.0.0${t?"-0":""}`:va(n)?r=`>=${s}.${a}.0${t?"-0":""}`:c?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,va(h)?p="":va(E)?p=`<${+h+1}.0.0-0`:va(C)?p=`<${h}.${+E+1}.0-0`:S?p=`<=${h}.${E}.${C}-${S}`:t?p=`<${h}.${E}.${+C+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),N$e=(t,e,r)=>{for(let s=0;s0){let a=t[s].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var AB=L((DWt,lse)=>{var pB=Symbol("SemVer ANY"),WU=class t{static get ANY(){return pB}constructor(e,r){if(r=nse(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),GU("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===pB?this.value="":this.value=this.operator+this.semver.version,GU("comp",this)}parse(e){let r=this.options.loose?ise[sse.COMPARATORLOOSE]:ise[sse.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new ose(s[2],this.options.loose):this.semver=pB}toString(){return this.value}test(e){if(GU("Comparator.test",e,this.options.loose),this.semver===pB||e===pB)return!0;if(typeof e=="string")try{e=new ose(e,this.options)}catch{return!1}return qU(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ase(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new ase(this.value,r).test(e.semver):(r=nse(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||qU(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qU(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};lse.exports=WU;var nse=Xx(),{safeRe:ise,t:sse}=wE(),qU=OU(),GU=lB(),ose=Go(),ase=Sc()});var hB=L((bWt,cse)=>{var O$e=Sc(),L$e=(t,e,r)=>{try{e=new O$e(e,r)}catch{return!1}return e.test(t)};cse.exports=L$e});var fse=L((PWt,use)=>{var M$e=Sc(),_$e=(t,e)=>new M$e(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));use.exports=_$e});var pse=L((xWt,Ase)=>{var U$e=Go(),H$e=Sc(),j$e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new H$e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new U$e(s,r))}),s};Ase.exports=j$e});var gse=L((kWt,hse)=>{var q$e=Go(),G$e=Sc(),W$e=(t,e,r)=>{let s=null,a=null,n=null;try{n=new G$e(e,r)}catch{return null}return t.forEach(c=>{n.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new q$e(s,r))}),s};hse.exports=W$e});var yse=L((QWt,mse)=>{var YU=Go(),Y$e=Sc(),dse=cB(),V$e=(t,e)=>{t=new Y$e(t,e);let r=new YU("0.0.0");if(t.test(r)||(r=new YU("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s{let f=new YU(c.semver.version);switch(c.operator){case">":f.prerelease.length===0?f.patch++:f.prerelease.push(0),f.raw=f.format();case"":case">=":(!n||dse(f,n))&&(n=f);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),n&&(!r||dse(r,n))&&(r=n)}return r&&t.test(r)?r:null};mse.exports=V$e});var Ise=L((TWt,Ese)=>{var K$e=Sc(),J$e=(t,e)=>{try{return new K$e(t,e).range||"*"}catch{return null}};Ese.exports=J$e});var ck=L((RWt,vse)=>{var z$e=Go(),Bse=AB(),{ANY:Z$e}=Bse,X$e=Sc(),$$e=hB(),Cse=cB(),wse=rk(),eet=ik(),tet=nk(),ret=(t,e,r,s)=>{t=new z$e(t,s),e=new X$e(e,s);let a,n,c,f,p;switch(r){case">":a=Cse,n=eet,c=wse,f=">",p=">=";break;case"<":a=wse,n=tet,c=Cse,f="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($$e(t,e,s))return!1;for(let h=0;h{P.semver===Z$e&&(P=new Bse(">=0.0.0")),C=C||P,S=S||P,a(P.semver,C.semver,s)?C=P:c(P.semver,S.semver,s)&&(S=P)}),C.operator===f||C.operator===p||(!S.operator||S.operator===f)&&n(t,S.semver))return!1;if(S.operator===p&&c(t,S.semver))return!1}return!0};vse.exports=ret});var Dse=L((FWt,Sse)=>{var net=ck(),iet=(t,e,r)=>net(t,e,">",r);Sse.exports=iet});var Pse=L((NWt,bse)=>{var set=ck(),oet=(t,e,r)=>set(t,e,"<",r);bse.exports=oet});var Qse=L((OWt,kse)=>{var xse=Sc(),aet=(t,e,r)=>(t=new xse(t,r),e=new xse(e,r),t.intersects(e,r));kse.exports=aet});var Rse=L((LWt,Tse)=>{var cet=hB(),uet=vc();Tse.exports=(t,e,r)=>{let s=[],a=null,n=null,c=t.sort((E,C)=>uet(E,C,r));for(let E of c)cet(E,e,r)?(n=E,a||(a=E)):(n&&s.push([a,n]),n=null,a=null);a&&s.push([a,null]);let f=[];for(let[E,C]of s)E===C?f.push(E):!C&&E===c[0]?f.push("*"):C?E===c[0]?f.push(`<=${C}`):f.push(`${E} - ${C}`):f.push(`>=${E}`);let p=f.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length{var Fse=Sc(),KU=AB(),{ANY:VU}=KU,gB=hB(),JU=vc(),fet=(t,e,r={})=>{if(t===e)return!0;t=new Fse(t,r),e=new Fse(e,r);let s=!1;e:for(let a of t.set){for(let n of e.set){let c=pet(a,n,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},Aet=[new KU(">=0.0.0-0")],Nse=[new KU(">=0.0.0")],pet=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===VU){if(e.length===1&&e[0].semver===VU)return!0;r.includePrerelease?t=Aet:t=Nse}if(e.length===1&&e[0].semver===VU){if(r.includePrerelease)return!0;e=Nse}let s=new Set,a,n;for(let P of t)P.operator===">"||P.operator===">="?a=Ose(a,P,r):P.operator==="<"||P.operator==="<="?n=Lse(n,P,r):s.add(P.semver);if(s.size>1)return null;let c;if(a&&n){if(c=JU(a.semver,n.semver,r),c>0)return null;if(c===0&&(a.operator!==">="||n.operator!=="<="))return null}for(let P of s){if(a&&!gB(P,String(a),r)||n&&!gB(P,String(n),r))return null;for(let I of e)if(!gB(P,String(I),r))return!1;return!0}let f,p,h,E,C=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;C&&C.prerelease.length===1&&n.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(let P of e){if(E=E||P.operator===">"||P.operator===">=",h=h||P.operator==="<"||P.operator==="<=",a){if(S&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===S.major&&P.semver.minor===S.minor&&P.semver.patch===S.patch&&(S=!1),P.operator===">"||P.operator===">="){if(f=Ose(a,P,r),f===P&&f!==a)return!1}else if(a.operator===">="&&!gB(a.semver,String(P),r))return!1}if(n){if(C&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===C.major&&P.semver.minor===C.minor&&P.semver.patch===C.patch&&(C=!1),P.operator==="<"||P.operator==="<="){if(p=Lse(n,P,r),p===P&&p!==n)return!1}else if(n.operator==="<="&&!gB(n.semver,String(P),r))return!1}if(!P.operator&&(n||a)&&c!==0)return!1}return!(a&&h&&!n&&c!==0||n&&E&&!a&&c!==0||S||C)},Ose=(t,e,r)=>{if(!t)return e;let s=JU(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Lse=(t,e,r)=>{if(!t)return e;let s=JU(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Mse.exports=fet});var Ai=L((_Wt,jse)=>{var zU=wE(),Use=aB(),het=Go(),Hse=TU(),get=Ld(),det=aie(),met=cie(),yet=Aie(),Eet=gie(),Iet=mie(),Cet=Eie(),wet=Cie(),Bet=Bie(),vet=vc(),Det=bie(),bet=xie(),Pet=tk(),xet=Rie(),ket=Nie(),Qet=cB(),Tet=rk(),Ret=FU(),Fet=NU(),Net=nk(),Oet=ik(),Let=OU(),Met=Gie(),_et=AB(),Uet=Sc(),Het=hB(),jet=fse(),qet=pse(),Get=gse(),Wet=yse(),Yet=Ise(),Vet=ck(),Ket=Dse(),Jet=Pse(),zet=Qse(),Zet=Rse(),Xet=_se();jse.exports={parse:get,valid:det,clean:met,inc:yet,diff:Eet,major:Iet,minor:Cet,patch:wet,prerelease:Bet,compare:vet,rcompare:Det,compareLoose:bet,compareBuild:Pet,sort:xet,rsort:ket,gt:Qet,lt:Tet,eq:Ret,neq:Fet,gte:Net,lte:Oet,cmp:Let,coerce:Met,Comparator:_et,Range:Uet,satisfies:Het,toComparators:jet,maxSatisfying:qet,minSatisfying:Get,minVersion:Wet,validRange:Yet,outside:Vet,gtr:Ket,ltr:Jet,intersects:zet,simplifyRange:Zet,subset:Xet,SemVer:het,re:zU.re,src:zU.src,tokens:zU.t,SEMVER_SPEC_VERSION:Use.SEMVER_SPEC_VERSION,RELEASE_TYPES:Use.RELEASE_TYPES,compareIdentifiers:Hse.compareIdentifiers,rcompareIdentifiers:Hse.rcompareIdentifiers}});var Gse=L((UWt,qse)=>{"use strict";function $et(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Hd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Hd)}$et(Hd,Error);Hd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",C;for(C=0;C0){for(C=1,S=1;C{switch(Te[1]){case"|":return xe|Te[3];case"&":return xe&Te[3];case"^":return xe^Te[3]}},$)},S="!",P=Fe("!",!1),I=function($){return!$},R="(",N=Fe("(",!1),U=")",W=Fe(")",!1),te=function($){return $},ie=/^[^ \t\n\r()!|&\^]/,Ae=Ne([" "," ",` +`,"\r","(",")","!","|","&","^"],!0,!1),ce=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke("whitespace"),Be=/^[ \t\n\r]/,Ce=Ne([" "," ",` +`,"\r"],!1,!1),g=0,we=0,ye=[{line:1,column:1}],fe=0,se=[],X=0,De;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Re(){return t.substring(we,g)}function dt(){return _e(we,g)}function j($,oe){throw oe=oe!==void 0?oe:_e(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:_e(we,g),w($,oe)}function Fe($,oe){return{type:"literal",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:"class",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:"any"}}function Ye(){return{type:"end"}}function ke($){return{type:"other",description:$}}function it($){var oe=ye[$],xe;if(oe)return oe;for(xe=$-1;!ye[xe];)xe--;for(oe=ye[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return ye[$]=oe,oe}function _e($,oe){var xe=it($),Te=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Te.line,column:Te.column}}}function x($){gfe&&(fe=g,se=[]),se.push($))}function w($,oe){return new Hd($,null,null,oe)}function b($,oe,xe){return new Hd(Hd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Te,lt,It,qt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(It=n,g++):(It=r,X===0&&x(c)),It===r&&(t.charCodeAt(g)===38?(It=f,g++):(It=r,X===0&&x(p)),It===r&&(t.charCodeAt(g)===94?(It=h,g++):(It=r,X===0&&x(E)))),It!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,It,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);Te!==r;)xe.push(Te),Te=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(It=n,g++):(It=r,X===0&&x(c)),It===r&&(t.charCodeAt(g)===38?(It=f,g++):(It=r,X===0&&x(p)),It===r&&(t.charCodeAt(g)===94?(It=h,g++):(It=r,X===0&&x(E)))),It!==r?(qt=Z(),qt!==r?(ir=F(),ir!==r?(lt=[lt,It,qt,ir],Te=lt):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r)):(g=Te,Te=r);xe!==r?(we=$,oe=C(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Te,lt,It;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,X===0&&x(P)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=R,g++):(oe=r,X===0&&x(N)),oe!==r?(xe=Z(),xe!==r?(Te=y(),Te!==r?(lt=Z(),lt!==r?(t.charCodeAt(g)===41?(It=U,g++):(It=r,X===0&&x(W)),It!==r?(we=$,oe=te(Te),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Te,lt;if($=g,oe=Z(),oe!==r){if(xe=g,Te=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae)),lt!==r)for(;lt!==r;)Te.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&x(Ae));else Te=r;Te!==r?xe=t.substring(xe,g):xe=Te,xe!==r?(we=g,Te=ce(xe),Te?Te=void 0:Te=r,Te!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function Z(){var $,oe;for(X++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&x(Ce));return X--,$===r&&(oe=r,X===0&&x(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g{var{parse:ttt}=Gse();uk.makeParser=(t=/[a-z]+/)=>(e,r)=>ttt(e,{queryPattern:t,checkFn:r});uk.parse=uk.makeParser()});var Vse=L((jWt,Yse)=>{"use strict";Yse.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var ZU=L((qWt,Jse)=>{var dB=Vse(),Kse={};for(let t of Object.keys(dB))Kse[dB[t]]=t;var hr={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Jse.exports=hr;for(let t of Object.keys(hr)){if(!("channels"in hr[t]))throw new Error("missing channels property: "+t);if(!("labels"in hr[t]))throw new Error("missing channel labels property: "+t);if(hr[t].labels.length!==hr[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=hr[t];delete hr[t].channels,delete hr[t].labels,Object.defineProperty(hr[t],"channels",{value:e}),Object.defineProperty(hr[t],"labels",{value:r})}hr.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(e,r,s),n=Math.max(e,r,s),c=n-a,f,p;n===a?f=0:e===n?f=(r-s)/c:r===n?f=2+(s-e)/c:s===n&&(f=4+(e-r)/c),f=Math.min(f*60,360),f<0&&(f+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=c/(n+a):p=c/(2-n-a),[f,p*100,h*100]};hr.rgb.hsv=function(t){let e,r,s,a,n,c=t[0]/255,f=t[1]/255,p=t[2]/255,h=Math.max(c,f,p),E=h-Math.min(c,f,p),C=function(S){return(h-S)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=C(c),r=C(f),s=C(p),c===h?a=s-r:f===h?a=1/3+e-s:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};hr.rgb.hwb=function(t){let e=t[0],r=t[1],s=t[2],a=hr.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,s));return s=1-1/255*Math.max(e,Math.max(r,s)),[a,n*100,s*100]};hr.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.min(1-e,1-r,1-s),n=(1-e-a)/(1-a)||0,c=(1-r-a)/(1-a)||0,f=(1-s-a)/(1-a)||0;return[n*100,c*100,f*100,a*100]};function rtt(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}hr.rgb.keyword=function(t){let e=Kse[t];if(e)return e;let r=1/0,s;for(let a of Object.keys(dB)){let n=dB[a],c=rtt(t,n);c.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;let a=e*.4124+r*.3576+s*.1805,n=e*.2126+r*.7152+s*.0722,c=e*.0193+r*.1192+s*.9505;return[a*100,n*100,c*100]};hr.rgb.lab=function(t){let e=hr.rgb.xyz(t),r=e[0],s=e[1],a=e[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*s-16,c=500*(r-s),f=200*(s-a);return[n,c,f]};hr.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a,n,c;if(r===0)return c=s*255,[c,c,c];s<.5?a=s*(1+r):a=s+r-s*r;let f=2*s-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?c=f+(a-f)*6*n:2*n<1?c=a:3*n<2?c=f+(a-f)*(2/3-n)*6:c=f,p[h]=c*255;return p};hr.hsl.hsv=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=r,n=Math.max(s,.01);s*=2,r*=s<=1?s:2-s,a*=n<=1?n:2-n;let c=(s+r)/2,f=s===0?2*a/(n+a):2*r/(s+r);return[e,f*100,c*100]};hr.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,s=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),c=255*s*(1-r),f=255*s*(1-r*n),p=255*s*(1-r*(1-n));switch(s*=255,a){case 0:return[s,p,c];case 1:return[f,s,c];case 2:return[c,s,p];case 3:return[c,f,s];case 4:return[p,c,s];case 5:return[s,c,f]}};hr.hsv.hsl=function(t){let e=t[0],r=t[1]/100,s=t[2]/100,a=Math.max(s,.01),n,c;c=(2-r)*s;let f=(2-r)*a;return n=r*a,n/=f<=1?f:2-f,n=n||0,c/=2,[e,n*100,c*100]};hr.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100,a=r+s,n;a>1&&(r/=a,s/=a);let c=Math.floor(6*e),f=1-s;n=6*e-c,c&1&&(n=1-n);let p=r+n*(f-r),h,E,C;switch(c){default:case 6:case 0:h=f,E=p,C=r;break;case 1:h=p,E=f,C=r;break;case 2:h=r,E=f,C=p;break;case 3:h=r,E=p,C=f;break;case 4:h=p,E=r,C=f;break;case 5:h=f,E=r,C=p;break}return[h*255,E*255,C*255]};hr.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),c=1-Math.min(1,r*(1-a)+a),f=1-Math.min(1,s*(1-a)+a);return[n*255,c*255,f*255]};hr.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,s=t[2]/100,a,n,c;return a=e*3.2406+r*-1.5372+s*-.4986,n=e*-.9689+r*1.8758+s*.0415,c=e*.0557+r*-.204+s*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),c=Math.min(Math.max(0,c),1),[a*255,n*255,c*255]};hr.xyz.lab=function(t){let e=t[0],r=t[1],s=t[2];e/=95.047,r/=100,s/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let a=116*r-16,n=500*(e-r),c=200*(r-s);return[a,n,c]};hr.lab.xyz=function(t){let e=t[0],r=t[1],s=t[2],a,n,c;n=(e+16)/116,a=r/500+n,c=n-s/200;let f=n**3,p=a**3,h=c**3;return n=f>.008856?f:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,a*=95.047,n*=100,c*=108.883,[a,n,c]};hr.lab.lch=function(t){let e=t[0],r=t[1],s=t[2],a;a=Math.atan2(s,r)*360/2/Math.PI,a<0&&(a+=360);let c=Math.sqrt(r*r+s*s);return[e,c,a]};hr.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),c=r*Math.sin(a);return[e,n,c]};hr.rgb.ansi16=function(t,e=null){let[r,s,a]=t,n=e===null?hr.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(s/255)<<1|Math.round(r/255));return n===2&&(c+=60),c};hr.hsv.ansi16=function(t){return hr.rgb.ansi16(hr.hsv.rgb(t),t[2])};hr.rgb.ansi256=function(t){let e=t[0],r=t[1],s=t[2];return e===r&&r===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)};hr.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,s=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[s,a,n]};hr.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,s=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,s,a]};hr.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};hr.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let s=parseInt(r,16),a=s>>16&255,n=s>>8&255,c=s&255;return[a,n,c]};hr.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(Math.max(e,r),s),n=Math.min(Math.min(e,r),s),c=a-n,f,p;return c<1?f=n/(1-c):f=0,c<=0?p=0:a===e?p=(r-s)/c%6:a===r?p=2+(s-e)/c:p=4+(e-r)/c,p/=6,p%=1,[p*360,c*100,f*100]};hr.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=r<.5?2*e*r:2*e*(1-r),a=0;return s<1&&(a=(r-.5*s)/(1-s)),[t[0],s*100,a*100]};hr.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,s=e*r,a=0;return s<1&&(a=(r-s)/(1-s)),[t[0],s*100,a*100]};hr.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,s=t[2]/100;if(r===0)return[s*255,s*255,s*255];let a=[0,0,0],n=e%1*6,c=n%1,f=1-c,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=f,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=f,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=f}return p=(1-r)*s,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};hr.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e),a=0;return s>0&&(a=e/s),[t[0],a*100,s*100]};hr.hcg.hsl=function(t){let e=t[1]/100,s=t[2]/100*(1-e)+.5*e,a=0;return s>0&&s<.5?a=e/(2*s):s>=.5&&s<1&&(a=e/(2*(1-s))),[t[0],a*100,s*100]};hr.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,s=e+r*(1-e);return[t[0],(s-e)*100,(1-s)*100]};hr.hwb.hcg=function(t){let e=t[1]/100,s=1-t[2]/100,a=s-e,n=0;return a<1&&(n=(s-a)/(1-a)),[t[0],a*100,n*100]};hr.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};hr.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};hr.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};hr.gray.hsl=function(t){return[0,0,t[0]]};hr.gray.hsv=hr.gray.hsl;hr.gray.hwb=function(t){return[0,100,t[0]]};hr.gray.cmyk=function(t){return[0,0,0,t[0]]};hr.gray.lab=function(t){return[t[0],0,0]};hr.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,s=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(s.length)+s};hr.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Zse=L((GWt,zse)=>{var fk=ZU();function ntt(){let t={},e=Object.keys(fk);for(let r=e.length,s=0;s{var XU=ZU(),att=Zse(),DE={},ltt=Object.keys(XU);function ctt(t){let e=function(...r){let s=r[0];return s==null?s:(s.length>1&&(r=s),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function utt(t){let e=function(...r){let s=r[0];if(s==null)return s;s.length>1&&(r=s);let a=t(r);if(typeof a=="object")for(let n=a.length,c=0;c{DE[t]={},Object.defineProperty(DE[t],"channels",{value:XU[t].channels}),Object.defineProperty(DE[t],"labels",{value:XU[t].labels});let e=att(t);Object.keys(e).forEach(s=>{let a=e[s];DE[t][s]=utt(a),DE[t][s].raw=ctt(a)})});Xse.exports=DE});var pk=L((YWt,ioe)=>{"use strict";var eoe=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,toe=(t,e)=>(...r)=>{let s=t(...r);return`\x1B[${38+e};5;${s}m`},roe=(t,e)=>(...r)=>{let s=t(...r);return`\x1B[${38+e};2;${s[0]};${s[1]};${s[2]}m`},Ak=t=>t,noe=(t,e,r)=>[t,e,r],bE=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let s=r();return Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0}),s},enumerable:!0,configurable:!0})},$U,PE=(t,e,r,s)=>{$U===void 0&&($U=$se());let a=s?10:0,n={};for(let[c,f]of Object.entries($U)){let p=c==="ansi16"?"ansi":c;c===e?n[p]=t(r,a):typeof f=="object"&&(n[p]=t(f[e],a))}return n};function ftt(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,s]of Object.entries(e)){for(let[a,n]of Object.entries(s))e[a]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:s,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",bE(e.color,"ansi",()=>PE(eoe,"ansi16",Ak,!1)),bE(e.color,"ansi256",()=>PE(toe,"ansi256",Ak,!1)),bE(e.color,"ansi16m",()=>PE(roe,"rgb",noe,!1)),bE(e.bgColor,"ansi",()=>PE(eoe,"ansi16",Ak,!0)),bE(e.bgColor,"ansi256",()=>PE(toe,"ansi256",Ak,!0)),bE(e.bgColor,"ansi16m",()=>PE(roe,"rgb",noe,!0)),e}Object.defineProperty(ioe,"exports",{enumerable:!0,get:ftt})});var ooe=L((VWt,soe)=>{"use strict";soe.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),a=e.indexOf("--");return s!==-1&&(a===-1||s{"use strict";var Att=Ie("os"),aoe=Ie("tty"),Dc=ooe(),{env:xs}=process,u0;Dc("no-color")||Dc("no-colors")||Dc("color=false")||Dc("color=never")?u0=0:(Dc("color")||Dc("colors")||Dc("color=true")||Dc("color=always"))&&(u0=1);"FORCE_COLOR"in xs&&(xs.FORCE_COLOR==="true"?u0=1:xs.FORCE_COLOR==="false"?u0=0:u0=xs.FORCE_COLOR.length===0?1:Math.min(parseInt(xs.FORCE_COLOR,10),3));function e4(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function t4(t,e){if(u0===0)return 0;if(Dc("color=16m")||Dc("color=full")||Dc("color=truecolor"))return 3;if(Dc("color=256"))return 2;if(t&&!e&&u0===void 0)return 0;let r=u0||0;if(xs.TERM==="dumb")return r;if(process.platform==="win32"){let s=Att.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in xs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(s=>s in xs)||xs.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in xs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xs.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in xs)return 1;if(xs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xs){let s=parseInt((xs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xs.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xs.TERM)||"COLORTERM"in xs?1:r}function ptt(t){let e=t4(t,t&&t.isTTY);return e4(e)}loe.exports={supportsColor:ptt,stdout:e4(t4(!0,aoe.isatty(1))),stderr:e4(t4(!0,aoe.isatty(2)))}});var foe=L((JWt,uoe)=>{"use strict";var htt=(t,e,r)=>{let s=t.indexOf(e);if(s===-1)return t;let a=e.length,n=0,c="";do c+=t.substr(n,s-n)+e+r,n=s+a,s=t.indexOf(e,n);while(s!==-1);return c+=t.substr(n),c},gtt=(t,e,r,s)=>{let a=0,n="";do{let c=t[s-1]==="\r";n+=t.substr(a,(c?s-1:s)-a)+e+(c?`\r +`:` +`)+r,a=s+1,s=t.indexOf(` +`,a)}while(s!==-1);return n+=t.substr(a),n};uoe.exports={stringReplaceAll:htt,stringEncaseCRLFWithFirstIndex:gtt}});var doe=L((zWt,goe)=>{"use strict";var dtt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Aoe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,mtt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ytt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ett=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function hoe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):Ett.get(t)||t}function Itt(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(mtt))r.push(a[2].replace(ytt,(f,p,h)=>p?hoe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Ctt(t){Aoe.lastIndex=0;let e=[],r;for(;(r=Aoe.exec(t))!==null;){let s=r[1];if(r[2]){let a=Itt(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function poe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}goe.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(dtt,(n,c,f,p,h,E)=>{if(c)a.push(hoe(c));else if(p){let C=a.join("");a=[],s.push(r.length===0?C:poe(t,r)(C)),r.push({inverse:f,styles:Ctt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(poe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),s.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var kE=L((ZWt,woe)=>{"use strict";var mB=pk(),{stdout:n4,stderr:i4}=coe(),{stringReplaceAll:wtt,stringEncaseCRLFWithFirstIndex:Btt}=foe(),{isArray:hk}=Array,yoe=["ansi","ansi","ansi256","ansi16m"],xE=Object.create(null),vtt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=n4?n4.level:0;t.level=e.level===void 0?r:e.level},s4=class{constructor(e){return Eoe(e)}},Eoe=t=>{let e={};return vtt(e,t),e.template=(...r)=>Coe(e.template,...r),Object.setPrototypeOf(e,gk.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=s4,e.template};function gk(t){return Eoe(t)}for(let[t,e]of Object.entries(mB))xE[t]={get(){let r=dk(this,o4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};xE.visible={get(){let t=dk(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Ioe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Ioe)xE[t]={get(){let{level:e}=this;return function(...r){let s=o4(mB.color[yoe[e]][t](...r),mB.color.close,this._styler);return dk(this,s,this._isEmpty)}}};for(let t of Ioe){let e="bg"+t[0].toUpperCase()+t.slice(1);xE[e]={get(){let{level:r}=this;return function(...s){let a=o4(mB.bgColor[yoe[r]][t](...s),mB.bgColor.close,this._styler);return dk(this,a,this._isEmpty)}}}}var Stt=Object.defineProperties(()=>{},{...xE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),o4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},dk=(t,e,r)=>{let s=(...a)=>hk(a[0])&&hk(a[0].raw)?moe(s,Coe(s,...a)):moe(s,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(s,Stt),s._generator=t,s._styler=e,s._isEmpty=r,s},moe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=wtt(e,r.close,r.open),r=r.parent;let n=e.indexOf(` +`);return n!==-1&&(e=Btt(e,a,s,n)),s+e+a},r4,Coe=(t,...e)=>{let[r]=e;if(!hk(r)||!hk(r.raw))return e.join(" ");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n{"use strict";bc.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;bc.find=(t,e)=>t.nodes.find(r=>r.type===e);bc.exceedsLimit=(t,e,r=1,s)=>s===!1||!bc.isInteger(t)||!bc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;bc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};bc.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);bc.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;bc.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;bc.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);bc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a{"use strict";var Boe=yk();voe.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&Boe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f="";if(s.value)return(n||c)&&Boe.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var Doe=L((eYt,Soe)=>{"use strict";Soe.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Noe=L((tYt,Foe)=>{"use strict";var boe=Doe(),jd=(t,e,r)=>{if(boe(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(boe(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+":"+e+"="+a+n+c+f;if(jd.cache.hasOwnProperty(p))return jd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+"|"+e;return s.capture?`(${R})`:s.wrap===!1?R:`(?:${R})`}let C=Roe(t)||Roe(e),S={min:t,max:e,a:h,b:E},P=[],I=[];if(C&&(S.isPadded=C,S.maxLen=String(S.max).length),h<0){let R=E<0?Math.abs(E):1;I=Poe(R,Math.abs(h),S,s),h=S.a=0}return E>=0&&(P=Poe(h,E,S,s)),S.negatives=I,S.positives=P,S.result=Dtt(I,P,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&P.length+I.length>1&&(S.result=`(?:${S.result})`),jd.cache[p]=S,S.result};function Dtt(t,e,r){let s=a4(t,e,"-",!1,r)||[],a=a4(e,t,"",!1,r)||[],n=a4(t,e,"-?",!0,r)||[];return s.concat(n).concat(a).join("|")}function btt(t,e){let r=1,s=1,a=koe(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=koe(t,r);for(a=Qoe(e+1,s)-1;t1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+Toe(f.count),c=h+1;continue}r.isPadded&&(C=Ttt(h,r,s)),E.string=C+E.pattern+Toe(E.count),n.push(E),c=h+1,f=E}return n}function a4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!xoe(e,"string",f)&&n.push(r+f),s&&xoe(e,"string",f)&&n.push(r+f)}return n}function xtt(t,e){let r=[];for(let s=0;se?1:e>t?-1:0}function xoe(t,e,r){return t.some(s=>s[e]===r)}function koe(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Qoe(t,e){return t-t%Math.pow(10,e)}function Toe(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Qtt(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function Roe(t){return/^-?(0+)\d/.test(t)}function Ttt(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${s}}`:`0{${s}}`}}jd.cache={};jd.clearCache=()=>jd.cache={};Foe.exports=jd});var u4=L((rYt,qoe)=>{"use strict";var Rtt=Ie("util"),Moe=Noe(),Ooe=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ftt=t=>e=>t===!0?Number(e):String(e),l4=t=>typeof t=="number"||typeof t=="string"&&t!=="",yB=t=>Number.isInteger(+t),c4=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Ntt=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Ott=(t,e,r)=>{if(e>0){let s=t[0]==="-"?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return r===!1?String(t):t},Loe=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length{t.negatives.sort((c,f)=>cf?1:0),t.positives.sort((c,f)=>cf?1:0);let r=e.capture?"":"?:",s="",a="",n;return t.positives.length&&(s=t.positives.join("|")),t.negatives.length&&(a=`-(${r}${t.negatives.join("|")})`),s&&a?n=`${s}|${a}`:n=s||a,e.wrap?`(${r}${n})`:n},_oe=(t,e,r,s)=>{if(r)return Moe(t,e,{wrap:!1,...s});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},Uoe=(t,e,r)=>{if(Array.isArray(t)){let s=r.wrap===!0,a=r.capture?"":"?:";return s?`(${a}${t.join("|")})`:t.join("|")}return Moe(t,e,r)},Hoe=(...t)=>new RangeError("Invalid range arguments: "+Rtt.inspect(...t)),joe=(t,e,r)=>{if(r.strictRanges===!0)throw Hoe([t,e]);return[]},Mtt=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},_tt=(t,e,r=1,s={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(s.strictRanges===!0)throw Hoe([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let c=a>n,f=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=c4(f)||c4(p)||c4(h),C=E?Math.max(f.length,p.length,h.length):0,S=E===!1&&Ntt(t,e,s)===!1,P=s.transform||Ftt(S);if(s.toRegex&&r===1)return _oe(Loe(t,C),Loe(e,C),!0,s);let I={negatives:[],positives:[]},R=W=>I[W<0?"negatives":"positives"].push(Math.abs(W)),N=[],U=0;for(;c?a>=n:a<=n;)s.toRegex===!0&&r>1?R(a):N.push(Ott(P(a,U),C,S)),a=c?a-r:a+r,U++;return s.toRegex===!0?r>1?Ltt(I,s):Uoe(N,null,{wrap:!1,...s}):N},Utt=(t,e,r=1,s={})=>{if(!yB(t)&&t.length>1||!yB(e)&&e.length>1)return joe(t,e,s);let a=s.transform||(S=>String.fromCharCode(S)),n=`${t}`.charCodeAt(0),c=`${e}`.charCodeAt(0),f=n>c,p=Math.min(n,c),h=Math.max(n,c);if(s.toRegex&&r===1)return _oe(p,h,!1,s);let E=[],C=0;for(;f?n>=c:n<=c;)E.push(a(n,C)),n=f?n-r:n+r,C++;return s.toRegex===!0?Uoe(E,null,{wrap:!1,options:s}):E},Ik=(t,e,r,s={})=>{if(e==null&&l4(t))return[t];if(!l4(t)||!l4(e))return joe(t,e,s);if(typeof r=="function")return Ik(t,e,1,{transform:r});if(Ooe(r))return Ik(t,e,0,r);let a={...s};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,yB(r)?yB(t)&&yB(e)?_tt(t,e,r,a):Utt(t,e,Math.max(Math.abs(r),1),a):r!=null&&!Ooe(r)?Mtt(r,a):Ik(t,e,1,r)};qoe.exports=Ik});var Yoe=L((nYt,Woe)=>{"use strict";var Htt=u4(),Goe=yk(),jtt=(t,e={})=>{let r=(s,a={})=>{let n=Goe.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f=n===!0||c===!0,p=e.escapeInvalid===!0?"\\":"",h="";if(s.isOpen===!0||s.isClose===!0)return p+s.value;if(s.type==="open")return f?p+s.value:"(";if(s.type==="close")return f?p+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":f?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let E=Goe.reduce(s.nodes),C=Htt(...E,{...e,wrap:!1,toRegex:!0});if(C.length!==0)return E.length>1&&C.length>1?`(${C})`:C}if(s.nodes)for(let E of s.nodes)h+=r(E,s);return h};return r(t)};Woe.exports=jtt});var Joe=L((iYt,Koe)=>{"use strict";var qtt=u4(),Voe=Ek(),QE=yk(),qd=(t="",e="",r=!1)=>{let s=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?QE.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)s.push(qd(n,e,r));else for(let n of e)r===!0&&typeof n=="string"&&(n=`{${n}}`),s.push(Array.isArray(n)?qd(a,n,r):a+n);return QE.flatten(s)},Gtt=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,s=(a,n={})=>{a.queue=[];let c=n,f=n.queue;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,f=c.queue;if(a.invalid||a.dollar){f.push(qd(f.pop(),Voe(a,e)));return}if(a.type==="brace"&&a.invalid!==!0&&a.nodes.length===2){f.push(qd(f.pop(),["{}"]));return}if(a.nodes&&a.ranges>0){let C=QE.reduce(a.nodes);if(QE.exceedsLimit(...C,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let S=qtt(...C,e);S.length===0&&(S=Voe(a,e)),f.push(qd(f.pop(),S)),a.nodes=[];return}let p=QE.encloseBrace(a),h=a.queue,E=a;for(;E.type!=="brace"&&E.type!=="root"&&E.parent;)E=E.parent,h=E.queue;for(let C=0;C{"use strict";zoe.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var rae=L((oYt,tae)=>{"use strict";var Wtt=Ek(),{MAX_LENGTH:Xoe,CHAR_BACKSLASH:f4,CHAR_BACKTICK:Ytt,CHAR_COMMA:Vtt,CHAR_DOT:Ktt,CHAR_LEFT_PARENTHESES:Jtt,CHAR_RIGHT_PARENTHESES:ztt,CHAR_LEFT_CURLY_BRACE:Ztt,CHAR_RIGHT_CURLY_BRACE:Xtt,CHAR_LEFT_SQUARE_BRACKET:$oe,CHAR_RIGHT_SQUARE_BRACKET:eae,CHAR_DOUBLE_QUOTE:$tt,CHAR_SINGLE_QUOTE:ert,CHAR_NO_BREAK_SPACE:trt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rrt}=Zoe(),nrt=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(Xoe,r.maxLength):Xoe;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:"root",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,C=0,S,P={},I=()=>t[E++],R=N=>{if(N.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&N.type==="text"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(R({type:"bos"});E0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:"text",value:Wtt(c)}]}R({type:"comma",value:S}),c.commas++;continue}if(S===Ktt&&C>0&&c.commas===0){let N=c.nodes;if(C===0||N.length===0){R({type:"text",value:S});continue}if(f.type==="dot"){if(c.range=[],f.value+=S,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}R({type:"dot",value:S});continue}R({type:"text",value:S})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(W=>{W.nodes||(W.type==="open"&&(W.isOpen=!0),W.type==="close"&&(W.isClose=!0),W.nodes||(W.type="text"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return R({type:"eos"}),a};tae.exports=nrt});var sae=L((aYt,iae)=>{"use strict";var nae=Ek(),irt=Yoe(),srt=Joe(),ort=rae(),ql=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=ql.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(ql.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};ql.parse=(t,e={})=>ort(t,e);ql.stringify=(t,e={})=>nae(typeof t=="string"?ql.parse(t,e):t,e);ql.compile=(t,e={})=>(typeof t=="string"&&(t=ql.parse(t,e)),irt(t,e));ql.expand=(t,e={})=>{typeof t=="string"&&(t=ql.parse(t,e));let r=srt(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};ql.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?ql.compile(t,e):ql.expand(t,e);iae.exports=ql});var EB=L((lYt,uae)=>{"use strict";var art=Ie("path"),Kf="\\\\/",oae=`[^${Kf}]`,Pp="\\.",lrt="\\+",crt="\\?",Ck="\\/",urt="(?=.)",aae="[^/]",A4=`(?:${Ck}|$)`,lae=`(?:^|${Ck})`,p4=`${Pp}{1,2}${A4}`,frt=`(?!${Pp})`,Art=`(?!${lae}${p4})`,prt=`(?!${Pp}{0,1}${A4})`,hrt=`(?!${p4})`,grt=`[^.${Ck}]`,drt=`${aae}*?`,cae={DOT_LITERAL:Pp,PLUS_LITERAL:lrt,QMARK_LITERAL:crt,SLASH_LITERAL:Ck,ONE_CHAR:urt,QMARK:aae,END_ANCHOR:A4,DOTS_SLASH:p4,NO_DOT:frt,NO_DOTS:Art,NO_DOT_SLASH:prt,NO_DOTS_SLASH:hrt,QMARK_NO_DOT:grt,STAR:drt,START_ANCHOR:lae},mrt={...cae,SLASH_LITERAL:`[${Kf}]`,QMARK:oae,STAR:`${oae}*?`,DOTS_SLASH:`${Pp}{1,2}(?:[${Kf}]|$)`,NO_DOT:`(?!${Pp})`,NO_DOTS:`(?!(?:^|[${Kf}])${Pp}{1,2}(?:[${Kf}]|$))`,NO_DOT_SLASH:`(?!${Pp}{0,1}(?:[${Kf}]|$))`,NO_DOTS_SLASH:`(?!${Pp}{1,2}(?:[${Kf}]|$))`,QMARK_NO_DOT:`[^.${Kf}]`,START_ANCHOR:`(?:^|[${Kf}])`,END_ANCHOR:`(?:[${Kf}]|$)`},yrt={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};uae.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:yrt,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:art.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?mrt:cae}}});var IB=L(al=>{"use strict";var Ert=Ie("path"),Irt=process.platform==="win32",{REGEX_BACKSLASH:Crt,REGEX_REMOVE_BACKSLASH:wrt,REGEX_SPECIAL_CHARS:Brt,REGEX_SPECIAL_CHARS_GLOBAL:vrt}=EB();al.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);al.hasRegexChars=t=>Brt.test(t);al.isRegexChar=t=>t.length===1&&al.hasRegexChars(t);al.escapeRegex=t=>t.replace(vrt,"\\$1");al.toPosixSlashes=t=>t.replace(Crt,"/");al.removeBackslashes=t=>t.replace(wrt,e=>e==="\\"?"":e);al.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};al.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Irt===!0||Ert.sep==="\\";al.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?al.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};al.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};al.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",a=r.contains?"":"$",n=`${s}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var yae=L((uYt,mae)=>{"use strict";var fae=IB(),{CHAR_ASTERISK:h4,CHAR_AT:Srt,CHAR_BACKWARD_SLASH:CB,CHAR_COMMA:Drt,CHAR_DOT:g4,CHAR_EXCLAMATION_MARK:d4,CHAR_FORWARD_SLASH:dae,CHAR_LEFT_CURLY_BRACE:m4,CHAR_LEFT_PARENTHESES:y4,CHAR_LEFT_SQUARE_BRACKET:brt,CHAR_PLUS:Prt,CHAR_QUESTION_MARK:Aae,CHAR_RIGHT_CURLY_BRACE:xrt,CHAR_RIGHT_PARENTHESES:pae,CHAR_RIGHT_SQUARE_BRACKET:krt}=EB(),hae=t=>t===dae||t===CB,gae=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Qrt=(t,e)=>{let r=e||{},s=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],c=[],f=[],p=t,h=-1,E=0,C=0,S=!1,P=!1,I=!1,R=!1,N=!1,U=!1,W=!1,te=!1,ie=!1,Ae=!1,ce=0,me,pe,Be={value:"",depth:0,isGlob:!1},Ce=()=>h>=s,g=()=>p.charCodeAt(h+1),we=()=>(me=pe,p.charCodeAt(++h));for(;h0&&(fe=p.slice(0,E),p=p.slice(E),C-=E),ye&&I===!0&&C>0?(ye=p.slice(0,C),se=p.slice(C)):I===!0?(ye="",se=p):ye=p,ye&&ye!==""&&ye!=="/"&&ye!==p&&hae(ye.charCodeAt(ye.length-1))&&(ye=ye.slice(0,-1)),r.unescape===!0&&(se&&(se=fae.removeBackslashes(se)),ye&&W===!0&&(ye=fae.removeBackslashes(ye)));let X={prefix:fe,input:t,start:E,base:ye,glob:se,isBrace:S,isBracket:P,isGlob:I,isExtglob:R,isGlobstar:N,negated:te,negatedExtglob:ie};if(r.tokens===!0&&(X.maxDepth=0,hae(pe)||c.push(Be),X.tokens=c),r.parts===!0||r.tokens===!0){let De;for(let Re=0;Re{"use strict";var wk=EB(),Gl=IB(),{MAX_LENGTH:Bk,POSIX_REGEX_SOURCE:Trt,REGEX_NON_SPECIAL_CHARS:Rrt,REGEX_SPECIAL_CHARS_BACKREF:Frt,REPLACEMENTS:Eae}=wk,Nrt=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(a=>Gl.escapeRegex(a)).join("..")}return r},TE=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,E4=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Eae[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(Bk,r.maxLength):Bk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},c=[n],f=r.capture?"":"?:",p=Gl.isWindows(e),h=wk.globChars(p),E=wk.extglobChars(h),{DOT_LITERAL:C,PLUS_LITERAL:S,SLASH_LITERAL:P,ONE_CHAR:I,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:W,QMARK:te,QMARK_NO_DOT:ie,STAR:Ae,START_ANCHOR:ce}=h,me=x=>`(${f}(?:(?!${ce}${x.dot?R:C}).)*?)`,pe=r.dot?"":N,Be=r.dot?te:ie,Ce=r.bash===!0?me(r):Ae;r.capture&&(Ce=`(${Ce})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:c};t=Gl.removePrefix(t,g),a=t.length;let we=[],ye=[],fe=[],se=n,X,De=()=>g.index===a-1,Re=g.peek=(x=1)=>t[g.index+x],dt=g.advance=()=>t[++g.index]||"",j=()=>t.slice(g.index+1),rt=(x="",w=0)=>{g.consumed+=x,g.index+=w},Fe=x=>{g.output+=x.output!=null?x.output:x.value,rt(x.value)},Ne=()=>{let x=1;for(;Re()==="!"&&(Re(2)!=="("||Re(3)==="?");)dt(),g.start++,x++;return x%2===0?!1:(g.negated=!0,g.start++,!0)},Pe=x=>{g[x]++,fe.push(x)},Ye=x=>{g[x]--,fe.pop()},ke=x=>{if(se.type==="globstar"){let w=g.braces>0&&(x.type==="comma"||x.type==="brace"),b=x.extglob===!0||we.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!w&&!b&&(g.output=g.output.slice(0,-se.output.length),se.type="star",se.value="*",se.output=Ce,g.output+=se.output)}if(we.length&&x.type!=="paren"&&(we[we.length-1].inner+=x.value),(x.value||x.output)&&Fe(x),se&&se.type==="text"&&x.type==="text"){se.value+=x.value,se.output=(se.output||"")+x.value;return}x.prev=se,c.push(x),se=x},it=(x,w)=>{let b={...E[w],conditions:1,inner:""};b.prev=se,b.parens=g.parens,b.output=g.output;let y=(r.capture?"(":"")+b.open;Pe("parens"),ke({type:x,value:w,output:g.output?"":I}),ke({type:"paren",extglob:!0,value:dt(),output:y}),we.push(b)},_e=x=>{let w=x.close+(r.capture?")":""),b;if(x.type==="negate"){let y=Ce;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(y=me(r)),(y!==Ce||De()||/^\)+$/.test(j()))&&(w=x.close=`)$))${y}`),x.inner.includes("*")&&(b=j())&&/^\.[^\\/.]+$/.test(b)){let F=E4(b,{...e,fastpaths:!1}).output;w=x.close=`)${F})${y})`}x.prev.type==="bos"&&(g.negatedExtglob=!0)}ke({type:"paren",extglob:!0,value:X,output:w}),Ye("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let x=!1,w=t.replace(Frt,(b,y,F,z,Z,$)=>z==="\\"?(x=!0,b):z==="?"?y?y+z+(Z?te.repeat(Z.length):""):$===0?Be+(Z?te.repeat(Z.length):""):te.repeat(F.length):z==="."?C.repeat(F.length):z==="*"?y?y+z+(Z?Ce:""):Ce:y?b:`\\${b}`);return x===!0&&(r.unescape===!0?w=w.replace(/\\/g,""):w=w.replace(/\\+/g,b=>b.length%2===0?"\\\\":b?"\\":"")),w===t&&r.contains===!0?(g.output=t,g):(g.output=Gl.wrapOutput(w,g,e),g)}for(;!De();){if(X=dt(),X==="\0")continue;if(X==="\\"){let b=Re();if(b==="/"&&r.bash!==!0||b==="."||b===";")continue;if(!b){X+="\\",ke({type:"text",value:X});continue}let y=/^\\+/.exec(j()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(X+="\\")),r.unescape===!0?X=dt():X+=dt(),g.brackets===0){ke({type:"text",value:X});continue}}if(g.brackets>0&&(X!=="]"||se.value==="["||se.value==="[^")){if(r.posix!==!1&&X===":"){let b=se.value.slice(1);if(b.includes("[")&&(se.posix=!0,b.includes(":"))){let y=se.value.lastIndexOf("["),F=se.value.slice(0,y),z=se.value.slice(y+2),Z=Trt[z];if(Z){se.value=F+Z,g.backtrack=!0,dt(),!n.output&&c.indexOf(se)===1&&(n.output=I);continue}}}(X==="["&&Re()!==":"||X==="-"&&Re()==="]")&&(X=`\\${X}`),X==="]"&&(se.value==="["||se.value==="[^")&&(X=`\\${X}`),r.posix===!0&&X==="!"&&se.value==="["&&(X="^"),se.value+=X,Fe({value:X});continue}if(g.quotes===1&&X!=='"'){X=Gl.escapeRegex(X),se.value+=X,Fe({value:X});continue}if(X==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&ke({type:"text",value:X});continue}if(X==="("){Pe("parens"),ke({type:"paren",value:X});continue}if(X===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(TE("opening","("));let b=we[we.length-1];if(b&&g.parens===b.parens+1){_e(we.pop());continue}ke({type:"paren",value:X,output:g.parens?")":"\\)"}),Ye("parens");continue}if(X==="["){if(r.nobracket===!0||!j().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(TE("closing","]"));X=`\\${X}`}else Pe("brackets");ke({type:"bracket",value:X});continue}if(X==="]"){if(r.nobracket===!0||se&&se.type==="bracket"&&se.value.length===1){ke({type:"text",value:X,output:`\\${X}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(TE("opening","["));ke({type:"text",value:X,output:`\\${X}`});continue}Ye("brackets");let b=se.value.slice(1);if(se.posix!==!0&&b[0]==="^"&&!b.includes("/")&&(X=`/${X}`),se.value+=X,Fe({value:X}),r.literalBrackets===!1||Gl.hasRegexChars(b))continue;let y=Gl.escapeRegex(se.value);if(g.output=g.output.slice(0,-se.value.length),r.literalBrackets===!0){g.output+=y,se.value=y;continue}se.value=`(${f}${y}|${se.value})`,g.output+=se.value;continue}if(X==="{"&&r.nobrace!==!0){Pe("braces");let b={type:"brace",value:X,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};ye.push(b),ke(b);continue}if(X==="}"){let b=ye[ye.length-1];if(r.nobrace===!0||!b){ke({type:"text",value:X,output:X});continue}let y=")";if(b.dots===!0){let F=c.slice(),z=[];for(let Z=F.length-1;Z>=0&&(c.pop(),F[Z].type!=="brace");Z--)F[Z].type!=="dots"&&z.unshift(F[Z].value);y=Nrt(z,r),g.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){let F=g.output.slice(0,b.outputIndex),z=g.tokens.slice(b.tokensIndex);b.value=b.output="\\{",X=y="\\}",g.output=F;for(let Z of z)g.output+=Z.output||Z.value}ke({type:"brace",value:X,output:y}),Ye("braces"),ye.pop();continue}if(X==="|"){we.length>0&&we[we.length-1].conditions++,ke({type:"text",value:X});continue}if(X===","){let b=X,y=ye[ye.length-1];y&&fe[fe.length-1]==="braces"&&(y.comma=!0,b="|"),ke({type:"comma",value:X,output:b});continue}if(X==="/"){if(se.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",c.pop(),se=n;continue}ke({type:"slash",value:X,output:P});continue}if(X==="."){if(g.braces>0&&se.type==="dot"){se.value==="."&&(se.output=C);let b=ye[ye.length-1];se.type="dots",se.output+=X,se.value+=X,b.dots=!0;continue}if(g.braces+g.parens===0&&se.type!=="bos"&&se.type!=="slash"){ke({type:"text",value:X,output:C});continue}ke({type:"dot",value:X,output:C});continue}if(X==="?"){if(!(se&&se.value==="(")&&r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){it("qmark",X);continue}if(se&&se.type==="paren"){let y=Re(),F=X;if(y==="<"&&!Gl.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(se.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(j()))&&(F=`\\${X}`),ke({type:"text",value:X,output:F});continue}if(r.dot!==!0&&(se.type==="slash"||se.type==="bos")){ke({type:"qmark",value:X,output:ie});continue}ke({type:"qmark",value:X,output:te});continue}if(X==="!"){if(r.noextglob!==!0&&Re()==="("&&(Re(2)!=="?"||!/[!=<:]/.test(Re(3)))){it("negate",X);continue}if(r.nonegate!==!0&&g.index===0){Ne();continue}}if(X==="+"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){it("plus",X);continue}if(se&&se.value==="("||r.regex===!1){ke({type:"plus",value:X,output:S});continue}if(se&&(se.type==="bracket"||se.type==="paren"||se.type==="brace")||g.parens>0){ke({type:"plus",value:X});continue}ke({type:"plus",value:S});continue}if(X==="@"){if(r.noextglob!==!0&&Re()==="("&&Re(2)!=="?"){ke({type:"at",extglob:!0,value:X,output:""});continue}ke({type:"text",value:X});continue}if(X!=="*"){(X==="$"||X==="^")&&(X=`\\${X}`);let b=Rrt.exec(j());b&&(X+=b[0],g.index+=b[0].length),ke({type:"text",value:X});continue}if(se&&(se.type==="globstar"||se.star===!0)){se.type="star",se.star=!0,se.value+=X,se.output=Ce,g.backtrack=!0,g.globstar=!0,rt(X);continue}let x=j();if(r.noextglob!==!0&&/^\([^?]/.test(x)){it("star",X);continue}if(se.type==="star"){if(r.noglobstar===!0){rt(X);continue}let b=se.prev,y=b.prev,F=b.type==="slash"||b.type==="bos",z=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!F||x[0]&&x[0]!=="/")){ke({type:"star",value:X,output:""});continue}let Z=g.braces>0&&(b.type==="comma"||b.type==="brace"),$=we.length&&(b.type==="pipe"||b.type==="paren");if(!F&&b.type!=="paren"&&!Z&&!$){ke({type:"star",value:X,output:""});continue}for(;x.slice(0,3)==="/**";){let oe=t[g.index+4];if(oe&&oe!=="/")break;x=x.slice(3),rt("/**",3)}if(b.type==="bos"&&De()){se.type="globstar",se.value+=X,se.output=me(r),g.output=se.output,g.globstar=!0,rt(X);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&!z&&De()){g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type="globstar",se.output=me(r)+(r.strictSlashes?")":"|$)"),se.value+=X,g.globstar=!0,g.output+=b.output+se.output,rt(X);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&x[0]==="/"){let oe=x[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(b.output+se.output).length),b.output=`(?:${b.output}`,se.type="globstar",se.output=`${me(r)}${P}|${P}${oe})`,se.value+=X,g.output+=b.output+se.output,g.globstar=!0,rt(X+dt()),ke({type:"slash",value:"/",output:""});continue}if(b.type==="bos"&&x[0]==="/"){se.type="globstar",se.value+=X,se.output=`(?:^|${P}|${me(r)}${P})`,g.output=se.output,g.globstar=!0,rt(X+dt()),ke({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-se.output.length),se.type="globstar",se.output=me(r),se.value+=X,g.output+=se.output,g.globstar=!0,rt(X);continue}let w={type:"star",value:X,output:Ce};if(r.bash===!0){w.output=".*?",(se.type==="bos"||se.type==="slash")&&(w.output=pe+w.output),ke(w);continue}if(se&&(se.type==="bracket"||se.type==="paren")&&r.regex===!0){w.output=X,ke(w);continue}(g.index===g.start||se.type==="slash"||se.type==="dot")&&(se.type==="dot"?(g.output+=U,se.output+=U):r.dot===!0?(g.output+=W,se.output+=W):(g.output+=pe,se.output+=pe),Re()!=="*"&&(g.output+=I,se.output+=I)),ke(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing","]"));g.output=Gl.escapeLast(g.output,"["),Ye("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing",")"));g.output=Gl.escapeLast(g.output,"("),Ye("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(TE("closing","}"));g.output=Gl.escapeLast(g.output,"{"),Ye("braces")}if(r.strictSlashes!==!0&&(se.type==="star"||se.type==="bracket")&&ke({type:"maybe_slash",value:"",output:`${P}?`}),g.backtrack===!0){g.output="";for(let x of g.tokens)g.output+=x.output!=null?x.output:x.value,x.suffix&&(g.output+=x.suffix)}return g};E4.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(Bk,r.maxLength):Bk,a=t.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);t=Eae[t]||t;let n=Gl.isWindows(e),{DOT_LITERAL:c,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:C,NO_DOTS_SLASH:S,STAR:P,START_ANCHOR:I}=wk.globChars(n),R=r.dot?C:E,N=r.dot?S:E,U=r.capture?"":"?:",W={negated:!1,prefix:""},te=r.bash===!0?".*?":P;r.capture&&(te=`(${te})`);let ie=pe=>pe.noglobstar===!0?te:`(${U}(?:(?!${I}${pe.dot?h:c}).)*?)`,Ae=pe=>{switch(pe){case"*":return`${R}${p}${te}`;case".*":return`${c}${p}${te}`;case"*.*":return`${R}${te}${c}${p}${te}`;case"*/*":return`${R}${te}${f}${p}${N}${te}`;case"**":return R+ie(r);case"**/*":return`(?:${R}${ie(r)}${f})?${N}${p}${te}`;case"**/*.*":return`(?:${R}${ie(r)}${f})?${N}${te}${c}${p}${te}`;case"**/.*":return`(?:${R}${ie(r)}${f})?${c}${p}${te}`;default:{let Be=/^(.*?)\.(\w+)$/.exec(pe);if(!Be)return;let Ce=Ae(Be[1]);return Ce?Ce+c+Be[2]:void 0}}},ce=Gl.removePrefix(t,W),me=Ae(ce);return me&&r.strictSlashes!==!0&&(me+=`${f}?`),me};Iae.exports=E4});var Bae=L((AYt,wae)=>{"use strict";var Ort=Ie("path"),Lrt=yae(),I4=Cae(),C4=IB(),Mrt=EB(),_rt=t=>t&&typeof t=="object"&&!Array.isArray(t),$i=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(S=>$i(S,e,r));return S=>{for(let P of E){let I=P(S);if(I)return I}return!1}}let s=_rt(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let a=e||{},n=C4.isWindows(e),c=s?$i.compileRe(t,e):$i.makeRe(t,e,!1,!0),f=c.state;delete c.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=$i(a.ignore,E,r)}let h=(E,C=!1)=>{let{isMatch:S,match:P,output:I}=$i.test(E,c,e,{glob:t,posix:n}),R={glob:t,state:f,regex:c,posix:n,input:E,output:I,match:P,isMatch:S};return typeof a.onResult=="function"&&a.onResult(R),S===!1?(R.isMatch=!1,C?R:!1):p(E)?(typeof a.onIgnore=="function"&&a.onIgnore(R),R.isMatch=!1,C?R:!1):(typeof a.onMatch=="function"&&a.onMatch(R),C?R:!0)};return r&&(h.state=f),h};$i.test=(t,e,r,{glob:s,posix:a}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},c=n.format||(a?C4.toPosixSlashes:null),f=t===s,p=f&&c?c(t):t;return f===!1&&(p=c?c(t):t,f=p===s),(f===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?f=$i.matchBase(t,e,r,a):f=e.exec(p)),{isMatch:!!f,match:f,output:p}};$i.matchBase=(t,e,r,s=C4.isWindows(r))=>(e instanceof RegExp?e:$i.makeRe(e,r)).test(Ort.basename(t));$i.isMatch=(t,e,r)=>$i(e,r)(t);$i.parse=(t,e)=>Array.isArray(t)?t.map(r=>$i.parse(r,e)):I4(t,{...e,fastpaths:!1});$i.scan=(t,e)=>Lrt(t,e);$i.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?"":"^",c=a.contains?"":"$",f=`${n}(?:${t.output})${c}`;t&&t.negated===!0&&(f=`^(?!${f}).*$`);let p=$i.toRegex(f,e);return s===!0&&(p.state=t),p};$i.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a.output=I4.fastpaths(t,e)),a.output||(a=I4(t,e)),$i.compileRe(a,e,r,s)};$i.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};$i.constants=Mrt;wae.exports=$i});var Sae=L((pYt,vae)=>{"use strict";vae.exports=Bae()});var Sa=L((hYt,xae)=>{"use strict";var bae=Ie("util"),Pae=sae(),Jf=Sae(),w4=IB(),Dae=t=>t===""||t==="./",Qi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,a=new Set,n=new Set,c=0,f=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E!s.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\/g,"")):e}return h};Qi.match=Qi;Qi.matcher=(t,e)=>Jf(t,e);Qi.isMatch=(t,e,r)=>Jf(e,r)(t);Qi.any=Qi.isMatch;Qi.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,a=[],n=f=>{r.onResult&&r.onResult(f),a.push(f.output)},c=new Set(Qi(t,e,{...r,onResult:n}));for(let f of a)c.has(f)||s.add(f);return[...s]};Qi.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bae.inspect(t)}"`);if(Array.isArray(e))return e.some(s=>Qi.contains(t,s,r));if(typeof e=="string"){if(Dae(t)||Dae(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return Qi.isMatch(t,e,{...r,contains:!0})};Qi.matchKeys=(t,e,r)=>{if(!w4.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=Qi(Object.keys(t),e,r),a={};for(let n of s)a[n]=t[n];return a};Qi.some=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(s.some(c=>n(c)))return!0}return!1};Qi.every=(t,e,r)=>{let s=[].concat(t);for(let a of[].concat(e)){let n=Jf(String(a),r);if(!s.every(c=>n(c)))return!1}return!0};Qi.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bae.inspect(t)}"`);return[].concat(e).every(s=>Jf(s,r)(t))};Qi.capture=(t,e,r)=>{let s=w4.isWindows(r),n=Jf.makeRe(String(t),{...r,capture:!0}).exec(s?w4.toPosixSlashes(e):e);if(n)return n.slice(1).map(c=>c===void 0?"":c)};Qi.makeRe=(...t)=>Jf.makeRe(...t);Qi.scan=(...t)=>Jf.scan(...t);Qi.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let a of Pae(String(s),e))r.push(Jf.parse(a,e));return r};Qi.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:Pae(t,e)};Qi.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return Qi.braces(t,{...e,expand:!0})};xae.exports=Qi});var Qae=L((gYt,kae)=>{"use strict";kae.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var vk=L((dYt,Tae)=>{"use strict";var Urt=Qae();Tae.exports=t=>typeof t=="string"?t.replace(Urt(),""):t});var Fae=L((mYt,Rae)=>{function Hrt(){this.__data__=[],this.size=0}Rae.exports=Hrt});var RE=L((yYt,Nae)=>{function jrt(t,e){return t===e||t!==t&&e!==e}Nae.exports=jrt});var wB=L((EYt,Oae)=>{var qrt=RE();function Grt(t,e){for(var r=t.length;r--;)if(qrt(t[r][0],e))return r;return-1}Oae.exports=Grt});var Mae=L((IYt,Lae)=>{var Wrt=wB(),Yrt=Array.prototype,Vrt=Yrt.splice;function Krt(t){var e=this.__data__,r=Wrt(e,t);if(r<0)return!1;var s=e.length-1;return r==s?e.pop():Vrt.call(e,r,1),--this.size,!0}Lae.exports=Krt});var Uae=L((CYt,_ae)=>{var Jrt=wB();function zrt(t){var e=this.__data__,r=Jrt(e,t);return r<0?void 0:e[r][1]}_ae.exports=zrt});var jae=L((wYt,Hae)=>{var Zrt=wB();function Xrt(t){return Zrt(this.__data__,t)>-1}Hae.exports=Xrt});var Gae=L((BYt,qae)=>{var $rt=wB();function ent(t,e){var r=this.__data__,s=$rt(r,t);return s<0?(++this.size,r.push([t,e])):r[s][1]=e,this}qae.exports=ent});var BB=L((vYt,Wae)=>{var tnt=Fae(),rnt=Mae(),nnt=Uae(),int=jae(),snt=Gae();function FE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var ont=BB();function ant(){this.__data__=new ont,this.size=0}Yae.exports=ant});var Jae=L((DYt,Kae)=>{function lnt(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}Kae.exports=lnt});var Zae=L((bYt,zae)=>{function cnt(t){return this.__data__.get(t)}zae.exports=cnt});var $ae=L((PYt,Xae)=>{function unt(t){return this.__data__.has(t)}Xae.exports=unt});var B4=L((xYt,ele)=>{var fnt=typeof global=="object"&&global&&global.Object===Object&&global;ele.exports=fnt});var Pc=L((kYt,tle)=>{var Ant=B4(),pnt=typeof self=="object"&&self&&self.Object===Object&&self,hnt=Ant||pnt||Function("return this")();tle.exports=hnt});var Gd=L((QYt,rle)=>{var gnt=Pc(),dnt=gnt.Symbol;rle.exports=dnt});var ole=L((TYt,sle)=>{var nle=Gd(),ile=Object.prototype,mnt=ile.hasOwnProperty,ynt=ile.toString,vB=nle?nle.toStringTag:void 0;function Ent(t){var e=mnt.call(t,vB),r=t[vB];try{t[vB]=void 0;var s=!0}catch{}var a=ynt.call(t);return s&&(e?t[vB]=r:delete t[vB]),a}sle.exports=Ent});var lle=L((RYt,ale)=>{var Int=Object.prototype,Cnt=Int.toString;function wnt(t){return Cnt.call(t)}ale.exports=wnt});var Wd=L((FYt,fle)=>{var cle=Gd(),Bnt=ole(),vnt=lle(),Snt="[object Null]",Dnt="[object Undefined]",ule=cle?cle.toStringTag:void 0;function bnt(t){return t==null?t===void 0?Dnt:Snt:ule&&ule in Object(t)?Bnt(t):vnt(t)}fle.exports=bnt});var Wl=L((NYt,Ale)=>{function Pnt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Ale.exports=Pnt});var Sk=L((OYt,ple)=>{var xnt=Wd(),knt=Wl(),Qnt="[object AsyncFunction]",Tnt="[object Function]",Rnt="[object GeneratorFunction]",Fnt="[object Proxy]";function Nnt(t){if(!knt(t))return!1;var e=xnt(t);return e==Tnt||e==Rnt||e==Qnt||e==Fnt}ple.exports=Nnt});var gle=L((LYt,hle)=>{var Ont=Pc(),Lnt=Ont["__core-js_shared__"];hle.exports=Lnt});var yle=L((MYt,mle)=>{var v4=gle(),dle=function(){var t=/[^.]+$/.exec(v4&&v4.keys&&v4.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Mnt(t){return!!dle&&dle in t}mle.exports=Mnt});var S4=L((_Yt,Ele)=>{var _nt=Function.prototype,Unt=_nt.toString;function Hnt(t){if(t!=null){try{return Unt.call(t)}catch{}try{return t+""}catch{}}return""}Ele.exports=Hnt});var Cle=L((UYt,Ile)=>{var jnt=Sk(),qnt=yle(),Gnt=Wl(),Wnt=S4(),Ynt=/[\\^$.*+?()[\]{}|]/g,Vnt=/^\[object .+?Constructor\]$/,Knt=Function.prototype,Jnt=Object.prototype,znt=Knt.toString,Znt=Jnt.hasOwnProperty,Xnt=RegExp("^"+znt.call(Znt).replace(Ynt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $nt(t){if(!Gnt(t)||qnt(t))return!1;var e=jnt(t)?Xnt:Vnt;return e.test(Wnt(t))}Ile.exports=$nt});var Ble=L((HYt,wle)=>{function eit(t,e){return t?.[e]}wle.exports=eit});var f0=L((jYt,vle)=>{var tit=Cle(),rit=Ble();function nit(t,e){var r=rit(t,e);return tit(r)?r:void 0}vle.exports=nit});var Dk=L((qYt,Sle)=>{var iit=f0(),sit=Pc(),oit=iit(sit,"Map");Sle.exports=oit});var SB=L((GYt,Dle)=>{var ait=f0(),lit=ait(Object,"create");Dle.exports=lit});var xle=L((WYt,Ple)=>{var ble=SB();function cit(){this.__data__=ble?ble(null):{},this.size=0}Ple.exports=cit});var Qle=L((YYt,kle)=>{function uit(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}kle.exports=uit});var Rle=L((VYt,Tle)=>{var fit=SB(),Ait="__lodash_hash_undefined__",pit=Object.prototype,hit=pit.hasOwnProperty;function git(t){var e=this.__data__;if(fit){var r=e[t];return r===Ait?void 0:r}return hit.call(e,t)?e[t]:void 0}Tle.exports=git});var Nle=L((KYt,Fle)=>{var dit=SB(),mit=Object.prototype,yit=mit.hasOwnProperty;function Eit(t){var e=this.__data__;return dit?e[t]!==void 0:yit.call(e,t)}Fle.exports=Eit});var Lle=L((JYt,Ole)=>{var Iit=SB(),Cit="__lodash_hash_undefined__";function wit(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Iit&&e===void 0?Cit:e,this}Ole.exports=wit});var _le=L((zYt,Mle)=>{var Bit=xle(),vit=Qle(),Sit=Rle(),Dit=Nle(),bit=Lle();function NE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var Ule=_le(),Pit=BB(),xit=Dk();function kit(){this.size=0,this.__data__={hash:new Ule,map:new(xit||Pit),string:new Ule}}Hle.exports=kit});var Gle=L((XYt,qle)=>{function Qit(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}qle.exports=Qit});var DB=L(($Yt,Wle)=>{var Tit=Gle();function Rit(t,e){var r=t.__data__;return Tit(e)?r[typeof e=="string"?"string":"hash"]:r.map}Wle.exports=Rit});var Vle=L((eVt,Yle)=>{var Fit=DB();function Nit(t){var e=Fit(this,t).delete(t);return this.size-=e?1:0,e}Yle.exports=Nit});var Jle=L((tVt,Kle)=>{var Oit=DB();function Lit(t){return Oit(this,t).get(t)}Kle.exports=Lit});var Zle=L((rVt,zle)=>{var Mit=DB();function _it(t){return Mit(this,t).has(t)}zle.exports=_it});var $le=L((nVt,Xle)=>{var Uit=DB();function Hit(t,e){var r=Uit(this,t),s=r.size;return r.set(t,e),this.size+=r.size==s?0:1,this}Xle.exports=Hit});var bk=L((iVt,ece)=>{var jit=jle(),qit=Vle(),Git=Jle(),Wit=Zle(),Yit=$le();function OE(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var Vit=BB(),Kit=Dk(),Jit=bk(),zit=200;function Zit(t,e){var r=this.__data__;if(r instanceof Vit){var s=r.__data__;if(!Kit||s.length{var Xit=BB(),$it=Vae(),est=Jae(),tst=Zae(),rst=$ae(),nst=rce();function LE(t){var e=this.__data__=new Xit(t);this.size=e.size}LE.prototype.clear=$it;LE.prototype.delete=est;LE.prototype.get=tst;LE.prototype.has=rst;LE.prototype.set=nst;nce.exports=LE});var sce=L((aVt,ice)=>{var ist="__lodash_hash_undefined__";function sst(t){return this.__data__.set(t,ist),this}ice.exports=sst});var ace=L((lVt,oce)=>{function ost(t){return this.__data__.has(t)}oce.exports=ost});var cce=L((cVt,lce)=>{var ast=bk(),lst=sce(),cst=ace();function xk(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ast;++e{function ust(t,e){for(var r=-1,s=t==null?0:t.length;++r{function fst(t,e){return t.has(e)}Ace.exports=fst});var D4=L((AVt,hce)=>{var Ast=cce(),pst=fce(),hst=pce(),gst=1,dst=2;function mst(t,e,r,s,a,n){var c=r&gst,f=t.length,p=e.length;if(f!=p&&!(c&&p>f))return!1;var h=n.get(t),E=n.get(e);if(h&&E)return h==e&&E==t;var C=-1,S=!0,P=r&dst?new Ast:void 0;for(n.set(t,e),n.set(e,t);++C{var yst=Pc(),Est=yst.Uint8Array;gce.exports=Est});var mce=L((hVt,dce)=>{function Ist(t){var e=-1,r=Array(t.size);return t.forEach(function(s,a){r[++e]=[a,s]}),r}dce.exports=Ist});var Ece=L((gVt,yce)=>{function Cst(t){var e=-1,r=Array(t.size);return t.forEach(function(s){r[++e]=s}),r}yce.exports=Cst});var vce=L((dVt,Bce)=>{var Ice=Gd(),Cce=b4(),wst=RE(),Bst=D4(),vst=mce(),Sst=Ece(),Dst=1,bst=2,Pst="[object Boolean]",xst="[object Date]",kst="[object Error]",Qst="[object Map]",Tst="[object Number]",Rst="[object RegExp]",Fst="[object Set]",Nst="[object String]",Ost="[object Symbol]",Lst="[object ArrayBuffer]",Mst="[object DataView]",wce=Ice?Ice.prototype:void 0,P4=wce?wce.valueOf:void 0;function _st(t,e,r,s,a,n,c){switch(r){case Mst:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Lst:return!(t.byteLength!=e.byteLength||!n(new Cce(t),new Cce(e)));case Pst:case xst:case Tst:return wst(+t,+e);case kst:return t.name==e.name&&t.message==e.message;case Rst:case Nst:return t==e+"";case Qst:var f=vst;case Fst:var p=s&Dst;if(f||(f=Sst),t.size!=e.size&&!p)return!1;var h=c.get(t);if(h)return h==e;s|=bst,c.set(t,e);var E=Bst(f(t),f(e),s,a,n,c);return c.delete(t),E;case Ost:if(P4)return P4.call(t)==P4.call(e)}return!1}Bce.exports=_st});var kk=L((mVt,Sce)=>{function Ust(t,e){for(var r=-1,s=e.length,a=t.length;++r{var Hst=Array.isArray;Dce.exports=Hst});var x4=L((EVt,bce)=>{var jst=kk(),qst=xc();function Gst(t,e,r){var s=e(t);return qst(t)?s:jst(s,r(t))}bce.exports=Gst});var xce=L((IVt,Pce)=>{function Wst(t,e){for(var r=-1,s=t==null?0:t.length,a=0,n=[];++r{function Yst(){return[]}kce.exports=Yst});var Qk=L((wVt,Tce)=>{var Vst=xce(),Kst=k4(),Jst=Object.prototype,zst=Jst.propertyIsEnumerable,Qce=Object.getOwnPropertySymbols,Zst=Qce?function(t){return t==null?[]:(t=Object(t),Vst(Qce(t),function(e){return zst.call(t,e)}))}:Kst;Tce.exports=Zst});var Fce=L((BVt,Rce)=>{function Xst(t,e){for(var r=-1,s=Array(t);++r{function $st(t){return t!=null&&typeof t=="object"}Nce.exports=$st});var Lce=L((SVt,Oce)=>{var eot=Wd(),tot=zf(),rot="[object Arguments]";function not(t){return tot(t)&&eot(t)==rot}Oce.exports=not});var bB=L((DVt,Uce)=>{var Mce=Lce(),iot=zf(),_ce=Object.prototype,sot=_ce.hasOwnProperty,oot=_ce.propertyIsEnumerable,aot=Mce(function(){return arguments}())?Mce:function(t){return iot(t)&&sot.call(t,"callee")&&!oot.call(t,"callee")};Uce.exports=aot});var jce=L((bVt,Hce)=>{function lot(){return!1}Hce.exports=lot});var xB=L((PB,ME)=>{var cot=Pc(),uot=jce(),Wce=typeof PB=="object"&&PB&&!PB.nodeType&&PB,qce=Wce&&typeof ME=="object"&&ME&&!ME.nodeType&&ME,fot=qce&&qce.exports===Wce,Gce=fot?cot.Buffer:void 0,Aot=Gce?Gce.isBuffer:void 0,pot=Aot||uot;ME.exports=pot});var kB=L((PVt,Yce)=>{var hot=9007199254740991,got=/^(?:0|[1-9]\d*)$/;function dot(t,e){var r=typeof t;return e=e??hot,!!e&&(r=="number"||r!="symbol"&&got.test(t))&&t>-1&&t%1==0&&t{var mot=9007199254740991;function yot(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mot}Vce.exports=yot});var Jce=L((kVt,Kce)=>{var Eot=Wd(),Iot=Tk(),Cot=zf(),wot="[object Arguments]",Bot="[object Array]",vot="[object Boolean]",Sot="[object Date]",Dot="[object Error]",bot="[object Function]",Pot="[object Map]",xot="[object Number]",kot="[object Object]",Qot="[object RegExp]",Tot="[object Set]",Rot="[object String]",Fot="[object WeakMap]",Not="[object ArrayBuffer]",Oot="[object DataView]",Lot="[object Float32Array]",Mot="[object Float64Array]",_ot="[object Int8Array]",Uot="[object Int16Array]",Hot="[object Int32Array]",jot="[object Uint8Array]",qot="[object Uint8ClampedArray]",Got="[object Uint16Array]",Wot="[object Uint32Array]",Di={};Di[Lot]=Di[Mot]=Di[_ot]=Di[Uot]=Di[Hot]=Di[jot]=Di[qot]=Di[Got]=Di[Wot]=!0;Di[wot]=Di[Bot]=Di[Not]=Di[vot]=Di[Oot]=Di[Sot]=Di[Dot]=Di[bot]=Di[Pot]=Di[xot]=Di[kot]=Di[Qot]=Di[Tot]=Di[Rot]=Di[Fot]=!1;function Yot(t){return Cot(t)&&Iot(t.length)&&!!Di[Eot(t)]}Kce.exports=Yot});var Rk=L((QVt,zce)=>{function Vot(t){return function(e){return t(e)}}zce.exports=Vot});var Fk=L((QB,_E)=>{var Kot=B4(),Zce=typeof QB=="object"&&QB&&!QB.nodeType&&QB,TB=Zce&&typeof _E=="object"&&_E&&!_E.nodeType&&_E,Jot=TB&&TB.exports===Zce,Q4=Jot&&Kot.process,zot=function(){try{var t=TB&&TB.require&&TB.require("util").types;return t||Q4&&Q4.binding&&Q4.binding("util")}catch{}}();_E.exports=zot});var Nk=L((TVt,eue)=>{var Zot=Jce(),Xot=Rk(),Xce=Fk(),$ce=Xce&&Xce.isTypedArray,$ot=$ce?Xot($ce):Zot;eue.exports=$ot});var T4=L((RVt,tue)=>{var eat=Fce(),tat=bB(),rat=xc(),nat=xB(),iat=kB(),sat=Nk(),oat=Object.prototype,aat=oat.hasOwnProperty;function lat(t,e){var r=rat(t),s=!r&&tat(t),a=!r&&!s&&nat(t),n=!r&&!s&&!a&&sat(t),c=r||s||a||n,f=c?eat(t.length,String):[],p=f.length;for(var h in t)(e||aat.call(t,h))&&!(c&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||iat(h,p)))&&f.push(h);return f}tue.exports=lat});var Ok=L((FVt,rue)=>{var cat=Object.prototype;function uat(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||cat;return t===r}rue.exports=uat});var R4=L((NVt,nue)=>{function fat(t,e){return function(r){return t(e(r))}}nue.exports=fat});var sue=L((OVt,iue)=>{var Aat=R4(),pat=Aat(Object.keys,Object);iue.exports=pat});var aue=L((LVt,oue)=>{var hat=Ok(),gat=sue(),dat=Object.prototype,mat=dat.hasOwnProperty;function yat(t){if(!hat(t))return gat(t);var e=[];for(var r in Object(t))mat.call(t,r)&&r!="constructor"&&e.push(r);return e}oue.exports=yat});var RB=L((MVt,lue)=>{var Eat=Sk(),Iat=Tk();function Cat(t){return t!=null&&Iat(t.length)&&!Eat(t)}lue.exports=Cat});var Lk=L((_Vt,cue)=>{var wat=T4(),Bat=aue(),vat=RB();function Sat(t){return vat(t)?wat(t):Bat(t)}cue.exports=Sat});var F4=L((UVt,uue)=>{var Dat=x4(),bat=Qk(),Pat=Lk();function xat(t){return Dat(t,Pat,bat)}uue.exports=xat});var pue=L((HVt,Aue)=>{var fue=F4(),kat=1,Qat=Object.prototype,Tat=Qat.hasOwnProperty;function Rat(t,e,r,s,a,n){var c=r&kat,f=fue(t),p=f.length,h=fue(e),E=h.length;if(p!=E&&!c)return!1;for(var C=p;C--;){var S=f[C];if(!(c?S in e:Tat.call(e,S)))return!1}var P=n.get(t),I=n.get(e);if(P&&I)return P==e&&I==t;var R=!0;n.set(t,e),n.set(e,t);for(var N=c;++C{var Fat=f0(),Nat=Pc(),Oat=Fat(Nat,"DataView");hue.exports=Oat});var mue=L((qVt,due)=>{var Lat=f0(),Mat=Pc(),_at=Lat(Mat,"Promise");due.exports=_at});var Eue=L((GVt,yue)=>{var Uat=f0(),Hat=Pc(),jat=Uat(Hat,"Set");yue.exports=jat});var Cue=L((WVt,Iue)=>{var qat=f0(),Gat=Pc(),Wat=qat(Gat,"WeakMap");Iue.exports=Wat});var FB=L((YVt,Pue)=>{var N4=gue(),O4=Dk(),L4=mue(),M4=Eue(),_4=Cue(),bue=Wd(),UE=S4(),wue="[object Map]",Yat="[object Object]",Bue="[object Promise]",vue="[object Set]",Sue="[object WeakMap]",Due="[object DataView]",Vat=UE(N4),Kat=UE(O4),Jat=UE(L4),zat=UE(M4),Zat=UE(_4),Yd=bue;(N4&&Yd(new N4(new ArrayBuffer(1)))!=Due||O4&&Yd(new O4)!=wue||L4&&Yd(L4.resolve())!=Bue||M4&&Yd(new M4)!=vue||_4&&Yd(new _4)!=Sue)&&(Yd=function(t){var e=bue(t),r=e==Yat?t.constructor:void 0,s=r?UE(r):"";if(s)switch(s){case Vat:return Due;case Kat:return wue;case Jat:return Bue;case zat:return vue;case Zat:return Sue}return e});Pue.exports=Yd});var Oue=L((VVt,Nue)=>{var U4=Pk(),Xat=D4(),$at=vce(),elt=pue(),xue=FB(),kue=xc(),Que=xB(),tlt=Nk(),rlt=1,Tue="[object Arguments]",Rue="[object Array]",Mk="[object Object]",nlt=Object.prototype,Fue=nlt.hasOwnProperty;function ilt(t,e,r,s,a,n){var c=kue(t),f=kue(e),p=c?Rue:xue(t),h=f?Rue:xue(e);p=p==Tue?Mk:p,h=h==Tue?Mk:h;var E=p==Mk,C=h==Mk,S=p==h;if(S&&Que(t)){if(!Que(e))return!1;c=!0,E=!1}if(S&&!E)return n||(n=new U4),c||tlt(t)?Xat(t,e,r,s,a,n):$at(t,e,p,r,s,a,n);if(!(r&rlt)){var P=E&&Fue.call(t,"__wrapped__"),I=C&&Fue.call(e,"__wrapped__");if(P||I){var R=P?t.value():t,N=I?e.value():e;return n||(n=new U4),a(R,N,r,s,n)}}return S?(n||(n=new U4),elt(t,e,r,s,a,n)):!1}Nue.exports=ilt});var Uue=L((KVt,_ue)=>{var slt=Oue(),Lue=zf();function Mue(t,e,r,s,a){return t===e?!0:t==null||e==null||!Lue(t)&&!Lue(e)?t!==t&&e!==e:slt(t,e,r,s,Mue,a)}_ue.exports=Mue});var jue=L((JVt,Hue)=>{var olt=Uue();function alt(t,e){return olt(t,e)}Hue.exports=alt});var H4=L((zVt,que)=>{var llt=f0(),clt=function(){try{var t=llt(Object,"defineProperty");return t({},"",{}),t}catch{}}();que.exports=clt});var _k=L((ZVt,Wue)=>{var Gue=H4();function ult(t,e,r){e=="__proto__"&&Gue?Gue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Wue.exports=ult});var j4=L((XVt,Yue)=>{var flt=_k(),Alt=RE();function plt(t,e,r){(r!==void 0&&!Alt(t[e],r)||r===void 0&&!(e in t))&&flt(t,e,r)}Yue.exports=plt});var Kue=L(($Vt,Vue)=>{function hlt(t){return function(e,r,s){for(var a=-1,n=Object(e),c=s(e),f=c.length;f--;){var p=c[t?f:++a];if(r(n[p],p,n)===!1)break}return e}}Vue.exports=hlt});var zue=L((e7t,Jue)=>{var glt=Kue(),dlt=glt();Jue.exports=dlt});var q4=L((NB,HE)=>{var mlt=Pc(),efe=typeof NB=="object"&&NB&&!NB.nodeType&&NB,Zue=efe&&typeof HE=="object"&&HE&&!HE.nodeType&&HE,ylt=Zue&&Zue.exports===efe,Xue=ylt?mlt.Buffer:void 0,$ue=Xue?Xue.allocUnsafe:void 0;function Elt(t,e){if(e)return t.slice();var r=t.length,s=$ue?$ue(r):new t.constructor(r);return t.copy(s),s}HE.exports=Elt});var Uk=L((t7t,rfe)=>{var tfe=b4();function Ilt(t){var e=new t.constructor(t.byteLength);return new tfe(e).set(new tfe(t)),e}rfe.exports=Ilt});var G4=L((r7t,nfe)=>{var Clt=Uk();function wlt(t,e){var r=e?Clt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}nfe.exports=wlt});var Hk=L((n7t,ife)=>{function Blt(t,e){var r=-1,s=t.length;for(e||(e=Array(s));++r{var vlt=Wl(),sfe=Object.create,Slt=function(){function t(){}return function(e){if(!vlt(e))return{};if(sfe)return sfe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();ofe.exports=Slt});var jk=L((s7t,lfe)=>{var Dlt=R4(),blt=Dlt(Object.getPrototypeOf,Object);lfe.exports=blt});var W4=L((o7t,cfe)=>{var Plt=afe(),xlt=jk(),klt=Ok();function Qlt(t){return typeof t.constructor=="function"&&!klt(t)?Plt(xlt(t)):{}}cfe.exports=Qlt});var ffe=L((a7t,ufe)=>{var Tlt=RB(),Rlt=zf();function Flt(t){return Rlt(t)&&Tlt(t)}ufe.exports=Flt});var Y4=L((l7t,pfe)=>{var Nlt=Wd(),Olt=jk(),Llt=zf(),Mlt="[object Object]",_lt=Function.prototype,Ult=Object.prototype,Afe=_lt.toString,Hlt=Ult.hasOwnProperty,jlt=Afe.call(Object);function qlt(t){if(!Llt(t)||Nlt(t)!=Mlt)return!1;var e=Olt(t);if(e===null)return!0;var r=Hlt.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Afe.call(r)==jlt}pfe.exports=qlt});var V4=L((c7t,hfe)=>{function Glt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}hfe.exports=Glt});var qk=L((u7t,gfe)=>{var Wlt=_k(),Ylt=RE(),Vlt=Object.prototype,Klt=Vlt.hasOwnProperty;function Jlt(t,e,r){var s=t[e];(!(Klt.call(t,e)&&Ylt(s,r))||r===void 0&&!(e in t))&&Wlt(t,e,r)}gfe.exports=Jlt});var Vd=L((f7t,dfe)=>{var zlt=qk(),Zlt=_k();function Xlt(t,e,r,s){var a=!r;r||(r={});for(var n=-1,c=e.length;++n{function $lt(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}mfe.exports=$lt});var Ife=L((p7t,Efe)=>{var ect=Wl(),tct=Ok(),rct=yfe(),nct=Object.prototype,ict=nct.hasOwnProperty;function sct(t){if(!ect(t))return rct(t);var e=tct(t),r=[];for(var s in t)s=="constructor"&&(e||!ict.call(t,s))||r.push(s);return r}Efe.exports=sct});var jE=L((h7t,Cfe)=>{var oct=T4(),act=Ife(),lct=RB();function cct(t){return lct(t)?oct(t,!0):act(t)}Cfe.exports=cct});var Bfe=L((g7t,wfe)=>{var uct=Vd(),fct=jE();function Act(t){return uct(t,fct(t))}wfe.exports=Act});var xfe=L((d7t,Pfe)=>{var vfe=j4(),pct=q4(),hct=G4(),gct=Hk(),dct=W4(),Sfe=bB(),Dfe=xc(),mct=ffe(),yct=xB(),Ect=Sk(),Ict=Wl(),Cct=Y4(),wct=Nk(),bfe=V4(),Bct=Bfe();function vct(t,e,r,s,a,n,c){var f=bfe(t,r),p=bfe(e,r),h=c.get(p);if(h){vfe(t,r,h);return}var E=n?n(f,p,r+"",t,e,c):void 0,C=E===void 0;if(C){var S=Dfe(p),P=!S&&yct(p),I=!S&&!P&&wct(p);E=p,S||P||I?Dfe(f)?E=f:mct(f)?E=gct(f):P?(C=!1,E=pct(p,!0)):I?(C=!1,E=hct(p,!0)):E=[]:Cct(p)||Sfe(p)?(E=f,Sfe(f)?E=Bct(f):(!Ict(f)||Ect(f))&&(E=dct(p))):C=!1}C&&(c.set(p,E),a(E,p,s,n,c),c.delete(p)),vfe(t,r,E)}Pfe.exports=vct});var Tfe=L((m7t,Qfe)=>{var Sct=Pk(),Dct=j4(),bct=zue(),Pct=xfe(),xct=Wl(),kct=jE(),Qct=V4();function kfe(t,e,r,s,a){t!==e&&bct(e,function(n,c){if(a||(a=new Sct),xct(n))Pct(t,e,c,r,kfe,s,a);else{var f=s?s(Qct(t,c),n,c+"",t,e,a):void 0;f===void 0&&(f=n),Dct(t,c,f)}},kct)}Qfe.exports=kfe});var K4=L((y7t,Rfe)=>{function Tct(t){return t}Rfe.exports=Tct});var Nfe=L((E7t,Ffe)=>{function Rct(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Ffe.exports=Rct});var J4=L((I7t,Lfe)=>{var Fct=Nfe(),Ofe=Math.max;function Nct(t,e,r){return e=Ofe(e===void 0?t.length-1:e,0),function(){for(var s=arguments,a=-1,n=Ofe(s.length-e,0),c=Array(n);++a{function Oct(t){return function(){return t}}Mfe.exports=Oct});var jfe=L((w7t,Hfe)=>{var Lct=_fe(),Ufe=H4(),Mct=K4(),_ct=Ufe?function(t,e){return Ufe(t,"toString",{configurable:!0,enumerable:!1,value:Lct(e),writable:!0})}:Mct;Hfe.exports=_ct});var Gfe=L((B7t,qfe)=>{var Uct=800,Hct=16,jct=Date.now;function qct(t){var e=0,r=0;return function(){var s=jct(),a=Hct-(s-r);if(r=s,a>0){if(++e>=Uct)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}qfe.exports=qct});var z4=L((v7t,Wfe)=>{var Gct=jfe(),Wct=Gfe(),Yct=Wct(Gct);Wfe.exports=Yct});var Vfe=L((S7t,Yfe)=>{var Vct=K4(),Kct=J4(),Jct=z4();function zct(t,e){return Jct(Kct(t,e,Vct),t+"")}Yfe.exports=zct});var Jfe=L((D7t,Kfe)=>{var Zct=RE(),Xct=RB(),$ct=kB(),eut=Wl();function tut(t,e,r){if(!eut(r))return!1;var s=typeof e;return(s=="number"?Xct(r)&&$ct(e,r.length):s=="string"&&e in r)?Zct(r[e],t):!1}Kfe.exports=tut});var Zfe=L((b7t,zfe)=>{var rut=Vfe(),nut=Jfe();function iut(t){return rut(function(e,r){var s=-1,a=r.length,n=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,c&&nut(r[0],r[1],c)&&(n=a<3?void 0:n,a=1),e=Object(e);++s{var sut=Tfe(),out=Zfe(),aut=out(function(t,e,r,s){sut(t,e,r,s)});Xfe.exports=aut});var je={};Vt(je,{AsyncActions:()=>$4,BufferStream:()=>X4,CachingStrategy:()=>fAe,DefaultStream:()=>e3,allSettledSafe:()=>Uu,assertNever:()=>r3,bufferStream:()=>GE,buildIgnorePattern:()=>hut,convertMapsToIndexableObjects:()=>Wk,dynamicRequire:()=>kp,escapeRegExp:()=>cut,getArrayWithDefault:()=>LB,getFactoryWithDefault:()=>Vl,getMapWithDefault:()=>n3,getSetWithDefault:()=>xp,groupBy:()=>mut,isIndexableObject:()=>Z4,isPathLike:()=>gut,isTaggedYarnVersion:()=>lut,makeDeferred:()=>lAe,mapAndFilter:()=>Yl,mapAndFind:()=>A0,mergeIntoTarget:()=>pAe,overrideType:()=>uut,parseBoolean:()=>MB,parseInt:()=>WE,parseOptionalBoolean:()=>AAe,plural:()=>Gk,prettifyAsyncErrors:()=>qE,prettifySyncErrors:()=>i3,releaseAfterUseAsync:()=>Aut,replaceEnvVariables:()=>Yk,sortMap:()=>Ys,toMerged:()=>dut,tryParseOptionalBoolean:()=>s3,validateEnum:()=>fut});function lut(t){return!!(sAe.default.valid(t)&&t.match(/^[^-]+(-rc\.[0-9]+)?$/))}function Gk(t,{one:e,more:r,zero:s=r}){return t===0?s:t===1?e:r}function cut(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uut(t){}function r3(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function fut(t,e){let r=Object.values(t);if(!r.includes(e))throw new nt(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(s=>JSON.stringify(s)).join(", ")})`);return e}function Yl(t,e){let r=[];for(let s of t){let a=e(s);a!==oAe&&r.push(a)}return r}function A0(t,e){for(let r of t){let s=e(r);if(s!==aAe)return s}}function Z4(t){return typeof t=="object"&&t!==null}async function Uu(t){let e=await Promise.allSettled(t),r=[];for(let s of e){if(s.status==="rejected")throw s.reason;r.push(s.value)}return r}function Wk(t){if(t instanceof Map&&(t=Object.fromEntries(t)),Z4(t))for(let e of Object.keys(t)){let r=t[e];Z4(r)&&(t[e]=Wk(r))}return t}function Vl(t,e,r){let s=t.get(e);return typeof s>"u"&&t.set(e,s=r()),s}function LB(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=[]),r}function xp(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Set),r}function n3(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Map),r}async function Aut(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function qE(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function i3(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function GE(t){return await new Promise((e,r)=>{let s=[];t.on("error",a=>{r(a)}),t.on("data",a=>{s.push(a)}),t.on("end",()=>{e(Buffer.concat(s))})})}function lAe(){let t,e;return{promise:new Promise((s,a)=>{t=s,e=a}),resolve:t,reject:e}}function cAe(t){return OB(ue.fromPortablePath(t))}function uAe(path){let physicalPath=ue.fromPortablePath(path),currentCacheEntry=OB.cache[physicalPath];delete OB.cache[physicalPath];let result;try{result=cAe(physicalPath);let freshCacheEntry=OB.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{OB.cache[physicalPath]=currentCacheEntry}return result}function put(t){let e=eAe.get(t),r=le.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let s=uAe(t);return eAe.set(t,{mtime:r.mtimeMs,instance:s}),s}function kp(t,{cachingStrategy:e=2}={}){switch(e){case 0:return uAe(t);case 1:return put(t);case 2:return cAe(t);default:throw new Error("Unsupported caching strategy")}}function Ys(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function hut(t){return t.length===0?null:t.map(e=>`(${nAe.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function Yk(t,{env:e}){let r=/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g;return t.replace(r,(...s)=>{let{variableName:a,colon:n,fallback:c}=s[s.length-1],f=Object.hasOwn(e,a),p=e[a];if(p||f&&!n)return p;if(c!=null)return c;throw new nt(`Environment variable not found (${a})`)})}function MB(t){switch(t){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${t}" as a boolean`)}}function AAe(t){return typeof t>"u"?t:MB(t)}function s3(t){try{return AAe(t)}catch{return null}}function gut(t){return!!(ue.isAbsolute(t)||t.match(/^(\.{1,2}|~)\//))}function pAe(t,...e){let r=c=>({value:c}),s=r(t),a=e.map(c=>r(c)),{value:n}=(0,rAe.default)(s,...a,(c,f)=>{if(Array.isArray(c)&&Array.isArray(f)){for(let p of f)c.find(h=>(0,tAe.default)(h,p))||c.push(p);return c}});return n}function dut(...t){return pAe({},...t)}function mut(t,e){let r=Object.create(null);for(let s of t){let a=s[e];r[a]??=[],r[a].push(s)}return r}function WE(t){return typeof t=="string"?Number.parseInt(t,10):t}var tAe,rAe,nAe,iAe,sAe,t3,oAe,aAe,X4,$4,e3,OB,eAe,fAe,kc=Ct(()=>{bt();Wt();tAe=et(jue()),rAe=et($fe()),nAe=et(Sa()),iAe=et(Od()),sAe=et(Ai()),t3=Ie("stream");oAe=Symbol();Yl.skip=oAe;aAe=Symbol();A0.skip=aAe;X4=class extends t3.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,s,a){if(s!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};$4=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,iAe.default)(e)}set(e,r){let s=this.deferred.get(e);typeof s>"u"&&this.deferred.set(e,s=lAe());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&s.resolve()},n=>{this.promises.get(e)===a&&s.reject(n)}),s.promise}reduce(e,r){let s=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(s))}async wait(){await Promise.all(this.promises.values())}},e3=class extends t3.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,s,a){if(s!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},OB=eval("require");eAe=new Map;fAe=(s=>(s[s.NoCache=0]="NoCache",s[s.FsTime=1]="FsTime",s[s.Node=2]="Node",s))(fAe||{})});var YE,o3,a3,hAe=Ct(()=>{YE=(r=>(r.HARD="HARD",r.SOFT="SOFT",r))(YE||{}),o3=(s=>(s.Dependency="Dependency",s.PeerDependency="PeerDependency",s.PeerDependencyMeta="PeerDependencyMeta",s))(o3||{}),a3=(s=>(s.Inactive="inactive",s.Redundant="redundant",s.Active="active",s))(a3||{})});var he={};Vt(he,{LogLevel:()=>Xk,Style:()=>Jk,Type:()=>pt,addLogFilterSupport:()=>HB,applyColor:()=>ri,applyHyperlink:()=>KE,applyStyle:()=>Kd,json:()=>Jd,jsonOrPretty:()=>Iut,mark:()=>A3,pretty:()=>Ut,prettyField:()=>Zf,prettyList:()=>f3,prettyTruncatedLocatorList:()=>Zk,stripAnsi:()=>VE.default,supportsColor:()=>zk,supportsHyperlinks:()=>u3,tuple:()=>Hu});function gAe(t){let e=["KiB","MiB","GiB","TiB"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let s=1024**r;return`${Math.floor(t*100/s)/100} ${e[r-1]}`}function Vk(t,e){if(Array.isArray(e))return e.length===0?ri(t,"[]",pt.CODE):ri(t,"[ ",pt.CODE)+e.map(r=>Vk(t,r)).join(", ")+ri(t," ]",pt.CODE);if(typeof e=="string")return ri(t,JSON.stringify(e),pt.STRING);if(typeof e=="number")return ri(t,JSON.stringify(e),pt.NUMBER);if(typeof e=="boolean")return ri(t,JSON.stringify(e),pt.BOOLEAN);if(e===null)return ri(t,"null",pt.NULL);if(typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){let r=Object.entries(e);return r.length===0?ri(t,"{}",pt.CODE):ri(t,"{ ",pt.CODE)+r.map(([s,a])=>`${Vk(t,s)}: ${Vk(t,a)}`).join(", ")+ri(t," }",pt.CODE)}if(typeof e>"u")return ri(t,"undefined",pt.NULL);throw new Error("Assertion failed: The value doesn't seem to be a valid JSON object")}function Hu(t,e){return[e,t]}function Kd(t,e,r){return t.get("enableColors")&&r&2&&(e=UB.default.bold(e)),e}function ri(t,e,r){if(!t.get("enableColors"))return e;let s=yut.get(r);if(s===null)return e;let a=typeof s>"u"?r:c3.level>=3?s[0]:s[1],n=typeof a=="number"?l3.ansi256(a):a.startsWith("#")?l3.hex(a):l3[a];if(typeof n!="function")throw new Error(`Invalid format type ${a}`);return n(e)}function KE(t,e,r){return t.get("enableHyperlinks")?Eut?`\x1B]8;;${r}\x1B\\${e}\x1B]8;;\x1B\\`:`\x1B]8;;${r}\x07${e}\x1B]8;;\x07`:e}function Ut(t,e,r){if(e===null)return ri(t,"null",pt.NULL);if(Object.hasOwn(Kk,r))return Kk[r].pretty(t,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return ri(t,e,r)}function f3(t,e,r,{separator:s=", "}={}){return[...e].map(a=>Ut(t,a,r)).join(s)}function Jd(t,e){if(t===null)return null;if(Object.hasOwn(Kk,e))return Kk[e].json(t);if(typeof t!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function Iut(t,e,[r,s]){return t?Jd(r,s):Ut(e,r,s)}function A3(t){return{Check:ri(t,"\u2713","green"),Cross:ri(t,"\u2718","red"),Question:ri(t,"?","cyan")}}function Zf(t,{label:e,value:[r,s]}){return`${Ut(t,e,pt.CODE)}: ${Ut(t,r,s)}`}function Zk(t,e,r){let s=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${Yr(t,h)}, `,C=p3(h).length+2;if(s.length>0&&nh).join("").slice(0,-2);let c="X".repeat(a.length.toString().length),f=`and ${c} more.`,p=a.length;for(;s.length>1&&nh).join(""),f.replace(c,Ut(t,p,pt.NUMBER))].join("")}function HB(t,{configuration:e}){let r=e.get("logFilters"),s=new Map,a=new Map,n=[];for(let C of r){let S=C.get("level");if(typeof S>"u")continue;let P=C.get("code");typeof P<"u"&&s.set(P,S);let I=C.get("text");typeof I<"u"&&a.set(I,S);let R=C.get("pattern");typeof R<"u"&&n.push([dAe.default.matcher(R,{contains:!0}),S])}n.reverse();let c=(C,S,P)=>{if(C===null||C===0)return P;let I=a.size>0||n.length>0?(0,VE.default)(S):S;if(a.size>0){let R=a.get(I);if(typeof R<"u")return R??P}if(n.length>0){for(let[R,N]of n)if(R(I))return N??P}if(s.size>0){let R=s.get(Vf(C));if(typeof R<"u")return R??P}return P},f=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(C,S,P,I){switch(c(S,P,I)){case"info":f.call(C,S,P);break;case"warning":p.call(C,S??0,P);break;case"error":h.call(C,S??0,P);break}};t.reportInfo=function(...C){return E(this,...C,"info")},t.reportWarning=function(...C){return E(this,...C,"warning")},t.reportError=function(...C){return E(this,...C,"error")}}var UB,_B,dAe,VE,pt,Jk,c3,zk,u3,l3,yut,Wo,Kk,Eut,Xk,Qc=Ct(()=>{bt();UB=et(kE()),_B=et(Rd());Wt();dAe=et(Sa()),VE=et(vk());Zx();Yo();pt={NO_HINT:"NO_HINT",ID:"ID",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",STRING:"STRING",BOOLEAN:"BOOLEAN",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",INSPECT:"INSPECT",DURATION:"DURATION",SIZE:"SIZE",SIZE_DIFF:"SIZE_DIFF",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN",MARKDOWN_INLINE:"MARKDOWN_INLINE"},Jk=(e=>(e[e.BOLD=2]="BOLD",e))(Jk||{}),c3=_B.default.GITHUB_ACTIONS?{level:2}:UB.default.supportsColor?{level:UB.default.supportsColor.level}:{level:0},zk=c3.level!==0,u3=zk&&!_B.default.GITHUB_ACTIONS&&!_B.default.CIRCLE&&!_B.default.GITLAB,l3=new UB.default.Instance(c3),yut=new Map([[pt.NO_HINT,null],[pt.NULL,["#a853b5",129]],[pt.SCOPE,["#d75f00",166]],[pt.NAME,["#d7875f",173]],[pt.RANGE,["#00afaf",37]],[pt.REFERENCE,["#87afff",111]],[pt.NUMBER,["#ffd700",220]],[pt.STRING,["#b4bd68",32]],[pt.BOOLEAN,["#faa023",209]],[pt.PATH,["#d75fd7",170]],[pt.URL,["#d75fd7",170]],[pt.ADDED,["#5faf00",70]],[pt.REMOVED,["#ff3131",160]],[pt.CODE,["#87afff",111]],[pt.SIZE,["#ffd700",220]]]),Wo=t=>t;Kk={[pt.ID]:Wo({pretty:(t,e)=>typeof e=="number"?ri(t,`${e}`,pt.NUMBER):ri(t,e,pt.CODE),json:t=>t}),[pt.INSPECT]:Wo({pretty:(t,e)=>Vk(t,e),json:t=>t}),[pt.NUMBER]:Wo({pretty:(t,e)=>ri(t,`${e}`,pt.NUMBER),json:t=>t}),[pt.IDENT]:Wo({pretty:(t,e)=>es(t,e),json:t=>cn(t)}),[pt.LOCATOR]:Wo({pretty:(t,e)=>Yr(t,e),json:t=>cl(t)}),[pt.DESCRIPTOR]:Wo({pretty:(t,e)=>ni(t,e),json:t=>ll(t)}),[pt.RESOLUTION]:Wo({pretty:(t,{descriptor:e,locator:r})=>jB(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:ll(t),locator:e!==null?cl(e):null})}),[pt.DEPENDENT]:Wo({pretty:(t,{locator:e,descriptor:r})=>h3(t,e,r),json:({locator:t,descriptor:e})=>({locator:cl(t),descriptor:ll(e)})}),[pt.PACKAGE_EXTENSION]:Wo({pretty:(t,e)=>{switch(e.type){case"Dependency":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"dependencies",pt.CODE)} \u27A4 ${es(t,e.descriptor)}`;case"PeerDependency":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"peerDependencies",pt.CODE)} \u27A4 ${es(t,e.descriptor)}`;case"PeerDependencyMeta":return`${es(t,e.parentDescriptor)} \u27A4 ${ri(t,"peerDependenciesMeta",pt.CODE)} \u27A4 ${es(t,Da(e.selector))} \u27A4 ${ri(t,e.key,pt.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case"Dependency":return`${cn(t.parentDescriptor)} > ${cn(t.descriptor)}`;case"PeerDependency":return`${cn(t.parentDescriptor)} >> ${cn(t.descriptor)}`;case"PeerDependencyMeta":return`${cn(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[pt.SETTING]:Wo({pretty:(t,e)=>(t.get(e),KE(t,ri(t,e,pt.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[pt.DURATION]:Wo({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),s=Math.ceil((e-r*60*1e3)/1e3);return s===0?`${r}m`:`${r}m ${s}s`}else{let r=Math.floor(e/1e3),s=e-r*1e3;return s===0?`${r}s`:`${r}s ${s}ms`}},json:t=>t}),[pt.SIZE]:Wo({pretty:(t,e)=>ri(t,gAe(e),pt.NUMBER),json:t=>t}),[pt.SIZE_DIFF]:Wo({pretty:(t,e)=>{let r=e>=0?"+":"-",s=r==="+"?pt.REMOVED:pt.ADDED;return ri(t,`${r} ${gAe(Math.max(Math.abs(e),1))}`,s)},json:t=>t}),[pt.PATH]:Wo({pretty:(t,e)=>ri(t,ue.fromPortablePath(e),pt.PATH),json:t=>ue.fromPortablePath(t)}),[pt.MARKDOWN]:Wo({pretty:(t,{text:e,format:r,paragraphs:s})=>qo(e,{format:r,paragraphs:s}),json:({text:t})=>t}),[pt.MARKDOWN_INLINE]:Wo({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(r,s,a)=>Ut(t,s+a+s,pt.CODE)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(r,s,a)=>Kd(t,a,2)),e),json:t=>t})};Eut=!!process.env.KONSOLE_VERSION;Xk=(a=>(a.Error="error",a.Warning="warning",a.Info="info",a.Discard="discard",a))(Xk||{})});var mAe=L(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.splitWhen=JE.flatten=void 0;function Cut(t){return t.reduce((e,r)=>[].concat(e,r),[])}JE.flatten=Cut;function wut(t,e){let r=[[]],s=0;for(let a of t)e(a)?(s++,r[s]=[]):r[s].push(a);return r}JE.splitWhen=wut});var yAe=L($k=>{"use strict";Object.defineProperty($k,"__esModule",{value:!0});$k.isEnoentCodeError=void 0;function But(t){return t.code==="ENOENT"}$k.isEnoentCodeError=But});var EAe=L(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:!0});eQ.createDirentFromStats=void 0;var g3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function vut(t,e){return new g3(t,e)}eQ.createDirentFromStats=vut});var BAe=L(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.convertPosixPathToPattern=us.convertWindowsPathToPattern=us.convertPathToPattern=us.escapePosixPath=us.escapeWindowsPath=us.escape=us.removeLeadingDotSegment=us.makeAbsolute=us.unixify=void 0;var Sut=Ie("os"),Dut=Ie("path"),IAe=Sut.platform()==="win32",but=2,Put=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,xut=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,kut=/^\\\\([.?])/,Qut=/\\(?![!()+@[\]{}])/g;function Tut(t){return t.replace(/\\/g,"/")}us.unixify=Tut;function Rut(t,e){return Dut.resolve(t,e)}us.makeAbsolute=Rut;function Fut(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(but)}return t}us.removeLeadingDotSegment=Fut;us.escape=IAe?d3:m3;function d3(t){return t.replace(xut,"\\$2")}us.escapeWindowsPath=d3;function m3(t){return t.replace(Put,"\\$2")}us.escapePosixPath=m3;us.convertPathToPattern=IAe?CAe:wAe;function CAe(t){return d3(t).replace(kut,"//$1").replace(Qut,"/")}us.convertWindowsPathToPattern=CAe;function wAe(t){return m3(t)}us.convertPosixPathToPattern=wAe});var SAe=L((q7t,vAe)=>{vAe.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var PAe=L((G7t,bAe)=>{var Nut=SAe(),DAe={"{":"}","(":")","[":"]"},Out=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,s=-2,a=-2,n=-2,c=-2;ee&&(c===-1||c>s||(c=t.indexOf("\\",e),c===-1||c>s)))||a!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(a=t.indexOf("}",e),a>e&&(c=t.indexOf("\\",e),c===-1||c>a))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(c=t.indexOf("\\",e),c===-1||c>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(rr&&(c=t.indexOf("\\",r),c===-1||c>n))))return!0;if(t[e]==="\\"){var f=t[e+1];e+=2;var p=DAe[f];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]==="!")return!0}else e++}return!1},Lut=function(t){if(t[0]==="!")return!0;for(var e=0;e{"use strict";var Mut=PAe(),_ut=Ie("path").posix.dirname,Uut=Ie("os").platform()==="win32",y3="/",Hut=/\\/g,jut=/[\{\[].*[\}\]]$/,qut=/(^|[^\\])([\{\[]|\([^\)]+$)/,Gut=/\\([\!\*\?\|\[\]\(\)\{\}])/g;xAe.exports=function(e,r){var s=Object.assign({flipBackslashes:!0},r);s.flipBackslashes&&Uut&&e.indexOf(y3)<0&&(e=e.replace(Hut,y3)),jut.test(e)&&(e+=y3),e+="a";do e=_ut(e);while(Mut(e)||qut.test(e));return e.replace(Gut,"$1")}});var MAe=L(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.removeDuplicateSlashes=jr.matchAny=jr.convertPatternsToRe=jr.makeRe=jr.getPatternParts=jr.expandBraceExpansion=jr.expandPatternsWithBraceExpansion=jr.isAffectDepthOfReadingPattern=jr.endsWithSlashGlobStar=jr.hasGlobStar=jr.getBaseDirectory=jr.isPatternRelatedToParentDirectory=jr.getPatternsOutsideCurrentDirectory=jr.getPatternsInsideCurrentDirectory=jr.getPositivePatterns=jr.getNegativePatterns=jr.isPositivePattern=jr.isNegativePattern=jr.convertToNegativePattern=jr.convertToPositivePattern=jr.isDynamicPattern=jr.isStaticPattern=void 0;var Wut=Ie("path"),Yut=kAe(),E3=Sa(),QAe="**",Vut="\\",Kut=/[*?]|^!/,Jut=/\[[^[]*]/,zut=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Zut=/[!*+?@]\([^(]*\)/,Xut=/,|\.\./,$ut=/(?!^)\/{2,}/g;function TAe(t,e={}){return!RAe(t,e)}jr.isStaticPattern=TAe;function RAe(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Vut)||Kut.test(t)||Jut.test(t)||zut.test(t)||e.extglob!==!1&&Zut.test(t)||e.braceExpansion!==!1&&eft(t))}jr.isDynamicPattern=RAe;function eft(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let s=t.slice(e,r);return Xut.test(s)}function tft(t){return tQ(t)?t.slice(1):t}jr.convertToPositivePattern=tft;function rft(t){return"!"+t}jr.convertToNegativePattern=rft;function tQ(t){return t.startsWith("!")&&t[1]!=="("}jr.isNegativePattern=tQ;function FAe(t){return!tQ(t)}jr.isPositivePattern=FAe;function nft(t){return t.filter(tQ)}jr.getNegativePatterns=nft;function ift(t){return t.filter(FAe)}jr.getPositivePatterns=ift;function sft(t){return t.filter(e=>!I3(e))}jr.getPatternsInsideCurrentDirectory=sft;function oft(t){return t.filter(I3)}jr.getPatternsOutsideCurrentDirectory=oft;function I3(t){return t.startsWith("..")||t.startsWith("./..")}jr.isPatternRelatedToParentDirectory=I3;function aft(t){return Yut(t,{flipBackslashes:!1})}jr.getBaseDirectory=aft;function lft(t){return t.includes(QAe)}jr.hasGlobStar=lft;function NAe(t){return t.endsWith("/"+QAe)}jr.endsWithSlashGlobStar=NAe;function cft(t){let e=Wut.basename(t);return NAe(t)||TAe(e)}jr.isAffectDepthOfReadingPattern=cft;function uft(t){return t.reduce((e,r)=>e.concat(OAe(r)),[])}jr.expandPatternsWithBraceExpansion=uft;function OAe(t){let e=E3.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,s)=>r.length-s.length),e.filter(r=>r!=="")}jr.expandBraceExpansion=OAe;function fft(t,e){let{parts:r}=E3.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}jr.getPatternParts=fft;function LAe(t,e){return E3.makeRe(t,e)}jr.makeRe=LAe;function Aft(t,e){return t.map(r=>LAe(r,e))}jr.convertPatternsToRe=Aft;function pft(t,e){return e.some(r=>r.test(t))}jr.matchAny=pft;function hft(t){return t.replace($ut,"/")}jr.removeDuplicateSlashes=hft});var jAe=L((V7t,HAe)=>{"use strict";var gft=Ie("stream"),_Ae=gft.PassThrough,dft=Array.prototype.slice;HAe.exports=mft;function mft(){let t=[],e=dft.call(arguments),r=!1,s=e[e.length-1];s&&!Array.isArray(s)&&s.pipe==null?e.pop():s={};let a=s.end!==!1,n=s.pipeError===!0;s.objectMode==null&&(s.objectMode=!0),s.highWaterMark==null&&(s.highWaterMark=64*1024);let c=_Ae(s);function f(){for(let E=0,C=arguments.length;E0||(r=!1,p())}function P(I){function R(){I.removeListener("merge2UnpipeEnd",R),I.removeListener("end",R),n&&I.removeListener("error",N),S()}function N(U){c.emit("error",U)}if(I._readableState.endEmitted)return S();I.on("merge2UnpipeEnd",R),I.on("end",R),n&&I.on("error",N),I.pipe(c,{end:!1}),I.resume()}for(let I=0;I{"use strict";Object.defineProperty(rQ,"__esModule",{value:!0});rQ.merge=void 0;var yft=jAe();function Eft(t){let e=yft(t);return t.forEach(r=>{r.once("error",s=>e.emit("error",s))}),e.once("close",()=>qAe(t)),e.once("end",()=>qAe(t)),e}rQ.merge=Eft;function qAe(t){t.forEach(e=>e.emit("close"))}});var WAe=L(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});zE.isEmpty=zE.isString=void 0;function Ift(t){return typeof t=="string"}zE.isString=Ift;function Cft(t){return t===""}zE.isEmpty=Cft});var Qp=L(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.string=Vo.stream=Vo.pattern=Vo.path=Vo.fs=Vo.errno=Vo.array=void 0;var wft=mAe();Vo.array=wft;var Bft=yAe();Vo.errno=Bft;var vft=EAe();Vo.fs=vft;var Sft=BAe();Vo.path=Sft;var Dft=MAe();Vo.pattern=Dft;var bft=GAe();Vo.stream=bft;var Pft=WAe();Vo.string=Pft});var JAe=L(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.convertPatternGroupToTask=Ko.convertPatternGroupsToTasks=Ko.groupPatternsByBaseDirectory=Ko.getNegativePatternsAsPositive=Ko.getPositivePatterns=Ko.convertPatternsToTasks=Ko.generate=void 0;var ju=Qp();function xft(t,e){let r=YAe(t,e),s=YAe(e.ignore,e),a=VAe(r),n=KAe(r,s),c=a.filter(E=>ju.pattern.isStaticPattern(E,e)),f=a.filter(E=>ju.pattern.isDynamicPattern(E,e)),p=C3(c,n,!1),h=C3(f,n,!0);return p.concat(h)}Ko.generate=xft;function YAe(t,e){let r=t;return e.braceExpansion&&(r=ju.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(s=>s.includes("/")?s:`**/${s}`)),r.map(s=>ju.pattern.removeDuplicateSlashes(s))}function C3(t,e,r){let s=[],a=ju.pattern.getPatternsOutsideCurrentDirectory(t),n=ju.pattern.getPatternsInsideCurrentDirectory(t),c=w3(a),f=w3(n);return s.push(...B3(c,e,r)),"."in f?s.push(v3(".",n,e,r)):s.push(...B3(f,e,r)),s}Ko.convertPatternsToTasks=C3;function VAe(t){return ju.pattern.getPositivePatterns(t)}Ko.getPositivePatterns=VAe;function KAe(t,e){return ju.pattern.getNegativePatterns(t).concat(e).map(ju.pattern.convertToPositivePattern)}Ko.getNegativePatternsAsPositive=KAe;function w3(t){let e={};return t.reduce((r,s)=>{let a=ju.pattern.getBaseDirectory(s);return a in r?r[a].push(s):r[a]=[s],r},e)}Ko.groupPatternsByBaseDirectory=w3;function B3(t,e,r){return Object.keys(t).map(s=>v3(s,t[s],e,r))}Ko.convertPatternGroupsToTasks=B3;function v3(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(ju.pattern.convertToNegativePattern))}}Ko.convertPatternGroupToTask=v3});var ZAe=L(nQ=>{"use strict";Object.defineProperty(nQ,"__esModule",{value:!0});nQ.read=void 0;function kft(t,e,r){e.fs.lstat(t,(s,a)=>{if(s!==null){zAe(r,s);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){S3(r,a);return}e.fs.stat(t,(n,c)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){zAe(r,n);return}S3(r,a);return}e.markSymbolicLink&&(c.isSymbolicLink=()=>!0),S3(r,c)})})}nQ.read=kft;function zAe(t,e){t(e)}function S3(t,e){t(null,e)}});var XAe=L(iQ=>{"use strict";Object.defineProperty(iQ,"__esModule",{value:!0});iQ.read=void 0;function Qft(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let s=e.fs.statSync(t);return e.markSymbolicLink&&(s.isSymbolicLink=()=>!0),s}catch(s){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw s}}iQ.read=Qft});var $Ae=L(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.createFileSystemAdapter=p0.FILE_SYSTEM_ADAPTER=void 0;var sQ=Ie("fs");p0.FILE_SYSTEM_ADAPTER={lstat:sQ.lstat,stat:sQ.stat,lstatSync:sQ.lstatSync,statSync:sQ.statSync};function Tft(t){return t===void 0?p0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},p0.FILE_SYSTEM_ADAPTER),t)}p0.createFileSystemAdapter=Tft});var epe=L(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0});var Rft=$Ae(),D3=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Rft.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};b3.default=D3});var zd=L(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.statSync=h0.stat=h0.Settings=void 0;var tpe=ZAe(),Fft=XAe(),P3=epe();h0.Settings=P3.default;function Nft(t,e,r){if(typeof e=="function"){tpe.read(t,x3(),e);return}tpe.read(t,x3(e),r)}h0.stat=Nft;function Oft(t,e){let r=x3(e);return Fft.read(t,r)}h0.statSync=Oft;function x3(t={}){return t instanceof P3.default?t:new P3.default(t)}});var ipe=L((nKt,npe)=>{var rpe;npe.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(rpe||(rpe=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var ope=L((iKt,spe)=>{spe.exports=Mft;var Lft=ipe();function Mft(t,e){let r,s,a,n=!0;Array.isArray(t)?(r=[],s=t.length):(a=Object.keys(t),r={},s=a.length);function c(p){function h(){e&&e(p,r),e=null}n?Lft(h):h()}function f(p,h,E){r[p]=E,(--s===0||h)&&c(h)}s?a?a.forEach(function(p){t[p](function(h,E){f(p,h,E)})}):t.forEach(function(p,h){p(function(E,C){f(h,E,C)})}):c(null),n=!1}});var k3=L(aQ=>{"use strict";Object.defineProperty(aQ,"__esModule",{value:!0});aQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var oQ=process.versions.node.split(".");if(oQ[0]===void 0||oQ[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ape=Number.parseInt(oQ[0],10),_ft=Number.parseInt(oQ[1],10),lpe=10,Uft=10,Hft=ape>lpe,jft=ape===lpe&&_ft>=Uft;aQ.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Hft||jft});var cpe=L(lQ=>{"use strict";Object.defineProperty(lQ,"__esModule",{value:!0});lQ.createDirentFromStats=void 0;var Q3=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function qft(t,e){return new Q3(t,e)}lQ.createDirentFromStats=qft});var T3=L(cQ=>{"use strict";Object.defineProperty(cQ,"__esModule",{value:!0});cQ.fs=void 0;var Gft=cpe();cQ.fs=Gft});var R3=L(uQ=>{"use strict";Object.defineProperty(uQ,"__esModule",{value:!0});uQ.joinPathSegments=void 0;function Wft(t,e,r){return t.endsWith(r)?t+e:t+r+e}uQ.joinPathSegments=Wft});var gpe=L(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.readdir=g0.readdirWithFileTypes=g0.read=void 0;var Yft=zd(),upe=ope(),Vft=k3(),fpe=T3(),Ape=R3();function Kft(t,e,r){if(!e.stats&&Vft.IS_SUPPORT_READDIR_WITH_FILE_TYPES){ppe(t,e,r);return}hpe(t,e,r)}g0.read=Kft;function ppe(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(s,a)=>{if(s!==null){fQ(r,s);return}let n=a.map(f=>({dirent:f,name:f.name,path:Ape.joinPathSegments(t,f.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){F3(r,n);return}let c=n.map(f=>Jft(f,e));upe(c,(f,p)=>{if(f!==null){fQ(r,f);return}F3(r,p)})})}g0.readdirWithFileTypes=ppe;function Jft(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=fpe.fs.createDirentFromStats(t.name,a),r(null,t)})}}function hpe(t,e,r){e.fs.readdir(t,(s,a)=>{if(s!==null){fQ(r,s);return}let n=a.map(c=>{let f=Ape.joinPathSegments(t,c,e.pathSegmentSeparator);return p=>{Yft.stat(f,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let C={name:c,path:f,dirent:fpe.fs.createDirentFromStats(c,E)};e.stats&&(C.stats=E),p(null,C)})}});upe(n,(c,f)=>{if(c!==null){fQ(r,c);return}F3(r,f)})})}g0.readdir=hpe;function fQ(t,e){t(e)}function F3(t,e){t(null,e)}});var Ipe=L(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.readdir=d0.readdirWithFileTypes=d0.read=void 0;var zft=zd(),Zft=k3(),dpe=T3(),mpe=R3();function Xft(t,e){return!e.stats&&Zft.IS_SUPPORT_READDIR_WITH_FILE_TYPES?ype(t,e):Epe(t,e)}d0.read=Xft;function ype(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(s=>{let a={dirent:s,name:s.name,path:mpe.joinPathSegments(t,s.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=dpe.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}d0.readdirWithFileTypes=ype;function Epe(t,e){return e.fs.readdirSync(t).map(s=>{let a=mpe.joinPathSegments(t,s,e.pathSegmentSeparator),n=zft.statSync(a,e.fsStatSettings),c={name:s,path:a,dirent:dpe.fs.createDirentFromStats(s,n)};return e.stats&&(c.stats=n),c})}d0.readdir=Epe});var Cpe=L(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.createFileSystemAdapter=m0.FILE_SYSTEM_ADAPTER=void 0;var ZE=Ie("fs");m0.FILE_SYSTEM_ADAPTER={lstat:ZE.lstat,stat:ZE.stat,lstatSync:ZE.lstatSync,statSync:ZE.statSync,readdir:ZE.readdir,readdirSync:ZE.readdirSync};function $ft(t){return t===void 0?m0.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},m0.FILE_SYSTEM_ADAPTER),t)}m0.createFileSystemAdapter=$ft});var wpe=L(O3=>{"use strict";Object.defineProperty(O3,"__esModule",{value:!0});var eAt=Ie("path"),tAt=zd(),rAt=Cpe(),N3=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=rAt.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,eAt.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new tAt.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};O3.default=N3});var AQ=L(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.Settings=y0.scandirSync=y0.scandir=void 0;var Bpe=gpe(),nAt=Ipe(),L3=wpe();y0.Settings=L3.default;function iAt(t,e,r){if(typeof e=="function"){Bpe.read(t,M3(),e);return}Bpe.read(t,M3(e),r)}y0.scandir=iAt;function sAt(t,e){let r=M3(e);return nAt.read(t,r)}y0.scandirSync=sAt;function M3(t={}){return t instanceof L3.default?t:new L3.default(t)}});var Spe=L((hKt,vpe)=>{"use strict";function oAt(t){var e=new t,r=e;function s(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:s,release:a}}vpe.exports=oAt});var bpe=L((gKt,_3)=>{"use strict";var aAt=Spe();function Dpe(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=aAt(lAt),a=null,n=null,c=0,f=null,p={push:R,drain:Tc,saturated:Tc,pause:E,paused:!1,get concurrency(){return r},set concurrency(Ae){if(!(Ae>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=Ae,!p.paused)for(;a&&c=r||p.paused?n?(n.next=me,n=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function N(Ae,ce){var me=s.get();me.context=t,me.release=U,me.value=Ae,me.callback=ce||Tc,me.errorHandler=f,c>=r||p.paused?a?(me.next=a,a=me):(a=me,n=me,p.saturated()):(c++,e.call(t,me.value,me.worked))}function U(Ae){Ae&&s.release(Ae);var ce=a;ce&&c<=r?p.paused?c--:(n===a&&(n=null),a=ce.next,ce.next=null,e.call(t,ce.value,ce.worked),n===null&&p.empty()):--c===0&&p.drain()}function W(){a=null,n=null,p.drain=Tc}function te(){a=null,n=null,p.drain(),p.drain=Tc}function ie(Ae){f=Ae}}function Tc(){}function lAt(){this.value=null,this.callback=Tc,this.next=null,this.release=Tc,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,s){var a=t.callback,n=t.errorHandler,c=t.value;t.value=null,t.callback=Tc,t.errorHandler&&n(r,c),a.call(t.context,r,s),t.release(t)}}function cAt(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function s(E,C){e.call(this,E).then(function(S){C(null,S)},C)}var a=Dpe(t,s,r),n=a.push,c=a.unshift;return a.push=f,a.unshift=p,a.drained=h,a;function f(E){var C=new Promise(function(S,P){n(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function p(E){var C=new Promise(function(S,P){c(E,function(I,R){if(I){P(I);return}S(R)})});return C.catch(Tc),C}function h(){if(a.idle())return new Promise(function(S){S()});var E=a.drain,C=new Promise(function(S){a.drain=function(){E(),S()}});return C}}_3.exports=Dpe;_3.exports.promise=cAt});var pQ=L(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.joinPathSegments=Xf.replacePathSegmentSeparator=Xf.isAppliedFilter=Xf.isFatalError=void 0;function uAt(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Xf.isFatalError=uAt;function fAt(t,e){return t===null||t(e)}Xf.isAppliedFilter=fAt;function AAt(t,e){return t.split(/[/\\]/).join(e)}Xf.replacePathSegmentSeparator=AAt;function pAt(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Xf.joinPathSegments=pAt});var j3=L(H3=>{"use strict";Object.defineProperty(H3,"__esModule",{value:!0});var hAt=pQ(),U3=class{constructor(e,r){this._root=e,this._settings=r,this._root=hAt.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};H3.default=U3});var W3=L(G3=>{"use strict";Object.defineProperty(G3,"__esModule",{value:!0});var gAt=Ie("events"),dAt=AQ(),mAt=bpe(),hQ=pQ(),yAt=j3(),q3=class extends yAt.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=dAt.scandir,this._emitter=new gAt.EventEmitter,this._queue=mAt(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let s={directory:e,base:r};this._queue.push(s,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(s,a)=>{if(s!==null){r(s,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!hQ.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let s=e.path;r!==void 0&&(e.path=hQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),hQ.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&hQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};G3.default=q3});var Ppe=L(V3=>{"use strict";Object.defineProperty(V3,"__esModule",{value:!0});var EAt=W3(),Y3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new EAt.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{IAt(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{CAt(e,this._storage)}),this._reader.read()}};V3.default=Y3;function IAt(t,e){t(e)}function CAt(t,e){t(null,e)}});var xpe=L(J3=>{"use strict";Object.defineProperty(J3,"__esModule",{value:!0});var wAt=Ie("stream"),BAt=W3(),K3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new BAt.default(this._root,this._settings),this._stream=new wAt.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};J3.default=K3});var kpe=L(Z3=>{"use strict";Object.defineProperty(Z3,"__esModule",{value:!0});var vAt=AQ(),gQ=pQ(),SAt=j3(),z3=class extends SAt.default{constructor(){super(...arguments),this._scandir=vAt.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let s=this._scandir(e,this._settings.fsScandirSettings);for(let a of s)this._handleEntry(a,r)}catch(s){this._handleError(s)}}_handleError(e){if(gQ.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let s=e.path;r!==void 0&&(e.path=gQ.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),gQ.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&gQ.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(s,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};Z3.default=z3});var Qpe=L($3=>{"use strict";Object.defineProperty($3,"__esModule",{value:!0});var DAt=kpe(),X3=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new DAt.default(this._root,this._settings)}read(){return this._reader.read()}};$3.default=X3});var Tpe=L(t8=>{"use strict";Object.defineProperty(t8,"__esModule",{value:!0});var bAt=Ie("path"),PAt=AQ(),e8=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,bAt.sep),this.fsScandirSettings=new PAt.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};t8.default=e8});var mQ=L($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.Settings=$f.walkStream=$f.walkSync=$f.walk=void 0;var Rpe=Ppe(),xAt=xpe(),kAt=Qpe(),r8=Tpe();$f.Settings=r8.default;function QAt(t,e,r){if(typeof e=="function"){new Rpe.default(t,dQ()).read(e);return}new Rpe.default(t,dQ(e)).read(r)}$f.walk=QAt;function TAt(t,e){let r=dQ(e);return new kAt.default(t,r).read()}$f.walkSync=TAt;function RAt(t,e){let r=dQ(e);return new xAt.default(t,r).read()}$f.walkStream=RAt;function dQ(t={}){return t instanceof r8.default?t:new r8.default(t)}});var yQ=L(i8=>{"use strict";Object.defineProperty(i8,"__esModule",{value:!0});var FAt=Ie("path"),NAt=zd(),Fpe=Qp(),n8=class{constructor(e){this._settings=e,this._fsStatSettings=new NAt.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return FAt.resolve(this._settings.cwd,e)}_makeEntry(e,r){let s={name:r,path:r,dirent:Fpe.fs.createDirentFromStats(r,e)};return this._settings.stats&&(s.stats=e),s}_isFatalError(e){return!Fpe.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};i8.default=n8});var a8=L(o8=>{"use strict";Object.defineProperty(o8,"__esModule",{value:!0});var OAt=Ie("stream"),LAt=zd(),MAt=mQ(),_At=yQ(),s8=class extends _At.default{constructor(){super(...arguments),this._walkStream=MAt.walkStream,this._stat=LAt.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let s=e.map(this._getFullEntryPath,this),a=new OAt.PassThrough({objectMode:!0});a._write=(n,c,f)=>this._getEntry(s[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===s.length-1&&a.end(),f()}).catch(f);for(let n=0;nthis._makeEntry(a,r)).catch(a=>{if(s.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,s)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):s(a))})}};o8.default=s8});var Npe=L(c8=>{"use strict";Object.defineProperty(c8,"__esModule",{value:!0});var UAt=mQ(),HAt=yQ(),jAt=a8(),l8=class extends HAt.default{constructor(){super(...arguments),this._walkAsync=UAt.walk,this._readerStream=new jAt.default(this._settings)}dynamic(e,r){return new Promise((s,a)=>{this._walkAsync(e,r,(n,c)=>{n===null?s(c):a(n)})})}async static(e,r){let s=[],a=this._readerStream.static(e,r);return new Promise((n,c)=>{a.once("error",c),a.on("data",f=>s.push(f)),a.once("end",()=>n(s))})}};c8.default=l8});var Ope=L(f8=>{"use strict";Object.defineProperty(f8,"__esModule",{value:!0});var qB=Qp(),u8=class{constructor(e,r,s){this._patterns=e,this._settings=r,this._micromatchOptions=s,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),s=this._splitSegmentsIntoSections(r);this._storage.push({complete:s.length<=1,pattern:e,segments:r,sections:s})}}_getPatternSegments(e){return qB.pattern.getPatternParts(e,this._micromatchOptions).map(s=>qB.pattern.isDynamicPattern(s,this._settings)?{dynamic:!0,pattern:s,patternRe:qB.pattern.makeRe(s,this._micromatchOptions)}:{dynamic:!1,pattern:s})}_splitSegmentsIntoSections(e){return qB.array.splitWhen(e,r=>r.dynamic&&qB.pattern.hasGlobStar(r.pattern))}};f8.default=u8});var Lpe=L(p8=>{"use strict";Object.defineProperty(p8,"__esModule",{value:!0});var qAt=Ope(),A8=class extends qAt.default{match(e){let r=e.split("/"),s=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>s);for(let n of a){let c=n.sections[0];if(!n.complete&&s>c.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};p8.default=A8});var Mpe=L(g8=>{"use strict";Object.defineProperty(g8,"__esModule",{value:!0});var EQ=Qp(),GAt=Lpe(),h8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,s){let a=this._getMatcher(r),n=this._getNegativePatternsRe(s);return c=>this._filter(e,c,a,n)}_getMatcher(e){return new GAt.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(EQ.pattern.isAffectDepthOfReadingPattern);return EQ.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,s,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=EQ.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,s)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let s=r.split("/").length;if(e==="")return s;let a=e.split("/").length;return s-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!EQ.pattern.matchAny(e,r)}};g8.default=h8});var _pe=L(m8=>{"use strict";Object.defineProperty(m8,"__esModule",{value:!0});var Zd=Qp(),d8=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let s=Zd.pattern.convertPatternsToRe(e,this._micromatchOptions),a=Zd.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return n=>this._filter(n,s,a)}_filter(e,r,s){let a=Zd.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(a)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(a,s))return!1;let n=e.dirent.isDirectory(),c=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(a,s,n);return this._settings.unique&&c&&this._createIndexRecord(a),c}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let s=Zd.path.makeAbsolute(this._settings.cwd,e);return Zd.pattern.matchAny(s,r)}_isMatchToPatterns(e,r,s){let a=Zd.pattern.matchAny(e,r);return!a&&s?Zd.pattern.matchAny(e+"/",r):a}};m8.default=d8});var Upe=L(E8=>{"use strict";Object.defineProperty(E8,"__esModule",{value:!0});var WAt=Qp(),y8=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return WAt.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};E8.default=y8});var jpe=L(C8=>{"use strict";Object.defineProperty(C8,"__esModule",{value:!0});var Hpe=Qp(),I8=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Hpe.path.makeAbsolute(this._settings.cwd,r),r=Hpe.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};C8.default=I8});var IQ=L(B8=>{"use strict";Object.defineProperty(B8,"__esModule",{value:!0});var YAt=Ie("path"),VAt=Mpe(),KAt=_pe(),JAt=Upe(),zAt=jpe(),w8=class{constructor(e){this._settings=e,this.errorFilter=new JAt.default(this._settings),this.entryFilter=new KAt.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new VAt.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new zAt.default(this._settings)}_getRootDirectory(e){return YAt.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};B8.default=w8});var qpe=L(S8=>{"use strict";Object.defineProperty(S8,"__esModule",{value:!0});var ZAt=Npe(),XAt=IQ(),v8=class extends XAt.default{constructor(){super(...arguments),this._reader=new ZAt.default(this._settings)}async read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return(await this.api(r,e,s)).map(n=>s.transform(n))}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};S8.default=v8});var Gpe=L(b8=>{"use strict";Object.defineProperty(b8,"__esModule",{value:!0});var $At=Ie("stream"),ept=a8(),tpt=IQ(),D8=class extends tpt.default{constructor(){super(...arguments),this._reader=new ept.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e),a=this.api(r,e,s),n=new $At.Readable({objectMode:!0,read:()=>{}});return a.once("error",c=>n.emit("error",c)).on("data",c=>n.emit("data",s.transform(c))).once("end",()=>n.emit("end")),n.once("close",()=>a.destroy()),n}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};b8.default=D8});var Wpe=L(x8=>{"use strict";Object.defineProperty(x8,"__esModule",{value:!0});var rpt=zd(),npt=mQ(),ipt=yQ(),P8=class extends ipt.default{constructor(){super(...arguments),this._walkSync=npt.walkSync,this._statSync=rpt.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let s=[];for(let a of e){let n=this._getFullEntryPath(a),c=this._getEntry(n,a,r);c===null||!r.entryFilter(c)||s.push(c)}return s}_getEntry(e,r,s){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(s.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};x8.default=P8});var Ype=L(Q8=>{"use strict";Object.defineProperty(Q8,"__esModule",{value:!0});var spt=Wpe(),opt=IQ(),k8=class extends opt.default{constructor(){super(...arguments),this._reader=new spt.default(this._settings)}read(e){let r=this._getRootDirectory(e),s=this._getReaderOptions(e);return this.api(r,e,s).map(s.transform)}api(e,r,s){return r.dynamic?this._reader.dynamic(e,s):this._reader.static(r.patterns,s)}};Q8.default=k8});var Vpe=L($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var XE=Ie("fs"),apt=Ie("os"),lpt=Math.max(apt.cpus().length,1);$E.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:XE.lstat,lstatSync:XE.lstatSync,stat:XE.stat,statSync:XE.statSync,readdir:XE.readdir,readdirSync:XE.readdirSync};var T8=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,lpt),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},$E.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};$E.default=T8});var CQ=L((UKt,Jpe)=>{"use strict";var Kpe=JAe(),cpt=qpe(),upt=Gpe(),fpt=Ype(),R8=Vpe(),Rc=Qp();async function F8(t,e){qu(t);let r=N8(t,cpt.default,e),s=await Promise.all(r);return Rc.array.flatten(s)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(h,E){qu(h);let C=N8(h,fpt.default,E);return Rc.array.flatten(C)}t.sync=e;function r(h,E){qu(h);let C=N8(h,upt.default,E);return Rc.stream.merge(C)}t.stream=r;function s(h,E){qu(h);let C=[].concat(h),S=new R8.default(E);return Kpe.generate(C,S)}t.generateTasks=s;function a(h,E){qu(h);let C=new R8.default(E);return Rc.pattern.isDynamicPattern(h,C)}t.isDynamicPattern=a;function n(h){return qu(h),Rc.path.escape(h)}t.escapePath=n;function c(h){return qu(h),Rc.path.convertPathToPattern(h)}t.convertPathToPattern=c;let f;(function(h){function E(S){return qu(S),Rc.path.escapePosixPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertPosixPathToPattern(S)}h.convertPathToPattern=C})(f=t.posix||(t.posix={}));let p;(function(h){function E(S){return qu(S),Rc.path.escapeWindowsPath(S)}h.escapePath=E;function C(S){return qu(S),Rc.path.convertWindowsPathToPattern(S)}h.convertPathToPattern=C})(p=t.win32||(t.win32={}))})(F8||(F8={}));function N8(t,e,r){let s=[].concat(t),a=new R8.default(r),n=Kpe.generate(s,a),c=new e(a);return n.map(c.read,c)}function qu(t){if(![].concat(t).every(s=>Rc.string.isString(s)&&!Rc.string.isEmpty(s)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Jpe.exports=F8});var Nn={};Vt(Nn,{checksumFile:()=>BQ,checksumPattern:()=>vQ,makeHash:()=>fs});function fs(...t){let e=(0,wQ.createHash)("sha512"),r="";for(let s of t)typeof s=="string"?r+=s:s&&(r&&(e.update(r),r=""),e.update(s));return r&&e.update(r),e.digest("hex")}async function BQ(t,{baseFs:e,algorithm:r}={baseFs:le,algorithm:"sha512"}){let s=await e.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,wQ.createHash)(r),f=0;for(;(f=await e.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await e.closePromise(s)}}async function vQ(t,{cwd:e}){let s=(await(0,O8.default)(t,{cwd:ue.fromPortablePath(e),onlyDirectories:!0})).map(f=>`${f}/**/*`),a=await(0,O8.default)([t,...s],{cwd:ue.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async f=>{let p=[Buffer.from(f)],h=K.join(e,ue.toPortablePath(f)),E=await le.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await le.readlinkPromise(h))):E.isFile()&&p.push(await le.readFilePromise(h)),p.join("\0")})),c=(0,wQ.createHash)("sha512");for(let f of n)c.update(f);return c.digest("hex")}var wQ,O8,E0=Ct(()=>{bt();wQ=Ie("crypto"),O8=et(CQ())});var q={};Vt(q,{allPeerRequests:()=>XB,areDescriptorsEqual:()=>ehe,areIdentsEqual:()=>VB,areLocatorsEqual:()=>KB,areVirtualPackagesEquivalent:()=>Ipt,bindDescriptor:()=>ypt,bindLocator:()=>Ept,convertDescriptorToLocator:()=>SQ,convertLocatorToDescriptor:()=>M8,convertPackageToLocator:()=>gpt,convertToIdent:()=>hpt,convertToManifestRange:()=>kpt,copyPackage:()=>WB,devirtualizeDescriptor:()=>YB,devirtualizeLocator:()=>tI,ensureDevirtualizedDescriptor:()=>dpt,ensureDevirtualizedLocator:()=>mpt,getIdentVendorPath:()=>j8,isPackageCompatible:()=>kQ,isVirtualDescriptor:()=>Tp,isVirtualLocator:()=>Gu,makeDescriptor:()=>On,makeIdent:()=>ba,makeLocator:()=>Vs,makeRange:()=>PQ,parseDescriptor:()=>I0,parseFileStyleRange:()=>Ppt,parseIdent:()=>Da,parseLocator:()=>Rp,parseRange:()=>Xd,prettyDependent:()=>h3,prettyDescriptor:()=>ni,prettyIdent:()=>es,prettyLocator:()=>Yr,prettyLocatorNoColors:()=>p3,prettyRange:()=>nI,prettyReference:()=>zB,prettyResolution:()=>jB,prettyWorkspace:()=>ZB,renamePackage:()=>_8,slugifyIdent:()=>L8,slugifyLocator:()=>rI,sortDescriptors:()=>iI,stringifyDescriptor:()=>ll,stringifyIdent:()=>cn,stringifyLocator:()=>cl,tryParseDescriptor:()=>JB,tryParseIdent:()=>the,tryParseLocator:()=>bQ,tryParseRange:()=>bpt,unwrapIdentFromScope:()=>Tpt,virtualizeDescriptor:()=>U8,virtualizePackage:()=>H8,wrapIdentIntoScope:()=>Qpt});function ba(t,e){if(t?.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:fs(t,e),scope:t,name:e}}function On(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:fs(t.identHash,e),range:e}}function Vs(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:fs(t.identHash,e),reference:e}}function hpt(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function SQ(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function M8(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function gpt(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function _8(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function WB(t){return _8(t,t)}function U8(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return On(t,`virtual:${e}#${t.range}`)}function H8(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return _8(t,Vs(t,`virtual:${e}#${t.reference}`))}function Tp(t){return t.range.startsWith(GB)}function Gu(t){return t.reference.startsWith(GB)}function YB(t){if(!Tp(t))throw new Error("Not a virtual descriptor");return On(t,t.range.replace(DQ,""))}function tI(t){if(!Gu(t))throw new Error("Not a virtual descriptor");return Vs(t,t.reference.replace(DQ,""))}function dpt(t){return Tp(t)?On(t,t.range.replace(DQ,"")):t}function mpt(t){return Gu(t)?Vs(t,t.reference.replace(DQ,"")):t}function ypt(t,e){return t.range.includes("::")?t:On(t,`${t.range}::${eI.default.stringify(e)}`)}function Ept(t,e){return t.reference.includes("::")?t:Vs(t,`${t.reference}::${eI.default.stringify(e)}`)}function VB(t,e){return t.identHash===e.identHash}function ehe(t,e){return t.descriptorHash===e.descriptorHash}function KB(t,e){return t.locatorHash===e.locatorHash}function Ipt(t,e){if(!Gu(t))throw new Error("Invalid package type");if(!Gu(e))throw new Error("Invalid package type");if(!VB(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let s=e.dependencies.get(r.identHash);if(!s||!ehe(r,s))return!1}return!0}function Da(t){let e=the(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function the(t){let e=t.match(Cpt);if(!e)return null;let[,r,s]=e;return ba(typeof r<"u"?r:null,s)}function I0(t,e=!1){let r=JB(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function JB(t,e=!1){let r=e?t.match(wpt):t.match(Bpt);if(!r)return null;let[,s,a,n]=r;if(n==="unknown")throw new Error(`Invalid range (${t})`);let c=typeof s<"u"?s:null,f=typeof n<"u"?n:"unknown";return On(ba(c,a),f)}function Rp(t,e=!1){let r=bQ(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function bQ(t,e=!1){let r=e?t.match(vpt):t.match(Spt);if(!r)return null;let[,s,a,n]=r;if(n==="unknown")throw new Error(`Invalid reference (${t})`);let c=typeof s<"u"?s:null,f=typeof n<"u"?n:"unknown";return Vs(ba(c,a),f)}function Xd(t,e){let r=t.match(Dpt);if(r===null)throw new Error(`Invalid range (${t})`);let s=typeof r[1]<"u"?r[1]:null;if(typeof e?.requireProtocol=="string"&&s!==e.requireProtocol)throw new Error(`Invalid protocol (${s})`);if(e?.requireProtocol&&s===null)throw new Error(`Missing protocol (${s})`);let a=typeof r[3]<"u"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<"u"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),c=e?.parseSelector?eI.default.parse(n):n,f=typeof r[4]<"u"?eI.default.parse(r[4]):null;return{protocol:s,source:a,selector:c,params:f}}function bpt(t,e){try{return Xd(t,e)}catch{return null}}function Ppt(t,{protocol:e}){let{selector:r,params:s}=Xd(t,{requireProtocol:e,requireBindings:!0});if(typeof s.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Rp(s.locator,!0),path:r}}function zpe(t){return t=t.replaceAll("%","%25"),t=t.replaceAll(":","%3A"),t=t.replaceAll("#","%23"),t}function xpt(t){return t===null?!1:Object.entries(t).length>0}function PQ({protocol:t,source:e,selector:r,params:s}){let a="";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${zpe(e)}#`),a+=zpe(r),xpt(s)&&(a+=`::${eI.default.stringify(s)}`),a}function kpt(t){let{params:e,protocol:r,source:s,selector:a}=Xd(t);for(let n in e)n.startsWith("__")&&delete e[n];return PQ({protocol:r,source:s,params:e,selector:a})}function cn(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function Qpt(t,e){return t.scope?ba(e,`${t.scope}__${t.name}`):ba(e,t.name)}function Tpt(t,e){if(t.scope!==e)return t;let r=t.name.indexOf("__");if(r===-1)return ba(null,t.name);let s=t.name.slice(0,r),a=t.name.slice(r+2);return ba(s,a)}function ll(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function cl(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function L8(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function rI(t){let{protocol:e,selector:r}=Xd(t.reference),s=e!==null?e.replace(Rpt,""):"exotic",a=Zpe.default.valid(r),n=a!==null?`${s}-${a}`:`${s}`,c=10;return t.scope?`${L8(t)}-${n}-${t.locatorHash.slice(0,c)}`:`${L8(t)}-${n}-${t.locatorHash.slice(0,c)}`}function es(t,e){return e.scope?`${Ut(t,`@${e.scope}/`,pt.SCOPE)}${Ut(t,e.name,pt.NAME)}`:`${Ut(t,e.name,pt.NAME)}`}function xQ(t){if(t.startsWith(GB)){let e=xQ(t.substring(t.indexOf("#")+1)),r=t.substring(GB.length,GB.length+Apt);return`${e} [${r}]`}else return t.replace(Fpt,"?[...]")}function nI(t,e){return`${Ut(t,xQ(e),pt.RANGE)}`}function ni(t,e){return`${es(t,e)}${Ut(t,"@",pt.RANGE)}${nI(t,e.range)}`}function zB(t,e){return`${Ut(t,xQ(e),pt.REFERENCE)}`}function Yr(t,e){return`${es(t,e)}${Ut(t,"@",pt.REFERENCE)}${zB(t,e.reference)}`}function p3(t){return`${cn(t)}@${xQ(t.reference)}`}function iI(t){return Ys(t,[e=>cn(e),e=>e.range])}function ZB(t,e){return es(t,e.anchoredLocator)}function jB(t,e,r){let s=Tp(e)?YB(e):e;return r===null?`${ni(t,s)} \u2192 ${A3(t).Cross}`:s.identHash===r.identHash?`${ni(t,s)} \u2192 ${zB(t,r.reference)}`:`${ni(t,s)} \u2192 ${Yr(t,r)}`}function h3(t,e,r){return r===null?`${Yr(t,e)}`:`${Yr(t,e)} (via ${nI(t,r.range)})`}function j8(t){return`node_modules/${cn(t)}`}function kQ(t,e){return t.conditions?ppt(t.conditions,r=>{let[,s,a]=r.match($pe),n=e[s];return n?n.includes(a):!0}):!0}function XB(t){let e=new Set;if("children"in t)e.add(t);else for(let r of t.requests.values())e.add(r);for(let r of e)for(let s of r.children.values())e.add(s);return e}var eI,Zpe,Xpe,GB,Apt,$pe,ppt,DQ,Cpt,wpt,Bpt,vpt,Spt,Dpt,Rpt,Fpt,Yo=Ct(()=>{eI=et(Ie("querystring")),Zpe=et(Ai()),Xpe=et(Wse());Qc();E0();kc();Yo();GB="virtual:",Apt=5,$pe=/(os|cpu|libc)=([a-z0-9_-]+)/,ppt=(0,Xpe.makeParser)($pe);DQ=/^[^#]*#/;Cpt=/^(?:@([^/]+?)\/)?([^@/]+)$/;wpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Bpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;vpt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Spt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;Dpt=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;Rpt=/:$/;Fpt=/\?.*/});var rhe,nhe=Ct(()=>{Yo();rhe={hooks:{reduceDependency:(t,e,r,s,{resolver:a,resolveOptions:n})=>{for(let{pattern:c,reference:f}of e.topLevelWorkspace.manifest.resolutions){if(c.from&&(c.from.fullName!==cn(r)||e.configuration.normalizeLocator(Vs(Da(c.from.fullName),c.from.description??r.reference)).locatorHash!==r.locatorHash)||c.descriptor.fullName!==cn(t)||e.configuration.normalizeDependency(On(Rp(c.descriptor.fullName),c.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(On(t,f)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let s=ZB(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${s}: ${n}`),reportError:(a,n)=>e.reportError(a,`${s}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let s of r.errors)e.reportWarning(57,s.message)}}}});var Ei,$d=Ct(()=>{Ei=class t{static{this.protocol="workspace:"}supportsDescriptor(e,r){return!!(e.range.startsWith(t.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(t.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[s.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.getWorkspaceByCwd(e.reference.slice(t.protocol.length));return{...e,version:s.manifest.version||"0.0.0",languageName:"unknown",linkType:"SOFT",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...s.manifest.dependencies,...s.manifest.devDependencies])),peerDependencies:new Map([...s.manifest.peerDependencies]),dependenciesMeta:s.manifest.dependenciesMeta,peerDependenciesMeta:s.manifest.peerDependenciesMeta,bin:s.manifest.bin}}}});var Or={};Vt(Or,{SemVer:()=>lhe.SemVer,clean:()=>Opt,getComparator:()=>ohe,mergeComparators:()=>q8,satisfiesWithPrereleases:()=>eA,simplifyRanges:()=>G8,stringifyComparator:()=>ahe,validRange:()=>ul});function eA(t,e,r=!1){if(!t)return!1;let s=`${e}${r}`,a=ihe.get(s);if(typeof a>"u")try{a=new Fp.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{ihe.set(s,a||null)}else if(a===null)return!1;let n;try{n=new Fp.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(c=>{for(let f of c)f.semver.prerelease&&(f.semver.prerelease=[]);return c.every(f=>f.test(n))}))}function ul(t){if(t.indexOf(":")!==-1)return null;let e=she.get(t);if(typeof e<"u")return e;try{e=new Fp.default.Range(t)}catch{e=null}return she.set(t,e),e}function Opt(t){let e=Npt.exec(t);return e?e[1]:null}function ohe(t){if(t.semver===Fp.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case"":return{gt:[">=",t.semver],lt:["<=",t.semver]};case">":case">=":return{gt:[t.operator,t.semver],lt:null};case"<":case"<=":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function q8(t){if(t.length===0)return null;let e=null,r=null;for(let s of t){if(s.gt){let a=e!==null?Fp.default.compare(s.gt[1],e[1]):null;(a===null||a>0||a===0&&s.gt[0]===">")&&(e=s.gt)}if(s.lt){let a=r!==null?Fp.default.compare(s.lt[1],r[1]):null;(a===null||a<0||a===0&&s.lt[0]==="<")&&(r=s.lt)}}if(e&&r){let s=Fp.default.compare(e[1],r[1]);if(s===0&&(e[0]===">"||r[0]==="<")||s>0)return null}return{gt:e,lt:r}}function ahe(t){if(t.gt&&t.lt){if(t.gt[0]===">="&&t.lt[0]==="<="&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===">="&&t.lt[0]==="<"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(" "):"*"}function G8(t){let e=t.map(Lpt).map(s=>ul(s).set.map(a=>a.map(n=>ohe(n)))),r=e.shift().map(s=>q8(s)).filter(s=>s!==null);for(let s of e){let a=[];for(let n of r)for(let c of s){let f=q8([n,...c]);f!==null&&a.push(f)}r=a}return r.length===0?null:r.map(s=>ahe(s)).join(" || ")}function Lpt(t){let e=t.split("||");if(e.length>1){let r=new Set;for(let s of e)e.some(a=>a!==s&&Fp.default.subset(s,a))||r.add(s);if(r.size{Fp=et(Ai()),lhe=et(Ai()),ihe=new Map;she=new Map;Npt=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/});function che(t){let e=t.match(/^[ \t]+/m);return e?e[0]:" "}function uhe(t){return t.charCodeAt(0)===65279?t.slice(1):t}function Pa(t){return t.replace(/\\/g,"/")}function QQ(t,{yamlCompatibilityMode:e}){return e?s3(t):typeof t>"u"||typeof t=="boolean"?t:null}function fhe(t,e){let r=e.search(/[^!]/);if(r===-1)return"invalid";let s=r%2===0?"":"!",a=e.slice(r);return`${s}${t}=${a}`}function W8(t,e){return e.length===1?fhe(t,e[0]):`(${e.map(r=>fhe(t,r)).join(" | ")})`}var Ahe,Ht,sI=Ct(()=>{bt();Bc();Ahe=et(Ai());$d();kc();Np();Yo();Ht=class t{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static{this.fileName="package.json"}static{this.allDependencies=["dependencies","devDependencies","peerDependencies"]}static{this.hardDependencies=["dependencies","devDependencies"]}static async tryFind(e,{baseFs:r=new Yn}={}){let s=K.join(e,"package.json");try{return await t.fromFile(s,{baseFs:r})}catch(a){if(a.code==="ENOENT")return null;throw a}}static async find(e,{baseFs:r}={}){let s=await t.tryFind(e,{baseFs:r});if(s===null)throw new Error("Manifest not found");return s}static async fromFile(e,{baseFs:r=new Yn}={}){let s=new t;return await s.loadFile(e,{baseFs:r}),s}static fromText(e){let r=new t;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(uhe(e)||"{}")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(r),this.indent=che(e)}async loadFile(e,{baseFs:r=new Yn}){let s=await r.readFilePromise(e,"utf8"),a;try{a=JSON.parse(uhe(s)||"{}")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=che(s)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let s=[];if(this.name=null,typeof e.name=="string")try{this.name=Da(e.name)}catch{s.push(new Error("Parsing failed for the 'name' field"))}if(typeof e.version=="string"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let c of e.os)typeof c!="string"?s.push(new Error("Parsing failed for the 'os' field")):n.push(c)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let c of e.cpu)typeof c!="string"?s.push(new Error("Parsing failed for the 'cpu' field")):n.push(c)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let c of e.libc)typeof c!="string"?s.push(new Error("Parsing failed for the 'libc' field")):n.push(c)}else this.libc=null;if(typeof e.type=="string"?this.type=e.type:this.type=null,typeof e.packageManager=="string"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private=="boolean"?this.private=e.private:this.private=!1,typeof e.license=="string"?this.license=e.license:this.license=null,typeof e.languageName=="string"?this.languageName=e.languageName:this.languageName=null,typeof e.main=="string"?this.main=Pa(e.main):this.main=null,typeof e.module=="string"?this.module=Pa(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=Pa(e.browser);else{this.browser=new Map;for(let[n,c]of Object.entries(e.browser))this.browser.set(Pa(n),typeof c=="string"?Pa(c):c)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")e.bin.trim()===""?s.push(new Error("Invalid bin field")):this.name!==null?this.bin.set(this.name.name,Pa(e.bin)):s.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[n,c]of Object.entries(e.bin)){if(typeof c!="string"||c.trim()===""){s.push(new Error(`Invalid bin definition for '${n}'`));continue}let f=Da(n);this.bin.set(f.name,Pa(c))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[n,c]of Object.entries(e.scripts)){if(typeof c!="string"){s.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,c)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[n,c]of Object.entries(e.dependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[n,c]of Object.entries(e.devDependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[n,c]of Object.entries(e.peerDependencies)){let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof c!="string"||!c.startsWith(Ei.protocol)&&!ul(c))&&(s.push(new Error(`Invalid dependency range for '${n}'`)),c="*");let p=On(f,c);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces=="object"&&e.workspaces!==null&&e.workspaces.nohoist&&s.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces=="object"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!="string"){s.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[n,c]of Object.entries(e.dependenciesMeta)){if(typeof c!="object"||c===null){s.push(new Error(`Invalid meta field for '${n}`));continue}let f=I0(n),p=this.ensureDependencyMeta(f),h=QQ(c.built,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=QQ(c.optional,{yamlCompatibilityMode:r});if(E===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}let C=QQ(c.unplugged,{yamlCompatibilityMode:r});if(C===null){s.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:C})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[n,c]of Object.entries(e.peerDependenciesMeta)){if(typeof c!="object"||c===null){s.push(new Error(`Invalid meta field for '${n}'`));continue}let f=I0(n),p=this.ensurePeerDependencyMeta(f),h=QQ(c.optional,{yamlCompatibilityMode:r});if(h===null){s.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[n,c]of Object.entries(e.resolutions)){if(typeof c!="string"){s.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:Cx(n),reference:c})}catch(f){s.push(f);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!="string"){s.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig=="object"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access=="string"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main=="string"&&(this.publishConfig.main=Pa(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=Pa(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=Pa(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,c]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(Pa(n),typeof c=="string"?Pa(c):c)}if(typeof e.publishConfig.registry=="string"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.provenance=="boolean"&&(this.publishConfig.provenance=e.publishConfig.provenance),typeof e.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,Pa(e.publishConfig.bin)]]):s.push(new Error("String bin field, but no attached package name"));else if(typeof e.publishConfig.bin=="object"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,c]of Object.entries(e.publishConfig.bin)){if(typeof c!="string"){s.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,Pa(c))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!="string"){s.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add(Pa(n))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:s.push(new Error("Invalid hoisting limits definition")):n=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:s.push(new Error("Invalid selfReferences definition, must be a boolean value")):s.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[n,c]of Object.entries(e.optionalDependencies)){if(typeof c!="string"){s.push(new Error(`Invalid dependency range for '${n}'`));continue}let f;try{f=Da(n)}catch{s.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=On(f,c);this.dependencies.set(p.identHash,p);let h=On(f,"unknown"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=s}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(W8("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(W8("cpu",this.cpu)),this.libc&&this.libc.length>0&&e.push(W8("libc",this.libc)),e.length>0?e.join(" & "):null}ensureDependencyMeta(e){if(e.range!=="unknown"&&!Ahe.default.valid(e.range))throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=e.range!=="unknown"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(s);return n||a.set(s,n={}),n}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${ll(e)}'`);let r=cn(e),s=this.peerDependenciesMeta.get(r);return s||this.peerDependenciesMeta.set(r,s={}),s}setRawField(e,r,{after:s=[]}={}){let a=new Set(s.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,c=this.raw={},f=!1;for(let p of Object.keys(n))c[p]=n[p],f||(a.delete(p),a.size===0&&(c[e]=r,f=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=cn(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n=="string"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(c=>({[c]:n.get(c)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let s=[],a=[];for(let n of this.dependencies.values()){let c=this.dependenciesMeta.get(cn(n)),f=!1;if(r&&c){let p=c.get(null);p&&p.optional&&(f=!0)}f?a.push(n):s.push(n)}s.length>0?e.dependencies=Object.assign({},...iI(s).map(n=>({[cn(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...iI(a).map(n=>({[cn(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...iI(this.devDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...iI(this.peerDependencies.values()).map(n=>({[cn(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,c]of Ys(this.dependenciesMeta.entries(),([f,p])=>f))for(let[f,p]of Ys(c.entries(),([h,E])=>h!==null?`0${h}`:"1")){let h=f!==null?ll(On(Da(n),f)):n,E={...p};r&&f===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...Ys(this.peerDependenciesMeta.entries(),([n,c])=>n).map(([n,c])=>({[n]:c}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:c})=>({[wx(n)]:c}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,c]of this.scripts.entries())e.scripts[n]=c}else delete e.scripts;return e}}});var hhe=L((tJt,phe)=>{var Mpt=Pc(),_pt=function(){return Mpt.Date.now()};phe.exports=_pt});var dhe=L((rJt,ghe)=>{var Upt=/\s/;function Hpt(t){for(var e=t.length;e--&&Upt.test(t.charAt(e)););return e}ghe.exports=Hpt});var yhe=L((nJt,mhe)=>{var jpt=dhe(),qpt=/^\s+/;function Gpt(t){return t&&t.slice(0,jpt(t)+1).replace(qpt,"")}mhe.exports=Gpt});var oI=L((iJt,Ehe)=>{var Wpt=Wd(),Ypt=zf(),Vpt="[object Symbol]";function Kpt(t){return typeof t=="symbol"||Ypt(t)&&Wpt(t)==Vpt}Ehe.exports=Kpt});var Bhe=L((sJt,whe)=>{var Jpt=yhe(),Ihe=Wl(),zpt=oI(),Che=NaN,Zpt=/^[-+]0x[0-9a-f]+$/i,Xpt=/^0b[01]+$/i,$pt=/^0o[0-7]+$/i,eht=parseInt;function tht(t){if(typeof t=="number")return t;if(zpt(t))return Che;if(Ihe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ihe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Jpt(t);var r=Xpt.test(t);return r||$pt.test(t)?eht(t.slice(2),r?2:8):Zpt.test(t)?Che:+t}whe.exports=tht});var Dhe=L((oJt,She)=>{var rht=Wl(),Y8=hhe(),vhe=Bhe(),nht="Expected a function",iht=Math.max,sht=Math.min;function oht(t,e,r){var s,a,n,c,f,p,h=0,E=!1,C=!1,S=!0;if(typeof t!="function")throw new TypeError(nht);e=vhe(e)||0,rht(r)&&(E=!!r.leading,C="maxWait"in r,n=C?iht(vhe(r.maxWait)||0,e):n,S="trailing"in r?!!r.trailing:S);function P(ce){var me=s,pe=a;return s=a=void 0,h=ce,c=t.apply(pe,me),c}function I(ce){return h=ce,f=setTimeout(U,e),E?P(ce):c}function R(ce){var me=ce-p,pe=ce-h,Be=e-me;return C?sht(Be,n-pe):Be}function N(ce){var me=ce-p,pe=ce-h;return p===void 0||me>=e||me<0||C&&pe>=n}function U(){var ce=Y8();if(N(ce))return W(ce);f=setTimeout(U,R(ce))}function W(ce){return f=void 0,S&&s?P(ce):(s=a=void 0,c)}function te(){f!==void 0&&clearTimeout(f),h=0,s=p=a=f=void 0}function ie(){return f===void 0?c:W(Y8())}function Ae(){var ce=Y8(),me=N(ce);if(s=arguments,a=this,p=ce,me){if(f===void 0)return I(p);if(C)return clearTimeout(f),f=setTimeout(U,e),P(p)}return f===void 0&&(f=setTimeout(U,e)),c}return Ae.cancel=te,Ae.flush=ie,Ae}She.exports=oht});var V8=L((aJt,bhe)=>{var aht=Dhe(),lht=Wl(),cht="Expected a function";function uht(t,e,r){var s=!0,a=!0;if(typeof t!="function")throw new TypeError(cht);return lht(r)&&(s="leading"in r?!!r.leading:s,a="trailing"in r?!!r.trailing:a),aht(t,e,{leading:s,maxWait:e,trailing:a})}bhe.exports=uht});function Aht(t){return typeof t.reportCode<"u"}var Phe,xhe,khe,fht,Yt,ho,Fc=Ct(()=>{Phe=et(V8()),xhe=Ie("stream"),khe=Ie("string_decoder"),fht=15,Yt=class extends Error{constructor(r,s,a){super(s);this.reportExtra=a;this.reportCode=r}};ho=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,s,a=new Promise(p=>{s=p}),n=p=>{let h=s;a=new Promise(E=>{s=E}),r=p,h()},c=(p=0)=>{n(r+1)},f=async function*(){for(;r{r=c}),a=(0,Phe.default)(c=>{let f=r;s=new Promise(p=>{r=p}),e=c,f()},1e3/fht),n=async function*(){for(;;)await s,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let s=this.reportProgress(e);try{return await r(e)}finally{s.stop()}}startProgressSync(e,r){let s=this.reportProgress(e);try{return r(e)}finally{s.stop()}}reportInfoOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),s?.reportExtra?.(this))}reportWarningOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),s?.reportExtra?.(this))}reportErrorOnce(e,r,s){let a=s&&s.key?s.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),s?.reportExtra?.(this))}reportExceptionOnce(e){Aht(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new xhe.PassThrough,s=new khe.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(` +`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var aI,K8=Ct(()=>{Fc();Yo();aI=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new Yt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var em,J8=Ct(()=>{Yo();em=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ni(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var lI,z8=Ct(()=>{bt();Yo();lI=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Vs(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Vs(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return rI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(e),f=Ao.makeVirtualPath(n,c,a),p=new Hf(f,{baseFs:r.packageFs,pathUtils:K});return{...r,packageFs:p}}}});var TQ,Qhe=Ct(()=>{TQ=class t{static{this.protocol="virtual:"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var cI,Z8=Ct(()=>{bt();$d();cI=class{supports(e){return!!e.reference.startsWith(Ei.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Ei.protocol.length))}}});function $B(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function The(t){return typeof t>"u"?3:$B(t)?0:Array.isArray(t)?1:2}function eH(t,e){return Object.hasOwn(t,e)}function hht(t){return $B(t)&&eH(t,"onConflict")&&typeof t.onConflict=="string"}function ght(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!hht(t))return{onConflict:"default",value:t};if(eH(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function Rhe(t,e){let r=$B(t)&&eH(t,e)?t[e]:void 0;return ght(r)}function uI(t,e){return[t,e,Fhe]}function tH(t){return Array.isArray(t)?t[2]===Fhe:!1}function X8(t,e){if($B(t)){let r={};for(let s of Object.keys(t))r[s]=X8(t[s],e);return uI(e,r)}return Array.isArray(t)?uI(e,t.map(r=>X8(r,e))):uI(e,t)}function $8(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-1;E>=s;--E){let[C,S]=t[E],{onConflict:P,value:I}=Rhe(S,r),R=The(I);if(R!==3){if(n??=R,R!==n||P==="hardReset"){p=f;break}if(R===2)return uI(C,I);if(c.unshift([C,I]),P==="reset"){p=E;break}P==="extend"&&E===s&&(s=0),f=E}}if(typeof n>"u")return null;let h=c.map(([E])=>E).join(", ");switch(n){case 1:return uI(h,new Array().concat(...c.map(([E,C])=>C.map(S=>X8(S,E)))));case 0:{let E=Object.assign({},...c.map(([,R])=>R)),C=Object.keys(E),S={},P=t.map(([R,N])=>[R,Rhe(N,r).value]),I=pht(P,([R,N])=>{let U=The(N);return U!==0&&U!==3});if(I!==-1){let R=P.slice(I+1);for(let N of C)S[N]=$8(R,e,N,0,R.length)}else for(let R of C)S[R]=$8(P,e,R,p,P.length);return uI(h,S)}default:throw new Error("Assertion failed: Non-extendable value type")}}function Nhe(t){return $8(t.map(([e,r])=>[e,{".":r}]),[],".",0,t.length)}function ev(t){return tH(t)?t[1]:t}function RQ(t){let e=tH(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>RQ(r));if($B(e)){let r={};for(let[s,a]of Object.entries(e))r[s]=RQ(a);return r}return e}function rH(t){return tH(t)?t[0]:null}var pht,Fhe,Ohe=Ct(()=>{pht=(t,e,r)=>{let s=[...t];return s.reverse(),s.findIndex(e,r)};Fhe=Symbol()});var FQ={};Vt(FQ,{getDefaultGlobalFolder:()=>iH,getHomeFolder:()=>fI,isFolderInside:()=>sH});function iH(){if(process.platform==="win32"){let t=ue.toPortablePath(process.env.LOCALAPPDATA||ue.join((0,nH.homedir)(),"AppData","Local"));return K.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=ue.toPortablePath(process.env.XDG_DATA_HOME);return K.resolve(t,"yarn/berry")}return K.resolve(fI(),".yarn/berry")}function fI(){return ue.toPortablePath((0,nH.homedir)()||"/usr/local/share")}function sH(t,e){let r=K.relative(e,t);return r&&!r.startsWith("..")&&!K.isAbsolute(r)}var nH,NQ=Ct(()=>{bt();nH=Ie("os")});var _he=L((IJt,Mhe)=>{"use strict";var oH=Ie("https"),aH=Ie("http"),{URL:Lhe}=Ie("url"),lH=class extends aH.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r=="string"?new Lhe(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol==="http:"?aH:oH).request(s);a.once("connect",(n,c,f)=>{a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200?r(null,c):(c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),a.once("timeout",()=>{a.destroy(new Error("Proxy timeout"))}),a.once("error",n=>{a.removeAllListeners(),r(n,null)}),a.end()}},cH=class extends oH.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...a}=e;super(a),this.proxy=typeof r=="string"?new Lhe(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let a=(this.proxy.protocol==="http:"?aH:oH).request(s);a.once("connect",(n,c,f)=>{if(a.removeAllListeners(),c.removeAllListeners(),n.statusCode===200){let p=super.createConnection({...e,socket:c});r(null,p)}else c.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),a.once("timeout",()=>{a.destroy(new Error("Proxy timeout"))}),a.once("error",n=>{a.removeAllListeners(),r(n,null)}),a.end()}};Mhe.exports={HttpProxyAgent:lH,HttpsProxyAgent:cH}});var uH,Uhe,Hhe,jhe=Ct(()=>{uH=et(_he(),1),Uhe=uH.default.HttpProxyAgent,Hhe=uH.default.HttpsProxyAgent});var Lp=L((Op,OQ)=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var qhe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function mht(t){return qhe.includes(t)}var yht=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...qhe];function Eht(t){return yht.includes(t)}var Iht=["null","undefined","string","number","bigint","boolean","symbol"];function Cht(t){return Iht.includes(t)}function AI(t){return e=>typeof e===t}var{toString:Ghe}=Object.prototype,tv=t=>{let e=Ghe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&be.domElement(t))return"HTMLElement";if(Eht(e))return e},pi=t=>e=>tv(e)===t;function be(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(be.observable(t))return"Observable";if(be.array(t))return"Array";if(be.buffer(t))return"Buffer";let e=tv(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}be.undefined=AI("undefined");be.string=AI("string");var wht=AI("number");be.number=t=>wht(t)&&!be.nan(t);be.bigint=AI("bigint");be.function_=AI("function");be.null_=t=>t===null;be.class_=t=>be.function_(t)&&t.toString().startsWith("class ");be.boolean=t=>t===!0||t===!1;be.symbol=AI("symbol");be.numericString=t=>be.string(t)&&!be.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));be.array=(t,e)=>Array.isArray(t)?be.function_(e)?t.every(e):!0:!1;be.buffer=t=>{var e,r,s,a;return(a=(s=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,t))!==null&&a!==void 0?a:!1};be.blob=t=>pi("Blob")(t);be.nullOrUndefined=t=>be.null_(t)||be.undefined(t);be.object=t=>!be.null_(t)&&(typeof t=="object"||be.function_(t));be.iterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};be.asyncIterable=t=>{var e;return be.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};be.generator=t=>{var e,r;return be.iterable(t)&&be.function_((e=t)===null||e===void 0?void 0:e.next)&&be.function_((r=t)===null||r===void 0?void 0:r.throw)};be.asyncGenerator=t=>be.asyncIterable(t)&&be.function_(t.next)&&be.function_(t.throw);be.nativePromise=t=>pi("Promise")(t);var Bht=t=>{var e,r;return be.function_((e=t)===null||e===void 0?void 0:e.then)&&be.function_((r=t)===null||r===void 0?void 0:r.catch)};be.promise=t=>be.nativePromise(t)||Bht(t);be.generatorFunction=pi("GeneratorFunction");be.asyncGeneratorFunction=t=>tv(t)==="AsyncGeneratorFunction";be.asyncFunction=t=>tv(t)==="AsyncFunction";be.boundFunction=t=>be.function_(t)&&!t.hasOwnProperty("prototype");be.regExp=pi("RegExp");be.date=pi("Date");be.error=pi("Error");be.map=t=>pi("Map")(t);be.set=t=>pi("Set")(t);be.weakMap=t=>pi("WeakMap")(t);be.weakSet=t=>pi("WeakSet")(t);be.int8Array=pi("Int8Array");be.uint8Array=pi("Uint8Array");be.uint8ClampedArray=pi("Uint8ClampedArray");be.int16Array=pi("Int16Array");be.uint16Array=pi("Uint16Array");be.int32Array=pi("Int32Array");be.uint32Array=pi("Uint32Array");be.float32Array=pi("Float32Array");be.float64Array=pi("Float64Array");be.bigInt64Array=pi("BigInt64Array");be.bigUint64Array=pi("BigUint64Array");be.arrayBuffer=pi("ArrayBuffer");be.sharedArrayBuffer=pi("SharedArrayBuffer");be.dataView=pi("DataView");be.enumCase=(t,e)=>Object.values(e).includes(t);be.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;be.urlInstance=t=>pi("URL")(t);be.urlString=t=>{if(!be.string(t))return!1;try{return new URL(t),!0}catch{return!1}};be.truthy=t=>!!t;be.falsy=t=>!t;be.nan=t=>Number.isNaN(t);be.primitive=t=>be.null_(t)||Cht(typeof t);be.integer=t=>Number.isInteger(t);be.safeInteger=t=>Number.isSafeInteger(t);be.plainObject=t=>{if(Ghe.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};be.typedArray=t=>mht(tv(t));var vht=t=>be.safeInteger(t)&&t>=0;be.arrayLike=t=>!be.nullOrUndefined(t)&&!be.function_(t)&&vht(t.length);be.inRange=(t,e)=>{if(be.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(be.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Sht=1,Dht=["innerHTML","ownerDocument","style","attributes","nodeValue"];be.domElement=t=>be.object(t)&&t.nodeType===Sht&&be.string(t.nodeName)&&!be.plainObject(t)&&Dht.every(e=>e in t);be.observable=t=>{var e,r,s,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(s=t)["@@observable"])===null||a===void 0?void 0:a.call(s)):!1};be.nodeStream=t=>be.object(t)&&be.function_(t.pipe)&&!be.observable(t);be.infinite=t=>t===1/0||t===-1/0;var Whe=t=>e=>be.integer(e)&&Math.abs(e%2)===t;be.evenInteger=Whe(0);be.oddInteger=Whe(1);be.emptyArray=t=>be.array(t)&&t.length===0;be.nonEmptyArray=t=>be.array(t)&&t.length>0;be.emptyString=t=>be.string(t)&&t.length===0;var bht=t=>be.string(t)&&!/\S/.test(t);be.emptyStringOrWhitespace=t=>be.emptyString(t)||bht(t);be.nonEmptyString=t=>be.string(t)&&t.length>0;be.nonEmptyStringAndNotWhitespace=t=>be.string(t)&&!be.emptyStringOrWhitespace(t);be.emptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length===0;be.nonEmptyObject=t=>be.object(t)&&!be.map(t)&&!be.set(t)&&Object.keys(t).length>0;be.emptySet=t=>be.set(t)&&t.size===0;be.nonEmptySet=t=>be.set(t)&&t.size>0;be.emptyMap=t=>be.map(t)&&t.size===0;be.nonEmptyMap=t=>be.map(t)&&t.size>0;be.propertyKey=t=>be.any([be.string,be.number,be.symbol],t);be.formData=t=>pi("FormData")(t);be.urlSearchParams=t=>pi("URLSearchParams")(t);var Yhe=(t,e,r)=>{if(!be.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};be.any=(t,...e)=>(be.array(t)?t:[t]).some(s=>Yhe(Array.prototype.some,s,e));be.all=(t,...e)=>Yhe(Array.prototype.every,t,e);var _t=(t,e,r,s={})=>{if(!t){let{multipleValues:a}=s,n=a?`received values of types ${[...new Set(r.map(c=>`\`${be(c)}\``))].join(", ")}`:`received value of type \`${be(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}};Op.assert={undefined:t=>_t(be.undefined(t),"undefined",t),string:t=>_t(be.string(t),"string",t),number:t=>_t(be.number(t),"number",t),bigint:t=>_t(be.bigint(t),"bigint",t),function_:t=>_t(be.function_(t),"Function",t),null_:t=>_t(be.null_(t),"null",t),class_:t=>_t(be.class_(t),"Class",t),boolean:t=>_t(be.boolean(t),"boolean",t),symbol:t=>_t(be.symbol(t),"symbol",t),numericString:t=>_t(be.numericString(t),"string with a number",t),array:(t,e)=>{_t(be.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>_t(be.buffer(t),"Buffer",t),blob:t=>_t(be.blob(t),"Blob",t),nullOrUndefined:t=>_t(be.nullOrUndefined(t),"null or undefined",t),object:t=>_t(be.object(t),"Object",t),iterable:t=>_t(be.iterable(t),"Iterable",t),asyncIterable:t=>_t(be.asyncIterable(t),"AsyncIterable",t),generator:t=>_t(be.generator(t),"Generator",t),asyncGenerator:t=>_t(be.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>_t(be.nativePromise(t),"native Promise",t),promise:t=>_t(be.promise(t),"Promise",t),generatorFunction:t=>_t(be.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>_t(be.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>_t(be.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>_t(be.boundFunction(t),"Function",t),regExp:t=>_t(be.regExp(t),"RegExp",t),date:t=>_t(be.date(t),"Date",t),error:t=>_t(be.error(t),"Error",t),map:t=>_t(be.map(t),"Map",t),set:t=>_t(be.set(t),"Set",t),weakMap:t=>_t(be.weakMap(t),"WeakMap",t),weakSet:t=>_t(be.weakSet(t),"WeakSet",t),int8Array:t=>_t(be.int8Array(t),"Int8Array",t),uint8Array:t=>_t(be.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>_t(be.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>_t(be.int16Array(t),"Int16Array",t),uint16Array:t=>_t(be.uint16Array(t),"Uint16Array",t),int32Array:t=>_t(be.int32Array(t),"Int32Array",t),uint32Array:t=>_t(be.uint32Array(t),"Uint32Array",t),float32Array:t=>_t(be.float32Array(t),"Float32Array",t),float64Array:t=>_t(be.float64Array(t),"Float64Array",t),bigInt64Array:t=>_t(be.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>_t(be.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>_t(be.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>_t(be.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>_t(be.dataView(t),"DataView",t),enumCase:(t,e)=>_t(be.enumCase(t,e),"EnumCase",t),urlInstance:t=>_t(be.urlInstance(t),"URL",t),urlString:t=>_t(be.urlString(t),"string with a URL",t),truthy:t=>_t(be.truthy(t),"truthy",t),falsy:t=>_t(be.falsy(t),"falsy",t),nan:t=>_t(be.nan(t),"NaN",t),primitive:t=>_t(be.primitive(t),"primitive",t),integer:t=>_t(be.integer(t),"integer",t),safeInteger:t=>_t(be.safeInteger(t),"integer",t),plainObject:t=>_t(be.plainObject(t),"plain object",t),typedArray:t=>_t(be.typedArray(t),"TypedArray",t),arrayLike:t=>_t(be.arrayLike(t),"array-like",t),domElement:t=>_t(be.domElement(t),"HTMLElement",t),observable:t=>_t(be.observable(t),"Observable",t),nodeStream:t=>_t(be.nodeStream(t),"Node.js Stream",t),infinite:t=>_t(be.infinite(t),"infinite number",t),emptyArray:t=>_t(be.emptyArray(t),"empty array",t),nonEmptyArray:t=>_t(be.nonEmptyArray(t),"non-empty array",t),emptyString:t=>_t(be.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>_t(be.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>_t(be.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>_t(be.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>_t(be.emptyObject(t),"empty object",t),nonEmptyObject:t=>_t(be.nonEmptyObject(t),"non-empty object",t),emptySet:t=>_t(be.emptySet(t),"empty set",t),nonEmptySet:t=>_t(be.nonEmptySet(t),"non-empty set",t),emptyMap:t=>_t(be.emptyMap(t),"empty map",t),nonEmptyMap:t=>_t(be.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>_t(be.propertyKey(t),"PropertyKey",t),formData:t=>_t(be.formData(t),"FormData",t),urlSearchParams:t=>_t(be.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>_t(be.evenInteger(t),"even integer",t),oddInteger:t=>_t(be.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>_t(be.directInstanceOf(t,e),"T",t),inRange:(t,e)=>_t(be.inRange(t,e),"in range",t),any:(t,...e)=>_t(be.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>_t(be.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(be,{class:{value:be.class_},function:{value:be.function_},null:{value:be.null_}});Object.defineProperties(Op.assert,{class:{value:Op.assert.class_},function:{value:Op.assert.function_},null:{value:Op.assert.null_}});Op.default=be;OQ.exports=be;OQ.exports.default=be;OQ.exports.assert=Op.assert});var Vhe=L((wJt,fH)=>{"use strict";var LQ=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},MQ=class t{static fn(e){return(...r)=>new t((s,a,n)=>{r.push(n),e(...r).then(s,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,s)=>{this._reject=s;let a=f=>{this._isPending=!1,r(f)},n=f=>{this._isPending=!1,s(f)},c=f=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(f)};return Object.defineProperties(c,{shouldReject:{get:()=>this._rejectOnCancel,set:f=>{this._rejectOnCancel=f}}}),e(a,n,c)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new LQ(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(MQ.prototype,Promise.prototype);fH.exports=MQ;fH.exports.CancelError=LQ});var Khe=L((pH,hH)=>{"use strict";Object.defineProperty(pH,"__esModule",{value:!0});function Pht(t){return t.encrypted}var AH=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let s=typeof r.connect=="function",a=typeof r.secureConnect=="function",n=typeof r.close=="function",c=()=>{s&&r.connect(),Pht(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close)};t.writable&&!t.connecting?c():t.connecting?t.once("connect",c):t.destroyed&&n&&r.close(t._hadError)};pH.default=AH;hH.exports=AH;hH.exports.default=AH});var Jhe=L((dH,mH)=>{"use strict";Object.defineProperty(dH,"__esModule",{value:!0});var xht=Khe(),kht=Number(process.versions.node.split(".")[0]),gH=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=c=>{let f=c.emit.bind(c);c.emit=(p,...h)=>(p==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,c.emit=f),f(p,...h))};r(t),t.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||kht>=13)&&(e.phases.total=Date.now()-e.start)});let s=c=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let f=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};c.prependOnceListener("lookup",f),xht.default(c,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(c.removeListener("lookup",f),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?s(t.socket):t.prependOnceListener("socket",s);let a=()=>{var c;e.upload=Date.now(),e.phases.request=e.upload-(c=e.secureConnect,c??e.connect)};return(typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))?a():t.prependOnceListener("finish",a),t.prependOnceListener("response",c=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,c.timings=e,r(c),c.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};dH.default=gH;mH.exports=gH;mH.exports.default=gH});var r0e=L((BJt,IH)=>{"use strict";var{V4MAPPED:Qht,ADDRCONFIG:Tht,ALL:t0e,promises:{Resolver:zhe},lookup:Rht}=Ie("dns"),{promisify:yH}=Ie("util"),Fht=Ie("os"),pI=Symbol("cacheableLookupCreateConnection"),EH=Symbol("cacheableLookupInstance"),Zhe=Symbol("expires"),Nht=typeof t0e=="number",Xhe=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},Oht=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},$he=()=>{let t=!1,e=!1;for(let r of Object.values(Fht.networkInterfaces()))for(let s of r)if(!s.internal&&(s.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Lht=t=>Symbol.iterator in t,e0e={ttl:!0},Mht={all:!0},_Q=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:s=3600,errorTtl:a=.15,resolver:n=new zhe,lookup:c=Rht}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=yH(c),this._resolver instanceof zhe?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=yH(this._resolver.resolve4.bind(this._resolver)),this._resolve6=yH(this._resolver.resolve6.bind(this._resolver))),this._iface=$he(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,s<1)this._fallback=!1;else{this._fallback=!0;let f=setInterval(()=>{this._hostnamesToFallback.clear()},s*1e3);f.unref&&f.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,s){if(typeof r=="function"?(s=r,r={}):typeof r=="number"&&(r={family:r}),!s)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(a=>{r.all?s(null,a):s(null,a.address,a.family,a.expires,a.ttl)},s)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let s=await this.query(e);if(r.family===6){let a=s.filter(n=>n.family===6);r.hints&Qht&&(Nht&&r.hints&t0e||a.length===0)?Oht(s):s=a}else r.family===4&&(s=s.filter(a=>a.family===4));if(r.hints&Tht){let{_iface:a}=this;s=s.filter(n=>n.family===6?a.has6:a.has4)}if(s.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code="ENOTFOUND",a.hostname=e,a}return r.all?s:s[0]}async query(e){let r=await this._cache.get(e);if(!r){let s=this._pending[e];if(s)r=await s;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(s=>({...s})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code==="ENODATA"||E.code==="ENOTFOUND")return[];throw E}},[s,a]=await Promise.all([this._resolve4(e,e0e),this._resolve6(e,e0e)].map(h=>r(h))),n=0,c=0,f=0,p=Date.now();for(let h of s)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,c=Math.max(c,h.ttl);return s.length>0?a.length>0?f=Math.min(n,c):f=n:f=c,{entries:[...s,...a],cacheTtl:f}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,s){if(this.maxTtl>0&&s>0){s=Math.min(s,this.maxTtl)*1e3,r[Zhe]=Date.now()+s;try{await this._cache.set(e,r,s)}catch(a){this.lookupAsync=async()=>{let n=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw n.cause=a,n}}Lht(this._cache)&&this._tick(s)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Mht);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let s=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,s),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e{this._nextRemovalTime=!1;let s=1/0,a=Date.now();for(let[n,c]of this._cache){let f=c[Zhe];a>=f?this._cache.delete(n):f("lookup"in r||(r.lookup=this.lookup),e[pI](r,s))}uninstall(e){if(Xhe(e),e[pI]){if(e[EH]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[pI],delete e[pI],delete e[EH]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=$he(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};IH.exports=_Q;IH.exports.default=_Q});var s0e=L((vJt,CH)=>{"use strict";var _ht=typeof URL>"u"?Ie("url").URL:URL,Uht="text/plain",Hht="us-ascii",n0e=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),jht=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let s=r[1].split(";"),a=r[2],n=e?"":r[3],c=!1;s[s.length-1]==="base64"&&(s.pop(),c=!0);let f=(s.shift()||"").toLowerCase(),h=[...s.map(E=>{let[C,S=""]=E.split("=").map(P=>P.trim());return C==="charset"&&(S=S.toLowerCase(),S===Hht)?"":`${C}${S?`=${S}`:""}`}).filter(Boolean)];return c&&h.push("base64"),(h.length!==0||f&&f!==Uht)&&h.unshift(f),`data:${h.join(";")},${c?a.trim():a}${n?`#${n}`:""}`},i0e=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(e,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(e,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(t=t.trim(),/^data:/i.test(t))return jht(t,e);let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new _ht(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash&&(a.hash=""),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\/{2,}/g,(n,c)=>/^(?!\/)/g.test(c)?`${c}/`:"/")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split("/"),c=n[n.length-1];n0e(c,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])n0e(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),t=a.toString(),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};CH.exports=i0e;CH.exports.default=i0e});var l0e=L((SJt,a0e)=>{a0e.exports=o0e;function o0e(t,e){if(t&&e)return o0e(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(s){r[s]=t[s]}),r;function r(){for(var s=new Array(arguments.length),a=0;a{var c0e=l0e();wH.exports=c0e(UQ);wH.exports.strict=c0e(u0e);UQ.proto=UQ(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return UQ(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return u0e(this)},configurable:!0})});function UQ(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function u0e(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var vH=L((bJt,A0e)=>{var qht=BH(),Ght=function(){},Wht=function(t){return t.setHeader&&typeof t.abort=="function"},Yht=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},f0e=function(t,e,r){if(typeof e=="function")return f0e(t,null,e);e||(e={}),r=qht(r||Ght);var s=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,c=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||p()},p=function(){c=!1,n||r.call(t)},h=function(){n=!1,c||r.call(t)},E=function(I){r.call(t,I?new Error("exited with error code: "+I):null)},C=function(I){r.call(t,I)},S=function(){if(n&&!(a&&a.ended))return r.call(t,new Error("premature close"));if(c&&!(s&&s.ended))return r.call(t,new Error("premature close"))},P=function(){t.req.on("finish",p)};return Wht(t)?(t.on("complete",p),t.on("abort",S),t.req?P():t.on("request",P)):c&&!s&&(t.on("end",f),t.on("close",f)),Yht(t)&&t.on("exit",E),t.on("end",h),t.on("finish",p),e.error!==!1&&t.on("error",C),t.on("close",S),function(){t.removeListener("complete",p),t.removeListener("abort",S),t.removeListener("request",P),t.req&&t.req.removeListener("finish",p),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("exit",E),t.removeListener("end",h),t.removeListener("error",C),t.removeListener("close",S)}};A0e.exports=f0e});var g0e=L((PJt,h0e)=>{var Vht=BH(),Kht=vH(),SH=Ie("fs"),rv=function(){},Jht=/^v?\.0/.test(process.version),HQ=function(t){return typeof t=="function"},zht=function(t){return!Jht||!SH?!1:(t instanceof(SH.ReadStream||rv)||t instanceof(SH.WriteStream||rv))&&HQ(t.close)},Zht=function(t){return t.setHeader&&HQ(t.abort)},Xht=function(t,e,r,s){s=Vht(s);var a=!1;t.on("close",function(){a=!0}),Kht(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,zht(t))return t.close(rv);if(Zht(t))return t.abort();if(HQ(t.destroy))return t.destroy();s(c||new Error("stream was destroyed"))}}},p0e=function(t){t()},$ht=function(t,e){return t.pipe(e)},e0t=function(){var t=Array.prototype.slice.call(arguments),e=HQ(t[t.length-1]||rv)&&t.pop()||rv;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,s=t.map(function(a,n){var c=n0;return Xht(a,c,f,function(p){r||(r=p),p&&s.forEach(p0e),!c&&(s.forEach(p0e),e(r))})});return t.reduce($ht)};h0e.exports=e0t});var m0e=L((xJt,d0e)=>{"use strict";var{PassThrough:t0t}=Ie("stream");d0e.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,s=r==="buffer",a=!1;e?a=!(r||s):r=r||"utf8",s&&(r=null);let n=new t0t({objectMode:a});r&&n.setEncoding(r);let c=0,f=[];return n.on("data",p=>{f.push(p),a?c=f.length:c+=p.length}),n.getBufferedValue=()=>e?f:s?Buffer.concat(f,c):f.join(""),n.getBufferedLength=()=>c,n}});var y0e=L((kJt,hI)=>{"use strict";var r0t=g0e(),n0t=m0e(),jQ=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function qQ(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,s;return await new Promise((a,n)=>{let c=f=>{f&&(f.bufferedData=s.getBufferedValue()),n(f)};s=r0t(t,n0t(e),f=>{if(f){c(f);return}a()}),s.on("data",()=>{s.getBufferedLength()>r&&c(new jQ)})}),s.getBufferedValue()}hI.exports=qQ;hI.exports.default=qQ;hI.exports.buffer=(t,e)=>qQ(t,{...e,encoding:"buffer"});hI.exports.array=(t,e)=>qQ(t,{...e,array:!0});hI.exports.MaxBufferError=jQ});var I0e=L((TJt,E0e)=>{"use strict";var i0t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),s0t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),o0t=new Set([500,502,503,504]),a0t={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},l0t={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function tm(t){let e=parseInt(t,10);return isFinite(e)?e:0}function c0t(t){return t?o0t.has(t.status):!0}function DH(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let s of r){let[a,n]=s.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}function u0t(t){let e=[];for(let r in t){let s=t[r];e.push(s===!0?r:r+"="+s)}if(e.length)return e.join(", ")}E0e.exports=class{constructor(e,r,{shared:s,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:c,_fromObject:f}={}){if(f){this._fromObject(f);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=s!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=DH(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=DH(e.headers["cache-control"]),c&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":u0t(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&s0t.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||i0t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=DH(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let s of r)if(e.headers[s]!==this._reqHeaders[s])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let s in e)a0t[s]||(r[s]=e[s]);if(e.connection){let s=e.connection.trim().split(/\s*,\s*/);for(let a of s)delete r[a]}if(r.warning){let s=r.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));s.length?r.warning=s.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return tm(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return tm(this._rescc["s-maxage"])}if(this._rescc["max-age"])return tm(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let s=Date.parse(this._resHeaders.expires);return Number.isNaN(s)||ss)return Math.max(e,(r-s)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+tm(this._rescc["stale-if-error"]),s=e+tm(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,s)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+tm(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+tm(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let a=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));a.length?r["if-none-match"]=a.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&c0t(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let s=!1;if(r.status!==void 0&&r.status!=304?s=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?s=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?s=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?s=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(s=!0),!s)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let c in this._resHeaders)a[c]=c in r.headers&&!l0t[c]?r.headers[c]:this._resHeaders[c];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var GQ=L((RJt,C0e)=>{"use strict";C0e.exports=t=>{let e={};for(let[r,s]of Object.entries(t))e[r.toLowerCase()]=s;return e}});var B0e=L((FJt,w0e)=>{"use strict";var f0t=Ie("stream").Readable,A0t=GQ(),bH=class extends f0t{constructor(e,r,s,a){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(s instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=A0t(r),this.body=s,this.url=a}_read(){this.push(this.body),this.push(null)}};w0e.exports=bH});var S0e=L((NJt,v0e)=>{"use strict";var p0t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];v0e.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(p0t));for(let s of r)s in e||(e[s]=typeof t[s]=="function"?t[s].bind(t):t[s])}});var b0e=L((OJt,D0e)=>{"use strict";var h0t=Ie("stream").PassThrough,g0t=S0e(),d0t=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new h0t;return g0t(t,e),t.pipe(e)};D0e.exports=d0t});var P0e=L(PH=>{PH.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",s=Array.isArray(e);r=s?"[":"{";var a=!0;for(var n in e){var c=typeof e[n]=="function"||!s&&typeof e[n]>"u";Object.hasOwnProperty.call(e,n)&&!c&&(a||(r+=","),a=!1,s?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])))}return r+=s?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};PH.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var T0e=L((MJt,Q0e)=>{"use strict";var m0t=Ie("events"),x0e=P0e(),y0t=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(Ie(e[r]))(t)}return new Map},k0e=["sqlite","postgres","mysql","mongo","redis","tiered"],xH=class extends m0t{constructor(e,{emitErrors:r=!0,...s}={}){if(super(),this.opts={namespace:"keyv",serialize:x0e.stringify,deserialize:x0e.parse,...typeof e=="string"?{uri:e}:e,...s},!this.opts.store){let n={...this.opts};this.opts.store=y0t(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[c,f]of typeof n=="function"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(f);if(!(this.opts.store.namespace&&!c.includes(this.opts.store.namespace))){if(typeof p.expires=="number"&&Date.now()>p.expires){this.delete(c);continue}yield[this._getKeyUnprefix(c),p.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return k0e.includes(this.opts.store.opts.dialect)||k0e.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:s}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&s.getMany===void 0){let c=[];for(let f of n)c.push(Promise.resolve().then(()=>s.get(f)).then(p=>typeof p=="string"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires=="number"&&Date.now()>p.expires?this.delete(f).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(c).then(f=>{let p=[];for(let h of f)p.push(h.value);return p})}return Promise.resolve().then(()=>a?s.getMany(n):s.get(n)).then(c=>typeof c=="string"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return a?c.map((f,p)=>{if(typeof f=="string"&&(f=this.opts.deserialize(f)),f!=null){if(typeof f.expires=="number"&&Date.now()>f.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?f:f.value}}):typeof c.expires=="number"&&Date.now()>c.expires?this.delete(e).then(()=>{}):r&&r.raw?c:c.value})}set(e,r,s){let a=this._getKeyPrefix(e);typeof s>"u"&&(s=this.opts.ttl),s===0&&(s=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let c=typeof s=="number"?Date.now()+s:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:c},this.opts.serialize(r)}).then(c=>n.set(a,c,s)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let c of a)n.push(r.delete(c));return Promise.allSettled(n).then(c=>c.every(f=>f.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let s=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(s))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:s}=this.opts;return Promise.resolve().then(async()=>typeof s.has=="function"?s.has(r):await s.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};Q0e.exports=xH});var N0e=L((UJt,F0e)=>{"use strict";var E0t=Ie("events"),WQ=Ie("url"),I0t=s0e(),C0t=y0e(),kH=I0e(),R0e=B0e(),w0t=GQ(),B0t=b0e(),v0t=T0e(),nv=class t{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new v0t({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,s)=>{let a;if(typeof r=="string")a=QH(WQ.parse(r)),r={};else if(r instanceof WQ.URL)a=QH(WQ.parse(r.toString())),r={};else{let[C,...S]=(r.path||"").split("?"),P=S.length>0?`?${S.join("?")}`:"";a=QH({...r,pathname:C,search:P})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...S0t(a)},r.headers=w0t(r.headers);let n=new E0t,c=I0t(WQ.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${r.method}:${c}`,p=!1,h=!1,E=C=>{h=!0;let S=!1,P,I=new Promise(N=>{P=()=>{S||(S=!0,N())}}),R=N=>{if(p&&!C.forceRefresh){N.status=N.statusCode;let W=kH.fromObject(p.cachePolicy).revalidatedPolicy(C,N);if(!W.modified){let te=W.policy.responseHeaders();N=new R0e(p.statusCode,te,p.body,p.url),N.cachePolicy=W.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new kH(C,N,C),N.fromCache=!1);let U;C.cache&&N.cachePolicy.storable()?(U=B0t(N),(async()=>{try{let W=C0t.buffer(N);if(await Promise.race([I,new Promise(ce=>N.once("end",ce))]),S)return;let te=await W,ie={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:te},Ae=C.strictTtl?N.cachePolicy.timeToLive():void 0;C.maxTtl&&(Ae=Ae?Math.min(Ae,C.maxTtl):C.maxTtl),await this.cache.set(f,ie,Ae)}catch(W){n.emit("error",new t.CacheError(W))}})()):C.cache&&p&&(async()=>{try{await this.cache.delete(f)}catch(W){n.emit("error",new t.CacheError(W))}})(),n.emit("response",U||N),typeof s=="function"&&s(U||N)};try{let N=e(C,R);N.once("error",P),N.once("abort",P),n.emit("request",N)}catch(N){n.emit("error",new t.RequestError(N))}};return(async()=>{let C=async P=>{await Promise.resolve();let I=P.cache?await this.cache.get(f):void 0;if(typeof I>"u")return E(P);let R=kH.fromObject(I.cachePolicy);if(R.satisfiesWithoutRevalidation(P)&&!P.forceRefresh){let N=R.responseHeaders(),U=new R0e(I.statusCode,N,I.body,I.url);U.cachePolicy=R,U.fromCache=!0,n.emit("response",U),typeof s=="function"&&s(U)}else p=I,P.headers=R.revalidationHeaders(P),E(P)},S=P=>n.emit("error",new t.CacheError(P));this.cache.once("error",S),n.on("response",()=>this.cache.removeListener("error",S));try{await C(r)}catch(P){r.automaticFailover&&!h&&E(r),n.emit("error",new t.CacheError(P))}})(),n}}};function S0t(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function QH(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}nv.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};nv.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};F0e.exports=nv});var L0e=L((qJt,O0e)=>{"use strict";var D0t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];O0e.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(D0t)),s={};for(let a of r)a in e||(s[a]={get(){let n=t[a];return typeof n=="function"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,s),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var _0e=L((GJt,M0e)=>{"use strict";var{Transform:b0t,PassThrough:P0t}=Ie("stream"),TH=Ie("zlib"),x0t=L0e();M0e.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof TH.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let s=!0,a=new b0t({transform(f,p,h){s=!1,h(null,f)},flush(f){f()}}),n=new P0t({autoDestroy:!1,destroy(f,p){t.destroy(),p(f)}}),c=r?TH.createBrotliDecompress():TH.createUnzip();return c.once("error",f=>{if(s&&!t.readable){n.end();return}n.destroy(f)}),x0t(t,n),t.pipe(a).pipe(c).pipe(n),n}});var FH=L((WJt,U0e)=>{"use strict";var RH=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[s,a]of this.oldCache.entries())this.onEviction(s,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};U0e.exports=RH});var OH=L((YJt,G0e)=>{"use strict";var k0t=Ie("events"),Q0t=Ie("tls"),T0t=Ie("http2"),R0t=FH(),xa=Symbol("currentStreamsCount"),H0e=Symbol("request"),Nc=Symbol("cachedOriginSet"),gI=Symbol("gracefullyClosing"),F0t=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],N0t=(t,e,r)=>{let s=0,a=t.length;for(;s>>1;r(t[n],e)?s=n+1:a=n}return s},O0t=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,NH=(t,e)=>{for(let r of t)r[Nc].lengthe[Nc].includes(s))&&r[xa]+e[xa]<=e.remoteSettings.maxConcurrentStreams&&q0e(r)},L0t=(t,e)=>{for(let r of t)e[Nc].lengthr[Nc].includes(s))&&e[xa]+r[xa]<=r.remoteSettings.maxConcurrentStreams&&q0e(e)},j0e=({agent:t,isFree:e})=>{let r={};for(let s in t.sessions){let n=t.sessions[s].filter(c=>{let f=c[rm.kCurrentStreamsCount]{t[gI]=!0,t[xa]===0&&t.close()},rm=class t extends k0t{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:s=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=s,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new R0t({maxSize:a})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let s of F0t)e[s]&&(r+=`:${e[s]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let s=this.queue[e][r];this._sessionsCount{Array.isArray(s)?(s=[...s],a()):s=[{resolve:a,reject:n}];let c=this.normalizeOptions(r),f=t.normalizeOrigin(e,r&&r.servername);if(f===void 0){for(let{reject:E}of s)E(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(c in this.sessions){let E=this.sessions[c],C=-1,S=-1,P;for(let I of E){let R=I.remoteSettings.maxConcurrentStreams;if(R=R||I[gI]||I.destroyed)continue;P||(C=R),N>S&&(P=I,S=N)}}if(P){if(s.length!==1){for(let{reject:I}of s){let R=new Error(`Expected the length of listeners to be 1, got ${s.length}. +Please report this to https://github.com/szmarczak/http2-wrapper/`);I(R)}return}s[0].resolve(P);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,C=!1;try{let S=T0t.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[xa]=0,S[gI]=!1;let P=()=>S[xa]{this.tlsSessionCache.set(E,N)}),S.once("error",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once("close",()=>{if(C){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let R=()=>{if(!(!(c in this.queue)||!P())){for(let N of S[Nc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&P();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!P())break}}};S.on("origin",()=>{S[Nc]=S.originSet,P()&&(R(),NH(this.sessions[c],S))}),S.once("remoteSettings",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of s)U.reject(N);S.destroy();return}S[Nc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(N0t(U,S,O0t),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,C=!0,this.emit("session",S),R(),p(),S[xa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on("remoteSettings",()=>{R(),NH(this.sessions[c],S)})}),S[H0e]=S.request,S.request=(N,U)=>{if(S[gI])throw new Error("The session is gracefully closing. No new streams are allowed.");let W=S[H0e](N,U);return S.ref(),++S[xa],S[xa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once("close",()=>{if(I=P(),--S[xa],!S.destroyed&&!S.closed&&(L0t(this.sessions[c],S),P()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let te=S[xa]===0;te&&S.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||S[gI])?S.close():(NH(this.sessions[c],S),R())}}),W}}catch(S){for(let P of s)P.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Q0t.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[xa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return j0e({agent:this,isFree:!0})}get busySessions(){return j0e({agent:this,isFree:!1})}};rm.kCurrentStreamsCount=xa;rm.kGracefullyClosing=gI;G0e.exports={Agent:rm,globalAgent:new rm}});var MH=L((VJt,W0e)=>{"use strict";var{Readable:M0t}=Ie("stream"),LH=class extends M0t{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};W0e.exports=LH});var _H=L((KJt,Y0e)=>{"use strict";Y0e.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var K0e=L((JJt,V0e)=>{"use strict";V0e.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var z0e=L((zJt,J0e)=>{"use strict";J0e.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var X0e=L((XJt,Z0e)=>{"use strict";var dI=(t,e,r)=>{Z0e.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};dI(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],s=Array.isArray(r);return s&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${s?"one of":"of"} type ${r}. Received ${typeof t[2]}`});dI(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);dI(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);dI(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);dI(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);dI(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var GH=L(($Jt,sge)=>{"use strict";var _0t=Ie("http2"),{Writable:U0t}=Ie("stream"),{Agent:$0e,globalAgent:H0t}=OH(),j0t=MH(),q0t=_H(),G0t=K0e(),W0t=z0e(),{ERR_INVALID_ARG_TYPE:UH,ERR_INVALID_PROTOCOL:Y0t,ERR_HTTP_HEADERS_SENT:ege,ERR_INVALID_HTTP_TOKEN:V0t,ERR_HTTP_INVALID_HEADER_VALUE:K0t,ERR_INVALID_CHAR:J0t}=X0e(),{HTTP2_HEADER_STATUS:tge,HTTP2_HEADER_METHOD:rge,HTTP2_HEADER_PATH:nge,HTTP2_METHOD_CONNECT:z0t}=_0t.constants,Jo=Symbol("headers"),HH=Symbol("origin"),jH=Symbol("session"),ige=Symbol("options"),YQ=Symbol("flushedHeaders"),iv=Symbol("jobs"),Z0t=/^[\^`\-\w!#$%&*+.|~]+$/,X0t=/[^\t\u0020-\u007E\u0080-\u00FF]/,qH=class extends U0t{constructor(e,r,s){super({autoDestroy:!1});let a=typeof e=="string"||e instanceof URL;if(a&&(e=q0t(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(s=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[jH]=r.h2session;else if(r.agent===!1)this.agent=new $0e({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new $0e({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=H0t;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new UH("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new Y0t(r.protocol,"https:");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,c=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:f}=r;if(r.timeout=void 0,this[Jo]=Object.create(null),this[iv]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!("authorization"in this[Jo])&&(this[Jo].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[ige]=r,n===443?(this[HH]=`https://${c}`,":authority"in this[Jo]||(this[Jo][":authority"]=c)):(this[HH]=`https://${c}:${n}`,":authority"in this[Jo]||(this[Jo][":authority"]=`${c}:${n}`)),f&&this.setTimeout(f),s&&this.once("response",s),this[YQ]=!1}get method(){return this[Jo][rge]}set method(e){e&&(this[Jo][rge]=e.toUpperCase())}get path(){return this[Jo][nge]}set path(e){e&&(this[Jo][nge]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,s){if(this._mustNotHaveABody){s(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(e,r,s);this._request?a():this[iv].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[iv].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[YQ]||this.destroyed)return;this[YQ]=!0;let e=this.method===z0t,r=s=>{if(this._request=s,this.destroyed){s.destroy();return}e||G0t(s,this,["timeout","continue","close","error"]);let a=c=>(...f)=>{!this.writable&&!this.destroyed?c(...f):this.once("finish",()=>{c(...f)})};s.once("response",a((c,f,p)=>{let h=new j0t(this.socket,s.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=c[tge],h.headers=c,h.rawHeaders=p,h.once("end",()=>{this.aborted?(h.aborted=!0,h.emit("aborted")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit("connect",h,s,Buffer.alloc(0))?this.emit("close"):s.destroy()):(s.on("data",E=>{!h._dumped&&!h.push(E)&&s.pause()}),s.once("end",()=>{h.push(null)}),this.emit("response",h)||h._dump())})),s.once("headers",a(c=>this.emit("information",{statusCode:c[tge]}))),s.once("trailers",a((c,f,p)=>{let{res:h}=this;h.trailers=c,h.rawTrailers=p}));let{socket:n}=s.session;this.socket=n,this.connection=n;for(let c of this[iv])c();this.emit("socket",this.socket)};if(this[jH])try{r(this[jH].request(this[Jo]))}catch(s){this.emit("error",s)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[HH],this[ige],this[Jo]))}catch(s){this.emit("error",s)}}}getHeader(e){if(typeof e!="string")throw new UH("name","string",e);return this[Jo][e.toLowerCase()]}get headersSent(){return this[YQ]}removeHeader(e){if(typeof e!="string")throw new UH("name","string",e);if(this.headersSent)throw new ege("remove");delete this[Jo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new ege("set");if(typeof e!="string"||!Z0t.test(e)&&!W0t(e))throw new V0t("Header name",e);if(typeof r>"u")throw new K0t(r,e);if(X0t.test(r))throw new J0t("header content",e);this[Jo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let s=()=>this._request.setTimeout(e,r);return this._request?s():this[iv].push(s),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};sge.exports=qH});var age=L((ezt,oge)=>{"use strict";var $0t=Ie("tls");oge.exports=(t={},e=$0t.connect)=>new Promise((r,s)=>{let a=!1,n,c=async()=>{await p,n.off("timeout",f),n.off("error",s),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit("timeout"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},f=async()=>{a=!0,c()},p=(async()=>{try{n=await e(t,c),n.on("error",s),n.once("timeout",f)}catch(h){s(h)}})()})});var cge=L((tzt,lge)=>{"use strict";var egt=Ie("net");lge.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),egt.isIP(e)?"":e}});var Age=L((rzt,YH)=>{"use strict";var uge=Ie("http"),WH=Ie("https"),tgt=age(),rgt=FH(),ngt=GH(),igt=cge(),sgt=_H(),VQ=new rgt({maxSize:100}),sv=new Map,fge=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let s=()=>{t.emit("free",e,r)};e.on("free",s);let a=()=>{t.removeSocket(e,r)};e.on("close",a);let n=()=>{t.removeSocket(e,r),e.off("close",a),e.off("free",s),e.off("agentRemove",n)};e.on("agentRemove",n),t.emit("free",e,r)},ogt=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!VQ.has(e)){if(sv.has(e))return(await sv.get(e)).alpnProtocol;let{path:r,agent:s}=t;t.path=t.socketPath;let a=tgt(t);sv.set(e,a);try{let{socket:n,alpnProtocol:c}=await a;if(VQ.set(e,c),t.path=r,c==="h2")n.destroy();else{let{globalAgent:f}=WH,p=WH.Agent.prototype.createConnection;s?s.createConnection===p?fge(s,n,t):n.destroy():f.createConnection===p?fge(f,n,t):n.destroy()}return sv.delete(e),c}catch(n){throw sv.delete(e),n}}return VQ.get(e)};YH.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=sgt(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let s=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||igt(e),e.port=e.port||(s?443:80),e._defaultAgent=s?WH.globalAgent:uge.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=a[s?"https":"http"]}return s&&await ogt(e)==="h2"?(a&&(e.agent=a.http2),new ngt(e,r)):uge.request(e,r)};YH.exports.protocolCache=VQ});var hge=L((nzt,pge)=>{"use strict";var agt=Ie("http2"),lgt=OH(),VH=GH(),cgt=MH(),ugt=Age(),fgt=(t,e,r)=>new VH(t,e,r),Agt=(t,e,r)=>{let s=new VH(t,e,r);return s.end(),s};pge.exports={...agt,ClientRequest:VH,IncomingMessage:cgt,...lgt,request:fgt,get:Agt,auto:ugt}});var JH=L(KH=>{"use strict";Object.defineProperty(KH,"__esModule",{value:!0});var gge=Lp();KH.default=t=>gge.default.nodeStream(t)&&gge.default.function_(t.getBoundary)});var Ege=L(zH=>{"use strict";Object.defineProperty(zH,"__esModule",{value:!0});var mge=Ie("fs"),yge=Ie("util"),dge=Lp(),pgt=JH(),hgt=yge.promisify(mge.stat);zH.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(dge.default.string(t))return Buffer.byteLength(t);if(dge.default.buffer(t))return t.length;if(pgt.default(t))return yge.promisify(t.getLength.bind(t))();if(t instanceof mge.ReadStream){let{size:r}=await hgt(t.path);return r===0?void 0:r}}});var XH=L(ZH=>{"use strict";Object.defineProperty(ZH,"__esModule",{value:!0});function ggt(t,e,r){let s={};for(let a of r)s[a]=(...n)=>{e.emit(a,...n)},t.on(a,s[a]);return()=>{for(let a of r)t.off(a,s[a])}}ZH.default=ggt});var Ige=L($H=>{"use strict";Object.defineProperty($H,"__esModule",{value:!0});$H.default=()=>{let t=[];return{once(e,r,s){e.once(r,s),t.push({origin:e,event:r,fn:s})},unhandleAll(){for(let e of t){let{origin:r,event:s,fn:a}=e;r.removeListener(s,a)}t.length=0}}}});var wge=L(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.TimeoutError=void 0;var dgt=Ie("net"),mgt=Ige(),Cge=Symbol("reentry"),ygt=()=>{},KQ=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};ov.TimeoutError=KQ;ov.default=(t,e,r)=>{if(Cge in t)return ygt;t[Cge]=!0;let s=[],{once:a,unhandleAll:n}=mgt.default(),c=(C,S,P)=>{var I;let R=setTimeout(S,C,C,P);(I=R.unref)===null||I===void 0||I.call(R);let N=()=>{clearTimeout(R)};return s.push(N),N},{host:f,hostname:p}=r,h=(C,S)=>{t.destroy(new KQ(C,S))},E=()=>{for(let C of s)C();n()};if(t.once("error",C=>{if(E(),t.listenerCount("error")===0)throw C}),t.once("close",E),a(t,"response",C=>{a(C,"end",E)}),typeof e.request<"u"&&c(e.request,h,"request"),typeof e.socket<"u"){let C=()=>{h(e.socket,"socket")};t.setTimeout(e.socket,C),s.push(()=>{t.removeListener("timeout",C)})}return a(t,"socket",C=>{var S;let{socketPath:P}=t;if(C.connecting){let I=!!(P??dgt.isIP((S=p??f)!==null&&S!==void 0?S:"")!==0);if(typeof e.lookup<"u"&&!I&&typeof C.address().address>"u"){let R=c(e.lookup,h,"lookup");a(C,"lookup",R)}if(typeof e.connect<"u"){let R=()=>c(e.connect,h,"connect");I?a(C,"connect",R()):a(C,"lookup",N=>{N===null&&a(C,"connect",R())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&a(C,"connect",()=>{let R=c(e.secureConnect,h,"secureConnect");a(C,"secureConnect",R)})}if(typeof e.send<"u"){let I=()=>c(e.send,h,"send");C.connecting?a(C,"connect",()=>{a(t,"upload-complete",I())}):a(t,"upload-complete",I())}}),typeof e.response<"u"&&a(t,"upload-complete",()=>{let C=c(e.response,h,"response");a(t,"response",C)}),E}});var vge=L(ej=>{"use strict";Object.defineProperty(ej,"__esModule",{value:!0});var Bge=Lp();ej.default=t=>{t=t;let e={protocol:t.protocol,hostname:Bge.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return Bge.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Sge=L(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});var Egt=Ie("url"),Igt=["protocol","host","hostname","port","pathname","search"];tj.default=(t,e)=>{var r,s;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(s=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&s!==void 0?s:""}`}let a=new Egt.URL(t);if(e.path){let n=e.path.indexOf("?");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of Igt)e[n]&&(a[n]=e[n].toString());return a}});var Dge=L(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var rj=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};nj.default=rj});var sj=L(ij=>{"use strict";Object.defineProperty(ij,"__esModule",{value:!0});var Cgt=async t=>{let e=[],r=0;for await(let s of t)e.push(s),r+=Buffer.byteLength(s);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};ij.default=Cgt});var Pge=L(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.dnsLookupIpVersionToFamily=nm.isDnsLookupIpVersion=void 0;var bge={auto:0,ipv4:4,ipv6:6};nm.isDnsLookupIpVersion=t=>t in bge;nm.dnsLookupIpVersionToFamily=t=>{if(nm.isDnsLookupIpVersion(t))return bge[t];throw new Error("Invalid DNS lookup IP version")}});var oj=L(JQ=>{"use strict";Object.defineProperty(JQ,"__esModule",{value:!0});JQ.isResponseOk=void 0;JQ.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var kge=L(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var xge=new Set;aj.default=t=>{xge.has(t)||(xge.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var Qge=L(lj=>{"use strict";Object.defineProperty(lj,"__esModule",{value:!0});var bi=Lp(),wgt=(t,e)=>{if(bi.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");bi.assert.any([bi.default.string,bi.default.undefined],t.encoding),bi.assert.any([bi.default.boolean,bi.default.undefined],t.resolveBodyOnly),bi.assert.any([bi.default.boolean,bi.default.undefined],t.methodRewriting),bi.assert.any([bi.default.boolean,bi.default.undefined],t.isStream),bi.assert.any([bi.default.string,bi.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:s=>s.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},bi.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(s=>s.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):bi.default.number(r)&&(t.retry.limit=r),bi.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(bi.default.number))),bi.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:s}=t;if(!bi.default.function_(s.transform))throw new Error("`options.pagination.transform` must be implemented");if(!bi.default.function_(s.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!bi.default.function_(s.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!bi.default.function_(s.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};lj.default=wgt});var Tge=L(av=>{"use strict";Object.defineProperty(av,"__esModule",{value:!0});av.retryAfterStatusCodes=void 0;av.retryAfterStatusCodes=new Set([413,429,503]);var Bgt=({attemptCount:t,retryOptions:e,error:r,retryAfter:s})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),c=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!c)return 0;if(r.response){if(s)return e.maxRetryAfter===void 0||s>e.maxRetryAfter?0:s;if(r.response.statusCode===413)return 0}let f=Math.random()*100;return 2**(t-1)*1e3+f};av.default=Bgt});var uv=L(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.UnsupportedProtocolError=Ln.ReadError=Ln.TimeoutError=Ln.UploadError=Ln.CacheError=Ln.HTTPError=Ln.MaxRedirectsError=Ln.RequestError=Ln.setNonEnumerableProperties=Ln.knownHookEvents=Ln.withoutBody=Ln.kIsNormalizedAlready=void 0;var Rge=Ie("util"),Fge=Ie("stream"),vgt=Ie("fs"),C0=Ie("url"),Nge=Ie("http"),cj=Ie("http"),Sgt=Ie("https"),Dgt=Jhe(),bgt=r0e(),Oge=N0e(),Pgt=_0e(),xgt=hge(),kgt=GQ(),at=Lp(),Qgt=Ege(),Lge=JH(),Tgt=XH(),Mge=wge(),Rgt=vge(),_ge=Sge(),Fgt=Dge(),Ngt=sj(),Uge=Pge(),Ogt=oj(),w0=kge(),Lgt=Qge(),Mgt=Tge(),uj,go=Symbol("request"),XQ=Symbol("response"),mI=Symbol("responseSize"),yI=Symbol("downloadedSize"),EI=Symbol("bodySize"),II=Symbol("uploadedSize"),zQ=Symbol("serverResponsesPiped"),Hge=Symbol("unproxyEvents"),jge=Symbol("isFromCache"),fj=Symbol("cancelTimeouts"),qge=Symbol("startedReading"),CI=Symbol("stopReading"),ZQ=Symbol("triggerRead"),B0=Symbol("body"),lv=Symbol("jobs"),Gge=Symbol("originalResponse"),Wge=Symbol("retryTimeout");Ln.kIsNormalizedAlready=Symbol("isNormalizedAlready");var _gt=at.default.string(process.versions.brotli);Ln.withoutBody=new Set(["GET","HEAD"]);Ln.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function Ugt(t){for(let e in t){let r=t[e];if(!at.default.string(r)&&!at.default.number(r)&&!at.default.boolean(r)&&!at.default.null_(r)&&!at.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function Hgt(t){return at.default.object(t)&&!("statusCode"in t)}var Aj=new Fgt.default,jgt=async t=>new Promise((e,r)=>{let s=a=>{r(a)};t.pending||e(),t.once("error",s),t.once("ready",()=>{t.off("error",s),e()})}),qgt=new Set([300,301,302,303,304,307,308]),Ggt=["context","body","json","form"];Ln.setNonEnumerableProperties=(t,e)=>{let r={};for(let s of t)if(s)for(let a of Ggt)a in s&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:s[a]});Object.defineProperties(e,r)};var As=class extends Error{constructor(e,r,s){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,s instanceof sT?(Object.defineProperty(this,"request",{enumerable:!1,value:s}),Object.defineProperty(this,"response",{enumerable:!1,value:s[XQ]}),Object.defineProperty(this,"options",{enumerable:!1,value:s.options})):Object.defineProperty(this,"options",{enumerable:!1,value:s}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,at.default.string(r.stack)&&at.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,c=this.stack.slice(n).split(` +`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(` +`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(` +`)}${f.reverse().join(` +`)}`}}};Ln.RequestError=As;var $Q=class extends As{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Ln.MaxRedirectsError=$Q;var eT=class extends As{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Ln.HTTPError=eT;var tT=class extends As{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Ln.CacheError=tT;var rT=class extends As{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Ln.UploadError=rT;var nT=class extends As{constructor(e,r,s){super(e.message,e,s),this.name="TimeoutError",this.event=e.event,this.timings=r}};Ln.TimeoutError=nT;var cv=class extends As{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Ln.ReadError=cv;var iT=class extends As{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Ln.UnsupportedProtocolError=iT;var Wgt=["socket","connect","continue","information","upgrade","timeout"],sT=class extends Fge.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[yI]=0,this[II]=0,this.requestInitialized=!1,this[zQ]=new Set,this.redirects=[],this[CI]=!1,this[ZQ]=!1,this[lv]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof cj.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof vgt.ReadStream&&await jgt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[go])===null||h===void 0||h.destroy();return}for(let C of this[lv])C();this[lv].length=0,this.requestInitialized=!0}catch(E){if(E instanceof As){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new C0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([Uge.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.https.pfx)),at.assert.any([at.default.object,at.default.undefined],r.cacheOptions),at.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===s?.headers?r.headers={...r.headers}:r.headers=kgt({...s?.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==s?.searchParams){let P;if(at.default.string(r.searchParams)||r.searchParams instanceof C0.URLSearchParams)P=new C0.URLSearchParams(r.searchParams);else{Ugt(r.searchParams),P=new C0.URLSearchParams;for(let I in r.searchParams){let R=r.searchParams[I];R===null?P.append(I,""):R!==void 0&&P.append(I,R)}}(a=s?.searchParams)===null||a===void 0||a.forEach((I,R)=>{P.has(R)||P.append(R,I)}),r.searchParams=P}if(r.username=(n=r.username)!==null&&n!==void 0?n:"",r.password=(c=r.password)!==null&&c!==void 0?c:"",at.default.undefined(r.prefixUrl)?r.prefixUrl=(f=s?.prefixUrl)!==null&&f!==void 0?f:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),at.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=_ge.default(r.prefixUrl+r.url,r)}else(at.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=_ge.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:P}=r;Object.defineProperty(r,"prefixUrl",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \`prefixUrl\` from ${P} to ${R}: ${N.href}`);r.url=new C0.URL(R+N.href.slice(P.length)),P=R},get:()=>P});let{protocol:I}=r.url;if(I==="unix:"&&(I="http:",r.url=new C0.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),I!=="http:"&&I!=="https:")throw new iT(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:P,getCookieString:I}=E;at.assert.function_(P),at.assert.function_(I),P.length===4&&I.length===0&&(P=Rge.promisify(P.bind(r.cookieJar)),I=Rge.promisify(I.bind(r.cookieJar)),r.cookieJar={setCookie:P,getCookieString:I})}let{cache:C}=r;if(C&&(Aj.has(C)||Aj.set(C,new Oge((P,I)=>{let R=P[go](P,I);return at.default.promise(R)&&(R.once=(N,U)=>{if(N==="error")R.catch(U);else if(N==="abort")(async()=>{try{(await R).once("abort",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},C))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)uj||(uj=new bgt.default),r.dnsCache=uj;else if(!at.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${at.default(r.dnsCache)}`);at.default.number(r.timeout)?r.timeout={request:r.timeout}:s&&r.timeout!==s.timeout?r.timeout={...s.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let S=r.hooks===s?.hooks;r.hooks={...r.hooks};for(let P of Ln.knownHookEvents)if(P in r.hooks)if(at.default.array(r.hooks[P]))r.hooks[P]=[...r.hooks[P]];else throw new TypeError(`Parameter \`${P}\` must be an Array, got ${at.default(r.hooks[P])}`);else r.hooks[P]=[];if(s&&!S)for(let P of Ln.knownHookEvents)s.hooks[P].length>0&&(r.hooks[P]=[...s.hooks[P],...r.hooks[P]]);if("family"in r&&w0.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),s?.https&&(r.https={...s.https,...r.https}),"rejectUnauthorized"in r&&w0.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&w0.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&w0.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&w0.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&w0.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&w0.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&w0.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let P in r.agent)if(P!=="http"&&P!=="https"&&P!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${P}\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Ln.setNonEnumerableProperties([s,h],r),Lgt.default(r,s)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,s=!at.default.undefined(e.form),a=!at.default.undefined(e.json),n=!at.default.undefined(e.body),c=s||a||n,f=Ln.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=f,c){if(f)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([n,s,a].filter(p=>p).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(n&&!(e.body instanceof Fge.Readable)&&!at.default.string(e.body)&&!at.default.buffer(e.body)&&!Lge.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(s&&!at.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let p=!at.default.string(r["content-type"]);n?(Lge.default(e.body)&&p&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[B0]=e.body):s?(p&&(r["content-type"]="application/x-www-form-urlencoded"),this[B0]=new C0.URLSearchParams(e.form).toString()):(p&&(r["content-type"]="application/json"),this[B0]=e.stringifyJson(e.json));let h=await Qgt.default(this[B0],e.headers);at.default.undefined(r["content-length"])&&at.default.undefined(r["transfer-encoding"])&&!f&&!at.default.undefined(h)&&(r["content-length"]=String(h))}}else f?this._lockWrite():this._unlockWrite();this[EI]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:s}=r;this[Gge]=e,r.decompress&&(e=Pgt(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:Nge.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[jge]=n.isFromCache,this[mI]=Number(e.headers["content-length"])||void 0,this[XQ]=e,e.once("end",()=>{this[mI]=this[yI],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",f=>{e.destroy(),this._beforeError(new cv(f,this))}),e.once("aborted",()=>{this._beforeError(new cv({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let c=e.headers["set-cookie"];if(at.default.object(r.cookieJar)&&c){let f=c.map(async p=>r.cookieJar.setCookie(p,s.toString()));r.ignoreInvalidCookies&&(f=f.map(async p=>p.catch(()=>{})));try{await Promise.all(f)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&qgt.has(a)){if(e.resume(),this[go]&&(this[fj](),delete this[go],this[Hge]()),(a===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[B0]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new $Q(this));return}try{let p=Buffer.from(e.headers.location,"binary").toString(),h=new C0.URL(p,s),E=h.toString();decodeURI(E),h.hostname!==s.hostname||h.port!==s.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let C of r.hooks.beforeRedirect)await C(r,n);this.emit("redirect",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!Ogt.isResponseOk(n)){this._beforeError(new eT(n));return}e.on("readable",()=>{this[ZQ]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let f of this[zQ])if(!f.headersSent){for(let p in e.headers){let h=r.decompress?p!=="content-encoding":!0,E=e.headers[p];h&&f.setHeader(p,E)}f.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:s,url:a}=r;Dgt.default(e),this[fj]=Mge.default(e,s,a);let n=r.cache?"cacheableResponse":"response";e.once(n,p=>{this._onResponse(p)}),e.once("error",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners("end"),p=p instanceof Mge.TimeoutError?new nT(p,this.timings,this):new As(p.message,p,this),this._beforeError(p)}),this[Hge]=Tgt.default(e,this,Wgt),this[go]=e,this.emit("uploadProgress",this.uploadProgress);let c=this[B0],f=this.redirects.length===0?this:e;at.default.nodeStream(c)?(c.pipe(f),c.once("error",p=>{this._beforeError(new rT(p,this))})):(this._unlockWrite(),at.default.undefined(c)?(this._cannotHaveBody||this._noPipe)&&(f.end(),this._lockWrite()):(this._writeRequest(c,void 0,()=>{}),f.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((s,a)=>{Object.assign(r,Rgt.default(e)),delete r.url;let n,c=Aj.get(r.cache)(r,async f=>{f._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",f),s(f)});r.url=e,c.once("error",a),c.once("request",async f=>{n=f,s(n)})})}async _makeRequest(){var e,r,s,a,n;let{options:c}=this,{headers:f}=c;for(let U in f)if(at.default.undefined(f[U]))delete f[U];else if(at.default.null_(f[U]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${U}\` header`);if(c.decompress&&at.default.undefined(f["accept-encoding"])&&(f["accept-encoding"]=_gt?"gzip, deflate, br":"gzip, deflate"),c.cookieJar){let U=await c.cookieJar.getCookieString(c.url.toString());at.default.nonEmptyString(U)&&(c.headers.cookie=U)}for(let U of c.hooks.beforeRequest){let W=await U(c);if(!at.default.undefined(W)){c.request=()=>W;break}}c.body&&this[B0]!==c.body&&(this[B0]=c.body);let{agent:p,request:h,timeout:E,url:C}=c;if(c.dnsCache&&!("lookup"in c)&&(c.lookup=c.dnsCache.lookup),C.hostname==="unix"){let U=/(?.+?):(?.+)/.exec(`${C.pathname}${C.search}`);if(U?.groups){let{socketPath:W,path:te}=U.groups;Object.assign(c,{socketPath:W,path:te,host:""})}}let S=C.protocol==="https:",P;c.http2?P=xgt.auto:P=S?Sgt.request:Nge.request;let I=(e=c.request)!==null&&e!==void 0?e:P,R=c.cache?this._createCacheableRequest:I;p&&!c.http2&&(c.agent=p[S?"https":"http"]),c[go]=I,delete c.request,delete c.timeout;let N=c;if(N.shared=(r=c.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(s=c.cacheOptions)===null||s===void 0?void 0:s.cacheHeuristic,N.immutableMinTimeToLive=(a=c.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=c.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,c.dnsLookupIpVersion!==void 0)try{N.family=Uge.dnsLookupIpVersionToFamily(c.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}c.https&&("rejectUnauthorized"in c.https&&(N.rejectUnauthorized=c.https.rejectUnauthorized),c.https.checkServerIdentity&&(N.checkServerIdentity=c.https.checkServerIdentity),c.https.certificateAuthority&&(N.ca=c.https.certificateAuthority),c.https.certificate&&(N.cert=c.https.certificate),c.https.key&&(N.key=c.https.key),c.https.passphrase&&(N.passphrase=c.https.passphrase),c.https.pfx&&(N.pfx=c.https.pfx));try{let U=await R(C,N);at.default.undefined(U)&&(U=P(C,N)),c.request=h,c.timeout=E,c.agent=p,c.https&&("rejectUnauthorized"in c.https&&delete N.rejectUnauthorized,c.https.checkServerIdentity&&delete N.checkServerIdentity,c.https.certificateAuthority&&delete N.ca,c.https.certificate&&delete N.cert,c.https.key&&delete N.key,c.https.passphrase&&delete N.passphrase,c.https.pfx&&delete N.pfx),Hgt(U)?this._onRequest(U):this.writable?(this.once("finish",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof Oge.CacheError?new tT(U,this):new As(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new As(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[CI])return;let{options:r}=this,s=this.retryCount+1;this[CI]=!0,e instanceof As||(e=new As(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Ngt.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let c;try{let f;n&&"retry-after"in n.headers&&(f=Number(n.headers["retry-after"]),Number.isNaN(f)?(f=Date.parse(n.headers["retry-after"])-Date.now(),f<=0&&(f=1)):f*=1e3),c=await r.retry.calculateDelay({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:Mgt.default({attemptCount:s,retryOptions:r.retry,error:a,retryAfter:f,computedValue:0})})}catch(f){this._error(new As(f.message,f,this));return}if(c){let f=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,s)}catch(p){this._error(new As(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",s,e))};this[Wge]=setTimeout(f,c);return}}this._error(a)})()}_read(){this[ZQ]=!0;let e=this[XQ];if(e&&!this[CI]){e.readableLength&&(this[ZQ]=!1);let r;for(;(r=e.read())!==null;){this[yI]+=r.length,this[qge]=!0;let s=this.downloadProgress;s.percent<1&&this.emit("downloadProgress",s),this.push(r)}}}_write(e,r,s){let a=()=>{this._writeRequest(e,r,s)};this.requestInitialized?a():this[lv].push(a)}_writeRequest(e,r,s){this[go].destroyed||(this._progressCallbacks.push(()=>{this[II]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[go].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),s(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(go in this)){e();return}if(this[go].destroyed){e();return}this[go].end(s=>{s||(this[EI]=this[II],this.emit("uploadProgress",this.uploadProgress),this[go].emit("upload-complete")),e(s)})};this.requestInitialized?r():this[lv].push(r)}_destroy(e,r){var s;this[CI]=!0,clearTimeout(this[Wge]),go in this&&(this[fj](),!((s=this[XQ])===null||s===void 0)&&s.complete||this[go].destroy()),e!==null&&!at.default.undefined(e)&&!(e instanceof As)&&(e=new As(e.message,e,this)),r(e)}get _isAboutToError(){return this[CI]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,s;return((r=(e=this[go])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((s=this[Gge])===null||s===void 0)&&s.complete)}get socket(){var e,r;return(r=(e=this[go])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[mI]?e=this[yI]/this[mI]:this[mI]===this[yI]?e=1:e=0,{percent:e,transferred:this[yI],total:this[mI]}}get uploadProgress(){let e;return this[EI]?e=this[II]/this[EI]:this[EI]===this[II]?e=1:e=0,{percent:e,transferred:this[II],total:this[EI]}}get timings(){var e;return(e=this[go])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[jge]}pipe(e,r){if(this[qge])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof cj.ServerResponse&&this[zQ].add(e),super.pipe(e,r)}unpipe(e){return e instanceof cj.ServerResponse&&this[zQ].delete(e),super.unpipe(e),this}};Ln.default=sT});var fv=L(Wu=>{"use strict";var Ygt=Wu&&Wu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Vgt=Wu&&Wu.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ygt(e,t,r)};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.CancelError=Wu.ParseError=void 0;var Yge=uv(),pj=class extends Yge.RequestError{constructor(e,r){let{options:s}=r.request;super(`${e.message} in "${s.url.toString()}"`,e,r.request),this.name="ParseError"}};Wu.ParseError=pj;var hj=class extends Yge.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}};Wu.CancelError=hj;Vgt(uv(),Wu)});var Kge=L(gj=>{"use strict";Object.defineProperty(gj,"__esModule",{value:!0});var Vge=fv(),Kgt=(t,e,r,s)=>{let{rawBody:a}=t;try{if(e==="text")return a.toString(s);if(e==="json")return a.length===0?"":r(a.toString());if(e==="buffer")return a;throw new Vge.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(n){throw new Vge.ParseError(n,t)}};gj.default=Kgt});var dj=L(v0=>{"use strict";var Jgt=v0&&v0.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),zgt=v0&&v0.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Jgt(e,t,r)};Object.defineProperty(v0,"__esModule",{value:!0});var Zgt=Ie("events"),Xgt=Lp(),$gt=Vhe(),oT=fv(),Jge=Kge(),zge=uv(),edt=XH(),tdt=sj(),Zge=oj(),rdt=["request","response","redirect","uploadProgress","downloadProgress"];function Xge(t){let e,r,s=new Zgt.EventEmitter,a=new $gt((c,f,p)=>{let h=E=>{let C=new zge.default(void 0,t);C.retryCount=E,C._noPipe=!0,p(()=>C.destroy()),p.shouldReject=!1,p(()=>f(new oT.CancelError(C))),e=C,C.once("response",async I=>{var R;if(I.retryCount=E,I.request.aborted)return;let N;try{N=await tdt.default(C),I.rawBody=N}catch{return}if(C._isAboutToError)return;let U=((R=I.headers["content-encoding"])!==null&&R!==void 0?R:"").toLowerCase(),W=["gzip","deflate","br"].includes(U),{options:te}=C;if(W&&!te.decompress)I.body=N;else try{I.body=Jge.default(I,te.responseType,te.parseJson,te.encoding)}catch(ie){if(I.body=N.toString(),Zge.isResponseOk(I)){C._beforeError(ie);return}}try{for(let[ie,Ae]of te.hooks.afterResponse.entries())I=await Ae(I,async ce=>{let me=zge.default.normalizeArguments(void 0,{...ce,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},te);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ie);for(let Be of me.hooks.beforeRetry)await Be(me);let pe=Xge(me);return p(()=>{pe.catch(()=>{}),pe.cancel()}),pe})}catch(ie){C._beforeError(new oT.RequestError(ie.message,ie,C));return}if(!Zge.isResponseOk(I)){C._beforeError(new oT.HTTPError(I));return}r=I,c(C.options.resolveBodyOnly?I.body:I)});let S=I=>{if(a.isCanceled)return;let{options:R}=C;if(I instanceof oT.HTTPError&&!R.throwHttpErrors){let{response:N}=I;c(C.options.resolveBodyOnly?N.body:N);return}f(I)};C.once("error",S);let P=C.options.body;C.once("retry",(I,R)=>{var N,U;if(P===((N=R.request)===null||N===void 0?void 0:N.options.body)&&Xgt.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){S(R);return}h(I)}),edt.default(C,s,rdt)};h(0)});a.on=(c,f)=>(s.on(c,f),a);let n=c=>{let f=(async()=>{await a;let{options:p}=r.request;return Jge.default(r,c,p.parseJson,p.encoding)})();return Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)),f};return a.json=()=>{let{headers:c}=e.options;return!e.writableFinished&&c.accept===void 0&&(c.accept="application/json"),n("json")},a.buffer=()=>n("buffer"),a.text=()=>n("text"),a}v0.default=Xge;zgt(fv(),v0)});var $ge=L(mj=>{"use strict";Object.defineProperty(mj,"__esModule",{value:!0});var ndt=fv();function idt(t,...e){let r=(async()=>{if(t instanceof ndt.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),s=()=>r;return r.json=s,r.text=s,r.buffer=s,r.on=s,r}mj.default=idt});var rde=L(yj=>{"use strict";Object.defineProperty(yj,"__esModule",{value:!0});var ede=Lp();function tde(t){for(let e of Object.values(t))(ede.default.plainObject(e)||ede.default.array(e))&&tde(e);return Object.freeze(t)}yj.default=tde});var ide=L(nde=>{"use strict";Object.defineProperty(nde,"__esModule",{value:!0})});var Ej=L(Lc=>{"use strict";var sdt=Lc&&Lc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),odt=Lc&&Lc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&sdt(e,t,r)};Object.defineProperty(Lc,"__esModule",{value:!0});Lc.defaultHandler=void 0;var sde=Lp(),Oc=dj(),adt=$ge(),lT=uv(),ldt=rde(),cdt={RequestError:Oc.RequestError,CacheError:Oc.CacheError,ReadError:Oc.ReadError,HTTPError:Oc.HTTPError,MaxRedirectsError:Oc.MaxRedirectsError,TimeoutError:Oc.TimeoutError,ParseError:Oc.ParseError,CancelError:Oc.CancelError,UnsupportedProtocolError:Oc.UnsupportedProtocolError,UploadError:Oc.UploadError},udt=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:aT}=lT.default,ode=(...t)=>{let e;for(let r of t)e=aT(void 0,r,e);return e},fdt=t=>t.isStream?new lT.default(void 0,t):Oc.default(t),Adt=t=>"defaults"in t&&"options"in t.defaults,pdt=["get","post","put","patch","head","delete"];Lc.defaultHandler=(t,e)=>e(t);var ade=(t,e)=>{if(t)for(let r of t)r(e)},lde=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(s=>(a,n)=>{let c,f=s(a,p=>(c=n(p),c));if(f!==c&&!a.isStream&&c){let p=f,{then:h,catch:E,finally:C}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(c)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(c)),p.then=h,p.catch=E,p.finally=C}return f});let e=(s,a={},n)=>{var c,f;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?fdt:h);if(sde.default.plainObject(s)){let E={...s,...a};lT.setNonEnumerableProperties([s,a],E),a=E,s=void 0}try{let E;try{ade(t.options.hooks.init,a),ade((c=a.hooks)===null||c===void 0?void 0:c.init,a)}catch(S){E=S}let C=aT(s,a,n??t.options);if(C[lT.kIsNormalizedAlready]=!0,E)throw new Oc.RequestError(E.message,E,C);return h(C)}catch(E){if(a.isStream)throw E;return adt.default(E,t.options.hooks.beforeError,(f=a.hooks)===null||f===void 0?void 0:f.beforeError)}};e.extend=(...s)=>{let a=[t.options],n=[...t._rawHandlers],c;for(let f of s)Adt(f)?(a.push(f.defaults.options),n.push(...f.defaults._rawHandlers),c=f.defaults.mutableDefaults):(a.push(f),"handlers"in f&&n.push(...f.handlers),c=f.mutableDefaults);return n=n.filter(f=>f!==Lc.defaultHandler),n.length===0&&n.push(Lc.defaultHandler),lde({options:ode(...a),handlers:n,mutableDefaults:!!c})};let r=async function*(s,a){let n=aT(s,a,t.options);n.resolveBodyOnly=!1;let c=n.pagination;if(!sde.default.object(c))throw new TypeError("`options.pagination` must be implemented");let f=[],{countLimit:p}=c,h=0;for(;h{let n=[];for await(let c of r(s,a))n.push(c);return n},e.paginate.each=r,e.stream=(s,a)=>e(s,{...a,isStream:!0});for(let s of pdt)e[s]=(a,n)=>e(a,{...n,method:s}),e.stream[s]=(a,n)=>e(a,{...n,method:s,isStream:!0});return Object.assign(e,cdt),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:ldt.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=ode,e};Lc.default=lde;odt(ide(),Lc)});var fde=L((Mp,cT)=>{"use strict";var hdt=Mp&&Mp.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),cde=Mp&&Mp.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&hdt(e,t,r)};Object.defineProperty(Mp,"__esModule",{value:!0});var gdt=Ie("url"),ude=Ej(),ddt={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let s of e){let a=s.split(";");if(a[1].includes("next")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new gdt.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[ude.defaultHandler],mutableDefaults:!1},Ij=ude.default(ddt);Mp.default=Ij;cT.exports=Ij;cT.exports.default=Ij;cT.exports.__esModule=!0;cde(Ej(),Mp);cde(dj(),Mp)});var An={};Vt(An,{Method:()=>mde,del:()=>Cdt,get:()=>Bj,getNetworkSettings:()=>dde,post:()=>vj,put:()=>Idt,request:()=>Av});async function Cj(t){return Vl(pde,t,()=>le.readFilePromise(t).then(e=>(pde.set(t,e),e)))}function Edt({statusCode:t,statusMessage:e},r){let s=Ut(r,t,pt.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return KE(r,`${s}${e?` (${e})`:""}`,a)}async function uT(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(s){if(s.name!=="HTTPError")throw s;let a=r?.(s,e)??s.response.body?.error;a==null&&(s.message.startsWith("Response code")?a="The remote server failed to provide the requested resource":a=s.message),s.code==="ETIMEDOUT"&&s.event==="socket"&&(a+=`(can be increased via ${Ut(e,"httpTimeout",pt.SETTING)})`);let n=new Yt(35,a,c=>{s.response&&c.reportError(35,` ${Zf(e,{label:"Response Code",value:Hu(pt.NO_HINT,Edt(s.response,e))})}`),s.request&&(c.reportError(35,` ${Zf(e,{label:"Request Method",value:Hu(pt.NO_HINT,s.request.options.method)})}`),c.reportError(35,` ${Zf(e,{label:"Request URL",value:Hu(pt.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&c.reportError(35,` ${Zf(e,{label:"Request Redirects",value:Hu(pt.NO_HINT,f3(e,s.request.redirects,pt.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&c.reportError(35,` ${Zf(e,{label:"Request Retry Count",value:Hu(pt.NO_HINT,`${Ut(e,s.request.retryCount,pt.NUMBER)} (can be increased via ${Ut(e,"httpRetry",pt.SETTING)})`)})}`)});throw n.originalError=s,n}}function dde(t,e){let r=[...e.configuration.get("networkSettings")].sort(([c],[f])=>f.length-c.length),s={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(s),n=typeof t=="string"?new URL(t):t;for(let[c,f]of r)if(wj.default.isMatch(n.hostname,c))for(let p of a){let h=f.get(p);h!==null&&typeof s[p]>"u"&&(s[p]=h)}for(let c of a)typeof s[c]>"u"&&(s[c]=e.configuration.get(c));return s}async function Av(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c="GET",wrapNetworkRequest:f}){let p={target:t,body:e,configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c},h=async()=>await wdt(t,e,p),E=typeof f<"u"?await f(h,p):h;return await(await r.reduceHook(S=>S.wrapNetworkRequest,E,p))()}async function Bj(t,{configuration:e,jsonResponse:r,customErrorMessage:s,wrapNetworkRequest:a,...n}){let c=()=>uT(Av(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:s}).then(p=>p.body),f=await(typeof a<"u"?c():Vl(Ade,t,()=>c().then(p=>(Ade.set(t,p),p))));return r?JSON.parse(f.toString()):f}async function Idt(t,e,{customErrorMessage:r,...s}){return(await uT(Av(t,e,{...s,method:"PUT"}),{customErrorMessage:r,configuration:s.configuration})).body}async function vj(t,e,{customErrorMessage:r,...s}){return(await uT(Av(t,e,{...s,method:"POST"}),{customErrorMessage:r,configuration:s.configuration})).body}async function Cdt(t,{customErrorMessage:e,...r}){return(await uT(Av(t,null,{...r,method:"DELETE"}),{customErrorMessage:e,configuration:r.configuration})).body}async function wdt(t,e,{configuration:r,headers:s,jsonRequest:a,jsonResponse:n,method:c="GET"}){let f=typeof t=="string"?new URL(t):t,p=dde(f,{configuration:r});if(p.enableNetwork===!1)throw new Yt(80,`Request to '${f.href}' has been blocked because of your configuration settings`);if(f.protocol==="http:"&&!wj.default.isMatch(f.hostname,r.get("unsafeHttpWhitelist")))throw new Yt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${f.hostname})`);let h={headers:s,method:c};h.responseType=n?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e=="string"?h.body=e:h.json=e);let E=r.get("httpTimeout"),C=r.get("httpRetry"),S=r.get("enableStrictSsl"),P=p.httpsCaFilePath,I=p.httpsCertFilePath,R=p.httpsKeyFilePath,{default:N}=await Promise.resolve().then(()=>et(fde())),U=P?await Cj(P):void 0,W=I?await Cj(I):void 0,te=R?await Cj(R):void 0,ie={rejectUnauthorized:S,ca:U,cert:W,key:te},Ae={http:p.httpProxy?new Uhe({proxy:p.httpProxy,proxyRequestOptions:ie}):mdt,https:p.httpsProxy?new Hhe({proxy:p.httpsProxy,proxyRequestOptions:ie}):ydt},ce=N.extend({timeout:{socket:E},retry:C,agent:Ae,https:{rejectUnauthorized:S,certificateAuthority:U,certificate:W,key:te},...h});return r.getLimit("networkConcurrency")(()=>ce(f))}var hde,gde,wj,Ade,pde,mdt,ydt,mde,fT=Ct(()=>{bt();jhe();hde=Ie("https"),gde=Ie("http"),wj=et(Sa());Fc();Qc();kc();Ade=new Map,pde=new Map,mdt=new gde.Agent({keepAlive:!0}),ydt=new hde.Agent({keepAlive:!0});mde=(a=>(a.GET="GET",a.PUT="PUT",a.POST="POST",a.DELETE="DELETE",a))(mde||{})});var ps={};Vt(ps,{availableParallelism:()=>Dj,getArchitecture:()=>pv,getArchitectureName:()=>bdt,getArchitectureSet:()=>Sj,getCaller:()=>Qdt,major:()=>Bdt,openUrl:()=>vdt});function Ddt(){if(process.platform==="darwin"||process.platform==="win32")return null;let t;try{t=le.readFileSync(Sdt)}catch{}if(typeof t<"u"){if(t&&(t.includes("GLIBC")||t.includes("libc")))return"glibc";if(t&&t.includes("musl"))return"musl"}let r=(process.report?.getReport()??{}).sharedObjects??[],s=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return A0(r,a=>{let n=a.match(s);if(!n)return A0.skip;if(n[1])return"glibc";if(n[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")})??null}function pv(){return Ede=Ede??{os:process.platform,cpu:process.arch,libc:Ddt()}}function bdt(t=pv()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function Sj(){let t=pv();return Ide=Ide??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function kdt(t){let e=Pdt.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf("native")===0,s=e[2]&&e[2].indexOf("eval")===0,a=xdt.exec(e[2]);return s&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||"",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Qdt(){let e=new Error().stack.split(` +`)[3];return kdt(e)}function Dj(){return typeof AT.default.availableParallelism<"u"?AT.default.availableParallelism():Math.max(1,AT.default.cpus().length)}var AT,Bdt,yde,vdt,Sdt,Ede,Ide,Pdt,xdt,pT=Ct(()=>{bt();AT=et(Ie("os"));hT();kc();Bdt=Number(process.versions.node.split(".")[0]),yde=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),vdt=typeof yde<"u"?async t=>{try{return await bj(yde,[t],{cwd:K.cwd()}),!0}catch{return!1}}:void 0,Sdt="/usr/bin/ldd";Pdt=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xdt=/\((\S*)(?::(\d+))(?::(\d+))\)/});function Tj(t,e,r,s,a){let n=ev(r);if(s.isArray||s.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>Pj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>Pj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return Pj(t,e,r,s,a)}function Pj(t,e,r,s,a){let n=ev(r);switch(s.type){case"ANY":return RQ(n);case"SHAPE":return Ndt(t,e,r,s,a);case"MAP":return Odt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(s.values?.includes(n))return n;let f=(()=>{if(s.type==="BOOLEAN"&&typeof n!="string")return MB(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=Yk(n,{env:t.env});switch(s.type){case"ABSOLUTE_PATH":{let h=a,E=rH(r);return E&&E[0]!=="<"&&(h=K.dirname(E)),K.resolve(h,ue.toPortablePath(p))}case"LOCATOR_LOOSE":return Rp(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Rp(p);case"BOOLEAN":return MB(p);default:return p}})();if(s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(", ")}`);return f}function Ndt(t,e,r,s,a){let n=ev(r);if(typeof n!="object"||Array.isArray(n))throw new nt(`Object configuration settings "${e}" must be an object`);let c=Rj(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run "yarn config -v" to see the list of settings supported in Yarn`);c.set(f,Tj(t,h,p,s.properties[f],a))}return c}function Odt(t,e,r,s,a){let n=ev(r),c=new Map;if(typeof n!="object"||Array.isArray(n))throw new nt(`Map configuration settings "${e}" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,C=s.valueDefinition;c.set(h,Tj(t,E,p,C,a))}return c}function Rj(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,Rj(t,n));return s}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>K.normalize(s)):K.isAbsolute(e.default)?K.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>K.resolve(t.projectCwd,s)):K.resolve(t.projectCwd,e.default);default:return e.default}}function dT(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Fdt;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return ue.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(dT(a,e,r));return s}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=dT(n,e.valueDefinition,r);typeof c<"u"&&s.set(a,c)}return s}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=dT(n,c,r);typeof f<"u"&&s.set(a,f)}return s}return t}function Ldt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(mT)&&(e=(0,wde.default)(e.slice(mT.length)),t[e]=r);return t}function kj(){let t=`${mT}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return Qj}async function Cde(t){try{return await le.readFilePromise(t)}catch{return Buffer.of()}}async function Mdt(t,e){return Buffer.compare(...await Promise.all([Cde(t),Cde(e)]))===0}async function _dt(t,e){let[r,s]=await Promise.all([le.statPromise(t),le.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function Hdt({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await Udt(r,e)?null:r}var wde,_p,Bde,vde,Sde,xj,Tdt,hv,Rdt,Up,mT,Qj,Fdt,gv,Dde,yT,gT,Udt,ze,dv=Ct(()=>{bt();Bc();wde=et(zre()),_p=et(Rd());Wt();Bde=et(qne()),vde=Ie("module"),Sde=et(Od()),xj=Ie("stream");nhe();sI();K8();J8();z8();Qhe();Z8();$d();Ohe();NQ();Qc();E0();fT();kc();pT();Np();Yo();Tdt=function(){if(!_p.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=ue.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=le.readJsonSync(t)}catch{return!1}return!(!("repository"in e)||!e.repository||(e.repository.private??!0))}(),hv=new Set(["@yarnpkg/plugin-constraints","@yarnpkg/plugin-exec","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]),Rdt=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","zipDataEpilogue","cacheCheckpointOverride","cacheVersionOverride","lockfileVersionOverride","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir","registry","ignoreCwd"]),Up=/^(?!v)[a-z0-9._-]+$/i,mT="yarn_",Qj=".yarnrc.yml",Fdt="********",gv=(E=>(E.ANY="ANY",E.BOOLEAN="BOOLEAN",E.ABSOLUTE_PATH="ABSOLUTE_PATH",E.LOCATOR="LOCATOR",E.LOCATOR_LOOSE="LOCATOR_LOOSE",E.NUMBER="NUMBER",E.STRING="STRING",E.SECRET="SECRET",E.SHAPE="SHAPE",E.MAP="MAP",E))(gv||{}),Dde=pt,yT=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(yT||{}),gT={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:"ABSOLUTE_PATH",default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:"BOOLEAN",default:!1},globalFolder:{description:"Folder where all system-global files are stored",type:"ABSOLUTE_PATH",default:iH()},cacheFolder:{description:"Folder where the cache files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:"NUMBER",values:["mixed",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:"ABSOLUTE_PATH",default:"./.yarn/__virtual__"},installStatePath:{description:"Path of the file where the install state will be persisted",type:"ABSOLUTE_PATH",default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:"STRING",default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:"STRING",default:kj()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:"BOOLEAN",default:!0},cacheMigrationMode:{description:"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.",type:"STRING",values:["always","match-spec","required-only"],default:"always"},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:"BOOLEAN",default:zk,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:"BOOLEAN",default:u3,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:"BOOLEAN",default:_p.isCI,defaultText:""},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:"BOOLEAN",default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:"BOOLEAN",default:!_p.isCI,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:"BOOLEAN",default:!0},enableTips:{description:"If true, installs will print a helpful message every day of the week",type:"BOOLEAN",default:!_p.isCI,defaultText:""},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:"BOOLEAN",default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:"BOOLEAN",default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:"STRING",default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:"STRING",default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:"STRING",default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:"BOOLEAN",default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:"SHAPE",properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:"BOOLEAN",default:!0},enableNetwork:{description:"If false, Yarn will refuse to use the network if required to",type:"BOOLEAN",default:!0},enableOfflineMode:{description:"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network",type:"BOOLEAN",default:!1},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:"STRING",default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:"NUMBER",default:6e4},httpRetry:{description:"Retry times on http failure",type:"NUMBER",default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:"NUMBER",default:50},taskPoolConcurrency:{description:"Maximal amount of concurrent heavy task processing",type:"NUMBER",default:Dj()},taskPoolMode:{description:"Execution strategy for heavy tasks",type:"STRING",values:["async","workers"],default:"workers"},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{httpsCaFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null}}}},httpsCaFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:"BOOLEAN",default:!0},logFilters:{description:"Overrides for log levels",type:"SHAPE",isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:"STRING",default:void 0},text:{description:"Code of the texts covered by this override",type:"STRING",default:void 0},pattern:{description:"Code of the patterns covered by this override",type:"STRING",default:void 0},level:{description:"Log level override, set to null to remove override",type:"STRING",values:Object.values(Xk),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:"BOOLEAN",default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:"NUMBER",default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:"STRING",default:null},enableHardenedMode:{description:"If true, automatically enable --check-resolutions --refresh-lockfile on installs",type:"BOOLEAN",default:_p.isPR&&Tdt,defaultText:""},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:"BOOLEAN",default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:"BOOLEAN",default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:"BOOLEAN",default:!1},enableCacheClean:{description:"If false, disallows the `cache clean` command",type:"BOOLEAN",default:!0},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:"STRING",default:"throw"},injectEnvironmentFiles:{description:"List of all the environment files that Yarn should inject inside the process when it starts",type:"ABSOLUTE_PATH",default:[".env.yarn?"],isArray:!0},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:"MAP",valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:"SHAPE",properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:"MAP",valueDefinition:{description:"A range",type:"STRING"}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:"MAP",valueDefinition:{description:"A semver range",type:"STRING"}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:"MAP",valueDefinition:{description:"The peerDependency meta",type:"SHAPE",properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:"BOOLEAN",default:!1}}}}}}}};Udt=process.platform==="win32"?Mdt:_dt;ze=class t{constructor(e){this.isCI=_p.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static{this.deleteProperty=Symbol()}static{this.telemetry=null}static create(e,r,s){let a=new t(e);typeof r<"u"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(gT);let n=typeof s<"u"?s:r instanceof Map?r:new Map;for(let[c,f]of n)a.activatePlugin(c,f);return a}static async find(e,r,{strict:s=!0,usePathCheck:a=null,useRc:n=!0}={}){let c=Ldt();delete c.rcFilename;let f=new t(e),p=await t.findRcFiles(e),h=await t.findFolderRcFile(fI());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Nhe(p.map(ce=>[ce.path,ce.data])),C=vt.dot,S=new Set(Object.keys(gT)),P=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe})=>({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe}),I=({yarnPath:ce,ignorePath:me,injectEnvironmentFiles:pe,...Be})=>{let Ce={};for(let[g,we]of Object.entries(Be))S.has(g)&&(Ce[g]=we);return Ce},R=({yarnPath:ce,ignorePath:me,...pe})=>{let Be={};for(let[Ce,g]of Object.entries(pe))S.has(Ce)||(Be[Ce]=g);return Be};if(f.importSettings(P(gT)),f.useWithSource("",P(c),e,{strict:!1}),E){let[ce,me]=E;f.useWithSource(ce,P(me),C,{strict:!1})}if(a){if(await Hdt({configuration:f,selfPath:a})!==null)return f;f.useWithSource("",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await t.findProjectCwd(e);f.startingCwd=e,f.projectCwd=N;let U=Object.assign(Object.create(null),process.env);f.env=U;let W=await Promise.all(f.get("injectEnvironmentFiles").map(async ce=>{let me=ce.endsWith("?")?await le.readFilePromise(ce.slice(0,-1),"utf8").catch(()=>""):await le.readFilePromise(ce,"utf8");return(0,Bde.parse)(me)}));for(let ce of W)for(let[me,pe]of Object.entries(ce))f.env[me]=Yk(pe,{env:U});if(f.importSettings(I(gT)),f.useWithSource("",I(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,I(me),C,{strict:s})}let te=ce=>"default"in ce?ce.default:ce,ie=new Map([["@@core",rhe]]);if(r!==null)for(let ce of r.plugins.keys())ie.set(ce,te(r.modules.get(ce)));for(let[ce,me]of ie)f.activatePlugin(ce,me);let Ae=new Map([]);if(r!==null){let ce=new Map;for(let[Be,Ce]of r.modules)ce.set(Be,()=>Ce);let me=new Set,pe=async(Be,Ce)=>{let{factory:g,name:we}=kp(Be);if(!g||me.has(we))return;let ye=new Map(ce),fe=X=>{if((0,vde.isBuiltin)(X))return kp(X);if(ye.has(X))return ye.get(X)();throw new nt(`This plugin cannot access the package referenced via ${X} which is neither a builtin, nor an exposed entry`)},se=await qE(async()=>te(await g(fe)),X=>`${X} (when initializing ${we}, defined in ${Ce})`);ce.set(we,()=>se),me.add(we),Ae.set(we,se)};if(c.plugins)for(let Be of c.plugins.split(";")){let Ce=K.resolve(e,ue.toPortablePath(Be));await pe(Ce,"")}for(let{path:Be,cwd:Ce,data:g}of p)if(n&&Array.isArray(g.plugins))for(let we of g.plugins){let ye=typeof we!="string"?we.path:we,fe=we?.spec??"",se=we?.checksum??"";if(hv.has(fe))continue;let X=K.resolve(Ce,ue.toPortablePath(ye));if(!await le.existsPromise(X)){if(!fe){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,".gitignore",pt.NAME),rt=Ut(f,f.values.get("rcFilename"),pt.NAME),Fe=Ut(f,"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored",pt.URL);throw new nt(`Missing source for the ${dt} plugin - please try to remove the plugin from ${rt} then reinstall it manually. This error usually occurs because ${j} is incorrect, check ${Fe} to make sure your plugin folder isn't gitignored.`)}if(!fe.match(/^https?:/)){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,f.values.get("rcFilename"),pt.NAME);throw new nt(`Failed to recognize the source for the ${dt} plugin - please try to delete the plugin from ${j} then reinstall it manually.`)}let De=await Bj(fe,{configuration:f}),Re=fs(De);if(se&&se!==Re){let dt=Ut(f,K.basename(X,".cjs"),pt.NAME),j=Ut(f,f.values.get("rcFilename"),pt.NAME),rt=Ut(f,`yarn plugin import ${fe}`,pt.CODE);throw new nt(`Failed to fetch the ${dt} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${j} then run ${rt} to reimport it.`)}await le.mkdirPromise(K.dirname(X),{recursive:!0}),await le.writeFilePromise(X,De)}await pe(X,Be)}}for(let[ce,me]of Ae)f.activatePlugin(ce,me);if(f.useWithSource("",R(c),e,{strict:s}),E){let[ce,me]=E;f.useWithSource(ce,R(me),C,{strict:s})}return f.get("enableGlobalCache")&&(f.values.set("cacheFolder",`${f.get("globalFolder")}/cache`),f.sources.set("cacheFolder","")),f}static async findRcFiles(e){let r=kj(),s=[],a=e,n=null;for(;a!==n;){n=a;let c=K.join(n,r);if(le.existsSync(c)){let f,p;try{p=await le.readFilePromise(c,"utf8"),f=cs(p)}catch{let h="";throw p?.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(h=" (in particular, make sure you list the colons after each key name)"),new nt(`Parse error when loading ${c}; please check it's proper Yaml${h}`)}s.unshift({path:c,cwd:n,data:f})}a=K.dirname(n)}return s}static async findFolderRcFile(e){let r=K.join(e,Er.rc),s;try{s=await le.readFilePromise(r,"utf8")}catch(n){if(n.code==="ENOENT")return null;throw n}let a=cs(s);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,s=e,a=null;for(;s!==a;){if(a=s,le.existsSync(K.join(a,Er.lockfile)))return a;le.existsSync(K.join(a,Er.manifest))&&(r=a),s=K.dirname(a)}return r}static async updateConfiguration(e,r,s={}){let a=kj(),n=K.join(e,a),c=le.existsSync(n)?cs(await le.readFilePromise(n,"utf8")):{},f=!1,p;if(typeof r=="function"){try{p=r(c)}catch{p=r({})}if(p===c)return!1}else{p=c;for(let h of Object.keys(r)){let E=c[h],C=r[h],S;if(typeof C=="function")try{S=C(E)}catch{S=C(void 0)}else S=C;E!==S&&(S===t.deleteProperty?delete p[h]:p[h]=S,f=!0)}if(!f)return!1}return await le.changeFilePromise(n,il(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await t.updateConfiguration(e,s=>{let a=s.plugins??[];if(a.length===0)return{...s,plugins:r};let n=[],c=[...r];for(let f of a){let p=typeof f!="string"?f.path:f,h=c.find(E=>E.path===p);h?(n.push(h),c=c.filter(E=>E!==h)):n.push(f)}return n.push(...c),{...s,plugins:n}})}static async updateHomeConfiguration(e){let r=fI();return await t.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<"u"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,s]of Object.entries(e))if(s!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,s),this.values.set(r,Rj(this,s))}}useWithSource(e,r,s,a){try{this.use(e,r,s,a)}catch(n){throw n.message+=` (in ${Ut(this,e,pt.PATH)})`,n}}use(e,r,s,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get("enableStrictSettings");for(let c of["enableStrictSettings",...Object.keys(r)]){let f=r[c],p=rH(f);if(p&&(e=p),typeof f>"u"||c==="plugins"||e===""&&Rdt.has(c))continue;if(c==="rcFilename")throw new nt(`The rcFilename settings can only be set via ${`${mT}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(c);if(!h){let C=fI(),S=e[0]!=="<"?K.dirname(e):null;if(a&&!(S!==null?C===S:!1))throw new nt(`Unrecognized or legacy configuration settings found: ${c} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(c,e);continue}if(this.sources.has(c)&&!(n||h.type==="MAP"||h.isArray&&h.concatenateValues))continue;let E;try{E=Tj(this,c,f,h,s)}catch(C){throw C.message+=` in ${Ut(this,e,pt.PATH)}`,C}if(c==="enableStrictSettings"&&e!==""){a=E;continue}if(h.type==="MAP"){let C=this.values.get(c);this.values.set(c,new Map(n?[...C,...E]:[...E,...C])),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let C=this.values.get(c);this.values.set(c,n?[...C,...E]:[...E,...C]),this.sources.set(c,`${this.sources.get(c)}, ${e}`)}else this.values.set(c,E),this.sources.set(c,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:s=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>"u")throw new nt(`Couldn't find a configuration settings named "${e}"`);return dT(a,n,{hideSecrets:r,getNativePaths:s})}getSubprocessStreams(e,{header:r,prefix:s,report:a}){let n,c,f=le.createWriteStream(e);if(this.get("enableInlineBuilds")){let p=a.createStreamReporter(`${s} ${Ut(this,"STDOUT","green")}`),h=a.createStreamReporter(`${s} ${Ut(this,"STDERR","red")}`);n=new xj.PassThrough,n.pipe(p),n.pipe(f),c=new xj.PassThrough,c.pipe(h),c.pipe(f)}else n=f,c=f,typeof r<"u"&&n.write(`${r} +`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new em([new TQ,new Ei,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new aI([new lI,new cI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=pv(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(c=>c==="current"?e.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?e.cpu:c));let n=r.get("libc");return n!==null&&(n=Yl(n,c=>c==="current"?e.libc??Yl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!ul(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new Ht;c.load(a,{yamlCompatibilityMode:!0});let f=LB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,C]of c.peerDependenciesMeta)for(let[S,P]of Object.entries(C))p.push({...h,type:"PeerDependencyMeta",selector:E,key:S,value:P})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get("packageExtensions"))r(I0(s,!0),Wk(a),{userProvided:!0});return e}normalizeLocator(e){return ul(e.reference)?Vs(e,`${this.get("defaultProtocol")}${e.reference}`):Up.test(e.reference)?Vs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return ul(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):Up.test(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=WB(e),a=r.get(e.identHash);if(typeof a<"u"){let c=e.version;if(c!==null){for(let[f,p]of a)if(eA(c,f))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof s.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof s.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Vl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:r3(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Da(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,"*"))}for(let c of s.peerDependencies.values()){if(c.scope==="types")continue;let f=n(c),p=ba("types",f),h=cn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,On(p,"*")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(Ys(s.dependencies,([,c])=>ll(c))),s.peerDependencies=new Map(Ys(s.peerDependencies,([,c])=>ll(c))),s}getLimit(e){return Vl(this.limits,e,()=>(0,Sde.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<"u")return c}return null}}});var Gr={};Vt(Gr,{EndStrategy:()=>Lj,ExecError:()=>ET,PipeError:()=>mv,execvp:()=>bj,pipevp:()=>Yu});function im(t){return t!==null&&typeof t.fd=="number"}function Fj(){}function Nj(){for(let t of sm)t.kill()}async function Yu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":im(n)&&(h[0]=n),im(c)&&(h[1]=c),im(f)&&(h[2]=f);let E=(0,Oj.default)(t,e,{cwd:ue.fromPortablePath(r),env:{...s,PWD:ue.fromPortablePath(r)},stdio:h});sm.add(E),sm.size===1&&(process.on("SIGINT",Fj),process.on("SIGTERM",Nj)),!im(n)&&n!==null&&n.pipe(E.stdin),im(c)||E.stdout.pipe(c,{end:!1}),im(f)||E.stderr.pipe(f,{end:!1});let C=()=>{for(let S of new Set([c,f]))im(S)||S.end()};return new Promise((S,P)=>{E.on("error",I=>{sm.delete(E),sm.size===0&&(process.off("SIGINT",Fj),process.off("SIGTERM",Nj)),(p===2||p===1)&&C(),P(I)}),E.on("close",(I,R)=>{sm.delete(E),sm.size===0&&(process.off("SIGINT",Fj),process.off("SIGTERM",Nj)),(p===2||p===1&&I!==0)&&C(),I===0||!a?S({code:Mj(I,R)}):P(new mv({fileName:t,code:I,signal:R}))})})}async function bj(t,e,{cwd:r,env:s=process.env,encoding:a="utf8",strict:n=!1}){let c=["ignore","pipe","pipe"],f=[],p=[],h=ue.fromPortablePath(r);typeof s.PWD<"u"&&(s={...s,PWD:h});let E=(0,Oj.default)(t,e,{cwd:h,env:s,stdio:c});return E.stdout.on("data",C=>{f.push(C)}),E.stderr.on("data",C=>{p.push(C)}),await new Promise((C,S)=>{E.on("error",P=>{let I=ze.create(r),R=Ut(I,t,pt.PATH);S(new Yt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,` ${Zf(I,{label:"Thrown Error",value:Hu(pt.NO_HINT,P.message)})}`)}))}),E.on("close",(P,I)=>{let R=a==="buffer"?Buffer.concat(f):Buffer.concat(f).toString(a),N=a==="buffer"?Buffer.concat(p):Buffer.concat(p).toString(a);P===0||!n?C({code:Mj(P,I),stdout:R,stderr:N}):S(new ET({fileName:t,code:P,signal:I,stdout:R,stderr:N}))})})}function Mj(t,e){let r=jdt.get(e);return typeof r<"u"?128+r:t??1}function qdt(t,e,{configuration:r,report:s}){s.reportError(1,` ${Zf(r,t!==null?{label:"Exit Code",value:Hu(pt.NUMBER,t)}:{label:"Exit Signal",value:Hu(pt.CODE,e)})}`)}var Oj,Lj,mv,ET,sm,jdt,hT=Ct(()=>{bt();Oj=et(j_());dv();Fc();Qc();Lj=(s=>(s[s.Never=0]="Never",s[s.ErrorCode=1]="ErrorCode",s[s.Always=2]="Always",s))(Lj||{}),mv=class extends Yt{constructor({fileName:e,code:r,signal:s}){let a=ze.create(K.cwd()),n=Ut(a,e,pt.PATH);super(1,`Child ${n} reported an error`,c=>{qdt(r,s,{configuration:a,report:c})}),this.code=Mj(r,s)}},ET=class extends mv{constructor({fileName:e,code:r,signal:s,stdout:a,stderr:n}){super({fileName:e,code:r,signal:s}),this.stdout=a,this.stderr=n}};sm=new Set;jdt=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]])});function Pde(t){bde=t}function yv(){return typeof _j>"u"&&(_j=bde()),_j}var _j,bde,Uj=Ct(()=>{bde=()=>{throw new Error("Assertion failed: No libzip instance is available, and no factory was configured")}});var xde=L((IT,jj)=>{var Gdt=Object.assign({},Ie("fs")),Hj=function(){var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<"u"?e:{},s,a;r.ready=new Promise(function(Je,st){s=Je,a=st});var n={},c;for(c in r)r.hasOwnProperty(c)&&(n[c]=r[c]);var f=[],p="./this.program",h=function(Je,st){throw st},E=!1,C=!0,S="";function P(Je){return r.locateFile?r.locateFile(Je,S):S+Je}var I,R,N,U;C&&(E?S=Ie("path").dirname(S)+"/":S=__dirname+"/",I=function(st,St){var lr=Me(st);return lr?St?lr:lr.toString():(N||(N=Gdt),U||(U=Ie("path")),st=U.normalize(st),N.readFileSync(st,St?null:"utf8"))},R=function(st){var St=I(st,!0);return St.buffer||(St=new Uint8Array(St)),we(St.buffer),St},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),f=process.argv.slice(2),h=function(Je){process.exit(Je)},r.inspect=function(){return"[Emscripten Module object]"});var W=r.print||console.log.bind(console),te=r.printErr||console.warn.bind(console);for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);n=null,r.arguments&&(f=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ie=0,Ae=function(Je){ie=Je},ce;r.wasmBinary&&(ce=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!="object"&&ns("no native wasm support detected");function pe(Je,st,St){switch(st=st||"i8",st.charAt(st.length-1)==="*"&&(st="i32"),st){case"i1":return Ye[Je>>0];case"i8":return Ye[Je>>0];case"i16":return Eh((Je>>1)*2);case"i32":return no((Je>>2)*4);case"i64":return no((Je>>2)*4);case"float":return pf((Je>>2)*4);case"double":return yh((Je>>3)*8);default:ns("invalid type for getValue: "+st)}return null}var Be,Ce=!1,g;function we(Je,st){Je||ns("Assertion failed: "+st)}function ye(Je){var st=r["_"+Je];return we(st,"Cannot call unknown function "+Je+", make sure it is exported"),st}function fe(Je,st,St,lr,ee){var Ee={string:function(Gi){var Tn=0;if(Gi!=null&&Gi!==0){var Ga=(Gi.length<<2)+1;Tn=Bi(Ga),dt(Gi,Tn,Ga)}return Tn},array:function(Gi){var Tn=Bi(Gi.length);return Fe(Gi,Tn),Tn}};function Oe(Gi){return st==="string"?De(Gi):st==="boolean"?!!Gi:Gi}var gt=ye(Je),yt=[],Dt=0;if(lr)for(var tr=0;tr=St)&&ke[lr];)++lr;return X.decode(ke.subarray(Je,lr))}function Re(Je,st,St,lr){if(!(lr>0))return 0;for(var ee=St,Ee=St+lr-1,Oe=0;Oe=55296&><=57343){var yt=Je.charCodeAt(++Oe);gt=65536+((gt&1023)<<10)|yt&1023}if(gt<=127){if(St>=Ee)break;st[St++]=gt}else if(gt<=2047){if(St+1>=Ee)break;st[St++]=192|gt>>6,st[St++]=128|gt&63}else if(gt<=65535){if(St+2>=Ee)break;st[St++]=224|gt>>12,st[St++]=128|gt>>6&63,st[St++]=128|gt&63}else{if(St+3>=Ee)break;st[St++]=240|gt>>18,st[St++]=128|gt>>12&63,st[St++]=128|gt>>6&63,st[St++]=128|gt&63}}return st[St]=0,St-ee}function dt(Je,st,St){return Re(Je,ke,st,St)}function j(Je){for(var st=0,St=0;St=55296&&lr<=57343&&(lr=65536+((lr&1023)<<10)|Je.charCodeAt(++St)&1023),lr<=127?++st:lr<=2047?st+=2:lr<=65535?st+=3:st+=4}return st}function rt(Je){var st=j(Je)+1,St=Ma(st);return St&&Re(Je,Ye,St,st),St}function Fe(Je,st){Ye.set(Je,st)}function Ne(Je,st){return Je%st>0&&(Je+=st-Je%st),Je}var Pe,Ye,ke,it,_e,x,w,b,y,F;function z(Je){Pe=Je,r.HEAP_DATA_VIEW=F=new DataView(Je),r.HEAP8=Ye=new Int8Array(Je),r.HEAP16=it=new Int16Array(Je),r.HEAP32=x=new Int32Array(Je),r.HEAPU8=ke=new Uint8Array(Je),r.HEAPU16=_e=new Uint16Array(Je),r.HEAPU32=w=new Uint32Array(Je),r.HEAPF32=b=new Float32Array(Je),r.HEAPF64=y=new Float64Array(Je)}var Z=r.INITIAL_MEMORY||16777216,$,oe=[],xe=[],Te=[],lt=!1;function It(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Pt(r.preRun.shift());Fs(oe)}function qt(){lt=!0,Fs(xe)}function ir(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Pr(r.postRun.shift());Fs(Te)}function Pt(Je){oe.unshift(Je)}function gn(Je){xe.unshift(Je)}function Pr(Je){Te.unshift(Je)}var Ir=0,Nr=null,nn=null;function ai(Je){Ir++,r.monitorRunDependencies&&r.monitorRunDependencies(Ir)}function wo(Je){if(Ir--,r.monitorRunDependencies&&r.monitorRunDependencies(Ir),Ir==0&&(Nr!==null&&(clearInterval(Nr),Nr=null),nn)){var st=nn;nn=null,st()}}r.preloadedImages={},r.preloadedAudios={};function ns(Je){r.onAbort&&r.onAbort(Je),Je+="",te(Je),Ce=!0,g=1,Je="abort("+Je+"). Build with -s ASSERTIONS=1 for more info.";var st=new WebAssembly.RuntimeError(Je);throw a(st),st}var to="data:application/octet-stream;base64,";function Bo(Je){return Je.startsWith(to)}var ji="data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBgAn9/AX5gBX9/f39/AGADf35/AX5gBX5+f35/AX5gA39/fwF+YAZ/fH9/f38Bf2AAAGAHf35/f39+fwF/YAV/fn9/fwF/YAV/f39/fwF+YAJ+fwF/YAJ/fAACJQYBYQFhAAMBYQFiAAEBYQFjAAABYQFkAAEBYQFlAAIBYQFmAAED5wHlAQMAAwEDAwEHDAgDFgcNEgEDDRcFAQ8DEAUQAwIBAhgECxkEAQMBBQsFAwMDARACBAMAAggLBwEAAwADGgQDGwYGABwBBgMTFBEHBwcVCx4ABAgHBAICAgAfAQICAgIGFSAAIQAiAAIBBgIHAg0LEw0FAQUCACMDAQAUAAAGBQECBQUDCwsSAgEDBQIHAQEICAACCQQEAQABCAEBCQoBAwkBAQEBBgEGBgYABAIEBAQGEQQEAAARAAEDCQEJAQAJCQkBAQECCgoAAAMPAQEBAwACAgICBQIABwAKBgwHAAADAgICBQEEBQFwAT8/BQcBAYACgIACBgkBfwFBgInBAgsH+gEzAWcCAAFoAFQBaQDqAQFqALsBAWsAwQEBbACpAQFtAKgBAW4ApwEBbwClAQFwAKMBAXEAoAEBcgCbAQFzAMABAXQAugEBdQC5AQF2AEsBdwDiAQF4AMgBAXkAxwEBegDCAQFBAMkBAUIAuAEBQwAGAUQACQFFAKYBAUYAtwEBRwC2AQFIALUBAUkAtAEBSgCzAQFLALIBAUwAsQEBTQCwAQFOAK8BAU8AvAEBUACuAQFRAK0BAVIArAEBUwAaAVQACwFVAKQBAVYAMgFXAQABWACrAQFZAKoBAVoAxgEBXwDFAQEkAMQBAmFhAL8BAmJhAL4BAmNhAL0BCXgBAEEBCz6iAeMBjgGQAVpbjwFYnwGdAVeeAV1coQFZVlWcAZoBmQGYAZcBlgGVAZQBkwGSAZEB6QHoAecB5gHlAeQB4QHfAeAB3gHdAdwB2gHbAYUB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygE4wwEK1N8G5QHMDAEHfwJAIABFDQAgAEEIayIDIABBBGsoAgAiAUF4cSIAaiEFAkAgAUEBcQ0AIAFBA3FFDQEgAyADKAIAIgFrIgNBxIQBKAIASQ0BIAAgAWohACADQciEASgCAEcEQCABQf8BTQRAIAMoAggiAiABQQN2IgRBA3RB3IQBakYaIAIgAygCDCIBRgRAQbSEAUG0hAEoAgBBfiAEd3E2AgAMAwsgAiABNgIMIAEgAjYCCAwCCyADKAIYIQYCQCADIAMoAgwiAUcEQCADKAIIIgIgATYCDCABIAI2AggMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAQJAIAMgAygCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAwsgBkEQQRQgBigCECADRhtqIAE2AgAgAUUNAgsgASAGNgIYIAMoAhAiAgRAIAEgAjYCECACIAE2AhgLIAMoAhQiAkUNASABIAI2AhQgAiABNgIYDAELIAUoAgQiAUEDcUEDRw0AQbyEASAANgIAIAUgAUF+cTYCBCADIABBAXI2AgQgACADaiAANgIADwsgAyAFTw0AIAUoAgQiAUEBcUUNAAJAIAFBAnFFBEAgBUHMhAEoAgBGBEBBzIQBIAM2AgBBwIQBQcCEASgCACAAaiIANgIAIAMgAEEBcjYCBCADQciEASgCAEcNA0G8hAFBADYCAEHIhAFBADYCAA8LIAVByIQBKAIARgRAQciEASADNgIAQbyEAUG8hAEoAgAgAGoiADYCACADIABBAXI2AgQgACADaiAANgIADwsgAUF4cSAAaiEAAkAgAUH/AU0EQCAFKAIIIgIgAUEDdiIEQQN0QdyEAWpGGiACIAUoAgwiAUYEQEG0hAFBtIQBKAIAQX4gBHdxNgIADAILIAIgATYCDCABIAI2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgFHBEAgBSgCCCICQcSEASgCAEkaIAIgATYCDCABIAI2AggMAQsCQCAFQRRqIgIoAgAiBA0AIAVBEGoiAigCACIEDQBBACEBDAELA0AgAiEHIAQiAUEUaiICKAIAIgQNACABQRBqIQIgASgCECIEDQALIAdBADYCAAsgBkUNAAJAIAUgBSgCHCICQQJ0QeSGAWoiBCgCAEYEQCAEIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiACd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAE2AgAgAUUNAQsgASAGNgIYIAUoAhAiAgRAIAEgAjYCECACIAE2AhgLIAUoAhQiAkUNACABIAI2AhQgAiABNgIYCyADIABBAXI2AgQgACADaiAANgIAIANByIQBKAIARw0BQbyEASAANgIADwsgBSABQX5xNgIEIAMgAEEBcjYCBCAAIANqIAA2AgALIABB/wFNBEAgAEEDdiIBQQN0QdyEAWohAAJ/QbSEASgCACICQQEgAXQiAXFFBEBBtIQBIAEgAnI2AgAgAAwBCyAAKAIICyECIAAgAzYCCCACIAM2AgwgAyAANgIMIAMgAjYCCA8LQR8hAiADQgA3AhAgAEH///8HTQRAIABBCHYiASABQYD+P2pBEHZBCHEiAXQiAiACQYDgH2pBEHZBBHEiAnQiBCAEQYCAD2pBEHZBAnEiBHRBD3YgASACciAEcmsiAUEBdCAAIAFBFWp2QQFxckEcaiECCyADIAI2AhwgAkECdEHkhgFqIQECQAJAAkBBuIQBKAIAIgRBASACdCIHcUUEQEG4hAEgBCAHcjYCACABIAM2AgAgAyABNgIYDAELIABBAEEZIAJBAXZrIAJBH0YbdCECIAEoAgAhAQNAIAEiBCgCBEF4cSAARg0CIAJBHXYhASACQQF0IQIgBCABQQRxaiIHQRBqKAIAIgENAAsgByADNgIQIAMgBDYCGAsgAyADNgIMIAMgAzYCCAwBCyAEKAIIIgAgAzYCDCAEIAM2AgggA0EANgIYIAMgBDYCDCADIAA2AggLQdSEAUHUhAEoAgBBAWsiAEF/IAAbNgIACwuDBAEDfyACQYAETwRAIAAgASACEAIaIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAEEDcUUEQCAAIQIMAQsgAkEBSARAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAkEDcUUNASACIANJDQALCwJAIANBfHEiBEHAAEkNACACIARBQGoiBUsNAANAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAIgASgCDDYCDCACIAEoAhA2AhAgAiABKAIUNgIUIAIgASgCGDYCGCACIAEoAhw2AhwgAiABKAIgNgIgIAIgASgCJDYCJCACIAEoAig2AiggAiABKAIsNgIsIAIgASgCMDYCMCACIAEoAjQ2AjQgAiABKAI4NgI4IAIgASgCPDYCPCABQUBrIQEgAkFAayICIAVNDQALCyACIARPDQEDQCACIAEoAgA2AgAgAUEEaiEBIAJBBGoiAiAESQ0ACwwBCyADQQRJBEAgACECDAELIAAgA0EEayIESwRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAiABLQABOgABIAIgAS0AAjoAAiACIAEtAAM6AAMgAUEEaiEBIAJBBGoiAiAETQ0ACwsgAiADSQRAA0AgAiABLQAAOgAAIAFBAWohASACQQFqIgIgA0cNAAsLIAALGgAgAARAIAAtAAEEQCAAKAIEEAYLIAAQBgsLoi4BDH8jAEEQayIMJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEG0hAEoAgAiBUEQIABBC2pBeHEgAEELSRsiCEEDdiICdiIBQQNxBEAgAUF/c0EBcSACaiIDQQN0IgFB5IQBaigCACIEQQhqIQACQCAEKAIIIgIgAUHchAFqIgFGBEBBtIQBIAVBfiADd3E2AgAMAQsgAiABNgIMIAEgAjYCCAsgBCADQQN0IgFBA3I2AgQgASAEaiIBIAEoAgRBAXI2AgQMDQsgCEG8hAEoAgAiCk0NASABBEACQEECIAJ0IgBBACAAa3IgASACdHEiAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqIgNBA3QiAEHkhAFqKAIAIgQoAggiASAAQdyEAWoiAEYEQEG0hAEgBUF+IAN3cSIFNgIADAELIAEgADYCDCAAIAE2AggLIARBCGohACAEIAhBA3I2AgQgBCAIaiICIANBA3QiASAIayIDQQFyNgIEIAEgBGogAzYCACAKBEAgCkEDdiIBQQN0QdyEAWohB0HIhAEoAgAhBAJ/IAVBASABdCIBcUUEQEG0hAEgASAFcjYCACAHDAELIAcoAggLIQEgByAENgIIIAEgBDYCDCAEIAc2AgwgBCABNgIIC0HIhAEgAjYCAEG8hAEgAzYCAAwNC0G4hAEoAgAiBkUNASAGQQAgBmtxQQFrIgAgAEEMdkEQcSICdiIBQQV2QQhxIgAgAnIgASAAdiIBQQJ2QQRxIgByIAEgAHYiAUEBdkECcSIAciABIAB2IgFBAXZBAXEiAHIgASAAdmpBAnRB5IYBaigCACIBKAIEQXhxIAhrIQMgASECA0ACQCACKAIQIgBFBEAgAigCFCIARQ0BCyAAKAIEQXhxIAhrIgIgAyACIANJIgIbIQMgACABIAIbIQEgACECDAELCyABIAhqIgkgAU0NAiABKAIYIQsgASABKAIMIgRHBEAgASgCCCIAQcSEASgCAEkaIAAgBDYCDCAEIAA2AggMDAsgAUEUaiICKAIAIgBFBEAgASgCECIARQ0EIAFBEGohAgsDQCACIQcgACIEQRRqIgIoAgAiAA0AIARBEGohAiAEKAIQIgANAAsgB0EANgIADAsLQX8hCCAAQb9/Sw0AIABBC2oiAEF4cSEIQbiEASgCACIJRQ0AQQAgCGshAwJAAkACQAJ/QQAgCEGAAkkNABpBHyAIQf///wdLDQAaIABBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCAIIABBFWp2QQFxckEcagsiBUECdEHkhgFqKAIAIgJFBEBBACEADAELQQAhACAIQQBBGSAFQQF2ayAFQR9GG3QhAQNAAkAgAigCBEF4cSAIayIHIANPDQAgAiEEIAciAw0AQQAhAyACIQAMAwsgACACKAIUIgcgByACIAFBHXZBBHFqKAIQIgJGGyAAIAcbIQAgAUEBdCEBIAINAAsLIAAgBHJFBEBBAiAFdCIAQQAgAGtyIAlxIgBFDQMgAEEAIABrcUEBayIAIABBDHZBEHEiAnYiAUEFdkEIcSIAIAJyIAEgAHYiAUECdkEEcSIAciABIAB2IgFBAXZBAnEiAHIgASAAdiIBQQF2QQFxIgByIAEgAHZqQQJ0QeSGAWooAgAhAAsgAEUNAQsDQCAAKAIEQXhxIAhrIgEgA0khAiABIAMgAhshAyAAIAQgAhshBCAAKAIQIgEEfyABBSAAKAIUCyIADQALCyAERQ0AIANBvIQBKAIAIAhrTw0AIAQgCGoiBiAETQ0BIAQoAhghBSAEIAQoAgwiAUcEQCAEKAIIIgBBxIQBKAIASRogACABNgIMIAEgADYCCAwKCyAEQRRqIgIoAgAiAEUEQCAEKAIQIgBFDQQgBEEQaiECCwNAIAIhByAAIgFBFGoiAigCACIADQAgAUEQaiECIAEoAhAiAA0ACyAHQQA2AgAMCQsgCEG8hAEoAgAiAk0EQEHIhAEoAgAhAwJAIAIgCGsiAUEQTwRAQbyEASABNgIAQciEASADIAhqIgA2AgAgACABQQFyNgIEIAIgA2ogATYCACADIAhBA3I2AgQMAQtByIQBQQA2AgBBvIQBQQA2AgAgAyACQQNyNgIEIAIgA2oiACAAKAIEQQFyNgIECyADQQhqIQAMCwsgCEHAhAEoAgAiBkkEQEHAhAEgBiAIayIBNgIAQcyEAUHMhAEoAgAiAiAIaiIANgIAIAAgAUEBcjYCBCACIAhBA3I2AgQgAkEIaiEADAsLQQAhACAIQS9qIgkCf0GMiAEoAgAEQEGUiAEoAgAMAQtBmIgBQn83AgBBkIgBQoCggICAgAQ3AgBBjIgBIAxBDGpBcHFB2KrVqgVzNgIAQaCIAUEANgIAQfCHAUEANgIAQYAgCyIBaiIFQQAgAWsiB3EiAiAITQ0KQeyHASgCACIEBEBB5IcBKAIAIgMgAmoiASADTQ0LIAEgBEsNCwtB8IcBLQAAQQRxDQUCQAJAQcyEASgCACIDBEBB9IcBIQADQCADIAAoAgAiAU8EQCABIAAoAgRqIANLDQMLIAAoAggiAA0ACwtBABApIgFBf0YNBiACIQVBkIgBKAIAIgNBAWsiACABcQRAIAIgAWsgACABakEAIANrcWohBQsgBSAITQ0GIAVB/v///wdLDQZB7IcBKAIAIgQEQEHkhwEoAgAiAyAFaiIAIANNDQcgACAESw0HCyAFECkiACABRw0BDAgLIAUgBmsgB3EiBUH+////B0sNBSAFECkiASAAKAIAIAAoAgRqRg0EIAEhAAsCQCAAQX9GDQAgCEEwaiAFTQ0AQZSIASgCACIBIAkgBWtqQQAgAWtxIgFB/v///wdLBEAgACEBDAgLIAEQKUF/RwRAIAEgBWohBSAAIQEMCAtBACAFaxApGgwFCyAAIgFBf0cNBgwECwALQQAhBAwHC0EAIQEMBQsgAUF/Rw0CC0HwhwFB8IcBKAIAQQRyNgIACyACQf7///8HSw0BIAIQKSEBQQAQKSEAIAFBf0YNASAAQX9GDQEgACABTQ0BIAAgAWsiBSAIQShqTQ0BC0HkhwFB5IcBKAIAIAVqIgA2AgBB6IcBKAIAIABJBEBB6IcBIAA2AgALAkACQAJAQcyEASgCACIHBEBB9IcBIQADQCABIAAoAgAiAyAAKAIEIgJqRg0CIAAoAggiAA0ACwwCC0HEhAEoAgAiAEEAIAAgAU0bRQRAQcSEASABNgIAC0EAIQBB+IcBIAU2AgBB9IcBIAE2AgBB1IQBQX82AgBB2IQBQYyIASgCADYCAEGAiAFBADYCAANAIABBA3QiA0HkhAFqIANB3IQBaiICNgIAIANB6IQBaiACNgIAIABBAWoiAEEgRw0AC0HAhAEgBUEoayIDQXggAWtBB3FBACABQQhqQQdxGyIAayICNgIAQcyEASAAIAFqIgA2AgAgACACQQFyNgIEIAEgA2pBKDYCBEHQhAFBnIgBKAIANgIADAILIAAtAAxBCHENACADIAdLDQAgASAHTQ0AIAAgAiAFajYCBEHMhAEgB0F4IAdrQQdxQQAgB0EIakEHcRsiAGoiAjYCAEHAhAFBwIQBKAIAIAVqIgEgAGsiADYCACACIABBAXI2AgQgASAHakEoNgIEQdCEAUGciAEoAgA2AgAMAQtBxIQBKAIAIAFLBEBBxIQBIAE2AgALIAEgBWohAkH0hwEhAAJAAkACQAJAAkACQANAIAIgACgCAEcEQCAAKAIIIgANAQwCCwsgAC0ADEEIcUUNAQtB9IcBIQADQCAHIAAoAgAiAk8EQCACIAAoAgRqIgQgB0sNAwsgACgCCCEADAALAAsgACABNgIAIAAgACgCBCAFajYCBCABQXggAWtBB3FBACABQQhqQQdxG2oiCSAIQQNyNgIEIAJBeCACa0EHcUEAIAJBCGpBB3EbaiIFIAggCWoiBmshAiAFIAdGBEBBzIQBIAY2AgBBwIQBQcCEASgCACACaiIANgIAIAYgAEEBcjYCBAwDCyAFQciEASgCAEYEQEHIhAEgBjYCAEG8hAFBvIQBKAIAIAJqIgA2AgAgBiAAQQFyNgIEIAAgBmogADYCAAwDCyAFKAIEIgBBA3FBAUYEQCAAQXhxIQcCQCAAQf8BTQRAIAUoAggiAyAAQQN2IgBBA3RB3IQBakYaIAMgBSgCDCIBRgRAQbSEAUG0hAEoAgBBfiAAd3E2AgAMAgsgAyABNgIMIAEgAzYCCAwBCyAFKAIYIQgCQCAFIAUoAgwiAUcEQCAFKAIIIgAgATYCDCABIAA2AggMAQsCQCAFQRRqIgAoAgAiAw0AIAVBEGoiACgCACIDDQBBACEBDAELA0AgACEEIAMiAUEUaiIAKAIAIgMNACABQRBqIQAgASgCECIDDQALIARBADYCAAsgCEUNAAJAIAUgBSgCHCIDQQJ0QeSGAWoiACgCAEYEQCAAIAE2AgAgAQ0BQbiEAUG4hAEoAgBBfiADd3E2AgAMAgsgCEEQQRQgCCgCECAFRhtqIAE2AgAgAUUNAQsgASAINgIYIAUoAhAiAARAIAEgADYCECAAIAE2AhgLIAUoAhQiAEUNACABIAA2AhQgACABNgIYCyAFIAdqIQUgAiAHaiECCyAFIAUoAgRBfnE2AgQgBiACQQFyNgIEIAIgBmogAjYCACACQf8BTQRAIAJBA3YiAEEDdEHchAFqIQICf0G0hAEoAgAiAUEBIAB0IgBxRQRAQbSEASAAIAFyNgIAIAIMAQsgAigCCAshACACIAY2AgggACAGNgIMIAYgAjYCDCAGIAA2AggMAwtBHyEAIAJB////B00EQCACQQh2IgAgAEGA/j9qQRB2QQhxIgN0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgA3IgAHJrIgBBAXQgAiAAQRVqdkEBcXJBHGohAAsgBiAANgIcIAZCADcCECAAQQJ0QeSGAWohBAJAQbiEASgCACIDQQEgAHQiAXFFBEBBuIQBIAEgA3I2AgAgBCAGNgIAIAYgBDYCGAwBCyACQQBBGSAAQQF2ayAAQR9GG3QhACAEKAIAIQEDQCABIgMoAgRBeHEgAkYNAyAAQR12IQEgAEEBdCEAIAMgAUEEcWoiBCgCECIBDQALIAQgBjYCECAGIAM2AhgLIAYgBjYCDCAGIAY2AggMAgtBwIQBIAVBKGsiA0F4IAFrQQdxQQAgAUEIakEHcRsiAGsiAjYCAEHMhAEgACABaiIANgIAIAAgAkEBcjYCBCABIANqQSg2AgRB0IQBQZyIASgCADYCACAHIARBJyAEa0EHcUEAIARBJ2tBB3EbakEvayIAIAAgB0EQakkbIgJBGzYCBCACQfyHASkCADcCECACQfSHASkCADcCCEH8hwEgAkEIajYCAEH4hwEgBTYCAEH0hwEgATYCAEGAiAFBADYCACACQRhqIQADQCAAQQc2AgQgAEEIaiEBIABBBGohACABIARJDQALIAIgB0YNAyACIAIoAgRBfnE2AgQgByACIAdrIgRBAXI2AgQgAiAENgIAIARB/wFNBEAgBEEDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBzYCCCAAIAc2AgwgByACNgIMIAcgADYCCAwEC0EfIQAgB0IANwIQIARB////B00EQCAEQQh2IgAgAEGA/j9qQRB2QQhxIgJ0IgAgAEGA4B9qQRB2QQRxIgF0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAEgAnIgAHJrIgBBAXQgBCAAQRVqdkEBcXJBHGohAAsgByAANgIcIABBAnRB5IYBaiEDAkBBuIQBKAIAIgJBASAAdCIBcUUEQEG4hAEgASACcjYCACADIAc2AgAgByADNgIYDAELIARBAEEZIABBAXZrIABBH0YbdCEAIAMoAgAhAQNAIAEiAigCBEF4cSAERg0EIABBHXYhASAAQQF0IQAgAiABQQRxaiIDKAIQIgENAAsgAyAHNgIQIAcgAjYCGAsgByAHNgIMIAcgBzYCCAwDCyADKAIIIgAgBjYCDCADIAY2AgggBkEANgIYIAYgAzYCDCAGIAA2AggLIAlBCGohAAwFCyACKAIIIgAgBzYCDCACIAc2AgggB0EANgIYIAcgAjYCDCAHIAA2AggLQcCEASgCACIAIAhNDQBBwIQBIAAgCGsiATYCAEHMhAFBzIQBKAIAIgIgCGoiADYCACAAIAFBAXI2AgQgAiAIQQNyNgIEIAJBCGohAAwDC0GEhAFBMDYCAEEAIQAMAgsCQCAFRQ0AAkAgBCgCHCICQQJ0QeSGAWoiACgCACAERgRAIAAgATYCACABDQFBuIQBIAlBfiACd3EiCTYCAAwCCyAFQRBBFCAFKAIQIARGG2ogATYCACABRQ0BCyABIAU2AhggBCgCECIABEAgASAANgIQIAAgATYCGAsgBCgCFCIARQ0AIAEgADYCFCAAIAE2AhgLAkAgA0EPTQRAIAQgAyAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEDAELIAQgCEEDcjYCBCAGIANBAXI2AgQgAyAGaiADNgIAIANB/wFNBEAgA0EDdiIAQQN0QdyEAWohAgJ/QbSEASgCACIBQQEgAHQiAHFFBEBBtIQBIAAgAXI2AgAgAgwBCyACKAIICyEAIAIgBjYCCCAAIAY2AgwgBiACNgIMIAYgADYCCAwBC0EfIQAgA0H///8HTQRAIANBCHYiACAAQYD+P2pBEHZBCHEiAnQiACAAQYDgH2pBEHZBBHEiAXQiACAAQYCAD2pBEHZBAnEiAHRBD3YgASACciAAcmsiAEEBdCADIABBFWp2QQFxckEcaiEACyAGIAA2AhwgBkIANwIQIABBAnRB5IYBaiECAkACQCAJQQEgAHQiAXFFBEBBuIQBIAEgCXI2AgAgAiAGNgIAIAYgAjYCGAwBCyADQQBBGSAAQQF2ayAAQR9GG3QhACACKAIAIQgDQCAIIgEoAgRBeHEgA0YNAiAAQR12IQIgAEEBdCEAIAEgAkEEcWoiAigCECIIDQALIAIgBjYCECAGIAE2AhgLIAYgBjYCDCAGIAY2AggMAQsgASgCCCIAIAY2AgwgASAGNgIIIAZBADYCGCAGIAE2AgwgBiAANgIICyAEQQhqIQAMAQsCQCALRQ0AAkAgASgCHCICQQJ0QeSGAWoiACgCACABRgRAIAAgBDYCACAEDQFBuIQBIAZBfiACd3E2AgAMAgsgC0EQQRQgCygCECABRhtqIAQ2AgAgBEUNAQsgBCALNgIYIAEoAhAiAARAIAQgADYCECAAIAQ2AhgLIAEoAhQiAEUNACAEIAA2AhQgACAENgIYCwJAIANBD00EQCABIAMgCGoiAEEDcjYCBCAAIAFqIgAgACgCBEEBcjYCBAwBCyABIAhBA3I2AgQgCSADQQFyNgIEIAMgCWogAzYCACAKBEAgCkEDdiIAQQN0QdyEAWohBEHIhAEoAgAhAgJ/QQEgAHQiACAFcUUEQEG0hAEgACAFcjYCACAEDAELIAQoAggLIQAgBCACNgIIIAAgAjYCDCACIAQ2AgwgAiAANgIIC0HIhAEgCTYCAEG8hAEgAzYCAAsgAUEIaiEACyAMQRBqJAAgAAuJAQEDfyAAKAIcIgEQMAJAIAAoAhAiAiABKAIQIgMgAiADSRsiAkUNACAAKAIMIAEoAgggAhAHGiAAIAAoAgwgAmo2AgwgASABKAIIIAJqNgIIIAAgACgCFCACajYCFCAAIAAoAhAgAms2AhAgASABKAIQIAJrIgA2AhAgAA0AIAEgASgCBDYCCAsLzgEBBX8CQCAARQ0AIAAoAjAiAQRAIAAgAUEBayIBNgIwIAENAQsgACgCIARAIABBATYCICAAEBoaCyAAKAIkQQFGBEAgABBDCwJAIAAoAiwiAUUNACAALQAoDQACQCABKAJEIgNFDQAgASgCTCEEA0AgACAEIAJBAnRqIgUoAgBHBEAgAyACQQFqIgJHDQEMAgsLIAUgBCADQQFrIgJBAnRqKAIANgIAIAEgAjYCRAsLIABBAEIAQQUQDhogACgCACIBBEAgARALCyAAEAYLC1oCAn4BfwJ/AkACQCAALQAARQ0AIAApAxAiAUJ9Vg0AIAFCAnwiAiAAKQMIWA0BCyAAQQA6AABBAAwBC0EAIAAoAgQiA0UNABogACACNwMQIAMgAadqLwAACwthAgJ+AX8CQAJAIAAtAABFDQAgACkDECICQn1WDQAgAkICfCIDIAApAwhYDQELIABBADoAAA8LIAAoAgQiBEUEQA8LIAAgAzcDECAEIAKnaiIAIAFBCHY6AAEgACABOgAAC8wCAQJ/IwBBEGsiBCQAAkAgACkDGCADrYinQQFxRQRAIABBDGoiAARAIABBADYCBCAAQRw2AgALQn8hAgwBCwJ+IAAoAgAiBUUEQCAAKAIIIAEgAiADIAAoAgQRDAAMAQsgBSAAKAIIIAEgAiADIAAoAgQRCgALIgJCf1UNAAJAIANBBGsOCwEAAAAAAAAAAAABAAsCQAJAIAAtABhBEHFFBEAgAEEMaiIBBEAgAUEANgIEIAFBHDYCAAsMAQsCfiAAKAIAIgFFBEAgACgCCCAEQQhqQghBBCAAKAIEEQwADAELIAEgACgCCCAEQQhqQghBBCAAKAIEEQoAC0J/VQ0BCyAAQQxqIgAEQCAAQQA2AgQgAEEUNgIACwwBCyAEKAIIIQEgBCgCDCEDIABBDGoiAARAIAAgAzYCBCAAIAE2AgALCyAEQRBqJAAgAguTFQIOfwN+AkACQAJAAkACQAJAAkACQAJAAkACQCAAKALwLQRAIAAoAogBQQFIDQEgACgCACIEKAIsQQJHDQQgAC8B5AENAyAALwHoAQ0DIAAvAewBDQMgAC8B8AENAyAALwH0AQ0DIAAvAfgBDQMgAC8B/AENAyAALwGcAg0DIAAvAaACDQMgAC8BpAINAyAALwGoAg0DIAAvAawCDQMgAC8BsAINAyAALwG0Ag0DIAAvAbgCDQMgAC8BvAINAyAALwHAAg0DIAAvAcQCDQMgAC8ByAINAyAALwHUAg0DIAAvAdgCDQMgAC8B3AINAyAALwHgAg0DIAAvAYgCDQIgAC8BjAINAiAALwGYAg0CQSAhBgNAIAAgBkECdCIFai8B5AENAyAAIAVBBHJqLwHkAQ0DIAAgBUEIcmovAeQBDQMgACAFQQxyai8B5AENAyAGQQRqIgZBgAJHDQALDAMLIABBBzYC/C0gAkF8Rw0FIAFFDQUMBgsgAkEFaiIEIQcMAwtBASEHCyAEIAc2AiwLIAAgAEHoFmoQUSAAIABB9BZqEFEgAC8B5gEhBCAAIABB7BZqKAIAIgxBAnRqQf//AzsB6gEgAEGQFmohECAAQZQWaiERIABBjBZqIQdBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJA0AgBCEIIAAgCyIOQQFqIgtBAnRqLwHmASEEAkACQCAGQQFqIgVB//8DcSIPIA1B//8DcU8NACAEIAhHDQAgBSEGDAELAn8gACAIQQJ0akHMFWogCkH//wNxIA9LDQAaIAgEQEEBIQUgByAIIAlGDQEaIAAgCEECdGpBzBVqIgYgBi8BAEEBajsBACAHDAELQQEhBSAQIBEgBkH//wNxQQpJGwsiBiAGLwEAIAVqOwEAQQAhBgJ/IARFBEBBAyEKQYoBDAELQQNBBCAEIAhGIgUbIQpBBkEHIAUbCyENIAghCQsgDCAORw0ACwsgAEHaE2ovAQAhBCAAIABB+BZqKAIAIgxBAnRqQd4TakH//wM7AQBBACEGIAxBAE4EQEEHQYoBIAQbIQ1BBEEDIAQbIQpBfyEJQQAhCwNAIAQhCCAAIAsiDkEBaiILQQJ0akHaE2ovAQAhBAJAAkAgBkEBaiIFQf//A3EiDyANQf//A3FPDQAgBCAIRw0AIAUhBgwBCwJ/IAAgCEECdGpBzBVqIApB//8DcSAPSw0AGiAIBEBBASEFIAcgCCAJRg0BGiAAIAhBAnRqQcwVaiIGIAYvAQBBAWo7AQAgBwwBC0EBIQUgECARIAZB//8DcUEKSRsLIgYgBi8BACAFajsBAEEAIQYCfyAERQRAQQMhCkGKAQwBC0EDQQQgBCAIRiIFGyEKQQZBByAFGwshDSAIIQkLIAwgDkcNAAsLIAAgAEGAF2oQUSAAIAAoAvgtAn9BEiAAQYoWai8BAA0AGkERIABB0hVqLwEADQAaQRAgAEGGFmovAQANABpBDyAAQdYVai8BAA0AGkEOIABBghZqLwEADQAaQQ0gAEHaFWovAQANABpBDCAAQf4Vai8BAA0AGkELIABB3hVqLwEADQAaQQogAEH6FWovAQANABpBCSAAQeIVai8BAA0AGkEIIABB9hVqLwEADQAaQQcgAEHmFWovAQANABpBBiAAQfIVai8BAA0AGkEFIABB6hVqLwEADQAaQQQgAEHuFWovAQANABpBA0ECIABBzhVqLwEAGwsiBkEDbGoiBEERajYC+C0gACgC/C1BCmpBA3YiByAEQRtqQQN2IgRNBEAgByEEDAELIAAoAowBQQRHDQAgByEECyAEIAJBBGpPQQAgARsNASAEIAdHDQQLIANBAmqtIRIgACkDmC4hFCAAKAKgLiIBQQNqIgdBP0sNASASIAGthiAUhCESDAILIAAgASACIAMQOQwDCyABQcAARgRAIAAoAgQgACgCEGogFDcAACAAIAAoAhBBCGo2AhBBAyEHDAELIAAoAgQgACgCEGogEiABrYYgFIQ3AAAgACAAKAIQQQhqNgIQIAFBPWshByASQcAAIAFrrYghEgsgACASNwOYLiAAIAc2AqAuIABBgMEAQYDKABCHAQwBCyADQQRqrSESIAApA5guIRQCQCAAKAKgLiIBQQNqIgRBP00EQCASIAGthiAUhCESDAELIAFBwABGBEAgACgCBCAAKAIQaiAUNwAAIAAgACgCEEEIajYCEEEDIQQMAQsgACgCBCAAKAIQaiASIAGthiAUhDcAACAAIAAoAhBBCGo2AhAgAUE9ayEEIBJBwAAgAWutiCESCyAAIBI3A5guIAAgBDYCoC4gAEHsFmooAgAiC6xCgAJ9IRMgAEH4FmooAgAhCQJAAkACfwJ+AkACfwJ/IARBOk0EQCATIASthiAShCETIARBBWoMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQIAmsIRJCBSEUQQoMAgsgACgCBCAAKAIQaiATIASthiAShDcAACAAIAAoAhBBCGo2AhAgE0HAACAEa62IIRMgBEE7awshBSAJrCESIAVBOksNASAFrSEUIAVBBWoLIQcgEiAUhiAThAwBCyAFQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgBq1CA30hE0IFIRRBCQwCCyAAKAIEIAAoAhBqIBIgBa2GIBOENwAAIAAgACgCEEEIajYCECAFQTtrIQcgEkHAACAFa62ICyESIAatQgN9IRMgB0E7Sw0BIAetIRQgB0EEagshBCATIBSGIBKEIRMMAQsgB0HAAEYEQCAAKAIEIAAoAhBqIBI3AAAgACAAKAIQQQhqNgIQQQQhBAwBCyAAKAIEIAAoAhBqIBMgB62GIBKENwAAIAAgACgCEEEIajYCECAHQTxrIQQgE0HAACAHa62IIRMLQQAhBQNAIAAgBSIBQZDWAGotAABBAnRqQc4VajMBACEUAn8gBEE8TQRAIBQgBK2GIBOEIRMgBEEDagwBCyAEQcAARgRAIAAoAgQgACgCEGogEzcAACAAIAAoAhBBCGo2AhAgFCETQQMMAQsgACgCBCAAKAIQaiAUIASthiAThDcAACAAIAAoAhBBCGo2AhAgFEHAACAEa62IIRMgBEE9awshBCABQQFqIQUgASAGRw0ACyAAIAQ2AqAuIAAgEzcDmC4gACAAQeQBaiICIAsQhgEgACAAQdgTaiIBIAkQhgEgACACIAEQhwELIAAQiAEgAwRAAkAgACgCoC4iBEE5TgRAIAAoAgQgACgCEGogACkDmC43AAAgACAAKAIQQQhqNgIQDAELIARBGU4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgQ2AqAuCyAEQQlOBH8gACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACgCoC5BEGsFIAQLQQFIDQAgACAAKAIQIgFBAWo2AhAgASAAKAIEaiAAKQOYLjwAAAsgAEEANgKgLiAAQgA3A5guCwsZACAABEAgACgCABAGIAAoAgwQBiAAEAYLC6wBAQJ+Qn8hAwJAIAAtACgNAAJAAkAgACgCIEUNACACQgBTDQAgAlANASABDQELIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAALQA1DQBCACEDIAAtADQNACACUA0AA0AgACABIAOnaiACIAN9QQEQDiIEQn9XBEAgAEEBOgA1Qn8gAyADUBsPCyAEUEUEQCADIAR8IgMgAloNAgwBCwsgAEEBOgA0CyADC3UCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgJCe1YNACACQgR8IgMgACkDCFgNAQsgAEEAOgAADwsgACgCBCIERQRADwsgACADNwMQIAQgAqdqIgAgAUEYdjoAAyAAIAFBEHY6AAIgACABQQh2OgABIAAgAToAAAtUAgF+AX8CQAJAIAAtAABFDQAgASAAKQMQIgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADwsgACgCBCIDRQRAQQAPCyAAIAI3AxAgAyABp2oLdwECfyMAQRBrIgMkAEF/IQQCQCAALQAoDQAgACgCIEEAIAJBA0kbRQRAIABBDGoiAARAIABBADYCBCAAQRI2AgALDAELIAMgAjYCCCADIAE3AwAgACADQhBBBhAOQgBTDQBBACEEIABBADoANAsgA0EQaiQAIAQLVwICfgF/AkACQCAALQAARQ0AIAApAxAiAUJ7Vg0AIAFCBHwiAiAAKQMIWA0BCyAAQQA6AABBAA8LIAAoAgQiA0UEQEEADwsgACACNwMQIAMgAadqKAAAC1UCAX4BfyAABEACQCAAKQMIUA0AQgEhAQNAIAAoAgAgAkEEdGoQPiABIAApAwhaDQEgAachAiABQgF8IQEMAAsACyAAKAIAEAYgACgCKBAQIAAQBgsLZAECfwJAAkACQCAARQRAIAGnEAkiA0UNAkEYEAkiAkUNAQwDCyAAIQNBGBAJIgINAkEADwsgAxAGC0EADwsgAkIANwMQIAIgATcDCCACIAM2AgQgAkEBOgAAIAIgAEU6AAEgAgudAQICfgF/AkACQCAALQAARQ0AIAApAxAiAkJ3Vg0AIAJCCHwiAyAAKQMIWA0BCyAAQQA6AAAPCyAAKAIEIgRFBEAPCyAAIAM3AxAgBCACp2oiACABQjiIPAAHIAAgAUIwiDwABiAAIAFCKIg8AAUgACABQiCIPAAEIAAgAUIYiDwAAyAAIAFCEIg8AAIgACABQgiIPAABIAAgATwAAAvwAgICfwF+AkAgAkUNACAAIAJqIgNBAWsgAToAACAAIAE6AAAgAkEDSQ0AIANBAmsgAToAACAAIAE6AAEgA0EDayABOgAAIAAgAToAAiACQQdJDQAgA0EEayABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUEEayAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBCGsgADYCACABQQxrIAA2AgAgAkEZSQ0AIAMgADYCGCADIAA2AhQgAyAANgIQIAMgADYCDCABQRBrIAA2AgAgAUEUayAANgIAIAFBGGsgADYCACABQRxrIAA2AgAgAiADQQRxQRhyIgFrIgJBIEkNACAArUKBgICAEH4hBSABIANqIQEDQCABIAU3AxggASAFNwMQIAEgBTcDCCABIAU3AwAgAUEgaiEBIAJBIGsiAkEfSw0ACwsLbwEDfyAAQQxqIQICQAJ/IAAoAiAiAUUEQEF/IQFBEgwBCyAAIAFBAWsiAzYCIEEAIQEgAw0BIABBAEIAQQIQDhogACgCACIARQ0BIAAQGkF/Sg0BQRQLIQAgAgRAIAJBADYCBCACIAA2AgALCyABC58BAgF/AX4CfwJAAn4gACgCACIDKAIkQQFGQQAgAkJ/VRtFBEAgA0EMaiIBBEAgAUEANgIEIAFBEjYCAAtCfwwBCyADIAEgAkELEA4LIgRCf1cEQCAAKAIAIQEgAEEIaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAsMAQtBACACIARRDQEaIABBCGoEQCAAQRs2AgwgAEEGNgIICwtBfwsLJAEBfyAABEADQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsLC5gBAgJ+AX8CQAJAIAAtAABFDQAgACkDECIBQndWDQAgAUIIfCICIAApAwhYDQELIABBADoAAEIADwsgACgCBCIDRQRAQgAPCyAAIAI3AxAgAyABp2oiADEABkIwhiAAMQAHQjiGhCAAMQAFQiiGhCAAMQAEQiCGhCAAMQADQhiGhCAAMQACQhCGhCAAMQABQgiGhCAAMQAAfAsjACAAQShGBEAgAhAGDwsgAgRAIAEgAkEEaygCACAAEQcACwsyACAAKAIkQQFHBEAgAEEMaiIABEAgAEEANgIEIABBEjYCAAtCfw8LIABBAEIAQQ0QDgsPACAABEAgABA2IAAQBgsLgAEBAX8gAC0AKAR/QX8FIAFFBEAgAEEMagRAIABBADYCECAAQRI2AgwLQX8PCyABECoCQCAAKAIAIgJFDQAgAiABECFBf0oNACAAKAIAIQEgAEEMaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAtBfw8LIAAgAUI4QQMQDkI/h6cLC38BA38gACEBAkAgAEEDcQRAA0AgAS0AAEUNAiABQQFqIgFBA3ENAAsLA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsgA0H/AXFFBEAgAiAAaw8LA0AgAi0AASEDIAJBAWoiASECIAMNAAsLIAEgAGsL3wIBCH8gAEUEQEEBDwsCQCAAKAIIIgINAEEBIQQgAC8BBCIHRQRAQQEhAgwBCyAAKAIAIQgDQAJAIAMgCGoiBS0AACICQSBPBEAgAkEYdEEYdUF/Sg0BCyACQQ1NQQBBASACdEGAzABxGw0AAn8CfyACQeABcUHAAUYEQEEBIQYgA0EBagwBCyACQfABcUHgAUYEQCADQQJqIQNBACEGQQEMAgsgAkH4AXFB8AFHBEBBBCECDAULQQAhBiADQQNqCyEDQQALIQlBBCECIAMgB08NAiAFLQABQcABcUGAAUcNAkEDIQQgBg0AIAUtAAJBwAFxQYABRw0CIAkNACAFLQADQcABcUGAAUcNAgsgBCECIANBAWoiAyAHSQ0ACwsgACACNgIIAn8CQCABRQ0AAkAgAUECRw0AIAJBA0cNAEECIQIgAEECNgIICyABIAJGDQBBBSACQQFHDQEaCyACCwtIAgJ+An8jAEEQayIEIAE2AgxCASAArYYhAgNAIAQgAUEEaiIANgIMIAIiA0IBIAEoAgAiBa2GhCECIAAhASAFQX9KDQALIAMLhwUBB38CQAJAIABFBEBBxRQhAiABRQ0BIAFBADYCAEHFFA8LIAJBwABxDQEgACgCCEUEQCAAQQAQIxoLIAAoAgghBAJAIAJBgAFxBEAgBEEBa0ECTw0BDAMLIARBBEcNAgsCQCAAKAIMIgINACAAAn8gACgCACEIIABBEGohCUEAIQICQAJAAkACQCAALwEEIgUEQEEBIQQgBUEBcSEHIAVBAUcNAQwCCyAJRQ0CIAlBADYCAEEADAQLIAVBfnEhBgNAIARBAUECQQMgAiAIai0AAEEBdEHQFGovAQAiCkGAEEkbIApBgAFJG2pBAUECQQMgCCACQQFyai0AAEEBdEHQFGovAQAiBEGAEEkbIARBgAFJG2ohBCACQQJqIQIgBkECayIGDQALCwJ/IAcEQCAEQQFBAkEDIAIgCGotAABBAXRB0BRqLwEAIgJBgBBJGyACQYABSRtqIQQLIAQLEAkiB0UNASAFQQEgBUEBSxshCkEAIQVBACEGA0AgBSAHaiEDAn8gBiAIai0AAEEBdEHQFGovAQAiAkH/AE0EQCADIAI6AAAgBUEBagwBCyACQf8PTQRAIAMgAkE/cUGAAXI6AAEgAyACQQZ2QcABcjoAACAFQQJqDAELIAMgAkE/cUGAAXI6AAIgAyACQQx2QeABcjoAACADIAJBBnZBP3FBgAFyOgABIAVBA2oLIQUgBkEBaiIGIApHDQALIAcgBEEBayICakEAOgAAIAlFDQAgCSACNgIACyAHDAELIAMEQCADQQA2AgQgA0EONgIAC0EACyICNgIMIAINAEEADwsgAUUNACABIAAoAhA2AgALIAIPCyABBEAgASAALwEENgIACyAAKAIAC4MBAQR/QRIhBQJAAkAgACkDMCABWA0AIAGnIQYgACgCQCEEIAJBCHEiB0UEQCAEIAZBBHRqKAIEIgINAgsgBCAGQQR0aiIEKAIAIgJFDQAgBC0ADEUNAUEXIQUgBw0BC0EAIQIgAyAAQQhqIAMbIgAEQCAAQQA2AgQgACAFNgIACwsgAgtuAQF/IwBBgAJrIgUkAAJAIARBgMAEcQ0AIAIgA0wNACAFIAFB/wFxIAIgA2siAkGAAiACQYACSSIBGxAZIAFFBEADQCAAIAVBgAIQLiACQYACayICQf8BSw0ACwsgACAFIAIQLgsgBUGAAmokAAuBAQEBfyMAQRBrIgQkACACIANsIQICQCAAQSdGBEAgBEEMaiACEIwBIQBBACAEKAIMIAAbIQAMAQsgAUEBIAJBxABqIAARAAAiAUUEQEEAIQAMAQtBwAAgAUE/cWsiACABakHAAEEAIABBBEkbaiIAQQRrIAE2AAALIARBEGokACAAC1IBAn9BhIEBKAIAIgEgAEEDakF8cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQA0UNAQtBhIEBIAA2AgAgAQ8LQYSEAUEwNgIAQX8LNwAgAEJ/NwMQIABBADYCCCAAQgA3AwAgAEEANgIwIABC/////w83AyggAEIANwMYIABCADcDIAulAQEBf0HYABAJIgFFBEBBAA8LAkAgAARAIAEgAEHYABAHGgwBCyABQgA3AyAgAUEANgIYIAFC/////w83AxAgAUEAOwEMIAFBv4YoNgIIIAFBAToABiABQQA6AAQgAUIANwNIIAFBgIDYjXg2AkQgAUIANwMoIAFCADcDMCABQgA3AzggAUFAa0EAOwEAIAFCADcDUAsgAUEBOgAFIAFBADYCACABC1gCAn4BfwJAAkAgAC0AAEUNACAAKQMQIgMgAq18IgQgA1QNACAEIAApAwhYDQELIABBADoAAA8LIAAoAgQiBUUEQA8LIAAgBDcDECAFIAOnaiABIAIQBxoLlgEBAn8CQAJAIAJFBEAgAacQCSIFRQ0BQRgQCSIEDQIgBRAGDAELIAIhBUEYEAkiBA0BCyADBEAgA0EANgIEIANBDjYCAAtBAA8LIARCADcDECAEIAE3AwggBCAFNgIEIARBAToAACAEIAJFOgABIAAgBSABIAMQZUEASAR/IAQtAAEEQCAEKAIEEAYLIAQQBkEABSAECwubAgEDfyAALQAAQSBxRQRAAkAgASEDAkAgAiAAIgEoAhAiAAR/IAAFAn8gASABLQBKIgBBAWsgAHI6AEogASgCACIAQQhxBEAgASAAQSByNgIAQX8MAQsgAUIANwIEIAEgASgCLCIANgIcIAEgADYCFCABIAAgASgCMGo2AhBBAAsNASABKAIQCyABKAIUIgVrSwRAIAEgAyACIAEoAiQRAAAaDAILAn8gASwAS0F/SgRAIAIhAANAIAIgACIERQ0CGiADIARBAWsiAGotAABBCkcNAAsgASADIAQgASgCJBEAACAESQ0CIAMgBGohAyABKAIUIQUgAiAEawwBCyACCyEAIAUgAyAAEAcaIAEgASgCFCAAajYCFAsLCwvNBQEGfyAAKAIwIgNBhgJrIQYgACgCPCECIAMhAQNAIAAoAkQgAiAAKAJoIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0AACAAIAAoAhBBAmo2AhAgACAAKQOYLkIQiDcDmC4gACAAKAKgLkEQayIBNgKgLgsgAUEISA0BIAAgACgCECIBQQFqNgIQIAEgACgCBGogACkDmC48AAAgACAAKQOYLkIIiDcDmC4gACgCoC5BCGsLNgKgLgsLEAAgACgCCBAGIABBADYCCAvwAQECf0F/IQECQCAALQAoDQAgACgCJEEDRgRAIABBDGoEQCAAQQA2AhAgAEEXNgIMC0F/DwsCQCAAKAIgBEAgACkDGELAAINCAFINASAAQQxqBEAgAEEANgIQIABBHTYCDAtBfw8LAkAgACgCACICRQ0AIAIQMkF/Sg0AIAAoAgAhASAAQQxqIgAEQCAAIAEoAgw2AgAgACABKAIQNgIEC0F/DwsgAEEAQgBBABAOQn9VDQAgACgCACIARQ0BIAAQGhpBfw8LQQAhASAAQQA7ATQgAEEMagRAIABCADcCDAsgACAAKAIgQQFqNgIgCyABCzsAIAAtACgEfkJ/BSAAKAIgRQRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQn8PCyAAQQBCAEEHEA4LC5oIAQt/IABFBEAgARAJDwsgAUFATwRAQYSEAUEwNgIAQQAPCwJ/QRAgAUELakF4cSABQQtJGyEGIABBCGsiBSgCBCIJQXhxIQQCQCAJQQNxRQRAQQAgBkGAAkkNAhogBkEEaiAETQRAIAUhAiAEIAZrQZSIASgCAEEBdE0NAgtBAAwCCyAEIAVqIQcCQCAEIAZPBEAgBCAGayIDQRBJDQEgBSAJQQFxIAZyQQJyNgIEIAUgBmoiAiADQQNyNgIEIAcgBygCBEEBcjYCBCACIAMQOwwBCyAHQcyEASgCAEYEQEHAhAEoAgAgBGoiBCAGTQ0CIAUgCUEBcSAGckECcjYCBCAFIAZqIgMgBCAGayICQQFyNgIEQcCEASACNgIAQcyEASADNgIADAELIAdByIQBKAIARgRAQbyEASgCACAEaiIDIAZJDQICQCADIAZrIgJBEE8EQCAFIAlBAXEgBnJBAnI2AgQgBSAGaiIEIAJBAXI2AgQgAyAFaiIDIAI2AgAgAyADKAIEQX5xNgIEDAELIAUgCUEBcSADckECcjYCBCADIAVqIgIgAigCBEEBcjYCBEEAIQJBACEEC0HIhAEgBDYCAEG8hAEgAjYCAAwBCyAHKAIEIgNBAnENASADQXhxIARqIgogBkkNASAKIAZrIQwCQCADQf8BTQRAIAcoAggiBCADQQN2IgJBA3RB3IQBakYaIAQgBygCDCIDRgRAQbSEAUG0hAEoAgBBfiACd3E2AgAMAgsgBCADNgIMIAMgBDYCCAwBCyAHKAIYIQsCQCAHIAcoAgwiCEcEQCAHKAIIIgJBxIQBKAIASRogAiAINgIMIAggAjYCCAwBCwJAIAdBFGoiBCgCACICDQAgB0EQaiIEKAIAIgINAEEAIQgMAQsDQCAEIQMgAiIIQRRqIgQoAgAiAg0AIAhBEGohBCAIKAIQIgINAAsgA0EANgIACyALRQ0AAkAgByAHKAIcIgNBAnRB5IYBaiICKAIARgRAIAIgCDYCACAIDQFBuIQBQbiEASgCAEF+IAN3cTYCAAwCCyALQRBBFCALKAIQIAdGG2ogCDYCACAIRQ0BCyAIIAs2AhggBygCECICBEAgCCACNgIQIAIgCDYCGAsgBygCFCICRQ0AIAggAjYCFCACIAg2AhgLIAxBD00EQCAFIAlBAXEgCnJBAnI2AgQgBSAKaiICIAIoAgRBAXI2AgQMAQsgBSAJQQFxIAZyQQJyNgIEIAUgBmoiAyAMQQNyNgIEIAUgCmoiAiACKAIEQQFyNgIEIAMgDBA7CyAFIQILIAILIgIEQCACQQhqDwsgARAJIgVFBEBBAA8LIAUgAEF8QXggAEEEaygCACICQQNxGyACQXhxaiICIAEgASACSxsQBxogABAGIAUL6QEBA38CQCABRQ0AIAJBgDBxIgIEfwJ/IAJBgCBHBEBBAiACQYAQRg0BGiADBEAgA0EANgIEIANBEjYCAAtBAA8LQQQLIQJBAAVBAQshBkEUEAkiBEUEQCADBEAgA0EANgIEIANBDjYCAAtBAA8LIAQgAUEBahAJIgU2AgAgBUUEQCAEEAZBAA8LIAUgACABEAcgAWpBADoAACAEQQA2AhAgBEIANwMIIAQgATsBBCAGDQAgBCACECNBBUcNACAEKAIAEAYgBCgCDBAGIAQQBkEAIQQgAwRAIANBADYCBCADQRI2AgALCyAEC7UBAQJ/AkACQAJAAkACQAJAAkAgAC0ABQRAIAAtAABBAnFFDQELIAAoAjAQECAAQQA2AjAgAC0ABUUNAQsgAC0AAEEIcUUNAQsgACgCNBAcIABBADYCNCAALQAFRQ0BCyAALQAAQQRxRQ0BCyAAKAI4EBAgAEEANgI4IAAtAAVFDQELIAAtAABBgAFxRQ0BCyAAKAJUIgEEfyABQQAgARAiEBkgACgCVAVBAAsQBiAAQQA2AlQLC9wMAgl/AX4jAEFAaiIGJAACQAJAAkACQAJAIAEoAjBBABAjIgVBAkZBACABKAI4QQAQIyIEQQFGGw0AIAVBAUZBACAEQQJGGw0AIAVBAkciAw0BIARBAkcNAQsgASABLwEMQYAQcjsBDEEAIQMMAQsgASABLwEMQf/vA3E7AQxBACEFIANFBEBB9eABIAEoAjAgAEEIahBpIgVFDQILIAJBgAJxBEAgBSEDDAELIARBAkcEQCAFIQMMAQtB9cYBIAEoAjggAEEIahBpIgNFBEAgBRAcDAILIAMgBTYCAAsgASABLwEMQf7/A3EgAS8BUiIFQQBHcjsBDAJAAkACQAJAAn8CQAJAIAEpAyhC/v///w9WDQAgASkDIEL+////D1YNACACQYAEcUUNASABKQNIQv////8PVA0BCyAFQYECa0H//wNxQQNJIQdBAQwBCyAFQYECa0H//wNxIQQgAkGACnFBgApHDQEgBEEDSSEHQQALIQkgBkIcEBciBEUEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyADEBwMBQsgAkGACHEhBQJAAkAgAkGAAnEEQAJAIAUNACABKQMgQv////8PVg0AIAEpAyhCgICAgBBUDQMLIAQgASkDKBAYIAEpAyAhDAwBCwJAAkACQCAFDQAgASkDIEL/////D1YNACABKQMoIgxC/////w9WDQEgASkDSEKAgICAEFQNBAsgASkDKCIMQv////8PVA0BCyAEIAwQGAsgASkDICIMQv////8PWgRAIAQgDBAYCyABKQNIIgxC/////w9UDQELIAQgDBAYCyAELQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAQQCCADEBwMBQtBASEKQQEgBC0AAAR+IAQpAxAFQgALp0H//wNxIAYQRyEFIAQQCCAFIAM2AgAgBw0BDAILIAMhBSAEQQJLDQELIAZCBxAXIgRFBEAgAEEIaiIABEAgAEEANgIEIABBDjYCAAsgBRAcDAMLIARBAhANIARBhxJBAhAsIAQgAS0AUhBwIAQgAS8BEBANIAQtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAsgBBAIDAILQYGyAkEHIAYQRyEDIAQQCCADIAU2AgBBASELIAMhBQsgBkIuEBciA0UEQCAAQQhqIgAEQCAAQQA2AgQgAEEONgIACyAFEBwMAgsgA0GjEkGoEiACQYACcSIHG0EEECwgB0UEQCADIAkEf0EtBSABLwEIC0H//wNxEA0LIAMgCQR/QS0FIAEvAQoLQf//A3EQDSADIAEvAQwQDSADIAsEf0HjAAUgASgCEAtB//8DcRANIAYgASgCFDYCPAJ/IAZBPGoQjQEiCEUEQEEAIQlBIQwBCwJ/IAgoAhQiBEHQAE4EQCAEQQl0DAELIAhB0AA2AhRBgMACCyEEIAgoAgRBBXQgCCgCCEELdGogCCgCAEEBdmohCSAIKAIMIAQgCCgCEEEFdGpqQaDAAWoLIQQgAyAJQf//A3EQDSADIARB//8DcRANIAMCfyALBEBBACABKQMoQhRUDQEaCyABKAIYCxASIAEpAyAhDCADAn8gAwJ/AkAgBwRAIAxC/v///w9YBEAgASkDKEL/////D1QNAgsgA0F/EBJBfwwDC0F/IAxC/v///w9WDQEaCyAMpwsQEiABKQMoIgxC/////w8gDEL/////D1QbpwsQEiADIAEoAjAiBAR/IAQvAQQFQQALQf//A3EQDSADIAEoAjQgAhBsIAVBgAYQbGpB//8DcRANIAdFBEAgAyABKAI4IgQEfyAELwEEBUEAC0H//wNxEA0gAyABLwE8EA0gAyABLwFAEA0gAyABKAJEEBIgAyABKQNIIgxC/////w8gDEL/////D1QbpxASCyADLQAARQRAIABBCGoiAARAIABBADYCBCAAQRQ2AgALIAMQCCAFEBwMAgsgACAGIAMtAAAEfiADKQMQBUIACxAbIQQgAxAIIARBf0wNACABKAIwIgMEQCAAIAMQYUF/TA0BCyAFBEAgACAFQYAGEGtBf0wNAQsgBRAcIAEoAjQiBQRAIAAgBSACEGtBAEgNAgsgBw0CIAEoAjgiAUUNAiAAIAEQYUEATg0CDAELIAUQHAtBfyEKCyAGQUBrJAAgCgtNAQJ/IAEtAAAhAgJAIAAtAAAiA0UNACACIANHDQADQCABLQABIQIgAC0AASIDRQ0BIAFBAWohASAAQQFqIQAgAiADRg0ACwsgAyACawvcAwICfgF/IAOtIQQgACkDmC4hBQJAIAACfyAAAn4gACgCoC4iBkEDaiIDQT9NBEAgBCAGrYYgBYQMAQsgBkHAAEYEQCAAKAIEIAAoAhBqIAU3AAAgACgCEEEIagwCCyAAKAIEIAAoAhBqIAQgBq2GIAWENwAAIAAgACgCEEEIajYCECAGQT1rIQMgBEHAACAGa62ICyIENwOYLiAAIAM2AqAuIANBOU4EQCAAKAIEIAAoAhBqIAQ3AAAgACAAKAIQQQhqNgIQDAILIANBGU4EQCAAKAIEIAAoAhBqIAQ+AAAgACAAKAIQQQRqNgIQIAAgACkDmC5CIIgiBDcDmC4gACAAKAKgLkEgayIDNgKgLgsgA0EJTgR/IAAoAgQgACgCEGogBD0AACAAIAAoAhBBAmo2AhAgACkDmC5CEIghBCAAKAKgLkEQawUgAwtBAUgNASAAKAIQCyIDQQFqNgIQIAAoAgQgA2ogBDwAAAsgAEEANgKgLiAAQgA3A5guIAAoAgQgACgCEGogAjsAACAAIAAoAhBBAmoiAzYCECAAKAIEIANqIAJBf3M7AAAgACAAKAIQQQJqIgM2AhAgAgRAIAAoAgQgA2ogASACEAcaIAAgACgCECACajYCEAsLrAQCAX8BfgJAIAANACABUA0AIAMEQCADQQA2AgQgA0ESNgIAC0EADwsCQAJAIAAgASACIAMQiQEiBEUNAEEYEAkiAkUEQCADBEAgA0EANgIEIANBDjYCAAsCQCAEKAIoIgBFBEAgBCkDGCEBDAELIABBADYCKCAEKAIoQgA3AyAgBCAEKQMYIgUgBCkDICIBIAEgBVQbIgE3AxgLIAQpAwggAVYEQANAIAQoAgAgAadBBHRqKAIAEAYgAUIBfCIBIAQpAwhUDQALCyAEKAIAEAYgBCgCBBAGIAQQBgwBCyACQQA2AhQgAiAENgIQIAJBABABNgIMIAJBADYCCCACQgA3AgACf0E4EAkiAEUEQCADBEAgA0EANgIEIANBDjYCAAtBAAwBCyAAQQA2AgggAEIANwMAIABCADcDICAAQoCAgIAQNwIsIABBADoAKCAAQQA2AhQgAEIANwIMIABBADsBNCAAIAI2AgggAEEkNgIEIABCPyACQQBCAEEOQSQRDAAiASABQgBTGzcDGCAACyIADQEgAigCECIDBEACQCADKAIoIgBFBEAgAykDGCEBDAELIABBADYCKCADKAIoQgA3AyAgAyADKQMYIgUgAykDICIBIAEgBVQbIgE3AxgLIAMpAwggAVYEQANAIAMoAgAgAadBBHRqKAIAEAYgAUIBfCIBIAMpAwhUDQALCyADKAIAEAYgAygCBBAGIAMQBgsgAhAGC0EAIQALIAALiwwBBn8gACABaiEFAkACQCAAKAIEIgJBAXENACACQQNxRQ0BIAAoAgAiAiABaiEBAkAgACACayIAQciEASgCAEcEQCACQf8BTQRAIAAoAggiBCACQQN2IgJBA3RB3IQBakYaIAAoAgwiAyAERw0CQbSEAUG0hAEoAgBBfiACd3E2AgAMAwsgACgCGCEGAkAgACAAKAIMIgNHBEAgACgCCCICQcSEASgCAEkaIAIgAzYCDCADIAI2AggMAQsCQCAAQRRqIgIoAgAiBA0AIABBEGoiAigCACIEDQBBACEDDAELA0AgAiEHIAQiA0EUaiICKAIAIgQNACADQRBqIQIgAygCECIEDQALIAdBADYCAAsgBkUNAgJAIAAgACgCHCIEQQJ0QeSGAWoiAigCAEYEQCACIAM2AgAgAw0BQbiEAUG4hAEoAgBBfiAEd3E2AgAMBAsgBkEQQRQgBigCECAARhtqIAM2AgAgA0UNAwsgAyAGNgIYIAAoAhAiAgRAIAMgAjYCECACIAM2AhgLIAAoAhQiAkUNAiADIAI2AhQgAiADNgIYDAILIAUoAgQiAkEDcUEDRw0BQbyEASABNgIAIAUgAkF+cTYCBCAAIAFBAXI2AgQgBSABNgIADwsgBCADNgIMIAMgBDYCCAsCQCAFKAIEIgJBAnFFBEAgBUHMhAEoAgBGBEBBzIQBIAA2AgBBwIQBQcCEASgCACABaiIBNgIAIAAgAUEBcjYCBCAAQciEASgCAEcNA0G8hAFBADYCAEHIhAFBADYCAA8LIAVByIQBKAIARgRAQciEASAANgIAQbyEAUG8hAEoAgAgAWoiATYCACAAIAFBAXI2AgQgACABaiABNgIADwsgAkF4cSABaiEBAkAgAkH/AU0EQCAFKAIIIgQgAkEDdiICQQN0QdyEAWpGGiAEIAUoAgwiA0YEQEG0hAFBtIQBKAIAQX4gAndxNgIADAILIAQgAzYCDCADIAQ2AggMAQsgBSgCGCEGAkAgBSAFKAIMIgNHBEAgBSgCCCICQcSEASgCAEkaIAIgAzYCDCADIAI2AggMAQsCQCAFQRRqIgQoAgAiAg0AIAVBEGoiBCgCACICDQBBACEDDAELA0AgBCEHIAIiA0EUaiIEKAIAIgINACADQRBqIQQgAygCECICDQALIAdBADYCAAsgBkUNAAJAIAUgBSgCHCIEQQJ0QeSGAWoiAigCAEYEQCACIAM2AgAgAw0BQbiEAUG4hAEoAgBBfiAEd3E2AgAMAgsgBkEQQRQgBigCECAFRhtqIAM2AgAgA0UNAQsgAyAGNgIYIAUoAhAiAgRAIAMgAjYCECACIAM2AhgLIAUoAhQiAkUNACADIAI2AhQgAiADNgIYCyAAIAFBAXI2AgQgACABaiABNgIAIABByIQBKAIARw0BQbyEASABNgIADwsgBSACQX5xNgIEIAAgAUEBcjYCBCAAIAFqIAE2AgALIAFB/wFNBEAgAUEDdiICQQN0QdyEAWohAQJ/QbSEASgCACIDQQEgAnQiAnFFBEBBtIQBIAIgA3I2AgAgAQwBCyABKAIICyECIAEgADYCCCACIAA2AgwgACABNgIMIAAgAjYCCA8LQR8hAiAAQgA3AhAgAUH///8HTQRAIAFBCHYiAiACQYD+P2pBEHZBCHEiBHQiAiACQYDgH2pBEHZBBHEiA3QiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAEciACcmsiAkEBdCABIAJBFWp2QQFxckEcaiECCyAAIAI2AhwgAkECdEHkhgFqIQcCQAJAQbiEASgCACIEQQEgAnQiA3FFBEBBuIQBIAMgBHI2AgAgByAANgIAIAAgBzYCGAwBCyABQQBBGSACQQF2ayACQR9GG3QhAiAHKAIAIQMDQCADIgQoAgRBeHEgAUYNAiACQR12IQMgAkEBdCECIAQgA0EEcWoiB0EQaigCACIDDQALIAcgADYCECAAIAQ2AhgLIAAgADYCDCAAIAA2AggPCyAEKAIIIgEgADYCDCAEIAA2AgggAEEANgIYIAAgBDYCDCAAIAE2AggLC1gCAX8BfgJAAn9BACAARQ0AGiAArUIChiICpyIBIABBBHJBgIAESQ0AGkF/IAEgAkIgiKcbCyIBEAkiAEUNACAAQQRrLQAAQQNxRQ0AIABBACABEBkLIAALQwEDfwJAIAJFDQADQCAALQAAIgQgAS0AACIFRgRAIAFBAWohASAAQQFqIQAgAkEBayICDQEMAgsLIAQgBWshAwsgAwsUACAAEEAgACgCABAgIAAoAgQQIAutBAIBfgV/IwBBEGsiBCQAIAAgAWshBgJAAkAgAUEBRgRAIAAgBi0AACACEBkMAQsgAUEJTwRAIAAgBikAADcAACAAIAJBAWtBB3FBAWoiBWohACACIAVrIgFFDQIgBSAGaiECA0AgACACKQAANwAAIAJBCGohAiAAQQhqIQAgAUEIayIBDQALDAILAkACQAJAAkAgAUEEaw4FAAICAgECCyAEIAYoAAAiATYCBCAEIAE2AgAMAgsgBCAGKQAANwMADAELQQghByAEQQhqIQgDQCAIIAYgByABIAEgB0sbIgUQByAFaiEIIAcgBWsiBw0ACyAEIAQpAwg3AwALAkAgBQ0AIAJBEEkNACAEKQMAIQMgAkEQayIGQQR2QQFqQQdxIgEEQANAIAAgAzcACCAAIAM3AAAgAkEQayECIABBEGohACABQQFrIgENAAsLIAZB8ABJDQADQCAAIAM3AHggACADNwBwIAAgAzcAaCAAIAM3AGAgACADNwBYIAAgAzcAUCAAIAM3AEggACADNwBAIAAgAzcAOCAAIAM3ADAgACADNwAoIAAgAzcAICAAIAM3ABggACADNwAQIAAgAzcACCAAIAM3AAAgAEGAAWohACACQYABayICQQ9LDQALCyACQQhPBEBBCCAFayEBA0AgACAEKQMANwAAIAAgAWohACACIAFrIgJBB0sNAAsLIAJFDQEgACAEIAIQBxoLIAAgAmohAAsgBEEQaiQAIAALXwECfyAAKAIIIgEEQCABEAsgAEEANgIICwJAIAAoAgQiAUUNACABKAIAIgJBAXFFDQAgASgCEEF+Rw0AIAEgAkF+cSICNgIAIAINACABECAgAEEANgIECyAAQQA6AAwL1wICBH8BfgJAAkAgACgCQCABp0EEdGooAgAiA0UEQCACBEAgAkEANgIEIAJBFDYCAAsMAQsgACgCACADKQNIIgdBABAUIQMgACgCACEAIANBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQtCACEBIwBBEGsiBiQAQX8hAwJAIABCGkEBEBRBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQsgAEIEIAZBCmogAhAtIgRFDQBBHiEAQQEhBQNAIAQQDCAAaiEAIAVBAkcEQCAFQQFqIQUMAQsLIAQtAAAEfyAEKQMQIAQpAwhRBUEAC0UEQCACBEAgAkEANgIEIAJBFDYCAAsgBBAIDAELIAQQCCAAIQMLIAZBEGokACADIgBBAEgNASAHIACtfCIBQn9VDQEgAgRAIAJBFjYCBCACQQQ2AgALC0IAIQELIAELYAIBfgF/AkAgAEUNACAAQQhqEF8iAEUNACABIAEoAjBBAWo2AjAgACADNgIIIAAgAjYCBCAAIAE2AgAgAEI/IAEgA0EAQgBBDiACEQoAIgQgBEIAUxs3AxggACEFCyAFCyIAIAAoAiRBAWtBAU0EQCAAQQBCAEEKEA4aIABBADYCJAsLbgACQAJAAkAgA0IQVA0AIAJFDQECfgJAAkACQCACKAIIDgMCAAEECyACKQMAIAB8DAILIAIpAwAgAXwMAQsgAikDAAsiA0IAUw0AIAEgA1oNAgsgBARAIARBADYCBCAEQRI2AgALC0J/IQMLIAMLggICAX8CfgJAQQEgAiADGwRAIAIgA2oQCSIFRQRAIAQEQCAEQQA2AgQgBEEONgIAC0EADwsgAq0hBgJAAkAgAARAIAAgBhATIgBFBEAgBARAIARBADYCBCAEQQ42AgALDAULIAUgACACEAcaIAMNAQwCCyABIAUgBhARIgdCf1cEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsMBAsgBiAHVQRAIAQEQCAEQQA2AgQgBEERNgIACwwECyADRQ0BCyACIAVqIgBBADoAACACQQFIDQAgBSECA0AgAi0AAEUEQCACQSA6AAALIAJBAWoiAiAASQ0ACwsLIAUPCyAFEAZBAAuBAQEBfwJAIAAEQCADQYAGcSEFQQAhAwNAAkAgAC8BCCACRw0AIAUgACgCBHFFDQAgA0EATg0DIANBAWohAwsgACgCACIADQALCyAEBEAgBEEANgIEIARBCTYCAAtBAA8LIAEEQCABIAAvAQo7AQALIAAvAQpFBEBBwBQPCyAAKAIMC1cBAX9BEBAJIgNFBEBBAA8LIAMgATsBCiADIAA7AQggA0GABjYCBCADQQA2AgACQCABBEAgAyACIAEQYyIANgIMIAANASADEAZBAA8LIANBADYCDAsgAwvuBQIEfwV+IwBB4ABrIgQkACAEQQhqIgNCADcDICADQQA2AhggA0L/////DzcDECADQQA7AQwgA0G/hig2AgggA0EBOgAGIANBADsBBCADQQA2AgAgA0IANwNIIANBgIDYjXg2AkQgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0EAOwEAIANCADcDUCABKQMIUCIDRQRAIAEoAgAoAgApA0ghBwsCfgJAIAMEQCAHIQkMAQsgByEJA0AgCqdBBHQiBSABKAIAaigCACIDKQNIIgggCSAIIAlUGyIJIAEpAyBWBEAgAgRAIAJBADYCBCACQRM2AgALQn8MAwsgAygCMCIGBH8gBi8BBAVBAAtB//8Dca0gCCADKQMgfHxCHnwiCCAHIAcgCFQbIgcgASkDIFYEQCACBEAgAkEANgIEIAJBEzYCAAtCfwwDCyAAKAIAIAEoAgAgBWooAgApA0hBABAUIQYgACgCACEDIAZBf0wEQCACBEAgAiADKAIMNgIAIAIgAygCEDYCBAtCfwwDCyAEQQhqIANBAEEBIAIQaEJ/UQRAIARBCGoQNkJ/DAMLAkACQCABKAIAIAVqKAIAIgMvAQogBC8BEkkNACADKAIQIAQoAhhHDQAgAygCFCAEKAIcRw0AIAMoAjAgBCgCOBBiRQ0AAkAgBCgCICIGIAMoAhhHBEAgBCkDKCEIDAELIAMpAyAiCyAEKQMoIghSDQAgCyEIIAMpAyggBCkDMFENAgsgBC0AFEEIcUUNACAGDQAgCEIAUg0AIAQpAzBQDQELIAIEQCACQQA2AgQgAkEVNgIACyAEQQhqEDZCfwwDCyABKAIAIAVqKAIAKAI0IAQoAjwQbyEDIAEoAgAgBWooAgAiBUEBOgAEIAUgAzYCNCAEQQA2AjwgBEEIahA2IApCAXwiCiABKQMIVA0ACwsgByAJfSIHQv///////////wAgB0L///////////8AVBsLIQcgBEHgAGokACAHC8YBAQJ/QdgAEAkiAUUEQCAABEAgAEEANgIEIABBDjYCAAtBAA8LIAECf0EYEAkiAkUEQCAABEAgAEEANgIEIABBDjYCAAtBAAwBCyACQQA2AhAgAkIANwMIIAJBADYCACACCyIANgJQIABFBEAgARAGQQAPCyABQgA3AwAgAUEANgIQIAFCADcCCCABQgA3AhQgAUEANgJUIAFCADcCHCABQgA3ACEgAUIANwMwIAFCADcDOCABQUBrQgA3AwAgAUIANwNIIAELgBMCD38CfiMAQdAAayIFJAAgBSABNgJMIAVBN2ohEyAFQThqIRBBACEBA0ACQCAOQQBIDQBB/////wcgDmsgAUgEQEGEhAFBPTYCAEF/IQ4MAQsgASAOaiEOCyAFKAJMIgchAQJAAkACQAJAAkACQAJAAkAgBQJ/AkAgBy0AACIGBEADQAJAAkAgBkH/AXEiBkUEQCABIQYMAQsgBkElRw0BIAEhBgNAIAEtAAFBJUcNASAFIAFBAmoiCDYCTCAGQQFqIQYgAS0AAiEMIAghASAMQSVGDQALCyAGIAdrIQEgAARAIAAgByABEC4LIAENDSAFKAJMIQEgBSgCTCwAAUEwa0EKTw0DIAEtAAJBJEcNAyABLAABQTBrIQ9BASERIAFBA2oMBAsgBSABQQFqIgg2AkwgAS0AASEGIAghAQwACwALIA4hDSAADQggEUUNAkEBIQEDQCAEIAFBAnRqKAIAIgAEQCADIAFBA3RqIAAgAhB4QQEhDSABQQFqIgFBCkcNAQwKCwtBASENIAFBCk8NCANAIAQgAUECdGooAgANCCABQQFqIgFBCkcNAAsMCAtBfyEPIAFBAWoLIgE2AkxBACEIAkAgASwAACIKQSBrIgZBH0sNAEEBIAZ0IgZBidEEcUUNAANAAkAgBSABQQFqIgg2AkwgASwAASIKQSBrIgFBIE8NAEEBIAF0IgFBidEEcUUNACABIAZyIQYgCCEBDAELCyAIIQEgBiEICwJAIApBKkYEQCAFAn8CQCABLAABQTBrQQpPDQAgBSgCTCIBLQACQSRHDQAgASwAAUECdCAEakHAAWtBCjYCACABLAABQQN0IANqQYADaygCACELQQEhESABQQNqDAELIBENCEEAIRFBACELIAAEQCACIAIoAgAiAUEEajYCACABKAIAIQsLIAUoAkxBAWoLIgE2AkwgC0F/Sg0BQQAgC2shCyAIQYDAAHIhCAwBCyAFQcwAahB3IgtBAEgNBiAFKAJMIQELQX8hCQJAIAEtAABBLkcNACABLQABQSpGBEACQCABLAACQTBrQQpPDQAgBSgCTCIBLQADQSRHDQAgASwAAkECdCAEakHAAWtBCjYCACABLAACQQN0IANqQYADaygCACEJIAUgAUEEaiIBNgJMDAILIBENByAABH8gAiACKAIAIgFBBGo2AgAgASgCAAVBAAshCSAFIAUoAkxBAmoiATYCTAwBCyAFIAFBAWo2AkwgBUHMAGoQdyEJIAUoAkwhAQtBACEGA0AgBiESQX8hDSABLAAAQcEAa0E5Sw0HIAUgAUEBaiIKNgJMIAEsAAAhBiAKIQEgBiASQTpsakGf7ABqLQAAIgZBAWtBCEkNAAsgBkETRg0CIAZFDQYgD0EATgRAIAQgD0ECdGogBjYCACAFIAMgD0EDdGopAwA3A0AMBAsgAA0BC0EAIQ0MBQsgBUFAayAGIAIQeCAFKAJMIQoMAgsgD0F/Sg0DC0EAIQEgAEUNBAsgCEH//3txIgwgCCAIQYDAAHEbIQZBACENQaQIIQ8gECEIAkACQAJAAn8CQAJAAkACQAJ/AkACQAJAAkACQAJAAkAgCkEBaywAACIBQV9xIAEgAUEPcUEDRhsgASASGyIBQdgAaw4hBBISEhISEhISDhIPBg4ODhIGEhISEgIFAxISCRIBEhIEAAsCQCABQcEAaw4HDhILEg4ODgALIAFB0wBGDQkMEQsgBSkDQCEUQaQIDAULQQAhAQJAAkACQAJAAkACQAJAIBJB/wFxDggAAQIDBBcFBhcLIAUoAkAgDjYCAAwWCyAFKAJAIA42AgAMFQsgBSgCQCAOrDcDAAwUCyAFKAJAIA47AQAMEwsgBSgCQCAOOgAADBILIAUoAkAgDjYCAAwRCyAFKAJAIA6sNwMADBALIAlBCCAJQQhLGyEJIAZBCHIhBkH4ACEBCyAQIQcgAUEgcSEMIAUpA0AiFFBFBEADQCAHQQFrIgcgFKdBD3FBsPAAai0AACAMcjoAACAUQg9WIQogFEIEiCEUIAoNAAsLIAUpA0BQDQMgBkEIcUUNAyABQQR2QaQIaiEPQQIhDQwDCyAQIQEgBSkDQCIUUEUEQANAIAFBAWsiASAUp0EHcUEwcjoAACAUQgdWIQcgFEIDiCEUIAcNAAsLIAEhByAGQQhxRQ0CIAkgECAHayIBQQFqIAEgCUgbIQkMAgsgBSkDQCIUQn9XBEAgBUIAIBR9IhQ3A0BBASENQaQIDAELIAZBgBBxBEBBASENQaUIDAELQaYIQaQIIAZBAXEiDRsLIQ8gECEBAkAgFEKAgICAEFQEQCAUIRUMAQsDQCABQQFrIgEgFCAUQgqAIhVCCn59p0EwcjoAACAUQv////+fAVYhByAVIRQgBw0ACwsgFaciBwRAA0AgAUEBayIBIAcgB0EKbiIMQQpsa0EwcjoAACAHQQlLIQogDCEHIAoNAAsLIAEhBwsgBkH//3txIAYgCUF/ShshBgJAIAUpA0AiFEIAUg0AIAkNAEEAIQkgECEHDAoLIAkgFFAgECAHa2oiASABIAlIGyEJDAkLIAUoAkAiAUGKEiABGyIHQQAgCRB6IgEgByAJaiABGyEIIAwhBiABIAdrIAkgARshCQwICyAJBEAgBSgCQAwCC0EAIQEgAEEgIAtBACAGECcMAgsgBUEANgIMIAUgBSkDQD4CCCAFIAVBCGo2AkBBfyEJIAVBCGoLIQhBACEBAkADQCAIKAIAIgdFDQECQCAFQQRqIAcQeSIHQQBIIgwNACAHIAkgAWtLDQAgCEEEaiEIIAkgASAHaiIBSw0BDAILC0F/IQ0gDA0FCyAAQSAgCyABIAYQJyABRQRAQQAhAQwBC0EAIQggBSgCQCEKA0AgCigCACIHRQ0BIAVBBGogBxB5IgcgCGoiCCABSg0BIAAgBUEEaiAHEC4gCkEEaiEKIAEgCEsNAAsLIABBICALIAEgBkGAwABzECcgCyABIAEgC0gbIQEMBQsgACAFKwNAIAsgCSAGIAFBABEdACEBDAQLIAUgBSkDQDwAN0EBIQkgEyEHIAwhBgwCC0F/IQ0LIAVB0ABqJAAgDQ8LIABBICANIAggB2siDCAJIAkgDEgbIgpqIgggCyAIIAtKGyIBIAggBhAnIAAgDyANEC4gAEEwIAEgCCAGQYCABHMQJyAAQTAgCiAMQQAQJyAAIAcgDBAuIABBICABIAggBkGAwABzECcMAAsAC54DAgR/AX4gAARAIAAoAgAiAQRAIAEQGhogACgCABALCyAAKAIcEAYgACgCIBAQIAAoAiQQECAAKAJQIgMEQCADKAIQIgIEQCADKAIAIgEEfwNAIAIgBEECdGooAgAiAgRAA0AgAigCGCEBIAIQBiABIgINAAsgAygCACEBCyABIARBAWoiBEsEQCADKAIQIQIMAQsLIAMoAhAFIAILEAYLIAMQBgsgACgCQCIBBEAgACkDMFAEfyABBSABED5CAiEFAkAgACkDMEICVA0AQQEhAgNAIAAoAkAgAkEEdGoQPiAFIAApAzBaDQEgBachAiAFQgF8IQUMAAsACyAAKAJACxAGCwJAIAAoAkRFDQBBACECQgEhBQNAIAAoAkwgAkECdGooAgAiAUEBOgAoIAFBDGoiASgCAEUEQCABBEAgAUEANgIEIAFBCDYCAAsLIAUgADUCRFoNASAFpyECIAVCAXwhBQwACwALIAAoAkwQBiAAKAJUIgIEQCACKAIIIgEEQCACKAIMIAERAwALIAIQBgsgAEEIahAxIAAQBgsL6gMCAX4EfwJAIAAEfiABRQRAIAMEQCADQQA2AgQgA0ESNgIAC0J/DwsgAkGDIHEEQAJAIAApAzBQDQBBPEE9IAJBAXEbIQcgAkECcUUEQANAIAAgBCACIAMQUyIFBEAgASAFIAcRAgBFDQYLIARCAXwiBCAAKQMwVA0ADAILAAsDQCAAIAQgAiADEFMiBQRAIAECfyAFECJBAWohBgNAQQAgBkUNARogBSAGQQFrIgZqIggtAABBL0cNAAsgCAsiBkEBaiAFIAYbIAcRAgBFDQULIARCAXwiBCAAKQMwVA0ACwsgAwRAIANBADYCBCADQQk2AgALQn8PC0ESIQYCQAJAIAAoAlAiBUUNACABRQ0AQQkhBiAFKQMIUA0AIAUoAhAgAS0AACIHBH9CpesKIQQgASEAA0AgBCAHrUL/AYN8IQQgAC0AASIHBEAgAEEBaiEAIARC/////w+DQiF+IQQMAQsLIASnBUGFKgsgBSgCAHBBAnRqKAIAIgBFDQADQCABIAAoAgAQOEUEQCACQQhxBEAgACkDCCIEQn9RDQMMBAsgACkDECIEQn9RDQIMAwsgACgCGCIADQALCyADBEAgA0EANgIEIAMgBjYCAAtCfyEECyAEBUJ/Cw8LIAMEQCADQgA3AgALIAQL3AQCB38BfgJAAkAgAEUNACABRQ0AIAJCf1UNAQsgBARAIARBADYCBCAEQRI2AgALQQAPCwJAIAAoAgAiB0UEQEGAAiEHQYACEDwiBkUNASAAKAIQEAYgAEGAAjYCACAAIAY2AhALAkACQCAAKAIQIAEtAAAiBQR/QqXrCiEMIAEhBgNAIAwgBa1C/wGDfCEMIAYtAAEiBQRAIAZBAWohBiAMQv////8Pg0IhfiEMDAELCyAMpwVBhSoLIgYgB3BBAnRqIggoAgAiBQRAA0ACQCAFKAIcIAZHDQAgASAFKAIAEDgNAAJAIANBCHEEQCAFKQMIQn9SDQELIAUpAxBCf1ENBAsgBARAIARBADYCBCAEQQo2AgALQQAPCyAFKAIYIgUNAAsLQSAQCSIFRQ0CIAUgATYCACAFIAgoAgA2AhggCCAFNgIAIAVCfzcDCCAFIAY2AhwgACAAKQMIQgF8Igw3AwggDLogB7hEAAAAAAAA6D+iZEUNACAHQQBIDQAgByAHQQF0IghGDQAgCBA8IgpFDQECQCAMQgAgBxtQBEAgACgCECEJDAELIAAoAhAhCUEAIQQDQCAJIARBAnRqKAIAIgYEQANAIAYoAhghASAGIAogBigCHCAIcEECdGoiCygCADYCGCALIAY2AgAgASIGDQALCyAEQQFqIgQgB0cNAAsLIAkQBiAAIAg2AgAgACAKNgIQCyADQQhxBEAgBSACNwMICyAFIAI3AxBBAQ8LIAQEQCAEQQA2AgQgBEEONgIAC0EADwsgBARAIARBADYCBCAEQQ42AgALQQAL3Q8BF38jAEFAaiIHQgA3AzAgB0IANwM4IAdCADcDICAHQgA3AygCQAJAAkACQAJAIAIEQCACQQNxIQggAkEBa0EDTwRAIAJBfHEhBgNAIAdBIGogASAJQQF0IgxqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBAnJqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBBHJqLwEAQQF0aiIKIAovAQBBAWo7AQAgB0EgaiABIAxBBnJqLwEAQQF0aiIKIAovAQBBAWo7AQAgCUEEaiEJIAZBBGsiBg0ACwsgCARAA0AgB0EgaiABIAlBAXRqLwEAQQF0aiIGIAYvAQBBAWo7AQAgCUEBaiEJIAhBAWsiCA0ACwsgBCgCACEJQQ8hCyAHLwE+IhENAgwBCyAEKAIAIQkLQQ4hC0EAIREgBy8BPA0AQQ0hCyAHLwE6DQBBDCELIAcvATgNAEELIQsgBy8BNg0AQQohCyAHLwE0DQBBCSELIAcvATINAEEIIQsgBy8BMA0AQQchCyAHLwEuDQBBBiELIAcvASwNAEEFIQsgBy8BKg0AQQQhCyAHLwEoDQBBAyELIAcvASYNAEECIQsgBy8BJA0AIAcvASJFBEAgAyADKAIAIgBBBGo2AgAgAEHAAjYBACADIAMoAgAiAEEEajYCACAAQcACNgEAQQEhDQwDCyAJQQBHIRtBASELQQEhCQwBCyALIAkgCSALSxshG0EBIQ5BASEJA0AgB0EgaiAJQQF0ai8BAA0BIAlBAWoiCSALRw0ACyALIQkLQX8hCCAHLwEiIg9BAksNAUEEIAcvASQiECAPQQF0amsiBkEASA0BIAZBAXQgBy8BJiISayIGQQBIDQEgBkEBdCAHLwEoIhNrIgZBAEgNASAGQQF0IAcvASoiFGsiBkEASA0BIAZBAXQgBy8BLCIVayIGQQBIDQEgBkEBdCAHLwEuIhZrIgZBAEgNASAGQQF0IAcvATAiF2siBkEASA0BIAZBAXQgBy8BMiIZayIGQQBIDQEgBkEBdCAHLwE0IhxrIgZBAEgNASAGQQF0IAcvATYiDWsiBkEASA0BIAZBAXQgBy8BOCIYayIGQQBIDQEgBkEBdCAHLwE6IgxrIgZBAEgNASAGQQF0IAcvATwiCmsiBkEASA0BIAZBAXQgEWsiBkEASA0BIAZBACAARSAOchsNASAJIBtLIRpBACEIIAdBADsBAiAHIA87AQQgByAPIBBqIgY7AQYgByAGIBJqIgY7AQggByAGIBNqIgY7AQogByAGIBRqIgY7AQwgByAGIBVqIgY7AQ4gByAGIBZqIgY7ARAgByAGIBdqIgY7ARIgByAGIBlqIgY7ARQgByAGIBxqIgY7ARYgByAGIA1qIgY7ARggByAGIBhqIgY7ARogByAGIAxqIgY7ARwgByAGIApqOwEeAkAgAkUNACACQQFHBEAgAkF+cSEGA0AgASAIQQF0ai8BACIKBEAgByAKQQF0aiIKIAovAQAiCkEBajsBACAFIApBAXRqIAg7AQALIAEgCEEBciIMQQF0ai8BACIKBEAgByAKQQF0aiIKIAovAQAiCkEBajsBACAFIApBAXRqIAw7AQALIAhBAmohCCAGQQJrIgYNAAsLIAJBAXFFDQAgASAIQQF0ai8BACICRQ0AIAcgAkEBdGoiAiACLwEAIgJBAWo7AQAgBSACQQF0aiAIOwEACyAJIBsgGhshDUEUIRBBACEWIAUiCiEYQQAhEgJAAkACQCAADgICAAELQQEhCCANQQpLDQNBgQIhEEHw2QAhGEGw2QAhCkEBIRIMAQsgAEECRiEWQQAhEEHw2gAhGEGw2gAhCiAAQQJHBEAMAQtBASEIIA1BCUsNAgtBASANdCITQQFrIRwgAygCACEUQQAhFSANIQZBACEPQQAhDkF/IQIDQEEBIAZ0IRoCQANAIAkgD2shFwJAIAUgFUEBdGovAQAiCCAQTwRAIAogCCAQa0EBdCIAai8BACERIAAgGGotAAAhAAwBC0EAQeAAIAhBAWogEEkiBhshACAIQQAgBhshEQsgDiAPdiEMQX8gF3QhBiAaIQgDQCAUIAYgCGoiCCAMakECdGoiGSAROwECIBkgFzoAASAZIAA6AAAgCA0AC0EBIAlBAWt0IQYDQCAGIgBBAXYhBiAAIA5xDQALIAdBIGogCUEBdGoiBiAGLwEAQQFrIgY7AQAgAEEBayAOcSAAakEAIAAbIQ4gFUEBaiEVIAZB//8DcUUEQCAJIAtGDQIgASAFIBVBAXRqLwEAQQF0ai8BACEJCyAJIA1NDQAgDiAccSIAIAJGDQALQQEgCSAPIA0gDxsiD2siBnQhAiAJIAtJBEAgCyAPayEMIAkhCAJAA0AgAiAHQSBqIAhBAXRqLwEAayICQQFIDQEgAkEBdCECIAZBAWoiBiAPaiIIIAtJDQALIAwhBgtBASAGdCECC0EBIQggEiACIBNqIhNBtApLcQ0DIBYgE0HQBEtxDQMgAygCACICIABBAnRqIgggDToAASAIIAY6AAAgCCAUIBpBAnRqIhQgAmtBAnY7AQIgACECDAELCyAOBEAgFCAOQQJ0aiIAQQA7AQIgACAXOgABIABBwAA6AAALIAMgAygCACATQQJ0ajYCAAsgBCANNgIAQQAhCAsgCAusAQICfgF/IAFBAmqtIQIgACkDmC4hAwJAIAAoAqAuIgFBA2oiBEE/TQRAIAIgAa2GIAOEIQIMAQsgAUHAAEYEQCAAKAIEIAAoAhBqIAM3AAAgACAAKAIQQQhqNgIQQQMhBAwBCyAAKAIEIAAoAhBqIAIgAa2GIAOENwAAIAAgACgCEEEIajYCECABQT1rIQQgAkHAACABa62IIQILIAAgAjcDmC4gACAENgKgLguXAwICfgN/QYDJADMBACECIAApA5guIQMCQCAAKAKgLiIFQYLJAC8BACIGaiIEQT9NBEAgAiAFrYYgA4QhAgwBCyAFQcAARgRAIAAoAgQgACgCEGogAzcAACAAIAAoAhBBCGo2AhAgBiEEDAELIAAoAgQgACgCEGogAiAFrYYgA4Q3AAAgACAAKAIQQQhqNgIQIARBQGohBCACQcAAIAVrrYghAgsgACACNwOYLiAAIAQ2AqAuIAEEQAJAIARBOU4EQCAAKAIEIAAoAhBqIAI3AAAgACAAKAIQQQhqNgIQDAELIARBGU4EQCAAKAIEIAAoAhBqIAI+AAAgACAAKAIQQQRqNgIQIAAgACkDmC5CIIgiAjcDmC4gACAAKAKgLkEgayIENgKgLgsgBEEJTgR/IAAoAgQgACgCEGogAj0AACAAIAAoAhBBAmo2AhAgACkDmC5CEIghAiAAKAKgLkEQawUgBAtBAUgNACAAIAAoAhAiAUEBajYCECABIAAoAgRqIAI8AAALIABBADYCoC4gAEIANwOYLgsL8hQBEn8gASgCCCICKAIAIQUgAigCDCEHIAEoAgAhCCAAQoCAgIDQxwA3A6ApQQAhAgJAAkAgB0EASgRAQX8hDANAAkAgCCACQQJ0aiIDLwEABEAgACAAKAKgKUEBaiIDNgKgKSAAIANBAnRqQawXaiACNgIAIAAgAmpBqClqQQA6AAAgAiEMDAELIANBADsBAgsgAkEBaiICIAdHDQALIABB/C1qIQ8gAEH4LWohESAAKAKgKSIEQQFKDQIMAQsgAEH8LWohDyAAQfgtaiERQX8hDAsDQCAAIARBAWoiAjYCoCkgACACQQJ0akGsF2ogDEEBaiIDQQAgDEECSCIGGyICNgIAIAggAkECdCIEakEBOwEAIAAgAmpBqClqQQA6AAAgACAAKAL4LUEBazYC+C0gBQRAIA8gDygCACAEIAVqLwECazYCAAsgAyAMIAYbIQwgACgCoCkiBEECSA0ACwsgASAMNgIEIARBAXYhBgNAIAAgBkECdGpBrBdqKAIAIQkCQCAGIgJBAXQiAyAESg0AIAggCUECdGohCiAAIAlqQagpaiENIAYhBQNAAkAgAyAETgRAIAMhAgwBCyAIIABBrBdqIgIgA0EBciIEQQJ0aigCACILQQJ0ai8BACIOIAggAiADQQJ0aigCACIQQQJ0ai8BACICTwRAIAIgDkcEQCADIQIMAgsgAyECIABBqClqIgMgC2otAAAgAyAQai0AAEsNAQsgBCECCyAKLwEAIgQgCCAAIAJBAnRqQawXaigCACIDQQJ0ai8BACILSQRAIAUhAgwCCwJAIAQgC0cNACANLQAAIAAgA2pBqClqLQAASw0AIAUhAgwCCyAAIAVBAnRqQawXaiADNgIAIAIhBSACQQF0IgMgACgCoCkiBEwNAAsLIAAgAkECdGpBrBdqIAk2AgAgBkECTgRAIAZBAWshBiAAKAKgKSEEDAELCyAAKAKgKSEDA0AgByEGIAAgA0EBayIENgKgKSAAKAKwFyEKIAAgACADQQJ0akGsF2ooAgAiCTYCsBdBASECAkAgA0EDSA0AIAggCUECdGohDSAAIAlqQagpaiELQQIhA0EBIQUDQAJAIAMgBE4EQCADIQIMAQsgCCAAQawXaiICIANBAXIiB0ECdGooAgAiBEECdGovAQAiDiAIIAIgA0ECdGooAgAiEEECdGovAQAiAk8EQCACIA5HBEAgAyECDAILIAMhAiAAQagpaiIDIARqLQAAIAMgEGotAABLDQELIAchAgsgDS8BACIHIAggACACQQJ0akGsF2ooAgAiA0ECdGovAQAiBEkEQCAFIQIMAgsCQCAEIAdHDQAgCy0AACAAIANqQagpai0AAEsNACAFIQIMAgsgACAFQQJ0akGsF2ogAzYCACACIQUgAkEBdCIDIAAoAqApIgRMDQALC0ECIQMgAEGsF2oiByACQQJ0aiAJNgIAIAAgACgCpClBAWsiBTYCpCkgACgCsBchAiAHIAVBAnRqIAo2AgAgACAAKAKkKUEBayIFNgKkKSAHIAVBAnRqIAI2AgAgCCAGQQJ0aiINIAggAkECdGoiBS8BACAIIApBAnRqIgQvAQBqOwEAIABBqClqIgkgBmoiCyACIAlqLQAAIgIgCSAKai0AACIKIAIgCksbQQFqOgAAIAUgBjsBAiAEIAY7AQIgACAGNgKwF0EBIQVBASECAkAgACgCoCkiBEECSA0AA0AgDS8BACIKIAggAAJ/IAMgAyAETg0AGiAIIAcgA0EBciICQQJ0aigCACIEQQJ0ai8BACIOIAggByADQQJ0aigCACIQQQJ0ai8BACISTwRAIAMgDiASRw0BGiADIAQgCWotAAAgCSAQai0AAEsNARoLIAILIgJBAnRqQawXaigCACIDQQJ0ai8BACIESQRAIAUhAgwCCwJAIAQgCkcNACALLQAAIAAgA2pBqClqLQAASw0AIAUhAgwCCyAAIAVBAnRqQawXaiADNgIAIAIhBSACQQF0IgMgACgCoCkiBEwNAAsLIAZBAWohByAAIAJBAnRqQawXaiAGNgIAIAAoAqApIgNBAUoNAAsgACAAKAKkKUEBayICNgKkKSAAQawXaiIDIAJBAnRqIAAoArAXNgIAIAEoAgQhCSABKAIIIgIoAhAhBiACKAIIIQogAigCBCEQIAIoAgAhDSABKAIAIQcgAEGkF2pCADcBACAAQZwXakIANwEAIABBlBdqQgA3AQAgAEGMF2oiAUIANwEAQQAhBSAHIAMgACgCpClBAnRqKAIAQQJ0akEAOwECAkAgACgCpCkiAkG7BEoNACACQQFqIQIDQCAHIAAgAkECdGpBrBdqKAIAIgRBAnQiEmoiCyAHIAsvAQJBAnRqLwECIgNBAWogBiADIAZJGyIOOwECIAMgBk8hEwJAIAQgCUoNACAAIA5BAXRqQYwXaiIDIAMvAQBBAWo7AQBBACEDIAQgCk4EQCAQIAQgCmtBAnRqKAIAIQMLIBEgESgCACALLwEAIgQgAyAOamxqNgIAIA1FDQAgDyAPKAIAIAMgDSASai8BAmogBGxqNgIACyAFIBNqIQUgAkEBaiICQb0ERw0ACyAFRQ0AIAAgBkEBdGpBjBdqIQQDQCAGIQIDQCAAIAIiA0EBayICQQF0akGMF2oiDy8BACIKRQ0ACyAPIApBAWs7AQAgACADQQF0akGMF2oiAiACLwEAQQJqOwEAIAQgBC8BAEEBayIDOwEAIAVBAkohAiAFQQJrIQUgAg0ACyAGRQ0AQb0EIQIDQCADQf//A3EiBQRAA0AgACACQQFrIgJBAnRqQawXaigCACIDIAlKDQAgByADQQJ0aiIDLwECIAZHBEAgESARKAIAIAYgAy8BAGxqIgQ2AgAgESAEIAMvAQAgAy8BAmxrNgIAIAMgBjsBAgsgBUEBayIFDQALCyAGQQFrIgZFDQEgACAGQQF0akGMF2ovAQAhAwwACwALIwBBIGsiAiABIgAvAQBBAXQiATsBAiACIAEgAC8BAmpBAXQiATsBBCACIAEgAC8BBGpBAXQiATsBBiACIAEgAC8BBmpBAXQiATsBCCACIAEgAC8BCGpBAXQiATsBCiACIAEgAC8BCmpBAXQiATsBDCACIAEgAC8BDGpBAXQiATsBDiACIAEgAC8BDmpBAXQiATsBECACIAEgAC8BEGpBAXQiATsBEiACIAEgAC8BEmpBAXQiATsBFCACIAEgAC8BFGpBAXQiATsBFiACIAEgAC8BFmpBAXQiATsBGCACIAEgAC8BGGpBAXQiATsBGiACIAEgAC8BGmpBAXQiATsBHCACIAAvARwgAWpBAXQ7AR5BACEAIAxBAE4EQANAIAggAEECdGoiAy8BAiIBBEAgAiABQQF0aiIFIAUvAQAiBUEBajsBACADIAWtQoD+A4NCCIhCgpCAgQh+QpDCiKKIAYNCgYKEiBB+QiCIp0H/AXEgBUH/AXGtQoKQgIEIfkKQwoiiiAGDQoGChIgQfkIYiKdBgP4DcXJBECABa3Y7AQALIAAgDEchASAAQQFqIQAgAQ0ACwsLcgEBfyMAQRBrIgQkAAJ/QQAgAEUNABogAEEIaiEAIAFFBEAgAlBFBEAgAARAIABBADYCBCAAQRI2AgALQQAMAgtBAEIAIAMgABA6DAELIAQgAjcDCCAEIAE2AgAgBEIBIAMgABA6CyEAIARBEGokACAACyIAIAAgASACIAMQJiIARQRAQQAPCyAAKAIwQQAgAiADECULAwABC8gFAQR/IABB//8DcSEDIABBEHYhBEEBIQAgAkEBRgRAIAMgAS0AAGpB8f8DcCIAIARqQfH/A3BBEHQgAHIPCwJAIAEEfyACQRBJDQECQCACQa8rSwRAA0AgAkGwK2shAkG1BSEFIAEhAANAIAMgAC0AAGoiAyAEaiADIAAtAAFqIgNqIAMgAC0AAmoiA2ogAyAALQADaiIDaiADIAAtAARqIgNqIAMgAC0ABWoiA2ogAyAALQAGaiIDaiADIAAtAAdqIgNqIQQgBQRAIABBCGohACAFQQFrIQUMAQsLIARB8f8DcCEEIANB8f8DcCEDIAFBsCtqIQEgAkGvK0sNAAsgAkEISQ0BCwNAIAMgAS0AAGoiACAEaiAAIAEtAAFqIgBqIAAgAS0AAmoiAGogACABLQADaiIAaiAAIAEtAARqIgBqIAAgAS0ABWoiAGogACABLQAGaiIAaiAAIAEtAAdqIgNqIQQgAUEIaiEBIAJBCGsiAkEHSw0ACwsCQCACRQ0AIAJBAWshBiACQQNxIgUEQCABIQADQCACQQFrIQIgAyAALQAAaiIDIARqIQQgAEEBaiIBIQAgBUEBayIFDQALCyAGQQNJDQADQCADIAEtAABqIgAgAS0AAWoiBSABLQACaiIGIAEtAANqIgMgBiAFIAAgBGpqamohBCABQQRqIQEgAkEEayICDQALCyADQfH/A3AgBEHx/wNwQRB0cgVBAQsPCwJAIAJFDQAgAkEBayEGIAJBA3EiBQRAIAEhAANAIAJBAWshAiADIAAtAABqIgMgBGohBCAAQQFqIgEhACAFQQFrIgUNAAsLIAZBA0kNAANAIAMgAS0AAGoiACABLQABaiIFIAEtAAJqIgYgAS0AA2oiAyAGIAUgACAEampqaiEEIAFBBGohASACQQRrIgINAAsLIANB8f8DcCAEQfH/A3BBEHRyCx8AIAAgAiADQcCAASgCABEAACEAIAEgAiADEAcaIAALIwAgACAAKAJAIAIgA0HUgAEoAgARAAA2AkAgASACIAMQBxoLzSoCGH8HfiAAKAIMIgIgACgCECIDaiEQIAMgAWshASAAKAIAIgUgACgCBGohA0F/IAAoAhwiBygCpAF0IQRBfyAHKAKgAXQhCyAHKAI4IQwCf0EAIAcoAiwiEUUNABpBACACIAxJDQAaIAJBhAJqIAwgEWpNCyEWIBBBgwJrIRMgASACaiEXIANBDmshFCAEQX9zIRggC0F/cyESIAcoApwBIRUgBygCmAEhDSAHKAKIASEIIAc1AoQBIR0gBygCNCEOIAcoAjAhGSAQQQFqIQ8DQCAIQThyIQYgBSAIQQN2QQdxayELAn8gAiANIAUpAAAgCK2GIB2EIh2nIBJxQQJ0IgFqIgMtAAAiBA0AGiACIAEgDWoiAS0AAjoAACAGIAEtAAEiAWshBiACQQFqIA0gHSABrYgiHacgEnFBAnQiAWoiAy0AACIEDQAaIAIgASANaiIDLQACOgABIAYgAy0AASIDayEGIA0gHSADrYgiHacgEnFBAnRqIgMtAAAhBCACQQJqCyEBIAtBB2ohBSAGIAMtAAEiAmshCCAdIAKtiCEdAkACQAJAIARB/wFxRQ0AAkACQAJAAkACQANAIARBEHEEQCAVIB0gBK1CD4OIIhqnIBhxQQJ0aiECAn8gCCAEQQ9xIgZrIgRBG0sEQCAEIQggBQwBCyAEQThyIQggBSkAACAErYYgGoQhGiAFIARBA3ZrQQdqCyELIAMzAQIhGyAIIAItAAEiA2shCCAaIAOtiCEaIAItAAAiBEEQcQ0CA0AgBEHAAHFFBEAgCCAVIAIvAQJBAnRqIBqnQX8gBHRBf3NxQQJ0aiICLQABIgNrIQggGiADrYghGiACLQAAIgRBEHFFDQEMBAsLIAdB0f4ANgIEIABB7A42AhggGiEdDAMLIARB/wFxIgJBwABxRQRAIAggDSADLwECQQJ0aiAdp0F/IAJ0QX9zcUECdGoiAy0AASICayEIIB0gAq2IIR0gAy0AACIERQ0HDAELCyAEQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCABIAItAAA6AAAgAkEBaiECIAFBAWohAQsgHEIAUg0ACwsgDiEGIAwhAwsgBSAGSwRAAkACQCABIANNIAEgDyABa6wiGiAGrSIbIBogG1QbIhqnIglqIgIgA0txDQAgAyAJaiABSyABIANPcQ0AIAEgAyAJEAcaDAELIAEgAyADIAFrIgEgAUEfdSIBaiABcyIBEAcgAWohAiAaIAGtIh59IhxQDQAgASADaiEBA0ACQCAcIB4gHCAeVBsiG0IgVARAIBshGgwBCyAbIhpCIH0iIEIFiEIBfEIDgyIfUEUEQANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCAaQiB9IRogAUEgaiEBIAJBIGohAiAfQgF9Ih9CAFINAAsLICBC4ABUDQADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggAiABKQA4NwA4IAIgASkAMDcAMCACIAEpACg3ACggAiABKQAgNwAgIAIgASkAWDcAWCACIAEpAFA3AFAgAiABKQBINwBIIAIgASkAQDcAQCACIAEpAGA3AGAgAiABKQBoNwBoIAIgASkAcDcAcCACIAEpAHg3AHggAUGAAWohASACQYABaiECIBpCgAF9IhpCH1YNAAsLIBpCEFoEQCACIAEpAAA3AAAgAiABKQAINwAIIBpCEH0hGiACQRBqIQIgAUEQaiEBCyAaQghaBEAgAiABKQAANwAAIBpCCH0hGiACQQhqIQIgAUEIaiEBCyAaQgRaBEAgAiABKAAANgAAIBpCBH0hGiACQQRqIQIgAUEEaiEBCyAaQgJaBEAgAiABLwAAOwAAIBpCAn0hGiACQQJqIQIgAUECaiEBCyAcIBt9IRwgGlBFBEAgAiABLQAAOgAAIAJBAWohAiABQQFqIQELIBxCAFINAAsLIAUgBmshAUEAIARrIQUCQCAEQQdLBEAgBCEDDAELIAEgBE0EQCAEIQMMAQsgAiAEayEFA0ACQCACIAUpAAA3AAAgBEEBdCEDIAEgBGshASACIARqIQIgBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAQLIBAgAWsiCUEBaiIGIAUgBSAGSxshAyABIARrIQIgAUEHcUUNAiADRQ0CIAEgAi0AADoAACACQQFqIQIgAUEBaiIGQQdxQQAgA0EBayIFGw0BIAYhASAFIQMgCSEGDAILAkAgBCAFSQRAIAcoAphHIARLDQELIAEgASAEayIGKQAANwAAIAEgBUEBa0EHcUEBaiIDaiECIAUgA2siBEUNAyADIAZqIQEDQCACIAEpAAA3AAAgAUEIaiEBIAJBCGohAiAEQQhrIgQNAAsMAwsgASAEIAUQPyECDAILIAEgAi0AADoAASAJQQFrIQYgA0ECayEFIAJBAWohAgJAIAFBAmoiCkEHcUUNACAFRQ0AIAEgAi0AADoAAiAJQQJrIQYgA0EDayEFIAJBAWohAgJAIAFBA2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAAyAJQQNrIQYgA0EEayEFIAJBAWohAgJAIAFBBGoiCkEHcUUNACAFRQ0AIAEgAi0AADoABCAJQQRrIQYgA0EFayEFIAJBAWohAgJAIAFBBWoiCkEHcUUNACAFRQ0AIAEgAi0AADoABSAJQQVrIQYgA0EGayEFIAJBAWohAgJAIAFBBmoiCkEHcUUNACAFRQ0AIAEgAi0AADoABiAJQQZrIQYgA0EHayEFIAJBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0AADoABiADQQdrIQYgBEEHayEFIAJBAWohAgJAIABBB2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAByADQQhrIQMgBEEIayEEIABBCGohACACQQFqIQIMBgsgByEAIAUhBCAGIQMMBQsgByEAIAUhBCAGIQMMBAsgByEAIAUhBCAGIQMMAwsgByEAIAUhBCAGIQMMAgsgByEAIAUhBCAGIQMMAQsgByEAIAUhBCAGIQMLAkAgA0EXTQRAIARFDQEgBEEBayEBIARBB3EiAwRAA0AgACACLQAAOgAAIARBAWshBCAAQQFqIQAgAkEBaiECIANBAWsiAw0ACwsgAUEHSQ0BA0AgACACLQAAOgAAIAAgAi0AAToAASAAIAItAAI6AAIgACACLQADOgADIAAgAi0ABDoABCAAIAItAAU6AAUgACACLQAGOgAGIAAgAi0ABzoAByAAQQhqIQAgAkEIaiECIARBCGsiBA0ACwwBCyAERQ0AIAAgASAEED8hAAsgAAvyCAEXfyAAKAJoIgwgACgCMEGGAmsiBWtBACAFIAxJGyENIAAoAnQhAiAAKAKQASEPIAAoAkgiDiAMaiIJIAAoAnAiBUECIAUbIgVBAWsiBmoiAy0AASESIAMtAAAhEyAGIA5qIQZBAyEDIAAoApQBIRYgACgCPCEUIAAoAkwhECAAKAI4IRECQAJ/IAVBA0kEQCANIQggDgwBCyAAIABBACAJLQABIAAoAnwRAAAgCS0AAiAAKAJ8EQAAIQoDQCAAIAogAyAJai0AACAAKAJ8EQAAIQogACgCUCAKQQF0ai8BACIIIAEgCCABQf//A3FJIggbIQEgA0ECayAHIAgbIQcgA0EBaiIDIAVNDQALIAFB//8DcSAHIA1qIghB//8DcU0NASAGIAdB//8DcSIDayEGIA4gA2sLIQMCQAJAIAwgAUH//wNxTQ0AIAIgAkECdiAFIA9JGyEKIA1B//8DcSEVIAlBAmohDyAJQQRrIRcDQAJAAkAgBiABQf//A3EiC2otAAAgE0cNACAGIAtBAWoiAWotAAAgEkcNACADIAtqIgItAAAgCS0AAEcNACABIANqLQAAIAktAAFGDQELIApBAWsiCkUNAiAQIAsgEXFBAXRqLwEAIgEgCEH//wNxSw0BDAILIAJBAmohAUEAIQQgDyECAkADQCACLQAAIAEtAABHDQEgAi0AASABLQABRwRAIARBAXIhBAwCCyACLQACIAEtAAJHBEAgBEECciEEDAILIAItAAMgAS0AA0cEQCAEQQNyIQQMAgsgAi0ABCABLQAERwRAIARBBHIhBAwCCyACLQAFIAEtAAVHBEAgBEEFciEEDAILIAItAAYgAS0ABkcEQCAEQQZyIQQMAgsgAi0AByABLQAHRwRAIARBB3IhBAwCCyABQQhqIQEgAkEIaiECIARB+AFJIRggBEEIaiEEIBgNAAtBgAIhBAsCQAJAIAUgBEECaiICSQRAIAAgCyAHQf//A3FrIgY2AmwgAiAUSwRAIBQPCyACIBZPBEAgAg8LIAkgBEEBaiIFaiIBLQABIRIgAS0AACETAkAgAkEESQ0AIAIgBmogDE8NACAGQf//A3EhCCAEQQFrIQtBACEDQQAhBwNAIBAgAyAIaiARcUEBdGovAQAiASAGQf//A3FJBEAgAyAVaiABTw0IIAMhByABIQYLIANBAWoiAyALTQ0ACyAAIAAgAEEAIAIgF2oiAS0AACAAKAJ8EQAAIAEtAAEgACgCfBEAACABLQACIAAoAnwRAAAhASAAKAJQIAFBAXRqLwEAIgEgBkH//wNxTwRAIAdB//8DcSEDIAYhAQwDCyAEQQJrIgdB//8DcSIDIBVqIAFPDQYMAgsgAyAFaiEGIAIhBQsgCkEBayIKRQ0DIBAgCyARcUEBdGovAQAiASAIQf//A3FNDQMMAQsgByANaiEIIA4gA2siAyAFaiEGIAIhBQsgDCABQf//A3FLDQALCyAFDwsgAiEFCyAFIAAoAjwiACAAIAVLGwuGBQETfyAAKAJ0IgMgA0ECdiAAKAJwIgNBAiADGyIDIAAoApABSRshByAAKAJoIgogACgCMEGGAmsiBWtB//8DcUEAIAUgCkkbIQwgACgCSCIIIApqIgkgA0EBayICaiIFLQABIQ0gBS0AACEOIAlBAmohBSACIAhqIQsgACgClAEhEiAAKAI8IQ8gACgCTCEQIAAoAjghESAAKAKIAUEFSCETA0ACQCAKIAFB//8DcU0NAANAAkACQCALIAFB//8DcSIGai0AACAORw0AIAsgBkEBaiIBai0AACANRw0AIAYgCGoiAi0AACAJLQAARw0AIAEgCGotAAAgCS0AAUYNAQsgB0EBayIHRQ0CIAwgECAGIBFxQQF0ai8BACIBSQ0BDAILCyACQQJqIQRBACECIAUhAQJAA0AgAS0AACAELQAARw0BIAEtAAEgBC0AAUcEQCACQQFyIQIMAgsgAS0AAiAELQACRwRAIAJBAnIhAgwCCyABLQADIAQtAANHBEAgAkEDciECDAILIAEtAAQgBC0ABEcEQCACQQRyIQIMAgsgAS0ABSAELQAFRwRAIAJBBXIhAgwCCyABLQAGIAQtAAZHBEAgAkEGciECDAILIAEtAAcgBC0AB0cEQCACQQdyIQIMAgsgBEEIaiEEIAFBCGohASACQfgBSSEUIAJBCGohAiAUDQALQYACIQILAkAgAyACQQJqIgFJBEAgACAGNgJsIAEgD0sEQCAPDwsgASASTwRAIAEPCyAIIAJBAWoiA2ohCyADIAlqIgMtAAEhDSADLQAAIQ4gASEDDAELIBMNAQsgB0EBayIHRQ0AIAwgECAGIBFxQQF0ai8BACIBSQ0BCwsgAwvLAQECfwJAA0AgAC0AACABLQAARw0BIAAtAAEgAS0AAUcEQCACQQFyDwsgAC0AAiABLQACRwRAIAJBAnIPCyAALQADIAEtAANHBEAgAkEDcg8LIAAtAAQgAS0ABEcEQCACQQRyDwsgAC0ABSABLQAFRwRAIAJBBXIPCyAALQAGIAEtAAZHBEAgAkEGcg8LIAAtAAcgAS0AB0cEQCACQQdyDwsgAUEIaiEBIABBCGohACACQfgBSSEDIAJBCGohAiADDQALQYACIQILIAIL5wwBB38gAEF/cyEAIAJBF08EQAJAIAFBA3FFDQAgAS0AACAAQf8BcXNBAnRB0BhqKAIAIABBCHZzIQAgAkEBayIEQQAgAUEBaiIDQQNxG0UEQCAEIQIgAyEBDAELIAEtAAEgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBAmohAwJAIAJBAmsiBEUNACADQQNxRQ0AIAEtAAIgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBA2ohAwJAIAJBA2siBEUNACADQQNxRQ0AIAEtAAMgAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBBGohASACQQRrIQIMAgsgBCECIAMhAQwBCyAEIQIgAyEBCyACQRRuIgNBbGwhCQJAIANBAWsiCEUEQEEAIQQMAQsgA0EUbCABakEUayEDQQAhBANAIAEoAhAgB3MiB0EWdkH8B3FB0DhqKAIAIAdBDnZB/AdxQdAwaigCACAHQQZ2QfwHcUHQKGooAgAgB0H/AXFBAnRB0CBqKAIAc3NzIQcgASgCDCAGcyIGQRZ2QfwHcUHQOGooAgAgBkEOdkH8B3FB0DBqKAIAIAZBBnZB/AdxQdAoaigCACAGQf8BcUECdEHQIGooAgBzc3MhBiABKAIIIAVzIgVBFnZB/AdxQdA4aigCACAFQQ52QfwHcUHQMGooAgAgBUEGdkH8B3FB0ChqKAIAIAVB/wFxQQJ0QdAgaigCAHNzcyEFIAEoAgQgBHMiBEEWdkH8B3FB0DhqKAIAIARBDnZB/AdxQdAwaigCACAEQQZ2QfwHcUHQKGooAgAgBEH/AXFBAnRB0CBqKAIAc3NzIQQgASgCACAAcyIAQRZ2QfwHcUHQOGooAgAgAEEOdkH8B3FB0DBqKAIAIABBBnZB/AdxQdAoaigCACAAQf8BcUECdEHQIGooAgBzc3MhACABQRRqIQEgCEEBayIIDQALIAMhAQsgAiAJaiECIAEoAhAgASgCDCABKAIIIAEoAgQgASgCACAAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQf8BcUECdEHQGGooAgAgBHNzIABBCHZzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBB/wFxQQJ0QdAYaigCACAFc3MgAEEIdnMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEH/AXFBAnRB0BhqKAIAIAZzcyAAQQh2cyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQf8BcUECdEHQGGooAgAgB3NzIABBCHZzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyIAQQh2IABB/wFxQQJ0QdAYaigCAHMiAEEIdiAAQf8BcUECdEHQGGooAgBzIgBBCHYgAEH/AXFBAnRB0BhqKAIAcyEAIAFBFGohAQsgAkEHSwRAA0AgAS0AByABLQAGIAEtAAUgAS0ABCABLQADIAEtAAIgAS0AASABLQAAIABB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyIAQf8BcXNBAnRB0BhqKAIAIABBCHZzIgBB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyIAQf8BcXNBAnRB0BhqKAIAIABBCHZzIgBB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBCGohASACQQhrIgJBB0sNAAsLAkAgAkUNACACQQFxBH8gAS0AACAAQf8BcXNBAnRB0BhqKAIAIABBCHZzIQAgAUEBaiEBIAJBAWsFIAILIQMgAkEBRg0AA0AgAS0AASABLQAAIABB/wFxc0ECdEHQGGooAgAgAEEIdnMiAEH/AXFzQQJ0QdAYaigCACAAQQh2cyEAIAFBAmohASADQQJrIgMNAAsLIABBf3MLwgIBA38jAEEQayIIJAACfwJAIAAEQCAEDQEgBVANAQsgBgRAIAZBADYCBCAGQRI2AgALQQAMAQtBgAEQCSIHRQRAIAYEQCAGQQA2AgQgBkEONgIAC0EADAELIAcgATcDCCAHQgA3AwAgB0EoaiIJECogByAFNwMYIAcgBDYCECAHIAM6AGAgB0EANgJsIAdCADcCZCAAKQMYIQEgCEF/NgIIIAhCjoCAgPAANwMAIAdBECAIECQgAUL/gQGDhCIBNwNwIAcgAadBBnZBAXE6AHgCQCACRQ0AIAkgAhBgQX9KDQAgBxAGQQAMAQsgBhBfIgIEQCAAIAAoAjBBAWo2AjAgAiAHNgIIIAJBATYCBCACIAA2AgAgAkI/IAAgB0EAQgBBDkEBEQoAIgEgAUIAUxs3AxgLIAILIQAgCEEQaiQAIAALYgEBf0E4EAkiAUUEQCAABEAgAEEANgIEIABBDjYCAAtBAA8LIAFBADYCCCABQgA3AwAgAUIANwMgIAFCgICAgBA3AiwgAUEAOgAoIAFBADYCFCABQgA3AgwgAUEAOwE0IAELuwEBAX4gASkDACICQgKDUEUEQCAAIAEpAxA3AxALIAJCBINQRQRAIAAgASkDGDcDGAsgAkIIg1BFBEAgACABKQMgNwMgCyACQhCDUEUEQCAAIAEoAig2AigLIAJCIINQRQRAIAAgASgCLDYCLAsgAkLAAINQRQRAIAAgAS8BMDsBMAsgAkKAAYNQRQRAIAAgAS8BMjsBMgsgAkKAAoNQRQRAIAAgASgCNDYCNAsgACAAKQMAIAKENwMAQQALGQAgAUUEQEEADwsgACABKAIAIAEzAQQQGws3AQJ/IABBACABG0UEQCAAIAFGDwsgAC8BBCIDIAEvAQRGBH8gACgCACABKAIAIAMQPQVBAQtFCyIBAX8gAUUEQEEADwsgARAJIgJFBEBBAA8LIAIgACABEAcLKQAgACABIAIgAyAEEEUiAEUEQEEADwsgACACQQAgBBA1IQEgABAGIAELcQEBfgJ/AkAgAkJ/VwRAIAMEQCADQQA2AgQgA0EUNgIACwwBCyAAIAEgAhARIgRCf1cEQCADBEAgAyAAKAIMNgIAIAMgACgCEDYCBAsMAQtBACACIARXDQEaIAMEQCADQQA2AgQgA0ERNgIACwtBfwsLNQAgACABIAJBABAmIgBFBEBBfw8LIAMEQCADIAAtAAk6AAALIAQEQCAEIAAoAkQ2AgALQQAL/AECAn8BfiMAQRBrIgMkAAJAIAAgA0EOaiABQYAGQQAQRiIARQRAIAIhAAwBCyADLwEOIgFBBUkEQCACIQAMAQsgAC0AAEEBRwRAIAIhAAwBCyAAIAGtQv//A4MQFyIBRQRAIAIhAAwBCyABEH0aAkAgARAVIAIEfwJ/IAIvAQQhAEEAIAIoAgAiBEUNABpBACAEIABB1IABKAIAEQAACwVBAAtHBEAgAiEADAELIAEgAS0AAAR+IAEpAwggASkDEH0FQgALIgVC//8DgxATIAWnQf//A3FBgBBBABA1IgBFBEAgAiEADAELIAIQEAsgARAICyADQRBqJAAgAAvmDwIIfwJ+IwBB4ABrIgckAEEeQS4gAxshCwJAAkAgAgRAIAIiBSIGLQAABH4gBikDCCAGKQMQfQVCAAsgC61aDQEgBARAIARBADYCBCAEQRM2AgALQn8hDQwCCyABIAutIAcgBBAtIgUNAEJ/IQ0MAQsgBUIEEBMoAABBoxJBqBIgAxsoAABHBEAgBARAIARBADYCBCAEQRM2AgALQn8hDSACDQEgBRAIDAELIABCADcDICAAQQA2AhggAEL/////DzcDECAAQQA7AQwgAEG/hig2AgggAEEBOgAGIABBADsBBCAAQQA2AgAgAEIANwNIIABBgIDYjXg2AkQgAEIANwMoIABCADcDMCAAQgA3AzggAEFAa0EAOwEAIABCADcDUCAAIAMEf0EABSAFEAwLOwEIIAAgBRAMOwEKIAAgBRAMOwEMIAAgBRAMNgIQIAUQDCEGIAUQDCEJIAdBADYCWCAHQgA3A1AgB0IANwNIIAcgCUEfcTYCPCAHIAZBC3Y2AjggByAGQQV2QT9xNgI0IAcgBkEBdEE+cTYCMCAHIAlBCXZB0ABqNgJEIAcgCUEFdkEPcUEBazYCQCAAIAdBMGoQBTYCFCAAIAUQFTYCGCAAIAUQFa03AyAgACAFEBWtNwMoIAUQDCEIIAUQDCEGIAACfiADBEBBACEJIABBADYCRCAAQQA7AUAgAEEANgI8QgAMAQsgBRAMIQkgACAFEAw2AjwgACAFEAw7AUAgACAFEBU2AkQgBRAVrQs3A0ggBS0AAEUEQCAEBEAgBEEANgIEIARBFDYCAAtCfyENIAINASAFEAgMAQsCQCAALwEMIgpBAXEEQCAKQcAAcQRAIABB//8DOwFSDAILIABBATsBUgwBCyAAQQA7AVILIABBADYCOCAAQgA3AzAgBiAIaiAJaiEKAkAgAgRAIAUtAAAEfiAFKQMIIAUpAxB9BUIACyAKrVoNASAEBEAgBEEANgIEIARBFTYCAAtCfyENDAILIAUQCCABIAqtQQAgBBAtIgUNAEJ/IQ0MAQsCQCAIRQ0AIAAgBSABIAhBASAEEGQiCDYCMCAIRQRAIAQoAgBBEUYEQCAEBEAgBEEANgIEIARBFTYCAAsLQn8hDSACDQIgBRAIDAILIAAtAA1BCHFFDQAgCEECECNBBUcNACAEBEAgBEEANgIEIARBFTYCAAtCfyENIAINASAFEAgMAQsgAEE0aiEIAkAgBkUNACAFIAEgBkEAIAQQRSIMRQRAQn8hDSACDQIgBRAIDAILIAwgBkGAAkGABCADGyAIIAQQbiEGIAwQBiAGRQRAQn8hDSACDQIgBRAIDAILIANFDQAgAEEBOgAECwJAIAlFDQAgACAFIAEgCUEAIAQQZCIBNgI4IAFFBEBCfyENIAINAiAFEAgMAgsgAC0ADUEIcUUNACABQQIQI0EFRw0AIAQEQCAEQQA2AgQgBEEVNgIAC0J/IQ0gAg0BIAUQCAwBCyAAIAAoAjRB9eABIAAoAjAQZzYCMCAAIAAoAjRB9cYBIAAoAjgQZzYCOAJAAkAgACkDKEL/////D1ENACAAKQMgQv////8PUQ0AIAApA0hC/////w9SDQELAkACQAJAIAgoAgAgB0EwakEBQYACQYAEIAMbIAQQRiIBRQRAIAJFDQEMAgsgASAHMwEwEBciAUUEQCAEBEAgBEEANgIEIARBDjYCAAsgAkUNAQwCCwJAIAApAyhC/////w9RBEAgACABEB03AygMAQsgA0UNAEEAIQYCQCABKQMQIg5CCHwiDSAOVA0AIAEpAwggDVQNACABIA03AxBBASEGCyABIAY6AAALIAApAyBC/////w9RBEAgACABEB03AyALAkAgAw0AIAApA0hC/////w9RBEAgACABEB03A0gLIAAoAjxB//8DRw0AIAAgARAVNgI8CyABLQAABH8gASkDECABKQMIUQVBAAsNAiAEBEAgBEEANgIEIARBFTYCAAsgARAIIAINAQsgBRAIC0J/IQ0MAgsgARAICyAFLQAARQRAIAQEQCAEQQA2AgQgBEEUNgIAC0J/IQ0gAg0BIAUQCAwBCyACRQRAIAUQCAtCfyENIAApA0hCf1cEQCAEBEAgBEEWNgIEIARBBDYCAAsMAQsjAEEQayIDJABBASEBAkAgACgCEEHjAEcNAEEAIQECQCAAKAI0IANBDmpBgbICQYAGQQAQRiICBEAgAy8BDiIFQQZLDQELIAQEQCAEQQA2AgQgBEEVNgIACwwBCyACIAWtQv//A4MQFyICRQRAIAQEQCAEQQA2AgQgBEEUNgIACwwBC0EBIQECQAJAAkAgAhAMQQFrDgICAQALQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAILIAApAyhCE1YhAQsgAkICEBMvAABBwYoBRwRAQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAELIAIQfUEBayIFQf8BcUEDTwRAQQAhASAEBEAgBEEANgIEIARBGDYCAAsgAhAIDAELIAMvAQ5BB0cEQEEAIQEgBARAIARBADYCBCAEQRU2AgALIAIQCAwBCyAAIAE6AAYgACAFQf8BcUGBAmo7AVIgACACEAw2AhAgAhAIQQEhAQsgA0EQaiQAIAFFDQAgCCAIKAIAEG02AgAgCiALaq0hDQsgB0HgAGokACANC4ECAQR/IwBBEGsiBCQAAkAgASAEQQxqQcAAQQAQJSIGRQ0AIAQoAgxBBWoiA0GAgARPBEAgAgRAIAJBADYCBCACQRI2AgALDAELQQAgA60QFyIDRQRAIAIEQCACQQA2AgQgAkEONgIACwwBCyADQQEQcCADIAEEfwJ/IAEvAQQhBUEAIAEoAgAiAUUNABpBACABIAVB1IABKAIAEQAACwVBAAsQEiADIAYgBCgCDBAsAn8gAy0AAEUEQCACBEAgAkEANgIEIAJBFDYCAAtBAAwBCyAAIAMtAAAEfiADKQMQBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIGrRATIghFBEBBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAwNAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwDCwJAAkBBEBAJIgUEQCAFIAY7AQogBSAHOwEIIAUgAjYCBCAFQQA2AgAgBkUNASAFIAggBhBjIgY2AgwgBg0CIAUQBgtBACECIAQEQCAEQQA2AgQgBEEONgIACyABEAggAEUNBANAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwECyAFQQA2AgwLAkAgAEUEQCAFIQAMAQsgCSAFNgIACyAFIQkgAS0AAA0ACwsCQCABLQAABH8gASkDECABKQMIUQVBAAsNACABIAEtAAAEfiABKQMIIAEpAxB9BUIACyIKQv////8PgxATIQICQCAKpyIFQQNLDQAgAkUNACACQcEUIAUQPUUNAQtBACECIAQEQCAEQQA2AgQgBEEVNgIACyABEAggAEUNAQNAIAAoAgAhASAAKAIMEAYgABAGIAEiAA0ACwwBCyABEAggAwRAIAMgADYCAEEBDwtBASECIABFDQADQCAAKAIAIQEgACgCDBAGIAAQBiABIgANAAsLIAILvgEBBX8gAAR/IAAhAgNAIAIiBCgCACICDQALIAEEQANAIAEiAy8BCCEGIAMoAgAhASAAIQICQAJAA0ACQCACLwEIIAZHDQAgAi8BCiIFIAMvAQpHDQAgBUUNAiACKAIMIAMoAgwgBRA9RQ0CCyACKAIAIgINAAsgA0EANgIAIAQgAzYCACADIQQMAQsgAiACKAIEIAMoAgRBgAZxcjYCBCADQQA2AgAgAygCDBAGIAMQBgsgAQ0ACwsgAAUgAQsLVQICfgF/AkACQCAALQAARQ0AIAApAxAiAkIBfCIDIAJUDQAgAyAAKQMIWA0BCyAAQQA6AAAPCyAAKAIEIgRFBEAPCyAAIAM3AxAgBCACp2ogAToAAAt9AQN/IwBBEGsiAiQAIAIgATYCDEF/IQMCQCAALQAoDQACQCAAKAIAIgRFDQAgBCABEHFBf0oNACAAKAIAIQEgAEEMaiIABEAgACABKAIMNgIAIAAgASgCEDYCBAsMAQsgACACQQxqQgRBExAOQj+HpyEDCyACQRBqJAAgAwvdAQEDfyABIAApAzBaBEAgAEEIagRAIABBADYCDCAAQRI2AggLQX8PCyAAQQhqIQIgAC0AGEECcQRAIAIEQCACQQA2AgQgAkEZNgIAC0F/DwtBfyEDAkAgACABQQAgAhBTIgRFDQAgACgCUCAEIAIQfkUNAAJ/IAEgACkDMFoEQCAAQQhqBEAgAEEANgIMIABBEjYCCAtBfwwBCyABp0EEdCICIAAoAkBqKAIEECAgACgCQCACaiICQQA2AgQgAhBAQQALDQAgACgCQCABp0EEdGpBAToADEEAIQMLIAMLpgIBBX9BfyEFAkAgACABQQBBABAmRQ0AIAAtABhBAnEEQCAAQQhqIgAEQCAAQQA2AgQgAEEZNgIAC0F/DwsCfyAAKAJAIgQgAaciBkEEdGooAgAiBUUEQCADQYCA2I14RyEHQQMMAQsgBSgCRCADRyEHIAUtAAkLIQggBCAGQQR0aiIEIQYgBCgCBCEEQQAgAiAIRiAHG0UEQAJAIAQNACAGIAUQKyIENgIEIAQNACAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0F/DwsgBCADNgJEIAQgAjoACSAEIAQoAgBBEHI2AgBBAA8LQQAhBSAERQ0AIAQgBCgCAEFvcSIANgIAIABFBEAgBBAgIAZBADYCBEEADwsgBCADNgJEIAQgCDoACQsgBQvjCAIFfwR+IAAtABhBAnEEQCAAQQhqBEAgAEEANgIMIABBGTYCCAtCfw8LIAApAzAhCwJAIANBgMAAcQRAIAAgASADQQAQTCIJQn9SDQELAn4CQAJAIAApAzAiCUIBfCIMIAApAzgiClQEQCAAKAJAIQQMAQsgCkIBhiIJQoAIIAlCgAhUGyIJQhAgCUIQVhsgCnwiCadBBHQiBK0gCkIEhkLw////D4NUDQEgACgCQCAEEDQiBEUNASAAIAk3AzggACAENgJAIAApAzAiCUIBfCEMCyAAIAw3AzAgBCAJp0EEdGoiBEIANwIAIARCADcABSAJDAELIABBCGoEQCAAQQA2AgwgAEEONgIIC0J/CyIJQgBZDQBCfw8LAkAgAUUNAAJ/QQAhBCAJIAApAzBaBEAgAEEIagRAIABBADYCDCAAQRI2AggLQX8MAQsgAC0AGEECcQRAIABBCGoEQCAAQQA2AgwgAEEZNgIIC0F/DAELAkAgAUUNACABLQAARQ0AQX8gASABECJB//8DcSADIABBCGoQNSIERQ0BGiADQYAwcQ0AIARBABAjQQNHDQAgBEECNgIICwJAIAAgAUEAQQAQTCIKQgBTIgENACAJIApRDQAgBBAQIABBCGoEQCAAQQA2AgwgAEEKNgIIC0F/DAELAkAgAUEBIAkgClEbRQ0AAkACfwJAIAAoAkAiASAJpyIFQQR0aiIGKAIAIgMEQCADKAIwIAQQYg0BCyAEIAYoAgQNARogBiAGKAIAECsiAzYCBCAEIAMNARogAEEIagRAIABBADYCDCAAQQ42AggLDAILQQEhByAGKAIAKAIwC0EAQQAgAEEIaiIDECUiCEUNAAJAAkAgASAFQQR0aiIFKAIEIgENACAGKAIAIgENAEEAIQEMAQsgASgCMCIBRQRAQQAhAQwBCyABQQBBACADECUiAUUNAQsgACgCUCAIIAlBACADEE1FDQAgAQRAIAAoAlAgAUEAEH4aCyAFKAIEIQMgBwRAIANFDQIgAy0AAEECcUUNAiADKAIwEBAgBSgCBCIBIAEoAgBBfXEiAzYCACADRQRAIAEQICAFQQA2AgQgBBAQQQAMBAsgASAGKAIAKAIwNgIwIAQQEEEADAMLIAMoAgAiAUECcQRAIAMoAjAQECAFKAIEIgMoAgAhAQsgAyAENgIwIAMgAUECcjYCAEEADAILIAQQEEF/DAELIAQQEEEAC0UNACALIAApAzBRBEBCfw8LIAAoAkAgCadBBHRqED4gACALNwMwQn8PCyAJpyIGQQR0IgEgACgCQGoQQAJAAkAgACgCQCIEIAFqIgMoAgAiBUUNAAJAIAMoAgQiAwRAIAMoAgAiAEEBcUUNAQwCCyAFECshAyAAKAJAIgQgBkEEdGogAzYCBCADRQ0CIAMoAgAhAAsgA0F+NgIQIAMgAEEBcjYCAAsgASAEaiACNgIIIAkPCyAAQQhqBEAgAEEANgIMIABBDjYCCAtCfwteAQF/IwBBEGsiAiQAAn8gACgCJEEBRwRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQX8MAQsgAkEANgIIIAIgATcDACAAIAJCEEEMEA5CP4enCyEAIAJBEGokACAAC9oDAQZ/IwBBEGsiBSQAIAUgAjYCDCMAQaABayIEJAAgBEEIakHA8ABBkAEQBxogBCAANgI0IAQgADYCHCAEQX4gAGsiA0H/////ByADQf////8HSRsiBjYCOCAEIAAgBmoiADYCJCAEIAA2AhggBEEIaiEAIwBB0AFrIgMkACADIAI2AswBIANBoAFqQQBBKBAZIAMgAygCzAE2AsgBAkBBACABIANByAFqIANB0ABqIANBoAFqEEpBAEgNACAAKAJMQQBOIQcgACgCACECIAAsAEpBAEwEQCAAIAJBX3E2AgALIAJBIHEhCAJ/IAAoAjAEQCAAIAEgA0HIAWogA0HQAGogA0GgAWoQSgwBCyAAQdAANgIwIAAgA0HQAGo2AhAgACADNgIcIAAgAzYCFCAAKAIsIQIgACADNgIsIAAgASADQcgBaiADQdAAaiADQaABahBKIAJFDQAaIABBAEEAIAAoAiQRAAAaIABBADYCMCAAIAI2AiwgAEEANgIcIABBADYCECAAKAIUGiAAQQA2AhRBAAsaIAAgACgCACAIcjYCACAHRQ0ACyADQdABaiQAIAYEQCAEKAIcIgAgACAEKAIYRmtBADoAAAsgBEGgAWokACAFQRBqJAALUwEDfwJAIAAoAgAsAABBMGtBCk8NAANAIAAoAgAiAiwAACEDIAAgAkEBajYCACABIANqQTBrIQEgAiwAAUEwa0EKTw0BIAFBCmwhAQwACwALIAELuwIAAkAgAUEUSw0AAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4KAAECAwQFBgcICQoLIAIgAigCACIBQQRqNgIAIAAgASgCADYCAA8LIAIgAigCACIBQQRqNgIAIAAgATQCADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATUCADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASkDADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATIBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATMBADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATAAADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATEAADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASsDADkDAA8LIAAgAkEAEQcACwubAgAgAEUEQEEADwsCfwJAIAAEfyABQf8ATQ0BAkBB9IIBKAIAKAIARQRAIAFBgH9xQYC/A0YNAwwBCyABQf8PTQRAIAAgAUE/cUGAAXI6AAEgACABQQZ2QcABcjoAAEECDAQLIAFBgLADT0EAIAFBgEBxQYDAA0cbRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMBAsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMBAsLQYSEAUEZNgIAQX8FQQELDAELIAAgAToAAEEBCwvjAQECfyACQQBHIQMCQAJAAkAgAEEDcUUNACACRQ0AIAFB/wFxIQQDQCAALQAAIARGDQIgAkEBayICQQBHIQMgAEEBaiIAQQNxRQ0BIAINAAsLIANFDQELAkAgAC0AACABQf8BcUYNACACQQRJDQAgAUH/AXFBgYKECGwhAwNAIAAoAgAgA3MiBEF/cyAEQYGChAhrcUGAgYKEeHENASAAQQRqIQAgAkEEayICQQNLDQALCyACRQ0AIAFB/wFxIQEDQCABIAAtAABGBEAgAA8LIABBAWohACACQQFrIgINAAsLQQALeQEBfAJAIABFDQAgACsDECAAKwMgIgIgAUQAAAAAAAAAACABRAAAAAAAAAAAZBsiAUQAAAAAAADwPyABRAAAAAAAAPA/YxsgACsDKCACoaKgIgEgACsDGKFjRQ0AIAAoAgAgASAAKAIMIAAoAgQRDgAgACABOQMYCwtIAQF8AkAgAEUNACAAKwMQIAArAyAiASAAKwMoIAGhoCIBIAArAxihY0UNACAAKAIAIAEgACgCDCAAKAIEEQ4AIAAgATkDGAsLWgICfgF/An8CQAJAIAAtAABFDQAgACkDECIBQgF8IgIgAVQNACACIAApAwhYDQELIABBADoAAEEADAELQQAgACgCBCIDRQ0AGiAAIAI3AxAgAyABp2otAAALC4IEAgZ/AX4gAEEAIAEbRQRAIAIEQCACQQA2AgQgAkESNgIAC0EADwsCQAJAIAApAwhQDQAgACgCECABLQAAIgQEf0Kl6wohCSABIQMDQCAJIAStQv8Bg3whCSADLQABIgQEQCADQQFqIQMgCUL/////D4NCIX4hCQwBCwsgCacFQYUqCyIEIAAoAgBwQQJ0aiIGKAIAIgNFDQADQAJAIAMoAhwgBEcNACABIAMoAgAQOA0AAkAgAykDCEJ/UQRAIAMoAhghAQJAIAUEQCAFIAE2AhgMAQsgBiABNgIACyADEAYgACAAKQMIQgF9Igk3AwggCbogACgCACIBuER7FK5H4XqEP6JjRQ0BIAFBgQJJDQECf0EAIQMgACgCACIGIAFBAXYiBUcEQCAFEDwiB0UEQCACBEAgAkEANgIEIAJBDjYCAAtBAAwCCwJAIAApAwhCACAGG1AEQCAAKAIQIQQMAQsgACgCECEEA0AgBCADQQJ0aigCACIBBEADQCABKAIYIQIgASAHIAEoAhwgBXBBAnRqIggoAgA2AhggCCABNgIAIAIiAQ0ACwsgA0EBaiIDIAZHDQALCyAEEAYgACAFNgIAIAAgBzYCEAtBAQsNAQwFCyADQn83AxALQQEPCyADIgUoAhgiAw0ACwsgAgRAIAJBADYCBCACQQk2AgALC0EAC6UGAgl/AX4jAEHwAGsiBSQAAkACQCAARQ0AAkAgAQRAIAEpAzAgAlYNAQtBACEDIABBCGoEQCAAQQA2AgwgAEESNgIICwwCCwJAIANBCHENACABKAJAIAKnQQR0aiIGKAIIRQRAIAYtAAxFDQELQQAhAyAAQQhqBEAgAEEANgIMIABBDzYCCAsMAgsgASACIANBCHIgBUE4ahCKAUF/TARAQQAhAyAAQQhqBEAgAEEANgIMIABBFDYCCAsMAgsgA0EDdkEEcSADciIGQQRxIQcgBSkDUCEOIAUvAWghCQJAIANBIHFFIAUvAWpBAEdxIgtFDQAgBA0AIAAoAhwiBA0AQQAhAyAAQQhqBEAgAEEANgIMIABBGjYCCAsMAgsgBSkDWFAEQCAAQQBCAEEAEFIhAwwCCwJAIAdFIgwgCUEAR3EiDUEBckUEQEEAIQMgBUEAOwEwIAUgDjcDICAFIA43AxggBSAFKAJgNgIoIAVC3AA3AwAgASgCACAOIAVBACABIAIgAEEIahBeIgYNAQwDC0EAIQMgASACIAYgAEEIaiIGECYiB0UNAiABKAIAIAUpA1ggBUE4aiAHLwEMQQF2QQNxIAEgAiAGEF4iBkUNAgsCfyAGIAE2AiwCQCABKAJEIghBAWoiCiABKAJIIgdJBEAgASgCTCEHDAELIAEoAkwgB0EKaiIIQQJ0EDQiB0UEQCABQQhqBEAgAUEANgIMIAFBDjYCCAtBfwwCCyABIAc2AkwgASAINgJIIAEoAkQiCEEBaiEKCyABIAo2AkQgByAIQQJ0aiAGNgIAQQALQX9MBEAgBhALDAELAkAgC0UEQCAGIQEMAQtBJkEAIAUvAWpBAUYbIgFFBEAgAEEIagRAIABBADYCDCAAQRg2AggLDAMLIAAgBiAFLwFqQQAgBCABEQYAIQEgBhALIAFFDQILAkAgDUUEQCABIQMMAQsgACABIAUvAWgQgQEhAyABEAsgA0UNAQsCQCAJRSAMckUEQCADIQEMAQsgACADQQEQgAEhASADEAsgAUUNAQsgASEDDAELQQAhAwsgBUHwAGokACADC4UBAQF/IAFFBEAgAEEIaiIABEAgAEEANgIEIABBEjYCAAtBAA8LQTgQCSIDRQRAIABBCGoiAARAIABBADYCBCAAQQ42AgALQQAPCyADQQA2AhAgA0IANwIIIANCADcDKCADQQA2AgQgAyACNgIAIANCADcDGCADQQA2AjAgACABQTsgAxBCCw8AIAAgASACQQBBABCCAQusAgECfyABRQRAIABBCGoiAARAIABBADYCBCAAQRI2AgALQQAPCwJAIAJBfUsNACACQf//A3FBCEYNACAAQQhqIgAEQCAAQQA2AgQgAEEQNgIAC0EADwsCQEGwwAAQCSIFBEAgBUEANgIIIAVCADcCACAFQYiBAUGogQEgAxs2AqhAIAUgAjYCFCAFIAM6ABAgBUEAOgAPIAVBADsBDCAFIAMgAkF9SyIGcToADiAFQQggAiAGG0H//wNxIAQgBUGIgQFBqIEBIAMbKAIAEQAAIgI2AqxAIAINASAFEDEgBRAGCyAAQQhqIgAEQCAAQQA2AgQgAEEONgIAC0EADwsgACABQTogBRBCIgAEfyAABSAFKAKsQCAFKAKoQCgCBBEDACAFEDEgBRAGQQALC6ABAQF/IAIgACgCBCIDIAIgA0kbIgIEQCAAIAMgAms2AgQCQAJAAkACQCAAKAIcIgMoAhRBAWsOAgEAAgsgA0GgAWogASAAKAIAIAJB3IABKAIAEQgADAILIAAgACgCMCABIAAoAgAgAkHEgAEoAgARBAA2AjAMAQsgASAAKAIAIAIQBxoLIAAgACgCACACajYCACAAIAAoAgggAmo2AggLC7cCAQR/QX4hAgJAIABFDQAgACgCIEUNACAAKAIkIgRFDQAgACgCHCIBRQ0AIAEoAgAgAEcNAAJAAkAgASgCICIDQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyADQZoFRg0AIANBKkcNAQsCfwJ/An8gASgCBCICBEAgBCAAKAIoIAIQHiAAKAIcIQELIAEoAlAiAgsEQCAAKAIkIAAoAiggAhAeIAAoAhwhAQsgASgCTCICCwRAIAAoAiQgACgCKCACEB4gACgCHCEBCyABKAJIIgILBEAgACgCJCAAKAIoIAIQHiAAKAIcIQELIAAoAiQgACgCKCABEB4gAEEANgIcQX1BACADQfEARhshAgsgAgvrCQEIfyAAKAIwIgMgACgCDEEFayICIAIgA0sbIQggACgCACIEKAIEIQkgAUEERiEHAkADQCAEKAIQIgMgACgCoC5BKmpBA3UiAkkEQEEBIQYMAgsgCCADIAJrIgMgACgCaCAAKAJYayICIAQoAgRqIgVB//8DIAVB//8DSRsiBiADIAZJGyIDSwRAQQEhBiADQQBHIAdyRQ0CIAFFDQIgAyAFRw0CCyAAQQBBACAHIAMgBUZxIgUQOSAAIAAoAhBBBGsiBDYCECAAKAIEIARqIAM7AAAgACAAKAIQQQJqIgQ2AhAgACgCBCAEaiADQX9zOwAAIAAgACgCEEECajYCECAAKAIAEAoCfyACBEAgACgCACgCDCAAKAJIIAAoAlhqIAMgAiACIANLGyICEAcaIAAoAgAiBCAEKAIMIAJqNgIMIAQgBCgCECACazYCECAEIAQoAhQgAmo2AhQgACAAKAJYIAJqNgJYIAMgAmshAwsgAwsEQCAAKAIAIgIgAigCDCADEIMBIAAoAgAiAiACKAIMIANqNgIMIAIgAigCECADazYCECACIAIoAhQgA2o2AhQLIAAoAgAhBCAFRQ0AC0EAIQYLAkAgCSAEKAIEayICRQRAIAAoAmghAwwBCwJAIAAoAjAiAyACTQRAIABBAjYCgC4gACgCSCAEKAIAIANrIAMQBxogACAAKAIwIgM2AoQuIAAgAzYCaAwBCyACIAAoAkQgACgCaCIFa08EQCAAIAUgA2siBDYCaCAAKAJIIgUgAyAFaiAEEAcaIAAoAoAuIgNBAU0EQCAAIANBAWo2AoAuCyAAIAAoAmgiBSAAKAKELiIDIAMgBUsbNgKELiAAKAIAIQQLIAAoAkggBWogBCgCACACayACEAcaIAAgACgCaCACaiIDNgJoIAAgACgCMCAAKAKELiIEayIFIAIgAiAFSxsgBGo2AoQuCyAAIAM2AlgLIAAgAyAAKAJAIgIgAiADSRs2AkBBAyECAkAgBkUNACAAKAIAIgUoAgQhAgJAAkAgAUF7cUUNACACDQBBASECIAMgACgCWEYNAiAAKAJEIANrIQRBACECDAELIAIgACgCRCADayIETQ0AIAAoAlgiByAAKAIwIgZIDQAgACADIAZrIgM2AmggACAHIAZrNgJYIAAoAkgiAiACIAZqIAMQBxogACgCgC4iA0EBTQRAIAAgA0EBajYCgC4LIAAgACgCaCIDIAAoAoQuIgIgAiADSxs2AoQuIAAoAjAgBGohBCAAKAIAIgUoAgQhAgsCQCACIAQgAiAESRsiAkUEQCAAKAIwIQUMAQsgBSAAKAJIIANqIAIQgwEgACAAKAJoIAJqIgM2AmggACAAKAIwIgUgACgChC4iBGsiBiACIAIgBksbIARqNgKELgsgACADIAAoAkAiAiACIANJGzYCQCADIAAoAlgiBmsiAyAFIAAoAgwgACgCoC5BKmpBA3VrIgJB//8DIAJB//8DSRsiBCAEIAVLG0kEQEEAIQIgAUEERiADQQBHckUNASABRQ0BIAAoAgAoAgQNASADIARLDQELQQAhAiABQQRGBEAgACgCACgCBEUgAyAETXEhAgsgACAAKAJIIAZqIAQgAyADIARLGyIBIAIQOSAAIAAoAlggAWo2AlggACgCABAKQQJBACACGw8LIAIL/woCCn8DfiAAKQOYLiENIAAoAqAuIQQgAkEATgRAQQRBAyABLwECIggbIQlBB0GKASAIGyEFQX8hCgNAIAghByABIAsiDEEBaiILQQJ0ai8BAiEIAkACQCAGQQFqIgMgBU4NACAHIAhHDQAgAyEGDAELAkAgAyAJSARAIAAgB0ECdGoiBkHOFWohCSAGQcwVaiEKA0AgCjMBACEPAn8gBCAJLwEAIgZqIgVBP00EQCAPIASthiANhCENIAUMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIA03AAAgACAAKAIQQQhqNgIQIA8hDSAGDAELIAAoAgQgACgCEGogDyAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIA9BwAAgBGutiCENIAVBQGoLIQQgA0EBayIDDQALDAELIAcEQAJAIAcgCkYEQCANIQ8gBCEFIAMhBgwBCyAAIAdBAnRqIgNBzBVqMwEAIQ8gBCADQc4Vai8BACIDaiIFQT9NBEAgDyAErYYgDYQhDwwBCyAEQcAARgRAIAAoAgQgACgCEGogDTcAACAAIAAoAhBBCGo2AhAgAyEFDAELIAAoAgQgACgCEGogDyAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIAVBQGohBSAPQcAAIARrrYghDwsgADMBjBYhDgJAIAUgAC8BjhYiBGoiA0E/TQRAIA4gBa2GIA+EIQ4MAQsgBUHAAEYEQCAAKAIEIAAoAhBqIA83AAAgACAAKAIQQQhqNgIQIAQhAwwBCyAAKAIEIAAoAhBqIA4gBa2GIA+ENwAAIAAgACgCEEEIajYCECADQUBqIQMgDkHAACAFa62IIQ4LIAasQgN9IQ0gA0E9TQRAIANBAmohBCANIAOthiAOhCENDAILIANBwABGBEAgACgCBCAAKAIQaiAONwAAIAAgACgCEEEIajYCEEECIQQMAgsgACgCBCAAKAIQaiANIAOthiAOhDcAACAAIAAoAhBBCGo2AhAgA0E+ayEEIA1BwAAgA2utiCENDAELIAZBCUwEQCAAMwGQFiEOAkAgBCAALwGSFiIFaiIDQT9NBEAgDiAErYYgDYQhDgwBCyAEQcAARgRAIAAoAgQgACgCEGogDTcAACAAIAAoAhBBCGo2AhAgBSEDDAELIAAoAgQgACgCEGogDiAErYYgDYQ3AAAgACAAKAIQQQhqNgIQIANBQGohAyAOQcAAIARrrYghDgsgBqxCAn0hDSADQTxNBEAgA0EDaiEEIA0gA62GIA6EIQ0MAgsgA0HAAEYEQCAAKAIEIAAoAhBqIA43AAAgACAAKAIQQQhqNgIQQQMhBAwCCyAAKAIEIAAoAhBqIA0gA62GIA6ENwAAIAAgACgCEEEIajYCECADQT1rIQQgDUHAACADa62IIQ0MAQsgADMBlBYhDgJAIAQgAC8BlhYiBWoiA0E/TQRAIA4gBK2GIA2EIQ4MAQsgBEHAAEYEQCAAKAIEIAAoAhBqIA03AAAgACAAKAIQQQhqNgIQIAUhAwwBCyAAKAIEIAAoAhBqIA4gBK2GIA2ENwAAIAAgACgCEEEIajYCECADQUBqIQMgDkHAACAEa62IIQ4LIAatQgp9IQ0gA0E4TQRAIANBB2ohBCANIAOthiAOhCENDAELIANBwABGBEAgACgCBCAAKAIQaiAONwAAIAAgACgCEEEIajYCEEEHIQQMAQsgACgCBCAAKAIQaiANIAOthiAOhDcAACAAIAAoAhBBCGo2AhAgA0E5ayEEIA1BwAAgA2utiCENC0EAIQYCfyAIRQRAQYoBIQVBAwwBC0EGQQcgByAIRiIDGyEFQQNBBCADGwshCSAHIQoLIAIgDEcNAAsLIAAgBDYCoC4gACANNwOYLgv5BQIIfwJ+AkAgACgC8C1FBEAgACkDmC4hCyAAKAKgLiEDDAELA0AgCSIDQQNqIQkgAyAAKALsLWoiAy0AAiEFIAApA5guIQwgACgCoC4hBAJAIAMvAAAiB0UEQCABIAVBAnRqIgMzAQAhCyAEIAMvAQIiBWoiA0E/TQRAIAsgBK2GIAyEIQsMAgsgBEHAAEYEQCAAKAIEIAAoAhBqIAw3AAAgACAAKAIQQQhqNgIQIAUhAwwCCyAAKAIEIAAoAhBqIAsgBK2GIAyENwAAIAAgACgCEEEIajYCECADQUBqIQMgC0HAACAEa62IIQsMAQsgBUGAzwBqLQAAIghBAnQiBiABaiIDQYQIajMBACELIANBhghqLwEAIQMgCEEIa0ETTQRAIAUgBkGA0QBqKAIAa60gA62GIAuEIQsgBkHA0wBqKAIAIANqIQMLIAMgAiAHQQFrIgcgB0EHdkGAAmogB0GAAkkbQYDLAGotAAAiBUECdCIIaiIKLwECaiEGIAozAQAgA62GIAuEIQsgBCAFQQRJBH8gBgUgByAIQYDSAGooAgBrrSAGrYYgC4QhCyAIQcDUAGooAgAgBmoLIgVqIgNBP00EQCALIASthiAMhCELDAELIARBwABGBEAgACgCBCAAKAIQaiAMNwAAIAAgACgCEEEIajYCECAFIQMMAQsgACgCBCAAKAIQaiALIASthiAMhDcAACAAIAAoAhBBCGo2AhAgA0FAaiEDIAtBwAAgBGutiCELCyAAIAs3A5guIAAgAzYCoC4gCSAAKALwLUkNAAsLIAFBgAhqMwEAIQwCQCADIAFBgghqLwEAIgJqIgFBP00EQCAMIAOthiALhCEMDAELIANBwABGBEAgACgCBCAAKAIQaiALNwAAIAAgACgCEEEIajYCECACIQEMAQsgACgCBCAAKAIQaiAMIAOthiALhDcAACAAIAAoAhBBCGo2AhAgAUFAaiEBIAxBwAAgA2utiCEMCyAAIAw3A5guIAAgATYCoC4L8AQBA38gAEHkAWohAgNAIAIgAUECdCIDakEAOwEAIAIgA0EEcmpBADsBACABQQJqIgFBngJHDQALIABBADsBzBUgAEEAOwHYEyAAQZQWakEAOwEAIABBkBZqQQA7AQAgAEGMFmpBADsBACAAQYgWakEAOwEAIABBhBZqQQA7AQAgAEGAFmpBADsBACAAQfwVakEAOwEAIABB+BVqQQA7AQAgAEH0FWpBADsBACAAQfAVakEAOwEAIABB7BVqQQA7AQAgAEHoFWpBADsBACAAQeQVakEAOwEAIABB4BVqQQA7AQAgAEHcFWpBADsBACAAQdgVakEAOwEAIABB1BVqQQA7AQAgAEHQFWpBADsBACAAQcwUakEAOwEAIABByBRqQQA7AQAgAEHEFGpBADsBACAAQcAUakEAOwEAIABBvBRqQQA7AQAgAEG4FGpBADsBACAAQbQUakEAOwEAIABBsBRqQQA7AQAgAEGsFGpBADsBACAAQagUakEAOwEAIABBpBRqQQA7AQAgAEGgFGpBADsBACAAQZwUakEAOwEAIABBmBRqQQA7AQAgAEGUFGpBADsBACAAQZAUakEAOwEAIABBjBRqQQA7AQAgAEGIFGpBADsBACAAQYQUakEAOwEAIABBgBRqQQA7AQAgAEH8E2pBADsBACAAQfgTakEAOwEAIABB9BNqQQA7AQAgAEHwE2pBADsBACAAQewTakEAOwEAIABB6BNqQQA7AQAgAEHkE2pBADsBACAAQeATakEAOwEAIABB3BNqQQA7AQAgAEIANwL8LSAAQeQJakEBOwEAIABBADYC+C0gAEEANgLwLQuKAwIGfwR+QcgAEAkiBEUEQEEADwsgBEIANwMAIARCADcDMCAEQQA2AiggBEIANwMgIARCADcDGCAEQgA3AxAgBEIANwMIIARCADcDOCABUARAIARBCBAJIgA2AgQgAEUEQCAEEAYgAwRAIANBADYCBCADQQ42AgALQQAPCyAAQgA3AwAgBA8LAkAgAaciBUEEdBAJIgZFDQAgBCAGNgIAIAVBA3RBCGoQCSIFRQ0AIAQgATcDECAEIAU2AgQDQCAAIAynIghBBHRqIgcpAwgiDVBFBEAgBygCACIHRQRAIAMEQCADQQA2AgQgA0ESNgIACyAGEAYgBRAGIAQQBkEADwsgBiAKp0EEdGoiCSANNwMIIAkgBzYCACAFIAhBA3RqIAs3AwAgCyANfCELIApCAXwhCgsgDEIBfCIMIAFSDQALIAQgCjcDCCAEQgAgCiACGzcDGCAFIAqnQQN0aiALNwMAIAQgCzcDMCAEDwsgAwRAIANBADYCBCADQQ42AgALIAYQBiAEEAZBAAvlAQIDfwF+QX8hBQJAIAAgASACQQAQJiIERQ0AIAAgASACEIsBIgZFDQACfgJAIAJBCHENACAAKAJAIAGnQQR0aigCCCICRQ0AIAIgAxAhQQBOBEAgAykDAAwCCyAAQQhqIgAEQCAAQQA2AgQgAEEPNgIAC0F/DwsgAxAqIAMgBCgCGDYCLCADIAQpAyg3AxggAyAEKAIUNgIoIAMgBCkDIDcDICADIAQoAhA7ATAgAyAELwFSOwEyQvwBQtwBIAQtAAYbCyEHIAMgBjYCCCADIAE3AxAgAyAHQgOENwMAQQAhBQsgBQspAQF/IAAgASACIABBCGoiABAmIgNFBEBBAA8LIAMoAjBBACACIAAQJQuAAwEGfwJ/An9BMCABQYB/Sw0BGgJ/IAFBgH9PBEBBhIQBQTA2AgBBAAwBC0EAQRAgAUELakF4cSABQQtJGyIFQcwAahAJIgFFDQAaIAFBCGshAgJAIAFBP3FFBEAgAiEBDAELIAFBBGsiBigCACIHQXhxIAFBP2pBQHFBCGsiASABQUBrIAEgAmtBD0sbIgEgAmsiA2shBCAHQQNxRQRAIAIoAgAhAiABIAQ2AgQgASACIANqNgIADAELIAEgBCABKAIEQQFxckECcjYCBCABIARqIgQgBCgCBEEBcjYCBCAGIAMgBigCAEEBcXJBAnI2AgAgAiADaiIEIAQoAgRBAXI2AgQgAiADEDsLAkAgASgCBCICQQNxRQ0AIAJBeHEiAyAFQRBqTQ0AIAEgBSACQQFxckECcjYCBCABIAVqIgIgAyAFayIFQQNyNgIEIAEgA2oiAyADKAIEQQFyNgIEIAIgBRA7CyABQQhqCyIBRQsEQEEwDwsgACABNgIAQQALCwoAIABBiIQBEAQL6AIBBX8gACgCUCEBIAAvATAhBEEEIQUDQCABQQAgAS8BACICIARrIgMgAiADSRs7AQAgAUEAIAEvAQIiAiAEayIDIAIgA0kbOwECIAFBACABLwEEIgIgBGsiAyACIANJGzsBBCABQQAgAS8BBiICIARrIgMgAiADSRs7AQYgBUGAgARGRQRAIAFBCGohASAFQQRqIQUMAQsLAkAgBEUNACAEQQNxIQUgACgCTCEBIARBAWtBA08EQCAEIAVrIQADQCABQQAgAS8BACICIARrIgMgAiADSRs7AQAgAUEAIAEvAQIiAiAEayIDIAIgA0kbOwECIAFBACABLwEEIgIgBGsiAyACIANJGzsBBCABQQAgAS8BBiICIARrIgMgAiADSRs7AQYgAUEIaiEBIABBBGsiAA0ACwsgBUUNAANAIAFBACABLwEAIgAgBGsiAiAAIAJJGzsBACABQQJqIQEgBUEBayIFDQALCwuDAQEEfyACQQFOBEAgAiAAKAJIIAFqIgJqIQMgACgCUCEEA0AgBCACKAAAQbHz3fF5bEEPdkH+/wdxaiIFLwEAIgYgAUH//wNxRwRAIAAoAkwgASAAKAI4cUH//wNxQQF0aiAGOwEAIAUgATsBAAsgAUEBaiEBIAJBAWoiAiADSQ0ACwsLUAECfyABIAAoAlAgACgCSCABaigAAEGx893xeWxBD3ZB/v8HcWoiAy8BACICRwRAIAAoAkwgACgCOCABcUEBdGogAjsBACADIAE7AQALIAILugEBAX8jAEEQayICJAAgAkEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgARBYIAJBEGokAAu9AQEBfyMAQRBrIgEkACABQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgAEEANgJAIAFBEGokAEEAC70BAQF/IwBBEGsiASQAIAFBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAKAJAIQAgAUEQaiQAIAALvgEBAX8jAEEQayIEJAAgBEEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACIAMQVyAEQRBqJAALygEAIwBBEGsiAyQAIANBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAAoAkAgASACQdSAASgCABEAADYCQCADQRBqJAALwAEBAX8jAEEQayIDJAAgA0EAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACEF0hACADQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFwhACACQRBqJAAgAAu2AQEBfyMAQRBrIgAkACAAQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgAEEQaiQAQQgLwgEBAX8jAEEQayIEJAAgBEEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAgASACIAMQWSEAIARBEGokACAAC8IBAQF/IwBBEGsiBCQAIARBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEgAiADEFYhACAEQRBqJAAgAAsHACAALwEwC8ABAQF/IwBBEGsiAyQAIANBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEgAhBVIQAgA0EQaiQAIAALBwAgACgCQAsaACAAIAAoAkAgASACQdSAASgCABEAADYCQAsLACAAQQA2AkBBAAsHACAAKAIgCwQAQQgLzgUCA34BfyMAQYBAaiIIJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAEDhECAwwFAAEECAkJCQkJCQcJBgkLIANCCFoEfiACIAEoAmQ2AgAgAiABKAJoNgIEQggFQn8LIQYMCwsgARAGDAoLIAEoAhAiAgRAIAIgASkDGCABQeQAaiICEEEiA1ANCCABKQMIIgVCf4UgA1QEQCACBEAgAkEANgIEIAJBFTYCAAsMCQsgAUEANgIQIAEgAyAFfDcDCCABIAEpAwAgA3w3AwALIAEtAHgEQCABKQMAIQUMCQtCACEDIAEpAwAiBVAEQCABQgA3AyAMCgsDQCAAIAggBSADfSIFQoDAACAFQoDAAFQbEBEiB0J/VwRAIAFB5ABqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwJCyAHUEUEQCABKQMAIgUgAyAHfCIDWA0KDAELCyABQeQAagRAIAFBADYCaCABQRE2AmQLDAcLIAEpAwggASkDICIFfSIHIAMgAyAHVhsiA1ANCAJAIAEtAHhFDQAgACAFQQAQFEF/Sg0AIAFB5ABqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwHCyAAIAIgAxARIgZCf1cEQCABQeQAagRAIAFBADYCaCABQRE2AmQLDAcLIAEgASkDICAGfCIDNwMgIAZCAFINCEIAIQYgAyABKQMIWg0IIAFB5ABqBEAgAUEANgJoIAFBETYCZAsMBgsgASkDICABKQMAIgV9IAEpAwggBX0gAiADIAFB5ABqEEQiA0IAUw0FIAEgASkDACADfDcDIAwHCyACIAFBKGoQYEEfdawhBgwGCyABMABgIQYMBQsgASkDcCEGDAQLIAEpAyAgASkDAH0hBgwDCyABQeQAagRAIAFBADYCaCABQRw2AmQLC0J/IQYMAQsgASAFNwMgCyAIQYBAayQAIAYLBwAgACgCAAsPACAAIAAoAjBBAWo2AjALGABB+IMBQgA3AgBBgIQBQQA2AgBB+IMBCwcAIABBDGoLBwAgACgCLAsHACAAKAIoCwcAIAAoAhgLFQAgACABrSACrUIghoQgAyAEEIoBCxMBAX4gABAzIgFCIIinEAAgAacLbwEBfiABrSACrUIghoQhBSMAQRBrIgEkAAJ/IABFBEAgBVBFBEAgBARAIARBADYCBCAEQRI2AgALQQAMAgtBAEIAIAMgBBA6DAELIAEgBTcDCCABIAA2AgAgAUIBIAMgBBA6CyEAIAFBEGokACAACxQAIAAgASACrSADrUIghoQgBBBSC9oCAgJ/AX4CfyABrSACrUIghoQiByAAKQMwVEEAIARBCkkbRQRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0F/DAELIAAtABhBAnEEQCAAQQhqBEAgAEEANgIMIABBGTYCCAtBfwwBCyADBH8gA0H//wNxQQhGIANBfUtyBUEBC0UEQCAAQQhqBEAgAEEANgIMIABBEDYCCAtBfwwBCyAAKAJAIgEgB6ciBUEEdGooAgAiAgR/IAIoAhAgA0YFIANBf0YLIQYgASAFQQR0aiIBIQUgASgCBCEBAkAgBgRAIAFFDQEgAUEAOwFQIAEgASgCAEF+cSIANgIAIAANASABECAgBUEANgIEQQAMAgsCQCABDQAgBSACECsiATYCBCABDQAgAEEIagRAIABBADYCDCAAQQ42AggLQX8MAgsgASAEOwFQIAEgAzYCECABIAEoAgBBAXI2AgALQQALCxwBAX4gACABIAIgAEEIahBMIgNCIIinEAAgA6cLHwEBfiAAIAEgAq0gA61CIIaEEBEiBEIgiKcQACAEpwteAQF+An5CfyAARQ0AGiAAKQMwIgIgAUEIcUUNABpCACACUA0AGiAAKAJAIQADQCACIAKnQQR0IABqQRBrKAIADQEaIAJCAX0iAkIAUg0AC0IACyICQiCIpxAAIAKnCxMAIAAgAa0gAq1CIIaEIAMQiwELnwEBAn4CfiACrSADrUIghoQhBUJ/IQQCQCAARQ0AIAAoAgQNACAAQQRqIQIgBUJ/VwRAIAIEQCACQQA2AgQgAkESNgIAC0J/DAILQgAhBCAALQAQDQAgBVANACAAKAIUIAEgBRARIgRCf1UNACAAKAIUIQAgAgRAIAIgACgCDDYCACACIAAoAhA2AgQLQn8hBAsgBAsiBEIgiKcQACAEpwueAQEBfwJ/IAAgACABrSACrUIghoQgAyAAKAIcEH8iAQRAIAEQMkF/TARAIABBCGoEQCAAIAEoAgw2AgggACABKAIQNgIMCyABEAtBAAwCC0EYEAkiBEUEQCAAQQhqBEAgAEEANgIMIABBDjYCCAsgARALQQAMAgsgBCAANgIAIARBADYCDCAEQgA3AgQgBCABNgIUIARBADoAEAsgBAsLsQICAX8BfgJ/QX8hBAJAIAAgAa0gAq1CIIaEIgZBAEEAECZFDQAgAC0AGEECcQRAIABBCGoEQCAAQQA2AgwgAEEZNgIIC0F/DAILIAAoAkAiASAGpyICQQR0aiIEKAIIIgUEQEEAIQQgBSADEHFBf0oNASAAQQhqBEAgAEEANgIMIABBDzYCCAtBfwwCCwJAIAQoAgAiBQRAIAUoAhQgA0YNAQsCQCABIAJBBHRqIgEoAgQiBA0AIAEgBRArIgQ2AgQgBA0AIABBCGoEQCAAQQA2AgwgAEEONgIIC0F/DAMLIAQgAzYCFCAEIAQoAgBBIHI2AgBBAAwCC0EAIQQgASACQQR0aiIBKAIEIgBFDQAgACAAKAIAQV9xIgI2AgAgAg0AIAAQICABQQA2AgQLIAQLCxQAIAAgAa0gAq1CIIaEIAQgBRBzCxIAIAAgAa0gAq1CIIaEIAMQFAtBAQF+An4gAUEAIAIbRQRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0J/DAELIAAgASACIAMQdAsiBEIgiKcQACAEpwvGAwIFfwF+An4CQAJAIAAiBC0AGEECcQRAIARBCGoEQCAEQQA2AgwgBEEZNgIICwwBCyABRQRAIARBCGoEQCAEQQA2AgwgBEESNgIICwwBCyABECIiByABakEBay0AAEEvRwRAIAdBAmoQCSIARQRAIARBCGoEQCAEQQA2AgwgBEEONgIICwwCCwJAAkAgACIGIAEiBXNBA3ENACAFQQNxBEADQCAGIAUtAAAiAzoAACADRQ0DIAZBAWohBiAFQQFqIgVBA3ENAAsLIAUoAgAiA0F/cyADQYGChAhrcUGAgYKEeHENAANAIAYgAzYCACAFKAIEIQMgBkEEaiEGIAVBBGohBSADQYGChAhrIANBf3NxQYCBgoR4cUUNAAsLIAYgBS0AACIDOgAAIANFDQADQCAGIAUtAAEiAzoAASAGQQFqIQYgBUEBaiEFIAMNAAsLIAcgACIDakEvOwAACyAEQQBCAEEAEFIiAEUEQCADEAYMAQsgBCADIAEgAxsgACACEHQhCCADEAYgCEJ/VwRAIAAQCyAIDAMLIAQgCEEDQYCA/I8EEHNBf0oNASAEIAgQchoLQn8hCAsgCAsiCEIgiKcQACAIpwsQACAAIAGtIAKtQiCGhBByCxYAIAAgAa0gAq1CIIaEIAMgBCAFEGYL3iMDD38IfgF8IwBB8ABrIgkkAAJAIAFBAE5BACAAG0UEQCACBEAgAkEANgIEIAJBEjYCAAsMAQsgACkDGCISAn5BsIMBKQMAIhNCf1EEQCAJQoOAgIBwNwMwIAlChoCAgPAANwMoIAlCgYCAgCA3AyBBsIMBQQAgCUEgahAkNwMAIAlCj4CAgHA3AxAgCUKJgICAoAE3AwAgCUKMgICA0AE3AwhBuIMBQQggCRAkNwMAQbCDASkDACETCyATC4MgE1IEQCACBEAgAkEANgIEIAJBHDYCAAsMAQsgASABQRByQbiDASkDACITIBKDIBNRGyIKQRhxQRhGBEAgAgRAIAJBADYCBCACQRk2AgALDAELIAlBOGoQKgJAIAAgCUE4ahAhBEACQCAAKAIMQQVGBEAgACgCEEEsRg0BCyACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAgsgCkEBcUUEQCACBEAgAkEANgIEIAJBCTYCAAsMAwsgAhBJIgVFDQEgBSAKNgIEIAUgADYCACAKQRBxRQ0CIAUgBSgCFEECcjYCFCAFIAUoAhhBAnI2AhgMAgsgCkECcQRAIAIEQCACQQA2AgQgAkEKNgIACwwCCyAAEDJBf0wEQCACBEAgAiAAKAIMNgIAIAIgACgCEDYCBAsMAQsCfyAKQQhxBEACQCACEEkiAUUNACABIAo2AgQgASAANgIAIApBEHFFDQAgASABKAIUQQJyNgIUIAEgASgCGEECcjYCGAsgAQwBCyMAQUBqIg4kACAOQQhqECoCQCAAIA5BCGoQIUF/TARAIAIEQCACIAAoAgw2AgAgAiAAKAIQNgIECwwBCyAOLQAIQQRxRQRAIAIEQCACQYoBNgIEIAJBBDYCAAsMAQsgDikDICETIAIQSSIFRQRAQQAhBQwBCyAFIAo2AgQgBSAANgIAIApBEHEEQCAFIAUoAhRBAnI2AhQgBSAFKAIYQQJyNgIYCwJAAkACQCATUARAAn8gACEBAkADQCABKQMYQoCAEINCAFINASABKAIAIgENAAtBAQwBCyABQQBCAEESEA6nCw0EIAVBCGoEQCAFQQA2AgwgBUETNgIICwwBCyMAQdAAayIBJAACQCATQhVYBEAgBUEIagRAIAVBADYCDCAFQRM2AggLDAELAkACQCAFKAIAQgAgE0KqgAQgE0KqgARUGyISfUECEBRBf0oNACAFKAIAIgMoAgxBBEYEQCADKAIQQRZGDQELIAVBCGoEQCAFIAMoAgw2AgggBSADKAIQNgIMCwwBCyAFKAIAEDMiE0J/VwRAIAUoAgAhAyAFQQhqIggEQCAIIAMoAgw2AgAgCCADKAIQNgIECwwBCyAFKAIAIBJBACAFQQhqIg8QLSIERQ0BIBJCqoAEWgRAAkAgBCkDCEIUVARAIARBADoAAAwBCyAEQhQ3AxAgBEEBOgAACwsgAQRAIAFBADYCBCABQRM2AgALIARCABATIQwCQCAELQAABH4gBCkDCCAEKQMQfQVCAAunIgdBEmtBA0sEQEJ/IRcDQCAMQQFrIQMgByAMakEVayEGAkADQCADQQFqIgNB0AAgBiADaxB6IgNFDQEgA0EBaiIMQZ8SQQMQPQ0ACwJAIAMgBCgCBGusIhIgBCkDCFYEQCAEQQA6AAAMAQsgBCASNwMQIARBAToAAAsgBC0AAAR+IAQpAxAFQgALIRICQCAELQAABH4gBCkDCCAEKQMQfQVCAAtCFVgEQCABBEAgAUEANgIEIAFBEzYCAAsMAQsgBEIEEBMoAABB0JaVMEcEQCABBEAgAUEANgIEIAFBEzYCAAsMAQsCQAJAAkAgEkIUVA0AIAQoAgQgEqdqQRRrKAAAQdCWmThHDQACQCASQhR9IhQgBCIDKQMIVgRAIANBADoAAAwBCyADIBQ3AxAgA0EBOgAACyAFKAIUIRAgBSgCACEGIAMtAAAEfiAEKQMQBUIACyEWIARCBBATGiAEEAwhCyAEEAwhDSAEEB0iFEJ/VwRAIAEEQCABQRY2AgQgAUEENgIACwwECyAUQjh8IhUgEyAWfCIWVgRAIAEEQCABQQA2AgQgAUEVNgIACwwECwJAAkAgEyAUVg0AIBUgEyAEKQMIfFYNAAJAIBQgE30iFSAEKQMIVgRAIANBADoAAAwBCyADIBU3AxAgA0EBOgAAC0EAIQcMAQsgBiAUQQAQFEF/TARAIAEEQCABIAYoAgw2AgAgASAGKAIQNgIECwwFC0EBIQcgBkI4IAFBEGogARAtIgNFDQQLIANCBBATKAAAQdCWmTBHBEAgAQRAIAFBADYCBCABQRU2AgALIAdFDQQgAxAIDAQLIAMQHSEVAkAgEEEEcSIGRQ0AIBQgFXxCDHwgFlENACABBEAgAUEANgIEIAFBFTYCAAsgB0UNBCADEAgMBAsgA0IEEBMaIAMQFSIQIAsgC0H//wNGGyELIAMQFSIRIA0gDUH//wNGGyENAkAgBkUNACANIBFGQQAgCyAQRhsNACABBEAgAUEANgIEIAFBFTYCAAsgB0UNBCADEAgMBAsgCyANcgRAIAEEQCABQQA2AgQgAUEBNgIACyAHRQ0EIAMQCAwECyADEB0iGCADEB1SBEAgAQRAIAFBADYCBCABQQE2AgALIAdFDQQgAxAIDAQLIAMQHSEVIAMQHSEWIAMtAABFBEAgAQRAIAFBADYCBCABQRQ2AgALIAdFDQQgAxAIDAQLIAcEQCADEAgLAkAgFkIAWQRAIBUgFnwiGSAWWg0BCyABBEAgAUEWNgIEIAFBBDYCAAsMBAsgEyAUfCIUIBlUBEAgAQRAIAFBADYCBCABQRU2AgALDAQLAkAgBkUNACAUIBlRDQAgAQRAIAFBADYCBCABQRU2AgALDAQLIBggFUIugFgNASABBEAgAUEANgIEIAFBFTYCAAsMAwsCQCASIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAUoAhQhAyAELQAABH4gBCkDCCAEKQMQfQVCAAtCFVgEQCABBEAgAUEANgIEIAFBFTYCAAsMAwsgBC0AAAR+IAQpAxAFQgALIRQgBEIEEBMaIAQQFQRAIAEEQCABQQA2AgQgAUEBNgIACwwDCyAEEAwgBBAMIgZHBEAgAQRAIAFBADYCBCABQRM2AgALDAMLIAQQFSEHIAQQFa0iFiAHrSIVfCIYIBMgFHwiFFYEQCABBEAgAUEANgIEIAFBFTYCAAsMAwsCQCADQQRxRQ0AIBQgGFENACABBEAgAUEANgIEIAFBFTYCAAsMAwsgBq0gARBqIgNFDQIgAyAWNwMgIAMgFTcDGCADQQA6ACwMAQsgGCABEGoiA0UNASADIBY3AyAgAyAVNwMYIANBAToALAsCQCASQhR8IhQgBCkDCFYEQCAEQQA6AAAMAQsgBCAUNwMQIARBAToAAAsgBBAMIQYCQCADKQMYIAMpAyB8IBIgE3xWDQACQCAGRQRAIAUtAARBBHFFDQELAkAgEkIWfCISIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAQtAAAEfiAEKQMIIAQpAxB9BUIACyIUIAatIhJUDQEgBS0ABEEEcUEAIBIgFFIbDQEgBkUNACADIAQgEhATIAZBACABEDUiBjYCKCAGDQAgAxAWDAILAkAgEyADKQMgIhJYBEACQCASIBN9IhIgBCkDCFYEQCAEQQA6AAAMAQsgBCASNwMQIARBAToAAAsgBCADKQMYEBMiBkUNAiAGIAMpAxgQFyIHDQEgAQRAIAFBADYCBCABQQ42AgALIAMQFgwDCyAFKAIAIBJBABAUIQcgBSgCACEGIAdBf0wEQCABBEAgASAGKAIMNgIAIAEgBigCEDYCBAsgAxAWDAMLQQAhByAGEDMgAykDIFENACABBEAgAUEANgIEIAFBEzYCAAsgAxAWDAILQgAhFAJAAkAgAykDGCIWUEUEQANAIBQgAykDCFIiC0UEQCADLQAsDQMgFkIuVA0DAn8CQCADKQMQIhVCgIAEfCISIBVaQQAgEkKAgICAAVQbRQ0AIAMoAgAgEqdBBHQQNCIGRQ0AIAMgBjYCAAJAIAMpAwgiFSASWg0AIAYgFadBBHRqIgZCADcCACAGQgA3AAUgFUIBfCIVIBJRDQADQCADKAIAIBWnQQR0aiIGQgA3AgAgBkIANwAFIBVCAXwiFSASUg0ACwsgAyASNwMIIAMgEjcDEEEBDAELIAEEQCABQQA2AgQgAUEONgIAC0EAC0UNBAtB2AAQCSIGBH8gBkIANwMgIAZBADYCGCAGQv////8PNwMQIAZBADsBDCAGQb+GKDYCCCAGQQE6AAYgBkEAOwEEIAZBADYCACAGQgA3A0ggBkGAgNiNeDYCRCAGQgA3AyggBkIANwMwIAZCADcDOCAGQUBrQQA7AQAgBkIANwNQIAYFQQALIQYgAygCACAUp0EEdGogBjYCAAJAIAYEQCAGIAUoAgAgB0EAIAEQaCISQn9VDQELIAsNBCABKAIAQRNHDQQgAQRAIAFBADYCBCABQRU2AgALDAQLIBRCAXwhFCAWIBJ9IhZCAFINAAsLIBQgAykDCFINAAJAIAUtAARBBHFFDQAgBwRAIActAAAEfyAHKQMQIAcpAwhRBUEAC0UNAgwBCyAFKAIAEDMiEkJ/VwRAIAUoAgAhBiABBEAgASAGKAIMNgIAIAEgBigCEDYCBAsgAxAWDAULIBIgAykDGCADKQMgfFINAQsgBxAIAn4gCARAAn8gF0IAVwRAIAUgCCABEEghFwsgBSADIAEQSCISIBdVCwRAIAgQFiASDAILIAMQFgwFC0IAIAUtAARBBHFFDQAaIAUgAyABEEgLIRcgAyEIDAMLIAEEQCABQQA2AgQgAUEVNgIACyAHEAggAxAWDAILIAMQFiAHEAgMAQsgAQRAIAFBADYCBCABQRU2AgALIAMQFgsCQCAMIAQoAgRrrCISIAQpAwhWBEAgBEEAOgAADAELIAQgEjcDECAEQQE6AAALIAQtAAAEfiAEKQMIIAQpAxB9BUIAC6ciB0ESa0EDSw0BCwsgBBAIIBdCf1UNAwwBCyAEEAgLIA8iAwRAIAMgASgCADYCACADIAEoAgQ2AgQLIAgQFgtBACEICyABQdAAaiQAIAgNAQsgAgRAIAIgBSgCCDYCACACIAUoAgw2AgQLDAELIAUgCCgCADYCQCAFIAgpAwg3AzAgBSAIKQMQNwM4IAUgCCgCKDYCICAIEAYgBSgCUCEIIAVBCGoiBCEBQQAhBwJAIAUpAzAiE1ANAEGAgICAeCEGAn8gE7pEAAAAAAAA6D+jRAAA4P///+9BpCIaRAAAAAAAAPBBYyAaRAAAAAAAAAAAZnEEQCAaqwwBC0EACyIDQYCAgIB4TQRAIANBAWsiA0EBdiADciIDQQJ2IANyIgNBBHYgA3IiA0EIdiADciIDQRB2IANyQQFqIQYLIAYgCCgCACIMTQ0AIAYQPCILRQRAIAEEQCABQQA2AgQgAUEONgIACwwBCwJAIAgpAwhCACAMG1AEQCAIKAIQIQ8MAQsgCCgCECEPA0AgDyAHQQJ0aigCACIBBEADQCABKAIYIQMgASALIAEoAhwgBnBBAnRqIg0oAgA2AhggDSABNgIAIAMiAQ0ACwsgB0EBaiIHIAxHDQALCyAPEAYgCCAGNgIAIAggCzYCEAsCQCAFKQMwUA0AQgAhEwJAIApBBHFFBEADQCAFKAJAIBOnQQR0aigCACgCMEEAQQAgAhAlIgFFDQQgBSgCUCABIBNBCCAEEE1FBEAgBCgCAEEKRw0DCyATQgF8IhMgBSkDMFQNAAwDCwALA0AgBSgCQCATp0EEdGooAgAoAjBBAEEAIAIQJSIBRQ0DIAUoAlAgASATQQggBBBNRQ0BIBNCAXwiEyAFKQMwVA0ACwwBCyACBEAgAiAEKAIANgIAIAIgBCgCBDYCBAsMAQsgBSAFKAIUNgIYDAELIAAgACgCMEEBajYCMCAFEEtBACEFCyAOQUBrJAAgBQsiBQ0BIAAQGhoLQQAhBQsgCUHwAGokACAFCxAAIwAgAGtBcHEiACQAIAALBgAgACQACwQAIwAL4CoDEX8IfgN8IwBBwMAAayIHJABBfyECAkAgAEUNAAJ/IAAtAChFBEBBACAAKAIYIAAoAhRGDQEaC0EBCyEBAkACQCAAKQMwIhRQRQRAIAAoAkAhCgNAIAogEqdBBHRqIgMtAAwhCwJAAkAgAygCCA0AIAsNACADKAIEIgNFDQEgAygCAEUNAQtBASEBCyAXIAtBAXOtQv8Bg3whFyASQgF8IhIgFFINAAsgF0IAUg0BCyAAKAIEQQhxIAFyRQ0BAn8gACgCACIDKAIkIgFBA0cEQCADKAIgBH9BfyADEBpBAEgNAhogAygCJAUgAQsEQCADEEMLQX8gA0EAQgBBDxAOQgBTDQEaIANBAzYCJAtBAAtBf0oNASAAKAIAKAIMQRZGBEAgACgCACgCEEEsRg0CCyAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLDAILIAFFDQAgFCAXVARAIABBCGoEQCAAQQA2AgwgAEEUNgIICwwCCyAXp0EDdBAJIgtFDQFCfyEWQgAhEgNAAkAgCiASp0EEdGoiBigCACIDRQ0AAkAgBigCCA0AIAYtAAwNACAGKAIEIgFFDQEgASgCAEUNAQsgFiADKQNIIhMgEyAWVhshFgsgBi0ADEUEQCAXIBlYBEAgCxAGIABBCGoEQCAAQQA2AgwgAEEUNgIICwwECyALIBmnQQN0aiASNwMAIBlCAXwhGQsgEkIBfCISIBRSDQALIBcgGVYEQCALEAYgAEEIagRAIABBADYCDCAAQRQ2AggLDAILAkACQCAAKAIAKQMYQoCACINQDQACQAJAIBZCf1INACAAKQMwIhNQDQIgE0IBgyEVIAAoAkAhAwJAIBNCAVEEQEJ/IRRCACESQgAhFgwBCyATQn6DIRlCfyEUQgAhEkIAIRYDQCADIBKnQQR0aigCACIBBEAgFiABKQNIIhMgEyAWVCIBGyEWIBQgEiABGyEUCyADIBJCAYQiGKdBBHRqKAIAIgEEQCAWIAEpA0giEyATIBZUIgEbIRYgFCAYIAEbIRQLIBJCAnwhEiAZQgJ9IhlQRQ0ACwsCQCAVUA0AIAMgEqdBBHRqKAIAIgFFDQAgFiABKQNIIhMgEyAWVCIBGyEWIBQgEiABGyEUCyAUQn9RDQBCACETIwBBEGsiBiQAAkAgACAUIABBCGoiCBBBIhVQDQAgFSAAKAJAIBSnQQR0aigCACIKKQMgIhh8IhQgGFpBACAUQn9VG0UEQCAIBEAgCEEWNgIEIAhBBDYCAAsMAQsgCi0ADEEIcUUEQCAUIRMMAQsgACgCACAUQQAQFCEBIAAoAgAhAyABQX9MBEAgCARAIAggAygCDDYCACAIIAMoAhA2AgQLDAELIAMgBkEMakIEEBFCBFIEQCAAKAIAIQEgCARAIAggASgCDDYCACAIIAEoAhA2AgQLDAELIBRCBHwgFCAGKAAMQdCWncAARhtCFEIMAn9BASEBAkAgCikDKEL+////D1YNACAKKQMgQv7///8PVg0AQQAhAQsgAQsbfCIUQn9XBEAgCARAIAhBFjYCBCAIQQQ2AgALDAELIBQhEwsgBkEQaiQAIBMiFkIAUg0BIAsQBgwFCyAWUA0BCwJ/IAAoAgAiASgCJEEBRgRAIAFBDGoEQCABQQA2AhAgAUESNgIMC0F/DAELQX8gAUEAIBZBERAOQgBTDQAaIAFBATYCJEEAC0F/Sg0BC0IAIRYCfyAAKAIAIgEoAiRBAUYEQCABQQxqBEAgAUEANgIQIAFBEjYCDAtBfwwBC0F/IAFBAEIAQQgQDkIAUw0AGiABQQE2AiRBAAtBf0oNACAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLIAsQBgwCCyAAKAJUIgIEQCACQgA3AxggAigCAEQAAAAAAAAAACACKAIMIAIoAgQRDgALIABBCGohBCAXuiEcQgAhFAJAAkACQANAIBcgFCITUgRAIBO6IByjIRsgE0IBfCIUuiAcoyEaAkAgACgCVCICRQ0AIAIgGjkDKCACIBs5AyAgAisDECAaIBuhRAAAAAAAAAAAoiAboCIaIAIrAxihY0UNACACKAIAIBogAigCDCACKAIEEQ4AIAIgGjkDGAsCfwJAIAAoAkAgCyATp0EDdGopAwAiE6dBBHRqIg0oAgAiAQRAIAEpA0ggFlQNAQsgDSgCBCEFAkACfwJAIA0oAggiAkUEQCAFRQ0BQQEgBSgCACICQQFxDQIaIAJBwABxQQZ2DAILQQEgBQ0BGgsgDSABECsiBTYCBCAFRQ0BIAJBAEcLIQZBACEJIwBBEGsiDCQAAkAgEyAAKQMwWgRAIABBCGoEQCAAQQA2AgwgAEESNgIIC0F/IQkMAQsgACgCQCIKIBOnIgNBBHRqIg8oAgAiAkUNACACLQAEDQACQCACKQNIQhp8IhhCf1cEQCAAQQhqBEAgAEEWNgIMIABBBDYCCAsMAQtBfyEJIAAoAgAgGEEAEBRBf0wEQCAAKAIAIQIgAEEIagRAIAAgAigCDDYCCCAAIAIoAhA2AgwLDAILIAAoAgBCBCAMQQxqIABBCGoiDhAtIhBFDQEgEBAMIQEgEBAMIQggEC0AAAR/IBApAxAgECkDCFEFQQALIQIgEBAIIAJFBEAgDgRAIA5BADYCBCAOQRQ2AgALDAILAkAgCEUNACAAKAIAIAGtQQEQFEF/TARAQYSEASgCACECIA4EQCAOIAI2AgQgDkEENgIACwwDC0EAIAAoAgAgCEEAIA4QRSIBRQ0BIAEgCEGAAiAMQQhqIA4QbiECIAEQBiACRQ0BIAwoAggiAkUNACAMIAIQbSICNgIIIA8oAgAoAjQgAhBvIQIgDygCACACNgI0CyAPKAIAIgJBAToABEEAIQkgCiADQQR0aigCBCIBRQ0BIAEtAAQNASACKAI0IQIgAUEBOgAEIAEgAjYCNAwBC0F/IQkLIAxBEGokACAJQQBIDQUgACgCABAfIhhCAFMNBSAFIBg3A0ggBgRAQQAhDCANKAIIIg0hASANRQRAIAAgACATQQhBABB/IgwhASAMRQ0HCwJAAkAgASAHQQhqECFBf0wEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsMAQsgBykDCCISQsAAg1AEQCAHQQA7ATggByASQsAAhCISNwMICwJAAkAgBSgCECICQX5PBEAgBy8BOCIDRQ0BIAUgAzYCECADIQIMAgsgAg0AIBJCBINQDQAgByAHKQMgNwMoIAcgEkIIhCISNwMIQQAhAgwBCyAHIBJC9////w+DIhI3AwgLIBJCgAGDUARAIAdBADsBOiAHIBJCgAGEIhI3AwgLAn8gEkIEg1AEQEJ/IRVBgAoMAQsgBSAHKQMgIhU3AyggEkIIg1AEQAJAAkACQAJAQQggAiACQX1LG0H//wNxDg0CAwMDAwMDAwEDAwMAAwtBgApBgAIgFUKUwuTzD1YbDAQLQYAKQYACIBVCg4Ow/w9WGwwDC0GACkGAAiAVQv////8PVhsMAgtBgApBgAIgFUIAUhsMAQsgBSAHKQMoNwMgQYACCyEPIAAoAgAQHyITQn9XBEAgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwBCyAFIAUvAQxB9/8DcTsBDCAAIAUgDxA3IgpBAEgNACAHLwE4IghBCCAFKAIQIgMgA0F9SxtB//8DcSICRyEGAkACQAJAAkACQAJAAkAgAiAIRwRAIANBAEchAwwBC0EAIQMgBS0AAEGAAXFFDQELIAUvAVIhCSAHLwE6IQIMAQsgBS8BUiIJIAcvAToiAkYNAQsgASABKAIwQQFqNgIwIAJB//8DcQ0BIAEhAgwCCyABIAEoAjBBAWo2AjBBACEJDAILQSZBACAHLwE6QQFGGyICRQRAIAQEQCAEQQA2AgQgBEEYNgIACyABEAsMAwsgACABIAcvATpBACAAKAIcIAIRBgAhAiABEAsgAkUNAgsgCUEARyEJIAhBAEcgBnFFBEAgAiEBDAELIAAgAiAHLwE4EIEBIQEgAhALIAFFDQELAkAgCEUgBnJFBEAgASECDAELIAAgAUEAEIABIQIgARALIAJFDQELAkAgA0UEQCACIQMMAQsgACACIAUoAhBBASAFLwFQEIIBIQMgAhALIANFDQELAkAgCUUEQCADIQEMAQsgBSgCVCIBRQRAIAAoAhwhAQsCfyAFLwFSGkEBCwRAIAQEQCAEQQA2AgQgBEEYNgIACyADEAsMAgsgACADIAUvAVJBASABQQARBgAhASADEAsgAUUNAQsgACgCABAfIhhCf1cEQCAAKAIAIQIgBARAIAQgAigCDDYCACAEIAIoAhA2AgQLDAELAkAgARAyQQBOBEACfwJAAkAgASAHQUBrQoDAABARIhJCAVMNAEIAIRkgFUIAVQRAIBW5IRoDQCAAIAdBQGsgEhAbQQBIDQMCQCASQoDAAFINACAAKAJUIgJFDQAgAiAZQoBAfSIZuSAaoxB7CyABIAdBQGtCgMAAEBEiEkIAVQ0ACwwBCwNAIAAgB0FAayASEBtBAEgNAiABIAdBQGtCgMAAEBEiEkIAVQ0ACwtBACASQn9VDQEaIAQEQCAEIAEoAgw2AgAgBCABKAIQNgIECwtBfwshAiABEBoaDAELIAQEQCAEIAEoAgw2AgAgBCABKAIQNgIEC0F/IQILIAEgB0EIahAhQX9MBEAgBARAIAQgASgCDDYCACAEIAEoAhA2AgQLQX8hAgsCf0EAIQkCQCABIgNFDQADQCADLQAaQQFxBEBB/wEhCSADQQBCAEEQEA4iFUIAUw0CIBVCBFkEQCADQQxqBEAgA0EANgIQIANBFDYCDAsMAwsgFachCQwCCyADKAIAIgMNAAsLIAlBGHRBGHUiA0F/TAsEQCAEBEAgBCABKAIMNgIAIAQgASgCEDYCBAsgARALDAELIAEQCyACQQBIDQAgACgCABAfIRUgACgCACECIBVCf1cEQCAEBEAgBCACKAIMNgIAIAQgAigCEDYCBAsMAQsgAiATEHVBf0wEQCAAKAIAIQIgBARAIAQgAigCDDYCACAEIAIoAhA2AgQLDAELIAcpAwgiE0LkAINC5ABSBEAgBARAIARBADYCBCAEQRQ2AgALDAELAkAgBS0AAEEgcQ0AIBNCEINQRQRAIAUgBygCMDYCFAwBCyAFQRRqEAEaCyAFIAcvATg2AhAgBSAHKAI0NgIYIAcpAyAhEyAFIBUgGH03AyAgBSATNwMoIAUgBS8BDEH5/wNxIANB/wFxQQF0cjsBDCAPQQp2IQNBPyEBAkACQAJAAkAgBSgCECICQQxrDgMAAQIBCyAFQS47AQoMAgtBLSEBIAMNACAFKQMoQv7///8PVg0AIAUpAyBC/v///w9WDQBBFCEBIAJBCEYNACAFLwFSQQFGDQAgBSgCMCICBH8gAi8BBAVBAAtB//8DcSICBEAgAiAFKAIwKAIAakEBay0AAEEvRg0BC0EKIQELIAUgATsBCgsgACAFIA8QNyICQQBIDQAgAiAKRwRAIAQEQCAEQQA2AgQgBEEUNgIACwwBCyAAKAIAIBUQdUF/Sg0BIAAoAgAhAiAEBEAgBCACKAIMNgIAIAQgAigCEDYCBAsLIA0NByAMEAsMBwsgDQ0CIAwQCwwCCyAFIAUvAQxB9/8DcTsBDCAAIAVBgAIQN0EASA0FIAAgEyAEEEEiE1ANBSAAKAIAIBNBABAUQX9MBEAgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwGCyAFKQMgIRIjAEGAQGoiAyQAAkAgElBFBEAgAEEIaiECIBK6IRoDQEF/IQEgACgCACADIBJCgMAAIBJCgMAAVBsiEyACEGVBAEgNAiAAIAMgExAbQQBIDQIgACgCVCAaIBIgE30iErqhIBqjEHsgEkIAUg0ACwtBACEBCyADQYBAayQAIAFBf0oNAUEBIREgAUEcdkEIcUEIRgwCCyAEBEAgBEEANgIEIARBDjYCAAsMBAtBAAtFDQELCyARDQBBfyECAkAgACgCABAfQgBTDQAgFyEUQQAhCkIAIRcjAEHwAGsiESQAAkAgACgCABAfIhVCAFkEQCAUUEUEQANAIAAgACgCQCALIBenQQN0aigCAEEEdGoiAygCBCIBBH8gAQUgAygCAAtBgAQQNyIBQQBIBEBCfyEXDAQLIAFBAEcgCnIhCiAXQgF8IhcgFFINAAsLQn8hFyAAKAIAEB8iGEJ/VwRAIAAoAgAhASAAQQhqBEAgACABKAIMNgIIIAAgASgCEDYCDAsMAgsgEULiABAXIgZFBEAgAEEIagRAIABBADYCDCAAQQ42AggLDAILIBggFX0hEyAVQv////8PViAUQv//A1ZyIApyQQFxBEAgBkGZEkEEECwgBkIsEBggBkEtEA0gBkEtEA0gBkEAEBIgBkEAEBIgBiAUEBggBiAUEBggBiATEBggBiAVEBggBkGUEkEEECwgBkEAEBIgBiAYEBggBkEBEBILIAZBnhJBBBAsIAZBABASIAYgFEL//wMgFEL//wNUG6dB//8DcSIBEA0gBiABEA0gBkF/IBOnIBNC/v///w9WGxASIAZBfyAVpyAVQv7///8PVhsQEiAGIABBJEEgIAAtACgbaigCACIDBH8gAy8BBAVBAAtB//8DcRANIAYtAABFBEAgAEEIagRAIABBADYCDCAAQRQ2AggLIAYQCAwCCyAAIAYoAgQgBi0AAAR+IAYpAxAFQgALEBshASAGEAggAUEASA0BIAMEQCAAIAMoAgAgAzMBBBAbQQBIDQILIBMhFwwBCyAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLQn8hFwsgEUHwAGokACAXQgBTDQAgACgCABAfQj+HpyECCyALEAYgAkEASA0BAn8gACgCACIBKAIkQQFHBEAgAUEMagRAIAFBADYCECABQRI2AgwLQX8MAQsgASgCICICQQJPBEAgAUEMagRAIAFBADYCECABQR02AgwLQX8MAQsCQCACQQFHDQAgARAaQQBODQBBfwwBCyABQQBCAEEJEA5Cf1cEQCABQQI2AiRBfwwBCyABQQA2AiRBAAtFDQIgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwBCyALEAYLIAAoAlQQfCAAKAIAEENBfyECDAILIAAoAlQQfAsgABBLQQAhAgsgB0HAwABqJAAgAgtFAEHwgwFCADcDAEHogwFCADcDAEHggwFCADcDAEHYgwFCADcDAEHQgwFCADcDAEHIgwFCADcDAEHAgwFCADcDAEHAgwELoQMBCH8jAEGgAWsiAiQAIAAQMQJAAn8CQCAAKAIAIgFBAE4EQCABQbATKAIASA0BCyACIAE2AhAgAkEgakH2ESACQRBqEHZBASEGIAJBIGohBCACQSBqECIhA0EADAELIAFBAnQiAUGwEmooAgAhBQJ/AkACQCABQcATaigCAEEBaw4CAAEECyAAKAIEIQNB9IIBKAIAIQdBACEBAkACQANAIAMgAUHQ8QBqLQAARwRAQdcAIQQgAUEBaiIBQdcARw0BDAILCyABIgQNAEGw8gAhAwwBC0Gw8gAhAQNAIAEtAAAhCCABQQFqIgMhASAIDQAgAyEBIARBAWsiBA0ACwsgBygCFBogAwwBC0EAIAAoAgRrQQJ0QdjAAGooAgALIgRFDQEgBBAiIQMgBUUEQEEAIQVBASEGQQAMAQsgBRAiQQJqCyEBIAEgA2pBAWoQCSIBRQRAQegSKAIAIQUMAQsgAiAENgIIIAJBrBJBkRIgBhs2AgQgAkGsEiAFIAYbNgIAIAFBqwogAhB2IAAgATYCCCABIQULIAJBoAFqJAAgBQszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQBxogACAAKAIUIAFqNgIUIAILBgBBsIgBCwYAQayIAQsGAEGkiAELBwAgAEEEagsHACAAQQhqCyYBAX8gACgCFCIBBEAgARALCyAAKAIEIQEgAEEEahAxIAAQBiABC6kBAQN/AkAgAC0AACICRQ0AA0AgAS0AACIERQRAIAIhAwwCCwJAIAIgBEYNACACQSByIAIgAkHBAGtBGkkbIAEtAAAiAkEgciACIAJBwQBrQRpJG0YNACAALQAAIQMMAgsgAUEBaiEBIAAtAAEhAiAAQQFqIQAgAg0ACwsgA0H/AXEiAEEgciAAIABBwQBrQRpJGyABLQAAIgBBIHIgACAAQcEAa0EaSRtrC8sGAgJ+An8jAEHgAGsiByQAAkACQAJAAkACQAJAAkACQAJAAkACQCAEDg8AAQoCAwQGBwgICAgICAUICyABQgA3AyAMCQsgACACIAMQESIFQn9XBEAgAUEIaiIBBEAgASAAKAIMNgIAIAEgACgCEDYCBAsMCAsCQCAFUARAIAEpAygiAyABKQMgUg0BIAEgAzcDGCABQQE2AgQgASgCAEUNASAAIAdBKGoQIUF/TARAIAFBCGoiAQRAIAEgACgCDDYCACABIAAoAhA2AgQLDAoLAkAgBykDKCIDQiCDUA0AIAcoAlQgASgCMEYNACABQQhqBEAgAUEANgIMIAFBBzYCCAsMCgsgA0IEg1ANASAHKQNAIAEpAxhRDQEgAUEIagRAIAFBADYCDCABQRU2AggLDAkLIAEoAgQNACABKQMoIgMgASkDICIGVA0AIAUgAyAGfSIDWA0AIAEoAjAhBANAIAECfyAFIAN9IgZC/////w8gBkL/////D1QbIganIQBBACACIAOnaiIIRQ0AGiAEIAggAEHUgAEoAgARAAALIgQ2AjAgASABKQMoIAZ8NwMoIAUgAyAGfCIDVg0ACwsgASABKQMgIAV8NwMgDAgLIAEoAgRFDQcgAiABKQMYIgM3AxggASgCMCEAIAJBADYCMCACIAM3AyAgAiAANgIsIAIgAikDAELsAYQ3AwAMBwsgA0IIWgR+IAIgASgCCDYCACACIAEoAgw2AgRCCAVCfwshBQwGCyABEAYMBQtCfyEFIAApAxgiA0J/VwRAIAFBCGoiAQRAIAEgACgCDDYCACABIAAoAhA2AgQLDAULIAdBfzYCGCAHQo+AgICAAjcDECAHQoyAgIDQATcDCCAHQomAgICgATcDACADQQggBxAkQn+FgyEFDAQLIANCD1gEQCABQQhqBEAgAUEANgIMIAFBEjYCCAsMAwsgAkUNAgJAIAAgAikDACACKAIIEBRBAE4EQCAAEDMiA0J/VQ0BCyABQQhqIgEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwDCyABIAM3AyAMAwsgASkDICEFDAILIAFBCGoEQCABQQA2AgwgAUEcNgIICwtCfyEFCyAHQeAAaiQAIAULjAcCAn4CfyMAQRBrIgckAAJAAkACQAJAAkACQAJAAkACQAJAIAQOEQABAgMFBggICAgICAgIBwgECAsgAUJ/NwMgIAFBADoADyABQQA7AQwgAUIANwMYIAEoAqxAIAEoAqhAKAIMEQEArUIBfSEFDAgLQn8hBSABKAIADQdCACEFIANQDQcgAS0ADQ0HIAFBKGohBAJAA0ACQCAHIAMgBX03AwggASgCrEAgAiAFp2ogB0EIaiABKAKoQCgCHBEAACEIQgAgBykDCCAIQQJGGyAFfCEFAkACQAJAIAhBAWsOAwADAQILIAFBAToADSABKQMgIgNCf1cEQCABBEAgAUEANgIEIAFBFDYCAAsMBQsgAS0ADkUNBCADIAVWDQQgASADNwMYIAFBAToADyACIAQgA6cQBxogASkDGCEFDAwLIAEtAAwNAyAAIARCgMAAEBEiBkJ/VwRAIAEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwECyAGUARAIAFBAToADCABKAKsQCABKAKoQCgCGBEDACABKQMgQn9VDQEgAUIANwMgDAELAkAgASkDIEIAWQRAIAFBADoADgwBCyABIAY3AyALIAEoAqxAIAQgBiABKAKoQCgCFBEPABoLIAMgBVYNAQwCCwsgASgCAA0AIAEEQCABQQA2AgQgAUEUNgIACwsgBVBFBEAgAUEAOgAOIAEgASkDGCAFfDcDGAwIC0J/QgAgASgCABshBQwHCyABKAKsQCABKAKoQCgCEBEBAK1CAX0hBQwGCyABLQAQBEAgAS0ADQRAIAIgAS0ADwR/QQAFQQggASgCFCIAIABBfUsbCzsBMCACIAEpAxg3AyAgAiACKQMAQsgAhDcDAAwHCyACIAIpAwBCt////w+DNwMADAYLIAJBADsBMCACKQMAIQMgAS0ADQRAIAEpAxghBSACIANCxACENwMAIAIgBTcDGEIAIQUMBgsgAiADQrv///8Pg0LAAIQ3AwAMBQsgAS0ADw0EIAEoAqxAIAEoAqhAKAIIEQEArCEFDAQLIANCCFoEfiACIAEoAgA2AgAgAiABKAIENgIEQggFQn8LIQUMAwsgAUUNAiABKAKsQCABKAKoQCgCBBEDACABEDEgARAGDAILIAdBfzYCAEEQIAcQJEI/hCEFDAELIAEEQCABQQA2AgQgAUEUNgIAC0J/IQULIAdBEGokACAFC2MAQcgAEAkiAEUEQEGEhAEoAgAhASACBEAgAiABNgIEIAJBATYCAAsgAA8LIABBADoADCAAQQA6AAQgACACNgIAIABBADYCOCAAQgA3AzAgACABQQkgAUEBa0EJSRs2AgggAAu3fAIefwZ+IAIpAwAhIiAAIAE2AhwgACAiQv////8PICJC/////w9UGz4CICAAQRBqIQECfyAALQAEBEACfyAALQAMQQJ0IQpBfiEEAkACQAJAIAEiBUUNACAFKAIgRQ0AIAUoAiRFDQAgBSgCHCIDRQ0AIAMoAgAgBUcNAAJAAkAgAygCICIGQTlrDjkBAgICAgICAgICAgIBAgICAQICAgICAgICAgICAgICAgICAQICAgICAgICAgICAQICAgICAgICAgEACyAGQZoFRg0AIAZBKkcNAQsgCkEFSw0AAkACQCAFKAIMRQ0AIAUoAgQiAQRAIAUoAgBFDQELIAZBmgVHDQEgCkEERg0BCyAFQeDAACgCADYCGEF+DAQLIAUoAhBFDQEgAygCJCEEIAMgCjYCJAJAIAMoAhAEQCADEDACQCAFKAIQIgYgAygCECIIIAYgCEkbIgFFDQAgBSgCDCADKAIIIAEQBxogBSAFKAIMIAFqNgIMIAMgAygCCCABajYCCCAFIAUoAhQgAWo2AhQgBSAFKAIQIAFrIgY2AhAgAyADKAIQIAFrIgg2AhAgCA0AIAMgAygCBDYCCEEAIQgLIAYEQCADKAIgIQYMAgsMBAsgAQ0AIApBAXRBd0EAIApBBEsbaiAEQQF0QXdBACAEQQRKG2pKDQAgCkEERg0ADAILAkACQAJAAkACQCAGQSpHBEAgBkGaBUcNASAFKAIERQ0DDAcLIAMoAhRFBEAgA0HxADYCIAwCCyADKAI0QQx0QYDwAWshBAJAIAMoAowBQQJODQAgAygCiAEiAUEBTA0AIAFBBUwEQCAEQcAAciEEDAELQYABQcABIAFBBkYbIARyIQQLIAMoAgQgCGogBEEgciAEIAMoAmgbIgFBH3AgAXJBH3NBCHQgAUGA/gNxQQh2cjsAACADIAMoAhBBAmoiATYCECADKAJoBEAgAygCBCABaiAFKAIwIgFBGHQgAUEIdEGAgPwHcXIgAUEIdkGA/gNxIAFBGHZycjYAACADIAMoAhBBBGo2AhALIAVBATYCMCADQfEANgIgIAUQCiADKAIQDQcgAygCICEGCwJAAkACQAJAIAZBOUYEfyADQaABakHkgAEoAgARAQAaIAMgAygCECIBQQFqNgIQIAEgAygCBGpBHzoAACADIAMoAhAiAUEBajYCECABIAMoAgRqQYsBOgAAIAMgAygCECIBQQFqNgIQIAEgAygCBGpBCDoAAAJAIAMoAhwiAUUEQCADKAIEIAMoAhBqQQA2AAAgAyADKAIQIgFBBWo2AhAgASADKAIEakEAOgAEQQIhBCADKAKIASIBQQlHBEBBBCABQQJIQQJ0IAMoAowBQQFKGyEECyADIAMoAhAiAUEBajYCECABIAMoAgRqIAQ6AAAgAyADKAIQIgFBAWo2AhAgASADKAIEakEDOgAAIANB8QA2AiAgBRAKIAMoAhBFDQEMDQsgASgCJCELIAEoAhwhCSABKAIQIQggASgCLCENIAEoAgAhBiADIAMoAhAiAUEBajYCEEECIQQgASADKAIEaiANQQBHQQF0IAZBAEdyIAhBAEdBAnRyIAlBAEdBA3RyIAtBAEdBBHRyOgAAIAMoAgQgAygCEGogAygCHCgCBDYAACADIAMoAhAiDUEEaiIGNgIQIAMoAogBIgFBCUcEQEEEIAFBAkhBAnQgAygCjAFBAUobIQQLIAMgDUEFajYCECADKAIEIAZqIAQ6AAAgAygCHCgCDCEEIAMgAygCECIBQQFqNgIQIAEgAygCBGogBDoAACADKAIcIgEoAhAEfyADKAIEIAMoAhBqIAEoAhQ7AAAgAyADKAIQQQJqNgIQIAMoAhwFIAELKAIsBEAgBQJ/IAUoAjAhBiADKAIQIQRBACADKAIEIgFFDQAaIAYgASAEQdSAASgCABEAAAs2AjALIANBxQA2AiAgA0EANgIYDAILIAMoAiAFIAYLQcUAaw4jAAQEBAEEBAQEBAQEBAQEBAQEBAQEBAIEBAQEBAQEBAQEBAMECyADKAIcIgEoAhAiBgRAIAMoAgwiCCADKAIQIgQgAS8BFCADKAIYIg1rIglqSQRAA0AgAygCBCAEaiAGIA1qIAggBGsiCBAHGiADIAMoAgwiDTYCEAJAIAMoAhwoAixFDQAgBCANTw0AIAUCfyAFKAIwIQZBACADKAIEIARqIgFFDQAaIAYgASANIARrQdSAASgCABEAAAs2AjALIAMgAygCGCAIajYCGCAFKAIcIgYQMAJAIAUoAhAiBCAGKAIQIgEgASAESxsiAUUNACAFKAIMIAYoAgggARAHGiAFIAUoAgwgAWo2AgwgBiAGKAIIIAFqNgIIIAUgBSgCFCABajYCFCAFIAUoAhAgAWs2AhAgBiAGKAIQIAFrIgE2AhAgAQ0AIAYgBigCBDYCCAsgAygCEA0MIAMoAhghDSADKAIcKAIQIQZBACEEIAkgCGsiCSADKAIMIghLDQALCyADKAIEIARqIAYgDWogCRAHGiADIAMoAhAgCWoiDTYCEAJAIAMoAhwoAixFDQAgBCANTw0AIAUCfyAFKAIwIQZBACADKAIEIARqIgFFDQAaIAYgASANIARrQdSAASgCABEAAAs2AjALIANBADYCGAsgA0HJADYCIAsgAygCHCgCHARAIAMoAhAiBCEJA0ACQCAEIAMoAgxHDQACQCADKAIcKAIsRQ0AIAQgCU0NACAFAn8gBSgCMCEGQQAgAygCBCAJaiIBRQ0AGiAGIAEgBCAJa0HUgAEoAgARAAALNgIwCyAFKAIcIgYQMAJAIAUoAhAiBCAGKAIQIgEgASAESxsiAUUNACAFKAIMIAYoAgggARAHGiAFIAUoAgwgAWo2AgwgBiAGKAIIIAFqNgIIIAUgBSgCFCABajYCFCAFIAUoAhAgAWs2AhAgBiAGKAIQIAFrIgE2AhAgAQ0AIAYgBigCBDYCCAtBACEEQQAhCSADKAIQRQ0ADAsLIAMoAhwoAhwhBiADIAMoAhgiAUEBajYCGCABIAZqLQAAIQEgAyAEQQFqNgIQIAMoAgQgBGogAToAACABBEAgAygCECEEDAELCwJAIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0EANgIYCyADQdsANgIgCwJAIAMoAhwoAiRFDQAgAygCECIEIQkDQAJAIAQgAygCDEcNAAJAIAMoAhwoAixFDQAgBCAJTQ0AIAUCfyAFKAIwIQZBACADKAIEIAlqIgFFDQAaIAYgASAEIAlrQdSAASgCABEAAAs2AjALIAUoAhwiBhAwAkAgBSgCECIEIAYoAhAiASABIARLGyIBRQ0AIAUoAgwgBigCCCABEAcaIAUgBSgCDCABajYCDCAGIAYoAgggAWo2AgggBSAFKAIUIAFqNgIUIAUgBSgCECABazYCECAGIAYoAhAgAWsiATYCECABDQAgBiAGKAIENgIIC0EAIQRBACEJIAMoAhBFDQAMCgsgAygCHCgCJCEGIAMgAygCGCIBQQFqNgIYIAEgBmotAAAhASADIARBAWo2AhAgAygCBCAEaiABOgAAIAEEQCADKAIQIQQMAQsLIAMoAhwoAixFDQAgAygCECIGIAlNDQAgBQJ/IAUoAjAhBEEAIAMoAgQgCWoiAUUNABogBCABIAYgCWtB1IABKAIAEQAACzYCMAsgA0HnADYCIAsCQCADKAIcKAIsBEAgAygCDCADKAIQIgFBAmpJBH8gBRAKIAMoAhANAkEABSABCyADKAIEaiAFKAIwOwAAIAMgAygCEEECajYCECADQaABakHkgAEoAgARAQAaCyADQfEANgIgIAUQCiADKAIQRQ0BDAcLDAYLIAUoAgQNAQsgAygCPA0AIApFDQEgAygCIEGaBUYNAQsCfyADKAKIASIBRQRAIAMgChCFAQwBCwJAAkACQCADKAKMAUECaw4CAAECCwJ/AkADQAJAAkAgAygCPA0AIAMQLyADKAI8DQAgCg0BQQAMBAsgAygCSCADKAJoai0AACEEIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qQQA6AAAgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtaiAEOgAAIAMgBEECdGoiASABLwHkAUEBajsB5AEgAyADKAI8QQFrNgI8IAMgAygCaEEBaiIBNgJoIAMoAvAtIAMoAvQtRw0BQQAhBCADIAMoAlgiBkEATgR/IAMoAkggBmoFQQALIAEgBmtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEA0BDAILCyADQQA2AoQuIApBBEYEQCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBARAPIAMgAygCaDYCWCADKAIAEApBA0ECIAMoAgAoAhAbDAILIAMoAvAtBEBBACEEIAMgAygCWCIBQQBOBH8gAygCSCABagVBAAsgAygCaCABa0EAEA8gAyADKAJoNgJYIAMoAgAQCiADKAIAKAIQRQ0BC0EBIQQLIAQLDAILAn8CQANAAkACQAJAAkACQCADKAI8Ig1BggJLDQAgAxAvAkAgAygCPCINQYICSw0AIAoNAEEADAgLIA1FDQQgDUECSw0AIAMoAmghCAwBCyADKAJoIghFBEBBACEIDAELIAMoAkggCGoiAUEBayIELQAAIgYgAS0AAEcNACAGIAQtAAJHDQAgBEEDaiEEQQAhCQJAA0AgBiAELQAARw0BIAQtAAEgBkcEQCAJQQFyIQkMAgsgBC0AAiAGRwRAIAlBAnIhCQwCCyAELQADIAZHBEAgCUEDciEJDAILIAQtAAQgBkcEQCAJQQRyIQkMAgsgBC0ABSAGRwRAIAlBBXIhCQwCCyAELQAGIAZHBEAgCUEGciEJDAILIAQtAAcgBkcEQCAJQQdyIQkMAgsgBEEIaiEEIAlB+AFJIQEgCUEIaiEJIAENAAtBgAIhCQtBggIhBCANIAlBAmoiASABIA1LGyIBQYECSw0BIAEiBEECSw0BCyADKAJIIAhqLQAAIQQgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtakEAOgAAIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qIAQ6AAAgAyAEQQJ0aiIBIAEvAeQBQQFqOwHkASADIAMoAjxBAWs2AjwgAyADKAJoQQFqIgQ2AmgMAQsgAyADKALwLSIBQQFqNgLwLSABIAMoAuwtakEBOgAAIAMgAygC8C0iAUEBajYC8C0gASADKALsLWpBADoAACADIAMoAvAtIgFBAWo2AvAtIAEgAygC7C1qIARBA2s6AAAgAyADKAKALkEBajYCgC4gBEH9zgBqLQAAQQJ0IANqQegJaiIBIAEvAQBBAWo7AQAgA0GAywAtAABBAnRqQdgTaiIBIAEvAQBBAWo7AQAgAyADKAI8IARrNgI8IAMgAygCaCAEaiIENgJoCyADKALwLSADKAL0LUcNAUEAIQggAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyAEIAFrQQAQDyADIAMoAmg2AlggAygCABAKIAMoAgAoAhANAQwCCwsgA0EANgKELiAKQQRGBEAgAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyADKAJoIAFrQQEQDyADIAMoAmg2AlggAygCABAKQQNBAiADKAIAKAIQGwwCCyADKALwLQRAQQAhCCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEEUNAQtBASEICyAICwwBCyADIAogAUEMbEG42ABqKAIAEQIACyIBQX5xQQJGBEAgA0GaBTYCIAsgAUF9cUUEQEEAIQQgBSgCEA0CDAQLIAFBAUcNAAJAAkACQCAKQQFrDgUAAQEBAgELIAMpA5guISICfwJ+IAMoAqAuIgFBA2oiCUE/TQRAQgIgAa2GICKEDAELIAFBwABGBEAgAygCBCADKAIQaiAiNwAAIAMgAygCEEEIajYCEEICISJBCgwCCyADKAIEIAMoAhBqQgIgAa2GICKENwAAIAMgAygCEEEIajYCECABQT1rIQlCAkHAACABa62ICyEiIAlBB2ogCUE5SQ0AGiADKAIEIAMoAhBqICI3AAAgAyADKAIQQQhqNgIQQgAhIiAJQTlrCyEBIAMgIjcDmC4gAyABNgKgLiADEDAMAQsgA0EAQQBBABA5IApBA0cNACADKAJQQQBBgIAIEBkgAygCPA0AIANBADYChC4gA0EANgJYIANBADYCaAsgBRAKIAUoAhANAAwDC0EAIQQgCkEERw0AAkACfwJAAkAgAygCFEEBaw4CAQADCyAFIANBoAFqQeCAASgCABEBACIBNgIwIAMoAgQgAygCEGogATYAACADIAMoAhBBBGoiATYCECADKAIEIAFqIQQgBSgCCAwBCyADKAIEIAMoAhBqIQQgBSgCMCIBQRh0IAFBCHRBgID8B3FyIAFBCHZBgP4DcSABQRh2cnILIQEgBCABNgAAIAMgAygCEEEEajYCEAsgBRAKIAMoAhQiAUEBTgRAIANBACABazYCFAsgAygCEEUhBAsgBAwCCyAFQezAACgCADYCGEF7DAELIANBfzYCJEEACwwBCyMAQRBrIhQkAEF+IRcCQCABIgxFDQAgDCgCIEUNACAMKAIkRQ0AIAwoAhwiB0UNACAHKAIAIAxHDQAgBygCBCIIQbT+AGtBH0sNACAMKAIMIhBFDQAgDCgCACIBRQRAIAwoAgQNAQsgCEG//gBGBEAgB0HA/gA2AgRBwP4AIQgLIAdBpAFqIR8gB0G8BmohGSAHQbwBaiEcIAdBoAFqIR0gB0G4AWohGiAHQfwKaiEYIAdBQGshHiAHKAKIASEFIAwoAgQiICEGIAcoAoQBIQogDCgCECIPIRYCfwJAAkACQANAAkBBfSEEQQEhCQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAhBtP4Aaw4fBwYICQolJicoBSwtLQsZGgQMAjIzATUANw0OAzlISUwLIAcoApQBIQMgASEEIAYhCAw1CyAHKAKUASEDIAEhBCAGIQgMMgsgBygCtAEhCAwuCyAHKAIMIQgMQQsgBUEOTw0pIAZFDUEgBUEIaiEIIAFBAWohBCAGQQFrIQkgAS0AACAFdCAKaiEKIAVBBkkNDCAEIQEgCSEGIAghBQwpCyAFQSBPDSUgBkUNQCABQQFqIQQgBkEBayEIIAEtAAAgBXQgCmohCiAFQRhJDQ0gBCEBIAghBgwlCyAFQRBPDRUgBkUNPyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEISQ0NIAQhASAJIQYgCCEFDBULIAcoAgwiC0UNByAFQRBPDSIgBkUNPiAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEISQ0NIAQhASAJIQYgCCEFDCILIAVBH0sNFQwUCyAFQQ9LDRYMFQsgBygCFCIEQYAIcUUEQCAFIQgMFwsgCiEIIAVBD0sNGAwXCyAKIAVBB3F2IQogBUF4cSIFQR9LDQwgBkUNOiAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEYSQ0GIAQhASAJIQYgCCEFDAwLIAcoArQBIgggBygCqAEiC08NIwwiCyAPRQ0qIBAgBygCjAE6AAAgB0HI/gA2AgQgD0EBayEPIBBBAWohECAHKAIEIQgMOQsgBygCDCIDRQRAQQAhCAwJCyAFQR9LDQcgBkUNNyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEYSQ0BIAQhASAJIQYgCCEFDAcLIAdBwP4ANgIEDCoLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDgLIAVBEGohCSABQQJqIQQgBkECayELIAEtAAEgCHQgCmohCiAFQQ9LBEAgBCEBIAshBiAJIQUMBgsgC0UEQCAEIQFBACEGIAkhBSANIQQMOAsgBUEYaiEIIAFBA2ohBCAGQQNrIQsgAS0AAiAJdCAKaiEKIAVBB0sEQCAEIQEgCyEGIAghBQwGCyALRQRAIAQhAUEAIQYgCCEFIA0hBAw4CyAFQSBqIQUgBkEEayEGIAEtAAMgCHQgCmohCiABQQRqIQEMBQsgCUUEQCAEIQFBACEGIAghBSANIQQMNwsgBUEQaiEFIAZBAmshBiABLQABIAh0IApqIQogAUECaiEBDBwLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDYLIAVBEGohCSABQQJqIQQgBkECayELIAEtAAEgCHQgCmohCiAFQQ9LBEAgBCEBIAshBiAJIQUMBgsgC0UEQCAEIQFBACEGIAkhBSANIQQMNgsgBUEYaiEIIAFBA2ohBCAGQQNrIQsgAS0AAiAJdCAKaiEKIAUEQCAEIQEgCyEGIAghBQwGCyALRQRAIAQhAUEAIQYgCCEFIA0hBAw2CyAFQSBqIQUgBkEEayEGIAEtAAMgCHQgCmohCiABQQRqIQEMBQsgBUEIaiEJIAhFBEAgBCEBQQAhBiAJIQUgDSEEDDULIAFBAmohBCAGQQJrIQggAS0AASAJdCAKaiEKIAVBD0sEQCAEIQEgCCEGDBgLIAVBEGohCSAIRQRAIAQhAUEAIQYgCSEFIA0hBAw1CyABQQNqIQQgBkEDayEIIAEtAAIgCXQgCmohCiAFQQdLBEAgBCEBIAghBgwYCyAFQRhqIQUgCEUEQCAEIQFBACEGIA0hBAw1CyAGQQRrIQYgAS0AAyAFdCAKaiEKIAFBBGohAQwXCyAJDQYgBCEBQQAhBiAIIQUgDSEEDDMLIAlFBEAgBCEBQQAhBiAIIQUgDSEEDDMLIAVBEGohBSAGQQJrIQYgAS0AASAIdCAKaiEKIAFBAmohAQwUCyAMIBYgD2siCSAMKAIUajYCFCAHIAcoAiAgCWo2AiACQCADQQRxRQ0AIAkEQAJAIBAgCWshBCAMKAIcIggoAhQEQCAIQUBrIAQgCUEAQdiAASgCABEIAAwBCyAIIAgoAhwgBCAJQcCAASgCABEAACIENgIcIAwgBDYCMAsLIAcoAhRFDQAgByAeQeCAASgCABEBACIENgIcIAwgBDYCMAsCQCAHKAIMIghBBHFFDQAgBygCHCAKIApBCHRBgID8B3EgCkEYdHIgCkEIdkGA/gNxIApBGHZyciAHKAIUG0YNACAHQdH+ADYCBCAMQaQMNgIYIA8hFiAHKAIEIQgMMQtBACEKQQAhBSAPIRYLIAdBz/4ANgIEDC0LIApB//8DcSIEIApBf3NBEHZHBEAgB0HR/gA2AgQgDEGOCjYCGCAHKAIEIQgMLwsgB0HC/gA2AgQgByAENgKMAUEAIQpBACEFCyAHQcP+ADYCBAsgBygCjAEiBARAIA8gBiAEIAQgBksbIgQgBCAPSxsiCEUNHiAQIAEgCBAHIQQgByAHKAKMASAIazYCjAEgBCAIaiEQIA8gCGshDyABIAhqIQEgBiAIayEGIAcoAgQhCAwtCyAHQb/+ADYCBCAHKAIEIQgMLAsgBUEQaiEFIAZBAmshBiABLQABIAh0IApqIQogAUECaiEBCyAHIAo2AhQgCkH/AXFBCEcEQCAHQdH+ADYCBCAMQYIPNgIYIAcoAgQhCAwrCyAKQYDAA3EEQCAHQdH+ADYCBCAMQY0JNgIYIAcoAgQhCAwrCyAHKAIkIgQEQCAEIApBCHZBAXE2AgALAkAgCkGABHFFDQAgBy0ADEEEcUUNACAUIAo7AAwgBwJ/IAcoAhwhBUEAIBRBDGoiBEUNABogBSAEQQJB1IABKAIAEQAACzYCHAsgB0G2/gA2AgRBACEFQQAhCgsgBkUNKCABQQFqIQQgBkEBayEIIAEtAAAgBXQgCmohCiAFQRhPBEAgBCEBIAghBgwBCyAFQQhqIQkgCEUEQCAEIQFBACEGIAkhBSANIQQMKwsgAUECaiEEIAZBAmshCCABLQABIAl0IApqIQogBUEPSwRAIAQhASAIIQYMAQsgBUEQaiEJIAhFBEAgBCEBQQAhBiAJIQUgDSEEDCsLIAFBA2ohBCAGQQNrIQggAS0AAiAJdCAKaiEKIAVBB0sEQCAEIQEgCCEGDAELIAVBGGohBSAIRQRAIAQhAUEAIQYgDSEEDCsLIAZBBGshBiABLQADIAV0IApqIQogAUEEaiEBCyAHKAIkIgQEQCAEIAo2AgQLAkAgBy0AFUECcUUNACAHLQAMQQRxRQ0AIBQgCjYADCAHAn8gBygCHCEFQQAgFEEMaiIERQ0AGiAFIARBBEHUgAEoAgARAAALNgIcCyAHQbf+ADYCBEEAIQVBACEKCyAGRQ0mIAFBAWohBCAGQQFrIQggAS0AACAFdCAKaiEKIAVBCE8EQCAEIQEgCCEGDAELIAVBCGohBSAIRQRAIAQhAUEAIQYgDSEEDCkLIAZBAmshBiABLQABIAV0IApqIQogAUECaiEBCyAHKAIkIgQEQCAEIApBCHY2AgwgBCAKQf8BcTYCCAsCQCAHLQAVQQJxRQ0AIActAAxBBHFFDQAgFCAKOwAMIAcCfyAHKAIcIQVBACAUQQxqIgRFDQAaIAUgBEECQdSAASgCABEAAAs2AhwLIAdBuP4ANgIEQQAhCEEAIQVBACEKIAcoAhQiBEGACHENAQsgBygCJCIEBEAgBEEANgIQCyAIIQUMAgsgBkUEQEEAIQYgCCEKIA0hBAwmCyABQQFqIQkgBkEBayELIAEtAAAgBXQgCGohCiAFQQhPBEAgCSEBIAshBgwBCyAFQQhqIQUgC0UEQCAJIQFBACEGIA0hBAwmCyAGQQJrIQYgAS0AASAFdCAKaiEKIAFBAmohAQsgByAKQf//A3EiCDYCjAEgBygCJCIFBEAgBSAINgIUC0EAIQUCQCAEQYAEcUUNACAHLQAMQQRxRQ0AIBQgCjsADCAHAn8gBygCHCEIQQAgFEEMaiIERQ0AGiAIIARBAkHUgAEoAgARAAALNgIcC0EAIQoLIAdBuf4ANgIECyAHKAIUIglBgAhxBEAgBiAHKAKMASIIIAYgCEkbIg4EQAJAIAcoAiQiA0UNACADKAIQIgRFDQAgAygCGCILIAMoAhQgCGsiCE0NACAEIAhqIAEgCyAIayAOIAggDmogC0sbEAcaIAcoAhQhCQsCQCAJQYAEcUUNACAHLQAMQQRxRQ0AIAcCfyAHKAIcIQRBACABRQ0AGiAEIAEgDkHUgAEoAgARAAALNgIcCyAHIAcoAowBIA5rIgg2AowBIAYgDmshBiABIA5qIQELIAgNEwsgB0G6/gA2AgQgB0EANgKMAQsCQCAHLQAVQQhxBEBBACEIIAZFDQQDQCABIAhqLQAAIQMCQCAHKAIkIgtFDQAgCygCHCIERQ0AIAcoAowBIgkgCygCIE8NACAHIAlBAWo2AowBIAQgCWogAzoAAAsgA0EAIAYgCEEBaiIISxsNAAsCQCAHLQAVQQJxRQ0AIActAAxBBHFFDQAgBwJ/IAcoAhwhBEEAIAFFDQAaIAQgASAIQdSAASgCABEAAAs2AhwLIAEgCGohASAGIAhrIQYgA0UNAQwTCyAHKAIkIgRFDQAgBEEANgIcCyAHQbv+ADYCBCAHQQA2AowBCwJAIActABVBEHEEQEEAIQggBkUNAwNAIAEgCGotAAAhAwJAIAcoAiQiC0UNACALKAIkIgRFDQAgBygCjAEiCSALKAIoTw0AIAcgCUEBajYCjAEgBCAJaiADOgAACyADQQAgBiAIQQFqIghLGw0ACwJAIActABVBAnFFDQAgBy0ADEEEcUUNACAHAn8gBygCHCEEQQAgAUUNABogBCABIAhB1IABKAIAEQAACzYCHAsgASAIaiEBIAYgCGshBiADRQ0BDBILIAcoAiQiBEUNACAEQQA2AiQLIAdBvP4ANgIECyAHKAIUIgtBgARxBEACQCAFQQ9LDQAgBkUNHyAFQQhqIQggAUEBaiEEIAZBAWshCSABLQAAIAV0IApqIQogBUEITwRAIAQhASAJIQYgCCEFDAELIAlFBEAgBCEBQQAhBiAIIQUgDSEEDCILIAVBEGohBSAGQQJrIQYgAS0AASAIdCAKaiEKIAFBAmohAQsCQCAHLQAMQQRxRQ0AIAogBy8BHEYNACAHQdH+ADYCBCAMQdcMNgIYIAcoAgQhCAwgC0EAIQpBACEFCyAHKAIkIgQEQCAEQQE2AjAgBCALQQl2QQFxNgIsCwJAIActAAxBBHFFDQAgC0UNACAHIB5B5IABKAIAEQEAIgQ2AhwgDCAENgIwCyAHQb/+ADYCBCAHKAIEIQgMHgtBACEGDA4LAkAgC0ECcUUNACAKQZ+WAkcNACAHKAIoRQRAIAdBDzYCKAtBACEKIAdBADYCHCAUQZ+WAjsADCAHIBRBDGoiBAR/QQAgBEECQdSAASgCABEAAAVBAAs2AhwgB0G1/gA2AgRBACEFIAcoAgQhCAwdCyAHKAIkIgQEQCAEQX82AjALAkAgC0EBcQRAIApBCHRBgP4DcSAKQQh2akEfcEUNAQsgB0HR/gA2AgQgDEH2CzYCGCAHKAIEIQgMHQsgCkEPcUEIRwRAIAdB0f4ANgIEIAxBgg82AhggBygCBCEIDB0LIApBBHYiBEEPcSIJQQhqIQsgCUEHTUEAIAcoAigiCAR/IAgFIAcgCzYCKCALCyALTxtFBEAgBUEEayEFIAdB0f4ANgIEIAxB+gw2AhggBCEKIAcoAgQhCAwdCyAHQQE2AhxBACEFIAdBADYCFCAHQYACIAl0NgIYIAxBATYCMCAHQb3+AEG//gAgCkGAwABxGzYCBEEAIQogBygCBCEIDBwLIAcgCkEIdEGAgPwHcSAKQRh0ciAKQQh2QYD+A3EgCkEYdnJyIgQ2AhwgDCAENgIwIAdBvv4ANgIEQQAhCkEAIQULIAcoAhBFBEAgDCAPNgIQIAwgEDYCDCAMIAY2AgQgDCABNgIAIAcgBTYCiAEgByAKNgKEAUECIRcMIAsgB0EBNgIcIAxBATYCMCAHQb/+ADYCBAsCfwJAIAcoAghFBEAgBUEDSQ0BIAUMAgsgB0HO/gA2AgQgCiAFQQdxdiEKIAVBeHEhBSAHKAIEIQgMGwsgBkUNGSAGQQFrIQYgAS0AACAFdCAKaiEKIAFBAWohASAFQQhqCyEEIAcgCkEBcTYCCAJAAkACQAJAAkAgCkEBdkEDcUEBaw4DAQIDAAsgB0HB/gA2AgQMAwsgB0Gw2wA2ApgBIAdCiYCAgNAANwOgASAHQbDrADYCnAEgB0HH/gA2AgQMAgsgB0HE/gA2AgQMAQsgB0HR/gA2AgQgDEHXDTYCGAsgBEEDayEFIApBA3YhCiAHKAIEIQgMGQsgByAKQR9xIghBgQJqNgKsASAHIApBBXZBH3EiBEEBajYCsAEgByAKQQp2QQ9xQQRqIgs2AqgBIAVBDmshBSAKQQ52IQogCEEdTUEAIARBHkkbRQRAIAdB0f4ANgIEIAxB6gk2AhggBygCBCEIDBkLIAdBxf4ANgIEQQAhCCAHQQA2ArQBCyAIIQQDQCAFQQJNBEAgBkUNGCAGQQFrIQYgAS0AACAFdCAKaiEKIAVBCGohBSABQQFqIQELIAcgBEEBaiIINgK0ASAHIARBAXRBsOwAai8BAEEBdGogCkEHcTsBvAEgBUEDayEFIApBA3YhCiALIAgiBEsNAAsLIAhBEk0EQEESIAhrIQ1BAyAIa0EDcSIEBEADQCAHIAhBAXRBsOwAai8BAEEBdGpBADsBvAEgCEEBaiEIIARBAWsiBA0ACwsgDUEDTwRAA0AgB0G8AWoiDSAIQQF0IgRBsOwAai8BAEEBdGpBADsBACANIARBsuwAai8BAEEBdGpBADsBACANIARBtOwAai8BAEEBdGpBADsBACANIARBtuwAai8BAEEBdGpBADsBACAIQQRqIghBE0cNAAsLIAdBEzYCtAELIAdBBzYCoAEgByAYNgKYASAHIBg2ArgBQQAhCEEAIBxBEyAaIB0gGRBOIg0EQCAHQdH+ADYCBCAMQfQINgIYIAcoAgQhCAwXCyAHQcb+ADYCBCAHQQA2ArQBQQAhDQsgBygCrAEiFSAHKAKwAWoiESAISwRAQX8gBygCoAF0QX9zIRIgBygCmAEhGwNAIAYhCSABIQsCQCAFIgMgGyAKIBJxIhNBAnRqLQABIg5PBEAgBSEEDAELA0AgCUUNDSALLQAAIAN0IQ4gC0EBaiELIAlBAWshCSADQQhqIgQhAyAEIBsgCiAOaiIKIBJxIhNBAnRqLQABIg5JDQALIAshASAJIQYLAkAgGyATQQJ0ai8BAiIFQQ9NBEAgByAIQQFqIgk2ArQBIAcgCEEBdGogBTsBvAEgBCAOayEFIAogDnYhCiAJIQgMAQsCfwJ/AkACQAJAIAVBEGsOAgABAgsgDkECaiIFIARLBEADQCAGRQ0bIAZBAWshBiABLQAAIAR0IApqIQogAUEBaiEBIARBCGoiBCAFSQ0ACwsgBCAOayEFIAogDnYhBCAIRQRAIAdB0f4ANgIEIAxBvAk2AhggBCEKIAcoAgQhCAwdCyAFQQJrIQUgBEECdiEKIARBA3FBA2ohCSAIQQF0IAdqLwG6AQwDCyAOQQNqIgUgBEsEQANAIAZFDRogBkEBayEGIAEtAAAgBHQgCmohCiABQQFqIQEgBEEIaiIEIAVJDQALCyAEIA5rQQNrIQUgCiAOdiIEQQN2IQogBEEHcUEDagwBCyAOQQdqIgUgBEsEQANAIAZFDRkgBkEBayEGIAEtAAAgBHQgCmohCiABQQFqIQEgBEEIaiIEIAVJDQALCyAEIA5rQQdrIQUgCiAOdiIEQQd2IQogBEH/AHFBC2oLIQlBAAshAyAIIAlqIBFLDRMgCUEBayEEIAlBA3EiCwRAA0AgByAIQQF0aiADOwG8ASAIQQFqIQggCUEBayEJIAtBAWsiCw0ACwsgBEEDTwRAA0AgByAIQQF0aiIEIAM7Ab4BIAQgAzsBvAEgBCADOwHAASAEIAM7AcIBIAhBBGohCCAJQQRrIgkNAAsLIAcgCDYCtAELIAggEUkNAAsLIAcvAbwFRQRAIAdB0f4ANgIEIAxB0Qs2AhggBygCBCEIDBYLIAdBCjYCoAEgByAYNgKYASAHIBg2ArgBQQEgHCAVIBogHSAZEE4iDQRAIAdB0f4ANgIEIAxB2Ag2AhggBygCBCEIDBYLIAdBCTYCpAEgByAHKAK4ATYCnAFBAiAHIAcoAqwBQQF0akG8AWogBygCsAEgGiAfIBkQTiINBEAgB0HR/gA2AgQgDEGmCTYCGCAHKAIEIQgMFgsgB0HH/gA2AgRBACENCyAHQcj+ADYCBAsCQCAGQQ9JDQAgD0GEAkkNACAMIA82AhAgDCAQNgIMIAwgBjYCBCAMIAE2AgAgByAFNgKIASAHIAo2AoQBIAwgFkHogAEoAgARBwAgBygCiAEhBSAHKAKEASEKIAwoAgQhBiAMKAIAIQEgDCgCECEPIAwoAgwhECAHKAIEQb/+AEcNByAHQX82ApBHIAcoAgQhCAwUCyAHQQA2ApBHIAUhCSAGIQggASEEAkAgBygCmAEiEiAKQX8gBygCoAF0QX9zIhVxIg5BAnRqLQABIgsgBU0EQCAFIQMMAQsDQCAIRQ0PIAQtAAAgCXQhCyAEQQFqIQQgCEEBayEIIAlBCGoiAyEJIAMgEiAKIAtqIgogFXEiDkECdGotAAEiC0kNAAsLIBIgDkECdGoiAS8BAiETAkBBACABLQAAIhEgEUHwAXEbRQRAIAshBgwBCyAIIQYgBCEBAkAgAyIFIAsgEiAKQX8gCyARanRBf3MiFXEgC3YgE2oiEUECdGotAAEiDmpPBEAgAyEJDAELA0AgBkUNDyABLQAAIAV0IQ4gAUEBaiEBIAZBAWshBiAFQQhqIgkhBSALIBIgCiAOaiIKIBVxIAt2IBNqIhFBAnRqLQABIg5qIAlLDQALIAEhBCAGIQgLIBIgEUECdGoiAS0AACERIAEvAQIhEyAHIAs2ApBHIAsgDmohBiAJIAtrIQMgCiALdiEKIA4hCwsgByAGNgKQRyAHIBNB//8DcTYCjAEgAyALayEFIAogC3YhCiARRQRAIAdBzf4ANgIEDBALIBFBIHEEQCAHQb/+ADYCBCAHQX82ApBHDBALIBFBwABxBEAgB0HR/gA2AgQgDEHQDjYCGAwQCyAHQcn+ADYCBCAHIBFBD3EiAzYClAELAkAgA0UEQCAHKAKMASELIAQhASAIIQYMAQsgBSEJIAghBiAEIQsCQCADIAVNBEAgBCEBDAELA0AgBkUNDSAGQQFrIQYgCy0AACAJdCAKaiEKIAtBAWoiASELIAlBCGoiCSADSQ0ACwsgByAHKAKQRyADajYCkEcgByAHKAKMASAKQX8gA3RBf3NxaiILNgKMASAJIANrIQUgCiADdiEKCyAHQcr+ADYCBCAHIAs2ApRHCyAFIQkgBiEIIAEhBAJAIAcoApwBIhIgCkF/IAcoAqQBdEF/cyIVcSIOQQJ0ai0AASIDIAVNBEAgBSELDAELA0AgCEUNCiAELQAAIAl0IQMgBEEBaiEEIAhBAWshCCAJQQhqIgshCSALIBIgAyAKaiIKIBVxIg5BAnRqLQABIgNJDQALCyASIA5BAnRqIgEvAQIhEwJAIAEtAAAiEUHwAXEEQCAHKAKQRyEGIAMhCQwBCyAIIQYgBCEBAkAgCyIFIAMgEiAKQX8gAyARanRBf3MiFXEgA3YgE2oiEUECdGotAAEiCWpPBEAgCyEODAELA0AgBkUNCiABLQAAIAV0IQkgAUEBaiEBIAZBAWshBiAFQQhqIg4hBSADIBIgCSAKaiIKIBVxIAN2IBNqIhFBAnRqLQABIglqIA5LDQALIAEhBCAGIQgLIBIgEUECdGoiAS0AACERIAEvAQIhEyAHIAcoApBHIANqIgY2ApBHIA4gA2shCyAKIAN2IQoLIAcgBiAJajYCkEcgCyAJayEFIAogCXYhCiARQcAAcQRAIAdB0f4ANgIEIAxB7A42AhggBCEBIAghBiAHKAIEIQgMEgsgB0HL/gA2AgQgByARQQ9xIgM2ApQBIAcgE0H//wNxNgKQAQsCQCADRQRAIAQhASAIIQYMAQsgBSEJIAghBiAEIQsCQCADIAVNBEAgBCEBDAELA0AgBkUNCCAGQQFrIQYgCy0AACAJdCAKaiEKIAtBAWoiASELIAlBCGoiCSADSQ0ACwsgByAHKAKQRyADajYCkEcgByAHKAKQASAKQX8gA3RBf3NxajYCkAEgCSADayEFIAogA3YhCgsgB0HM/gA2AgQLIA9FDQACfyAHKAKQASIIIBYgD2siBEsEQAJAIAggBGsiCCAHKAIwTQ0AIAcoAoxHRQ0AIAdB0f4ANgIEIAxBuQw2AhggBygCBCEIDBILAn8CQAJ/IAcoAjQiBCAISQRAIAcoAjggBygCLCAIIARrIghragwBCyAHKAI4IAQgCGtqCyILIBAgDyAQaiAQa0EBaqwiISAPIAcoAowBIgQgCCAEIAhJGyIEIAQgD0sbIgitIiIgISAiVBsiIqciCWoiBEkgCyAQT3ENACALIBBNIAkgC2ogEEtxDQAgECALIAkQBxogBAwBCyAQIAsgCyAQayIEIARBH3UiBGogBHMiCRAHIAlqIQQgIiAJrSIkfSIjUEUEQCAJIAtqIQkDQAJAICMgJCAjICRUGyIiQiBUBEAgIiEhDAELICIiIUIgfSImQgWIQgF8QgODIiVQRQRAA0AgBCAJKQAANwAAIAQgCSkAGDcAGCAEIAkpABA3ABAgBCAJKQAINwAIICFCIH0hISAJQSBqIQkgBEEgaiEEICVCAX0iJUIAUg0ACwsgJkLgAFQNAANAIAQgCSkAADcAACAEIAkpABg3ABggBCAJKQAQNwAQIAQgCSkACDcACCAEIAkpADg3ADggBCAJKQAwNwAwIAQgCSkAKDcAKCAEIAkpACA3ACAgBCAJKQBYNwBYIAQgCSkAUDcAUCAEIAkpAEg3AEggBCAJKQBANwBAIAQgCSkAYDcAYCAEIAkpAGg3AGggBCAJKQBwNwBwIAQgCSkAeDcAeCAJQYABaiEJIARBgAFqIQQgIUKAAX0iIUIfVg0ACwsgIUIQWgRAIAQgCSkAADcAACAEIAkpAAg3AAggIUIQfSEhIAlBEGohCSAEQRBqIQQLICFCCFoEQCAEIAkpAAA3AAAgIUIIfSEhIAlBCGohCSAEQQhqIQQLICFCBFoEQCAEIAkoAAA2AAAgIUIEfSEhIAlBBGohCSAEQQRqIQQLICFCAloEQCAEIAkvAAA7AAAgIUICfSEhIAlBAmohCSAEQQJqIQQLICMgIn0hIyAhUEUEQCAEIAktAAA6AAAgCUEBaiEJIARBAWohBAsgI0IAUg0ACwsgBAsMAQsgECAIIA8gBygCjAEiBCAEIA9LGyIIIA9ByIABKAIAEQQACyEQIAcgBygCjAEgCGsiBDYCjAEgDyAIayEPIAQNAiAHQcj+ADYCBCAHKAIEIQgMDwsgDSEJCyAJIQQMDgsgBygCBCEIDAwLIAEgBmohASAFIAZBA3RqIQUMCgsgBCAIaiEBIAUgCEEDdGohBQwJCyAEIAhqIQEgCyAIQQN0aiEFDAgLIAEgBmohASAFIAZBA3RqIQUMBwsgBCAIaiEBIAUgCEEDdGohBQwGCyAEIAhqIQEgAyAIQQN0aiEFDAULIAEgBmohASAFIAZBA3RqIQUMBAsgB0HR/gA2AgQgDEG8CTYCGCAHKAIEIQgMBAsgBCEBIAghBiAHKAIEIQgMAwtBACEGIAQhBSANIQQMAwsCQAJAIAhFBEAgCiEJDAELIAcoAhRFBEAgCiEJDAELAkAgBUEfSw0AIAZFDQMgBUEIaiEJIAFBAWohBCAGQQFrIQsgAS0AACAFdCAKaiEKIAVBGE8EQCAEIQEgCyEGIAkhBQwBCyALRQRAIAQhAUEAIQYgCSEFIA0hBAwGCyAFQRBqIQsgAUECaiEEIAZBAmshAyABLQABIAl0IApqIQogBUEPSwRAIAQhASADIQYgCyEFDAELIANFBEAgBCEBQQAhBiALIQUgDSEEDAYLIAVBGGohCSABQQNqIQQgBkEDayEDIAEtAAIgC3QgCmohCiAFQQdLBEAgBCEBIAMhBiAJIQUMAQsgA0UEQCAEIQFBACEGIAkhBSANIQQMBgsgBUEgaiEFIAZBBGshBiABLQADIAl0IApqIQogAUEEaiEBC0EAIQkgCEEEcQRAIAogBygCIEcNAgtBACEFCyAHQdD+ADYCBEEBIQQgCSEKDAMLIAdB0f4ANgIEIAxBjQw2AhggBygCBCEIDAELC0EAIQYgDSEECyAMIA82AhAgDCAQNgIMIAwgBjYCBCAMIAE2AgAgByAFNgKIASAHIAo2AoQBAkAgBygCLA0AIA8gFkYNAiAHKAIEIgFB0P4ASw0CIAFBzv4ASQ0ACwJ/IBYgD2shCiAHKAIMQQRxIQkCQAJAAkAgDCgCHCIDKAI4Ig1FBEBBASEIIAMgAygCACIBKAIgIAEoAiggAygCmEdBASADKAIodGpBARAoIg02AjggDUUNAQsgAygCLCIGRQRAIANCADcDMCADQQEgAygCKHQiBjYCLAsgBiAKTQRAAkAgCQRAAkAgBiAKTw0AIAogBmshBSAQIAprIQEgDCgCHCIGKAIUBEAgBkFAayABIAVBAEHYgAEoAgARCAAMAQsgBiAGKAIcIAEgBUHAgAEoAgARAAAiATYCHCAMIAE2AjALIAMoAiwiDUUNASAQIA1rIQUgAygCOCEBIAwoAhwiBigCFARAIAZBQGsgASAFIA1B3IABKAIAEQgADAILIAYgBigCHCABIAUgDUHEgAEoAgARBAAiATYCHCAMIAE2AjAMAQsgDSAQIAZrIAYQBxoLIANBADYCNCADIAMoAiw2AjBBAAwECyAKIAYgAygCNCIFayIBIAEgCksbIQsgECAKayEGIAUgDWohBQJAIAkEQAJAIAtFDQAgDCgCHCIBKAIUBEAgAUFAayAFIAYgC0HcgAEoAgARCAAMAQsgASABKAIcIAUgBiALQcSAASgCABEEACIBNgIcIAwgATYCMAsgCiALayIFRQ0BIBAgBWshBiADKAI4IQEgDCgCHCINKAIUBEAgDUFAayABIAYgBUHcgAEoAgARCAAMBQsgDSANKAIcIAEgBiAFQcSAASgCABEEACIBNgIcIAwgATYCMAwECyAFIAYgCxAHGiAKIAtrIgUNAgtBACEIIANBACADKAI0IAtqIgUgBSADKAIsIgFGGzYCNCABIAMoAjAiAU0NACADIAEgC2o2AjALIAgMAgsgAygCOCAQIAVrIAUQBxoLIAMgBTYCNCADIAMoAiw2AjBBAAtFBEAgDCgCECEPIAwoAgQhFyAHKAKIAQwDCyAHQdL+ADYCBAtBfCEXDAILIAYhFyAFCyEFIAwgICAXayIBIAwoAghqNgIIIAwgFiAPayIGIAwoAhRqNgIUIAcgBygCICAGajYCICAMIAcoAghBAEdBBnQgBWogBygCBCIFQb/+AEZBB3RqQYACIAVBwv4ARkEIdCAFQcf+AEYbajYCLCAEIARBeyAEGyABIAZyGyEXCyAUQRBqJAAgFwshASACIAIpAwAgADUCIH03AwACQAJAAkACQCABQQVqDgcBAgICAgMAAgtBAQ8LIAAoAhQNAEEDDwsgACgCACIABEAgACABNgIEIABBDTYCAAtBAiEBCyABCwkAIABBAToADAtEAAJAIAJC/////w9YBEAgACgCFEUNAQsgACgCACIABEAgAEEANgIEIABBEjYCAAtBAA8LIAAgATYCECAAIAI+AhRBAQu5AQEEfyAAQRBqIQECfyAALQAEBEAgARCEAQwBC0F+IQMCQCABRQ0AIAEoAiBFDQAgASgCJCIERQ0AIAEoAhwiAkUNACACKAIAIAFHDQAgAigCBEG0/gBrQR9LDQAgAigCOCIDBEAgBCABKAIoIAMQHiABKAIkIQQgASgCHCECCyAEIAEoAiggAhAeQQAhAyABQQA2AhwLIAMLIgEEQCAAKAIAIgAEQCAAIAE2AgQgAEENNgIACwsgAUUL0gwBBn8gAEIANwIQIABCADcCHCAAQRBqIQICfyAALQAEBEAgACgCCCEBQesMLQAAQTFGBH8Cf0F+IQMCQCACRQ0AIAJBADYCGCACKAIgIgRFBEAgAkEANgIoIAJBJzYCIEEnIQQLIAIoAiRFBEAgAkEoNgIkC0EGIAEgAUF/RhsiBUEASA0AIAVBCUoNAEF8IQMgBCACKAIoQQFB0C4QKCIBRQ0AIAIgATYCHCABIAI2AgAgAUEPNgI0IAFCgICAgKAFNwIcIAFBADYCFCABQYCAAjYCMCABQf//ATYCOCABIAIoAiAgAigCKEGAgAJBAhAoNgJIIAEgAigCICACKAIoIAEoAjBBAhAoIgM2AkwgA0EAIAEoAjBBAXQQGSACKAIgIAIoAihBgIAEQQIQKCEDIAFBgIACNgLoLSABQQA2AkAgASADNgJQIAEgAigCICACKAIoQYCAAkEEECgiAzYCBCABIAEoAugtIgRBAnQ2AgwCQAJAIAEoAkhFDQAgASgCTEUNACABKAJQRQ0AIAMNAQsgAUGaBTYCICACQejAACgCADYCGCACEIQBGkF8DAILIAFBADYCjAEgASAFNgKIASABQgA3AyggASADIARqNgLsLSABIARBA2xBA2s2AvQtQX4hAwJAIAJFDQAgAigCIEUNACACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQACQAJAIAEoAiAiBEE5aw45AQICAgICAgICAgICAQICAgECAgICAgICAgICAgICAgICAgECAgICAgICAgICAgECAgICAgICAgIBAAsgBEGaBUYNACAEQSpHDQELIAJBAjYCLCACQQA2AgggAkIANwIUIAFBADYCECABIAEoAgQ2AgggASgCFCIDQX9MBEAgAUEAIANrIgM2AhQLIAFBOUEqIANBAkYbNgIgIAIgA0ECRgR/IAFBoAFqQeSAASgCABEBAAVBAQs2AjAgAUF+NgIkIAFBADYCoC4gAUIANwOYLiABQYgXakGg0wA2AgAgASABQcwVajYCgBcgAUH8FmpBjNMANgIAIAEgAUHYE2o2AvQWIAFB8BZqQfjSADYCACABIAFB5AFqNgLoFiABEIgBQQAhAwsgAw0AIAIoAhwiAiACKAIwQQF0NgJEQQAhAyACKAJQQQBBgIAIEBkgAiACKAKIASIEQQxsIgFBtNgAai8BADYClAEgAiABQbDYAGovAQA2ApABIAIgAUGy2ABqLwEANgJ4IAIgAUG22ABqLwEANgJ0QfiAASgCACEFQeyAASgCACEGQYCBASgCACEBIAJCADcCbCACQgA3AmQgAkEANgI8IAJBADYChC4gAkIANwJUIAJBKSABIARBCUYiARs2AnwgAkEqIAYgARs2AoABIAJBKyAFIAEbNgKEAQsgAwsFQXoLDAELAn9BekHrDC0AAEExRw0AGkF+IAJFDQAaIAJBADYCGCACKAIgIgNFBEAgAkEANgIoIAJBJzYCIEEnIQMLIAIoAiRFBEAgAkEoNgIkC0F8IAMgAigCKEEBQaDHABAoIgRFDQAaIAIgBDYCHCAEQQA2AjggBCACNgIAIARBtP4ANgIEIARBzIABKAIAEQkANgKYR0F+IQMCQCACRQ0AIAIoAiBFDQAgAigCJCIFRQ0AIAIoAhwiAUUNACABKAIAIAJHDQAgASgCBEG0/gBrQR9LDQACQAJAIAEoAjgiBgRAIAEoAihBD0cNAQsgAUEPNgIoIAFBADYCDAwBCyAFIAIoAiggBhAeIAFBADYCOCACKAIgIQUgAUEPNgIoIAFBADYCDCAFRQ0BCyACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQAgASgCBEG0/gBrQR9LDQBBACEDIAFBADYCNCABQgA3AiwgAUEANgIgIAJBADYCCCACQgA3AhQgASgCDCIFBEAgAiAFQQFxNgIwCyABQrT+ADcCBCABQgA3AoQBIAFBADYCJCABQoCAgoAQNwMYIAFCgICAgHA3AxAgAUKBgICAcDcCjEcgASABQfwKaiIFNgK4ASABIAU2ApwBIAEgBTYCmAELQQAgA0UNABogAigCJCACKAIoIAQQHiACQQA2AhwgAwsLIgIEQCAAKAIAIgAEQCAAIAI2AgQgAEENNgIACwsgAkULKQEBfyAALQAERQRAQQAPC0ECIQEgACgCCCIAQQNOBH8gAEEHSgVBAgsLBgAgABAGC2MAQcgAEAkiAEUEQEGEhAEoAgAhASACBEAgAiABNgIEIAJBATYCAAsgAA8LIABBADoADCAAQQE6AAQgACACNgIAIABBADYCOCAAQgA3AzAgACABQQkgAUEBa0EJSRs2AgggAAukCgIIfwF+QfCAAUH0gAEgACgCdEGBCEkbIQYCQANAAkACfwJAIAAoAjxBhQJLDQAgABAvAkAgACgCPCICQYUCSw0AIAENAEEADwsgAkUNAiACQQRPDQBBAAwBCyAAIAAoAmggACgChAERAgALIQMgACAAKAJsOwFgQQIhAgJAIAA1AmggA619IgpCAVMNACAKIAAoAjBBhgJrrVUNACAAKAJwIAAoAnhPDQAgA0UNACAAIAMgBigCABECACICQQVLDQBBAiACIAAoAowBQQFGGyECCwJAIAAoAnAiA0EDSQ0AIAIgA0sNACAAIAAoAvAtIgJBAWo2AvAtIAAoAjwhBCACIAAoAuwtaiAAKAJoIgcgAC8BYEF/c2oiAjoAACAAIAAoAvAtIgVBAWo2AvAtIAUgACgC7C1qIAJBCHY6AAAgACAAKALwLSIFQQFqNgLwLSAFIAAoAuwtaiADQQNrOgAAIAAgACgCgC5BAWo2AoAuIANB/c4Aai0AAEECdCAAakHoCWoiAyADLwEAQQFqOwEAIAAgAkEBayICIAJBB3ZBgAJqIAJBgAJJG0GAywBqLQAAQQJ0akHYE2oiAiACLwEAQQFqOwEAIAAgACgCcCIFQQFrIgM2AnAgACAAKAI8IANrNgI8IAAoAvQtIQggACgC8C0hCSAEIAdqQQNrIgQgACgCaCICSwRAIAAgAkEBaiAEIAJrIgIgBUECayIEIAIgBEkbIAAoAoABEQUAIAAoAmghAgsgAEEANgJkIABBADYCcCAAIAIgA2oiBDYCaCAIIAlHDQJBACECIAAgACgCWCIDQQBOBH8gACgCSCADagVBAAsgBCADa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQIMAwsgACgCZARAIAAoAmggACgCSGpBAWstAAAhAyAAIAAoAvAtIgRBAWo2AvAtIAQgACgC7C1qQQA6AAAgACAAKALwLSIEQQFqNgLwLSAEIAAoAuwtakEAOgAAIAAgACgC8C0iBEEBajYC8C0gBCAAKALsLWogAzoAACAAIANBAnRqIgMgAy8B5AFBAWo7AeQBIAAoAvAtIAAoAvQtRgRAIAAgACgCWCIDQQBOBH8gACgCSCADagVBAAsgACgCaCADa0EAEA8gACAAKAJoNgJYIAAoAgAQCgsgACACNgJwIAAgACgCaEEBajYCaCAAIAAoAjxBAWs2AjwgACgCACgCEA0CQQAPBSAAQQE2AmQgACACNgJwIAAgACgCaEEBajYCaCAAIAAoAjxBAWs2AjwMAgsACwsgACgCZARAIAAoAmggACgCSGpBAWstAAAhAiAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qQQA6AAAgACAAKALwLSIDQQFqNgLwLSADIAAoAuwtakEAOgAAIAAgACgC8C0iA0EBajYC8C0gAyAAKALsLWogAjoAACAAIAJBAnRqIgIgAi8B5AFBAWo7AeQBIAAoAvAtIAAoAvQtRhogAEEANgJkCyAAIAAoAmgiA0ECIANBAkkbNgKELiABQQRGBEAgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyADIAFrQQEQDyAAIAAoAmg2AlggACgCABAKQQNBAiAAKAIAKAIQGw8LIAAoAvAtBEBBACECIAAgACgCWCIBQQBOBH8gACgCSCABagVBAAsgAyABa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQRQ0BC0EBIQILIAIL2BACEH8BfiAAKAKIAUEFSCEOA0ACQAJ/AkACQAJAAn8CQAJAIAAoAjxBhQJNBEAgABAvIAAoAjwiA0GFAksNASABDQFBAA8LIA4NASAIIQMgBSEHIAohDSAGQf//A3FFDQEMAwsgA0UNA0EAIANBBEkNARoLIAAgACgCaEH4gAEoAgARAgALIQZBASECQQAhDSAAKAJoIgOtIAatfSISQgFTDQIgEiAAKAIwQYYCa61VDQIgBkUNAiAAIAZB8IABKAIAEQIAIgZBASAGQfz/A3EbQQEgACgCbCINQf//A3EgA0H//wNxSRshBiADIQcLAkAgACgCPCIEIAZB//8DcSICQQRqTQ0AIAZB//8DcUEDTQRAQQEgBkEBa0H//wNxIglFDQQaIANB//8DcSIEIAdBAWpB//8DcSIDSw0BIAAgAyAJIAQgA2tBAWogAyAJaiAESxtB7IABKAIAEQUADAELAkAgACgCeEEEdCACSQ0AIARBBEkNACAGQQFrQf//A3EiDCAHQQFqQf//A3EiBGohCSAEIANB//8DcSIDTwRAQeyAASgCACELIAMgCUkEQCAAIAQgDCALEQUADAMLIAAgBCADIARrQQFqIAsRBQAMAgsgAyAJTw0BIAAgAyAJIANrQeyAASgCABEFAAwBCyAGIAdqQf//A3EiA0UNACAAIANBAWtB+IABKAIAEQIAGgsgBgwCCyAAIAAoAmgiBUECIAVBAkkbNgKELiABQQRGBEBBACEDIAAgACgCWCIBQQBOBH8gACgCSCABagVBAAsgBSABa0EBEA8gACAAKAJoNgJYIAAoAgAQCkEDQQIgACgCACgCEBsPCyAAKALwLQRAQQAhAkEAIQMgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyAFIAFrQQAQDyAAIAAoAmg2AlggACgCABAKIAAoAgAoAhBFDQMLQQEhAgwCCyADIQdBAQshBEEAIQYCQCAODQAgACgCPEGHAkkNACACIAdB//8DcSIQaiIDIAAoAkRBhgJrTw0AIAAgAzYCaEEAIQogACADQfiAASgCABECACEFAn8CQCAAKAJoIgitIAWtfSISQgFTDQAgEiAAKAIwQYYCa61VDQAgBUUNACAAIAVB8IABKAIAEQIAIQYgAC8BbCIKIAhB//8DcSIFTw0AIAZB//8DcSIDQQRJDQAgCCAEQf//A3FBAkkNARogCCACIApBAWpLDQEaIAggAiAFQQFqSw0BGiAIIAAoAkgiCSACa0EBaiICIApqLQAAIAIgBWotAABHDQEaIAggCUEBayICIApqIgwtAAAgAiAFaiIPLQAARw0BGiAIIAUgCCAAKAIwQYYCayICa0H//wNxQQAgAiAFSRsiEU0NARogCCADQf8BSw0BGiAGIQUgCCECIAQhAyAIIAoiCUECSQ0BGgNAAkAgA0EBayEDIAVBAWohCyAJQQFrIQkgAkEBayECIAxBAWsiDC0AACAPQQFrIg8tAABHDQAgA0H//wNxRQ0AIBEgAkH//wNxTw0AIAVB//8DcUH+AUsNACALIQUgCUH//wNxQQFLDQELCyAIIANB//8DcUEBSw0BGiAIIAtB//8DcUECRg0BGiAIQQFqIQggAyEEIAshBiAJIQogAgwBC0EBIQYgCAshBSAAIBA2AmgLAn8gBEH//wNxIgNBA00EQCAEQf//A3EiA0UNAyAAKAJIIAdB//8DcWotAAAhBCAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qQQA6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtakEAOgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWogBDoAACAAIARBAnRqIgRB5AFqIAQvAeQBQQFqOwEAIAAgACgCPEEBazYCPCAAKALwLSICIAAoAvQtRiIEIANBAUYNARogACgCSCAHQQFqQf//A3FqLQAAIQkgACACQQFqNgLwLSAAKALsLSACakEAOgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWpBADoAACAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qIAk6AAAgACAJQQJ0aiICQeQBaiACLwHkAUEBajsBACAAIAAoAjxBAWs2AjwgBCAAKALwLSICIAAoAvQtRmoiBCADQQJGDQEaIAAoAkggB0ECakH//wNxai0AACEHIAAgAkEBajYC8C0gACgC7C0gAmpBADoAACAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qQQA6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtaiAHOgAAIAAgB0ECdGoiB0HkAWogBy8B5AFBAWo7AQAgACAAKAI8QQFrNgI8IAQgACgC8C0gACgC9C1GagwBCyAAIAAoAvAtIgJBAWo2AvAtIAIgACgC7C1qIAdB//8DcSANQf//A3FrIgc6AAAgACAAKALwLSICQQFqNgLwLSACIAAoAuwtaiAHQQh2OgAAIAAgACgC8C0iAkEBajYC8C0gAiAAKALsLWogBEEDazoAACAAIAAoAoAuQQFqNgKALiADQf3OAGotAABBAnQgAGpB6AlqIgQgBC8BAEEBajsBACAAIAdBAWsiBCAEQQd2QYACaiAEQYACSRtBgMsAai0AAEECdGpB2BNqIgQgBC8BAEEBajsBACAAIAAoAjwgA2s2AjwgACgC8C0gACgC9C1GCyEEIAAgACgCaCADaiIHNgJoIARFDQFBACECQQAhBCAAIAAoAlgiA0EATgR/IAAoAkggA2oFQQALIAcgA2tBABAPIAAgACgCaDYCWCAAKAIAEAogACgCACgCEA0BCwsgAgu0BwIEfwF+AkADQAJAAkACQAJAIAAoAjxBhQJNBEAgABAvAkAgACgCPCICQYUCSw0AIAENAEEADwsgAkUNBCACQQRJDQELIAAgACgCaEH4gAEoAgARAgAhAiAANQJoIAKtfSIGQgFTDQAgBiAAKAIwQYYCa61VDQAgAkUNACAAIAJB8IABKAIAEQIAIgJBBEkNACAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qIAAoAmggACgCbGsiAzoAACAAIAAoAvAtIgRBAWo2AvAtIAQgACgC7C1qIANBCHY6AAAgACAAKALwLSIEQQFqNgLwLSAEIAAoAuwtaiACQQNrOgAAIAAgACgCgC5BAWo2AoAuIAJB/c4Aai0AAEECdCAAakHoCWoiBCAELwEAQQFqOwEAIAAgA0EBayIDIANBB3ZBgAJqIANBgAJJG0GAywBqLQAAQQJ0akHYE2oiAyADLwEAQQFqOwEAIAAgACgCPCACayIFNgI8IAAoAvQtIQMgACgC8C0hBCAAKAJ4IAJPQQAgBUEDSxsNASAAIAAoAmggAmoiAjYCaCAAIAJBAWtB+IABKAIAEQIAGiADIARHDQQMAgsgACgCSCAAKAJoai0AACECIAAgACgC8C0iA0EBajYC8C0gAyAAKALsLWpBADoAACAAIAAoAvAtIgNBAWo2AvAtIAMgACgC7C1qQQA6AAAgACAAKALwLSIDQQFqNgLwLSADIAAoAuwtaiACOgAAIAAgAkECdGoiAkHkAWogAi8B5AFBAWo7AQAgACAAKAI8QQFrNgI8IAAgACgCaEEBajYCaCAAKALwLSAAKAL0LUcNAwwBCyAAIAAoAmhBAWoiBTYCaCAAIAUgAkEBayICQeyAASgCABEFACAAIAAoAmggAmo2AmggAyAERw0CC0EAIQNBACECIAAgACgCWCIEQQBOBH8gACgCSCAEagVBAAsgACgCaCAEa0EAEA8gACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQEMAgsLIAAgACgCaCIEQQIgBEECSRs2AoQuIAFBBEYEQEEAIQIgACAAKAJYIgFBAE4EfyAAKAJIIAFqBUEACyAEIAFrQQEQDyAAIAAoAmg2AlggACgCABAKQQNBAiAAKAIAKAIQGw8LIAAoAvAtBEBBACEDQQAhAiAAIAAoAlgiAUEATgR/IAAoAkggAWoFQQALIAQgAWtBABAPIAAgACgCaDYCWCAAKAIAEAogACgCACgCEEUNAQtBASEDCyADC80JAgl/An4gAUEERiEGIAAoAiwhAgJAAkACQCABQQRGBEAgAkECRg0CIAIEQCAAQQAQUCAAQQA2AiwgACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQRQ0ECyAAIAYQTyAAQQI2AiwMAQsgAg0BIAAoAjxFDQEgACAGEE8gAEEBNgIsCyAAIAAoAmg2AlgLQQJBASABQQRGGyEKA0ACQCAAKAIMIAAoAhBBCGpLDQAgACgCABAKIAAoAgAiAigCEA0AQQAhAyABQQRHDQIgAigCBA0CIAAoAqAuDQIgACgCLEVBAXQPCwJAAkAgACgCPEGFAk0EQCAAEC8CQCAAKAI8IgNBhQJLDQAgAQ0AQQAPCyADRQ0CIAAoAiwEfyADBSAAIAYQTyAAIAo2AiwgACAAKAJoNgJYIAAoAjwLQQRJDQELIAAgACgCaEH4gAEoAgARAgAhBCAAKAJoIgKtIAStfSILQgFTDQAgCyAAKAIwQYYCa61VDQAgAiAAKAJIIgJqIgMvAAAgAiAEaiICLwAARw0AIANBAmogAkECakHQgAEoAgARAgBBAmoiA0EESQ0AIAAoAjwiAiADIAIgA0kbIgJBggIgAkGCAkkbIgdB/c4Aai0AACICQQJ0IgRBhMkAajMBACEMIARBhskAai8BACEDIAJBCGtBE00EQCAHQQNrIARBgNEAaigCAGutIAOthiAMhCEMIARBsNYAaigCACADaiEDCyAAKAKgLiEFIAMgC6dBAWsiCCAIQQd2QYACaiAIQYACSRtBgMsAai0AACICQQJ0IglBgsoAai8BAGohBCAJQYDKAGozAQAgA62GIAyEIQsgACkDmC4hDAJAIAUgAkEESQR/IAQFIAggCUGA0gBqKAIAa60gBK2GIAuEIQsgCUGw1wBqKAIAIARqCyICaiIDQT9NBEAgCyAFrYYgDIQhCwwBCyAFQcAARgRAIAAoAgQgACgCEGogDDcAACAAIAAoAhBBCGo2AhAgAiEDDAELIAAoAgQgACgCEGogCyAFrYYgDIQ3AAAgACAAKAIQQQhqNgIQIANBQGohAyALQcAAIAVrrYghCwsgACALNwOYLiAAIAM2AqAuIAAgACgCPCAHazYCPCAAIAAoAmggB2o2AmgMAgsgACgCSCAAKAJoai0AAEECdCICQYDBAGozAQAhCyAAKQOYLiEMAkAgACgCoC4iBCACQYLBAGovAQAiAmoiA0E/TQRAIAsgBK2GIAyEIQsMAQsgBEHAAEYEQCAAKAIEIAAoAhBqIAw3AAAgACAAKAIQQQhqNgIQIAIhAwwBCyAAKAIEIAAoAhBqIAsgBK2GIAyENwAAIAAgACgCEEEIajYCECADQUBqIQMgC0HAACAEa62IIQsLIAAgCzcDmC4gACADNgKgLiAAIAAoAmhBAWo2AmggACAAKAI8QQFrNgI8DAELCyAAIAAoAmgiAkECIAJBAkkbNgKELiAAKAIsIQIgAUEERgRAAkAgAkUNACAAQQEQUCAAQQA2AiwgACAAKAJoNgJYIAAoAgAQCiAAKAIAKAIQDQBBAg8LQQMPCyACBEBBACEDIABBABBQIABBADYCLCAAIAAoAmg2AlggACgCABAKIAAoAgAoAhBFDQELQQEhAwsgAwucAQEFfyACQQFOBEAgAiAAKAJIIAFqIgNqQQJqIQQgA0ECaiECIAAoAlQhAyAAKAJQIQUDQCAAIAItAAAgA0EFdEHg/wFxcyIDNgJUIAUgA0EBdGoiBi8BACIHIAFB//8DcUcEQCAAKAJMIAEgACgCOHFB//8DcUEBdGogBzsBACAGIAE7AQALIAFBAWohASACQQFqIgIgBEkNAAsLC1sBAn8gACAAKAJIIAFqLQACIAAoAlRBBXRB4P8BcXMiAjYCVCABIAAoAlAgAkEBdGoiAy8BACICRwRAIAAoAkwgACgCOCABcUEBdGogAjsBACADIAE7AQALIAILEwAgAUEFdEHg/wFxIAJB/wFxcwsGACABEAYLLwAjAEEQayIAJAAgAEEMaiABIAJsEIwBIQEgACgCDCECIABBEGokAEEAIAIgARsLjAoCAX4CfyMAQfAAayIGJAACQAJAAkACQAJAAkACQAJAIAQODwABBwIEBQYGBgYGBgYGAwYLQn8hBQJAIAAgBkHkAGpCDBARIgNCf1cEQCABBEAgASAAKAIMNgIAIAEgACgCEDYCBAsMAQsCQCADQgxSBEAgAQRAIAFBADYCBCABQRE2AgALDAELIAEoAhQhBEEAIQJCASEFA0AgBkHkAGogAmoiAiACLQAAIARB/f8DcSICQQJyIAJBA3NsQQh2cyICOgAAIAYgAjoAKCABAn8gASgCDEF/cyECQQAgBkEoaiIERQ0AGiACIARBAUHUgAEoAgARAAALQX9zIgI2AgwgASABKAIQIAJB/wFxakGFiKLAAGxBAWoiAjYCECAGIAJBGHY6ACggAQJ/IAEoAhRBf3MhAkEAIAZBKGoiBEUNABogAiAEQQFB1IABKAIAEQAAC0F/cyIENgIUIAVCDFIEQCAFpyECIAVCAXwhBQwBCwtCACEFIAAgBkEoahAhQQBIDQEgBigCUCEAIwBBEGsiAiQAIAIgADYCDCAGAn8gAkEMahCNASIARQRAIAZBITsBJEEADAELAn8gACgCFCIEQdAATgRAIARBCXQMAQsgAEHQADYCFEGAwAILIQQgBiAAKAIMIAQgACgCEEEFdGpqQaDAAWo7ASQgACgCBEEFdCAAKAIIQQt0aiAAKAIAQQF2ags7ASYgAkEQaiQAIAYtAG8iACAGLQBXRg0BIAYtACcgAEYNASABBEAgAUEANgIEIAFBGzYCAAsLQn8hBQsgBkHwAGokACAFDwtCfyEFIAAgAiADEBEiA0J/VwRAIAEEQCABIAAoAgw2AgAgASAAKAIQNgIECwwGCyMAQRBrIgAkAAJAIANQDQAgASgCFCEEIAJFBEBCASEFA0AgACACIAdqLQAAIARB/f8DcSIEQQJyIARBA3NsQQh2czoADyABAn8gASgCDEF/cyEEQQAgAEEPaiIHRQ0AGiAEIAdBAUHUgAEoAgARAAALQX9zIgQ2AgwgASABKAIQIARB/wFxakGFiKLAAGxBAWoiBDYCECAAIARBGHY6AA8gAQJ/IAEoAhRBf3MhBEEAIABBD2oiB0UNABogBCAHQQFB1IABKAIAEQAAC0F/cyIENgIUIAMgBVENAiAFpyEHIAVCAXwhBQwACwALQgEhBQNAIAAgAiAHai0AACAEQf3/A3EiBEECciAEQQNzbEEIdnMiBDoADyACIAdqIAQ6AAAgAQJ/IAEoAgxBf3MhBEEAIABBD2oiB0UNABogBCAHQQFB1IABKAIAEQAAC0F/cyIENgIMIAEgASgCECAEQf8BcWpBhYiiwABsQQFqIgQ2AhAgACAEQRh2OgAPIAECfyABKAIUQX9zIQRBACAAQQ9qIgdFDQAaIAQgB0EBQdSAASgCABEAAAtBf3MiBDYCFCADIAVRDQEgBachByAFQgF8IQUMAAsACyAAQRBqJAAgAyEFDAULIAJBADsBMiACIAIpAwAiA0KAAYQ3AwAgA0IIg1ANBCACIAIpAyBCDH03AyAMBAsgBkKFgICAcDcDECAGQoOAgIDAADcDCCAGQoGAgIAgNwMAQQAgBhAkIQUMAwsgA0IIWgR+IAIgASgCADYCACACIAEoAgQ2AgRCCAVCfwshBQwCCyABEAYMAQsgAQRAIAFBADYCBCABQRI2AgALQn8hBQsgBkHwAGokACAFC60DAgJ/An4jAEEQayIGJAACQAJAAkAgBEUNACABRQ0AIAJBAUYNAQtBACEDIABBCGoiAARAIABBADYCBCAAQRI2AgALDAELIANBAXEEQEEAIQMgAEEIaiIABEAgAEEANgIEIABBGDYCAAsMAQtBGBAJIgVFBEBBACEDIABBCGoiAARAIABBADYCBCAAQQ42AgALDAELIAVBADYCCCAFQgA3AgAgBUGQ8dmiAzYCFCAFQvis0ZGR8dmiIzcCDAJAIAQQIiICRQ0AIAKtIQhBACEDQYfTru5+IQJCASEHA0AgBiADIARqLQAAOgAPIAUgBkEPaiIDBH8gAiADQQFB1IABKAIAEQAABUEAC0F/cyICNgIMIAUgBSgCECACQf8BcWpBhYiiwABsQQFqIgI2AhAgBiACQRh2OgAPIAUCfyAFKAIUQX9zIQJBACAGQQ9qIgNFDQAaIAIgA0EBQdSAASgCABEAAAtBf3M2AhQgByAIUQ0BIAUoAgxBf3MhAiAHpyEDIAdCAXwhBwwACwALIAAgAUElIAUQQiIDDQAgBRAGQQAhAwsgBkEQaiQAIAMLnRoCBn4FfyMAQdAAayILJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDhQFBhULAwQJDgACCBAKDw0HEQERDBELAkBByAAQCSIBBEAgAUIANwMAIAFCADcDMCABQQA2AiggAUIANwMgIAFCADcDGCABQgA3AxAgAUIANwMIIAFCADcDOCABQQgQCSIDNgIEIAMNASABEAYgAARAIABBADYCBCAAQQ42AgALCyAAQQA2AhQMFAsgA0IANwMAIAAgATYCFCABQUBrQgA3AwAgAUIANwM4DBQLAkACQCACUARAQcgAEAkiA0UNFCADQgA3AwAgA0IANwMwIANBADYCKCADQgA3AyAgA0IANwMYIANCADcDECADQgA3AwggA0IANwM4IANBCBAJIgE2AgQgAQ0BIAMQBiAABEAgAEEANgIEIABBDjYCAAsMFAsgAiAAKAIQIgEpAzBWBEAgAARAIABBADYCBCAAQRI2AgALDBQLIAEoAigEQCAABEAgAEEANgIEIABBHTYCAAsMFAsgASgCBCEDAkAgASkDCCIGQgF9IgdQDQADQAJAIAIgAyAHIAR9QgGIIAR8IgWnQQN0aikDAFQEQCAFQgF9IQcMAQsgBSAGUQRAIAYhBQwDCyADIAVCAXwiBKdBA3RqKQMAIAJWDQILIAQhBSAEIAdUDQALCwJAIAIgAyAFpyIKQQN0aikDAH0iBFBFBEAgASgCACIDIApBBHRqKQMIIQcMAQsgASgCACIDIAVCAX0iBadBBHRqKQMIIgchBAsgAiAHIAR9VARAIAAEQCAAQQA2AgQgAEEcNgIACwwUCyADIAVCAXwiBUEAIAAQiQEiA0UNEyADKAIAIAMoAggiCkEEdGpBCGsgBDcDACADKAIEIApBA3RqIAI3AwAgAyACNwMwIAMgASkDGCIGIAMpAwgiBEIBfSIHIAYgB1QbNwMYIAEgAzYCKCADIAE2AiggASAENwMgIAMgBTcDIAwBCyABQgA3AwALIAAgAzYCFCADIAQ3A0AgAyACNwM4QgAhBAwTCyAAKAIQIgEEQAJAIAEoAigiA0UEQCABKQMYIQIMAQsgA0EANgIoIAEoAihCADcDICABIAEpAxgiAiABKQMgIgUgAiAFVhsiAjcDGAsgASkDCCACVgRAA0AgASgCACACp0EEdGooAgAQBiACQgF8IgIgASkDCFQNAAsLIAEoAgAQBiABKAIEEAYgARAGCyAAKAIUIQEgAEEANgIUIAAgATYCEAwSCyACQghaBH4gASAAKAIANgIAIAEgACgCBDYCBEIIBUJ/CyEEDBELIAAoAhAiAQRAAkAgASgCKCIDRQRAIAEpAxghAgwBCyADQQA2AiggASgCKEIANwMgIAEgASkDGCICIAEpAyAiBSACIAVWGyICNwMYCyABKQMIIAJWBEADQCABKAIAIAKnQQR0aigCABAGIAJCAXwiAiABKQMIVA0ACwsgASgCABAGIAEoAgQQBiABEAYLIAAoAhQiAQRAAkAgASgCKCIDRQRAIAEpAxghAgwBCyADQQA2AiggASgCKEIANwMgIAEgASkDGCICIAEpAyAiBSACIAVWGyICNwMYCyABKQMIIAJWBEADQCABKAIAIAKnQQR0aigCABAGIAJCAXwiAiABKQMIVA0ACwsgASgCABAGIAEoAgQQBiABEAYLIAAQBgwQCyAAKAIQIgBCADcDOCAAQUBrQgA3AwAMDwsgAkJ/VwRAIAAEQCAAQQA2AgQgAEESNgIACwwOCyACIAAoAhAiAykDMCADKQM4IgZ9IgUgAiAFVBsiBVANDiABIAMpA0AiB6ciAEEEdCIBIAMoAgBqIgooAgAgBiADKAIEIABBA3RqKQMAfSICp2ogBSAKKQMIIAJ9IgYgBSAGVBsiBKcQByEKIAcgBCADKAIAIgAgAWopAwggAn1RrXwhAiAFIAZWBEADQCAKIASnaiAAIAKnQQR0IgFqIgAoAgAgBSAEfSIGIAApAwgiByAGIAdUGyIGpxAHGiACIAYgAygCACIAIAFqKQMIUa18IQIgBSAEIAZ8IgRWDQALCyADIAI3A0AgAyADKQM4IAR8NwM4DA4LQn8hBEHIABAJIgNFDQ0gA0IANwMAIANCADcDMCADQQA2AiggA0IANwMgIANCADcDGCADQgA3AxAgA0IANwMIIANCADcDOCADQQgQCSIBNgIEIAFFBEAgAxAGIAAEQCAAQQA2AgQgAEEONgIACwwOCyABQgA3AwAgACgCECIBBEACQCABKAIoIgpFBEAgASkDGCEEDAELIApBADYCKCABKAIoQgA3AyAgASABKQMYIgIgASkDICIFIAIgBVYbIgQ3AxgLIAEpAwggBFYEQANAIAEoAgAgBKdBBHRqKAIAEAYgBEIBfCIEIAEpAwhUDQALCyABKAIAEAYgASgCBBAGIAEQBgsgACADNgIQQgAhBAwNCyAAKAIUIgEEQAJAIAEoAigiA0UEQCABKQMYIQIMAQsgA0EANgIoIAEoAihCADcDICABIAEpAxgiAiABKQMgIgUgAiAFVhsiAjcDGAsgASkDCCACVgRAA0AgASgCACACp0EEdGooAgAQBiACQgF8IgIgASkDCFQNAAsLIAEoAgAQBiABKAIEEAYgARAGCyAAQQA2AhQMDAsgACgCECIDKQM4IAMpAzAgASACIAAQRCIHQgBTDQogAyAHNwM4AkAgAykDCCIGQgF9IgJQDQAgAygCBCEAA0ACQCAHIAAgAiAEfUIBiCAEfCIFp0EDdGopAwBUBEAgBUIBfSECDAELIAUgBlEEQCAGIQUMAwsgACAFQgF8IgSnQQN0aikDACAHVg0CCyAEIQUgAiAEVg0ACwsgAyAFNwNAQgAhBAwLCyAAKAIUIgMpAzggAykDMCABIAIgABBEIgdCAFMNCSADIAc3AzgCQCADKQMIIgZCAX0iAlANACADKAIEIQADQAJAIAcgACACIAR9QgGIIAR8IgWnQQN0aikDAFQEQCAFQgF9IQIMAQsgBSAGUQRAIAYhBQwDCyAAIAVCAXwiBKdBA3RqKQMAIAdWDQILIAQhBSACIARWDQALCyADIAU3A0BCACEEDAoLIAJCN1gEQCAABEAgAEEANgIEIABBEjYCAAsMCQsgARAqIAEgACgCDDYCKCAAKAIQKQMwIQIgAUEANgIwIAEgAjcDICABIAI3AxggAULcATcDAEI4IQQMCQsgACABKAIANgIMDAgLIAtBQGtBfzYCACALQouAgICwAjcDOCALQoyAgIDQATcDMCALQo+AgICgATcDKCALQpGAgICQATcDICALQoeAgICAATcDGCALQoWAgIDgADcDECALQoOAgIDAADcDCCALQoGAgIAgNwMAQQAgCxAkIQQMBwsgACgCECkDOCIEQn9VDQYgAARAIABBPTYCBCAAQR42AgALDAULIAAoAhQpAzgiBEJ/VQ0FIAAEQCAAQT02AgQgAEEeNgIACwwEC0J/IQQgAkJ/VwRAIAAEQCAAQQA2AgQgAEESNgIACwwFCyACIAAoAhQiAykDOCACfCIFQv//A3wiBFYEQCAABEAgAEEANgIEIABBEjYCAAsMBAsCQCAFIAMoAgQiCiADKQMIIganQQN0aikDACIHWA0AAkAgBCAHfUIQiCAGfCIIIAMpAxAiCVgNAEIQIAkgCVAbIQUDQCAFIgRCAYYhBSAEIAhUDQALIAQgCVQNACADKAIAIASnIgpBBHQQNCIMRQ0DIAMgDDYCACADKAIEIApBA3RBCGoQNCIKRQ0DIAMgBDcDECADIAo2AgQgAykDCCEGCyAGIAhaDQAgAygCACEMA0AgDCAGp0EEdGoiDUGAgAQQCSIONgIAIA5FBEAgAARAIABBADYCBCAAQQ42AgALDAYLIA1CgIAENwMIIAMgBkIBfCIFNwMIIAogBadBA3RqIAdCgIAEfCIHNwMAIAMpAwgiBiAIVA0ACwsgAykDQCEFIAMpAzghBwJAIAJQBEBCACEEDAELIAWnIgBBBHQiDCADKAIAaiINKAIAIAcgCiAAQQN0aikDAH0iBqdqIAEgAiANKQMIIAZ9IgcgAiAHVBsiBKcQBxogBSAEIAMoAgAiACAMaikDCCAGfVGtfCEFIAIgB1YEQANAIAAgBadBBHQiCmoiACgCACABIASnaiACIAR9IgYgACkDCCIHIAYgB1QbIganEAcaIAUgBiADKAIAIgAgCmopAwhRrXwhBSAEIAZ8IgQgAlQNAAsLIAMpAzghBwsgAyAFNwNAIAMgBCAHfCICNwM4IAIgAykDMFgNBCADIAI3AzAMBAsgAARAIABBADYCBCAAQRw2AgALDAILIAAEQCAAQQA2AgQgAEEONgIACyAABEAgAEEANgIEIABBDjYCAAsMAQsgAEEANgIUC0J/IQQLIAtB0ABqJAAgBAtIAQF/IABCADcCBCAAIAE2AgACQCABQQBIDQBBsBMoAgAgAUwNACABQQJ0QcATaigCAEEBRw0AQYSEASgCACECCyAAIAI2AgQLDgAgAkGx893xeWxBEHYLvgEAIwBBEGsiACQAIABBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAQRBqJAAgAkGx893xeWxBEHYLuQEBAX8jAEEQayIBJAAgAUEAOgAIQYCBAUECNgIAQfyAAUEDNgIAQfiAAUEENgIAQfSAAUEFNgIAQfCAAUEGNgIAQeyAAUEHNgIAQeiAAUEINgIAQeSAAUEJNgIAQeCAAUEKNgIAQdyAAUELNgIAQdiAAUEMNgIAQdSAAUENNgIAQdCAAUEONgIAQcyAAUEPNgIAQciAAUEQNgIAQcSAAUERNgIAQcCAAUESNgIAIAAQjgEgAUEQaiQAC78BAQF/IwBBEGsiAiQAIAJBADoACEGAgQFBAjYCAEH8gAFBAzYCAEH4gAFBBDYCAEH0gAFBBTYCAEHwgAFBBjYCAEHsgAFBBzYCAEHogAFBCDYCAEHkgAFBCTYCAEHggAFBCjYCAEHcgAFBCzYCAEHYgAFBDDYCAEHUgAFBDTYCAEHQgAFBDjYCAEHMgAFBDzYCAEHIgAFBEDYCAEHEgAFBETYCAEHAgAFBEjYCACAAIAEQkAEhACACQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFohACACQRBqJAAgAAu+AQEBfyMAQRBrIgIkACACQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABEFshACACQRBqJAAgAAu9AQEBfyMAQRBrIgMkACADQQA6AAhBgIEBQQI2AgBB/IABQQM2AgBB+IABQQQ2AgBB9IABQQU2AgBB8IABQQY2AgBB7IABQQc2AgBB6IABQQg2AgBB5IABQQk2AgBB4IABQQo2AgBB3IABQQs2AgBB2IABQQw2AgBB1IABQQ02AgBB0IABQQ42AgBBzIABQQ82AgBByIABQRA2AgBBxIABQRE2AgBBwIABQRI2AgAgACABIAIQjwEgA0EQaiQAC4UBAgR/AX4jAEEQayIBJAACQCAAKQMwUARADAELA0ACQCAAIAVBACABQQ9qIAFBCGoQZiIEQX9GDQAgAS0AD0EDRw0AIAIgASgCCEGAgICAf3FBgICAgHpGaiECC0F/IQMgBEF/Rg0BIAIhAyAFQgF8IgUgACkDMFQNAAsLIAFBEGokACADCwuMdSUAQYAIC7ELaW5zdWZmaWNpZW50IG1lbW9yeQBuZWVkIGRpY3Rpb25hcnkALSsgICAwWDB4AFppcCBhcmNoaXZlIGluY29uc2lzdGVudABJbnZhbGlkIGFyZ3VtZW50AGludmFsaWQgbGl0ZXJhbC9sZW5ndGhzIHNldABpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXQAdW5rbm93biBoZWFkZXIgZmxhZ3Mgc2V0AGludmFsaWQgZGlzdGFuY2VzIHNldABpbnZhbGlkIGJpdCBsZW5ndGggcmVwZWF0AEZpbGUgYWxyZWFkeSBleGlzdHMAdG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHMAaW52YWxpZCBzdG9yZWQgYmxvY2sgbGVuZ3RocwAlcyVzJXMAYnVmZmVyIGVycm9yAE5vIGVycm9yAHN0cmVhbSBlcnJvcgBUZWxsIGVycm9yAEludGVybmFsIGVycm9yAFNlZWsgZXJyb3IAV3JpdGUgZXJyb3IAZmlsZSBlcnJvcgBSZWFkIGVycm9yAFpsaWIgZXJyb3IAZGF0YSBlcnJvcgBDUkMgZXJyb3IAaW5jb21wYXRpYmxlIHZlcnNpb24AaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrAGluY29ycmVjdCBoZWFkZXIgY2hlY2sAaW5jb3JyZWN0IGxlbmd0aCBjaGVjawBpbmNvcnJlY3QgZGF0YSBjaGVjawBpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjawBoZWFkZXIgY3JjIG1pc21hdGNoADEuMi4xMy56bGliLW5nAGludmFsaWQgd2luZG93IHNpemUAUmVhZC1vbmx5IGFyY2hpdmUATm90IGEgemlwIGFyY2hpdmUAUmVzb3VyY2Ugc3RpbGwgaW4gdXNlAE1hbGxvYyBmYWlsdXJlAGludmFsaWQgYmxvY2sgdHlwZQBGYWlsdXJlIHRvIGNyZWF0ZSB0ZW1wb3JhcnkgZmlsZQBDYW4ndCBvcGVuIGZpbGUATm8gc3VjaCBmaWxlAFByZW1hdHVyZSBlbmQgb2YgZmlsZQBDYW4ndCByZW1vdmUgZmlsZQBpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUAaW52YWxpZCBkaXN0YW5jZSBjb2RlAHVua25vd24gY29tcHJlc3Npb24gbWV0aG9kAHN0cmVhbSBlbmQAQ29tcHJlc3NlZCBkYXRhIGludmFsaWQATXVsdGktZGlzayB6aXAgYXJjaGl2ZXMgbm90IHN1cHBvcnRlZABPcGVyYXRpb24gbm90IHN1cHBvcnRlZABFbmNyeXB0aW9uIG1ldGhvZCBub3Qgc3VwcG9ydGVkAENvbXByZXNzaW9uIG1ldGhvZCBub3Qgc3VwcG9ydGVkAEVudHJ5IGhhcyBiZWVuIGRlbGV0ZWQAQ29udGFpbmluZyB6aXAgYXJjaGl2ZSB3YXMgY2xvc2VkAENsb3NpbmcgemlwIGFyY2hpdmUgZmFpbGVkAFJlbmFtaW5nIHRlbXBvcmFyeSBmaWxlIGZhaWxlZABFbnRyeSBoYXMgYmVlbiBjaGFuZ2VkAE5vIHBhc3N3b3JkIHByb3ZpZGVkAFdyb25nIHBhc3N3b3JkIHByb3ZpZGVkAFVua25vd24gZXJyb3IgJWQAQUUAKG51bGwpADogAFBLBgcAUEsGBgBQSwUGAFBLAwQAUEsBAgAAAAA/BQAAwAcAAJMIAAB4CAAAbwUAAJEFAAB6BQAAsgUAAFYIAAAbBwAA1gQAAAsHAADqBgAAnAUAAMgGAACyCAAAHggAACgHAABHBAAAoAYAAGAFAAAuBAAAPgcAAD8IAAD+BwAAjgYAAMkIAADeCAAA5gcAALIGAABVBQAAqAcAACAAQcgTCxEBAAAAAQAAAAEAAAABAAAAAQBB7BMLCQEAAAABAAAAAgBBmBQLAQEAQbgUCwEBAEHSFAukLDomOyZlJmYmYyZgJiIg2CXLJdklQiZAJmomayY8JrolxCWVITwgtgCnAKwlqCGRIZMhkiGQIR8ilCGyJbwlIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AAIjxwD8AOkA4gDkAOAA5QDnAOoA6wDoAO8A7gDsAMQAxQDJAOYAxgD0APYA8gD7APkA/wDWANwAogCjAKUApyCSAeEA7QDzAPoA8QDRAKoAugC/ABAjrAC9ALwAoQCrALsAkSWSJZMlAiUkJWElYiVWJVUlYyVRJVclXSVcJVslECUUJTQlLCUcJQAlPCVeJV8lWiVUJWklZiVgJVAlbCVnJWglZCVlJVklWCVSJVMlayVqJRglDCWIJYQljCWQJYAlsQPfAJMDwAOjA8MDtQDEA6YDmAOpA7QDHiLGA7UDKSJhIrEAZSJkIiAjISP3AEgisAAZIrcAGiJ/ILIAoCWgAAAAAACWMAd3LGEO7rpRCZkZxG0Hj/RqcDWlY+mjlWSeMojbDqS43Hke6dXgiNnSlytMtgm9fLF+By2455Edv5BkELcd8iCwakhxufPeQb6EfdTaGuvk3W1RtdT0x4XTg1aYbBPAqGtkevli/ezJZYpPXAEU2WwGY2M9D/r1DQiNyCBuO14QaUzkQWDVcnFnotHkAzxH1ARL/YUN0mu1CqX6qLU1bJiyQtbJu9tA+bys42zYMnVc30XPDdbcWT3Rq6ww2SY6AN5RgFHXyBZh0L+19LQhI8SzVpmVus8Ppb24nrgCKAiIBV+y2QzGJOkLsYd8by8RTGhYqx1hwT0tZraQQdx2BnHbAbwg0pgqENXviYWxcR+1tgal5L+fM9S46KLJB3g0+QAPjqgJlhiYDuG7DWp/LT1tCJdsZJEBXGPm9FFra2JhbBzYMGWFTgBi8u2VBmx7pQEbwfQIglfED/XG2bBlUOm3Euq4vot8iLn83x3dYkkt2hXzfNOMZUzU+1hhsk3OUbU6dAC8o+Iwu9RBpd9K15XYPW3E0aT79NbTaulpQ/zZbjRGiGet0Lhg2nMtBETlHQMzX0wKqsl8Dd08cQVQqkECJxAQC76GIAzJJbVoV7OFbyAJ1Ga5n+Rhzg753l6YydkpIpjQsLSo18cXPbNZgQ20LjtcvbetbLrAIIO47bazv5oM4rYDmtKxdDlH1eqvd9KdFSbbBIMW3HMSC2PjhDtklD5qbQ2oWmp6C88O5J3/CZMnrgAKsZ4HfUSTD/DSowiHaPIBHv7CBmldV2L3y2dlgHE2bBnnBmtudhvU/uAr04laetoQzErdZ2/fufn5776OQ763F9WOsGDoo9bWfpPRocTC2DhS8t9P8We70WdXvKbdBrU/SzaySNorDdhMGwqv9koDNmB6BEHD72DfVd9nqO+ObjF5vmlGjLNhyxqDZryg0m8lNuJoUpV3DMwDRwu7uRYCIi8mBVW+O7rFKAu9spJatCsEarNcp//XwjHP0LWLntksHa7eW7DCZJsm8mPsnKNqdQqTbQKpBgmcPzYO64VnB3ITVwAFgkq/lRR6uOKuK7F7OBu2DJuO0pINvtXlt+/cfCHf2wvU0tOGQuLU8fiz3Whug9ofzRa+gVsmufbhd7Bvd0e3GOZaCIhwag//yjsGZlwLARH/nmWPaa5i+NP/a2FFz2wWeOIKoO7SDddUgwROwrMDOWEmZ6f3FmDQTUdpSdt3bj5KatGu3FrW2WYL30DwO9g3U668qcWeu95/z7JH6f+1MBzyvb2KwrrKMJOzU6ajtCQFNtC6kwbXzSlX3lS/Z9kjLnpms7hKYcQCG2hdlCtvKje+C7ShjgzDG98FWo3vAi0AAAAARjtnZYx2zsrKTamvWevtTh/QiivVnSOEk6ZE4bLW25307bz4PqAVV3ibcjLrPTbTrQZRtmdL+BkhcJ98JavG4GOQoYWp3Qgq7+ZvT3xAK646e0zL8DblZLYNggGXfR190UZ6GBsL07ddMLTSzpbwM4itl1ZC4D75BNtZnAtQ/BpNa5t/hyYy0MEdVbVSuxFUFIB2Md7N356Y9rj7uYYnh/+9QOI18OlNc8uOKOBtysmmVq2sbBsEAyogY2Yu+zr6aMBdn6KN9DDktpNVdxDXtDErsNH7Zhl+vV1+G5wt4WfaFoYCEFsvrVZgSMjFxgwpg/1rTEmwwuMPi6WGFqD4NVCbn1Ca1jb/3O1Rmk9LFXsJcHIewz3bsYUGvNSkdiOo4k1EzSgA7WJuO4oH/Z3O5rumqYNx6wAsN9BnSTMLPtV1MFmwv33wH/lGl3pq4NObLNu0/uaWHVGgrXo0gd3lSMfmgi0NqyuCS5BM59g2CAaeDW9jVEDGzBJ7oakd8AQvW8tjSpGGyuXXva2ARBvpYQIgjgTIbSerjlZAzq8m37LpHbjXI1AReGVrdh32zTL8sPZVmXq7/DY8gJtTOFvCz35gpaq0LQwF8hZrYGGwL4Eni0jk7cbhS6v9hi6KjRlSzLZ+Nwb715hAwLD902b0HJVdk3lfEDrWGStdsyxA8Wtqe5YOoDY/oeYNWMR1qxwlM5B7QPnd0u+/5rWKnpYq9titTZMS4OQ8VNuDWcd9x7iBRqDdSwsJcg0wbhcJ6zeLT9BQ7oWd+UHDpp4kUADaxRY7vaDcdhQPmk1zars97Bb9BotzN0si3HFwRbni1gFYpO1mPW6gz5Iom6j3JxANcWErahSrZsO77V2k3n774D84wIda8o0u9bS2SZCVxtbs0/2xiRmwGCZfi39DzC07oooWXMdAW/VoBmCSDQK7y5FEgKz0js0FW8j2Yj5bUCbfHWtButcm6BWRHY9wsG0QDPZWd2k8G97GeiC5o+mG/UKvvZonZfAziCPLVO064AlefNtuO7aWx5TwraDxYwvkECUwg3XvfSraqUZNv4g20sPODbWmBEAcCUJ7e2zR3T+Nl+ZY6F2r8UcbkJYiH0vPvllwqNuTPQF01QZmEUagIvAAm0WVytbsOozti1+tnRQj66ZzRiHr2uln0L2M9Hb5bbJNngh4ADenPjtQwjGw9UR3i5IhvcY7jvv9XOtoWxgKLmB/b+Qt1sCiFrGlg2Yu2cVdSbwPEOATSSuHdtqNw5ectqTyVvsNXRDAajgUGzOkUiBUwZht/W7eVpoLTfDe6gvLuY/BhhAgh713RabN6Dng9o9cKrsm82yAQZb/JgV3uR1iEnNQy701a6zYAAAAAFiA4tfxBrR0qYZWo+INaOm6jYo+EwvcnUuLPkqFHaEJ3Z1D3nQbFX0sm/eqZxDJ4D+QKzeWFn2UzpafQwo7QhNSu6DE+z32Z6O9FLDoNir6sLbILRkwno5BsHxZjybjGtemAc1+IFduJqC1uW0ri/M1q2kknC0/h8St3VAUdoQmTPZm8eVwMFK98NKF9nvsz677DhgHfVi7X/26bJFrJS/J68f4YG2RWzjtc4xzZk3GK+avEYJg+bLa4BtlHk3GNUbNJOLvS3JBt8uQlvxArtykwEwLDUYaqFXG+H+bUGc8w9CF62pW00gy1jGfeV0P1SHd7QKIW7uh0NtZdijsCE1wbOqa2eq8OYFqXu7K4WCkkmGCczvn1NBjZzYHrfGpRPVxS5Nc9x0wBHf/50/8wa0XfCN6vvp12eZ6lw4i10peeleoidPR/iqLURz9wNoit5hawGAx3JbDaVx0FKfK61f/SgmAVsxfIw5MvfRFx4O+HUdhabTBN8rsQdUdPJqMa2QabrzNnDgflRzayN6X5IKGFwZVL5FQ9ncRsiG5hy1i4QfPtUiBmRYQAXvBW4pFiwMKp1yqjPH/8gwTKDahznhuISyvx6d6DJ8nmNvUrKaRjCxERiWqEuV9KvAys7xvces8jaZCutsFGjo50lGxB5gJMeVPoLez7Pg3UTtQ2BGaCFjzTaHepe75Xkc5stV5c+pVm6RD080HG1Mv0NXFsJONRVJEJMME53xD5jA3yNh6b0g6rcbObA6eTo7ZWuNTiQJjsV6r5ef982UFKrjuO2Dgbtm3SeiPFBFobcPf/vKAh34QVy74RvR2eKQjPfOaaWVzeL7M9S4dlHXMykSulbwcLndrtaghyO0owx+mo/1V/iMfglelSSEPJav2wbM0tZkz1mIwtYDBaDViFiO+XFx7Pr6L0rjoKIo4Cv9OldevFhU1eL+TY9vnE4EMrJi/RvQYXZFdngsyBR7p5cuIdqaTCJRxOo7C0mIOIAUphR5PcQX8mNiDqjuAA0jseDQZ1yC0+wCJMq2j0bJPdJo5cT7CuZPpaz/FSjO/J539KbjepalaCQwvDKpUr+59HyTQN0ekMuDuImRDtqKGlHIPW8Qqj7kTgwnvsNuJDWeQAjMtyILR+mEEh1k5hGWO9xL6za+SGBoGFE65XpSsbhUfkiRNn3Dz5BkmULyZxIdsQp3xNMJ/Jp1EKYXFxMtSjk/1GNbPF89/SUFsJ8mju+lfPPix394vGFmIjEDZalsLUlQRU9K2xvpU4GWi1AKyZnnf4j75PTWXf2uWz/+JQYR0twvc9FXcdXIDfy3y4ajjZH7ru+ScPBJiyp9K4ihIAWkWAlnp9NXwb6J2qO9AoQAAAADhtlLvg2vUBWLdhuoG16gL52H65IW8fA5kCi7hDK5RF+0YA/iPxYUSbnPX/Qp5+Rzrz6vziRItGWikf/YYXKMu+erxwZs3dyt6gSXEHosLJf89Wcqd4N8gfFaNzxTy8jn1RKDWl5kmPHYvdNMSJVoy85MI3ZFOjjdw+NzYMLhGXdEOFLKz05JYUmXAtzZv7lbX2by5tQQ6U1SyaLw8FhdK3aBFpb99w09ey5GgOsG/Qdt37a65qmtEWBw5qyjk5XPJUrecq48xdko5Y5kuM014z4Ufl61YmX1M7suSJEq0ZMX85ounIWBhRpcyjiKdHG/DK06AofbIakBAmoVgcI26gcbfVeMbWb8CrQtQZqclsYcRd17lzPG0BHqjW2ze3K2NaI5C77UIqA4DWkdqCXSmi78mSelioKMI1PJMeCwulJmafHv7R/qRGvGofn77hp+fTdRw/ZBSmhwmAHV0gn+DlTQtbPfpq4YWX/lpclXXiJPjhWfxPgONEIhRYlDIy+exfpkI06Mf4jIVTQ1WH2Pst6kxA9V0t+k0wuUGXGaa8L3QyB/fDU71PrscGlqxMvu7B2AU2drm/jhstBFIlGjJqSI6Jsv/vMwqSe4jTkPAwq/1ki3NKBTHLJ5GKEQ6Od6ljGsxx1Ht2ybnvzRC7ZHVo1vDOsGGRdAgMBc/geZrrmBQOUECjb+r4zvtRIcxw6Vmh5FKBFoXoOXsRU+NSDq5bP5oVg4j7rzvlbxTi5+SsmopwF0I9Ea36UIUWJm6yIB4DJpvGtEchftnTmqfbWCLftsyZBwGtI79sOZhlRSZl3Siy3gWf02S98kffZPDMZxydWNzEKjlmfEet3axXi3zUOh/HDI1+fbTg6sZt4mF+FY/1xc04lH91VQDEr3wfORcRi4LPpuo4d8t+g67J9TvWpGGADhMAOrZ+lIFqQKO3Ui03DIqaVrYy98IN6/VJtZOY3Q5LL7y080IoDylrN/KRBqNJSbHC8/HcVkgo3t3wULNJS4gEKPEwabxK+GW5hQAILT7Yv0yEYNLYP7nQU4fBvcc8GQqmhqFnMj17Ti3AwyO5exuU2MGj+Ux6evvHwgKWU3naITLDYkymeL5ykU6GHwX1XqhkT+bF8PQ/x3tMR6rv958djk0ncBr2/VkFC0U0kbCdg/AKJe5ksfzs7wmEgXuyXDYaCORbjrM0S6gSTCY8qZSRXRMs/Mmo9f5CEI2T1qtVJLcR7UkjqjdgPFePDajsV7rJVu/XXe021dZVTrhC7pYPI1QuYrfv8lyA2coxFGIShnXYquvhY3PpatsLhP5g0zOf2mteC2GxdxScCRqAJ9Gt4Z1pwHUmsML+nsivaiUQGAufqHWfJEAAAAAQ8umh8eQPNSEW5pTzycIc4zsrvQItzSnS3ySIJ5PEObdhLZhWd8sMhoUirVRaBiVEqO+Epb4JEHVM4LGfZlRFz5S95C6CW3D+cLLRLK+WWTxdf/jdS5lsDblwzfj1kHxoB3ndiRGfSVnjduiLPFJgm867wXrYXVWqKrT0foyoy65+QWpPaKf+n5pOX01Fatddt4N2vKFl4mxTjEOZH2zyCe2FU+j7Y8c4CYpm6tau7vokR08bMqHby8BIeiHq/I5xGBUvkA7zu0D8GhqSIz6SgtHXM2PHMaezNdgGRnk4t9aL0RY3nTeC52/eIzWw+qslQhMKxFT1nhSmHD/9GVGXbeu4Noz9XqJcD7cDjtCTi54ieip/NJy+r8Z1H1qKla7KeHwPK26am/ucczopQ1eyObG+E9inWIcIVbEm4n8F0rKN7HNTmwrng2njRlG2x85BRC5voFLI+3CgIVqF7MHrFR4oSvQIzt4k+id/9iUD9+bX6lYHwQzC1zPlYwOV+VzTZxD9MnH2aeKDH8gwXDtAIK7S4cG4NHURSt3U5AY9ZXT01MSV4jJQRRDb8ZfP/3mHPRbYZivwTLbZGe1c860ZDAFEuO0Xoiw95UuN7zpvBf/IhqQe3mAwziyJkTtgaSCrkoCBSoRmFZp2j7RIqas8WFtCnblNpAlpv02oujLjLqrACo9L1uwbmyQFukn7ITJZCciTuB8uB2jtx6adoScXDVPOtuxFKCI8t8GD7mjlC/6aDKofjOo+z34DnyVUt2t1pl7KlLC4XkRCUf+WnXV3hm+c1md5ekK3i5PjQsdzUtI1mvMzI3xn49GVxjEOsU4h/FjvwOq+exAYV9rEvkvlFEyiRPVaRNAlqK1x93eJ+eeFYFgGk4bM1mFvbSMtj9yz32Z9UsmA6YI7aUhQ5E3AQBakYaEAQvVx8qtUm9gfoMsq9gEqPBCV+s75NCgR3bw44zQd2fXSiQkHOyj8S9uZbLkyOI2v1KxdXT0Nj4IZhZ9w8CR+ZhawrpT/EUcrsrnX2VsYNs+9jOY9VC004nClJBCZBMUGf5AV9JYx4Lh2gHBKnyGRXHm1Qa6QFJNxtJyDg109YpW7qbJnUghYTeb8CL8PXemp6ck5WwBo64Qk4Pt2zUEaYCvVypLCdD/eIsWvLMtkTjot8J7IxFFMF+DZXOUJeL3z7+xtAQZNuacacmlV89OIQxVHWLH85opu2G6anDHPe4rXW6t4PvpeNN5LzsY36i/Q0X7/IjjfLf0cVz0P9fbcGRNiDOv6w+bBTje2M6eWVyVBAofXqKNVCIwrRfpliqTsgx50Hmq/gVKKDhGgY6/wtoU7IERsmvKbSBLiaaGzA39HJ9ONroYFAQAAJ0HAAAsCQAAhgUAAEgFAACnBQAAAAQAADIFAAC8BQAALAkAQYDBAAv3CQwACACMAAgATAAIAMwACAAsAAgArAAIAGwACADsAAgAHAAIAJwACABcAAgA3AAIADwACAC8AAgAfAAIAPwACAACAAgAggAIAEIACADCAAgAIgAIAKIACABiAAgA4gAIABIACACSAAgAUgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJAEsBCQDLAAkAywEJACsACQArAQkAqwAJAKsBCQBrAAkAawEJAOsACQDrAQkAGwAJABsBCQCbAAkAmwEJAFsACQBbAQkA2wAJANsBCQA7AAkAOwEJALsACQC7AQkAewAJAHsBCQD7AAkA+wEJAAcACQAHAQkAhwAJAIcBCQBHAAkARwEJAMcACQDHAQkAJwAJACcBCQCnAAkApwEJAGcACQBnAQkA5wAJAOcBCQAXAAkAFwEJAJcACQCXAQkAVwAJAFcBCQDXAAkA1wEJADcACQA3AQkAtwAJALcBCQB3AAkAdwEJAPcACQD3AQkADwAJAA8BCQCPAAkAjwEJAE8ACQBPAQkAzwAJAM8BCQAvAAkALwEJAK8ACQCvAQkAbwAJAG8BCQDvAAkA7wEJAB8ACQAfAQkAnwAJAJ8BCQBfAAkAXwEJAN8ACQDfAQkAPwAJAD8BCQC/AAkAvwEJAH8ACQB/AQkA/wAJAP8BCQAAAAcAQAAHACAABwBgAAcAEAAHAFAABwAwAAcAcAAHAAgABwBIAAcAKAAHAGgABwAYAAcAWAAHADgABwB4AAcABAAHAEQABwAkAAcAZAAHABQABwBUAAcANAAHAHQABwADAAgAgwAIAEMACADDAAgAIwAIAKMACABjAAgA4wAIAAAABQAQAAUACAAFABgABQAEAAUAFAAFAAwABQAcAAUAAgAFABIABQAKAAUAGgAFAAYABQAWAAUADgAFAB4ABQABAAUAEQAFAAkABQAZAAUABQAFABUABQANAAUAHQAFAAMABQATAAUACwAFABsABQAHAAUAFwAFAEGBywAL7AYBAgMEBAUFBgYGBgcHBwcICAgICAgICAkJCQkJCQkJCgoKCgoKCgoKCgoKCgoKCgsLCwsLCwsLCwsLCwsLCwsMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8AABAREhITExQUFBQVFRUVFhYWFhYWFhYXFxcXFxcXFxgYGBgYGBgYGBgYGBgYGBgZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwdHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dAAECAwQFBgcICAkJCgoLCwwMDAwNDQ0NDg4ODg8PDw8QEBAQEBAQEBEREREREREREhISEhISEhITExMTExMTExQUFBQUFBQUFBQUFBQUFBQVFRUVFRUVFRUVFRUVFRUVFhYWFhYWFhYWFhYWFhYWFhcXFxcXFxcXFxcXFxcXFxcYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhobGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbHAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAoAAAAMAAAADgAAABAAAAAUAAAAGAAAABwAAAAgAAAAKAAAADAAAAA4AAAAQAAAAFAAAABgAAAAcAAAAIAAAACgAAAAwAAAAOAAQYTSAAutAQEAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAAABAACAAQAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAgCAAAMApAAABAQAAHgEAAA8AAAAAJQAAQCoAAAAAAAAeAAAADwAAAAAAAADAKgAAAAAAABMAAAAHAEHg0wALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHQ1AALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEGA1gALIwIAAAADAAAABwAAAAAAAAAQERIACAcJBgoFCwQMAw0CDgEPAEHQ1gALTQEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAQAAAAFAAAABQAAAAUAAAAFAEHA1wALZQEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAUAAAAGAAAABgAAAAcAAAAHAAAACAAAAAgAAAAJAAAACQAAAAoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEG42AALASwAQcTYAAthLQAAAAQABAAIAAQALgAAAAQABgAQAAYALwAAAAQADAAgABgALwAAAAgAEAAgACAALwAAAAgAEACAAIAALwAAAAgAIACAAAABMAAAACAAgAACAQAEMAAAACAAAgECAQAQMABBsNkAC6UTAwAEAAUABgAHAAgACQAKAAsADQAPABEAEwAXABsAHwAjACsAMwA7AEMAUwBjAHMAgwCjAMMA4wACAQAAAAAAABAAEAAQABAAEAAQABAAEAARABEAEQARABIAEgASABIAEwATABMAEwAUABQAFAAUABUAFQAVABUAEABNAMoAAAABAAIAAwAEAAUABwAJAA0AEQAZACEAMQBBAGEAgQDBAAEBgQEBAgEDAQQBBgEIAQwBEAEYASABMAFAAWAAAAAAEAAQABAAEAARABEAEgASABMAEwAUABQAFQAVABYAFgAXABcAGAAYABkAGQAaABoAGwAbABwAHAAdAB0AQABAAGAHAAAACFAAAAgQABQIcwASBx8AAAhwAAAIMAAACcAAEAcKAAAIYAAACCAAAAmgAAAIAAAACIAAAAhAAAAJ4AAQBwYAAAhYAAAIGAAACZAAEwc7AAAIeAAACDgAAAnQABEHEQAACGgAAAgoAAAJsAAACAgAAAiIAAAISAAACfAAEAcEAAAIVAAACBQAFQjjABMHKwAACHQAAAg0AAAJyAARBw0AAAhkAAAIJAAACagAAAgEAAAIhAAACEQAAAnoABAHCAAACFwAAAgcAAAJmAAUB1MAAAh8AAAIPAAACdgAEgcXAAAIbAAACCwAAAm4AAAIDAAACIwAAAhMAAAJ+AAQBwMAAAhSAAAIEgAVCKMAEwcjAAAIcgAACDIAAAnEABEHCwAACGIAAAgiAAAJpAAACAIAAAiCAAAIQgAACeQAEAcHAAAIWgAACBoAAAmUABQHQwAACHoAAAg6AAAJ1AASBxMAAAhqAAAIKgAACbQAAAgKAAAIigAACEoAAAn0ABAHBQAACFYAAAgWAEAIAAATBzMAAAh2AAAINgAACcwAEQcPAAAIZgAACCYAAAmsAAAIBgAACIYAAAhGAAAJ7AAQBwkAAAheAAAIHgAACZwAFAdjAAAIfgAACD4AAAncABIHGwAACG4AAAguAAAJvAAACA4AAAiOAAAITgAACfwAYAcAAAAIUQAACBEAFQiDABIHHwAACHEAAAgxAAAJwgAQBwoAAAhhAAAIIQAACaIAAAgBAAAIgQAACEEAAAniABAHBgAACFkAAAgZAAAJkgATBzsAAAh5AAAIOQAACdIAEQcRAAAIaQAACCkAAAmyAAAICQAACIkAAAhJAAAJ8gAQBwQAAAhVAAAIFQAQCAIBEwcrAAAIdQAACDUAAAnKABEHDQAACGUAAAglAAAJqgAACAUAAAiFAAAIRQAACeoAEAcIAAAIXQAACB0AAAmaABQHUwAACH0AAAg9AAAJ2gASBxcAAAhtAAAILQAACboAAAgNAAAIjQAACE0AAAn6ABAHAwAACFMAAAgTABUIwwATByMAAAhzAAAIMwAACcYAEQcLAAAIYwAACCMAAAmmAAAIAwAACIMAAAhDAAAJ5gAQBwcAAAhbAAAIGwAACZYAFAdDAAAIewAACDsAAAnWABIHEwAACGsAAAgrAAAJtgAACAsAAAiLAAAISwAACfYAEAcFAAAIVwAACBcAQAgAABMHMwAACHcAAAg3AAAJzgARBw8AAAhnAAAIJwAACa4AAAgHAAAIhwAACEcAAAnuABAHCQAACF8AAAgfAAAJngAUB2MAAAh/AAAIPwAACd4AEgcbAAAIbwAACC8AAAm+AAAIDwAACI8AAAhPAAAJ/gBgBwAAAAhQAAAIEAAUCHMAEgcfAAAIcAAACDAAAAnBABAHCgAACGAAAAggAAAJoQAACAAAAAiAAAAIQAAACeEAEAcGAAAIWAAACBgAAAmRABMHOwAACHgAAAg4AAAJ0QARBxEAAAhoAAAIKAAACbEAAAgIAAAIiAAACEgAAAnxABAHBAAACFQAAAgUABUI4wATBysAAAh0AAAINAAACckAEQcNAAAIZAAACCQAAAmpAAAIBAAACIQAAAhEAAAJ6QAQBwgAAAhcAAAIHAAACZkAFAdTAAAIfAAACDwAAAnZABIHFwAACGwAAAgsAAAJuQAACAwAAAiMAAAITAAACfkAEAcDAAAIUgAACBIAFQijABMHIwAACHIAAAgyAAAJxQARBwsAAAhiAAAIIgAACaUAAAgCAAAIggAACEIAAAnlABAHBwAACFoAAAgaAAAJlQAUB0MAAAh6AAAIOgAACdUAEgcTAAAIagAACCoAAAm1AAAICgAACIoAAAhKAAAJ9QAQBwUAAAhWAAAIFgBACAAAEwczAAAIdgAACDYAAAnNABEHDwAACGYAAAgmAAAJrQAACAYAAAiGAAAIRgAACe0AEAcJAAAIXgAACB4AAAmdABQHYwAACH4AAAg+AAAJ3QASBxsAAAhuAAAILgAACb0AAAgOAAAIjgAACE4AAAn9AGAHAAAACFEAAAgRABUIgwASBx8AAAhxAAAIMQAACcMAEAcKAAAIYQAACCEAAAmjAAAIAQAACIEAAAhBAAAJ4wAQBwYAAAhZAAAIGQAACZMAEwc7AAAIeQAACDkAAAnTABEHEQAACGkAAAgpAAAJswAACAkAAAiJAAAISQAACfMAEAcEAAAIVQAACBUAEAgCARMHKwAACHUAAAg1AAAJywARBw0AAAhlAAAIJQAACasAAAgFAAAIhQAACEUAAAnrABAHCAAACF0AAAgdAAAJmwAUB1MAAAh9AAAIPQAACdsAEgcXAAAIbQAACC0AAAm7AAAIDQAACI0AAAhNAAAJ+wAQBwMAAAhTAAAIEwAVCMMAEwcjAAAIcwAACDMAAAnHABEHCwAACGMAAAgjAAAJpwAACAMAAAiDAAAIQwAACecAEAcHAAAIWwAACBsAAAmXABQHQwAACHsAAAg7AAAJ1wASBxMAAAhrAAAIKwAACbcAAAgLAAAIiwAACEsAAAn3ABAHBQAACFcAAAgXAEAIAAATBzMAAAh3AAAINwAACc8AEQcPAAAIZwAACCcAAAmvAAAIBwAACIcAAAhHAAAJ7wAQBwkAAAhfAAAIHwAACZ8AFAdjAAAIfwAACD8AAAnfABIHGwAACG8AAAgvAAAJvwAACA8AAAiPAAAITwAACf8AEAUBABcFAQETBREAGwUBEBEFBQAZBQEEFQVBAB0FAUAQBQMAGAUBAhQFIQAcBQEgEgUJABoFAQgWBYEAQAUAABAFAgAXBYEBEwUZABsFARgRBQcAGQUBBhUFYQAdBQFgEAUEABgFAQMUBTEAHAUBMBIFDQAaBQEMFgXBAEAFAAAQABEAEgAAAAgABwAJAAYACgAFAAsABAAMAAMADQACAA4AAQAPAEHg7AALQREACgAREREAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAEQAPChEREQMKBwABAAkLCwAACQYLAAALAAYRAAAAERERAEGx7QALIQsAAAAAAAAAABEACgoREREACgAAAgAJCwAAAAkACwAACwBB6+0ACwEMAEH37QALFQwAAAAADAAAAAAJDAAAAAAADAAADABBpe4ACwEOAEGx7gALFQ0AAAAEDQAAAAAJDgAAAAAADgAADgBB3+4ACwEQAEHr7gALHg8AAAAADwAAAAAJEAAAAAAAEAAAEAAAEgAAABISEgBBou8ACw4SAAAAEhISAAAAAAAACQBB0+8ACwELAEHf7wALFQoAAAAACgAAAAAJCwAAAAAACwAACwBBjfAACwEMAEGZ8AALJwwAAAAADAAAAAAJDAAAAAAADAAADAAAMDEyMzQ1Njc4OUFCQ0RFRgBB5PAACwE+AEGL8QALBf//////AEHQ8QALVxkSRDsCPyxHFD0zMAobBkZLRTcPSQ6OFwNAHTxpKzYfSi0cASAlKSEIDBUWIi4QOD4LNDEYZHR1di9BCX85ESNDMkKJiosFBCYoJw0qHjWMBxpIkxOUlQBBsPIAC4oOSWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AQcCAAQuFARMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==";Bo(ji)||(ji=P(ji));function ro(Je){try{if(Je==ji&&ce)return new Uint8Array(ce);var st=Me(Je);if(st)return st;if(R)return R(Je);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(St){ns(St)}}function vo(Je,st){var St,lr,ee;try{ee=ro(Je),lr=new WebAssembly.Module(ee),St=new WebAssembly.Instance(lr,st)}catch(Oe){var Ee=Oe.toString();throw te("failed to compile wasm module: "+Ee),(Ee.includes("imported Memory")||Ee.includes("memory import"))&&te("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),Oe}return[St,lr]}function RA(){var Je={a:fu};function st(ee,Ee){var Oe=ee.exports;r.asm=Oe,Be=r.asm.g,z(Be.buffer),$=r.asm.W,gn(r.asm.h),wo("wasm-instantiate")}if(ai("wasm-instantiate"),r.instantiateWasm)try{var St=r.instantiateWasm(Je,st);return St}catch(ee){return te("Module.instantiateWasm callback failed with error: "+ee),!1}var lr=vo(ji,Je);return st(lr[0]),r.asm}function pf(Je){return F.getFloat32(Je,!0)}function yh(Je){return F.getFloat64(Je,!0)}function Eh(Je){return F.getInt16(Je,!0)}function no(Je){return F.getInt32(Je,!0)}function jn(Je,st){F.setInt32(Je,st,!0)}function Fs(Je){for(;Je.length>0;){var st=Je.shift();if(typeof st=="function"){st(r);continue}var St=st.func;typeof St=="number"?st.arg===void 0?$.get(St)():$.get(St)(st.arg):St(st.arg===void 0?null:st.arg)}}function io(Je,st){var St=new Date(no((Je>>2)*4)*1e3);jn((st>>2)*4,St.getUTCSeconds()),jn((st+4>>2)*4,St.getUTCMinutes()),jn((st+8>>2)*4,St.getUTCHours()),jn((st+12>>2)*4,St.getUTCDate()),jn((st+16>>2)*4,St.getUTCMonth()),jn((st+20>>2)*4,St.getUTCFullYear()-1900),jn((st+24>>2)*4,St.getUTCDay()),jn((st+36>>2)*4,0),jn((st+32>>2)*4,0);var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((st+28>>2)*4,ee),io.GMTString||(io.GMTString=rt("GMT")),jn((st+40>>2)*4,io.GMTString),st}function lu(Je,st){return io(Je,st)}function cu(Je,st,St){ke.copyWithin(Je,st,st+St)}function uu(Je){try{return Be.grow(Je-Pe.byteLength+65535>>>16),z(Be.buffer),1}catch{}}function FA(Je){var st=ke.length;Je=Je>>>0;var St=2147483648;if(Je>St)return!1;for(var lr=1;lr<=4;lr*=2){var ee=st*(1+.2/lr);ee=Math.min(ee,Je+100663296);var Ee=Math.min(St,Ne(Math.max(Je,ee),65536)),Oe=uu(Ee);if(Oe)return!0}return!1}function NA(Je){Ae(Je)}function aa(Je){var st=Date.now()/1e3|0;return Je&&jn((Je>>2)*4,st),st}function la(){if(la.called)return;la.called=!0;var Je=new Date().getFullYear(),st=new Date(Je,0,1),St=new Date(Je,6,1),lr=st.getTimezoneOffset(),ee=St.getTimezoneOffset(),Ee=Math.max(lr,ee);jn((Sl()>>2)*4,Ee*60),jn((ws()>>2)*4,+(lr!=ee));function Oe(fn){var li=fn.toTimeString().match(/\(([A-Za-z ]+)\)$/);return li?li[1]:"GMT"}var gt=Oe(st),yt=Oe(St),Dt=rt(gt),tr=rt(yt);ee>2)*4,Dt),jn((_i()+4>>2)*4,tr)):(jn((_i()>>2)*4,tr),jn((_i()+4>>2)*4,Dt))}function OA(Je){la();var st=Date.UTC(no((Je+20>>2)*4)+1900,no((Je+16>>2)*4),no((Je+12>>2)*4),no((Je+8>>2)*4),no((Je+4>>2)*4),no((Je>>2)*4),0),St=new Date(st);jn((Je+24>>2)*4,St.getUTCDay());var lr=Date.UTC(St.getUTCFullYear(),0,1,0,0,0,0),ee=(St.getTime()-lr)/(1e3*60*60*24)|0;return jn((Je+28>>2)*4,ee),St.getTime()/1e3|0}var gr=typeof atob=="function"?atob:function(Je){var st="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",St="",lr,ee,Ee,Oe,gt,yt,Dt,tr=0;Je=Je.replace(/[^A-Za-z0-9\+\/\=]/g,"");do Oe=st.indexOf(Je.charAt(tr++)),gt=st.indexOf(Je.charAt(tr++)),yt=st.indexOf(Je.charAt(tr++)),Dt=st.indexOf(Je.charAt(tr++)),lr=Oe<<2|gt>>4,ee=(gt&15)<<4|yt>>2,Ee=(yt&3)<<6|Dt,St=St+String.fromCharCode(lr),yt!==64&&(St=St+String.fromCharCode(ee)),Dt!==64&&(St=St+String.fromCharCode(Ee));while(tr0||(It(),Ir>0))return;function st(){Qn||(Qn=!0,r.calledRun=!0,!Ce&&(qt(),s(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),ir()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),st()},1)):st()}if(r.run=pc,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return pc(),e}}();typeof IT=="object"&&typeof jj=="object"?jj.exports=Hj:typeof define=="function"&&define.amd?define([],function(){return Hj}):typeof IT=="object"&&(IT.createModule=Hj)});var Hp,kde,Qde,Tde=Ct(()=>{Hp=["number","number"],kde=(X=>(X[X.ZIP_ER_OK=0]="ZIP_ER_OK",X[X.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",X[X.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",X[X.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",X[X.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",X[X.ZIP_ER_READ=5]="ZIP_ER_READ",X[X.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",X[X.ZIP_ER_CRC=7]="ZIP_ER_CRC",X[X.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",X[X.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",X[X.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",X[X.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",X[X.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",X[X.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",X[X.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",X[X.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",X[X.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",X[X.ZIP_ER_EOF=17]="ZIP_ER_EOF",X[X.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",X[X.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",X[X.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",X[X.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",X[X.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",X[X.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",X[X.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",X[X.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",X[X.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",X[X.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",X[X.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",X[X.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",X[X.ZIP_ER_TELL=30]="ZIP_ER_TELL",X[X.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA",X))(kde||{}),Qde=t=>({get HEAPU8(){return t.HEAPU8},errors:kde,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap("zip_open_from_source","number",["number","number","number"]),close:t.cwrap("zip_close","number",["number"]),discard:t.cwrap("zip_discard",null,["number"]),getError:t.cwrap("zip_get_error","number",["number"]),getName:t.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:t.cwrap("zip_get_num_entries","number",["number","number"]),delete:t.cwrap("zip_delete","number",["number","number"]),statIndex:t.cwrap("zip_stat_index","number",["number",...Hp,"number","number"]),fopenIndex:t.cwrap("zip_fopen_index","number",["number",...Hp,"number"]),fread:t.cwrap("zip_fread","number",["number","number","number","number"]),fclose:t.cwrap("zip_fclose","number",["number"]),dir:{add:t.cwrap("zip_dir_add","number",["number","string"])},file:{add:t.cwrap("zip_file_add","number",["number","string","number","number"]),getError:t.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:t.cwrap("zip_file_get_external_attributes","number",["number",...Hp,"number","number","number"]),setExternalAttributes:t.cwrap("zip_file_set_external_attributes","number",["number",...Hp,"number","number","number"]),setMtime:t.cwrap("zip_file_set_mtime","number",["number",...Hp,"number","number"]),setCompression:t.cwrap("zip_set_file_compression","number",["number",...Hp,"number","number"])},ext:{countSymlinks:t.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:t.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:t.cwrap("zip_error_strerror","string",["number"])},name:{locate:t.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:t.cwrap("zip_source_buffer_create","number",["number",...Hp,"number","number"]),fromBuffer:t.cwrap("zip_source_buffer","number",["number","number",...Hp,"number"]),free:t.cwrap("zip_source_free",null,["number"]),keep:t.cwrap("zip_source_keep",null,["number"]),open:t.cwrap("zip_source_open","number",["number"]),close:t.cwrap("zip_source_close","number",["number"]),seek:t.cwrap("zip_source_seek","number",["number",...Hp,"number"]),tell:t.cwrap("zip_source_tell","number",["number"]),read:t.cwrap("zip_source_read","number",["number","number","number"]),error:t.cwrap("zip_source_error","number",["number"])},struct:{statS:t.cwrap("zipstruct_statS","number",[]),statSize:t.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:t.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:t.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:t.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:t.cwrap("zipstruct_stat_crc","number",["number"]),errorS:t.cwrap("zipstruct_errorS","number",[]),errorCodeZip:t.cwrap("zipstruct_error_code_zip","number",["number"])}})});function qj(t,e){let r=t.indexOf(e);if(r<=0)return null;let s=r;for(;r>=0&&(s=r+e.length,t[s]!==K.sep);){if(t[r-1]===K.sep)return null;r=t.indexOf(e,s)}return t.length>s&&t[s]!==K.sep?null:t.slice(0,s)}var tA,Rde=Ct(()=>{bt();bt();rA();tA=class t extends r0{static async openPromise(e,r){let s=new t(r);try{return await e(s)}finally{s.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,s=e.readOnlyArchives,a=typeof r>"u"?f=>qj(f,".zip"):f=>{for(let p of r){let h=qj(f,p);if(h)return h}return null},n=(f,p)=>new hs(p,{baseFs:f,readOnly:s,stats:f.statSync(p),customZipImplementation:e.customZipImplementation}),c=async(f,p)=>{let h={baseFs:f,readOnly:s,stats:await f.statPromise(p),customZipImplementation:e.customZipImplementation};return()=>new hs(p,h)};super({...e,factorySync:n,factoryPromise:c,getMountPoint:a})}}});var Gj,wI,Wj=Ct(()=>{Uj();Gj=class extends Error{constructor(e,r){super(e),this.name="Libzip Error",this.code=r}},wI=class{constructor(e){this.filesShouldBeCached=!0;let r="buffer"in e?e.buffer:e.baseFs.readFileSync(e.path);this.libzip=yv();let s=this.libzip.malloc(4);try{let c=0;e.readOnly&&(c|=this.libzip.ZIP_RDONLY);let f=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(f,c,s),this.lzSource=f}catch(p){throw this.libzip.source.free(f),p}if(this.zip===0){let p=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(p,this.libzip.getValue(s,"i32")),this.makeLibzipError(p)}}finally{this.libzip.free(s)}let a=this.libzip.getNumEntries(this.zip,0),n=new Array(a);for(let c=0;c>>0,n=this.libzip.struct.statMtime(r)>>>0,c=this.libzip.struct.statCrc(r)>>>0;return{size:a,mtime:n,crc:c}}makeLibzipError(e){let r=this.libzip.struct.errorCodeZip(e),s=this.libzip.error.strerror(e),a=new Gj(s,this.libzip.errors[r]);if(r===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${a.message}`);return a}setFileSource(e,r,s){let a=this.allocateSource(s);try{let n=this.libzip.file.add(this.zip,e,a,this.libzip.ZIP_FL_OVERWRITE);if(n===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(r!==null&&this.libzip.file.setCompression(this.zip,n,0,r[0],r[1])===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return n}catch(n){throw this.libzip.source.free(a),n}}setMtime(e,r){if(this.libzip.file.setMtime(this.zip,e,0,r,0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}getExternalAttributes(e){if(this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let s=this.libzip.getValue(this.libzip.uint08S,"i8")>>>0,a=this.libzip.getValue(this.libzip.uint32S,"i32")>>>0;return[s,a]}setExternalAttributes(e,r,s){if(this.libzip.file.setExternalAttributes(this.zip,e,0,0,r,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}locate(e){return this.libzip.name.locate(this.zip,e,0)}getFileSource(e){let r=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.libzip.struct.statCompSize(r),n=this.libzip.struct.statCompMethod(r),c=this.libzip.malloc(a);try{let f=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(f===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let p=this.libzip.fread(f,c,a,0);if(p===-1)throw this.makeLibzipError(this.libzip.file.getError(f));if(pa)throw new Error("Overread");let h=this.libzip.HEAPU8.subarray(c,c+a);return{data:Buffer.from(h),compressionMethod:n}}finally{this.libzip.fclose(f)}}finally{this.libzip.free(c)}}deleteEntry(e){if(this.libzip.delete(this.zip,e)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}addDirectory(e){let r=this.libzip.dir.add(this.zip,e);if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return r}getBufferAndClose(){try{if(this.libzip.source.keep(this.lzSource),this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let e=this.libzip.source.tell(this.lzSource);if(e===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));let r=this.libzip.malloc(e);if(!r)throw new Error("Couldn't allocate enough memory");try{let s=this.libzip.source.read(this.lzSource,r,e);if(s===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(se)throw new Error("Overread");let a=Buffer.from(this.libzip.HEAPU8.subarray(r,r+e));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(a=Buffer.concat([a,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),a}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource)}}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));let r=this.libzip.malloc(e.byteLength);if(!r)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,r,e.byteLength).set(e),{buffer:r,byteLength:e.byteLength}}allocateUnattachedSource(e){let r=this.libzip.struct.errorS(),{buffer:s,byteLength:a}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(s,a,0,1,r);if(n===0)throw this.libzip.free(r),this.makeLibzipError(r);return n}allocateSource(e){let{buffer:r,byteLength:s}=this.allocateBuffer(e),a=this.libzip.source.fromBuffer(this.zip,r,s,0,1);if(a===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return a}discard(){this.libzip.discard(this.zip)}}});function Wdt(t){if(typeof t=="string"&&String(+t)===t)return+t;if(typeof t=="number"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(Fde.types.isDate(t))return t.getTime()/1e3;throw new Error("Invalid time")}function CT(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var ka,Yj,Fde,Vj,om,Kj,Jj,Nde,hs,wT=Ct(()=>{bt();bt();bt();bt();bt();bt();ka=Ie("fs"),Yj=Ie("stream"),Fde=Ie("util"),Vj=et(Ie("zlib"));Wj();om=3,Kj=0,Jj=8,Nde="mixed";hs=class extends Uf{constructor(r,s={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;s.readOnly&&(this.readOnly=!0);let a=s;this.level=typeof a.level<"u"?a.level:Nde;let n=s.customZipImplementation??wI;if(typeof r=="string"){let{baseFs:f=new Yn}=a;this.baseFs=f,this.path=r}else this.path=null,this.baseFs=null;if(s.stats)this.stats=s.stats;else if(typeof r=="string")try{this.stats=this.baseFs.statSync(r)}catch(f){if(f.code==="ENOENT"&&a.create)this.stats=el.makeDefaultStats();else throw f}else this.stats=el.makeDefaultStats();typeof r=="string"?s.create?this.zipImpl=new n({buffer:CT(),readOnly:this.readOnly}):this.zipImpl=new n({path:r,baseFs:this.baseFs,readOnly:this.readOnly,size:this.stats.size}):this.zipImpl=new n({buffer:r??CT(),readOnly:this.readOnly}),this.listings.set(vt.root,new Set);let c=this.zipImpl.getListings();for(let f=0;f{this.closeSync(f)}})}async readPromise(r,s,a,n,c){return this.readSync(r,s,a,n,c)}readSync(r,s,a=0,n=s.byteLength,c=-1){let f=this.fds.get(r);if(typeof f>"u")throw or.EBADF("read");let p=c===-1||c===null?f.cursor:c,h=this.readFileSync(f.p);h.copy(s,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(c===-1||c===null)&&(f.cursor+=E),E}async writePromise(r,s,a,n,c){return typeof s=="string"?this.writeSync(r,s,c):this.writeSync(r,s,a,n,c)}writeSync(r,s,a,n,c){throw typeof this.fds.get(r)>"u"?or.EBADF("read"):new Error("Unimplemented")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>"u")throw or.EBADF("read");this.fds.delete(r)}createReadStream(r,{encoding:s}={}){if(r===null)throw new Error("Unimplemented");let a=this.openSync(r,"r"),n=Object.assign(new Yj.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(f,p)=>{clearImmediate(c),this.closeSync(a),p(f)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),c=setImmediate(async()=>{try{let f=await this.readFilePromise(r,s);n.bytesRead=f.length,n.end(f)}catch(f){n.destroy(f)}});return n}createWriteStream(r,{encoding:s}={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);if(r===null)throw new Error("Unimplemented");let a=[],n=this.openSync(r,"w"),c=Object.assign(new Yj.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(f,p)=>{try{f?p(f):(this.writeFileSync(r,Buffer.concat(a),s),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){c.destroy()},bytesWritten:0,path:r,pending:!1});return c.on("data",f=>{let p=Buffer.from(f);c.bytesWritten+=p.length,a.push(p)}),c}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let s=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`lstat '${r}'`);return s}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw or.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=K.resolve(vt.root,r);return this.entries.has(a)||this.listings.has(a)}let s;try{s=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return s===void 0?!1:this.entries.has(s)||this.listings.has(s)}async accessPromise(r,s){return this.accessSync(r,s)}accessSync(r,s=ka.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`access '${r}'`);if(this.readOnly&&s&ka.constants.W_OK)throw or.EROFS(`access '${r}'`)}async statPromise(r,s={bigint:!1}){return s.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`stat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,s)}}async fstatPromise(r,s){return this.fstatSync(r,s)}fstatSync(r,s){let a=this.fds.get(r);if(typeof a>"u")throw or.EBADF("fstatSync");let{p:n}=a,c=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(c)&&!this.listings.has(c))throw or.ENOENT(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(c))throw or.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,c,s)}async lstatPromise(r,s={bigint:!1}){return s.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,s={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,s.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(s.throwIfNoEntry===!1)return;throw or.ENOENT(`lstat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,s)}}statImpl(r,s,a={}){let n=this.entries.get(s);if(typeof n<"u"){let c=this.zipImpl.stat(n),f=c.crc,p=c.size,h=c.mtime*1e3,E=this.stats.uid,C=this.stats.gid,S=512,P=Math.ceil(c.size/S),I=h,R=h,N=h,U=new Date(I),W=new Date(R),te=new Date(N),ie=new Date(h),Ae=this.listings.has(s)?ka.constants.S_IFDIR:this.isSymbolicLink(n)?ka.constants.S_IFLNK:ka.constants.S_IFREG,ce=Ae===ka.constants.S_IFDIR?493:420,me=Ae|this.getUnixMode(n,ce)&511,pe=Object.assign(new el.StatEntry,{uid:E,gid:C,size:p,blksize:S,blocks:P,atime:U,birthtime:W,ctime:te,mtime:ie,atimeMs:I,birthtimeMs:R,ctimeMs:N,mtimeMs:h,mode:me,crc:f});return a.bigint===!0?el.convertToBigIntStats(pe):pe}if(this.listings.has(s)){let c=this.stats.uid,f=this.stats.gid,p=0,h=512,E=0,C=this.stats.mtimeMs,S=this.stats.mtimeMs,P=this.stats.mtimeMs,I=this.stats.mtimeMs,R=new Date(C),N=new Date(S),U=new Date(P),W=new Date(I),te=ka.constants.S_IFDIR|493,Ae=Object.assign(new el.StatEntry,{uid:c,gid:f,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:W,atimeMs:C,birthtimeMs:S,ctimeMs:P,mtimeMs:I,mode:te,crc:0});return a.bigint===!0?el.convertToBigIntStats(Ae):Ae}throw new Error("Unreachable")}getUnixMode(r,s){let[a,n]=this.zipImpl.getExternalAttributes(r);return a!==om?s:n>>>16}registerListing(r){let s=this.listings.get(r);if(s)return s;this.registerListing(K.dirname(r)).add(K.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,s){this.registerListing(K.dirname(r)).add(K.basename(r)),this.entries.set(r,s)}unregisterListing(r){this.listings.delete(r),this.listings.get(K.dirname(r))?.delete(K.basename(r))}unregisterEntry(r){this.unregisterListing(r);let s=this.entries.get(r);this.entries.delete(r),!(typeof s>"u")&&(this.fileSources.delete(s),this.isSymbolicLink(s)&&this.symlinkCount--)}deleteEntry(r,s){this.unregisterEntry(r),this.zipImpl.deleteEntry(s)}resolveFilename(r,s,a=!0,n=!0){if(!this.ready)throw or.EBUSY(`archive closed, ${r}`);let c=K.resolve(vt.root,s);if(c==="/")return vt.root;let f=this.entries.get(c);if(a&&f!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(f)){let p=this.getFileSource(f).toString();return this.resolveFilename(r,K.resolve(K.dirname(c),p),!0,n)}else return c;for(;;){let p=this.resolveFilename(r,K.dirname(c),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw or.ENOENT(r)}if(!h)throw or.ENOTDIR(r);if(c=K.resolve(p,K.basename(c)),!a||this.symlinkCount===0)break;let C=this.zipImpl.locate(c.slice(1));if(C===-1)break;if(this.isSymbolicLink(C)){let S=this.getFileSource(C).toString();c=K.resolve(K.dirname(c),S)}else break}return c}setFileSource(r,s){let a=Buffer.isBuffer(s)?s:Buffer.from(s),n=K.relative(vt.root,r),c=null;this.level!=="mixed"&&(c=[this.level===0?Kj:Jj,this.level]);let f=this.zipImpl.setFileSource(n,c,a);return this.fileSources.set(f,a),f}isSymbolicLink(r){if(this.symlinkCount===0)return!1;let[s,a]=this.zipImpl.getExternalAttributes(r);return s!==om?!1:(a>>>16&ka.constants.S_IFMT)===ka.constants.S_IFLNK}getFileSource(r,s={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<"u")return a;let{data:n,compressionMethod:c}=this.zipImpl.getFileSource(r);if(c===Kj)return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,n),n;if(c===Jj){if(s.asyncDecompress)return new Promise((f,p)=>{Vj.default.inflateRaw(n,(h,E)=>{h?p(h):(this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,E),f(E))})});{let f=Vj.default.inflateRawSync(n);return this.zipImpl.filesShouldBeCached&&this.fileSources.set(r,f),f}}else throw new Error(`Unsupported compression method: ${c}`)}async fchmodPromise(r,s){return this.chmodPromise(this.fdToPath(r,"fchmod"),s)}fchmodSync(r,s){return this.chmodSync(this.fdToPath(r,"fchmodSync"),s)}async chmodPromise(r,s){return this.chmodSync(r,s)}chmodSync(r,s){if(this.readOnly)throw or.EROFS(`chmod '${r}'`);s&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>"u")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let f=this.getUnixMode(n,ka.constants.S_IFREG|0)&-512|s;this.zipImpl.setExternalAttributes(n,om,f<<16)}async fchownPromise(r,s,a){return this.chownPromise(this.fdToPath(r,"fchown"),s,a)}fchownSync(r,s,a){return this.chownSync(this.fdToPath(r,"fchownSync"),s,a)}async chownPromise(r,s,a){return this.chownSync(r,s,a)}chownSync(r,s,a){throw new Error("Unimplemented")}async renamePromise(r,s){return this.renameSync(r,s)}renameSync(r,s){throw new Error("Unimplemented")}async copyFilePromise(r,s,a){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}copyFileSync(r,s,a=0){let{indexSource:n,indexDest:c,resolvedDestP:f}=this.prepareCopyFile(r,s,a),p=this.getFileSource(n),h=this.setFileSource(f,p);h!==c&&this.registerEntry(f,h)}prepareCopyFile(r,s,a=0){if(this.readOnly)throw or.EROFS(`copyfile '${r} -> '${s}'`);if(a&ka.constants.COPYFILE_FICLONE_FORCE)throw or.ENOSYS("unsupported clone operation",`copyfile '${r}' -> ${s}'`);let n=this.resolveFilename(`copyfile '${r} -> ${s}'`,r),c=this.entries.get(n);if(typeof c>"u")throw or.EINVAL(`copyfile '${r}' -> '${s}'`);let f=this.resolveFilename(`copyfile '${r}' -> ${s}'`,s),p=this.entries.get(f);if(a&(ka.constants.COPYFILE_EXCL|ka.constants.COPYFILE_FICLONE_FORCE)&&typeof p<"u")throw or.EEXIST(`copyfile '${r}' -> '${s}'`);return{indexSource:c,resolvedDestP:f,indexDest:p}}async appendFilePromise(r,s,a){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFilePromise(r,s,a)}appendFileSync(r,s,a={}){if(this.readOnly)throw or.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFileSync(r,s,a)}fdToPath(r,s){let a=this.fds.get(r)?.p;if(typeof a>"u")throw or.EBADF(s);return a}async writeFilePromise(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(s=Buffer.concat([await this.getFileSource(f,{asyncDecompress:!0}),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&await this.chmodPromise(p,c)}writeFileSync(r,s,a){let{encoding:n,mode:c,index:f,resolvedP:p}=this.prepareWriteFile(r,a);f!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(s=Buffer.concat([this.getFileSource(f),Buffer.from(s)])),n!==null&&(s=s.toString(n));let h=this.setFileSource(p,s);h!==f&&this.registerEntry(p,h),c!==null&&this.chmodSync(p,c)}prepareWriteFile(r,s){if(typeof r=="number"&&(r=this.fdToPath(r,"read")),this.readOnly)throw or.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw or.EISDIR(`open '${r}'`);let n=null,c=null;typeof s=="string"?n=s:typeof s=="object"&&({encoding:n=null,mode:c=null}=s);let f=this.entries.get(a);return{encoding:n,mode:c,resolvedP:a,index:f}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw or.EROFS(`unlink '${r}'`);let s=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(s))throw or.EISDIR(`unlink '${r}'`);let a=this.entries.get(s);if(typeof a>"u")throw or.EINVAL(`unlink '${r}'`);this.deleteEntry(s,a)}async utimesPromise(r,s,a){return this.utimesSync(r,s,a)}utimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,s,a){return this.lutimesSync(r,s,a)}lutimesSync(r,s,a){if(this.readOnly)throw or.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,s){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error("Unreachable");this.zipImpl.setMtime(a,Wdt(s))}async mkdirPromise(r,s){return this.mkdirSync(r,s)}mkdirSync(r,{mode:s=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:s});if(this.readOnly)throw or.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw or.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,s)}async rmdirPromise(r,s){return this.rmdirSync(r,s)}rmdirSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rmdir '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rmdir '${r}'`);let c=this.entries.get(a);if(typeof c>"u")throw or.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,c)}async rmPromise(r,s){return this.rmSync(r,s)}rmSync(r,{recursive:s=!1}={}){if(this.readOnly)throw or.EROFS(`rm '${r}'`);if(s){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw or.ENOTDIR(`rm '${r}'`);if(n.size>0)throw or.ENOTEMPTY(`rm '${r}'`);let c=this.entries.get(a);if(typeof c>"u")throw or.EINVAL(`rm '${r}'`);this.deleteEntry(r,c)}hydrateDirectory(r){let s=this.zipImpl.addDirectory(K.relative(vt.root,r));return this.registerListing(r),this.registerEntry(r,s),s}async linkPromise(r,s){return this.linkSync(r,s)}linkSync(r,s){throw or.EOPNOTSUPP(`link '${r}' -> '${s}'`)}async symlinkPromise(r,s){return this.symlinkSync(r,s)}symlinkSync(r,s){if(this.readOnly)throw or.EROFS(`symlink '${r}' -> '${s}'`);let a=this.resolveFilename(`symlink '${r}' -> '${s}'`,s);if(this.listings.has(a))throw or.EISDIR(`symlink '${r}' -> '${s}'`);if(this.entries.has(a))throw or.EEXIST(`symlink '${r}' -> '${s}'`);let n=this.setFileSource(a,r);this.registerEntry(a,n),this.zipImpl.setExternalAttributes(n,om,(ka.constants.S_IFLNK|511)<<16),this.symlinkCount+=1}async readFilePromise(r,s){typeof s=="object"&&(s=s?s.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return s?a.toString(s):a}readFileSync(r,s){typeof s=="object"&&(s=s?s.encoding:void 0);let a=this.readFileBuffer(r);return s?a.toString(s):a}readFileBuffer(r,s={asyncDecompress:!1}){typeof r=="number"&&(r=this.fdToPath(r,"read"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`open '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(a))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw or.EISDIR("read");let n=this.entries.get(a);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,s)}async readdirPromise(r,s){return this.readdirSync(r,s)}readdirSync(r,s){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw or.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw or.ENOTDIR(`scandir '${r}'`);if(s?.recursive)if(s?.withFileTypes){let c=Array.from(n,f=>Object.assign(this.statImpl("lstat",K.join(r,f)),{name:f,path:vt.dot}));for(let f of c){if(!f.isDirectory())continue;let p=K.join(f.path,f.name),h=this.listings.get(K.join(a,p));for(let E of h)c.push(Object.assign(this.statImpl("lstat",K.join(r,p,E)),{name:E,path:p}))}return c}else{let c=[...n];for(let f of c){let p=this.listings.get(K.join(a,f));if(!(typeof p>"u"))for(let h of p)c.push(K.join(f,h))}return c}else return s?.withFileTypes?Array.from(n,c=>Object.assign(this.statImpl("lstat",K.join(r,c)),{name:c,path:void 0})):[...n]}async readlinkPromise(r){let s=this.prepareReadlink(r);return(await this.getFileSource(s,{asyncDecompress:!0})).toString()}readlinkSync(r){let s=this.prepareReadlink(r);return this.getFileSource(s).toString()}prepareReadlink(r){let s=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(s)&&!this.listings.has(s))throw or.ENOENT(`readlink '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(s))throw or.ENOTDIR(`open '${r}'`);if(this.listings.has(s))throw or.EINVAL(`readlink '${r}'`);let a=this.entries.get(s);if(a===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(a))throw or.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let c=await this.getFileSource(n,{asyncDecompress:!0}),f=Buffer.alloc(s,0);return c.copy(f),await this.writeFilePromise(r,f)}truncateSync(r,s=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw or.EINVAL(`open '${r}'`);let c=this.getFileSource(n),f=Buffer.alloc(s,0);return c.copy(f),this.writeFileSync(r,f)}async ftruncatePromise(r,s){return this.truncatePromise(this.fdToPath(r,"ftruncate"),s)}ftruncateSync(r,s){return this.truncateSync(this.fdToPath(r,"ftruncateSync"),s)}watch(r,s,a){let n;switch(typeof s){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=s);break}if(!n)return{on:()=>{},close:()=>{}};let c=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(c)}}}watchFile(r,s,a){let n=K.resolve(vt.root,r);return nE(this,n,s,a)}unwatchFile(r,s){let a=K.resolve(vt.root,r);return dd(this,a,s)}}});function Lde(t,e,r=Buffer.alloc(0),s){let a=new hs(r),n=C=>C===e||C.startsWith(`${e}/`)?C.slice(0,e.length):null,c=async(C,S)=>()=>a,f=(C,S)=>a,p={...t},h=new Yn(p),E=new r0({baseFs:h,getMountPoint:n,factoryPromise:c,factorySync:f,magicByte:21,maxAge:1/0,typeCheck:s?.typeCheck});return _2(Ode.default,new n0(E)),a}var Ode,Mde=Ct(()=>{bt();Ode=et(Ie("fs"));wT()});var _de=Ct(()=>{Rde();wT();Mde()});var zj,Ev,BT,Ude=Ct(()=>{bt();wT();zj={CENTRAL_DIRECTORY:33639248,END_OF_CENTRAL_DIRECTORY:101010256},Ev=22,BT=class t{constructor(e){this.filesShouldBeCached=!1;if("buffer"in e)throw new Error("Buffer based zip archives are not supported");if(!e.readOnly)throw new Error("Writable zip archives are not supported");this.baseFs=e.baseFs,this.fd=this.baseFs.openSync(e.path,"r");try{this.entries=t.readZipSync(this.fd,this.baseFs,e.size)}catch(r){throw this.baseFs.closeSync(this.fd),this.fd="closed",r}}static readZipSync(e,r,s){if(s=0;N--)if(n.readUInt32LE(N)===zj.END_OF_CENTRAL_DIRECTORY){a=N;break}if(a===-1)throw new Error("Not a zip archive")}let c=n.readUInt16LE(a+10),f=n.readUInt32LE(a+12),p=n.readUInt32LE(a+16),h=n.readUInt16LE(a+20);if(a+h+Ev>n.length)throw new Error("Zip archive inconsistent");if(c==65535||f==4294967295||p==4294967295)throw new Error("Zip 64 is not supported");if(f>s)throw new Error("Zip archive inconsistent");if(c>f/46)throw new Error("Zip archive inconsistent");let E=Buffer.alloc(f);if(r.readSync(e,E,0,E.length,p)!==E.length)throw new Error("Zip archive inconsistent");let C=[],S=0,P=0,I=0;for(;PE.length)throw new Error("Zip archive inconsistent");if(E.readUInt32LE(S)!==zj.CENTRAL_DIRECTORY)throw new Error("Zip archive inconsistent");let N=E.readUInt16LE(S+4)>>>8;if(E.readUInt16LE(S+8)&1)throw new Error("Encrypted zip files are not supported");let W=E.readUInt16LE(S+10),te=E.readUInt32LE(S+16),ie=E.readUInt16LE(S+28),Ae=E.readUInt16LE(S+30),ce=E.readUInt16LE(S+32),me=E.readUInt32LE(S+42),pe=E.toString("utf8",S+46,S+46+ie).replaceAll("\0"," ");if(pe.includes("\0"))throw new Error("Invalid ZIP file");let Be=E.readUInt32LE(S+20),Ce=E.readUInt32LE(S+38);C.push({name:pe,os:N,mtime:fi.SAFE_TIME,crc:te,compressionMethod:W,isSymbolicLink:N===om&&(Ce>>>16&fi.S_IFMT)===fi.S_IFLNK,size:E.readUInt32LE(S+24),compressedSize:Be,externalAttributes:Ce,localHeaderOffset:me}),I+=Be,P+=1,S+=46+ie+Ae+ce}if(I>s)throw new Error("Zip archive inconsistent");if(S!==E.length)throw new Error("Zip archive inconsistent");return C}getExternalAttributes(e){let r=this.entries[e];return[r.os,r.externalAttributes]}getListings(){return this.entries.map(e=>e.name)}getSymlinkCount(){let e=0;for(let r of this.entries)r.isSymbolicLink&&(e+=1);return e}stat(e){let r=this.entries[e];return{crc:r.crc,mtime:r.mtime,size:r.size}}locate(e){for(let r=0;rNde,DEFLATE:()=>Jj,JsZipImpl:()=>BT,LibZipImpl:()=>wI,STORE:()=>Kj,ZIP_UNIX:()=>om,ZipFS:()=>hs,ZipOpenFS:()=>tA,getArchivePart:()=>qj,getLibzipPromise:()=>Vdt,getLibzipSync:()=>Ydt,makeEmptyArchive:()=>CT,mountMemoryDrive:()=>Lde});function Ydt(){return yv()}async function Vdt(){return yv()}var Hde,rA=Ct(()=>{Uj();Hde=et(xde());Tde();_de();Ude();Wj();Pde(()=>{let t=(0,Hde.default)();return Qde(t)})});var Cv,jde=Ct(()=>{bt();Wt();wv();Cv=class extends ot{constructor(){super(...arguments);this.cwd=ge.String("--cwd",process.cwd(),{description:"The directory to run the command in"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.usage={description:"run a command using yarn's portable shell",details:` + This command will run a command using Yarn's portable shell. + + Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell. + + Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell. + + Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used. + + For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md. + `,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await BI(r,[],{cwd:ue.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Kl,qde=Ct(()=>{Kl=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var DT={};Vt(DT,{fastGlobOptions:()=>Yde,isBraceExpansion:()=>Zj,isGlobPattern:()=>Kdt,match:()=>Jdt,micromatchOptions:()=>ST});function Kdt(t){if(!vT.default.scan(t,ST).isGlob)return!1;try{vT.default.parse(t,ST)}catch{return!1}return!0}function Jdt(t,{cwd:e,baseFs:r}){return(0,Gde.default)(t,{...Yde,cwd:ue.fromPortablePath(e),fs:gx(Wde.default,new n0(r))})}function Zj(t){return vT.default.scan(t,ST).isBrace}var Gde,Wde,vT,ST,Yde,Vde=Ct(()=>{bt();Gde=et(CQ()),Wde=et(Ie("fs")),vT=et(Sa()),ST={strictBrackets:!0},Yde={onlyDirectories:!1,onlyFiles:!1}});function Xj(){}function $j(){for(let t of am)t.kill()}function Zde(t,e,r,s){return a=>{let n=a[0]instanceof nA.Transform?"pipe":a[0],c=a[1]instanceof nA.Transform?"pipe":a[1],f=a[2]instanceof nA.Transform?"pipe":a[2],p=(0,Jde.default)(t,e,{...s,stdio:[n,c,f]});return am.add(p),am.size===1&&(process.on("SIGINT",Xj),process.on("SIGTERM",$j)),a[0]instanceof nA.Transform&&a[0].pipe(p.stdin),a[1]instanceof nA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof nA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(am.delete(p),am.size===0&&(process.off("SIGINT",Xj),process.off("SIGTERM",$j)),E.code){case"ENOENT":a[2].write(`command not found: ${t} +`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t} +`),h(128);break;default:a[2].write(`uncaught error: ${E.message} +`),h(1);break}}),p.on("close",E=>{am.delete(p),am.size===0&&(process.off("SIGINT",Xj),process.off("SIGTERM",$j)),h(E!==null?E:129)})})}}}function Xde(t){return e=>{let r=e[0]==="pipe"?new nA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function bT(t,e){return t6.start(t,e)}function Kde(t,e=null){let r=new nA.PassThrough,s=new zde.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(` +`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function $de(t,{prefix:e}){return{stdout:Kde(r=>t.stdout.write(`${r} +`),t.stdout.isTTY?e:null),stderr:Kde(r=>t.stderr.write(`${r} +`),t.stderr.isTTY?e:null)}}var Jde,nA,zde,am,Mc,e6,t6,r6=Ct(()=>{Jde=et(j_()),nA=Ie("stream"),zde=Ie("string_decoder"),am=new Set;Mc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},e6=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},t6=class t{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new e6;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var Dv={};Vt(Dv,{EntryCommand:()=>Cv,ShellError:()=>Kl,execute:()=>BI,globUtils:()=>DT});function eme(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Kl(`Bad file descriptor: "${t}"`)}return s}function xT(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Zdt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on("data",n=>s.push(n)),await kT(t,e,xT(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function tme(t,e,r){let s=t.map(async n=>{let c=await lm(n.args,e,r);return{name:n.name,value:c.join(" ")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function PT(t){return t.match(/[^ \r\n\t]+/g)||[]}async function ame(t,e,r,s,a=s){switch(t.name){case"$":s(String(process.pid));break;case"#":s(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=PT(n);for(let f=0;f=0&&n"u"&&(t.defaultValue?c=(await lm(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(c="")),typeof c>"u")throw f?new Kl(`Unbound argument #${n}`):new Kl(`Unbound variable "${t.name}"`);if(t.quoted)s(c);else{let p=PT(c);for(let E=0;Es.push(n));let a=Number(s.join(" "));return Number.isNaN(a)?Bv({type:"variable",name:s.join(" ")},e,r):Bv({type:"number",value:a},e,r)}else return Xdt[t.type](await Bv(t.left,e,r),await Bv(t.right,e,r))}async function lm(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{c(E),f()},h=(E,C,S)=>{let P=JSON.stringify({type:E,fd:C}),I=s.get(P);typeof I>"u"&&s.set(P,I=[]),I.push(S)};for(let E of t){let C=!1;switch(E.type){case"redirection":{let S=await lm(E.args,e,r);for(let P of S)h(E.subtype,E.fd,P)}break;case"argument":for(let S of E.segments)switch(S.type){case"text":c(S.text);break;case"glob":c(S.pattern),C=!0;break;case"shell":{let P=await Zdt(S.shell,e,r);if(S.quoted)c(P);else{let I=PT(P);for(let R=0;R"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let P=await e.glob.match(S,{cwd:r.cwd,baseFs:e.baseFs});if(P.length===0){let I=Zj(S)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new Kl(`No matches found: "${S}"${I}`)}for(let I of P.sort())p(I)}}if(s.size>0){let E=[];for(let[C,S]of s.entries())E.splice(E.length,0,C,String(S.length),...S);a.splice(0,0,"__ysh_set_redirects",...E,"--")}return a}function vv(t,e,r){e.builtins.has(t[0])||(t=["command",...t]);let s=ue.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<"u"&&(a={...a,PWD:s});let[n,...c]=t;if(n==="command")return Zde(c[0],c.slice(1),e,{cwd:s,env:a});let f=e.builtins.get(n);if(typeof f>"u")throw new Error(`Assertion failed: A builtin should exist for "${n}"`);return Xde(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:C,stdout:S,stderr:P}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await f(c,e,r)}finally{r.stdin=C,r.stdout=S,r.stderr=P}})}function $dt(t,e,r){return s=>{let a=new Jl.PassThrough,n=kT(t,e,xT(r,{stdin:a}));return{stdin:a,promise:n}}}function emt(t,e,r){return s=>{let a=new Jl.PassThrough,n=kT(t,e,r);return{stdin:a,promise:n}}}function rme(t,e,r,s){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(s.procedures,a));return s.procedures={...s.procedures},s.procedures[a]=t,vv([...e,"__ysh_run_procedure",a],r,s)}}async function nme(t,e,r){let s=t,a=null,n=null;for(;s;){let c=s.then?{...r}:r,f;switch(s.type){case"command":{let p=await lm(s.args,e,r),h=await tme(s.envs,e,r);f=s.envs.length?vv(p,e,xT(c,{environment:h})):vv(p,e,c)}break;case"subshell":{let p=await lm(s.args,e,r),h=$dt(s.subshell,e,c);f=rme(h,p,e,c)}break;case"group":{let p=await lm(s.args,e,r),h=emt(s.group,e,c);f=rme(h,p,e,c)}break;case"envs":{let p=await tme(s.envs,e,r);c.environment={...c.environment,...p},f=vv(["true"],e,c)}break}if(typeof f>"u")throw new Error("Assertion failed: An action should have been generated");if(a===null)n=bT(f,{stdin:new Mc(c.stdin),stdout:new Mc(c.stdout),stderr:new Mc(c.stderr)});else{if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(a){case"|":n=n.pipeTo(f,1);break;case"|&":n=n.pipeTo(f,3);break}}s.then?(a=s.then.type,s=s.then.chain):s=null}if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await n.run()}async function tmt(t,e,r,{background:s=!1}={}){function a(n){let c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[n%c.length];return ime.default.hex(f)}if(s){let n=r.nextBackgroundJobIndex++,c=a(n),f=`[${n}]`,p=c(f),{stdout:h,stderr:E}=$de(r,{prefix:p});return r.backgroundJobs.push(nme(t,e,xT(r,{stdout:h,stderr:E})).catch(C=>E.write(`${C.message} +`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(uE(t))}' has ended +`)})),0}return await nme(t,e,r)}async function rmt(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables["?"]=String(f)},c=async f=>{try{return await tmt(f.chain,e,r,{background:s&&typeof f.then>"u"})}catch(p){if(!(p instanceof Kl))throw p;return r.stderr.write(`${p.message} +`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await c(t.then.line));break;case"||":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function kT(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await rmt(n,e,r,{background:c==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function lme(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>Sv(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>Sv(e));case"arithmetic":return n6(t.arithmetic);case"shell":return i6(t.shell);default:return!1}}function Sv(t){switch(t.type){case"redirection":return t.args.some(e=>Sv(e));case"argument":return t.segments.some(e=>lme(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function n6(t){switch(t.type){case"variable":return lme(t);case"number":return!1;default:return n6(t.left)||n6(t.right)}}function i6(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case"subshell":s=i6(r.subshell);break;case"command":s=r.envs.some(a=>a.args.some(n=>Sv(n)))||r.args.some(a=>Sv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function BI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=ue.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=DT}={}){let C={};for(let[I,R]of Object.entries(n))typeof R<"u"&&(C[I]=R);let S=new Map(zdt);for(let[I,R]of Object.entries(s))S.set(I,R);c===null&&(c=new Jl.PassThrough,c.end());let P=yx(t,E);if(!i6(P)&&P.length>0&&e.length>0){let{command:I}=P[P.length-1];for(;I.then;)I=I.then.line;let R=I.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await kT(P,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:C,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ime,sme,Jl,ome,zdt,Xdt,wv=Ct(()=>{bt();Bc();ime=et(kE()),sme=Ie("os"),Jl=Ie("stream"),ome=Ie("timers/promises");jde();qde();Vde();r6();r6();zdt=new Map([["cd",async([t=(0,sme.homedir)(),...e],r,s)=>{let a=K.resolve(s.cwd,ue.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code==="ENOENT"?new Kl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Kl(`cd: not a directory: ${t}`);return s.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${ue.fromPortablePath(r.cwd)} +`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,s)=>s.exitCode=parseInt(t??s.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")} +`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new Kl("sleep: missing operand");let s=Number(t);if(Number.isNaN(s))throw new Kl(`sleep: invalid time interval '${t}'`);return await(0,ome.setTimeout)(1e3*s,0)}],["unset",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],["__ysh_run_procedure",async(t,e,r)=>{let s=r.procedures[t[0]];return await bT(s,{stdin:new Mc(r.stdin),stdout:new Mc(r.stdout),stderr:new Mc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!=="--";){let C=t[h++],{type:S,fd:P}=JSON.parse(C),I=W=>{switch(P){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: "${P}"`)}},R=W=>{switch(P){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: "${P}"`)}},N=Number(t[h++]),U=h+N;for(let W=h;We.baseFs.createReadStream(K.resolve(r.cwd,ue.toPortablePath(t[W]))));break;case"<<<":I(()=>{let te=new Jl.PassThrough;return process.nextTick(()=>{te.write(`${t[W]} +`),te.end()}),te});break;case"<&":I(()=>eme(Number(t[W]),1,r));break;case">":case">>":{let te=K.resolve(r.cwd,ue.toPortablePath(t[W]));R(te==="/dev/null"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,Ae,ce){setImmediate(ce)}}):e.baseFs.createWriteStream(te,S===">>"?{flags:"a"}:void 0))}break;case">&":R(eme(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${S}"`)}}if(c.length>0){let C=new Jl.PassThrough;s=C;let S=P=>{if(P===c.length)C.end();else{let I=c[P]();I.pipe(C,{end:!1}),I.on("end",()=>{S(P+1)})}};S(0)}if(f.length>0){let C=new Jl.PassThrough;a=C;for(let S of f)C.pipe(S)}if(p.length>0){let C=new Jl.PassThrough;n=C;for(let S of p)C.pipe(S)}let E=await bT(vv(t.slice(h+1),e,r),{stdin:new Mc(s),stdout:new Mc(a),stderr:new Mc(n)}).run();return await Promise.all(f.map(C=>new Promise((S,P)=>{C.on("error",I=>{P(I)}),C.on("close",()=>{S()}),C.end()}))),await Promise.all(p.map(C=>new Promise((S,P)=>{C.on("error",I=>{P(I)}),C.on("close",()=>{S()}),C.end()}))),E}]]);Xdt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var QT=L((DXt,cme)=>{function nmt(t,e){for(var r=-1,s=t==null?0:t.length,a=Array(s);++r{var ume=Gd(),imt=QT(),smt=xc(),omt=oI(),amt=1/0,fme=ume?ume.prototype:void 0,Ame=fme?fme.toString:void 0;function pme(t){if(typeof t=="string")return t;if(smt(t))return imt(t,pme)+"";if(omt(t))return Ame?Ame.call(t):"";var e=t+"";return e=="0"&&1/t==-amt?"-0":e}hme.exports=pme});var bv=L((PXt,dme)=>{var lmt=gme();function cmt(t){return t==null?"":lmt(t)}dme.exports=cmt});var s6=L((xXt,mme)=>{function umt(t,e,r){var s=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++s{var fmt=s6();function Amt(t,e,r){var s=t.length;return r=r===void 0?s:r,!e&&r>=s?t:fmt(t,e,r)}yme.exports=Amt});var o6=L((QXt,Ime)=>{var pmt="\\ud800-\\udfff",hmt="\\u0300-\\u036f",gmt="\\ufe20-\\ufe2f",dmt="\\u20d0-\\u20ff",mmt=hmt+gmt+dmt,ymt="\\ufe0e\\ufe0f",Emt="\\u200d",Imt=RegExp("["+Emt+pmt+mmt+ymt+"]");function Cmt(t){return Imt.test(t)}Ime.exports=Cmt});var wme=L((TXt,Cme)=>{function wmt(t){return t.split("")}Cme.exports=wmt});var kme=L((RXt,xme)=>{var Bme="\\ud800-\\udfff",Bmt="\\u0300-\\u036f",vmt="\\ufe20-\\ufe2f",Smt="\\u20d0-\\u20ff",Dmt=Bmt+vmt+Smt,bmt="\\ufe0e\\ufe0f",Pmt="["+Bme+"]",a6="["+Dmt+"]",l6="\\ud83c[\\udffb-\\udfff]",xmt="(?:"+a6+"|"+l6+")",vme="[^"+Bme+"]",Sme="(?:\\ud83c[\\udde6-\\uddff]){2}",Dme="[\\ud800-\\udbff][\\udc00-\\udfff]",kmt="\\u200d",bme=xmt+"?",Pme="["+bmt+"]?",Qmt="(?:"+kmt+"(?:"+[vme,Sme,Dme].join("|")+")"+Pme+bme+")*",Tmt=Pme+bme+Qmt,Rmt="(?:"+[vme+a6+"?",a6,Sme,Dme,Pmt].join("|")+")",Fmt=RegExp(l6+"(?="+l6+")|"+Rmt+Tmt,"g");function Nmt(t){return t.match(Fmt)||[]}xme.exports=Nmt});var Tme=L((FXt,Qme)=>{var Omt=wme(),Lmt=o6(),Mmt=kme();function _mt(t){return Lmt(t)?Mmt(t):Omt(t)}Qme.exports=_mt});var Fme=L((NXt,Rme)=>{var Umt=Eme(),Hmt=o6(),jmt=Tme(),qmt=bv();function Gmt(t){return function(e){e=qmt(e);var r=Hmt(e)?jmt(e):void 0,s=r?r[0]:e.charAt(0),a=r?Umt(r,1).join(""):e.slice(1);return s[t]()+a}}Rme.exports=Gmt});var Ome=L((OXt,Nme)=>{var Wmt=Fme(),Ymt=Wmt("toUpperCase");Nme.exports=Ymt});var c6=L((LXt,Lme)=>{var Vmt=bv(),Kmt=Ome();function Jmt(t){return Kmt(Vmt(t).toLowerCase())}Lme.exports=Jmt});var Mme=L((MXt,TT)=>{function zmt(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,C=11,S=12,P=13,I=14,R=15,N=16,U=17,W=0,te=1,ie=2,Ae=3,ce=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var ye=g.charCodeAt(we);if(55296<=ye&&ye<=56319&&we=1){var fe=g.charCodeAt(we-1),se=ye;return 55296<=fe&&fe<=56319?(fe-55296)*1024+(se-56320)+65536:se}return ye}function Be(g,we,ye){var fe=[g].concat(we).concat([ye]),se=fe[fe.length-2],X=ye,De=fe.lastIndexOf(I);if(De>1&&fe.slice(1,De).every(function(j){return j==s})&&[s,P,U].indexOf(g)==-1)return ie;var Re=fe.lastIndexOf(a);if(Re>0&&fe.slice(1,Re).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return fe.filter(function(j){return j==a}).length%2==1?Ae:ce;if(se==t&&X==e)return W;if(se==r||se==t||se==e)return X==I&&we.every(function(j){return j==s})?ie:te;if(X==r||X==t||X==e)return te;if(se==c&&(X==c||X==f||X==h||X==E))return W;if((se==h||se==f)&&(X==f||X==p))return W;if((se==E||se==p)&&X==p)return W;if(X==s||X==R)return W;if(X==n)return W;if(se==S)return W;var dt=fe.indexOf(s)!=-1?fe.lastIndexOf(s)-1:fe.length-2;return[P,U].indexOf(fe[dt])!=-1&&fe.slice(dt+1,-1).every(function(j){return j==s})&&X==I||se==R&&[N,U].indexOf(X)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&X==a?W:te}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var ye=Ce(pe(g,we)),fe=[],se=we+1;se{var Zmt=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,RT;function Xmt(){if(RT)return RT;if(typeof Intl.Segmenter<"u"){let t=new Intl.Segmenter("en",{granularity:"grapheme"});return RT=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Mme(),e=new t;return RT=r=>e.splitGraphemes(r)}}_me.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let s=r-e,a="",n=0,c=0;for(;t.length>0;){let f=t.match(Zmt)||[t,t,void 0],p=Xmt()(f[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(s-c,p.length);a+=p.slice(0,E).join(""),n+=h,c+=E,typeof f[2]<"u"&&(a+=f[2]),t=t.slice(f[0].length)}return a}});var un,Pv=Ct(()=>{un=process.env.YARN_IS_TEST_ENV?"0.0.0":"4.9.2"});function Yme(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let a=Vf(t===null?0:t);return!r&&t===null?Ut(e,a,"grey"):a}function u6(t,{configuration:e,json:r}){let s=Yme(t,{configuration:e,json:r});if(!s||t===null||t===0)return s;let a=Dr[t],n=`https://yarnpkg.com/advanced/error-codes#${s}---${a}`.toLowerCase();return KE(e,s,n)}async function vI({configuration:t,stdout:e,forceError:r},s){let a=await Ot.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let c=!1,f=!1;for(let p of s)typeof p.option<"u"&&(p.error||r?(f=!0,n.reportError(50,p.message)):(c=!0,n.reportWarning(50,p.message)),p.callback?.());c&&!f&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var Gme,FT,$mt,Hme,jme,S0,Wme,qme,eyt,tyt,NT,ryt,Ot,xv=Ct(()=>{Gme=et(Ume()),FT=et(Rd());Zx();Fc();Pv();Qc();$mt="\xB7",Hme=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],jme=80,S0=FT.default.GITHUB_ACTIONS?{start:t=>`::group::${t} +`,end:t=>`::endgroup:: +`}:FT.default.TRAVIS?{start:t=>`travis_fold:start:${t} +`,end:t=>`travis_fold:end:${t} +`}:FT.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t} +`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Wme=S0!==null,qme=new Date,eyt=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,tyt=t=>t,NT=tyt({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),ryt=eyt&&Object.keys(NT).find(t=>{let e=NT[t];return!(e.date&&(e.date[0]!==qme.getDate()||e.date[1]!==qme.getMonth()+1))})||"default";Ot=class extends ho{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:C=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(HB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=C,this.json=a,this.stdout=s,r.get("enableProgressBars")&&!a&&s.isTTY&&s.columns>22){let S=r.get("progressBarStyle")||ryt;if(!Object.hasOwn(NT,S))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=NT[S];let P=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*P/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!="string"){let h=c;c=h.message,f=f??h.name}let p=typeof f<"u"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Kd(r.configuration,`Yarn ${un}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s=="function"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,S0!==null&&!this.json&&this.includeInfos&&this.stdout.write(S0.start(r))},reportFooter:f=>{if(this.indent-=1,S0!==null&&!this.json&&this.includeInfos){this.stdout.write(S0.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&f>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,f,pt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof s=="function"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",c=`${this.formatPrefix(n,"blueBright")}${s}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"redBright")}${s}`,{truncate:!1})}reportFold(r,s){if(!S0)return;let a=`${S0.start(r)}${s}${S0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let s=!1,a=Promise.resolve().then(async()=>{let c={progress:r.hasProgress?0:void 0,title:r.hasTitle?"":void 0};this.progress.set(r,{definition:c,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:f,title:p}of r)s||c.progress===f&&c.title===p||(c.progress=f,c.title=p,this.refreshProgress());n()}),n=()=>{s||(s=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r="";this.errorCount>0?r="Failed with errors":this.warningCount>0?r="Done with warnings":r="Done";let s=Ut(this.configuration,Date.now()-this.startTime,pt.DURATION),a=this.configuration.get("enableTimers")?`${r} in ${s}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:s}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:s})} +`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})} +`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>jme&&(this.progressFrame=(this.progressFrame+1)%Hme.length,this.progressTime=r);let s=Hme[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${f}${s}${n}${p} +`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},jme)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>"u"&&(s=this.configuration.get("preferTruncatedLines")),s&&(r=(0,Gme.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Yme(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,s){return this.includePrefix?`${Ut(this.configuration,"\u27A4",s)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?u6(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${$mt} `}}});var In={};Vt(In,{PackageManager:()=>Jme,detectPackageManager:()=>zme,executePackageAccessibleBinary:()=>tye,executePackageScript:()=>OT,executePackageShellcode:()=>f6,executeWorkspaceAccessibleBinary:()=>cyt,executeWorkspaceLifecycleScript:()=>$me,executeWorkspaceScript:()=>Xme,getPackageAccessibleBinaries:()=>LT,getWorkspaceAccessibleBinaries:()=>eye,hasPackageScript:()=>oyt,hasWorkspaceScript:()=>A6,isNodeScript:()=>p6,makeScriptEnv:()=>kv,maybeExecuteWorkspaceLifecycleScript:()=>lyt,prepareExternalProject:()=>syt});async function D0(t,e,r,s=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await le.writeFilePromise(K.format({dir:t,name:e,ext:".cmd"}),a)}await le.writeFilePromise(K.join(t,e),`#!/bin/sh +exec "${r}" ${s.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" +`,{mode:493})}async function zme(t){let e=await Ht.tryFind(t);if(e?.packageManager){let s=bQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await le.readFilePromise(K.join(t,Er.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:le.existsSync(K.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:le.existsSync(K.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function kv({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,C]of Object.entries(n))typeof C<"u"&&(c[E.toLowerCase()!=="path"?E:"PATH"]=C);let f=ue.fromPortablePath(r);c.BERRY_BIN_FOLDER=ue.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([D0(r,"node",process.execPath),...un!==null?[D0(r,"run",process.execPath,[p,"run"]),D0(r,"yarn",process.execPath,[p]),D0(r,"yarnpkg",process.execPath,[p]),D0(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(c.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=ue.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${ue.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${ue.sep}yarn`,c.npm_node_execpath=`${f}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),C=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";c.npm_package_name=cn(e),c.npm_package_version=C;let S;if(E)S=E.cwd;else{let P=t.storedPackages.get(e.locatorHash);if(!P)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),R={project:t,report:new Ot({stdout:new b0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(P,R));if(!N)throw new Error(`The package ${Yr(t.configuration,P)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(P,R)}c.npm_package_json=ue.fromPortablePath(K.join(S,Er.manifest))}let h=un!==null?`yarn/${un}`:`yarn/${kp("@yarnpkg/core").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,C,S)=>await D0(r,E,C,S)),c}async function syt(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await iyt(async()=>{await le.mktempPromise(async c=>{let f=K.join(c,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:ue.fromPortablePath(t),report:s}),C=n&&Gu(n)?tI(n):n,S=C?cl(C):"an external project";h.write(`Packing ${S} from sources +`);let P=await zme(t),I;P!==null?(h.write(`Using ${P.packageManager} for bootstrap. Reason: ${P.reason} + +`),I=P.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn + +`),I="Yarn");let R=I==="Yarn"&&!P?.packageManagerField;await le.mktempPromise(async N=>{let U=await kv({binFolder:N,ignoreCorepack:R,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),te=new Map([["Yarn Classic",async()=>{let Ae=a!==null?["workspace",a]:[],ce=K.join(t,Er.manifest),me=await le.readFilePromise(ce),pe=await Yu(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await le.writeFilePromise(ce,me),await le.appendFilePromise(K.join(t,".npmignore"),`/.yarn +`),h.write(` +`),delete U.NODE_ENV;let Be=await Yu("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(` +`);let Ce=await Yu("yarn",[...Ae,"pack","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],["Yarn",async()=>{let Ae=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ce=K.join(t,Er.lockfile);await le.existsPromise(ce)||await le.writeFilePromise(ce,"");let me=await Yu("yarn",[...Ae,"pack","--install-if-needed","--filename",ue.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],["npm",async()=>{if(a!==null){let we=new b0.PassThrough,ye=GE(we);we.pipe(h,{end:!1});let fe=await Yu("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),fe.code!==0)return h.end(),E.end(),fe.code;let se=(await ye).toString().trim();if(!eA(se,">=7.x")){let X=ba(null,"npm"),De=On(X,se),Re=On(X,">=7.x");throw new Error(`Workspaces aren't supported by ${ni(r,De)}; please upgrade to ${ni(r,Re)} (npm has been detected as the primary package manager for ${Ut(r,t,pt.PATH)})`)}}let Ae=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ce=await Yu("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ce.code!==0)return ce.code;let me=new b0.PassThrough,pe=GE(me);me.pipe(h);let Be=await Yu("npm",["pack","--silent",...Ae],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\n/s,""),g=K.resolve(t,ue.toPortablePath(Ce));return await le.renamePromise(g,e),0}]]).get(I);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let ie=await te();if(!(ie===0||typeof ie>"u"))throw le.detachTemp(c),new Yt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${Ut(r,f,pt.PATH)})`)})})})}async function oyt(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return A6(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await tA.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new b0.PassThrough,configuration:c})},h=f.find(P=>P.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),C=new Sn(E,{baseFs:n});return(await Ht.find(vt.dot,{baseFs:C})).scripts.has(e)})}async function OT(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{manifest:h,env:E,cwd:C}=await Zme(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>"u")return 1;let P=async()=>await BI(S,r,{cwd:C,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,P,a,t,e,{script:S,args:r,cwd:C,env:E,stdin:n,stdout:c,stderr:f}))()})}async function f6(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await le.mktempPromise(async p=>{let{env:h,cwd:E}=await Zme(t,{project:a,binFolder:p,cwd:s});return await BI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function ayt(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await kv({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await h6(e,await eye(t)),typeof r>"u"&&(r=K.dirname(await le.realpathPromise(K.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function Zme(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return ayt(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await tA.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new b0.PassThrough,configuration:p})},C=h.find(N=>N.supportsPackage(c,E));if(!C)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await kv({project:e,locator:t,binFolder:r,lifecycleScript:a});await h6(r,await LT(t,{project:e}));let P=await C.findPackageLocation(c,E),I=new Sn(P,{baseFs:f}),R=await Ht.find(vt.dot,{baseFs:I});return typeof s>"u"&&(s=P),{manifest:R,binFolder:r,env:S,cwd:s}})}async function Xme(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await OT(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function A6(t,e){return t.manifest.scripts.has(e)}async function $me(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await le.mktempPromise(async c=>{let f=K.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${ue.fromPortablePath(t.cwd)}") +`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the "${e}" lifecycle script`);let C=await Xme(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),C!==0)throw le.detachTemp(c),new Yt(36,`${(0,Vme.default)(e)} script failed (exit code ${Ut(a,C,pt.NUMBER)}, logs can be found here: ${Ut(a,f,pt.PATH)}); run ${Ut(a,`yarn ${e}`,pt.CODE)} to investigate`)})}async function lyt(t,e,r){A6(t,e)&&await $me(t,e,r)}function p6(t){let e=K.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),s;try{s=le.openSync(t,"r")}catch{return!0}try{le.readSync(s,r,0,r.length,0)}finally{le.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function LT(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new b0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let C=e.storedResolutions.get(E.descriptorHash);if(!C)throw new Error(`Assertion failed: The resolution (${ni(r,E)}) should have been registered`);p.add(C)}let h=await Promise.all(Array.from(p,async E=>{let C=e.storedPackages.get(E);if(!C)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(C.bin.size===0)return Yl.skip;let S=c.find(I=>I.supportsPackage(C,f));if(!S)return Yl.skip;let P=null;try{P=await S.findPackageLocation(C,f)}catch(I){if(I.code==="LOCATOR_NOT_INSTALLED")return Yl.skip;throw I}return{dependency:C,packageLocation:P}}));for(let E of h){if(E===Yl.skip)continue;let{dependency:C,packageLocation:S}=E;for(let[P,I]of C.bin){let R=K.resolve(S,I);s.set(P,[C,ue.fromPortablePath(R),p6(R)])}}return s}async function eye(t){return await LT(t.anchoredLocator,{project:t.project})}async function h6(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?D0(t,r,process.execPath,[s]):D0(t,r,s,[])))}async function tye(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await LT(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await le.mktempPromise(async C=>{let[,S]=E,P=await kv({project:a,locator:t,binFolder:C});await h6(P.BERRY_BIN_FOLDER,h);let I=p6(ue.toPortablePath(S))?Yu(process.execPath,[...p,S,...r],{cwd:s,env:P,stdin:n,stdout:c,stderr:f}):Yu(S,r,{cwd:s,env:P,stdin:n,stdout:c,stderr:f}),R;try{R=await I}finally{await le.removePromise(P.BERRY_BIN_FOLDER)}return R.code})}async function cyt(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await tye(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var Vme,Kme,b0,Jme,nyt,iyt,g6=Ct(()=>{bt();bt();rA();wv();Vme=et(c6()),Kme=et(Od()),b0=Ie("stream");sI();Fc();xv();Pv();hT();Qc();kc();Np();Yo();Jme=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Jme||{});nyt=2,iyt=(0,Kme.default)(nyt)});var SI=L((o$t,nye)=>{"use strict";var rye=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);nye.exports=t=>t?Object.keys(t).map(e=>[rye.has(e)?rye.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var bI=L((a$t,Aye)=>{"use strict";var iye=typeof process=="object"&&process?process:{stdout:null,stderr:null},uyt=Ie("events"),sye=Ie("stream"),oye=Ie("string_decoder").StringDecoder,jp=Symbol("EOF"),qp=Symbol("maybeEmitEnd"),P0=Symbol("emittedEnd"),MT=Symbol("emittingEnd"),Qv=Symbol("emittedError"),_T=Symbol("closed"),aye=Symbol("read"),UT=Symbol("flush"),lye=Symbol("flushChunk"),fl=Symbol("encoding"),Gp=Symbol("decoder"),HT=Symbol("flowing"),Tv=Symbol("paused"),DI=Symbol("resume"),Ks=Symbol("bufferLength"),d6=Symbol("bufferPush"),m6=Symbol("bufferShift"),zo=Symbol("objectMode"),Zo=Symbol("destroyed"),y6=Symbol("emitData"),cye=Symbol("emitEnd"),E6=Symbol("emitEnd2"),Wp=Symbol("async"),Rv=t=>Promise.resolve().then(t),uye=global._MP_NO_ITERATOR_SYMBOLS_!=="1",fyt=uye&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Ayt=uye&&Symbol.iterator||Symbol("iterator not implemented"),pyt=t=>t==="end"||t==="finish"||t==="prefinish",hyt=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,gyt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),jT=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[DI](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},I6=class extends jT{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}};Aye.exports=class fye extends sye{constructor(e){super(),this[HT]=!1,this[Tv]=!1,this.pipes=[],this.buffer=[],this[zo]=e&&e.objectMode||!1,this[zo]?this[fl]=null:this[fl]=e&&e.encoding||null,this[fl]==="buffer"&&(this[fl]=null),this[Wp]=e&&!!e.async||!1,this[Gp]=this[fl]?new oye(this[fl]):null,this[jp]=!1,this[P0]=!1,this[MT]=!1,this[_T]=!1,this[Qv]=null,this.writable=!0,this.readable=!0,this[Ks]=0,this[Zo]=!1}get bufferLength(){return this[Ks]}get encoding(){return this[fl]}set encoding(e){if(this[zo])throw new Error("cannot set encoding in objectMode");if(this[fl]&&e!==this[fl]&&(this[Gp]&&this[Gp].lastNeed||this[Ks]))throw new Error("cannot change encoding");this[fl]!==e&&(this[Gp]=e?new oye(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Gp].write(r)))),this[fl]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[zo]}set objectMode(e){this[zo]=this[zo]||!!e}get async(){return this[Wp]}set async(e){this[Wp]=this[Wp]||!!e}write(e,r,s){if(this[jp])throw new Error("write after end");if(this[Zo])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(s=r,r="utf8"),r||(r="utf8");let a=this[Wp]?Rv:n=>n();return!this[zo]&&!Buffer.isBuffer(e)&&(gyt(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):hyt(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[zo]?(this.flowing&&this[Ks]!==0&&this[UT](!0),this.flowing?this.emit("data",e):this[d6](e),this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing):e.length?(typeof e=="string"&&!(r===this[fl]&&!this[Gp].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[fl]&&(e=this[Gp].write(e)),this.flowing&&this[Ks]!==0&&this[UT](!0),this.flowing?this.emit("data",e):this[d6](e),this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing):(this[Ks]!==0&&this.emit("readable"),s&&a(s),this.flowing)}read(e){if(this[Zo])return null;if(this[Ks]===0||e===0||e>this[Ks])return this[qp](),null;this[zo]&&(e=null),this.buffer.length>1&&!this[zo]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Ks])]);let r=this[aye](e||null,this.buffer[0]);return this[qp](),r}[aye](e,r){return e===r.length||e===null?this[m6]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Ks]-=e),this.emit("data",r),!this.buffer.length&&!this[jp]&&this.emit("drain"),r}end(e,r,s){return typeof e=="function"&&(s=e,e=null),typeof r=="function"&&(s=r,r="utf8"),e&&this.write(e,r),s&&this.once("end",s),this[jp]=!0,this.writable=!1,(this.flowing||!this[Tv])&&this[qp](),this}[DI](){this[Zo]||(this[Tv]=!1,this[HT]=!0,this.emit("resume"),this.buffer.length?this[UT]():this[jp]?this[qp]():this.emit("drain"))}resume(){return this[DI]()}pause(){this[HT]=!1,this[Tv]=!0}get destroyed(){return this[Zo]}get flowing(){return this[HT]}get paused(){return this[Tv]}[d6](e){this[zo]?this[Ks]+=1:this[Ks]+=e.length,this.buffer.push(e)}[m6](){return this.buffer.length&&(this[zo]?this[Ks]-=1:this[Ks]-=this.buffer[0].length),this.buffer.shift()}[UT](e){do;while(this[lye](this[m6]()));!e&&!this.buffer.length&&!this[jp]&&this.emit("drain")}[lye](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Zo])return;let s=this[P0];return r=r||{},e===iye.stdout||e===iye.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this.pipes.push(r.proxyErrors?new I6(this,e,r):new jT(this,e,r)),this[Wp]?Rv(()=>this[DI]()):this[DI]()),e}unpipe(e){let r=this.pipes.find(s=>s.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[DI]():e==="readable"&&this[Ks]!==0?super.emit("readable"):pyt(e)&&this[P0]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Qv]&&(this[Wp]?Rv(()=>r.call(this,this[Qv])):r.call(this,this[Qv])),s}get emittedEnd(){return this[P0]}[qp](){!this[MT]&&!this[P0]&&!this[Zo]&&this.buffer.length===0&&this[jp]&&(this[MT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_T]&&this.emit("close"),this[MT]=!1)}emit(e,r,...s){if(e!=="error"&&e!=="close"&&e!==Zo&&this[Zo])return;if(e==="data")return r?this[Wp]?Rv(()=>this[y6](r)):this[y6](r):!1;if(e==="end")return this[cye]();if(e==="close"){if(this[_T]=!0,!this[P0]&&!this[Zo])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Qv]=r;let n=super.emit("error",r);return this[qp](),n}else if(e==="resume"){let n=super.emit("resume");return this[qp](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...s);return this[qp](),a}[y6](e){for(let s of this.pipes)s.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[qp](),r}[cye](){this[P0]||(this[P0]=!0,this.readable=!1,this[Wp]?Rv(()=>this[E6]()):this[E6]())}[E6](){if(this[Gp]){let r=this[Gp].end();if(r){for(let s of this.pipes)s.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[zo]||(e.dataLength=0);let r=this.promise();return this.on("data",s=>{e.push(s),this[zo]||(e.dataLength+=s.length)}),r.then(()=>e)}concat(){return this[zo]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[zo]?Promise.reject(new Error("cannot concat in objectMode")):this[fl]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Zo,()=>r(new Error("stream destroyed"))),this.on("error",s=>r(s)),this.on("end",()=>e())})}[fyt](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[jp])return Promise.resolve({done:!0});let s=null,a=null,n=h=>{this.removeListener("data",c),this.removeListener("end",f),a(h)},c=h=>{this.removeListener("error",n),this.removeListener("end",f),this.pause(),s({value:h,done:!!this[jp]})},f=()=>{this.removeListener("error",n),this.removeListener("data",c),s({done:!0})},p=()=>n(new Error("stream destroyed"));return new Promise((h,E)=>{a=E,s=h,this.once(Zo,p),this.once("error",n),this.once("end",f),this.once("data",c)})}}}[Ayt](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Zo]?(e?this.emit("error",e):this.emit(Zo),this):(this[Zo]=!0,this.buffer.length=0,this[Ks]=0,typeof this.close=="function"&&!this[_T]&&this.close(),e?this.emit("error",e):this.emit(Zo),this)}static isStream(e){return!!e&&(e instanceof fye||e instanceof sye||e instanceof uyt&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var hye=L((l$t,pye)=>{var dyt=Ie("zlib").constants||{ZLIB_VERNUM:4736};pye.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},dyt))});var O6=L(zl=>{"use strict";var S6=Ie("assert"),x0=Ie("buffer").Buffer,mye=Ie("zlib"),cm=zl.constants=hye(),myt=bI(),gye=x0.concat,um=Symbol("_superWrite"),xI=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},yyt=Symbol("opts"),Fv=Symbol("flushFlag"),dye=Symbol("finishFlushFlag"),N6=Symbol("fullFlushFlag"),Ii=Symbol("handle"),qT=Symbol("onError"),PI=Symbol("sawError"),C6=Symbol("level"),w6=Symbol("strategy"),B6=Symbol("ended"),c$t=Symbol("_defaultFullFlush"),GT=class extends myt{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[PI]=!1,this[B6]=!1,this[yyt]=e,this[Fv]=e.flush,this[dye]=e.finishFlush;try{this[Ii]=new mye[r](e)}catch(s){throw new xI(s)}this[qT]=s=>{this[PI]||(this[PI]=!0,this.close(),this.emit("error",s))},this[Ii].on("error",s=>this[qT](new xI(s))),this.once("end",()=>this.close)}close(){this[Ii]&&(this[Ii].close(),this[Ii]=null,this.emit("close"))}reset(){if(!this[PI])return S6(this[Ii],"zlib binding closed"),this[Ii].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[N6]),this.write(Object.assign(x0.alloc(0),{[Fv]:e})))}end(e,r,s){return e&&this.write(e,r),this.flush(this[dye]),this[B6]=!0,super.end(null,null,s)}get ended(){return this[B6]}write(e,r,s){if(typeof r=="function"&&(s=r,r="utf8"),typeof e=="string"&&(e=x0.from(e,r)),this[PI])return;S6(this[Ii],"zlib binding closed");let a=this[Ii]._handle,n=a.close;a.close=()=>{};let c=this[Ii].close;this[Ii].close=()=>{},x0.concat=h=>h;let f;try{let h=typeof e[Fv]=="number"?e[Fv]:this[Fv];f=this[Ii]._processChunk(e,h),x0.concat=gye}catch(h){x0.concat=gye,this[qT](new xI(h))}finally{this[Ii]&&(this[Ii]._handle=a,a.close=n,this[Ii].close=c,this[Ii].removeAllListeners("error"))}this[Ii]&&this[Ii].on("error",h=>this[qT](new xI(h)));let p;if(f)if(Array.isArray(f)&&f.length>0){p=this[um](x0.from(f[0]));for(let h=1;h{this.flush(a),n()};try{this[Ii].params(e,r)}finally{this[Ii].flush=s}this[Ii]&&(this[C6]=e,this[w6]=r)}}}},D6=class extends Yp{constructor(e){super(e,"Deflate")}},b6=class extends Yp{constructor(e){super(e,"Inflate")}},v6=Symbol("_portable"),P6=class extends Yp{constructor(e){super(e,"Gzip"),this[v6]=e&&!!e.portable}[um](e){return this[v6]?(this[v6]=!1,e[9]=255,super[um](e)):super[um](e)}},x6=class extends Yp{constructor(e){super(e,"Gunzip")}},k6=class extends Yp{constructor(e){super(e,"DeflateRaw")}},Q6=class extends Yp{constructor(e){super(e,"InflateRaw")}},T6=class extends Yp{constructor(e){super(e,"Unzip")}},WT=class extends GT{constructor(e,r){e=e||{},e.flush=e.flush||cm.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||cm.BROTLI_OPERATION_FINISH,super(e,r),this[N6]=cm.BROTLI_OPERATION_FLUSH}},R6=class extends WT{constructor(e){super(e,"BrotliCompress")}},F6=class extends WT{constructor(e){super(e,"BrotliDecompress")}};zl.Deflate=D6;zl.Inflate=b6;zl.Gzip=P6;zl.Gunzip=x6;zl.DeflateRaw=k6;zl.InflateRaw=Q6;zl.Unzip=T6;typeof mye.BrotliCompress=="function"?(zl.BrotliCompress=R6,zl.BrotliDecompress=F6):zl.BrotliCompress=zl.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var kI=L((A$t,yye)=>{var Eyt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;yye.exports=Eyt!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var YT=L((h$t,Eye)=>{"use strict";var Iyt=bI(),L6=kI(),M6=Symbol("slurp");Eye.exports=class extends Iyt{constructor(e,r,s){switch(super(),this.pause(),this.extended=r,this.globalExtended=s,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=L6(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=L6(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[M6](r),s&&this[M6](s,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let s=this.remain,a=this.blockRemain;return this.remain=Math.max(0,s-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:s>=r?super.write(e):super.write(e.slice(0,s))}[M6](e,r){for(let s in e)e[s]!==null&&e[s]!==void 0&&!(r&&s==="path")&&(this[s]=s==="path"||s==="linkpath"?L6(e[s]):e[s])}}});var _6=L(VT=>{"use strict";VT.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);VT.code=new Map(Array.from(VT.name).map(t=>[t[1],t[0]]))});var Bye=L((d$t,wye)=>{"use strict";var Cyt=(t,e)=>{if(Number.isSafeInteger(t))t<0?Byt(t,e):wyt(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},wyt=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Byt=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var s=e.length;s>1;s--){var a=t&255;t=Math.floor(t/256),r?e[s-1]=Iye(a):a===0?e[s-1]=0:(r=!0,e[s-1]=Cye(a))}},vyt=t=>{let e=t[0],r=e===128?Dyt(t.slice(1,t.length)):e===255?Syt(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},Syt=t=>{for(var e=t.length,r=0,s=!1,a=e-1;a>-1;a--){var n=t[a],c;s?c=Iye(n):n===0?c=n:(s=!0,c=Cye(n)),c!==0&&(r-=c*Math.pow(256,e-a-1))}return r},Dyt=t=>{for(var e=t.length,r=0,s=e-1;s>-1;s--){var a=t[s];a!==0&&(r+=a*Math.pow(256,e-s-1))}return r},Iye=t=>(255^t)&255,Cye=t=>(255^t)+1&255;wye.exports={encode:Cyt,parse:vyt}});var TI=L((m$t,Sye)=>{"use strict";var U6=_6(),QI=Ie("path").posix,vye=Bye(),H6=Symbol("slurp"),Zl=Symbol("type"),G6=class{constructor(e,r,s,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Zl]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,s,a):e&&this.set(e)}decode(e,r,s,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=fm(e,r,100),this.mode=k0(e,r+100,8),this.uid=k0(e,r+108,8),this.gid=k0(e,r+116,8),this.size=k0(e,r+124,12),this.mtime=j6(e,r+136,12),this.cksum=k0(e,r+148,12),this[H6](s),this[H6](a,!0),this[Zl]=fm(e,r+156,1),this[Zl]===""&&(this[Zl]="0"),this[Zl]==="0"&&this.path.substr(-1)==="/"&&(this[Zl]="5"),this[Zl]==="5"&&(this.size=0),this.linkpath=fm(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=fm(e,r+265,32),this.gname=fm(e,r+297,32),this.devmaj=k0(e,r+329,8),this.devmin=k0(e,r+337,8),e[r+475]!==0){let c=fm(e,r+345,155);this.path=c+"/"+this.path}else{let c=fm(e,r+345,130);c&&(this.path=c+"/"+this.path),this.atime=j6(e,r+476,12),this.ctime=j6(e,r+488,12)}let n=8*32;for(let c=r;c=r+512))throw new Error("need 512 bytes for header");let s=this.ctime||this.atime?130:155,a=byt(this.path||"",s),n=a[0],c=a[1];this.needPax=a[2],this.needPax=Am(e,r,100,n)||this.needPax,this.needPax=Q0(e,r+100,8,this.mode)||this.needPax,this.needPax=Q0(e,r+108,8,this.uid)||this.needPax,this.needPax=Q0(e,r+116,8,this.gid)||this.needPax,this.needPax=Q0(e,r+124,12,this.size)||this.needPax,this.needPax=q6(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Zl].charCodeAt(0),this.needPax=Am(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Am(e,r+265,32,this.uname)||this.needPax,this.needPax=Am(e,r+297,32,this.gname)||this.needPax,this.needPax=Q0(e,r+329,8,this.devmaj)||this.needPax,this.needPax=Q0(e,r+337,8,this.devmin)||this.needPax,this.needPax=Am(e,r+345,s,c)||this.needPax,e[r+475]!==0?this.needPax=Am(e,r+345,155,c)||this.needPax:(this.needPax=Am(e,r+345,130,c)||this.needPax,this.needPax=q6(e,r+476,12,this.atime)||this.needPax,this.needPax=q6(e,r+488,12,this.ctime)||this.needPax);let f=8*32;for(let p=r;p{let s=t,a="",n,c=QI.parse(t).root||".";if(Buffer.byteLength(s)<100)n=[s,a,!1];else{a=QI.dirname(s),s=QI.basename(s);do Buffer.byteLength(s)<=100&&Buffer.byteLength(a)<=e?n=[s,a,!1]:Buffer.byteLength(s)>100&&Buffer.byteLength(a)<=e?n=[s.substr(0,99),a,!0]:(s=QI.join(QI.basename(a),s),a=QI.dirname(a));while(a!==c&&!n);n||(n=[t.substr(0,99),"",!0])}return n},fm=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),j6=(t,e,r)=>Pyt(k0(t,e,r)),Pyt=t=>t===null?null:new Date(t*1e3),k0=(t,e,r)=>t[e]&128?vye.parse(t.slice(e,e+r)):kyt(t,e,r),xyt=t=>isNaN(t)?null:t,kyt=(t,e,r)=>xyt(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Qyt={12:8589934591,8:2097151},Q0=(t,e,r,s)=>s===null?!1:s>Qyt[r]||s<0?(vye.encode(s,t.slice(e,e+r)),!0):(Tyt(t,e,r,s),!1),Tyt=(t,e,r,s)=>t.write(Ryt(s,r),e,r,"ascii"),Ryt=(t,e)=>Fyt(Math.floor(t).toString(8),e),Fyt=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",q6=(t,e,r,s)=>s===null?!1:Q0(t,e,r,s.getTime()/1e3),Nyt=new Array(156).join("\0"),Am=(t,e,r,s)=>s===null?!1:(t.write(s+Nyt,e,r,"utf8"),s.length!==Buffer.byteLength(s)||s.length>r);Sye.exports=G6});var KT=L((y$t,Dye)=>{"use strict";var Oyt=TI(),Lyt=Ie("path"),Nv=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),s=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(s);for(let n=0;n<512;n++)a[n]=0;new Oyt({path:("PaxHeader/"+Lyt.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,"utf8");for(let n=r+512;n=Math.pow(10,n)&&(n+=1),n+a+s}};Nv.parse=(t,e,r)=>new Nv(Myt(_yt(t),e),r);var Myt=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,_yt=t=>t.replace(/\n$/,"").split(` +`).reduce(Uyt,Object.create(null)),Uyt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let s=e.split("="),a=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=s.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Dye.exports=Nv});var RI=L((E$t,bye)=>{bye.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var JT=L((I$t,Pye)=>{"use strict";Pye.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit("warn",s.tarCode,r,s)):r instanceof Error?this.emit("error",Object.assign(r,s)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),s))}}});var Y6=L((w$t,xye)=>{"use strict";var zT=["|","<",">","?",":"],W6=zT.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Hyt=new Map(zT.map((t,e)=>[t,W6[e]])),jyt=new Map(W6.map((t,e)=>[t,zT[e]]));xye.exports={encode:t=>zT.reduce((e,r)=>e.split(r).join(Hyt.get(r)),t),decode:t=>W6.reduce((e,r)=>e.split(r).join(jyt.get(r)),t)}});var V6=L((B$t,Qye)=>{var{isAbsolute:qyt,parse:kye}=Ie("path").win32;Qye.exports=t=>{let e="",r=kye(t);for(;qyt(t)||r.root;){let s=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(s.length),e+=s,r=kye(t)}return[e,t]}});var Rye=L((v$t,Tye)=>{"use strict";Tye.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var nq=L((b$t,Vye)=>{"use strict";var Uye=bI(),Hye=KT(),jye=TI(),sA=Ie("fs"),Fye=Ie("path"),iA=kI(),Gyt=RI(),qye=(t,e)=>e?(t=iA(t).replace(/^\.(\/|$)/,""),Gyt(e)+"/"+t):iA(t),Wyt=16*1024*1024,Nye=Symbol("process"),Oye=Symbol("file"),Lye=Symbol("directory"),J6=Symbol("symlink"),Mye=Symbol("hardlink"),Ov=Symbol("header"),ZT=Symbol("read"),z6=Symbol("lstat"),XT=Symbol("onlstat"),Z6=Symbol("onread"),X6=Symbol("onreadlink"),$6=Symbol("openfile"),eq=Symbol("onopenfile"),T0=Symbol("close"),$T=Symbol("mode"),tq=Symbol("awaitDrain"),K6=Symbol("ondrain"),oA=Symbol("prefix"),_ye=Symbol("hadError"),Gye=JT(),Yyt=Y6(),Wye=V6(),Yye=Rye(),eR=Gye(class extends Uye{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=iA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Wyt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=iA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?iA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=Wye(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Yyt.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=iA(r.absolute||Fye.resolve(this.cwd,e)),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[XT](this.statCache.get(this.absolute)):this[z6]()}emit(e,...r){return e==="error"&&(this[_ye]=!0),super.emit(e,...r)}[z6](){sA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[XT](r)})}[XT](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Kyt(e),this.emit("stat",e),this[Nye]()}[Nye](){switch(this.type){case"File":return this[Oye]();case"Directory":return this[Lye]();case"SymbolicLink":return this[J6]();default:return this.end()}}[$T](e){return Yye(e,this.type==="Directory",this.portable)}[oA](e){return qye(e,this.prefix)}[Ov](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new jye({path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,mode:this[$T](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Hye({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Lye](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Ov](),this.end()}[J6](){sA.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[X6](r)})}[X6](e){this.linkpath=iA(e),this[Ov](),this.end()}[Mye](e){this.type="Link",this.linkpath=iA(Fye.relative(this.cwd,e)),this.stat.size=0,this[Ov](),this.end()}[Oye](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Mye](r)}this.linkCache.set(e,this.absolute)}if(this[Ov](),this.stat.size===0)return this.end();this[$6]()}[$6](){sA.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[eq](r)})}[eq](e){if(this.fd=e,this[_ye])return this[T0]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ZT]()}[ZT](){let{fd:e,buf:r,offset:s,length:a,pos:n}=this;sA.read(e,r,s,a,n,(c,f)=>{if(c)return this[T0](()=>this.emit("error",c));this[Z6](f)})}[T0](e){sA.close(this.fd,e)}[Z6](e){if(e<=0&&this.remain>0){let a=new Error("encountered unexpected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[T0](()=>this.emit("error",a))}if(e>this.remain){let a=new Error("did not encounter expected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[T0](()=>this.emit("error",a))}if(e===this.remain)for(let a=e;athis[K6]())}[tq](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ZT]()}}),rq=class extends eR{[z6](){this[XT](sA.lstatSync(this.absolute))}[J6](){this[X6](sA.readlinkSync(this.absolute))}[$6](){this[eq](sA.openSync(this.absolute,"r"))}[ZT](){let e=!0;try{let{fd:r,buf:s,offset:a,length:n,pos:c}=this,f=sA.readSync(r,s,a,n,c);this[Z6](f),e=!1}finally{if(e)try{this[T0](()=>{})}catch{}}}[tq](e){e()}[T0](e){sA.closeSync(this.fd),e()}},Vyt=Gye(class extends Uye{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=iA(e.path),this.mode=this[$T](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=iA(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=Wye(this.path);a&&(this.path=n,s=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new jye({path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new Hye({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[oA](this.path),linkpath:this.type==="Link"?this[oA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[oA](e){return qye(e,this.prefix)}[$T](e){return Yye(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});eR.Sync=rq;eR.Tar=Vyt;var Kyt=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";Vye.exports=eR});var cR=L((x$t,eEe)=>{"use strict";var aR=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},Jyt=bI(),zyt=O6(),Zyt=YT(),Aq=nq(),Xyt=Aq.Sync,$yt=Aq.Tar,eEt=ak(),Kye=Buffer.alloc(1024),nR=Symbol("onStat"),tR=Symbol("ended"),aA=Symbol("queue"),FI=Symbol("current"),pm=Symbol("process"),rR=Symbol("processing"),Jye=Symbol("processJob"),lA=Symbol("jobs"),iq=Symbol("jobDone"),iR=Symbol("addFSEntry"),zye=Symbol("addTarEntry"),lq=Symbol("stat"),cq=Symbol("readdir"),sR=Symbol("onreaddir"),oR=Symbol("pipe"),Zye=Symbol("entry"),sq=Symbol("entryOpt"),uq=Symbol("writeEntryClass"),$ye=Symbol("write"),oq=Symbol("ondrain"),lR=Ie("fs"),Xye=Ie("path"),tEt=JT(),aq=kI(),pq=tEt(class extends Jyt{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=aq(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[uq]=Aq,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new zyt.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[oq]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[oq]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[aA]=new eEt,this[lA]=0,this.jobs=+e.jobs||4,this[rR]=!1,this[tR]=!1}[$ye](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[tR]=!0,this[pm](),this}write(e){if(this[tR])throw new Error("write after end");return e instanceof Zyt?this[zye](e):this[iR](e),this.flowing}[zye](e){let r=aq(Xye.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new aR(e.path,r,!1);s.entry=new $yt(e,this[sq](s)),s.entry.on("end",a=>this[iq](s)),this[lA]+=1,this[aA].push(s)}this[pm]()}[iR](e){let r=aq(Xye.resolve(this.cwd,e));this[aA].push(new aR(e,r)),this[pm]()}[lq](e){e.pending=!0,this[lA]+=1;let r=this.follow?"stat":"lstat";lR[r](e.absolute,(s,a)=>{e.pending=!1,this[lA]-=1,s?this.emit("error",s):this[nR](e,a)})}[nR](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[pm]()}[cq](e){e.pending=!0,this[lA]+=1,lR.readdir(e.absolute,(r,s)=>{if(e.pending=!1,this[lA]-=1,r)return this.emit("error",r);this[sR](e,s)})}[sR](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[pm]()}[pm](){if(!this[rR]){this[rR]=!0;for(let e=this[aA].head;e!==null&&this[lA]this.warn(r,s,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[Zye](e){this[lA]+=1;try{return new this[uq](e.path,this[sq](e)).on("end",()=>this[iq](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[oq](){this[FI]&&this[FI].entry&&this[FI].entry.resume()}[oR](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n==="./"?"":n.replace(/\/*$/,"/");this[iR](c+a)});let r=e.entry,s=this.zip;s?r.on("data",a=>{s.write(a)||r.pause()}):r.on("data",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),fq=class extends pq{constructor(e){super(e),this[uq]=Xyt}pause(){}resume(){}[lq](e){let r=this.follow?"statSync":"lstatSync";this[nR](e,lR[r](e.absolute))}[cq](e,r){this[sR](e,lR.readdirSync(e.absolute))}[oR](e){let r=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,c=n==="./"?"":n.replace(/\/*$/,"/");this[iR](c+a)}),s?r.on("data",a=>{s.write(a)}):r.on("data",a=>{super[$ye](a)})}};pq.Sync=fq;eEe.exports=pq});var jI=L(Mv=>{"use strict";var rEt=bI(),nEt=Ie("events").EventEmitter,Al=Ie("fs"),dq=Al.writev;if(!dq){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;dq=(r,s,a,n)=>{let c=(p,h)=>n(p,h,s),f=new e;f.oncomplete=c,t.writeBuffers(r,s,a,f)}}var UI=Symbol("_autoClose"),Vu=Symbol("_close"),Lv=Symbol("_ended"),ii=Symbol("_fd"),tEe=Symbol("_finished"),F0=Symbol("_flags"),hq=Symbol("_flush"),mq=Symbol("_handleChunk"),yq=Symbol("_makeBuf"),hR=Symbol("_mode"),uR=Symbol("_needDrain"),MI=Symbol("_onerror"),HI=Symbol("_onopen"),gq=Symbol("_onread"),OI=Symbol("_onwrite"),N0=Symbol("_open"),Vp=Symbol("_path"),hm=Symbol("_pos"),cA=Symbol("_queue"),LI=Symbol("_read"),rEe=Symbol("_readSize"),R0=Symbol("_reading"),fR=Symbol("_remain"),nEe=Symbol("_size"),AR=Symbol("_write"),NI=Symbol("_writing"),pR=Symbol("_defaultFlag"),_I=Symbol("_errored"),gR=class extends rEt{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[_I]=!1,this[ii]=typeof r.fd=="number"?r.fd:null,this[Vp]=e,this[rEe]=r.readSize||16*1024*1024,this[R0]=!1,this[nEe]=typeof r.size=="number"?r.size:1/0,this[fR]=this[nEe],this[UI]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[ii]=="number"?this[LI]():this[N0]()}get fd(){return this[ii]}get path(){return this[Vp]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[N0](){Al.open(this[Vp],"r",(e,r)=>this[HI](e,r))}[HI](e,r){e?this[MI](e):(this[ii]=r,this.emit("open",r),this[LI]())}[yq](){return Buffer.allocUnsafe(Math.min(this[rEe],this[fR]))}[LI](){if(!this[R0]){this[R0]=!0;let e=this[yq]();if(e.length===0)return process.nextTick(()=>this[gq](null,0,e));Al.read(this[ii],e,0,e.length,null,(r,s,a)=>this[gq](r,s,a))}}[gq](e,r,s){this[R0]=!1,e?this[MI](e):this[mq](r,s)&&this[LI]()}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[MI](e){this[R0]=!0,this[Vu](),this.emit("error",e)}[mq](e,r){let s=!1;return this[fR]-=e,e>0&&(s=super.write(ethis[HI](e,r))}[HI](e,r){this[pR]&&this[F0]==="r+"&&e&&e.code==="ENOENT"?(this[F0]="w",this[N0]()):e?this[MI](e):(this[ii]=r,this.emit("open",r),this[hq]())}end(e,r){return e&&this.write(e,r),this[Lv]=!0,!this[NI]&&!this[cA].length&&typeof this[ii]=="number"&&this[OI](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[Lv]?(this.emit("error",new Error("write() after end()")),!1):this[ii]===null||this[NI]||this[cA].length?(this[cA].push(e),this[uR]=!0,!1):(this[NI]=!0,this[AR](e),!0)}[AR](e){Al.write(this[ii],e,0,e.length,this[hm],(r,s)=>this[OI](r,s))}[OI](e,r){e?this[MI](e):(this[hm]!==null&&(this[hm]+=r),this[cA].length?this[hq]():(this[NI]=!1,this[Lv]&&!this[tEe]?(this[tEe]=!0,this[Vu](),this.emit("finish")):this[uR]&&(this[uR]=!1,this.emit("drain"))))}[hq](){if(this[cA].length===0)this[Lv]&&this[OI](null,0);else if(this[cA].length===1)this[AR](this[cA].pop());else{let e=this[cA];this[cA]=[],dq(this[ii],e,this[hm],(r,s)=>this[OI](r,s))}}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},Iq=class extends dR{[N0](){let e;if(this[pR]&&this[F0]==="r+")try{e=Al.openSync(this[Vp],this[F0],this[hR])}catch(r){if(r.code==="ENOENT")return this[F0]="w",this[N0]();throw r}else e=Al.openSync(this[Vp],this[F0],this[hR]);this[HI](null,e)}[Vu](){if(this[UI]&&typeof this[ii]=="number"){let e=this[ii];this[ii]=null,Al.closeSync(e),this.emit("close")}}[AR](e){let r=!0;try{this[OI](null,Al.writeSync(this[ii],e,0,e.length,this[hm])),r=!1}finally{if(r)try{this[Vu]()}catch{}}}};Mv.ReadStream=gR;Mv.ReadStreamSync=Eq;Mv.WriteStream=dR;Mv.WriteStreamSync=Iq});var BR=L((T$t,uEe)=>{"use strict";var iEt=JT(),sEt=TI(),oEt=Ie("events"),aEt=ak(),lEt=1024*1024,cEt=YT(),iEe=KT(),uEt=O6(),Cq=Buffer.from([31,139]),_c=Symbol("state"),gm=Symbol("writeEntry"),Kp=Symbol("readEntry"),wq=Symbol("nextEntry"),sEe=Symbol("processEntry"),Uc=Symbol("extendedHeader"),_v=Symbol("globalExtendedHeader"),O0=Symbol("meta"),oEe=Symbol("emitMeta"),Pi=Symbol("buffer"),Jp=Symbol("queue"),dm=Symbol("ended"),aEe=Symbol("emittedEnd"),mm=Symbol("emit"),pl=Symbol("unzip"),mR=Symbol("consumeChunk"),yR=Symbol("consumeChunkSub"),Bq=Symbol("consumeBody"),lEe=Symbol("consumeMeta"),cEe=Symbol("consumeHeader"),ER=Symbol("consuming"),vq=Symbol("bufferConcat"),Sq=Symbol("maybeEnd"),Uv=Symbol("writing"),L0=Symbol("aborted"),IR=Symbol("onDone"),ym=Symbol("sawValidEntry"),CR=Symbol("sawNullBlock"),wR=Symbol("sawEOF"),fEt=t=>!0;uEe.exports=iEt(class extends oEt{constructor(e){e=e||{},super(e),this.file=e.file||"",this[ym]=null,this.on(IR,r=>{(this[_c]==="begin"||this[ym]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(IR,e.ondone):this.on(IR,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||lEt,this.filter=typeof e.filter=="function"?e.filter:fEt,this.writable=!0,this.readable=!1,this[Jp]=new aEt,this[Pi]=null,this[Kp]=null,this[gm]=null,this[_c]="begin",this[O0]="",this[Uc]=null,this[_v]=null,this[dm]=!1,this[pl]=null,this[L0]=!1,this[CR]=!1,this[wR]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[cEe](e,r){this[ym]===null&&(this[ym]=!1);let s;try{s=new sEt(e,r,this[Uc],this[_v])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(s.nullBlock)this[CR]?(this[wR]=!0,this[_c]==="begin"&&(this[_c]="header"),this[mm]("eof")):(this[CR]=!0,this[mm]("nullBlock"));else if(this[CR]=!1,!s.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:s});else if(!s.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:s});else{let a=s.type;if(/^(Symbolic)?Link$/.test(a)&&!s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:s});else if(!/^(Symbolic)?Link$/.test(a)&&s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:s});else{let n=this[gm]=new cEt(s,this[Uc],this[_v]);if(!this[ym])if(n.remain){let c=()=>{n.invalid||(this[ym]=!0)};n.on("end",c)}else this[ym]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[mm]("ignoredEntry",n),this[_c]="ignore",n.resume()):n.size>0&&(this[O0]="",n.on("data",c=>this[O0]+=c),this[_c]="meta"):(this[Uc]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[mm]("ignoredEntry",n),this[_c]=n.remain?"ignore":"header",n.resume()):(n.remain?this[_c]="body":(this[_c]="header",n.end()),this[Kp]?this[Jp].push(n):(this[Jp].push(n),this[wq]())))}}}[sEe](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Kp]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",s=>this[wq]()),r=!1)):(this[Kp]=null,r=!1),r}[wq](){do;while(this[sEe](this[Jp].shift()));if(!this[Jp].length){let e=this[Kp];!e||e.flowing||e.size===e.remain?this[Uv]||this.emit("drain"):e.once("drain",s=>this.emit("drain"))}}[Bq](e,r){let s=this[gm],a=s.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return s.write(n),s.blockRemain||(this[_c]="header",this[gm]=null,s.end()),n.length}[lEe](e,r){let s=this[gm],a=this[Bq](e,r);return this[gm]||this[oEe](s),a}[mm](e,r,s){!this[Jp].length&&!this[Kp]?this.emit(e,r,s):this[Jp].push([e,r,s])}[oEe](e){switch(this[mm]("meta",this[O0]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[Uc]=iEe.parse(this[O0],this[Uc],!1);break;case"GlobalExtendedHeader":this[_v]=iEe.parse(this[O0],this[_v],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[Uc]=this[Uc]||Object.create(null),this[Uc].path=this[O0].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[Uc]=this[Uc]||Object.create(null),this[Uc].linkpath=this[O0].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[L0]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[L0])return;if(this[pl]===null&&e){if(this[Pi]&&(e=Buffer.concat([this[Pi],e]),this[Pi]=null),e.lengththis[mR](n)),this[pl].on("error",n=>this.abort(n)),this[pl].on("end",n=>{this[dm]=!0,this[mR]()}),this[Uv]=!0;let a=this[pl][s?"end":"write"](e);return this[Uv]=!1,a}}this[Uv]=!0,this[pl]?this[pl].write(e):this[mR](e),this[Uv]=!1;let r=this[Jp].length?!1:this[Kp]?this[Kp].flowing:!0;return!r&&!this[Jp].length&&this[Kp].once("drain",s=>this.emit("drain")),r}[vq](e){e&&!this[L0]&&(this[Pi]=this[Pi]?Buffer.concat([this[Pi],e]):e)}[Sq](){if(this[dm]&&!this[aEe]&&!this[L0]&&!this[ER]){this[aEe]=!0;let e=this[gm];if(e&&e.blockRemain){let r=this[Pi]?this[Pi].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[Pi]&&e.write(this[Pi]),e.end()}this[mm](IR)}}[mR](e){if(this[ER])this[vq](e);else if(!e&&!this[Pi])this[Sq]();else{if(this[ER]=!0,this[Pi]){this[vq](e);let r=this[Pi];this[Pi]=null,this[yR](r)}else this[yR](e);for(;this[Pi]&&this[Pi].length>=512&&!this[L0]&&!this[wR];){let r=this[Pi];this[Pi]=null,this[yR](r)}this[ER]=!1}(!this[Pi]||this[dm])&&this[Sq]()}[yR](e){let r=0,s=e.length;for(;r+512<=s&&!this[L0]&&!this[wR];)switch(this[_c]){case"begin":case"header":this[cEe](e,r),r+=512;break;case"ignore":case"body":r+=this[Bq](e,r);break;case"meta":r+=this[lEe](e,r);break;default:throw new Error("invalid state: "+this[_c])}r{"use strict";var AEt=SI(),AEe=BR(),qI=Ie("fs"),pEt=jI(),fEe=Ie("path"),Dq=RI();hEe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=AEt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&gEt(s,e),s.noResume||hEt(s),s.file&&s.sync?dEt(s):s.file?mEt(s,r):pEe(s)};var hEt=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},gEt=(t,e)=>{let r=new Map(e.map(n=>[Dq(n),!0])),s=t.filter,a=(n,c)=>{let f=c||fEe.parse(n).root||".",p=n===f?!1:r.has(n)?r.get(n):a(fEe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(Dq(n)):n=>a(Dq(n))},dEt=t=>{let e=pEe(t),r=t.file,s=!0,a;try{let n=qI.statSync(r),c=t.maxReadSize||16*1024*1024;if(n.size{let r=new AEe(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on("error",f),r.on("end",c),qI.stat(a,(p,h)=>{if(p)f(p);else{let E=new pEt.ReadStream(a,{readSize:s,size:h.size});E.on("error",f),E.pipe(r)}})});return e?n.then(e,e):n},pEe=t=>new AEe(t)});var IEe=L((F$t,EEe)=>{"use strict";var yEt=SI(),SR=cR(),gEe=jI(),dEe=vR(),mEe=Ie("path");EEe.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let s=yEt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return s.file&&s.sync?EEt(s,e):s.file?IEt(s,e,r):s.sync?CEt(s,e):wEt(s,e)};var EEt=(t,e)=>{let r=new SR.Sync(t),s=new gEe.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(s),yEe(r,e)},IEt=(t,e,r)=>{let s=new SR(t),a=new gEe.WriteStream(t.file,{mode:t.mode||438});s.pipe(a);let n=new Promise((c,f)=>{a.on("error",f),a.on("close",c),s.on("error",f)});return bq(s,e),r?n.then(r,r):n},yEe=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?dEe({file:mEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},bq=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return dEe({file:mEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>bq(t,e));t.add(r)}t.end()},CEt=(t,e)=>{let r=new SR.Sync(t);return yEe(r,e),r},wEt=(t,e)=>{let r=new SR(t);return bq(r,e),r}});var Pq=L((N$t,bEe)=>{"use strict";var BEt=SI(),CEe=cR(),Xl=Ie("fs"),wEe=jI(),BEe=vR(),vEe=Ie("path"),SEe=TI();bEe.exports=(t,e,r)=>{let s=BEt(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),s.sync?vEt(s,e):DEt(s,e,r)};var vEt=(t,e)=>{let r=new CEe.Sync(t),s=!0,a,n;try{try{a=Xl.openSync(t.file,"r+")}catch(p){if(p.code==="ENOENT")a=Xl.openSync(t.file,"w+");else throw p}let c=Xl.fstatSync(a),f=Buffer.alloc(512);e:for(n=0;nc.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}s=!1,SEt(t,r,n,a,e)}finally{if(s)try{Xl.closeSync(a)}catch{}}},SEt=(t,e,r,s,a)=>{let n=new wEe.WriteStreamSync(t.file,{fd:s,start:r});e.pipe(n),bEt(e,a)},DEt=(t,e,r)=>{e=Array.from(e);let s=new CEe(t),a=(c,f,p)=>{let h=(I,R)=>{I?Xl.close(c,N=>p(I)):p(null,R)},E=0;if(f===0)return h(null,0);let C=0,S=Buffer.alloc(512),P=(I,R)=>{if(I)return h(I);if(C+=R,C<512&&R)return Xl.read(c,S,C,S.length-C,E+C,P);if(E===0&&S[0]===31&&S[1]===139)return h(new Error("cannot append to compressed archives"));if(C<512)return h(null,E);let N=new SEe(S);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>f||(E+=U+512,E>=f))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),C=0,Xl.read(c,S,0,512,E,P)};Xl.read(c,S,0,512,E,P)},n=new Promise((c,f)=>{s.on("error",f);let p="r+",h=(E,C)=>{if(E&&E.code==="ENOENT"&&p==="r+")return p="w+",Xl.open(t.file,p,h);if(E)return f(E);Xl.fstat(C,(S,P)=>{if(S)return Xl.close(C,()=>f(S));a(C,P.size,(I,R)=>{if(I)return f(I);let N=new wEe.WriteStream(t.file,{fd:C,start:R});s.pipe(N),N.on("error",f),N.on("close",c),DEe(s,e)})})};Xl.open(t.file,p,h)});return r?n.then(r,r):n},bEt=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?BEe({file:vEe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(r)}),t.end()},DEe=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return BEe({file:vEe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>DEe(t,e));t.add(r)}t.end()}});var xEe=L((O$t,PEe)=>{"use strict";var PEt=SI(),xEt=Pq();PEe.exports=(t,e,r)=>{let s=PEt(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),kEt(s),xEt(s,e,r)};var kEt=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,s)=>e(r,s)&&!(t.mtimeCache.get(r)>s.mtime):(r,s)=>!(t.mtimeCache.get(r)>s.mtime)}});var TEe=L((L$t,QEe)=>{var{promisify:kEe}=Ie("util"),M0=Ie("fs"),QEt=t=>{if(!t)t={mode:511,fs:M0};else if(typeof t=="object")t={mode:511,fs:M0,...t};else if(typeof t=="number")t={mode:t,fs:M0};else if(typeof t=="string")t={mode:parseInt(t,8),fs:M0};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||M0.mkdir,t.mkdirAsync=kEe(t.mkdir),t.stat=t.stat||t.fs.stat||M0.stat,t.statAsync=kEe(t.stat),t.statSync=t.statSync||t.fs.statSync||M0.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||M0.mkdirSync,t};QEe.exports=QEt});var FEe=L((M$t,REe)=>{var TEt=process.platform,{resolve:REt,parse:FEt}=Ie("path"),NEt=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=REt(t),TEt==="win32"){let e=/[*|"<>?:]/,{root:r}=FEt(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};REe.exports=NEt});var _Ee=L((_$t,MEe)=>{var{dirname:NEe}=Ie("path"),OEe=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?r:void 0,s=>s.code==="ENOENT"?OEe(t,NEe(e),e):void 0),LEe=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(s){return s.code==="ENOENT"?LEe(t,NEe(e),e):void 0}};MEe.exports={findMade:OEe,findMadeSync:LEe}});var Qq=L((U$t,HEe)=>{var{dirname:UEe}=Ie("path"),xq=(t,e,r)=>{e.recursive=!1;let s=UEe(t);return s===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!=="EISDIR")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code==="ENOENT")return xq(s,e).then(n=>xq(t,e,n));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},kq=(t,e,r)=>{let s=UEe(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!=="EISDIR")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code==="ENOENT")return kq(t,e,kq(s,e,r));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};HEe.exports={mkdirpManual:xq,mkdirpManualSync:kq}});var GEe=L((H$t,qEe)=>{var{dirname:jEe}=Ie("path"),{findMade:OEt,findMadeSync:LEt}=_Ee(),{mkdirpManual:MEt,mkdirpManualSync:_Et}=Qq(),UEt=(t,e)=>(e.recursive=!0,jEe(t)===t?e.mkdirAsync(t,e):OEt(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(a=>{if(a.code==="ENOENT")return MEt(t,e);throw a}))),HEt=(t,e)=>{if(e.recursive=!0,jEe(t)===t)return e.mkdirSync(t,e);let s=LEt(e,t);try{return e.mkdirSync(t,e),s}catch(a){if(a.code==="ENOENT")return _Et(t,e);throw a}};qEe.exports={mkdirpNative:UEt,mkdirpNativeSync:HEt}});var KEe=L((j$t,VEe)=>{var WEe=Ie("fs"),jEt=process.version,Tq=jEt.replace(/^v/,"").split("."),YEe=+Tq[0]>10||+Tq[0]==10&&+Tq[1]>=12,qEt=YEe?t=>t.mkdir===WEe.mkdir:()=>!1,GEt=YEe?t=>t.mkdirSync===WEe.mkdirSync:()=>!1;VEe.exports={useNative:qEt,useNativeSync:GEt}});var eIe=L((q$t,$Ee)=>{var GI=TEe(),WI=FEe(),{mkdirpNative:JEe,mkdirpNativeSync:zEe}=GEe(),{mkdirpManual:ZEe,mkdirpManualSync:XEe}=Qq(),{useNative:WEt,useNativeSync:YEt}=KEe(),YI=(t,e)=>(t=WI(t),e=GI(e),WEt(e)?JEe(t,e):ZEe(t,e)),VEt=(t,e)=>(t=WI(t),e=GI(e),YEt(e)?zEe(t,e):XEe(t,e));YI.sync=VEt;YI.native=(t,e)=>JEe(WI(t),GI(e));YI.manual=(t,e)=>ZEe(WI(t),GI(e));YI.nativeSync=(t,e)=>zEe(WI(t),GI(e));YI.manualSync=(t,e)=>XEe(WI(t),GI(e));$Ee.exports=YI});var aIe=L((G$t,oIe)=>{"use strict";var Hc=Ie("fs"),Em=Ie("path"),KEt=Hc.lchown?"lchown":"chown",JEt=Hc.lchownSync?"lchownSync":"chownSync",rIe=Hc.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),tIe=(t,e,r)=>{try{return Hc[JEt](t,e,r)}catch(s){if(s.code!=="ENOENT")throw s}},zEt=(t,e,r)=>{try{return Hc.chownSync(t,e,r)}catch(s){if(s.code!=="ENOENT")throw s}},ZEt=rIe?(t,e,r,s)=>a=>{!a||a.code!=="EISDIR"?s(a):Hc.chown(t,e,r,s)}:(t,e,r,s)=>s,Rq=rIe?(t,e,r)=>{try{return tIe(t,e,r)}catch(s){if(s.code!=="EISDIR")throw s;zEt(t,e,r)}}:(t,e,r)=>tIe(t,e,r),XEt=process.version,nIe=(t,e,r)=>Hc.readdir(t,e,r),$Et=(t,e)=>Hc.readdirSync(t,e);/^v4\./.test(XEt)&&(nIe=(t,e,r)=>Hc.readdir(t,r));var DR=(t,e,r,s)=>{Hc[KEt](t,e,r,ZEt(t,e,r,a=>{s(a&&a.code!=="ENOENT"?a:null)}))},iIe=(t,e,r,s,a)=>{if(typeof e=="string")return Hc.lstat(Em.resolve(t,e),(n,c)=>{if(n)return a(n.code!=="ENOENT"?n:null);c.name=e,iIe(t,c,r,s,a)});if(e.isDirectory())Fq(Em.resolve(t,e.name),r,s,n=>{if(n)return a(n);let c=Em.resolve(t,e.name);DR(c,r,s,a)});else{let n=Em.resolve(t,e.name);DR(n,r,s,a)}},Fq=(t,e,r,s)=>{nIe(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code==="ENOENT")return s();if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return s(a)}if(a||!n.length)return DR(t,e,r,s);let c=n.length,f=null,p=h=>{if(!f){if(h)return s(f=h);if(--c===0)return DR(t,e,r,s)}};n.forEach(h=>iIe(t,h,e,r,p))})},eIt=(t,e,r,s)=>{if(typeof e=="string")try{let a=Hc.lstatSync(Em.resolve(t,e));a.name=e,e=a}catch(a){if(a.code==="ENOENT")return;throw a}e.isDirectory()&&sIe(Em.resolve(t,e.name),r,s),Rq(Em.resolve(t,e.name),r,s)},sIe=(t,e,r)=>{let s;try{s=$Et(t,{withFileTypes:!0})}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR"||a.code==="ENOTSUP")return Rq(t,e,r);throw a}return s&&s.length&&s.forEach(a=>eIt(t,a,e,r)),Rq(t,e,r)};oIe.exports=Fq;Fq.sync=sIe});var fIe=L((W$t,Nq)=>{"use strict";var lIe=eIe(),jc=Ie("fs"),bR=Ie("path"),cIe=aIe(),Ku=kI(),PR=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},xR=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},kR=(t,e)=>t.get(Ku(e)),Hv=(t,e,r)=>t.set(Ku(e),r),tIt=(t,e)=>{jc.stat(t,(r,s)=>{(r||!s.isDirectory())&&(r=new xR(t,r&&r.code||"ENOTDIR")),e(r)})};Nq.exports=(t,e,r)=>{t=Ku(t);let s=e.umask,a=e.mode|448,n=(a&s)!==0,c=e.uid,f=e.gid,p=typeof c=="number"&&typeof f=="number"&&(c!==e.processUid||f!==e.processGid),h=e.preserve,E=e.unlink,C=e.cache,S=Ku(e.cwd),P=(N,U)=>{N?r(N):(Hv(C,t,!0),U&&p?cIe(U,c,f,W=>P(W)):n?jc.chmod(t,a,r):r())};if(C&&kR(C,t)===!0)return P();if(t===S)return tIt(t,P);if(h)return lIe(t,{mode:a}).then(N=>P(null,N),P);let R=Ku(bR.relative(S,t)).split("/");QR(S,R,a,C,E,S,null,P)};var QR=(t,e,r,s,a,n,c,f)=>{if(!e.length)return f(null,c);let p=e.shift(),h=Ku(bR.resolve(t+"/"+p));if(kR(s,h))return QR(h,e,r,s,a,n,c,f);jc.mkdir(h,r,uIe(h,e,r,s,a,n,c,f))},uIe=(t,e,r,s,a,n,c,f)=>p=>{p?jc.lstat(t,(h,E)=>{if(h)h.path=h.path&&Ku(h.path),f(h);else if(E.isDirectory())QR(t,e,r,s,a,n,c,f);else if(a)jc.unlink(t,C=>{if(C)return f(C);jc.mkdir(t,r,uIe(t,e,r,s,a,n,c,f))});else{if(E.isSymbolicLink())return f(new PR(t,t+"/"+e.join("/")));f(p)}}):(c=c||t,QR(t,e,r,s,a,n,c,f))},rIt=t=>{let e=!1,r="ENOTDIR";try{e=jc.statSync(t).isDirectory()}catch(s){r=s.code}finally{if(!e)throw new xR(t,r)}};Nq.exports.sync=(t,e)=>{t=Ku(t);let r=e.umask,s=e.mode|448,a=(s&r)!==0,n=e.uid,c=e.gid,f=typeof n=="number"&&typeof c=="number"&&(n!==e.processUid||c!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,C=Ku(e.cwd),S=N=>{Hv(E,t,!0),N&&f&&cIe.sync(N,n,c),a&&jc.chmodSync(t,s)};if(E&&kR(E,t)===!0)return S();if(t===C)return rIt(C),S();if(p)return S(lIe.sync(t,s));let I=Ku(bR.relative(C,t)).split("/"),R=null;for(let N=I.shift(),U=C;N&&(U+="/"+N);N=I.shift())if(U=Ku(bR.resolve(U)),!kR(E,U))try{jc.mkdirSync(U,s),R=R||U,Hv(E,U,!0)}catch{let te=jc.lstatSync(U);if(te.isDirectory()){Hv(E,U,!0);continue}else if(h){jc.unlinkSync(U),jc.mkdirSync(U,s),R=R||U,Hv(E,U,!0);continue}else if(te.isSymbolicLink())return new PR(U,U+"/"+I.join("/"))}return S(R)}});var Lq=L((Y$t,AIe)=>{var Oq=Object.create(null),{hasOwnProperty:nIt}=Object.prototype;AIe.exports=t=>(nIt.call(Oq,t)||(Oq[t]=t.normalize("NFKD")),Oq[t])});var dIe=L((V$t,gIe)=>{var pIe=Ie("assert"),iIt=Lq(),sIt=RI(),{join:hIe}=Ie("path"),oIt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,aIt=oIt==="win32";gIe.exports=()=>{let t=new Map,e=new Map,r=h=>h.split("/").slice(0,-1).reduce((C,S)=>(C.length&&(S=hIe(C[C.length-1],S)),C.push(S||"/"),C),[]),s=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error("function does not have any path reservations");return{paths:E.paths.map(C=>t.get(C)),dirs:[...E.dirs].map(C=>t.get(C))}},n=h=>{let{paths:E,dirs:C}=a(h);return E.every(S=>S[0]===h)&&C.every(S=>S[0]instanceof Set&&S[0].has(h))},c=h=>s.has(h)||!n(h)?!1:(s.add(h),h(()=>f(h)),!0),f=h=>{if(!s.has(h))return!1;let{paths:E,dirs:C}=e.get(h),S=new Set;return E.forEach(P=>{let I=t.get(P);pIe.equal(I[0],h),I.length===1?t.delete(P):(I.shift(),typeof I[0]=="function"?S.add(I[0]):I[0].forEach(R=>S.add(R)))}),C.forEach(P=>{let I=t.get(P);pIe(I[0]instanceof Set),I[0].size===1&&I.length===1?t.delete(P):I[0].size===1?(I.shift(),S.add(I[0])):I[0].delete(h)}),s.delete(h),S.forEach(P=>c(P)),!0};return{check:n,reserve:(h,E)=>{h=aIt?["win32 parallelization disabled"]:h.map(S=>iIt(sIt(hIe(S))).toLowerCase());let C=new Set(h.map(S=>r(S)).reduce((S,P)=>S.concat(P)));return e.set(E,{dirs:C,paths:h}),h.forEach(S=>{let P=t.get(S);P?P.push(E):t.set(S,[E])}),C.forEach(S=>{let P=t.get(S);P?P[P.length-1]instanceof Set?P[P.length-1].add(E):P.push(new Set([E])):t.set(S,[new Set([E])])}),c(E)}}}});var EIe=L((K$t,yIe)=>{var lIt=process.platform,cIt=lIt==="win32",uIt=global.__FAKE_TESTING_FS__||Ie("fs"),{O_CREAT:fIt,O_TRUNC:AIt,O_WRONLY:pIt,UV_FS_O_FILEMAP:mIe=0}=uIt.constants,hIt=cIt&&!!mIe,gIt=512*1024,dIt=mIe|AIt|fIt|pIt;yIe.exports=hIt?t=>t"w"});var Yq=L((J$t,RIe)=>{"use strict";var mIt=Ie("assert"),yIt=BR(),Mn=Ie("fs"),EIt=jI(),zp=Ie("path"),kIe=fIe(),IIe=Y6(),IIt=dIe(),CIt=V6(),$l=kI(),wIt=RI(),BIt=Lq(),CIe=Symbol("onEntry"),Uq=Symbol("checkFs"),wIe=Symbol("checkFs2"),FR=Symbol("pruneCache"),Hq=Symbol("isReusable"),qc=Symbol("makeFs"),jq=Symbol("file"),qq=Symbol("directory"),NR=Symbol("link"),BIe=Symbol("symlink"),vIe=Symbol("hardlink"),SIe=Symbol("unsupported"),DIe=Symbol("checkPath"),_0=Symbol("mkdir"),Xo=Symbol("onError"),TR=Symbol("pending"),bIe=Symbol("pend"),VI=Symbol("unpend"),Mq=Symbol("ended"),_q=Symbol("maybeClose"),Gq=Symbol("skip"),jv=Symbol("doChown"),qv=Symbol("uid"),Gv=Symbol("gid"),Wv=Symbol("checkedCwd"),QIe=Ie("crypto"),TIe=EIe(),vIt=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Yv=vIt==="win32",SIt=(t,e)=>{if(!Yv)return Mn.unlink(t,e);let r=t+".DELETE."+QIe.randomBytes(16).toString("hex");Mn.rename(t,r,s=>{if(s)return e(s);Mn.unlink(r,e)})},DIt=t=>{if(!Yv)return Mn.unlinkSync(t);let e=t+".DELETE."+QIe.randomBytes(16).toString("hex");Mn.renameSync(t,e),Mn.unlinkSync(e)},PIe=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,xIe=t=>BIt(wIt($l(t))).toLowerCase(),bIt=(t,e)=>{e=xIe(e);for(let r of t.keys()){let s=xIe(r);(s===e||s.indexOf(e+"/")===0)&&t.delete(r)}},PIt=t=>{for(let e of t.keys())t.delete(e)},Vv=class extends yIt{constructor(e){if(e||(e={}),e.ondone=r=>{this[Mq]=!0,this[_q]()},super(e),this[Wv]=!1,this.reservations=IIt(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[TR]=0,this[Mq]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Yv,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=$l(zp.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[CIe](r))}warn(e,r,s={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(s.recoverable=!1),super.warn(e,r,s)}[_q](){this[Mq]&&this[TR]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[DIe](e){if(this.strip){let r=$l(e.path).split("/");if(r.length=this.strip)e.linkpath=s.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=$l(e.path),s=r.split("/");if(s.includes("..")||Yv&&/^[a-z]:\.\.$/i.test(s[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[a,n]=CIt(r);a&&(e.path=n,this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(zp.isAbsolute(e.path)?e.absolute=$l(zp.resolve(e.path)):e.absolute=$l(zp.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:$l(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=zp.win32.parse(e.absolute);e.absolute=r+IIe.encode(e.absolute.substr(r.length));let{root:s}=zp.win32.parse(e.path);e.path=s+IIe.encode(e.path.substr(s.length))}return!0}[CIe](e){if(!this[DIe](e))return e.resume();switch(mIt.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Uq](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[SIe](e)}}[Xo](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[VI](),r.resume())}[_0](e,r,s){kIe($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},s)}[jv](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[qv](e){return PIe(this.uid,e.uid,this.processUid)}[Gv](e){return PIe(this.gid,e.gid,this.processGid)}[jq](e,r){let s=e.mode&4095||this.fmode,a=new EIt.WriteStream(e.absolute,{flags:TIe(e.size),mode:s,autoClose:!1});a.on("error",p=>{a.fd&&Mn.close(a.fd,()=>{}),a.write=()=>!0,this[Xo](p,e),r()});let n=1,c=p=>{if(p){a.fd&&Mn.close(a.fd,()=>{}),this[Xo](p,e),r();return}--n===0&&Mn.close(a.fd,h=>{h?this[Xo](h,e):this[VI](),r()})};a.on("finish",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let C=e.atime||new Date,S=e.mtime;Mn.futimes(E,C,S,P=>P?Mn.utimes(h,C,S,I=>c(I&&P)):c())}if(this[jv](e)){n++;let C=this[qv](e),S=this[Gv](e);Mn.fchown(E,C,S,P=>P?Mn.chown(h,C,S,I=>c(I&&P)):c())}c()});let f=this.transform&&this.transform(e)||e;f!==e&&(f.on("error",p=>{this[Xo](p,e),r()}),e.pipe(f)),f.pipe(a)}[qq](e,r){let s=e.mode&4095||this.dmode;this[_0](e.absolute,s,a=>{if(a){this[Xo](a,e),r();return}let n=1,c=f=>{--n===0&&(r(),this[VI](),e.resume())};e.mtime&&!this.noMtime&&(n++,Mn.utimes(e.absolute,e.atime||new Date,e.mtime,c)),this[jv](e)&&(n++,Mn.chown(e.absolute,this[qv](e),this[Gv](e),c)),c()})}[SIe](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[BIe](e,r){this[NR](e,e.linkpath,"symlink",r)}[vIe](e,r){let s=$l(zp.resolve(this.cwd,e.linkpath));this[NR](e,s,"link",r)}[bIe](){this[TR]++}[VI](){this[TR]--,this[_q]()}[Gq](e){this[VI](),e.resume()}[Hq](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Yv}[Uq](e){this[bIe]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,s=>this[wIe](e,s))}[FR](e){e.type==="SymbolicLink"?PIt(this.dirCache):e.type!=="Directory"&&bIt(this.dirCache,e.absolute)}[wIe](e,r){this[FR](e);let s=f=>{this[FR](e),r(f)},a=()=>{this[_0](this.cwd,this.dmode,f=>{if(f){this[Xo](f,e),s();return}this[Wv]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let f=$l(zp.dirname(e.absolute));if(f!==this.cwd)return this[_0](f,this.dmode,p=>{if(p){this[Xo](p,e),s();return}c()})}c()},c=()=>{Mn.lstat(e.absolute,(f,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[Gq](e),s();return}if(f||this[Hq](e,p))return this[qc](null,e,s);if(p.isDirectory()){if(e.type==="Directory"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=C=>this[qc](C,e,s);return h?Mn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return Mn.rmdir(e.absolute,h=>this[qc](h,e,s))}if(e.absolute===this.cwd)return this[qc](null,e,s);SIt(e.absolute,h=>this[qc](h,e,s))})};this[Wv]?n():a()}[qc](e,r,s){if(e){this[Xo](e,r),s();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[jq](r,s);case"Link":return this[vIe](r,s);case"SymbolicLink":return this[BIe](r,s);case"Directory":case"GNUDumpDir":return this[qq](r,s)}}[NR](e,r,s,a){Mn[s](r,e.absolute,n=>{n?this[Xo](n,e):(this[VI](),e.resume()),a()})}},RR=t=>{try{return[null,t()]}catch(e){return[e,null]}},Wq=class extends Vv{[qc](e,r){return super[qc](e,r,()=>{})}[Uq](e){if(this[FR](e),!this[Wv]){let n=this[_0](this.cwd,this.dmode);if(n)return this[Xo](n,e);this[Wv]=!0}if(e.absolute!==this.cwd){let n=$l(zp.dirname(e.absolute));if(n!==this.cwd){let c=this[_0](n,this.dmode);if(c)return this[Xo](c,e)}}let[r,s]=RR(()=>Mn.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[Gq](e);if(r||this[Hq](e,s))return this[qc](null,e);if(s.isDirectory()){if(e.type==="Directory"){let c=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[f]=c?RR(()=>{Mn.chmodSync(e.absolute,e.mode)}):[];return this[qc](f,e)}let[n]=RR(()=>Mn.rmdirSync(e.absolute));this[qc](n,e)}let[a]=e.absolute===this.cwd?[]:RR(()=>DIt(e.absolute));this[qc](a,e)}[jq](e,r){let s=e.mode&4095||this.fmode,a=f=>{let p;try{Mn.closeSync(n)}catch(h){p=h}(f||p)&&this[Xo](f||p,e),r()},n;try{n=Mn.openSync(e.absolute,TIe(e.size),s)}catch(f){return a(f)}let c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",f=>this[Xo](f,e)),e.pipe(c)),c.on("data",f=>{try{Mn.writeSync(n,f,0,f.length)}catch(p){a(p)}}),c.on("end",f=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{Mn.futimesSync(n,h,E)}catch(C){try{Mn.utimesSync(e.absolute,h,E)}catch{p=C}}}if(this[jv](e)){let h=this[qv](e),E=this[Gv](e);try{Mn.fchownSync(n,h,E)}catch(C){try{Mn.chownSync(e.absolute,h,E)}catch{p=p||C}}}a(p)})}[qq](e,r){let s=e.mode&4095||this.dmode,a=this[_0](e.absolute,s);if(a){this[Xo](a,e),r();return}if(e.mtime&&!this.noMtime)try{Mn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[jv](e))try{Mn.chownSync(e.absolute,this[qv](e),this[Gv](e))}catch{}r(),e.resume()}[_0](e,r){try{return kIe.sync($l(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(s){return s}}[NR](e,r,s,a){try{Mn[s+"Sync"](r,e.absolute),a(),e.resume()}catch(n){return this[Xo](n,e)}}};Vv.Sync=Wq;RIe.exports=Vv});var MIe=L((z$t,LIe)=>{"use strict";var xIt=SI(),OR=Yq(),NIe=Ie("fs"),OIe=jI(),FIe=Ie("path"),Vq=RI();LIe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let s=xIt(t);if(s.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&kIt(s,e),s.file&&s.sync?QIt(s):s.file?TIt(s,r):s.sync?RIt(s):FIt(s)};var kIt=(t,e)=>{let r=new Map(e.map(n=>[Vq(n),!0])),s=t.filter,a=(n,c)=>{let f=c||FIe.parse(n).root||".",p=n===f?!1:r.has(n)?r.get(n):a(FIe.dirname(n),f);return r.set(n,p),p};t.filter=s?(n,c)=>s(n,c)&&a(Vq(n)):n=>a(Vq(n))},QIt=t=>{let e=new OR.Sync(t),r=t.file,s=NIe.statSync(r),a=t.maxReadSize||16*1024*1024;new OIe.ReadStreamSync(r,{readSize:a,size:s.size}).pipe(e)},TIt=(t,e)=>{let r=new OR(t),s=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((c,f)=>{r.on("error",f),r.on("close",c),NIe.stat(a,(p,h)=>{if(p)f(p);else{let E=new OIe.ReadStream(a,{readSize:s,size:h.size});E.on("error",f),E.pipe(r)}})});return e?n.then(e,e):n},RIt=t=>new OR.Sync(t),FIt=t=>new OR(t)});var _Ie=L(ks=>{"use strict";ks.c=ks.create=IEe();ks.r=ks.replace=Pq();ks.t=ks.list=vR();ks.u=ks.update=xEe();ks.x=ks.extract=MIe();ks.Pack=cR();ks.Unpack=Yq();ks.Parse=BR();ks.ReadEntry=YT();ks.WriteEntry=nq();ks.Header=TI();ks.Pax=KT();ks.types=_6()});var Kq,UIe,U0,Kv,Jv,HIe=Ct(()=>{Kq=et(Od()),UIe=Ie("worker_threads"),U0=Symbol("kTaskInfo"),Kv=class{constructor(e,r){this.fn=e;this.limit=(0,Kq.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},Jv=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,Kq.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let s=this.workers.pop();s?s.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new UIe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return e.on("message",r=>{if(!e[U0])throw new Error("Assertion failed: Worker sent a result without having a task assigned");e[U0].resolve(r),e[U0]=null,e.unref(),this.workers.push(e)}),e.on("error",r=>{e[U0]?.reject(r),e[U0]=null}),e.on("exit",r=>{r!==0&&e[U0]?.reject(new Error(`Worker exited with code ${r}`)),e[U0]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((s,a)=>{r[U0]={resolve:s,reject:a},r.postMessage(e)})})}}});var qIe=L((eer,jIe)=>{var Jq;jIe.exports.getContent=()=>(typeof Jq>"u"&&(Jq=Ie("zlib").brotliDecompressSync(Buffer.from("W2xFdgBPZrjSneDvVbLecg9fIhuy4cX6GuF9CJQpmu4RdNt2tSIi3YZAPJzO1Ju/O0dV1bTkYsgCLThVdbatry9HdhTU1geV2ROjsMltUFBZJKzSZoSLXaDMA7MJtfXUZJlq3aQXKbUKncLmJdo5ByJUTvhIXveNwEBNvBd2oxvnpn4bPkVdGHlvHIlNFxsdCpFJELoRwnbMYlM4po2Z06KXwCi1p2pjs9id3NE2aovZB2yHbSj773jMlfchfy8YwvdDUZ/vn38/MrcgKXdhPVyCRIJINOTc+nvG10A05G5fDWBJlRYRLcZ2SJ9KXzV9P+t4bZ/4ta/XzPq/ny+h1gFHGaDHLBUStJHA1I6ePGRc71wTQyYfc9XD5lW9lkNwtRR9fQNnHnpZTidToeBJ1Jm1RF0pyQsV2LW+fcW218zX0zX/IxA45ZhdTxJH79h9EQSUiPkborYYSHZWctm7f//rd+ZPtVfMU6BpdkJgCVQmfvqm+fVbEgYxqmR7xsfeTPDsKih7u8clJ/eEIKB1UIl7ilvT1LKqXzCI9eUZcoOKhSFnla7zhX1BzrDkzGO57PXtznEtQ5DI6RoVcQbKVsRC1v/6verXL2YYcm90hZP2vehoS2TLcW3ZHklOOlVVgmElU0lA2ZUfMcB//6lpq63QR6LxhEs0eyZXsfAPJnM1aQnRmWpTsunAngg8P3/llEf/LfOOuZqsQdCgcRCUxFQtq9rYCAxxd6DQ1POB53uacqH73VQR/fjG1vHQQUpr8fjmM+CgUANS0Y0wBrINE3e/ZGGx+Xz4MEVr7XN2s8kFODQXAtIf2roXIqLa9ogq2qqyBS5z7CeYnNVZchZhFsDSTev96F0FZpBgFPCIpvrj8NtZ6eMDCElwZ9JHVxBmuu6Hpnl4+nDr+/x4u6vOw5XfU7e701UkJJXQQvzDoBWIBB0ce3RguzkawgT8AMPzlHgdDw5idYnj+5NJM9XBL7HSG0M/wsbK7v5iUUOt5+PuLthWduVnVU8PNAbsQUGJ/JPlTUOUBMvIGWn96Efznz4/dnfvRE2e+TxVXd0UA2iBjTJ/E+ZaENTxhknQ/K5h3/EKWn6Wo8yMRhKZla5AvalupPqw5Kso3q/5ebzuH7bEI/DiYAraB7m1PH5xtjTj/2+m9u366oab8TLrfeSCpGGktTbc8Adh1zXvEuWaaAeyuwEMAYLUgJQ4BCGNce++V01VVUOaBsDZA0DaORiOMSZa+fUuC5wNNwyMTcL9/3vTrLb3/R8IBAgmBTJZEqgsk1WebctvO2CkSqmMPX3Uzq16sRHevfe/k/+990OK/yPQiv8j0EJEAEeIAHkKEQCrCYD5fwBkBUBmDpiZVYOkpDqUqTOUqTkse7KqfRKkZpSZ0jmVmVKbVHvVGONSY6xdOXf2bfxYs+r97Gaz7/VidrNczmo5i+X4/79WaRtnVo6UQAk7u1v/33o7HGQdPSpQj/7rqqYgCstG5MTLOF+dsIv//2aWtasTQFXXSGVKy0Ch0FwtLAv5xL+sjMzIJeSZkqQ+090j9RMRiYjIRDMBVHEBdLMPuzhK9ArtKWmta6w91npmkeMIbXl7nz+t0qqu7mqNZH8NgWcOML8gqf5fsvkoWoqCW/Uv9a31Jb231iAdAFq2b0f2AXJIgEFCSX5xeJctKHDjpJQ3m3Urk0iC5/t7U/875277i6mGdxYoptsKpVKptp46HgxpRCOeWYxBRAIkEfH8P2f4vnxABfSq3okFhW7Sh7EOU6Zknm9b/2dQZl1CfrShJVuQKkmDUKRlwEAYpohyd7/uuRO4vjhiW92oa7DifsWphJQsLIonVqN9+X6G95E9gJv1/aVCu6Vysu/NbAvVQJAIkgSLIIEgCcE1iBZvi3Talbv/B95N+2tvY1Qof7OKQVArLUEjJSQhhBgSgWJaCGz+exJ5As24WxMMguChXfbB3r3z09qdsMUgWww4SIpBUgwSMGCKKVKkSDFoiimmuGKFLRY8P+/j/1z/z8vcC0/38z9ixBEjRoTHiLRERESEEhFKHk1poFts2iWWWCLiyP783Pr/f3p9jjDzv+KKLbZo0QLRAoEgGQSZIMgEgSCZEogSJUqUWJmUwG/uv3/60+facZ/fES1atGixxRZhCENEGEpElAhMifCIiMh7RNRARD0osUTmQzS53d7gIWweY/AMx+gtFBHZ+QKBsEAgEAiEnXyTePKGdLaKJm1heyFaU3uzbTmJnADDv5s+/2iBsQLt8213mBZIEC+iwULwYIFUkDqt7977a5EjE/PA5Kn3lAZJ2jN6FtU6hpJswxeRU8EDzmheRavGU+8SAXcv9hs2VHFHpGFd2uSqhHfl+2vjalI8eXtMfadrWGGNgIrP+vNSPghBQhnaYRowg/SWg6qitd+w5dduV3M/w+v7ZmNa2EHT7PCw7b26WSDoIaI+BqiP5p2zrxStV+M2GSTNwLZe7+NuQ2yBmwrOzjTUkFHwTV/eBa16T3gA4/213h/1KeX+30V2dZfwJfquaEB6xymhDz3/VMrY5GD9qnZSnAOdHwOrSiaW52B2t2N16zP70evD5mkQyIw0SkzGfUSC0v6MnmPjA/zDgnWuNgwjo7uqtquP5iVWyxtfYeRFHYCX8Ri+J5QLlWqdxq/rU5NcBfWU0gwJLQozOPn8AKW8O8tlag5jTBhcLinjQ3x+ROz+sC1XeAEFjsiL/RBz5ZaHIRt1Zbw7BI/oqy9GqIvPir/AVOOYmyvYsW4S+OjA6lAao99TaXVi1/zOSY7OsRX/YRjJGmdyzupZMt8/DVsorPED2dvEHJaq3K/NE3bKc+Ilrb/azbMvPOIR2+6+xdd8ma/RzeYh23z26tLr9RU6lUdspWd2NAZvk1KsuWtCCp0djmdRFF8HywmTO5KH5Q7JmWezwwKTluDzWDDEEErDdtCCr0a3/GLiI1+HFJKGSB6KtqRHbbS4nsotDPyRz6MFVsQZEL/84gHTA3INdbmG+IoQeUnuY9jGbwRzWSQPASvKFzPQ8sMX+Ty0xAooDSUYEg2rB2Asi8sg++mGqyPPdcZaQiV7O4lZKh/GtbLxz6f2bTsRiLCS7YyUlJjXyQfUAqv97xnph6+1be14kuOkiiW9yBJa3qGJc/jQpCNb/vnTbiO8xEL8sWjHbz2Bnbw/6u0defDAf0FGLaQbLe/+iCD19fZdW4gLDjOLrMbQ2T9vzdtlMqbVl3aCRT/5cB8G8CCpn5B9Lf3jpPZHybpehwzVihnKVbsZkH26pXEqhZl3TmBX61DuBRGWyjOcuBvMT14I2t2ppPMw9ZDpZixooFP9mAgeVVq/i0VyO1POaBTOdukyymNgYmnefdg99y0VvJTipQXLHiIB+GYJk6iLBUtXC5Eut2DpuKRTvuBkW3pv6b3l9xr3/tvyL7GOfiZJ5G+M1aBLJ8TSrpD/ib7xQ9H4b9AfOQ/uEcDmZB6cL2xC41vkwfpiTmh85keSHMtuqSwHp3CQjy0hCN4mosrShflH0n4J1MoTLAROsfy6R7DbEVIUplDwMc4bwsJzphym5GmaVt3+FVff00PZlpU7E5+eHCn5OBo5v0P3QHYrsHNk0PZ7klsowDlcZtJdJgvEbmwvROEM44XY0SuLhahpubgq3SzjsieuutCgAA3qM4rw/MfmzN6HiA++fyU4Rojl44Jb3lXXiQdVSyENix+uraEeD7BibuDCZyFx7aSSW3MA55ymmgAwipqWKus8ykE9HSnJ7CAcn4q4rnO13Ll54POTEjqOxF+FpSAggq+iW01ABNH0JIpBemwUz1pq6GW5MeY0mCE5NtDFSzPrukTra4iNQgyYuZRHSsz72UwNvCA042mO1PKJUG7b896RNyXM88mIr7W1lyhCT8uigfq1LwQ1zXpPQsUrUocxVC+No06fCYUsGWWUjl0/D4tExtJmp4w1SYeaLpnQJ7CNbVODe+nUys2PIKLyxnBq0kHPfRWcq+THl5c2JS2fQeZBVxYtIn74wmnVXuTeFKjE4apGeJAQWnr5Jum5VD/KXuOoyZRPRtrgkZfqvDIhmlbcO6TcjEIhK7mkfR/ad7WeqFjihp7L40OITvp037LNCGX/L6y51MCmkxcpjKCpzBA0noqXTJW2WtDBHUAiBTBi4eBW4rLSC2L+o208CmJ/sxGolgvDgv6hwNsfmxveCnGodx1iKVgEsUO1vE1JKVnT4SgRTO2dgh9K+H599CAmLZE8YvfNp3nhge3MhwAfna99yEZihxv/XwtnAneD0/eEOhyhBTIjd37wBrwuGTKcNBm0/Mx8mIj73As7n47h25bDP3X6UH6TyhtoUa+4M/rKf5ClWLs9Y21CYGxQE809XrP2Jk3orKEJ6hOiL28/33rVJeS5dVpluNegSJcPZfWrG3wDPe1BG6B5cHPnHbNBlhNozcJdZMyFTFG7UPzgl+oUCXRn+ISQ1WnXACLe4kbKtvvthKJhtUPPc2w70asPUj6hAjfITl0GnlA+vRox2VZA9LnskDs68Tk16hXuKd1zfFgC7b6qnLKaoEVXr+2g/BhWXIgw+GVBoqgnDnVuAp2qiUC6qOG4x6GNRVF5WUi7Odw/iUrK/gQUFTBttWGE+ceQumw2t+2dqUrzOrsHSaolipYpBpeLVPvA+1LureB631Tl56A1Wd0ryu96SzibapY3Nz1TXxbMfhInq7WkbUrgGfVaH2vd/tsicD5w5CYV+eISjPH/omyb0wzec5XMokuSw+38AZ2b9rNMawsYSIHvehmbPWUWUuFHVW7var3Am1LM8YFd+G9VDZuKFOvxqm68LDL8bNbjxFevGsFlTyXE1FAbwNZcd6k29dl6ub5BZ6V/O5cTFBmJtgRrraPr7PoqJUnMj6QIpMIodZLDE57k2i6TROku8ZdH3m6Y1vYJFSWTeioWMDaeNqyKHeN8tlp4nDWkSQxHMqbaON4f71KnQF1IwiOkHHPCMrVw/D5W089eWX3/j60UkkuvoRPJTsumkpFd6wW09GwYBwLMgvEZcBgHED3tGu6bESdiXTBcD8W+EIsfaJeutJZ5THXopIx6YVJDbcsMGmYsZtIXb8bsVjewXzc88FcTZ5lYYoFhIrBcO6ljLt5+dp5HmzXv1Kg2MwCJDrRr7qVlXdraGTP828XfilNRkEJ1GwtTE3I1t/aITjVWiTHgXNljdnMXh5wdZpZcKzszsONMKEJhMh0NK+bDGn+rAJDC3mgiOZxq1OUUXNsxkQWhYW1GFtRiWFZNcNDeLLlIQll0jLYPjE2ynxKXI4lcBwCNsxFW85dwAN0PW2KmOMcI6cTvka8d0LYiqm5TNUQfQJPIoralnyMJ4bt6oiIaYBwZu+k4MkkXTQfL1e90rIWXSgjgUBMgCXkoTn9Rr9HCuegYSj1NaIXnzEQUfbtnz7/FkaUwrNSQpHIL+Jj0VvXs5zg6Gn4hCOMevrvMmTvdBdt6DOzxoF88Zp3bG+juT/Zl9hHsXlZY/IeRVTezaepfT0+FNz8u+rCFX+1LykI9/PPmJIfH8/IRAejJVADY7rGj+r8PWPt4mhxDEd6+n9rB/NPcTe2dTs3pXtOjtNyFndrtwLPSz6s+d+vOkWnztCqcbmMfyfd0LcFRcVF8kjkoWIncdj9IKIfZhh+PP+DeY7TVAGAK++IgvZUF6PTLIJT9EhxpprSPCoWuxThGwP8vmEbDs6kDehX0zWXz47U9+/Hqajad+simdjof8lRabLnIvfxoaVOQL907ZBofU7FPER91ifRhlz9nXfSHyGA+c9sQnfOh/SDUqx+vRyM4oJLJXEyfaISzIFoC6MDWR2JB9vBLhhchIiznCQbr7n4zxaEcvphNcZfivwbIKk4C7kb+IcPA8u66nd2Gb/vUiilkp7G6ydQXj82jFjlebJ0yyezuSSbikTcg/iPlGxcWL0JnPmnSbXtHfKBGopIcI3lir17wt8hz8Tw0UHbloVh1oDnNdFBZVkteweiH42CzircC5ZTif9eeYhieGEnmUuVH7ai/JO7HRhjYEPIibvKkVqM3z0jfZE3TOv0ECUC8NkRhCWEHvAOZQ2Di9cpB1UFmdoTca81BmGHQHV52E9WYKITgpIkjtau2nj2g+/51uj2O1NqXpe7/et2u+ywiRJcxClnpB8zPWr8KpuDNG1On7P5XzL7w4LaThoWCyw51tg67gUiQxAvac5QMfVAg7A9hcPddIYKqXNqHKVTRL1cI18UOJxu71LHOStvahBLKaojwKBgRA37Txbt+RZS2SV8fnhjPK3JtIrQYXS/KbLS+FL65SGQrNoZCPoQ3jPPJ5oGmhVQ7p1HPtUJWZUSK9u52UhHSn7Fz4LaB7f232yKKRJk07LL/FidQB0163aXVWAUV+9Uo0KWhJRPowfH1uqYdJztTXYWif3SQ2veJvBWruwtw9FsVjhQC7panWsvhWmb/auexdM60b7dpZ6YWOyOJa0qT+G9zC+cUTlJul16NOjStrdI5+HmW42OyTZigq9e6wSExmEs9irgKnyuV2XcQjptcAhXGxzo0uId2qEuEZLPpPSpkxKQDdnY2nESOYlFBYmNWyWgXWU1cgMEOrISgwBaXV58jMLxLhTFsomEXb26Cnyiq2J2giU9Fm2absgPt4Rbymjjkcd7KgXAtHaXNVLic47oHHBk8ARny/M5iBziv+H09TI7cjX/4l1dt0YkbjOG67cwvyDnwimukP5zYBXBFF7hxXAov2L5b2RfPdccCG3yiboYvK/mEAdstGcwwoUpM2weBoiRPCYEpRZxbEcXZdI3lGC5+PAl0a9AOvplhycISXApYj/Cb6zYy1K01G+osg1+ehGE0m/zhJpyLJ7Z57DmuoP90ZNkReZoycA3m5rCOFZTV8N6IbLjf5BqGMUl4znKQZT8ehgTTt5IvwXbnJLz/7W2WXCWlXpiwfXydTi/zOvfh/iZZU5gT/fCx3nc4PpiXjU8MdqGAs84cdBbTDHTs/YbHBvUVFzcLVURv20/zNCLGxwIchrqFeEBiuug3jSpTTTU7nE2FRDhL0LYczn6cZASeq3qNqi1zQVYub8kofKMm6437UYd5b3/SO7CKivw4FWFPLCLc4Z8CBcULyQE9K8kclUkMZwxwWqSVYIrnqhl3jFaMYj9xzk4XxZQBOZeTHSYKTGcyN0fb56s9a6UvmqOL8RLP5maDP0skmaEs2VciXWCWkS8gbAyh6gHDIsnXCmDhDERh10JM1UdBGKpt3XYeJrw/+Ox5PFGyCLErC+uRMXw76JlFhorQtT6lEItxakSkm2joAbmHfVOulpr1LyuY5qrCVm7ZV8y6SBu2UYc1R9GKlgLZ0FCB7GyxzUfoiunzAJUkS4CwDLnKYZlJE5rs6JF008a55Dco1ZmpojV5KSQyO3RGmuIu6MJqCkKcv/VWPC5Cmzr77J8L2amlHANFA8v4MLWPFTxCuY9+llLIkHb9KqC6drvO76U/HhzYd4TCrtX3hIMtbCl4wpA/crGvRH0eb0k3lkNxfNADxb3kdLBtYQIKSVtpVDXnukN6/Jdmoy9bYx2lx/ziK38opmSgnSmwC8vM2i8fKZ8MSMatN+ll9Va3rQptqQeOiUWdB5P8j67+kp4MWQFGUJgq/jA2SU0WLYbL3FznrYOcZUA2pFzq8l+c26QbiCbAl8Ch0La9zRiLDPy2srfCpXRVcMOatjv3XJEqv6lQBhL4ygI3GKN8DSMNoacSezvDfw84MD+EGYUFiyxXhVwAcjhmct3ea/nmTEyFPJL03efr5cMR1jXApiV6KATnd6csvUBQIDUUE/gF87lpIhcASzc3FNkongQzQBhyilusxM5JCHhq1vsAHUSGlgfPu3T1LMf8fUvu+nWo1UBLM6eduqghd2CF8y4g+jxwScriC7to9zCH1oCqa+AO4eXSC2V6Ayu3vW127r3ABmlmG7suJd51EhqnAydEaetoL5Z+Ih9DtWAiYG1DSpjkcYPAD5smccfdVDpabrJdAdk1Bwhk2f/0XFt+gZ89z9cWBxBadW17CYPkcnfxboTMe+1Gm9uLOdI72/ZEW8/y0dSUqGtJdXZHqbBgpaZqxg9gdyvqrqrbu6pWaCOvqGZ9bS2aNQDDcttEfa7PXefhfw+AEl08ngtUlua0VZbiX43A5T84leaUEbC5JWu0ClotsUtMv9U9Ma8XonMcneCouY74ROyoXJb2qJ3JxdQ0t2Q4GJsnrM6NKuEQsucEeknJx9Kow/RNlZAi5gmhVfd9kZGBWxrcGjGGclP8Dlyf/begmrKtRtKZ5yBT8yKmq5BbFMBNJ3ipr7VHfJAIAEVxbHyfCVVxhN4Ea+KJOX1kmZaTU/zPKeIuHT9RFhcximF6rOEch4CCeVy0QojIiYrbkxQjbaoz5+dTT2lV8Rvem+gxY85I+O944aZIxHzaH3mJ0YT77dfahgwJEN+Ecac7wiCCIbmkaWV98mdvPxjT8bb5DRzhJR3z2dolyrlyaNktNUvWxPOjxcke/OgOG/FwhyIXgS9DOAEITNdNLXNtuKDHc8plFH43V4UF92UVd917U4OC+UYmM9htdQeQb5I/FQp+3cw6YsWkTBNupvHaX4FOeZk90YqUGUsSz1gWzC1geFSSiYQeEdS0CY6LXPM4KVsvR61UCB4pu70JHkvpAE4e0B7PIba/7aQvUbAr9ZlScVQ3ZXzHatAGkBg+fO4eawSGac8km+CpXbCs+fb7FJ8xW/0Fy3TDoZwOwb6pW+BIv8uCG5EDbNrUSRJ/WUcQn4nnt35rFYyt6GLoroOfLw+6Gcj0pO2fsa+AtutLPb9/jmtx+rXd6t3Ls22SglWOFNbJHGG8r7Q9xIThX+tITsfORZ/N/tf/jGqe2ikQDYq2celmNH7OnXLzSvuO9YNSrDOoTSTs3LlGKochkEZlMW/XAAMt7Yp/jbjIlVq2TSg8sewqPiwvBC23Zm/dTcmPDerVVzsUQcHhB+nzht1kaCTCdTNhdvoWKwvYZ4oSsaqOGGcbb5Fl+rid+q6arHmMR20GI6+uWKihVOIb707/PrT1cPyirhOh3NZKdbTbl0cuJuRSqmEV3BOkAGkr3zd0DUr+L5QTewxGAetWpDipU3AdliEJHg0sdyYLdHyNYQueZGb6g0jlOWQQ5J5v3aM199JVy3Uf/1Ge3bkUt13caf0uBvT8mPeOg705fTxlxlV8YqKpH3Ky0eqPaZDkVLcckyXL+x/Se8g56COoCA+vP5ov6o+Gq0F+INLDEJbG6H7QTc1uS8BzgI5xdRrVjdzNfNl7xrtUcdNhwEyTmciqsCw9t2xIe+RMCZTaG6rH0HSa8IzUrSafJqsbmtZwLNfIT+ipGbS6EDg/AOjP2S0Q7NpnkskF6On9uZfJBNMc/vRuPPO+CgdQfjClqSgsCSMKIdCVJSvc5lo7XijOtAu1+cAnisoJqanxLtNhMiZquTYxAg0RznpnCrQ1N8m5SKv/9Ka54quCMo1bPbNcYTa/iO3IWD+FCky5gplE7yvElfoQPOiy3GB0tsPgZH0HbIeEcx5cI6QO00aSWe8+aiLcg8lMxFwL5rRyH2XFwnT+ZpIDbUYiKNB/G0P3n75pLoHkRmfle8JmO5BO2juC2oc1qe6HJ/TC45AjhJ6czzOtLg0Q99Zri3cs+gIfZMwKN+ZARqPe540Aj0bGZso2NHB1O1t5/RkeDdikWUxkEFPKEMbII7WtZuIc1sFeyNo0fo+No1AljZ40n68sAS64VLmvZ4P5++PAqbMkRjyKYh3PXfxynQI1lAg/kz1Ky+RNG2hK0Lu+tIqLD7o9+gSk4ACGxLoKeLU1+YaI1HXJtoNRuw1pMGcuWfZTpIvUyIatl1l45Elm6xNdbDS02RGC7HxTMmZULCwdGyYXsYp4/RJgdqBWINVf7FKIaio4QYm6H5aZIpV+2XsVIn2ATFIBBq739vS8O10e1CI9Zros+/6UQ2nmCDXg6z3adf3sV9bEp8t+e7piPl0Vn6K+O0ZwZDjsWLVv1mgXeNI1bBh6kk8iojUn7nRitqTJ7o+xfs6NZTQfilDoypCeK/kaNg0+yScxuUa3HXBSpNCIkv8gbspwrErL08UpBDJieyBraCuOA1hAPfmkPFJZ9wWq4uR4fB3I6YYRqJERQ5cGX7At+5Np41bUzSNyjseRMm+HeG/Y4AOTh4sFQ6eZrtDMr6g0N5x4Qj/WEqGJ53g3lPIgwX/BjbkvAN63C4acLsxgdIE6mJCCXUZhvDTnr7Nxa6EAYH4AlflhCVNGE6TM10ypmFEoUVr30VFr5dMlvj1dIZ+iXWpUQpswhGTZ0rUdIE1uAB2ho3IZCUkoAETlgWTYTpeHTq+R59HnIeee8yLnEKghPA6gPynJCqv9EmBxl5DHixNZwGIC+ISIP596tmySz1lKWOfJSzCNvSCsphu1WSjnZ5BhOFZrKuj4Q5BJTEAqjd5FcdDoy7EPgtGmeNT6dAtdPT5oKKNBnrUNt1bmp3X8dGpblRXKqVL6+ReHnjdSY3QaLY1HU/FmqVXaPTFvxYHJxUlqTNMfb/OJaIMHrSXQ6d5QHmVpnSy8xGXfAcd6FdokA1MKAzBqB+j85xb7scozV4FTownJXNbX9hsG6i8VjLYfYfFVwvqdoWg8d49fazKaITx5BOo3bIcHKBdMaTC3DrBju3cwmjGERPEz67R4I+AEDzJIO3z0q/ZjUo9uI6WejbnyrEJp+V/2TkToGvLmdDxPqLdErgttfHueQZ4wRk42tDr1WI8ZUpkTvHvSi0wss9WMPTuTccFYOp7Vc+65+JKgOZUryMKe4H6cmOM0m3GsQxeaOPGNKY9TnaotMkhqAptsqyevZ4uGBuo0ZWacIsUxWpCQz+DT7IwKbQRnd1CSfDDOh1mmV0VZj9xygoOSlrf3TxLf8QylmirPfJRzz0bzs5Rn15+jMml2WhWeddU8AM4eATCKiVf/80RzQzE/HS7HcZBCA7w7y8fl0m+8fuf2BIEPdXRYvXUac2yxwkuOKA77mLoxfFbWKQndw7U8GDJShjJxBIgNBGN+UU14ox0YgJ+IM7vYX5ObmNF8NKUC4CN00gHk+OEuqpI3rCNei6d1kR6KzxyHsQ2bruIRx1VHoFq+zW9Ig0WemXUnkWLSlgPd0Dm+ARifyFS0uujurMDt1a8HpqbYz911nQb4TwHyRqdLsFgm3PLoUmOnDL4udj7Z/97w1eaPfyMtBP0ewBq4l/Xnypqpl4el6OnUYFt4SecDUJjh5B0Hg3uQayutsdsj6iRMwO2hMuVSyPagTWUEh5No3x8CE/QRkQHzxmWErQwksxqj7aIQyRA0obK2FRuX67Fs04IxIWOrytjmMZpyMlZdOQowSjQ2jstNQt9dyGFTjTwsdzQsyj4OQ1SOojVrNBLDUtOyjB36Q88MyXlKDihQT1mhoAElDZhpRAJ1KJkLj2EwzWYaI+3SN/5dVpV5LZftFyzcztT2sLCjuGuAKPgaNxY7Nc2bn2UgA3xIlzlUPE0x5wMiNMa7b4KpKq1kS2RcZXz1l0RJajkZzj5iiSqvqYNE0wvIytCMEQBK8fuOzqNBwV/CBCcfhfuwuq64o6mT4miwYCeoAblNBALa6rhaPPQTiijH4KaYg2bD9IUkWwtoDFhpw2/q+paPxEU3jCQGs/LnZKbNxJoqZecAyVC18y6st4me59Qnfco59MewM7GFrp8eZChAKRvXk1tLx+HFdBacQZHR0oXoXdscR+45nbBRMdY0Jt1QH04iAHUwDO7Iku+pHtupJ/XuNcuDeCgbKlpbAd1u91zwSjAOoE80NFnZX8q1YRnYpbffDudICa6eWt5NSVcKLfl+cbdk+sUIOibTNqBNJjyYHkBbLOfADZHkSI8CCggwbr9goMPQZcvj6cKiR+uOQ4/HK/GAOIzNcVLj8a5bVHwJIbNgV+IosU8kQnt/O6JN4z08ORoYvyN5iOfg4xJgMRceOc3anQf65YOrZTSP0Zq+Rcsyms8Itz+PxKCKxZkYMeVFOKfGYbISW3i7P5Iax0nQH+BW/QAjDik9AJDdDqTFQb1zfgQv2wJ/FO2jTAh2jL6lLnM2dnbL/7BygCU0AWKvBHJbwu+CED04ZVad3yNuNpb93gn+XsopRH5LteJEwkqG+Ekrqy7OJlRyn5UJ4BnpxLRCksfT+YhG57Ay0Ivh6rmqT+9J7yZXr58Eus52M4TYBYndTj3HkRS7OBJ7dUkfcRDKiLrgSRcxZxD1MikpUfnjLYoBgonb3gcE2R/otu25r2+sl8+C/eTRvq4+dTSetKZnL4qG/6D/Im0MDe3VQRr+lkROZBeXPhUhu7hVT5NL512dVCWx71GZo3MherjBXD2vePP+q3poRAc6+bB6IvVW+xcbAVAujruIz8OE3RbaOl1Ugqs/uDJjqJRpZPQ0SlQ9Ivo1WkaqU6R68Mvrt3lPeOvET1iGUQXgTMyshouibO3A/wuZoOjc2hD3B/OdIjSXYkhPII7JCPu3QKMV80nSyM/n4VKY7pdIb6qZhR2JvplYrasbD6F/cIKnNGHvZkbINmSUNy0sdlwHbCEExifPCp+l5HM/2kKUEJzMZluCjiXCNENLG7iyYGLvnhldiknwSxYHZN3NzDk9D8kbcCT2woGofSJem943nDYcmMtyZCpzEMdwsO/loCxz+grJ4MZitO6rDKDHIacWBxibAWoc9BWWwTyoy/kNdOVEloQkyII9AVU18e871tLqGS3CaI3folUwms9IXwEaXE/cqv9yRW4ESOkBgOxmgJYM/6tyrZOHVK8w4pDSA+DB6ZW0ZOhTtGRUjoZEfVEetd9rNOYClETrOvfURb1BWPYd9e9lMmN9edm6qA3CfC/S4BpRLTvrhQw5kfcdLVg/ig29gUiTiPdeo+VHCmwWnCxcl0ZNLYmYOGTBPoLkfUd5/fRqQQVr2ToqcEtoKAc1mT1AXDno0x4vt+vn5WzkXyHLXjI38zzj4ty/MLhuiLqYb0FXHHmQRABZsAOpKkB3CYy8rp6YggkRGyElTkgUR4gqkhCxE57jta3ILH4Gn+nru/dQmojvt1k+R06Ba4lIkp9IDHJ5VWdBdyIFINaQgHe9u1B7PKcdQhGKWcg4sJTW6K90F0JTZChHDNkce5itjJb5yr8O89zqdb632zyIPe0df+TBW2qNtJQt+7585WbdQ2dOlTAnHsQSz002FRKZvcPR8/Qc/fK4lhzqXcgkRtdPoTN7kXOMGRXItT0fr4Zi1GSJvOeB9SzIa1APrT+tTPeDxfHZpd1itV1vgdSXkiUlzxzTS+hJfUoD2UoZphAnfXB5uXoUI8EF2hcXj820hev769o1gsGYtEa1tFPgATELWqPyeV2ZYIzyAl7J+Qo4F/a1N3LqV/OjrnJGpoZo0uI4Y1DW1jf3DRqEzWv7RRdVv5yG4Lnyh7agT/tf+tktBzkd0sPdHFLfP3ZBpI74T8AdJc1Tf2g4TN06i6ziXBnwpqSoypI3u7D/aPNAz/D6tI4YyGUT+cOzJ71ReWL1AerHHOeqeO7CeqEBneqw3DHPhYutpNg4VQ+NMwDTWTzmnjE/97qTUKzdmxox9WPjwyr8/58Bdi4dU5JylYkp9ubriWgYgJYJBF9Qw//H4tSwBgDEJRALURops49OS5z6RZtluLDJ0x9lA799/c34tDHsfWLhDLX8IklPe7Wtp/V4NO89nFMo7i9+6RC8gWUx0FyZIMGGOR/WjiMQ9paDOkxFdRTBSfaVVDA2Gsr0lxDsbwrR863VdxY6i6KQQBLJJV2nGQjU/Mjtwp7+AekN3fW3A/7Dexq8poXDXB3kGW19YXa47n+n9gMpu//ZPwFzWR62lY6J/Tm8pVlB305Smnkl6In+9yEVNsbk1wRrxY7077fU9sjDB6ntBtBpgd2hEdKrv+kraxOWGwjTjOhRX6IQXE17xq3LixEEvQkMM+Ye0BFpOg5jWMCwStz5yGye48bVSa3WvB19O1p7nRv6tXlp9IpT58bvHtjrXsWLLe4QSmL14mnfcL2GmS7BYK/vjDkt4lm8AN3zWxix275LeB7nitYSH3boqqh84JEUlRdUCSqMLxf5cfwC+0KEBfU01o0U2ddbRNFuQICKoT+p8MeYhwZi35FzW5c3BatsW/X09ZfOw2K/XY8NNZ7bW3hPd09j+DhJoFopL2Td1KTEJV199pnPzC1Mv7csySdSqxt52wPq1/vxEY94I+PF/p4w7nn2/maWKq4ij//uPUbPPtz7Iet8uu9+34heqvtT6XaMBcCQA5dmE6YdznFrpM1jhceli/E/VkZsWyo9dL+wWwvPYJeLud2MkvsCQBaTjuwjPqTReNJIMrJAKcvsIuCR1x45zt00mwAMdDhr0uwmz5o/E672l6mxa5uSvi7g6dVUyiyjl+Ki4M8PdC8vnIdK695dhKM/IU1YflL554i+KIFsmpa+vhg1dPxi4pPRf47NVb4nh/b+1BZZyXt8m1BEkHM6OzTEEb7jhtlIZMb1tOgRe12nWf0kp1iu7Y3Zjwtxxi9cscph6+Wpdek9k2NZe6t15LBAOMAA9bM02pYzOjsovPhIrf7cfs7Pa1Or4UaRtUAbKlhl5F/unfqvPMiBnAOil/djhSc4rS0c3Ji1evkgvKI4lyivNmGl70MPpN63Gk1Mix9dtf7pivhKe1Ib1LmcwTNoFNQS2XxhhNIA1gDKgwua/CzrXHScGUBOTb361NcszobHMitEj7TzDDB2266FC1hc0XliJvE0ltDflTsPLq32TMqeA0njyEngPyfkyRXqv39HpwJQZsRBHPrD0Fx2UhF7UTSH675ZD1i9ETygY3cFWcZM6IUJ+J3v5jc0jwzjp0Yr1DTOT4vezCVrqO3TJVoEswD42nl73LYLP03itFGb20YFwZ7zi3SiVmeqwt45dMeut02k0c0o0Lot9LMq64I1WzlSzuXGc45veEqE3SHDeM2WZ1kQRmnpGBpUi9bv+8NbQo7Th+8W2d63Fw42nFzatdTjhWEak2mQF8tkhmhwJYuzf2v33iN68SJPVkzcqiR3znKD1ZXD/ydzLbUdwLltd1Mfbc9w/P9S+4qyDsQ20e/3mfbvRAtCzNLQRm4cN4p2KGwDTxGdnkbSnUOI7uM1LiKXvqWXrOoKc+rxbDC09VyntHsFxIEmCUlRhHU/YTOyP74+KouFO1OF1LfmUzwkF/i1U4/8yTtIqbJKPRltRFFLn7Ld4PjOGFYGNAmd+EGG2P5pFEtTglQu9qPaQg8ZtHIFXQAukCgCpPde4xQoIzaxP+yPQxTA5riD/0FwJ4hED9uhk0W6/Wchrrgw82nl/xaCX8uKIUgLKoacHY+ZmBtbX4JSrV/vUalha6YBUOAH1tMAG7W4VAmCoWNQDLkBMzH49fMDlIO/b6jYig6JCXyhfTiyFGjymkPiyM3p5hvXg0mpQTJsYPtjTjqu1mbeYSWrYh80f90OJHOHOHJahZCL1EEuhUSUR9FiUXNaRpX89llNu8DXdA4xj7doINu8Q6kXN3lvp3fost3vHV7KMdYhtGIpvpx1pVimIu2Gm39hPpK/m6KMKVvhT91EOxJSgQ1TxNtzmt8WV+IfeiutIrRxznlCMrRB9aYamZ0sdMVm2pbCCBeLeArNOWnRQ8r44uYvXqV0MMHl6r8fCp/XFpGYVC6/gNOBclOa1pZkwbmU87FR0wh3DFIvsMqzO8g86q92AVgXKlCDBtZOfX+3SW0vXa/92dBx5L3PMRjFFkbhJRAXzIDOLgv3CZuOiQqD10pHQb7FoqtUS4xfsVCxKgAnW+72X+7PkgNFjPE8WgUgh8eX6W1gvY/UcjnbfPzAd5vjl6DB/TISaX1DFWUWFEkzvM3jer1BwAtKx0B2AOPYGL2DtxvhiW/TuwocAXO/UKtnTvGLWPJCWbwN0f5yTlkUIGNIo707TNY/KbbRWsvKVjYTm2CO/BAtV0XWnW15YA7T+B92yN5IUvGvXl94bN5x49vD5JKuS4yjdcrx+g6JyTxZL1NTFHTkOfIfWUseh69la1YBzdgi7a9WXyzxQrEVDzC1YWqh8rN39vtEbeIBDVEHgH56nsgYq/fauFgbD6u+q1RzO6zaA6D2RAxNGAePqVW0nDzqiZtPCGp8P/GPmID82P9wS/UHKxXbJxfAWsYCENQGbsfydLYzy8vhkTksn3XgNShDELREsxG2VjPi6AJZOwyV8xOO+EqHDmtt/jw/hCIg3XsVvgXPPsTybLbfbbzS0EZ/2+b9zj+1PA87FNYgYrlvvx/V3lMqQ8Hz+s8bnDiSUu2vIL00oMn81NaO1WxIIixPWxlo9WvX8dsw7aNR7kDgCsJppKHso1VBGmvmHqAhiana1+i3yYFETyE1vtPpc6J1QXLUwboWe5/R7cJkOisw6fCPiJBghYzyKL6zc9nahDl+l/xFNCfSJimbUCCP7wp+vDzeCuQ7S4VAPoD9S1dwJHZp3fng8+GCfP7vBIMn7GbdIQRpHv05T2a9+2kp84hZ1Nn6Tc18ueBdXfHcV0C9lPxtPc08HucFChZoyXjCIAsErejHgtEusvRrFk3HA7jXY6EZEL/S29ZFrZ6Km/CGs+fj3M8qkWzMJFb5HyWNCtfBCryU7wQnVm3bIYK3jqBPkkt9nF3sY+f1wTYtgvRA58uqvY1pf8TLanzsaDA3IEhQM12NiVlqFuNwizzh7/6bwIxnzOza9VAeILoQDrVZzVG0+IDA8jNTJ9fKJuwx99dq9p37ZhlqHJeZeMXo8yFEfdE2jZCaou76IAWa9H4dhts7MWKZZ74O0z/f7BoanEpX/aIq/EEKHvPDlKHLSXo145vg7QBkxFSvXmpf+lO/M09T9aPbfIgziu7rnKrRj+4d6kb1zorI6B0nJ8qhMc7+7M7zSh3XSAuQLtWWUSsLXGoSkGMWK3VgT3BOy3F02Gg/9wMw1p9wa6SwkrafkmrpfgN7L2GJbR72nAClVbtye8V8a4DPyQIu0EhmSgo1Oltrp4RVWpS0Xx/UqzodyprcKVDqpERN9RliKi608b1uKy1UyO8G54ZoWIoP3OTJzFh5aCU3ZceHeqFTMzja5JbLsh51q1IIq4MQFyaT1Hq9aojBzuMDlvwwJD6TKp6+rWlSfKUNWYVIQmBkGlgo+CFyfygBgmKKuzxTIxSJdsZf1+FqPFugGUHKZjm8ZP72tG55AIUZpcWdiQ/iE8lKqIKrajmMvGXyzTO3bjaQCZ3rMJaJaap54V9QPftcmAkl2lZfLmS9tbn5mBnkCIRY8tvSowaesopFhUnUOclWirztsmmtqu93W0fRf41ucwSLGiMtgStPNm3WNxtMSHLsMeq8jaFSHZ9kOvZJ6wuT7FEyLD8Yv+uzisUw68n3H5TQQsaL/tjUTwYIkkBML99VKpPdISLwCENHAOANUmcwqI0g+IMUjpy+Nn9Fx1Yr2b0mvqZSEdEm4lBwNgdeuPyhlGru8p5SvbNUDA6YP2MF/TB7xkwIeDIEzqYH5UKymipf76wlfWXxhDxYSjrdnuAGg30N6qzifM8DvBdcRryjmrU+CDMJtLhGuoKZVMBSscgJk9Y/l5ZctkwNwPmKJtRcd4lIq5g1qIu+sefQmeuUmleU0WG3YXalHaQqxdlY80WdMzsp0FtN2Q2UlDsLV1i6fhnTUre7pq0kcQ7hmtpU8VJUsxEMOngMNVuEibhaNZLMr8x11LZoeJ0dpEIvtywIwo4YvPktiRepoD8PLoi0IDzu7ubGEvms6twDJy3JnenAR24eKHclGnNwXEbn8uyxfgTABY3pz+GPQbaWgDyWTY++zP/jg3fRHy7Kxrh6TxvZsC2K0T071qArULYam2hKmhnOCoWJGXXxi9VPOadzx5lj43GN/7fYAFRFNDubI4Eh9vxm01VOZFEI0fHJzHHmuHl9bVjDr6rk/P8cb9c4JhW6vBtXLFJDy/GMplr8MaHAyknKnf2/1CFf6Jo1kW9+iFXItI6Dcw0u8hKZqJWt6QiY6riwjCKlNbBwDI6uYwtYdJTCRt5GE/PO/XBaI6fZHr2+NuiZDiFbkXMCWUwsVe3gDJeyZ66raXNpnzff0JBDH+dQnV5JpeTYqz7nQFDpUdkP9YAM6ZCby+tO3fZDHLobrKhJqsaj5tvBnDDiRXEsLzX6IK2djp9wKKH3vbjd5OZ5wxTRYFWmnCmAHmN8+2zO7mWQANUwBvDpxx44kS2x2d461wJgzA+hnt+VYujuO9J8ab1bz7g08J+XxtrdHMU2Q11sWGtb1ajdvRX7Ycf13NOJlfWdUBpxoN4kfMEmgC4l/4py7Xm9nnkuaWf2o9CJOVLNTWS/X/aOtXoph3sNY27ym0FqAug2/kj7jZJ28dOPYrD5RrnfdXjbU+pSi3VZyj8LJLzZCqYtRB1bOo1Sue/XF3F3pc2dVBq+FHZuod0Rivt3zsE98h99arUCUaYEBPvjmCZqeXtTGQiT0Yeh0iLEnGAfH0dUht9WKOViaxVrqsh+izP6oFdT0ouFvQjVQDFcl+mpeEcUdOpFoHg0JJy3c11gAvurWC8gzBPdtiSewge+BiFZA4AJUlAyZdkO7YFtBxiLmN4l6oTbCAJdv3OspEXBV8vYxoFEjJyMWACi5XM8QmQIoC3oqf+IkHD8SdUhWI1jcxhqk27jbLYY4yox5OIp8XavBwDYAr2Rb6Wc884TqFDh3qYjC3El2lk/AqyCRRnh7siTEuH3VB7Kaqyt8GQ/lzeN5SViIgrDCtM8hvbhCmFPpSH99dE1IS62QU3eflbvuA1SEeClfhqvC/i7YQgOFc7GRfmRyzsgTUAXLPcD8ND34Km5UzfowwTQMWAiu5h1CZ7aN6DhlIDy4iqkSoPlppfyXq5UWgl/baz8ATbywzL5mEAJ6JnGJ6xaCFwnFNkAnDzFnQZqIAPICL9OKyHzSsOEUrYHGHjQelWQEjGojkIZ8ji9sIB7w7xlMd3APfhNODKB51feEbINNvfm7b9oUONTI1dybZxzm9n2kmJgvcw5sF8kJhN3kemSjhZibMxV27jV75hATdrH15J6CroCWB+DOkVH+EOiCdyb6yMTbufK9guzqSbeuJK4hLOmnKIwcTQspZUClg2K7Mf0JtGTeQ/HqZpC7PNYxCzeU0mt5tbrlti1J0MdOQZ33QVJf/n7PbOsAbCO2d06CNQbtAyAdSQrNMXC0NWpnPmSCRoUFFlRJaeZ+Z4SOR6gQAqo/U4DoE5Sbb3AZx4vgZhyrFy6PbzhlkTxWCgrhcDezEZKldMgzVOrPSAsbAHowadGZDEuniZpVvfnPdGL+KZ00NGg1Vs1N40WVs1va07fSuDovh6mAjuCGmXjqCIULnVPsStWPWUq456n6IMmHXOn9vTIb0AV+ERrADpOHYglvFGNj3JJ8hVKSynUPqAclHrQNnkCyX6WtXTJ/GdiBA2HcX4/UA3GpNF70urARZWnYBv1wuaAUqU54MFwvl3KsEPVH8rq9rFPKR0dqm3aLUbZSRhkCUxKCYBicPVYuqQo0V93Aoqo+mkUJzRgqj6RqIVWw+n2kXts59IRMd/wVOYTaEhD1DnfGOmTGNus1E5edrHH/Y+UaerZUTEuEgoFEyTSAAD3IAwNUZ/nm/tKwfIr/2bG1XjYK1a4YhFg+BbjYpXxfvEHngADkXfSAeOQXULQGVY8O4nRqnxFYPZHtdm0DBPlLu/H96SoJ2wT05u1ye8xkVRGQmnwLzNiUdb7UC7sc0oQO1No54IgN2tFG0ZMmOoYlhgmV8+xFl0cL6eCq1lcSntZAd6Q+kZk0ls0fVD08fDVu8Kzem7zfET94w8YcJK41b5/DKVDevEFJPsliIBqUMj+mpnH5Ht6ccyltm8CnB/ZJWECv5StR6y2FqniG7V/26IMzRPd0+UMruS+naD0z7DCdStVfdu+wN7YKxb7YCtilZrWSNJKZG9fjkNx77fRbomr0j7W4w6Z/IVl9Icc8IPfApB+OF2PG66NK731jLUGYWb9HgEazE6l8b5tzCqZ7Z2heyMdgOE8V5pvT99gHP8y++9t0IoYnMJASKHDGM13KGwG8dhLjno6k4A1mXpfQO+N+1oNP1wCZqTLpJ61+jy5jCJb8sGP3NPC5dp2Wc09GKpX/WBq1CWj8906tTk+lB9ytk+A5ZHFhabqGin1lQRN4wmxNEd1CSuiy0k+hg5RORQJF4f8CMXsXxR3E1Dm6F+40ajj8hkCx2ARwO9rw1rnp/kspFw9Y6H71m8FsW9fbNsYt3bCM/g9P+cvNwcSHdwwa3yCAz3t9lUag/6sKdbcBqaqLy9BExuvW8eOcyv7uKMJFlKycAGdjCNCC0h1+mcJqbaf5lrIHJEhTOR5+scW2FzN9kZQZaMsgAbpmEiYy6pej/RnhPesKTP61hCKcR5ERR2f0xWT/JbZev3QBAZ7Z4DjWzlvxIVMVvqTS71FWaobdBnVmW+ZeFXiUUYJ+wJlf2hEGySkL6qtk0yNG8CL/AC9704eCnBepEB9scj9OrJX3kfdaChUHK2UV7F2dOeQuB9I5i9vANRw457YlljMHIeJaDbWe+TiaJ26riL3f1329f3Q2FucOurSIWWQ2jCJ52j6ZSSn/+sYAtocRfTp50EQ8tDUZjFOrVF8OEPWv5xrPf6G4kFNhxzFco+09JikmOpFjTjKWh27NQZiGqlrf5jvkkN+2szHUX8DgE3XbY7OTf5ldJP3zFOGogsH4rsJSstLjxZnSazmsMNQQsm0sjinT+eaNm7PG0j0NSNlGeQ4qPjasFM8y+RnBwGKcbSiNFr2PzsE6I8fFdYJ4IWnjWotZtBZtDqukcucDohIqXMoWhJF4eJcU6Ff9iDCw176pIzLKfh+WyJr7fZm5/tJvyC6nSPyxBT+dgdgUMOnMaz/fH7IZqehJvh2a2T6ZEhnNrqFRny3DkgMal0Z7sGS3Jw58rf1Tf1Uhsk31rItwgsotYpCHuucOO3f4TxC9gMEg9X6GM0AxUBhUa3l+hCXvXDSCSNTOiHxnUH2/MN+rNIWygUiPlmORqhYZ0tvGhJavnaPJTCCxggvqEsul7zhE/JVNAn9C7IVRwkvI/PFAYY7lEAGxpdeDQ+EHWlrM/glBLgb8+VTQmsDrkDsGcKUDFHUpOxbqlg3kJ6ej+y234ABf4gpjGJTr/NtpjBhmC3MarGDlAxpakIsaeoPBZiATv/rhJY6gyIneE80q0E0D3gXlbtZKVcXaYS9rQgRU8B5HIlYFqUfQsbm3oeAkUDBE++iIe0zqrQEPhCA86AsBvWFdEMgzgV0nBnV0bARuDOZhbZa59eN0Ar7ZzsrpNoV8gd9ZJlv5TwyuSu6DMJxAu8nZno/XBFGEm2e+MWiJZYFYfmg4XE/5rMzFLbZ9XiIYp92cBmdYmkwDJN8Pq+TU3T00JmGEbcduvzw+P/a4tY8VM65gdFAIpPNMcLoq6HbY+03j2qA+r+psSEyIUWU3Hv/We8dR3+seisFnkWi0cfgp1NXhh7Aa3QLpIz0wjlGSqdxQIRMioFv7uduNcltFYnu0HLS4MQTTgg2qXkRoc/PQZ5PaZYXQiJlS2H/1EaLUD4oPVGPNTex/ED6/k32yHB+SB6Dwdj80C+uhfT60+lI5NXc8moC9WB7oR5LAfcZRIi1cxTimeIpdJ98kJQF0PjHQhAQ5clWTFamAOqVG8wzCu7RadNvQqM1Mu5rTRqsSgMwVJJnx6RWra+kuT3YIIsALStrOFb9MFInjnh+ZOQGyi8Y7979auPp/EF+x0KKmAaIByCjiQePNoeo4IvljmG6Th6MrmVjtiBgC7RyKnHCNcLKw7x5UeLzcZDhSGcE8NhqXgCfC8DvAZchyih6JxiQLAHp7plvSyAdNQkcJhIm3PLAiHLiqDOuGLpbPaHIGzJfN2k7zgfWBo2R1fX6FHEQSDebBhhMqNVbH8/atmoReisrOgCuVeLgc4ZLesQ5obNElBQbQFBQRpYTFADoNRmwgMF4zGesJb+Skf5bqYg6KOomQZcNLWbnNBpFtrrdwwJKf4tC8133rLcwPbmheDZHfjnJIOz96sr8FKcIR35n5yA++nosoJR2U77fRxwfKlSEtiUxgzh/rhVEk813AY57CS4w/5l4iBxyUQFpWP+ILPgWOHpMiSWTZ5M6rg3WuWIKqG2GBAFIAa81WmDiCRd6g2P/NAAaPEySnz2AffbGZ/PuMlKx+CYQDs/iV3US5w73T8PFVWLcMMWjBY12DM/L2GaGGdxNQXVLmMEhVKi5oyW3eHF1ZzjMlozYk6g7Jk2TEAP5h72HUe+/H4cP+sKY8IJJL2pQT7T/kmIA5UoLZraDBPXY8oFEnRTy01TbC0PYGV++2L0oceQypwwEquHXJSUNPuU+KeChw3qQUIwmbCTULskc+m1FtHQDJxC7Rw5l/Jf/cirjF7/nAHAr91yKyD6ECzge6PiL3fd0aMW+UF0fdMxqd5h5Xyauxv7+rKpEq8oQKlQyouG6u5XKaGg66ZRUgnokQtJKJm8G2/aDkg23ZBXSwV70MAONVIExLPZGWV/d1TW4OatRa4FjL7/F9+2L7GH+N/4NusigrwXcoEqYqCVSTLlxi6LBtvew+9YrLNxfo773YTuhCh1eSGemgpjQVEGN6mq8SvDpffNaNuQHRIMA7oAPuTO/b0v6RgHy6AEG3ZQ2uyF3F/f7B97cPwNLZyFNoOVovg1sUQuM9/uJ2HWiYJsKc6vAyJgo50PFK41+5MXKQYrNCATVspR+lMxyOI6coxpqbLaoRVF4deS3rVy7bTxVxUm7qriOr2jiExdDj3/htp0zKpaQEeTZrIWtJ6p3QBihnzvMMLRbWSHr5CpDNUDeiFJ9kXeSJ7lEo/2R3XBlxSBzv5SoSTKlFAH2MWNofhf4L5qwD+rGgp2FI7/SquPiw2+x9fi8ofZeKbbKjnXuNLejn6mlDlDb4L1VKIea5lxExFFlj2Fo1b4Huozuk1mTiQ9WEYKTNYoE8A+qXFekEXF0Ho300UnSta4RBoO1swiEekYYNJf689Z4eruKWefoYM5mc2OIpqYb1shI+Eb5b82V4h6iDGI+JFb3XooGueQA5Mk9wrjKwSD+k0KbF7aA5L/wejFYxcMvZ3DH1urC+xog3W/1/2oyySIrT6iPRqFMFRtbwhgVc8rAUVkvgQUC6e26yaroEXGhIS5/edUT17dmc2sTePHCnsxLlhfx7KHzu7VXq0zH02j6PVqk5OW172tQJ72Lg4BDXZeKr8mlDAgLIKoGw+RdarEVEYMUqcASNY0vZsJmnXeazGFbJuXSkjEsEf+B5lHhYopRgSFYVD7l2/rmh+sLB+GxSXG8tBobHAjncV5gjGn6o6l4dBe6/85SkRIBBKRQtmCi/kHgh+uzVQczrsAMjd5OVdq2E3r6+cbfA88Oyqp8Q0Qv0Cq9nQptRq4xmfUoy1zr88LmKmH0HFUWdV+HL0aby3yD6BHAanRufB2bz0puq+G56TtfHBiWIVdt/Ggs1oQrLFV5pVJIIheyapbxVMeL6cHg7fGHR7bYJDfaKdZHVuEWasDvkFRR7KY1g4RXDzDOg57exUYPVTnRjk6DvmG3L4Y+ory30leorypJmM4Wf6EUAB7wWOX34s1VcCtB6L6UuDzRSD9hLAWUFdBMUzZywBu3jEuHqVyVXBaov6qr2vfYRN8Xdk91XrcUnOlRqCi6tSA7HLqrAG8izlmvOsogVF8i2kaSTJDAnuo8rVTq8G4K/ZjxwAkYmtw/eYBtI7WjJYzq6921FWhIhV7TUmuOxmgezAAkpGPAWfFofuSTQMgCx/1m2GUaU+WSlbPwP+fLJiVeVrwLaUpzTJWeeekRBvK7JIc5T854+ZEQQP8pr2I1VVkqPHHKX/lDHSD1MCeoWIpoj1gnTqFYwFk6OR85WMSqvGK1uT6ppX7rxo6eZHb2gspPWQ+kIfNGPSnDGNdmC2wYJ8oyhVzNaNOCx1RUxpTteGoGnC50456n3aC7xs+ugeGJpLR5QaofOCf2qjAKzmZYnDnvF/1WWW0nKZMFo1Lf3MT+PeO8zirLRZMzOyu8/VPQ7WYzpzEUrLYHmUvPFBkmrIaHkIQxxR4xJ1oOahd5jLZ9kOoHThbs5z66lR7WUp1ocp8cpPculdPKkRdYgrMRRqaaIVCDp4Cw+JbjbjaEj8yIQEIcjKHN0Tp2muBYroVGXXji14U5Zt8FTzbkqHMp4byJRc0FcF2L+rjRslgumUaNi1PMZ7xVJi3c8IhbyTT2sS9X1NdtwuPjX3EcXeiJhrIZLW3yN6NhyYhVsOch4AuRG6yJMjZlHW46PULXjuPtgYnsjAK5wMzlIU7CIapAZuNGaCWbXgseFqngcRjFa6ZbHnHR4pMgVVyjheGcYeqZ7lv+yjVhKusjsYgGsfEg91ioNKbsFNQCJ7/Pw06iSqz92tvwwxUyr2fECoqDSLUmJgUV/TSeWw00hlsD5hD73UzkL3ACWJ0tsKT0QnhP8WgCmUGVbAUK9wvhN9smcoZwEbCGCkHQzor941LOpfkJdM32c3EuzozmR/lHP4v/MfcO/2lSbN+Vfe0xUMN9JcU0BO32/PCOJ5C2mYgsKKqawVF2UMFgPp8fn6GzMTOtyzIhWeXcJUMXVBLpFaJq6lEI9cYltaBcMtjtgQsO/26ZZOjLdPVjhLYDxvp8YYFofLgAkjmbQhsQcDa38qBcSli22uYA0iTlg+4Pws5FB2vKDFgK3r4Bv2YpwaBwQ5wIk3TxH5JhMw9SPqUAXGpjQ9GG6hC4eGTGR/3Woh4Xwkas4DiLhdHMEQEtUuZo5e4USnZj1k6dFsu8X2cRtbX2aK7Wo7BXpvCN5YdLFAIykmyBw0YiRus7lUx6lR/mafZ1ekJal9iThy7Q0H1SdCIJqthItA4aedoB45I2UJ4NpV2YGOECTc8Iz9CcYZ8g4H62rryPso2tKbEfAxkIZ27Lno2U9jcONseDH+vSz6Y26JbBsIwyYL8KVSg/OefVfOQJVqgWcTyd3su2ZG1quF1SpdWE+eNlMKaN9b9SVQJidb1OS7TSH82J9mf/GNn92SxUnLEkdFJRRPwwGdzRgBa+V4tw7rqmVWXWJdUnyj8vgxkgJ0Xa0Y/jMB72C2aF3LveEPOJpIPQn3bMgqwBGc3CslNoSDEdqgt8n3Y+4ACfZEnZDTrOBEB+8cadmvk8Ci6xW4ek/KrOMHIaQIWyNVMyx7m7RSbIYuokoTetUAtcUpWnTMrNFLntX6FAXlBvJhPls8gi5DgKtmMC5rgECl0X4tyjhC7U9FVkogMpBH1/pEcd+l334uTDgqAGzK13yVFn0gHaXbrGWU+0Shi2K/kx7sTmXEzNjg0usmC9Kvj0nSWuqf+E4HBunQ8wIF0OW/gE9glOykYo3rfStrcYRlcfSs5FRpUap9CcIiCikzNLd4k4LOR69veGmSOds+ZFNz4ShbftUfnw8wvM27bPzeV6H8zE+pIqO1Gz8mzFcqhw6DANr8VL6Lh67tI8lAPMlmNOnI5lOpCUYXpvI/FarqxN2bHMsQdgG6/JjL1Py+D7js6M5WdrrkZ2ovqIHEQvqUlpa6XLumFpayUgXScAr+V5jFa7L4vzEitaOTIO8QR5lKyzNrATn9AsmkC0bRKP1j5YB7a9SP66YtWJL4dbDrdsL+PF57kAZooIyheTMhwOcMBayIGj+bsaNOW87s0DZlzqrslkFa2c7fPaAMtV3ncWpztjTzi97c8Odfa12wtx3UyzMicoZiUxt7DF5tD7bxkfLoyKfdCapQNk4EzvbN0FVO0JGePRaN5/dODIBVJmGhN8qHDlDBRfG2mXefC4eahBFojRskKPUpXa1ArYqHIdaHN5QO4KQ4BDzQwGVk0KmDKAMAYQsTDclQTjfyTIAHhIDWog8s5SUVLHHY0Wo4AzqwTpgyHxABhQP1QAvoNG2+BFjhDhAMxGoXRg9/1WpwEgjvJfjMPYC9gyA9cXzGD1XGtPA0AnONL9jhWI5VlnHYsGdTN2Feq5HXXWZYhQsCslwhLAVDhVU5bdUMXjFUnNjeOpGB530QdqbdDaj6UlPExmeBQkc40IPwlwkg5SKz4HH4qyc8b2nF0qyXuSn5SKVqPxWFFJfkKEqkurmKBsTI2woYiISrv3SGZL4+MU8mZvI6LjzzfBvtjuYXQ67SdRSyU8RnrHS01sKyR2fITg1knC+II82444iVk9UeGDxiTJz1XAfCh8bG0Hw9vcmMJi2MPVs1jq6LqdLPocnn06PYd19D65mB2a7LhTxN6V6eMZwKFoyQm0UY3wXijyjoifO/BlIKxK6GiFqjpVeEfAKAeR/WwkoaZH4ZzeO0SUMEtcxM5gswrFAOIIh9CVDlRaAoaHqWTZLt7g9j5pa6v2w8MfYMUMIAk3v4jSATueDk9U3MLdUH0/qjh1ywHEOLOUohk+FuS9js5qHTsIyRcsODsq7X8kovdbHWzgbBOftCoVdMkxnZN1uied4oK7Brc60QzHQuMlIeq2eazCgCDmSTcx8NGdVO+0+7T1jxQbMkWp5CNjT2PqgaQ0JfQzgeG24P7p/asg0Lp8anDZYjPJ88ddRxe7ExgNs7YI3B34Fhat+fdW2KHjB7SaW81dKXZAhRs3rOaCAlc2jJvuKnTBETKpGW67xwbbnLt09ipyNfzAYlsJ6yGQNnnHgHpvtfx2J7rAaqi/2uMc5XRptsyNFJOhgQb5VebV/SD7io2MejwNLCJRQGBgmc1vNHVAdcBtL6Du13XggvEgZ34I9veqmrgVYWg09zw2hlHuIKbSeGxIZ7Fwz6qjmsx2BiwVJ9rJiopl7cfnE6iFIUBY0dKR6WVaTxUB8QOaLbIu2GINk27++FwOtgVap0bMzCVI8KJK7eTkTBmwL0Jfeby1y1vrpfKF2UeqI0S7ocPrHO4m3kWgtu/YFGYnGIdoOjicp52CNi7P7EzZMjMmG3bjynaGg7xz4MrxKZlQAm5GJRxUlHqE9LFsNQkCByxqxGEG+j2y+aHBnyAI8qQDw4uBJrm4aCWQ33C5no5vsfgzdiYCCsoR7gLwHScxgLAmPxOTJlDSQail9rcC+0n14FIdo0qrSmoyPNBOox7Wv+zIS7qL6DNn9dz5e7Hjn3bjchqBH/sKnNy7dg/WKy40/rrTKywLwjbftwovOqUgClosgqFpHeCAOQlillefGI+/Sf6XUi2CH+ynjHFUf+8ik9q0O93ebMcdkQ9HsU7NEOQ+9xFhvzPRM9E90fvwHPhH2IiTk2BvOvH2ys/qW9z6fwTy06bwMJitnR8HXp3V4pJ2GcbDzmRWuT6J/sgHV98j4v8ATmQ2sLrhCR15j+YCfLhaJIU7YkyRrJn6ZcGF8aZ3oCXTG+IeJiIzCyjFiHOZrDkVLOoc/BiLdUUpskucvq5Fzmlv6qkS6I3HhL6vryG6XViEfsyvqsxA+Mq208JOGGbbk09+0OkFR/YvAeCpChuIC95zYVW+ExMRJLF2Ix0U2W6A2Lun5+Rnf/PMxl82gO8r/y2EyvTXpHLefzU/7wYbCuogUYtisx9L7PoDVapgg/emvB7EOXwXrI2U67GzXF/I27qKEkCF7mCDMsKGap9Rwwxh12yrR1XGlexnIlsHSPYXyOp7jokuht6TNDnijSUVgZykbs4IluMUUnWd7vQlkf3yBCqgTP30Q8cEVQ58PuubMGPjIjaDW23AR4xFs0WiAGByugzWDXx+VTxRIdm5f1B2XEmPUPD0lll6BWeN/4NGWRPZouiP1KBC+oW+a7reSgAqRL9MWWV436LOQh67IXPTTYsSHq1uljwXMkFIB1fUaX5ym0Kc1YUfOtUaCUr6gbvIBcqduJicG89qt1Lm1pzdC5Vl7TAWUAlSOdxtuIAQf5gD+BMm6MES83MeAB8Bl8z6yo1U4vd84IxJaZTXqWTv+aYN9lrBxjyklm0PwML/ulXg7Zv0WWvVwJN9WzqxagM6Kk12OTA+OYJIrXOHYtxOklzBtrqq1AoH4qvokdysJ60/+v/zAMmJGLqWuFn3wgB2G9V/Uh/m32M3XT9Qf7vwx8nZiyJ+WNqcsi8VbsotHVSENJC1DaY4XgL2U8ddj+8H2PGq9v319qaup+9XmUHbblm0paZJ82T+AsJhY4fwjpUtmTmUouTJFm/kl/il2ht9wIFCI7z6EHNX3Gia5/BQK0yRimbJujfZeUDzQusaqDMggRTo5DKIjsZDh3HqK8K5eHwCMK2ee1FdxNnbZxLjbT3/FVj5suDMPhoLGSg+PaeRqmAn6ifao66xcxTxUQG9nCAvmuFTxcL+2dNBwJ6yaBUZPMy0tePe9scNtOIRrj6RquPqJ7W5v+1U76/yQkEF7teG4cDGOj5sWbOdq4OHWlfX2kr+q8dq6T9GquFSFbZbzBBvmArbfp+gn5l6T7Ai/9bOAITxxhn8b1jTQPgdFtvLbKcIhLuIUvkt7pHNFZNLlmrI1j//4iP0TYSomqi/PZ4EIXlvLa99PTKWZ+FkhPFup80IFmpoEybwX0AEfTYho5gmbmIt40QOkxA8fJD+tVl13N4O98sgaH3eZInMJMmI5U+UJ8b0/z5Zo5gtnGpHdl9SQK1xKg5CpBISxYgbnC+02vb4D2VRICQ+rV2l56BFRWQl2jNqYZG/xAH2RYPQmp3F6sM2OO1fnwISvKa1DEhrVfH82JyhEFfAkjLuHVWFjmWba6O7EewTCA35G1Lk+QEsTUmk7hO/9IsYhVSmV9Ri+JwmhAuNVWqaq0YRe+4RoXN9iEuHs0jCWpmm6IM4EO/Mo3So5iM6uGxTDds5WLEEfa76zFyEcr6Iqx4mV9VVO+h568MkU9CXoOLE8YnhF30GY0sdKCoczpvQxCsKTgUQ6qPx8EgWNJIZbFxXizVNcVTTKbqovZFfW0FvdLmniEVM4/5/QrpYXAFbVCEEu0J0pfCGk1vK4jHal8pCM82+shClbWhRbP4ziOiGl66/I4jV3uJJEeu6IK/Df9ygqOtovnmMaSaICNfWeKMgEiKtYKJZ2WZZQZgQVYEdObRP9sEmz1UVBt48Wqv6AJYHqDIvJYk8v1OEXhvJlKo2i+ZfT71l+S4TiDJLNhydJURrLQQlwHNZMKakMwxVi24V61JyvW0p+037zm2yCCPGqJU8NK6NFAKy+enGJpLDC4DHCWAMEEBiApYIRmtgbc7cK8t0LZP10wjlQRqlZrvj+NMJMSUHMwu41YQUAVUX+H4KGj9ZLutUKP9yWk5PIlkc8nRQrOt3jrX5zi6KDcVEv32++o6D0QQwCEsn68NEum5DvwR8kvgHXTlcZdDCkBCwWRPZA5PdXnDG1Y6dT98lu+O+Z4NejVSMWhI54GOCZT7vw3EBjKXl8Q2p7w6g7SX8ZnDMrp8IzRDcQGNxGkzP14FRvxVJnDamGL0a1sEIFsdieRLPQU++q7RwICGpdvYG/fEDWDmeCbCSJGjmmtis6Ma409c+kJGwiCKOLsL12hOX6b3EaU9Z6C32lk8GdFj2YjQuJVKrk3Uam+HDBVous5xZJYhciFGWG/R10+oxfEHerfWDLGFXg2TfPQl9DhYbzpvnyjl4nWxiBMpipIyJackA5h8VPqkiuEJZf0woD/qeFnJ7k6DGDJAhcNwIsy2SSiDOsrHJya8HOZJIYVFNpY15i4yiNMxvqLnFE1ppEEJPAoFfhPnTpmS15GYqqf4Yq47WHhRB3Yi+wfpBTCexINpsDWc9Vwj4E4VN1y3UVz7s9cvrWfSVepMo+hgj/UDHVLTw1qPcE+OUU+1IvUWMNl5bZUE2xGtyLl8ZWxE9hQC8ssihqH0uwUFC7/vTzqBkbfjx6fYrpdfn14cfj3SnnpubC3bNQXsJeot4YUO9urxJdrfQ/CrMaA8Zd+e97v8W6y/DRQlY4FOh3OHumblV29Hm+IZ7pZV7GeXh6fO10N0kIh9e95w/E/9kYKQKRHlCPNvqaBXFTJ3c4TcVyh2EjwTHxmABGNDfkEjrU9lpSUHUYiJP2Nt6fNKvG3X7ppsODhgcQfRW1TmQigS0EgYb+iIG6z/NPL4COclYWIDVRXDFEWpgaYECwggrpC2KgnAdaslISl5KLZa+vdp73X+OV7OFqM+pjueu9XG7fIyh3/XSPidzk1L3r44R6NK7wcJ+XJdmYfr1kvLLQSdNC8XvK79vgAU40yCLy1IFyY9v4qgETv0qlP61A6vIs5yY1ahNFp2wfDFwAlLxntFWt6qCD+RRnNO/fGHnSN32HfVSr4o1Z1dTID4oz+7r5XpgOUYB2T4oWHFUxfZYxc11uRCORyixMI7vKR/UyTM0AIglNvYAzQKb+HQW76Z2yYPnMd4kCowCuxjpQHcfpnmL52IAx95ytVEv5//LlV9OjYMtvXmFOOCmBFisc9xRdAulCODb8T0/z3JgqnnqtHwAaU/7bD0eKoBuQzei1OyXfB81j+4wOi/egyoHoRunYwD6A3jnVaFBOfo0Ds3yph7JwHVP9/bwku0xxwqsXZgRWNogv6r5vKOdS916kmgc6LDQ+mBYuTKuQxAwyHtQz6SAGTtwIk2Qc/tz+qBUxI9Jr/taZPYR4yxNmXGy6YXU2XLh5+68Uw7o0rhKjxfD4V1ROLxL2lC+MbRTCXZ1dEoLiSzllw+ghs2HBSVthh8hNXeCc+3ZEnvuTrtPf5ufwdR+AXnzq3UeOyy03jhcHKsmzWGiP2rONY0VgUNaVEvG/N0bhIvv1bgPiKVQO3Ls0usuYCOtB1WUSsAchHQQTk2I7UoYsuGploBQeKIWmhXG1WJFMc24fONjOn85KxjFlLh80dgtBhv0QiK56iDnJyCdnlcSYGb6UWJImqbQWuGO1W2Z4XZSAkLRtd83wZvfpKYBGUJ3AGJ7spEbwPO2sFnjMqlUhHp9FZMPic7lgJ72/sWbOATLXUb8wVWYJw4XZV5M1DbskjvUdu+qIluO/qdsk+TrbF16zc69gWWf6/hABsERZndhgw6eACxIGTycQS7a9Ew5jOAHGHzQYcuWj+8u9/cjMfqhf46hisR2xqoeLO1CZV1VY+LDSaLojJc5yXwVbvMYMcA8CIscca+CYTmvvXyFvrTX6u7iLjD5VUClfgq8Al8ubHV3ceePWyhiIW2UquAPImGK22ZmHbe7h/iWMHo46hLC2JrXh9kDCH5BRBwS74y8tycMd+zvCVMci16R3kKfF96zzx+9vAIcJiVCPKBCDr7Uc3eDqwHkxgagAz33NAC6hgyCvmjuwJAV8ztii3O5AYZfX/JZoisZ/qF4td8ub+R2zI0kbdIS1GvejepoScGs7V5P1RD1ZJU0JERoi/nrweld1YfaAP8IF/Up3y/v5eGbt9Se/PHuTYOPnthgU5xd46ejr1PYWrLO4VSelbBjVeQxB5vyh9zn8FKO5Gi+0OhDyeSbC3fdsFGPo+ywqW3Ww4kDv3VCom3Y18plV11sZsu0dPuGswyoDQF4nKFm0Cy53tv2+ndXcb/JZ9CINPy04x+uyeGuB+2lVP8OJFsg8h4FRKvYHYHl0hpYD0VFegsd3nYNL7Ulzrc5m8kPrkhVTUE5C/8yQXTuZWBICE6Fbp8g6r4iR0yuB6K9zr5vrwReYOoCaVLWTp86KG4aWOFEdo7hO93sCIfJla7vrIC8wBQRrd5mwFag47us79GwAgrPfTwdmMNFeUfQeH5So1Vgk0M5DAsGoSk0FLhsJ/XF0lcX7447xSN5+Pn00s4PBD/Sl2pbFznqL0Y166wybWbKy1+s7zs1I6+oRvTf0tBxpWZzkn4cGLNezhTnGLJnJ2iogZ1qHA7e3uTf2sMlWwfHh784XJRXsu/jMfEx7tx7ViCeU3GzrjL0AFazslaqRo/Qatkb8IHiPfHu47Ad3wiqvI494lke8TAH0lWkfC9ytdV6PfpnVJJ6ktD9JLsH845XQGX24sUmXyj6gSFc9kwikQ6V+vhfr949YvKgdEKCZZTWAzIjLGZNToY3lnTZJWzmV32SYlP82haTbsU5xSZF1nac+RCmvTwP3qDb6hGOOQrFaQ7cBmFm7FDnGFl2ACmLX0j6QSfWD47WsG0KQubHAt9JvrsJKDag+gPRsQpFYq4QucRAA6mP95Sf9RfTqXA7VrSeBg/cfzEfd/weIl45yeqmVjNVUAY+ENiUyhpbEppm9YbVF6ljKQkSbKOUfdxPCqR0vwG5amMMN9XscvyKb3LRSxE8VN+kjmH62/s/GplOfxCVmpRhFDemyqTuJtkvmhDZmr2QjIV8W8sX/Ci1Jelsr6j9RX6JEihAxROfuG9zm7jgY0YkajA8ANj48JkdZ4QQ/EV//JcdmlsgWCF0fHFU1eHuGSGTw8fxzubYySuRo637fJmpId6imVh4Dul0Xxkw+XRWo5FNLzpbw7TipeuS/iV/iVqzcUJrKcVNHK10tufaJ9do5m5+RvRWfUR0fok5Hha50OBURRedWObHT6qw1BjqnJQIlYu5MhvFQeAY23jMIx4HSzzmgOOgxjWr3ilj8ODrS9D7g6HxgnvJ2hGBteRTbH/7sVYpKnx1EcA+DmwJfe8zzyvlPI8fOLhMvM7fykrCAXXCATmd5cr5zymxK9t3zm0T2LopDGkPI71130tCDoAe018dbCUzpV8m290WI67TwnrfpaBGFUwwFAkyT7H3xG7WEQobVs/lMsbMzz3aoukkFOgemQIVKTqGGOba7EF6fjEHwQoTOU6PvYNc4vxw6lLcdweccmHD/EKxIiPKj8J06UwybFTQ1ltvqx2CqMj06uxuW82a8ViKUfJB31csKMOCq2SjDJ/Z5EHsLs+2bN+k5+pMvn7FedIwOAYoJzXV+/7U/NSwlchc1RiNREtHNOOF3D8uyk+wVKTpvM36vOrq0PUlv/SRmbcy5KIY3/drDL5JUJWvn33LVXbL40mFjIwivr2FaKHDlZFY1apOb+GIMfjmt7tZCoiOCjufSx9uZU/zIbDfe/LO6lLu9d0judEFDsooN2jb0437G6WHd0tCy1hwvnMStPzeWtaHxSCIvgjT40S3/BML47tivCg3anAOFE5WakeID9iCgrGBBlTksuMSm6LTp4icidpU4ZBpnhqYrVzIsLUzua0lBUzzExgDImsy0qKF2oiUuw6MbcOwWnKb+tZh/uKWjqga6EJv59C1DcO04Dauf2MK+lscYbwn1FTqyqDbMAiUqtBChYe7hT2iLwmt3s5hAKwk5OWOy+hvQV1F9/SW8Kejk9+MxQTorcuH3gXI1lmFZJx8Ac4X0u6F6QMhXqnEQekVviAWK3wBaykqAEEdw1SuugAdYuCEHJRqYxbVZPNUE9g8IRekR8z0mlySHqmTSOOwt21ex8D38HBgvH5l84zv2aLnhNY7st55Ch10borHIJZOuuYg1gTnQCPUsUlMQq004Qu2owdInYCvrtnh2GvUJ6zZeDJV9igdXCVh3Bp5A9QbaL1Gnutdgh0VY7S4G1B7EjNyycpOdGqGmbbNPeGVsmxcS8kq1q6BxWukRwBTFiWg+hjgyjX+mB4BTOmTHBummeG6JBWKaMQJHP9xdJQtzLPSMIK2eoFRsxKAH4N+eyT5skyuIMt8AQdbXOcgrA9xugiqLyi8VMlH3ItsZa0rArKdLHi7lEO0g5cq6x7cdiIx+ComcliJA3E4iSzreVhxFtloGDYchPqFVJ3UbXlH8vV3zIJujcFiX7Otw5RWJMMTh9f4+CVbuVWHxIye1lqoqR6muCK0bglwMPhJW03aB6XRNC9Caj961DJt2syzZbIj+RP9+yTX2jsneeA1B7r/UFFd0Nq4qMOiP2QF+t/b+VJWyoZRZV0d8OfiCI/bEMgcgIZAx7G81nq3kt/V53NoO8BhdwVEqLbL92pyforF3ahaX5bh3pv2dFgf25ypJ0dWQKMsM0sfCLq/U13ER21xsdBcLzhtPaBs9P+QNJjfscNTJ8gDo2qQwzbUbLhmwza+cjXQCUlrGIsVII60OtOmbsq1YXrxBFJrotDiJbDJMKBivZFTXHHN+YeL2HSzffjnMccpHJT4whVizD9hIbwagSPzxT4Nyn/IHUMSUQ/sCoo0ieaMNcOH0ulIm5f7eBTgFoG5C3PMgIw7hhy5dkL1n7uBgyRkcW2sBBfcx2z4UeJE/Za+zhz3EiRIrLkID+4hTSHSQYFuHVyDYg3HOjCNjNOI4wzhPdijRkGtFNkoPWcLgqUANyM2OA2Pbjt5co05nA0ATReWW1IC085Dj6+L7i9xzxeUP1yVbhKQhBAn6bOFuHmOXe8cKev+jDY9Bo7byXfHiKwdhC1QXoQ6LqiFjV87Ic/3CljDWoEteGuzPC/6AmbIbQ7KK7ynejfyTokUJjeVKNAL6Uy14lXQKJop7tYdySAu7wML0EdWA7fzGP5mic5TNFTjmrsAGTaOVadL74fdFB1TCUh2y/To5BTJQzuWTvTdFKhJtmCZVhBlpUOjQGs1fZCw4IWBGhmlvKWsUL7yD5wkp9h/clGdYN592+M97VoiZ+H1YOE62Vy7ZEhFM4BJrZjDqjgje29swXPd2VDlejd3CUeCpmNdi8wQNVNcFxjD64ofaTzZVPRh82yyBi53cS+4NLJq7OGpU4ZUixVBzIzAj7VsS+b5cZOn98ftPC71c+Kx9pUqzp/3OMaain4tFxcv+/33qM19LPkMfv/OTBDDO/uDAH9ARZpeJKwReUBxwPYXx3ofbR5NGkAFt976AKs9Wbiy9uRSMnjyEbK2Zynapfke4GVV5RcFsh0Odg8qLv2xXV385xV9Qefhu8DcTnEXmimI1o4ZPvvydergaWdWcW1tzpUeRMlCv01dCEmDiYaxj1tQvYKJCok6IdBctLa5XL10+A+gQr5/OO2KTgvHJ+F3w/JL9Qu0a1njElxJVXgzK1orXSes0rhakFHP8oK2C261nDsTiALuCLo4avykuBkMx4QzpGlgtIjzCFMXhWxI1PBhT/KcaT5LwFz9YqTK9tbnuB2U1FaY/nJ1dg0UThFmfJLUkG3SyxVoUAjrL5RmA4zElppDiDV9Q2Co0OSM6K23ffGYIfhaEGrZa+iTY9KN/xQYGvUq1jKdX7eoblJtBTP2KKFp0o6d2cNJd5fzsvcQdjQV9/GLZ4zCdwuPyaoU32LBWTQhTRZ8+iuGoAzKhVM1tw2MoD5zf4x5ql0E3J6aULhC8NQ/GZooz4R6fA5PpcfsrxByGKc2nVMXUwHUmAvhs0kr7kGU6QT2lRP2r8JNI/pAMJsDw81XNJqQOZRI0V4H5Fjcc4zLTVZtytMfF6bChVg3kILIyJakQr06XrdwYqyfpFBrvTHrsAIDh8ELs6mZTvNNFfxRAvnz+HDqRucTB6YyylRLVYgFDjOt0NMIllIi5UyEEIWP5xW/j7RiH+qZjFNEWvoCiyA2w9lIseiMzisyObBH2ppURL9auW0hmmYFgzinZdiGeNjT4BkmMkywLE0tv0Qu96KQPVqZU7Giir3K8iaVejG/CpZOkGIYNs8hoy4aRT9+c0TDQvmQLzPjMTcy9PtAywWPRCX9lcML3J5uBll6JzvXzZpW+ARXnmFvMg5JLVBqFx+ksEOCS3rEKaWdGUzYc7lzYnqpzb4wD+bsLZPCiMEi9ey1VgfZ7twhZt/aje2NNiRSiWyjy4QBFWktrYr85JFwdPyY4oEWliUDDEknpVn7iAPOAs7+sWUlW3Eu5R+5CirwejT6kiO3cXCGn3agkTHzc1SP25yEp0ZPCJbuDLcFaHE1kzgVLeFDK0AmaSlEsLBHGHEYLOnqYrGd6/B2A5jvkz9GvcmcMOlY5q+bT6YcNj0OBwKrQfB1fHzb/j8RseMumdWe/dsdihuynyzeLJBSAPwMj73b6g3W+uRP6IeXUGAThGvUKWPV9dek/Stzg9jBpoOUu3NR61T4VU09HOCVyPQKwhatlIjGibdAG64yeLdAvNv7KkGzlugUFEelerd5VkX6LzKHEb7WKbykFMLz4v9LAkchdMQkVrQgChs6I4QAJqa3mZGC7CgazReEMF8dKlT601GcMB3ElEKyjJ40Xlf2F46IzW4qiBjTRbPjKIbCaqk9kAxasHslTKnhRVsbwFcgbk0iINOhoVwjlkbEUV6R0DLimAkOEitBcAtMEopViSEXGldzHuf7K4zSYLM3TGJVuIBILtiiOOH9sIZPVx4DWxqqwm3tZ9lOgWJ43fVWnpN//s4mn+wWbD9vHJiQebYDCpSY4Wyaz7js+GRCkE9yWg0EaxxBym+lo1WPRDHv1b943jn0JCMcNeZMdQdtKkEpK8NiZ7yqRKcLlvNbzlCTD++/2bhbwainlm9jHBYT/7oARrT4oHxckgA9hTYKTCYX3L9Vadg1t8LfV6N19vsKDodSgZ8+if579G12SwnMij0CqIjtZQcMKbUSipj7aPYv47+zPf+pNtErza0vs8Z/LQA0gbz7Y0VuJXdrWqrR/7JOb/GW1EfH8vC9bKpZ1Z+MDv9pZ/BniKZviEWxFi7oRvXj6mVHAHmCk6wy9mXasMKKxSVNo6kF87c5VKuBHpby6oBC7iP74aEPjte4fJaqbe2BFhhj7Fs0vL9/FrVX3t0NuHW4fyz73UiiMeWnmqsfy3S+weHtGSX9Ahwx3hPo3obYHtNujr4iMNtOCTRkYXHOvDaDjnPgBgoKEIfnmU6laDHJA91VF1/LHmRQFoIF+z+xu+BwfRjz0eCzHJ2Yq2a+9MlQE9/GWlvH2Pr21+6inbtCMySmwmL+T3Z0GjX9ojoBque9MaEvlUJ7zI0r9PLJMiW5EkuqOLlJGBthHY3YbSL/ZE4T1GhnzLhwA37aPonY4Ek9g7cc8nxTIId+eYUArHKwbZs40512ve4v+btfh6xrqj9tmPTUCLXap/EVVv3O30Z/xHW7dQOsSr72rFVO3EvHqXNtf+M/6TjXqXDFn7ziXreZmtb1LhTH3EM0pt/5W+KFC/zW1OGwb0z28Ik6vONc3UoVWPCBUs+n0s0ZHvS2+x2MN3/I7ffjHYbyx9Ll6IseAir+tpPDm+zWZ8JvUXPmTk1egQLl58RW/pB00e5dMEVH4RhYvp0tKbUDrPcSGqsKk39aW/hEpfytKQVGmGkP9tfqhs/uJ39ZFyhmkED161KVXhT5qbEh3cbV8QTcYl+CT1NcZwhq68Oz3fDF0Yc7kmKcwlq9eSXnWha4v12YXy1jzU6QqZzZbTESuFWYrZCww2Klx2+r34yjowqskqTv8K2DyNYtNTaszvP1ebTgx2h+RSaXvz21xDKv+1OTptqS6OfoezVb12oiDc3FTIACpfjTC9eqKX7kyFYm8eqi1WFl+44ZmQPTU2/zdnYQRQcY1Nn7siFNlUmM3qVlbnRDnbB334QvZdem8y5rIPWoav/L3C8ckxHBafJYBR7vLNJvzov+rhyMV0e81h/8jWe+kQe+kT6wc/DxmQm9lkSZ5ZfLN+9eBDacOtCHktpvsAHvMdXxc93Vl/WjRtRfZeN5hAOW39dOkjdJ4Rt86u8hT/UsScuHa4/jsxJiqODB6ef+mk9qB5ZwtDp+ODBtKhoLYB+KvA2UaMMcpRVzeQeyR8Zcwm8vK88VD7m+4xhpzcf3iFw6NFntNP0KaT+I1PUsHDTomU14ep7aSTz4JAjtvvPjWYgR3Qw6Hrm4knXGl0W8STZn4fOdP3Aap4HgdqLt9l2+8Mt+U52Yy9NIhIoWpWk02ySyq61XXWtwqOqo9rXqavKbrnV/OnUs9tAwpM8+DfHf29GWSdWOzwk+VV1n7Z+q+Q/mzTcy4WYBG9qJ6ex+czepnguyWvy1fhCr1bQpXH2fA29+Dwqc+CBv7Ee+Z/9a323nszyzPtHp38h0hMHB2ETgew0Pxg/5Mp74xWD+HYQY+3uF4LbLPyo4/b0DZ6ez+Iexu6NNzQQPn34ArI9cJGmTulBOSVub8gqfveI1v39ztNk4C2L0UdwUvh5/hX18T5aL3tdHTa2k88+9z+rk7UvMLnzw/2oXmImFbRRXU76hgmnzm1j+FIZvb5tBn56QPtmhnPko/Qi/GrMw6q6nVXza8+eXGuz95pwpwyW/5sf5nMO/GsOH7FmvGM7MzWTvcpRXAu0fkPcLewAk8e9LEgCghee6Q7Polmt2t6Aux8sa5WJfYq+tcYEE8nx3n1B2FQP6Rcr5VSq79dEHSMfMyvea3S/AyGdo5/xR8XrveL3/D17Xjqv79TaGK221mAGma0wDK93imAuMgeBgDdIXaGAFvCIw99BEgpDHdP7+P0gKDAdsg5UPY4hCls1/6qCXeN6uirbMQPlRAE61plrjHqhfMDgCnw7sMYEvR8XfyXCfq/8vnTEDNrXYtIvgwdmhE1cbFW2EhYGRDZsRJle+HhWWEekUsbUWLZhQA+4NeQU22MSSTfzOgzzJ2nVMXJA/bPm6AsErgjIcz4jCcPNxCahhBkpk1sGLhrciwioGZxEMGUAiZSatgvPLBq6WVAoYKwPsVBkGchByOgq2I2FMZOrJdiCoECxhUwbQAhKccglD6fRIGLOzGaB+gjFhA8ONSQXksSDLFYAANyZlIY091uEn0pYYwGZgsiOfcySzV8KX6sL4C9tWgDjilJpqfxDjHywn4nHClITewSfE+IKFEY8rvGel9ywviLHHIiM8Mc4ItS6PiPEvehCeFL9D6ZD4HhbfQVb+zqEQ4xVqI56OOGeljwgMiwn1kciK3wiph0c2sMYx9jUhD7hkpcLLDBYLqoqQF/yFUGnyhRjvUAkhb/hMQnt1HjF+xD4k8i3+QKgC/yPGBfYB0Qt+QajasGejYB832Cuhr1FbfICBXsBnxPgN+1HQj5xd6dUHB+MFvRJe44hlSLzWI5Yr4rUbsQzoXo0QIff718SfM/r0MqI/vfzIcfedy9/YfNyxuT3M1b09f319wq9RjsnXOLR88XKDg9IxlwkHpoe0Gflzw+9eveBPpVXadPgDLb36jd+ZM68esavoLm1qnA785tUGp0RBrhJOSgGKJ4wr/qYuw7iwuV7nrIvbLizv0yaLIEWXaygojhQOET1OswIiSqYZRSHH1WETcExzWKDIQm0yUETCdYwjZUeD3UKhHj9MO7papC0UnQYUwLEdGxhB28nQmUBGjQ6k3Zp7LaCoR9QnCqSa35n3hOuelmbU9N3eoY7mYp1QYT3sfSPIKRghZ5TUTcjpTq/g6LEtjgLlZr1AHIcdO2zCM+wWOojVTh2CoB7RPJFHjQ5hC1V1U6xrFzmQQK/g3sImiQ5Bi+LH1E4oimAHRUOcxqSEgEWCEoGZIkiFHRzFOoENZMnHdN5CoZ5WYJAW9GNRHMlEWCQoKsGJCLUDVmcdVrAUitrQXDonrJoG6eOdx+OYwiaQgc1BFHIFhyIG1PfJkNOKzBT+pFg1aqHGEiKMUPTnE+DZcm7giyMh5WY7QoURDe1BsskMLiSTNxlIEtd2xKpTol/YRXMEWeh/kmYJ7SCh8AXs/arogMYMiuzI8abd7xw5BAERnuQKnhSM0CRozBD84mhwe18ACtTNDVDKCG/biOHMRUbgRXtiol+LJKjv4CRvkbQVCdcxcExHgfoLRKj9kRV1S4ddGY5wfBakkH0bbhtBT7PsKCYWVxBys6aSRy6sQSGLfF7OkzrnIIeVYoFqx7sUJX2xWcJhcjHNg3S4Kh5PpR9gOiIvDmzckbqjC+Ime105u8Ol6kNDK4Hsz+ZMJt5xwgJlqoW6EztiHNezE9Z2Q+j9W/aO3swQ/yTuv3CgM+p3/za9Tx+n2OuSi/IM/CTdLMchRSNb3RfskhJnLRNIX+8Z7ydCy/LijwHYz7YUEC18vCKGQ0TKE6r6Z0C50PcNUryIHQ868NAxTUJhu+jVni8HG3kG9lDlWVkAx9eOnQN3ry87GqDkkfpl3DZahCMKVg1XmKCQYrE4rEcjPEjkNrVIz1ZHN093b5TijdyGZ5y3Fbjus8oheJ0UhnyWQyjg7Q+4dAVFy50hgdsJGX8tE1noIIAiUvxyuk0aXw9HfdqnMQfJBvJLrsoH7Y6jx3eLzIoSWEj/WKCp7tyBDxKKdshiLNKKk1HQB7B+3gOKpsY/4EQQOQhKwtPb2VDSJti9v4qwQM4oRsQcCpmFTYi10GytkPzLfa17JLBqHJiJk0GqxXWf3mlBP3ihrrqhm5L8SL9A+3CSOYieeBFHR2J1PFqRg+CDnzIKguARgoNaEw82PlFUf53F4zQhcSHAj04N7D8KQUJ3BWsNefA9FHAkMEOPDty7GVCUPxYzpw5QxN8U82sfC2CBQiQQlo/QRFU9qEolYLUJ2gCfUdDO9V8AfAOcpdmkEe3O45hUmLQWcG+TRorKedCnsaGuklmkAGTpwGBBS5qMKXntgAYKdSQTlTMvk7azC7SFahCyR0fLUW1ENgEzZ/Q+wcwZnRXnnNZKZHPgyp/Yc1Y7pOxnwhu+xnt4+t1IKzpbZEeNOE5jQZ+T6c0UXuwpUg7aGBHJsrjZMUo2F6TTAOx5HG1Vi5QYDmaW3odIP3pynCadZ4fIX22noEcHXRIAP2cwZ0V99RrFfZhcHAXKBWAHFAD4UQavR9JS/0WSwhw6YG0CUCUGBVoocAFEzAF7qAiGnQBGtjSnfM5oE/6AiDXT+hRgRQksL9ScDmwesL/2oEgWU97cH/1nLw6RqiymSfVsWdH6SvNTynHRBkrtBtykW9U8MI90b0aNVV+RaX+yCFYHcYbFoh3R9ED0Gvd7243aq5o7n1+djKoKrs00kSCRkxBBb6wL+0gnF/GeZtFa+OFfR4nBysKCMjAngYHjM3Mk8KGSGREo6HwYhJppUBBFmzfigmded4Us8XDUMG4CFOVsEEd3EOzI5DhBId2hmif9h3Q1BhR1rPq6KQHP9PZj2hGu04DmAewcNEbqCbDiUiIDt6OdOd4ImuVhE6JPCQFxLcARv9EHuLBBpaWJ3hkyFJjrw4TR1VKNZ3t3xOlHDQN+OHtiuFRTt2kqIb0yEuWC6TZ0oIMEspETfA4Soilww3FGLBvbQQgEIZ72xaizVeTRcBUKYcCX8C7E1nFQrkSmIfC7klThPJ4vKcZnUyhE6sNRY7uRuef5Lml/Oe55ZSTS0YIZC5qZi5/u8euNeOvp3oYuSN192sVe+4thereYGRIzdmB14C3UxOmI4SghzglaDVwmXSyomWaKprg9gtDqci+x3t7uZtCAExzredfpNhrEDw15tNvnMA2GwUBjew+L1V1YIUPKia8qG+MU6aLQH8xaB4u4t4vTQouQ9gZ+QGZ/cQhYm/gajsKAvd9/Kn0BLcVz4h/nRO198sKPVxYawBQufhoxaU4v0t8dScBy7EAndjOCdZ8Wh35orOLodt82A+L122YAHoBpMQ0uXAGdhm6JZZLsc0RU1DhAHLxDFRN2wfRMUiLe8W4/4bRYl8kyOdnPhAWKQt3t7QTNU6TjBQRGPdHRkzjWggRJB7l2cB5WEGnz2hBxhIU+8aDC+ELecuwggVqp7uyQz55xBwn4v5cOf7kaXi6mdJFmptL00CJ/7WB1yDi6YYiuV6BNcxxR1VsbxmVEe217gUxUJlSeY6IyWc08G7wkkVYDjP3v4hJMcaBmJs5GHnBnCmxk9JEJsqeCT06GGKtuLcYAG1BbN3Yesp2qSgYYIz+hRm3j4aTvsDKxAQSH4rELQLaYZSfEfvbyjE4VFt7PGRQ4pMaq13BVX7vnTzDp0zwEBakAQTpCKLZK2UV+D2a93oaDmZo97DIwCUeTLqOhBp+imkOqCVuGk/ehf9Rq55ucKHBK6lEgdpbuMDJcVbCpoXBUUQYwmvewRU+iquxu0Vou1wruk+eizAagtKCtdmw4cTQ99b2+849bc1T13/XrmIrPFxTwQZuc+FQ5uns4b999+4U70WgIBc/XdNK9wBouzahJd6pwbKdJrrTNtgcNHvRjVurcJsRE9zaOxz+wreI4Jwlhr0EjEKesHfszb23kUgHT4hpixYqSFoGcINatYAgxU0DAuTWUHNG/G5pdpNku0S6crHipILybRuqKXU4DLPZMR1M00424Hga1aXjOheMnm6615nxwEIxF2HJjKehp8V/1C2/0Z6slMe3azPhUg+somjyy1V8hkM4XlZvhmI8TDCp8wQjeBGTncXFe6Sy5uFkcHh5KsHRU5kkNAdp+2notVCETsEp0gL2uy0jhIrLtE7fXAPZWCsWtJFic28uJ2/nLxTS24OHCKFvEtlVcFD7q+Gz/chKgxrXDhWDE5hFvpebIM0AWDj2WlT0E7SW2igMtSXIawM2FuKDyY47MTy2gsk8CTdbu7yAyWfqCF6ttSyZVvBIo+FXRNdXMiLTHEp6doFb2pxpdwGEoyldBr4gF0kPaopQ48WLRDbFAvumKUWJ/qqnXPPYR6fzctsRdr4h0fHH30sdw6mwcIlIx0Q2KyFwZQvaf/taM9DV07qJ65oqB9jUJc6GBIc82xvETQzMrNNI5qumHZISIyPm3ifdTAQ60dTLLedHqq8kyQVqSWjf3pxQPl7LZcFZak4Jch6jhIhYy+cZFtJ240B6OvvuXirNH4AJ8kDfcqBodasWRUIhsdCDHrnmA6AxzrYkrw+kdCT38Tkb12LVr+88pPosDavhWR96iCOdU4ac4PZXPTiiarqcHxQ4ijdROEYC1WjrDOnFHTAkH0mDZmZ84amXGrCOGMUeVEs9CFhGqs4J5GfG9HCCwaLS5zi7yjRa6qm+Ua5pUFxqA2IQ97xwqYLU8QONYIUfyXXMgxrebzakJasF/85f0oeBm0aIdBIqSXHIiLfXHPt0J3GU7phyXEQUnOM0RMw5FXDTUsAU9qkkCh+h4IWqQDTsXKpXSvQkLOBvO4xywgFJfayS0DfNAHz0tjq3sap7DsXl/A/J412tj8kD3bSw+Vm4zBjHINkoEsJFQZ7I9cX7YzSxcW8iWYYNv37LI1BAEQTsI7JTI8oVDdSCbDxYLZt4o5faTxcpR6MI3k+/21P3WWLGnqMuoRBQThliQh0uFu2FOsBqaylFcTEUuQFAnMOdZ+e57DAVcgANUXwhjHVVkhvicMJIwMOjDNpL6W2xndnMHyRH84vmFrNrf3kUS/vlcn9JA0aHamcP4DXkrxe2EQ6T/CUmTdH1rEMeVObr0bErCkxoKsOL55/Wo1H6b0yYZG7A6C2jMngwHh9CKMCCIjDXDGNM6TCxFXf5f7sqQgAAHfOyM5aE6glHQOGlBjQ095q3p42Kz7lbI993emrEP5rpAQ6oepzIUP0eJGWesB5KgRhTFIjeA2ykq+luboI1G4xsg5yfIyF2y3j9agT6/+UnJnranwIz0zfZogA0tpTNExZhEd+ct6fp/BKMNwTYdX0xrSn7hNdbOzc2REyajm37mIhyzDg3C9VePkOvdCQSyziEh9aI/2akF09aiiYgGaodM62TUpoRBteHyXlig/cOU6p7TuyUjXygIqWE741mGCJUIu6ADuAdSx4D96gTQCLQ8GMfxz1YO9NkinMbQeIto67rYosxRnfO6HDK3SYqDb8HshGdqREDHkcAQaAQK61pHTICwblJQQJksHgBHucf+wOY7gO1mRscBaLv9oxMDW+2nCxecdYsK9V9lpJ7CSw/jZciQMgtcjRsbGOnABZmUx2CIaXdWSQen4BKs+77g6Jf8IVNZRACK4t7iWh7iSuCgZIiflQoiXUMNdwAZhHqwQMlGnp7PYkhrPXmEQD3SWLfBy+wfz7p2JEc6WhDF/oFiH0iScGIpFtNAqU/u2jQItBHADTCyLnFkVsYujiV+C0bvjdoyQwshKRITcA6OLiTjhJnYoE2RmCaCwEdYbbDzzf0R5gs+2IELD8w3g5n8/+ebMGzD+IYATzjFqrJxbQDH6eB1Km09JQ/zUJo4tGotGwMVioZnKSC2NihWpbYop2yaIRIrXbBAuPdAWz+BKEfEkwLPmBe77j2ourc8JKYGrRA6jHuwM9QskU1RZsiopEhzFogUEp39q8hWN0hQayn1KY34ciiuG2XIbRQk31USJrw7r022IYTUoEmud2fEzbMVZ4D9DB5AzcA20Lb9PCjgjcmaJiarPfD74TNWYwt+H8M4dEEHxrM0ZihBxJMCWcq0E3u1mBZNGlMXtvL9m2aXDBQRqXqcZTtFW8yXP/hn2MRJ36rErjQ2ApYTE4S1zqZILXTaTCakl7uvzZcr0Wso6qDbR+LMAYVYBGWOz83JIELJeh0kmiTCg5C20Hg1B3aWFONEm6tEkfMkCmWY3LpbKc5lcgcqlFzvXDQgW2vHMjgFFkvC21AVg+EcGLQFwlequ0i5hts8uxfiM5W8OMTTfIELXhEdqTCtLOrnAKsbwXqYSp4fgmHnbmfF24pdri9VtoBKCZ18x3kll+utJS83OrzliQL2mskjdnQzYIpvABEUThQKmoTxqf53BJz7Ngpqw/721EwA+/MIrS/AhASqXrA0vhMfg7Cwft98TSarcacDUt807qxywySMLC2psiOSxRK5Urr/ECTaf0dlP1qk8oBR8TIeHeAwCyxdiCdxmiZhBRaEi7xDOO/KdxvYfnU2ESWjJwME8kvtY1ai3+vFSuLrCySAyCS+UOwE47aHCFhU7iJzD2dYitfc3QQFv1ld3/rIXvHtTQSsBJvUU4xM03rUJHOeI7RMixQqZP398jwlUC9RDCOVn0s6kpYtVfNLht3mLhnhoF48qxT+VY9Gxk4eJq++0ouys4ydbNdxoEwcabtfIbKkVPT3Vv1471TunnN3saoxzCCpfNPze545BaPGEpR7IVFqa4o9Q/nb1cAh7yENPoHKVydiEAT4gz+DVrOMCL1pPrtfHC+foAf38METgjj5ISZvmo/u/zcrNJ+SmH1u/nax9Gp2JObTzLvKHcUtoiUmamdquXo8LyE2SQqD2jbapD/NVFUid3Vm0fHX/Ad/KpnbIqper8WaV1Xe4jMZ6HdQRai7LQfGp3nhAkeNt70voiDGkVY12eKo6pp0UWtbbGei48LNy5RoHv1/kVKM2+NccwcoiNZ8+1HHfLuuI/kg/lAH9EWlco3w1xt+F964KiRp/HduyoC96UuTNgiIPvnrx+KBYE6CD0Ju1FgKrUcJsHeLtySWsL/IE5+vOscOTmZVwKXZndb9c62ktnpEYpHVpOPRW1os6q7dhHvBl70y3LqKP9HqOBOnYDn2ti5D/erBfa/6+K4htbpceH42fF9W+I75U09ilbMhKF5Kq3x0wEWED+Ubv7j5Md0py2tChJqHhaugu6vyxAQTYif82VI81d4vkxT8zutc8LIeJ4UpJmp9KWhjYiJ86kLrUUBJTtSiWQYfCH0KdNROkH9I05XAR4mTB8Zd61d6H0GKxmbzH0Swm/am+Xv1pUH78y/7ASM+Epmm+TPWCx+FdSpVqUlfUk0j8FLPMKOdMP1LnUvDag/jE58WQ9v3CNFEK+x/SbuCd85/YHBf+gJpIBAToeMoGF0YZWEFkwEopqZrnvJ2n+7r+v+2+Di+QqVUqgkYTyqjtQdpLpB9WUwN21OMSAM5rl23lrhjAdOsl1ouYKBWUNUWpq4N7hKGf7y+Ec1wiV/GkKBqxyZg81BXkWWUORXvevd34cx/P+P1njwDq8dP+3xNYId07NLvGIzb92ZSBMWxDnBISuK/pOM6COynwg67TdHcPZaNz7ticNui2W7RLehWZvnYy3FrxuBhF5cLPtyEcG3a4O8uGsLOuPDBaPDvGnbKWfcb+3Stqn1fqLiZmkjru/GNCyzVe+lu6f6+hXQtFqxcTm+hKPJFTf0fDSdGodjQAfWI69e/zE9PUeEYpg4dRHGqrOpO0BBeT2cbxMHHcJTrMTKwx96a4qSa/5i+8j4oQneXdBkn8iTSzZHG19LNWh8tNl1C2gKt9S6ILR4paYxoW8DhP5/kkhE1gaoZWHh+LdB5t7MYbAnAsf6R/kER5dMS6ellGtmQtAUU8fy+01F1cTC63D/udkOkjP/DP4E+ciuwOtqC3Aa2Ru78vG+kc8yf8Hf/8EGdUhD9z7dQc0I2RPKgxKMsoV7YJLnxmBPPiIjKVyuI6djOFtLwnWmhz01+3099oZSSBxzbf+uk0rkZUJLrBjyoa6Nei9ea4nFe3D7DzUUU87W12WFklYwSfanV5frihQqP6XFpDA9OJ5L/cIjpZcSnNXxpWEAzrn5H2ZnZP+yviw2po5Kz6XgGJ6DqdrX9DUNNBTDk+PLWtM2MIv/bj2VkQnkW6QQ9PS5Lhw7xvJGs6IlextNgrWshTxPrflbclahfr3790x7K9xvBdTGqsShtQU698Nz+19+535RCj8K/lxF1f3lH0rWNE8s84/cc16Tdz2ZgaN3xln/XcDSWYyzgjnwQKhOhLWubsXg9Gvkdh4pBhcXMeIM/qy0U4grqGluwoCWLjZ74PElI36IXpHEFyF6wWvvQEpiztzQpchv3uqTGBTFmmoQmBsIVZfTDjcwPqlm3IDvdrNaPH0Us9zst5GgOjROSm9AikbXiA0mqc8wR2ceCpF+wptE1PXnwL0D5ZQ5AdNbepA1IZerHp2/dlRZ4oq9f2rOmd2brzQ83TqobGTy9VS71eRdJbXOcj+DQhuI9IlgvW/bVRGfTxhT6PujXI21Cyj8u9vo47D4LwsfxWgFnOkeLQyHGbf3v47sbA2w3zFLNQvG3GF7kERiSKsgXY3WIoDFV14G1mdRpea4CSm6DkEJTPdEQPnofMmHpzXC304AO2ca2x8KEONhhNa7Rwhc4OZMFNhC7MQJ5Qbp0x0rxJSg5MIcnodXQdoUd7A/QS7x72ycsaNZJ2aLBxb7vvy35j0qPjm/pe+1osBVNwZFkaPpgELRhX6t4mc8NRLDc+WbcGm45GB5Odn8AoMXZpuI1fxztknLYV+Vj4Ng6mEADwbdKy2ykU4RgdsDg3Rj96Q6HHzPLMI7E1sVV6fyI7AAK6/FHAJcBHi1QkCJuibfmpthkt/PXdSJfTqia0rGWXuOD2P2Lc7qdT39n5e7awgo6m7YVEhei6tTWcfkEB2Lsjgjtsgqn9jFhxGI6co0NOW3RnkQ97qqECyWQ+P9svcLqMGpNVihs9+yNO482Lv/nG0ibjBkbw3BOA7/GHnD07cB4WrG7AsSPZSjkFszUV2IYOviz5VSe6v1AZYj9XLX2ZkSBtLD1xjWwYmBk4zDXpQXBiFTrF4RrSQ8p5276VizmMF509xKVpuUzQi2nhFCK2wUlWj3Du+A7qYZ0oIfWbWCmkHRthcZ7JNkE/kD04xYx89O1vjpVOjdjm8f9mPq+fL36ufUZMlhnC376z8nvgWJz1m0qE2hoy1dzW/E1kMuDXo6IMxzHp8s5HbPJa5XwhT+5bKyrYOPZvkujzngX20fnpnwDSu3aUgOsgYEXIGDqzUSGBgfin5VDbRXH9OJ8Ol+KHkiqpg3gmZauv8LXmGy3YE48f++o01+4JQJoncPZcN+uJFctHYipbLaym22XTB7UJdXr+xUmzP3S9UWQBJyYUhDf/ej+IQU1suQI8smUpLjQZUn0X9PQX03tfCgStx+/hgWZ/UuRiAmuKIDTg3yND6dYVN/T4qR3vcUInDFOSJq+sOrzZtrQPGa1nXENo1Ab8hAOoVjHNWJiThkhAu7oa9dztzN2TAWdwRSRbRB8KZYc42VpBbXQnRgciruCAPADWNo15O7XRKui11XLq2+rwCB4kzHV9bW+fC4u0TvvbKyP8c/6RZ7pKDvOj7Rk3DTiPXc3MJTSIKixPv7Eq6g8OnyJjAY8uRB/SlPYMJyDGJZYMfmoUMR93ov9mc95aeaQnoTZHp7eYBM7M55pNECE6vNp+N7pOYDs656supWBK9Bi+10Ty6CjTeMEakWhn9NulNehqAMI64mg/QTMcoLUJmV7Fp7x+QOJlf3SjUf4WPPae+fe43QB46f3C9gvV7AnG954CRd5GaaSh9fuCoIFW56mXINwNR6gTcJTOGd692gX+hpaYvVkKEZ6lP3M2GRu54l51AIjrwuZKJCE8zAPqNTrWEcXxv8ycGS9geyTOdpl/3BoeLkmrtcOZuLqHju2aY6ZeWUQo9VaH7oIhS25jGILCFz3uv7X0HTnHS6XtHNk89trAI1zAruV+WIXHMc6bGNZgI4DdZ/TwLY2eCB39lNzlY3cJnTIZBDkZQW63lYQIfEkLXJSTK0SU22FFRoo4cx9SSl93heU9ET8dt0d9G6GTiGs2L3tVElL+Kjq8Rd0LacCeFtLd9H/AbVDB7lExoC6bpSWYszafbuGflRqATo3wUbd6YqjVteDUw5Rx61E5Jgj5OWK/X3n/EeaWlVUYl8XMsVHoVl3mHE7BWn7qODRHDssFud31qgFFPkClOThrmkHKnwhgqUD304JMg6Fm6aIpYauJOns7EO8eWqHWFU6xYWHUlL0ugijD7whcNBfJpESEVv3N70m82k6f7YeKn1zdBZOnv8i6IBfu10P7aAwLm9d41jSGcO4yyhWQ/fRj8CEhKiv6wdYckm96/NAtOy5kGLo39/HHgUaECXkhHE8TWVeVbp6uAZzdoVLJh8zSULjLq/bBnfFjD3ULMp7BiTqZkvEuXpVdesyoz48OmhykbjWJMsPWT/YV3kV9cpjoZKV9W6kEPRUGFkeyVrbInhJ8vmCAPN7kMl+bLIl5JZqZlQtXIByOtppnJjfT2rWWkJkeTG8U+HS5O7tzgoD2fH2hMhI2zc3MrjqWrxcu5nmtQq4tCOwDGOq6hLUxcb0PBUUsLDOW9VrMlKa6Bv/BQiVxeVkUXcC2zGWSczQoENUZWcWKq/LKFWh9kxgTtjBmVA0aRZva2fy9dTqErxbrFpn53XMDbZr3AZ1XPWyLf7TpRUEEb7dtUguyxojJleLK3szonAd/cDeW0vfz/S0jBmaeYUu9oQrMxhUTqfrBe9Vrc1Yt/5p3HTFtNUvQ9GWBGZYtouByZTnvt/o3USgqBi3qdSs1FJG93D21B2tw4SHSbXEEO7Vj8erlmDFQguZGFOkAH2TXrBbTpHFlZVExzCyvOECWTSSKA6hSEGUewgdrB/41MwQapKantwgy1M+yVSQXWG+Gsjrxqjf/f5pRty8OPT8QYxhhTaUEw8VbYY2aSFCXEcdJvdkTRDxoTnzUVg6tQTmWm7nshRKrvg18ElQ55y7hmC7K1l/JAc8i7WHyguZVNbjlbzOHfgtMKb1D0mzddFTL+C8cQ+ao38XmHVjMCI0v1oL8AO4JY48ycMr7FqjBSZ3JLgyF0O/mOWf9guJZKXCGuoS8fKCOMPi3Ml1oKL4MtrR4FsjvN2zN6GCtM6HRzQ93h42gQWwocrlcMqstyGsoEBRiQ07GoVBaq28nBg2WpeMLFunBnsNm9xDIeVihdB8clxkOGiyiansFj97i4c19um4umE3SQ6hGfD7a9b9RVWDUOISMhIY2WMpWi6iIukBTY/Ep5thVxTNx9uZu037Lv1f7UYcdkQkPIzQAC3xRTPkSLp7v4eZrT+/6S2Wt7H2hFErvXs69tebEcflQYCLKKPk6NEr6q2+d8fdulE7ulW836zNk+Jb8vaXBZeK8jitjVYQ6J5qdJ1PX1wJbyMrSh/WZSVxKfGoaWGvrRJUnANSP7V0YjYpRoyFtWuL5/fphqJTBJLWIYIRgzXhThOvKy2ZAV++PZNHi/betb5Vgg7tQmAqTpGAHX1UUAlh/3ENXa3ImA+UJDlBwt+eL0AdcMIiRBz0LQm0U9qKJHWpo5NvkHMAc8kHqEcx2M715sYi3g0EBdaXTgiAAtcBzfqgd5MNrB0ulDUlpSHafrQLx4m1JfnH6MOxQKuoix4pmLjycl4nHQrt6dZAkgEraJc4D7NxPt040TcmOh1BDDCk02COSuzOUZhnRXJcxoaRtc49vSQY90mbzgFwUi7S9f5PR8oJb8K2oaPe64/xgHv5SBk/bI5frgvluNi/7+eFFuqlOej4DqI1usTk8jmWqNs7TIzKiex0zp3Wn/WkzojkkV3iE3mx0VRnePWzre+CHT5bGuV7HbiY24P0fAj5m0v/GcWAzcaQuAC1x0BtstcKfppMtVtQpwk4lyazsdtw01g5bnJNmhPIpd+gtDQyY5ULadSn4lioGSuBgd0MsQZqEicQe1qtnqJGDqiZK9beDLnKPgRFFzViqafJfJ0KQjyburfAsgFKt3wYN4u337JEdDOYNrdvsSDPC68nErgxgAWcwVe304iY3/rXniyNT7lzNcARmKPv6fJOQdf3zD2AK7ykHjZ3lHWip+sgLRyAtrXnaoiJmPXSfDib9i7Symi7E6rprI6H5YeQCVR1tZux5youfVH6/ImwuklPPKkWWO+RAgi71WUd5aIeeBftdwIDNl4ltydzRJqtNh0sLh0IWb2NieHzYEBiXjNqbbQrbIy8iFKsKolqRqYPHn5TxQcs0xHis4UmllssWLr7QmC2WsVFDzmsAGFnL+cclCPbCSQEiPzfORF/mNdJ0oK+uRkMNHRdtbIPXL0wi3bYMRZyFRsDBCOPUy4V1tkH+wY/Cc424ZVGQpeZkGaSNO6FyH5hWvdnlwTzhVCYQ0rN5rMnKESe3tq787RtqTsFIR/NFaCNQ5QGneVN2zMnFjZ7iBx6zW6BhbsuVsvMrWpFMAZ5E556BRGzZ7iEWYmFz+5pRgLhzr7vt8mydjjs3yJUVR+cx//woDbO6/tRW1EvRasxrv4uDrZfn4/1JZVX7N4u37W+ZFNyECkYN427nx12+SSgGLzbUs/VUHEy87emuF/NoRYzM66azvG2kuql9rN6M5xMkwyIKRm8o0GpUBZMK6yyVXmaFyVIBSHy8YSywoKzMEILeZ3p4GeSMl8AJfF6vMbOBeokS9ypoDRSdiaUutI6HOYUU1Li50GOEovFZxiHG0uxDmjRXLip0/YqBiiJhxgZSJj2kyPOLjZkHVJ7VA6CqA8Oh+MpAk7Ubw+Ui6Eg4O1zkpCr71fZQEifFRzSaIXJF/qTDsut2sMHX4gnXn2tCW9K3smEBLKn5GzGhWE1PHU8EPWWoqhUxQGC6G82RckNl9yGlMAsTOahtM6BMqVlvaYjvOkqOdbEh+uSdfCPZ71PFkafMsXj9agn0J0RRsirwai1EgJ+E7Lc2qStusNMUNDYULHFDrV0tb8QwOlQcTh7J7WqIWy4RpMsQmmJASet1b3WRI3YyIPCYJNRMz21kaHnZKUP78N+JEJWMUVvzDnRu5POlYo/vpKFNlBClhh9X0TGdXzTLW1lTilADwh2pWb4mDA4PtSDmmVwOgCTRzHqzYOizjmCe+DtqmUCXoPG72no09mI64oLXPs0N2sGwv/mozbVe6kSNwVBn3rRH1b66FaGNSEx1E4C8Tpl4b5bLBu43hiZKXStvC4L1QSyeUSuHhITrg02GdxaoOtjCQvxFApZeLY81qDz4HVazE1V3TXyTugJNo2smpftr5JkMWeMd/ktrRnIoMl2TIhK3scgxjjzTFi73lgbmg4dwtavJ5JDwt73ZuacqBo7MAQ8BPSCvH7RneCUDJoRy4e/x90M4T8DwdKFDNvkANQZFqAOtxVsRdiqkWeF/XlNIgi+StBxaIIvrQjjkJp8rthY+wCqWFq7XLhRmhzmOoLpn3OcwwZ3Uy0rmY+wcRXzlPU3xa1iTTTEfYaXtHTr3MJ/uuKf6A9IxDHdS7mkFOME2f7TdEtYnmmq6BtnoD8rX0kS2SVEvrhJTNNzshwmzw2tXNqurdDOa1/BTvtjoe0uyDLvL6D79B9X+j/YlWCOgqYprfU/UDTexVhpfDPNBgSdhZgj03ACP8YeoCerF/487EKKPezc7cSAUaipVYk9iDX296ceRwpZqXIhbRJkaqNMUZ+8o40il5m1a+5JxxCkEtOCBn7Va4h6vYa2movddA7rzTOK3ei0Zm4W+hHmKYF5fPPvWPNNtQR/RzKbrhl0tsqSC7e2/eis9qTUNpeN8g5UzL07YoZl8i3pFFzdsAHHUwtvKknl0pTxX5XZvBUZbFFjOKnS7rTl0FoQhos6xjBw7IWGY1b5BT94cHS9iJepy4uJ93jSL1Fzwvp1Iyd1lutEsSV/URz0y4j51tcwUAnpR2IYri7OSaXAPJ7ZubpBYOpcjsil9N7nfEIcAGhvBHbCGU4Ny1OJ6zFoMau7t1GoRxfAtYx7poaZXbR1B0dXPMAnqvNOnt+NzFpv9neLmLD6ba2/1C/zWU5fgDxxOs4KyYTm/b8A9OC+OKoRNOo2rZMZVbtEIzYIalyCjtOU41RL5983HuO4Mfg2U35qLU/mIo5uN6FIAhVh7ww7IggWfS70wgZXAmcdK3YN98Xt3K0MokD+II6nrKhrUYlwtv61ftXnovqEKUoEF+bT06MRDN8yB/1kBu55oKdkrIcks4qXWPpiMI6knb93RQrF4u+K6VfRV/FEg6PQ10izCKJ9nkT0KlD1Mkt1KE8vwFY6/JqbJKgnoSsQiL1vp7QvAMDHmb7PPOFwm8KvfT8qcV7bWnXss8smMXnZXZFaGzK8owFdDpXjGnz03ekdMSxyC0hY2m8tLphS6nIOrNN39uuzH2p/ykuSufGHQg9h9v3K2iGIitjvp/2PqLEqivS++5Ji5Ke/unWn7+VbenOqNyVdvDFPI/r0UnkVqgS1was5a+j2dSLi7C1KFpJMj+wU/8ELkpuvUJeIOl19Ep/+AFwAyPOE3WqmVCn4ikeLajgjKFrqHJ8h22xb47C+1rqKi/24sFncErVG4nS5M9YVnJ0t82fFmcBXExAXfnoqxDi5h/muCrG6EjxYIavvp8o2uPD5qgs3w2tF5xpw0XMHSxcCuQCYoEDLAKCSH6xsIskSLWdkMquSToL9UFsBLtjqVQpzkdK6tsefA1DvhYK7i0WlViHjU1l9RnKM/+OqVvBv7NedCZAUqsLdMriWSj7GkZXdu1oQlQJMvH+D8AhJ3D6QGSWXDpiQqpH6nTf0yA2uxYiCUNHsfDfNjVvUBcjsh/NdRH0SAyh01P5QjZZ76y/pxBPT2kUVDnzdSKsYj0GJcSW7uU3UnMTP0fiBPwvfJUcYGOXbxGFBjGk5E9rj+SGU1N21fw5pkk0b+7D2iMB7Kc5Ij9gBHM1Ymw9Eh6eQXcWxke+rwg5wId/NB68KKN7XHKrMykogMHvXyytYNybgTMPt02iyhfd6xm6vPP/r89SjWS0+3Ogg8YJ8mjb6bqpX+PAmwE6Y3LGp2dBAYSMKxf4WOTA4789KnQT6royDDp5daHnyIIpVFHy6IEslgUTKoPTiLvc6uCv0Jo/LW6H4wEXJvfkonosBGxVusNzbZ0aFEb67b0oyiqCJias2FBpYkWUKAZ/pnmawDf0H76zUIgJmEkiN6+T3ELwDeDYEVIii6H9bKGxptCCcQINdFlpe3U4d1GwzNKxBegGoBFM0dlm6w8gkDi9VppxT6rA0L9jrZG2HAplYlxtBsYIxiRA7YYtQ8ADGrpDLi8gEVgUBbv0btjcB76nNgAHqlgOmr7xQgELKD/nGh1ab8WNwcCBNCrCtiyeWxQkWtkaDGzcJWbta4LFnrLHvEkE3CH119OQrwMc+r95q8Oa1lOdS/ba+P1gIJEsAn+cSxcAtrQFBRPJEFYkot0KimsdeWjAL8DppVX997Gi9S0GbH5TmoQ1hxxzqZFAyVozZAEqtHb71jdn82PAIrJ08fowfemxej/IoJEmCAUHG6EREyiGHkQK+Bq+g7oqiIBC2FvsZlAuPINv4eAu8HOmqq7cNj2le9zQIMVWgwrIFYDsuBw8ln21Xx/Ha2O1vAMB/OXLseX+hMxkEkTDvn2HIqAKDWVO6orI4RbabqXyT2MoymHjaHgRla8HCAJBc5lufvnqjhJQW6ttfIWkAv4bA/eR8uhoJiGiTkhmk0wDpGC8F4qim08nTizSjmVdogGCTTLmT02LuYRDTcYq01KvdTXbKILBC7EfiEH7s5J3Xo6noOKW9gUmMI/v3aaZlAAPCmnP+maco+L0SSp1vNTPee6iP1K8DWcRFxjsNpiNobZR7/w5dUfn5ktR7WaSMjQ3a3p9No4tUnCxuaB1zJAqsSxZabbFqnvZspiAt+z7rOp4nixzHKgLKcHXjnWEEGCggkKzzNOmZbXea6jZSolRqZh8GY8M0HTNLPETyxQUL/phxNAnrt7IuFu+wIVpF6bDkX7EN1olFxf0I7muqRUNxByAx1YlL+lwd7AgogG6qyhSBiCLEFVWC03egEJRWhm8rhRHrKqfQ/B4Sv+d3+XxCPI/83X0BJ3DKhxNkV48p2pKA8ltag/x/dd1sQWpFYhNEbjU2U6kOICPZAhz1ISKZULBkgG3RfOOBVzzsUWsOhEg/iOrVK2/KYu7LDsTr+4AF9BckhTGlOc8/xfpiSyTesBojMy8odz+03h1gNswp6rtta75lY9p0S3UB0orpVNDopR8oTLJl8hRAK2ZLrYQKgAmmbvsrQchq2ZvhzdEDRQ4yZSFwTPAsZ8Q/z6r9UKr2Khv8pkUuOSoxFYEyU610YIv7OwdG/IV524k2g8GUtY+WaeT2qBcUvediMSOuYT1GpvDUFcKL3PRmc/dZsc0PxGXI9mFbGMm3gjht4FEdCgFfvksgpFRiono8/jytqiuBQS00lqruTQZ1quPP9yd14T6CcpCVx9GxXoegqu6hLYdIdDyMQVMvJhpgtpHgSSmK/LFw35fKHN0M52aDAmfKW8LjhXPaw0xiH+zX91tTkGHvy/XG7Bk7tMdwJdWGYVODtX9hFHjG7qqDwm3vbe+YoHjwuwoTPWDDhDHkRkTfZsMqjfAJtCCuSOmRylipd+Y2tI5EpoplO/E9tsAYqMuTMdfAxulNKXJ3k+O9GCqLIWqMWBuJwXHGddWIkP09W7CgZluLJMghMASvVFhLWJZyFptZl+j7UeieY9tWsBRqrfs2DIgCogHgSixKX4n5pZG6P0JLfANQUcx6AQRQJtH3jmkBByIr1Glk656nRmo3ElUxYeo6aCKksyzOEXC0m67TxoTbwA3nzrzuUXt5lIlyae/RktvDiUA2w+I/iNqcqV76NCsbnlE+uEPtbg/E05rMPka7WFCDCcO66RH/g5nDlKD2sIHE6gak3qLFD2aKqIGqFNRgQIGY8GNPfz4kijzn7YV40gq0h2dARTvDxo/86Tm7ECnE4puM5filRT/EprX8Nv7ZwYlRGwpDTKZp8ibfjIYpJteQ56pIJt2Mu+UvN73B+MhpaRWb2qQQm2qWomRZ3g1aXQdB4DyveVCa7pKkx+7gZ5t7s/fBLTHdb2iRQUqyUtB6eyeJNqEaeI7QE3xjZ7+4sPU7wr5XZ+m+86SorObiDnPw208c626f57+cvxTIMFsIIKe34xjmawjTHqbafFPhWAEs8PlESKDW2HxRaYHt3e11dawvI9S73lSbV7z3IyvfG+SQvMw/+dDYZiQKnPjUOINtxvbpGoT8OGSTO6JhdwCCNJd479lwWOR0TX1CQ4lNzrE8bh60pGl4135T72Ome40AEfUwQtLyz8DCAuOafDG6ea2HMvz3V91wPnW1b3ll08tSYAdWPuS/y+9nC4qKsCj5Y9GuBHlHHvuZn0uPDTPDu+DJT1pqHvVwYsDuvNuEAj7wz1oOZSv56NR6msS2LqUwjH2ncOGODEB8cCwyAlw7QYNshzW4K5zFZd1kPEAATSYIbRHQrpcO1hEW6wSIPcI2uolIezHWvd83pRN1zndjzPjQTkcl3G2vp4K97nnpUhl7Fy3X0k1nsANwnOZSwEqW636OnZXfzU1bYd+bYeOKN4633pmSBCUq4OLWw3FxZDdzDvtPI4BySLACUd27Y9rdFtdvgDITP4yIO+YVRiev29o9n4gR3gu1ar3yLGW0Sax2mrG+9EDL49Sb5QJESquRIMeC6MoKaoO9khvFelE/32y9wEck1Fo+J8Om/T7OgchzAuWHbatGIE1UJmkaOyX25/BAlm2/6H7vixABSmD07C8SIN3T2eKa6LgVRMLVPBeCpDfIITA51v0dp08lerDHUnAzhgQENdecGyxKAgxIKSrujE50OMP1RzbAMfI6KU/hkYlcrGX+gQXkWiP4Xl53DpTf8hq50cq52xbWlp24vbcQ+pRo6AW5GaV4fR5g2fON7jNtgkV/qOEQnJLhVsGYwQzZIQfhvYAvjiRyK2JRLDNC/bnMQIhOPCMUUym25prvXBwHxUYZQRWSpHgSd7HETUI7BWupn2IMzCIWCL1dfLyQ2+4FxJoHFCfZISBXko61pmHC80zEjWOBtjFd8BRjrGugE3Eo2TGccfqcp8q2nV2MnrNW4TJbxpSPtDoCCplEo9ySsW+8MgcO8zTUlPa3KzFtxiTR7ohJhG4oTyUxspkNTw2zW2bipVKQdQjsmDiC5tOkGSBz9QJL8v1EybiBr2zEuoC2JMRssMljrDk511BmhY6khjT+g6+Z39ySR8SLNlArlvIIQ4p7d1irOC76deOLKqYgZ3GkQFYAEwuLSj0HSfenZd/L579BP1YufKYMpOEhB2XW+6S9hzjS2sKEZpynTatoW5FgnDyLIBfV2VfYoSYEIPM6gIs+eTF2UlvtQ0tl/dSEaphwo3mFyhBfPrtx6fHPi2l24br805R/WHwjMDfa1KAWujIr+uTTzpBYi2HEdt+Z9Hl9MYgjy73/0n3Xv5gumY304NiP1UiSjqdfQvSOe7LV46j9+fncHD4suUKIJxPvv0ja6v2aKuptyTds9jcHmT7SYysuZ+IYop+TsMKy86DESqkM8HxBHTAJRG2k/tCyCDrele3rMMVQrMKwj59oG7un/RWeArANVxN/wx7CGwqHj0sSXNSH3xbLGBF2sZD/xH3jqyrtf00mCjO/i8zkZkSx1pHFDxupBfkdBvPWkWBgCvv3XAePiwPtMtL0BByNrK3ViheVze6/io0RRWVWyYqzLcPAbdRIM2Odgmjuy8VdppPHtPtEpqDmQbSceShZjTyARgFrJeT3fbyh7bF4ddpcGBl9savCS/MNMrG4topmWv/3QlyyvywVcO+pJ1k+G7NCqVjblK6w43BRBbRYnQ1GulLe3A9Nbb6Euht86KBdhqmpvqADGuHtNjaHrG1FT5RhDTWmekUnhGnL7vvz/VuRlqboysEOmzqd3ki7rEi8gri/mWTqgd02DBrjexrdv0/eq56WfRiW+sq+mmBjBOZCcM4NP9bDjS5gkPKR6a28qoea8HYhNDJfqWKLc3fx6JC33pDUFRK8WP0aEZba/k4WctryDCWzdapwGejBXJUN8+btDhoU28gCzaMClnsN0yjRG8+Ye9SbIjbppETcdqxbibktliYu9CaXnEQrgcKm13TDhbI+n/pOg/VEYWjkaSj0q7UiWwjFCsb05130O5Co5w6MImJ9e2l2ukFCC2cUZ+pOJUhGxPmpaOABu+hmwEq4NJBg0HQGEb32hOi72VrzQ94vaVrOfmFzZGygTcEzv5sfBKs7K4NKKyiAcwQ30TGvXGosvah+ICa7TSS8bXxELbGBfpXbSPJywfjLzrccg38xfAfF6pKQBJFAfAIzRbBdxj0eq0CpFtCwxLpmSY6uPwqwi9IIMYwBDfjfUWbLVBilYPEg/mL6djJ1l4aguDz42UjgzhGvBnhoWDGvHCKbQVwYSWsH2mSazoDt4VLoVWHpDChGD4Tf30BTnBTQNferAO+ZhzfHaT6R9ahaog22CZXblfLE0FzoO1NqZJK/pOLth5yEeS9AR+U5dz/MUyZwvaAtPquEeMdWlT7HIsfMMVSSaT3XvKxP+EMx/KGlPjiBVqoF1CyYB3FbCZd6gI8p9BGHewFGovd1rPyMnZrmKQtZVdV141/MMeeKq9uU4Cs8Zyc7/9OBmdX4jVyxyoPWO5xMZLX1ZGImB8uLBRfx4Gxy2IqLeFxj+uSy1vcOT37kwuFnSaKBAXExgoV6r55aIC1ujOZHxiA4y36TN95ydaXWM3qeGrxLrFioF8hDClYmxMAZQuwjemL5zkTlfNJtHtV2GMEqnMYm1actepyqdx57OF2k9U7QmowzwoDj0VtWsLo6AhJ1jhlSRj8VO2a7i2s2MQUACdvRldIwSUZrfM6LQPaAxgYEixEHhvcoM1U0UoNJ2QE9sug40O4zWxY1ab+gyOqiD3r4xzEInPTLQMTz1M9d0GYtp38OD8HUkBgI5t4ozsNygToPzRRDe7oj0KpB0aLz7TeRDtsLUW3Qlu6bOcVbm16HUNDyxaTZDwNU46Mxb2h/aVfITsZu9pFmc1ueR2VIUJ0y3ANR5unaWJHnfYwLqSoXzq8lL8adqKDddglztPR9Q5JhRbHPdY3mSpiXq95DFvI8nIDZOq3BHPzHWLD7XJMXMqa3lVmdYCkFrIF1WbmnW+jPtw8p1puTl7Y590ey8IntRGrBcAGknuZQy/kCPdpmhU3fJ+uX95b+lLfUb06bMZUrbtIJx4dtYAfYhhvWvCjxtAwJtlXmuzYaV69++77fRMrT9dfvTO5utCHk9iod1eZ76MOwJrGES2KazlgNIsZDs29EKgL09q779xD4wgxYhkVr7NLQs2y0PSzH4I9R8bPut3AzoGCcIrShgnMdgnAsvzYQbs3f5sultRqU53MCm8vCXG6ZVEaIg75WG8rhtvIehtXDB0QAkPQZckEX6Thgq6nNRSw21R6nQCCWy4h1WUjKzwnppYcbChcdJva58ec7mCWiAO6HnEmPjUmYDrt2dDsWll9dUi1TyHi5Zpymcx/e9nOhvQ5OLobeH+fTl56y1ZIRCkPpEQL5impXVbx5Ykjg3ZTF6ItkKF9y+d9AcN5G8o2cLJBbUY9Nff1NRZvX4dvIB5RgLg71aRIeEgoapcKIh+8pDvDTDjnS04KLFAehRblnBeHdGrqd1wvpdSWz5qTn2ERdjTO40PI92ppP2ME0uHvBN0GJIseVYPyDtXUQqcSma5h6bjwak7nSCGs9A7fm3zQN9eQ51rfGak4ZPk3NTLaQgt5YQFMfyxuieSpL0aFA3ifuACUxdf2wFpwbYuCVfNRclTbSXojOAhqBg7i+FiWhki91OcP9+6uhsjiqIu8/yRJxQso72gpB9sqf58GEk8X1vn9ZOmSRND06GOM+SH+bAV102HH1Gk0eD57AEXYTMAI7yqzmYzcpPAjhpyAKfj/G3PrAX5idkx7+zeK5sMYsZr8w2eC/wMzm8gtRD2X7C/PIMnyHbsx/AX7S4776ZDMDbYm7cdTdji6FLk1oTwSzot1Pz0TMdILbv2FqbLgXoh/T3Q9YbWzwQumJiDOXu9EVzrtnt7Jv0y3cwYn7cuqutp7Gl24E27t2gBvnV9/3+Sb/bAL0WeVW/FQa1icjQSv9dJY9ccTJRb+pZJs2Aq9HwXt3XTQ4EHh+cRGh1pLckjC3nZsIXhq9T0cS7e+GLmGuDWOrxFGNCLX88NeAtdvU4U9Ylv9Awt2m4BlzocnLcRlDluzM/otHQZ612E4VkwIbDusRzBjoi98JRqN6aqzmZClMKoW/TZhKSb+VCevSCqraKlwMtlXF5YgLP7IA03RDjBpce4sqvtBVqxTU26E5SHhYENXBL1c/h7ViQmOHpf0DSMS6pBLU21Ta0f8VMCVbFg+zZYwTjx7GnBMVkTBscOXb3jOwZkkkINtebgXwUldYxWT6bdkHGKPtY6gsk4wLkqkM31+yxslD4f4wWa+vocer1LOw5zNF9ihLVDdL9dOSu4T2cVMWOnr8mkGHgwDfALhgBw60a1cuhVkNMgl74NfwS6H4egkR1VwwklKZKjFDbCOvlnjiDlQInRSvycrj0A5tTIpRlhnXvZRWZSleT8+DzVnpsk4hvijl2qHwhGnC2fbRVdkl4V6w83BepqLUzmsaUcKRwj2fNNw3U3vBMgpKevFIOi3pxzC9Zf0SdqSLivDMF7ly36QHKOWRbCNrBCkStkWCxQXurxc/dnTBW/OUTBCqTU2lxJdLiMBIgXnBIog9rIsBzQ2SZ0Snm4vHpDieiTfKewTBheo3HTfoKA30txZ3EZ6UoktEHoyU9z7Ew4OnEKgzGnVXOMlyXvp9QBRsTbQZEvMxcpBjqrzDuJrzkvyzxwt1rrUBEhzvdcpy7etS29SKs7HwrVxAdNtAJeqbVXF4EF0rkVt/5sdnbMadd5daRynC75CthQti9kRHsOtxL0ZdVlcmPoqC+wLgOvVQE15LeG/FxNg4Fr6V60JLqn2q+KLeQrCzLtV5XVrR+A2tJrTXX6+lObAsg7JCHBZBmSbSY0nryqqMgZ0epLcAHH6BCIbHUJHdPWxpbsdE/LYGHGj+Da2in2CDAo9YEuH0+axeM67wDe8pYgLp2ESj6KzH3so7f1sY3FzfKmiBGPmYh+3Vt1v/QwIUjfXv0H58wxMdCcfxje/yckqx0y3og8faGRieBRk2lDJI8ix3e7IYbitWzcvYNL3WSf8TbaP2yowToj12ovNzZEMKJnZMeMsc6EH1Um3t5WeczREkSU0V+zYunaRktgTguJ2L8CGVHjdNxbmcqlaNebK4EoFJbj10WiwK66vPGYZ86J76VaLXAECVCB7pqyfUjCYNXcbGvb584wd/n1aekUEUtVYRlfSPvptQME6NF6F4OaV9vO3TVoKhZyxZFmjzDup+aAYFvSAEIU47EJGOhZjqL3aNvsvpcMHeFJvhiZGoB1Zch94VTnIEZnkH01ZlNq9AJBONAmYlbaR6NYtJlyQVQUXVjd8Wh2pVahgrmpXATTMxDIVoqMTcDJqb0PnigezmmTrnbFWnGSmRU6UNbUbkdDmhgcxiYdW90TgxeVWOWEZSfeiwMutNPYzRIWoY3r3Fx3YXhxmhxs0fKKAi2yb+JjpmPMgNQokqvGFIfUtVmWCRVgaXQ5SbosBawkAWFWdIyMIsZmPA2nqTMikF6GT6ZtQyKCf7FbtQVVYMtVBAtI5bQVuMRDKqy2b1kB6HIwyp6PdaCLzRLGOk3p4SWUysHmkKuGsaLq27bZMLV0890G6XeqEQF20Wq2ZYJYS5AW+LfR/pWn5MOTbIUyOldel1zKFR8Zu8UB158is+Sf0MP7kBBV0NIwPl4O51jyenOaiZW1dBbOrtYNVhOIcxtwKUZ1tZU2hCg3uqifqoGiTGndqxSd1UEvb5/K6z7AXqUpeXFOOfRwUU2XlYiBlRTMBepNwepliv4LmWg7uugR3KFHtWHNu6l8iQ3lCMPVTM08o3jC3XQd0tpMKrB7EXzLZ3Hiqp0o7axN33zMzi1j8pq38U0ceAKaXrVRVXOkI+lwZWJ8eq1YENwuf4Aw8XzgZIHswjdKPbFZaNL7RxYgCBuWrC/SLUWvHh+FLeBKElGLA3/23fDU3dml/8faLCZcMTsmhO3pUxAVjtoG6JoujUROTqVaXE20Zq+YN8phz2Bw+6b9HLCujaekvFqg5dc/2DmAMONBkTZZjXaGoXk9nuKrEfl+p61LJ1/pHjExdaNe0yHaoJLgvlVA/sVm1/q8dzKhKcWsSuGoCgGrr1aLg7frto3vUX8tEMDfdPUmZIWEd5mt/4W+n2uO7mYzWr2vpeKJmUc4o3IxwSB94rbMoNUNF5fIiYmF5QVFpTJUQOVuyS6HFa1YcZ4V4RmLpp2jHa2PoQEuzbJ8ljr50bylh6jh0a7vsaic6xbFBreZuU9aKvem5pW/DysOUM2/nq83z1IDFcoWWQjWzlp3DWTDP4t5ECDa7G6+UdgxzxMFctO5g2GbXvejLjcMpCguoTps082mhyJFsg1gQnm173J7AEyFqCw7eveeTmUyKH9Q+SpZMsnbQyklZGUiRLkSydjKWTsfQykV4m1D0K/mDwju2r/0F7TzADAzFCM+V1Y4vFdq2TFwtEJ8FRbkqG8E97vKRTucCqc04m0TeBp/E/ego8nCwEQ+5st+BZ6EYHDe9FtcArO/PrP5Nc0ukkmok+Hx+inzMTH+m44940PR9tN5z8pj5dh/bbnJhBzbMdBf0M8CCjKK7C2Ft6cqORIjtHEHiL4rKGsCOOXvhnSzr1NQXWawSp+k0QvgmYkUhMMo75SRSluw+XWWEvevPZ9FEflg4OKzMi7IPNgPBRmKsKG8iFHmGD2hKMgkAol3BR9xQhQd4UC4VYhXekE2+/84oEKG74gMpfllbV0Mn+jkpayxp1zVvjUvP6fcP3vchaTg+zZUQtv7HkKJAJaN4IxqrIU+WCGBegf+a79xvxKn2QFLqobkvdo4ftQnrJSfb0IVGNWr5Rg1Arzv02dU1k0PyN0sDuSf7eG7nVjf8PZhn9V64aOg3o/OUSMcAJEuAS+gMMmsB92C6kF5nGrychi1psrXOdhLAU5ip4GfEeHKgo0kDQrq9GydBiIdALWu8yv1M3B7lcz3KHnHQogUAoKb5g429Ek7RKJmub059O+28zBkAUnvG0YvzG2Pp9onBKcf3k8ykNFBx8S7DpiZUQSvMQqk/LQ8a1UxmUUAtDUZCacQccUP09oMMc/KC7YweUjMkE5Zwoze4SV7gPhdnrsPnb22mfJgqOn/HDY8WZ3qi6HYA0bUsxy3kNRZsb2oq5xqB7tXyxnm6pkg1mHzbAzVeVuec8cIWlN1ADsP1rc1K/CatOVgdh1kJ2J7SYVhLT6QbgDnLT0Hsa2HmgbX6DC8wK6nTy6/aGB+31+HDz03l5LhRQUNIJyPQSfdSIllpJPcEXiM11e+p41q0QkeX6w4Ys+tz5D6Q+P/q7jBFtreFgAkiznTW9WPuWGdrKscIjxB6JZGTzecd4g3MFN2iuHN899R8wlgk2ADpkaWPb9+KMITzRvztDUdlPEExcWDE3TcAF1wB3a6fb30bp1YVq5lEsYoka2GFU/dBnD9J8mpGqMrcSI7wA7LxKoPNOp/3+xvU1zmifsmgJi2SGW4luZle/gh8dNLVIoYktoLBpQtDHU5bLi6UpCS6ky5fIy5g6GhzvKYyTYX+ZVE5MCQPo5FJ9J1Bk0hIzSi+uFwqci1uJVo+q0+m3UX+ZimVjkgQdaq4vpmaiRUqCpTgpakacgJEihK05AgwJ4J3yVMeyPy5uCdfP5xQPLWDZW/8iylSSNaOXO4Ojc2eOX0hTeq1NRrDrlQoAO/IFfR66VN5idHJeW8+uoO6uS2DcylTz7gMvLEvOEkseAJICauTDmtp9/kTzfSVF+n/eUvhTMbLfumbKNDI1txKX2XEPCZOa3sb8fmtduQzEjw7DzOLCBU8EpUW835rgXl3arQYV/WqJlcQprTPlYmFAZn5w5ggeMxfwDYxluu33J+UP6hbtw20Quqxt+vhusSoyncnF8msI97byUeam0OG9G9ceWsLMnugxXF30ePG762/TO7cDsZ7Iib7ZWeWWNg/6O/5dMFURuyXpPhgiMOIWwToy+jgE+muREKBdOpz3qYn/gsFCLbbXghvn8XxS0uM93tSPy/QVG5OpxQLCqtToCIaVrT5V3Dq2/w42zsH3Yto17J0ug59t//NqnuKFuzZE1N05kNeA3qU2YNAXQb00ow6M3XD3iqlDWqxvOmUz4q+pRZq78GOS0Bh4L6b9azHtHZS6uMhJ7rnYe1V4MrrHuvNjKpKJ4WXTfSa/WzRNu2r6fRM86ddgFm+TPVqZ7lNh0M7ohj5pcZQOH7XwDiTQdxCuQbdCNwWlk4QiaENFS9VhksVjn1kLntrGkFmtfpPK4HRcnVzfIDzQ2NAG8RaZGa0PuPGEC17UGNOMGtUZd5g518QzcQQDd7xD7xN6nvDP4I/S53waG8tqcBCvlfUBNB62q/a8vdtV1NVvlgUC0Mmd7zYymIqKVjRnh+uLn4Tj0eITwoADu6b2gvDsrlg8+aKJF/zj/sec4dWlj+y9vCrG6knHD5Kf8dJFMqScSh3dh0xeSVVeMRTzgm2E8m6UStBJxUFrTT6wv2sDNS/ztCv48yb8MBqj/Jbex+ek/txZOtM7QMWdtXIOqJ6a2pOvC4yxJeXHBSuQnV4GWZ5fN4GKF9ur2Uxi0l+4d6SLjZ/vbbokqzA2Jin8u4xGK68Y/37sHphX2qKF0jQaWs8/2ticnz25aBwsUKch2NWe80r4+bIWeqV2xCtdoD59Vcda5Ke1I3Ihxn7gc9L48+a9IM7QF2ZyK1A155FTjfQNDrxDGcotOjve8DX23CN7RmfFLW9rDtMRNZKMASNH9D7hyCd84qdRZ9qvflZtTaZm7qaTdGg85E26210nraQZm2aR+o7FF8Z+hJuxrzruRZ4QBsyZ9kJFj7DmiQshvq7t/NTdluGNU8c/5Mnocm+t95JajAPtsew22MXDa1W6o1gB/dkZzxXzzSXeGAjBSNdk2pexLa2qLzjVYQfO1+eKyEITztNPJY0EiaPppFSBjHq2Pm5VJYhutcEoEYaKPD2nyEpwXEBrMRjm14q3KxrYzzvQywsodz9xlqxrek+Z1j4jIXew42wUiVju+3Pw/STy9VgFAvUJmEVvN74sAVNtnW9NB+mP/uilF6hPwCx66aWXXsBe9EIw9AJm0UsvvfRyBOTKlmXTLO7TC3hWBXhWBXhOBLgNueQo1kxubRrn7/OlFV/ay43oVqmS8NMibZbDIP4BgYdsYEAhxWnTX/Hf+00YB+xofh3MePg4wLF9qy8auHCWIDbDDzOuOmYczJ89C1PdC56ugpt22H/ryVsyih36Vqs4vhNpHv/Ayhh1m/CclIl2fQtp+gd67Jqut3jHd2h9wDOfMAzD8KKxoXLExAnFCxor7v0ekS5cbbuewk9CLTGjztUTNB52rOP917u9M0d045lDY0dUjg1OsWEbN7dTynTkIJwQNFdzzyJIMIZu4pp5Cq+/pGL8+L6R0eiUBn3GIKnuusPN9KRBcgNMpEBjYmuO7wvMmBcomvu6mHHngoZGGjLLg+2r+fbMk3nQOM5pbx5GYNE4UdnZ8XKPELm53ycMuXjI/1ika9J2QiiSBRnAYfJ6bV+XEc3khkdFa1gyVsIEuabSBZF72LNi1z4xl/iCgqFHQhTLTBKnYT5HRixtuD1vYxXQTmc2jPoS3NKUBxtPoGd8Z2zCTnbMFkMNLWJzaO2AQczuUFyaEDmfUm8Rb7lOFNmemLRMWhYP7Rkg4/NQUGtkQWuoymzNjMoeRgyxOkM4LQ7tXJlPzgtlBZTUyXFRHNt5MSU/F6d2/pqB34qLdu7MzAfUoR3MYapoBGT2pALX84RpFG4uxNjUiTY41zTWYf19jgQy3OEtR8WBsy/hLFWoi6m++qLdBCFGIEtgupEX4rGLUOnL3KgcuGpnDumU1vnQgPgC5FVvUVhqtM+oxIEHLHbosjS95myaVP6ssWSr6jzzsu5hBA4hp3mTNHXEiuMBc1Jc7EmUW0pcprxlqbIdgJMcpqc9pWGqHOQjHwTlOe0yhw4ISYH2Dft3RnL7Yft0mGKGczBg9CqXCwFfxmN92df9DcZK7qblD5LaAHGT551AsCO5ikBmKZ2FlOtqKHLY0wkXVX0F41vZbRmUFo5jsmVT4w6wB32DC4HSJSlEi4oJAHaQhxSHdq7MJxeFsgJK6uT4uTi282JKfitO7fw1Ax+Ki3buzIy9yVBBKrpy+Cib4hoZSStvjfSzAEthK/J862Kx7VPV7lM9qSfQWkv+GR13Jn7OULWNVhxL5HITQr0vhNngSfDCUgOGICsRxAJqQ1AHeouBbUX10AszZ0ze936zR3Sj2fA8TYszKMEtqSSFxQnSQYAHgT9XaTx1V8wIiRYrPacEs1plexFQ/Y+7D8wKsxEkUaej6Pj+c7L6VDp9kz6/4BVkCwvyD9Mtwx0cd88Wd4ItWytrEX49SZrY94/AmbdE0sJLbNbonBqVN+qNtczq7lPeHbcLGjHzADkDuhGjxHd0XVKA6NvLUA1QG3lOe94V5mAqY4ybM2Mv0lpVQFmCrcapuL6Kp08BnUxES1PM84JqCCJs1RSishk/ksF0qgtzuhQH4N/4W7sJlu33rc2Rjae0cRpld3FT978zgkXwhRODXr8s1kpok+bA0Cpng5KgqrNUYlT+aCXBRQay2y+3iiCnmNLfPLX8ANlGROhbzkBMZqp+L92oZQzi+dX1IZY0+9RVRdJ4yjJFuEgPsmqhKevRDL8QUqANDznxSV0qfA8BCAQhA/iQYxSHcSha7WTyqqEX8EDBDgTVyWeL2icSbtwgx7KQNjZynxNpyOiY80azL3hpB0UQs03uv0GcSmu9KvJisg64UFH0jJR+zgBHzqsBhVnb1RTOK7sZXvNWzl01KeoTFgJVrIWuG8ECESRvhsB8K9KSjQbzg5LLdPXDbdyEeWJTnaqTjDnpSXVg1ddNHZSAcz/M0MrVUnyvSayu2LxpEtr7wjYD0Q5bvUOBjS331HQP0BerRwVgtsFcGS0t7nmmAHwNcy/YCZ4COqCex1lJihg+sZeVoUcXGhHvU61FnYGPW3dNXTbZdMCv6sQ4aUaRD/cDEZCBeYzofB6NmFwKVSz0wb5T6FDoomA3h1H9ZYpJg9EuMKFMsX2X+I8dKT90PgSmFZGoGxG+g6aKymx9fCGoLKaRAzH9zKBerOGC1KOsp1Nf6ndhxuPlpVxYrc+2wBncdZXmbiQmPQWce4FMiqAJLfxsrR1bqsBlx+2CLLF0/LBNwX4odmsFzd6c6eAopL4nTHFBwdAtS19uwxK+5hMHxeDXkVQXRnmQ8Cil6UjAK9xcGUkovo5HnUrVMwbzvjdZEBjXlIlSO1fZysuAV4scwO2DQGQsX9GDOwPbXnqxJtEQq0q2GTICotXRTCuewo3JMuKwaFDJcSG92sSHHG9HDviApDotu6Ru3zlTyZlEyFn7ZKW1tc3Cy89ob5BIFdafLAGxaNF9RCxYavJFd0Ewi8hpgcCE9oWpC2VitnD0YeUt2celrNhZI3TevPFgA2PmMlGJBREWQYqRe1xkHnXweyhxEUjs7R4KXIikgbG8HEoXpbHi0mVHDuwhUSJLQy5MhsA+TaDV/QVaXHLUwntilCQO1vRb+XBy9dmhJWq/gUbigL0AhG8Pb95+bXBLYgqypi3Cg1FnxEKTNl2NgBb8n/61SyYH7EQYnM7mNhbT/WSqMUWYmgErox2GvR60+GpWV69zneWOVXsUSApnr0qN3VIrin8qT97LSY9OK0WBBxSwuGU0//BTqufjHGsAOwJ8IsqrdhCjj4djdctlpCCU8Twn2u9nWuBwSb8xxdYFRm5Ll6unodOt2BorTUIqc1yoOd51vxMZ/WeeBqm9mtfiOf94qOrd+xH6FgeikZNOtSFXsVDl5xJ+He7angXNf7v+13RL8fPI9XJUvf/JZ6/Jku6TXve8J5flam+R/x6u6nIraBLdjDJjO7PMSlwFCMyIrxcyI80KBPgknv+MiJATqHLIggzPfby4SMqas8hExTo/xUD55XY/gWxARE9TnJEkNPVeK7O0xHWCBMdPPwDKLv/ti8YBpxst/v2+jNjetfa4+u/f0/tNfz+oOPz+Fj63Mv9zdHX6v9qTs3jPFXnGIDLnNFM2ZJo/t9ytsKVfjK5GxAsORVIU27yzz2Dj9duShl+koNneQhnp0X6WruzCsfYemdWkiS4m3MPCWInTLiAeclBiEQOFfPp0O8KFO+9GuAZf3hpKgE1yWqhgtMH0YyUFy4BTE5ivP2RK7GdNMQBKSRNaVNkf0YP3BoW5aJFGz8FsC/MYbHBYQD0ae4GhaNYPSLcGExd1oZH80raauqOjuLAubp/kMCv8CYCCl3eiMFRYDblamPqol0C57ybDiAzQ3/aAm7+hMNFs3eIYqYjN2HlORWu0PvJZYf1eoID98XShe6AkPADn4NRXw3n6qPR5qsimqcdhuFhNl2tTwiRcvtkqiBgFl6obDFJCGTwzV2PziATab3rKx9a/JzY1PVL9G0qa9rulYwALqz3YXVlA3gozcYWP9YLSkTRMiMZDx0dt8LJhYsF5pMBBNhILJ9vBXgKVoyheRYKXWOrd9dQG+P7pQ2bRxB4ephvE54jtcw4VKyenaq1AsWeJOqaokhZnkMw49AJb/yKqJn65w4KQ7bmaBEmimDwgiJXBLtUiQeSlgo6u9UmfCXaJPBte1nupEE7FdaAYpflmgaED/fEbRCTPSNy7siqchC9mDHGakKqVp6vhkqG9V/Uq9ayTBe2qaMzM9054EzQA6qszpNd93eGN2zKit7RKtLkkEF5NmXy403DTQju//AVATcxoO6UdDheQtA6zmzDXHlpjs9G7Y0JaNzuyQkBmjKFsi+JS9049EpfEPo4pNNNTqfAPK1Cky+nsGqv2NxP7UWCLuAjgg90BvQA7RaJWRXuCx5ocJReCtIhurSZniQHsI1zWalB6FSRIYB+QcPLWxVIEcJ9F8S0Hn212wVrw+E3KFslIhN0v2cCmGqN2vpJQTh1fFn9+hcnCcG3ThMNFIv/WtHLcf+qhJ7Wm/3esWZKknQK0WTlLD+yQtppplzYOWF1ubvYlsiJdWSfnx2BrDX+vwxATLmJrn5QL0aCX/zUiqwhlIyAaH2v6YXCclxnQhhgv4gSOYQabcAbdoaygU+UwHlJYmDxYcoiFySMQptjS7/hcKKhEZGwNQHguOAfUlgvudSZS2K3LFjlOf4ISoBC8jLHzxYu6ZnTJ8nzbBDxB8eCB3HJnfipl0cO0vF/fbADGjJqQmsr/KbgZvISvb+aRVqe1BKI/ZuW+VZ9RR15yYp+MlfbuNm/LFjufRM0CCelnRKaXS16YYEgT3QncTVhiIiRzKSiKKuWhjG+TtRhzScSOwSE2OyX/xQd6qauSPgYH9Of0eYedO5Opdwcz7nwcmQP0yhKOBaUAHn7F5BPxN+KJxRz22gJjGqA0qD9u0ZmhnwgPE/OWRykavVTJSo81MQDV0hIdWjQvyPAe4ayo9f+R+slKwTMW5+3pHF2Coj1FibLJaR/8v3OKaB4nC3RTBZLXUE8HkaQ2Rp3d2ALhkpAYYLyb98NrI3OifAbFFyJkh0QEVLZz2O6K2OoQ2e3Tgm2SNnyy8Rj9f2islVIj7yKK3RB/uvwfkiTdxPRd7PowEw34Z93E555YFvY1GNeLcVxy680JYcoQ5pBKMjJb9xocqXx+9onJTiOZH6zqz/VYXMehBculYeIZa3u0mIM4vv2Wl/q+77BzvfQIT8sAmkCfwgCy61hlADCM1XI2KRHbOiHbotu+K2mNDUNAbhlmZkGexZxp/N/jKDKvk1I7kduoMFmMg9eSuUQZbUE/Q8tMmuGKNMzQ+I8YnahNFf8Me7+kJNz12GFkTQDnA5mdJaHecTJL4TShl7OhwaIcmjLa+TbZeZO9vvQEFUwzQipNVtLAmnD0PWv0myXoXekwN4QHHi/qRKsVgVaNv+/gu7GzX2uuleYn/KAmckqejSpW/nGI4APeKgWLuQak73qbSNF2LMhhthHrRj10s74YTzrD03TrmtHgTvWNG925HWriAu95nHHXzumVV8sQW/drI/rp9ysFNYah2rFvK0lUAox4cT3r8mVHcO5szJT9B4j87jQ3Lz+MJ5ztFCdMkr63wj6AtFbhPbcPynunCeVWhwXaJUb4wArjte8jhLSXTDUPrZ5ygmA4qXIb4H5nA1wiKVAUbiosm1/FGDYoZXt+sHEr5asUbk4vMUFMr6f0BJjC0lJSocEA6QtH9hsAU8IxPNnOXWGn30XHTSGCa3cwZrt3ylk7YWsVMjzvXTnG7MqryEAz9R4aTAEBwxVuD2p67IhhyCKSdoZ3BQ8bPaEnY5ERNv0eOCN4M/Ux/ndEP4ANuoe5sgWO5Ol6ZPvLzjbsUI0IeN9ix9OarwJXoUMqDzfKw3FKbxfwd4pF4Hyg8DNkq0aTGcDzT6yeSjVgYEhjA8Bt2Ja1DxdtA9Dyo6xTS+qwLggcGTfAXSYOhWoM/sdB9ceVcb0yR5Lfnkk7J0R4wg7ojhk30v0mVm/Z8OuqVEUyq3AGBG6a1EzMzcZAs+kqNM4DCgyxEv3CFNIRmr9ufyVwdPYSU5uR5CkoJDE/bBvyXgORRe6tYCVsWBUmeBlsngceK04BRpBoWazHIa2ewPwoNjfoW90HGaqARVhGJdiTPFyqLIGeAplZlbXyPROWh5g0LWEMAxtwKewRNpGLYAVMTkjFiOk4d+RO3azjsMyFxnfhH8CnMPMBZ7kfHEJYhQGom927fr3EtslAB0e5rtIEYS33Es8GPHt38sQElWGOg2gDTiBq58YLgAbZa3D3NiZzXwix5t46H0cqoqMvQrHm6ECMjUH6GBCLnKRzjwfx0X/62nhU9fzflnRzB7cOGEu0qMEYaBQXGeVAECyREHZAcbI5JUko1m6QYR0mvuU573TgqyMPpg6BWo1g75eRneNOe/eNJzSU5wgmt9pKZCZFy5IQVZsVO1IapTS7jOmmOXOvyw0tuWKp2mJmI9khHOsr3Z+u5lTzXaR7RdxqFlbYgfbKlPa6W4lPrM5lAH1EkX3e8jkQl+/EILVg/nvYWYddswlzj6JSqaNpp0dNo3YkoFTHVYh7dye4FIx0D5dxcnAntYKfhvKSzy0p6C7ZOeB7r4F4Ku4LgKqHkBJQPAGF5ET3Hb/PAbJBR0RkoGI29thvNGRHnJqNc8hZRp2EoKtE302X59myfA/L51SBok5ZQOTBngwtnHZjcPsx8tdJYdbsgHG6fTLaE3/gzj7/szld1boZTCDr059Xt8CALKhq1NJOD6NR3ksQU34DcIDEwu2kc38hbBjH0Nj1wVjRxsh1amaitcxtwlvBworhtTQiIdNDG/QuE77bsDmMwkkkML1GViER4Rcmev2mIoYj9wiIBqFyym9kuWRZgG6B0yLR67pFkdNE1LFO7IP3ruJNQZOZTObkXEXZnxT7m0mstBmXvY8btHa4si+rftZONUN5LQ4OISU69YFLE8yA+RU1cF3dsag/LwntQJcEgxzMXHacbau6j0w+dxd/9E4BzKJaVKWTM1wqKoXgKZoLrJS2show1npI/H/YhNYzNmaC4LnDDVnwZkxsWSenfvCHQOPj9Re571yRsWTPrhtU8ypG18jz1gLjZoWdst72Tkr9pirjbyt+jIqC6Uz9AV59SSBzxT+9EKlG/eRzHQmKF1GMIJSXoD1Ustpzv7i85kn3mJTyIih1ZDo2E/XZsOqqoFzJlkjQDQOnt1lINhpqBkaLpO4k2Ny/SXkqZvwJkXzL1kxk7tJF5zPSC9+hX2j8FSk57LTJ7ZRsZc2V6g7MaEBn7BzBOWDVDkDeNhjU3aiLuyCBmNMVxmH9dVWKtKqZb2mNTU7f2hIIP1PMx+mwCMOVcJfl8mt7NS3FukK68L1/eFcIFneGfShkMWy86KMOsdRZo/tQSChnBTbV+O5Xhu1HbgbT2gpCrCJNJuOwcN8WniZPQxBdf++c/biuEgv1yTMtQNaEYhJ762XVMlezR7O3+r2IwlnJhOMGSoyUuyj0Geu7Qo3FYIQPg+ENMzeDvo2o1QNA/8xLGctSrPZO1JFl0FAkvlaWeyQsR1NubSU4FrtKAndrfJN5TvDiLpjk4zoSTBUQMZTyiTotgYDm2P9MGrzaBjUAmPOhmcTwNyF2WtDkrItBoBhKVfFeGF7htmoRDNQ0rktFBWy4qHblWXmvCuG7sUaOr5j3xQckY40AUjVFFNpRHhQqmBJBwlyVrVNTprQN3tYxTyPGiYfJRvVYSOfkAidNvHHj/SJE2VqxEUHwF/Sde/pE9PkB53+I8XRSXiFmvhFfJk6cu4aJThDclACA5ygdi9SMr/K0+ue7RruovGA9F9hbhIIkbx31Ri6DNTDCSQlw5nfoFW5BdISAnGtk1AbGfxU2WqB9sk1oqv8jHcms1EeX+E4xTXLYoDwncCdLqR+rknN8YMUB4u6usHifyJoZ0NCI+0mRaEs4WNze9gWBzU4sJDBuxSxfEwGIHxOVd8pAQ3ZJpkqPai0ECDjGiruTm0bQBr0uV/aFJUnBkyDuLX4uFoepBI/j65QivbW0qNa0wyUHoC0B7hY2mLBX7hN8mXgCwxrId+lzsNe2zn1iYfKFBdUbF+pnezx1A1CCM4JXG5GNKarzqGPw9G34bSOnYbM+3xOwYj8BgR74QEYGjAEUVGbLCJ47geJveyj+nj0kmqtT8pAsbZzjlapCzPFC3PQJEGXJBRnjQOEpNwyAObhZiyYPuz4NY2/B1QDPR3J/M46G+KOKYbC+H7nzxUkWvwtZymasHgBhbMmRHYx1PA1QTx7UTWXWCKMYd3k3ttZvRBtmqOQ7YvyR+XyPq/8yA7+HQneva/aNBICvTHwxuUcutguxFu4WAfyAHCiogb6e9QLQQcvba1MaMd6Yni+SVT8vaecWCHY5FlLK/QUwXf7WDDJCLzGsr0HYBxo8plSI8M4PL/01olkvGMD0MVBYgM47gn/WI3of0kPm3tpXX9QdjtU0hNj+vi2/y81vNNo4OtPGxWTusBNVeaOg4jD5Djn/53/1SYc7TTeyrDo/pNeAbxSflqmo+MDnoE0iFanEhBhtfgEoUtG9p/GWK3IP7T4Mxo7VUdzp8VUcSWBb8bYCZZhXgViduB7jOxfIb/y7F6eBrBC6E4mW5oKfK41oLwIY14UUvlCtR/FedPUp1I8cFdVHFeowhzpXiekrAnvfqqnNG/7ll2JQgZsONE03bxr8U+u5xz/1dQmExRker060frT8Nv6MzjkwWVPet8Zq8hEfLaudPxssDmEJFO9OUYBfaCikDzj1pH7WQF+r56ntzP08lKSXrIetXTV+2zF4rM3WaNO1fjtoXQnHOrWbKQ8tVMcP/D1yBVC5lQn8Gf0xJvJk5MfONhidyxEg0TsrawtRzJ3i4euvjI22BJF8xlLQXdL/Ne0uH0xQn9vEIepYl92WXC0Wbb+Tp9Uo0ZXvy8n+Jsa6+i8yKelWTimma8h0dNObq8tjdgrhpoZKVLCzJybHwMgwvrfu0UHkmL2riZosFAg4fh0GoAL8dI8H5NHb+GP+s+FP3N5Xq28/ev9Qf+KT+y3N00jZXlC17MEk0bdeD3KQAEIjdoHtS7PFaZYCpvVgpOQWVOGEGpbC7srAjGktIMUNOQe8VhzJSHbBg0E4i3bI0bzOpFQpBaqHDXSBc9oTwZo+Y5dtGgoiNq1+rxnlRVW+T2riAwelrRi8B4/rUcp3Ez8MCSKfFB6TW20yvJ6tXjJ0LCledsT9WsIid7vAZxs0hy0YMmAc3H8vb6uMffMCfPQvLthdrRTnN1iZGcPhdxJnlpt9kwWA1U+6RchD4ygxGg7eKCDgmmteLbYAGZ3l5fP5D7Ym2rWkiONP6ePyxI450+IF7GDdePLYRXhV8omvnrKNgR+8ABJlQn7hKWKY7p0F7VLnkoXao+iXZEaWHaZm9nDYoSej4Kby4VDYI0vr1E6O3i3BzLO81b5T9KskUIg9/DE770BqFuccDJQCvF93yjtyhCA/0TcvQCdUwPRHeEBOFpSW57jCfminreRQfnAebthmxCPo8gGy9FoTu2J7jqwgYc0IIWggnEsDDdruEmWdz0FctECPtbUj0qsP2lgdQpNUFHBiFnfi7CmUqmlgFSybjtp7rFtiOEcsSZORCCaRmAsunB8VFZnIw/uTjI7KuUaEQ8O6c27n43vaH3qshhq/JJZEy9vxkEukbk4YdB1pSZNMaCAG98U847qyKFG3cGlFjWhnb5pBhBp8crOSpBNVqN3rufCcCoTCQBA/ecT9PeuxoPeeRtcc0OXZPTeY4YIePBCM+QCxUEN6qoG977y3P2fpR9hPjjPZ+bWZizaDTc7B/h2g8/LaKdpg1Eq3pG74nITMnb/Ljgdqv9fGfpKTz5II44g9SuL3LYyg0D/+IMhpjCSO83KL/0YK0owdojwkiCQXuBd9MtF+vyBDjT83s/n2ywk74FStjaUEu/8JmDEn8eTox4QE9Tuz8wh1m+G/CzhTHTjydy25OWHxHWc/OQaHUHwlGfRRcz8l/gPj05gQcQC/kD2ruwfUq6STC/8eMscXOcnUDuzXe3Jao7UvHQSVTpc8whXwhXp4sxQLLC0ZJWtkkH15aG573kJ5CQm1wuaoIAU2VUTiODcGIdb93jve8J8D29XQ15VyS21u80Gm7Z5li2t3Tkgmp0gHZaTDiCt85UH3X+/hcCTc+N/pw7Udrmu2yyhJSd7GLR+SNLR1h0A/XgvLuiAGZQqsPzvUNkMJNnb2thcUdNGYDnMRpT7iz1gGI72G9QQ7T3emenOuc2CmVR5LTG4eiHFbAl/bPEI2SJAiTBPp4RaNml1F2y8W/tvpn3eJrI5QNCu11bZFxjWE5bpo/uRaGIj1WaQdrNMZWfHAVy49euuwfG6YqUePP/L6J0e34Hxv9+5P9BKRwcqJOxL8QVqZsrImtvQugjLFdZvgdCXDNpJ6H+tpI+1NiCAefiRjPlxNh/jYGfsJ6bLHgtxFuyPG3UncUKTL6Ge4zyP2AFiFNSE4r3ivuNR6i0rZHR5nPGkIA4O9EzlnFzV2fgr6HdOKm1SFefsMx9Q6/MOZ0pN8YHcwKlhVM4ADzSXWIbDW9DbFTtjmolshfAHn1J3Z5XNlpEKPppSp54JOKSpyZHDZO0r6nkPl5d9o4LOPpPIjkxaYlAOg0pxNcXNSlT03w7n+I7a2YZZZHuOKdUJslnVypY592LJXRMUHrdE8kn94QjfBQFe+yuPm0NCGFI1JkqNU5LZii+tLpwnnbC2fcvVLEFieg30m4F7sCVRwsD71ModjfsYVcRGuvC5OjzNSu/UdXryT1XYS2BkDCDQDlFiSUBVADLlCICwhxz9kqR4p8T7UUn9rej2Hay6CFT/MKOOdPwiyNE0eiMjyi0/SLebZ9Vc5/wSt95dfJFhVygoriEpfVbZvMqCZmCrC+k2qyVCTYxRCeVC9DOCKH1QzNisO/CUjJeOurBxYcFzMbibOg06fq40GNcvaNmdUqVQ9S4N3F/ZMWOjUAqvclM9YwgjpR5A0aSJUlUKW5qjJYi5xUM/qrdhOnVlUxgzRY+mggwFGept707ZHXaVx9LT5kqtFsFulrK3ek/RYQpxN7fErT7/cJirOtyOGEDhtSDs3fnFvkn0ZlDsS9qopgcHJ/ngvrRZ+VP5eh84TqzHYCvRBeA5CGrZNC/KjMKwrfJYvUlBu0UHTrA7hg7yZduYRXd9HhTRHN5gtuNjLHpsbkBy714+jeZqmZF6ihkCy63dqdRdfKJVJzu4MjSP/afc+YZQaNv08bkyZ7b2ndG3VS8tHkT27vyHYoaB01QT0eG1okG9Q2G36Tg84vVf4w82FpIg7oy3Lan/tyO+sji51p6iU7UKOWjulqrQn8qM79/lWOylu5WzGru5o9Ky4Q4pkosZ9mK5ZyTcgrP88QFOXg+mv0wn3bjsWpi02o0/u+oD3o7MEauOunMAFGJVy/41T/B93NTvOfPurKbAekwrf1dUMWhH1NOHKRbEKjwe/8EkLHMH3Yy0MzLaLjeBOPueOpbZdeaVdy53XusvTuwrf3XW/0f9zHF/cWdDgECNXbb7bal/GeLA7dXwfKl+mWOVYsvU5UVnmQO+ciUNbhZrbo+EO9JH5fhG8FS+WEHR/PVqj1MNd2zlu2J7+ppLWlrzOl4Mbk+XKWPhWLgh02wjZhBilstr7LzLzlbc1C7q6Bd312vM1Fn5fXFJg5Te+WZLuZl2omH0r/HraBecMUBjVI5yit12QoKWGFhzkex0CCBQ4glqxTtYHP2E0WJjWn89U2d/jdC68ldtIDDhPVRomJ+VBEEsSV1pcfHjTqKbG/HtoNofR8WaJvbadyfduJZBKBdXw9SKujzrGFuwn1RpZxSdMs/ZZbzOICr+86w3E2KnXlxL+ZkgqjH1vqUhB1ZfUKr7zVKu491G7imGyIln0ISHkbi2xSxqzN8trq/+78VxDlcs4NYkBPmQoiNAeGi0OR8/Rf9sJmhJYji9pF+2QxhXALFn4IEGP6YudV27SvOD8hIh3hLHUKfy5pYMSKRuVUFQlH+8bD5lErhNgNmlD/kZeSJ6iwJHnOTNSiZ4nwzW17Zq5n2DEGTMVvsvry0Qc0+zwZdJ4VoGh1VvQfDWjIukkikpeWrMayTDOlZNeIn6C03QTdT5C7dyJ5aOpu2Tm5QSDZ2QVvrtL57RAez4uU19Fm7vubUIY4RrTUzjCEzAiR1VsQHXQZ49RGX+9UVVAQqrJG99e43zwe80Xs0OK7WrHn4dJqKA+oiN//Wg1GPmhQuf447c26Ynp8vZ+Q8+vIogvhPzh2I8qK7Y9uNxSp83DzByGY0Lwf9Oq70kmTm1CTrS+efkrFSGflNZKexahXk3nX2bNnL4fQx7kSK7lp3D5m9umrMMxP0kKIQLiiMmp/FdyrPl3gs386n9ZW4eHnCcKKL8btw16Eas6x3dehWeR1rvyAe7qVAEsjsKctzV47nJXGwCY2f2oBA0b+9ei2CGyBCJUJHMgT6snXOPIGdsIEOY5wfoZgW0C8iq6HpngmunhZAJMLE/YBmrdNdyzNsM3qHJwpOP8GoWFKNDShCYTvWz+KQuM39sbk22ThlUnUoHDN46iiwcRI6qxPKnHCl7DmHRu2YVnaxT89zvFPOjmsMU9fIleIu0q4w2CQWnwx1vz5yeihHfVMjIcYHQnQkn95OCiPtusK/Nn4HtQsgE5jCRCXNEz6MYzxhTp0c/n/QU22aOG7wUZ+USyHJHPZIMdhI6d0Hwn/0pokD000239GAKcnohyBz/wgJ+XU/mYHjdt6X9mvGQG2AUY3qUpVc8cIEBs0FKn9qhbI+eyJE5vGxflonbHGxFe8fio4GM2aaul+g9s6neYl3DPzIG0pkXpCyZWX7KG6CKxvrdIuof8w2C5nT0vreGrC5ibyOuSTz7SUGb/PI1WjqJIFI/qjs6PMtu5e2PcPNcn0nFuAs3jmdY/Q+56QR8Ag8Ih04PzFFAaAjvXyTJ1H4ZVyZLj4fDVYRJItG+alEyeXtpiyjT45p14FhQFCzLF8CvkoMNUG1dK57ylpI+9zDRWmMiuEUzf4EiiN0bSJWHlqnhGHLNvo8FOqnPw7BBaFGsbJo0s257qMQgvxPmZAKLBIzFs9wAVSknoMOwr0LvGRBGR7z3Bj3BJwAfb8zkxNACkccAFQgbo1OZK4J9mJDBdBLnZlN7X9ebfhfTm66UhqY1cqUkKVypSiKXCl2Iei13KCIYzqIwAQOwJQfsFiLyo9KcFJMyq0zHAw2kyFD39BpDDRAFuCfCMv1nAifwX4T0AY4k07sCgEGaIvpZsVgHFpr083gKw9+rr7nv8/qJyfzhWFws/XPbpLkZpZ5op9Y63Qd62KzeHb4YiOp7wqR98IrAeh4d5MMwmymAqlEhE29XceKEBSLqu7+8u/3w60y6fafE/rNoVTQWm4tCPdAE2aMwHMDpWcDiP0OpfKOFJ9/qvUPjI4S0+/D8Ja0IWPiWsc8Uq/GUKYRMRMdUfMwoylHdRou7rwzUqpqjZRIN4V7fXuGcKYxMtUrqxGumYaklm6PTd403RiQv2q4lqQqry5/5CQMvsrzeqaytDa//Y+qB579GVo0sn7/TeGhi48teQuVvAq6wvMmaKxmM0TP+xCPhPQUGpSiPN68sR5gRPbjsd+THfOsLfv6y6FBm4148emIIYw3EMh4WjDUcdEVVEaERkESHBcDAorH+paURdprS5e/5XX4lQfyRyMYpm6Fnnc76aXVG+0/5LR/MP9yFP6tLBjdrBkjqETK73qIRj/0cKzD+3cAxGZPBBHPj9Vyc69l8++J9fw6BzfDFPs3HwXz7wD2uW/s+WqTVTFz7eSwnOuj60MTwm/F8+2n8Uqqkc6w4USbJWUNG2JrlFJn9kMxB8xSM3E6HIVMjL5+8e1v2Q1LE2fUGMFOfZt4e6TE3r//KBcb3qmFpNWOBf7qmLf4WwOkjolbHlCIgwlpr1WLO2NdmxCWici0d7nmCBnDmmlY6sJ53rttY8xu91s5osOK/h+C/Ow+L1ZlTHv8aB9KMiHsEsMvMNjbv+XiHqW+5Wg+Nb0g2avaoTOO2yomXJV7pwSsf9kPfWVb6DwNt3QWca3/gYs8Y5Sdlw3yyywQ27IzZ6ZyBPFDSODN0mRB0LwPhzadR3JZ7FqOvjSPcYLuUklPIWf00C3uZzfctdJTkSM31bu05CeMHuAZvEOZkIN2AAqW/j17QEJaV164uBJX5chqEXre65X7JNUCKDUq/77VOFxexdfqWii4pJnzzBn3++7Kgcs4zUkggzHI6O0jhWqNWGVoH2oxUWKy2K1OuTt6v/DWtLtgSqDKvbn3nEfAj6xwtpqJg7VBCjAPwgSxiQCvhlR9omY92xPL/ux0jNJc+gDGQW64z0Zf+TSIpg2Y831FAEhWsMhblenoiRMBcVROuEDk3F/isNnQCAp8F2j9oygQ9AdspwddIsCtBXw/mD8kGFDS27wpxvvhLOjN44ffGg8wZ8HoKPc1U0iOhZ+NqaNv6pJ/w1jSw6f1fAsb9pHrNSNz0eHpkW7jxKr/UnwY0b1a4wd3lmDybRuI4jj7Iovuqals4bhERHkah061nh9dEje6/R60UaVt/IWMurmdfYq3amdFdIp6R0W9rq9pSn8j/6+jKgoW74e2UWcsEQ9FAOipltqfJmL0m7JJhL1hkQm138olzstJzR1NRJTPXJnhp1aq/AtWxcGYsxcD/xlH7KQMlYYhnmgNiJZRWK4NKo3RFr/tylcodVR8IXEuQ1cdtKTzOPp8q0KnfN9RwgxEE/1FUVbtyOx/dlvReOmxsRPZoQzyLq08lTAkPeNSqLN/j+LAg7+FE1+KjUSEdtrpA6V7hpoAT6zhMlFw3004XWAxSmEV2CcO6j6kCdqBlfWLsAxUTObX27+8XxHhN9Vj/zocvvrIS3lXRTtZdH5vIQmpTM7enIGPtj8jDtUmgO64XuqGAgCR9/0LrESg9sYjDYVoaGrwWDD7rhk0Bd5BB6UukTon+/NXPxETEpinfsIXasmO9CB4soO8qiqpnZUwCmuOl1kCwLs1vTuMhudTo4WbiTgkVNo3pLRNS7fjoKyuVkRFIuNZ8p+Bzqy50NMLBYQqG3BMLb5hXUex3USosl0ggLAVVWSZwsSol4bZ2gy72iQKjKo4BdK6VGPDGxTYJyTzV6CEUdO1QEftEmRJ87Jym6E3VguhqlwcsJF0e/AC+lIJCDdOf7aDjiWF2cOGcOwUSbLKtKu3HINuzX34wD/crZ2teKcWEv2NU28Wh1GPK1WoH7H+r/Zf6U2MxhuKcTuH6WKuTbvOTJWpJrLG6ndD3MMksziwKtLwCRP71JO8Trjn6tCBu5C8SqQ+J+v8zykBOgQTYeO4ooUzZ/9M18zUB9NRy8Hqw7DgufGUHFAF7UcMxsyUOBVadpzRkBcsC7/QGmABy+x73rjmfxGxCfvdIOjw5NWiZ+ToY6hyvDHQWcrUOS0cEhwX8LXzElhCvX3grDHYv2kNCh5OgHc6G93DRMpKc3wNyM0I5YRFSWG/+RUKXIm7xJFJ6exrlfhQgpUtD6kqBnbhr2lwNlfpikWc67qiNT97vGqd4tpzMbLdf27PHWNlIIOpsejzAD/waRrwQDSdHgsFKpyoG3VTq8feZk/UQvT92nKmR5a6njBdzIu4QdepHRluefkjHd+TLCNAOMeiW8w/cNlRyMHVai8j+O/fvUjHE+M0gmTubu4pH/QsDMENCyd7Er4O95fnAz1m7Vmn6zZA/ZRATJW6U5PU6//ywhD0LbSCgvktkWWvSXNPSl1n/0uFnwwrs01sVegunEzfJIwUEsC6rPbF5HRNZecXi5XozgoVQ93c6J7nN7sYUjTxXg0xbM/i7Ix/HA3pBHETvB+k5RLDXTQJhxr69M/np3Wlt3wYzr95mE1PNReplduGH4XLqJZZkOSjHnN+qMX/uORlSHu9l8SkGQJ631SeoJVv/WsAVHu1ZXRzDubOmdbxMrvvJGJugqVLrsSp5aBDt3lUJPCshk0qhHKWKYqvUxQ+khMD8I1MpSohoyx8ClnMoFFvsd6YPknGuH1MM7Z/z2Q4VWD6hch2Q/b1PrqJADJ4boeNuDF+opP6aDSMf49lumQhX9YIzGQ1kexkd5vwFRhLb2251Ez2sg3z8QtchIWlIOJ3eFGVTNw48j/vGH87CXpG4QZiqUz26MvDVsEHstQsu0eENQpCPXBXV5RHb4yvWeK0o9G+yHR6o7osGxTI4PadDnQYWnyAallMCP9XXa6Vbnqul+ZoBUJIrI0zxnNPfgaVkBxJCoT/wdmZtIFePEfDSUoYGHTZ3wwASXxHzncpG86N/fTV8pr2dit2jkciFFG6Kzx+DA6uY8sLpppvrKmDDgz9FRADgLtnnkjYIoYC3O0b2+hRvVTJ80wLQkrqtMyU1jxuKYWPvHqnBvKE137AqfePLEWE8AeHeklXQf+iLu2ZyBxvkvvRwSY9+PVlA3H3sen5TSrKyVl2d1eYlJ9f31lIbi/ADADrL9+2WsVOVxp71TVkfJElwDA2P2VMmnrdBxGK5QM2uL/n0KmH3mR6U265a7oMVkQC4lgOCfsZDaFEzbmaGMIieKelhcMf+ZnO1zXNs0qDZsOwmPz2ZdKfVP1udRaBCm6VniteQ57vSpf28kNb0qpm2CpJ9a0fwPWg2VzbSSO9ijlFOG4mSiEWld66x2TYk6gQGXqtKZZJhZqiwyNO7QqpGqforWGZ/oX0+tm5L79EsiMhp+/hEhtfhwFbvxHl90hTop85U8zdNPDoHhOj9t6qib9bG+FBOs7tS/6pNZl1/Qft7OQx5eCdJJI3RY0o89aYhFv0T4MKRh1Rbukp7VnUYNKuQWKuXyd5B3TrebDL/hyvyn9GiH2bmE2WgyavxFJq03VsOjFjXcHF/ztEt4fJlNKof8oze+BYKUd/JZQn7SX0MNZG06b1n4he+t4h9BIfOY9XdE7dCVoeYYdgV7x5qvdqyMaee1Zno4AcFRGhvTle7C7Ptd9eySGqWWYNeq9aj7HHrnN4iTUIs/N8rNeOV0NC65+POCm2XaFrrzJvSdhEEos9j5aTsSl5UdHRrlNfAHVDpukFjGwPJAJvPUG2a7SbRqi2s1EQ7TOHsoyVOdwVQNodot3mysUroZLFh6nS9udz100+c6oTb+iWBqr8678NZIXK8uX8eE2cw4XwChoYMteJCktq9kjfbYoLyHKMzusjUrjquNdV4ItQCku9ogwJqMTn4E3AgdXtRHrP1lmsShUjWbrf+n7C5sjcbVLWW/2VjviEdyQii/ovOA82oyZUOUeMZn13f25GbD6QzuJXeFnXrYcphq7HQ63A5ucLpc+hYJ6XPFWeyakA9G62vwHDLffFXJnWcFP4KCmTgv8Fr2Th7RoiHpZ5tjmXeCTyjsFGuImcVq/z5iF/C2rs9mlWnLZpBKrNBzU6Mg5KEXo1fNvue4f0zf26q5GzHln1Up4cUv7Z10L4ZwsVGx3jB9VmDpREZbyB5tD+d6obSATFO+wYtGkO4rjpMi0VEFnPZvStUhCVg2BFPX1gjTvmsjms9Ga+HCma4L7eb05rpWD4H0jEVzlYunJtq3v/8n2ZLjjFoEDUWcQAJUWrNziHuHd+X8T+UL55MdSU/g4CSWePim0MVoiM/GCGqHFJulknQBlYHJlGco3Q6FWKOhc0herQRrx9zXYMW1hkejo4SeZoUxPuJRKF3b9AwSTVeN5lu2a7zzIoLRlTnXTRnnbtCKmqZ+r7C0aTVXQtIG9rm10RQKZxlmrSzadjSGN0e4MIjFxwic9QMxUXaEDlu+u9STG0gRtAfea+TA0vpH2Djalia0raMpndvVJO6Z0TE8vgrXwyd22G5K4Rg4HLYWHf478/He5XIi7BjtmgV+ikrZfhJU6bDpsLpio8CbgFvLQeYg6uKglxmSyUwrGUgOAM+ivRxvFyowjTLkcc3q4BbDL0Ah+q4asrDUElQsdPLiW7EAaapgCG5nZl303RRmgi2xqyJ89do3NJDUeYv/qiRJnqI/3jzK1n4WAG6e/rTG25ylk4SjOvkHJapn7FXLtPFGx19yu7Qj0tm6G8n6DA/rGKXDpCcF+9HTO0Mzm3ZEm9pwZZlRHS+IKTOS6TPCJqaWVn7EB31yUpkvlY4qcB3uoVxtlUIr5v4uhobOZL7iV19kIfnaEjr+MPcgNu1zF8+ayirObcaftmbhp6Dfm0dx2Gdznh4FM0IuRQIDVgEvIlqtw4MgobzrICJ6ADIm/dTIvvBFcDPWavHWplaZjqGPNQe2wB5L7ODXOfTgRk7MBWMI5PVWQRAg65fu2vqgak6inOTofMBusgbnvbcn01oheQjmCYyJ3VA+5TSCJyZdVE/mEFkaJ2JwdwzGecZpkmNzqvOptDYk+s+XEt0V0A0Kf+FTJTPMnTm2omCfMmuXKxmLPMV/twt9S+6gI2Oo0n+TtaJxAZsX5xTg5ATdn7W4RY2Sm5UoHu/oC2MfNWqVCsWRPc8PD1I+tMEN1jYXxg52A4hghTLhN8Yh/yhJ+hEPggvx9KjYbsWGVHpiGscNR+Jg9nOkHS3HmaNUROb4swtMI2F3qHvN2V0xa8MymT/CaY5i5rY8vK2x1EuGlFd5cD1SrsNHR8Mv+ilqBZc9B6MQ7X9V8ZYm/iCDDkMbCiiGsIHbwc1ogKThobH+EYuMp2dslk5mIt99OBUaZFtx9uNr2XrbTqtePQuFZMYyJSvlDh2UsvyBo2SWS7mYT+3JY3GJD6eWMh393C9j1MVZFoTdbOVJ6Gv3+P7IGT6+0KWl0F851k0hfU2cWhmnUeRSRIVk26HWy82sen8qxqD6HdE96jQYgJQDNzRS91e5gFuwBlWXx3uIqzGyq24q38RUoysqPZPWnsKBuZv9NJkuWuv3X0HaL/pu7qsGbWsfgIA03Kq3Jc2p1HRCCfZ+RU0Lu8l07WlSh0GH3eLICmb94PF3SN5hfLKGtdBbpa6PNtQWGYPgKZ1xMnV4+2m08Ett+Wca1CBq+5M2uM38Asu/MjFNdmP0icqeBz98tgYGWbzdpEQk0zaGJwkYiuIykv2y1OMC7yndieAXdrtdOloS6/uUacGlnDTMrq5Oxs1kEknyprcJBKSa1tK2ZXc0HgZ0tKZ+x936M+6bbiIUO4rlFDgVMiVNI4tUOAqM2LQy6oD58b4PQNufxbHWeLs31n8QKT0sTpQxexiB+3f0bPpzmqiN6eW7C61KFExu+nmlGHXt9Yh7nH9dyoZt7diuYE0EmW1tK+yOXFHnRrGVyjEnpqbNsQmisz1jR50K+WdReiNuBSCKhwYLvJVDFzTGO11AgJz1K3l4s+eqHXei4FzkEyRTOvUNTDbCwyuZZB6Y3/b3Y8jdzLmAZN1D2U5u3XSTNX2wzjRQI0ewhH4BO0//0p76I+MM8G96aj2yPFTeQ+nxm9H8w4bJ1Rh1EvLv5GmeuqdCwSYbaT8uD0dLyD8lQtNnfEJRDkEYR6d/bQp/JufkcdZwdKjlw+UCjW7JM4XjlTH6+aq8oZOXcqPYzRQoFd6t3E9Njy9pPEzgFUXkMJkPXHtJ53JVlOmNFtl7KUQ5nrgmL96w2W+tMwZMDFoGLRUd4RBZaEPGxlUuKDvpeGGrzOj38KtyouxD79nl/L3X1k27tO7aMyS3dwqhfD5rc4P1b2ubsApZhiv/GJAdoWIXn10fj/NaiuBIA1XXaWRKGVXFma1VMjnU3fE6eLKM+Ks57OeVUMsfMKLIr10IIVQleZYphy/ZQA8B0yFG8HUNw52rHiEcEs02gWbmI29AaCIiQgeMjjpwR2qAaqibFlsROBMhXcVNKuY80MjB47WZnqw8mndEV9dogO/sVjGMU6glsvfzFSBged5ZMkv/LYo3l8xUjXjvhF7TSku+xEtSsGMF5MXpvQCWo2uO3hWl/OXpwCWRc6WWmoAP7tmUNvyg0pL6z8LEiNm52ImQkSqjPEErMBpOcEMxIqGxUJG73MU9QbQQy0eo54NqjicJBRNh4kpd7jkFYzAZkrY46XQCfJWa4nApxLvgVzxJIH38DtvryIbX+ydieDaakJXJXHDGyQt3R4IeeS6kjDn6TifH6CrvTdp473clu/Z/7ZXJrrD51LnE4KMKLRwbxR1/BXyLNCGuJqlwzq0+k+G05ijCT2/jcIVPx9u0bMN6/3Osr7eN4n9L0EKwtfbfhRZafP6ZirffX8Fj3lfbx/uv8G33HmA7rbHXGiz07Gz1uH3y669J7Zsl+Fjt0ubUnw/olxYeVlPkNBXZHyOpBLbdrPetORc3s63ngDIbKuRQSffXNyGDMWN206ld+fPSLHn7ECR+9Ywr8xVFrpRwfcFIdogq9g0mrjfXMw7xQ3MxqzfsLRVCq76JZNQykgmFgTStBDxtJBhpdSOTJD/LyCQDOqfIzN0swzGPZR6ys8P4RBmYTBmJGsvgwoGnOxD8BkfGL+1B7/D0o10iPtyBLCDeyeqGIgWnhQ1jXVtSrwQMSol8Mc3Y2bX0g8rofFXAyJ2ybqoKTRZlKAm4b+dmrn5NYl7NAtEzcfyhNFp6x1GkrSaCySVPd2aUbZFVSSx7WdTszWYTbL3d2HCVaQC5Lwz6kU/JUcn5/FzrugllT6SEFqkiu4HGFNWZamDVSIbEOzWQgCIRiXOoD/hUHR3kri+R9v/UnApAaGWqGX2WQxTaHj1mRa8FlF7urQWvPuLEmEyuI24CNzEMqUZRLg1XBxA+6y8dBc+bcPj3Dscfj1TSUNAzXkRbQIhnq3VMoyq+0z+j53spISmueX48dyYYW8PQsf1TJE8Mp6KaRjQC/C/niUZNiJGjvxsN46JSRUxJoyIX9mgpqhbqlBeQCY03Mn0Est1NiBaeR0kIHBtYeDN1YbgVPRpTfKylWgl5c6ahOOJ2tuP+ZjxTVNghgNY2v9BvCko2Fcv8bu+xDiU2i7etrrkZXIEhVPTAUPXv49LzORRTuagUYIDWmovn0b6SFadd5x8FPplpjgiNuweVEper3Aru3lDcIL5MuWMUGbnkPNxPE3M/eGzLokKOO7vcstYYfXfs7qhnPNHI19xXpcrLLrjDp31AOGGPtyIu7k05tgHthXFwNhQ6y2483Zrl9EQl98PcOEKv70FbwCSaX368Xo+j2VyWTNw3UevhcTnT3nCw8ZSjiIgO2NIwRB0mDeCdHAA9Hfc28LCI6ibQYuEmtgdkmX2tvv6wr3Kl9zHceRBvuU35bPX5gRQWhQfj2PmnQZUdnKioxqMrFbu4Cdh1NKNXb4G8CchSk4jizhNAneEX5oHnLERcU00Rkc2mSmUsnW/x3AVXbH44JU6wTYP8hCSY2w0vtz0v+JQeY6HtQw8jLsLyKyJm8lfC+yM/GrLRGpjTc28S8QrOna3lGTZw1MK7HW0fp9Ho54d2kysZ4U41jLRRwicLOp0sJK14p8dj81uDaDszdoVKilqiyTYitBeGSGm96hDvEFI/RkVQV0qtPTBn6UFMtow+THv4K+hDuxL6oK2tEAgRLtCANFW7FitP5FZTRDEdYkBU8GDGPRIyurzaKIUHUp8/oNhgY0VXhcJpxy+qKyMzpfoVwihsNAk6mqsB/Ix4flSw/hOzdetDMGqb0GZw8N/C7fNseL+OCh6pVv/Fy4lS/xCqfSqZs+pfxe7Pm0BIJgp5io2sxUZC8zn95O4mqpIW1fxF32NNRFj3JggdmyFvoKp49mchzwnbEwaKExV+4hovScQ85f21mFyRYJ3uis0pfe7vbr8kmUl8O2Xx89uCF3c5LD1ofZY9ekoxfbum7KsBgzpFJMMNGsrCo40ONaaJ/cbEcEf2JPbrh2JZJvDVlqiVfZVQ1se+u2K0jip407S4bmn2qUmqKQwDAeYtwdRY6S1pLznrgWJCzqzCXVbYl8oKAcKHyarp06cpQUOiQ5REIXWOk0GJsrN9KIe+LvVDlT4z9U7jiXjy2Enb4wSoM1p9SbGT4laksfgZ0td+fDqIdk2cMGirG5CUw3NUeJiMijEHw+NPsRXXxVos06BXl2PtyZ0csZQMW7uUNixTkAYOjsPfMblZIX3HOpVslSVPNMH1pNurmXZaH0TSaXScnHAispfGeWWZYBzJ/lntnLxi5gKdBd6DlrjKMH91iJALUsq3yhn0WNNHZZ3UKjRMinc0tKofDnBZAyo7JfODNx2+K4mnFST5taM1808j5kCmSmFc+G33SCyCpnf0TMYZlW2BxmjfITBhISPMyg+o1+tLccPzmDA3dLZKZNfKlNVkY8Ds0sXA+PJRr1zaUtQ+YvNgFaUH4OSEu505p2MfnOOyOqqXn+qp76GYTvzkuTFyphqXTcl5RpdmBzys23+1r3JhK0qJVkm0F0XhdFWlZra94qzoDCC/PK3ISJMp2e9gzTTYVELScULUDF8kIscgnWh9R1CE7nEA1ooEzZ8UREDPALmHo2mS2kDnXj9lrhyJCHhmpzZWp6AiqXqOd7daEdKF/nh8ocCfRW8eJrhD35zonIZT7YOPPmQj2/eMYvIsXACZUmbu3qSPPAPjGbkKKCK2RzO6AF5wMJjF9uO74fIut0sJwyndxbGCtMvT2US2/n/IPbclT/6fTbw5K8+KF9VfrKuVO4mdF2tCA5+qFSO7TvMAlSoVBot680ljUrCBSCGNM8/hh9Igbrr2X1qsy5Ry1RtAMsv6KZREODcu3QDPukEHtUNsa5x5uWP6nHfe27W0zeywNn1m2KAPNHmU+nnsVRB7tIbcyFbCBAtNw9LoaEGrojFpHePnLfbdRmtj0Jkps2HseS4UNGvzZwCwh7C2TfffYSsNQ0NWPOgZjDgyZt3sWpV42pO1KVCCQ9gUOQgIu+h478CcvqUBHgl51Wwd5U2rFm9HOmxwJV51mowcmoIvFHBcyLOWHiDVhJ0usaGnAqA/i3uRncaNyJqeHXoXUCJG9UwPY8hIzeVc1zr7xCLtSpES5mrGrP+dv96h0PEvmDEwIZSJmJNW8eCy+HaMDaDD1GnTGTW9/ie2rSphH17jolvfcnaZ+8wUwBQlQwKxpEJF1eJMtATINl29XBWRCJYywHtEnsQEpYTSszknixECpYpG7sHHfLEnV594EtWGUvPBYbfarH+QCnsUA8FbR/ZPuk54V6lGRMoMVHe6bGeQsWWQbdT65Mz7BX/UI2uei43xawjUbSRGcI0GrzLbQQ8CPKeV0vUpQNCg0hdVG22jvO3Q7kNwh41e+9ExJKfbuW9rJLTvCx1gldUMw00IhamTJ7UOicTYZtrr7WywsKTJ+sgrU6SdaO64wMhFBVIMbo4LpK6gf4lUDyakwlc9R6jw5lCzkrHrxWZkboTNodT2lyWZG18eQUKNZzffrDvQ7nGeXE/xuAv18rPaexF5RtZHKu/AcNVxKTK0zPqwGZMH17oHjdOQ6qY+C4Fq4gmxm37mcrColTxzWrizkhJp0GKPTUmRqOGiJr5AtUNUkEcQ9reCp4BB/TuFESOvtFfPlwu+v1RFJLI+rnMCBVE3fL7I10JHMXEe+0QBpn+w+aOXK+XWen3HRL4McYSjFA07xtIlhkxSIfgy28mvadwVzEWUGvl2x7AcjpO1rZ7/ADK0GkCZrAh8Z77QArpqhHeDtXcPVbwRlVNVDbLsGZyyJZrqHFiNV1I+3xkiJhjTnPWf/v6Oa4eM7SKxPZCpZ+Ouxc6Hy3xilPdSmqKq9fk4HpSdBlKrNKSBAb9eFbafGqHMUfyai5YlQi74Ufj97DvCv/f5+SLfBKPplzzchmDuVRaEUzS8bel3JcKA45VlcM8lIcaPXw8KhPA+NJnwKBAoChMRHhmHwpRd7nGmXHDrhzK77U/G9FXk84fzLlWdOQwFH60jTZWOP5rdniz/tH9920XKVjQQ65x+FGBCv5hwvJEVP7ojzVM/omNR1CaHHadmGAZz1VII0DTx3YdJYVEYfLneXoopBvZUIs/Yx6Tg3HaC3p4nZofJsnBKH3TddtQS1E3gv2AnFAX17PqSYIeLOG/BlohdkZrj8iY3rWbrMQDGQJMOhf48H/H6sk/ENA7S68Fp5dJim9y9PVhFknuAOqX2VOvlqer39J4WDI6LfRM0hrhZT+ytmerKYF4wCG3eJb0WqY68owilztDdY+kjRosL8j8Aoz3Ui4Z2I7WYuLKzfKh1L6DpzRHH3aOhnS1qAK3nkETBNqXluXx0bhO0Wb4ND+l4x47cRg054R9TzUW3B9A3CEW1u4bQLUcRJC9Z8hAhoTq5dLToST38aaqevoUnc7xeNuQ+8G0+/NjdMLT9heoFWSWyUDshAG1lc8N3PdK2jO/ByXnB2nagxzzw89VSaKFXVfYbhiMpg+E0nXbuxO53DrSTq7xbx2k3Lc4v69oYR6pEiGbvEWkl8uR7ihgG2Td5JEKhdgNtHmwVU5nICE6lstZ+Ye/6kEUL8xQ9SbxNEDh2H+e9GuwhwAzwtEdlCpFhbnPAPgbarR6LFBniLUE8r+qKSe1PLh03VhZdA4OpndXU7b5kpUpIGf04EOR0nS3g7u6czr041+6lQBvOh/ZN3YZ/NN2KIpuxKfA34COL6b3oYPBIrho1sogiEpaReLvmH5J6Pl8Xq2MhSwyvsg0Oqaq73w/rWGg5NQbpih1xWJHizC9K9rr0I7M3v5vSu7Ec+6stdKVgBSWC3J65OLRnzpfVJhBqHveKOjjEqg6V3N0rD9wKlw1q6sr+GbXTdsBxrH4AxgQRgv12P316z5p5jtwuon12S3lSJpKgDE38BEP55v0zkXRsj+IPCMNBhPD9lUuUUCQD9qJftJUq49JMedwIs82xTtgt0A760FtKN0L7k9SHbgTtOS3OedE7qBSQmBjR7k4EgKQ8I4wE+qAE6a6UbbQDDeBsttsZFjzFpFq6jQM15YO25adUnaR1RGksD8byTZQ2sGstb6KQcsLPNG89SxSLi9HXpVp8NBtSqUlwJ2zHkBiqcG9RuT/48/C2zcIEXaKf7iCqlGc6tOBMKlw2YCPE2IuGRcUP1s24ruRdB6whHuexi/ZIhLLi1DeBD8Wf91k6p/+LmptN0ujQl/zbppiy963pcsDaZHlwzGwfdZNAGNGeLIpmFcJBj9VyG8c6IKmIhMXm8Z2nhd/8hCQJXjqrvKuL4DISR+ay94/Bh4ft3ou9rHxnCJliHFmG+cu+j96f8nZV1I6h18Fn2iXemezvcLnXaV9AZvNisoHO4RHTJMUItskYSkA2AqolIBkk20uMcU/FiIXIJrKYpJIvDPmRz47Ak+VP/PCkcIEiJcrIpL2iMGgYKoXhJtTOynjT3HHip6pIZxfxiHLBpgYsJ1n2G3oMC2qNq39wU0N8GfnOMsOj+KB1YhW9vm0QK3lKsAIcb0D89CSaTDugntp2ltrH1SbJqqDAaGw6EmyLsKLkw3u0INX8ykHGCww0o1SSyVuXP5jJKA4GiYnvVjNk4fHxYbbFpXJUSt1Kat1F1Ldtqq4FjQDx26Y2Qe42KVlq3ErAEbmzGC5UUwMYyrxp/MdfccUfFqvaD7l17KJvS5VvEmHyySK88d847xOReoY+wDLh6QPsyt74DhEvuB2Lz8Ft2PbehACZglMo+mMz/e2nyNHEwGQ5QWYP+vKpXF10XD0Q9RecCcL9dTJdZyxC94yDUgkDbduqwv4ieFfZqXtvhHwcW3xyju/XhWhvEuY+9yFSWv+x1ov5HhSi3PS2wIYA3SnfLdTEloD1ukxWFoUgQ9mjEQfd8OgNQDBpuUjJywDBOGIPaOGUyzbzG5rXS3VM6T+F65w0WguerjljNSfwBhsANMrySokQWhSHS9vikmE0p4hDCm35FaSizT3lVOU59QSlBWU9NFmf7AgE/WYsfkBk6hsFJcZ0rJFvYMbP83ovXkANiVZKbdKaZCcgO7eWLobFPCoX0qtMOUmO9uBsWQcg8+I59YXGLvnz5gJ5q8QRvE1G44vEdeV+CbXOAdiSWeSHH21RTPLwKLXIp7viDw6OZFqyFYOyTSSQP/hTQ/iPmrDpUny4UKzmf2bCZQ5HRvOq9bjcGH+S0detLeFq4eEcLx3NUjY5pVj/60xatkTLwfqfqONmoWZuB1PiMwM//53/9i9vmZffhqE9qRBHSpoG/rEdNNVogxxYgkE9sSk9E7Eaf5gFNW9jPKcIi7qO6OjGJbmWZldqKKkbhbmMXdieXOY9zpNuzo5vVc0JHFtOfJaYrGh9LIXPl18HKb2B0PnAoOhwPipL/a5+dQv6ERiQcLbDzJIU0wRWTdnIuiV9QI7rw6CFx7opyRRTdeLka0XW6IUBTSY4J8mUIU7Czg3XowYqOa75PrMb85aPJnDbSMgVqKe0LcrSpeQs5Uxfkrm+82cFVPIGX9LkWQsb9R2uSvR10+ay19+LsVz3MG4fqo0X/nweoDlSozaDFqk3EJ7mkuUAfyMLs93WV8M7fjjJkK+HC82gQkeR8lptvZdriqv17rne8CmWuRzA8Mxofx14Q1YlZxnQZRFKznCz9Md1H4gPAxnYqe277m4z3TAbkTI9XKmZFNXrlt4JadEX8IhHFGRmQy7j/GTe0BDKG+S23R5+21KMtxSyubqiUhC1SZ25pw7l5lKPsX6yeWci2mQcmfIEf4ToZmiDlCfwPPIXxrRO4o0U7YLEuRzwYHrl1OybRY1NmxdRWChvIucM+p5q718ukFzYBcvn5VomXi1h6VTaJL4s8ol4KkuLpoKf+2pP/ul6/Kid+MahMIQ/GVOG/Du3MqHQ98x92lPGPTnByRUeRTnZ5Qe7WxgtjFVx+LcxQFi8sW0eZ06VxMaQIEv30taEsaQtkrqN+wj2Xv4w+8e/zBQT/z5d4zhW3zntAuv4tS43syR/buL07C31+GlfWFdofPGIvz8tVVuTErzRGL3Cohj8Em4wVVFBsOK32LK2t3lk7S8km/soa30ci9qb5e7BF2+AY61KnKIFAWsfL0kdK2PvNYx4EDCFxfP1RMdjZx1EjV0Q14DmbcHSoaeorNSMNCBzgQn0wIaJ3wt3PqjJcW5ScFr0tdXAyUzX7tf8UxS5InjSX1ejzf4CASIpiTNQ2AeecWEcY012GnTrrEdCiad2LkZUVbjDqO3zbh0vBYaf82NOdF/GplM/RJrQdbNcZ7GCCC+J1VB++JGRcU6lfiiL6IzH9o2ST5bx7i4aiW6KWqybSH3w1/OjGKYvLYgTH6F70O/6DpnVrDt5MW25LzQ4GcHt/6eBfAOQFxM8Px+4FyKjzPKlob2LP2QPKJCSipojue03fT7PQDHqE9MQOHnMjfplRFX6tucrBLXKQ2IJkTXImXiroZoSLDi3/Dxx6TBb7+IpwRrMpyAlcVGz8eEed15GJjRimj1iDa7Kl78SeW761jPzzw0WjaNNlKhrwwRenQXbBLuR2FblPPVjER1FjY9TXCsHbVPrvAaGH/Xx3AvzHZsCXsdZyALxlHzV35+IfPL/H/XXozW3N3hOfdZvh2y9O05piTlW98SqGxxTazt0xAQR8JtHRPjOGsEnvHkSqeZZoLUBNHjwB2W43fX6+G9RJI90o++9Wcvwhz7hkpd1ZODHMo+0Juf1ycjyGVDT4tqrJlqB18/fC9UWZuMU1v08ekABI5RVGcdvYUYBPcJie1UjlJ6oVT3O6GIIydsVc1DbCW3r+YYdJkFuKABJI/M69/0DoCgiEePhk5tTZ4OJGHly9JSGP8K90wecZvLQltKqYn9+K/aCd3HGyc/i7lCFV3pukXvX0yWbJ/mrhR6qi1Vut9am9r37TbdjLOw3vQWo3dulS89DNp/4+iSC4H015sve93zXERddUgaOAcLJR/5MV0tt6Zdc3tEpc9FDT3ZwUhi2Om2fwlaxVlgyC+Bx+lkQhdmm0daafz+dFVTizcDQ3hRCUQiSL8jeCv1HIEF8Sl3ZIuyc+GkMh8YF8bAzFt6yJuvpc6Dj758ycR5D8FWCIsHcKZJqm+vBVWfzOV3LvQoh3vXCDPiJrvXD1xPUGNQu9rBGyEF/MO/ssFtUagnCUGsm5FiDRZxfQUoC2KexT3IKqbDEtoIywnjGg8cSsWnTlHdNBbNFiTAKiPoYbaVzvyduuXQ0f9y5Qgpbz+kHktEJ4dEX4Op96XtIidAoA+dfNyu4aXA95S37mJbGISKZgeoGYWspuiBM6fOSyZz3gHgBsq5ArITzNcVcUunw5fqvg+BQjNzQoHOiiV4EvmQ9AIzHJx63zVNBct9LDOpv9+AtV/nVWGa2d+74NqHZOzgOLt8M/c6FYPeKmLE3QrZfsGMpJeidlHXWpQ8eHx0Z+8cNvWCU58tmjB0hY5SXej30e6cID7vhlLl6/N8lFiOdHBWuJxWRBJsalnGYZ5beOlZRy6oapVoQY7kZ2cMvr2j549TliM/pMUnTrVC5ZrRUNwbX9bSRIsxj4a9rLIs5lhtPJuj5zIECOOFdrCHUTrvMpE74erDQLTNmkbtnSiC3f1IBTBaUCslMX81KIFAy+BgiNfymZgPgTfUwaUJTll1WS90Ajkkr4O4I93CcQ8zyMtgjAZVRTF93l0SWQKcYouXT+yEealmpz4ER4eusFn/qg4USkd+xFCX2Tir7VeXD/Uaxx4pS7S+jGfYVZGs9RENOkElNsNj1asmNslKBQj++xEFu4zJAGAe0djRTdcZtAzOhIfZHNXTXpUN5s5UmJMAUw7GralnZH5Zh0/REO+beMP+FLV72EpriYumPNNBgi4M6hVpHz8QFl1ZbLT4FW+cqe2jCRFlOh6t7SoxCTS/mPKeqjy7jEcsOlJpJJw/HKDk0Uv0gY+N9gVBPiDchyBbNkQGTiatPAhAiiRbSNS5e25lCg6SKNiairKJ0LeQb/f8kzs5QZ3UdDUPUPdabzunn/+B7fA8gDeWb0gnTmC2sPuvqnmjDQj52OGQl7qkuRoqzFRab8oqxl4xK9QvWtt2pfeaZpZ7puaAQuud9VhHD+rSVPbBfwa5Et9PZmahke2NIrGTikr2+3bxgOfTd5lzT+rQbDFuqNPZ3g43OH5jfSiY11kI71WWlpxLK55TbdFL7v6Zz7DX0wtKxe9yceGCY2Kuu7rs+H7TTA5rLz6e4k99Cp0ac4FgplwE8+YIPqq+552+xBmpK34k29SByGm9CSaoETWYp9lxuCPSHCT2WV5LTbl7ZXu6vZ5tgdlUfdPf0hXlMeUAiSEg0XdLiDCBGqDvpv0Sb/ZjdS/ZwhyMDNYMNG+hafgnd8BgNvEQdqnN/TLRb9MVhSlb+K3kDtNMb/q4baVjy4T/y41RbNeWAoChyBEFMNtdVsVxDUkbKtFuPoOTxgAiGnHm3IgtL27bh8EVBe56iKsKVbhbGqo5Jm9BPslQ1TPVIBXcolcurrNY+9qICRUjkfbOpJqXkzlQrL34T1/wVlTRZPncAjtQHzGMc7iA0JQDBRijqUdEn/W1+Qe/OgJOULwzvgMY/KkagcvhoXfuGlPMbjhnw005FOPka7Q9ida7H44YO91Lie4LnF1e245E6Uy8/fNZjCba+vtFmqbNINcFEH2p6uv1XtmC35utNzAVn2JOIYEn1fZfeEpFTYZKWNuYFgwv4bd34EY5zlTgr0rwqTn4lkudIo0rppjkxMpy1U21EQX0ghSwhrcYeTGzdro2S6XECRzNivIToA50vn/yPMWdgohcsBT4JvuIRE2Up1Fg66ajdEs54eNGALwDF1aZ7rTci3GIT7n2DlsMG17IYOwyGPpbajM/2JMwvasx55uxZflzr5eMsLkYJWBgp8Hv6tH0VXyA/gsxITWeX28Mu5QvJbvHL2Z7+GUBXyif2ToGXAz2qF13Jt9WlYL71TbmXFCF42Ybm1f2AzFvYHN+TEhZ2HhQMv1snXICjUxIIHV3KnB3s7kkB8RzirZYNC6H0aiMqGBnes8p2IbHYSZ7LuYlKcKlOE5it6ixsUlQ8wTFhCU8bf39PKk0uhbtj+h3GUwtW8ZGGlEiltTGsvFs1p0CWRH1MBFnFJAek+DTj7rXnCK8SXLXWLNrjGYmTvN/6GKgVqjLiT9TuSMauIHgRtxMs+TatELHtpk8F0VBrcJD3SYZyYvw/dqxMBfXUoghzvtUSrrudQIrh4//7q1Le+KTDXSH/kSWzatDk+KkWY9Me9dkRwYl5Sidc99nQvEl89XMUzJJPj0UOAgtFi2cS0f2ZDl+Xx+kO7gH9lmGj3cEgd/gisI5oCFP2zRTvoiIzybflptnyPb7UG4J1GNh2eYuOrGq0TzDXFz4d1+kEJXMhdDGXTn6saIXgUSjBYxXozdhoeholAkGBmNfjJn9VLFuW3TW/fMg/eMyRmhuZNFWLWz9p/uTSP5PYK0YvNEaVcGC5mcr178AMDnv3hNx56wqbdd9whLm9wzumoju78cI/Yp8QLwvPRse0HnzVx38bf2U97mx4I9amYWLuRwWrPbC/FmWbB1MylqPqXDovipowpy/w4JIQzE/+O7/GA+SQF/WCzWOtThbmxjdZKCxU6/aMjvfzEwRe9NRsNmxU0WspD9YodTUeO2Io/4ff2RVcDNBZvOhsM0w9JC7FPW5/8NkKC67fZtyeTT+zFEfJ4R1+fmUKbpnwpK10RjCOAum4T4iYFyULUl+urZKABvrniA88F9CwcMWQz3TWSfwlTpLVMazbJDAno0k1dMGDl4Tq7ypBxzjZ8muhmROsvlYahuZ7/8HifzDD9oFdrnamszkth4jL8a2aJLL3GGM9PYPcXvE5xXDjvrGPxxipb3hOcLmFutsTK6p5Mrwsy9IzGfzMoRgLoMKt/V00KXIXZ+uvEY36+RCXbXLpVcTz6GZUkSHeWDkWxYjyEct86UqW0LCsESNCFgyPka9yoDZJTLKrn2nLijzvnRxQO5TwTKHRZ4ItFS33G9swxGbpVnT9FxTa3EE+PlcDhZ9E8r21FclAuASvx8jmlm4m49KKSudi8g5ROq/JAI9ZhMn51uGfctSnYW1oD0zkdzfpxcvcXhZKQZ2BjWwRO//O+VX7zjtOU1StrOIZl6l/MpUaL9kXJzp4mKzapt0EeD0CWFLRX524Koi03IDQKl4eyIwC4k6fLYxyTvPj89CwyJY/6CpTJN69YxobUw0tGheyIeaSw8XTO+klFtOV0Xo6zITjugWZcvcGbpjt0Vm54Vsk7GdqxM/X99fj44yYiFgOBjEw41QKxYYaVKMwJwukNC9i7gG1BztUqIJdUuNgupUaqbfh3dBsBjSlVjvDu9Ba3VaQWrAoEJX+u6lo/91z7mtaxTc1iAO8xMZwRdFHstZS8N3OU12qis4mSB6h9FbUVKnz25de3n+85j44+Rv9q5O4eEsd7tdrh1Q8XHT0RO9bSwe1bYzGd5FlsKp/M8BM/OUkzZZC8NAQmyQ2i1LzK0+ecD8SQKIRRd672RWFmY3mC5lWK66WMH+kafL3w6T4pXJWqCBi13QqIcoXzd3ZHCo4Rb4eIizqEo1gtK0vUfCObhFsCuIL7FwVLxNqJuZiWfg5CKxh6bQW3cyZ1YyfxkYSQUF2YXPMio0PYZk9h6/N+eNtyCgfy0xAeFH3qmpwPGMJ5bGjU46J8vO849ysa9ogPNDIEg2yZaWUUkpFSimlFIKQlJRSSrkS5q6dUbM8z3PD8qYnkoZlmOhlRhIENONYJ0AdYGVuai8oUiyefNHES6SYM7y69Epm9uq4NYwgvHhQpr9s6laBOGDmIKvibQdobfPQLc7Bb/8777ogKL5zdg1NBc9ylXeNPtSKB26GhoBQz8NyzOsj6yB8a6xs+vdofItpgKn+MXB04zwSxDHXnxDFPgzYQ0HWsicmUSDU7GJzkcRy0vR2FfgNIz+lnIpZZsCglTZdSFc7DVwd29nFlwy8ANi4kNGOpEx3BmjZMy4fk//vpcjbljLUuAPYmHkaTRhcHsMyM0eTWzrFDkDnG4cmQvrfYWXfxtuNLscxiARkIJIctbO6KtVYtQCbLXIk/CoO7MzwYoO9r0kRGckPov+G8YCfIVz1EGAN0KSaJNoYHzDK0x5ugVQugDJ/LvG82r2VLH/Ska0/F+tuhTq+GI8UPK3Q+UIEkX7/rDBpKvXl1PB8AbrQBYtHxxEF1tdwBkR+Q2+hI+qjhHTrd4ZxrMfn9lF/Uxmkzz1yT4uza+H7HYTtHpQNIxYMGcBsXr8vLjY6NI92sDS2+8N2jPyRnq0fbGmMeNAE7+8BhxYJq1zzROYxkCb1eOYQGzDWI5gR+6Za4I2HwA4bUXtKGQQ7cwrehS+8l7B8x0zrom4JcYAOaGkyOVuu9sWBJRgQVpFZB0P2XxkcgALrcBsOZQxOpNQq8mfJAWnHKsGmIq+H76WVk6i9doRqwt/HSLwvlXIgpvNbVMkrCgJKdBzZd+D3KqZqH5+NBIL81MLyXJwGC81px7EmL+No2m5ji+BsQkRdKtN8czxkifBGmAVByDWOzN5hShyndUaXdD7wHgwlN7pWw0Bm1wcFg21O32oafYKSbcmPMCooaXRIujKbyUGzIiZFPqCvIGf4C6yNaxqXB/RqSRpjU+gKzAcG5Zr1uPBZ5IksmfWdhmXbpjGe8scruI70w+FMLNy7/tjYB1kEFgMjjZi2MOoRlpRe7e+k7DVb5CT2e30HomX/M17/JHvyf1ZojxpOgqjt9/+Ah3cY7FDWOx8TknK8x2Eumz64GdksMooTdJWCQy/bypWfeodNMbCNVJ9/gh6Uj2GLzKoWHjFw2xVEQgRQ7m2NKOCCkT3ND7eQ80cEkEa2iYuiBEpxGex2bIybJKjLu3Yw8hT1hvc54f/09QT798IweEddJv59jhm2FWlvplkpJ52gnNVGc0P1Mj/mDVJaNLpxDKWfU/DJ6GMVRM/yGqPatUKXG6cWBIvVAzU9EPuSOOSwYxWQxfTq1nonrl4vyoPQM8N2G1Kq1qvAT1MoybGdDNPtpTFV+CzbfxJIPw7tUgHbxwltQunSEax03iLBSjqsvTOmck4mPaDMvOkrlvVMeSdOcRUzytAZvq1+mWSjBMcxBDeMJYYdFd2RZwQuoEBWaesMVFFndkAgjmwcWjJICj/4A2Lu7QlHQf7KoCEAoaNIiHikkJTZyoITvGV9wsmjCl9sCMMbhvgmcW2dqxaM4qX7pJqU6dBleaPqGKRiW8w9+Ytal1tzOk0ZM2LVe82tjjcxNG7cBObkqele/V+ckRPlcjd1qMp8HcltrDl7iVnVulKhbF6834bB+vGw/n0OB2Y1So7xNkAf3E7mkWQoIHMPVhPJMw65z2dpCVcX4mq5xZ/01wfJmXLlaHGY86RSuTlHTpmK9feGQhGRr/ux+qySdXWH316zPqGaJaD+p8aQc6akkU1KAkdLfOyEU6+zvC+TsrxQaudS2OEyGQcMKQmnlGbymAUuXS8bG4EiWupCg2DjAn30HR8iQ4p+nf03oQ5FINCR7A9yX2rf9r3UIkPf7dMnVVBz8Xx8cuQijH/feOh6bDPIdLHmq5mXvwX74Y3+7ecfG6jxyQYTNR0Tp21ZYnU6cx3ElF+9wPufEFRq4de+vOant1Kio0VMr4tppEunUwgd+n6Z6yN9DzugwtSv8L4n0pPTfAvyNIDGXj8X362a1E1sHS9F/Zg/X5y0dmTJZ/yEPFZfE7/ErdIMUOairpe0pfssVw0DQ/ktl1D1h0/xGXqLgqPFDQiL1jctMb6OPfyWt3t+9OojIDTAx1sLVMGFR+YObJ1tN5usEENbs+zLCWlTOlBqhg9K80OGXQdX6up6S5dfci/9CnT5iFl3/6IKhrQm3XKtsdD0mDZljqCxrsHUws3IBgpoZnvptKmhcMG11qWg9xo8pvcEsfoYuDNsmD9XNiwjT/JFyA+RGsQFFXrQkRx22uPkab+BzZ+9TkzPkJ6/QOtda5wr3XBSeefdyZlod9WmDO4ADvWP4UkO+lR4VBj4rmrnuinIV8NRCBFf+9f1kM8bpexUtfnmJpaF44xjWmayGRTq0laZhEKBMDYC5a3AfnYC01yP9f+EiBSlbQm+NGRQEJKS/euMH+yiFqJ4YUzcKgJHhOZv9bR4mIi126dx7l09XDgm/dYIuQw8UuXE2/nAtMPiiazD2OgblTlTamkplnkXXTI9TlFTlENT9Jf3fTc39+Zvu7kJYx8IuN7rj/dtbj5r/xK/jk8hjXkoi/wKsQGAeSZ9YoYD6JRFog63GuNVm3mohTcYX7PQMI3W6owrwxdZN8cQO+JQC1nPmMndnHBQmUvF26XsYJ2TLc8+dWChkyqOEHNgJCcFmHQBm6h8d7zC/dOkXQEFFOHUBaKTQv0Yi5s5EqdOfJAYvbR8JsM8UMcwTxM1VEojFe57vWI9Dr7UYZMnCU2CELzFkRYyjTIKk4BUiebxooP+Wi6vcBpVUu8tw50gBzyZiDlDikXCo01NnfJirrdAbJWfV1UXC/WglgVa7+QBz6Hr3qp4qaymBGaOAdtSUN65nA8+d0939y0YyCOPDPD0U3+hLUKYEogjWoHsaYQU96N2wxRBR7GMitKlAXL8EJHPJgO8tGE/MPabwR3H5B5R+dX4t1IwL7vvb689kuIcLyctD9FWW5HpE4fVzfc+0K+VWJP45UUV91QCwN9rr+mSDCnfY3A2U0pxN+u6OMw6PATzULT8YaQEe13K/DgTn+aurDEs5+bodpb14Xo8QJE2LdJ6NEARpnIRuENRKslssaZS9vE9Bz2yGkkhn7FWdwRzEbKb4InEXRYWngfsTL2dzokVyNE6U8ZYltMkbdzD+DeJUaMAxFI/0AKQEkFQwIYVRHh6LSJeMFYVkZVu1TVyBeJe5CKrAsb18WIe/xqO6/dN6NTiOlJxjX7xlna1a17ebFM2HMN+uBQKrREcegwm/q3rjyQp8GiasCU1Do42Q096s1jbVHtJAIn5yD+aCvCzXJSDJqY8Q+Vrr9T0Z7SqjaPRBpw7EY+nhwkqSHIQQ7bp2VTCQyP05daD0o845ysESLAtf0zkJOB6Nm26PFypQ1MJKT74efKG1HQonJymG5SMTw+Y5EU+WoFR3We3S81dgH8GrzesPSl62Kdivo8035y/68RRfMCXToFSciJVcvjCi+zayRa3QlHFPSZ5+p5L9TqHcabZ0W2OalWFrXTU5R6oDTWWO48640XOzQ58m5XR8kY2ZdBg7EFLh6aR2Bn1u6Bk1jltZqnDjHG1ak26xURHMaRBh136eNXUBiM0aBbCgFH+uXRiKn6cCQCRHZ6mD60Wvo3vEvaCKZyJYVSZguAg3BaGsCMmLJyQqWGYq+jUGBYE3qqinw34bBD88gqaTGNZJUsoZow0iAhXfIGn1/TunGk+42DxWvp9ybaX2ZRMRZZPr9hRig/5GbvE8i4sn8HFwbSf/yHnrU3GUQcp+xoxsUZKg6G5vZz5WWvG8ikUK1pPXULMuH9T0XWsAOzidXiJgR0o6VzfGrobOH7qKljKiYNgC0/OCPz+gFC6weX5NBfmTdhvQlNRGi2NAUXWqNUmh60JUMIVXo1AqhQu1jvCadRZDnBxFMmY3buGiW3jmlU2inn2XFyLygnakVb3/VjDYDrcrOBH94ylMvwUQklIWJy5MfJACzEpw2Yb1+L+8ZEOz4G+jxL4warcy03u1YYlKLE56fTS62Ad+NUgnVdl1PpxTpdgNN3ick46jTKZrD6HApCKQKHkwx6//6DJ/tVJp/z+Jk11xHVBsbd2Las9BwP2QrZ+ym054bvchBWXD6CB7XpsDqHlm9IrQSytFIeekpM/ii7P+fxBTwfuHk9c7U0Kf+LNHoNCvE3nbU6LuZCxhLko1eAmkdftyuJCbT9b9G3LN86YXxpIzQPZMRucJK1AlSulCLkuaeNoamJZJ/8AFDiBcXECs88dHTPAKI+iiMklec3HQm8SgNI6/13J8OV3PePkIL0WllxqUOVGm/p7w+bTTDyBOk1Z8Vr4LrONZZpc/bH8NI++zHbNZ11fgYb9biTcv8yu/PkLQ1wDtriZbbNzj8OZ+TD4Pq5rGc0MpWf9ylA+qa6h9bXtqBaMGnfVnPcvZZWPADy4idwJ3aT2Hh4dt1z1+IOlYb8mYVsfpvLvG4GyY2/ACvNR7Nn6THJfrso6qVLu0bJNYC8nqzd/5KONaLq1b96Qp5P9pFN5jKR/Aj7gSznxOh0NUC0Lr9BzkYgHv87Llvw/p6UTOBxU+5WsMn06PGz6snmX1aWL0LEuLGpH7ur3yvVW+1/LZYyAC0n3IbrK37II9NjLoLK5gvlyewmr9hI13c9FR2jSVNeCrFXQwiHLYKBJ6TEgzUYT1VrHLyL1oQV2Ntgpnzo5FvZFu6IDvVMu23ysMB9F18BOXETxGXjLknvCkz7twKjGBXFcqP1GWTHA7VA3COh4x96fymIlXdTsH6AyiXdBcU7w3TrkpkJKbGniweny1dcjTXk2jXkdtf9bzxhyP++855AZB6qsDcWbvIVpDKSb6oQOFlyWTX2eYL4OvfKejC1wWd/u2wqfQqihrS5HlHQGGUsulHbgFzaRuZPWyboQpH+rQ1+l7y8kU7d7RXk4aNZ1EZdFkdyIDGixTh9UyO5P6jKHIlMJXR5MvCd5Fjqfyq+xEVCyriad9jWyuGnelLBzH8RXcSGP8/7m4bfvP/aw++YD0uAgjMs0OzcL+/WjZK5f1iO3dHvqhp8A1XFcqmZt0YAU38c520UlguiDSPkRbfaHVG6we/sDfdEMvLEjwMNd69Et8vVujrr8ugeWd0jOBDZhEyFTlZjO4NqV3LJdtVOLSwXXQAw/bD3AswCPHTMaB8BX4utGNXtyM7hL20AEIh2JYHe5/ZXDPBn5Efy4QeTo+1Xt3hXKYzD1NDYh8ZAojHqfKZxDme3Eg3YGroVHgdH/yVOFgYFnQG4FKueZS1XLzAKhele8stKBnMWC5OK1438ZifspS51vF4OVVJR6ExH8zj3Ra0Grp5Dtt14W4dnQqwVi/XeTH5jhQ1pUAlIKTOJj5KUEgxjDbufhDyTAsCc4Vzk/adgIuoJyVSIHLWT59mFqDjgpngwPdGe4CX6XdgeF4I8gb0JaJ2S/vQ223VK//fl8+ubt/UksobUfuDxzjHHYhxHULhtT5hH2dnht6kkvSR06jtjdN6O8e2C+gOqi6/KjdMY7rnQTWhjLsh7GJlgE5AhuLAZcjVXBB/WkWnR5mowL+uvUjlAPLLej9r10w8kSSNdVpDrzvVZSMrgKbElMF9FwEYudM26lpxW0x1Cmif0ANTKZHCe9iwwaB549AbRnUwaOtNAwIv3rYhC7P6BZhI0dUipvXtAvyAp+DK/gQPIwcc6CM7t5Q2D1ADyYQ0P1VYHXfQXeK+aEDaES0wZs6hY6+Hi45BW6F4eInaDJpdh/pNPl3xpLFGrPvPGFYLjAhxOMtFN6Lazg8w+bW4cM1tnjyS+TjP6myhjVRnYUHpTyjxkmnjFWDVB69hQuyFRCQNKKWAwAS0Qx9/v7nejNSVFr/jWoGESsI2cgcj/SgczmNF2auR0XC8i1bxy3xyhniKK7nPmFJqMgywdgPT+KO0AVy0M0OH3diQR2ye4doRmuR0zz3xeAs6pYU4rSad9Mhf1m0QtVCiQtAf7Br9l+feO4KzlAU4qxV3oTYkWXZ+6NTvCizoknsaDaPr8+mb7qOH8+NEr+BRWTN/ECOyhO5fh62JRLlGkrPGUMURrm/1+pYB6AQdG+ZJ3foCH3ptXIkUkYnzlWeXDzs24QRvKTeJsFNi6LXQXuBtlxjqiBdjI7mYppU152YYTsyo7FXOseigCvhy3XYLa+Hkd5+MWNCRl9YfeHMMutgSeGStgdEkEpsSVdvtDTIYuXceuhugr6WaEb0cphXdLw9dfkg3Jx1P/ToXhOirTlXwdpIUumMhtrdvYXi/3dbVp3Xz4+XvynGt1ivoDxTmQ2s7Nygoylbliw9DeokgLkWO3kXgM/XHsTFtjJRc5Jc2mk+w6og0wZWg0hqwpVgWMUEHISwYkZ7uRZ+t3zxZBNB7eRAmbgugl2pndCvfvuT0rfqyg/7qFoeaX/+Gl2CFGfHPXDEluaRwZ2hH3ki4qN24i4wkKaAXOl1JDnnJqPeTqBnI95OoE8GiNVoAQi09ZARE9qMPrmSA7N1McoLoXhpc3V4xOD1rXXgXQXeYkrtLNOHPXkT6Q+uCaYVnXB9nX0s7TDUlIf8y6u2Z81p0jBh1UrDRxUSFFK5b+ZxYf9hi9u0cRlG17l7Az3Nr/ZX/bckERglKNIEvrFgdcEjfHS1NHQCdp1sjIo2tD8qyFapwdElTP86PkctBJSBUghlSiCtVXYnGRxWFATeltf+RKpVCtorHUzeFZ6t6VF521x75YimMT919IAmKBpxYuBBOBXvgsB7NW7lh9GpoqxyJ54sLOqOz7V5yE8LiRasKEOvoZ38lx01SetQD4xJ9NxsqnNcPvuCusqwDBJZFIkvGfh/nYRJfCLrcVv6Z0qcmWCrQhUptMJMlkb1wcDjqslduAnN162JXa3F6+T4S03fFFklWTWDoWW0mxGNG+yf4i/8F3QcKUs2brYyaQITA/TAvQSMweIOaLrEvCz9cAuv4NgG+vVSAOM/0EfqrGeVuO9sXTgLJq1cPjhjOIU5KIfydg2PIPVxj04E77fg5bmUMyqh5vUZhWdqbML1AG0dZPFhhZH9exCreUavQuYbYFkCgxSaMBBdE3/kszGPK3zH5Pyp6280wAb3kHguqRuP05ripDeUDJuqjOG8H9aTl+3GFlORAasgWEwG1USjEe3Y2lHOvEYcJ7ytvhcf35l/vyTUKBNskETDVD5agbzJ7vGkEQClbrJd9NfoF6ZS8Sw5vMmsGlRPWGfTHNtvmMg3ugs2kSzrhL/WpgWHVxHPm/P83rTn79NIwpOcEgV/5ejpe99kiwDiRsEqSXI5JoIwAyao8nzNJE/rZQDXnUDmlBE9jXz8Wj9t4us3XAIzfutBQQIM4KTitGG1RjhRlT7pRAQSsEZDqpVrfMVVfyaV+FVzedNvhkJOWKz0Xd2hs84f5dmnTrV1TsdiU4DzL25KSf596l0OoHA3ARRqKhHkisn6Fx5I1yMU0CmyCjlkyuMdmMjk0e6Px3nLyVfEHnZMFGmRiqheUjXCieFbZ8e5ULKRprDjIRArUwtSmw8xc35LHkeAg03PUuIlsmkZzI0qwrYQj/hizoWeI3OcuM84BuRaTGKZxvzQM7sHepdFcBVOmRV1Mhm4MgZXv31ELH6q6EvuMkgGOf/OrBXrP4sJYd4gfW6ki0Yfy4weFYyC0w5AWcYIHJMh7KI8/tRuvxWII/zzzHWpwz4z0zMbkcJtCSvRumk9PSOIEweIIE2kavWQKxP9MZML9YZVNWmV/l0L4zJxZ4J6rsxKh3/R409DO62VWZjvf5p+NdjdbHVT6VRE+rjnQF5/HTYGizJeC+QW9XlvFszciomvO8Y7ljEGivVTO572ueKRoRc0VKYeBIxIStFzp3YByP/GjWAetRaeUXRTXDnczfQaDJe5oldu83TkuGcB2BU1ULr8L4gS1K84ESwfhTdEGzwPDTq4/ESUHRjHURNsLhs8GP82BbFe8ZQS747vU1gsUBL4MN6DdM3Tw1RO6EQ7CCRlgFC5vJ7y8bFu1nMkojTVLs67R8AURc8BMl0fm3JCY5oIXEHcL/usuMQQ/OLmAm4G8hA3sQnOJt98RqGk6OH1FwJkl8tSBGGhWgiJ607LiyVSlxIISuP36akUxlKYq1j+iq5H3R0KaAlRe+vxUwKKzERB31oPepBlk8lgU6qMWqAz1z7tv7yXaQKg2+156MZhjigx/8yDywrwLqVnzIYkmowUiJlMTJUJOiYHPUoQCkpaSXFS9WoRNIMxrRPMgrBcG2Uv6uxdeRExvzt/HZoyDk/Bt3VmaK7bOIFmNc0uJzIKO/spBZxMaNElNfMEXMoJt7JYZWJJpv1vHWe0XsCM8inFr6w307BA9fSMioOVWfnD5Ci3v1373X4v2zQl+qEBydw/b/qHOvQ//hA/lq2T1fv5Bvwn7VXq1P+S0n5Jf+Iv3Ls/SMwx+D/MjcmMO00zRun/S8l4etCgdpnVq9cBL+hI6sy/FM+HjJkk9qYnj1YHhwqyJyxW38NLv8lT9gA0AT/7XmUwST7tbSe7yKpHPTbsYpyRiEddxQXY/SSTmityg4waV6VK3/Tv/UH5z/Ofm8yrIbyH61gtK6SO6l1QcJDE1QiBhKNrWcHtFqs0nsqPYFYPd/k/dyGzc72+s0eWe1XSTMrtp9wLVhhvyb0EMA5ozpSDu8X3hJh2jSPSNX+DCUPZ/jrZK63oHrqr3jRGm6p6fbrron23ChgF/l/d4qAoilEdSCVHx3qhqmzXMlfcpX2Y/WBzheYssAdzz6tJoESlVFofaj88EQJVrlPzRR+ktMw8XJC5yj76T2xKa6v0+JKGxm0ro9jqiy/02DFls83tUUrjcZAfyGWbMEUpK88cLw9VJL8O1b+i937FUXoenJ3/F6Tbdjv7i5/Hcv9xVTZunYOrotWFcVVLDyE/X+yFGiYL5YjAz3/Ciqq8fratk9u+3yIXB//JCMAeht6wyNFKZeU+8Tm2C3ezT58p/8cnLr7Fr8NVLbfpMjRa/m7uX0//y9FqGQm4NON9O6OW2MLerae8LAwR79VCbbRbsVeAiY5Ff/ll2+aum+ab4n4W4K6XRQvc2rP/Z7Y2Zpssi8veIQWqMRPKXK+657ZHKjm2JUn26DnX+BpPWmr88p/1tlaGXgo55Kye2umpHHKZ91/KQDbRPEp18/X9/fN9T3e/unfYfxHkzW4v0oSYO8LmpZG+Mbzmrmz+MKB/P+hxDx6YleZ5zW5R1TiT2m87efojrffFCpqTVGCPyk8h4EeUzoBhZMlXv2qe3sN2+w4yFVYl2QDB1+zoiUH1qwi5gJqL0KtxicFT9svAcwxfD/jY03NglAd1gSk5r89PUwSag7NXNA1k2ERGts0KuLJgNxPhFcPttoheT6XsV6+VoEuuz77fCjzTCRHLeEEemky4xnMCyqqI4CEhMfkCd1lOMQzF48gKdS90yUPUjuQ9U0fem9xI63ZujibjNoSl10hft+FQ/3pPrPihs+BcNWaaiJXqDQCDx8s6HkAZOrfQT8yUrxD45nzfm5jcwx1lR5F/TKJtvdfNYra5D83nkIaE9VSsIGORRhxt+f0zIaTEu0oHeoN7aggoalQq4f+3Xgk5p68ffkhd36y9GWqyZOrTyCONmaXDY981d48hb82HOgvtweR1ZRbHQviOrYxgsWmrd3GweXFcE5/JCuuA15Sq+UHZLJcL0hmJUTaX/PFZJGi9VheHE8RBLtqKOdeYcrly9g7N7P8XRDcv58r+lj3gvzR12LF1L8uk0m99n5x/BSz/lmFaMAbUcwcUHIiLQJ89okSB6QTUbzaxDAkfJYZ70zx2tH9kYYzEytbEl8BoxlhHakTeGGPBQP8I9hYoasT3YE4nmzPakx0TwHvrbBMC6RbUfzggEAtdhP7mIAKejj2tCKnktdBQw/QPv9d6po/66wPNoXHRD9et/wzLrvpff17+231PDwPv7dt9Zjaj7hbrx7Hb/Vxq7xP7/df+8vV5/T2b9zephu3ny3OXPnbj1hs0qf8PD4ua9rWL2+x+Fp99m+ZI5HkmRPRK8aZMK6UH8TMEj+JBUtnpotWxh865Vr5i66w5j3dxHrmkq5iY7whUlUC/YotqaXfs3XJ+hM7kyX9zI3Kpf6SSdowJNMsk6H30eSOwbhVuWeYuSM9Miy4c2kfLgU8TSif/n9/xTuLwj3pg8XEvadXFhWfLf1ixEHTF2PmgXTEOPDg6YJx5IulD4zOV00HkJ/2c3fJ+sSFNSfWvNfmN+sX/t+bF9aXfLDmlZXyr3Yr1nv+te4tm4FLaz6wGXnj5ZZr58Xiiave96/Y8SX6oM03m4lLbTZcTfxj8QaBB6r9znA0oz/M4nA7ox/M4EWemhoj0wWDGglj0oWRGgZj8oWuGhZj7IWFGh6jwAWB6jujzgWF6jCjzYWVGlJj1IWBGg1j2oWNGjJjzoWzGjVjyoWjGg5jxIWeGhpj9oWb6jYjz0WKmjhjz0WOmjDj4dg1oxr8w1g9Qxn86fACQyT8xFgrQzq83OkSQwa85qmtsgtM6qmD0jG94tkoIzTdwTCpsheM1KmgoivMwkUNwzAMw3CRwZSoLgkWua8ulw7pK0FyD7pbwUdjAkz9GHmVsfQ5v3kYKg8VUcZNZ87e+J3G2Ux0rYsA+yEYjgvljbODoBcl1XFPNrTvVduVkxNCXfqZdN0DGsHuWfrQi8V+A2dJztrMJp1DdY8dWP1qmqx2zAgBEj1Sghg0D+4w73Tmx7GXBWNOFvyDE/FhMYvzcsoD878yzLg6mAQmNF0wt8XEpgdwrnafc+bqRZ8MkH8HhvyJMYcFCsU2X+ZF5KPuRjwP4iUEY+JuI8rxx6YtpAMwrTutQnl/uE7hdVD2miPYvDecxnQKGwIf4vySag36kZRU/lGuL7XJ9sLt40NnumeOU74IO8s5kz8NtDabYMZ3l0Rv4QLw2WQjrgO1QXsYoekqizYQ4DB2vzXq2HYJf0kkH62g7sMnp5ZHqgpsLNkTLYp7hqhtzv6JIUWi37AddSEhO73k6gj5UztKM9YCD8YSkrNjYE2ocG3YvZxUp88U+qJlMgwn0sZ/bVpGGvwBALftMaBWkAdEyXDUAijPRbvsWtIajMeJHaEClPkkbeZ+do2rA/5p3rtSJ1UnpLcNMhsnK/ij7Bh/DD3adowUX0JU4YTONgic+jIORxKSwvyqmodLSFpi/jEqLGX4DLjt35A4OhLJVw6rsvbOoXsLTBWxnZtp4yCQ3p/FnVdnru+MolgYmWf/jS8Gtif8dGpvyY8yXG13SWul6OU5qxgRKhseh9h9y5/DyONb7iBLNK0ER1EWrqIglxrz3jDakWJyHXg+D/Le8nRyZiusfJMcO41liOjoh5RjIwtIzs4zO51X2d4BeDE7hI1ZdS7OL+xlioD1Vc84SRKWQxKoSEfWIfHLQudRvdruUvgcwrceddI2FVUkFJXxreUluweg92efZy47X7aG9Gw3PSy8ObEEK8g8ifB1WNLzZgFW3ov4PY1Sr5vt9258un8NNFGjealLsIYobzy8+1zk5Sac0lETG0aARe6ixlz0sarZyR1CtpvFCoLm6WUb0iN9PodDzsgqInkuVY+Jmuxj1sytdDY/d7SVbabC/hOLwMKZRRU/fBixGTZwdF3isrRLI0XSYi+EVy8LWhXzPuPxBMCh5uQaee4AOi3JufSAqrsfjdqroZf6dzOgCY/pqvO2JNm7hCpUstKMU9ona0Aw9oeUjo/OuDI4T5GdZXgHmDaYIaL4I09UWYq2WKTHl2XQPK717AZvRcKUEjUqTrzjB+XqlSea97iWndKFinuERImOQvxj0Q0aEAS1FVF10Tj4k6pM1ABssP9354j27LtmqNYfEFl/co5onhwxPHn8e2OMjh6Y0kOvz+t0kK2WFA4nIW05cuet9RXAkV7bNz8v0ZQYLejNdBDDMAzj9uecJi/yH7vmZ9MdVffpt6DTdXc4e5YwEKmA5XqE4ChE5j9mb0wYol1e9Ppu+7m/O6l7TqUOsENbqDSlZreESZazJNGKOs1GAuntoy+jERhRQb9O8fmY6onZNFJcuzANBSkhsYcOkWVp6L73r/ljYN05wimH8STOmmc6M6cDsquZ4SfYfskHGUIZ5qF3vWIgKixilKSJ4kRC7z15JcncggB1LAWmrNEsqMvSLPb8jmkKN+TI2UNgvqVJkOQC/p3IDLacCc2keX44VzMsXz4+eWE/TJlM2xG4QxiQ8OfEojoTl4QTxOPew7TxjF58m2dtQHj3hel5LsPuiEgSNx4zQy6fYS6D+xxELdidBloX40MtZKV6fjQ/kkC6TW8oO2vBBlj4vYYhI/WysEUGU9TC92vaEvMlHuYwaXb2fEO3zxA2xOm5UfSRwVEa0XXDTCvXzQsCryySQ6nZ4wVqSnT0jHpqOsjcvovzcNbA6QbhmKziI7oPBV76WZVcsqGkGOeOqLP3Vkn6rji+M4Rx2XtNHKXpG1/JvWrvx5T5N2pCSX2V8z5WYMatpHAvWxT5fZ067DSc4o0E+YRq1NO3xJv7UbxZsw3SnUek2nRPJOnRMWHuoH4gi7z1iJtuO0Lr3dH79RQwn5yE8ZZ5dJ6GkByS1bAc0LEW+D2SvLM8vpehonOr8MRa+ARcqsSMDBfe3mc0cJZ07LmELgAke6TNa7LRZ3f6qeFhlkOF5sVHRUm/ZMe6G196z6EWDfTkbaESf6X7NOuQS1QCgcyvKzYEDJ+9bkLeGV+UrWNPA/xn+0GTbE6zy/mb0NGhsvi4+dzBjZisFjzZEdH8uLJMRI+qL2MWkbBnrbenh0WSITKgM0liPIU9SplRC3TRuYd4KRe+Z35AIPJ27vRIXFp3KM3/HEQuyxLFRslEYLiwE+fxjkZ+uCg02g/1ByRGVI8kPZ4HXF7L0cleZzERbOTKCf0cEuTwdhqVyEBJNClVHYcvwCSBgXbf6TKnNfN3nK2HFkRgzFjV5nlZZBa9uP/sGf8mzz0IXPA0aHzX3p5tQWreWINAh23xeTSxAlNwgUpWyO+iPmCOQJoQIrJTQZEPatLJ0G3f4/hs5uXbjgjBTjoJQdYoN8NMUBR+Z35Yy392MHDOrtMTRPq7nbwj1zhDOmLQco7nuWrOTYsxfDXb/ek8vfTQgYt2uNLeRUL2903H1rlEb6PpEwvmgHPCB9eJuzQ2SHIhRVh6+WMLFuN73iWX52Y+eFWcm/+F92HGLs9kfRNIvzUEHRs8aXuCEVmF66L7NV8Rza1fCci2LdO0JIy6WW4S/NzQC11o+zFRyMc4aQ6qTYheLtwJs+l8JARnxJ8wDMMwYsdgZ/2yuwttSRotgGJm1kT0yQIIz13MwaXbwybKmaCiKcyjs5OLMXRMYLWlL69iPOBofxWJMxL8a1Y7z0I6reldBC8AP4qkhEWLOr+Y3U4ceq7o7vDMC84e8pv2X95LZzUxBQwoYnmpGwdfEbR3oAFvyDDMHAS2lHeiIROUizP5djpRVfgYokZTpibS8338BEnybSPXYUfGIELkqrirHqgSVI0lEuJGf38W2PunAyppQHYLidoAuZ5h7DnKAyqZQW6qln57qMqe1OWM98vs5zc8wqPzQZJtYiwBMpAHUkE9NCcSyBpBUPPBvVRXIWTDnlySjqZE5NVC5pmWXX9wAvzk1pYh1UZZibjFF6lhETcMk8QV/z3DJtunfyLvtbS6dvh6uFnQL/Swcg3iEEg9GRTXnEnc9wojVUqMD9bB0FpVY7V0pe2C3aYH7k8/5tKdeJs9EvOias5n4QuJWq0RcA16zcSEx1srD27ctSu+mAXIQdlmuc+a1H44ZVDa6mZkiJPl+2/OfFOP7p99JhHjiiaJTxrquOjQc+EenYS3H9xhTm2fQcdObuIw8c1G2Cp2j6Gt8Lf1tgxSzeNrfNb+c3sp3ne/REnwKjVP5h3sWub23Cu4XbQJV0hrN/Md5HsX1UH1Wcpd5yFK/YJDo/SyeKMaVWgvevWTdoMG/ukgrJRxYv/7mVytFYnHQ4EfZ4gXwBpOhMtDFCRLsHFDZiweqmW6oSqohiHg6MvjPYN+ZkvkUEPsRW7lDFH5C5lGl+l3jtofIbHjVU1TSCBqe39ZCN/k54R6VWeLrLjkhV2Dt8a0KOaEH4m5t4tUmtPbtZVlUfhXOmnQHlaOcmx8g3eN+VPoc7mfWdN+FrQ8LzAtIByCnVE3YzV6nmCr2Y08uQGd6fDDk/KcCc9mfNiJnQXE4kvaO6FDe79oyoJxN22NZXWLbQBXOuAn9D0LmGDsage6t5PEqVjOzfGxLrnixaWUW+ZzqvtaC8lBk2IpTLC2Lm4XTkxNZsdv/cUwUH9UvJPCHwcBD6caG9JDuWqX6oIXPsldqb1mPyh6vQWqOEpreV+t2ZhxznPz2hrsAE7Ln++YUDUYF38pk8ufmyaNsmJHlLP15OA3z3wf5qXyUeUwvXF+iu4CkyC08IC3UmTRr078GeBJ7CKJAoHHq3fkbVAPnWvOKP/j7DAF+pe+Snk4K/qahgqqKyxoSSy+xun1AwhLZm6LFA16gXio1NRfwFjbdveiNHZL4qT0Ap9m46EHo+MGtIa89xpgUtTBjPal81xjPYnbfhTXyBX9IMCdxIXO5y5oMS7KWOHrD/2wrO9TmdwvwCtsVu2+ldawrlWYaIiYcV5pM35yQkU2i2YWh2EYhm/PUb8b5A7YSC/ba5FgotFxRCZwJaJqBh+4jmx5DXdFAEoYsLPfJPDy2Y5BZ8UB999/4v47VzmlqBtqMElizbiAan+f9EDL7yQaLxbk5dDVmqKjYisxk2pqMTP/1/+ofoZdjY9GfJhsOblL0/DUcPko3FDQVLT6vnwA808MvZXiUrBEXfshXE2CKWbOP73JMY+R/MNPxyEC2Psy/aHEttTQjBXXnKYfiK4+XGqsQwKd8kTJjMC36RQi9sG3rx/w2FaDvSo2jHrLYcETfLgMCMZ+LKhHAk6mGDbI4/JUYYNSI6bw5ZqViG3dtfj6TitlCeQ1iGCWOleygWWmJWwKBSGaIq/DysijnOJ253TSrRiPpHBLmBx/W4JYeesj5K9QDTEzBedIMlA2BuOjody42Js6kpq8auwWzVBgWzUq7rlGdcpq+SZdcHOlW1rqmSTbFaj90n3AlPWm9pkYOYSaGeBH3zlzu143LIlicFyLMY471e7bqH7txjIFpXWTkVc+oHrrdVAgwqixXgl9B45kxD5OYngZOoROYICeK5BiKcsoHXU+Fqz5gITt/SikcXuN+yJZhAmQcp/Avj1OVlRGqVc3TyHU4wZv49m8Cuv9wWaeDYSHDjU11pd1FZc0wSGskhh76XhfWD6RL5/v3+XIVA4X+OatQ5LckmkMtgCbKt33iXWsQOD6HNix/z5dpXgfIpxaXNRYcYkXKz7cADA9fsNzG1/CBuvJ/b/H/PU7HPCOaVkfEVJoIUOJQAkidSI+hcV4db2lUyja+pz9aavziNPr8/hS9pFOhaQPK21H10tH1Os+tIlqCPFoaqjr1OaN9P3KyPwFrR+nWqhONHvjDv0DqwVlXoGBOvcb4khPbBIBMQHht4CwUabh0OGFHX1qyy3cDtPt9VqwkjqBhiBV2r+jVZIYvjUYa0+BURE3R7PQoINQXtmycE8+mlJMAgzVM7US1MF1nfwgClIW/ht3E9RcdjNVL5c5CpSLcGgW9ESfQDdVD2sEzRaeLH81QIrw1mEU3SeTG/qExNQTm5ydAKvZuygoydmmdhNno4dJv0OZ57Pw6r0CxJB6IHiJ6r7lp9GiAJ0zxdf5ZPimSse/ISAk+YnheGsHH8hFynbAFz0Nl9hvGqfKfoDmgt0RMBxEDgqgIefKBmQ0tcKHo/4P8pmEJr6+mE8yznLzfjcgj2g8n0uoLfXc2DUO0JgWusY5QUF8eDtDVS9cMhj6rS8bW6xsPuuPkNzV8ALjuIIQuExDf285ck1sBXauZK9vavwYpFheUVK8do6T7brbBLXX7Dz01sYb6LdqZDorDpHe8vUKzt0YlZZOLIXXRw6mw9CB+ejurAscibnqTY5qVWAYhmEc6ppaqnJs0xMifPX/r1AK7D/221HO35s99PMUFbcFKy9bPW2jkjqMdgm6PXQztguFzQKENcdUQQ4NTJfqdHTFH/donCO4COWBQtddXQOiyH/LGuxLDx8PPh+fv+7hQX4XFp3LzpVqL5z78up0W1SbiSLIJ96TOIw2bfehevmWj8ABJ1rtTKuBGV+tGILF7CzLEzORWxNHbHr9XrBSGfk/rkLEAOjJhCowLlkn4swu8l4GF6JyY5Pzj2KVqpM3UMFfiQ3ugSH/C+Ipqd085Se85pRjA7FlI6t+s2wkdx6wk850yE3Q2a84HAEr5Y8eYDtGpzW0V/ThufUmmQdpKZTivLowc/npeFMLniz4/uT8Dse6qltBU/2AnUphGd60MSO1Sn5sDSGyCbyK4l9WB64+K5cAge7mSCmUMBcmbKZEaNdMUjb96dnnBpl7d5SQl8JZl8PvRdQVAOUaJdxE0pB30cUW73aU/8QGoCtBugt4GshjYkzkx/k5+LfH5LFCIPz99OVpY5aRrNJ4mWqemD8ZRSM9rJAwUw5c70QDnEnoNPYh2PBCrFcd1+VzKq1tEJ1k282TtLsfX89TqYILioBSnhGFy4LipXtoPLhM8l9vtgaVdnMqdGKev/vUwT+bzOP2YeFYb3EnMV2RnnSVLTuoSDy5OR/NlRnXG0KWq9d7fdsZbqF1+Hry6XPEa5hJxVdTruj8i6UuFunPl8jKxStiPrSt83pFjVOok5J4cupHDiQyXlvq3lqAH8X4+QuDEznhdSS1UeeweHC5oAaiOQ7RdgIKeCrxatDQDrd75yj/4FTg6TZ+BX1njJbCtxesI8BaUOzvx9qA6mWSkN6Fe7hHUfg61w4z12TGTYNfGq1UoKrERGykAcsNeBLv3DPOnv5+FEnp4JgYIlHILGgdXEAZh82GJBMY5w5fajuDiW7qxTg2uhE2m+VC4CBxk2tcNH8w7HdKpI69zhlk6+spj77SXB8+S0FuWHvL2IfMHlPSNqUfinOBtM2effVBISj2Y59jJDwS8wDo3krokIMgbOZGleVS1gikGmdCWk1eTG+RRma1+ZPcWJ5gJyMcUTXfU/34BoboZI3ILVfnoGkTv8opTqfsuJpWohjw6GEXAnMGzD6RPxCyhLvDb9W5kgcr5Yhu3TgHv19OSiWVVxQNEeDT2ArUSkd/EnhPxknNKyuyYhpDirYU5w3lSJcpfFkvRCKymZftCtvjiDgx+14r08T1/0hQogMdKCZBpe9rvYaK8Idsus4LyTU73rqJB8hZv68Qg6ii8AtZZqnjTTNDTnl2t17HbvOP5sUhedrAJtQ0vpWahACfcwlIRXCP6dZyj9W7LJN+BqVllbbMfUn0KGSgolQdvIaKo030rSV+SwUVXRoQtSiWnKhDI/h1HOoEkdG4QbZyAq9o/I1s4QTdjMaIrDhBKmj8F1nnBFGj8RXZxgkEGs1kfRZ0AY3cyK6SIL2gcWFkKQniGo2pkV0ngd9ovJpsTILuC40wsvxCkM7R+G2ymAjiDxr3Jlu/ELhH49lkw0TQ3aOxbmTLiSCdoPEfI7MniCUaWyNbDQSe0fhussVA0L2jMRhZGQjSLzTeGVk3EMQPNB5MthkIrGk8may/IOguaSyN7GpBkP6h8cHI0oIgntC4M7LrBYH/QOOXycYFQXcADZUs94IkaMwqiyiIZzT2SrbuBbZonFQ2REG3QWOlZMsoSHs0LpXMiSBWaOyUbDUS+I7GD5UtRoLuA42FkpWRIG3R+EvJupEgfqLxRWWbkcCAxlFl/SToWjSKkl31gvSGxnslS70gbtH4qGTXvcA7NH6qbOwF3REanZLltwTpAo0/KouKIP6i8Vll67cEHtA4q2yoCLpHNDZKtqwI0hkab5QsZUK5oY6cXKFkCSo3ODHNsXCdCW1uqCMrp9BlCRq+ceLV+8KYCZVv6silU9hkCcoSJ8JjIb8SGtbUkZ1T6F8ltFnjxG/vCzETyt/UkR+ucDVLqHzixL33hfUroc0ndWThFNIsoeEBJ569LwwzofJAHfnLKVzPEsoHnFjPsbCcCQ2n1JEvrjDOEtqc4sR/3AoOhDJSR46ukA8SKh1ObD0WVoXQpqOOFKcQRULDb5z47n1hUQiV39SR905hfZBQ7nBi8FgohdBwRx356BSGIqHNHU6881joCqH8lzry0xWWRULlGCcevC9sCqHNMXWkcwouJWi4wokn7wv9JaFyRR354wqrWoLyCyeWHgtXNaHhP3Xksyssagna/MeJDx4LqSaUr9SRsyuUWoLKDifuPBaua0KbHXVk4xS6WoKGQzjxy/vCWBMqh+jIG6ewqSUoOFAxEkguDQd6RgYkZ8aBA0Y0kkvmwBVGFkZy9jhwi5HOSC4XOJAw0leSc8KBTxhJSnKZOHCNkVFJTodGc1m/IugaNPJMdpUJ0isaF06GpFRMAgPJSErPZMCAmaQcMNEYSElSrjBZGAP2JOUWk84YSAuSkjDpKwNOJOUTJkkZSL2kXGMyKgNWJOUGk3AG0kxSRkwGZ6BfyJdbnrIXWu4T0yA2LMTKmLw8PiZ9cjV0+Nux6fznPy/Df3GsOuZfHG8vGv3fmC3Wa39m1ZvG1146iW08ppv4r06D6G276T+2z8Pt2ufctfuCNT8QfgHbxWb8ufE83f/ieFj8O2tv9T+Y4M+sx3FbrWU//VeNT9bW4cnInYuwXWpfV8VJ3B7UbzVYuqbKh6WLHKDLPKALYyhd6UGgPSwdu9s6f2j4wOGROxjKg6HVzREd9feAM+rIOPoy35mxMzmL+eTWnCunO+bCqc5wLJlzcLITGsD6TnW4ucY/f9WYwUVZeewXAlVVG0En6w5crlxwrIVTK77jZsk39x67pFD0VA2ToL/YQI7o6lfGBpncvJf0o1Uzy5s7e6pSFPVO25NLpTpiUNkHUg0N3WmmtKftRz3CcutSudiZMcuw36Id9xsL6hZHnRd9RRzf77Xgzlt8d/m3eWcs0+yBm6gkLzhuk+CwSja14bpirqKxuIn9qWNN938cvPO1icUPnoOdU8vNHj+flzUIyc+sytLSvoxRsXeddmcqyeBUo39o8CaBDFn1WzonOimoXuCUFqEemWS+OBEn/Q3zkqeZjDEPXOL8VfdKp2xIUT9zR5oZnSdiZuV8oF8xzfLEmGkeT6wyF05QGcVOP+C43jL6FaAH2UGYmLlxMu8qAdmbGFSy1vfSBavJ8nzmMS6J/bdm/vvJJyJaqQiLqGkn6JNpn2ixo6qIxay69Po9O1JmwC3wkDxTHv3Ljj358oHBuCMVFtiTRhbKPWli4XwmOSMeSBWVhIXv2PbXG9Z0cDvZ1zg68gqioHc4R95DBPBsQ4LEsV0WN1V82C/DYV6oqbY3/Vw+AHwZTvn/QDurFMdYEUuDNkGZIWjwmJB3EDv0DhH5I4Qog76+Srk7d0Sn0CqUL2zFKxxH5AJxb2gR+QgRK5wnEmOAaB1aQXnHlI4yHGvkDcSj6Vu5Q/4MERyeF8gdRJrhmFEOoIpnHK+R+8bHcJ7p5/KEfDCiSThHKY7BEcuE9gLlA4KMx4BcDfGkeocO+dYQMsFzL2mnjugmaCcoR9jJPuP4B/nKEA+Kdo78aER8gXMlMYoi2gHaL72MG/nOOP5AvjZEcX0tV8ifDBEGeJ6RkyHSHo5LlFNU8RHHJ8ijIbbOwMMr8lcjmgWci5TGpSOWC2j/oPyH4AIeL5FvDLFzew4gTxUh0aAvjZTGzhFdRNujuKniExyfkXNF3Cc0QW5KxB7nFxKjGKIdoW1RRnMj3zOOP5HXFfGY9LVskO+VCCM8fyGHItIJjiuU2qjiiuMt8qDUQE5xLn8jPyjR9DifS3FsFLHs0d5Q/hjBhMcWeauIp4neISHfKUIqeL4nadfPiK6Cdobyw9jJvuD4F3mpiIcJ2gXykxLxLZxPJEZmRJuh3Uh9nt2NfGUcv5FXjiiDvpY18t4RIcPzO7IZkVZwbFB+GlW84PiAvHDEdmDgoUH+4kQzw/mXlMY4I5YztE+Uv0bwCo9r5J0jdoPeoUX+6AgpVBpS7rIjugLtGOXbbMVrHH8jF0fcL9A65KMT8QDnfyTGoIi2hrZD+W2m9CPD8RDyxhGPC30rn5E/OxFqeD6A3DkiXcLxCuXQpMkMjorcM0WX6Vv5inyAaMBZJMZgiCVohjIpATyCXCGeot5hiXwLIQbPGyl3lzOiM2gLlErZyj7iOEG+gniIaAn5ESI2OO8lRoFoFVov9fnCuZGvGccK+RqijPpaLpA/QQSF5w/kBJEqHCPKiVLFDceCPEJsRwYebpC/QjQO562UxtYRS4c2o/xTghkeM/INxG7UOzTIU0NIMujLq5S7NCO6hPaFsldb8RnHF8i5Ie57tIDcjIgZ5zeJURzRTtDuobypKVUZjifI64Z47PWt3CDfGxEmeD5CDkOkFzieo5wpVbzH8RfyYCKgn8sf5AcjmgHOF1IcG0csB2jvKJ9KsIfHJfLWEE+V3mGFfGcIWcDzo6Td4IhuAe0AyrGyk/2M4z/IS0M8VGiXyE9GxAs4ny0BiNXmQJ+bezRllOgrlV5puVs0ZZQx3TD6gXNyhaaMHvc+CoEJ0HvUct9QZluUKX1S+dhyz9A0o1Seorz1ouXelDlnnJw6sq84Kxs8FZw53TF72nI/cYprnNd0TOl15zGeapzif5yDXcvd4anGqdOO2v84l17hf2ytNyVSadV4I5to4X2KKQ6ifBKN/aC3QqpaJlU0s2BKHHVIlYPU2GLrC2lqVfuVhqgykRho3MkQU5z7T6S5tbVN0sJC+yTP/TAoD1Jbi6ZeslbNfbqJRqaUJQ2Nci81rlq7S/QGqEv0e7QLAN+wJ4wBrySssKJTAheobOhHO2WpmyiMbdxGF/iG3LsTF+Dwa/SVTXiO21jzuTgJp3U4Qoc1LLHfgH4bt/SL/WllmepMs0j2MY0uNVk3SnCowz+RdHJQCY8r+vHYjK1Wne6cchyir+1I8vG00KPXLv0GONVn9Z2OmDCw8eMDqMfGz6SzWsM4BLG63mFpxttT2sXzk9O/OlzsNMJjOk4XeldEqoPabLGs7U5ntzgTVTVv1Ge97kwutjXf4JX/TrFq4u/8R99dvJaL9TQErTbtxiT9vGIS/5lY1xrL7pD4K/L3BXns/yXf7sfdtpnD5ms/Dk31nb08pNN2ubkpVzs9uRz8wniz/7j6M3y9fqwO7Ph2vou5k/42PS7qZbdYXzRxv+02R48vZync1T/j7qLJ43l5meYhhWFazdWP7unXSvYf+bRfT980yXyVxWK63H260NfW63EUNXs3J8EUIKeAbKEwBFLueaEO64zA/Uf91nqNg9bLoN4cP/QmMoLvlEaSrJ4NPvk37L8sCnUEqRrVCTvWJUIfL2+qSzZRI7hYpDe+1wn8SqYhlagFXd7ml4jhA2TQ8w0KrJzian4D3mMbNRgLGS65S1pLoygDbJfyFU/mKErmsIr+/2QgXDldCyAQbb/+npQhGRPgY2jQi/fTDo0VMlxhja/d3XpU4g+mVvDwIYF0TDYnEKBOkm+U9j4wpOMzTvgnl7ePfyPD/bxOXhq2q+YbanqipRtby0l5kKh2LVR9b6vIHxSCDIQSPKWzFwaPL7pIYxtNS3GcZnnb3+d58iCBQBkygh/ayE5oFT0toq7iUe8jpKvvTnSLKcDv73OfRD2FqyYUNO2HqozXApUI50Z1iBfriR2t7rhJ6gVUYbiiFCu/ImF/+z88w83yrZ9ifBf/xpO6k8SHFrSTt2sYXYtCxgCIfqQbc1XOcThPhKyjVrNfK4/jz7hu/Jrq+IavUI/xGRc8I8fD9VIeY2drDOo8393UwGRoBBS9VpxPfUU2JbZf02zDFF6YEhhUStBLHWHi9+ISkQbJKaQSKchwav3VP+c6B86nZv8DKD/ayDZ+jbrtxX4tGa4lsB9O6nLxywlEDMfQwxyz0S19vXSd3L0WGDGLtz0jjumKT9DFFcog3NWy3oEX5bKcDXcrzR88j0gauZCbt8E+YDi5EQ/Pjic3BIKi8FOTDsXD3OomrqXTRcc+y+dWzVOFaMroVaukJJAQId5cPKRWD/NM7kDxcFIhgUA9diiPnjEIAYq3FqMzRfIjUYNsKGl1rb2W1C3I12WAtCQT+0QXU5LhvZGjlsDnwcPNtnThJVKsgrRHcCfvNKFG3Vyj0CbOoJIGQ+oFZUgqvUunVKESqTNQsuyqSSVqqbsQzrMHzG8rB+jHJFBJm4A0c0mF+isRqLMi72rYO6lZEYouE/Xdt9H8eGHCmh/Lk32W5fx4I1BXiV2VJc5E6JSpWuFEVLoWSVP40ahGVyLIYF6HQgZP6GZCD7Z6p8A9RpEeQTZVQLqL4ti+07HSosdPmIHOAQr1+/BK9S9N0b07rSUVu/JoqqLFoCcnXbcaf3eTr9OSDA+JdCac5Wi5eDxJx6B/CR4gzdgn/qjq9q83Ep1M+Lu4ZwP5oVo4udDdZJL+g0Re0HhFY+zqu78iB7TgMt38rUeRC42SSdSViP5LEnpBKfUpIFPsid3o87exlmxjAE2qsepK3MLibhiFBiqOo3AWvIrA3MersfLehEjRbBdpjaIZMvWxKdrexzVZ0vptZ+52CumYlx05Vgqp2g0nN5OTsbp72yehELdxP+/p1XYgp2yeXsKpPSa0xxPwk9olRrMw0hsByAf98ZYN1R82dV3zeuP+wGFZhmOcnOTaoG3UtLNcf2jnaVMtbpUuwm+wcugUvAPXBl35v/RwXe13F4k/9TX0/oX/VKPuroM6h7tYqQ+ho8765rc2ctFNOBqT7a9pxHp2MSpB0NCyBDnZ9cbXPjh3K0Dv9mgFPyyBt1NBmjeibL5YEKBMfMCFPju7/LGstqRPBPjcFIxtMlu7JA/U9BLL9MMJ1pxTq39AgrP77kxuQ4P9q5i6yH4e8jzK70jiZXBTPerpgnyBa1oMRzcCBbWkjuleTn/y64R/9tXvHm+3j0eopqSmoCVquGMFi6BlGQEfoXWzCDB70nDc9O5dYvMWm5NTfz4R0/2PfWuXRdC6FbMQr//Tv+zMGW0lCXHvCyX8GF/auZNLyZGdXH6WZvkVor8Zi9i0mGC5DB/AOHBneetJcl5BdSW6HSw01Kk1tU4O+91QijXnSoz0t8MOiQamt1aN4eamLWV8TdkaCp0wLVjOX4jsGqH4DcbiLq311fUtpDvIIzDwokRLyW55RygeQUGOjkBMYBL8P62Eyccbp+lqsAr6s7+CMvPIB6DMCForJYS85p8lsPSNxjhe1iixkLp6e4SfttoAXu8E+i7uUf8QjnCpCe+g6GZSZICFXHDzi1+eCg5u/Pir/E5PH4Rp+hlJ+bGkzjZR7cb9if+LK2t6Zjk6mJ84LUqlWFyABH+U6yjECy1RrsUZqeLHdv3+ZCB7HyB35Ha3tx10K2lVrKU4e2a10EtnhY48ZvGEsDjhVVXX6DHc0SdI1zRlz1TKSOzj8fexT3p8keP9y2Liy3F91vaK052T7BpuXcLibpCpq3YqjRfQ4CsNBvnoRBq0p7H/hNLgeADUzUtfLh/8lIl/0wm8ooVhD7PnSfdTByfP5Humb+3zepcCtrsno3h0xh6YApdVhGGiE1Tk9eebKvYPkIEL/ZeXkTH8eWNaDnjXXRK2PIffU+fffc6POGDpn0q2/oob6qpZml5XE+SJm0MQv67o1tXa/FFZaUe1UMLcD5sFqHiRP2RmRaql56BYo5hN58IMoVvmbBAWQRhRu7f+hk969spX76rXy6U0pG7GbAPLwR6f4ScO3uJLjOKaOFIjXvMZyYoBiBB0BBLKNYs7Iy7QeFFSnSjHU0DKuXNECIThIhfaJrtHN3HhtW25Dv5MB8TPlg8vHWKw0MzpX18xJTZa8oYEFo5lAPeHSfzav2pjgOWVTrSHmusR46LxGS/FRCNUqL7KYXUf5gbTooWzTZK9yu6MJdaQYz3G4VT8LqbqaTqZ0gqd+683DI/j0+Ef1V2BH1+lt2F4LkqOSEjrEkZ29fhbYRDmnIO0THxF+i8z2pYr/WNAhd5QYPWzqYwBl906tTcBwwTyWc/OUdbOnfvI685qU7H6ske5f1oIed3auW8fAG140BzltoT+p/QkKEcjXRp8Grc1HL4p1O+ULIrFUn7hWbQhX7nfP1Ku/ck40Z+/A/uJQWLMsF0w8/uKpv79dqhtjV/78/diWhZX+teIbYT7AeLf1J5KshUhjuX0QblxLnG31fMLA8oKwmWBctEvZnDGLBL7X9a8ylnIpipMlZfGhqLv0C+WGXXjl0F+XBkbn8efW/Fc1D8atzuX8UfDb1Nj9NgfX2bOfAU78FnljoPD5TFAmK5LT+LOLIYYaohDexGQrfA8HcA2K5v99BMdGojWlLFfAUDYezbeX18/hUdpcZ30avoe134PPc2Dn0uTtv86FpBJU7vyhQTz9In3ZW/SKbuURmKqU34AgpRzHwkAvnFqPbThYZlFlD4mh8flGLhtAcTl4tXrnrMlBEcAypuUYvbSay1MIIxMyoXCY7Rp0KE+uYl7Y0I+p4B23shmy0yKAM0FcaHslTY9f51xvpKFtYNybuC67s230qVjCk2GgubH3pTbE6rKaSZEXzEXubncWmfrcy7T7HJTEDWyvjR43E2KeHlvWft/LQ2dhsGg91biXEQnMlJzfdWOubZks8PyWjWHW+ZN5XpKmQOtDf2t2pgqtZe+sFvYHOwmq39pa6Q6X1Pu8rZ6435IzZ82JFU7LeaC5naxkDi9kiG/+T1sBTxVUE6InduHhlMXbJaaCXnVQWV01IVq8qGWUBsL+VccpZDFVnUcwxNWdSL88k/ZNEucYidCWOrsl695v5+7wGUvfR5fzofBf/mDH/u0t74f5q0r+VMzvKVXOpkJ+an75vvU9EgL4UefNT8TAtbbMMhvwBfyo5dJ/ypsgraP2Zsmy2/apeslSg5KUfwNwnXrf5vTf9Uw7Hl9MK/iXL2zbv2VvmC+Z9y2Md3m79YWwxi9jCIUV5HOHPRExrFzoTviJyAffGgl3lQoadaxv99aK71i30/rc6nNh/M6n116Cc74V0f+lT5j953kj6ZtUk3Ne9DdeCgFCXBPAgkkkFsLpBRh2a/rX8f40OJTmN06SloyojQX29GHnxO2Dd2qjuSJ0iUBB1DgR1XiboeKGBYchHPcm9Y+6zSQjR9tQ5vdKxlTlMT3gef8q42wBLh6Ap9vHMwH9M5nB4WTSxD4ump85W5hI7z6JZMDlL1kuFBktXC3bPmbXTBUvZAUouG9wQvwvkrlz2X3kDXeXL4+UboNfsPN+LjfFkzTYWa8VtYOhd0j5uYT8fXnV3zMTpQGSuci138VvfZLKSVF9JBLEt+bDVYQTRPK1yVnKcRVgeN73/NLnLkMfi6WglP4zgQlgbzPTJ/D05CxlQJlXQU3ez7H8TGLVR1r7NHngCZtv94rcH63DfBQyLW1JB6J9AdFEkgkt/2jTNRk7hCW4U5hfY7AEA8PzAJmrdDGCl4V9IRYQBKTNpH5fOOXqPtVnXFL1i5LZK4Vw7axXhsLRiD98GakVo70TiKy6R1xkGwdrwSusTpcGp28o8SAjykDIlcR4vuQrpMgUi0ATT22nT2icpa3g8GlT1w6hEzt+F5XJDpasq3etU8UOhQOWL9TwU1c0ejkSPoZXbdJRaqTETGc9x2GWpQ6IRC0Y5ORW6Q60ajlLVinqN2/3ndLvFQzEqmO0FfnpqpbKXWYieq8Seup1Q6xXzJZyzTj9XLHOEbkcol1vUWlI2jf1k1RH1vuGvrw1XMQxa2dhqYfpxz9onElfp8vUlkdSqlDZOcZTahTubWT+AL9UqB1abVjIDbF68C9l1Yxjgb8ulAkXeuplNp5t5QNaz3ThRKNFpFDIU2aertjXCtUGrwwonMO/pVeqa6vLdcRoJLIrtPkiNS5spjo1RElsc1EHf7Y8HQ0yR1yiAld3juFN0GyjTU/3a4vWDwUxFpneRdBPvzn92ISVVgkpw/YsloX4v43+a6AfSQBeBqEtA0Jc2YIPoGNi0/RNE5DQIUGMRkZQ+KB9AwMlhGrTVzMv2jZ6rVaKBVC9e0x84oAP2z/y6fsbSTwleQ0yPO+UzaPuvB/CWyobLVB5vnl1fbPCgwyet6NvFgP0OHuzWgkfRrGf9lvm4YV8mf5TtJiBUTeq6d5Ix45VWrkvzT6omLK1QN68hURG8AjvBpJBTfm1YXKsrE+oKEEyryiu33l8whYYi5dyMxu+GzENbMJF5zI3JE0PhyvnXBcETPuz3yYbxgyvEPfooE4h9vSnGb0VO6MwBYtQQq6mYsfvFiaOVhJlqQPAkYT+VEzmGL0u0fSearp/ocYD/ihwUxC+eHJsWngD45RPkagFwvFqxF3DKWFm1LgA/yLOCh4JRwIDZUME2EQIseGqUNAezNF5C9HLl4ecHFJA5MFnoCImLfyTtPqyaXS+eEm27k/T97VejSXp44XRjLCbLcYLQjygkoQGJsuoBb5vaxKneFe9Qtbta1nFfhnqS9UgA+fZbgvGQGyaaW19o0pFiRb19oCrk3zhNOVk8qXxBZcEzylLSIKvxmX/7g+K2WTjfl6iwwF/lvwd/KHOe9t0UGxLMo8dGrjfM8WShdayhcPdQiMqWeyLeje/4r3J+iJ5Qu+oJ1pJig3Nw1I7V219lEiZrnXCkfTkfALne0aCQhyzzJW1M9cdC84VSXnUn0YOXdz8RRA4bULJg+8Ld1bbsiSZdaT0cJq7oP2MwUx4lxB+1msMRDnHht3oLTonu+R5cIGAVoOzv2j/SZRQN8RKlp3IThENY+1RZfXOTlTsydI21sQ8Beg3IH2yQSdUE4Zn55KQxXfzJAak+CD1n4Jmos1/YBzT031cdsbn05rHpdn1DwBl+25dxRZmuei8NpyDNHDC/6mRpSfqmtS3uctAVSoE1GAPlSnVzk1MVh4paLednMce+HCPBQE0pAFw06kjn/NNwGb+15aOz8+HAlmhDCf/b2xxAmzLD1hH3qHIlmAVXI3XgcJXFaszSGYJ7WQr+TBz2UWExyAvgFA4KDI+lYGfgQe0CvW8jOZy15RCJl3CVIHcJRxbnrEAQ0acM13scEshB+dEEVKy+VdVqS/t+mLdVZm+ykq7A8o7MEVF0xMkPGxQ7EBt9cv7yoWGpDE1PQnUNoAAlHFWUPZAhwFOQYTf6CiRYzXTuKlL7Qg4AAS7+7+LZqbEswEdZ9IF7SlcQmTyhMg0AHjkEeEPTwWCzMr+0mXYDA7c3853ARWVMAA79UgJrK6OusHXgA1jtCtMhDkTchGDyQm2mzHegGO/bXBZtIOyKLHjcO9HO892GQy2PlbbIZk03JnNiCY02GYntKqYhRuFdh3318y/plw/Tt8jr6edbH6jLvOsUBTZCMWvvXhWK6+pAqqZHoJ9ggLGTl26luSH1egvbG3QHYEWeKfxjVMcIKFa9Yktjo8vucEVDGwB9UxcgwBYxF0cgszar7izZgrSzuZVLsXxrdnCxgJ+zyoWoAJRmo3f41ywOAAixMEM8hMHSfQiqyXGM70p9VU5f4lZti5L+olVGalHaU+dgklCe96VEzoiLCpBcxcZKWwMeSRnPMCIbzmRrxv2V5+m8G0iok0FEUv6836f6YIPkxe6Z50bv5B1YEuH5ZsgvQ7OKmGrsQfqWA9/IVBO+nMh7M64llJbzI6spBEzkn/6TRYv3kzfE/JUlN7BrkEIUeFJaVLdLGvGLIfPgSUKOD4XsmcmaMI1dOFa5QIpd3FOeCs/QByGtWYS127EFGo350/MmQleE2e+Jk8yACshFi6tj7ClmY0jYZOXDQRabHtRRPKawQ6gihuHIqniS0GM1gmRlUN3b4lIbF+LNhc2hE6856JULb+PdV7Sd2Gf57bVtOJX5We0Ltkg3uG2iV9EtFFP+PHQ7Dv9UPIznHCrA2G48GqI0vBlFUfwK/CWAz+84MA2JlTJZGG8Y6n11lDbFOha67t9OkYt/1oKQFJOmAkNiYmoK06L7gog8QC/uKEuIO+kC2APKtR8dzQnPuuJap5ZYnBXCnkYzhMbyRDRLUE7DJxEl1QTOAsJP5XhDaIQybEymbHJ7NaMAhiJd15mYBkIYVVFOkfgS4tYJ8DSeKmEqXeXCcUNQC+EMNgkSWNZbEqmaIDsFbA8IS3lMtBmhCPZwtyOQJiFWfZNI0g9s8V/UMe3KUn1FMj9wQ6VAJ52kerxy9BfiHwWY/fRjIH0LBBXaJVzBk6TBlTFsBTLuhzkKLTAqdJ2LEAyxYkdB/0jDYTuQJE5kF8Y1RcWEJ3USTbO+mcCZGZPVNHszTuOU2mmZ1WHYWM1Sbx4T4nUrQPDYFIi4q0zcOl5aBAwWNe57yc0XwJEoMBL1HQglKgMPH/rY/MkFO+L41iGYdVTQGgBag+oiyNAAuk4A6laNB2xYnh5hul9SqJ7Hkp8votIiINBk2ieClQnN9rJlDSEle6PONmby4hcmHe/I1R02UtFvg/nHxa/zrWmqOKcbVGtRnJ6cULJ0c3/puL/jG0cSprp6Wg4G+S+5q4Zy9GqSWZf47TWUKs1ohwkOQyOh+nWIWhZu6yTNeWGYQ4ZEzXk1dvoGMhUbdMFPZONE0xY/QmAxWAsYnxxqtIP6PG4NlNMXBpx44JRY//GrrzfsIxIkSzEb7LYNokgCt0Hh4diSD2I4HTFWMxwgd5yc1sMFSsORkhyvIciUWaj3DbgrMIhxMhicOQzbCs5aHZIUJjh8qqbxI3/Dx72OPhJC5RFybyDokUiwYgvXs7MHJAnD18NwzZ0OHTixcddIoHs2+zK28FrWlmDe314w0Zyqmon2MmpDZaqWVuHpMMps3wLZcrS3jTFAjA5qiRtjKZCvxFrlZc5XU1mMZuGoAKS+PHaNyQvEbkbNtoC4qxtAAuB5/pOayIwNxgoIi7+VHRUCQCa4Y308KVwyOvSqZ9RDC86Mtji6GavZUxA6fJ9/OQkfnfwp+i/J2V1c8EO+WGwpMeVxvWeWX104XqQkQe1CDgi/etLaEfDKoMC+bA4tAeqERCaGu40RBW7ZC3AXkY5m+epTEDXr/fkEquCYg1+IrgoUrEGSw2SnAn62WaQJ9IvaHN7JzCwq4V4XmAEwLPMWo1W4j/UcWJlENYpQ/4A1O//2be2HgtXXMinNF5fHc1HsiRyezmN5wCIHHyALCl32Qg/x4GSPZ3WmzXA6d+x2g96EwzmtjMOFQ9jN3UEARxlrP5H4JpzC6UEDR6NO0tAA2FRtfzEJH5uzmfaNHDYycKYifxNtPqFEka8mLzg7OUnKBOktA9o1l8EX+W7hUq5Y3n951FRYti93tPjJ7T/85m0RmiBScUP2zkQn8IPIldzt37/vDDvwCzHHwl2dkU6+PyjyiqQfvrO5eci66Hp8sSHNn54O84X0XyR0Co5PkwJG6Q8lYXpb2IzJCIBgMzo3hCO90uuCN9gMiZsxDEGRLAd+nZqPlyyI5Xxrun9uX9wh8yqN3wDknK8ufSrSg/4W+z2w2hQQEEyik79bfLRiRUzgHBzZtCiWmLHg3sVVwYVi8wawTbFT+jtfTnb1lACexlOAgJJvOSZwtFQuIn5zF2jDHyswmsNMyEYTbU4pFxNaEUBzMSzS94GPFQOHDY0OBJzwATOwc3iTPOfiBnF1aJLmAIzI4ABUSeFpj/4oNGhqH/QNQZV0A+asyxF9mgf4oFN9OtMsML2fScoSBPGV6AgnyYBOU2xksS+MNODLV7E+Q8RlgLR4+Gb3x7GNWfh1aAm1pFjWIXtqPBT9Yh4/9OtGh3tlv1H5Pg4LBhwS1ndVb1WPWb5FvVUK/6I93I4W+WXnXmXrWsV8EJpJYNHAmbeuBHhMuk1XWOlYtvhVecYWzON6ceK/GEP2ng/2NObzlGv6CWQtyQag0PVxNM/9DtbzRN0wFZ21Mwp31Vl8s91Y+fgRn3LptE/sjGQNaiGByuyXKvrYXT3WUuTMy9UbA03AVrw3Uwn3jUAH+Y1uUxcjJRY3KBxczh5fULSXIEmM5ov8AEYozQ/+bfbVroT4Xxh/oWz/PgxMH6KADu9++T+IL5rRjaE235J3GeYAhI8fw9y3YuhTJ6KZSzlu9GVb6+7L4EGYFpaaQKkbNo/UQ8T9pR97zWp3cgWpRcu9udmZo+kFG86OHLL175Jphh4fCD/+D1nqvf5gEkXVCmg/PDINP2GXFu4N7ClGbkrLhLkSBwBWolCTGicsHxPFGyxbJl2bkwVb6gFhajIDesQSmfqPQHcK9NC6tm/ADnOzGui/ZAgqUXm3M5ucWt/hRWn3ML3c/aHVy3xVx23efSjHRVhAd763LNF1YjpYkEYX35dSymjdyC86qXvHlzPTitThS9R77iJU0A3Q6BGd7AlrLgsshP5zsdA0UKdFUN3z9wyFaE+BluzPuN7xWbbymR6Z8FxhsSZTix4tMKRYtlEN2Cg+yxETsBuu/3dS5S4qcXjT4DsATXIbz3+IzxUQux2yLPsDgmj5PmOUsMQkYaVZ3GCPvxMGIEb47oLmGmi42Txu2IWffGHIt4tv/R4b7ysWGZJOnJxykaKQ4/aWxag2ZJVSSov42hxwK5HiqXiLIlsO0GLIwta2scsUsttnv4zKCBYS6FVHmM6UuY72NvWkLnHXWXSc+nBTwOuDsYu7qW5JtPcUTFlS0FUrZ2ALY4gIYAJKApaQSmGj8BNIwFGZYO6KV79pwame2xONGZecJyTQweAnYfjfGlloYlfhHZWEc2QY6Scw6Y/E3Jawr6ubaTH7Ibpq30cxPirDX6ZjLLhCimaZGPsjjC8CYr97vz85jK9grgUi2bM2SZlehRBO42IlmDA+DDtlkXYi+sndYKkfxeptmGCuxs2mfw0sk/ApuLkTLqnnL+jL033KK2N970inDuikN1X3E2X4ptd0mvSVRk8JkNHU/VqyU7k60ZTbbNjstxgUcpzLNptUjDriSubCe/z0gB1LvVqY2wrqu/twi/DJVhFc66jhWaolCr2TRFVwyUXJSRfYLGT8yO0ojEzcz7xmaGO2m4TWSnuHZPr6iRgUUvYTAV+hyrXU+T9PeGiC1xm4jVPo6/g5udg6H3JkuMTimV6Jdi9gbDyDcFq903LYIuKvLa7NQHbiP8+W0KQrF8maYfoajtvek0F2mDvgSjarG40n/0gcLP5CXU47NwEz3zTNEJhJSSYntQIk2np70Ut4U/58pjhMt5BYqeVnOHuFyX9Etr172ircnErTqi1Dl38e4/aPtP8RIBxGsHyebQd7HSWKozKzLfUsVaWss7oWhrQf+2NZ8wMmy8/ZNW+7x7BGV0Nc859xyOTm5UpuWmroj6i89cCA48wG3V0SfAIeMPNXMYqRCmUg5k6F+1ShuNkTGbXPm/5zm4tAqHL0B8GgWZxhFX4SU/usm08c1Ao9oKy2EyTAPSM1ZHy4SGUQDAjAzZMnxAsM0OoRVCErO2SnNxzZu0WqnCHox2n8OC4hnGxRz4guIy4oLF9thU26tfDn5/hItBQacxg7d3BljGZi2a66Cz+6zz7Sn87ufoF2f9bU6b9s2vwrYp7//+lZotfjhkZt4W8WKEMNykFRMgmJGiW0YeWJPKCXslpjFsrfQrcONotN6+1xy4MXIo6AnM2oXUHP0tVF293fJAdyE7EI1obdVjZWwlk8LkF9796b02nytZ9fMcdQObG58Q1Sa6EePigvfw/ZwVmTdyZlf6vQ1nhsuKlytNaXJOK9FRRDhqxcwUPCrkSA82+UlMKLBQLPFaT0dwBxLArwDGHA4RBz0c4orpnKF6z0aJeWTAWHfQbVPM8sriQl+cdrfuvUM74j1q1/P2zAG7LN7MexHYpc+6ppTvH9tCIW2Dr+JxtbZV/jlqh8yKxW30jCEe5LWwVRMyIn+WlD1aFP+8mzmrTK9EDyKTsEfceeOchVdZrqJohCwVIaxWYJPB58tkuYEDXVLjdUNvty0eP3Y4knRr3Jt1+EjBVBcqp0Y5J8r3b7j7s9LI+qu/cvcWw7u/dBBBDpfc0E/uiX+H2eNt0KMrtJp1H7txv3jFN2sVUYbmMCz8DM01f8zp99dU8t4+qiC+oqGAUV3X/aOEP69le5rfn5s5G7D8kqVZTqxM+VqOR3cyD/3UCKbQ8vqjSNN0E5XgRFgYSiwVnMviy01ePEvHYh6xS1VJyAg1KTAXgRYkFc5WtFlUvmxqcwbj3kUKNUjOqBUDFvdhlt+b0LfS78BGIa0ea89AV8FyJKSYhDv7i9kCAPKioVYcOW1o3CoDxUeo2I2gg8LGhTfmdZSCsx1VS1j1pn6r+qT0KszHmxwZM6ETSS25FNjm/greq39XtJkzoHD0rADl7Izm23WaT8VlYx8m3xsR7vb1c03Qz7Zz8L3AITsx00xnIje1TshB6QBIlUaxKVLwnkuXo0zSp9GVVYS9LkAHD759iEt4U54axMqPuePg80pB876omzqrgKBGktC/5i5MYmBa2pRWdYkJQIeNSRjLxnBP1GJQg7/Qvmlc/ur9cLJaWR+cA17IoPeFnE0Edx2eUE6br4BWNk01TnNqmpdIc0qaxWhOXdNKk9HVfA3BDb60Z4bbnoI2+78puCExWW+2jGGrLMY3xWwMkCQHpobByHDsHEyWTa7cJBP+DBQx8shk3x5Fhq2qsRyTRqN5hW3q+VPQcHTcOPKcrg8E826b+KWam7ydIO4f9odUWDYnpN06wzql+0mdFtY9LCoViIxojBwZ+Txjn8JmGkwjiqjqN7xBGati8sm6fRi0kY0PRk4vjxkZpxStPD6tQobrphfNFzjVbD2BfHluXWE0p3eZjyfWvv5Gt3tY+AUyzyajvFKOe3tkuAEVeHYrMmx3HeQflhfZ7UVA8rQUIOLHGR3DTZtDXg09QNqY/tbeoW5fBCKh4EqJ4FKurTTz+2FgjlQB5qtb9L3yC3x1vXiRbkriNtCgWlR8l8dNK6FNdXudfQU91nD4fLJergct5M2oXbZvFpvUp8b4cCuuWpf4gGBTm+zokshHqDo6k+I+YnS5W5SUrxbP7thrZACjWfkSlvxvNl3kEl0q52mkvyFWbGieeB7mbO7SMOTVaKF3F3Rbej0ObCwo0jxETzo6vuVuByU6foHiFO96ALKLZ+zvc27SDe9JsXj+WXtOSL62+2yRCBRlQ0zewIXfhXTB7bd1+ITlvOI32c54DzhiN3X5GP+p3f3o03GATk4B6m98DmdCmv5FpLQBXje1Bz8cPt47yjeIqHZijtpBHI5z0pQctjAFWLvBS/tFFF+VZSxP98XTZqswkSV/1RkcvqbLdiLpee224HXFbojP3zOsaDx+O21oPCEPnFGD2oWUwWvWw0fxRgjPjEnEY0MWv3hJM8TfiIB0o9XVQ61QGgd2C/JXLjuHDLZEKKLlHrKLq4GCx0g+VIMA4WE5FaklP25a2+0BdnGekfb7NPFJ+ZvCRwWKhzdaThBRK74/sH1fNuKOYYMJo6utlbinMwvSBCvDgWYI+JcTOMHUcnCIiRLuf3tpeHj02bT4SRQTbpTiIRom9hD2uAlT23ABLiy/DPDMOS0nnSujA7m4LnGjfqeqwy8GDptik1cbt2MVfu2aIE8OFcVHE5LUFsBFP0Q/wtFtdrjmQEMeuv3yOoCBVslSjOYKdzLiXmwQpKQPnX+WxKwztC4vPUecNwO+0ySgNq6voBS8Y+mYIF2R6k/wjKPrRX100I0T6sdN237PPXVfpWd7tGCaZyK7dvkdNmghOFr40agJUuhZFFNuymqJYkK4RnaB0pq+/7qQUea7rraCA4T/sLtXI5Vz8V5wc7ZR+JgEjECxdeezrCqoMQ4yCG/Lzg84nggVPaNZnBgYd7vDEWFIvJmbfhBrqdeDxTMdH+1R9VX8ocvR9v2TvsouYjCSWdRm0SGUb1+hAsXRApI5/lE4sYl269HXmQPsif4lGeqvrT0Tw3NpyL+rpR4jqTiu0w1JdDmSuDt361V96q6aGhGT2aVCFMXvip8eErgLqiio5g5mycdEEJJZNAKamlRgsEuuLisAH3yy1yXNlCLWlXvV6g8UgZxZNIjqmohmZyQFpG5E/CIUyFhF6GraLLRtf7i6xyWYiIN0d5NWyyE3ktbh1L6PShIL0dgkqtsROTEUcAI70nmiZB/f9EivsTwUBKspsEOWfn2EjnMpSvt40ihVNYSyHIlF+2AyAmZpH4VJWwagwLsWVGHbPiw7aZRTSLlOh2I9YQTKBU7O4TjrxrhzxtXHAqRbBWIyobtxMsyTW7aEoz5B/o0BrxE9guxthPju+p4DSqiODnQK468Ht6LNygqAQ0ct7NboO3gnPbRvXfd95zQEIZBI50jE/xhYu3KfLG6E8iDp8Qd8/PGyFWRKoCaOtCvjWijBsIc1+6Q7d37iwUGcH4UcsiGOYtc8h8gm6oB5dA+itMxZy87UIPaHyrC6AKYXIqkh7jeNIj2yhXv3+5VNZi1OcI5USbcVlHEAek+zFS0lESQTQ+k8cTCJUtSxQPMglV5NOiumdjCKsqETiXMPHVbNsDD8zhAlfpgrqdINyH1sn0p6aB2BF1lhEBLVk2Omw/4+MgadjImZDixDY79q94cYOgtY5KtcFDxomzyz3XFkMU4HWulPjZkfgCX2mJ3xcJtuKQAuqzPsrXotiDm7diMSDssLuxvE3FEYCHso+R45Rkac890hNh35Qk44EnrLcvJdkBATlUWXKcKSvQwPpe0Kb7zxSpbuS8L4xEs6P8GVlDDB8T8z7BjIkOkBUmHox4WqMkflQOvwALSAemO/QmCIPdmC8E4iz9xhs6Dc754rSYNWIpAVZbPVFaIvIdEbx6SPW3JoOBZTEwo3IhsEWpmQ5kMlijpov4p/cqJu4xJaVVJQ7IERmo/6Z1CLre1+HYxnoI2wosUL2o0LZ7riR6RH5j+A/gsDHZ38xKTMLQHTHfyTrTDEi2xCPecRJXI1FdJ4JUb+VA7yqWos2IbqzHPmpFjyeyTEowLavBztmqC1MJBDLMdenOdQx0Sc6Lfe6UqVN9QlIKUWDwDiUkfrQDuHqMFq4+apw/7on3XmvHZ1Ycu9eq8C4Ve17b9NgCBAonSslY94AzckF+HNWYz4LtEh6W+1FR2QVjBtU3wPC+H7p2O2mPE9C8QsfjslSz/ZrV9AGbOsPYgFTTcNUe6n8kuhFczdhWt2wXScWFsOPKrYUkxgPcDojQT3LDPefDve1+Mra6Ai9Ptun8/hKthQbm2XSboGzht+p6vp++PZY4hlCbB4KrXIhRN2f2Jh7oRE43tY3OmuZse/yOi7aIOtS34+iaMIA9o5MkvS0d7beKrtM/sRE9u/iIF41BkGpYfmBn5RNWvLt3AMlnN7ej9DrUaPx1VaJzVHuZHfoQsCbOUgs4A3CJpm7th0OamslMim00/IemtTYZ9LaLTvZwMdzmUslKSKnm5f1rs4mRVa/JZEURzKwURjC6Rg4gUcctJmxlIxm4Ku2xH0WcAuNU+9DkGIjsMOCCHEIdPI4XWgS6rvZx380K1KL+NyGNJeFDQfJCZnOdsmYnOfWQX1Uon6Qi+vsFT5UJL+6Ka+wd2EhG84fZeNvul/REpU24U21Z4Dd3I1iZGH78HCPoOn5G8XpB4XW+NJXekMFToVjoAQm06jpeS9LTTCT+YVU4TYaXX//HDz44fzwvn+eWPMDiW8y+y3KmglJuBSJbwPnoNEvAyDpSh1ODGmF4uhppyvCercTVIYHgOujT8/L4mDpN6OWF0WW8YwQpV0EQ5V8kWdMR7zzu8iNefCybqM5mbZg4xm2/OLBraNRbL8olZacFIpqq6/N6Gj6vmhkBl5UDIajaaqFlY8VqljEREjOF+L1hsdG8AC15WE9+hR9jFAMX2RqGR8AsnZtCxFMv6k0DPPVLxtXMXlf0DQQ5xZcDQxTOoSd/ZL1sUQyXp4hmnQQ2kBxB1F36iGKYyw++JJozMEHzewgcZxavy4VJ/O2YC/s092CPAX4I5Gy3KrEwJqcB8DkixBZXSJiDAFc4sqdG9Tmzblcp5gT82p8uZEmnMGB648peTIncRa9JQmkzmS0cNNScpQt2HnOkMzdXnqRpt5o0Den6Dnq0Yt5aEtZ2Ti9Tng2FYiwZBHtAlBOGp/0Pg8AsK4i2dDvkzAuor37QIFtoremjpVpE/1Bb2s+K6W0rZj2qkNQ9myJZkK9MWtEnKLYBYxYxgmRbYgurr0beUUGPSBaddGoHRMtQ0FeBvqo6WuNM/AKO+WZjat2SR2grICebUe79u1HnFKOv2ZOMMJkexBJYtKDwghYSpkdgM8a9SfoUcftntY0gZrPPzoLIRhHpikYAJHpxel7GhnYpnaNuRkdtrZycl/qUs4uxJIuNSsUxBkisHRpZcmFH9KYY5J/EDM2s+BmULvX4dcXr7eP+urQJa8R0c7nUcALp7Cx7Q8TCwrhyInRdQJWy9UUvuzSxS1En/h1sxDJm8wme5X/FjIeINIMdmBJryg/JnbTa1kDavGjYoY5Nt4PmbDDQ1ZyHCCGT2SZlh8Dk8q7VsacCLZcN/byr3GXCNCyMqzSOsY5lPoYHNL0uFGNVODK8onowsWaTN5RIFu1bNcKWSVpLqt/EPVkgI5GLYCrlfYIJ5Oh+yADonlGvbO2otGHfr8hCxWji94Al8jPsBnaQQ7Z9DDEgU8SOx1UgYy6JGikeoquECXvcExuS1yLuyGWWIk1u8sdcR25rdbOZJ9zqDMozCKBFxDFE62M5PjIgvaHDVOp9wv7rMu7dxWusBcOrB4vksVgKVJmnbrw9Y/9vi4vNVg+nuZTW7SyrObXyo38H5q8EJ2IDG4P6X0DG6VwPNWAaJDHKeHfKvMBnw6XMuC3Ad4M7HUfipx2LgGYIx8WONm7MlJTdciC081I5h4r0FipxzJ8VmkIUk4bAu9dNuAfTuA8ewdKXDBLY1wm8saYeRmdDWtZ3KBofV7PAjSCBmyMQ0KTsp+OxCMUbQ83RsR0RsUZKLc1db3ZiEUT/oetOHjP+rQY8wo9o5uEOcNTZQhyeVN3MQ/AwzfmxDnfc92cL7kS1i+9rrxhoNXl8+Z3d1WPEN+JINuHWcf2+dDS0tsI7U+jNk7SPAkNjLLW7QBEn63YUx/P7xMI2Op7ZgALkNtQPl4MjmN93fHkjkiHCF5hHLC1zDpAo7lDUOfvbCYzb5o6kuVaOBI0wto+p7Zj9PNxRC2oOBYpzV2mFoZun84U8MKeAxyRGOlmf3k4khosCJs/JZIcEjAAW6CcA8Eh29Ouf5g31iLL8fLhYA/sbUt6qmVnwvM738ZLRJlGbqp5T2iimtABsnIAC6tXEPdXs5FGDaDVjjywZkjbcHRB9LaIythIR3MgPQfDFyR1ySuwzP7icPhMH+xxLJCXL5b5RvZgfyNDVIzSNM/UPYTAcLEXyzyBdpOfkFyTFPUCdTUfjZxlC6tEk70FxUHWRDqGWXC37BclLIY2dLU8YPSm2onRRk20YUd6r2ZzDEmhAiP45vmTxznZ5GS3GapbJm+ticlQU/tZyzn/97o0hdSlGbCy5KIbuQ+CqKF04DTmrQwBwRBceWi7+AcGSgQaMSvLNSKT5rfVzFTaeXZ8UkugMPoykvIkoeVt7SiEW72/aLTzK18qOUz0Bxcep95kjbYPzhCJXglHvpXDgtqxUO6Yqp2MBQrF/+i8UDyPn1YV9uvPA0Ui4e4fNlJapvIdxnUoMnIXH7PzS0OBuHizfAfAgMbvGaU4GHFAPQfjw0OxmF/pVTUE8JKU9Oi1ffqSanafqVNNQylSxriDyf4h6DodAH38QRb9fkwVxtDc+WGm+4FjOmaXD9xxyAFjNVrdcLSiyME12Dof0dqTB46kakd8x/j802xszefa4FWRgmumizF1IibLs0cyIHXxne+w+p4aw6poad4pi81la+3naSE8mtllzet6fJrTFX4fzH8/uGntqoBrXEnHFH1MUkTHikrPStRAl6C4CqJm/6cMrAstx0vFUAHSjCItyDXAl+5iC0RSG3tv0DX5LDKGllEBiTBiHxDB8G1J6xhTC6E+z08dQg76/qt7vu9Wq2gE2hBhBsxIcuDp1uCoVUz0t4wpmeVGIqWnwmCQzaiw4JhjdgrhnTECNVor4RhM19V6HW0cFCqZnAEofHCzQKt4JsBb+yr8BSPEG0QwLWpsqIGuWDWUZSkGGMuZiApgynd8boaDYolChAurClWoH1CzValJeZqoZTz6yuet21lnhRIRy40XtNb3CGTsw+jZcQ/3hZDjpJarsvEMZSPBuEP9vG7RBJ1SecD/nzMcjx8VhRFLq4hqf6WiDZjRSQ0EoOgTZR+lZqCMAfhVeAJ1duXmMzlHcKAOnBh2x7HVdGTMTEvDqaXYoC93fVU41DqUqpeGE+2c2yoRm3C56U+WnKaDaxiq6S2AWwOC9GPGF0qxQzNSHYLCWTASAEB33Ef5rY9wpqp6oWMsENCG5To+y6GHDwoWf3IRm6AgWfxB2l7nj/O5p1BKLe3kwG0i+8jiAHqU5keal+fcgkxs48r9X67NBjk58Ksj6STOnkaIYMwTkRK9w3eae3hTEIIsAZIi3KuH59A5PqlRnYO+a1cuSdUC7voshGfKl77RSqu7+kfX7mqWsvA/PX2z3JRGMbognUPzZPak9TtV2xjKMGwUcZIT/hY9tzWNpo+tE7IL3Qd2T6s9J9vQRmLHePR86PHqD0T2ox/hzUhMqUO3FubecRMe3F/poGeInpPRUQshEiQN61C++UNMmZxLRwL0V3+KDfAsJC9nE97LSLJMaX1Bm4AeZqN5REDmMmBinpcIEBrskexv9PRUxIyWaEDZMlrYFYvxV+XdvTssmd04yq10gSThU5k/ymfwKk7hESyLL7eR2dtqUf5KzEkTFF3LB4Qk9Tvy6NXMYCEGAFoboaC7gcv8tpH3t6gsfIYJDdzv7x8quwWwJdf3lRgKDpvElwyLoNTrl7uR611FOS88CwIlgmr/Mr6ZvNBZHpBowDvBv84LO/P2qU0RENrlyokaK535uVdqkPqiR+11TsxhzEGk4iApT2J4U36rhID96H/D0x77fblzNroqo22i2zOsOB5t8GNJ0F1y9NMotoiaVZrgWFYf+/sWXCMMAWPi0e0l8xwfC7CL9m8CVigNDbBgUmVvlrhmJWYHtjBKZcLVBCwUJ2y8tFsnwqcSxyIGuxEB5pAOIAU4ypsoEGsfyYOuw1ZuN18u2RPBSWGdF9MN3P6WxxWYhXRPhhMLnD3oCIe1dcC09cl018Ko/+M/Z6oXSRHMjhqP74Xl8U7nwOHQMupiE07qEbc6BASvVvq4RzyN53iVaLEjTkYG3drgXLWKBIi/ZaBaZjvKd9cd914JN9oL8e24QTSig6+B6xeu65qG5HL6ujPPZBm4LfYqIEQmhswvxAQ2KnPrW6FIKzlOoDrfgwxjYxLqZ94dsrjLTEU2xjvnxrlqghyLDiquwwExOFU3YgfBqS3VBLJC+/uxGU32iuUHMOEnOqtrOg2Qbpr1dW/flsY0b3c9NDc3Q2mEfY16hHH1RvjdpGqI1RrLERo58ifvz3WRxvy9/zzTQ//x6ZYBJufFQSbqPLKYq/ZdZJtdBgq3JaGE6ogJl03XcjRov/nghNwuVTbaA9+hUfI5mR3L5vndGjfWxQUXQAITgtLuLWbEYY6FBMH3/WUWzrUeuxr9VoA/6fVkU1ewaq+3uoUn9SZmt5BpiBfleTPOpnik5jehm1w22053B87Tims3gyO2oxTTW3c1dzwGZpX8ftGlHnX4Ip4GAJ9MGFranAFOI3HCXpz5TmOhO/1Fn8vPauOOnijqCLB1NE4dS84dnOcWiv3jja11phKxPz5F8zFNtPshwmua2QUCEBOyZAoxkvIsp7tyRKrKGjChDZUccO6X13hfl6LtSxmtlTFrGtFTmQOFP/3wKadEelg76dQb1e47Yy7/ZpQwQeiRaDt+qJlffCR9KAIfhC9WAQ/OvV4FPwkemNe+1n0qAt+IT0YBL+69GgTbP3tBjqovfj2aslrLGrO2tImy8k0OFM0DhS1y+uXt7qIKLjKxejkFmpuPdtns/h3quPEVvTBjd0Jio/aIl5INLw4r30BDGUl9Ou1Tyb5i4gzpaOzOMUk5WnvVEtFzXdsqyHGjmtw/zWoqGlfRbh+0Q4ZDvyhkJcYBlxgtYSsnZuy5h0QAULMcAvKNS3k7NyoaQMA5SRK69PKtyImMga/VzE2SZgbnGA1zwqo4EhiPuTSS0+dLZN3GZnSMOYnYKuIL68oDdPALz8ACpLAnoXHVcoUhCREKfBYupshyvl+6a3IGhYUWU2B+I9qIcVyCVcGthfFCdBOE8an8A5l+GwIYznse/vWGWyyGW9qt9DMsQYR+thYtBjlLhByAt8reut7tXSqMIik5i3FLiVHQNTsdGK/c9pcuE5LwZtLnPkh5R1V8tWWpQJj/CkqKsogOgeYYs56u+vhN+6LG+Gs3dtj2PS/pij2nFWQHMRTalOWz9bVut2uY6vMLng+BzXluXC3KU7Vx43/Qbk+0y5lcD/uheQovpAHJcatrnmxeLdDSHX7E/pqS80mCRAeVK8wuJ1+Qrkjdr2npzrdVVr6g/yoqEYWG5UTBaWqIpkpCtKHFAwCd6vmP6FFRbWDcchKguohPJkkhOoJ2xRgQeGBXySd26WBgW+FqhmSARmAXDGk/qGSTXEHkxnVYu5/2BgDPs67ubdYxtDOmoylPbiDGLbJPnSqRQyNYrJK7/6oftYP1VyQ0icbfWT2r/H56ZD9h179ZWU1CDHAXnb3kVnzZ5a/3c7DzTln1wM4fXEFsjNIDJ/sbEPokCfQuakXDB4Uh5lTMrojLPYcHxm0xeQctkzLpMMwpfDoJud3zeQwrw7Mo3JyIDWJFBvDGi5H37H2Tr0HftGZUYih9qFEzABRrORIXsCbdF8eshRySOLLYxUWcI/1w0R+jyBHFUi9BFKlP3pPkCoBDokp+Io09g1+UMntzJGrit1FL6J3hAhs/rzjzx3KGI0mKmp8NC3FtJ+O02KSn/aKY1QGmL3QBsfPczndCp5OPZnq7vwW90/wRAovdfRFrbjWEBXBI5VWwGgioaMvCoXa2h+KhYOVdAXgUIT4r9OYMKRESaWTEFLC+cCML2I1DuALA2ve5oFofIehpv0FVhIXk6qT99ajkUU34zTBJqkmMrIzHJyGOYVzQ9WM3FG99YqwU51ZDRFzPn/udd8YyiplGbAimlvzFOilUcucRvotnOoSlP+wzN3fGZ35OVyjHf06PU0pdFM+a52X5P9UI3AfUoKqvtqXTjjMDRWQoFkLCruwABrvuz70c/CqBSUMML6It86R8eDAuQp9xAzT0NTW3p0OHW17z9AVxfsI0QGDQbeKctg+m4479n6Apfp3J9NzsgsoB458dhDQxjgUXQjwe1OY4YqXYYD5maFAu7THbaPmd1vfcYfpOtS2e56ZOmbbZi9sI28KujfPmFdrBMCcY/1zqdbjFwVuTVWgxZZJt/WOQyju5eSa1tVr+/0q73AHfhdGJi+s5O1D95J1uZgZRd/NAtwejn5v4+YJnaIWBUykvd7kBg+f80QC26zYSF72Xx6JgeaomSQG8HzlKswfrZvbd4qmEKV+oUiotB3twIFEeBUKRY3z15Zex3BV8XBgLrD/gsQKuJL/9rVmWgSMfaDnJRB3rooEFFZ6I3vfxf8NmY6Ba+0NZwNvll0PzL08U9fs3KtCEXbi5MRJiFwTyw1fYwt6afg+y6Qs48nXerzfiNSIe2005Rr4NNr7jkuW46SKbYFRnAN/gIqC101SClkXLtgj3P3kqzADHgnDLoOCAmBB+dt7muGnbtCzZ70esX8DTjXKWhkyr9/uh2VqzGAf1f7LRZEr+A3IH6Xh/zTapxB+mMA//CT1qB+TNjdGrfHx3lekjN6Sxof+7dyn6uYb6VAg2uYQUqwDTz5E1c8JMUcXl0GTmQpotXFwSdhS8v9GenbbIP0y1dZCTO3EZd9xK2c6je44GFWwT7Y/1ESE2TwWb3XJCx3TXSSOWEZEr7W8pRGBMxR89HHgIy6D8Runr1y2Ty4/y5odVUk09K/64rDU/w//kIpbqx7x6WyWVZcvK1acFq9gK/cx8ncUrzr027B29g+XKpDhMPpA0nR43xv27T9DBelCGmQfMrcogz//Yp9An/616kJ9PKQcHAUhOYWkZsVTMuxAQ2A8MFUFqrUjSg4TFxA8BnS5aDZmEAr6zLU04GiOqWKHqiq4TumZg74+qQxd/8I0BWQr6NvE3DCXMTmnrXHqLlDmU73pBPCAmrqjQ6cepMJWMyeNJ+c5zqAibN9z0qrP6/Gdg56Htkcvpe7aqTLFoJwAtDsE7AOHjiUk5nOKY0ijnb3CR9/Lk1g0CUaRIaZ5q4NM+Y9Q2cE7ljFJUQ1m9Fz+cHju5aRR8UKK2TJQ6WgDH7ouOM8pU5TEd+A2hHtvtOkum/Rw/dFpN0BFQ7FM83wmgiQ0iDdoRzNqD2mrlA/P1+KqLYTaD15B2Q+jmv1Lue8Knv+RoG3urqKV4qFyqwaxSINNcHFLQFrwY2Ob30Fh9Q9U//ELy6qzpmw7dK7vbHMnvQg2EYcySJ52Njkj0XD5IszqHH+vka5wUJcDaiJuTyNj04tbtKLpkuEmJzA/2V321kV+svyty1vNFSE/VBKT2/Q4P3jrbSnucWHltlLiuX21w+MSDOYnqxwTcevY843YgD+trdB2g8vmL2ESEwHkNfR2Gch5aTTMZPpMucr/pvivs5gcOF3fPFGJNq6iyH7by5MAlUz1HUctmPZjoKjBaVIQl4xbw7BpO37+YK5bCjy+fdOBSYOM8PNUL2BCg7SIwx0NdSDkvWew+mZTKWLoHOYKB2923Jt/r00E6F6dGbs3S6OHoQPDR1ReXrElG2ZRqK3+H7k2LEBIGwFCBt5QDemKThycmHIPyBgJkD2Bjg/0b7hVxJFbIBJ+EtqiMtKUPl6QHzuIJj2N9Z09DWPfaYMFEkWk+U+oBqVjNBOt1ig7BCmDHxe8FgOqhXDU5se/UHN++VgZYt1wiRcqQIEICkD85YJoJ2heczgusNH+TcrX2yuHZh1KptbZ4HnQWVMb5p8bEYgf9ImOVsfRCQDf6bygGsR4qhxiIu/pstrK9z7BSKeNuSR9xJnkzgcUQWh+OKl8w9Ghsrvm6Mh+L9D6nxU2xOqTVzO/pbaa0VRWYTk23bWxOrDf50beiQum8Pi5BVPDKWi/KRzApwyG4ZFWHah7CNECalOkejPrKpxJWWSztuBtt2XuxhAQe/4xZ4Ft2RN0YC9IP+wBp2YTwun4IHGKvie2J3A+hSKiu5bbV/ZKpJCpBT+1NFuUTZ6ALRI7+9RZFH1YS+N7TX+YSmt+KxU8sjWD2HTctpFOeJMx4enp0Se4lXRZ4s36lWTNhxDietteEAI8eY/c/9I5jKHpVISfwAqk3tAHEeK6IeoLYNMoROJ6jF86N9yUUw6MGj37DyKmqTATgLDHUWBClYLzsfD2TWb06eoHp52Nxi2wmCxshIYIrpMqsh5GqdfgQEcO2rPCpdcYAe6OArAUV/Ns99RgLy/Pm/qJqZNXn1JzpyqAFpCNap2kAQm51Akwf4r+IwQ49jxnShOaQsS7lYiI3DR/NdQ70g56UuOCREN+/y7lA+ITsfnnkXgiRjcuiafqeMhk55bfBra/yoLefUgvMobOOHv7Am6P4AK3hDTFW3GxthSvQLHcoM0EZ14mmojI/IMHqxc9FVD+o14GEAAopZ1lmVW9ow5j6Khzc2eh8IPQCbIDxXrhjx9yKUXOjGsU7M3OjBH4bfEqUrYldKJhJ9/JBLatwLf0nuju8TX/JBHYH/kVE0L5sA3UoAJkZDX7RwgfmqiWpJD0sY2h+lt3asOGx5O/QOyL3VqSDxIQDkQvB5yoyF4V9Lt1Ul4YJw+zET35xp5RQK+PofRKsvLPUpzGxyj+F5ozcguKLCp+qHN1djd5Co0drD97fzArDuTXqwsaqUmc33hIJg7wgExq67khoIutB0k6yg7o5hIwm8ugDKi07DlaeIXrjBRwTmoNcRW3an4pdxaQzfLA/pw3Acw+kvmVh9AMd9E7aBRip1dSyf3t1UBs9+M7voTWC2Lm49UFoagIekLmfMx1a9qbH+gXuoBmq+LINcKeGq13rjR8F5HG8Ll+HUd14DM4canu8DVU+KcKy0k6Y4yLXO5MqLigc/wddaMeJiW/ic1rUu9gUsoXOdBH94pevjqu0b1UzlzM9HNfJ0rM3cPL6m4LE86Z33AdxBQrov1jY6yRiBN0jAU21vBqrna/qwTzu0Tup43i8dyUMqoqlgXNLhTcHZJyWuMVAieyOtcFZ+d8YkMGDYX17hPCMlD2y5dnXQXMCIwnT1A7AqyvgnWKDKOfHQg64cdoKnxFg9Vh570sbpdbauVjATYPIXIfS0WXAc1vng1M0pVG/At7MLEf2K4DrnLxI01ZbVFvUX+vGA194ikffttt38sVpBb6YCsL3RgYM6DKJi/mfNr0JZ1SoItG7+Nvhtnpizs9LkvxkwWLnvpVFSp6C7xO80HM6K3zPnegk5W1ERXmg+jPSavJeRquQ3cdyKdSw3Rort0ErI+6o60Lsu9dAGHUQgfQP6v8axFXy65QL5QwFcfKSuBZKOfcJYyzajAWyXW8Uq3N3oZyKpF3Cl4HwNGYJW9X1kdOlTV0jsp6rpOFA3DTe5VuXiEwPlT0eBRfU1FeC9V3oRj+8RwBn44TwldRFjWJQp4hnAjEofrmMzf6zEqhb5MAEDeDo6xcl7PMhb1E+yoeznNcMdJqBR/gSvoAQXKNdEhnIgBF9fpWpxtIUGmv0hXIugEW51lpGLzJRdsWTp8g0W6RTAWRcB1dzVGQWByi7YbBMNBzyrVjPuj3eVtE4ax6Bmr0vZmbDlSkgG8XbksQgoWtJbDYGhYTHLOtdb44X2J72VEVMKSRi+2M57SNanM0gWN2SN0dLfJ57PoZiLb6zzFUInZsAchApqtk1Dm0sHEUbuscm3Ay7mEpQpNhvLgzGbRDWIrh/g7nDRHrUpWaKhc1XhHcTtOOFqG14yrsFF4iVDSOt2n+SkCo+QT2ViNo4Y+wzSl3ssBsA+2j7IhKOTR4LEAm1qArHnXoDHEGW+RNRFMAYNVg4y2MYxMtiGBd0bjMokKIQtu0gLHErEL2ySm8IHeGmSJrvmsznngKXABkUYM+gqp3OLWPh8Z/HOCqNzdeLzoDZPkQA5bbJz7Dt3qijmakv9U4cPgDRRe+KZMHiJuwJQWX3jcvss8TrasOt6T6bA1S6ptgJQq9NpdVQLmk9KPulHFy+20NvvL1fSORPlJBr/tKI5geKushVnGxZnqYEcWZZjdmyItn4/NkA4WrXmeAI5b8lDw+EVQppej3Eb+ErAXN2viAjXYYtzUDtkYL617Nf40vg6RpFLHiHw72zv7HISTfyXeGJTnJ+5tAehnL1jEnNLcUo2yL1P7W81IqlR82o9c9NuDNW86FiJghZqJHIfDqih6V76/pNfgajmF8tsrWwOEG2tfJwXKtr83VTZGvW/eu/MwGeETrXAibRSSIzUuNDBEgClzSmTslCMRckNi7Qo3p7yBKPnfwL/fqISAf+U7rpfCod8BBGxhIi3SJR753hpMPfQL9XZCc3uAqQGvt0TJrFmxYqBLRo3qIzgJe2RHEOBMvYKHy+4FN1kpBTSWEBqk/Py4UXpkIMch5mJQhQcwhJtkrEzHuDoEDwlx7uiPkv/wFfE8CtPu6tuHOZ5tFIG4w0gsKIBKfhOxfzLd5bjD3x1P6mEaj5ve+Uft3RYGkb9CB4QXSUBvli8jBIrN+WarerU0Kr7Z1eb1yswLIyDJrmVJVMTbPaJ8+/J8EXcb4DwBHobgKQy8z+ArIzSL7GpagknzB6hdL+0Tz8VLoxkw+czDTTZy0RBZls3ZuicHX5mxpSjs6sSyLdiYt1KKdifO3qK7kpVN0m3uJF6VxfkWrvPiLHpY8J4zu1DNLzB793ZLU8zmXFD69C4s0bbo0juDVLN/wtb1xmZtT2lZcvJacOKRnblEVtZv1uKshUiwX/6CuQrMX06aJ23xSNqd8zdu2RrUFideczknC5rSVlbM9Bjavy7cLdgjEKiA2aXEsxFVh9jvJvOd99cQz6fnXCPOsC1vruNaJPxsEi9sH0ItOMgXvpM1E7eDiHq7oDJu1LqpIp9P2mmIqMae0Q00Z1U2atnPq93xDMnpIIsai/JI67nZ/pvYdxm7s3+8drFEXbmmpsf8E0aYdElcwQNwarUAXLNhk1EBO0pWfuWoExbUNNLClStDZiRwV45CebHjU8AUvE0UhR6nlBHsUmWD0QHOQQyBatg6fjIhsAROUTtT9aLrY5W/BxYXP9vA2fgGHnXoXK6bb18TWrdwN+yDp17WgtWIQso6oLEMdyqHmb/p9Wb7yz9SOTWMykZxfkaTv14X7+eAsiTNfb0KI9e4Hwevgi+mxz4mamxsq+8kSlO39a2ogVXmeBlZAk5FAaUERHPCvHPDm0PEfifYD+znGFpkbytZ+7t9mJ/AcUtg35+iqT5jLBpbYAJur88CFGaKVWGiA4as+7161ZG18dTFgC/zuCux3SJV8bBfPjVptO8B+kXle7jgbVo8tS2njSfpaV7DqYCc5vAwYSJT0hroLDRqJ9wSagvfGNqBRZnLtyOE6JXqQ+129WuwOCqEKiCuJfWiFeN1BgFLBZVd4BXHreSc8+VwazaV0H/XFOqzeIzdpYC1/pL71QcC4a2NaY4qC0ik4m5dmVjfGUfRNNYPavC+XTDJxrLQ5PmNsE5uTfLIFrwnXPRAIIIKQG+RYGE0Xog+tFoR95Ix0vptSAbG7KECieh47kM9he8QdNB5BCY17mKOC3K/1RzGcF5JopS6Bif25BcL3Yykx0OFD1PhwvfPNABuvrorSMbo4NaRt+qqKm744F7PX4z4HKJvjNNoYZxCR9jlppVMzFFXDU3t1nFITpAWWQloith6bj4UWmPrhulfZZKj3BB7ZkR2p6rOebtJAwiximrcqH7ouwC+7UBi4AjDlVseFL2NHnqkpGuan1IC0hNeYipcAy9il1v183BXs3DD4AcX0r2JcX38yBzYNZb7VzrmFg0fawMOwPSiwBpGPFT3VOuA/B/iR0HljMXeqOZJZ9CqfZA3OG36ZtuAyhc0Fvl1G+8vAtv0Rlaho6o4YncG4uJTD6lzs72c3hfUyJbxM2bsOs0RnOaPcVBs7sy6FeqUZQBWvsb1ht/gdIjkAB647uyakoV0dqd2nGedQ6HgiJ5EE1V6XR/165PPaX0hJl6R7fiSpRzH0lFPNVZPhvmGSh2D6gDS/UC7UdwT3Xo82Qdc3na0TbBUfwT+8NGJlJR6giCeJISgfmda+Z/4xTtESeL7cpy5mTbU2WzVbop3+IHzNLp+TyXWYYCUQIUJS77SMpQwgLi145LpHdH5GqoDrsVW3kvo9m0Ur2IobNS2Y+KvOgR2fZ32Bh2FFZc5OBmEFoSqYzdwVFuiO2Y4v6JxdBm0Gez2eBfVYrjRNrK9szto4xcabff5Ek+dqHWTqG3G42Bx3JIzgzFKvGqfTN5Z3rqaRQTarlyu4/02lDYFPXL8pFG0pj9ZV5MQLGQLsr7oxVALgGi4ihMg9Oa+FQQ7EgLUIF3oPV2pBFzsIVW7efF9ntngJBp1AJpflfNbnHls9iQ91SFbeGlHKErIQI3i1O0LOYQPJKm75YA0oLPOX/1DIk8Wjj+AQXBEky2+AMZkbymYr6o1bg8R7DJ9h2Fu84fzU3Kg07kDMQs41X4URlxx9LZuOxNzigXzvIHAcWimeSKjKfVEc1hpGJ2tYH29FVwuhoIbDOch05mHmz54n5yZe+aRuFL/D+7olLSRJGcQHIltoJDpo17Kl0JAwo0aXZduacWbkXbgzPR/Kajdh2QiPJHyFx4Ge36GgoyAAPU1L8HMHmlYGZpoiCZpvsoMRKUmRape81sn+j/IdTp7i9tiQ+qLpcYItLKSG7KsQb/BmCexn6OVirIBlTvHW/hO0TP05d8YKZ5ipfYfCwVOqkUxR9Z9aW+jvn75q1nQuVKgy5Cw2v0uUl8fR3J99xo0BOn8xDB4xe2YmMGV4TGkInlmDOhV9HE0z/DMmXFsuxHm85/69oohhbGaAwiKFzuPeWBvE1E6DiorgE5dsa3+KGNBdgyUsg5Sa4ZJCiZMidQ/ept1lQ00RZsW1WniJRYhDwy/yS6yQN+KC8vpuIzzhyru04KmEyFIqA6A7AnDYgFuEmeuNLCBlRvBYhGU6NfhIiHjcQA9AxAgI3FPA2VAxABeiqoRiKzhFWDi9g6+xhOz3RzNno3mRpwFqR1sgq/ZoJvNjlUNKORwaPjmKMEa0N1O4j5uVW7/Q6wliSieQt8A3fofe0OWykocWl1sk4fcfZzFc39cYdWd9YAkm5SQBJJUIxzGw4+XNXbxLLxdqeBobObRyPklP9RETYyI6JMr3lDVAZZGN7PX4d9rudCZCxXrnQsNiOXyi05yNnqScOsYLITbPdqpCK8uS7zg+fEya5sbHPLx0e+0poa+4a9Z+K+5idYqzFWL/lR5u8jz15HT7oVZmuO2Ci0crQKPESBqBBnX8QFXyCjUOkZkUrBJHKxS36KPpESyABg5Rg4ccA6imp7jGp24ih00NpmCgJ2/wy0lw+wL9N5223rYgk9i5bEz7Ye8MbrpjMmcfONCQK3HTbwU0BKa3iAkJT5esWJQWibyxFKpay6XO7VxR0BuuWTXrQix6xp17Pgx7gavz/CQKFMoGmAHSNn15/Ur4eHg8UXymxACP0KB/dAAG9wvoGOPB66Hp9b0H8UvqnQ81GuZRs9g4NSar0Hp4uudM7x/9pDp8BjKHxDr50AmhYlyqRciEZdGV8OSCX5lPXsKsGAUVlXg3fQuo6ih61AMK9cgi58CusI+khxN5IwC8qtjQQyssuTudN1Llhw0HRAnwhQHIITkbUo/gIopEIXSMM3xkOfEgWWdCQDAzUGK/BvXmqT51cmATnJMEmdUsx94aBnUgJgFntAd++St5MdCpSZkGEtifRwFn1DBKuKEW1h3lmRi8jDJ14Y4orAUMt73O/z0EYCfM4HMWyh99w9taGPvzO9LFN7SF2j+XKC6tNlDp2zrTHxDyqbA6Q7ERMzWxP2i2HcU4e5YWOFbXp4EbSZoMPr9kXe6etDw6xwySniAB0y35C/cA2IwwxSRpuZGe0+HPUtqDChSj1VI+bMdzeTA6eFkcI5aAf3/nSlIyHTGw+SqINS3teR0K8t3p+ZHi+cek4PNEaOYTVfOiucU/m0Oczee28lxit5CxqhqIn7orgm3hy5xS3CWq+e4tIguSKhkYFHzYnb5G3buPUvfAmtAJzwUS3PaRJUrc0P2jZgSs4liWtZCKE5L8ial0stcEVvm4UQ2F6iJBUwkKJ7jctLkQ4yFil3DhZPCIEeSEhzH3sCmRR+cepD5Scu5iC05SAKH6n8luJDmuP+It0I45Eo1v/Js93QAnPkdjY/a8Vh/8UrfOkfyIdom2pMXhYNZ9Iv5zCLEgNPh81bDw7EjMkuJeeiJDT9pXu2pWgTyr2p4KLMA43p7Bq76hVc4YYRaflGXJd/9RB9hJT7pkzLLy7ynWoGqTYNtVb7ScZjSRcBuRAX4KYccKgE5EUWumg8/LxRErFYIrzrFFxS7OMyD4GV1Tlk96t9pesToZqsbsns8h9FKiDO+G5fse12nGyLqqBMcDZf7ThSe7Tk9zGlCUQO6VbkCCdBR3+Fvtj3MVDrR/PZ/7xO6b3scZ5LF2j4YK8AvnHyJ0adSQIwC6f0Pg+EVwQhegHwbmH9vdlQ2CBAJVhEsZuCeRM3soCuBS4GLGEdF0I0qf+AAEBP3O7xXH0uaLyPCy4y3j3QeuYrLxYSBZLoI7brDIi8IA3vWHV/fWtS8/ryxq+5Mo/nXEYaQARhkCyAIsAIABUT1fgh589PqHMuGIX49j1zy24MYEccqcPZLpehyJj5lqPvaF9x7NUrSRxmNo/4nn/RsDR0l2P3qMZ5vMWBAXHxqM8LqEK2oJYYtg/OVU1jeIGJVzjUpUIYsPeV1SyoCENcxGDa8tR+Dlq9SGDQw/GkK2D42kVx6SbB79jMkfpNW1SuS5v5QH+fofC8atOTfsoq28X/iPdslR/0+fQViLGGqArZT+W7b8Efxr7RNBmT3tHshcwuHKBRIYnBMnDIG4ozFkfly4DkP8ws53F9wXmhJCu9kouO6svqe0w4PTRu58lQ87KRTc4JrwnlUSEEnK7ONWRc7lv/QMvORqgWfK/Zx1OWWaAQ0QpB6rIOmFhRf/PkEjrdrjBlyWYK7IX2cvXmFkzImo1WRv5ZUAAkh0j9Khv92Vm/Q8QdDIVgPS5LcUbTJ2l6Nh0QZxfWbN16WctRc1soxYSnmoKnmfUEH4EaeG8/cafTJ1I4Ct0JZgn113KgJomkrN8t+ugzhhl9K/3HCpPK2zinW8XE2TCPe5vTOGXo6amGb6bYsMrJNLM+fyIdtTX1HR4716E+OC31D1Vz2Yz+3kEGmOMRV64OpSCuiBnDqGQ8rNIcx+pDvIgpm3eabOYZgMI581fQAzDppv5GHMiJc61MOXcsxJaE8P9PYoI7eUtl4HIE3qZGyZ8S/TiEm6hxzJivU5gHHyosEDgQv3p2gN3IaEmoGty80kBziX5619mkqh1PrR6sA4/4Tz1mVApIknkxTjOoKAIiugAZ1GPSCx0mD8DXUPBp2khjBBv22QPF7A3J+2DqRod2DVPvT+AAOkJX6+wQldfRVqkRgji9B/LH66VsvTuzqyD4YBRbeGwKHzQGw/+iTOMG2yopqMqLA4uAa723hn9/5JbV5hKHmtco/b8QJXUQImudu9GiN/6LOYo5CBEcmUhc63hn8+sOgWcsA7FXmTFSj6Q3X4mLjRtlGclTYduj4XBv2T3rFyr6W0mlZBxaTXDQQEohaUkUYcUKk0M4saD8Fko9WBXA0fG6mMjt223CWKeagJjiEFSf6Kx+bPdbX3o7uK2jTIrsPsY8ZpjVjIoOX6ngosRb2oPeCAiD7+KpvWVjWhmrrrXCOKb2y0l4V2hpdvq5dv7/ACVd9BgsvHfNowkq6LvyEZ2Sa2Z8n9+Sw8ajAZzaNvZeyf62TaAqiwJ+pMSvjAbggTYjg+PexKY4eoySweZx9jc53bKlL8nTKj0Y4I3W+7Hnw1WgwnO+cJLRp0AQVf6RouXgxWCUHWkKZ1RjKuqBeRd/tusGEzepQmcIn6Ca05dqXzowN9FTd8S2sgf2rDm/nG1OrZsqLSNepdubsp/+NkQTLewXnKxz4IdOTAoIFDazI3OYwQjWzUMGa4Vy9y4uFCC34WMxRQfGNCinFjF3aH6lLabedml0BZAodhMRMsMyrLOpYtIMYxeS41LR5gRqAWRL19Dcv8g5OTyfgQVa6hkinyAb3dhbM0bJpEx0KRssFmS7qEaaSZS0YKuia3MW7R+eKDRkLPLM0BuKPswJQgTe6CZu/bVv2QSx1d/f4VB6tCy5RPW3NZfv6vdbhVv9iPqB9BWmefVq0zJtNgzrNjXYBOhCj5AnvuVi0OvWMKzLIt8E0GMZH1Lhf5IIQBNFdlyBsiTANBWYGrBsGm4F4l5UyRnPlk9E3F1AlWdwuyzF3C1jDGLIMuL9FwPb8WntoR4mzqyCO4ihAlum8qhWS/87LEYaLRYkhgHwbSjjfqZRUCWqUdjBxYXeHXRLqjbE/3G34qFW89gD6XLeeCFilfEGHzWejZXOtT2EgAhxx0Kw4F+xni7iXiUdzDVTaYxqtR2Q/5A7QWgkqp7DE8AlB6xsR8kAgSOVURL5dHSwNBc6g5VLBp/+5iPDvclzmsxIDZU8efSv2pe/QMZYTROES7lDOdjjIPz66TW2dvOVfxE5WE3lWsS3U6UypHrdpX89liJb+v41AI3fLt+ys4aP7dfcQvXtHTfZ/XCTVvB1arZdAdO3zV6+vvqnx/8230VFj5b4gQ/+dZUHD0/SehYeB1/doqdZ0sPCKhEvifVYX8VLVxOz5HAH6CAGhBtcqJhkeiFb0fSp2LgY46l0zDAD88EUihgGSiC84Yc8tDBADusLoFk7g0dpSxcFHAXl0pSMPn8afxD0TOdBo/JqbeD8Ne6fM44YbF2PS0wy1wOcSUXlC8Seqx1C1ykVhQEw0+FajP9nrxMXFhJwXz2IZG2XLGkTmf+Ll2WIO8hiY7pXJDlVji8bVINrsaQoqLgkv4RFmR3Dpn8seDmWzMeGonHfa1ocMm5GDfhROsxhK9CuqCU34UD6Fu5RKdj4wqLtUT+xEYj0mVw8vQGVChpTYHd13NCxoHFf6WaweIYTpNAgabIOL/lsYelUDC+yDbaty+3I58YYeGTj08yGx/sJ395mM5CQZ5IJNzZCvklYu6Uc4dwYrhbYjry1+4lhFRFCMAPQXIpymtx3DH6wtj5pebZ/Jt+5yMi9WWa/IrHbFVwMs/pLCPHrNn8g9cZo+OqHXF4n16D8OzhlAuBAUR00Gtgw7cznKQ7+qWu/R+7IUuCJ3ZdWQqIiIMb2u+Zd9nB/SDTW1Y4KyiPiFqqje/2JwoMD5ymnP8frnCf9UN71ZSdY63/s5C/4iohhSUsZ2Q78zdYlBtnS/rQ67ROeqVIOi8UgrCzb3eEMazMagDp2aEmfob45XtPny/UE0Zz8PrAuuZwE3tYqaiV2U7pCQ1wHc4pXjswhrH4ZZqQ5smVcdOtmk64IBsfblwGF2eapLkfGEL6qjkXxWMKP3I8AFO3T9Mf5hpHqyOvd/yrMv0gFOF1Zi7qoIVuwKg11JTPOiHZSsMCZ2rbV+x9lfDFrmm+GyauEM8DFIpDR3FYmeIxtxvLy+J3xaQ2LV4iO3RMv76bWRGEYJetQ+eAI8CacPz0BbOUaohqvJxsTUNKQvmfGJvGbffg8XyvEFuUPRJ+L1l16Y9F9XCtYCKpv2Jw7FbRNXXgMjRba9I1CqZxKupJ+x5UH4oD5qduewd1fQ6Urz7UtYryK+IvszAo5I59kQualULXKq3mp8VS+Ecj+nvRBsiU8EXrg34lAZEwwgXh7/V5xb18Z+JcTCbzzrbhADhxzuT3wklVvlLta4T/eCejyxWvrGydgdjArNGWAf3jDL1SawYieMqP5EJ/gJ+P26geYB+12PV+jdVYiP381BCO/ffbXLRiCJT+448PHSXfXiOKLtyvVbcr8IU7p1lzvXM2P0D87mtZ/olU8QzZU0deo6ZF086CeUSNFKYzpdXDGcxz2DXrZSTf1JBQjDHUddu3WW2AUVGvc/ROsYZzej14e1Z7zEftk7hL7XlgNNqNttTMLJbllA04coA+6izvfGf3TRPUWvTvmIE99gh1Icos4T7f5x2tZUxWeDb3EJ29DwXDChPJ4Zh+DuyBZdNq4T58wkVGp9hAbniA2NnZ+P6wck5ZRlu9SQQZQVb1mEeR6zY8hy3T0JOZXZ9ROj9szrCrW1UCjvbqBJFVjF/IEUkzsnuKJBKUPp9q6+z1Ch/rfcOgJGs/SU6FRvfa6H7heUn7GlUIRHRYu38luMVPXDt0LJsqqDbd418Di3Yun1Sbw/dv8LYkxfz4/Vo3ddb74bPddQGi29NtybRsl2AKpPFBz1C32cRI66U99+w+kJC0gANCe4AC3k5dmX4dtmotzTK/VzG5Bq42VE49kTqN22hpmXJsbtXw0bGdgdblMVZfkvYH20s99Q91PwBPuk6DSx3JNzjDjgpYuKYoxNz79bk7HdW+IMrrbRzEtMzVBg4CxCJVVUz2TqCwL3JzBWYDOs50seRCq2YXD5Q/1bvSb/F/tF0JSezmOM2czri1osaoD35fUQi3UtZfn49rmE/e7l57RsP2+PzBEnAoC81wToWBeZLjYajJl/P+pFmtbb3n53dIBMVPOteyXlXbmIaW+K2hkU8eE2duUiGoWldlO+VxbHSCkO02VNeknXSQZi5vGOoItmnZzhm6Lv6OCflAsyEJ1kLQmBGchg2WY7EKDkTDgGqLjRFZAqHs1ZzJsZBTIwEUJymGnHuPGJ1QqJg3aOhP0qRCEJcu+/W4/vrHz/kx6vAugF7ZsI6lK2gVDxk8tjqUVS4ZEjdpgDBnVPb0tbDdBWK2k/3fukhQAsW1mVuxNyF3XxoKtu+PmXBbesQidi0GE7Ajwy0w3902f1vsaOP2qtXjw29PD+M/sxQC+AZPVRuGaCRGA29qN7T75qA2VYjGNl54iEw6lKN5RrZdKEAcgpg9vasZaaO2xCJUwkF21wDz/QDdZgLeqeZoUDj2bF3I+mvE6eXF6IkmmcqQEl3SPsYsBUdbfsY4WLK9Y8J3XM5kmJ75tDZiodTj5/MwC/JcROn4Zd9UI25G2F9U3dOe7gULWNRT+cd5U1/JQPK9FUs8l4FZBlcZBu7cMwpsLtSPF7TtepEMNnRtCAmQKurOaIwOC3xIWXsi2BE7wndGL9ZCgPsLAcp//w4aM0kBHLf3uIOPEP3eFuxii4Ao8EKSOlzbY+WQpfeVRTOnVsRw8bgW4BXg1jsaP2WmFObwqxCgovePjQ4XF2IZGHA7g9CqkJouGSsARuSZuhNNAwV9eqqvWETQkaN3LS2Alwe72ZyU4XNIncx0lRHU+1OKOpNEBRhSX3eoZQCncSAikGx85co70QpskU6xPXu0/haX1nCqnDTqwQVAv4yiz4wYhaO1jDl490M0/beILUjN/pMIpHymqfsOQqI4Ujdu4wKPE1Ro6AHbech5PO5pyhxBTurIJajQdBFC1/h6pk2dG/H2H2EXkPMBKAAJAZUOMaB4NX42wQ1WJwlPgLojAtaVPSIFmNi3ny2sqcGsEEfS7SFhJ1EVP89YW1UbDm+S8wBaFbrJCqo9AVPfE1YJY93TkgYotJ3Cc6HScowibq+lLL8vh89LUIHqiV7U6oRgZNrJvliAITVEI4iMUj3IdRRjorsgmwUKlrcnqP8XUq/XDETUR8DtotmGY4VZhtxLhHnCcYDm2LNhgBZh0lhxz0cKbPR1iug4g10jme95j7JNhxf6jrUAmK15XuHOlsgGdsE/rHySriDpwPL5yLdF3zV/RVYVxmwI91VtBKAdUYLAFa7QAi9tggnhKYgGBoCNtt5kkLNNLnGmQ2d4O71e382OZSzOAMPPK9B2KHujr/Gj6TqaPExTi25XdTLuehRYEIPcCnP6JfTw+kWuojjCqbyW6Dsv/+UTt8Q/nrPbCql789dH3DP+yuPFc6wlTN7RyC7Oy9v6Eth6TBEOfVEPys2zL26hfJkCEzxrWEXbF1N1CiVtt9vXakggtXRjoCW9w45g8OI7tU6KTQzK/MrXOV4dYMqs96lixXrLG4as9hcpiE0/S/3OIQ8t8EUxE4whT2uMsUgFUN0OZW+LPED3rt6/wUt6i6s7dRjqpV184DhwZfiqSqYTWya0Hwoq7g8mHTdiIV3utlAd925FMWWvKC9It+JmK/e+Do5SepknyQP8DSgu1HHhnXOLb81zXL9wjvqpDHerlM/HITMJl5UXxbAGWxkxSY8Y+ttLM9UpVtiV4ec4fsGnsn1vuLHxqk+Ek1o97clkqHpyH6CtrV+iW0esqZqrQDNuPdPTbJ6Q+BDI6ddMp9pKlfwbp2/zkunZLnwnOS54x4VVc1PmjZw32jJZc294N3vzEczEk0ea+ktRCO5cOeqoHSg+cTp27kb8t2a6Jl4SgakcfWJMuLeO0hlRuodJcfDnWM723J+D7lkSx0IhuD24Cn8tyt40iSF/DT03F3yCQkXHHcOQBJAfDniRA2kuQhNNkwFjk7z8FcTCtk2XQXTpXokWp+k0OurHidStDO+JrFVyzcKVukrG2fWcs3uKTbVcJJBj3xvKBIL3aDvdnMixNDN2IAHpcD9+mUmmNXhTWYe5oAx6TOfmm2XAdMV3P/nqzz47Lp3an4uXPYd9J16C9i/Pv89BlT/IHEc/XcO6mED2rN9sVr25Z7X+ZIyvlXzszDjv0IJQgzTX2NVOxrdqHlEiqeTsagRoJCXrt8b0JyEadRNCN9OqHgZAuSAgIuDpgmkkwcSkN20Kw8WhhSG2oxqJtMoTXemo3l+8w3rNbM7MW1iXUNYv66LN9/akEAlAfRdyfSg/gQpg1pPqh+JhDWlJopFzyWc6H6UmFIrGlxcYGZMgGRXJuhmia3JMuH3xrK0Oj4hwaI3TyIyQ2V45ydqI+M6LQJG+zgaZMj145Y+idKoX8n33WE6bqFgqCx0YPRbmrzdmS6UTKt7/aWJUn+anO5wq7CzVdKEb4jxSUnFXL8i68GVWQs7uYSH3twUp4go3V8lXfcW3lOnVoKo1uCUQno1tV7jnsZFJllpauvUmkzKKiu1VhcalOe62ybZVVl1UaF0QTiJ2XVyk0B8K5OhUoSB9kvFmV1aNbsjzgjAC0LcCZ62c7favizvvZLop/ILhWeLM9Njs0wYHsnvUz4dTYdyKSR+lcle6SCumkp1fAlLQfR0DPZTnAVuUiwvlGAtF+82YklI0Y6c46Qs32IqCOyCG4yjaDD0ajI4HUhpf+RWDa9HPlFjczDDuROVaywiSt9uRHIYXkphybr89dt2vTaXVKQPoVrFTWeWdjyca7Wi/jE5BQuxSDP2iIZ1zufqMnk5r9WlfelxUWmYF6bllvaqPkiYXc1NAbO22Iaej6mrE1L6PMmppFJC+4umxqlhXWohUzYWRl2h6KP8ChxA9hifPvQpX1pqIar57qAiaVuop6zkNnWI8ScW0eRMW6mEKS1qzpwGb7dp4+GAkCStjMW14rE28na3uTKI65SEqcrjjfqSRNIicmWORapTMW8h2zXDl32hOMlt3OHiWneDj5NsfGo5Clv3Wb9U9qhPkH+O3A4aTjKhp9Q6ehZivOUTQOFQ0WundUlwWNsWlFsckmdXWMm1/V66mR5DqcWt0jU92ScCMSPsnW62X1n+gxvbli0wx2gVk94UnxLO6cw7pBYqaUWTsc36aczZB6KaFyZ1Rk3u/CzaC9EMc55iI2Rp5KiinLtcPLBKnftM9Nm5Nl589UtnFXdvxwtk/stO8HCtXt247hU2ergVW6twjGUEms+4/7J7ZCOkJuFsyVod3assY4lxjN6OZj3EPZTpxdlIwdPgx1lhOma6qVhlGvh19x4v9eqbJZLVJMx09aMAaAesnouGnCU/dqUKkuh1lDPNBfItH1X2W3l9IVqd2pUcBap4vc64zn/RiVXQryMhN/F1IEboDJstO+5QmKYv+wkNQCPP0dm+4tA4Y4TZH72uzIztzaguvNhFcItDSYF7Dj9bKO72arvaE9a5ylaNUw31AzFS7TxSn0KstnjI97jHSrwhzxWDWe4q8x1eHbv79teDVbZJg7JNqCjZTWKLbO7Sc9lJRTkwOSKgvHcDep2Psn1jYL/vyWlvm3iX+bJ3ZDONHBU9FJvdhlZxe5Wu3AE9DNanFArMMbrHSq4NTZ/Og1xI+jNaypqmc+w+dCZ1XoXDNrHlJIx0yRwEjHqd3GuNyjO6/rUlPOYTWqSovY9nYWEJatq3djs5ccXEElUyTb+7MSDntCDfWzXn3xNcnzPMTRUSw8ttYz9Wfos6nx/+5cK8ErZ5/KamXfzBWT8lwv7pyZBJmb/9j6KMm2Mre81Cmr9Dul3I38WULtxMU62MDGDVwoTFvs9WotQqzOOiRspnd7fM7m6r724qlG2HXwdg7dYF3IE9/9aiWltByKi483o8+jt+G1BeRHejnLxa7IzdQ542oyeSazI6vJDDG/YQhHPckXOwVHjbYU29C0BnUga6YF8GnD9OMtQ8/0E3J7HKch66NjVgcM+ufkSlcEMXIguITOkDZ8uUAfH1zarU5+MONa+RzUPNYgn4zF08ksWEVI85lMyaEVidg7QHkPeAdXVTMAVPTmUL+4LArutl8Rei2PoBlyJoLBgCxXirXmDso0RHg1c404Ot7BZcxcxBZf0eO1E4cJzwBS5ECAoyA+BcbfgF7jZ9rcAAfsQWZUZYIM/C4df7aflRlOzv8t6E9rrropsowfNPQcH8Ofz4sPGT8SL5Qh2YNHcPNcj60DMaZpeVoOh9ymAGTqXqdtGUKLIg9NlOxRqNO74n1kfhbfSfIKfDJ4OrVOZmP/kExX2VhjzFECGx7FUaqOQuu0abqMO5kntiO1tn8RaUdTMaaVoBEfNJPlW+6VcW2vOY8GfdsfXg1FJFa0H7oQsj9RYf6RjMtuUTV2G+yblcaatHeR7q0bPKVoeCB+F4MWVBQHfSN2MIn7thmbSOYqq1TxZyXlawNeUq+FPeShGXaq/e4GavG+cEf+JInzZC34h1zta1al7Qh0DucBlZVATZUwQyiwEMmmlAUwgQbwCsFGyaNXDNVtY72ZS049ualMOhMCq6+hxwLVsjotCCUQjzgdfgUItNUoJJUtyEp3MoyRRGGNLZxFzX3V3zd8we1uy+4hZ4m0PMeeSdy993YNwVCi3nl+2rudFFuZp+ogrlCT6jnrHcfDNhnlc5f81xnp1BCDa5NrvlzOigrSNUnia6opwpLYKQY686xiidTAyxSl8SeoEJFUQFMA21l4C0nu/8KgZ58urD2npcPhp8F238DtsdtrxtLfENt0JTbheifcFg/BUg2y9Te5o+B4qcitSHF9k0u3zSBvOm9lhmSWHPgJwlk2WX+to7WArs2S37ow1qnBTM4RGO1KDP9YUfmPTysT51aantlzxJhbJpiYv0TB8PK+M1S5EFocpO1a2L+Ox/k6HudjfvRu1JACB+8bhXYVyBmyTPzULu1PFAsoJPjxkFm4Qp38dsKjS3BFF8MPoCONt3dwVJWT6Lpaavlwfl0VN5KSNjpFmEdYLpko534TsNqO6/DLBt9PtVMhat2Fwiq9Q0hs/BqLDCXuoA8ENHzJsf6+NiGzZ0t+E+q00oZR4YLyKkTurGMpTS70VmU/+HQ1leUX7XD67xn8W1ZgwJVprRGsP74ScSRa1Rtg+J7/pH0GP+yMOCu+IRO+VTBOnEjauu/MzkeJCo+ZQE4gW5S3lHcJcwzVrc1C0k0DqNOJUm+RBUP6+CHROhtYxwlCIhjEwIeOYi4trOKRsXiuKCIkeZwpr0r+GKlm5tXJFfxUlJPTQppKzH/aR/OHLluoLfGKeuhzLhwk5HdtbczFoh51OpuWNpbJd3TEeUwBbFMtgm7F/ndMvH1f9+gQMk5DD0gmFSt920ZDehEw5VRAswvMgnL7ka+irncnFgDeBzOqQ2DFsKEnYndVlao48bEyKj9BGMkGLA57NZGtdYrLCc8LPuLTwH5wyT8ykgg98Yk3ttBtqTy8HurppNiMWTFOKYrAhOAEUlOTI9QTZA4rtymyFmiPWcLand9bYCOfB/ug1SIwwQnjDgnh5lKdtjgky5RIyKo0pCAvI7XWxcNCpilAIjnTiTlJ9EVs7labivqjg+xQq2qYdkZUgVVKjq7/9ag+MmIheVL6WYGlbUV6DHpj2zfOsN/NU1qk6Jpp1xdLGM2SUcZIT29pZB5x3MbfwF/fLd18EvpFZi7kLeVocM7/1c3OXLLdwJty6o1jJA5iPTiC4feTSlSDs85V0wudwYGE7zTDWF6bwQyhS15kTBLL90gx+mSl5YfBi6M6TIDEM+kXAtGBFjVlcTsEpdATLsUXCK+7VWMN0yPEd9G73keW0sS43n6iIVkAyBPRyMEE9cErbfj+u+uLNyEKCSOkSrEgJ1v8oK+9VEkIHvUR26yqtNWhuLTdMZIVHYqV5pBpt15AD8A5VHRUvOPN29FSO+8ew4SA/DNddt8oG7XgP7WYnGYUUAVeKm2i9Q6zFH5Bpyqmdfw6sFQV2OpihI8PPxx5jqiqkN15jWKO7gg8L363Sr9jQB/nZpZdNzzQWycxOVNwbbuNgwrkk8vqMt4/g3SjcT3Z1kO1bI+MILxFrfNmHu3JjEHwUPxVKFD3+Yhwi0HB8bHMgWcTg1DAjp79UVQWEBEVtYqxqPZJhnrSfdeyyRW9FYe/Sp269H4nIJ+85225Qo14yQNJfOl3W47f8AGtry4/D3OiujuxJMUWhx9teW7v5Qgyu/e+l+LiudLN0jnKkJnAAEpovL/3piwoah5ckoBEq/15r/RhbonG/sj0aFLFp1857pQjzEYrVErvCu3XVLFDoBzmZW0q6rF8oygI7D6+z39WCUe5yMgDtE+uZa3N0nxuUZOJoOkNNHProiBAw5QZoF3oaOF+Aj70L7vn8MiZQ5eTOsIN/OxCR8eJXezKkQ56qqLkVKe3CLu+AdboSWaXp/iCWdcYP0Y462m3hbVI1BzIevHzp55ul0/q7D8fzBiwOA3EgCP534E6H1gDzLC1vZbwE0Vl5qcPMtCmQyGEU9BDmlVRtdjrU9CaXJw9RiK1WMVnSqtR8BO1CJg0OhBvttBAVeUbYnwl09NkjokELchjbZZV7atY5KGJxYUfNGS64LNsvBX0nG6UBhHB7Rj6lgc0NIovm5PJYiZHaEAzSFa8LBwoTU+PvJcDnTk1hQRd0Cp62/mwzcNG94e++Om5EJvUKNMPmPsXf/FU58fsvIlDgvnjFaRkRPMfVIdUrweWB88nQFaTe67rzJ9+EK2oSv725Gv309dDz2Pks52Mmqu214fJBrtPcmBxfTwJepCtrA8XNwwnAOub8ZjeSDV4ltSHBzxlRKUfWZbl35KYNNDbmP99onATfE9686N6zidx1sed9Gczy+Q+ZhgTcULUc6K2H3JyDuVCloPac09RPltr6JLSD22UFkR0Aj5bYX6NevIgpD5FsdbGqBooN+nlRrms580rOlFl4Teh+6IF8sQES+UYQ1EfA5tH3TO8zM7rI8lEJ0IyaM1x4BYoLWguVtv9tHTLDcNCk3fNh3eKjgkHYNOfC7PXFZw+2TEhDWGt2gM6mmDSUEraUDmiQcqm0cKikZGWx448Du3GxgokXAcrlBa5mBxIbDFikCUOPjh7n5kUwsXWzTXuKZ24SfbFCF9iTYNy2oLHfbC+h2Anqe4UkutRfWXdD9C3V3cmopBjc5UqZd/UZBbL2kk45hcE6Axw+/wneWAZ+NYobI5SLIAulEo1ICQXlrCUcnKS8iIOqyOnNrqDNjKgbg9DuVo3eC/KQlGHYzXgQSxYagtAF+/hH8BggsoEd5pWFjuABVVrgAoa1oETGHQtHaukBUh4sETwF8WcAUFBDBlwg4ECRNcqp26A4nAmPGwzbcnWknjIWbJ/os7LxbdltSEhmgC5NwAvDSwQjkCp/yF8l6mUH4TQm1LKpUWVGCgAoZMBE+58lHrih//Zv1ML8rxYO4NkE/Fu8Z/31XwU+cyDn2sZJNAp/k4W12bz3O4Nv41HnyAiyNezA76pU/JS/73eBuEPXX18LqPLp1t9weEcW4VmdNkx6b32eZXlX6YsmjT8x3A+yBUb3PpEdL8AVcB5Q77kcHip+GhH7XI7OkccRp+pmPGLEO+rClBNSOQPKAmqk3EnybUKU6B1VM1LLAiRDVdCYIuyWo/PLZObqTL99ogi6f8w/Zt+JAFgZSFW387WeqEM8p9GYlrcIyd82D0RMLeqwesdS7U98qUCoouJPlQdsbny6XsU5z7U7JayX135INNTzZCpTbjWP0QNh0G/3skJvN+cYv34bpM58zg/SZQzI5gnoxf2C4WovXcFlo4byite4FpF0/bz7zESslMfq4NsJ1gEGbwG3/8ay+/Wc4yOtz9x9xwHyQSqsGZY4GPWJ6XBfz/sNdaZR1lcxpjc3Ll2oC3/WJ+Xz6rmHxcdxZHpClKgqiWbmZEYBPnjRhytlL4kos67A6SfIUz6COPvWOS4hrSF8Wl/u19O54W+AkK56NnWmW5pmqY5TbHTgdClLDAg92AslKZcu4X3qsiluFx62lA5XZqgqDRo5YYWsqdyk9Vn0Y+5BFggcC5MZ4D5FEs0V4sEK8EA/wPcpDFlWMyvg8WKeNgWb7EbHbqR1d92dlSn0E8nRsdOo+z3J7tbSAC3f9e3SzDJB5xVXbt+Zq3ayiGJzf4KV4Mfkf","base64")).toString()),Jq)});var gs={};Vt(gs,{convertToZip:()=>MIt,convertToZipWorker:()=>Xq,extractArchiveTo:()=>KIe,getDefaultTaskPool:()=>YIe,getTaskPoolForConfiguration:()=>VIe,makeArchiveFromDirectory:()=>LIt});function NIt(t,e){switch(t){case"async":return new Kv(Xq,{poolSize:e});case"workers":return new Jv((0,Zq.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function YIe(){return typeof zq>"u"&&(zq=NIt("workers",ps.availableParallelism())),zq}function VIe(t){return typeof t>"u"?YIe():Vl(OIt,t,()=>{let e=t.get("taskPoolMode"),r=t.get("taskPoolConcurrency");switch(e){case"async":return new Kv(Xq,{poolSize:r});case"workers":return new Jv((0,Zq.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function Xq(t){let{tmpFile:e,tgz:r,compressionLevel:s,extractBufferOpts:a}=t,n=new hs(e,{create:!0,level:s,stats:el.makeDefaultStats()}),c=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await KIe(c,n,a),n.saveAndClose(),e}async function LIt(t,{baseFs:e=new Yn,prefixPath:r=vt.root,compressionLevel:s,inMemory:a=!1}={}){let n;if(a)n=new hs(null,{level:s});else{let f=await le.mktempPromise(),p=K.join(f,"archive.zip");n=new hs(p,{create:!0,level:s})}let c=K.resolve(vt.root,r);return await n.copyPromise(c,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function MIt(t,e={}){let r=await le.mktempPromise(),s=K.join(r,"archive.zip"),a=e.compressionLevel??e.configuration?.get("compressionLevel")??"mixed",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??VIe(e.configuration)).run({tmpFile:s,tgz:t,compressionLevel:a,extractBufferOpts:n}),new hs(s,{level:e.compressionLevel})}async function*_It(t){let e=new WIe.default.Parse,r=new GIe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",s=>{r.write(s)}),e.on("error",s=>{r.destroy(s)}),e.on("close",()=>{r.destroyed||r.end()}),e.end(t);for await(let s of r){let a=s;yield a,a.resume()}}async function KIe(t,e,{stripComponents:r=0,prefixPath:s=vt.dot}={}){function a(n){if(n.path[0]==="/")return!0;let c=n.path.split(/\//g);return!!(c.some(f=>f==="..")||c.length<=r)}for await(let n of _It(t)){if(a(n))continue;let c=K.normalize(ue.toPortablePath(n.path)).replace(/\/$/,"").split(/\//g);if(c.length<=r)continue;let f=c.slice(r).join("/"),p=K.join(s,f),h=420;switch((n.type==="Directory"||(n.mode??0)&73)&&(h|=73),n.type){case"Directory":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.writeFileSync(p,await GE(n),{mode:h}),e.utimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(K.dirname(p),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,fi.SAFE_TIME,fi.SAFE_TIME);break}}return e}var GIe,WIe,Zq,zq,OIt,JIe=Ct(()=>{Ve();bt();rA();GIe=Ie("stream"),WIe=et(_Ie());HIe();kc();Zq=et(qIe());OIt=new WeakMap});var ZIe=L(($q,zIe)=>{(function(t,e){typeof $q=="object"?zIe.exports=e():typeof define=="function"&&define.amd?define(e):t.treeify=e()})($q,function(){function t(a,n){var c=n?"\u2514":"\u251C";return a?c+="\u2500 ":c+="\u2500\u2500\u2510",c}function e(a,n){var c=[];for(var f in a)a.hasOwnProperty(f)&&(n&&typeof a[f]=="function"||c.push(f));return c}function r(a,n,c,f,p,h,E){var C="",S=0,P,I,R=f.slice(0);if(R.push([n,c])&&f.length>0&&(f.forEach(function(U,W){W>0&&(C+=(U[1]?" ":"\u2502")+" "),!I&&U[0]===n&&(I=!0)}),C+=t(a,c)+a,p&&(typeof n!="object"||n instanceof Date)&&(C+=": "+n),I&&(C+=" (circular ref.)"),E(C)),!I&&typeof n=="object"){var N=e(n,h);N.forEach(function(U){P=++S===N.length,r(U,n[U],P,R,p,h,E)})}}var s={};return s.asLines=function(a,n,c,f){var p=typeof c!="function"?c:!1;r(".",a,!1,[],n,p,f||c)},s.asTree=function(a,n,c){var f="";return r(".",a,!1,[],n,c,function(p){f+=p+` +`}),f},s})});var Qs={};Vt(Qs,{emitList:()=>UIt,emitTree:()=>tCe,treeNodeToJson:()=>eCe,treeNodeToTreeify:()=>$Ie});function $Ie(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:C,children:S}=h,P=[];typeof E<"u"&&P.push(Kd(e,E,2)),typeof C<"u"&&P.push(Ut(e,C[0],C[1])),P.length===0&&P.push(Kd(e,`${p}`,2));let I=P.join(": ").trim(),R=`\0${s++}\0`,N=c[`${R}${I}`]={};typeof S<"u"&&a(S,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function eCe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Jd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[HIt(n)]=e(c));return typeof r.value>"u"?a:{value:Jd(r.value[0],r.value[1]),children:a}};return e(t)}function UIt(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));tCe({children:a},{configuration:e,stdout:r,json:s})}function tCe(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(eCe(f))} +`);return}let n=(0,XIe.asTree)($Ie(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502 +$1`).replace(/^│\n/,"")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 +$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function HIt(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var XIe,rCe=Ct(()=>{XIe=et(ZIe());Qc()});var LR,nCe=Ct(()=>{LR=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<"u"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function zv(t){let e=t.match(jIt);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var iCe,eG,tG,MR,Jr,jIt,rG=Ct(()=>{Ve();bt();bt();rA();iCe=Ie("crypto"),eG=et(Ie("fs"));nCe();Fc();E0();kc();Yo();tG=WE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),MR=WE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Jr=class t{constructor(e,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new LR(e=>{e.discardAndClose()});this.cacheId=`-${(0,iCe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get("cacheFolder"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),s=r!=="mixed"?`c${r}`:"";return{cacheKey:[MR,s].join(""),cacheSpec:s}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${rI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=zv(r).hash.slice(0,10);return`${rI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=zv(e);if(r===null||r{let pe=new hs,Be=K.join(vt.root,j8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(K.join(Be,Er.manifest),{name:cn(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?zv(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await BQ(pe)}`:r;if(Ce!==null){let fe=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await BQ(Ce)}`:r;if(we!==fe)throw new Yt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let ye=null;switch(r!==null&&we!==r&&(this.check?ye="throw":zv(r).cacheKey!==zv(we).cacheKey?ye="update":ye=this.configuration.get("checksumBehavior")),ye){case null:case"update":return{isValid:!0,hash:we};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Yt(18,"The remote archive doesn't match the expected checksum")}},C=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await le.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},S=async()=>{if(f===null||!await le.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:f}},P=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!=="mirror"&&f!==null&&we.push(async()=>{let fe=`${f}${this.cacheId}`;await le.copyFilePromise(pe,fe,eG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let fe=`${g}${this.cacheId}`;await le.copyFilePromise(pe,fe,eG.default.constants.COPYFILE_FICLONE),await le.chmodPromise(fe,420),await le.renamePromise(fe,g)});let ye=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(fe=>fe())),[!1,ye,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),fe=ye||we,se=fe?s:a;if(se&&se(),fe){let X=null,De=g;if(!ye)if(this.check)X=await C(De);else{let Re=await E(De,{isColdHit:!1});if(Re.isValid)X=Re.hash;else return P()}return[ye,De,X]}else{if(this.immutable&&Ce)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,"supportedArchitectures",he.Type.CODE)} to cache packages for multiple systems`);return P()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[R,N,U]=await I();R||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>R?h():new hs(N,{baseFs:p,readOnly:!0})),te,ie=new iE(()=>i3(()=>(te=W(),te.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),K),Ae=new Hf(N,{baseFs:ie,pathUtils:K}),ce=()=>{te?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[Ae,ce,me]}},jIt=/^(?:(?(?[0-9]+)(?.*))\/)?(?.*)$/});var _R,sCe=Ct(()=>{_R=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(_R||{})});var qIt,KI,nG=Ct(()=>{bt();Bc();Np();Yo();qIt=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>PQ({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],KI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=K.join(e.cwd,Er.lockfile);if(!le.existsSync(s))return;let a=await le.readFilePromise(s,"utf8"),n=cs(a);if(Object.hasOwn(n,"__metadata"))return;let c=this.resolutions=new Map;for(let f of Object.keys(n)){let p=JB(f);if(!p){r.reportWarning(14,`Failed to parse the string "${f}" into a proper descriptor`);continue}let h=ul(p.range)?On(p,`npm:${p.range}`):p,{version:E,resolved:C}=n[f];if(!C)continue;let S;for(let[I,R]of qIt){let N=C.match(I);if(N){S=R(E,...N);break}}if(!S){r.reportWarning(14,`${ni(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not "${C}")`);continue}let P=h;try{let I=Xd(h.range),R=JB(I.selector,!0);R&&(P=R)}catch{}c.set(h.descriptorHash,Vs(P,S))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");let n=M8(a),c=s.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(c,r,s)}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}});var uA,oCe=Ct(()=>{Fc();xv();Qc();uA=class extends ho{constructor({configuration:r,stdout:s,suggestInstall:a=!0}){super();this.errorCount=0;HB(this,{configuration:r}),this.configuration=r,this.stdout=s,this.suggestInstall=a}static async start(r,s){let a=new this(r);try{await s(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,s){return s()}async startSectionPromise(r,s){return await s()}startTimerSync(r,s,a){return(typeof s=="function"?s:a)()}async startTimerPromise(r,s,a){return await(typeof s=="function"?s:a)()}reportSeparator(){}reportInfo(r,s){}reportWarning(r,s){}reportError(r,s){this.errorCount+=1,this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(r)}: ${s} +`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(` +`),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command. +`),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help. +`))}formatNameWithHyperlink(r){return u6(r,{configuration:this.configuration,json:!1})}}});var JI,iG=Ct(()=>{Yo();JI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(SQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(SQ(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return s}}});function Zp(){}function GIt(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;nP.length?R:P}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value=="string"&&(S.added||S.removed)&&t.equals("",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function WIt(t){return{newPos:t.newPos,components:t.components.slice(0)}}function YIt(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function cCe(t,e,r){return r=YIt(r,{ignoreWhitespace:!0}),cG.diff(t,e,r)}function VIt(t,e,r){return uG.diff(t,e,r)}function UR(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?UR=function(e){return typeof e}:UR=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UR(t)}function sG(t){return zIt(t)||ZIt(t)||XIt(t)||$It()}function zIt(t){if(Array.isArray(t))return oG(t)}function ZIt(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function XIt(t,e){if(t){if(typeof t=="string")return oG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oG(t,e)}}function oG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r"u"&&(c.context=4);var f=VIt(r,s,c);if(!f)return;f.push({value:"",lines:[]});function p(U){return U.map(function(W){return" "+W})}for(var h=[],E=0,C=0,S=[],P=1,I=1,R=function(W){var te=f[W],ie=te.lines||te.value.replace(/\n$/,"").split(` +`);if(te.lines=ie,te.added||te.removed){var Ae;if(!E){var ce=f[W-1];E=P,C=I,ce&&(S=c.context>0?p(ce.lines.slice(-c.context)):[],E-=S.length,C-=S.length)}(Ae=S).push.apply(Ae,sG(ie.map(function(fe){return(te.added?"+":"-")+fe}))),te.added?I+=ie.length:P+=ie.length}else{if(E)if(ie.length<=c.context*2&&W=f.length-2&&ie.length<=c.context){var g=/\n$/.test(r),we=/\n$/.test(s),ye=ie.length==0&&S.length>Ce.oldLines;!g&&ye&&r.length>0&&S.splice(Ce.oldLines,0,"\\ No newline at end of file"),(!g&&!ye||!we)&&S.push("\\ No newline at end of file")}h.push(Ce),E=0,C=0,S=[]}P+=ie.length,I+=ie.length}},N=0;N{Zp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={}),this.options=s;var n=this;function c(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var C=[{newPos:-1,components:[]}],S=this.extractCommon(C[0],r,e,0);if(C[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function P(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=C[R-1],W=C[R+1],te=(W?W.newPos:0)-R;U&&(C[R-1]=void 0);var ie=U&&U.newPos+1=f&&te+1>=p)return c(GIt(n,N.components,r,e,n.useLongestToken));C[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();P()||R()},0)})();else for(;h<=E;){var I=P();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1"u"?r:c}:s;return typeof t=="string"?t:JSON.stringify(aG(t,null,null,a),a," ")};Zv.equals=function(t,e){return Zp.prototype.equals.call(Zv,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};lG=new Zp;lG.tokenize=function(t){return t.slice()};lG.join=lG.removeEmpty=function(t){return t}});var ACe=L((Ter,fCe)=>{var tCt=xc(),rCt=oI(),nCt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iCt=/^\w*$/;function sCt(t,e){if(tCt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||rCt(t)?!0:iCt.test(t)||!nCt.test(t)||e!=null&&t in Object(e)}fCe.exports=sCt});var gCe=L((Rer,hCe)=>{var pCe=bk(),oCt="Expected a function";function AG(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(oCt);var r=function(){var s=arguments,a=e?e.apply(this,s):s[0],n=r.cache;if(n.has(a))return n.get(a);var c=t.apply(this,s);return r.cache=n.set(a,c)||n,c};return r.cache=new(AG.Cache||pCe),r}AG.Cache=pCe;hCe.exports=AG});var mCe=L((Fer,dCe)=>{var aCt=gCe(),lCt=500;function cCt(t){var e=aCt(t,function(s){return r.size===lCt&&r.clear(),s}),r=e.cache;return e}dCe.exports=cCt});var pG=L((Ner,yCe)=>{var uCt=mCe(),fCt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ACt=/\\(\\)?/g,pCt=uCt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(fCt,function(r,s,a,n){e.push(a?n.replace(ACt,"$1"):s||r)}),e});yCe.exports=pCt});var Im=L((Oer,ECe)=>{var hCt=xc(),gCt=ACe(),dCt=pG(),mCt=bv();function yCt(t,e){return hCt(t)?t:gCt(t,e)?[t]:dCt(mCt(t))}ECe.exports=yCt});var zI=L((Ler,ICe)=>{var ECt=oI(),ICt=1/0;function CCt(t){if(typeof t=="string"||ECt(t))return t;var e=t+"";return e=="0"&&1/t==-ICt?"-0":e}ICe.exports=CCt});var HR=L((Mer,CCe)=>{var wCt=Im(),BCt=zI();function vCt(t,e){e=wCt(e,t);for(var r=0,s=e.length;t!=null&&r{var SCt=qk(),DCt=Im(),bCt=kB(),wCe=Wl(),PCt=zI();function xCt(t,e,r,s){if(!wCe(t))return t;e=DCt(e,t);for(var a=-1,n=e.length,c=n-1,f=t;f!=null&&++a{var kCt=HR(),QCt=hG(),TCt=Im();function RCt(t,e,r){for(var s=-1,a=e.length,n={};++s{function FCt(t,e){return t!=null&&e in Object(t)}DCe.exports=FCt});var gG=L((jer,PCe)=>{var NCt=Im(),OCt=bB(),LCt=xc(),MCt=kB(),_Ct=Tk(),UCt=zI();function HCt(t,e,r){e=NCt(e,t);for(var s=-1,a=e.length,n=!1;++s{var jCt=bCe(),qCt=gG();function GCt(t,e){return t!=null&&qCt(t,e,jCt)}xCe.exports=GCt});var TCe=L((Ger,QCe)=>{var WCt=SCe(),YCt=kCe();function VCt(t,e){return WCt(t,e,function(r,s){return YCt(t,s)})}QCe.exports=VCt});var OCe=L((Wer,NCe)=>{var RCe=Gd(),KCt=bB(),JCt=xc(),FCe=RCe?RCe.isConcatSpreadable:void 0;function zCt(t){return JCt(t)||KCt(t)||!!(FCe&&t&&t[FCe])}NCe.exports=zCt});var _Ce=L((Yer,MCe)=>{var ZCt=kk(),XCt=OCe();function LCe(t,e,r,s,a){var n=-1,c=t.length;for(r||(r=XCt),a||(a=[]);++n0&&r(f)?e>1?LCe(f,e-1,r,s,a):ZCt(a,f):s||(a[a.length]=f)}return a}MCe.exports=LCe});var HCe=L((Ver,UCe)=>{var $Ct=_Ce();function ewt(t){var e=t==null?0:t.length;return e?$Ct(t,1):[]}UCe.exports=ewt});var dG=L((Ker,jCe)=>{var twt=HCe(),rwt=J4(),nwt=z4();function iwt(t){return nwt(rwt(t,void 0,twt),t+"")}jCe.exports=iwt});var mG=L((Jer,qCe)=>{var swt=TCe(),owt=dG(),awt=owt(function(t,e){return t==null?{}:swt(t,e)});qCe.exports=awt});var jR,GCe=Ct(()=>{Fc();jR=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}});var Yi,yG=Ct(()=>{Fc();Yi=class extends ho{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,s){return(typeof r=="function"?r:s)()}async startTimerPromise(e,r,s){return await(typeof r=="function"?r:s)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var WCe,ZI,EG=Ct(()=>{bt();WCe=et(CQ());sI();$d();Qc();E0();Np();Yo();ZI=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ht.tryFind(this.cwd)??new Ht,this.relativeCwd=K.relative(this.project.cwd,this.cwd)||vt.dot;let e=this.manifest.name?this.manifest.name:ba(null,`${this.computeCandidateName()}-${fs(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=On(e,`${Ei.protocol}${this.relativeCwd}`),this.anchoredLocator=Vs(e,`${Ei.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let s=await(0,WCe.default)(r,{cwd:ue.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:["**/node_modules","**/.git","**/.yarn"]});s.sort(),await s.reduce(async(a,n)=>{let c=K.resolve(this.cwd,ue.toPortablePath(n)),f=await le.existsPromise(K.join(c,"package.json"));await a,f&&this.workspacesCwds.add(c)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${ZB(this.project.configuration,this)} (${Ut(this.project.configuration,K.join(this.cwd,Er.manifest),pt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);return e}accepts(e){let r=e.indexOf(":"),s=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(s===Ei.protocol&&K.normalize(a)===this.relativeCwd||s===Ei.protocol&&(a==="*"||a==="^"||a==="~"))return!0;let n=ul(a);return n?s===Ei.protocol?n.test(this.manifest.version??"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${K.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of e)for(let c of a.manifest[n].values()){let f=this.project.tryWorkspaceByDescriptor(c);f===null||r.has(f)||(r.add(f),s(f))}};return s(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ht.hardDependencies}={}){let r=new Set,s=a=>{for(let n of this.project.workspaces)e.some(f=>[...n.manifest[f].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&KB(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),s(n))};return s(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let s of r.workspacesCwds){let a=this.project.workspacesByCwd.get(s);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=K.join(this.cwd,Ht.fileName),s=`${JSON.stringify(e,null,this.manifest.indent)} +`;await le.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function pwt({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,C=[],S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=new Map(t.workspaces.map(ce=>{let me=ce.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[me,WB(pe)]})),W=()=>{let ce=le.mktempSync(),me=K.join(ce,"stacktrace.log"),pe=String(C.length+1).length,Be=C.map((Ce,g)=>`${`${g+1}.`.padStart(pe," ")} ${cl(Ce)} +`).join("");throw le.writeFileSync(me,Be),le.detachTemp(ce),new Yt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${ue.fromPortablePath(me)}`)},te=ce=>{let me=r.get(ce.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: The resolution should have been registered");let pe=s.get(me);if(!pe)throw new Error("Assertion failed: The package could not be found");return pe},ie=(ce,me,pe,{top:Be,optional:Ce})=>{C.length>1e3&&W(),C.push(me);let g=Ae(ce,me,pe,{top:Be,optional:Ce});return C.pop(),g},Ae=(ce,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,ye=new Map,fe=[],se=[],X=[],De=[];for(let Re of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Re.identHash)&&g.locatorHash!==Be)continue;if(Tp(Re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Re.descriptorHash);let dt=Ce;if(!dt){let ke=g.dependenciesMeta.get(cn(Re));if(typeof ke<"u"){let it=ke.get(null);typeof it<"u"&&it.optional&&(dt=!0)}}let j=r.get(Re.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ni(t.configuration,Re)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ni(t.configuration,Re)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Re,rt,new Map,{top:Be,optional:dt});continue}let Fe,Ne,Pe=new Set,Ye=new Map;fe.push(()=>{Fe=U8(Re,me.locatorHash),Ne=H8(rt,me.locatorHash),g.dependencies.set(Re.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),xp(R,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ye);for(let ke of Ne.peerDependencies.values()){let _e=Vl(ye,ke.identHash,()=>{let x=pe.get(ke.identHash)??null,w=g.dependencies.get(ke.identHash);return!w&&VB(me,ke)&&(ce.identHash===me.identHash?w=ce:(w=On(me,ce.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,me.locatorHash),h.delete(w.descriptorHash),x=null)),w||(w=On(ke,"missing:")),{subject:me,ident:ke,provided:w,root:!x,requests:new Map,hash:`p${fs(me.locatorHash,ke.identHash).slice(0,5)}`}}).provided;if(_e.range==="missing:"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ye.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(cn(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,_e),Tp(_e)){let x=r.get(_e.descriptorHash);xp(I,x).add(Ne.locatorHash)}S.set(_e.identHash,_e),_e.range==="missing:"&&Pe.add(_e.identHash)}Ne.dependencies=new Map(Ys(Ne.dependencies,([ke,it])=>cn(it)))}),X.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke=="number"&&ke>=2&&W();let it=E.get(rt.locatorHash),_e=typeof it<"u"?it+1:1;E.set(rt.locatorHash,_e),ie(Fe,Ne,Ye,{top:Be,optional:dt}),E.set(rt.locatorHash,_e-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let it=N.get(ke);if(typeof it>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let _e of ye.values()){let x=it.get(_e.ident.identHash);x&&(_e.requests.set(Fe.descriptorHash,x),p.set(_e.hash,_e),_e.root||pe.get(_e.ident.identHash)?.children.set(Fe.descriptorHash,x))}if(s.has(Ne.locatorHash))for(let _e of Pe)Ne.dependencies.delete(_e)})}for(let Re of[...fe,...se])Re();for(let Re of we){we.delete(Re);let dt=s.get(Re),j=fs(tI(dt).locatorHash,...Array.from(dt.dependencies.values(),Pe=>{let Ye=Pe.range!=="missing:"?r.get(Pe.descriptorHash):"missing:";if(typeof Ye>"u")throw new Error(`Assertion failed: Expected the resolution for ${ni(t.configuration,Pe)} to have been registered`);return Ye===Be?`${Ye} (top)`:Ye})),rt=P.get(j);if(typeof rt>"u"){P.set(j,dt);continue}let Fe=xp(R,rt.locatorHash);for(let Pe of R.get(dt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(dt.locatorHash),a.delete(dt.locatorHash),we.delete(dt.locatorHash);let Ne=I.get(dt.locatorHash);if(Ne!==void 0){let Pe=xp(I,rt.locatorHash);for(let Ye of Ne)Pe.add(Ye),we.add(Ye)}}for(let Re of[...X,...De])Re()};for(let ce of t.workspaces){let me=ce.anchoredLocator;h.delete(ce.anchoredDescriptor.descriptorHash),ie(ce.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let ce of p.values()){if(!ce.root)continue;let me=s.get(ce.subject.locatorHash);if(typeof me>"u")continue;for(let Be of ce.requests.values()){let Ce=`p${fs(ce.subject.locatorHash,cn(ce.ident),Be.requester.locatorHash).slice(0,5)}`;c.set(Ce,{subject:ce.subject.locatorHash,requested:ce.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(XB(Be),g=>g.requester.locatorHash)})}let pe=[...XB(ce)];if(ce.provided.range!=="missing:"){let Be=te(ce.provided),Ce=Be.version??"0.0.0",g=ye=>{if(ye.startsWith(Ei.protocol)){if(!t.tryWorkspaceByLocator(Be))return null;ye=ye.slice(Ei.protocol.length),(ye==="^"||ye==="~")&&(ye="*")}return ye},we=!0;for(let ye of pe){let fe=g(ye.descriptor.range);if(fe===null){we=!1;continue}if(!eA(Ce,fe)){we=!1;let se=`p${fs(ce.subject.locatorHash,cn(ce.ident),ye.requester.locatorHash).slice(0,5)}`;f.push({type:1,subject:me,requested:ce.ident,requester:ye.requester,version:Ce,hash:se,requirementCount:pe.length})}}if(!we){let ye=pe.map(fe=>g(fe.descriptor.range));f.push({type:3,node:ce,range:ye.includes(null)?null:G8(ye),hash:ce.hash})}}else{let Be=!0;for(let Ce of pe)if(!Ce.meta?.optional){Be=!1;let g=`p${fs(ce.subject.locatorHash,cn(ce.ident),Ce.requester.locatorHash).slice(0,5)}`;f.push({type:0,subject:me,requested:ce.ident,requester:Ce.requester,hash:g})}Be||f.push({type:2,node:ce,hash:ce.hash})}}}function*hwt(t){let e=new Map;if("children"in t)e.set(t,t);else for(let r of t.requests.values())e.set(r,r);for(let[r,s]of e){yield{request:r,root:s};for(let a of r.children.values())e.has(a)||e.set(a,s)}}function gwt(t,e){let r=[],s=[],a=!1;for(let n of t.peerWarnings)if(!(n.type===1||n.type===0)){if(!t.tryWorkspaceByLocator(n.node.subject)){a=!0;continue}if(n.type===3){let c=t.storedResolutions.get(n.node.provided.descriptorHash);if(typeof c>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let f=t.storedPackages.get(c);if(typeof f>"u")throw new Error("Assertion failed: Expected the package to be registered");let p=A0(hwt(n.node),({request:C,root:S})=>eA(f.version??"0.0.0",C.descriptor.range)?A0.skip:C===S?es(t.configuration,C.requester):`${es(t.configuration,C.requester)} (via ${es(t.configuration,S.requester)})`),h=[...XB(n.node)].length>1?"and other dependencies request":"requests",E=n.range?nI(t.configuration,n.range):Ut(t.configuration,"but they have non-overlapping ranges!","redBright");r.push(`${es(t.configuration,n.node.ident)} is listed by your project with version ${zB(t.configuration,f.version??"0.0.0")} (${Ut(t.configuration,n.hash,pt.CODE)}), which doesn't satisfy what ${p} ${h} (${E}).`)}if(n.type===2){let c=n.node.requests.size>1?" and other dependencies":"";s.push(`${Yr(t.configuration,n.node.subject)} doesn't provide ${es(t.configuration,n.node.ident)} (${Ut(t.configuration,n.hash,pt.CODE)}), requested by ${es(t.configuration,n.node.requests.values().next().value.requester)}${c}.`)}}e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met by your project; run ${Ut(t.configuration,"yarn explain peer-requirements ",pt.CODE)} for details, where ${Ut(t.configuration,"",pt.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of Ys(r,c=>VE.default(c)))e.reportWarning(60,n);for(let n of Ys(s,c=>VE.default(c)))e.reportWarning(2,n)}),a&&e.reportWarning(86,`Some peer dependencies are incorrectly met by dependencies; run ${Ut(t.configuration,"yarn explain peer-requirements",pt.CODE)} for details.`)}var qR,GR,WR,KCe,wG,CG,BG,YR,lwt,cwt,YCe,uwt,fwt,Awt,ec,IG,VR,VCe,Tt,JCe=Ct(()=>{bt();bt();Bc();Wt();qR=Ie("crypto");fG();GR=et(mG()),WR=et(Od()),KCe=et(Ai()),wG=Ie("util"),CG=et(Ie("v8")),BG=et(Ie("zlib"));rG();dv();nG();iG();sI();J8();Fc();GCe();xv();yG();$d();EG();NQ();Qc();E0();kc();pT();g6();Np();Yo();YR=WE(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),lwt=3,cwt=/ *, */g,YCe=/\/$/,uwt=32,fwt=(0,wG.promisify)(BG.default.gzip),Awt=(0,wG.promisify)(BG.default.gunzip),ec=(r=>(r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build",r))(ec||{}),IG={restoreLinkersCustomData:["linkersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["skippedBuilds","storedBuildState"]},VR=(a=>(a[a.NotProvided=0]="NotProvided",a[a.NotCompatible=1]="NotCompatible",a[a.NodeNotProvided=2]="NodeNotProvided",a[a.NodeNotCompatible=3]="NodeNotCompatible",a))(VR||{}),VCe=t=>fs(`${lwt}`,t),Tt=class t{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.peerRequirementNodes=new Map;this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new nt(`No project found in ${r}`);let s=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,le.existsSync(K.join(n,Er.manifest))){s=n;break}a=K.dirname(n)}let c=new t(e.projectCwd,{configuration:e});ze.telemetry?.reportProject(c.cwd),await c.setupResolutions(),await c.setupWorkspaces(),ze.telemetry?.reportWorkspaceCount(c.workspaces.length),ze.telemetry?.reportDependencyCount(c.workspaces.reduce((I,R)=>I+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let f=c.tryWorkspaceByCwd(s);if(f)return{project:c,workspace:f,locator:f.anchoredLocator};let p=await c.findLocatorForLocation(`${s}/`,{strict:!0});if(p)return{project:c,locator:p,workspace:null};let h=Ut(e,c.cwd,pt.PATH),E=Ut(e,K.relative(c.cwd,s),pt.PATH),C=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,S=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,P=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new nt(`The nearest package directory (${Ut(e,s,pt.PATH)}) doesn't seem to be part of the project declared in ${Ut(e,c.cwd,pt.PATH)}. + +${[C,S,P].join(` +`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=K.join(this.cwd,Er.lockfile),r=this.configuration.get("defaultLanguageName");if(le.existsSync(e)){let s=await le.readFilePromise(e,"utf8");this.lockFileChecksum=VCe(s);let a=cs(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Rp(p.resolution,!0),E=new Ht;E.load(p,{yamlCompatibilityMode:!0});let C=E.version,S=E.languageName||r,P=p.linkType.toUpperCase(),I=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let Ae=typeof c<"u"&&!p.checksum.includes("/")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,Ae)}let ie={...h,version:C,languageName:S,linkType:P,conditions:I,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:te};this.originalPackages.set(ie.locatorHash,ie);for(let Ae of f.split(cwt)){let ce=I0(Ae);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=On(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}else s.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,WR.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new ZI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${es(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){K.isAbsolute(e)||(e=K.resolve(this.cwd,e)),e=K.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let s of this.workspaces)K.relative(s.cwd,e).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${es(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Ei.protocol)){let s=e.range.slice(Ei.protocol.length);if(s!=="^"&&s!=="~"&&s!=="*"&&!ul(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(Tp(e)&&(e=YB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ni(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=tI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<"u"&&!s.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)Tp(s)&&e.dependencies.set(r,YB(s))}getDependencyMeta(e,r){let s={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(cn(e));if(!n)return s;let c=n.get(null);if(c&&Object.assign(s,c),r===null||!KCe.default.valid(r))return s;for(let[f,p]of n)f!==null&&f===r&&Object.assign(s,p);return s}async findLocatorForLocation(e,{strict:r=!1}={}){let s=new Yi,a=this.configuration.getLinkers(),n={project:this,report:s};for(let c of a){let f=await c.findPackageLocator(e,n);if(f){if(r&&(await c.findPackageLocation(f,n)).replace(YCe,"")!==e.replace(YCe,""))continue;return f}}return null}async loadUserConfig(){let e=K.join(this.cwd,".pnp.cjs");await le.existsPromise(e)&&kp(e).setup();let r=K.join(this.cwd,"yarn.config.cjs");return await le.existsPromise(r)?kp(r):null}async preparePackage(e,{resolver:r,resolveOptions:s}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[c,f]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,f,this,n,f,{resolver:r,resolveOptions:s});if(!VB(f,p))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let h=r.bindDescriptor(p,n,s);n.dependencies.set(c,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),s=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new KI(a);await n.setup(this,{report:e.report});let c=e.lockfileOnly?[new jR(a)]:[n,a],f=new em([new JI(a),...c]),p=new em([...c]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:f}:{project:this,report:e.report,resolver:f,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},C=new Map,S=new Map,P=new Map,I=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,W=new Set,te=[],ie=Sj(),Ae=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(ho.progressViaTitle(),async se=>{let X=async rt=>{let Fe=await qE(async()=>await f.resolve(rt,E),ke=>`${Yr(this.configuration,rt)}: ${ke}`);if(!KB(rt,Fe))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${Yr(this.configuration,rt)} to ${Yr(this.configuration,Fe)})`);I.set(Fe.locatorHash,Fe),!r.delete(Fe.locatorHash)&&!this.tryWorkspaceByLocator(Fe)&&s.push(Fe);let Pe=await this.preparePackage(Fe,{resolver:f,resolveOptions:E}),Ye=Uu([...Pe.dependencies.values()].map(ke=>j(ke)));return te.push(Ye),Ye.catch(()=>{}),S.set(Pe.locatorHash,Pe),Pe},De=async rt=>{let Fe=R.get(rt.locatorHash);if(typeof Fe<"u")return Fe;let Ne=Promise.resolve().then(()=>X(rt));return R.set(rt.locatorHash,Ne),Ne},Re=async(rt,Fe)=>{let Ne=await j(Fe);return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,Ne.locatorHash),Ne},dt=async rt=>{se.setTitle(ni(this.configuration,rt));let Fe=this.resolutionAliases.get(rt.descriptorHash);if(typeof Fe<"u")return Re(rt,this.storedDescriptors.get(Fe));let Ne=f.getResolutionDependencies(rt,E),Pe=Object.fromEntries(await Uu(Object.entries(Ne).map(async([it,_e])=>{let x=f.bindDescriptor(_e,U,E),w=await j(x);return W.add(w.locatorHash),[it,w]}))),ke=(await qE(async()=>await f.getCandidates(rt,Pe,E),it=>`${ni(this.configuration,rt)}: ${it}`))[0];if(typeof ke>"u")throw new Yt(82,`${ni(this.configuration,rt)}: No candidates found`);if(e.checkResolutions){let{locators:it}=await p.getSatisfying(rt,Pe,[ke],{...E,resolver:p});if(!it.find(_e=>_e.locatorHash===ke.locatorHash))throw new Yt(78,`Invalid resolution ${jB(this.configuration,rt,ke)}`)}return C.set(rt.descriptorHash,rt),P.set(rt.descriptorHash,ke.locatorHash),De(ke)},j=rt=>{let Fe=N.get(rt.descriptorHash);if(typeof Fe<"u")return Fe;C.set(rt.descriptorHash,rt);let Ne=Promise.resolve().then(()=>dt(rt));return N.set(rt.descriptorHash,Ne),Ne};for(let rt of this.workspaces){let Fe=rt.anchoredDescriptor;te.push(j(Fe))}for(;te.length>0;){let rt=[...te];te.length=0,await Uu(rt)}});let ce=Yl(r.values(),se=>this.tryWorkspaceByLocator(se)?Yl.skip:se);if(s.length>0||ce.length>0){let se=new Set(this.workspaces.flatMap(rt=>{let Fe=S.get(rt.anchoredLocator.locatorHash);if(!Fe)throw new Error("Assertion failed: The workspace should have been resolved");return Array.from(Fe.dependencies.values(),Ne=>{let Pe=P.get(Ne.descriptorHash);if(!Pe)throw new Error("Assertion failed: The resolution should have been registered");return Pe})})),X=rt=>se.has(rt.locatorHash)?"0":"1",De=rt=>cl(rt),Re=Ys(s,[X,De]),dt=Ys(ce,[X,De]),j=e.report.getRecommendedLength();Re.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"+",pt.ADDED)} ${Zk(this.configuration,Re,j)}`),dt.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"-",pt.REMOVED)} ${Zk(this.configuration,dt,j)}`)}let me=new Set(this.resolutionAliases.values()),pe=new Set(S.keys()),Be=new Set,Ce=new Map,g=[],we=new Map;pwt({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:pe,peerRequirements:Ce,peerWarnings:g,peerRequirementNodes:we,allDescriptors:C,allResolutions:P,allPackages:S});for(let se of W)pe.delete(se);for(let se of me)C.delete(se),P.delete(se);let ye=new Set,fe=new Set;for(let se of S.values())se.conditions!=null&&pe.has(se.locatorHash)&&(kQ(se,Ae)||(kQ(se,ie)&&e.report.reportWarningOnce(77,`${Yr(this.configuration,se)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ut(this.configuration,"supportedArchitectures",pt.SETTING)} setting`),fe.add(se.locatorHash)),ye.add(se.locatorHash));this.storedResolutions=P,this.storedDescriptors=C,this.storedPackages=S,this.accessibleLocators=Be,this.conditionalLocators=ye,this.disabledLocators=fe,this.originalPackages=I,this.optionalBuilds=pe,this.peerRequirements=Ce,this.peerWarnings=g,this.peerRequirementNodes=we}async fetchEverything({cache:e,report:r,fetcher:s,mode:a,persistProject:n=!0}){let c={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},f=s||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:f,report:r,cacheOptions:c},h=Array.from(new Set(Ys(this.storedResolutions.values(),[I=>{let R=this.storedPackages.get(I);if(!R)throw new Error("Assertion failed: The locator should have been registered");return cl(R)}])));a==="update-lockfile"&&(h=h.filter(I=>!this.storedChecksums.has(I)));let E=!1,C=ho.progressViaCounter(h.length);await r.reportProgress(C);let S=(0,WR.default)(uwt);if(await Uu(h.map(I=>S(async()=>{let R=this.storedPackages.get(I);if(!R)throw new Error("Assertion failed: The locator should have been registered");if(Gu(R))return;let N;try{N=await f.fetch(R,p)}catch(U){U.message=`${Yr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{C.tick()}))),E)throw E;let P=n&&a!=="update-lockfile"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||P){let R=(await Promise.all([...r.cacheMisses].map(async ce=>{let me=this.storedPackages.get(ce),pe=this.storedChecksums.get(ce)??null,Be=e.getLocatorPath(me,pe);return(await le.statPromise(Be)).size}))).reduce((ce,me)=>ce+me,0)-(P?.size??0),N=r.cacheMisses.size,U=P?.count??0,W=`${Gk(N,{zero:"No new packages",one:"A package was",more:`${Ut(this.configuration,N,pt.NUMBER)} packages were`})} added to the project`,te=`${Gk(U,{zero:"none were",one:"one was",more:`${Ut(this.configuration,U,pt.NUMBER)} were`})} removed`,ie=R!==0?` (${Ut(this.configuration,R,pt.SIZE_DIFF)})`:"",Ae=U>0?N>0?`${W}, and ${te}${ie}.`:`${W}, but ${te}${ie}.`:`${W}${ie}.`;r.reportInfo(13,Ae)}}async linkEverything({cache:e,report:r,fetcher:s,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},c=s||this.configuration.makeFetcher(),f={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(ye=>{let fe=ye.makeInstaller(h),se=ye.getCustomDataKey(),X=this.linkersCustomData.get(se);return typeof X<"u"&&fe.attachCustomData(X),[ye,fe]})),C=new Map,S=new Map,P=new Map,I=new Map(await Uu([...this.accessibleLocators].map(async ye=>{let fe=this.storedPackages.get(ye);if(!fe)throw new Error("Assertion failed: The locator should have been registered");return[ye,await c.fetch(fe,f)]}))),R=[],N=new Set,U=[];for(let ye of this.accessibleLocators){let fe=this.storedPackages.get(ye);if(typeof fe>"u")throw new Error("Assertion failed: The locator should have been registered");let se=I.get(fe.locatorHash);if(typeof se>"u")throw new Error("Assertion failed: The fetch result should have been registered");let X=[],De=dt=>{X.push(dt)},Re=this.tryWorkspaceByLocator(fe);if(Re!==null){let dt=[],{scripts:j}=Re.manifest;for(let Fe of["preinstall","install","postinstall"])j.has(Fe)&&dt.push({type:0,script:Fe});try{for(let[Fe,Ne]of E)if(Fe.supportsPackage(fe,h)&&(await Ne.installPackage(fe,se,{holdFetchResult:De})).buildRequest!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).catch(()=>{}).then(()=>{se.releaseFs?.()}))}let rt=K.join(se.packageFs.getRealPath(),se.prefixPath);S.set(fe.locatorHash,rt),!Gu(fe)&&dt.length>0&&P.set(fe.locatorHash,{buildDirectives:dt,buildLocations:[rt]})}else{let dt=p.find(Fe=>Fe.supportsPackage(fe,h));if(!dt)throw new Yt(12,`${Yr(this.configuration,fe)} isn't supported by any available linker`);let j=E.get(dt);if(!j)throw new Error("Assertion failed: The installer should have been registered");let rt;try{rt=await j.installPackage(fe,se,{holdFetchResult:De})}finally{X.length===0?se.releaseFs?.():R.push(Uu(X).then(()=>{}).then(()=>{se.releaseFs?.()}))}C.set(fe.locatorHash,dt),S.set(fe.locatorHash,rt.packageLocation),rt.buildRequest&&rt.packageLocation&&(rt.buildRequest.skipped?(N.add(fe.locatorHash),this.skippedBuilds.has(fe.locatorHash)||U.push([fe,rt.buildRequest.explain])):P.set(fe.locatorHash,{buildDirectives:rt.buildRequest.directives,buildLocations:[rt.packageLocation]}))}}let W=new Map;for(let ye of this.accessibleLocators){let fe=this.storedPackages.get(ye);if(!fe)throw new Error("Assertion failed: The locator should have been registered");let se=this.tryWorkspaceByLocator(fe)!==null,X=async(De,Re)=>{let dt=S.get(fe.locatorHash);if(typeof dt>"u")throw new Error(`Assertion failed: The package (${Yr(this.configuration,fe)}) should have been registered`);let j=[];for(let rt of fe.dependencies.values()){let Fe=this.storedResolutions.get(rt.descriptorHash);if(typeof Fe>"u")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,rt)}, from ${Yr(this.configuration,fe)})should have been registered`);let Ne=this.storedPackages.get(Fe);if(typeof Ne>"u")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);let Pe=this.tryWorkspaceByLocator(Ne)===null?C.get(Fe):null;if(typeof Pe>"u")throw new Error(`Assertion failed: The package (${Fe}, resolved from ${ni(this.configuration,rt)}) should have been registered`);Pe===De||Pe===null?S.get(Ne.locatorHash)!==null&&j.push([rt,Ne]):!se&&dt!==null&&LB(W,Fe).push(dt)}dt!==null&&await Re.attachInternalDependencies(fe,j)};if(se)for(let[De,Re]of E)De.supportsPackage(fe,h)&&await X(De,Re);else{let De=C.get(fe.locatorHash);if(!De)throw new Error("Assertion failed: The linker should have been found");let Re=E.get(De);if(!Re)throw new Error("Assertion failed: The installer should have been registered");await X(De,Re)}}for(let[ye,fe]of W){let se=this.storedPackages.get(ye);if(!se)throw new Error("Assertion failed: The package should have been registered");let X=C.get(se.locatorHash);if(!X)throw new Error("Assertion failed: The linker should have been found");let De=E.get(X);if(!De)throw new Error("Assertion failed: The installer should have been registered");await De.attachExternalDependents(se,fe)}let te=new Map;for(let[ye,fe]of E){let se=await fe.finalizeInstall();for(let X of se?.records??[])X.buildRequest.skipped?(N.add(X.locator.locatorHash),this.skippedBuilds.has(X.locator.locatorHash)||U.push([X.locator,X.buildRequest.explain])):P.set(X.locator.locatorHash,{buildDirectives:X.buildRequest.directives,buildLocations:X.buildLocations});typeof se?.customData<"u"&&te.set(ye.getCustomDataKey(),se.customData)}if(this.linkersCustomData=te,await Uu(R),a==="skip-build")return;for(let[,ye]of Ys(U,([fe])=>cl(fe)))ye(r);let ie=new Set(P.keys()),Ae=(0,qR.createHash)("sha512");Ae.update(process.versions.node),await this.configuration.triggerHook(ye=>ye.globalHashGeneration,this,ye=>{Ae.update("\0"),Ae.update(ye)});let ce=Ae.digest("hex"),me=new Map,pe=ye=>{let fe=me.get(ye.locatorHash);if(typeof fe<"u")return fe;let se=this.storedPackages.get(ye.locatorHash);if(typeof se>"u")throw new Error("Assertion failed: The package should have been registered");let X=(0,qR.createHash)("sha512");X.update(ye.locatorHash),me.set(ye.locatorHash,"");for(let De of se.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(typeof Re>"u")throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);let dt=this.storedPackages.get(Re);if(typeof dt>"u")throw new Error("Assertion failed: The package should have been registered");X.update(pe(dt))}return fe=X.digest("hex"),me.set(ye.locatorHash,fe),fe},Be=(ye,fe)=>{let se=(0,qR.createHash)("sha512");se.update(ce),se.update(pe(ye));for(let X of fe)se.update(X);return se.digest("hex")},Ce=new Map,g=!1,we=ye=>{let fe=new Set([ye.locatorHash]);for(let se of fe){let X=this.storedPackages.get(se);if(!X)throw new Error("Assertion failed: The package should have been registered");for(let De of X.dependencies.values()){let Re=this.storedResolutions.get(De.descriptorHash);if(!Re)throw new Error(`Assertion failed: The resolution (${ni(this.configuration,De)}) should have been registered`);if(Re!==ye.locatorHash&&ie.has(Re))return!1;let dt=this.storedPackages.get(Re);if(!dt)throw new Error("Assertion failed: The package should have been registered");let j=this.tryWorkspaceByLocator(dt);if(j){if(j.anchoredLocator.locatorHash!==ye.locatorHash&&ie.has(j.anchoredLocator.locatorHash))return!1;fe.add(j.anchoredLocator.locatorHash)}fe.add(Re)}}return!0};for(;ie.size>0;){let ye=ie.size,fe=[];for(let se of ie){let X=this.storedPackages.get(se);if(!X)throw new Error("Assertion failed: The package should have been registered");if(!we(X))continue;let De=P.get(X.locatorHash);if(!De)throw new Error("Assertion failed: The build directive should have been registered");let Re=Be(X,De.buildLocations);if(this.storedBuildState.get(X.locatorHash)===Re){Ce.set(X.locatorHash,Re),ie.delete(se);continue}g||(await this.persistInstallStateFile(),g=!0),this.storedBuildState.has(X.locatorHash)?r.reportInfo(8,`${Yr(this.configuration,X)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${Yr(this.configuration,X)} must be built because it never has been before or the last one failed`);let dt=De.buildLocations.map(async j=>{if(!K.isAbsolute(j))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${j})`);for(let rt of De.buildDirectives){let Fe=`# This file contains the result of Yarn building a package (${cl(X)}) +`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script} +`;break;case 1:Fe+=`# Script code: ${rt.script} +`;break}let Ne=null;if(!await le.mktempPromise(async Ye=>{let ke=K.join(Ye,"build.log"),{stdout:it,stderr:_e}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,X),report:r}),x;try{switch(rt.type){case 0:x=await OT(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break;case 1:x=await f6(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:_e});break}}catch(y){_e.write(y.stack),x=1}if(it.end(),_e.end(),x===0)return!0;le.detachTemp(Ye);let w=`${Yr(this.configuration,X)} couldn't be built successfully (exit code ${Ut(this.configuration,x,pt.NUMBER)}, logs can be found here: ${Ut(this.configuration,ke,pt.PATH)})`,b=this.optionalBuilds.has(X.locatorHash);return b?r.reportInfo(9,w):r.reportError(9,w),Wme&&r.reportFold(ue.fromPortablePath(ke),le.readFileSync(ke,"utf8")),b}))return!1}return!0});fe.push(...dt,Promise.allSettled(dt).then(j=>{ie.delete(se),j.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ce.set(X.locatorHash,Re)}))}if(await Uu(fe),ye===ie.size){let se=Array.from(ie).map(X=>{let De=this.storedPackages.get(X);if(!De)throw new Error("Assertion failed: The package should have been registered");return Yr(this.configuration,De)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,C]of E)for(let S of C)S.status="inactive";let n=K.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await le.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Yt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{gwt(this,e.report);for(let[,E]of a)for(let[,C]of E)for(let S of C)if(S.userProvided){let P=Ut(this.configuration,S,pt.PACKAGE_EXTENSION);switch(S.status){case"inactive":e.report.reportWarning(68,`${P}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${P}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=yd(c,this.generateLockfile());if(E!==c){let C=uCe(n,n,c,E,void 0,void 0,{maxEditLength:100});if(C){e.report.reportSeparator();for(let S of C.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let P of S.lines)P.startsWith("+")?e.report.reportError(28,Ut(this.configuration,P,pt.ADDED)):P.startsWith("-")?e.report.reportError(28,Ut(this.configuration,P,pt.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,P,"grey"))}e.report.reportSeparator()}throw new Yt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,C]of E)for(let S of C)S.userProvided&&S.status==="active"&&ze.telemetry?.reportPackageExtension(Jd(S,pt.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(f.map(async E=>vQ(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,"mode=update-lockfile",pt.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async C=>vQ(C,{cwd:this.cwd})));for(let C=0;C{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,C)=>{e.report.reportWarning(E,C)},reportError:(E,C)=>{e.report.reportError(E,C),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,c]of this.storedResolutions.entries()){let f=e.get(c);f||e.set(c,f=new Set),f.add(n)}let r={},{cacheKey:s}=Jr.getCacheKey(this.configuration);r.__metadata={version:YR,cacheKey:s};for(let[n,c]of e.entries()){let f=this.originalPackages.get(n);if(!f)continue;let p=[];for(let C of c){let S=this.storedDescriptors.get(C);if(!S)throw new Error("Assertion failed: The descriptor should have been registered");p.push(S)}let h=p.map(C=>ll(C)).sort().join(", "),E=new Ht;E.version=f.linkType==="HARD"?f.version:"0.0.0-use.local",E.languageName=f.languageName,E.dependencies=new Map(f.dependencies),E.peerDependencies=new Map(f.peerDependencies),E.dependenciesMeta=new Map(f.dependenciesMeta),E.peerDependenciesMeta=new Map(f.peerDependenciesMeta),E.bin=new Map(f.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:f.linkType.toLowerCase(),resolution:cl(f),checksum:this.storedChecksums.get(f.locatorHash),conditions:f.conditions||void 0}}return`${[`# This file is generated by running "yarn install" inside your project. +`,`# Manual changes might be lost - proceed with caution! +`].join("")} +`+il(r)}async persistLockfile(){let e=K.join(this.cwd,Er.lockfile),r="";try{r=await le.readFilePromise(e,"utf8")}catch{}let s=this.generateLockfile(),a=yd(r,s);a!==r&&(await le.writeFilePromise(e,a),this.lockFileChecksum=VCe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(IG))e.push(...c);let r=(0,GR.default)(this,e),s=CG.default.serialize(r),a=fs(s);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await le.mkdirPromise(K.dirname(n),{recursive:!0}),await le.writeFilePromise(n,await fwt(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await Awt(await le.readFilePromise(a));n=CG.default.deserialize(c),this.installStateChecksum=fs(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,(0,GR.default)(n,IG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,GR.default)(n,IG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Yi}),await this.persistInstallStateFile()}async persist(){let e=(0,WR.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let s=new Set([".gitignore"]);if(!sH(e.cwd,this.cwd)||!await le.existsPromise(e.cwd))return null;let a=[];for(let c of await le.readdirPromise(e.cwd)){if(s.has(c))continue;let f=K.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${Ut(this.configuration,K.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(le.lstatPromise(f).then(async p=>(await le.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function dwt(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,C=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(C={},C.lastUpdate=h?t.timeNow:n,C.lastTips=f,C.blocks=h?{}:t.state.blocks,C.displayedTips=t.state.displayedTips),{nextState:C,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var XI,zCe=Ct(()=>{bt();Pv();E0();fT();kc();Np();XI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!le.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&un?eA(un,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){xp(this.values,e).add(r)}reportEnumerator(e,r){xp(this.enumerators,e).add(fs(r))}reportHit(e,r="*"){let s=n3(this.hits,e),a=Vl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return K.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),s;try{s=le.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=dwt({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{le.mkdirSync(K.dirname(r),{recursive:!0}),le.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=C=>vj(h,C,{configuration:this.configuration}).catch(()=>{});for(let[C,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let P=S;P.userId=C,P.reportType="primary";for(let N of Object.keys(P.enumerators??{}))P.enumerators[N]=P.enumerators[N].length;E(P);let I=new Map,R=20;for(let[N,U]of Object.entries(P.values))U.length>0&&I.set(N,U.slice(0,R));for(;I.size>0;){let N={};N.userId=C,N.reportType="secondary",N.metrics={};for(let[U,W]of I)N.metrics[U]=W.shift(),W.length===0&&I.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=le.readJsonSync(e)}catch{r={}}let s=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[s]=a[s]??{};for(let c of this.hits.keys()){let f=n.hits=n.hits??{},p=f[c]=f[c]??{};for(let[h,E]of this.hits.get(c))p[h]=(p[h]??0)+E}for(let c of["values","enumerators"])for(let f of this[c].keys()){let p=n[c]=n[c]??{};p[f]=[...new Set([...p[f]??[],...this[c].get(f)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),le.mkdirSync(K.dirname(e),{recursive:!0}),le.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var Xv={};Vt(Xv,{BuildDirectiveType:()=>_R,CACHE_CHECKPOINT:()=>tG,CACHE_VERSION:()=>MR,Cache:()=>Jr,Configuration:()=>ze,DEFAULT_RC_FILENAME:()=>Qj,FormatType:()=>Dde,InstallMode:()=>ec,LEGACY_PLUGINS:()=>hv,LOCKFILE_VERSION:()=>YR,LegacyMigrationResolver:()=>KI,LightReport:()=>uA,LinkType:()=>YE,LockfileResolver:()=>JI,Manifest:()=>Ht,MessageName:()=>Dr,MultiFetcher:()=>aI,PackageExtensionStatus:()=>a3,PackageExtensionType:()=>o3,PeerWarningType:()=>VR,Project:()=>Tt,Report:()=>ho,ReportError:()=>Yt,SettingsType:()=>gv,StreamReport:()=>Ot,TAG_REGEXP:()=>Up,TelemetryManager:()=>XI,ThrowReport:()=>Yi,VirtualFetcher:()=>lI,WindowsLinkType:()=>yT,Workspace:()=>ZI,WorkspaceFetcher:()=>cI,WorkspaceResolver:()=>Ei,YarnVersion:()=>un,execUtils:()=>Gr,folderUtils:()=>FQ,formatUtils:()=>he,hashUtils:()=>Nn,httpUtils:()=>An,miscUtils:()=>je,nodeUtils:()=>ps,parseMessageName:()=>zx,reportOptionDeprecations:()=>vI,scriptUtils:()=>In,semverUtils:()=>Or,stringifyMessageName:()=>Vf,structUtils:()=>q,tgzUtils:()=>gs,treeUtils:()=>Qs});var Ve=Ct(()=>{hT();NQ();Qc();E0();fT();kc();pT();g6();Np();Yo();JIe();rCe();rG();dv();dv();sCe();nG();oCe();iG();sI();Zx();K8();JCe();Fc();xv();zCe();yG();z8();Z8();$d();EG();Pv();hAe()});var rwe=L((wrr,eS)=>{"use strict";var ywt=process.env.TERM_PROGRAM==="Hyper",Ewt=process.platform==="win32",$Ce=process.platform==="linux",vG={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},ewe=Object.assign({},vG,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),twe=Object.assign({},vG,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:$Ce?"\u25B8":"\u276F",pointerSmall:$Ce?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});eS.exports=Ewt&&!ywt?ewe:twe;Reflect.defineProperty(eS.exports,"common",{enumerable:!1,value:vG});Reflect.defineProperty(eS.exports,"windows",{enumerable:!1,value:ewe});Reflect.defineProperty(eS.exports,"other",{enumerable:!1,value:twe})});var Ju=L((Brr,SG)=>{"use strict";var Iwt=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Cwt=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,nwe=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=n=>{let c=n.open=`\x1B[${n.codes[0]}m`,f=n.close=`\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(h,E)=>{h.includes(f)&&(h=h.replace(p,f+c));let C=c+h+f;return E?C.replace(/\r*\n/g,`${f}$&${c}`):C},n},r=(n,c,f)=>typeof n=="function"?n(c):n.wrap(c,f),s=(n,c)=>{if(n===""||n==null)return"";if(t.enabled===!1)return n;if(t.visible===!1)return"";let f=""+n,p=f.includes(` +`),h=c.length;for(h>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=Cwt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c=="string"?t[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!Iwt(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=rwe(),t.define=a,t};SG.exports=nwe();SG.exports.create=nwe});var $o=L(pn=>{"use strict";var wwt=Object.prototype.toString,Gc=Ju(),iwe=!1,DG=[],swe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&Gc.hasColor(t);var JR=pn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);pn.nativeType=t=>wwt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");pn.isAsyncFn=t=>pn.nativeType(t)==="asyncfunction";pn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";pn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:s=` +`+r,width:a=80}=e,n=(s+r).match(/[^\S\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,"g"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>Gc.keys.color.includes(s));return e?Gc[e]:t.stack.find(s=>s.slice(2)==="bg")?Gc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s));if(e){let s=Gc["bg"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)==="bg");return r?Gc[r.slice(2).toLowerCase()]||t:Gc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>Gc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)==="bg");if(e&&!r)return Gc[swe[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=swe[s];return a&&Gc["bg"+pn.pascal(a)]||t}return Gc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+s};pn.set=(t={},e="",r)=>e.split(".").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n{let s=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!JR(t))return e;if(!JR(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&JR(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);JR(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a=="function"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{iwe||(iwe=!0,DG.forEach(a=>a()),r===!0&&process.exit(128+s))};DG.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),DG.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var owe=L(rC=>{"use strict";rC.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};rC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};rC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};rC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};rC.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var cwe=L((Drr,lwe)=>{"use strict";var awe=Ie("readline"),Bwt=owe(),vwt=/^(?:\x1b)([a-zA-Z0-9])$/,Swt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Dwt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function bwt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function Pwt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var zR=(t="",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=s.sequence||""),s.sequence=s.sequence||t||s.name,t==="\r")s.raw=void 0,s.name="return";else if(t===` +`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")s.name="backspace",s.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")s.name="escape",s.meta=t.length===2;else if(t===" "||t==="\x1B ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=vwt.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=Swt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=Dwt[n],s.shift=bwt(n)||s.shift,s.ctrl=Pwt(n)||s.ctrl}return s};zR.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=awe.createInterface({terminal:!0,input:r});awe.emitKeypressEvents(r,s);let a=(f,p)=>e(f,zR(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),s.pause(),s.close()}};zR.action=(t,e,r)=>{let s={...Bwt,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};lwe.exports=zR});var fwe=L((brr,uwe)=>{"use strict";uwe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),xwt(t,r,s)}};function xwt(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),t.once("close",()=>s.stop()),s.stop}});var pwe=L((Prr,Awe)=>{"use strict";var{define:kwt,width:Qwt}=$o(),bG=class{constructor(e){let r=e.options;kwt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Qwt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};Awe.exports=bG});var gwe=L((xrr,hwe)=>{"use strict";var PG=$o(),mo=Ju(),xG={default:mo.noop,noop:mo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||PG.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||PG.complement(this.primary)},primary:mo.cyan,success:mo.green,danger:mo.magenta,strong:mo.bold,warning:mo.yellow,muted:mo.dim,disabled:mo.gray,dark:mo.dim.gray,underline:mo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};xG.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(mo.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(mo.visible=t.styles.visible);let e=PG.merge({},xG,t.styles);delete e.merge;for(let r of Object.keys(mo))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});for(let r of Object.keys(mo.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>mo[r]});return e};hwe.exports=xG});var mwe=L((krr,dwe)=>{"use strict";var kG=process.platform==="win32",Xp=Ju(),Twt=$o(),QG={...Xp.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Xp.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:Xp.symbols.question,submitted:Xp.symbols.check,cancelled:Xp.symbols.cross},separator:{pending:Xp.symbols.pointerSmall,submitted:Xp.symbols.middot,cancelled:Xp.symbols.middot},radio:{off:kG?"( )":"\u25EF",on:kG?"(*)":"\u25C9",disabled:kG?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};QG.merge=t=>{let e=Twt.merge({},Xp.symbols,QG,t.symbols);return delete e.merge,e};dwe.exports=QG});var Ewe=L((Qrr,ywe)=>{"use strict";var Rwt=gwe(),Fwt=mwe(),Nwt=$o();ywe.exports=t=>{t.options=Nwt.merge({},t.options.theme,t.options),t.symbols=Fwt.merge(t.options),t.styles=Rwt.merge(t.options)}});var vwe=L((wwe,Bwe)=>{"use strict";var Iwe=process.env.TERM_PROGRAM==="Apple_Terminal",Owt=Ju(),TG=$o(),zu=Bwe.exports=wwe,Ui="\x1B[",Cwe="\x07",RG=!1,H0=zu.code={bell:Cwe,beep:Cwe,beginning:`${Ui}G`,down:`${Ui}J`,esc:Ui,getPosition:`${Ui}6n`,hide:`${Ui}?25l`,line:`${Ui}2K`,lineEnd:`${Ui}K`,lineStart:`${Ui}1K`,restorePosition:Ui+(Iwe?"8":"u"),savePosition:Ui+(Iwe?"7":"s"),screen:`${Ui}2J`,show:`${Ui}?25h`,up:`${Ui}1J`},Cm=zu.cursor={get hidden(){return RG},hide(){return RG=!0,H0.hide},show(){return RG=!1,H0.show},forward:(t=1)=>`${Ui}${t}C`,backward:(t=1)=>`${Ui}${t}D`,nextLine:(t=1)=>`${Ui}E`.repeat(t),prevLine:(t=1)=>`${Ui}F`.repeat(t),up:(t=1)=>t?`${Ui}${t}A`:"",down:(t=1)=>t?`${Ui}${t}B`:"",right:(t=1)=>t?`${Ui}${t}C`:"",left:(t=1)=>t?`${Ui}${t}D`:"",to(t,e){return e?`${Ui}${e+1};${t+1}H`:`${Ui}${t+1}G`},move(t=0,e=0){let r="";return r+=t<0?Cm.left(-t):t>0?Cm.right(t):"",r+=e<0?Cm.up(-e):e>0?Cm.down(e):"",r},restore(t={}){let{after:e,cursor:r,initial:s,input:a,prompt:n,size:c,value:f}=t;if(s=TG.isPrimitive(s)?String(s):"",a=TG.isPrimitive(a)?String(a):"",f=TG.isPrimitive(f)?String(f):"",c){let p=zu.cursor.up(c)+zu.cursor.to(n.length),h=a.length-r;return h>0&&(p+=zu.cursor.left(h)),p}if(f||e){let p=!a&&s?-s.length:-a.length+r;return e&&(p-=e.length),a===""&&s&&!n.includes(s)&&(p+=s.length),zu.cursor.move(p)}}},FG=zu.erase={screen:H0.screen,up:H0.up,down:H0.down,line:H0.line,lineEnd:H0.lineEnd,lineStart:H0.lineStart,lines(t){let e="";for(let r=0;r{if(!e)return FG.line+Cm.to(0);let r=n=>[...Owt.unstyle(n)].length,s=t.split(/\r?\n/),a=0;for(let n of s)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(FG.line+Cm.prevLine()).repeat(a-1)+FG.line+Cm.to(0)}});var nC=L((Trr,Dwe)=>{"use strict";var Lwt=Ie("events"),Swe=Ju(),NG=cwe(),Mwt=fwe(),_wt=pwe(),Uwt=Ewe(),hl=$o(),wm=vwe(),OG=class t extends Lwt{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,Uwt(this),Mwt(this),this.state=new _wt(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=jwt(this.options.margin),this.setMaxListeners(0),Hwt(this)}async keypress(e,r={}){this.keypressed=!0;let s=NG.action(e,NG(e,r),this.options.actions);this.state.keypress=s,this.emit("keypress",e,s),this.emit("state",this.state.clone());let a=this.options[s.action]||this[s.action]||this.dispatch;if(typeof a=="function")return await a.call(this,e,s);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(wm.code.beep)}cursorHide(){this.stdout.write(wm.cursor.hide()),hl.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(wm.cursor.show())}write(e){e&&(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(wm.cursor.down(e)+wm.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:s}=this.sections(),{cursor:a,initial:n="",input:c="",value:f=""}=this,p=this.state.size=s.length,h={after:r,cursor:a,initial:n,input:c,prompt:e,size:p,value:f},E=wm.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:s}=this.state;s=Swe.unstyle(s);let a=Swe.unstyle(e),n=a.indexOf(s),c=a.slice(0,n),p=a.slice(n).split(` +`),h=p[0],E=p[p.length-1],S=(s+(r?" "+r:"")).length,P=Se.call(this,this.value),this.result=()=>s.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let C=await this.resolve(E,n,r,s);return!C&&r&&r[e]?this.resolve(h,n,r,s):C}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,hl.isObject(e)&&(e=e[s.status]||e.pending),hl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return hl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return hl.isObject(n)&&(n=n[s.status]||n.pending),hl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?"on":"off"]||s,this.state),p=hl.hasColor(f)?f:c(f);return n?p:" ".repeat(f.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&hl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?"on":"off"]||s;return hl.hasColor(f)?f:c(f)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return hl.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return hl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||hl.height(this.stdout,25)}get width(){return this.options.columns||hl.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function Hwt(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function jwt(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?` +`:" ",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push("")}return s}Dwe.exports=OG});var xwe=L((Rrr,Pwe)=>{"use strict";var qwt=$o(),bwe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return bwe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};Pwe.exports=(t,e={})=>{let r=qwt.merge({},bwe,e.roles);return r[t]||r.default}});var tS=L((Frr,Twe)=>{"use strict";var Gwt=Ju(),Wwt=nC(),Ywt=xwe(),ZR=$o(),{reorder:LG,scrollUp:Vwt,scrollDown:Kwt,isObject:kwe,swap:Jwt}=ZR,MG=class extends Wwt{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");kwe(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let s=[],a=0,n=async(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=Ywt(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,ZR.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Gwt.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelectedr.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let s=e.parent;for(;s;){let a=s.choices.filter(n=>this.isDisabled(n));s.enabled=a.every(n=>n.enabled===!0),s=s.parent}return Qwe(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=s=>{let a=Number(s);if(a>this.choices.length-1)return this.alert();let n=this.focused,c=this.choices.find(f=>a===f.index);if(!c.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(c)===-1){let f=LG(this.choices),p=f.indexOf(c);if(n.index>p){let h=f.slice(p,p+this.limit),E=f.filter(C=>!h.includes(C));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=f.slice(h).concat(f.slice(0,h))}}return this.index=this.choices.indexOf(c),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(s=>{let a=this.choices.length,n=this.num,c=(f=!1,p)=>{clearTimeout(this.numberTimeout),f&&(p=r(n)),this.num="",s(p)};if(n==="0"||n.length===1&&+(n+"0")>a)return c(!0);if(Number(n)>a)return c(!1,this.alert());this.numberTimeout=setTimeout(()=>c(!0),this.delay)})}home(){return this.choices=LG(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=LG(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===0?this.alert():e>r&&s===0?this.scrollUp():(this.index=(s-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,s=this.index;return this.options.scroll===!1&&s===r-1?this.alert():e>r&&s===r-1?this.scrollDown():(this.index=(s+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=Vwt(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=Kwt(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){Jwt(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(s=>e[s]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(s=>!this.isDisabled(s));return e.enabled&&r.every(s=>this.isEnabled(s))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((s,a)=>(s[a]=this.find(a,r),s),{})}filter(e,r){let a=typeof e=="function"?e:(f,p)=>[f.name,p].includes(e),c=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?c.map(f=>f[r]):c}find(e,r){if(kwe(e))return r?e[r]:e;let a=typeof e=="function"?e:(c,f)=>[c.name,f].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(c=>c.newChoice))return this.alert();let{reorder:r,sort:s}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&s!==!0&&(n=ZR.reorder(n)),this.value=a?n.map(c=>c.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(s=>s.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let s=this.find(r);s&&(this.initial=s.index,this.focus(s,!0))}}}get choices(){return Qwe(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:s}=this,a=e.limit||this._limit||r.limit||s.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function Qwe(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(ZR.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let s=r.choices.filter(a=>!t.isDisabled(a));r.enabled=s.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}Twe.exports=MG});var j0=L((Nrr,Rwe)=>{"use strict";var zwt=tS(),_G=$o(),UG=class extends zwt{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let s=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!_G.hasColor(s)&&(s=this.styles.strong(s)),this.resolve(s,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||""),c=await this.resolve(e.hint,this.state,e,r);c&&!_G.hasColor(c)&&(c=this.styles.muted(c));let f=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],f+a+n,p,this.margin[1],c].filter(Boolean).join(" ");return e.role==="heading"?h():e.disabled?(_G.hasColor(p)||(p=this.styles.disabled(p)),h()):(s&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(n,c)=>await this.renderChoice(n,c)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let s=this.margin[0]+r.join(` +`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].filter(Boolean).join(` +`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,s="",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,""].join(" "),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,C].filter(Boolean).join(` +`)),this.write(this.margin[2]),this.restore()}};Rwe.exports=UG});var Nwe=L((Orr,Fwe)=>{"use strict";var Zwt=j0(),Xwt=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},HG=class extends Zwt{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:s}=this.state;return this.input=s.slice(0,r)+e+s.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Xwt(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Fwe.exports=HG});var qG=L((Lrr,Owe)=>{"use strict";var jG=$o();Owe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=jG.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,C=" ",S=h(C);if(t.blink&&t.blink.off===!0&&(h=R=>R,S=""),n&&a===0&&s===""&&r==="")return h(C);if(n&&a===0&&(r===s||r===""))return h(s[0])+f(s.slice(1));s=jG.isPrimitive(s)?`${s}`:"",r=jG.isPrimitive(r)?`${r}`:"";let P=s&&s.startsWith(r)&&s!==r,I=P?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=""),n===!1&&(I=""),P){let R=t.styles.unstyle(E+I);return E+I+f(s.slice(R.length))}return E+I}});var XR=L((Mrr,Lwe)=>{"use strict";var $wt=Ju(),e1t=j0(),t1t=qG(),GG=class extends e1t{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c="",name:f,hint:p,input:h=""}=e,{muted:E,submitted:C,primary:S,danger:P}=a,I=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align==="right"&&(W=W.padStart(this.longest+1," ")),this.align==="left"&&(W=W.padEnd(this.longest+1," "));let te=this.values[f]=h||c,ie=h?"success":"dark";await N.call(e,te,this.state)!==!0&&(ie="danger");let Ae=a[ie],ce=Ae(await this.indicator(e,r))+(e.pad||""),me=this.indent(e),pe=()=>[me,ce,W+U,h,I].filter(Boolean).join(" ");if(s.submitted)return W=$wt.unstyle(W),h=C(h),I="",pe();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=t1t(this,{input:h,initial:c,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[f]=await e.result.call(this,te,e,r)),R&&(W=S(W)),e.error?h+=(h?" ":"")+P(e.error.trim()):e.hint&&(h+=(h?" ":"")+E(e.hint.trim())),pe()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Lwe.exports=GG});var WG=L((_rr,_we)=>{"use strict";var r1t=XR(),n1t=()=>{throw new Error("expected prompt to have a custom authenticate method")},Mwe=(t=n1t)=>{class e extends r1t{constructor(s){super(s)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(s){return Mwe(s)}}return e};_we.exports=Mwe()});var jwe=L((Urr,Hwe)=>{"use strict";var i1t=WG();function s1t(t,e){return t.username===this.options.username&&t.password===this.options.password}var Uwe=(t=s1t)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(s){return this.options.showPassword?s:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(s.length))}}];class r extends i1t.create(t){constructor(a){super({...a,choices:e})}static create(a){return Uwe(a)}}return r};Hwe.exports=Uwe()});var $R=L((Hrr,qwe)=>{"use strict";var o1t=nC(),{isPrimitive:a1t,hasColor:l1t}=$o(),YG=class extends o1t{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:s}=this;return s.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return a1t(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return l1t(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=this.styles.muted(this.default),f=[s,n,c,a].filter(Boolean).join(" ");this.state.prompt=f;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),C=await this.error()||await this.hint(),S=await this.footer();C&&!f.includes(C)&&(E+=" "+C),f+=" "+E,this.clear(r),this.write([p,f,S].filter(Boolean).join(` +`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};qwe.exports=YG});var Wwe=L((jrr,Gwe)=>{"use strict";var c1t=$R(),VG=class extends c1t{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Gwe.exports=VG});var Vwe=L((qrr,Ywe)=>{"use strict";var u1t=j0(),f1t=XR(),iC=f1t.prototype,KG=class extends u1t{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():iC.dispatch.call(this,e,r)}append(e,r){return iC.append.call(this,e,r)}delete(e,r){return iC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?iC.next.call(this):super.next()}prev(){return this.focused.editable?iC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?iC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Ywe.exports=KG});var Bm=L((Grr,Kwe)=>{"use strict";var A1t=nC(),p1t=qG(),{isPrimitive:h1t}=$o(),JG=class extends A1t{constructor(e){super(e),this.initial=h1t(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.name!=="return")?this.append(` +`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),s=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=s,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):p1t(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(" ");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=" "+p),n+=" "+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(` +`)),this.restore()}};Kwe.exports=JG});var zwe=L((Wrr,Jwe)=>{"use strict";var g1t=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),eF=t=>g1t(t).filter(Boolean);Jwe.exports=(t,e={},r="")=>{let{past:s=[],present:a=""}=e,n,c;switch(t){case"prev":case"undo":return n=s.slice(0,s.length-1),c=s[s.length-1]||"",{past:eF([r,...n]),present:c};case"next":case"redo":return n=s.slice(1),c=s[0]||"",{past:eF([...n,r]),present:c};case"save":return{past:eF([...s,r]),present:""};case"remove":return c=eF(s.filter(f=>f!==r)),a="",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var ZG=L((Yrr,Xwe)=>{"use strict";var d1t=Bm(),Zwe=zwe(),zG=class extends d1t{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Zwe(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=Zwe("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};Xwe.exports=zG});var e1e=L((Vrr,$we)=>{"use strict";var m1t=Bm(),XG=class extends m1t{format(){return""}};$we.exports=XG});var r1e=L((Krr,t1e)=>{"use strict";var y1t=Bm(),$G=class extends y1t{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};t1e.exports=$G});var i1e=L((Jrr,n1e)=>{"use strict";var E1t=j0(),e5=class extends E1t{constructor(e){super({...e,multiple:!0})}};n1e.exports=e5});var r5=L((zrr,s1e)=>{"use strict";var I1t=Bm(),t5=class extends I1t{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return sthis.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};s1e.exports=t5});var a1e=L((Zrr,o1e)=>{o1e.exports=r5()});var c1e=L((Xrr,l1e)=>{"use strict";var C1t=Bm(),n5=class extends C1t{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};l1e.exports=n5});var A1e=L(($rr,f1e)=>{"use strict";var w1t=Ju(),B1t=tS(),u1e=$o(),i5=class extends B1t{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||` + `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let s=0;s=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(s=>` ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(` +`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),f=" ".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!u1e.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\s+$/,"").padEnd(this.widths[0]," "),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),C=this.margin[1]+this.margin[3];this.scaleLength=w1t.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-C.length);let P=u1e.wordWrap(h,{width:this.widths[0],newline:f}).split(` +`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),P=P.map(I=>this.styles.info(I))),P[0]+=E,this.linebreak&&P.push(""),[p+a,P.join(` +`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(" "))].join(` +`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c="";this.options.promptLine!==!1&&(c=[s,n,a,""].join(" "),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),C=await this.renderChoices(),S=await this.footer(),P=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=" "+E),e&&!p&&!C.trim()&&this.multiple&&P!=null&&(c+=this.styles.danger(P)),this.clear(r),this.write([f,c,h,C,S].filter(Boolean).join(` +`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};f1e.exports=i5});var g1e=L((enr,h1e)=>{"use strict";var p1e=Ju(),v1t=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",o5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=v1t(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},S1t=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,C=()=>n[++E],S=()=>n[E+1],P=I=>{I.line=h,c.push(I)};for(P({type:"bos",value:""});Eie.name===U.key);U.field=a.find(ie=>ie.name===U.key),te||(te=new o5(U),f.push(te)),te.lines.push(U.line-1);continue}let R=c[c.length-1];R.type==="text"&&R.line===h?R.value+=I:P({type:"text",value:I})}return P({type:"eos",value:""}),{input:n,tabstops:c,unique:s,keys:p,items:f}};h1e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await S1t(e,s),f=s5("result",t,e),p=s5("format",t,e),h=s5("validate",t,e,!0),E=t.isValue.bind(t);return async(C={},S=!1)=>{let P=0;C.required=r,C.items=n,C.keys=c,C.output="";let I=async(W,te,ie,Ae)=>{let ce=await h(W,te,ie,Ae);return ce===!1?"Invalid field "+ie.name:ce};for(let W of a){let te=W.value,ie=W.key;if(W.type!=="template"){te&&(C.output+=te);continue}if(W.type==="template"){let Ae=n.find(Ce=>Ce.name===ie);e.required===!0&&C.required.add(Ae.name);let ce=[Ae.input,C.values[Ae.value],Ae.value,te].find(E),pe=(Ae.field||{}).message||W.inner;if(S){let Ce=await I(C.values[ie],C,Ae,P);if(Ce&&typeof Ce=="string"||Ce===!1){C.invalid.set(ie,Ce);continue}C.invalid.delete(ie);let g=await f(C.values[ie],C,Ae,P);C.output+=p1e.unstyle(g);continue}Ae.placeholder=!1;let Be=te;te=await p(te,C,Ae,P),ce!==te?(C.values[ie]=ce,te=t.styles.typing(ce),C.missing.delete(pe)):(C.values[ie]=void 0,ce=`<${pe}>`,te=t.styles.primary(ce),Ae.placeholder=!0,C.required.has(ie)&&C.missing.add(pe)),C.missing.has(pe)&&C.validating&&(te=t.styles.warning(ce)),C.invalid.has(ie)&&C.validating&&(te=t.styles.danger(ce)),P===C.index&&(Be!==te?te=t.styles.underline(te):te=t.styles.heading(p1e.unstyle(te))),P++}te&&(C.output+=te)}let R=C.output.split(` +`).map(W=>" "+W),N=n.length,U=0;for(let W of n)C.invalid.has(W.name)&&W.lines.forEach(te=>{R[te][0]===" "&&(R[te]=C.styles.danger(C.symbols.bullet)+R[te].slice(1))}),t.isValue(C.values[W.name])&&U++;return C.completed=(U/N*100).toFixed(0),C.output=R.join(` +`),C.output}};function s5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]=="function"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var m1e=L((tnr,d1e)=>{"use strict";var D1t=Ju(),b1t=g1e(),P1t=nC(),a5=class extends P1t{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await b1t(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:s,size:a}=this.state,n=[this.options.newline,` +`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),C=await this.error()||"",S=await this.hint()||"",P=s?"":await this.interpolate(this.state),I=this.state.key=r[e]||"",R=await this.format(I),N=await this.footer();R&&(h+=" "+R),S&&!R&&this.state.completed===0&&(h+=" "+S),this.clear(a);let U=[E,h,P,N,C.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f="";for(let[p,h]of e)f+=`Invalid ${p}: ${h} +`;return this.state.error=f,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let c=D1t.unstyle(s).split(` +`).map(f=>f.slice(1)).join(` +`);return this.value={values:a,result:c},super.submit()}};d1e.exports=a5});var E1e=L((rnr,y1e)=>{"use strict";var x1t="(Use + to sort)",k1t=j0(),l5=class extends k1t{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,x1t].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};y1e.exports=l5});var C1e=L((nnr,I1e)=>{"use strict";var Q1t=tS(),c5=class extends Q1t{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(s=>this.styles.muted(s)),this.state.header=r.join(` + `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=T1t(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=this.term==="Hyper",n=a?9:8,c=a?"":" ",f=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+c,E=r+1+".",C=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),P=this.indent(e),I=P+e.scale.map((te,ie)=>h(ie===e.scaleIdx)).join(f),R=te=>te===e.scaleIdx?C(te):te,N=P+e.scale.map((te,ie)=>R(ie)).join(p),U=()=>[E,S].filter(Boolean).join(" "),W=()=>[U(),I,N," "].filter(Boolean).join(` +`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(` +`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(" ");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),C=await this.footer();(p||!h)&&(c+=" "+p),h&&!c.includes(h)&&(c+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,C].filter(Boolean).join(` +`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function T1t(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s{w1e.exports=ZG()});var S1e=L((snr,v1e)=>{"use strict";var R1t=$R(),u5=class extends R1t{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=s=>this.styles.primary.underline(s);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(" ");this.state.prompt=h,f&&!h.includes(f)&&(h+=" "+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(` +`)),this.write(this.margin[2]),this.restore()}};v1e.exports=u5});var b1e=L((onr,D1e)=>{"use strict";var F1t=j0(),f5=class extends F1t{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};D1e.exports=f5});var x1e=L(A5=>{"use strict";var P1e=$o(),Ts=(t,e)=>{P1e.defineExport(A5,t,e),P1e.defineExport(A5,t.toLowerCase(),e)};Ts("AutoComplete",()=>Nwe());Ts("BasicAuth",()=>jwe());Ts("Confirm",()=>Wwe());Ts("Editable",()=>Vwe());Ts("Form",()=>XR());Ts("Input",()=>ZG());Ts("Invisible",()=>e1e());Ts("List",()=>r1e());Ts("MultiSelect",()=>i1e());Ts("Numeral",()=>a1e());Ts("Password",()=>c1e());Ts("Scale",()=>A1e());Ts("Select",()=>j0());Ts("Snippet",()=>m1e());Ts("Sort",()=>E1e());Ts("Survey",()=>C1e());Ts("Text",()=>B1e());Ts("Toggle",()=>S1e());Ts("Quiz",()=>b1e())});var Q1e=L((lnr,k1e)=>{k1e.exports={ArrayPrompt:tS(),AuthPrompt:WG(),BooleanPrompt:$R(),NumberPrompt:r5(),StringPrompt:Bm()}});var nS=L((cnr,R1e)=>{"use strict";var T1e=Ie("assert"),h5=Ie("events"),q0=$o(),Zu=class extends h5{constructor(e,r){super(),this.options=q0.merge({},e),this.answers={...r}}register(e,r){if(q0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}T1e.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(q0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=q0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=q0;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];T1e(this.prompts[s],`Prompt "${s}" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",E=>{this.emit("answer",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill==="show"&&await f.submit()):p=f.value=await f.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||nC()}static get prompts(){return x1e()}static get types(){return Q1e()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return q0.mixinEmitter(e,new h5),e}};q0.mixinEmitter(Zu,new h5);var p5=Zu.prompts;for(let t of Object.keys(p5)){let e=t.toLowerCase(),r=s=>new p5[t](s).run();Zu.prompt[e]=r,Zu[e]=r,Zu[t]||Reflect.defineProperty(Zu,t,{get:()=>p5[t]})}var rS=t=>{q0.defineExport(Zu,t,()=>Zu.types[t])};rS("ArrayPrompt");rS("AuthPrompt");rS("BooleanPrompt");rS("NumberPrompt");rS("StringPrompt");R1e.exports=Zu});var aS=L((Wnr,U1e)=>{var H1t=HR();function j1t(t,e,r){var s=t==null?void 0:H1t(t,e);return s===void 0?r:s}U1e.exports=j1t});var q1e=L((Znr,j1e)=>{function q1t(t,e){for(var r=-1,s=t==null?0:t.length;++r{var G1t=Vd(),W1t=Lk();function Y1t(t,e){return t&&G1t(e,W1t(e),t)}G1e.exports=Y1t});var V1e=L(($nr,Y1e)=>{var V1t=Vd(),K1t=jE();function J1t(t,e){return t&&V1t(e,K1t(e),t)}Y1e.exports=J1t});var J1e=L((eir,K1e)=>{var z1t=Vd(),Z1t=Qk();function X1t(t,e){return z1t(t,Z1t(t),e)}K1e.exports=X1t});var I5=L((tir,z1e)=>{var $1t=kk(),e2t=jk(),t2t=Qk(),r2t=k4(),n2t=Object.getOwnPropertySymbols,i2t=n2t?function(t){for(var e=[];t;)$1t(e,t2t(t)),t=e2t(t);return e}:r2t;z1e.exports=i2t});var X1e=L((rir,Z1e)=>{var s2t=Vd(),o2t=I5();function a2t(t,e){return s2t(t,o2t(t),e)}Z1e.exports=a2t});var C5=L((nir,$1e)=>{var l2t=x4(),c2t=I5(),u2t=jE();function f2t(t){return l2t(t,u2t,c2t)}$1e.exports=f2t});var t2e=L((iir,e2e)=>{var A2t=Object.prototype,p2t=A2t.hasOwnProperty;function h2t(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&p2t.call(t,"index")&&(r.index=t.index,r.input=t.input),r}e2e.exports=h2t});var n2e=L((sir,r2e)=>{var g2t=Uk();function d2t(t,e){var r=e?g2t(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}r2e.exports=d2t});var s2e=L((oir,i2e)=>{var m2t=/\w*$/;function y2t(t){var e=new t.constructor(t.source,m2t.exec(t));return e.lastIndex=t.lastIndex,e}i2e.exports=y2t});var u2e=L((air,c2e)=>{var o2e=Gd(),a2e=o2e?o2e.prototype:void 0,l2e=a2e?a2e.valueOf:void 0;function E2t(t){return l2e?Object(l2e.call(t)):{}}c2e.exports=E2t});var A2e=L((lir,f2e)=>{var I2t=Uk(),C2t=n2e(),w2t=s2e(),B2t=u2e(),v2t=G4(),S2t="[object Boolean]",D2t="[object Date]",b2t="[object Map]",P2t="[object Number]",x2t="[object RegExp]",k2t="[object Set]",Q2t="[object String]",T2t="[object Symbol]",R2t="[object ArrayBuffer]",F2t="[object DataView]",N2t="[object Float32Array]",O2t="[object Float64Array]",L2t="[object Int8Array]",M2t="[object Int16Array]",_2t="[object Int32Array]",U2t="[object Uint8Array]",H2t="[object Uint8ClampedArray]",j2t="[object Uint16Array]",q2t="[object Uint32Array]";function G2t(t,e,r){var s=t.constructor;switch(e){case R2t:return I2t(t);case S2t:case D2t:return new s(+t);case F2t:return C2t(t,r);case N2t:case O2t:case L2t:case M2t:case _2t:case U2t:case H2t:case j2t:case q2t:return v2t(t,r);case b2t:return new s;case P2t:case Q2t:return new s(t);case x2t:return w2t(t);case k2t:return new s;case T2t:return B2t(t)}}f2e.exports=G2t});var h2e=L((cir,p2e)=>{var W2t=FB(),Y2t=zf(),V2t="[object Map]";function K2t(t){return Y2t(t)&&W2t(t)==V2t}p2e.exports=K2t});var y2e=L((uir,m2e)=>{var J2t=h2e(),z2t=Rk(),g2e=Fk(),d2e=g2e&&g2e.isMap,Z2t=d2e?z2t(d2e):J2t;m2e.exports=Z2t});var I2e=L((fir,E2e)=>{var X2t=FB(),$2t=zf(),eBt="[object Set]";function tBt(t){return $2t(t)&&X2t(t)==eBt}E2e.exports=tBt});var v2e=L((Air,B2e)=>{var rBt=I2e(),nBt=Rk(),C2e=Fk(),w2e=C2e&&C2e.isSet,iBt=w2e?nBt(w2e):rBt;B2e.exports=iBt});var w5=L((pir,P2e)=>{var sBt=Pk(),oBt=q1e(),aBt=qk(),lBt=W1e(),cBt=V1e(),uBt=q4(),fBt=Hk(),ABt=J1e(),pBt=X1e(),hBt=F4(),gBt=C5(),dBt=FB(),mBt=t2e(),yBt=A2e(),EBt=W4(),IBt=xc(),CBt=xB(),wBt=y2e(),BBt=Wl(),vBt=v2e(),SBt=Lk(),DBt=jE(),bBt=1,PBt=2,xBt=4,S2e="[object Arguments]",kBt="[object Array]",QBt="[object Boolean]",TBt="[object Date]",RBt="[object Error]",D2e="[object Function]",FBt="[object GeneratorFunction]",NBt="[object Map]",OBt="[object Number]",b2e="[object Object]",LBt="[object RegExp]",MBt="[object Set]",_Bt="[object String]",UBt="[object Symbol]",HBt="[object WeakMap]",jBt="[object ArrayBuffer]",qBt="[object DataView]",GBt="[object Float32Array]",WBt="[object Float64Array]",YBt="[object Int8Array]",VBt="[object Int16Array]",KBt="[object Int32Array]",JBt="[object Uint8Array]",zBt="[object Uint8ClampedArray]",ZBt="[object Uint16Array]",XBt="[object Uint32Array]",Ci={};Ci[S2e]=Ci[kBt]=Ci[jBt]=Ci[qBt]=Ci[QBt]=Ci[TBt]=Ci[GBt]=Ci[WBt]=Ci[YBt]=Ci[VBt]=Ci[KBt]=Ci[NBt]=Ci[OBt]=Ci[b2e]=Ci[LBt]=Ci[MBt]=Ci[_Bt]=Ci[UBt]=Ci[JBt]=Ci[zBt]=Ci[ZBt]=Ci[XBt]=!0;Ci[RBt]=Ci[D2e]=Ci[HBt]=!1;function rF(t,e,r,s,a,n){var c,f=e&bBt,p=e&PBt,h=e&xBt;if(r&&(c=a?r(t,s,a,n):r(t)),c!==void 0)return c;if(!BBt(t))return t;var E=IBt(t);if(E){if(c=mBt(t),!f)return fBt(t,c)}else{var C=dBt(t),S=C==D2e||C==FBt;if(CBt(t))return uBt(t,f);if(C==b2e||C==S2e||S&&!a){if(c=p||S?{}:EBt(t),!f)return p?pBt(t,cBt(c,t)):ABt(t,lBt(c,t))}else{if(!Ci[C])return a?t:{};c=yBt(t,C,f)}}n||(n=new sBt);var P=n.get(t);if(P)return P;n.set(t,c),vBt(t)?t.forEach(function(N){c.add(rF(N,e,r,N,t,n))}):wBt(t)&&t.forEach(function(N,U){c.set(U,rF(N,e,r,U,t,n))});var I=h?p?gBt:hBt:p?DBt:SBt,R=E?void 0:I(t);return oBt(R||t,function(N,U){R&&(U=N,N=t[U]),aBt(c,U,rF(N,e,r,U,t,n))}),c}P2e.exports=rF});var B5=L((hir,x2e)=>{var $Bt=w5(),evt=1,tvt=4;function rvt(t){return $Bt(t,evt|tvt)}x2e.exports=rvt});var v5=L((gir,k2e)=>{var nvt=hG();function ivt(t,e,r){return t==null?t:nvt(t,e,r)}k2e.exports=ivt});var N2e=L((Cir,F2e)=>{var svt=Object.prototype,ovt=svt.hasOwnProperty;function avt(t,e){return t!=null&&ovt.call(t,e)}F2e.exports=avt});var L2e=L((wir,O2e)=>{var lvt=N2e(),cvt=gG();function uvt(t,e){return t!=null&&cvt(t,e,lvt)}O2e.exports=uvt});var _2e=L((Bir,M2e)=>{function fvt(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}M2e.exports=fvt});var H2e=L((vir,U2e)=>{var Avt=HR(),pvt=s6();function hvt(t,e){return e.length<2?t:Avt(t,pvt(e,0,-1))}U2e.exports=hvt});var D5=L((Sir,j2e)=>{var gvt=Im(),dvt=_2e(),mvt=H2e(),yvt=zI();function Evt(t,e){return e=gvt(e,t),t=mvt(t,e),t==null||delete t[yvt(dvt(e))]}j2e.exports=Evt});var b5=L((Dir,q2e)=>{var Ivt=D5();function Cvt(t,e){return t==null?!0:Ivt(t,e)}q2e.exports=Cvt});var K2e=L((tsr,vvt)=>{vvt.exports={name:"@yarnpkg/cli",version:"4.9.2",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-jsr":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^4.0.0",clipanion:"^4.0.0-rc.2",semver:"^7.1.2",tslib:"^2.4.0",typanion:"^3.14.0"},devDependencies:{"@types/semver":"^7.1.0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",bin:null,exports:{".":"./lib/index.js","./package.json":"./package.json"}},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-jsr","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]}},repository:{type:"git",url:"git+https://github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=18.12.0"}}});var O5=L((Flr,oBe)=>{"use strict";oBe.exports=function(e,r){r===!0&&(r=0);var s="";if(typeof e=="string")try{s=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(s=e.protocol);var a=s.split(/\:|\+/).filter(Boolean);return typeof r=="number"?a[r]:a}});var lBe=L((Nlr,aBe)=>{"use strict";var Gvt=O5();function Wvt(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=Gvt(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}aBe.exports=Wvt});var fBe=L((Olr,uBe)=>{"use strict";var Yvt=lBe();function Vvt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Kvt=Vvt(Yvt),Jvt="text/plain",zvt="us-ascii",cBe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),Zvt=(t,{stripHash:e})=>{let r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:s,data:a,hash:n}=r.groups,c=s.split(";");n=e?"":n;let f=!1;c[c.length-1]==="base64"&&(c.pop(),f=!0);let p=(c.shift()||"").toLowerCase(),E=[...c.map(C=>{let[S,P=""]=C.split("=").map(I=>I.trim());return S==="charset"&&(P=P.toLowerCase(),P===zvt)?"":`${S}${P?`=${P}`:""}`}).filter(Boolean)];return f&&E.push("base64"),(E.length>0||p&&p!==Jvt)&&E.unshift(p),`data:${E.join(";")},${f?a.trim():a}${n?`#${n}`:""}`};function Xvt(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return Zvt(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash?a.hash="":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){let c=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,f=0,p="";for(;;){let E=c.exec(a.pathname);if(!E)break;let C=E[0],S=E.index,P=a.pathname.slice(f,S);p+=P.replace(/\/{2,}/g,"/"),p+=C,f=S+C.length}let h=a.pathname.slice(f,a.pathname.length);p+=h.replace(/\/{2,}/g,"/"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let c=a.pathname.split("/"),f=c[c.length-1];cBe(f,e.removeDirectoryIndex)&&(c=c.slice(0,-1),a.pathname=c.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let c of[...a.searchParams.keys()])cBe(c,e.removeQueryParameters)&&a.searchParams.delete(c);if(e.removeQueryParameters===!0&&(a.search=""),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname==="/"&&!n.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var L5=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,s=n=>{let c=new Error(n);throw c.subject_url=t,c};(typeof t!="string"||!t.trim())&&s("Invalid url."),t.length>L5.MAX_INPUT_LENGTH&&s("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),e&&(typeof e!="object"&&(e={stripHash:!1}),t=Xvt(t,e));let a=Kvt.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=["ssh"],a.protocol="ssh",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):s("URL parsing failed.")}return a};L5.MAX_INPUT_LENGTH=2048;uBe.exports=L5});var hBe=L((Llr,pBe)=>{"use strict";var $vt=O5();function ABe(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=$vt(t);if(t=t.substring(t.indexOf("://")+3),ABe(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@"){"use strict";var eSt=fBe(),gBe=hBe();function tSt(t){var e=eSt(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),gBe(e.protocols)||e.protocols.length===0&&gBe(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}dBe.exports=tSt});var EBe=L((_lr,yBe)=>{"use strict";var rSt=mBe();function M5(t){if(typeof t!="string")throw new Error("The url must be a string.");var e=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;e.test(t)&&(t="https://github.com/"+t);var r=rSt(t),s=r.resource.split("."),a=null;switch(r.toString=function(N){return M5.stringify(this,N)},r.source=s.length>2?s.slice(1-s.length).join("."):r.source=r.resource,r.git_suffix=/\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),r.owner=decodeURIComponent(r.user),r.source){case"git.cloudforge.com":r.owner=r.user,r.organization=s[0],r.source="cloudforge.com";break;case"visualstudio.com":if(r.resource==="vs-ssh.visualstudio.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+"/"+a[3]);break}else{a=r.name.split("/"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name);break}case"dev.azure.com":case"azure.com":if(r.resource==="ssh.dev.azure.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split("/"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\/+/g,"")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,""));break}default:a=r.name.split("/");var n=a.length-1;if(a.length>=2){var c=a.indexOf("-",2),f=a.indexOf("blob",2),p=a.indexOf("tree",2),h=a.indexOf("commit",2),E=a.indexOf("src",2),C=a.indexOf("raw",2),S=a.indexOf("edit",2);n=c>0?c-1:f>0?f-1:p>0?p-1:h>0?h-1:E>0?E-1:C>0?C-1:S>0?S-1:n,r.owner=a.slice(0,n).join("/"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref="",r.filepathtype="",r.filepath="";var P=a.length>n&&a[n+1]==="-"?n+1:n;a.length>P+2&&["raw","src","blob","tree","edit"].indexOf(a[P+1])>=0&&(r.filepathtype=a[P+1],r.ref=a[P+2],a.length>P+3&&(r.filepath=a.slice(P+3).join("/"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+="/"),r.full_name+=r.name)),r.owner.startsWith("scm/")&&(r.source="bitbucket-server",r.owner=r.owner.replace("scm/",""),r.organization=r.owner,r.full_name=r.owner+"/"+r.name);var I=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,R=I.exec(r.pathname);return R!=null&&(r.source="bitbucket-server",R[1]==="users"?r.owner="~"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split("/"),a.length>1&&(["raw","browse"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join("/"))):a[1]==="commits"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+"/"+r.name,r.query.at?r.ref=r.query.at:r.ref=""),r}M5.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",s=t.user||"git",a=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+s+"@"+t.resource+r+"/"+t.full_name+a:s+"@"+t.resource+":"+t.full_name+a;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+s+"@"+t.resource+r+"/"+t.full_name+a;case"http":case"https":var n=t.token?nSt(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+n+t.resource+r+"/"+iSt(t)+a;default:return t.href}};function nSt(t){switch(t.source){case"bitbucket.org":return"x-token-auth:"+t.token+"@";default:return t.token+"@"}}function iSt(t){switch(t.source){case"bitbucket-server":return"scm/"+t.full_name;default:return""+t.full_name}}yBe.exports=M5});var NBe=L((yur,FBe)=>{var gSt=QT(),dSt=Hk(),mSt=xc(),ySt=oI(),ESt=pG(),ISt=zI(),CSt=bv();function wSt(t){return mSt(t)?gSt(t,ISt):ySt(t)?[t]:dSt(ESt(CSt(t)))}FBe.exports=wSt});function DSt(t,e){return e===1&&SSt.has(t[0])}function hS(t){let e=Array.isArray(t)?t:(0,MBe.default)(t);return e.map((s,a)=>BSt.test(s)?`[${s}]`:vSt.test(s)&&!DSt(e,a)?`.${s}`:`[${JSON.stringify(s)}]`).join("").replace(/^\./,"")}function bSt(t,e){let r=[];if(e.methodName!==null&&r.push(he.pretty(t,e.methodName,he.Type.CODE)),e.file!==null){let s=[];s.push(he.pretty(t,e.file,he.Type.PATH)),e.line!==null&&(s.push(he.pretty(t,e.line,he.Type.NUMBER)),e.column!==null&&s.push(he.pretty(t,e.column,he.Type.NUMBER))),r.push(`(${s.join(he.pretty(t,":","grey"))})`)}return r.join(" ")}function oF(t,{manifestUpdates:e,reportedErrors:r},{fix:s}={}){let a=new Map,n=new Map,c=[...r.keys()].map(f=>[f,new Map]);for(let[f,p]of[...c,...e]){let h=r.get(f)?.map(P=>({text:P,fixable:!1}))??[],E=!1,C=t.getWorkspaceByCwd(f),S=C.manifest.exportTo({});for(let[P,I]of p){if(I.size>1){let R=[...I].map(([N,U])=>{let W=he.pretty(t.configuration,N,he.Type.INSPECT),te=U.size>0?bSt(t.configuration,U.values().next().value):null;return te!==null?` +${W} at ${te}`:` +${W}`}).join("");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,P,he.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=I,N=(0,OBe.default)(S,P);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!s){let U=typeof N>"u"?`Missing field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}`:typeof R>"u"?`Extraneous field ${he.pretty(t.configuration,P,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,P,he.Type.CODE)}; expected ${he.pretty(t.configuration,R,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>"u"?(0,_Be.default)(S,P):(0,LBe.default)(S,P,R),E=!0}E&&a.set(C,S)}h.length>0&&n.set(C,h)}return{changedWorkspaces:a,remainingErrors:n}}function UBe(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\n/);f.fixable&&(p[0]=`${he.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var OBe,LBe,MBe,_Be,WC,BSt,vSt,SSt,gS=Ct(()=>{Ve();OBe=et(aS()),LBe=et(v5()),MBe=et(NBe()),_Be=et(b5()),WC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>"u")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let C of a)E.has(C)||a.delete(C);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<"u"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},BSt=/^[0-9]+$/,vSt=/^[a-zA-Z0-9_]+$/,SSt=new Set(["scripts",...Ht.allDependencies])});var HBe=L((kur,X5)=>{var PSt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs")])]))],"maplist/5":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds")])]))],"maplist/6":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es")])]))],"maplist/7":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs")])]))],"maplist/8":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")]),new t.type.Term(".",[new t.type.Var("G"),new t.type.Var("Gs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F"),new t.type.Var("G")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs"),new t.type.Var("Gs")])]))],"include/3":[new t.type.Rule(new t.type.Term("include",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("include",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("A")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("A"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("F"),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("F")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("L"),new t.type.Var("S")])]),new t.type.Term("include",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("S")])])])])]))],"exclude/3":[new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("E")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("Q")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("R"),new t.type.Var("Q")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("!",[]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("E")])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("E")])])])])])])]))],"foldl/4":[new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Var("I"),new t.type.Var("I")]),null),new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("I"),new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("I"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])])])]),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P2"),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P2")]),new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("R")])])])])]))],"select/3":[new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Xs")]),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term("select",[new t.type.Var("E"),new t.type.Var("Xs"),new t.type.Var("Ys")]))],"sum_list/2":[new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term("[]",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("sum_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("+",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"max_list/2":[new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("max_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"min_list/2":[new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("min_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("=<",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"prod_list/2":[new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term("[]",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("prod_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("*",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"last/2":[new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")]),new t.type.Var("X")]),new t.type.Term("last",[new t.type.Var("Xs"),new t.type.Var("X")]))],"prefix/2":[new t.type.Rule(new t.type.Term("prefix",[new t.type.Var("Part"),new t.type.Var("Whole")]),new t.type.Term("append",[new t.type.Var("Part"),new t.type.Var("_"),new t.type.Var("Whole")]))],"nth0/3":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth1/3":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth0/4":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth1/4":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth/5":[new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("N"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("X"),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("O"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("Y"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term(",",[new t.type.Term("is",[new t.type.Var("M"),new t.type.Term("+",[new t.type.Var("N"),new t.type.Num(1,!1)])]),new t.type.Term("nth",[new t.type.Var("M"),new t.type.Var("O"),new t.type.Var("Xs"),new t.type.Var("Y"),new t.type.Var("Ys")])]))],"length/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(!t.type.is_variable(f)&&!t.type.is_integer(f))s.throw_error(t.error.type("integer",f,n.indicator));else if(t.type.is_integer(f)&&f.value<0)s.throw_error(t.error.domain("not_less_than_zero",f,n.indicator));else{var p=new t.type.Term("length",[c,new t.type.Num(0,!1),f]);t.type.is_integer(f)&&(p=new t.type.Term(",",[p,new t.type.Term("!",[])])),s.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},"length/3":[new t.type.Rule(new t.type.Term("length",[new t.type.Term("[]",[]),new t.type.Var("N"),new t.type.Var("N")]),null),new t.type.Rule(new t.type.Term("length",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("X")]),new t.type.Var("A"),new t.type.Var("N")]),new t.type.Term(",",[new t.type.Term("succ",[new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("length",[new t.type.Var("X"),new t.type.Var("B"),new t.type.Var("N")])]))],"replicate/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(f))s.throw_error(t.error.type("integer",f,n.indicator));else if(f.value<0)s.throw_error(t.error.domain("not_less_than_zero",f,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=new t.type.Term("[]"),E=0;E0;C--)E[C].equals(E[C-1])&&E.splice(C,1);for(var S=new t.type.Term("[]"),C=E.length-1;C>=0;C--)S=new t.type.Term(".",[E[C],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,f])),a.substitution,a)])}}},"msort/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else{for(var p=[],h=c;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))s.throw_error(t.error.type("list",c,n.indicator));else{for(var E=p.sort(t.compare),C=new t.type.Term("[]"),S=E.length-1;S>=0;S--)C=new t.type.Term(".",[E[S],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,f])),a.substitution,a)])}}},"keysort/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else{for(var p=[],h,E=c;E.indicator==="./2";){if(h=E.args[0],t.type.is_variable(h)){s.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!=="-/2"){s.throw_error(t.error.type("pair",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))s.throw_error(t.error.type("list",c,n.indicator));else{for(var C=p.sort(t.compare),S=new t.type.Term("[]"),P=C.length-1;P>=0;P--)S=new t.type.Term(".",[new t.type.Term("-",[C[P],C[P].pair]),S]),delete C[P].pair;s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,f])),a.substitution,a)])}}},"take/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type("integer",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator==="./2";)E.push(C.args[0]),C=C.args[1],h--;if(h===0){for(var S=new t.type.Term("[]"),h=E.length-1;h>=0;h--)S=new t.type.Term(".",[E[h],S]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[S,p])),a.substitution,a)])}}},"drop/3":function(s,a,n){var c=n.args[0],f=n.args[1],p=n.args[2];if(t.type.is_variable(f)||t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!t.type.is_integer(c))s.throw_error(t.error.type("integer",c,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))s.throw_error(t.error.type("list",p,n.indicator));else{for(var h=c.value,E=[],C=f;h>0&&C.indicator==="./2";)E.push(C.args[0]),C=C.args[1],h--;h===0&&s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,p])),a.substitution,a)])}},"reverse/2":function(s,a,n){var c=n.args[0],f=n.args[1],p=t.type.is_instantiated_list(c),h=t.type.is_instantiated_list(f);if(t.type.is_variable(c)&&t.type.is_variable(f))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(c)&&!t.type.is_fully_list(c))s.throw_error(t.error.type("list",c,n.indicator));else if(!t.type.is_variable(f)&&!t.type.is_fully_list(f))s.throw_error(t.error.type("list",f,n.indicator));else if(!p&&!h)s.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?c:f,C=new t.type.Term("[]",[]);E.indicator==="./2";)C=new t.type.Term(".",[E.args[0],C]),E=E.args[1];s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[C,p?f:c])),a.substitution,a)])}},"list_to_set/2":function(s,a,n){var c=n.args[0],f=n.args[1];if(t.type.is_variable(c))s.throw_error(t.error.instantiation(n.indicator));else{for(var p=c,h=[];p.indicator==="./2";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))s.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!=="[]/0")s.throw_error(t.error.type("list",c,n.indicator));else{for(var E=[],C=new t.type.Term("[]",[]),S,P=0;P=0;P--)C=new t.type.Term(".",[E[P],C]);s.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[f,C])),a.substitution,a)])}}}}},r=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof X5<"u"?X5.exports=function(s){t=s,new t.type.Module("lists",e(),r)}:new t.type.Module("lists",e(),r)})(PSt)});var rve=L($r=>{"use strict";var Dm=process.platform==="win32",$5="aes-256-cbc",xSt="sha256",GBe="The current environment doesn't support interactive reading from TTY.",si=Ie("fs"),jBe=process.binding("tty_wrap").TTY,t9=Ie("child_process"),Y0=Ie("path"),r9={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},$p="none",$u,VC,qBe=!1,W0,lF,e9,kSt=0,a9="",Sm=[],cF,WBe=!1,n9=!1,dS=!1;function YBe(t){function e(r){return r.replace(/[^\w\u0080-\uFFFF]/g,function(s){return"#"+s.charCodeAt(0)+";"})}return lF.concat(function(r){var s=[];return Object.keys(r).forEach(function(a){r[a]==="boolean"?t[a]&&s.push("--"+a):r[a]==="string"&&t[a]&&s.push("--"+a,e(t[a]))}),s}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function QSt(t,e){function r(U){var W,te="",ie;for(e9=e9||Ie("os").tmpdir();;){W=Y0.join(e9,U+te);try{ie=si.openSync(W,"wx")}catch(Ae){if(Ae.code==="EEXIST"){te++;continue}else throw Ae}si.closeSync(ie);break}return W}var s,a,n,c={},f,p,h=r("readline-sync.stdout"),E=r("readline-sync.stderr"),C=r("readline-sync.exit"),S=r("readline-sync.done"),P=Ie("crypto"),I,R,N;I=P.createHash(xSt),I.update(""+process.pid+kSt+++Math.random()),N=I.digest("hex"),R=P.createDecipher($5,N),s=YBe(t),Dm?(a=process.env.ComSpec||"cmd.exe",process.env.Q='"',n=["/V:ON","/S","/C","(%Q%"+a+"%Q% /V:ON /S /C %Q%%Q%"+W0+"%Q%"+s.map(function(U){return" %Q%"+U+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+C+"%Q%%Q%) 2>%Q%"+E+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+$5+"%Q% %Q%"+N+"%Q% >%Q%"+h+"%Q% & (echo 1)>%Q%"+S+"%Q%"]):(a="/bin/sh",n=["-c",'("'+W0+'"'+s.map(function(U){return" '"+U.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+C+'") 2>"'+E+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+$5+'" "'+N+'" >"'+h+'"; echo 1 >"'+S+'"']),dS&&dS("_execFileSync",s);try{t9.spawn(a,n,e)}catch(U){c.error=new Error(U.message),c.error.method="_execFileSync - spawn",c.error.program=a,c.error.args=n}for(;si.readFileSync(S,{encoding:t.encoding}).trim()!=="1";);return(f=si.readFileSync(C,{encoding:t.encoding}).trim())==="0"?c.input=R.update(si.readFileSync(h,{encoding:"binary"}),"hex",t.encoding)+R.final(t.encoding):(p=si.readFileSync(E,{encoding:t.encoding}).trim(),c.error=new Error(GBe+(p?` +`+p:"")),c.error.method="_execFileSync",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),si.unlinkSync(h),si.unlinkSync(E),si.unlinkSync(C),si.unlinkSync(S),c}function TSt(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(W0||(Dm?process.env.PSModulePath?(W0="powershell.exe",lF=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(W0="cscript.exe",lF=["//nologo",__dirname+"\\read.cs.js"]):(W0="/bin/sh",lF=[__dirname+"/read.sh"])),Dm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),t9.execFileSync){e=YBe(t),dS&&dS("execFileSync",e);try{r.input=t9.execFileSync(W0,e,a)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(GBe+(s?` +`+s:"")),r.error.method="execFileSync",r.error.program=W0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=QSt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function i9(t){var e="",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=TSt(t);if(n.error)throw n.error;return n.input}return n9&&n9(t),function(){var n,c,f;function p(){return n||(n=process.binding("fs"),c=process.binding("constants")),n}if(typeof $p=="string")if($p=null,Dm){if(f=function(h){var E=h.replace(/^\D+/,"").split("."),C=0;return(E[0]=+E[0])&&(C+=E[0]*1e4),(E[1]=+E[1])&&(C+=E[1]*100),(E[2]=+E[2])&&(C+=E[2]),C}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),$p=process.stdin.fd,VC=process.stdin._handle;else try{$p=p().open("CONIN$",c.O_RDWR,parseInt("0666",8)),VC=new jBe($p,!0)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else{try{$u=si.openSync("\\\\.\\CON","w")}catch{}if(typeof $u!="number")try{$u=p().open("CONOUT$",c.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{$p=si.openSync("/dev/tty","r"),VC=process.stdin._handle}catch{}}else try{$p=si.openSync("/dev/tty","r"),VC=new jBe($p,!1)}catch{}if(process.stdout.isTTY)$u=process.stdout.fd;else try{$u=si.openSync("/dev/tty","w")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,C,S;cF="";function P(I){return I===qBe?!0:VC.setRawMode(I)!==0?!1:(qBe=I,!0)}if(WBe||!VC||typeof $u!="number"&&(t.display||!f)){e=a();return}if(t.display&&(si.writeSync($u,t.display),t.display=""),!t.displayOnly){if(!P(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=si.readSync($p,p,0,h)}catch(I){if(I.code!=="EOF"){P(!1),e+=a();return}}if(E>0?(C=p.toString(t.encoding,0,E),cF+=C):(C=` +`,cF+="\0"),C&&typeof(S=(C.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(C=S,n=!0),C&&(C=C.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),C&&c&&(C=C.replace(c,"")),C&&(f||(t.hideEchoBack?t.mask&&si.writeSync($u,new Array(C.length+1).join(t.mask)):si.writeSync($u,C)),e+=C),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&si.writeSync($u,` +`),P(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+` +`),t.encoding),t.displayOnly?"":a9=t.keepWhitespace||t.keyIn?e:e.trim()}function RSt(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function l9(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Js(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(r9),t.unshift(r9))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":c=c!=null?c+"":"",c&&n!=="limitMessage"&&(c=c.replace(/[\r\n]/g,"")),s[n]=c;break;case"bufferSize":!isNaN(c=parseInt(c,10))&&typeof c=="number"&&(s[n]=c);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!c;break;case"limit":case"trueValue":case"falseValue":s[n]=RSt(c,function(f){var p=typeof f;return p==="string"||p==="number"||p==="function"||f instanceof RegExp}).map(function(f){return typeof f=="string"?f.replace(/[\r\n]/g,""):f});break;case"print":case"phContent":case"preCheck":s[n]=typeof c=="function"?c:void 0;break;case"prompt":case"display":s[n]=c??"";break}})),s},{})}function s9(t,e,r){return e.some(function(s){var a=typeof s;return a==="string"?r?t===s:t.toLowerCase()===s.toLowerCase():a==="number"?parseFloat(t)===s:a==="function"?s(t):s instanceof RegExp?s.test(t):!1})}function c9(t,e){var r=Y0.normalize(Dm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=Y0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+l9(r)+"(?=\\/|\\\\|$)",Dm?"i":""),"~")}function KC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(c,f,p,h,E,C){var S;return f||typeof(S=e(E))!="string"?p:S?(h||"")+S+(C||""):""}return t.replace(s,n).replace(a,n)}function VBe(t,e,r){var s,a=[],n=-1,c=0,f="",p;function h(E,C){return C.length>3?(E.push(C[0]+"..."+C[C.length-1]),p=!0):C.length&&(E=E.concat(C)),E}return s=t.reduce(function(E,C){return E.concat((C+"").split(""))},[]).reduce(function(E,C){var S,P;return e||(C=C.toLowerCase()),S=/^\d$/.test(C)?1:/^[A-Z]$/.test(C)?2:/^[a-z]$/.test(C)?3:0,r&&S===0?f+=C:(P=C.charCodeAt(0),S&&S===n&&P===c+1?a.push(C):(E=h(E,a),a=[C],n=S),c=P),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function KBe(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function JBe(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":s=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=VBe(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f==="string"||f==="number"}),r=KBe(s,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=a9;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=Y0.basename(r):t==="cwdHome"&&(r=c9(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(c){return c.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Sm[Sm.length-n]||"")}return r}function zBe(t){var e=/^(.)-(.)$/.exec(t),r="",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s +And the length must be: $`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(P){return P==="charlist"?r.text:P==="length"?s+"..."+a:null}}),c,f,p,h,E,C,S;for(e=e||{},c=KC(e.charlist?e.charlist+"":"$",zBe),(isNaN(s=parseInt(e.min,10))||typeof s!="number")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+l9(c)+"]{"+s+","+a+"}$"),r=VBe([c],n.caseSensitive,!0),r.text=KBe(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,C=$r.question(t,n),n.limit=[C,""],n.limitMessage=p,S=$r.question(f,n);return C};function $Be(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return $r.question(t,Js({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return $Be(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return $Be(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s="",a=Js({hideEchoBack:!1,limitMessage:`$Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=c9(n,!0),s="";function h(E){E.split(/\/|\\/).reduce(function(C,S){var P=Y0.resolve(C+=S+Y0.sep);if(!si.existsSync(P))si.mkdirSync(P);else if(!si.statSync(P).isDirectory())throw new Error("Non directory already exists: "+P);return C},"")}try{if(c=si.existsSync(n),r=c?si.realpathSync(n):Y0.resolve(n),!e.hasOwnProperty("exists")&&!c||typeof e.exists=="boolean"&&e.exists!==c)return s=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(Y0.dirname(r)),si.closeSync(si.openSync(r,"w"))),r=si.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=si.statSync(r),e.isFile&&!f.isFile())return s="Not file: "+r,!1;if(e.isDirectory&&!f.isDirectory())return s="Not directory: "+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s="Size "+f.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(s=p),!1}catch(E){return s=E+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),$r.question(t,a),r};function eve(t,e){var r={},s={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=o9(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=o9(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Js({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=eve(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Js({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Js({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=eve(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Js({hideEchoBack:!1,history:!0},t,{prompt:function(){return Dm?"$>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$$ "}()}))};function tve(t,e,r){var s;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=$r.keyIn(t,Js(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}$r.keyInYN=function(t,e){return tve(t,e)};$r.keyInYNStrict=function(t,e){return tve(t,e,"yn")};$r.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),$r.keyIn(t,Js({limit:null},e,{hideEchoBack:!0,mask:""}))};$r.keyInSelect=function(t,e,r){var s=Js({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},c=49,f=` +`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+="["+E+"] "+(p+"").trim()+` +`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,f+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+` +`),s.limit=a,f+=` +`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$]: "),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return cF};function mS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return mS("print",arguments)};$r.setPrompt=function(){return mS("prompt",arguments)};$r.setEncoding=function(){return mS("encoding",arguments)};$r.setMask=function(){return mS("mask",arguments)};$r.setBufferSize=function(){return mS("bufferSize",arguments)}});var u9=L((Tur,tc)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,b,y){var F=tau_file_system.files[w];if(!F){if(y==="read")return null;F={path:w,text:"",type:b,get:function(z,Z){return Z===this.text.length||Z>this.text.length?"end_of_file":this.text.substring(Z,Z+z)},put:function(z,Z){return Z==="end_of_file"?(this.text+=z,!0):Z==="past_end_of_file"?null:(this.text=this.text.substring(0,Z)+z+this.text.substring(Z+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var Z=Math.floor(z/2);if(this.text.length<=Z)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,Z){var $=Z==="end_of_stream"?this.text.length:Math.floor(Z/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(Z/2)],0);return Z%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[w]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(w,b){for(var y;tau_user_input.buffer.length\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(w,b){return w.get_flag("char_conversion").id==="on"?b.replace(/./g,function(y){return w.get_char_conversion(y)}):b}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var b,y=0,F=0,z=0,Z=[],$=!1;if(w){var oe=this.tokens[w-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\s*$/.test(b))return null;for(;b!=="";){var xe=[],Te=!1;if(/^\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\n/,""),$=!0;continue}for(var lt in R)if(R.hasOwnProperty(lt)){var It=R[lt].exec(b);It&&xe.push({value:It[0],name:lt,matches:It})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:"lexical",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,""),z+=oe.value.length,y+=oe.value.length,oe.name){case"atom":oe.raw=oe.value,oe.value.charAt(0)==="'"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),"'"),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence"));break;case"number":oe.float=oe.value.substring(0,2)!=="0x"&&oe.value.match(/[.eE]/)!==null&&oe.value!=="0'.",oe.value=I(oe.value),oe.blank=Te;break;case"string":var qt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),qt),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence");break;case"whitespace":var ir=Z[Z.length-1];ir&&(ir.space=!0),Te=!0;continue;case"r_bracket":Z.length>0&&Z[Z.length-1].name==="l_bracket"&&(oe=Z.pop(),oe.name="atom",oe.value="{}",oe.raw="{}",oe.space=!1);break;case"r_brace":Z.length>0&&Z[Z.length-1].name==="l_brace"&&(oe=Z.pop(),oe.name="atom",oe.value="[]",oe.raw="[]",oe.space=!1);break}oe.len=y,Z.push(oe),Te=!1}var Pt=this.set_last_tokens(Z);return Pt.length===0?null:Pt};function W(w,b,y,F,z){if(!b[y])return{type:f,value:x.error.syntax(b[y-1],"expression expected",!0)};var Z;if(F==="0"){var $=b[y];switch($.name){case"number":return{type:p,len:y+1,value:new x.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var($.value)};case"string":var oe;switch(w.get_flag("double_quotes").id){case"atom":oe=new j($.value,[]);break;case"codes":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new x.type.Num(n($.value,xe),!1),oe]);break;case"chars":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new x.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case"l_paren":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],") or operator expected",!b[Pt.len])};case"l_bracket":var Pt=W(w,b,y+1,w.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new j("{}",[Pt.value]),Pt):{type:f,derived:!0,value:x.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],"} or operator expected",!b[Pt.len])}}var Te=te(w,b,y,z);return Te.type===p||Te.derived||(Te=ie(w,b,y),Te.type===p||Te.derived)?Te:{type:f,derived:!1,value:x.error.syntax(b[y],"unexpected token")}}var lt=w.__get_max_priority(),It=w.__get_next_priority(F),qt=y;if(b[y].name==="atom"&&b[y+1]&&(b[y].space||b[y+1].name!=="l_paren")){var $=b[y++],ir=w.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf("fy")>-1){var Pt=W(w,b,y,F,z);if(Pt.type!==f)return $.value==="-"&&!$.space&&x.type.is_number(Pt.value)?{value:new x.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}else if(ir&&ir.indexOf("fx")>-1){var Pt=W(w,b,y,It,z);if(Pt.type!==f)return{value:new x.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}}y=qt;var Pt=W(w,b,y,It,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name==="atom"&&w.__lookup_operator_classes(F,$.value)||b[y].name==="bar"&&w.__lookup_operator_classes(F,"|"))){var gn=It,Pr=F,ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf("xf")>-1)return{value:new x.type.Term($.value,[Pt.value]),len:++Pt.len,type:p};if(ir.indexOf("xfx")>-1){var Ir=W(w,b,y+1,gn,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(ir.indexOf("xfy")>-1){var Ir=W(w,b,y+1,Pr,z);return Ir.type===p?{value:new x.type.Term($.value,[Pt.value,Ir.value]),len:Ir.len,type:p}:(Ir.derived=!0,Ir)}else if(Pt.type!==f)for(;;){y=Pt.len;var $=b[y];if($&&$.name==="atom"&&w.__lookup_operator_classes(F,$.value)){var ir=w.__lookup_operator_classes(F,$.value);if(ir.indexOf("yf")>-1)Pt={value:new x.type.Term($.value,[Pt.value]),len:++y,type:p};else if(ir.indexOf("yfx")>-1){var Ir=W(w,b,++y,gn,z);if(Ir.type===f)return Ir.derived=!0,Ir;y=Ir.len,Pt={value:new x.type.Term($.value,[Pt.value,Ir.value]),len:y,type:p}}else break}else break}}else Z={type:f,value:x.error.syntax(b[Pt.len-1],"operator expected")};return Pt}return Pt}function te(w,b,y,F){if(!b[y]||b[y].name==="atom"&&b[y].raw==="."&&!F&&(b[y].space||!b[y+1]||b[y+1].name!=="l_paren"))return{type:f,derived:!1,value:x.error.syntax(b[y-1],"unfounded token")};var z=b[y],Z=[];if(b[y].name==="atom"&&b[y].raw!==","){if(y++,b[y-1].space)return{type:p,len:y,value:new x.type.Term(z.value,Z)};if(b[y]&&b[y].name==="l_paren"){if(b[y+1]&&b[y+1].name==="r_paren")return{type:f,derived:!0,value:x.error.syntax(b[y+1],"argument expected")};var $=W(w,b,++y,"999",!0);if($.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],"argument expected",!b[y])};for(Z.push($.value),y=$.len;b[y]&&b[y].name==="atom"&&b[y].value===",";){if($=W(w,b,y+1,"999",!0),$.type===f)return $.derived?$:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};Z.push($.value),y=$.len}if(b[y]&&b[y].name==="r_paren")y++;else return{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],", or ) expected",!b[y])}}return{type:p,len:y,value:new x.type.Term(z.value,Z)}}return{type:f,derived:!1,value:x.error.syntax(b[y],"term expected")}}function ie(w,b,y){if(!b[y])return{type:f,derived:!1,value:x.error.syntax(b[y-1],"[ expected")};if(b[y]&&b[y].name==="l_brace"){var F=W(w,b,++y,"999",!0),z=[F.value],Z=void 0;if(F.type===f)return b[y]&&b[y].name==="r_brace"?{type:p,len:y+1,value:new x.type.Term("[]",[])}:{type:f,derived:!0,value:x.error.syntax(b[y],"] expected")};for(y=F.len;b[y]&&b[y].name==="atom"&&b[y].value===",";){if(F=W(w,b,y+1,"999",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};z.push(F.value),y=F.len}var $=!1;if(b[y]&&b[y].name==="bar"){if($=!0,F=W(w,b,y+1,"999",!0),F.type===f)return F.derived?F:{type:f,derived:!0,value:x.error.syntax(b[y+1]?b[y+1]:b[y],"argument expected",!b[y+1])};Z=F.value,y=F.len}return b[y]&&b[y].name==="r_brace"?{type:p,len:y+1,value:g(z,Z)}:{type:f,derived:!0,value:x.error.syntax(b[y]?b[y]:b[y-1],$?"] expected":", or | or ] expected",!b[y])}}return{type:f,derived:!1,value:x.error.syntax(b[y],"list expected")}}function Ae(w,b,y){var F=b[y].line,z=W(w,b,y,w.__get_max_priority(),!1),Z=null,$;if(z.type!==f)if(y=z.len,b[y]&&b[y].name==="atom"&&b[y].raw===".")if(y++,x.type.is_term(z.value)){if(z.value.indicator===":-/2"?(Z=new x.type.Rule(z.value.args[0],Ce(z.value.args[1])),$={value:Z,len:y,type:p}):z.value.indicator==="-->/2"?(Z=pe(new x.type.Rule(z.value.args[0],z.value.args[1]),w),Z.body=Ce(Z.body),$={value:Z,len:y,type:x.type.is_rule(Z)?p:f}):(Z=new x.type.Rule(z.value,null),$={value:Z,len:y,type:p}),Z){var oe=Z.singleton_variables();oe.length>0&&w.throw_warning(x.warning.singleton(oe,Z.head.indicator,F))}return $}else return{type:f,value:x.error.syntax(b[y],"callable expected")};else return{type:f,value:x.error.syntax(b[y]?b[y]:b[y-1],". or operator expected")};return z}function ce(w,b,y){y=y||{},y.from=y.from?y.from:"$tau-js",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),z={},Z;F.new_text(b);var $=0,oe=F.get_tokens($);do{if(oe===null||!oe[$])break;var xe=Ae(w,oe,$);if(xe.type===f)return new j("throw",[xe.value]);if(xe.value.body===null&&xe.value.head.indicator==="?-/1"){var Te=new it(w.session);Te.add_goal(xe.value.head.args[0]),Te.answer(function(It){x.type.is_error(It)?w.throw_warning(It.args[0]):(It===!1||It===null)&&w.throw_warning(x.warning.failed_goal(xe.value.head.args[0],xe.len))}),$=xe.len;var lt=!0}else if(xe.value.body===null&&xe.value.head.indicator===":-/1"){var lt=w.run_directive(xe.value.head.args[0]);$=xe.len,xe.value.head.args[0].indicator==="char_conversion/2"&&(oe=F.get_tokens($),$=0)}else{Z=xe.value.head.indicator,y.reconsult!==!1&&z[Z]!==!0&&!w.is_multifile_predicate(Z)&&(w.session.rules[Z]=a(w.session.rules[Z]||[],function(qt){return qt.dynamic}),z[Z]=!0);var lt=w.add_rule(xe.value,y);$=xe.len}if(!lt)return lt}while(!0);return!0}function me(w,b){var y=new U(w);y.new_text(b);var F=0;do{var z=y.get_tokens(F);if(z===null)break;var Z=W(w,z,0,w.__get_max_priority(),!1);if(Z.type!==f){var $=Z.len,oe=$;if(z[$]&&z[$].name==="atom"&&z[$].raw===".")w.add_goal(Ce(Z.value));else{var xe=z[$];return new j("throw",[x.error.syntax(xe||z[$-1],". or operator expected",!xe)])}F=Z.len+1}else return new j("throw",[Z.value])}while(!0);return!0}function pe(w,b){w=w.rename(b);var y=b.next_free_variable(),F=Be(w.body,y,b);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new j(w.head.id,w.head.args),w)}function Be(w,b,y){var F;if(x.type.is_term(w)&&w.indicator==="!/0")return{value:w,variable:b,error:!1};if(x.type.is_term(w)&&w.indicator===",/2"){var z=Be(w.args[0],b,y);if(z.error)return z;var Z=Be(w.args[1],z.variable,y);return Z.error?Z:{value:new j(",",[z.value,Z.value]),variable:Z.variable,error:!1}}else{if(x.type.is_term(w)&&w.indicator==="{}/1")return{value:w.args[0],variable:b,error:!1};if(x.type.is_empty_list(w))return{value:new j("true",[]),variable:b,error:!1};if(x.type.is_list(w)){F=y.next_free_variable();for(var $=w,oe;$.indicator==="./2";)oe=$,$=$.args[1];return x.type.is_variable($)?{value:x.error.instantiation("DCG"),variable:b,error:!0}:x.type.is_empty_list($)?(oe.args[1]=F,{value:new j("=",[b,w]),variable:F,error:!1}):{value:x.error.type("list",w,"DCG"),variable:b,error:!0}}else return x.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([b,F]),w=new j(w.id,w.args),{value:w,variable:F,error:!1}):{value:x.error.type("callable",w,"DCG"),variable:b,error:!0}}}function Ce(w){return x.type.is_variable(w)?new j("call",[w]):x.type.is_term(w)&&[",/2",";/2","->/2"].indexOf(w.indicator)!==-1?new j(w.id,[Ce(w.args[0]),Ce(w.args[1])]):w}function g(w,b){for(var y=b||new x.type.Term("[]",[]),F=w.length-1;F>=0;F--)y=new x.type.Term(".",[w[F],y]);return y}function we(w,b){for(var y=w.length-1;y>=0;y--)w[y]===b&&w.splice(y,1)}function ye(w){for(var b={},y=[],F=0;F=0;b--)if(w.charAt(b)==="/")return new j("/",[new j(w.substring(0,b)),new Re(parseInt(w.substring(b+1)),!1)])}function De(w){this.id=w}function Re(w,b){this.is_float=b!==void 0?b:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var dt=0;function j(w,b,y){this.ref=y||++dt,this.id=w,this.args=b||[],this.indicator=w+"/"+this.args.length}var rt=0;function Fe(w,b,y,F,z,Z){this.id=rt++,this.stream=w,this.mode=b,this.alias=y,this.type=F!==void 0?F:"text",this.reposition=z!==void 0?z:!0,this.eof_action=Z!==void 0?Z:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function Ne(w){w=w||{},this.links=w}function Pe(w,b,y){b=b||new Ne,y=y||null,this.goal=w,this.substitution=b,this.parent=y}function Ye(w,b,y){this.head=w,this.body=b,this.dynamic=y||!1}function ke(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new it(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Fe(typeof tc<"u"&&tc.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new Fe(typeof tc<"u"&&tc.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof tc<"u"&&tc.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(b){return b.substitution},this.format_error=function(b){return b.goal},this.flag={bounded:x.flag.bounded.value,max_integer:x.flag.max_integer.value,min_integer:x.flag.min_integer.value,integer_rounding_function:x.flag.integer_rounding_function.value,char_conversion:x.flag.char_conversion.value,debug:x.flag.debug.value,max_arity:x.flag.max_arity.value,unknown:x.flag.unknown.value,double_quotes:x.flag.double_quotes.value,occurs_check:x.flag.occurs_check.value,dialect:x.flag.dialect.value,version_data:x.flag.version_data.value,nodejs:x.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function it(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function _e(w,b,y){this.id=w,this.rules=b,this.exports=y,x.module[w]=this}_e.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},De.prototype.unify=function(w,b){if(b&&e(w.variables(),this.id)!==-1&&!x.type.is_variable(w))return null;var y={};return y[this.id]=w,new Ne(y)},Re.prototype.unify=function(w,b){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new Ne:null},j.prototype.unify=function(w,b){if(x.type.is_term(w)&&this.indicator===w.indicator){for(var y=new Ne,F=0;F=0){var F=this.args[0].value,z=Math.floor(F/26),Z=F%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[Z]+(z!==0?z:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(w)+"}";case"./2":for(var $="["+this.args[0].toString(w),oe=this.args[1];oe.indicator==="./2";)$+=", "+oe.args[0].toString(w),oe=oe.args[1];return oe.indicator!=="[]/0"&&($+="|"+oe.toString(w)),$+="]",$;case",/2":return"("+this.args[0].toString(w)+", "+this.args[1].toString(w)+")";default:var xe=this.id,Te=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Te===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(xe)&&xe!=="{}"&&xe!=="[]"&&(xe="'"+P(xe)+"'"),xe+(this.args.length?"("+s(this.args,function(ir){return ir.toString(w)}).join(", ")+")":"");var lt=Te.priority>b.priority||Te.priority===b.priority&&(Te.class==="xfy"&&this.indicator!==b.indicator||Te.class==="yfx"&&this.indicator!==b.indicator||this.indicator===b.indicator&&Te.class==="yfx"&&y==="right"||this.indicator===b.indicator&&Te.class==="xfy"&&y==="left");Te.indicator=this.indicator;var It=lt?"(":"",qt=lt?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(Te.class)!==-1?It+xe+" "+this.args[0].toString(w,Te)+qt:["yf","xf"].indexOf(Te.class)!==-1?It+this.args[0].toString(w,Te)+" "+xe+qt:It+this.args[0].toString(w,Te,"left")+" "+this.id+" "+this.args[1].toString(w,Te,"right")+qt}},Fe.prototype.toString=function(w){return"("+this.id+")"},Ne.prototype.toString=function(w){var b="{";for(var y in this.links)this.links.hasOwnProperty(y)&&(b!=="{"&&(b+=", "),b+=y+"/"+this.links[y].toString(w));return b+="}",b},Pe.prototype.toString=function(w){return this.goal===null?"<"+this.substitution.toString(w)+">":"<"+this.goal.toString(w)+", "+this.substitution.toString(w)+">"},Ye.prototype.toString=function(w){return this.body?this.head.toString(w)+" :- "+this.body.toString(w)+".":this.head.toString(w)+"."},ke.prototype.toString=function(w){for(var b="",y=0;y=0;z--)F=new j(".",[b[z],F]);return F}return new j(this.id,s(this.args,function(Z){return Z.apply(w)}),this.ref)},Fe.prototype.apply=function(w){return this},Ye.prototype.apply=function(w){return new Ye(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Ne.prototype.apply=function(w){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(w));return new Ne(y)},j.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},j.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new j(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new j(",",[w,this.args[1]]):w},j.prototype.search=function(w){if(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var b=0;bb&&F0&&(b=this.head_point().substitution.domain());e(b,x.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id==="_")return new De(x.format_variable(this.session.rename));this.session.renamed_variables[w.id]=x.format_variable(this.session.rename)}return new De(this.session.renamed_variables[w.id])},ke.prototype.next_free_variable=function(){return this.thread.next_free_variable()},it.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,x.format_variable(this.session.rename))!==-1;)this.session.rename++;return new De(x.format_variable(this.session.rename))},ke.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},it.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},ke.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},it.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},ke.prototype.prepend=function(w){return this.thread.prepend(w)},it.prototype.prepend=function(w){for(var b=w.length-1;b>=0;b--)this.points.push(w[b])},ke.prototype.success=function(w,b){return this.thread.success(w,b)},it.prototype.success=function(w,y){var y=typeof y>"u"?w:y;this.prepend([new Pe(w.goal.replace(null),w.substitution,y)])},ke.prototype.throw_error=function(w){return this.thread.throw_error(w)},it.prototype.throw_error=function(w){this.prepend([new Pe(new j("throw",[w]),new Ne,null,null)])},ke.prototype.step_rule=function(w,b){return this.thread.step_rule(w,b)},it.prototype.step_rule=function(w,b){var y=b.indicator;if(w==="user"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],z=0;z1)&&this.again()},ke.prototype.answers=function(w,b,y){return this.thread.answers(w,b,y)},it.prototype.answers=function(w,b,y){var F=b||1e3,z=this;if(b<=0){y&&y();return}this.answer(function(Z){w(Z),Z!==!1?setTimeout(function(){z.answers(w,b-1,y)},1):y&&y()})},ke.prototype.again=function(w){return this.thread.again(w)},it.prototype.again=function(w){for(var b,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!x.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var z=this.__calls.shift();this.current_limit<=0?z(null):this.points.length===0?z(!1):x.type.is_error(this.head_point().goal)?(b=this.session.format_error(this.points.pop()),this.points=[],z(b)):(this.debugger&&this.debugger_states.push(this.head_point()),b=this.session.format_success(this.points.pop()),z(b))}},ke.prototype.unfold=function(w){if(w.body===null)return!1;var b=w.head,y=w.body,F=y.select(),z=new it(this),Z=[];z.add_goal(F),z.step();for(var $=z.points.length-1;$>=0;$--){var oe=z.points[$],xe=b.apply(oe.substitution),Te=y.replace(oe.goal);Te!==null&&(Te=Te.apply(oe.substitution)),Z.push(new Ye(xe,Te))}var lt=this.rules[b.indicator],It=e(lt,w);return Z.length>0&&It!==-1?(lt.splice.apply(lt,[It,1].concat(Z)),!0):!1},it.prototype.unfold=function(w){return this.session.unfold(w)},De.prototype.interpret=function(w){return x.error.instantiation(w.level)},Re.prototype.interpret=function(w){return this},j.prototype.interpret=function(w){return x.type.is_unitary_list(this)?this.args[0].interpret(w):x.operate(w,this)},De.prototype.compare=function(w){return this.idw.id?1:0},Re.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.valuew.value)return 1},j.prototype.compare=function(w){if(this.args.lengthw.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var b=0;bF)return 1;if(w.constructor===Re){if(w.is_float&&b.is_float)return 0;if(w.is_float)return-1;if(b.is_float)return 1}return 0},is_substitution:function(w){return w instanceof Ne},is_state:function(w){return w instanceof Pe},is_rule:function(w){return w instanceof Ye},is_variable:function(w){return w instanceof De},is_stream:function(w){return w instanceof Fe},is_anonymous_var:function(w){return w instanceof De&&w.id==="_"},is_callable:function(w){return w instanceof j},is_number:function(w){return w instanceof Re},is_integer:function(w){return w instanceof Re&&!w.is_float},is_float:function(w){return w instanceof Re&&w.is_float},is_term:function(w){return w instanceof j},is_atom:function(w){return w instanceof j&&w.args.length===0},is_ground:function(w){if(w instanceof De)return!1;if(w instanceof j){for(var b=0;b0},is_list:function(w){return w instanceof j&&(w.indicator==="[]/0"||w.indicator==="./2")},is_empty_list:function(w){return w instanceof j&&w.indicator==="[]/0"},is_non_empty_list:function(w){return w instanceof j&&w.indicator==="./2"},is_fully_list:function(w){for(;w instanceof j&&w.indicator==="./2";)w=w.args[1];return w instanceof De||w instanceof j&&w.indicator==="[]/0"},is_instantiated_list:function(w){for(;w instanceof j&&w.indicator==="./2";)w=w.args[1];return w instanceof j&&w.indicator==="[]/0"},is_unitary_list:function(w){return w instanceof j&&w.indicator==="./2"&&w.args[1]instanceof j&&w.args[1].indicator==="[]/0"},is_character:function(w){return w instanceof j&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Re&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof j&&x.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof j&&x.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof j&&x.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof j&&w.indicator==="throw/1"},is_predicate_indicator:function(w){return w instanceof j&&w.indicator==="//2"&&w.args[0]instanceof j&&w.args[0].args.length===0&&w.args[1]instanceof Re&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof j&&w.args.length===0&&x.flag[w.id]!==void 0},is_value_flag:function(w,b){if(!x.type.is_flag(w))return!1;for(var y in x.flag[w.id].allowed)if(x.flag[w.id].allowed.hasOwnProperty(y)&&x.flag[w.id].allowed[y].equals(b))return!0;return!1},is_io_mode:function(w){return x.type.is_atom(w)&&["read","write","append"].indexOf(w.id)!==-1},is_stream_option:function(w){return x.type.is_term(w)&&(w.indicator==="alias/1"&&x.type.is_atom(w.args[0])||w.indicator==="reposition/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="type/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary")||w.indicator==="eof_action/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))},is_stream_position:function(w){return x.type.is_integer(w)&&w.value>=0||x.type.is_atom(w)&&(w.id==="end_of_stream"||w.id==="past_end_of_stream")},is_stream_property:function(w){return x.type.is_term(w)&&(w.indicator==="input/0"||w.indicator==="output/0"||w.indicator==="alias/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator==="file_name/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0]))||w.indicator==="position/1"&&(x.type.is_variable(w.args[0])||x.type.is_stream_position(w.args[0]))||w.indicator==="reposition/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))||w.indicator==="type/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary"))||w.indicator==="mode/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="read"||w.args[0].id==="write"||w.args[0].id==="append"))||w.indicator==="eof_action/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))||w.indicator==="end_of_stream/1"&&(x.type.is_variable(w.args[0])||x.type.is_atom(w.args[0])&&(w.args[0].id==="at"||w.args[0].id==="past"||w.args[0].id==="not")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return x.type.is_term(w)&&["variables/1","variable_names/1","singletons/1"].indexOf(w.indicator)!==-1},is_write_option:function(w){return x.type.is_term(w)&&(w.indicator==="quoted/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="ignore_ops/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="numbervars/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))},is_close_option:function(w){return x.type.is_term(w)&&w.indicator==="force/1"&&x.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")},is_modifiable_flag:function(w){return x.type.is_flag(w)&&x.flag[w.id].changeable},is_module:function(w){return w instanceof j&&w.indicator==="library/1"&&w.args[0]instanceof j&&w.args[0].args.length===0&&x.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(w){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(w,b){return w}},"-/1":{type_args:null,type_result:null,fn:function(w,b){return-w}},"\\/1":{type_args:!1,type_result:!1,fn:function(w,b){return~w}},"abs/1":{type_args:null,type_result:null,fn:function(w,b){return Math.abs(w)}},"sign/1":{type_args:null,type_result:null,fn:function(w,b){return Math.sign(w)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(w,b){return w-parseInt(w)}},"float/1":{type_args:null,type_result:!0,fn:function(w,b){return parseFloat(w)}},"floor/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.floor(w)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(w,b){return parseInt(w)}},"round/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.round(w)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(w,b){return Math.ceil(w)}},"sin/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.sin(w)}},"cos/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.cos(w)}},"tan/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.tan(w)}},"asin/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.asin(w)}},"acos/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.acos(w)}},"atan/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.atan(w)}},"atan2/2":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.atan2(w,b)}},"exp/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.exp(w)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(w,b){return Math.sqrt(w)}},"log/1":{type_args:null,type_result:!0,fn:function(w,b){return w>0?Math.log(w):x.error.evaluation("undefined",b.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(w,b,y){return w+b}},"-/2":{type_args:null,type_result:null,fn:function(w,b,y){return w-b}},"*/2":{type_args:null,type_result:null,fn:function(w,b,y){return w*b}},"//2":{type_args:null,type_result:!0,fn:function(w,b,y){return b?w/b:x.error.evaluation("zero_division",y.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?parseInt(w/b):x.error.evaluation("zero_division",y.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(w,b,y){return Math.pow(w,b)}},"^/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.pow(w,b)}},"<>/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w>>b}},"/\\/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w&b}},"\\//2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w|b}},"xor/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return w^b}},"rem/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w%b:x.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(w,b,y){return b?w-parseInt(w/b)*b:x.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.max(w,b)}},"min/2":{type_args:null,type_result:null,fn:function(w,b,y){return Math.min(w,b)}}}},directive:{"dynamic/1":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_compound(y)||y.indicator!=="//2")w.throw_error(x.error.type("predicate_indicator",y,b.indicator));else if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type("atom",y.args[0],b.indicator));else if(!x.type.is_integer(y.args[1]))w.throw_error(x.error.type("integer",y.args[1],b.indicator));else{var F=b.args[0].args[0].id+"/"+b.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},"multifile/1":function(w,b){var y=b.args[0];x.type.is_variable(y)?w.throw_error(x.error.instantiation(b.indicator)):!x.type.is_compound(y)||y.indicator!=="//2"?w.throw_error(x.error.type("predicate_indicator",y,b.indicator)):x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1])?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y.args[0])?x.type.is_integer(y.args[1])?w.session.multifile_predicates[b.args[0].args[0].id+"/"+b.args[0].args[1].value]=!0:w.throw_error(x.error.type("integer",y.args[1],b.indicator)):w.throw_error(x.error.type("atom",y.args[0],b.indicator))},"set_prolog_flag/2":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_atom(y)?x.type.is_flag(y)?x.type.is_value_flag(y,F)?x.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(x.error.permission("modify","flag",y)):w.throw_error(x.error.domain("flag_value",new j("+",[y,F]),b.indicator)):w.throw_error(x.error.domain("prolog_flag",y,b.indicator)):w.throw_error(x.error.type("atom",y,b.indicator))},"use_module/1":function(w,b){var y=b.args[0];if(x.type.is_variable(y))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_term(y))w.throw_error(x.error.type("term",y,b.indicator));else if(x.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},"char_conversion/2":function(w,b){var y=b.args[0],F=b.args[1];x.type.is_variable(y)||x.type.is_variable(F)?w.throw_error(x.error.instantiation(b.indicator)):x.type.is_character(y)?x.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(x.error.type("character",F,b.indicator)):w.throw_error(x.error.type("character",y,b.indicator))},"op/3":function(w,b){var y=b.args[0],F=b.args[1],z=b.args[2];if(x.type.is_variable(y)||x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(b.indicator));else if(!x.type.is_integer(y))w.throw_error(x.error.type("integer",y,b.indicator));else if(!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,b.indicator));else if(!x.type.is_atom(z))w.throw_error(x.error.type("atom",z,b.indicator));else if(y.value<0||y.value>1200)w.throw_error(x.error.domain("operator_priority",y,b.indicator));else if(z.id===",")w.throw_error(x.error.permission("modify","operator",z,b.indicator));else if(z.id==="|"&&(y.value<1001||F.id.length!==3))w.throw_error(x.error.permission("modify","operator",z,b.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)w.throw_error(x.error.domain("operator_specifier",F,b.indicator));else{var Z={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(w.session.__operators.hasOwnProperty($)){var oe=w.session.__operators[$][z.id];oe&&(e(oe,"fx")!==-1&&(Z.prefix={priority:$,type:"fx"}),e(oe,"fy")!==-1&&(Z.prefix={priority:$,type:"fy"}),e(oe,"xf")!==-1&&(Z.postfix={priority:$,type:"xf"}),e(oe,"yf")!==-1&&(Z.postfix={priority:$,type:"yf"}),e(oe,"xfx")!==-1&&(Z.infix={priority:$,type:"xfx"}),e(oe,"xfy")!==-1&&(Z.infix={priority:$,type:"xfy"}),e(oe,"yfx")!==-1&&(Z.infix={priority:$,type:"yfx"}))}var xe;switch(F.id){case"fy":case"fx":xe="prefix";break;case"yf":case"xf":xe="postfix";break;default:xe="infix";break}if(((Z.prefix&&xe==="prefix"||Z.postfix&&xe==="postfix"||Z.infix&&xe==="infix")&&Z[xe].type!==F.id||Z.infix&&xe==="postfix"||Z.postfix&&xe==="infix")&&y.value!==0)w.throw_error(x.error.permission("create","operator",z,b.indicator));else return Z[xe]&&(we(w.session.__operators[Z[xe].priority][z.id],F.id),w.session.__operators[Z[xe].priority][z.id].length===0&&delete w.session.__operators[Z[xe].priority][z.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][z.id]||(w.session.__operators[y.value][z.id]=[]),w.session.__operators[y.value][z.id].push(F.id)),!0}}},predicate:{"op/3":function(w,b,y){x.directive["op/3"](w,y)&&w.success(b)},"current_op/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=[];for(var oe in w.session.__operators)for(var xe in w.session.__operators[oe])for(var Te=0;Te/2"){var F=w.points,z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(Te){return Te.substitution},w.session.format_error=function(Te){return Te.goal},w.points=[new Pe(y.args[0].args[0],b.substitution,b)];var $=function(Te){w.points=F,w.session.format_success=z,w.session.format_error=Z,Te===!1?w.prepend([new Pe(b.goal.replace(y.args[1]),b.substitution,b)]):x.type.is_error(Te)?w.throw_error(Te.args[0]):Te===null?(w.prepend([b]),w.__calls.shift()(null)):w.prepend([new Pe(b.goal.replace(y.args[0].args[1]).apply(Te),b.substitution.apply(Te),b)])};w.__calls.unshift($)}else{var oe=new Pe(b.goal.replace(y.args[0]),b.substitution,b),xe=new Pe(b.goal.replace(y.args[1]),b.substitution,b);w.prepend([oe,xe])}},"!/0":function(w,b,y){var F,z,Z=[];for(F=b,z=null;F.parent!==null&&F.parent.goal.search(y);)if(z=F,F=F.parent,F.goal!==null){var $=F.goal.select();if($&&$.id==="call"&&$.search(y)){F=z;break}}for(var oe=w.points.length-1;oe>=0;oe--){for(var xe=w.points[oe],Te=xe.parent;Te!==null&&Te!==F.parent;)Te=Te.parent;Te===null&&Te!==F.parent&&Z.push(xe)}w.points=Z.reverse(),w.success(b)},"\\+/1":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(w.level)):x.type.is_callable(F)?w.prepend([new Pe(b.goal.replace(new j(",",[new j(",",[new j("call",[F]),new j("!",[])]),new j("fail",[])])),b.substitution,b),new Pe(b.goal.replace(null),b.substitution,b)]):w.throw_error(x.error.type("callable",F,w.level))},"->/2":function(w,b,y){var F=b.goal.replace(new j(",",[y.args[0],new j(",",[new j("!"),y.args[1]])]));w.prepend([new Pe(F,b.substitution,b)])},"fail/0":function(w,b,y){},"false/0":function(w,b,y){},"true/0":function(w,b,y){w.success(b)},"call/1":se(1),"call/2":se(2),"call/3":se(3),"call/4":se(4),"call/5":se(5),"call/6":se(6),"call/7":se(7),"call/8":se(8),"once/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("call",[F]),new j("!",[])])),b.substitution,b)])},"forall/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("\\+",[new j(",",[new j("call",[F]),new j("\\+",[new j("call",[z])])])])),b.substitution,b)])},"repeat/0":function(w,b,y){w.prepend([new Pe(b.goal.replace(null),b.substitution,b),b])},"throw/1":function(w,b,y){x.type.is_variable(y.args[0])?w.throw_error(x.error.instantiation(w.level)):w.throw_error(y.args[0])},"catch/3":function(w,b,y){var F=w.points;w.points=[],w.prepend([new Pe(y.args[0],b.substitution,b)]);var z=w.session.format_success,Z=w.session.format_error;w.session.format_success=function(oe){return oe.substitution},w.session.format_error=function(oe){return oe.goal};var $=function(oe){var xe=w.points;if(w.points=F,w.session.format_success=z,w.session.format_error=Z,x.type.is_error(oe)){for(var Te=[],lt=w.points.length-1;lt>=0;lt--){for(var ir=w.points[lt],It=ir.parent;It!==null&&It!==b.parent;)It=It.parent;It===null&&It!==b.parent&&Te.push(ir)}w.points=Te;var qt=w.get_flag("occurs_check").indicator==="true/0",ir=new Pe,Pt=x.unify(oe.args[0],y.args[1],qt);Pt!==null?(ir.substitution=b.substitution.apply(Pt),ir.goal=b.goal.replace(y.args[2]).apply(Pt),ir.parent=b,w.prepend([ir])):w.throw_error(oe.args[0])}else if(oe!==!1){for(var gn=oe===null?[]:[new Pe(b.goal.apply(oe).replace(null),b.substitution.apply(oe),b)],Pr=[],lt=xe.length-1;lt>=0;lt--){Pr.push(xe[lt]);var Ir=xe[lt].goal!==null?xe[lt].goal.select():null;if(x.type.is_term(Ir)&&Ir.indicator==="!/0")break}var Nr=s(Pr,function(nn){return nn.goal===null&&(nn.goal=new j("true",[])),nn=new Pe(b.goal.replace(new j("catch",[nn.goal,y.args[1],y.args[2]])),b.substitution.apply(nn.substitution),nn.parent),nn.exclude=y.args[0].variables(),nn}).reverse();w.prepend(Nr),w.prepend(gn),oe===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift($)},"=/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=new Pe,Z=x.unify(y.args[0],y.args[1],F);Z!==null&&(z.goal=b.goal.apply(Z).replace(null),z.substitution=b.substitution.apply(Z),z.parent=b,w.prepend([z]))},"unify_with_occurs_check/2":function(w,b,y){var F=new Pe,z=x.unify(y.args[0],y.args[1],!0);z!==null&&(F.goal=b.goal.apply(z).replace(null),F.substitution=b.substitution.apply(z),F.parent=b,w.prepend([F]))},"\\=/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[0],y.args[1],F);z===null&&w.success(b)},"subsumes_term/2":function(w,b,y){var F=w.get_flag("occurs_check").indicator==="true/0",z=x.unify(y.args[1],y.args[0],F);z!==null&&y.args[1].apply(z).equals(y.args[1])&&w.success(b)},"findall/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(z))w.throw_error(x.error.type("callable",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=w.next_free_variable(),oe=new j(",",[z,new j("=",[$,F])]),xe=w.points,Te=w.session.limit,lt=w.session.format_success;w.session.format_success=function(ir){return ir.substitution},w.add_goal(oe,!0,b);var It=[],qt=function(ir){if(ir!==!1&&ir!==null&&!x.type.is_error(ir))w.__calls.unshift(qt),It.push(ir.links[$.id]),w.session.limit=w.current_limit;else if(w.points=xe,w.session.limit=Te,w.session.format_success=lt,x.type.is_error(ir))w.throw_error(ir.args[0]);else if(w.current_limit>0){for(var Pt=new j("[]"),gn=It.length-1;gn>=0;gn--)Pt=new j(".",[It[gn],Pt]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,Pt])),b.substitution,b)])}};w.__calls.unshift(qt)}},"bagof/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type("callable",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type("list",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator==="^/2"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j("[]"),It=Te.length-1;It>=0;It--)lt=new j(".",[new De(Te[It]),lt]);var qt=new j(",",[Z,new j("=",[oe,new j(",",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,ai=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var ns in Pr)if(Pr.hasOwnProperty(ns)){var to=Pr[ns];if(to.variables.equals(ai)){to.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:ai,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],ji=0;ji=0;vo--)ro=new j(".",[Nr[vo],ro]);Bo.push(new Pe(b.goal.replace(new j(",",[new j("=",[lt,Pr[ji].variables]),new j("=",[$,ro])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},"setof/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(Z))w.throw_error(x.error.type("callable",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_list($))w.throw_error(x.error.type("list",$,y.indicator));else{var oe=w.next_free_variable(),xe;Z.indicator==="^/2"?(xe=Z.args[0].variables(),Z=Z.args[1]):xe=[],xe=xe.concat(z.variables());for(var Te=Z.variables().filter(function(Nr){return e(xe,Nr)===-1}),lt=new j("[]"),It=Te.length-1;It>=0;It--)lt=new j(".",[new De(Te[It]),lt]);var qt=new j(",",[Z,new j("=",[oe,new j(",",[lt,z])])]),ir=w.points,Pt=w.session.limit,gn=w.session.format_success;w.session.format_success=function(Nr){return Nr.substitution},w.add_goal(qt,!0,b);var Pr=[],Ir=function(Nr){if(Nr!==!1&&Nr!==null&&!x.type.is_error(Nr)){w.__calls.unshift(Ir);var nn=!1,ai=Nr.links[oe.id].args[0],wo=Nr.links[oe.id].args[1];for(var ns in Pr)if(Pr.hasOwnProperty(ns)){var to=Pr[ns];if(to.variables.equals(ai)){to.answers.push(wo),nn=!0;break}}nn||Pr.push({variables:ai,answers:[wo]}),w.session.limit=w.current_limit}else if(w.points=ir,w.session.limit=Pt,w.session.format_success=gn,x.type.is_error(Nr))w.throw_error(Nr.args[0]);else if(w.current_limit>0){for(var Bo=[],ji=0;ji=0;vo--)ro=new j(".",[Nr[vo],ro]);Bo.push(new Pe(b.goal.replace(new j(",",[new j("=",[lt,Pr[ji].variables]),new j("=",[$,ro])])),b.substitution,b))}w.prepend(Bo)}};w.__calls.unshift(Ir)}},"functor/3":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2];if(x.type.is_variable(z)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation("functor/3"));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type("integer",y.args[2],"functor/3"));else if(!x.type.is_variable(Z)&&!x.type.is_atomic(Z))w.throw_error(x.error.type("atomic",y.args[1],"functor/3"));else if(x.type.is_integer(Z)&&x.type.is_integer($)&&$.value!==0)w.throw_error(x.error.type("atom",y.args[1],"functor/3"));else if(x.type.is_variable(z)){if(y.args[2].value>=0){for(var oe=[],xe=0;xe<$.value;xe++)oe.push(w.next_free_variable());var Te=x.type.is_integer(Z)?Z:new j(Z.id,oe);w.prepend([new Pe(b.goal.replace(new j("=",[z,Te])),b.substitution,b)])}}else{var lt=x.type.is_integer(z)?z:new j(z.id,[]),It=x.type.is_integer(z)?new Re(0,!1):new Re(z.args.length,!1),qt=new j(",",[new j("=",[lt,Z]),new j("=",[It,$])]);w.prepend([new Pe(b.goal.replace(qt),b.substitution,b)])}},"arg/3":function(w,b,y){if(x.type.is_variable(y.args[0])||x.type.is_variable(y.args[1]))w.throw_error(x.error.instantiation(y.indicator));else if(y.args[0].value<0)w.throw_error(x.error.domain("not_less_than_zero",y.args[0],y.indicator));else if(!x.type.is_compound(y.args[1]))w.throw_error(x.error.type("compound",y.args[1],y.indicator));else{var F=y.args[0].value;if(F>0&&F<=y.args[1].args.length){var z=new j("=",[y.args[1].args[F-1],y.args[2]]);w.prepend([new Pe(b.goal.replace(z),b.substitution,b)])}}},"=../2":function(w,b,y){var F;if(x.type.is_variable(y.args[0])&&(x.type.is_variable(y.args[1])||x.type.is_non_empty_list(y.args[1])&&x.type.is_variable(y.args[1].args[0])))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_fully_list(y.args[1]))w.throw_error(x.error.type("list",y.args[1],y.indicator));else if(x.type.is_variable(y.args[0])){if(!x.type.is_variable(y.args[1])){var Z=[];for(F=y.args[1].args[1];F.indicator==="./2";)Z.push(F.args[0]),F=F.args[1];x.type.is_variable(y.args[0])&&x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):Z.length===0&&x.type.is_compound(y.args[1].args[0])?w.throw_error(x.error.type("atomic",y.args[1].args[0],y.indicator)):Z.length>0&&(x.type.is_compound(y.args[1].args[0])||x.type.is_number(y.args[1].args[0]))?w.throw_error(x.error.type("atom",y.args[1].args[0],y.indicator)):Z.length===0?w.prepend([new Pe(b.goal.replace(new j("=",[y.args[1].args[0],y.args[0]],b)),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j("=",[new j(y.args[1].args[0].id,Z),y.args[0]])),b.substitution,b)])}}else{if(x.type.is_atomic(y.args[0]))F=new j(".",[y.args[0],new j("[]")]);else{F=new j("[]");for(var z=y.args[0].args.length-1;z>=0;z--)F=new j(".",[y.args[0].args[z],F]);F=new j(".",[new j(y.args[0].id),F])}w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b)])}},"copy_term/2":function(w,b,y){var F=y.args[0].rename(w);w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b.parent)])},"term_variables/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_fully_list(z))w.throw_error(x.error.type("list",z,y.indicator));else{var Z=g(s(ye(F.variables()),function($){return new De($)}));w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"clause/2":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_callable(y.args[1]))w.throw_error(x.error.type("callable",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var z in w.session.rules[y.args[0].indicator])if(w.session.rules[y.args[0].indicator].hasOwnProperty(z)){var Z=w.session.rules[y.args[0].indicator][z];w.session.renamed_variables={},Z=Z.rename(w),Z.body===null&&(Z.body=new j("true"));var $=new j(",",[new j("=",[Z.head,y.args[0]]),new j("=",[Z.body,y.args[1]])]);F.push(new Pe(b.goal.replace($),b.substitution,b))}w.prepend(F)}else w.throw_error(x.error.permission("access","private_procedure",y.args[0].indicator,y.indicator))},"current_predicate/1":function(w,b,y){var F=y.args[0];if(!x.type.is_variable(F)&&(!x.type.is_compound(F)||F.indicator!=="//2"))w.throw_error(x.error.type("predicate_indicator",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[0])&&!x.type.is_atom(F.args[0]))w.throw_error(x.error.type("atom",F.args[0],y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_variable(F.args[1])&&!x.type.is_integer(F.args[1]))w.throw_error(x.error.type("integer",F.args[1],y.indicator));else{var z=[];for(var Z in w.session.rules)if(w.session.rules.hasOwnProperty(Z)){var $=Z.lastIndexOf("/"),oe=Z.substr(0,$),xe=parseInt(Z.substr($+1,Z.length-($+1))),Te=new j("/",[new j(oe),new Re(xe,!1)]),lt=new j("=",[Te,F]);z.push(new Pe(b.goal.replace(lt),b.substitution,b))}w.prepend(z)}},"asserta/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type("callable",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new Ye(F,z,!0)].concat(w.session.rules[F.indicator]),w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(x.error.type("callable",F,y.indicator))}},"assertz/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=Ce(y.args[0].args[1])):(F=y.args[0],z=null),x.type.is_callable(F)?z!==null&&!x.type.is_callable(z)?w.throw_error(x.error.type("callable",z,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new Ye(F,z,!0)),w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(x.error.type("callable",F,y.indicator))}},"retract/1":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_callable(y.args[0]))w.throw_error(x.error.type("callable",y.args[0],y.indicator));else{var F,z;if(y.args[0].indicator===":-/2"?(F=y.args[0].args[0],z=y.args[0].args[1]):(F=y.args[0],z=new j("true")),typeof b.retract>"u")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var Z=[],$=0;$w.get_flag("max_arity").value)w.throw_error(x.error.representation("max_arity",y.indicator));else{var F=y.args[0].args[0].id+"/"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(b)):w.throw_error(x.error.permission("modify","static_procedure",F,y.indicator))}},"atom_length/2":function(w,b,y){if(x.type.is_variable(y.args[0]))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_atom(y.args[0]))w.throw_error(x.error.type("atom",y.args[0],y.indicator));else if(!x.type.is_variable(y.args[1])&&!x.type.is_integer(y.args[1]))w.throw_error(x.error.type("integer",y.args[1],y.indicator));else if(x.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(x.error.domain("not_less_than_zero",y.args[1],y.indicator));else{var F=new Re(y.args[0].id.length,!1);w.prepend([new Pe(b.goal.replace(new j("=",[F,y.args[1]])),b.substitution,b)])}},"atom_concat/3":function(w,b,y){var F,z,Z=y.args[0],$=y.args[1],oe=y.args[2];if(x.type.is_variable(oe)&&(x.type.is_variable(Z)||x.type.is_variable($)))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type("atom",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_atom($))w.throw_error(x.error.type("atom",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_atom(oe))w.throw_error(x.error.type("atom",oe,y.indicator));else{var xe=x.type.is_variable(Z),Te=x.type.is_variable($);if(!xe&&!Te)z=new j("=",[oe,new j(Z.id+$.id)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]);else if(xe&&!Te)F=oe.id.substr(0,oe.id.length-$.id.length),F+$.id===oe.id&&(z=new j("=",[Z,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else if(Te&&!xe)F=oe.id.substr(Z.id.length),Z.id+F===oe.id&&(z=new j("=",[$,new j(F)]),w.prepend([new Pe(b.goal.replace(z),b.substitution,b)]));else{for(var lt=[],It=0;It<=oe.id.length;It++){var qt=new j(oe.id.substr(0,It)),ir=new j(oe.id.substr(It));z=new j(",",[new j("=",[qt,Z]),new j("=",[ir,$])]),lt.push(new Pe(b.goal.replace(z),b.substitution,b))}w.prepend(lt)}}},"sub_atom/5":function(w,b,y){var F,z=y.args[0],Z=y.args[1],$=y.args[2],oe=y.args[3],xe=y.args[4];if(x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type("integer",Z,y.indicator));else if(!x.type.is_variable($)&&!x.type.is_integer($))w.throw_error(x.error.type("integer",$,y.indicator));else if(!x.type.is_variable(oe)&&!x.type.is_integer(oe))w.throw_error(x.error.type("integer",oe,y.indicator));else if(x.type.is_integer(Z)&&Z.value<0)w.throw_error(x.error.domain("not_less_than_zero",Z,y.indicator));else if(x.type.is_integer($)&&$.value<0)w.throw_error(x.error.domain("not_less_than_zero",$,y.indicator));else if(x.type.is_integer(oe)&&oe.value<0)w.throw_error(x.error.domain("not_less_than_zero",oe,y.indicator));else{var Te=[],lt=[],It=[];if(x.type.is_variable(Z))for(F=0;F<=z.id.length;F++)Te.push(F);else Te.push(Z.value);if(x.type.is_variable($))for(F=0;F<=z.id.length;F++)lt.push(F);else lt.push($.value);if(x.type.is_variable(oe))for(F=0;F<=z.id.length;F++)It.push(F);else It.push(oe.value);var qt=[];for(var ir in Te)if(Te.hasOwnProperty(ir)){F=Te[ir];for(var Pt in lt)if(lt.hasOwnProperty(Pt)){var gn=lt[Pt],Pr=z.id.length-F-gn;if(e(It,Pr)!==-1&&F+gn+Pr===z.id.length){var Ir=z.id.substr(F,gn);if(z.id===z.id.substr(0,F)+Ir+z.id.substr(F+gn,Pr)){var Nr=new j("=",[new j(Ir),xe]),nn=new j("=",[Z,new Re(F)]),ai=new j("=",[$,new Re(gn)]),wo=new j("=",[oe,new Re(Pr)]),ns=new j(",",[new j(",",[new j(",",[nn,ai]),wo]),Nr]);qt.push(new Pe(b.goal.replace(ns),b.substitution,b))}}}}w.prepend(qt)}},"atom_chars/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te="";oe.indicator==="./2";){if(x.type.is_character(oe.args[0]))Te+=oe.args[0].id;else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character",oe.args[0],y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type("list",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j("[]"),$=F.id.length-1;$>=0;$--)Z=new j(".",[new j(F.id.charAt($)),Z]);w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"atom_codes/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_variable(F)){for(var oe=z,xe=x.type.is_variable(F),Te="";oe.indicator==="./2";){if(x.type.is_character_code(oe.args[0]))Te+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0])&&xe){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.representation("character_code",y.indicator));return}oe=oe.args[1]}x.type.is_variable(oe)&&xe?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)?w.throw_error(x.error.type("list",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[new j(Te),F])),b.substitution,b)])}else{for(var Z=new j("[]"),$=F.id.length-1;$>=0;$--)Z=new j(".",[new Re(n(F.id,$),!1),Z]);w.prepend([new Pe(b.goal.replace(new j("=",[z,Z])),b.substitution,b)])}},"char_code/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(x.type.is_variable(F)&&x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_character(F))w.throw_error(x.error.type("character",F,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_integer(z))w.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_character_code(z))w.throw_error(x.error.representation("character_code",y.indicator));else if(x.type.is_variable(z)){var Z=new Re(n(F.id,0),!1);w.prepend([new Pe(b.goal.replace(new j("=",[Z,z])),b.substitution,b)])}else{var $=new j(c(z.value));w.prepend([new Pe(b.goal.replace(new j("=",[$,F])),b.substitution,b)])}},"number_chars/2":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F="";oe.indicator==="./2";){if(x.type.is_character(oe.args[0]))F+=oe.args[0].id;else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type("list",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var It=new j("[]"),qt=F.length-1;qt>=0;qt--)It=new j(".",[new j(F.charAt(qt)),It]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,It])),b.substitution,b)])}}},"number_codes/2":function(w,b,y){var F,z=y.args[0],Z=y.args[1];if(x.type.is_variable(z)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(z)&&!x.type.is_number(z))w.throw_error(x.error.type("number",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else{var $=x.type.is_variable(z);if(!x.type.is_variable(Z)){var oe=Z,xe=!0;for(F="";oe.indicator==="./2";){if(x.type.is_character_code(oe.args[0]))F+=c(oe.args[0].value);else if(x.type.is_variable(oe.args[0]))xe=!1;else if(!x.type.is_variable(oe.args[0])){w.throw_error(x.error.type("character_code",oe.args[0],y.indicator));return}oe=oe.args[1]}if(xe=xe&&x.type.is_empty_list(oe),!x.type.is_empty_list(oe)&&!x.type.is_variable(oe)){w.throw_error(x.error.type("list",Z,y.indicator));return}if(!xe&&$){w.throw_error(x.error.instantiation(y.indicator));return}else if(xe)if(x.type.is_variable(oe)&&$){w.throw_error(x.error.instantiation(y.indicator));return}else{var Te=w.parse(F),lt=Te.value;!x.type.is_number(lt)||Te.tokens[Te.tokens.length-1].space?w.throw_error(x.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,lt])),b.substitution,b)]);return}}if(!$){F=z.toString();for(var It=new j("[]"),qt=F.length-1;qt>=0;qt--)It=new j(".",[new Re(n(F,qt),!1),It]);w.prepend([new Pe(b.goal.replace(new j("=",[Z,It])),b.substitution,b)])}}},"upcase_atom/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type("atom",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,new j(F.id.toUpperCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type("atom",F,y.indicator))},"downcase_atom/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?!x.type.is_variable(z)&&!x.type.is_atom(z)?w.throw_error(x.error.type("atom",z,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[z,new j(F.id.toLowerCase(),[])])),b.substitution,b)]):w.throw_error(x.error.type("atom",F,y.indicator))},"atomic_list_concat/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("atomic_list_concat",[F,new j("",[]),z])),b.substitution,b)])},"atomic_list_concat/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(z)||x.type.is_variable(F)&&x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_list(F))w.throw_error(x.error.type("list",F,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_atom(Z))w.throw_error(x.error.type("atom",Z,y.indicator));else if(x.type.is_variable(Z)){for(var oe="",xe=F;x.type.is_term(xe)&&xe.indicator==="./2";){if(!x.type.is_atom(xe.args[0])&&!x.type.is_number(xe.args[0])){w.throw_error(x.error.type("atomic",xe.args[0],y.indicator));return}oe!==""&&(oe+=z.id),x.type.is_atom(xe.args[0])?oe+=xe.args[0].id:oe+=""+xe.args[0].value,xe=xe.args[1]}oe=new j(oe,[]),x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_term(xe)||xe.indicator!=="[]/0"?w.throw_error(x.error.type("list",F,y.indicator)):w.prepend([new Pe(b.goal.replace(new j("=",[oe,Z])),b.substitution,b)])}else{var $=g(s(Z.id.split(z.id),function(Te){return new j(Te,[])}));w.prepend([new Pe(b.goal.replace(new j("=",[$,F])),b.substitution,b)])}},"@=/2":function(w,b,y){x.compare(y.args[0],y.args[1])>0&&w.success(b)},"@>=/2":function(w,b,y){x.compare(y.args[0],y.args[1])>=0&&w.success(b)},"compare/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(x.type.is_atom(F)&&["<",">","="].indexOf(F.id)===-1)w.throw_error(x.type.domain("order",F,y.indicator));else{var $=x.compare(z,Z);$=$===0?"=":$===-1?"<":">",w.prepend([new Pe(b.goal.replace(new j("=",[F,new j($,[])])),b.substitution,b)])}},"is/2":function(w,b,y){var F=y.args[1].interpret(w);x.type.is_number(F)?w.prepend([new Pe(b.goal.replace(new j("=",[y.args[0],F],w.level)),b.substitution,b)]):w.throw_error(F)},"between/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2];if(x.type.is_variable(F)||x.type.is_variable(z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_integer(F))w.throw_error(x.error.type("integer",F,y.indicator));else if(!x.type.is_integer(z))w.throw_error(x.error.type("integer",z,y.indicator));else if(!x.type.is_variable(Z)&&!x.type.is_integer(Z))w.throw_error(x.error.type("integer",Z,y.indicator));else if(x.type.is_variable(Z)){var $=[new Pe(b.goal.replace(new j("=",[Z,F])),b.substitution,b)];F.value=Z.value&&w.success(b)},"succ/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)&&x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):!x.type.is_variable(F)&&!x.type.is_integer(F)?w.throw_error(x.error.type("integer",F,y.indicator)):!x.type.is_variable(z)&&!x.type.is_integer(z)?w.throw_error(x.error.type("integer",z,y.indicator)):!x.type.is_variable(F)&&F.value<0?w.throw_error(x.error.domain("not_less_than_zero",F,y.indicator)):!x.type.is_variable(z)&&z.value<0?w.throw_error(x.error.domain("not_less_than_zero",z,y.indicator)):(x.type.is_variable(z)||z.value>0)&&(x.type.is_variable(F)?w.prepend([new Pe(b.goal.replace(new j("=",[F,new Re(z.value-1,!1)])),b.substitution,b)]):w.prepend([new Pe(b.goal.replace(new j("=",[z,new Re(F.value+1,!1)])),b.substitution,b)]))},"=:=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F===0&&w.success(b)},"=\\=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F!==0&&w.success(b)},"/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>0&&w.success(b)},">=/2":function(w,b,y){var F=x.arithmetic_compare(w,y.args[0],y.args[1]);x.type.is_term(F)?w.throw_error(F):F>=0&&w.success(b)},"var/1":function(w,b,y){x.type.is_variable(y.args[0])&&w.success(b)},"atom/1":function(w,b,y){x.type.is_atom(y.args[0])&&w.success(b)},"atomic/1":function(w,b,y){x.type.is_atomic(y.args[0])&&w.success(b)},"compound/1":function(w,b,y){x.type.is_compound(y.args[0])&&w.success(b)},"integer/1":function(w,b,y){x.type.is_integer(y.args[0])&&w.success(b)},"float/1":function(w,b,y){x.type.is_float(y.args[0])&&w.success(b)},"number/1":function(w,b,y){x.type.is_number(y.args[0])&&w.success(b)},"nonvar/1":function(w,b,y){x.type.is_variable(y.args[0])||w.success(b)},"ground/1":function(w,b,y){y.variables().length===0&&w.success(b)},"acyclic_term/1":function(w,b,y){for(var F=b.substitution.apply(b.substitution),z=y.args[0].variables(),Z=0;Z0?Pt[Pt.length-1]:null,Pt!==null&&(qt=W(w,Pt,0,w.__get_max_priority(),!1))}if(qt.type===p&&qt.len===Pt.length-1&&gn.value==="."){qt=qt.value.rename(w);var Pr=new j("=",[z,qt]);if(oe.variables){var Ir=g(s(ye(qt.variables()),function(Nr){return new De(Nr)}));Pr=new j(",",[Pr,new j("=",[oe.variables,Ir])])}if(oe.variable_names){var Ir=g(s(ye(qt.variables()),function(nn){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===nn)break;return new j("=",[new j(ai,[]),new De(nn)])}));Pr=new j(",",[Pr,new j("=",[oe.variable_names,Ir])])}if(oe.singletons){var Ir=g(s(new Ye(qt,null).singleton_variables(),function(nn){var ai;for(ai in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(ai)&&w.session.renamed_variables[ai]===nn)break;return new j("=",[new j(ai,[]),new De(nn)])}));Pr=new j(",",[Pr,new j("=",[oe.singletons,Ir])])}w.prepend([new Pe(b.goal.replace(Pr),b.substitution,b)])}else qt.type===p?w.throw_error(x.error.syntax(Pt[qt.len],"unexpected token",!1)):w.throw_error(qt.value)}}},"write/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write",[new De("S"),F])])),b.substitution,b)])},"write/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("false",[])]),new j(".",[new j("ignore_ops",[new j("false")]),new j(".",[new j("numbervars",[new j("true")]),new j("[]",[])])])])])),b.substitution,b)])},"writeq/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("writeq",[new De("S"),F])])),b.substitution,b)])},"writeq/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("true",[])]),new j(".",[new j("ignore_ops",[new j("false")]),new j(".",[new j("numbervars",[new j("true")]),new j("[]",[])])])])])),b.substitution,b)])},"write_canonical/1":function(w,b,y){var F=y.args[0];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write_canonical",[new De("S"),F])])),b.substitution,b)])},"write_canonical/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j("write_term",[F,z,new j(".",[new j("quoted",[new j("true",[])]),new j(".",[new j("ignore_ops",[new j("true")]),new j(".",[new j("numbervars",[new j("false")]),new j("[]",[])])])])])),b.substitution,b)])},"write_term/2":function(w,b,y){var F=y.args[0],z=y.args[1];w.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("write_term",[new De("S"),F,z])])),b.substitution,b)])},"write_term/3":function(w,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=x.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(x.type.is_variable(F)||x.type.is_variable(Z))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_list(Z))w.throw_error(x.error.type("list",Z,y.indicator));else if(!x.type.is_stream(F)&&!x.type.is_atom(F))w.throw_error(x.error.domain("stream_or_alias",F,y.indicator));else if(!x.type.is_stream($)||$.stream===null)w.throw_error(x.error.existence("stream",F,y.indicator));else if($.input)w.throw_error(x.error.permission("output","stream",F,y.indicator));else if($.type==="binary")w.throw_error(x.error.permission("output","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")w.throw_error(x.error.permission("output","past_end_of_stream",F,y.indicator));else{for(var oe={},xe=Z,Te;x.type.is_term(xe)&&xe.indicator==="./2";){if(Te=xe.args[0],x.type.is_variable(Te)){w.throw_error(x.error.instantiation(y.indicator));return}else if(!x.type.is_write_option(Te)){w.throw_error(x.error.domain("write_option",Te,y.indicator));return}oe[Te.id]=Te.args[0].id==="true",xe=xe.args[1]}if(xe.indicator!=="[]/0"){x.type.is_variable(xe)?w.throw_error(x.error.instantiation(y.indicator)):w.throw_error(x.error.type("list",Z,y.indicator));return}else{oe.session=w.session;var lt=z.toString(oe);$.stream.put(lt,$.position),typeof $.position=="number"&&($.position+=lt.length),w.success(b)}}},"halt/0":function(w,b,y){w.points=[]},"halt/1":function(w,b,y){var F=y.args[0];x.type.is_variable(F)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_integer(F)?w.points=[]:w.throw_error(x.error.type("integer",F,y.indicator))},"current_prolog_flag/2":function(w,b,y){var F=y.args[0],z=y.args[1];if(!x.type.is_variable(F)&&!x.type.is_atom(F))w.throw_error(x.error.type("atom",F,y.indicator));else if(!x.type.is_variable(F)&&!x.type.is_flag(F))w.throw_error(x.error.domain("prolog_flag",F,y.indicator));else{var Z=[];for(var $ in x.flag)if(x.flag.hasOwnProperty($)){var oe=new j(",",[new j("=",[new j($),F]),new j("=",[w.get_flag($),z])]);Z.push(new Pe(b.goal.replace(oe),b.substitution,b))}w.prepend(Z)}},"set_prolog_flag/2":function(w,b,y){var F=y.args[0],z=y.args[1];x.type.is_variable(F)||x.type.is_variable(z)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_atom(F)?x.type.is_flag(F)?x.type.is_value_flag(F,z)?x.type.is_modifiable_flag(F)?(w.session.flag[F.id]=z,w.success(b)):w.throw_error(x.error.permission("modify","flag",F)):w.throw_error(x.error.domain("flag_value",new j("+",[F,z]),y.indicator)):w.throw_error(x.error.domain("prolog_flag",F,y.indicator)):w.throw_error(x.error.type("atom",F,y.indicator))}},flag:{bounded:{allowed:[new j("true"),new j("false")],value:new j("true"),changeable:!1},max_integer:{allowed:[new Re(Number.MAX_SAFE_INTEGER)],value:new Re(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Re(Number.MIN_SAFE_INTEGER)],value:new Re(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new j("down"),new j("toward_zero")],value:new j("toward_zero"),changeable:!1},char_conversion:{allowed:[new j("on"),new j("off")],value:new j("on"),changeable:!0},debug:{allowed:[new j("on"),new j("off")],value:new j("off"),changeable:!0},max_arity:{allowed:[new j("unbounded")],value:new j("unbounded"),changeable:!1},unknown:{allowed:[new j("error"),new j("fail"),new j("warning")],value:new j("error"),changeable:!0},double_quotes:{allowed:[new j("chars"),new j("codes"),new j("atom")],value:new j("codes"),changeable:!0},occurs_check:{allowed:[new j("false"),new j("true")],value:new j("false"),changeable:!0},dialect:{allowed:[new j("tau")],value:new j("tau"),changeable:!1},version_data:{allowed:[new j("tau",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)])],value:new j("tau",[new Re(t.major,!1),new Re(t.minor,!1),new Re(t.patch,!1),new j(t.status)]),changeable:!1},nodejs:{allowed:[new j("yes"),new j("no")],value:new j(typeof tc<"u"&&tc.exports?"yes":"no"),changeable:!1}},unify:function(w,b,y){y=y===void 0?!1:y;for(var F=[{left:w,right:b}],z={};F.length!==0;){var Z=F.pop();if(w=Z.left,b=Z.right,x.type.is_term(w)&&x.type.is_term(b)){if(w.indicator!==b.indicator)return null;for(var $=0;$z.value?1:0:z}else return F},operate:function(w,b){if(x.type.is_operator(b)){for(var y=x.type.is_operator(b),F=[],z,Z=!1,$=0;$w.get_flag("max_integer").value||z0?w.start+w.matches[0].length:w.start,z=y?new j("token_not_found"):new j("found",[new j(w.value.toString())]),Z=new j(".",[new j("line",[new Re(w.line+1)]),new j(".",[new j("column",[new Re(F+1)]),new j(".",[z,new j("[]",[])])])]);return new j("error",[new j("syntax_error",[new j(b)]),Z])},syntax_by_predicate:function(w,b){return new j("error",[new j("syntax_error",[new j(w)]),X(b)])}},warning:{singleton:function(w,b,y){for(var F=new j("[]"),z=w.length-1;z>=0;z--)F=new j(".",[new De(w[z]),F]);return new j("warning",[new j("singleton_variables",[F,X(b)]),new j(".",[new j("line",[new Re(y,!1)]),new j("[]")])])},failed_goal:function(w,b){return new j("warning",[new j("failed_goal",[w]),new j(".",[new j("line",[new Re(b,!1)]),new j("[]")])])}},format_variable:function(w){return"_"+w},format_answer:function(w,b,F){b instanceof ke&&(b=b.thread);var F=F||{};if(F.session=b?b.session:void 0,x.type.is_error(w))return"uncaught exception: "+w.args[0].toString();if(w===!1)return"false.";if(w===null)return"limit exceeded ;";var z=0,Z="";if(x.type.is_substitution(w)){var $=w.domain(!0);w=w.filter(function(Te,lt){return!x.type.is_variable(lt)||$.indexOf(lt.id)!==-1&&Te!==lt.id})}for(var oe in w.links)w.links.hasOwnProperty(oe)&&(z++,Z!==""&&(Z+=", "),Z+=oe.toString(F)+" = "+w.links[oe].toString(F));var xe=typeof b>"u"||b.points.length>0?" ;":".";return z===0?"true"+xe:Z+xe},flatten_error:function(w){if(!x.type.is_error(w))return null;w=w.args[0];var b={};return b.type=w.args[0].id,b.thrown=b.type==="syntax_error"?null:w.args[1].id,b.expected=null,b.found=null,b.representation=null,b.existence=null,b.existence_type=null,b.line=null,b.column=null,b.permission_operation=null,b.permission_type=null,b.evaluation_type=null,b.type==="type_error"||b.type==="domain_error"?(b.expected=w.args[0].args[0].id,b.found=w.args[0].args[1].toString()):b.type==="syntax_error"?w.args[1].indicator==="./2"?(b.expected=w.args[0].args[0].id,b.found=w.args[1].args[1].args[1].args[0],b.found=b.found.id==="token_not_found"?b.found.id:b.found.args[0].id,b.line=w.args[1].args[0].args[0].value,b.column=w.args[1].args[1].args[0].args[0].value):b.thrown=w.args[1].id:b.type==="permission_error"?(b.found=w.args[0].args[2].toString(),b.permission_operation=w.args[0].args[0].id,b.permission_type=w.args[0].args[1].id):b.type==="evaluation_error"?b.evaluation_type=w.args[0].args[0].id:b.type==="representation_error"?b.representation=w.args[0].args[0].id:b.type==="existence_error"&&(b.existence=w.args[0].args[1].toString(),b.existence_type=w.args[0].args[0].id),b},create:function(w){return new x.type.Session(w)}};typeof tc<"u"?tc.exports=x:window.pl=x})()});function nve(t,e,r){t.prepend(r.map(s=>new gl.default.type.State(e.goal.replace(s),e.substitution,e)))}function f9(t){let e=sve.get(t.session);if(e==null)throw new Error("Assertion failed: A project should have been registered for the active session");return e}function ove(t,e){sve.set(t,e),t.consult(`:- use_module(library(${OSt.id})).`)}var A9,gl,ive,V0,FSt,NSt,sve,OSt,ave=Ct(()=>{Ve();A9=et(aS()),gl=et(u9()),ive=et(Ie("vm")),{is_atom:V0,is_variable:FSt,is_instantiated_list:NSt}=gl.default.type;sve=new WeakMap;OSt=new gl.default.type.Module("constraints",{"project_workspaces_by_descriptor/3":(t,e,r)=>{let[s,a,n]=r.args;if(!V0(s)||!V0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let c=q.parseIdent(s.id),f=q.makeDescriptor(c,a.id),h=f9(t).tryWorkspaceByDescriptor(f);FSt(n)&&h!==null&&nve(t,e,[new gl.default.type.Term("=",[n,new gl.default.type.Term(String(h.relativeCwd))])]),V0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},"workspace_field/3":(t,e,r)=>{let[s,a,n]=r.args;if(!V0(s)||!V0(a)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let f=f9(t).tryWorkspaceByCwd(s.id);if(f==null)return;let p=(0,A9.default)(f.manifest.raw,a.id);typeof p>"u"||nve(t,e,[new gl.default.type.Term("=",[n,new gl.default.type.Term(typeof p=="object"?JSON.stringify(p):p)])])},"workspace_field_test/3":(t,e,r)=>{let[s,a,n]=r.args;t.prepend([new gl.default.type.State(e.goal.replace(new gl.default.type.Term("workspace_field_test",[s,a,n,new gl.default.type.Term("[]",[])])),e.substitution,e)])},"workspace_field_test/4":(t,e,r)=>{let[s,a,n,c]=r.args;if(!V0(s)||!V0(a)||!V0(n)||!NSt(c)){t.throw_error(gl.default.error.instantiation(r.indicator));return}let p=f9(t).tryWorkspaceByCwd(s.id);if(p==null)return;let h=(0,A9.default)(p.manifest.raw,a.id);if(typeof h>"u")return;let E={$$:h};for(let[S,P]of c.toJavaScript().entries())E[`$${S}`]=P;ive.default.runInNewContext(n.id,E)&&t.success(e)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"])});var yS={};Vt(yS,{Constraints:()=>h9,DependencyType:()=>fve});function yo(t){if(t instanceof JC.default.type.Num)return t.value;if(t instanceof JC.default.type.Term)switch(t.indicator){case"throw/1":return yo(t.args[0]);case"error/1":return yo(t.args[0]);case"error/2":if(t.args[0]instanceof JC.default.type.Term&&t.args[0].indicator==="syntax_error/1")return Object.assign(yo(t.args[0]),...yo(t.args[1]));{let e=yo(t.args[0]);return e.message+=` (in ${yo(t.args[1])})`,e}case"syntax_error/1":return new Yt(43,`Syntax error: ${yo(t.args[0])}`);case"existence_error/2":return new Yt(44,`Existence error: ${yo(t.args[0])} ${yo(t.args[1])} not found`);case"instantiation_error/0":return new Yt(75,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:yo(t.args[0])};case"column/1":return{column:yo(t.args[0])};case"found/1":return{found:yo(t.args[0])};case"./2":return[yo(t.args[0])].concat(yo(t.args[1]));case"//2":return`${yo(t.args[0])}/${yo(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function cve(t){let e;try{e=yo(t)}catch(r){throw typeof r=="string"?new Yt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<"u"&&typeof e.column<"u"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function bm(t){return t.id==="null"?null:`${t.toJavaScript()}`}function LSt(t){if(t.id==="null")return null;{let e=t.toJavaScript();if(typeof e!="string")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function K0(t){return typeof t=="string"?`'${t}'`:"[]"}var uve,JC,fve,lve,p9,h9,ES=Ct(()=>{Ve();Ve();bt();uve=et(HBe()),JC=et(u9());gS();ave();(0,uve.default)(JC.default);fve=(s=>(s.Dependencies="dependencies",s.DevDependencies="devDependencies",s.PeerDependencies="peerDependencies",s))(fve||{}),lve=["dependencies","devDependencies","peerDependencies"];p9=class{constructor(e,r){let s=1e3*e.workspaces.length;this.session=JC.default.create(s),ove(this.session,e),this.session.consult(":- use_module(library(lists))."),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw cve(r);for(;;){let s=await this.fetchNextAnswer();if(s===null)throw new Yt(79,"Resolution limit exceeded");if(!s)break;if(s.id==="throw")throw cve(s);yield s}}};h9=class t{constructor(e){this.source="";this.project=e;let r=e.configuration.get("constraintsPath");le.existsSync(r)&&(this.source=le.readFileSync(r,"utf8"))}static async find(e){return new t(e)}getProjectDatabase(){let e="";for(let r of lve)e+=`dependency_type(${r}). +`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${K0(s)}). +`,e+=`workspace_ident(${K0(s)}, ${K0(q.stringifyIdent(r.anchoredLocator))}). +`,e+=`workspace_version(${K0(s)}, ${K0(r.manifest.version)}). +`;for(let a of lve)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${K0(s)}, ${K0(q.stringifyIdent(n))}, ${K0(n.range)}, ${a}). +`}return e+=`workspace(_) :- false. +`,e+=`workspace_ident(_, _) :- false. +`,e+=`workspace_version(_, _) :- false. +`,e+=`workspace_has_dependency(_, _, _, _) :- false. +`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false. +`,e+=`gen_enforced_field(_, _, _) :- false. +`,e}get fullSource(){return`${this.getProjectDatabase()} +${this.source} +${this.getDeclarations()}`}createSession(){return new p9(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=hS([f,q.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=hS(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=K.resolve(this.project.cwd,bm(s.links.WorkspaceCwd)),n=bm(s.links.DependencyIdent),c=bm(s.links.DependencyRange),f=bm(s.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=q.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>q.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=K.resolve(this.project.cwd,bm(s.links.WorkspaceCwd)),n=bm(s.links.FieldPath),c=LSt(s.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>q.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!=="_"&&(a[n]=bm(c));yield a}}}});var Ive=L(pF=>{"use strict";Object.defineProperty(pF,"__esModule",{value:!0});function NS(t){let e=[...t.caches],r=e.shift();return r===void 0?Eve():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>NS({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>NS({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>NS({caches:e}).delete(s))},clear(){return r.clear().catch(()=>NS({caches:e}).clear())}}}function Eve(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}pF.createFallbackableCache=NS;pF.createNullCache=Eve});var wve=L((Apr,Cve)=>{Cve.exports=Ive()});var Bve=L(P9=>{"use strict";Object.defineProperty(P9,"__esModule",{value:!0});function rDt(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}P9.createInMemoryCache=rDt});var Sve=L((hpr,vve)=>{vve.exports=Bve()});var bve=L(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});function nDt(t,e,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===x9.WithinHeaders?s:{}},queryParameters(){return t===x9.WithinQueryParameters?s:{}}}}function iDt(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function Dve(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return Dve(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function sDt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function oDt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function aDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var lDt="4.22.1",cDt=t=>()=>t.transporter.requester.destroy(),x9={WithinQueryParameters:0,WithinHeaders:1};ef.AuthMode=x9;ef.addMethods=oDt;ef.createAuth=nDt;ef.createRetryablePromise=iDt;ef.createWaitablePromise=Dve;ef.destroy=cDt;ef.encode=aDt;ef.shuffle=sDt;ef.version=lDt});var OS=L((dpr,Pve)=>{Pve.exports=bve()});var xve=L(k9=>{"use strict";Object.defineProperty(k9,"__esModule",{value:!0});var uDt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};k9.MethodEnum=uDt});var LS=L((ypr,kve)=>{kve.exports=xve()});var Wve=L(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Tve=LS();function Q9(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var MS={Read:1,Write:2,Any:3},sw={Up:1,Down:2,Timeouted:3},Rve=2*60*1e3;function R9(t,e=sw.Up){return{...t,status:e,lastUpdate:Date.now()}}function Fve(t){return t.status===sw.Up||Date.now()-t.lastUpdate>Rve}function Nve(t){return t.status===sw.Timeouted&&Date.now()-t.lastUpdate<=Rve}function F9(t){return typeof t=="string"?{protocol:"https",url:t,accept:MS.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||MS.Any}}function fDt(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(R9(r))))).then(r=>{let s=r.filter(f=>Fve(f)),a=r.filter(f=>Nve(f)),n=[...s,...a],c=n.length>0?n.map(f=>F9(f)):e;return{getTimeout(f,p){return(a.length===0&&f===0?1:a.length+3+f)*p},statelessHosts:c}})}var ADt=({isTimedOut:t,status:e})=>!t&&~~e===0,pDt=t=>{let e=t.status;return t.isTimedOut||ADt(t)||~~(e/100)!==2&&~~(e/100)!==4},hDt=({status:t})=>~~(t/100)===2,gDt=(t,e)=>pDt(t)?e.onRetry(t):hDt(t)?e.onSuccess(t):e.onFail(t);function Qve(t,e,r,s){let a=[],n=Uve(r,s),c=Hve(t,s),f=r.method,p=r.method!==Tve.MethodEnum.Get?{}:{...r.data,...s.data},h={"x-algolia-agent":t.userAgent.value,...t.queryParameters,...p,...s.queryParameters},E=0,C=(S,P)=>{let I=S.pop();if(I===void 0)throw Gve(T9(a));let R={data:n,headers:c,method:f,url:Mve(I,r.path,h),connectTimeout:P(E,t.timeouts.connect),responseTimeout:P(E,s.timeout)},N=W=>{let te={request:R,response:W,host:I,triesLeft:S.length};return a.push(te),te},U={onSuccess:W=>Ove(W),onRetry(W){let te=N(W);return W.isTimedOut&&E++,Promise.all([t.logger.info("Retryable failure",N9(te)),t.hostsCache.set(I,R9(I,W.isTimedOut?sw.Timeouted:sw.Down))]).then(()=>C(S,P))},onFail(W){throw N(W),Lve(W,T9(a))}};return t.requester.send(R).then(W=>gDt(W,U))};return fDt(t.hostsCache,e).then(S=>C([...S.statelessHosts].reverse(),S.getTimeout))}function dDt(t){let{hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,hosts:p,queryParameters:h,headers:E}=t,C={hostsCache:e,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:c,userAgent:f,headers:E,queryParameters:h,hosts:p.map(S=>F9(S)),read(S,P){let I=Q9(P,C.timeouts.read),R=()=>Qve(C,C.hosts.filter(W=>(W.accept&MS.Read)!==0),S,I);if((I.cacheable!==void 0?I.cacheable:S.cacheable)!==!0)return R();let U={request:S,mappedRequestOptions:I,transporter:{queryParameters:C.queryParameters,headers:C.headers}};return C.responsesCache.get(U,()=>C.requestsCache.get(U,()=>C.requestsCache.set(U,R()).then(W=>Promise.all([C.requestsCache.delete(U),W]),W=>Promise.all([C.requestsCache.delete(U),Promise.reject(W)])).then(([W,te])=>te)),{miss:W=>C.responsesCache.set(U,W)})},write(S,P){return Qve(C,C.hosts.filter(I=>(I.accept&MS.Write)!==0),S,Q9(P,C.timeouts.write))}};return C}function mDt(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return e.value.indexOf(s)===-1&&(e.value=`${e.value}${s}`),e}};return e}function Ove(t){try{return JSON.parse(t.content)}catch(e){throw qve(e.message,t)}}function Lve({content:t,status:e},r){let s=t;try{s=JSON.parse(t).message}catch{}return jve(s,e,r)}function yDt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function Mve(t,e,r){let s=_ve(r),a=`${t.protocol}://${t.url}/${e.charAt(0)==="/"?e.substr(1):e}`;return s.length&&(a+=`?${s}`),a}function _ve(t){let e=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(t).map(r=>yDt("%s=%s",r,e(t[r])?JSON.stringify(t[r]):t[r])).join("&")}function Uve(t,e){if(t.method===Tve.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Hve(t,e){let r={...t.headers,...e.headers},s={};return Object.keys(r).forEach(a=>{let n=r[a];s[a.toLowerCase()]=n}),s}function T9(t){return t.map(e=>N9(e))}function N9(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function jve(t,e,r){return{name:"ApiError",message:t,status:e,transporterStackTrace:r}}function qve(t,e){return{name:"DeserializationError",message:t,response:e}}function Gve(t){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:t}}Vi.CallEnum=MS;Vi.HostStatusEnum=sw;Vi.createApiError=jve;Vi.createDeserializationError=qve;Vi.createMappedRequestOptions=Q9;Vi.createRetryError=Gve;Vi.createStatefulHost=R9;Vi.createStatelessHost=F9;Vi.createTransporter=dDt;Vi.createUserAgent=mDt;Vi.deserializeFailure=Lve;Vi.deserializeSuccess=Ove;Vi.isStatefulHostTimeouted=Nve;Vi.isStatefulHostUp=Fve;Vi.serializeData=Uve;Vi.serializeHeaders=Hve;Vi.serializeQueryParameters=_ve;Vi.serializeUrl=Mve;Vi.stackFrameWithoutCredentials=N9;Vi.stackTraceWithoutCredentials=T9});var _S=L((Ipr,Yve)=>{Yve.exports=Wve()});var Vve=L(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});var ow=OS(),EDt=_S(),US=LS(),IDt=t=>{let e=t.region||"us",r=ow.createAuth(ow.AuthMode.WithinHeaders,t.appId,t.apiKey),s=EDt.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return ow.addMethods({appId:a,transporter:s},t.methods)},CDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Post,path:"2/abtests",data:e},r),wDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Delete,path:ow.encode("2/abtests/%s",e)},r),BDt=t=>(e,r)=>t.transporter.read({method:US.MethodEnum.Get,path:ow.encode("2/abtests/%s",e)},r),vDt=t=>e=>t.transporter.read({method:US.MethodEnum.Get,path:"2/abtests"},e),SDt=t=>(e,r)=>t.transporter.write({method:US.MethodEnum.Post,path:ow.encode("2/abtests/%s/stop",e)},r);z0.addABTest=CDt;z0.createAnalyticsClient=IDt;z0.deleteABTest=wDt;z0.getABTest=BDt;z0.getABTests=vDt;z0.stopABTest=SDt});var Jve=L((wpr,Kve)=>{Kve.exports=Vve()});var Zve=L(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});var O9=OS(),DDt=_S(),zve=LS(),bDt=t=>{let e=t.region||"us",r=O9.createAuth(O9.AuthMode.WithinHeaders,t.appId,t.apiKey),s=DDt.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return O9.addMethods({appId:t.appId,transporter:s},t.methods)},PDt=t=>e=>t.transporter.read({method:zve.MethodEnum.Get,path:"1/strategies/personalization"},e),xDt=t=>(e,r)=>t.transporter.write({method:zve.MethodEnum.Post,path:"1/strategies/personalization",data:e},r);HS.createPersonalizationClient=bDt;HS.getPersonalizationStrategy=PDt;HS.setPersonalizationStrategy=xDt});var $ve=L((vpr,Xve)=>{Xve.exports=Zve()});var pSe=L(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});var Kt=OS(),dl=_S(),br=LS(),kDt=Ie("crypto");function hF(t){let e=r=>t.request(r).then(s=>{if(t.batch!==void 0&&t.batch(s.hits),!t.shouldStop(s))return s.cursor?e({cursor:s.cursor}):e({page:(r.page||0)+1})});return e({})}var QDt=t=>{let e=t.appId,r=Kt.createAuth(t.authMode!==void 0?t.authMode:Kt.AuthMode.WithinHeaders,e,t.apiKey),s=dl.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:dl.CallEnum.Read},{url:`${e}.algolia.net`,accept:dl.CallEnum.Write}].concat(Kt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:s,appId:e,addAlgoliaAgent(n,c){s.userAgent.add({segment:n,version:c})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}};return Kt.addMethods(a,t.methods)};function eSe(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function tSe(){return{name:"ObjectNotFoundError",message:"Object not found."}}function rSe(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var TDt=t=>(e,r)=>{let{queryParameters:s,...a}=r||{},n={acl:e,...s!==void 0?{queryParameters:s}:{}},c=(f,p)=>Kt.createRetryablePromise(h=>jS(t)(f.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:"1/keys",data:n},a),c)},RDt=t=>(e,r,s)=>{let a=dl.createMappedRequestOptions(s);return a.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:br.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},a)},FDt=t=>(e,r,s)=>t.transporter.write({method:br.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:e,cluster:r}},s),NDt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),(s,a)=>aw(t)(s.taskID,a)),gF=t=>(e,r,s)=>{let a=(n,c)=>qS(t)(e,{methods:{waitTask:ds}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",e),data:{operation:"copy",destination:r}},s),a)},ODt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Rules]}),LDt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Settings]}),MDt=t=>(e,r,s)=>gF(t)(e,r,{...s,scope:[mF.Synonyms]}),_Dt=t=>(e,r)=>e.method===br.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),UDt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>jS(t)(e,n).then(c).catch(f=>{if(f.status!==404)throw f}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/keys/%s",e)},r),s)},HDt=t=>(e,r,s)=>{let a=r.map(n=>({action:"deleteEntry",body:{objectID:n}}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},jDt=()=>(t,e)=>{let r=dl.serializeQueryParameters(e),s=kDt.createHmac("sha256",t).update(r).digest("hex");return Buffer.from(s+r).toString("base64")},jS=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/keys/%s",e)},r),nSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/task/%s",e.toString())},r),qDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"/1/dictionaries/*/settings"},e),GDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/logs"},e),WDt=()=>t=>{let e=Buffer.from(t,"base64").toString("ascii"),r=/validUntil=(\d+)/,s=e.match(r);if(s===null)throw rSe();return parseInt(s[1],10)-Math.round(new Date().getTime()/1e3)},YDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping/top"},e),VDt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/clusters/mapping/%s",e)},r),KDt=t=>e=>{let{retrieveMappings:r,...s}=e||{};return r===!0&&(s.getClusters=!0),t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping/pending"},s)},qS=t=>(e,r={})=>{let s={transporter:t.transporter,appId:t.appId,indexName:e};return Kt.addMethods(s,r.methods)},JDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/keys"},e),zDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters"},e),ZDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/indexes"},e),XDt=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:"1/clusters/mapping"},e),$Dt=t=>(e,r,s)=>{let a=(n,c)=>qS(t)(e,{methods:{waitTask:ds}}).waitTask(n.taskID,c);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",e),data:{operation:"move",destination:r}},s),a)},ebt=t=>(e,r)=>{let s=(a,n)=>Promise.all(Object.keys(a.taskID).map(c=>qS(t)(c,{methods:{waitTask:ds}}).waitTask(a.taskID[c],n)));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:e}},r),s)},tbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:e}},r),rbt=t=>(e,r)=>{let s=e.map(a=>({...a,params:dl.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:s},cacheable:!0},r)},nbt=t=>(e,r)=>Promise.all(e.map(s=>{let{facetName:a,facetQuery:n,...c}=s.params;return qS(t)(s.indexName,{methods:{searchForFacetValues:uSe}}).searchForFacetValues(a,n,{...r,...c})})),ibt=t=>(e,r)=>{let s=dl.createMappedRequestOptions(r);return s.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:br.MethodEnum.Delete,path:"1/clusters/mapping"},s)},sbt=t=>(e,r,s)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},obt=t=>(e,r)=>{let s=(a,n)=>Kt.createRetryablePromise(c=>jS(t)(e,n).catch(f=>{if(f.status!==404)throw f;return c()}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/keys/%s/restore",e)},r),s)},abt=t=>(e,r,s)=>{let a=r.map(n=>({action:"addEntry",body:n}));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},s),(n,c)=>aw(t)(n.taskID,c))},lbt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("/1/dictionaries/%s/search",e),data:{query:r},cacheable:!0},s),cbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:e}},r),ubt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:"/1/dictionaries/*/settings",data:e},r),(s,a)=>aw(t)(s.taskID,a)),fbt=t=>(e,r)=>{let s=Object.assign({},r),{queryParameters:a,...n}=r||{},c=a?{queryParameters:a}:{},f=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],p=E=>Object.keys(s).filter(C=>f.indexOf(C)!==-1).every(C=>{if(Array.isArray(E[C])&&Array.isArray(s[C])){let S=E[C];return S.length===s[C].length&&S.every((P,I)=>P===s[C][I])}else return E[C]===s[C]}),h=(E,C)=>Kt.createRetryablePromise(S=>jS(t)(e,C).then(P=>p(P)?Promise.resolve():S()));return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode("1/keys/%s",e),data:c},n),h)},aw=t=>(e,r)=>Kt.createRetryablePromise(s=>nSe(t)(e,r).then(a=>a.status!=="published"?s():void 0)),iSe=t=>(e,r)=>{let s=(a,n)=>ds(t)(a.taskID,n);return Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/batch",t.indexName),data:{requests:e}},r),s)},Abt=t=>e=>hF({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/browse",t.indexName),data:r},e)}),pbt=t=>e=>{let r={hitsPerPage:1e3,...e};return hF({shouldStop:s=>s.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},hbt=t=>e=>{let r={hitsPerPage:1e3,...e};return hF({shouldStop:s=>s.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},dF=t=>(e,r,s)=>{let{batchSize:a,...n}=s||{},c={taskIDs:[],objectIDs:[]},f=(p=0)=>{let h=[],E;for(E=p;E({action:r,body:C})),n).then(C=>(c.objectIDs=c.objectIDs.concat(C.objectIDs),c.taskIDs.push(C.taskID),E++,f(E)))};return Kt.createWaitablePromise(f(),(p,h)=>Promise.all(p.taskIDs.map(E=>ds(t)(E,h))))},gbt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/clear",t.indexName)},e),(r,s)=>ds(t)(r.taskID,s)),dbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/clear",t.indexName)},a),(n,c)=>ds(t)(n.taskID,c))},mbt=t=>e=>{let{forwardToReplicas:r,...s}=e||{},a=dl.createMappedRequestOptions(s);return r&&(a.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/clear",t.indexName)},a),(n,c)=>ds(t)(n.taskID,c))},ybt=t=>(e,r)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/deleteByQuery",t.indexName),data:e},r),(s,a)=>ds(t)(s.taskID,a)),Ebt=t=>e=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s",t.indexName)},e),(r,s)=>ds(t)(r.taskID,s)),Ibt=t=>(e,r)=>Kt.createWaitablePromise(sSe(t)([e],r).then(s=>({taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),sSe=t=>(e,r)=>{let s=e.map(a=>({objectID:a}));return dF(t)(s,xm.DeleteObject,r)},Cbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s/rules/%s",t.indexName,e)},n),(c,f)=>ds(t)(c.taskID,f))},wbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Delete,path:Kt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},n),(c,f)=>ds(t)(c.taskID,f))},Bbt=t=>e=>oSe(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),vbt=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},s),Sbt=t=>(e,r)=>{let{query:s,paginate:a,...n}=r||{},c=0,f=()=>cSe(t)(s||"",{...n,page:c}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:c};if(c++,a===!1||c>=p.nbPages)throw tSe();return f()});return f()},Dbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/%s",t.indexName,e)},r),bbt=()=>(t,e)=>{for(let[r,s]of Object.entries(t.hits))if(s.objectID===e)return parseInt(r,10);return-1},Pbt=t=>(e,r)=>{let{attributesToRetrieve:s,...a}=r||{},n=e.map(c=>({indexName:t.indexName,objectID:c,...s?{attributesToRetrieve:s}:{}}));return t.transporter.read({method:br.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:n}},a)},xbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/rules/%s",t.indexName,e)},r),oSe=t=>e=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/settings",t.indexName),data:{getVersion:2}},e),kbt=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},r),aSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Get,path:Kt.encode("1/indexes/%s/task/%s",t.indexName,e.toString())},r),Qbt=t=>(e,r)=>Kt.createWaitablePromise(lSe(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),lSe=t=>(e,r)=>{let{createIfNotExists:s,...a}=r||{},n=s?xm.PartialUpdateObject:xm.PartialUpdateObjectNoCreate;return dF(t)(e,n,a)},Tbt=t=>(e,r)=>{let{safe:s,autoGenerateObjectIDIfNotExist:a,batchSize:n,...c}=r||{},f=(I,R,N,U)=>Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/operation",I),data:{operation:N,destination:R}},U),(W,te)=>ds(t)(W.taskID,te)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=L9({appId:t.appId,transporter:t.transporter,indexName:h}),C=[],S=f(t.indexName,h,"copy",{...c,scope:["settings","synonyms","rules"]});C.push(S);let P=(s?S.wait(c):S).then(()=>{let I=E(e,{...c,autoGenerateObjectIDIfNotExist:a,batchSize:n});return C.push(I),s?I.wait(c):I}).then(()=>{let I=f(h,t.indexName,"move",c);return C.push(I),s?I.wait(c):I}).then(()=>Promise.all(C)).then(([I,R,N])=>({objectIDs:R.objectIDs,taskIDs:[I.taskID,...R.taskIDs,N.taskID]}));return Kt.createWaitablePromise(P,(I,R)=>Promise.all(C.map(N=>N.wait(R))))},Rbt=t=>(e,r)=>M9(t)(e,{...r,clearExistingRules:!0}),Fbt=t=>(e,r)=>_9(t)(e,{...r,clearExistingSynonyms:!0}),Nbt=t=>(e,r)=>Kt.createWaitablePromise(L9(t)([e],r).then(s=>({objectID:s.objectIDs[0],taskID:s.taskIDs[0]})),(s,a)=>ds(t)(s.taskID,a)),L9=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:s,...a}=r||{},n=s?xm.AddObject:xm.UpdateObject;if(n===xm.UpdateObject){for(let c of e)if(c.objectID===void 0)return Kt.createWaitablePromise(Promise.reject(eSe()))}return dF(t)(e,n,a)},Obt=t=>(e,r)=>M9(t)([e],r),M9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingRules:a,...n}=r||{},c=dl.createMappedRequestOptions(n);return s&&(c.queryParameters.forwardToReplicas=1),a&&(c.queryParameters.clearExistingRules=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/batch",t.indexName),data:e},c),(f,p)=>ds(t)(f.taskID,p))},Lbt=t=>(e,r)=>_9(t)([e],r),_9=t=>(e,r)=>{let{forwardToReplicas:s,clearExistingSynonyms:a,replaceExistingSynonyms:n,...c}=r||{},f=dl.createMappedRequestOptions(c);return s&&(f.queryParameters.forwardToReplicas=1),(n||a)&&(f.queryParameters.replaceExistingSynonyms=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/batch",t.indexName),data:e},f),(p,h)=>ds(t)(p.taskID,h))},cSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r),uSe=t=>(e,r,s)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},s),fSe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/rules/search",t.indexName),data:{query:e}},r),ASe=t=>(e,r)=>t.transporter.read({method:br.MethodEnum.Post,path:Kt.encode("1/indexes/%s/synonyms/search",t.indexName),data:{query:e}},r),Mbt=t=>(e,r)=>{let{forwardToReplicas:s,...a}=r||{},n=dl.createMappedRequestOptions(a);return s&&(n.queryParameters.forwardToReplicas=1),Kt.createWaitablePromise(t.transporter.write({method:br.MethodEnum.Put,path:Kt.encode("1/indexes/%s/settings",t.indexName),data:e},n),(c,f)=>ds(t)(c.taskID,f))},ds=t=>(e,r)=>Kt.createRetryablePromise(s=>aSe(t)(e,r).then(a=>a.status!=="published"?s():void 0)),_bt={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",Inference:"inference",ListIndexes:"listIndexes",Logs:"logs",Personalization:"personalization",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},xm={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},mF={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Ubt={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Hbt={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};Ft.ApiKeyACLEnum=_bt;Ft.BatchActionEnum=xm;Ft.ScopeEnum=mF;Ft.StrategyEnum=Ubt;Ft.SynonymEnum=Hbt;Ft.addApiKey=TDt;Ft.assignUserID=RDt;Ft.assignUserIDs=FDt;Ft.batch=iSe;Ft.browseObjects=Abt;Ft.browseRules=pbt;Ft.browseSynonyms=hbt;Ft.chunkedBatch=dF;Ft.clearDictionaryEntries=NDt;Ft.clearObjects=gbt;Ft.clearRules=dbt;Ft.clearSynonyms=mbt;Ft.copyIndex=gF;Ft.copyRules=ODt;Ft.copySettings=LDt;Ft.copySynonyms=MDt;Ft.createBrowsablePromise=hF;Ft.createMissingObjectIDError=eSe;Ft.createObjectNotFoundError=tSe;Ft.createSearchClient=QDt;Ft.createValidUntilNotFoundError=rSe;Ft.customRequest=_Dt;Ft.deleteApiKey=UDt;Ft.deleteBy=ybt;Ft.deleteDictionaryEntries=HDt;Ft.deleteIndex=Ebt;Ft.deleteObject=Ibt;Ft.deleteObjects=sSe;Ft.deleteRule=Cbt;Ft.deleteSynonym=wbt;Ft.exists=Bbt;Ft.findAnswers=vbt;Ft.findObject=Sbt;Ft.generateSecuredApiKey=jDt;Ft.getApiKey=jS;Ft.getAppTask=nSe;Ft.getDictionarySettings=qDt;Ft.getLogs=GDt;Ft.getObject=Dbt;Ft.getObjectPosition=bbt;Ft.getObjects=Pbt;Ft.getRule=xbt;Ft.getSecuredApiKeyRemainingValidity=WDt;Ft.getSettings=oSe;Ft.getSynonym=kbt;Ft.getTask=aSe;Ft.getTopUserIDs=YDt;Ft.getUserID=VDt;Ft.hasPendingMappings=KDt;Ft.initIndex=qS;Ft.listApiKeys=JDt;Ft.listClusters=zDt;Ft.listIndices=ZDt;Ft.listUserIDs=XDt;Ft.moveIndex=$Dt;Ft.multipleBatch=ebt;Ft.multipleGetObjects=tbt;Ft.multipleQueries=rbt;Ft.multipleSearchForFacetValues=nbt;Ft.partialUpdateObject=Qbt;Ft.partialUpdateObjects=lSe;Ft.removeUserID=ibt;Ft.replaceAllObjects=Tbt;Ft.replaceAllRules=Rbt;Ft.replaceAllSynonyms=Fbt;Ft.replaceDictionaryEntries=sbt;Ft.restoreApiKey=obt;Ft.saveDictionaryEntries=abt;Ft.saveObject=Nbt;Ft.saveObjects=L9;Ft.saveRule=Obt;Ft.saveRules=M9;Ft.saveSynonym=Lbt;Ft.saveSynonyms=_9;Ft.search=cSe;Ft.searchDictionaryEntries=lbt;Ft.searchForFacetValues=uSe;Ft.searchRules=fSe;Ft.searchSynonyms=ASe;Ft.searchUserIDs=cbt;Ft.setDictionarySettings=ubt;Ft.setSettings=Mbt;Ft.updateApiKey=fbt;Ft.waitAppTask=aw;Ft.waitTask=ds});var gSe=L((Dpr,hSe)=>{hSe.exports=pSe()});var dSe=L(yF=>{"use strict";Object.defineProperty(yF,"__esModule",{value:!0});function jbt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var qbt={Debug:1,Info:2,Error:3};yF.LogLevelEnum=qbt;yF.createNullLogger=jbt});var ySe=L((Ppr,mSe)=>{mSe.exports=dSe()});var wSe=L(U9=>{"use strict";Object.defineProperty(U9,"__esModule",{value:!0});var ESe=Ie("http"),ISe=Ie("https"),Gbt=Ie("url"),CSe={keepAlive:!0},Wbt=new ESe.Agent(CSe),Ybt=new ISe.Agent(CSe);function Vbt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:s={}}={}){let a=e||t||Wbt,n=r||t||Ybt;return{send(c){return new Promise(f=>{let p=Gbt.parse(c.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...s,agent:p.protocol==="https:"?n:a,hostname:p.hostname,path:h,method:c.method,headers:{...s&&s.headers?s.headers:{},...c.headers},...p.port!==void 0?{port:p.port||""}:{}},C=(p.protocol==="https:"?ISe:ESe).request(E,R=>{let N=[];R.on("data",U=>{N=N.concat(U)}),R.on("end",()=>{clearTimeout(P),clearTimeout(I),f({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),S=(R,N)=>setTimeout(()=>{C.abort(),f({status:0,content:N,isTimedOut:!0})},R*1e3),P=S(c.connectTimeout,"Connection timeout"),I;C.on("error",R=>{clearTimeout(P),clearTimeout(I),f({status:0,content:R.message,isTimedOut:!1})}),C.once("response",()=>{clearTimeout(P),I=S(c.responseTimeout,"Socket timeout")}),c.data!==void 0&&C.write(c.data),C.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}U9.createNodeHttpRequester=Vbt});var vSe=L((kpr,BSe)=>{BSe.exports=wSe()});var PSe=L((Qpr,bSe)=>{"use strict";var SSe=wve(),Kbt=Sve(),lw=Jve(),j9=OS(),H9=$ve(),jt=gSe(),Jbt=ySe(),zbt=vSe(),Zbt=_S();function DSe(t,e,r){let s={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:zbt.createNodeHttpRequester(),logger:Jbt.createNullLogger(),responsesCache:SSe.createNullCache(),requestsCache:SSe.createNullCache(),hostsCache:Kbt.createInMemoryCache(),userAgent:Zbt.createUserAgent(j9.version).add({segment:"Node.js",version:process.versions.node})},a={...s,...r},n=()=>c=>H9.createPersonalizationClient({...s,...c,methods:{getPersonalizationStrategy:H9.getPersonalizationStrategy,setPersonalizationStrategy:H9.setPersonalizationStrategy}});return jt.createSearchClient({...a,methods:{search:jt.multipleQueries,searchForFacetValues:jt.multipleSearchForFacetValues,multipleBatch:jt.multipleBatch,multipleGetObjects:jt.multipleGetObjects,multipleQueries:jt.multipleQueries,copyIndex:jt.copyIndex,copySettings:jt.copySettings,copyRules:jt.copyRules,copySynonyms:jt.copySynonyms,moveIndex:jt.moveIndex,listIndices:jt.listIndices,getLogs:jt.getLogs,listClusters:jt.listClusters,multipleSearchForFacetValues:jt.multipleSearchForFacetValues,getApiKey:jt.getApiKey,addApiKey:jt.addApiKey,listApiKeys:jt.listApiKeys,updateApiKey:jt.updateApiKey,deleteApiKey:jt.deleteApiKey,restoreApiKey:jt.restoreApiKey,assignUserID:jt.assignUserID,assignUserIDs:jt.assignUserIDs,getUserID:jt.getUserID,searchUserIDs:jt.searchUserIDs,listUserIDs:jt.listUserIDs,getTopUserIDs:jt.getTopUserIDs,removeUserID:jt.removeUserID,hasPendingMappings:jt.hasPendingMappings,generateSecuredApiKey:jt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:jt.getSecuredApiKeyRemainingValidity,destroy:j9.destroy,clearDictionaryEntries:jt.clearDictionaryEntries,deleteDictionaryEntries:jt.deleteDictionaryEntries,getDictionarySettings:jt.getDictionarySettings,getAppTask:jt.getAppTask,replaceDictionaryEntries:jt.replaceDictionaryEntries,saveDictionaryEntries:jt.saveDictionaryEntries,searchDictionaryEntries:jt.searchDictionaryEntries,setDictionarySettings:jt.setDictionarySettings,waitAppTask:jt.waitAppTask,customRequest:jt.customRequest,initIndex:c=>f=>jt.initIndex(c)(f,{methods:{batch:jt.batch,delete:jt.deleteIndex,findAnswers:jt.findAnswers,getObject:jt.getObject,getObjects:jt.getObjects,saveObject:jt.saveObject,saveObjects:jt.saveObjects,search:jt.search,searchForFacetValues:jt.searchForFacetValues,waitTask:jt.waitTask,setSettings:jt.setSettings,getSettings:jt.getSettings,partialUpdateObject:jt.partialUpdateObject,partialUpdateObjects:jt.partialUpdateObjects,deleteObject:jt.deleteObject,deleteObjects:jt.deleteObjects,deleteBy:jt.deleteBy,clearObjects:jt.clearObjects,browseObjects:jt.browseObjects,getObjectPosition:jt.getObjectPosition,findObject:jt.findObject,exists:jt.exists,saveSynonym:jt.saveSynonym,saveSynonyms:jt.saveSynonyms,getSynonym:jt.getSynonym,searchSynonyms:jt.searchSynonyms,browseSynonyms:jt.browseSynonyms,deleteSynonym:jt.deleteSynonym,clearSynonyms:jt.clearSynonyms,replaceAllObjects:jt.replaceAllObjects,replaceAllSynonyms:jt.replaceAllSynonyms,searchRules:jt.searchRules,getRule:jt.getRule,deleteRule:jt.deleteRule,saveRule:jt.saveRule,saveRules:jt.saveRules,replaceAllRules:jt.replaceAllRules,browseRules:jt.browseRules,clearRules:jt.clearRules}}),initAnalytics:()=>c=>lw.createAnalyticsClient({...s,...c,methods:{addABTest:lw.addABTest,getABTest:lw.getABTest,getABTests:lw.getABTests,stopABTest:lw.stopABTest,deleteABTest:lw.deleteABTest}}),initPersonalization:n,initRecommendation:()=>c=>(a.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),n()(c))}})}DSe.version=j9.version;bSe.exports=DSe});var G9=L((Tpr,q9)=>{var xSe=PSe();q9.exports=xSe;q9.exports.default=xSe});var V9=L((Fpr,TSe)=>{"use strict";var QSe=Object.getOwnPropertySymbols,$bt=Object.prototype.hasOwnProperty,ePt=Object.prototype.propertyIsEnumerable;function tPt(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function rPt(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var s=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(s.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}TSe.exports=rPt()?Object.assign:function(t,e){for(var r,s=tPt(t),a,n=1;n{"use strict";var J9=V9(),cw=60103,NSe=60106;Dn.Fragment=60107;Dn.StrictMode=60108;Dn.Profiler=60114;var OSe=60109,LSe=60110,MSe=60112;Dn.Suspense=60113;var _Se=60115,USe=60116;typeof Symbol=="function"&&Symbol.for&&(Wc=Symbol.for,cw=Wc("react.element"),NSe=Wc("react.portal"),Dn.Fragment=Wc("react.fragment"),Dn.StrictMode=Wc("react.strict_mode"),Dn.Profiler=Wc("react.profiler"),OSe=Wc("react.provider"),LSe=Wc("react.context"),MSe=Wc("react.forward_ref"),Dn.Suspense=Wc("react.suspense"),_Se=Wc("react.memo"),USe=Wc("react.lazy"));var Wc,RSe=typeof Symbol=="function"&&Symbol.iterator;function nPt(t){return t===null||typeof t!="object"?null:(t=RSe&&t[RSe]||t["@@iterator"],typeof t=="function"?t:null)}function GS(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r{"use strict";JSe.exports=KSe()});var tW=L((Lpr,eW)=>{"use strict";var Cn=eW.exports;eW.exports.default=Cn;var Zn="\x1B[",WS="\x1B]",fw="\x07",CF=";",zSe=process.env.TERM_PROGRAM==="Apple_Terminal";Cn.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?Zn+(t+1)+"G":Zn+(e+1)+";"+(t+1)+"H"};Cn.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=Zn+-t+"D":t>0&&(r+=Zn+t+"C"),e<0?r+=Zn+-e+"A":e>0&&(r+=Zn+e+"B"),r};Cn.cursorUp=(t=1)=>Zn+t+"A";Cn.cursorDown=(t=1)=>Zn+t+"B";Cn.cursorForward=(t=1)=>Zn+t+"C";Cn.cursorBackward=(t=1)=>Zn+t+"D";Cn.cursorLeft=Zn+"G";Cn.cursorSavePosition=zSe?"\x1B7":Zn+"s";Cn.cursorRestorePosition=zSe?"\x1B8":Zn+"u";Cn.cursorGetPosition=Zn+"6n";Cn.cursorNextLine=Zn+"E";Cn.cursorPrevLine=Zn+"F";Cn.cursorHide=Zn+"?25l";Cn.cursorShow=Zn+"?25h";Cn.eraseLines=t=>{let e="";for(let r=0;r[WS,"8",CF,CF,e,fw,t,WS,"8",CF,CF,fw].join("");Cn.image=(t,e={})=>{let r=`${WS}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+fw};Cn.iTerm={setCwd:(t=process.cwd())=>`${WS}50;CurrentDir=${t}${fw}`,annotation:(t,e={})=>{let r=`${WS}1337;`,s=typeof e.x<"u",a=typeof e.y<"u";if((s||a)&&!(s&&a&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(s?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+fw}}});var XSe=L((Mpr,rW)=>{"use strict";var ZSe=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};rW.exports=ZSe;rW.exports.default=ZSe});var eDe=L((_pr,BF)=>{"use strict";var lPt=XSe(),wF=new WeakMap,$Se=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,s=0,a=t.displayName||t.name||"",n=function(...c){if(wF.set(n,++s),s===1)r=t.apply(this,c),t=null;else if(e.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return r};return lPt(n,t),wF.set(n,s),n};BF.exports=$Se;BF.exports.default=$Se;BF.exports.callCount=t=>{if(!wF.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return wF.get(t)}});var tDe=L((Upr,vF)=>{vF.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&vF.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&vF.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var sW=L((Hpr,hw)=>{var Ti=global.process,km=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};km(Ti)?(rDe=Ie("assert"),Aw=tDe(),nDe=/^win/i.test(Ti.platform),YS=Ie("events"),typeof YS!="function"&&(YS=YS.EventEmitter),Ti.__signal_exit_emitter__?zs=Ti.__signal_exit_emitter__:(zs=Ti.__signal_exit_emitter__=new YS,zs.count=0,zs.emitted={}),zs.infinite||(zs.setMaxListeners(1/0),zs.infinite=!0),hw.exports=function(t,e){if(!km(global.process))return function(){};rDe.equal(typeof t,"function","a callback must be provided for exit handler"),pw===!1&&nW();var r="exit";e&&e.alwaysLast&&(r="afterexit");var s=function(){zs.removeListener(r,t),zs.listeners("exit").length===0&&zs.listeners("afterexit").length===0&&SF()};return zs.on(r,t),s},SF=function(){!pw||!km(global.process)||(pw=!1,Aw.forEach(function(e){try{Ti.removeListener(e,DF[e])}catch{}}),Ti.emit=bF,Ti.reallyExit=iW,zs.count-=1)},hw.exports.unload=SF,Qm=function(e,r,s){zs.emitted[e]||(zs.emitted[e]=!0,zs.emit(e,r,s))},DF={},Aw.forEach(function(t){DF[t]=function(){if(km(global.process)){var r=Ti.listeners(t);r.length===zs.count&&(SF(),Qm("exit",null,t),Qm("afterexit",null,t),nDe&&t==="SIGHUP"&&(t="SIGINT"),Ti.kill(Ti.pid,t))}}}),hw.exports.signals=function(){return Aw},pw=!1,nW=function(){pw||!km(global.process)||(pw=!0,zs.count+=1,Aw=Aw.filter(function(e){try{return Ti.on(e,DF[e]),!0}catch{return!1}}),Ti.emit=sDe,Ti.reallyExit=iDe)},hw.exports.load=nW,iW=Ti.reallyExit,iDe=function(e){km(global.process)&&(Ti.exitCode=e||0,Qm("exit",Ti.exitCode,null),Qm("afterexit",Ti.exitCode,null),iW.call(Ti,Ti.exitCode))},bF=Ti.emit,sDe=function(e,r){if(e==="exit"&&km(global.process)){r!==void 0&&(Ti.exitCode=r);var s=bF.apply(this,arguments);return Qm("exit",Ti.exitCode,null),Qm("afterexit",Ti.exitCode,null),s}else return bF.apply(this,arguments)}):hw.exports=function(){return function(){}};var rDe,Aw,nDe,YS,zs,SF,Qm,DF,pw,nW,iW,iDe,bF,sDe});var aDe=L((jpr,oDe)=>{"use strict";var cPt=eDe(),uPt=sW();oDe.exports=cPt(()=>{uPt(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var oW=L(gw=>{"use strict";var fPt=aDe(),PF=!1;gw.show=(t=process.stderr)=>{t.isTTY&&(PF=!1,t.write("\x1B[?25h"))};gw.hide=(t=process.stderr)=>{t.isTTY&&(fPt(),PF=!0,t.write("\x1B[?25l"))};gw.toggle=(t,e)=>{t!==void 0&&(PF=t),PF?gw.show(e):gw.hide(e)}});var fDe=L(VS=>{"use strict";var uDe=VS&&VS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(VS,"__esModule",{value:!0});var lDe=uDe(tW()),cDe=uDe(oW()),APt=(t,{showCursor:e=!1}={})=>{let r=0,s="",a=!1,n=c=>{!e&&!a&&(cDe.default.hide(),a=!0);let f=c+` +`;f!==s&&(s=f,t.write(lDe.default.eraseLines(r)+f),r=f.split(` +`).length)};return n.clear=()=>{t.write(lDe.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,e||(cDe.default.show(),a=!1)},n};VS.default={create:APt}});var ADe=L((Wpr,pPt)=>{pPt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var gDe=L(rc=>{"use strict";var hDe=ADe(),AA=process.env;Object.defineProperty(rc,"_vendors",{value:hDe.map(function(t){return t.constant})});rc.name=null;rc.isPR=null;hDe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return pDe(s)});if(rc[t.constant]=r,r)switch(rc.name=t.name,typeof t.pr){case"string":rc.isPR=!!AA[t.pr];break;case"object":"env"in t.pr?rc.isPR=t.pr.env in AA&&AA[t.pr.env]!==t.pr.ne:"any"in t.pr?rc.isPR=t.pr.any.some(function(s){return!!AA[s]}):rc.isPR=pDe(t.pr);break;default:rc.isPR=null}});rc.isCI=!!(AA.CI||AA.CONTINUOUS_INTEGRATION||AA.BUILD_NUMBER||AA.RUN_ID||rc.name);function pDe(t){return typeof t=="string"?!!AA[t]:Object.keys(t).every(function(e){return AA[e]===t[e]})}});var mDe=L((Vpr,dDe)=>{"use strict";dDe.exports=gDe().isCI});var EDe=L((Kpr,yDe)=>{"use strict";var hPt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};yDe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c=="string"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of hPt(t.constructor.prototype)){if(n==="constructor"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value=="function"&&(t[n]=t[n].bind(t))}return t}});var SDe=L(Vn=>{"use strict";var mw,zS,TF,pW;typeof performance=="object"&&typeof performance.now=="function"?(IDe=performance,Vn.unstable_now=function(){return IDe.now()}):(aW=Date,CDe=aW.now(),Vn.unstable_now=function(){return aW.now()-CDe});var IDe,aW,CDe;typeof window>"u"||typeof MessageChannel!="function"?(dw=null,lW=null,cW=function(){if(dw!==null)try{var t=Vn.unstable_now();dw(!0,t),dw=null}catch(e){throw setTimeout(cW,0),e}},mw=function(t){dw!==null?setTimeout(mw,0,t):(dw=t,setTimeout(cW,0))},zS=function(t,e){lW=setTimeout(t,e)},TF=function(){clearTimeout(lW)},Vn.unstable_shouldYield=function(){return!1},pW=Vn.unstable_forceFrameRate=function(){}):(wDe=window.setTimeout,BDe=window.clearTimeout,typeof console<"u"&&(vDe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof vDe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),KS=!1,JS=null,xF=-1,uW=5,fW=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=fW},pW=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125>>1,a=t[s];if(a!==void 0&&0QF(c,r))p!==void 0&&0>QF(p,c)?(t[s]=p,t[f]=r,s=f):(t[s]=c,t[n]=r,s=n);else if(p!==void 0&&0>QF(p,r))t[s]=p,t[f]=r,s=f;else break e}}return e}return null}function QF(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var pA=[],Z0=[],gPt=1,Yc=null,ea=3,FF=!1,Tm=!1,ZS=!1;function gW(t){for(var e=tf(Z0);e!==null;){if(e.callback===null)RF(Z0);else if(e.startTime<=t)RF(Z0),e.sortIndex=e.expirationTime,hW(pA,e);else break;e=tf(Z0)}}function dW(t){if(ZS=!1,gW(t),!Tm)if(tf(pA)!==null)Tm=!0,mw(mW);else{var e=tf(Z0);e!==null&&zS(dW,e.startTime-t)}}function mW(t,e){Tm=!1,ZS&&(ZS=!1,TF()),FF=!0;var r=ea;try{for(gW(e),Yc=tf(pA);Yc!==null&&(!(Yc.expirationTime>e)||t&&!Vn.unstable_shouldYield());){var s=Yc.callback;if(typeof s=="function"){Yc.callback=null,ea=Yc.priorityLevel;var a=s(Yc.expirationTime<=e);e=Vn.unstable_now(),typeof a=="function"?Yc.callback=a:Yc===tf(pA)&&RF(pA),gW(e)}else RF(pA);Yc=tf(pA)}if(Yc!==null)var n=!0;else{var c=tf(Z0);c!==null&&zS(dW,c.startTime-e),n=!1}return n}finally{Yc=null,ea=r,FF=!1}}var dPt=pW;Vn.unstable_IdlePriority=5;Vn.unstable_ImmediatePriority=1;Vn.unstable_LowPriority=4;Vn.unstable_NormalPriority=3;Vn.unstable_Profiling=null;Vn.unstable_UserBlockingPriority=2;Vn.unstable_cancelCallback=function(t){t.callback=null};Vn.unstable_continueExecution=function(){Tm||FF||(Tm=!0,mw(mW))};Vn.unstable_getCurrentPriorityLevel=function(){return ea};Vn.unstable_getFirstCallbackNode=function(){return tf(pA)};Vn.unstable_next=function(t){switch(ea){case 1:case 2:case 3:var e=3;break;default:e=ea}var r=ea;ea=e;try{return t()}finally{ea=r}};Vn.unstable_pauseExecution=function(){};Vn.unstable_requestPaint=dPt;Vn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=ea;ea=t;try{return e()}finally{ea=r}};Vn.unstable_scheduleCallback=function(t,e,r){var s=Vn.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0s?(t.sortIndex=r,hW(Z0,t),tf(pA)===null&&t===tf(Z0)&&(ZS?TF():ZS=!0,zS(dW,r-s))):(t.sortIndex=a,hW(pA,t),Tm||FF||(Tm=!0,mw(mW))),t};Vn.unstable_wrapCallback=function(t){var e=ea;return function(){var r=ea;ea=e;try{return t.apply(this,arguments)}finally{ea=r}}}});var yW=L((zpr,DDe)=>{"use strict";DDe.exports=SDe()});var bDe=L((Zpr,XS)=>{XS.exports=function(e){var r={},s=V9(),a=hn(),n=yW();function c(v){for(var D="https://reactjs.org/docs/error-decoder.html?invariant="+v,Q=1;QUe||V[Se]!==ne[Ue])return` +`+V[Se].replace(" at new "," at ");while(1<=Se&&0<=Ue);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?ac(v):""}var lc=[],Li=-1;function so(v){return{current:v}}function Rt(v){0>Li||(v.current=lc[Li],lc[Li]=null,Li--)}function xn(v,D){Li++,lc[Li]=v.current,v.current=D}var ca={},qi=so(ca),Mi=so(!1),Oa=ca;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return ca;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Jn(v){return v=v.childContextTypes,v!=null}function hu(){Rt(Mi),Rt(qi)}function Ih(v,D,Q){if(qi.current!==ca)throw Error(c(168));xn(qi,D),xn(Mi,Q)}function La(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||"Unknown",V));return s({},Q,H)}function Ma(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||ca,Oa=qi.current,xn(qi,v),xn(Mi,Mi.current),!0}function Ua(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=La(v,D,Oa),H.__reactInternalMemoizedMergedChildContext=v,Rt(Mi),Rt(qi),xn(qi,v)):Rt(Mi),xn(Mi,Q)}var Xe=null,Ha=null,gf=n.unstable_now;gf();var cc=0,wn=8;function ua(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function _A(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function UA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function fa(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,Ue=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var At=ne&~Se;At!==0?(H=ua(At),V=wn):(Ue&=ne,Ue!==0&&(H=ua(Ue),V=wn))}else ne=Q&~Se,ne!==0?(H=ua(ne),V=wn):Ue!==0&&(H=ua(Ue),V=wn);if(H===0)return 0;if(H=31-is(H),H=Q&((0>H?0:1<Q;Q++)D.push(v);return D}function ja(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-is(D),v[D]=Q}var is=Math.clz32?Math.clz32:fc,uc=Math.log,gu=Math.LN2;function fc(v){return v===0?32:31-(uc(v)/gu|0)|0}var qa=n.unstable_runWithPriority,_i=n.unstable_scheduleCallback,ws=n.unstable_cancelCallback,Sl=n.unstable_shouldYield,df=n.unstable_requestPaint,Ac=n.unstable_now,Bi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,pc=n.unstable_UserBlockingPriority,Je=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},ee=df!==void 0?df:function(){},Ee=null,Oe=null,gt=!1,yt=Ac(),Dt=1e4>yt?Ac:function(){return Ac()-yt};function tr(){switch(Bi()){case Qn:return 99;case pc:return 98;case Je:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function fn(v){switch(v){case 99:return Qn;case 98:return pc;case 97:return Je;case 96:return st;case 95:return St;default:throw Error(c(332))}}function li(v,D){return v=fn(v),qa(v,D)}function Gi(v,D,Q){return v=fn(v),_i(v,D,Q)}function Tn(){if(Oe!==null){var v=Oe;Oe=null,ws(v)}Ga()}function Ga(){if(!gt&&Ee!==null){gt=!0;var v=0;try{var D=Ee;li(99,function(){for(;vRn?(Un=kr,kr=null):Un=kr.sibling;var zr=Xt($e,kr,ht[Rn],Zt);if(zr===null){kr===null&&(kr=Un);break}v&&kr&&zr.alternate===null&&D($e,kr),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr,kr=Un}if(Rn===ht.length)return Q($e,kr),Sr;if(kr===null){for(;RnRn?(Un=kr,kr=null):Un=kr.sibling;var ci=Xt($e,kr,zr.value,Zt);if(ci===null){kr===null&&(kr=Un);break}v&&kr&&ci.alternate===null&&D($e,kr),qe=ne(ci,qe,Rn),Xn===null?Sr=ci:Xn.sibling=ci,Xn=ci,kr=Un}if(zr.done)return Q($e,kr),Sr;if(kr===null){for(;!zr.done;Rn++,zr=ht.next())zr=Lr($e,zr.value,Zt),zr!==null&&(qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return Sr}for(kr=H($e,kr);!zr.done;Rn++,zr=ht.next())zr=zn(kr,$e,Rn,zr.value,Zt),zr!==null&&(v&&zr.alternate!==null&&kr.delete(zr.key===null?Rn:zr.key),qe=ne(zr,qe,Rn),Xn===null?Sr=zr:Xn.sibling=zr,Xn=zr);return v&&kr.forEach(function(Pu){return D($e,Pu)}),Sr}return function($e,qe,ht,Zt){var Sr=typeof ht=="object"&&ht!==null&&ht.type===E&&ht.key===null;Sr&&(ht=ht.props.children);var Xn=typeof ht=="object"&&ht!==null;if(Xn)switch(ht.$$typeof){case p:e:{for(Xn=ht.key,Sr=qe;Sr!==null;){if(Sr.key===Xn){switch(Sr.tag){case 7:if(ht.type===E){Q($e,Sr.sibling),qe=V(Sr,ht.props.children),qe.return=$e,$e=qe;break e}break;default:if(Sr.elementType===ht.type){Q($e,Sr.sibling),qe=V(Sr,ht.props),qe.ref=mt($e,Sr,ht),qe.return=$e,$e=qe;break e}}Q($e,Sr);break}else D($e,Sr);Sr=Sr.sibling}ht.type===E?(qe=Qf(ht.props.children,$e.mode,Zt,ht.key),qe.return=$e,$e=qe):(Zt=id(ht.type,ht.key,ht.props,null,$e.mode,Zt),Zt.ref=mt($e,qe,ht),Zt.return=$e,$e=Zt)}return Se($e);case h:e:{for(Sr=ht.key;qe!==null;){if(qe.key===Sr)if(qe.tag===4&&qe.stateNode.containerInfo===ht.containerInfo&&qe.stateNode.implementation===ht.implementation){Q($e,qe.sibling),qe=V(qe,ht.children||[]),qe.return=$e,$e=qe;break e}else{Q($e,qe);break}else D($e,qe);qe=qe.sibling}qe=Ro(ht,$e.mode,Zt),qe.return=$e,$e=qe}return Se($e)}if(typeof ht=="string"||typeof ht=="number")return ht=""+ht,qe!==null&&qe.tag===6?(Q($e,qe.sibling),qe=V(qe,ht),qe.return=$e,$e=qe):(Q($e,qe),qe=b2(ht,$e.mode,Zt),qe.return=$e,$e=qe),Se($e);if(yf(ht))return yi($e,qe,ht,Zt);if(Ce(ht))return Za($e,qe,ht,Zt);if(Xn&&mu($e,ht),typeof ht>"u"&&!Sr)switch($e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(c(152,g($e.type)||"Component"))}return Q($e,qe)}}var Lg=Cy(!0),e2=Cy(!1),Dh={},ur=so(Dh),Zi=so(Dh),Ef=so(Dh);function Wa(v){if(v===Dh)throw Error(c(174));return v}function Mg(v,D){xn(Ef,D),xn(Zi,v),xn(ur,Dh),v=dt(D),Rt(ur),xn(ur,v)}function yu(){Rt(ur),Rt(Zi),Rt(Ef)}function If(v){var D=Wa(Ef.current),Q=Wa(ur.current);D=j(Q,v.type,D),Q!==D&&(xn(Zi,v),xn(ur,D))}function wt(v){Zi.current===v&&(Rt(ur),Rt(Zi))}var di=so(0);function WA(v){for(var D=v;D!==null;){if(D.tag===13){var Q=D.memoizedState;if(Q!==null&&(Q=Q.dehydrated,Q===null||gr(Q)||So(Q)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if(D.flags&64)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===v)break;for(;D.sibling===null;){if(D.return===null||D.return===v)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}var Ya=null,pa=null,Va=!1;function _g(v,D){var Q=za(5,null,null,0);Q.elementType="DELETED",Q.type="DELETED",Q.stateNode=D,Q.return=v,Q.flags=8,v.lastEffect!==null?(v.lastEffect.nextEffect=Q,v.lastEffect=Q):v.firstEffect=v.lastEffect=Q}function bh(v,D){switch(v.tag){case 5:return D=la(D,v.type,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 6:return D=OA(D,v.pendingProps),D!==null?(v.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function Ug(v){if(Va){var D=pa;if(D){var Q=D;if(!bh(v,D)){if(D=Me(Q),!D||!bh(v,D)){v.flags=v.flags&-1025|2,Va=!1,Ya=v;return}_g(Ya,Q)}Ya=v,pa=fu(D)}else v.flags=v.flags&-1025|2,Va=!1,Ya=v}}function wy(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;Ya=v}function YA(v){if(!Z||v!==Ya)return!1;if(!Va)return wy(v),Va=!0,!1;var D=v.type;if(v.tag!==5||D!=="head"&&D!=="body"&&!it(D,v.memoizedProps))for(D=pa;D;)_g(v,D),D=Me(D);if(wy(v),v.tag===13){if(!Z)throw Error(c(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(c(317));pa=LA(v)}else pa=Ya?Me(v.stateNode):null;return!0}function Hg(){Z&&(pa=Ya=null,Va=!1)}var Eu=[];function Iu(){for(var v=0;vne))throw Error(c(301));ne+=1,ki=ss=null,D.updateQueue=null,Cf.current=re,v=Q(H,V)}while(wf)}if(Cf.current=kt,D=ss!==null&&ss.next!==null,Cu=0,ki=ss=qn=null,VA=!1,D)throw Error(c(300));return v}function os(){var v={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ki===null?qn.memoizedState=ki=v:ki=ki.next=v,ki}function xl(){if(ss===null){var v=qn.alternate;v=v!==null?v.memoizedState:null}else v=ss.next;var D=ki===null?qn.memoizedState:ki.next;if(D!==null)ki=D,ss=v;else{if(v===null)throw Error(c(310));ss=v,v={memoizedState:ss.memoizedState,baseState:ss.baseState,baseQueue:ss.baseQueue,queue:ss.queue,next:null},ki===null?qn.memoizedState=ki=v:ki=ki.next=v}return ki}function ko(v,D){return typeof D=="function"?D(v):D}function Bf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=ss,V=H.baseQueue,ne=Q.pending;if(ne!==null){if(V!==null){var Se=V.next;V.next=ne.next,ne.next=Se}H.baseQueue=V=ne,Q.pending=null}if(V!==null){V=V.next,H=H.baseState;var Ue=Se=ne=null,At=V;do{var Gt=At.lane;if((Cu&Gt)===Gt)Ue!==null&&(Ue=Ue.next={lane:0,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null}),H=At.eagerReducer===v?At.eagerState:v(H,At.action);else{var vr={lane:Gt,action:At.action,eagerReducer:At.eagerReducer,eagerState:At.eagerState,next:null};Ue===null?(Se=Ue=vr,ne=H):Ue=Ue.next=vr,qn.lanes|=Gt,Zg|=Gt}At=At.next}while(At!==null&&At!==V);Ue===null?ne=H:Ue.next=Se,Do(H,D.memoizedState)||(Ke=!0),D.memoizedState=H,D.baseState=ne,D.baseQueue=Ue,Q.lastRenderedState=H}return[D.memoizedState,Q.dispatch]}function vf(v){var D=xl(),Q=D.queue;if(Q===null)throw Error(c(311));Q.lastRenderedReducer=v;var H=Q.dispatch,V=Q.pending,ne=D.memoizedState;if(V!==null){Q.pending=null;var Se=V=V.next;do ne=v(ne,Se.action),Se=Se.next;while(Se!==V);Do(ne,D.memoizedState)||(Ke=!0),D.memoizedState=ne,D.baseQueue===null&&(D.baseState=ne),Q.lastRenderedState=ne}return[ne,H]}function kl(v,D,Q){var H=D._getVersion;H=H(D._source);var V=y?D._workInProgressVersionPrimary:D._workInProgressVersionSecondary;if(V!==null?v=V===H:(v=v.mutableReadLanes,(v=(Cu&v)===v)&&(y?D._workInProgressVersionPrimary=H:D._workInProgressVersionSecondary=H,Eu.push(D))),v)return Q(D._source);throw Eu.push(D),Error(c(350))}function yn(v,D,Q,H){var V=ao;if(V===null)throw Error(c(349));var ne=D._getVersion,Se=ne(D._source),Ue=Cf.current,At=Ue.useState(function(){return kl(V,D,Q)}),Gt=At[1],vr=At[0];At=ki;var Lr=v.memoizedState,Xt=Lr.refs,zn=Xt.getSnapshot,yi=Lr.source;Lr=Lr.subscribe;var Za=qn;return v.memoizedState={refs:Xt,source:D,subscribe:H},Ue.useEffect(function(){Xt.getSnapshot=Q,Xt.setSnapshot=Gt;var $e=ne(D._source);if(!Do(Se,$e)){$e=Q(D._source),Do(vr,$e)||(Gt($e),$e=Ss(Za),V.mutableReadLanes|=$e&V.pendingLanes),$e=V.mutableReadLanes,V.entangledLanes|=$e;for(var qe=V.entanglements,ht=$e;0Q?98:Q,function(){v(!0)}),li(97m2&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432)}else{if(!V)if(v=WA(ne),v!==null){if(D.flags|=64,V=!0,v=v.updateQueue,v!==null&&(D.updateQueue=v,D.flags|=4),$A(H,!0),H.tail===null&&H.tailMode==="hidden"&&!ne.alternate&&!Va)return D=D.lastEffect=H.lastEffect,D!==null&&(D.nextEffect=null),null}else 2*Dt()-H.renderingStartTime>m2&&Q!==1073741824&&(D.flags|=64,V=!0,$A(H,!1),D.lanes=33554432);H.isBackwards?(ne.sibling=D.child,D.child=ne):(v=H.last,v!==null?v.sibling=ne:D.child=ne,H.last=ne)}return H.tail!==null?(v=H.tail,H.rendering=v,H.tail=v.sibling,H.lastEffect=D.lastEffect,H.renderingStartTime=Dt(),v.sibling=null,D=di.current,xn(di,V?D&1|2:D&1),v):null;case 23:case 24:return B2(),v!==null&&v.memoizedState!==null!=(D.memoizedState!==null)&&H.mode!=="unstable-defer-without-hiding"&&(D.flags|=4),null}throw Error(c(156,D.tag))}function YL(v){switch(v.tag){case 1:Jn(v.type)&&hu();var D=v.flags;return D&4096?(v.flags=D&-4097|64,v):null;case 3:if(yu(),Rt(Mi),Rt(qi),Iu(),D=v.flags,D&64)throw Error(c(285));return v.flags=D&-4097|64,v;case 5:return wt(v),null;case 13:return Rt(di),D=v.flags,D&4096?(v.flags=D&-4097|64,v):null;case 19:return Rt(di),null;case 4:return yu(),null;case 10:return Ng(v),null;case 23:case 24:return B2(),null;default:return null}}function Wg(v,D){try{var Q="",H=D;do Q+=$1(H),H=H.return;while(H);var V=Q}catch(ne){V=` +Error generating stack: `+ne.message+` +`+ne.stack}return{value:v,source:D,stack:V}}function Yg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var VL=typeof WeakMap=="function"?WeakMap:Map;function i2(v,D,Q){Q=bl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){My||(My=!0,y2=H),Yg(v,D)},Q}function Vg(v,D,Q){Q=bl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var V=D.value;Q.payload=function(){return Yg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(gc===null?gc=new Set([this]):gc.add(this),Yg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:""})}),Q}var KL=typeof WeakSet=="function"?WeakSet:Set;function s2(v){var D=v.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(Q){kf(v,Q)}else D.current=null}function by(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:bo(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Fs(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Fh(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function yP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(TP(Q,v),nM(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:bo(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Ey(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Re(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Ey(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&to(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:Z&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&Au(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function EP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?yh(H):no(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?Eh(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function Py(v,D){if(Ha&&typeof Ha.onCommitFiberUnmount=="function")try{Ha.onCommitFiberUnmount(Xe,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)TP(D,Q);else{H=D;try{V()}catch(ne){kf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(s2(D),v=D.stateNode,typeof v.componentWillUnmount=="function")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){kf(D,ne)}break;case 5:s2(D);break;case 4:F?BP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=lu(D),FA(D,v))}}function IP(v,D){for(var Q=D;;)if(Py(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function xy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function CP(v){return v.tag===5||v.tag===3||v.tag===4}function wP(v){if(F){e:{for(var D=v.return;D!==null;){if(CP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(pf(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||CP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?o2(v,Q,D):a2(v,Q,D)}}function o2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ro(Q,v,D):wo(Q,v);else if(H!==4&&(v=v.child,v!==null))for(o2(v,D,Q),v=v.sibling;v!==null;)o2(v,D,Q),v=v.sibling}function a2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?ji(Q,v,D):ai(Q,v);else if(H!==4&&(v=v.child,v!==null))for(a2(v,D,Q),v=v.sibling;v!==null;)a2(v,D,Q),v=v.sibling}function BP(v,D){for(var Q=D,H=!1,V,ne;;){if(!H){H=Q.return;e:for(;;){if(H===null)throw Error(c(160));switch(V=H.stateNode,H.tag){case 5:ne=!1;break e;case 3:V=V.containerInfo,ne=!0;break e;case 4:V=V.containerInfo,ne=!0;break e}H=H.return}H=!0}if(Q.tag===5||Q.tag===6)IP(v,Q),ne?RA(V,Q.stateNode):vo(V,Q.stateNode);else if(Q.tag===4){if(Q.child!==null){V=Q.stateNode.containerInfo,ne=!0,Q.child.return=Q,Q=Q.child;continue}}else if(Py(v,Q),Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return,Q.tag===4&&(H=!1)}Q.sibling.return=Q.return,Q=Q.sibling}}function l2(v,D){if(F){switch(D.tag){case 0:case 11:case 14:case 15:case 22:Fh(3,D);return;case 1:return;case 5:var Q=D.stateNode;if(Q!=null){var H=D.memoizedProps;v=v!==null?v.memoizedProps:H;var V=D.type,ne=D.updateQueue;D.updateQueue=null,ne!==null&&Bo(Q,ne,V,v,H,D)}return;case 6:if(D.stateNode===null)throw Error(c(162));Q=D.memoizedProps,ns(D.stateNode,v!==null?v.memoizedProps:Q,Q);return;case 3:Z&&(D=D.stateNode,D.hydrate&&(D.hydrate=!1,MA(D.containerInfo)));return;case 12:return;case 13:vP(D),Kg(D);return;case 19:Kg(D);return;case 17:return;case 23:case 24:EP(D,D.memoizedState!==null);return}throw Error(c(163))}switch(D.tag){case 0:case 11:case 14:case 15:case 22:Fh(3,D);return;case 12:return;case 13:vP(D),Kg(D);return;case 19:Kg(D);return;case 3:Z&&(Q=D.stateNode,Q.hydrate&&(Q.hydrate=!1,MA(Q.containerInfo)));break;case 23:case 24:return}e:if(z){switch(D.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:D=D.stateNode,FA(D.containerInfo,D.pendingChildren);break e}throw Error(c(163))}}function vP(v){v.memoizedState!==null&&(d2=Dt(),F&&EP(v.child,!0))}function Kg(v){var D=v.updateQueue;if(D!==null){v.updateQueue=null;var Q=v.stateNode;Q===null&&(Q=v.stateNode=new KL),D.forEach(function(H){var V=sM.bind(null,v,H);Q.has(H)||(Q.add(H),H.then(V,V))})}}function JL(v,D){return v!==null&&(v=v.memoizedState,v===null||v.dehydrated!==null)?(D=D.memoizedState,D!==null&&D.dehydrated===null):!1}var ky=0,Qy=1,Ty=2,Jg=3,Ry=4;if(typeof Symbol=="function"&&Symbol.for){var zg=Symbol.for;ky=zg("selector.component"),Qy=zg("selector.has_pseudo_class"),Ty=zg("selector.role"),Jg=zg("selector.test_id"),Ry=zg("selector.text")}function Fy(v){var D=$(v);if(D!=null){if(typeof D.memoizedProps["data-testname"]!="string")throw Error(c(364));return D}if(v=ir(v),v===null)throw Error(c(362));return v.stateNode.current}function Df(v,D){switch(D.$$typeof){case ky:if(v.type===D.value)return!0;break;case Qy:e:{D=D.value,v=[v,0];for(var Q=0;Q";case Qy:return":has("+(bf(v)||"")+")";case Ty:return'[role="'+v.value+'"]';case Ry:return'"'+v.value+'"';case Jg:return'[data-testname="'+v.value+'"]';default:throw Error(c(365,v))}}function c2(v,D){var Q=[];v=[v,0];for(var H=0;HV&&(V=Se),Q&=~ne}if(Q=V,Q=Dt()-Q,Q=(120>Q?120:480>Q?480:1080>Q?1080:1920>Q?1920:3e3>Q?3e3:4320>Q?4320:1960*ZL(Q/1960))-Q,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}vs!==5&&(vs=2),At=Wg(At,Ue),Xt=Se;do{switch(Xt.tag){case 3:ne=At,Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Xn=i2(Xt,ne,D);yy(Xt,Xn);break e;case 1:ne=At;var kr=Xt.type,Rn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof kr.getDerivedStateFromError=="function"||Rn!==null&&typeof Rn.componentDidCatch=="function"&&(gc===null||!gc.has(Rn)))){Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Un=Vg(Xt,ne,D);yy(Xt,Un);break e}}Xt=Xt.return}while(Xt!==null)}QP(Q)}catch(zr){D=zr,Xi===Q&&Q!==null&&(Xi=Q=Q.return);continue}break}while(!0)}function xP(){var v=Oy.current;return Oy.current=kt,v===null?kt:v}function nd(v,D){var Q=xr;xr|=16;var H=xP();ao===v&&Ls===D||Mh(v,D);do try{$L();break}catch(V){PP(v,V)}while(!0);if(Rg(),xr=Q,Oy.current=H,Xi!==null)throw Error(c(261));return ao=null,Ls=0,vs}function $L(){for(;Xi!==null;)kP(Xi)}function eM(){for(;Xi!==null&&!Sl();)kP(Xi)}function kP(v){var D=NP(v.alternate,v,ep);v.memoizedProps=v.pendingProps,D===null?QP(v):Xi=D,f2.current=null}function QP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=YL(D),Q!==null){Q.flags&=2047,Xi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=WL(Q,D,ep),Q!==null){Xi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||ep&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1Dt()-d2?Mh(v,0):h2|=Q),da(v,D)}function sM(v,D){var Q=v.stateNode;Q!==null&&Q.delete(D),D=0,D===0&&(D=v.mode,D&2?D&4?(Su===0&&(Su=Nh),D=kn(62914560&~Su),D===0&&(D=4194304)):D=tr()===99?1:2:D=1),Q=To(),v=Hy(v,D),v!==null&&(ja(v,D,Q),da(v,Q))}var NP;NP=function(v,D,Q){var H=D.lanes;if(v!==null)if(v.memoizedProps!==D.pendingProps||Mi.current)Ke=!0;else if(Q&H)Ke=!!(v.flags&16384);else{switch(Ke=!1,D.tag){case 3:Sy(D),Hg();break;case 5:If(D);break;case 1:Jn(D.type)&&Ma(D);break;case 4:Mg(D,D.stateNode.containerInfo);break;case 10:Fg(D,D.memoizedProps.value);break;case 13:if(D.memoizedState!==null)return Q&D.child.childLanes?r2(v,D,Q):(xn(di,di.current&1),D=Gn(v,D,Q),D!==null?D.sibling:null);xn(di,di.current&1);break;case 19:if(H=(Q&D.childLanes)!==0,v.flags&64){if(H)return mP(v,D,Q);D.flags|=64}var V=D.memoizedState;if(V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),xn(di,di.current),H)break;return null;case 23:case 24:return D.lanes=0,mi(v,D,Q)}return Gn(v,D,Q)}else Ke=!1;switch(D.lanes=0,D.tag){case 2:if(H=D.type,v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,V=dn(D,qi.current),mf(D,Q),V=qg(null,D,H,v,V,Q),D.flags|=1,typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0){if(D.tag=1,D.memoizedState=null,D.updateQueue=null,Jn(H)){var ne=!0;Ma(D)}else ne=!1;D.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Sh(D);var Se=H.getDerivedStateFromProps;typeof Se=="function"&&jA(D,H,Se,v),V.updater=qA,D.stateNode=V,V._reactInternals=D,xo(D,H,v,Q),D=t2(null,D,H,!0,ne,Q)}else D.tag=0,ft(null,D,V,Q),D=D.child;return D;case 16:V=D.elementType;e:{switch(v!==null&&(v.alternate=null,D.alternate=null,D.flags|=2),v=D.pendingProps,ne=V._init,V=ne(V._payload),D.type=V,ne=D.tag=aM(V),v=bo(V,v),ne){case 0:D=zA(null,D,V,v,Q);break e;case 1:D=dP(null,D,V,v,Q);break e;case 11:D=dr(null,D,V,v,Q);break e;case 14:D=Br(null,D,V,bo(V.type,v),H,Q);break e}throw Error(c(306,V,""))}return D;case 0:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),zA(v,D,H,V,Q);case 1:return H=D.type,V=D.pendingProps,V=D.elementType===H?V:bo(H,V),dP(v,D,H,V,Q);case 3:if(Sy(D),H=D.updateQueue,v===null||H===null)throw Error(c(282));if(H=D.pendingProps,V=D.memoizedState,V=V!==null?V.element:null,Og(v,D),HA(D,H,null,Q),H=D.memoizedState.element,H===V)Hg(),D=Gn(v,D,Q);else{if(V=D.stateNode,(ne=V.hydrate)&&(Z?(pa=fu(D.stateNode.containerInfo),Ya=D,ne=Va=!0):ne=!1),ne){if(Z&&(v=V.mutableSourceEagerHydrationData,v!=null))for(V=0;V=Gt&&ne>=Lr&&V<=vr&&Se<=Xt){v.splice(D,1);break}else if(H!==Gt||Q.width!==At.width||XtSe){if(!(ne!==Lr||Q.height!==At.height||vrV)){Gt>H&&(At.width+=Gt-H,At.x=H),vrne&&(At.height+=Lr-ne,At.y=ne),XtQ&&(Q=Se)),Se ")+` + +No matching component was found for: + `)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Re(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:cM,findFiberByHostInstance:v.findFiberByHostInstance||uM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{Xe=D.inject(v),Ha=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!qt)throw Error(c(363));v=u2(v,D);var V=nn(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=cc;try{return cc=v,D()}finally{cc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(Pf(),Tn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=To(),Se=Ss(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var Ue=Q;do{switch(Ue.tag){case 3:Ue=Ue.stateNode.context;break t;case 1:if(Jn(Ue.type)){Ue=Ue.stateNode.__reactInternalMemoizedMergedChildContext;break t}}Ue=Ue.return}while(Ue!==null);throw Error(c(171))}if(Q.tag===1){var At=Q.type;if(Jn(At)){Q=La(Q,At,Ue);break e}}Q=Ue}else Q=ca;return D.context===null?D.context=Q:D.pendingContext=Q,D=bl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),Pl(V,D),Rl(V,Se,ne),Se},r}});var xDe=L((Xpr,PDe)=>{"use strict";PDe.exports=bDe()});var QDe=L(($pr,kDe)=>{"use strict";var mPt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};kDe.exports=mPt});var NDe=L((ehr,FDe)=>{"use strict";var yPt=Object.assign||function(t){for(var e=1;e"}}]),t}(),TDe=function(){NF(t,null,[{key:"fromJS",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){IW(this,t),this.width=e,this.height=r}return NF(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toString",value:function(){return""}}]),t}(),RDe=function(){function t(e,r){IW(this,t),this.unit=e,this.value=r}return NF(t,[{key:"fromJS",value:function(r){r(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case rf.UNIT_POINT:return String(this.value);case rf.UNIT_PERCENT:return this.value+"%";case rf.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),t}();FDe.exports=function(t,e){function r(c,f,p){var h=c[f];c[f]=function(){for(var E=arguments.length,C=Array(E),S=0;S1?C-1:0),P=1;P1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:rf.DIRECTION_LTR;return c.call(this,f,p,h)}),yPt({Config:e.Config,Node:e.Node,Layout:t("Layout",EPt),Size:t("Size",TDe),Value:t("Value",RDe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},rf)}});var ODe=L((exports,module)=>{(function(t,e){typeof define=="function"&&define.amd?define([],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall("nbind_init")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof Ie=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),e=nodePath.normalize(e);var s=nodeFS.readFileSync(e);return r?s:s.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert(typeof r=="object"),r},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,s){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):s()},a.onerror=s,a.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(t){document.title=t})}else throw"Unknown runtime environment. Where are we?";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(t[t.length-1]==="*")return Runtime.QUANTUM_SIZE;if(t[0]==="i"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e==="double"||e==="i64"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t=="i64"||t=="double")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module["dynCall_"+t].apply(null,[e].concat(r)):Module["dynCall_"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var s=enlargeMemory();if(!s)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var s=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return s},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort("Assertion failed: "+e)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(t){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,s,a,n){var c=getCFunc(e),f=[],p=0;if(a)for(var h=0;h>0]=e;break;case"i8":HEAP8[t>>0]=e;break;case"i16":HEAP16[t>>1]=e;break;case"i32":HEAP32[t>>2]=e;break;case"i64":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case"float":HEAPF32[t>>2]=e;break;case"double":HEAPF64[t>>3]=e;break;default:abort("invalid type for setValue: "+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return HEAP8[t>>0];case"i8":return HEAP8[t>>0];case"i16":return HEAP16[t>>1];case"i32":return HEAP32[t>>2];case"i64":return HEAP32[t>>2];case"float":return HEAPF32[t>>2];case"double":return HEAPF64[t>>3];default:abort("invalid type for setValue: "+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,s){var a,n;typeof t=="number"?(a=!0,n=t):(a=!1,n=t.length);var c=typeof e=="string"?e:null,f;if(r==ALLOC_NONE?f=s:f=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,c?1:e.length)),a){var s=f,p;for(assert((f&3)==0),p=f+(n&-4);s>2]=0;for(p=f+n;s>0]=0;return f}if(c==="i8")return t.subarray||t.slice?HEAPU8.set(t,f):HEAPU8.set(new Uint8Array(t),f),f;for(var h=0,E,C,S;h>0],r|=s,!(s==0&&!e||(a++,e&&a==e)););e||(e=a);var n="";if(r<128){for(var c=1024,f;e>0;)f=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,c))),n=n?n+f:f,t+=c,e-=c;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e="";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var s,a,n,c,f,p,h="";;){if(s=t[e++],!s)return h;if(!(s&128)){h+=String.fromCharCode(s);continue}if(a=t[e++]&63,(s&224)==192){h+=String.fromCharCode((s&31)<<6|a);continue}if(n=t[e++]&63,(s&240)==224?s=(s&15)<<12|a<<6|n:(c=t[e++]&63,(s&248)==240?s=(s&7)<<18|a<<12|n<<6|c:(f=t[e++]&63,(s&252)==248?s=(s&3)<<24|a<<18|n<<12|c<<6|f:(p=t[e++]&63,s=(s&1)<<30|a<<24|n<<18|c<<12|f<<6|p))),s<65536)h+=String.fromCharCode(s);else{var E=s-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,s){if(!(s>0))return 0;for(var a=r,n=r+s-1,c=0;c=55296&&f<=57343&&(f=65536+((f&1023)<<10)|t.charCodeAt(++c)&1023),f<=127){if(r>=n)break;e[r++]=f}else if(f<=2047){if(r+1>=n)break;e[r++]=192|f>>6,e[r++]=128|f&63}else if(f<=65535){if(r+2>=n)break;e[r++]=224|f>>12,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=2097151){if(r+3>=n)break;e[r++]=240|f>>18,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else if(f<=67108863){if(r+4>=n)break;e[r++]=248|f>>24,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}else{if(r+5>=n)break;e[r++]=252|f>>30,e[r++]=128|f>>24&63,e[r++]=128|f>>18&63,e[r++]=128|f>>12&63,e[r++]=128|f>>6&63,e[r++]=128|f&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r=55296&&s<=57343&&(s=65536+((s&1023)<<10)|t.charCodeAt(++r)&1023),s<=127?++e:s<=2047?e+=2:s<=65535?e+=3:s<=2097151?e+=4:s<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),s=lengthBytesUTF8(r)+1,a=_malloc(s);stringToUTF8(r,a,s);var n=_malloc(4),c=e(a,0,0,n);if(getValue(n,"i32")===0&&c)return Pointer_stringify(c)}catch{}finally{a&&_free(a),n&&_free(n),c&&_free(c)}return t}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t}function demangleAll(t){var e=/__Z[\w\d_]+/g;return t.replace(e,function(r){var s=demangle(r);return r===s?r:r+" ["+s+"]"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=` +`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r255&&(s&=255),e.push(String.fromCharCode(s))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,s,a,n,c,f){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,s,a,n,c,f){return ASM_CONSTS[t](e,r,s,a,n,c,f)}function _emscripten_asm_const_iiiii(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiidddddd(t,e,r,s,a,n,c,f,p){return ASM_CONSTS[t](e,r,s,a,n,c,f,p)}function _emscripten_asm_const_iiididi(t,e,r,s,a,n,c){return ASM_CONSTS[t](e,r,s,a,n,c)}function _emscripten_asm_const_iiii(t,e,r,s){return ASM_CONSTS[t](e,r,s)}function _emscripten_asm_const_iiiid(t,e,r,s,a){return ASM_CONSTS[t](e,r,s,a)}function _emscripten_asm_const_iiiiii(t,e,r,s,a,n){return ASM_CONSTS[t](e,r,s,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(t,e,r,s){var a=arguments.length,n=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,r):s,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,s);else for(var f=t.length-1;f>=0;f--)(c=t[f])&&(n=(a<3?c(n):a>3?c(e,r,n):c(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,s){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=s/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var c=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method="timeout";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(t==2){if(!window.setImmediate){let n=function(c){c.source===window&&c.data===s&&(c.stopPropagation(),r.shift()())};var a=n,r=[],s="setimmediate";window.addEventListener("message",n,!0),window.setImmediate=function(f){r.push(f),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(f),window.postMessage({target:s})):window.postMessage(s,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,s,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=t,Browser.mainLoop.arg=s;var n;typeof s<"u"?n=function(){Module.dynCall_vi(t,s)}:n=function(){Module.dynCall_v(t)};var c=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,C=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=C:(C=C+.5,Browser.mainLoop.remainingBlockers=(8*E+C)/9)}if(console.log('main loop blocker "'+h.name+'" took '+(Date.now()-p)+" ms"),Browser.mainLoop.updateStatus(),c1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(n),!(c0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||"Please wait...",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,c,f,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(c)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(c)}))}catch(P){Runtime.warnOnce("Blob constructor present but fails: "+P+"; falling back to blob builder")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var C=Browser.URLObject.createObjectURL(h),S=new Image;S.onload=function(){assert(S.complete,"Image "+c+" could not be decoded");var I=document.createElement("canvas");I.width=S.width,I.height=S.height;var R=I.getContext("2d");R.drawImage(S,0,0),Module.preloadedImages[c]=I,Browser.URLObject.revokeObjectURL(C),f&&f(n)},S.onerror=function(I){console.log("Image "+C+" could not be decoded"),p&&p()},S.src=C},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},e.handle=function(n,c,f,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[c]=R,f&&f(n))}function C(){h||(h=!0,Module.preloadedAudios[c]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var S=new Blob([n],{type:Browser.getMimetype(c)})}catch{return C()}var P=Browser.URLObject.createObjectURL(S),I=new Audio;I.addEventListener("canplaythrough",function(){E(I)},!1),I.onerror=function(N){if(h)return;console.log("warning: browser could not fully decode audio "+c+", trying slower base64 approach");function U(W){for(var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ie="=",Ae="",ce=0,me=0,pe=0;pe=6;){var Be=ce>>me-6&63;me-=6,Ae+=te[Be]}return me==2?(Ae+=te[(ce&3)<<4],Ae+=ie+ie):me==4&&(Ae+=te[(ce&15)<<2],Ae+=ie),Ae}I.src="data:audio/x-"+c.substr(-3)+";base64,"+U(n),E(I)},I.src=P,Browser.safeSetTimeout(function(){E(I)},1e4)}else return C()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var s=Module.canvas;s&&(s.requestPointerLock=s.requestPointerLock||s.mozRequestPointerLock||s.webkitRequestPointerLock||s.msRequestPointerLock||function(){},s.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},s.exitPointerLock=s.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&s.addEventListener("click",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,s){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var c={antialias:!1,alpha:!1};if(s)for(var f in s)c[f]=s[f];n=GL.createContext(t,c),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext("2d");return a?(r&&(e||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var s=Module.canvas;function a(){Browser.isFullscreen=!1;var c=s.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===c?(s.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},s.exitFullscreen=s.exitFullscreen.bind(document),Browser.lockPointer&&s.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(s)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("MSFullscreenChange",a,!1));var n=document.createElement("div");s.parentNode.insertBefore(n,s),n.appendChild(s),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(s,a,n){return Browser.requestFullscreen(s,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>"u"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail;break;case"mousewheel":e=t.wheelDelta;break;case"wheel":e=t.deltaY;break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,s=Module.canvas.height,a=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var c=t.touch;if(c===void 0)return;var f=c.pageX-(a+e.left),p=c.pageY-(n+e.top);f=f*(r/e.width),p=p*(s/e.height);var h={x:f,y:p};if(t.type==="touchstart")Browser.lastTouches[c.identifier]=h,Browser.touches[c.identifier]=h;else if(t.type==="touchend"||t.type==="touchmove"){var E=Browser.touches[c.identifier];E||(E=h),Browser.lastTouches[c.identifier]=E,Browser.touches[c.identifier]=h}return}var C=t.pageX-(a+e.left),S=t.pageY-(n+e.top);C=C*(r/e.width),S=S*(s/e.height),Browser.mouseMovementX=C-Browser.mouseX,Browser.mouseMovementY=S-Browser.mouseY,Browser.mouseX=C,Browser.mouseY=S}},asyncLoad:function(t,e,r,s){var a=s?"":"al "+t;Module.readAsync(t,function(n){assert(n,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file "'+t+'" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var s=Module.canvas;Browser.updateCanvasDimensions(s,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var s=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(s/a>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(s){return(typeof FS>"u"||!(s instanceof FS.ErrnoError))&&abort(s),-s.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>"u"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function r(p,h,E,C,S,P){if(h==1){var I=C&896;(I==128||I==256||I==384)&&(p="X const")}var R;return P?R=E.replace("X",p).replace("Y",S):R=p.replace("X",E).replace("Y",S),R.replace(/([*&]) (?=[*&])/g,"$1")}function s(p,h,E,C,S){throw new Error(p+" type "+E.replace("X",h+"?")+(C?" with flag "+C:"")+" in "+S)}function a(p,h,E,C,S,P,I,R){P===void 0&&(P="X"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=C(p),W=U.placeholderFlag,te=e[W];I&&te&&(P=r(I[2],I[0],P,te[0],"?",!0));var ie;W==0&&(ie="Unbound"),W>=10&&(ie="Corrupt"),R>20&&(ie="Deeply nested"),ie&&s(ie,p,P,W,S||"?");var Ae=U.paramList[0],ce=a(Ae,h,E,C,S,P,te,R+1),me,pe={flags:te[0],id:p,name:"",paramList:[ce]},Be=[],Ce="?";switch(U.placeholderFlag){case 1:me=ce.spec;break;case 2:if((ce.flags&15360)==1024&&ce.spec.ptrSize==1){pe.flags=7168;break}case 3:case 6:case 5:me=ce.spec,ce.flags&15360;break;case 8:Ce=""+U.paramList[1],pe.paramList.push(U.paramList[1]);break;case 9:for(var g=0,we=U.paramList[1];g>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),c=SYSCALLS.get(),f=a;return FS.llseek(r,f,c),HEAP32[n>>2]=r.position,r.getdents&&f===0&&c===0&&(r.getdents=null),0}catch(p){return(typeof FS>"u"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),s=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,C){var S=___syscall146.buffers[E];assert(S),C===0||C===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(S,0)),S.length=0):S.push(C)});for(var c=0;c>2],p=HEAP32[s+(c*8+4)>>2],h=0;h"u"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;tt.pageSize/2||e>t.pageSize-r){var s=_nbind.typeNameTbl.NBind.proto;return s.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var s=HEAPU32[t.pagePtr];if(s){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],s=new r(e);return typeIdTbl[e.id]=s,_nbind.typeNameTbl[e.name]=s,s}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var s=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(s=[s[0],s.slice(1)]),{paramList:s,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r=="number"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply("",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},s=t.map(function(n){return r[n.name]||"i"}).join(""),a=Module["dynCall_"+s];if(!a)throw new Error("dynCall_"+s+" not found for "+e+"("+t.map(function(n){return n.name}).join(", ")+")");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,s){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,s)):(r.arity=s,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var s=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return s.heap=a[r.ptrSize*8],s.ptrSize=r.ptrSize,s}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a=="number")return a;throw new Error("Type mismatch")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error("Type mismatch")}if(e&&e.Strict){if(typeof t!="string")throw new Error("Type mismatch")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,s=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,s,r),s}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,s){return function(a){return pushCString(a,s)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(s){return!!s},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return"!!("+r+")"},e.prototype.makeWireWrite=function(r,s){return s&&s.Strict&&function(a){if(typeof a=="boolean")return a;throw new Error("Type mismatch")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(s){__extends(a,s);function a(n,c,f,p){var h=s.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=c,C=f,S=p;if(n!==_nbind.ptrMarker){var P=h.__nbindConstructor.apply(h,arguments);E=4608,S=HEAPU32[P/4],C=HEAPU32[P/4+1]}var I={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:C};S&&(R.__nbindShared=S,_nbind.mark(h));for(var N=0,U=Object.keys(R);N>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error("Invalid value slot "+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t=="number"?t:pushValue(t)*4096+valueBase}function pop64(t){return t=3?c=Buffer.from(n):c=new Buffer(n),c.copy(s)}else getBuffer(s).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,s,a,n){try{Module.dynCall_viiiii(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,s){try{return Module.dynCall_fiff(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,s,a){try{Module.dynCall_viddi(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,s){try{Module.dynCall_vidd(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,s){try{return Module.dynCall_iiii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,s){try{return Module.dynCall_diii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,s,a,n){try{Module.dynCall_viiddi(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,s,a,n,c){try{Module.dynCall_viiiiii(t,e,r,s,a,n,c)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,s,a,n){try{return Module.dynCall_iiiiii(t,e,r,s,a,n)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,s,a){try{Module.dynCall_viiid(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,s,a,n,c){try{Module.dynCall_viififi(t,e,r,s,a,n,c)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_viii(t,e,r,s){try{Module.dynCall_viii(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,s){try{Module.dynCall_viid(t,e,r,s)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(s){if(typeof s!="number"&&s!=="longjmp")throw s;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,s,a){try{Module.dynCall_viiii(t,e,r,s,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var s=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),c=new t.Uint8Array(r),f=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),C=e.DYNAMICTOP_PTR|0,S=e.tempDoublePtr|0,P=e.ABORT|0,I=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,W=0,te=0,ie=0,Ae=0,ce=t.NaN,me=t.Infinity,pe=0,Be=0,Ce=0,g=0,we=0,ye=0,fe=t.Math.floor,se=t.Math.abs,X=t.Math.sqrt,De=t.Math.pow,Re=t.Math.cos,dt=t.Math.sin,j=t.Math.tan,rt=t.Math.acos,Fe=t.Math.asin,Ne=t.Math.atan,Pe=t.Math.atan2,Ye=t.Math.exp,ke=t.Math.log,it=t.Math.ceil,_e=t.Math.imul,x=t.Math.min,w=t.Math.max,b=t.Math.clz32,y=t.Math.fround,F=e.abort,z=e.assert,Z=e.enlargeMemory,$=e.getTotalMemory,oe=e.abortOnCannotGrowMemory,xe=e.invoke_viiiii,Te=e.invoke_vif,lt=e.invoke_vid,It=e.invoke_fiff,qt=e.invoke_vi,ir=e.invoke_vii,Pt=e.invoke_ii,gn=e.invoke_viddi,Pr=e.invoke_vidd,Ir=e.invoke_iiii,Nr=e.invoke_diii,nn=e.invoke_di,ai=e.invoke_iid,wo=e.invoke_iii,ns=e.invoke_viiddi,to=e.invoke_viiiiii,Bo=e.invoke_dii,ji=e.invoke_i,ro=e.invoke_iiiiii,vo=e.invoke_viiid,RA=e.invoke_viififi,pf=e.invoke_viii,yh=e.invoke_v,Eh=e.invoke_viid,no=e.invoke_idd,jn=e.invoke_viiii,Fs=e._emscripten_asm_const_iiiii,io=e._emscripten_asm_const_iiidddddd,lu=e._emscripten_asm_const_iiiid,cu=e.__nbind_reference_external,uu=e._emscripten_asm_const_iiiiiiii,FA=e._removeAccessorPrefix,NA=e._typeModule,aa=e.__nbind_register_pool,la=e.__decorate,OA=e._llvm_stackrestore,gr=e.___cxa_atexit,So=e.__extends,Me=e.__nbind_get_value_object,fu=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Cr=e._emscripten_set_main_loop_timing,hf=e.__nbind_register_primitive,LA=e.__nbind_register_type,MA=e._emscripten_memcpy_big,Au=e.__nbind_register_function,pu=e.___setErrNo,ac=e.__nbind_register_class,ve=e.__nbind_finish,Nt=e._abort,lc=e._nbind_value,Li=e._llvm_stacksave,so=e.___syscall54,Rt=e._defineHidden,xn=e._emscripten_set_main_loop,ca=e._emscripten_get_now,qi=e.__nbind_register_callback_signature,Mi=e._emscripten_asm_const_iiiiii,Oa=e.__nbind_free_external,dn=e._emscripten_asm_const_iiii,Jn=e._emscripten_asm_const_iiididi,hu=e.___syscall6,Ih=e._atexit,La=e.___syscall140,Ma=e.___syscall146,Ua=y(0);let Xe=y(0);function Ha(o){o=o|0;var l=0;return l=I,I=I+o|0,I=I+15&-16,l|0}function gf(){return I|0}function cc(o){o=o|0,I=o}function wn(o,l){o=o|0,l=l|0,I=o,R=l}function ua(o,l){o=o|0,l=l|0,W||(W=o,te=l)}function _A(o){o=o|0,ye=o}function UA(){return ye|0}function fa(){var o=0,l=0;Qr(8104,8,400)|0,Qr(8504,408,540)|0,o=9044,l=o+44|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));s[9088]=0,s[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,gr(17,8104,U|0)|0}function vl(o){o=o|0,gt(o+948|0)}function Mt(o){return o=y(o),((EP(o)|0)&2147483647)>>>0>2139095040|0}function kn(o,l,u){o=o|0,l=l|0,u=u|0;e:do if(n[o+(l<<3)+4>>2]|0)o=o+(l<<3)|0;else{if((l|2|0)==3&&n[o+60>>2]|0){o=o+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[o+52>>2]|0){o=o+48|0;break e}break}default:}if(n[o+68>>2]|0){o=o+64|0;break}else{o=(l|1|0)==5?948:u;break}}while(!1);return o|0}function Aa(o){o=o|0;var l=0;return l=KP(1e3)|0,ja(o,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Qr(l|0,8104,1e3)|0,s[o+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=o,l|0}function ja(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Gg(o,5,3197,A)),I=d}function is(){return Aa(956)|0}function uc(o){o=o|0;var l=0;return l=Jt(1e3)|0,gu(l,o),ja(n[o+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function gu(o,l){o=o|0,l=l|0;var u=0;Qr(o|0,l|0,948)|0,vy(o+948|0,l+948|0),u=o+960|0,o=l+960|0,l=u+40|0;do n[u>>2]=n[o>>2],u=u+4|0,o=o+4|0;while((u|0)<(l|0))}function fc(o){o=o|0;var l=0,u=0,A=0,d=0;if(l=o+944|0,u=n[l>>2]|0,u|0&&(qa(u+948|0,o)|0,n[l>>2]=0),u=_i(o)|0,u|0){l=0;do n[(ws(o,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(u|0))}u=o+948|0,A=n[u>>2]|0,d=o+952|0,l=n[d>>2]|0,(l|0)!=(A|0)&&(n[d>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Sl(u),JP(o),n[2276]=(n[2276]|0)+-1}function qa(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0;A=n[o>>2]|0,k=o+4|0,u=n[k>>2]|0,m=u;e:do if((A|0)==(u|0))d=A,B=4;else for(o=A;;){if((n[o>>2]|0)==(l|0)){d=o,B=4;break e}if(o=o+4|0,(o|0)==(u|0)){o=0;break}}while(!1);return(B|0)==4&&((d|0)!=(u|0)?(A=d+4|0,o=m-A|0,l=o>>2,l&&(Q2(d|0,A|0,o|0)|0,u=n[k>>2]|0),o=d+(l<<2)|0,(u|0)==(o|0)||(n[k>>2]=u+(~((u+-4-o|0)>>>2)<<2)),o=1):o=0),o|0}function _i(o){return o=o|0,(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2|0}function ws(o,l){o=o|0,l=l|0;var u=0;return u=n[o+948>>2]|0,(n[o+952>>2]|0)-u>>2>>>0>l>>>0?o=n[u+(l<<2)>>2]|0:o=0,o|0}function Sl(o){o=o|0;var l=0,u=0,A=0,d=0;A=I,I=I+32|0,l=A,d=n[o>>2]|0,u=(n[o+4>>2]|0)-d|0,((n[o+8>>2]|0)-d|0)>>>0>u>>>0&&(d=u>>2,Py(l,d,d,o+8|0),IP(o,l),xy(l)),I=A}function df(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;_=_i(o)|0;do if(_|0){if((n[(ws(o,0)|0)+944>>2]|0)==(o|0)){if(!(qa(o+948|0,l)|0))break;Qr(l+400|0,8504,540)|0,n[l+944>>2]=0,Oe(o);break}B=n[(n[o+976>>2]|0)+12>>2]|0,k=o+948|0,T=(B|0)==0,u=0,m=0;do A=n[(n[k>>2]|0)+(m<<2)>>2]|0,(A|0)==(l|0)?Oe(o):(d=uc(A)|0,n[(n[k>>2]|0)+(u<<2)>>2]=d,n[d+944>>2]=o,T||y_[B&15](A,d,o,u),u=u+1|0),m=m+1|0;while((m|0)!=(_|0));if(u>>>0<_>>>0){T=o+948|0,k=o+952|0,B=u,u=n[k>>2]|0;do m=(n[T>>2]|0)+(B<<2)|0,A=m+4|0,d=u-A|0,l=d>>2,l&&(Q2(m|0,A|0,d|0)|0,u=n[k>>2]|0),d=u,A=m+(l<<2)|0,(d|0)!=(A|0)&&(u=d+(~((d+-4-A|0)>>>2)<<2)|0,n[k>>2]=u),B=B+1|0;while((B|0)!=(_|0))}}while(!1)}function Ac(o){o=o|0;var l=0,u=0,A=0,d=0;Bi(o,(_i(o)|0)==0,2491),Bi(o,(n[o+944>>2]|0)==0,2545),l=o+948|0,u=n[l>>2]|0,A=o+952|0,d=n[A>>2]|0,(d|0)!=(u|0)&&(n[A>>2]=d+(~((d+-4-u|0)>>>2)<<2)),Sl(l),l=o+976|0,u=n[l>>2]|0,Qr(o|0,8104,1e3)|0,s[u+2>>0]|0&&(n[o+4>>2]=2,n[o+12>>2]=4),n[l>>2]=u}function Bi(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;d=I,I=I+16|0,A=d,l||(n[A>>2]=u,Qo(o,5,3197,A)),I=d}function Qn(){return n[2276]|0}function pc(){var o=0;return o=KP(20)|0,Je((o|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[o>>2]=n[239],n[o+4>>2]=n[240],n[o+8>>2]=n[241],n[o+12>>2]=n[242],n[o+16>>2]=n[243],o|0}function Je(o,l){o=o|0,l=l|0;var u=0,A=0;A=I,I=I+16|0,u=A,o||(n[u>>2]=l,Qo(0,5,3197,u)),I=A}function st(o){o=o|0,JP(o),n[2277]=(n[2277]|0)+-1}function St(o,l){o=o|0,l=l|0;var u=0;l?(Bi(o,(_i(o)|0)==0,2629),u=1):(u=0,l=0),n[o+964>>2]=l,n[o+988>>2]=u}function lr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+8|0,d=A+4|0,B=A,n[d>>2]=l,Bi(o,(n[l+944>>2]|0)==0,2709),Bi(o,(n[o+964>>2]|0)==0,2763),ee(o),l=o+948|0,n[B>>2]=(n[l>>2]|0)+(u<<2),n[m>>2]=n[B>>2],Ee(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=o,Oe(o),I=A}function ee(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;if(u=_i(o)|0,u|0&&(n[(ws(o,0)|0)+944>>2]|0)!=(o|0)){A=n[(n[o+976>>2]|0)+12>>2]|0,d=o+948|0,m=(A|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=uc(B)|0,n[(n[d>>2]|0)+(l<<2)>>2]=k,n[k+944>>2]=o,m||y_[A&15](B,k,o,l),l=l+1|0;while((l|0)!=(u|0))}}function Ee(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0;tt=I,I=I+64|0,G=tt+52|0,k=tt+48|0,ae=tt+28|0,We=tt+24|0,Le=tt+20|0,Qe=tt,A=n[o>>2]|0,m=A,l=A+((n[l>>2]|0)-m>>2<<2)|0,A=o+4|0,d=n[A>>2]|0,B=o+8|0;do if(d>>>0<(n[B>>2]|0)>>>0){if((l|0)==(d|0)){n[l>>2]=n[u>>2],n[A>>2]=(n[A>>2]|0)+4;break}CP(o,l,d,l+4|0),l>>>0<=u>>>0&&(u=(n[A>>2]|0)>>>0>u>>>0?u+4|0:u),n[l>>2]=n[u>>2]}else{A=(d-m>>2)+1|0,d=O(o)|0,d>>>0>>0&&sn(o),M=n[o>>2]|0,_=(n[B>>2]|0)-M|0,m=_>>1,Py(Qe,_>>2>>>0>>1>>>0?m>>>0>>0?A:m:d,l-M>>2,o+8|0),M=Qe+8|0,A=n[M>>2]|0,m=Qe+12|0,_=n[m>>2]|0,B=_,T=A;do if((A|0)==(_|0)){if(_=Qe+4|0,A=n[_>>2]|0,Ze=n[Qe>>2]|0,d=Ze,A>>>0<=Ze>>>0){A=B-d>>1,A=A|0?A:1,Py(ae,A,A>>>2,n[Qe+16>>2]|0),n[We>>2]=n[_>>2],n[Le>>2]=n[M>>2],n[k>>2]=n[We>>2],n[G>>2]=n[Le>>2],o2(ae,k,G),A=n[Qe>>2]|0,n[Qe>>2]=n[ae>>2],n[ae>>2]=A,A=ae+4|0,Ze=n[_>>2]|0,n[_>>2]=n[A>>2],n[A>>2]=Ze,A=ae+8|0,Ze=n[M>>2]|0,n[M>>2]=n[A>>2],n[A>>2]=Ze,A=ae+12|0,Ze=n[m>>2]|0,n[m>>2]=n[A>>2],n[A>>2]=Ze,xy(ae),A=n[M>>2]|0;break}m=A,B=((m-d>>2)+1|0)/-2|0,k=A+(B<<2)|0,d=T-m|0,m=d>>2,m&&(Q2(k|0,A|0,d|0)|0,A=n[_>>2]|0),Ze=k+(m<<2)|0,n[M>>2]=Ze,n[_>>2]=A+(B<<2),A=Ze}while(!1);n[A>>2]=n[u>>2],n[M>>2]=(n[M>>2]|0)+4,l=wP(o,Qe,l)|0,xy(Qe)}while(!1);return I=tt,l|0}function Oe(o){o=o|0;var l=0;do{if(l=o+984|0,s[l>>0]|0)break;s[l>>0]=1,h[o+504>>2]=y(ce),o=n[o+944>>2]|0}while(o|0)}function gt(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function yt(o){return o=o|0,n[o+944>>2]|0}function Dt(o){o=o|0,Bi(o,(n[o+964>>2]|0)!=0,2832),Oe(o)}function tr(o){return o=o|0,(s[o+984>>0]|0)!=0|0}function fn(o,l){o=o|0,l=l|0,EYe(o,l,400)|0&&(Qr(o|0,l|0,400)|0,Oe(o))}function li(o){o=o|0;var l=Xe;return l=y(h[o+44>>2]),o=Mt(l)|0,y(o?y(0):l)}function Gi(o){o=o|0;var l=Xe;return l=y(h[o+48>>2]),Mt(l)|0&&(l=s[(n[o+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function Tn(o,l){o=o|0,l=l|0,n[o+980>>2]=l}function Ga(o){return o=o|0,n[o+980>>2]|0}function gy(o,l){o=o|0,l=l|0;var u=0;u=o+4|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function X1(o){return o=o|0,n[o+4>>2]|0}function Do(o,l){o=o|0,l=l|0;var u=0;u=o+8|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function dy(o){return o=o|0,n[o+8>>2]|0}function Ch(o,l){o=o|0,l=l|0;var u=0;u=o+12|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function $1(o){return o=o|0,n[o+12>>2]|0}function bo(o,l){o=o|0,l=l|0;var u=0;u=o+16|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function wh(o){return o=o|0,n[o+16>>2]|0}function Bh(o,l){o=o|0,l=l|0;var u=0;u=o+20|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function du(o){return o=o|0,n[o+20>>2]|0}function vh(o,l){o=o|0,l=l|0;var u=0;u=o+24|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Rg(o){return o=o|0,n[o+24>>2]|0}function Fg(o,l){o=o|0,l=l|0;var u=0;u=o+28|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Ng(o){return o=o|0,n[o+28>>2]|0}function my(o,l){o=o|0,l=l|0;var u=0;u=o+32|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function mf(o){return o=o|0,n[o+32>>2]|0}function Po(o,l){o=o|0,l=l|0;var u=0;u=o+36|0,(n[u>>2]|0)!=(l|0)&&(n[u>>2]=l,Oe(o))}function Dl(o){return o=o|0,n[o+36>>2]|0}function Sh(o,l){o=o|0,l=y(l);var u=0;u=o+40|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Og(o,l){o=o|0,l=y(l);var u=0;u=o+44|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function bl(o,l){o=o|0,l=y(l);var u=0;u=o+48|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Pl(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+52|0,d=o+56|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function yy(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+52|0,u=o+56|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function HA(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+52|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Ey(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Iy(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+132+(l<<3)|0,l=o+132+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function jA(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+132+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function qA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Y(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+60+(l<<3)|0,l=o+60+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function xt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+60+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function GA(o,l){o=o|0,l=l|0;var u=0;u=o+60+(l<<3)+4|0,(n[u>>2]|0)!=3&&(h[o+60+(l<<3)>>2]=y(ce),n[u>>2]=3,Oe(o))}function xo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function yf(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=m?0:2,d=o+204+(l<<3)|0,l=o+204+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function mt(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=l+204+(u<<3)|0,l=n[A+4>>2]|0,u=o,n[u>>2]=n[A>>2],n[u+4>>2]=l}function mu(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0,m=0;m=Mt(u)|0,A=(m^1)&1,d=o+276+(l<<3)|0,l=o+276+(l<<3)+4|0,m|y(h[d>>2])==u&&(n[l>>2]|0)==(A|0)||(h[d>>2]=u,n[l>>2]=A,Oe(o))}function Cy(o,l){return o=o|0,l=l|0,y(h[o+276+(l<<3)>>2])}function Lg(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+348|0,d=o+352|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function e2(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+348|0,u=o+352|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function Dh(o){o=o|0;var l=0;l=o+352|0,(n[l>>2]|0)!=3&&(h[o+348>>2]=y(ce),n[l>>2]=3,Oe(o))}function ur(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+348|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function Zi(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+356|0,d=o+360|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ef(o,l){o=o|0,l=y(l);var u=0,A=0;A=o+356|0,u=o+360|0,y(h[A>>2])==l&&(n[u>>2]|0)==2||(h[A>>2]=l,A=Mt(l)|0,n[u>>2]=A?3:2,Oe(o))}function Wa(o){o=o|0;var l=0;l=o+360|0,(n[l>>2]|0)!=3&&(h[o+356>>2]=y(ce),n[l>>2]=3,Oe(o))}function Mg(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+356|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function yu(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function If(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+364|0,d=o+368|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wt(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+364|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function di(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function WA(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+372|0,d=o+376|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ya(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+372|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function pa(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Va(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+380|0,d=o+384|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function _g(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+380|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function bh(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=(m^1)&1,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function Ug(o,l){o=o|0,l=y(l);var u=0,A=0,d=0,m=0;m=Mt(l)|0,u=m?0:2,A=o+388|0,d=o+392|0,m|y(h[A>>2])==l&&(n[d>>2]|0)==(u|0)||(h[A>>2]=l,n[d>>2]=u,Oe(o))}function wy(o,l){o=o|0,l=l|0;var u=0,A=0;A=l+388|0,u=n[A+4>>2]|0,l=o,n[l>>2]=n[A>>2],n[l+4>>2]=u}function YA(o,l){o=o|0,l=y(l);var u=0;u=o+396|0,y(h[u>>2])!=l&&(h[u>>2]=l,Oe(o))}function Hg(o){return o=o|0,y(h[o+396>>2])}function Eu(o){return o=o|0,y(h[o+400>>2])}function Iu(o){return o=o|0,y(h[o+404>>2])}function Cf(o){return o=o|0,y(h[o+408>>2])}function Ns(o){return o=o|0,y(h[o+412>>2])}function Cu(o){return o=o|0,y(h[o+416>>2])}function qn(o){return o=o|0,y(h[o+420>>2])}function ss(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+424+(l<<2)>>2])}function ki(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+448+(l<<2)>>2])}function VA(o,l){switch(o=o|0,l=l|0,Bi(o,(l|0)<6,2918),l|0){case 0:{l=(n[o+496>>2]|0)==2?5:4;break}case 2:{l=(n[o+496>>2]|0)==2?4:5;break}default:}return y(h[o+472+(l<<2)>>2])}function wf(o,l){o=o|0,l=l|0;var u=0,A=Xe;return u=n[o+4>>2]|0,(u|0)==(n[l+4>>2]|0)?u?(A=y(h[o>>2]),o=y(se(y(A-y(h[l>>2]))))>2]=0,n[A+4>>2]=0,n[A+8>>2]=0,fu(A|0,o|0,l|0,0),Qo(o,3,(s[A+11>>0]|0)<0?n[A>>2]|0:A,u),jYe(A),I=u}function os(o,l,u,A){o=y(o),l=y(l),u=u|0,A=A|0;var d=Xe;o=y(o*l),d=y(A_(o,y(1)));do if(mn(d,y(0))|0)o=y(o-d);else{if(o=y(o-d),mn(d,y(1))|0){o=y(o+y(1));break}if(u){o=y(o+y(1));break}A||(d>y(.5)?d=y(1):(A=mn(d,y(.5))|0,d=y(A?1:0)),o=y(o+d))}while(!1);return y(o/l)}function xl(o,l,u,A,d,m,B,k,T,_,M,G,ae){o=o|0,l=y(l),u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,k=y(k),T=y(T),_=y(_),M=y(M),G=y(G),ae=ae|0;var We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe;return T>2]),Le!=y(0))?(tt=y(os(l,Le,0,0)),Ze=y(os(A,Le,0,0)),Qe=y(os(m,Le,0,0)),Le=y(os(k,Le,0,0))):(Qe=m,tt=l,Le=k,Ze=A),(d|0)==(o|0)?We=mn(Qe,tt)|0:We=0,(B|0)==(u|0)?ae=mn(Le,Ze)|0:ae=0,!We&&(ct=y(l-M),!(ko(o,ct,T)|0))&&!(Bf(o,ct,d,T)|0)?We=vf(o,ct,d,m,T)|0:We=1,!ae&&(He=y(A-G),!(ko(u,He,_)|0))&&!(Bf(u,He,B,_)|0)?ae=vf(u,He,B,k,_)|0:ae=1,ae=We&ae),ae|0}function ko(o,l,u){return o=o|0,l=y(l),u=y(u),(o|0)==1?o=mn(l,u)|0:o=0,o|0}function Bf(o,l,u,A){return o=o|0,l=y(l),u=u|0,A=y(A),(o|0)==2&(u|0)==0?l>=A?o=1:o=mn(l,A)|0:o=0,o|0}function vf(o,l,u,A,d){return o=o|0,l=y(l),u=u|0,A=y(A),d=y(d),(o|0)==2&(u|0)==2&A>l?d<=l?o=1:o=mn(l,d)|0:o=0,o|0}function kl(o,l,u,A,d,m,B,k,T,_,M){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0,M=M|0;var G=0,ae=0,We=0,Le=0,Qe=Xe,tt=Xe,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=Xe,Fo=Xe,No=Xe,Oo=0,$a=0;cr=I,I=I+160|0,$t=cr+152|0,fr=cr+120|0,qr=cr+104|0,He=cr+72|0,Le=cr+56|0,Lt=cr+8|0,ct=cr,Ge=(n[2279]|0)+1|0,n[2279]=Ge,Tr=o+984|0,s[Tr>>0]|0&&(n[o+512>>2]|0)!=(n[2278]|0)?Ze=4:(n[o+516>>2]|0)==(A|0)?Hr=0:Ze=4,(Ze|0)==4&&(n[o+520>>2]=0,n[o+924>>2]=-1,n[o+928>>2]=-1,h[o+932>>2]=y(-1),h[o+936>>2]=y(-1),Hr=1);e:do if(n[o+964>>2]|0)if(Qe=y(yn(o,2,B)),tt=y(yn(o,0,B)),G=o+916|0,No=y(h[G>>2]),Fo=y(h[o+920>>2]),Hn=y(h[o+932>>2]),xl(d,l,m,u,n[o+924>>2]|0,No,n[o+928>>2]|0,Fo,Hn,y(h[o+936>>2]),Qe,tt,M)|0)Ze=22;else if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,Hn=y(h[G>>2]),Fo=y(h[o+524+(ae*24|0)+4>>2]),No=y(h[o+524+(ae*24|0)+16>>2]),xl(d,l,m,u,n[o+524+(ae*24|0)+8>>2]|0,Hn,n[o+524+(ae*24|0)+12>>2]|0,Fo,No,y(h[o+524+(ae*24|0)+20>>2]),Qe,tt,M)|0){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}else{if(T){if(G=o+916|0,!(mn(y(h[G>>2]),l)|0)){Ze=21;break}if(!(mn(y(h[o+920>>2]),u)|0)){Ze=21;break}if((n[o+924>>2]|0)!=(d|0)){Ze=21;break}G=(n[o+928>>2]|0)==(m|0)?G:0,Ze=22;break}if(We=n[o+520>>2]|0,!We)Ze=21;else for(ae=0;;){if(G=o+524+(ae*24|0)|0,mn(y(h[G>>2]),l)|0&&mn(y(h[o+524+(ae*24|0)+4>>2]),u)|0&&(n[o+524+(ae*24|0)+8>>2]|0)==(d|0)&&(n[o+524+(ae*24|0)+12>>2]|0)==(m|0)){Ze=22;break e}if(ae=ae+1|0,ae>>>0>=We>>>0){Ze=21;break}}}while(!1);do if((Ze|0)==21)s[11697]|0?(G=0,Ze=28):(G=0,Ze=31);else if((Ze|0)==22){if(ae=(s[11697]|0)!=0,!((G|0)!=0&(Hr^1)))if(ae){Ze=28;break}else{Ze=31;break}Le=G+16|0,n[o+908>>2]=n[Le>>2],We=G+20|0,n[o+912>>2]=n[We>>2],(s[11698]|0)==0|ae^1||(n[ct>>2]=wu(Ge)|0,n[ct+4>>2]=Ge,Qo(o,4,2972,ct),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),d=ha(d,T)|0,m=ha(m,T)|0,$a=+y(h[Le>>2]),Oo=+y(h[We>>2]),n[Lt>>2]=d,n[Lt+4>>2]=m,E[Lt+8>>3]=+l,E[Lt+16>>3]=+u,E[Lt+24>>3]=$a,E[Lt+32>>3]=Oo,n[Lt+40>>2]=_,Qo(o,4,2989,Lt))}while(!1);return(Ze|0)==28&&(ae=wu(Ge)|0,n[Le>>2]=ae,n[Le+4>>2]=Ge,n[Le+8>>2]=Hr?3047:11699,Qo(o,4,3038,Le),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,Ze=ha(m,T)|0,n[He>>2]=Lt,n[He+4>>2]=Ze,E[He+8>>3]=+l,E[He+16>>3]=+u,n[He+24>>2]=_,Qo(o,4,3049,He),Ze=31),(Ze|0)==31&&(Os(o,l,u,A,d,m,B,k,T,M),s[11697]|0&&(ae=n[2279]|0,Lt=wu(ae)|0,n[qr>>2]=Lt,n[qr+4>>2]=ae,n[qr+8>>2]=Hr?3047:11699,Qo(o,4,3083,qr),ae=n[o+972>>2]|0,ae|0&&op[ae&127](o),Lt=ha(d,T)|0,qr=ha(m,T)|0,Oo=+y(h[o+908>>2]),$a=+y(h[o+912>>2]),n[fr>>2]=Lt,n[fr+4>>2]=qr,E[fr+8>>3]=Oo,E[fr+16>>3]=$a,n[fr+24>>2]=_,Qo(o,4,3092,fr)),n[o+516>>2]=A,G||(ae=o+520|0,G=n[ae>>2]|0,(G|0)==16&&(s[11697]|0&&Qo(o,4,3124,$t),n[ae>>2]=0,G=0),T?G=o+916|0:(n[ae>>2]=G+1,G=o+524+(G*24|0)|0),h[G>>2]=l,h[G+4>>2]=u,n[G+8>>2]=d,n[G+12>>2]=m,n[G+16>>2]=n[o+908>>2],n[G+20>>2]=n[o+912>>2],G=0)),T&&(n[o+416>>2]=n[o+908>>2],n[o+420>>2]=n[o+912>>2],s[o+985>>0]=1,s[Tr>>0]=0),n[2279]=(n[2279]|0)+-1,n[o+512>>2]=n[2278],I=cr,Hr|(G|0)==0|0}function yn(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(J(o,l,u)),y(A+y(re(o,l,u)))}function Qo(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=I,I=I+16|0,d=m,n[d>>2]=A,o?A=n[o+976>>2]|0:A=0,kh(A,o,l,u,d),I=m}function wu(o){return o=o|0,(o>>>0>60?3201:3201+(60-o)|0)|0}function ha(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+32|0,u=d+12|0,A=d,n[u>>2]=n[254],n[u+4>>2]=n[255],n[u+8>>2]=n[256],n[A>>2]=n[257],n[A+4>>2]=n[258],n[A+8>>2]=n[259],(o|0)>2?o=11699:o=n[(l?A:u)+(o<<2)>>2]|0,I=d,o|0}function Os(o,l,u,A,d,m,B,k,T,_){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=m|0,B=y(B),k=y(k),T=T|0,_=_|0;var M=0,G=0,ae=0,We=0,Le=Xe,Qe=Xe,tt=Xe,Ze=Xe,ct=Xe,He=Xe,Ge=Xe,Lt=0,qr=0,fr=0,$t=Xe,Tr=Xe,Hr=0,cr=Xe,Hn=0,Fo=0,No=0,Oo=0,$a=0,Vh=0,Kh=0,dc=0,Jh=0,Ff=0,Nf=0,zh=0,Zh=0,Xh=0,on=0,mc=0,$h=0,ku=0,e0=Xe,t0=Xe,Of=Xe,Lf=Xe,Qu=Xe,lo=0,Ml=0,ya=0,yc=0,lp=0,cp=Xe,Mf=Xe,up=Xe,fp=Xe,co=Xe,Us=Xe,Ec=0,Wn=Xe,Ap=Xe,Lo=Xe,Tu=Xe,Mo=Xe,Ru=Xe,pp=0,hp=0,Fu=Xe,uo=Xe,Ic=0,gp=0,dp=0,mp=0,Fr=Xe,ui=0,Hs=0,_o=0,fo=0,Mr=0,Ar=0,Cc=0,zt=Xe,yp=0,vi=0;Cc=I,I=I+16|0,lo=Cc+12|0,Ml=Cc+8|0,ya=Cc+4|0,yc=Cc,Bi(o,(d|0)==0|(Mt(l)|0)^1,3326),Bi(o,(m|0)==0|(Mt(u)|0)^1,3406),Hs=ft(o,A)|0,n[o+496>>2]=Hs,Mr=dr(2,Hs)|0,Ar=dr(0,Hs)|0,h[o+440>>2]=y(J(o,Mr,B)),h[o+444>>2]=y(re(o,Mr,B)),h[o+428>>2]=y(J(o,Ar,B)),h[o+436>>2]=y(re(o,Ar,B)),h[o+464>>2]=y(Br(o,Mr)),h[o+468>>2]=y(_n(o,Mr)),h[o+452>>2]=y(Br(o,Ar)),h[o+460>>2]=y(_n(o,Ar)),h[o+488>>2]=y(mi(o,Mr,B)),h[o+492>>2]=y(Bs(o,Mr,B)),h[o+476>>2]=y(mi(o,Ar,B)),h[o+484>>2]=y(Bs(o,Ar,B));do if(n[o+964>>2]|0)zA(o,l,u,d,m,B,k);else{if(_o=o+948|0,fo=(n[o+952>>2]|0)-(n[_o>>2]|0)>>2,!fo){dP(o,l,u,d,m,B,k);break}if(!T&&t2(o,l,u,d,m,B,k)|0)break;ee(o),mc=o+508|0,s[mc>>0]=0,Mr=dr(n[o+4>>2]|0,Hs)|0,Ar=Sy(Mr,Hs)|0,ui=de(Mr)|0,$h=n[o+8>>2]|0,gp=o+28|0,ku=(n[gp>>2]|0)!=0,Mo=ui?B:k,Fu=ui?k:B,e0=y(Th(o,Mr,B)),t0=y(r2(o,Mr,B)),Le=y(Th(o,Ar,B)),Ru=y(Ka(o,Mr,B)),uo=y(Ka(o,Ar,B)),fr=ui?d:m,Ic=ui?m:d,Fr=ui?Ru:uo,ct=ui?uo:Ru,Tu=y(yn(o,2,B)),Ze=y(yn(o,0,B)),Qe=y(y(Xr(o+364|0,B))-Fr),tt=y(y(Xr(o+380|0,B))-Fr),He=y(y(Xr(o+372|0,k))-ct),Ge=y(y(Xr(o+388|0,k))-ct),Of=ui?Qe:He,Lf=ui?tt:Ge,Tu=y(l-Tu),l=y(Tu-Fr),Mt(l)|0?Fr=l:Fr=y($n(y(Ad(l,tt)),Qe)),Ap=y(u-Ze),l=y(Ap-ct),Mt(l)|0?Lo=l:Lo=y($n(y(Ad(l,Ge)),He)),Qe=ui?Fr:Lo,Wn=ui?Lo:Fr;e:do if((fr|0)==1)for(A=0,G=0;;){if(M=ws(o,G)|0,!A)y(ZA(M))>y(0)&&y(Rh(M))>y(0)?A=M:A=0;else if(n2(M)|0){We=0;break e}if(G=G+1|0,G>>>0>=fo>>>0){We=A;break}}else We=0;while(!1);Lt=We+500|0,qr=We+504|0,A=0,M=0,l=y(0),ae=0;do{if(G=n[(n[_o>>2]|0)+(ae<<2)>>2]|0,(n[G+36>>2]|0)==1)Dy(G),s[G+985>>0]=1,s[G+984>>0]=0;else{Sf(G),T&&xh(G,ft(G,Hs)|0,Qe,Wn,Fr);do if((n[G+24>>2]|0)!=1)if((G|0)==(We|0)){n[Lt>>2]=n[2278],h[qr>>2]=y(0);break}else{mP(o,G,Fr,d,Lo,Fr,Lo,m,Hs,_);break}else M|0&&(n[M+960>>2]=G),n[G+960>>2]=0,M=G,A=A|0?A:G;while(!1);Us=y(h[G+504>>2]),l=y(l+y(Us+y(yn(G,Mr,Fr))))}ae=ae+1|0}while((ae|0)!=(fo|0));for(No=l>Qe,Ec=ku&((fr|0)==2&No)?1:fr,Hn=(Ic|0)==1,$a=Hn&(T^1),Vh=(Ec|0)==1,Kh=(Ec|0)==2,dc=976+(Mr<<2)|0,Jh=(Ic|2|0)==2,Xh=Hn&(ku^1),Ff=1040+(Ar<<2)|0,Nf=1040+(Mr<<2)|0,zh=976+(Ar<<2)|0,Zh=(Ic|0)!=1,No=ku&((fr|0)!=0&No),Fo=o+976|0,Hn=Hn^1,l=Qe,Hr=0,Oo=0,Us=y(0),Qu=y(0);;){e:do if(Hr>>>0>>0)for(qr=n[_o>>2]|0,ae=0,Ge=y(0),He=y(0),tt=y(0),Qe=y(0),G=0,M=0,We=Hr;;){if(Lt=n[qr+(We<<2)>>2]|0,(n[Lt+36>>2]|0)!=1&&(n[Lt+940>>2]=Oo,(n[Lt+24>>2]|0)!=1)){if(Ze=y(yn(Lt,Mr,Fr)),on=n[dc>>2]|0,u=y(Xr(Lt+380+(on<<3)|0,Mo)),ct=y(h[Lt+504>>2]),u=y(Ad(u,ct)),u=y($n(y(Xr(Lt+364+(on<<3)|0,Mo)),u)),ku&(ae|0)!=0&y(Ze+y(He+u))>l){m=ae,Ze=Ge,fr=We;break e}Ze=y(Ze+u),u=y(He+Ze),Ze=y(Ge+Ze),n2(Lt)|0&&(tt=y(tt+y(ZA(Lt))),Qe=y(Qe-y(ct*y(Rh(Lt))))),M|0&&(n[M+960>>2]=Lt),n[Lt+960>>2]=0,ae=ae+1|0,M=Lt,G=G|0?G:Lt}else Ze=Ge,u=He;if(We=We+1|0,We>>>0>>0)Ge=Ze,He=u;else{m=ae,fr=We;break}}else m=0,Ze=y(0),tt=y(0),Qe=y(0),G=0,fr=Hr;while(!1);on=tt>y(0)&tty(0)&QeLf&((Mt(Lf)|0)^1))l=Lf,on=51;else if(s[(n[Fo>>2]|0)+3>>0]|0)on=51;else{if($t!=y(0)&&y(ZA(o))!=y(0)){on=53;break}l=Ze,on=53}while(!1);if((on|0)==51&&(on=0,Mt(l)|0?on=53:(Tr=y(l-Ze),cr=l)),(on|0)==53&&(on=0,Ze>2]|0,We=Try(0),He=y(Tr/$t),tt=y(0),Ze=y(0),l=y(0),M=G;do u=y(Xr(M+380+(ae<<3)|0,Mo)),Qe=y(Xr(M+364+(ae<<3)|0,Mo)),Qe=y(Ad(u,y($n(Qe,y(h[M+504>>2]))))),We?(u=y(Qe*y(Rh(M))),u!=y(-0)&&(zt=y(Qe-y(ct*u)),cp=y(Gn(M,Mr,zt,cr,Fr)),zt!=cp)&&(tt=y(tt-y(cp-Qe)),l=y(l+u))):Lt&&(Mf=y(ZA(M)),Mf!=y(0))&&(zt=y(Qe+y(He*Mf)),up=y(Gn(M,Mr,zt,cr,Fr)),zt!=up)&&(tt=y(tt-y(up-Qe)),Ze=y(Ze-Mf)),M=n[M+960>>2]|0;while(M|0);if(l=y(Ge+l),Qe=y(Tr+tt),lp)l=y(0);else{ct=y($t+Ze),We=n[dc>>2]|0,Lt=Qey(0),ct=y(Qe/ct),l=y(0);do{zt=y(Xr(G+380+(We<<3)|0,Mo)),tt=y(Xr(G+364+(We<<3)|0,Mo)),tt=y(Ad(zt,y($n(tt,y(h[G+504>>2]))))),Lt?(zt=y(tt*y(Rh(G))),Qe=y(-zt),zt!=y(-0)?(zt=y(He*Qe),Qe=y(Gn(G,Mr,y(tt+(qr?Qe:zt)),cr,Fr))):Qe=tt):ae&&(fp=y(ZA(G)),fp!=y(0))?Qe=y(Gn(G,Mr,y(tt+y(ct*fp)),cr,Fr)):Qe=tt,l=y(l-y(Qe-tt)),Ze=y(yn(G,Mr,Fr)),u=y(yn(G,Ar,Fr)),Qe=y(Qe+Ze),h[Ml>>2]=Qe,n[yc>>2]=1,tt=y(h[G+396>>2]);e:do if(Mt(tt)|0){M=Mt(Wn)|0;do if(!M){if(No|(oo(G,Ar,Wn)|0|Hn)||(as(o,G)|0)!=4||(n[(Ql(G,Ar)|0)+4>>2]|0)==3||(n[(Tl(G,Ar)|0)+4>>2]|0)==3)break;h[lo>>2]=Wn,n[ya>>2]=1;break e}while(!1);if(oo(G,Ar,Wn)|0){M=n[G+992+(n[zh>>2]<<2)>>2]|0,zt=y(u+y(Xr(M,Wn))),h[lo>>2]=zt,M=Zh&(n[M+4>>2]|0)==2,n[ya>>2]=((Mt(zt)|0|M)^1)&1;break}else{h[lo>>2]=Wn,n[ya>>2]=M?0:2;break}}else zt=y(Qe-Ze),$t=y(zt/tt),zt=y(tt*zt),n[ya>>2]=1,h[lo>>2]=y(u+(ui?$t:zt));while(!1);Bu(G,Mr,cr,Fr,yc,Ml),Bu(G,Ar,Wn,Fr,ya,lo);do if(!(oo(G,Ar,Wn)|0)&&(as(o,G)|0)==4){if((n[(Ql(G,Ar)|0)+4>>2]|0)==3){M=0;break}M=(n[(Tl(G,Ar)|0)+4>>2]|0)!=3}else M=0;while(!1);zt=y(h[Ml>>2]),$t=y(h[lo>>2]),yp=n[yc>>2]|0,vi=n[ya>>2]|0,kl(G,ui?zt:$t,ui?$t:zt,Hs,ui?yp:vi,ui?vi:yp,Fr,Lo,T&(M^1),3488,_)|0,s[mc>>0]=s[mc>>0]|s[G+508>>0],G=n[G+960>>2]|0}while(G|0)}}else l=y(0);if(l=y(Tr+l),vi=l>0]=vi|c[mc>>0],Kh&l>y(0)?(M=n[dc>>2]|0,n[o+364+(M<<3)+4>>2]|0&&(co=y(Xr(o+364+(M<<3)|0,Mo)),co>=y(0))?Qe=y($n(y(0),y(co-y(cr-l)))):Qe=y(0)):Qe=l,Lt=Hr>>>0>>0,Lt){We=n[_o>>2]|0,ae=Hr,M=0;do G=n[We+(ae<<2)>>2]|0,n[G+24>>2]|0||(M=((n[(Ql(G,Mr)|0)+4>>2]|0)==3&1)+M|0,M=M+((n[(Tl(G,Mr)|0)+4>>2]|0)==3&1)|0),ae=ae+1|0;while((ae|0)!=(fr|0));M?(Ze=y(0),u=y(0)):on=101}else on=101;e:do if((on|0)==101)switch(on=0,$h|0){case 1:{M=0,Ze=y(Qe*y(.5)),u=y(0);break e}case 2:{M=0,Ze=Qe,u=y(0);break e}case 3:{if(m>>>0<=1){M=0,Ze=y(0),u=y(0);break e}u=y((m+-1|0)>>>0),M=0,Ze=y(0),u=y(y($n(Qe,y(0)))/u);break e}case 5:{u=y(Qe/y((m+1|0)>>>0)),M=0,Ze=u;break e}case 4:{u=y(Qe/y(m>>>0)),M=0,Ze=y(u*y(.5));break e}default:{M=0,Ze=y(0),u=y(0);break e}}while(!1);if(l=y(e0+Ze),Lt){tt=y(Qe/y(M|0)),ae=n[_o>>2]|0,G=Hr,Qe=y(0);do{M=n[ae+(G<<2)>>2]|0;e:do if((n[M+36>>2]|0)!=1){switch(n[M+24>>2]|0){case 1:{if(ga(M,Mr)|0){if(!T)break e;zt=y(XA(M,Mr,cr)),zt=y(zt+y(Br(o,Mr))),zt=y(zt+y(J(M,Mr,Fr))),h[M+400+(n[Nf>>2]<<2)>>2]=zt;break e}break}case 0:if(vi=(n[(Ql(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=vi?zt:l,T&&(vi=M+400+(n[Nf>>2]<<2)|0,h[vi>>2]=y(l+y(h[vi>>2]))),vi=(n[(Tl(M,Mr)|0)+4>>2]|0)==3,zt=y(tt+l),l=vi?zt:l,$a){zt=y(u+y(yn(M,Mr,Fr))),Qe=Wn,l=y(l+y(zt+y(h[M+504>>2])));break e}else{l=y(l+y(u+y($A(M,Mr,Fr)))),Qe=y($n(Qe,y($A(M,Ar,Fr))));break e}default:}T&&(zt=y(Ze+y(Br(o,Mr))),vi=M+400+(n[Nf>>2]<<2)|0,h[vi>>2]=y(zt+y(h[vi>>2])))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}else Qe=y(0);if(u=y(t0+l),Jh?Ze=y(y(Gn(o,Ar,y(uo+Qe),Fu,B))-uo):Ze=Wn,tt=y(y(Gn(o,Ar,y(uo+(Xh?Wn:Qe)),Fu,B))-uo),Lt&T){G=Hr;do{ae=n[(n[_o>>2]|0)+(G<<2)>>2]|0;do if((n[ae+36>>2]|0)!=1){if((n[ae+24>>2]|0)==1){if(ga(ae,Ar)|0){if(zt=y(XA(ae,Ar,Wn)),zt=y(zt+y(Br(o,Ar))),zt=y(zt+y(J(ae,Ar,Fr))),M=n[Ff>>2]|0,h[ae+400+(M<<2)>>2]=zt,!(Mt(zt)|0))break}else M=n[Ff>>2]|0;zt=y(Br(o,Ar)),h[ae+400+(M<<2)>>2]=y(zt+y(J(ae,Ar,Fr)));break}M=as(o,ae)|0;do if((M|0)==4){if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){on=139;break}if(oo(ae,Ar,Wn)|0){l=Le;break}yp=n[ae+908+(n[dc>>2]<<2)>>2]|0,n[lo>>2]=yp,l=y(h[ae+396>>2]),vi=Mt(l)|0,Qe=(n[S>>2]=yp,y(h[S>>2])),vi?l=tt:(Tr=y(yn(ae,Ar,Fr)),zt=y(Qe/l),l=y(l*Qe),l=y(Tr+(ui?zt:l))),h[Ml>>2]=l,h[lo>>2]=y(y(yn(ae,Mr,Fr))+Qe),n[ya>>2]=1,n[yc>>2]=1,Bu(ae,Mr,cr,Fr,ya,lo),Bu(ae,Ar,Wn,Fr,yc,Ml),l=y(h[lo>>2]),Tr=y(h[Ml>>2]),zt=ui?l:Tr,l=ui?Tr:l,vi=((Mt(zt)|0)^1)&1,kl(ae,zt,l,Hs,vi,((Mt(l)|0)^1)&1,Fr,Lo,1,3493,_)|0,l=Le}else on=139;while(!1);e:do if((on|0)==139){on=0,l=y(Ze-y($A(ae,Ar,Fr)));do if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){if((n[(Tl(ae,Ar)|0)+4>>2]|0)!=3)break;l=y(Le+y($n(y(0),y(l*y(.5)))));break e}while(!1);if((n[(Tl(ae,Ar)|0)+4>>2]|0)==3){l=Le;break}if((n[(Ql(ae,Ar)|0)+4>>2]|0)==3){l=y(Le+y($n(y(0),l)));break}switch(M|0){case 1:{l=Le;break e}case 2:{l=y(Le+y(l*y(.5)));break e}default:{l=y(Le+l);break e}}}while(!1);zt=y(Us+l),vi=ae+400+(n[Ff>>2]<<2)|0,h[vi>>2]=y(zt+y(h[vi>>2]))}while(!1);G=G+1|0}while((G|0)!=(fr|0))}if(Us=y(Us+tt),Qu=y($n(Qu,u)),m=Oo+1|0,fr>>>0>=fo>>>0)break;l=cr,Hr=fr,Oo=m}do if(T){if(M=m>>>0>1,!M&&!(WL(o)|0))break;if(!(Mt(Wn)|0)){l=y(Wn-Us);e:do switch(n[o+12>>2]|0){case 3:{Le=y(Le+l),He=y(0);break}case 2:{Le=y(Le+y(l*y(.5))),He=y(0);break}case 4:{Wn>Us?He=y(l/y(m>>>0)):He=y(0);break}case 7:if(Wn>Us){Le=y(Le+y(l/y(m<<1>>>0))),He=y(l/y(m>>>0)),He=M?He:y(0);break e}else{Le=y(Le+y(l*y(.5))),He=y(0);break e}case 6:{He=y(l/y(Oo>>>0)),He=Wn>Us&M?He:y(0);break}default:He=y(0)}while(!1);if(m|0)for(Lt=1040+(Ar<<2)|0,qr=976+(Ar<<2)|0,We=0,G=0;;){e:do if(G>>>0>>0)for(Qe=y(0),tt=y(0),l=y(0),ae=G;;){M=n[(n[_o>>2]|0)+(ae<<2)>>2]|0;do if((n[M+36>>2]|0)!=1&&!(n[M+24>>2]|0)){if((n[M+940>>2]|0)!=(We|0))break e;if(YL(M,Ar)|0&&(zt=y(h[M+908+(n[qr>>2]<<2)>>2]),l=y($n(l,y(zt+y(yn(M,Ar,Fr)))))),(as(o,M)|0)!=5)break;co=y(Wg(M)),co=y(co+y(J(M,0,Fr))),zt=y(h[M+912>>2]),zt=y(y(zt+y(yn(M,0,Fr)))-co),co=y($n(tt,co)),zt=y($n(Qe,zt)),Qe=zt,tt=co,l=y($n(l,y(co+zt)))}while(!1);if(M=ae+1|0,M>>>0>>0)ae=M;else{ae=M;break}}else tt=y(0),l=y(0),ae=G;while(!1);if(ct=y(He+l),u=Le,Le=y(Le+ct),G>>>0>>0){Ze=y(u+tt),M=G;do{G=n[(n[_o>>2]|0)+(M<<2)>>2]|0;e:do if((n[G+36>>2]|0)!=1&&!(n[G+24>>2]|0))switch(as(o,G)|0){case 1:{zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 3:{zt=y(y(Le-y(re(G,Ar,Fr)))-y(h[G+908+(n[qr>>2]<<2)>>2])),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 2:{zt=y(u+y(y(ct-y(h[G+908+(n[qr>>2]<<2)>>2]))*y(.5))),h[G+400+(n[Lt>>2]<<2)>>2]=zt;break e}case 4:{if(zt=y(u+y(J(G,Ar,Fr))),h[G+400+(n[Lt>>2]<<2)>>2]=zt,oo(G,Ar,Wn)|0||(ui?(Qe=y(h[G+908>>2]),l=y(Qe+y(yn(G,Mr,Fr))),tt=ct):(tt=y(h[G+912>>2]),tt=y(tt+y(yn(G,Ar,Fr))),l=ct,Qe=y(h[G+908>>2])),mn(l,Qe)|0&&mn(tt,y(h[G+912>>2]))|0))break e;kl(G,l,tt,Hs,1,1,Fr,Lo,1,3501,_)|0;break e}case 5:{h[G+404>>2]=y(y(Ze-y(Wg(G)))+y(XA(G,0,Wn)));break e}default:break e}while(!1);M=M+1|0}while((M|0)!=(ae|0))}if(We=We+1|0,(We|0)==(m|0))break;G=ae}}}while(!1);if(h[o+908>>2]=y(Gn(o,2,Tu,B,B)),h[o+912>>2]=y(Gn(o,0,Ap,k,B)),Ec|0&&(pp=n[o+32>>2]|0,hp=(Ec|0)==2,!(hp&(pp|0)!=2))?hp&(pp|0)==2&&(l=y(Ru+cr),l=y($n(y(Ad(l,y(Yg(o,Mr,Qu,Mo)))),Ru)),on=198):(l=y(Gn(o,Mr,Qu,Mo,B)),on=198),(on|0)==198&&(h[o+908+(n[976+(Mr<<2)>>2]<<2)>>2]=l),Ic|0&&(dp=n[o+32>>2]|0,mp=(Ic|0)==2,!(mp&(dp|0)!=2))?mp&(dp|0)==2&&(l=y(uo+Wn),l=y($n(y(Ad(l,y(Yg(o,Ar,y(uo+Us),Fu)))),uo)),on=204):(l=y(Gn(o,Ar,y(uo+Us),Fu,B)),on=204),(on|0)==204&&(h[o+908+(n[976+(Ar<<2)>>2]<<2)>>2]=l),T){if((n[gp>>2]|0)==2){G=976+(Ar<<2)|0,ae=1040+(Ar<<2)|0,M=0;do We=ws(o,M)|0,n[We+24>>2]|0||(yp=n[G>>2]|0,zt=y(h[o+908+(yp<<2)>>2]),vi=We+400+(n[ae>>2]<<2)|0,zt=y(zt-y(h[vi>>2])),h[vi>>2]=y(zt-y(h[We+908+(yp<<2)>>2]))),M=M+1|0;while((M|0)!=(fo|0))}if(A|0){M=ui?Ec:d;do VL(o,A,Fr,M,Lo,Hs,_),A=n[A+960>>2]|0;while(A|0)}if(M=(Mr|2|0)==3,G=(Ar|2|0)==3,M|G){A=0;do ae=n[(n[_o>>2]|0)+(A<<2)>>2]|0,(n[ae+36>>2]|0)!=1&&(M&&i2(o,ae,Mr),G&&i2(o,ae,Ar)),A=A+1|0;while((A|0)!=(fo|0))}}}while(!1);I=Cc}function Ph(o,l){o=o|0,l=y(l);var u=0;ja(o,l>=y(0),3147),u=l==y(0),h[o+4>>2]=u?y(0):l}function KA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=A|0;var d=Xe,m=Xe,B=0,k=0,T=0;n[2278]=(n[2278]|0)+1,Sf(o),oo(o,2,l)|0?(d=y(Xr(n[o+992>>2]|0,l)),T=1,d=y(d+y(yn(o,2,l)))):(d=y(Xr(o+380|0,l)),d>=y(0)?T=2:(T=((Mt(l)|0)^1)&1,d=l)),oo(o,0,u)|0?(m=y(Xr(n[o+996>>2]|0,u)),k=1,m=y(m+y(yn(o,0,l)))):(m=y(Xr(o+388|0,u)),m>=y(0)?k=2:(k=((Mt(u)|0)^1)&1,m=u)),B=o+976|0,kl(o,d,m,A,T,k,l,u,1,3189,n[B>>2]|0)|0&&(xh(o,n[o+496>>2]|0,l,u,l),JA(o,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),s[11696]|0)&&jg(o,7)}function Sf(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;k=I,I=I+32|0,B=k+24|0,m=k+16|0,A=k+8|0,d=k,u=0;do l=o+380+(u<<3)|0,n[o+380+(u<<3)+4>>2]|0&&(T=l,_=n[T+4>>2]|0,M=A,n[M>>2]=n[T>>2],n[M+4>>2]=_,M=o+364+(u<<3)|0,_=n[M+4>>2]|0,T=d,n[T>>2]=n[M>>2],n[T+4>>2]=_,n[m>>2]=n[A>>2],n[m+4>>2]=n[A+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],wf(m,B)|0)||(l=o+348+(u<<3)|0),n[o+992+(u<<2)>>2]=l,u=u+1|0;while((u|0)!=2);I=k}function oo(o,l,u){o=o|0,l=l|0,u=y(u);var A=0;switch(o=n[o+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[o+4>>2]|0){case 0:case 3:{o=0;break}case 1:{y(h[o>>2])>2])>2]|0){case 2:{l=y(y(y(h[o>>2])*l)/y(100));break}case 1:{l=y(h[o>>2]);break}default:l=y(ce)}return y(l)}function xh(o,l,u,A,d){o=o|0,l=l|0,u=y(u),A=y(A),d=y(d);var m=0,B=Xe;l=n[o+944>>2]|0?l:1,m=dr(n[o+4>>2]|0,l)|0,l=Sy(m,l)|0,u=y(yP(o,m,u)),A=y(yP(o,l,A)),B=y(u+y(J(o,m,d))),h[o+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,u=y(u+y(re(o,m,d))),h[o+400+(n[1e3+(m<<2)>>2]<<2)>>2]=u,u=y(A+y(J(o,l,d))),h[o+400+(n[1040+(l<<2)>>2]<<2)>>2]=u,d=y(A+y(re(o,l,d))),h[o+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function JA(o,l,u,A){o=o|0,l=y(l),u=y(u),A=y(A);var d=0,m=0,B=Xe,k=Xe,T=0,_=0,M=Xe,G=0,ae=Xe,We=Xe,Le=Xe,Qe=Xe;if(l!=y(0)&&(d=o+400|0,Qe=y(h[d>>2]),m=o+404|0,Le=y(h[m>>2]),G=o+416|0,We=y(h[G>>2]),_=o+420|0,B=y(h[_>>2]),ae=y(Qe+u),M=y(Le+A),A=y(ae+We),k=y(M+B),T=(n[o+988>>2]|0)==1,h[d>>2]=y(os(Qe,l,0,T)),h[m>>2]=y(os(Le,l,0,T)),u=y(A_(y(We*l),y(1))),mn(u,y(0))|0?m=0:m=(mn(u,y(1))|0)^1,u=y(A_(y(B*l),y(1))),mn(u,y(0))|0?d=0:d=(mn(u,y(1))|0)^1,Qe=y(os(A,l,T&m,T&(m^1))),h[G>>2]=y(Qe-y(os(ae,l,0,T))),Qe=y(os(k,l,T&d,T&(d^1))),h[_>>2]=y(Qe-y(os(M,l,0,T))),m=(n[o+952>>2]|0)-(n[o+948>>2]|0)>>2,m|0)){d=0;do JA(ws(o,d)|0,l,ae,M),d=d+1|0;while((d|0)!=(m|0))}}function By(o,l,u,A,d){switch(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,u|0){case 5:case 0:{o=WX(n[489]|0,A,d)|0;break}default:o=MYe(A,d)|0}return o|0}function Gg(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;d=I,I=I+16|0,m=d,n[m>>2]=A,kh(o,0,l,u,m),I=d}function kh(o,l,u,A,d){if(o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,o=o|0?o:956,A$[n[o+8>>2]&1](o,l,u,A,d)|0,(u|0)==5)Nt();else return}function hc(o,l,u){o=o|0,l=l|0,u=u|0,s[o+l>>0]=u&1}function vy(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(Qh(o,A),kt(o,n[l>>2]|0,n[u>>2]|0,A))}function Qh(o,l){o=o|0,l=l|0;var u=0;if((O(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function kt(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function O(o){return o=o|0,1073741823}function J(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+96>>2]|0?o=o+92|0:o=kn(o+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function re(o,l,u){return o=o|0,l=l|0,u=y(u),de(l)|0&&n[o+104>>2]|0?o=o+100|0:o=kn(o+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Ke(o,u))}function de(o){return o=o|0,(o|1|0)==3|0}function Ke(o,l){return o=o|0,l=y(l),(n[o+4>>2]|0)==3?l=y(0):l=y(Xr(o,l)),y(l)}function ft(o,l){return o=o|0,l=l|0,o=n[o>>2]|0,(o|0?o:(l|0)>1?l:1)|0}function dr(o,l){o=o|0,l=l|0;var u=0;e:do if((l|0)==2){switch(o|0){case 2:{o=3;break e}case 3:break;default:{u=4;break e}}o=2}else u=4;while(!1);return o|0}function Br(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+312>>2]|0&&(u=y(h[o+308>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function _n(o,l){o=o|0,l=l|0;var u=Xe;return de(l)|0&&n[o+320>>2]|0&&(u=y(h[o+316>>2]),u>=y(0))||(u=y($n(y(h[(kn(o+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(u)}function mi(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+240>>2]|0&&(A=y(Xr(o+236|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1040+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function Bs(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return de(l)|0&&n[o+248>>2]|0&&(A=y(Xr(o+244|0,u)),A>=y(0))||(A=y($n(y(Xr(kn(o+204|0,n[1e3+(l<<2)>>2]|0,992)|0,u)),y(0)))),y(A)}function zA(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe,G=Xe,ae=Xe,We=0,Le=0,Qe=0;Qe=I,I=I+16|0,We=Qe,Le=o+964|0,Bi(o,(n[Le>>2]|0)!=0,3519),k=y(Ka(o,2,l)),T=y(Ka(o,0,l)),_=y(yn(o,2,l)),M=y(yn(o,0,l)),Mt(l)|0?G=l:G=y($n(y(0),y(y(l-_)-k))),Mt(u)|0?ae=u:ae=y($n(y(0),y(y(u-M)-T))),(A|0)==1&(d|0)==1?(h[o+908>>2]=y(Gn(o,2,y(l-_),m,m)),l=y(Gn(o,0,y(u-M),B,m))):(p$[n[Le>>2]&1](We,o,G,A,ae,d),G=y(k+y(h[We>>2])),ae=y(l-_),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?G:ae,m,m)),ae=y(T+y(h[We+4>>2])),l=y(u-M),l=y(Gn(o,0,(d|2|0)==2?ae:l,B,m))),h[o+912>>2]=l,I=Qe}function dP(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=Xe,T=Xe,_=Xe,M=Xe;_=y(Ka(o,2,m)),k=y(Ka(o,0,m)),M=y(yn(o,2,m)),T=y(yn(o,0,m)),l=y(l-M),h[o+908>>2]=y(Gn(o,2,(A|2|0)==2?_:l,m,m)),u=y(u-T),h[o+912>>2]=y(Gn(o,0,(d|2|0)==2?k:u,B,m))}function t2(o,l,u,A,d,m,B){o=o|0,l=y(l),u=y(u),A=A|0,d=d|0,m=y(m),B=y(B);var k=0,T=Xe,_=Xe;return k=(A|0)==2,!(l<=y(0)&k)&&!(u<=y(0)&(d|0)==2)&&!((A|0)==1&(d|0)==1)?o=0:(T=y(yn(o,0,m)),_=y(yn(o,2,m)),k=l>2]=y(Gn(o,2,k?y(0):l,m,m)),l=y(u-T),k=u>2]=y(Gn(o,0,k?y(0):l,B,m)),o=1),o|0}function Sy(o,l){return o=o|0,l=l|0,Vg(o)|0?o=dr(2,l)|0:o=0,o|0}function Th(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(mi(o,l,u)),y(u+y(Br(o,l)))}function r2(o,l,u){return o=o|0,l=l|0,u=y(u),u=y(Bs(o,l,u)),y(u+y(_n(o,l)))}function Ka(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(Th(o,l,u)),y(A+y(r2(o,l,u)))}function n2(o){return o=o|0,n[o+24>>2]|0?o=0:y(ZA(o))!=y(0)?o=1:o=y(Rh(o))!=y(0),o|0}function ZA(o){o=o|0;var l=Xe;if(n[o+944>>2]|0){if(l=y(h[o+44>>2]),Mt(l)|0)return l=y(h[o+40>>2]),o=l>y(0)&((Mt(l)|0)^1),y(o?l:y(0))}else l=y(0);return y(l)}function Rh(o){o=o|0;var l=Xe,u=0,A=Xe;do if(n[o+944>>2]|0){if(l=y(h[o+48>>2]),Mt(l)|0){if(u=s[(n[o+976>>2]|0)+2>>0]|0,!(u<<24>>24)&&(A=y(h[o+40>>2]),A>24?y(1):y(0)}}else l=y(0);while(!1);return y(l)}function Dy(o){o=o|0;var l=0,u=0;if(Xy(o+400|0,0,540)|0,s[o+985>>0]=1,ee(o),u=_i(o)|0,u|0){l=o+948|0,o=0;do Dy(n[(n[l>>2]|0)+(o<<2)>>2]|0),o=o+1|0;while((o|0)!=(u|0))}}function mP(o,l,u,A,d,m,B,k,T,_){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=y(m),B=y(B),k=k|0,T=T|0,_=_|0;var M=0,G=Xe,ae=0,We=0,Le=Xe,Qe=Xe,tt=0,Ze=Xe,ct=0,He=Xe,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0;Hn=I,I=I+16|0,qr=Hn+12|0,fr=Hn+8|0,$t=Hn+4|0,Tr=Hn,cr=dr(n[o+4>>2]|0,T)|0,Ge=de(cr)|0,G=y(Xr(KL(l)|0,Ge?m:B)),Lt=oo(l,2,m)|0,Hr=oo(l,0,B)|0;do if(!(Mt(G)|0)&&!(Mt(Ge?u:d)|0)){if(M=l+504|0,!(Mt(y(h[M>>2]))|0)&&(!(s2(n[l+976>>2]|0,0)|0)||(n[l+500>>2]|0)==(n[2278]|0)))break;h[M>>2]=y($n(G,y(Ka(l,cr,m))))}else ae=7;while(!1);do if((ae|0)==7){if(ct=Ge^1,!(ct|Lt^1)){B=y(Xr(n[l+992>>2]|0,m)),h[l+504>>2]=y($n(B,y(Ka(l,2,m))));break}if(!(Ge|Hr^1)){B=y(Xr(n[l+996>>2]|0,B)),h[l+504>>2]=y($n(B,y(Ka(l,0,m))));break}h[qr>>2]=y(ce),h[fr>>2]=y(ce),n[$t>>2]=0,n[Tr>>2]=0,Ze=y(yn(l,2,m)),He=y(yn(l,0,m)),Lt?(Le=y(Ze+y(Xr(n[l+992>>2]|0,m))),h[qr>>2]=Le,n[$t>>2]=1,We=1):(We=0,Le=y(ce)),Hr?(G=y(He+y(Xr(n[l+996>>2]|0,B))),h[fr>>2]=G,n[Tr>>2]=1,M=1):(M=0,G=y(ce)),ae=n[o+32>>2]|0,Ge&(ae|0)==2?ae=2:Mt(Le)|0&&!(Mt(u)|0)&&(h[qr>>2]=u,n[$t>>2]=2,We=2,Le=u),!((ae|0)==2&ct)&&Mt(G)|0&&!(Mt(d)|0)&&(h[fr>>2]=d,n[Tr>>2]=2,M=2,G=d),Qe=y(h[l+396>>2]),tt=Mt(Qe)|0;do if(tt)ae=We;else{if((We|0)==1&ct){h[fr>>2]=y(y(Le-Ze)/Qe),n[Tr>>2]=1,M=1,ae=1;break}Ge&(M|0)==1?(h[qr>>2]=y(Qe*y(G-He)),n[$t>>2]=1,M=1,ae=1):ae=We}while(!1);Fo=Mt(u)|0,We=(as(o,l)|0)!=4,!(Ge|Lt|((A|0)!=1|Fo)|(We|(ae|0)==1))&&(h[qr>>2]=u,n[$t>>2]=1,!tt)&&(h[fr>>2]=y(y(u-Ze)/Qe),n[Tr>>2]=1,M=1),!(Hr|ct|((k|0)!=1|(Mt(d)|0))|(We|(M|0)==1))&&(h[fr>>2]=d,n[Tr>>2]=1,!tt)&&(h[qr>>2]=y(Qe*y(d-He)),n[$t>>2]=1),Bu(l,2,m,m,$t,qr),Bu(l,0,B,m,Tr,fr),u=y(h[qr>>2]),d=y(h[fr>>2]),kl(l,u,d,T,n[$t>>2]|0,n[Tr>>2]|0,m,B,0,3565,_)|0,B=y(h[l+908+(n[976+(cr<<2)>>2]<<2)>>2]),h[l+504>>2]=y($n(B,y(Ka(l,cr,m))))}while(!1);n[l+500>>2]=n[2278],I=Hn}function Gn(o,l,u,A,d){return o=o|0,l=l|0,u=y(u),A=y(A),d=y(d),A=y(Yg(o,l,u,A)),y($n(A,y(Ka(o,l,d))))}function as(o,l){return o=o|0,l=l|0,l=l+20|0,l=n[(n[l>>2]|0?l:o+16|0)>>2]|0,(l|0)==5&&Vg(n[o+4>>2]|0)|0&&(l=1),l|0}function Ql(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+96>>2]|0?l=4:l=n[1040+(l<<2)>>2]|0,o+60+(l<<3)|0}function Tl(o,l){return o=o|0,l=l|0,de(l)|0&&n[o+104>>2]|0?l=5:l=n[1e3+(l<<2)>>2]|0,o+60+(l<<3)|0}function Bu(o,l,u,A,d,m){switch(o=o|0,l=l|0,u=y(u),A=y(A),d=d|0,m=m|0,u=y(Xr(o+380+(n[976+(l<<2)>>2]<<3)|0,u)),u=y(u+y(yn(o,l,A))),n[d>>2]|0){case 2:case 1:{d=Mt(u)|0,A=y(h[m>>2]),h[m>>2]=d|A>2]=2,h[m>>2]=u);break}default:}}function ga(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,4,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function XA(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,4,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1040+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function $A(o,l,u){o=o|0,l=l|0,u=y(u);var A=Xe;return A=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),A=y(A+y(J(o,l,u))),y(A+y(re(o,l,u)))}function WL(o){o=o|0;var l=0,u=0,A=0;e:do if(Vg(n[o+4>>2]|0)|0)l=0;else if((n[o+16>>2]|0)!=5)if(u=_i(o)|0,!u)l=0;else for(l=0;;){if(A=ws(o,l)|0,!(n[A+24>>2]|0)&&(n[A+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=u>>>0){l=0;break}}else l=1;while(!1);return l|0}function YL(o,l){o=o|0,l=l|0;var u=Xe;return u=y(h[o+908+(n[976+(l<<2)>>2]<<2)>>2]),u>=y(0)&((Mt(u)|0)^1)|0}function Wg(o){o=o|0;var l=Xe,u=0,A=0,d=0,m=0,B=0,k=0,T=Xe;if(u=n[o+968>>2]|0,u)T=y(h[o+908>>2]),l=y(h[o+912>>2]),l=y(l$[u&0](o,T,l)),Bi(o,(Mt(l)|0)^1,3573);else{m=_i(o)|0;do if(m|0){for(u=0,d=0;;){if(A=ws(o,d)|0,n[A+940>>2]|0){B=8;break}if((n[A+24>>2]|0)!=1)if(k=(as(o,A)|0)==5,k){u=A;break}else u=u|0?u:A;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!u)break;return l=y(Wg(u)),y(l+y(h[u+404>>2]))}while(!1);l=y(h[o+912>>2])}return y(l)}function Yg(o,l,u,A){o=o|0,l=l|0,u=y(u),A=y(A);var d=Xe,m=0;return Vg(l)|0?(l=1,m=3):de(l)|0?(l=0,m=3):(A=y(ce),d=y(ce)),(m|0)==3&&(d=y(Xr(o+364+(l<<3)|0,A)),A=y(Xr(o+380+(l<<3)|0,A))),m=A=y(0)&((Mt(A)|0)^1)),u=m?A:u,m=d>=y(0)&((Mt(d)|0)^1)&u>2]|0,m)|0,Le=Sy(tt,m)|0,Qe=de(tt)|0,G=y(yn(l,2,u)),ae=y(yn(l,0,u)),oo(l,2,u)|0?k=y(G+y(Xr(n[l+992>>2]|0,u))):ga(l,2)|0&&by(l,2)|0?(k=y(h[o+908>>2]),T=y(Br(o,2)),T=y(k-y(T+y(_n(o,2)))),k=y(XA(l,2,u)),k=y(Gn(l,2,y(T-y(k+y(Fh(l,2,u)))),u,u))):k=y(ce),oo(l,0,d)|0?T=y(ae+y(Xr(n[l+996>>2]|0,d))):ga(l,0)|0&&by(l,0)|0?(T=y(h[o+912>>2]),ct=y(Br(o,0)),ct=y(T-y(ct+y(_n(o,0)))),T=y(XA(l,0,d)),T=y(Gn(l,0,y(ct-y(T+y(Fh(l,0,d)))),d,u))):T=y(ce),_=Mt(k)|0,M=Mt(T)|0;do if(_^M&&(We=y(h[l+396>>2]),!(Mt(We)|0)))if(_){k=y(G+y(y(T-ae)*We));break}else{ct=y(ae+y(y(k-G)/We)),T=M?ct:T;break}while(!1);M=Mt(k)|0,_=Mt(T)|0,M|_&&(He=(M^1)&1,A=u>y(0)&((A|0)!=0&M),k=Qe?k:A?u:k,kl(l,k,T,m,Qe?He:A?2:He,M&(_^1)&1,k,T,0,3623,B)|0,k=y(h[l+908>>2]),k=y(k+y(yn(l,2,u))),T=y(h[l+912>>2]),T=y(T+y(yn(l,0,u)))),kl(l,k,T,m,1,1,k,T,1,3635,B)|0,by(l,tt)|0&&!(ga(l,tt)|0)?(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,tt))),ct=y(ct-y(re(l,tt,u))),ct=y(ct-y(Fh(l,tt,Qe?u:d))),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct):Ze=21;do if((Ze|0)==21){if(!(ga(l,tt)|0)&&(n[o+8>>2]|0)==1){He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct;break}!(ga(l,tt)|0)&&(n[o+8>>2]|0)==2&&(He=n[976+(tt<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(tt<<2)>>2]<<2)>>2]=ct)}while(!1);by(l,Le)|0&&!(ga(l,Le)|0)?(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),ct=y(ct-y(_n(o,Le))),ct=y(ct-y(re(l,Le,u))),ct=y(ct-y(Fh(l,Le,Qe?d:u))),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct):Ze=30;do if((Ze|0)==30&&!(ga(l,Le)|0)){if((as(o,l)|0)==2){He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(y(ct-y(h[l+908+(He<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct;break}He=(as(o,l)|0)==3,He^(n[o+28>>2]|0)==2&&(He=n[976+(Le<<2)>>2]|0,ct=y(h[o+908+(He<<2)>>2]),ct=y(ct-y(h[l+908+(He<<2)>>2])),h[l+400+(n[1040+(Le<<2)>>2]<<2)>>2]=ct)}while(!1)}function i2(o,l,u){o=o|0,l=l|0,u=u|0;var A=Xe,d=0;d=n[976+(u<<2)>>2]|0,A=y(h[l+908+(d<<2)>>2]),A=y(y(h[o+908+(d<<2)>>2])-A),A=y(A-y(h[l+400+(n[1040+(u<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(u<<2)>>2]<<2)>>2]=A}function Vg(o){return o=o|0,(o|1|0)==1|0}function KL(o){o=o|0;var l=Xe;switch(n[o+56>>2]|0){case 0:case 3:{l=y(h[o+40>>2]),l>y(0)&((Mt(l)|0)^1)?o=s[(n[o+976>>2]|0)+2>>0]|0?1056:992:o=1056;break}default:o=o+52|0}return o|0}function s2(o,l){return o=o|0,l=l|0,(s[o+l>>0]|0)!=0|0}function by(o,l){return o=o|0,l=l|0,o=o+132|0,de(l)|0&&n[(kn(o,5,948)|0)+4>>2]|0?o=1:o=(n[(kn(o,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,o|0}function Fh(o,l,u){o=o|0,l=l|0,u=y(u);var A=0,d=0;return o=o+132|0,de(l)|0&&(A=kn(o,5,948)|0,(n[A+4>>2]|0)!=0)?d=4:(A=kn(o,n[1e3+(l<<2)>>2]|0,948)|0,n[A+4>>2]|0?d=4:u=y(0)),(d|0)==4&&(u=y(Xr(A,u))),y(u)}function yP(o,l,u){return o=o|0,l=l|0,u=y(u),ga(o,l)|0?u=y(XA(o,l,u)):u=y(-y(Fh(o,l,u))),y(u)}function EP(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function Py(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function IP(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xy(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function CP(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;if(B=o+4|0,k=n[B>>2]|0,d=k-A|0,m=d>>2,o=l+(m<<2)|0,o>>>0>>0){A=k;do n[A>>2]=n[o>>2],o=o+4|0,A=(n[B>>2]|0)+4|0,n[B>>2]=A;while(o>>>0>>0)}m|0&&Q2(k+(0-m<<2)|0,l|0,d|0)|0}function wP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return k=l+4|0,T=n[k>>2]|0,d=n[o>>2]|0,B=u,m=B-d|0,A=T+(0-(m>>2)<<2)|0,n[k>>2]=A,(m|0)>0&&Qr(A|0,d|0,m|0)|0,d=o+4|0,m=l+8|0,A=(n[d>>2]|0)-B|0,(A|0)>0&&(Qr(n[m>>2]|0,u|0,A|0)|0,n[m>>2]=(n[m>>2]|0)+(A>>>2<<2)),B=n[o>>2]|0,n[o>>2]=n[k>>2],n[k>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=o+8|0,u=l+12|0,o=n[B>>2]|0,n[B>>2]=n[u>>2],n[u>>2]=o,n[l>>2]=n[k>>2],T|0}function o2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[u>>2]|0,(B|0)!=(m|0)){d=o+8|0,u=((m+-4-B|0)>>>2)+1|0,o=B,A=n[d>>2]|0;do n[A>>2]=n[o>>2],A=(n[d>>2]|0)+4|0,n[d>>2]=A,o=o+4|0;while((o|0)!=(m|0));n[l>>2]=B+(u<<2)}}function a2(){fa()}function BP(){var o=0;return o=Jt(4)|0,l2(o),o|0}function l2(o){o=o|0,n[o>>2]=pc()|0}function vP(o){o=o|0,o|0&&(Kg(o),Et(o))}function Kg(o){o=o|0,st(n[o>>2]|0)}function JL(o,l,u){o=o|0,l=l|0,u=u|0,hc(n[o>>2]|0,l,u)}function ky(o,l){o=o|0,l=y(l),Ph(n[o>>2]|0,l)}function Qy(o,l){return o=o|0,l=l|0,s2(n[o>>2]|0,l)|0}function Ty(){var o=0;return o=Jt(8)|0,Jg(o,0),o|0}function Jg(o,l){o=o|0,l=l|0,l?l=Aa(n[l>>2]|0)|0:l=is()|0,n[o>>2]=l,n[o+4>>2]=0,Tn(l,o)}function Ry(o){o=o|0;var l=0;return l=Jt(8)|0,Jg(l,o),l|0}function zg(o){o=o|0,o|0&&(Fy(o),Et(o))}function Fy(o){o=o|0;var l=0;fc(n[o>>2]|0),l=o+4|0,o=n[l>>2]|0,n[l>>2]=0,o|0&&(Df(o),Et(o))}function Df(o){o=o|0,bf(o)}function bf(o){o=o|0,o=n[o>>2]|0,o|0&&Oa(o|0)}function c2(o){return o=o|0,Ga(o)|0}function u2(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),Et(l)),Ac(n[o>>2]|0)}function Ny(o,l){o=o|0,l=l|0,fn(n[o>>2]|0,n[l>>2]|0)}function zL(o,l){o=o|0,l=l|0,vh(n[o>>2]|0,l)}function ZL(o,l,u){o=o|0,l=l|0,u=+u,Ey(n[o>>2]|0,l,y(u))}function Oy(o,l,u){o=o|0,l=l|0,u=+u,Iy(n[o>>2]|0,l,y(u))}function f2(o,l){o=o|0,l=l|0,Ch(n[o>>2]|0,l)}function A2(o,l){o=o|0,l=l|0,bo(n[o>>2]|0,l)}function xr(o,l){o=o|0,l=l|0,Bh(n[o>>2]|0,l)}function ao(o,l){o=o|0,l=l|0,gy(n[o>>2]|0,l)}function Xi(o,l){o=o|0,l=l|0,Fg(n[o>>2]|0,l)}function Ls(o,l){o=o|0,l=l|0,Do(n[o>>2]|0,l)}function ep(o,l,u){o=o|0,l=l|0,u=+u,qA(n[o>>2]|0,l,y(u))}function p2(o,l,u){o=o|0,l=l|0,u=+u,Y(n[o>>2]|0,l,y(u))}function vs(o,l){o=o|0,l=l|0,GA(n[o>>2]|0,l)}function Ly(o,l){o=o|0,l=l|0,my(n[o>>2]|0,l)}function Nh(o,l){o=o|0,l=l|0,Po(n[o>>2]|0,l)}function Zg(o,l){o=o|0,l=+l,Sh(n[o>>2]|0,y(l))}function Oh(o,l){o=o|0,l=+l,Pl(n[o>>2]|0,y(l))}function h2(o,l){o=o|0,l=+l,yy(n[o>>2]|0,y(l))}function g2(o,l){o=o|0,l=+l,Og(n[o>>2]|0,y(l))}function d2(o,l){o=o|0,l=+l,bl(n[o>>2]|0,y(l))}function m2(o,l){o=o|0,l=+l,Lg(n[o>>2]|0,y(l))}function Pf(o,l){o=o|0,l=+l,e2(n[o>>2]|0,y(l))}function sr(o){o=o|0,Dh(n[o>>2]|0)}function My(o,l){o=o|0,l=+l,Zi(n[o>>2]|0,y(l))}function y2(o,l){o=o|0,l=+l,Ef(n[o>>2]|0,y(l))}function gc(o){o=o|0,Wa(n[o>>2]|0)}function xf(o,l){o=o|0,l=+l,yu(n[o>>2]|0,y(l))}function Xg(o,l){o=o|0,l=+l,If(n[o>>2]|0,y(l))}function $g(o,l){o=o|0,l=+l,di(n[o>>2]|0,y(l))}function E2(o,l){o=o|0,l=+l,WA(n[o>>2]|0,y(l))}function I2(o,l){o=o|0,l=+l,pa(n[o>>2]|0,y(l))}function vu(o,l){o=o|0,l=+l,Va(n[o>>2]|0,y(l))}function ed(o,l){o=o|0,l=+l,bh(n[o>>2]|0,y(l))}function C2(o,l){o=o|0,l=+l,Ug(n[o>>2]|0,y(l))}function _y(o,l){o=o|0,l=+l,YA(n[o>>2]|0,y(l))}function Su(o,l,u){o=o|0,l=l|0,u=+u,mu(n[o>>2]|0,l,y(u))}function Uy(o,l,u){o=o|0,l=l|0,u=+u,xo(n[o>>2]|0,l,y(u))}function td(o,l,u){o=o|0,l=l|0,u=+u,yf(n[o>>2]|0,l,y(u))}function rd(o){return o=o|0,Rg(n[o>>2]|0)|0}function To(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,jA(d,n[l>>2]|0,u),Ss(o,d),I=A}function Ss(o,l){o=o|0,l=l|0,Rl(o,n[l+4>>2]|0,+y(h[l>>2]))}function Rl(o,l,u){o=o|0,l=l|0,u=+u,n[o>>2]=l,E[o+8>>3]=u}function Hy(o){return o=o|0,$1(n[o>>2]|0)|0}function da(o){return o=o|0,wh(n[o>>2]|0)|0}function SP(o){return o=o|0,du(n[o>>2]|0)|0}function Lh(o){return o=o|0,X1(n[o>>2]|0)|0}function w2(o){return o=o|0,Ng(n[o>>2]|0)|0}function XL(o){return o=o|0,dy(n[o>>2]|0)|0}function DP(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,xt(d,n[l>>2]|0,u),Ss(o,d),I=A}function bP(o){return o=o|0,mf(n[o>>2]|0)|0}function jy(o){return o=o|0,Dl(n[o>>2]|0)|0}function B2(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,HA(A,n[l>>2]|0),Ss(o,A),I=u}function Mh(o){return o=o|0,+ +y(li(n[o>>2]|0))}function PP(o){return o=o|0,+ +y(Gi(n[o>>2]|0))}function xP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,ur(A,n[l>>2]|0),Ss(o,A),I=u}function nd(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Mg(A,n[l>>2]|0),Ss(o,A),I=u}function $L(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wt(A,n[l>>2]|0),Ss(o,A),I=u}function eM(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,Ya(A,n[l>>2]|0),Ss(o,A),I=u}function kP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_g(A,n[l>>2]|0),Ss(o,A),I=u}function QP(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,wy(A,n[l>>2]|0),Ss(o,A),I=u}function tp(o){return o=o|0,+ +y(Hg(n[o>>2]|0))}function tM(o,l){return o=o|0,l=l|0,+ +y(Cy(n[o>>2]|0,l))}function rM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,mt(d,n[l>>2]|0,u),Ss(o,d),I=A}function Du(o,l,u){o=o|0,l=l|0,u=u|0,lr(n[o>>2]|0,n[l>>2]|0,u)}function nM(o,l){o=o|0,l=l|0,df(n[o>>2]|0,n[l>>2]|0)}function TP(o){return o=o|0,_i(n[o>>2]|0)|0}function iM(o){return o=o|0,o=yt(n[o>>2]|0)|0,o?o=c2(o)|0:o=0,o|0}function RP(o,l){return o=o|0,l=l|0,o=ws(n[o>>2]|0,l)|0,o?o=c2(o)|0:o=0,o|0}function kf(o,l){o=o|0,l=l|0;var u=0,A=0;A=Jt(4)|0,FP(A,l),u=o+4|0,l=n[u>>2]|0,n[u>>2]=A,l|0&&(Df(l),Et(l)),St(n[o>>2]|0,1)}function FP(o,l){o=o|0,l=l|0,lM(o,l)}function sM(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,NP(k,Ga(l)|0,+u,A,+d,m),h[o>>2]=y(+E[k>>3]),h[o+4>>2]=y(+E[k+8>>3]),I=B}function NP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0,k=0,T=0,_=0,M=0;B=I,I=I+32|0,M=B+8|0,_=B+20|0,T=B,k=B+16|0,E[M>>3]=u,n[_>>2]=A,E[T>>3]=d,n[k>>2]=m,qy(o,n[l+4>>2]|0,M,_,T,k),I=B}function qy(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0;B=I,I=I+16|0,k=B,Nl(k),l=Ms(l)|0,OP(o,l,+E[u>>3],n[A>>2]|0,+E[d>>3],n[m>>2]|0),Ol(k),I=B}function Ms(o){return o=o|0,n[o>>2]|0}function OP(o,l,u,A,d,m){o=o|0,l=l|0,u=+u,A=A|0,d=+d,m=m|0;var B=0;B=ma(v2()|0)|0,u=+Ja(u),A=Gy(A)|0,d=+Ja(d),oM(o,Jn(0,B|0,l|0,+u,A|0,+d,Gy(m)|0)|0)}function v2(){var o=0;return s[7608]|0||(D2(9120),o=7608,n[o>>2]=1,n[o+4>>2]=0),9120}function ma(o){return o=o|0,n[o+8>>2]|0}function Ja(o){return o=+o,+ +Qf(o)}function Gy(o){return o=o|0,id(o)|0}function oM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=l,A&1?(za(u,0),Me(A|0,u|0)|0,S2(o,u),aM(u)):(n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]),I=d}function za(o,l){o=o|0,l=l|0,bu(o,l),n[o+8>>2]=0,s[o+24>>0]=0}function S2(o,l){o=o|0,l=l|0,l=l+8|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2]}function aM(o){o=o|0,s[o+24>>0]=0}function bu(o,l){o=o|0,l=l|0,n[o>>2]=l}function id(o){return o=o|0,o|0}function Qf(o){return o=+o,+o}function D2(o){o=o|0,Ro(o,b2()|0,4)}function b2(){return 1064}function Ro(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=qi(l|0,u+1|0)|0}function lM(o,l){o=o|0,l=l|0,l=n[l>>2]|0,n[o>>2]=l,cu(l|0)}function LP(o){o=o|0;var l=0,u=0;u=o+4|0,l=n[u>>2]|0,n[u>>2]=0,l|0&&(Df(l),Et(l)),St(n[o>>2]|0,0)}function MP(o){o=o|0,Dt(n[o>>2]|0)}function Wy(o){return o=o|0,tr(n[o>>2]|0)|0}function cM(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,KA(n[o>>2]|0,y(l),y(u),A)}function uM(o){return o=o|0,+ +y(Eu(n[o>>2]|0))}function v(o){return o=o|0,+ +y(Cf(n[o>>2]|0))}function D(o){return o=o|0,+ +y(Iu(n[o>>2]|0))}function Q(o){return o=o|0,+ +y(Ns(n[o>>2]|0))}function H(o){return o=o|0,+ +y(Cu(n[o>>2]|0))}function V(o){return o=o|0,+ +y(qn(n[o>>2]|0))}function ne(o,l){o=o|0,l=l|0,E[o>>3]=+y(Eu(n[l>>2]|0)),E[o+8>>3]=+y(Cf(n[l>>2]|0)),E[o+16>>3]=+y(Iu(n[l>>2]|0)),E[o+24>>3]=+y(Ns(n[l>>2]|0)),E[o+32>>3]=+y(Cu(n[l>>2]|0)),E[o+40>>3]=+y(qn(n[l>>2]|0))}function Se(o,l){return o=o|0,l=l|0,+ +y(ss(n[o>>2]|0,l))}function Ue(o,l){return o=o|0,l=l|0,+ +y(ki(n[o>>2]|0,l))}function At(o,l){return o=o|0,l=l|0,+ +y(VA(n[o>>2]|0,l))}function Gt(){return Qn()|0}function vr(){Lr(),Xt(),zn(),yi(),Za(),$e()}function Lr(){vqe(11713,4938,1)}function Xt(){q6e(10448)}function zn(){v6e(10408)}function yi(){Vje(10324)}function Za(){tHe(10096)}function $e(){qe(9132)}function qe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0,Fo=0,No=0,Oo=0,$a=0,Vh=0,Kh=0,dc=0,Jh=0,Ff=0,Nf=0,zh=0,Zh=0,Xh=0,on=0,mc=0,$h=0,ku=0,e0=0,t0=0,Of=0,Lf=0,Qu=0,lo=0,Ml=0,ya=0,yc=0,lp=0,cp=0,Mf=0,up=0,fp=0,co=0,Us=0,Ec=0,Wn=0,Ap=0,Lo=0,Tu=0,Mo=0,Ru=0,pp=0,hp=0,Fu=0,uo=0,Ic=0,gp=0,dp=0,mp=0,Fr=0,ui=0,Hs=0,_o=0,fo=0,Mr=0,Ar=0,Cc=0;l=I,I=I+672|0,u=l+656|0,Cc=l+648|0,Ar=l+640|0,Mr=l+632|0,fo=l+624|0,_o=l+616|0,Hs=l+608|0,ui=l+600|0,Fr=l+592|0,mp=l+584|0,dp=l+576|0,gp=l+568|0,Ic=l+560|0,uo=l+552|0,Fu=l+544|0,hp=l+536|0,pp=l+528|0,Ru=l+520|0,Mo=l+512|0,Tu=l+504|0,Lo=l+496|0,Ap=l+488|0,Wn=l+480|0,Ec=l+472|0,Us=l+464|0,co=l+456|0,fp=l+448|0,up=l+440|0,Mf=l+432|0,cp=l+424|0,lp=l+416|0,yc=l+408|0,ya=l+400|0,Ml=l+392|0,lo=l+384|0,Qu=l+376|0,Lf=l+368|0,Of=l+360|0,t0=l+352|0,e0=l+344|0,ku=l+336|0,$h=l+328|0,mc=l+320|0,on=l+312|0,Xh=l+304|0,Zh=l+296|0,zh=l+288|0,Nf=l+280|0,Ff=l+272|0,Jh=l+264|0,dc=l+256|0,Kh=l+248|0,Vh=l+240|0,$a=l+232|0,Oo=l+224|0,No=l+216|0,Fo=l+208|0,Hn=l+200|0,cr=l+192|0,Hr=l+184|0,Tr=l+176|0,$t=l+168|0,fr=l+160|0,qr=l+152|0,Lt=l+144|0,Ge=l+136|0,He=l+128|0,ct=l+120|0,Ze=l+112|0,tt=l+104|0,Qe=l+96|0,Le=l+88|0,We=l+80|0,ae=l+72|0,G=l+64|0,M=l+56|0,_=l+48|0,T=l+40|0,k=l+32|0,B=l+24|0,m=l+16|0,d=l+8|0,A=l,ht(o,3646),Zt(o,3651,2)|0,Sr(o,3665,2)|0,Xn(o,3682,18)|0,n[Cc>>2]=19,n[Cc+4>>2]=0,n[u>>2]=n[Cc>>2],n[u+4>>2]=n[Cc+4>>2],kr(o,3690,u)|0,n[Ar>>2]=1,n[Ar+4>>2]=0,n[u>>2]=n[Ar>>2],n[u+4>>2]=n[Ar+4>>2],Rn(o,3696,u)|0,n[Mr>>2]=2,n[Mr+4>>2]=0,n[u>>2]=n[Mr>>2],n[u+4>>2]=n[Mr+4>>2],Un(o,3706,u)|0,n[fo>>2]=1,n[fo+4>>2]=0,n[u>>2]=n[fo>>2],n[u+4>>2]=n[fo+4>>2],zr(o,3722,u)|0,n[_o>>2]=2,n[_o+4>>2]=0,n[u>>2]=n[_o>>2],n[u+4>>2]=n[_o+4>>2],zr(o,3734,u)|0,n[Hs>>2]=3,n[Hs+4>>2]=0,n[u>>2]=n[Hs>>2],n[u+4>>2]=n[Hs+4>>2],Un(o,3753,u)|0,n[ui>>2]=4,n[ui+4>>2]=0,n[u>>2]=n[ui>>2],n[u+4>>2]=n[ui+4>>2],Un(o,3769,u)|0,n[Fr>>2]=5,n[Fr+4>>2]=0,n[u>>2]=n[Fr>>2],n[u+4>>2]=n[Fr+4>>2],Un(o,3783,u)|0,n[mp>>2]=6,n[mp+4>>2]=0,n[u>>2]=n[mp>>2],n[u+4>>2]=n[mp+4>>2],Un(o,3796,u)|0,n[dp>>2]=7,n[dp+4>>2]=0,n[u>>2]=n[dp>>2],n[u+4>>2]=n[dp+4>>2],Un(o,3813,u)|0,n[gp>>2]=8,n[gp+4>>2]=0,n[u>>2]=n[gp>>2],n[u+4>>2]=n[gp+4>>2],Un(o,3825,u)|0,n[Ic>>2]=3,n[Ic+4>>2]=0,n[u>>2]=n[Ic>>2],n[u+4>>2]=n[Ic+4>>2],zr(o,3843,u)|0,n[uo>>2]=4,n[uo+4>>2]=0,n[u>>2]=n[uo>>2],n[u+4>>2]=n[uo+4>>2],zr(o,3853,u)|0,n[Fu>>2]=9,n[Fu+4>>2]=0,n[u>>2]=n[Fu>>2],n[u+4>>2]=n[Fu+4>>2],Un(o,3870,u)|0,n[hp>>2]=10,n[hp+4>>2]=0,n[u>>2]=n[hp>>2],n[u+4>>2]=n[hp+4>>2],Un(o,3884,u)|0,n[pp>>2]=11,n[pp+4>>2]=0,n[u>>2]=n[pp>>2],n[u+4>>2]=n[pp+4>>2],Un(o,3896,u)|0,n[Ru>>2]=1,n[Ru+4>>2]=0,n[u>>2]=n[Ru>>2],n[u+4>>2]=n[Ru+4>>2],ci(o,3907,u)|0,n[Mo>>2]=2,n[Mo+4>>2]=0,n[u>>2]=n[Mo>>2],n[u+4>>2]=n[Mo+4>>2],ci(o,3915,u)|0,n[Tu>>2]=3,n[Tu+4>>2]=0,n[u>>2]=n[Tu>>2],n[u+4>>2]=n[Tu+4>>2],ci(o,3928,u)|0,n[Lo>>2]=4,n[Lo+4>>2]=0,n[u>>2]=n[Lo>>2],n[u+4>>2]=n[Lo+4>>2],ci(o,3948,u)|0,n[Ap>>2]=5,n[Ap+4>>2]=0,n[u>>2]=n[Ap>>2],n[u+4>>2]=n[Ap+4>>2],ci(o,3960,u)|0,n[Wn>>2]=6,n[Wn+4>>2]=0,n[u>>2]=n[Wn>>2],n[u+4>>2]=n[Wn+4>>2],ci(o,3974,u)|0,n[Ec>>2]=7,n[Ec+4>>2]=0,n[u>>2]=n[Ec>>2],n[u+4>>2]=n[Ec+4>>2],ci(o,3983,u)|0,n[Us>>2]=20,n[Us+4>>2]=0,n[u>>2]=n[Us>>2],n[u+4>>2]=n[Us+4>>2],kr(o,3999,u)|0,n[co>>2]=8,n[co+4>>2]=0,n[u>>2]=n[co>>2],n[u+4>>2]=n[co+4>>2],ci(o,4012,u)|0,n[fp>>2]=9,n[fp+4>>2]=0,n[u>>2]=n[fp>>2],n[u+4>>2]=n[fp+4>>2],ci(o,4022,u)|0,n[up>>2]=21,n[up+4>>2]=0,n[u>>2]=n[up>>2],n[u+4>>2]=n[up+4>>2],kr(o,4039,u)|0,n[Mf>>2]=10,n[Mf+4>>2]=0,n[u>>2]=n[Mf>>2],n[u+4>>2]=n[Mf+4>>2],ci(o,4053,u)|0,n[cp>>2]=11,n[cp+4>>2]=0,n[u>>2]=n[cp>>2],n[u+4>>2]=n[cp+4>>2],ci(o,4065,u)|0,n[lp>>2]=12,n[lp+4>>2]=0,n[u>>2]=n[lp>>2],n[u+4>>2]=n[lp+4>>2],ci(o,4084,u)|0,n[yc>>2]=13,n[yc+4>>2]=0,n[u>>2]=n[yc>>2],n[u+4>>2]=n[yc+4>>2],ci(o,4097,u)|0,n[ya>>2]=14,n[ya+4>>2]=0,n[u>>2]=n[ya>>2],n[u+4>>2]=n[ya+4>>2],ci(o,4117,u)|0,n[Ml>>2]=15,n[Ml+4>>2]=0,n[u>>2]=n[Ml>>2],n[u+4>>2]=n[Ml+4>>2],ci(o,4129,u)|0,n[lo>>2]=16,n[lo+4>>2]=0,n[u>>2]=n[lo>>2],n[u+4>>2]=n[lo+4>>2],ci(o,4148,u)|0,n[Qu>>2]=17,n[Qu+4>>2]=0,n[u>>2]=n[Qu>>2],n[u+4>>2]=n[Qu+4>>2],ci(o,4161,u)|0,n[Lf>>2]=18,n[Lf+4>>2]=0,n[u>>2]=n[Lf>>2],n[u+4>>2]=n[Lf+4>>2],ci(o,4181,u)|0,n[Of>>2]=5,n[Of+4>>2]=0,n[u>>2]=n[Of>>2],n[u+4>>2]=n[Of+4>>2],zr(o,4196,u)|0,n[t0>>2]=6,n[t0+4>>2]=0,n[u>>2]=n[t0>>2],n[u+4>>2]=n[t0+4>>2],zr(o,4206,u)|0,n[e0>>2]=7,n[e0+4>>2]=0,n[u>>2]=n[e0>>2],n[u+4>>2]=n[e0+4>>2],zr(o,4217,u)|0,n[ku>>2]=3,n[ku+4>>2]=0,n[u>>2]=n[ku>>2],n[u+4>>2]=n[ku+4>>2],Pu(o,4235,u)|0,n[$h>>2]=1,n[$h+4>>2]=0,n[u>>2]=n[$h>>2],n[u+4>>2]=n[$h+4>>2],fM(o,4251,u)|0,n[mc>>2]=4,n[mc+4>>2]=0,n[u>>2]=n[mc>>2],n[u+4>>2]=n[mc+4>>2],Pu(o,4263,u)|0,n[on>>2]=5,n[on+4>>2]=0,n[u>>2]=n[on>>2],n[u+4>>2]=n[on+4>>2],Pu(o,4279,u)|0,n[Xh>>2]=6,n[Xh+4>>2]=0,n[u>>2]=n[Xh>>2],n[u+4>>2]=n[Xh+4>>2],Pu(o,4293,u)|0,n[Zh>>2]=7,n[Zh+4>>2]=0,n[u>>2]=n[Zh>>2],n[u+4>>2]=n[Zh+4>>2],Pu(o,4306,u)|0,n[zh>>2]=8,n[zh+4>>2]=0,n[u>>2]=n[zh>>2],n[u+4>>2]=n[zh+4>>2],Pu(o,4323,u)|0,n[Nf>>2]=9,n[Nf+4>>2]=0,n[u>>2]=n[Nf>>2],n[u+4>>2]=n[Nf+4>>2],Pu(o,4335,u)|0,n[Ff>>2]=2,n[Ff+4>>2]=0,n[u>>2]=n[Ff>>2],n[u+4>>2]=n[Ff+4>>2],fM(o,4353,u)|0,n[Jh>>2]=12,n[Jh+4>>2]=0,n[u>>2]=n[Jh>>2],n[u+4>>2]=n[Jh+4>>2],sd(o,4363,u)|0,n[dc>>2]=1,n[dc+4>>2]=0,n[u>>2]=n[dc>>2],n[u+4>>2]=n[dc+4>>2],rp(o,4376,u)|0,n[Kh>>2]=2,n[Kh+4>>2]=0,n[u>>2]=n[Kh>>2],n[u+4>>2]=n[Kh+4>>2],rp(o,4388,u)|0,n[Vh>>2]=13,n[Vh+4>>2]=0,n[u>>2]=n[Vh>>2],n[u+4>>2]=n[Vh+4>>2],sd(o,4402,u)|0,n[$a>>2]=14,n[$a+4>>2]=0,n[u>>2]=n[$a>>2],n[u+4>>2]=n[$a+4>>2],sd(o,4411,u)|0,n[Oo>>2]=15,n[Oo+4>>2]=0,n[u>>2]=n[Oo>>2],n[u+4>>2]=n[Oo+4>>2],sd(o,4421,u)|0,n[No>>2]=16,n[No+4>>2]=0,n[u>>2]=n[No>>2],n[u+4>>2]=n[No+4>>2],sd(o,4433,u)|0,n[Fo>>2]=17,n[Fo+4>>2]=0,n[u>>2]=n[Fo>>2],n[u+4>>2]=n[Fo+4>>2],sd(o,4446,u)|0,n[Hn>>2]=18,n[Hn+4>>2]=0,n[u>>2]=n[Hn>>2],n[u+4>>2]=n[Hn+4>>2],sd(o,4458,u)|0,n[cr>>2]=3,n[cr+4>>2]=0,n[u>>2]=n[cr>>2],n[u+4>>2]=n[cr+4>>2],rp(o,4471,u)|0,n[Hr>>2]=1,n[Hr+4>>2]=0,n[u>>2]=n[Hr>>2],n[u+4>>2]=n[Hr+4>>2],_P(o,4486,u)|0,n[Tr>>2]=10,n[Tr+4>>2]=0,n[u>>2]=n[Tr>>2],n[u+4>>2]=n[Tr+4>>2],Pu(o,4496,u)|0,n[$t>>2]=11,n[$t+4>>2]=0,n[u>>2]=n[$t>>2],n[u+4>>2]=n[$t+4>>2],Pu(o,4508,u)|0,n[fr>>2]=3,n[fr+4>>2]=0,n[u>>2]=n[fr>>2],n[u+4>>2]=n[fr+4>>2],fM(o,4519,u)|0,n[qr>>2]=4,n[qr+4>>2]=0,n[u>>2]=n[qr>>2],n[u+4>>2]=n[qr+4>>2],TOe(o,4530,u)|0,n[Lt>>2]=19,n[Lt+4>>2]=0,n[u>>2]=n[Lt>>2],n[u+4>>2]=n[Lt+4>>2],ROe(o,4542,u)|0,n[Ge>>2]=12,n[Ge+4>>2]=0,n[u>>2]=n[Ge>>2],n[u+4>>2]=n[Ge+4>>2],FOe(o,4554,u)|0,n[He>>2]=13,n[He+4>>2]=0,n[u>>2]=n[He>>2],n[u+4>>2]=n[He+4>>2],NOe(o,4568,u)|0,n[ct>>2]=2,n[ct+4>>2]=0,n[u>>2]=n[ct>>2],n[u+4>>2]=n[ct+4>>2],OOe(o,4578,u)|0,n[Ze>>2]=20,n[Ze+4>>2]=0,n[u>>2]=n[Ze>>2],n[u+4>>2]=n[Ze+4>>2],LOe(o,4587,u)|0,n[tt>>2]=22,n[tt+4>>2]=0,n[u>>2]=n[tt>>2],n[u+4>>2]=n[tt+4>>2],kr(o,4602,u)|0,n[Qe>>2]=23,n[Qe+4>>2]=0,n[u>>2]=n[Qe>>2],n[u+4>>2]=n[Qe+4>>2],kr(o,4619,u)|0,n[Le>>2]=14,n[Le+4>>2]=0,n[u>>2]=n[Le>>2],n[u+4>>2]=n[Le+4>>2],MOe(o,4629,u)|0,n[We>>2]=1,n[We+4>>2]=0,n[u>>2]=n[We>>2],n[u+4>>2]=n[We+4>>2],_Oe(o,4637,u)|0,n[ae>>2]=4,n[ae+4>>2]=0,n[u>>2]=n[ae>>2],n[u+4>>2]=n[ae+4>>2],rp(o,4653,u)|0,n[G>>2]=5,n[G+4>>2]=0,n[u>>2]=n[G>>2],n[u+4>>2]=n[G+4>>2],rp(o,4669,u)|0,n[M>>2]=6,n[M+4>>2]=0,n[u>>2]=n[M>>2],n[u+4>>2]=n[M+4>>2],rp(o,4686,u)|0,n[_>>2]=7,n[_+4>>2]=0,n[u>>2]=n[_>>2],n[u+4>>2]=n[_+4>>2],rp(o,4701,u)|0,n[T>>2]=8,n[T+4>>2]=0,n[u>>2]=n[T>>2],n[u+4>>2]=n[T+4>>2],rp(o,4719,u)|0,n[k>>2]=9,n[k+4>>2]=0,n[u>>2]=n[k>>2],n[u+4>>2]=n[k+4>>2],rp(o,4736,u)|0,n[B>>2]=21,n[B+4>>2]=0,n[u>>2]=n[B>>2],n[u+4>>2]=n[B+4>>2],UOe(o,4754,u)|0,n[m>>2]=2,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],_P(o,4772,u)|0,n[d>>2]=3,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],_P(o,4790,u)|0,n[A>>2]=4,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],_P(o,4808,u)|0,I=l}function ht(o,l){o=o|0,l=l|0;var u=0;u=Y8e()|0,n[o>>2]=u,V8e(u,l),Gh(n[o>>2]|0)}function Zt(o,l,u){return o=o|0,l=l|0,u=u|0,T8e(o,Bn(l)|0,u,0),o|0}function Sr(o,l,u){return o=o|0,l=l|0,u=u|0,d8e(o,Bn(l)|0,u,0),o|0}function Xn(o,l,u){return o=o|0,l=l|0,u=u|0,r8e(o,Bn(l)|0,u,0),o|0}function kr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],U3e(o,l,d),I=A,o|0}function Rn(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],C3e(o,l,d),I=A,o|0}function Un(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],s3e(o,l,d),I=A,o|0}function zr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],q4e(o,l,d),I=A,o|0}function ci(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],b4e(o,l,d),I=A,o|0}function Pu(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],f4e(o,l,d),I=A,o|0}function fM(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],JUe(o,l,d),I=A,o|0}function sd(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],CUe(o,l,d),I=A,o|0}function rp(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],sUe(o,l,d),I=A,o|0}function _P(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],q_e(o,l,d),I=A,o|0}function TOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],b_e(o,l,d),I=A,o|0}function ROe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],f_e(o,l,d),I=A,o|0}function FOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zMe(o,l,d),I=A,o|0}function NOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],NMe(o,l,d),I=A,o|0}function OOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],yMe(o,l,d),I=A,o|0}function LOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tMe(o,l,d),I=A,o|0}function MOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_Le(o,l,d),I=A,o|0}function _Oe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],CLe(o,l,d),I=A,o|0}function UOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],HOe(o,l,d),I=A,o|0}function HOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],jOe(o,u,d,1),I=A}function Bn(o){return o=o|0,o|0}function jOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=AM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=qOe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,GOe(m,A)|0,A),I=d}function AM(){var o=0,l=0;if(s[7616]|0||(jz(9136),gr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9136)|0)){o=9136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));jz(9136)}return 9136}function qOe(o){return o=o|0,0}function GOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=AM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Hz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(VOe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function vn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;B=I,I=I+32|0,ae=B+24|0,G=B+20|0,T=B+16|0,M=B+12|0,_=B+8|0,k=B+4|0,We=B,n[G>>2]=l,n[T>>2]=u,n[M>>2]=A,n[_>>2]=d,n[k>>2]=m,m=o+28|0,n[We>>2]=n[m>>2],n[ae>>2]=n[We>>2],WOe(o+24|0,ae,G,M,_,T,k)|0,n[m>>2]=n[n[m>>2]>>2],I=B}function WOe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,o=YOe(l)|0,l=Jt(24)|0,Uz(l+4|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[o>>2],n[o>>2]=l,l|0}function YOe(o){return o=o|0,n[o>>2]|0}function Uz(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function yr(o,l){return o=o|0,l=l|0,l|o|0}function Hz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function VOe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KOe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,JOe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Hz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,zOe(o,k),ZOe(k),I=_;return}}function KOe(o){return o=o|0,357913941}function JOe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function zOe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZOe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function jz(o){o=o|0,eLe(o)}function XOe(o){o=o|0,$Oe(o+24|0)}function Ur(o){return o=o|0,n[o>>2]|0}function $Oe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,tLe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function en(){return 9228}function tLe(){return 1140}function rLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=nLe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=iLe(l,A)|0,I=u,l|0}function tn(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,n[o>>2]=l,n[o+4>>2]=u,n[o+8>>2]=A,n[o+12>>2]=d,n[o+16>>2]=m}function nLe(o){return o=o|0,(n[(AM()|0)+24>>2]|0)+(o*12|0)|0}function iLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+48|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=sLe(A)|0,I=d,A|0}function sLe(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(qz()|0)|0,A?(hM(l,A),gM(u,l),oLe(o,u),o=dM(l)|0):o=aLe(o)|0,I=d,o|0}function qz(){var o=0;return s[7632]|0||(mLe(9184),gr(25,9184,U|0)|0,o=7632,n[o>>2]=1,n[o+4>>2]=0),9184}function pM(o){return o=o|0,n[o+36>>2]|0}function hM(o,l){o=o|0,l=l|0,n[o>>2]=l,n[o+4>>2]=o,n[o+8>>2]=0}function gM(o,l){o=o|0,l=l|0,n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=0}function oLe(o,l){o=o|0,l=l|0,fLe(l,o,o+8|0,o+16|0,o+24|0,o+32|0,o+40|0)|0}function dM(o){return o=o|0,n[(n[o+4>>2]|0)+8>>2]|0}function aLe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;T=I,I=I+16|0,u=T+4|0,A=T,d=Fl(8)|0,m=d,B=Jt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[o>>2],k=k+4|0,o=o+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Jt(8)|0,B=n[l>>2]|0,n[A>>2]=0,n[u>>2]=n[A>>2],Gz(k,B,u),n[d>>2]=k,I=T,m|0}function Gz(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1092,n[u+12>>2]=l,n[o+4>>2]=u}function lLe(o){o=o|0,Zy(o),Et(o)}function cLe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function uLe(o){o=o|0,Et(o)}function fLe(o,l,u,A,d,m,B){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,m=ALe(n[o>>2]|0,l,u,A,d,m,B)|0,B=o+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function ALe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0;var k=0,T=0;return k=I,I=I+16|0,T=k,Nl(T),o=Ms(o)|0,B=pLe(o,+E[l>>3],+E[u>>3],+E[A>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Ol(T),I=k,B|0}function pLe(o,l,u,A,d,m,B){o=o|0,l=+l,u=+u,A=+A,d=+d,m=+m,B=+B;var k=0;return k=ma(hLe()|0)|0,l=+Ja(l),u=+Ja(u),A=+Ja(A),d=+Ja(d),m=+Ja(m),io(0,k|0,o|0,+l,+u,+A,+d,+m,+ +Ja(B))|0}function hLe(){var o=0;return s[7624]|0||(gLe(9172),o=7624,n[o>>2]=1,n[o+4>>2]=0),9172}function gLe(o){o=o|0,Ro(o,dLe()|0,6)}function dLe(){return 1112}function mLe(o){o=o|0,_h(o)}function yLe(o){o=o|0,Wz(o+24|0),Yz(o+16|0)}function Wz(o){o=o|0,ILe(o)}function Yz(o){o=o|0,ELe(o)}function ELe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function ILe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function _h(o){o=o|0;var l=0;n[o+16>>2]=0,n[o+20>>2]=0,l=o+24|0,n[l>>2]=0,n[o+28>>2]=l,n[o+36>>2]=0,s[o+40>>0]=0,s[o+41>>0]=0}function CLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wLe(o,u,d,0),I=A}function wLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=mM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=BLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,vLe(m,A)|0,A),I=d}function mM(){var o=0,l=0;if(s[7640]|0||(Kz(9232),gr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9232)|0)){o=9232,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));Kz(9232)}return 9232}function BLe(o){return o=o|0,0}function vLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=mM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Vz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(SLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Vz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function SLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=DLe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,bLe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Vz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,PLe(o,k),xLe(k),I=_;return}}function DLe(o){return o=o|0,357913941}function bLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function PLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function Kz(o){o=o|0,TLe(o)}function kLe(o){o=o|0,QLe(o+24|0)}function QLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function TLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,RLe()|0,3),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function RLe(){return 1144}function FLe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,B=m+8|0,k=m,T=NLe(o)|0,o=n[T+4>>2]|0,n[k>>2]=n[T>>2],n[k+4>>2]=o,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],OLe(l,B,u,A,d),I=m}function NLe(o){return o=o|0,(n[(mM()|0)+24>>2]|0)+(o*12|0)|0}function OLe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0;var m=0,B=0,k=0,T=0,_=0;_=I,I=I+16|0,B=_+2|0,k=_+1|0,T=_,m=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(m=n[(n[o>>2]|0)+m>>2]|0),Tf(B,u),u=+Rf(B,u),Tf(k,A),A=+Rf(k,A),np(T,d),T=ip(T,d)|0,c$[m&1](o,u,A,T),I=_}function Tf(o,l){o=o|0,l=+l}function Rf(o,l){return o=o|0,l=+l,+ +MLe(l)}function np(o,l){o=o|0,l=l|0}function ip(o,l){return o=o|0,l=l|0,LLe(l)|0}function LLe(o){return o=o|0,o|0}function MLe(o){return o=+o,+o}function _Le(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ULe(o,u,d,1),I=A}function ULe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=yM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=HLe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,jLe(m,A)|0,A),I=d}function yM(){var o=0,l=0;if(s[7648]|0||(zz(9268),gr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9268)|0)){o=9268,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));zz(9268)}return 9268}function HLe(o){return o=o|0,0}function jLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=yM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Jz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(qLe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Jz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function qLe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=GLe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,WLe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Jz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,YLe(o,k),VLe(k),I=_;return}}function GLe(o){return o=o|0,357913941}function WLe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function YLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function VLe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function zz(o){o=o|0,zLe(o)}function KLe(o){o=o|0,JLe(o+24|0)}function JLe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function zLe(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,ZLe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function ZLe(){return 1160}function XLe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=$Le(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=eMe(l,A)|0,I=u,l|0}function $Le(o){return o=o|0,(n[(yM()|0)+24>>2]|0)+(o*12|0)|0}function eMe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),Zz(hd[u&31](o)|0)|0}function Zz(o){return o=o|0,o&1|0}function tMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rMe(o,u,d,0),I=A}function rMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=EM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=nMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,iMe(m,A)|0,A),I=d}function EM(){var o=0,l=0;if(s[7656]|0||($z(9304),gr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9304)|0)){o=9304,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));$z(9304)}return 9304}function nMe(o){return o=o|0,0}function iMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=EM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],Xz(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(sMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function Xz(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function sMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=oMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,aMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],Xz(m,A,u),n[T>>2]=(n[T>>2]|0)+12,lMe(o,k),cMe(k),I=_;return}}function oMe(o){return o=o|0,357913941}function aMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function lMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function cMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function $z(o){o=o|0,AMe(o)}function uMe(o){o=o|0,fMe(o+24|0)}function fMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function AMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,pMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function pMe(){return 1164}function hMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=gMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],dMe(l,d,u),I=A}function gMe(o){return o=o|0,(n[(EM()|0)+24>>2]|0)+(o*12|0)|0}function dMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Uh(d,u),u=Hh(d,u)|0,ap[A&31](o,u),jh(d),I=m}function Uh(o,l){o=o|0,l=l|0,mMe(o,l)}function Hh(o,l){return o=o|0,l=l|0,o|0}function jh(o){o=o|0,Df(o)}function mMe(o,l){o=o|0,l=l|0,IM(o,l)}function IM(o,l){o=o|0,l=l|0,n[o>>2]=l}function yMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],EMe(o,u,d,0),I=A}function EMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=CM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=IMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,CMe(m,A)|0,A),I=d}function CM(){var o=0,l=0;if(s[7664]|0||(tZ(9340),gr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9340)|0)){o=9340,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));tZ(9340)}return 9340}function IMe(o){return o=o|0,0}function CMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=CM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],eZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(wMe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function eZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function wMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=BMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,vMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],eZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,SMe(o,k),DMe(k),I=_;return}}function BMe(o){return o=o|0,357913941}function vMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function SMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function DMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function tZ(o){o=o|0,xMe(o)}function bMe(o){o=o|0,PMe(o+24|0)}function PMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function xMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,4,l,kMe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kMe(){return 1180}function QMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=TMe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=RMe(l,d,u)|0,I=A,u|0}function TMe(o){return o=o|0,(n[(CM()|0)+24>>2]|0)+(o*12|0)|0}function RMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),od(d,u),d=ad(d,u)|0,d=UP(m_[A&15](o,d)|0)|0,I=m,d|0}function od(o,l){o=o|0,l=l|0}function ad(o,l){return o=o|0,l=l|0,FMe(l)|0}function UP(o){return o=o|0,o|0}function FMe(o){return o=o|0,o|0}function NMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],OMe(o,u,d,0),I=A}function OMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=wM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=LMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,MMe(m,A)|0,A),I=d}function wM(){var o=0,l=0;if(s[7672]|0||(nZ(9376),gr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9376)|0)){o=9376,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));nZ(9376)}return 9376}function LMe(o){return o=o|0,0}function MMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=wM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],rZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(_Me(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function rZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function _Me(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=UMe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,HMe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],rZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,jMe(o,k),qMe(k),I=_;return}}function UMe(o){return o=o|0,357913941}function HMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function jMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function qMe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function nZ(o){o=o|0,YMe(o)}function GMe(o){o=o|0,WMe(o+24|0)}function WMe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function YMe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,iZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function iZ(){return 1196}function VMe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=KMe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=JMe(l,A)|0,I=u,l|0}function KMe(o){return o=o|0,(n[(wM()|0)+24>>2]|0)+(o*12|0)|0}function JMe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),UP(hd[u&31](o)|0)|0}function zMe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZMe(o,u,d,1),I=A}function ZMe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=BM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=XMe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,$Me(m,A)|0,A),I=d}function BM(){var o=0,l=0;if(s[7680]|0||(oZ(9412),gr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9412)|0)){o=9412,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));oZ(9412)}return 9412}function XMe(o){return o=o|0,0}function $Me(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=BM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],sZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(e_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function sZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function e_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=t_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,r_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],sZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,n_e(o,k),i_e(k),I=_;return}}function t_e(o){return o=o|0,357913941}function r_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function n_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function i_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function oZ(o){o=o|0,a_e(o)}function s_e(o){o=o|0,o_e(o+24|0)}function o_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function a_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,aZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function aZ(){return 1200}function l_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=c_e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=u_e(l,A)|0,I=u,l|0}function c_e(o){return o=o|0,(n[(BM()|0)+24>>2]|0)+(o*12|0)|0}function u_e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),HP(hd[u&31](o)|0)|0}function HP(o){return o=o|0,o|0}function f_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],A_e(o,u,d,0),I=A}function A_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=vM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=p_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,h_e(m,A)|0,A),I=d}function vM(){var o=0,l=0;if(s[7688]|0||(cZ(9448),gr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9448)|0)){o=9448,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));cZ(9448)}return 9448}function p_e(o){return o=o|0,0}function h_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=vM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],lZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(g_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function lZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function g_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=d_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,m_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],lZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,y_e(o,k),E_e(k),I=_;return}}function d_e(o){return o=o|0,357913941}function m_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function y_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function E_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function cZ(o){o=o|0,w_e(o)}function I_e(o){o=o|0,C_e(o+24|0)}function C_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function w_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,uZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uZ(){return 1204}function B_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=v_e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],S_e(l,d,u),I=A}function v_e(o){return o=o|0,(n[(vM()|0)+24>>2]|0)+(o*12|0)|0}function S_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),SM(d,u),d=DM(d,u)|0,ap[A&31](o,d),I=m}function SM(o,l){o=o|0,l=l|0}function DM(o,l){return o=o|0,l=l|0,D_e(l)|0}function D_e(o){return o=o|0,o|0}function b_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],P_e(o,u,d,0),I=A}function P_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=bM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=x_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,k_e(m,A)|0,A),I=d}function bM(){var o=0,l=0;if(s[7696]|0||(AZ(9484),gr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9484)|0)){o=9484,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));AZ(9484)}return 9484}function x_e(o){return o=o|0,0}function k_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=bM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],fZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Q_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function fZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Q_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=T_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,R_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],fZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,F_e(o,k),N_e(k),I=_;return}}function T_e(o){return o=o|0,357913941}function R_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function F_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function N_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function AZ(o){o=o|0,M_e(o)}function O_e(o){o=o|0,L_e(o+24|0)}function L_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function M_e(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,__e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function __e(){return 1212}function U_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=H_e(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],j_e(l,m,u,A),I=d}function H_e(o){return o=o|0,(n[(bM()|0)+24>>2]|0)+(o*12|0)|0}function j_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),SM(m,u),m=DM(m,u)|0,od(B,A),B=ad(B,A)|0,F2[d&15](o,m,B),I=k}function q_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],G_e(o,u,d,1),I=A}function G_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=PM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=W_e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Y_e(m,A)|0,A),I=d}function PM(){var o=0,l=0;if(s[7704]|0||(hZ(9520),gr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9520)|0)){o=9520,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));hZ(9520)}return 9520}function W_e(o){return o=o|0,0}function Y_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=PM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],pZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(V_e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function pZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function V_e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=K_e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,J_e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],pZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,z_e(o,k),Z_e(k),I=_;return}}function K_e(o){return o=o|0,357913941}function J_e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function z_e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Z_e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function hZ(o){o=o|0,eUe(o)}function X_e(o){o=o|0,$_e(o+24|0)}function $_e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,tUe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tUe(){return 1224}function rUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;return d=I,I=I+16|0,m=d+8|0,B=d,k=nUe(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],A=+iUe(l,m,u),I=d,+A}function nUe(o){return o=o|0,(n[(PM()|0)+24>>2]|0)+(o*12|0)|0}function iUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,B=+Qf(+f$[A&7](o,d)),I=m,+B}function sUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],oUe(o,u,d,1),I=A}function oUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=xM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=aUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,lUe(m,A)|0,A),I=d}function xM(){var o=0,l=0;if(s[7712]|0||(dZ(9556),gr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9556)|0)){o=9556,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));dZ(9556)}return 9556}function aUe(o){return o=o|0,0}function lUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=xM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],gZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(cUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function gZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function cUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=uUe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,fUe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],gZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,AUe(o,k),pUe(k),I=_;return}}function uUe(o){return o=o|0,357913941}function fUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function AUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function pUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function dZ(o){o=o|0,dUe(o)}function hUe(o){o=o|0,gUe(o+24|0)}function gUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function dUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,mUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function mUe(){return 1232}function yUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=EUe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=+IUe(l,d),I=A,+u}function EUe(o){return o=o|0,(n[(xM()|0)+24>>2]|0)+(o*12|0)|0}function IUe(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),+ +Qf(+u$[u&15](o))}function CUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wUe(o,u,d,1),I=A}function wUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=kM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=BUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,vUe(m,A)|0,A),I=d}function kM(){var o=0,l=0;if(s[7720]|0||(yZ(9592),gr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9592)|0)){o=9592,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));yZ(9592)}return 9592}function BUe(o){return o=o|0,0}function vUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=kM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],mZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(SUe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function mZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function SUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=DUe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,bUe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],mZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,PUe(o,k),xUe(k),I=_;return}}function DUe(o){return o=o|0,357913941}function bUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function PUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function xUe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function yZ(o){o=o|0,TUe(o)}function kUe(o){o=o|0,QUe(o+24|0)}function QUe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function TUe(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,RUe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function RUe(){return 1276}function FUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=NUe(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=OUe(l,A)|0,I=u,l|0}function NUe(o){return o=o|0,(n[(kM()|0)+24>>2]|0)+(o*12|0)|0}function OUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;return d=I,I=I+16|0,A=d,u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),ap[u&31](A,o),A=EZ(A)|0,I=d,A|0}function EZ(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(IZ()|0)|0,A?(hM(l,A),gM(u,l),LUe(o,u),o=dM(l)|0):o=MUe(o)|0,I=d,o|0}function IZ(){var o=0;return s[7736]|0||(KUe(9640),gr(25,9640,U|0)|0,o=7736,n[o>>2]=1,n[o+4>>2]=0),9640}function LUe(o,l){o=o|0,l=l|0,jUe(l,o,o+8|0)|0}function MUe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(16)|0,n[k>>2]=n[o>>2],n[k+4>>2]=n[o+4>>2],n[k+8>>2]=n[o+8>>2],n[k+12>>2]=n[o+12>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],QM(o,m,d),n[A>>2]=o,I=u,l|0}function QM(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1244,n[u+12>>2]=l,n[o+4>>2]=u}function _Ue(o){o=o|0,Zy(o),Et(o)}function UUe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function HUe(o){o=o|0,Et(o)}function jUe(o,l,u){return o=o|0,l=l|0,u=u|0,l=qUe(n[o>>2]|0,l,u)|0,u=o+4|0,n[(n[u>>2]|0)+8>>2]=l,n[(n[u>>2]|0)+8>>2]|0}function qUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return A=I,I=I+16|0,d=A,Nl(d),o=Ms(o)|0,u=GUe(o,n[l>>2]|0,+E[u>>3])|0,Ol(d),I=A,u|0}function GUe(o,l,u){o=o|0,l=l|0,u=+u;var A=0;return A=ma(WUe()|0)|0,l=Gy(l)|0,lu(0,A|0,o|0,l|0,+ +Ja(u))|0}function WUe(){var o=0;return s[7728]|0||(YUe(9628),o=7728,n[o>>2]=1,n[o+4>>2]=0),9628}function YUe(o){o=o|0,Ro(o,VUe()|0,2)}function VUe(){return 1264}function KUe(o){o=o|0,_h(o)}function JUe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zUe(o,u,d,1),I=A}function zUe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=TM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=ZUe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,XUe(m,A)|0,A),I=d}function TM(){var o=0,l=0;if(s[7744]|0||(wZ(9684),gr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9684)|0)){o=9684,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));wZ(9684)}return 9684}function ZUe(o){return o=o|0,0}function XUe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=TM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],CZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):($Ue(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function CZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function $Ue(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=e4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,t4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],CZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,r4e(o,k),n4e(k),I=_;return}}function e4e(o){return o=o|0,357913941}function t4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function r4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function n4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function wZ(o){o=o|0,o4e(o)}function i4e(o){o=o|0,s4e(o+24|0)}function s4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function o4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,5,l,a4e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function a4e(){return 1280}function l4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=c4e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=u4e(l,d,u)|0,I=A,u|0}function c4e(o){return o=o|0,(n[(TM()|0)+24>>2]|0)+(o*12|0)|0}function u4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return B=I,I=I+32|0,d=B,m=B+16|0,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(m,u),m=ip(m,u)|0,F2[A&15](d,o,m),m=EZ(d)|0,I=B,m|0}function f4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],A4e(o,u,d,1),I=A}function A4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=RM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=p4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,h4e(m,A)|0,A),I=d}function RM(){var o=0,l=0;if(s[7752]|0||(vZ(9720),gr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9720)|0)){o=9720,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));vZ(9720)}return 9720}function p4e(o){return o=o|0,0}function h4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=RM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],BZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(g4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function BZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function g4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=d4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,m4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],BZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,y4e(o,k),E4e(k),I=_;return}}function d4e(o){return o=o|0,357913941}function m4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function y4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function E4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function vZ(o){o=o|0,w4e(o)}function I4e(o){o=o|0,C4e(o+24|0)}function C4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function w4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,B4e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function B4e(){return 1288}function v4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;return u=I,I=I+16|0,A=u+8|0,d=u,m=S4e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],l=D4e(l,A)|0,I=u,l|0}function S4e(o){return o=o|0,(n[(RM()|0)+24>>2]|0)+(o*12|0)|0}function D4e(o,l){o=o|0,l=l|0;var u=0;return u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),id(hd[u&31](o)|0)|0}function b4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],P4e(o,u,d,0),I=A}function P4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=FM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=x4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,k4e(m,A)|0,A),I=d}function FM(){var o=0,l=0;if(s[7760]|0||(DZ(9756),gr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9756)|0)){o=9756,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));DZ(9756)}return 9756}function x4e(o){return o=o|0,0}function k4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=FM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],SZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(Q4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function SZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function Q4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=T4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,R4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],SZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,F4e(o,k),N4e(k),I=_;return}}function T4e(o){return o=o|0,357913941}function R4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function F4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function N4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function DZ(o){o=o|0,M4e(o)}function O4e(o){o=o|0,L4e(o+24|0)}function L4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function M4e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,_4e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function _4e(){return 1292}function U4e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=H4e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],j4e(l,d,u),I=A}function H4e(o){return o=o|0,(n[(FM()|0)+24>>2]|0)+(o*12|0)|0}function j4e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),Tf(d,u),u=+Rf(d,u),a$[A&31](o,u),I=m}function q4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],G4e(o,u,d,0),I=A}function G4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=NM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=W4e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,Y4e(m,A)|0,A),I=d}function NM(){var o=0,l=0;if(s[7768]|0||(PZ(9792),gr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9792)|0)){o=9792,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));PZ(9792)}return 9792}function W4e(o){return o=o|0,0}function Y4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=NM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],bZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(V4e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function bZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function V4e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=K4e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,J4e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],bZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,z4e(o,k),Z4e(k),I=_;return}}function K4e(o){return o=o|0,357913941}function J4e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function z4e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Z4e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function PZ(o){o=o|0,e3e(o)}function X4e(o){o=o|0,$4e(o+24|0)}function $4e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function e3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,1,l,t3e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function t3e(){return 1300}function r3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=n3e(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],i3e(l,m,u,A),I=d}function n3e(o){return o=o|0,(n[(NM()|0)+24>>2]|0)+(o*12|0)|0}function i3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,Tf(B,A),A=+Rf(B,A),g$[d&15](o,m,A),I=k}function s3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],o3e(o,u,d,0),I=A}function o3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=OM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=a3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,l3e(m,A)|0,A),I=d}function OM(){var o=0,l=0;if(s[7776]|0||(kZ(9828),gr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9828)|0)){o=9828,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));kZ(9828)}return 9828}function a3e(o){return o=o|0,0}function l3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=OM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],xZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(c3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function xZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function c3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=u3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,f3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],xZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,A3e(o,k),p3e(k),I=_;return}}function u3e(o){return o=o|0,357913941}function f3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function A3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function p3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function kZ(o){o=o|0,d3e(o)}function h3e(o){o=o|0,g3e(o+24|0)}function g3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function d3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,7,l,m3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function m3e(){return 1312}function y3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=E3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],I3e(l,d,u),I=A}function E3e(o){return o=o|0,(n[(OM()|0)+24>>2]|0)+(o*12|0)|0}function I3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,ap[A&31](o,d),I=m}function C3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],w3e(o,u,d,0),I=A}function w3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=LM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=B3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,v3e(m,A)|0,A),I=d}function LM(){var o=0,l=0;if(s[7784]|0||(TZ(9864),gr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9864)|0)){o=9864,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));TZ(9864)}return 9864}function B3e(o){return o=o|0,0}function v3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=LM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],QZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(S3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function QZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function S3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=D3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,b3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],QZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,P3e(o,k),x3e(k),I=_;return}}function D3e(o){return o=o|0,357913941}function b3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function P3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function x3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function TZ(o){o=o|0,T3e(o)}function k3e(o){o=o|0,Q3e(o+24|0)}function Q3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function T3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,8,l,R3e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function R3e(){return 1320}function F3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=N3e(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],O3e(l,d,u),I=A}function N3e(o){return o=o|0,(n[(LM()|0)+24>>2]|0)+(o*12|0)|0}function O3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),L3e(d,u),d=M3e(d,u)|0,ap[A&31](o,d),I=m}function L3e(o,l){o=o|0,l=l|0}function M3e(o,l){return o=o|0,l=l|0,_3e(l)|0}function _3e(o){return o=o|0,o|0}function U3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],H3e(o,u,d,0),I=A}function H3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=MM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=j3e(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,q3e(m,A)|0,A),I=d}function MM(){var o=0,l=0;if(s[7792]|0||(FZ(9900),gr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9900)|0)){o=9900,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));FZ(9900)}return 9900}function j3e(o){return o=o|0,0}function q3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=MM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],RZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(G3e(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function RZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function G3e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=W3e(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,Y3e(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],RZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,V3e(o,k),K3e(k),I=_;return}}function W3e(o){return o=o|0,357913941}function Y3e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function V3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function K3e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function FZ(o){o=o|0,Z3e(o)}function J3e(o){o=o|0,z3e(o+24|0)}function z3e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function Z3e(o){o=o|0;var l=0;l=en()|0,tn(o,2,22,l,X3e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function X3e(){return 1344}function $3e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0;u=I,I=I+16|0,A=u+8|0,d=u,m=e8e(o)|0,o=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=o,n[A>>2]=n[d>>2],n[A+4>>2]=n[d+4>>2],t8e(l,A),I=u}function e8e(o){return o=o|0,(n[(MM()|0)+24>>2]|0)+(o*12|0)|0}function t8e(o,l){o=o|0,l=l|0;var u=0;u=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(u=n[(n[o>>2]|0)+u>>2]|0),op[u&127](o)}function r8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=_M()|0,o=n8e(u)|0,vn(m,l,d,o,i8e(u,A)|0,A)}function _M(){var o=0,l=0;if(s[7800]|0||(OZ(9936),gr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9936)|0)){o=9936,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));OZ(9936)}return 9936}function n8e(o){return o=o|0,o|0}function i8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=_M()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(NZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(s8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function NZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function s8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=o8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,a8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,NZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,l8e(o,d),c8e(d),I=k;return}}function o8e(o){return o=o|0,536870911}function a8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function l8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function c8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function OZ(o){o=o|0,A8e(o)}function u8e(o){o=o|0,f8e(o+24|0)}function f8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function A8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,23,l,uZ()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function p8e(o,l){o=o|0,l=l|0,g8e(n[(h8e(o)|0)>>2]|0,l)}function h8e(o){return o=o|0,(n[(_M()|0)+24>>2]|0)+(o<<3)|0}function g8e(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,SM(A,l),l=DM(A,l)|0,op[o&127](l),I=u}function d8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=UM()|0,o=m8e(u)|0,vn(m,l,d,o,y8e(u,A)|0,A)}function UM(){var o=0,l=0;if(s[7808]|0||(MZ(9972),gr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(Ur(9972)|0)){o=9972,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));MZ(9972)}return 9972}function m8e(o){return o=o|0,o|0}function y8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=UM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(LZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(E8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function LZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function E8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=I8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,C8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,LZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,w8e(o,d),B8e(d),I=k;return}}function I8e(o){return o=o|0,536870911}function C8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function w8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function B8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function MZ(o){o=o|0,D8e(o)}function v8e(o){o=o|0,S8e(o+24|0)}function S8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function D8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,9,l,b8e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function b8e(){return 1348}function P8e(o,l){return o=o|0,l=l|0,k8e(n[(x8e(o)|0)>>2]|0,l)|0}function x8e(o){return o=o|0,(n[(UM()|0)+24>>2]|0)+(o<<3)|0}function k8e(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,_Z(A,l),l=UZ(A,l)|0,l=UP(hd[o&31](l)|0)|0,I=u,l|0}function _Z(o,l){o=o|0,l=l|0}function UZ(o,l){return o=o|0,l=l|0,Q8e(l)|0}function Q8e(o){return o=o|0,o|0}function T8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=HM()|0,o=R8e(u)|0,vn(m,l,d,o,F8e(u,A)|0,A)}function HM(){var o=0,l=0;if(s[7816]|0||(jZ(10008),gr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10008)|0)){o=10008,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));jZ(10008)}return 10008}function R8e(o){return o=o|0,o|0}function F8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=HM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(HZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(N8e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function HZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function N8e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=O8e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,L8e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,HZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,M8e(o,d),_8e(d),I=k;return}}function O8e(o){return o=o|0,536870911}function L8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function M8e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function _8e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function jZ(o){o=o|0,j8e(o)}function U8e(o){o=o|0,H8e(o+24|0)}function H8e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function j8e(o){o=o|0;var l=0;l=en()|0,tn(o,1,15,l,iZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function q8e(o){return o=o|0,W8e(n[(G8e(o)|0)>>2]|0)|0}function G8e(o){return o=o|0,(n[(HM()|0)+24>>2]|0)+(o<<3)|0}function W8e(o){return o=o|0,UP(tx[o&7]()|0)|0}function Y8e(){var o=0;return s[7832]|0||(eHe(10052),gr(25,10052,U|0)|0,o=7832,n[o>>2]=1,n[o+4>>2]=0),10052}function V8e(o,l){o=o|0,l=l|0,n[o>>2]=K8e()|0,n[o+4>>2]=J8e()|0,n[o+12>>2]=l,n[o+8>>2]=z8e()|0,n[o+32>>2]=2}function K8e(){return 11709}function J8e(){return 1188}function z8e(){return jP()|0}function Z8e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(X8e(u),Et(u)):l|0&&(Fy(l),Et(l))}function qh(o,l){return o=o|0,l=l|0,l&o|0}function X8e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function jP(){var o=0;return s[7824]|0||(n[2511]=$8e()|0,n[2512]=0,o=7824,n[o>>2]=1,n[o+4>>2]=0),10044}function $8e(){return 0}function eHe(o){o=o|0,_h(o)}function tHe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0;l=I,I=I+32|0,u=l+24|0,m=l+16|0,d=l+8|0,A=l,rHe(o,4827),nHe(o,4834,3)|0,iHe(o,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[u>>2]=n[m>>2],n[u+4>>2]=n[m+4>>2],sHe(o,4841,u)|0,n[d>>2]=1,n[d+4>>2]=0,n[u>>2]=n[d>>2],n[u+4>>2]=n[d+4>>2],oHe(o,4871,u)|0,n[A>>2]=10,n[A+4>>2]=0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],aHe(o,4891,u)|0,I=l}function rHe(o,l){o=o|0,l=l|0;var u=0;u=_je()|0,n[o>>2]=u,Uje(u,l),Gh(n[o>>2]|0)}function nHe(o,l,u){return o=o|0,l=l|0,u=u|0,Bje(o,Bn(l)|0,u,0),o|0}function iHe(o,l,u){return o=o|0,l=l|0,u=u|0,lje(o,Bn(l)|0,u,0),o|0}function sHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],qHe(o,l,d),I=A,o|0}function oHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vHe(o,l,d),I=A,o|0}function aHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=n[u+4>>2]|0,n[m>>2]=n[u>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lHe(o,l,d),I=A,o|0}function lHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cHe(o,u,d,1),I=A}function cHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=jM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=uHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,fHe(m,A)|0,A),I=d}function jM(){var o=0,l=0;if(s[7840]|0||(GZ(10100),gr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10100)|0)){o=10100,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));GZ(10100)}return 10100}function uHe(o){return o=o|0,0}function fHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=jM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],qZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(AHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function qZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function AHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=pHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,hHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],qZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,gHe(o,k),dHe(k),I=_;return}}function pHe(o){return o=o|0,357913941}function hHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function gHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function dHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function GZ(o){o=o|0,EHe(o)}function mHe(o){o=o|0,yHe(o+24|0)}function yHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function EHe(o){o=o|0;var l=0;l=en()|0,tn(o,2,6,l,IHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function IHe(){return 1364}function CHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;return A=I,I=I+16|0,d=A+8|0,m=A,B=wHe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],u=BHe(l,d,u)|0,I=A,u|0}function wHe(o){return o=o|0,(n[(jM()|0)+24>>2]|0)+(o*12|0)|0}function BHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),np(d,u),d=ip(d,u)|0,d=Zz(m_[A&15](o,d)|0)|0,I=m,d|0}function vHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],SHe(o,u,d,0),I=A}function SHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=qM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=DHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,bHe(m,A)|0,A),I=d}function qM(){var o=0,l=0;if(s[7848]|0||(YZ(10136),gr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10136)|0)){o=10136,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));YZ(10136)}return 10136}function DHe(o){return o=o|0,0}function bHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=qM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],WZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(PHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function WZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function PHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=xHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,kHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],WZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,QHe(o,k),THe(k),I=_;return}}function xHe(o){return o=o|0,357913941}function kHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function QHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function THe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function YZ(o){o=o|0,NHe(o)}function RHe(o){o=o|0,FHe(o+24|0)}function FHe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function NHe(o){o=o|0;var l=0;l=en()|0,tn(o,2,9,l,OHe()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function OHe(){return 1372}function LHe(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,d=A+8|0,m=A,B=MHe(o)|0,o=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=o,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_He(l,d,u),I=A}function MHe(o){return o=o|0,(n[(qM()|0)+24>>2]|0)+(o*12|0)|0}function _He(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=Xe;m=I,I=I+16|0,d=m,A=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(A=n[(n[o>>2]|0)+A>>2]|0),UHe(d,u),B=y(HHe(d,u)),o$[A&1](o,B),I=m}function UHe(o,l){o=o|0,l=+l}function HHe(o,l){return o=o|0,l=+l,y(jHe(l))}function jHe(o){return o=+o,y(o)}function qHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,d=A+8|0,m=A,k=n[u>>2]|0,B=n[u+4>>2]|0,u=Bn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],GHe(o,u,d,0),I=A}function GHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0,T=0,_=0,M=0;d=I,I=I+32|0,m=d+16|0,M=d+8|0,k=d,_=n[u>>2]|0,T=n[u+4>>2]|0,B=n[o>>2]|0,o=GM()|0,n[M>>2]=_,n[M+4>>2]=T,n[m>>2]=n[M>>2],n[m+4>>2]=n[M+4>>2],u=WHe(m)|0,n[k>>2]=_,n[k+4>>2]=T,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],vn(B,l,o,u,YHe(m,A)|0,A),I=d}function GM(){var o=0,l=0;if(s[7856]|0||(KZ(10172),gr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10172)|0)){o=10172,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));KZ(10172)}return 10172}function WHe(o){return o=o|0,0}function YHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0;return M=I,I=I+32|0,d=M+24|0,B=M+16|0,k=M,T=M+8|0,m=n[o>>2]|0,A=n[o+4>>2]|0,n[k>>2]=m,n[k+4>>2]=A,G=GM()|0,_=G+24|0,o=yr(l,4)|0,n[T>>2]=o,l=G+28|0,u=n[l>>2]|0,u>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=A,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],VZ(u,d,o),o=(n[l>>2]|0)+12|0,n[l>>2]=o):(VHe(_,k,T),o=n[l>>2]|0),I=M,((o-(n[_>>2]|0)|0)/12|0)+-1|0}function VZ(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=n[l+4>>2]|0,n[o>>2]=n[l>>2],n[o+4>>2]=A,n[o+8>>2]=u}function VHe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;if(_=I,I=I+48|0,A=_+32|0,B=_+24|0,k=_,T=o+4|0,d=(((n[T>>2]|0)-(n[o>>2]|0)|0)/12|0)+1|0,m=KHe(o)|0,m>>>0>>0)sn(o);else{M=n[o>>2]|0,ae=((n[o+8>>2]|0)-M|0)/12|0,G=ae<<1,JHe(k,ae>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[T>>2]|0)-M|0)/12|0,o+8|0),T=k+8|0,m=n[T>>2]|0,d=n[l+4>>2]|0,u=n[u>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[A>>2]=n[B>>2],n[A+4>>2]=n[B+4>>2],VZ(m,A,u),n[T>>2]=(n[T>>2]|0)+12,zHe(o,k),ZHe(k),I=_;return}}function KHe(o){return o=o|0,357913941}function JHe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>357913941)Nt();else{d=Jt(l*12|0)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u*12|0)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l*12|0)}function zHe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function ZHe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~(((A+-12-l|0)>>>0)/12|0)*12|0)),o=n[o>>2]|0,o|0&&Et(o)}function KZ(o){o=o|0,eje(o)}function XHe(o){o=o|0,$He(o+24|0)}function $He(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~(((l+-12-A|0)>>>0)/12|0)*12|0)),Et(u))}function eje(o){o=o|0;var l=0;l=en()|0,tn(o,2,3,l,tje()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function tje(){return 1380}function rje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+8|0,B=d,k=nje(o)|0,o=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=o,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],ije(l,m,u,A),I=d}function nje(o){return o=o|0,(n[(GM()|0)+24>>2]|0)+(o*12|0)|0}function ije(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;k=I,I=I+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,o=o+(l>>1)|0,l&1&&(d=n[(n[o>>2]|0)+d>>2]|0),np(m,u),m=ip(m,u)|0,sje(B,A),B=oje(B,A)|0,F2[d&15](o,m,B),I=k}function sje(o,l){o=o|0,l=l|0}function oje(o,l){return o=o|0,l=l|0,aje(l)|0}function aje(o){return o=o|0,(o|0)!=0|0}function lje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=WM()|0,o=cje(u)|0,vn(m,l,d,o,uje(u,A)|0,A)}function WM(){var o=0,l=0;if(s[7864]|0||(zZ(10208),gr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10208)|0)){o=10208,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));zZ(10208)}return 10208}function cje(o){return o=o|0,o|0}function uje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=WM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(JZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(fje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function JZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function fje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Aje(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,pje(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,JZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,hje(o,d),gje(d),I=k;return}}function Aje(o){return o=o|0,536870911}function pje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function hje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function zZ(o){o=o|0,yje(o)}function dje(o){o=o|0,mje(o+24|0)}function mje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function yje(o){o=o|0;var l=0;l=en()|0,tn(o,1,24,l,Eje()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Eje(){return 1392}function Ije(o,l){o=o|0,l=l|0,wje(n[(Cje(o)|0)>>2]|0,l)}function Cje(o){return o=o|0,(n[(WM()|0)+24>>2]|0)+(o<<3)|0}function wje(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,_Z(A,l),l=UZ(A,l)|0,op[o&127](l),I=u}function Bje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=YM()|0,o=vje(u)|0,vn(m,l,d,o,Sje(u,A)|0,A)}function YM(){var o=0,l=0;if(s[7872]|0||(XZ(10244),gr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10244)|0)){o=10244,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));XZ(10244)}return 10244}function vje(o){return o=o|0,o|0}function Sje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=YM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(ZZ(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(Dje(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function ZZ(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function Dje(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=bje(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Pje(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,ZZ(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,xje(o,d),kje(d),I=k;return}}function bje(o){return o=o|0,536870911}function Pje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function xje(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function kje(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function XZ(o){o=o|0,Rje(o)}function Qje(o){o=o|0,Tje(o+24|0)}function Tje(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function Rje(o){o=o|0;var l=0;l=en()|0,tn(o,1,16,l,Fje()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Fje(){return 1400}function Nje(o){return o=o|0,Lje(n[(Oje(o)|0)>>2]|0)|0}function Oje(o){return o=o|0,(n[(YM()|0)+24>>2]|0)+(o<<3)|0}function Lje(o){return o=o|0,Mje(tx[o&7]()|0)|0}function Mje(o){return o=o|0,o|0}function _je(){var o=0;return s[7880]|0||(Yje(10280),gr(25,10280,U|0)|0,o=7880,n[o>>2]=1,n[o+4>>2]=0),10280}function Uje(o,l){o=o|0,l=l|0,n[o>>2]=Hje()|0,n[o+4>>2]=jje()|0,n[o+12>>2]=l,n[o+8>>2]=qje()|0,n[o+32>>2]=4}function Hje(){return 11711}function jje(){return 1356}function qje(){return jP()|0}function Gje(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(Wje(u),Et(u)):l|0&&(Kg(l),Et(l))}function Wje(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Yje(o){o=o|0,_h(o)}function Vje(o){o=o|0,Kje(o,4920),Jje(o)|0,zje(o)|0}function Kje(o,l){o=o|0,l=l|0;var u=0;u=IZ()|0,n[o>>2]=u,m6e(u,l),Gh(n[o>>2]|0)}function Jje(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,a6e()|0),o|0}function zje(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,Zje()|0),o|0}function Zje(){var o=0;return s[7888]|0||($Z(10328),gr(53,10328,U|0)|0,o=7888,n[o>>2]=1,n[o+4>>2]=0),Ur(10328)|0||$Z(10328),10328}function ld(o,l){o=o|0,l=l|0,vn(o,0,l,0,0,0)}function $Z(o){o=o|0,e6e(o),cd(o,10)}function Xje(o){o=o|0,$je(o+24|0)}function $je(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function e6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,i6e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function t6e(o,l,u){o=o|0,l=l|0,u=+u,r6e(o,l,u)}function cd(o,l){o=o|0,l=l|0,n[o+20>>2]=l}function r6e(o,l,u){o=o|0,l=l|0,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+16|0,m=A+8|0,k=A+13|0,d=A,B=A+12|0,np(k,l),n[m>>2]=ip(k,l)|0,Tf(B,u),E[d>>3]=+Rf(B,u),n6e(o,m,d),I=A}function n6e(o,l,u){o=o|0,l=l|0,u=u|0,Rl(o+8|0,n[l>>2]|0,+E[u>>3]),s[o+24>>0]=1}function i6e(){return 1404}function s6e(o,l){return o=o|0,l=+l,o6e(o,l)|0}function o6e(o,l){o=o|0,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,m=A+4|0,B=A+8|0,k=A,d=Fl(8)|0,u=d,T=Jt(16)|0,np(m,o),o=ip(m,o)|0,Tf(B,l),Rl(T,o,+Rf(B,l)),B=u+4|0,n[B>>2]=T,o=Jt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],QM(o,B,m),n[d>>2]=o,I=A,u|0}function a6e(){var o=0;return s[7896]|0||(eX(10364),gr(54,10364,U|0)|0,o=7896,n[o>>2]=1,n[o+4>>2]=0),Ur(10364)|0||eX(10364),10364}function eX(o){o=o|0,u6e(o),cd(o,55)}function l6e(o){o=o|0,c6e(o+24|0)}function c6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function u6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,4,l,h6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function f6e(o){o=o|0,A6e(o)}function A6e(o){o=o|0,p6e(o)}function p6e(o){o=o|0,tX(o+8|0),s[o+24>>0]=1}function tX(o){o=o|0,n[o>>2]=0,E[o+8>>3]=0}function h6e(){return 1424}function g6e(){return d6e()|0}function d6e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,tX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],QM(A,m,d),n[u>>2]=A,I=l,o|0}function m6e(o,l){o=o|0,l=l|0,n[o>>2]=y6e()|0,n[o+4>>2]=E6e()|0,n[o+12>>2]=l,n[o+8>>2]=I6e()|0,n[o+32>>2]=5}function y6e(){return 11710}function E6e(){return 1416}function I6e(){return qP()|0}function C6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(w6e(u),Et(u)):l|0&&Et(l)}function w6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function qP(){var o=0;return s[7904]|0||(n[2600]=B6e()|0,n[2601]=0,o=7904,n[o>>2]=1,n[o+4>>2]=0),10400}function B6e(){return n[357]|0}function v6e(o){o=o|0,S6e(o,4926),D6e(o)|0}function S6e(o,l){o=o|0,l=l|0;var u=0;u=qz()|0,n[o>>2]=u,L6e(u,l),Gh(n[o>>2]|0)}function D6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,b6e()|0),o|0}function b6e(){var o=0;return s[7912]|0||(rX(10412),gr(56,10412,U|0)|0,o=7912,n[o>>2]=1,n[o+4>>2]=0),Ur(10412)|0||rX(10412),10412}function rX(o){o=o|0,k6e(o),cd(o,57)}function P6e(o){o=o|0,x6e(o+24|0)}function x6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function k6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,5,l,F6e()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Q6e(o){o=o|0,T6e(o)}function T6e(o){o=o|0,R6e(o)}function R6e(o){o=o|0;var l=0,u=0;l=o+8|0,u=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(u|0));s[o+56>>0]=1}function F6e(){return 1432}function N6e(){return O6e()|0}function O6e(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0;B=I,I=I+16|0,o=B+4|0,l=B,u=Fl(8)|0,A=u,d=Jt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=A+4|0,n[m>>2]=d,k=Jt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[o>>2]=n[l>>2],Gz(k,m,o),n[u>>2]=k,I=B,A|0}function L6e(o,l){o=o|0,l=l|0,n[o>>2]=M6e()|0,n[o+4>>2]=_6e()|0,n[o+12>>2]=l,n[o+8>>2]=U6e()|0,n[o+32>>2]=6}function M6e(){return 11704}function _6e(){return 1436}function U6e(){return qP()|0}function H6e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(j6e(u),Et(u)):l|0&&Et(l)}function j6e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function q6e(o){o=o|0,G6e(o,4933),W6e(o)|0,Y6e(o)|0}function G6e(o,l){o=o|0,l=l|0;var u=0;u=dqe()|0,n[o>>2]=u,mqe(u,l),Gh(n[o>>2]|0)}function W6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,oqe()|0),o|0}function Y6e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,V6e()|0),o|0}function V6e(){var o=0;return s[7920]|0||(nX(10452),gr(58,10452,U|0)|0,o=7920,n[o>>2]=1,n[o+4>>2]=0),Ur(10452)|0||nX(10452),10452}function nX(o){o=o|0,z6e(o),cd(o,1)}function K6e(o){o=o|0,J6e(o+24|0)}function J6e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function z6e(o){o=o|0;var l=0;l=en()|0,tn(o,5,1,l,eqe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function Z6e(o,l,u){o=o|0,l=+l,u=+u,X6e(o,l,u)}function X6e(o,l,u){o=o|0,l=+l,u=+u;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,m=A+8|0,k=A+17|0,d=A,B=A+16|0,Tf(k,l),E[m>>3]=+Rf(k,l),Tf(B,u),E[d>>3]=+Rf(B,u),$6e(o,m,d),I=A}function $6e(o,l,u){o=o|0,l=l|0,u=u|0,iX(o+8|0,+E[l>>3],+E[u>>3]),s[o+24>>0]=1}function iX(o,l,u){o=o|0,l=+l,u=+u,E[o>>3]=l,E[o+8>>3]=u}function eqe(){return 1472}function tqe(o,l){return o=+o,l=+l,rqe(o,l)|0}function rqe(o,l){o=+o,l=+l;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+16|0,B=A+4|0,k=A+8|0,T=A,d=Fl(8)|0,u=d,m=Jt(16)|0,Tf(B,o),o=+Rf(B,o),Tf(k,l),iX(m,o,+Rf(k,l)),k=u+4|0,n[k>>2]=m,m=Jt(8)|0,k=n[k>>2]|0,n[T>>2]=0,n[B>>2]=n[T>>2],sX(m,k,B),n[d>>2]=m,I=A,u|0}function sX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1452,n[u+12>>2]=l,n[o+4>>2]=u}function nqe(o){o=o|0,Zy(o),Et(o)}function iqe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function sqe(o){o=o|0,Et(o)}function oqe(){var o=0;return s[7928]|0||(oX(10488),gr(59,10488,U|0)|0,o=7928,n[o>>2]=1,n[o+4>>2]=0),Ur(10488)|0||oX(10488),10488}function oX(o){o=o|0,cqe(o),cd(o,60)}function aqe(o){o=o|0,lqe(o+24|0)}function lqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function cqe(o){o=o|0;var l=0;l=en()|0,tn(o,5,6,l,pqe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function uqe(o){o=o|0,fqe(o)}function fqe(o){o=o|0,Aqe(o)}function Aqe(o){o=o|0,aX(o+8|0),s[o+24>>0]=1}function aX(o){o=o|0,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[o+12>>2]=0}function pqe(){return 1492}function hqe(){return gqe()|0}function gqe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,A=Jt(16)|0,aX(A),m=o+4|0,n[m>>2]=A,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],sX(A,m,d),n[u>>2]=A,I=l,o|0}function dqe(){var o=0;return s[7936]|0||(Bqe(10524),gr(25,10524,U|0)|0,o=7936,n[o>>2]=1,n[o+4>>2]=0),10524}function mqe(o,l){o=o|0,l=l|0,n[o>>2]=yqe()|0,n[o+4>>2]=Eqe()|0,n[o+12>>2]=l,n[o+8>>2]=Iqe()|0,n[o+32>>2]=7}function yqe(){return 11700}function Eqe(){return 1484}function Iqe(){return qP()|0}function Cqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(wqe(u),Et(u)):l|0&&Et(l)}function wqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Bqe(o){o=o|0,_h(o)}function vqe(o,l,u){o=o|0,l=l|0,u=u|0,o=Bn(l)|0,l=Sqe(u)|0,u=Dqe(u,0)|0,rGe(o,l,u,VM()|0,0)}function Sqe(o){return o=o|0,o|0}function Dqe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=VM()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(cX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(Rqe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function VM(){var o=0,l=0;if(s[7944]|0||(lX(10568),gr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10568)|0)){o=10568,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));lX(10568)}return 10568}function lX(o){o=o|0,xqe(o)}function bqe(o){o=o|0,Pqe(o+24|0)}function Pqe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function xqe(o){o=o|0;var l=0;l=en()|0,tn(o,1,17,l,aZ()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kqe(o){return o=o|0,Tqe(n[(Qqe(o)|0)>>2]|0)|0}function Qqe(o){return o=o|0,(n[(VM()|0)+24>>2]|0)+(o<<3)|0}function Tqe(o){return o=o|0,HP(tx[o&7]()|0)|0}function cX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function Rqe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Fqe(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,Nqe(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,cX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Oqe(o,d),Lqe(d),I=k;return}}function Fqe(o){return o=o|0,536870911}function Nqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Oqe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function Lqe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function Mqe(){_qe()}function _qe(){Uqe(10604)}function Uqe(o){o=o|0,Hqe(o,4955)}function Hqe(o,l){o=o|0,l=l|0;var u=0;u=jqe()|0,n[o>>2]=u,qqe(u,l),Gh(n[o>>2]|0)}function jqe(){var o=0;return s[7952]|0||(Xqe(10612),gr(25,10612,U|0)|0,o=7952,n[o>>2]=1,n[o+4>>2]=0),10612}function qqe(o,l){o=o|0,l=l|0,n[o>>2]=Vqe()|0,n[o+4>>2]=Kqe()|0,n[o+12>>2]=l,n[o+8>>2]=Jqe()|0,n[o+32>>2]=8}function Gh(o){o=o|0;var l=0,u=0;l=I,I=I+16|0,u=l,Yy()|0,n[u>>2]=o,Gqe(10608,u),I=l}function Yy(){return s[11714]|0||(n[2652]=0,gr(62,10608,U|0)|0,s[11714]=1),10608}function Gqe(o,l){o=o|0,l=l|0;var u=0;u=Jt(8)|0,n[u+4>>2]=n[l>>2],n[u>>2]=n[o>>2],n[o>>2]=u}function Wqe(o){o=o|0,Yqe(o)}function Yqe(o){o=o|0;var l=0,u=0;if(l=n[o>>2]|0,l|0)do u=l,l=n[l>>2]|0,Et(u);while(l|0);n[o>>2]=0}function Vqe(){return 11715}function Kqe(){return 1496}function Jqe(){return jP()|0}function zqe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(Zqe(u),Et(u)):l|0&&Et(l)}function Zqe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function Xqe(o){o=o|0,_h(o)}function $qe(o,l){o=o|0,l=l|0;var u=0,A=0;Yy()|0,u=n[2652]|0;e:do if(u|0){for(;A=n[u+4>>2]|0,!(A|0&&!(GX(KM(A)|0,o)|0));)if(u=n[u>>2]|0,!u)break e;eGe(A,l)}while(!1)}function KM(o){return o=o|0,n[o+12>>2]|0}function eGe(o,l){o=o|0,l=l|0;var u=0;o=o+36|0,u=n[o>>2]|0,u|0&&(Df(u),Et(u)),u=Jt(4)|0,FP(u,l),n[o>>2]=u}function JM(){return s[11716]|0||(n[2664]=0,gr(63,10656,U|0)|0,s[11716]=1),10656}function uX(){var o=0;return s[11717]|0?o=n[2665]|0:(tGe(),n[2665]=1504,s[11717]=1,o=1504),o|0}function tGe(){s[11740]|0||(s[11718]=yr(yr(8,0)|0,0)|0,s[11719]=yr(yr(0,0)|0,0)|0,s[11720]=yr(yr(0,16)|0,0)|0,s[11721]=yr(yr(8,0)|0,0)|0,s[11722]=yr(yr(0,0)|0,0)|0,s[11723]=yr(yr(8,0)|0,0)|0,s[11724]=yr(yr(0,0)|0,0)|0,s[11725]=yr(yr(8,0)|0,0)|0,s[11726]=yr(yr(0,0)|0,0)|0,s[11727]=yr(yr(8,0)|0,0)|0,s[11728]=yr(yr(0,0)|0,0)|0,s[11729]=yr(yr(0,0)|0,32)|0,s[11730]=yr(yr(0,0)|0,32)|0,s[11740]=1)}function fX(){return 1572}function rGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0;m=I,I=I+32|0,M=m+16|0,_=m+12|0,T=m+8|0,k=m+4|0,B=m,n[M>>2]=o,n[_>>2]=l,n[T>>2]=u,n[k>>2]=A,n[B>>2]=d,JM()|0,nGe(10656,M,_,T,k,B),I=m}function nGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0;B=Jt(24)|0,Uz(B+4|0,n[l>>2]|0,n[u>>2]|0,n[A>>2]|0,n[d>>2]|0,n[m>>2]|0),n[B>>2]=n[o>>2],n[o>>2]=B}function AX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0;if(ct=I,I=I+32|0,Le=ct+20|0,Qe=ct+8|0,tt=ct+4|0,Ze=ct,l=n[l>>2]|0,l|0){We=Le+4|0,T=Le+8|0,_=Qe+4|0,M=Qe+8|0,G=Qe+8|0,ae=Le+8|0;do{if(B=l+4|0,k=zM(B)|0,k|0){if(d=P2(k)|0,n[Le>>2]=0,n[We>>2]=0,n[T>>2]=0,A=(x2(k)|0)+1|0,iGe(Le,A),A|0)for(;A=A+-1|0,xu(Qe,n[d>>2]|0),m=n[We>>2]|0,m>>>0<(n[ae>>2]|0)>>>0?(n[m>>2]=n[Qe>>2],n[We>>2]=(n[We>>2]|0)+4):ZM(Le,Qe),A;)d=d+4|0;A=k2(k)|0,n[Qe>>2]=0,n[_>>2]=0,n[M>>2]=0;e:do if(n[A>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?sGe(Qe,A):(n[d>>2]=n[A>>2],n[_>>2]=(n[_>>2]|0)+4),A=A+4|0,!(n[A>>2]|0))break e;d=n[_>>2]|0,m=n[G>>2]|0}while(!1);n[tt>>2]=GP(B)|0,n[Ze>>2]=Ur(k)|0,oGe(u,o,tt,Ze,Le,Qe),XM(Qe),sp(Le)}l=n[l>>2]|0}while(l|0)}I=ct}function zM(o){return o=o|0,n[o+12>>2]|0}function P2(o){return o=o|0,n[o+12>>2]|0}function x2(o){return o=o|0,n[o+16>>2]|0}function iGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+32|0,u=d,A=n[o>>2]|0,(n[o+8>>2]|0)-A>>2>>>0>>0&&(IX(u,l,(n[o+4>>2]|0)-A>>2,o+8|0),CX(o,u),wX(u)),I=d}function ZM(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=EX(o)|0,m>>>0>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,IX(u,_>>2>>>0>>1>>>0?T>>>0>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,CX(o,u),wX(u),I=B;return}}function k2(o){return o=o|0,n[o+8>>2]|0}function sGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;if(B=I,I=I+32|0,u=B,A=o+4|0,d=((n[A>>2]|0)-(n[o>>2]|0)>>2)+1|0,m=yX(o)|0,m>>>0>>0)sn(o);else{k=n[o>>2]|0,_=(n[o+8>>2]|0)-k|0,T=_>>1,SGe(u,_>>2>>>0>>1>>>0?T>>>0>>0?d:T:m,(n[A>>2]|0)-k>>2,o+8|0),m=u+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,DGe(o,u),bGe(u),I=B;return}}function GP(o){return o=o|0,n[o>>2]|0}function oGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,aGe(o,l,u,A,d,m)}function XM(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function sp(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-4-A|0)>>>2)<<2)),Et(u))}function aGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+48|0,M=B+40|0,k=B+32|0,G=B+24|0,T=B+12|0,_=B,Nl(k),o=Ms(o)|0,n[G>>2]=n[l>>2],u=n[u>>2]|0,A=n[A>>2]|0,$M(T,d),lGe(_,m),n[M>>2]=n[G>>2],cGe(o,M,u,A,T,_),XM(_),sp(T),Ol(k),I=B}function $M(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(BGe(o,A),vGe(o,n[l>>2]|0,n[u>>2]|0,A))}function lGe(o,l){o=o|0,l=l|0;var u=0,A=0;n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,u=l+4|0,A=(n[u>>2]|0)-(n[l>>2]|0)>>2,A|0&&(CGe(o,A),wGe(o,n[l>>2]|0,n[u>>2]|0,A))}function cGe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,M=B+28|0,G=B+24|0,k=B+12|0,T=B,_=ma(uGe()|0)|0,n[G>>2]=n[l>>2],n[M>>2]=n[G>>2],l=ud(M)|0,u=pX(u)|0,A=e_(A)|0,n[k>>2]=n[d>>2],M=d+4|0,n[k+4>>2]=n[M>>2],G=d+8|0,n[k+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[d>>2]=0,d=t_(k)|0,n[T>>2]=n[m>>2],M=m+4|0,n[T+4>>2]=n[M>>2],G=m+8|0,n[T+8>>2]=n[G>>2],n[G>>2]=0,n[M>>2]=0,n[m>>2]=0,uu(0,_|0,o|0,l|0,u|0,A|0,d|0,fGe(T)|0)|0,XM(T),sp(k),I=B}function uGe(){var o=0;return s[7968]|0||(EGe(10708),o=7968,n[o>>2]=1,n[o+4>>2]=0),10708}function ud(o){return o=o|0,gX(o)|0}function pX(o){return o=o|0,hX(o)|0}function e_(o){return o=o|0,HP(o)|0}function t_(o){return o=o|0,pGe(o)|0}function fGe(o){return o=o|0,AGe(o)|0}function AGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=hX(n[(n[o>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function hX(o){return o=o|0,o|0}function pGe(o){o=o|0;var l=0,u=0,A=0;if(A=(n[o+4>>2]|0)-(n[o>>2]|0)|0,u=A>>2,A=Fl(A+4|0)|0,n[A>>2]=u,u|0){l=0;do n[A+4+(l<<2)>>2]=gX((n[o>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(u|0))}return A|0}function gX(o){o=o|0;var l=0,u=0,A=0,d=0;return d=I,I=I+32|0,l=d+12|0,u=d,A=pM(dX()|0)|0,A?(hM(l,A),gM(u,l),JWe(o,u),o=dM(l)|0):o=hGe(o)|0,I=d,o|0}function dX(){var o=0;return s[7960]|0||(yGe(10664),gr(25,10664,U|0)|0,o=7960,n[o>>2]=1,n[o+4>>2]=0),10664}function hGe(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,n[k>>2]=n[o>>2],m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],mX(o,m,d),n[A>>2]=o,I=u,l|0}function mX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1656,n[u+12>>2]=l,n[o+4>>2]=u}function gGe(o){o=o|0,Zy(o),Et(o)}function dGe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function mGe(o){o=o|0,Et(o)}function yGe(o){o=o|0,_h(o)}function EGe(o){o=o|0,Ro(o,IGe()|0,5)}function IGe(){return 1676}function CGe(o,l){o=o|0,l=l|0;var u=0;if((yX(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function wGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function yX(o){return o=o|0,1073741823}function BGe(o,l){o=o|0,l=l|0;var u=0;if((EX(o)|0)>>>0>>0&&sn(o),l>>>0>1073741823)Nt();else{u=Jt(l<<2)|0,n[o+4>>2]=u,n[o>>2]=u,n[o+8>>2]=u+(l<<2);return}}function vGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,A=o+4|0,o=u-l|0,(o|0)>0&&(Qr(n[A>>2]|0,l|0,o|0)|0,n[A>>2]=(n[A>>2]|0)+(o>>>2<<2))}function EX(o){return o=o|0,1073741823}function SGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function DGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function bGe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function IX(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>1073741823)Nt();else{d=Jt(l<<2)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<2)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<2)}function CX(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function wX(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-4-l|0)>>>2)<<2)),o=n[o>>2]|0,o|0&&Et(o)}function PGe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Qe=I,I=I+32|0,M=Qe+20|0,G=Qe+12|0,_=Qe+16|0,ae=Qe+4|0,We=Qe,Le=Qe+8|0,k=uX()|0,m=n[k>>2]|0,B=n[m>>2]|0,B|0)for(T=n[k+8>>2]|0,k=n[k+4>>2]|0;xu(M,B),xGe(o,M,k,T),m=m+4|0,B=n[m>>2]|0,B;)T=T+1|0,k=k+1|0;if(m=fX()|0,B=n[m>>2]|0,B|0)do xu(M,B),n[G>>2]=n[m+4>>2],kGe(l,M,G),m=m+8|0,B=n[m>>2]|0;while(B|0);if(m=n[(Yy()|0)>>2]|0,m|0)do l=n[m+4>>2]|0,xu(M,n[(Vy(l)|0)>>2]|0),n[G>>2]=KM(l)|0,QGe(u,M,G),m=n[m>>2]|0;while(m|0);if(xu(_,0),m=JM()|0,n[M>>2]=n[_>>2],AX(M,m,d),m=n[(Yy()|0)>>2]|0,m|0){o=M+4|0,l=M+8|0,u=M+8|0;do{if(T=n[m+4>>2]|0,xu(G,n[(Vy(T)|0)>>2]|0),TGe(ae,BX(T)|0),B=n[ae>>2]|0,B|0){n[M>>2]=0,n[o>>2]=0,n[l>>2]=0;do xu(We,n[(Vy(n[B+4>>2]|0)|0)>>2]|0),k=n[o>>2]|0,k>>>0<(n[u>>2]|0)>>>0?(n[k>>2]=n[We>>2],n[o>>2]=(n[o>>2]|0)+4):ZM(M,We),B=n[B>>2]|0;while(B|0);RGe(A,G,M),sp(M)}n[Le>>2]=n[G>>2],_=vX(T)|0,n[M>>2]=n[Le>>2],AX(M,_,d),Yz(ae),m=n[m>>2]|0}while(m|0)}I=Qe}function xGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,WGe(o,l,u,A)}function kGe(o,l,u){o=o|0,l=l|0,u=u|0,GGe(o,l,u)}function Vy(o){return o=o|0,o|0}function QGe(o,l,u){o=o|0,l=l|0,u=u|0,UGe(o,l,u)}function BX(o){return o=o|0,o+16|0}function TGe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(m=I,I=I+16|0,d=m+8|0,u=m,n[o>>2]=0,A=n[l>>2]|0,n[d>>2]=A,n[u>>2]=o,u=_Ge(u)|0,A|0){if(A=Jt(12)|0,B=(SX(d)|0)+4|0,o=n[B+4>>2]|0,l=A+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=o,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)o=A;else for(l=A;o=Jt(12)|0,T=(SX(d)|0)+4|0,k=n[T+4>>2]|0,B=o+4|0,n[B>>2]=n[T>>2],n[B+4>>2]=k,n[l>>2]=o,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=o;n[o>>2]=n[u>>2],n[u>>2]=A}I=m}function RGe(o,l,u){o=o|0,l=l|0,u=u|0,FGe(o,l,u)}function vX(o){return o=o|0,o+24|0}function FGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+24|0,d=A+16|0,k=A+12|0,m=A,Nl(d),o=Ms(o)|0,n[k>>2]=n[l>>2],$M(m,u),n[B>>2]=n[k>>2],NGe(o,B,m),sp(m),Ol(d),I=A}function NGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=I,I=I+32|0,B=A+16|0,k=A+12|0,d=A,m=ma(OGe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=ud(B)|0,n[d>>2]=n[u>>2],B=u+4|0,n[d+4>>2]=n[B>>2],k=u+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[u>>2]=0,Fs(0,m|0,o|0,l|0,t_(d)|0)|0,sp(d),I=A}function OGe(){var o=0;return s[7976]|0||(LGe(10720),o=7976,n[o>>2]=1,n[o+4>>2]=0),10720}function LGe(o){o=o|0,Ro(o,MGe()|0,2)}function MGe(){return 1732}function _Ge(o){return o=o|0,n[o>>2]|0}function SX(o){return o=o|0,n[o>>2]|0}function UGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ms(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],DX(o,m,u),Ol(d),I=A}function DX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+16|0,m=A+4|0,B=A,d=ma(HGe()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=ud(m)|0,Fs(0,d|0,o|0,l|0,pX(u)|0)|0,I=A}function HGe(){var o=0;return s[7984]|0||(jGe(10732),o=7984,n[o>>2]=1,n[o+4>>2]=0),10732}function jGe(o){o=o|0,Ro(o,qGe()|0,2)}function qGe(){return 1744}function GGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;A=I,I=I+32|0,m=A+16|0,d=A+8|0,B=A,Nl(d),o=Ms(o)|0,n[B>>2]=n[l>>2],u=n[u>>2]|0,n[m>>2]=n[B>>2],DX(o,m,u),Ol(d),I=A}function WGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),o=Ms(o)|0,n[k>>2]=n[l>>2],u=s[u>>0]|0,A=s[A>>0]|0,n[B>>2]=n[k>>2],YGe(o,B,u,A),Ol(m),I=d}function YGe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,B=d+4|0,k=d,m=ma(VGe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=ud(B)|0,u=Ky(u)|0,Mi(0,m|0,o|0,l|0,u|0,Ky(A)|0)|0,I=d}function VGe(){var o=0;return s[7992]|0||(JGe(10744),o=7992,n[o>>2]=1,n[o+4>>2]=0),10744}function Ky(o){return o=o|0,KGe(o)|0}function KGe(o){return o=o|0,o&255|0}function JGe(o){o=o|0,Ro(o,zGe()|0,3)}function zGe(){return 1756}function ZGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;switch(ae=I,I=I+32|0,k=ae+8|0,T=ae+4|0,_=ae+20|0,M=ae,IM(o,0),A=KWe(l)|0,n[k>>2]=0,G=k+4|0,n[G>>2]=0,n[k+8>>2]=0,A<<24>>24){case 0:{s[_>>0]=0,XGe(T,u,_),WP(o,T)|0,bf(T);break}case 8:{G=a_(l)|0,s[_>>0]=8,xu(M,n[G+4>>2]|0),$Ge(T,u,_,M,G+8|0),WP(o,T)|0,bf(T);break}case 9:{if(m=a_(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,xu(T,n[d>>2]|0),A=n[G>>2]|0,A>>>0<(n[B>>2]|0)>>>0?(n[A>>2]=n[T>>2],n[G>>2]=(n[G>>2]|0)+4):ZM(k,T),l;)d=d+4|0;s[_>>0]=9,xu(M,n[m+8>>2]|0),e5e(T,u,_,M,k),WP(o,T)|0,bf(T);break}default:G=a_(l)|0,s[_>>0]=A,xu(M,n[G+4>>2]|0),t5e(T,u,_,M),WP(o,T)|0,bf(T)}sp(k),I=ae}function XGe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;A=I,I=I+16|0,d=A,Nl(d),l=Ms(l)|0,h5e(o,l,s[u>>0]|0),Ol(d),I=A}function WP(o,l){o=o|0,l=l|0;var u=0;return u=n[o>>2]|0,u|0&&Oa(u|0),n[o>>2]=n[l>>2],n[l>>2]=0,o|0}function $Ge(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+32|0,k=m+16|0,B=m+8|0,T=m,Nl(B),l=Ms(l)|0,u=s[u>>0]|0,n[T>>2]=n[A>>2],d=n[d>>2]|0,n[k>>2]=n[T>>2],u5e(o,l,u,k,d),Ol(B),I=m}function e5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+24|0,B=m+16|0,_=m+12|0,k=m,Nl(B),l=Ms(l)|0,u=s[u>>0]|0,n[_>>2]=n[A>>2],$M(k,d),n[T>>2]=n[_>>2],o5e(o,l,u,T,k),sp(k),Ol(B),I=m}function t5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+32|0,B=d+16|0,m=d+8|0,k=d,Nl(m),l=Ms(l)|0,u=s[u>>0]|0,n[k>>2]=n[A>>2],n[B>>2]=n[k>>2],r5e(o,l,u,B),Ol(m),I=d}function r5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0,B=0,k=0;d=I,I=I+16|0,m=d+4|0,k=d,B=ma(n5e()|0)|0,u=Ky(u)|0,n[k>>2]=n[A>>2],n[m>>2]=n[k>>2],YP(o,Fs(0,B|0,l|0,u|0,ud(m)|0)|0),I=d}function n5e(){var o=0;return s[8e3]|0||(i5e(10756),o=8e3,n[o>>2]=1,n[o+4>>2]=0),10756}function YP(o,l){o=o|0,l=l|0,IM(o,l)}function i5e(o){o=o|0,Ro(o,s5e()|0,2)}function s5e(){return 1772}function o5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0;m=I,I=I+32|0,T=m+16|0,_=m+12|0,B=m,k=ma(a5e()|0)|0,u=Ky(u)|0,n[_>>2]=n[A>>2],n[T>>2]=n[_>>2],A=ud(T)|0,n[B>>2]=n[d>>2],T=d+4|0,n[B+4>>2]=n[T>>2],_=d+8|0,n[B+8>>2]=n[_>>2],n[_>>2]=0,n[T>>2]=0,n[d>>2]=0,YP(o,Mi(0,k|0,l|0,u|0,A|0,t_(B)|0)|0),sp(B),I=m}function a5e(){var o=0;return s[8008]|0||(l5e(10768),o=8008,n[o>>2]=1,n[o+4>>2]=0),10768}function l5e(o){o=o|0,Ro(o,c5e()|0,3)}function c5e(){return 1784}function u5e(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0;m=I,I=I+16|0,k=m+4|0,T=m,B=ma(f5e()|0)|0,u=Ky(u)|0,n[T>>2]=n[A>>2],n[k>>2]=n[T>>2],A=ud(k)|0,YP(o,Mi(0,B|0,l|0,u|0,A|0,e_(d)|0)|0),I=m}function f5e(){var o=0;return s[8016]|0||(A5e(10780),o=8016,n[o>>2]=1,n[o+4>>2]=0),10780}function A5e(o){o=o|0,Ro(o,p5e()|0,3)}function p5e(){return 1800}function h5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;A=ma(g5e()|0)|0,YP(o,dn(0,A|0,l|0,Ky(u)|0)|0)}function g5e(){var o=0;return s[8024]|0||(d5e(10792),o=8024,n[o>>2]=1,n[o+4>>2]=0),10792}function d5e(o){o=o|0,Ro(o,m5e()|0,1)}function m5e(){return 1816}function y5e(){E5e(),I5e(),C5e()}function E5e(){n[2702]=e$(65536)|0}function I5e(){H5e(10856)}function C5e(){w5e(10816)}function w5e(o){o=o|0,B5e(o,5044),v5e(o)|0}function B5e(o,l){o=o|0,l=l|0;var u=0;u=dX()|0,n[o>>2]=u,N5e(u,l),Gh(n[o>>2]|0)}function v5e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,S5e()|0),o|0}function S5e(){var o=0;return s[8032]|0||(bX(10820),gr(64,10820,U|0)|0,o=8032,n[o>>2]=1,n[o+4>>2]=0),Ur(10820)|0||bX(10820),10820}function bX(o){o=o|0,P5e(o),cd(o,25)}function D5e(o){o=o|0,b5e(o+24|0)}function b5e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function P5e(o){o=o|0;var l=0;l=en()|0,tn(o,5,18,l,T5e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function x5e(o,l){o=o|0,l=l|0,k5e(o,l)}function k5e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;u=I,I=I+16|0,A=u,d=u+4|0,od(d,l),n[A>>2]=ad(d,l)|0,Q5e(o,A),I=u}function Q5e(o,l){o=o|0,l=l|0,PX(o+4|0,n[l>>2]|0),s[o+8>>0]=1}function PX(o,l){o=o|0,l=l|0,n[o>>2]=l}function T5e(){return 1824}function R5e(o){return o=o|0,F5e(o)|0}function F5e(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0;return u=I,I=I+16|0,d=u+4|0,B=u,A=Fl(8)|0,l=A,k=Jt(4)|0,od(d,o),PX(k,ad(d,o)|0),m=l+4|0,n[m>>2]=k,o=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],mX(o,m,d),n[A>>2]=o,I=u,l|0}function Fl(o){o=o|0;var l=0,u=0;return o=o+7&-8,o>>>0<=32768&&(l=n[2701]|0,o>>>0<=(65536-l|0)>>>0)?(u=(n[2702]|0)+l|0,n[2701]=l+o,o=u):(o=e$(o+8|0)|0,n[o>>2]=n[2703],n[2703]=o,o=o+8|0),o|0}function N5e(o,l){o=o|0,l=l|0,n[o>>2]=O5e()|0,n[o+4>>2]=L5e()|0,n[o+12>>2]=l,n[o+8>>2]=M5e()|0,n[o+32>>2]=9}function O5e(){return 11744}function L5e(){return 1832}function M5e(){return qP()|0}function _5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(U5e(u),Et(u)):l|0&&Et(l)}function U5e(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function H5e(o){o=o|0,j5e(o,5052),q5e(o)|0,G5e(o,5058,26)|0,W5e(o,5069,1)|0,Y5e(o,5077,10)|0,V5e(o,5087,19)|0,K5e(o,5094,27)|0}function j5e(o,l){o=o|0,l=l|0;var u=0;u=UWe()|0,n[o>>2]=u,HWe(u,l),Gh(n[o>>2]|0)}function q5e(o){o=o|0;var l=0;return l=n[o>>2]|0,ld(l,DWe()|0),o|0}function G5e(o,l,u){return o=o|0,l=l|0,u=u|0,lWe(o,Bn(l)|0,u,0),o|0}function W5e(o,l,u){return o=o|0,l=l|0,u=u|0,V9e(o,Bn(l)|0,u,0),o|0}function Y5e(o,l,u){return o=o|0,l=l|0,u=u|0,S9e(o,Bn(l)|0,u,0),o|0}function V5e(o,l,u){return o=o|0,l=l|0,u=u|0,u9e(o,Bn(l)|0,u,0),o|0}function xX(o,l){o=o|0,l=l|0;var u=0,A=0;e:for(;;){for(u=n[2703]|0;;){if((u|0)==(l|0))break e;if(A=n[u>>2]|0,n[2703]=A,!u)u=A;else break}Et(u)}n[2701]=o}function K5e(o,l,u){return o=o|0,l=l|0,u=u|0,J5e(o,Bn(l)|0,u,0),o|0}function J5e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=r_()|0,o=z5e(u)|0,vn(m,l,d,o,Z5e(u,A)|0,A)}function r_(){var o=0,l=0;if(s[8040]|0||(QX(10860),gr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10860)|0)){o=10860,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));QX(10860)}return 10860}function z5e(o){return o=o|0,o|0}function Z5e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=r_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(kX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(X5e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function kX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function X5e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=$5e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,e9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,kX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,t9e(o,d),r9e(d),I=k;return}}function $5e(o){return o=o|0,536870911}function e9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function t9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function r9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function QX(o){o=o|0,s9e(o)}function n9e(o){o=o|0,i9e(o+24|0)}function i9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function s9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,o9e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function o9e(){return 1840}function a9e(o,l,u){o=o|0,l=l|0,u=u|0,c9e(n[(l9e(o)|0)>>2]|0,l,u)}function l9e(o){return o=o|0,(n[(r_()|0)+24>>2]|0)+(o<<3)|0}function c9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+1|0,d=A,od(m,l),l=ad(m,l)|0,od(d,u),u=ad(d,u)|0,ap[o&31](l,u),I=A}function u9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=n_()|0,o=f9e(u)|0,vn(m,l,d,o,A9e(u,A)|0,A)}function n_(){var o=0,l=0;if(s[8048]|0||(RX(10896),gr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10896)|0)){o=10896,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));RX(10896)}return 10896}function f9e(o){return o=o|0,o|0}function A9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=n_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(TX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(p9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function TX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function p9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=h9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,g9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,TX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,d9e(o,d),m9e(d),I=k;return}}function h9e(o){return o=o|0,536870911}function g9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function d9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function m9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function RX(o){o=o|0,I9e(o)}function y9e(o){o=o|0,E9e(o+24|0)}function E9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function I9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,11,l,C9e()|0,1),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function C9e(){return 1852}function w9e(o,l){return o=o|0,l=l|0,v9e(n[(B9e(o)|0)>>2]|0,l)|0}function B9e(o){return o=o|0,(n[(n_()|0)+24>>2]|0)+(o<<3)|0}function v9e(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,od(A,l),l=ad(A,l)|0,l=HP(hd[o&31](l)|0)|0,I=u,l|0}function S9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=i_()|0,o=D9e(u)|0,vn(m,l,d,o,b9e(u,A)|0,A)}function i_(){var o=0,l=0;if(s[8056]|0||(NX(10932),gr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10932)|0)){o=10932,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));NX(10932)}return 10932}function D9e(o){return o=o|0,o|0}function b9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=i_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(FX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(P9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function FX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function P9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=x9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,k9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,FX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,Q9e(o,d),T9e(d),I=k;return}}function x9e(o){return o=o|0,536870911}function k9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function Q9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function T9e(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function NX(o){o=o|0,N9e(o)}function R9e(o){o=o|0,F9e(o+24|0)}function F9e(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function N9e(o){o=o|0;var l=0;l=en()|0,tn(o,1,7,l,O9e()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function O9e(){return 1860}function L9e(o,l,u){return o=o|0,l=l|0,u=u|0,_9e(n[(M9e(o)|0)>>2]|0,l,u)|0}function M9e(o){return o=o|0,(n[(i_()|0)+24>>2]|0)+(o<<3)|0}function _9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0;return A=I,I=I+32|0,B=A+12|0,m=A+8|0,k=A,T=A+16|0,d=A+4|0,U9e(T,l),H9e(k,T,l),Uh(d,u),u=Hh(d,u)|0,n[B>>2]=n[k>>2],F2[o&15](m,B,u),u=j9e(m)|0,bf(m),jh(d),I=A,u|0}function U9e(o,l){o=o|0,l=l|0}function H9e(o,l,u){o=o|0,l=l|0,u=u|0,q9e(o,u)}function j9e(o){return o=o|0,Ms(o)|0}function q9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0;d=I,I=I+16|0,u=d,A=l,A&1?(G9e(u,0),Me(A|0,u|0)|0,W9e(o,u),Y9e(u)):n[o>>2]=n[l>>2],I=d}function G9e(o,l){o=o|0,l=l|0,bu(o,l),n[o+4>>2]=0,s[o+8>>0]=0}function W9e(o,l){o=o|0,l=l|0,n[o>>2]=n[l+4>>2]}function Y9e(o){o=o|0,s[o+8>>0]=0}function V9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=s_()|0,o=K9e(u)|0,vn(m,l,d,o,J9e(u,A)|0,A)}function s_(){var o=0,l=0;if(s[8064]|0||(LX(10968),gr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(Ur(10968)|0)){o=10968,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));LX(10968)}return 10968}function K9e(o){return o=o|0,o|0}function J9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=s_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(OX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(z9e(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function OX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function z9e(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=Z9e(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,X9e(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,OX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,$9e(o,d),eWe(d),I=k;return}}function Z9e(o){return o=o|0,536870911}function X9e(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function $9e(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function eWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function LX(o){o=o|0,nWe(o)}function tWe(o){o=o|0,rWe(o+24|0)}function rWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function nWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,1,l,iWe()|0,5),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function iWe(){return 1872}function sWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,aWe(n[(oWe(o)|0)>>2]|0,l,u,A,d,m)}function oWe(o){return o=o|0,(n[(s_()|0)+24>>2]|0)+(o<<3)|0}function aWe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0;B=I,I=I+32|0,k=B+16|0,T=B+12|0,_=B+8|0,M=B+4|0,G=B,Uh(k,l),l=Hh(k,l)|0,Uh(T,u),u=Hh(T,u)|0,Uh(_,A),A=Hh(_,A)|0,Uh(M,d),d=Hh(M,d)|0,Uh(G,m),m=Hh(G,m)|0,s$[o&1](l,u,A,d,m),jh(G),jh(M),jh(_),jh(T),jh(k),I=B}function lWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;m=n[o>>2]|0,d=o_()|0,o=cWe(u)|0,vn(m,l,d,o,uWe(u,A)|0,A)}function o_(){var o=0,l=0;if(s[8072]|0||(_X(11004),gr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(Ur(11004)|0)){o=11004,l=o+36|0;do n[o>>2]=0,o=o+4|0;while((o|0)<(l|0));_X(11004)}return 11004}function cWe(o){return o=o|0,o|0}function uWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0,k=0,T=0;return k=I,I=I+16|0,d=k,m=k+4|0,n[d>>2]=o,T=o_()|0,B=T+24|0,l=yr(l,4)|0,n[m>>2]=l,u=T+28|0,A=n[u>>2]|0,A>>>0<(n[T+32>>2]|0)>>>0?(MX(A,o,l),l=(n[u>>2]|0)+8|0,n[u>>2]=l):(fWe(B,d,m),l=n[u>>2]|0),I=k,(l-(n[B>>2]|0)>>3)+-1|0}function MX(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,n[o+4>>2]=u}function fWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0;if(k=I,I=I+32|0,d=k,m=o+4|0,B=((n[m>>2]|0)-(n[o>>2]|0)>>3)+1|0,A=AWe(o)|0,A>>>0>>0)sn(o);else{T=n[o>>2]|0,M=(n[o+8>>2]|0)-T|0,_=M>>2,pWe(d,M>>3>>>0>>1>>>0?_>>>0>>0?B:_:A,(n[m>>2]|0)-T>>3,o+8|0),B=d+8|0,MX(n[B>>2]|0,n[l>>2]|0,n[u>>2]|0),n[B>>2]=(n[B>>2]|0)+8,hWe(o,d),gWe(d),I=k;return}}function AWe(o){return o=o|0,536870911}function pWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0;n[o+12>>2]=0,n[o+16>>2]=A;do if(l)if(l>>>0>536870911)Nt();else{d=Jt(l<<3)|0;break}else d=0;while(!1);n[o>>2]=d,A=d+(u<<3)|0,n[o+8>>2]=A,n[o+4>>2]=A,n[o+12>>2]=d+(l<<3)}function hWe(o,l){o=o|0,l=l|0;var u=0,A=0,d=0,m=0,B=0;A=n[o>>2]|0,B=o+4|0,m=l+4|0,d=(n[B>>2]|0)-A|0,u=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=u,(d|0)>0?(Qr(u|0,A|0,d|0)|0,A=m,u=n[m>>2]|0):A=m,m=n[o>>2]|0,n[o>>2]=u,n[A>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=o+8|0,B=l+12|0,o=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=o,n[l>>2]=n[A>>2]}function gWe(o){o=o|0;var l=0,u=0,A=0;l=n[o+4>>2]|0,u=o+8|0,A=n[u>>2]|0,(A|0)!=(l|0)&&(n[u>>2]=A+(~((A+-8-l|0)>>>3)<<3)),o=n[o>>2]|0,o|0&&Et(o)}function _X(o){o=o|0,yWe(o)}function dWe(o){o=o|0,mWe(o+24|0)}function mWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function yWe(o){o=o|0;var l=0;l=en()|0,tn(o,1,12,l,EWe()|0,2),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function EWe(){return 1896}function IWe(o,l,u){o=o|0,l=l|0,u=u|0,wWe(n[(CWe(o)|0)>>2]|0,l,u)}function CWe(o){return o=o|0,(n[(o_()|0)+24>>2]|0)+(o<<3)|0}function wWe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;A=I,I=I+16|0,m=A+4|0,d=A,BWe(m,l),l=vWe(m,l)|0,Uh(d,u),u=Hh(d,u)|0,ap[o&31](l,u),jh(d),I=A}function BWe(o,l){o=o|0,l=l|0}function vWe(o,l){return o=o|0,l=l|0,SWe(l)|0}function SWe(o){return o=o|0,o|0}function DWe(){var o=0;return s[8080]|0||(UX(11040),gr(70,11040,U|0)|0,o=8080,n[o>>2]=1,n[o+4>>2]=0),Ur(11040)|0||UX(11040),11040}function UX(o){o=o|0,xWe(o),cd(o,71)}function bWe(o){o=o|0,PWe(o+24|0)}function PWe(o){o=o|0;var l=0,u=0,A=0;u=n[o>>2]|0,A=u,u|0&&(o=o+4|0,l=n[o>>2]|0,(l|0)!=(u|0)&&(n[o>>2]=l+(~((l+-8-A|0)>>>3)<<3)),Et(u))}function xWe(o){o=o|0;var l=0;l=en()|0,tn(o,5,7,l,RWe()|0,0),n[o+24>>2]=0,n[o+28>>2]=0,n[o+32>>2]=0}function kWe(o){o=o|0,QWe(o)}function QWe(o){o=o|0,TWe(o)}function TWe(o){o=o|0,s[o+8>>0]=1}function RWe(){return 1936}function FWe(){return NWe()|0}function NWe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0;return l=I,I=I+16|0,d=l+4|0,B=l,u=Fl(8)|0,o=u,m=o+4|0,n[m>>2]=Jt(1)|0,A=Jt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],OWe(A,m,d),n[u>>2]=A,I=l,o|0}function OWe(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]=l,u=Jt(16)|0,n[u+4>>2]=0,n[u+8>>2]=0,n[u>>2]=1916,n[u+12>>2]=l,n[o+4>>2]=u}function LWe(o){o=o|0,Zy(o),Et(o)}function MWe(o){o=o|0,o=n[o+12>>2]|0,o|0&&Et(o)}function _We(o){o=o|0,Et(o)}function UWe(){var o=0;return s[8088]|0||(VWe(11076),gr(25,11076,U|0)|0,o=8088,n[o>>2]=1,n[o+4>>2]=0),11076}function HWe(o,l){o=o|0,l=l|0,n[o>>2]=jWe()|0,n[o+4>>2]=qWe()|0,n[o+12>>2]=l,n[o+8>>2]=GWe()|0,n[o+32>>2]=10}function jWe(){return 11745}function qWe(){return 1940}function GWe(){return jP()|0}function WWe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,(qh(A,896)|0)==512?u|0&&(YWe(u),Et(u)):l|0&&Et(l)}function YWe(o){o=o|0,o=n[o+4>>2]|0,o|0&&Wh(o)}function VWe(o){o=o|0,_h(o)}function xu(o,l){o=o|0,l=l|0,n[o>>2]=l}function a_(o){return o=o|0,n[o>>2]|0}function KWe(o){return o=o|0,s[n[o>>2]>>0]|0}function JWe(o,l){o=o|0,l=l|0;var u=0,A=0;u=I,I=I+16|0,A=u,n[A>>2]=n[o>>2],zWe(l,A)|0,I=u}function zWe(o,l){o=o|0,l=l|0;var u=0;return u=ZWe(n[o>>2]|0,l)|0,l=o+4|0,n[(n[l>>2]|0)+8>>2]=u,n[(n[l>>2]|0)+8>>2]|0}function ZWe(o,l){o=o|0,l=l|0;var u=0,A=0;return u=I,I=I+16|0,A=u,Nl(A),o=Ms(o)|0,l=XWe(o,n[l>>2]|0)|0,Ol(A),I=u,l|0}function Nl(o){o=o|0,n[o>>2]=n[2701],n[o+4>>2]=n[2703]}function XWe(o,l){o=o|0,l=l|0;var u=0;return u=ma($We()|0)|0,dn(0,u|0,o|0,e_(l)|0)|0}function Ol(o){o=o|0,xX(n[o>>2]|0,n[o+4>>2]|0)}function $We(){var o=0;return s[8096]|0||(eYe(11120),o=8096,n[o>>2]=1,n[o+4>>2]=0),11120}function eYe(o){o=o|0,Ro(o,tYe()|0,1)}function tYe(){return 1948}function rYe(){nYe()}function nYe(){var o=0,l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;if(Le=I,I=I+16|0,M=Le+4|0,G=Le,aa(65536,10804,n[2702]|0,10812),u=uX()|0,l=n[u>>2]|0,o=n[l>>2]|0,o|0)for(A=n[u+8>>2]|0,u=n[u+4>>2]|0;hf(o|0,c[u>>0]|0|0,s[A>>0]|0),l=l+4|0,o=n[l>>2]|0,o;)A=A+1|0,u=u+1|0;if(o=fX()|0,l=n[o>>2]|0,l|0)do LA(l|0,n[o+4>>2]|0),o=o+8|0,l=n[o>>2]|0;while(l|0);LA(iYe()|0,5167),_=Yy()|0,o=n[_>>2]|0;e:do if(o|0){do sYe(n[o+4>>2]|0),o=n[o>>2]|0;while(o|0);if(o=n[_>>2]|0,o|0){T=_;do{for(;d=o,o=n[o>>2]|0,d=n[d+4>>2]|0,!!(oYe(d)|0);)if(n[G>>2]=T,n[M>>2]=n[G>>2],aYe(_,M)|0,!o)break e;if(lYe(d),T=n[T>>2]|0,l=HX(d)|0,m=Li()|0,B=I,I=I+((1*(l<<2)|0)+15&-16)|0,k=I,I=I+((1*(l<<2)|0)+15&-16)|0,l=n[(BX(d)|0)>>2]|0,l|0)for(u=B,A=k;n[u>>2]=n[(Vy(n[l+4>>2]|0)|0)>>2],n[A>>2]=n[l+8>>2],l=n[l>>2]|0,l;)u=u+4|0,A=A+4|0;Qe=Vy(d)|0,l=cYe(d)|0,u=HX(d)|0,A=uYe(d)|0,ac(Qe|0,l|0,B|0,k|0,u|0,A|0,KM(d)|0),OA(m|0)}while(o|0)}}while(!1);if(o=n[(JM()|0)>>2]|0,o|0)do Qe=o+4|0,_=zM(Qe)|0,d=k2(_)|0,m=P2(_)|0,B=(x2(_)|0)+1|0,k=VP(_)|0,T=jX(Qe)|0,_=Ur(_)|0,M=GP(Qe)|0,G=l_(Qe)|0,Au(0,d|0,m|0,B|0,k|0,T|0,_|0,M|0,G|0,c_(Qe)|0),o=n[o>>2]|0;while(o|0);o=n[(Yy()|0)>>2]|0;e:do if(o|0){t:for(;;){if(l=n[o+4>>2]|0,l|0&&(ae=n[(Vy(l)|0)>>2]|0,We=n[(vX(l)|0)>>2]|0,We|0)){u=We;do{l=u+4|0,A=zM(l)|0;r:do if(A|0)switch(Ur(A)|0){case 0:break t;case 4:case 3:case 2:{k=k2(A)|0,T=P2(A)|0,_=(x2(A)|0)+1|0,M=VP(A)|0,G=Ur(A)|0,Qe=GP(l)|0,Au(ae|0,k|0,T|0,_|0,M|0,0,G|0,Qe|0,l_(l)|0,c_(l)|0);break r}case 1:{B=k2(A)|0,k=P2(A)|0,T=(x2(A)|0)+1|0,_=VP(A)|0,M=jX(l)|0,G=Ur(A)|0,Qe=GP(l)|0,Au(ae|0,B|0,k|0,T|0,_|0,M|0,G|0,Qe|0,l_(l)|0,c_(l)|0);break r}case 5:{_=k2(A)|0,M=P2(A)|0,G=(x2(A)|0)+1|0,Qe=VP(A)|0,Au(ae|0,_|0,M|0,G|0,Qe|0,fYe(A)|0,Ur(A)|0,0,0,0);break r}default:break r}while(!1);u=n[u>>2]|0}while(u|0)}if(o=n[o>>2]|0,!o)break e}Nt()}while(!1);ve(),I=Le}function iYe(){return 11703}function sYe(o){o=o|0,s[o+40>>0]=0}function oYe(o){return o=o|0,(s[o+40>>0]|0)!=0|0}function aYe(o,l){return o=o|0,l=l|0,l=AYe(l)|0,o=n[l>>2]|0,n[l>>2]=n[o>>2],Et(o),n[l>>2]|0}function lYe(o){o=o|0,s[o+40>>0]=1}function HX(o){return o=o|0,n[o+20>>2]|0}function cYe(o){return o=o|0,n[o+8>>2]|0}function uYe(o){return o=o|0,n[o+32>>2]|0}function VP(o){return o=o|0,n[o+4>>2]|0}function jX(o){return o=o|0,n[o+4>>2]|0}function l_(o){return o=o|0,n[o+8>>2]|0}function c_(o){return o=o|0,n[o+16>>2]|0}function fYe(o){return o=o|0,n[o+20>>2]|0}function AYe(o){return o=o|0,n[o>>2]|0}function KP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0;Lt=I,I=I+16|0,ae=Lt;do if(o>>>0<245){if(_=o>>>0<11?16:o+11&-8,o=_>>>3,G=n[2783]|0,u=G>>>o,u&3|0)return l=(u&1^1)+o|0,o=11172+(l<<1<<2)|0,u=o+8|0,A=n[u>>2]|0,d=A+8|0,m=n[d>>2]|0,(o|0)==(m|0)?n[2783]=G&~(1<>2]=o,n[u>>2]=m),Ge=l<<3,n[A+4>>2]=Ge|3,Ge=A+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1,Ge=d,I=Lt,Ge|0;if(M=n[2785]|0,_>>>0>M>>>0){if(u|0)return l=2<>>12&16,l=l>>>B,u=l>>>5&8,l=l>>>u,d=l>>>2&4,l=l>>>d,o=l>>>1&2,l=l>>>o,A=l>>>1&1,A=(u|B|d|o|A)+(l>>>A)|0,l=11172+(A<<1<<2)|0,o=l+8|0,d=n[o>>2]|0,B=d+8|0,u=n[B>>2]|0,(l|0)==(u|0)?(o=G&~(1<>2]=l,n[o>>2]=u,o=G),m=(A<<3)-_|0,n[d+4>>2]=_|3,A=d+_|0,n[A+4>>2]=m|1,n[A+m>>2]=m,M|0&&(d=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=u),n[2785]=m,n[2788]=A,Ge=B,I=Lt,Ge|0;if(k=n[2784]|0,k){if(u=(k&0-k)+-1|0,B=u>>>12&16,u=u>>>B,m=u>>>5&8,u=u>>>m,T=u>>>2&4,u=u>>>T,A=u>>>1&2,u=u>>>A,o=u>>>1&1,o=n[11436+((m|B|T|A|o)+(u>>>o)<<2)>>2]|0,u=(n[o+4>>2]&-8)-_|0,A=n[o+16+(((n[o+16>>2]|0)==0&1)<<2)>>2]|0,!A)T=o,m=u;else{do B=(n[A+4>>2]&-8)-_|0,T=B>>>0>>0,u=T?B:u,o=T?A:o,A=n[A+16+(((n[A+16>>2]|0)==0&1)<<2)>>2]|0;while(A|0);T=o,m=u}if(B=T+_|0,T>>>0>>0){d=n[T+24>>2]|0,l=n[T+12>>2]|0;do if((l|0)==(T|0)){if(o=T+20|0,l=n[o>>2]|0,!l&&(o=T+16|0,l=n[o>>2]|0,!l)){u=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0,u=l}else u=n[T+8>>2]|0,n[u+12>>2]=l,n[l+8>>2]=u,u=l;while(!1);do if(d|0){if(l=n[T+28>>2]|0,o=11436+(l<<2)|0,(T|0)==(n[o>>2]|0)){if(n[o>>2]=u,!u){n[2784]=k&~(1<>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=d,l=n[T+16>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),l=n[T+20>>2]|0,l|0&&(n[u+20>>2]=l,n[l+24>>2]=u)}while(!1);return m>>>0<16?(Ge=m+_|0,n[T+4>>2]=Ge|3,Ge=T+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1):(n[T+4>>2]=_|3,n[B+4>>2]=m|1,n[B+m>>2]=m,M|0&&(A=n[2788]|0,l=M>>>3,u=11172+(l<<1<<2)|0,l=1<>2]|0):(n[2783]=G|l,l=u,o=u+8|0),n[o>>2]=A,n[l+12>>2]=A,n[A+8>>2]=l,n[A+12>>2]=u),n[2785]=m,n[2788]=B),Ge=T+8|0,I=Lt,Ge|0}else G=_}else G=_}else G=_}else if(o>>>0<=4294967231)if(o=o+11|0,_=o&-8,T=n[2784]|0,T){A=0-_|0,o=o>>>8,o?_>>>0>16777215?k=31:(G=(o+1048320|0)>>>16&8,He=o<>>16&4,He=He<>>16&2,k=14-(M|G|k)+(He<>>15)|0,k=_>>>(k+7|0)&1|k<<1):k=0,u=n[11436+(k<<2)>>2]|0;e:do if(!u)u=0,o=0,He=57;else for(o=0,B=_<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[u+4>>2]&-8)-_|0,d>>>0>>0)if(d)o=u,A=d;else{o=u,A=0,d=u,He=61;break e}if(d=n[u+20>>2]|0,u=n[u+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(u|0)?m:d,d=(u|0)==0,d){u=m,He=57;break}else B=B<<((d^1)&1)}while(!1);if((He|0)==57){if((u|0)==0&(o|0)==0){if(o=2<>>12&16,G=G>>>B,m=G>>>5&8,G=G>>>m,k=G>>>2&4,G=G>>>k,M=G>>>1&2,G=G>>>M,u=G>>>1&1,o=0,u=n[11436+((m|B|k|M|u)+(G>>>u)<<2)>>2]|0}u?(d=u,He=61):(k=o,B=A)}if((He|0)==61)for(;;)if(He=0,u=(n[d+4>>2]&-8)-_|0,G=u>>>0>>0,u=G?u:A,o=G?d:o,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)A=u,He=61;else{k=o,B=u;break}if(k|0&&B>>>0<((n[2785]|0)-_|0)>>>0){if(m=k+_|0,k>>>0>=m>>>0)return Ge=0,I=Lt,Ge|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(o=k+20|0,l=n[o>>2]|0,!l&&(o=k+16|0,l=n[o>>2]|0,!l)){l=0;break}for(;;){if(u=l+20|0,A=n[u>>2]|0,A|0){l=A,o=u;continue}if(u=l+16|0,A=n[u>>2]|0,A)l=A,o=u;else break}n[o>>2]=0}else Ge=n[k+8>>2]|0,n[Ge+12>>2]=l,n[l+8>>2]=Ge;while(!1);do if(d){if(o=n[k+28>>2]|0,u=11436+(o<<2)|0,(k|0)==(n[u>>2]|0)){if(n[u>>2]=l,!l){A=T&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){A=T;break}n[l+24>>2]=d,o=n[k+16>>2]|0,o|0&&(n[l+16>>2]=o,n[o+24>>2]=l),o=n[k+20>>2]|0,o&&(n[l+20>>2]=o,n[o+24>>2]=l),A=T}else A=T;while(!1);do if(B>>>0>=16){if(n[k+4>>2]=_|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=u;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(ct|He|l)+(Ge<>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,u=11436+(l<<2)|0,n[m+28>>2]=l,o=m+16|0,n[o+4>>2]=0,n[o>>2]=0,o=1<>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}for(o=B<<((l|0)==31?0:25-(l>>>1)|0),u=n[u>>2]|0;;){if((n[u+4>>2]&-8|0)==(B|0)){He=97;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=96;break}}if((He|0)==96){n[A>>2]=m,n[m+24>>2]=u,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((He|0)==97){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=m,n[He>>2]=m,n[m+8>>2]=Ge,n[m+12>>2]=u,n[m+24>>2]=0;break}}else Ge=B+_|0,n[k+4>>2]=Ge|3,Ge=k+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1;while(!1);return Ge=k+8|0,I=Lt,Ge|0}else G=_}else G=_;else G=-1;while(!1);if(u=n[2785]|0,u>>>0>=G>>>0)return l=u-G|0,o=n[2788]|0,l>>>0>15?(Ge=o+G|0,n[2788]=Ge,n[2785]=l,n[Ge+4>>2]=l|1,n[Ge+l>>2]=l,n[o+4>>2]=G|3):(n[2785]=0,n[2788]=0,n[o+4>>2]=u|3,Ge=o+u+4|0,n[Ge>>2]=n[Ge>>2]|1),Ge=o+8|0,I=Lt,Ge|0;if(B=n[2786]|0,B>>>0>G>>>0)return ct=B-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0;if(n[2901]|0?o=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,o=ae&-16^1431655768,n[ae>>2]=o,n[2901]=o,o=4096),k=G+48|0,T=G+47|0,m=o+T|0,d=0-o|0,_=m&d,_>>>0<=G>>>0||(o=n[2893]|0,o|0&&(M=n[2891]|0,ae=M+_|0,ae>>>0<=M>>>0|ae>>>0>o>>>0)))return Ge=0,I=Lt,Ge|0;e:do if(n[2894]&4)l=0,He=133;else{u=n[2789]|0;t:do if(u){for(A=11580;o=n[A>>2]|0,!(o>>>0<=u>>>0&&(Qe=A+4|0,(o+(n[Qe>>2]|0)|0)>>>0>u>>>0));)if(o=n[A+8>>2]|0,o)A=o;else{He=118;break t}if(l=m-B&d,l>>>0<2147483647)if(o=Yh(l|0)|0,(o|0)==((n[A>>2]|0)+(n[Qe>>2]|0)|0)){if((o|0)!=-1){B=l,m=o,He=135;break e}}else A=o,He=126;else l=0}else He=118;while(!1);do if((He|0)==118)if(u=Yh(0)|0,(u|0)!=-1&&(l=u,We=n[2902]|0,Le=We+-1|0,l=(Le&l|0?(Le+l&0-We)-l|0:0)+_|0,We=n[2891]|0,Le=l+We|0,l>>>0>G>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Le>>>0<=We>>>0|Le>>>0>Qe>>>0){l=0;break}if(o=Yh(l|0)|0,(o|0)==(u|0)){B=l,m=u,He=135;break e}else A=o,He=126}else l=0;while(!1);do if((He|0)==126){if(u=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(A|0)!=-1)))if((A|0)==-1){l=0;break}else{B=l,m=A,He=135;break e}if(o=n[2903]|0,o=T-l+o&0-o,o>>>0>=2147483647){B=l,m=A,He=135;break e}if((Yh(o|0)|0)==-1){Yh(u|0)|0,l=0;break}else{B=o+l|0,m=A,He=135;break e}}while(!1);n[2894]=n[2894]|4,He=133}while(!1);if((He|0)==133&&_>>>0<2147483647&&(ct=Yh(_|0)|0,Qe=Yh(0)|0,tt=Qe-ct|0,Ze=tt>>>0>(G+40|0)>>>0,!((ct|0)==-1|Ze^1|ct>>>0>>0&((ct|0)!=-1&(Qe|0)!=-1)^1))&&(B=Ze?tt:l,m=ct,He=135),(He|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),T=n[2789]|0;do if(T){for(l=11580;;){if(o=n[l>>2]|0,u=l+4|0,A=n[u>>2]|0,(m|0)==(o+A|0)){He=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((He|0)==145&&!(n[l+12>>2]&8|0)&&T>>>0>>0&T>>>0>=o>>>0){n[u>>2]=A+B,Ge=T+8|0,Ge=Ge&7|0?0-Ge&7:0,He=T+Ge|0,Ge=(n[2786]|0)+(B-Ge)|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),u=m+B|0,l=11580;;){if((n[l>>2]|0)==(u|0)){He=153;break}if(o=n[l+8>>2]|0,o)l=o;else break}if((He|0)==153&&!(n[l+12>>2]&8|0)){n[l>>2]=m,M=l+4|0,n[M>>2]=(n[M>>2]|0)+B,M=m+8|0,M=m+(M&7|0?0-M&7:0)|0,l=u+8|0,l=u+(l&7|0?0-l&7:0)|0,_=M+G|0,k=l-M-G|0,n[M+4>>2]=G|3;do if((l|0)!=(T|0)){if((l|0)==(n[2788]|0)){Ge=(n[2785]|0)+k|0,n[2785]=Ge,n[2788]=_,n[_+4>>2]=Ge|1,n[_+Ge>>2]=Ge;break}if(o=n[l+4>>2]|0,(o&3|0)==1){B=o&-8,A=o>>>3;e:do if(o>>>0<256)if(o=n[l+8>>2]|0,u=n[l+12>>2]|0,(u|0)==(o|0)){n[2783]=n[2783]&~(1<>2]=u,n[u+8>>2]=o;break}else{m=n[l+24>>2]|0,o=n[l+12>>2]|0;do if((o|0)==(l|0)){if(A=l+16|0,u=A+4|0,o=n[u>>2]|0,!o)if(o=n[A>>2]|0,o)u=A;else{o=0;break}for(;;){if(A=o+20|0,d=n[A>>2]|0,d|0){o=d,u=A;continue}if(A=o+16|0,d=n[A>>2]|0,d)o=d,u=A;else break}n[u>>2]=0}else Ge=n[l+8>>2]|0,n[Ge+12>>2]=o,n[o+8>>2]=Ge;while(!1);if(!m)break;u=n[l+28>>2]|0,A=11436+(u<<2)|0;do if((l|0)!=(n[A>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=o,!o)break e}else{if(n[A>>2]=o,o|0)break;n[2784]=n[2784]&~(1<>2]=m,u=l+16|0,A=n[u>>2]|0,A|0&&(n[o+16>>2]=A,n[A+24>>2]=o),u=n[u+4>>2]|0,!u)break;n[o+20>>2]=u,n[u+24>>2]=o}while(!1);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[_+4>>2]=d|1,n[_+d>>2]=d,l=d>>>3,d>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=_,n[l+12>>2]=_,n[_+8>>2]=l,n[_+12>>2]=u;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(ct|He|l)+(Ge<>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(!1);if(A=11436+(l<<2)|0,n[_+28>>2]=l,o=_+16|0,n[o+4>>2]=0,n[o>>2]=0,o=n[2784]|0,u=1<>2]=_,n[_+24>>2]=A,n[_+12>>2]=_,n[_+8>>2]=_;break}for(o=d<<((l|0)==31?0:25-(l>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){He=194;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=193;break}}if((He|0)==193){n[A>>2]=_,n[_+24>>2]=u,n[_+12>>2]=_,n[_+8>>2]=_;break}else if((He|0)==194){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=_,n[He>>2]=_,n[_+8>>2]=Ge,n[_+12>>2]=u,n[_+24>>2]=0;break}}else Ge=(n[2786]|0)+k|0,n[2786]=Ge,n[2789]=_,n[_+4>>2]=Ge|1;while(!1);return Ge=M+8|0,I=Lt,Ge|0}for(l=11580;o=n[l>>2]|0,!(o>>>0<=T>>>0&&(Ge=o+(n[l+4>>2]|0)|0,Ge>>>0>T>>>0));)l=n[l+8>>2]|0;d=Ge+-47|0,o=d+8|0,o=d+(o&7|0?0-o&7:0)|0,d=T+16|0,o=o>>>0>>0?T:o,l=o+8|0,u=m+8|0,u=u&7|0?0-u&7:0,He=m+u|0,u=B+-40-u|0,n[2789]=He,n[2786]=u,n[He+4>>2]=u|1,n[He+u+4>>2]=40,n[2790]=n[2905],u=o+4|0,n[u>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=o+24|0;do He=l,l=l+4|0,n[l>>2]=7;while((He+8|0)>>>0>>0);if((o|0)!=(T|0)){if(m=o-T|0,n[u>>2]=n[u>>2]&-2,n[T+4>>2]=m|1,n[o>>2]=m,l=m>>>3,m>>>0<256){u=11172+(l<<1<<2)|0,o=n[2783]|0,l=1<>2]|0):(n[2783]=o|l,l=u,o=u+8|0),n[o>>2]=T,n[l+12>>2]=T,n[T+8>>2]=l,n[T+12>>2]=u;break}if(l=m>>>8,l?m>>>0>16777215?u=31:(He=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,u=14-(ct|He|u)+(Ge<>>15)|0,u=m>>>(u+7|0)&1|u<<1):u=0,A=11436+(u<<2)|0,n[T+28>>2]=u,n[T+20>>2]=0,n[d>>2]=0,l=n[2784]|0,o=1<>2]=T,n[T+24>>2]=A,n[T+12>>2]=T,n[T+8>>2]=T;break}for(o=m<<((u|0)==31?0:25-(u>>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(m|0)){He=216;break}if(A=u+16+(o>>>31<<2)|0,l=n[A>>2]|0,l)o=o<<1,u=l;else{He=215;break}}if((He|0)==215){n[A>>2]=T,n[T+24>>2]=u,n[T+12>>2]=T,n[T+8>>2]=T;break}else if((He|0)==216){He=u+8|0,Ge=n[He>>2]|0,n[Ge+12>>2]=T,n[He>>2]=T,n[T+8>>2]=Ge,n[T+12>>2]=u,n[T+24>>2]=0;break}}}else{Ge=n[2787]|0,(Ge|0)==0|m>>>0>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do Ge=11172+(l<<1<<2)|0,n[Ge+12>>2]=Ge,n[Ge+8>>2]=Ge,l=l+1|0;while((l|0)!=32);Ge=m+8|0,Ge=Ge&7|0?0-Ge&7:0,He=m+Ge|0,Ge=B+-40-Ge|0,n[2789]=He,n[2786]=Ge,n[He+4>>2]=Ge|1,n[He+Ge+4>>2]=40,n[2790]=n[2905]}while(!1);if(l=n[2786]|0,l>>>0>G>>>0)return ct=l-G|0,n[2786]=ct,Ge=n[2789]|0,He=Ge+G|0,n[2789]=He,n[He+4>>2]=ct|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,I=Lt,Ge|0}return n[(Jy()|0)>>2]=12,Ge=0,I=Lt,Ge|0}function JP(o){o=o|0;var l=0,u=0,A=0,d=0,m=0,B=0,k=0,T=0;if(o){u=o+-8|0,d=n[2787]|0,o=n[o+-4>>2]|0,l=o&-8,T=u+l|0;do if(o&1)k=u,B=u;else{if(A=n[u>>2]|0,!(o&3)||(B=u+(0-A)|0,m=A+l|0,B>>>0>>0))return;if((B|0)==(n[2788]|0)){if(o=T+4|0,l=n[o>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[o>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(u=A>>>3,A>>>0<256)if(o=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(o|0)){n[2783]=n[2783]&~(1<>2]=l,n[l+8>>2]=o,k=B,l=m;break}d=n[B+24>>2]|0,o=n[B+12>>2]|0;do if((o|0)==(B|0)){if(u=B+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{o=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=o,n[o+8>>2]=k;while(!1);if(d){if(l=n[B+28>>2]|0,u=11436+(l<<2)|0,(B|0)==(n[u>>2]|0)){if(n[u>>2]=o,!o){n[2784]=n[2784]&~(1<>2]|0)!=(B|0)&1)<<2)>>2]=o,!o){k=B,l=m;break}n[o+24>>2]=d,l=B+16|0,u=n[l>>2]|0,u|0&&(n[o+16>>2]=u,n[u+24>>2]=o),l=n[l+4>>2]|0,l?(n[o+20>>2]=l,n[l+24>>2]=o,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(!1);if(!(B>>>0>=T>>>0)&&(o=T+4|0,A=n[o>>2]|0,!!(A&1))){if(A&2)n[o>>2]=A&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(o=n[2788]|0,(T|0)==(n[2789]|0)){if(T=(n[2786]|0)+l|0,n[2786]=T,n[2789]=k,n[k+4>>2]=T|1,(k|0)!=(o|0))return;n[2788]=0,n[2785]=0;return}if((T|0)==(o|0)){T=(n[2785]|0)+l|0,n[2785]=T,n[2788]=B,n[k+4>>2]=T|1,n[B+T>>2]=T;return}d=(A&-8)+l|0,u=A>>>3;do if(A>>>0<256)if(l=n[T+8>>2]|0,o=n[T+12>>2]|0,(o|0)==(l|0)){n[2783]=n[2783]&~(1<>2]=o,n[o+8>>2]=l;break}else{m=n[T+24>>2]|0,o=n[T+12>>2]|0;do if((o|0)==(T|0)){if(u=T+16|0,l=u+4|0,o=n[l>>2]|0,!o)if(o=n[u>>2]|0,o)l=u;else{u=0;break}for(;;){if(u=o+20|0,A=n[u>>2]|0,A|0){o=A,l=u;continue}if(u=o+16|0,A=n[u>>2]|0,A)o=A,l=u;else break}n[l>>2]=0,u=o}else u=n[T+8>>2]|0,n[u+12>>2]=o,n[o+8>>2]=u,u=o;while(!1);if(m|0){if(o=n[T+28>>2]|0,l=11436+(o<<2)|0,(T|0)==(n[l>>2]|0)){if(n[l>>2]=u,!u){n[2784]=n[2784]&~(1<>2]|0)!=(T|0)&1)<<2)>>2]=u,!u)break;n[u+24>>2]=m,o=T+16|0,l=n[o>>2]|0,l|0&&(n[u+16>>2]=l,n[l+24>>2]=u),o=n[o+4>>2]|0,o|0&&(n[u+20>>2]=o,n[o+24>>2]=u)}}while(!1);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(o=d>>>3,d>>>0<256){u=11172+(o<<1<<2)|0,l=n[2783]|0,o=1<>2]|0):(n[2783]=l|o,o=u,l=u+8|0),n[l>>2]=k,n[o+12>>2]=k,n[k+8>>2]=o,n[k+12>>2]=u;return}o=d>>>8,o?d>>>0>16777215?o=31:(B=(o+1048320|0)>>>16&8,T=o<>>16&4,T=T<>>16&2,o=14-(m|B|o)+(T<>>15)|0,o=d>>>(o+7|0)&1|o<<1):o=0,A=11436+(o<<2)|0,n[k+28>>2]=o,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,u=1<>>1)|0),u=n[A>>2]|0;;){if((n[u+4>>2]&-8|0)==(d|0)){o=73;break}if(A=u+16+(l>>>31<<2)|0,o=n[A>>2]|0,o)l=l<<1,u=o;else{o=72;break}}if((o|0)==72){n[A>>2]=k,n[k+24>>2]=u,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((o|0)==73){B=u+8|0,T=n[B>>2]|0,n[T+12>>2]=k,n[B>>2]=k,n[k+8>>2]=T,n[k+12>>2]=u,n[k+24>>2]=0;break}}else n[2784]=l|u,n[A>>2]=k,n[k+24>>2]=A,n[k+12>>2]=k,n[k+8>>2]=k;while(!1);if(T=(n[2791]|0)+-1|0,n[2791]=T,!T)o=11588;else return;for(;o=n[o>>2]|0,o;)o=o+8|0;n[2791]=-1}}}function pYe(){return 11628}function hYe(o){o=o|0;var l=0,u=0;return l=I,I=I+16|0,u=l,n[u>>2]=mYe(n[o+60>>2]|0)|0,o=zP(hu(6,u|0)|0)|0,I=l,o|0}function qX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0;G=I,I=I+48|0,_=G+16|0,m=G,d=G+32|0,k=o+28|0,A=n[k>>2]|0,n[d>>2]=A,T=o+20|0,A=(n[T>>2]|0)-A|0,n[d+4>>2]=A,n[d+8>>2]=l,n[d+12>>2]=u,A=A+u|0,B=o+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=zP(Ma(146,m|0)|0)|0;e:do if((A|0)!=(m|0)){for(l=2;!((m|0)<0);)if(A=A-m|0,We=n[d+4>>2]|0,ae=m>>>0>We>>>0,d=ae?d+8|0:d,l=(ae<<31>>31)+l|0,We=m-(ae?We:0)|0,n[d>>2]=(n[d>>2]|0)+We,ae=d+4|0,n[ae>>2]=(n[ae>>2]|0)-We,n[_>>2]=n[B>>2],n[_+4>>2]=d,n[_+8>>2]=l,m=zP(Ma(146,_|0)|0)|0,(A|0)==(m|0)){M=3;break e}n[o+16>>2]=0,n[k>>2]=0,n[T>>2]=0,n[o>>2]=n[o>>2]|32,(l|0)==2?u=0:u=u-(n[d+4>>2]|0)|0}else M=3;while(!1);return(M|0)==3&&(We=n[o+44>>2]|0,n[o+16>>2]=We+(n[o+48>>2]|0),n[k>>2]=We,n[T>>2]=We),I=G,u|0}function gYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;return d=I,I=I+32|0,m=d,A=d+20|0,n[m>>2]=n[o+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=A,n[m+16>>2]=u,(zP(La(140,m|0)|0)|0)<0?(n[A>>2]=-1,o=-1):o=n[A>>2]|0,I=d,o|0}function zP(o){return o=o|0,o>>>0>4294963200&&(n[(Jy()|0)>>2]=0-o,o=-1),o|0}function Jy(){return(dYe()|0)+64|0}function dYe(){return u_()|0}function u_(){return 2084}function mYe(o){return o=o|0,o|0}function yYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;return d=I,I=I+32|0,A=d,n[o+36>>2]=1,!(n[o>>2]&64|0)&&(n[A>>2]=n[o+60>>2],n[A+4>>2]=21523,n[A+8>>2]=d+16,so(54,A|0)|0)&&(s[o+75>>0]=-1),A=qX(o,l,u)|0,I=d,A|0}function GX(o,l){o=o|0,l=l|0;var u=0,A=0;if(u=s[o>>0]|0,A=s[l>>0]|0,!(u<<24>>24)||u<<24>>24!=A<<24>>24)o=A;else{do o=o+1|0,l=l+1|0,u=s[o>>0]|0,A=s[l>>0]|0;while(!(!(u<<24>>24)||u<<24>>24!=A<<24>>24));o=A}return(u&255)-(o&255)|0}function EYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0;e:do if(!u)o=0;else{for(;A=s[o>>0]|0,d=s[l>>0]|0,A<<24>>24==d<<24>>24;)if(u=u+-1|0,u)o=o+1|0,l=l+1|0;else{o=0;break e}o=(A&255)-(d&255)|0}while(!1);return o|0}function WX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0;Qe=I,I=I+224|0,M=Qe+120|0,G=Qe+80|0,We=Qe,Le=Qe+136|0,A=G,d=A+40|0;do n[A>>2]=0,A=A+4|0;while((A|0)<(d|0));return n[M>>2]=n[u>>2],(f_(0,l,M,We,G)|0)<0?u=-1:((n[o+76>>2]|0)>-1?ae=IYe(o)|0:ae=0,u=n[o>>2]|0,_=u&32,(s[o+74>>0]|0)<1&&(n[o>>2]=u&-33),A=o+48|0,n[A>>2]|0?u=f_(o,l,M,We,G)|0:(d=o+44|0,m=n[d>>2]|0,n[d>>2]=Le,B=o+28|0,n[B>>2]=Le,k=o+20|0,n[k>>2]=Le,n[A>>2]=80,T=o+16|0,n[T>>2]=Le+80,u=f_(o,l,M,We,G)|0,m&&(ex[n[o+36>>2]&7](o,0,0)|0,u=n[k>>2]|0?u:-1,n[d>>2]=m,n[A>>2]=0,n[T>>2]=0,n[B>>2]=0,n[k>>2]=0)),A=n[o>>2]|0,n[o>>2]=A|_,ae|0&&CYe(o),u=A&32|0?-1:u),I=Qe,u|0}function f_(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0;cr=I,I=I+64|0,fr=cr+16|0,$t=cr,Lt=cr+24|0,Tr=cr+8|0,Hr=cr+20|0,n[fr>>2]=l,ct=(o|0)!=0,He=Lt+40|0,Ge=He,Lt=Lt+39|0,qr=Tr+4|0,B=0,m=0,M=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(Jy()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(!1);if(B=s[l>>0]|0,B<<24>>24)k=l;else{Ze=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Ze=9;break t}case 0:{B=k;break t}default:}tt=k+1|0,n[fr>>2]=tt,B=s[tt>>0]|0,k=tt}t:do if((Ze|0)==9)for(;;){if(Ze=0,(s[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[fr>>2]=k,(s[k>>0]|0)==37)Ze=9;else break}while(!1);if(B=B-l|0,ct&&Ds(o,l,B),B|0){l=k;continue}T=k+1|0,B=(s[T>>0]|0)+-48|0,B>>>0<10?(tt=(s[k+2>>0]|0)==36,Qe=tt?B:-1,M=tt?1:M,T=tt?k+3|0:T):Qe=-1,n[fr>>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(_=0,G=B;;){if(B=1<>2]=T,B=s[T>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;G=B}else _=0;while(!1);if(B<<24>>24==42){if(k=T+1|0,B=(s[k>>0]|0)+-48|0,B>>>0<10&&(s[T+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[A+((s[k>>0]|0)+-48<<3)>>2]|0,M=1,T=T+3|0;else{if(M|0){m=-1;break}ct?(M=(n[u>>2]|0)+3&-4,B=n[M>>2]|0,n[u>>2]=M+4,M=0,T=k):(B=0,M=0,T=k)}n[fr>>2]=T,tt=(B|0)<0,B=tt?0-B|0:B,_=tt?_|8192:_}else{if(B=YX(fr)|0,(B|0)<0){m=-1;break}T=n[fr>>2]|0}do if((s[T>>0]|0)==46){if((s[T+1>>0]|0)!=42){n[fr>>2]=T+1,k=YX(fr)|0,T=n[fr>>2]|0;break}if(G=T+2|0,k=(s[G>>0]|0)+-48|0,k>>>0<10&&(s[T+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[A+((s[G>>0]|0)+-48<<3)>>2]|0,T=T+4|0,n[fr>>2]=T;break}if(M|0){m=-1;break e}ct?(tt=(n[u>>2]|0)+3&-4,k=n[tt>>2]|0,n[u>>2]=tt+4):k=0,n[fr>>2]=G,T=G}else k=-1;while(!1);for(Le=0;;){if(((s[T>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(tt=T+1|0,n[fr>>2]=tt,G=s[(s[T>>0]|0)+-65+(5178+(Le*58|0))>>0]|0,ae=G&255,(ae+-1|0)>>>0<8)Le=ae,T=tt;else break}if(!(G<<24>>24)){m=-1;break}We=(Qe|0)>-1;do if(G<<24>>24==19)if(We){m=-1;break e}else Ze=49;else{if(We){n[d+(Qe<<2)>>2]=ae,We=A+(Qe<<3)|0,Qe=n[We+4>>2]|0,Ze=$t,n[Ze>>2]=n[We>>2],n[Ze+4>>2]=Qe,Ze=49;break}if(!ct){m=0;break e}VX($t,ae,u)}while(!1);if((Ze|0)==49&&(Ze=0,!ct)){B=0,l=tt;continue}T=s[T>>0]|0,T=(Le|0)!=0&(T&15|0)==3?T&-33:T,We=_&-65537,Qe=_&8192|0?We:_;t:do switch(T|0){case 110:switch((Le&255)<<24>>24){case 0:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 1:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 2:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}case 3:{a[n[$t>>2]>>1]=m,B=0,l=tt;continue e}case 4:{s[n[$t>>2]>>0]=m,B=0,l=tt;continue e}case 6:{n[n[$t>>2]>>2]=m,B=0,l=tt;continue e}case 7:{B=n[$t>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=tt;continue e}default:{B=0,l=tt;continue e}}case 112:{T=120,k=k>>>0>8?k:8,l=Qe|8,Ze=61;break}case 88:case 120:{l=Qe,Ze=61;break}case 111:{T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,ae=BYe(l,T,He)|0,We=Ge-ae|0,_=0,G=5642,k=(Qe&8|0)==0|(k|0)>(We|0)?k:We+1|0,We=Qe,Ze=67;break}case 105:case 100:if(T=$t,l=n[T>>2]|0,T=n[T+4>>2]|0,(T|0)<0){l=ZP(0,0,l|0,T|0)|0,T=ye,_=$t,n[_>>2]=l,n[_+4>>2]=T,_=1,G=5642,Ze=66;break t}else{_=(Qe&2049|0)!=0&1,G=Qe&2048|0?5643:Qe&1|0?5644:5642,Ze=66;break t}case 117:{T=$t,_=0,G=5642,l=n[T>>2]|0,T=n[T+4>>2]|0,Ze=66;break}case 99:{s[Lt>>0]=n[$t>>2],l=Lt,_=0,G=5642,ae=He,T=1,k=We;break}case 109:{T=vYe(n[(Jy()|0)>>2]|0)|0,Ze=71;break}case 115:{T=n[$t>>2]|0,T=T|0?T:5652,Ze=71;break}case 67:{n[Tr>>2]=n[$t>>2],n[qr>>2]=0,n[$t>>2]=Tr,ae=-1,T=Tr,Ze=75;break}case 83:{l=n[$t>>2]|0,k?(ae=k,T=l,Ze=75):(_s(o,32,B,0,Qe),l=0,Ze=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=DYe(o,+E[$t>>3],B,k,Qe,T)|0,l=tt;continue e}default:_=0,G=5642,ae=He,T=k,k=Qe}while(!1);t:do if((Ze|0)==61)Qe=$t,Le=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,ae=wYe(Le,Qe,He,T&32)|0,G=(l&8|0)==0|(Le|0)==0&(Qe|0)==0,_=G?0:2,G=G?5642:5642+(T>>4)|0,We=l,l=Le,T=Qe,Ze=67;else if((Ze|0)==66)ae=zy(l,T,He)|0,We=Qe,Ze=67;else if((Ze|0)==71)Ze=0,Qe=SYe(T,0,k)|0,Le=(Qe|0)==0,l=T,_=0,G=5642,ae=Le?T+k|0:Qe,T=Le?k:Qe-T|0,k=We;else if((Ze|0)==75){for(Ze=0,G=T,l=0,k=0;_=n[G>>2]|0,!(!_||(k=KX(Hr,_)|0,(k|0)<0|k>>>0>(ae-l|0)>>>0));)if(l=k+l|0,ae>>>0>l>>>0)G=G+4|0;else break;if((k|0)<0){m=-1;break e}if(_s(o,32,B,l,Qe),!l)l=0,Ze=84;else for(_=0;;){if(k=n[T>>2]|0,!k){Ze=84;break t}if(k=KX(Hr,k)|0,_=k+_|0,(_|0)>(l|0)){Ze=84;break t}if(Ds(o,Hr,k),_>>>0>=l>>>0){Ze=84;break}else T=T+4|0}}while(!1);if((Ze|0)==67)Ze=0,T=(l|0)!=0|(T|0)!=0,Qe=(k|0)!=0|T,T=((T^1)&1)+(Ge-ae)|0,l=Qe?ae:He,ae=He,T=Qe?(k|0)>(T|0)?k:T:k,k=(k|0)>-1?We&-65537:We;else if((Ze|0)==84){Ze=0,_s(o,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=tt;continue}Le=ae-l|0,We=(T|0)<(Le|0)?Le:T,Qe=We+_|0,B=(B|0)<(Qe|0)?Qe:B,_s(o,32,B,Qe,k),Ds(o,G,_),_s(o,48,B,Qe,k^65536),_s(o,48,We,Le,0),Ds(o,l,Le),_s(o,32,B,Qe,k^8192),l=tt}e:do if((Ze|0)==87&&!o)if(!M)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(VX(A+(m<<3)|0,l,u),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(!1);return I=cr,m|0}function IYe(o){return o=o|0,0}function CYe(o){o=o|0}function Ds(o,l,u){o=o|0,l=l|0,u=u|0,n[o>>2]&32||NYe(l,u,o)|0}function YX(o){o=o|0;var l=0,u=0,A=0;if(u=n[o>>2]|0,A=(s[u>>0]|0)+-48|0,A>>>0<10){l=0;do l=A+(l*10|0)|0,u=u+1|0,n[o>>2]=u,A=(s[u>>0]|0)+-48|0;while(A>>>0<10)}else l=0;return l|0}function VX(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,n[o>>2]=l;break e}case 10:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{A=(n[u>>2]|0)+3&-4,l=n[A>>2]|0,n[u>>2]=A+4,A=o,n[A>>2]=l,n[A+4>>2]=0;break e}case 12:{A=(n[u>>2]|0)+7&-8,l=A,d=n[l>>2]|0,l=n[l+4>>2]|0,n[u>>2]=A+8,A=o,n[A>>2]=d,n[A+4>>2]=l;break e}case 13:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&65535)<<16>>16,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 14:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&65535,n[d+4>>2]=0;break e}case 15:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,A=(A&255)<<24>>24,d=o,n[d>>2]=A,n[d+4>>2]=((A|0)<0)<<31>>31;break e}case 16:{d=(n[u>>2]|0)+3&-4,A=n[d>>2]|0,n[u>>2]=d+4,d=o,n[d>>2]=A&255,n[d+4>>2]=0;break e}case 17:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}case 18:{d=(n[u>>2]|0)+7&-8,m=+E[d>>3],n[u>>2]=d+8,E[o>>3]=m;break e}default:break e}while(!1);while(!1)}function wYe(o,l,u,A){if(o=o|0,l=l|0,u=u|0,A=A|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=c[5694+(o&15)>>0]|0|A,o=XP(o|0,l|0,4)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function BYe(o,l,u){if(o=o|0,l=l|0,u=u|0,!((o|0)==0&(l|0)==0))do u=u+-1|0,s[u>>0]=o&7|48,o=XP(o|0,l|0,3)|0,l=ye;while(!((o|0)==0&(l|0)==0));return u|0}function zy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if(l>>>0>0|(l|0)==0&o>>>0>4294967295){for(;A=g_(o|0,l|0,10,0)|0,u=u+-1|0,s[u>>0]=A&255|48,A=o,o=h_(o|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&A>>>0>4294967295;)l=ye;l=o}else l=o;if(l)for(;u=u+-1|0,s[u>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return u|0}function vYe(o){return o=o|0,QYe(o,n[(kYe()|0)+188>>2]|0)|0}function SYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;m=l&255,A=(u|0)!=0;e:do if(A&(o&3|0)!=0)for(d=l&255;;){if((s[o>>0]|0)==d<<24>>24){B=6;break e}if(o=o+1|0,u=u+-1|0,A=(u|0)!=0,!(A&(o&3|0)!=0)){B=5;break}}else B=5;while(!1);(B|0)==5&&(A?B=6:u=0);e:do if((B|0)==6&&(d=l&255,(s[o>>0]|0)!=d<<24>>24)){A=_e(m,16843009)|0;t:do if(u>>>0>3){for(;m=n[o>>2]^A,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(o=o+4|0,u=u+-4|0,u>>>0<=3){B=11;break t}}else B=11;while(!1);if((B|0)==11&&!u){u=0;break}for(;;){if((s[o>>0]|0)==d<<24>>24)break e;if(o=o+1|0,u=u+-1|0,!u){u=0;break}}}while(!1);return(u|0?o:0)|0}function _s(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0;if(B=I,I=I+256|0,m=B,(u|0)>(A|0)&(d&73728|0)==0){if(d=u-A|0,Xy(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=u-A|0;do Ds(o,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}Ds(o,m,d)}I=B}function KX(o,l){return o=o|0,l=l|0,o?o=PYe(o,l,0)|0:o=0,o|0}function DYe(o,l,u,A,d,m){o=o|0,l=+l,u=u|0,A=A|0,d=d|0,m=m|0;var B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0,Qe=0,tt=0,Ze=0,ct=0,He=0,Ge=0,Lt=0,qr=0,fr=0,$t=0,Tr=0,Hr=0,cr=0,Hn=0;Hn=I,I=I+560|0,T=Hn+8|0,tt=Hn,cr=Hn+524|0,Hr=cr,_=Hn+512|0,n[tt>>2]=0,Tr=_+12|0,JX(l)|0,(ye|0)<0?(l=-l,fr=1,qr=5659):(fr=(d&2049|0)!=0&1,qr=d&2048|0?5662:d&1|0?5665:5660),JX(l)|0,$t=ye&2146435072;do if($t>>>0<2146435072|($t|0)==2146435072&!1){if(We=+bYe(l,tt)*2,B=We!=0,B&&(n[tt>>2]=(n[tt>>2]|0)+-1),ct=m|32,(ct|0)==97){Le=m&32,ae=Le|0?qr+9|0:qr,G=fr|2,B=12-A|0;do if(A>>>0>11|(B|0)==0)l=We;else{l=8;do B=B+-1|0,l=l*16;while(B|0);if((s[ae>>0]|0)==45){l=-(l+(-We-l));break}else{l=We+l-l;break}}while(!1);k=n[tt>>2]|0,B=(k|0)<0?0-k|0:k,B=zy(B,((B|0)<0)<<31>>31,Tr)|0,(B|0)==(Tr|0)&&(B=_+11|0,s[B>>0]=48),s[B+-1>>0]=(k>>31&2)+43,M=B+-2|0,s[M>>0]=m+15,_=(A|0)<1,T=(d&8|0)==0,B=cr;do $t=~~l,k=B+1|0,s[B>>0]=c[5694+$t>>0]|Le,l=(l-+($t|0))*16,(k-Hr|0)==1&&!(T&(_&l==0))?(s[k>>0]=46,B=B+2|0):B=k;while(l!=0);$t=B-Hr|0,Hr=Tr-M|0,Tr=(A|0)!=0&($t+-2|0)<(A|0)?A+2|0:$t,B=Hr+G+Tr|0,_s(o,32,u,B,d),Ds(o,ae,G),_s(o,48,u,B,d^65536),Ds(o,cr,$t),_s(o,48,Tr-$t|0,0,0),Ds(o,M,Hr),_s(o,32,u,B,d^8192);break}k=(A|0)<0?6:A,B?(B=(n[tt>>2]|0)+-28|0,n[tt>>2]=B,l=We*268435456):(l=We,B=n[tt>>2]|0),$t=(B|0)<0?T:T+288|0,T=$t;do Ge=~~l>>>0,n[T>>2]=Ge,T=T+4|0,l=(l-+(Ge>>>0))*1e9;while(l!=0);if((B|0)>0)for(_=$t,G=T;;){if(M=(B|0)<29?B:29,B=G+-4|0,B>>>0>=_>>>0){T=0;do He=t$(n[B>>2]|0,0,M|0)|0,He=p_(He|0,ye|0,T|0,0)|0,Ge=ye,Ze=g_(He|0,Ge|0,1e9,0)|0,n[B>>2]=Ze,T=h_(He|0,Ge|0,1e9,0)|0,B=B+-4|0;while(B>>>0>=_>>>0);T&&(_=_+-4|0,n[_>>2]=T)}for(T=G;!(T>>>0<=_>>>0);)if(B=T+-4|0,!(n[B>>2]|0))T=B;else break;if(B=(n[tt>>2]|0)-M|0,n[tt>>2]=B,(B|0)>0)G=T;else break}else _=$t;if((B|0)<0){A=((k+25|0)/9|0)+1|0,Qe=(ct|0)==102;do{if(Le=0-B|0,Le=(Le|0)<9?Le:9,_>>>0>>0){M=(1<>>Le,ae=0,B=_;do Ge=n[B>>2]|0,n[B>>2]=(Ge>>>Le)+ae,ae=_e(Ge&M,G)|0,B=B+4|0;while(B>>>0>>0);B=n[_>>2]|0?_:_+4|0,ae?(n[T>>2]=ae,_=B,B=T+4|0):(_=B,B=T)}else _=n[_>>2]|0?_:_+4|0,B=T;T=Qe?$t:_,T=(B-T>>2|0)>(A|0)?T+(A<<2)|0:B,B=(n[tt>>2]|0)+Le|0,n[tt>>2]=B}while((B|0)<0);B=_,A=T}else B=_,A=T;if(Ge=$t,B>>>0>>0){if(T=(Ge-B>>2)*9|0,M=n[B>>2]|0,M>>>0>=10){_=10;do _=_*10|0,T=T+1|0;while(M>>>0>=_>>>0)}}else T=0;if(Qe=(ct|0)==103,Ze=(k|0)!=0,_=k-((ct|0)!=102?T:0)+((Ze&Qe)<<31>>31)|0,(_|0)<(((A-Ge>>2)*9|0)+-9|0)){if(_=_+9216|0,Le=$t+4+(((_|0)/9|0)+-1024<<2)|0,_=((_|0)%9|0)+1|0,(_|0)<9){M=10;do M=M*10|0,_=_+1|0;while((_|0)!=9)}else M=10;if(G=n[Le>>2]|0,ae=(G>>>0)%(M>>>0)|0,_=(Le+4|0)==(A|0),_&(ae|0)==0)_=Le;else if(We=((G>>>0)/(M>>>0)|0)&1|0?9007199254740994:9007199254740992,He=(M|0)/2|0,l=ae>>>0>>0?.5:_&(ae|0)==(He|0)?1:1.5,fr&&(He=(s[qr>>0]|0)==45,l=He?-l:l,We=He?-We:We),_=G-ae|0,n[Le>>2]=_,We+l!=We){if(He=_+M|0,n[Le>>2]=He,He>>>0>999999999)for(T=Le;_=T+-4|0,n[T>>2]=0,_>>>0>>0&&(B=B+-4|0,n[B>>2]=0),He=(n[_>>2]|0)+1|0,n[_>>2]=He,He>>>0>999999999;)T=_;else _=Le;if(T=(Ge-B>>2)*9|0,G=n[B>>2]|0,G>>>0>=10){M=10;do M=M*10|0,T=T+1|0;while(G>>>0>=M>>>0)}}else _=Le;_=_+4|0,_=A>>>0>_>>>0?_:A,He=B}else _=A,He=B;for(ct=_;;){if(ct>>>0<=He>>>0){tt=0;break}if(B=ct+-4|0,!(n[B>>2]|0))ct=B;else{tt=1;break}}A=0-T|0;do if(Qe)if(B=((Ze^1)&1)+k|0,(B|0)>(T|0)&(T|0)>-5?(M=m+-1|0,k=B+-1-T|0):(M=m+-2|0,k=B+-1|0),B=d&8,B)Le=B;else{if(tt&&(Lt=n[ct+-4>>2]|0,(Lt|0)!=0))if((Lt>>>0)%10|0)_=0;else{_=0,B=10;do B=B*10|0,_=_+1|0;while(!((Lt>>>0)%(B>>>0)|0|0))}else _=9;if(B=((ct-Ge>>2)*9|0)+-9|0,(M|32|0)==102){Le=B-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}else{Le=B+T-_|0,Le=(Le|0)>0?Le:0,k=(k|0)<(Le|0)?k:Le,Le=0;break}}else M=m,Le=d&8;while(!1);if(Qe=k|Le,G=(Qe|0)!=0&1,ae=(M|32|0)==102,ae)Ze=0,B=(T|0)>0?T:0;else{if(B=(T|0)<0?A:T,B=zy(B,((B|0)<0)<<31>>31,Tr)|0,_=Tr,(_-B|0)<2)do B=B+-1|0,s[B>>0]=48;while((_-B|0)<2);s[B+-1>>0]=(T>>31&2)+43,B=B+-2|0,s[B>>0]=M,Ze=B,B=_-B|0}if(B=fr+1+k+G+B|0,_s(o,32,u,B,d),Ds(o,qr,fr),_s(o,48,u,B,d^65536),ae){M=He>>>0>$t>>>0?$t:He,Le=cr+9|0,G=Le,ae=cr+8|0,_=M;do{if(T=zy(n[_>>2]|0,0,Le)|0,(_|0)==(M|0))(T|0)==(Le|0)&&(s[ae>>0]=48,T=ae);else if(T>>>0>cr>>>0){Xy(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}Ds(o,T,G-T|0),_=_+4|0}while(_>>>0<=$t>>>0);if(Qe|0&&Ds(o,5710,1),_>>>0>>0&(k|0)>0)for(;;){if(T=zy(n[_>>2]|0,0,Le)|0,T>>>0>cr>>>0){Xy(cr|0,48,T-Hr|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}if(Ds(o,T,(k|0)<9?k:9),_=_+4|0,T=k+-9|0,_>>>0>>0&(k|0)>9)k=T;else{k=T;break}}_s(o,48,k+9|0,9,0)}else{if(Qe=tt?ct:He+4|0,(k|0)>-1){tt=cr+9|0,Le=(Le|0)==0,A=tt,G=0-Hr|0,ae=cr+8|0,M=He;do{T=zy(n[M>>2]|0,0,tt)|0,(T|0)==(tt|0)&&(s[ae>>0]=48,T=ae);do if((M|0)==(He|0)){if(_=T+1|0,Ds(o,T,1),Le&(k|0)<1){T=_;break}Ds(o,5710,1),T=_}else{if(T>>>0<=cr>>>0)break;Xy(cr|0,48,T+G|0)|0;do T=T+-1|0;while(T>>>0>cr>>>0)}while(!1);Hr=A-T|0,Ds(o,T,(k|0)>(Hr|0)?Hr:k),k=k-Hr|0,M=M+4|0}while(M>>>0>>0&(k|0)>-1)}_s(o,48,k+18|0,18,0),Ds(o,Ze,Tr-Ze|0)}_s(o,32,u,B,d^8192)}else cr=(m&32|0)!=0,B=fr+3|0,_s(o,32,u,B,d&-65537),Ds(o,qr,fr),Ds(o,l!=l|!1?cr?5686:5690:cr?5678:5682,3),_s(o,32,u,B,d^8192);while(!1);return I=Hn,((B|0)<(u|0)?u:B)|0}function JX(o){o=+o;var l=0;return E[S>>3]=o,l=n[S>>2]|0,ye=n[S+4>>2]|0,l|0}function bYe(o,l){return o=+o,l=l|0,+ +zX(o,l)}function zX(o,l){o=+o,l=l|0;var u=0,A=0,d=0;switch(E[S>>3]=o,u=n[S>>2]|0,A=n[S+4>>2]|0,d=XP(u|0,A|0,52)|0,d&2047){case 0:{o!=0?(o=+zX(o*18446744073709552e3,l),u=(n[l>>2]|0)+-64|0):u=0,n[l>>2]=u;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[S>>2]=u,n[S+4>>2]=A&-2146435073|1071644672,o=+E[S>>3]}return+o}function PYe(o,l,u){o=o|0,l=l|0,u=u|0;do if(o){if(l>>>0<128){s[o>>0]=l,o=1;break}if(!(n[n[(xYe()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){s[o>>0]=l,o=1;break}else{n[(Jy()|0)>>2]=84,o=-1;break}if(l>>>0<2048){s[o>>0]=l>>>6|192,s[o+1>>0]=l&63|128,o=2;break}if(l>>>0<55296|(l&-8192|0)==57344){s[o>>0]=l>>>12|224,s[o+1>>0]=l>>>6&63|128,s[o+2>>0]=l&63|128,o=3;break}if((l+-65536|0)>>>0<1048576){s[o>>0]=l>>>18|240,s[o+1>>0]=l>>>12&63|128,s[o+2>>0]=l>>>6&63|128,s[o+3>>0]=l&63|128,o=4;break}else{n[(Jy()|0)>>2]=84,o=-1;break}}else o=1;while(!1);return o|0}function xYe(){return u_()|0}function kYe(){return u_()|0}function QYe(o,l){o=o|0,l=l|0;var u=0,A=0;for(A=0;;){if((c[5712+A>>0]|0)==(o|0)){o=2;break}if(u=A+1|0,(u|0)==87){u=5800,A=87,o=5;break}else A=u}if((o|0)==2&&(A?(u=5800,o=5):u=5800),(o|0)==5)for(;;){do o=u,u=u+1|0;while(s[o>>0]|0);if(A=A+-1|0,A)o=5;else break}return TYe(u,n[l+20>>2]|0)|0}function TYe(o,l){return o=o|0,l=l|0,RYe(o,l)|0}function RYe(o,l){return o=o|0,l=l|0,l?l=FYe(n[l>>2]|0,n[l+4>>2]|0,o)|0:l=0,(l|0?l:o)|0}function FYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0;ae=(n[o>>2]|0)+1794895138|0,m=fd(n[o+8>>2]|0,ae)|0,A=fd(n[o+12>>2]|0,ae)|0,d=fd(n[o+16>>2]|0,ae)|0;e:do if(m>>>0>>2>>>0&&(G=l-(m<<2)|0,A>>>0>>0&d>>>0>>0)&&!((d|A)&3|0)){for(G=A>>>2,M=d>>>2,_=0;;){if(k=m>>>1,T=_+k|0,B=T<<1,d=B+G|0,A=fd(n[o+(d<<2)>>2]|0,ae)|0,d=fd(n[o+(d+1<<2)>>2]|0,ae)|0,!(d>>>0>>0&A>>>0<(l-d|0)>>>0)){A=0;break e}if(s[o+(d+A)>>0]|0){A=0;break e}if(A=GX(u,o+d|0)|0,!A)break;if(A=(A|0)<0,(m|0)==1){A=0;break e}else _=A?_:T,m=A?k:m-k|0}A=B+M|0,d=fd(n[o+(A<<2)>>2]|0,ae)|0,A=fd(n[o+(A+1<<2)>>2]|0,ae)|0,A>>>0>>0&d>>>0<(l-A|0)>>>0?A=s[o+(A+d)>>0]|0?0:o+A|0:A=0}else A=0;while(!1);return A|0}function fd(o,l){o=o|0,l=l|0;var u=0;return u=i$(o|0)|0,(l|0?u:o)|0}function NYe(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0,k=0;A=u+16|0,d=n[A>>2]|0,d?m=5:OYe(u)|0?A=0:(d=n[A>>2]|0,m=5);e:do if((m|0)==5){if(k=u+20|0,B=n[k>>2]|0,A=B,(d-B|0)>>>0>>0){A=ex[n[u+36>>2]&7](u,o,l)|0;break}t:do if((s[u+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=o;break t}if(d=B+-1|0,(s[o+d>>0]|0)==10)break;B=d}if(A=ex[n[u+36>>2]&7](u,o,B)|0,A>>>0>>0)break e;m=B,d=o+B|0,l=l-B|0,A=n[k>>2]|0}else m=0,d=o;while(!1);Qr(A|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,A=m+l|0}while(!1);return A|0}function OYe(o){o=o|0;var l=0,u=0;return l=o+74|0,u=s[l>>0]|0,s[l>>0]=u+255|u,l=n[o>>2]|0,l&8?(n[o>>2]=l|32,o=-1):(n[o+8>>2]=0,n[o+4>>2]=0,u=n[o+44>>2]|0,n[o+28>>2]=u,n[o+20>>2]=u,n[o+16>>2]=u+(n[o+48>>2]|0),o=0),o|0}function $n(o,l){o=y(o),l=y(l);var u=0,A=0;u=ZX(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=ZX(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?l:o;break}else{o=o>2]=o,n[S>>2]|0|0}function Ad(o,l){o=y(o),l=y(l);var u=0,A=0;u=XX(o)|0;do if((u&2147483647)>>>0<=2139095040){if(A=XX(l)|0,(A&2147483647)>>>0<=2139095040)if((A^u|0)<0){o=(u|0)<0?o:l;break}else{o=o>2]=o,n[S>>2]|0|0}function A_(o,l){o=y(o),l=y(l);var u=0,A=0,d=0,m=0,B=0,k=0,T=0,_=0;m=(h[S>>2]=o,n[S>>2]|0),k=(h[S>>2]=l,n[S>>2]|0),u=m>>>23&255,B=k>>>23&255,T=m&-2147483648,d=k<<1;e:do if(d|0&&!((u|0)==255|((LYe(l)|0)&2147483647)>>>0>2139095040)){if(A=m<<1,A>>>0<=d>>>0)return l=y(o*y(0)),y((A|0)==(d|0)?l:o);if(u)A=m&8388607|8388608;else{if(u=m<<9,(u|0)>-1){A=u,u=0;do u=u+-1|0,A=A<<1;while((A|0)>-1)}else u=0;A=m<<1-u}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=A-k|0,m=(d|0)>-1;t:do if((u|0)>(B|0)){for(;;){if(m)if(d)A=d;else break;if(A=A<<1,u=u+-1|0,d=A-k|0,m=(d|0)>-1,(u|0)<=(B|0))break t}l=y(o*y(0));break e}while(!1);if(m)if(d)A=d;else{l=y(o*y(0));break}if(A>>>0<8388608)do A=A<<1,u=u+-1|0;while(A>>>0<8388608);(u|0)>0?u=A+-8388608|u<<23:u=A>>>(1-u|0),l=(n[S>>2]=u|T,y(h[S>>2]))}else _=3;while(!1);return(_|0)==3&&(l=y(o*l),l=y(l/l)),y(l)}function LYe(o){return o=y(o),h[S>>2]=o,n[S>>2]|0|0}function MYe(o,l){return o=o|0,l=l|0,WX(n[582]|0,o,l)|0}function sn(o){o=o|0,Nt()}function Zy(o){o=o|0}function _Ye(o,l){return o=o|0,l=l|0,0}function UYe(o){return o=o|0,($X(o+4|0)|0)==-1?(op[n[(n[o>>2]|0)+8>>2]&127](o),o=1):o=0,o|0}function $X(o){o=o|0;var l=0;return l=n[o>>2]|0,n[o>>2]=l+-1,l+-1|0}function Wh(o){o=o|0,UYe(o)|0&&HYe(o)}function HYe(o){o=o|0;var l=0;l=o+8|0,n[l>>2]|0&&($X(l)|0)!=-1||op[n[(n[o>>2]|0)+16>>2]&127](o)}function Jt(o){o=o|0;var l=0;for(l=o|0?o:1;o=KP(l)|0,!(o|0);){if(o=qYe()|0,!o){o=0;break}h$[o&0]()}return o|0}function e$(o){return o=o|0,Jt(o)|0}function Et(o){o=o|0,JP(o)}function jYe(o){o=o|0,(s[o+11>>0]|0)<0&&Et(n[o>>2]|0)}function qYe(){var o=0;return o=n[2923]|0,n[2923]=o+0,o|0}function GYe(){}function ZP(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,A=l-A-(u>>>0>o>>>0|0)>>>0,ye=A,o-u>>>0|0|0}function p_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,u=o+u>>>0,ye=l+A+(u>>>0>>0|0)>>>0,u|0|0}function Xy(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0,B=0;if(m=o+u|0,l=l&255,(u|0)>=67){for(;o&3;)s[o>>0]=l,o=o+1|0;for(A=m&-4|0,d=A-64|0,B=l|l<<8|l<<16|l<<24;(o|0)<=(d|0);)n[o>>2]=B,n[o+4>>2]=B,n[o+8>>2]=B,n[o+12>>2]=B,n[o+16>>2]=B,n[o+20>>2]=B,n[o+24>>2]=B,n[o+28>>2]=B,n[o+32>>2]=B,n[o+36>>2]=B,n[o+40>>2]=B,n[o+44>>2]=B,n[o+48>>2]=B,n[o+52>>2]=B,n[o+56>>2]=B,n[o+60>>2]=B,o=o+64|0;for(;(o|0)<(A|0);)n[o>>2]=B,o=o+4|0}for(;(o|0)<(m|0);)s[o>>0]=l,o=o+1|0;return m-u|0}function t$(o,l,u){return o=o|0,l=l|0,u=u|0,(u|0)<32?(ye=l<>>32-u,o<>>u,o>>>u|(l&(1<>>u-32|0)}function Qr(o,l,u){o=o|0,l=l|0,u=u|0;var A=0,d=0,m=0;if((u|0)>=8192)return MA(o|0,l|0,u|0)|0;if(m=o|0,d=o+u|0,(o&3)==(l&3)){for(;o&3;){if(!u)return m|0;s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0,u=u-1|0}for(u=d&-4|0,A=u-64|0;(o|0)<=(A|0);)n[o>>2]=n[l>>2],n[o+4>>2]=n[l+4>>2],n[o+8>>2]=n[l+8>>2],n[o+12>>2]=n[l+12>>2],n[o+16>>2]=n[l+16>>2],n[o+20>>2]=n[l+20>>2],n[o+24>>2]=n[l+24>>2],n[o+28>>2]=n[l+28>>2],n[o+32>>2]=n[l+32>>2],n[o+36>>2]=n[l+36>>2],n[o+40>>2]=n[l+40>>2],n[o+44>>2]=n[l+44>>2],n[o+48>>2]=n[l+48>>2],n[o+52>>2]=n[l+52>>2],n[o+56>>2]=n[l+56>>2],n[o+60>>2]=n[l+60>>2],o=o+64|0,l=l+64|0;for(;(o|0)<(u|0);)n[o>>2]=n[l>>2],o=o+4|0,l=l+4|0}else for(u=d-4|0;(o|0)<(u|0);)s[o>>0]=s[l>>0]|0,s[o+1>>0]=s[l+1>>0]|0,s[o+2>>0]=s[l+2>>0]|0,s[o+3>>0]=s[l+3>>0]|0,o=o+4|0,l=l+4|0;for(;(o|0)<(d|0);)s[o>>0]=s[l>>0]|0,o=o+1|0,l=l+1|0;return m|0}function r$(o){o=o|0;var l=0;return l=s[N+(o&255)>>0]|0,(l|0)<8?l|0:(l=s[N+(o>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=s[N+(o>>16&255)>>0]|0,(l|0)<8?l+16|0:(s[N+(o>>>24)>>0]|0)+24|0))}function n$(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0;var m=0,B=0,k=0,T=0,_=0,M=0,G=0,ae=0,We=0,Le=0;if(M=o,T=l,_=T,B=u,ae=A,k=ae,!_)return m=(d|0)!=0,k?m?(n[d>>2]=o|0,n[d+4>>2]=l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0):(m&&(n[d>>2]=(M>>>0)%(B>>>0),n[d+4>>2]=0),ae=0,d=(M>>>0)/(B>>>0)>>>0,ye=ae,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=31){G=m+1|0,k=31-m|0,l=m-31>>31,B=G,o=M>>>(G>>>0)&l|_<>>(G>>>0)&l,m=0,k=M<>2]=o|0,n[d+4>>2]=T|l&0,ae=0,d=0,ye=ae,d|0):(ae=0,d=0,ye=ae,d|0)}if(m=B-1|0,m&B|0){k=(b(B|0)|0)+33-(b(_|0)|0)|0,Le=64-k|0,G=32-k|0,T=G>>31,We=k-32|0,l=We>>31,B=k,o=G-1>>31&_>>>(We>>>0)|(_<>>(k>>>0))&l,l=l&_>>>(k>>>0),m=M<>>(We>>>0))&T|M<>31;break}return d|0&&(n[d>>2]=m&M,n[d+4>>2]=0),(B|0)==1?(We=T|l&0,Le=o|0|0,ye=We,Le|0):(Le=r$(B|0)|0,We=_>>>(Le>>>0)|0,Le=_<<32-Le|M>>>(Le>>>0)|0,ye=We,Le|0)}else{if(m)return d|0&&(n[d>>2]=(_>>>0)%(B>>>0),n[d+4>>2]=0),We=0,Le=(_>>>0)/(B>>>0)>>>0,ye=We,Le|0;if(!M)return d|0&&(n[d>>2]=0,n[d+4>>2]=(_>>>0)%(k>>>0)),We=0,Le=(_>>>0)/(k>>>0)>>>0,ye=We,Le|0;if(m=k-1|0,!(m&k))return d|0&&(n[d>>2]=o|0,n[d+4>>2]=m&_|l&0),We=0,Le=_>>>((r$(k|0)|0)>>>0),ye=We,Le|0;if(m=(b(k|0)|0)-(b(_|0)|0)|0,m>>>0<=30){l=m+1|0,k=31-m|0,B=l,o=_<>>(l>>>0),l=_>>>(l>>>0),m=0,k=M<>2]=o|0,n[d+4>>2]=T|l&0,We=0,Le=0,ye=We,Le|0):(We=0,Le=0,ye=We,Le|0)}while(!1);if(!B)_=k,T=0,k=0;else{G=u|0|0,M=ae|A&0,_=p_(G|0,M|0,-1,-1)|0,u=ye,T=k,k=0;do A=T,T=m>>>31|T<<1,m=k|m<<1,A=o<<1|A>>>31|0,ae=o>>>31|l<<1|0,ZP(_|0,u|0,A|0,ae|0)|0,Le=ye,We=Le>>31|((Le|0)<0?-1:0)<<1,k=We&1,o=ZP(A|0,ae|0,We&G|0,(((Le|0)<0?-1:0)>>31|((Le|0)<0?-1:0)<<1)&M|0)|0,l=ye,B=B-1|0;while(B|0);_=T,T=0}return B=0,d|0&&(n[d>>2]=o,n[d+4>>2]=l),We=(m|0)>>>31|(_|B)<<1|(B<<1|m>>>31)&0|T,Le=(m<<1|0)&-2|k,ye=We,Le|0}function h_(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,n$(o,l,u,A,0)|0}function Yh(o){o=o|0;var l=0,u=0;return u=o+15&-16|0,l=n[C>>2]|0,o=l+u|0,(u|0)>0&(o|0)<(l|0)|(o|0)<0?(oe()|0,pu(12),-1):(n[C>>2]=o,(o|0)>($()|0)&&!(Z()|0)?(n[C>>2]=l,pu(12),-1):l|0)}function Q2(o,l,u){o=o|0,l=l|0,u=u|0;var A=0;if((l|0)<(o|0)&(o|0)<(l+u|0)){for(A=o,l=l+u|0,o=o+u|0;(u|0)>0;)o=o-1|0,l=l-1|0,u=u-1|0,s[o>>0]=s[l>>0]|0;o=A}else Qr(o,l,u)|0;return o|0}function g_(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0;var d=0,m=0;return m=I,I=I+16|0,d=m|0,n$(o,l,u,A,d)|0,I=m,ye=n[d+4>>2]|0,n[d>>2]|0|0}function i$(o){return o=o|0,(o&255)<<24|(o>>8&255)<<16|(o>>16&255)<<8|o>>>24|0}function WYe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,s$[o&1](l|0,u|0,A|0,d|0,m|0)}function YYe(o,l,u){o=o|0,l=l|0,u=y(u),o$[o&1](l|0,y(u))}function VYe(o,l,u){o=o|0,l=l|0,u=+u,a$[o&31](l|0,+u)}function KYe(o,l,u,A){return o=o|0,l=l|0,u=y(u),A=y(A),y(l$[o&0](l|0,y(u),y(A)))}function JYe(o,l){o=o|0,l=l|0,op[o&127](l|0)}function zYe(o,l,u){o=o|0,l=l|0,u=u|0,ap[o&31](l|0,u|0)}function ZYe(o,l){return o=o|0,l=l|0,hd[o&31](l|0)|0}function XYe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,c$[o&1](l|0,+u,+A,d|0)}function $Ye(o,l,u,A){o=o|0,l=l|0,u=+u,A=+A,RVe[o&1](l|0,+u,+A)}function eVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,ex[o&7](l|0,u|0,A|0)|0}function tVe(o,l,u,A){return o=o|0,l=l|0,u=u|0,A=A|0,+FVe[o&1](l|0,u|0,A|0)}function rVe(o,l){return o=o|0,l=l|0,+u$[o&15](l|0)}function nVe(o,l,u){return o=o|0,l=l|0,u=+u,NVe[o&1](l|0,+u)|0}function iVe(o,l,u){return o=o|0,l=l|0,u=u|0,m_[o&15](l|0,u|0)|0}function sVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=+A,d=+d,m=m|0,OVe[o&1](l|0,u|0,+A,+d,m|0)}function oVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,B=B|0,LVe[o&1](l|0,u|0,A|0,d|0,m|0,B|0)}function aVe(o,l,u){return o=o|0,l=l|0,u=u|0,+f$[o&7](l|0,u|0)}function lVe(o){return o=o|0,tx[o&7]()|0}function cVe(o,l,u,A,d,m){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,A$[o&1](l|0,u|0,A|0,d|0,m|0)|0}function uVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=+d,MVe[o&1](l|0,u|0,A|0,+d)}function fVe(o,l,u,A,d,m,B){o=o|0,l=l|0,u=u|0,A=y(A),d=d|0,m=y(m),B=B|0,p$[o&1](l|0,u|0,y(A),d|0,y(m),B|0)}function AVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F2[o&15](l|0,u|0,A|0)}function pVe(o){o=o|0,h$[o&0]()}function hVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,g$[o&15](l|0,u|0,+A)}function gVe(o,l,u){return o=o|0,l=+l,u=+u,_Ve[o&1](+l,+u)|0}function dVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,y_[o&15](l|0,u|0,A|0,d|0)}function mVe(o,l,u,A,d){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(0)}function yVe(o,l){o=o|0,l=y(l),F(1)}function Xa(o,l){o=o|0,l=+l,F(2)}function EVe(o,l,u){return o=o|0,l=y(l),u=y(u),F(3),Xe}function wr(o){o=o|0,F(4)}function T2(o,l){o=o|0,l=l|0,F(5)}function Ll(o){return o=o|0,F(6),0}function IVe(o,l,u,A){o=o|0,l=+l,u=+u,A=A|0,F(7)}function CVe(o,l,u){o=o|0,l=+l,u=+u,F(8)}function wVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(9),0}function BVe(o,l,u){return o=o|0,l=l|0,u=u|0,F(10),0}function pd(o){return o=o|0,F(11),0}function vVe(o,l){return o=o|0,l=+l,F(12),0}function R2(o,l){return o=o|0,l=l|0,F(13),0}function SVe(o,l,u,A,d){o=o|0,l=l|0,u=+u,A=+A,d=d|0,F(14)}function DVe(o,l,u,A,d,m){o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,m=m|0,F(15)}function d_(o,l){return o=o|0,l=l|0,F(16),0}function bVe(){return F(17),0}function PVe(o,l,u,A,d){return o=o|0,l=l|0,u=u|0,A=A|0,d=d|0,F(18),0}function xVe(o,l,u,A){o=o|0,l=l|0,u=u|0,A=+A,F(19)}function kVe(o,l,u,A,d,m){o=o|0,l=l|0,u=y(u),A=A|0,d=y(d),m=m|0,F(20)}function $P(o,l,u){o=o|0,l=l|0,u=u|0,F(21)}function QVe(){F(22)}function $y(o,l,u){o=o|0,l=l|0,u=+u,F(23)}function TVe(o,l){return o=+o,l=+l,F(24),0}function eE(o,l,u,A){o=o|0,l=l|0,u=u|0,A=A|0,F(25)}var s$=[mVe,PGe],o$=[yVe,ky],a$=[Xa,Zg,Oh,h2,g2,d2,m2,Pf,My,y2,xf,Xg,$g,E2,I2,vu,ed,C2,_y,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa],l$=[EVe],op=[wr,Zy,lLe,cLe,uLe,_Ue,UUe,HUe,nqe,iqe,sqe,gGe,dGe,mGe,LWe,MWe,_We,vl,zg,u2,sr,gc,LP,MP,XOe,yLe,kLe,KLe,uMe,bMe,GMe,s_e,I_e,O_e,X_e,hUe,kUe,i4e,I4e,O4e,X4e,h3e,k3e,J3e,u8e,v8e,U8e,vP,mHe,RHe,XHe,dje,Qje,Xje,l6e,f6e,P6e,Q6e,K6e,aqe,uqe,bqe,Wqe,Wz,D5e,n9e,y9e,R9e,tWe,dWe,bWe,kWe,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr,wr],ap=[T2,Ny,zL,f2,A2,xr,ao,Xi,Ls,vs,Ly,Nh,B2,xP,nd,$L,eM,kP,QP,nM,kf,ne,$3e,p8e,Ije,x5e,$qe,xX,T2,T2,T2,T2],hd=[Ll,hYe,Ry,rd,Hy,da,SP,Lh,w2,XL,bP,jy,TP,iM,Wy,q8e,Nje,kqe,R5e,Fl,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll,Ll],c$=[IVe,cM],RVe=[CVe,Z6e],ex=[wVe,qX,gYe,yYe,QMe,l4e,CHe,L9e],FVe=[BVe,rUe],u$=[pd,Mh,PP,tp,uM,v,D,Q,H,V,pd,pd,pd,pd,pd,pd],NVe=[vVe,s6e],m_=[R2,_Ye,RP,rLe,XLe,VMe,l_e,FUe,v4e,P8e,Qy,w9e,R2,R2,R2,R2],OVe=[SVe,FLe],LVe=[DVe,sWe],f$=[d_,tM,Se,Ue,At,yUe,d_,d_],tx=[bVe,Gt,Ty,BP,g6e,N6e,hqe,FWe],A$=[PVe,By],MVe=[xVe,r3e],p$=[kVe,sM],F2=[$P,To,DP,rM,Du,hMe,B_e,y3e,F3e,JL,ZGe,a9e,IWe,$P,$P,$P],h$=[QVe],g$=[$y,ZL,Oy,ep,p2,Su,Uy,td,U4e,LHe,t6e,$y,$y,$y,$y,$y],_Ve=[TVe,tqe],y_=[eE,U_e,Z8e,rje,Gje,C6e,H6e,Cqe,zqe,_5e,WWe,eE,eE,eE,eE,eE];return{_llvm_bswap_i32:i$,dynCall_idd:gVe,dynCall_i:lVe,_i64Subtract:ZP,___udivdi3:h_,dynCall_vif:YYe,setThrew:ua,dynCall_viii:AVe,_bitshift64Lshr:XP,_bitshift64Shl:t$,dynCall_vi:JYe,dynCall_viiddi:sVe,dynCall_diii:tVe,dynCall_iii:iVe,_memset:Xy,_sbrk:Yh,_memcpy:Qr,__GLOBAL__sub_I_Yoga_cpp:a2,dynCall_vii:zYe,___uremdi3:g_,dynCall_vid:VYe,stackAlloc:Ha,_nbind_init:rYe,getTempRet0:UA,dynCall_di:rVe,dynCall_iid:nVe,setTempRet0:_A,_i64Add:p_,dynCall_fiff:KYe,dynCall_iiii:eVe,_emscripten_get_global_libc:pYe,dynCall_viid:hVe,dynCall_viiid:uVe,dynCall_viififi:fVe,dynCall_ii:ZYe,__GLOBAL__sub_I_Binding_cc:y5e,dynCall_viiii:dVe,dynCall_iiiiii:cVe,stackSave:gf,dynCall_viiiii:WYe,__GLOBAL__sub_I_nbind_cc:vr,dynCall_vidd:$Ye,_free:JP,runPostSets:GYe,dynCall_viiiiii:oVe,establishStackSpace:wn,_memmove:Q2,stackRestore:cc,_malloc:KP,__GLOBAL__sub_I_common_cc:Mqe,dynCall_viddi:XYe,dynCall_dii:aVe,dynCall_v:pVe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function s(){for(var p=0;p<3;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];s();for(var n=0;n0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t="",ABORT=!0,EXITSTATUS=1;var e=` +If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Rm=L((rhr,LDe)=>{"use strict";var IPt=NDe(),CPt=ODe(),CW=!1,wW=null;CPt({},function(t,e){if(!CW){if(CW=!0,t)throw t;wW=e}});if(!CW)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");LDe.exports=IPt(wW.bind,wW.lib)});var vW=L((nhr,BW)=>{"use strict";var MDe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);BW.exports=MDe;BW.exports.default=MDe});var UDe=L((ihr,_De)=>{"use strict";_De.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var $S=L((shr,SW)=>{"use strict";var wPt=vk(),BPt=vW(),vPt=UDe(),HDe=t=>{if(typeof t!="string"||t.length===0||(t=wPt(t),t.length===0))return 0;t=t.replace(vPt()," ");let e=0;for(let r=0;r=127&&s<=159||s>=768&&s<=879||(s>65535&&r++,e+=BPt(s)?2:1)}return e};SW.exports=HDe;SW.exports.default=HDe});var bW=L((ohr,DW)=>{"use strict";var SPt=$S(),jDe=t=>{let e=0;for(let r of t.split(` +`))e=Math.max(e,SPt(r));return e};DW.exports=jDe;DW.exports.default=jDe});var qDe=L(eD=>{"use strict";var DPt=eD&&eD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eD,"__esModule",{value:!0});var bPt=DPt(bW()),PW={};eD.default=t=>{if(t.length===0)return{width:0,height:0};if(PW[t])return PW[t];let e=bPt.default(t),r=t.split(` +`).length;return PW[t]={width:e,height:r},{width:e,height:r}}});var GDe=L(tD=>{"use strict";var PPt=tD&&tD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tD,"__esModule",{value:!0});var bn=PPt(Rm()),xPt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},kPt=(t,e)=>{"marginLeft"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},QPt=(t,e)=>{"paddingLeft"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},TPt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},RPt=(t,e)=>{var r,s;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},FPt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},NPt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};tD.default=(t,e={})=>{xPt(t,e),kPt(t,e),QPt(t,e),TPt(t,e),RPt(t,e),FPt(t,e),NPt(t,e)}});var VDe=L((chr,YDe)=>{"use strict";var rD=$S(),OPt=vk(),LPt=pk(),kW=new Set(["\x1B","\x9B"]),MPt=39,WDe=t=>`${kW.values().next().value}[${t}m`,_Pt=t=>t.split(" ").map(e=>rD(e)),xW=(t,e,r)=>{let s=[...e],a=!1,n=rD(OPt(t[t.length-1]));for(let[c,f]of s.entries()){let p=rD(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),kW.has(f))a=!0;else if(a&&f==="m"){a=!1;continue}a||(n+=p,n===r&&c0&&t.length>1&&(t[t.length-2]+=t.pop())},UPt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(rD(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},HPt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let s="",a="",n,c=_Pt(t),f=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=rD(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(""),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=" ",E++)),r.hard&&c[p]>e){let C=e-E,S=1+Math.floor((c[p]-C-1)/e);Math.floor((c[p]-1)/e)e&&E>0&&c[p]>0){if(r.wordWrap===!1&&Ee&&r.wordWrap===!1){xW(f,h,e);continue}f[f.length-1]+=h}r.trim!==!1&&(f=f.map(UPt)),s=f.join(` +`);for(let[p,h]of[...s].entries()){if(a+=h,kW.has(h)){let C=parseFloat(/\d[^m]*/.exec(s.slice(p,p+4)));n=C===MPt?null:C}let E=LPt.codes.get(Number(n));n&&E&&(s[p+1]===` +`?a+=WDe(E):h===` +`&&(a+=WDe(n)))}return a};YDe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,` +`).split(` +`).map(s=>HPt(s,e,r)).join(` +`)});var zDe=L((uhr,JDe)=>{"use strict";var KDe="[\uD800-\uDBFF][\uDC00-\uDFFF]",jPt=t=>t&&t.exact?new RegExp(`^${KDe}$`):new RegExp(KDe,"g");JDe.exports=jPt});var QW=L((fhr,ebe)=>{"use strict";var qPt=vW(),GPt=zDe(),ZDe=pk(),$De=["\x1B","\x9B"],OF=t=>`${$De[0]}[${t}m`,XDe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let c=ZDe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(OF(e?c:n))}else if(e){s.push(OF(0));break}else s.push(OF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=OF(ZDe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join("")};ebe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r=="number"?r:s.length;let n=!1,c,f=0,p="";for(let[h,E]of s.entries()){let C=!1;if($De.includes(E)){let S=/\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,fe&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=XDe(a);else if(f>=r){p+=XDe(a,!0,c);break}}return p}});var rbe=L((Ahr,tbe)=>{"use strict";var X0=QW(),WPt=$S();function LF(t,e,r){if(t.charAt(e)===" ")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===" ")return e+s}else if(t.charAt(e-s)===" ")return e-s;return e}tbe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c="\u2026",f=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return c;let p=WPt(t);if(p<=e)return t;if(s==="start"){if(n){let h=LF(t,p-e+1,!0);return c+X0(t,h,p).trim()}return a===!0&&(c+=" ",f=2),c+X0(t,p-e+f,p)}if(s==="middle"){a===!0&&(c=" "+c+" ",f=3);let h=Math.floor(e/2);if(n){let E=LF(t,h),C=LF(t,p-(e-h)+1,!0);return X0(t,0,E)+c+X0(t,C,p).trim()}return X0(t,0,h)+c+X0(t,p-(e-h)+f,p)}if(s==="end"){if(n){let h=LF(t,e-1);return X0(t,0,h)+c}return a===!0&&(c=" "+c,f=2),X0(t,0,e-f)+c}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var RW=L(nD=>{"use strict";var nbe=nD&&nD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nD,"__esModule",{value:!0});var YPt=nbe(VDe()),VPt=nbe(rbe()),TW={};nD.default=(t,e,r)=>{let s=t+String(e)+String(r);if(TW[s])return TW[s];let a=t;if(r==="wrap"&&(a=YPt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=VPt.default(t,e,{position:n})}return TW[s]=a,a}});var NW=L(FW=>{"use strict";Object.defineProperty(FW,"__esModule",{value:!0});var ibe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=ibe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),e+=s}return e};FW.default=ibe});var OW=L(xi=>{"use strict";var iD=xi&&xi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xi,"__esModule",{value:!0});xi.setTextNodeValue=xi.createTextNode=xi.setStyle=xi.setAttribute=xi.removeChildNode=xi.insertBeforeNode=xi.appendChildNode=xi.createNode=xi.TEXT_NAME=void 0;var KPt=iD(Rm()),sbe=iD(qDe()),JPt=iD(GDe()),zPt=iD(RW()),ZPt=iD(NW());xi.TEXT_NAME="#text";xi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:KPt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(XPt.bind(null,r))),r};xi.appendChildNode=(t,e)=>{var r;e.parentNode&&xi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&xi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&MF(t)};xi.setAttribute=(t,e,r)=>{t.attributes[e]=r};xi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&JPt.default(t.yogaNode,e)};xi.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return xi.setTextNodeValue(e,t),e};var XPt=function(t,e){var r,s;let a=t.nodeName==="#text"?t.nodeValue:ZPt.default(t),n=sbe.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let c=(s=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&s!==void 0?s:"wrap",f=zPt.default(a,e,c);return sbe.default(f)},obe=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:obe(t.parentNode)},MF=t=>{let e=obe(t);e?.markDirty()};xi.setTextNodeValue=(t,e)=>{typeof e!="string"&&(e=String(e)),t.nodeValue=e,MF(t)}});var fbe=L(sD=>{"use strict";var ube=sD&&sD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sD,"__esModule",{value:!0});var abe=yW(),$Pt=ube(xDe()),lbe=ube(Rm()),ta=OW(),cbe=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};sD.default=$Pt.default({schedulePassiveEffects:abe.unstable_scheduleCallback,cancelPassiveEffects:abe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,shouldDeprioritizeSubtree:()=>!1,resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender=="function"&&t.onImmediateRender();return}typeof t.onRender=="function"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,s=e==="ink-text"||e==="ink-virtual-text";return r===s?t:{isInsideText:s}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,s)=>{if(s.isInsideText&&t==="ink-box")throw new Error(" can\u2019t be nested inside component");let a=t==="ink-text"&&s.isInsideText?"ink-virtual-text":t,n=ta.createNode(a);for(let[c,f]of Object.entries(e))c!=="children"&&(c==="style"?ta.setStyle(n,f):c==="internal_transform"?n.internal_transform=f:c==="internal_static"?n.internal_static=!0:ta.setAttribute(n,c,f));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string "${t}" must be rendered inside component`);return ta.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{ta.setTextNodeValue(t,"")},unhideTextInstance:(t,e)=>{ta.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(lbe.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(lbe.default.DISPLAY_FLEX)},appendInitialChild:ta.appendChildNode,appendChild:ta.appendChildNode,insertBefore:ta.insertBeforeNode,finalizeInitialChildren:(t,e,r,s)=>(t.internal_static&&(s.isStaticDirty=!0,s.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:ta.appendChildNode,insertInContainerBefore:ta.insertBeforeNode,removeChildFromContainer:(t,e)=>{ta.removeChildNode(t,e),cbe(e.yogaNode)},prepareUpdate:(t,e,r,s,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},c=Object.keys(s);for(let f of c)if(s[f]!==r[f]){if(f==="style"&&typeof s.style=="object"&&typeof r.style=="object"){let h=s.style,E=r.style,C=Object.keys(h);for(let S of C){if(S==="borderStyle"||S==="borderColor"){if(typeof n.style!="object"){let P={};n.style=P}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[S]!==E[S]){if(typeof n.style!="object"){let P={};n.style=P}n.style[S]=h[S]}}continue}n[f]=s[f]}return n},commitUpdate:(t,e)=>{for(let[r,s]of Object.entries(e))r!=="children"&&(r==="style"?ta.setStyle(t,s):r==="internal_transform"?t.internal_transform=s:r==="internal_static"?t.internal_static=!0:ta.setAttribute(t,r,s))},commitTextUpdate:(t,e,r)=>{ta.setTextNodeValue(t,r)},removeChild:(t,e)=>{ta.removeChildNode(t,e),cbe(e.yogaNode)}})});var pbe=L((mhr,Abe)=>{"use strict";Abe.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let s=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(s,r.indent.repeat(e))}});var hbe=L(oD=>{"use strict";var ext=oD&&oD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oD,"__esModule",{value:!0});var _F=ext(Rm());oD.default=t=>t.getComputedWidth()-t.getComputedPadding(_F.default.EDGE_LEFT)-t.getComputedPadding(_F.default.EDGE_RIGHT)-t.getComputedBorder(_F.default.EDGE_LEFT)-t.getComputedBorder(_F.default.EDGE_RIGHT)});var gbe=L((Ehr,txt)=>{txt.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var mbe=L((Ihr,LW)=>{"use strict";var dbe=gbe();LW.exports=dbe;LW.exports.default=dbe});var MW=L(lD=>{"use strict";var rxt=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,"__esModule",{value:!0});var aD=rxt(kE()),nxt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,ixt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,UF=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);lD.default=(t,e,r)=>{if(!e)return t;if(e in aD.default){let a=UF(e,r);return aD.default[a](t)}if(e.startsWith("#")){let a=UF("hex",r);return aD.default[a](e)(t)}if(e.startsWith("ansi")){let a=ixt.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]);return aD.default[n](c)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=nxt.exec(e);if(!a)return t;let n=UF(a[1],r),c=Number(a[2]),f=Number(a[3]),p=Number(a[4]);return aD.default[n](c,f,p)(t)}return t}});var Ebe=L(cD=>{"use strict";var ybe=cD&&cD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cD,"__esModule",{value:!0});var sxt=ybe(mbe()),_W=ybe(MW());cD.default=(t,e,r,s)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),c=r.style.borderColor,f=sxt.default[r.style.borderStyle],p=_W.default(f.topLeft+f.horizontal.repeat(a-2)+f.topRight,c,"foreground"),h=(_W.default(f.vertical,c,"foreground")+` +`).repeat(n-2),E=_W.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,"foreground");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var Cbe=L(uD=>{"use strict";var Fm=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,"__esModule",{value:!0});var oxt=Fm(Rm()),axt=Fm(bW()),lxt=Fm(pbe()),cxt=Fm(RW()),uxt=Fm(hbe()),fxt=Fm(NW()),Axt=Fm(Ebe()),pxt=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=` +`.repeat(n)+lxt.default(e,a)}return e},Ibe=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===oxt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),C=c;if(typeof t.internal_transform=="function"&&(C=[t.internal_transform,...c]),t.nodeName==="ink-text"){let S=fxt.default(t);if(S.length>0){let P=axt.default(S),I=uxt.default(p);if(P>I){let R=(s=t.style.textWrap)!==null&&s!==void 0?s:"wrap";S=cxt.default(S,I,R)}S=pxt(t,S),e.write(h,E,S,{transformers:C})}return}if(t.nodeName==="ink-box"&&Axt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let S of t.childNodes)Ibe(S,e,{offsetX:h,offsetY:E,transformers:C,skipStaticElements:f})}};uD.default=Ibe});var vbe=L(fD=>{"use strict";var Bbe=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,"__esModule",{value:!0});var wbe=Bbe(QW()),hxt=Bbe($S()),UW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;ss.trimRight()).join(` +`),height:e.length}}};fD.default=UW});var bbe=L(AD=>{"use strict";var HW=AD&&AD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AD,"__esModule",{value:!0});var gxt=HW(Rm()),Sbe=HW(Cbe()),Dbe=HW(vbe());AD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,gxt.default.DIRECTION_LTR);let s=new Dbe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});Sbe.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new Dbe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),Sbe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output} +`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var Qbe=L((Dhr,kbe)=>{"use strict";var Pbe=Ie("stream"),xbe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],jW={},dxt=t=>{let e=new Pbe.PassThrough,r=new Pbe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let s=new console.Console(e,r);for(let a of xbe)jW[a]=console[a],console[a]=s[a];return()=>{for(let a of xbe)console[a]=jW[a];jW={}}};kbe.exports=dxt});var GW=L(qW=>{"use strict";Object.defineProperty(qW,"__esModule",{value:!0});qW.default=new WeakMap});var YW=L(WW=>{"use strict";Object.defineProperty(WW,"__esModule",{value:!0});var mxt=hn(),Tbe=mxt.createContext({exit:()=>{}});Tbe.displayName="InternalAppContext";WW.default=Tbe});var KW=L(VW=>{"use strict";Object.defineProperty(VW,"__esModule",{value:!0});var yxt=hn(),Rbe=yxt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});Rbe.displayName="InternalStdinContext";VW.default=Rbe});var zW=L(JW=>{"use strict";Object.defineProperty(JW,"__esModule",{value:!0});var Ext=hn(),Fbe=Ext.createContext({stdout:void 0,write:()=>{}});Fbe.displayName="InternalStdoutContext";JW.default=Fbe});var XW=L(ZW=>{"use strict";Object.defineProperty(ZW,"__esModule",{value:!0});var Ixt=hn(),Nbe=Ixt.createContext({stderr:void 0,write:()=>{}});Nbe.displayName="InternalStderrContext";ZW.default=Nbe});var HF=L($W=>{"use strict";Object.defineProperty($W,"__esModule",{value:!0});var Cxt=hn(),Obe=Cxt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});Obe.displayName="InternalFocusContext";$W.default=Obe});var Mbe=L((Rhr,Lbe)=>{"use strict";var wxt=/[|\\{}()[\]^$+*?.-]/g;Lbe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(wxt,"\\$&")}});var jbe=L((Fhr,Hbe)=>{"use strict";var Bxt=Mbe(),vxt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Ube=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));Ube.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var eY=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=vxt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Sxt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...Ube]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(` +`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\/g,"/"),this._internals.some(p=>p.test(c)))return;let f=/^\s*at /.test(c);s?c=c.trimEnd().replace(/^(\s+)at /,"$1"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,""),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c} +`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};_be(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(Dxt);if(!r)return null;let s=r[1]==="new",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],C=r[9],S=r[10]==="native",P=r[11]===")",I,R={};if(E&&(R.line=Number(E)),C&&(R.column=Number(C)),P&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(bxt);N&&(a=N[1],I=N[2])}return _be(R,h,this._cwd),s&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=f,R.evalColumn=p,R.evalFile=c&&c.replace(/\\/g,"/")),S&&(R.native=!0),a&&(R.function=a),I&&a!==I&&(R.method=I),R}};function _be(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function Sxt(t){if(t.length===0)return[];let e=t.map(r=>Bxt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Dxt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),bxt=/^(.*?) \[as (.*?)\]$/;Hbe.exports=eY});var Gbe=L((Nhr,qbe)=>{"use strict";qbe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var Ybe=L((Ohr,Wbe)=>{"use strict";var Pxt=Gbe(),xxt=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};Wbe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=Pxt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},xxt(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var jF=L(nf=>{"use strict";var kxt=nf&&nf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Qxt=nf&&nf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Txt=nf&&nf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&kxt(e,t,r);return Qxt(e,t),e},Rxt=nf&&nf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(t);a{var{children:r}=t,s=Rxt(t,["children"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return Vbe.default.createElement("ink-box",{ref:e,style:a},r)});tY.displayName="Box";tY.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};nf.default=tY});var iY=L(pD=>{"use strict";var rY=pD&&pD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pD,"__esModule",{value:!0});var Fxt=rY(hn()),yw=rY(kE()),Kbe=rY(MW()),nY=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=C=>(r&&(C=yw.default.dim(C)),t&&(C=Kbe.default(C,t,"foreground")),e&&(C=Kbe.default(C,e,"background")),s&&(C=yw.default.bold(C)),a&&(C=yw.default.italic(C)),n&&(C=yw.default.underline(C)),c&&(C=yw.default.strikethrough(C)),f&&(C=yw.default.inverse(C)),C);return Fxt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:p},internal_transform:E},h)};nY.displayName="Text";nY.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};pD.default=nY});var Xbe=L(sf=>{"use strict";var Nxt=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Oxt=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lxt=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Nxt(e,t,r);return Oxt(e,t),e},hD=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,"__esModule",{value:!0});var Jbe=Lxt(Ie("fs")),Rs=hD(hn()),zbe=hD(jbe()),Mxt=hD(Ybe()),th=hD(jF()),hA=hD(iY()),Zbe=new zbe.default({cwd:process.cwd(),internals:zbe.default.nodeInternals()}),_xt=({error:t})=>{let e=t.stack?t.stack.split(` +`).slice(1):void 0,r=e?Zbe.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&Jbe.existsSync(r.file)){let n=Jbe.readFileSync(r.file,"utf8");if(s=Mxt.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Rs.default.createElement(th.default,{flexDirection:"column",padding:1},Rs.default.createElement(th.default,null,Rs.default.createElement(hA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Rs.default.createElement(hA.default,null," ",t.message)),r&&Rs.default.createElement(th.default,{marginTop:1},Rs.default.createElement(hA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Rs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:c})=>Rs.default.createElement(th.default,{key:n},Rs.default.createElement(th.default,{width:a+1},Rs.default.createElement(hA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),Rs.default.createElement(hA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+c)))),t.stack&&Rs.default.createElement(th.default,{marginTop:1,flexDirection:"column"},t.stack.split(` +`).slice(1).map(n=>{let c=Zbe.parseLine(n);return c?Rs.default.createElement(th.default,{key:n},Rs.default.createElement(hA.default,{dimColor:!0},"- "),Rs.default.createElement(hA.default,{dimColor:!0,bold:!0},c.function),Rs.default.createElement(hA.default,{dimColor:!0,color:"gray"}," ","(",c.file,":",c.line,":",c.column,")")):Rs.default.createElement(th.default,{key:n},Rs.default.createElement(hA.default,{dimColor:!0},"- "),Rs.default.createElement(hA.default,{dimColor:!0,bold:!0},n))})))};sf.default=_xt});var ePe=L(of=>{"use strict";var Uxt=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Hxt=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jxt=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Uxt(e,t,r);return Hxt(e,t),e},Om=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});var Nm=jxt(hn()),$be=Om(oW()),qxt=Om(YW()),Gxt=Om(KW()),Wxt=Om(zW()),Yxt=Om(XW()),Vxt=Om(HF()),Kxt=Om(Xbe()),Jxt=" ",zxt="\x1B[Z",Zxt="\x1B",qF=class extends Nm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. +Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. +Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===Zxt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===Jxt&&this.focusNext(),e===zxt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Nm.default.createElement(qxt.default.Provider,{value:{exit:this.handleExit}},Nm.default.createElement(Gxt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Nm.default.createElement(Wxt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Nm.default.createElement(Yxt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Nm.default.createElement(Vxt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Nm.default.createElement(Kxt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){$be.default.hide(this.props.stdout)}componentWillUnmount(){$be.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};of.default=qF;qF.displayName="InternalApp"});var nPe=L(af=>{"use strict";var Xxt=af&&af.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),$xt=af&&af.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ekt=af&&af.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Xxt(e,t,r);return $xt(e,t),e},lf=af&&af.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(af,"__esModule",{value:!0});var tkt=lf(hn()),tPe=V8(),rkt=lf(fDe()),nkt=lf(tW()),ikt=lf(mDe()),skt=lf(EDe()),sY=lf(fbe()),okt=lf(bbe()),akt=lf(sW()),lkt=lf(Qbe()),ckt=ekt(OW()),ukt=lf(GW()),fkt=lf(ePe()),Ew=process.env.CI==="false"?!1:ikt.default,rPe=()=>{},oY=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=okt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==` +`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(Ew){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(nkt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},skt.default(this),this.options=e,this.rootNode=ckt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:tPe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=rkt.default.create(e.stdout),this.throttledLog=e.debug?this.log:tPe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=sY.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=akt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),Ew||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=tkt.default.createElement(fkt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);sY.default.updateContainer(r,this.container,null,rPe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Ew){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Ew?this.options.stdout.write(this.lastOutput+` +`):this.options.debug||this.log.done(),this.isUnmounted=!0,sY.default.updateContainer(null,this.container,null,rPe),ukt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!Ew&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=lkt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};af.default=oY});var sPe=L(gD=>{"use strict";var iPe=gD&&gD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gD,"__esModule",{value:!0});var Akt=iPe(nPe()),GF=iPe(GW()),pkt=Ie("stream"),hkt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},gkt(e)),s=dkt(r.stdout,()=>new Akt.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>GF.default.delete(r.stdout),clear:s.clear}};gD.default=hkt;var gkt=(t={})=>t instanceof pkt.Stream?{stdout:t,stdin:process.stdin}:t,dkt=(t,e)=>{let r;return GF.default.has(t)?r=GF.default.get(t):(r=e(),GF.default.set(t,r)),r}});var aPe=L(rh=>{"use strict";var mkt=rh&&rh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ykt=rh&&rh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ekt=rh&&rh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&mkt(e,t,r);return ykt(e,t),e};Object.defineProperty(rh,"__esModule",{value:!0});var dD=Ekt(hn()),oPe=t=>{let{items:e,children:r,style:s}=t,[a,n]=dD.useState(0),c=dD.useMemo(()=>e.slice(a),[e,a]);dD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=dD.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return dD.default.createElement("ink-box",{internal_static:!0,style:p},f)};oPe.displayName="Static";rh.default=oPe});var cPe=L(mD=>{"use strict";var Ikt=mD&&mD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mD,"__esModule",{value:!0});var Ckt=Ikt(hn()),lPe=({children:t,transform:e})=>t==null?null:Ckt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);lPe.displayName="Transform";mD.default=lPe});var fPe=L(yD=>{"use strict";var wkt=yD&&yD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yD,"__esModule",{value:!0});var Bkt=wkt(hn()),uPe=({count:t=1})=>Bkt.default.createElement("ink-text",null,` +`.repeat(t));uPe.displayName="Newline";yD.default=uPe});var hPe=L(ED=>{"use strict";var APe=ED&&ED.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ED,"__esModule",{value:!0});var vkt=APe(hn()),Skt=APe(jF()),pPe=()=>vkt.default.createElement(Skt.default,{flexGrow:1});pPe.displayName="Spacer";ED.default=pPe});var WF=L(ID=>{"use strict";var Dkt=ID&&ID.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ID,"__esModule",{value:!0});var bkt=hn(),Pkt=Dkt(KW()),xkt=()=>bkt.useContext(Pkt.default);ID.default=xkt});var dPe=L(CD=>{"use strict";var kkt=CD&&CD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CD,"__esModule",{value:!0});var gPe=hn(),Qkt=kkt(WF()),Tkt=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=Qkt.default();gPe.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),gPe.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f==="\x1B[A",downArrow:f==="\x1B[B",leftArrow:f==="\x1B[D",rightArrow:f==="\x1B[C",pageDown:f==="\x1B[6~",pageUp:f==="\x1B[5~",return:f==="\r",escape:f==="\x1B",ctrl:!1,shift:!1,tab:f===" "||f==="\x1B[Z",backspace:f==="\b",delete:f==="\x7F"||f==="\x1B[3~",meta:!1};f<=""&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith("\x1B")&&(f=f.slice(1),p.meta=!0);let h=f>="A"&&f<="Z",E=f>="\u0410"&&f<="\u042F";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=""),(!(f==="c"&&p.ctrl)||!a)&&t(f,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};CD.default=Tkt});var mPe=L(wD=>{"use strict";var Rkt=wD&&wD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wD,"__esModule",{value:!0});var Fkt=hn(),Nkt=Rkt(YW()),Okt=()=>Fkt.useContext(Nkt.default);wD.default=Okt});var yPe=L(BD=>{"use strict";var Lkt=BD&&BD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(BD,"__esModule",{value:!0});var Mkt=hn(),_kt=Lkt(zW()),Ukt=()=>Mkt.useContext(_kt.default);BD.default=Ukt});var EPe=L(vD=>{"use strict";var Hkt=vD&&vD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vD,"__esModule",{value:!0});var jkt=hn(),qkt=Hkt(XW()),Gkt=()=>jkt.useContext(qkt.default);vD.default=Gkt});var CPe=L(DD=>{"use strict";var IPe=DD&&DD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DD,"__esModule",{value:!0});var SD=hn(),Wkt=IPe(HF()),Ykt=IPe(WF()),Vkt=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=Ykt.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=SD.useContext(Wkt.default),C=SD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return SD.useEffect(()=>(c(C,{autoFocus:e}),()=>{f(C)}),[C,e]),SD.useEffect(()=>{t?p(C):h(C)},[t,C]),SD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!C&&n===C,focus:E}};DD.default=Vkt});var wPe=L(bD=>{"use strict";var Kkt=bD&&bD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bD,"__esModule",{value:!0});var Jkt=hn(),zkt=Kkt(HF()),Zkt=()=>{let t=Jkt.useContext(zkt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};bD.default=Zkt});var BPe=L(aY=>{"use strict";Object.defineProperty(aY,"__esModule",{value:!0});aY.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Vc=L(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var Xkt=sPe();Object.defineProperty(Eo,"render",{enumerable:!0,get:function(){return Xkt.default}});var $kt=jF();Object.defineProperty(Eo,"Box",{enumerable:!0,get:function(){return $kt.default}});var eQt=iY();Object.defineProperty(Eo,"Text",{enumerable:!0,get:function(){return eQt.default}});var tQt=aPe();Object.defineProperty(Eo,"Static",{enumerable:!0,get:function(){return tQt.default}});var rQt=cPe();Object.defineProperty(Eo,"Transform",{enumerable:!0,get:function(){return rQt.default}});var nQt=fPe();Object.defineProperty(Eo,"Newline",{enumerable:!0,get:function(){return nQt.default}});var iQt=hPe();Object.defineProperty(Eo,"Spacer",{enumerable:!0,get:function(){return iQt.default}});var sQt=dPe();Object.defineProperty(Eo,"useInput",{enumerable:!0,get:function(){return sQt.default}});var oQt=mPe();Object.defineProperty(Eo,"useApp",{enumerable:!0,get:function(){return oQt.default}});var aQt=WF();Object.defineProperty(Eo,"useStdin",{enumerable:!0,get:function(){return aQt.default}});var lQt=yPe();Object.defineProperty(Eo,"useStdout",{enumerable:!0,get:function(){return lQt.default}});var cQt=EPe();Object.defineProperty(Eo,"useStderr",{enumerable:!0,get:function(){return cQt.default}});var uQt=CPe();Object.defineProperty(Eo,"useFocus",{enumerable:!0,get:function(){return uQt.default}});var fQt=wPe();Object.defineProperty(Eo,"useFocusManager",{enumerable:!0,get:function(){return fQt.default}});var AQt=BPe();Object.defineProperty(Eo,"measureElement",{enumerable:!0,get:function(){return AQt.default}})});var cY={};Vt(cY,{Gem:()=>lY});var vPe,Lm,lY,YF=Ct(()=>{vPe=et(Vc()),Lm=et(hn()),lY=(0,Lm.memo)(({active:t})=>{let e=(0,Lm.useMemo)(()=>t?"\u25C9":"\u25EF",[t]),r=(0,Lm.useMemo)(()=>t?"green":"yellow",[t]);return Lm.default.createElement(vPe.Text,{color:r},e)})});var DPe={};Vt(DPe,{useKeypress:()=>Mm});function Mm({active:t},e,r){let{stdin:s}=(0,SPe.useStdin)(),a=(0,VF.useCallback)((n,c)=>e(n,c),r);(0,VF.useEffect)(()=>{if(!(!t||!s))return s.on("keypress",a),()=>{s.off("keypress",a)}},[t,a,s])}var SPe,VF,PD=Ct(()=>{SPe=et(Vc()),VF=et(hn())});var PPe={};Vt(PPe,{FocusRequest:()=>bPe,useFocusRequest:()=>uY});var bPe,uY,fY=Ct(()=>{PD();bPe=(r=>(r.BEFORE="before",r.AFTER="after",r))(bPe||{}),uY=function({active:t},e,r){Mm({active:t},(s,a)=>{a.name==="tab"&&(a.shift?e("before"):e("after"))},r)}});var xPe={};Vt(xPe,{useListInput:()=>xD});var xD,KF=Ct(()=>{PD();xD=function(t,e,{active:r,minus:s,plus:a,set:n,loop:c=!0}){Mm({active:r},(f,p)=>{let h=e.indexOf(t);switch(p.name){case s:{let E=h-1;if(c){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(c){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,c])}});var JF={};Vt(JF,{ScrollableItems:()=>pQt});var $0,ml,pQt,zF=Ct(()=>{$0=et(Vc()),ml=et(hn());fY();KF();pQt=({active:t=!0,children:e=[],radius:r=10,size:s=1,loop:a=!0,onFocusRequest:n,willReachEnd:c})=>{let f=N=>{if(N.key===null)throw new Error("Expected all children to have a key");return N.key},p=ml.default.Children.map(e,N=>f(N)),h=p[0],[E,C]=(0,ml.useState)(h),S=p.indexOf(E);(0,ml.useEffect)(()=>{p.includes(E)||C(h)},[e]),(0,ml.useEffect)(()=>{c&&S>=p.length-2&&c()},[S]),uY({active:t&&!!n},N=>{n?.(N)},[n]),xD(E,p,{active:t,minus:"up",plus:"down",set:C,loop:a});let P=S-r,I=S+r;I>p.length&&(P-=I-p.length,I=p.length),P<0&&(I+=-P,P=0),I>=p.length&&(I=p.length-1);let R=[];for(let N=P;N<=I;++N){let U=p[N],W=t&&U===E;R.push(ml.default.createElement($0.Box,{key:U,height:s},ml.default.createElement($0.Box,{marginLeft:1,marginRight:1},ml.default.createElement($0.Text,null,W?ml.default.createElement($0.Text,{color:"cyan",bold:!0},">"):" ")),ml.default.createElement($0.Box,null,ml.default.cloneElement(e[N],{active:W}))))}return ml.default.createElement($0.Box,{flexDirection:"column",width:"100%"},R)}});var kPe,nh,QPe,AY,TPe,pY=Ct(()=>{kPe=et(Vc()),nh=et(hn()),QPe=Ie("readline"),AY=nh.default.createContext(null),TPe=({children:t})=>{let{stdin:e,setRawMode:r}=(0,kPe.useStdin)();(0,nh.useEffect)(()=>{r&&r(!0),e&&(0,QPe.emitKeypressEvents)(e)},[e,r]);let[s,a]=(0,nh.useState)(new Map),n=(0,nh.useMemo)(()=>({getAll:()=>s,get:c=>s.get(c),set:(c,f)=>a(new Map([...s,[c,f]]))}),[s,a]);return nh.default.createElement(AY.Provider,{value:n,children:t})}});var hY={};Vt(hY,{useMinistore:()=>hQt});function hQt(t,e){let r=(0,ZF.useContext)(AY);if(r===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof t>"u")return r.getAll();let s=(0,ZF.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>"u"&&(a=e),[a,s]}var ZF,gY=Ct(()=>{ZF=et(hn());pY()});var $F={};Vt($F,{renderForm:()=>gQt});async function gQt(t,e,{stdin:r,stdout:s,stderr:a}){let n,c=p=>{let{exit:h}=(0,XF.useApp)();Mm({active:!0},(E,C)=>{C.name==="return"&&(n=p,h())},[h,p])},{waitUntilExit:f}=(0,XF.render)(dY.default.createElement(TPe,null,dY.default.createElement(t,{...e,useSubmit:c})),{stdin:r,stdout:s,stderr:a});return await f(),n}var XF,dY,eN=Ct(()=>{XF=et(Vc()),dY=et(hn());pY();PD()});var OPe=L(kD=>{"use strict";Object.defineProperty(kD,"__esModule",{value:!0});kD.UncontrolledTextInput=void 0;var FPe=hn(),mY=hn(),RPe=Vc(),_m=kE(),NPe=({value:t,placeholder:e="",focus:r=!0,mask:s,highlightPastedText:a=!1,showCursor:n=!0,onChange:c,onSubmit:f})=>{let[{cursorOffset:p,cursorWidth:h},E]=mY.useState({cursorOffset:(t||"").length,cursorWidth:0});mY.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||"";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let C=a?h:0,S=s?s.repeat(t.length):t,P=S,I=e?_m.grey(e):void 0;if(n&&r){I=e.length>0?_m.inverse(e[0])+_m.grey(e.slice(1)):_m.inverse(" "),P=S.length>0?"":_m.inverse(" ");let R=0;for(let N of S)R>=p-C&&R<=p?P+=_m.inverse(N):P+=N,R++;S.length>0&&p===S.length&&(P+=_m.inverse(" "))}return RPe.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R==="c"||N.tab||N.shift&&N.tab)return;if(N.return){f&&f(t);return}let U=p,W=t,te=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(W=t.slice(0,p-1)+t.slice(p,t.length),U--):(W=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(te=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:te}),W!==t&&c(W)},{isActive:r}),FPe.createElement(RPe.Text,null,e?S.length>0?P:I:P)};kD.default=NPe;kD.UncontrolledTextInput=({initialValue:t="",...e})=>{let[r,s]=mY.useState(t);return FPe.createElement(NPe,Object.assign({},e,{value:r,onChange:s}))}});var _Pe={};Vt(_Pe,{Pad:()=>yY});var LPe,MPe,yY,EY=Ct(()=>{LPe=et(Vc()),MPe=et(hn()),yY=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${"-".repeat(t-1)}`:" ";return MPe.default.createElement(LPe.Text,{dimColor:!e},r)}});var UPe={};Vt(UPe,{ItemOptions:()=>dQt});var TD,eg,dQt,HPe=Ct(()=>{TD=et(Vc()),eg=et(hn());KF();YF();EY();dQt=function({active:t,skewer:e,options:r,value:s,onChange:a,sizes:n=[]}){let c=r.filter(({label:p})=>!!p).map(({value:p})=>p),f=r.findIndex(p=>p.value===s&&p.label!="");return xD(s,c,{active:t,minus:"left",plus:"right",set:a}),eg.default.createElement(eg.default.Fragment,null,r.map(({label:p},h)=>{let E=h===f,C=n[h]-1||0,S=p.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),P=Math.max(0,C-S.length-2);return p?eg.default.createElement(TD.Box,{key:p,width:C,marginLeft:1},eg.default.createElement(TD.Text,{wrap:"truncate"},eg.default.createElement(lY,{active:E})," ",p),e?eg.default.createElement(yY,{active:t,length:P}):null):eg.default.createElement(TD.Box,{key:`spacer-${h}`,width:C,marginLeft:1})}))}});var rxe=L((Ugr,txe)=>{var kY;txe.exports=()=>(typeof kY>"u"&&(kY=Ie("zlib").brotliDecompressSync(Buffer.from("Wx6iVsM8y37oTpDqz9ttuZc9II7bU8Dm0eSoiEX5X+cI6oZJXQfiuc4xndBuXaAQQxqqqnlJZYxtR/YfQKWsqrIlDzhSaK0b0Sl4sGIivE3xwFR3yFnY7YHRO/xw5NmsXhLGMmIJnQ7RQOSgLL9ts5fdaYhcxoWHF7dahKcbL7xdpZna+sOZHQ3C9aU56oudzh85R5BU6q3+VceftEQSBD0HUBi3vlcAQxQJJXS6NubAera9xHt4WLyEj/DTf2xqnfHl9KwwY4nyvz1tK1taQwTRw0R2J01oLV0sv0ZNGpLrcMPW3wSK8dBkiX/hvpvN7J/Pa/EVRKpkyjCk+Hp9OUWGhcRbQBPgmnfO//bO/uubdIUpwz5xJof7RDxrN6HZUguxathf+nrP5eR02lnTdac+CEfPIPEQONnqWLfllz+tvn61uxegTmZDxpeYFBgfTArYbsME6aHr7jHYVfjZ8hXR0aFbef0186b7kBPUWMxO69JY0mkI2VZfSVctgoJx8qX7Vqpmr6ainSnTsfwYuhhPxJq81wGrwRFj82d0+nuz//58jdJ7jNXB6aX3NFIRgdBmnyiQq1SEbAqzxF0WECarcjoIWVuN5tNi+TBQMBscGC0P+rXm1/E6v5mwHsFaHk5AMy03wxY/9YTk6vvpdFwTbscrqwR29Td96Z4dLDi+AISU7/zj4f0CpCXvONrV2ktiQAFDzA0MiOJC2rpUgP/oXOPggHqNG99PQvnC4QcJwmaNBeV61L+1145XwNApR0mrG2akK1l51Fu/En0kzKoo+mGx+cdDD6bo99vjm8kkG2DBbIhIb0jrbIiIatsl+vGNreNhD1LZrh3ffAYcFOqBVHQzXD7kbpi4+6WB7eZoCBPwA+xHP5r/9Pmxu3uJmjzzeaq6uikG0AJ7lPmbMNeCoI43TILGjxpq/fGw+3+wrezIx/eqq6EQYDcKSuSbLE+qiTLBMkqQBh6xdP3x8NsAW49PsiYR3Ww/UmXh7clfY8DSTev96F0FZpBgFDz//6nqDwdJfunT/Q5B4UIVqrZnNmVfyF5k0rny/f/v/dSqqtqBoFwbYybT9hQAqr0dDHvN45979t3Ct2I4SAgArAKNVpKSciUpprH3mPu+DSgiQKkBSJWLpEqV3oza+uGoe9yDWc9GEWCbcmbW/39fqtX2vv8DgQAhUSDFtEHLmUk7exDTXZOrTm87AFC2phxm9TgvNuZ797539N97P9LxfwTKET8ClYgfwDEjQJ5kRAB9CID8PwDQAYhSg5IyG6TtPJTT2U3JzjrMcRJB6hxTlM8xRakGydmD7R7dw7hV1jBOq6pejWdfw9zjsKp973qz7/Wid71c1mrZi2X7/7/8d5bSJNKGeIpHCTJz9+zUqlkY/07d+X+Rge6aUfLOj3lx4D+/5qe99933zpvQZNum6ue3LFSFuW8yf4lUSZlN5v5ZCBQQJHCShfwiuOoq9FXASpDzlbJywbCTVyi8DXFpDl9lsMJzLsv+bIOILqZ/M0P3IBmn2n6SBpZgqcT/fxwsrXPhq74JKKSAEvCEaEV8zVotS7XhUZRHIoxh0yF8v1qJRX1nyWyPu/J3y3SFaNvAGXgquv2y/gRu1v+k28JesS/drYDHCIQgSQiWoFZaVALBPEBXngywzf4PFdg5ef5cgoGESoo2UUYhm5E4tPe3i977UUST2xXhY/MH7K/f9j/Hx84wiyzfr40FNgRURIy6pbfC25T9sv8eOHVhExcSQZ4KxEy8+O/6VmBhIVAIBAYKgcBAIFD4Agez0/9/0Jx38/2f4QyGmODBBCWYoMEQDR40GKpSUTQIKqgGF+5wofn8TF1f9Ne70uHfZ0BAQIOABg0CAqJTgHUKMAgwsJ4MDOpJBrZ08k8q/wNyd9f2gQcCAgwCDAIs1cCqDKzKwMBSFxgYLFiwYFQNiJ/bf/98p8+1z/1atNiixRZbIBAIMkEgSpBMCTJBIJgEUS8pUaLEErxPjZ0N/mZ+xd5RmXiDBygVtROd2c9/hKMk2faG0K3vD1fRE5Cra4OeAqQhJIQSaldpXUAsbd1X/u8Jmcy4OoSb9f/oFaixfWK7BQqFJEhCwAuFIMWkpYhIEqxU//f4PKlHlH8VSgf8q0a+G9cecRRLrDewqDXIr1HkZZwHWG83yHqVyUtb5cXAGmyCEiA/fKbWva8f37WBtBDNhd5ukA/tzc4CosZIjfHUL+E6vhZeA6tt7cdwv3VOu6Ad6hZsEj/dcyf8Koc+Ii/1E0m93QTEr8X7TPx6v0Hw4hgT0NsiBzi/Ojr+aAjNlK5T+VHQGly0ERkOwSh/vRliHz3BItngE8RENKNdGrxiiL5hBGi5rcwT0QlJFatE4bIbzXe0McICrXV/xde1yXPZyaRUs7gU+MpkzOHxhxVGu+jvWUOSpCNhdEBczkhaTU/m9qyaFOTubSWcVZ3SaKxWvsT9oA762PXd6Fpe/O8eGFtrbQv9H5jUkP9Xv4L9yt3GEuZDICzdqhhX6bybxUCiJdKJVt+IvaaA8pBXb9aP2spgL/w4jR8UmO3+smtT0A+0hFLC9wvrMrl8Dd1ndAnhiyfRVSXrzN4LHh9xAHkaO4/8Q8IS00EE3nPzHWfECG3QIQwbjoe0k5iOovmQMBsoifhgSMQWjU0QhkWqELzEYEh0etfEGCG/mT41Cqk+uWKIGR9a3uepyL+fhJbtKzj//RQZtS/ycolxB8RZCGjrzeaK78ojq5ky3j7HIZ76kpqV7qp3f9rsQ9ORRWkEdji+zm/K1QMX8IfIoXv44nD5BcFG3zGUklDKnUTbINPf0KuNprc9I8vRhHEWn6Mevc/kMldwancCJglrytG4wtx+QVKlcdFagd+ifV4h9mkojgAHI0Yutc+QzeZ72wAfQiWJPN6thWo1Fq51zEZ/abkgV1BxRLa/Y3VIyexOxU+B5OHvrXoqIFLo5R+9AjP55vc1dLSvIYxt8fPVD5Bt+aDn/+QUR4BSWphE0j5mFv7eCgkKlCQiFzPG3iehYMSoKF8d5bOx98JIJgq+4cvSv84ye+Uk6+9RW84h4skdf+pKOunpUvu6Yp6K/R+ezL63icRaPpzoIuS9jchG4DXTGeMtW4/ttHAWqEf/yIAM/8oyJoBvylHmB8Uu+9NTMWWMqf18uFrGXgE+VdvznXGVl/+bjv0G2xs0ZSjCu6SlnfQxnoCfh6xvafwQB4N+nJffQKB+vActlnzfHzFclcrXdZS16BjvPr8k4yr9pZZKeUCaO6y7o+zV9OhVKIGzqAQH7M4o+yb6k1JJ3BTl3Poiweyk450Mrjd624ba95IcB8lQRpsMl96/quD8W5Jx/swK6wG2+3Zeyhwu278j8jLzuv6O59ocMbP8JgciFip943CXFsBLWEIYhUW4wC1sb9pYS4kZ3UJ+C/kt5p+dPyctkvzTMs1dWCgvjamuDCDjTghl2ykbWi6TXXkLBmtQfwVxHyb9qAdwCenDxP8EHMA8HzD5+QBap16HHGr5tnstysVebx275eK9qqnLhKZemkf+faykRK0Ihgj/SC/y2JWYYzK4EKN/QFg5m4Le7WJ5Xj50NzPuiBbJpzxltmqmElpC2skoBl+8l6P5H2GtjcVMK4hohyPqSfJKkQMVW0W2u4is8mYeTzug8pSgrTFMRh/m5N4NotSL5IqK6dEWl6rw/KlpSBFVFMgstbby2bKSgMQ1ZcksZBcVYFw7Xoxb0oO3b7BJsD1Sednx5u3Lbm13GGPF1KCdSOkr6Qkzo5Qf/vMDzqrHIedVyZQxwnl9a5toMJGYfJEAbvcRQV8FQdxKJ9Z2T8O4kQ6vtyyesmVPstmSUH5MJ/o7OiWZtrS/QzGINI/IOm4Q8DDSxKI2nQSJ1U3U9vSkxvtdhNCpgwbu5PHRyQNAMA+wKyeCm32Ibd9JyMTIU9OeXynIz3k8q4ovMxbXTxG9nkZWst6eJoOtvXVdLIqO31LBlOrPyitw967ni5roPG92lTTvhNSJf4P4cuMN2pfZspUiBdxNUzHLj5y6qB/2ajpZ+ZP4VPZN+hCzacWYtNdfJF3VlDd78njhx36F7SVFBKm/94aeX/xfskxdBrotrbw6fNiCJaa/g3lksHQrS9/7KyTxkPKqEXv4KNyv5K5cwHthJI7K8vqeKVh3OYro8ESEJz+5TP3eExO6OWaHPEzjjd+Pfg/kqyCifid6BVdaUHgmVFDqT5VHoN47yMsrayq2foT9WaS1f2o1iQPeNdVyjB14t8OrllHUluJ0teDqrYTZFZm6HNQs2AyUei6/8sXt/kpheFe2/0reuhKFxWFRl3zaygGdsepcsjpRP+Fe8QGPnaF1bqISrSPlp4iK0Z6SAJzOQNtxFQb+EoL3EdEv/zNxzBt3scaovgp7S2NsdlRyxyrncjCF9PLQNFsjyZZe5cheSHRin3BouoVTLa4LJR0M+iSUaqh6P9hdewKtOKBjWvbjwcQcllujNcbVX//noV1zBJTM3s+F2McT517FoFbS+tTlS1JQI+OlflmRoIgltiF+3xHaICWpV84rYNfAwYWfU1BDYoyy4vMvy7qaggqZF4FtZQCSxmMMU6n4TVnOoeCKSlW0CaZoihUm0U3mhgL54Z+9YGwHN5raP+eBfJb9T15L60ZP26O7x2tG6sa4f0y/cmf4X9D8/j3lJWlWUyL16zlFF9kssyROJtTZPtVS31cFLDk2dj/+EnkPdwF/toVCQC1vwGL0ZGOKUbXAxxUOhe9UyDMUbHww4VKR2dxXMESDAKmsUCzp7F5h/ToMHVE/7S/A9K/Rb45BhY3HeVOvXRwahS2GUK83vRIT9JZmHhoBvIcW76djG2iljbkX9ZhD2jmIwHIURIz5CgqGGH01FbbPsyFVDcSniN1DJ1K4h1PUdbLNwaaLRYtnWz0sQ8y24JjrBbyPfO4Iwyq6S8Y/ksLC+qz99DNA8iyCJi4C3LsVz5fSubnZn+0pnbquH1uknY4eJivf7DSfl6JIVgSIImtIb1oJFKO2Lip6U+lEZ6ZMmnUG3zcGvX3edi4wrm/unSQdrkmRp/gFt4VwFJb/vJit59ztRLV3anmIDv1sXRcMYTyMXesZiomInUwGW2VX3GIXW3Zp636GGfjIkFTUlti9kHlvwBhdYBlHeg7G4PSwMjGzKw+3o5Y5sSdebUUmc0qwSMsaye19pXS34jpdU4KxVdnVord5RS6Q2Cm9HxTnjeWRQqpkR8vyMWLiFu+QyfzlqM+x+fz8nWyyLvrw/Uc/dlh8UyowXHd0xFZ6rC5uLkd/JHk/mV/k3lLp+ZDl6DddL6acmWlSs02APGrzqCIQexVzhQL7UiLOMzc/REYJCInpVNOsPboHnhYZmE2+yJZnSgZXaveqFjpFdwSU5/Jk9vjIUNaAJdbBABFpKitglNZT2NVltZJWqNp9w69Y3ugmnrEMKHCQZbRPQ8KZ1XrxWsWkM0ir2FD4SeLPPHRlujUVVW/LJ6ramdGe4OCTrX6+MHY2iEQl1fMmYmfiBhFtdCy1ZVc8b/T2Jfv4LppnO1iDd/wnvG3gMSb9aJ6QocuyTC0+NbCGt3A4i/EI2fW8zUmwclImssYsMFP0iSDLcuTlHzbYzSLSF7NohMIVU17BTIMZuJV/BgGFYUFpQjGRm1Y3cJxWaCtOtxfoWInTYU2tTYq6s3VqYSQJ9tRGx+5Yrgp5/BcnTOI9cZmLWpd57+UiuUJd58UbMnevtP2dOBJn1CWmXYxE7KA7Ml2ADIWQQI+RUV1vQoJqbJrEaeUnIhT2tWTGFHw+rlhTqnkMq/6TQmq+ViMg6CCUXmuKMiCk7GZpg8gZwloCUe1jW2EENhXtcq1QdgIN09RWJa7ZRmWInrcB5CwLIQilwfXswDMKSZ5ODv/vazs9+alib8qOJxa1MsrdY9kuwVSvT5Og1r+jNdBGEfEaMg1Nau4HLTiMxnd2pAMopIzdHelTJBPgxG5YqHrvF8jJ1Vosbo/orfJsB1AikDra51HOTEWuZO3aVGzAgzvxuWGZjLayta7CbBE2G1DQOEzOIqXgoeysfN3JTVujkzMZPbl1Gwb8SFF+g/IrX8YEnnNFh9ZAWxWt7ag4RJSGBzDeKLlFBAW/zPaGjubJuU77JFeg1R9hZoBkhkiaTMZd8m277Bm8667+Gw2cD5/8RRPei8999fGxLrFjJ5P7dXzqo+xkD6y4Y2eqcjKh2GWSLwRK34eG+/l6Y3bcAFoOVind+iYaD8sxprepmGEmK6+dpjwXksQqAVhZeBsnPbZp2LyMhxY/TqbKOpiP7fy4ddFygZTQ6s7ePKyN572xEkNh8SWTJ3rnERxUJsVca0FeJNzUUbvHYnEHvbvlJWELivnZLGZI2zENj5ziQAbo0rsewVn0u4huW/WbtXtG4pj1MeAOE3wHwEnpgbxQ8XW5BiTA7TDRv1oxAFgfc1XSr8drtXjrwToIO9HYtFZduXLaMC9jsb1VYBlVrJ//wrQlvuyuowSmEkESBjkA8zscLOUNJ3zsQl4yOA/7cAwz19YxkkH7qEvWIv3yi3hjbeIOTGMh0L6wZtZuzLYb6v/37SNDW0eiYzRst4meHITeTNFPLCdePw67pqhgc+S2vC7DuL99ri1kSwmdSgzEtUp0CjUgLp4XNdzWraF7TcuqZ4bEbqjbY+EyzVLRP9KwXFWmoBdtqEWZ9FW6sEatEBTR8qXrh8BGGOaoJQ1LNHbpui1zepTiw7eGbdBault5lh9bAFPI2NjjkRFhwnFjF7VFvcVpNc0kMLNa5ToGhQMbKdiJJ4riKNsge0PZQ5ZJd6vL2u2Yjt9/KuQybQrlWR4RPQ0BD4PrBUvbtvTZfruOfTwfpmeev+Mv+Q5nqfVif53YxrRRqxdodXLhK6MQ+ZntW4Bd63RVh52+BDn/qitocNnxWKya/N8Zlh9a79SroUbMkyOZ0flWajJAzwDrVJlkA4A9pnrQ1UmszDpPyDoY2CdRx5ck6M6gWToKRi7vXXrLLXwiV3wM0ih1Km+02Eq6pIHxVz0Ems47nJeTYx2hrWHXUOhp4hoDEX93uiM7razDcf6vS7gA+0etv78/cJmdcRv1EWPVSTLF/x6KqcRgc16Ek/PlupbY3gx/+P5HXbiGrh0U4GBqp+1vJHbzVBhe0MwmBcge+Xo9G/uait3PdVjMZtB5WNeeddq5k2KGB5SBOsgBFfpHr1zGB58UwCiNI1dL3NUfxaR2NBK3ZbNMMfPieYL05wtYOmCZADj+h0BKQIff3wMqk4q9u7GMnbzU72qLGMMNvD2MsUWOxqLU03CCiqzs6yagX2sqzcA2X9Q2MaBaQO3vlieqc6pFwCMelwaopCy6MJ3WHAtFjXKWNIRdeULJsc6IYNv57eYd7QJuhs8ywUslcNpjjv6ifH70F96L1eHXie5YeKm6CvsZVdzwP/tW2IxYUOaePGKuel8oSG/Caeiev3M9rFvqW1i5N8yrjN0m5AY++Fjr/nTH+z993cFbnTmxV3cXmIi/MTRQflSbSeVoWY5b+cCXbygn08nvdIVh3wmzGyB775MElntgRQYcTjCNDsZgZxFbhfZj9IWJBob7q3SldTS6M/rUiNApGxpI2m3eSY6MXqW4yRpdK2bBDUcMLXQ2nSyTF9qYQBEx2pzKT01pkT5ttdGNkeCLw9r4E66E3LJ1Mar7Foj829i9CRYY91Cl+hwKmrK+3I6baJIoGoyDBN/5W8rpOZCW+IFKNlMR+Dp4q6iCacF58vzn0bApoZ6r5n6YPympm36TQ7iPaZWjK/iH/hXT788VACV8akU5CjOZaGAYdsgzHaRbWoqcBCopZK2tmkOyqbibkBcNTpRZUyyOGNvrQGLDfJ2mZB1QdqFB8RejGifB2NlV0CKveMWhb5hP+pgxxnqZ7LVOKo6xV9t5D8tOEs1E02WGeXO6aGLJl10Hi0T1yGPhHOyEutgKA/HKRLf60dmM36ybxWtnVyThHL+2FVj+k3tMXHsdyQF9RfBEvUUOP/Elag3lNGRkUIAiqWSKIKSRlTGEGtKgYXC2pxtGG4gktjo0lY9A0HgyjGz7m5Q0F1AnjAvUkrPdjF+JK1TCC3N1IuWkBWcVs56kO9JUn6JX6kh9yIFXpWUt1xfYrUc9+BzpKf/WxX0g1OCkyqWSsk6uTU9GqK1ohho70LhA7OOf4F5NzIiu5jx3X80+kl6YmUeM5JgeHDLq20hcGi/tfPebpFKjFvvNYGrSdOnr4cp831HQthXiJdB8YKsDPyJ0XcTPFvRDYpqiCiUQsTajdyfUV6FeE/7tb0SEojHGQpQt8NLvNTK+aV0qPFTch4rZ+nlnshxQjpAWKQCqM5sBK3xYpXlWUWWXCwH1DIL9Rra//tDtx6SIsMv5kEE2GoBhA0dg4w2SMhbtON44lwSLvXCOcYtNLG9XERChQpptAbDJdd4aML9ma7PxO/cG/pxPa3lxl/JMc/HlnDnRyJ6UI/V6k/tCTeXVkM1P2QgGaow0c4KC4/ZY6Fur4XNqNWG0HqpGqSe1qkVuIIdUWE/GxD/tK4TeM1RV0OHeCxW2hROzET+ECrOxg9EqThvIDC/pKFvOPuk2v2bAzrT6HICV8AUgqRTKQ/RgbCas3lcPe501EOqFy6wWdPjIePkyjZl5M419WnoK2WFyW3OSgnMhVaE8OMAkDnvASBtF/NqhgqEPwaLa5mv9bui6f2YCXrkKt71ZmToxlPwBRU5hmV9MpCm/hQCnMTf5U0BE8+dAsGXXULGLDe8YgDxX03S0T97sW42K9N1OzSSxrPfnz31MBQWOZcMyRInVHtzhnepW9nxrfDsFbMdyzQpGvMHDrCPeYdkV4XtbmzToL+8jgJsyMbSDtey77kANqOi6HFe4cGelZw1Z4y+nNRd7z8STuWs/nY6s07KkGEOY/9ke1tdBZ8InkMUhNnIAAL/7V8Gj2lxQBhlI3YJD+JhP7HNCh6T+M14cNV5M6Q6F2P897hr2If+wvx4/Ws7Ply7zD4f5GVPDyPXxNJQ8lZtOfa71uSZoA+XKe5hHJIaL93CcWWolcUSkXXYjahCtYt/rAvH9QYJTRMzNLXC2oLCpv+KySWe00pbKjMpgaq41ns9MvklMOCmD/6KgDcuMfIO+9LsX+pr8xEuXjh/LWIJJ/dZUD+yS+3r11/84PsEgN+Q6w76Prw8Fo7NZsL5viwFmZHUI4Lh6C7BVj40GdldopvyldjrvzQLMwlluK9WzQyTaHOIOO63s3PoJc46Mrgv/SwuybizrXIuNjKKzaSb3UX7wLZY+/cQjgF0iZEcg6aqPqv8FgWc/SFc2H4sH2pNkTv7+mbBnqzTXhhbFLC11lW4GpSz+ZFYk8I3hxhPPi/fH3CawFiKFZZnSA89e0nrVcHUOOf5tSDNt7VPpP2d/AxTvULMRiMvEHLdj6Q5jWK36swSDXBvZAidsic35GQDK2s8ZnY3h1e78UIXktJ0OnBxqpwSCkzdYDpAVlrnNJKRMZ1ZcULw+0SN74EgbSobXlVFeisXm5YX+mn5hVgb82/X2xo2Te3mvLbOVf+CxfdwbtM8VceWu8tk5PhB/FKIhM9tKSWfw5ivvoV1fUDfQ2urTDPBmVMmbQB9nJes4x0XF8JkBdxBlUuJ7wJR003O1VVFJOVXIiuOTLzFk3D9ePaaVXlxAVNY6d+K0v8bBSFgCq5hgP9dt5nr0gL19PZo8BE0bDC8yHUXXpkCC7/99YgYpmzgApj8+KduQD7dYgtKEI0C9NKGdkbxY06fM2/HyR2xk76lJy5pu1bMg+EIdPOIciMCPL79ch+pSCCVghyiiUwYLD5HADUOkEmHwBYEGb6oMcYYoj5h5rEQulhavWIJ7pGqwhDGKpM3HKgbbpKrxA+QmqbBtmrsLnwqP8XYIsMNsVWITWbQ3CqSBIi7E+lD9XkqkdXnVPfofeOVH/NOPjOd4Q/fsJ9XWM/8fxNLKfBnyHPS1gX69T+bQfabHg/8sxYWoUAZLOLwFqliZd7jlJXW1KIB1Rdj7Eh6TAEYHFLlROlw0I0ucHv8xbYblQ6W8wuuEA0eDBLW8gj/rKm8G5q6W958oLN8qMgULG20cx0CIsjvr7WVcfZt8o5eUrTYFe4T9FYoSZZiHKk/nGJS2s1tbY56aTFlo3y174Mqq8bok1smdOIGXTlitgF5LXtXtYxErgmHKryKz1I577W30j+gax47TjLI6aNop4ZpRbU7UT7s6DBZ5ai/CeqlOHtAt9bnPDb/VbOgGIn4TedKnvx/p5wslnUcxZUD0GSAQWYGgHmRim6P3vPqZqWY1UDzCx9xCzR7joot9CJ6DOHzqcArrhMo8RChDPGaNlJbLhrUzhsc4282Hwjwl46jHwrA0CvpudIVHvNgbDJJKTGiaGlZe0bcbntBhu20bey3vZgGC9vLlHy49rve+lfZD5iknAv6BMbCf76rd6zLq8f8spuWZY2gDo3pl/BEQ0sMvVkqpABbhq+E5Ulcjof/ULuz2va2Ail6ddMoYP1mznysm0f1V+Ib/HLqFgnVy4MHIyEX6fTmxw2pptFa7A8pe9xK6RhK/Hy1k94LSnVtTdDvHtpTp8z904wMqqXh0pCaEtvifxZGzxmlbOUIKCeKE9HKC0T9ElAhabAfguvbp58Vj24AIPW3/EN9m2XYBoI22DTi6//+QL1Prl/DzSm0AzzWlr9DOPc1r1hPz1Xax+9I9g+ewec7vDwsWiL/sukd24e4cp8UvrZXNwL7R//qvEtuz7LxjhdcYVCbSnsmzNdyDSkGUyAZr81K8PF+75ucWTQcM2W2Yrubia7Ze0EYPCa/bmPexZV/1pK5TbSeIpLcbxcBsxmCUTWKZxPDzKDmpR39JIWaMumk5V24g78mYNKRiNUK3lZ7hjB+/cuRkyUQ89G6QSSeW1ChSdufCrr6z4GWFQ61s3JzTxixs8i7f9e7a4hoT7NciIBm693vPB5OkqV60UHzKsHo170G8Y0DvFMTTPy6ZMipyDk0wGG2u7aHULLcqVxhBf88iGNQVtVP6mGLWXx36w2EzaHWHdv+9luNCUb4YWxfw/HpMkgz6hcq4m0ZM5rKdaElTS3uUnEb+gQhPFaM9XzlcHG9cPiDOaOYdpK3wj7qBHtA81qUmRvYGKTYXOEe8gpmKfsqJPm3q3c+hbXA1xFyOHUH3lsj9k2iqLpnmle5JAVz/iqUn0Ft2fNhbYeWL+jQxtV0D0RgJNB6Aht90gVfzxhZsSihlItW9wHaHj0uMdRk89RNOsnU8dxfyho468xTdZ72hsAtfFxNRD5bCyHfv7YL8VWBim2M/4LNixrufrW5oFCqpQ5MMHbUnSwkQPrrSNU7GZ5KLdDRmVBTVwEFOifbnVkxqa1lrdKnwHuzOovBCsu0EO26WEooywCwzDASX+PUaIjGLaYTKQcyE8X6lJc204WMfzuTYGowPSQQg5lwLMyQVUv4aq1L+AEhweCchPh5AM5wStPC6+mLdL1P6ejN6UgN1KUaO7OEZ0KUVui/cpp0gi08dJZVBbqfXbWwGBNMj1hwFAXzW5d2wYgtbBSuFHTPEFvxWABSdUmnxp/klJgggFl2PwOB9+mQ5zjMWCTYiIh8F9UKJHhVL5/ex0zomCFm7+KZPFtz4VUKisNSuAr2Hw7pc9L6GjVBeonECuu1aJ47BlUNVRGgtpfEgRu4x3rYdFI2ZLB9qOB5u5/OQsMUCjbnT6I28ZZbIkvEhvz7MavtWFIz1+Ig6ChPX2Vi2wzCXPMWey6KhlNdHebHRIJAIUdzv75YucVIuCcVlaf9+70jZalSQmcWNzbqbob0s2tXQlqZL7dtuRZ4zhakxSaJMHRX1PLXKm4lCJQ6xx8eKtLDwSZoQvjF0/e150v133+rRMElBrvFqBq/OEBf3PLfKm4tCJQ57xMtKtbElwp/zybl/+P3gmvQi98emOZSONJi74b2XrObpxMkjuh52lO0lNi002Hz57iTd6l56pbbsxMp6BHtxM9B6ZKxi29WgTdHkzTuNa6ATEoTL/Jb+6TSsrGMB1VhF7Jd+PyCtZXoCKlSt3QWYqRP/4ktR/2FHgAHNGESCvSy3LCuK1U4WR74GwHmAt+4Ur333x7SYteEbnk36wpuvjaKgqBJ7N19S1Z/A0P4W7W+IC+qazvBYsgzMGmlh6cr9eU30gSXLwPmKdZbWXJvapPaoXaqZWLZP3Fk8EUjukUhZOxvgONTlAkpLCPz3NoQfPzTLE2nis52HT7eXbdszSg2y2ExTd8EBP8bHJoO5prF/rFgcWCagwyO4e7mVjf/OqeK7Hs+LyM2MZeJ7xOqwuVkU27+TFr+ScqgbqunWBS4UA2fc88OF7jfx/gfvdDj11kvQbGWCUR7FgmyfCLZwp6B2tkybzJlIjTZWlO4ijftEFq7ryLfowF06ZuPIbu7CWhlQqhtgpg6Ll+G/UFc65Nb7CtlGZOGUP4Nu49xKDp/KTCyaJ5zmoWc0Soy50pziMS5V6eOyJCts10RyV3hSZmEOECS+AROgaZW6mfHk4p6wf+0tMdnopfDXfu6oCb8C1fWzMuPgJqG4Hz+AXWocz0+Q7twA5ptvt4KmYrCxU9SatzVsRM1uEibfRGdtYerezLQQmAplnq+1BLOe2E4vs6CLU3Oobof3HTSUDMppgiwSg45GtlqCyipCNYIbHXgLvyvQk59J3X9sxyDeaX3U5mQSPNUi3dE2+6qMktMeEEZjxmbfQSVebl9vFxHjLiKKMr/divOd62GC1mW0Hcl2BD6yTvmFPdg9qsh18SXWHeN2A2knza771/ItrFw7dLsU2g5AxoZLaJ+yJMbZCF4g+23kYMh1ZxCVVRXEA7kxY4+lmD+gpfBWuRhBCeeWQhy1Lqt7KtsZEzM1tpHvyY0VG3C0/xf8z5rEhWXcZ2kK52t7pBH+qou1ZrLRU0lxJ8Jz7YAII93riii6FPiTavFYGNn0BVUUG+nuXFGBuIVqUUE+FEMxBCgLta2rWloVNn+UcX2rjZSUG/AfOdrsGRee6qkw9yhZ3Ky9SAbsQsINYFCZYeSXNuHRg2zhCiOceOVRYQzKwUA/VufjqGKfoUdEs4fOs9YD07/HfocciQYftQDKOUG2a1jNr1rzGVAc10YmCfAjpN9ze3ubSpY4YiClbBhRJ/jym1A9+m3+iqICVmtPkZP1jE0kvV//84IfNDjOWmgbDRWPr7RGwY2uHq0XW3RrSVP5mlaj9+oNn2vwQZ/Owxyboy9WD4KArO+CmD3tcBtCJe/acuW4SL81KkEqxhiKD+3GpBuwJf2DXF1Zoif5GMqwMeJ2I1UlKPZwLKTfrKajNafvDas4ZfWdbiVkLWyTTbt1ayluzbqVuNPercV2+w4ZOldDP51F52Vof0P5ZGD90WxIkaV931VPMAa/EPS1H0quTUQhqScvW4eyQ0ORxKwP1pCzTIohUk+MphN60AdjKLl2EoaonnTtO5YdNprka70++FJuIoI689LVqfZw1hO8CRYETosTvvUND/GUDneyhk3ObmsHcVI5/LEg8UmZZC5EUTnb1zoZb+0FEylmRZmTctVxlXo/7SR3FyIemEONk6ZgrLqs++JPV+Q+FENgMQ5Ggz8N3R8nTp95a9BhiDc5M3BdWDxtf5X0YHinxrDai+P5HvqD3mDRXyju4+eSWC+yRyrBnBJ1gIZgFqwHgnAVFnPElcs2m3qxij6I525oR4v2N1TPhtE336rPcmNoP59pYx3KhquecTP/jbSV/xAAMiPUZxTRI0lrHUk9jDqn2qNmVcniKf0eJnuIZwXmu3lQX6BlDYLKc8WCLX2zQzJjwAPzscdfxSHL7w5axS4DGw2c272jOHgpVhkY8zhLNOzm+CUxt+dD9OlOV7T7XH5Q0GTOi4OBISbjysgvp88FcLNpXKB0mbu2uKMCH9Wy1pfFtcsOBQ222LcVuY17sNfA1YlwNtTHlMTuIIUlCjkcYtLAI+IcdpOxeNfHrNbjH4em8nzudSL0hQZgqrWGClm7LsmG9JZCZMyy6fa5euwx9+V9XA/Wi9R7cQll4ls5C5kZdYhk9SMm4sFDBcBUFgRZlrqwb5CElb2t8RszOH2nsqESZHKqA0Y+iAhCU84OpS4GmLSQCPGRskRBCPqK6rNFCRZyHtqs0fywsKzrwpG7tMG6f+bIz3TqLyjJXU/wzn7cfYL3OXlsVv6BnLctgS6fFvkHZ0kz19fZKz9Qcue8TdlTqzDeErjhuqyt6/JL6cO9hBW6lXXQ7SdhD5LyCtu9RShtX0skEKUKW5/6QzSLfYsIPORl2a6sPn2jDxt+kPPxEK8U25XPjHKAWN2FWkGVwffv/AH9pqkgbBfftSE5O7q1md626NehsrKXGCUZsxVNicx7+3Fe2/PaVAqa47e4gRTZjeHJLLy1+XZFFvth8+YD+dvnSY0ypLYeY/aRk/tQ27DnxpvIc9asZB1m0muX0kvcddkbfFPWf0+tsumlMeUY+VJWAPCLIuTggqH3/vjNRkufLOy7HjdneULDh8QufdqwrfvxnY1FiQX1aBewYEg0apj+ok9bbTagi3YyfEfyeK4KmAgd2o6o89IaI8OhxCujrMFFn7barIeO+latBVHKrsE3PvjhQpt2cpI+tdosN5o3rRET+Pi8JprLnyegn5d/LLSf97K735MMzZIZCcndeI7AtBPf+BxS4dipmufZUlrK1oK/kjjEteIIHxG+MrldtKoiWEj72mU9ZgKrs6qeeFahu63KFoefa25AgpeuikfpxxxD/e07gIyXchDQ4nGyXaONoV+U8uORlE3Raib3gXcxdmHPROWSVZZVNTVoniQW23o5vLaVLU+AgC28EoVdCnQnD/2s9Sj6Ejodtwibt9gWzVSLXIaDCLyxBACyxcXhZfwJyByYjN0lXkwjRQ8pE6CilSXXS8ZJ0LNHwmoJa0RBIFh7h2cZkeHAvzfLjfdHHFqgPBaAPnj4VnQHDYAY2CIK6Oc0QWqwzAD5+sm7xCjunSR174up5j/xlw1lktL3u1/vwvRWm6nwEYVMbKV3PTjtBWPhaXK8fhAuC3wO1MNAyK6WxAFDPbeL3meK88Ac30tAWLu3wMCJ64bBg/A1qPuKgJ+BbDYcK51RyoLW1IFlxbdPWWd4HLXJmLzMdpCUwtYvODQ/l8oWKLJSgfTogRI2nTVgMhDR7HJwFECUTr6hLyB41kye9azmQ2mw4H0SKln+gK6jLDUNlj5rJ/L53ZKYJ3JPS0nDvXXhKXZzU1zIs2VxMObdte8EeWv8UgHg/7XHxrF+4hLB+4EEQOVLxlcL92CDyzrGjzTi5ZJDJ91PHAcu1DLcSEbeajCr1/JM0nO42H58Gde/tI3+st0XjS/Y632VH5Jgof9aWGqbePiAZJ18Tu1C3I5Fvr3kMox+qWKdY0cuhctf4BeJN7jGyICH25JnBfeOo03D/WVF7S2wqF7cKYtLBYl3Fsc6h82V22dyPl6dPYUDxNbGJ/FaTrOPNS6r/mag5SDOL4OkHwmGXnJ0sBbdemg2n9J3Wyysbz/IuAC+4vJe+rYMBDTdaanjqilWzdJ3acSsz1ueyhnNkmyuW+tgkBNajUnD25LqL9timcmv3lYXZLdarQ+jcP3tV/XNB5ZDEentaVJSC7OojjNpnKmhnQydn0XnYujNDNVX3dJrMdPk2vBApqEWVqu/w7BeI8+xwiedQGgSmnLdMz3E3HqIP1Im2GpYnzBN/83HoAKINu2s+uRs+jCRNG/ykDHs4YWKv/SkQbLq9pwxQDsX0Na7JTAdTAk8hIw0MYpeOJ4+Zklh18cusMgHaGZduJ4+lomx6GIaoE46USXML/ZngPuqOpoFawjkA0qOeJa3hcgZnpLnjHLny42S3ZlEkHbXE9PR8hvfogh0Ts4e5VkK/MLn9U2mAuzr2uXh/vT0rniumnnzOzZ25HX5WkaSR3dZ49sNEYLd7OTU+3jaZOMy4bzNBx9YksPhm6LJJZmY0FSkihULfAcorkggDkmHjkCdoSfPmEOGl7eSaOKFkZHpCJQKgafgE4EBdScrs3MPmraQMCV0pfCFdmsaUmfQrC1eDX3iF0D6KgJFtEAuCqMFKQ6X6X42fGXN++eAe4UNYEATNdgT30qTdMZ7xl9kjj5Cw0ng8vhtPc/ew1WV+8/wchlaxTTGbzwBHhxpVea6z0lrdHQxWfKWl6EMiI3shcU6z+Il9nXtUA+2CTfUVnc4TuLmVyeSbmcDrY07/MMThutzGJB9/ol7OM8GXAUq2KRXVg/pySLGdeP34iwhjCU4bTESB+BBLERcLMJdN3svm9M9SQ7xoQ0uNIwGQ5XUtCnRNdkncaN9Q5o358Iuz1iJVhED2CnMeISTTPtpzttvVuOukvkqz2D81AXkXYFKm6XAIXWljcmM6+ulEmKsy4oh1MR0gixCnj7UsgU1lVQZwLyx/3yJ/obUsoMivtfz69ez9g3Mohfy6cyYFVS+sGCjfN0UZ05OeQfW56n7bxdyHXCAwI2ZMSS7MWxMiyE2FQaLAJfXmtcPBZdV3/bgKKU/jiKzAOiVAIshaJfC13dfwQV9e1LOQshbX01f39ZJIVm3k6FeZUZBHXEQnL2h3Q2ds0XnZ2gXQ5I3I9D3gZhb3+0QqUfBraXmAnDogXbr8L9pYneCezaASB3WUnMBOPTwJeZ4FHVKtUWdTZ1DTaq6912opxzUOzLrgbxVk3wwp3uHBv9OcrWlU1KiDqf1bF3Fb/+gH7kFD+Stn2QECN4SQrVlZ6Uk3R9z+KB5Wwl9p6eF9cTngxVHsv52EvouTzGJiLVeqqvt8uOcTMXSs3T3RMu2wfxcEEko+8F8uSPcyoLoTDokqjrKTKPDulgHbayLNuzXd2BGWt+NPhMAYsUV//VtGkmIOtWazvlWf38B/TyDlNDkGp2QLVby6zIo6p+FTR9KK3M0os34Ii2N9Ds96LETuuy0EHex9Ke2BRYopRRSQfT08YNiIgLTs1TomQsMszI4xol4YJtecCDdoL74hQbwMVRsXuciKBWAESfDUTaJicGn9Cey2hTyVs6BwOIN262JCfjCjBBmYtxxfws329OdFdIQBJMfPw1yEdtm+bsftujauGixNN5nMwCO66WNFpHNkrCkCdrp2bFWn11IoHpDY5HhhePlNIrnK0T1qiZWaJxL3zbB7pJ783PBfy+R18Z+6nhnceuE0npit++RAs5yCNtFKVR0HI2aip50bzMW4wG3ZTPVSY54+CJsN8aKSom+IswS8anLJtOmodPKViSbEx6tqI14wayvcoGMaOqMbWjVwhLrHCSyQQpSQ+kqgHhCqKpzlYiMDiyJmWtky8U0bWdPoK9g+hrXFCTxDmbYVdKHzMU7rIiCtgO/FlqLPZYFs80cpVrMs5bEi1fSSSPaAC84LdVAG/XejH3KNw26h3jEAr5aa9pwpp1cbXGGPfdCboj4feUD95z2ssJay3lmczEWT+QCvt7XcSu9J+Sm+cgIaXTi0x26vRaVBZ5w0Tnj0EZibE0tLkOZCkUdbxKhC8pQif2kBERi6+xjbVQU+XlIHpDWTpJDn9ZYB1qYBKEurEpG/bllUSMwkihXS1h/hz2vSkCkYqW1PzrgBzqwT34v4Wtg1lDgU/3zSXYKaeRSxG/oXUtXkW+/5pk3ZMFvd0ub6pW2H8pCG7yqZ4zFtHDIPW/mtHBqtUFA+QMpiOwtL4liGXi2cFrFiLjqfWsNgPPWnsZr3jYGBuqO7MY6os7EV6yPT4F2ncO59Nt6WhMN0+xl/ix1J8ort4LE+K7kTntoKfjfrBjHzh7vOD1uHYtev+V4izcMHzGEzMMxfRuPdrBZibPn15WIhvW0gli1aZNH0xtG66p7bYsXoTIFr//6TjXIYvFt4Tc05cHEFmMhxbVti9dzxGTYQE9VAxA5Nui27WOKQxCVAlbdb/+U5+EFnX/2LhxQasOjAS2d0Sz7xUN6eWkQP2h14xdmmceJq2/5ecsi5L9IzythWlkIxRChjxVWBaXqto9YwTW2AF3ln9dp8NJtkPB99Hezc7tTITmyP8q5cyE7nam7QKdKzApzMeN6fu5IJcKsqjnYtlBqLHaYRWTnc0r6p632ZnvV3wewORq+XyXH6zfrPEU+/DmHje4AP5m8ZGnef9dcnOP71P3j7Bv/8E0iORz8/3QOK4pd43t25UNnqmbuRr11RukS30G9RyPYeylKB4nPie1I3v6wEezqg4UM/OGv09+49ClwqiNamwgIhWGieWFviPn8RMH0hcliQMZBKEa19GrPJTE3Xenk02P6kDWr6i9iv+J/AOVRg+GqaMqpMq8mGM6JqibJw4v4z8Q2pjwqPuqBOKJvVOWy69/LgCn66syey7biQai7vVTFm0Kr9Y0ueRyMLMw2aKqIDEegCLGL7HrcfSotRxPNfdhDolrOpzguRK1Ao1gQy40mqvyY6AHQtchA3DTGWWS2A0zuLbtAsE6Rkzhu2au6h5bqfU7TraoqQj0hRGu+rcRzLdGITa5GNSVU7m7ZNi1F8OdEcsNlakwW5S3A3SJdtNTnF+Wr2m7HEADo5YrkGhkzYUmr2pTJgNjZi+GX+qtXNh7TMkWgs2YWk1n8GZz0hJctOuqXAZByzNSFdQ7Z/GbLIjaYt+XSlXLFqThHReLDxGrjgeeRY2pPMNpjTtaw7LUbyzNGx0e+8uaSZh1/EV5/7gJl8N5PzGYAOOUosMG6AV07H8qwiJc+MSw9l+jzQOZXZwvRu119xhAZA4uYZqamMcdfiOZX2TipuscBNHHU4wG52iYo0Dim46vfETDChYltpfF3D1SB5RGm333Kuym8sf0KYSyitnNtF+eJve+bQq711V9FjLEpUsx6xXhyxJz4az6+I1lZNE51/B1n0Ex0PNNjiWpqLsJGrtdDXp55m/WnF1yfE6UBuU/n+20DZ7xe9wAyIMhdvVCF/bamswNaGCf1CyPsbP3zEZHbE69mUMG0VDh3imY7zkDHbPrLZ336W1wciynkxMcasQ9vN4+YoQ4X49TsEfqQ9c9XO5NfUWe/Dxc2wBMRL+epLY9y9NztlcsWz9OtO55T/qQW7xpUL9fZeW/LyX5+3/jcbuv5g2WL7jcm21dteJz7ipWlPTubLvQSoBxoWgI14pR9uG4hyuTH7DrYIGh5Upf6Xn3Cn00wOJ5ORRHv6BAuSSOB5WZZ92AN2XiB/if0FsIkcArUVk97yo/H850Iov9mvmf8WhwN3ecOgs6zB0HX6u4cesaA0eMiwp0WrZMLIBgBMoGLG0aMNvzUGWqJyj0nphdqg09fYgrIS0W0hWqWjoofwaNnObMOSr84PAhPi+XlnNj0jaGI6KBoDqAPzo8BkGoebfJXetIxCWScR1saBfVpZ7ezXSgWjoqgQAiwlEAP7P4SRx2e2jJvcZtpmZk1aJzG/nrW9XNEnGqBt74k6pibH88E1N/g2HxMs1SRiVTK7S1pHnbTWS0o56tXX5Sj1FPr4kOnkgbKRTuUjTS67lCOB9xLx2L8tMKFdixuuo6yZTlAN9MqXQa68S9G+4FizAeKlYPj7s+1aIIqifJwciGUVjgcGaWiKps8qJXWO4fFE/vNNzAGlJVuiu95dXyTcLqibSz1BAWxERN2nsv5Q8Xpn37FvJJ+t9eo+MheMC4Nmx05gXP1vvfIj3Tomy05z4UC3woYU0y20OPln1x8bKcAT185k4OV0HLHeYJdQ1OpNjp0tvJdxPndNE6C7AiVapL8+wKNgj4RoJoE88Y6N0A5GRp9q7oEXnjsc32k28p9kljcjqSohOr0nOrE1fZWiHvvrGBp/3PFKlVFe8b1Qcx47JmRhMlTYSdf3j8Xc2x/SmhrSiBZTgzN9aANlSYD/IrLYatITsSD00kwlBvZScTLPN13xMj85cdWs8qpzSMezmUs8Ndy8NdyUz8Ltb6b3CxzAqnft8Rgf0oqhvzHgnFYwB8ZJSG0G/cK2o9/VfoOELMHfuzPsrAiTDPJyRLTMIxhtoQcMZBcicfQR2CfzmLwslhKLCti2/1pqrhlkC2fKLdAxHRb/v5hAtk5Rl726elKquXzRxCJwk8ZcJ07O8LtelKHxhMqEea1SWn5IeGmeJaoahXSijBVBhXU9yq2xiMvl+NT5g7iqomC1zpuCRFf/qwyX5n8FA5uk+Uu6WscIF/6/JyX8OwE0dky9/cIXT5T0RiFS9ktuAgysSUPJ2N7xYIDWHmEkGT9U520odgFdUMsnDonTvQ50rbRtq45pzJr1qQ+Aw6o3aD++ukutRss06Gn8l3IKxdtjXUV0qXL1FDMiQLykjI23U6HKdNua4um3cVL9rTbLLgt96Iq0teUTaHs7NwjRUsd9tPAnlqPU1HlVHOJA6wWvzLOxnz+miZm6X9xz9501R4LgAHXx0iGWd4cpEHVIcCdHsVuJSKg07bLc2xsXd4A7J5mWvkhzTmqXxNlfA3qUzD3WvaR5gTQHhGk8PamyOgB1hy/4sxJ7Bttd310eIy82kV+9wX+HuMhcYP68RmTw2QA9r38YSIf9LHkwsjztsnXWYRu7w3+PD9u2dnf2rurfhC321asmLfpPjDJc5yebZ53L8Sg26k0anw7R31mU4/KNKl9pc2VADU5boRNHStLAPM9Z2Haeaaus0hdV+rjE/2gUAbbV3IpC/s0XSP0UTDygSAq3GIsP8dnGtWpXl0ViVBx/UnXukfwlrxlqeSoYsg8Nys6+bMxZgUL8y3MvrMoWnO+Qc+4EpHDVRkdCGD2rX8PLrN3wZ0Jk5b7qIEqxyxRObqD15anacuOvKsq/9EaAIsF6rZLiMOuvbDsWDMmkPItVd6j/e67AQIsAaNymBlqAetaZcRQ9yM6DpasI54Elj5wfDbhQW7mSKz0ObKppgOEOfsq5fByhRzjpLTBdmlFnH3txSL5p/knB8Fn+81xAapZhnktshady2+jAE8ElLeITxZucN/Wy19dKveBY6zIQ5ucY0xL7Mlsz6AEcwyTpzw/yV2T6IWPsggyyJ4x1Eq0mAxcXWoZ5ElzyP8ppcTNCY95JxxFdBb+AUFxuODyAk2eC44xJ0AhQ7zk93nsgCCgBKu0wOZIVYdnegHiql5gBr+HpMnC38o84ps3vUPsAxq9Re5/R4n59NnhqmgzW4mBoNl6kgxq/HQKy1hrxlaaGA7ufWoodjnLnPw9MdJoFu1n6fgcztiqEjYWvSBfOkUtUauQbfyBEauwx3UGR8WiGoXZHFTs4uQ37ZxuuO/mfstMtIzOkYNCLuU7ROigSoNAYQ+oNljYHH5dbIi4bA3qcj4NhXSo+1vLQVSdhoGdkdtWyeyX6erP4nwVvNZmNsXwDHCajVmDZticdVRDxthkXsDcfDeuUzz8mYQUDxJR6vKIDKeFjSLx8xNsSOtwbUg7IKFbfuayRKmR9oc5MqX8LkJx2mUFWw280XpX40ezjNU0x8ahgh0KiaiGwh6Iqji3FWbHF5iIPsz6v+5/G+LhYb3LzdAHFylqQNTsljnbnuOJ9kF/zZHuTlgsWW5HPGDvC8Ulws5Pf6eQbcdnerF050WurlJP5VUGki2hQzFKsISP7pdvnocPPW8b4bzdk7L8kU8xbOppBMRHcg0B4trGABIzgo5tXUjNFihXv0NFsueQfEFIaWtqqXgYTBsAGK1QT3r5Ow0GdSFYYHzjcd+s641fslfxm3JFp1nRgHS/XI+aK5kgu10rhks3mCnPFw7KlQe9uaUS/+BvypZFnEv7U3iy7NQBVkJsvmhGgSmegiYBwL9tLJOSTBpb7HHKMzlaPXiRaWkIYm/BHVcoDeYZL+MlMhr4EquOHVGM1zcHPNRzCiZjtyP15mZ8cF3T5khIu0cn/9RPNAud/WdDFDN/2xEVWyW+BNmrG5GtiuKmTppyM2F12GmGhjWUhgRD8yb/ZEk4KYs7DMNjRJx4+foDW6xinwvPpBBVblsU9MF6kGfhP1zOXcFf1o7zVTn1NwEB7ddEQfSuMg9rRuWgM2et7GExPEzvxAi0fmRyjN58pQClimifXt0izJOxcoOcZdadq/JET18Qn1bnNwNW+0KKfQ2CllLEx+A5/xTvWg0XEdRYlFRH0IEg2Bp0VReR0btu0Er8MVseFkXDq9XAelPgMbsRd6jbcEvnZlYOvhVm+/W3ES6tXCWNSzT4yA0ynkyW4hTj0HNznNKaXuoGHAQZpKoOgNuOdWQbYTZuSQPQyyvvc4V4kVPmHHVn6oylqSyXY6pl6mY4HaTVExoDj3u7ugeHCgxj82yT4gvofcMNGcAPbACaao75VfaKihf3n6z6eDtq3MIubU9nRHQ6uin75/+6jIJigbfaow3d+9B+3aWJ7j7PM209UBNI9yIJKr7HyXLJlD81k1i0OisIhTc51mg3zBfBrAMg1GPzQzCQkLZnV3ul02yglzgHsZwnkKvST41BSEP8BRcIxYgotkI4LtTkrhIgAufCYSBMo3dtVWwNL6zTlbfcXUMNd9y81Uq0rGG8qtGy2MliH1JPbu1QxlD1mCTurim870mImd7+9YT57zaTxScjr8EZpK4gWp9C8pNPantREL9Loabcvm7WqSF+glTqGXnWh9bXMJAgbsJjCAN8PLiIO0M6+mDuuSCNs+S8nuQvfVibczyB3xxbE8JMOK/mlds8LxUY+H0k3TM2pUy8bOJj9CixaJ5x4Okf/CLBggebQLsxrZMUehq7Yu0Xf0RS7WJJ3bkgFEzoxsi8wSi5D3RKTxFc0lVCUb7qLLSBma9vRF5CTGC00Sfg+gohLtTtpNoRPxXc7q2eClpv0X94BOvfuFn/g9nVb2JRAgPNwIbCxWomKsZIgZd0x3Gg25qrOqi4m4jFSZLKlYq/3GNdhmkPNZf1LKVOFIQWKtxwgutq/MGySsFPHCviUJ8nypLd0VSRiCEePVX6jIe0mDqVxQr4GMn4cbvi+5u83Yc8njJMYF/QxxROQniX11NKPFQi2j/XsijgjY5jR3ieHN82JQQphF9GxV2ncDCFfYWH4S+oYWPS+xjwprA2+HDXhTmarb6n/JnmYLmWBf5nipDs+SXK5kqsZfJH7lnPMurqVas30fn7YSOlHmuojQo1/eEFKMuNZ3lHqUat0GNIcUud6oICkUAmFL7ibPYqPdDTQeuBfzHQxijjB/jFBNkYLtBXsGBBwNeJz7+gH1ppcJV7tAVhS55Ovgix3GxZOdoo/dyT2MOZK8KWnOJEZVxYrC6bkcF7+TjWQslTNN6g/491/NMdN3kval+S9ga+OF6Bl1NZ2VWl0+/EoBUqDjW8VxrFOpoB6WTRTV5gIl4r+xcQfocsRyd15rsTyJyEjeLNACHHWe/IeXYaRuQTgmFGEpng4uZ71nZ1qw0bSnGqpdS/GMcWVzEBx1lblDKecYb8MGc4ErnaGYbSBLrFMvd6KCYnGJrdFORe1WcTaDTbUOotNj2zhYrzu8I87JdGdbdme6LcjWz6/CXRhE6DxI+Mbphd9f1Xi21u3WVIUIsyHgHU1lP5QynEaHPJbG1d1tT/Isae94K6pZX3zYmb9xHsQeHviCF2ggGh1Qj7alTAC30mv0J1h50LyWLdyBPDITr1rm0YWVgA7z6WSHIzctWo2tbm3LPNthIGEgEPgKHBSwUuDl+1ATCBJBHnSStuB2CTOuoZjfVnyVM5HFSu/2tmuYsg5Y8AXO3hFpnYG50hQX+vS247Cmvd5ES9NgKtigho7hpQSTyNbWUxDjrY2ssPPXE6nn9X6s9QUOBvrPKKBCUBwQ164UNUjnMNr9fwvZm42URHi8YPt9LvK7MPc/aKsXmEEc4YB7VHiosgmKYTGY2CTQpmNcQY4d4EjeKhL5IvjuwTXhH8LvmtL7Xx7P3A0hIcxKETbI3DD2R4No1gyHwPJe0oLhOs28UHgc2wJreGr4937zBdwPLnvOqRftCmtG33ZJukznJkp6TWptsx5piRj7xaQ43qNkYORhpz5jpVjuNVIas94slPj7Bq0sd8k6n08vuMSJwpejEjim+8lTs6JEVslG/kqda+wELe8vFBrDcx3nwSN+l/BymAnM0JiKEjj/EW8cAOoqqnyqvm0wFW/NlUlFlCuLrhRnHGnRP457S4338XJ8mb5yZBWvedabYHKQoNaO5dajhV3g9OURj661F/TCcoFFdl5q4u+xzqv0vDvknCA0iCfZfhsKRDPpfp32z8cgsuhuxSk80UwL8TiTvpApix0AlEX3xVYipBMU6fxQkUrUolc0hikwhjG2kSU0AqXrDavkv8yYhJ1VBxUBiHMUEKYyLJhFbtINQ4EZluhrC2USuOzjBxoxQ6dsjyEKIz9qBDdg0ssRJXwxV7Iz/ubO7z8GbbxVmg0BNYB5FlrclYdJkQ9iEKlnFJTF7VxvLm00ktw0axrfYMhX6SbfpzwD/NdbM6qfeDh+pYm2bbbZAcP/gINZ7TAMt41KZtfkxtSjoh4jVlNKUc6fdniIcKthJey/TUYvUG/SYblCeA71dcLH2LaWsr5Mctm3fMK7Xzztvm68CMv1hS7kOIixHNbDQ9p3qNnOzgOB5gcK/okP1zTvEv4RR/fRtVaVpZehDAfjDZJ5u2B4B2ylYDMA61kH2yf54L+2ddWNgQgv/uIFP7txSitee/D4nMhETlfbm45Obtf4KVai5YGocovRtdYkUslwswdCE0o6ZeJzlzUUozQcOwarSNwqaM3zUxxsdYxbK6SdB9Y2IrVx22pDD7gCAAnmhM36bmEan2wDCO1Dd1Bp3oJo2mjNoB/JxDuieSqDseDSBgYhoy/CmWlyPFT/oGtKZlBOmXUUUZNeRl1J2XKWBNL9dbGJRjmQ0MZ5qZwnjoCU3ARzQnIcqFS1sJfbFfTrdwVXROrGIG/rAgRt/Qe4z6CHRXMEqvOm33kuJurBP1ib6tVk9In1jQf/y7ZupweTf44YIaN5zAHG7sAjZ1rPkmBZzD7TAuwOj9qwXAfN/bRtKNqLHn+aVwMwIlNm4+YfLBIRyilD95UxtD6w1B6h8rbLbaPMX6y9e+/pRYL0WrklzMYyJZu9si1O4AvkaF5vqBaDgE1cWJgiKsKdaX1fpoIhgJNHkdmoPX19SByl8iwf5GG3zffa6elYql0/i3fS90HcHrSRUZrmTING/PZBKmXTiBY6rt2Rzz2BzPwo0Xpq4Dkf5FI8Qp8nIt/YqR79nPZ1bvYBkidPiZ32z2/NrsOyL5n5dVk7mNKIsLYyy/XUHpQ5+Nz84ugfyMpC5Ej7UYAKAg5NziI3i8Dmk/Be19FAw4eK2MAgCzf3r/4GYBLWzwpd0COUreLQ9OHZnHXkPaX1xDL1Ae9Z8cfnG4vo/gdwcOYYUctkbj3ARKxsyHtzBFmRGmb8B/d+oREDSHq3BnlnMAGjNPy5cRTAWgw1M8/CgqS7jHjKJgOVK+lcOyCfwJAMXSUivRAchfcHQMnBzA2THQOylc/j94Gv3ik14CIx2EakKTjOfiY6uuOm/Hgq2y0htRiScX9T4JrBOxuRBdZksSOnCvJRQEunHLTQwNEiLeXRbRVmLcp/clgrdCTTh7pCa8xuUCqvENVBGvCb7YaCwK1idSlzF6oBHTJNbnFHOPqxarLaY1QUpmiiEJlWR7ISbCVMQ1Fh8QqgrWqJkCW9CcTE8wTpJNgmlKvmdAd46pECi8KrGKBDPxKIGMVyWmKlaCxeo/4SgMJK9I4hM9RhSvV8Hn8i+XB82YoOyJTG4t/0TKT7JZuJ7xpnKH+oGU38xcuF7yI4Tugr8jJZh1wk7ZY2R0vkPKJznCznhzoXtLX7ByiM5yH+EbUpZ0LuwmbiH04CFhRegmoa+8YcSCmN5IVgrrQegHfofQNtIhViqbXugnfjFy4ekTKRs2VeiDH1O5tBRIOWO9EvoVfzDSk96QsmW9EK4qvzDSByuskaJcsTbhaqDzssOQa9IvpNyw3gtXe24utItcMJ3ITXgpT2Qr4eXkiWwpvJw+kS0k7VxQlUSZx+sRu5xOLhbYz/XJR+3Vx1vY3a60k83QRp3tmw26gS4St+g21LvYohM6+7hCZ+hVkgG7Db24pMdO6FmSPXagJ5dssfU0dckabU1TSVpsNzRxid2P9QOAU6JoqRJOShHKJ4wrfqcuxzizud4siy5uulV5n9Z5DCm7pYaCkphwiOhxmjWQSDpNKAo5Lo/bgGOawwJFFmqTgSIKrmMSUx0NdgOFevww7ehqUTZQ9IxogGM7NjAC29HQe4GMGh2I3Zo7llA0I+ojBSKLW/OecN3LnZns+37vUEdzsc6o9D3sfSvIKcqQM0rqRuT0oFdw9NhmR4EKb71BHMc9O2zCM+wGOpg1jg7B0IzoMpJHjQ5hA1V1U2waFzuQQa/g3sImiQ6BZfllamcURVBA0YqmMSkhYJNAEbBSDKlRwFGsM9hAlnxM5w0U6mkFBrGUL4vmSF6ETQJRG05EaBywOuuwgmVQNB7NpXPGZBal3+88HscU9gIZ1BxEIVdwKGJEvo+GnJaJJvCrYtXIkp4lRBih7C9n141ybuGzIyEV3napciPq2iNpQxm8jSZvTEgcbft05SlVyO3iowyZ6X+SZgntIKEMBez9puiB1hsU2ZHjj9bfOXEIBhI82RU8KRhhn6D1hhBmR4PbhQJ+oHZugYolvK0ShTOXeYqX7UVJvi2KobmFk4JFYSscexg4poOgebsItT/SZFd0KMpVhqs0I6W9V+G2MexlZs+JouMYQuHtMK+SWVWgYMOfjTzYnoMMXqBcoC/UHCLXl5slHEYXYxGlw03xeCr9AGdiy+ygpq3UnFygy+x16ewO1+DHhtYG9jdyJi/eacICZYpD04qdKKxedsZst6k+uuXg6GeK+Jfx/p8DncEf+DW5Tx4n2H3JeXkKfppuZrJD0bKrhYJNKUInM4H4el96K6HNPbNfBuBvtDSQLIK4EoVDSGVJDPtvgWrB963IeYo6Hjnw2JomWuJk+GrPa8FGnoEdVHlWNsDxtWfnwA12LY4GjHmoeQ23DctVRsHS4xoTFFIuFkFYXcMhErduWLpRE/94un2nlG/i1jqj3ldguNNXjsDruDDkCxxCDm+fcelKie/2Hgncjsj4zzyShQ4CKKIkL6f7xOR6POnhkMY1eCFYbrsqH7Q7Zo/vFpWJClhI/4qIy7p6Dz5IKNshiympY05GWQFAE3oGFG2Qn3ESiBwMleDp7WyoZB3t399E2CBnFCNiAYXMwl5I59DofCG71/ra9EhgMonMzMkgsrwe0juW8oUMdNWIbmPyYoUc7aNpZsB6rIY1Hamq4xfHDnICfL9RoE9YEBxUmni45b1l/e9ZPE4jEhcGfnRq4PC7ECR0NzAbyEPooYAjgRV6dODezYCi+rKYOzpAEb9TLK59LIEFCpGQmv8Cs2F1oCpV8FYn6BH+hIHtdV8AfAP+XMb3aQRV63FMqpffF/Dnqc1ionahhqKVrpJZpARk6cBgQydMx5S8dkALhTqSl6ED8/MmrcMLtIHqtEzDhi3ibEQ+gTMy+5jygoUdynNkWYl8Dl7xyT3y7Jjyn4lvcMP3LhSebo1Y09miOmrEcRob9kUiPedY8hRTA48ziMRZGZF0eUF6RuBQZXdLlpkoHKzM3wOp7zs5TpM+FBTwX2BL0KODTouAnxOYN6x57AbkPozPjgLVDFC4GQBeZCF7Gvsy/S+QYI4dsDYBqFMPBToocAFEzAE7qAiGrQEmfm7O+YLxevUDIraf1mcAExWwvIRlHO90tOu+SmwHimQx9h19dv+9FYdIXZXTqJy2zGp9xfq6cly0kFK7Be/TLVlE5pHuzWS/r2/I2J8tgukg4jBbthmDt0XPc2+/e8P2MU2gT6xORmcJ1xs1liChExl+v11L+5iTi8jPv9eL1qJDDxIFU4UNVWROAgPHI3Mk8KGSGREo6HwchPbToCCJ12+ipc687gtZ4uGkYdwGKKrZII6uwNiR8XGEAroFNk87END1GeDUCfNrpmx6vrcv045wnQZ4DyDxQC2pJWAf5xIZ5tvdmeMPo707bkOUKiYgrgU44jUcARc0MLUwYTxIhgITRJCgXzGZzDveEqcfeQz4nuxE4VI3u0lTGfKbj0S1MPaCHnSQQLvkRF+IhGhK6GCcQIumO8EEAhPJfzYetjgZFATuRDIMZkbIpdg6jsol0agEn04i4TxdrikmZ1MoRJrDSWO7pbrj+Taxv5Y2vU7FsuGSpmY0Nec/Xeefd+Ktp3sbFvF5oQ1U7LW/GqYPi7lHUkYBpgNvoGZOJwpHCXHO0DESmmRDTs20zZg1t6dG3Hd+LyjnvsnNoC2c4VTLRcfdcDBJNCTTbp/BJBjEFBrXMyxWF2IFDikjnjJtRFOoM0u/K2sdbCLgLk4HLUQwGEgCbvzLQ8DaxNdVFgbs/fFTFQrwqTolEnJc1N5HOfxkVckIRrj4KWPinV48fzqSgOXUgU7sZgTrPgWBLxtLHAXvq2eAvX71DMAjMCkmwYUroJPQ8ZhHyVInF9+onaiKOHg/iQmenPFgWiHe7u1hwrF8KNO71CMWwAJFETNccGdnaJ9iagwIjHrCpCeCrJkJpA9y9egkazbK+nWogGIW+FSGcuMrysueg/i6TzVnB374jDtIwP+zdPjLzfByNaWLmXumJpULJbaF1SGadNEQ3bpAG+aU0dnZeIxzBgZt9xwZ8YypPFdJqsdC5tkgJ5F0NDH2v5DzDrQEFfMibigDv1402MjomQmiMPOTkQFaq8vLMcBbqK0gO5v0ssqSm4xNMEZPbRqxL3Q4NrEBKAcS7QXwibGCwocr7eQZHYk93sptKbBDTZmvIayeLtAbW7lUkxIyUiYCuSTaxbjEzoyrYzaKzWDYqEYPu6gmQs2Q/t81eHgBWbSVk4mpR8gfSkilcWHQ3hL7pZ4Yqs6yIAKHmzI3FRRKys4AhvMm3tN9qMoXnLcWqwcWd8lzUeZDM99DW9/F0LGT6f7P9YN3vK4yqroxHPHJPm4p4IM2PfFQObndnHfvvvuCHttrCARfb+6ku8UGLs1on+5IOLbTKNc6atUDow1/z4qhq4SU5N5GjfzMtorTlCSEHaPGIE5ZOw4X3tnIJQFjeQ2xZqLCho1OYA9xMASrycDg3Bp67NK/G9ptzHz7De3k8a7bBeHdNFJX7AsZYLNnOZoCmk7nOhjUpuF19OP4vn3XSns+ioiwRmLs4tKwl8V/5s+8ya+rksT4a5ep9ze4lqIt4t36vED6UFRuhlM+jjCoDAVjeBOQnafZea2z5PLHIggCiuaOqhoywsfoz1qvhSpkAlaJDrDXhzImXES2Q+J2jGBvleFcSYbFub2c5ztxuZrGMaQwBLRCbFPHRRnsjkcMryUBato4XAhG3D/hrdQl8gwghmOHX5QDSO0ktoojrXOEGs3LC3FRFfISp9+/gPJVMTSY3V9mZLwKBU9V21RKJG4RFDOW0Q/WOhXyj2g8PEGt6s8VumiOgUhhCXtWzJB+PmPKRB/SGl0UCyicrBwmkqiKej3LFkKft4wu6OJLIkufLV77aFCdrUOIrCryA4hl6g4g93e8MRO+rpzboJnnRVP75oQ518KQbBsj+pGh9Qv1dLZr+udjCEO2YLWI91MBjvi1L8t51vLVUzNGukPGLu/PKR6uZTOFVnzjpJyHyOM8ZjL+zkW8WrRkDyefK0xY2hviAnyQ19qCEQwidSuOhHLHCAo4Cm7/2KZz2JNNXBpOH2BCxl/MqB67dm3/OeLHFPlcicudBItEHFeFnyz1RD48odx3PR8SO4jUUzvaAOJr4dLailtRepAp9ZfL+eGjViYvOkKRya4U2A9Z2KjWChZE5zs5QlBRe3OeXSgcLnVl4DBXNCk3NJqqXlj2YtQA09TWLLAXckg/NAea+kqzKTVB9/CP/Up+K3i/aNkOAkUlLj2R7vTHId0Z3GU7ppzmjIIznLzElEMe5w2LsQWe4dwEKuloaUrNBp0QFSr6HsECDofzNAUs2nG1FRJG62zINWStGlu5K0+H43OvAUW89o1nimCPbc5Cjt3lPMUk+6iRwEdBk8nvhYvDNlZB46FbwIfYfbCIc0iCYiNIbFtk74VTDRBbDIgH2HRB5+qzxdpR6Aw4TdDuqful1mJTYZhRmtAqDDAphyrB9X5BJBzUOF0WjbvCdgGMWpE5L+x336tQ9DCQidolhLFmMHgxXe5gJHJg8I4k3IXU3i7s5iWiKHjF60uY7O+vIQn/fNDnNIh9KHemMHpDugrx2utg2X9C0iQ+3BvEcW2OLjubkvBEjwKsfP56Oym13+ayTscGrM4CWm8Hw8EhtCIMkHJ5IypotQ6uJa/L/stcG6JgQJOPy7GsrEMYBmpKDDXd6hFvTW8ZG3W/Qq3r5t5MXZ1rAjWqZnRmfAEZiszTZ0FyGwGkJskM4Hayi95mV8QuDccHIGcnyFFg0vI/XIHe1n6l5H/QniIz4dvuiy1Y1Ek2Q5gsHuHt5Yq6/tNhsYtgy06vpjWl3z0VZifo5jiXeAxvu1nLVV5UORDaW34F3NydiCEtHrytVvbnnYphbPc0ElFT7ZBpywy7DDWoNvN8BDboCsVz3+nD1DZHBUFW6HweKc8UqQpxl3SE8CgamNBTJ0FGoufpqMm/rRzps0U4jaENFgFft8iSsoPqgte9IaOtkiX8ALMuz9WMhNaRwBRkJCobukAgQtp0KSykII8L4SjP2A3UPB7Bd/3RcST6rjc6OcBSoZUOhchZL8HS4S+01XfgRUNjCtyGFWAzXlkDo3vMlgmZEUam2VkKF/bDxd+sfsbJ9wQ7TCWMAOTFzUW4JOixwFGpbV5ez4m0DQ1cBK5SMgIWKHmbJ+fDGNL5HmWCoRYz4a7/4v+rs25EyZEWS5FEQgTh29LUoFiyxqgqtcmdnwamNgTmAwxtCmyb1XbnJ3xEDKP32xqbRzMiCSRjcPa3L0jlmHmxgZ8sEVbRCD7E8sPQ2J6NMN/A0Q8oGMD3wbj//31riDksvBjkBbewMm2eH8TfEZgO1W5PBc9Kubo4lrWenSdVygazNhJfWxSvWkvKLTb5iHoyC1ko3HCQa5K22ZyMRwLP8IybAj6tF7h3SKAWrRI5zMtwMNI8ibUpfTJqLdqCJaJFxPz/ON6th8jQ8KleVa3zlTK+Ts+YW8hMflYSXN41N162KZRk0JqyzzPiFdlLMEKPwVMwmviEXVdBAbuTTeWaPBatrsHrFWikxgr8PoZp6MwOjIdpzFEB0UcF2ivTuvZyOYVNGs5LjPP8O3GXDjRwsPJpom4/bTBdfY04yF4cl65S4uojI2DeO4FZfDbF04KrjeSFOHPttflyJXldCR24eybOHFGIpVkmCx1PBtGrBnsJNI2T4IFZU2i89oI3W1JMUlE4SGIXkOTKMHl8uybOxb0D5SqtdS5WyXjjVNSTYbYSvCkrGwy9oN9ChHequ5jawG3277nkjHVpiaSjh5JiomsojLXF/RTaq6lDD87k5hAMW3czKd5W7Jb6imkzqIlq3zsux3L1sPOP1xod3paRAnbM7REF3QwY8Q0gAcsRR04TMx5BfK7ARWijofHY352bCeBwydD6G3YrISoocEFwfDU+BmFjft59fYxX404HsK4p7y116OIwAtw23S2RLPbisdLdxyDh7tMue3FPSj+hF6/h0QFeLQLLFhYkTdMoTGABubZ3COd9+Z5icu3js7E4HSUVEFAydbBaET/X4UoU6m9gAJZxAUzFMgi6OcRAWLmO4nWcx9K85u7OLLzBViSdnjgofnoJASvKBvWUbUbHHu5zevISWhwjGgsOcbc8jxHU62jFkOnHk2ZS4FK2EDSst3zaCEf14pl0eFdOGtGeLEyOv5Jh2WGmTvbnacCNc+IlzSGvKyb9qqq/3zva3fPSfYtrDE8R1aFZ+3XPnIORiQXqOjhQZU1xbb/89OAV7yEtPoE6VGdiFAz4g9+DlnkxbzVs7nr24cUXlgfom/bwm04IeefhkTcNm7uefPj/XRXuOqS8eTjf9cvz7obV2bnmfDjzSLlbIawwUbvNPrMqHyTEfSITZm2VrLOvZqoqmms6s+j4z/QHvyuiKyKS11tDxZPsm30hjxlaqGM0C+eq8VleuMhR410fimiIScy6ET87qrp9uqi1LbYL0Wvp5kAlnAcHXqaU43qaau4BBckD377U6cxt15FcYL9wCfrKVB4l/PsGnzNvXRWSmPydmjJgb3zZpw0Gkg/+/LJ4IFiT4YOQGzWVks0oAfZu8YaiEu4v88Tnm85RwMmqCrg0W/Pdu/RzfAsnJBVqTSrtvqPFIgztNtwbvtxLw52weBO2ljNpMpcjb+siVLIOHXrVJ9cMqdXVwpsXw/fAwnPYzz2Z1c6GoHgpLfXogIsIH8o3fvHhy3SvLG8IEdo/zoyDrk3qxAQzUmfPjVI81T7MoxT8Nqg3eE1Pk8KIiVpfGV0iSoJPXbAZpTEqRMY0yuADqtdBR+0M+Yc0XRk8S5w8MO66EOu9gJR7m01/EDHhpD8av1Zf9oC/+Iz/YTITB0dHf9B64d2wjqUq7dOXeJMgFOwZFrUjp/tI59KwugfxaaaYoV2WEE7ch62vsJfwPvdnBvdVKJAGAikJeo2G0YVRlb5gOgDFNPikw7Lbp0u7/n8tfxxfw+CcNlhMPa6Mzh7oWSK7qpyaie9mxFsXgVrjuhukYwlj3kstF7DGOJAcMzu4S6d85XwTmeHSMOeQoGrHJmDzUONItDPleLu+14Qz//yC10fqDKwZP+3zDYEC6bioW4zy7r2ZFIE41gEOSWnyF7mIhMBeDjvsHxqc9Vfy+WUkRo8s9+uWuQd0K2f5le/yzhkn/Bzh6gG/3QkTH5x2wt8RGiZ2jpv40+GEf7MolCtD32JVs1Xte6hSEemk90Y/XORgL1fuhu7vu1HXsoelyzmJQtsXNNUA3Do2cuUaC8jJn6cSSU/Pkf/6DVOHHqI4VZbcGlrB6/ligzn4GE5ykyMDO+x8U5zI4sv0jfdRA/QvkS55JE8ifQyto+2fx9Dw0UI4jdgCne+FUIw5U9IY0baAyL+N5NJR8EIwp2/15lqg837nY7A7AI4IiEsI2pTPSpSnlymzIbEFFPH8sdesOjsYfRGedtvBVr66//DXQeJbgTXxBuTWsCi59fWxlV40f9j/+W8f6IiD9X+HhZpjsihKAKUyZQl46T7JbYBXfIuIaLeKBDNqd7qa7Fkbm5C68e+HqbdKmQTAsf23H1V6NwNKdj2E1Loy6g2B8RRPU3j7PLdXUcwfrMsLQ8tolChNcbfU326C5VV5XIbDg9Oz5D0UqvIyjsAovjCE0ASt34HWnu43+OtsQ+ak0mwcz+AoVO+6rv9CSU0FMOT46t60yz1F/ncYc2ZCdRbpDXt5XOYOPeJ5K1mxF3kZT4O1roU8jWx6TOQZjtiH1K/f4aF8vxNcF1mNRetKcQzCM4YfuXN/WBo9CgWdjMjd5QNM11FOLPI8ouO4T9r9GAgGI49v/HffOKzKMUK4XR+MqtRoo9rlk7wLDf9lMhb9qrO55+2II9pAya5A19hyEgxabJTFmyQjvsUvSOMeoB2D1cmPLYE1y0uDIreWr030XKCjaaOwD1U4q1N9TyPrA5kvDLLTH9HmyaMQ5n7HUA696OEJqQwFANb44gGMM3TEEdrvkKTbsKbR9bnv4F+AsstRE0Qv/FtlA+KYeg31/IK/R6OIfP2CgXi99sTSQ1w8rW+okJwrXerrGpLa5jQdwMEPNfuQCAg+tqsmOZsOR+P3nH+eaL3C/UNix8dh+1GgvgOvJXCxdbQ4FHQ02vtPw9sxwLaKlhgYmCcZ0vYwDEgnLKdidYig9cyuARs1rtP8UgbY3AQhGadaosGAdP5cCMt+KLydVDpgr91yEhMsYYvpuQHsfsEKPchErMsMZE0kTFetiS+B4sAa+gLL9maNAhYI6Dbv3g4JG9qHRLV4cLHPx29K/zmnR8f39Ll2NNiapmeeIVmymEMwdCvzVvEyncMXcpjrpxmZYd3dYHpo4IEI4DZnFc1r/n2wH0ytPz8fAye+gzHUEcK6tMkjPkIEwwMG78YSoPZw+DGhiNUoal9c5e4P0x1AbjN+L+AywKMN8hPoinhnbooHhGt/nSfy5YSyMSGL9Rofqd3vm9P9dPprUe5uLayUs2lbIXFhRkdrRxRgQFBFcYrRNjQ9rpBSRjFRS66xAdcK9iTpsSZKqIovI35XvcLqMGr7rFDY9jkYdx6tXPbXw5R1ypCNYAhX36+RDXa/GRhPS3Y3gBSAt0OOYV69pWi9CRRV5VSe6/0AzcIOR9fJtxkF4nS9pg2wYmsaEAx45xYCS6XinxCmE7sRdzt9KhaDWF10d2cVBfN5oVZIKqjMrYjDFi7wLnpF1TASdMemDbkpJF3XoVEKJRvB74z+vkNEf6DW1/sr56Zs07jf1ePeO1EK3eYgGaxzDe/4Mfo9UC7Puo1lAg2r+QXcxnwN5OKglSFxhjvw6WpGR/wo18VC7s9SND5ZEcsnC8/NOkW8YoX4NJLVdVe1FSNoQd8iCJjafgKlwSUioGOH2hLX5OJ8On9UgsCTNW0hnmkT9je4S8TvF8ppyOBb6vSX7FKE0Dr3kOm+UiWuXjqkpnzhynI2XTp5Y5vI60dZDM381E3RT5v2TsmPJS9uuV8p9SwZhPdNSPNLXZSi+5qG/mZq6QMT6G78Ghbi7X8YCZkCFhXidCBf48OTLKT4gDixpDcY33PGMUvTl1R93k6LmqdFbWdeg2jJDfoIh0CMdfVENKsMEUPu8GvPuyuZOqaC7mCC8VUw3o6lx3hV+YIsuTWDQyMvP4T4PmztSeTu18S6wt1y7eW3VbMf/MkI2Vvrq+fyEv3z2uZ6j/6sXeQ5ISXX+UJLxU1j3nN3F4jiKBHWWJcAzKxwRrw8AQ+wRqoGf1hTWjEhhYFFvrOptThEHOj1OFz4vMzNHMLLzaE/Zi9WNhZMBiil+s40fO/0HUCZt31ZdT1bN4VO7W81sQo62pRH0BAlP8bNKPc3Rw4gWf2iwH4EzsoXEf14GJ7x+QORVb3yVkd4uGnt/fOrOE4XMCDWgsN8A/uywbWfcJGVQZp7cO2wIJrx87PQ1QlXOwLaIDytpOYN7tAt+LqKBgcyEHs9rN6Ss3F8J0h51ClDr6cZKxAP6GHqQ9Z9bMILR9wLjqw3kL+ao131xLHhuzVxvXawUrYu82ObpMzMuoE5rVaKsBgY23IOZEsY2PP68K+hZehVLte0c+Knq5sQWkiFYCxljG1wHOvWpWUBeg3Je09SNjQmD+TqfmquFyO3XjlEHBhJZKC9toIImS+JxVkpXAVNtlW0UEcFd+7JWO713l7Jk+gK3R1UhsPAFowW2zcdKacJr1M9/oKu5VQAb2vpbmD+htqhA/JgtHsaD6OkjFVmV3S98KS7ZV8WCwFrokN92Y5a3eApkRXiWpREnHKMrLCC41cvvqSpJVGb/SnyMf+pQLPuMOO2BLEFtYMH8thhUWtGTy2gyBegkgB3TTtQGQoxLB0YcUuEBg6FPaadZK6hq9J0cvcB3ny1Q3SutJ/LABVP0msiHH+IKoYH3VUaU0TydW/NN46p4cLFeFR4zdLp6OTmV0EP/NrvemgHhWXz1k855nTG5NxFFLuh+wG7YEJC5OvDJjA5rdn2y0Byx7uAkuC/u489CrQl6ignSBJB5djKdPVxddbsDOfMPqY0SZh3Xmt6uGvU2EH7RXmXA7Gm0YkoXkms2xQZFNH+oNHlqWtFsnw77Ql766CiPhA2Ts+8rN1KadjLdGh7eN7aFMPLoLcJAszbh5nkycY7QY7J3CdrwYI4p6Udk9QAv6pZawmR5dXwToXL0tv3upUcZM2GvSJDXdfUyGDitfm55n6aP62AKzuGlkEixM5BXaxMx1MpEUv7vFK9Jk/K0hOO/wKEqvJytsitwbaKZRQztOgRSXVmoeo6Z6kKtWcBa0IBZ0K5T7N4WzsR9FKrK2ihrlrl8zzmJdt15AZNterVarynipUYIni7XRNXzAojIlDqla4OKVyHfwv+7SqfL/R0F8XDzTp6+l5wNZ0Gq91O2xveK7rNSF33NN53heDql81oSgLnWLaDEQOV777b6N1YpCgZr6rQ6mohx/dwluc7WjdKXCbRiX3I10/Gy1Zg5YKlTYxZrAB9g15QKFRoUbei6DSQLK51Sjo24nGcCEZyosQj4WKfFR3SZRM105qO3CLLE6ZoKphfCcwasdfF0bx7/gOMuHx26OU3MQkstI9zqkPFqqGLWshRXEsdZuHlCkOURRAvGSnMrVoCM52ruaqM0it+bn0U6NzzgkewbZlPxtMDkmPt7bzIB/+65AS8Th34LTAlCwBJs33REx+E5LgHzf2/Bqy6MZhIPL/QGPAjdIscWcyDKyxbvQPEOxSUzcXUz2b5p/0SqWSpgha1RXR5jTmD8szmGlAn+Rxwd/CNEd4e2ZvQVFol4ox9j3fHbeAjsIGazQmh6bUrWCnRmUrVUCRSolFpy2uJq4ZNpciydWqw11VTBCikWugISpTjAo+LxI1NRbf46XJPPeDTHaLfsBsnh9AI+P0VeXdRNSBUkQmaCQEu8xQtxbBMeaCpk326GXZ50XwUDt5t2rfl/2o/RmK7RMHDCA2Qks+aRwbTXek63mzz8U3vsRRG2rMALvWuf+SvNyKOS5ePYpgxd/jopEr9+3DcjZu13VvF+93aPCm+J3+/oYApL4/S2mgHga6rJtfp9MWV8La3rPJgX44lrixeFZb+vlICzTkgcSrWidmoGDEX1moXSfiBVuL9BKLOAcSIyRpzp4m1UieGwJOXNHqottdv+FYLenQLw85x8gRs96OCKgiH3zdQfb1STcAqOXSCJG4nClAPOWERIG77igTaUjZ2KLXa0dk3yDniZEDYX3kqOuxMOS1XRLy+xIG1pbMUQIXXPsm93zvKOtYuMuS04llDsPtYGe4UnS7x308XjgVaA88GpEh0eWVap5MoYVFXRpIOWEOn5LTRxnl146m+sWOnXUQBhvSMpLTpxwYgyrQiOY49xdhaZ17PCcbD4IZzQEDJ1bQ3/OmImiJO2BZ11Hv9sSNwzzuV+RML8kotV43L+/fDVDZI8mW47bwEpnUAj8o5hJhTtxJMFJdjutM6d1p/Uors6JYnfDq4jxcXm+oMr/60Td3fRWhzo/xXN88WfiO8DyD/CdN9RjFgszJ4vAC1zEFtstgqADVLsh1DnUbgeJbOxo7DTSPVuMzt05xBKt4+TkvGZnTOJRKp1+NUaD9WAgO7GWJ7aJ84g1jUcnUADh3iZiKtuRky0R6OFF1USIXSIMfcshEj2kSLRTTrY37Ll3FyvPqWFaKbwYlz8w4LsC69GUngvQnM4Qy+sJ0yIsbe1558Gp/xEyHgIjTfZQEYvCWodt2lB3CFl9TDpEfZJ+zvgXRwhLTxTusBVkStp+fD2bR3McnRVmdq5CmvR6UIH6II1k5mmzVXYdC84kxrzUufeiIdgvKhAgi6VUVatOC41MP95ogBly8R2JNBwlNb7U/CqqVDSlZrY2r6ZCAQea9z6rYpOvTL4cUwRWLxWM2IAInLa4m8xyodId4o7GO+x4Kluy8EZq0VtPCRgxoirO3nnKNyZWuFCT7A/ztn4hGzOk4s5StaQaGGrnrLueDq0izaoyCc5nMaChGMACScKqzTXVsGTwnONj2lRtrnWZBkiZv3XFSvMK5bq1OC+UwovUtKyPPhExQiT+/tnSdpXWpOiZF31xrQ1iFai972Ji2aE3PrHcQO5cJjsDHzIrXc4Mp1+GOjFHnki4iZpeliZgVO9P7GME8C4c4+H3cxYYmD/h2kTHadwP/wQCsnuT9sS+rzaDXH5e/ZxXbr86m+kqpMDm7jzvU2jeIgUipuGnc/OezyKeUcqzagOtHVOMdJSXCFuNfnq7CEI0u971neSiIvtZ/VG+JoGmVLTJXDO/SrM8qcscR6cFWcJrUEKSGpfHVC0TH/fDSCqtxjOviFaZknISVm9qIm2AvU6WDiaqVkMdWZUJ0s9eAwp5ilJV7e5jCxWfSEcbDlKdaFWigNl3Rsb8cB6pAHczKQIO3Eo5pdrEgPUntSboSoDy6HIFUKjsnfJpxdDIQjvC1Oh8j2HUTzYSDY6JDFOsbvwqO0VG7Vug+9EE+68FoT3s7y9iUkkE1V1mZcqyBEno/7cn6LQGpcfoDA9peaouATSrcoE7BKLnN/WueIaFGxd+kIb7pCj3Bqleu+OBXe6al3A4MYxiYyeT2eKLxVGGGyGsxtRxIm8DbygetdtKa7nAlKdxxVyZRb1IdXBwoB3D0abqg+nVeNCjuco1E2AW0xoOTbk69A1IyFHs4YMslRZ3p/I0M9rqEXt7AgKiUzHGNG3DLBKzmTJX4XRlTN15RM5fRWjhkTGefQMlM7J9VEF4TM6jaH7xEGYzdebsswuHsEdr0e8JGTKaonEbYD3qynmYANLH9fQ6+ejlQLTH8yO2sEwv8k8jpmtUFrcztD0Gc+eoOuD+94awMSV6cnvvidojH3ZssGphzBMYmuVNdZVU3ENmfk+mdSwrXJRpNbCXQF4IGheFSF1t1ocowFz2toar42SG6XeTXsBTZlVs2K+w9Lspgzlnl5bbQZ0kGTLRkThaCLQYpR9kzQXrnbhsZDh9bezURySNH39Vm5EKnHDgwJH3z6QdLglho9hNJv9ywbfqW7GcK/BoJli4PYmCNQykJhnXhjwdYpWzmqXNifNTwGEfcCTnJQxOdWgnFTWdGsiUi/j3Ox5OnlzI2SeJgbELOHIKidHq5aruqDPoyOy5iF1nuYcAFrogH6eV7S0j0sLfynM/7h/oBEHNP9YS6eFd+EBMJP0x1heSFh6bxJhNkn+aU0PXgJkIuXiDF7Rstx9N3QceV27Qa0DdqzgbU/ZlqGQZ4q3UL36Z+51v/BrgRrNLSLiR/+hgDpfYxjjW+miMCEu2BzkWs4gQCQB6Jv4cIfx31bvgedaxgbMDI1zbnEJsCN/PWpw5FWrM/lAlkPSdGjjFGXvKNlOTAztHPuSMcQpD5O83UAVmsg59cn0YaFWbUVhM/PmHixY6O8XxKQoMhSmCe3UBK0L6sl+DOSt+paw864qrR0bKuPzmoHpXbBZJbXSMbcu11mWKXQEqeO8lpNuHjEeFMZzJWTj7gr99O+QLFCjeGk+vROG454IRiKNYxh68gPDUZk2QV1HRpdryLRuvpiSXdwY0hkIVivizlrkPaIYku+mB/CF58rdwXC4OY5kp1sGKxfx6UmIMlTO5eLDEbncIps6tPYkerkCED3w7ATLnD0WJ7m7MXAclbXYuNRvXACRGe1Z1qa2QL2HJxc8RhAIdVr+X43Nivl5PFmMWF1q/TX+g6f2vx4nCdO12ErKqH96C8Add2ZxBWCAq9ik86o2g0bsn44j4vQ66hinOh0/n7ZMY4bga8y5YfW8mxOYvd2G8o0UhEOztZdgmHR50IvXHIpMPKqolj6TSWWC1ZRNMgfxPE0L2pbXCE8bbj3rvpcVB8wRpHgkvt09GgNw4vj0E+G4LoHeUrHekwyq/iJuT8MliVpz+DbIiWh/m0x/im4VZ1oIinhbVrsZpVqW3uS1yOqTlapD+X5DlhJh3+mJgnqS7AMArHz7Zz2BQjxhaxvMR862I3xGu9/fClKsrq4jn122nicPO+uSOsNGP7RIGEOlDvrf3DvwF4UFpkFJDHfTxUXKpl0yxL4nazbr73f3f60zEnm5e+gPLTa97K1mxAWseA/6H9EJiQmla+upBj56bEu3/G9fMNgTpTj4Nkb87SnP7jUQYVqAT2ifNQYuLvvjTh8g0qFjHiyrhGHrkhuPktMYU1yAXj89Bm4AJDnEbthTqkVfMWTRXpcEBSddK7PkHW2rXnobdjUcbHbGTKMKyIbJE2XujFmEEJbJOiYM4HLYxBnfmAqxLgU7j3M11SINbXgwRdy/j5XtsaFzzdduBmeNZ1rwEUvHSxbGHIBMEFNLQMTFTVhaR2DlkJ2hmZ8FfUWJIgKBrgguVcqvZLk9rU5/hxh9y417i4W6VwFjO18AWTLkQdQrWoh//ruoRMCPIkqcXcQzqW6H6PISvI9VrgqORh7f1h4hMRu7sk9JZO2mbhVQ80Hb+XROzgXcxWYsnbt+iQ/3LJmQHffk//E1EcRgUyH7XfXaLXz/ZVD8dS0klG1gJ6XKRerY1DXuJRd4EZqDuSnB6nJm/Ws00vo+9BXi+MsrEyr3WCU57tRSffQ/rq4UTbt8zu1xyMUTYGRRr1HGLwr1uYD0eFpxW7qYpnfXo0CBkO2nw4BF1CeX2OoMmMrvhja6z5g/hqagDNuuEezSTJe0sZuylID35sM2TEPfKh+tgMbGcT5wHdTvcaHNwF2wuSOh0YNLRQ2olDs72wHMs+7s1Ingb5KeUDC00ctS9JIsbSDDxRkrhIQTOlXetzlTgd3hd70srEzKppcFFyfD+PFGLBR4QYrgn12lRuh+p1T4kCMxiaumlDo7ZIsTLTgnmawFH2dd1axjIGZBKLnJv0+Bu8Ang3BLmRC9v+mMNxDo00IX4QG+7DQJmvuSzOhydq9aKzRs4mKhspuqA2oh7GQvHhLUcIC08ZzY6iV7ihvByKgWJcqo5ziuXg/DUHCPPYh7qZkLApfwJMYcP3fsG0DR9XeCgYsK93egOWrKAzAQCoOxSaGss35GhycSJdC7JvBE2T3Ag/fsOENTUM3oVE4eMY6+5kYGiKMNTBSrIQYJyx/aAgCtgLo6hmefIRwIJg8EWLekRgM3sqGkESmSFKZhAorJalFHKWE2QWvqzb5t2M7XuW72rl8SdoJbQkHRmiSScV4ceYDUdoG+My3s3wtXoltJM+v+WVrOZNqDSRNiglJ5hhERckpp1ECvyavpOFaoiISWI8egwoRkWQfD1vgvZFufG0sXB1ez2kQYalEA6sS4HZeEJ5Jpi3Xa73x7HoNIMSvQIEj9wqdyymoxLk3w5RLJSbzpqIoU0bVgGbbLsP5VhHMclh5DhCSwnpAAIKIETN84wzMg0oL/O3zkgbwawjcj86nm5GBRNaZeIP0jJCO8coQRzUdTw6v0ox4L9dCmJsozJ0Cj/OLMUjp2ASgZlAbT3YqP/iFgpLoRZior9Y6kabaxwn0DYxHOZzDP8g0D2BA/OaM/8xTNPzeE0qd71Azij7UMvVrWxZ4kSyeutLRbK1Xu1CCrpz56Urwez4ph+c/vAb2Z9PoYpqaFSGtPY6lBNoAQK22yDWJPpsJSXPup5XHTbLIcawioAxXRd4aRoCtAgFJq0+TWm0ba6r5TJBS4ZldGDwbGHXEzNUhijbOWfBG1OEofr+VkzH7gA2AJaXK4v+hbXBSLKbuxfC+QpZLFTGAyFRZFxG6Gti5oACslpWdBHQVISmpujhdB1mBsunQjVLpXesyp/sq2FOyEnbIuTiAdScgxxkhJ//m8R0ZqikJmEHMBmQBlB+aIKSmLTZG4hbifirNAmQon4FjRuhKViWau8DVaK1K81Vc9oQ2++JKH0L9GpTCsqL/eQfSE77Ngv3nJ4wxgTpPPyUIYywSf/g1RnjP9+IfWuvblEVzwvldtTXfF2NZE6a8wNaq0qlwpOd+oBDKlt0nH2gxyWoFVQBMEHar3whCVssLRsOj24rlpilHgZ4FT3uN4t9aUQBK2V6Bgx9f5NKjklJ5m6PV6hCscH+nwIg/ht5qkfVgMCr6ERtjF6WeUex1F8EZ1QZGMxSG+28QOuamF5zr74ykvi9Kg69QrIZs+TiYUwru1qM08OW7BLKVCuqq3pF8HCB5LDKotVelbuhJZp0i/Yn+rG4VSVAqsvQ4qtbzEHDVTRJ0CEV3xBh76uXEA6w2EjwpRZE/Zu/3Flijm+HcbFDgTLmiLXK1sprYzj+c8CtmWJsnp2avMXtGgRUZnqYKGTY0+PY/R45nQbAaaBX4XvWOCYrHEFcY6wGLRowhLyP8PolWbob3ogNxjR8+4ijHmq1321xHQiNm2UxDjyAYmer8YUw5kHh6JEXuLnG8F5tlsUm1ERsxscZTo1zWY2SNTzLMb/ytWTLkNhj8N2dYy92005lvZj2kH0Whe37edpAlU2sVuGGTyKc9AFxKDOsrsIdpZPZnsMI3ALWTWSvABeSD9L1qmsFB3BUkG0q7mzRI7VYiiQlTR6KxFZ1leA5NR7smnjZC3AbvsN4wEUhF87AbpdSe0YnbGRS+hMOqfxDROVP/WZ/4sh4YAYSrNO7mSDw9UP2P4a5qaMwJw8jpLv+DeYcpQSsiESkm7BN+K2S+PzuJGnaVMjbQpECr8KWnP78lmjwvu28WpCUcH+KBknaijRq9CYKUCD+KFQUO54S5Rd9F2Jq/jG/dPvHhusK4JpO0WZNth8MEk2lRd5Usu901hdjLy/EG45nTvC4StlFpxmyWsGRR3k1ajYPY4MTZtC0Nd0ngY3vws8312bfDrajDX2eZG5Uop6B19s6SrFd44HHBXqAdW4fFheXfLv57dZHucxnVLqu4uMscNfdTx4bw0/rX6y8Ed5hkBJB6sHkXsw2ESQ8TbbapFpzC7aAViJBBbW/zRW0lAryr6+pYX8VotvRU4SuK/nDyO4O8oi4cyLuNhSMR4uT9xolsM65QN2bID0H2siYZ4gMQuMEUd6QUh0VGu5sTGopu5e6ja95awqVpKGn/qvWJOnz1CNHuIRtJy/8GCwrsbPTFqOi1Xkr076/6IHuqqX3rLd0DnwcKsOJx+S/6rexQYRE/CkRnyeIXpNzzc3kxPTbMDO+CpzBqmXu4hxoDtufdNpQGBP0Ue0a5TrpaIfYywW1tSumx+63SrfYiAqoHxzFDk2s9xoEiWZ27Ql1sqJrSAT5QGT+shkE7Om2vo2F8IpG4d9mGNxYxGmNd6c4p7a1zththFc12ukphHWBPNEgC3b7Unr2L79bSjWewA3Cc5jJAThbrXsoOK26npi23680QuqLQ8co7o1igyBCnFh5OsyO7oXM0fto1Dkjyl2ZU++6Ytg5y/ShUufkxI8bMS4xqXrfTeyKJIpRytYp3OssoTTJr1GZVX3pTS3rVN5YLECWrxw49oiEqs5xaf4flhrE51jebrTd4RkLD6jndOO0jOduicoUAIFYtG4O0cfVSw9QJsr9IALJsh0V3u1CER6Bi+ho+QVuAuJOzxQei184QBVcTN/gJceCbYJbn7u41vZ4YwAFLw00OCQj0rjm3WJQgGJBCxNzJPtHhE65f2ADHyJtEnUKjid5YbGHDEHKlNbzm152D02/5lFxs5dyNGGvLatzeywh96mq8nOVKsCoWKFIA2HYeR/uF1tGMQFRwiB7RcKfmmAGPrNEHC/LW3xjJ5JbFvFhktHvzrL64OtUZYaBSsVPXeOfiuC02AglqmN4UT8+WGHOF0ZZgVggqhxGdVAXi4M4+Xsirl7eqLCInJ9oh2K4IHmt9i1ye5yNtnQq0S6RITEbWrgFSRPdRkgme0+deVcfNxcUgOq+KcJnNWRqCNTFQ2iQo5YoF+8Zrc9Nhmoa5YoS7FLOFjJNsj+IlxkXVqSRFR0fCE8ORLVPxXGXISIQgTTWG9tSQGXDnagUG5WOSdGSmOHmB/bmQJSF2JBY9woY6oDlyZEKVrEAa66+bzquXLRnxgg5UiiUsQUhPXxvWKo6Lft2GonqWkbPY1SArgImFxbRehMTdaT708vkv0JecC16oC256UEWZTaS085DEbHxgabL0tFkXBhbRkONPFrhaHX6NAo3AhzuvI4OxxRxxJFNT7beOSwiqCRMxoar1jPI2Tz69cfrT5Wq6uPBsfgfVHxbfBKwt9zWorVxZ1f6kj7WNYi2iUaz86sTnh6tBHFnuNZjuif9y+nQ24sGxH6tMsl6nXyFefi9+9RR68583c3P4sORKI51M9P8ssdWWk6q4t6VWSfAvjxb6mMdWlM7YMUQvDyKMZe1tqSplQMDNgjpgFkTaSP1xbSF0x0vb142qQnEOgz5p0373ftBf4RCAbSiP/QW7n24COnxSsYa8Pvg2y8ZQEMcSHlC1b/xkuQeo2MSjmU+TldyMaNY6svhxK40hv8NgXp1ABqaUgC929Lg40N5FmZ6Bo5i1DV7xsrL5x69mY0RRmVWy4izNxO1VZMzcszJh9RMkJXfd13BMuydtCngeRKvdB5bxyG1oMbA4Ib9H8ga2B9ib02bC0OiJZWWeG3CQscU1LvfTdqAT4pL99bCAy3YJWt6IWaFUPtiUrlFww3AKWuTOIk+6Ugruhwb3X8LsDdIOmmWYmgUw2qbRwF2l5pC1qx0UJVoDje+9oTPCtGP3+fnxvXgbmfTYaM88NCN7HqyjJybxBuL+dpSpB4pAjBDH1zW6ex+9J0/z4a4Y9439aYKNEVhLw7k/kdhDy85h4AdIppfzaiaK5e3i0nDM/BybnduLR4fe9aGbeowML0ZhPcYy31/OQk4bnaF0to6EyyA/zVXZMN8XrqJBsWUWiJNyWK43TFliMJ4x16mXRGxCpkjcYtZxUm4HRtaF3uSxo3gpxrDZo7rBQmCfPrpOg/XEcELM42boN3mF0hDKYxjT73cDbkNMfenAKA2LY3tpYt0ggYVPAc/UnCozWdicr8ciDyiimwGr4NJAhoHZDHL1mhNiILT1BAh0d6jxQHul1eHwIMuCF/5nfoSsrq4MqnxBA5x7uIxOeelSn4PFnLiI0G6SGAeOr1FLbKBv5faxJeJi/DX2zXfh90XooFhdEpIhCkhPYKUYtu26I2AVKc0Dmhizpot0IJR/GCGOUg9x9Qy04Lcym8fCqAyLB/FX0/ezJHDayGWjqfL5HvFqgIeGlfLSIbIZxIWR2DjQOmc2A7aDS6EnYdkMKEYPhN/tjFIdIAZ60v0qwPvcQ3I5chTKj7Kl6GCTULu4lIRDM6HrTKlR3fw5mrdpTszknwEtleel+3GawsK1gq75sBLinVrF+pih+CCCx2TodNe0rG2UFkNpS11wBq1xC2gIMvdjYEkcdh+JCl2k4V5gJWGpR5WfUeBpEltI46quG/1ihhmXX1+hAl/hvXaU9O8AVqanAipj1QueeDib6NfWkhdB2R9gzLmYtmeZw9ZcJuMpu/bppmzYOzyFzKNDrVGiwQeigRgzlX/uaAzSoWq0RxQH/gX4G7/1lstLlZ/B87jk9VqLuXohPJGctTExUJcQu0SeVL77olyidNvLTDtkZScd2Vr9aRkdN0Y0jD2cLmazNXRC46Aw4ITeAK2B9RtNiZrG3FYWmqrqlCWvOLWRESZI0I3KFDeK57TGuZ5FLawuCEEQHLFteH9oqhr3qr9bto1HP7oaaZ+1ZTGX5guKnC9M9fCOu+A78JdMEamrPyelrB/k9PduE4weSYECTkZ5HpYLDMXKjFa0RB6BFgyKzj5fDWgO6zczLmlF/8mcko1nsB0o5QCLl9PpAOX4KM7r7K8rC9gB2Y0+Zs7d/Dksg2bXKdHdz8480HiW5DmSsZTqauHCGvQiy1NgaFe8gzm5034D0mVJEek6R1Mm5Jkr+gk/5CaagNk6NmANIZFFENA1XuSwMphZniArGayZ65y8H2zBr28fUqwXKLe3OfcHsgiS7UQaw3ABZKbmMM/pgoO0yhc2fR+tP+Ar+tOyo357DseUrhmmYy6am0ABw02ErOlYio95SPDBMs+t0riZddvn4zamMuyP7ELu7rQV9HcXRxV+D3zY2ChWUErkqJO1BpFDouA3AhYBOveu+/cYuGgGa4Zga0HUwBfgaGlYjsH/8/+t1v4WfgwYWjAJhlQEt0MU5PJrEeHW/J1jTm/oobxckrk5L6xV0KQ0Ah70SDhUg930pRWrhxQRACR9NrqgC3XcsoXU5gIXmzrKyeCb7GqKMckakLyuFxrXFQ47jO0KTxke5CcKCNwLuBGRrZLAEOtWdWsOl12eVt+lFZO7tc9pOgUiA9C59sY/KRksPcmnHz4lrXlOyLwAHyGgtih31dQbJ4ZkvptqIH0FDfmdG4CLGM6BJM8cKDN+8XwQb3Xty4vWG2kwkqIEc3aoTaN4IoFgWeoueuKbygv8pEOG9HTkQsUVkoXNTclVloZuG/SbPekKaM1Ix7GJXGYeznV6nbbmEwoYo/ot3waKxE5rw/gHG99BpDabavBm4TE6k7vKGbSZA63725GhmQJic+NBd87x6RpwlqEqGIRWJ+atUEDdICVLBR2QzLkDFETYdcNacOFtBjrLu81JWVt3IXoZaMQgFCdsVhLqA0xd8rh3Xx6oBsRJUgSKzylYktcxGCL8V8roEa+OF9fH7mXukEXe6uBgjPub+hsPtNGj4Pk17KAyeAqPkFCgaAuK7io+dmIhjQgvNWLDRzHm6m//Xdk628PfI3jJbXAEs78r+eA/wRzJ9e9CM5Tt35VHtuFrdWv+dxJGPW2pbf8BYaCrcDfmuUOPyujShO5EsKriRISJmOkMt3/B6NlwbyRfpvv/YY1ngzfKPob8UDE0DpVDYeh5aJl5u7PD0GHIhv4Mceiaae7EF/lIph/qfFSHgvf+Tt/g7zCAZZybLCgUrfNI0Gm32Haijw4uKEegrQoFNqLhnWA1g5sCneIiQq0s+YDcHdoqE5GZCv2zkJ1N95unrK6+zxPIYUYbFdO/fEZvFcmjBK7fJuFuU/CMudHk5TjnkCWrs1+HR0OetdiOxKSmTS+CNwao8cvBaMlTY1mIT2FSKcN9wlRK+hMfWrPO7KqVwuVgWxKVIWe+awHGbC2KBt72ClV8oatXMKizR3uQ8HAkykM4sF5ujWNCK4m5BQTwmHXOLFDflLoxq2TF4mE25zhZ6UHMfeEgEcO2lye+B2H7JZKAjju1M8BLtLCMKfgb22+wS6vHUFlGGedcpiL8ftsaJw+F+8NoPV9XHq9Tz8Le0mRZypaw2R/Wz0puErrHTdno6PFrAj0OBnwD4IICHClxj10Ks6bRpOwDr+k5HYqv1xBRc4ORd1WwkqPEVdJ5qU6s0wqhI/QaLT1u7sBDUDHMwnPtS2lph/F8et5u6kxXswrwBZZrhsIhq0nw2ycm1SXh3lB4uMxjYWvrNY0oLULG3Uwa7vdTe8OSBZXEOJOOlXwZpnZCmAQpXZSEeZ/lsft9emjHXqItc06QQuFoJPhqgSn28seOLnhrDskEo8arqSh6uYaYGskwbTgGVQ+bgUAzA581pFPx1DEpThfiDfcmy+ESAJyOKjrMIgTXohziCRadIwkwpeQTAR6qEhKoMVrAK5jkQM/93iG6tiZGDYejjDwpMG8cV1PW5Z9dxhB/tw2gEvLOKXu259JE1abOUy3ruYDcm1FUl6zFFQtH59WI53rD35+xGXfeXbGJM4TvAscLHxDzTsdmm4HpKNAs6RW/BQX3fYCb1EODeEeED1ZMwo2plvVcUSfEnwxf7j6DPB4yKXfOpXOOn2gNoj1+vR6aY1YeBuXLiOODoNxJqBso7XAyqXSnt+ktgBkShB4DRYfX8XNzlxPp2zrlQPN3YLUEBeuXGYkFcU9vZnldcI1veE8RE4THMhpF73toV9L9TWHwgj3LohlS9GQ2CtazV/cmAYo2/rdjP75lFO0Kx+md7/JyTpHsFhJCGncGoWdGhkOllCZ5mLs5W1ytKpfNy9g0PaATAhRu4hXzorMSEdmxzi+hDe+QuCPRW+SIEap8b2UvP+NsiiAvVUjcV3HlLKWzvQIuFDoLH1PpcdP3qJ/99bIxzzFXFDHRrQeyVUURf/W4SEkfupd/pRgwAKgcRAq/WkJjauLmpaLcveUbP/jrfPaMbCOrNZ1URCA930TGuSYvB4qXc9rH+yFtZRh6xrF5FdW331CiERTUhDmEgvFAWDYSYuo/C+Lou752Fmwx3wyzRqQejHEd6MscPQnRaYdpqzJjjrajIYYFzCrcEHw1C7aLkoqromZH7fmhXFcYY0kXGLhhXoxJwVocMzOD5hL0oahi5Dw164wt68STHDwx3sAWRk6OFBgErRiuvPNSjk1y0qHKXqoPHc5mralPZHQIlybKrRCbLko7GWHOjR8okkVWTfxF9MoZIRcJFSbxwJC6lqRNiEmrkMsOys1gYLEw0EnJOSlkZhajGsR8JVtGpZA8mSwOWyrPyX7NXigrQ0MxCniw5dbQDcTBjKLZBBDpcUOCkAb/iKXBl01eRqJ9v8hi4wTrEl0QeQ4ujeC27Ye+VRX1XaJJ5Vw02azmsVII3AFvs30fM5ofUa56SL2e0oh6HvPkqOqbvMgdfvxVPUn9DD6pgvxujqFBdhCB3eO+aQ5qquIqiE309lckE1ws+stBid86NP1DlJB7YpH6BA6i6Y4rWaZuKgm7nj59tp1BXer8mmLy9aSAIjuPMzEjChbsRCr8Zooz85/n2Z94dRQYle0IOrYNnTCUXleMNMrnSeXhsWV6aNqFVAaAUNDBbOlzf0mlbsQT10+bqcWtf5nWP5DYF7cmVK5XkzzWEfK53ndCGVbr9u1NcafygccL+QGSTPQI3CR3iUX1BTayBhCYqybUZqHWLgCOt/MuCC3BgL2Fb/tuaGfX+MNfZzlcNLwgD6e0XikrQEzcb9aiZDouUtj1alrsbTG1/J96lh32KyN0y5LOKtU1fkvFJg9dvP5B7INvNYYTuaHXYLWz6WzrbkHJubrOOrrOX1xDxVErp123A43IJbccZyIIq+3P5dPlPXSdYlJXDMCvN68XDevjtyv2rr8IkNnQcF8Xs4YkZskP+o2vcMEXJ2861nzV5HuhgpJ7FckTDrEjaQub+gOUdN4hFCemDxWWttig5F19T5TwcTrXOxmhpkRMzZiRRpthH0AaPPtCj+wtU0MZyc5Vh7Z4vo8PoOdsALakmrI++GOe19o0vGyUzqDlWI891iFRuEJHaTZ8nJcMWiPN4CUjQxpcldfrB2LUicitliRGNaM0r/QaB1MnvLE2YVLn4cagI0YDcS5c3PSGosC8iffjz94LO5HbWVI9vL6qWTvN2mmrY211rEWrFq3a6UQ7nWivU+11Kt0V8AdDcGxf+wvdPcGKLIib0DK9qbbRwJvxybsLJCnJSe5KpvCXPV7SuXzDsnPOJtF3gafxP3IKPJwsDEPh/H6hs9APDhrei2qBnTrz7d9JL+l8Er2JPp82MUyZiY85brg3Tc8n2w0nv6jPN6H9Nhdl0P5oL0O/BB5kdMbNHfugg4eNLLfzJkiCi2VmzRBJvPGFfzo5VJ0Qf8MIPIRMvgnCNxdTiIlBzmSeoyiVnymzImJ0/myI1DOywRFnhp2/hRBuR7musYHcyiOsXBiUSIFpKKdp2fQUIVfelEcFjYX3pxPvvrdjEqD4yAdU3lF9gR6daXgB01rG1DUrx7n9m4+t5fcyazltZnNGLb+z0miQCWjbGIvJ8MNyRhUX5P9Md+9F9sqlECFdAbglahO7B9LLJClzuiTSE+cLG9zavLPt3s+J+O2fhT8wNsmfYtRx8b+Nmfd/ddXQM6ILFyAkYUIQJiEk9uczaAW1tNuVXnSavx5BFo3Zehc6TohxyK6gg0Ra2FdnpI5A4pejdWlxFLAJT3yObC1C+4VnT54Hdzv4CkMg6Q3GxhdZG7VKM2uV05/Oh29TFgArZfi0ZNxm7AxfKZxSXj95c0qDREffEWx6ZhhCYQ+B+rdp02h+qosC5mHoIZRnSIJtqt/bdODC5yxOHTC2eJFRxrHK7C92VWvwHu1LyfHb+/mQJoookmYQj5RnbFOz2wZZ3IpylssailXX2UrAxoDAWgqE1M3VtiHwQyG46aoO+JwArrDQQ2AAq7+2Z/XrVdV562BkXPAFBRbf5uh0KgLcgV8ayKdBpAfa8je4yKyUDpXv2Xk8skfy4eYdgjwXCijC1/Ep+BJ+1DktlUp6lLeIzXV76njWrZGIX+oPG/IXjsp7RPb2+O+cI3+3NRi8C9JoP01NJ78tDF3tcMEJjg8HM6Z+3j/e4VzRjRorp3f17iPGMsG2YPkq0EFt1zs0hgmK3u0ZRekw02CqhZV50wBcMhvg9uTp/pdRdhWiinkkDI2iOgrsqxdWLZOaDzBSWeZ1ikduAYVXCXTe67jd37q+Rp7OsTX4X0a6E8pEt/zVTfCjg5gLIU1cg7g7SfD7J1Xs8lRpSoYL6Q1MkxBS8SCcriuMk2F3GVVOZgml0PFgfa20yKgTNZVe3t4oci5uJF4+qU7nX0b9lRmLxkgxeajxcDUNFM1SGs0N46Lm0RYwMgjzv2xHgCG/9jtfnutYFpyhE1y/nFM8jIHl7s03ok1lQ1DoD+4Mjs4dR4gD3VTE2mQEBZxSAolHngyYhh6WbzSi3LP1siule+heMR5nqnj3ARmUpW8OxwsAjkNg8kEjKz9xovm+8iNP+oWbe0wNgf1Cm6nb0DTginZmyz0ksDW2V/n1vr5iFS0gPA68RcMzHgtKs3i/N9LlbJodo0qCxWKV2Eo9plwsHJOb+dzKMfzZTERFGIt0s/JX5Q/qFi1xH4wua5t+f7dYD5rs5sbyawj3fuW5SiCjwwchTz62hJk92j24vv7TxR9uv0z7+5gWP+GuvtFZ6lobR/0V/zxjqvL5WNJ9CEWIR1cY1swY4ibor4NCgG7ucD4kFv/2wYdarG4MN87T5QzTY40Xa6d5LFQ9U7DFIolVAekiHZaPe724dWz/7Wycgu/FuGnYO10GP9v+5828zAu27T3WtKdAXm913mkLBhUw2WuOzdQLtYHAbGwRy4c7sixH/Da1KDMRX5KMxsB7MW5fi3HrAOviMf8EqKAUvCocjO7hrv6UimRSeNl0381Pi6ZxU02/b4Mn/RrMx7vkn6xNj6kMaafQoVctjtLh4xbegQz6DsI1qMJ0WVA6SSijVZRYgYdRFn/+4IPgqWkM2djqNqk9HHeWhrUxItjDs01jhRnMNgbeMPECi4zRYWTS5NxxRs7Ec3EGwDvs2MfEARP/nv6Gfe5M43BZBkfxgbJugOXyTbXn3REfR7R+WScMwrB8Z7eV7bS8aMvnHM773JNwMlqsMxwQ4LrsFfE5XEGixLKLF/4T/gfO8RoyvHsHL6+LXM0dP0i+wy4yl0H1hSjdJZNXMpmVoZg3bBnwnU5Hg5CBX25DWxjEQwPtXy3jpuDP2/DDaIzye3rfoZL+1C3cwQPI4Qmq+ZZ5WqyWQqQY14IfkTV4T6cgy/PbNlBDrb1Z1ES8fNO9I11s/Pxo0zVZItyo/PDnGY2WXjH+/bhAMKt26KA05VBr9cnGBd14dNE4WKBOQ/A3e+5NZdDjPOiSK8FLXaDD6Yd1rEV+WDfmLojnDz0njT+aj4LIo70sbgmquZ4Ocz0na+MBO5aZVNjhfIMb7tEzR2aH8hbbzKETkYnlDBwR2cfEI858wOGmzuNfkwxuraaFbqOTDLFc+i7dzX74HMtClnZSUw8SS2c/4Wbsq+aDSJ3hAM7ZK1U9w/tIKJXEOtuG9t2W4w1Z4B85GF0erQteyov5VHuuNpccktl1MvrkPhrkf3KNNmw5Y8YxEIIjMmhqZXcxrto91aEA9zycDXMLnVCln8YKDK9j8ARBkLDn+oWywjQ6r4XBHEPKPa0oMhuGeAp65xgUe+mKdwyxVx2oOUK1/RJ8klh8pEtQN9oIwfqCnXbKJKz3k7nhLIk6MgcViDQmYoiFxTyRSi3PZ+ZFNjbGkMZEDDHGGOIohgEYYogxxgQiClVpW1pyWhFvVyHerkK8Q4R4A3KPk+TW97bJkxvIxftiKeMrj7kTWyxNF34iyvpuUOMfCDzmAwNKy9Aq//J/H7ZhHFDQATudEPGjLh7V8PgLD+66SFCc6YcbjzvsqDt/exaWphc8XQU37bD93pZnpB+HM3gdxx5eSSP5Bytj1G3Dc1Im6fU90vQX7FFU3i54jTXbGPiMM4dZ6GD28ExETkgsUdhDeR/3jPrg5ZabQfwIaokxdUc9g+XyYx0fvx7xN2afLh47Mg6JRWxpGlVtcYWH9VwzgnJK2IcGPUSJYl6FCTW4jdc/qRg/vm9lNDqlgSEcUVHGO9nhWZobJLfQROwV2+z53m6eeYGysWvKGXnOaKivIbfa3Z5u4KZpOPfryWeaMnckMGudqDzt4nBPEKnC3yYMOajT/0KkY9y2RkIp8zOEw+QZ27zOGRWlqodl61oyVscEOafSCKF74LPasL0yl4aChqFHQjTLvSRNHX2cjFh5cXvechXQbb2MkEJ2TvOyR1QfYc/irrGPtrNjNrtq9OduA+vbpxvTaxTlx4R7VGwv3F32iCLb0zYt9TQpiPYMkfFYGdQsmdEaxjJbk9v4y4hf/HObWYflik+LlAtJDznLjssLlc+dlr8MvnW53DJ7MIxpwXZnIRVVQDK1FKGRJ0z90FyYqbOTmX8u64U5tqtJZIIUtojLsDzs7RHQYkJpnPqHX7bbIKQIggmMjP5APEqMipXRYRy8amsN4/UEiwZkuAANK10wyUqOdnupYkN2YOUWXaJOT2mj0Z9sluRXnVae2B2MoGG117xEmjpxRTGB6WEx3aMot7K4SMXYQu09AEdNTE+rSt1U95BnPhiqc9rlDh8QEKH2dft3wnKbYGl//ZjhHAwYvcrVwuBLPtVXfdL/wL6S+9HuEFqNR2EKNNNZxaRPhQQyd/pZQDkeC5kOeknhoqxvcHwr6y3B0oIxPzhv9FwDNqF1ILjZQ1JcelAxEwDWL8KAHZYrPi1TLiQ95HzuuLxQ+dZp+cvgocvllvnpybUxBTF0TMJvYVPMkpH48lTC7ynwUNim8slNorEzT6ZbqbSUFCjohKExMO3oEnKNdUgtwSM1JIh/IaE1390sZcWIYSoxVMWGtKqwTvWCA2xGcU6OMzKn6E3W3xkwyIiZMN6JS/cIcJlV2VUTpIkAh4A/N6k/dTfUCCoXx3pNKfxaaXtRUbs+aj/rCrXhJ2WnRfR6/z1efSytfp8+P+AVZAUb8g/T3ZbbP62fsfaGRVvr5qLz69nim6D1z8CZt0TWAUxstunsz8qL9cY6ZRJ+isXpWtKaeQ+gM6CLMSqER9slRXhgdbVSA9TGXac9rwtHcSKLOJdmxk6ptWqCsgRcrWbmFisaQDl0/MFaHGSSB1U3ROCqKZVlk7+iwXTGC3M61B7Au5G4ZhMsX/HjzZHdp7h0Gt3wimXd+z4VLPwvezHY65fpWgpt2GwbWvOsXx4p66yXGNVA4mS4aEF2e+JWFriTKfxJVcsPkG2VhK7lAsR0rOr3/I36xiCeWF0fE12zS11V5ClpLlOiCy0hCz40ZUua4VtMcrSmTsedUpvK0EMFAkPQAK9mWCjEojPidjS5WdcLdkF+AYNqFbNFtgrvQbfIQXaVtY/YF0QZcjoWvMkcS9wxrERiutLdP1Ay63y7sjyVfAdcqGiQbkovF4FD5/nQA5eGrqxwPrSf4XWZLeQeAE31ERvBKk6GrhvD0sao4fbpKZesExx11gcz11zPCLwFE0aKTaUqT9LraCnVYbPeM3VQAtJ9J0OrWfMFyEqRwWL5wz6hXShsOWBtpzVbHNjIcoeVl5C+qno0AaarTMXRUueOZwrAxyC3g50AKsA+Jb2DFfWIwdMGszT0+EIjCn6ivsJq0IX4FLPJHb064Bd0Ypxso2InXg1GWfVNZUini7jPeDBUstAKW47hA6GR/O0oFgYwU5wahHeB8SaAYr9Nw+8NUR+aHyLTKknYkALA04sZm87WyktBVTlldsWkE7WZljLOSD1pezq1pn5XZ+RunlMmCvZWi5z+XWNprkds0lPQ8RfIpBiawFbf8capPee79rjakCVWTh8WKtgNxIYtoV2dU00chNT6hCrOKQi8ZenEbUnHN3zzbTH4dSTRiGEedDx81nRC4A1uroxklFx7pEYVLY3+vPLZUluO84Sot1Ohrdz2ecTkCMQPhJGRhoWX7gxse/3Fmk6Dm1X0ztjWcBGrbcc5j3fQYjlpWraoQtxVXn3CocD7EREOrkQ1W3pSXblzpkqzkBDu0x42YLPlQqZotD1QqequPw3iYZMW3sfigvQmT7hXCI4RPbP2NK3hZVsXyLTdEv0PSzlpn5TyjI8YgQsOjkMNTJlydTmPXDwIkoiuOdPJiI/QyPNBIKK9NbJ8IBIFixwnIXW4KZWhOjJjNsoclCzKUIGzyw8T7DGD1vdv0bI7LbtPESlKorUEVyxOqgBRWsL2G2ykGrFXgcT9neu3by/cnBgh2LTFeBDuDDfRaE9XfaAFAai/PZPRATslRgxocx+PJH801RgkJM+ApdsOQ98Fmn91RFf3uUnvj1WNFEwKR758XjTMLmX5z7Wj93KypONcUfABBS2OjeYfTKVaPs7eBhAV4JUor9tBjD4eTtUd76JEIZebnGg/X2iB+2v6hSm+LlFyK7qlOgwdN4prVWkexVxHRbrHh+7bYkv++8EcUnszzzIk+7ij6jrGkHylg8jQWafyIFksoP2cxq/jQ9uz4PmvtP823VESMnQzH8n7n2z+5izpTun1fvdJubnaWRbfx5u69HKaWDelTNlNLUckLgEMU+IhIVPSEQEhn7jrPygi5AQsntiEDM5ZXpQpJY6JpCKLUl9goBQzux9GPiCipzHWUBqY8tdkXVLNgDf6X/dA2RXfrbHuoA9sxP6/nYzYPrQ+4Nx//X7gftf8/UWKwzd38WdW8u+m6w/8L7WlTVZd1GgSmMwCjRUmJn+7LhNcHUXvI+r5x+JhlfEGmvtxWI/9VUnvPJlCaqd9lP0saf8sXdmtejvNydSTLVo6cWulLzL7wGeR7nQli30FfXr0gYSl2+BGuIZfXh4qgJ1yWuRg+IABSGYK0gInJjBPf7Op0J9nKAY1h2QLzavESJQAX790GM3S6NmcrVAegw0ODahHdy8olI3mJ9KFxtBFa2goP+2tpmnqMC78i6snOU4Kfwak4Jf/RGGoMD1yvfCOj3sJVIRuMoyO/V0/XBlP+g2lV856FsdIxWxWnZfncJbWRj6brD8CFPBAHih091SCB+AMnPomOA8clb5YFdk0JdkJF7/pfOOVUAkbd1z5EaXgUnmDS4opwWfauMY8AIV1x/k6m1g/G9vU3KbU/4YSnpaOdAxgY/qNXZcZ+Idhxq7x0WuonFi7DdG43N3HbfBYHdWC75J8h9lwODHctvcSrKii4sgzcbCl3h4XNsDZO66YxxN72Ew2sI8hv8U5nK2cAgt2DIqd0vQGjahTwpGxzNj5DCv/IpJpmB/QIKeRgEFp9FAQ00uEsRLcpVymmLxE4O4Nn/gssEvk2RCz8rbCOOXXvqKUppsFig70h24QkTwjsa/JJJyEL2YKctondRt07oRBcO9jBqN6mmaB66pwZ2Z7JzwCDYDmsRnU676ucc/tCNNbWD22vBIQXk2ZwGBn48apdmL5HwBDMeHtlH04WEDX2sluRF1LvMZNjd4dE2KDRMJKFRlRhny0UJjaa/VI+yRiOSbwTCRe1eUxKNLlQLuCZfvfKLai4Ji0jACE7QF7A3oKla0Se5FHthylGYLEJDdWlsPEAA4hLrPVL+0K4ie4D0gwef2qUkaAn1nzHZufVf6KjeHxU5jNiiehdr+kgxtqivJ5ikTROu6NP/+EycJg7dWE4yki/9a0dHwCVeIntabwJ+xZkqUtAVovnaUHdkgb5uzSgwNWl9u7Q4lqkU76J6dz8LYGv/cdUSVcFNcuqRZmUTv/YSKrCOUjIBmfavpicFzmCdBaFLeqCRzHDF7hFL5D+UEnimqEFggoAlJAEFBEIqBRXf/T50JBFaJia9abBgWcA5rHTRef6L2k0GTXky12mj78CqLgv/Sy80VGPml0yfL8wQl4gvLQQdzd3vw0ywqOaXH38HEDMGa0hVRU/k/VzeEleH1zkMSd1hIsGJml+9aAhk152ol9OlbaEW7ely3xbBruF1BIJyMqvVxSw0cG9LGrgbsRK0qCB13yy8wKuTOrd8nXWaQTmR1vBNg8lfQpLvG2rvN6CQ7Yn9PnAwp3JmfvGo7c6SR2CHSsDNoiqwTEw6uneSX+TjypmMOOLTCmAWaD2uMW6QzdJHiYmBc9fKa+t/rBwmNZDGC1OEkHFhX0M8CHOWuG/d9YP1greMbivDufo38kb4eRwmya2nP/d0kRFaQHfV1WgcgbWt5DJHFQWwqjjdhtI0pSiPF6Ygyu1cyYYg2yLyjKdogIrGzt0PVlMusQyXhN8E7iko9eHqP/l8ZKZQ34OiLZDfOny/+YqOtGxnfF6+NMNOBDdPsEtcW8cKjhuDLOHZLjN2eEKhNAh8RDQ7N13uBQ7fGry8wKjYK+v7E/sxcZthxaMGfsKBqztseLOajGt+8cE2d3HveuFx4BailIE+gFDGC79tQGAENoLWebULKti7IVuh26Eht0mIDkFmEbzUj6zEnK/0pHmQedlNqRXEuFyiIkfCwc6kjDze/HaFGJN1SUuhlaBonhUG3Q/DPw/bSScLdHgb41AZ4PZApfQq3X5JjCgSJuHwkNpuXAlNTaF1HhTQb62haYNY4JzjbejV1rVv0v/dHvYUw+lA5zVajrxYHNaLUo0KoR4Lme9XjazzWXy/A1f1Al6Vkcjype9nFAAARynoIV6fpk8eoVKT8gY1aOkpdYtwaiS/XVeNhFLGpo6o4Hd+TbfnTtmqihC7zpccydO6egeC0D6t+vjOgd8DsFNYahXrN1S2mcB4x4YElr8mUvcq5urJT/B0jC/jw6Nx5KQ852phMSSt9aYReEdqvgngsIpr7WkHLrnQZtFCM7wRIjgudtBN8x/tTcuXpKC4LRhxVxgFqeXHCRpMhUuKyw3P8qcliilPf5UOuWyo9REp1uM0GM13M6AEZYVlkqGXWRvu7JfhQwJRzDk/fcNaL9zjpuCyJcu4Y7210runak1ppkaOS7sofZlbvIQFPtJR5MQQGDFcQHNUDWRDGkMUlrA7z8n0s94ierIiNw+hm4IPCZuhj/OyITYBF3MFfVwZEsnY/sgVnbix3QiwF5xnY0sOnIcR04PCeRo9Qh+7H3S/gzxTKiHygEDXqrhdMMIBmK5VNpCPQNa/zyQBWg6CpROBdtRoJ406R/ak4dloRA0cUSuM7HA6Eyg/8hUP9yZVzPzaHkdWdpx4UET+gB3W3HjXSAiQWc9/h5NasKQauQBghvGmdu5mZjwNl45FonoQIDakZfmlZ0gvbT7c8Gks5e4mpzk1yAwkPmh3eDf9qA5aF7P1gBS1ZJCWAGm+TgkekUYAyLlkZ77ND6Cc4vFOc6fSqBkMAKIhPLuAR71ogLtS9QmpBps/JG5b+FsGJhkDQhFAO5cDH0DD+Sy2gFVE5AZZ/pOHr4HRtax445Ghpnub8pBATjF0FNtwIlhIwYgJrZv1vYC+yd9LV7FHkVhwjZued4NiDa25MnFrAM7TlQOoghhDVdfAHQIvMG1+9lMvfZ4OZczvRRpDza/SKUsEAPUmxbpJeAWOwsnXs8mGcG9blxv+r53xitc9u3DhqL0qiuGKQUZRouQSRYYiHsgOMkh0qUUM5ePwM7TLxPo97pwRdGHk0pgVrdYB+Vib/EnvTuyy6oK89RzFJvK9FJGM1LQjRuluwoa5TZbAMDTnPystENTbp8KdtibAvBg0jWN7o73cyRxTbmalFtNasrRKE9O/nddyvwmgy6BKEPKfbQW34TxMZpDJwP5j/HzjrwmpyYmxSXik2Na72wNWonBApNbIW5dwvGheCme7TUfYM7zhfxbagxeTwWA6+xOAd87xkJV3FLQFQlRopB7QowLCO6b/otjqANfElECixmY5tVkH2fHt8DPeQwo05C0PVjH6BDclvmH2HFqMpR1HsWBPZgU44XThIZ3H6E/O4oFXomAA+4V6M96QfW9vGf5HRT62awiKxNf96IgT75UGW/pWgPw3HWC1BUfhQ4QlLhdtg5PxE4LHrR2BlCaNHayM3zchutZXQj4goWVlyvhRELmexcvydNeO7CCiEOJ5LAEltsFiIRvmUi7zcRNRi5SkDcD5dTfOOkc1YF+BY4zZK8PozJc1rEOpYKWXgfKt4UNplK5ug4N1ZVkuIdbPTTpkh7nzSwcbiyL6t+1o7McV6zg0N4oqR69tIE89D8khq8ruZUDKCnhW6gS6NBE6Z9djXbxngfmHyv84nhOwUxC2sxlo5PcKXklIBP4Wggs7SV+SDi9ULi/+M21J/QMWMEzxwuqoJ7I2KLnMT60A+Bxu39t/TXV5SRdEfkDSx7GSM58oRvgXG5Es3SaztnFT/lyujbigLConA603yBl18SzFztoG5FqlE/+pwjQfEiihGGchvsoZLVnvvZ5XUZdY9KKS6iekumUzPJn0XLrg7UYsYigUuGGOB6EdroqukbMZSmmWBz/0bVqRjze0WyHfozUxSTvQS7ExLDcwOWev6MKQ49bXJN+cS872w1iEiqT3OsHcU5iMJtg9yvM6jBhTVuSQIpZ3OMQrvrqjLpaJuP2WDT1Fd2AsLPFIue2inCgCWxzlIJKjt6PlV1hSeD9/7yQyFY7Cl2gZDPsP6iT1bEQueP7kAhoRoXWFnjO0C5ts/cDMbGFwRZhZqcxkHhqik8jVxDEN2crZ3BKJeRhbLyTAvifYGYx+WMWbDK9cxplvNfRmXOSjIU21dxpAij0Kf87wo3VgXjziAo3iBzRfDMiGHdB/jPvOQyL+XyQKMOLAeHovi1NuFDYU0a02sqwdHYZTLAW/2bzKOCpnfOLBt7SDASEjGQUgo7zQOh5qyxjXCQ5fUbCDClhGOJAHBM7DSlka4rAkFFOBZG3jI8x21dJxiwclSakgrccFbt0iv80yqI8BZlcnzJvDWelY41AkrVMFHYR6lbMGt8DJJIV3k7NSWLC+EVnfKU0VPUUTYKSGo6JcCwz8QfbrxbhDBhK14iCN4yYO223ht/POvyNzEZUIoXYuZL8QaR4tQ4JHb8QFQCAF6kcirSKL7K0/Lv7zbtvGrJw1Rgb1FykuRM6oxdDtuzFY4qYG/+SnuFW5AcISbXKchA680wWGGtBdzHRwWm+p/pgGazPpLiW+U0ynGJkjRwJwsZk1VpOh7goghxfZdovFeyLgxoZcR9pSiyERx8bjf6glxhdWIhgXHBZn4bi0AUEKm8ywbstNNyUh7VWhAQcBUrzvdtGkHr8no3t5dWYqVOgrm3+DlVHKYyPI63/UR6b+mjXNMaFx2A2vg4nznEhL5yD/BlkiEMq29nhc/uPrl17hPbym8iq1rjwgBtj+/dABRAR5DlYfmIojyPUvqHM6P36zkNy/WJnoAV/Qnw9ZUP6GYQcYD8ut0yguiOoPhsDuXfC0eisTolFT6pjaP8RF1vajvjKopPgCRPL9gYBwpRuWgArIFozfZZ2M37MDYXZA3wRBT3d0HS4A6pZOiu70DuQ/Eui08jS7Ufqw0gjC058UdjjqcByuUR1qnULCEc4zrPRzb8MrRhiprnxOKH17K9mP8bDP4WGp3f1/zLCICenSfY5B4p4zbEWhAufDCBHCiwgb697QWgo7o3H0ypz2hpulkUX/24pp1bYLEvMJUSBBjAZPmrMsiIxBShXQ3CLtIbI0q5GB/8+NofQ5rmwQAmjz6BATqvCd6Zk8g/xMvklbU3/4b+cKqmAcT3dqPpbmZ+0HjtUJJMhg6NSOpSoUhdHSLkwp//8k2HPLVrbTb1BpFSi52jYrVsi0QILkKXxjS9RIZJe/4AcKTK+m6TRVdpPrj+EBxbkyrel/M1mIVgUZFYCC3meSDWpK7H+DEPr9X+3QptwC/VbiMRbaH69XtK2S8AkrxgwYYqPCr4ylr/wpGof1ehDnMovYpNPy+wC62a2rThj5+DQSVwyUGm8fSRITy3jnv801znYFgc5PH6ROtX7DfJxwOUBgk2xb81viwv+Gh548LFYMkKmIAxrxYN+IWGQvqCc0fqJw10snAZ295cTUOFesFybO2y+quOwWNttl46nesrRetsUOvUeqY4WsIg3/d31z2A2i1N4C/4jxGRpyM/1rb++FyKAkmhdi1BGm8qz8Xmz/+WqUkCmeXAglP7S/q3pn9YCiYY0G3aI+rEmt2UXC+mbbezp2WWSObbVfa3MTb1f9JM8rqcU4rZLDKd5JSjdX5cnGq4acASJRQexegUGBtGV9Y5HSSQkV+N8mSmQNDx8zBAFeCHe9omT3zjl/xnw6+4ua+W3770/mf9gVDu9mmexVSPQdnyS5OU31ozyKsEBDhiHei+5MY4uamAqReMlN5ALuxVw3yQsAxMOdd8Mt0gPeAt5khGEvQfXcJpvEOGpnUWpsosUDqsW8FKWpsiXNNT+KJNysBiw/JzvVWeJfX+UTEf5lD2iv6r8CiPnMJL+OeQQPJRGTC8k0w9yhtnHDcec4qXvXg/lzDN3d4PCfvt6xYMuTC27z4nuNWtfeMCfLSwmLLrmivOt79uZwzfuZo5s9wcmiwArX7aHcLun8SR0fDqjRyCmHWNq8UWIqOzxnwi/8HWK3exlUnyPXsi5GjHXKTxDAr4N54+iih3pR/i5gXbBAjCJZBoE1J8RacYfHHJgu5O55KF2pPyF+Wem3aYGtnDcY0ej4ab0oeDYXetfKd2duzdHbbzpHE17xT7eeIryB5+mz0/kCqGafuDrADvNcuSLx1B0E/43bPQCRYw/Us8oEAfSuw1LtEf2qUrUsq3z4OIbTIiQZcvsLm3mpSMLamsIEFdMEKwh3A8izSw5gVKPJv9OG2BcnNrR6xXF7T1dQiPUlHIiVmcs7M0KZWzyC/4kkbUfH1oReEcsRRORqKYJGSWXDg/Kooylof3pxmdnHM9ig4N/87xbYjvaYXosAZqehs3Jdruj4ZcIINzxKBjV580yYQGUuy/aNfYU5UVmhYwreQRru0N8xC1Rly7WenSEQnDey2XYa8CITcQJE+fuMKnOQt6xzU654AvT6+6/gwYlABBMNoJsIXq1P0NLM+y3v4cpy+wmxwXsgtrRxcuB8ucg/3bQUfmuVPE/riVdiXd8DkMaX/+ITsd5P1m6/1xTWHhaAhJLGWJtx9jBIf+yQdBTmMkcVzme/yXZUgjcYgaESPUXeCe7aOJ9uyWPGr8sZ3Nt1/O2AFH+loWUvT+KzDPnMyTky8TMjTv250z1G2G/67Ym+qwJ//Qkpsfzb+jDMbH4BCYzyWDVmrspsQfMP4gXkg0gG/xtdXcT5SsoMNLfO4wp1dNyTQU9vM90dZw9nMREWan057gCvgsP+Q4FVkW7rZK1gtCyeY5DjKAL5SVQFAurJAMVHBTJSbu4L1BmHXme8sb/nXceNX5ujRvqeVtOsjA3bQscs3OGWnlGG27jJL4t6GXwBa4+/MRjifCjf/GL9fWOM7ZDqNCJXob151I1MqGECGYvBa+dUYEy2ToPTvU1kMeNjb3qhcUdNb4pEiHldqI373pZ4kNmzF2Ac9N5XP2OLDSMpU5JTd3xagtgc9tHiUdyEiJprH0eCPcmm1F188+/ivpnw+JqlQoHJfa2ttC4zLCfF70jHItW4jeLNIN1lmNrHDwFalHbyjLx4eZeuL8Ie8fqW7++cruCVB4W2CDFY07NHwIaZnws0a2CiRB/hQzN8LpJohtFPYeImojNY5EoCC+kGc+XE2H+Ni7+xHrssnC3Fm3JsrdTVhVIZkF03CLJ/QBsAptQHCe8zLDxIwLK1sfniSfbYS+Ad9RoBNJjehPfr9mWiFKlZQX0GBM9RMflCxe8y/RIIQLVgX1QaE5zToE1UbuJzYUtj3wggkdwBl1Z3YZUhpp0sNBZZrRoNMzJTlucYkfxaXPoeL5LzTwjn0EP0MvdTApDfQroDNuJsDFPT7Duf4Vt3a/XSaNjIrWCnG/rBNQBtmybQrYNPXBbjSN5BCcsU4Q1JWO4nhYqGvDM/VRElUqdFu02fW10welbS2ljurO7Zijgy0m5J7tEVawvT63M90RKRqXySm46jo7PdRQbTe3ePFmVguKb28ZEFAzQIF1CVUEgSJXGIQ55PhLMNViyu4H69rc6lDY5rRmQqYf2iqLc28gZW6aPIiR+RcfpWHMC/lX0X/8lv/llQ8sLJr3AM1mX5W756kQjmIsClk4sSwDTZphCDlClUnAVXxh2cix2PcX3ZSEvLLyyoI7xOzm5NzuZF0tNqj5RWvnjOo5VdLCwO8SbRMUmjXHyi/FGosYIYUhRG2WqlWFkKg52bJon9ivbfVOccfmzKuqDLFk6aiJAcbam9rTti+7SiLpcflFsoW/nadkr96UtllEmp3t1VedfqlWmGFsHi0M4WkD2rzVF/dK2ZduuSphR2YCBqcr5PW0XoRF+XMdOi5WfbAV7AMRHYg1bBpLYVIYthbe4A8pKjfooWlWh/Hp0Q4K3z6G6wh/SGIWLjJbINnzNdsbmJwEoE6rX9rbDfMKZQSiZ79Vq3V8kVUm0d0JHIcMavc+YlQ2Nv3ScySb7T1XurLqZezjyNzuh4NCqEqPmaAebwkN8rDCbtl3BsDpeeGPtgqEmDvDuqXtv3bc8SyMLnVvquQjA412O2WstCcBpDsCfdxOiosmAluyu3B7ltxhRVKRq32YjiOShxE2/xygqUvD7I8DCfduNxKmFTaXD+76gPjDtwlU8r4c4QKES7n7xsn+j7s8Mk59+0/SYD0mdWddRyOwJvlpwpGJbBkcd8zwcYsc/vcXWxg4bmdbwx2Fzpr0tnXx0s5lzVt3eXJXd9Z33G30/9yBL+7Mb5GIoauX31VNKGMy2Nog34U6lCkxOhZsifLLu0H/zpk03Kfitn97NKxB7833q+CtWJIQuLu+XAMtcbOF43bi6W+qa62Ld469N7hxeaHM3TmZg4LctEJ2YRRpbOWPf8Tcn6KtW8jVGWiwt5YPu3NaDi20xztu9ii3212k3P428OutLnrTgISbmhFQcWI7KFErjS05Ks51CCRU8kjqZZ6Fz0TEaNEw8Z/PpPYv9zpL7+QmigLQU5aGyklwCKqSjEwrpp84rddT4wDeMZtD6chxYm+8Zyea/wCEpQJrnKTtFyJ6CV2wlRVsaGWfMB2xH/E2hag7GzseIMZO7T6X8HcBpULuektFCsa+qKGx57Fc1d6zfVWE8q5o0YdHIbdriSLZzN7DZG1rvy2QX8JiOUMnTSnfTkWFCe2g0fJw4o7+CSdoSmA5vaZdvEUa9wBmycIHCXpMX2yD8j7NG87PiLiLKEudAaBjHZRY2bCCqSr6+NhyZCK5SZDZqA35TOyG+CGF6HsaNUM162k4nFNXs6n7MUacMld31nncK+KYZgcvw0b6BQZWvqD5qkhJ0rsoSnmpz0IUj3G07AsSxTc4DjhWZyM0zh1bPp6mUaZejjF4SlV31nfo/DTQpo/DNEfe5m46mxVMcI3qyR0hVYzQURgbcB343WFUxn/e5SogIjKBmU+vkT6HI0z8YuYNzWqnn6+TUIFdJEf+/LJrONiWJ+HPhDX+6rCkJ6ZbdveHPH9lFF8I+cWxv6ss2fbgckNOuwwzcxiNKcH/Tcu+J5k4dR9you9bkL9SE/JBa0P6t1zp1XT+ZR5YMPT3kJ9yJLzjxDJFG5q7pioFm2cpQMAckUB9nmZq4r8TbObj/3m2Do6cVAYU88bt/F7JKs9xllXmSamVRzbAukY14OLzgso845Iw91gDBDO9IhVgY0OGLSoeLEdEBRZJvZIn3guukeSEbgQwkzRYL4OQV6D1+cs0b4MrpsfjBBhJozAN1rp+wGdlhh9S5kCloxTrhYUyEGtCm4xelv+ED8brd1w8uEoaVp1IDQ9fnEVnD6JIlGP1rh4riA1j+rllEs/KaPjvV4pF1NBBiyv4Yj0HW1fSiwwDZWDknfTnJ6KFvJrbhm2MhCKhq+8bXNR3U3VlDgR996uNQAZDCTFXGAK6+IIxRXlk+ny0wCar1OC9KsNfQjCH5LeywRZCy05ovpa/ExpkB814UTuGAKhHsdzC/3jAz2upQ0yPm7b0b2G8LAywCzC8S1O5nnqFAG6E5jr6J+sa0suiOL0vXZiOWh8vRnhF5KOJDzdKKy3jP7CpX2Nu45G5A7GRRRUKpr6+2hwKkkRvb1G4gwZEcLm1uZfWENY5zE3c7SIrH9cq3ABKm1aGwigyD0vP/3yE4qJ1+864DqmNpBe6MTROF1qGBr/rGX8A9EtKpgT05FDqBnuzk2X5Pgi/kiXq4eCVMgnEukcmJSPXS/u4/Ol/4yceBkXBgkwwcVLSYMWkpSthdV5Rye+tzLTNMApeI6i+/tHY3phQ56gVWfGgOGZfTYMdV+cgPRFaTGuLJo0q26oqtwi34sJEAMngURS2/QlVS1HtMMoWuO4GE0VErQ5U/RCZBLy9O78pBrsAbQ5iiqALOrG8IvynEQUsGUEuNaVnu176PZPuPaQMUeO5LzVp9spICrFQsimmsXimjKA4/doNAERcCFwxQPjbSn9VwKNpg7oIkkhNAqMn7wEyGCvArQDS/ZuGnPC/K7x7YCohkyb0i2iG6Gnd5kVQG7XXxhsA9l59PXyP/72q3B9O1beFL6+HdBensHfOFHrqrb8s3KWb4xmBER2PCNXnngisL8QTqRDQJszYViilCBeso/VWA5B0XT8+XP/+dKG9e5HFf6pq5zRmmYiFP801g1wa0wGUjhUkzhla/wslPFlfGYcOvvjKYI0TZOH3hI3cYMLnncuYsC0ipv17VpIp76pQd/twq2asYVuLeLfbW/eMGds6ZPWXIektjS7zoH3febv0ScL+magmRGqgt4VBr/zTH9IHa1c2/rL1p957jy4dvXPy1uCNkZFLv10xnyW8qoZl17ZoemlS+C8C/lVQVTrS2F6/R1gTPLkFdZjMHyf4+8nylNjInWEumRLGHMccPkeboymmLobF5MVYiqZgqUSlBhI2mrLnbvpfAaVE/bnIQTiagWdPwKQ+J+rZFSVw2n/paH+IisTWhYMjtYM5OoRkzg8ohmP/RwrMz2Uao4wknsOB33+R0bH/8sE/v5BBckI+T3Lo4L984IdkS/9ny+ibiYhP9lKZZ52/slbcI/xfProfZddUjM0S8iRaKwhp40nukMyf2zQFva448sEM4sEmagk79A8P66FRalgbauBSilLt2kFdpsp1f/nAuF6RptIIQvyN4i5+XpgOEnplbEsERBhLzTzWzLYmf2oCWueS0Z5H2CBnTqmvi8UnIrvt6j3Gz3Vj1uROHG+SJ8Cg+L0ZlfKf5ED8XUF3YRWZ+Y7WvX6VMPUdd6vB8T1JB81O2AmcdFrR0ulLXcDpuBvyHl8vD9jydl3QeY3PPGitcW5SNnxrFHnAJTkk1nvnzTzFVmPX0G1D5FgAxtvpke9KOosR2J8R5R70ZeomlPAXf3MC3heWWvNdLTkYLftWdp2E8IJiY51EaZl4YrAEROpWX9PSLCkpXZ8NbPHPMEPGF3H33M8JR6iQRKGX/naRsET9y89WBFbR4MeP+LMvGw5MYYtIY3FohsPu0VqnCrXGoxWh+egLC5fcjNTqs9es+w1rS36+rZIs736kUuVjRCF5r65iDlF+DATwAjVBQDzg1xxlk451p/L8dhiZupQ8g3KQt9jkwsfdB5EUwzIYbaigjKrnGLJzAz+K4a0uSoj6CR0qKyhYGMgAgOf+mo/KMoUUQLff43qft8iAF3UXjuIHdXdgSQxzvnwnnBm9cfxTFnTegs9D8DxVRYOInoWvLeFp6SD8NY1sOn9XwLG/bZ4WpW68sXNk6rrTqPzWnwYfHKnWZXWXZRqaRON1B/Iw8+Jd1zR33iJE240klXuYFF6Dj2y+RagVadb6Rlqbv595jr1wZ0J/lqRKSrqlrXRP+Sr/pteXAa10w58bs5CLhpv316CWs7Eqb2eTpFOCuVo8A6pmnzwqFns+p2Q1NTITfpKvRo3ai3CtqldGYvTdUzwhoTIQMxZ4F7NNDLOsRLHBtJDvsA19rlO8Q8Ij5jMJEgDX20pSM42n4sS1uy4l7bONg36gKyzcuh218Gt6Lxy3d2J6NCGdRdTHk0MCQ95lKrM/8PqZFHLxw4IQWGqoozyXSY1rXNZRwf5ObiZnDfS1iHgDhXJEV2Y4d1J1JFDUbGFYuQINkVzaErf3i+M9rPBa/ZkPXX4uSnhbSTcWfH5krmBoErtuKSUj6x+TG2qd2+agXkiPch64xxe/dT5gea1zJf1BuzIwXMwYvNkNY4G6yCDwJNRHm/6t1uTZ71BJVLwmjci1YrpbuViE+XE3qiqaxgGY4KaXQtJumBybRkXWK9UR7GLrUktBjaIXi5G+XioxyuRoROLONZ8peB3qq7kN0DdjtEOPBcIT51mUfG3XWo7F0hAzAVV6ScEuSox4bv1Wl+iizFCVTwE5V3KeyI1ikwzVrGoUhqKGAkWBXzgN4efakfLuWOObtEbJ8DJGGeIfgIzLCGQ7HcKPhiuO1e4puGYGZvJkxAJRLZGu2o/cPAf5lovVME5wIR3saqJ4vNoQ2Vr1wa0PNbjXnxKbOfFESgXOn6UQ2S4rWZKc5BzLLxP6DmWbpSlGgXoLQORPr9QO8DqnnyvuDt35otfBDX+3zPJYCIyDbAQeRTtTVIB0zXxNQIA1GPwerAPEwjtoQ0UmvELGMbVFHwUSniZlZ2iSA97db2O6JRrwSR86gBavaST0lWZ4dMjSUjEyMtC7XBnOKeBscy8aHWsk+GfhLaa24cq5t6RwyMJZJHJcZKNtLdnLZd2L0HoRzM0INamKiNBy8T+2UimLSi8ThadDnijLhEmegtbmBElzw7C7QMp8D0mzXPaF55CfZtTUbO/GMxvfre3Z451tpBXobHo6QRH8oyJfCQaSqMFRJVTlqrfSerx95mQ9qxen7s9XwVtWVhwv4EbBKWzHi4zaPO/8GNG9JzqmecvQL+H9fmio7GDkuGKV91G66i7zxjgj19g+nNwtqpl/74E3w63Y3sX2gV/5+uBmbNyy9frdIt5vHaNR3oLM6Wn887sIezDaxEZFmc62YNlf09CXcv/h4w0ML1ynsS58DUVMdjM/UgDFMkM+L/TaIrL2osMN+jGCB1IldWtHu9Pt2BaMxBUgvAWzu/YzIA/sjPgUkRus51hF+2ZsCpNn+9LkAdYnt3UXtHT9NpOQ+T5yObMLR4wxprtEZRmhUsz5mUL5te/2iArezWacAj+zrfWRailWD9egxZr2ZF2dwLjbTYlwU1V8XR2ZIK1QMdN9eWJhbK1rQrECUsnUm1EyGZSCvWQoPQTWB4NaVVkURGbou7gTOaNif4Z6P7nn2iH+4M4dv/lQo5MEKuchvtIrNBwVAjlRIHnlTlwoqXxJB5Fe8e2XTIUq9s0xHHdkeWgh5f8GhEGa7He7PT31guz+nsgyx/2Scjm5JsxD1Wy+HPHt+kOdZkvdIKxUip/dGHqr2sAFNguxsXyzoUgGrxmaHHHgoVeml84otXywX2qr9ogGt2hyfEBvfjFUeIIsUsoEfKO2TlvpaqdR5r4mTKlwM7L0GFg17ztzcwTYiIR9WuGhwgmFMU7MRkNJGvjY1AgPy+CCKPBczpOX/fu76Rvl9UIUs0atFrZtQ3QaGdG0urkPLDzsp/rimNDkL9JRBDgLdv/EWxGRr3Kc3Xu+rbZkzidGYExcdxUp/diYsVAmkf+RMFw2pumBVwjz5KmxYgB8ONZZzI99Effs3YFG9S8+HhB13/dVVO8/9jp+V2KzotbZpN7lNpPq+9s5DeV5A8AOsv37ZayE5dWevVtWS8kWnAN9v9xTeR+wRnfAUJEaWTtQ+AKwes0PS2XW7fxMdkkHRLBlaW8jITUpGlfeUGqRvWUzKM6YvzNn+8hrmwbVhm0n4fHZ61cK++82pJJrYF7THQ4Z23PcSVR/VSR6vS7GNUFSmFhjD/BbGZXNoyWRmMbKB2DITyaqkXpaZ7WbsagVGHApLKKSieQSuaGqcY16DdW1U7Tu+DgCdjRcV7pPYU5ERtXPbxSij49Xsevg8UVXKJVSYPGDnm5xCAqX+mlTSr3vIb2VmWF1t/4Fn866vIDuiwsPeXC1lY5aI7ik73/SEMt+DvJxSMOqzd4lPQs8japU0DGUU+Zt2j443WyTfPhUeis8amLWzuNIGI0a/4hlWmeshkeWZVwZX5dxk/D4wk8yjeyjbOEcgVM8/iwhP+0/Qxl4fzJ1Xv069Ja/EY28x6y/I2qHPhfFZYIY5B9rvmqyUsqdt5jX416IaKeRMX0AiJgIsS7aztFTygl2rixJLSyBPj8qTkJj/lItN6e+02JSafl2y/tlXAvdeRv2nYTBKPexC+PaFhtKEGGjZBW/U6XTFtG5FSwOsmlSwGG200Tc+LgRFImGGuUAJfqqkzlV3ahxjDcPeindNhcsJfnZ3bobb/JcIzTqPxZM49d5Dd4Zmev19Wur0EKzO1+ATsSS1tbNxPl9Nsu0yZrlGaYwzcvKrDjubaxzV6hEIO5VBgHceHT2w9dq6PCoNmLjMdMgDbWw2W48QOdwwdaqLNAWt9vbWO9E23LMqDirnECpNZTyIVB1xifYdfHkZrPU6U8nZ4lk3emXwGzkdjrYNq9/ern0lRLSF4mz2DUqQaN1NXgNuXe+KubafEE3QMGbyBniNe+dPdqLBsTPJic2zwWvKGyJNcTcx2p/P6IIeFuXaDlt2rE3SDGO0fO+RlLQR6+KPWX70nV/j743ycK1mfLQKlXw4+c7HvUv3sbFRtF63fRFhKXTQBoje9Q+HN8bZaXRNKbsv8gE8VvJgRUpXFXA6fCsUMMkiNwhmKa8Rpbt61ajebxtMS6cSbuE5hyfndcqDKRUFx2FTNw/0X7T+3/iDTvOUCdouMnx5ZaKbQqXuPd7V85/Q7Z0PsmVdC8ObqI9D17mutgeEhITDbpX2LwvSWZRGnSgkqrS1VCI7TX0LskLtWHtlvc/JrCyWMdkOwlfs1yOZzwaZQ82vZiJJguHHJcmjkSM8Edn5kw3YTyqfn1qkvqtwlKrhVwbWS3I69ZGZShcuKG10m2b0Rie7eLCIBXP0XTWC+hY1TI67Pj6dE9uIMVQGnzEyJHF9o6to2grmtC1jqYj3brYuGdGp/AY9KQ20Ol/15UPhRENYpvNw39nPj6Izl3hSqP9ftFQBUOabhJU6TDtkMBiscCbgFvdQQqKOj/oZZKoNGsrzyChfKtC4TnJeSjHNMyQR3VR0C2GHwEhes4c1LFUEpQwdPPCL2wB1lDB8KCZWbXbt1NYyXCJnBXh6xPad7SQBDfGvyqJlgv0/3efspM/XAA3z/+PjVd450nCUaD8XYo0M/bCZZx6w+OvnXsDPNtIW3Oj3T4ZiLWM0mGUlIL9xNmtoZ1NO5J143FtxWEdLYXGZjFQHxT2Ypr9yvf6wCdntQJTSal8l+IOFBqvsvLi7q9laOhcHmu8xiIPKTae1OHD3ZP4dK67SB8SniBiHvDWLDwV9HsFKRR6bU7T49YMbZdCgQorhxcWLUtxCGRUtB1ERBKA6qTPjezKUAQ3Y0Mf72xqlekY+oQFsAUOWKKAZ+fAgyM5Li/IioC/48oIgsl7id0SHkjvJCkGHV002SXW4Pz3Ni2jLZMsGLMERsPdQMY5DeHRURrVkTtEleqx6K+BME4wTqMA55Sn0/3agEhAbye6K6AbFP7CQyUzvD5z/DGCQyqevFzKWOTJA7hdENoBDzpUhyoJOOor6hewgnEO2AE7QfdoiyvUKLlZacyjOX1m7KNMrVQhOrJnDpFG5QObwcF1mgujgGL1W7YyNokrEQo9pDjyMx4NF+LpUbQdx4aUf2QaW060xfbsSNIOi3Gek7MiBYC2xDQSClj3irN7z6wJq6QACaYpkJlr88SXikoTNCT8yv0rqFxLj452xehlwCVcZh0RCEf/u8q35PAP0g8ObSCMMZj13RxuRhUkNhC29vdaZDw9Y7p0Mw7z7cdToWF3yy4dietuuq2pVb+emUJSZJmSmHKI9ktu3jAnny6TMjGbmpPH4hQfTO3YtPtzP+eos7MsCPPZrz5PRn/2pHC5wMdgOrc0+ruTdVNAf1inUsZJj1wKqdzbtqj18oGvPppaMQh/h+jrIO1ADubAdcZ0gOUh3Iy1KDwvXcdcjZG/6UPxG5hqEKO018G1o3Rg7fkf2emUDT//F6z7M4Obu6pBu8YLwCcZt6I3xzqRGs4otb4/Rq+Fu8kj2w+SOQwcNgvQClr8weMvk7zD+GgNG6O3Wl2fbGh8ZAyGFxfH8czh7Utp4Sf9/M80UCVq91gbVGt8hCU4O2FNdmT8LsSB9cETn/SBft7gLlMSsWkXn0QJaIz8KrRdx9S5i3eU7kTwI7ubMB0tiP59wjTjUrCGydnVyamiNEjijlNOAz4Jp7XUbt4dbRUDmm0UwN6vL6v2+24ilDhJDAdO3ZuQJpFZKp2YRlG5IhqT+ck+j0DXX8SpNnh7VNc/h5QeFpgyZmdI4P4VPnsJOrJqfXr97kSrovmTo35WMUyNvYLcCw5sUz6slbRtw5rIaDbe1ihAVxRyFOmpHO/EBOPsmcB62y/tkKyQfzalN9GOASJ7qKvAXzlwUXUkvgADuuuX8vBs01U+7kSmmdhjY82IuG/g+TCEr8RBc9t8RfEnkAlN6YCkHURJU25deZNWfpDU1Fc1h780/gK2nv6lHSiScgf4Y55aj2wPtfdQevxmNP+wYXI1Rp2E/Ds5TFP3VCjYy8N+v1oeT7qQ3y5G02d8QlF2QRhHp3+NiX8m5+Rp0nB0qO7D5RyNbskyPhGvlNrPU/YNnPyU68VumaBQ+LcSpRoeX1KLmLBaZJHu8prv8ktE5ipRRxxtu++5EO2IucbfviHF38nOGDH17UVQsOgK3uPVJmRsnOX8ikx3FLa6HP0WftW1KHnRS82ct5PbmmkX211LVXJzS8jY5zE/F1n/vrbJWiG95Mo+jkiMljPktevh64SWIgA1UKWdxCaUYVVrs5OVLA7NgiSJx8uIP5oNf0IJjb2BxzH5LQsTBKqDntWxw7OKrzBgOoTxv/ZiuHMph8LzRDQyJ9IlRZ2ChJIIhzpg4aoDdygIKIc6bZEegZJh0lbcpJLrgUagxyszPWJeMu82XW2TAb62W9FEqFxjob0jLEAQOUo0mbl/Fs2fixfLRvx3Qq8ByMibeE4KtrWAZKjOC2AF+grpIjPlMY+QS6ygYs01AR/rZ1Np8f1aTuo9k7MbYl5IhWjkByujq4I4MNq14KIiI6HVUaHD3Kk9QbIwX0rQTEcVl0cJ5TLCJMXaKFLBCIwbpRXOek6A91NTwku1vLPhojpJGPzoqaixI4te759F4dtoQmImr4NTbl5ifkTjI+lESlZH3+zsGF1HPkuq772ubh88YDttsmtszjynefi4RgfXRramC1+/iFGhUk3GIdctPIvHuddhkHe0cbjGp4svyd0NSf6PM19vGtH/iqCFYGvtX5nmWrztQsXbv0XBY97V2+/3X+H7/j3AtmywYwM2enZ+9bR98vTXNCyBoxJ8LIGZB9wfr4+DUnefpcjTHNwbbSlvbrpZ7+tzPK5n23CBUhwq26GCzrCPIINF0uSoU7nyx5uz6O+DRvELF1yb9yl0poSbJZnsEIXsi0x82F4vlogfm8tZvWpvrhA6AU4go5yRlChkShMn4GkqEcEWHmyS5GkZmiWBSEVm7mjZGJO6elXoYYQpAxPpc7G6ZF7YF98BDXBE23jVjuBTgX+0TpsPd0AdiMRWNxTMP3VtGGvaiYDFV7OU0GfljJ2dS59TRuerCIbfMfGGqhC7KFWJr9Q9esjUb07KC1kgiorjDfXhSgJSJPUmjNEpT/eKlFVRVcksf5zXbs6KE1F/+6DFTSoHqvJ8u/m9n9KjkgsputZ1E3IfywQxkUiwrzpFkVM1rWrLgHiqmhKQJyxRGrUBn8Kj7dxRU4z+/9acC0DobKoZ+7yAKLQ7esyKPUsovdxbN5boAMWJMZ1cR8sJnBN5WzmaeGmwhiC84U+OgudtOPx7h+OPJ4pp8ObzXkRbQEhnq700SpVCJ4FeEnGcSLYU5zzfOH4hGJPDwJECEyRLZFCFZQ1oNPHf0HdsN2ZGwL/rDWO3UplMSMPCQ3uhKyoX6pbnkxKNpjJ9NGW7lpAsgjBKQlizgQU3IxGDraBpVZJjOVVfyJqDrSQx1bQZ97cZVZTZAZitLX+hX5eSrutF84e9w9qYomI0cbXNzeAiDKCo5aGmsAjcD4liIueVHAwQb7R8bu+zWfTQIE37lW6mOSK07h5U7bkUw7mCBA7EVeLzVDi1I0OnnFYfNy5Z/yBwy6xCjndyuiW5sfDesQXYs8A08rT881PtZRc94NM+2DgJmsexlvfKHNua7QVJhA4l3GUXn+7NCnkaJ7cCd+zC60fQFjAL6FV/Bns9tmdjWSmtv3G8Hhw7NM4O2xtxjkKRkcBWqiEkGd8CiR0APQK+9YWLKG/DaMzc2LZBermv1dsfdmWtJT+GyQfxsttUzFai70xhUQZzHDv/1qk26EQ1bjy+UrRTm4Cikxk9g3MUTLAtNWlYXJsFFIpfUES+sxCXw7VBRGS6KUsVTheTPBHhrHGIUwoWWzbYT0iCOd5Qh9v0YqHSYWy0+UljYRlh9SEOZ/xPhnzjf+aQxdbAmp7picOXfyG3tjvwAEdtq7fd7eOcjb5+aDe5DiREVqO2Nmr7SVudq2Uh69SRZQTOjwfRjjfWZZcUtjQq22ijPTPEHO0VSSQMqRftItCVQqsRzFiyGaMdg4pJH39l/NCsjX6PrnEIZBjO0YA0FbwSa3/wq6KIhDpEJlH+oyJ3V8jo8mqjFB4H++xRbBxsLOqC0GrcrBjVK7VrSlAWwjBszAYtzfWABQ17eVzQ/+Ny6/LHKGtjaTO4+K/AwctseL+1iwBVq/3UBVPq16Pap5J3Vv2jKN4eASEbK+QJfmjDHnh7Nie/u7uxqqRNOP96PnNNIlgNBwGhNww+Sr1YeOPPjJmTdU8QKFRY+K3WeDVITFNBsdn0itTa6m54OKWQ+avdz0nmQb6ZqTiCm//qMCfy9xvV0uBTatm37rF9IWCgE0WSwUFdWVZpw0NFaSJgcVK4I/sSe82XWrSM4astSD27aqO8j9Q7a6MdFvGSaXad1OxTpVRlyBAEmCYFU8MlJ6XNBIsJObUPd1WhXyo7BAgfJ5PZ0/cJUV2iw5QUbOocxwNF0ut9qAa+bvYD2qiZuNb4QKo8odb7yDd/Fc68pNhJhUvS2vwM6FU3Ph0k206OKLTlDVjKwSWKPMyCi6F4RKvju/a60dRWAFHXqcux9uLOjphLHlvLlCYsJ0wDRRAT4B65OUZ8x+bJJ1a2POEE55N2r2bay30Elk691+SGE5L9NE4o2wTzSPLQauYUFDUX6CzEU2iJrgj0V4NIgUEKhbKcYI813VD2SXHJVRK9C1Or2uEIpzWgotNjegjGw9ck87SCpLB29Gd6r8cC2FQJlAuvXSAyht8kj9JonHDZZmSMHh4ASxY0wyz9gIC9tjQ3Pa8S5q5OdonkXJmwm6wPmJ26CBqff9UqV9YUld+x/SIhpYRwcsK1zpzLsQ/Ocd4f1cpP9dWXOKZjX8tUHzkTjvPB6D6jK8MDmtjr/yL6mS1JhQbaJ6E2CkPqKkxNKb6qWTEcQH5tWosnTabksIftp8GmEpKOIyJo+BtE5BgoFa3tCaLQTQ7CWhXC6HcJEtAxQO7nyThJqdBp3E8YLIcmLJ7S1VbUKapYWD3HvFatCOlCfzy9luFWZ6rqcYQNlYRE5zScah/daKMmYP2eEk3eCxdApqShu1z2oW9gdUbuA/KILNKMboFnHAxnsfr4brh8yN1cAnFygXF8TtrGpDbX92vARsWWvIR/PvHSrDyLXtSI0dNQe4vDF8lCfV+sTcBdYL+FVCrVmC5qzUeZSc4PWBiUOdMqfiBN46YfAQqLnZkSr8opJLWxn0CdMc6nWDC2wqIdOKidZONx4uWZ6fNeW7trRdHssDajZtBiFDRFpNol90KITdpGbmxrdoIFF2JJfDS/FdKYtJPx8lX13VZuYzCcKcNhMfYsNbQP5i8QYPdjbZoevgNXGgaHLHmQNBhxZUw72sW1edLK2hQswmHVGSkQCDnpyGvwzj7WAI8mqNVoHeUybszbuU50uYLuO01eIFyEzxRwYMgNSw+QesKOd9jQSxWER4v7Lb2QG5KTenbYO5MSMgpoOhRDLjSYc1188ZFt2tkqTJDrNbP+dwV7lZLjX3BjYEnIH2yOW+LBZfZtD3vAiwfSOy+o6fU/kb+pY/mPr3XxjSudXaVRMwExhQkhS8ypUNm4Yi1aAGYb729USMSCpSzwqSgghwXFpJLrOWdhIwRMV5i5+79XjB25/sBBhBtK0AfH9cqzfh0V9igGgrdO/D/tOhZcG6sjY2X6Kj2dtzPI3NLPVmpdcub9ijedifNiaopfQ6BuKzGGyzRon9kMPAj0nGZZe1OEwKiSGJUbraOkQrT9GD1gK7H9GBqi0/00utUT0vxCB1hQNY8JJ4AC1V1phutEYnwzaXtbGywscbQ/krUKtGPOtfcbmTgiThHMcYvUNuxfYuGDCenQfekKFdwe25ZP7Xq2GVkdiQ5R6EbMgqyON1YkpsYTnB7XHEh/nCXXY0waRGWOVscvLKCRHZLKndA49xuGgWXmO80zA3DxPWhciJQfmtMQsC2eEsUCNJP9WbAkDWphbSUtlKFVPTYxRUSP25ooA9UakUHOIOxuBE8Ribq3hIkit6RfT08I/RWpq9aJW14YCpJu+HyVr5muYuyy5xPA+L9u3ijnSrzVq++YyJdJDpGUwmFLWrxJoEkqDD0gS/mu1l3BKgbQKo0KvXLiqPim5fkPJEPcAEpmVcQPFgqtoqtGqNdffnd/xYOo7K8boG1P/7QtlaqmQQV5BaX01SFihjHNVf/pQ6y5e0hZLyLhfVl81m9b6D5cppPivBfSIlXt0EfxIC01sLxKRuob9OtjwvpTI5w5MmB10Urb+mLuDvw++o7w78Py8i3nCKNJmCRygz+PKzPGGR7eqvS9EmPA9coyvOeckOLda9RCgHjvGE2o5AsYhYkYj4REYYqee5QpE9zm/sxu+8sx/eT57OGES1VnEIMRhptAU7Pju+bAx1u+9F/fdTHVigyix/F3AZb0jVTjj9LyBnfEleoLOhVF4+W458wQw2C1WghBGma+/zoubApDIIsRgUzTt+cSSXMfkyJQ7/F7i54qOyyXmVMSofO2o5ygZgYPBjvhKKhP1+cEBW6LlYvoi2IwUqtcUnPjfrYWI6AMNORQ6PunS7q+HhIxJlF6PRAMMZab9PZ9Y4lENwF3SmlVa9WpGvn0vjQYwZMQHGWGQl2PBD7TVFfYxhmmoeVF4rVITRxcRTB9Au8eyR5FxGpB/k9guIOA0Yg+skesBUZ3+YDNOKDpcpfj/snQzRYZZIUmFT8Ge5WWz+LJ5/v0aX0Hx2Mm67tO3JoeOeEfb15S7O+PP2agMyjYN3cDIa5GkaAL5ED7SYK36/Tm7qIn9fDnqTp8Cx/m9KRoKD/7bT7+2D8yogATAgbeyfKAHRuAxtnc8FuL2dbyGZpcYK1VB3nMgz7fbIVmelW5v2Y4FmYNQE2nHT+x+56CreUs7zbVtJu25xu6O8KxqpPAs5fFtBJ9/D1FDKLgl3gkwaF2A6oPVorRJjKCWynvt3/Qdz1Qo418qkRRskkxONYf6yMa7GeQKSDlR0VZgcPc5IBdHGG5uiemIInchEi/6pJZ+48vnbZWtl19AyrdaiJAV7IiBSujGweBnG7rBaHfPeqZF+faveRoTTmh5tRt4s10e4p01qYA4IAPLab4soPBI7l61KgiiihYMvF21zs+avl8U7GWD1liDJWxf0hXPf8OWKdSmv1jEO/ZEYlVlDn1BxM+L/2f3XvWzfB6ZInd9Qa6UtCCIiP3aKoQas3pgVIDCdnjZhEIB1gFonx+96qmbkJmgwYHs9+ptmwHHMfqB2BKECHYX5nm2zMb5Tl6s4j2Gc4to3IxEczQJB8wFO8+/lyReHCPohAIAUIEcA3LaUoo0wF72yv8StRybqI8qcJse7BTjbsbybbFt7Quhu4rsY/dGrpzapT3rHdQOiA1MardnwkAlNwXRiK9OEH6q2Qf/SADOZ/9ts+Cl1gLl67kQPvqJdvqe92gok1ESWV+8Cy/WNY6itb2JgwpL3EHV66HiWJxMXo115hnwyGVHu9ohe0YEkdVTxwE8mdALvVW4KtaMVV2B1P1PNihA2VT0qoLGymOvcpYVAr+qo5rSy46oA3RTC8GaVlIqEpOoxP4QPxzi2V4+r+ohbdJWkn0pQRNI6YCeDZ4PmBtMt0+LoQfdpOCGKFWVjBnGUJDSWx+jWLjE1+Ewozz5C6Uhi5/WJYML50l9WoieCCKhwaz+8Ygf10o24vFLM8NIVekQ9swPfNHnxATrtqidgwvbAnUE69d8K91teOkLyBH8mKyic7OEdMyxQi6yQiKT1YCsi9gQZC75xTjoRxDFmKbCkaFKvjWkF7Z7Ag8W/1OL8mHMxSzWEaW7SWFScNAxQ6XoHG+lpfMnSaKqqZ0diFPOBdkbECckm4AQ69Bwa1x+ad3eZAyQ59pcsgyb7eOscLXdxWx4qgIKwDy+kRRydNo3AHNxLY23z6pNl5WVQUGYzOUYG+EFWYQ3KMPqQ5YDKIxMOCaUvEmKS+/Ky+jOBgoprheyJGFZ8iQHVqkclVKPIwabqPq215V04JmgOLXpl6BDjcJbqrfSUQTfidGnKmnBjKUqFP/hz8MK94N4lX+lxvRzvs2V4cmFY2/iIkX/x2XQyJ8T+AHolbi/AFyZq//B2EwuB1Jzv5d6ObehCCZ/HM4fGukP/0UvTwxePzioxg+6KuPYnXixf4By7/kQhDun6DxOqERsjNtPwuYapuWhAWG/y60U08fhHwHtuLDOX1UF6J7LFH3TbNjqIx46pdxn0EhyU9vq2wE0h1zXkH72BGwPuGPwxaF4BYLgGYc4pEssY8io5wLxbwEESzm7D59HPNZZX5H7/VSIFP4V8YeZy0bQ9Q1Z7TmCN6gAwCDLFeUDOJFUUhljatguzBNMamg0i8nNar3lFuVdOvxKxvKWthni5Ir0HksnkCukXcUVCxxjzlyjBm/0tMvfkCjEjOC8qRAshtQZp4xdXtieT+qHkiv+WmSlD9mDmkXIPPiO/Ulpi75i+cGea9EA2+S0XojUWu5XwI2eQBjmUXe6dU0xcQRj5OVPtAVf3rQJNWXrZiULSOD/MHvGubQ01RVuKF6vJKxpn8uRSfQmtoMr3KPDcb5y4x+Lu8EVzMVj77C0TBlmVPKh3+dieOg0NN+pd9Rx06DzVwJpsTnAgT9D/7Lv3whan41hm6fQhwpaCrirRk19WiF7Psk/WZpU3guxkL8YhbcvGvEc4qweIatMpqXZFqSYInJpGYUBjN2YX2ywaeUKz4+Mr2cLAQ0m0/DInFJ1PpECqU33goJyQHT6cCw6HDeLUvzrn55D/piGbBgtuPMohSzJBZMuZdNX3pWjg/HQQ4vWqcgi0w1jKO3Fdqj5wY0lOC0RGOGajJ2bzifBqrkDs13mr84b/RwArcNhUyBZkJboWx9Js6nnRpNUk/WvqOgSh7wRxo8ayHkitspJMvXba9LP/kIxnY9xrh9QD9jeHNPgKukeuMNXKTWQIiac1YDPI4sDHfjr4Z3BHHkIo+Fpd6gQkemkv221stNmcv17rO255MxM9mH6ZnhiO0HU1bFaSnYZRYKznSz8Nt5H4iOA+k7rG25GXBTAzGZkVKJqFlTaaqrFb0zYtkXAIm7lOLNrngX5w/zhodQ3KK86v74y5ZmqlRI5+uKSoM1Jg3nUiBKHaaWYP1us24i3GQmmfAMv5jodnKDjJbwNPfnxtQj8Ydt2y2Jc93mwfjKacg7C7ubNhestBDfhM419HXV3r98Q3NhF8135hubeL+AzVNh4/miyJ8nHmsT01TwdF/oKTzfzCCVE9/myA2rT8WUK/6dWplQ8n3hPu1QdM9OtG+JR1b2dcvG7rZGM7kqLv82BgmKd7fl48S5ktkYFmTu3rqmaMRrs6RuK0BM5cWfZd/+dVNM/PN8g+NYfee0D8zxa11uJ0nh0sTpxfvU46d9YVOjDcUT/v60VG9NWvCGs/QxFcUgmXAn0mU1BCuei7Fve7+SrPyBVDK/i9qURiI7s9w9hOIdciyuxclcEET7i5ucy8rc+yRGPAimhcXN9iLHU2cdRE1dMNeA5n3L0pKnuKoFjTglU5UR9sCGpd+tOx/p5TQ1KTiWfW0ZOVnp7t26/GRlpvSfJNjl6Nd/vkCRFMQdKNhHvnFBHOON94y6HuuRUCGqHY+x1DXysJD3yYd3VAbD3/YjzvS+lg3HMEQb40Mz3+QJYYTnxBqIP7w4lXFupV5oYfFBj+0bZhDdxdvnwkx0WWT50MQMEd7Fj2yYvLQoHvsI3AP/U98hs5p1Z8vGFfclo7MRHP+/FOQbgKyZ4Pt5z72RGCWXJ0PtOoUBe0QBp5XVFM1tv/yLeQqyUZ/IJqCTR9yoX+ZUJXG7WSGo1R6SSoh9g50pHtbJrMiMM8svEpcOM5a39xtWf74IKYiTmk2O97j6kpnQmjF/xBpB1TB7xYrM9FVn5l8UzRqHGytR2sZRvCkLVhmKTGyrmu7/sihcRY2Pld8oF23TSL36xhj20SIw89xEObyOsgBlJ+Wt/uHEEjL4K6P5+XIt/BOe03+X3xfYf7ecUsubs5obQRmBZRm/RV+cCTHw+bEUfWuNMpzY3UEiC4fMZgJoiuTKHV69Mnvdp/CkIrmoR9b7s2KMN3/CKT9rQcKPZh6zKdDjyQs2nAMptWwzrJSsAbU7e6PGh9lMxRqb5w8oYYQyJtvxSWZE0BEWFXRFcPFFNc1MI0B522IOaj1xunnJAjuMrFxXAJTGuATxIowKjCI0MR/etzl1Pp2wkZZHFzT8Zu+1voqFJk1uCbmqGNEvx87wztBi+TO7O1ThllxdZN71eNPmZf5CyUP1bZ/bbriv/fh+yW2OpQFMbwNqd5bpXPYEofd+fWKR/74f8+Te9fzQiZaDUgqQAcK+R/5INkxlGeZy1uE5c+GmL7h/EhnGHdvn0GWsTRbNAoCcbhZEYdZpvK3CuHdoOZWrrgeiQVwIZTWQwyA/Bj0+7xvpnLqixdbj4qccjo3z43FnxL6dmkbBdgl2x/unVKwnEJTljaFh9RRKtc6VgNXpnA40dq/CsI8f0YJNDFzr14eKatPJCnGrhQUSHmHy9LDLVGqJogm5GZM9LWZxfg06EWIfZz8+V0ClLbYVnBFCNO4/m7B1k6a87SwiY8ETRiFRn6ANf271TC+XDrPHtZsktwmUgy9Z7RUefgEu3FehB58wDXPQ/r5Zzk39Wyrr069JZRTC0imoHiG6lioZhAn7rKSyJy0QbUF6CsRaOGdTriaVFJ9HgC0Eh3LuhgadE030I/CkIiEwnlx05jaHqmS+FxTW3+7gWx7jn+4ytf/gTm+TOnIHx/41nGK/djXIwaLK2Jkh2y/osZgW7N0MpdaFDyrvHhm7xw29YZTnB2aMHyKjlBd6SfRHpghPvMG00PWOv5eiIskEsXodqYgkWNUQl8M8tfnWsZFiqxvUa0ZMOWdoB//IyiFwTJfBezYlFa1Ui4mVsFSP+rf2pBGjTGPhsWsskSmeG/cl6InMkQI64UNsIOWddJ5KnfAQWPChGTPJPFBZIDd/UgFN5pcmSS1g9YolkDfoICI1ASfWA+BN/TJpSaNlVaKldQB7pOWwvol7OE0hZn5VjIcilEYxfl1fIukiOuUAbaA+CvFQa4ujDowAX9e1+F4bfKgTeh5zYqreSXPfVf682yg2WWXK/XU+E6MFWlsP0KTj53zjL5a9WvLDzFSwwE8X1SC3sQkijIJaO5ypPOG4IbLBSfb7NPTXuUON083GxMciw7Fz0NpqqQy6H5up9Hz+uoUvhMECqJoSHQt/+AGnWzGtY7geehYttb7at+MF2Dpn2R0TprJldLB+qhgp0HRhzquq2ugyIxH3QKVZdtKELHgH56rvIjc+FAj3lHhjg3TlHOmznHjsiQUCJOYSJRsVr+1aoS5WRxwVIbsoXav5oP+e2cUZakw31BBI3RO9Hp7+jh9Cj28BpKt8eTqjUqarq8/SuqdaK5uPHI5pnrvQxfBxusmqRt0zdpJRk3+AbZud2meu6fJTiZaURve8zyxU2J/Giwf2LFgX85pO6N9MMW5MiRVXnLbj248XLMfR25zbWp/0wbDBZiOPN1jr/JUorrhSYze0VmuW9lJH/ppwk0xs67eU9ryuZGg6eI86FE4NYzuyfej6fJRP9+swfwflrXznOhpxgyOxXAry5O0fVF/T2B+rBulM34zWzSByqG5DVVjeOJ6l3FHNIYRHTOCxxhyhdivL5nJ3vVgFk7N6v+cHvvlHpN0nGVEUO4GPUxaQCLA7LsFYOvuxvucEwIOYG7AjLNpA1/KL7QbHiBA48EBd/Ytk22VfHMeE+d8pr4+eetFfdSucqPvgHw5yqq07s09YFK5DEKPNdV8cN4YhK2XcrUdY8uqAsAb3vbsgC1vXtgHqAc7lVGRVdCWdhbGsOXETRkriq7qpHstBQ0rp+satld9bYYIqSuhDxymnFe9O1Sg/fhN3/SWVVIlD14CONAfUY+7wIDQsAAGHJOzR1PvC/XJL786Ak5QvDO+ANjwp5qBi+Bhf+YS0ZNcU19ePtSpRfo3PHVPu9eLAoZ29lBQk63nle9vVTF2rFzefEKIOq17fZH2ns2gL7JQdP9+KEx+uBzrxjzHnnMFemETUVd8P6rGInKoTdbI2MOhfxa/u1k9wPDrsogonGzn6lYijQ8bN0s4KUWR5xE71EgX2wb8seSRu/cbE193uKJqeJng0I+ZLAn+g9eWT/zDr9E12ydLgoyAs7jJRlkJNpeePyg0hjjsXDQgDUD7W9DR+I8JDMuLeMsg5bHAuq6LAdOgh2CaEtqdhfnsWjLbxaU6/r871cuMILkaLMJMpAHz6pMCqXiDvjMxYntau8Jtd2kvJ3+OXs0f9TkBXyif2TpGXgzyqF4PJV9elYL6NTpnXRFHEAxs6WPsDMq/AOV5AxizoAyyY+I3PuAhJp2AgOrrkOjtY3qMI4kXMWy0bFkbZ1UZcMDS9J6HtTFKxlDyecxtX8FLL2shs6WJyhaX/wjombOJR9fcrU2lyKayP6c8IUc1fGUg05XzZsDGH5Z9XzRBIvKhPyQhiUaF9lvkA4+6ec4TX43Mz3xpGS6ohQ/FPXO8BxaEqY/6E3bbQYjDwXxluL0u2S4pEbKf2KSGaavUP9O2SobQY/Yc1m1OBPcUUYdrHneB64PGlIh7+3b9K5a1XOqxzxRev21WGdvyQxOXYuYd9ek5wElrUMdf7jHDlxL7qIhCflM6PFTQE5soWTyUSIaY6vDuPkx2cA3ouQ6vd0SBX+UNgzWgIi/ZTKdnGZe4lX7gQFH1fUqbWEOzDwDbLO/QFK0f/Heb6Qqk7dNpLSd0KXAymox8r2iHIMvKOkQp4OTKanuYJX3AgpvWk5i+LJcy8u+aLj/kHT0ssz8VMmhrGbZ42f9DpXuoVY/8ra4wq4aByM5YnX4sZHHbuSdDnvUtEzyecYO7x8C7S0Z3g4tZvtE+Il4Vno2PaDL4a5b+av7IZdX5wzdimJWPmRwmrRfC1H+qY8GBKxXISnnPxFczGzOlzPLrCROTI/16/RgO40rO6ZPNYq7ONeRAQBQqxVc9O0etuhSKgF6WgzQZVFV4Vlula8F1Fxw6d6AE739lVnQ3QWVzobDWMY6TYjEt6P/dshQXdrzjuLqaficoN8WCBoF+agmMmPGurnxGUI1+G7r0i5kXMIspfbHw3Qg10TxEfdS6wYcEekz6VtEnmATzMoTbbxkEGaRlOKqPzH/0k1IhXCjrL8bF/KzRzhtV/H0jDsP/eU/fQDuujulzvvc6mtBymWk7vDcXB5WuE9cAMcveK0gmSG/crRnkRJ/ELzxEu92B3m2JTNc6Gl41Zci0j7lA4QgMoaWeBF06K3UUZe6tNw5E+wEVRHkthSfXwJgvJBOJYMZYNIRVzlvkymMyhYdkmRtjMH15DX8Ugo6JETK+f6s2qgPKaq9QadTxYMv6IsKXKZX6JXgyJuXMsOv8PRNo0RD651lOFl4ga80wrvCEAE+SYkc4v2VFGpeVVzsXkMyzrtCYTPCKSSNCzIn/BUQ8T28AOmsjrPqZXXRb+YqYytBrY0Bbxsx+UY7nv/OM0mdXKPp6QmbonU6nxioDVRAcfkwV7aLcBYA8hllQCb0pa50RiNyClZS/35J4C4k5vFUb1BXOWL0bDIk0Bv2tOlkh/R6WsTzXkaFTNuphLUGyfPkgvsaLqIrEpwiC0dUuSrHdxQ9mjW0k4KGE3qOWf2/tre5woC1RErCvCGJi8mBKMg12qXpgXDKQwr2TmUcgP1mhSBbykZsJkPzXScoPbydkMeEpxO8M721pVLHA+WFQJ6/8Bqtx/95z7mZTisgLxJpncCK4xgaE8Xhq+W3qqm2XT9QRyJFRyT43NOr19Gee9p3fd+2dwsb91Yhi52aGRvXJMRcZZjx/4LV46qHVjmD+YluCq/liAefGXszRbGsFDQ9wncb8o7X8toyfczwWQcE5ZWfvZRGHeSvNWxr0VV0uYP9I0+vtxVATTnsWlIaLXvFhtJIVhcZlNoYJU5GkhxCIw0QiIin0OJJ7pDsMmJz7HzlX2MkZvbM6WmZ+DABsWzrvR5Zz7mvHT2EzCL9guFl6zYuOlbLPn9LU7f7wSGdVB5oUEi40+mBYnfUuo1o5OWRPl552Oc7eu9Y0RwV58zZYZXDHGGBIsxhhDEhfDENQqxhhjQkXz0PXpLe/kuWV5aUmtZZkmeelLghBzTiwTmgAU3GWvpFKBRIplFy+VCjjHa8juy7290nVrGEnico9k6RrJiPeYod4pzKZC4ITWeuV2pTP6c/x75vWcoPjOeXJ4kOBZYLX5bTSLTmQOfjA0hDXqs7ACcw+ZnyKOW3M1SSiNX2HMYz9TaIyprsVTtcgZX9uIjqg45TmK8gnRig3jQKptkvWxEpdXUr2Tur13EpIyRclMWNTXClcZYWnT3Y3tMsnPbPlCsOGlGrZvksLwtkSb/xx1oHE+YKqab2f5unHJcmPwhLReXrplMGOS0pVLljr7hsbh9Rgrb9jOd3HZwsApycK1ZLSlrmfNajWDlYUX9jdxy50BL5NI+8XZcREZaSY85BJk3OaXRdwdh0DHHsWSdKca79POkx4vg9QuWsz8M8Rzf5d9eXaJAus/Hut+hVK+HI8UPS/Rh0IMUb7/rMA2pfqKOeRsICbRGYvHqSMMLGETPBD63QYXetz8KFG6ddd68dk86S+Kg/R5TO7ocHYtvL/9oPAR3GHMhiEFmU07+NnFmgOCcAtbY7s7bsfIG37aMN3iLHHIDO8fvoZnSTS65pnMIyAtAvLUMTZgJEkwI/pNucSlxGCHNWukWEbAnTlFPIcvpE2YX7PSzqhdQhzAA2KmkxNm6y8uLFLsobvXpdlD9mDpHwSD6xAADkUMYqQEK/yPlIKizirCpkyvh9+5lbMov3YE20LvRkkOwdmyLWYrXCGUV2XwKdlRZHD/BAcvpmrfigSCfGFheTJOnY1WtaPYoJ9xOE3fGBOcnQjLl8g2294RMgd5EGYmEDKtI0fuMC2MFV/QpcMPfPhD3edU0QpCoGAXf7DO6VpNo09xsi15EoYFMY0OiZdmU4HQsAgLw79gX0LO8u+08dzgzNxnXIvSGDtD22AhkCjT9OLCZ5GngvFK4FwH6djcGE8lEPfETtILhYOxcO/6PWPvZyaYDYykM01jNHMsir2an0k5bsbkLI58XQeRu/5rxv4U9xL+rNAdNZwEke33/0CH91bYgqzo5PeEpBll+rSy6aObkQ0jwziBVylA9KKthfnCB2yigVVEPn8FPYofgxbZlW11yMAVVxAJMUS5VI4o6IKhHa4QV5ALJwSQTLaBi6IOSnTp73U2xi0T1IN1uxhJUb1RTSf8n66eYP9emgavKc0U/1MbRSQuxR8LrYSbjl9Oa8PVobqYHhcVKW4b3TiC0q0p+uTZj30QfvJ3GaXeCp1unIYRLJZHakoY+4K45JBrFZDFAuvyZmuufi/Kh1AaYrstilVrdeTnKRTk4E4C6papTDQ6zfa3AfH3rl0SsF2SynolXUqMldSbpaKZdmrvzKmcs8mOKDNvEot5PVOu2blaxcwzeIpv3M+jqEoAwV7gDRdJXJnlGo0XONeYSCTLtHEHKqmT2ycYRzIPLRgshe96g1gEOyAp8D85whQA8VF4G3vEsJjdsYUm+NjahLNPlbiwIRSpDMVl5Nq6V80YxUX7iUyrlPAB/6jqCKRkG9S9XbyBC9+cT1PWErPqIxa+jo9FeKG68b2bp6antb9xwU7kAW/iWJXpmgtc32j2E7OUu2K1bN6+X4HB/P24A34RB1Y1SY/xLkBf1FOmkbjIJ4MPEhTxMwek//yNTnB1Ja7me/xJf7yQ3OSrWBxbrlW9JHtylYdFIt6vCoUiIl8PY/VZKOvqGn89Z/1YRMDqlABVGHJqijLZqBLQlMy8mItKbcqamYTthRI8F4KOy2YksJK2Dj3tKI9ZANP1otrwFdNSlzIEG7fow+/oGBkU9evswQl1IEKBDmVvoPx0/23fSy0WSLw1+arws4ub8eDI5Sr+feex66Fo4M/ZRq+m2bxtx+oV377S848tBPlohSlkHWPntcypOt25tmPKsVZgDShEpVootiXv+vELp2l3E+N1No106XQRocPoz8tdxPewAy5M7QrvWpGOnOZ7kK8BtPbmM/+2ZlK3U1rEGvl7vv+NiY0TS17je+Wp/Jooxu6UbACzZ3Wtkk3JD3P1MDAU35a6EP6Jj+oZ+iJYR4sjkKhc1zTH+DqO8a/07ZG/e/UROAJEPvqpQDrGbz6ZaxD2SLsjyXNxZRui/VxC3JcOlFjjg+IKkYDXwZXAutbJ5Q+/F75ZuniE3926bIQBbUu3nGusNr4mSem6545e0r76caONRNBE+MJZraGQwbW2JqO88h9TfIpY3/DdKTZEobMbmrAn6TYUO4ge5AKr3e9QDjtpOWnhb2D1Z69L04PE8xdo5d36udIjJ+Ofvds3Ee2u4ZTJHcCRzjEc5KiH6qPIwHNmOzcNQ76akAIIA9u/zod04ihmqBqux7geYPY46JjmqWwKhTq3oRJbKBjGeqSsDOxmZzAWkqz/N0SkrPyO4HNDHgpCErO/2/RQF7UQxm/mxHEZOaI0fqmX7cNYbNwWrXvvwvHKMUm4hshl4KE6I1L3IVIPyqeC7cRG76jUqVJzS7Pcv+i06WmKmqIdm6K/fOu6vXs0f9fnRoxdMGCv1x8fu9ze0eGi+pqfwxrzUjb5JVITAPNc+LEZ9iFVZqk63mqE13mjoTp8zJkBFjKm4VqdcmX4NknnCGSHHSsrNj7zu4NMyXHiZv5uLjtY6mSr008dWEil8iPEDAjLSUEmLWEvKv+5XgkNaq3FcHDaLnwQ4Nirs4L9GIucOZQkznzgMJ1y9yIe82Atj3mWCqISMqng0FtWtGT/my32cpDwyAr+Wyy+R7oVR2EikErR+7zoaMTmARYfN23qv2V4GKSg+xIxZ1CxUHi+qaiTYpHvZZBa7elV1tlG3a+1gVaePSBduq6vipfKMhOwchzYFoL4zuVsmCcjSO++EgNZZJGCnr7wJ7pKBCkFOcI9yKZWlPx+2C6aIkqSL8OipGmADN9P5B4yIDc35AlGnjNC5xjdI4q/6v9WCigz/I722iMxynMjqUlMW+0rjd8ptN3XJy1hK7As8ecWEvdSAaDfaq/pJjcq32JwRhNKfnfETX444nA/zP3RssehCuy+lOlxKn6SvrzPMKebk+NZ2ovryQBR2qRIStIAeZjIeaAhRQkl0xWbSOnXtxz0Ssskmf2Mtb4lWMsVuxGgiN2lgeFpyk613IFCVMEc9ZgywTKfJ2mTMca7eRg1CxBo6ttagFJCEArYRBONFNpuRXRBWVXFLHXLwZGaUGgjZ5lEK7XIy3n6Yzjuv29DTx83Mc01gVO3tGvc/tXd7kmmY4CZg6zY1hgSvQjI/q3pj8Qr8GTa0AU1Dw63w1h6qVnbNHxBIInp0D9cDNAnD8uBkVHXqHT3jZr+jJbcO1p5wPET8Xh6mSCERBcxQTg9W0xIPEJPPnxQ+D/WiRoBEnDFbxM5CbilTZcyTVjq2FTEive/PuSkmgwnlqfJLsUt1D1e8sK/4sCoQ5DjpeZBwDt39BrWnogx9kLMd9Gm2/NvjTQyEPjCKViCUzhTdl74LcMfIvnZqYtUeI/kyfdUr/scRpmOjK5wVEsaYfGwy00QHGpseB53To2MOzJQABJHz+db0qTB2KOWdkyZ6Bm1u8CC1jSt16nASmvctH26g5zuGRGnHXLqo31TE4zQpYkNfcX5p/qxMf9xKgBYdniSfWAN+y1+l7AzTCFNDKVq5QcX4aYwhCBVwUIL/jQMdBWeGtMC3/tV+LWFn/WDZ15Ok9nbVvG6YDTCGkSMK7xFC2y8Pm66XHC0eC39XlZLDy7JLhyd12XFwxRf/M9lF1kuQtMpXBRQ+xUg6oJpOS6kkHy1IVN7pCQcmrvnvp/kZsShTEVT63FQqDLuL0u6jueDYLQTLyi0Ayae2cdD9wOun7oOmHDjQODCfTMCfdsmlLJ/+TzApZdL9kvQVMRGc2NAsTUqjZfCygQo4QqvZiBlCh1rHeE86jQNqEKq0CLDDw0Te8c5K3fk85Fzfs0re2mHOt2PZHWDSXHTrB/eK5rK4FMYxSNBcfJWkYfSIJlShDaxuJyA7YwYFOzbKIFfJMzdaIJvMix+hc6J55eeB0vBHwv8+ZiMXDtN6RQsjLeopuNOo1RQEqBDCUhEwXD8y55+/7QpwJuSTnn+jZvqiPOCjG/tblp+DgYsw8Y/5KZc8m00aUXnbWiBu56YY3ielp6N4uJeceA5Qf5b4oOj/ysNWHYPT2eudiaFP/FWyyAxb1O5m9N2LmBsYk5JDXifyO1KVXmhtp99+orlG2csbvYtzz2LY9Y/UdyDKmdKFjJd1CXx4sSyVP4eKLAX42IvZl80OmaAYR5GHqNT8km/FwYTE5SU+q+Lizc++IyKg+xclHexSxVbDvZ2W5tNU3Ev6iRVyWv222AvS3W62lP5aSC9wZ5Np12fha79YSQ8whxZ9XcsDHEN2Pz2SNu1xxzKzsOWb+EGl+HckH96l4bqidxF62vvUX1YyNxVh9664lY6BHD7OnYodJPSPjw+7rvq9adL135zwra+TKXglwFlzfGARObD2LSNmujAXJZNYoU8pqU7wWZOWB++0eFGuODasujKk0lWiCJPkIxQoNt8rql4gocDlKvSL/R4FNHBs3PDvP9PtwwDM4EcWfqJ0yfDo+Ybpl5ams5Cy7pVUbtyl19Xzrfa/5kvIwMwJDmK6MqB82LQgy/92uoK5o2OE1YtJirczQ2O4bKppgWJq8CFA5XpQJPYo0+q9SbSXscrbfWOBQor7IRXHdeGLdGz8EjvhNM2HSxMh9HVUYiTqPgEXrHUveCJTzoY1b0gqRZqf1F2DHA70E0DOj6z9+eyWElZyPa3SZXIh6A4J/lhHZemSQrsa2zj9Nn6IaQp36YRr8P2X/8ZQe7mbZAumdVA5baB+JiUmMaAuqlhaHvBadnUJwpm68Ab9dHcQmzsm31b4VUIDXTl+YSTTjBj8YVS7Nj5rvDyPt9JTwjSv71LX6nvb0VTt7sSHLHdrPOidmOGuWUa0HydPKiw7Z/UeQqHxhK6Opp4U/ItdD6VZ2M9oCJeRXquNrSkc16SULgX4l1c8NJ0uHt5XQayiR0475EGB2FUpiNzR2AfGiX1ZEOvzNLd40D8FKgP5FJta8supCg/ytk6mhFEH5iqFEvSM5M0R9jN/ZG+whC8vhUAxJ3ryTHyXW6Ounz3Q9R4QE4FNkGNkGpMkVL/9uXzpQdrp+ZXCrABSb7T94DPAjxxSupfp5gi8HVD5k9uBg9qi0hAwrkIthsdsVzF5cj34u9bRI3eX+XuXaQ8AlNLYyMSiUVh6H+mkA55pRUP2nl4LX3zK4YM2TdA8ATJrWDlpMFUucptEMrr8orEDugu5icnrzX/60jcTVlqfDObrCQi1ZqICFfvSV5LWT6v2H7ruRGeDV1ZYNZ/gDzBjB7TopLgdIhEXmKZSzBIMWy3AR5BDAR88gKQoZo0bIRdKbgji/wOk3cNDFNzxFnxZHqgO9NN8Ou0PMiFsIsEE2KTiv9rhG1vZlCKGU71WFVxuVhBZ0GwMYOMUdjHEeivW2PmIZU6XpvG0tMyh14jihBm5HgJ5wsoL7pBP8xmxONSN+GFETfrYXaChU+u4MaiwFWY7NiuZ+Giy5NksaU/T+0Qdd/y2+3QSzecLIF03UeqU98rlaTqlWMfxWwRUWxj4x5VlelJEe0elIkJQhWHJsvjaO9ik8a+p08A7cWYgaLNNIxY/7qYxG4NcBZmqw4pnfd06GdkBU+GN3AQe5g4V8Gp3aQSWDgAD96lofxK6HWPzddLNGFDqM3YhU3TR/sfEBe9Rn/hEBIUNLoUhxt4vvx7Yy7QoIEj2nfu96tx2ZbyWvqCn99jbh0y2GePpt9YaPQ4VeaoNrakkGDK32+UdMbYNUApLSpcoLGExbIwVDEBLFCZaeTf6lzijOR1z/3vhJ2L68hBiNwPdSBHcposTd2NigVkugfH7R7KQZL4NmP+LpNRou0DqJ5f+R2gjOUxGpSD6TiOG2X3AfEMexFj8f0KcVYWa0xROGnOVOivEL1is0DSEuTXfc326xvHfckBmlJM/NIbECsHPXNvdiJu65w8CkzPgPHhbPom5fw7oFHyLsAiA5Nssf3yXI6HYFNOUabt8ZQ5RGHYAbxTwWyAgVWFsfGrteIu40aOjcLo1LHSxq3Q2kEYyVPifRYIl9mmBHeEbDlH1GBrGZ5MxKQpK+swQ3ZtzYqe7H4WAV4rLrVhusWeRHn8xcUEGX9hY8cwH28FTwqWsD4sgkJqTTp/oZdjFjfw8P5c+vt1oRuv5VDmxNXbP6MXyqmR/8dd8ZKWz9i/jtJH5ow2m2u2dheL/fNVbLovH79f/qch3XK6gPKOBW1kZ6UFmktdtGBrUKdaqpBhpcs9B3659ggW2Ml5zskyaaj7WqgDjRnihpCFharKVRQwciLDiRzuJG39rvtiyMbBbUwADZw3wdL0ami2n/1Z6XMVOcg95C3P9ttn2SHEfXLSD0tsaR57sBPs4lBUatrFojUW0gyYq6yNpHtqNmZpL3I2Zmkv8nAMSagELKhtoIie1uBLeHQzaKQ+QYUxFG1uHjs5M6invQnCbfQ5rtGtO8W8x39n6qtr/Glf52+uhj8LOzQldSPr7IY8WjMqyvBxNZSBowoxUq0A3fjH/YYvbvHE+Sja56wN+Da93j2QjkgsEM5RaAn/YttbAse4PXU0dIbuIfkyKLqV+VdTtFYPiOQ03qC8DuKEVENScDayYG0jNkZZHLbUiN/WVb3EtHoPLdrdDL6VKsAJd7rZ4ullZTSK+y+mATBB1ipu+xaErug5RLBX12/zYyZMiYcWxf3dVd3xwrAMMVZmgQI21OnXqC7PRVt91ArlU+V0OlA2oQ63786wrgIMFwqNipiXNu7fJKIkr7xifk/v5UJnJtiwgLU6kCDjjedme8CBtUgQ8d1N5u0ORYDZm+SRdMMXVbCCrNuh4GaaDImmzTSI/IXXfkOWsmTtYkejIvB6WBgIPzFzBJnDkp0GfvY9UOS4HWxlvRBlgBFA8Gs54Xk18tLSkbPCsIViDGYcJz9XflfFtuUZTJ8P8Ezi2yb0NYeqqnq8yYlZJchhIvOFWMIusMVgaSdDlqHW0g2vlVOvL9kCg+QaxDR60v4lnY1ntc6DjK8gaeedhNiQR4HrqnxbcV5TiHSJCbmpphhi/FU5/Vxm4pdUTJ9tMAhyC6EEIdKtWd+hnj35nCv/YHymP7E0f/lRVJBl8oA2HqAaVgzmP2/XCBJJoHo3+G76B1TWukAkazxvAxsX1RJ2CTUezPckFI9aizbRLK2sOZkaeHQder3d5PWuP3+bMgrOcEhX/L9Hc5+HJGGCEjcIVEkQ9xoZQA5cpfGTmtCf9so+77sBs1BE6HeyfDxYm9npojiszPutDQQYkYISq6JbNWSIG2btltJAqFjHj5ottdNX5aKrrDKv2j5rsu1QyBAZjn6wC3zW2bsk8dS5rvJ8JDwPEOrfJXnBe0q9BCKTRJGVm5BEcjqR3XDRopAkEglJRJwQ3o2NZB7q/mqcfxSHiVO8MCMqlmmwSnAl0rbSWWndp0fO4NSh7DDFI05NiuGCmk9Rhz5MnodAwyXPEqJtsqHcAQ2rfLbRD/gybhRSt4sYMebAlmliRvlsZe7Lqb0De2cFcKUOmeU1fCA40gb3fx7974f6zdQX3HgwjNN/Hdqrqv7CJzt4gf264i4Yvx4YfER2BJhwAk6RgOUqHWrDzt9+5YobllQuUA5fMOA/QzG7mSf4B5pp5OcNerpGEBOOS7xeDLlusWkDRG/MeJuahWsaCn28y+dV0aLp+Rg1x/9R49Cq1x8JwzHdvwp/vbzFtedUOnTCnvHegevZp5L17L5VPQ5MWu+RyxhzoaJHx7A+/gZ2iY5y59MuU9Zj5Kbm5FRHESOyQqTd3l009K9RE6jHzebLi26CtccLEWaT1aNlJNh6cyVhrB8hjMpaSjt4qMqclS84E6wbZTcEG3wPjXp53AaKPvgOomZYXB7wYwZZFc17xtDwvjOhBxdizxBPH+8/Td99NVjjBE5YP6bmJoKXszvL7kX6LCJKqGmxXZ4OLwBrch78ZDx/cskJjrhH7E7BqK9z6GBD44t4Y3E3oIm8iR9wLu3v2N8/uXpw3hXA++UCH4nQEE2kpXXXhaDikKpa7NjjpykxlYaSXHBM+QmqYy4soC+F728VjQorRmEHfew/6oW2TwUBT2oymj2eYHe385fvIo3of28/jYgcZpue/us8ILcgvbgE0UE+qstwmpTNyEDhoT1y0pmFFJ/wGe1L46hkEiQWqe9jlIzhxiiFFxLfkWMa83f4W9d/kQWUBazrVNF1dvIZ2NQ5qKacVer0pJi4mFmi4NjkIXPIKPLssNJEo81S3gz+zssiQ0geNKQsuMnJEo3veMNAdXd+lpTN9r+Dr8P/ZYN+1DDcP4nz/1X3WIf+xwfyz7x9uPonX4R/rf1anfJfSqof/n/zV669fw7mGvxf5sYkJp0meeu0/6Uk/Cw1qH0s6pfL/+5v6NCqFAWVlwc32ig4xk8JzMOdBRk0tuvPweW/5gmZAJrovz+PMpkkz5b4+SGK0EG/HazIfQpKucO4mKXndELrV3YASpONrjxO//oquPD77Nc2wxoo/9Jazfuo+SlCHyzoCOADAV0ziGOu5Qqwk9RELd4jibf+etH3dW6KXW71izwlG3+XXHoX/zDuUYr9yM57JzytsGvoUZ/b6AlcFa0yimoB8EEC9qvY2UI7EDjonfLMRQfg24A/FWoMPXHv9vypqRPqLhF2RfH+8N0ccG251vyfkhVcmAegmuAuCeFwjMXT4GSDRdS4j1WtyqrQgoqRS8inODSLDBugIulvjESXFPbjOpZbidn5SVxTrreiSGnL1wtwViqO6cD/mPIUj6LmrFWia8qp5iOF/Tee5REQR0A7aDj8jqw7+NPd9O/7cNy7phzvVUCostRmlywn7sr7t5Wa+GbwbCX662PyZLoIe7fbd+3XHRT7fZXRCJib6FSmuuihuI+B7nNZDOuv6PauxxOey2I3hcvuEXVFdO6luzxZ/PBv+yWJ7tWZqOFwLezRX30knVKOo/xTGpRNdlL66wrHZUnx5149gtg8gpoj/T/RutLRZRgjr92trF2PrIv+3EplgCaC1zXLevNxKUeDHW0zkeKTvz6iFm8DXlmKQbrcySZxN0FjxXCzScSrxf2I/v1BtA3oR7pef55uk/0pT594i4tn4Ft6/5YEYR9rMRanY5Z+9VJ5nGmh/L+7oMrK2t9V+tWFcyJ4TVmum4HbbzqobFS+krf4KWFrpnBqgjUmDi2xlxF9ZcBuZYUIRey01eE+trK2+dGKVLPOEZxCAHRPpRr3EoWjDV6e97SNXCaHXaUtcOyfGM8GV3a0XAYL+1pHZgBtw9mMq0RKPZDefdxulpDeSOUv7r9U5xS20gH1nuKy22SsiQJf4krnlpJ2NeIl6NQoO9+5U8joaJzBYIndilUnCNxW1hsP/ZepM16ynVp2zs6BaTeKf7Gn3TzZd5nUqdGAo941AyUj4jT1O5n8tUGU5u/Xrc3qDGBN8/mrz43PmSWxWvRjvVfAl3iuULVJf/e4OcQxYKeET2SZ4fSxOzrP7xQX+HbZzQ1QKmewYQng8K/APlBFyvUnHrr6VRbqmkHZoSwEKM3sL0UQq1VuIsMvPwopdrHAt6JBskwuNueWw2zR3r/E8eK2MfQjdixUyFNz1WpF9Fbviii9K11wrCZRZqo+4jf7fZwptC5TlZejKab701fvev1U8yFvt9+igQ77QPkTb8RH1Do34mIX0cfq+wn7vxWCA+A/IQQbcNJVkGUC7iKDEy0gX8Vg9gzKUIE7CXDgBswt5J/i4JUaOm8gfSSgdQeStyCtAHtaaCjAmwDnPgJ5VSH/JQE8+wDdVEF+SMAXH4FNbUCuxOAnG5DARn9I70oAGIAC3PtBRY6l2yQDwN/2Irbh/+9g2J1nFUpoe1HIsr9zpodLce96vrSX9t45PqZuqpYZb8+9HDvwZQir3Ib8PeBNNTZdePfr1BUz33+puEy7/HA+1pKW4bFX8Z3Xvk+9FnhCVWpwRvWcOFeUMzN+omYy+I1asgk8WumcB9o4NQ7JIwV8Ie8pgpC84NwJUDCThHZskYIObEMqOlG5bNBgYXKGruiRLaXSh/SUniuXHcVpTG6JZpbIPdGSXYgTK4PLM7FxY/JCPLKCfhDvWQXNxAvunP6QwGjyQdJxDx3QDtwHLWkndk7HtMHe5C+oz+9bWHE28ex5ooAvll8p9rxG3lOsOPY8kxvvlk84G3j3sOB8YOX5mPOJIMI1pwEoB6dOmNX4vKsKO4M30Q/MB4SiS8wG/DkVYHD6hnpH5jGI+kb2g3PVVNzlPY71mRvTt0fbsK379m5Ltpt+WdkN25/eqLrmhfSZqjcs6OfK7tiGfXO0NTfnvjtaxxb9WtkrN67vlO3ZnvtG2Ypt3q+y/eLS9Vo1KbfSn1Qj3KL/kfkenGuP4oQw17+iDV5bfUHxiTfRyTGL8VbrWcWH9Nugq/icHnFKq/kTjDvOQJd+bxAfOajPKQbVOAAAVJPjn2yWqC4JFrmvLpcO6StBcg+6W8FHYwJM/Rh5lbH0Ob95GCoPFVHGTWfO3vidxtlMdK2LAPshGI4L5Y2zg6AXJdVxTza071XblZMTQl36mXTdAxrB7ln60IvFfgNnSc7azCadQ3WPHVj9apqsdswIARI9UoIYNA/uMO905sexlwVjThb8gxPxYTGL83LKA/O/Msy4OpgEJjRdMLfFxKYHcK52n3Pm6kWfDJB/B4b8iTGHBQrFNl/mReSj7kY8D+IlBGPibiPK8cemLaQDMK07rUJ5f7hO4XVQ9poj2Lw3nMZ0ChsCH+L8kmoN+pGUVP5Rri+1yfbC7eNDZ7pnjlO+CDvLOZM/DbQ2m2DGd5dEb+EC8NlkI64DtUF7GKHpKos2EOAwdr816th2CX9JJB+toO7DJ6eWR6oKbCzZEy2Ke4aobc7+iSFFot+wHXUhITu95OoI+VM7SjPWAg/GEpKzY2BNqHBt2L2cVKfPFPqiZTIMJ9LGf21aRhr8AQC37TGgVpAHRMlw1AIoz0W77FrSGozHiR2hApT5JG3mfnaNqwP+ad67UidVJ6S3DTIbJyv4o+wYfww92naMFF9CVOGEzjYInPoyDkcSksL8qpqHS0haYv4xKixl+Ay47d+QODoSyVcOq7L2zqF7C0wVsZ2baeMgkN6fxZ1XZ67vjKJYGJln/40vBrYn/HRqb8mPMlxtd0lrpejlOasYESobHofYfcufw8jjW+4gSzStBEdRFq6iIJca894w2pFich14Pg/y3vJ0cmYrrHyTHDuNZYjo6IeUYyMLSM7OMzudV9neAXgxO4SNWXUuzi/sZYqA9VXPOEkSlkMSqEhH1iHxy0LnUb3a7lL4HMK3HnXSNhVVJBSV8a3lJbsHoPdnn2cuO1+2hvRsNz0svDmxBCvIPInwdVjS82YBVt6L+D2NUq+b7fdufLp/DTRRo3mpS7CGKG88vPtc5OUmnNJRExtGgEXuosZc9LGq2ckdQrabxQqC7ullG9IjfT6HQ87IKiJ5LlWPiZrsY9bMrXQ2P3e0lW2mwv4Ti8DCmUUVP3wYsRk2cHRd4rK0SyNF0mIvhFcvC1oV8z7j8QTAr5qTa+S5A+i0JOfSA6rufjRqr4Ze6t/NgCY8pqvO25Jk7xKqUMlKM05pn6wBwdwfUjo+OuPK4DxFdpbhHWDaYIaI4o88UWUp2mKRHl+WQfO41rMbvBUJU0rUqDjxjh+Uq1eeaN7jWnZKFyruERIlOgrxj0U3aEAQ1FZE1UXj4E+qMlEDsMH+350j2rPvmqFaf0Bk/ck5onlyxPDk8e+NMTp6YEoPvT6v00G2WlI4nIS05cidt9ZXAEd6bd/8vERTYrSgN9NBDMMwjNufc5q8yH/smp9Nd1Tdp9+CTtfd4exZwkCkApbrEYKjEJn/mL0xYYh2edHru+3n/u6k7jmVOsAObaHSlJrdEiZZzpJEK+o0Gwmkt4++jEZgRAX9OsXnY6onZtNIce3CNBSkhMQeOkSWpaH73r/mj4F15winHMaTOGue6cycDsiuZoafYPslH2QIZZiH3vWKgaiwiFGSJooTCb335JUkcwsCwrEUmLJGs6AuS7PY8zumKdyQI2cPgfmWJkGSC/h3IjPYciY0k+b54VzNsHz5+OSF/TBlMm1H4A5hQMKfE4vqTFwSThCPew/TxjN68W2etQHh3Rem57kMuyMiSdx4zAy5fIa5DO5zELVgdxpoXYwPtZCV6vnR/EgC6Ta9oeysBRtg4fcahozUy8IWGUxRC9+vaUvMl3iYw6TZ2fMN3T5D2BCn50bRRwZHaUTXDTOtXDcvCLyySA6lZo8XqCnR0TPqqekgc/suzsNZA6cbhGOyio/oPhR46WdVcsmGkmKcO6LO3lsl6bvi+M4QxmXvNXGUpm98JfeqvR9T5t+oCSX1Vc77WIEZt5LCvWxR5Pd16rDTcIo3EuQTqlFP3xJv7kfxZs02SHcekWrTPZGkR8eEuYP6gSzy1iNuuu0IrXdH79dTwHxyEsZb5tF5GkJySFbDckDHWuD3SPLO8vhehorOrcITa+ETcKkSMzJceHuf0cBZ0rHnEroAkO+RNq/JRp/d6aeGh1kOFZoXHxUl/ZId62586T2HWjTQk7eFSvyV7tOsQy5RCQQyv67YEDB89roJeWd8UbaOPQ3wn+0HTbI5zS7nb0JHh8ri4+ZzBzdislrwZEdE8+PKMhE9qr6MWUTCnrXenh4WSYbIgM4kifEU9ihlRi3QRece4qVc+J75AYHI27nTI3Fp3aE0/3MQuSxLFBslE4Hhwk6cxzsa+eGi0Gg/1B+QGFE9kvR4HnB5LUcne53FRLCRKyf0c0iQw9tpVCIDJdGkVHUcvgCTBAbafafLnNbM33G2HloQgTFjVZvnZZFZ9OL+s2f8mzz3IHDB06DxXXt7tgWpeWMNAh22xefRxApMwQUqWSG/i/qAOQJpQojITgVFPqhJJ0O3fY/js5mXbzsiBDvpJARZo9wMM0FR+J35YS3/2cHAObtOTxDp73byjlzjDOmIQcs5nueqOTctxvDVbPen8/TSQwcu2uFKexcJ2d83HVvnEr2Npk8smAPOCR9cJ+7S2CDJhRRh6eWPLViM73mXXJ6b+eBVcW7+F96HGbs8k/VNIP3WEHRs8KTtCUZkFa6L7td8RTS3fiUg27ZM05Iw6ma5SfBzQy90oe3HRCEf46Q5qDYherlwJ8ym85EQnBF/wjAMw4gdg531y+4utCVptACKmVkT0ScLIDx3MQeXbg+bKGeCiqYwj85OLsbQMYHVlr68ivGAo/1VJM5I8K9Z7TwL6bSmdxG8APwokhIWLer8YnY7cei5orvDMy84e8hv2n95L53VxBQwoIjlpW4cfEXQ3oEGvCHDMHMQ2FLeiYZMUC7O5NvpRFXhY4gaTZmaSM/38RMkybeNXIcdGYMIkavirnqgSlA1lkiIG/39WWDvnw6opAHZLSRqA+R6hrHnKA+oZAa5qVr67aEqe1KXM94vs5/f8AiPzgdJtomxBMhAHkgF9dCcSCBrBEHNB/dSXYWQDXtySTqaEpFXC5lnWnb9wQnwk1tbhlQbZSXiFl+khkXcMEwSV/z3DJtsn/6JvNfS6trh6+FmQb/Qw8o1iEMg9WRQXHMmcd8rjFQpMT5YB0NrVY3V0pW2C3abHrg//ZhLd+Jt9kjMi6o5n4UvJGq1RsA16DUTEx5vrTy4cdeu+GIWIAdlm+U+a1L74ZRBaaubkSFOlu+/OfNNPbp/9plEjCuaJD5pqOOiQ8+Fe3QS3n5whzm1fQYdO7mJw8Q3G2Gr2D2GtsLf1tsySDWPr/FZ+8/tpXjf/RIlwavUPJl3sGuZ23Ov4HbRJlwhrd3Md5DvXVQH1Wcpd52HKPULDo3Sy+KNalShvejVT9oNGving7BSxon972dytVYkHg8FfpwhXgBrOBEuD1GQLMHGDZmxeKiW6YaqoBqGgKMvj/cM+pktkUMNsRe5lTNE5S9kGl2m3zlqf4TEjlc1TSGBqO39ZSF8k58T6lWdLbLikhd2Dd4a06KYE34k5t4uUmlOb9dWlkXhX+mkQXtYOcqx8Q3eNeZPoc/lfmZN+1nQ8rzAtIBwCHZG3YzV6HmCrWY38uQGdKbDD0/KcyY8m/FhJ3YWEIsvae+EDu39oikLxt20NZbVLbYBXOmAn9D3LGCCsasd6N5OEqdiOTfHx7rkiheXUm6Zz6nuay0kB02KpTDB2rq4XTgxNZkdv/UXw0D9UfFOCn8cBDycamxID+WqXaoLXvgkd6X2mv2g6PUWqOIoreV9tWZjxjnPzWtrsAM4LX++Y0LVYFz8pUwuf26aNMqKHVHO1pOD3zzzfZiXykeVw/TG+Sm6C0yC0MID3kqRRb868WeAJ7GLJAoEHq/ekbdBPXSuOaP8j7PDFOhf+irl4azoaxoqqK6woCWx+Bqn1w8gLJm5LVI06AXioVJTfwFjbdvdi9LYLYmT0gt8mo2HHoyOG9Aa8t5rgElRBzPal85zjfUkbvtRXCNX9IOAchIXOp+7oMW4KGOFrz/0w7K+T2VyvwCvsFm1+1Zaw7pWYaIhYsZ5pc34yQkV2SyaWRyGYRi+PUf9bpA7YCO9bK9FgolGxxGZwJWIqhl84Dqy5TXcFQEoYcDOfpPAy2c7Bp0VB9x//4n771zllKJuqMEkiTXjAqr9fdIDLb+TaLxYkJdDV2uKjoqtxEyqqcXM/F//o/oZdjU+GvFhsuXkLk3DU8Plo3BDQVPR6vvyAcw/MfRWikvBEnXth3A1CaaYOf/0Jsc8RvIPPx2HCGDvy/SHEttSQzNWXHOafiC6+nCpsQ4JdMoTJTMC36ZTiNgH375+wGNbDfaq2DDqLYcFT/DhMiAY+7GgHgk4mWLYII/LU4UNSo2YwpdrViK2ddfi6zutlCWQ1yCCWepcyQaWmZawKRSEaIq8Disjj3KK253TSbdiPJLCLWFy/G0JYuWtj5C/QjXEzBScI8lA2RiMj4Zy42Jv6khq8qqxWzRDgW3VqLjnGtUpq+WbdMHNlW5pqWeSbFeg9kv3AVPWm9pnYuQQamaAH33nzO163bAkisFxLcY47lS7b6P6tRvLFJTWTUZe+YDqrddBgQijxnol9B04khH7OInhZegQOoEBeq5AiqUso3TU+Viw5gMStvejkMbtNe6LZBEmQMp9Avv2OFlRGaVe3TyFUI8bvI1n8yqs9webeTYQHjrU1Fhf1lVc0gSHsEpi7KXjfWH5RL58vn+XI1M5XOCbtw5JckumMdgCbKp03yfWsQKB63Ngx/77dJXifYhwanFRY8UlXqz4cAPA9PgNz218CRusJ/f/HvPX73DAO6ZlfURIoYUMJQIliNSJ+BQW49X1lk6haOtz9qetziNOr8/jS9lHOhWSPqy0HV0vHVGv+9AmqiHEo6mhrlObN9L3KyPzF7R+nGqhOtHsjTv0D6wWlHkFBurcb4gjPbFJBMQEhN8CwkaZhkOHF3b0qS23cDtMt9drwUrqBBqCVGn/jlZJYvjWYKw9BUZF3BzNQoMOQnlly8I9+WhKMQkwVM/USlAH13XygyhIWfhv3E1Qc9nNVL1c5ihQLsKhWdATfQLdVD2sETRbeLL81QApwluHUXSfTG7oExJTT2xydgKsZu+ioCRnm9pNnI0eJv0OZZ7Pwqv3ChBD6oHgJar7lp9GiwJ0zhRf55Phmyod/4aAkOQnhuOtHXwgFynbAV/0NFxiv2mcKvsBmgt2R8BwEDkogIacKxuQ0dQKH476P8hnEpr4+mI+yTjLzfvdgDyi8XwuobbUc2PXOEBjWuga5wQF8eHtDFW9cMlg6Le+bGyxsvmsP0JyV8MLjOMKQuAyDf295cg1sRXYuZK9vqnxY5BieUVJ8do5TrbrbhPUXrPz0Fsbb6DfqpHprDhEesvXKzh3Y1RaOrEUXh85mA5DB+aju7MucCTmqjc5qlWBYRiGcahraqnKsU1PiPDV/79CKbD/2G9HOX9v9tDPU1TcFqy8bPW0jUrqMNol6PbQzdguFDYLENYcUwU5NDBdqtPRFX/co3GO4CKUBwpdd3UNiCL/LWuwLz18PPh8fP66hwf5XVh0LjtXqr1w7sur021RbSaKIJ94T+Iw2rTdh+rlWz4CB5xotTOtBmZ8tWIIFrOzLE/MRG5NHLHp9XvBSmXk/7gKEQOgJxOqwLhknYgzu8h7GVyIyo1Nzj+KVapO3kAFfyU2uAeG/C+Ip6R285Sf8JpTjg3Elo2s+s2ykdx5wE460yE3QWe/4nAErJQ/eoDtGJ3W0F7Rh+fWm2QepKVQivPqwszlp+NNLXiy4PuT8zsc66puBU31A3YqhWV408aM1Cr5sTWEyCbwKop/WR24+qxcAgS6myOlUMJcmLCZEqFdM0nZ9Kdnnxtk7t1RQl4KZ10OvxdRVwCUa5RwE0lD3kUXW7zbUf4TG4CuBOku4Gkgj4kxkR/n5+DfHpPHCoHw99OXp41ZRrJK42WqeWL+ZBSN9LBCwkw5cL0TDXAmodPYh2DDC7FedVyXz6m0tkF0km03T9Lufnw9T6UKLigCSnlGFC4LipfuofHgMsl/vdkaVNrNqdCJef7uUwf/bDKP24eFY73FncR0RXrSVbbsoCLx5OZ8NFdmXG8IWa5e7/VtZ7iF1uHryafPEa9hJhVfTbmi8y+WulikP18iKxeviPnQts7rFTVOoU5K4smpHzmQyHhtqXtrAX4U4+cvDE7khNeR1Eadw+LB5YIaiOY4RNsJKOCpxKtBQzvc7p2j/INTgafb+BX0nTFaCt9esI4Aa0Gxvx9rA6qXSUJ6F+7hHkXh61w7zFyTGTcNfmm0UoGqEhOxkQYsN+BJvHPPOHv6+1EkpYNjYohEIbOgdXABZRw2G5JMYJw7fKntDCa6qRfj2OhG2GyWC4GDxE2ucdH8wbDfKZE69jpnkK2vpzz6SnN9+CwFuWHtLWMfMntMSduUfijOBdI2e/bVB4Wg2I99jpHwSMwDoHsroUMOgrCZG1WWS1kjkGqcCWk1eTG9RRqZ1eZPcmN5gp2McETVfE/14xsYopM1IrdcnYOmTfwqpzidsuNqWoliwKOHXQjMGTD7RP5AyBLuDr9V50oerJQjunXjHPx+OSmVVF5RNESAT2MrUCsd/UngPRknNa+syIppDCnaUpw3lCNdpvBlvRCJyGZetitsjyPixOx7rUwT1/8jQYkOdKCYBJW+r/UaKsIfsuk6LyTX7HjrJh4gZ/2+QgyiisIvZJmljjfNDDnl2d16HbvNP5oXh+RpA5tQ0/hWahICfM4lIBXBPaZbyz1W77JM+hmUllXaMvclEdUSViyLHX5NweYnUxfyKgErdnWPrFbDFd9Yhyz442izIKRD84hyHQS/ovkF5SIIuxnNjLIEYYxo/knZBSErmi8od0EQNO3KVMIuoammXFZhfEPzr1JGFXKB5qkpN1XwJ5pfXZmrsPtAE6fUj4SxRvOnK9kT8hPNR1dufyT4iOboyn5P2N2iuW3K1Z4wvtJ8V4r3hDRo7p1yPRAc0fzkysVA2L2g2TtlGQjjGs3fS9kNhBzSvLpyNxDc0nx1ZfqXsDujuXLK5VIYb2j+W8pYCnlA884pN0vBdzR/uDIvhd1fNFZKTcIQNGdTokKe0Lw3yu0kuEfzzZS9CrstmmujXKkw3tH8LxTfCDlB82CU64ngJzQ/m3IxEXY/0FwYZZkI4wbNP0LZTYR8oflsyt1EsEezmTI9CbuCZjHKZS+M72j+HcrohVyheTbKTS/4O81vpsy9sDug2Rml/iaMUzT/NyULIb/RfDLl9m+CVzQnU/YLYXeP5s4oVwth/E/z1ygdWKQjGZfYxDnAnHSSTC5hog5lTjuS5UtsIg+Y3Emy9AkmfkKYtiOZfCITYcCcd5KMDUyoUKbOKEsbbKIKGJ0lWd7AxD2ESTPK+IVMfAWY9SzJ5BeYWIUwZzPK8i9kIg4YmSVZugMTlxCmzCiTO2RiGjCnsyTjGCaKUGYzoywdYxO7ANPOkiwfw8QohGFEGS02cQgwdZRk0sJEGcp0I8pyi01wwKRRkqVXMPEZwjQjyuQVmXgJmLNRkrGDiSiUORlRlnbYhA2YMkqyvIOJSSiTR5RxhE38BpjNKMnkCCa2Icz5iLJ8hE3ogGElydI5TJxCGF2RTM6xiUeA6VaSjD9gIgtl1iuSpT/IxDrANCtJlv+AibdQRlYk4xGZuAaYk5Ukk0cwsQxlTlcky4/IxDxg8kqSpf9g4j+EaVckk/+wiSDAnK8kGcCIQEsCCXEwYqClgAQejGxACw6FVBiZQUvjUNDCSAMt2aGQJYwQtKghwRmMdNAihoT0MPIBLa0hgQbHBVK0I5EzOGmQsu5IyDNwnoMUQAyDngQFcchQ6ClQICBjBD04EVIRYw09jRPBgBjX0JOdCFkihkCPGgUmyLiBHjEK0iPGKfS0RoEOMS6hJwURMkNGCz0liNBGPgLZMYPgnQp9ER8a8bGUGJ+TiW+wBv/8Nfhe+zue6xR/TzSZ+HticZrtf2O+PHv319bqPMe72wdhq091oe/WF7Grsu2vytNw/e4Ld+V95B7QH/g7uWm209fH0z77eyJP77OOyv/TCfhr677cLt6l3wKsRjcreorg5EZStskvVzGt2z/SP28wykh3fyZZpQAluxSgZNkfkDJNAwRsGFCyTgF/ZujCzhJ8DS8D0HklOiaWxASOTtDwfjo7Gad3mmkJss7ayXtYOqZLwHFndOqe5E78OpyBDZcX8PYbojwUgtwT36CoPNuE6lSdAZezFxzxtL/jh2ifPLf3nhVf+sTA0p6hHyiJMBKtrR3OTFfOK7T1RZBd5r2vb+hAktOmKp6qkX5F0JfgQJGr6e+dpq0dwOaGcYrR2rTTtLZqqnOrlmX3xLHCXiP2pNhqFoEt8HvmX/HAyWoUuyq7Xw5Mt5XEeCK+F1NYRyxSdp3n6a8cL8P/4+Ag3o0tD7k6F4GMlwP8fqqjnt05tbTxe2OOwOAG9mtK5MB+x9xf8YgE1UlRfemRdBwJk4H9uIL9R1dkPp1QX/tLAgM94iTgKGMNM9o4RxQNlshMEpxQM3nwhnb0Ic8kHR78TN6xDBSGOTva55re0vYMwON2BDAWLJyO+kwA71YMxu96FTml22cwXRFcuMbeAvV/nN+QlM5EaBS3LKDipoKrxkzENcVCFB24QDoKXAMISgIqwUigz/pAcZbISAwDMhEbt9CeOFhDQQL30AJDoNGhN7fye0OsjoFK3leMuNgCdQ0ZMTmsUe8hCRzdMFTb/9qWJavEgG1AXUBuMJ3HBfUZkh1OZuisK9I49B7LDKHhraIeII+YHBT1DBFjb8/PRteuA2kNeoHlA/cSC2wTaoHcOlpRG0RXOO0N5gQpAT1iecHTOBiwrVB3kHs39XihPkFSwHGJ2kHqGbYOy1+sEh22C9TUPKd1x3QeX9TBSa44qaFzCqSp6G9YfkAovCXU6siDmRxa1Isjsodjb1hrgbR76K9YDniQ9w7bT9SlI3eGXqPenOiPcFoYzGJIGaCvTQqP8tlhO0TdODKGaR3PUR8cSQMcZ9RwpL6HrcFyzCoxYXtAzY7cBHten1FfnOQlTqNR5yaQZol+w/IHwr/wdoZ6dOQxvOcA6mlFRO3tWzbq3AbSKvodS7hVYo/tCVUrclvRgmojOuH0zWAWR8oEfYNlco/yOWP7grpdkftqWsct6qORNMHxAxVD6jfYTrCsyiph2K5Qe2NN1NDz+KFejeQep7Whczak6dHfsfx0whPeCurekIe9yaGi3hkiCxxvDWv7M9Iu0P9jOSwP8j5i+426MuRujz5FfTWif8Ppq8HMGSkd9KXR1zk8ykeH7RN1Hcg4mNZxg3ofSOrg+IJyRuo1bBnLl7JKjNjuUBeB3Azsec2oz0HyDKdro856RpoZ+heW3074Fd42qIdAHgeTQ0E9ByIjK43RtV0g7Qh9hOXT3UussL2ilkBul+gWtQXRA5zeDOZkSFmhH7G8uqdxOGD7D3UXyP3S1OON+hQkrXD8C7ULpP4P2zmW/yqVCTZDTTyl7Zh6fFAHSAYnMZiTIw1ox7I3AryBWiEPanJoUC8QcThuja49OyOtQy+xLMK9vCu2PeoScqfoinqDaMPp3WAWSDHo3ujrX5NH+ZixLVA3kHEyreMp6gMkGRx/oAakrrAplq9hlXBsI2qG3Ezseb1EfYHkgNONUecSSBPQM5Y3I5zhrUM9Qh4nk0NGPTUi1d6+PRtdW89IW9EfWN7NvcSM7RuqGrnt0QnVTrRw+m4wSyBlD32L5bt5GosB21fUbSP3vanHA/XRSdrD8QAVR+qPsK2x/B9WiR7bNWrvIjCdxx/16iQPcDo1dM6BNAP0C5ZfRngPbw3q3pGHhcnhBPXOEVnieG9YOwTSLtF/YTkKD/I+Y3tDXTlyt0Cfob460X/h9DtpV4DwcN8CpenljMEh1HMIsfeUcsbgGMY3tHoMqZwxON+A+UUEPoAg+J5GjiORI5gdVHlPNGcODiiSA8q8J//5rOFhjMyo9zDiPVN4HBM7Iu9p9yjSPY5BFa/iUM9QHkW3R5F8T7VnKA9qalS3B5Xt+WOpwkPpBRkLppeyVZroSUWLGDdiqsWuBFkUekyso6EXnqxUYxRTV9czsi+YX8ugGD0IBWcpg4pG3yFzYetbsZHYepGnPhqMe7Hiil4RL1jXy6XS0ksntWTjVky74jtBKYC56o7SBPhI4N+CgeREMEPQQUc2EizBOEdbP4aNbZXklLpVRn4ivG1iJOfwJw1qnKcnLdW6tQQE0yYFSDZsgA0MW4CgM6UpYeLbmyBL5YeYR9Y6A06etB1YeUDQ/ESe6HW0oLzJYZInVHdH4o2GLV9zcLIG0efuBKoLxp4DnPEXGC1Djjlwo08jkD3J96WJCzHTUWaTb/lnjuqbKK3Mk33D33PwXMWtH9JKwpOVEI1HKytYVtm/eTs5A+Y5i2F8wWmP8bgL8bDZ/3IBuTb3/CGTj9PmuagjJeMyKh3Ry5wmG41loVRpH/zhKPdE7a+T7e1clfpHze+3JNLjR45hTecuKxebeSWvReQ/kCxun7NHu6+O4w0q9LPKpJrqJj0+S6Gfsw9t2i4pJ9ujILUMX0z1ofPzjI/DHJFqB/bjr+TU5HT7TM+3ou6F6GeeQj0PRXUiAnsX4budc3nLbFDU6GyR4jHRJIYq8vQG79DjNOVd6/VAIeSLZEG+40YswXXDGZ6sRJdDpP1torarBTslsj2c8gEs8wnr94bNDDiQ/O7RVFnTvEQl+Un9PBme9Z789dICxzaXbCS8XB/qRgXOywynHSm9p7M6A8ynqzuuMlBdVIcFkr8lho9tCho1iGa8vw1wYDzJvbNhXMqE2QVAIWll4SS9V0euxRKvSXaM+p1BrWM8syZAWuxmps747BSsRkHht61cv/61knJjmQJ2I6gZrX6i1TeWp1PcJ1fNgkPwR/qd5UuHwBSBK0WltSSaKGC0IY65Tc4B1XDT//49WliDSwJFDA7fvVZuAJtrzRKr6blvJwW3ngh6qgP8yXksi2oH42ZALcZszGUeayLAU6FdXQavrG3HcLhq7IQ/Cl01OsWxx0xaFIBgs0Lzl9Jlhqe+zUdzRNAPvaAZcj0TaXvUJlNA/SNpHoViRQk9FUpXpZVveZ5Er8wu/rrmu+ir7SkuBYPnVdTHU3qcX4+Z1gm1qGslk4FWouj0LuvhsxZtCvJdyeUsVEiiXDIopYgvNeCy8qlphiiup45zUYETqnD0bLR6bBfd+1mhWnOrbvxCewhn/cncxwZZJ8ADfP1cTjobS/KoKml+c+d3aNu73gSnR5frtkKQaeuHhV1ZKJIuWCnrIL2oosWy8Sjsd11lsC89aDfvw34qQRfOPLr06qBOg0AeXqbSEkPfeHSkYMrO+l1WxNF+qhZVTtFEpxWVFy2E6dKQD1Xar00vzyOGfjQpiK8nstaA9CiEoETx3vrbU2PyrFUDdSgCtPiTgz2cqvsD4Ll4a5/SJBrut51uwSBfm4iwjpNiwgGKpl3p7TvCBUACNKXAh6CBQ/Wb5nOaINgGT++KigjERqSSeW4GH1JcHQlCN55QHVKFgFPjZBla4IlOywhHOjHvC+urgx+klTUZfWnV0+rGAqOJMS++lLLdetXzGp0mVvPMqk9xFwHbZJXEQVNpe7CvpCB5eytChbkOlUnKzjtR9hB5TySE8xxMn8GsKUopJzGZPYLlcEXN03o6XxpZEllLYNn6TU9J+2d7zzDuNZSV1Ng09JOn2qeYT23Q+yotTqWAWJK2dMBMNZ/K92M/A+7W4b7LIl9znX2Lzognj/F/HfOJcjcvcb08EMLFb2eWgcRIHG0zL58j3gO0MhNUNyRxV3qUusb0LLx/bXI/h1m9BExGtahQ2mrjPSVLBcDn8WgAVZiv2JwlR9NKTkrQ4n8k/Pb1Pd3mbcO5isQhiil5vcxURje2Yw8Fvmrs3r1UC5XpczMN810LmaqYcb2+uY5HF5+NEQjJWcpNrV/NJsrSz8JkbBdWIiNdQS4Z3gMiUYJcUq83ZdO0f+dmj22d9wG+k+NMenrO2ZzNWfe4pvnA6v5QwabcnecO19LI2k/rA0AXgGwABwCnDsjjY1PvDNyTq/789k9VB6d3Dvecxu+sjjxeJGxOOzXsLmVstv+eVOh9KIZO6xAIuyfVJh2ETDaoofWxM2nomOuo5Qguq8qFzJPxKcJGxSZ9SRvr/uzJ87dD0uG6BOxsdH0kWRIfn0UxR3hcdcBy7lhXQ5W8IglDit8moBpFVqDLc66niddavBdaXyxaTkqSxhMBsQgmMyC+5Q8Cr9CRrJYrcVsd/rq49+i/o1vIwDDxdS0XI4fN3HU0ohgm8AUr35VBJEUcY2YyEM988P350OoSeXr25h11Y1Umja9MBFekufWfCmmzicW2pVpGmIQCVmhDf961T+9y1IKZyPHhTl02sMJHKLrUbq4ThvqsYiQRf8BwgQYGPrKt9WYStJzf2KaILMyF4l+ZVkBdMVZKiYrqWXHmn4r++cRjtlP110yg/ydxCgnsHWVlUBrVm202DlMjfQfJqYBVKpCe9+BxGGU3nCZwfSGAhlWxp3FQB/rejhWaAtG6cXgG6YAtc2Ke/BRmjG2YTy2og4tpYZKZI0alUKeZZASys26g4qyMcSnsWwGtjBGvmkaYCsWs9oloPxmn6KJgl+KcT6F8dJ7xZxNm0Pa1/YLw2h8l8oLzRh9xie8LcCkUnBrzbUJuESSLYJvESevXwp2mwKfwgw8Elv9FftNsEkX3QF6ouFkhKN8SyHbkrOFe9PlGUSuNU9LGWYBkXiJUNCjqpRcttj49nWuPje0YA552g4NTTz6kgWe79U0uSg1PqnzU+S/scs7Gna+U3YGNsEVLy1SKtySuO+p+UxJrkOGpLPELXN7LWhRWwxM4ghCPsvRubHeP8K5HnHXVH9Nq8bjAwWRl7GjHc8ynba6g61iDuZVLT04P66ZCi38lZKmBII1/+0r9l/vCGBku/G8jfYxCrtPh0/+yfsbAPVnEedGTlJPR4N4Nv+ihcToSo4B03rxcCyYxSSnnc6pATLBQGjrsKuBykQO1LZZKY+JXYw0ibPy4VTBhUHlLe2OZF5ZLtQwmalkb6hHyRLiVQHN1pr21u/gRg5RAr2kwF82dFmzhA50CRJFStW6QPxyUYhPxde7dqyGOnfsPp6/eRHlhTInTKkedYc4QfyUVOy1xfMmoIeosWBATcNnoT2ZaOuz++dT9DbidMoH7ThQySPyrtf2Tv5WyBMro/sT7IcSl84aI3EoUjo/uj/yL0SxcfiTcHS2nvlw8MLDf8m5Wx0ewin12eno0vjmIGVueNofvfnnq+sYWJGlP6CWkLOTdXaiu7uAETOxBfzh/S+AE4OfpL4zrC7/V2gZ2wO6zs0qKdR5XAC69138cpnoX9TgBwAUAOsPeVtjpn80PMxlCN+7lR4HZ7m8TK2Xy1+0+TO7jUemDE7CLjubG/xfQW/h6XHStDS4hMxlzTfri98WDNnpzkP6BwVGvvHAAyjQuto0dnNCZU30ZrjSODd8Dstf9whm+8PoMn+zXh6CIK7tPlka1/3HGuCFgl26/c/Od38JtvaXmEEjKo4BiffOAKWs6V8BB5QCkDCyO/1oNWoGGzSv134To1n3jM6ZB8/+AFksrDauJ79kz5qeNKaRtsVP77qJozK73UAC+8flUviS7NvZvDMXP8X/Wpzx0fdnZLv+VY8CGFPDyh25BtqPk2wGPSb0RFRiOTeYW6HawrPk/hTlC0aEO9yi/HLjZUtmZ1iVxPqvGF0g/CFtsdQ9ijev3E6NKLd/z7IoFhqp7F4WtJfZP7Bfu8R2XDcdz4X/gDM3hxxP0/f5L0pHB+LLJL+TKhs30fJZifHLpgp2ezbE24s13g1zOEGnAfqPklUT6lcsb85ALqwANErozYa8WYoBWNDPQSpzGeTknynGXC94vBwlv1nh8GmfKHDrm4q91oedZa/ofti3+5XoRlKT8ozTDO3VfFmHTUaUtWCAh8E5f+HhoFGmFy8VUaZ1KSh+5770pB6i+uDgXJZPBL7pcSWQtc6KhiJNWVmKq84+mBvxWwbTgGSCyJGIsndMOnL8z/loHObTcHRM+3aAXfPsDW1Qf8vIRRv8/R4J9Orr7MnqqLk71VTfe19TmMcFXGk5QuYzhPPFnBDDEbWqqIH8qxGYaYdgpQS6PvGuqBhiXFJs3EXtdZ6fnejrF2dH5MfVRb33lE7YVdN0L6d0V2fq5ntw4dFnpfMlhNtgP53bzZzQveIfKTdSMpuiZ+wTW1L93je+cpMJyk3Ta6eCfTdGv/bnEoyxjn7MsNtu03kXiDwGkt5d/G/n8v7/jFmirYC8u4s8WJ/NXxfXRfXjym+0P6ewWTUTzhh/CC5AUXBexHpbATDGp7W/d2KLgwlI50lGGs5StU8QX3o71w0JdJj57swTiQ80QyBuuPcpYfpfIkgSbLeZ3DVxwcC8SX8eFA0fI+uhmGMTP0ndSPOTPel94BSqgKud16T237KKn06zcQEuw0659NyglqFLXzFKB1bxUmYCedlss/ybHzwd8ncc3h9C2dx/K8i73P0c34jrdDAPnxEb5msrT/PonDbrrZ2EAmmnUy7f6N3+Sbi/HSuWbnxUtxGV0ctNn9TaHicaEfWP0cl7Gukcbw5flZARb6WX5J5pcJ24V5Uurth6nas3e0g2JAY35qULF5DNir/Gn/z+qQYSRyZvyRAcIM2rcXJQRGRm/Bf3Zyroi9zd/hafCNJmbLtF+b42wqr8iLN3YmN+8OxrQ7o3Wzv3s9XV3XVXrWedhCu+wLsXr3h2zytiOu/HGk31mhy9sch0A9onbz3bxdmO6fasG6gdXbg/svG0mLILG2I47TTvVeU3YedeJP2932NN9m4Gh2fGMqVvYl29QNRq7HcyeczupwY6HJveL16zvyMjOR73oVObmx1KR6cN9TWN087z0glxRoKTG9KYn0sHa1a2oojG586QRuFpg5pT/aU71vtSY33LhLZldSzNvUex8evbvusUi3PKZdGwTvuXzf9cFrrvppW7D3jhdu5rD5varXcRGobFy42t+DOFmCGoyN37gwxE3zGgTfukvJBu1gWF+Y37RdBonbqdtjgpt7iazTeFGB4DNXTiXeMH8dAGXlx1gxat2ydU3miroR3dHp3LBmUEicPvzp7sFkfFFjJe1hB0LdVyeBcCcOxZikKNua2Bxah2TNZg/F0hfSZMWx99Qw7KsB47wmmbEdA4daZRK9qGpGULKF4kZFlQwERwUYtFrzGyInnPzQ4eQzsGw2PDV1Zi+e9Whaoon9Y1NB7pFHgk4fMP5XlekeNTVvzvguR90NxgHOSPa7ZPPF77xLQrr1+lNjAFmKB9/tEXDLF6HZzzw8/uF6SE2WXqdUpigTk6KcowSwCgTPjj6hk7sSul1H3cBtwyuNAdt6ggaH2Ovrj+txN+s3jr0JNLQhH0hgr+QS+L1JlphqRcAv5FT/NPa5ihIH+Y2iRcp7NywA2CMc5GcXmRhx+Dxu5ZXDIQglRI+U0Z5/vnaG1C2i5QNi8nCnCnJ/L/Bbw9jE4fP1pNagZSVdLinggwJU32EipqliIfwDJoV9LNWEWsOSzI11T6DT8BTRE9PrgtVRJJqWnouLoFMADk9i6w9WGlUWUmHM0aQMCh0VtBhyMj3nBE+nRJId9KI5ScTEQ0F2cGfmvJ/QFFO77U20iYCTQpy1n9szkzfAqRnXIzwGYcX5XTpJomVhWgN0SmrD9pFQgqZZOSseb8ZJVRWqZles19aQeeoHp5zPyh3iphgSanG0d0Ja6IvAdLTZHB8OukjInqYPJa/8XFoUU4fqX/syoCPYJ2yekumXjje9j1ANYP3yKB6XR9EUUmXjDNEkz1kl2zNBpE7BFVUq5pJ16bDic4q+lmvcgL2NRRqFquLJb/9bJn2IJL8N8HmHdqD8S1fJ3bmwxMWgi09Nj85nuBp5+93J9nnV3v8zMyWaJnb9Jbzlguo2XdwzeNveIzf3Py3NuRU0RUL/m2o4skhsVJ3Bxi1dqqV80/rwpvRvN2cU3+aYp1wduxa6csY2QP1G4pkSyAWlaW5137SipezNcqYvm9OJNJ3QzShFS0H6q8yKWnItd3d2v+xkvVWzYuW0+R/FRLNUFNmyl70ypo2bwDhKNI9cQN9uCZzMc/1O6BCITthbZu8oC+qnZgbxA9P4Iir6BXcIA/vLJjs7+kb1Csut5/dZHmc3xfXoBPhAscrwGv1l1ZF6mX/U8BJYSukbslt+ZcCVMQ7I/eOwqXXBnc3KFFPeliBfSMvluyuL50hL9y4bt8otsF9l0wIh/bYP4vzjjb6pWXte2oJ75CiS3/C9IT5fX2bJnnFtPYxDWkt/vN/wIuZnvAO5UDazmiUE2JE+wct4VwxS4+YjKIVCLuhdf2/p3wrd0GeqZKrhDPs98HupGBbuv1CCmInxEwsGDWITLA2N8BwYLBowEveEOHhEIChIyIlsyCCHfYcCy4oTkeXOIj/qHjEkIsp2J5mn9bYA+2niXCrpQEwSg/m+LjrkrS9mymyD46TLiGTvCht+ClqxeKwBvoi3TuhF2Knix9Z5lPJ97T93pyB1ebiithkv1nKxAR2XLC0k+78DuJivdeQ9b/JPrFPvamIBNEntAh3A/L5EeTBJS8O3iM70/Yn+Pkvz74fbB4TjIYN772l2KJoWOB1PES0FOqU2AddP++W8QSzbNflJB5zkEpctrGnPmkvryxA+HYRSazxILJbZcQhiP7eHHFYNlkrpl0qinqoI3w+cTsA2JuCfWqlVKZJqumLzgAUNO3UpCFfPr53t6xhRycGkE6xxkYI75MXYoLpdzftyOpgEgQzBXqslINCOsbG8Iji3hPtMCcr8UksmC7ub1xZ3kyCYHa4yCNwDMMdiEnMjhhpzKfHDY2KqVpJM/LN2zgkB6tboLlY153oJyUlDdqUhrnTroSHotf/YEiox1FBfXp8lIqSqrpd/WZy7eH7zLVJ9opcFypEGq1INzEaAiNOzErz307iEg0CaLeDAdW0c86wN0L0mmqAoOS+px8KB9BobTU6IcAwyGGRn6dIM+lQdqLeivqKj7iFvFjCsJRgum4R7313Z0DRyXllRnUVVgvXMmIGVQ4q4MgRQD4JcYgv3G4S1nl0QbtDKGt0AVXZE+gtR9mME9nsKfDLjSKfLpzRQ2qHDssIZdP+5L+G7ZhEM2Wgd3FQwKFI2Wof26XtWz3dY6Y8btCjSe+uB4AgXi0TYsuZad2qQpLqVe/KkZBBvApPM7fMt2OJ4KDjWPFU+mdMCGOG9EHnnh1rcrejLkZwXTZ81Zqnqg4nMuM+U5Z+QqFyFG5FXMbDjUCdURiApENPDuBNIlAc8fI6tWVMXf+79BshOtuA18AiD4PNI8S7n52c99IwBff1HMNzo4rW1n7ROrybKWDnSn1YFJZBcl0HcbymKm5krFYx7MhAI51RERrC4NtUR7mhWH7gLbD0mN3LIQZvucJCBjAZtgxw8H/UvdnKvsBIyN7RMyY58awVezXbDKs+uRBVMvk4paB0HzDX1FNilGrWVSkeQqqUWDTbKYhGY8KUuSlTVF9WjF1sqRP1FExyF8LXirmQKpXr5K27s7jEWUC01XWHS9NxJIKZ3wUzFcTYm+wV/JdLO11/mgrAQ/+qGV8JncAjcRwCxRNYRpIJlZCtWHKVTEj9psUTb1sEy1RJFJ0v17qdy07kqOq5ZrkdDu2NtrZQ5zgauNswUGr6S6ziT1D4lTXO4eOlq9q1CtZi6aUQ9MDQ4PRgzyOqlIldFQoMJNmyV7/vg5sKy4Jq2VO5/uSR8TBGQwsKmMHy5diDUblx2NUkN5V1YES8y6JaXZO9JBqgdXJCJTJQXgnQTYn6NftBoQqQtWkeIdSpZDH0WXnGGIkVcrZkPM//tu2coaeLy0iI2XgDwN5cQx7uIoQiaemQ/7Hr6/JcYn9WMT3Sh5GBlq3F9Fc44iEJtlZNIeP58mH0s2w/o4dWDV58jJRJlr4o9PylFuih7pmtXrWamWIVXnJyTZKY3YkgdE9RGVl20rCLtNdEnBHEmh7S4UVNq+eoRhtpxcO6PFEstyIWbMrX5evpp3+zuuYROono4uYdxCNX2xkDW+spw3dQ5FqP1rlvpPJXCP2UV+9Cch5jLC4ObPTx6jsTBHN5zsLEhP/mqfhjwVYtRiRWFjQiNzAsVyxbyIM7rmDOKBAULUj8iHBskLOlBpKzqQZO8xT/iyDbAKn104rUblc2rFrbzEb70DqDVkJU25QWOe+MjD90lcxRZUw9cUlgSzrzYkxqTGV7jDWpD/SRshMb7iQKOxWdHpo0utx9+tSGVgiCNsxjwuA6AyxNwMmnUtS03gl4idhzVIopPy8iN0sOdv46k1znNd5Ff90nr/UuOOyl+b1RjZ4egRNLUJSzqFpHw+UsF+N+TQXPHeeiZNhwqzPH+NqLLGRRTllcmCDiWMDEkJYXoOOylWYfWQW3BI6NyJjp78bjj8fqiUOqvbgZWNRRw0prkjG5ShQWZR4ZCx7i9gn0S+ZAMRl6d/njrBbms+jmehNqhmBZFq+uTD42l4yF+G+qGBXiZa6p2dC8+jop7llbMyRMoa6jMB0Y1X5gQjtA3FIXNl2z7aj1CHCGTRy61pU/RdGWkkqF29Zk6YK3wTFxZOPOwG2nwW0KgqbpZqw657u9gfXiGWkvPoNuKrUAqU1STqgL63wNkKKVYc8U0ZdpRV4uSM6IDTNkPbOrLgoIvZrEJspzn6ish+GtS6JehSoWJA632aS/a1THMMutjplSng/adQD/mQKPk94UQG2YS2WLHXXrHl2BwvlMRahuogMThmtlyjVfpFyj9hSxChguS8HImC++tJWBJhdfHqSZsuPaomjCc9veZnMb41wlhYxdxmZ/xK3knY5uGbQQ/wKWaOhjSCZvOLqwMVjHrF9eZm3pGGGSCSHZMFYszyV+YjnAZdf1V+5cDq5OyVoWYD9wua7aZlXz79OYqjYRrVLeWJ1X9voH/u7y+RhXmJek9F3K7rHF0K9XYg5cDrd7Bgqp/jcBr1KLQmEjtYpaDXmd1eDbPbqjhw38rpgpytzQbz63FiRIX4c1laK1s06B6PWG7RPhaHVccffs95f6TCwsF2xuk2+TCJ2yHGbq8bR2idHUQznNXgI9znkJAlaGqdXDbbtBNYjY/GBZejIkG4v5W0shTMCMuzjMsSv45TrY4wHrisRKLNsU5qYzOTX6Z6Jq0JEwurSskY1KKpE0rEETWaL4DKfYbkHKWAVRA9HGOHwx/X5hRiKB/qG4cGsbqaeu6H2BX5kQBJGmaZvaGVZ0LHiWXifOC5Uq1QfarB72SNiVuTbJeeWGPVVmcT1fFoaN3KdQjWK6XhqNEtZqwt+JAbr7CTCYnZ0zH6BGlWgrPX4ECNjlajbHEAt2q0dJFYTbCE8OnBer5d8Nb4q9HcZkOX5SdAqUt1R3u2I0eXDBsUgjmL75t/vOa0ACMMaC3wFnLqORucCOvTCr1Z/ocxYMgcTgwXSVSFtBCz3MHrIA6GVLj4llY/bu5o6H7/gx7H7izZ+M67+MxIZi6uNQql1OVWaB9vCaQNvQYXqNjMExU2y61J8cC9+6XBBhdg6eGnjGq1rq8ogF6ibuQcf2MmhNXHVLxI37cD7C9QjapFqJCI6Mhi1tUJ1Nao1YsFwAIZKabGfR480HJB5n9K0JbiucX0PcwsioRQmm6PC8Oz7JIO9UUvsDxRN+eEhqnP1kZS+QY+/EQzProSQNTvI07mDLB06HyP6OJlc0dGHG13Fkh+HkO6hHVTtDzFfdFBVdqITV9DUre20mKOpLWo7MLbIGgYmgCLQudNAy9sVMHHXCmGD7xUM9LxgayzET/ULyr0d9L2PFEFTsS9OUMWVDGCmFbBLSG5tIKOIsQq+wpcNqTISrnwl75TSUdDK63eDTjFwZ8bbJLnNsAG5T5dqKpsl6RcHWuLJXv88ATxHkTUgT8ElP5BjQDorVNETH8qShLc4+/aKo7EkeMbhQtvgZYHL1FMnvYFJN2DPT2uzFrMkJVsmZbSSExRNE3RvbTvQh6QDT3UwblQ+mXKPNU4lt3SMtUAtiE6EoBKvJxYgAPdqrL1NHTFeZ0EHA4SpKYMcgudjApz1w40d+Ch5D2R33BpwMf1aBnXIyZxX057463leyaOz4cALE+QmBKiCOOuUeDZWs4ZfSUSGotVnKULb44ehKtIF6CEVSaYijoMynOzqdbKlN3SiQ8Rags70wDHCuG0SbpfuO5rtTWWr4SHEt6LqnH/eAGadtb/wUvYQRWssQQxuWPoa9NQBG1A65yh9U68dzm3Dn5WM9P6QCRi1zrJsYAaPgCy+N/e267txQEOVvzMPiZUduFvEDsbM79/xmaqxW7P3icOgCLtrzPY63bHssfbrF8doKqEMaCe5yBTEHq1rsgcX3zySd5MaWJgOGK3lrZuNBW0sxWCkkMpKLb6vReWxIWY2VVlUG7EIy7pSLpEK30lP0wURxiFq0igE4XYzWfqS0iFVkcVlIe2JUd314jXqCcsCX93YrD99aX9jvQgh5gNRYFOerHjJnnocDX5UU/dz5SCw90rxjaJVfL6TibaoOsr69eBEhIslXncgKF2JHEZMU2bZ9U5ZHFXlMtcwFtVQj9nmtRpBsdLmWnWytVwo+ZRzkQLbGeiZxu9EZjl08lgsCGFva0HZ/fKQlIuyoo7nxi9JIBgmbPnQKza5kt9sQk6KRCfFYCXDBPrZiZesjOJcEDO8uFRSiWEBgWjL0oQysFkxmSkisKJp/YjnFYidcTpAbsoZ+WMnNzVkowaN6P5X5yR0wtpNt9XaOmeJCNoQj0Xr4nvgto86pI1AhDJyB6rPxfn5ncD4uEx5T5XSsZxV/K+xu0VShWx6dURltNrnTylVDrhQLeC1+4qU3cddMTOqSa6eUq5I54q2T18oWGXcH0jYpMchWGAtXJqD0AePUuoC/wsqGHSveWFbKu3nZU8JskZJl0rJ18U8bmUHSb0IV9l+RJxg+K1vNVejDzlstO3y0zhDtRgP4zXRtzVsbWMTIe+fbqo0ghMRfm4i5/3eY8qVgLDNUsZI0gUkyYZTajCQZaviiCBqy9GuTExn1YkR7maMenhMFgHUV7KXH1yL7QAVfQ/uxDn8YmKtTqOn7wA668VC/LkHa7LY9AlYCGKLQqEr1TC+8btkJp1SftG5ZUrWhaUoUwYyyI3L2EGjQei9SzPjhFS9ptXVyuo+V8a4/zdrLQGtWBIfTOqM5WG5GJyAOUdl1uvKAP3Hu/5JP6cwdBt8JE18MtBr5rJ7v9c9Bn40360r57cJQSE6WsVw6eCqGaav4QqiPO2T6c74/0X1ex+0D9dwxM0APCeQi5F6ViFbGOS87aRxwZoSpczUaDzx5cDPYvPxM45KCgVHrBMQzOdKwANASyjliXsES+1vzKhNmV8NovXb4RCLDgkiL2vYEZCwsq6e4JckAdN3MP8ddP0JO+2eghUf0czJK5n+6B1M6Z3vSnLXgyr85qVdyvF2qipxm1xgYc+JXDCA/6bt5IpSYRL9ounaXANItsZKhE69vy4XegT+uByaHaVS9uBoG63Ou01s8ChU/dH7t36BhFHtyKq9E6XcA2mmJKARWPeOR2g1UwtEqFDpJGk1dlnPpyzp6kr65RQqrgwf2gZKSCfelpa8SXIcaY6g7C8HCpUhAdsZCxKVwpELCob8fS6GtGNyc4tsc7mUrjH1zbGiP23NdqnGCkNEqN3ZIYWlo9pLXPi+RrXyXxiVVfPTxYRiDMu06tFRf/qLLjdarLT2PrN/7E2yR+z1K29tme3+S2L2Ndg8+fRza+ZPG7jwau/cI7B4dK4Taev2JcRHGMNFibCfZvZEINDWVP/2n2XwKHth1lIrr2zKOFkrCohy3BqLPHczljL5mk3WjaHhn+txHuWP9hjc36lrNePd0LrBFNLXTgZfvb/HkkP5jcwuPJ4AFBwMXZG0SPO6ytk9R7Fxn85oS8H4H4al11TLihp27s71xccPlTbfcMlV+xvkIqWGasUCAO4yd8FB8CEksdP+3RF5iiE0gW5GmHqOqMMXcvJeQtZJB8zETAi2uxTBLQxaMCAVszGN8XYsRbyhEOSu/bdCDMyupUAhhG1jHAdI3s1LK7Z/MCJ7aKOXmPogntK4n5s2/fnp7TFqvzL0ObktBEaGWPrsRotkxqLKCsDnn5rlhIvHynuVndBw8YswBdsAsbn3uyOz9Th9N4eymy+dxYcHMFWfJ60NYsvxpJ6aueFijQLWg9HA1fb4m/8KtbYzO1CPC9aHcJkB2Xa+2rlFISgODy/ic+qNhx9SUWibwBFo1QP6kZXsRFa0fsxOSbEPIc+sx6llVAgYUkzwffVqtGofyRklLRjYrcdWilM44XRHmHpBsiMfTn5UGm22MtnYY0u6kcq4Sc6VCwdZhrztoa1VuN5YMXyBWaVTjC4qTTP/RPPAoDhBZtjy2xsBP/NZfo7eWSNuQvRQ+VBFxXl5DvmAzFHJNNwQ1nD/wWC+9HZEreXFIwUE4wdngdBKL1wo2l1CwJdrikjDWqLmze9kNG0sb0rBo+uePCvQPUcTX5bHs6saoyWI3P+MapF4ciydrhkKTlnGDdZN4nsTkSM11IZjChETsTEyBapwqFrvGXnsYPqWrbXnnpMNGhc0HWvE02jgpTjJ9CHxAvN6Mibxc7rLYkgTT6yc/AFnGGWn0zu/m4T5s2+aYwoBf3OqDSxeJl+5xIYDIZiUxcM1Up95JVwzJuE9G0ddFFO/7+xBpE6E+S8TudPl4WLJZHBer0caKwxgcXoSZkKNtUT9oJA+48WZpLESxkSU5wSN95sRRuG6aTy1dOTxqn7V39tmaoTxo9o1TKoPkps8wDYebRhtZBM88uCJ1q5w7MOvk3NR0yoRrrtxgZWPWala9U57zRnKui+EWQ4vlBp10qZJ3RLQSx9xsvsGkZ2mYWnyrtLu9vCFn61FaB9qgO2zIoBFZPTLuwtWclb0wPmM3PQEhHkHPXGJdzpYVGYhXDpYT5vKKBFaki5RaAV87j7vksqveNp3UOgpzHCMG7YALaYeszjUEwTMbs9c69cpv7gaE8tBA5ro0IZhevTOKxIacz6Z/JHzVVBQ0m0g+emAO/JJK7OC/XED0wmZr1Wz4LIdI1dEwjBeewfzYwWQkcgMgCnEujxEdc9/mQjqMCk5ldGQcsH/sIpgYwDh4lPRGDYJAUx5ILEhrdpsFxgFhM4sRdcIUTyDuC/HS/8jkM7hA8qLw2fPr6L715Wi2J1sG6YHcG8JP8jR+IzyU+4QqUIqtvioECOkCS0B2HzpJ+qIzCJYH+D4kWR1Q51sbcCZ2IeQZBOcJnGQdvEP1WxOzqxugp4Q+Ddcr0n8nkns/eibXaitNnVTbyKKeAHsdubloySWG911zX8OK+5biQS55yT63h1BxgvCPOcH/1yI0CD/qMYk34Yf3rF3M93wQVfn6xgUw/xiHUcImcgksUVP/0FnSN6Sf5cL3j/X6kQpI//TfmDU8Ev/EyuhP0rHVJdDYL4/47i0SS7WAjXL1hNzY0Ex3GMdk2MTiigbwNUMtWqbJOTPx1SXZCeumdtpOfHniXZbYYMwaZtp8h7ikMcrgQ0jxLVxc4hUfy67BtuD91YyOnrB47gk75EVsHrCcjNTSfm2pZ9W5vG2PTz00LuMZnupLUG18wtXetzcJBsfHntFFJbiGWa4Sjyk4u9w+9oaSkdp0Ca/Wg0reksqX9kCMxiQ/doz3KFE5Y7eIIV3WIybpkBeWiTDZ7AqKpX/6IV5hrwU4SDIn1rIhW54NaiCdr6qhJhKryfq/WiB9moIHlV37Zd9YaMELJxXn2AkiYfW2wlXFNW+z7uPknPfsUTNfTh93myY+ljiGYVSfc4Hkw/nyVsBDI7cQJyx+jI+OWMQ8snVhIoGjd8vRaFb7Mycd/gpXnYfw0XIvuuFVB5/NF4ocM2s0F2gaL0HDZX7hnVl9xwxmeGqQ50uCypdfmfXLqLQnmvfx+M64qm51z/sJdDRM07XS7RoZsA/ZhKD4+MWAMfw7R1Tofug62SINu/zRKUVNzNbCSFSi2z5IMg+DXQaz4PHqczbbfNxJcqn49rEwQXm9Xz1xKRXhXaDkY8H8yXZLCD6uY7KUcnDYdcISBwMtZwC8R1qy7SAj45HqNVTNaGO+tKXJkBQnfr9FJi21+Mx6KQ6N1Bla2aaunkePUz+9nyjDks8PlLKgerdZ6zRplY1hQdlIbXuLiYyFARtbimf4REfz8k1ptvojKL427L8sjJlQqmaqGXWoMpYJVkdWVfiHhaSjASNcSS5FZzFRZ/yEBUrAeykA7+i0Jqw/IezenzB2jyMXg4ZaaD8KWOcyuu4b8rwh5h/aj81UKT920U9p3xA/CgOHdqZZ50T2eEDDPhLbf3SL8m0ZmgipuIlX8LTWANNZZXRrbWp8shC9qWLtSGYZiAFHbKGgQGuo+FzwDm8kmTBXX9btH8Ieo5Djfmnsb9b5E/+GR3ak4iaOF7Smur640B+O/3ynGMPcWQwmWjvLZsf9yYCsUHdlNnlN8sIlRNUA90gSYi1puloNCdKRPuR0dzdx9h9kDi7ZwZU9uKoHl+HgCh4Me5DMdbGTnkJsH8zcOTnVn+oc3zxEJ+FutiEe34N5cC2zlFRF/355+GcUGTTGnPMVBh1zZERI4LBXEf1D1mNF6udRbHXAYgHEhHE9pF+GbWqkMS/7KrLHq/5mTdxsGY4np/fdYYpzyDjfP6unuDS67bCIfjJolUNO9vFv2qLCjw8oM/+2IKMtpwMn6ACicUHfL+T5hWnOda+PWrfUdM9sD6Ypw4V4EfV2HqCyFsrM/1UWRSyEJQfUEu6dzL3sLtLBOzqvzh0QLvemR9bLpRWIFO3VumKnBAYDE+pFDqaXBmiZwVlsiuwNuyrcXyxt9VgNUr6CupgWzvq/MKC6v7UYI0hM9FgO85Arl8Mj8qwl3vj+WMNohasmzczNdIR7uEK4ogcfDQY5+Mwmuq5SbfdNv89DLGKkHcFCBI3LqtZ8jLps5mKVtN4pSI8X/8e40nGoJU5p8jWPiO//AtSzjVeOmfeg1TV5h41JsjMlql6kcn+a2rTRy30Qs/ZO5ZHfjckP/skvt+i/74wvSHDoSM/lDEdTLlsP3BZlHDeXnxQM7U4MLydi7ABhvlAiuWGLouXrY72PXH7hHJ/8I0uyca8fLWbimgEGvWeFa68uabbSe1i1p2vcZi5vqIEGlsVijrOQuk900AZC9UMwwHOJGwrk4HlWD2VvlM/+VayRMmbiTUqGCgSlTw3dMETAMeJLbdVc/jZEy8bgSyuGWFRB3m2krfNbAH5mGz5Ci84fmdDGYsQRIybBx5HYykXU5YqO7KxUOlwW3EfRmFw6RsJiHh4CpIybvHdYPNYFFQQhIu3ltM5evE8bnCblGCktNM+BuwuQ9nbw611gQbBPGLOqAjNBYi/tiQGQROJz106WBx/6KlaMxwH7duqE6H5g+gPeM9refExvHxtP2opZwqFPWy9E97G2mtaCBPTb0KtAZTUSAcnC0/zO8tmhL7Fp0uxYmXM+PJ4/uLoT6PDx1lrYL9TAj52kGtqwF7n/jX2Ze5Mdc7JP/Pcn4QEAnDMCH+txtPfzLOdQAPNz7/3lRfVxsHyCBHO1Ec13Tz0RhDsu1H0p0VyjRfPgAgqwD/YaAPnVl8d026jxXysi9mr2N1xAdXvjPvuCeXbS1ibvdeWDcUxxm4WZPFMtCiXGSAnSKDV5saeVKwoVbrCcux9ZDMwrJA8yxl8TdnAqQpYzvpSwYVpoBqcl0YjUmeRQz19o0oRpYi58NRLpt8FzyT98eeJ82BW4wrXjbl9t581PerzgaGNp+14lkV2W1L2LSjD1yWXZtdJgr6fn63/18FcbDIUb6rJrmvekUuiZnN/4+PWv2OM6MywudjooCJgMHP5sxStoux6T+xNDf1bh7hmplJxkyJIkHYZitfvxvt1fBas8b+75anjduLoe02heY+Gab71vrhdfyY65qZXBz+NRGqJdMfQ59n4s7ew1Tl604hoxmZcyzcPz3hrnfjtWQPVSoD93cSicIgF85rcwzMgbrJrmNCDH+DjW+BWHoo/xVgDrg5huEJrp9B7MgwTtuo7EvkkR3qzK2I1WyvIvnsDweZbx0DbOpoxzjiAboTKu0BX3SjUDJO3akLSmPHe/yIdGXkpdj4mFTYuXxN8bbUD/ON9CFj5ZqUgVXo63LXMROM0Qoz57pxPjm0n8ulx46Qkj7mJfFKWdryLIRFVJ5+yX2+KjzYQk4L5S8xcMI2qixhvmqpniu2ZB1q+D79OrRGqfDyFri1w/t10SIwxpqKS3gJ3wL7wxAuQcrTgsIUARrCVXNpNbL51wg4Qejz5d2mXsM7oJPXvhB18CWvzQlJasmjvKP29knllWAf5a9Mkwtfk196UXiUc9vv/z6NI3fx0E19+cclRRnHZnvgEKCPYqxMdqDtApin+hDIYAO+pVm7Sd3ZP97ImzpMQ4F1uU9wdmrkPW6wcXMNKaOOTiSbFPQ3cjPJYeFipJETAab8j+FK1OjH9zWrZfDYWVP7B0Zy/Hq4bkJLB7mgfEvvMexhGz9vSlHUnaPBGklsaW05k+UUVCexvKotEN3Avn6v0JmFulR3gpnS5em/d2dSKJdiL+014g1a58yEZlyUUq8xWuUA0ZTVhQ6d6YJeDzoDLzJpU53e4zS9OlqY2A3ktTfvuDtf3PeZsfFJoUbtZLSpPM8EBSxj8EUf5IyqemduD8T9FDluMpci9rzc105TSbF+G4EOvlFgGlgjZLrYhDM+OS7KsN8+ivpYUor47v51qZWBCwGFE75QRMyKh6KMfZ0xk+Ly1DCPW1oi//up7Si0RYbJ17F/PNDdCdMhHKsXjojdaLzgQYPSTpp6+Fp+weWul+MlOgujhnvKZ6HSpM/LL1mftSN9pZlsfgkeN0aiGiPPym4yayiQiAEbGbyCVxENRmXOK2SbGuL1WZC/Zi+azKyNi2cu7kz21+FwrQqH07L3NCklutYFjHyubvWneN2XyUUQuxLws7T5kPqmhm5OD2xO6T9oXS/1Kx9B7V/md1jdtw4o0G/cd5DEyM80TLkVk8202w75WT+o+Gf7bwfl+W9XLO/ZTYh9Mo9zMH2pjO5YngvB/LaBXt2b7Vmh4AdnP5Zot4NfTITKvWjLPvOpVunck+y2XjJZU8I2brqHzsH34XYmPxaL/kD1P7cKIprg77PnF8gdFSuGmzDys+zmj/ReYxI3tkd4svsJMj8l0zYiFFi2mMP7luECkQerAwjYPW5cT3wb7d3/zxlO/iqOdfJbXN3j+xrQgbfz3OQIAnDUCZ0r2+gR3PeGb9uqO9bSzVPhMRKl1dWxC9S9oEU8ehoEyjYA3iQMEU2KDjOMqJg/YCIvl4wABEh7HJjziaPWs0O1vtnFBB+3OQWpQ0RgBmq7ezLzewmp+3If8uisifir4yWQ1k5S4bG9mNQLsc7HJ0ly9OgQ+RBfqqk6DsRT3PW7DC1ZFjB4wmY6D4kndxaHJlhABnkSoilbTvHWK4XScU+SrutEpWSwjqEITg0polFgb5Ju4M7GS6Cl79FXHXBVcXeARO+14/xWIxiyXzPj5qOD55/v2R1Jr7ONfO6wXYRr1v4w+7iyYfdbNor/nx40VPyrBJFvit6ASfbmTkBKsoevoRWVvw1gmlFi0WKNfQeXRH4uyISYaU1wVk2IUvWVgueJ3JqFZsiYZSVhICp/Xs2LZhsoArv24T5dnEZva5WvvPslaiGhQFbvO6QosoB/S4L76cEqGOQMKhcCeDh5u01c+uddJIuNIIh8YAL1//q/tNz9B719YmZGrJaxlCBb+WdeMwOuObDS36dxAicDNaDGLluOWLWCZJt0A775NfgRPjnO805HnRtjzorn25vjuh82p9RejWU6kHtYwDOP2uISTpnVx/kELLTHHvTnzHGaZo9cZ9fRQaIoiTqOnRE+02G4YhwmzGiaL+fh7cI+ESsbDWj0UybjcRork2oMgYyVe2eSKR6tGO4g2WLGThRYS5xNKaCIR4ASLe4mPW9kHDMm0Vajz4q3nxTCMOOdQ2D+MGz2MZMFdd0iftYe1x2HgjZWQl8q0xxsOm5Ly79Lb+VUGTd5z0gB2/KhV4+vjIuf78EDcMSKWsT3VnrMxWsFl1hnGO5AQof/GjNvGBsD0+cqx+xAAP7ApQR0DrYP24iU4SoBA2qOR9j133Aa+5f3PeZVrVMguJLWh/svVWJEbu7D0JMDXRaxMvawhj9dlYFVokJkSyxnv3pFCfiM5/0mnN1fVL5tY0rJ4k1GeeFnD1Z5ucaosjPaaVB6JIzZlqKgdmCTESOjTVrHnJsI4SiAWXDcBrGBbqU0yCKD98exOIcGFM9ISQn0Qbmv0eEpNZipNAhLOCPsvjlJQ0NZ+sgl1qilURRUiq+Z5+9h7bFzcu1y/j9xepJa39YiA9T77uiU/40GQ9SOl8+x2VjVbmjWQu27pUAL34H0zTGAZrACzbl2vomPAVT14tIscyzjygS3hMR+CW4HmzXpGyDyQ7CtY74SV+eX8KyyODptYKstVKGYnE2rKinPW8LR1KruGNDhraqsTN7xcGhEloLnlRuEXFVjWZOzlGHhu4JjAlobQ1jUoUCOPyTcxtA5mNpdYyZkbYrnY8nRsb0Ti58C1Bh+YuBGd90FFGuGCmOB5mPBt0DoA1WfRsqOjPrCWCgHqsldrpxc6XkmerBU/GYBRGG9CLr8CP/3O93MvTq8LBtl4KaIraoXp4KpJZmCwQB6VQLK4QNnaQ2WIMHn6WkzaDhQmOCSX50MlItKqI5q55NKZEFsRBXprJJd3UXfxbenEo/xYh5wJKEf78Mw5IIwPtrLKzEjBorYnj/HMYcTNWop9YnmtcTSouEyf0tJSL+u9ybfhSEVmrkCM82/6mlnQOHRyoSM1pZpIGr4oqeltxDmHi3CAhZyjIb8nHrb97drkLSzVRRffXZOuX4rWh2ua3cBZsoGxvH7/e323VaXH7L8QxUBYEXuoo0ooRGmcS/megWU8I2LbgPNvNpB9BGuwW1jj3Od8/uSsF2gSdfhSRDmxE2rBdZvL02PAg+AkUi9Iiaq9+rjGLFJHdOF/Z0ZgaKX8DQ+uZJsZEQd9oqVrNZ4yHtlJpSdPIcFTQRleEmrhjlkgs+453qbn4hxXZvZ93kcO5/0PdxOEcAuTE/EPSicn8188r+XYkj6MZBCcSFdaGYqlfInAbTg6EbKeht0oz8GPA1Nh6c6CCVNYLi83tToCN9mYRvzbqOc8Lor+qiYPSMIPTUmDie/lUGHyoH7vq3tz+k2DTQbkPBkCY+B7TIzmzteQTP9TB54NZwHNpQ8NjOw+qFdmWgtW5gnVDTm0UwGpeYGQC7c3y7MDEQsbounmmgwmn6d2NbUaRM+XOuOItEd3x+m0nPy21wzmrid5skrBu4MoeUqCf84Sm7UEi49yv/wA8+Z1fU1rtoPddbDZ9MBwDqB5POAFWifnftgfLUNZFmBBNPEeBuBvVsawbuT5KNW5Y+3SbuPg9tDSF40K0guI6r1FSdJxeBKU0QOh5E5Xm6qjR8RLGUKqgbDwv6t/AaJ5xWm3JZRG+vxAMhz5wobHnz3PE7GdZQ0h5RrfpEpf4rOH57F2HFQ4p8eIGuoLYHXU+35caQHu1G/tvDfGTaqBMu6bWGa565Iqauqh+Hq+H5KYagsrHCbs5g/tj5HJ1nqcw1H6zSJbRAO60jY9wrD0aoGDi1hDX+/51eu53YkbKiYhpOT4DoBVJu8a0qQm0nCsipsrZ++swTJ1OKMn11kNbyDCPra0grS2fQA0pYBXUo1jQ+/5cYtXJyH/8MNdna5VqQqHr6TNb6TsLOCHUirss4Ha0hUnj5zCq2diik6jKiLtsUp08abhwa/z0FGHCBAy33Kh0vB/ve6O3xkcNnFMRUWeud6En5w5wE84WItg37d6JSvraIw1eVMZ7C2LYWJtiGC8wMh3flU2tAyb0lULRyOKrzFPz+rNeQbXFXxUIwG+jsoga+LPeqpDIGuKGf2kCDNKBFQ4VDlzP54V1plPLqL1MbCr3dJnf0NpYrDTWy8WPssYUd8ibLO1JyrXtKflXaAhhQFMJ9ZQj8Qu1fs8hjWE3QBtEW78ROrwKnMRDs62ZpHulidOvtnJ59a6u9OFTi1OkbkkTkx86UY3t3mnLnP1RHgrpfP7c//L1HDSu7UIVtOfhv7WHrkW3mOCr4B/fnAMHdVxgNKDK/NWC6a2ngX5nphCZbYWc+IPeVCvt1APBF71cyc8f5i1gXEZKjujFqTSQD+YtQPca7Zuq9K1V3tlh0uTgN7su7RUJucgX6/YFXfvRXHZnRJ9Ks96qxBc2et4SfRsHsa3B1HQpTsJJMTgGE6YeeDpgwo9LR2n3EOTrpwYPcAt20qPGdjK2066OU5dreBcUQDdvEIjLVNE0phSZIqoojDxnjCoMfc4LKzou6YM0AhycV829FAWHq9MVrhsCBtG/V78Qm4AbrcGYRYNPpmnnfOppod+JyUszOwoO02+/KlP30el5B1ra32CFhjLfk6fia5VaoULN01WQRtbPGRWEKIRo+kp5JEEFYw/drIVwG2D7t3EXCPy5TcrXTU1jR9/NBICSEiGeHcrSOD5VPMK115Zg3AQvcEOLlgxg9h8a4BtPsWwt3I6NucoSQWjXyQ7oMAC03PUwwPuq24/QE96NMFkkBfSjHy8GdaDMeDbFpINsM2tNUTEAJwqYhYv9LXcaRtc6pocWi+8RNS07Trdg+0yKttJpjbz8VNC7dcnTJuP7ME9RIVp3fNZgJtLS630ljwaGRXTYcpfrYsmLdMlM7obl3w/Az1sSV+fo4yyZSBYyNhirD5toIPewY0Nne0Rcz6TEYYPfRAAMDr5+ul1p2pTVWWqfG5eiYLrBt0nh30bCj19MxSw2i8IsZU1ybN+Ct8X2fbvgh6WOoLhRkK1P2Ffyat27T0/EbBllNT9czB9+ZqGybj5KrHuWyMT/xgQLJrr7j8ilQ5LTO9jIF/UmlWKqZboOIsY+efT4txasFw07LV/YgfoVZjjLrGXuCcHRgNJ0bLF/QwGfkaH6lTfB772DuyvXmy8/NLgTbQD+sFoyQ3a/7us3L5HvhO+RHicAgYDalD27QntY2n0rSPoOL58WC8Vt9SZndeCgqM9bh77uro1eWfzsVj6xg6yJEn1qMTARWjxZrgVKyyN2aa91zT/izn/FkmdeFGzVNQAiWySBgbaTUwYNTT5LPKpEElbFbCZQswE0oiZaxV5Ipx4lqOi3OEY4Z+OPfNWw777OaBTL9jzxMcT0tK3dqCFZBdCuqY9UgBzGXhk9OzjKd3xww1TP4aaCMmV6prDhKA4sijjSoO2d65+0gjQGLQPIkKZFBxeBuHxtT4X+hfrbsJ99p2U7JbkCO4F7f713rNdQjQleoplIHT+4UqSi/hMTXLS62wCSpylj0iX/QAh9+oTrqthQgekVXxUbvSRQEnLgAWl0ExR0DEBe862HcGf8BJN6pea0rmpV83/ybCkNomvRD73/r2ZJxyDm4Sg9QqXCmO7WIZwH0f20lGb1P11uVs+tGj6ER3Sb9O6e1KyBwEaByT0KPHqvYrmFWTSkc4lLa0GaHw56SeOT8Ttv7dplV2WVV/7ENtovu3bVVq9nhj/YzPpIJyyZ4x/ETzuLBNO5ZKKcvz/AalTpx69CImPpOcPn1HBqH17DMk8RX0zzzRDP6NYpDIbypwRaSAR4n3P5rqVYKd2C0v1vuP5Fkd+buL4MSehOHK9t1TysQ723BCqc33Hs4fO6sbi2zt/Bcg94jJ/2gzkd0i+EOYgS9MKHxRspE8Mh5RBcgiWdDzWjm6e6S+Fd2rUa2YOtL66h4iLAGgS848YN2vUmoQVio4kv9qgBUx6FQQZPBgk4w1+/OodpY+xYjfcO8zZBPLHG6j3CT7wcma1jpmJh2MHOiWOB7yAHvP47EM4jb+SE2kd/T7Gay5W4QcJTTLx50b1brKitUHe0q7Gp8QEeJxeccQa8QbjOkl9SEkH/cTA9AtvcAY3HYqeF++DxS8iH4dnRDQjcJv8hEoYkJOW1uJp9wBZQ4qR8dDzeSIiFa+Yy0UVKMq0iEezKxsThQfC/I+PbgQoOVsuJlhcHJe8Z9sU1VvrKC8Vmq94spR+mxH/S1jF0LFZZVSWLjCiE5KARCZZa4pcb1DXBNzlcI81c3RsCuBBdwC9lhq5Pkapmdhfu157lKIROk7jgYPaFg5ImP0qRiA8u+ulPWjRpbUnSdKhECAXlHTiTZIzvJSm3FZy2U5DGZXPkRxUbPwCQMVyy6O0A+G6JMo3TtL3rZ8Y16I6OtTy2WYcL+pESLyJADQC1kt8W+wpJAQjT/GWZob/pi6SxgpqBOimnQu3xS7dtixSClzyqrMSvnQfa0NT2d7ssX52qxvlHZmUzpqZdcyPvuSSFNBF8ezM4CKBjlQ7dp131nxeYg4r2Ti0eR45H1YFvNAJCkFd3f4qL+eHG5HV1o43Oh/amAMkvXRB8wnl0cVsdIJRkrL4MAlWHTOK6Oj96G+YdqHz+ftI30YXZ5QGePQMwrS12scEZHsZ03KH1YcAzN5xWZvsssmXHtn4u01zmCE69WfMFLQy+XYyD+ZJCQjoXefRYIQS81CrYiGF+EPqEIhQ/Mr5EmkySj4uXNoRO9ljyM4ETUTwWZOtxwV91QmH29geNMttwGWpHPmFZYOEqM2lba/MD3DsYRGMAxxbmD4SPsONPh6bOPvODJS7BtgAvADJqKXskfAp1+i2jg3P9YqSUZjEtKFp03/nusOrYC6Q/7IS5AHdDPfWcDqiJhmwvLNXqVuOX4adetQ6UkmU31gcrqHBMCqyzgz3Mrf30f9z+9yLLJ4PxXMJl9Mrm8TNCX/gkvX5JI4KUXNWhVsbtC++aKjHT7bYRyT41qbU/HHpZXTr3TErn935ZB1JBHuMEhkcUNc7ZfNwTv3u3DocxbKzB4GSKbT940mm3ntLq818xZMPd3fPcGe7jSNXqNWCKdjORpP+ME9BI9IXJI3N6tl7ZlM3S3NfHel8f6319Pg8wrA6ZG3BPy11tnb7+QI2b3377FUMSZhfQIPK9YZpVGl0kZVIgB5HYJLsgriFlJcp1aeHYlWCUa1wPAmJw6qVREFgsRbZ+50+Y01WBZvzp4VRNvF184eWN+azUyPU/cI8oy/wRZWk8og2Kwe/t90m0tmgYHvluOTWCTjWil419bIyKIYWKVKzQu0jRslurW8Ss2G0PFusZ7LZyZ/HS6VY9RPjzBknDz0f9XmKZ81ND4AoxEG7clqfG4eOuDRPlQnUU0mDRg+lYGi2A0pcygiWt0+m5Q17Pi3J/jFWHS5qf4S0+dt+cZS+vi7fvMescG2J+p3despFxy05ON8e8y1t+fUuvrmnmZD+2Qfhl6wvWY2Of9Todcsjm8Cbh944RlL+HoVEH5Ys64uHqUnJG5WmlTyWAB0yIZYleIhebW4pGMhugEG8SJzBrA7EkyFmEp0mc0+I7c89fdTvjdpZkpgG7Axh5XdrbW3tNoXEDUyUqAegnJXuDOGyp1tUDZT0adPbGM/5Zm/Be/HoBMrFWBo1f+1scN5w410aEJ8cahbtTn/BalBQZTnjQpEqGIvqz+jBX592bmS0j3pj4S5U8eIUTjZ5rjhUVE5rfhAObjOKJ3mly38sUBPchl20NM0Eucq81P55h49Gv6cFRupgmpt4MZzixo3p/ggmB+T23e8KdHrWrLw1hMmC89spWhjRqOCYNJfrYETSBzYcozRSL3mHcGIPnw8V9sOl09jGykfmGyvaUKAHwctdvpv3HpwoHDTGn3oTZOmW6gwycKfPs5p08ILzM7YMQUSqrVaqdg7XCS9yn4O0a2Gb2hUBxZjV94JrhKq5KvRpmI6luLRkR11+Z5ut4tsuGgcpW8+LCNpr8OtUCNEdWGEzo1D+0zulapjFmao8SIDMVC7mVLW1tjYBvudYBAhCHFtfjBDp8NYeDBfTJM3Ef1gW43Wc4waEDM44WEF0Sl9GO7fcBSDp0GoQ0LbWs8ciNvWQMuhEWRpqNOHO+kUgaev5s3DY2AD7l5g6czXuY76haBkzY3ly6/t9iNqna8PAHHqwv3aRsQR/7nRKapsL4bM3uA5I8bxgM6SF27cUrBVoHbdnhWWIqXdIVJPNidp2HMyNNTXWwfrz0Pvb9EoJ4hhwC6e98TKexxaozAm8ADfiTB4w6cAN2vfDdvmzQcskEVixJ5OpMEh1uYFbXp56wvCRxOjisXB7GHJJ9n8blJSkCfTqeCwVhb3Fj84KeIiCe4wusbnplJmV2jFEoOt2E3mVPbGwexBEUd6/43Vrg8/1brD7SDoRXby6Tw4xubF6emch6gK5W3LZYHkFO4oa1sPzrOgJCAzbwVsAPCO5LFeVZf7YCkXxhfwv1S+qb1Jp0yNjCYmfTdKN28pL9p0PuhhcW7IRcR95XcYgO34ccNk4+7YwOxzfdrsGvRKkat+z9zL28JytNxZh/ZjvITSUFp7YZLLmabVzCwWg0P17exRr3wdIOdd6VwzBVH7ByQ38rkBIKpo2Heb6d4vKJ2Q1Xt7q6vjJQFbz1SAfLBuGBnDoqsNPtLIl1Ly78I26IxwGKvfRfbTUiIt7HJh4OWJr362P9bkb/mZYa9RaI2z9/ylfNV31ktD6Wcz6ZlDRx6cQ+LO58NYeB7f4NYfKWfjtXsQMd1MfiSpZN92El7MkXWU9v9Ua9NwMpiIKgLwJp9OSB+tFIBHsDD1v50+uW3M0/dHv+dAJfWagAMT9+d/c+UeRPwVR+wQFGx1/LrJLLomoFhm+xj24b7ee0IrL3ukiOpIIE26hi+rV51uD9MQpqFuYAtDCnE2IZQv/mhBp37QJg0KibmV8BigYJv4+gE84+tHts2wJCvUsfXaFwvLZZs8xaBTzkMbbcjtDZMbZjHq9L1tMzzTPJoY5PnOWHc4X9pfpJVNj36G6/Yzzc8jcPZJi9TA9qox0imm+s/foxH4n7VgvCBSFV1d8NqkiHW68Km2GcqsICyjRDV3aFuLRqVa8Wm2lO45Dzz9OTOkDeNzaS1LwLivs76idq0XGnjTU6jsefWB1HSMJ3xAF9G4pdlolDXp+4oRh3nb1/ITrNGJu4sTE+YSObeXl4heG3Q8SFN5lK5+PRtHpL1UzJE60CD8TtBogwWCvwdPj60fIn8bLQ7W8hjM7QBIHbnYmoJ0vyTA5bpGM/HglSBs7j5FYzpPfUusNlCdZguiut/pZynAKYqINLYRsJhRnZeD0rjk3SMrK3eHA4ZGujRHy7tGYIcXksSpETXaMySesUb33gl+wmF28yOalTEzjThmKyEAYlPEtgOsO//sizjFg7sVg3aR5hJ9sVxVEiXkBPQUw3lzYf9sXp2okL4/8/veTr7rK8ixso/zz7XmfLKs9agbgTVVehHiLO9fpxcrWXLDALldGOTICwJmZgfgtLeY4P26DGhbEriuOhmwWdhDXrQSZzKSNcHJmpX5op6h7vc7MfM+OBw4UavBawxMx41HDq6Gye2Xkv5w7zHiE2pp0VLzmG3HEKO0060JNkpbtxCNc6br+jVggJeDG6nO3IoE+hw4WWbC3OGTfuBxjxWw3WK0ubKd4owukGIf/zoMSDtTAeG00iQwzcqBQkMlwfrm91Ynn9OZEub0AX68PQCDXAlMElcpacT/4xrKMkEK62e5R3kpbkKsXyjJE4db+jRCD9xbV8y43dqMx3wnu8987U8K1kL+y7Vx1OVuRqhY1n3FzG0Rgm3A93w341xc5u7LdP+8k4WiuL//SMBhztEtUw45/X4im36m7/CpB/B8+4fceF68GbLTzj7QrgB0EwgYeuxTkqzIQc8xjx4ldNdgaPUQcjZ884su+jk3p62Aqpmf5EzPOWgfwKt7gXvPXDcYDZKF99nflUrsgOSW5rsRErTIYcb9Eg3Pj4ONQjujiu3G17Qin1noSzSfqZugNLcsT6NiLHwWp+UMvD9VFt3gJS0GQavP9pMTcVnBhLPvD26wV1NfyheR1S7wy4eZ8t6sPqbd/Pzk6Ff51ADdhRvsrFkMOW3KV2065RIw4scnXwqKMXqRPKFXZzjCgHDNbSr+1f6lorLxR5P7QFb1VFLnJFo23r+aOJ05VtPsu4MxMIovumLqSbLdR0CVsq9P4wC4tOnpq+Xo+OVJTuMaXL6Y82Ktqrq9imor2hlQgiyHgK7cTpvzEktIexwJhv8U3cE9gBoQa3NobG/lF7BNAMKUmJzNWn7YUiBATYRgiUBKGdr6zYUNJ00SR/a30Vt8AZZdatGV7V6C6OhkMwd/N+n65EZ3ECsK3rrSN+3M+cIMzt9HniqXJTl9h8TJf0Tgqtbdd+KV8JDKTgorX8/cT/ReMT2scJPDykTPB+JhUprzrsaMpebDoz0fXemZ7RPGo3KrnZo+oh2GIGuND/UcVl2YqS/AymXSZ+eh2ywfThCt4EwlQmcn+a0HW1aag/lY5ZheHzmwh234Hkev5g0P2/+nQcLwwR8cB4+hcMBgfZyyJRpiQlEBCdepbwbCfEq4xAEztqF5FhVsbZzosHSNoUB1TiKuUR0cJySA3bhQXv38+4NVheQOCLbgYlKhVySyvP3vlJrJru4FxH3YlMmyHOfBjXIZbG3xq0impPDmiFPBf0WUMHaMG9amECQBT+KzhCK53F7AH9RJXCCLc9ZMLmCfUSTCIMsKtQMBBMEOi07tMk0cnFTi4mWvebwcewGqflz4v375QrOeFhTHkB9my0+P03nd1z4hKjtzkNndvhoHXl++1wKrKwr4XvaLfrhRhTiwkSsIF+7YfR3DHPZjs/DJkRvIgx+9lAAoM6bEPlk2NzKxy/f5Kx0/X9kcRq4UHor3JLEiZBw7VmH1O2ZjR6ZitWGCpe9Rx7lHCq41YC42qOhp/VVRryUJIxCBGdUdKp2pt8IbWQ6EuWIfD0/nlp5YYguc2ey3llbyZnKgYXBSxbJwmU5zZIrHgOYGud2r/CdXDbXOFEd+BDdVKqY5x7hfG4xsf0Dnksx6vInCY0elnocJyqE6sQUGAKrt9Ex+MT/hAcBk5qv5vwIJ5Wmkqq8K/S1HyEwac2q+ChLqZz9L7Tc5DhyiwF+hhohPD0qBkmTdcoU2IIid8GOdihTRdGRpJNoeECaqcyC5CA2LBSyhosWvVtotnK5ktTraH6qRz+O6/Tj3U7lZckTabbmj8dh5xHU3yY51DhL0BMJeXaxKny26Md+vlHA9RvxRMavbWQozsm13wA3arkB2ital+IxLP+Jb0TxF2FTMAc+hxCUcg1+j8kxKuZuQ4ASUapFzw6choL59LNR+B8mA6JdK+suDLEpuRS1OCJidLpEGrCSl9Q/XAQxyPB5oM/gnOnahZ/RhPcuJOZPfJR5dx7y26jWrKQ6d8i7gPoU17dKzxDQUQHZeJsMPcXzFIZr9hlIpALoGGNZDXnPsKvIj7ngCqUg+mS6ebXsJERFOlRgkGzeIOWFrFCwqtH0DJJKEe9/GvcNBFHIdQbVDg0cXRf9hNRiaXR5a726bhKIIVHZXbJEAtIJtliU4N3waf23KoXNq/8t4lXIG/guuHf+qZenHLqojichFD0KHoBRobSbJEehRz8IFDM4yRE7J9ZRCgGCrQMnv8vspH4LD42SOaDCKVIAGhAGogNaAMQWnagksBvooeFXBS2+OhdJdVKydLgo4sH/BWu6ISgshUYGSoMSpWfwz/shS04DVWx8CJ/M4FdIYF1WtDIKCPZ9H4ow4x553bP0MLZklJ+AdiqHrFSOUnbDISjkYj8BTps7PGj9K06kQtD+FmOpqWU3HAYsVIDQmezhI4i9QYWBTGoBEwpgbII/g1tBSgNnpXDCEsLff1ttOMqC64HT5wS0D6TBJ/jIwTL1VbUpX4p+bRsjp8JDFhH+H+mSQW43nYSOuBbMQOOf88jvCFlyz/SwBrxqQXJI9sIOtZiOYy+S6jKKsa08G+lsNEEQTtbgGHLSBxFgJPsf18H7DsWJg6FeJb25q984raAAWsBlFYx+d4WCApZwZhAgTq5EnFa/1nabbCLBJuIMnFmAVhwFVyyIi8CivVgiy7FF/98WhHrD4H/jXFyLEF4gn/oTkoFrnCIpVoRW6ziZAic2YnAbESXVrkH9iGJdrnxalOEL2DT+o8Qz4pSdF6gfvhgEvE8T7oGtr56yvnAtqjKtM+qad1RiDWtbt4uknGZbLccYKftfmphKXRUkNq1sTfvX0/tEyJNJTKKVGe261kVM/6rMm5f8Rb6QDLv5IBXDY9PqJMdRO/2PP/7DYJVz9AO1F8yVTNvtcbn2jSRw1rBhmyhW29/jjh6QKuRRSjWVsN86bC8AtXvphl7hHq5OTI80uNZ1aiu0Vgm23PgPf2vMO0qhfQpgOds4ZUuR8KawfZ+/aUWS8GPVFqigdXGGSksyixcCBm0Ei6DM8ba3eg4rWd8XY/Q1ZjuMIS3N+o6XeH7UO/QIWHRgU3AhhzRORpDDVaGuZmIVktW4LkKhgzdeOpR+II/B1oPOzR4e6zQvLaUisHQJs3FDJ6khSoyHJcizWzsPZzLW1U4E3x0/N29378x3Tm3FpDvYvgKVD5t/3SHKSZHiWX5gPKHnUZmvRqL3412w4S1PIOYfhagRSvoS6C3hG7pG2ZINJj7MOfFn5uq5EKuZHCEd74HDhoOjicADU/JqylCBAc10b/a5EWSwM/Ogo3uV5jzudi3igsP6Vp+5xHrttSnRJuqvH7C2YSL7bvsGgobPWLvjXEDbhnYODaQF1FuUNZjSUIt4t5L33qcOG25JEhISP/pSMekReLES5ZfNdbuHYgp10kV1uATsfLZnnKMruIXY6Q/ycB3z7S6Zt0yNf7qZqU12axrBgbFHKzlAzhOGsFBJv3DSxBUDYFkluhhm4PmuhYfBmnPjrRKgp0FpxNw9HJEueiI0SopQceZkY41U29lqvIGvX9fg6j7tphihLFdte8pA3Z0l/4rEwtv7F87mjEuw1GOKAQvjEH36NNoAvX7g2OHW6XvYiur8wn1Dbg+pXnHc7H/sctlY823KLKfAknH6FgNiQHQtUaSnHj+KKjZJO3eEZtVmtUeXFEk2HTXU31SPXDKXXamXzx2+FUrLgw1NL5i2i2L67/PXRVCEeyKMJrebpingC1gl9tOApKkqrTqhUuR/1yV/OJ2YKRUlkx2yxppW8J/hn74/eH+oeuXf4x/+WBabzyJ340R6jAu5sfl98123KEAK6XR238UNl/5pRwrgv3uevqUEnTkkM2DuZBbRlTz9u7HlM8sdGe+X6lwCXk5qz6tT7B+FN1EgGSoMpX7ZZq6YuQBW+cZ3ZAfDbKEMW8xFqHD7hP5pW8Bdl+aUzLH/EmqNG7MwkOeE2sfrltqEJ9w7WOORTp0RD+O935+VfmtwJrcj+02z8ewm5TnIMmbtQL5f1qaD8+vcaB+Kqc8RDG71JSwvLD54zTfw47dwdxDSIGJgozGJE9+bB3n2GaPe5d0po2fIhxUncdk44/YxCUXd+md0pR+GUX6TPjH1tBUUdKw+1oYm6KPM5CmVVc2cRcsqZ7hiUBUzhYp4PsDJIk7+hihaCEQMiyVTg20hYHmzdYep2E0momR/E3vUT4hWa2IUrmP80QTuevLo27fGd4zhg+gU8L78m7V/7oGw2hCR4ckPm1OF8gU4YLqpNvRNN727hHEcF2YLTUNwRVMDMmXCRSVqs3mB4+VE4LlpKRu9yzajAIV1u0Skq9AJyWFIlh7VSpVpG9iC0obZxjjPZRAomHuVPj29QNCyhb+epaBP9D3HE3oexnPtMRncZsCb3YmS4JsS82BdktBcaC1wSjCVOoPoruZ/wwRUC1wCF3n05jg8n94DFJqwOCjh4zQKVi4v4615uY/9BepifQqWde4TvCOUQs1OHTKSSUZ0GrEVurRDCnvs7AsgdmgnHLJjKhbcSJls8ByRBcbV8aNrOfGuwr5Chv12qMgSWUsNSO1RWLj1lrEqsffvAjwZHBdalSXBhUg1xWN36y63k2+7dn3cG00ahwW8sKkXUNVfJmECcJSIj6fiEyIJvsVSia0sJcZDkWRARDsN8tfGZwbf6mGvQNqhIy73FiU5Epm3LjE5Ga8myHN0VjBMWNG5ZHlSOwAmSuOdFGOd86C5XA5rMs/8BWPCNorIrsModEzF+CJAQAp8Wy6pDBmp6fW1ffKpVvhpDyiC/r4gCsUUazwolshY3+2E+5qCjSC3MwR8VCObWoAYIYSCkuQ/tLq5AxuwUxqXEfBIyxn8px5SmrbIyLbIZE9JuoH4jEhTOn6OGdnMHDT8erdxW5K+kNqjsZh2sVZ0KjRstFFnm2Kplb38ZorEZ6TX3D62AgWQ6bN5TZFW5YBItEkQXGWSopCsqpGIk+tBKla0cvit4kE9WRBAoNIRh6+77Pb88BwnllIy3WJ3hEntbZBjiZb1tsVm+6bFJ3aidzht/FksQNmCNmiR5hzmRwjPwc8j4l/w9kEUXnpjdgffy0gIsX8pI8opH3Dt4OFayyOrsUWvhYk4p4p8RhjUn6TJ36LRW8MoAO66G3KK6nMzgRqj6Kwxcf2ic9OEUrX4KtKbuHi3V5JC2TELnK1KBZbpPY+JgpJnu6ogsGqj562+2Pf8j0vpyRhK2DeT8NHunCDOFqcZvwtMvSLRlgftiGo83p4ZbcyJD6/1BjTZ8jNvPkyqs3JSvHDUAIGw3bzkUrnrXvrYBQZbhVKDKG5yuznFFSyo5gokMQpW0a0Gybz3jAoZHqbfdaAQe/l0GLau9HCVCkLOF8kFFBdpTIeg1e7KcFmm6NRpYpAQhnWZyhftqEqrD6xFQt2549hecRWnlRyJfz3GU1YeYtj26J0r8YZzmxaT6tdbS3JgOxxHnau1M6W9uhf3zg0Sjr57Zh8sxW8M9HagjeqH0OxbftCQCv36fyKx7BJsuuyNvnmG3lZ4xhDCp9Eu6o7M3CLDeiQDjzCkwHrD021D6VXyimdhy6cIZeOWQwmoXrtHZ6xu/AONvcBOA0fFqGNCmE/ngw+eXp5KItwJV6ektB928XKYBMkLaLot5BuGI8weRIhLyUzBmIKzbRvs+o1cvlA1hCSu+UVrnXohJhGq+m/EuDjbrEyzuBbTOIIoCKMR6ipMR7eeu2MhA0MYor3CoAUlmrroykJysqkByGCUHr61jB+VG5zfrsayZGwgUX0OgZ98DnZzDSdeEZtTnqwOLiWyVkb2Dlm3O5B+NcINbgM45E4LnIdG0VzCtqUBjr8KzS7jWj5alXq9qJcaKylyEd8rQ1KXjGV/hmZFne4ObYgtkk2gYohPKQKhMoADbeJSiPzF65VN/Y1CzVJwNZG1C/E0SJ2Mrq4qK7qGi/0YuVGn4JkHmZLQU+wsstSx8nodDVfnAcdiri/VmwcU2f/ehU2zPeUYsRqdfspV0ylNEl78lpcODtJrrUlu4N4WwimiTrhmaPK173jsOgBbUVVXaoATPPbEpBrNLqaOB0v6Q+u3lqB7d7yfteyLC77xJZEitmQk4z9IanGovHGV7qPOUd65WfJsNopChsIDinXumctS427GKdGs5kb8chIM3s7z/UguiHWE7KbwFIZKdt3zdQWDz6HZp/73+jycqqFJIeQy3JG+VztZVyVT+NZW+lX3ft8aDtk8ebdr0FvdCVTDY5YfPaUNX9uBYDIqrDrAJ3COzpeUYdrpSUHseb6VaZTaojNCRQyUg1DzQHUNJgurE68zqqEITZZGQdIuYdqsKkBaa1w3UEenTzpxj3Pf7ijadJ4DKCZg0YbKHpv7AX3TRHB09taRzU6bapedbnsXSi1EUxJVYIsiFrj7sjOlFP91U7xtyBx6UruJEPYKqP9mcStW+wTMM0fchnVYmrSGy69fmcjQMQC8TQDly14+v+J5At3pRPR2RuKYZEHIY1w1li4qqi3FBMbgGMqPH0eIuhWzZXG2iMRGzKlLcaq+4If9vZADahxMvrcDWbPWMP4yoqD7p/VB7dFhdVTxA9vm39EMyw2lSWKzX2TTfRSLS+Rdc7FFJXFpmQRQXGiSO7UAhVB1BhkDwpCCPFIKmKmPjt8sOcueYLwHSf+zBn4boYVqFc5B3FBj1JyRTlhWumlsMqxZsE0IF56gvLJVp7sI/Jb4MIEBmoQPtrxN+bBditNA6WDU0Pbsl/GW5Jl9rWHeaavC3k/n1uPQ16syCuutmL5CiqogOKiLElkeAhzmV8iSkZCipZ3vetU5xIrA4gw/u+C7BX9qwA0LedySASXr/4T7j0hT+L25zuOM9NVIv1Y8cMNv4NUlzlEaxYMjqu6aVbnhRPRjCUcfmauXArCY5vwOkofTC/jPJm/8wmpf7Wnvq3IiOkBLPYLLKQdbRv8G2fhHSPHbryyY7UUyr1ftZLWmuXXr9HunmnGvrZDwSe6Z/+oMNiPly9Mkx9fgMWF6Q4vHYSwXEvnBTsD882hY1t0l0VgmUGWOKUiqqbwYYUDn/3rODwTDc+Ckon70BpH9aswnWJqSu9hxu6aQO+PefIkGjk8jm6xf0eX3Cxj98N1lXZq7WU9IF6HN6igIr0pUQ667E/SMvJw8IcXX1vXE4W+ckbmsGHeU0cRET6tmEwpggcJ76Z1Tzj+9rsPgMoELDhcHwjPXoRiICSodwuWKIV725V++zOKUaBWyuHp16n+WWwclh4kXqZSyo5ZO6k525Liav8eOUSQZcuKfcqexROlg1lM19lVKCW4xVcbIvNPJ7Y1ZRb6tuRGnc2lLCrH+QMSq2cJeD3THB5sacuMCZqaScx55fC/UYlAsrn2N2AI2RQANCJvQTRl0y7q4BGgGPVi0NZnpx8P7L/Z5tq+8nH9gx6i8enqB2nf0za+NTAlnQzmhbHgC4yOG1RejRIUQIpR7PX2KtlnikTUE/xo2Kp4S6Q6DnN4iJFijFyu0nrJZsUvsNyoEzx5eirGaqP0lM//iPKqVxfn/2md+/ExX55aXCoubMWk2rGeZthWIkIbusQ2+CPt7sqQV8sstVVhOKSPJZo6GpBqcSTR0aufSe0qU8r4WE8z86BqpGJf8+dZEd5PrS8Aa6Ei9W1UCJoAuq53gfYRSONWH38kMhQMLb7wzdn3sJ3DKpH+lE0pjl+kvMzKOCO61CE4vvq4RcSxj/zl6SEhe/nZT39mw0jx/E/911VY60hI/4yk/7tkkChFdnPxce76eZpsMW+8hBaUZP0ud2pjRkaEMw6JrgH2tHPI0C8yvoFF7mwnXz3u4uyPycCI9jp9UmaeuutDK4MhIsFferTsO/Nnah9x6JMetWZK04g3Y7mQ/m6hpjE13tRE8r28Q+H2oUG4cqlDD0PHqzHMBKOR1vLppvjoJLQf0OLSd4RoCbkLEjqHR3YaspM/vcBrjI+Nd+m6H7YHRXDQX9uXYvVTFxVg8UEviTN5afx+FQrCfKyQY6L/rnYponhmkQOW1YxFAA+MaoSqzNsOS1hPJ9KZLHuJpa/JJJgxgudeIr78slNWFhBhZ48Ua7iG9P4gC8RmAGlvDzat/AkwYFcYr0tbHnoAMzliy+8MFU1JEfdrpqLOidL0Ml3y/FhwTzveABPlZLoDp3stbuxtDR9bwgxfxHnh09g0uKjX0y2EcAxw3rWn9PcrcJqdZmIdS8rmd9hjeDVgNI9B8B7vvXB6OeaDaf2Cin4/oCLt8fkDxRJFVBHzRnYXsK0O92MceW7Q03vd0+shbYCnBlly3BsuNrJ6rH9Fz13KTGkRfLOJAMOs9HfNvHyRg0A8bvjq4TWYJKnYGAz68C+Jp7fnp1hpvzOhhAIsPwVrSYP4+ONirfzVhBdcprAM0gLOE71RheL963zG/K+MBIR0ge9FVnrWMGRlSkhN3qhr/+HP3MN5E3hEKRkZyY+jAYH3MGrsPl578IFR05nijU8MlPmaTLMIn00Al2PVBLkfUXyikFqtaLasZOzbRKlN7wL8G5fk/Hrzei/uX1w8TNudD93lCTNkvNUybU2xv7kvVEfPgNhZFjHbfG8pK0n7pL179T3ZiL5W6pNx0S7WrGox9dkOpIXkpIVFmO1QupOVxPQ1ggpoALijDkSWGnmWxXrylpkBlu+bqXVbtBi1vKgFLp/04WDg/iaSvlXxFCQZCZ7G+N9Wgwq1QwqkXIj4NLH7A2CcFnFS/K18+aDrf/ejtCnV6IYQ/hQyRBGL97KiS6uIn4I73Ht4tz42v6Kp3dfRHGDqM+79hgGATruuWz2gm/7nHXEETuKYvJU+S9ihsdwlnpvzle9hjdDlDY75p9cOEwdSq9dpAubpsu/VKVSREaJMzT3oGgcolgwY853bjvNDvdHXo6eAbDZQYAZ15QchBpSnpmiOsRtwh71wiaklh51QMqDjZqo8Z+Xym2TquSecmD7sNTX+1Z91l/Z29gjtFXLjEv+Qk1meFyxi05UmRMXFZYtzOB41owTVXJo9XFghFDRA8mN7JiJU+L6AEExbuZf5WNAT/vnCY0ql/SNxifOQEc6W6qOhwSamOxNzHuIcnj0NqgmWMyaZBNE3JDj/5Bq9OPsTbIUjfO3AiclRyYkXQPurusIcWCweiXsBqny95XjCQC3qf1LGA3RcYmZfi6msGbPEupM7xB6x++YTBuNE90U6P4FtCG4xs3Y7ldhKpAn3Tu2b1thj22us48sOxWZlX/egazrCtnCkH3lOg1ZlcLDPOynzo0njHCl5CDyakPgOEBpmGywWpMnsb9zbSROneitpDOdp42fMZW3oBpj25NlWLrtRc5ofjL6Q0QQye+UdXvOD0VaaHfyqyxh+Cp6/BgZdG7Tvz93bZIpe61fXugiotqJFZoK8jTjB6dpivbZw5jN1XJkvI55jrWtBMoVTlyLzFHbAlEQXM9QCcqs4pV0ozLofdVvfiSt4FmplgHAmrNFBqmqIMEzaoLqHyQzcMnWOD/QWU/zWJIsUnCxtso+NchlCMWKLretyfK1FYFRRrZv/dU+JLNIZF+UU0RqtjLP0FbU8Ujzxx3dmEnl9ouptS5BDvqOsNsabaVfwAM1TWyZfEsNnhmFQtHmoeHbk/uCVZ2WPLeTqF+uUdyg8hZ/bW1k/Zv0Ff9fUuZCHrmFx2HcJNT1vCIh4PkeDDwsKvttTk8hs0hFN8eLo70w+7CQv4ZDbvOvUmD6mJxyKchFx1y1+HVv8Y5BHyxDBFaad42Fi49ADSNuTJKU+n2AaaJH71lSpZREvAxCb7+BozHgnB3sMrQq/2TkpJ/Z0Qw6Tq/bwpf8o5U6Q4cu+eo5QjUod9MEJkkGoSBHU9gOlqZ9sWUsbyV483wiD3Te/3SatV0g27Ew6QSgGiV0Ip2OObppjp+oGhHGCa6vdKUw7HxQ+aKhWt4m3gDtzahwHF0FEE7D/SzxCVeNCQ9oofV+FGUB03PfZu+ewgZ2uOh0+jbsT0/Y7FZwx1uJWC1yd6b50xPlfTkoSF1B0JjNvK37ZCmGx19l8TW9Y5o2xe4C81avPJhSipY2oM/QYhvrv2KVKShxfI03bGQSdKRumdgaMIFQb/JqVRswrbzAxXi5cq+1MgYQRf/SJqhM42Li5Oyzn3+K3sfF1j6Bxcwc2EUp7rvutceMgG+vOp1ZZnhdI1J3l4dotJeMwS/lpgC3XDTvIefdrGZqTZROsyisMK63SUe9vED7MPaEuWRdASsQ93cl1YKxs3YtxAsuJNMXI4gB3tstyFwABBDbwfa2EDTFAh1cVzLHTH5WTDWLKx3ITx7Pj1HIAuh8/x0eywFynJSWQYqhJvT6Y3Xy9Img8c5uwn3l+H4nuV09h8LT9FAGzg4nftTZqPoTXZspbwjW4zs1UH9u+s3zdO2t9f+MNV+Fs9/tp0wXsXK3xvHqEdry2gUtUfH/3e5WE+ygNttMKL506itoMGp2Qij9ZnLJ9Tj1dwAEVLPjJyysPYSMuvNyBl9lwxOX0Tfw1vTVYGcda72RoCc+CCzIxIjCMNzAR9Gw6ngYmUzlyMQI0w+InvXp/WORH5u6Mja8QyQFxRCEAZmnCMueiuoqsdTdaSJOnL/SjyNTQYBSz3xORk34c7Sg59iamEKQCQ5DEp+Q7kB12k92bJYmfpaQdnFt8jsJYNVRbn3w/aywofiHPc/rF5SETX0K+1NyK953vhc7Nvj7Z2YQGd+4kvqdBPuPX9FDhuT3p7ry6kOZ001UjuAiaSuOc7qWpDPzSXhTno6weipSGgR1oEVpXKuCDParIsae/OaUVvU6moeXbPYC8rJKN/2r2eNaNGsu0ptiqMefcKcN2l9DesMXX/DtRYIkVPyfWZPVqVvjINse4QBu7MRBW+E86hONeQBEWehqzvaNxuNBQYTH/5hxivD/tTOPsvaxq4va10Lf1ysFRb7bPk6zqat9C1XHiLQrRAcLlitIHyf8ug0DkSokbbiVcH92Dh6GoHJ3YP5Ysou2Gu4g2pbNvnwMwJz0Yir5AIWQRRs5herU3wM966wbmTfRxF3IeageJS5YuuAOfpFb677W4SX1xbn1YGVz1GsbAjfXE8CTOufqojf73s9YcVB7oNZKbTUISvfWw2Ur6UrXj6X1xTxDzcEvTcX04tmMJtwb6VkYHSfIijz6OR8Dzn9Hgf9yTSm5MFA5WLX8u3KTQEN92J3vfSRHkyZtNpPxQjp5g2apCnJDgwlSqmwSArGBO6VJkRQ6Wwt6f6J374G8tr/DSFUVP+ugS0KEg1UhmTLnWoWGEDSoHr89BESvGZjUG/RD1ymekYP/L5wB7RiOTM4w8NFDKHYlLNcj95Fv+dMqqai9OQZJONP2v29iZ5CwsJEmpo1BjU+IaujxbsSIcJyS7KXStVYqSe8IkMYlQqtr3CNcOPQglGBH0ylrJ8jjZSjWnY++wyYR3vT4/qN4KYivVnzCbMmdO/numbF8UrNPqFLkPrtOU9oAmfBTpRlsqDJoH1b7+HFEnvY2aKOr6Et3chpk5YrjpT+iFrq3yM0BGWRUSKjESJpwHNN4YVJNJQjFO8g7+q3+xfy/HBnNzaNzXmFwkQ3WxaWuF9z4P8Ia70u9x50A+l/433Rg3u/MBA/w+ZcFgbbcoGOvdpslKRwtxrMeW5pilmvvukQ0DrtwYAEXCt7NhgfDQxLzmSik6EjbZRgBKrzU0bg6NC2gXIrzYchht4iq/uZh4OJ0oLearGNgdfTN7Fls3DwUd0fRa/5Zu2/RRq4hjewIl+WECNF5zf1OG9YZyoe3W2i3wQfdsKAfPecPhYvKj+uxoE95J+RQ3c1oMxdqRYSwym3mU8tTwdfSnDHMw0D6ywLV/fYFmZ+5x7yPO5LOPIc+2XF3r8VrDHldYr+TQna25H9ZL/n495daMRGq5YmXLwU9RcrJMvs6CZVMQ71itmojZo6XeN2NxrWPA6VhldgCj1ZiiNuUs7pGJAlrdezcru7ounYRSYuByb/jIU5xSs2kFneAZ2uZXm+1EugmuCYff7X4zN/om1/1flEWToOyPAw==","base64")).toString()),kY)});var Bxe=L((fdr,wxe)=>{var _Y=Symbol("arg flag"),Kc=class t extends Error{constructor(e,r){super(e),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,t.prototype)}};function JD(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:s=!1}={}){if(!t)throw new Kc("argument specification object is required","ARG_CONFIG_NO_SPEC");let a={_:[]},n={},c={};for(let f of Object.keys(t)){if(!f)throw new Kc("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(f[0]!=="-")throw new Kc(`argument key must start with '-' but found: '${f}'`,"ARG_CONFIG_NONOPT_KEY");if(f.length===1)throw new Kc(`argument key must have a name; singular '-' keys are not allowed: ${f}`,"ARG_CONFIG_NONAME_KEY");if(typeof t[f]=="string"){n[f]=t[f];continue}let p=t[f],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]=="function"){let[E]=p;p=(C,S,P=[])=>(P.push(E(C,S,P[P.length-1])),P),h=E===Boolean||E[_Y]===!0}else if(typeof p=="function")h=p===Boolean||p[_Y]===!0;else throw new Kc(`type missing or not a function or valid array type: ${f}`,"ARG_CONFIG_VAD_TYPE");if(f[1]!=="-"&&f.length>2)throw new Kc(`short argument keys (with a single hyphen) must have only one character: ${f}`,"ARG_CONFIG_SHORTOPT_TOOLONG");c[f]=[p,h]}for(let f=0,p=e.length;f0){a._=a._.concat(e.slice(f));break}if(h==="--"){a._=a._.concat(e.slice(f+1));break}if(h.length>1&&h[0]==="-"){let E=h[1]==="-"||h.length===2?[h]:h.slice(1).split("").map(C=>`-${C}`);for(let C=0;C1&&e[f+1][0]==="-"&&!(e[f+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(N===Number||typeof BigInt<"u"&&N===BigInt))){let W=P===R?"":` (alias for ${R})`;throw new Kc(`option requires argument: ${P}${W}`,"ARG_MISSING_REQUIRED_LONGARG")}a[R]=N(e[f+1],R,a[R]),++f}else a[R]=N(I,R,a[R])}}else a._.push(h)}return a}JD.flag=t=>(t[_Y]=!0,t);JD.COUNT=JD.flag((t,e,r)=>(r||0)+1);JD.ArgError=Kc;wxe.exports=JD});var Qxe=L((Hdr,kxe)=>{var qY;kxe.exports=()=>(typeof qY>"u"&&(qY=Ie("zlib").brotliDecompressSync(Buffer.from("W6UZIYpg4+ABk/1MjAzU09E6CFgW2IZIP1r7kmgpa8Jywxvv1VQ2S2cjN4L44wxwJ0ckpPdNVX/XMr0ojMLnAkSreT6m18l0jOSXUkD5tVfz3z9fL06DyVpOqXJ6cUr1aCJOrHzECBgW586Z4H+qc2eZsNJkc6iYLopIG7Zs8pHnSjV8WpoIPJ9uVdXkgvjWDI9/YtVVpoE1yVoFMUm3aW3xio3wUyXg+Zofuqpu6vV6LlBKtKqVXecY9Nk9itr5C62+ps1FnN+/b1puJAHimiBVpqMkXuMYy4WKoumq++oetp1Bw4gGB+PI9eRY86rq/Y/uRi8PQFJH5JAzfn0k5yLvsniCeMMIQ9kkVBDL6pe9AkCEExcC0r2+beWIVCL8JvUo7lfItpmLR0IMKHtrZ5A5NkqwzcwSOO2P6ffsdfzV9oYmAcIUECF6+zLNf1nQphkd4KFlWZbNXeD/+7H0/w9ttFnx/Z+GWRhWcUCT2z9HRyjFu1AWWw38yUi0WSrmP2XxOepke9ZIaQ2nZYtXw6lcXC0Y9uVlW0bej848wojBuZV/Riwq+r70JT6/7CiOyME5+5uClWXyT0ceBpJ8JkP/dbp8SCUCHnuXxBd3urs0kenohxq1csBG52upT7XnAjYYVVEoe2QpAJgxkOmsJXeRKusQ8hP5C9CNrN3fNQCrMCdM+JcBfgbkGEsLapMGYP99RuA05PNbAk29VLa3CR0Wj7M6QxZMNdjZ2Sc1KYo7hZXSn90MJxbgGtMHNyDzzynoCxIXW3TxZ1Pwx4VrdhRL48Qlmm9ZkbyDMGo8YOJFmymPNO5AHyVUFM3uN0L48JGoK4BbAEFbZCHShYYKhUBl10ntO8JKaD7hT8lurrhkCvuPUcKgP+qETi6+nwonTVqPDlBjAdibBWC+6E3uT/lanBfquMf8EvWtcw4AGIjw4FH3j9ViVeVWSoSaX+Iv4RxobRXxhcZE4ggNbHjmJr2KENniVUQfF04aEZTw15MpoOwyL7GvEbgKNG2ADdhqzKgAxSZVr47ndpeYSJfvTnXONQ+nnGHqTmzhSMFW3IQ77479pQn2VmTXPET/q8c4J0/+PZCP0aWL/48W7dCKiEFRPtALh0B7YtGiMZHNnczxaT3szj5alWrFvPgrDMrdUcTyaQ5PTep88/C7p9y+6Pb9ngssgI5jd1C/cr3ErD9GEadZ0j+pVovDuksCqskeGUZwFErfqZ29wY12ZR5CeW0HJxYr+CAstCG/NQYDNoBeibtqOnMOVT2A/buK1b9eVN+Q2iNL6pH3t3KKd2jWUTlThmpErmBLMaKCazH64isjJHdKaH6/Ag2eQP0+WW32uef3LjmJlI6WZ6YV3S8XsSznNCzv5ABVbUTpbvVbyplvSoWnatOKHcpNb2n7WPkTqi05xdEteIxesLAu5qXVoHU1LMCFdW0Di1AueBY6RmEVJc07eyypdMYGljyA8KbciskpLeEpRwG8Mqh+Mwn0dw2rKO96J2DZxWbLfxdLRtv2NfI76fC/IF9t/J57bvUio8PsOUWGNOALM2BglbpoO9FOIuUjmyq4DnUzndKET3IGIHlKCFAncslm9u+9E65bd/co5XahR/pFPob1Xx+DM0V03gi3lBdTCThraWyx3HIkccFIPScE/aqXYgrFHY6EHpECsj1n2lmXU9Qmkg44ad74h1jzo+sOjp3g8Lutw3+WKgfXXk3JK6otEqFuQGQjZ7aXkhA7AeWCmOJLBF0qnP0Cr7r1RvlegIBI9+MZ7HCePoIGtQjAGWpRYVMIdb4xfhGL5zWTSYpHoq3M0hylN69bFJPS0p1S/ZcgF6XsCYqJX0CxHQiu6l4Zvg3cWnD3NYxpaBkBAOTRKp8sT6e1eNTwWLVdfAOyCI74YSQgZhlLo72OedA42eHpeTgLNkM7ZIoUjwNBHz33SfTNxJBFGVdr8MBhNGzKfBHA4MV1VvhIs78XVDT8feeBr+G85QZHSy8IDerEBfQRf5uUzlqgy/6kjE4qXz04lAd4eLuyxYMtjvDbo3NOCXFz3VFpzdpiaWqhEXxtm7n5A0nj69482O5N1sv2aLrV2m+qx60ikJNFtvMLUSV4RJD5Ayl7Cw+qf81LV1TXPPKXTb84JSCLYBg8hHB/BDXV2FdEWTW2TLpFdG8oLaIGKnpiihXmvLSdoOQCkCnPQICeKjZFwUXr+8TqoeG4PH/kOXREblZtSwuWVENO9V/MjAh7aROpA9lVayhkCBno9xHBU3zTLY6EOPuPmAoFbinHP+n9skGHwNcMSKcugeLVVZd0fTmR+QrUU7bDEZzdKgaH0GLKHWXeA+0kwVWHeyBQu+wDo/YJFycstwqYnLl4b3nsw2Ms5lP3pmRdiThnwMAEXSyfows6b3Sw8x6L14BUugPY0gRV+HfklpekWTVXSo9SYuVIXwDRy57SKSDDWHP7K5W4W4VYt8o+2DsSxvhYm06yXTmI4O1f3e6xYCMfP40CXeberfe25pj0mXh2A44jdFlNomIdY5GShDnlmedr6NX0rMQ3YMDml0dh6pew+ipCD3Cc5N/nKKZ0QevD2JxRQY6H05yfFyiWeIDgh1vJ0MK8+M0ZQ+SjoO9PENOobhohNHq14jKtPW4XZD8BzYLNRid3S/TZ8OPYXDkKxDtMZEzyD0XX2FAqa/ManeF18yKBQfulvw8IDvW0Lpi803w+50XJzI4n1fZQO/JWWT7Fh9Uulo6OsybmIp1Kn8JTFIlBAHscrlUpTPGiykfZ2nXDV0yQNTdQalq8Ws6itSufZUN2LJm+3mFK/QX367CKvpW+vBv6PKPLQrTXI8DUDowWX4OvRO6LjST8uJQjXPeRaFDQHlVtt5Y3Kb6Orq6XtX47vhDviVn/e2znPQCB1j3R9dmN5b+ggFyaBf5FLkScllfQaKY2Qp7B2YrYeyfiSw9jpac6YRNUXFGOArUXXBkbgO/h5CqQmGc/pUSI9GFBeaHpFdY0pQuvP7hz2/GUze1zPOczsfUWkYy8KQpkKZCrmLIrKwt7sFpCEnlnlXsfXOEHxXy4CF1r7yzrhEY7pwMXydjjy/B7Dwm2em0w19Qxz1Dq17xxdm9HmxY8JWoB8xIkvfB8OzSFZeyLXWuFmtrVLFI27i+3P1FXxb+aAVG5Y1wPjeVXpeNscUeLTswWiTBGkDKHjVb3CZnnd7ZXmmcpv2F6oU5ubp/E89lxFMSVdlY7oDfdh5nw5YU8bxNx5pxruawC6kpFL2IuoPNn6b9hDvZeOAFE7iHK36x4/IICFLJqtLOaizkdOdkvpsrMQjKTj9oyjEQDWfcvDySz1/GtxjocHvcHt8z91+lSz9c0rcqwrggPg9i3lQfom+R9M4KQ92kfA3aE01abmz7omXFVmyxoOScs+0v+yijyYbG9JNRfHmbISKZdbiiOJFWBdPxpmZLSWPJHs40hnnZvdvz8M7TMTmJwwPtBzGqlFTsd287XCRAdhAElnpq84fAlm7Hm1E/yDWWOebgtzUrfhmtcO00pQZ8y7AAXd9xRH//93XV1PSK1ROZ8yYIk9KDUUdM712jRwEAr69twDrQ1Dj0CsZ/RJ0xXcfzEXNHCpZk4cde9esMZCEMSNffIp7NDlNpNoW3AuJbLuy2/cvkpmGd9Ypjy6Td3cOwtbMOSspJ63wQB/5iD2/vfUDvScoOppb0MtQ8S3MV3oNkaYApPuXlZ8AnH9O83gn7ESon52e54H3Zl33X/Gs6N8T4OX4OYkQ+CdPUrkDTZRnOR0fQzhRRD//2eC9pDYfnExgJqZRH2mQqQSJf9uFRZgvP7iRpAQkflrgJPFCochjCX+Imiw0SQHld/r5x9jEVBKsoFaf9F1m1ZisJbPu22Ll82oVDdoaGbQlQ3i+YlJLDdhiQY9rH/Rm7Yum6sdrU2p5+4BC73hAREluIdC4Cu6agHfHtvFmc+luP5Z1gS11RK/C++oGlaTW2E9aQ/EjOJcriKqUu3SNgh4rFE+p5nkTay4ft8L2ufg79RE6pnR8vG97ugvsfvqyuXS2O0s2a+P60zTX7gRiPHc66f8b4eFFlzbb75tZCHUb4rk/5nzncnH3q/vaDGlmk45FQ5G1oTTl7lT731UfnIm3/8FyTQJLQHAMDExTZsdK6iEwTgA3w+hKG09lk663KJdO+zL05Zt6x/FCSrSBMEIVn7KVC11JN0CbaOpwia62CMGfUn9XZMaDxoxNZp4hwhrPshB8CoORtuaviTR+KGNTuwONrGoD3890H9fyNs28IEEblKfzuGE15ltrJ53og3r8DN3qEPjJW/KpT7x/1R0zecs1DcvuoaVgs3bMBSN+icqPIuSK+DzsG8JgXhe8+22hslrYtlT62J3078WY2QuALJc5EG1WGNWWWfV2toWai7yMzJK1HlGhGUKJuEC6cxVn1JtmPj0z3dEckFw0j63hzK56qFOzUkAYYsp+7c1lShbed/C1W4NhUY30IRpxg4QhYg7vY/T2yV8gH2HyhbJ3iKoHfrUk+A7PATOZO34u/Lxryd/iTNcr2pq07VlDjx+p7Fo3uk9Z2rXXErDn8vyU8av1m+tKqz2pDomXr2QN4zCdYcs1wcW46diI0dt/JQchoC/YuhrdFKeALwuvbqW/LhHLkCSPg8wjfida52Agtz69RQW8ls2Q8C+WVVNHzk1dcYGRmyH0pYf9NV582YaddzY9i4QPGbq6N1qSNE4Z2ZcwmFY0NFF6qawlljxTyWd77F2wtatBPfiJ6bdLiktt3DvvPER8zjGPLKnzQVNhm2ievd2SD6TAh90s4dS6Tfjhfyz92Wmt1OnegnP6T+MO5et65WRvlE33XUoDwmG92/WOvPl3NxaCusWtdS+m4TtjwzVmB7D7MkC8vSYrnt5MlEQSRjM4AdEgFIEym/QtkFm+z1qNPsfdqVESiPp80JNpRN0FZ7E6Wafuk8bhqjkHkLezisqjIuf0dfBW+VVqEpFKzZum25QZpv9m4aH9qFPPPD/V98zyc7qu8mul8TmLT+CAl+lfH2kVrcF3f2JIOM2T0GcSt70MKx+BwlUp6apywszaEGQEyx5wCJ8ORBg0Bhzn2qUyfoHKZtRUSbEj+tydFHL9A7jakwL2/bE1+7APM0x2rwoaa9WDT38SSXS9+Bd8kA3SYGHRzhKrnEtXCdGH2mdbdgJtDeG5Uv1xGVp5iWX4V5LK7JAkoJX7F3rrtumMb/sn7WLhcnEUIcts2r/6EU8vrk4XoeMcMp2dpoerjYcG5+ZU1hBAZdLRzUhSoVwLE+QdhYuUMayni3lOi3TevwS1j1lePA+c4QT1Rz9M7ULh7vRXnkt45kmsC4vb91dtXZ7kdskrNdqSw7Kv0J8yOu0Y9LmDXTx9H2zbUaPRJBygqHYREJnD2PnCWKpNc6CfnornzuNT5OjraLYsZRsxYAJXKF4M/m6faGtO4z16tAGYHqVzVTXrtsVvOB195cl4uVYgyfk+O2MN/ucxyYQ97gyDTjbln6ztfSdH+2l8PFgs+dTHqOtGCGyB6edP7c6K8z0C44rIn1p+GiId3erhZXEp3mhfSWESNcXnXjQbl0Ib70KNZ4fIOXfdJsucKEA++qPtFz7GL8ac1bw7zlxqRVWXtcQ8hlAlHqxyJX0HYpkpBAy2ja59L+Z4C7AO1UmX3HoUz/0WdaCGW2e+Xro+8bhJRGTX8b0jDDJn4/Re26dhtpg+n+mQIllZgcPNdlVUli0ig9gAkdqxZEvqKHpq/QkW0I93TZrK7ZO6uQsfvUSbVNuV5O5kesddcpIgCGhOXPTneUE1Qj0MMdNEo4OO7HyryfgKt4ZZY9IXhfPG9XmJ23KDT6FVLLba6ekfvvsH3m/QRyXeykKrjKPrptcLSi7IoRkZ3uq3+YZ3UIYYxMSbxUn/4wMy7Pgv0wvnUhmVfoyv6xduCgjM73Olm+Pyifl286dppjVm7qGCxt684E2ud02Y8AO/6Q4C7yvS+Et/e+jnK1fJ+BmgyE9zMczJFjrVSDQWTYwI8F168HA02f/J6vJtoIzrbiJpF5ee5GuKtfsqEWKZNlkmqI9ZimyrKkQd7/1LENTKFUjtDxVS9dKGrlQheDKFsoTdMpCFOEKbBoLMjwXJhM2hxBXNmSQmyw5nD+Jc6KakwK4Fb2k6/N3L19edgo9Xqd1yHtBbO0+rXKwQGGbC9rRKQoaEiJPRECVHfr/eS09koblSdlYzDbey7BQBYxeSJKvQnEEvOIiJ/ejeB8axvFYpVZ8IkDXmkhAVe/92LW1nWJPnxkvM2YZRRxj7lAGlKk5GmHPLxSt8mYIMT1klTDEYvEljsAQ2aJ8p8rc1nRVajbdlc1xros8MNqEwQ5pyAs0yQq9X+MSO5tRAJvhScb1TzXjEzjNTBCFD4s3NBy6Ppbxh4mKLOCLA8+2MEgU+8WZAePYeD1CI8jnRBOhNPfmPdc8OESs95KERVZgya+sfQiRWSzurLWQIdUrM+wTTt7J27rOrjx61BjI4+STrMWe6gAvlqBSoDoEZelAOK1ToQwisWs5xQjLCFiGk7M5CqGAHW+zLV8v4Xp9HGVnWIY4r06clBG5wPQrujFuZqf1vLTqn5alHN5O93ayC4DxBt1I8oIIwiPR3t6PTrxFMvWo0IGJMj5nbY0p8ST8FtfnSVLVw4mAUkBzii1OuIYyuPZnl6fTjzF8o6okRkZkYTcc35xNhk+OXi7Xrt91fUXwOIbsJxd3isDK6kfbJgTEQWM1lpl0GDAgUtrJavL63W0HwsoXlw8hjTRRjwNMpf1ZBUz2WbXxBKQdFrIyXwQlGnlqyxHAYLh4utR3kVFi5I8EAE8JCcN6Lr117o6vE149RVGfYXtuXo927LE4LpYS8S9ZniNjeXTbdW14x2nyVhYf3Fwka5pcxWSA2Dd0n9Hsp6OwE/r+2l9P7EjnahuR5CyGXeFwVVkPt1h4v145ek45em45kl2Fp01Z9XZ5CnL/iKLNYBkTkREtXoAsx8daYDpLf3tDYKCd0mIZk6kkh1scxpuIrQdu16I3PcuDTsacKd0hv8WNRupyFAuUeqdF14Km6vTyaiOvpxilvO+EG3dYanvnhELiIQ9J+yz9c+dkE7x0s01eQGku0rMsRXJieHuVPw/6sENbv7jayGu7haJO1P/sP3ZdthA0K2eTFz8ctoZ/REDWF+2r4IQ974eAOnlgWtvD+uCc3jNukDT3cB5/wbQ3c2vd8r7MJgS1255x9ugQqCYCpAYJQOBXzoTIES7ZeOOgbmlA6G2LzbsOFa6Is1haHUXx2L8D5qSbILbku0mX+XFsmNje8uXo8Xe0cf5UZzsPz/OnE4NzOjo/wcMieftyhTdn2rGTu7Dz9q5cd8xTwpvmH2mlG3HG9tNeNid9KdZ226aC6nbd1Fz4aQ9PK+E8iX+86O9UeHyMrEvj56edgCcUK05xgtaNAWbHnUmHufySHtcXFTI3Jh2AZbZSv/njqdodX4ydaBJvxFq9fNB7/DKDwEqUQpaDJWS6LDCc0RVRDEcTtW5qyaI872Mmz7WTYnO3JkzXByGfkirtu8OeUeK1FOPhCFHNqJht5qhtgfXEnZ3fKiFMSmLnb3rnpArmHbO+tdB6V9mPiUrwlgJjo4j8YKd1kVR9iRa5hGHQrRHciU05SBeiGemYHzfdNl7tR54oyiEPKWgMWUbCMv+xd1CuAsEmj7eT7ymH7vlAaLf+jdfL0bCPiPtdTRBVq+ZH8Lh7kLauHdXHqKH7xWIDTeFDZNOERrErrMBhyc7hUb/cz7ncz5zbpx7U56S4gNTO8FzOwyL/yNo9zmiaKW7ysuEVMLd8IpEzIwjG+cFTGBpH7yE5QaJOJAonu/i6KvuF6WxPaMPRJWyVOxXPCKrz5n1xHyJ6HPq/1PSN4PfOg0QTWvaMoSBddzEdZ9YeY0E9Ia5/Y7KPpe3KmOZsgKqY1gi8ft0FxJVHbf5GSRhe5OrwrVFiAV9ujD/VL5GF1audjTtDQzHq1QAWJDUdfJiVK7viCHvw6qOXl3gOUEDafq+YKEYVAp5IGVNhpxYMa8/noFEiS/ZV1n50Q+EinSKioTNRbrB5Epqp+hG1qus7bd5RclQCHFoEUFFGrYYbkS6oEvrZE4fCQZZ0usPbou7LWCtVqn6YVHEgVgHj4Pr/7VOrv8jP/1X/XR0fvpv+Wl9P+W1fvvLMdAgcn2BVdckBtVG0+9rnHIh0SWLupay4SQfJ/Tayv1SAh1LQCYTtQY0qPebfinglAwdvWy02tWWo0p80WtZ9z9AJcPeoiedcTG40cuxrslNY4ye227N7n6BL2RTD7CRXawWtkz63drj1h8wXX7p1yZXBwr3hnRJ3mPivgWFm45Na1y1MaVeOTvw1XOKNH3WVTvT0+y61VXuJ5O0P8czGYu/o2pfD75X00PM/GmIu/DU/FeSnPFK/Fu/Wj/3X4FOfI17dfSXdkDev4a4Tu0xYumnyyh9z5FuyYBU1ljaSjnVe6XETGXF1d0tpV96/3U/rein9f1U7/PSL7bxmKVJaL3an8ZykpVTvV/N/E1og+o2DOyMpt5xiLy0BNKWzps5z3nWnCtneTep/pwlW7ST8DTNBvquWFhoOnnWd83qFjdo5RbQNkf1d38cVD/Q6KVbpBnVhkK9k1K8GMi5fKPvXbP9NTBf5yFaZyf78iDLd/6ZzFdx+Bs2Mt6LwnD2wp+/f6bZ/+oPDDocD6iPY9fV1Z0xxxvoMe7CYO6oZFzmh8U6fLb37f732Omw2xnhnZpRw5R8W2Q0VI/JMRuoa3YzXU9E8b7aheT7qwugUN4O2hWj63M2gUuqj3FMTSvl9lONo10+qPvpp/a31Yg/bsPZYc/4APr0Y5MqeOCtxQBD1ij7UrbLezFJM4jKhC7tp+lxk5eRvr9ms6QWKkQvl0m9DygfrYaYrEnIdjt9QWlp+hns7xNKY02ON9s3NB8fLLHRZ+QWqaV4dcbxOq+mLwlnf/bqPW5BACZ5rKn4O6cwh8X7Ewu1WHeXjqF3/4eGYZz9bkw02plb6HJclKMceJqEEg6N/PH/1ep8pt0nIyBoUGLT06fMi3Txms6YL+t5g9vM7h+SyF8gE/phM8/w4TNjihEqzE97IwIG2KfUDUYunEI/X+EFDiZbw6sAanAK0Iw+7LoTl1jtQQ9OAZT6AAox1t3Cas/fknG3lqOdY6R+3MWAP+0nY3qO6WEWlve8K0rcbqEwH2+vo2usOsMMmZ7oYewj4V1vjS3irRb92D6fbQLmfGoOPl4PKwMsxrsXBbMcBQO/us26LEOVs4O3I4TeAajKcQTYof7iRw+x3A7EgzNeuWGNA6HeCzo72rgbd7XRPREhBvB3pnOaIezqZfaZq4KJBxeggMsa6Pa997HKxIARRuIohl2VAhWOj9oT9Z3qPHpeGZ2R/m0J95eyanMEwkHydtELri8NFc8ubDodB/G4a6/THdnzgGdIA3xDe0JAXy8ruzegDHbG9UPCfgK5Fw7F3fA4QgrSyjTjEY5V3eOhOwnJpbv8GmO2pf3b0zH0/eEnnEkmMPXhnRAEJLOplXagMapY6xbpTwk/K4a+K3y1E2xN3ehVv7sK98mS7y6DlRuC44nR6Lfvp6Hahz6144S4t0tnvM6OOORQMtDluL9gODtVw19nYoZXKjEF3aFmurlKRBUdovpFVhtDvE12RQozC9EgN2U+SgrO9El1nCscKUc99dusxKksDoZ2GD7rAZnv0cQPSfH+NhaN/Tquz7HAw4Ldcb1AlPRIY0OuKHQOMJSNkxHsNLGqvednQG25SiYrkcshWj7KyE+xn8ymxvg0njFBTJEu92+jGtCvDvZyEJ4K8qOvkYyrCIjuGVNKXIIgX2fEN5XXRDsHKIzZ14gmemetsgcfQv7hE5xMIENILHwE4Yk/linQwNfR0M0uzLlAPbaCTl8C8Usl/uK9q5ear3x8lOHstw1O4pARhGj+QHA/l+kLRIQ5nO69Rl99KmCSLx/jfBJZgMzIcS3aXdIbleO0Lo0jGB1VHEIu417ZY3a3iaPZM0WeFXp06rXfStbNPfqGPzfG8pmTyabE3P1GQldDRcY634Fw6kfk8hFRluzaGMc20qyHgR3SXQCkw2LXVSLKdShL+KpX+gcIrsKwut3x7xEbfBDpyR6xsZ0gGTrJEiysVDlACtq1LhQv3BCGs54JWFNMS31GC7AvHZK3ldQ6c9GS8xFPj2osLu01Xe4cJmqYD+GH6K/wf3HfOI/H2ScQkLJcj/UcE4DfhNLo3USze73pfgdXVOVTpMGdFw5porBLaJdP+fAJc36uz6Fc/2pvgHemcqAZKyWB6neSmO/2sL2nPriHRvX7QLSg3BlAB9QqkmG/dC65MxENT03NBrDduzC847n7EzqKC9hvAaJW3n3k8ux5WVXOf8f4snjVas9ywkgIk0OxVyWXNZ+crgjJdeDqRFDX0+3B8F+/0X+p/0g/81Xjf5+80PsT4nz5HGPWGKSz5+VvI9MtzROgX530w+EU3XOIQSNFZTTvbcaudqPtVEM+QisLn5PoVBflKLwzhHqf3RYE756xTH0OCuBAG9nChUJdpPyIXuzdXDID425iQ7XAuWhWEHWFa+RMT7G5AO5e8LXmhHJ99c6So2rQ9Keso7HnenXNXrB2ZeQl6O6ujNzW+ZIBexIECcS2IFbmTh/IaFI5PMTtRPvDWKrQQflZugoZ891uGCZCw4GqD78x8PGgUMUDAO5fW6CCq9oWvIULgLskhYIS2KIOjvdlNaZfdjk8+HEOcn+ScwaClL2W7MH3XrynqeITnHQs20MrMsMDpd2w89qOFMqJ1GkfpogSY6h0s9X6Yp6mXNgTT7m3qmzO3cU17aWdMKKoLORD7lzpsQ7W82YgYOKqCojZp2VyXvGwuf5glkVEgP5DCEm/X9bfqvZE+4EAVqM7EZ0+GWerH6xKrj83UF633a0r7Cc71+we5/C3WXWap6TAh44oJo6IwwNllQpE0Jw+i6MMo0ZGoLeCMdV0KVqiXtvWi/NiXYYHFrji70MtxE98OQ1PlSsYzQ9JDezqVzVv1xRvEzjT3d7BmDUqWfSJcAQtSHvjzDZbEtwwbN+B7cLXrUqVbKSJ+QZ5HUlPEb8MW4NbrAOa0IFCz1/JX7fBrO3G3coKnyaM4Zi33Ajod/3MbzRr95wXXD6chKuO6o9DvDliCxBQ4Bigb39pBPolAI9Hf+gXRp5RiFJmQMvHSCJl0PphKkEaNT/JY71J+jCUPgFaT+d4ki6fLU90HKcMT9qU2BJT0qL5bbxBsxqOo07UosDVD1MNNlGZoaxdikK/WEou8M4g5QkV8G6ebECHn/3E/eplqode3v3Traj38u5Pjevo6NOOu05mub1Mb8ln7+5vlXh35+B2+lCAOI2qvNiM/M4kYOcCDU09Hgdr1XVWENovQ9QqxxhOJHlRdt9fzlbTaQnj94KN4mQrRCacTkHhyzOFEGneCoWqnMUrRcig43cWmcpf/bJZ6FU4Vdf5v1LhmmDcvS5t6EQSK5czucZi58ssc5yu9avhy3fQAHpEHX/TTImfYT+TzBBEBliBD8fVMflfpbHECClIqoUzBvKstWAbizQZHrCa/kUIkmdl9jIAlmuODLpOXhRcYOmlbWnXHzpUPqzmYDprNnNcmogZc1k5zv6aB5E9vyXhYXuglGHNaPgp0mREdRTwaQfEshnD5ifv8bTNNgm7QmZwb9/7e1yNBMakZgUj+jEyLR2nvE3zT44kP7qyCadwdcsHUmr5/Wt5NaXehuVc8MUSI680q34Xar7+t3a42KjLDMDV5fvrBYERy1PvgMhaFPs7PtQCqBPoSAovKINMegA5s7uJktm4jDQQCg6mT9YUfezqwcHvYxHOuZDS0u6gtDDWO/M+XMBucH4K+Dhpx+pvqHiTL6tCtmgMS3LT7WrnhRCF8iPBLua+p35oPwrHAKEzKgao2K7/f6F9y4e6yQ14n65eB6fAzucKSGVi8MkoqTFoyFgjHzUvkF9ezhG18FmUka89ac5asxqd0SiEYFElfPcdS8Ma6u/9SGYA/2PFFpAjzFer6yIlAJGOvkzyndRDsYeP1aDjlDJ/cJA0qrv6WoW7bbPuPHN74t5peqb9On/ObVKzrsf/OicdPAFxqnUbsx1x+jrmWazQlyTLnSpMmcYlXoTwlIo7YHxoTsKVCNzgechUZj/gQrVlvUeJMlOJCHvePOj1TowkfX2SwogbAb0EChhg/OM5A7MeXBW4Pk0lHFiHtTIhFKGUYVPYAjloU0UJ+5JUUDghP2nIxFxlUwmeQvCTblrkuq4TM0LUT8gqwsh3g0frjZonPUvHkujccCuPKdixha6tXTF01LeqJFO7jsJTpSoC6wt6U9TAD2FKQ8sXingHQ8WPm+rJR2CBYne4T3tKj4iLI+IbNpJ7fzhTnVKT5aLJpTuZp1TYOpynZ/+WVO0kaX/ffAZ0nluTgMHooBl81qzG79CwfJraKZrkRN80pcCqRW3MDma8EM/WhZ+EiKc6yeWarNIOLxyJ+RIfKxtfSu70hEvTCbFw6OPVtuIKcxExMbhRS4nDOS/4vKYTJ34zAYgLwZ1RfhYHUuWIOJ4V334mvaZT2LPn+mIQiqNbUgUdl/hrxd+Dvss7mC3tl4X54BgFCpW339mluHIRCooiDfLREUdCsKoebHHdrFTp3TGwoQEBkKwj/WftXbtq+Lh2QxqRVglQ4Iv0Lcu81o5orvfagg+gKT3xwKFRT8c47a+NnA3AmOCI2Mro8BaFd3DnnER9CmjyME2c8YWQsfPurRCs3kqvT/2mNBV3PsVTPOVTPLWXeAdin4WfN9SwaOzsv4/l6HbFjg+S0A1cYOXcxQGDslElmwrWjYKOc5WcJZKFgpTV3l/XDaBxjK5oU4w/jyTeVue/x+jZjvo7RDleE6OEJnBSmA9nbpA8R0C7/xrK2oYsKQ7kE2xz/gm2Oa8Ov8OtaxdetFlI+HY3TnkAMDyABv4tKILsPVIRBbV8W07SsjQzu9OUNbD3d9CKoIsj3sECxjiSg8E+G9MJpj7avosMxyL+XVp/CUVzpw8e/UqoZwDyxomU6YUdZQsAsKFsH6H9HP9OQMZFLaUWZeSJ3DaM9d8fzjXu9cXJ/zecdTz0zXFj3Cw2r29c3yw3b2zc2Pg8F8BmvWnXstE2rpu1Ged2mc1heUjs3BnavPbYNegI3tUaqO/cCmVnV4nDO8pI37QYrWr0wgaG2w8SF4OaG5TUlPJygljtz2oljiVBmH4qgpMgdiWOKzZOt8dz6DfOdtl2fDYWE4DZy8PM7K4+vQ0Gs8WelpyA3j0NufUSoc6v7CnOSEYmoyJs+Px3VkyQUNWXzvjNH7puqQ4B0kgVDEGTh9+A2Fi3vnQaLikZJHPwufa4qckOzMpdpMvDj4znIYg690+VXLDlkvWxQkFl+gEaJu39ImtHsZaplO1pgj0ce18bjw3pZPFg1HERTcPYkCuBm3UzE+ha1BwMvu/nf5emlFdFZ5hqgmagrLsSgpT/lOa4JgXhYMj4ktPSCWs43Y0lbUnRANE9N7uQaY8SX8BbQw+ORbHrq7yToDpKJUTIOXXi/ErAKpnASipjOrBPH+Ju1Stdt6P3G+6da3mFlTJaHevm1Zik8cLx6VhmiWw37ctuWbRQ733QUsCT16ErFeHj2rQEKhzrrxrNLTrviiE6rfW7BnWmUmxFzQBouob44QQkGAqoYBERcsaiXNxwnaKkfCXrDQFFlR7gbFzppG6ti6Y2j8cLAqQ9AMwifHJGKDm+CBMWsDsA2RUi4xje5TVzEOwWgMwwRk5i/KxB4pqQb428CzmVcstzzC2vBJG/sk9L6YwGz4cfApSrb11ZDfJfk7UFINKtH3VyZR325ybLzzMh6U3wyXdPQwWvFWEKZnP6lGL/DndCMUqd8Ms5Xg/YfA7Bu64xopUsnIfUYqQGvkcB4+ecgdpbx1z7jDmuGBi7v26NnryKealauNhLz6OOWo7QhR031ctugKUJsD3q4gWCcMqoJCuVo7aX9sdvtXzLuMOYeEiWAfeMbwKAm+zIdFFOid6LM78vqL+uOsaX/k7lPv+87kgsLKEsmiyD+fZJzXbzOg160SbIOZO7U0IXlhF3/w0fcvb/iI1N8hQnsm3WYLbxYkNNx7lKE8L1esp1aHG/dPYHNcJvOTwCyr+2tHsI0sMpGUG9cQpNa/PxWWRfkH25TO2QOpo1RJkeXZlDfsHjTz3iNTVRckn1m6lqfJCp/DPVWwVpSP5i30sjd2HOqcgWs/xnexv7cjg1pEvthiVgx+DSvyzGmLOLIKxxrVLpD9B9bbVHVm7FCzNd4kzoFSzzmd6AhaxVrUOOGLCfnGPBYg2+NFvSFXtHvrKtbKWlgDGv+WF268kEhVyR0uEWDxE6S3RccwB1gXSAUZZVJVeYSeW71rsxNFQCYC5bWvvbLPxMcjojrqKp4ea61C08MVdzBKQ5lmKZl00oyT6c+CkfDEMeLXVtMnLDX0XLUkYafg9MieUlisGzr8RiYWT57jU91C1N5EqaO0csg19UT8dmfxl5Aaw4w8awCTRyd9CUiQgdnFRDv4salU46N57KS+qDcgYKrKIYy5u1Cn4ZAyhT61qx7UFspBn1p0lSgc4GVejQaINcG7e2oNUAwxkk5MoynCzyh1IQutomlhE1tUd+ev0kEI6fq3IWlWURXmQp69fhdsDSaKrUZ1hSkiEWMeBP+g8fOz5cQrPZBloguMiHmnkwmb/zBx89Pbo/vO3kmyPm9QHob7KqAFqdQDsP/mFcsOuQHiUHxKqw0CyCtA8Wzsx0qfAiIY8VCGGhBLy/kWbiYpp99Q1Tb3ICfzpECoXULIC+AKUnNoXO7ahPlreKtSN3Ge0u7tk1KQs8wSVFl3UjpZtPE6/o1OYbt2to9FEOi+pDm73pvKXIUf76PVl0FEVUm3jcXYh8sS5/4i2rVwg/cA3QtOkLbo7Y8h21rUGUpjYvonu3O9cE/SUfwR1dY5HWRZEWhatgomKKWJU3Ei+JcmguLEdqSsDXVW+oRrVquKpNKELtkn1SHedU1GTe47JFebUcCFGidam1HuEDU7HUtcmi4rY4oiiTW6z+MFyzb4snsk1L5e6TPoFCTq4K94h1a/OyCBkV9WB3duHw0MC7VcJE+dZCwsUi0Ts4nTCU2TvX66LFGhvdBmiwJ8WTz/bW7h6iYETWpSimiYSab43GvftRmE0fGewbA/hrrpp2cK499PAnm+IdFvVG+BhNjRSUW1Uw1zIE2MFZbe1EHLb5F3HPG43wdfH2emjerUKrxAGu4N9ULTKthADHALKksRwTufCY9sCwX8CNYLVGpEjaFCtUBHLGVM7JAoWLsJmzJyAA5ISNL7+qrQF6h+3aQJNT7quhymEGrTUzKLC/0bCiYwlS0iqNJVYRonkKhAwQY2uhnIzbOyYfZGrc6Iu0MKXhF921w1R31Yp5gYVb0E3kAhT4BtgON3HLYhNATZq5l7/Er0Fk5Bcc22LagPDJqhtfGp+VLWGQ3HFIsb4tK+JGq8zlRYphEzqN3XjHK7UpwWb1/hkFRM1JQxQvMkHJVEeZHzKz2U0CtyXW5XzX1rkc+sPx5hBOnMin0gyZLRRZWNSlHN5LhBUS1bHgzfjhWn/Ydp2hOyWQ6ggdsao4wCFSTU/vsQ6Y5JlBSgoZbVonVg/RIAPosE2RGDhNZ1nYA/5jimN6mFKeS+HmL2c2Zb7YCV77xvkY3vWKXYPjMHMNS9PoiHhFUD0PgSgzVq3A9o+N3PWf3mQMwfHOWivzAT4JL2oVnqEvpq0AhO9O7XaoPlqbknSp0iIilrrdzDL3XQqvhakWDZif3wX4TKz/el/LeFuGuozpTGN5SKrw3/BWbmBGTZafEyRItMm+882t6xCCpkPQcgGRHfrhsmIB7jbvoOCpH8eMcRwkLnb7ouDYNqDSyHug3RdqKtBYdxD4xItP/khh/psvnZSlGFSeuvh9lfN0qcgzlk/JLV9LxWV41smMF3JMGS12du5VUPFqQVc8OgvotlqBKGIEDMSiVxMUBeYtfh3TXZDaZRQLZHxogWgTAmPLUsoglq0JeAe59tVb+NAudFS/5lfnTAf94/n5KsbFz04KulZbm9wE0sP5ONBXDujpi2VTQLnVKTJNoH1WuCD8WIdbhVbuxQULuItmr6nKItAd8tqoFQmASabahH2QEpJZhYvYJ/gBBAxF61lfQzD5mmLPvPfRlJtegWjRwY1BTUYrfhQt0j7OZN+6D+X0+657Z+9nsV0nK/2bPvI7cf8+H7AvG5tQVKAwxWvxgb3ufgAceVi4eot0VvXZ1GeVn0WushXLEQkQI2MDy9wX85H7Z/qxDq9qm2qKt6VaPbacIhH7zoi/yoLxLAE3R/9itUQJHgA=","base64")).toString()),qY)});var Oxe=L((JY,zY)=>{(function(t){JY&&typeof JY=="object"&&typeof zY<"u"?zY.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var Uxe=L((_mr,_xe)=>{"use strict";ZY.ifExists=mTt;var Dw=Ie("util"),Jc=Ie("path"),Lxe=Oxe(),hTt=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,gTt={createPwshFile:!0,createCmdFile:Lxe(),fs:Ie("fs")},dTt=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function Mxe(t){let e={...gTt,...t},r=e.fs;return e.fs_={chmod:r.chmod?Dw.promisify(r.chmod):async()=>{},mkdir:Dw.promisify(r.mkdir),readFile:Dw.promisify(r.readFile),stat:Dw.promisify(r.stat),unlink:Dw.promisify(r.unlink),writeFile:Dw.promisify(r.writeFile)},e}async function ZY(t,e,r){let s=Mxe(r);await s.fs_.stat(t),await ETt(t,e,s)}function mTt(t,e,r){return ZY(t,e,r).catch(()=>{})}function yTt(t,e){return e.fs_.unlink(t).catch(()=>{})}async function ETt(t,e,r){let s=await vTt(t,r);return await ITt(e,r),CTt(t,e,s,r)}function ITt(t,e){return e.fs_.mkdir(Jc.dirname(t),{recursive:!0})}function CTt(t,e,r,s){let a=Mxe(s),n=[{generator:bTt,extension:""}];return a.createCmdFile&&n.push({generator:DTt,extension:".cmd"}),a.createPwshFile&&n.push({generator:PTt,extension:".ps1"}),Promise.all(n.map(c=>STt(t,e+c.extension,r,c.generator,a)))}function wTt(t,e){return yTt(t,e)}function BTt(t,e){return xTt(t,e)}async function vTt(t,e){let a=(await e.fs_.readFile(t,"utf8")).trim().split(/\r*\n/)[0].match(hTt);if(!a){let n=Jc.extname(t).toLowerCase();return{program:dTt.get(n)||null,additionalArgs:""}}return{program:a[1],additionalArgs:a[2]}}async function STt(t,e,r,s,a){let n=a.preserveSymlinks?"--preserve-symlinks":"",c=[r.additionalArgs,n].filter(f=>f).join(" ");return a=Object.assign({},a,{prog:r.program,args:c}),await wTt(e,a),await a.fs_.writeFile(e,s(t,e,a),"utf8"),BTt(e,a)}function DTt(t,e,r){let a=Jc.relative(Jc.dirname(e),t).split("/").join("\\"),n=Jc.isAbsolute(a)?`"${a}"`:`"%~dp0\\${a}"`,c,f=r.prog,p=r.args||"",h=XY(r.nodePath).win32;f?(c=`"%~dp0\\${f}.exe"`,a=n):(f=n,p="",a="");let E=r.progArgs?`${r.progArgs.join(" ")} `:"",C=h?`@SET NODE_PATH=${h}\r +`:"";return c?C+=`@IF EXIST ${c} (\r + ${c} ${p} ${a} ${E}%*\r +) ELSE (\r + @SETLOCAL\r + @SET PATHEXT=%PATHEXT:;.JS;=;%\r + ${f} ${p} ${a} ${E}%*\r +)\r +`:C+=`@${f} ${p} ${a} ${E}%*\r +`,C}function bTt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let c=Jc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",p=XY(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,s=c):(a=c,f="",s="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") + +case \`uname\` in + *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; +esac + +`,C=r.nodePath?`export NODE_PATH="${p}" +`:"";return n?E+=`${C}if [ -x ${n} ]; then + exec ${n} ${f} ${s} ${h}"$@" +else + exec ${a} ${f} ${s} ${h}"$@" +fi +`:E+=`${C}${a} ${f} ${s} ${h}"$@" +exit $? +`,E}function PTt(t,e,r){let s=Jc.relative(Jc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,c;s=s.split("\\").join("/");let f=Jc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,p=r.args||"",h=XY(r.nodePath),E=h.win32,C=h.posix;n?(c=`"$basedir/${r.prog}$exe"`,s=f):(n=f,p="",s="");let S=r.progArgs?`${r.progArgs.join(" ")} `:"",P=`#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +${r.nodePath?`$env_node_path=$env:NODE_PATH +$env:NODE_PATH="${E}" +`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +}`;return r.nodePath&&(P+=` else { + $env:NODE_PATH="${C}" +}`),c?P+=` +$ret=0 +if (Test-Path ${c}) { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${c} ${p} ${s} ${S}$args + } else { + & ${c} ${p} ${s} ${S}$args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & ${n} ${p} ${s} ${S}$args + } else { + & ${n} ${p} ${s} ${S}$args + } + $ret=$LASTEXITCODE +} +${r.nodePath?`$env:NODE_PATH=$env_node_path +`:""}exit $ret +`:P+=` +# Support pipeline input +if ($MyInvocation.ExpectingInput) { + $input | & ${n} ${p} ${s} ${S}$args +} else { + & ${n} ${p} ${s} ${S}$args +} +${r.nodePath?`$env:NODE_PATH=$env_node_path +`:""}exit $LASTEXITCODE +`,P}function xTt(t,e){return e.fs_.chmod(t,493)}function XY(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Jc.delimiter):Array.from(t),r={};for(let s=0;s`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}_xe.exports=ZY});var AV=L((oEr,oke)=>{oke.exports=Ie("stream")});var uke=L((aEr,cke)=>{"use strict";function ake(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function sRt(t){for(var e=1;e0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var s=this.head,a=""+s.data;s=s.next;)a+=r+s.data;return a}},{key:"concat",value:function(r){if(this.length===0)return hN.alloc(0);for(var s=hN.allocUnsafe(r>>>0),a=this.head,n=0;a;)ARt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:"consume",value:function(r,s){var a;return rc.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var s=hN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:fRt,value:function(r,s){return pV(this,sRt({},s,{depth:0,customInspect:!1}))}}]),t}()});var gV=L((lEr,Ake)=>{"use strict";function pRt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(hV,this,t)):process.nextTick(hV,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(gN,r):(r._writableState.errorEmitted=!0,process.nextTick(fke,r,n)):process.nextTick(fke,r,n):e?(process.nextTick(gN,r),e(n)):process.nextTick(gN,r)}),this)}function fke(t,e){hV(t,e),gN(t)}function gN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function hRt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function hV(t,e){t.emit("error",e)}function gRt(t,e){var r=t._readableState,s=t._writableState;r&&r.autoDestroy||s&&s.autoDestroy?t.destroy(e):t.emit("error",e)}Ake.exports={destroy:pRt,undestroy:hRt,errorOrDestroy:gRt}});var ag=L((cEr,gke)=>{"use strict";var hke={};function Zc(t,e,r){r||(r=Error);function s(n,c,f){return typeof e=="string"?e:e(n,c,f)}class a extends r{constructor(c,f,p){super(s(c,f,p))}}a.prototype.name=r.name,a.prototype.code=t,hke[t]=a}function pke(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(s=>String(s)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function dRt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function mRt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function yRt(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Zc("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Zc("ERR_INVALID_ARG_TYPE",function(t,e,r){let s;typeof e=="string"&&dRt(e,"not ")?(s="must not be",e=e.replace(/^not /,"")):s="must be";let a;if(mRt(t," argument"))a=`The ${t} ${s} ${pke(e,"type")}`;else{let n=yRt(t,".")?"property":"argument";a=`The "${t}" ${n} ${s} ${pke(e,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Zc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Zc("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Zc("ERR_STREAM_PREMATURE_CLOSE","Premature close");Zc("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Zc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Zc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Zc("ERR_STREAM_WRITE_AFTER_END","write after end");Zc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Zc("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Zc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");gke.exports.codes=hke});var dV=L((uEr,dke)=>{"use strict";var ERt=ag().codes.ERR_INVALID_OPT_VALUE;function IRt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function CRt(t,e,r,s){var a=IRt(e,s,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=s?r:"highWaterMark";throw new ERt(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}dke.exports={getHighWaterMark:CRt}});var mke=L((fEr,mV)=>{typeof Object.create=="function"?mV.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mV.exports=function(e,r){if(r){e.super_=r;var s=function(){};s.prototype=r.prototype,e.prototype=new s,e.prototype.constructor=e}}});var lg=L((AEr,EV)=>{try{if(yV=Ie("util"),typeof yV.inherits!="function")throw"";EV.exports=yV.inherits}catch{EV.exports=mke()}var yV});var Eke=L((pEr,yke)=>{yke.exports=Ie("util").deprecate});var wV=L((hEr,Ske)=>{"use strict";Ske.exports=Ki;function Cke(t){var e=this;this.next=null,this.entry=null,this.finish=function(){KRt(e,t)}}var Qw;Ki.WritableState=ab;var wRt={deprecate:Eke()},wke=AV(),mN=Ie("buffer").Buffer,BRt=global.Uint8Array||function(){};function vRt(t){return mN.from(t)}function SRt(t){return mN.isBuffer(t)||t instanceof BRt}var CV=gV(),DRt=dV(),bRt=DRt.getHighWaterMark,cg=ag().codes,PRt=cg.ERR_INVALID_ARG_TYPE,xRt=cg.ERR_METHOD_NOT_IMPLEMENTED,kRt=cg.ERR_MULTIPLE_CALLBACK,QRt=cg.ERR_STREAM_CANNOT_PIPE,TRt=cg.ERR_STREAM_DESTROYED,RRt=cg.ERR_STREAM_NULL_VALUES,FRt=cg.ERR_STREAM_WRITE_AFTER_END,NRt=cg.ERR_UNKNOWN_ENCODING,Tw=CV.errorOrDestroy;lg()(Ki,wke);function ORt(){}function ab(t,e,r){Qw=Qw||Wm(),t=t||{},typeof r!="boolean"&&(r=e instanceof Qw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=bRt(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=t.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){qRt(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cke(this)}ab.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ab.prototype,"buffer",{get:wRt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var dN;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(dN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ki,Symbol.hasInstance,{value:function(e){return dN.call(this,e)?!0:this!==Ki?!1:e&&e._writableState instanceof ab}})):dN=function(e){return e instanceof this};function Ki(t){Qw=Qw||Wm();var e=this instanceof Qw;if(!e&&!dN.call(Ki,this))return new Ki(t);this._writableState=new ab(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),wke.call(this)}Ki.prototype.pipe=function(){Tw(this,new QRt)};function LRt(t,e){var r=new FRt;Tw(t,r),process.nextTick(e,r)}function MRt(t,e,r,s){var a;return r===null?a=new RRt:typeof r!="string"&&!e.objectMode&&(a=new PRt("chunk",["string","Buffer"],r)),a?(Tw(t,a),process.nextTick(s,a),!1):!0}Ki.prototype.write=function(t,e,r){var s=this._writableState,a=!1,n=!s.objectMode&&SRt(t);return n&&!mN.isBuffer(t)&&(t=vRt(t)),typeof e=="function"&&(r=e,e=null),n?e="buffer":e||(e=s.defaultEncoding),typeof r!="function"&&(r=ORt),s.ending?LRt(this,r):(n||MRt(this,s,t,r))&&(s.pendingcb++,a=URt(this,s,n,t,e,r)),a};Ki.prototype.cork=function(){this._writableState.corked++};Ki.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Bke(this,t))};Ki.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new NRt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ki.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function _Rt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=mN.from(e,r)),e}Object.defineProperty(Ki.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function URt(t,e,r,s,a,n){if(!r){var c=_Rt(e,s,a);s!==c&&(r=!0,a="buffer",s=c)}var f=e.objectMode?1:s.length;e.length+=f;var p=e.length{"use strict";var JRt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};bke.exports=yA;var Dke=SV(),vV=wV();lg()(yA,Dke);for(BV=JRt(vV.prototype),yN=0;yN{var IN=Ie("buffer"),ch=IN.Buffer;function Pke(t,e){for(var r in t)e[r]=t[r]}ch.from&&ch.alloc&&ch.allocUnsafe&&ch.allocUnsafeSlow?xke.exports=IN:(Pke(IN,DV),DV.Buffer=Rw);function Rw(t,e,r){return ch(t,e,r)}Pke(ch,Rw);Rw.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ch(t,e,r)};Rw.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var s=ch(t);return e!==void 0?typeof r=="string"?s.fill(e,r):s.fill(e):s.fill(0),s};Rw.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ch(t)};Rw.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return IN.SlowBuffer(t)}});var xV=L(Tke=>{"use strict";var PV=kke().Buffer,Qke=PV.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function XRt(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function $Rt(t){var e=XRt(t);if(typeof e!="string"&&(PV.isEncoding===Qke||!Qke(t)))throw new Error("Unknown encoding: "+t);return e||t}Tke.StringDecoder=lb;function lb(t){this.encoding=$Rt(t);var e;switch(this.encoding){case"utf16le":this.text=sFt,this.end=oFt,e=4;break;case"utf8":this.fillLast=rFt,e=4;break;case"base64":this.text=aFt,this.end=lFt,e=3;break;default:this.write=cFt,this.end=uFt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=PV.allocUnsafe(e)}lb.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function eFt(t,e,r){var s=e.length-1;if(s=0?(a>0&&(t.lastNeed=a-1),a):--s=0?(a>0&&(t.lastNeed=a-2),a):--s=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function tFt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function rFt(t){var e=this.lastTotal-this.lastNeed,r=tFt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function nFt(t,e){var r=eFt(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var s=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString("utf8",e,s)}function iFt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function sFt(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function oFt(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function aFt(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function lFt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function cFt(t){return t.toString(this.encoding)}function uFt(t){return t&&t.length?this.write(t):""}});var CN=L((mEr,Nke)=>{"use strict";var Rke=ag().codes.ERR_STREAM_PREMATURE_CLOSE;function fFt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,s=new Array(r),a=0;a{"use strict";var wN;function ug(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hFt=CN(),fg=Symbol("lastResolve"),Ym=Symbol("lastReject"),ub=Symbol("error"),BN=Symbol("ended"),Vm=Symbol("lastPromise"),kV=Symbol("handlePromise"),Km=Symbol("stream");function Ag(t,e){return{value:t,done:e}}function gFt(t){var e=t[fg];if(e!==null){var r=t[Km].read();r!==null&&(t[Vm]=null,t[fg]=null,t[Ym]=null,e(Ag(r,!1)))}}function dFt(t){process.nextTick(gFt,t)}function mFt(t,e){return function(r,s){t.then(function(){if(e[BN]){r(Ag(void 0,!0));return}e[kV](r,s)},s)}}var yFt=Object.getPrototypeOf(function(){}),EFt=Object.setPrototypeOf((wN={get stream(){return this[Km]},next:function(){var e=this,r=this[ub];if(r!==null)return Promise.reject(r);if(this[BN])return Promise.resolve(Ag(void 0,!0));if(this[Km].destroyed)return new Promise(function(c,f){process.nextTick(function(){e[ub]?f(e[ub]):c(Ag(void 0,!0))})});var s=this[Vm],a;if(s)a=new Promise(mFt(s,this));else{var n=this[Km].read();if(n!==null)return Promise.resolve(Ag(n,!1));a=new Promise(this[kV])}return this[Vm]=a,a}},ug(wN,Symbol.asyncIterator,function(){return this}),ug(wN,"return",function(){var e=this;return new Promise(function(r,s){e[Km].destroy(null,function(a){if(a){s(a);return}r(Ag(void 0,!0))})})}),wN),yFt),IFt=function(e){var r,s=Object.create(EFt,(r={},ug(r,Km,{value:e,writable:!0}),ug(r,fg,{value:null,writable:!0}),ug(r,Ym,{value:null,writable:!0}),ug(r,ub,{value:null,writable:!0}),ug(r,BN,{value:e._readableState.endEmitted,writable:!0}),ug(r,kV,{value:function(n,c){var f=s[Km].read();f?(s[Vm]=null,s[fg]=null,s[Ym]=null,n(Ag(f,!1))):(s[fg]=n,s[Ym]=c)},writable:!0}),r));return s[Vm]=null,hFt(e,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=s[Ym];n!==null&&(s[Vm]=null,s[fg]=null,s[Ym]=null,n(a)),s[ub]=a;return}var c=s[fg];c!==null&&(s[Vm]=null,s[fg]=null,s[Ym]=null,c(Ag(void 0,!0))),s[BN]=!0}),e.on("readable",dFt.bind(null,s)),s};Oke.exports=IFt});var Hke=L((EEr,Uke)=>{"use strict";function Mke(t,e,r,s,a,n,c){try{var f=t[n](c),p=f.value}catch(h){r(h);return}f.done?e(p):Promise.resolve(p).then(s,a)}function CFt(t){return function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function c(p){Mke(n,s,a,c,f,"next",p)}function f(p){Mke(n,s,a,c,f,"throw",p)}c(void 0)})}}function _ke(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function wFt(t){for(var e=1;e{"use strict";Zke.exports=Pn;var Fw;Pn.ReadableState=Wke;var IEr=Ie("events").EventEmitter,Gke=function(e,r){return e.listeners(r).length},Ab=AV(),vN=Ie("buffer").Buffer,DFt=global.Uint8Array||function(){};function bFt(t){return vN.from(t)}function PFt(t){return vN.isBuffer(t)||t instanceof DFt}var QV=Ie("util"),ln;QV&&QV.debuglog?ln=QV.debuglog("stream"):ln=function(){};var xFt=uke(),MV=gV(),kFt=dV(),QFt=kFt.getHighWaterMark,SN=ag().codes,TFt=SN.ERR_INVALID_ARG_TYPE,RFt=SN.ERR_STREAM_PUSH_AFTER_EOF,FFt=SN.ERR_METHOD_NOT_IMPLEMENTED,NFt=SN.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Nw,TV,RV;lg()(Pn,Ab);var fb=MV.errorOrDestroy,FV=["error","close","destroy","pause","resume"];function OFt(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Wke(t,e,r){Fw=Fw||Wm(),t=t||{},typeof r!="boolean"&&(r=e instanceof Fw),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=QFt(this,t,"readableHighWaterMark",r),this.buffer=new xFt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Nw||(Nw=xV().StringDecoder),this.decoder=new Nw(t.encoding),this.encoding=t.encoding)}function Pn(t){if(Fw=Fw||Wm(),!(this instanceof Pn))return new Pn(t);var e=this instanceof Fw;this._readableState=new Wke(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Ab.call(this)}Object.defineProperty(Pn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Pn.prototype.destroy=MV.destroy;Pn.prototype._undestroy=MV.undestroy;Pn.prototype._destroy=function(t,e){e(t)};Pn.prototype.push=function(t,e){var r=this._readableState,s;return r.objectMode?s=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=vN.from(t,e),e=""),s=!0),Yke(this,t,e,!1,s)};Pn.prototype.unshift=function(t){return Yke(this,t,null,!0,!1)};function Yke(t,e,r,s,a){ln("readableAddChunk",e);var n=t._readableState;if(e===null)n.reading=!1,_Ft(t,n);else{var c;if(a||(c=LFt(n,e)),c)fb(t,c);else if(n.objectMode||e&&e.length>0)if(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==vN.prototype&&(e=bFt(e)),s)n.endEmitted?fb(t,new NFt):NV(t,n,e,!0);else if(n.ended)fb(t,new RFt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?NV(t,n,e,!1):LV(t,n)):NV(t,n,e,!1)}else s||(n.reading=!1,LV(t,n))}return!n.ended&&(n.length=jke?t=jke:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qke(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=MFt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Pn.prototype.read=function(t){ln("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ln("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?OV(this):DN(this),null;if(t=qke(t,e),t===0&&e.ended)return e.length===0&&OV(this),null;var s=e.needReadable;ln("need readable",s),(e.length===0||e.length-t0?a=Jke(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&OV(this)),a!==null&&this.emit("data",a),a};function _Ft(t,e){if(ln("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?DN(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vke(t)))}}function DN(t){var e=t._readableState;ln("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ln("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vke,t))}function Vke(t){var e=t._readableState;ln("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_V(t)}function LV(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(UFt,t,e))}function UFt(t,e){for(;!e.reading&&!e.ended&&(e.length1&&zke(s.pipes,t)!==-1)&&!h&&(ln("false write response, pause",s.awaitDrain),s.awaitDrain++),r.pause())}function S(N){ln("onerror",N),R(),t.removeListener("error",S),Gke(t,"error")===0&&fb(t,N)}OFt(t,"error",S);function P(){t.removeListener("finish",I),R()}t.once("close",P);function I(){ln("onfinish"),t.removeListener("close",P),R()}t.once("finish",I);function R(){ln("unpipe"),r.unpipe(t)}return t.emit("pipe",r),s.flowing||(ln("pipe resume"),r.resume()),t};function HFt(t){return function(){var r=t._readableState;ln("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Gke(t,"data")&&(r.flowing=!0,_V(t))}}Pn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var s=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n0,s.flowing!==!1&&this.resume()):t==="readable"&&!s.endEmitted&&!s.readableListening&&(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,ln("on readable",s.length,s.reading),s.length?DN(this):s.reading||process.nextTick(jFt,this)),r};Pn.prototype.addListener=Pn.prototype.on;Pn.prototype.removeListener=function(t,e){var r=Ab.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Kke,this),r};Pn.prototype.removeAllListeners=function(t){var e=Ab.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Kke,this),e};function Kke(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function jFt(t){ln("readable nexttick read 0"),t.read(0)}Pn.prototype.resume=function(){var t=this._readableState;return t.flowing||(ln("resume"),t.flowing=!t.readableListening,qFt(this,t)),t.paused=!1,this};function qFt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(GFt,t,e))}function GFt(t,e){ln("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_V(t),e.flowing&&!e.reading&&t.read(0)}Pn.prototype.pause=function(){return ln("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ln("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _V(t){var e=t._readableState;for(ln("flow",e.flowing);e.flowing&&t.read()!==null;);}Pn.prototype.wrap=function(t){var e=this,r=this._readableState,s=!1;t.on("end",function(){if(ln("wrapped end"),r.decoder&&!r.ended){var c=r.decoder.end();c&&c.length&&e.push(c)}e.push(null)}),t.on("data",function(c){if(ln("wrapped data"),r.decoder&&(c=r.decoder.write(c)),!(r.objectMode&&c==null)&&!(!r.objectMode&&(!c||!c.length))){var f=e.push(c);f||(s=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]=="function"&&(this[a]=function(f){return function(){return t[f].apply(t,arguments)}}(a));for(var n=0;n=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function OV(t){var e=t._readableState;ln("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(WFt,e,t))}function WFt(t,e){if(ln("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Pn.from=function(t,e){return RV===void 0&&(RV=Hke()),RV(Pn,t,e)});function zke(t,e){for(var r=0,s=t.length;r{"use strict";$ke.exports=uh;var bN=ag().codes,YFt=bN.ERR_METHOD_NOT_IMPLEMENTED,VFt=bN.ERR_MULTIPLE_CALLBACK,KFt=bN.ERR_TRANSFORM_ALREADY_TRANSFORMING,JFt=bN.ERR_TRANSFORM_WITH_LENGTH_0,PN=Wm();lg()(uh,PN);function zFt(t,e){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(s===null)return this.emit("error",new VFt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),s(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";tQe.exports=pb;var eQe=UV();lg()(pb,eQe);function pb(t){if(!(this instanceof pb))return new pb(t);eQe.call(this,t)}pb.prototype._transform=function(t,e,r){r(null,t)}});var aQe=L((vEr,oQe)=>{"use strict";var HV;function XFt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var sQe=ag().codes,$Ft=sQe.ERR_MISSING_ARGS,eNt=sQe.ERR_STREAM_DESTROYED;function nQe(t){if(t)throw t}function tNt(t){return t.setHeader&&typeof t.abort=="function"}function rNt(t,e,r,s){s=XFt(s);var a=!1;t.on("close",function(){a=!0}),HV===void 0&&(HV=CN()),HV(t,{readable:e,writable:r},function(c){if(c)return s(c);a=!0,s()});var n=!1;return function(c){if(!a&&!n){if(n=!0,tNt(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();s(c||new eNt("pipe"))}}}function iQe(t){t()}function nNt(t,e){return t.pipe(e)}function iNt(t){return!t.length||typeof t[t.length-1]!="function"?nQe:t.pop()}function sNt(){for(var t=arguments.length,e=new Array(t),r=0;r0;return rNt(c,p,h,function(E){a||(a=E),E&&n.forEach(iQe),!p&&(n.forEach(iQe),s(a))})});return e.reduce(nNt)}oQe.exports=sNt});var Ow=L((Xc,gb)=>{var hb=Ie("stream");process.env.READABLE_STREAM==="disable"&&hb?(gb.exports=hb.Readable,Object.assign(gb.exports,hb),gb.exports.Stream=hb):(Xc=gb.exports=SV(),Xc.Stream=hb||Xc,Xc.Readable=Xc,Xc.Writable=wV(),Xc.Duplex=Wm(),Xc.Transform=UV(),Xc.PassThrough=rQe(),Xc.finished=CN(),Xc.pipeline=aQe())});var uQe=L((SEr,cQe)=>{"use strict";var{Buffer:uf}=Ie("buffer"),lQe=Symbol.for("BufferList");function wi(t){if(!(this instanceof wi))return new wi(t);wi._init.call(this,t)}wi._init=function(e){Object.defineProperty(this,lQe,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};wi.prototype._new=function(e){return new wi(e)};wi.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let s=0;sthis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};wi.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};wi.prototype.copy=function(e,r,s,a){if((typeof s!="number"||s<0)&&(s=0),(typeof a!="number"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return e||uf.alloc(0);let n=!!e,c=this._offset(s),f=a-s,p=f,h=n&&r||0,E=c[1];if(s===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:uf.concat(this._bufs,this.length);for(let C=0;CS)this._bufs[C].copy(e,h,E),h+=S;else{this._bufs[C].copy(e,h,E,E+p),h+=S;break}p-=S,E&&(E=0)}return e.length>h?e.slice(0,h):e};wi.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let s=this._offset(e),a=this._offset(r),n=this._bufs.slice(s[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),s[1]!==0&&(n[0]=n[0].slice(s[1])),this._new(n)};wi.prototype.toString=function(e,r,s){return this.slice(r,s).toString(e)};wi.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};wi.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let s=this._offset(e),a=s[0],n=s[1];for(;a=t.length){let p=c.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=c.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};wi.prototype._match=function(t,e){if(this.length-t{"use strict";var jV=Ow().Duplex,oNt=lg(),db=uQe();function na(t){if(!(this instanceof na))return new na(t);if(typeof t=="function"){this._callback=t;let e=function(s){this._callback&&(this._callback(s),this._callback=null)}.bind(this);this.on("pipe",function(s){s.on("error",e)}),this.on("unpipe",function(s){s.removeListener("error",e)}),t=null}db._init.call(this,t),jV.call(this)}oNt(na,jV);Object.assign(na.prototype,db.prototype);na.prototype._new=function(e){return new na(e)};na.prototype._write=function(e,r,s){this._appendBuffer(e),typeof s=="function"&&s()};na.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};na.prototype.end=function(e){jV.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};na.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};na.prototype._isBufferList=function(e){return e instanceof na||e instanceof db||na.isBufferList(e)};na.isBufferList=db.isBufferList;xN.exports=na;xN.exports.BufferListStream=na;xN.exports.BufferList=db});var WV=L(Mw=>{var aNt=Buffer.alloc,lNt="0000000000000000000",cNt="7777777777777777777",AQe=48,pQe=Buffer.from("ustar\0","binary"),uNt=Buffer.from("00","binary"),fNt=Buffer.from("ustar ","binary"),ANt=Buffer.from(" \0","binary"),pNt=parseInt("7777",8),mb=257,GV=263,hNt=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},gNt=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},dNt=function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},hQe=function(t,e,r,s){for(;re?cNt.slice(0,e)+" ":lNt.slice(0,e-t.length)+t+" "};function mNt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],s=t.length-1;s>0;s--){var a=t[s];e?r.push(a):r.push(255-a)}var n=0,c=r.length;for(s=0;s=Math.pow(10,r)&&r++,e+r+t};Mw.decodeLongPath=function(t,e){return Lw(t,0,t.length,e)};Mw.encodePax=function(t){var e="";t.name&&(e+=qV(" path="+t.name+` +`)),t.linkname&&(e+=qV(" linkpath="+t.linkname+` +`));var r=t.pax;if(r)for(var s in r)e+=qV(" "+s+"="+r[s]+` +`);return Buffer.from(e)};Mw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r100;){var a=r.indexOf("/");if(a===-1)return null;s+=s?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(pg(t.mode&pNt,6),100),e.write(pg(t.uid,6),108),e.write(pg(t.gid,6),116),e.write(pg(t.size,11),124),e.write(pg(t.mtime.getTime()/1e3|0,11),136),e[156]=AQe+dNt(t.type),t.linkname&&e.write(t.linkname,157),pQe.copy(e,mb),uNt.copy(e,GV),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(pg(t.devmajor||0,6),329),e.write(pg(t.devminor||0,6),337),s&&e.write(s,345),e.write(pg(gQe(e),6),148),e)};Mw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-AQe,a=Lw(t,0,100,e),n=hg(t,100,8),c=hg(t,108,8),f=hg(t,116,8),p=hg(t,124,12),h=hg(t,136,12),E=gNt(s),C=t[157]===0?null:Lw(t,157,100,e),S=Lw(t,265,32),P=Lw(t,297,32),I=hg(t,329,8),R=hg(t,337,8),N=gQe(t);if(N===8*32)return null;if(N!==hg(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(pQe.compare(t,mb,mb+6)===0)t[345]&&(a=Lw(t,345,155,e)+"/"+a);else if(!(fNt.compare(t,mb,mb+6)===0&&ANt.compare(t,GV,GV+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&a&&a[a.length-1]==="/"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:C,uname:S,gname:P,devmajor:I,devminor:R}}});var wQe=L((PEr,CQe)=>{var mQe=Ie("util"),yNt=fQe(),yb=WV(),yQe=Ow().Writable,EQe=Ow().PassThrough,IQe=function(){},dQe=function(t){return t&=511,t&&512-t},ENt=function(t,e){var r=new kN(t,e);return r.end(),r},INt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},kN=function(t,e){this._parent=t,this.offset=e,EQe.call(this,{autoDestroy:!1})};mQe.inherits(kN,EQe);kN.prototype.destroy=function(t){this._parent.destroy(t)};var fh=function(t){if(!(this instanceof fh))return new fh(t);yQe.call(this,t),t=t||{},this._offset=0,this._buffer=yNt(),this._missing=0,this._partial=!1,this._onparse=IQe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=dQe(e._header.size);S?e._parse(S,c):e._parse(512,C),e._locked||s()},c=function(){e._buffer.consume(dQe(e._header.size)),e._parse(512,C),s()},f=function(){var S=e._header.size;e._paxGlobal=yb.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=yb.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=yb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=yb.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},C=function(){var S=e._offset,P;try{P=e._header=yb.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit("error",I)}if(r.consume(512),!P){e._parse(512,C),s();return}if(P.type==="gnu-long-path"){e._parse(P.size,h),s();return}if(P.type==="gnu-long-link-path"){e._parse(P.size,E),s();return}if(P.type==="pax-global-header"){e._parse(P.size,f),s();return}if(P.type==="pax-header"){e._parse(P.size,p),s();return}if(e._gnuLongPath&&(P.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(P.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=P=INt(P,e._pax),e._pax=null),e._locked=!0,!P.size||P.type==="directory"){e._parse(512,C),e.emit("entry",P,ENt(e,S),a);return}e._stream=new kN(e,S),e.emit("entry",P,e._stream,a),e._parse(P.size,n),s()};this._onheader=C,this._parse(512,C)};mQe.inherits(fh,yQe);fh.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};fh.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};fh.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=IQe,this._overflow?this._write(this._overflow,void 0,t):t()}};fh.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.lengthn&&(c=t.slice(n),t=t.slice(0,n)),s?s.end(t):a.append(t),this._overflow=c,this._onparse()}};fh.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};CQe.exports=fh});var vQe=L((xEr,BQe)=>{BQe.exports=Ie("fs").constants||Ie("constants")});var xQe=L((kEr,PQe)=>{var _w=vQe(),SQe=vH(),TN=lg(),CNt=Buffer.alloc,DQe=Ow().Readable,Uw=Ow().Writable,wNt=Ie("string_decoder").StringDecoder,QN=WV(),BNt=parseInt("755",8),vNt=parseInt("644",8),bQe=CNt(1024),VV=function(){},YV=function(t,e){e&=511,e&&t.push(bQe.slice(0,512-e))};function SNt(t){switch(t&_w.S_IFMT){case _w.S_IFBLK:return"block-device";case _w.S_IFCHR:return"character-device";case _w.S_IFDIR:return"directory";case _w.S_IFIFO:return"fifo";case _w.S_IFLNK:return"symlink"}return"file"}var RN=function(t){Uw.call(this),this.written=0,this._to=t,this._destroyed=!1};TN(RN,Uw);RN.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};RN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var FN=function(){Uw.call(this),this.linkname="",this._decoder=new wNt("utf-8"),this._destroyed=!1};TN(FN,Uw);FN.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};FN.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Eb=function(){Uw.call(this),this._destroyed=!1};TN(Eb,Uw);Eb.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};Eb.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var EA=function(t){if(!(this instanceof EA))return new EA(t);DQe.call(this,t),this._drain=VV,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};TN(EA,DQe);EA.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(r=e,e=null),r||(r=VV);var s=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=SNt(t.mode)),t.mode||(t.mode=t.type==="directory"?BNt:vNt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return YV(s,t.size),a?process.nextTick(r):this._drain=r,new Eb}if(t.type==="symlink"&&!t.linkname){var n=new FN;return SQe(n,function(f){if(f)return s.destroy(),r(f);t.linkname=n.linkname,s._encode(t),r()}),n}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new Eb;var c=new RN(this);return this._stream=c,SQe(c,function(f){if(s._stream=null,f)return s.destroy(),r(f);if(c.written!==t.size)return s.destroy(),r(new Error("size mismatch"));YV(s,t.size),s._finalizing&&s.finalize(),r()}),c}};EA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(bQe),this.push(null))};EA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};EA.prototype._encode=function(t){if(!t.pax){var e=QN.encode(t);if(e){this.push(e);return}}this._encodePax(t)};EA.prototype._encodePax=function(t){var e=QN.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(QN.encode(r)),this.push(e),YV(this,e.length),r.size=t.size,r.type=t.type,this.push(QN.encode(r))};EA.prototype._read=function(t){var e=this._drain;this._drain=VV,e()};PQe.exports=EA});var kQe=L(KV=>{KV.extract=wQe();KV.pack=xQe()});var qQe=L(Ra=>{"use strict";var MNt=Ra&&Ra.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.Minipass=Ra.isWritable=Ra.isReadable=Ra.isStream=void 0;var MQe=typeof process=="object"&&process?process:{stdout:null,stderr:null},o7=Ie("node:events"),jQe=MNt(Ie("node:stream")),_Nt=Ie("node:string_decoder"),UNt=t=>!!t&&typeof t=="object"&&(t instanceof qN||t instanceof jQe.default||(0,Ra.isReadable)(t)||(0,Ra.isWritable)(t));Ra.isStream=UNt;var HNt=t=>!!t&&typeof t=="object"&&t instanceof o7.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==jQe.default.Writable.prototype.pipe;Ra.isReadable=HNt;var jNt=t=>!!t&&typeof t=="object"&&t instanceof o7.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";Ra.isWritable=jNt;var Ah=Symbol("EOF"),ph=Symbol("maybeEmitEnd"),gg=Symbol("emittedEnd"),LN=Symbol("emittingEnd"),Ib=Symbol("emittedError"),MN=Symbol("closed"),_Qe=Symbol("read"),_N=Symbol("flush"),UQe=Symbol("flushChunk"),ff=Symbol("encoding"),jw=Symbol("decoder"),Zs=Symbol("flowing"),Cb=Symbol("paused"),qw=Symbol("resume"),Xs=Symbol("buffer"),Ta=Symbol("pipes"),$s=Symbol("bufferLength"),e7=Symbol("bufferPush"),UN=Symbol("bufferShift"),ia=Symbol("objectMode"),rs=Symbol("destroyed"),t7=Symbol("error"),r7=Symbol("emitData"),HQe=Symbol("emitEnd"),n7=Symbol("emitEnd2"),CA=Symbol("async"),i7=Symbol("abort"),HN=Symbol("aborted"),wb=Symbol("signal"),Jm=Symbol("dataListeners"),nc=Symbol("discarded"),Bb=t=>Promise.resolve().then(t),qNt=t=>t(),GNt=t=>t==="end"||t==="finish"||t==="prefinish",WNt=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,YNt=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),jN=class{src;dest;opts;ondrain;constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[qw](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},s7=class extends jN{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,s){super(e,r,s),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}},VNt=t=>!!t.objectMode,KNt=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",qN=class extends o7.EventEmitter{[Zs]=!1;[Cb]=!1;[Ta]=[];[Xs]=[];[ia];[ff];[CA];[jw];[Ah]=!1;[gg]=!1;[LN]=!1;[MN]=!1;[Ib]=null;[$s]=0;[rs]=!1;[wb];[HN]=!1;[Jm]=0;[nc]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");VNt(r)?(this[ia]=!0,this[ff]=null):KNt(r)?(this[ff]=r.encoding,this[ia]=!1):(this[ia]=!1,this[ff]=null),this[CA]=!!r.async,this[jw]=this[ff]?new _Nt.StringDecoder(this[ff]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Xs]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Ta]});let{signal:s}=r;s&&(this[wb]=s,s.aborted?this[i7]():s.addEventListener("abort",()=>this[i7]()))}get bufferLength(){return this[$s]}get encoding(){return this[ff]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ia]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[CA]}set async(e){this[CA]=this[CA]||!!e}[i7](){this[HN]=!0,this.emit("abort",this[wb]?.reason),this.destroy(this[wb]?.reason)}get aborted(){return this[HN]}set aborted(e){}write(e,r,s){if(this[HN])return!1;if(this[Ah])throw new Error("write after end");if(this[rs])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(s=r,r="utf8"),r||(r="utf8");let a=this[CA]?Bb:qNt;if(!this[ia]&&!Buffer.isBuffer(e)){if(YNt(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(WNt(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ia]?(this[Zs]&&this[$s]!==0&&this[_N](!0),this[Zs]?this.emit("data",e):this[e7](e),this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs]):e.length?(typeof e=="string"&&!(r===this[ff]&&!this[jw]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ff]&&(e=this[jw].write(e)),this[Zs]&&this[$s]!==0&&this[_N](!0),this[Zs]?this.emit("data",e):this[e7](e),this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs]):(this[$s]!==0&&this.emit("readable"),s&&a(s),this[Zs])}read(e){if(this[rs])return null;if(this[nc]=!1,this[$s]===0||e===0||e&&e>this[$s])return this[ph](),null;this[ia]&&(e=null),this[Xs].length>1&&!this[ia]&&(this[Xs]=[this[ff]?this[Xs].join(""):Buffer.concat(this[Xs],this[$s])]);let r=this[_Qe](e||null,this[Xs][0]);return this[ph](),r}[_Qe](e,r){if(this[ia])this[UN]();else{let s=r;e===s.length||e===null?this[UN]():typeof s=="string"?(this[Xs][0]=s.slice(e),r=s.slice(0,e),this[$s]-=e):(this[Xs][0]=s.subarray(e),r=s.subarray(0,e),this[$s]-=e)}return this.emit("data",r),!this[Xs].length&&!this[Ah]&&this.emit("drain"),r}end(e,r,s){return typeof e=="function"&&(s=e,e=void 0),typeof r=="function"&&(s=r,r="utf8"),e!==void 0&&this.write(e,r),s&&this.once("end",s),this[Ah]=!0,this.writable=!1,(this[Zs]||!this[Cb])&&this[ph](),this}[qw](){this[rs]||(!this[Jm]&&!this[Ta].length&&(this[nc]=!0),this[Cb]=!1,this[Zs]=!0,this.emit("resume"),this[Xs].length?this[_N]():this[Ah]?this[ph]():this.emit("drain"))}resume(){return this[qw]()}pause(){this[Zs]=!1,this[Cb]=!0,this[nc]=!1}get destroyed(){return this[rs]}get flowing(){return this[Zs]}get paused(){return this[Cb]}[e7](e){this[ia]?this[$s]+=1:this[$s]+=e.length,this[Xs].push(e)}[UN](){return this[ia]?this[$s]-=1:this[$s]-=this[Xs][0].length,this[Xs].shift()}[_N](e=!1){do;while(this[UQe](this[UN]())&&this[Xs].length);!e&&!this[Xs].length&&!this[Ah]&&this.emit("drain")}[UQe](e){return this.emit("data",e),this[Zs]}pipe(e,r){if(this[rs])return e;this[nc]=!1;let s=this[gg];return r=r||{},e===MQe.stdout||e===MQe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,s?r.end&&e.end():(this[Ta].push(r.proxyErrors?new s7(this,e,r):new jN(this,e,r)),this[CA]?Bb(()=>this[qw]()):this[qw]()),e}unpipe(e){let r=this[Ta].find(s=>s.dest===e);r&&(this[Ta].length===1?(this[Zs]&&this[Jm]===0&&(this[Zs]=!1),this[Ta]=[]):this[Ta].splice(this[Ta].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let s=super.on(e,r);if(e==="data")this[nc]=!1,this[Jm]++,!this[Ta].length&&!this[Zs]&&this[qw]();else if(e==="readable"&&this[$s]!==0)super.emit("readable");else if(GNt(e)&&this[gg])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ib]){let a=r;this[CA]?Bb(()=>a.call(this,this[Ib])):a.call(this,this[Ib])}return s}removeListener(e,r){return this.off(e,r)}off(e,r){let s=super.off(e,r);return e==="data"&&(this[Jm]=this.listeners("data").length,this[Jm]===0&&!this[nc]&&!this[Ta].length&&(this[Zs]=!1)),s}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jm]=0,!this[nc]&&!this[Ta].length&&(this[Zs]=!1)),r}get emittedEnd(){return this[gg]}[ph](){!this[LN]&&!this[gg]&&!this[rs]&&this[Xs].length===0&&this[Ah]&&(this[LN]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[MN]&&this.emit("close"),this[LN]=!1)}emit(e,...r){let s=r[0];if(e!=="error"&&e!=="close"&&e!==rs&&this[rs])return!1;if(e==="data")return!this[ia]&&!s?!1:this[CA]?(Bb(()=>this[r7](s)),!0):this[r7](s);if(e==="end")return this[HQe]();if(e==="close"){if(this[MN]=!0,!this[gg]&&!this[rs])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ib]=s,super.emit(t7,s);let n=!this[wb]||this.listeners("error").length?super.emit("error",s):!1;return this[ph](),n}else if(e==="resume"){let n=super.emit("resume");return this[ph](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,...r);return this[ph](),a}[r7](e){for(let s of this[Ta])s.dest.write(e)===!1&&this.pause();let r=this[nc]?!1:super.emit("data",e);return this[ph](),r}[HQe](){return this[gg]?!1:(this[gg]=!0,this.readable=!1,this[CA]?(Bb(()=>this[n7]()),!0):this[n7]())}[n7](){if(this[jw]){let r=this[jw].end();if(r){for(let s of this[Ta])s.dest.write(r);this[nc]||super.emit("data",r)}}for(let r of this[Ta])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ia]||(e.dataLength=0);let r=this.promise();return this.on("data",s=>{e.push(s),this[ia]||(e.dataLength+=s.length)}),await r,e}async concat(){if(this[ia])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ff]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(rs,()=>r(new Error("stream destroyed"))),this.on("error",s=>r(s)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[nc]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let a=this.read();if(a!==null)return Promise.resolve({done:!1,value:a});if(this[Ah])return r();let n,c,f=C=>{this.off("data",p),this.off("end",h),this.off(rs,E),r(),c(C)},p=C=>{this.off("error",f),this.off("end",h),this.off(rs,E),this.pause(),n({value:C,done:!!this[Ah]})},h=()=>{this.off("error",f),this.off("data",p),this.off(rs,E),r(),n({done:!0,value:void 0})},E=()=>f(new Error("stream destroyed"));return new Promise((C,S)=>{c=S,n=C,this.once(rs,E),this.once("error",f),this.once("end",h),this.once("data",p)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[nc]=!1;let e=!1,r=()=>(this.pause(),this.off(t7,r),this.off(rs,r),this.off("end",r),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return r();let a=this.read();return a===null?r():{done:!1,value:a}};return this.once("end",r),this.once(t7,r),this.once(rs,r),{next:s,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[rs])return e?this.emit("error",e):this.emit(rs),this;this[rs]=!0,this[nc]=!0,this[Xs].length=0,this[$s]=0;let r=this;return typeof r.close=="function"&&!this[MN]&&r.close(),e?this.emit("error",e):this.emit(rs),this}static get isStream(){return Ra.isStream}};Ra.Minipass=qN});var YQe=L((ZEr,wA)=>{"use strict";var Sb=Ie("crypto"),{Minipass:JNt}=qQe(),l7=["sha512","sha384","sha256"],u7=["sha512"],zNt=/^[a-z0-9+/]+(?:=?=?)$/i,ZNt=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,XNt=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,$Nt=/^[\x21-\x7E]+$/,Db=t=>t?.length?`?${t.join("?")}`:"",c7=class extends JNt{#t;#r;#i;constructor(e){super(),this.size=0,this.opts=e,this.#e(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...u7],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(Sb.createHash)}#e(){this.sri=this.opts?.integrity?ic(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=Db(this.opts?.options)}on(e,r){return e==="size"&&this.#r?r(this.#r):e==="integrity"&&this.#t?r(this.#t):e==="verified"&&this.#i?r(this.#i):super.on(e,r)}emit(e,r){return e==="end"&&this.#n(),super.emit(e,r)}write(e){return this.size+=e.length,this.hashes.forEach(r=>r.update(e)),super.write(e)}#n(){this.goodSri||this.#e();let e=ic(this.hashes.map((s,a)=>`${this.algorithms[a]}-${s.digest("base64")}${this.optString}`).join(" "),this.opts),r=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let s=new Error(`stream size mismatch when checking ${this.sri}. + Wanted: ${this.expectedSize} + Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#r=this.size,this.emit("size",this.size),this.#t=e,this.emit("integrity",e),r&&(this.#i=r,this.emit("verified",r))}},hh=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let a=this.source.match(s?XNt:ZNt);if(!a||s&&!l7.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,r){let s=ic(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(l7.includes(this.algorithm)&&this.digest.match(zNt)&&this.options.every(r=>r.match($Nt)))?"":`${this.algorithm}-${this.digest}${Db(this.options)}`}};function GQe(t,e,r,s){let a=t!=="",n=!1,c="",f=s.length-1;for(let h=0;hs[a].find(c=>n.digest===c.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[a]=s[a]}match(e,r){let s=ic(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||aOt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};wA.exports.parse=ic;function ic(t,e){if(!t)return null;if(typeof t=="string")return a7(t,e);if(t.algorithm&&t.digest){let r=new zm;return r[t.algorithm]=[t],a7(vb(r,e),e)}else return a7(vb(t,e),e)}function a7(t,e){if(e?.single)return new hh(t,e);let r=t.trim().split(/\s+/).reduce((s,a)=>{let n=new hh(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new zm);return r.isEmpty()?null:r}wA.exports.stringify=vb;function vb(t,e){return t.algorithm&&t.digest?hh.prototype.toString.call(t,e):typeof t=="string"?vb(ic(t,e),e):zm.prototype.toString.call(t,e)}wA.exports.fromHex=eOt;function eOt(t,e,r){let s=Db(r?.options);return ic(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}wA.exports.fromData=tOt;function tOt(t,e){let r=e?.algorithms||[...u7],s=Db(e?.options);return r.reduce((a,n)=>{let c=Sb.createHash(n).update(t).digest("base64"),f=new hh(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new zm)}wA.exports.fromStream=rOt;function rOt(t,e){let r=f7(e);return new Promise((s,a)=>{t.pipe(r),t.on("error",a),r.on("error",a);let n;r.on("integrity",c=>{n=c}),r.on("end",()=>s(n)),r.resume()})}wA.exports.checkData=nOt;function nOt(t,e,r){if(e=ic(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=e.pickAlgorithm(r),a=Sb.createHash(s).update(t).digest("base64"),n=ic({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size=="number"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}. + Wanted: ${r.size} + Found: ${t.length}`);throw f.code="EBADSIZE",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code="EINTEGRITY",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}wA.exports.checkStream=iOt;function iOt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=ic(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=f7(r);return new Promise((a,n)=>{t.pipe(s),t.on("error",n),s.on("error",n);let c;s.on("verified",f=>{c=f}),s.on("end",()=>a(c)),s.resume()})}wA.exports.integrityStream=f7;function f7(t=Object.create(null)){return new c7(t)}wA.exports.create=sOt;function sOt(t){let e=t?.algorithms||[...u7],r=Db(t?.options),s=e.map(Sb.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest("base64"),p=new hh(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new zm)}}}var oOt=Sb.getHashes(),WQe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>oOt.includes(t));function aOt(t,e){return WQe.indexOf(t.toLowerCase())>=WQe.indexOf(e.toLowerCase())?t:e}});var A7=L(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.Signature=dg.Envelope=void 0;dg.Envelope={fromJSON(t){return{payload:GN(t.payload)?Buffer.from(VQe(t.payload)):Buffer.alloc(0),payloadType:GN(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>dg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=KQe(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>dg.Signature.toJSON(r))),e}};dg.Signature={fromJSON(t){return{sig:GN(t.sig)?Buffer.from(VQe(t.sig)):Buffer.alloc(0),keyid:GN(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=KQe(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function VQe(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function KQe(t){return globalThis.Buffer.from(t).toString("base64")}function GN(t){return t!=null}});var zQe=L(WN=>{"use strict";Object.defineProperty(WN,"__esModule",{value:!0});WN.Timestamp=void 0;WN.Timestamp={fromJSON(t){return{seconds:JQe(t.seconds)?globalThis.String(t.seconds):"0",nanos:JQe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function JQe(t){return t!=null}});var Gw=L(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.TimeRange=_r.X509CertificateChain=_r.SubjectAlternativeName=_r.X509Certificate=_r.DistinguishedName=_r.ObjectIdentifierValuePair=_r.ObjectIdentifier=_r.PublicKeyIdentifier=_r.PublicKey=_r.RFC3161SignedTimestamp=_r.LogId=_r.MessageSignature=_r.HashOutput=_r.SubjectAlternativeNameType=_r.PublicKeyDetails=_r.HashAlgorithm=void 0;_r.hashAlgorithmFromJSON=XQe;_r.hashAlgorithmToJSON=$Qe;_r.publicKeyDetailsFromJSON=eTe;_r.publicKeyDetailsToJSON=tTe;_r.subjectAlternativeNameTypeFromJSON=rTe;_r.subjectAlternativeNameTypeToJSON=nTe;var lOt=zQe(),El;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SHA3_256",t[t.SHA3_384=5]="SHA3_384"})(El||(_r.HashAlgorithm=El={}));function XQe(t){switch(t){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return El.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return El.SHA2_256;case 2:case"SHA2_384":return El.SHA2_384;case 3:case"SHA2_512":return El.SHA2_512;case 4:case"SHA3_256":return El.SHA3_256;case 5:case"SHA3_384":return El.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}function $Qe(t){switch(t){case El.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case El.SHA2_256:return"SHA2_256";case El.SHA2_384:return"SHA2_384";case El.SHA2_512:return"SHA2_512";case El.SHA3_256:return"SHA3_256";case El.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}var rn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",t[t.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",t[t.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",t[t.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",t[t.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",t[t.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",t[t.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",t[t.PKIX_RSA_PSS_4096_SHA256=18]="PKIX_RSA_PSS_4096_SHA256",t[t.PKIX_ECDSA_P256_HMAC_SHA_256=6]="PKIX_ECDSA_P256_HMAC_SHA_256",t[t.PKIX_ECDSA_P256_SHA_256=5]="PKIX_ECDSA_P256_SHA_256",t[t.PKIX_ECDSA_P384_SHA_384=12]="PKIX_ECDSA_P384_SHA_384",t[t.PKIX_ECDSA_P521_SHA_512=13]="PKIX_ECDSA_P521_SHA_512",t[t.PKIX_ED25519=7]="PKIX_ED25519",t[t.PKIX_ED25519_PH=8]="PKIX_ED25519_PH",t[t.LMS_SHA256=14]="LMS_SHA256",t[t.LMOTS_SHA256=15]="LMOTS_SHA256"})(rn||(_r.PublicKeyDetails=rn={}));function eTe(t){switch(t){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return rn.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return rn.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return rn.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return rn.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return rn.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return rn.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return rn.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return rn.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return rn.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return rn.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return rn.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return rn.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return rn.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return rn.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return rn.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return rn.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return rn.PKIX_ED25519_PH;case 14:case"LMS_SHA256":return rn.LMS_SHA256;case 15:case"LMOTS_SHA256":return rn.LMOTS_SHA256;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}function tTe(t){switch(t){case rn.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case rn.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case rn.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case rn.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case rn.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case rn.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case rn.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case rn.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case rn.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case rn.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case rn.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case rn.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case rn.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case rn.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case rn.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case rn.PKIX_ED25519:return"PKIX_ED25519";case rn.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case rn.LMS_SHA256:return"LMS_SHA256";case rn.LMOTS_SHA256:return"LMOTS_SHA256";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum PublicKeyDetails")}}var BA;(function(t){t[t.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",t[t.EMAIL=1]="EMAIL",t[t.URI=2]="URI",t[t.OTHER_NAME=3]="OTHER_NAME"})(BA||(_r.SubjectAlternativeNameType=BA={}));function rTe(t){switch(t){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return BA.EMAIL;case 2:case"URI":return BA.URI;case 3:case"OTHER_NAME":return BA.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}function nTe(t){switch(t){case BA.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case BA.EMAIL:return"EMAIL";case BA.URI:return"URI";case BA.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum SubjectAlternativeNameType")}}_r.HashOutput={fromJSON(t){return{algorithm:ys(t.algorithm)?XQe(t.algorithm):0,digest:ys(t.digest)?Buffer.from(Zm(t.digest)):Buffer.alloc(0)}},toJSON(t){let e={};return t.algorithm!==0&&(e.algorithm=$Qe(t.algorithm)),t.digest.length!==0&&(e.digest=Xm(t.digest)),e}};_r.MessageSignature={fromJSON(t){return{messageDigest:ys(t.messageDigest)?_r.HashOutput.fromJSON(t.messageDigest):void 0,signature:ys(t.signature)?Buffer.from(Zm(t.signature)):Buffer.alloc(0)}},toJSON(t){let e={};return t.messageDigest!==void 0&&(e.messageDigest=_r.HashOutput.toJSON(t.messageDigest)),t.signature.length!==0&&(e.signature=Xm(t.signature)),e}};_r.LogId={fromJSON(t){return{keyId:ys(t.keyId)?Buffer.from(Zm(t.keyId)):Buffer.alloc(0)}},toJSON(t){let e={};return t.keyId.length!==0&&(e.keyId=Xm(t.keyId)),e}};_r.RFC3161SignedTimestamp={fromJSON(t){return{signedTimestamp:ys(t.signedTimestamp)?Buffer.from(Zm(t.signedTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedTimestamp.length!==0&&(e.signedTimestamp=Xm(t.signedTimestamp)),e}};_r.PublicKey={fromJSON(t){return{rawBytes:ys(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):void 0,keyDetails:ys(t.keyDetails)?eTe(t.keyDetails):0,validFor:ys(t.validFor)?_r.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.rawBytes!==void 0&&(e.rawBytes=Xm(t.rawBytes)),t.keyDetails!==0&&(e.keyDetails=tTe(t.keyDetails)),t.validFor!==void 0&&(e.validFor=_r.TimeRange.toJSON(t.validFor)),e}};_r.PublicKeyIdentifier={fromJSON(t){return{hint:ys(t.hint)?globalThis.String(t.hint):""}},toJSON(t){let e={};return t.hint!==""&&(e.hint=t.hint),e}};_r.ObjectIdentifier={fromJSON(t){return{id:globalThis.Array.isArray(t?.id)?t.id.map(e=>globalThis.Number(e)):[]}},toJSON(t){let e={};return t.id?.length&&(e.id=t.id.map(r=>Math.round(r))),e}};_r.ObjectIdentifierValuePair={fromJSON(t){return{oid:ys(t.oid)?_r.ObjectIdentifier.fromJSON(t.oid):void 0,value:ys(t.value)?Buffer.from(Zm(t.value)):Buffer.alloc(0)}},toJSON(t){let e={};return t.oid!==void 0&&(e.oid=_r.ObjectIdentifier.toJSON(t.oid)),t.value.length!==0&&(e.value=Xm(t.value)),e}};_r.DistinguishedName={fromJSON(t){return{organization:ys(t.organization)?globalThis.String(t.organization):"",commonName:ys(t.commonName)?globalThis.String(t.commonName):""}},toJSON(t){let e={};return t.organization!==""&&(e.organization=t.organization),t.commonName!==""&&(e.commonName=t.commonName),e}};_r.X509Certificate={fromJSON(t){return{rawBytes:ys(t.rawBytes)?Buffer.from(Zm(t.rawBytes)):Buffer.alloc(0)}},toJSON(t){let e={};return t.rawBytes.length!==0&&(e.rawBytes=Xm(t.rawBytes)),e}};_r.SubjectAlternativeName={fromJSON(t){return{type:ys(t.type)?rTe(t.type):0,identity:ys(t.regexp)?{$case:"regexp",regexp:globalThis.String(t.regexp)}:ys(t.value)?{$case:"value",value:globalThis.String(t.value)}:void 0}},toJSON(t){let e={};return t.type!==0&&(e.type=nTe(t.type)),t.identity?.$case==="regexp"?e.regexp=t.identity.regexp:t.identity?.$case==="value"&&(e.value=t.identity.value),e}};_r.X509CertificateChain={fromJSON(t){return{certificates:globalThis.Array.isArray(t?.certificates)?t.certificates.map(e=>_r.X509Certificate.fromJSON(e)):[]}},toJSON(t){let e={};return t.certificates?.length&&(e.certificates=t.certificates.map(r=>_r.X509Certificate.toJSON(r))),e}};_r.TimeRange={fromJSON(t){return{start:ys(t.start)?ZQe(t.start):void 0,end:ys(t.end)?ZQe(t.end):void 0}},toJSON(t){let e={};return t.start!==void 0&&(e.start=t.start.toISOString()),t.end!==void 0&&(e.end=t.end.toISOString()),e}};function Zm(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function Xm(t){return globalThis.Buffer.from(t).toString("base64")}function cOt(t){let e=(globalThis.Number(t.seconds)||0)*1e3;return e+=(t.nanos||0)/1e6,new globalThis.Date(e)}function ZQe(t){return t instanceof globalThis.Date?t:typeof t=="string"?new globalThis.Date(t):cOt(lOt.Timestamp.fromJSON(t))}function ys(t){return t!=null}});var p7=L(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.TransparencyLogEntry=Es.InclusionPromise=Es.InclusionProof=Es.Checkpoint=Es.KindVersion=void 0;var iTe=Gw();Es.KindVersion={fromJSON(t){return{kind:Fa(t.kind)?globalThis.String(t.kind):"",version:Fa(t.version)?globalThis.String(t.version):""}},toJSON(t){let e={};return t.kind!==""&&(e.kind=t.kind),t.version!==""&&(e.version=t.version),e}};Es.Checkpoint={fromJSON(t){return{envelope:Fa(t.envelope)?globalThis.String(t.envelope):""}},toJSON(t){let e={};return t.envelope!==""&&(e.envelope=t.envelope),e}};Es.InclusionProof={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):"0",rootHash:Fa(t.rootHash)?Buffer.from(YN(t.rootHash)):Buffer.alloc(0),treeSize:Fa(t.treeSize)?globalThis.String(t.treeSize):"0",hashes:globalThis.Array.isArray(t?.hashes)?t.hashes.map(e=>Buffer.from(YN(e))):[],checkpoint:Fa(t.checkpoint)?Es.Checkpoint.fromJSON(t.checkpoint):void 0}},toJSON(t){let e={};return t.logIndex!=="0"&&(e.logIndex=t.logIndex),t.rootHash.length!==0&&(e.rootHash=VN(t.rootHash)),t.treeSize!=="0"&&(e.treeSize=t.treeSize),t.hashes?.length&&(e.hashes=t.hashes.map(r=>VN(r))),t.checkpoint!==void 0&&(e.checkpoint=Es.Checkpoint.toJSON(t.checkpoint)),e}};Es.InclusionPromise={fromJSON(t){return{signedEntryTimestamp:Fa(t.signedEntryTimestamp)?Buffer.from(YN(t.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(t){let e={};return t.signedEntryTimestamp.length!==0&&(e.signedEntryTimestamp=VN(t.signedEntryTimestamp)),e}};Es.TransparencyLogEntry={fromJSON(t){return{logIndex:Fa(t.logIndex)?globalThis.String(t.logIndex):"0",logId:Fa(t.logId)?iTe.LogId.fromJSON(t.logId):void 0,kindVersion:Fa(t.kindVersion)?Es.KindVersion.fromJSON(t.kindVersion):void 0,integratedTime:Fa(t.integratedTime)?globalThis.String(t.integratedTime):"0",inclusionPromise:Fa(t.inclusionPromise)?Es.InclusionPromise.fromJSON(t.inclusionPromise):void 0,inclusionProof:Fa(t.inclusionProof)?Es.InclusionProof.fromJSON(t.inclusionProof):void 0,canonicalizedBody:Fa(t.canonicalizedBody)?Buffer.from(YN(t.canonicalizedBody)):Buffer.alloc(0)}},toJSON(t){let e={};return t.logIndex!=="0"&&(e.logIndex=t.logIndex),t.logId!==void 0&&(e.logId=iTe.LogId.toJSON(t.logId)),t.kindVersion!==void 0&&(e.kindVersion=Es.KindVersion.toJSON(t.kindVersion)),t.integratedTime!=="0"&&(e.integratedTime=t.integratedTime),t.inclusionPromise!==void 0&&(e.inclusionPromise=Es.InclusionPromise.toJSON(t.inclusionPromise)),t.inclusionProof!==void 0&&(e.inclusionProof=Es.InclusionProof.toJSON(t.inclusionProof)),t.canonicalizedBody.length!==0&&(e.canonicalizedBody=VN(t.canonicalizedBody)),e}};function YN(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function VN(t){return globalThis.Buffer.from(t).toString("base64")}function Fa(t){return t!=null}});var h7=L($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.Bundle=$c.VerificationMaterial=$c.TimestampVerificationData=void 0;var sTe=A7(),vA=Gw(),oTe=p7();$c.TimestampVerificationData={fromJSON(t){return{rfc3161Timestamps:globalThis.Array.isArray(t?.rfc3161Timestamps)?t.rfc3161Timestamps.map(e=>vA.RFC3161SignedTimestamp.fromJSON(e)):[]}},toJSON(t){let e={};return t.rfc3161Timestamps?.length&&(e.rfc3161Timestamps=t.rfc3161Timestamps.map(r=>vA.RFC3161SignedTimestamp.toJSON(r))),e}};$c.VerificationMaterial={fromJSON(t){return{content:mg(t.publicKey)?{$case:"publicKey",publicKey:vA.PublicKeyIdentifier.fromJSON(t.publicKey)}:mg(t.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:vA.X509CertificateChain.fromJSON(t.x509CertificateChain)}:mg(t.certificate)?{$case:"certificate",certificate:vA.X509Certificate.fromJSON(t.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(t?.tlogEntries)?t.tlogEntries.map(e=>oTe.TransparencyLogEntry.fromJSON(e)):[],timestampVerificationData:mg(t.timestampVerificationData)?$c.TimestampVerificationData.fromJSON(t.timestampVerificationData):void 0}},toJSON(t){let e={};return t.content?.$case==="publicKey"?e.publicKey=vA.PublicKeyIdentifier.toJSON(t.content.publicKey):t.content?.$case==="x509CertificateChain"?e.x509CertificateChain=vA.X509CertificateChain.toJSON(t.content.x509CertificateChain):t.content?.$case==="certificate"&&(e.certificate=vA.X509Certificate.toJSON(t.content.certificate)),t.tlogEntries?.length&&(e.tlogEntries=t.tlogEntries.map(r=>oTe.TransparencyLogEntry.toJSON(r))),t.timestampVerificationData!==void 0&&(e.timestampVerificationData=$c.TimestampVerificationData.toJSON(t.timestampVerificationData)),e}};$c.Bundle={fromJSON(t){return{mediaType:mg(t.mediaType)?globalThis.String(t.mediaType):"",verificationMaterial:mg(t.verificationMaterial)?$c.VerificationMaterial.fromJSON(t.verificationMaterial):void 0,content:mg(t.messageSignature)?{$case:"messageSignature",messageSignature:vA.MessageSignature.fromJSON(t.messageSignature)}:mg(t.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:sTe.Envelope.fromJSON(t.dsseEnvelope)}:void 0}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.verificationMaterial!==void 0&&(e.verificationMaterial=$c.VerificationMaterial.toJSON(t.verificationMaterial)),t.content?.$case==="messageSignature"?e.messageSignature=vA.MessageSignature.toJSON(t.content.messageSignature):t.content?.$case==="dsseEnvelope"&&(e.dsseEnvelope=sTe.Envelope.toJSON(t.content.dsseEnvelope)),e}};function mg(t){return t!=null}});var g7=L(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ClientTrustConfig=Fi.SigningConfig=Fi.TrustedRoot=Fi.CertificateAuthority=Fi.TransparencyLogInstance=void 0;var Il=Gw();Fi.TransparencyLogInstance={fromJSON(t){return{baseUrl:sa(t.baseUrl)?globalThis.String(t.baseUrl):"",hashAlgorithm:sa(t.hashAlgorithm)?(0,Il.hashAlgorithmFromJSON)(t.hashAlgorithm):0,publicKey:sa(t.publicKey)?Il.PublicKey.fromJSON(t.publicKey):void 0,logId:sa(t.logId)?Il.LogId.fromJSON(t.logId):void 0,checkpointKeyId:sa(t.checkpointKeyId)?Il.LogId.fromJSON(t.checkpointKeyId):void 0}},toJSON(t){let e={};return t.baseUrl!==""&&(e.baseUrl=t.baseUrl),t.hashAlgorithm!==0&&(e.hashAlgorithm=(0,Il.hashAlgorithmToJSON)(t.hashAlgorithm)),t.publicKey!==void 0&&(e.publicKey=Il.PublicKey.toJSON(t.publicKey)),t.logId!==void 0&&(e.logId=Il.LogId.toJSON(t.logId)),t.checkpointKeyId!==void 0&&(e.checkpointKeyId=Il.LogId.toJSON(t.checkpointKeyId)),e}};Fi.CertificateAuthority={fromJSON(t){return{subject:sa(t.subject)?Il.DistinguishedName.fromJSON(t.subject):void 0,uri:sa(t.uri)?globalThis.String(t.uri):"",certChain:sa(t.certChain)?Il.X509CertificateChain.fromJSON(t.certChain):void 0,validFor:sa(t.validFor)?Il.TimeRange.fromJSON(t.validFor):void 0}},toJSON(t){let e={};return t.subject!==void 0&&(e.subject=Il.DistinguishedName.toJSON(t.subject)),t.uri!==""&&(e.uri=t.uri),t.certChain!==void 0&&(e.certChain=Il.X509CertificateChain.toJSON(t.certChain)),t.validFor!==void 0&&(e.validFor=Il.TimeRange.toJSON(t.validFor)),e}};Fi.TrustedRoot={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",tlogs:globalThis.Array.isArray(t?.tlogs)?t.tlogs.map(e=>Fi.TransparencyLogInstance.fromJSON(e)):[],certificateAuthorities:globalThis.Array.isArray(t?.certificateAuthorities)?t.certificateAuthorities.map(e=>Fi.CertificateAuthority.fromJSON(e)):[],ctlogs:globalThis.Array.isArray(t?.ctlogs)?t.ctlogs.map(e=>Fi.TransparencyLogInstance.fromJSON(e)):[],timestampAuthorities:globalThis.Array.isArray(t?.timestampAuthorities)?t.timestampAuthorities.map(e=>Fi.CertificateAuthority.fromJSON(e)):[]}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.tlogs?.length&&(e.tlogs=t.tlogs.map(r=>Fi.TransparencyLogInstance.toJSON(r))),t.certificateAuthorities?.length&&(e.certificateAuthorities=t.certificateAuthorities.map(r=>Fi.CertificateAuthority.toJSON(r))),t.ctlogs?.length&&(e.ctlogs=t.ctlogs.map(r=>Fi.TransparencyLogInstance.toJSON(r))),t.timestampAuthorities?.length&&(e.timestampAuthorities=t.timestampAuthorities.map(r=>Fi.CertificateAuthority.toJSON(r))),e}};Fi.SigningConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",caUrl:sa(t.caUrl)?globalThis.String(t.caUrl):"",oidcUrl:sa(t.oidcUrl)?globalThis.String(t.oidcUrl):"",tlogUrls:globalThis.Array.isArray(t?.tlogUrls)?t.tlogUrls.map(e=>globalThis.String(e)):[],tsaUrls:globalThis.Array.isArray(t?.tsaUrls)?t.tsaUrls.map(e=>globalThis.String(e)):[]}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.caUrl!==""&&(e.caUrl=t.caUrl),t.oidcUrl!==""&&(e.oidcUrl=t.oidcUrl),t.tlogUrls?.length&&(e.tlogUrls=t.tlogUrls),t.tsaUrls?.length&&(e.tsaUrls=t.tsaUrls),e}};Fi.ClientTrustConfig={fromJSON(t){return{mediaType:sa(t.mediaType)?globalThis.String(t.mediaType):"",trustedRoot:sa(t.trustedRoot)?Fi.TrustedRoot.fromJSON(t.trustedRoot):void 0,signingConfig:sa(t.signingConfig)?Fi.SigningConfig.fromJSON(t.signingConfig):void 0}},toJSON(t){let e={};return t.mediaType!==""&&(e.mediaType=t.mediaType),t.trustedRoot!==void 0&&(e.trustedRoot=Fi.TrustedRoot.toJSON(t.trustedRoot)),t.signingConfig!==void 0&&(e.signingConfig=Fi.SigningConfig.toJSON(t.signingConfig)),e}};function sa(t){return t!=null}});var cTe=L(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Input=Vr.Artifact=Vr.ArtifactVerificationOptions_ObserverTimestampOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions=Vr.ArtifactVerificationOptions_CtlogOptions=Vr.ArtifactVerificationOptions_TlogOptions=Vr.ArtifactVerificationOptions=Vr.PublicKeyIdentities=Vr.CertificateIdentities=Vr.CertificateIdentity=void 0;var aTe=h7(),yg=Gw(),lTe=g7();Vr.CertificateIdentity={fromJSON(t){return{issuer:gi(t.issuer)?globalThis.String(t.issuer):"",san:gi(t.san)?yg.SubjectAlternativeName.fromJSON(t.san):void 0,oids:globalThis.Array.isArray(t?.oids)?t.oids.map(e=>yg.ObjectIdentifierValuePair.fromJSON(e)):[]}},toJSON(t){let e={};return t.issuer!==""&&(e.issuer=t.issuer),t.san!==void 0&&(e.san=yg.SubjectAlternativeName.toJSON(t.san)),t.oids?.length&&(e.oids=t.oids.map(r=>yg.ObjectIdentifierValuePair.toJSON(r))),e}};Vr.CertificateIdentities={fromJSON(t){return{identities:globalThis.Array.isArray(t?.identities)?t.identities.map(e=>Vr.CertificateIdentity.fromJSON(e)):[]}},toJSON(t){let e={};return t.identities?.length&&(e.identities=t.identities.map(r=>Vr.CertificateIdentity.toJSON(r))),e}};Vr.PublicKeyIdentities={fromJSON(t){return{publicKeys:globalThis.Array.isArray(t?.publicKeys)?t.publicKeys.map(e=>yg.PublicKey.fromJSON(e)):[]}},toJSON(t){let e={};return t.publicKeys?.length&&(e.publicKeys=t.publicKeys.map(r=>yg.PublicKey.toJSON(r))),e}};Vr.ArtifactVerificationOptions={fromJSON(t){return{signers:gi(t.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:Vr.CertificateIdentities.fromJSON(t.certificateIdentities)}:gi(t.publicKeys)?{$case:"publicKeys",publicKeys:Vr.PublicKeyIdentities.fromJSON(t.publicKeys)}:void 0,tlogOptions:gi(t.tlogOptions)?Vr.ArtifactVerificationOptions_TlogOptions.fromJSON(t.tlogOptions):void 0,ctlogOptions:gi(t.ctlogOptions)?Vr.ArtifactVerificationOptions_CtlogOptions.fromJSON(t.ctlogOptions):void 0,tsaOptions:gi(t.tsaOptions)?Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(t.tsaOptions):void 0,integratedTsOptions:gi(t.integratedTsOptions)?Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(t.integratedTsOptions):void 0,observerOptions:gi(t.observerOptions)?Vr.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(t.observerOptions):void 0}},toJSON(t){let e={};return t.signers?.$case==="certificateIdentities"?e.certificateIdentities=Vr.CertificateIdentities.toJSON(t.signers.certificateIdentities):t.signers?.$case==="publicKeys"&&(e.publicKeys=Vr.PublicKeyIdentities.toJSON(t.signers.publicKeys)),t.tlogOptions!==void 0&&(e.tlogOptions=Vr.ArtifactVerificationOptions_TlogOptions.toJSON(t.tlogOptions)),t.ctlogOptions!==void 0&&(e.ctlogOptions=Vr.ArtifactVerificationOptions_CtlogOptions.toJSON(t.ctlogOptions)),t.tsaOptions!==void 0&&(e.tsaOptions=Vr.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(t.tsaOptions)),t.integratedTsOptions!==void 0&&(e.integratedTsOptions=Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(t.integratedTsOptions)),t.observerOptions!==void 0&&(e.observerOptions=Vr.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(t.observerOptions)),e}};Vr.ArtifactVerificationOptions_TlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,performOnlineVerification:gi(t.performOnlineVerification)?globalThis.Boolean(t.performOnlineVerification):!1,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.performOnlineVerification!==!1&&(e.performOnlineVerification=t.performOnlineVerification),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_CtlogOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(t){return{threshold:gi(t.threshold)?globalThis.Number(t.threshold):0,disable:gi(t.disable)?globalThis.Boolean(t.disable):!1}},toJSON(t){let e={};return t.threshold!==0&&(e.threshold=Math.round(t.threshold)),t.disable!==!1&&(e.disable=t.disable),e}};Vr.Artifact={fromJSON(t){return{data:gi(t.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(t.artifactUri)}:gi(t.artifact)?{$case:"artifact",artifact:Buffer.from(uOt(t.artifact))}:gi(t.artifactDigest)?{$case:"artifactDigest",artifactDigest:yg.HashOutput.fromJSON(t.artifactDigest)}:void 0}},toJSON(t){let e={};return t.data?.$case==="artifactUri"?e.artifactUri=t.data.artifactUri:t.data?.$case==="artifact"?e.artifact=fOt(t.data.artifact):t.data?.$case==="artifactDigest"&&(e.artifactDigest=yg.HashOutput.toJSON(t.data.artifactDigest)),e}};Vr.Input={fromJSON(t){return{artifactTrustRoot:gi(t.artifactTrustRoot)?lTe.TrustedRoot.fromJSON(t.artifactTrustRoot):void 0,artifactVerificationOptions:gi(t.artifactVerificationOptions)?Vr.ArtifactVerificationOptions.fromJSON(t.artifactVerificationOptions):void 0,bundle:gi(t.bundle)?aTe.Bundle.fromJSON(t.bundle):void 0,artifact:gi(t.artifact)?Vr.Artifact.fromJSON(t.artifact):void 0}},toJSON(t){let e={};return t.artifactTrustRoot!==void 0&&(e.artifactTrustRoot=lTe.TrustedRoot.toJSON(t.artifactTrustRoot)),t.artifactVerificationOptions!==void 0&&(e.artifactVerificationOptions=Vr.ArtifactVerificationOptions.toJSON(t.artifactVerificationOptions)),t.bundle!==void 0&&(e.bundle=aTe.Bundle.toJSON(t.bundle)),t.artifact!==void 0&&(e.artifact=Vr.Artifact.toJSON(t.artifact)),e}};function uOt(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function fOt(t){return globalThis.Buffer.from(t).toString("base64")}function gi(t){return t!=null}});var bb=L(eu=>{"use strict";var AOt=eu&&eu.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Ww=eu&&eu.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&AOt(e,t,r)};Object.defineProperty(eu,"__esModule",{value:!0});Ww(A7(),eu);Ww(h7(),eu);Ww(Gw(),eu);Ww(p7(),eu);Ww(g7(),eu);Ww(cTe(),eu)});var KN=L(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.BUNDLE_V03_MEDIA_TYPE=Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE=Cl.BUNDLE_V02_MEDIA_TYPE=Cl.BUNDLE_V01_MEDIA_TYPE=void 0;Cl.isBundleWithCertificateChain=pOt;Cl.isBundleWithPublicKey=hOt;Cl.isBundleWithMessageSignature=gOt;Cl.isBundleWithDsseEnvelope=dOt;Cl.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1";Cl.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2";Cl.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3";Cl.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function pOt(t){return t.verificationMaterial.content.$case==="x509CertificateChain"}function hOt(t){return t.verificationMaterial.content.$case==="publicKey"}function gOt(t){return t.content.$case==="messageSignature"}function dOt(t){return t.content.$case==="dsseEnvelope"}});var fTe=L(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.toMessageSignatureBundle=yOt;zN.toDSSEBundle=EOt;var mOt=bb(),JN=KN();function yOt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:mOt.HashAlgorithm.SHA2_256,digest:t.digest},signature:t.signature}},verificationMaterial:uTe(t)}}function EOt(t){return{mediaType:t.certificateChain?JN.BUNDLE_V02_MEDIA_TYPE:JN.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:IOt(t)},verificationMaterial:uTe(t)}}function IOt(t){return{payloadType:t.artifactType,payload:t.artifact,signatures:[COt(t)]}}function COt(t){return{keyid:t.keyHint||"",sig:t.signature}}function uTe(t){return{content:wOt(t),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}function wOt(t){return t.certificate?t.certificateChain?{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:t.certificate}]}}:{$case:"certificate",certificate:{rawBytes:t.certificate}}:{$case:"publicKey",publicKey:{hint:t.keyHint||""}}}});var m7=L(ZN=>{"use strict";Object.defineProperty(ZN,"__esModule",{value:!0});ZN.ValidationError=void 0;var d7=class extends Error{constructor(e,r){super(e),this.fields=r}};ZN.ValidationError=d7});var y7=L($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.assertBundle=BOt;$m.assertBundleV01=ATe;$m.isBundleV01=vOt;$m.assertBundleV02=SOt;$m.assertBundleLatest=DOt;var XN=m7();function BOt(t){let e=$N(t);if(e.length>0)throw new XN.ValidationError("invalid bundle",e)}function ATe(t){let e=[];if(e.push(...$N(t)),e.push(...bOt(t)),e.length>0)throw new XN.ValidationError("invalid v0.1 bundle",e)}function vOt(t){try{return ATe(t),!0}catch{return!1}}function SOt(t){let e=[];if(e.push(...$N(t)),e.push(...pTe(t)),e.length>0)throw new XN.ValidationError("invalid v0.2 bundle",e)}function DOt(t){let e=[];if(e.push(...$N(t)),e.push(...pTe(t)),e.push(...POt(t)),e.length>0)throw new XN.ValidationError("invalid bundle",e)}function $N(t){let e=[];if((t.mediaType===void 0||!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!t.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/))&&e.push("mediaType"),t.content===void 0)e.push("content");else switch(t.content.$case){case"messageSignature":t.content.messageSignature.messageDigest===void 0?e.push("content.messageSignature.messageDigest"):t.content.messageSignature.messageDigest.digest.length===0&&e.push("content.messageSignature.messageDigest.digest"),t.content.messageSignature.signature.length===0&&e.push("content.messageSignature.signature");break;case"dsseEnvelope":t.content.dsseEnvelope.payload.length===0&&e.push("content.dsseEnvelope.payload"),t.content.dsseEnvelope.signatures.length!==1?e.push("content.dsseEnvelope.signatures"):t.content.dsseEnvelope.signatures[0].sig.length===0&&e.push("content.dsseEnvelope.signatures[0].sig");break}if(t.verificationMaterial===void 0)e.push("verificationMaterial");else{if(t.verificationMaterial.content===void 0)e.push("verificationMaterial.content");else switch(t.verificationMaterial.content.$case){case"x509CertificateChain":t.verificationMaterial.content.x509CertificateChain.certificates.length===0&&e.push("verificationMaterial.content.x509CertificateChain.certificates"),t.verificationMaterial.content.x509CertificateChain.certificates.forEach((r,s)=>{r.rawBytes.length===0&&e.push(`verificationMaterial.content.x509CertificateChain.certificates[${s}].rawBytes`)});break;case"certificate":t.verificationMaterial.content.certificate.rawBytes.length===0&&e.push("verificationMaterial.content.certificate.rawBytes");break}t.verificationMaterial.tlogEntries===void 0?e.push("verificationMaterial.tlogEntries"):t.verificationMaterial.tlogEntries.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.logId===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].logId`),r.kindVersion===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].kindVersion`)})}return e}function bOt(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionPromise===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionPromise`)}),e}function pTe(t){let e=[];return t.verificationMaterial&&t.verificationMaterial.tlogEntries?.length>0&&t.verificationMaterial.tlogEntries.forEach((r,s)=>{r.inclusionProof===void 0?e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof`):r.inclusionProof.checkpoint===void 0&&e.push(`verificationMaterial.tlogEntries[${s}].inclusionProof.checkpoint`)}),e}function POt(t){let e=[];return t.verificationMaterial?.content?.$case==="x509CertificateChain"&&e.push("verificationMaterial.content.$case"),e}});var gTe=L(SA=>{"use strict";Object.defineProperty(SA,"__esModule",{value:!0});SA.envelopeToJSON=SA.envelopeFromJSON=SA.bundleToJSON=SA.bundleFromJSON=void 0;var eO=bb(),hTe=KN(),E7=y7(),xOt=t=>{let e=eO.Bundle.fromJSON(t);switch(e.mediaType){case hTe.BUNDLE_V01_MEDIA_TYPE:(0,E7.assertBundleV01)(e);break;case hTe.BUNDLE_V02_MEDIA_TYPE:(0,E7.assertBundleV02)(e);break;default:(0,E7.assertBundleLatest)(e);break}return e};SA.bundleFromJSON=xOt;var kOt=t=>eO.Bundle.toJSON(t);SA.bundleToJSON=kOt;var QOt=t=>eO.Envelope.fromJSON(t);SA.envelopeFromJSON=QOt;var TOt=t=>eO.Envelope.toJSON(t);SA.envelopeToJSON=TOt});var xb=L(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.isBundleV01=Zr.assertBundleV02=Zr.assertBundleV01=Zr.assertBundleLatest=Zr.assertBundle=Zr.envelopeToJSON=Zr.envelopeFromJSON=Zr.bundleToJSON=Zr.bundleFromJSON=Zr.ValidationError=Zr.isBundleWithPublicKey=Zr.isBundleWithMessageSignature=Zr.isBundleWithDsseEnvelope=Zr.isBundleWithCertificateChain=Zr.BUNDLE_V03_MEDIA_TYPE=Zr.BUNDLE_V03_LEGACY_MEDIA_TYPE=Zr.BUNDLE_V02_MEDIA_TYPE=Zr.BUNDLE_V01_MEDIA_TYPE=Zr.toMessageSignatureBundle=Zr.toDSSEBundle=void 0;var dTe=fTe();Object.defineProperty(Zr,"toDSSEBundle",{enumerable:!0,get:function(){return dTe.toDSSEBundle}});Object.defineProperty(Zr,"toMessageSignatureBundle",{enumerable:!0,get:function(){return dTe.toMessageSignatureBundle}});var Eg=KN();Object.defineProperty(Zr,"BUNDLE_V01_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V01_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V02_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V02_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V03_LEGACY_MEDIA_TYPE}});Object.defineProperty(Zr,"BUNDLE_V03_MEDIA_TYPE",{enumerable:!0,get:function(){return Eg.BUNDLE_V03_MEDIA_TYPE}});Object.defineProperty(Zr,"isBundleWithCertificateChain",{enumerable:!0,get:function(){return Eg.isBundleWithCertificateChain}});Object.defineProperty(Zr,"isBundleWithDsseEnvelope",{enumerable:!0,get:function(){return Eg.isBundleWithDsseEnvelope}});Object.defineProperty(Zr,"isBundleWithMessageSignature",{enumerable:!0,get:function(){return Eg.isBundleWithMessageSignature}});Object.defineProperty(Zr,"isBundleWithPublicKey",{enumerable:!0,get:function(){return Eg.isBundleWithPublicKey}});var ROt=m7();Object.defineProperty(Zr,"ValidationError",{enumerable:!0,get:function(){return ROt.ValidationError}});var tO=gTe();Object.defineProperty(Zr,"bundleFromJSON",{enumerable:!0,get:function(){return tO.bundleFromJSON}});Object.defineProperty(Zr,"bundleToJSON",{enumerable:!0,get:function(){return tO.bundleToJSON}});Object.defineProperty(Zr,"envelopeFromJSON",{enumerable:!0,get:function(){return tO.envelopeFromJSON}});Object.defineProperty(Zr,"envelopeToJSON",{enumerable:!0,get:function(){return tO.envelopeToJSON}});var Pb=y7();Object.defineProperty(Zr,"assertBundle",{enumerable:!0,get:function(){return Pb.assertBundle}});Object.defineProperty(Zr,"assertBundleLatest",{enumerable:!0,get:function(){return Pb.assertBundleLatest}});Object.defineProperty(Zr,"assertBundleV01",{enumerable:!0,get:function(){return Pb.assertBundleV01}});Object.defineProperty(Zr,"assertBundleV02",{enumerable:!0,get:function(){return Pb.assertBundleV02}});Object.defineProperty(Zr,"isBundleV01",{enumerable:!0,get:function(){return Pb.isBundleV01}})});var kb=L(nO=>{"use strict";Object.defineProperty(nO,"__esModule",{value:!0});nO.ByteStream=void 0;var I7=class extends Error{},rO=class t{constructor(e){this.start=0,e?(this.buf=e,this.view=Buffer.from(e)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(e){this.start=e}slice(e,r){let s=e+r;if(s>this.length)throw new I7("request past end of buffer");return this.view.subarray(e,s)}appendChar(e){this.ensureCapacity(1),this.view[this.start]=e,this.start+=1}appendUint16(e){this.ensureCapacity(2);let r=new Uint16Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[1],this.view[this.start+1]=s[0],this.start+=2}appendUint24(e){this.ensureCapacity(3);let r=new Uint32Array([e]),s=new Uint8Array(r.buffer);this.view[this.start]=s[2],this.view[this.start+1]=s[1],this.view[this.start+2]=s[0],this.start+=3}appendView(e){this.ensureCapacity(e.length),this.view.set(e,this.start),this.start+=e.length}getBlock(e){if(e<=0)return Buffer.alloc(0);if(this.start+e>this.view.length)throw new Error("request past end of buffer");let r=this.view.subarray(this.start,this.start+e);return this.start+=e,r}getUint8(){return this.getBlock(1)[0]}getUint16(){let e=this.getBlock(2);return e[0]<<8|e[1]}ensureCapacity(e){if(this.start+e>this.view.byteLength){let r=t.BLOCK_SIZE+(e>t.BLOCK_SIZE?e:0);this.realloc(this.view.byteLength+r)}}realloc(e){let r=new ArrayBuffer(e),s=Buffer.from(r);s.set(this.view),this.buf=r,this.view=s}};nO.ByteStream=rO;rO.BLOCK_SIZE=1024});var iO=L(Yw=>{"use strict";Object.defineProperty(Yw,"__esModule",{value:!0});Yw.ASN1TypeError=Yw.ASN1ParseError=void 0;var C7=class extends Error{};Yw.ASN1ParseError=C7;var w7=class extends Error{};Yw.ASN1TypeError=w7});var yTe=L(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});sO.decodeLength=FOt;sO.encodeLength=NOt;var mTe=iO();function FOt(t){let e=t.getUint8();if(!(e&128))return e;let r=e&127;if(r>6)throw new mTe.ASN1ParseError("length exceeds 6 byte limit");let s=0;for(let a=0;a0n;)r.unshift(Number(e&255n)),e=e>>8n;return Buffer.from([128|r.length,...r])}});var ITe=L(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.parseInteger=MOt;Ig.parseStringASCII=ETe;Ig.parseTime=_Ot;Ig.parseOID=UOt;Ig.parseBoolean=HOt;Ig.parseBitString=jOt;var OOt=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/,LOt=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function MOt(t){let e=0,r=t.length,s=t[e],a=s>127,n=a?255:0;for(;s==n&&++e=50?1900:2e3,s[1]=a.toString()}return new Date(`${s[1]}-${s[2]}-${s[3]}T${s[4]}:${s[5]}:${s[6]}Z`)}function UOt(t){let e=0,r=t.length,s=t[e++],a=Math.floor(s/40),n=s%40,c=`${a}.${n}`,f=0;for(;e=f;--p)a.push(c>>p&1)}return a}});var wTe=L(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});oO.ASN1Tag=void 0;var CTe=iO(),ey={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},B7={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},v7=class{constructor(e){if(this.number=e&31,this.constructed=(e&32)===32,this.class=e>>6,this.number===31)throw new CTe.ASN1ParseError("long form tags not supported");if(this.class===B7.UNIVERSAL&&this.number===0)throw new CTe.ASN1ParseError("unsupported tag 0x00")}isUniversal(){return this.class===B7.UNIVERSAL}isContextSpecific(e){let r=this.class===B7.CONTEXT_SPECIFIC;return e!==void 0?r&&this.number===e:r}isBoolean(){return this.isUniversal()&&this.number===ey.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===ey.INTEGER}isBitString(){return this.isUniversal()&&this.number===ey.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===ey.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===ey.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===ey.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===ey.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};oO.ASN1Tag=v7});var DTe=L(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});lO.ASN1Obj=void 0;var S7=kb(),ty=iO(),vTe=yTe(),Vw=ITe(),qOt=wTe(),aO=class{constructor(e,r,s){this.tag=e,this.value=r,this.subs=s}static parseBuffer(e){return STe(new S7.ByteStream(e))}toDER(){let e=new S7.ByteStream;if(this.subs.length>0)for(let a of this.subs)e.appendView(a.toDER());else e.appendView(this.value);let r=e.buffer,s=new S7.ByteStream;return s.appendChar(this.tag.toDER()),s.appendView((0,vTe.encodeLength)(r.length)),s.appendView(r),s.buffer}toBoolean(){if(!this.tag.isBoolean())throw new ty.ASN1TypeError("not a boolean");return(0,Vw.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new ty.ASN1TypeError("not an integer");return(0,Vw.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new ty.ASN1TypeError("not an OID");return(0,Vw.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,Vw.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,Vw.parseTime)(this.value,!1);default:throw new ty.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString())throw new ty.ASN1TypeError("not a bit string");return(0,Vw.parseBitString)(this.value)}};lO.ASN1Obj=aO;function STe(t){let e=new qOt.ASN1Tag(t.getUint8()),r=(0,vTe.decodeLength)(t),s=t.slice(t.position,r),a=t.position,n=[];if(e.constructed)n=BTe(t,r);else if(e.isOctetString())try{n=BTe(t,r)}catch{}return n.length===0&&t.seek(a+r),new aO(e,s,n)}function BTe(t,e){let r=t.position+e;if(r>t.length)throw new ty.ASN1ParseError("invalid length");let s=[];for(;t.position{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});cO.ASN1Obj=void 0;var GOt=DTe();Object.defineProperty(cO,"ASN1Obj",{enumerable:!0,get:function(){return GOt.ASN1Obj}})});var Kw=L(Cg=>{"use strict";var WOt=Cg&&Cg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cg,"__esModule",{value:!0});Cg.createPublicKey=YOt;Cg.digest=VOt;Cg.verify=KOt;Cg.bufferEqual=JOt;var Qb=WOt(Ie("crypto"));function YOt(t,e="spki"){return typeof t=="string"?Qb.default.createPublicKey(t):Qb.default.createPublicKey({key:t,format:"der",type:e})}function VOt(t,...e){let r=Qb.default.createHash(t);for(let s of e)r.update(s);return r.digest()}function KOt(t,e,r,s){try{return Qb.default.verify(s,t,e,r)}catch{return!1}}function JOt(t,e){try{return Qb.default.timingSafeEqual(t,e)}catch{return!1}}});var bTe=L(D7=>{"use strict";Object.defineProperty(D7,"__esModule",{value:!0});D7.preAuthEncoding=ZOt;var zOt="DSSEv1";function ZOt(t,e){let r=[zOt,t.length,t,e.length,""].join(" ");return Buffer.concat([Buffer.from(r,"ascii"),e])}});var kTe=L(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});fO.base64Encode=XOt;fO.base64Decode=$Ot;var PTe="base64",xTe="utf-8";function XOt(t){return Buffer.from(t,xTe).toString(PTe)}function $Ot(t){return Buffer.from(t,PTe).toString(xTe)}});var QTe=L(P7=>{"use strict";Object.defineProperty(P7,"__esModule",{value:!0});P7.canonicalize=b7;function b7(t){let e="";if(t===null||typeof t!="object"||t.toJSON!=null)e+=JSON.stringify(t);else if(Array.isArray(t)){e+="[";let r=!0;t.forEach(s=>{r||(e+=","),r=!1,e+=b7(s)}),e+="]"}else{e+="{";let r=!0;Object.keys(t).sort().forEach(s=>{r||(e+=","),r=!1,e+=JSON.stringify(s),e+=":",e+=b7(t[s])}),e+="}"}return e}});var x7=L(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});AO.toDER=rLt;AO.fromDER=nLt;var eLt=/-----BEGIN (.*)-----/,tLt=/-----END (.*)-----/;function rLt(t){let e="";return t.split(` +`).forEach(r=>{r.match(eLt)||r.match(tLt)||(e+=r)}),Buffer.from(e,"base64")}function nLt(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(` +`).concat(` +`)}});var pO=L(Jw=>{"use strict";Object.defineProperty(Jw,"__esModule",{value:!0});Jw.SHA2_HASH_ALGOS=Jw.ECDSA_SIGNATURE_ALGOS=void 0;Jw.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Jw.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var Q7=L(hO=>{"use strict";Object.defineProperty(hO,"__esModule",{value:!0});hO.RFC3161TimestampVerificationError=void 0;var k7=class extends Error{};hO.RFC3161TimestampVerificationError=k7});var RTe=L(DA=>{"use strict";var iLt=DA&&DA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),sLt=DA&&DA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oLt=DA&&DA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&iLt(e,t,r);return sLt(e,t),e};Object.defineProperty(DA,"__esModule",{value:!0});DA.TSTInfo=void 0;var TTe=oLt(Kw()),aLt=pO(),lLt=Q7(),T7=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return aLt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=TTe.digest(this.messageImprintHashAlgorithm,e);if(!TTe.bufferEqual(r,this.messageImprintHashedMessage))throw new lLt.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};DA.TSTInfo=T7});var NTe=L(bA=>{"use strict";var cLt=bA&&bA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),uLt=bA&&bA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),fLt=bA&&bA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cLt(e,t,r);return uLt(e,t),e};Object.defineProperty(bA,"__esModule",{value:!0});bA.RFC3161Timestamp=void 0;var ALt=uO(),R7=fLt(Kw()),FTe=pO(),Tb=Q7(),pLt=RTe(),hLt="1.2.840.113549.1.7.2",gLt="1.2.840.113549.1.9.16.1.4",dLt="1.2.840.113549.1.9.4",F7=class t{constructor(e){this.root=e}static parse(e){let r=ALt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return FTe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return FTe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new pLt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Tb.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==hLt)throw new Tb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==gLt)throw new Tb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=R7.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!R7.bufferEqual(e,r))throw new Tb.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!R7.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Tb.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(r=>r.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(r=>r.subs[0].tag.isOID()&&r.subs[0].toOID()===dLt)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};bA.RFC3161Timestamp=F7});var OTe=L(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});gO.RFC3161Timestamp=void 0;var mLt=NTe();Object.defineProperty(gO,"RFC3161Timestamp",{enumerable:!0,get:function(){return mLt.RFC3161Timestamp}})});var MTe=L(PA=>{"use strict";var yLt=PA&&PA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),ELt=PA&&PA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ILt=PA&&PA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yLt(e,t,r);return ELt(e,t),e};Object.defineProperty(PA,"__esModule",{value:!0});PA.SignedCertificateTimestamp=void 0;var CLt=ILt(Kw()),LTe=kb(),N7=class t{constructor(e){this.version=e.version,this.logID=e.logID,this.timestamp=e.timestamp,this.extensions=e.extensions,this.hashAlgorithm=e.hashAlgorithm,this.signatureAlgorithm=e.signatureAlgorithm,this.signature=e.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return"none";case 1:return"md5";case 2:return"sha1";case 3:return"sha224";case 4:return"sha256";case 5:return"sha384";case 6:return"sha512";default:return"unknown"}}verify(e,r){let s=new LTe.ByteStream;return s.appendChar(this.version),s.appendChar(0),s.appendView(this.timestamp),s.appendUint16(1),s.appendView(e),s.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&s.appendView(this.extensions),CLt.verify(s.buffer,r,this.signature,this.algorithm)}static parse(e){let r=new LTe.ByteStream(e),s=r.getUint8(),a=r.getBlock(32),n=r.getBlock(8),c=r.getUint16(),f=r.getBlock(c),p=r.getUint8(),h=r.getUint8(),E=r.getUint16(),C=r.getBlock(E);if(r.position!==e.length)throw new Error("SCT buffer length mismatch");return new t({version:s,logID:a,timestamp:n,extensions:f,hashAlgorithm:p,signatureAlgorithm:h,signature:C})}};PA.SignedCertificateTimestamp=N7});var j7=L(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.X509SCTExtension=oa.X509SubjectKeyIDExtension=oa.X509AuthorityKeyIDExtension=oa.X509SubjectAlternativeNameExtension=oa.X509KeyUsageExtension=oa.X509BasicConstraintsExtension=oa.X509Extension=void 0;var wLt=kb(),BLt=MTe(),gh=class{constructor(e){this.root=e}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};oa.X509Extension=gh;var O7=class extends gh{get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};oa.X509BasicConstraintsExtension=O7;var L7=class extends gh{get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};oa.X509KeyUsageExtension=L7;var M7=class extends gh{get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(e){let r=this.findGeneralName(0);return r===void 0||r.subs[0].toOID()!==e?void 0:r.subs[1].subs[0].value.toString("ascii")}findGeneralName(e){return this.generalNames.find(r=>r.tag.isContextSpecific(e))}get generalNames(){return this.extnValueObj.subs[0].subs}};oa.X509SubjectAlternativeNameExtension=M7;var _7=class extends gh{get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(e){return this.sequence.subs.find(r=>r.tag.isContextSpecific(e))}get sequence(){return this.extnValueObj.subs[0]}};oa.X509AuthorityKeyIDExtension=_7;var U7=class extends gh{get keyIdentifier(){return this.extnValueObj.subs[0].value}};oa.X509SubjectKeyIDExtension=U7;var H7=class extends gh{constructor(e){super(e)}get signedCertificateTimestamps(){let e=this.extnValueObj.subs[0].value,r=new wLt.ByteStream(e),s=r.getUint16()+2,a=[];for(;r.position{"use strict";var vLt=sc&&sc.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),SLt=sc&&sc.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UTe=sc&&sc.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&vLt(e,t,r);return SLt(e,t),e};Object.defineProperty(sc,"__esModule",{value:!0});sc.X509Certificate=sc.EXTENSION_OID_SCT=void 0;var DLt=uO(),_Te=UTe(Kw()),bLt=pO(),PLt=UTe(x7()),ry=j7(),xLt="2.5.29.14",kLt="2.5.29.15",QLt="2.5.29.17",TLt="2.5.29.19",RLt="2.5.29.35";sc.EXTENSION_OID_SCT="1.3.6.1.4.1.11129.2.4.2";var q7=class t{constructor(e){this.root=e}static parse(e){let r=typeof e=="string"?PLt.toDER(e):e,s=DLt.ASN1Obj.parseBuffer(r);return new t(s)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return bLt.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let e=this.extSubjectAltName;return e?.uri||e?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let e=this.findExtension(kLt);return e?new ry.X509KeyUsageExtension(e):void 0}get extBasicConstraints(){let e=this.findExtension(TLt);return e?new ry.X509BasicConstraintsExtension(e):void 0}get extSubjectAltName(){let e=this.findExtension(QLt);return e?new ry.X509SubjectAlternativeNameExtension(e):void 0}get extAuthorityKeyID(){let e=this.findExtension(RLt);return e?new ry.X509AuthorityKeyIDExtension(e):void 0}get extSubjectKeyID(){let e=this.findExtension(xLt);return e?new ry.X509SubjectKeyIDExtension(e):void 0}get extSCT(){let e=this.findExtension(sc.EXTENSION_OID_SCT);return e?new ry.X509SCTExtension(e):void 0}get isCA(){let e=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?e&&this.extKeyUsage.keyCertSign:e}extension(e){let r=this.findExtension(e);return r?new ry.X509Extension(r):void 0}verify(e){let r=e?.publicKey||this.publicKey,s=_Te.createPublicKey(r);return _Te.verify(this.tbsCertificate.toDER(),s,this.signatureValue,this.signatureAlgorithm)}validForDate(e){return this.notBefore<=e&&e<=this.notAfter}equals(e){return this.root.toDER().equals(e.root.toDER())}clone(){let e=this.root.toDER(),r=Buffer.alloc(e.length);return e.copy(r),t.parse(r)}findExtension(e){return this.extensions.find(r=>r.subs[0].toOID()===e)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(e=>e.tag.isContextSpecific(3))}};sc.X509Certificate=q7});var qTe=L(wg=>{"use strict";Object.defineProperty(wg,"__esModule",{value:!0});wg.X509SCTExtension=wg.X509Certificate=wg.EXTENSION_OID_SCT=void 0;var jTe=HTe();Object.defineProperty(wg,"EXTENSION_OID_SCT",{enumerable:!0,get:function(){return jTe.EXTENSION_OID_SCT}});Object.defineProperty(wg,"X509Certificate",{enumerable:!0,get:function(){return jTe.X509Certificate}});var FLt=j7();Object.defineProperty(wg,"X509SCTExtension",{enumerable:!0,get:function(){return FLt.X509SCTExtension}})});var wl=L(Kn=>{"use strict";var NLt=Kn&&Kn.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),OLt=Kn&&Kn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rb=Kn&&Kn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&NLt(e,t,r);return OLt(e,t),e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.X509SCTExtension=Kn.X509Certificate=Kn.EXTENSION_OID_SCT=Kn.ByteStream=Kn.RFC3161Timestamp=Kn.pem=Kn.json=Kn.encoding=Kn.dsse=Kn.crypto=Kn.ASN1Obj=void 0;var LLt=uO();Object.defineProperty(Kn,"ASN1Obj",{enumerable:!0,get:function(){return LLt.ASN1Obj}});Kn.crypto=Rb(Kw());Kn.dsse=Rb(bTe());Kn.encoding=Rb(kTe());Kn.json=Rb(QTe());Kn.pem=Rb(x7());var MLt=OTe();Object.defineProperty(Kn,"RFC3161Timestamp",{enumerable:!0,get:function(){return MLt.RFC3161Timestamp}});var _Lt=kb();Object.defineProperty(Kn,"ByteStream",{enumerable:!0,get:function(){return _Lt.ByteStream}});var G7=qTe();Object.defineProperty(Kn,"EXTENSION_OID_SCT",{enumerable:!0,get:function(){return G7.EXTENSION_OID_SCT}});Object.defineProperty(Kn,"X509Certificate",{enumerable:!0,get:function(){return G7.X509Certificate}});Object.defineProperty(Kn,"X509SCTExtension",{enumerable:!0,get:function(){return G7.X509SCTExtension}})});var GTe=L(W7=>{"use strict";Object.defineProperty(W7,"__esModule",{value:!0});W7.extractJWTSubject=HLt;var ULt=wl();function HLt(t){let e=t.split(".",3),r=JSON.parse(ULt.encoding.base64Decode(e[1]));switch(r.iss){case"https://accounts.google.com":case"https://oauth2.sigstore.dev/auth":return r.email;default:return r.sub}}});var WTe=L((NIr,jLt)=>{jLt.exports={name:"@sigstore/sign",version:"3.1.0",description:"Sigstore signing library",main:"dist/index.js",types:"dist/index.d.ts",scripts:{clean:"shx rm -rf dist *.tsbuildinfo",build:"tsc --build",test:"jest"},files:["dist"],author:"bdehamer@github.com",license:"Apache-2.0",repository:{type:"git",url:"git+https://github.com/sigstore/sigstore-js.git"},bugs:{url:"https://github.com/sigstore/sigstore-js/issues"},homepage:"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme",publishConfig:{provenance:!0},devDependencies:{"@sigstore/jest":"^0.0.0","@sigstore/mock":"^0.10.0","@sigstore/rekor-types":"^3.0.0","@types/make-fetch-happen":"^10.0.4","@types/promise-retry":"^1.1.6"},dependencies:{"@sigstore/bundle":"^3.1.0","@sigstore/core":"^2.0.0","@sigstore/protobuf-specs":"^0.4.0","make-fetch-happen":"^14.0.2","proc-log":"^5.0.0","promise-retry":"^2.0.1"},engines:{node:"^18.17.0 || >=20.5.0"}}});var VTe=L(zw=>{"use strict";var qLt=zw&&zw.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zw,"__esModule",{value:!0});zw.getUserAgent=void 0;var YTe=qLt(Ie("os")),GLt=()=>{let t=WTe().version,e=process.version,r=YTe.default.platform(),s=YTe.default.arch();return`sigstore-js/${t} (Node ${e}) (${r}/${s})`};zw.getUserAgent=GLt});var Bg=L(Ji=>{"use strict";var WLt=Ji&&Ji.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),YLt=Ji&&Ji.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KTe=Ji&&Ji.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});dO.BaseBundleBuilder=void 0;var Y7=class{constructor(e){this.signer=e.signer,this.witnesses=e.witnesses}async create(e){let r=await this.prepare(e).then(f=>this.signer.sign(f)),s=await this.package(e,r),a=await Promise.all(this.witnesses.map(f=>f.testify(s.content,VLt(r.key)))),n=[],c=[];return a.forEach(({tlogEntries:f,rfc3161Timestamps:p})=>{n.push(...f??[]),c.push(...p??[])}),s.verificationMaterial.tlogEntries=n,s.verificationMaterial.timestampVerificationData={rfc3161Timestamps:c},s}async prepare(e){return e.data}};dO.BaseBundleBuilder=Y7;function VLt(t){switch(t.$case){case"publicKey":return t.publicKey;case"x509Certificate":return t.certificate}}});var J7=L(xA=>{"use strict";var KLt=xA&&xA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),JLt=xA&&xA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zLt=xA&&xA.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;a{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});mO.DSSEBundleBuilder=void 0;var $Lt=Bg(),eMt=V7(),tMt=J7(),z7=class extends eMt.BaseBundleBuilder{constructor(e){super(e),this.certificateChain=e.certificateChain??!1}async prepare(e){let r=zTe(e);return $Lt.dsse.preAuthEncoding(r.type,r.data)}async package(e,r){return(0,tMt.toDSSEBundle)(zTe(e),r,this.certificateChain)}};mO.DSSEBundleBuilder=z7;function zTe(t){return{...t,type:t.type??""}}});var XTe=L(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});yO.MessageSignatureBundleBuilder=void 0;var rMt=V7(),nMt=J7(),Z7=class extends rMt.BaseBundleBuilder{constructor(e){super(e)}async package(e,r){return(0,nMt.toMessageSignatureBundle)(e,r)}};yO.MessageSignatureBundleBuilder=Z7});var $Te=L(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});Zw.MessageSignatureBundleBuilder=Zw.DSSEBundleBuilder=void 0;var iMt=ZTe();Object.defineProperty(Zw,"DSSEBundleBuilder",{enumerable:!0,get:function(){return iMt.DSSEBundleBuilder}});var sMt=XTe();Object.defineProperty(Zw,"MessageSignatureBundleBuilder",{enumerable:!0,get:function(){return sMt.MessageSignatureBundleBuilder}})});var IO=L(EO=>{"use strict";Object.defineProperty(EO,"__esModule",{value:!0});EO.HTTPError=void 0;var X7=class extends Error{constructor({status:e,message:r,location:s}){super(`(${e}) ${r}`),this.statusCode=e,this.location=s}};EO.HTTPError=X7});var Xw=L(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});Nb.InternalError=void 0;Nb.internalError=aMt;var oMt=IO(),CO=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.name=this.constructor.name,this.cause=s,this.code=e}};Nb.InternalError=CO;function aMt(t,e,r){throw t instanceof oMt.HTTPError&&(r+=` - ${t.message}`),new CO({code:e,message:r,cause:t})}});var wO=L((WIr,eRe)=>{eRe.exports=fetch});var tRe=L($w=>{"use strict";var lMt=$w&&$w.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($w,"__esModule",{value:!0});$w.CIContextProvider=void 0;var cMt=lMt(wO()),uMt=[fMt,AMt],$7=class{constructor(e="sigstore"){this.audience=e}async getToken(){return Promise.any(uMt.map(e=>e(this.audience))).catch(()=>Promise.reject("CI: no tokens available"))}};$w.CIContextProvider=$7;async function fMt(t){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject("no token available");let e=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return e.searchParams.append("audience",t),(await(0,cMt.default)(e.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(s=>s.value)}async function AMt(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject("no token available")}});var rRe=L(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});BO.CIContextProvider=void 0;var pMt=tRe();Object.defineProperty(BO,"CIContextProvider",{enumerable:!0,get:function(){return pMt.CIContextProvider}})});var iRe=L((KIr,nRe)=>{var hMt=Symbol("proc-log.meta");nRe.exports={META:hMt,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:function(...t){return process.emit("output","standard",...t)},error:function(...t){return process.emit("output","error",...t)},buffer:function(...t){return process.emit("output","buffer",...t)},flush:function(...t){return process.emit("output","flush",...t)}},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:function(...t){return process.emit("log","error",...t)},notice:function(...t){return process.emit("log","notice",...t)},warn:function(...t){return process.emit("log","warn",...t)},info:function(...t){return process.emit("log","info",...t)},verbose:function(...t){return process.emit("log","verbose",...t)},http:function(...t){return process.emit("log","http",...t)},silly:function(...t){return process.emit("log","silly",...t)},timing:function(...t){return process.emit("log","timing",...t)},pause:function(){return process.emit("log","pause")},resume:function(){return process.emit("log","resume")}},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:function(t,e){process.emit("time","start",t);function r(){return process.emit("time","end",t)}if(typeof e=="function"){let s=e();return s&&s.finally?s.finally(r):(r(),s)}return r},end:function(t){return process.emit("time","end",t)}},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:function(t){process.emit("input","start");function e(){return process.emit("input","end")}if(typeof t=="function"){let r=t();return r&&r.finally?r.finally(e):(e(),r)}return e},end:function(){return process.emit("input","end")},read:function(...t){let e,r,s=new Promise((a,n)=>{e=a,r=n});return process.emit("input","read",e,r,...t),s}}}});var aRe=L((JIr,oRe)=>{"use strict";function sRe(t,e){for(let r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}function gMt(t,e,r){if(!t||typeof t=="string")throw new TypeError("Please pass an Error to err-code");r||(r={}),typeof e=="object"&&(r=e,e=void 0),e!=null&&(r.code=e);try{return sRe(t,r)}catch{r.message=t.message,r.stack=t.stack;let a=function(){};return a.prototype=Object.create(Object.getPrototypeOf(t)),sRe(new a,r)}}oRe.exports=gMt});var cRe=L((zIr,lRe)=>{function tu(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}lRe.exports=tu;tu.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};tu.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};tu.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var s=this,a=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},r);return this._options.unref&&a.unref(),!0};tu.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};tu.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};tu.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};tu.prototype.start=tu.prototype.try;tu.prototype.errors=function(){return this._errors};tu.prototype.attempts=function(){return this._attempts};tu.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,s=0;s=r&&(e=a,r=c)}return e}});var uRe=L(ny=>{var dMt=cRe();ny.operation=function(t){var e=ny.timeouts(t);return new dMt(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};ny.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],a=0;a{fRe.exports=uRe()});var gRe=L(($Ir,hRe)=>{"use strict";var mMt=aRe(),yMt=ARe(),EMt=Object.prototype.hasOwnProperty;function pRe(t){return t&&t.code==="EPROMISERETRY"&&EMt.call(t,"retried")}function IMt(t,e){var r,s;return typeof t=="object"&&typeof e=="function"&&(r=e,e=t,t=r),s=yMt.operation(e),new Promise(function(a,n){s.attempt(function(c){Promise.resolve().then(function(){return t(function(f){throw pRe(f)&&(f=f.retried),mMt(new Error("Retrying"),"EPROMISERETRY",{retried:f})},c)}).then(a,function(f){pRe(f)&&(f=f.retried,s.retry(f||new Error))||n(f)})})})}hRe.exports=IMt});var vO=L(Ob=>{"use strict";var mRe=Ob&&Ob.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ob,"__esModule",{value:!0});Ob.fetchWithRetry=TMt;var CMt=Ie("http2"),wMt=mRe(wO()),dRe=iRe(),BMt=mRe(gRe()),vMt=Bg(),SMt=IO(),{HTTP2_HEADER_LOCATION:DMt,HTTP2_HEADER_CONTENT_TYPE:bMt,HTTP2_HEADER_USER_AGENT:PMt,HTTP_STATUS_INTERNAL_SERVER_ERROR:xMt,HTTP_STATUS_TOO_MANY_REQUESTS:kMt,HTTP_STATUS_REQUEST_TIMEOUT:QMt}=CMt.constants;async function TMt(t,e){return(0,BMt.default)(async(r,s)=>{let a=e.method||"POST",n={[PMt]:vMt.ua.getUserAgent(),...e.headers},c=await(0,wMt.default)(t,{method:a,headers:n,body:e.body,timeout:e.timeout,retry:!1}).catch(f=>(dRe.log.http("fetch",`${a} ${t} attempt ${s} failed with ${f}`),r(f)));if(c.ok)return c;{let f=await RMt(c);if(dRe.log.http("fetch",`${a} ${t} attempt ${s} failed with ${c.status}`),FMt(c.status))return r(f);throw f}},NMt(e.retry))}var RMt=async t=>{let e=t.statusText,r=t.headers.get(DMt)||void 0;if(t.headers.get(bMt)?.includes("application/json"))try{e=(await t.json()).message||e}catch{}return new SMt.HTTPError({status:t.status,message:e,location:r})},FMt=t=>[QMt,kMt].includes(t)||t>=xMt,NMt=t=>typeof t=="boolean"?{retries:t?1:0}:typeof t=="number"?{retries:t}:{retries:0,...t}});var yRe=L(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});SO.Fulcio=void 0;var OMt=vO(),eK=class{constructor(e){this.options=e}async createSigningCertificate(e){let{baseURL:r,retry:s,timeout:a}=this.options,n=`${r}/api/v2/signingCert`;return(await(0,OMt.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:a,retry:s})).json()}};SO.Fulcio=eK});var ERe=L(DO=>{"use strict";Object.defineProperty(DO,"__esModule",{value:!0});DO.CAClient=void 0;var LMt=Xw(),MMt=yRe(),tK=class{constructor(e){this.fulcio=new MMt.Fulcio({baseURL:e.fulcioBaseURL,retry:e.retry,timeout:e.timeout})}async createSigningCertificate(e,r,s){let a=_Mt(e,r,s);try{let n=await this.fulcio.createSigningCertificate(a);return(n.signedCertificateEmbeddedSct?n.signedCertificateEmbeddedSct:n.signedCertificateDetachedSct).chain.certificates}catch(n){(0,LMt.internalError)(n,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}};DO.CAClient=tK;function _Mt(t,e,r){return{credentials:{oidcIdentityToken:t},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:e},proofOfPossession:r.toString("base64")}}}});var CRe=L(e1=>{"use strict";var UMt=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,"__esModule",{value:!0});e1.EphemeralSigner=void 0;var IRe=UMt(Ie("crypto")),HMt="ec",jMt="P-256",rK=class{constructor(){this.keypair=IRe.default.generateKeyPairSync(HMt,{namedCurve:jMt})}async sign(e){let r=IRe.default.sign(null,e,this.keypair.privateKey),s=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:r,key:{$case:"publicKey",publicKey:s}}}};e1.EphemeralSigner=rK});var wRe=L(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.FulcioSigner=iy.DEFAULT_FULCIO_URL=void 0;var nK=Xw(),qMt=Bg(),GMt=ERe(),WMt=CRe();iy.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";var iK=class{constructor(e){this.ca=new GMt.CAClient({...e,fulcioBaseURL:e.fulcioBaseURL||iy.DEFAULT_FULCIO_URL}),this.identityProvider=e.identityProvider,this.keyHolder=e.keyHolder||new WMt.EphemeralSigner}async sign(e){let r=await this.getIdentityToken(),s;try{s=qMt.oidc.extractJWTSubject(r)}catch(f){throw new nK.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${r}`,cause:f})}let a=await this.keyHolder.sign(Buffer.from(s));if(a.key.$case!=="publicKey")throw new nK.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"});let n=await this.ca.createSigningCertificate(r,a.key.publicKey,a.signature);return{signature:(await this.keyHolder.sign(e)).signature,key:{$case:"x509Certificate",certificate:n[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(e){throw new nK.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:e})}}};iy.FulcioSigner=iK});var vRe=L(t1=>{"use strict";Object.defineProperty(t1,"__esModule",{value:!0});t1.FulcioSigner=t1.DEFAULT_FULCIO_URL=void 0;var BRe=wRe();Object.defineProperty(t1,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return BRe.DEFAULT_FULCIO_URL}});Object.defineProperty(t1,"FulcioSigner",{enumerable:!0,get:function(){return BRe.FulcioSigner}})});var bRe=L(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});bO.Rekor=void 0;var SRe=vO(),sK=class{constructor(e){this.options=e}async createEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries`,f=await(await(0,SRe.fetchWithRetry)(n,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(e),timeout:s,retry:a})).json();return DRe(f)}async getEntry(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/log/entries/${e}`,f=await(await(0,SRe.fetchWithRetry)(n,{method:"GET",headers:{Accept:"application/json"},timeout:s,retry:a})).json();return DRe(f)}};bO.Rekor=sK;function DRe(t){let e=Object.entries(t);if(e.length!=1)throw new Error("Received multiple entries in Rekor response");let[r,s]=e[0];return{...s,uuid:r}}});var xRe=L(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});PO.TLogClient=void 0;var PRe=Xw(),YMt=IO(),VMt=bRe(),oK=class{constructor(e){this.fetchOnConflict=e.fetchOnConflict??!1,this.rekor=new VMt.Rekor({baseURL:e.rekorBaseURL,retry:e.retry,timeout:e.timeout})}async createEntry(e){let r;try{r=await this.rekor.createEntry(e)}catch(s){if(KMt(s)&&this.fetchOnConflict){let a=s.location.split("/").pop()||"";try{r=await this.rekor.getEntry(a)}catch(n){(0,PRe.internalError)(n,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else(0,PRe.internalError)(s,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return r}};PO.TLogClient=oK;function KMt(t){return t instanceof YMt.HTTPError&&t.statusCode===409&&t.location!==void 0}});var kRe=L(aK=>{"use strict";Object.defineProperty(aK,"__esModule",{value:!0});aK.toProposedEntry=zMt;var JMt=xb(),vg=Bg(),Lb="sha256";function zMt(t,e,r="dsse"){switch(t.$case){case"dsseEnvelope":return r==="intoto"?$Mt(t.dsseEnvelope,e):XMt(t.dsseEnvelope,e);case"messageSignature":return ZMt(t.messageSignature,e)}}function ZMt(t,e){let r=t.messageDigest.digest.toString("hex"),s=t.signature.toString("base64"),a=vg.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:Lb,value:r}},signature:{content:s,publicKey:{content:a}}}}}function XMt(t,e){let r=JSON.stringify((0,JMt.envelopeToJSON)(t)),s=vg.encoding.base64Encode(e);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:r,verifiers:[s]}}}}function $Mt(t,e){let r=vg.crypto.digest(Lb,t.payload).toString("hex"),s=e_t(t,e),a=vg.encoding.base64Encode(t.payload.toString("base64")),n=vg.encoding.base64Encode(t.signatures[0].sig.toString("base64")),c=t.signatures[0].keyid,f=vg.encoding.base64Encode(e),p={payloadType:t.payloadType,payload:a,signatures:[{sig:n,publicKey:f}]};return c.length>0&&(p.signatures[0].keyid=c),{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:p,hash:{algorithm:Lb,value:s},payloadHash:{algorithm:Lb,value:r}}}}}function e_t(t,e){let r={payloadType:t.payloadType,payload:t.payload.toString("base64"),signatures:[{sig:t.signatures[0].sig.toString("base64"),publicKey:e}]};return t.signatures[0].keyid.length>0&&(r.signatures[0].keyid=t.signatures[0].keyid),vg.crypto.digest(Lb,vg.json.canonicalize(r)).toString("hex")}});var QRe=L(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.RekorWitness=sy.DEFAULT_REKOR_URL=void 0;var t_t=Bg(),r_t=xRe(),n_t=kRe();sy.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";var lK=class{constructor(e){this.entryType=e.entryType,this.tlog=new r_t.TLogClient({...e,rekorBaseURL:e.rekorBaseURL||sy.DEFAULT_REKOR_URL})}async testify(e,r){let s=(0,n_t.toProposedEntry)(e,r,this.entryType),a=await this.tlog.createEntry(s);return i_t(a)}};sy.RekorWitness=lK;function i_t(t){let e=Buffer.from(t.logID,"hex"),r=t_t.encoding.base64Decode(t.body),s=JSON.parse(r),a=t?.verification?.signedEntryTimestamp?s_t(t.verification.signedEntryTimestamp):void 0,n=t?.verification?.inclusionProof?o_t(t.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:t.logIndex.toString(),logId:{keyId:e},integratedTime:t.integratedTime.toString(),kindVersion:{kind:s.kind,version:s.apiVersion},inclusionPromise:a,inclusionProof:n,canonicalizedBody:Buffer.from(t.body,"base64")}]}}function s_t(t){return{signedEntryTimestamp:Buffer.from(t,"base64")}}function o_t(t){return{logIndex:t.logIndex.toString(),treeSize:t.treeSize.toString(),rootHash:Buffer.from(t.rootHash,"hex"),hashes:t.hashes.map(e=>Buffer.from(e,"hex")),checkpoint:{envelope:t.checkpoint}}}});var TRe=L(xO=>{"use strict";Object.defineProperty(xO,"__esModule",{value:!0});xO.TimestampAuthority=void 0;var a_t=vO(),cK=class{constructor(e){this.options=e}async createTimestamp(e){let{baseURL:r,timeout:s,retry:a}=this.options,n=`${r}/api/v1/timestamp`;return(await(0,a_t.fetchWithRetry)(n,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),timeout:s,retry:a})).buffer()}};xO.TimestampAuthority=cK});var FRe=L(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});kO.TSAClient=void 0;var l_t=Xw(),c_t=TRe(),u_t=Bg(),RRe="sha256",uK=class{constructor(e){this.tsa=new c_t.TimestampAuthority({baseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async createTimestamp(e){let r={artifactHash:u_t.crypto.digest(RRe,e).toString("base64"),hashAlgorithm:RRe};try{return await this.tsa.createTimestamp(r)}catch(s){(0,l_t.internalError)(s,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}};kO.TSAClient=uK});var NRe=L(QO=>{"use strict";Object.defineProperty(QO,"__esModule",{value:!0});QO.TSAWitness=void 0;var f_t=FRe(),fK=class{constructor(e){this.tsa=new f_t.TSAClient({tsaBaseURL:e.tsaBaseURL,retry:e.retry,timeout:e.timeout})}async testify(e){let r=A_t(e);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(r)}]}}};QO.TSAWitness=fK;function A_t(t){switch(t.$case){case"dsseEnvelope":return t.dsseEnvelope.signatures[0].sig;case"messageSignature":return t.messageSignature.signature}}});var LRe=L(Sg=>{"use strict";Object.defineProperty(Sg,"__esModule",{value:!0});Sg.TSAWitness=Sg.RekorWitness=Sg.DEFAULT_REKOR_URL=void 0;var ORe=QRe();Object.defineProperty(Sg,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return ORe.DEFAULT_REKOR_URL}});Object.defineProperty(Sg,"RekorWitness",{enumerable:!0,get:function(){return ORe.RekorWitness}});var p_t=NRe();Object.defineProperty(Sg,"TSAWitness",{enumerable:!0,get:function(){return p_t.TSAWitness}})});var pK=L(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.TSAWitness=Is.RekorWitness=Is.DEFAULT_REKOR_URL=Is.FulcioSigner=Is.DEFAULT_FULCIO_URL=Is.CIContextProvider=Is.InternalError=Is.MessageSignatureBundleBuilder=Is.DSSEBundleBuilder=void 0;var MRe=$Te();Object.defineProperty(Is,"DSSEBundleBuilder",{enumerable:!0,get:function(){return MRe.DSSEBundleBuilder}});Object.defineProperty(Is,"MessageSignatureBundleBuilder",{enumerable:!0,get:function(){return MRe.MessageSignatureBundleBuilder}});var h_t=Xw();Object.defineProperty(Is,"InternalError",{enumerable:!0,get:function(){return h_t.InternalError}});var g_t=rRe();Object.defineProperty(Is,"CIContextProvider",{enumerable:!0,get:function(){return g_t.CIContextProvider}});var _Re=vRe();Object.defineProperty(Is,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return _Re.DEFAULT_FULCIO_URL}});Object.defineProperty(Is,"FulcioSigner",{enumerable:!0,get:function(){return _Re.FulcioSigner}});var AK=LRe();Object.defineProperty(Is,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return AK.DEFAULT_REKOR_URL}});Object.defineProperty(Is,"RekorWitness",{enumerable:!0,get:function(){return AK.RekorWitness}});Object.defineProperty(Is,"TSAWitness",{enumerable:!0,get:function(){return AK.TSAWitness}})});var HRe=L(Mb=>{"use strict";var URe=Mb&&Mb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mb,"__esModule",{value:!0});Mb.appDataPath=m_t;var d_t=URe(Ie("os")),r1=URe(Ie("path"));function m_t(t){let e=d_t.default.homedir();switch(process.platform){case"darwin":{let r=r1.default.join(e,"Library","Application Support");return r1.default.join(r,t)}case"win32":{let r=process.env.LOCALAPPDATA||r1.default.join(e,"AppData","Local");return r1.default.join(r,t,"Data")}default:{let r=process.env.XDG_DATA_HOME||r1.default.join(e,".local","share");return r1.default.join(r,t)}}}});var kA=L(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.UnsupportedAlgorithmError=Bl.CryptoError=Bl.LengthOrHashMismatchError=Bl.UnsignedMetadataError=Bl.RepositoryError=Bl.ValueError=void 0;var hK=class extends Error{};Bl.ValueError=hK;var _b=class extends Error{};Bl.RepositoryError=_b;var gK=class extends _b{};Bl.UnsignedMetadataError=gK;var dK=class extends _b{};Bl.LengthOrHashMismatchError=dK;var TO=class extends Error{};Bl.CryptoError=TO;var mK=class extends TO{};Bl.UnsupportedAlgorithmError=mK});var qRe=L(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});Dg.isDefined=y_t;Dg.isObject=jRe;Dg.isStringArray=E_t;Dg.isObjectArray=I_t;Dg.isStringRecord=C_t;Dg.isObjectRecord=w_t;function y_t(t){return t!==void 0}function jRe(t){return typeof t=="object"&&t!==null}function E_t(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")}function I_t(t){return Array.isArray(t)&&t.every(jRe)}function C_t(t){return typeof t=="object"&&t!==null&&Object.keys(t).every(e=>typeof e=="string")&&Object.values(t).every(e=>typeof e=="string")}function w_t(t){return typeof t=="object"&&t!==null&&Object.keys(t).every(e=>typeof e=="string")&&Object.values(t).every(e=>typeof e=="object"&&e!==null)}});var EK=L((yCr,YRe)=>{var GRe=",",B_t=":",v_t="[",S_t="]",D_t="{",b_t="}";function yK(t){let e=[];if(typeof t=="string")e.push(WRe(t));else if(typeof t=="boolean")e.push(JSON.stringify(t));else if(Number.isInteger(t))e.push(JSON.stringify(t));else if(t===null)e.push(JSON.stringify(t));else if(Array.isArray(t)){e.push(v_t);let r=!0;t.forEach(s=>{r||e.push(GRe),r=!1,e.push(yK(s))}),e.push(S_t)}else if(typeof t=="object"){e.push(D_t);let r=!0;Object.keys(t).sort().forEach(s=>{r||e.push(GRe),r=!1,e.push(WRe(s)),e.push(B_t),e.push(yK(t[s]))}),e.push(b_t)}else throw new TypeError("cannot encode "+t.toString());return e.join("")}function WRe(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}YRe.exports={canonicalize:yK}});var VRe=L(n1=>{"use strict";var P_t=n1&&n1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n1,"__esModule",{value:!0});n1.verifySignature=void 0;var x_t=EK(),k_t=P_t(Ie("crypto")),Q_t=(t,e,r)=>{let s=Buffer.from((0,x_t.canonicalize)(t));return k_t.default.verify(void 0,s,e,Buffer.from(r,"hex"))};n1.verifySignature=Q_t});var Af=L(ru=>{"use strict";var T_t=ru&&ru.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),R_t=ru&&ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KRe=ru&&ru.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T_t(e,t,r);return R_t(e,t),e};Object.defineProperty(ru,"__esModule",{value:!0});ru.crypto=ru.guard=void 0;ru.guard=KRe(qRe());ru.crypto=KRe(VRe())});var oy=L(dh=>{"use strict";var F_t=dh&&dh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dh,"__esModule",{value:!0});dh.Signed=dh.MetadataKind=void 0;dh.isMetadataKind=O_t;var N_t=F_t(Ie("util")),Ub=kA(),IK=Af(),JRe=["1","0","31"],CK;(function(t){t.Root="root",t.Timestamp="timestamp",t.Snapshot="snapshot",t.Targets="targets"})(CK||(dh.MetadataKind=CK={}));function O_t(t){return typeof t=="string"&&Object.values(CK).includes(t)}var wK=class t{constructor(e){this.specVersion=e.specVersion||JRe.join(".");let r=this.specVersion.split(".");if(!(r.length===2||r.length===3)||!r.every(s=>L_t(s)))throw new Ub.ValueError("Failed to parse specVersion");if(r[0]!=JRe[0])throw new Ub.ValueError("Unsupported specVersion");this.expires=e.expires,this.version=e.version,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.specVersion===e.specVersion&&this.expires===e.expires&&this.version===e.version&&N_t.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}isExpired(e){return e||(e=new Date),e>=new Date(this.expires)}static commonFieldsFromJSON(e){let{spec_version:r,expires:s,version:a,...n}=e;if(IK.guard.isDefined(r)){if(typeof r!="string")throw new TypeError("spec_version must be a string")}else throw new Ub.ValueError("spec_version is not defined");if(IK.guard.isDefined(s)){if(typeof s!="string")throw new TypeError("expires must be a string")}else throw new Ub.ValueError("expires is not defined");if(IK.guard.isDefined(a)){if(typeof a!="number")throw new TypeError("version must be a number")}else throw new Ub.ValueError("version is not defined");return{specVersion:r,expires:s,version:a,unrecognizedFields:n}}};dh.Signed=wK;function L_t(t){return!isNaN(Number(t))}});var Hb=L(Pg=>{"use strict";var zRe=Pg&&Pg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pg,"__esModule",{value:!0});Pg.TargetFile=Pg.MetaFile=void 0;var ZRe=zRe(Ie("crypto")),FO=zRe(Ie("util")),bg=kA(),RO=Af(),BK=class t{constructor(e){if(e.version<=0)throw new bg.ValueError("Metafile version must be at least 1");e.length!==void 0&&XRe(e.length),this.version=e.version,this.length=e.length,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}equals(e){return e instanceof t?this.version===e.version&&this.length===e.length&&FO.default.isDeepStrictEqual(this.hashes,e.hashes)&&FO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}verify(e){if(this.length!==void 0&&e.length!==this.length)throw new bg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${e.length}`);this.hashes&&Object.entries(this.hashes).forEach(([r,s])=>{let a;try{a=ZRe.default.createHash(r)}catch{throw new bg.LengthOrHashMismatchError(`Hash algorithm ${r} not supported`)}let n=a.update(e).digest("hex");if(n!==s)throw new bg.LengthOrHashMismatchError(`Expected hash ${s} but got ${n}`)})}toJSON(){let e={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(e.length=this.length),this.hashes&&(e.hashes=this.hashes),e}static fromJSON(e){let{version:r,length:s,hashes:a,...n}=e;if(typeof r!="number")throw new TypeError("version must be a number");if(RO.guard.isDefined(s)&&typeof s!="number")throw new TypeError("length must be a number");if(RO.guard.isDefined(a)&&!RO.guard.isStringRecord(a))throw new TypeError("hashes must be string keys and values");return new t({version:r,length:s,hashes:a,unrecognizedFields:n})}};Pg.MetaFile=BK;var vK=class t{constructor(e){XRe(e.length),this.length=e.length,this.path=e.path,this.hashes=e.hashes,this.unrecognizedFields=e.unrecognizedFields||{}}get custom(){let e=this.unrecognizedFields.custom;return!e||Array.isArray(e)||typeof e!="object"?{}:e}equals(e){return e instanceof t?this.length===e.length&&this.path===e.path&&FO.default.isDeepStrictEqual(this.hashes,e.hashes)&&FO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}async verify(e){let r=0,s=Object.keys(this.hashes).reduce((a,n)=>{try{a[n]=ZRe.default.createHash(n)}catch{throw new bg.LengthOrHashMismatchError(`Hash algorithm ${n} not supported`)}return a},{});for await(let a of e)r+=a.length,Object.values(s).forEach(n=>{n.update(a)});if(r!==this.length)throw new bg.LengthOrHashMismatchError(`Expected length ${this.length} but got ${r}`);Object.entries(s).forEach(([a,n])=>{let c=this.hashes[a],f=n.digest("hex");if(f!==c)throw new bg.LengthOrHashMismatchError(`Expected hash ${c} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(e,r){let{length:s,hashes:a,...n}=r;if(typeof s!="number")throw new TypeError("length must be a number");if(!RO.guard.isStringRecord(a))throw new TypeError("hashes must have string keys and values");return new t({length:s,path:e,hashes:a,unrecognizedFields:n})}};Pg.TargetFile=vK;function XRe(t){if(t<0)throw new bg.ValueError("Length must be at least 0")}});var $Re=L(SK=>{"use strict";Object.defineProperty(SK,"__esModule",{value:!0});SK.encodeOIDString=__t;var M_t=6;function __t(t){let e=t.split("."),r=parseInt(e[0],10)*40+parseInt(e[1],10),s=[];e.slice(2).forEach(n=>{let c=U_t(parseInt(n,10));s.push(...c)});let a=Buffer.from([r,...s]);return Buffer.from([M_t,a.length,...a])}function U_t(t){let e=[],r=0;for(;t>0;)e.unshift(t&127|r),t>>=7,r=128;return e}});var nFe=L(qb=>{"use strict";var H_t=qb&&qb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qb,"__esModule",{value:!0});qb.getPublicKey=W_t;var i1=H_t(Ie("crypto")),jb=kA(),DK=$Re(),NO=48,eFe=3,tFe=0,j_t="1.3.101.112",q_t="1.2.840.10045.2.1",G_t="1.2.840.10045.3.1.7",bK="-----BEGIN PUBLIC KEY-----";function W_t(t){switch(t.keyType){case"rsa":return Y_t(t);case"ed25519":return V_t(t);case"ecdsa":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":return K_t(t);default:throw new jb.UnsupportedAlgorithmError(`Unsupported key type: ${t.keyType}`)}}function Y_t(t){if(!t.keyVal.startsWith(bK))throw new jb.CryptoError("Invalid key format");let e=i1.default.createPublicKey(t.keyVal);switch(t.scheme){case"rsassa-pss-sha256":return{key:e,padding:i1.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new jb.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${t.scheme}`)}}function V_t(t){let e;if(t.keyVal.startsWith(bK))e=i1.default.createPublicKey(t.keyVal);else{if(!rFe(t.keyVal))throw new jb.CryptoError("Invalid key format");e=i1.default.createPublicKey({key:J_t.hexToDER(t.keyVal),format:"der",type:"spki"})}return{key:e}}function K_t(t){let e;if(t.keyVal.startsWith(bK))e=i1.default.createPublicKey(t.keyVal);else{if(!rFe(t.keyVal))throw new jb.CryptoError("Invalid key format");e=i1.default.createPublicKey({key:z_t.hexToDER(t.keyVal),format:"der",type:"spki"})}return{key:e}}var J_t={hexToDER:t=>{let e=Buffer.from(t,"hex"),r=(0,DK.encodeOIDString)(j_t),s=Buffer.concat([Buffer.concat([Buffer.from([NO]),Buffer.from([r.length]),r]),Buffer.concat([Buffer.from([eFe]),Buffer.from([e.length+1]),Buffer.from([tFe]),e])]);return Buffer.concat([Buffer.from([NO]),Buffer.from([s.length]),s])}},z_t={hexToDER:t=>{let e=Buffer.from(t,"hex"),r=Buffer.concat([Buffer.from([eFe]),Buffer.from([e.length+1]),Buffer.from([tFe]),e]),s=Buffer.concat([(0,DK.encodeOIDString)(q_t),(0,DK.encodeOIDString)(G_t)]),a=Buffer.concat([Buffer.from([NO]),Buffer.from([s.length]),s]);return Buffer.concat([Buffer.from([NO]),Buffer.from([a.length+r.length]),a,r])}},rFe=t=>/^[0-9a-fA-F]+$/.test(t)});var OO=L(s1=>{"use strict";var Z_t=s1&&s1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(s1,"__esModule",{value:!0});s1.Key=void 0;var iFe=Z_t(Ie("util")),Gb=kA(),sFe=Af(),X_t=nFe(),PK=class t{constructor(e){let{keyID:r,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c}=e;this.keyID=r,this.keyType=s,this.scheme=a,this.keyVal=n,this.unrecognizedFields=c||{}}verifySignature(e){let r=e.signatures[this.keyID];if(!r)throw new Gb.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new Gb.UnsignedMetadataError("no public key found");let s=(0,X_t.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),a=e.signed.toJSON();try{if(!sFe.crypto.verifySignature(a,s,r.sig))throw new Gb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(n){throw n instanceof Gb.UnsignedMetadataError?n:new Gb.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(e){return e instanceof t?this.keyID===e.keyID&&this.keyType===e.keyType&&this.scheme===e.scheme&&iFe.default.isDeepStrictEqual(this.keyVal,e.keyVal)&&iFe.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(e,r){let{keytype:s,scheme:a,keyval:n,...c}=r;if(typeof s!="string")throw new TypeError("keytype must be a string");if(typeof a!="string")throw new TypeError("scheme must be a string");if(!sFe.guard.isStringRecord(n))throw new TypeError("keyval must be a string record");return new t({keyID:e,keyType:s,scheme:a,keyVal:n,unrecognizedFields:c})}};s1.Key=PK});var uFe=L((DCr,cFe)=>{"use strict";cFe.exports=aFe;function aFe(t,e,r){t instanceof RegExp&&(t=oFe(t,r)),e instanceof RegExp&&(e=oFe(e,r));var s=lFe(t,e,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+t.length,s[1]),post:r.slice(s[1]+e.length)}}function oFe(t,e){var r=e.match(t);return r?r[0]:null}aFe.range=lFe;function lFe(t,e,r){var s,a,n,c,f,p=r.indexOf(t),h=r.indexOf(e,p+1),E=p;if(p>=0&&h>0){for(s=[],n=r.length;E>=0&&!f;)E==p?(s.push(E),p=r.indexOf(t,E+1)):s.length==1?f=[s.pop(),h]:(a=s.pop(),a=0?p:h;s.length&&(f=[n,c])}return f}});var yFe=L((bCr,mFe)=>{var fFe=uFe();mFe.exports=tUt;var AFe="\0SLASH"+Math.random()+"\0",pFe="\0OPEN"+Math.random()+"\0",kK="\0CLOSE"+Math.random()+"\0",hFe="\0COMMA"+Math.random()+"\0",gFe="\0PERIOD"+Math.random()+"\0";function xK(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function $_t(t){return t.split("\\\\").join(AFe).split("\\{").join(pFe).split("\\}").join(kK).split("\\,").join(hFe).split("\\.").join(gFe)}function eUt(t){return t.split(AFe).join("\\").split(pFe).join("{").split(kK).join("}").split(hFe).join(",").split(gFe).join(".")}function dFe(t){if(!t)return[""];var e=[],r=fFe("{","}",t);if(!r)return t.split(",");var s=r.pre,a=r.body,n=r.post,c=s.split(",");c[c.length-1]+="{"+a+"}";var f=dFe(n);return n.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),e.push.apply(e,c),e}function tUt(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Wb($_t(t),!0).map(eUt)):[]}function rUt(t){return"{"+t+"}"}function nUt(t){return/^-?0\d/.test(t)}function iUt(t,e){return t<=e}function sUt(t,e){return t>=e}function Wb(t,e){var r=[],s=fFe("{","}",t);if(!s)return[t];var a=s.pre,n=s.post.length?Wb(s.post,!1):[""];if(/\$$/.test(s.pre))for(var c=0;c=0;if(!E&&!C)return s.post.match(/,.*\}/)?(t=s.pre+"{"+s.body+kK+s.post,Wb(t)):[t];var S;if(E)S=s.body.split(/\.\./);else if(S=dFe(s.body),S.length===1&&(S=Wb(S[0],!1).map(rUt),S.length===1))return n.map(function(Ce){return s.pre+S[0]+Ce});var P;if(E){var I=xK(S[0]),R=xK(S[1]),N=Math.max(S[0].length,S[1].length),U=S.length==3?Math.abs(xK(S[2])):1,W=iUt,te=R0){var pe=new Array(me+1).join("0");Ae<0?ce="-"+pe+ce.slice(1):ce=pe+ce}}P.push(ce)}}else{P=[];for(var Be=0;Be{"use strict";Object.defineProperty(LO,"__esModule",{value:!0});LO.assertValidPattern=void 0;var oUt=1024*64,aUt=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>oUt)throw new TypeError("pattern is too long")};LO.assertValidPattern=aUt});var CFe=L(MO=>{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});MO.parseClass=void 0;var lUt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Yb=t=>t.replace(/[[\]\\-]/g,"\\$&"),cUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),IFe=t=>t.join(""),uUt=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let s=[],a=[],n=r+1,c=!1,f=!1,p=!1,h=!1,E=r,C="";e:for(;nC?s.push(Yb(C)+"-"+Yb(R)):R===C&&s.push(Yb(R)),C="",n++;continue}if(t.startsWith("-]",n+1)){s.push(Yb(R+"-")),n+=2;continue}if(t.startsWith("-",n+1)){C=R,n+=2;continue}s.push(Yb(R)),n++}if(E{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});_O.unescape=void 0;var fUt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");_O.unescape=fUt});var RK=L(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});qO.AST=void 0;var AUt=CFe(),HO=UO(),pUt=new Set(["!","?","+","*","@"]),wFe=t=>pUt.has(t),hUt="(?!(?:^|/)\\.\\.?(?:$|/))",jO="(?!\\.)",gUt=new Set(["[","."]),dUt=new Set(["..","."]),mUt=new Set("().*{}+?[]^$\\!"),yUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),TK="[^/]",BFe=TK+"*?",vFe=TK+"+?",QK=class t{type;#t;#r;#i=!1;#e=[];#n;#o;#l;#a=!1;#s;#c;#f=!1;constructor(e,r,s={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#s=this.#t===this?s:this.#t.#s,this.#l=this.#t===this?[]:this.#t.#l,e==="!"&&!this.#t.#a&&this.#l.push(this),this.#o=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#c=this.#e.map(e=>String(e)).join("")}#p(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#l.pop();){if(e.type!=="!")continue;let r=e,s=r.#n;for(;s;){for(let a=r.#o+1;!s.type&&atypeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#o===0)return!0;let e=this.#n;for(let r=0;r{let[I,R,N,U]=typeof P=="string"?t.#h(P,this.#r,p):P.toRegExpSource(e);return this.#r=this.#r||N,this.#i=this.#i||U,I}).join(""),E="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&dUt.has(this.#e[0]))){let I=gUt,R=r&&I.has(h.charAt(0))||h.startsWith("\\.")&&I.has(h.charAt(2))||h.startsWith("\\.\\.")&&I.has(h.charAt(4)),N=!r&&!e&&I.has(h.charAt(0));E=R?hUt:N?jO:""}let C="";return this.isEnd()&&this.#t.#a&&this.#n?.type==="!"&&(C="(?:$|\\/)"),[E+h+C,(0,HO.unescape)(h),this.#r=!!this.#r,this.#i]}let s=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#A(r);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let p=this.toString();return this.#e=[p],this.type=null,this.#r=void 0,[p,(0,HO.unescape)(this.toString()),!1,!1]}let c=!s||e||r||!jO?"":this.#A(!0);c===n&&(c=""),c&&(n=`(?:${n})(?:${c})*?`);let f="";if(this.type==="!"&&this.#f)f=(this.isStart()&&!r?jO:"")+vFe;else{let p=this.type==="!"?"))"+(this.isStart()&&!r&&!e?jO:"")+BFe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&c?")":this.type==="*"&&c?")?":`)${this.type}`;f=a+n+p}return[f,(0,HO.unescape)(n),this.#r=!!this.#r,this.#i]}#A(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[s,a,n,c]=r.toRegExpSource(e);return this.#i=this.#i||c,s}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#h(e,r,s=!1){let a=!1,n="",c=!1;for(let f=0;f{"use strict";Object.defineProperty(GO,"__esModule",{value:!0});GO.escape=void 0;var EUt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");GO.escape=EUt});var QFe=L(pr=>{"use strict";var IUt=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,"__esModule",{value:!0});pr.unescape=pr.escape=pr.AST=pr.Minimatch=pr.match=pr.makeRe=pr.braceExpand=pr.defaults=pr.filter=pr.GLOBSTAR=pr.sep=pr.minimatch=void 0;var CUt=IUt(yFe()),WO=EFe(),bFe=RK(),wUt=FK(),BUt=UO(),vUt=(t,e,r={})=>((0,WO.assertValidPattern)(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ay(e,r).match(t));pr.minimatch=vUt;var SUt=/^\*+([^+@!?\*\[\(]*)$/,DUt=t=>e=>!e.startsWith(".")&&e.endsWith(t),bUt=t=>e=>e.endsWith(t),PUt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),xUt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),kUt=/^\*+\.\*+$/,QUt=t=>!t.startsWith(".")&&t.includes("."),TUt=t=>t!=="."&&t!==".."&&t.includes("."),RUt=/^\.\*+$/,FUt=t=>t!=="."&&t!==".."&&t.startsWith("."),NUt=/^\*+$/,OUt=t=>t.length!==0&&!t.startsWith("."),LUt=t=>t.length!==0&&t!=="."&&t!=="..",MUt=/^\?+([^+@!?\*\[\(]*)?$/,_Ut=([t,e=""])=>{let r=PFe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},UUt=([t,e=""])=>{let r=xFe([t]);return e?(e=e.toLowerCase(),s=>r(s)&&s.toLowerCase().endsWith(e)):r},HUt=([t,e=""])=>{let r=xFe([t]);return e?s=>r(s)&&s.endsWith(e):r},jUt=([t,e=""])=>{let r=PFe([t]);return e?s=>r(s)&&s.endsWith(e):r},PFe=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xFe=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},kFe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",SFe={win32:{sep:"\\"},posix:{sep:"/"}};pr.sep=kFe==="win32"?SFe.win32.sep:SFe.posix.sep;pr.minimatch.sep=pr.sep;pr.GLOBSTAR=Symbol("globstar **");pr.minimatch.GLOBSTAR=pr.GLOBSTAR;var qUt="[^/]",GUt=qUt+"*?",WUt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",YUt="(?:(?!(?:\\/|^)\\.).)*?",VUt=(t,e={})=>r=>(0,pr.minimatch)(r,t,e);pr.filter=VUt;pr.minimatch.filter=pr.filter;var nu=(t,e={})=>Object.assign({},t,e),KUt=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return pr.minimatch;let e=pr.minimatch;return Object.assign((s,a,n={})=>e(s,a,nu(t,n)),{Minimatch:class extends e.Minimatch{constructor(a,n={}){super(a,nu(t,n))}static defaults(a){return e.defaults(nu(t,a)).Minimatch}},AST:class extends e.AST{constructor(a,n,c={}){super(a,n,nu(t,c))}static fromGlob(a,n={}){return e.AST.fromGlob(a,nu(t,n))}},unescape:(s,a={})=>e.unescape(s,nu(t,a)),escape:(s,a={})=>e.escape(s,nu(t,a)),filter:(s,a={})=>e.filter(s,nu(t,a)),defaults:s=>e.defaults(nu(t,s)),makeRe:(s,a={})=>e.makeRe(s,nu(t,a)),braceExpand:(s,a={})=>e.braceExpand(s,nu(t,a)),match:(s,a,n={})=>e.match(s,a,nu(t,n)),sep:e.sep,GLOBSTAR:pr.GLOBSTAR})};pr.defaults=KUt;pr.minimatch.defaults=pr.defaults;var JUt=(t,e={})=>((0,WO.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,CUt.default)(t));pr.braceExpand=JUt;pr.minimatch.braceExpand=pr.braceExpand;var zUt=(t,e={})=>new ay(t,e).makeRe();pr.makeRe=zUt;pr.minimatch.makeRe=pr.makeRe;var ZUt=(t,e,r={})=>{let s=new ay(e,r);return t=t.filter(a=>s.match(a)),s.options.nonull&&!t.length&&t.push(e),t};pr.match=ZUt;pr.minimatch.match=pr.match;var DFe=/[?*]|[+@!]\(.*?\)|\[|\]/,XUt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ay=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,WO.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||kFe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let a=this.globParts.map((n,c,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let p=n[0]===""&&n[1]===""&&(n[2]==="?"||!DFe.test(n[2]))&&!DFe.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(p)return[...n.slice(0,4),...n.slice(4).map(E=>this.parse(E))];if(h)return[n[0],...n.slice(1).map(E=>this.parse(E))]}return n.map(p=>this.parse(p))});if(this.debug(this.pattern,a),this.set=a.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let s=-1;for(;(s=r.indexOf("**",s+1))!==-1;){let a=s;for(;r[a+1]==="**";)a++;a!==s&&r.splice(s,a-s)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((s,a)=>{let n=s[s.length-1];return a==="**"&&n==="**"?s:a===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(s.pop(),s):(s.push(a),s)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;aa&&s.splice(a+1,c-a);let f=s[a+1],p=s[a+2],h=s[a+3];if(f!==".."||!p||p==="."||p===".."||!h||h==="."||h==="..")continue;r=!0,s.splice(a,1);let E=s.slice(0);E[a]="**",e.push(E),a--}if(!this.preserveMultipleSlashes){for(let c=1;cr.length)}partsMatch(e,r,s=!1){let a=0,n=0,c=[],f="";for(;ate?r=r.slice(ie):te>ie&&(e=e.slice(te)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var c=0,f=0,p=e.length,h=r.length;c>> no match, partial?`,e,S,r,P),S===p))}let R;if(typeof E=="string"?(R=C===E,this.debug("string match",E,C,R)):(R=E.test(C),this.debug("pattern match",E,C,R)),!R)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]==="";throw new Error("wtf?")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,WO.assertValidPattern)(e);let r=this.options;if(e==="**")return pr.GLOBSTAR;if(e==="")return"";let s,a=null;(s=e.match(NUt))?a=r.dot?LUt:OUt:(s=e.match(SUt))?a=(r.nocase?r.dot?xUt:PUt:r.dot?bUt:DUt)(s[1]):(s=e.match(MUt))?a=(r.nocase?r.dot?UUt:_Ut:r.dot?HUt:jUt)(s):(s=e.match(kUt))?a=r.dot?TUt:QUt:(s=e.match(RUt))&&(a=FUt);let n=bFe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?GUt:r.dot?WUt:YUt,a=new Set(r.nocase?["i"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let C of E.flags.split(""))a.add(C);return typeof E=="string"?XUt(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,C)=>{let S=h[C+1],P=h[C-1];E!==pr.GLOBSTAR||P===pr.GLOBSTAR||(P===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[C+1]="(?:\\/|"+s+"\\/)?"+S:h[C]=s:S===void 0?h[C-1]=P+"(?:\\/|"+s+")?":S!==pr.GLOBSTAR&&(h[C-1]=P+"(?:\\/|\\/"+s+"\\/)"+S,h[C+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join("/")}).join("|"),[c,f]=e.length>1?["(?:",")"]:["",""];n="^"+c+n+f+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split("\\").join("/"));let a=this.slashSplit(e);this.debug(this.pattern,"split",a);let n=this.set;this.debug(this.pattern,"set",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f{"use strict";var TFe=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});iu.SuccinctRoles=iu.DelegatedRole=iu.Role=iu.TOP_LEVEL_ROLE_NAMES=void 0;var RFe=TFe(Ie("crypto")),r4t=QFe(),YO=TFe(Ie("util")),VO=kA(),ly=Af();iu.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var Vb=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(n4t(r))throw new VO.ValueError("duplicate key IDs found");if(s<1)throw new VO.ValueError("threshold must be at least 1");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&YO.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&YO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!ly.guard.isStringArray(r))throw new TypeError("keyids must be an array");if(typeof s!="number")throw new TypeError("threshold must be a number");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};iu.Role=Vb;function n4t(t){return new Set(t).size!==t.length}var NK=class t extends Vb{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new VO.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&YO.default.isDeepStrictEqual(this.paths,e.paths)&&YO.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>s4t(e,r));if(this.pathHashPrefixes){let s=RFe.default.createHash("sha256").update(e).digest("hex");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fromJSON(e){let{keyids:r,threshold:s,name:a,terminating:n,paths:c,path_hash_prefixes:f,...p}=e;if(!ly.guard.isStringArray(r))throw new TypeError("keyids must be an array of strings");if(typeof s!="number")throw new TypeError("threshold must be a number");if(typeof a!="string")throw new TypeError("name must be a string");if(typeof n!="boolean")throw new TypeError("terminating must be a boolean");if(ly.guard.isDefined(c)&&!ly.guard.isStringArray(c))throw new TypeError("paths must be an array of strings");if(ly.guard.isDefined(f)&&!ly.guard.isStringArray(f))throw new TypeError("path_hash_prefixes must be an array of strings");return new t({keyIDs:r,threshold:s,name:a,terminating:n,paths:c,pathHashPrefixes:f,unrecognizedFields:p})}};iu.DelegatedRole=NK;var i4t=(t,e)=>t.map((r,s)=>[r,e[s]]);function s4t(t,e){let r=t.split("/"),s=e.split("/");return s.length!=r.length?!1:i4t(r,s).every(([a,n])=>(0,r4t.minimatch)(a,n))}var OK=class t extends Vb{constructor(e){super(e);let{bitLength:r,namePrefix:s}=e;if(r<=0||r>32)throw new VO.ValueError("bitLength must be between 1 and 32");this.bitLength=r,this.namePrefix=s,this.numberOfBins=Math.pow(2,r),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(e){return e instanceof t?super.equals(e)&&this.bitLength===e.bitLength&&this.namePrefix===e.namePrefix:!1}getRoleForTarget(e){let a=RFe.default.createHash("sha256").update(e).digest().subarray(0,4),n=32-this.bitLength,f=(a.readUInt32BE()>>>n).toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${f}`}*getRoles(){for(let e=0;e{"use strict";var o4t=o1&&o1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(o1,"__esModule",{value:!0});o1.Root=void 0;var FFe=o4t(Ie("util")),MK=oy(),NFe=kA(),a4t=OO(),KO=LK(),JO=Af(),_K=class t extends MK.Signed{constructor(e){if(super(e),this.type=MK.MetadataKind.Root,this.keys=e.keys||{},this.consistentSnapshot=e.consistentSnapshot??!0,!e.roles)this.roles=KO.TOP_LEVEL_ROLE_NAMES.reduce((r,s)=>({...r,[s]:new KO.Role({keyIDs:[],threshold:1})}),{});else{let r=new Set(Object.keys(e.roles));if(!KO.TOP_LEVEL_ROLE_NAMES.every(s=>r.has(s)))throw new NFe.ValueError("missing top-level role");this.roles=e.roles}}addKey(e,r){if(!this.roles[r])throw new NFe.ValueError(`role ${r} does not exist`);this.roles[r].keyIDs.includes(e.keyID)||this.roles[r].keyIDs.push(e.keyID),this.keys[e.keyID]=e}equals(e){return e instanceof t?super.equals(e)&&this.consistentSnapshot===e.consistentSnapshot&&FFe.default.isDeepStrictEqual(this.keys,e.keys)&&FFe.default.isDeepStrictEqual(this.roles,e.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:l4t(this.keys),roles:c4t(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=MK.Signed.commonFieldsFromJSON(e),{keys:a,roles:n,consistent_snapshot:c,...f}=r;if(typeof c!="boolean")throw new TypeError("consistent_snapshot must be a boolean");return new t({...s,keys:u4t(a),roles:f4t(n),consistentSnapshot:c,unrecognizedFields:f})}};o1.Root=_K;function l4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function c4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function u4t(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError("keys must be an object");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:a4t.Key.fromJSON(s,a)}),{})}return e}function f4t(t){let e;if(JO.guard.isDefined(t)){if(!JO.guard.isObjectRecord(t))throw new TypeError("roles must be an object");e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:KO.Role.fromJSON(a)}),{})}return e}});var jK=L(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:!0});zO.Signature=void 0;var HK=class t{constructor(e){let{keyID:r,sig:s}=e;this.keyID=r,this.sig=s}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(e){let{keyid:r,sig:s}=e;if(typeof r!="string")throw new TypeError("keyid must be a string");if(typeof s!="string")throw new TypeError("sig must be a string");return new t({keyID:r,sig:s})}};zO.Signature=HK});var WK=L(a1=>{"use strict";var A4t=a1&&a1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(a1,"__esModule",{value:!0});a1.Snapshot=void 0;var p4t=A4t(Ie("util")),qK=oy(),LFe=Hb(),OFe=Af(),GK=class t extends qK.Signed{constructor(e){super(e),this.type=qK.MetadataKind.Snapshot,this.meta=e.meta||{"targets.json":new LFe.MetaFile({version:1})}}equals(e){return e instanceof t?super.equals(e)&&p4t.default.isDeepStrictEqual(this.meta,e.meta):!1}toJSON(){return{_type:this.type,meta:h4t(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=qK.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,meta:g4t(a),unrecognizedFields:n})}};a1.Snapshot=GK;function h4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function g4t(t){let e;if(OFe.guard.isDefined(t))if(OFe.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:LFe.MetaFile.fromJSON(a)}),{});else throw new TypeError("meta field is malformed");return e}});var MFe=L(l1=>{"use strict";var d4t=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,"__esModule",{value:!0});l1.Delegations=void 0;var ZO=d4t(Ie("util")),m4t=kA(),y4t=OO(),YK=LK(),XO=Af(),VK=class t{constructor(e){if(this.keys=e.keys,this.unrecognizedFields=e.unrecognizedFields||{},e.roles&&Object.keys(e.roles).some(r=>YK.TOP_LEVEL_ROLE_NAMES.includes(r)))throw new m4t.ValueError("Delegated role name conflicts with top-level role name");this.succinctRoles=e.succinctRoles,this.roles=e.roles}equals(e){return e instanceof t?ZO.default.isDeepStrictEqual(this.keys,e.keys)&&ZO.default.isDeepStrictEqual(this.roles,e.roles)&&ZO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields)&&ZO.default.isDeepStrictEqual(this.succinctRoles,e.succinctRoles):!1}*rolesForTarget(e){if(this.roles)for(let r of Object.values(this.roles))r.isDelegatedPath(e)&&(yield{role:r.name,terminating:r.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(e),terminating:!0})}toJSON(){let e={keys:E4t(this.keys),...this.unrecognizedFields};return this.roles?e.roles=I4t(this.roles):this.succinctRoles&&(e.succinct_roles=this.succinctRoles.toJSON()),e}static fromJSON(e){let{keys:r,roles:s,succinct_roles:a,...n}=e,c;return XO.guard.isObject(a)&&(c=YK.SuccinctRoles.fromJSON(a)),new t({keys:C4t(r),roles:w4t(s),unrecognizedFields:n,succinctRoles:c})}};l1.Delegations=VK;function E4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function I4t(t){return Object.values(t).map(e=>e.toJSON())}function C4t(t){if(!XO.guard.isObjectRecord(t))throw new TypeError("keys is malformed");return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:y4t.Key.fromJSON(r,s)}),{})}function w4t(t){let e;if(XO.guard.isDefined(t)){if(!XO.guard.isObjectArray(t))throw new TypeError("roles is malformed");e=t.reduce((r,s)=>{let a=YK.DelegatedRole.fromJSON(s);return{...r,[a.name]:a}},{})}return e}});var zK=L(c1=>{"use strict";var B4t=c1&&c1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c1,"__esModule",{value:!0});c1.Targets=void 0;var _Fe=B4t(Ie("util")),KK=oy(),v4t=MFe(),S4t=Hb(),$O=Af(),JK=class t extends KK.Signed{constructor(e){super(e),this.type=KK.MetadataKind.Targets,this.targets=e.targets||{},this.delegations=e.delegations}addTarget(e){this.targets[e.path]=e}equals(e){return e instanceof t?super.equals(e)&&_Fe.default.isDeepStrictEqual(this.targets,e.targets)&&_Fe.default.isDeepStrictEqual(this.delegations,e.delegations):!1}toJSON(){let e={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:D4t(this.targets),...this.unrecognizedFields};return this.delegations&&(e.delegations=this.delegations.toJSON()),e}static fromJSON(e){let{unrecognizedFields:r,...s}=KK.Signed.commonFieldsFromJSON(e),{targets:a,delegations:n,...c}=r;return new t({...s,targets:b4t(a),delegations:P4t(n),unrecognizedFields:c})}};c1.Targets=JK;function D4t(t){return Object.entries(t).reduce((e,[r,s])=>({...e,[r]:s.toJSON()}),{})}function b4t(t){let e;if($O.guard.isDefined(t))if($O.guard.isObjectRecord(t))e=Object.entries(t).reduce((r,[s,a])=>({...r,[s]:S4t.TargetFile.fromJSON(s,a)}),{});else throw new TypeError("targets must be an object");return e}function P4t(t){let e;if($O.guard.isDefined(t))if($O.guard.isObject(t))e=v4t.Delegations.fromJSON(t);else throw new TypeError("delegations must be an object");return e}});var eJ=L(eL=>{"use strict";Object.defineProperty(eL,"__esModule",{value:!0});eL.Timestamp=void 0;var ZK=oy(),UFe=Hb(),XK=Af(),$K=class t extends ZK.Signed{constructor(e){super(e),this.type=ZK.MetadataKind.Timestamp,this.snapshotMeta=e.snapshotMeta||new UFe.MetaFile({version:1})}equals(e){return e instanceof t?super.equals(e)&&this.snapshotMeta.equals(e.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(e){let{unrecognizedFields:r,...s}=ZK.Signed.commonFieldsFromJSON(e),{meta:a,...n}=r;return new t({...s,snapshotMeta:x4t(a),unrecognizedFields:n})}};eL.Timestamp=$K;function x4t(t){let e;if(XK.guard.isDefined(t)){let r=t["snapshot.json"];if(!XK.guard.isDefined(r)||!XK.guard.isObject(r))throw new TypeError("missing snapshot.json in meta");e=UFe.MetaFile.fromJSON(r)}return e}});var jFe=L(f1=>{"use strict";var k4t=f1&&f1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(f1,"__esModule",{value:!0});f1.Metadata=void 0;var Q4t=EK(),HFe=k4t(Ie("util")),u1=oy(),Kb=kA(),T4t=UK(),R4t=jK(),F4t=WK(),N4t=zK(),O4t=eJ(),tJ=Af(),rJ=class t{constructor(e,r,s){this.signed=e,this.signatures=r||{},this.unrecognizedFields=s||{}}sign(e,r=!0){let s=Buffer.from((0,Q4t.canonicalize)(this.signed.toJSON())),a=e(s);r||(this.signatures={}),this.signatures[a.keyID]=a}verifyDelegate(e,r){let s,a={};switch(this.signed.type){case u1.MetadataKind.Root:a=this.signed.keys,s=this.signed.roles[e];break;case u1.MetadataKind.Targets:if(!this.signed.delegations)throw new Kb.ValueError(`No delegations found for ${e}`);a=this.signed.delegations.keys,this.signed.delegations.roles?s=this.signed.delegations.roles[e]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(e)&&(s=this.signed.delegations.succinctRoles);break;default:throw new TypeError("invalid metadata type")}if(!s)throw new Kb.ValueError(`no delegation found for ${e}`);let n=new Set;if(s.keyIDs.forEach(c=>{let f=a[c];if(f)try{f.verifySignature(r),n.add(f.keyID)}catch{}}),n.sizer.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(e,r){let{signed:s,signatures:a,...n}=r;if(!tJ.guard.isDefined(s)||!tJ.guard.isObject(s))throw new TypeError("signed is not defined");if(e!==s._type)throw new Kb.ValueError(`expected '${e}', got ${s._type}`);if(!tJ.guard.isObjectArray(a))throw new TypeError("signatures is not an array");let c;switch(e){case u1.MetadataKind.Root:c=T4t.Root.fromJSON(s);break;case u1.MetadataKind.Timestamp:c=O4t.Timestamp.fromJSON(s);break;case u1.MetadataKind.Snapshot:c=F4t.Snapshot.fromJSON(s);break;case u1.MetadataKind.Targets:c=N4t.Targets.fromJSON(s);break;default:throw new TypeError("invalid metadata type")}let f={};return a.forEach(p=>{let h=R4t.Signature.fromJSON(p);if(f[h.keyID])throw new Kb.ValueError(`multiple signatures found for keyid: ${h.keyID}`);f[h.keyID]=h}),new t(c,f,n)}};f1.Metadata=rJ});var tL=L(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.Timestamp=Ni.Targets=Ni.Snapshot=Ni.Signature=Ni.Root=Ni.Metadata=Ni.Key=Ni.TargetFile=Ni.MetaFile=Ni.ValueError=Ni.MetadataKind=void 0;var L4t=oy();Object.defineProperty(Ni,"MetadataKind",{enumerable:!0,get:function(){return L4t.MetadataKind}});var M4t=kA();Object.defineProperty(Ni,"ValueError",{enumerable:!0,get:function(){return M4t.ValueError}});var qFe=Hb();Object.defineProperty(Ni,"MetaFile",{enumerable:!0,get:function(){return qFe.MetaFile}});Object.defineProperty(Ni,"TargetFile",{enumerable:!0,get:function(){return qFe.TargetFile}});var _4t=OO();Object.defineProperty(Ni,"Key",{enumerable:!0,get:function(){return _4t.Key}});var U4t=jFe();Object.defineProperty(Ni,"Metadata",{enumerable:!0,get:function(){return U4t.Metadata}});var H4t=UK();Object.defineProperty(Ni,"Root",{enumerable:!0,get:function(){return H4t.Root}});var j4t=jK();Object.defineProperty(Ni,"Signature",{enumerable:!0,get:function(){return j4t.Signature}});var q4t=WK();Object.defineProperty(Ni,"Snapshot",{enumerable:!0,get:function(){return q4t.Snapshot}});var G4t=zK();Object.defineProperty(Ni,"Targets",{enumerable:!0,get:function(){return G4t.Targets}});var W4t=eJ();Object.defineProperty(Ni,"Timestamp",{enumerable:!0,get:function(){return W4t.Timestamp}})});var WFe=L((WCr,GFe)=>{var A1=1e3,p1=A1*60,h1=p1*60,cy=h1*24,Y4t=cy*7,V4t=cy*365.25;GFe.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return K4t(t);if(r==="number"&&isFinite(t))return e.long?z4t(t):J4t(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function K4t(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return r*V4t;case"weeks":case"week":case"w":return r*Y4t;case"days":case"day":case"d":return r*cy;case"hours":case"hour":case"hrs":case"hr":case"h":return r*h1;case"minutes":case"minute":case"mins":case"min":case"m":return r*p1;case"seconds":case"second":case"secs":case"sec":case"s":return r*A1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function J4t(t){var e=Math.abs(t);return e>=cy?Math.round(t/cy)+"d":e>=h1?Math.round(t/h1)+"h":e>=p1?Math.round(t/p1)+"m":e>=A1?Math.round(t/A1)+"s":t+"ms"}function z4t(t){var e=Math.abs(t);return e>=cy?rL(t,e,cy,"day"):e>=h1?rL(t,e,h1,"hour"):e>=p1?rL(t,e,p1,"minute"):e>=A1?rL(t,e,A1,"second"):t+" ms"}function rL(t,e,r,s){var a=e>=r*1.5;return Math.round(t/r)+" "+s+(a?"s":"")}});var nJ=L((YCr,YFe)=>{function Z4t(t){r.debug=r,r.default=r,r.coerce=p,r.disable=c,r.enable=a,r.enabled=f,r.humanize=WFe(),r.destroy=h,Object.keys(t).forEach(E=>{r[E]=t[E]}),r.names=[],r.skips=[],r.formatters={};function e(E){let C=0;for(let S=0;S{if(ce==="%%")return"%";ie++;let pe=r.formatters[me];if(typeof pe=="function"){let Be=N[ie];ce=pe.call(U,Be),N.splice(ie,1),ie--}return ce}),r.formatArgs.call(U,N),(U.log||r.log).apply(U,N)}return R.namespace=E,R.useColors=r.useColors(),R.color=r.selectColor(E),R.extend=s,R.destroy=r.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(P!==r.namespaces&&(P=r.namespaces,I=r.enabled(E)),I),set:N=>{S=N}}),typeof r.init=="function"&&r.init(R),R}function s(E,C){let S=r(this.namespace+(typeof C>"u"?":":C)+E);return S.log=this.log,S}function a(E){r.save(E),r.namespaces=E,r.names=[],r.skips=[];let C=(typeof E=="string"?E:"").trim().replace(" ",",").split(",").filter(Boolean);for(let S of C)S[0]==="-"?r.skips.push(S.slice(1)):r.names.push(S)}function n(E,C){let S=0,P=0,I=-1,R=0;for(;S"-"+C)].join(",");return r.enable(""),E}function f(E){for(let C of r.skips)if(n(E,C))return!1;for(let C of r.names)if(n(E,C))return!0;return!1}function p(E){return E instanceof Error?E.stack||E.message:E}function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}YFe.exports=Z4t});var VFe=L((oc,nL)=>{oc.formatArgs=$4t;oc.save=e3t;oc.load=t3t;oc.useColors=X4t;oc.storage=r3t();oc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();oc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function X4t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function $4t(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+nL.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(s=r))}),t.splice(s,0,e)}oc.log=console.debug||console.log||(()=>{});function e3t(t){try{t?oc.storage.setItem("debug",t):oc.storage.removeItem("debug")}catch{}}function t3t(){let t;try{t=oc.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function r3t(){try{return localStorage}catch{}}nL.exports=nJ()(oc);var{formatters:n3t}=nL.exports;n3t.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var JFe=L((eo,sL)=>{var i3t=Ie("tty"),iL=Ie("util");eo.init=f3t;eo.log=l3t;eo.formatArgs=o3t;eo.save=c3t;eo.load=u3t;eo.useColors=s3t;eo.destroy=iL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");eo.colors=[6,2,3,4,5,1];try{let t=Ie("supports-color");t&&(t.stderr||t).level>=2&&(eo.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}eo.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,n)=>n.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function s3t(){return"colors"in eo.inspectOpts?!!eo.inspectOpts.colors:i3t.isatty(process.stderr.fd)}function o3t(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,a="\x1B[3"+(s<8?s:"8;5;"+s),n=` ${a};1m${e} \x1B[0m`;t[0]=n+t[0].split(` +`).join(` +`+n),t.push(a+"m+"+sL.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=a3t()+e+" "+t[0]}function a3t(){return eo.inspectOpts.hideDate?"":new Date().toISOString()+" "}function l3t(...t){return process.stderr.write(iL.formatWithOptions(eo.inspectOpts,...t)+` +`)}function c3t(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function u3t(){return process.env.DEBUG}function f3t(t){t.inspectOpts={};let e=Object.keys(eo.inspectOpts);for(let r=0;re.trim()).join(" ")};KFe.O=function(t){return this.inspectOpts.colors=this.useColors,iL.inspect(t,this.inspectOpts)}});var sJ=L((VCr,iJ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?iJ.exports=VFe():iJ.exports=JFe()});var aL=L(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.DownloadHTTPError=zi.DownloadLengthMismatchError=zi.DownloadError=zi.ExpiredMetadataError=zi.EqualVersionError=zi.BadVersionError=zi.RepositoryError=zi.PersistError=zi.RuntimeError=zi.ValueError=void 0;var oJ=class extends Error{};zi.ValueError=oJ;var aJ=class extends Error{};zi.RuntimeError=aJ;var lJ=class extends Error{};zi.PersistError=lJ;var Jb=class extends Error{};zi.RepositoryError=Jb;var oL=class extends Jb{};zi.BadVersionError=oL;var cJ=class extends oL{};zi.EqualVersionError=cJ;var uJ=class extends Jb{};zi.ExpiredMetadataError=uJ;var zb=class extends Error{};zi.DownloadError=zb;var fJ=class extends zb{};zi.DownloadLengthMismatchError=fJ;var AJ=class extends zb{constructor(e,r){super(e),this.statusCode=r}};zi.DownloadHTTPError=AJ});var ZFe=L(g1=>{"use strict";var hJ=g1&&g1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g1,"__esModule",{value:!0});g1.withTempFile=void 0;var pJ=hJ(Ie("fs/promises")),A3t=hJ(Ie("os")),zFe=hJ(Ie("path")),p3t=async t=>h3t(async e=>t(zFe.default.join(e,"tempfile")));g1.withTempFile=p3t;var h3t=async t=>{let e=await pJ.default.realpath(A3t.default.tmpdir()),r=await pJ.default.mkdtemp(e+zFe.default.sep);try{return await t(r)}finally{await pJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var dJ=L(xg=>{"use strict";var cL=xg&&xg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xg,"__esModule",{value:!0});xg.DefaultFetcher=xg.BaseFetcher=void 0;var g3t=cL(sJ()),XFe=cL(Ie("fs")),d3t=cL(wO()),m3t=cL(Ie("util")),$Fe=aL(),y3t=ZFe(),E3t=(0,g3t.default)("tuf:fetch"),lL=class{async downloadFile(e,r,s){return(0,y3t.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=XFe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new $Fe.DownloadLengthMismatchError("Max length reached");await I3t(f,h)}}finally{await m3t.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=XFe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};xg.BaseFetcher=lL;var gJ=class extends lL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){E3t("GET %s",e);let r=await(0,d3t.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new $Fe.DownloadHTTPError("Failed to download",r.status);return r.body}};xg.DefaultFetcher=gJ;var I3t=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var eNe=L(uL=>{"use strict";Object.defineProperty(uL,"__esModule",{value:!0});uL.defaultConfig=void 0;uL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var tNe=L(fL=>{"use strict";Object.defineProperty(fL,"__esModule",{value:!0});fL.TrustedMetadataStore=void 0;var Cs=tL(),Hi=aL(),mJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString("utf8")),s=Cs.Metadata.fromJSON(Cs.MetadataKind.Root,r);if(s.signed.type!=Cs.MetadataKind.Root)throw new Hi.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Cs.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Hi.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Cs.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Hi.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new Hi.ExpiredMetadataError("Final root.json is expired");let r=JSON.parse(e.toString("utf8")),s=Cs.Metadata.fromJSON(Cs.MetadataKind.Timestamp,r);if(s.signed.type!=Cs.MetadataKind.Timestamp)throw new Hi.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Cs.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version{let p=n.signed.meta[c];if(!p)throw new Hi.RepositoryError(`Missing file ${c} in new snapshot`);if(p.version{"use strict";Object.defineProperty(yJ,"__esModule",{value:!0});yJ.join=w3t;var C3t=Ie("url");function w3t(t,e){return new C3t.URL(B3t(t)+v3t(e)).toString()}function B3t(t){return t.endsWith("/")?t:t+"/"}function v3t(t){return t.startsWith("/")?t.slice(1):t}});var nNe=L(su=>{"use strict";var S3t=su&&su.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),D3t=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CJ=su&&su.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&S3t(e,t,r);return D3t(e,t),e},b3t=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});su.Updater=void 0;var QA=tL(),P3t=b3t(sJ()),d1=CJ(Ie("fs")),AL=CJ(Ie("path")),x3t=eNe(),uy=aL(),k3t=dJ(),Q3t=tNe(),Zb=CJ(rNe()),EJ=(0,P3t.default)("tuf:cache"),IJ=class{constructor(e){let{metadataDir:r,metadataBaseUrl:s,targetDir:a,targetBaseUrl:n,fetcher:c,config:f}=e;this.dir=r,this.metadataBaseUrl=s,this.targetDir=a,this.targetBaseUrl=n,this.forceCache=e.forceCache??!1;let p=this.loadLocalMetadata(QA.MetadataKind.Root);this.trustedSet=new Q3t.TrustedMetadataStore(p),this.config={...x3t.defaultConfig,...f},this.fetcher=c||new k3t.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(QA.MetadataKind.Targets,QA.MetadataKind.Root)}async getTargetInfo(e){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(e)}async downloadTarget(e,r,s){let a=r||this.generateTargetPath(e);if(!s){if(!this.targetBaseUrl)throw new uy.ValueError("Target base URL not set");s=this.targetBaseUrl}let n=e.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let p=Object.values(e.hashes),{dir:h,base:E}=AL.parse(n),C=`${p[0]}.${E}`;n=h?`${h}/${C}`:C}let f=Zb.join(s,n);return await this.fetcher.downloadFile(f,e.length,async p=>{await e.verify(d1.createReadStream(p)),EJ("WRITE %s",a),d1.copyFileSync(p,a)}),a}async findCachedTarget(e,r){r||(r=this.generateTargetPath(e));try{if(d1.existsSync(r))return await e.verify(d1.createReadStream(r)),r}catch{return}}loadLocalMetadata(e){let r=AL.join(this.dir,`${e}.json`);return EJ("READ %s",r),d1.readFileSync(r)}async loadRoot(){let r=this.trustedSet.root.signed.version+1,s=r+this.config.maxRootRotations;for(let a=r;a0;){let{roleName:a,parentRoleName:n}=r.pop();if(s.has(a))continue;let c=(await this.loadTargets(a,n))?.signed;if(!c)continue;let f=c.targets?.[e];if(f)return f;if(s.add(a),c.delegations){let p=[],h=c.delegations.rolesForTarget(e);for(let{role:E,terminating:C}of h)if(p.push({roleName:E,parentRoleName:a}),C){r.splice(0);break}p.reverse(),r.push(...p)}}}generateTargetPath(e){if(!this.targetDir)throw new uy.ValueError("Target directory not set");let r=encodeURIComponent(e.path);return AL.join(this.targetDir,r)}persistMetadata(e,r){let s=encodeURIComponent(e);try{let a=AL.join(this.dir,`${s}.json`);EJ("WRITE %s",a),d1.writeFileSync(a,r.toString("utf8"))}catch(a){throw new uy.PersistError(`Failed to persist metadata ${s} error: ${a}`)}}};su.Updater=IJ});var iNe=L(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});kg.Updater=kg.BaseFetcher=kg.TargetFile=void 0;var T3t=tL();Object.defineProperty(kg,"TargetFile",{enumerable:!0,get:function(){return T3t.TargetFile}});var R3t=dJ();Object.defineProperty(kg,"BaseFetcher",{enumerable:!0,get:function(){return R3t.BaseFetcher}});var F3t=nNe();Object.defineProperty(kg,"Updater",{enumerable:!0,get:function(){return F3t.Updater}})});var BJ=L(pL=>{"use strict";Object.defineProperty(pL,"__esModule",{value:!0});pL.TUFError=void 0;var wJ=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}};pL.TUFError=wJ});var sNe=L(Xb=>{"use strict";var N3t=Xb&&Xb.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xb,"__esModule",{value:!0});Xb.readTarget=L3t;var O3t=N3t(Ie("fs")),hL=BJ();async function L3t(t,e){let r=await M3t(t,e);return new Promise((s,a)=>{O3t.default.readFile(r,"utf-8",(n,c)=>{n?a(new hL.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${r}`,cause:n})):s(c)})})}async function M3t(t,e){let r;try{r=await t.getTargetInfo(e)}catch(a){throw new hL.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:a})}if(!r)throw new hL.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${e} not found`});let s=await t.findCachedTarget(r);if(!s)try{s=await t.downloadTarget(r)}catch(a){throw new hL.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${s}`,cause:a})}return s}});var oNe=L((iwr,_3t)=>{_3t.exports={"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiMzA0NjAyMjEwMDhhYjFmNmYxN2Q0ZjllNmQ3ZGNmMWM4ODkxMmI2YjUzY2MxMDM4ODY0NGFlMWYwOWJjMzdhMDgyY2QwNjAwM2UwMjIxMDBlMTQ1ZWY0YzdiNzgyZDRlODEwN2I1MzQzN2U2NjlkMDQ3Njg5MmNlOTk5OTAzYWUzM2QxNDQ0ODM2Njk5NmU3IgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGM3NjhiMmY4NmRhOTk1NjkwMTljMTYwYTA4MWRhNTRhZTM2YzM0YzBhMzEyMGQzY2I2OWI1M2I3ZDExMzc1OGUwMjIwNGY2NzE1MThmNjE3YjIwZDQ2NTM3ZmFlNmMzYjYzYmFlODkxM2Y0ZjE5NjIxNTYxMDVjYzRmMDE5YWMzNWM2YSIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDUwMjIxMDBiNDQzNGU2OTk1ZDM2OGQyM2U3NDc1OWFjZDBjYjkwMTNjODNhNWQzNTExZjBmOTk3ZWM1NGM0NTZhZTQzNTBhMDIyMDE1YjBlMjY1ZDE4MmQyYjYxZGM3NGUxNTVkOThiM2MzZmJlNTY0YmEwNTI4NmFhMTRjOGRmMDJjOWI3NTY1MTYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgInNpZyI6ICIzMDQ1MDIyMTAwODJjNTg0MTFkOTg5ZWI5Zjg2MTQxMDg1N2Q0MjM4MTU5MGVjOTQyNGRiZGFhNTFlNzhlZDEzNTE1NDMxOTA0ZTAyMjAxMTgxODVkYTZhNmMyOTQ3MTMxYzE3Nzk3ZTJiYjc2MjBjZTI2ZTVmMzAxZDFjZWFjNWYyYTdlNThmOWRjZjJlIgogIH0sCiAgewogICAia2V5aWQiOiAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGM3ODUxMzg1NGNhZTljMzJlYWE2Yjg4ZTE4OTEyZjQ4MDA2YzI3NTdhMjU4ZjkxNzMxMmNhYmE3NTk0OGViOWUwMjIxMDBkOWUxYjRjZTBhZGZlOWZkMmUyMTQ4ZDdmYTI3YTJmNDBiYTExMjJiZDY5ZGE3NjEyZDhkMTc3NmIwMTNjOTFkIgogIH0sCiAgewogICAia2V5aWQiOiAiZmRmYTgzYTA3YjVhODM1ODliODdkZWQ0MWY3N2YzOWQyMzJhZDkxZjdjY2U1Mjg2OGRhY2QwNmJhMDg5ODQ5ZiIsCiAgICJzaWciOiAiMzA0NTAyMjA1NjQ4M2EyZDVkOWVhOWNlYzZlMTFlYWRmYjMzYzQ4NGI2MTQyOThmYWNhMTVhY2YxYzQzMWIxMWVkN2Y3MzRjMDIyMTAwZDBjMWQ3MjZhZjkyYTg3ZTRlNjY0NTljYTVhZGYzOGEwNWI0NGUxZjk0MzE4NDIzZjk1NGJhZThiY2E1YmIyZSIKICB9LAogIHsKICAgImtleWlkIjogImUyZjU5YWNiOTQ4ODUxOTQwN2UxOGNiZmM5MzI5NTEwYmUwM2MwNGFjYTk5MjlkMmYwMzAxMzQzZmVjODU1MjMiLAogICAic2lnIjogIjMwNDYwMjIxMDBkMDA0ZGU4ODAyNGMzMmRjNTY1M2E5ZjQ4NDNjZmM1MjE1NDI3MDQ4YWQ5NjAwZDJjZjljOTY5ZTZlZGZmM2QyMDIyMTAwZDllYmI3OThmNWZjNjZhZjEwODk5ZGVjZTAxNGE4NjI4Y2NmM2M1NDAyY2Q0YTQyNzAyMDc0NzJmOGY2ZTcxMiIKICB9LAogIHsKICAgImtleWlkIjogIjNjMzQ0YWEwNjhmZDRjYzRlODdkYzUwYjYxMmMwMjQzMWZiYzc3MWU5NTAwMzk5MzY4M2EyYjBiZjI2MGNmMGUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiN2IwOTk5NmM0NWNhMmQ0YjA1NjAzZTU2YmFlZmEyOTcxOGEwYjcxMTQ3Y2Y4YzZlNjYzNDliYWE2MTQ3N2RmMDIyMTAwYzRkYTgwYzcxN2I0ZmE3YmJhMGZkNWM3MmRhOGEwNDk5MzU4YjAxMzU4YjIzMDlmNDFkMTQ1NmVhMWU3ZTFkOSIKICB9LAogIHsKICAgImtleWlkIjogImVjODE2Njk3MzRlMDE3OTk2YzViODVmM2QwMmMzZGUxZGQ0NjM3YTE1MjAxOWZlMWFmMTI1ZDJmOTM2OGI5NWUiLAogICAic2lnIjogIjMwNDYwMjIxMDBiZTk3ODJjMzA3NDRlNDExYTgyZmE4NWI1MTM4ZDYwMWNlMTQ4YmMxOTI1OGFlYzY0ZTdlYzI0NDc4ZjM4ODEyMDIyMTAwY2FlZjYzZGNhZjFhNGI5YTUwMGQzYmQwZTNmMTY0ZWMxOGYxYjYzZDdhOTQ2MGQ5YWNhYjEwNjZkYjBmMDE2ZCIKICB9LAogIHsKICAgImtleWlkIjogIjFlMWQ2NWNlOThiMTBhZGRhZDQ3NjRmZWJmN2RkYTJkMDQzNmIzZDNhMzg5MzU3OWMwZGRkYWVhMjBlNTQ4NDkiLAogICAic2lnIjogIjMwNDUwMjIwNzQ2ZWMzZjg1MzRjZTU1NTMxZDBkMDFmZjY0OTY0ZWY0NDBkMWU3ZDJjNGMxNDI0MDliOGU5NzY5ZjFhZGE2ZjAyMjEwMGUzYjkyOWZjZDkzZWExOGZlYWEwODI1ODg3YTcyMTA0ODk4NzlhNjY3ODBjMDdhODNmNGJkNDZlMmYwOWFiM2IiCiAgfQogXSwKICJzaWduZWQiOiB7CiAgIl90eXBlIjogInJvb3QiLAogICJjb25zaXN0ZW50X3NuYXBzaG90IjogdHJ1ZSwKICAiZXhwaXJlcyI6ICIyMDI1LTAyLTE5VDA4OjA0OjMyWiIsCiAgImtleXMiOiB7CiAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFekJ6Vk9tSENQb2pNVkxTSTM2NFdpaVY4TlByRFxuNklnUnhWbGlza3ovdit5M0pFUjVtY1ZHY09ObGlEY1dNQzVKMmxmSG1qUE5QaGI0SDd4bThMemZTQT09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBzYW50aWFnb3RvcnJlcyIKICAgfSwKICAgIjYxNjQzODM4MTI1YjQ0MGI0MGRiNjk0MmY1Y2I1YTMxYzBkYzA0MzY4MzE2ZWIyYWFhNThiOTU5MDRhNTgyMjIiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpbmlrU3NBUW1Za05lSDVlWXEvQ25JekxhYWNPXG54bFNhYXdRRE93cUt5L3RDcXhxNXh4UFNKYzIxSzRXSWhzOUd5T2tLZnp1ZVkzR0lMemNNSlo0Y1d3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGJvYmNhbGxhd2F5IgogICB9LAogICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXk4WEtzbWhCWURJOEpjMEd3ekJ4ZUtheDBjbTVcblNUS0VVNjVIUEZ1blVuNDFzVDhwaTBGak00SWtIei9ZVW13bUxVTzBXdDdseGhqNkJrTElLNHFZQXc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAZGxvcmVuYyIKICAgfSwKICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVXUmlHcjUraiszSjVTc0grWnRyNW5FMkgyd083XG5CVituTzNzOTNnTGNhMThxVE96SFkxb1d5QUdEeWtNU3NHVFVCU3Q5RCtBbjBLZktzRDJtZlNNNDJRPT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2ktb25saW5lLXVyaSI6ICJnY3BrbXM6Ly9wcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wIgogICB9LAogICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTBnaHJoOTJMdzFZcjNpZEdWNVdxQ3RNREI4Q3hcbitEOGhkQzR3MlpMTklwbFZSb1ZHTHNrWWEzZ2hlTXlPamlKOGtQaTE1YVEyLy83UCtvajdVdkpQR3c9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAam9zaHVhZ2wiCiAgIH0sCiAgICJlNzFhNTRkNTQzODM1YmE4NmFkYWQ5NDYwMzc5Yzc2NDFmYjg3MjZkMTY0ZWE3NjY4MDFhMWM1MjJhYmE3ZWEyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFRVhzejNTWlhGYjhqTVY0Mmo2cEpseWpialI4S1xuTjNCd29jZXhxNkxNSWI1cXNXS09RdkxOMTZOVWVmTGM0SHN3T291bVJzVlZhYWpTcFFTNmZvYmtSdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBtbm02NzgiCiAgIH0KICB9LAogICJyb2xlcyI6IHsKICAgInJvb3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI2ZjI2MDA4OWQ1OTIzZGFmMjAxNjZjYTY1N2M1NDNhZjYxODM0NmFiOTcxODg0YTk5OTYyYjAxOTg4YmJlMGMzIiwKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMwogICB9LAogICAic25hcHNob3QiOiB7CiAgICAia2V5aWRzIjogWwogICAgICI3MjQ3ZjBkYmFkODViMTQ3ZTE4NjNiYWRlNzYxMjQzY2M3ODVkY2I3YWE0MTBlNzEwNWRkM2QyYjYxYTM2ZDJjIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiAzNjUwLAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogMzY1CiAgIH0sCiAgICJ0YXJnZXRzIjogewogICAgImtleWlkcyI6IFsKICAgICAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInRpbWVzdGFtcCI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgIjcyNDdmMGRiYWQ4NWIxNDdlMTg2M2JhZGU3NjEyNDNjYzc4NWRjYjdhYTQxMGU3MTA1ZGQzZDJiNjFhMzZkMmMiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDEsCiAgICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDcsCiAgICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0CiAgIH0KICB9LAogICJzcGVjX3ZlcnNpb24iOiAiMS4wIiwKICAidmVyc2lvbiI6IDEwLAogICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMTgyLAogICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDMxCiB9Cn0=",targets:{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjcuMDAwWiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAid05JOWF0UUdseitWV2ZPNkxSeWdINFFVZlkvOFc0UkZ3aVQ1aTVXUmdCMD0iCiAgICAgIH0KICAgIH0KICBdLAogICJjZXJ0aWZpY2F0ZUF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQitEQ0NBWDZnQXdJQkFnSVROVmtEWm9DaW9mUERzeTdkZm02Z2VMYnVoekFLQmdncWhrak9QUVFEQXpBcU1SVXdFd1lEVlFRS0V3eHphV2R6ZEc5eVpTNWtaWFl4RVRBUEJnTlZCQU1UQ0hOcFozTjBiM0psTUI0WERUSXhNRE13TnpBek1qQXlPVm9YRFRNeE1ESXlNekF6TWpBeU9Wb3dLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQjJNQkFHQnlxR1NNNDlBZ0VHQlN1QkJBQWlBMklBQkxTeUE3SWk1aytwTk84WkVXWTB5bGVtV0Rvd09rTmEza0wrR1pFNVo1R1dlaEw5L0E5YlJOQTNSYnJzWjVpMEpjYXN0YVJMN1NwNWZwL2pENWR4cWMvVWRUVm5sdlMxNmFuKzJZZnN3ZS9RdUxvbFJVQ3JjT0UyKzJpQTUrdHpkNk5tTUdRd0RnWURWUjBQQVFIL0JBUURBZ0VHTUJJR0ExVWRFd0VCL3dRSU1BWUJBZjhDQVFFd0hRWURWUjBPQkJZRUZNakZIUUJCbWlRcE1sRWs2dzJ1U3UxS0J0UHNNQjhHQTFVZEl3UVlNQmFBRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01Bb0dDQ3FHU000OUJBTURBMmdBTUdVQ01IOGxpV0pmTXVpNnZYWEJoakRnWTRNd3NsbU4vVEp4VmUvODNXckZvbXdtTmYwNTZ5MVg0OEY5YzRtM2Ezb3pYQUl4QUtqUmF5NS9hai9qc0tLR0lrbVFhdGpJOHV1cEhyLytDeEZ2YUpXbXBZcU5rTERHUlUrOW9yemg1aEkyUnJjdWFRPT0iCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMDdUMDM6MjA6MjkuMDAwWiIsCiAgICAgICAgImVuZCI6ICIyMDIyLTEyLTMxVDIzOjU5OjU5Ljk5OVoiCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDR2pDQ0FhR2dBd0lCQWdJVUFMblZpVmZuVTBickphc21Sa0hybi9VbmZhUXdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1qQTBNVE15TURBMk1UVmFGdzB6TVRFd01EVXhNelUyTlRoYU1EY3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFZU1Cd0dBMVVFQXhNVmMybG5jM1J2Y21VdGFXNTBaWEp0WldScFlYUmxNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRThSVlMveXNIK05PdnVEWnlQSVp0aWxnVUY5TmxhcllwQWQ5SFAxdkJCSDFVNUNWNzdMU1M3czBaaUg0bkU3SHY3cHRTNkx2dlIvU1RrNzk4TFZnTXpMbEo0SGVJZkYzdEhTYWV4TGNZcFNBU3Ixa1MwTi9SZ0JKei85aldDaVhubzNzd2VUQU9CZ05WSFE4QkFmOEVCQU1DQVFZd0V3WURWUjBsQkF3d0NnWUlLd1lCQlFVSEF3TXdFZ1lEVlIwVEFRSC9CQWd3QmdFQi93SUJBREFkQmdOVkhRNEVGZ1FVMzlQcHoxWWtFWmI1cU5qcEtGV2l4aTRZWkQ4d0h3WURWUjBqQkJnd0ZvQVVXTUFlWDVGRnBXYXBlc3lRb1pNaTBDckZ4Zm93Q2dZSUtvWkl6ajBFQXdNRFp3QXdaQUl3UENzUUs0RFlpWllEUElhRGk1SEZLbmZ4WHg2QVNTVm1FUmZzeW5ZQmlYMlg2U0pSblpVODQvOURaZG5GdnZ4bUFqQk90NlFwQmxjNEovMER4dmtUQ3FwY2x2emlMNkJDQ1BuamRsSUIzUHUzQnhzUG15Z1VZN0lpMnpiZENkbGlpb3c9IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVQUxaTkFQRmR4SFB3amVEbG9Ed3lZQ2hBTy80d0NnWUlLb1pJemowRUF3TXdLakVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1SRXdEd1lEVlFRREV3aHphV2R6ZEc5eVpUQWVGdzB5TVRFd01EY3hNelUyTlRsYUZ3MHpNVEV3TURVeE16VTJOVGhhTUNveEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVSTUE4R0ExVUVBeE1JYzJsbmMzUnZjbVV3ZGpBUUJnY3Foa2pPUFFJQkJnVXJnUVFBSWdOaUFBVDdYZUZUNHJiM1BRR3dTNElhanRMazMvT2xucGdhbmdhQmNsWXBzWUJyNWkrNHluQjA3Y2ViM0xQME9JT1pkeGV4WDY5YzVpVnV5SlJRK0h6MDV5aStVRjN1QldBbEhwaVM1c2gwK0gyR0hFN1NYcmsxRUM1bTFUcjE5TDlnZzkyall6QmhNQTRHQTFVZER3RUIvd1FFQXdJQkJqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01CMEdBMVVkRGdRV0JCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFmQmdOVkhTTUVHREFXZ0JSWXdCNWZrVVdsWnFsNnpKQ2hreUxRS3NYRitqQUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUFqMW5IZVhacCsxM05XQk5hK0VEc0RQOEcxV1dnMXRDTVdQL1dIUHFwYVZvMGpoc3dlTkZaZ1NzMGVFN3dZSTRxQWpFQTJXQjlvdDk4c0lrb0YzdlpZZGQzL1Z0V0I1YjlUTk1lYTdJeC9zdEo1VGZjTExlQUJMRTRCTkpPc1E0dm5CSEoiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjItMDQtMTNUMjA6MDY6MTUuMDAwWiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDAuMDAwWiIsCiAgICAgICAgICAiZW5kIjogIjIwMjItMTAtMzFUMjM6NTk6NTkuOTk5WiIKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJsb2dJZCI6IHsKICAgICAgICAia2V5SWQiOiAiQ0dDUzhDaFMvMmhGMGRGcko0U2NSV2NZckJZOXd6alNiZWE4SWdZMmIzST0iCiAgICAgIH0KICAgIH0sCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vY3RmZS5zaWdzdG9yZS5kZXYvMjAyMiIsCiAgICAgICJoYXNoQWxnb3JpdGhtIjogIlNIQTJfMjU2IiwKICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAicmF3Qnl0ZXMiOiAiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaVBTbEZpMENtRlRmRWpDVXFGOUh1Q0VjWVhOS0FhWWFsSUptQlo4eXllelBqVHFoeHJLQnBNbmFvY1Z0TEpCSTFlTTN1WG5RelFHQUpkSjRnczlGeXc9PSIsCiAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICJzdGFydCI6ICIyMDIyLTEwLTIwVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgfQogICAgICB9LAogICAgICAibG9nSWQiOiB7CiAgICAgICAgImtleUlkIjogIjNUMHdhc2JIRVRKakdSNGNtV2MzQXFKS1hyamVQSzMvaDRweWdDOHA3bzQ9IgogICAgICB9CiAgICB9CiAgXSwKICAidGltZXN0YW1wQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAiR2l0SHViLCBJbmMuIiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJJbnRlcm5hbCBTZXJ2aWNlcyBSb290IgogICAgICB9LAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCM0RDQ0FXS2dBd0lCQWdJVWNoa05zSDM2WGEwNGIxTHFJYytxcjlEVmVjTXdDZ1lJS29aSXpqMEVBd013TWpFVk1CTUdBMVVFQ2hNTVIybDBTSFZpTENCSmJtTXVNUmt3RndZRFZRUURFeEJVVTBFZ2FXNTBaWEp0WldScFlYUmxNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVEkwTURReE16QXdNREF3TUZvd01qRVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVJrd0Z3WURWUVFERXhCVVUwRWdWR2x0WlhOMFlXMXdhVzVuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFVUQ1Wk5iU3FZTWQ2cjhxcE9PRVg5aWJHblpUOUdzdVhPaHIvZjhVOUZKdWdCR0V4S1lwNDBPVUxTMGVyalpXN3hWOXhWNTJObkpmNU9lRHE0ZTVaS3FOV01GUXdEZ1lEVlIwUEFRSC9CQVFEQWdlQU1CTUdBMVVkSlFRTU1Bb0dDQ3NHQVFVRkJ3TUlNQXdHQTFVZEV3RUIvd1FDTUFBd0h3WURWUjBqQkJnd0ZvQVVhVzFSdWRPZ1Z0MGxlcVkwV0tZYnVQcjQ3d0F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl3YlVIOUh2RDRlakNaSk9XUW5xQWxrcVVSbGx2dTlNOCtWcUxiaVJLK3pTZlpDWndzaWxqUm44TVFRUlNrWEVFNUFqRUFnK1Z4cXRvamZWZnU4RGh6emhDeDlHS0VUYkpIYjE5aVY3Mm1NS1ViREFGbXpaNmJROGI1NFpiOHRpZHk1YVdlIgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUNFRENDQVpXZ0F3SUJBZ0lVWDhaTzVRWFA3dk40ZE1RNWU5c1UzbnViOE9nd0NnWUlLb1pJemowRUF3TXdPREVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1SOHdIUVlEVlFRREV4WkpiblJsY201aGJDQlRaWEoyYVdObGN5QlNiMjkwTUI0WERUSXpNRFF4TkRBd01EQXdNRm9YRFRJNE1EUXhNakF3TURBd01Gb3dNakVWTUJNR0ExVUVDaE1NUjJsMFNIVmlMQ0JKYm1NdU1Sa3dGd1lEVlFRREV4QlVVMEVnYVc1MFpYSnRaV1JwWVhSbE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFdk1MWS9kVFZidklKWUFOQXVzekV3Sm5RRTFsbGZ0eW55TUtJTWhoNDhIbXFiVnI1eWd5YnpzTFJMVktiQldPZFoyMWFlSnorZ1ppeXRaZXRxY3lGOVdsRVI1TkVNZjZKVjdaTm9qUXB4SHE0UkhHb0dTY2VRdi9xdlRpWnhFREtvMll3WkRBT0JnTlZIUThCQWY4RUJBTUNBUVl3RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVWFXMVJ1ZE9nVnQwbGVxWTBXS1lidVByNDd3QXdId1lEVlIwakJCZ3dGb0FVOU5ZWWxvYm5BRzRjMC9xanh5SC9scS93eitRd0NnWUlLb1pJemowRUF3TURhUUF3WmdJeEFLMUIxODV5Z0NySVlGbElzM0dqc3dqbndTTUc2TFk4d29MVmRha0tEWnhWYThmOGNxTXMxRGhjeEowKzA5dzk1UUl4QU8rdEJ6Wms3dmpVSjlpSmdENFI2WldUeFFXS3FObTc0ak85OW8rbzlzdjRGSS9TWlRaVEZ5TW4wSUpFSGRObXlBPT0iCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQjlEQ0NBWHFnQXdJQkFnSVVhL0pBa2RVaks0SlV3c3F0YWlSSkdXaHFMU293Q2dZSUtvWkl6ajBFQXdNd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNQjRYRFRJek1EUXhOREF3TURBd01Gb1hEVE16TURReE1UQXdNREF3TUZvd09ERVZNQk1HQTFVRUNoTU1SMmwwU0hWaUxDQkpibU11TVI4d0hRWURWUVFERXhaSmJuUmxjbTVoYkNCVFpYSjJhV05sY3lCU2IyOTBNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRWY5akZBWHh6NGt4NjhBSFJNT2tGQmhmbERjTVR2emFYejR4L0ZDY1hqSi8xcUVLb24vcVBJR25hVVJza0R0eU5iTkRPcGVKVERERnF0NDhpTVBybnpweDZJWndxZW1mVUpONHhCRVpmemErcFl0L2l5b2QrOXRacjIwUlJXU3YvbzBVd1F6QU9CZ05WSFE4QkFmOEVCQU1DQVFZd0VnWURWUjBUQVFIL0JBZ3dCZ0VCL3dJQkFqQWRCZ05WSFE0RUZnUVU5TllZbG9ibkFHNGMwL3FqeHlIL2xxL3d6K1F3Q2dZSUtvWkl6ajBFQXdNRGFBQXdaUUl4QUxaTFo4QmdSWHpLeExNTU45VklsTytlNGhyQm5OQmdGN3R6N0hucm93djJOZXRaRXJJQUNLRnltQmx2V0R2dE1BSXdaTytraTZzc1ExYnNabzk4TzhtRUFmMk5aN2lpQ2dERFUwVndqZWNvNnp5ZWgwekJUczkvN2dWNkFITlE1M3hEIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIzLTA0LTE0VDAwOjAwOjAwLjAwMFoiCiAgICAgIH0KICAgIH0KICBdCn0K","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}}});var lNe=L(m1=>{"use strict";var aNe=m1&&m1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(m1,"__esModule",{value:!0});m1.TUFClient=void 0;var Qg=aNe(Ie("fs")),$b=aNe(Ie("path")),U3t=iNe(),H3t=gL(),j3t=sNe(),SJ="targets",vJ=class{constructor(e){let r=new URL(e.mirrorURL),s=encodeURIComponent(r.host+r.pathname.replace(/\/$/,"")),a=$b.default.join(e.cachePath,s);q3t(a),G3t({cachePath:a,mirrorURL:e.mirrorURL,tufRootPath:e.rootPath,forceInit:e.forceInit}),this.updater=W3t({mirrorURL:e.mirrorURL,cachePath:a,forceCache:e.forceCache,retry:e.retry,timeout:e.timeout})}async refresh(){return this.updater.refresh()}getTarget(e){return(0,j3t.readTarget)(this.updater,e)}};m1.TUFClient=vJ;function q3t(t){let e=$b.default.join(t,SJ);Qg.default.existsSync(t)||Qg.default.mkdirSync(t,{recursive:!0}),Qg.default.existsSync(e)||Qg.default.mkdirSync(e)}function G3t({cachePath:t,mirrorURL:e,tufRootPath:r,forceInit:s}){let a=$b.default.join(t,"root.json");if(!Qg.default.existsSync(a)||s)if(r)Qg.default.copyFileSync(r,a);else{let c=oNe()[e];if(!c)throw new H3t.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${e}`});Qg.default.writeFileSync(a,Buffer.from(c["root.json"],"base64")),Object.entries(c.targets).forEach(([f,p])=>{Qg.default.writeFileSync($b.default.join(t,SJ,f),Buffer.from(p,"base64"))})}}function W3t(t){let e={fetchTimeout:t.timeout,fetchRetry:t.retry};return new U3t.Updater({metadataBaseUrl:t.mirrorURL,targetBaseUrl:`${t.mirrorURL}/targets`,metadataDir:t.cachePath,targetDir:$b.default.join(t.cachePath,SJ),forceCache:t.forceCache,config:e})}});var gL=L(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.TUFError=mh.DEFAULT_MIRROR_URL=void 0;mh.getTrustedRoot=$3t;mh.initTUF=e8t;var Y3t=bb(),V3t=HRe(),K3t=lNe();mh.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";var J3t="sigstore-js",z3t={retries:2},Z3t=5e3,X3t="trusted_root.json";async function $3t(t={}){let r=await cNe(t).getTarget(X3t);return Y3t.TrustedRoot.fromJSON(JSON.parse(r))}async function e8t(t={}){let e=cNe(t);return e.refresh().then(()=>e)}function cNe(t){return new K3t.TUFClient({cachePath:t.cachePath||(0,V3t.appDataPath)(J3t),rootPath:t.rootPath,mirrorURL:t.mirrorURL||mh.DEFAULT_MIRROR_URL,retry:t.retry??z3t,timeout:t.timeout??Z3t,forceCache:t.forceCache??!1,forceInit:t.forceInit??t.force??!1})}var t8t=BJ();Object.defineProperty(mh,"TUFError",{enumerable:!0,get:function(){return t8t.TUFError}})});var uNe=L(dL=>{"use strict";Object.defineProperty(dL,"__esModule",{value:!0});dL.DSSESignatureContent=void 0;var eP=wl(),DJ=class{constructor(e){this.env=e}compareDigest(e){return eP.crypto.bufferEqual(e,eP.crypto.digest("sha256",this.env.payload))}compareSignature(e){return eP.crypto.bufferEqual(e,this.signature)}verifySignature(e){return eP.crypto.verify(this.preAuthEncoding,e,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return eP.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};dL.DSSESignatureContent=DJ});var fNe=L(mL=>{"use strict";Object.defineProperty(mL,"__esModule",{value:!0});mL.MessageSignatureContent=void 0;var bJ=wl(),PJ=class{constructor(e,r){this.signature=e.signature,this.messageDigest=e.messageDigest.digest,this.artifact=r}compareSignature(e){return bJ.crypto.bufferEqual(e,this.signature)}compareDigest(e){return bJ.crypto.bufferEqual(e,this.messageDigest)}verifySignature(e){return bJ.crypto.verify(this.artifact,e,this.signature)}};mL.MessageSignatureContent=PJ});var pNe=L(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});yL.toSignedEntity=i8t;yL.signatureContent=ANe;var xJ=wl(),r8t=uNe(),n8t=fNe();function i8t(t,e){let{tlogEntries:r,timestampVerificationData:s}=t.verificationMaterial,a=[];for(let n of r)a.push({$case:"transparency-log",tlogEntry:n});for(let n of s?.rfc3161Timestamps??[])a.push({$case:"timestamp-authority",timestamp:xJ.RFC3161Timestamp.parse(n.signedTimestamp)});return{signature:ANe(t,e),key:s8t(t),tlogEntries:r,timestamps:a}}function ANe(t,e){switch(t.content.$case){case"dsseEnvelope":return new r8t.DSSESignatureContent(t.content.dsseEnvelope);case"messageSignature":return new n8t.MessageSignatureContent(t.content.messageSignature,e)}}function s8t(t){switch(t.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:t.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:xJ.X509Certificate.parse(t.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case"certificate":return{$case:"certificate",certificate:xJ.X509Certificate.parse(t.verificationMaterial.content.certificate.rawBytes)}}}});var Co=L(y1=>{"use strict";Object.defineProperty(y1,"__esModule",{value:!0});y1.PolicyError=y1.VerificationError=void 0;var EL=class extends Error{constructor({code:e,message:r,cause:s}){super(r),this.code=e,this.cause=s,this.name=this.constructor.name}},kJ=class extends EL{};y1.VerificationError=kJ;var QJ=class extends EL{};y1.PolicyError=QJ});var hNe=L(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});IL.filterCertAuthorities=o8t;IL.filterTLogAuthorities=a8t;function o8t(t,e){return t.filter(r=>r.validFor.start<=e.start&&r.validFor.end>=e.end)}function a8t(t,e){return t.filter(r=>e.logID&&!r.logID.equals(e.logID)?!1:r.validFor.start<=e.targetDate&&e.targetDate<=r.validFor.end)}});var Ay=L(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.filterTLogAuthorities=fy.filterCertAuthorities=void 0;fy.toTrustMaterial=c8t;var TJ=wl(),tP=bb(),l8t=Co(),RJ=new Date(0),FJ=new Date(864e13),mNe=hNe();Object.defineProperty(fy,"filterCertAuthorities",{enumerable:!0,get:function(){return mNe.filterCertAuthorities}});Object.defineProperty(fy,"filterTLogAuthorities",{enumerable:!0,get:function(){return mNe.filterTLogAuthorities}});function c8t(t,e){let r=typeof e=="function"?e:u8t(e);return{certificateAuthorities:t.certificateAuthorities.map(dNe),timestampAuthorities:t.timestampAuthorities.map(dNe),tlogs:t.tlogs.map(gNe),ctlogs:t.ctlogs.map(gNe),publicKey:r}}function gNe(t){let e=t.publicKey.keyDetails,r=e===tP.PublicKeyDetails.PKCS1_RSA_PKCS1V5||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V5||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||e===tP.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{logID:t.logId.keyId,publicKey:TJ.crypto.createPublicKey(t.publicKey.rawBytes,r),validFor:{start:t.publicKey.validFor?.start||RJ,end:t.publicKey.validFor?.end||FJ}}}function dNe(t){return{certChain:t.certChain.certificates.map(e=>TJ.X509Certificate.parse(e.rawBytes)),validFor:{start:t.validFor?.start||RJ,end:t.validFor?.end||FJ}}}function u8t(t){return e=>{let r=(t||{})[e];if(!r)throw new l8t.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:TJ.crypto.createPublicKey(r.rawBytes),validFor:s=>(r.validFor?.start||RJ)<=s&&(r.validFor?.end||FJ)>=s}}}});var NJ=L(rP=>{"use strict";Object.defineProperty(rP,"__esModule",{value:!0});rP.CertificateChainVerifier=void 0;rP.verifyCertificateChain=A8t;var py=Co(),f8t=Ay();function A8t(t,e){let r=(0,f8t.filterCertAuthorities)(e,{start:t.notBefore,end:t.notAfter}),s;for(let a of r)try{return new CL({trustedCerts:a.certChain,untrustedCert:t}).verify()}catch(n){s=n}throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:s})}var CL=class{constructor(e){this.untrustedCert=e.untrustedCert,this.trustedCerts=e.trustedCerts,this.localCerts=p8t([...e.trustedCerts,e.untrustedCert])}verify(){let e=this.sort();return this.checkPath(e),e}sort(){let e=this.untrustedCert,r=this.buildPaths(e);if(r=r.filter(a=>a.some(n=>this.trustedCerts.includes(n))),r.length===0)throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"});let s=r.reduce((a,n)=>a.length{if(s&&a.extSubjectKeyID){a.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(a);return}a.subject.equals(e.issuer)&&r.push(a)}),r=r.filter(a=>{try{return e.verify(a)}catch{return!1}}),r)}checkPath(e){if(e.length<1)throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"});if(!e.slice(1).every(s=>s.isCA))throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"});for(let s=e.length-2;s>=0;s--)if(!e[s].issuer.equals(e[s+1].subject))throw new py.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"});for(let s=0;s{"use strict";Object.defineProperty(OJ,"__esModule",{value:!0});OJ.verifySCTs=d8t;var wL=wl(),h8t=Co(),g8t=Ay();function d8t(t,e,r){let s,a=t.clone();for(let p=0;p{if(!(0,g8t.filterTLogAuthorities)(r,{logID:p.logID,targetDate:p.datetime}).some(C=>p.verify(n.buffer,C.publicKey)))throw new h8t.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"});return p.logID})}});var INe=L(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});BL.verifyPublicKey=w8t;BL.verifyCertificate=B8t;var m8t=wl(),ENe=Co(),y8t=NJ(),E8t=yNe(),I8t="1.3.6.1.4.1.57264.1.1",C8t="1.3.6.1.4.1.57264.1.8";function w8t(t,e,r){let s=r.publicKey(t);return e.forEach(a=>{if(!s.validFor(a))throw new ENe.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${a.toISOString()}`})}),{key:s.publicKey}}function B8t(t,e,r){let s=(0,y8t.verifyCertificateChain)(t,r.certificateAuthorities);if(!e.every(n=>s.every(c=>c.validForDate(n))))throw new ENe.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"});return{scts:(0,E8t.verifySCTs)(s[0],s[1],r.ctlogs),signer:v8t(s[0])}}function v8t(t){let e,r=t.extension(C8t);r?e=r.valueObj.subs?.[0]?.value.toString("ascii"):e=t.extension(I8t)?.value.toString("ascii");let s={extensions:{issuer:e},subjectAlternativeName:t.subjectAltName};return{key:m8t.crypto.createPublicKey(t.publicKey),identity:s}}});var wNe=L(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});vL.verifySubjectAlternativeName=S8t;vL.verifyExtensions=D8t;var CNe=Co();function S8t(t,e){if(e===void 0||!e.match(t))throw new CNe.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${t}, got ${e}`})}function D8t(t,e={}){let r;for(r in t)if(e[r]!==t[r])throw new CNe.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${r}=${t[r]}, got ${r}=${e[r]}`})}});var BNe=L(HJ=>{"use strict";Object.defineProperty(HJ,"__esModule",{value:!0});HJ.verifyCheckpoint=x8t;var MJ=wl(),E1=Co(),b8t=Ay(),LJ=` + +`,P8t=/\u2014 (\S+) (\S+)\n/g;function x8t(t,e){let r=(0,b8t.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=_J.fromString(s.checkpoint.envelope),n=UJ.fromString(a.note);if(!k8t(a,r))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!MJ.crypto.bufferEqual(n.logHash,s.rootHash))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}function k8t(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.every(s=>{let a=e.find(n=>MJ.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?MJ.crypto.verify(r,a.publicKey,s.signature):!1})}var _J=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(LJ))throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(LJ),s=e.slice(0,r+1),n=e.slice(r+LJ.length).matchAll(P8t),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,"base64");if(E.length<5)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,c)}},UJ=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(` +`);if(r.length<3)throw new E1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],"base64"),c=r.slice(3);return new t(s,a,n,c)}}});var vNe=L(WJ=>{"use strict";Object.defineProperty(WJ,"__esModule",{value:!0});WJ.verifyMerkleInclusion=R8t;var GJ=wl(),jJ=Co(),Q8t=Buffer.from([0]),T8t=Buffer.from([1]);function R8t(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${r}`});let{inner:a,border:n}=F8t(r,s);if(e.hashes.length!==a+n)throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=U8t(t.canonicalizedBody),h=O8t(N8t(p,c,r),f);if(!GJ.crypto.bufferEqual(h,e.rootHash))throw new jJ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function F8t(t,e){let r=L8t(t,e),s=M8t(t>>BigInt(r));return{inner:r,border:s}}function N8t(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?qJ(a,s):qJ(s,a),t)}function O8t(t,e){return e.reduce((r,s)=>qJ(s,r),t)}function L8t(t,e){return _8t(t^e-BigInt(1))}function M8t(t){return t.toString(2).split("1").length-1}function _8t(t){return t===0n?0:t.toString(2).length}function qJ(t,e){return GJ.crypto.digest("sha256",T8t,t,e)}function U8t(t){return GJ.crypto.digest("sha256",Q8t,t)}});var DNe=L(YJ=>{"use strict";Object.defineProperty(YJ,"__esModule",{value:!0});YJ.verifyTLogSET=q8t;var SNe=wl(),H8t=Co(),j8t=Ay();function q8t(t,e){if(!(0,j8t.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=G8t(t),c=Buffer.from(SNe.json.canonicalize(n),"utf8"),f=t.inclusionPromise.signedEntryTimestamp;return SNe.crypto.verify(c,a.publicKey,f)}))throw new H8t.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function G8t(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var bNe=L(JJ=>{"use strict";Object.defineProperty(JJ,"__esModule",{value:!0});JJ.verifyRFC3161Timestamp=V8t;var VJ=wl(),KJ=Co(),W8t=NJ(),Y8t=Ay();function V8t(t,e,r){let s=t.signingTime;if(r=(0,Y8t.filterCertAuthorities)(r,{start:s,end:s}),r=J8t(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return K8t(t,e,n),!0}catch{return!1}}))throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}function K8t(t,e,r){let[s,...a]=r.certChain,n=VJ.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new W8t.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new KJ.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp was signed with an expired certificate"});t.verify(e,n)}function J8t(t,e){return t.filter(r=>r.certChain.length>0&&VJ.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&VJ.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var PNe=L(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});SL.verifyTSATimestamp=tHt;SL.verifyTLogTimestamp=rHt;var z8t=Co(),Z8t=BNe(),X8t=vNe(),$8t=DNe(),eHt=bNe();function tHt(t,e,r){return(0,eHt.verifyRFC3161Timestamp)(t,e,r),{type:"timestamp-authority",logID:t.signerSerialNumber,timestamp:t.signingTime}}function rHt(t,e){let r=!1;if(nHt(t)&&((0,$8t.verifyTLogSET)(t,e),r=!0),iHt(t)&&((0,X8t.verifyMerkleInclusion)(t),(0,Z8t.verifyCheckpoint)(t,e),r=!0),!r)throw new z8t.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function nHt(t){return t.inclusionPromise!==void 0}function iHt(t){return t.inclusionProof!==void 0}});var xNe=L(zJ=>{"use strict";Object.defineProperty(zJ,"__esModule",{value:!0});zJ.verifyDSSETLogBody=sHt;var DL=Co();function sHt(t,e){switch(t.apiVersion){case"0.0.1":return oHt(t,e);default:throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${t.apiVersion}`})}}function oHt(t,e){if(t.spec.signatures?.length!==1)throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,"base64")))throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=t.spec.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new DL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}});var kNe=L(XJ=>{"use strict";Object.defineProperty(XJ,"__esModule",{value:!0});XJ.verifyHashedRekordTLogBody=aHt;var ZJ=Co();function aHt(t,e){switch(t.apiVersion){case"0.0.1":return lHt(t,e);default:throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${t.apiVersion}`})}}function lHt(t,e){let r=t.spec.signature.content||"";if(!e.compareSignature(Buffer.from(r,"base64")))throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"});let s=t.spec.data.hash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new ZJ.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}});var QNe=L($J=>{"use strict";Object.defineProperty($J,"__esModule",{value:!0});$J.verifyIntotoTLogBody=cHt;var bL=Co();function cHt(t,e){switch(t.apiVersion){case"0.0.2":return uHt(t,e);default:throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${t.apiVersion}`})}}function uHt(t,e){if(t.spec.content.envelope.signatures?.length!==1)throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=fHt(t.spec.content.envelope.signatures[0].sig);if(!e.compareSignature(Buffer.from(r,"base64")))throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=t.spec.content.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new bL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}function fHt(t){return Buffer.from(t,"base64").toString("utf-8")}});var RNe=L(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0});ez.verifyTLogBody=gHt;var TNe=Co(),AHt=xNe(),pHt=kNe(),hHt=QNe();function gHt(t,e){let{kind:r,version:s}=t.kindVersion,a=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==a.kind||s!==a.apiVersion)throw new TNe.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${s}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case"dsse":return(0,AHt.verifyDSSETLogBody)(a,e);case"intoto":return(0,hHt.verifyIntotoTLogBody)(a,e);case"hashedrekord":return(0,pHt.verifyHashedRekordTLogBody)(a,e);default:throw new TNe.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}});var MNe=L(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});PL.Verifier=void 0;var dHt=Ie("util"),I1=Co(),FNe=INe(),NNe=wNe(),ONe=PNe(),mHt=RNe(),tz=class{constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,tsaThreshold:r.tsaThreshold??0}}verify(e,r){let s=this.verifyTimestamps(e),a=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verifySignature(e,a),r&&this.verifyPolicy(r,a.identity||{}),a}verifyTimestamps(e){let r=0,s=0,a=e.timestamps.map(n=>{switch(n.$case){case"timestamp-authority":return s++,(0,ONe.verifyTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return r++,(0,ONe.verifyTLogTimestamp)(n.tlogEntry,this.trustMaterial.tlogs)}});if(LNe(a))throw new I1.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(rn.timestamp)}verifySigningKey({key:e},r){switch(e.$case){case"public-key":return(0,FNe.verifyPublicKey)(e.hint,r,this.trustMaterial);case"certificate":{let s=(0,FNe.verifyCertificate)(e.certificate,r,this.trustMaterial);if(LNe(s.scts))throw new I1.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"});if(s.scts.length(0,mHt.verifyTLogBody)(s,e))}verifySignature(e,r){if(!e.signature.verifySignature(r.key))throw new I1.VerificationError({code:"SIGNATURE_ERROR",message:"signature verification failed"})}verifyPolicy(e,r){e.subjectAlternativeName&&(0,NNe.verifySubjectAlternativeName)(e.subjectAlternativeName,r.subjectAlternativeName),e.extensions&&(0,NNe.verifyExtensions)(e.extensions,r.extensions)}};PL.Verifier=tz;function LNe(t){for(let e=0;e{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.Verifier=ou.toTrustMaterial=ou.VerificationError=ou.PolicyError=ou.toSignedEntity=void 0;var yHt=pNe();Object.defineProperty(ou,"toSignedEntity",{enumerable:!0,get:function(){return yHt.toSignedEntity}});var _Ne=Co();Object.defineProperty(ou,"PolicyError",{enumerable:!0,get:function(){return _Ne.PolicyError}});Object.defineProperty(ou,"VerificationError",{enumerable:!0,get:function(){return _Ne.VerificationError}});var EHt=Ay();Object.defineProperty(ou,"toTrustMaterial",{enumerable:!0,get:function(){return EHt.toTrustMaterial}});var IHt=MNe();Object.defineProperty(ou,"Verifier",{enumerable:!0,get:function(){return IHt.Verifier}})});var UNe=L(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.DEFAULT_TIMEOUT=Na.DEFAULT_RETRY=void 0;Na.createBundleBuilder=BHt;Na.createKeyFinder=vHt;Na.createVerificationPolicy=SHt;var CHt=wl(),C1=pK(),wHt=xL();Na.DEFAULT_RETRY={retries:2};Na.DEFAULT_TIMEOUT=5e3;function BHt(t,e){let r={signer:DHt(e),witnesses:PHt(e)};switch(t){case"messageSignature":return new C1.MessageSignatureBundleBuilder(r);case"dsseEnvelope":return new C1.DSSEBundleBuilder({...r,certificateChain:e.legacyCompatibility})}}function vHt(t){return e=>{let r=t(e);if(!r)throw new wHt.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${e}`});return{publicKey:CHt.crypto.createPublicKey(r),validFor:()=>!0}}}function SHt(t){let e={},r=t.certificateIdentityEmail||t.certificateIdentityURI;return r&&(e.subjectAlternativeName=r),t.certificateIssuer&&(e.extensions={issuer:t.certificateIssuer}),e}function DHt(t){return new C1.FulcioSigner({fulcioBaseURL:t.fulcioURL,identityProvider:t.identityProvider||bHt(t),retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})}function bHt(t){let e=t.identityToken;return e?{getToken:()=>Promise.resolve(e)}:new C1.CIContextProvider("sigstore")}function PHt(t){let e=[];return xHt(t)&&e.push(new C1.RekorWitness({rekorBaseURL:t.rekorURL,entryType:t.legacyCompatibility?"intoto":"dsse",fetchOnConflict:!1,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),kHt(t)&&e.push(new C1.TSAWitness({tsaBaseURL:t.tsaServerURL,retry:t.retry??Na.DEFAULT_RETRY,timeout:t.timeout??Na.DEFAULT_TIMEOUT})),e}function xHt(t){return t.tlogUpload!==!1}function kHt(t){return t.tsaServerURL!==void 0}});var qNe=L(au=>{"use strict";var QHt=au&&au.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),THt=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HNe=au&&au.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var s=[];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(s[s.length]=a);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var s=t(e),a=0;aa.verify(t,s))}async function jNe(t={}){let e=await RHt.getTrustedRoot({mirrorURL:t.tufMirrorURL,rootPath:t.tufRootPath,cachePath:t.tufCachePath,forceCache:t.tufForceCache,retry:t.retry??w1.DEFAULT_RETRY,timeout:t.timeout??w1.DEFAULT_TIMEOUT}),r=t.keySelector?w1.createKeyFinder(t.keySelector):void 0,s=(0,rz.toTrustMaterial)(e,r),a={ctlogThreshold:t.ctLogThreshold,tlogThreshold:t.tlogThreshold},n=new rz.Verifier(s,a),c=w1.createVerificationPolicy(t);return{verify:(f,p)=>{let h=(0,nz.bundleFromJSON)(f),E=(0,rz.toSignedEntity)(h,p);n.verify(E,c)}}}});var WNe=L(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.verify=Oi.sign=Oi.createVerifier=Oi.attest=Oi.VerificationError=Oi.PolicyError=Oi.TUFError=Oi.InternalError=Oi.DEFAULT_REKOR_URL=Oi.DEFAULT_FULCIO_URL=Oi.ValidationError=void 0;var LHt=xb();Object.defineProperty(Oi,"ValidationError",{enumerable:!0,get:function(){return LHt.ValidationError}});var iz=pK();Object.defineProperty(Oi,"DEFAULT_FULCIO_URL",{enumerable:!0,get:function(){return iz.DEFAULT_FULCIO_URL}});Object.defineProperty(Oi,"DEFAULT_REKOR_URL",{enumerable:!0,get:function(){return iz.DEFAULT_REKOR_URL}});Object.defineProperty(Oi,"InternalError",{enumerable:!0,get:function(){return iz.InternalError}});var MHt=gL();Object.defineProperty(Oi,"TUFError",{enumerable:!0,get:function(){return MHt.TUFError}});var GNe=xL();Object.defineProperty(Oi,"PolicyError",{enumerable:!0,get:function(){return GNe.PolicyError}});Object.defineProperty(Oi,"VerificationError",{enumerable:!0,get:function(){return GNe.VerificationError}});var kL=qNe();Object.defineProperty(Oi,"attest",{enumerable:!0,get:function(){return kL.attest}});Object.defineProperty(Oi,"createVerifier",{enumerable:!0,get:function(){return kL.createVerifier}});Object.defineProperty(Oi,"sign",{enumerable:!0,get:function(){return kL.sign}});Object.defineProperty(Oi,"verify",{enumerable:!0,get:function(){return kL.verify}})});var IOe=L((Fvr,EOe)=>{var Kjt=Y4();function Jjt(t){return Kjt(t)?void 0:t}EOe.exports=Jjt});var wOe=L((Nvr,COe)=>{var zjt=QT(),Zjt=w5(),Xjt=D5(),$jt=Im(),e6t=Vd(),t6t=IOe(),r6t=dG(),n6t=C5(),i6t=1,s6t=2,o6t=4,a6t=r6t(function(t,e){var r={};if(t==null)return r;var s=!1;e=zjt(e,function(n){return n=$jt(n,t),s||(s=n.length>1),n}),e6t(t,n6t(t),r),s&&(r=Zjt(r,i6t|s6t|o6t,t6t));for(var a=e.length;a--;)Xjt(r,e[a]);return r});COe.exports=a6t});bt();Ve();bt();var bOe=Ie("child_process"),POe=et(Rd());Wt();var $I=new Map([]);var $v={};Vt($v,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>ar,getCli:()=>XCe,getDynamicLibs:()=>ZCe,getPluginConfiguration:()=>tC,openWorkspace:()=>eC,pluginCommands:()=>$I,runExit:()=>KR});Wt();var ut=class extends ot{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new nt("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ve();bt();Wt();var ar=class extends nt{constructor(e,r){let s=K.relative(e,r),a=K.join(e,Ht.fileName);super(`This command can only be run from within a workspace of your project (${s} isn't a workspace of ${a}).`)}};Ve();bt();rA();Bc();wv();Wt();var mwt=et(Ai());Ul();var ZCe=()=>new Map([["@yarnpkg/cli",$v],["@yarnpkg/core",Xv],["@yarnpkg/fslib",U2],["@yarnpkg/libzip",Iv],["@yarnpkg/parsers",K2],["@yarnpkg/shell",Dv],["clipanion",oB],["semver",mwt],["typanion",Ia]]);Ve();async function eC(t,e){let{project:r,workspace:s}=await Tt.find(t,e);if(!s)throw new ar(r.cwd,e);return s}Ve();bt();rA();Bc();wv();Wt();var d6t=et(Ai());Ul();var Y5={};Vt(Y5,{AddCommand:()=>sC,BinCommand:()=>oC,CacheCleanCommand:()=>aC,ClipanionCommand:()=>pC,ConfigCommand:()=>fC,ConfigGetCommand:()=>lC,ConfigSetCommand:()=>cC,ConfigUnsetCommand:()=>uC,DedupeCommand:()=>AC,EntryCommand:()=>gC,ExecCommand:()=>mC,ExplainCommand:()=>IC,ExplainPeerRequirementsCommand:()=>yC,HelpCommand:()=>hC,InfoCommand:()=>CC,LinkCommand:()=>BC,NodeCommand:()=>vC,PluginCheckCommand:()=>SC,PluginImportCommand:()=>PC,PluginImportSourcesCommand:()=>xC,PluginListCommand:()=>DC,PluginRemoveCommand:()=>kC,PluginRuntimeCommand:()=>QC,RebuildCommand:()=>TC,RemoveCommand:()=>RC,RunCommand:()=>NC,RunIndexCommand:()=>FC,SetResolutionCommand:()=>OC,SetVersionCommand:()=>EC,SetVersionSourcesCommand:()=>bC,UnlinkCommand:()=>LC,UpCommand:()=>MC,VersionCommand:()=>dC,WhyCommand:()=>_C,WorkspaceCommand:()=>GC,WorkspacesListCommand:()=>qC,YarnCommand:()=>wC,dedupeUtils:()=>iF,default:()=>ASt,suggestUtils:()=>Xu});var xBe=et(Rd());Ve();Ve();Ve();Wt();var _1e=et(nS());Ul();var Xu={};Vt(Xu,{Modifier:()=>d5,Strategy:()=>tF,Target:()=>iS,WorkspaceModifier:()=>F1e,applyModifier:()=>L1t,extractDescriptorFromPath:()=>m5,extractRangeModifier:()=>N1e,fetchDescriptorFrom:()=>y5,findProjectDescriptors:()=>M1e,getModifier:()=>sS,getSuggestedDescriptors:()=>oS,makeWorkspaceDescriptor:()=>L1e,toWorkspaceModifier:()=>O1e});Ve();Ve();bt();var g5=et(Ai()),N1t="workspace:",iS=(s=>(s.REGULAR="dependencies",s.DEVELOPMENT="devDependencies",s.PEER="peerDependencies",s))(iS||{}),d5=(s=>(s.CARET="^",s.TILDE="~",s.EXACT="",s))(d5||{}),F1e=(s=>(s.CARET="^",s.TILDE="~",s.EXACT="*",s))(F1e||{}),tF=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(tF||{});function sS(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var O1t=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function N1e(t,{project:e}){let r=t.match(O1t);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function L1t(t,e){let{protocol:r,source:s,params:a,selector:n}=q.parseRange(t.range);return g5.default.valid(n)&&(n=`${e}${t.range}`),q.makeDescriptor(t,q.makeRange({protocol:r,source:s,params:a,selector:n}))}function O1e(t){switch(t){case"^":return"^";case"~":return"~";case"":return"*";default:throw new Error(`Assertion failed: Unknown modifier: "${t}"`)}}function L1e(t,e){return q.makeDescriptor(t.anchoredDescriptor,`${N1t}${O1e(e)}`)}async function M1e(t,{project:e,target:r}){let s=new Map,a=n=>{let c=s.get(n.descriptorHash);return c||s.set(n.descriptorHash,c={descriptor:n,locators:[]}),c};for(let n of e.workspaces)if(r==="peerDependencies"){let c=n.manifest.peerDependencies.get(t.identHash);c!==void 0&&a(c).locators.push(n.anchoredLocator)}else{let c=n.manifest.dependencies.get(t.identHash),f=n.manifest.devDependencies.get(t.identHash);r==="devDependencies"?f!==void 0?a(f).locators.push(n.anchoredLocator):c!==void 0&&a(c).locators.push(n.anchoredLocator):c!==void 0?a(c).locators.push(n.anchoredLocator):f!==void 0&&a(f).locators.push(n.anchoredLocator)}return s}async function m5(t,{cwd:e,workspace:r}){return await _1t(async s=>{K.isAbsolute(t)||(t=K.relative(r.cwd,K.resolve(e,t)),t.match(/^\.{0,2}\//)||(t=`./${t}`));let{project:a}=r,n=await y5(q.makeIdent(null,"archive"),t,{project:r.project,cache:s,workspace:r});if(!n)throw new Error("Assertion failed: The descriptor should have been found");let c=new Yi,f=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:s,fetcher:p,report:c,resolver:f},E=f.bindDescriptor(n,r.anchoredLocator,h),C=q.convertDescriptorToLocator(E),S=await p.fetch(C,h),P=await Ht.find(S.prefixPath,{baseFs:S.packageFs});if(!P.name)throw new Error("Target path doesn't have a name");return q.makeDescriptor(P.name,t)})}function M1t(t){if(t.range==="unknown")return{type:"resolve",range:"latest"};if(Or.validRange(t.range))return{type:"fixed",range:t.range};if(Up.test(t.range))return{type:"resolve",range:t.range};let e=t.range.match(/^(?:jsr:|npm:)(.*)/);if(!e)return{type:"fixed",range:t.range};let[,r]=e,s=`${q.stringifyIdent(t)}@`;return r.startsWith(s)&&(r=r.slice(s.length)),Or.validRange(r)?{type:"fixed",range:t.range}:Up.test(r)?{type:"resolve",range:t.range}:{type:"fixed",range:t.range}}async function oS(t,{project:e,workspace:r,cache:s,target:a,fixed:n,modifier:c,strategies:f,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let h=!n||t.range==="unknown"?M1t(t):{type:"fixed",range:t.range};if(h.type==="fixed")return{suggestions:[{descriptor:t,name:`Use ${q.prettyDescriptor(e.configuration,t)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let E=typeof r<"u"&&r!==null&&r.manifest[a].get(t.identHash)||null,C=[],S=[],P=async I=>{try{await I()}catch(R){S.push(R)}};for(let I of f){if(C.length>=p)break;switch(I){case"keep":await P(async()=>{E&&C.push({descriptor:E,name:`Keep ${q.prettyDescriptor(e.configuration,E)}`,reason:"(no changes)"})});break;case"reuse":await P(async()=>{for(let{descriptor:R,locators:N}of(await M1e(t,{project:e,target:a})).values()){if(N.length===1&&N[0].locatorHash===r.anchoredLocator.locatorHash&&f.includes("keep"))continue;let U=`(originally used by ${q.prettyLocator(e.configuration,N[0])}`;U+=N.length>1?` and ${N.length-1} other${N.length>2?"s":""})`:")",C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:U})}});break;case"cache":await P(async()=>{for(let R of e.storedDescriptors.values())R.identHash===t.identHash&&C.push({descriptor:R,name:`Reuse ${q.prettyDescriptor(e.configuration,R)}`,reason:"(already used somewhere in the lockfile)"})});break;case"project":await P(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let R=e.tryWorkspaceByIdent(t);if(R===null)return;let N=L1e(R,c);C.push({descriptor:N,name:`Attach ${q.prettyDescriptor(e.configuration,N)}`,reason:`(local workspace at ${he.pretty(e.configuration,R.relativeCwd,he.Type.PATH)})`})});break;case"latest":{let R=e.configuration.get("enableNetwork"),N=e.configuration.get("enableOfflineMode");await P(async()=>{if(a==="peerDependencies")C.push({descriptor:q.makeDescriptor(t,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!R&&!N)C.push({descriptor:null,name:"Resolve from latest",reason:he.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let U=await y5(t,h.range,{project:e,cache:s,workspace:r,modifier:c});U&&C.push({descriptor:U,name:`Use ${q.prettyDescriptor(e.configuration,U)}`,reason:`(resolved from ${N?"the cache":"latest"})`})}})}break}}return{suggestions:C.slice(0,p),rejections:S.slice(0,p)}}async function y5(t,e,{project:r,cache:s,workspace:a,preserveModifier:n=!0,modifier:c}){let f=r.configuration.normalizeDependency(q.makeDescriptor(t,e)),p=new Yi,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),C={project:r,fetcher:h,cache:s,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},S={...C,resolver:E,fetchOptions:C},P=E.bindDescriptor(f,a.anchoredLocator,S),I=await E.getCandidates(P,{},S);if(I.length===0)return null;let R=I[0],{protocol:N,source:U,params:W,selector:te}=q.parseRange(q.convertToManifestRange(R.reference));if(N===r.configuration.get("defaultProtocol")&&(N=null),g5.default.valid(te)){let ie=te;if(typeof c<"u")te=c+te;else if(n!==!1){let me=typeof n=="string"?n:f.range;te=N1e(me,{project:r})+te}let Ae=q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}));(await E.getCandidates(r.configuration.normalizeDependency(Ae),{},S)).length!==1&&(te=ie)}return q.makeDescriptor(R,q.makeRange({protocol:N,source:U,params:W,selector:te}))}async function _1t(t){return await le.mktempPromise(async e=>{let r=ze.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Jr(e,{configuration:r,check:!1,immutable:!1}))})}var sC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=ge.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=ge.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=ge.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=ge.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=ge.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=ge.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.silent=ge.Boolean("--silent",{hidden:!0});this.packages=ge.Rest()}static{this.paths=[["add"]]}static{this.usage=ot.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"],["Add a local package (gzipped tarball format) to the current workspace","$0 add local-package-name@file:../path/to/local-package-name-v0.1.2.tgz"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=f||r.get("preferReuse"),h=sS(this,s),E=[p?"reuse":void 0,"project",this.cached?"cache":void 0,"latest"].filter(W=>typeof W<"u"),C=f?1/0:1,S=W=>{let te=q.tryParseDescriptor(W.slice(4));return te?te.range==="unknown"?q.makeDescriptor(te,`jsr:${q.stringifyIdent(te)}@latest`):q.makeDescriptor(te,`jsr:${te.range}`):null},P=await Promise.all(this.packages.map(async W=>{let te=W.match(/^\.{0,2}\//)?await m5(W,{cwd:this.context.cwd,workspace:a}):W.startsWith("jsr:")?S(W):q.tryParseDescriptor(W),ie=W.match(/^(https?:|git@github)/);if(ie)throw new nt(`It seems you are trying to add a package using a ${he.pretty(r,`${ie[0]}...`,he.Type.RANGE)} url; we now require package names to be explicitly specified. +Try running the command again with the package name prefixed: ${he.pretty(r,"yarn add",he.Type.CODE)} ${he.pretty(r,q.makeDescriptor(q.makeIdent(null,"my-package"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!te)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let Ae=U1t(a,te,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(Ae.map(async me=>{let pe=await oS(te,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:C});return{request:te,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:te,suggestedDescriptors:{suggestions:ie,rejections:Ae}}of P)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=Ae;if(typeof me>"u")throw new Error("Assertion failed: Expected an error to have been set");s.configuration.get("enableNetwork")?W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range`):W.reportError(27,`${q.prettyDescriptor(r,te)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let R=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:te}of P){let ie,Ae=W.filter(Be=>Be.descriptor!==null),ce=Ae[0].descriptor,me=Ae.every(Be=>q.areDescriptorsEqual(Be.descriptor,ce));Ae.length===1||me?ie=ce:(R=!0,{answer:ie}=await(0,_1e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[te].get(ie.identHash);(typeof pe>"u"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[te].set(ie.identHash,ie),this.optional&&(te==="dependencies"?a.manifest.ensureDependencyMeta({...ie,range:"unknown"}).optional=!0:te==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:"unknown"}).optional=!0)),typeof pe>"u"?N.push([a,te,ie,E]):U.push([a,te,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),R&&this.context.stdout.write(` +`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function U1t(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package "${q.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:f?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ve();Ve();Wt();var oC=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=ge.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=ot.Usage({description:"get the path to a binary script",details:` + When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary. + + When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive. + `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named "${this.name}" for package "${q.prettyLocator(r,a)}"`);let[,p]=f;return this.context.stdout.write(`${p} +`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,C)=>Math.max(E,C.length),0);for(let[E,[C,S]]of f)c.reportJson({name:E,source:q.stringifyIdent(C),path:S});if(this.verbose)for(let[E,[C]]of f)c.reportInfo(null,`${E.padEnd(h," ")} ${q.prettyLocator(r,C)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ve();bt();Wt();var aC=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=ot.Usage({description:"remove the shared cache files",details:` + This command will remove all the files from the cache. + `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new nt("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let s=await Jr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await le.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await le.removePromise(s.cwd)})).exitCode()}};Ve();Wt();var H1e=et(aS()),E5=Ie("util"),lC=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}static{this.paths=[["config","get"]]}static{this.usage=ot.Usage({description:"read a configuration settings",details:` + This command will print a configuration setting. + + Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value. + `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(s)>"u")throw new nt(`Couldn't find a configuration settings named "${s}"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?(0,H1e.default)(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p} +`),h.exitCode();E5.inspect.styles.name="cyan",this.context.stdout.write(`${(0,E5.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})} +`)}return h.exitCode()}};Ve();Wt();var Q2e=et(B5()),T2e=et(aS()),R2e=et(v5()),S5=Ie("util"),cC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}static{this.paths=[["config","set"]]}static{this.usage=ot.Usage({description:"change a configuration settings",details:` + This command will set a configuration setting. + + When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean). + + When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects. + `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new nt("This setting only affects the file it's in, and thus cannot be set from the CLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let R=(0,Q2e.default)(I);return(0,R2e.default)(R,this.name,f),R}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),C=je.convertMapsToIndexableObjects(E),S=n?(0,T2e.default)(C,n):C;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{S5.inspect.styles.name="cyan",I.reportInfo(0,`Successfully set ${this.name} to ${(0,S5.inspect)(S,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ve();Wt();var G2e=et(B5()),W2e=et(L2e()),Y2e=et(b5()),uC=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}static{this.paths=[["config","unset"]]}static{this.usage=ot.Usage({description:"unset a configuration setting",details:` + This command will unset a configuration setting. + `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(C=>{if(!(0,W2e.default)(C,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,C;let S=n?(0,G2e.default)(C):{...C};return(0,Y2e.default)(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();bt();Wt();var nF=Ie("util"),fC=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}static{this.paths=[["config"]]}static{this.usage=ot.Usage({description:"display the current configuration",details:` + This command prints the current active configuration settings. + `,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await vI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key "${p}" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&f.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),C=r.sources.get(p)??"",S=C&&C[0]!=="<"?ue.fromPortablePath(C):C;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let C of a){if(this.noDefaults&&!r.sources.has(C))continue;let S=r.settings.get(C),P=r.sources.get(C)??"",I=r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:"Description",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:he.tuple(P[0]==="<"?he.Type.CODE:he.Type.PATH,P)}};h[C]={value:he.tuple(he.Type.CODE,C),children:R};let N=(U,W)=>{for(let[te,ie]of W)if(ie instanceof Map){let Ae={};U[te]={children:Ae},N(Ae,ie)}else U[te]={label:te,value:he.tuple(he.Type.NO_HINT,(0,nF.inspect)(ie,p))}};I instanceof Map?N(R,I):R.Value={label:"Value",value:he.tuple(he.Type.NO_HINT,(0,nF.inspect)(I,p))}}a.length!==1&&(n=void 0),Qs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let f=a[0],p=(0,nF.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(` +`),this.context.stdout.write(`${p} +`)}return c.exitCode()}};Ve();Wt();Ul();var iF={};Vt(iF,{Strategy:()=>lS,acceptedStrategies:()=>wvt,dedupe:()=>P5});Ve();Ve();var V2e=et(Sa()),lS=(e=>(e.HIGHEST="highest",e))(lS||{}),wvt=new Set(Object.values(lS)),Bvt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>q.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let C=t.originalPackages.get(E);if(typeof C>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),P=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([te,ie])=>{let Ae=f.get(ie.descriptorHash);if(typeof Ae>"u")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let ce=await Ae.promise;if(!ce)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ce.updatedPackage]})));if(e.length&&!V2e.default.isMatch(q.stringifyIdent(p),e)||!r.shouldPersistResolution(C,a))return C;let I=c.get(p.identHash);if(typeof I>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return C;let R=[...I].map(te=>{let ie=t.originalPackages.get(te);if(typeof ie>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ie}),N=await r.getSatisfying(p,P,R,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return C;let W=t.originalPackages.get(U.locatorHash);if(typeof W>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let P=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:C,updatedPackage:S,resolvedPackage:P})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function P5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new Yi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let C=Bvt[e],S=await C(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),P=ho.progressViaCounter(S.length);await a.reportProgress(P);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:te,currentPackage:ie,updatedPackage:Ae}=W;a.reportInfo(0,`${q.prettyDescriptor(n,te)} can be deduped from ${q.prettyLocator(n,ie)} to ${q.prettyLocator(n,Ae)}`),a.reportJson({descriptor:q.stringifyDescriptor(te),currentResolution:q.stringifyLocator(ie),updatedResolution:q.stringifyLocator(Ae)}),t.storedResolutions.set(te.descriptorHash,Ae.locatorHash)}).finally(()=>P.tick())));let R;switch(I){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),I})}var AC=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:po(lS)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=ot.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let n=0,c=await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async f=>{n=await P5(s,{strategy:this.strategy,patterns:this.patterns,cache:a,report:f})});return c.hasErrors()?c.exitCode():this.check?n?1:0:await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Ve();Wt();var pC=class extends ut{static{this.paths=[["--clipanion=definitions"]]}async execute(){let{plugins:e}=await ze.find(this.context.cwd,this.context.plugins),r=[];for(let c of e){let{commands:f}=c[1];if(f){let h=wa.from(f).definitions();r.push([c[0],h])}}let s=this.cli.definitions(),a=(c,f)=>c.split(" ").slice(1).join()===f.split(" ").slice(1).join(),n=K2e()["@yarnpkg/builder"].bundles.standard;for(let c of r){let f=c[1];for(let p of f)s.find(h=>a(h.path,p.path)).plugin={name:c[0],isDefault:n.includes(c[0])}}this.context.stdout.write(`${JSON.stringify(s,null,2)} +`)}};var hC=class extends ut{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();bt();Wt();var gC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!q.tryParseIdent(this.leadingArgument)){let r=K.resolve(this.context.cwd,ue.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ve();var dC=class extends ut{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${un||""} +`)}};Ve();Ve();Wt();var mC=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["exec"]]}static{this.usage=ot.Usage({description:"execute a shell script",details:` + This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell. + + It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). + `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ve();Wt();Ul();var yC=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:qx(IE(),[X2(/^p[0-9a-f]{5}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=ot.Usage({description:"explain a set of peer requirements",details:` + A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters. + + When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not. + + When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement. + + **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`). + `,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<"u"?await Svt(this.hash,s,{stdout:this.context.stdout}):await Dvt(s,{stdout:this.context.stdout})}};async function Svt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[q.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),Qs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),C=>[q.stringifyLocator(C.requester),n(C)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range==="missing:"){let C=c?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${C}.`)}else{let C=e.storedResolutions.get(s.provided.descriptorHash);if(!C)throw new Error("Assertion failed: Expected the descriptor to be registered");let S=e.storedPackages.get(C);if(!S)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${q.prettyReference(e.configuration,S.version??"0.0.0")}, ${c?"which does not satisfy all requests.":"which satisfies all requests"}`),c?.type===3&&(c.range?p.reportInfo(0,` The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function Dvt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>q.stringifyLocator(c.subject),([,c])=>q.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...q.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",c.provided.range!=="missing:"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let C=t.storedPackages.get(E);if(!C)throw new Error("Assertion failed: Expected the provided package to have been registered");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} provides ${q.prettyLocator(t.configuration,C)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${q.prettyLocator(t.configuration,c.subject)} doesn't provide ${q.prettyIdent(t.configuration,c.ident)} to ${q.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ve();Wt();Ul();Ve();Ve();bt();Wt();var J2e=et(Ai()),EC=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}static{this.paths=[["set","version"]]}static{this.usage=ot.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\n\n A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let f=r.sources.get("yarnPath");if(!f)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(K.contains(p,f))return 0}let s=()=>{if(typeof un>"u")throw new nt("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(f,p)=>({version:p,url:f.replace(/\{\}/g,p)});if(this.version==="self")a={url:s(),version:un??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await cS(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await cS(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.version))a={url:`file://${K.resolve(ue.toPortablePath(this.version))}`,version:"file"};else if(Or.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(Or.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(Or.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await bvt(r,this.version));else throw new nt(`Invalid version descriptor "${this.version}"`);return(await Ot.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async f=>{let p=async()=>{let h="file://";return a.url.startsWith(h)?(f.reportInfo(0,`Retrieving ${he.pretty(r,a.url,he.Type.PATH)}`),await le.readFilePromise(a.url.slice(h.length))):(f.reportInfo(0,`Downloading ${he.pretty(r,a.url,he.Type.URL)}`),await An.get(a.url,{configuration:r}))};await x5(r,a.version,p,{report:f,useYarnPath:this.useYarnPath})})).exitCode()}};async function bvt(t,e){let s=(await An.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0})).tags.filter(a=>Or.satisfiesWithPrereleases(a,e));if(s.length===0)throw new nt(`No matching release found for range ${he.pretty(t,e,he.Type.RANGE)}.`);return s[0]}async function cS(t,e){let r=await An.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new nt(`Tag ${he.pretty(t,e,he.Type.RANGE)} not found`);return r.latest[e]}async function x5(t,e,r,{report:s,useYarnPath:a}){let n,c=async()=>(typeof n>"u"&&(n=await r()),n);if(e===null){let te=await c();await le.mktempPromise(async ie=>{let Ae=K.join(ie,"yarn.cjs");await le.writeFilePromise(Ae,te);let{stdout:ce}=await Gr.execvp(process.execPath,[ue.fromPortablePath(Ae),"--version"],{cwd:ie,env:{...t.env,YARN_IGNORE_PATH:"1"}});if(e=ce.trim(),!J2e.default.valid(e))throw new Error(`Invalid semver version. ${he.pretty(t,"yarn --version",he.Type.CODE)} returned: +${e}`)})}let f=t.projectCwd??t.startingCwd,p=K.resolve(f,".yarn/releases"),h=K.resolve(p,`yarn-${e}.cjs`),E=K.relative(t.startingCwd,h),C=je.isTaggedYarnVersion(e),S=t.get("yarnPath"),P=!C,I=P||!!S||!!a;if(a===!1){if(P)throw new Yt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${he.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),I=!0);if(I){let te=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,"magenta")}`),await le.removePromise(K.dirname(h)),await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.writeFilePromise(h,te,{mode:493}),await ze.updateConfiguration(f,{yarnPath:K.relative(f,h)})}else await le.removePromise(K.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let R=await Ht.tryFind(f)||new Ht;R.packageManager=`yarn@${C?e:await cS(t,"stable")}`;let N={};R.exportTo(N);let U=K.join(f,Ht.fileName),W=`${JSON.stringify(N,null,R.indent)} +`;return await le.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function z2e(t){return Dr[zx(t)]}var Pvt=/## (?YN[0-9]{4}) - `(?[A-Z_]+)`\n\n(?
(?:.(?!##))+)/gs;async function xvt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(un)?un:await cS(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await An.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Pvt),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=z2e(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var IC=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:$2(IE(),[X2(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=ot.Usage({description:"explain an error code",details:` + When the code argument is specified, this command prints its name and its details. + + When used without arguments, this command lists all error codes and their names. + `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let s=z2e(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await xvt(r)).get(this.code),p=typeof f<"u"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description. + +You can help us by editing this page on GitHub \u{1F642}: +${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))} +`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})} +`):this.context.stdout.write(`${n} + +${p} +`)}else{let s={children:je.mapAndFilter(Object.entries(Dr),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Vf(Number(a)),value:he.tuple(he.Type.CODE,n)})};Qs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();bt();Wt();var Z2e=et(Sa()),CC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["info"]]}static{this.usage=ot.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(ie,{recursive:Ae})=>{let ce=ie.anchoredLocator.locatorHash,me=new Map,pe=[ce];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>"u")throw new Error("Assertion failed: Expected the package to be registered");if(me.set(Be,Ce),q.isVirtualLocator(Ce)&&pe.push(q.devirtualizeLocator(Ce).locatorHash),!(!Ae&&Be!==ce))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>"u")throw new Error("Assertion failed: Expected the resolution to be registered");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let Ae=new Map;for(let ce of s.workspaces)for(let me of f(ce,{recursive:ie}))Ae.set(me.locatorHash,me);return Ae.values()},h=({all:ie,recursive:Ae})=>ie&&Ae?s.storedPackages.values():ie?p({recursive:Ae}):f(a,{recursive:Ae}),E=({all:ie,recursive:Ae})=>{let ce=h({all:ie,recursive:Ae}),me=this.patterns.map(Ce=>{let g=q.parseLocator(Ce),we=Z2e.default.makeRe(q.stringifyIdent(g)),ye=q.isVirtualLocator(g),fe=ye?q.devirtualizeLocator(g):g;return se=>{let X=q.stringifyIdent(se);if(!we.test(X))return!1;if(g.reference==="unknown")return!0;let De=q.isVirtualLocator(se),Re=De?q.devirtualizeLocator(se):se;return!(ye&&De&&g.reference!==se.reference||fe.reference!==Re.reference)}}),pe=je.sortMap([...ce],Ce=>q.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:C,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(C.length===0)throw new nt("No package matched your request");let P=new Map;if(this.dependents)for(let ie of S)for(let Ae of ie.dependencies.values()){let ce=s.storedResolutions.get(Ae.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");je.getArrayWithDefault(P,ce).push(ie)}let I=new Map;for(let ie of S){if(!q.isVirtualLocator(ie))continue;let Ae=q.devirtualizeLocator(ie);je.getArrayWithDefault(I,Ae.locatorHash).push(ie)}let R={},N={children:R},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksums,report:new Yi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ie,Ae,ce)=>{if(!Ae.has("manifest"))return;let me=await U.fetch(ie,W),pe;try{pe=await Ht.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}ce("Manifest",{License:he.tuple(he.Type.NO_HINT,pe.license),Homepage:he.tuple(he.Type.URL,pe.raw.homepage??null)})},async(ie,Ae,ce)=>{if(!Ae.has("cache"))return;let me=s.storedChecksums.get(ie.locatorHash)??null,pe=n.getLocatorPath(ie,me),Be;if(pe!==null)try{Be=await le.statPromise(pe)}catch{}let Ce=typeof Be<"u"?[Be.size,he.Type.SIZE]:void 0;ce("Cache",{Checksum:he.tuple(he.Type.NO_HINT,me),Path:he.tuple(he.Type.PATH,pe),Size:Ce})}];for(let ie of C){let Ae=q.isVirtualLocator(ie);if(!this.virtuals&&Ae)continue;let ce={},me={value:[ie,he.Type.LOCATOR],children:ce};if(R[q.stringifyLocator(ie)]=me,this.nameOnly){delete me.children;continue}let pe=I.get(ie.locatorHash);typeof pe<"u"&&(ce.Instances={label:"Instances",value:he.tuple(he.Type.NUMBER,pe.length)}),ce.Version={label:"Version",value:he.tuple(he.Type.NO_HINT,ie.version)};let Be=(g,we)=>{let ye={};if(ce[g]=ye,Array.isArray(we))ye.children=we.map(fe=>({value:fe}));else{let fe={};ye.children=fe;for(let[se,X]of Object.entries(we))typeof X>"u"||(fe[se]={label:se,value:X})}};if(!Ae){for(let g of te)await g(ie,c,Be);await r.triggerHook(g=>g.fetchPackageInfo,ie,c,Be)}ie.bin.size>0&&!Ae&&Be("Exported Binaries",[...ie.bin.keys()].map(g=>he.tuple(he.Type.PATH,g)));let Ce=P.get(ie.locatorHash);typeof Ce<"u"&&Ce.length>0&&Be("Dependents",Ce.map(g=>he.tuple(he.Type.LOCATOR,g))),ie.dependencies.size>0&&!Ae&&Be("Dependencies",[...ie.dependencies.values()].map(g=>{let we=s.storedResolutions.get(g.descriptorHash),ye=typeof we<"u"?s.storedPackages.get(we)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:ye})})),ie.peerDependencies.size>0&&Ae&&Be("Peer dependencies",[...ie.peerDependencies.values()].map(g=>{let we=ie.dependencies.get(g.identHash),ye=typeof we<"u"?s.storedResolutions.get(we.descriptorHash)??null:null,fe=ye!==null?s.storedPackages.get(ye)??null:null;return he.tuple(he.Type.RESOLUTION,{descriptor:g,locator:fe})}))}Qs.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Ve();bt();Bc();var sF=et(Rd());Wt();var k5=et(Ai());Ul();var kvt=[{selector:t=>t===-1,name:"nodeLinker",value:"node-modules"},{selector:t=>t!==-1&&t<8,name:"enableGlobalCache",value:!1},{selector:t=>t!==-1&&t<8,name:"compressionLevel",value:"mixed"}],wC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=ge.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=ge.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.refreshLockfile=ge.Boolean("--refresh-lockfile",{description:"Refresh the package metadata stored in the lockfile"});this.checkCache=ge.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"});this.checkResolutions=ge.Boolean("--check-resolutions",{description:"Validates that the package resolutions are coherent"});this.inlineBuilds=ge.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.cacheFolder=ge.String("--cache-folder",{hidden:!0});this.frozenLockfile=ge.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=ge.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=ge.Boolean("--non-interactive",{hidden:!0});this.preferOffline=ge.Boolean("--prefer-offline",{hidden:!0});this.production=ge.Boolean("--production",{hidden:!0});this.registry=ge.String("--registry",{hidden:!0});this.silent=ge.Boolean("--silent",{hidden:!0});this.networkTimeout=ge.String("--network-timeout",{hidden:!0})}static{this.paths=[["install"],ot.Default]}static{this.usage=ot.Usage({description:"install the project dependencies",details:"\n This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<"u"&&r.useWithSource("",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let s=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await vI({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",error:!sF.default.VERCEL},{option:this.registry,message:"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file"},{option:this.preferOffline,message:"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",error:!sF.default.VERCEL},{option:this.production,message:"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",error:!0},{option:this.nonInteractive,message:"The --non-interactive option is deprecated",error:!s},{option:this.frozenLockfile,message:"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:"The cache-folder option has been deprecated; use rc settings instead",error:!sF.default.NETLIFY}]);if(a!==null)return a;let n=this.mode==="update-lockfile";if(n&&(this.immutable||this.immutableCache))throw new nt(`${he.pretty(r,"--immutable",he.Type.CODE)} and ${he.pretty(r,"--immutable-cache",he.Type.CODE)} cannot be used with ${he.pretty(r,"--mode=update-lockfile",he.Type.CODE)}`);let c=(this.immutable??r.get("enableImmutableInstalls"))&&!n,f=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await Rvt(r,c)&&(N.reportInfo(48,"Automatically removed core plugins that are now builtins \u{1F44D}"),U=!0),await Tvt(r,c)&&(N.reportInfo(48,"Automatically fixed merge conflicts \u{1F44D}"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(ze.telemetry?.isNew)ze.telemetry.commitTips(),N.reportInfo(65,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),N.reportInfo(65,`Run ${he.pretty(r,"yarn config set --home enableTelemetry 0",he.Type.CODE)} to disable`),N.reportSeparator();else if(ze.telemetry?.shouldShowTips){let U=await An.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let W=null;if(un!==null){let ie=k5.default.prerelease(un)?"canary":"stable",Ae=U.latest[ie];k5.default.gt(Ae,un)&&(W=[ie,Ae])}if(W)ze.telemetry.commitTips(),N.reportInfo(88,`${he.applyStyle(r,`A new ${W[0]} version of Yarn is available:`,he.Style.BOLD)} ${q.prettyReference(r,W[1])}!`),N.reportInfo(88,`Upgrade now by running ${he.pretty(r,`yarn set version ${W[1]}`,he.Type.CODE)}`),N.reportSeparator();else{let te=ze.telemetry.selectTip(U.tips);te&&(N.reportInfo(89,he.pretty(r,te.message,he.Type.MARKDOWN_INLINE)),te.url&&N.reportInfo(89,`Learn more at ${te.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await Tt.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let W of kvt)W.selector(E)&&typeof r.sources.get(W.name)>"u"&&(r.use("",{[W.name]:W.value},p.cwd,{overwrite:!0}),U[W.name]=W.value);Object.keys(U).length>0&&(await ze.updateConfiguration(p.cwd,U),N.reportInfo(87,"Migrated your project to the latest Yarn version \u{1F680}"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let C=await Jr.find(r,{immutable:f,check:this.checkCache});if(!h)throw new ar(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let S=r.get("enableHardenedMode");S&&typeof r.sources.get("enableHardenedMode")>"u"&&await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled."),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${he.applyHyperlink(r,"documentation","https://yarnpkg.com/features/security#hardened-mode")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??S)&&(p.lockfileNeedsRefresh=!0);let P=this.checkResolutions??S;return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:C,report:R,immutable:c,checkResolutions:P,mode:this.mode})})).exitCode()}},Qvt="<<<<<<<";async function Tvt(t,e){if(!t.projectCwd)return!1;let r=K.join(t.projectCwd,Er.lockfile);if(!await le.existsPromise(r)||!(await le.readFilePromise(r,"utf8")).includes(Qvt))return!1;if(e)throw new Yt(47,"Cannot autofix a lockfile when running an immutable install");let a=await Gr.execvp("git",["rev-parse","MERGE_HEAD","HEAD"],{cwd:t.projectCwd});if(a.code!==0&&(a=await Gr.execvp("git",["rev-parse","REBASE_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0&&(a=await Gr.execvp("git",["rev-parse","CHERRY_PICK_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0)throw new Yt(83,"Git returned an error when trying to find the commits pertaining to the conflict");let n=await Promise.all(a.stdout.trim().split(/\n/).map(async f=>{let p=await Gr.execvp("git",["show",`${f}:./${Er.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new Yt(83,`Git returned an error when trying to access the lockfile content in ${f}`);try{return cs(p.stdout)}catch{throw new Yt(46,"A variant of the conflicting lockfile failed to parse")}}));n=n.filter(f=>!!f.__metadata);for(let f of n){if(f.__metadata.version<7)for(let p of Object.keys(f)){if(p==="__metadata")continue;let h=q.parseDescriptor(p,!0),E=t.normalizeDependency(h),C=q.stringifyDescriptor(E);C!==p&&(f[C]=f[p],delete f[p])}for(let p of Object.keys(f)){if(p==="__metadata")continue;let h=f[p].checksum;typeof h>"u"||h.includes("/")||(f[p].checksum=`${f.__metadata.cacheKey}/${h}`)}}let c=Object.assign({},...n);c.__metadata.version=`${Math.min(...n.map(f=>parseInt(f.__metadata.version??0)))}`,c.__metadata.cacheKey="merged";for(let[f,p]of Object.entries(c))typeof p=="string"&&delete c[f];return await le.changeFilePromise(r,il(c),{automaticNewlines:!0}),!0}async function Rvt(t,e){if(!t.projectCwd)return!1;let r=[],s=K.join(t.projectCwd,".yarn/plugins/@yarnpkg");return await ze.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let c=n.filter(f=>{if(!f.path)return!0;let p=K.resolve(t.projectCwd,f.path),h=hv.has(f.spec)&&K.contains(s,p);return h&&r.push(p),!h});return c.length===0?ze.deleteProperty:c.length===n.length?n:c}},{immutable:e})?(await Promise.all(r.map(async n=>{await le.removePromise(n)})),!0):!1}Ve();bt();Wt();var BC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=ge.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=ge.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=ge.Rest()}static{this.paths=[["link"]]}static{this.usage=ot.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=s.topLevelWorkspace,f=[];for(let p of this.destinations){let h=K.resolve(this.context.cwd,ue.toPortablePath(p)),E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(s.cwd===C.cwd)throw new nt(`Invalid destination '${p}'; Can't link the project to itself`);if(!S)throw new ar(C.cwd,h);if(this.all){let P=!1;for(let I of C.workspaces)I.manifest.name&&(!I.manifest.private||this.private)&&(f.push(I),P=!0);if(!P)throw new nt(`No workspace found to be linked in the target project: ${p}`)}else{if(!S.manifest.name)throw new nt(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(S.manifest.private&&!this.private)throw new nt(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);f.push(S)}}for(let p of f){let h=q.stringifyIdent(p.anchoredLocator),E=this.relative?K.relative(s.cwd,p.cwd):p.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Wt();var vC=class extends ut{constructor(){super(...arguments);this.args=ge.Proxy()}static{this.paths=[["node"]]}static{this.usage=ot.Usage({description:"run node with the hook already setup",details:` + This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). + + The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version. + `,examples:[["Run a Node script","$0 node ./my-script.js"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ve();Wt();var SC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:` + Check only the plugins from https. + + If this command detects any plugin differences in the CI environment, it will throw an error. + `,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await An.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),C=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${C}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ve();Ve();bt();Wt();var rBe=Ie("os");Ve();bt();Wt();var X2e=Ie("os");Ve();Bc();Wt();var Fvt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function vm(t,e){let r=await An.get(Fvt,{configuration:t}),s=cs(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Or.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var DC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await vm(r,un);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=" [experimental]"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var Nvt=/^[0-9]+$/,Ovt=process.platform==="win32";function $2e(t){return Nvt.test(t)?`pull/${t}/head`:t}var Lvt=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",$2e(e)],["git","reset","--hard","FETCH_HEAD"]],Mvt=({branch:t})=>[["git","fetch","origin","--depth=1",$2e(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],_vt=({plugins:t,noMinify:e},r,s)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",K.resolve(s,a)])),...e?["--no-minify"]:[],"|"],[Ovt?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",ue.fromPortablePath(r),"|"]],bC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=ot.Usage({description:"build Yarn from master",details:` + This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project. + + By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag. + `,examples:[["Build Yarn from master","$0 set version from sources"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,X2e.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await Q5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator();let f=await Gr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=K.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);le.existsSync(p)||(await uS(_vt(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await le.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await x5(r,null,async()=>h,{report:c});this.skipPlugins||await Uvt(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function uS(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await Gr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")} +`);try{await Gr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function Q5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&le.existsSync(K.join(s,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await uS(Mvt(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await le.removePromise(s),await le.mkdirPromise(s,{recursive:!0}),await uS(Lvt(t,s),{configuration:e,context:t.context,target:s}))}async function Uvt(t,e,{project:r,report:s,target:a}){let n=await vm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await T5(f,t,{project:r,report:s,target:a})}Ve();Ve();bt();Wt();var eBe=et(Ai()),tBe=Ie("vm");var PC=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"download a plugin",details:` + This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations. + + Three types of plugin references are accepted: + + - If the plugin is stored within the Yarn repository, it can be referenced by name. + - Third-party plugins can be referenced directly through their public urls. + - Local plugins can be referenced by their path on the disk. + + If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified. + + Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package). + `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Tt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=K.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=K.relative(n.cwd,p),f=await le.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Yt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=q.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!eBe.default.valid(h.reference))throw new Yt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=q.stringifyIdent(h),C=await vm(r,un);if(!Object.hasOwn(C,E)){let S=`Couldn't find a plugin named ${q.prettyIdent(r,h)} on the remote registry. +`;throw r.plugins.has(E)?S+=`A plugin named ${q.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",he.Type.URL)}).`,new Yt(51,S)}c=E,p=C[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):un!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${un}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,"green")}`),f=await An.get(p,{configuration:r})}await R5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function R5(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,tBe.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=K.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,"magenta")}`),await le.mkdirPromise(K.dirname(E),{recursive:!0}),await le.writeFilePromise(E,e);let C={path:h,spec:t};r&&(C.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[C])}var Hvt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],xC=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:` + This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations. + + The plugins can be referenced by their short name if sourced from the official Yarn repository. + `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<"u"?K.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):K.resolve(ue.toPortablePath((0,rBe.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Tt.find(r,this.context.cwd),f=q.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=q.stringifyIdent(f),h=await vm(r,un);if(!Object.hasOwn(h,p))throw new Yt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await Q5(this,{configuration:r,report:n,target:s}),await T5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function T5(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\//,""),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await uS(Hvt({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=K.resolve(n,`packages/${c}/bundles/${t}.js`),h=await le.readFilePromise(p);await R5(t,h,{project:s,report:a})}Ve();bt();Wt();var kC=class extends ut{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"remove a plugin",details:` + This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration. + + **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed. + `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=q.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${q.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=K.resolve(s.cwd,p);le.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await le.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let C=E.filter(S=>S.path!==p);return C.length===0?ze.deleteProperty:C.length===E.length?E:C}})})).exitCode()}};Ve();Wt();var QC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"list the active plugins",details:` + This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins. + `,examples:[["List the currently active plugins","$0 plugin runtime"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ve();Ve();Wt();var TC=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=ot.Usage({description:"rebuild the project's native packages",details:` + This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again. + + Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future). + + By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory. + `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(q.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new Yi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var F5=et(Sa());Ul();var RC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["remove"]]}static{this.usage=ot.Usage({description:"remove dependencies from the project",details:` + This command will remove the packages matching the specified patterns from the current workspace. + + If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: + + - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run. + + - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost. + + This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. + `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let I of this.patterns){let R=!1,N=q.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,F5.default)(W,I))U.manifest.peerDependenciesMeta.delete(te),h=!0,R=!0;for(let te of f){let ie=U.manifest.getForScope(te),Ae=[...ie.values()].map(ce=>q.stringifyIdent(ce));for(let ce of(0,F5.default)(Ae,q.stringifyIdent(N))){let{identHash:me}=q.parseIdent(ce),pe=ie.get(me);if(typeof pe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(me),E.push([U,te,pe]),h=!0,R=!0}}}R||p.push(I)}let C=p.length>1?"Patterns":"Pattern",S=p.length>1?"don't":"doesn't",P=this.all?"any":"this";if(p.length>0)throw new nt(`${C} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${P} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Wt();var nBe=Ie("util"),FC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),C=>C),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((C,S)=>Math.max(C,S.length),0);for(let[C,S]of f.entries())c.reportInfo(null,`${C.padEnd(E," ")} ${(0,nBe.inspect)(S,h)}`),c.reportJson({name:C,script:S})})).exitCode()}};Ve();Ve();Wt();var NC=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[["run"]]}static{this.usage=ot.Usage({description:"run a script defined in the package.json",details:` + This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace: + + - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed. + + - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed. + + - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed. + + Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax). + `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(s.workspaces.map(async C=>C.manifest.scripts.has(this.scriptName)?C:null))).filter(C=>C!==null);if(E.length===1)return await In.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${q.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${q.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new nt("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,C]of $I)for(let S of C)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new nt(`Couldn't find a script named "${this.scriptName}".`)}}};Ve();Ve();Wt();var OC=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[["set","resolution"]]}static{this.usage=ot.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 npm:1.5.0"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=q.parseDescriptor(this.descriptor,!0),f=q.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var iBe=et(Sa()),LC=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}static{this.paths=[["unlink"]]}static{this.usage=ot.Usage({description:"disconnect the local project from another one",details:` + This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments. + `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=K.resolve(this.context.cwd,ue.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:C,workspace:S}=await Tt.find(E,h);if(!S)throw new ar(C.cwd,h);if(this.all){for(let P of C.workspaces)P.manifest.name&&f.add(q.stringifyIdent(P.anchoredLocator));if(f.size===0)throw new nt("No workspace found to be unlinked in the target project")}else{if(!S.manifest.name)throw new nt("The target workspace doesn't have a name and thus cannot be unlinked");f.add(q.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:C})=>C.descriptor.fullName)];for(let C of(0,iBe.default)(E,p))f.add(C)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var sBe=et(nS()),N5=et(Sa());Ul();var MC=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:po(ec)});this.patterns=ge.Rest()}static{this.paths=[["up"]]}static{this.usage=ot.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]})}static{this.schema=[tB("recursive",Wf.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})]}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=[...s.storedDescriptors.values()],f=c.map(E=>q.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(q.parseDescriptor(E).range!=="unknown")throw new nt("Ranges aren't allowed when using --recursive");for(let C of(0,N5.default)(f,E)){let S=q.parseIdent(C);p.add(S.identHash)}}let h=c.filter(E=>p.has(E.identHash));for(let E of h)s.storedDescriptors.delete(E.descriptorHash),s.storedResolutions.delete(E.descriptorHash);return await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.fixed,f=r.isInteractive({interactive:this.interactive,stdout:this.context.stdout}),p=sS(this,s),h=f?["keep","reuse","project","latest"]:["project","latest"],E=[],C=[];for(let N of this.patterns){let U=!1,W=q.parseDescriptor(N),te=q.stringifyIdent(W);for(let ie of s.workspaces)for(let Ae of["dependencies","devDependencies"]){let me=[...ie.manifest.getForScope(Ae).values()].map(Be=>q.stringifyIdent(Be)),pe=te==="*"?me:(0,N5.default)(me,te);for(let Be of pe){let Ce=q.parseIdent(Be),g=ie.manifest[Ae].get(Ce.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let we=q.makeDescriptor(Ce,W.range);E.push(Promise.resolve().then(async()=>[ie,Ae,g,await oS(we,{project:s,workspace:ie,cache:n,target:Ae,fixed:c,modifier:p,strategies:h})])),U=!0}}U||C.push(N)}if(C.length>1)throw new nt(`Patterns ${he.prettyList(r,C,he.Type.CODE)} don't match any packages referenced by any workspace`);if(C.length>0)throw new nt(`Pattern ${he.prettyList(r,C,he.Type.CODE)} doesn't match any packages referenced by any workspace`);let S=await Promise.all(E),P=await uA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:W,rejections:te}]of S){let ie=W.filter(Ae=>Ae.descriptor!==null);if(ie.length===0){let[Ae]=te;if(typeof Ae>"u")throw new Error("Assertion failed: Expected an error to have been set");let ce=this.cli.error(Ae);s.configuration.get("enableNetwork")?N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range + +${ce}`):N.reportError(27,`${q.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled) + +${ce}`)}else ie.length>1&&!f&&N.reportError(27,`${q.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(P.hasErrors())return P.exitCode();let I=!1,R=[];for(let[N,U,,{suggestions:W}]of S){let te,ie=W.filter(pe=>pe.descriptor!==null),Ae=ie[0].descriptor,ce=ie.every(pe=>q.areDescriptorsEqual(pe.descriptor,Ae));ie.length===1||ce?te=Ae:(I=!0,{answer:te}=await(0,sBe.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${q.prettyWorkspace(r,N)} \u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(te.identHash);if(typeof me>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(me.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),R.push([N,U,me,te]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),I&&this.context.stdout.write(` +`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Wt();var _C=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}static{this.paths=[["why"]]}static{this.usage=ot.Usage({description:"display the reason why a package is needed",details:` + This command prints the exact reasons why a package appears in the dependency tree. + + If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree. + `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=q.parseIdent(this.package).identHash,c=this.recursive?qvt(s,n,{configuration:r,peers:this.peers}):jvt(s,n,{configuration:r,peers:this.peers});Qs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function jvt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>q.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let C=t.storedResolutions.get(E.descriptorHash);if(!C)throw new Error("Assertion failed: The resolution should have been registered");let S=t.storedPackages.get(C);if(!S)throw new Error("Assertion failed: The package should have been registered");if(S.identHash!==e)continue;{let I=q.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let P=q.stringifyLocator(S);p[P]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function qvt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>q.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let P=!1;S.identHash===e&&(P=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let R=t.storedResolutions.get(I.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");f(N)&&(P=!0)}return P&&c.add(S.locatorHash),P};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},C=(S,P,I)=>{if(!c.has(S.locatorHash))return;let R=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:R,children:N},W=q.stringifyLocator(S);if(P[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let te of S.dependencies.values()){if(!s&&S.peerDependencies.has(te.identHash))continue;let ie=t.storedResolutions.get(te.descriptorHash);if(!ie)throw new Error("Assertion failed: The resolution should have been registered");let Ae=t.storedPackages.get(ie);if(!Ae)throw new Error("Assertion failed: The package should have been registered");C(Ae,N,te)}}};for(let S of a)C(S.anchoredPackage,h,null);return E}Ve();var W5={};Vt(W5,{GitFetcher:()=>AS,GitResolver:()=>pS,default:()=>uSt,gitUtils:()=>Qa});Ve();bt();var Qa={};Vt(Qa,{TreeishProtocols:()=>fS,clone:()=>G5,fetchBase:()=>bBe,fetchChangedFiles:()=>PBe,fetchChangedWorkspaces:()=>lSt,fetchRoot:()=>DBe,isGitUrl:()=>jC,lsRemote:()=>SBe,normalizeLocator:()=>aSt,normalizeRepoUrl:()=>UC,resolveUrl:()=>q5,splitRepoUrl:()=>G0,validateRepoUrl:()=>j5});Ve();bt();Wt();var wBe=et(EBe()),BBe=et(c6()),HC=et(Ie("querystring")),U5=et(Ai());function _5(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function IBe(t){try{return new URL(t)}catch{return}}function sSt(t){let e=_5(t,"@","#"),r=_5(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),_5(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function CBe(t){return IBe(t)||IBe(sSt(t))}function UC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=CBe(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function vBe(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var oSt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],fS=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(fS||{});function jC(t){return t?oSt.some(e=>!!t.match(e)):!1}function G0(t){t=UC(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=HC.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(fS).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(fS))delete a[p];return{repo:r,treeish:{protocol:c,request:f},extra:a}}else{let a=s.indexOf(":"),[n,c]=a===-1?[null,s]:[s.slice(0,a),s.slice(a+1)];return{repo:r,treeish:{protocol:n,request:c},extra:{}}}}function aSt(t){return q.makeLocator(t,UC(t.reference))}function j5(t,{configuration:e}){let r=UC(t,{git:!0});if(!An.getNetworkSettings(`https://${(0,wBe.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Yt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function SBe(t,e){let r=j5(t,{configuration:e}),s=await H5("listing refs",["ls-remote",r],{cwd:e.startingCwd,env:vBe()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\t([^\n]+)/gm,c;for(;(c=n.exec(s.stdout))!==null;)a.set(c[2],c[1]);return a}async function q5(t,e){let{repo:r,treeish:{protocol:s,request:a},extra:n}=G0(t),c=await SBe(r,e),f=(h,E)=>{switch(h){case"commit":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return HC.default.stringify({...n,commit:E})}case"head":{let C=c.get(E==="HEAD"?E:`refs/heads/${E}`);if(typeof C>"u")throw new Error(`Unknown head ("${E}")`);return HC.default.stringify({...n,commit:C})}case"tag":{let C=c.get(`refs/tags/${E}`);if(typeof C>"u")throw new Error(`Unknown tag ("${E}")`);return HC.default.stringify({...n,commit:C})}case"semver":{let C=Or.validRange(E);if(!C)throw new Error(`Invalid range ("${E}")`);let S=new Map([...c.entries()].filter(([I])=>I.startsWith("refs/tags/")).map(([I,R])=>[U5.default.parse(I.slice(10)),R]).filter(I=>I[0]!==null)),P=U5.default.maxSatisfying([...S.keys()],C);if(P===null)throw new Error(`No matching range ("${E}")`);return HC.default.stringify({...n,commit:S.get(P)})}case null:{let C;if((C=p("commit",E))!==null||(C=p("tag",E))!==null||(C=p("head",E))!==null)return C;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${h}")`)}},p=(h,E)=>{try{return f(h,E)}catch{return null}};return UC(`${r}#${f(s,a)}`)}async function G5(t,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:s,request:a}}=G0(t);if(s!=="commit")throw new Error("Invalid treeish protocol when cloning");let n=j5(r,{configuration:e}),c=await le.mktempPromise(),f={cwd:c,env:vBe()};return await H5("cloning the repository",["clone","-c core.autocrlf=false",n,ue.fromPortablePath(c)],f,{configuration:e,normalizedRepoUrl:n}),await H5("switching branch",["checkout",`${a}`],f,{configuration:e,normalizedRepoUrl:n}),c})}async function DBe(t){let e,r=t;do{if(e=r,await le.existsPromise(K.join(e,".git")))return e;r=K.dirname(e)}while(r!==e);return null}async function bBe(t,{baseRefs:e}){if(e.length===0)throw new nt("Can't run this command with zero base refs specified.");let r=[];for(let f of e){let{code:p}=await Gr.execvp("git",["merge-base",f,"HEAD"],{cwd:t});p===0&&r.push(f)}if(r.length===0)throw new nt(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:s}=await Gr.execvp("git",["merge-base","HEAD",...r],{cwd:t,strict:!0}),a=s.trim(),{stdout:n}=await Gr.execvp("git",["show","--quiet","--pretty=format:%s",a],{cwd:t,strict:!0}),c=n.trim();return{hash:a,title:c}}async function PBe(t,{base:e,project:r}){let s=je.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:a}=await Gr.execvp("git",["diff","--name-only",`${e}`],{cwd:t,strict:!0}),n=a.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),{stdout:c}=await Gr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:t,strict:!0}),f=c.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>K.resolve(t,ue.toPortablePath(h))),p=[...new Set([...n,...f].sort())];return s?p.filter(h=>!K.relative(r.cwd,h).match(s)):p}async function lSt({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new nt("This command can only be run from within a Yarn project");let r=[K.resolve(e.cwd,Er.lockfile),K.resolve(e.cwd,e.configuration.get("cacheFolder")),K.resolve(e.cwd,e.configuration.get("installStatePath")),K.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(c=>c.populateYarnPaths,e,c=>{c!=null&&r.push(c)});let s=await DBe(e.configuration.projectCwd);if(s==null)throw new nt("This command can only be run on Git repositories");let a=await bBe(s,{baseRefs:typeof t=="string"?[t]:e.configuration.get("changesetBaseRefs")}),n=await PBe(s,{base:a.hash,project:e});return new Set(je.mapAndFilter(n,c=>{let f=e.tryWorkspaceByFilePath(c);return f===null?je.mapAndFilter.skip:r.some(p=>c.startsWith(p))?je.mapAndFilter.skip:f}))}async function H5(t,e,r,{configuration:s,normalizedRepoUrl:a}){try{return await Gr.execvp("git",e,{...r,strict:!0})}catch(n){if(!(n instanceof Gr.ExecError))throw n;let c=n.reportExtra,f=n.stderr.toString();throw new Yt(1,`Failed ${t}`,p=>{p.reportError(1,` ${he.prettyField(s,{label:"Repository URL",value:he.tuple(he.Type.URL,a)})}`);for(let h of f.matchAll(/^(.+?): (.*)$/gm)){let[,E,C]=h;E=E.toLowerCase();let S=E==="error"?"Error":`${(0,BBe.default)(E)} Error`;p.reportError(1,` ${he.prettyField(s,{label:S,value:he.tuple(he.Type.NO_HINT,C)})}`)}c?.(p)})}}var AS=class{supports(e,r){return jC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,s);let n={...r,checksums:a},c=await this.downloadHosted(e,n);if(c!==null)return c;let[f,p,h]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:f,releaseFs:p,prefixPath:q.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(s=>s.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let s=G0(e.reference),a=await G5(e.reference,r.project.configuration),n=K.resolve(a,s.extra.cwd??vt.dot),c=K.join(n,"package.tgz");await In.prepareExternalProject(n,c,{configuration:r.project.configuration,report:r.report,workspace:s.extra.workspace,locator:e});let f=await le.readFilePromise(c);return await je.releaseAfterUseAsync(async()=>await gs.convertToZip(f,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1}))}};Ve();Ve();var pS=class{supportsDescriptor(e,r){return jC(e.range)}supportsLocator(e,r){return jC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=await q5(e.range,s.project.configuration);return[q.makeLocator(e,a)]}async getSatisfying(e,r,s,a){let n=G0(e.range);return{locators:s.filter(f=>{if(f.identHash!==e.identHash)return!1;let p=G0(f.reference);return!(n.repo!==p.repo||n.treeish.protocol==="commit"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var cSt={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:"STRING",isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:"STRING",default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:"NUMBER",default:2}},fetchers:[AS],resolvers:[pS]};var uSt=cSt;Wt();var qC=class extends ut{constructor(){super(...arguments);this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.noPrivate=ge.Boolean("--no-private",{description:"Exclude workspaces that have the private field set to true"});this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["workspaces","list"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let c=this.since?await Qa.fetchChangedWorkspaces({ref:this.since,project:s}):s.workspaces,f=new Set(c);if(this.recursive)for(let p of[...c].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)f.add(h);for(let p of f){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let C=new Set,S=new Set;for(let P of Ht.hardDependencies)for(let[I,R]of h.getForScope(P)){let N=s.tryWorkspaceByDescriptor(R);N===null?s.workspacesByIdent.has(I)&&S.add(R):C.add(N)}E={workspaceDependencies:Array.from(C).map(P=>P.relativeCwd),mismatchedWorkspaceDependencies:Array.from(S).map(P=>q.stringifyDescriptor(P))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?q.stringifyIdent(h.name):null,...E})}})).exitCode()}};Ve();Ve();Wt();var GC=class extends ut{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["workspace"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:` + This command will run a given sub-command on a single workspace. + `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[q.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following: + - ${p.join(` + - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var fSt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:xBe.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[aC,lC,cC,uC,OC,bC,EC,qC,pC,hC,gC,dC,sC,oC,fC,AC,mC,yC,IC,CC,wC,BC,LC,vC,SC,xC,PC,kC,DC,QC,TC,RC,FC,NC,MC,_C,GC]},ASt=fSt;var Z5={};Vt(Z5,{default:()=>hSt});Ve();var Qt={optional:!0},V5=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{"babel-polyfill":"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{"cross-spawn":"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{"prop-types":"^15.7.2"}}],["@rebass/forms@*",{dependencies:{"@styled-system/should-forward-prop":"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":Qt}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":Qt}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:Qt}}],["consolidate@<=0.16.0",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:Qt,tinyliquid:Qt,"liquid-node":Qt,jade:Qt,"then-jade":Qt,dust:Qt,"dustjs-helpers":Qt,"dustjs-linkedin":Qt,swig:Qt,"swig-templates":Qt,"razor-tmpl":Qt,atpl:Qt,liquor:Qt,twig:Qt,ejs:Qt,eco:Qt,jazz:Qt,jqtpl:Qt,hamljs:Qt,hamlet:Qt,whiskers:Qt,"haml-coffee":Qt,"hogan.js":Qt,templayed:Qt,handlebars:Qt,underscore:Qt,lodash:Qt,pug:Qt,"then-pug":Qt,qejs:Qt,walrus:Qt,mustache:Qt,just:Qt,ect:Qt,mote:Qt,toffee:Qt,dot:Qt,"bracket-template":Qt,ractive:Qt,nunjucks:Qt,htmling:Qt,"babel-core":Qt,plates:Qt,"react-dom":Qt,react:Qt,"arc-templates":Qt,vash:Qt,slm:Qt,marko:Qt,teacup:Qt,"coffee-script":Qt,squirrelly:Qt,twing:Qt}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":Qt,vue:Qt}}],["scss-parser@<=1.0.5",{dependencies:{lodash:"^4.17.21"}}],["query-ast@<1.0.5",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:Qt}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Qt}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(t=>[t,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":Qt,"webpack-command":Qt}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Qt}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Qt}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:Qt,jimp:Qt}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":Qt,"eslint-import-resolver-typescript":Qt,"eslint-import-resolver-webpack":Qt,"@typescript-eslint/parser":Qt}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":Qt}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":Qt}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x <10.0.2",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.7"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:Qt}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:Qt}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@<=0.14.0",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{"vue-template-compiler":"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{"@parcel/core":"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{"@parcel/core":"*"}}],["parcel@*",{peerDependenciesMeta:{"@parcel/core":Qt}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@<5.0.0",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:Qt}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}],["xo@*",{peerDependencies:{webpack:">=1.11.0"},peerDependenciesMeta:{webpack:Qt}}],["babel-plugin-remove-graphql-queries@<=4.20.0-next.0",{dependencies:{"@babel/types":"^7.15.4"}}],["gatsby-plugin-page-creator@<=4.20.0-next.1",{dependencies:{"fs-extra":"^10.1.0"}}],["gatsby-plugin-utils@<=3.14.0-next.1",{dependencies:{fastq:"^1.13.0"},peerDependencies:{graphql:"^15.0.0"}}],["gatsby-plugin-mdx@<3.1.0-next.1",{dependencies:{mkdirp:"^1.0.4"}}],["gatsby-plugin-mdx@^2",{peerDependencies:{gatsby:"^3.0.0-next"}}],["fdir@<=5.2.0",{peerDependencies:{picomatch:"2.x"},peerDependenciesMeta:{picomatch:Qt}}],["babel-plugin-transform-typescript-metadata@<=0.3.2",{peerDependencies:{"@babel/core":"^7","@babel/traverse":"^7"},peerDependenciesMeta:{"@babel/traverse":Qt}}],["graphql-compose@>=9.0.10",{peerDependencies:{graphql:"^14.2.0 || ^15.0.0 || ^16.0.0"}}],["vite-plugin-vuetify@<=1.0.2",{peerDependencies:{vue:"^3.0.0"}}],["webpack-plugin-vuetify@<=2.0.1",{peerDependencies:{vue:"^3.2.6"}}],["eslint-import-resolver-vite@<2.0.1",{dependencies:{debug:"^4.3.4",resolve:"^1.22.8"}}],["notistack@^3.0.0",{dependencies:{csstype:"^3.0.10"}}],["@fastify/type-provider-typebox@^5.0.0",{peerDependencies:{fastify:"^5.0.0"}}],["@fastify/type-provider-typebox@^4.0.0",{peerDependencies:{fastify:"^4.0.0"}}]];var K5;function kBe(){return typeof K5>"u"&&(K5=Ie("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m8UT+M2+V+AkFST4BlKneiAQRSdST8KEAIyFlULt6wa9EBd0Ds28VmpaxquJdVt+nwdEs5xUskI13OVtFyY0UrQIRAlCuvvWivvlSKQfTO+2Q8OyUR1W5RvetaPz4jD27hdtwHFFA1Ptx6Ee/t2cY2rg2G46M1pNDRf2pWhvpy8pqMnuI3++4OF3+7OFIWXGjh+o7Nr2jNvbiYcQdQS1h903/jVFgOpA0yJ78z+x759bFA0rq+6aY5qPB4FzS3oYoLupDUhD9nDz6F6H7hpnlMf18KNKDu4IKjTWwrAnY6MFQw1W6ymOALHlFyCZmQhldg1MQHaMVVQTVgDC60TfaBqG++Y8PEoFhN/PBTZT175KNP/BlHDYGOOBmnBdzqJKplZ/ljiVG0ZBzfqeBRrrUkn6rA54462SgiliKoYVnbeptMdXNfAuaupIEi0bApF10TlgHfmEJAPUVidRVFyDupSem5po5vErPqWKhKbUIp0LozpYsIKK57dM/HKr+nguF+7924IIWMICkQ8JUigs9D+W+c4LnNoRtPPKNRUiCYmP+Jfo2lfKCKw8qpraEeWU3uiNRO6zcyKQoXPR5htmzzLznke7b4YbXW3I1lIRzmgG02Udb58U+7TpwyN7XymCgH+wuPDthZVQvRZuEP+SnLtMicz9m5zASWOBiAcLmkuFlTKuHspSIhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),K5}var J5;function QBe(){return typeof J5>"u"&&(J5=Ie("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPcKdLMsBLShd+zuEbTrqpwuh+DLmracZcjPC5Sdf5odDAhKpFuOsQS67RT+1VgWWygSv3YwxDnylc04/PYuaMeIzhBkLrvs7e/OUzRTF56MmfY6rI63QtEjEQzq637zQqJ39nNhu3NmoRRhW/086bHGBUtx0PE0j3aEGvkdh9WJC8y8j8mqqke9/dQ5la+Q3ba4RlhvTbnfQhPDDab3tUifkjKuOsp13mXEmO00Mu88F/M67R7LXfoFDFLNtgCSWjWX+3Jn1371pJTK9xPBiMJafvDjtFyAzu8rxeQ0TKMQXNPs5xxiBOd+BRJP8KP88XPtJIbZKh/cdW8KvBUkpqKpGoiIaA32c3/JnQr4efXt85mXvidOvn/eU3Pase1typLYBalJ14mCso9h79nuMOuCa/kZAOkJHmTjP5RM2WNoPasZUAnT1TAE/NH25hUxcQv6hQWR/m1PKk4ooXMcM4SR1iYU3fUohvqk4RY2hbmTVVIXv6TvqO+0doOjgeVFAcom+RlwJQmOVH7pr1Q9LoJT6n1DeQEB+NHygsATbIwTcOKZlJsY8G4+suX1uQLjUWwLjjs0mvSvZcLTpIGAekeR7GCgl8eo3ndAqEe2XCav4huliHjdbIPBsGJuPX7lrO9HX1UbXRH5opOe1x6JsOSgHZR+EaxuXVhpLLxm6jk1LJtZfHSc6BKPun3CpYYVMJGwEUyk8MTGG0XL5MfEwaXpnc9TKnBmlGn6nHiGREc3ysn47XIBDzA+YvFdjZzVIEDcKGpS6PbUJehFRjEne8D0lVU1XuRtlgszq6pTNlQ/3MzNOEgCWPyTct22V2mEi2krizn5VDo9B19/X2DB3hCGRMM7ONbtnAcIx/OWB1u5uPbW1gsH8irXxT/IzG0PoXWYjhbMsH3KTuoOl5o17PulcgvsfTSnKFM354GWI8luqZnrswWjiXy3G+Vbyo1KMopFmmvBwNELgaS8z8dNZchx/Cl/xjddxhMcyqtzFyONb2Zdu90NkI8pAeufe7YlXrp53v8Dj/l8vWeVspRKBGXScBBPI/HinSTGmLDOGGOCIyH0JFdOZx0gWsacNlQLJMIrBhqRxXxHF/5pseWwejlAAvZ3klZSDSYY8mkToaWejXhgNomeGtx1DTLEUFMRkgF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),J5}var z5;function TBe(){return typeof z5>"u"&&(z5=Ie("zlib").brotliDecompressSync(Buffer.from("m9XmPqMRsZ7bFo1U5CxexdgYepcdMsrcAbbqv7/rCXGM7SZhmJ2jPScITf1tA+qxuDFE8KC9mQaCs84ftss/pB0UrlDfSS52Q7rXyYIcHbrGG2egYMqC8FFfnNfZVLU+4ZieJEVLu1qxY0MYkbD8opX7TYstjKzqxwBObq8HUIQwogljOgs72xyCrxj0q79cf/hN2Ys/0fU6gkRgxFedikACuQLS4lvO/N5NpZ85m+BdO3c5VplDLMcfEDt6umRCbfM16uxnqUKPvPFg/qtuzzId3SjAxZFoZRqK3pdtWt/C+VU6+zuX09NsoBs3MwobpU1yyoXZnzA1EmiMRS5GfJeLxV51/jSXrfgTWr1af9hwKvqCfSVHiQuk+uO/N16Cror2c1QlthM7WkS/86azhK3b47PG6f5TAJVtrK7g+zlR2boyKBV+QkdOXcfBDrI8yCciS3LktLb+d3gopE3R1QYFN1QWdQtrso2qK3+OTVYpTdPAfICTe9//3y/1+6mixIob4kfOI1WT3DxyD2ZuR06a6RPOPlftc/bZeqWqUtoqSetJlgP0AOBsOOeWqkpKJDtgP25CmIz+ZAo8+zwb3wI5ZD/0a7Qb7Q8Ag8HkWzhVQqzLFksA/nKSsR6hEu4tymzAQcZUDV4D2f17NbNSreHMVG0D1Knfa5n//prG6IzFVH7GSdEZn+1eEohVH5hmz6wxnj0biDxnMlq0fHQ2v7ogu8tEBnHaJICmVgLINf+jr4b/AVtDfPSZWelMen+u+pT60nu+9LrK0z0L/oyvC+kDtsi13AdC/i6pd29uB/1alOsA0Kc6N0wICwzbHkBQGJ94pBZ5TyKj7lzzUQ5CYn3Xp/cLhrJ2GpBakWmkymfeKcX2Vy2QEDcIxnju2369rf+l+H7E96GzyVs0gyDzUD0ipfKdmd7LN80sxjSiau/0PX2e7EMt4hNqThHEad9B1L44EDU1ZyFL+QJ0n1v7McxqupfO9zYGEBGJ0XxHdZmWuNKcV+0WJmzGd4y1qu3RfbunEBAQgZyBUWwjoXAwxk2XVRjBAy1jWcGsnb/Tu2oRKUbqGxHjFxUihoreyXW2M2ZnxkQYPfCorcVYq7rnrfuUV1ZYBNakboTPj+b+PLaIyFVsA5nmcP8ZS23WpTvTnSog5wfhixjwbRCqUZs5CmhOL9EgGmgj/26ysZ0jCMvtwDK2F7UktN2QnwoB1S1oLmpPmOrFf/CT8ITb/UkMLLqMjdVY/y/EH/MtrH9VkMaxM7mf8v/TkuD1ov5CqEgw9xvc/+8UXQ/+Idb2isH35w98+skf/i3b72L4ElozP8Dyc9wbdJcY70N/9F9PVz4uSI/nhcrSt21q/fpyf6UbWyso4Ds08/rSPGAcAJs8sBMCYualxyZxlLqfQnp9jYxdy/TQVs6vYmnTgEERAfmtB2No5xf8eqN4yCWgmnR91NQZQ4CmYCqijiU983mMTgUPedf8L8/XiCu9jbsDMIARuL0a0MZlq7lU2nxB8T+N/F7EFutvEuWhxf3XFlS0KcKMiAbpPy3gv/6r+NIQcVkdlqicBgiYOnzr6FjwJVz+QQxpM+uMAIW4F13oWQzNh95KZlI9LOFocgrLUo8g+i+ZNTor6ypk+7O/PlsJ9WsFhRgnLuNv5P2Isk25gqT6i2tMopOL1+RQcnRBuKZ06E8Ri4/BOrY/bQ4GAZPE+LXKsS5jTYjEl5jHNgnm+kjV9trqJ4C9pcDVxTWux8uovsXQUEYh9BP+NR07OqmcjOsakIEI/xofJioScCLW09tzJAVwZwgbQtVnkX3x8H1sI2y8Hs4AiQYfXRNklTmb9mn9RgbJl2yf19aSzCGZqFq79dXW791Na6an1ydMUb/LNp5HdEZkkmTAdP7EPMC563MSh6zxa+Bz5hMDuNq43JYIRJRIWCuNWvM1xTjf8XaHnVPKElBLyFDMJyWiSAElJ0FJVA++8CIBc8ItAWrxhecW+tOoGq4yReF6Dcz615ifhRWLpIOaf8WTs3zUcjEBS1JEXbIByQhm6+oAoTb3QPkok35qz9L2c/mp5WEuCJgerL5QCxMXUWHBJ80t+LevvZ65pBkFa72ITFw4oGQ05TynQJyDjU1AqBylBAdTE9uIflWo0b+xSUCJ9Ty3GlCggfasdT0PX/ue3w16GUfU+QVQddTm9XiY2Bckz2tKt2il7oUIGBRa7Ft5qJfrRIK3mVs9QsDo9higyTz0N9jmILeRhROdecjV44DDZzYnJNryISvfdIq2x4c2/8e2UXrlRm303TE6kxkQ/0kylxgtsQimZ/nb6jUaggIXXN+F2vyIqMGIuJXQR8yzdFIHknqeWFDgsdvcftmkZyWojcZc+ZFY4rua8nU3XuMNchfTDpBbrjMXsJGonJ+vKX0sZbNcoakrr9c9i+bj6uf6f4yNDdaiXLRhJrlh5zmfbkOGQkosfTqWYgpEKdYx2Kxfb+ZDz4Ufteybj63LzVc7oklSvXHh5Nab4+b8DeoXZihVLRZRCBJuj0J6zk3PtbkjaEH3sD3j6hHhwmufk+pBoGYd9qCJEFL21AmLzzHHktN9jW7GSpe1p91X10Bm5/Dhxo3BNex+EtiAFD3dTK0NcvT58F0IFIQIhgLP6s1MX8wofvtnPX1PQ/bLAwNP+ulKiokjXruRYKzTErNjFrvX5n6QD7oiRbOs3OQUswDgOxzcd+WwGZH1ONZJLEKk2T4VGPrrdkN9ncxP/oQ8UFvRbI7zGVrpNjlniCHT6nYmp7SlDcZ1XmS7tm9CXTMumh89LnaNuF3/wPVa/NLSE195Ntstwz1V2ZLc/sULMGaL4gdF3src9sR1Fh33/xiS3qOrJQlLpy2luR0/y+0q0RnVBBBe4yi4ueiNOdNAq/pR8JehYiEiu7YVJJcGBNBHlCOREQviO39dwxTxdulwW+UOO+OrXOskQ/csaLPIKxUOUHktlUtch/SkuaV5QD2G4vweAaCoSxMZ8k9jagIRR/irArsMUBBkvwQBZj1NYclQ1WtdeoYsd38CObL/DJksETohDEy6ZCixViSEPvNKiV1SSCwIiVk0dPGwTZxeNwPoA0BDhYNc4tIkej3DcTHVTS8W1vYFlURRUS4k2naQ5xI0fseTRBHJQ3WJ6Tn45afc9k9VffnLeTH+Kdd9X9Rnont4E39i8pr21YM+umrbIBTB8Ex2jNapeDYMPaeXACP6jpZnFy8NEyG2AF+Ega5vkvKIWjidXnkItArCkmeU63Fx+eg8KiP95JfLbUQus2hJTKPeGTz9b9A0TJtnTVcdJW15L/+3ZIOQ3jeoFsEuB9IGzxFY52ntO1vJvNdPQMJhXkvTNcRYz7Qz6l09rNUNGbfVNOW7tQgzdp42/0sZtnFW0+64nFJ127Niq3QLT8vwHYw3kOplK43u3yllVjU+RYv76vu3JMghXWGsSB0u3ESlir8CjF5ZIflzQoMn0xbP3qWknhPYHTAfu11TcndM/gV+npAK5/yKkwjnzWs5UXGXJHwAFo1FU99jtfiDBlqk9Xmq1YKsy7YkB5nOmw6dy9mjCqYT72Nz9S4+BsTCObdH/e/YZR3MzUt/j/sjQMujqJNOqABq9wAJCDwn/vwSbELgikVGYviA89VqCQjLBkWsMBf7qNjRT3hPXMbT+DM+fsTUEgPlFV5oq2qzdgZ6uAb0yK/szd/zKqTdSC0GlgQ//otU9TAFEtm4moY7QTBAIb2YdPBQAqhW1LevpeqAvf9tku0fT+IfpA8fDsqAOAQxGbPa0YLgAOIZRFlh3WHrFyBDcFLdrSJP+9Ikfv1V16ukcQt9i8sBbU/+m0SAUsjdTq6mtQfoeI7xPWpsP+1vTo73Rz8VnYLmgxaDWgOuNmD8+vxzpyCIC1upRk0+Wd7Z0smljU7G9IdJYlY5vyGTyzRkkN88RMEm9OKFJ4IHwBxzcQtMNeMUwwUATphdaafYwiPK8NptzFLY0dUIAFj2UVoHzUBmmTP1mWCmKvvesqnrG3hj+FHkfjO3nN+MaWXgorgAAA6K9IXTUD1+uwaqHXsEALRgD82K6GVuzjQznaC89QI2B34wNf1dPIwydDO38xCsAKCdf19/ePn1xejxPZgLmzLlTLvloYWMde1luC66/CFwUdwGF5iJ4QIAM5jvbl94r6EYr52H2W12SlcjAHBSzoVjusrp7UZh18Z/J+vwjQccSS/JBNE2b1adygAAyNgJ5P+bqz5+CPu24bqx6Gjcz84IAtVx2VEyBJTqrocOCI9I7r4vD7cz9L3AGZ6DBzEu36w6fQsAkN2IsmzCZWMxqbMTE75ymnyFiK09l327D2K9sywTANigkEkmLwTn4RqDiPxpy5HKA4aeYqbSoi0AUAKsGA5go3ZXjR0qpUsAoMWolyNxzyiIPZ+qsEM7QDgbHW9WJWwBADq5800tDEPPiPa6ialFj0uNAEDJEC4am4A/oPGPxmDmXdikl4cLKa8CgG7265rxY/wjtmbutfwJ6M9Mer8dKHyeZkalbAEA49jkE8MATNz+qKwsMOlGAEC+lkvGJh0ds/j5uNtg3tilTY+NTe/JnqF4N6uSDACAHKQP1Lht8vSzU7iEyzPjut2EPs/Y38IspIepXm+8s+bS2w8QPd+8ONuavlmV3gIAJLA8T+O2x6fBKOJyYweNq/YsVtd2SjETADgxiwkX4POo7fsmuHnc8rCP05hqlnABgBq023MivCisNnZRtK+sru0oXAIAK+fRHim5pkf85kL/YfPLQ/xReQkXAChjtR0XhfDJaiOHaB9ZXctR2AQARsyesDkUv0deoTWmffvT4f6SYAUA6+xXzrX3Smi6X8zthH22b/w19LM0XlWqr0rjAgAWs1Wq4T6AhPsAVGoEAAa5PpwVKjiHWlfJ2TZJf63FjF8SUG6KBOOL9A4PW3qOHE295pQyfVPIvxcJeU+CKduBk6Q+a2BAVtKhf4QnHrHLFpj6sNDUDvhCfNPmtn4pdDSUkHE1wPPrF1UvkQS/L1S52Zv0Sb/r9YK+jx51oWU+i39Owb1p4MDw3LcwvjpMvtDXPEWBlLcw4DNpOOC8f11nKez61/hc4txssbudIo5lL+aszAI1EiiSfkCetqOyBs4trCbou3jqJZ4diL4zvDnDBRgP+086X66Tvj3JOY1rJwmj/sJrubDrVb32PWhOs6BN+sJXQ+6nOZJTgPRg4PWz8sp/wWI3wsGBQoSU6tr0dWOkrwhDNCN5mfGAM5vfnawcoCdm2CdzIN0r72XbbDWqjom1cMjYh229sPnvzWLZAaSiQR3bSL1XjCwFH1wa4ZmmLeiaD4xutxAZfzu0FwMUkXTsvb7SX7TLM4zwjGg+HbjiaRWI92lgwaxTyKgiXbnThL9j7uBDihzuMULvXXes0e9x7PwRK+6mBLGD9z7PAt7b7va1J2EHu/zZfZ6JPoQVd849MZCk3RJOxd5Nsxi+O0lUD4Pochlk5+4naG1j6yiVRKBPobLOad//hDECeD1ORiB9M37JsSxMC6yAkKEdy7S1aRmXRGrLECneqByM8iQ8x6d71F1uhkYUi3WEjh/A9Yw//HCidh7pl7XD8vEkuN/f7XQ3+fhmSfR/9fHkNcRp4qCD13IGIBIAsQXtoDUnASJc+5H5f7YWufNDdZ3SiHJqVvKw8K1RNB/4mJi3YzQP47nmN2cw2BH4yKk+zk7wcLx2bVzeS773YW/7nMg8DMlWZGeYPJ8lYLzOnN4o/0fk9Fb9upq1yXbRyN7iDSRnOnj+kn3vLjHbn3NmA2tRwcfVd/KHGxPybUwcg9e742hY/XBtEgCQYe9Qh8t8fte6aEo1Lt7a9rryutsDxLxo0o9/lhdL/GMs9n3cCxZiuv3as0lchJm9dQGckDBOT/R+y2ft/W/eswB4NFnsqcrBTerQmx0BTPclttiZPF+ctHerFc2RW9MJzpuGOShqyTLCNsCjhPV3EtMF8nVQf2TL6GzI6EphQEjQgG6JrtMu/0zWg2e97o/uoTIf4ipUvVVM0KYey+VkMCWrFynVZh/hpTTXcm3+EV7yX7W6Ehrz8KON4P9MrENJx2msYomlnUT80OrH6Y1+KEfOWn8KyenbZuHQkjBZcDAx5+J64Aj6TSooLJw3anwLeZGOQeSSPXLe6dVY7MF7HhAl2HU9fwES3l2dLETAm5btht91AwjpdUoQghLn7RhAIRWFRVWJa2Jtc0Tm+dHRGiAvx6wG/OCGa7BsWuJ6U3LwfOzSY5qNsj3Qpt6+JyEhflEfl2YZ7jhjJ3y+3ehNh4IBG4eEmVuhYdlx/EQQvnVDqC5Lodj7NWEXjMFyT14tjF768alhticUJrdl3w6P7cKsF4rhxIKWxOSELDHpzaBPR0EgNZlKdZrSiJfPGaWK++nvRxwoo0gt4maZU1CAx33oq3e+NirCq8K514FHpLc0jbti5KzNlr3ttdqoSeYKrOsq+jS0w4q5Z2AMeYnbAgCra8oCHFF0wJ/PTdXUMVyIdTRhS8cJZVr5dTMliVhKm9/TZduaYLTA346l+ILCTo1es+CVq/f+2MU+XuX47AuupenBsoFCNMV/2ywHjCr2flEAWipfnI46tqmjq81ytF7IWoydKyHCSI4ew+k4+ATvUzq2buldaR6SAI4VKAMyMT7zkBkAMB00NLbwmtJqj2k7NAGAqHKufA41DAksWEk7A33esJTuBprShiAOZCMOdd72+E7b1umdzQCSOsdaB3BxZgCAIhUUSdbxYbW7MfnSRjQBAOeidlz5FgodFOhlNAn2jcFu6KmERUygbnHGMpnfdLZ+KTEVgF9WExaIcJy8hr/tp7Y+ofIvp0nKjrUMZqLMAMAsmaCWuxWW9dpVpoxoAgBXKtOVhyhPGCAhWFJty3Ija39F5udrAvbBC+QD+d2Qpx5Dhfh+FqLgzUW10AwAWChUQzuhruPOnJ3rUZXMdgmhZDvzdRCfX1UCN4/l/wPrk1X0qHN3KbpjTKBihdxy04nZgZFKr7EcDqvvSSpivzg7QGxmssgfLo5KZRV1TZtdbR+k3S/kYjTNfDUZyWrcFtxkiVhetaWfvcxumYBgVeSozNkvIgSbt+L/2Cl6TuiPToNFUi3gzvnWRxo0ES1a/Wjq0Zc47dikmBBXXE4/cj/BEnTUGU8vsXsssBsmrEbCzB27QqDQGPdcgFpmIb3VQSk9zfTyXFlADILp0V5qUnuHn2SAu8QszfXheW/UnD34sJXHTECWUYQhLc5QozwqlP1qnYO/j2pQmGU03C06s3d2EjlIdLNuy+Z0X9GIUUWCXDpwtAPYI/zXrF26ADyEpyyj5o5bn4GKoyNdkhskDGYenTTQ+fRqo0EL0yIqcAfyVOvo2jq3CjCRKOLgRzv8NZ30rd0sMLzpKrIwt866C8KrAes6AeYvDWFOdG2WjV8dNiG2wUyaYIU3T/cDo3COPFw8EPEFcIZAcCNE6BpH0CBPxefguDvpbTKPZF5TYE+uaLtxvaIUB3bIQI6/yK34JNzrQt1az5ucZEtXCMlBED4lW3rAfndm6l/kCGLzwMc1jaGqJo9VNR0VIO4dMQMAo+m4cpFwrKQXPzW3czk7Vehrc4bS6j+UCQBQhrljlDaOxR/+L+5R2jt6Tz+GWNGIJbKP1cd9mk9gzEk9hjdUxnNNvHTW4dOvtRS4MRoQDFpUwYuR+pe67JmTNfNtDqx7LG4zNLjh8a/7i6F+adgW4ci+DW1Ilf9ok+1zg/3+lfN6pK5X6QelSexeWGj2JnH1ym6sQa173zvfno297vUcHC6hAoTC/3enX+ej+9JNHu5RQubQD4++jHOK2fiK8Df3A4QC1LZSDmK46S0VdPvZ8VSJnWHbWlJDsshRGb3dyRkMr3d8VnqqBEcrMSKUyBqMsk6yUayfov2tM+rgwqxlrsiFu4pvawUNfFtcuWrc8FmGXzmz8Vn5LxfzeQoLfUX/JWNR9xC9tZZamjtBesX5eUAqtw7rpFfDcdbgXsMcsICLg6iqrNnoDTf4umgefPn5ZdXLAEaKmKr9K2jWq3EjfHsxMwBg48Ul4dwopQnV1GzvwQsXaQIAGfxz3b1L+LfNKAGAuxiMqmZyB+AYNU1XTRJXly88AYU39jt8cP2yet2jRRzcU6scgDEiEryUmuE0/9XcsZcfId18ZowZMT1Pn3IAxpBI9rrhhqfOkyl7L398ZNuIPH7ElH1o1LGcrV7PCOR1IzMAwAuoc0mYU0VR8SZmewtvuEATAGjx8Jyr7ndZRRabBAAakrqa1eFyutex5al/HR9+Pg/51BPSD406ljMQA8pRvJ9nBgCMQyre6J1RTDLuzPw1pAsbjcEeOqQ1rdTmu87PE3XTX6L5Gyznwp9PhH9fPkpGQ8UNREgtj619rgZb/3wPFNQVbHc/a4jvwl/8oBKYjqAA6N6ujHBoGb4ATrvhNBnDILjc0CJKnveWTCZsDPoCAtX87ot1zaqQIOzniFoY5+YhQw5B2c/phhnSAZA9ApFkx0IJ7sCLThlPpxnHyv9oR13WpgPR4gUqXIl2N4nXnTkJrp58Eu4njBlKzTOEZg8IxnUq8+sqOnQo9N2SE6jdRZ1z/fsQ3CJqNvCck7DRQdc3RveF/dc5mlOPI8T4uL+oz+Z8sJ9wZo/NELlDNct9N677yFvr2oYCQ3/83EfWnj06lnR27o268AYQhVTPo3RYYPpkhgyVUD50TQGcbIPBCGxagjGtFBjceJbYSX958r3v5q3JbgoA8LXamYl9ce+UOusgjorz1/LGw/LsWuxIqVZLUflBNNzqe8wfBnngUekITgge65Xj6xD8Ero1H/HAEgzxiww6j8ZB7I9hA4PQLxy2xTCSF3tJ/60ye1nRAiEhHZjEwgdaaD7HdmaDiTG4HD0ArtUhToud4pjcKlanIcEUD7j13JTtBA9u040VgeqfcMoXejWyk7YDcHR0TNJsYM2cyGylQEg654jKROckKeaXtByXo7DqAQhhd+e41CpRPIm6zoUBBU30L6veKGoHUvVujt12wrswKY0GCX7BAJ1ePs85euedVbtDdCFD6u6HVpjhIAJuyalS4D2EoUBc+OfKne64AHj8o92ql+v1XqI15bZv54pNU+xgh2zxoFup3vOQ40Jgk6wnrxfKqgVYJ8SCL5iRzYqxfYJEKQ6I4V7umobUg1tBdDZCI6wYso5GIsPj5aztuwBIib7SFoG3neHuUIkB0omw3HgYMqAVKWPKX3j0zEOeXOXa53uihs/cCwK2zTUdWfmdaBXGvP2ca3oubeEUEhTjUTjLD469sBTbSoNat4Q6NAHDoLn1d7TVHjJAmwfrggxygS3ojqv4siKiccTvzqizQ/sT37uxiPOJBH54kEryjipahqC4WYQ3Ztrduw39FZkaL80/Kl1M7mFa0VRxRoxS2hASYUpIdRLxT54CSsaACskZURcD6T7DueOjXevevtHYqtG2ZT+lHHVdNiMYIjJ4fu/nmbJp1zaOCONKPSKaP8J95Ije8V4Dnzyb3018HkdmaFbKBJDZMrXEB/VBy2mXVnq8WJSTK8CQuWPax3x8N3IdHtP+nKkRuXSj644Hnl38rAj9tk+2VVRuWRjNa1nsrvymeydN2VmUP4vo65rVvUozV8g+vFK0Pl3TTFjraGzjnpqnYj8fEn7y8xRGCb8o0PpJFDvkn5OOcISVLmQL98k0v89Y4snCvN8eEeM3lT34MjVzW2tBDx823AnRhLHF+wMcfn1USCfNH/y2+Nkmud//9f0xIbj11Zu5Zj4+4VjnVY/3brOKzwL+ejBmAOA47WPUljHF/2vcrorTjC9qauGcdjWqnl4Xqn61TABAfHiRvtpVT/BXt6udWv7G98iwegCujaC1eL1yhl59ATcUPRL3AaIOA+I5uupJcT1P8HWp2/hzT0Sgulz3jhhpRAGwRce+/k0LmNKMTfgx0HDnnYCoD4hwwcoVOwxDBCUhRKsQoCSRhCue2/9c9F4/djN/iU8vqQQAu2W7NleXuELigy7hrrH0ugYBzkBDFOm6hLH5gmTFDrY922J2jrjyFiDRWEKvovHJtvocMB+GdcfEc26nXAIxds31Zvyjgg9jDEkcu356cP45FQyWQ/2Xr9D3uuWTcP5rnCe2ZJ0E+rAzmSuB7q8l5kKexhJKIEgrqufzwt4z0Ma+6Z2Tc87Mxal5/108FsEkt5OMAUkkyPVYQvnEFI//BZi8mLGfYTCJKmKnPSOjj6PKKtrk9r4yTzXtIoLNfgCFXbO64O3y2dHOc0mB/cn4z5fkuA4VivPPReLcHVz8e0Cn05dLt14MyJdAU5yPV1oQSPcU194ylCH1I3Xt+oTMx7XGZgDuxpWddWvXNDuvgrl5OdL1SFnrVEM9U/0qfyz+6vo/VODmhzpDG/dFXZtJ7jTriHeSCKPhhLO5/uYBuSfw1POp6E8u60XdpKOROkyUcoWjqimnNyHhPDDdV1/7ND2Bh/7aiuxpFbYlYhwZNrk3v2ylTvyNsFmfuRontBwiqKx329Zob7jLYDIb9PrG+AWk4nN4QAF3naK32CroJjFK0dzBGBdbhqGvOwlO4Bqc2B+K8vMn9SgTYKOTXQpGthMF0aJQHsdrTiN+fG+eK6bKky6CiukeqBgoB0KYhl0ngc3MWhYQhR6ULDmmmrqvURCguRGH+xUW59GyJPI78e38CbKxEQpOnYlmZUheRl8+5Orw0KnDEZXpMdVzYEcr8V95gf54U3cS7adnQVQm9yAR5pkyblumE52RaVLbIouY4WxcNzoLJraAqsbN7CUaEyQRtqm83YVxgTXFBNPk2z9SfS/2mTSulgEfWUOYmQEfiAaWnX+P0ezKFz1BzO/T9SX4B8Sm7NUmDnbHI74izpe3Dq/k2jqvsxNBX7keI1eux798aA+Ee3pag6xpPDa7uIun6dXBDb9xrdpAFa1TYvlj/3iacVrXUYInG3OQv5lASKQr6Ok3CWTOFrkE3Ab4lFR8hbY0DZsgpiXw3Ic8YccFXomJeuZ+zNjq4CmlxYhcXQnrgtpWb2S+JXEp5JHh9APA4IjKN4hdm0qnHRzhSFfJCcOkg/RinGMzwtgNDahb4H/uNWjrIexsVRC9uYlMT3CCWCLeq12rSi3BlAQrnIAdFhL2INatBUy7ruc1TE+6eZ2XkZ/C6d6+CJrwouvF0ghjWDogxPbgxotmr56iGJoKnuwNF/VWHb037trPU+K8a9PCmGGWrqdiVkSOISAAc7D91xXG8Svq43DBvltxo/jeFylAbMWcCDXDm0rM6DbyRvFtLzAazwd/SPi1x5/NHyxHgX5VESDDn1tRHXzSlbjz2ulMvtv9Dp+Ic6KQZ3edNwa+9iZsx7kIwYF4aRfPuiAwhoYbkgvhVzlgwfF3Z5tX5KgmwkDs6AQdqyuZv1U3sFzdM7UxaJQ6JM5ELO+d+/k6PEylnYrwSOBlurpS2rECSHSp8S5Sbrm9jweZ44BxmkOBY4P5BmhH1PRRkCRcXYG91K0JRzOD/B1vQCcHf//8atBI/HuWuilLAbut+HwOMwBwqaIhe73RUkx4vCmUs4j6ALwz2cUa21NgLwszAYDj7hk5AvfEbG4HnKsavV0z2HZTPwBwNCiFQ3kIus/yxQ2assWZAi2zvyzAEU2C3XdnMwLHq7+vztaFd9UtqeZAqkKXkjoBs2vNdgByZS2cA1XNs70DCmO/0wQp1xWZZFWF8W3oy6uDaQnLF/YRxHk4rtJAAui5f4zymPhhpt+bgyGzSZdePfx3cSoXJIAuErW2pSJav7eSO0FL2bOd0eNgTenDatV0qcMQm4q085gBgJZgp6OlHCwNuT4pJjv46ZFji8t1ho8XaAIABIPsmTYL/HWV3harXQv7AQAWvtqIyuK3dJ+Cj9PGMb7K/JvB5xoGYzzTeucCQeXKMYa5Jh9EzhnyD3aGdQvU/FS1qMnjkPpyqtBQbX+HZgCANU1TteXcz9EMPZ0a78Xu1gxoX41fMf9Gx5SxOfgyF43WlePpTPS7KysCZeKjhxfH8OR2QZTGU8btjQNsDjEviJ5zZ659N/5Cs3tCTKjmg9XhwU2AieBC2CpJAc9MszqjvkvHbiHW4L7rMM9qMRXNBirYkwJvjoctYaKk80gNWxIUK2xDd1rykGGMhRq2glXBCIanrVbE4ctMSCncz7rDmN8J8+7xEr+37HpwPbbLV7DuIoUNODXiuNOYAYAdqqXg3NFSErZEqkops7NsF4dEt0pzJgBg3t6nyOT+ujWUO3o/HWboODheW/ZPjzH7Y2vJl5Vf1yz6cJxee134g1HHKtqNR06Yb1afnVoMAHh1fMz7KJmMuovLqpY/VRzDP+iqbrVar9VPSZxLCflzMZyzGDZ8juE3iuEfdIFWywg4UAxhvkt7H3Vz2Nmijfg10C3pDCGbW5HkGR033VTgXud+mVEqiPa0FRwBokdONicFMVWtN2cDyUBXkaaL5B06Dqt35stna5O88Hr68+Z+0vHQeOL7mZXCPby/RztHkz1eoTOcHLwcfGzDjP9lqtKlou5FzABAt+Kmy07cqDp8+QpF+lRyz702fCBvwQM5RRMAiMkiog3HhpH3/YCarpVzwsDVzQUBQNA83tWEAQVHZpGCKOs9UgWB0sS0CoJt+jEqKJxR4KigJF3udZC6mslAYLpqlIKwZZRLawYKHLe1OAacLM8+C5yT/b4tcDp1RVdidcVxOsa8Vfh2fiRZ4tPLrNuhQJAAyu8f42gdo2Z48/uSo/P29+J71n4oGiSAghLF0zoExPPe086JT6uNadoIQf+UfWOXtuWPNasWv/o8ZgCguhluxCuXg+UWd3uW2hGf5Yq3s0gTAMDia0wbFX5SKZfmYVwWGgQAHXyMEWXhV+k+Ar+tjd34iPkX4kOGQRqfp70XJHXkjm/sJ/ruOb4mSeuYnTfjCWFvoEcG4BwfnEtpFvRelrlGIum4+DYYBA7AtEQyHmxHxTHP/CVxmr/Sp7QXobUx4qP+rGJRXehvjg/uZD3fs2M5+cf7E5+fOPC8KOzGyYE0ZYwhuF0MBVh+MePAVk05a3djJn7kqrUyvLsOroqbM46Z+nM6JvdaGsEjVfwqoN2SfHc135EyJUq88XZEIX8I5nbsDEklYj4fVQqmNM/LjlmbbOv7O+qij/N1bqYrmUIugDHNlrEKYJjRKVYXlHSPdfyGYRC+RPqs64u/jo2ougiKUNbbpI+Db/x2xXsz0rs6VPAcqFgWBi/RYfXDhM5Ens0FyhIjELEM6DiViir7E6DJ9dNP4HqWVSnodz119e7ebZ8KbVAEGh++0g/ApiYn5VRNSkMFBkNiOgyUXPxXrPkCEEh32BdBNi3O8TCdjh1Kx36Mgtx2wdrve3T5Tblwg3Dy+gFH1Y8bEJ4Y8CpF3f2ifCSfFN4eSp3qgkZwRVzRWFGKT6KmfJbumRyGcIXhjcutiG3UCPipFIo5tES/QJQ4o5fA1zjdnptOZ6UTfGNOqVAk55iL3/7V9vAJgEzoLJTAOcpesyuSLJ9+IW+7q3ToWSR3w5Y1jIGVKSSunuyIIgcV81NlP/hsnTQRh8qFuSJCUR//D4NH89aIdvtqj5KNjOeCsW9jtsu+p9no9a8geJI1GJXPffb0anRpeUfz4mHRTMBWKl2PDpgKGxjEFyPzEZovmYVbBJqzI/RTaIuAbGwW7lIsDnvF2tLp7Hu1b3qfcsk+/G3PLnDBtaF3JHFxcZZjXgxceGu9ILgKdVl711k70N7xjW3vWAcAGE3Dl1+jmMZYWowjir3aY4c8NRZirPY0Ev1+E7PCsPpUUrFDWx5UL3Rodd/wKDQrtaeR5aVhbA3ILyE3ZJhjvRLYnEuAOyGwKzeB1SZsOJCWaGuT/p5rkM+b8QSzB+lVCEqxH0kxZyEM08yz5OVyjGpfkg0zhcnqroQ1mRg3mTReLxNIU9elAcNGtsPJ5lXSDFeEIunTdwmY2MhZ8LoROcH35TLh3OplkQ6JJnwA1CB9d6SN0ThG3scVgT6N+LHBf3cmMBRjqZn7XbXIGemgb/Xk8bt/mx5VZe42eAID680ptynUQBNR9Rf8HbSWhuPaSJA7qG83SvHE4ZU8OEZqIpGXZ2GlaMKbIbq4uiDYovInRvGODQYcpAO4zgeB4dnzqV7jSqHt230tB5CUBEsE9/4cJkpF0SBAh3k35zXTHvCenvz1Ud2TezFEu6rBNFZnsbQrAZqU7ErkypRSf6XKqPZigpk+a+0vsVaED2D3JhRNwxIY2pE+dvJNX6SJNv8AiFzDxFryAUsX4o48r+31f43Yzj4WI6eSDCeJu+GPFvJDu133wd1RnUutlzOH90ntQT/X7R/amKrLW7A0s7jEKi1VMJ5La3AvXzgwxMrp+bww7wFh1HKN3Xhvv+lKLFWQ4sUEOD0zd8CG7eucPfHjJI21YN1vyB1iSH3wVqtyGD321FZKYMEewOQgYKGh26SN3RxAK4uhux5ehCjaQ3GjyCMS4cIeECSG9Ami/Bv5lzzDc4SKixDRO7muxtyUi7xbSGtZIACJ1BYtKuVj8nKICZEkv6tAB0p5TtJpK/9/XVrKVqIC5Gn5Gl+0A2Rp6qk+LbeXn8lN20x2VCwnMxjORdqIQiITNmlKN5I4thKV3Ze3OPhGP46gumAIlPrjldf1dBKZVqhtblr7/oNQt+T9uE7exCNrEZu9oghu1pbzbmo/SpgGJQZbzXpocaLCH1LDy+GH68PkYGdP4CubBJyQ1g6E90ERC3NTSp0QBu/GHRqDgqyK3V2j9dxCEcVLFpXzSIB7on3SnT1kN8WtZr7ekIrjZi5f0VjZ7TRFA2LXcUfw+v714j3uPV07vb6V+Guqzup7wTfa5UOr6bDQ1T3NbY5CGPvUfib/szeX2BjA7h6u+ioHp1/cw2IrfMVok9S9Z7yhpsnxkOmq8Xo0MV1RmRf8bpBvDNH6cgLW961Vv5SeD4Jpn5HEoPWpbBq9Bpna680qtL7lTEt5D8J1k+uhkho8aCcB6XQ2X8v3eZNlMhvyPqR7PLF2hJCMfG8uj+rFeMWAK3akFPtO/o/VbnP2iGtkR7/rWe7ck92lDvk8q6oXiA3cZktHYFYSaLq/Wd2Evot7Yw3RHQToOu7B9UKkrATgIggmR6iaaXml2a1gHX2n548XA7GA0NQHEl1jZVE8ujv65YK5p+tg0LLvdzacpN/toxn+ebxUhZ9WrxYP/6fr9Dd/3jKT9qPcwb0ZHjwa/vmHOeZ72aED+8NvjT7aj4YMnL9DKEMLCLsQsf5EarQaDzcmTWgys8xKOyFBrbcOon9JCV+wNpa53kzxvzJ5O7bVGIgO402v5IAgHbO+6RUbSNbEWEGK5hXuh+Ctu9QahUtfNk/FnItXny1lltmcqOehqOIVT1blWCfzlpMrYeA2qZwB3KGKD+QmDdOALt20yVYVTB5tTj2+GmMDy7xkk08/ezZRHkiu8F0SYN6kOz01gIVGhx4PnxMBNNZ19oSmZ0G7FbhqlOWIIN2tq4hR3nQRsLN+eWFM6eCpGpYrQ5lDB1p4wKcLgCNRIbYX1syQAvEl1a7llGiQmb6ECq/7/nV3Xt89iAoMLWoQN9mTtC42bTObuALCdRI0FV310Ea36gJCuyQ4X4E50iOCXlEIKYZ45eU7UrnNCS17WqO8MCAmY/Yand6v9O4d4kmT7ZC6qk2ekv8GIkgTdUVpWwTWFjLkaZ6q9fkiCDJsYM825A3DCEUh5hZUZGJFNwjUOTlKo3HuGa4aRV7sQlx3cjhkPGRIchPPtePHjmm8Ip2DZR/q5o86FVBaF5Sk9XumrXpwRZPTIQ8bJxNId0kTDy1nEIPjmvYo3kUVH3D7CVqAmawsvm8JH2Z8KLO8/ycLE/DBQ4WvxhWo0Pph5K98UQLfVWZ/UytitHvuWl11gNnpSwBMZijoDMvuarjMIyi2buz2w3nFt2lpdsU17X3m7DfPdSAU9ozBqxNBx8mWf4WzrW5IfaqvHR+vH+6YsTi6rz0tLf4aYgt3gu05+/SiYYq5pqhILfws18fN2XL7xjVL8jw9EWjAFXcAuix8blRIvBCOgrr//dB0izhF6Q4oWfD+aK30NB7cqT/Opn3kXl2QFB4JyrpPrPt0JPzeIdIfbzbr/hE9plcxZZnOkVdFV/zSp8FxdslyWpjEPNJJXZ1ePgtW8Q+fbzcSjnd79KdsHHypr2ZwICYguSrAJJFHlydIA6Ttjc067yPgP6S3LV3rdJuwzy3VURPPHcEuBE9RKTDdFVjDOea4iMrycYG+WNjo2W4TIQg4t+3bQ0kjB2yZ4EE1MQaEyWQTd7kBeL8RFGoyLWXUR5C3g+NeYxfCxVsIvZVoBp9HFHTUJCbXacDeU4pAR7s52EfaGGusTdyg4bF2zu/jkG6jO2B4phg6J6GFn4PPaNgei5xBroUV92Oj5wuQfwYpJO3/plgv5Y0r80XSsnGEXuAWiWmZmY1lsQ8US4K1dYzPRcTy5Jlxw4fYlmKuVWTRbRMYKmuw1I33DmDEq1P8VP92Od4QKQnw9hFYWJPYbHR0xKSftb2WMjZ8tBAxQRPsko2tgFd8fyI6MCWnUbiNYeCpRs+YHAIoP5A+IMw7ilfD67stGzBQbPe0rkPkdzvafekGuhsTZkCc1If+8DSkV43eb9zvJrl1ePyIq5kn1iSK48mmVI5s6WKnHAb87PJYKWmHAK/LiVmO1GT1IDxFSZpp6kLIrQ7z8uqWdiM1+HzjCOwrqHqwKVQCrrOeaQZV3Cn2NWhvzqwXdibTusuLztkgAGUlBxHXhPHbYl7s4t/uGwwBytV2qw66lXlF+tFiQG8sAr/l2+r8X+oPmPxVda9IVEtMFPehuoD+szcvsVuBjanjPfYXvZ1sY08gp19W6SxEGa5MH9kyBEfRetwvbGSqFojHD2jSJn5jmQ3OFTtWNPaj6WgL4LGDmfRvLGMwm5o3lTJkx2kAkCf27T4iS0PfW7p0PeQeHjoPZ90eKsPWr9dxgOSg7PKMbAB5+v0/X3SUGA8BZjFKz+g1kLfK4vgHtHa9G7ODeBAEKJ7NZ+pZtitnlTsDdSbUu3PeQvYjt8EhRO0QBPg22kUkFv+JRStiXAXYTTqYAjjf+cCyqr7UJcxbMM371xP4jigI4Kub0l4rz7G2iqZkzSvv47XPVqmV/l/qyRaVUsyrWGaB8Foer1e7OepmcSpQxfAbod3dnOIX4z27UQXtQgJobSIkWYTYZkjCAP37uo9WcCNqL9w4NRW40ADhRMYBmRub96mtPmEO9KOezoayE3UFzDVvk8YxLZha/Bzt9LXEfY5sF/FVyV4e+iHBKpbaCoIB/I7Ntfnf+qFO6ZQlYjH5ecDmKYSk61/ngM7IN9BaZKepxqwDSNsMK7eQ/gnoyGTVPFcPQgoPz7GMBocsvBftsYYjogrg5iLJtK+2TCKSnAt8VEF6h8ypqi4A7HaAjqhK8eQZOfi9fjaw35vff2n6/3Hy5fs4iRuaT43Vwu+NN/BLTk6tyTyTsd6o3OFwet5g6ojRzhtMnS3peiBHGEcGtg2GVTrJWp2gIFIs5KPyrAophV8Onw+qo/HH+YrmB6vkPieGt7VPry2xQCKnJ+lVCQrgZd0AQMCqvBgQp+mYcCLJzoVtart15zDIVzi0momismLW61a7tTrqbvnlGgR2GxHMECE3111MlUkwFXYtx1vcYe3fbYFXXPoPAKAoMCf2s2xwctbtusDZ1cPHEXsrhg3/zviTN7gbp4AtQqyGI8COwAUt782BS/OxOwDrfsN2AABVtfQvvN+Hai79m45zarWdRnmo7b48HqADqqPphAJOcVWmE6TrpjEPAGAPOIiNuy1QkZ2ZPlALnj0c0LW8YUJQOzVQI7Hs7nij+oX37OGikkz/Wu24Xl39/yx0G2C/WP7edwTWwENB1ZgUIXWF4/F+Hr/JnytTZk0+iu+3VNsAqsF0OLj5/sh79nCxF2bkfPhkWvtMijpO7Xf5R9kf4nyPCXtlFsb3H7YCf10Rc171fYX4MvixfNsA9tosnsxd4BIi9GaGT9iv+W53tfpIK2XugXoVRKRQcdx53QCAj68BNFTUdcqnmZ0LqS3ukg5q5isckmNHUVkxdEhOiVRJXISuGBHtETFhrrvIs0ngCmrX4y0mW/s3YzC3S/8BgF4cqD32EwR0ZN2mDHppiwcL+sT+RgXMwSnAcSFsTduP80FQBb4rDv49Ge9DKs6aW2psI90rV4gcAt7Eced1AQDnKIrYj0f8uwKmfu8wMr+ex/at+DweCrbC59l7ZD2HUL4oysJnurkIaug40ygE01hSAAAwASJFtvhpiPUHId5mMwgZ6lpROiDZvVwHAFBCCGOLuZhnvWQqIkz3JdKaxm5xUzevRXZkZY2929k7imOvtveTwVj3lH3OvBEvfIB4tw9/pcogEIS51MV2nLx6pta2ufndi5N/XyuzHOp4tX07VU0OQJPa84WmSZDrrfWbtTcfv/T39LPko+c1rF7YEz9rM6U1rF96M59g9cktVllRpsCqYhx3PjcAsAqrGUXBMKXcZPANOTGTJeUMraxbO2swl+LlKxzaRURxdsUEzquwS5GzJE5olHIeIgAQaVnLCVY9BRMda0k5d/1pC0gNvOwfANA6kA2xHyfxZ0FOob30iIXKxTmcqD8XxRNkr+jI0nuOA5Q5l/Jq2URemRf4ru8IkTdlT1JNaolgiwm6GXecj6Cx55gVt7BVgStP9CpJzZzxZDKMpraMBPF149VfuDk5W+JGpq7KhshgFoHBMTY8t4SruiUqOBuCgtuPmODsnl5BFd3SdTQ73pZ8fnYEBJfWAo1wYJhoYDrBwFRigU2n1YOJBAYIBC6Vl740850tyXxjgoDL/nFsp8JEAHMIANYhIQCe+XZ6Ki4wtj9z4s37J596qh8oJuSRpUTYdqvLqsl1IUNgMbGRMMVQqerjwIoOBIvhvCkAwLkOnN3usRMeBy7stGOP+bpL3ptAVFwl49CpoGt7WR4AcBwjboIWbqo65luDaW/ux0yvmj+YTumfhIntczgdVuwSmAxrg0FquqAGm9CpGElDj+MzoaBJj1s1e8vq2PD8Ub2HA5/0xTXL6K5pu/r9MM/tLnWJod96/hO400WAK2z3904HZ8b1HBMZXTWZkKNVzTR4IrD65o26AQALhQp4AbG8mTGwc8Xd5VXAeQsBSI0FsgDUVRK44G+FVjUhAgAtQ+sCJ9jUbPh1vDfcvcq/u15rNNB14z8A4DLk6XV+vLY4F6t5HHCxBfFN67IRXJ6mvw0U11QrpXisIL3DrfdWpyz1CcoU42Cq6+fWA06z7mHXSHJldz1Bkhc25j3eTjWa2gGAlJE0ZPmG5u00UW83EtQFOSsNCaSuMQ8AcA48R8Oh45ZVgdmyMih2uCIF5pZlo6wCC7EG1KjAVndAsbwg4+KWFd314aQ4TlpwPkNrbKkHhuodKaKYFRv6GbIfc/DTIS/9MrZTgbEBVOVonNhbndOIfBT6ofxW+ho/Rk89QuxZWDnKVkL8bABfj2PvaSj90uinomMD2POweJQ+Be/a1Cs42xFUIjL6yvFiE2NViUHkDnHced0AwLTOPzTImzsFZKTtprPxkryFUOjqikroqCpQTJVErdB9TYgAQEPQ4oYTrGru8jzeG2ZV+zfX4LSW/gMAWhl0k/3EBfraag4BBtTFkzBTRYeW3rOkWslLmQW+pPdhq706C5QyfZhgboceEvIzWO9lEqQ/ZO9xT/HNeinsY643vp+BGEBexdfzbQAABp/qaNw2vRWCquO3vPmnlM4CUVXQ3ZaB1pHCzA0IZ/H5u0IIma4MsYIQth1nEYuQ0CoWEwAA0w7bVYgUzJcJKp0cm5hka1dmMgCz4uQadgCA2UKsWExpLWFdNnMDYE1LvDGwFmySEogbcIxKHHj06/lwe8wpUMf+TymTqZT6cQlfVbGD4QS7nmACn+6OoP3enWfJG24ruwwvWxvb68HL+c16gt2TNasMXmaRIQBw0wgS+ynUJluos5PourUM3SwnJ0+i6Jh8vnMBH/+0qCq7K1ACAtXukEDFAHoaEAEAAARd7lPLiAJJU3vVf9PRNLE6vfgfABhAc5D5sxXKqv6W3tzG39LG2/hb36bb5EtKrTsBavpEC4MXLK+L+eAi1n/VrN8H+SC7f/79K/05bxVuEMRc/u+Ca6A8krSyN+q8ZhSj3vrcZL3BMXZZjEh+4pkDr12cFHsL/559wPd/sIUbHivH/4Z5/tj48SgOcLjTe8v3zOSy2/2M/gD9GkMWsVtTdyTVvg+3W6uwXhxk1FmId6QMP/uZeku8OJb5sRrrttOGRRDG+lpD88P7L10woNhld50dJssC2L3OGDzF47ApDuFpTp8CAII2lRzF8nnl43Csejuv2TTXrZuiCoipt3LVOC0PABikV4MhsqosnJsXcqNaGTOB3Fwn21xB7shpsLqgtLcrKqoQbBdOMXxwF9rGKrzKaemo3h+DlyEn+EL3F9zk7rf19d/HjKBNRb3EHooiBcy33plc/Tq+s+a6zu92p3tcZQgAjDX4ErKRamcBDryZOGA15vzu1LqhQJ9MYfDu3aUOAXV1EvABnDIihDlXeK67OE1OtL0glpV/vEGwZDDsxn8AYCRou9f8WQRwqr+tN5f4C228xF9cW+ZKN5RiEvjuRGUEldYn6Vt6kYQpp0tCIGG2M1CioNRuuxtMQ+kqZyxYIdOdZe0AQFgFBdiWL2IhA6bbLuIhJbK0klBFVWCVpjwAgOXhVVVBBTZuakC27IxTIAme7VmQXt6QEkijCio1Ltwj4zaUKHzkPcM5RXxjvU0t/cBQqSFFqKKiiIIb/jhTMe8lrqmdy2oNoAJD4wToKYbsWyW9Ofg7we/ImDz9CLE/XaFI8Oi10pejA7vfHCY/l9oawP52tWFpigZrOPMgp/nE2huTszl7klaVCKxzoloEDgCk2x8faoc3NwRE0HbZXL8sZyH17dVYFBuoUp1EWUDHRgR6xv+f6y66tlSUkduLpmZr/6Z3ZEMdTFfjPwAwIDTXNH+2QtTUn9Ob2/hb2ngbf+vadq70glDzAu6AcGy/akkqsE1/TKEItTbUb1F8oT/nBx9PzPQmWmTCtfG1dm8LcVdwF5g4UxQft+VK5Nvoj208DiQ8dQu3/atIawDmRPJ43jNDVrWAFTJ0OAJEYJGQzpeDGKkybTYd5mukPmldavVcjb4/dyfi/gLd/Ozoq0tIKBWjJy2eLim1ITyuoX2Edm7GMqOichceVrfRhypP98e5uOAaIt1SMlMZ2IhIq6e3SphC+I/h0nbG27Ai2dMU2mYYBoNsoANzwdjT0gvkUj0hNRpsDGuJBYmO1C7D5OPki6qP4mLe/obk8oiOTLSuUWjYBtLtYyCHeyA5Tw3tYSJItv1hitwsHaSGHT2dNhvkLxqYUw9Hu7C9CIQD18omTNkPwc1IQXEGbuS07nkzR6JsqXjCoNSB/tnqWkLsaDcUAmA8z86JiEM/Ni+SODFvBxi1gEAWZHLIlnoB1VkBkOBrf239cXXlpVD8c2NFej6ddl8uARiyiGrmQ9Hka+APe1xY9NRUTfwzLfv6FcD5A6WEtXxtbID+ymrVY9/J4iwNREZjukGdhjkX8hGsswGUWk7vnC9l7ibCX6ASP04eueRlIMD4qCzdpyeVoe+2oS3Uyi7xW4CtNYNLneV35GHLjDUvqWAwFviZPsYXKd3Uqh3A9GlyAfPGM0WbZ5+eTm8XiG9bTN+ULlK8BXWhTt9eX0xw6fmhzbNPz7XywsmFvyOUfKx3j5Wv9QMd33Kp0ouJJv36ePfA/bGqXGotwjghbiLn9s4bFtrzcNYh5vdx9wS8PmsHjblJ8rX0ORBx4SCS1KvrdExAQ9xPWeNmlEJnwqBsif2jfm+PyTxBNaN3rYpFkTQK+0rrGNAOxWV/wBCJ0kwgxiXHwLVoG8NTIrrxMiIcUDX6olm6hzE3XbRZFf1Psjqff6ujR29sTcPei1pgfGRzvgAqIHDToyngNbDbYTzaHmDsZMwrhVALcC6VHdMmJNirZ+h4+Aqx1qof3sHNn848n6ekkUKtk4gQdIA2AD2rUSVwMTGA95YBHeotFyOYhipzN3srWpDN6Iflf14z5Ob9ObbbRt2rWegh7JrzO+k0WiiO3AYhqgJrXDZ2t8iMcJNlDZRCMV8DndlBfACGGHAiLJcZtnQk7PVJE6jP8ceelv9dOzC53kfXG+wBAH1T9CXY8UBfmYmhWLzTo5rAMblPkTRKEaBgtZkotQhQ7LLEKNFqfgwbPtog3XsLUMN2ClDrVbGAADVaNwDlEhNsrXS6Fh2BW9tuLbBiz44n5lsQyCo5cbubMgQ5d85YKiOkr0f5k9PV5zqcONcoRMnJkGJoUL1q4RSvmp3aVQeS0lXTQxLDB3tHSL1gYmoFOfhhlYFVoBnIPzXLs4M6sfAJNaRCERBjfr4x17J5b7xCQllj2FP/auE0VrHLhG4qKin4El9AiQ9IcW4M8pntZMUtXK5iTkRlzvjn7m0nwtCCXVkoqCIlK6MULVW0ja07CkDffd/ZVrm6DRDZeDQv+PL2Pp6XH5qd5BLchhHXRrowk70ZsWolmlycHZeoRNFvkmOKUHKbe+0bYAslGi3kgZycD86ZfTZmRG4vKBRMphUh1Fh9Fyxz3n5RsXa4Fg9wYMTpDx4t5qxHiwKc9GSKY51QEz8zu/ENXOaQh+f8YjWU34kzjdUuErVYbcqaQkD6BQqcfSpwev9ejYSyePgOtL5aFtgex6x8BCSSdarUMGq9tUM+h7pXYPAnPvxK/trfumJ1bVjGnipf9E19v5hwCkD6GkwAgIDA0KbHTMcJyqIElfmfNAhW0nXG7kKw5twCNhvBunaR2DIAlxHBWm6unYoAAIgDcKLFgUb0ddjaX3MDHDhqAAgAcgPyiv0YByqrMdO9MjKCLhXFyfWXFHSblSYEBzYKdrKXAAVHZQbsqWAE3rVVYFw1hFuLXOXsbizkapuNJcPbVzcNEAFAlmDqdN/2OGovNz01d7tgMgPJVU6FTCfNhAAAF8As2rgpAgylZ3bHfVXaGDx7r5hsZmUQhwMzqBE7mFVjglV1DsU4rHmlNPXnfG4FjY7fKtQNoFpGYwS66swnSb8lOekLqzlu++bV36rWDWBfvdqocZ33hBvhXyZ3r8G/Gvvp1d8mlzydVnUtBMW2bB4ObwAT5g2gVoMJAKBewCzTwzOGq2ZRAqr4HwQm2HQoY1SflfFGpgGCtzGSVHhyqa2mhdv52no9+aJxO0zx0cU1B1GL+QH6viaAAEAH/LX5A+GHWrPCAHcFsZJY9ojfZZZ68VGlgozuYRGP1v5ZE1vnlIRkfUa71ybJ9dO1uT3X5/5+4usJ2R6uGEEGCTDhlSIelpNdDXBgDfkhCBXLMqgScP45B8E35l8YsGcK4Fw7QxJghRXQANhjyxkDshs+AACXENSWw0JPISL192ZMEJPWDZvfcaNoUgUWr8my5pPkuicgZwfXzWjenE2FgLkUZ0UjcwqkCxvDOpLUmfI84zmoYq4lrtJtYlvE0Rg2OJGLBAwb6zDa3AKN0xtp9MFLGD3+0V35Odcp3O5aBh7+rXbNUcL9weBlnWkPdwtovF19Mk3c9umJgmBvNLbXy/I4RKcX1VEid0n29ti6Wru6riQeoFgn7W2ZsDdAig0mAEBqgOnh6eMB1GUAyrXvEuyg9owogT3MgADAXpZECI9aJAoAqCAKw4hoGqCovAslO1ssU2z+xIvrKK6WagMAKHdsYcxmqYUBGtQ1dLmFHLASXdRstJktG2pqLXHrVu9Km2j6dKTaNSRecmGA9qR1RQ8ybuAEjYHGvy5OlEYDp5devkvTF9419AjUSoOS5RqG+RsheEFXiOU99MAgRldcPnYA8spa/hAAHFTSddLyHYfI69FHjjvfTtr1GStXaUzA5sw2rd/bwkxqm3uXVrj2bTNHsIXt+zFbJgi2cKeKY9tlsEVYYQ+eGGyzT6kR88DR5/KUvrhw0VS4vVLkuHwZmhvWJcb9+vDTWxjn+VWHK/kX/SoUq3XqR0HBGTPh2QLmpsEEANhq4LoN9XPvOoKU+F8UBOnUn1Glx5gGAh7XSBLxrEWiAIAPYtCMiINxvTWehk9Wqi4xuspxDTzbEA8ATDcorOHi3J3Pg4quWM3oQAuaOJv+nCho05SaGjfypyDOlHa9bu2tZMVZa/9jA26ti1vDuy4Gt11HeEMwHM276IdGeBEfuyWDSxogAoBbgzdj++6Wwc3W3N0ddJriKpdNi1hptqqGbxb5nHT+/YIBNdzO2JKvoMZaZqCCOhrZIxV0H4OYKdDNGrFJoAbFpivYPtPh8zIXnWTb4NoMHX9Ry20AdRga5LxjHugH46M3mZujv7QGO7LVx3JrfbcB7NhWfIaTEPDHbemR6f1aLg16p7axgc96WnvDbFfX3mDZOmlPyYQ9BnxoMAEAfAGmwtNHAXhn/kkD4OGGbFt7xj6AHWZANMAelkQQj1wkCgDwIKrDiGiM3q4BivTrJaIktTL/gMNFewCAKzU3zCRFgIYLM84tHjj8KvxqvSnhc7TxCk/L23TBjwvXHiotEtbfKvw5+lkkFSKsNf9Thf0xxbdyL0dmfhsdeZV96q/qm31cL/cESbWfcYgVSXcZmWQwLWX/OcrSNJ3jpCS+0D1+A3c9q/MHX0J4ghoN41Frez4G87xwUEUa3SS4QtPiGQjKX3b3V3oW8PrArxQTyNmt9IIQV8IZNPPN+xiDR7jOYBlumI9m+ndavwQK8ml2TBDE7KrwJRJLIrn933ZRANS++RXGPp5aMdhSrynKLZVl246VVuF28T/3Hn5NBXZYO3PdwK5YwbGAq7bkp0NM8ZZ8AABTuwjFcFc0An8wqrLx71lPM8Nb7ER+vOdplI0sAMBin1K76Ch1eqH2yGZ2Lu3EDKrTZYurZ3nk8Y3q4OOG8SVdqLdVwHYO1puo1IsrUjqt6k1Phhu+CwaMh00+Km9c85JuEr71c6VVc6coTDYFApkwkL5KBMBGkf7cdn4lfi756Ou6Iy5S8+ndlkiwa9w/tg7BPXed8XgIXq2t5KXgpeNnDGFXYCAtFKodFqHWisX+NAQAQNKCjEjHjDI6QG/rdRLRB9bgS/YaTXsAQN9mECdZpIQpcB+s8gqBTWC2tJk4uAlsR0uMy9xNswksRi6FG5OXWJJ+ZU+6uIlKLJ8pQMyjuLRZO127IrQ5dg/uumPEImCZvK/Lml4CluX7+axh4z38jDODyjDNmCHlRwt7m+xaULzsS+/TFP+b2XbHspvwWjdkEDxXhn/+BvDZ6YmXQQ6sjdKFuQiUIcsugueudKltySz0EOPMn0RzN0l5hU0iIj7H5H1Gz+NIo14fqzygBDhyqr6EhzVel9pnCR4A5ye8oyUn4drLXgFM3DSeijXfhN5+ndLoizM2fjpdAmKqvn+Snqv+DW0Rk5GiKkcF03T2GfKlFk7koDmkTRmuCo6N/+zDxA9a0gLghsGHa3f7GzHXnwufk7RCTgAGCjS113fL3VyubGSz8C9VH+J/TK/wlYbHe0XiOoCssAqQhVkOS85pjRk2/zek1zm94jq4saDT5fWk/ic7uyhNxQaIu7LyxeJbA2YtXN1P8V+fA+oqF+5lf1IrZOQoEtY1WkB4fxbUSPoEY/6uc8T/1/ZhckpcKWjvprk6wVs6sg3IUODu0ZONHFcd5ZLmswfUJMfvlsiykJf3jDY0f+sAYIYjjho0sQ2dX8JZIXw89IAQsCMyZnx3zb0lYgpPOEjADm2GTHmEMGSyRfXChbWO2QPb1UZmJNavM3IH52+cZz5oByzl+TwmeeBoGVT4zh2AHcEd2CTOq5zP2JnU9ZIhEU3pEacXOubXNmPYT9Iyrz2PkZDbaY4WD/ht8sKMY9q9r4QvYas9aWviMNFJ7+q9aTPy/dt0kK9cnAfMlygmIvIQnsU/inaR6Tqd2tTz6bImJEJrFGYCwef/j8G584jsg7cSkZ1JF7UcWR22TCVpWf993SKBcqVNaP6vE2h0aYGTARq0Jjksjoe12bjEw032fDSJyPo4Bj9xi9L9O1yaT3PfAikuJrNzdXzglixr6TVyW9QzWhZk588b3VhVCbcC4xJTFxmnmDpX3GLqAY5jTDVTGFTkj1k0gaF7sdGOfOKJtC34HbEThv/ggIetpwlCFx6rmTp37GbqgujyqYuM7QyKgtJjP1OXKRb0zm/d6pY/XjR1aeJHUxcST5o6pzcy2PGmqQ5+/GnqIRKPmmph8ampSxavyhWCsQWKjmflDxIyLTn48a5yuvCMFxofIbGbU486JeA8t6yE1FZkNQufzUtrjxxFUZqkrRb2bTiFNhiUFOkCkzvjRVs3+aQn9s+dK3UXPLHo6UEST47bcLYJGx5JyYXpCWpTCk4rYnqgJwpNKUPiECRAmoNrbKSqfJtl4GbRdC1ZtfiNNVsnc5QVV2ZQiC+Z7KDjcoTZG7RxejediCl9yz/pDuqIWIO7v8c6o26FgDWcOKdW2qUNpk5wVqZ7ptFicadaSggAbPUME2/Blh11ariFwULd92UWmY1TY4TgZCMXELL7gAFASrd5nTm20qrowm2O0CZ0+fa8hEMp+VDfYeNfM73HtRrCU936vdKrvZ2nniDHEYbSlRIGzTajAABaAClphug+jeeCBFabf1QPM439WLly2aO58otQF1wCtUUMYVdgIk0EbBsR5Jmiu9MQAADJ1WMSuftRfQBU7eskAt2jRClNewAAeuaMqUxS2Iv5w5rVDXyc3mTjs7QxG59lTLGZgghu8cozqD3JijALFJ0U7Ukv0uFieJ16c5d/rCI8scluSbvbRFbhssluR6vflGlG6h44PE0v1L1aehIANKeQjcJSuwGgBUFNleVrp+PcBWxq45x6tt0YTNtUh6kya7DVlNJMCAAwAcZVyHWi8K1gynpm50IIyLOxByE6BoFriBHrxHhNcgY6eZNjNMYb9XN/jvYv8QwfriF/EQKegg4B6o66JycYhQ3/gt8TNnbp1ww6pQJB/iMzP1UdAlQoyG9/mDg3Ka+NJbtD+ZDoVVWZIP+3VeaOqpnlsf2PBdz2cZHwYETZAuOijAIAzNGsbHlXe4jpul6Isq3L6V9z+S53FV57s2dYur2pDXToHok04xKlpSclUQCAWtQQRD3ZgTpUnE1s0KhLewDAZF57QdJ1rqUPcxgOh3Kc2TpUDsTnTYZ6SZ26LYJIdt3145JnScv+tSRc8pb7FhtjgQf6vRj++ubchl+5sg5v9gEyLz1kYmWXk62IXeBlOdlNA7fTXAIA3BXC3dAN7g4qlnMQpmH+jUrIe5qxR/047jpiuT7FOGsrJx0bGcfNGL68lS4nhNEu+gAA5vImDjGNuCyDjgTaXTWQggSvl7IAAHABIkrMhex5e3g6EjGxmeQN2beiyFIsMcXT9hZ3iuyPG+xLwkZ0je1mWAbOHxQNfKQpTmx6utzIWX3CX3kE3jpVnVXcTXJZCUe/tcVqnzf82BTL1RHGinX5gk01owAAG7FypjoLb2AATgBlas80DSjLDDQENMWSNAH2VG67rHZ9nrYUejhRlKgUI1qpTGTGF3BJr5fDAwCcXlAK+1EKkkWrqewEvULy2BZrcEF5WZuGkObGuuqUfsEkKmkb9kSXnAomtUSlWMAa3PdzsXaHIWs4UdUo7dmdYd2c+PANkUj5mKNI0finPMZ+7Q5msZJbXywQAmte7Cnnh4AIx+4TS5oJIjFCTBcDy+MV4BASLz0JALBuJLJcajcA4MoQFrF8LJ1nmNgilrLejmU3h9yVoTCYvedGEsw0EgIAmCQ5IpvLtrRwFBa7UcG6ui3NGr1awncZ2ga+y4QwofRV11jkIzgc831wRyDcOfZ9wuF8ujaslSif6D1qlWhvh0erDpx815boU9Cr1KLjboNFyIRZ7GvDwHIUp6MAAAr20U0nSOBQBuBlksIR2mzXma6B0G67BToSoavmSDqPxezCtWtGuM/7f56GAACIsTlRYnxOZSIXyZlr1AYAeD1DEM6oqJj9aA7ScNpM7RakydliXc/yg6hZLqUDyUu6a/3qPrPClqjkqmgU9+kSttRiwKbAu9ie6H6RzVoltjmJKhJMBLfdpUCIcDlsFAMRicNDGRAxu/QkAKAiJHFZajcA0L1Iiqf7kq4xPKBUc8cMpKp2VgRSHNZiQgDg4oTUauPSAlHOYKZRT5Qgo9K2IKOGsPluuPIquJia7Nufg4G3vbzgle+an/rvjhIrkkdV8vSiyY9lgfZxkXAaK9ey5KKIAgDcpWVv9UHkSpghSn0tAS+jlbvU2vmzK/RObXBA79VIJ85ccydtbi5QRKe03cTCKVGigz/+PQ67vqfziSqw0toAQFIrt7eSTrjssPD1jSVsyFzDbt8UKhDfeknToq27Ma/VLILrCknIq1vdzfGkfZYf9ZBRkydeukarr4LTHYTj3U7fmBxSsz48bCRP1SNCuQWUAMCm2Vm6GwDqgOI+9x4Jq+Fm7uL3eAcFCoZBm/3YTPOXj3u/dodfCq9c7Sr9478LSSSCQ4BKAPnt8RFmePFS/GQXvScfH5UKAPnP/GhWjT2uNvJPhw2292QYi3DRA5VSAAABI9UbVTFgYAs7yjNoOSDSoKFslJSKOlgwcduCqmxaW6QsEoh8IsEsxgMAOUAVkBcEcwY0HxcY4dbg8Ddo5thf+Or2EaYtZpAaF1cr2j59eY/k8Naz34seqeGRQSO5bhwydxXC3YniHBMA4ASoiwakl6g5B2F5DHDHQOZqZ6YHyJWuHE6sOcdQmIotHwvYqf/lXd/fFAn/IrGkC+jKzMsKG72neWn9SgIMsZb0gFdVW3Mn8JjlLAAAywXOwHDZ61tZUxJXozMvs129AjtniVWVBoJQcfffVak6ZognkNVP0rE+MijVuHUtoVZ7UQkaA41/VZxg8FE/kVvCOfkeIhEmfDpSQocNvw/f8R4uGSfp859wPXeh6nPW+BNxc6zfmDBuANxFcVoKAOAKDfUecH0lwJr9vJReqfpsVeMvb9s02OAtTaQ9wIUHXWM8bJOTKS9s3l1+DE6Zs0mUO5/eFUA99zqJEK7rFSaF3oZ4AEB0V1IlN8J+jBxRODTKapqeY73IUFli805CgE9geLP0VnmSFnsYwPK13nD62MBJa2QKhKCqeZcDUHUPeuq1xJBt7MI8D3lu+yBlRJuYz75QuY4eDVN/v/mwJRiiwrOMep/u1Qw7Boqcn6jpOpjfhm/FvzwPNuLtrWabFcXgVWG9nBXG/FP3N5slV1GFVP2BcohbSVCoXrdT3gNr7w3KIMOut9BvxuXNTe3gami2d2hgW7A8QabjNRuaaAkZkGmRFSH76GMMtFKFF6VJ4Uk/YIv/iZQooCIDM7pFPSQzdF2/py+WDSQo9rU0Q+FWmX3+t1DKAxY3EyLKkl0CC6AJmtF4eRiEqgChrTDnsh09afuxJ9csBnUPYVk35msPV7WwyOp94BCpCvT7TvyTaqY33Lgq5XAIY5butFhBbjePXBgoRYpxNObIQbCz3csteRS/Y0EWHXc/4gp8MA6BCw/mcqvz8y4kSiAYbIJFhjzwzQ5mXg7Fgl1oFHSKB1FRQ8hxY/qFJ8RHJz0PfDInOMJNxcuVPWiQ7nfORkOaaKIRaKEL8U5h3cf9ad3HCa378I+OqNf707oPi3wrHIAew+4tfQMpqChw+0EvGZ7pow/ub0BNi5yLvx78hDIKKaXMOUxKEKYekUoU7gfrPoYWiBUR9j45q3jGPQsjh1z+aRO6Bjnjwzj8El9kRqyraAuDfhWNNQ5YuDmIVjteui6G2rVJChUNWOnidyteR21FVirTNPBOzlnqOQjmclsbhdH3SMKeoktqZ2QQN9OLakubJS8mIGcB6ZArqOPhJXwgFqOiuycvMyMcatrFJ2bLsKAkuMb6VQkBgNzKzcTMqga1eAGOsqz4cJdkgqKo+DSXZQdoUfENL38INKIyXfvk4erResTmPg3OhDBdBdj6neA1KyFTSxVNuut6XZv8wHE1H3xq5dEiRPGueZJ5Rcc973b8I5quLGvS5D43j6or2+R3nrqKnGvVGOqyeEDPD+BhmkwoL3CfTRF7Xy7xm3cRKhw82Kq1Pj/QfJWv0EPRiRbc7pTb4/FqWa1QYWdkMWH25IuiwN7lKAAA+xirKBDL0plFqEz+p7pvwFjp323tmUvrTwFczQxcAVxkSa7FQzfvAgAYCrfHiaZu5oNNxKFVidrrH3hHarggHgCwJBNl/lh7wezEKrysprWgqMLYkiX7du5JjKm9txJqr4mT1QxYuElUS9aFnrwhZ5MowM5E9BI4tkOgBoAT9bA6MclJo376/N/FYJSFy3Vtq9Pg7S4nEwDUZ0hNt6dijFSLjECcqns/By5c2VhxF0+UCkZbvbdr/l1EouPM7GRskga1MrxBptUsW21kOsMgpAZZyLlWnmwdqBH3a7xpiG2Or1z4XkcTYqL/hS6wEvOvVTF07bUi4dtd3LLXvdMoAIAd2XU6zZlKsiLAHY7bzur25s9ce/WXdtUGLrSrSnJxZtT9L14AwIgCS8SKibYoXIui2cQJTTG5BwBUkFlhUuoWP76pxp15Fmfyxt44BDPx6BBTS+2gpaP33O0xtsjH/u0dqSy6UrDhOtScTxxBQE3QhCgWxrJtPUglqWpkgJrdNmjmlsoEgA2EHFMdGkoQpICMiMBd70UycRc2MGvGYVenseu8jVaekEL8m87+AEIM8TtT5989vD9lOjZNbhqj8EIG707iqQ6t03YLLYYNTCkFABigpbpRrAF3odnps31ZQGus2EALOkrSgirxAgAGpi7aBZ1NHG7oS+4BAJ2y1DAplvwRTS9zEkQoPjdccYBcT79lBR7BfaDZv/E1qef/onV5e7KR/4/t5Pf0CzxQ+7+qPP1X9c3e17palAmNWjQBAEBUmGFzFJrYQS3VgFvoNTviIgDHfqowrVLB+DuZ89x+zu953TiSprj7L+uPO6uJPq+ykAMAwGhd3JJaGW1w8H+vYfXZpBdaAIAx+qZyuU4FDIaSBpx5o+tY6ysxMbXW16qJ1Ky7ir2RUMZ/T91WKEiT+YGjqL2fzz/hHILfaDlBfarPwwjhnUJLzm0XUgCAKtpWcUMPQxQHvSiOAIvWO0s3smfOL+MtDQuD0SJZ9hxfazCqOwGEaWJ5FwDYwWhcnFF0nEtLProykWAVXhQPAHDxO2UX1g2yB9WH9CYXH6ONBXysKSXi6/R3hO8yBBKo1cO62lMDdm6yBduZ2N4ApBwCGgaoOGw0l0/T/10MRq3AQdc2HYG8Xk4mANC3EM1tTzlZJK0wAs60sUxy4AJruYqsxlS0gppaSAgATGX59QrWroVjGumTixk0g3y31hdazoZb69vzNuQgxIbqyVTFeM7P+6EhF+CDRh6WG1wf8aE4lFQvVYwDFc3u36vTOeHtZ1Txj6ejAAAqHpVTX52cnsoEVDNxVTzzzJl/fWTlSgZjZOWMpmPYogCkcRcAwDY0BXKiaaaBlhOpxqpE9wPu/46kuCAeAPBKpmW6WJ08zIO+UIzW9O52o2RlLbHTzeQlNag5JhUWmJ3idbsKocmKUyj+t1EQOpJQLMML/fhSJRT3GnpuonCa23qVCFY4nxVWO+eES6PG/5PwV5JjFG7dsa2eQapKy8kEAKEbUrvbU3EbqfZ1DYpXwKHZijtb5BQxUUMhAMCrZcrpY3WczSBNPaNmkLaZLTJIrwkhk/HEninzMcz0nzcDTo/z2RgbWqo9Z7SJof1NQSycOWQ6SokUAEDreTj+aCM/Bim1SwLejgZ1eTeyo9Kb1chc3cWVuZ8pf51qVt20ijFR9yzwAgADdCsuygvaOvGcqcSH6r7VcArxAMBokSx+dgOFsgjDmpOoZFrk4+IqZD0cqFoKDc2yK2ooeL9eyzEOKIvgHULLrn0MflgNbjpRfbQkAbSgwnAK0XaYCiUZ/UPfWNntSHdWoUwAKC0SGHV0sLKDq762BIrdk9PYYeP5CxDvGAte8KL06EJC/1ygT2p9ANGGeH50zxuWpP5ojzHlEiqVIw0J+tOCHkYMZ4pvPTVWKQUAWBXij8Z7YJBSqQbcheYyaARKHBiAcBqgS7wAQICKizJDn4fqM59YXMdiPAAQQBUQFgRzBjQfFxgx1eCE77oT8aG1hn+95Xg+xvMXOaKLqezwhuK7lqc/qjx4YZa9HELc2NV1mT1F6MFFEwDAQMRt0IMacEC98/td9tQ8eRs4/GBSFZlDFMve1d00hqHsblKeWYuQ8FFBMdFaXny6/Jou6idliJ+l3XXWcr3WLGpPXXl5UI4NLWx4V8qNCa14+0nhSQkOEAKyd3GFiuo18uLGPC+8MGFqQrFj3kmpv67078hXk0stMi2+frECpzezP5xLzKqmaqr+BIwIAHlx0mWje/pBvMGCHABgKMRMgbHMHJOxRSGZoLLmvMLsI3mdZhYAQEVB8pTposztl6cjSUFspm4WH/1BKVsPVEEcQaWYe6LeHZzl1vpL29NBmCA2NVDrsLRGsA60Uofd2c0BR4OG3DvDvOoIWsBXqc8/KWXy6td56555jDWs9IKBNcgXZK0vttHbZw6L7aiJj0RqozCEw6v8WHSlmhJqSqRATNPjaCEl9KYqiKQ73l9EeRL00EAN3JG8B59DKynocr5jPTlSDj6WNkLiMEHZhGxGciDWQnd3go42qClbafoELdPTDKM+/PrHeW+Iw/tdlTu5vqxiVkqanOxXrlg9QVTfbdZysCRR6mYUAEAaARNohgUb1yYPJIVYNgHFLe4B1Ecxhi+XUo0zYqzdTqFdJCR8VF0j2qqN9Ezkg8Mkz2lYRF/L5PHRJp2uINr+hcNcT/RitpEddkKCh4aWVF3zLjXuXw4XTpe/KzfMNa6xwnwF58PaMBxDV0J+hKulnP6E252B+GxGD6U1Ert8FwDQhkHX8iPOnlG09fitJ2NRl2heeaMiTXRDPABgubJ8pQA2f8ICOpHC7tuRaXaYWygUb0dWXCARUGjejnK7Rt8MEGfsNzI1hCLFC0MgQ0BY5XgRU5MCyrcqE6eQko8PxIWUprVwkrL/pFCltM0XM0RKN3Xb2WPgTkOZADAgmNCi7pFBpg2Cqw3NMP+tdLTGyu48xidts5kQAHA53Y0gi23jPAUNdu3MONCwwrPHCw0JBjEpaJXpMtsRJaPsxNklyHI7eR6H+EyAFr+Wu1tt+t7CSZCs/r/ONq6YFQWqy4bqrYWpLdVSUwspAADFht6u04NaSe5T0RpQ5HuGETJrbi5gZQYBsMQLACyomOgGejrYU4n1xIuDldwDAJr07YFSVPQzFfQdrKC5A146CsG4RnTvQch3ggndi56+BzucCEwxwnndLnYfcElnIhsD7AwjcGUO7aN2GZtrQe0xRteBuq7ddhf+saFMAHALdK1FNZuBa+sGTUCphKGE9aQzzU53X4hSIQDQYIW4+iXXwQkyPbSiHrDIHnuw4wd7MHkyMNDhKrwhI9zDMe6C+OWIeUU66f88q+/5bW7dywGKJYYbYCkFACAwoaGjCxYFSTgRSEC5uQUnMwggJV4AoFF7WjR34OQTl+u6GA8ACGwBZLCYUyD5eAHV7zrQDF7gSAHQnu60i91p7NkG57E7n9gb3yRlBYFnVZ0DJdhGB0owrpauzG3XaTVwoUwAoBYNGLV0sHKDraU9FQquNhPfk9rG91ypqz/kOwT2Ff2wRbbifQr3p/RAgEhX/K4dAJNcD2hetJu2v4D6iES54v9LDbPOdVxpeGK4AJRSAAAAkeoFrAgEwNzcgMkMNuASLwBQ4ERFj2Z9C5NPHLAW4wEAESz5Ixpc0Gxo9DqIUKyDlO8LiF/T1n/2LCb8d+qfvfXzbgzq18A/vhj2xwCb7fLg95bz4BvVQeTDRAPfs50lK1CV+dDjBRMAYJZ2qrlhmsbZkYMtCwKQBbuE1bV75mcPPbrSByhaGu+r6q74MPzus25ffqCBnb4/swfE/1X++1BdqH41n57m2UV39mbKtBUa2mmbMo3pijBXLQnXETtN1rJbid0/qYtdNeobpJrXZAEACO6JN86opJvmSq6FXDqt6U59KTfLta0uNqRy3fe3l9E7xFJQxtJ6l5XlmwRl3FqUsjiR5/hA8mtVILxavKcfPQIzjR8zj6aU0NEUTq9YsFYCk4oaMWHNAbo0owAArgLCMdMz3fQbIcYmoPTE498wUXHN1csxAqmtFVQVYBekfFwGOzu1EwAIaI62uZxooaSCmmx1baLjCXe16l0UDwBM42vzP+c+S4rv0ZvT+KnCeCoMky8lrfE+wV/o7xv8lSlwh7fNvHCDt6hPxC3ekBPogDfibDrhjTmjzngztdu6sDq3oEwAqGKgk0bt4WGdKgd7GXRPCcU3pWykNMvNhACAJeBgC5e+hhWkArOyM1uuUIZptsCztwaaxTKI7YL2wm6yA8/1mfYPU3HjUuX1KQBnOHmBh/jMaqX+RvfOlLzGFyswVv/5nL+qwNpM09lQw1qYyv3LNLWUAgBQtGHq9EzXU+FMjE4ApdqfxL9n9oXJmpsjaq4W5B2kK+oCAAInIjqQ2unBmkoswqGsG+YS8QBAffvuICOXfWTvG9vkQmal8dMDHYybhpAOtnwH6OB6noLlW6xwckiCBU4vEsHwLvLqlxUipK5Eqiy5bXfAVCB3xgqbPjjaSZ3GT5erYy7mJPexY9tc83aj0UwmAKgPafrsqfd4u5kxCHwVTEoOXDSdkWJlivj2HlSaEAB4pvs7qADXNEPvQYaZdI7HwY6zdXAiCB3E1JznlOvllt0FxUOllxDdpDdXOB5bcZf9EyOGg9qlFABAB0CqB+UqkAd0bs4AZwZ5KC3qAgA+ELKIIPOJAqcUDwBMt+3DwhFADSZsdgrqHsYnHwss+W6wGTwghcCyITCnXeRuq6UdwSsTyWPjVv6TwOTENNl4g/AptNhBapOVjAWtZrcn3FAslgkABRanFo1XEGybnj8GlxCBkjV2ui/HdD9v/xrmsdqFjZTKBItmxfcSFEjigQDRrfhdewJmzdTXA9cuZRLtdCWyFf/LTuD5Jbfu9VpBi2EDU0oBABboSL3ZSWiBYsAdK8CCys0JRGZwARZ1AYAFOyrqvcdZiHwiwSzGAwA5MAKoAB85c+CyMWl88l1gMbhBsP/ga70JnBvwnJXpxVHhNbLd7ylG7fI9tRH4kDISAKY4gQate1Cx0nMYOyWmaQiB4cRZeURPolI7P5cY/UImFqe7Ptx3/mWSDm4C7Hlb3c4bwRCm6nPMAqbyj/fYoyx8Pw9W77Z5aBpW6sERWsYBCUkKeAXWLb65e3yvxWCRRWniEIzl7Qhf+rFTQr83mCUQtK1DrWnuwj82gX2cp0vK7f0a1a075sa4iCnp6FqsoRcVp9w98OxdpKHRn9KNK15VN3oEIzK7mIWuGWyVGuwGfH58x4KvDEIVM0FsFm8AgAZKzNwfK7L4dlFptgaVQf58X62yzAIAREdJlnTZznr7jw+6Pg3I4MydDgg9ICaG9wtI+lDr5R2brvFXBIEa4LFH1uJN5c04CEpJNg2d7DKdYo6NJnEgQMyzHVxKb9MEHa7ZW3tum9WxwijycNI0itQ3Tseox9mncAd3S9gKAAvg4Bnm8X2a85Vj852EwM6fX+PDqV2BaNC+L6ymBfnXy8rqC87WjZkp7GZJFwDoQGpBlNOxqx5QLjFd5xYHWdoDAHgoTxQohRMl2pWp/K6jBeWweQh21aMmGNsDM+swNzJw/yeYg+Hu8zVkjX+fYAocLnMQbIvFSa/aQg4ul2NGsexGKwqOblKi7ehmSjQe3Wzy20e35cUyAcDF5RmyattdanbQoEvjVCWcnnK8G+okCgGAnj2LpRmWQ8kVbNGZZfbQjsahpsg+HeLVEBA0midLc2eZLlBPJYeBwipvDhNL8B2sGeN2zkTsBPCbzBUA3k8zd8L5lf4BFAVeedXP+pya8zsaJwb9TGdSFwCQVIIoH5oY6ANyKjFlvHYQyT0A4BhVOFAKG5d0tLP8igqaDUJ5BxOGj1YfboqJfR5AB4FPSAB/fLBY0OHfW24JjfDS9pawJex8oti6E0lAtu5ZyUa27l3JSLZGKbstXjTAYpkAIDpOsWpYczY/GMiSKPMIuL37Qk/vHbvJxvCCOa4rQwAHxDJztFHfg4iyvb9wI4iMts1BTpQ5UHo49E7S3c/QD0Annn/AwVGYJm4FgAUF8Qzz+J76M3cZZcEisIDOzQVkZrAAFXUBgAIpiwwyn2ium2I8AABwRA/B8CZofHxssLIPARG8979uBxVQPFzcElzhpa13YUso+USxdXskAdm6c5KNbN1zkpFs3efsNnnRaBXLBADRMc2qYc1cfjCQKVFmF57dD83ptfkYPWNU0zVv76h7ErsCwMKnSJNzAFH4eD4jhDIktZVbYwT3W+YdReCT0BUAFmjG08zt698j/RelKpAHVG7OAGYGeSgu6gIAPhCySCDyieK6FOMBgAYjegA6bDb5hixcNhaNL/tgsMPrkauPZ5Hh/xTVx9cy8jhHMpzD47/4Fx99uptiNG6wG0M4Wxt16Kmzte735N/vgqq3BxDt4vuLXcuP+m5O/KrHNQOEt3e3r3MTR7zVhdiXtWt+OywrmazPDUA93Fd82qtWXlzDyREPXF0sFF2rpHiSRAqkm9O0vnks6JXW0auyN3kfrYqZzW01yFo6JSEMGEDoBHISrfXXnaGBn2PjjPi+NnGstVVr1s/TIu6iYgQ+YbAPYGN56wZnTGXU89pAVxIAAudXACJYLd7u5Hvn3hQsXE/1FcZ4gX0WQHXr/hQ/PRI6rf9AIZYYkUnwuCN2bL5AhOglScUiRHdVXGRT9J9hTa0H+dZKTgIfURn9ZCuJxD1q+feF48pEzVHxf6ZtDotC6aiPBpTXnYNmibyhxiWQ16hJGk2TTk5j49pcHznrISXLcPjoXjyL7qO12v4raIhVQOLpe8qCLLNZZPeMTX6tkvcoY1N+3Lg+clEl6S7CRFWURYeLjv0yT9uU/urrwkbNt+Ms+ysCjcAKz7N1tc6uFqHVQYvQoX32t/je8bVtNyQQP6rWCrvAa/vDNeWZ7nnOsDUxfEVIgQxzPmSaC5kFfrecfUoKW/lHUhGY0xBayFMsQBzRTW9d/5m3qdcTVj9/h9BZWAf9ScJkpocTjamoWmXZOJMEhuMGgWpWHGmUyE9msihjgijVMayAsVUeG8zpC7L6YqEHGeBIIiJpAW808RWYRE6HofNLAmKkXFs70Nxl/70AMe1jfUm+wKJJxLalbtlCU+ABmc2IWeVjgVYyuIh+SrLeyQ9DXUScL8SpKUA+bTEtCIgKOa3jvWSVu0B/3AqoqHepvrEA3nB0LSQxy3dMX8RpZJ5BSUMAqYumdWepHnuI/XQewBJXXw2mrjhzjlCehsGI6MSKvXqaNFQvncKU+fAmGIGsBHNDlRBk1eaU+3Gvu/yN+g7BRp1z0FUQkPXkZRjxEzE3VLJZQcFsxoJ5aAtb/zLKbBpk6aQYjInSGrQlnrnzuvOfOYV5qjQtT0XJd5oq+pYJmV39gxMgLlB9uLT9vNhCMpk7A9PJeasWPBbOUlxIJEBqorrIesY35MkdxrFj9WrFDCDCkeyg7Je92OW05tDhKwiEnIWGwKkRpXURVNugtDIoMtm/XAKxpYZnzkT0YYnwxifqwmBJbqW0PtTNZvDU3te/d6b0Pt0X6kNuuKGHIxKDnyDu2Nq9Y3DYcPzDEtHiWZFDck++iCdgE9esQsy40FLokvtZ61HRKCrLTUIfBssNEEmHqbqfik6yMHX2w3v8hqGXdqyQjp0LDb8qhT7G/2Nvu73a78QS+5pYL6H5r9inSqjp8DJNqLnqoP7NvdlQMYSs0W3lopkwOX8O678qIepfbHXEH+ZGCq6yLd6yUA98mJLRse4/6Keyoa+zBb+bnzYhVeddHdxu6zBFhgxX6d63qeoJ6K4wu/seG7C+x49C6HWkkMTli+C1RBMSUdnmAiFYPRAPDHtUHqLPeReao6lgFEeI3EhzfReP1gjC8KlrdklHZoSX7Bj1W0Jnj7Ymv5tnADH3FDh+nVIytDyo1grvA0Do1k1IpVgE7nU8bFBDGRZD69nFSy3UvJf1OWwFrIhmWt90NtqgBDvj0fNHycyDc9QRRGvvgGUshqGtX42vAsO4tSt1DvJQ6UkBEIc+aXWOTVa99+WbOxDhMwRyYCZY7zYk3oihjI4Bj3kL7zfJ+BKQWzHwKH3DpQTdqeg7ED9yoRnQNJDCf7jcillJGhJxBYjYAdKwAaBsJ18S6D9nXmo4/0Lh+nPA8d9ZmIKPXeTN3dBwYB9C0UZp3KYoqKdEXz9k9zMNeD/9a0DyAwKKOmik5CAYeynb8raKJhY0Hc1g6fuEgWwmDO1mktqcDtBQXN5nqXnccYk8F1vfqQz7LE8mGKhHfkgsgwrUyHhBBdQO9F0QmHPB9MQU/YoUL/aNBXi5wPbup2Oa7DLrnACEWxzoLQ9QcTySOhYFZXvgQXcG8zE6q7xukivOOz8H44YT7rJJikywt0kwt1viT6vxy5oDz83yTouI78Z9Ux4EDbiWewhiI0fXSWVKSd+nUSdo2ZnBazv9m/rI9l1cH06KAswFolWytH4qZgmUJoE+lawZcgBlmXclXECDeU123a198j4H7Sq6GWUOTmj6tmqPJxGlopoSbbSo04Ci+jsTiUrROSNhs29ox7p2O98gnnrWh0S6UopfF8fRVZG6/o0nMEt8YpJH0iYKH3oXtdURpgo+zZI0pOnsWBZ5ha+gCftYn2KLHKSbUFQMC49QBm31FifBBwFENHeL0iTllYE5hRs57GbQ0LCI/z+gc5v+qZGBUY9HHYBU100FmUDfBVpn2QrLNamEbNhNWA+ynkyYvoLkZw1HdlmJ0dBB4ZhdmB/+DXVx3/Te3NZymCwMGM4MACcAvRGom6bwE2eKhIqHYVOtV2TgmoQDYw3qHl2HwrD+tM2+1ULm12r5nr4QjRzihyLnP4/edfJtsQWxdvD9YyfJxv/OeGDXhlF0x59Xv+UVvZm9XWFedVoyfQH2I0ztSxo20r1ZKcNmYXJC6PmIRwpNZp9S6lYVLsiUe5jR7JE35OFk1Ozsgojavt1k1ER7IohaZnd7lG8tmreZuYf2C43UlDQOfKx3WICBfv2VmUMjfcmdMTRyJOZ+KZGQ1eolpSWsOZ4qVm/qTnxP/6pP528flWdyglLkU5m6vnxPWUUFAptK2lE3ulEYfoiUlKlzR2TZ4EbuZDYDZwBYRfpZzvraIWXfTgZGt9t5YGE4435gov8/AwAC69pNBjLaXTJwe7sSckCDL15JSOvAiswKkb8HZr4YSLFd4EOchsPx6SL4efP+zAj6uIh2tqyebeyKLeqWraPrvGNyalt0n0tqRy99JfD5NOIPi4QCuTSTZyCZN0z+k9JewzvYJKhG7Kvkb+C/VPzjt3To9L7d5CPHfeXJembyomMU6pqBrBpcPgBncB8GdHkXgBPdZwEt7v4AnFtN0Hgz+wBM4RpYtPUuANO+Bhal2K0/DeT3zp9CPzGBb5MOCQhmi0oUuC4oHJzeUqkCV1gI22uNUzTGm2htZcG/r5QHAIYtTE5JBObnIiy/e4LVSVwaKCltZzKRuLu3rqBNp/eIkDZylGZ5iKMqoI01UReLUOSCj7DIgoEucKMXV4qKb6PKqT8HAj1Djqx/H3a5Fs8Gi2FZ+QVnERFZbSKHHHUN4TdjKApEeG9djAnBN8VfZPXMWsKxZZFvEb/SfJZOfvylx66TqaA2UjxdEG3TyEsSoUQtvZGkAxmzSov9x5toHtyz8+LXAiW68vpsbSnysrUogBb735H6ym8QdV5goZgU/qlQSMj3zjAIVzuFlfZP67IzcKUqA9hWiySaQiksO6PW6oZFO+vkQXcTKJX+asdnsYO7k2364jUgyVxH4jyuT3jl4jOFaOd4PCYixU28cAzA9kxmxEccZ5W+vgP7GIguiEjJc8x5CBsyX2gGQXvtHjQN7C3qAzjYxrKe0y+8RXAt7c4qEQixhKmPGUrUVqHR1/z8iMlni/EVOA29I+fINkuIQEDH59HwqBSfmitPhR/PM0RfBOLM/nyc0Nog1BON5D3QWzrGkMLaEbEkwqTR+V8f3y5gv+n0zn5M850OGBtfAApiQVsVfwwXEJVCH4WQTAl/5dvKHUF8UwJeSWeMRFdgUTnArtnOOdusnXNyWne2c153bnJid8ad2TK4GVI/a0jjrGKyxNhJQC/g6u+U5vLvFLv+O8c+gM7ufQGdYZ+ANyA0BBLy/OULODoFRJg6VoJwIUpx1Q5ZlDeqYRIVFgcTza1wmBQ7Iff+Oo6b7nq0qyjgQSqJSbUwnrDfOQaHtLm1/1GHd/PueSO0kCCUiSxb2Meps4Bad7mIfw39a1lJi0VlI765sx+ESHyMMyLHtuOD0QTK2yLayTMT3spDbUne9K0rp5iUA6XTrEpMk0tzs16wkk8oZzMhe8OHHoWA0sJIJsVXdjWnatsyay3IZRzCeqwY671Eza1dvLGVDCRJOfQDe0TMcB+sHoNJQemqQa2jjXaNyVlbGbtDQ4rfXSh8VfcN6N4xFR1rcp5Z4Jn9OCXcM9NGjSWbZIrBesmF1/iN86BGWmtvuQKJcpVGyYqbTdqAscRuR7cAD1d0p9z5TtnBGAYDRwqt+9ySNJvONDrn2TsDj3pWzmhQWN9R2oF27vxz1ZstYWeyUfI8qFMm5r4MDo+Ctsr+87qX0hum3GVWMnQlG4XCKSnql5PcV/e1RK0sW6K3/viVL6QqwJZkrPRasrNa1YLJxCg+GZMCM0dGRTYrUwDWo88FEaDCcG70apOyr8mXjNXqk7Fa3i6NKI7DKxNmJAwVrMlqh+XWSFHUOrAlVO+1ZGKWliI9qia9ymoJ2UHZqqmWJNZPLdFzQEZDk2Q45f4dufuyS8o1FRlzScWW+ZMeT7YpV1TIuaDiCIr7ur3KycRbtD+jTZyQbYnxmJKzKZThW4vzhdl9lTFufS6uqRIakE5ZNJACeJEQBS5xGgvljbLLN12Dk46bL0dx8TVwgfyy8XfXztmllhRfw7TpInvu/If6SrqmIuEr9krZsr8Ejc0Ts7hEvkwtsUEfGUterwtS5J98OfW5N1wzR8RbUgdCYq9GpuZvp5gHNEM5lZAFJCgJXbElXuiGByUFsMUl/yzkL4nILR4EgzmP4SVD9vyBVOu+ppTAacGj+v65MAWLr55QTV9kMTCfw+GiTCPM25vmGY/4E9+yD9T4hx4XX8pG/iT80Mx8Svng1YFTYKHgtXYqFz4CoTLA647tVU4I7tyfqyMsZX3XHfbFqSVtvZbbn9Hy/ORLoKNYofGbgo28BLeJapnGfgPig6vMrYu9okWpg2IzOyG3fiXpFeW834Q9yuNjJRF0nRjE0fZ7vv05MmviuhRP1dQP13cpQY3Ikf2AJU6UujIlOM5LzEXAi7QYN+iv1OL4Jgwau3Tresb39peHUu+2w591fvm9jY/Ivs5d2VHqqf694D4e9Hb1JnH3/Sx7XOag75knrm9oEFkEfZOChrCJy6RxVY+mUo/OKE6M34npq4GyF8enXlZf1ZBQSj4p8X1PA7hdkMREmnEgCa4iE8CU/Bp4oVCI5sKRaYp+tlQKweAJoJHwJpU7fHwOEQmhk/ntgyLZIGJB6ASXF5aWA6pT76qitdCeKT2QTYcFbffZ1s/7pqnywq3rWziqIKyvGnWIqlexPNQ1nJ+UP3vNTEIzjQksk/Lvy7DvKzGlLMBK/bC2AFjt2Ce+g0kg8gXdVfVW2wk7bstlfOjQAniWAA5wENiA6eLHcmubmEzvObFM+m6z77tB2qlNNcF/EKZWYU4Ty5gjOB0uBgt0GiGcofPoxOJgI0rc4oZRvCWB88saKH8wK6IFCRf4WgmuKMa9kg85JXjvEFKptgC+bQC2ADkDIISw06Li6lgbBlzSOcTlSitaDvhmAdyg0eFisQYARUSlXyPXgqGZdImceg/s3rWzr6sweDPYfqBVDKbaAvh6ACJtg0lTqSZk3mJbZmQmr1qDjAD2hwMGW7fRK77mUitexpHlc1msfthDomF11HS+hC7iq4IvNJhUmg+ONqc8l5R0QmPL89cKWUdTS3zxP8T6bgBB/DPok2JZOob4BOVxrENbnShM98RMysmfaXwqnbBlKYEO54w9X4wABB1OY8eOc3zWgkCodEEh5HqSqJ+aWLVmE//JKkBVrlqdjiJD+Wp9ukD451E7eM/As1ZCpOO7NaSZ13mh8fqGkFptLBwQ5uZ/4mXwf+K7Z8hvL8UmOHxZ0xWokU6fXq0BbuFfC/Lcxv2btgYYUW/YWLekvdmoKxN6qXV8qmEZdfj9d+CAzJudUy91O1bu4og01lJkTOTFHFHRO9frAEkHTzydVJwAQFDCC5wh2TOK6+enMTnXwVNK5RvCOWAFB5I94RgXL4ALTyk1CHLVgmKpIH301fWB8ibto2hKqRhhxQbECESYwtmTffMwaPV5lDDippaKi6GcQVjSBboYG0AODD2g5xXgTQWzKvPV/4IUDNQtRxdMrVYCNU3lT7ZZT3nzCBBAYK8F8DEFjD3RHvLw3sIdSE0GBuhXAELBWbdzUzbxq1A+aYWnYEt7PIxyZgF61g81yJa18fRK+hEl8ifpxh+Piz/xC5QFTuGaOZJsaXYINUAved54PjbeFwUHS5w8kc28cYfGno4OJizliCkGweF0sazgAkhMF/MPxIfj6tWUe+Ve4CTZW2Azf+zx2dM5o8ufVzqdYIoJazr/+HB8sFhuUAJCZw7nm388giN/2eLT4QIzfDocTofzD0ekw8VwASqIMQUxBZ+gEsJMUTv36ivJg5fgcdKsCT6/7IFI7IlGfM7ZE0JF1ndZeh1c50uDytl1k5Gj+UagknbzWfiVteODp9prGD3Fgtek4I65leMugso978cunBIfI8221n9WdL51XyAVAoOdDcc23YDZPt2muhvoS+NhdIbUuylyusTq9HIafR4dP/1zwFurCzmnm6r14eC5Z5cyFG3Icp8oOmLk9xGiQ7ePyOWRv+CFxXxKHhWR9JXwYAj7aqzQy2HtFX4CAKDzUwop3Kj9nAr+BK8I6QgKQipCA4GIAB9BB09owkQtPHUtCgy3wfSvtCzG6sABoxRV4mtaLOZW1Nyhj+Xady2aLyn/yRJcP86JBX2JRXWvHh5fH0N0QTujs5anK1eD9TgfRhJQi3zDL8/hC/kPvW/l0yvzFWOuT7dGZWE4gdFVMT1mTkbBjApPlBihJORJxsYKbxSo6b8r2Ow9WrA3aoEFmxxLGinRqEjEp+FR0ClQN39bcNyzsT3m73wUWguBiACg+/yVXFrBKv9tCbcXUq5bz8Dppkjpq75IvmROd0fGWVSgyQXYJlmjUdOIYIfAQnCCHm64d9LUPqk6KO1NlLGPsiaBGjNqkikJxKGnpx6dEHNlRT7MBRZL1psDk4eR2gN+RXt4M6hZye2qt1iP3xyAkHb6qv2eABhSnUVPIfAUM0JHPAIAFsrs8V0BTIRzxLwph/SN1g9OfWku8e3rCXY36mYvCj41ooH7Y57cpc0s10f4Oc2+Fox36Xv2+QVnCiQEv17N4zMZZAhE/Z2259iqT2baI2Y86YwnA5225+mCdNl5YZKJpQNe8P2HzwAAL1Yz46XcICq45KiUaLaHEzNHIPyZX5f0fY21m899lfmKUfwwUbdx8cGO0E3mvTfUPUOIkNO9FDKA0ViJSQCz4h5bhvuCY2foju96LsPldrCrolih55QtV4rMRHaruo43hCnaOeKBljBczeXNkUm4E7CsEIgnWTyJHry2askAXIS+mt0TV/xV0QAA3W6/ay9u9c1uGkW+QTRnPMqcZXmIyAVr+mn7Ka8ERWFD/moxtAiEQoBTP4OmsArmMYz1Dmmyrt2cwUc0XF2mzHWHC8EeB12GF6FpolsFosagKaJ7Kz2/GlVi3QJxYC+R9Wslt/w6S03FSVwT7eXXXUpy9k0sEZAwcQZXhNsDTWX0SRffyIprm1dJhFynuhD2ObfW3jn50W86OT0J/r4XmCHpKqLHyQLjhhIcnVySdhY7Xv75xrapwWY/MFfwPTn1wjSgsSxdUgmDk7C9WAeMI8kjil2onrJLbrrkSXrasCGQ8p422/I3YfAiXoqnYd6LptEZDxLPS808G7YlzW3RG9ETZ50DN7Z7uevubJaamvpOn0qjdovkBBN3hkq8pcTk+Gv4L82LZQ6aETE7bBQJEB1takIqYVyKUPYZpkT/pbNOZ19smJMNSmTURiiK77wKlZvYu8LmXmQFWP7zwaDaHbgNzBdgNBa+vHgA4TtnwO9I5N2RXI7etwscg7GFisbJi5v6o+68k5pPCiuvaIPwvkjbzOn1smMR7lzRyUKHhGFpzmdRTfOTpKiTOng3ehoHW/5UFM2LkgUg2wgnbcjAmsh+y0zQJj03oA8HJVNColAPYW9cVszdrRntOO2c5OBNqqitHOD1ZP0TiiX+noPLDLTMsx+7FtpmpgUFUsK6clkVK5bnQTn0Dv1WRcoj5qmhf4DN6jPP0xBt/Kk2X5KxA7NmWjs+MBe/zQNFbF+2jvwy0QdG5m6jmaIAHigFhb5LobPU1/My/2TeurS61yasvwNNbVkdM8AgMPSx4oL0yRm1DPqYaWP63AR9vGtb+myCPnW3eX0OQV96Wre+GYK+EK1p3xzJm08RJniX4vz88O5aiH5EegRIWr1q7VMNjO4zY8TcR51Wb8Qp2sQwKeNCUcCG4X1Am0kK0Tfqpw5vLMnjBpLS7ZRUhu7wds3dlAu2/vlaiS6Q/s06h11CjxfxcaoUKzCcx45U9M900Flq4HaXoAEArBWC8LFJcl1vnB1BVAxuZnq9EbNEZ97cDDQ71cG+pUPMXnXtbE1DyZ3rkt0yPYWECgcR1x/UAEKmjYFkAgh3bQukI4DY3eZBLgLIPa0bNEUAmWhNoQH1On103C3+/K2r3vy17GFlcQub/XBW/focHAPICc6nUOAtQ3c/c2JLbrAERGZM0Lpy5F5igG4U8Nm8JoFojvsJL5M/y/zJAHjAg30e2srcWH5yx7VFylr1i2/ZzhZZkrIYSUIDZXLX2ofdKejVbE8P4SFaX9/O4HZ1/5+JuqXnUwfAtqGpuWHvC5xKQ0eqsoJAsLsJ5iBBYXlCAABvQdDJPcQYEAE6/9QOxDm1HaptpH1tL3YO6dAW+UAo1ji6WQ7UFbV/zRmoMWnr20fCpvF1ydcO72AMXxTviK93PFn74/M6cGg8L/4SUpNwwwPRWhMu4PzSBYGIvWfrCpnu+n43ONzQ3Zk/fJxmIOd9zufJ6nSP42x+nd7qB5jucv+YfcTQ3eHW2gCAuvGwtluFwQ2NkS/Ma2h+IvCbm8DcRuNyNZM9JfrMp/dmxbB/MPpW/vz0ri5dSwg03CgdFRnOih9cfEaCwD2nghM13EJ79R6hw220qMI4jTskJhIFOD6fLOn4CFxLB6rZBCJOikDM14zAhHtkDEHA73ediZn8qdYFg0kQ4veVe19nci5/dxNv9XfesugnyIdnOfOolbWxdO+x8K1Vh8mlxMtx05pL1G4i/gr+QYsdFK67TfrGLgV42nwEXlFA9qYaxEUB7WxqQTYU0N2mPOSWHqb8u92V6GFQv9ceTMFqXm4COKQ+yKsinh6LwZ/fAazWf6039dGtZH7/MZKprOkc4TOTLuBLVfOmjzX1OmDHkiQ/OfIHQN0bgVLX+JCYnHC/XhKS89DfbylLpxaALXq63RR6Hdaro05eyxyGixAO65PR7mY9V0iC3Lq3+x/10KBo9f65U0d+L020uPWOAMCdZaK9f9zrNROd+W3UJ4r16UbfnQqvELGaJe3VUPbXoL435ou+fzNxmkn96ZH3j6aQDix1jykaDGOGvv77oexh4UAmz9433Levmf0wG8+yc6l+DfW6db9XyeWvUveUTUiElu5dbconDnSvsKUKocJjqNTjN758m/v0EXl8NLp4fXpIEAHEFMfGE7oDWrlkQZ/Po2J1VRArAoi/nWy42Rbc8Y4AYEqLTvX3eoct7H7EEQV4rpTn0+DYhyu9ubVjWDPvhLU93kHs9bVwewDDhEv3POHt7LGDRL1L0ACARGKYBOcEJ1mFAcHdW6wN66vDMP3M9kxypRPQQ2XF95PTbu1g7aAt3TVPpRVEdmvJtLx081zfBkemU3w0Uyg7mi4hTVzCFr/uzbuyorQR+sOJaNI07YfeeCT+kO2QLDmbIkdBEaZZpTRxoZ2VJSZ8ixPahjMTfYjn1Bi4QxzlmOtyJo7SQ0nOqP2mKz8K6wO0v+3Pr9NmPctarUhmuybxustm3pwRt4U3XZ23xYB1Z4R598GfZWqGGhJXuTMCJ81CrgIuYGVuQH+t+y6oquVLm7wRNB5Kfw1Vg79mfCcKSFEWhPkO/nnQUa02yaStZCVle9twrJ0Qn4Dhxto9COnri5l3buRlSuCV5bDJScQkAbjcNSmWWj3oYJk0yZQvJT2/YoagJNO8d/cqfIpqvRSPdPTw/q0DPyDbIx0/oj8ryM9Ds/3se5JEONLqIfNfN39k/Sck41nltNPfT0eoWWoPvei5O1J3JG98l5d9XQGUrR9v8skdAU7/eDAwfzoVp5zDWL2qlHR4aw0o8xu4LBIWahVb3xrdY3U/rMBWW4UtkX/t2SJneC67unXOuL+WoV1QW2HXVnhQhqqJjdg0x5CoNpEtDZYzkGCh3XN2HcRyloIBAGyjZyaQbK+kpmKBskLNjj9sMKQJt9Nfk5iD6/O2BpoLa9i3hZhb1u5sB5recV6G2WOcbhayR3AGVuZ84Jasy52B7bR5rhq+5EIHY66O0WTgohNr0IytX6Pzn82lO5Pj4DZsqvvqF8pX1zgFiy92MTHTzFutXSjP6x5yRUiLdglda9JV3UKRebjnO3O8mtGEpg/3+tEWO3VSNBow98QxxFRb6m20rTF2V87GETJu/3C7EHanrSdKhGFw6Drh8Lpt5O4VoHiq6lPWdtQeZNdK5Fq7t2Ta/Onm3XzLZJhmXUetz7pM473r3/Ngxg6mfyDu6tqBuzn/46ZaAFIxCGd9OcrrmQYTWPdQ6dPvOO9Q0t6ah/IO7L8LxFEuvNyh4ui4VjpUqozjPGlAi/csEW1L4/ItJQ2VKu2Mg8B8bHLA9tT+XQ5Yu4vapWamWn/HXTGuEHKBdyV0gx7Y/UkDu+2QsKaBE1obNge4UevCHgK3afPYa77EvisIsP0oeZ21jY99atCOjxomXbp0CP+OIWojqOah3Fc7Ptw/Z3ucENRt/oTu7V+vrfvwL12zwA83rNQMBY2qkXr/G3dWIWGVfxfTxztWnIgF3Qx0hVxWDgrycMt53Ic8bV9QpwxBN51OGAAJdzqUMDFzgus1jJCss4fjQBjzMsTCEmx1+J/glnge3v0i/ZfWfw4TOuUAQxzSbfWEESzdc7GSf3e/tP7kMmE8lx2Wl1djmpDsuaxofeylk6uRUn3P1RV5tNF2FWgLuwcrvA3FcqgXDhDeeYIVIwH0q+sBcAQQNh+zntA1UIklhWbD7yHBWap9aHcHnhhGrEhHADAHFh6fG2SEI2Depj46r1hfr1+DC9+b5DUeRxlWorgfhYRAMTaueIhzxT0/o6CzeikYAHAO09k6zM1ce5VbOtGX6elmfqFunYzSZhGXeP2rvM5fp0VfMhH8iM/q++1T7zMjvNLGq77GtxUk5DTfShc7jXcuFq6k43LugpTtTrRgek3BNL21eW56lasMjDrLYDU3SbC9jPVqgJY4HGSATI2eZLxRHbt76J1qdswjQLGsioHIpQDFrGJh3KvDTkap6ncWW5yMUvOqdmYgRz8fz2wcR7ggYxe/Mf8ezLRz5+feSh19zQ78H1WkPNGOi6anWzbV9/zsswMAk1/Q/VF98LP7ICi2MyMGYfjyXAhXD6sz6vCuonwvt542Mj555mIAAMChF1qextCbMMFWgUSZzEe8Rfl8ggcp2D2LwQAAtBRQO8uqF+1sWr0zizuC3k5tXhPILbh+HSVoS67dAQIq5C6RIMNwQSwKMts2xq4d2cJ1mBrbYpPrMFPugu3u/kzaGVfH40XaSyfWs8XIu7wHu/IWsyVMufQn27tMau6ga1x301FEXmuXIwQAxw10rHIPz16kU2L9m4XS43t+FHCiNbi5tmKRgbbA9njZDVzi6B4ciK5t/7hoiNNs61UswkRfkbzRjkI6qg6T6MnT0woyu9LDg+E04AAAo1L/lBYm1eFtXpcwhQVRMKu36Z/L0e6S8NcLzQCAHbxFVOf2qLdiZIvlbZPOPxcWvFYdelcBR9XHNIC3+x1pAqzc6qcoJNXHR1LHgFptk2FAt3aZRtKY3+kgU4v3PT4YH5zcB2nkYFbzITgYih0dyWBcLPhsSKW+xwgmdCR40FllwEcX+NJyK6u/Ny4Pq3uUDxmwakvVBZUl0ar0jg1OPT748z/OHsb/N/QQW9nIqaS3xGeLozO2Yyn+Ox4zRMoVSJtBkrPcc41GIJFzgg0JpPWYdqUkl/Dk6MYxkbRJ0R49xencyZ+rwXV7A2EPl5nuLHAKByZQnnzpVkSyLpUMC0mLF52VOIkbmrJGjkDz7L1zUEh1VSRcHkOHXeXRrfZg8Kqu/FXXmgdU9+F5BFDfAGg8oRRQiSWFvsZNz7EX3MH5QnUv0RfGkhhx4yYBwA648h99YCxDF+aPC+EPPYOfz7YgOd5X0PveM+rnVYeeYebN0cFxLgYo0g1OKQwAOGhLxAazAn7dt/Vi8HdjwvO58/2vN28eex/g8+Ojzpg247mlzEXvHnkO6L1a8EQ7mfp8u5/bWN0WlsEAgI39HLsAKop0yqZxASEmnDHa2W0gvVbnDSTEqcfGHDMkZFK1s3iyid4ZXRAUAPWp2hjUFdQ3aFvQCNS3dhfQPCT66OqAGiRQ5y6DOcKBipTffBT4V5EN8S5pI0F7K92zQnQrUZwLAACcQMfuCAUwxwRFAmky5mwAzjB0xaAaDWEAgGuB6dJXy3HhN4tWbBccuAUPWpzq88QDSdSwuxugUbdjErpyuS4HNpTVcZApjmzAm8g1tDJT1zcCMSfrMk0o53EXprXK6ZjtDN0tnOX0No8dDiMJiZwlbBZib0wpsucGBtOlUcUMkHY8pLbtZ85Ff0GLW/5oYkm7Pl3J69NPs3ToB6fyNeec9ryRFkyjVxU/1ESapHn/HPpfIC3o6n9ga0B8t9HjaA9if1aBk/pt4n+TiT735J/uB3VtBZPBIkgcUvRt0pdw6AhxfiTbW7rS6i0Fccd6MLiqtSpbzKHBdWEVpsteyZ60f949yLPd1qduuSEK6fUajgI732mg7x6Rp2bP0XQOkKoGHAAg1WDQ+gULBjAKcXgas9qGGoCZze6MgYOGF5oBADS+XdmTpX9ZZ8zdYMOdsu6PDaT7tgadK8jorY1RBeDgbuQUNALs/qQlV4WRuG8Oc0NX2hojAt3VtphVkLvlLpjNTZoAO7LR7wUGJnmwLdDBXcYrNlgHnSB2E2KjLytsEcnWsp6eAjtzQe09gimCqhiCtU5lH5p5rUk+7voUhTcSAACmfN3EglP5WnlOf27UCaZ0UsUcJ2xFwWDKc8rFcC3HRzHQ67vA9PmIDZJumwMbnsrj0q1kxpdKJ4bs7Uusd8EMVYbh4AeBcP2f1BeHe7wGrdFkwRHt/Qx55GI5gxWbgWpnOx/NFqHnzk+1WF51H55HAHUGAMcKsjtgicWFdsHqgYvOLvrqAhXcYFQIPP99BACpoF3nP86CkwxzmD/qgrRs07u/vQ323ixbI/agZ9BkHWPhszOz3saCo5WDCphmCX3yYwMFR3umwTg3yf5t+GKKnbBsVgwbwAunu6/dLAk6eI2PfesKE3IlhU6A6alZGhR4mEJn2spewVO9EtdXbbp+gK4Z+3EXxK0rn2diuop4UpXBlfOT7Mm/h6Cq0fCpGuuCMNbAF7p/jYPNjVNqtzTO9tehdaLuTGqKWI/mxerjx3dlUfrb5k8odZ1dOCA31SR72qON0BuV4sZAXYnwU4lz9CbIK8JUKrKxzJD+YO7Oky2gbI0QVFciRHRbGSAg2tYFLCboQMbADgNOGTuGA3AZMyzCwdv87k1rgz9fVet7FU8S37rZz0jeHI13tRAAADiCauidCSjYENwrDie6eznGPAIgwzy3Ik4l4u+cDwYArJHeLoO/ZsFXM9MXCsX2ksMtMR6I0nKmQs/QV1ex+/DEyp00dHCZL6fjXiinUkYIFPIPNA1amWFD07Z1GQqaznCGoV3lmDsOqzyj1gvshC+x9kJUtSvFNERh640iMJCmOSAAyBpMkR9uGtracfuXbjBpy3JaUBlrMTbobns8d6AspjsSlGq2fyGCDHptvWnCvR+8hVdHMfZe4B/tXTon74qzugFIVLmic3EAANPLWhhy6W39XtL1Kk7XkgFdwRCzThHvaGbvgMQ2mQEAYoHB/g7Gl+D9uTjpH85JOXCH0iWXx3YEFZ0YPCv/rkHMVGspCbhJJq93UxmzBuS+K4UHptfubw2IJiNREcTE2mgaZK11cQ1IFGNwHwNj2dFgGFjiwaMDlr7HpDTIbhYPoggKubBEAXNb6rnxXRTZi0SnUHGq6qIOZjB9TR8BwGWBHRuP3d2sEKfuYjkNJiTjBSYNpHlXi5IJMMvLZWoJ3F07FVYBW26NtmuA1bX3225gDrUVVzd8jD6GKqe/rwqbW/B0BaH6A/X5+EICqPQAZE/IC9RiSaOn6fdQ4CJWFGgHo1SMqOhHALAEVzePfb1wB+OrgtQR8jmSTztL6bmcWLsArN9kc/XJY/fymgogbeUQAcMxz8eHnEnBGSwGAwDmfDqppmw9FWflwCmGc1X0volr9L5s5epn8vDVXuXB7Wm1jhZvVbGz5oM7/7t41favd++//fife+PD3MryGqE8eqfrGCrC1vDB7aZ/Jj9PVR/kUeB2m8EAgJRUAHv1BZwFvDTisim1C8yoPm+X4DZq2M8WlqjduRnQFAvJHOgbHTN6omAI7TLbDu+ESIwBc0iswXZYhcRmeSwLJG8Y8JXWufUDI4SzT0KlhiRtLyp+0u0OgVAdPDHMSMk4Q9tKq2OnGdr2uYJ2wIa93fI3DnPv6nAqeikTPYcfLgoDAIb0jrULqgA4l+I0rJTSalOfFzZoqCJsKjkXzc4FS7U7A1/8jPmyBi0YIQNxUlZm5phMVFqXZYMxGMOK4KacnS03uBOHdmuIJKcuHB6x6+9g/D+JsaX5lBZm/39/j/8BVLxy5pQarOp6I7QZFKo5IACAF+yJgSgmmpY0t2GFC5O2vOonjfFUSzB+8x6dl2D0ridY/z1EBbpiPJESKuiKNp4zHpeJV1HaBb6qAHTmZ6n4siYOSKIZD8NOmtL85JCj6wOtrwr2ybvCwo5Ar5pOAIDeYV/7mU784ZCoHIV+GR/CRFAPL9QOkByvHi0ghWdbBWq7yQwA8BKc7Zq2awCd4mMsAXTX/rkIcq8O3WNAdbUxvgEc3o3GDW2l7f7CeVOm7zgk3l1x0tbmHHAu1uXOwNa6C6kaZKrjGgVtZIpwggMOGOKuExMM5m64Kva/S+2MIbeM2f/f7xOhDQ/hwMsKWoSAas4DIeP62yK48qKaWhA5E0E3ypPl7xxgd6EAAGAO5GTzF3oa4lWVIJureE1ZSKJ9gdE10jjWongKGO9lJOVl/K7j/0W2bPvn+3Drf/Zg87cglrtXhSH+2u/j0eUE7tWHMJcWaev2ACFeKY0v4G8qGK5IOHMcvGEE309e79B28qscVtOAbHFUaAOitQzRWqgzcreZh7mtc89zi6zkIcitFNX5YABAHCa1VsHVm7mfqbPScKjh5fSCJH6tof9L+vv6uPWpryoJez6948M7VDedwe7TOwHYhCk4RqbQefQ028JPLQoDANJshCnrC6QDEhlxk46XAWtX6F3y8EFvrx6bRWbI/jU5A8tPcj0p92AAXOiEgF35XByxkDaGPYFYaetC9OB0RKwhYyAwVztJYvvdSNHjYmFPSMd/1inf0e94n36o999UHX7hvMxf+DFpaAZJ3DixlIcp9LeMkGwUlMDanPg3KPO7yidJvXHRM51hTgHm9AInwyWcx+nMtBcqprbQmQJxFAy6LLhGeoPfhZO3f3drbiY7O0+F6cwFJCihz3gfqmBuzgkDAManVVXL1tXYpdNM9sAMYNaEc5WLtbH2WZ03Ja1vath3ho1Nj5U2c1LV4B8WnIWoF+VQRBDGQbpSlMZe4NcU9Pwkb6gkkW/4w626ZtNJwsEQdJ2MuILsWTAF+mmyLvkD+FT+CcF6KjzIcWIF5ilc6IJsyy2DtpA2ZtGEttJty8KAtobuwiJCLrYdoNWgy7Wfs07s6sR67kNHNlTFkhFVIa+nUsRxKatAcw2McVFk5JJyeDqwp7p/rgAy8tsj+Dacpol4U+wY6DLrnxx0Pb68nYJ8ncLtWIvG1B0GdtEiNxu4Ga4L5IueC4oTC5idcW0bZsYWTy0ryP5e2hp2cR5588OvEuHeENRY/wd+gaeeWYu7vt+IW9mpx3H7/vE7nuFhh6dJ+hk2kGmcJwG+Yk+Lvxl6ssISfPkkku8QOKj9bMCC7cFvaZVAmUU44kCP7Tdfq9qV891AIPcirduHo/6FQM3C2UuI4Qe31FqOBmirjr3x0zsV+kUTqjOZFwuDbuIKErqcOddRgcA6615enHLHxd9maKDSF+uQPaWw02DtBsA17AAAIOxl9IuZQF9ANG5hrBOGxau3Ds9laKfwrYVmAEDEYKWKtjEI0hybAQVV/k1ABbXo0dJb2PNMkRdq8FUIc1daCFT4O4pxSx8/pYAf4JsBfOwui/DSrWrz4QlTBfEuVG+mVeWU7jNJwikAyk/rmxAKeqxL1NmGIQZwGCLsNhDndxRmvD/xE9jxX0Em4e73sSWhh7P/UEamG5x4W2wVR7nLnBdCOY4OkEOCxoXFAzAs1rNuYJuXVRYH2Bo3o4sgxzUGvOEiSxYAgK4x+f3x3g1u4To23FBX5jLZFCCOdYlRsSBvuwsldYCCrctVvNUSqzKuu+huF3KJtkUBkcvY2ieDPHbXY6TNDx+1z2YeTbjH/MG3u/tP3t5A/wy4kmwmZlNnR2+6fL7RrqjgVRaDAQAHFWxtaf0arm1WDEsK+X08a/PeNZbeF5+plr2+qoPbC3VOiNj21DhtJ3xTgatiR1OHtQK8YYNSXQBn85waBY0UJGsxGADAU4HwKgwG4Zvav9S7h5W2GH/Wx6FtviD4bl9sWIfRqM0p3N+B4TXUzU8Tvn9uHpmlQtxcqqJUtOIL5K16mGwnjg2HwpsiPhLsuo/p1Gmy5zIOKmiKih501YqKtFY9Zks2r674l5Mza8zV7P863Tf9qtocqqPvE6lvjPrvCS1CMmE85aWQGrogSERZGWnwxbZFrsMXGYOMKVxaynMOkIZspgcpn3msxvlWVvKtohruZL0wb4X8xZvQnmjBHQnbn27dMz0hEymQuGkAAEgWuJLWucyEOwpcDxe8bQQ65z4DAv3L8HOVd6+0qapgMxgAoDoVj11e10Hum0khZx63RBlVYu9UoXc9FWP4V/rqwNxExZVhNBwmZ4xMXmr2uQPtqhZKpcMMCzk5YuzpqLIyZ0DHsXU5BzruMIbzIM93DtDNlfLSdmhvG5CbxYlMRh0qOZYj5Y0h9smmUJVcsr1kdH1xdH1BdH0F0/X9dM02mim1eKOrJJrWiHLGyPaS0vUZdE3+c+J5S7f30zWf0lipRTpdicw5hwyG4EoTp/9qFFmowXUrqi5sIiXctrUgMitgEAtqjckGxMs5boKPauDcUn0a/JfNhvXuDr4Hth6qifu+cVjpsFpX6iP3w9nvMn6kutByExbVhJ/SNdOO1gJeZW7Ipz1W63zQxB3qwdoy9QaEqu1fHYVp/Gri/e6KOHn7adnAtAi3ntbhfA55EzzG5r6tk7c3peumADcvDO4wx//BTx/GbV8WDUzICZdkaFU7CrP6JMwdz94juFSDGQBwDIQWOtqAIWCtRslNnxn72RjpHylrpqZuJwPkxJqzqbCayr+75zVt6F1bMjW7qUSonjXO4tTpGIfMuaAslMgqbJIlP2Bm969s0afumU7bAed16vPQ6SSm8SMlNftvpt+Mmw2nHGGvCborDTRX6dNlr4W9nW1iVBqhGcmkU4A2Gq3amskcNO6zLjO9ch6iMdtdmGFtckZ0mOYE5IzPCZ6LoC0XLYITAySH69ALMfFlhbuGeCLrUadDt5NafUkVYwhKMQ1kR7Cb/NYmobmmBQAAg9HqJrcvITR7xNXIdIMYXChxB3mqLjG+CTQzXYuypekkgxbM5WrNbLSKL7k7CcEVq+4TXaVAcEXxfv1VZIJr7Kpivz64q731t+j/Fxo6l8QIL0AqRH8oQycvx+/ti+LoD5fGF//K4BOdT1Yb8CgTLB5c9sU2rQo9fS9Zv5v0uBAGAKS1WgHVuqarUe6NRjxCD9nr4mDgFzx87jRotXJwk1ITO8lV8B6phnXYS26ttapiQR29G6EPQ7wOgYkwAMBeAjIGjbaqORvgdN6Yw+tAsxWdUlS1ZPAoxBvmXbMYhSy9IR2dHGXcIZnaSWWxi+2kFg1KnaO+r8BbDTTHOuoT5q3GgHmUd57xSvpd47IX3BH6VLs8AABMo+bIMw2h5KDQgxg6JFMtVfJcSzSkn8s7O2XgdJK6JNZxbPf2VNhIrowqR00+TzroSXgd8Ow9j0LFHxkENkjCCHH3c37FPxcyK55oXS4AT2IMF3LnYmkCraLRXlmdKsfGsf7aJNoDp86UOoRHKpFVj9CtMhGNV41v1z/Inrll6QkVUakZbHOlPsi+t8gW2cecWnZ+LXuP9xKXaWc20ZiarTdyKmqGIQ4Npo737xDE9oXNWSS7bS1UBDtljaVFqqtMN96CufIkFnfH/qEKeZWz79wQNuQeUjkaBevufHF3x8nbKxaCFaypYbP3sUqpw3upuIfcR6oMd7uS83UAgOOKihhxJWXDcGXL1sMKctqZjvBq77lmAMCh+HRlW8IKTLYNV3r+X9/993aUoiTOkxT3rkDf3vyf+XuFrwKNetwKyrpbi5mL37uyfI+gu584vL2CPe/n9g+p6/ZK8lvvL3EGM65h3/n1lmjHmG0isu15X9ayVBOu+jMGSQa0yt4MjT/WLyP8nRLDJohSyuqdyXQLbtsN3kKBXbnbsBcUwXUig4O+uJwa787kARZ0EhHv5qIqNOjMg3MoFZH9V8Zg/DBPs/CTuGHgzR/VuAAADLa3/89oo68mV82D8cMcdAYuGgxG4o/DGhMACMt6j7LLU24G1vG294qtNL7OfjOxwkKXmXQVeJVKlN78UIqW05eszbSYwoX3iqAYXTQcCwAU1La2n53dhxUUOnr9O4hC1cNOsw+D3wAYL3TwmZFby4HQKCDI5I42+6Nm1egSFC+FAQA76O4ZhAAT9Gf3tufFyMuWvCbCx9+TPLq9NFjpDvZQvyLUayethS3ExXjkYr+CDltjn14/3tf6LDEPuU4fn5X2XBW3C81zF0yq4vZsDN4xtBZ0z60dAmu9qhaDAQAHh3ZnugtsGKG037Oa3r3Pll+Um9J8FkLXqs9zIUE7JZ1hrVzH3ESFbkDuvmPK9p+Z9uwH3aN7PJsq7vVNr12XGsSZ3Lp8MJNv/FXyVLkgXg3kCdsYXxvy3OoXX850St4uxuDLZMcoU4ADlJ7dZIrLY4PKISiTN6zw7qa+92GMz65grmcc0HEk+/cx+B5Jn4K/N4xmuXFldyOqsWn6kHCt0FcFP9XBzfcT+/kBXXUCnGLACoHI1sX/zqsV63KPoYQG1g3964Dbhv7VEmevBynsEMJs6aIH+A3YOQBjKIwXewqwhifIscrtDAY/vx2l+b0oHJ5DMsSJtRjMVe8PXU/djVB7XIFAzhYMeDSyuV3urD1142583+I32Z2NWc03BJI4Oo3ew1QLpql0kLYoFInsqzpYe/No6WJL4Dn5wZcML+kXj4sOt7LX9Ql5wU7+r0+eDSRPhFs9+kwzH0bC+4Q/pBCV/N9j99bG99MjXrah7FP888CcJRPL5hfHSwJBMXaHLgSlY4N0IzjVaoznicLGGehOWry0qR25IAwAcBzqHb7OglNVikjl5MVzhY6KDK8zL7uBMjNd8DkvInPTuZHbgrBoZ4BVas3fgLW0C8KuDiXagLW3bQy7loB1pH5h53pMxDpdY+cXvM5ujwPEprnO7qFLy+ZA27RDtFRDm6MjtVeBMuxHcppXmih/rS/rLcCctbfx7yMZ15v9SO74SiPnMQEAa8bfNMjlhDct5Rrvgenh+qeDXJqkLpj94kBMsHnaGi9trhsow2krprBQZvO9NzVDoivLjG2I855042Qv6qQGo5Mhh5/5ML3dtLnZge3OzGyH0JQryQo0I7gZxjW+LYQ5bWI52VmIp0k+Fmsz5PMLxRNdcW9QX9qJWIyVee04ez8dcvZGUVGVvkcKMONiZ7PfKgVm1xRcRheGApmY50MVnO7FYADAjApUp76gawCRPM8MvUGNnpbApPWVbtlHOz/R/mwbDbp1IG1Gf58TPI8RcnXELe94+9Qy08Ba1iXV6/hQ8iYuQwrQHxlA4H66IqtX5VibvGGOfThx5zD6y/G3a2GBG7kie5xiOfR6yhlFqJxXonHYV6G/PExfYCdvz6UDXYQ76syf6CFdhsdA9dW/5O0PcpEcBK+0WAEAKAHI6R1yhaEkiIUzSGr1TAM6BRAwz9VrsGQF6akykJ2bZD9B3YJnA0JEpG8MvbBYURHtVuglUAxXw2cQsVxJkYFwfS4Bu3CvEnywDFItJBPx10XMrDpvIz6qaOmFgXLEJ0wGmFVVHqhfDkdWnZysI+WchhO1CRrFpYYEtq/TaYqODxGZ5eqjqZUd7umoAICUu/DDgfPwtM0T27J+eeck+c1z4by4mQ3luluLQfW9RMBL2We4wPOaxnCciCR2ktU8FNj8Er/D/o/SH4be//bMaS23l3LG1IsVvXbULkuH3GzimLOp7o4iiFRRyXgWYAgi1VFKg+lm6J+s7cfOJnpd4D9SHW5RGABQBzTowDdhpnLYEjyPoZfC056d5+5GrnjrSvjmcHgxcZWt3DCg+GSGZM59b1DisTPZymsJIQfrklWuU38nU/qHYCyk1MgTCcO92bNlGD2Ewz/FffCn4E7Y9xMfuroecun6/G5w9+qUsx7/BdRn/2A/gOe49gdftOrTCi8BqAHSb1fOQydWHq5SsmL5ejYbTp5uaGQG1FxuBAYw5SccEFU98jfgGwcWPaqaSnh8TDp6BK7k+eWFeP++s3kQ6PK7sSSwZOMFX1iH5+gSOPi9XH+6b3Y/cBe/Njjxd3h9Lub2VIfg7m/Wkp+fFaehNuqdqY7ORDGO8ewz/p9h5vPT4qo55YurCjzaLX8STLKf3ya4xZamKR30krko8TSYZDFNOu0u7rmLOqZigLFAU5AvYd9lS8pn7Ic+RzyBW5/D3K5n5gsjJ6Lt2NBHfV5KuWVZWr71XOmHmOFbXqFzXlvpmWjWXY6UoLYL+SJh09cnt+Q3hubO8COP6War8uqA+M9XqMh1l2+vFpfL4TU4H7gWB1cBfE7g+UFteZ7vI05o+u3xUsP9UZK3bgCNNCoAAI0D6NY76sWwwgYZaQyKByN1wjQ1oHfxTuXzPe7tCgq3GAwAMFRgKBN+05NcZkfAmOepBTipzpueqSzvJEXPhN9wHt9IQGs3tlLAJ5EEH6A72McDtjmqTJBB2bEBO1WKjpk1YIdWdMvCgB2NYi6sDNhrt25EiT9gb/afYgEQx7Vvp94/l4lQs3y6CpjUYRYL6FszcVtDtcmxChhMZolEADDXAGfpIG4dgHO/+42ekjghnfPv9q0OWvv8q/5UZR8eYx/f3Bvb+L6w7/pON2u7fbO85b0+3MlVn3053tMWO4O5xmTC1TofFrnRPXjqV+QxerGjYvs5jkrsR0f07/RUYf0w5vURO62d6WOAT+g4YLNWNuULi6qrWhCPU+jskS+PeK7S4LlRhzWPfrpIJ9ILzzZo5yfpZcvwbpisaQijY3lrQK64Oq/nkHdP3AUr4aEYG/qyG18xuJYrb+j2zYsdi1sFzZjG586pDdm9b/ZVu28Ca8fKT3aktXL+4rMD4H4jsyPodkZvG7OjPnfMKFeh/TmbB1kgnkauWMd0NbZUxN/JXs5nzij+XXnBF2UTNX/7m3YL63UvByhLwwXhxY7E6cOb7J8rx/4V9POIDU/l+xnxOsT4TbQn6svnbM8VFhiirzobqG7CMllCe++j7cI3F2l9Fnpwe67vKl14wWIFACDG2yl0vCDbVVBV5mBCT8efBwLEyqMvkagiXnxaGABgxJsqw98xPJ0dgTkzzxVnlhvJ2jP0dummQxlAX+Xm2ef5idunR18xMJThcjCJIR0Cbqf687AUB0F1F29XYG9sDGpV4AjbgoYKnMQX0HSLaEPrRhmJjq0BI2ANl+jKA/LuN0k3zNWcDWcUnDBQ+h7AOTO5krUrz+cekJFCPLOL/0THPo/AKTDmixuvK0vq9Ulp3dBwnWkOLa/4R9nkfs4U+aMIo00vYzBL1SeYrb3XoZplSZPq1Mvt2iUSAcDShVxM8UOzkFaK9Q8CpveiHw20NW0tlmkafNyGfV41X7yO/PcUnp3XZ+c1DM43ifNdG/8MbPHaM7ctvH7Bfe58+qy89rq+m+ziscCOY86oWkGDYscthaWA1uVBK5rxV1p9XuVEpti6T79c8Tg7i9Gl/YPz9uvXa4xrQ7a9TcBvPdn3rNsxnjiOveaCMABAc/iioafZem8NEzrTrSm8MECeZ+JARW/YPKvz4gUe8cSeqK0GiQz5/ETRF6Y8InJsl0NmmKSmSUfPzGTmhZOJe7MtW4OchAbDdjJnvzG7bfu2xQH21EJsOTxPXp8nr2ExvnyIdPR26W1/eH5x+D6ensGb1zDs4OA6HwX4qryTBV9CT8HeStOs6KvOZqiL3kwhONHhH+b156T7iGeuqDX6s9CDb73cd5M5wHONCgCAF8CWip1N5zMV2J7S4Pq0qkRnTa1mH8XLjT6SpoF5dvCLXtcnl02dqpxH8t42gwEAvps8UZ92+ka2PkQKETOT9WOHRTjexQxntaCiMg97QDODWT2nPlXwjN+Y1fcVA0N5UfojCuMOSN76sUtoaYQkcZ5DsGRjMJweBbcIz226ZcYtwteaC7MqsHXtG6sALNASsNAEKkiqDCJpMGIJVNt96k6qusBNfp1x5rVkx2sHMvorxoZ/qfU/87VzW1T9Hqi2arYe58Xt4n/WAYCthkgunYswtQKy/iD02p+bEGyVpIofsiQOxfsnBW7rgr8iQaruFF3BbUh3SrUU7SwapCkq//ZDm2P8bd+VPw8n6NvuWj/1sZt6S3d2UOFzb/eMqosIfIhLKXYsxK2UBuOkVa1BZePpFoUBAO4YpoHRVhcsm4VdjefJ6W2KNzo7b6NS9I7T7Znw9o7D1lSeBafbBFm3W5CCM9Ayh2ZhH8yWdrkwmG2D4Qbcon3bPnDLNmLRzKJzqCt5Ps+lYuchzZfhu/7UP+Hl9g2YZmXOe1PfTU4BaSxWAADSzb7uLTXPFd7aGLxG8e7Ka2P60duYUxPgqIYwAGCKfdsWB6xcYPA2Rt4dkd5MZR4xM4ArA7QKq0uxr+YniqC4snpAsQ2CdBewJYTHQbA4DzigBqeqmNkYj/Ex+gWHh1HKDCfiYt/YBnFjC9iDgqriRCmDN7KbvaEhH7bV4/9o8iqpt0UijZeK23fqXPbwbLEu9l5qH4qOLfxsXPvOyZqOi7ptV29mkEylzceyh1rHKduSdPqEVtt98zl85h7vsomK8+M9/w++WIvOoaq8J3yCf7UYvCR8OKm+lE/yGH2CB+m5Dv6JidLoIU/mh/hiOQXtjzhatQ85YkdsD7v/8VPmJEog7ZUKj2jCxvO6LsXNCcLK7+niPQryHDEdafxurmo3xH/8VbK/jwV5rg03y/tvC9T1Rd8JKI2usEZSQgV1ss8+gJtjtpcD","base64")).toString()),z5}var RBe=new Map([[q.makeIdent(null,"fsevents").identHash,kBe],[q.makeIdent(null,"resolve").identHash,QBe],[q.makeIdent(null,"typescript").identHash,TBe]]),pSt={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,s]of V5)e(q.parseDescriptor(r,!0),s)},getBuiltinPatch:async(t,e)=>{let r="compat/";if(!e.startsWith(r))return;let s=q.parseIdent(e.slice(r.length)),a=RBe.get(s.identHash)?.();return typeof a<"u"?a:null},reduceDependency:async(t,e,r,s)=>typeof RBe.get(t.identHash)>"u"?t:q.makeDescriptor(t,q.makeRange({protocol:"patch:",source:q.stringifyDescriptor(t),selector:`optional!builtin`,params:null}))}},hSt=pSt;var g9={};Vt(g9,{ConstraintsCheckCommand:()=>XC,ConstraintsQueryCommand:()=>zC,ConstraintsSourceCommand:()=>ZC,default:()=>HSt});Ve();Ve();gS();var YC=class{constructor(e){this.project=e}createEnvironment(){let e=new WC(["cwd","ident"]),r=new WC(["workspace","type","ident"]),s=new WC(["ident"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,c=new Map;for(let f of this.project.storedPackages.values()){let p=Array.from(f.peerDependencies.values(),h=>[q.stringifyIdent(h),h.range]);n.set(f.locatorHash,{workspace:null,ident:q.stringifyIdent(f),version:f.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>f.peerDependenciesMeta.get(h)?.optional===!0))})}for(let f of this.project.storedPackages.values()){let p=n.get(f.locatorHash);p.dependencies=new Map(Array.from(f.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>"u")throw new Error("Assertion failed: The resolution should have been registered");let C=n.get(E);if(typeof C>"u")throw new Error("Assertion failed: The package should have been registered");return[q.stringifyIdent(h),C]})),p.dependencies.delete(p.ident)}for(let f of this.project.workspaces){let p=q.stringifyIdent(f.anchoredLocator),h=f.manifest.exportTo({}),E=n.get(f.anchoredLocator.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");let C=(R,N,{caller:U=ps.getCaller()}={})=>{let W=hS(R),te=je.getMapWithDefault(a.manifestUpdates,f.cwd),ie=je.getMapWithDefault(te,W),Ae=je.getSetWithDefault(ie,N);U!==null&&Ae.add(U)},S=R=>C(R,void 0,{caller:ps.getCaller()}),P=R=>{je.getArrayWithDefault(a.reportedErrors,f.cwd).push(R)},I=e.insert({cwd:f.relativeCwd,ident:p,manifest:h,pkg:E,set:C,unset:S,error:P});c.set(f,I);for(let R of Ht.allDependencies)for(let N of f.manifest[R].values()){let U=q.stringifyIdent(N),W=()=>{C([R,U],void 0,{caller:ps.getCaller()})},te=Ae=>{C([R,U],Ae,{caller:ps.getCaller()})},ie=null;if(R!=="peerDependencies"&&(R!=="dependencies"||!f.manifest.devDependencies.has(N.identHash))){let Ae=f.anchoredPackage.dependencies.get(N.identHash);if(Ae){if(typeof Ae>"u")throw new Error("Assertion failed: The dependency should have been registered");let ce=this.project.storedResolutions.get(Ae.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: The resolution should have been registered");let me=n.get(ce);if(typeof me>"u")throw new Error("Assertion failed: The package should have been registered");ie=me}}r.insert({workspace:I,ident:U,range:N.range,type:R,resolution:ie,update:te,delete:W,error:P})}}for(let f of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(f);if(!p)continue;let h=c.get(p);if(typeof h>"u")throw new Error("Assertion failed: The workspace should have been registered");let E=n.get(f.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");E.workspace=h}return{workspaces:e,dependencies:r,packages:s,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},s=await this.project.loadUserConfig();return s?.constraints?(await s.constraints(r),e.result):null}};Ve();Ve();Wt();var zC=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=ge.String()}static{this.paths=[["constraints","query"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"query the constraints fact database",details:` + This command will output all matches to the given prolog query. + `,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(ES(),yS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(".")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),C=E.length,S=E.reduce((P,[I])=>Math.max(P,I.length),0);for(let P=0;P(ES(),yS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Tt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Wt();gS();var XC=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:` + This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code. + + If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution. + + For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints. + `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new YC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(ES(),yS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:C,remainingErrors:S}=oF(s,E,{fix:this.fix}),P=[];for(let[I,R]of C){let N=I.manifest.indent;I.manifest=new Ht,I.manifest.indent=N,I.manifest.load(R),P.push(I.persistManifest())}if(await Promise.all(P),!(C.size>0&&h>1)){c=UBe(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let R of I)R.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),Qs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};gS();var USt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[zC,ZC,XC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new YC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(ES(),yS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=oF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,"yarn constraints",he.Type.CODE)} for more details`)}}},HSt=USt;var d9={};Vt(d9,{CreateCommand:()=>$C,DlxCommand:()=>ew,default:()=>qSt});Ve();Wt();var $C=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let s=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=q.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?q.makeIdent(a.scope,`create-${a.name}`):q.makeIdent(null,`create-${a.name}`),c=q.stringifyIdent(n);return a.range!=="unknown"&&(c+=`@${a.range}`),this.cli.run(["dlx",...r,c,...this.args])}};Ve();Ve();bt();Wt();var ew=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=ot.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-vite to scaffold a new Vite project","yarn dlx create-vite"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return ze.telemetry=null,await le.mktempPromise(async r=>{let s=K.join(r,`dlx-${process.pid}`);await le.mkdirPromise(s),await le.writeFilePromise(K.join(s,"package.json"),`{} +`),await le.writeFilePromise(K.join(s,"yarn.lock"),"");let a=K.join(s,".yarnrc.yml"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Vf(68),level:he.LogLevel.Discard}]},p=n!==null?K.join(n,".yarnrc.yml"):null;p!==null&&le.existsSync(p)?(await le.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let te=typeof W=="string"?W:W.path,ie=ue.isAbsolute(te)?te:ue.resolve(ue.fromPortablePath(n),te);return typeof W=="string"?ie:{path:ie,spec:W.spec}})),U})):await le.writeJsonPromise(a,f);let h=this.packages??[this.command],E=q.parseDescriptor(this.command).name,C=await this.cli.run(["add","--fixed","--",...h],{cwd:s,quiet:this.quiet});if(C!==0)return C;this.quiet||this.context.stdout.write(` +`);let S=await ze.find(s,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,s);if(I===null)throw new ar(P.cwd,s);await P.restoreInstallState();let R=await In.getWorkspaceAccessibleBinaries(I);return R.has(E)===!1&&R.size===1&&typeof this.packages>"u"&&(E=Array.from(R)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var jSt={commands:[$C,ew]},qSt=jSt;var E9={};Vt(E9,{ExecFetcher:()=>CS,ExecResolver:()=>wS,default:()=>YSt,execUtils:()=>uF});Ve();Ve();bt();var fA="exec:";var uF={};Vt(uF,{loadGeneratorFile:()=>IS,makeLocator:()=>y9,makeSpec:()=>Ave,parseSpec:()=>m9});Ve();bt();function m9(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?q.parseLocator(e.locator):null,path:s}}function Ave({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function y9(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return q.makeLocator(t,Ave({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function IS(t,e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(t,{protocol:e}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.join(c.prefixPath,a);return await f.readFilePromise(p,"utf8")}var CS=class{supports(e,r){return!!e.reference.startsWith(fA)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:fA});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await IS(e.reference,fA,r);return le.mktempPromise(async a=>{let n=K.join(a,"generator.js");return await le.writeFilePromise(n,s),le.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!le.existsSync(K.join(c,"build")))throw new Error("The script should have generated a build directory");return await gs.makeArchiveFromDirectory(K.join(c,"build"),{prefixPath:q.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,s,a){return await le.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=K.join(e,"runtime.js");return await le.mktempPromise(async p=>{let h=K.join(p,"buildfile.log"),E=K.join(e,"generator"),C=K.join(e,"build");await le.mkdirPromise(E),await le.mkdirPromise(C);let S={tempDir:ue.fromPortablePath(E),buildDir:ue.fromPortablePath(C),locator:q.stringifyLocator(r)};await le.writeFilePromise(f,` + // Expose 'Module' as a global variable + Object.defineProperty(global, 'Module', { + get: () => require('module'), + configurable: true, + enumerable: false, + }); + + // Expose non-hidden built-in modules as global variables + for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) { + Object.defineProperty(global, name, { + get: () => require(name), + configurable: true, + enumerable: false, + }); + } + + // Expose the 'execEnv' global variable + Object.defineProperty(global, 'execEnv', { + value: { + ...${JSON.stringify(S)}, + }, + enumerable: true, + }); + `);let P=c.NODE_OPTIONS||"",I=/\s*--require\s+\S*\.pnp\.c?js\s*/g;P=P.replace(I," ").trim(),c.NODE_OPTIONS=P;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${q.stringifyLocator(r)}) +`,prefix:q.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Gr.pipevp(process.execPath,["--require",ue.fromPortablePath(f),ue.fromPortablePath(s),q.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:R,stderr:N});if(U!==0)throw le.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ve();Ve();var GSt=2,wS=class{supportsDescriptor(e,r){return!!e.range.startsWith(fA)}supportsLocator(e,r){return!!e.reference.startsWith(fA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=m9(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await IS(q.makeRange({protocol:fA,source:a,selector:a,params:{locator:q.stringifyLocator(n)}}),fA,s.fetchOptions),f=Nn.makeHash(`${GSt}`,c).slice(0,6);return[y9(e,{parentLocator:n,path:a,generatorHash:f,protocol:fA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var WSt={fetchers:[CS],resolvers:[wS]},YSt=WSt;var C9={};Vt(C9,{FileFetcher:()=>DS,FileResolver:()=>bS,TarballFileFetcher:()=>PS,TarballFileResolver:()=>xS,default:()=>JSt,fileUtils:()=>Pm});Ve();bt();var tw=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,BS=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,ts="file:";var Pm={};Vt(Pm,{fetchArchiveFromLocator:()=>SS,makeArchiveFromLocator:()=>fF,makeBufferFromLocator:()=>I9,makeLocator:()=>rw,makeSpec:()=>pve,parseSpec:()=>vS});Ve();bt();function vS(t){let{params:e,selector:r}=q.parseRange(t),s=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?q.parseLocator(e.locator):null,path:s}}function pve({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:q.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return q.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function rw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return q.makeLocator(t,pve({parentLocator:e,path:r,hash:s,protocol:a}))}async function SS(t,e){let{parentLocator:r,path:s}=q.parseFileStyleRange(t.reference,{protocol:ts}),a=K.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=K.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function fF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=q.parseFileStyleRange(t.reference,{protocol:e}),c=K.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=K.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await gs.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:q.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),f.releaseFs)}async function I9(t,{protocol:e,fetchOptions:r}){return(await fF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var DS=class{supports(e,r){return!!e.reference.startsWith(ts)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ts});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return fF(e,{protocol:ts,fetchOptions:r})}};Ve();Ve();var VSt=2,bS=class{supportsDescriptor(e,r){return e.range.match(tw)?!0:!!e.range.startsWith(ts)}supportsLocator(e,r){return!!e.reference.startsWith(ts)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=q.makeDescriptor(e,`${ts}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=vS(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await I9(q.makeLocator(e,q.makeRange({protocol:ts,source:a,selector:a,params:{locator:q.stringifyLocator(n)}})),{protocol:ts,fetchOptions:s.fetchOptions}),f=Nn.makeHash(`${VSt}`,c).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:f,protocol:ts})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ve();var PS=class{supports(e,r){return BS.test(e.reference)?!!e.reference.startsWith(ts):!1}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromDisk(e,r){let s=await SS(e,r);return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();Ve();var xS=class{supportsDescriptor(e,r){return BS.test(e.range)?!!(e.range.startsWith(ts)||tw.test(e.range)):!1}supportsLocator(e,r){return BS.test(e.reference)?!!e.reference.startsWith(ts):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return tw.test(e.range)&&(e=q.makeDescriptor(e,`${ts}${e.range}`)),q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=vS(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=rw(e,{parentLocator:n,path:a,hash:"",protocol:ts}),f=await SS(c,s.fetchOptions),p=Nn.makeHash(f).slice(0,6);return[rw(e,{parentLocator:n,path:a,hash:p,protocol:ts})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var KSt={fetchers:[PS,DS],resolvers:[xS,bS]},JSt=KSt;var v9={};Vt(v9,{GithubFetcher:()=>kS,default:()=>ZSt,githubUtils:()=>AF});Ve();bt();var AF={};Vt(AF,{invalidGithubUrlMessage:()=>dve,isGithubUrl:()=>w9,parseGithubUrl:()=>B9});var hve=et(Ie("querystring")),gve=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function w9(t){return t?gve.some(e=>!!t.match(e)):!1}function B9(t){let e;for(let f of gve)if(e=t.match(f),e)break;if(!e)throw new Error(dve(t));let[,r,s,a,n="master"]=e,{commit:c}=hve.default.parse(n);return n=c||n.replace(/[^:]*:/,""),{auth:r,username:s,reponame:a,treeish:n}}function dve(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var kS=class{supports(e,r){return!!w9(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await le.mktempPromise(async a=>{let n=new Sn(a);await gs.extractArchiveTo(s,n,{stripComponents:1});let c=Qa.splitRepoUrl(e.reference),f=K.join(a,"package.tgz");await In.prepareExternalProject(a,f,{configuration:r.project.configuration,report:r.report,workspace:c.extra.workspace,locator:e});let p=await le.readFilePromise(f);return await gs.convertToZip(p,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:s,username:a,reponame:n,treeish:c}=B9(e.reference);return`https://${s?`${s}@`:""}github.com/${a}/${n}/archive/${c}.tar.gz`}};var zSt={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let s=new kS;if(!s.supports(e,r))return null;try{return await s.fetch(e,r)}catch{return null}}}},ZSt=zSt;var S9={};Vt(S9,{TarballHttpFetcher:()=>TS,TarballHttpResolver:()=>RS,default:()=>$St});Ve();function QS(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!=="http:"&&e.protocol!=="https:"||!e.pathname.match(/(\.tar\.gz|\.tgz|\/[^.]+)$/))}var TS=class{supports(e,r){return QS(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s=await An.get(e.reference,{configuration:r.project.configuration});return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();Ve();var RS=class{supportsDescriptor(e,r){return QS(e.range)}supportsLocator(e,r){return QS(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){return[q.convertDescriptorToLocator(e)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var XSt={fetchers:[TS],resolvers:[RS]},$St=XSt;var D9={};Vt(D9,{InitCommand:()=>J0,InitInitializerCommand:()=>nw,default:()=>tDt});Wt();Ve();Ve();bt();Wt();var J0=class extends ut{constructor(){super(...arguments);this.private=ge.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=ge.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=ge.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.name=ge.String("-n,--name",{description:"Initialize a package with the given name"});this.usev2=ge.Boolean("-2",!1,{hidden:!0});this.yes=ge.Boolean("-y,--yes",{hidden:!0})}static{this.paths=[["init"]]}static{this.usage=ot.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return s!==null?await this.executeProxy(r,s):await this.executeRegular(r)}async executeProxy(r,s){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new nt("Cannot use the --install flag from within a project subdirectory");le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=K.join(this.context.cwd,Er.lockfile);le.existsSync(a)||await le.writeFilePromise(a,"");let n=await this.cli.run(["set","version",s],{quiet:!0});if(n!==0)return n;let c=[];return this.private&&c.push("-p"),this.workspace&&c.push("-w"),this.name&&c.push(`-n=${this.name}`),this.yes&&c.push("-y"),await le.mktempPromise(async f=>{let{code:p}=await Gr.pipevp("yarn",["init",...c],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await In.makeScriptEnv({binFolder:f})});return p})}async initialize(){}async executeRegular(r){let s=null;try{s=(await Tt.find(r,this.context.cwd)).project}catch{s=null}le.existsSync(this.context.cwd)||await le.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ht.tryFind(this.context.cwd),n=a??new Ht,c=Object.fromEntries(r.get("initFields").entries());n.load(c),n.name=n.name??q.makeIdent(r.get("initScope"),this.name??K.basename(this.context.cwd)),n.packageManager=un&&je.isTaggedYarnVersion(un)?`yarn@${un}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await le.mkdirPromise(K.join(this.context.cwd,"packages"),{recursive:!0}),n.workspaceDefinitions=[{pattern:"packages/*"}]);let f={};n.exportTo(f);let p=K.join(this.context.cwd,Ht.fileName);await le.changeFilePromise(p,`${JSON.stringify(f,null,2)} +`,{automaticNewlines:!0});let h=[p],E=K.join(this.context.cwd,"README.md");if(le.existsSync(E)||(await le.writeFilePromise(E,`# ${q.stringifyIdent(n.name)} +`),h.push(E)),!s||s.cwd===this.context.cwd){let C=K.join(this.context.cwd,Er.lockfile);le.existsSync(C)||(await le.writeFilePromise(C,""),h.push(C));let P=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(Ae=>`${Ae} +`).join(""),I=K.join(this.context.cwd,".gitignore");le.existsSync(I)||(await le.writeFilePromise(I,P),h.push(I));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(Ae=>`${Ae} +`).join(""),U=K.join(this.context.cwd,".gitattributes");le.existsSync(U)||(await le.writeFilePromise(U,N),h.push(U));let W={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get("initEditorConfig"));let te=`root = true +`;for(let[Ae,ce]of Object.entries(W)){te+=` +[${Ae}] +`;for(let[me,pe]of Object.entries(ce)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);te+=`${Be} = ${pe} +`}}let ie=K.join(this.context.cwd,".editorconfig");le.existsSync(ie)||(await le.writeFilePromise(ie,te),h.push(ie)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),le.existsSync(K.join(this.context.cwd,".git"))||(await Gr.execvp("git",["init"],{cwd:this.context.cwd}),await Gr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Gr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var nw=class extends J0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(` +`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var eDt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[J0,nw]},tDt=eDt;var IY={};Vt(IY,{SearchCommand:()=>Iw,UpgradeInteractiveCommand:()=>Cw,default:()=>yQt});Ve();var yve=et(Ie("os"));function iw({stdout:t}){if(yve.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Wt();var kSe=et(G9()),W9={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Xbt=(0,kSe.default)(W9.appId,W9.apiKey).initIndex(W9.indexName),Y9=async(t,e=0)=>await Xbt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var QD=["regular","dev","peer"],Iw=class extends ut{static{this.paths=[["search"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the search interface",details:` + This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. + `,examples:[["Open the search window","yarn search"]]})}async execute(){iw(this.context);let{Gem:e}=await Promise.resolve().then(()=>(YF(),cY)),{ScrollableItems:r}=await Promise.resolve().then(()=>(zF(),JF)),{useKeypress:s}=await Promise.resolve().then(()=>(PD(),DPe)),{useMinistore:a}=await Promise.resolve().then(()=>(gY(),hY)),{renderForm:n}=await Promise.resolve().then(()=>(eN(),$F)),{default:c}=await Promise.resolve().then(()=>et(OPe())),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useEffect:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),P=()=>h.createElement(f,{flexDirection:"row"},h.createElement(f,{flexDirection:"column",width:48},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move between packages.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select a package.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," again to change the target."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(fe,se)=>{if(se.name!=="space")return;if(!Ce){g(QD[0]);return}let X=QD.indexOf(Ce)+1;X===QD.length?g(null):g(QD[X])},[Ce,g]);let we=q.parseIdent(pe.name),ye=q.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},ye)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=q.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0}," - ",q.prettyIdent(S,g))),QD.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Ce===we})," ",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=C(""),[ye,fe]=C(0),[se,X]=C([]),De=j=>{j.match(/\t| /)||we(j)},Re=async()=>{fe(0);let j=await Y9(g);j.query===g&&X(j.hits)},dt=async()=>{let j=await Y9(g,ye+1);j.query===g&&j.page-1===ye&&(fe(j.page),X([...se,...j.hits]))};return E(()=>{g?Re():X([])},[g]),h.createElement(f,{flexDirection:"column"},h.createElement(P,null),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:dt}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(R,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>"u")return 1;let Ae=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="regular"),ce=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="dev"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="peer");return Ae.length&&await this.cli.run(["add",...Ae]),ce.length&&await this.cli.run(["add","--dev",...ce]),me&&await this.cli.run(["add","--peer",...me]),0}};Ve();Wt();fG();var qPe=et(Ai()),jPe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function GPe(t,e){return t.length>0?[t.slice(0,e)].concat(GPe(t.slice(e),e)):[]}var Cw=class extends ut{static{this.paths=[["upgrade-interactive"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` + This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. + `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]})}async execute(){iw(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(HPe(),UPe)),{Pad:r}=await Promise.resolve().then(()=>(EY(),_Pe)),{ScrollableItems:s}=await Promise.resolve().then(()=>(zF(),JF)),{useMinistore:a}=await Promise.resolve().then(()=>(gY(),hY)),{renderForm:n}=await Promise.resolve().then(()=>(eN(),$F)),{Box:c,Text:f}=await Promise.resolve().then(()=>et(Vc())),{default:p,useEffect:h,useRef:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd),R=await Jr.find(S);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,ye)=>{let fe=cCe(we,ye),se="";for(let X of fe)X.added?se+=he.pretty(S,X.value,"green"):X.removed||(se+=X.value);return se},W=(we,ye)=>{if(we===ye)return ye;let fe=q.parseRange(we),se=q.parseRange(ye),X=fe.selector.match(jPe),De=se.selector.match(jPe);if(!X||!De)return U(we,ye);let Re=["gray","red","yellow","green","magenta"],dt=null,j="";for(let rt=1;rt{let se=await Xu.fetchDescriptorFrom(we,fe,{project:P,cache:R,preserveModifier:ye,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let ye=qPe.default.valid(we.range)?`^${we.range}`:we.range,[fe,se]=await Promise.all([te(we,we.range,ye).catch(()=>null),te(we,we.range,"latest").catch(()=>null)]),X=[{value:null,label:we.range}];return fe&&fe!==we.range?X.push({value:fe,label:W(we.range,fe)}):X.push({value:null,label:""}),se&&se!==fe&&se!==we.range?X.push({value:se,label:W(we.range,se)}):X.push({value:null,label:""}),X},Ae=()=>p.createElement(c,{flexDirection:"row"},p.createElement(c,{flexDirection:"column",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},""),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to select packages.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},""),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to select versions."))),p.createElement(c,{flexDirection:"column"},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to install.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"")," to abort.")))),ce=()=>p.createElement(c,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Latest"))),me=({active:we,descriptor:ye,suggestions:fe})=>{let[se,X]=a(ye.descriptorHash,null),De=q.stringifyIdent(ye),Re=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},q.prettyIdent(S,ye)),p.createElement(r,{active:we,length:Re})),p.createElement(e,{active:we,options:fe,value:se,skewer:!0,onChange:X,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[ye,fe]=C(we.map(()=>null)),se=E(!0),X=async De=>{let Re=await ie(De);return Re.filter(dt=>dt.label!=="").length<=1?null:{descriptor:De,suggestions:Re}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Re=we.slice(0,De),dt=we.slice(De),j=GPe(dt,N),rt=Re.map(X).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&fe(Ye=>{let ke=Ye.findIndex(_e=>_e===null),it=[...Ye];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>X(Pe)))).then(async Pe=>{Pe=Pe.filter(Ye=>Ye!==null),await Fe,se.current&&fe(Ye=>{let ke=Ye.findIndex(it=>it===null);return Ye.slice(0,ke).concat(Pe).concat(Ye.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&fe(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(s,{radius:N>>1,children:ye.map((De,Re)=>De!==null?p.createElement(me,{key:Re,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Re},"Loading..."))}):p.createElement(f,null,"No upgrades found")},Ce=await n(({useSubmit:we})=>{we(a());let ye=new Map;for(let se of P.workspaces)for(let X of["dependencies","devDependencies"])for(let De of se.manifest[X].values())P.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith("link:")||ye.set(De.descriptorHash,De));let fe=je.sortMap(ye.values(),se=>q.stringifyDescriptor(se));return p.createElement(c,{flexDirection:"column"},p.createElement(Ae,null),p.createElement(ce,null),p.createElement(pe,{dependencies:fe}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof Ce>"u")return 1;let g=!1;for(let we of P.workspaces)for(let ye of["dependencies","devDependencies"]){let fe=we.manifest[ye];for(let se of fe.values()){let X=Ce.get(se.descriptorHash);typeof X<"u"&&X!==null&&(fe.set(se.identHash,q.makeDescriptor(se,X)),g=!0)}}return g?await P.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};var mQt={commands:[Iw,Cw]},yQt=mQt;var wY={};Vt(wY,{default:()=>wQt});Ve();var RD="jsr:";Ve();Ve();function ww(t){let e=t.range.slice(4);if(Or.validRange(e))return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(t,"jsr"))}@${e}`);let r=q.tryParseDescriptor(e,!0);if(r!==null)return q.makeDescriptor(t,`npm:${q.stringifyIdent(q.wrapIdentIntoScope(r,"jsr"))}@${r.range}`);throw new Error(`Invalid range: ${t.range}`)}function Bw(t){return q.makeLocator(q.wrapIdentIntoScope(t,"jsr"),`npm:${t.reference.slice(4)}`)}function CY(t){return q.makeLocator(q.unwrapIdentFromScope(t,"jsr"),`jsr:${t.reference.slice(4)}`)}var tN=class{supports(e,r){return e.reference.startsWith(RD)}getLocalPath(e,r){let s=Bw(e);return r.fetcher.getLocalPath(s,r)}fetch(e,r){let s=Bw(e);return r.fetcher.fetch(s,r)}};var rN=class{supportsDescriptor(e,r){return!!e.range.startsWith(RD)}supportsLocator(e,r){return!!e.reference.startsWith(RD)}shouldPersistResolution(e,r){let s=Bw(e);return r.resolver.shouldPersistResolution(s,r)}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{inner:ww(e)}}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(ww(e));return(await s.resolver.getCandidates(a,r,s)).map(c=>CY(c))}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(ww(e));return a.resolver.getSatisfying(n,r,s,a)}async resolve(e,r){let s=Bw(e),a=await r.resolver.resolve(s,r);return{...a,...CY(a)}}};var EQt=["dependencies","devDependencies","peerDependencies"];function IQt(t,e){for(let r of EQt)for(let s of t.manifest.getForScope(r).values()){if(!s.range.startsWith("jsr:"))continue;let a=ww(s),n=r==="dependencies"?q.makeDescriptor(s,"unknown"):null,c=n!==null&&t.manifest.ensureDependencyMeta(n).optional?"optionalDependencies":r;e[c][q.stringifyIdent(s)]=a.range}}var CQt={hooks:{beforeWorkspacePacking:IQt},resolvers:[rN],fetchers:[tN]},wQt=CQt;var BY={};Vt(BY,{LinkFetcher:()=>FD,LinkResolver:()=>ND,PortalFetcher:()=>OD,PortalResolver:()=>LD,default:()=>vQt});Ve();bt();var ih="portal:",sh="link:";var FD=class{supports(e,r){return!!e.reference.startsWith(sh)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:sh}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,discardFromLookup:!0}}};Ve();bt();var ND=class{supportsDescriptor(e,r){return!!e.range.startsWith(sh)}supportsLocator(e,r){return!!e.reference.startsWith(sh)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(sh.length);return[q.makeLocator(e,`${sh}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ve();bt();var OD=class{supports(e,r){return!!e.reference.startsWith(ih)}getLocalPath(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ih});if(K.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:K.resolve(n,a)}async fetch(e,r){let{parentLocator:s,path:a}=q.parseFileStyleRange(e.reference,{protocol:ih}),n=K.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,n.localPath),localPath:vt.root}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=K.resolve(c.localPath??c.packageFs.getRealPath(),c.prefixPath,a);return n.localPath?{packageFs:new Sn(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot,localPath:p}:{packageFs:new jf(p,{baseFs:f}),releaseFs:c.releaseFs,prefixPath:vt.dot}}};Ve();Ve();bt();var LD=class{supportsDescriptor(e,r){return!!e.range.startsWith(ih)}supportsLocator(e,r){return!!e.reference.startsWith(ih)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(ih.length);return[q.makeLocator(e,`${ih}${ue.toPortablePath(a)}`)]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var BQt={fetchers:[FD,OD],resolvers:[ND,LD]},vQt=BQt;var oV={};Vt(oV,{NodeModulesLinker:()=>XD,NodeModulesMode:()=>rV,PnpLooseLinker:()=>$D,default:()=>HTt});bt();Ve();bt();bt();var SY=(t,e)=>`${t}@${e}`,WPe=(t,e)=>{let r=e.indexOf("#"),s=r>=0?e.substring(r+1):e;return SY(t,s)};var VPe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),s=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:s,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},c;n.debugLevel>=0&&(c=Date.now());let f=QQt(t,n),p=!1,h=0;do{let E=DY(f,[f],new Set([f.locator]),new Map,n);p=E.anotherRoundNeeded||E.isGraphChanged,n.fastLookupPossible=!1,h++}while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-c}ms, rounds: ${h}`),n.debugLevel>=1){let E=MD(f);if(DY(f,[f],new Set([f.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree: +${E}, next tree: +${MD(f)}`);let S=KPe(f);if(S)throw new Error(`${S}, after hoisting finished: +${MD(f)}`)}return n.debugLevel>=2&&console.log(MD(f)),TQt(f)},SQt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},DQt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let C of t)E=C.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},YPe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:I,hoistedTo:R}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:C,hoistPriority:S,dependencyKind:P,hoistedFrom:new Map(I),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},bQt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},vY=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},DY=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=RQt(c),p=bQt(c,f),h=t==c?new Map:a.fastLookupPossible?SQt(e):DQt(e),E,C=!1,S=!1,P=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),I=new Map;do{let R=kQt(t,e,r,h,P,p,s,I,a);R.isGraphChanged&&(S=!0),R.anotherRoundNeeded&&(C=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(P.delete(N),U.shift(),P.set(N,U[0]),E=!0)}while(E);for(let R of c.dependencies.values())if(!c.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=DY(t,[...e,R],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(C=!0),r.delete(R.locator)}return{anotherRoundNeeded:C,isGraphChanged:S}},PQt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},xQt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,C=null,S=new Set;p&&(E=`${Array.from(e).map(N=>Io(N)).join("\u2192")}`);let P=r[r.length-1],R=!(s.ident===P.ident);if(p&&!R&&(C="- self-reference"),R&&(R=s.dependencyKind!==1,p&&!R&&(C="- workspace")),R&&s.dependencyKind===2&&(R=!PQt(s),p&&!R&&(C="- external soft link with unhoisted dependencies")),R&&(R=!t.peerNames.has(s.name),p&&!R&&(C=`- cannot shadow peer: ${Io(t.originalDependencies.get(s.name).locator)} at ${E}`)),R){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(C=`- filled by: ${Io(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let Ae=f.get(P);Ae||(Ae=new Set,f.set(P,Ae)),Ae.add(s.name),p&&(C=`- filled by ${Io(ie.locator)} at ${r.slice(0,W).map(ce=>Io(ce.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(s.name)===s.ident,p&&!R&&(C=`- filled by: ${Io(c.get(s.name)[0])} at ${E}`)),R){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let te=r[W];for(let ie of U){if(te.peerNames.has(ie)&&te.originalDependencies.has(ie))continue;let Ae=te.dependencies.get(ie);Ae&&t.dependencies.get(ie)!==Ae&&(W===r.length-1?S.add(Ae):(S=null,N=!1,p&&(C=`- peer dependency ${Io(Ae.locator)} from parent ${Io(te.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}R=N}if(R&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(C=`- previously hoisted dependency mismatch, needed: ${Io(N.locator)}, available: ${Io(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:C}:{isHoistable:R?0:1,reason:C}},nN=t=>`${t.name}@${t.locator}`,kQt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,C=!1,S=!1,P=(U,W,te,ie,Ae)=>{if(E.has(ie))return;let ce=[...W,nN(ie)],me=[...te,nN(ie)],pe=new Map,Be=new Map;for(let fe of vY(ie)){let se=xQt(h,r,[h,...U,ie],fe,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(fe,se),se.isHoistable===2)for(let X of se.dependsOn){let De=pe.get(X.name)||new Set;De.add(fe.name),pe.set(X.name,De)}}let Ce=new Set,g=(fe,se,X)=>{if(!Ce.has(fe)){Ce.add(fe),Be.set(fe,{isHoistable:1,reason:X});for(let De of pe.get(fe.name)||[])g(ie.dependencies.get(De),se,p.debugLevel>=2?`- peer dependency ${Io(fe.locator)} from parent ${Io(ie.locator)} was not hoisted`:"")}};for(let[fe,se]of Be)se.isHoistable===1&&g(fe,se,se.reason);let we=!1;for(let fe of Be.keys())if(!Ce.has(fe)){S=!0;let se=c.get(ie);se&&se.has(fe.name)&&(C=!0),we=!0,ie.dependencies.delete(fe.name),ie.hoistedDependencies.set(fe.name,fe),ie.reasons.delete(fe.name);let X=h.dependencies.get(fe.name);if(p.debugLevel>=2){let De=Array.from(W).concat([ie.locator]).map(dt=>Io(dt)).join("\u2192"),Re=h.hoistedFrom.get(fe.name);Re||(Re=[],h.hoistedFrom.set(fe.name,Re)),Re.push(De),ie.hoistedTo.set(fe.name,Array.from(e).map(dt=>Io(dt.locator)).join("\u2192"))}if(!X)h.ident!==fe.ident&&(h.dependencies.set(fe.name,fe),Ae.add(fe));else for(let De of fe.references)X.references.add(De)}if(ie.dependencyKind===2&&we&&(C=!0),p.check){let fe=KPe(t);if(fe)throw new Error(`${fe}, after hoisting dependencies of ${[h,...U,ie].map(se=>Io(se.locator)).join("\u2192")}: +${MD(t)}`)}let ye=vY(ie);for(let fe of ye)if(Ce.has(fe)){let se=Be.get(fe);if((a.get(fe.name)===fe.ident||!ie.reasons.has(fe.name))&&se.isHoistable!==0&&ie.reasons.set(fe.name,se.reason),!fe.isHoistBorder&&me.indexOf(nN(fe))<0){E.add(ie);let De=YPe(ie,fe);P([...U,ie],ce,me,De,R),E.delete(ie)}}},I,R=new Set(vY(h)),N=Array.from(e).map(U=>nN(U));do{I=R,R=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=YPe(h,U);P([],Array.from(r),N,W,R)}}while(R.size>0);return{anotherRoundNeeded:C,isGraphChanged:S}},KPe=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),C=()=>`${Array.from(s).concat([n]).map(S=>Io(S.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${C()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),P=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(", ")}`:""}`,R=`${P?` hoisted to ${P}`:""}`,N=`${C()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(` +`)},QQt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:SY(r,a),ident:WPe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let C=f.get(h),S=!!C;if(!C){let{name:P,identName:I,reference:R,peerNames:N,hoistPriority:U,dependencyKind:W}=h,te=e.hoistingLimits.get(E.locator);C={name:P,references:new Set([R]),locator:SY(I,R),ident:WPe(I,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(P):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,C)}if(E.dependencies.set(h.name,C),E.originalDependencies.set(h.name,C),S){let P=new Set,I=R=>{if(!P.has(R)){P.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||I(N)}};I(C)}else for(let P of h.dependencies)p(P,C)};for(let h of t.dependencies)p(h,c);return c},bY=t=>t.substring(0,t.indexOf("@",1)),TQt=t=>{let e={name:t.name,identName:bY(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:C}=a;p={name:h,identName:bY(C),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},RQt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let C=a(E);C.hoistPriority=Math.max(C.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?C.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},Io=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=t.substring(e+1);if(s==="workspace:.")return".";if(s){let a=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var MD=t=>{let e=0,r=(a,n,c="")=>{if(e>5e4||n.has(a))return"";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h":"")+(S!==E.name?`a:${E.name}:`:"")+Io(E.locator)+(C?` ${C}`:"")} +`,p+=r(E,n,`${c}${h5e4?` +Tree is too large, part of the tree has been dunped +`:"")};var _D=(s=>(s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none",s))(_D||{}),JPe="node_modules",tg="$wsroot$";var UD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=NQt(t,e),c=null;if(a.length===0){let f=VPe(r,{hoistingLimits:s});c=LQt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},gA=t=>`${t.name}@${t.reference}`,xY=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(K.delimiter).length,c=a.split(K.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},zPe=(t,e)=>{let r=q.isVirtualLocator(t)?q.devirtualizeLocator(t):t,s=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e;return q.areLocatorsEqual(r,s)},PY=(t,e,r,s)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return K.contains(s,a)===null},FQt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,P)=>{let I=gA(S);if(p.has(I))return;p.add(I);let R=t.getPackageInformation(S);if(R){let N=P?gA(P):"";if(gA(S)!==N&&R.linkType==="SOFT"&&!S.reference.startsWith("link:")&&!PY(R,S,t,s)){let U=ZPe(R,S,t);(!f.get(U)||S.reference.startsWith("workspace:"))&&f.set(U,S)}for(let[U,W]of R.packageDependencies)W!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(K.sep);for(let S of f.values()){let P=t.getPackageInformation(S),R=ue.toPortablePath(P.packageLocation.slice(0,-1)).split(K.sep).slice(E.length),N=n;for(let U of R){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let C=(S,P)=>{if(S.workspaceLocator){let I=gA(P),R=a.get(I);R||(R=new Set,a.set(I,R)),R.add(S.workspaceLocator)}for(let I of S.children.values())C(I,S.workspaceLocator||P)};for(let S of n.children.values())C(S,n.workspaceLocator);return a},NQt=(t,e)=>{let r=[],s=!1,a=new Map,n=FQt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,C=(P,I)=>`${gA(I)}:${P}`,S=(P,I,R,N,U,W,te,ie)=>{let Ae=C(P,R),ce=E.get(Ae),me=!!ce;!me&&R.name===f.name&&R.reference===f.reference&&(ce=h,E.set(Ae,h));let pe=PY(I,R,t,p);if(!ce){let fe=0;pe?fe=2:I.linkType==="SOFT"&&R.name.endsWith(tg)&&(fe=1),ce={name:P,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:fe===1?new Set:I.packagePeers,dependencyKind:fe},E.set(Ae,ce)}let Be;if(pe?Be=2:U.linkType==="SOFT"?Be=1:Be=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,Be),ie&&!pe){let fe=gA({name:N.identName,reference:N.reference}),se=a.get(fe)||new Set;a.set(fe,se),se.add(ce.name)}let Ce=new Map(I.packageDependencies);if(e.project){let fe=e.project.workspacesByCwd.get(ue.toPortablePath(I.packageLocation.slice(0,-1)));if(fe){let se=new Set([...Array.from(fe.manifest.peerDependencies.values(),X=>q.stringifyIdent(X)),...Array.from(fe.manifest.peerDependenciesMeta.keys())]);for(let X of se)Ce.has(X)||(Ce.set(X,W.get(X)||null),ce.peerNames.add(X))}}let g=gA({name:R.name.replace(tg,""),reference:R.reference}),we=n.get(g);if(we)for(let fe of we)Ce.set(`${fe.name}${tg}`,fe.reference);(I!==U||I.linkType!=="SOFT"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&N.dependencies.add(ce);let ye=R!==f&&I.linkType==="SOFT"&&!R.name.endsWith(tg)&&!pe;if(!me&&!ye){let fe=new Map;for(let[se,X]of Ce)if(X!==null){let De=t.getLocator(se,X),Re=t.getLocator(se.replace(tg,""),X),dt=t.getPackageInformation(Re);if(dt===null)throw new Error("Assertion failed: Expected the package to have been registered");let j=PY(dt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){dt.packageDependencies.size>0&&(s=!0);for(let[Ye,ke]of dt.packageDependencies)if(ke!==null){let it=q.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ye}@${ke}`);if(gA(it)!==gA(De)){let _e=Ce.get(Ye);if(_e){let x=q.parseLocator(Array.isArray(_e)?`${_e[0]}@${_e[1]}`:`${Ye}@${_e}`);zPe(x,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with parent dependency ${q.prettyLocator(e.project.configuration,x)}`})}else{let x=fe.get(Ye);if(x){let w=x.target,b=q.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${Ye}@${w}`);zPe(b,it)||r.push({messageName:71,text:`Cannot link ${q.prettyIdent(e.project.configuration,q.parseIdent(De.name))} into ${q.prettyLocator(e.project.configuration,q.parseLocator(`${R.name}@${R.reference}`))} dependency ${q.prettyLocator(e.project.configuration,it)} conflicts with dependency ${q.prettyLocator(e.project.configuration,b)} from sibling portal ${q.prettyIdent(e.project.configuration,q.parseIdent(x.portal.name))}`})}else fe.set(Ye,{target:it.reference,portal:De})}}}}let rt=e.hoistingLimitsByCwd?.get(te),Fe=j?te:K.relative(p,ue.toPortablePath(dt.packageLocation))||vt.dot,Ne=e.hoistingLimitsByCwd?.get(Fe);S(se,dt,De,ce,I,Ce,Fe,rt==="dependencies"||Ne==="dependencies"||Ne==="workspaces")}}};return S(f.name,c,f,h,c,c.packageDependencies,vt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:s}};function ZPe(t,e,r){let s=r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation;return ue.toPortablePath(s||t.packageLocation)}function OQt(t,e,r){let s=e.getLocator(t.name.replace(tg,""),t.reference),a=e.getPackageInformation(s);if(a===null)throw new Error("Assertion failed: Expected the package to be registered");return r.pnpifyFs?{linkType:"SOFT",target:ue.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:ZPe(a,t,e)}}var LQt=(t,e,r)=>{let s=new Map,a=(E,C,S)=>{let{linkType:P,target:I}=OQt(E,t,r);return{locator:gA(E),nodePath:C,target:I,linkType:P,aliases:S}},n=E=>{let[C,S]=E.split("/");return S?{scope:C,name:S}:{scope:null,name:C}},c=new Set,f=(E,C,S)=>{if(c.has(E))return;c.add(E);let P=Array.from(E.references).sort().join("#");for(let I of E.dependencies){let R=Array.from(I.references).sort().join("#");if(I.identName===E.identName.replace(tg,"")&&R===P)continue;let N=Array.from(I.references).sort(),U={name:I.identName,reference:N[0]},{name:W,scope:te}=n(I.name),ie=te?[te,W]:[W],Ae=K.join(C,JPe),ce=K.join(Ae,...ie),me=`${S}/${U.name}`,pe=a(U,S,N.slice(1)),Be=!1;if(pe.linkType==="SOFT"&&r.project){let Ce=r.project.workspacesByCwd.get(pe.target.slice(0,-1));Be=!!(Ce&&!Ce.manifest.name)}if(!I.name.endsWith(tg)&&!Be){let Ce=s.get(ce);if(Ce){if(Ce.dirList)throw new Error(`Assertion failed: ${ce} cannot merge dir node with leaf node`);{let ye=q.parseLocator(Ce.locator),fe=q.parseLocator(pe.locator);if(Ce.linkType!==pe.linkType)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different link types ${Ce.nodePath}/${q.stringifyLocator(ye)} and ${S}/${q.stringifyLocator(fe)}`);if(ye.identHash!==fe.identHash)throw new Error(`Assertion failed: ${ce} cannot merge nodes with different idents ${Ce.nodePath}/${q.stringifyLocator(ye)} and ${S}/s${q.stringifyLocator(fe)}`);pe.aliases=[...pe.aliases,...Ce.aliases,q.parseLocator(Ce.locator).reference]}}s.set(ce,pe);let g=ce.split("/"),we=g.indexOf(JPe);for(let ye=g.length-1;we>=0&&ye>we;ye--){let fe=ue.toPortablePath(g.slice(0,ye).join(K.sep)),se=g[ye],X=s.get(fe);if(!X)s.set(fe,{dirList:new Set([se])});else if(X.dirList){if(X.dirList.has(se))break;X.dirList.add(se)}}}f(I,pe.linkType==="SOFT"?pe.target:ce,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},"",[]),h=p.target;return s.set(h,p),f(e,h,""),s};Ve();Ve();bt();bt();rA();Bc();var KY={};Vt(KY,{PnpInstaller:()=>jm,PnpLinker:()=>ig,UnplugCommand:()=>Sw,default:()=>pTt,getPnpPath:()=>sg,jsInstallUtils:()=>mA,pnpUtils:()=>ZD,quotePathIfNeeded:()=>Nxe});bt();var Fxe=Ie("url");Ve();Ve();bt();bt();var XPe={DEFAULT:{collapsed:!1,next:{"*":"DEFAULT"}},TOP_LEVEL:{collapsed:!1,next:{fallbackExclusionList:"FALLBACK_EXCLUSION_LIST",packageRegistryData:"PACKAGE_REGISTRY_DATA","*":"DEFAULT"}},FALLBACK_EXCLUSION_LIST:{collapsed:!1,next:{"*":"FALLBACK_EXCLUSION_ENTRIES"}},FALLBACK_EXCLUSION_ENTRIES:{collapsed:!0,next:{"*":"FALLBACK_EXCLUSION_DATA"}},FALLBACK_EXCLUSION_DATA:{collapsed:!0,next:{"*":"DEFAULT"}},PACKAGE_REGISTRY_DATA:{collapsed:!1,next:{"*":"PACKAGE_REGISTRY_ENTRIES"}},PACKAGE_REGISTRY_ENTRIES:{collapsed:!0,next:{"*":"PACKAGE_STORE_DATA"}},PACKAGE_STORE_DATA:{collapsed:!1,next:{"*":"PACKAGE_STORE_ENTRIES"}},PACKAGE_STORE_ENTRIES:{collapsed:!0,next:{"*":"PACKAGE_INFORMATION_DATA"}},PACKAGE_INFORMATION_DATA:{collapsed:!1,next:{packageDependencies:"PACKAGE_DEPENDENCIES","*":"DEFAULT"}},PACKAGE_DEPENDENCIES:{collapsed:!1,next:{"*":"PACKAGE_DEPENDENCY"}},PACKAGE_DEPENDENCY:{collapsed:!0,next:{"*":"DEFAULT"}}};function MQt(t,e,r){let s="";s+="[";for(let a=0,n=t.length;a"u"||(f!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=iN(p,h,e,r).replace(/^ +/g,""),f+=1)}return a+="}",a}function HQt(t,e,r){let s=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{ +`;let c=0;for(let f=0,p=s.length;f"u"||(c!==0&&(n+=",",n+=` +`),n+=a,n+=JSON.stringify(h),n+=": ",n+=iN(h,E,e,a).replace(/^ +/g,""),c+=1)}return c!==0&&(n+=` +`),n+=r,n+="}",n}function iN(t,e,r,s){let{next:a}=XPe[r],n=a[t]||a["*"];return $Pe(e,n,s)}function $Pe(t,e,r){let{collapsed:s}=XPe[e];return Array.isArray(t)?s?MQt(t,e,r):_Qt(t,e,r):typeof t=="object"&&t!==null?s?UQt(t,e,r):HQt(t,e,r):JSON.stringify(t)}function exe(t){return $Pe(t,"TOP_LEVEL","")}function HD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function jQt(t){let e=new Map,r=HD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>"u"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function qQt(t){return HD(t.fallbackPool||[],([e])=>e)}function GQt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation==="./");for(let[s,a]of HD(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:C}]of HD(a,([S])=>S===null?"0":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let P=HD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:P,packagePeers:I,linkType:E,discardFromLookup:C||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function jD(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:jQt(t),fallbackPool:qQt(t),packageRegistryData:GQt(t)}}var nxe=et(rxe());function ixe(t,e){return[t?`${t} +`:"",`/* eslint-disable */ +`,`// @ts-nocheck +`,`"use strict"; +`,` +`,e,` +`,(0,nxe.default)()].join("")}function WQt(t){return JSON.stringify(t,null,2)}function YQt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\ +`)}'`}function VQt(t){return[`const RAW_RUNTIME_STATE = +`,`${YQt(exe(t))}; + +`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) { +`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname}); +`,`} +`].join("")}function KQt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) { +`,` const fs = require('fs'); +`,` const path = require('path'); +`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)}); +`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname}); +`,`} +`].join("")}function sxe(t){let e=jD(t),r=VQt(e);return ixe(t.shebang,r)}function oxe(t){let e=jD(t),r=KQt(),s=ixe(t.shebang,r);return{dataFile:WQt(e),loaderFile:s}}bt();function QY(t,{basePath:e}){let r=ue.toPortablePath(e),s=K.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([C,S])=>[C,new Map(S.map(([P,I])=>{if(C===null!=(P===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=I.discardFromLookup??!1,N={name:C,reference:P},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:R});let W=null;return[P,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:R,get packageLocation(){return W||(W=K.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([C,S])=>[C,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}bt();bt();var ah=Ie("module"),Hm=Ie("url"),HY=Ie("util");var ra=Ie("url");var uxe=et(Ie("assert"));var TY=Array.isArray,qD=JSON.stringify,GD=Object.getOwnPropertyNames,Um=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),RY=(t,e)=>RegExp.prototype.exec.call(t,e),FY=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),rg=(t,...e)=>String.prototype.endsWith.apply(t,e),NY=(t,...e)=>String.prototype.includes.apply(t,e),OY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),WD=(t,...e)=>String.prototype.indexOf.apply(t,e),axe=(t,...e)=>String.prototype.replace.apply(t,e),ng=(t,...e)=>String.prototype.slice.apply(t,e),dA=(t,...e)=>String.prototype.startsWith.apply(t,e),lxe=Map,cxe=JSON.parse;function YD(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var fxe=YD("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),LY=YD("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),Axe=YD("ERR_INVALID_PACKAGE_TARGET",(t,e,r,s=!1,a=void 0)=>{let n=typeof r=="string"&&!s&&r.length&&!dA(r,"./");return e==="."?((0,uxe.default)(s===!1),`Invalid "exports" main target ${qD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${qD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),VD=YD("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),pxe=YD("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var oN=Ie("url");function hxe(t,e){let r=Object.create(null);for(let s=0;se):t+e}KD(r,t,s,c,a)}RY(dxe,ng(t,2))!==null&&KD(r,t,s,c,a);let p=new URL(t,s),h=p.pathname,E=new URL(".",s).pathname;if(dA(h,E)||KD(r,t,s,c,a),e==="")return p;if(RY(dxe,e)!==null){let C=n?axe(r,"*",()=>e):r+e;ZQt(C,s,c,a)}return n?new URL(FY(mxe,p.href,()=>e)):new URL(e,p)}function $Qt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function vw(t,e,r,s,a,n,c,f){if(typeof e=="string")return XQt(e,r,s,t,a,n,c,f);if(TY(e)){if(e.length===0)return null;let p;for(let h=0;hn?-1:n>a||r===-1?1:s===-1||t.length>e.length?-1:e.length>t.length?1:0}function eTt(t,e,r){if(typeof t=="string"||TY(t))return!0;if(typeof t!="object"||t===null)return!1;let s=GD(t),a=!1,n=0;for(let c=0;c=h.length&&rg(e,C)&&Exe(n,h)===1&&OY(h,"*")===E&&(n=h,c=ng(e,E,e.length-C.length))}}if(n){let p=r[n],h=vw(t,p,c,n,s,!0,!1,a);return h==null&&MY(e,t,s),h}MY(e,t,s)}function Cxe({name:t,base:e,conditions:r,readFileSyncFn:s}){if(t==="#"||dA(t,"#/")||rg(t,"/")){let c="is not a valid internal imports specifier name";throw new LY(t,c,(0,ra.fileURLToPath)(e))}let a,n=gxe(e,s);if(n.exists){a=(0,ra.pathToFileURL)(n.pjsonPath);let c=n.imports;if(c)if(Um(c,t)&&!NY(t,"*")){let f=vw(a,c[t],"",t,e,!1,!0,r);if(f!=null)return f}else{let f="",p,h=GD(c);for(let E=0;E=C.length&&rg(t,P)&&Exe(f,C)===1&&OY(C,"*")===S&&(f=C,p=ng(t,S,t.length-P.length))}}if(f){let E=c[f],C=vw(a,E,p,f,e,!0,!0,r);if(C!=null)return C}}}zQt(t,a,e)}bt();var rTt=new Set(["BUILTIN_NODE_RESOLUTION_FAILED","MISSING_DEPENDENCY","MISSING_PEER_DEPENDENCY","QUALIFIED_PATH_RESOLUTION_FAILED","UNDECLARED_DEPENDENCY"]);function ms(t,e,r={},s){s??=rTt.has(t)?"MODULE_NOT_FOUND":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:s},pnpCode:{...a,value:t},data:{...a,value:r}})}function cf(t){return ue.normalize(ue.fromPortablePath(t))}var Sxe=et(Bxe());function Dxe(t){return nTt(),UY[t]}var UY;function nTt(){UY||(UY={"--conditions":[],...vxe(iTt()),...vxe(process.execArgv)})}function vxe(t){return(0,Sxe.default)({"--conditions":[String],"-C":"--conditions"},{argv:t,permissive:!0})}function iTt(){let t=[],e=sTt(process.env.NODE_OPTIONS||"",t);return t.length,e}function sTt(t,e){let r=[],s=!1,a=!0;for(let n=0;nparseInt(t,10)),bxe=yl>19||yl===19&&oh>=2||yl===18&&oh>=13,pdr=yl===20&&oh<6||yl===19&&oh>=3,hdr=yl>19||yl===19&&oh>=6,gdr=yl>=21||yl===20&&oh>=10||yl===18&&oh>=19,ddr=yl>=21||yl===20&&oh>=10||yl===18&&oh>=20,mdr=yl>=22;function Pxe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(Ao.resolveVirtual(ue.toPortablePath(e)))),bxe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function jY(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,c=/\/$/,f=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of["react-scripts","gatsby"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Fe,reference:Pe})}}let{ignorePattern:C,packageRegistry:S,packageLocatorsByLocations:P}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function R(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,_e)=>`\x1B[${it}m${_e}\x1B[0m`,Ye=Fe.error;console.error(Ye?Pe("31;1",`\u2716 ${Fe.error?.message.replace(/\n.*/s,"")}`):Pe("33;1","\u203C Resolution")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(` ${Pe("37;1","In \u2190")} ${(0,HY.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(` ${Pe("37;1","Out \u2192")} ${(0,HY.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(` ${Pe("38;5;244",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ye=I(Fe,Pe);try{return Ye.result=Ne(...Pe)}catch(ke){throw Ye.error=ke}finally{R(Ye)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ye){let ke=I(Fe,Pe);throw ke.error=Ye,R(ke),Ye}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw ms("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let te=new Set(["node","require",...Dxe("--conditions")]);function ie(Fe,Ne=te,Pe){let Ye=fe(K.join(Fe,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw ms("INTERNAL",`The locator that owns the "${Fe}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ye),it=K.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let _e=JSON.parse(e.fakeFs.readFileSync(it,"utf8"));if(_e.exports==null)return null;let x=K.contains(ke,Fe);if(x===null)throw ms("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!f.test(x)&&(x=`./${x}`);try{let w=Ixe({packageJSONUrl:(0,Hm.pathToFileURL)(ue.fromPortablePath(it)),packageSubpath:x,exports:_e.exports,base:Pe?(0,Hm.pathToFileURL)(ue.fromPortablePath(Pe)):null,conditions:Ne});return ue.toPortablePath((0,Hm.fileURLToPath)(w))}catch(w){throw ms("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:cf(Fe),locator:Ye,pkgJson:_e,subpath:cf(x),conditions:Ne},w.code)}}function Ae(Fe,Ne,{extensions:Pe}){let Ye;try{Ne.push(Fe),Ye=e.fakeFs.statSync(Fe)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ye&&Ye.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(K.join(Fe,Er.manifest),"utf8"))}catch{}let it;if(ke&&ke.main&&(it=K.resolve(Fe,ke.main)),it&&it!==Fe){let _e=Ae(it,Ne,{extensions:Pe});if(_e!==null)return _e}}for(let ke=0,it=Pe.length;ke{let x=JSON.stringify(_e.name);if(Ye.has(x))return;Ye.add(x);let w=we(_e);for(let b of w)if(U(b).packagePeers.has(Fe))ke(b);else{let F=Pe.get(b.name);typeof F>"u"&&Pe.set(b.name,F=new Set),F.add(b.reference)}};ke(Ne);let it=[];for(let _e of[...Pe.keys()].sort())for(let x of[...Pe.get(_e)].sort())it.push({name:_e,reference:x});return it}function fe(Fe,{resolveIgnored:Ne=!1,includeDiscardFromLookup:Pe=!1}={}){if(pe(Fe)&&!Ne)return null;let Ye=K.relative(t.basePath,Fe);Ye.match(n)||(Ye=`./${Ye}`),Ye.endsWith("/")||(Ye=`${Ye}/`);do{let ke=P.get(Ye);if(typeof ke>"u"||ke.discardFromLookup&&!Pe){Ye=Ye.substring(0,Ye.lastIndexOf("/",Ye.length-2)+1);continue}return ke.locator}while(Ye!=="");return null}function se(Fe){try{return e.fakeFs.readFileSync(ue.toPortablePath(Fe),"utf8")}catch(Ne){if(Ne.code==="ENOENT")return;throw Ne}}function X(Fe,Ne,{considerBuiltins:Pe=!0}={}){if(Fe.startsWith("#"))throw new Error("resolveToUnqualified can not handle private import mappings");if(Fe==="pnpapi")return ue.toPortablePath(e.pnpapiResolution);if(Pe&&(0,ah.isBuiltin)(Fe))return null;let Ye=cf(Fe),ke=Ne&&cf(Ne);if(Ne&&pe(Ne)&&(!K.isAbsolute(Fe)||fe(Fe)===null)){let x=me(Fe,Ne);if(x===!1)throw ms("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) + +Require request: "${Ye}" +Required by: ${ke} +`,{request:Ye,issuer:ke});return ue.toPortablePath(x)}let it,_e=Fe.match(a);if(_e){if(!Ne)throw ms("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let[,x,w]=_e,b=fe(Ne);if(!b){let Te=me(Fe,Ne);if(Te===!1)throw ms("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). + +Require path: "${Ye}" +Required by: ${ke} +`,{request:Ye,issuer:ke});return ue.toPortablePath(Te)}let F=U(b).packageDependencies.get(x),z=null;if(F==null&&b.name!==null){let Te=t.fallbackExclusionList.get(b.name);if(!Te||!Te.has(b.reference)){for(let It=0,qt=h.length;ItW(lt))?Z=ms("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${b.name}@${b.reference} (via ${ke}) +${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference} +`).join("")} +`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te}):Z=ms("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${b.name}@${b.reference} (via ${ke}) + +${Te.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference} +`).join("")} +`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x,brokenAncestors:Te})}else F===void 0&&(!Pe&&(0,ah.isBuiltin)(Fe)?W(b)?Z=ms("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${ke} +`,{request:Ye,issuer:ke,dependencyName:x}):Z=ms("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${ke} +`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}):W(b)?Z=ms("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${ke} +`,{request:Ye,issuer:ke,dependencyName:x}):Z=ms("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. + +Required package: ${x}${x!==Ye?` (via "${Ye}")`:""} +Required by: ${b.name}@${b.reference} (via ${ke}) +`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:x}));if(F==null){if(z===null||Z===null)throw Z||new Error("Assertion failed: Expected an error to have been set");F=z;let Te=Z.message.replace(/\n.*/g,"");Z.message=Te,!E.has(Te)&&s!==0&&(E.add(Te),process.emitWarning(Z))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:x,reference:F},oe=U($);if(!oe.packageLocation)throw ms("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. + +Required package: ${$.name}@${$.reference}${$.name!==Ye?` (via "${Ye}")`:""} +Required by: ${b.name}@${b.reference} (via ${ke}) +`,{request:Ye,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;w?it=K.join(xe,w):it=xe}else if(K.isAbsolute(Fe))it=K.normalize(Fe);else{if(!Ne)throw ms("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let x=K.resolve(Ne);Ne.match(c)?it=K.normalize(K.join(x,Fe)):it=K.normalize(K.join(K.dirname(x),Fe))}return K.normalize(it)}function De(Fe,Ne,Pe=te,Ye){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ye);return ke?K.normalize(ke):Ne}function Re(Fe,{extensions:Ne=Object.keys(ah.Module._extensions)}={}){let Pe=[],Ye=Ae(Fe,Pe,{extensions:Ne});if(Ye)return K.normalize(Ye);{Pxe(Pe.map(_e=>ue.fromPortablePath(_e)));let ke=cf(Fe),it=fe(Fe);if(it){let{packageLocation:_e}=U(it),x=!0;try{e.fakeFs.accessSync(_e)}catch(w){if(w?.code==="ENOENT")x=!1;else{let b=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${b}). + +Missing package: ${it.name}@${it.reference} +Expected package location: ${cf(_e)} +`,{unqualifiedPath:ke,extensions:Ne})}}if(!x){let w=_e.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`${w} + +Missing package: ${it.name}@${it.reference} +Expected package location: ${cf(_e)} +`,{unqualifiedPath:ke,extensions:Ne})}}throw ms("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed. + +Source path: ${ke} +${Pe.map(_e=>`Not found: ${cf(_e)} +`).join("")}`,{unqualifiedPath:ke,extensions:Ne})}}function dt(Fe,Ne,Pe){if(!Ne)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ye=Cxe({name:Fe,base:(0,Hm.pathToFileURL)(ue.fromPortablePath(Ne)),conditions:Pe.conditions??te,readFileSyncFn:se});if(Ye instanceof URL)return Re(ue.toPortablePath((0,Hm.fileURLToPath)(Ye)),{extensions:Pe.extensions});if(Ye.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return j(Ye,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith("#"))return dt(Fe,Ne,Pe);let{considerBuiltins:Ye,extensions:ke,conditions:it}=Pe,_e=X(Fe,Ne,{considerBuiltins:Ye});if(Fe==="pnpapi")return _e;if(_e===null)return null;let x=()=>Ne!==null?pe(Ne):!1,w=(!Ye||!(0,ah.isBuiltin)(Fe))&&!x()?De(Fe,_e,it,Ne):_e;return Re(w,{extensions:ke})}catch(Ye){throw Object.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:cf(Fe),issuer:Ne&&cf(Ne)}),Ye}}function rt(Fe){let Ne=K.normalize(Fe),Pe=Ao.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ye of Pe.keys())Ne!==null&&Ye!==null&&Fe.push({name:Ne,reference:Ye});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=ue.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>fe(ue.toPortablePath(Fe)),resolveToUnqualified:N("resolveToUnqualified",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=X(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveUnqualified:N("resolveUnqualified",(Fe,Ne)=>ue.fromPortablePath(Re(ue.toPortablePath(Fe),Ne))),resolveRequest:N("resolveRequest",(Fe,Ne,Pe)=>{let Ye=Ne!==null?ue.toPortablePath(Ne):null,ke=j(ue.toPortablePath(Fe),Ye,Pe);return ke===null?null:ue.fromPortablePath(ke)}),resolveVirtual:N("resolveVirtual",Fe=>{let Ne=rt(ue.toPortablePath(Fe));return Ne!==null?ue.fromPortablePath(Ne):null})}}bt();var xxe=(t,e,r)=>{let s=jD(t),a=QY(s,{basePath:e}),n=ue.join(e,Er.pnpCjs);return jY(a,{fakeFs:r,pnpapiResolution:n})};var GY=et(Qxe());Wt();var mA={};Vt(mA,{checkManifestCompatibility:()=>Txe,extractBuildRequest:()=>aN,getExtractHint:()=>WY,hasBindingGyp:()=>YY});Ve();bt();function Txe(t){return q.isPackageCompatible(t,ps.getArchitectureSet())}function aN(t,e,r,{configuration:s}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${q.prettyLocator(s,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${q.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${q.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:Txe(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${q.prettyLocator(s,t)} The ${ps.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var aTt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function WY(t){return t.packageFs.getExtractHint({relevantExtensions:aTt})}function YY(t){let e=K.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var ZD={};Vt(ZD,{getUnpluggedPath:()=>zD});Ve();bt();function zD(t,{configuration:e}){return K.resolve(e.get("pnpUnpluggedFolder"),q.slugifyLocator(t))}var lTt=new Set([q.makeIdent(null,"open").identHash,q.makeIdent(null,"opn").identHash]),ig=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let s=sg(r.project).cjs;if(!le.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:q.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return ue.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=sg(r.project).cjs;if(!le.existsSync(s))return null;let n=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})).findPackageLocator(ue.fromPortablePath(e));return n?q.makeLocator(q.parseIdent(n.name),n.reference):null}makeInstaller(e){return new jm(e)}isEnabled(e){return!(e.project.configuration.get("nodeLinker")!=="pnp"||e.project.configuration.get("pnpMode")!==this.mode)}},jm=class{constructor(e){this.opts=e;this.mode="strict";this.asyncActions=new je.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,s){let a=q.stringifyIdent(e),n=e.reference,c=!!this.opts.project.tryWorkspaceByLocator(e),f=q.isVirtualLocator(e),p=e.peerDependencies.size>0&&!f,h=!p&&!c,E=!p&&e.linkType!=="SOFT",C,S;if(h||E){let te=f?q.devirtualizeLocator(e):e;C=this.customData.store.get(te.locatorHash),typeof C>"u"&&(C=await cTt(r),e.linkType==="HARD"&&this.customData.store.set(te.locatorHash,C)),C.manifest.type==="module"&&(this.isESMLoaderRequired=!0),S=this.opts.project.getDependencyMeta(te,e.version)}let P=h?aN(e,C,S,{configuration:this.opts.project.configuration}):null,I=E?await this.unplugPackageIfNeeded(e,C,r,S,s):r.packageFs;if(K.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=K.resolve(I.getRealPath(),r.prefixPath),N=VY(this.opts.project.cwd,R),U=new Map,W=new Set;if(f){for(let te of e.peerDependencies.values())U.set(q.stringifyIdent(te),null),W.add(q.stringifyIdent(te));if(!c){let te=q.devirtualizeLocator(e);this.virtualTemplates.set(te.locatorHash,{location:VY(this.opts.project.cwd,Ao.resolveVirtual(R)),locator:te})}}return je.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:W,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:P}}async attachInternalDependencies(e,r){let s=this.getPackageInformation(e);for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){for(let s of r)this.getDiskInformation(s).packageDependencies.set(q.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=sg(this.opts.project);if(this.isEsmEnabled()||await le.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await le.removePromise(e.cjs),await le.removePromise(e.data),await le.removePromise(e.esmLoader),await le.removePromise(this.opts.project.configuration.get("pnpUnpluggedFolder"));return}for(let{locator:C,location:S}of this.virtualTemplates.values())je.getMapWithDefault(this.packageRegistry,q.stringifyIdent(C)).set(C.reference,{packageLocation:S,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1});let r=this.opts.project.configuration.get("pnpFallbackMode"),s=this.opts.project.workspaces.map(({anchoredLocator:C})=>({name:q.stringifyIdent(C),reference:C.reference})),a=r!=="none",n=[],c=new Map,f=je.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),p=this.packageRegistry,h=this.opts.project.configuration.get("pnpShebang"),E=this.opts.project.configuration.get("pnpZipBackend");if(r==="dependencies-only")for(let C of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(C)&&n.push({name:q.stringifyIdent(C),reference:C.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:s,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:c,ignorePattern:f,pnpZipBackend:E,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(e){let r=sg(this.opts.project),s=await this.locateNodeModules(e.ignorePattern);if(s.length>0){this.opts.report.reportWarning(31,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let n of s)await le.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let n=sxe(e);await le.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await le.removePromise(r.data)}else{let{dataFile:n,loaderFile:c}=oxe(e);await le.changeFilePromise(r.cjs,c,{automaticNewlines:!0,mode:493}),await le.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await le.changeFilePromise(r.esmLoader,(0,GY.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await le.removePromise(a);else for(let n of await le.readdirPromise(a)){let c=K.resolve(a,n);this.unpluggedPaths.has(c)||await le.removePromise(c)}}async locateNodeModules(e){let r=[],s=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=K.join(a.cwd,"node_modules");if(s&&s.test(K.relative(this.opts.project.cwd,a.cwd))||!le.existsSync(n))continue;let c=await le.readdirPromise(n,{withFileTypes:!0}),f=c.filter(p=>!p.isDirectory()||p.name===".bin"||!p.name.startsWith("."));if(f.length===c.length)r.push(n);else for(let p of f)r.push(K.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,s,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,s,n):s.packageFs}shouldBeUnplugged(e,r,s){return typeof s.unplugged<"u"?s.unplugged:lTt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(aN(e,r,s,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,s){let a=zD(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new Hf(a,{baseFs:r.packageFs,pathUtils:K}):(this.unpluggedPaths.add(a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=K.join(a,r.prefixPath,".ready");await le.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await le.mkdirPromise(a,{recursive:!0}),await le.copyPromise(a,vt.dot,{baseFs:r.packageFs,overwrite:!1}),await le.writeFilePromise(n,""))})),new Sn(a))}getPackageInformation(e){let r=q.stringifyIdent(e),s=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${q.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(s);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${q.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=je.getMapWithDefault(this.packageRegistry,"@@disk"),s=VY(this.opts.project.cwd,e);return je.getFactoryWithDefault(r,s,()=>({packageLocation:s,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1}))}};function VY(t,e){let r=K.relative(t,e);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function cTt(t){let e=await Ht.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ht,r=new Set(["preinstall","install","postinstall"]);for(let s of e.scripts.keys())r.has(s)||e.scripts.delete(s);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:WY(t),hasBindingGyp:YY(t)}}}Ve();Ve();Wt();var Rxe=et(Sa());var Sw=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["unplug"]]}static{this.usage=ot.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);if(r.get("nodeLinker")!=="pnp")throw new nt("This command can only be used if the `nodeLinker` option is set to `pnp`");await s.restoreInstallState();let c=new Set(this.patterns),f=this.patterns.map(P=>{let I=q.parseDescriptor(P),R=I.range!=="unknown"?I:q.makeDescriptor(I,"*");if(!Or.validRange(R.range))throw new nt(`The range of the descriptor patterns must be a valid semver range (${q.prettyDescriptor(r,R)})`);return N=>{let U=q.stringifyIdent(N);return!Rxe.default.isMatch(U,q.stringifyIdent(R))||N.version&&!Or.satisfiesWithPrereleases(N.version,R.range)?!1:(c.delete(P),!0)}}),p=()=>{let P=[];for(let I of s.storedPackages.values())!s.tryWorkspaceByLocator(I)&&!q.isVirtualLocator(I)&&f.some(R=>R(I))&&P.push(I);return P},h=P=>{let I=new Set,R=[],N=(U,W)=>{if(I.has(U.locatorHash))return;let te=!!s.tryWorkspaceByLocator(U);if(!(W>0&&!this.recursive&&te)&&(I.add(U.locatorHash),!s.tryWorkspaceByLocator(U)&&f.some(ie=>ie(U))&&R.push(U),!(W>0&&!this.recursive)))for(let ie of U.dependencies.values()){let Ae=s.storedResolutions.get(ie.descriptorHash);if(!Ae)throw new Error("Assertion failed: The resolution should have been registered");let ce=s.storedPackages.get(Ae);if(!ce)throw new Error("Assertion failed: The package should have been registered");N(ce,W+1)}};for(let U of P)N(U.anchoredPackage,0);return R},E,C;if(this.all&&this.recursive?(E=p(),C="the project"):this.all?(E=h(s.workspaces),C="any workspace"):(E=h([a]),C="this workspace"),c.size>1)throw new nt(`Patterns ${he.prettyList(r,c,he.Type.CODE)} don't match any packages referenced by ${C}`);if(c.size>0)throw new nt(`Pattern ${he.prettyList(r,c,he.Type.CODE)} doesn't match any packages referenced by ${C}`);E=je.sortMap(E,P=>q.stringifyLocator(P));let S=await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async P=>{for(let I of E){let R=I.version??"unknown",N=s.topLevelWorkspace.manifest.ensureDependencyMeta(q.makeDescriptor(I,R));N.unplugged=!0,P.reportInfo(0,`Will unpack ${q.prettyLocator(r,I)} to ${he.pretty(r,zD(I,{configuration:r}),he.Type.PATH)}`),P.reportJson({locator:q.stringifyLocator(I),version:R})}await s.topLevelWorkspace.persistManifest(),this.json||P.reportSeparator()});return S.hasErrors()?S.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};var sg=t=>({cjs:K.join(t.cwd,Er.pnpCjs),data:K.join(t.cwd,Er.pnpData),esmLoader:K.join(t.cwd,Er.pnpEsmLoader)}),Nxe=t=>/\s/.test(t)?JSON.stringify(t):t;async function uTt(t,e,r){let s=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/,n=(e.NODE_OPTIONS??"").replace(s," ").replace(a," ").trim();if(t.configuration.get("nodeLinker")!=="pnp"){e.NODE_OPTIONS=n||void 0;return}let c=sg(t),f=`--require ${Nxe(ue.fromPortablePath(c.cjs))}`;le.existsSync(c.esmLoader)&&(f=`${f} --experimental-loader ${(0,Fxe.pathToFileURL)(ue.fromPortablePath(c.esmLoader)).href}`),le.existsSync(c.cjs)&&(e.NODE_OPTIONS=n?`${f} ${n}`:f)}async function fTt(t,e){let r=sg(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get("pnpUnpluggedFolder"))}var ATt={hooks:{populateYarnPaths:fTt,setupScriptEnvironment:uTt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "pnpm", or "node-modules"',type:"STRING",default:"pnp"},minizip:{description:"Whether Yarn should use minizip to extract archives",type:"BOOLEAN",default:!1},winLinkType:{description:"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.",type:"STRING",values:["junctions","symlinks"],default:"junctions"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:"STRING",default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:"STRING",default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:"STRING",default:[],isArray:!0},pnpZipBackend:{description:"Whether to use the experimental js implementation for the ZipFS",type:"STRING",values:["libzip","js"],default:"libzip"},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:"BOOLEAN",default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:"BOOLEAN",default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:"STRING",default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:"ABSOLUTE_PATH",default:"./.yarn/unplugged"}},linkers:[ig],commands:[Sw]},pTt=ATt;var qxe=et(Uxe());Wt();var tV=et(Ie("crypto")),Gxe=et(Ie("fs")),Wxe=1,Ri="node_modules",lN=".bin",Yxe=".yarn-state.yml",kTt=1e3,rV=(s=>(s.CLASSIC="classic",s.HARDLINKS_LOCAL="hardlinks-local",s.HARDLINKS_GLOBAL="hardlinks-global",s))(rV||{}),XD=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:"NodeModulesLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let s=r.project.tryWorkspaceByLocator(e);if(s)return s.cwd;let a=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await eV(r.project,{unrollAliases:!0}));if(a===null)throw new nt("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let n=a.locatorMap.get(q.stringifyLocator(e));if(!n){let p=new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code="LOCATOR_NOT_INSTALLED",p}let c=n.locations.sort((p,h)=>p.split(K.sep).length-h.split(K.sep).length),f=K.join(r.project.configuration.startingCwd,Ri);return c.find(p=>K.contains(f,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=await je.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await eV(r.project,{unrollAliases:!0}));if(s===null)return null;let{locationRoot:a,segments:n}=cN(K.resolve(e),{skipPrefix:r.project.cwd}),c=s.locationTree.get(a);if(!c)return null;let f=c.locator;for(let p of n){if(c=c.children.get(p),!c)break;f=c.locator||f}return q.parseLocator(f)}makeInstaller(e){return new $Y(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="node-modules"}},$Y=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let s=K.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>"u"&&(a=await QTt(e,r),e.linkType==="HARD"&&this.customData.store.set(e.locatorHash,a)),!q.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,c=new Set;n.has(q.stringifyIdent(e))||n.set(q.stringifyIdent(e),e.reference);let f=e;if(q.isVirtualLocator(e)){f=q.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(q.stringifyIdent(E),null),c.add(q.stringifyIdent(E))}let p={packageLocation:`${ue.fromPortablePath(s)}/`,packageDependencies:n,packagePeers:c,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(f.locatorHash,h),{packageLocation:s,buildRequest:null}}async attachInternalDependencies(e,r){let s=this.localStore.get(e.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected information object to have been registered");for(let[a,n]of r){let c=q.areIdentsEqual(a,n)?n.reference:[q.stringifyIdent(n),n.reference];s.pnpNode.packageDependencies.set(q.stringifyIdent(a),c)}}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let e=new Ao({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),r=await eV(this.opts.project),s=this.opts.project.configuration.get("nmMode");(r===null||s!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:s,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get("nmHoistingLimits");try{P=je.validateEnum(_D,S.manifest.installConfig?.hoistingLimits??P)}catch{let I=q.prettyWorkspace(this.opts.project.configuration,S);this.opts.report.reportWarning(57,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(_D).join(", ")}, using default: "${P}"`)}return[S.relativeCwd,P]})),n=new Map(this.opts.project.workspaces.map(S=>{let P=this.opts.project.configuration.get("nmSelfReferences");return P=S.manifest.installConfig?.selfReferences??P,[S.relativeCwd,P]})),c={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(S,P)=>Array.isArray(P)?{name:P[0],reference:P[1]}:{name:S,reference:P},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(S=>{let P=S.anchoredLocator;return{name:q.stringifyIdent(P),reference:P.reference}}),getPackageInformation:S=>{let P=S.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:q.makeLocator(q.parseIdent(S.name),S.reference),I=this.localStore.get(P.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the package reference to have been registered");return I.pnpNode},findPackageLocator:S=>{let P=this.opts.project.tryWorkspaceByCwd(ue.toPortablePath(S));if(P!==null){let I=P.anchoredLocator;return{name:q.stringifyIdent(I),reference:I.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:S=>ue.fromPortablePath(Ao.resolveVirtual(ue.toPortablePath(S)))},{tree:f,errors:p,preserveSymlinksRequired:h}=UD(c,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!f){for(let{messageName:S,text:P}of p)this.opts.report.reportError(S,P);return}let E=xY(f);await MTt(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async S=>{let P=q.parseLocator(S),I=this.localStore.get(P.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the slot to exist");return I.customPackageData.manifest}});let C=[];for(let[S,P]of E.entries()){if(Jxe(S))continue;let I=q.parseLocator(S),R=this.localStore.get(I.locatorHash);if(typeof R>"u")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=mA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});N&&C.push({buildLocations:P.locations,locator:I,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${he.pretty(this.opts.project.configuration,"--preserve-symlinks",he.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:C}}};async function QTt(t,e){let r=await Ht.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ht,s=new Set(["preinstall","install","postinstall"]);for(let a of r.scripts.keys())s.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:mA.hasBindingGyp(e)}}}async function TTt(t,e,r,s,{installChangedByUser:a}){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will +`,n+=`# cause your node_modules installation to become invalidated. +`,n+=` +`,n+=`__metadata: +`,n+=` version: ${Wxe} +`,n+=` nmMode: ${s.value} +`;let c=Array.from(e.keys()).sort(),f=q.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let C=e.get(E);n+=` +`,n+=`${JSON.stringify(E)}: +`,n+=` locations: +`;for(let S of C.locations){let P=K.contains(t.cwd,S);if(P===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` - ${JSON.stringify(P)} +`}if(C.aliases.length>0){n+=` aliases: +`;for(let S of C.aliases)n+=` - ${JSON.stringify(S)} +`}if(E===f&&r.size>0){n+=` bin: +`;for(let[S,P]of r){let I=K.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` ${JSON.stringify(I)}: +`;for(let[R,N]of P){let U=K.relative(K.join(S,Ri),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(U)} +`}}}}let p=t.cwd,h=K.join(p,Ri,Yxe);a&&await le.removePromise(h),await le.changeFilePromise(h,n,{automaticNewlines:!0})}async function eV(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=K.join(r,Ri,Yxe),a;try{a=await le.statPromise(s)}catch{}if(!a)return null;let n=cs(await le.readFilePromise(s,"utf8"));if(n.__metadata.version>Wxe)return null;let c=n.__metadata.nmMode||"classic",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let C=E.locations.map(P=>K.join(r,P)),S=E.bin;if(S)for(let[P,I]of Object.entries(S)){let R=K.join(r,ue.toPortablePath(P)),N=je.getMapWithDefault(p,R);for(let[U,W]of Object.entries(I))N.set(U,ue.toPortablePath([R,Ri,W].join(K.sep)))}if(f.set(h,{target:vt.dot,linkType:"HARD",locations:C,aliases:E.aliases||[]}),e&&E.aliases)for(let P of E.aliases){let{scope:I,name:R}=q.parseLocator(h),N=q.makeLocator(q.makeIdent(I,R),P),U=q.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:"HARD",locations:C,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:Vxe(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var bw=async(t,e)=>{if(t.split(K.sep).indexOf(Ri)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await le.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await le.unlinkPromise(t);return}let s=await le.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=K.join(t,n.name);n.isDirectory()?(n.name!==Ri||e&&e.innerLoop)&&await bw(c,{innerLoop:!0,contentsOnly:!1}):await le.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await le.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},Hxe=4,cN=(t,{skipPrefix:e})=>{let r=K.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(K.sep).filter(p=>p!==""),a=s.indexOf(Ri),n=s.slice(0,a).join(K.sep),c=K.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},Vxe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&K.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=cN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E{if(process.platform==="win32"&&r==="junctions"){let s;try{s=await le.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await le.symlinkPromise(t,e,"junction");return}}await le.symlinkPromise(K.relative(K.dirname(e),t),e)};async function Kxe(t,e,r){let s=K.join(t,`${tV.default.randomBytes(16).toString("hex")}.tmp`);try{await le.writeFilePromise(s,r);try{await le.linkPromise(s,e)}catch{}}finally{await le.unlinkPromise(s)}}async function RTt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&s&&r.digest){let f=K.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await le.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs{await le.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let C=K.join(e,E),S=await r.readdirPromise(C,{withFileTypes:!0}),P=new Map;for(let I of S){let R=K.join(E,I.name),N,U=K.join(C,I.name);if(I.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=W}}else if(I.isDirectory())N={kind:"directory"};else if(I.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(P.set(R,N),I.isDirectory()&&R!==Ri){let W=await f(R);for(let[te,ie]of W)P.set(te,ie)}}return P},p;if(a.value==="hardlinks-global"&&s&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await le.readFilePromise(E,"utf8"))))}catch{p=await f()}}else p=await f();let h=!1;for(let[E,C]of p){let S=K.join(e,E),P=K.join(t,E);if(C.kind==="directory")await le.mkdirPromise(P,{recursive:!0});else if(C.kind==="file"){let I=C.mtimeMs;await RTt({srcPath:S,dstPath:P,entry:C,nmMode:a,baseFs:r,globalHardlinksStore:s}),C.mtimeMs!==I&&(h=!0)}else C.kind==="symlink"&&await nV(K.resolve(K.dirname(P),C.symlinkTo),P,n)}if(a.value==="hardlinks-global"&&s&&h&&c){let E=K.join(s,c.substring(0,2),`${c.substring(2)}.json`);await le.removePromise(E),await Kxe(s,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function NTt(t,e,r,s){let a=new Map,n=new Map,c=new Map,f=!1,p=(h,E,C,S,P)=>{let I=!0,R=K.join(h,E),N=new Set;if(E===Ri||E.startsWith("@")){let W;try{W=le.statSync(R)}catch{}I=!!W,W?W.mtimeMs>r?(f=!0,N=new Set(le.readdirSync(R))):N=new Set(C.children.get(E).children.keys()):f=!0;let te=e.get(h);if(te){let ie=K.join(h,Ri,lN),Ae;try{Ae=le.statSync(ie)}catch{}if(!Ae)f=!0;else if(Ae.mtimeMs>r){f=!0;let ce=new Set(le.readdirSync(ie)),me=new Map;n.set(h,me);for(let[pe,Be]of te)ce.has(pe)&&me.set(pe,Be)}else n.set(h,te)}}else I=P.has(E);let U=C.children.get(E);if(I){let{linkType:W,locator:te}=U,ie={children:new Map,linkType:W,locator:te};if(S.children.set(E,ie),te){let Ae=je.getSetWithDefault(c,te);Ae.add(R),c.set(te,Ae)}for(let Ae of U.children.keys())p(R,Ae,U,ie,N)}else U.locator&&s.storedBuildState.delete(q.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:C,locator:S}=E,P={children:new Map,linkType:C,locator:S};if(a.set(h,P),S){let I=je.getSetWithDefault(c,E.locator);I.add(h),c.set(E.locator,I)}E.children.has(Ri)&&p(h,Ri,E,P,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:c,installChangedByUser:f}}function Jxe(t){let e=q.parseDescriptor(t);return q.isVirtualDescriptor(e)&&(e=q.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function OTt(t,e,r,{loadManifest:s}){let a=new Map;for(let[f,{locations:p}]of t){let h=Jxe(f)?null:await s(f,p[0]),E=new Map;if(h)for(let[C,S]of h.bin){let P=K.join(p[0],S);S!==""&&le.existsSync(P)&&E.set(C,S)}a.set(f,E)}let n=new Map,c=(f,p,h)=>{let E=new Map,C=K.contains(r,f);if(h.locator&&C!==null){let S=a.get(h.locator);for(let[P,I]of S){let R=K.join(f,ue.toPortablePath(I));E.set(P,R)}for(let[P,I]of h.children){let R=K.join(f,P),N=c(R,R,I);N.size>0&&n.set(f,new Map([...n.get(f)||new Map,...N]))}}else for(let[S,P]of h.children){let I=c(K.join(f,S),p,P);for(let[R,N]of I)E.set(R,N)}return E};for(let[f,p]of e){let h=c(f,f,p);h.size>0&&n.set(f,new Map([...n.get(f)||new Map,...h]))}return n}var jxe=(t,e)=>{if(!t||!e)return t===e;let r=q.parseLocator(t);q.isVirtualLocator(r)&&(r=q.devirtualizeLocator(r));let s=q.parseLocator(e);return q.isVirtualLocator(s)&&(s=q.devirtualizeLocator(s)),q.areLocatorsEqual(r,s)};function iV(t){return K.join(t.get("globalFolder"),"store")}function LTt(t,e){let r=s=>{let a=s.split(K.sep),n=a.lastIndexOf(Ri);if(n<0||n==a.length-1)throw new Error(`Assertion failed. Path is outside of any node_modules package ${s}`);return a.slice(0,n+(a[n+1].startsWith("@")?3:2)).join(K.sep)};for(let s of t.values())for(let[a,n]of s)e.has(r(n))&&s.delete(a)}async function MTt(t,e,{baseFs:r,project:s,report:a,loadManifest:n,realLocatorChecksums:c}){let f=K.join(s.cwd,Ri),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:C}=NTt(t.locationTree,t.binSymlinks,t.mtimeMs,s),S=Vxe(e,{skipPrefix:s.cwd}),P=[],I=async({srcDir:Be,dstDir:Ce,linkType:g,globalHardlinksStore:we,nmMode:ye,windowsLinkType:fe,packageChecksum:se})=>{let X=(async()=>{try{g==="SOFT"?(await le.mkdirPromise(K.dirname(Ce),{recursive:!0}),await nV(K.resolve(Be),Ce,fe)):await FTt(Ce,Be,{baseFs:r,globalHardlinksStore:we,nmMode:ye,windowsLinkType:fe,packageChecksum:se})}catch(De){throw De.message=`While persisting ${Be} -> ${Ce} ${De.message}`,De}finally{ie.tick()}})().then(()=>P.splice(P.indexOf(X),1));P.push(X),P.length>Hxe&&await Promise.race(P)},R=async(Be,Ce,g)=>{let we=(async()=>{let ye=async(fe,se,X)=>{try{X.innerLoop||await le.mkdirPromise(se,{recursive:!0});let De=await le.readdirPromise(fe,{withFileTypes:!0});for(let Re of De){if(!X.innerLoop&&Re.name===lN)continue;let dt=K.join(fe,Re.name),j=K.join(se,Re.name);Re.isDirectory()?(Re.name!==Ri||X&&X.innerLoop)&&(await le.mkdirPromise(j,{recursive:!0}),await ye(dt,j,{...X,innerLoop:!0})):me.value==="hardlinks-local"||me.value==="hardlinks-global"?await le.linkPromise(dt,j):await le.copyFilePromise(dt,j,Gxe.default.constants.COPYFILE_FICLONE)}}catch(De){throw X.innerLoop||(De.message=`While cloning ${fe} -> ${se} ${De.message}`),De}finally{X.innerLoop||ie.tick()}};await ye(Be,Ce,g)})().then(()=>P.splice(P.indexOf(we),1));P.push(we),P.length>Hxe&&await Promise.race(P)},N=async(Be,Ce,g)=>{if(g)for(let[we,ye]of Ce.children){let fe=g.children.get(we);await N(K.join(Be,we),ye,fe)}else{Ce.children.has(Ri)&&await bw(K.join(Be,Ri),{contentsOnly:!1});let we=K.basename(Be)===Ri&&p.has(K.join(K.dirname(Be)));await bw(Be,{contentsOnly:Be===f,isWorkspaceDir:we})}};for(let[Be,Ce]of p){let g=S.get(Be);for(let[we,ye]of Ce.children){if(we===".")continue;let fe=g&&g.children.get(we),se=K.join(Be,we);await N(se,ye,fe)}}let U=async(Be,Ce,g)=>{if(g){jxe(Ce.locator,g.locator)||await bw(Be,{contentsOnly:Ce.linkType==="HARD"});for(let[we,ye]of Ce.children){let fe=g.children.get(we);await U(K.join(Be,we),ye,fe)}}else{Ce.children.has(Ri)&&await bw(K.join(Be,Ri),{contentsOnly:!0});let we=K.basename(Be)===Ri&&S.has(K.join(K.dirname(Be)));await bw(Be,{contentsOnly:Ce.linkType==="HARD",isWorkspaceDir:we})}};for(let[Be,Ce]of S){let g=p.get(Be);for(let[we,ye]of Ce.children){if(we===".")continue;let fe=g&&g.children.get(we);await U(K.join(Be,we),ye,fe)}}let W=new Map,te=[];for(let[Be,Ce]of E)for(let g of Ce){let{locationRoot:we,segments:ye}=cN(g,{skipPrefix:s.cwd}),fe=S.get(we),se=we;if(fe){for(let X of ye)if(se=K.join(se,X),fe=fe.children.get(X),!fe)break;if(fe){let X=jxe(fe.locator,Be),De=e.get(fe.locator),Re=De.target,dt=se,j=De.linkType;if(X)W.has(Re)||W.set(Re,dt);else if(Re!==dt){let rt=q.parseLocator(fe.locator);q.isVirtualLocator(rt)&&(rt=q.devirtualizeLocator(rt)),te.push({srcDir:Re,dstDir:dt,linkType:j,realLocatorHash:rt.locatorHash})}}}}for(let[Be,{locations:Ce}]of e.entries())for(let g of Ce){let{locationRoot:we,segments:ye}=cN(g,{skipPrefix:s.cwd}),fe=p.get(we),se=S.get(we),X=we,De=e.get(Be),Re=q.parseLocator(Be);q.isVirtualLocator(Re)&&(Re=q.devirtualizeLocator(Re));let dt=Re.locatorHash,j=De.target,rt=g;if(j===rt)continue;let Fe=De.linkType;for(let Ne of ye)se=se.children.get(Ne);if(!fe)te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:dt});else for(let Ne of ye)if(X=K.join(X,Ne),fe=fe.children.get(Ne),!fe){te.push({srcDir:j,dstDir:rt,linkType:Fe,realLocatorHash:dt});break}}let ie=ho.progressViaCounter(te.length),Ae=a.reportProgress(ie),ce=s.configuration.get("nmMode"),me={value:ce},pe=s.configuration.get("winLinkType");try{let Be=me.value==="hardlinks-global"?`${iV(s.configuration)}/v1`:null;if(Be&&!await le.existsPromise(Be)){await le.mkdirpPromise(Be);for(let g=0;g<256;g++)await le.mkdirPromise(K.join(Be,g.toString(16).padStart(2,"0")))}for(let g of te)(g.linkType==="SOFT"||!W.has(g.srcDir))&&(W.set(g.srcDir,g.dstDir),await I({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:pe,packageChecksum:c.get(g.realLocatorHash)||null}));await Promise.all(P),P.length=0;for(let g of te){let we=W.get(g.srcDir);g.linkType!=="SOFT"&&g.dstDir!==we&&await R(we,g.dstDir,{nmMode:me})}await Promise.all(P),await le.mkdirPromise(f,{recursive:!0}),LTt(h,new Set(te.map(g=>g.dstDir)));let Ce=await OTt(e,S,s.cwd,{loadManifest:n});await _Tt(h,Ce,s.cwd,pe),await TTt(s,e,Ce,me,{installChangedByUser:C}),ce=="hardlinks-global"&&me.value=="hardlinks-local"&&a.reportWarningOnce(74,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{Ae.stop()}}async function _Tt(t,e,r,s){for(let a of t.keys()){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=K.join(a,Ri,lN);await le.removePromise(n)}}for(let[a,n]of e){if(K.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let c=K.join(a,Ri,lN),f=t.get(a)||new Map;await le.mkdirPromise(c,{recursive:!0});for(let p of f.keys())n.has(p)||(await le.removePromise(K.join(c,p)),process.platform==="win32"&&await le.removePromise(K.join(c,`${p}.cmd`)));for(let[p,h]of n){let E=f.get(p),C=K.join(c,p);E!==h&&(process.platform==="win32"?await(0,qxe.default)(ue.fromPortablePath(h),ue.fromPortablePath(C),{createPwshFile:!1}):(await le.removePromise(C),await nV(h,C,s),K.contains(r,await le.realpathPromise(h))!==null&&await le.chmodPromise(h,493)))}}}Ve();bt();rA();var $D=class extends ig{constructor(){super(...arguments);this.mode="loose"}makeInstaller(r){return new sV(r)}},sV=class extends jm{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(r){let s=new Ao({baseFs:new tA({maxOpenFiles:80,readOnlyArchives:!0})}),a=xxe(r,this.opts.project.cwd,s),{tree:n,errors:c}=UD(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:C,text:S}of c)this.opts.report.reportError(C,S);return}let f=new Map;r.fallbackPool=f;let p=(C,S)=>{let P=q.parseLocator(S.locator),I=q.stringifyIdent(P);I===C?f.set(C,P.reference):f.set(C,[I,P.reference])},h=K.join(this.opts.project.cwd,Er.nodeModules),E=n.get(h);if(!(typeof E>"u")){if("target"in E)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let C of E.dirList){let S=K.join(h,C),P=n.get(S);if(typeof P>"u")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in P)p(C,P);else for(let I of P.dirList){let R=K.join(S,I),N=n.get(R);if(typeof N>"u")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in N)p(`${C}/${I}`,N);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var UTt={hooks:{cleanGlobalArtifacts:async t=>{let e=iV(t);await le.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevents packages to be hoisted past specific levels",type:"STRING",values:["workspaces","dependencies","none"],default:"none"},nmMode:{description:"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.",type:"STRING",values:["classic","hardlinks-local","hardlinks-global"],default:"classic"},nmSelfReferences:{description:"Defines whether the linker should generate self-referencing symlinks for workspaces.",type:"BOOLEAN",default:!0}},linkers:[XD,$D]},HTt=UTt;var oz={};Vt(oz,{NpmHttpFetcher:()=>rb,NpmRemapResolver:()=>nb,NpmSemverFetcher:()=>lh,NpmSemverResolver:()=>ib,NpmTagResolver:()=>sb,default:()=>ZHt,npmConfigUtils:()=>hi,npmHttpUtils:()=>an,npmPublishUtils:()=>B1});Ve();var nke=et(Ai());var oi="npm:";var an={};Vt(an,{AuthType:()=>eke,customPackageError:()=>qm,del:()=>tRt,get:()=>Gm,getIdentUrl:()=>uN,getPackageMetadata:()=>kw,handleInvalidAuthenticationError:()=>og,post:()=>$Tt,put:()=>eRt});Ve();Ve();bt();var cV=et(nS()),Xxe=et(mG()),$xe=et(Ai());var hi={};Vt(hi,{RegistryType:()=>zxe,getAuditRegistry:()=>jTt,getAuthConfiguration:()=>lV,getDefaultRegistry:()=>eb,getPublishRegistry:()=>qTt,getRegistryConfiguration:()=>Zxe,getScopeConfiguration:()=>aV,getScopeRegistry:()=>Pw,normalizeRegistry:()=>zc});var zxe=(s=>(s.AUDIT_REGISTRY="npmAuditRegistry",s.FETCH_REGISTRY="npmRegistryServer",s.PUBLISH_REGISTRY="npmPublishRegistry",s))(zxe||{});function zc(t){return t.replace(/\/$/,"")}function jTt({configuration:t}){return eb({configuration:t,type:"npmAuditRegistry"})}function qTt(t,{configuration:e}){return t.publishConfig?.registry?zc(t.publishConfig.registry):t.name?Pw(t.name.scope,{configuration:e,type:"npmPublishRegistry"}):eb({configuration:e,type:"npmPublishRegistry"})}function Pw(t,{configuration:e,type:r="npmRegistryServer"}){let s=aV(t,{configuration:e});if(s===null)return eb({configuration:e,type:r});let a=s.get(r);return a===null?eb({configuration:e,type:r}):zc(a)}function eb({configuration:t,type:e="npmRegistryServer"}){let r=t.get(e);return zc(r!==null?r:t.get("npmRegistryServer"))}function Zxe(t,{configuration:e}){let r=e.get("npmRegistries"),s=zc(t),a=r.get(s);if(typeof a<"u")return a;let n=r.get(s.replace(/^[a-z]+:/,""));return typeof n<"u"?n:null}var GTt=new Map([["npmRegistryServer","https://npm.jsr.io/"]]);function aV(t,{configuration:e}){if(t===null)return null;let s=e.get("npmScopes").get(t);return s||(t==="jsr"?GTt:null)}function lV(t,{configuration:e,ident:r}){let s=r&&aV(r.scope,{configuration:e});return s?.get("npmAuthIdent")||s?.get("npmAuthToken")?s:Zxe(t,{configuration:e})||e}var eke=(a=>(a[a.NO_AUTH=0]="NO_AUTH",a[a.BEST_EFFORT=1]="BEST_EFFORT",a[a.CONFIGURATION=2]="CONFIGURATION",a[a.ALWAYS_AUTH=3]="ALWAYS_AUTH",a))(eke||{});async function og(t,{attemptedAs:e,registry:r,headers:s,configuration:a}){if(AN(t))throw new Yt(41,"Invalid OTP token");if(t.originalError?.name==="HTTPError"&&t.originalError?.response.statusCode===401)throw new Yt(41,`Invalid authentication (${typeof e!="string"?`as ${await nRt(r,s,{configuration:a})}`:`attempted as ${e}`})`)}function qm(t,e){let r=t.response?.statusCode;return r?r===404?"Package not found":r>=500&&r<600?`The registry appears to be down (using a ${he.applyHyperlink(e,"local cache","https://yarnpkg.com/advanced/lexicon#local-cache")} might have protected you against such outages)`:null:null}function uN(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var tke=new Map,WTt=new Map;async function YTt(t){return await je.getFactoryWithDefault(tke,t,async()=>{let e=null;try{e=await le.readJsonPromise(t)}catch{}return e})}async function VTt(t,e,{configuration:r,cached:s,registry:a,headers:n,version:c,...f}){return await je.getFactoryWithDefault(WTt,t,async()=>await Gm(uN(e),{...f,customErrorMessage:qm,configuration:r,registry:a,ident:e,headers:{...n,"If-None-Match":s?.etag,"If-Modified-Since":s?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(s===null)throw new Error("Assertion failed: cachedMetadata should not be null");return{...h,body:s.metadata}}let E=JTt(JSON.parse(h.body.toString())),C={metadata:E,etag:h.headers.etag,lastModified:h.headers["last-modified"]};return tke.set(t,Promise.resolve(C)),Promise.resolve().then(async()=>{let S=`${t}-${process.pid}.tmp`;await le.mkdirPromise(K.dirname(S),{recursive:!0}),await le.writeJsonPromise(S,C,{compact:!0}),await le.renamePromise(S,t)}).catch(()=>{}),{...h,body:E}}}))}function KTt(t){return t.scope!==null?`@${t.scope}-${t.name}-${t.scope.length}`:t.name}async function kw(t,{cache:e,project:r,registry:s,headers:a,version:n,...c}){let{configuration:f}=r;s=tb(f,{ident:t,registry:s});let p=ZTt(f,s),h=K.join(p,`${KTt(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await YTt(h),E)){if(typeof n<"u"&&typeof E.metadata.versions[n]<"u")return E.metadata;if(f.get("enableOfflineMode")){let C=structuredClone(E.metadata),S=new Set;if(e){for(let I of Object.keys(C.versions)){let R=q.makeLocator(t,`npm:${I}`),N=e.getLocatorMirrorPath(R);(!N||!le.existsSync(N))&&(delete C.versions[I],S.add(I))}let P=C["dist-tags"].latest;if(S.has(P)){let I=Object.keys(E.metadata.versions).sort($xe.default.compare),R=I.indexOf(P);for(;S.has(I[R])&&R>=0;)R-=1;R>=0?C["dist-tags"].latest=I[R]:delete C["dist-tags"].latest}}return C}}return await VTt(h,t,{...c,configuration:f,cached:E,registry:s,headers:a,version:n})}var rke=["name","dist.tarball","bin","scripts","os","cpu","libc","dependencies","dependenciesMeta","optionalDependencies","peerDependencies","peerDependenciesMeta","deprecated"];function JTt(t){return{"dist-tags":t["dist-tags"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,(0,Xxe.default)(r,rke)]))}}var zTt=Nn.makeHash(...rke).slice(0,6);function ZTt(t,e){let r=XTt(t),s=new URL(e);return K.join(r,zTt,s.hostname)}function XTt(t){return K.join(t.get("globalFolder"),"metadata/npm")}async function Gm(t,{configuration:e,headers:r,ident:s,authType:a,registry:n,...c}){n=tb(e,{ident:s,registry:n}),s&&s.scope&&typeof a>"u"&&(a=1);let f=await fN(n,{authType:a,configuration:e,ident:s});f&&(r={...r,authorization:f});try{return await An.get(t.charAt(0)==="/"?`${n}${t}`:t,{configuration:e,headers:r,...c})}catch(p){throw await og(p,{registry:n,configuration:e,headers:r}),p}}async function $Tt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=tb(s,{ident:n,registry:f});let E=await fN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...xw(p)});try{return await An.post(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!AN(C)||p)throw await og(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await uV(C,{configuration:s});let S={...a,...xw(p)};try{return await An.post(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await og(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function eRt(t,e,{attemptedAs:r,configuration:s,headers:a,ident:n,authType:c=3,registry:f,otp:p,...h}){f=tb(s,{ident:n,registry:f});let E=await fN(f,{authType:c,configuration:s,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...xw(p)});try{return await An.put(f+t,e,{configuration:s,headers:a,...h})}catch(C){if(!AN(C))throw await og(C,{attemptedAs:r,registry:f,configuration:s,headers:a}),C;p=await uV(C,{configuration:s});let S={...a,...xw(p)};try{return await An.put(`${f}${t}`,e,{configuration:s,headers:S,...h})}catch(P){throw await og(P,{attemptedAs:r,registry:f,configuration:s,headers:a}),P}}}async function tRt(t,{attemptedAs:e,configuration:r,headers:s,ident:a,authType:n=3,registry:c,otp:f,...p}){c=tb(r,{ident:a,registry:c});let h=await fN(c,{authType:n,configuration:r,ident:a});h&&(s={...s,authorization:h}),f&&(s={...s,...xw(f)});try{return await An.del(c+t,{configuration:r,headers:s,...p})}catch(E){if(!AN(E)||f)throw await og(E,{attemptedAs:e,registry:c,configuration:r,headers:s}),E;f=await uV(E,{configuration:r});let C={...s,...xw(f)};try{return await An.del(`${c}${t}`,{configuration:r,headers:C,...p})}catch(S){throw await og(S,{attemptedAs:e,registry:c,configuration:r,headers:s}),S}}}function tb(t,{ident:e,registry:r}){if(typeof r>"u"&&e)return Pw(e.scope,{configuration:t});if(typeof r!="string")throw new Error("Assertion failed: The registry should be a string");return zc(r)}async function fN(t,{authType:e=2,configuration:r,ident:s}){let a=lV(t,{configuration:r,ident:s}),n=rRt(a,e);if(!n)return null;let c=await r.reduceHook(f=>f.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:s});if(c)return c;if(a.get("npmAuthToken"))return`Bearer ${a.get("npmAuthToken")}`;if(a.get("npmAuthIdent")){let f=a.get("npmAuthIdent");return f.includes(":")?`Basic ${Buffer.from(f).toString("base64")}`:`Basic ${f}`}if(n&&e!==1)throw new Yt(33,"No authentication configured for request");return null}function rRt(t,e){switch(e){case 2:return t.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function nRt(t,e,{configuration:r}){if(typeof e>"u"||typeof e.authorization>"u")return"an anonymous user";try{return(await An.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??"an unknown user"}catch{return"an unknown user"}}async function uV(t,{configuration:e}){let r=t.originalError?.response.headers["npm-notice"];if(r&&(await Ot.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\/\/\S+)/g,he.pretty(e,"$1",he.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\/\/\S+)/i);if(n&&ps.openUrl){let{openNow:c}=await(0,cV.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open this url now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});c&&(await ps.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.")))}}}),process.stdout.write(` +`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:s}=await(0,cV.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(` +`),s}function AN(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function xw(t){return{"npm-otp":t}}var rb=class{supports(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s,params:a}=q.parseRange(e.reference);return!(!nke.default.valid(s)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=q.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Gm(s.__archiveUrl,{customErrorMessage:qm,configuration:r.project.configuration,ident:e});return await gs.convertToZip(a,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}};Ve();var nb=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!q.tryParseDescriptor(e.range.slice(oi.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(q.parseDescriptor(e.range.slice(oi.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error("Unreachable")}};Ve();Ve();var ike=et(Ai());var lh=class t{supports(e,r){if(!e.reference.startsWith(oi))return!1;let s=new URL(e.reference);return!(!ike.default.valid(s.pathname)||s.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Gm(t.getLocatorUrl(e),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}catch{s=await Gm(t.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}return await gs.convertToZip(s,{configuration:r.project.configuration,prefixPath:q.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=Pw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Or.clean(e.reference.slice(oi.length));if(r===null)throw new Yt(10,"The npm semver resolver got selected, but the version isn't semver");return`${uN(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var fV=et(Ai());var pN=q.makeIdent(null,"node-gyp"),iRt=/\b(node-gyp|prebuild-install)\b/,ib=class{supportsDescriptor(e,r){return e.range.startsWith(oi)?!!Or.validRange(e.range.slice(oi.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s}=q.parseRange(e.reference);return!!fV.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Or.validRange(e.range.slice(oi.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);let n=await kw(e,{cache:s.fetchOptions?.cache,project:s.project,version:fV.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Or.SemVer(h);if(a.test(E))return E}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=q.makeLocator(e,`${oi}${h.raw}`),C=n.versions[h.raw].dist.tarball;return lh.isConventionalTarballUrl(E,C,{configuration:s.project.configuration})?E:q.bindLocator(E,{__archiveUrl:C})})}async getSatisfying(e,r,s,a){let n=Or.validRange(e.range.slice(oi.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);return{locators:je.mapAndFilter(s,p=>{if(p.identHash!==e.identHash)return je.mapAndFilter.skip;let h=q.tryParseRange(p.reference,{requireProtocol:oi});if(!h)return je.mapAndFilter.skip;let E=new Or.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:je.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:s}=q.parseRange(e.reference),a=Or.clean(s);if(a===null)throw new Yt(10,"The npm semver resolver got selected, but the version isn't semver");let n=await kw(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,"versions"))throw new Yt(15,'Registry returned invalid data for - missing "versions" field');if(!Object.hasOwn(n.versions,a))throw new Yt(16,`Registry failed to return reference "${a}"`);let c=new Ht;if(c.load(n.versions[a]),!c.dependencies.has(pN.identHash)&&!c.peerDependencies.has(pN.identHash)){for(let f of c.scripts.values())if(f.match(iRt)){c.dependencies.set(pN.identHash,q.makeDescriptor(pN,"latest"));break}}return{...e,version:a,languageName:"node",linkType:"HARD",conditions:c.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(c.dependencies),peerDependencies:c.peerDependencies,dependenciesMeta:c.dependenciesMeta,peerDependenciesMeta:c.peerDependenciesMeta,bin:c.bin}}};Ve();Ve();var ske=et(Ai());var sb=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!Up.test(e.range.slice(oi.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=e.range.slice(oi.length),n=await kw(e,{cache:s.fetchOptions?.cache,project:s.project});if(!Object.hasOwn(n,"dist-tags"))throw new Yt(15,'Registry returned invalid data - missing "dist-tags" field');let c=n["dist-tags"];if(!Object.hasOwn(c,a))throw new Yt(16,`Registry failed to return tag "${a}"`);let f=c[a],p=q.makeLocator(e,`${oi}${f}`),h=n.versions[f].dist.tarball;return lh.isConventionalTarballUrl(p,h,{configuration:s.project.configuration})?[p]:[q.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(e,r,s,a){let n=[];for(let c of s){if(c.identHash!==e.identHash)continue;let f=q.tryParseRange(c.reference,{requireProtocol:oi});if(!(!f||!ske.default.valid(f.selector))){if(f.params?.__archiveUrl){let p=q.makeRange({protocol:oi,selector:f.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(q.makeDescriptor(e,p),r,a);if(c.reference!==h.reference)continue}n.push(c)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error("Unreachable")}};var B1={};Vt(B1,{getGitHead:()=>JHt,getPublishAccess:()=>JNe,getReadmeContent:()=>zNe,makePublishBody:()=>KHt});Ve();Ve();bt();var $V={};Vt($V,{PackCommand:()=>Hw,default:()=>LNt,packUtils:()=>IA});Ve();Ve();Ve();bt();Wt();var IA={};Vt(IA,{genPackList:()=>ON,genPackStream:()=>XV,genPackageManifest:()=>OQe,hasPackScripts:()=>zV,prepareForPack:()=>ZV});Ve();bt();var JV=et(Sa()),FQe=et(kQe()),NQe=Ie("zlib"),DNt=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],bNt=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function zV(t){return!!(In.hasWorkspaceScript(t,"prepack")||In.hasWorkspaceScript(t,"postpack"))}async function ZV(t,{report:e},r){await In.maybeExecuteWorkspaceLifecycleScript(t,"prepack",{report:e});try{let s=K.join(t.cwd,Ht.fileName);await le.existsPromise(s)&&await t.manifest.loadFile(s,{baseFs:le}),await r()}finally{await In.maybeExecuteWorkspaceLifecycleScript(t,"postpack",{report:e})}}async function XV(t,e){typeof e>"u"&&(e=await ON(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(K.normalize(n));for(let n of t.manifest.bin.values())r.add(K.normalize(n));let s=FQe.default.pack();process.nextTick(async()=>{for(let n of e){let c=K.normalize(n),f=K.resolve(t.cwd,c),p=K.join("package",c),h=await le.lstatPromise(f),E={name:p,mtime:new Date(fi.SAFE_TIME*1e3)},C=r.has(c)?493:420,S,P,I=new Promise((N,U)=>{S=N,P=U}),R=N=>{N?P(N):S()};if(h.isFile()){let N;c==="package.json"?N=Buffer.from(JSON.stringify(await OQe(t),null,2)):N=await le.readFilePromise(f),s.entry({...E,mode:C,type:"file"},N,R)}else h.isSymbolicLink()?s.entry({...E,mode:C,type:"symlink",linkname:await le.readlinkPromise(f)},R):R(new Error(`Unsupported file type ${h.mode} for ${ue.fromPortablePath(c)}`));await I}s.finalize()});let a=(0,NQe.createGzip)();return s.pipe(a),a}async function OQe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function ON(t){let e=t.project,r=e.configuration,s={accept:[],reject:[]};for(let C of bNt)s.reject.push(C);for(let C of DNt)s.accept.push(C);s.reject.push(r.get("rcFilename"));let a=C=>{if(C===null||!C.startsWith(`${t.cwd}/`))return;let S=K.relative(t.cwd,C),P=K.resolve(vt.root,S);s.reject.push(P)};a(K.resolve(e.cwd,Er.lockfile)),a(r.get("cacheFolder")),a(r.get("globalFolder")),a(r.get("installStatePath")),a(r.get("virtualFolder")),a(r.get("yarnPath")),await r.triggerHook(C=>C.populateYarnPaths,e,C=>{a(C)});for(let C of e.workspaces){let S=K.relative(t.cwd,C.cwd);S!==""&&!S.match(/^(\.\.)?\//)&&s.reject.push(`/${S}`)}let n={accept:[],reject:[]},c=t.manifest.publishConfig?.main??t.manifest.main,f=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;c!=null&&n.accept.push(K.resolve(vt.root,c)),f!=null&&n.accept.push(K.resolve(vt.root,f)),typeof p=="string"&&n.accept.push(K.resolve(vt.root,p));for(let C of h.values())n.accept.push(K.resolve(vt.root,C));if(p instanceof Map)for(let[C,S]of p.entries())n.accept.push(K.resolve(vt.root,C)),typeof S=="string"&&n.accept.push(K.resolve(vt.root,S));let E=t.manifest.files!==null;if(E){n.reject.push("/*");for(let C of t.manifest.files)LQe(n.accept,C,{cwd:vt.root})}return await PNt(t.cwd,{hasExplicitFileList:E,globalList:s,ignoreList:n})}async function PNt(t,{hasExplicitFileList:e,globalList:r,ignoreList:s}){let a=[],n=new jf(t),c=[[vt.root,[s]]];for(;c.length>0;){let[f,p]=c.pop(),h=await n.lstatPromise(f);if(!TQe(f,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(f),C=!1,S=!1;if(!e||f!==vt.root)for(let R of E)C=C||R===".gitignore",S=S||R===".npmignore";let P=S?await QQe(n,f,".npmignore"):C?await QQe(n,f,".gitignore"):null,I=P!==null?[P].concat(p):p;TQe(f,{globalList:r,ignoreLists:p})&&(I=[...p,{accept:[],reject:["**/*"]}]);for(let R of E)c.push([K.resolve(f,R),I])}else(h.isFile()||h.isSymbolicLink())&&a.push(K.relative(vt.root,f))}return a.sort()}async function QQe(t,e,r){let s={accept:[],reject:[]},a=await t.readFilePromise(K.join(e,r),"utf8");for(let n of a.split(/\n/g))LQe(s.reject,n,{cwd:e});return s}function xNt(t,{cwd:e}){let r=t[0]==="!";return r&&(t=t.slice(1)),t.match(/\.{0,1}\//)&&(t=K.resolve(e,t)),r&&(t=`!${t}`),t}function LQe(t,e,{cwd:r}){let s=e.trim();s===""||s[0]==="#"||t.push(xNt(s,{cwd:r}))}function TQe(t,{globalList:e,ignoreLists:r}){let s=NN(t,e.accept);if(s!==0)return s===2;let a=NN(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let c=NN(t,n.accept);if(c!==0)return c===2;let f=NN(t,n.reject);if(f!==0)return f===1}return!1}function NN(t,e){let r=e,s=[];for(let a=0;a{await ZV(a,{report:p},async()=>{p.reportJson({base:ue.fromPortablePath(a.cwd)});let h=await ON(a);for(let E of h)p.reportInfo(null,ue.fromPortablePath(E)),p.reportJson({location:ue.fromPortablePath(E)});if(!this.dryRun){let E=await XV(a,h);await le.mkdirPromise(K.dirname(c),{recursive:!0});let C=le.createWriteStream(c);E.pipe(C),await new Promise(S=>{C.on("finish",S)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${he.pretty(r,c,he.Type.PATH)}`),p.reportJson({output:ue.fromPortablePath(c)}))})).exitCode()}};function kNt(t,{workspace:e}){let r=t.replace("%s",QNt(e)).replace("%v",TNt(e));return ue.toPortablePath(r)}function QNt(t){return t.manifest.name!==null?q.slugifyIdent(t.manifest.name):"package"}function TNt(t){return t.manifest.version!==null?t.manifest.version:"unknown"}var RNt=["dependencies","devDependencies","peerDependencies"],FNt="workspace:",NNt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of RNt)for(let a of t.manifest.getForScope(s).values()){let n=r.tryWorkspaceByDescriptor(a),c=q.parseRange(a.range);if(c.protocol===FNt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new Yt(21,`${q.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let f;q.areDescriptorsEqual(a,n.anchoredDescriptor)||c.selector==="*"?f=n.manifest.version??"0.0.0":c.selector==="~"||c.selector==="^"?f=`${c.selector}${n.manifest.version??"0.0.0"}`:f=c.selector;let p=s==="dependencies"?q.makeDescriptor(a,"unknown"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?"optionalDependencies":s;e[h][q.stringifyIdent(a)]=f}}},ONt={hooks:{beforeWorkspacePacking:NNt},commands:[Hw]},LNt=ONt;var KNe=et(YQe());Ve();var YNe=et(WNe()),{env:Bt}=process,_Ht="application/vnd.in-toto+json",UHt="https://in-toto.io/Statement/v0.1",HHt="https://in-toto.io/Statement/v1",jHt="https://slsa.dev/provenance/v0.2",qHt="https://slsa.dev/provenance/v1",GHt="https://github.com/actions/runner",WHt="https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1",YHt="https://github.com/npm/cli/gitlab",VHt="v0alpha1",VNe=async(t,e)=>{let r;if(Bt.GITHUB_ACTIONS){if(!Bt.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Yt(91,'Provenance generation in GitHub Actions requires "write" access to the "id-token" permission');let s=(Bt.GITHUB_WORKFLOW_REF||"").replace(`${Bt.GITHUB_REPOSITORY}/`,""),a=s.indexOf("@"),n=s.slice(0,a),c=s.slice(a+1);r={_type:HHt,subject:t,predicateType:qHt,predicate:{buildDefinition:{buildType:WHt,externalParameters:{workflow:{ref:c,repository:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}`,path:n}},internalParameters:{github:{event_name:Bt.GITHUB_EVENT_NAME,repository_id:Bt.GITHUB_REPOSITORY_ID,repository_owner_id:Bt.GITHUB_REPOSITORY_OWNER_ID}},resolvedDependencies:[{uri:`git+${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}@${Bt.GITHUB_REF}`,digest:{gitCommit:Bt.GITHUB_SHA}}]},runDetails:{builder:{id:`${GHt}/${Bt.RUNNER_ENVIRONMENT}`},metadata:{invocationId:`${Bt.GITHUB_SERVER_URL}/${Bt.GITHUB_REPOSITORY}/actions/runs/${Bt.GITHUB_RUN_ID}/attempts/${Bt.GITHUB_RUN_ATTEMPT}`}}}}}else if(Bt.GITLAB_CI){if(!Bt.SIGSTORE_ID_TOKEN)throw new Yt(91,`Provenance generation in GitLab CI requires "SIGSTORE_ID_TOKEN" with "sigstore" audience to be present in "id_tokens". For more info see: +https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:UHt,subject:t,predicateType:jHt,predicate:{buildType:`${YHt}/${VHt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Yt(91,"Provenance generation is only supported in GitHub Actions and GitLab CI");return YNe.attest(Buffer.from(JSON.stringify(r)),_Ht,e)};async function KHt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=q.stringifyIdent(f),E=KNe.default.fromData(e,{algorithms:["sha1","sha512"]}),C=r??JNe(t,f),S=await zNe(t),P=await IA.genPackageManifest(t),I=`${h}-${p}.tgz`,R=new URL(`${zc(a)}/${h}/-/${I}`),N={[I]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,"%40")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await VNe([U]),te=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:te,length:te.length}}return{_id:h,_attachments:N,name:h,access:C,"dist-tags":{[s]:p},versions:{[p]:{...P,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:R.toString()}}},readme:S}}async function JHt(t){try{let{stdout:e}=await Gr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}}function JNe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access=="string"?t.manifest.publishConfig.access:r.get("npmPublishAccess")!==null?r.get("npmPublishAccess"):e.scope?"restricted":"public"}async function zNe(t){let e=ue.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${q.stringifyIdent(r)} +`;try{a=await le.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var sz={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},ZNe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},zHt={configuration:{...sz,...ZNe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...sz,...ZNe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:zc,valueDefinition:{description:"",type:"SHAPE",properties:{...sz}}}},fetchers:[rb,lh],resolvers:[nb,ib,sb]},ZHt=zHt;var gz={};Vt(gz,{NpmAuditCommand:()=>S1,NpmInfoCommand:()=>D1,NpmLoginCommand:()=>b1,NpmLogoutCommand:()=>x1,NpmPublishCommand:()=>k1,NpmTagAddCommand:()=>T1,NpmTagListCommand:()=>Q1,NpmTagRemoveCommand:()=>R1,NpmWhoamiCommand:()=>F1,default:()=>ijt,npmAuditTypes:()=>sP,npmAuditUtils:()=>QL});Ve();Ve();Wt();var fz=et(Sa());Ul();var sP={};Vt(sP,{Environment:()=>nP,Severity:()=>iP});var nP=(s=>(s.All="all",s.Production="production",s.Development="development",s))(nP||{}),iP=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(iP||{});var QL={};Vt(QL,{allSeverities:()=>v1,getPackages:()=>uz,getReportTree:()=>lz,getSeverityInclusions:()=>az,getTopLevelDependencies:()=>cz});Ve();var XNe=et(Ai());var v1=["info","low","moderate","high","critical"];function az(t){if(typeof t>"u")return new Set(v1);let e=v1.indexOf(t),r=v1.slice(e);return new Set(r)}function lz(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,q.parseIdent(s)),children:{ID:typeof n.id<"u"&&{label:"ID",value:he.tuple(he.Type.ID,n.id)},Issue:{label:"Issue",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:he.tuple(he.Type.URL,n.url)},Severity:{label:"Severity",value:he.tuple(he.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(XNe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:"Dependents",children:je.sortMap(n.dependents,c=>q.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function cz(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=["all","production"].includes(s),f=["all","development"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function uz(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(q.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let S=q.stringifyIdent(E),P=je.getMapWithDefault(s,S);je.getArrayWithDefault(P,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var S1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=ge.String("--environment","all",{description:"Which environments to cover",validator:po(nP)});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=ge.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=ge.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:po(iP)});this.excludes=ge.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=ge.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}static{this.paths=[["npm","audit"]]}static{this.usage=ot.Usage({description:"perform a vulnerability audit against the installed packages",details:` + This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths). + + For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`. + + Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${v1.map(r=>`\`${r}\``).join(", ")}. + + If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages. + + If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option. + + If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option. + + To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them. + `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=cz(s,a,{all:this.all,environment:this.environment}),c=uz(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>fz.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=hi.getAuditRegistry({configuration:r}),E,C=await uA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=an.post("/-/npm/v1/security/advisories/bulk",p,{authType:an.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,ie])=>{let Ae=await an.getPackageMetadata(q.parseIdent(te),{project:s});return je.mapAndFilter(ie,ce=>{let{deprecated:me}=Ae.versions[ce];return me?[te,ce,me]:je.mapAndFilter.skip})})),W=await N;for(let[te,ie,Ae]of U.flat(1))Object.hasOwn(W,te)&&W[te].some(ce=>Or.satisfiesWithPrereleases(ie,ce.vulnerable_versions))||(W[te]??=[],W[te].push({id:`${te} (deprecation)`,title:(typeof Ae=="string"?Ae:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ie}));E=W});if(C.hasErrors())return C.exitCode();let S=az(this.severity),P=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(te=>!fz.default.isMatch(`${te.id}`,P)&&S.has(te.severity));W.length>0&&(I[N]=W.map(te=>{let ie=c.get(N);if(typeof ie>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let Ae=[...ie.keys()].filter(me=>Or.satisfiesWithPrereleases(me,te.vulnerable_versions)),ce=new Map;for(let me of Ae)for(let pe of ie.get(me))ce.set(pe.locatorHash,pe);return{...te,versions:Ae,dependents:[...ce.values()]}}))}let R=Object.keys(I).length>0;return R?(Qs.emitTree(lz(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,"No audit suggestions")}),R?1:0)}};Ve();Ve();bt();Wt();var Az=et(Ai()),pz=Ie("util"),D1=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],c=!1,f=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h==="."){let ie=s.topLevelWorkspace;if(!ie.manifest.name)throw new nt(`Missing ${he.pretty(r,"name",he.Type.CODE)} field in ${ue.fromPortablePath(K.join(ie.cwd,Er.manifest))}`);E=q.makeDescriptor(ie.manifest.name,"unknown")}else E=q.parseDescriptor(h);let C=an.getIdentUrl(E),S=hz(await an.get(C,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:an.customPackageError})),P=Object.keys(S.versions).sort(Az.default.compareLoose),R=S["dist-tags"].latest||P[P.length-1],N=Or.validRange(E.range);if(N){let ie=Az.default.maxSatisfying(P,N);ie!==null?R=ie:(p.reportWarning(0,`Unmet range ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0)}else Object.hasOwn(S["dist-tags"],E.range)?R=S["dist-tags"][E.range]:E.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${q.prettyRange(r,E.range)}; falling back to the latest version`),c=!0);let U=S.versions[R],W={...S,...U,version:R,versions:P},te;if(a!==null){te={};for(let ie of a){let Ae=W[ie];if(typeof Ae<"u")te[ie]=Ae;else{p.reportWarning(1,`The ${he.pretty(r,ie,he.Type.CODE)} field doesn't exist inside ${q.prettyIdent(r,E)}'s information`),c=!0;continue}}}else this.json||(delete W.dist,delete W.readme,delete W.users),te=W;p.reportJson(te),this.json||n.push(te)}});pz.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||c)&&this.context.stdout.write(` +`),this.context.stdout.write(`${(0,pz.inspect)(p,{depth:1/0,colors:!0,compact:!1})} +`);return f.exitCode()}};function hz(t){if(Array.isArray(t)){let e=[];for(let r of t)r=hz(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let s=hz(t[r]);s&&(e[r]=s)}return e}else return t||null}Ve();Ve();Wt();var $Ne=et(nS()),b1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}static{this.paths=[["npm","login"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await ejt({configuration:r,registry:s,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),f=await XHt(s,c,r);return await $Ht(s,f,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function TL({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?hi.getScopeRegistry(t,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):t?hi.getScopeRegistry(t,{configuration:r}):e?hi.getPublishRegistry((await eC(r,s)).manifest,{configuration:r}):hi.getDefaultRegistry({configuration:r})}async function XHt(t,e,r){let s=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:an.AuthType.NO_AUTH};try{return(await an.put(s,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let c={...n,authType:an.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},f=await an.get(s,c);for(let[E,C]of Object.entries(f))(!a[E]||E==="roles")&&(a[E]=C);let p=`${s}/-rev/${a._rev}`;return(await an.put(p,a,c)).token}async function $Ht(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function ejt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let c=await(0,$Ne.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ve();Ve();Wt();var P1=new Set(["npmAuthIdent","npmAuthToken"]),x1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=ge.Boolean("-A,--all",!1,{description:"Logout of all registries"})}static{this.paths=[["npm","logout"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=async()=>{let n=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),c=await ze.find(this.context.cwd,this.context.plugins),f=q.makeIdent(this.scope??null,"pkg");return!hi.getAuthConfiguration(n,{configuration:c,ident:f}).get("npmAuthToken")};return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await rjt(),n.reportInfo(0,"Successfully logged out from everything")),this.scope){await eOe("npmScopes",this.scope),await s()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,"Scope authentication settings removed, but some other ones settings still apply to it");return}let c=await TL({configuration:r,cwd:this.context.cwd,publish:this.publish});await eOe("npmRegistries",c),await s()?n.reportInfo(0,`Successfully logged out from ${c}`):n.reportWarning(0,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};function tjt(t,e){let r=t[e];if(!je.isIndexableObject(r))return!1;let s=new Set(Object.keys(r));if([...P1].every(n=>!s.has(n)))return!1;for(let n of P1)s.delete(n);if(s.size===0)return t[e]=void 0,!0;let a={...r};for(let n of P1)delete a[n];return t[e]=a,!0}async function rjt(){let t=e=>{let r=!1,s=je.isIndexableObject(e)?{...e}:{};s.npmAuthToken&&(delete s.npmAuthToken,r=!0);for(let a of Object.keys(s))tjt(s,a)&&(r=!0);if(Object.keys(s).length!==0)return r?s:e};return await ze.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function eOe(t,e){return await ze.updateHomeConfiguration({[t]:r=>{let s=je.isIndexableObject(r)?r:{};if(!Object.hasOwn(s,e))return r;let a=s[e],n=je.isIndexableObject(a)?a:{},c=new Set(Object.keys(n));if([...P1].every(p=>!c.has(p)))return r;for(let p of P1)c.delete(p);if(c.size===0)return Object.keys(s).length===1?void 0:{...s,[e]:void 0};let f={};for(let p of P1)f[p]=void 0;return{...s,[e]:{...n,...f}}}})}Ve();Wt();var k1=class extends ut{constructor(){super(...arguments);this.access=ge.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=ge.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=ge.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=ge.String("--otp",{description:"The OTP token to use with the command"});this.provenance=ge.Boolean("--provenance",!1,{description:"Generate provenance for the package. Only available in GitHub Actions and GitLab CI. Can be set globally through the `npmPublishProvenance` setting or the `YARN_NPM_CONFIG_PROVENANCE` environment variable, or per-package through the `publishConfig.provenance` field in package.json."})}static{this.paths=[["npm","publish"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);if(a.manifest.private)throw new nt("Private workspaces cannot be published");if(a.manifest.name===null||a.manifest.version===null)throw new nt("Workspaces must have valid names and versions to be published on an external registry");await s.restoreInstallState();let n=a.manifest.name,c=a.manifest.version,f=hi.getPublishRegistry(a.manifest,{configuration:r});return(await Ot.start({configuration:r,stdout:this.context.stdout},async h=>{if(this.tolerateRepublish)try{let E=await an.get(an.getIdentUrl(n),{configuration:r,registry:f,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,"versions"))throw new Yt(15,'Registry returned invalid data for - missing "versions" field');if(Object.hasOwn(E.versions,c)){h.reportWarning(0,`Registry already knows about version ${c}; skipping.`);return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await In.maybeExecuteWorkspaceLifecycleScript(a,"prepublish",{report:h}),await IA.prepareForPack(a,{report:h},async()=>{let E=await IA.genPackList(a);for(let N of E)h.reportInfo(null,N);let C=await IA.genPackStream(a,E),S=await je.bufferStream(C),P=await B1.getGitHead(a.cwd),I=!1;a.manifest.publishConfig&&"provenance"in a.manifest.publishConfig?(I=!!a.manifest.publishConfig.provenance,I?h.reportInfo(null,"Generating provenance statement because `publishConfig.provenance` field is set."):h.reportInfo(null,"Skipping provenance statement because `publishConfig.provenance` field is set to false.")):this.provenance?(I=!0,h.reportInfo(null,"Generating provenance statement because `--provenance` flag is set.")):r.get("npmPublishProvenance")&&(I=!0,h.reportInfo(null,"Generating provenance statement because `npmPublishProvenance` setting is set."));let R=await B1.makePublishBody(a,S,{access:this.access,tag:this.tag,registry:f,gitHead:P,provenance:I});await an.put(an.getIdentUrl(n),R,{configuration:r,registry:f,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,"Package archive published")})).exitCode()}};Ve();Wt();var tOe=et(Ai());Ve();bt();Wt();var Q1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String({required:!1})}static{this.paths=[["npm","tag","list"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:` + This command will list all tags of a package from the npm registry. + + If the package is not specified, Yarn will default to the current workspace. + `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=q.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${ue.fromPortablePath(K.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await oP(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:q.makeDescriptor(n,h),locator:q.makeLocator(n,E)})}))};return Qs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function oP(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var T1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:` + This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten. + `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseDescriptor(this.package,!0),c=n.range;if(!tOe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=hi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let P=await oP(n,r);Object.hasOwn(P,this.tag)&&P[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Wt();var R1=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:` + This command will remove a tag from a package from the npm registry. + `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]})}async execute(){if(this.tag==="latest")throw new nt("The 'latest' tag cannot be removed.");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=q.parseIdent(this.package),c=hi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await oP(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async C=>{let S=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),C.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ve();Ve();Wt();var F1=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=hi.getScopeRegistry(this.scope,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=hi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=hi.getPublishRegistry((await eC(r,this.context.cwd)).manifest,{configuration:r}):s=hi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await an.get("/-/whoami",{configuration:r,registry:s,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?q.makeIdent(this.scope,""):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var njt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmPublishProvenance:{description:"Whether to generate provenance for the published packages",type:"BOOLEAN",default:!1},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[S1,D1,b1,x1,k1,T1,Q1,R1,F1]},ijt=njt;var wz={};Vt(wz,{PatchCommand:()=>U1,PatchCommitCommand:()=>_1,PatchFetcher:()=>fP,PatchResolver:()=>AP,default:()=>wjt,patchUtils:()=>hy});Ve();Ve();bt();rA();var hy={};Vt(hy,{applyPatchFile:()=>FL,diffFolders:()=>Iz,ensureUnpatchedDescriptor:()=>dz,ensureUnpatchedLocator:()=>OL,extractPackageToDisk:()=>Ez,extractPatchFlags:()=>lOe,isParentRequired:()=>yz,isPatchDescriptor:()=>NL,isPatchLocator:()=>Tg,loadPatchFiles:()=>uP,makeDescriptor:()=>LL,makeLocator:()=>mz,makePatchHash:()=>Cz,parseDescriptor:()=>lP,parseLocator:()=>cP,parsePatchFile:()=>aP,unpatchDescriptor:()=>Ejt,unpatchLocator:()=>Ijt});Ve();bt();Ve();bt();var sjt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function N1(t){return K.relative(vt.root,K.resolve(vt.root,ue.toPortablePath(t)))}function ojt(t){let e=t.trim().match(sjt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var ajt=420,ljt=493;var rOe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),cjt=t=>({header:ojt(t),parts:[]}),ujt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function fjt(t){let e=[],r=rOe(),s="parsing header",a=null,n=null;function c(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function f(){c(),e.push(r),r=rOe()}for(let p=0;p0?"patch":"mode change",W=null;switch(U){case"rename":{if(!E||!C)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:s,fromPath:N1(E),toPath:N1(C)}),W=C}break;case"file deletion":{let te=a||I;if(!te)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:s,hunk:N&&N[0]||null,path:N1(te),mode:RL(p),hash:S})}break;case"file creation":{let te=n||R;if(!te)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:s,hunk:N&&N[0]||null,path:N1(te),mode:RL(h),hash:P})}break;case"patch":case"mode change":W=R||n;break;default:je.assertNever(U);break}W&&c&&f&&c!==f&&e.push({type:"mode change",semverExclusivity:s,path:N1(W),oldMode:RL(c),newMode:RL(f)}),W&&N&&N.length&&e.push({type:"patch",semverExclusivity:s,path:N1(W),hunks:N,beforeHash:S,afterHash:P})}if(e.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return e}function RL(t){let e=parseInt(t,8)&511;if(e!==ajt&&e!==ljt)throw new Error(`Unexpected file mode string: ${t}`);return e}function aP(t){let e=t.split(/\n/g);return e[e.length-1]===""&&e.pop(),Ajt(fjt(e))}function pjt(t){let e=0,r=0;for(let{type:s,lines:a}of t.parts)switch(s){case"context":r+=a.length,e+=a.length;break;case"deletion":e+=a.length;break;case"insertion":r+=a.length;break;default:je.assertNever(s);break}if(e!==t.header.original.length||r!==t.header.patched.length){let s=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${s(t.header.original.length)} ${s(t.header.patched.length)} @@, got @@ ${s(e)} ${s(r)} @@)`)}}Ve();bt();var O1=class extends Error{constructor(r,s){super(`Cannot apply hunk #${r+1}`);this.hunk=s}};async function L1(t,e,r){let s=await t.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await t.lutimesPromise(e,s.atime,s.mtime)}async function FL(t,{baseFs:e=new Yn,dryRun:r=!1,version:s=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&s!==null&&!Or.satisfiesWithPrereleases(s,a.semverExclusivity)))switch(a.type){case"file deletion":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await L1(e,K.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case"rename":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await L1(e,K.dirname(a.fromPath),async()=>{await L1(e,K.dirname(a.toPath),async()=>{await L1(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case"file creation":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(` +`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":` +`):"";await e.mkdirpPromise(K.dirname(a.path),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,fi.SAFE_TIME,fi.SAFE_TIME)}break;case"patch":await L1(e,a.path,async()=>{await djt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let c=(await e.statPromise(a.path)).mode;if(nOe(a.newMode)!==nOe(c))continue;await L1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function nOe(t){return(t&64)>0}function iOe(t){return t.replace(/\s+$/,"")}function gjt(t,e){return iOe(t)===iOe(e)}async function djt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,"utf8")).split(/\n/),f=[],p=0,h=0;for(let C of t){let S=Math.max(h,C.header.patched.start+p),P=Math.max(0,S-h),I=Math.max(0,c.length-S-C.header.original.length),R=Math.max(P,I),N=0,U=0,W=null;for(;N<=R;){if(N<=P&&(U=S-N,W=sOe(C,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=sOe(C,c,U),W!==null))break;N+=1}if(W===null)throw new O1(t.indexOf(C),C);f.push(W),p+=N,h=U+C.header.original.length}if(s)return;let E=0;for(let C of f)for(let S of C)switch(S.type){case"splice":{let P=S.index+E;c.splice(P,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case"pop":c.pop();break;case"push":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(` +`),{mode:a})}function sOe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let c=e[r];if(c==null||!gjt(c,n))return null;r+=1}a.type==="deletion"&&(s.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case"insertion":s.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:je.assertNever(a.type);break}return s}var yjt=/^builtin<([^>]+)>$/;function M1(t,e){let{protocol:r,source:s,selector:a,params:n}=q.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let c=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],f=n&&typeof n.locator=="string"?q.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function NL(t){return t.range.startsWith("patch:")}function Tg(t){return t.reference.startsWith("patch:")}function lP(t){let{sourceItem:e,...r}=M1(t.range,q.parseDescriptor);return{...r,sourceDescriptor:e}}function cP(t){let{sourceItem:e,...r}=M1(t.reference,q.parseLocator);return{...r,sourceLocator:e}}function Ejt(t){let{sourceItem:e}=M1(t.range,q.parseDescriptor);return e}function Ijt(t){let{sourceItem:e}=M1(t.reference,q.parseLocator);return e}function dz(t){if(!NL(t))return t;let{sourceItem:e}=M1(t.range,q.parseDescriptor);return e}function OL(t){if(!Tg(t))return t;let{sourceItem:e}=M1(t.reference,q.parseLocator);return e}function oOe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:q.stringifyLocator(t)}:{},f=typeof s<"u"?{version:s}:{},p=typeof a<"u"?{hash:a}:{};return q.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...f,...p,...c}})}function LL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return q.makeDescriptor(t,oOe({parentLocator:e,sourceItem:r,patchPaths:s},q.stringifyDescriptor))}function mz(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return q.makeLocator(t,oOe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},q.stringifyLocator))}function aOe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(yjt);return c!==null?s(c[1]):a.startsWith("~/")?r(a.slice(2)):K.isAbsolute(a)?t(a):e(a)}function lOe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function yz(t){return aOe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function uP(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:K.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=lOe(c),p=await aOe({onAbsolute:async h=>await le.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(K.join(a.prefixPath,h),"utf8")},onProject:async h=>await le.readFilePromise(K.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,` +`));return n}async function Ez(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=OL(t),n=r.storedChecksums,c=new Yi,f=await le.mktempPromise(),p=K.join(f,"source"),h=K.join(f,"user"),E=K.join(f,".yarn-patch.json"),C=r.configuration.makeFetcher(),S=[];try{let P,I;if(t.locatorHash===a.locatorHash){let R=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c});S.push(()=>R.releaseFs?.()),P=R,I=R}else P=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>P.releaseFs?.()),I=await C.fetch(t,{cache:e,project:r,fetcher:C,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([le.copyPromise(p,P.prefixPath,{baseFs:P.packageFs}),le.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),le.writeJsonPromise(E,{locator:q.stringifyLocator(t),version:s.version})])}finally{for(let P of S)P()}return le.detachTemp(f),h}async function Iz(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),s=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Gr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH. +The following error was reported by 'git': +${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,"g"),"$1/").replace(new RegExp(je.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(je.escapeRegExp(`${s}/`),"g"),"")}function Cz(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=aP(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Or.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ve();function cOe(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case"context":r.reportInfo(null,` ${he.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var fP=class{supports(e,r){return!!Tg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${q.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:q.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=cP(e),f=await uP(s,c,r),p=await le.mktempPromise(),h=K.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),C=q.getIdentVendorPath(e),S=new hs(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(C,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:P,optional:I}of f){if(P===null)continue;let R=new hs(h,{level:r.project.configuration.get("compressionLevel")}),N=new Sn(K.resolve(vt.root,C),{baseFs:R});try{await FL(aP(P),{baseFs:N,version:n})}catch(U){if(!(U instanceof O1))throw U;let W=r.project.configuration.get("enableInlineHunks"),te=!W&&!I?" (set enableInlineHunks for details)":"",ie=`${q.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,Ae=ce=>{W&&cOe(U.hunk,{configuration:r.project.configuration,report:ce})};if(R.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:Ae});continue}else throw new Yt(66,ie,Ae)}R.saveAndClose()}return new hs(h,{level:r.project.configuration.get("compressionLevel")})}};Ve();var AP=class{supportsDescriptor(e,r){return!!NL(e)}supportsLocator(e,r){return!!Tg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=lP(e);return a.every(n=>!yz(n))?e:q.bindDescriptor(e,{locator:q.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=lP(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=lP(e),c=await uP(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=Cz(c,f.version);return[mz(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=cP(e);return{...await r.resolver.resolve(s,r),...e}}};Ve();bt();Wt();var _1=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}static{this.paths=[["patch-commit"]]}static{this.usage=ot.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=K.resolve(this.context.cwd,ue.toPortablePath(this.patchFolder)),c=K.join(n,"../source"),f=K.join(n,"../.yarn-patch.json");if(!le.existsSync(c))throw new nt("The argument folder didn't get created by 'yarn patch'");let p=await Iz(c,n),h=await le.readJsonPromise(f),E=q.parseLocator(h.locator,!0);if(!s.storedPackages.has(E.locatorHash))throw new nt("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let C=r.get("patchFolder"),S=K.join(C,`${q.slugifyLocator(E)}.patch`);await le.mkdirPromise(C,{recursive:!0}),await le.writeFilePromise(S,p);let P=[],I=new Map;for(let R of s.storedPackages.values()){if(q.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=q.ensureDevirtualizedDescriptor(N),W=dz(U),te=s.storedResolutions.get(W.descriptorHash);if(!te)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!s.storedPackages.get(te))throw new Error("Assertion failed: Expected the package to have been registered");let Ae=s.tryWorkspaceByLocator(R);if(Ae)P.push(Ae);else{let ce=s.originalPackages.get(R.locatorHash);if(!ce)throw new Error("Assertion failed: Expected the original package to have been registered");let me=ce.dependencies.get(N.identHash);if(!me)throw new Error("Assertion failed: Expected the original dependency to have been registered");I.set(me.descriptorHash,me)}}for(let R of P)for(let N of Ht.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let W=LL(U,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});R.manifest[N].set(U.identHash,W)}for(let R of I.values()){let N=LL(R,{parentLocator:null,sourceDescriptor:q.convertLocatorToDescriptor(E),patchPaths:[K.join(Er.home,K.relative(s.cwd,S))]});s.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:q.stringifyIdent(N),description:R.range}},reference:N.range})}await s.persist()}};Ve();bt();Wt();var U1=class extends ut{constructor(){super(...arguments);this.update=ge.Boolean("-u,--update",!1,{description:"Reapply local patches that already apply to this packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String()}static{this.paths=[["patch"]]}static{this.usage=ot.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=q.parseLocator(this.package);if(c.reference==="unknown"){let f=je.mapAndFilter([...s.storedPackages.values()],p=>p.identHash!==c.identHash?je.mapAndFilter.skip:q.isVirtualLocator(p)?je.mapAndFilter.skip:Tg(p)!==this.update?je.mapAndFilter.skip:p);if(f.length===0)throw new nt("No package found in the project for the given locator");if(f.length>1)throw new nt(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why \` to get more information as to who depends on them): +${f.map(p=>` +- ${q.prettyLocator(r,p)}`).join("")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt("No package found in the project for the given locator");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=OL(c),h=await Ez(c,{cache:n,project:s});f.reportJson({locator:q.stringifyLocator(p),path:ue.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${q.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,ue.fromPortablePath(h),"magenta")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var Cjt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[_1,U1],fetchers:[fP],resolvers:[AP]},wjt=Cjt;var Sz={};Vt(Sz,{PnpmLinker:()=>pP,default:()=>Pjt});Ve();bt();Wt();var pP=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new nt(`Couldn't find ${q.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=K.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new Bz(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},Bz=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=ax(le,{indexPath:K.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,s);case"HARD":return this.installPackageHard(e,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,s){let a=K.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?K.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=vjt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,q.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await le.mkdirPromise(n,{recursive:!0}),await le.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=q.isVirtualLocator(e)?q.devirtualizeLocator(e):e,p={manifest:await Ht.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ht,misc:{hasBindingGyp:mA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=mA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!uOe(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await le.mkdirPromise(a,{recursive:!0});let c=await Sjt(a),f=new Map(c),p=[n],h=(C,S)=>{let P=S;uOe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),P=q.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(P.locatorHash);if(typeof I>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${q.stringifyLocator(S)})`);let R=q.stringifyIdent(C),N=K.join(a,R),U=K.relative(K.dirname(N),I.packageLocation),W=f.get(R);f.delete(R),p.push(Promise.resolve().then(async()=>{if(W){if(W.isSymbolicLink()&&await le.readlinkPromise(N)===U)return;await le.removePromise(N)}await le.mkdirpPromise(K.dirname(N)),process.platform=="win32"&&this.opts.project.configuration.get("winLinkType")==="junctions"?await le.symlinkPromise(I.packageLocation,N,"junction"):await le.symlinkPromise(U,N)}))},E=!1;for(let[C,S]of r)C.identHash===e.identHash&&(E=!0),h(C,S);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(q.convertLocatorToDescriptor(e),e),p.push(Djt(a,f)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=fOe(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await le.removePromise(e);else{let r;try{r=new Set(await le.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:s}of this.customData.pathsByLocator.values()){if(!s)continue;let a=K.contains(e,s);if(a===null)continue;let[n]=a.split(K.sep);r.delete(n)}await Promise.all([...r].map(async s=>{await le.removePromise(K.join(e,s))}))}return await this.asyncActions.wait(),await vz(e),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await vz(Bjt(this.opts.project)),{customData:this.customData}}};function Bjt(t){return K.join(t.cwd,Er.nodeModules)}function fOe(t){return t.configuration.get("pnpmStoreFolder")}function vjt(t,{project:e}){let r=q.slugifyLocator(t),s=fOe(e),a=K.join(s,r,"package"),n=K.join(s,r,Er.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function uOe(t,{project:e}){return!q.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Sjt(t){let e=new Map,r=[];try{r=await le.readdirPromise(t,{withFileTypes:!0})}catch(s){if(s.code!=="ENOENT")throw s}try{for(let s of r)if(!s.name.startsWith("."))if(s.name.startsWith("@")){let a=await le.readdirPromise(K.join(t,s.name),{withFileTypes:!0});if(a.length===0)e.set(s.name,s);else for(let n of a)e.set(`${s.name}/${n.name}`,n)}else e.set(s.name,s)}catch(s){if(s.code!=="ENOENT")throw s}return e}async function Djt(t,e){let r=[],s=new Set;for(let a of e.keys()){r.push(le.removePromise(K.join(t,a)));let n=q.tryParseIdent(a)?.scope;n&&s.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...s].map(a=>vz(K.join(t,a)))))}async function vz(t){try{await le.rmdirPromise(t)}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTEMPTY")throw e}}var bjt={configuration:{pnpmStoreFolder:{description:"By default, the store is stored in the 'node_modules/.store' of the project. Sometimes in CI scenario's it is convenient to store this in a different location so it can be cached and reused.",type:"ABSOLUTE_PATH",default:"./node_modules/.store"}},linkers:[pP]},Pjt=bjt;var Tz={};Vt(Tz,{StageCommand:()=>H1,default:()=>_jt,stageUtils:()=>_L});Ve();bt();Wt();Ve();bt();var _L={};Vt(_L,{ActionType:()=>Dz,checkConsensus:()=>ML,expandDirectory:()=>xz,findConsensus:()=>kz,findVcsRoot:()=>bz,genCommitMessage:()=>Qz,getCommitPrefix:()=>AOe,isYarnFile:()=>Pz});bt();var Dz=(n=>(n[n.CREATE=0]="CREATE",n[n.DELETE=1]="DELETE",n[n.ADD=2]="ADD",n[n.REMOVE=3]="REMOVE",n[n.MODIFY=4]="MODIFY",n))(Dz||{});async function bz(t,{marker:e}){do if(!le.existsSync(K.join(t,e)))t=K.dirname(t);else return t;while(t!=="/");return null}function Pz(t,{roots:e,names:r}){if(r.has(K.basename(t)))return!0;do if(!e.has(t))t=K.dirname(t);else return!0;while(t!=="/");return!1}function xz(t){let e=[],r=[t];for(;r.length>0;){let s=r.pop(),a=le.readdirSync(s);for(let n of a){let c=K.resolve(s,n);le.lstatSync(c).isDirectory()?r.push(c):e.push(c)}}return e}function ML(t,e){let r=0,s=0;for(let a of t)a!=="wip"&&(e.test(a)?r+=1:s+=1);return r>=s}function kz(t){let e=ML(t,/^(\w\(\w+\):\s*)?\w+s/),r=ML(t,/^(\w\(\w+\):\s*)?[A-Z]/),s=ML(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:s}}function AOe(t){return t.useComponent?"chore(yarn): ":""}var xjt=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function Qz(t,e){let r=AOe(t),s=[],a=e.slice().sort((n,c)=>n[0]-c[0]);for(;a.length>0;){let[n,c]=a.shift(),f=xjt.get(n);t.useUpperCase&&s.length===0&&(f=`${f[0].toUpperCase()}${f.slice(1)}`),t.useThirdPerson&&(f+="s");let p=[c];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=" (and one other)":p.length>1&&(h+=` (and ${p.length} others)`),s.push(`${f} ${h}`)}return`${r}${s.join(", ")}`}var kjt="Commit generated via `yarn stage`",Qjt=11;async function pOe(t){let{code:e,stdout:r}=await Gr.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?r.trim():null}async function Tjt(t,e){let r=[],s=e.filter(h=>K.basename(h.path)==="package.json");for(let{action:h,path:E}of s){let C=K.relative(t,E);if(h===4){let S=await pOe(t),{stdout:P}=await Gr.execvp("git",["show",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P),R=await Ht.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...I.dependencies,...I.devDependencies]);for(let[W,te]of U){let ie=q.stringifyIdent(te),Ae=N.get(W);Ae?Ae.range!==te.range&&r.push([4,`${ie} to ${Ae.range}`]):r.push([3,ie])}for(let[W,te]of N)U.has(W)||r.push([2,q.stringifyIdent(te)])}else if(h===0){let S=await Ht.fromFile(E);S.name?r.push([0,q.stringifyIdent(S.name)]):r.push([0,"a package"])}else if(h===1){let S=await pOe(t),{stdout:P}=await Gr.execvp("git",["show",`${S}:${C}`],{cwd:t,strict:!0}),I=await Ht.fromText(P);I.name?r.push([1,q.stringifyIdent(I.name)]):r.push([1,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:a,stdout:n}=await Gr.execvp("git",["log",`-${Qjt}`,"--pretty=format:%s"],{cwd:t}),c=a===0?n.split(/\n/g).filter(h=>h!==""):[],f=kz(c);return Qz(f,r)}var Rjt={0:[" A ","?? "],4:[" M "],1:[" D "]},Fjt={0:["A "],4:["M "],1:["D "]},hOe={async findRoot(t){return await bz(t,{marker:".git"})},async filterChanges(t,e,r,s){let{stdout:a}=await Gr.execvp("git",["status","-s"],{cwd:t,strict:!0}),n=a.toString().split(/\n/g),c=s?.staged?Fjt:Rjt;return[].concat(...n.map(p=>{if(p==="")return[];let h=p.slice(0,3),E=K.resolve(t,p.slice(3));if(!s?.staged&&h==="?? "&&p.endsWith("/"))return xz(E).map(C=>({action:0,path:C}));{let S=[0,4,1].find(P=>c[P].includes(h));return S!==void 0?[{action:S,path:E}]:[]}})).filter(p=>Pz(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await Tjt(t,e)},async makeStage(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp("git",["add","--",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let s=e.map(a=>ue.fromPortablePath(a.path));await Gr.execvp("git",["add","-N","--",...s],{cwd:t,strict:!0}),await Gr.execvp("git",["commit","-m",`${r} + +${kjt} +`,"--",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>ue.fromPortablePath(s.path));await Gr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var Njt=[hOe],H1=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=ot.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Tt.find(r,this.context.cwd),{driver:a,root:n}=await Ojt(s.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(C=>C.populateYarnPaths,s,C=>{c.push(C)});let f=new Set;for(let C of c)for(let S of Ljt(n,C))f.add(S);let p=new Set([r.get("rcFilename"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E} +`);else for(let C of h)this.context.stdout.write(`${ue.fromPortablePath(C.path)} +`);else if(this.reset){let C=await a.filterChanges(n,f,p,{staged:!0});C.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,C)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function Ojt(t){let e=null,r=null;for(let s of Njt)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt("No stage driver has been found for your current project");return{driver:e,root:r}}function Ljt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=le.statSync(e)}catch{break}if(s.isSymbolicLink())e=K.resolve(K.dirname(e),le.readlinkSync(e));else break}return r}var Mjt={commands:[H1]},_jt=Mjt;var Rz={};Vt(Rz,{default:()=>Vjt});Ve();Ve();bt();var mOe=et(Ai());Ve();var gOe=et(G9()),Ujt="e8e1bd300d860104bb8c58453ffa1eb4",Hjt="OFCNCOG2CU",dOe=async(t,e)=>{let r=q.stringifyIdent(t),a=jjt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},jjt=t=>(0,gOe.default)(Hjt,Ujt,{requester:{async send(r){try{let s=await An.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var yOe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,qjt=async(t,e,r,s)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(le.existsSync(K.join(t.cwd,"tsconfig.json"))||le.existsSync(K.join(a.cwd,"tsconfig.json")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new Yi};if(!await dOe(r,n))return;let E=yOe(r),C=q.parseRange(r.range).selector;if(!Or.validRange(C)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);C=q.parseRange(U[0].reference).selector}let S=mOe.default.coerce(C);if(S===null)return;let P=`${Xu.Modifier.CARET}${S.major}`,I=q.makeDescriptor(q.makeIdent("types",E),P),R=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let te=[];for(let ie of Ht.allDependencies){let Ae=N.manifest[ie].get(I.identHash);typeof Ae>"u"||te.push([ie,Ae])}return te.length===0?je.mapAndFind.skip:te});if(typeof R<"u")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xu.Target.DEVELOPMENT].set(I.identHash,I)}},Gjt=async(t,e,r)=>{if(r.scope==="types")return;let{project:s}=t,{configuration:a}=s;if(!(a.get("tsEnableAutoTypes")??(le.existsSync(K.join(t.cwd,"tsconfig.json"))||le.existsSync(K.join(s.cwd,"tsconfig.json")))))return;let c=yOe(r),f=q.makeIdent("types",c);for(let p of Ht.allDependencies)typeof t.manifest[p].get(f.identHash)>"u"||t.manifest[p].delete(f.identHash)},Wjt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},Yjt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:qjt,afterWorkspaceDependencyRemoval:Gjt,beforeWorkspacePacking:Wjt}},Vjt=Yjt;var Mz={};Vt(Mz,{VersionApplyCommand:()=>Y1,VersionCheckCommand:()=>V1,VersionCommand:()=>K1,default:()=>A6t,versionUtils:()=>W1});Ve();Ve();Wt();var W1={};Vt(W1,{Decision:()=>q1,applyPrerelease:()=>vOe,applyReleases:()=>Lz,applyStrategy:()=>HL,clearVersionFiles:()=>Fz,getUndecidedDependentWorkspaces:()=>gP,getUndecidedWorkspaces:()=>UL,openVersionFile:()=>G1,requireMoreDecisions:()=>c6t,resolveVersionFiles:()=>hP,suggestStrategy:()=>Oz,updateVersionFiles:()=>Nz,validateReleaseDecision:()=>j1});Ve();bt();Bc();Wt();var BOe=et(wOe()),TA=et(Ai()),l6t=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,q1=(c=>(c.UNDECIDED="undecided",c.DECLINE="decline",c.MAJOR="major",c.MINOR="minor",c.PATCH="patch",c.PRERELEASE="prerelease",c))(q1||{});function j1(t){let e=TA.default.valid(t);return e||je.validateEnum((0,BOe.default)(q1,"UNDECIDED"),t)}async function hP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return r;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,"utf8"),p=cs(f);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let C=q.parseIdent(h),S=t.tryWorkspaceByIdent(C);if(S===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${K.basename(c)} references ${h})`);if(S.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${q.prettyLocator(t.configuration,S.anchoredLocator)})`);let P=S.manifest.raw.stableVersion??S.manifest.version,I=r.get(S),R=HL(P,j1(E));if(R===null)throw new Error(`Assertion failed: Expected ${P} to support being bumped via strategy ${E}`);let N=typeof I<"u"?TA.default.gt(R,I)?R:I:R;r.set(S,N)}}return e&&(r=new Map([...r].map(([n,c])=>[n,vOe(c,{current:n.manifest.version,prerelease:e})]))),r}async function Fz(t){let e=t.configuration.get("deferredVersionFolder");le.existsSync(e)&&await le.removePromise(e)}async function Nz(t,e){let r=new Set(e),s=t.configuration.get("deferredVersionFolder");if(!le.existsSync(s))return;let a=await le.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=K.join(s,n),f=await le.readFilePromise(c,"utf8"),p=cs(f),h=p?.releases;if(h){for(let E of Object.keys(h)){let C=q.parseIdent(E),S=t.tryWorkspaceByIdent(C);(S===null||r.has(S))&&delete p.releases[E]}Object.keys(p.releases).length>0?await le.changeFilePromise(c,il(new il.PreserveOrdering(p))):await le.unlinkPromise(c)}}}async function G1(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new nt("This command can only be run from within a Yarn project");let s=await Qa.fetchRoot(r.projectCwd),a=s!==null?await Qa.fetchBase(s,{baseRefs:r.get("changesetBaseRefs")}):null,n=s!==null?await Qa.fetchChangedFiles(s,{base:a.hash,project:t}):[],c=r.get("deferredVersionFolder"),f=n.filter(P=>K.contains(c,P)!==null);if(f.length>1)throw new nt(`Your current branch contains multiple versioning files; this isn't supported: +- ${f.map(P=>ue.fromPortablePath(P)).join(` +- `)}`);let p=new Set(je.mapAndFilter(n,P=>{let I=t.tryWorkspaceByFilePath(P);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:K.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=le.existsSync(h)?await le.readFilePromise(h,"utf8"):"{}",C=cs(E),S=new Map;for(let P of C.declined||[]){let I=q.parseIdent(P),R=t.getWorkspaceByIdent(I);S.set(R,"decline")}for(let[P,I]of Object.entries(C.releases||{})){let R=q.parseIdent(P),N=t.getWorkspaceByIdent(R);S.set(N,j1(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(P=>P.manifest.version!==null)),releases:S,async saveAll(){let P={},I=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=q.stringifyIdent(N.anchoredLocator),W=S.get(N);W==="decline"?I.push(U):typeof W<"u"?P[U]=j1(W):p.has(N)&&R.push(U)}await le.mkdirPromise(K.dirname(h),{recursive:!0}),await le.changeFilePromise(h,il(new il.PreserveOrdering({releases:Object.keys(P).length>0?P:void 0,declined:I.length>0?I:void 0,undecided:R.length>0?R:void 0})))}}}function c6t(t){return UL(t).size>0||gP(t).length>0}function UL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function gP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c==="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!=="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ht.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function Oz(t,e){let r=TA.default.clean(e);for(let s of Object.values(q1))if(s!=="undecided"&&s!=="decline"&&TA.default.inc(t,s)===r)return s;return null}function HL(t,e){if(TA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!TA.default.valid(t))throw new nt(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=TA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function Lz(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ht.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,TA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?q.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${q.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:ue.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>"u"))for(let[E,C,S]of h){let P=E.manifest[C].get(S);if(typeof P>"u")throw new Error("Assertion failed: The dependency should have existed");let I=P.range,R=!1;if(I.startsWith(Ei.protocol)&&(I=I.slice(Ei.protocol.length),R=!0,I===n.relativeCwd))continue;let N=I.match(l6t);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${q.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;R&&(U=`${Ei.protocol}${U}`);let W=q.makeDescriptor(P,U);E.manifest[C].set(S,W)}}}var u6t=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function vOe(t,{current:e,prerelease:r}){let s=new TA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\./g);for(let p of f){let h=u6t.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(".")}`}var Y1=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=ge.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=ge.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=ge.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=ge.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["version","apply"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:` + This command will apply the deferred version changes and remove their definitions from the repository. + + Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is. + + By default only the current workspace will be bumped, but you can configure this behavior by using one of: + + - \`--recursive\` to also apply the version bump on its dependencies + - \`--all\` to apply the version bump on all packages in the repository + + Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump. + `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await hP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let C=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of C){let P=h.get(S);typeof P<"u"&&E.set(S,P)}}if(E.size===0){let C=h.size>0?" Did you want to add --all?":"";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${C}`);return}Lz(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await Fz(s):await Nz(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();bt();Wt();var jL=et(Ai());var V1=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){iw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(YF(),cY)),{ScrollableItems:s}=await Promise.resolve().then(()=>(zF(),JF)),{FocusRequest:a}=await Promise.resolve().then(()=>(fY(),PPe)),{useListInput:n}=await Promise.resolve().then(()=>(KF(),xPe)),{renderForm:c}=await Promise.resolve().then(()=>(eN(),$F)),{Box:f,Text:p}=await Promise.resolve().then(()=>et(Vc())),{default:h,useCallback:E,useState:C}=await Promise.resolve().then(()=>et(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:P,workspace:I}=await Tt.find(S,this.context.cwd);if(!I)throw new ar(P.cwd,this.context.cwd);await P.restoreInstallState();let R=await G1(P);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new nt("This command can only be run on Git repositories");let N=()=>h.createElement(f,{flexDirection:"row",paddingBottom:1},h.createElement(f,{flexDirection:"column",width:60},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select workspaces.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select release strategies."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to save.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${q.prettyLocator(S,me.anchoredLocator)})`);if(jL.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=["undecided","decline","patch","minor","major"];n(Be,we,{active:pe,minus:"left",plus:"right",set:Ce});let ye=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},jL.default.valid(Be)?Be:jL.default.inc(g,Be)));return h.createElement(f,{flexDirection:"column"},h.createElement(f,null,h.createElement(p,null,q.prettyLocator(S,me.anchoredLocator)," - ",ye)),h.createElement(f,null,we.map(fe=>h.createElement(f,{key:fe,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:fe===Be})," ",fe)))))},W=me=>{let pe=new Set(R.releaseRoots),Be=new Map([...me].filter(([Ce])=>pe.has(Ce)));for(;;){let Ce=gP({project:R.project,releases:Be}),g=!1;if(Ce.length>0){for(let[we]of Ce)if(!pe.has(we)){pe.add(we),g=!0;let ye=me.get(we);typeof ye<"u"&&Be.set(we,ye)}}if(!g)break}return{relevantWorkspaces:pe,relevantReleases:Be}},te=()=>{let[me,pe]=C(()=>new Map(R.releases)),Be=E((Ce,g)=>{let we=new Map(me);g!=="undecided"?we.set(Ce,g):we.delete(Ce);let{relevantReleases:ye}=W(we);pe(ye)},[me,pe]);return[me,Be]},ie=({workspaces:me,releases:pe})=>{let Be=[];Be.push(`${me.size} total`);let Ce=0,g=0;for(let we of me){let ye=pe.get(we);typeof ye>"u"?g+=1:ye!=="decline"&&(Ce+=1)}return Be.push(`${Ce} release${Ce===1?"":"s"}`),Be.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},ce=await c(({useSubmit:me})=>{let[pe,Be]=te();me(pe);let{relevantWorkspaces:Ce}=W(pe),g=new Set([...Ce].filter(se=>!R.releaseRoots.has(se))),[we,ye]=C(0),fe=E(se=>{switch(se){case a.BEFORE:ye(we-1);break;case a.AFTER:ye(we+1);break}},[we,ye]);return h.createElement(f,{flexDirection:"column"},h.createElement(N,null),h.createElement(f,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(f,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(se=>h.createElement(f,{key:se},h.createElement(p,null,h.createElement(p,{color:"grey"},ue.fromPortablePath(R.root)),ue.sep,ue.relative(ue.fromPortablePath(R.root),ue.fromPortablePath(se)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),g.size>3?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:R.releaseRoots,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:"column"},h.createElement(s,{active:we%2===0,radius:1,size:2,onFocusRequest:fe},[...R.releaseRoots].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||"undecided",setDecision:X=>Be(se,X)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(f,{marginTop:1},h.createElement(p,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),h.createElement(f,null,h.createElement(p,null,"(Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move the focus between the workspace groups.)")),g.size>5?h.createElement(f,{marginTop:1},h.createElement(ie,{workspaces:g,releases:pe})):null,h.createElement(f,{marginTop:1,flexDirection:"column"},h.createElement(s,{active:we%2===1,radius:2,size:2,onFocusRequest:fe},[...g].map(se=>h.createElement(U,{key:se.cwd,workspace:se,decision:pe.get(se)||"undecided",setDecision:X=>Be(se,X)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ce>"u")return 1;R.releases.clear();for(let[me,pe]of ce)R.releases.set(me,pe);await R.saveAll()}async executeStandard(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return await s.restoreInstallState(),(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{let f=await G1(s);if(f===null||f.releaseRoots.size===0)return;if(f.root===null)throw new nt("This command can only be run on Git repositories");if(c.reportInfo(0,`Your PR was started right after ${he.pretty(r,f.baseHash.slice(0,7),"yellow")} ${he.pretty(r,f.baseTitle,"magenta")}`),f.changedFiles.size>0){c.reportInfo(0,"You have changed the following files since then:"),c.reportSeparator();for(let S of f.changedFiles)c.reportInfo(null,`${he.pretty(r,ue.fromPortablePath(f.root),"gray")}${ue.sep}${ue.relative(ue.fromPortablePath(f.root),ue.fromPortablePath(S))}`)}let p=!1,h=!1,E=UL(f);if(E.size>0){p||c.reportSeparator();for(let S of E)c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let C=gP(f);for(let[S,P]of C)h||c.reportSeparator(),c.reportError(0,`${q.prettyLocator(r,S.anchoredLocator)} doesn't have a release strategy attached, but depends on ${q.prettyWorkspace(r,P)} which is planned for release.`),h=!0;(p||h)&&(c.reportSeparator(),c.reportInfo(0,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),c.reportInfo(0,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};Ve();Wt();var qL=et(Ai());var K1=class extends ut{constructor(){super(...arguments);this.deferred=ge.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=ge.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=ge.String()}static{this.paths=[["version"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=r.get("preferDeferredVersions");this.deferred&&(n=!0),this.immediate&&(n=!1);let c=qL.default.valid(this.strategy),f=this.strategy==="decline",p;if(c)if(a.manifest.version!==null){let E=Oz(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!f){if(E===null)throw new nt("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof E!="string"||!qL.default.valid(E))throw new nt(`Can't bump the version (${E}) if it's not valid semver`)}p=j1(this.strategy)}if(!n){let C=(await hP(s)).get(a);if(typeof C<"u"&&p!=="decline"){let S=HL(a.manifest.version,p);if(qL.default.lt(S,C))throw new nt(`Can't bump the version to one that would be lower than the current deferred one (${C})`)}}let h=await G1(s,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run(["version","apply"])}};var f6t={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:"ABSOLUTE_PATH",default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:"BOOLEAN",default:!1}},commands:[Y1,V1,K1]},A6t=f6t;var _z={};Vt(_z,{WorkspacesFocusCommand:()=>J1,WorkspacesForeachCommand:()=>Z1,default:()=>g6t});Ve();Ve();Wt();var J1=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=ge.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=ge.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=ge.Rest()}static{this.paths=[["workspaces","focus"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd),n=await Jr.find(r);await s.restoreInstallState({restoreResolutions:!1});let c;if(this.all)c=new Set(s.workspaces);else if(this.workspaces.length===0){if(!a)throw new ar(s.cwd,this.context.cwd);c=new Set([a])}else c=new Set(this.workspaces.map(f=>s.getWorkspaceByIdent(q.parseIdent(f))));for(let f of c)for(let p of this.production?["dependencies"]:Ht.hardDependencies)for(let h of f.manifest.getForScope(p).values()){let E=s.tryWorkspaceByDescriptor(h);E!==null&&c.add(E)}for(let f of s.workspaces)c.has(f)?this.production&&f.manifest.devDependencies.clear():(f.manifest.installConfig=f.manifest.installConfig||{},f.manifest.installConfig.selfReferences=!1,f.manifest.dependencies.clear(),f.manifest.devDependencies.clear(),f.manifest.peerDependencies.clear(),f.manifest.scripts.clear());return await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};Ve();Ve();Ve();Wt();var z1=et(Sa()),DOe=et(Od());Ul();var Z1=class extends ut{constructor(){super(...arguments);this.from=ge.Array("--from",{description:"An array of glob pattern idents or paths from which to base any recursion"});this.all=ge.Boolean("-A,--all",{description:"Run the command on all workspaces of a project"});this.recursive=ge.Boolean("-R,--recursive",{description:"Run the command on the current workspace and all of its recursive dependencies"});this.worktree=ge.Boolean("-W,--worktree",{description:"Run the command on all workspaces of the current worktree"});this.verbose=ge.Counter("-v,--verbose",{description:"Increase level of logging verbosity up to 2 times"});this.parallel=ge.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=ge.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=ge.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:mU([po(["unlimited"]),$2(dU(),[EU(),yU(1)])])});this.topological=ge.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=ge.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=ge.Array("--include",[],{description:"An array of glob pattern idents or paths; only matching workspaces will be traversed"});this.exclude=ge.Array("--exclude",[],{description:"An array of glob pattern idents or paths; matching workspaces won't be traversed"});this.publicOnly=ge.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.dryRun=ge.Boolean("-n,--dry-run",{description:"Print the commands that would be run, without actually running them"});this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["workspaces","foreach"]]}static{this.usage=ot.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. You can also use the `--no-private` flag to avoid running the command in private workspaces.\n\n The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish all packages","yarn workspaces foreach -A --no-private npm publish --tolerate-republish"],["Run the build script on all descendant packages","yarn workspaces foreach -A run build"],["Run the build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -Apt run build"],["Run the build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build"]]})}static{this.schema=[tB("all",Wf.Forbids,["from","recursive","since","worktree"],{missingIf:"undefined"}),IU(["all","recursive","since","worktree"],{missingIf:"undefined"})]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Tt.find(r,this.context.cwd);if(!this.all&&!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),c=n.path.length===1&&n.path[0]==="run"&&typeof n.scriptName<"u"?n.scriptName:null;if(n.path.length===0)throw new nt("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let f=Ce=>{this.dryRun&&this.context.stdout.write(`${Ce} +`)},p=()=>{let Ce=this.from.map(g=>z1.default.matcher(g));return s.workspaces.filter(g=>{let we=q.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ce.some(fe=>fe(we)||fe(ye))})},h=[];if(this.since?(f("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await Qa.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(f("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(f("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(f("Option --all is set; selecting all workspaces"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(` +- ${Ce.relativeCwd} + ${q.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f("")}let E;if(this.recursive?this.since?(f("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(` +- ${Ce.relativeCwd} + ${q.prettyLocator(r,Ce.anchoredLocator)}`);let C=[],S=!1;if(c?.includes(":")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a "${c}" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!z1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.include)&&!z1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(z1.default.isMatch(q.stringifyIdent(Ce.anchoredLocator),this.exclude)||z1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}C.push(Ce)}}if(this.dryRun)return 0;let P=this.verbose??(this.context.stdout.isTTY?1/0:0),I=P>0,R=P>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(ps.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,te=(0,DOe.default)(N),ie=new Map,Ae=new Set,ce=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:ye})=>{if(pe)return-1;!U&&R&&ye>1&&Ce.reportSeparator();let fe=p6t(we,{configuration:r,label:I,commandIndex:ye}),[se,X]=SOe(Ce,{prefix:fe,interlaced:W}),[De,Re]=SOe(Ce,{prefix:fe,interlaced:W});try{R&&Ce.reportInfo(null,`${fe?`${fe} `:""}Process started`);let dt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await X,await Re;let rt=Date.now();if(R){let Fe=r.get("enableTimers")?`, completed in ${he.pretty(r,rt-dt,he.Type.DURATION)}`:"";Ce.reportInfo(null,`${fe?`${fe} `:""}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(dt){throw se.end(),De.end(),await X,await Re,dt}};for(let we of C)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[X,De]of ie){if(Ae.has(De.anchoredDescriptor.descriptorHash))continue;let Re=!0;if(this.topological||this.topologicalDev){let dt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of dt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Re=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Re)break}}if(Re&&(Ae.add(De.anchoredDescriptor.descriptorHash),we.push(te(async()=>{let dt=await g(De,{commandIndex:++ce});return ie.delete(X),Ae.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:dt}})),!U))break}if(we.length===0){let X=Array.from(ie.values()).map(De=>q.prettyLocator(r,De.anchoredLocator)).join(", ");Ce.reportError(3,`Dependency cycle detected (${X})`);return}let ye=await Promise.all(we);ye.forEach(({workspace:X,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${q.prettyLocator(r,X.anchoredLocator)} with exit code ${De}`)});let se=ye.map(X=>X.exitCode).find(X=>X!==0);(this.topological||this.topologicalDev)&&typeof se<"u"&&Ce.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return me!==null?me:Be.exitCode()}};function SOe(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()});let n=new Promise(f=>{s.on("finish",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on("finish",()=>{a.end()}),[c,n]}function p6t(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${q.stringifyIdent(t.anchoredLocator)}]:`,c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[r%c.length];return he.pretty(e,n,f)}var h6t={commands:[J1,Z1]},g6t=h6t;var tC=()=>({modules:new Map([["@yarnpkg/cli",$v],["@yarnpkg/core",Xv],["@yarnpkg/fslib",U2],["@yarnpkg/libzip",Iv],["@yarnpkg/parsers",K2],["@yarnpkg/shell",Dv],["clipanion",oB],["semver",d6t],["typanion",Ia],["@yarnpkg/plugin-essentials",Y5],["@yarnpkg/plugin-compat",Z5],["@yarnpkg/plugin-constraints",g9],["@yarnpkg/plugin-dlx",d9],["@yarnpkg/plugin-exec",E9],["@yarnpkg/plugin-file",C9],["@yarnpkg/plugin-git",W5],["@yarnpkg/plugin-github",v9],["@yarnpkg/plugin-http",S9],["@yarnpkg/plugin-init",D9],["@yarnpkg/plugin-interactive-tools",IY],["@yarnpkg/plugin-jsr",wY],["@yarnpkg/plugin-link",BY],["@yarnpkg/plugin-nm",oV],["@yarnpkg/plugin-npm",oz],["@yarnpkg/plugin-npm-cli",gz],["@yarnpkg/plugin-pack",$V],["@yarnpkg/plugin-patch",wz],["@yarnpkg/plugin-pnp",KY],["@yarnpkg/plugin-pnpm",Sz],["@yarnpkg/plugin-stage",Tz],["@yarnpkg/plugin-typescript",Rz],["@yarnpkg/plugin-version",Mz],["@yarnpkg/plugin-workspace-tools",_z]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-jsr","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"])});function xOe({cwd:t,pluginConfiguration:e}){let r=new wa({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:un??""});return Object.assign(r,{defaultContext:{...wa.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function m6t(t){if(je.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,s=">=18.12.0";if(Or.satisfiesWithPrereleases(r,s))return!0;let a=new nt(`This tool requires a Node version compatible with ${s} (got ${r}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return wa.defaultContext.stdout.write(t.error(a)),!1}async function kOe({selfPath:t,pluginConfiguration:e}){return await ze.find(ue.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function y6t(t,e,{yarnPath:r}){if(!le.existsSync(r))return t.error(new Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on("SIGINT",()=>{});let s={stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1"}};try{(0,bOe.execFileSync)(process.execPath,[ue.fromPortablePath(r),...e],s)}catch(a){return a.status??1}return 0}function E6t(t,e){let r=null,s=e;return e.length>=2&&e[0]==="--cwd"?(r=ue.toPortablePath(e[1]),s=e.slice(2)):e.length>=1&&e[0].startsWith("--cwd=")?(r=ue.toPortablePath(e[0].slice(6)),s=e.slice(1)):e[0]==="add"&&e[e.length-2]==="--cwd"&&(r=ue.toPortablePath(e[e.length-1]),s=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?K.resolve(r):K.cwd(),s}function I6t(t,{configuration:e}){if(!e.get("enableTelemetry")||POe.isCI||!process.stdout.isTTY)return;ze.telemetry=new XI(e,"puba9cdc10ec5790a2cf4969dd413a47270");let s=/^@yarnpkg\/plugin-(.*)$/;for(let a of e.plugins.keys())$I.has(a.match(s)?.[1]??"")&&ze.telemetry?.reportPluginName(a);t.binaryVersion&&ze.telemetry.reportVersion(t.binaryVersion)}function QOe(t,{configuration:e}){for(let r of e.plugins.values())for(let s of r.commands||[])t.register(s)}async function C6t(t,e,{selfPath:r,pluginConfiguration:s}){if(!m6t(t))return 1;let a=await kOe({selfPath:r,pluginConfiguration:s}),n=a.get("yarnPath"),c=a.get("ignorePath");if(n&&!c)return y6t(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let f=E6t(t,e);I6t(t,{configuration:a}),QOe(t,{configuration:a});let p=t.process(f,t.defaultContext);return p.help||ze.telemetry?.reportCommandName(p.path.join(" ")),await t.run(p,t.defaultContext)}async function XCe({cwd:t=K.cwd(),pluginConfiguration:e=tC()}={}){let r=xOe({cwd:t,pluginConfiguration:e}),s=await kOe({pluginConfiguration:e,selfPath:null});return QOe(r,{configuration:s}),r}async function KR(t,{cwd:e=K.cwd(),selfPath:r,pluginConfiguration:s}){let a=xOe({cwd:e,pluginConfiguration:s});function n(){wa.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop. +Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await C6t(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){wa.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off("beforeExit",n),await le.rmtempPromise()}}KR(process.argv.slice(2),{cwd:K.cwd(),selfPath:ue.toPortablePath(ue.resolve(process.argv[1])),pluginConfiguration:tC()});})(); +/** + @license + Copyright (c) 2015, Rebecca Turner + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + */ +/** + @license + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. +*/ +/** + @license + The MIT License (MIT) + + Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ +/** + @license + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +/*! Bundled license information: + +is-number/index.js: + (*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + *) + +to-regex-range/index.js: + (*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + *) + +fill-range/index.js: + (*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + *) + +is-extglob/index.js: + (*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + *) + +is-glob/index.js: + (*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + *) + +queue-microtask/index.js: + (*! queue-microtask. MIT License. Feross Aboukhadijeh *) + +run-parallel/index.js: + (*! run-parallel. MIT License. Feross Aboukhadijeh *) + +git-url-parse/lib/index.js: + (*! + * buildToken + * Builds OAuth token prefix (helper function) + * + * @name buildToken + * @function + * @param {GitUrl} obj The parsed Git url object. + * @return {String} token prefix + *) + +object-assign/index.js: + (* + object-assign + (c) Sindre Sorhus + @license MIT + *) + +react/cjs/react.production.min.js: + (** @license React v17.0.2 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +scheduler/cjs/scheduler.production.min.js: + (** @license React v0.20.2 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +react-reconciler/cjs/react-reconciler.production.min.js: + (** @license React v0.26.2 + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +is-windows/index.js: + (*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + *) +*/ diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index 5c53d4db5856..000000000000 --- a/.yarnrc +++ /dev/null @@ -1,2 +0,0 @@ -save-prefix "" -unsafe-disable-integrity-migration true diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 000000000000..20c2b05a3a32 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,12 @@ +compressionLevel: mixed + +defaultSemverRangePrefix: "" + +enableGlobalCache: true + +nodeLinker: node-modules + +plugins: + - .yarn/plugins/plugin-setup-editor.cjs + +yarnPath: .yarn/releases/yarn-4.9.2.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md index cd23a035e260..0710e1e63b23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,93 +1,1144 @@ -# 2.8.8 +# 3.6.2 + +[diff](https://github.com/prettier/prettier/compare/3.6.1...3.6.2) + +#### Markdown: Add missing blank line around code block ([#17675](https://github.com/prettier/prettier/pull/17675) by [@fisker](https://github.com/fisker)) + + +````md + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List + + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + 1. Another + 2. List + + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List +```` + +# 3.6.1 + +[diff](https://github.com/prettier/prettier/compare/3.6.0...3.6.1) + +#### TypeScript: Allow const without initializer ([#17650](https://github.com/prettier/prettier/pull/17650), [#17654](https://github.com/prettier/prettier/pull/17654) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +export const version: string; + +// Prettier 3.6.0 (--parser=babel-ts) +SyntaxError: Unexpected token (1:21) +> 1 | export const version: string; + | ^ + +// Prettier 3.6.0 (--parser=oxc-ts) +SyntaxError: Missing initializer in const declaration (1:14) +> 1 | export const version: string; + | ^^^^^^^^^^^^^^^ + +// Prettier 3.6.1 +export const version: string; +``` + +#### Miscellaneous: Avoid closing files multiple times ([#17665](https://github.com/prettier/prettier/pull/17665) by [@43081j](https://github.com/43081j)) + +When reading a file to infer the interpreter from a shebang, we use the +`n-readlines` library to read the first line in order to get the shebang. + +This library closes files when it reaches EOF, and we later try close the same +files again. We now close files only if `n-readlines` did not already close +them. + +# 3.6.0 + +[diff](https://github.com/prettier/prettier/compare/3.5.3...3.6.0) + +🔗 [Release Notes](https://prettier.io/blog/2025/06/23/3.6.0) + +# 3.5.3 + +[diff](https://github.com/prettier/prettier/compare/3.5.2...3.5.3) + +#### Flow: Fix missing parentheses in `ConditionalTypeAnnotation` ([#17196](https://github.com/prettier/prettier/pull/17196) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +type T = 'a' | ('b' extends U ? 'c' : empty); +type T = 'a' & ('b' extends U ? 'c' : empty); + +// Prettier 3.5.2 +type T = "a" | "b" extends U ? "c" : empty; +type T = "a" & "b" extends U ? "c" : empty; + +// Prettier 3.5.3 +type T = "a" | ("b" extends U ? "c" : empty); +type T = "a" & ("b" extends U ? "c" : empty); +``` + +# 3.5.2 + +[diff](https://github.com/prettier/prettier/compare/3.5.1...3.5.2) + +#### Remove `module-sync` condition ([#17156](https://github.com/prettier/prettier/pull/17156) by [@fisker](https://github.com/fisker)) + +In Prettier 3.5.0, [we added `module-sync` condition to `package.json`](https://prettier.io/blog/2025/02/09/3.5.0#use-esm-entrypoint-for-requireesm-16958-by-tats-u), so that `require("prettier")` can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove the `module-sync` condition, so `require("prettier")` will still use the CommonJS version, we'll revisit until `require(ESM)` feature is more stable. + +# 3.5.1 + +[diff](https://github.com/prettier/prettier/compare/3.5.0...3.5.1) + +#### Fix CLI crash when cache for old version exists ([#17100](https://github.com/prettier/prettier/pull/17100) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Prettier 3.5 uses a different cache format than previous versions, Prettier 3.5.0 crashes when reading existing cache file, Prettier 3.5.1 fixed the problem. + +#### Support dockercompose and github-actions-workflow in VSCode ([#17101](https://github.com/prettier/prettier/pull/17101) by [@remcohaszing](https://github.com/remcohaszing)) + +Prettier now supports the `dockercompose` and `github-actions-workflow` languages in Visual Studio Code. + +# 3.5.0 + +[diff](https://github.com/prettier/prettier/compare/3.4.2...3.5.0) + +🔗 [Release Notes](https://prettier.io/blog/2025/02/09/3.5.0.html) + +# 3.4.2 + +[diff](https://github.com/prettier/prettier/compare/3.4.1...3.4.2) + +#### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](https://github.com/prettier/prettier/pull/16796) by [@tats-u](https://github.com/tats-u)) + +Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. + + +```md + + +C言 +語 +・ +C++ +・ +Go +・ +Rust + + +C言語・ C++ ・ Go ・ Rust + + +C言語・C++・Go・Rust +``` + +U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). + +#### Fix comments print on class methods with decorators ([#16891](https://github.com/prettier/prettier/pull/16891) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +class A { + @decorator + /** + * The method description + * + */ + async method(foo: Foo, bar: Bar) { + console.log(foo); + } +} + +// Prettier 3.4.1 +class A { + @decorator + async /** + * The method description + * + */ + method(foo: Foo, bar: Bar) { + console.log(foo); + } +} + +// Prettier 3.4.2 +class A { + @decorator + /** + * The method description + * + */ + async method(foo: Foo, bar: Bar) { + console.log(foo); + } +} +``` + +#### Fix non-idempotent formatting ([#16899](https://github.com/prettier/prettier/pull/16899) by [@seiyab](https://github.com/seiyab)) + +This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. + + +```jsx +// Input +
+ foo + longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo + , abc +
; + +// Prettier 3.4.1 (first) +
+ foo + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo + , abc +
; + +// Prettier 3.4.1 (second) +
+ foo + longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo + , abc +
; + +// Prettier 3.4.2 +
+ foo + longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo + , abc +
; +``` + +# 3.4.1 + +[diff](https://github.com/prettier/prettier/compare/3.4.0...3.4.1) + +#### Remove unnecessary parentheses around assignment in `v-on` ([#16887](https://github.com/prettier/prettier/pull/16887) by [@fisker](https://github.com/fisker)) + + +```vue + + + + + + + + +``` + +# 3.4.0 + +[diff](https://github.com/prettier/prettier/compare/3.3.3...3.4.0) + +🔗 [Release Notes](https://prettier.io/blog/2024/11/26/3.4.0.html) + +# 3.3.3 + +[diff](https://github.com/prettier/prettier/compare/3.3.2...3.3.3) + +#### Add parentheses for nullish coalescing in ternary ([#16391](https://github.com/prettier/prettier/pull/16391) by [@cdignam-segment](https://github.com/cdignam-segment)) + +This change adds clarity to operator precedence. + + +```js +// Input +foo ? bar ?? foo : baz; +foo ?? bar ? a : b; +a ? b : foo ?? bar; + +// Prettier 3.3.2 +foo ? bar ?? foo : baz; +foo ?? bar ? a : b; +a ? b : foo ?? bar; + +// Prettier 3.3.3 +foo ? (bar ?? foo) : baz; +(foo ?? bar) ? a : b; +a ? b : (foo ?? bar); +``` + +#### Add parentheses for decorator expressions ([#16458](https://github.com/prettier/prettier/pull/16458) by [@y-schneider](https://github.com/y-schneider)) + +Prevent parentheses around member expressions or tagged template literals from being removed to follow the stricter parsing rules of TypeScript 5.5. + + +```ts +// Input +@(foo`tagged template`) +class X {} + +// Prettier 3.3.2 +@foo`tagged template` +class X {} + +// Prettier 3.3.3 +@(foo`tagged template`) +class X {} +``` + +#### Support `@let` declaration syntax ([#16474](https://github.com/prettier/prettier/pull/16474) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Adds support for Angular v18 `@let` declaration syntax. + +Please see the following code example. The `@let` declaration allows you to define local variables within the template: + + +```html +@let name = 'Frodo'; + +

Dashboard for {{name}}

+Hello, {{name}} +``` + +For more details, please refer to the excellent blog post by the Angular Team: [Introducing @let in Angular](https://blog.angular.dev/introducing-let-in-angular-686f9f383f0f). + +We also appreciate the Angular Team for kindly answering our questions to implement this feature. + +# 3.3.2 + +[diff](https://github.com/prettier/prettier/compare/3.3.1...3.3.2) + +#### Fix handlebars path expressions starts with `@` ([#16358](https://github.com/prettier/prettier/pull/16358) by [@Princeyadav05](https://github.com/Princeyadav05)) + + +```hbs +{{! Input }} +
{{@x.y.z}}
+ +{{! Prettier 3.3.1 }} +
{{@x}}
+ +{{! Prettier 3.3.2 }} +
{{@x.y.z}}
+``` + +# 3.3.1 + +[diff](https://github.com/prettier/prettier/compare/3.3.0...3.3.1) + +#### Preserve empty lines in front matter ([#16347](https://github.com/prettier/prettier/pull/16347) by [@fisker](https://github.com/fisker)) + + +```markdown + +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- +Markdown + + + +--- +foo: + - bar1 + - bar2 + - bar3 +--- + +Markdown + + + +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown +``` + +#### Preserve explicit language in front matter ([#16348](https://github.com/prettier/prettier/pull/16348) by [@fisker](https://github.com/fisker)) + + +```markdown + +---yaml +title: Hello +slug: home +--- + + +--- +title: Hello +slug: home +--- + + +---yaml +title: Hello +slug: home +--- +``` + +#### Avoid line breaks in import attributes ([#16349](https://github.com/prettier/prettier/pull/16349) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" }; + +// Prettier 3.3.0 +import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: + "json" }; + +// Prettier 3.3.1 +import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" }; +``` + +# 3.3.0 + +[diff](https://github.com/prettier/prettier/compare/3.2.5...3.3.0) + +🔗 [Release Notes](https://prettier.io/blog/2024/06/01/3.3.0.html) + +# 3.2.5 + +[diff](https://github.com/prettier/prettier/compare/3.2.4...3.2.5) + +#### Support Angular inline styles as single template literal ([#15968](https://github.com/prettier/prettier/pull/15968) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +[Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles. + + +```ts +// Input +@Component({ + template: `
...
`, + styles: `h1 { color: blue; }`, +}) +export class AppComponent {} + +// Prettier 3.2.4 +@Component({ + template: `
...
`, + styles: `h1 { color: blue; }`, +}) +export class AppComponent {} + +// Prettier 3.2.5 +@Component({ + template: `
...
`, + styles: ` + h1 { + color: blue; + } + `, +}) +export class AppComponent {} + +``` + +#### Unexpected embedded formatting for Angular template ([#15969](https://github.com/prettier/prettier/pull/15969) by [@JounQin](https://github.com/JounQin)) + +Computed template should not be considered as Angular component template + + +```ts +// Input +const template = "foobar"; + +@Component({ + [template]: `

{{ hello }}

`, +}) +export class AppComponent {} + +// Prettier 3.2.4 +const template = "foobar"; + +@Component({ + [template]: `

{{ hello }}

`, +}) +export class AppComponent {} + +// Prettier 3.2.5 +const template = "foobar"; + +@Component({ + [template]: `

{{ hello }}

`, +}) +export class AppComponent {} +``` + +#### Use `"json"` parser for `tsconfig.json` by default ([#16012](https://github.com/prettier/prettier/pull/16012) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +In [v3.2.0](https://prettier.io/blog/2024/01/12/3.2.0#new-jsonc-parser-added-15831httpsgithubcomprettierprettierpull15831-by-fiskerhttpsgithubcomfisker), we introduced `"jsonc"` parser which adds trailing comma **by default**. + +When adding a new parser we also define how it will be used based on the [`linguist-languages`](https://www.npmjs.com/package/linguist-languages) data. + +`tsconfig.json` is a special file used by [TypeScript](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#using-tsconfigjson-or-jsconfigjson), it uses `.json` file extension, but it actually uses the [JSON with Comments](https://code.visualstudio.com/docs/languages/json#_json-with-comments) syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing `.json` file extension. + +We decide to treat it as a JSON file for now to avoid the extra configuration step. + +To keep using the `"jsonc"` parser for your `tsconfig.json` files, add the following to your `.prettierrc` file + +```json +{ + "overrides": [ + { + "files": ["tsconfig.json", "jsconfig.json"], + "options": { + "parser": "jsonc" + } + } + ] +} +``` + + +``` +# Prettier 3.2.4 +prettier --file-info tsconfig.json +{ "ignored": false, "inferredParser": "jsonc" } + +# Prettier 3.2.5 +prettier --file-info tsconfig.json +{ "ignored": false, "inferredParser": "json" } +``` + +# 3.2.4 + +[diff](https://github.com/prettier/prettier/compare/3.2.3...3.2.4) + +#### Fix incorrect parser inference ([#15947](https://github.com/prettier/prettier/pull/15947) by [@fisker](https://github.com/fisker)) + +Files like `.eslintrc.json` were incorrectly formatted as JSONC files. + + +```jsx +// Input +prettier --file-info .eslintrc.json +{ "ignored": false, "inferredParser": "jsonc" } + +// Prettier 3.2.4 +prettier --file-info .eslintrc.json +{ "ignored": false, "inferredParser": "json" } +``` + +# 3.2.3 + +[diff](https://github.com/prettier/prettier/compare/3.2.2...3.2.3) + +#### Throw errors for invalid code ([#15881](https://github.com/prettier/prettier/pull/15881) by [@fisker](https://github.com/fisker), [@Josh-Cena](https://github.com/Josh-Cena), [@auvred](https://github.com/auvred)) + + +```ts +// Input +1++; + +// Prettier 3.2.2 +1++; + +// Prettier 3.2.3 +SyntaxError: Invalid left-hand side expression in unary operation (1:1) +> 1 | 1++; + | ^ +``` + + +```ts +// Input +try {} catch (error = 1){} + +// Prettier 3.2.2 +try { +} catch (error) {} + +// Prettier 3.2.3 +SyntaxError: Catch clause variable cannot have an initializer. (1:23) +> 1 | try {} catch (error = 1){} + | ^ +``` + +#### Fix parser inference ([#15927](https://github.com/prettier/prettier/pull/15927) by [@fisker](https://github.com/fisker)) + + +```console +// Prettier 3.2.2 +prettier --file-info tsconfig.json +{ "ignored": false, "inferredParser": "json" } + +// Prettier 3.2.3 +prettier --file-info tsconfig.json +{ "ignored": false, "inferredParser": "jsonc" } +``` + +# 3.2.2 + +[diff](https://github.com/prettier/prettier/compare/3.2.1...3.2.2) + +#### Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute ([#15896](https://github.com/prettier/prettier/pull/15896) by [@eelco](https://github.com/eelco)) + +For example this code would crash before: + + +```jsx + +``` + +#### Fix formatting error on optional call expression and member chain ([#15920](https://github.com/prettier/prettier/pull/15920) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```jsx +// Input +a(() => {}, c?.d()); -[diff](https://github.com/prettier/prettier/compare/2.8.7...2.8.8) +// Prettier 3.2.1 +TypeError: Cannot read properties of undefined (reading 'type') -#### Allow decorators on private members and class expressions ([#14548](https://github.com/prettier/prettier/pull/14548) by [@fisker](https://github.com/fisker)) +// Prettier 3.2.2 +a(() => {}, c?.d()); +``` + +# 3.2.1 + +[diff](https://github.com/prettier/prettier/compare/3.2.0...3.2.1) + +#### Fix formatting error on member chain ([#15915](https://github.com/prettier/prettier/pull/15915) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```jsx +// Input +test().test2().test2(thing?.something); + +// Prettier 3.2.0 +TypeError: Cannot read properties of undefined (reading 'type') + +// Prettier 3.2.1 +test().test2().test2(thing?.something); + +``` + +# 3.2.0 + +[diff](https://github.com/prettier/prettier/compare/3.1.1...3.2.0) + +🔗 [Release Notes](https://prettier.io/blog/2024/01/12/3.2.0.html) + +# 3.1.1 + +[diff](https://github.com/prettier/prettier/compare/3.1.0...3.1.1) + +#### Fix config file search ([#15363](https://github.com/prettier/prettier/pull/15363) by [@fisker](https://github.com/fisker)) + +Previously, we start search for config files from the filePath as a directory, if it happened to be a directory and contains config file, it will be used by mistake. + +```text +├─ .prettierrc +└─ test.js (A directory) + └─ .prettierrc +``` + +```js +// Prettier 3.1.0 +await prettier.resolveConfigFile(new URL("./test.js", import.meta.url)); +// /test.js/.prettierrc + +// Prettier 3.1.1 +await prettier.resolveConfigFile(new URL("./test.js", import.meta.url)); +// /.prettierrc +``` + +#### Skip explicitly passed symbolic links with `--no-error-on-unmatched-pattern` ([#15533](https://github.com/prettier/prettier/pull/15533) by [@sanmai-NL](https://github.com/sanmai-NL)) + +Since Prettier v3, we stopped following symbolic links, however in some use cases, the symbolic link patterns can't be filtered out, and there is no way to prevent Prettier from throwing errors. + +In Prettier 3.1.1, you can use `--no-error-on-unmatched-pattern` to simply skip symbolic links. + +#### Consistently use tabs in ternaries when `useTabs` is `true` ([#15662](https://github.com/prettier/prettier/pull/15662) by [@auvred](https://github.com/auvred)) + + +```jsx +// Input +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +// Prettier 3.1.0 +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +// Prettier 3.1.1 +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; +``` + +#### Improve config file search ([#15663](https://github.com/prettier/prettier/pull/15663) by [@fisker](https://github.com/fisker)) + +The Prettier config file search performance has been improved by more effective cache strategy. + +#### Fix unstable and ugly formatting for comments in destructuring patterns ([#15708](https://github.com/prettier/prettier/pull/15708) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```tsx +// Input +const { + foo, + // bar + // baz +}: Foo = expr; + +// Prettier 3.1.0 +const { + foo1, +} // bar +// baz +: Foo = expr; + +// Prettier 3.1.0 second output +const { + foo1, // bar +} // baz +: Foo = expr; + +// Prettier 3.1.1 +const { + foo1, + // bar + // baz +}: Foo = expr; +``` + +#### Support "Import Attributes" ([#15718](https://github.com/prettier/prettier/pull/15718) by [@fisker](https://github.com/fisker)) + +[TypeScript 5.3](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/#import-attributes) supports the latest updates to the [import attributes](https://github.com/tc39/proposal-import-attributes) proposal. + +```tsx +import something from "./something.json" with { type: "json" }; +``` + +#### Fix false claim in docs that cursorOffset is incompatible with rangeStart/rangeEnd ([#15750](https://github.com/prettier/prettier/pull/15750) by [@ExplodingCabbage](https://github.com/ExplodingCabbage)) + +The cursorOffset option has in fact been compatible with rangeStart/rangeEnd for over 5 years, thanks to work by @ds300. However, Prettier's documentation (including the CLI `--help` text) continued to claim otherwise, falsely. The documentation is now fixed. + +#### Keep curly braces and `from` keyword in empty `import` statements ([#15756](https://github.com/prettier/prettier/pull/15756) by [@fisker](https://github.com/fisker)) + + +```js +// Input +import { } from 'foo'; +import { /* comment */ } from 'bar'; + +// Prettier 3.1.0 +import {} from "foo"; +import /* comment */ "bar"; + +// Prettier 3.1.1 +import {} from "foo"; +import {} from /* comment */ "bar"; +``` + +#### Keep empty import attributes and assertions ([#15757](https://github.com/prettier/prettier/pull/15757) by [@fisker](https://github.com/fisker)) +```js +// Input +import foo from "foo" with {}; +import bar from "bar" assert {}; + +// Prettier 3.1.0 +import foo from "foo"; +import bar from "bar"; + +// Prettier 3.1.1 +import foo from "foo" with {}; +import bar from "bar" assert {}; +``` + +# 3.1.0 + +[diff](https://github.com/prettier/prettier/compare/3.0.3...3.1.0) + +🔗 [Release Notes](https://prettier.io/blog/2023/11/13/3.1.0.html) + +# 3.0.3 + +[diff](https://github.com/prettier/prettier/compare/3.0.2...3.0.3) + +#### Add `preferUnplugged: true` to `package.json` ([#15169](https://github.com/prettier/prettier/pull/15169) by [@fisker](https://github.com/fisker) and [@so1ve](https://github.com/so1ve)) + +Prettier v3 uses dynamic imports, user [will need to unplug Prettier](https://github.com/yarnpkg/berry/pull/5411#issuecomment-1523502224) when Yarn's PnP mode is enabled, add [`preferUnplugged: true`](https://yarnpkg.com/configuration/manifest#preferUnplugged) to `package.json`, so Yarn will install Prettier as unplug by default. + +#### Support shared config that forbids `require()` ([#15233](https://github.com/prettier/prettier/pull/15233) by [@fisker](https://github.com/fisker)) + +If an external shared config package is used, and the package `exports` don't have `require` or `default` export. + +In Prettier 3.0.2 Prettier fails when attempt to `require()` the package, and throws an error. + +```text +Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /package.json +``` + +#### Allow argument of `require()` to break ([#15256](https://github.com/prettier/prettier/pull/15256) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +const plugin = require( + global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, "..") +); + +// Prettier 3.0.2 +const plugin = require(global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, "..")); + +// Prettier 3.0.3 +const plugin = require( + global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, "..") +); +``` + +#### Do not print trailing commas in arrow function type parameter lists in `ts` code blocks ([#15286](https://github.com/prettier/prettier/pull/15286) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +````md + +```ts +const foo = () => {} +``` + + +```ts +const foo = () => {} +``` + + ```ts +const foo = () => {} +``` +```` + +#### Support TypeScript 5.2 `using` / `await using` declaration ([#15321](https://github.com/prettier/prettier/pull/15321) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Support for the upcoming Explicit Resource Management feature in ECMAScript. [`using` / `await using` declaration](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management) + + +```tsx +{ + using foo = new Foo(); + await using bar = new Bar(); +} +``` + +# 3.0.2 + +[diff](https://github.com/prettier/prettier/compare/3.0.1...3.0.2) + +#### Break after `=` of assignment if RHS is poorly breakable AwaitExpression or YieldExpression ([#15204](https://github.com/prettier/prettier/pull/15204) by [@seiyab](https://github.com/seiyab)) + + +```js // Input -class A { - @decorator() - #privateMethod () {} +const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData); + +// Prettier 3.0.1 +const { section, rubric, authors, tags } = await utils.upsertCommonData( + mainData, +); + +// Prettier 3.0.2 +const { section, rubric, authors, tags } = + await utils.upsertCommonData(mainData); +``` + +#### Do not add trailing comma for grouped scss comments ([#15217](https://github.com/prettier/prettier/pull/15217) by [@auvred](https://github.com/auvred)) + + +```scss +/* Input */ +$foo: ( + 'property': (), + // comment 1 + // comment 2 +) + +/* Prettier 3.0.1 */ +$foo: ( + "property": (), + // comment 1 + // comment 2, +); + +/* Prettier 3.0.2 */ +$foo: ( + "property": (), + // comment 1 + // comment 2 +); +``` + +#### Print `declare` and `export` keywords for nested namespace ([#15249](https://github.com/prettier/prettier/pull/15249) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + + +```tsx +// Input +declare namespace abc1.def {} +export namespace abc2.def {} + +// Prettier 3.0.1 +namespace abc1.def {} +namespace abc2.def {} + +// Prettier 3.0.2 +declare namespace abc1.def {} +export namespace abc2.def {} +``` + +# 3.0.1 + +[diff](https://github.com/prettier/prettier/compare/3.0.0...3.0.1) + +#### Fix cursor positioning for a special case ([#14812](https://github.com/prettier/prettier/pull/14812) by [@fisker](https://github.com/fisker)) + + +```js +// <|> is the cursor position + +/* Input */ +// All messages are represented in JSON. +// So, the prettier.py controls a subprocess which spawns "node {this_file}". +import {<|> } from "fs" + +/* Prettier 3.0.0 */ +// All messages are represented in JSON. +// So, the prettier.py <|>controls a subprocess which spawns "node {this_file}". +import {} from "fs" + +/* Prettier 3.0.1 */ +// All messages are represented in JSON. +// So, the prettier.py controls a subprocess which spawns "node {this_file}". +import {<|>} from "fs" +``` + +#### Fix plugins/estree.d.ts to make it a module ([#15018](https://github.com/prettier/prettier/pull/15018) by [@kingyue737](https://github.com/kingyue737)) + +Add `export {}` in `plugins/estree.d.ts` to fix the "File is not a module" error + +#### Add parenthesis around leading multiline comment in return statement ([#15037](https://github.com/prettier/prettier/pull/15037) by [@auvred](https://github.com/auvred)) + + +```jsx +// Input +function fn() { + return ( + /** + * @type {...} + */ expression + ) } -// Prettier 2.8.7 -SyntaxError: Decorators are not valid here. (2:3) - 1 | class A { -> 2 | @decorator() - | ^^^^^^^^^^^^ - 3 | #privateMethod () {} - 4 | } +// Prettier 3.0.0 +function fn() { + return /** + * @type {...} + */ expression; +} -// Prettier 2.8.8 -class A { - @decorator() - #privateMethod() {} +// Prettier 3.0.1 +function fn() { + return ( + /** + * @type {...} + */ expression + ); } ``` -#### Allow multiple decorators on same getter/setter ([#14584](https://github.com/prettier/prettier/pull/14584) by [@fisker](https://github.com/fisker)) +#### Add support for Vue "Generic Components" ([#15066](https://github.com/prettier/prettier/pull/15066) by [@auvred](https://github.com/auvred)) + +https://blog.vuejs.org/posts/vue-3-3#generic-components -```ts -// Input -class A { - @decorator() - get foo () {} - - @decorator() - set foo (value) {} +```vue + + + + + + + + +``` + +#### Fix comments print in `IfStatement` ([#15076](https://github.com/prettier/prettier/pull/15076) by [@fisker](https://github.com/fisker)) + + +```js +function a(b) { + if (b) return 1; // comment + else return 2; } -// Prettier 2.8.7 -SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3) - 3 | get foo () {} - 4 | -> 5 | @decorator() - | ^^^^^^^^^^^^ - 6 | set foo (value) {} - 7 | } +/* Prettier 3.0.0 */ +Error: Comment "comment" was not printed. Please report this error! -// Prettier 2.8.8 -class A { - @decorator() - get foo() {} +/* Prettier 3.0.1 */ +function a(b) { + if (b) return 1; // comment + else return 2; +} +``` - @decorator() - set foo(value) {} +#### Add missing type definition for `printer.preprocess` ([#15123](https://github.com/prettier/prettier/pull/15123) by [@so1ve](https://github.com/so1ve)) + +```diff +export interface Printer { + // ... ++ preprocess?: ++ | ((ast: T, options: ParserOptions) => T | Promise) ++ | undefined; } ``` -# 2.8.7 +#### Add missing `getVisitorKeys` method type definition for `Printer` ([#15125](https://github.com/prettier/prettier/pull/15125) by [@auvred](https://github.com/auvred)) -[diff](https://github.com/prettier/prettier/compare/2.8.6...2.8.7) +```tsx +const printer: Printer = { + print: () => [], + getVisitorKeys(node, nonTraversableKeys) { + return ["body"]; + }, +}; +``` -#### Allow decorators on private members and class expressions ([#14548](https://github.com/prettier/prettier/pull/14548) by [@fisker](https://github.com/fisker)) +#### Add typing to support `readonly` array properties of AST Node ([#15127](https://github.com/prettier/prettier/pull/15127) by [@auvred](https://github.com/auvred)) -```ts +```tsx // Input -class A { - @decorator() - #privateMethod () {} +interface TestNode { + readonlyArray: readonly string[]; } -// Prettier 2.8.6 -SyntaxError: Decorators are not valid here. (2:3) - 1 | class A { -> 2 | @decorator() - | ^^^^^^^^^^^^ - 3 | #privateMethod () {} - 4 | } +declare const path: AstPath; -// Prettier 2.8.7 -class A { - @decorator() - #privateMethod() {} +path.map(() => "", "readonlyArray"); + +// Prettier 3.0.0 +interface TestNode { + readonlyArray: readonly string[]; +} + +declare const path: AstPath; + +path.map(() => "", "readonlyArray"); +// ^ Argument of type '"readonlyArray"' is not assignable to parameter of type '"regularArray"'. ts(2345) + +// Prettier 3.0.1 +interface TestNode { + readonlyArray: readonly string[]; +} + +declare const path: AstPath; + +path.map(() => "", "readonlyArray"); +``` + +#### Add space before unary minus followed by a function call ([#15129](https://github.com/prettier/prettier/pull/15129) by [@pamelalozano](https://github.com/pamelalozano)) + + +```less +// Input +div { + margin: - func(); +} + +// Prettier 3.0.0 +div { + margin: -func(); +} + +// Prettier 3.0.1 +div { + margin: - func(); } ``` +# 3.0.0 + +[diff](https://github.com/prettier/prettier/compare/3.0.0-alpha.6...3.0.0) + +🔗 [Release Notes](https://prettier.io/blog/2023/07/05/3.0.0.html) + +# 2.8.8 + +This version is a republished version of v2.8.7. +A bad version was accidentally published and [it can't be unpublished](https://github.com/npm/cli/issues/1686), apologies for the churn. + +# 2.8.7 + +[diff](https://github.com/prettier/prettier/compare/2.8.6...2.8.7) + #### Allow multiple decorators on same getter/setter ([#14584](https://github.com/prettier/prettier/pull/14584) by [@fisker](https://github.com/fisker)) @@ -749,7 +1800,7 @@ Error: Comment "comment" was not printed. Please report this error! ``` -#### Fix formatting for comments inside JSX attribute ([#14082](https://github.com/prettier/prettier/pull/14082) with by [@fisker](https://github.com/fisker)) +#### Fix formatting for comments inside JSX attribute ([#14082](https://github.com/prettier/prettier/pull/14082) by [@fisker](https://github.com/fisker)) ```jsx @@ -1009,7 +2060,7 @@ prettier --loglevel silent --help no-color Fixes two problems when bundling our UMD files with webpack: -- A error `` "`....__exportStar` is not a function" `` throws when running the bundles. +- A error ``"`....__exportStar` is not a function"`` throws when running the bundles. - Some files cause warning about `"Critical dependency: the request of a dependency is an expression"`. #### Fix non-idempotent formatting of function calls with complex type arguments ([#12508](https://github.com/prettier/prettier/pull/12508) by [@sosukesuzuki](https://github.com/sosukesuzuki)) @@ -1275,7 +2326,7 @@ interface Foo { abc
. #### Fix broken format for `...infer T` ([#9044](https://github.com/prettier/prettier/pull/9044) by [@fisker](https://github.com/fisker)) -```typescript +```ts // Input type Tail = T extends [infer U, ...infer R] ? R : never; @@ -2253,7 +3304,7 @@ export const getVehicleDescriptor = async ( - Config: Match dotfiles in config overrides ([#6194] by [@duailibe]) - When using [`overrides`](https://prettier.io/docs/en/configuration.html#configuration-overrides) in the config file, Prettier was not matching dotfiles (files that start with `.`). This was fixed in 1.18.1 + When using [`overrides`](https://prettier.io/docs/configuration#configuration-overrides) in the config file, Prettier was not matching dotfiles (files that start with `.`). This was fixed in 1.18.1 [#6190]: https://github.com/prettier/prettier/pull/6190 [#6194]: https://github.com/prettier/prettier/pull/6194 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index fcc9da5eaece..000000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery and unwelcome sexual attention or - advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic - address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at prettier-contact@googlegroups.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67cb416c25b8..9f059ba6bec6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,12 +9,12 @@ yarn test ## Tests -The tests use [Jest snapshots](https://facebook.github.io/jest/docs/en/snapshot-testing.html). You can make changes and run `jest -u` (or `yarn test -u`) to update the snapshots. Then run `git diff` to take a look at what changed. Always update the snapshots when opening a PR. +The tests use [Jest snapshots](https://jestjs.io/docs/snapshot-testing). You can make changes and run `jest -u` (or `yarn test -u`) to update the snapshots. Then run `git diff` to take a look at what changed. Always update the snapshots when opening a PR. -Each test directory in `tests/format` has a `jsfmt.spec.js` file that controls how exactly the rest of the files in the directory are used for tests. This file must contain one or more calls to the `run_spec` global function. For example, in directories with JavaScript formatting tests, `jsfmt.spec.js` generally looks like this: +Each test directory in `tests/format` has a `format.test.js` file that controls how exactly the rest of the files in the directory are used for tests. This file must contain one or more calls to the `runFormatTest` global function. For example, in directories with JavaScript formatting tests, `format.test.js` generally looks like this: ```js -run_spec(__dirname, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"]); ``` This verifies that for each file in the directory, the output matches the snapshot and is the same for each listed parser. @@ -22,17 +22,17 @@ This verifies that for each file in the directory, the output matches the snapsh You can also pass options as the third argument: ```js -run_spec(__dirname, ["babel"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["babel"], { trailingComma: "es5" }); ``` Signature: ```ts -function run_spec( +function runFormatTest( fixtures: - | string + | ImportMeta | { - dirname: string; + importMeta: ImportMeta; snippets?: Array< | string | { code: string; name?: string; filename?: string; output?: string } @@ -41,32 +41,38 @@ function run_spec( parsers: string[], options?: PrettierOptions & { errors: true | { [parserName: string]: true | string[] }; - } + }, ): void; ``` Parameters: -- **`fixtures`**: Must be set to `__dirname` or to an object of the shape `{ dirname: __dirname, ... }`. The object may have the `snippets` property to specify an array of extra input entries in addition to the files in the current directory. For each input entry (a file or a snippet), `run_spec` configures and runs a number of tests. The main check is that for a given input the output should match the snapshot (for snippets, the expected output can also be specified directly). [Additional checks](#deeper-testing) are controlled by options and environment variables. -- **`parsers`**: A list of parser names. The tests verify that the parsers in this list produce the same output. If the list includes `typescript`, then `babel-ts` is included implicitly. If the list includes `babel`, and the current directory is inside `tests/format/js`, then `acorn`, `espree`, and `meriyah` are included implicitly. +- **`fixtures`**: Must be set to `import.meta` or to an object of the shape `{ importMeta: import.meta, ... }`. The object may have the `snippets` property to specify an array of extra input entries in addition to the files in the current directory. For each input entry (a file or a snippet), `runFormatTest` configures and runs a number of tests. The main check is that for a given input the output should match the snapshot (for snippets, the expected output can also be specified directly). [Additional checks](#deeper-testing) are controlled by options and environment variables. +- **`parsers`**: A list of parser names. The tests verify that the parsers in this list produce the same output. If the list includes `typescript`, then `babel-ts`, and `oxc-ts` are included implicitly. If the list includes `flow`, then `hermes` and `babel-flow` is included implicitly. If the list includes `babel`, and the current directory is inside `tests/format/js` or `tests/format/jsx`, then `acorn`, `espree`, `meriyah`, and `oxc` are included implicitly. - **`options`**: In addition to Prettier's formatting options, can contain the `errors` property to specify that it's expected that the formatting shouldn't be successful and an error should be thrown for all (`errors: true`) or some combinations of input entries and parsers. -The implementation of `run_spec` can be found in [`tests/config/format-test.js`](tests/config/format-test.js). +The implementation of `runFormatTest` can be found in [`tests/config/run-format-test.js`](tests/config/run-format-test.js). -`tests/format/flow-repo/` contains the Flow test suite and is not supposed to be edited by hand. To update it, clone the Flow repo next to the Prettier repo and run: `node scripts/sync-flow-tests.js ../flow/tests/`. +`tests/format/flow-repo/` contains the Flow test suite and is not supposed to be edited by hand. To update it, clone the Flow repo next to the Prettier repo and run: `node scripts/sync-flow-tests.cjs ../flow/tests/`. ## Debugging To debug Prettier locally, you can either debug it in Node (recommended) or the browser. -- The easiest way to debug it in Node is to create a local test file with some example code you want formatted and either run it in an editor like VS Code or run it directly via `./bin/prettier.js `. +- The easiest way to debug it in Node is to create a local test file with some example code you want formatted and either run it in an editor like VS Code or run it directly via `yarn debug `. - The easiest way to debug it in the browser is to build Prettier's website locally (see [`website/README.md`](website/README.md)). -## Other +## No New Options + +Prettier is an opinionated formatter and is not accepting pull requests that add new formatting options. You can [read more about our options philosophy here](docs/option-philosophy.md). + +## Pull requests The project uses ESLint for linting and Prettier for formatting. If your editor isn't set up to work with them, you can lint and format all files from the command line using `yarn fix`. -After opening a PR, describe your changes in a file in the `changelog_unreleased` directory following the template [`changelog_unreleased/TEMPLATE.md`](changelog_unreleased/TEMPLATE.md) and commit this file to your PR. You can use `./scripts/generate-changelog.mjs` to create changelog file. Please see comments of the script file for usage. +After opening a PR, describe your changes in a file in the `changelog_unreleased` directory following the template [`changelog_unreleased/TEMPLATE.md`](changelog_unreleased/TEMPLATE.md) and commit this file to your PR. You can use `yarn gen:changelog` to generate a changelog file. Please see comments of the script file for usage. + +## Other Take a look at [`commands.md`](commands.md) and, if you know Haskell, check out [Wadler's paper](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf) to understand how Prettier works. @@ -79,13 +85,13 @@ If you want to know more about Prettier's GitHub labels, see the [Issue Labels]( If you're contributing a performance improvement, the following Prettier CLI options can help: - `--debug-repeat N` uses a naïve loop to repeat the formatting `N` times and measures the average run duration. It can be useful to highlight hot functions in the profiler. This can also set by environment variable `PRETTIER_PERF_REPEAT`. -- `--debug-benchmark` uses [`benchmark`](https://npm.im/benchmark) module to produce statistically significant duration measurements. +- `--debug-benchmark` uses [`tinybench`](https://www.npmjs.com/package/tinybench) module to produce statistically significant duration measurements. -For convenience, the following commands for profiling are available via `package.json` `scripts`. +For convenience, the following commands for profiling are available via [`package.json`](package.json) `scripts`. - `PRETTIER_PERF_REPEAT=1000 yarn perf ` starts the naïve loop. See the CLI output for when the measurements finish, and stop profiling at that moment. - `PRETTIER_PERF_REPEAT=1000 yarn perf:inspect ` starts the naïve loop with `node --inspect-brk` flag that pauses execution and waits for Chromium/Chrome/Node Inspector to attach. Open [`chrome://inspect`](chrome://inspect), select the process to inspect, and activate the CPU Profiler, this will unpause execution. See the CLI output for when the measurements finish, and stop the CPU Profiler at that moment to avoid collecting more data than needed. -- `yarn perf:benchmark ` starts the `benchmark`-powered measurements. See the CLI output for when the measurements finish. +- `yarn perf:benchmark ` starts the measurements. See the CLI output for when the measurements finish. In the above commands: @@ -95,7 +101,7 @@ In the above commands: In addition to the options above, you can use [`node --prof` and `node --prof-process`](https://nodejs.org/en/docs/guides/simple-profiling/), as well as `node --trace-opt --trace-deopt`, to get more advanced performance insights. -The script `scripts/benchmark/compare.sh` can be used to compare performance of two or more commits/branches using [hyperfine](https://github.com/sharkdp/hyperfine). Usage (don't forget to install hyperfine): +The script [`scripts/benchmark/compare.sh`](scripts/benchmark/compare.sh) can be used to compare performance of two or more commits/branches using [hyperfine](https://github.com/sharkdp/hyperfine). Usage (don't forget to install hyperfine): ```sh PRETTIER_PERF_FILENAME=my.js ./compare.sh main some-pr-branch diff --git a/FUNDING.json b/FUNDING.json new file mode 100644 index 000000000000..3d839c352aa6 --- /dev/null +++ b/FUNDING.json @@ -0,0 +1,7 @@ +{ + "drips": { + "ethereum": { + "ownedBy": "0x3A39F5E9BFe0a90e394982492e166C5635893141" + } + } +} diff --git a/README.md b/README.md index 4076b3ad5fd3..2297b58e4243 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Prettier Banner](https://unpkg.com/prettier-logo@1.0.3/images/prettier-banner-light.svg) +[![Prettier Banner](https://unpkg.com/prettier-logo@1.0.3/images/prettier-banner-light.svg)](https://prettier.io)

Opinionated Code Formatter

@@ -30,32 +30,28 @@
- + Your favorite language?

- - Github Actions Build Status - - Github Actions Build Status - - Github Actions Build Status + + CI Status - Codecov Coverage Status - + Coverage Status + Blazing Fast
npm version weekly downloads from npm - + code style: prettier - - Follow Prettier on Twitter + + Follow Prettier on X

## Intro @@ -76,21 +72,20 @@ foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), - isThereSeriouslyAnotherOne() + isThereSeriouslyAnotherOne(), ); ``` -Prettier can be run [in your editor](https://prettier.io/docs/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again! +Prettier can be run [in your editor](https://prettier.io/docs/editors) on-save, in a [pre-commit hook](https://prettier.io/docs/precommit), or in [CI environments](https://prettier.io/docs/cli#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again! --- -**[Documentation](https://prettier.io/docs/en/)** +**[Documentation](https://prettier.io/docs/)** - -[Install](https://prettier.io/docs/en/install.html) · -[Options](https://prettier.io/docs/en/options.html) · -[CLI](https://prettier.io/docs/en/cli.html) · -[API](https://prettier.io/docs/en/api.html) +[Install](https://prettier.io/docs/install) · +[Options](https://prettier.io/docs/options) · +[CLI](https://prettier.io/docs/cli) · +[API](https://prettier.io/docs/api) **[Playground](https://prettier.io/playground/)** diff --git a/bin/prettier.cjs b/bin/prettier.cjs new file mode 100755 index 000000000000..ea9a01c01074 --- /dev/null +++ b/bin/prettier.cjs @@ -0,0 +1,36 @@ +#!/usr/bin/env node + +"use strict"; + +var nodeModule = require("module"); + +if (typeof nodeModule.enableCompileCache === "function") { + nodeModule.enableCompileCache(); +} + +var pleaseUpgradeNode = require("please-upgrade-node"); +var packageJson = require("../package.json"); + +pleaseUpgradeNode(packageJson); + +var dynamicImport = new Function("module", "return import(module)"); + +var promise; +var index = process.argv.indexOf("--experimental-cli"); +if (process.env.PRETTIER_EXPERIMENTAL_CLI || index !== -1) { + if (index !== -1) { + process.argv.splice(index, 1); + } + promise = dynamicImport("../src/experimental-cli/index.js").then( + function (cli) { + return cli.__promise; + } + ); +} else { + promise = dynamicImport("../src/cli/index.js").then(function runCli(cli) { + return cli.run(); + }); +} + +// Exposed for test +module.exports.__promise = promise; diff --git a/bin/prettier.js b/bin/prettier.js index 0e1f3fc3c34a..6661acca08db 100755 --- a/bin/prettier.js +++ b/bin/prettier.js @@ -1,12 +1,10 @@ #!/usr/bin/env node -"use strict"; +/* +Add this file so we can use `node bin/prettier` or `node bin/prettier.js` +instead of `node bin/prettier.cjs`. -var pleaseUpgradeNode = require("please-upgrade-node"); -var packageJson = require("../package.json"); +This file should only used for development. +*/ -pleaseUpgradeNode(packageJson); - -var cli = require("../src/cli/index.js"); - -module.exports = cli.run(process.argv.slice(2)); +import "./prettier.cjs"; diff --git a/changelog_unreleased/BLOG_POST_INTRO_TEMPLATE.md b/changelog_unreleased/BLOG_POST_INTRO_TEMPLATE.md index 726b44873a4c..6f24ec0bbec7 100644 --- a/changelog_unreleased/BLOG_POST_INTRO_TEMPLATE.md +++ b/changelog_unreleased/BLOG_POST_INTRO_TEMPLATE.md @@ -1,6 +1,5 @@ --- -author: "🚧" -authorURL: "https://github.com/🚧" +authors: "🚧" title: "Prettier 🚧" --- diff --git a/changelog_unreleased/markdown/17675.md b/changelog_unreleased/markdown/17675.md new file mode 100644 index 000000000000..4b2c38693fd3 --- /dev/null +++ b/changelog_unreleased/markdown/17675.md @@ -0,0 +1,36 @@ +#### Add missing blank line around code block (#17675 by @fisker) + + +````md + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List + + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + 1. Another + 2. List + + +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List +```` diff --git a/tests/integration/cli/cache/dir/.gitkeep b/changelog_unreleased/mjml/.gitkeep similarity index 100% rename from tests/integration/cli/cache/dir/.gitkeep rename to changelog_unreleased/mjml/.gitkeep diff --git a/changelog_unreleased/typescript/14548.md b/changelog_unreleased/typescript/14548.md deleted file mode 100644 index 82262a8462ea..000000000000 --- a/changelog_unreleased/typescript/14548.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Allow decorators on private members and class expressions (#14548 by @fisker) - - -```ts -// Input -class A { - @decorator() - #privateMethod () {} -} - -// Prettier stable -SyntaxError: Decorators are not valid here. (2:3) - 1 | class A { -> 2 | @decorator() - | ^^^^^^^^^^^^ - 3 | #privateMethod () {} - 4 | } - -// Prettier main -class A { - @decorator() - #privateMethod() {} -} -``` diff --git a/changelog_unreleased/typescript/14584.md b/changelog_unreleased/typescript/14584.md deleted file mode 100644 index 70cf954691dd..000000000000 --- a/changelog_unreleased/typescript/14584.md +++ /dev/null @@ -1,31 +0,0 @@ -#### Allow multiple decorators on same getter/setter (#14584 by @fisker) - - -```ts -// Input -class A { - @decorator() - get foo () {} - - @decorator() - set foo (value) {} -} - -// Prettier stable -SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3) - 3 | get foo () {} - 4 | -> 5 | @decorator() - | ^^^^^^^^^^^^ - 6 | set foo (value) {} - 7 | } - -// Prettier main -class A { - @decorator() - get foo() {} - - @decorator() - set foo(value) {} -} -``` diff --git a/commands.md b/commands.md index b1bc31ed0689..f42ab0831436 100644 --- a/commands.md +++ b/commands.md @@ -1,4 +1,4 @@ -The core of the algorithm is implemented in `src/document/doc-{printer,builders,utils}.js`. The printer uses the basic formatting abstractions provided to construct a format when printing a node. +The core of the algorithm is implemented in `src/document/{printer,builders,utils}.js`. The printer uses the basic formatting abstractions provided to construct a format when printing a node. ## Prettier's intermediate representation: `Doc` @@ -24,7 +24,7 @@ declare function group(doc: Doc, options?: GroupOptions): Doc; Mark a group of items which the printer should try to fit on one line. This is the basic command to tell the printer when to break. Groups are usually nested, and the printer will try to fit everything on one line, but if it doesn't fit it will break the outermost group first and try again. It will continue breaking groups until everything fits (or there are no more groups to break). -A group is forced to break if it's created with the `shouldBreak` option set to `true` or if it includes [`breakParent`](#breakParent). A [hard](#hardline) and [literal](#literalline) line breaks automatically include this so they always break parent groups. Breaks are propagated to all parent groups, so if a deeply nested expression has a hard break, everything will break. This only matters for "hard" breaks, i.e. newlines that are printed no matter what and can be statically analyzed. +A group is forced to break if it's created with the `shouldBreak` option set to `true` or if it includes [`breakParent`](#breakparent). A [hard](#hardline) and [literal](#literalline) line breaks automatically include this so they always break parent groups. Breaks are propagated to all parent groups, so if a deeply nested expression has a hard break, everything will break. This only matters for "hard" breaks, i.e. newlines that are printed no matter what and can be statically analyzed. For example, an array will try to fit on one line: @@ -46,7 +46,7 @@ However, if any of the items inside the array have a hard break, the array will Functions always break after the opening curly brace no matter what, so the array breaks as well for consistent formatting. See [the implementation of `ArrayExpression`](#example) for an example. -The `id` option can be used in [`ifBreak`](#ifBreak) checks. +The `id` option can be used in [`ifBreak`](#ifbreak) checks. ### `conditionalGroup` @@ -55,7 +55,7 @@ This should be used as **last resort** as it triggers an exponential complexity ```ts declare function conditionalGroup( alternatives: Doc[], - options?: GroupOptions + options?: GroupOptions, ): Doc; ``` @@ -83,9 +83,9 @@ Expects the `docs` argument to be an array of alternating content and line break ```ts declare function ifBreak( - ifBreak: Doc, - noBreak?: Doc, - options?: { groupId?: symbol } + breakContents: Doc, + flatContents?: Doc, + options?: { groupId?: symbol }, ): Doc; ``` @@ -97,6 +97,10 @@ ifBreak(";", " "); `groupId` can be used to check another _already printed_ group instead of the current group. +If a [`hardline`](#hardline) or [`breakParent`](#breakParent) is present within the possible contents, the parent groups will be broken regardless of said content being printed, which might not be desirable. This behaviour is a design limitation. Usually the desired result can be achieved in a different way. + +In the rare case that `hardline` is definitely needed, consider using [`hardlineWithoutBreakParent`](#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) instead to avoid an unwanted group break propagation. + ### `breakParent` ```ts @@ -173,7 +177,7 @@ a; // comment declare const lineSuffixBoundary: Doc; ``` -In cases where you embed code inside of templates, comments shouldn't be able to leave the code part. `lineSuffixBoundary` is an explicit marker you can use to flush the [`lineSuffix`](#lineSuffix) buffer in addition to line breaks. +In cases where you embed code inside of templates, comments shouldn't be able to leave the code part. `lineSuffixBoundary` is an explicit marker you can use to flush the [`lineSuffix`](#linesuffix) buffer in addition to line breaks. ```js ["{", lineSuffix(" // comment"), lineSuffixBoundary, "}", hardline]; @@ -236,7 +240,7 @@ For example: declare function markAsRoot(doc: Doc): Doc; ``` -Mark the current indentation as root for [`dedentToRoot`](#dedentToRoot) and [`literalline`](#literalline)s. +Mark the current indentation as root for [`dedentToRoot`](#dedenttoroot) and [`literalline`](#literalline)s. ### `dedentToRoot` @@ -244,7 +248,7 @@ Mark the current indentation as root for [`dedentToRoot`](#dedentToRoot) and [`l declare function dedentToRoot(doc: Doc): Doc; ``` -Decrease the current indentation to the root marked by [`markAsRoot`](#markAsRoot). +Decrease the current indentation to the root marked by [`markAsRoot`](#markasroot). ### `trim` @@ -261,7 +265,7 @@ _Added in v2.3.0_ ```ts declare function indentIfBreak( doc: Doc, - opts: { groupId: symbol; negate?: boolean } + opts: { groupId: symbol; negate?: boolean }, ): Doc; ``` @@ -276,13 +280,15 @@ It doesn't make sense to apply `indentIfBreak` to the current group because "ind _Added in v2.3.0_ ```ts -declare function label(label: string, doc: Doc): Doc; +declare function label(label: any, doc: Doc): Doc; ``` -Mark a doc with a string label. This doesn't affect how the doc is printed, but can be useful for heuristics based on doc introspection. +Mark a doc with an arbitrary truthy value. This doesn't affect how the doc is printed, but can be useful for heuristics based on doc introspection. E.g., to decide how to print an assignment expression, we might want to know whether its right-hand side has been printed as a method call chain, not as a plain function call. If the method chain printing code uses `label` to mark its result, checking that condition can be as easy as `rightHandSideDoc.label === 'method-chain'`. +If the `label` argument is falsy, `doc` is returned as is, without wrapping. + ### `hardlineWithoutBreakParent` and `literallineWithoutBreakParent` _Added in v2.3.0_ @@ -292,7 +298,7 @@ declare const hardlineWithoutBreakParent: Doc; declare const literallineWithoutBreakParent: Doc; ``` -These are used very rarely, for advanced formatting tricks. Unlike their "normal" counterparts, they don't include an implicit [`breakParent`](#breakParent). +These are used very rarely, for advanced formatting tricks. Unlike their "normal" counterparts, they don't include an implicit [`breakParent`](#breakparent). Examples: @@ -307,16 +313,6 @@ declare const cursor: Doc; This is a placeholder value where the cursor is in the original input in order to find where it would be printed. -### [Deprecated] `concat` - -_This command has been deprecated in v2.3.0, use `Doc[]` instead_ - -```ts -declare function concat(docs: Doc[]): Doc; -``` - -Combine an array into a single doc. - ## Example For an example, here's the implementation of the `ArrayExpression` node type: diff --git a/cspell.json b/cspell.json index 2a89cde4cf50..5d459210f400 100644 --- a/cspell.json +++ b/cspell.json @@ -4,14 +4,13 @@ "words": [ "ACMR", "Alexa", + "Algora", "Amjad", "Andrey", "António", "Apheleia", "apos", "arduner", - "arity", - "arrayify", "Artem", "Ascher", "astro", @@ -19,18 +18,12 @@ "atrules", "atword", "autocmd", - "autocrlf", - "autodetects", - "autofix", "autolinks", - "autoload", - "autoloaded", "autoloading", "Azzola", - "backport", - "backticks", "behaviour", "Bekkelund", + "Benoît", "Bento", "bfnrt", "bgsound", @@ -39,53 +32,44 @@ "bitshift", "blenda", "Bopomofo", + "bottlenecked", "Breakell", "Brevik", - "browserslist", - "builtins", + "bunx", + "Burgener", "callees", - "camelcase", "camelified", - "chedeau", + "Chedeau", "cherow", "Cheung", "chrzosel", "Clemmons", "cliify", - "cmds", - "codebases", - "codecov", "codemirror", "codemod", "codemods", "commonmark", - "compat", "concating", - "cond", - "corejs", - "csharpier", + "cpuprofile", + "customignore", "daleroy", "danez", "Dara", "dashify", - "dbaeumer", "decf", - "declarators", "defun", "Deloise", + "Denicola", "deopt", - "deps", - "dessant", - "desugared", "devcontainer", "devs", "docblocks", + "dockercompose", "doctag", "Dodds", "Dolzhykov", + "Domenic", "Doshi", - "dotfile", - "dotfiles", "duailibe", "Duperron", "Eemeli", @@ -94,44 +78,39 @@ "Eneman", "ENOENT", "EOTP", - "eqeqeq", "Ericsburgh", "Esben", - "esbenp", - "esbuild", - "eslintignore", "eslump", - "espree", + "esmify", "esproposal", - "estree", - "esutils", "execa", + "Fabio", + "fabiospampinato", "fbglyph", "fdescribe", + "fesm", "Ficarra", "Filipe", "Fiorini", "Fisker", + "flamegraph", "foldgutter", "formatprg", "Friedly", "frobble", "ftest", - "fuzzer", + "fullwidth", "Georgii", "gettin", "githook", "gitter", "glimmerjs", - "globbing", - "globby", "glsl", "gofmt", "Gregor", "Hampus", "hardline", "hardlines", - "hashbang", "Hawken", "Hengles", "Hersevoort", @@ -142,25 +121,17 @@ "htmlhint", "hugomrdias", "hwba", - "iarna", + "icchiman", "ICSS", - "idempotence", - "IIFE", - "IIFEs", "ikatyang", "Ilya", "impltype", - "importee", "importmap", - "Indentable", + "indentable", "infc", - "instanceof", - "Intelli", - "intrinsics", "jackyho", "Jakefile", "jakegavin", - "jetbrains", "jlongster", "Joar", "josephfrazier", @@ -168,36 +139,35 @@ "jscodeshift", "jsesc", "jsfmt", + "jslintrc", "jsonata", - "jsonl", "judgements", "kalmanb", + "Kaneko", "Karimov", "Kassens", "Kasturi", "kddnewton", "Kearney", - "keyframes", "keyof", "Khatri", + "knip", "Konstantin", "l’objectif", - "lcov", + "layed", "libdef", - "linearize", - "linebreak", - "linebreaks", "lintstaged", "lintstagedrc", "literalline", + "llms", "loglevel", - "lowercased", - "lowercasing", "lydell", "Marek", + "Mariusz", "Masad", "Matejka", "Mateusz", + "mcmod", "mdast", "Memberish", "meriyah", @@ -205,74 +175,61 @@ "Michał", "Microsyntax", "Mikael", - "minimalistic", "minimise", "miniprettier", "mitermayer", "mjml", - "Modifer", "Moeller", "Monteiro", "Morrell", "motiz", - "Motoko", + "motoko", "mousedown", "mouseup", "mprettier", "multiparser", "Muntean", + "napi", "nargs", "navbutton", "neoclide", "neoformat", "neovim", - "nginx", "nnoremap", - "nocheck", + "noformat", "nonenumerable", "Nonspacing", "noopener", + "noprettier", "noreferrer", "normalise", "normalised", - "npmrc", + "Nowak", + "npmjs", "Nuno", "nvim", "octicon", "Okazaki", "Okonetchnikov", - "onwarn", "Oopsy", "outdent", - "outfile", "outro", "overparenthesization", "Panasenko", "pandoc", "Pangsakulyanont", - "paren", - "parens", "parentless", "pcss", + "picocolors", "Pierzchała", "Pieter", - "pnpm", - "postprocess", - "postprocessor", - "preactjs", - "prebuilds", + "Pipfile", + "pnpapi", + "posix", "precache", - "precommit", - "prefetch", "preorder", - "prettierformatsource", - "prettiergetsupportinfo", - "prettierignore", - "prettierrc", "prettierx", - "probot", "progid", - "proto", "Pschera", "quasis", "Raghuvir", @@ -280,84 +237,83 @@ "Rasmus", "Rattray", "rattrayalex", - "readline", + "Rauch", + "readdir", "readlines", "rebalance", "Rects", - "Redeclaration", "refmt", - "regexes", - "Reimplement", + "reviewdog", "rhengles", - "Roadmap", + "rspack", "Rubocop", "ruleset", "rulesets", + "Saëns", "sandhose", "Sapegin", "sbdchd", "scandir", "sdbm", - "Serializers", "setlocal", "setq", "shellsession", "Shigeaki", + "Shintaro", "Simen", - "singleline", "skratchdot", "Skyscanner", - "socio", + "smol", "softline", "softlines", "Sorin", "Sosuke", + "Spampinato", "speculationrules", "srcset", "Stachowiak", "standalones", "Stankiewicz", "starturl", - "stringifier", "stylefmt", "styleguides", - "stylelint", "stylelintrc", "Stylesheet", + "subal", "subvalue", "suchipi", "Suhail", - "supertypes", "Supprimer", "swcrc", - "templating", + "syntaxfm", + "Tatsunori", "tempy", "testname", - "tldr", + "textlint", "Tomasek", "toplevel", + "Tparam", "Tradeshift", "Transloadit", "trippable", - "tsbuild", "tsep", "TSES", + "tshirt", + "tshirts", "TSJS", - "typeahead", "typecasted", "typecheck", - "typeof", + "TYPELESS", "Ubie", + "Uchino", "Umidbek", "unaries", "uncook", - "unignore", - "unist", "unparenthesised", - "unparenthesized", - "unparseable", + "Unparenthesized", "Unrestrict", - "unstaged", + "upvoted", + "upvotes", "valourous", "Vanderwerff", "vanguarding", @@ -373,7 +329,6 @@ "webcompat", "webstorm", "Weixin", - "whitespaces", "withastro", "wxss", "xdescribe", @@ -386,14 +341,15 @@ "ignoreRegExpList": [ "\\n(`{3,})\\w*\\n[\\s\\S]+?\\1", "\\[(\\*{2})?@[-\\w]+?\\1\\]", - "by @[-\\w]+(?:, @[-\\w]+)?", + "by @[-\\w]+(?:, @[-\\w]+)*", "ve{2,}r{2,}y", "ve+r+y+long\\w*", "\\(https?://.*?\\)", - "author: \".*?\"", - "authorURL: \".*?\"", - "\"author\": \".*?\"", - "(long|after){3,}" + "authors: \".*?\"", + "\"authors\": \".*?\"", + "(long|after){3,}", + "\\\\u\\{[0-9a-fA-F]{4,6}\\}", + "appId: \".*?\"" ], "files": [ "*", @@ -406,7 +362,7 @@ "website/**/*", "tests/config/**/*", "tests/integration/**/*", - "tests/format/**/jsfmt.spec.js" + "tests/format/**/format.test.js" ], "ignorePaths": [ ".git", @@ -414,10 +370,12 @@ "*.{log,svg,snap,png}", "website/data/users.yml", "website/build/**", - "website/playground/codeSamples.js", - "website/pages/googlefe164a33bda4034b.html", + "website/playground/codeSamples.mjs", + "website/static/googlefe164a33bda4034b.html", "website/static/lib/**", "website/static/playground.js", - "scripts/vendors/vendor-meta.json" + "website/src/css/custom.css", + "website/blog/authors.yml", + "scripts/build/typescript-unused-specifiers.js" ] } diff --git a/docs/api.md b/docs/api.md index 1fd27c64a27c..6f6e987c36a8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -6,36 +6,38 @@ title: API If you want to run Prettier programmatically, check this page out. ```js -const prettier = require("prettier"); +import * as prettier from "prettier"; ``` +Our public APIs are all asynchronous, if you must use synchronous version for some reason, you can try [`@prettier/sync`](https://github.com/prettier/prettier-synchronized). + ## `prettier.format(source, options)` `format` is used to format text using Prettier. `options.parser` must be set according to the language you are formatting (see the [list of available parsers](options.md#parser)). Alternatively, `options.filepath` can be specified for Prettier to infer the parser from the file extension. Other [options](options.md) may be provided to override the defaults. ```js -prettier.format("foo ( );", { semi: false, parser: "babel" }); -// -> "foo()" +await prettier.format("foo ( );", { semi: false, parser: "babel" }); +// -> 'foo()\n' ``` ## `prettier.check(source [, options])` -`check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`. This is similar to the `--check` or `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. +`check` checks to see if the file has been formatted with Prettier given those options and returns a `Promise`. This is similar to the `--check` or `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. ## `prettier.formatWithCursor(source [, options])` `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code. This is useful for editor integrations, to prevent the cursor from moving when code is formatted. -The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`. +The `cursorOffset` option should be provided, to specify where the cursor is. ```js -prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); +await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); // -> { formatted: '1;\n', cursorOffset: 1 } ``` -## `prettier.resolveConfig(filePath [, options])` +## `prettier.resolveConfig(fileUrlOrPath [, options])` -`resolveConfig` can be used to resolve configuration for a given source file, passing its path as the first argument. The config search will start at the file path and continue to search up the directory (you can use `process.cwd()` to start searching from the current directory). Or you can pass directly the path of the config file as `options.config` if you don’t wish to search for it. A promise is returned which will resolve to: +`resolveConfig` can be used to resolve configuration for a given source file, passing its path or url as the first argument. The config search will start at the directory of the file location and continue to search up the directory. Or you can pass directly the path of the config file as `options.config` if you don’t wish to search for it. A promise is returned which will resolve to: - An options object, providing a [config file](configuration.md) was found. - `null`, if no file was found. @@ -45,9 +47,11 @@ The promise will be rejected if there was an error parsing the configuration fil If `options.useCache` is `false`, all caching will be bypassed. ```js -const text = fs.readFileSync(filePath, "utf8"); -prettier.resolveConfig(filePath).then((options) => { - const formatted = prettier.format(text, options); +const text = await fs.readFile(filePath, "utf8"); +const options = await prettier.resolveConfig(filePath); +const formatted = await prettier.format(text, { + ...options, + filepath: filePath, }); ``` @@ -58,9 +62,7 @@ If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editor - `indent_size`/`tab_width` - `max_line_length` -Use `prettier.resolveConfig.sync(filePath [, options])` if you’d like to use sync version. - -## `prettier.resolveConfigFile([filePath])` +## `prettier.resolveConfigFile([fileUrlOrPath])` `resolveConfigFile` can be used to find the path of the Prettier configuration file that will be used when resolving the config (i.e. when calling `resolveConfig`). A promise is returned which will resolve to: @@ -69,54 +71,48 @@ Use `prettier.resolveConfig.sync(filePath [, options])` if you’d like to use s The promise will be rejected if there was an error parsing the configuration file. -The search starts at `process.cwd()`, or at `filePath` if provided. Please see the [cosmiconfig docs](https://github.com/davidtheclark/cosmiconfig#explorersearch) for details on how the resolving works. +The search starts at `process.cwd()`, or at the directory of `fileUrlOrPath` if provided. ```js -prettier.resolveConfigFile(filePath).then((configFile) => { - // you got the path of the configuration file -}); +const configFile = await prettier.resolveConfigFile(filePath); +// you got the path of the configuration file ``` -Use `prettier.resolveConfigFile.sync([filePath])` if you’d like to use sync version. - ## `prettier.clearConfigCache()` When Prettier loads configuration files and plugins, the file system structure is cached for performance. This function will clear the cache. Generally this is only needed for editor integrations that know that the file system has changed since the last format took place. -## `prettier.getFileInfo(filePath [, options])` +## `prettier.getFileInfo(fileUrlOrPath [, options])` `getFileInfo` can be used by editor extensions to decide if a particular file needs to be formatted. This method returns a promise, which resolves to an object with the following properties: -```typescript +```ts { - ignored: boolean, - inferredParser: string | null, + ignored: boolean; + inferredParser: string | null; } ``` -The promise will be rejected if the type of `filePath` is not `string`. +The promise will be rejected if the type of `fileUrlOrPath` is not `string` or `URL`. -Setting `options.ignorePath` (`string`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). +Setting `options.ignorePath` (`string | URL | (string | URL)[]`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). -If the given `filePath` is ignored, the `inferredParser` is always `null`. +If the given `fileUrlOrPath` is ignored, the `inferredParser` is always `null`. -Providing [plugin](plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. +Providing [plugin](plugins.md) paths in `options.plugins` (`(string | URL | Plugin)[]`) helps extract `inferredParser` for files that are not supported by Prettier core. -When setting `options.resolveConfig` (`boolean`, default `false`), Prettier will resolve the configuration for the given `filePath`. This is useful, for example, when the `inferredParser` might be overridden for a subset of files. - -Use `prettier.getFileInfo.sync(filePath [, options])` if you’d like to use sync version. +When setting `options.resolveConfig` (`boolean`, default `true`) to `false`, Prettier will not search for configuration file. This can be useful if this function is only used to check if file is ignored. ## `prettier.getSupportInfo()` -Returns an object representing the options, parsers, languages and file types Prettier supports. +Returns a promise which resolves to an object representing the options, parsers, languages and file types Prettier supports. The support information looks like this: -```typescript +```ts { languages: Array<{ name: string; - since?: string; parsers: string[]; group?: string; tmScope?: string; @@ -128,22 +124,31 @@ The support information looks like this: filenames?: string[]; linguistLanguageId?: number; vscodeLanguageIds?: string[]; + isSupported?(options: { filepath: string }): boolean; }>; } ``` +:::note + +Prettier can not ensure that `filepath` exists on disk.\ +When using from APIs(eg: `prettier.format()`), Prettier can not ensure it's a valid path either. + +::: + -## Custom Parser API (deprecated) +## Custom Parser API (removed) -_Will be removed in v3.0.0 (superseded by the Plugin API)_ +_Removed in v3.0.0 (superseded by the Plugin API)_ -Before [plugins](plugins.md) were a thing, Prettier had a similar but more limited feature called custom parsers. It will be removed in v3.0.0 as its functionality is a subset of what the Plugin API does. If you used it, please check the example below on how to migrate. +Before [plugins](plugins.md) were a thing, Prettier had a similar but more limited feature called custom parsers. It’s been removed in v3.0.0 as its functionality was a subset of what the Plugin API did. If you used it, please check the example below on how to migrate. -❌ Custom parser API (deprecated): +❌ Custom parser API (removed): ```js import { format } from "prettier"; + format("lodash ( )", { parser(text, { babel }) { const ast = babel(text); @@ -158,12 +163,13 @@ format("lodash ( )", { ```js import { format } from "prettier"; -import parserBabel from "prettier/parser-babel.js"; +import * as prettierPluginBabel from "prettier/plugins/babel"; + const myCustomPlugin = { parsers: { "my-custom-parser": { - parse(text) { - const ast = parserBabel.parsers.babel.parse(text); + async parse(text) { + const ast = await prettierPluginBabel.parsers.babel.parse(text); ast.program.body[0].expression.callee.name = "_"; return ast; }, @@ -171,13 +177,18 @@ const myCustomPlugin = { }, }, }; -format("lodash ( )", { + +await format("lodash ( )", { parser: "my-custom-parser", plugins: [myCustomPlugin], }); // -> "_();\n" ``` -> Note: Overall, doing codemods this way isn’t recommended. Prettier uses the location data of AST nodes for many things like preserving blank lines and attaching comments. When the AST is modified after the parsing, the location data often gets out of sync, which may lead to unpredictable results. Consider using [jscodeshift](https://github.com/facebook/jscodeshift) if you need codemods. +:::note + +Overall, doing codemods this way isn’t recommended. Prettier uses the location data of AST nodes for many things like preserving blank lines and attaching comments. When the AST is modified after the parsing, the location data often gets out of sync, which may lead to unpredictable results. Consider using [jscodeshift](https://github.com/facebook/jscodeshift) if you need codemods. + +::: -As part of the deprecated Custom parser API, it is possible to pass a path to a module exporting a `parse` function via the `--parser` option. Use the `--plugin` CLI option or the `plugins` API option instead to [load plugins](plugins.md#using-plugins). +As part of the removed Custom parser API, it was previously possible to pass a path to a module exporting a `parse` function via the `--parser` option. Use the `--plugin` CLI option or the `plugins` API option instead to [load plugins](plugins.md#using-plugins). diff --git a/docs/browser.md b/docs/browser.md index 301191210a2d..f7a369667370 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -3,11 +3,14 @@ id: browser title: Browser --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Run Prettier in the browser using its **standalone** version. This version doesn’t depend on Node.js. It only formats the code and has no support for config files, ignore files, CLI usage, or automatic loading of plugins. The standalone version comes as: -- ES modules: `esm/standalone.mjs`, starting in version 2.2 +- ES modules: `standalone.mjs`, starting in version 3.0 (In version 2, `esm/standalone.mjs`.) - UMD: `standalone.js`, starting in version 1.13 The [`browser` field](https://github.com/defunctzombie/package-browser-field-spec) in Prettier’s `package.json` points to `standalone.js`. That’s why you can just `import` or `require` the `prettier` module to access Prettier’s API, and your code can stay compatible with both Node and the browser as long as webpack or another bundler that supports the `browser` field is used. This is especially convenient for [plugins](plugins.md). @@ -18,10 +21,7 @@ Required options: - **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use. -- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named - - - `parser-*.js` in and - - `parser-*.mjs` in +- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@%PRETTIER_VERSION%/plugins](https://unpkg.com/browse/prettier@%PRETTIER_VERSION%/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option. @@ -32,13 +32,15 @@ See below for examples. ### Global ```html - - + + ``` @@ -48,12 +50,12 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack ```html ``` @@ -62,10 +64,10 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack ```js define([ - "https://unpkg.com/prettier@2.8.8/standalone.js", - "https://unpkg.com/prettier@2.8.8/parser-graphql.js", -], (prettier, ...plugins) => { - prettier.format("type Query { hello: String }", { + "https://unpkg.com/prettier@%PRETTIER_VERSION%/standalone.js", + "https://unpkg.com/prettier@%PRETTIER_VERSION%/plugins/graphql.js", +], async (prettier, ...plugins) => { + const formatted = await prettier.format("type Query { hello: String }", { parser: "graphql", plugins, }); @@ -76,40 +78,68 @@ define([ ```js const prettier = require("prettier/standalone"); -const plugins = [require("prettier/parser-graphql")]; -prettier.format("type Query { hello: String }", { - parser: "graphql", - plugins, -}); +const plugins = [require("prettier/plugins/graphql")]; + +(async () => { + const formatted = await prettier.format("type Query { hello: String }", { + parser: "graphql", + plugins, + }); +})(); ``` This syntax doesn’t necessarily work in the browser, but it can be used when bundling the code with browserify, Rollup, webpack, or another bundler. ### Worker + + + ```js -importScripts("https://unpkg.com/prettier@2.8.8/standalone.js"); -importScripts("https://unpkg.com/prettier@2.8.8/parser-graphql.js"); -prettier.format("type Query { hello: String }", { +import * as prettier from "https://unpkg.com/prettier@%PRETTIER_VERSION%/standalone.mjs"; +import * as prettierPluginGraphql from "https://unpkg.com/prettier@%PRETTIER_VERSION%1/plugins/graphql.mjs"; + +const formatted = await prettier.format("type Query { hello: String }", { parser: "graphql", - plugins: prettierPlugins, + plugins: [prettierPluginGraphql], }); ``` + + + +```js +importScripts( + "https://unpkg.com/prettier@%PRETTIER_VERSION%/standalone.js", + "https://unpkg.com/prettier@%PRETTIER_VERSION%/plugins/graphql.js", +); + +(async () => { + const formatted = await prettier.format("type Query { hello: String }", { + parser: "graphql", + plugins: prettierPlugins, + }); +})(); +``` + + + + ## Parser plugins for embedded code If you want to format [embedded code](options.md#embedded-language-formatting), you need to load related plugins too. For example: ```html @@ -119,15 +149,16 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser ```html diff --git a/docs/ci.md b/docs/ci.md new file mode 100644 index 000000000000..57834ed05efb --- /dev/null +++ b/docs/ci.md @@ -0,0 +1,34 @@ +--- +id: ci +title: Run Prettier on CI +--- + +## GitHub Actions + +To apply autofix for Prettier from GitHub Actions, do the following: + +1. Install the [`autofix.ci`](https://github.com/apps/autofix-ci) GitHub App. +1. Make sure you have a **pinned** version of Prettier installed in your repository. +1. Create `.github/workflows/prettier.yml` with following content: + + ```yaml title=".github/workflows/prettier.yml" + name: autofix.ci + on: + pull_request: + push: + permissions: {} + jobs: + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: | + yarn + yarn prettier . --write + - uses: autofix-ci/action@v1 + with: + commit-message: "Apply Prettier format" + ``` + +For more information see [autofix.ci](https://autofix.ci/) website. diff --git a/docs/cli.md b/docs/cli.md index b4d3981e9943..51ed8b8bc453 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -9,14 +9,18 @@ Use the `prettier` command to run Prettier from the command line. prettier [options] [file/dir/glob ...] ``` -> To run your locally installed version of Prettier, prefix the command with `npx` or `yarn` (if you use Yarn), i.e. `npx prettier --help`, or `yarn prettier --help`. +:::note + +To run your locally installed version of Prettier, prefix the command with `npx`, `yarn exec`, `pnpm exec`, or `bunx`, i.e. `npx prettier --help`, `yarn exec prettier --help`, `pnpm exec prettier --help`, or `bunx prettier --help`. + +::: To format a file in-place, use `--write`. (Note: This overwrites your files!) In practice, this may look something like: ```bash -prettier --write . +prettier . --write ``` This command formats all files supported by Prettier in the current directory and its subdirectories. @@ -26,12 +30,20 @@ It’s recommended to always make sure that `prettier --write .` only formats wh A more complicated example: ```bash -prettier --single-quote --trailing-comma all --write docs package.json "{app,__{tests,mocks}__}/**/*.js" +prettier docs package.json "{app,__{tests,mocks}__}/**/*.js" --write --single-quote --trailing-comma all ``` -> Don’t forget the **quotes** around the globs! The quotes make sure that Prettier CLI expands the globs rather than your shell, which is important for cross-platform usage. +:::warning + +Don’t forget the **quotes** around the globs! The quotes make sure that Prettier CLI expands the globs rather than your shell, which is important for cross-platform usage. + +::: -> It’s better to use a [configuration file](configuration.md) for formatting options like `--single-quote` and `--trailing-comma` instead of passing them as CLI flags. This way the Prettier CLI, [editor integrations](editors.md), and other tooling can all know what options you use. +:::note + +It’s better to use a [configuration file](configuration.md) for formatting options like `--single-quote` and `--trailing-comma` instead of passing them as CLI flags. This way the Prettier CLI, [editor integrations](editors.md), and other tooling can all know what options you use. + +::: ## File patterns @@ -45,6 +57,8 @@ Given a list of paths/patterns, the Prettier CLI first treats every entry in it Prettier CLI will ignore files located in `node_modules` directory. To opt out from this behavior, use `--with-node-modules` flag. +Prettier CLI will not follow symbolic links when expanding arguments. + To escape special characters in globs, one of the two escaping syntaxes can be used: `prettier "\[my-dir]/*.js"` or `prettier "[[]my-dir]/*.js"`. Both match all JS files in a directory named `[my-dir]`, however the latter syntax is preferable as the former doesn’t work on Windows, where backslashes are treated as path separators. ## `--check` @@ -53,7 +67,7 @@ When you want to check if your files are formatted, you can run Prettier with th This will output a human-friendly message and a list of unformatted files, if any. ```bash -prettier --check "src/**/*.js" +prettier . --check ``` Console output if all files are formatted: @@ -69,7 +83,7 @@ Console output if some of the files require re-formatting: Checking formatting... [warn] src/fileA.js [warn] src/fileB.js -[warn] Code style issues found in 2 files. Forgot to run Prettier? +[warn] Code style issues found in 2 files. Run Prettier with --write to fix. ``` The command will return exit code `1` in the second case, which is helpful inside the CI pipelines. @@ -95,15 +109,15 @@ If you're worried that Prettier will change the correctness of your code, add `- If you are repeatedly formatting individual files with `prettier`, you will incur a small performance cost when Prettier attempts to look up a [configuration file](configuration.md). In order to skip this, you may ask Prettier to find the config file once, and re-use it later on. -```bash -prettier --find-config-path ./my/file.js -./my/.prettierrc +```console +$ prettier --find-config-path path/to/file.js +path/to/.prettierrc ``` This will provide you with a path to the configuration file, which you can pass to `--config`: ```bash -prettier --config ./my/.prettierrc --write ./my/file.js +prettier path/to/file.js --write --config path/to/.prettierrc ``` You can also use `--config` if your configuration file lives somewhere where Prettier cannot find it, such as a `config/` directory. @@ -112,14 +126,15 @@ If you don’t have a configuration file, or want to ignore it if it does exist, ## `--ignore-path` -Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.prettierignore`. +Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.gitignore` and `./.prettierignore`.\ +Multiple values are accepted. ## `--list-different` Another useful flag is `--list-different` (or `-l`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. ```bash -prettier --single-quote --list-different "src/**/*.js" +prettier . --single-quote --list-different ``` You can also use [`--check`](cli.md#--check) flag, which works the same way as `--list-different`, but also prints a human-friendly summary message to stdout. @@ -158,7 +173,7 @@ Prettier CLI will ignore files located in `node_modules` directory. To opt out f This rewrites all processed files in place. This is comparable to the `eslint --fix` workflow. You can also use `-w` alias. -## `--loglevel` +## `--log-level` Change the level of logging for the CLI. Valid options are: @@ -193,18 +208,14 @@ $ cat abc.css | prettier --stdin-filepath abc.css With `--ignore-unknown` (or `-u`), prettier will ignore unknown files matched by patterns. -```console -$ prettier "**/*" --write --ignore-unknown +```bash +prettier "**/*" --write --ignore-unknown ``` ## `--no-error-on-unmatched-pattern` Prevent errors when pattern is unmatched. -## `--no-plugin-search` - -Disable plugin autoloading. - ## `--cache` If this option is enabled, the following values are used as cache keys and the file is formatted only if one of them is changed. @@ -216,14 +227,18 @@ If this option is enabled, the following values are used as cache keys and the f - (if `--cache-strategy` is `content`) content of the file ```bash -prettier --write --cache src +prettier . --write --cache ``` Running Prettier without `--cache` will delete the cache. Also, since the cache file is stored in `./node_modules/.cache/prettier/.prettier-cache`, so you can use `rm ./node_modules/.cache/prettier/.prettier-cache` to remove it manually. -> Plugins version and implementation are not used as cache keys. We recommend that you delete the cache when updating plugins. +:::warning + +Plugins version and implementation are not used as cache keys. We recommend that you delete the cache when updating plugins. + +::: ## `--cache-location` @@ -232,7 +247,7 @@ Path to the cache file location used by `--cache` flag. If you don't explicit `- If a file path is passed, that file is used as the cache file. ```bash -prettier --write --cache --cache-location=my_cache_file src +prettier . --write --cache --cache-location=path/to/cache-file ``` ## `--cache-strategy` @@ -244,5 +259,5 @@ In general, `metadata` is faster. However, `content` is useful for updating the If no strategy is specified, `content` will be used. ```bash -prettier --write --cache --cache-strategy metadata src +prettier . --write --cache --cache-strategy metadata ``` diff --git a/docs/configuration.md b/docs/configuration.md index 12f6c712f4f3..900e38ccf313 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -3,20 +3,42 @@ id: configuration title: Configuration File --- -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. This means you can configure Prettier via (in order of precedence): +You can configure Prettier via (in order of precedence): -- A `"prettier"` key in your `package.json` file. +- A `"prettier"` key in your `package.json`, or [`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) file. - A `.prettierrc` file written in JSON or YAML. - A `.prettierrc.json`, `.prettierrc.yml`, `.prettierrc.yaml`, or `.prettierrc.json5` file. -- A `.prettierrc.js`, `.prettierrc.cjs`, `prettier.config.js`, or `prettier.config.cjs` file that exports an object using `module.exports`. +- A `.prettierrc.js`, `prettier.config.js`, `.prettierrc.ts`, or `prettier.config.ts` file that exports an object using `export default` or `module.exports` (depends on the [`type`](https://nodejs.org/api/packages.html#type) value in your `package.json`). +- A `.prettierrc.mjs`, `prettier.config.mjs`, `.prettierrc.mts`, or `prettier.config.mts` file that exports an object using `export default`. +- A `.prettierrc.cjs`, `prettier.config.cjs`, `.prettierrc.cts`, or `prettier.config.cts` file that exports an object using `module.exports`. - A `.prettierrc.toml` file. +:::info + +TypeScript configuration files support requires [additional setup](#typescript-configuration-files) + +::: + The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isn’t) found. Prettier intentionally doesn’t support any kind of global configuration. This is to make sure that when a project is copied to another computer, Prettier’s behavior stays the same. Otherwise, Prettier wouldn’t be able to guarantee that everybody in a team gets the same consistent results. The options you can use in the configuration file are the same as the [API options](options.md). +### TypeScript Configuration Files + +TypeScript support requires Node.js>=22.6.0, and `--experimental-strip-types` is required before Node.js v24.3.0 to run Node.js. + +```sh +node --experimental-strip-types node_modules/prettier/bin/prettier.cjs . --write +``` + +or + +```sh +NODE_OPTIONS="--experimental-strip-types" prettier . --write +``` + ## Basic Configuration JSON: @@ -30,16 +52,70 @@ JSON: } ``` -JS: +JS (ES Modules): ```js -// prettier.config.js or .prettierrc.js -module.exports = { +// prettier.config.js, .prettierrc.js, prettier.config.mjs, or .prettierrc.mjs + +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { trailingComma: "es5", tabWidth: 4, semi: false, singleQuote: true, }; + +export default config; +``` + +JS (CommonJS): + +```js +// prettier.config.js, .prettierrc.js, prettier.config.cjs, or .prettierrc.cjs + +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { + trailingComma: "es5", + tabWidth: 4, + semi: false, + singleQuote: true, +}; + +module.exports = config; +``` + +TypeScript (ES Modules): + +```ts +// prettier.config.ts, .prettierrc.ts, prettier.config.mts, or .prettierrc.mts + +import { type Config } from "prettier"; + +const config: Config = { + trailingComma: "none", +}; + +export default config; +``` + +TypeScript (CommonJS): + +```ts +// prettier.config.ts, .prettierrc.ts, prettier.config.cts, or .prettierrc.cts + +import { type Config } from "prettier"; + +const config: Config = { + trailingComma: "none", +}; + +module.exports = config; ``` YAML: @@ -107,35 +183,6 @@ overrides: `files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. -## Sharing configurations - -Sharing a Prettier configuration is simple: just publish a module that exports a configuration object, say `@company/prettier-config`, and reference it in your `package.json`: - -```json -{ - "name": "my-cool-library", - "version": "9000.0.1", - "prettier": "@company/prettier-config" -} -``` - -If you don’t want to use `package.json`, you can use any of the supported extensions to export a string, e.g. `.prettierrc.json`: - -```json -"@company/prettier-config" -``` - -An example configuration repository is available [here](https://github.com/azz/prettier-config). - -> Note: This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications, e.g: -> -> ```js -> module.exports = { -> ...require("@company/prettier-config"), -> semi: false, -> }; -> ``` - ## Setting the [parser](options.md#parser) option By default, Prettier automatically infers which parser to use based on the input file extension. Combined with `overrides` you can teach Prettier how to parse files it does not recognize. @@ -172,11 +219,11 @@ You can also switch to the `flow` parser instead of the default `babel` for .js ## Configuration Schema -If you’d like a JSON schema to validate your configuration, one is available here: http://json.schemastore.org/prettierrc. +If you’d like a JSON schema to validate your configuration, one is available here: [https://json.schemastore.org/prettierrc](https://json.schemastore.org/prettierrc). ## EditorConfig -If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by `.prettierrc`, etc. +If a [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Here’s an annotated description of how different properties map to Prettier’s behavior: diff --git a/docs/editors.md b/docs/editors.md index dbf2bd9dddc7..e057efe8b6b1 100644 --- a/docs/editors.md +++ b/docs/editors.md @@ -25,6 +25,12 @@ Check out the [prettier-emacs](https://github.com/prettier/prettier-emacs) repo, For more details see [the Vim setup guide](vim.md). +## Helix + +A formatter can be specified in your [Helix language configuration](https://docs.helix-editor.com/languages.html#language-configuration), which will take precedence over any language servers. + +For more details see the [Helix external binary formatter configuration for Prettier](https://github.com/helix-editor/helix/wiki/External-formatter-configuration#prettier). + ## Sublime Text Sublime Text support is available through Package Control and the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. @@ -37,11 +43,6 @@ See the [WebStorm setup guide](webstorm.md). Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). -## Atom - -Atom users can install the [prettier-atom](https://github.com/prettier/prettier-atom) package, or one of the more minimalistic [mprettier](https://github.com/t9md/atom-mprettier) and -[miniprettier](https://github.com/duailibe/atom-miniprettier) packages. - ## Espresso Espresso users can install the [espresso-prettier](https://github.com/eablokker/espresso-prettier) plugin. diff --git a/docs/for-enterprise.md b/docs/for-enterprise.md index 8cdc6b4f3823..bdec9e16320f 100644 --- a/docs/for-enterprise.md +++ b/docs/for-enterprise.md @@ -7,10 +7,10 @@ title: For Enterprise Tidelift is working with the maintainers of Prettier and thousands of other open source projects to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. -Learn more -Request a demo +Learn more +Request a demo -
+
### Enterprise-ready open source software—managed for you @@ -44,5 +44,5 @@ Tidelift works with GitHub, GitLab, BitBucket, and more. We support every cloud The end result? All of the capabilities you expect from commercial-grade software, for the full breadth of open source you use. That means less time grappling with esoteric open source trivia, and more time building your own applications—and your business. -Learn more -Request a demo +Learn more +Request a demo diff --git a/docs/ignore.md b/docs/ignore.md index 2b5b7504ff68..6ba181dde2ad 100644 --- a/docs/ignore.md +++ b/docs/ignore.md @@ -13,22 +13,22 @@ To exclude files from formatting, create a `.prettierignore` file in the root of Example: -``` +```text # Ignore artifacts: build coverage # Ignore all HTML files: -*.html +**/*.html ``` It’s recommended to have a `.prettierignore` in your project! This way you can run `prettier --write .` to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files _not_ to format! -By default prettier ignores files in version control systems directories (".git", ".svn" and ".hg") and `node_modules` (if [`--with-node-modules` CLI option](cli.md#--with-node-modules) not specified) +By default prettier ignores files in version control systems directories (".git", ".jj", ".sl", ".svn" and ".hg") and `node_modules` (unless the [`--with-node-modules` CLI option](cli.md#--with-node-modules) is specified). Prettier will also follow rules specified in the ".gitignore" file if it exists in the same directory from which it is run. So by default it will be -```js +```text **/.git **/.svn **/.hg @@ -37,7 +37,7 @@ So by default it will be and -```js +```text **/.git **/.svn **/.hg @@ -145,6 +145,8 @@ This type of ignore is only allowed to be used in top-level and aimed to disable ``` +**Important:** You must have a blank line before `` and `` for Prettier to recognize the comments. + ## YAML To ignore a part of a YAML file, `# prettier-ignore` should be placed on the line immediately above the ignored node: @@ -186,7 +188,7 @@ hello: world For one-off commands, when you want to exclude some files without adding them to `.prettierignore`, negative patterns can come in handy: ```bash -prettier --write . '!**/*.{js,jsx,vue}' +prettier . "!**/*.{js,jsx,vue}" --write ``` -See [fast-glob](https://prettier.io/docs/en/cli.html#file-patterns) to learn more about advanced glob syntax. +See [fast-glob](https://prettier.io/docs/cli#file-patterns) to learn more about advanced glob syntax. diff --git a/docs/index.md b/docs/index.md index 735d3f2a59bf..a209d6b6ad0c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,16 +7,16 @@ Prettier is an opinionated code formatter with support for: - JavaScript (including experimental features) - [JSX](https://facebook.github.io/jsx/) -- [Angular](https://angular.io/) +- [Angular](https://angular.dev/) - [Vue](https://vuejs.org/) - [Flow](https://flow.org/) - [TypeScript](https://www.typescriptlang.org/) -- CSS, [Less](http://lesscss.org/), and [SCSS](https://sass-lang.com) +- CSS, [Less](https://lesscss.org/), and [SCSS](https://sass-lang.com) - [HTML](https://en.wikipedia.org/wiki/HTML) - [Ember/Handlebars](https://handlebarsjs.com/) - [JSON](https://json.org/) - [GraphQL](https://graphql.org/) -- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX](https://mdxjs.com/) +- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX v1](https://mdxjs.com/) - [YAML](https://yaml.org/) It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](https://jlongster.com/A-Prettier-Formatter)) @@ -43,7 +43,7 @@ foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), - isThereSeriouslyAnotherOne() + isThereSeriouslyAnotherOne(), ); ``` @@ -51,9 +51,9 @@ Prettier enforces a consistent code **style** (i.e. code formatting that won’t If you want to learn more, these two conference talks are great introductions: -[![A Prettier Printer by James Long on React Conf 2017](/docs/assets/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png)](https://www.youtube.com/watch?v=hkfBvpEfWdA) +[![A Prettier Printer by James Long on React Conf 2017](/images/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png)](https://www.youtube.com/watch?v=hkfBvpEfWdA) -[![JavaScript Code Formatting by Christopher Chedeau on React London 2017](/docs/assets/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png)](https://www.youtube.com/watch?v=0Q4kUNx85_4) +[![JavaScript Code Formatting by Christopher Chedeau on React London 2017](/images/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png)](https://www.youtube.com/watch?v=0Q4kUNx85_4) #### Footnotes diff --git a/docs/install.md b/docs/install.md index d6563217d4b1..1ead6743aaba 100644 --- a/docs/install.md +++ b/docs/install.md @@ -3,72 +3,148 @@ id: install title: Install --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + First, install Prettier locally: - - + + ```bash npm install --save-dev --save-exact prettier ``` - + + ```bash yarn add --dev --exact prettier ``` - + + + +```bash +pnpm add --save-dev --save-exact prettier +``` + + + + +```bash +bun add --dev --exact prettier +``` + + + Then, create an empty config file to let editors and other tools know you are using Prettier: - + ```bash -echo {}> .prettierrc.json +node --eval "fs.writeFileSync('.prettierrc','{}\n')" ``` Next, create a [.prettierignore](ignore.md) file to let the Prettier CLI and editors know which files to _not_ format. Here’s an example: +```bash +node --eval "fs.writeFileSync('.prettierignore','# Ignore artifacts:\nbuild\ncoverage\n')" ``` -# Ignore artifacts: -build -coverage -``` -> Tip! Base your .prettierignore on .gitignore and .eslintignore (if you have one). +:::tip + +Prettier will follow rules specified in .gitignore if it exists in the same directory from which it is run. You can also base your .prettierignore on .eslintignore (if you have one). + +::: + +:::tip[Another tip] + +If your project isn’t ready to format, say, HTML files yet, add `*.html`. -> Another tip! If your project isn’t ready to format, say, HTML files yet, add `*.html`. +::: Now, format all files with Prettier: - - + + + +```bash +npx prettier . --write +``` + +:::info + +What is that `npx` thing? `npx` ships with `npm` and lets you run locally installed tools. We’ll leave off the `npx` part for brevity throughout the rest of this file! + +::: + +:::warning + +If you forget to install Prettier first, `npx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. + +::: + + + + +```bash +yarn exec prettier . --write +``` + +:::info + +What is `yarn exec` doing at the start? `yarn exec prettier` runs the locally installed version of Prettier. We’ll leave off the `yarn exec` part for brevity throughout the rest of this file! + +::: + + + ```bash -npx prettier --write . +pnpm exec prettier . --write ``` -> What is that `npx` thing? `npx` ships with `npm` and lets you run locally installed tools. We’ll leave off the `npx` part for brevity throughout the rest of this file! -> -> Note: If you forget to install Prettier first, `npx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. +:::info + +What is `pnpm exec` doing at the start? `pnpm exec prettier` runs the locally installed version of Prettier. We’ll leave off the `pnpm exec` part for brevity throughout the rest of this file! - +::: + + + ```bash -yarn prettier --write . +bunx prettier . --write ``` -> What is `yarn` doing at the start? `yarn prettier` runs the locally installed version of Prettier. We’ll leave off the `yarn` part for brevity throughout the rest of this file! +:::info + +What is `bunx` doing at the start? `bunx prettier` runs the locally installed version of Prettier. We’ll leave off the `bunx` part for brevity throughout the rest of this file! + +::: + +:::warning - +If you forget to install Prettier first, `bunx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. + +::: + + + `prettier --write .` is great for formatting everything, but for a big project it might take a little while. You may run `prettier --write app/` to format a certain directory, or `prettier --write app/components/Button.js` to format a certain file. Or use a _glob_ like `prettier --write "app/**/*.test.js"` to format all tests in a directory (see [fast-glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) for supported glob syntax). If you have a CI setup, run the following as part of it to make sure that everyone runs Prettier. This avoids merge conflicts and other collaboration issues! ```bash -npx prettier --check . +npx prettier . --check ``` `--check` is like `--write`, but only checks that files are already formatted, rather than overwriting them. `prettier --write` and `prettier --check` are the most common ways to run Prettier. @@ -79,9 +155,13 @@ Formatting from the command line is a good way to get started, but you get the m See [Editor Integration](editors.md) for how to set up your editor. If your editor does not support Prettier, you can instead [run Prettier with a file watcher](watching-files.md). -> **Note:** Don’t skip the regular local install! Editor plugins will pick up your local version of Prettier, making sure you use the correct version in every project. (You wouldn’t want your editor accidentally causing lots of changes because it’s using a newer version of Prettier than your project!) -> -> And being able to run Prettier from the command line is still a good fallback, and needed for CI setups. +:::note + +Don’t skip the regular local install! Editor plugins will pick up your local version of Prettier, making sure you use the correct version in every project. (You wouldn’t want your editor accidentally causing lots of changes because it’s using a newer version of Prettier than your project!) + +And being able to run Prettier from the command line is still a good fallback, and needed for CI setups. + +::: ## ESLint (and other linters) @@ -97,28 +177,50 @@ For example, you can do the following to have Prettier run before each commit: 1. Install [husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged): - - + + - ```bash - npm install --save-dev husky lint-staged - npx husky install - npm pkg set scripts.prepare="husky install" - npx husky add .husky/pre-commit "npx lint-staged" - ``` +```bash +npm install --save-dev husky lint-staged +npx husky init +node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')" +``` - + + - ```bash - yarn add --dev husky lint-staged - npx husky install - npm pkg set scripts.prepare="husky install" - npx husky add .husky/pre-commit "npx lint-staged" - ``` +```bash +yarn add --dev husky lint-staged +npx husky init +node --eval "fs.writeFileSync('.husky/pre-commit','yarn lint-staged\n')" +``` + +:::note + +If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2 + +::: + + + + +```bash +pnpm add --save-dev husky lint-staged +pnpm exec husky init +node --eval "fs.writeFileSync('.husky/pre-commit','pnpm exec lint-staged\n')" +``` - > If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2 + + - +```bash +bun add --dev husky lint-staged +bunx husky init +bun --eval "fs.writeFileSync('.husky/pre-commit','bunx lint-staged\n')" +``` + + + 2. Add the following to your `package.json`: @@ -130,7 +232,11 @@ For example, you can do the following to have Prettier run before each commit: } ``` -> Note: If you use ESLint, make sure lint-staged runs it before Prettier, not after. +:::note + +If you use ESLint, make sure lint-staged runs it before Prettier, not after. + +::: See [Pre-commit Hook](precommit.md) for more information. @@ -139,7 +245,7 @@ See [Pre-commit Hook](precommit.md) for more information. To summarize, we have learned to: - Install an exact version of Prettier locally in your project. This makes sure that everyone in the project gets the exact same version of Prettier. Even a patch release of Prettier can result in slightly different formatting, so you wouldn’t want different team members using different versions and formatting each other’s changes back and forth. -- Add a `.prettierrc.json` to let your editor know that you are using Prettier. +- Add a `.prettierrc` to let your editor know that you are using Prettier. - Add a `.prettierignore` to let your editor know which files _not_ to touch, as well as for being able to run `prettier --write .` to format the entire project (without mangling files you don’t want, or choking on generated files). - Run `prettier --check .` in CI to make sure that your project stays formatted. - Run Prettier from your editor for the best experience. diff --git a/docs/integrating-with-linters.md b/docs/integrating-with-linters.md index 0c4a7e339228..98ba92991519 100644 --- a/docs/integrating-with-linters.md +++ b/docs/integrating-with-linters.md @@ -8,7 +8,6 @@ Linters usually contain not only code quality rules, but also stylistic rules. M Luckily it’s easy to turn off rules that conflict or are unnecessary with Prettier, by using these pre-made configs: - [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) -- [stylelint-config-prettier](https://github.com/prettier/stylelint-config-prettier) Check out the above links for instructions on how to install and set things up. diff --git a/docs/option-philosophy.md b/docs/option-philosophy.md index fd3da01d0f6f..2c6f011bc568 100644 --- a/docs/option-philosophy.md +++ b/docs/option-philosophy.md @@ -3,9 +3,13 @@ id: option-philosophy title: Option Philosophy --- -> Prettier has a few options because of history. **But we won’t add more of them.** -> -> Read on to learn more. +:::info + +Prettier has a few options because of history. **But we won’t add more of them.** + +Read on to learn more. + +::: Prettier is not a kitchen-sink code formatter that attempts to print your code in any way you wish. It is _opinionated._ Quoting the [Why Prettier?](why-prettier.md) page: diff --git a/docs/options.md b/docs/options.md index 745ae88409e5..9f5bf1afeed0 100644 --- a/docs/options.md +++ b/docs/options.md @@ -9,19 +9,47 @@ Prettier ships with a handful of format options. If you change any options, it’s recommended to do it via a [configuration file](configuration.md). This way the Prettier CLI, [editor integrations](editors.md) and other tooling knows what options you use. +## Experimental Ternaries + +Try prettier's [new ternary formatting](https://github.com/prettier/prettier/pull/13183) before it becomes the default behavior. + +Valid options: + +- `true` - Use curious ternaries, with the question mark after the condition. +- `false` - Retain the default behavior of ternaries; keep question marks on the same line as the consequent. + +| Default | CLI Override | API Override | +| ------- | -------------------------- | ------------------------------- | +| `false` | `--experimental-ternaries` | `experimentalTernaries: ` | + +## Experimental Operator Position + +Valid options: + +- `"start"` - When binary expressions wrap lines, print operators at the start of new lines. +- `"end"` - Default behavior; when binary expressions wrap lines, print operators at the end of previous lines. + +| Default | CLI Override | API Override | +| ------- | --------------------------------------------------------------- | -------------------------------------------------------------- | +| `"end"` | --experimental-operator-position \ | experimentalOperatorPosition: "\" | + ## Print Width Specify the line length that the printer will wrap on. -> **For readability we recommend against using more than 80 characters:** -> -> In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don’t strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. -> -> Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. -> -> Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. -> -> In other words, don’t try to use printWidth as if it was ESLint’s [max-len](https://eslint.org/docs/rules/max-len) – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies. +:::warning + +**For readability we recommend against using more than 80 characters:** + +In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don’t strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. + +Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. + +Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. + +In other words, don’t try to use printWidth as if it was ESLint’s [max-len](https://eslint.org/docs/rules/max-len) – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies. + +::: | Default | CLI Override | API Override | | ------- | --------------------- | ------------------- | @@ -91,9 +119,9 @@ Valid options: - `"consistent"` - If at least one property in an object requires quotes, quote all properties. - `"preserve"` - Respect the input use of quotes in object properties. -| Default | CLI Override | API Override | -| ------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `"as-needed"` | --quote-props | quoteProps: "" | +| Default | CLI Override | API Override | +| ------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `"as-needed"` | --quote-props \ | quoteProps: "\" | Note that Prettier never unquotes numeric property names in Angular expressions, TypeScript, and Flow because the distinction between string and numeric keys is significant in these languages. See: [Angular][quote-props-angular], [TypeScript][quote-props-typescript], [Flow][quote-props-flow]. Also Prettier doesn’t unquote numeric properties for Vue (see the [issue][quote-props-vue] about that). @@ -102,8 +130,6 @@ Note that Prettier never unquotes numeric property names in Angular expressions, [quote-props-flow]: https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjOA7AzgFzAA8wBeMAb1TDAAYAuMARlQF8g [quote-props-vue]: https://github.com/prettier/prettier/issues/10127 -If this option is set to `preserve`, `singleQuote` to `false` (default value), and `parser` to `json5`, double quotes are always used for strings. This effectively allows using the `json5` parser for “JSON with comments and trailing commas”. - ## JSX Quotes Use single quotes instead of double quotes in JSX. @@ -114,19 +140,19 @@ Use single quotes instead of double quotes in JSX. ## Trailing Commas -_Default value changed from `none` to `es5` in v2.0.0_ +_Default value changed from `es5` to `all` in v3.0.0_ Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.) Valid options: -- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.). No trailing commas in type parameters in TypeScript. +- `"all"` - Trailing commas wherever possible (including [function parameters and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). To run, JavaScript code formatted this way needs an engine that supports ES2017 (Node.js 8+ or a modern browser) or [downlevel compilation](https://babeljs.io/docs/index). This also enables trailing commas in type parameters in TypeScript (supported since TypeScript 2.7 released in January 2018). +- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.). Trailing commas in type parameters in TypeScript and Flow. - `"none"` - No trailing commas. -- `"all"` - Trailing commas wherever possible (including [function parameters and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). To run, JavaScript code formatted this way needs an engine that supports ES2017 (Node.js 8+ or a modern browser) or [downlevel compilation](https://babeljs.io/docs/en/index). This also enables trailing commas in type parameters in TypeScript (supported since TypeScript 2.7 released in January 2018). -| Default | CLI Override | API Override | -| ------- | ------------------------------------------------------ | ------------------------------------------------------ | -| `"es5"` | --trailing-comma | trailingComma: "" | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `"all"` | --trailing-comma \ | trailingComma: "\" | ## Bracket Spacing @@ -141,6 +167,23 @@ Valid options: | ------- | ---------------------- | ------------------------ | | `true` | `--no-bracket-spacing` | `bracketSpacing: ` | +## Object Wrap + +_First available in v3.5.0_ + +Configure how Prettier wraps object literals when they could fit on one line or span multiple lines. + +By default, Prettier formats objects as multi-line if there is a newline prior to the first property. Authors can use this heuristic to contextually improve readability, though it has some downsides. See [Multi-line objects](rationale.md#multi-line-objects). + +Valid options: + +- `"preserve"` - Keep as multi-line, if there is a newline between the opening brace and first property. +- `"collapse"` - Fit to a single line when possible. + +| Default | CLI Override | API Override | +| ------------ | ---------------------------------------------------- | ---------------------------------------------------- | +| `"preserve"` | --object-wrap \ | objectWrap: "\" | + ## Bracket Line Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). @@ -178,7 +221,11 @@ Valid options: ## [Deprecated] JSX Brackets -_This option has been deprecated in v2.4.0, use --bracket-same-line instead_ +:::danger + +This option has been deprecated in v2.4.0, use --bracket-same-line instead. + +::: Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). @@ -224,9 +271,9 @@ Valid options: - `"always"` - Always include parens. Example: `(x) => x` - `"avoid"` - Omit parens when possible. Example: `x => x` -| Default | CLI Override | API Override | -| ---------- | ----------------------------------------------- | ----------------------------------------------- | -| `"always"` | --arrow-parens | arrowParens: "" | +| Default | CLI Override | API Override | +| ---------- | ------------------------------------------------ | ------------------------------------------------ | +| `"always"` | --arrow-parens \ | arrowParens: "\" | At first glance, avoiding parentheses may look like a better choice because of less visual noise. However, when Prettier removes parentheses, it becomes harder to add type annotations, extra arguments or default values as well as making other changes. @@ -241,8 +288,6 @@ These two options can be used to format code starting and ending at a given char - Backwards to the start of the first line containing the selected statement. - Forwards to the end of the selected statement. -These options cannot be used with `cursorOffset`. - | Default | CLI Override | API Override | | ---------- | --------------------- | ------------------- | | `0` | `--range-start ` | `rangeStart: ` | @@ -266,11 +311,12 @@ Valid options: - `"espree"` (via [espree](https://github.com/eslint/espree)) _First available in v2.2.0_ - `"meriyah"` (via [meriyah](https://github.com/meriyah/meriyah)) _First available in v2.2.0_ - `"acorn"` (via [acorn](https://github.com/acornjs/acorn)) _First available in v2.6.0_ -- `"css"` (via [postcss-scss](https://github.com/postcss/postcss-scss) and [postcss-less](https://github.com/shellscape/postcss-less), autodetects which to use) _First available in v1.7.1_ -- `"scss"` (same parsers as `"css"`, prefers postcss-scss) _First available in v1.7.1_ -- `"less"` (same parsers as `"css"`, prefers postcss-less) _First available in v1.7.1_ -- `"json"` (via [@babel/parser parseExpression](https://babeljs.io/docs/en/next/babel-parser.html#babelparserparseexpressioncode-options)) _First available in v1.5.0_ +- `"css"` (via [postcss](https://github.com/postcss/postcss)) _First available in v1.7.1_ +- `"scss"` (via [postcss-scss](https://github.com/postcss/postcss-scss)) _First available in v1.7.1_ +- `"less"` (via [postcss-less](https://github.com/shellscape/postcss-less)) _First available in v1.7.1_ +- `"json"` (via [@babel/parser parseExpression](https://babeljs.io/docs/babel-parser#babelparserparseexpressioncode-options)) _First available in v1.5.0_ - `"json5"` (same parser as `"json"`, but outputs as [json5](https://json5.org/)) _First available in v1.13.0_ +- `"jsonc"` (same parser as `"json"`, but outputs as "JSON with Comments") _First available in v3.2.0_ - `"json-stringify"` (same parser as `"json"`, but outputs like `JSON.stringify`) _First available in v1.13.0_ - `"graphql"` (via [graphql/language](https://github.com/graphql/graphql-js/tree/master/src/language)) _First available in v1.5.0_ - `"markdown"` (via [remark-parse](https://github.com/wooorm/remark/tree/main/packages/remark-parse)) _First available in v1.8.0_ @@ -279,16 +325,17 @@ Valid options: - `"vue"` (same parser as `"html"`, but also formats vue-specific syntax) _First available in 1.10.0_ - `"angular"` (same parser as `"html"`, but also formats angular-specific syntax via [angular-estree-parser](https://github.com/ikatyang/angular-estree-parser)) _First available in 1.15.0_ - `"lwc"` (same parser as `"html"`, but also formats LWC-specific syntax for unquoted template attributes) _First available in 1.17.0_ +- `"mjml"` (same parser as `"html"`, but also formats MJML-specific syntax) _First available in 3.6.0_ - `"yaml"` (via [yaml](https://github.com/eemeli/yaml) and [yaml-unist-parser](https://github.com/ikatyang/yaml-unist-parser)) _First available in 1.14.0_ -[Custom parsers](api.md#custom-parser-api) are also supported. _First available in v1.5.0. Deprecated. Will be removed in v3.0.0 (superseded by the Plugin API)_ - -| Default | CLI Override | API Override | -| ------- | ----------------------------------------------- | ---------------------------------------------------------- | -| None | `--parser `
`--parser ./my-parser` | `parser: ""`
`parser: require("./my-parser")` | +| Default | CLI Override | API Override | +| ------- | ------------------- | -------------------- | +| None | `--parser ` | `parser: ""` | Note: the default value was `"babylon"` until v1.13.0. +Note: the Custom parser API has been removed in v3.0.0. Use [plugins](plugins.md) instead ([how to migrate](api.md#custom-parser-api-removed)). + ## File Path @@ -347,6 +394,34 @@ Note that “in tandem” doesn’t mean “at the same time”. When the two op [adoption strategy]: https://prettier.io/blog/2017/05/03/1.3.0.html#facebook-adoption-update +## Check Ignore Pragma + +_First available in v3.6.0_ + +Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file. + +Checking for these markers incurs a small upfront cost during formatting, so it's not enabled by default. + +A file with the following as its first comment will **not** be formatted when `--check-ignore-pragma` is supplied: + +```js +/** + * @noprettier + */ +``` + +or + +```js +/** + * @noformat + */ +``` + +| Default | CLI Override | API Override | +| ------- | ----------------------- | --------------------------- | +| `false` | `--check-ignore-pragma` | `checkIgnorePragma: ` | + ## Prose Wrap _First available in v1.8.2_ @@ -359,9 +434,9 @@ Valid options: - `"never"` - Un-wrap each block of prose into one line. - `"preserve"` - Do nothing, leave prose as-is. _First available in v1.9.0_ -| Default | CLI Override | API Override | -| ------------ | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `"preserve"` | --prose-wrap | proseWrap: "" | +| Default | CLI Override | API Override | +| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `"preserve"` | --prose-wrap \ | proseWrap: "\" | ## HTML Whitespace Sensitivity @@ -377,9 +452,9 @@ Valid options: - `"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 | -| ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- | -| `"css"` | --html-whitespace-sensitivity | htmlWhitespaceSensitivity: "" | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| `"css"` | --html-whitespace-sensitivity \ | htmlWhitespaceSensitivity: "\" | ## Vue files script and style tags indentation @@ -428,9 +503,9 @@ Valid options: - `"auto"` - Maintain existing line endings (mixed values within one file are normalised by looking at what’s used after the first line) -| Default | CLI Override | API Override | -| ------- | ----------------------------------------------------------- | ---------------------------------------------------------- | -| `"lf"` | --end-of-line | endOfLine: "" | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| `"lf"` | --end-of-line \ | endOfLine: "\" | Setting `end_of_line` in an [`.editorconfig` file](https://editorconfig.org/) will configure Prettier’s end of line usage, unless overridden. @@ -449,15 +524,15 @@ Valid options: - `"auto"` – Format embedded code if Prettier can automatically identify it. - `"off"` - Never automatically format embedded code. -| Default | CLI Override | API Override | -| -------- | ----------------------------------------------------------- | ---------------------------------------------------------- | -| `"auto"` | --embedded-language-formatting= | embeddedLanguageFormatting: "" | +| Default | CLI Override | API Override | +| -------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| `"auto"` | --embedded-language-formatting=\ | embeddedLanguageFormatting: "\" | ## Single Attribute Per Line _First available in v2.6.0_ -Enforce single attribute per line in HTML, Vue and JSX. +Enforce single attribute per line in HTML, Vue, and JSX. Valid options: diff --git a/docs/plugins.md b/docs/plugins.md index c8645f69a839..e7e6c8864a7d 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -7,26 +7,25 @@ Plugins are ways of adding new languages or formatting rules to Prettier. Pretti ## Using Plugins -Plugins are automatically loaded if you have them installed in the same `node_modules` directory where `prettier` is located. Plugin package names must start with `@prettier/plugin-` or `prettier-plugin-` or `@/prettier-plugin-` to be registered. +You can load plugins with: -> `` should be replaced by a name, read more about [NPM scope](https://docs.npmjs.com/misc/scope.html). - -When plugins cannot be found automatically, you can load them with: - -- The [CLI](cli.md), via `--plugin-search-dir` and `--plugin`: +- The [CLI](cli.md), via `--plugin`: ```bash - prettier --write main.foo --plugin-search-dir=./dir-with-plugins --plugin=prettier-plugin-foo + prettier --write main.foo --plugin=prettier-plugin-foo ``` - > Tip: You can set `--plugin-search-dir` or `--plugin` options multiple times. + :::tip + + You can set `--plugin` options multiple times. + + ::: -- The [API](api.md), via the `pluginSearchDirs` and `plugins` options: +- The [API](api.md), via the `plugins` options: ```js - prettier.format("code", { + await prettier.format("code", { parser: "foo", - pluginSearchDirs: ["./dir-with-plugins"], plugins: ["prettier-plugin-foo"], }); ``` @@ -35,18 +34,11 @@ When plugins cannot be found automatically, you can load them with: ```json { - "pluginSearchDirs": ["./dir-with-plugins"], "plugins": ["prettier-plugin-foo"] } ``` -`pluginSearchDirs` and `plugins` are independent and one does not require the other. - -The paths that are provided to `pluginSearchDirs` will be searched for `@prettier/plugin-*`, `prettier-plugin-*`, and `@*/prettier-plugin-*`. For instance, these can be your project directory, a `node_modules` directory, the location of global npm modules, or any arbitrary directory that contains plugins. - -Strings provided to `plugins` are ultimately passed to `require()`, so you can provide a module/package name, a path, or anything else `require()` takes. (`pluginSearchDirs` works the same way. That is, valid plugin paths that it finds are passed to `require()`.) - -To turn off plugin autoloading, use `--no-plugin-search` when using Prettier CLI or add `{ pluginSearchDirs: false }` to options in `prettier.format()` or to the config file. +Strings provided to `plugins` are ultimately passed to [`import()` expression](https://nodejs.org/api/esm.html#import-expressions), so you can provide a module/package name, a path, or anything else `import()` takes. ## Official Plugins @@ -61,25 +53,28 @@ To turn off plugin autoloading, use `--no-plugin-search` when using Prettier CLI - [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro) by [**@withastro contributors**](https://github.com/withastro/prettier-plugin-astro/graphs/contributors) - [`prettier-plugin-elm`](https://github.com/gicentre/prettier-plugin-elm) by [**@giCentre**](https://github.com/gicentre) - [`prettier-plugin-erb`](https://github.com/adamzapasnik/prettier-plugin-erb) by [**@adamzapasnik**](https://github.com/adamzapasnik) +- [`prettier-plugin-gherkin`](https://github.com/mapado/prettier-plugin-gherkin) by [**@mapado**](https://github.com/mapado) - [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl) by [**@NaridaL**](https://github.com/NaridaL) - [`prettier-plugin-go-template`](https://github.com/NiklasPor/prettier-plugin-go-template) by [**@NiklasPor**](https://github.com/NiklasPor) - [`prettier-plugin-java`](https://github.com/jhipster/prettier-java) by [**@JHipster**](https://github.com/jhipster) +- [`prettier-plugin-jinja-template`](https://github.com/davidodenwald/prettier-plugin-jinja-template) by [**@davidodenwald**](https://github.com/davidodenwald) - [`prettier-plugin-jsonata`](https://github.com/Stedi/prettier-plugin-jsonata) by [**@Stedi**](https://github.com/Stedi) - [`prettier-plugin-kotlin`](https://github.com/Angry-Potato/prettier-plugin-kotlin) by [**@Angry-Potato**](https://github.com/Angry-Potato) - [`prettier-plugin-motoko`](https://github.com/dfinity/prettier-plugin-motoko) by [**@dfinity**](https://github.com/dfinity) - [`prettier-plugin-nginx`](https://github.com/joedeandev/prettier-plugin-nginx) by [**@joedeandev**](https://github.com/joedeandev) - [`prettier-plugin-prisma`](https://github.com/umidbekk/prettier-plugin-prisma) by [**@umidbekk**](https://github.com/umidbekk) - [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) by [**@eemeli**](https://github.com/eemeli) +- [`prettier-plugin-rust`](https://github.com/jinxdash/prettier-plugin-rust) by [**@jinxdash**](https://github.com/jinxdash) - [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh) by [**@JounQin**](https://github.com/JounQin) - [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql) by [**@JounQin**](https://github.com/JounQin) - [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) by [**@nene**](https://github.com/nene) - [`prettier-plugin-solidity`](https://github.com/prettier-solidity/prettier-plugin-solidity) by [**@mattiaerre**](https://github.com/mattiaerre) -- [`prettier-plugin-svelte`](https://github.com/UnwrittenFun/prettier-plugin-svelte) by [**@UnwrittenFun**](https://github.com/UnwrittenFun) -- [`prettier-plugin-toml`](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml) by [**@bd82**](https://github.com/bd82) +- [`prettier-plugin-svelte`](https://github.com/sveltejs/prettier-plugin-svelte) by [**@sveltejs**](https://github.com/sveltejs) +- [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml) by [**@JounQin**](https://github.com/JounQin) and [**@so1ve**](https://github.com/so1ve) ## Developing Plugins -Prettier plugins are regular JavaScript modules with five exports: +Prettier plugins are regular JavaScript modules with the following five exports or default export with the following properties: - `languages` - `parsers` @@ -115,9 +110,10 @@ The key must match the name in the `parsers` array from `languages`. The value c export const parsers = { "dance-parse": { parse, - // The name of the AST that + // The name of the AST that the parser produces. astFormat: "dance-ast", hasPragma, + hasIgnorePragma, locStart, locEnd, preprocess, @@ -128,7 +124,7 @@ export const parsers = { The signature of the `parse` function is: ```ts -function parse(text: string, parsers: object, options: object): AST; +function parse(text: string, options: object): Promise | AST; ``` The location extraction functions (`locStart` and `locEnd`) return the starting and ending locations of a given AST node: @@ -143,6 +139,12 @@ _(Optional)_ The pragma detection function (`hasPragma`) should return if the te function hasPragma(text: string): boolean; ``` +_(Optional)_ The "ignore pragma" detection function (`hasIgnorePragma`) should return if the text contains a pragma indicating the text should not be formatted. + +```ts +function hasIgnorePragma(text: string): boolean; +``` + _(Optional)_ The preprocess function can process the input text before passing into `parse` function. ```ts @@ -161,6 +163,7 @@ export const printers = { print, embed, preprocess, + getVisitorKeys, insertPragma, canAttachComment, isBlockComment, @@ -180,14 +183,19 @@ export const printers = { Prettier uses an intermediate representation, called a Doc, which Prettier then turns into a string (based on options like `printWidth`). A _printer_'s job is to take the AST generated by `parsers[].parse` and return a Doc. A Doc is constructed using [builder commands](https://github.com/prettier/prettier/blob/main/commands.md): ```js -const { join, line, ifBreak, group } = require("prettier").doc.builders; +import { doc } from "prettier"; + +const { join, line, ifBreak, group } = doc.builders; ``` -The printing process works as follows: +The printing process consists of the following steps: -1. `preprocess(ast: AST, options: object): AST`, if available, is called. It is passed the AST from the _parser_. The AST returned by `preprocess` will be used by Prettier. If `preprocess` is not defined, the AST returned from the _parser_ will be used. -2. Comments are attached to the AST (see _Handling comments in a printer_ for details). -3. A Doc is recursively constructed from the AST. i) `embed(path: AstPath, print, textToDoc, options: object): Doc | null` is called on each AST node. If `embed` returns a Doc, that Doc is used. ii) If `embed` is undefined or returns a falsy value, `print(path: AstPath, options: object, print): Doc` is called on each AST node. +1. **AST preprocessing** (optional). See [`preprocess`](#optional-preprocess). +2. **Comment attachment** (optional). See [Handling comments in a printer](#handling-comments-in-a-printer). +3. **Processing embedded languages** (optional). The [`embed`](#optional-embed) method, if defined, is called for each node, depth-first. While, for performance reasons, the recursion itself is synchronous, `embed` may return asynchronous functions that can call other parsers and printers to compose docs for embedded syntaxes like CSS-in-JS. These returned functions are queued up and sequentially executed before the next step. +4. **Recursive printing**. A doc is recursively constructed from the AST. Starting from the root node: + - If, from the step 3, there is an embedded language doc associated with the current node, this doc is used. + - Otherwise, the `print(path, options, print): Doc` method is called. It composes a doc for the current node, often by printing child nodes using the `print` callback. #### `print` @@ -199,25 +207,25 @@ function print( path: AstPath, options: object, // Recursively print a child node - print: (selector?: string | number | Array | AstPath) => Doc + print: (selector?: string | number | Array | AstPath) => Doc, ): Doc; ``` The `print` function is passed the following parameters: -- **`path`**: An object, which can be used to access nodes in the AST. It’s a stack-like data structure that maintains the current state of the recursion. It is called “path” because it represents the path to the current node from the root of the AST. The current node is returned by `path.getValue()`. +- **`path`**: An object, which can be used to access nodes in the AST. It’s a stack-like data structure that maintains the current state of the recursion. It is called “path” because it represents the path to the current node from the root of the AST. The current node is returned by `path.node`. - **`options`**: A persistent object, which contains global options and which a plugin may mutate to store contextual data. - **`print`**: A callback for printing sub-nodes. This function contains the core printing logic that consists of steps whose implementation is provided by plugins. In particular, it calls the printer’s `print` function and passes itself to it. Thus, the two `print` functions – the one from the core and the one from the plugin – call each other while descending down the AST recursively. Here’s a simplified example to give an idea of what a typical implementation of `print` looks like: ```js -const { - builders: { group, indent, join, line, softline }, -} = require("prettier").doc; +import { doc } from "prettier"; + +const { group, indent, join, line, softline } = doc.builders; function print(path, options, print) { - const node = path.getValue(); + const node = path.node; switch (node.type) { case "list": @@ -248,42 +256,112 @@ Check out [prettier-python's printer](https://github.com/prettier/prettier-pytho #### (optional) `embed` -The `embed` function is called when the plugin needs to print one language inside another. Examples of this are printing CSS-in-JS or fenced code blocks in Markdown. Its signature is: +A printer can have the `embed` method to print one language inside another. Examples of this are printing CSS-in-JS or fenced code blocks in Markdown. The signature is: ```ts function embed( // Path to the current AST node path: AstPath, - // Print a node with the current printer - print: (selector?: string | number | Array | AstPath) => Doc, - // Parse and print some text using a different parser. - // You should set `options.parser` to specify which parser to use. - textToDoc: (text: string, options: object) => Doc, // Current options - options: object -): Doc | null; + options: Options, +): + | (( + // Parses and prints the passed text using a different parser. + // You should set `options.parser` to specify which parser to use. + textToDoc: (text: string, options: Options) => Promise, + // Prints the current node or its descendant node with the current printer + print: ( + selector?: string | number | Array | AstPath, + ) => Doc, + // The following two arguments are passed for convenience. + // They're the same `path` and `options` that are passed to `embed`. + path: AstPath, + options: Options, + ) => Promise | Doc | undefined) + | Doc + | undefined; ``` -The `embed` function acts like the `print` function, except that it is passed an additional `textToDoc` function, which can be used to render a doc using a different plugin. The `embed` function returns a Doc or a falsy value. If a falsy value is returned, the `print` function is called with the current `path`. If a Doc is returned, that Doc is used in printing and the `print` function is not called. +The `embed` method is similar to the `print` method in that it maps AST nodes to docs, but unlike `print`, it has power to do async work by returning an async function. That function's first parameter, the `textToDoc` async function, can be used to render a doc using a different plugin. + +If a function returned from `embed` returns a doc or a promise that resolves to a doc, that doc will be used in printing, and the `print` method won’t be called for this node. It's also possible and, in rare situations, might be convenient to return a doc synchronously directly from `embed`, however `textToDoc` and the `print` callback aren’t available at that case. Return a function to get them. -For example, a plugin that had nodes with embedded JavaScript might have the following `embed` function: +If `embed` returns `undefined`, or if a function it returned returns `undefined` or a promise that resolves to `undefined`, the node will be printed normally with the `print` method. Same will happen if a returned function throws an error or returns a promise that rejects (e.g., if a parsing error has happened). Set the `PRETTIER_DEBUG` environment variable to a non-empty value if you want Prettier to rethrow these errors. + +For example, a plugin that has nodes with embedded JavaScript might have the following `embed` method: ```js -function embed(path, print, textToDoc, options) { - const node = path.getValue(); +function embed(path, options) { + const node = path.node; if (node.type === "javascript") { - return textToDoc(node.javaScriptText, { ...options, parser: "babel" }); + return async (textToDoc) => { + return [ + "", + ]; + }; } - return false; } ``` +If the [`--embedded-language-formatting`](options.md#embedded-language-formatting) option is set to `off`, the embedding step is entirely skipped, `embed` isn’t called, and all nodes are printed with the `print` method. + #### (optional) `preprocess` -The preprocess function can process the AST from parser before passing into `print` function. +The `preprocess` method can process the AST from the parser before passing it into the `print` method. ```ts -function preprocess(ast: AST, options: object): AST; +function preprocess(ast: AST, options: Options): AST | Promise; +``` + +#### (optional) `getVisitorKeys` + +This property might come in handy if the plugin uses comment attachment or embedded languages. These features traverse the AST iterating through all the own enumerable properties of each node starting from the root. If the AST has [cycles](), such a traverse ends up in an infinite loop. Also, nodes might contain non-node objects (e.g., location data), iterating through which is a waste of resources. To solve these issues, the printer can define a function to return property names that should be traversed. + +Its signature is: + +```ts +function getVisitorKeys(node, nonTraversableKeys: Set): string[]; +``` + +The default `getVisitorKeys`: + +```js +function getVisitorKeys(node, nonTraversableKeys) { + return Object.keys(node).filter((key) => !nonTraversableKeys.has(key)); +} +``` + +The second argument `nonTraversableKeys` is a set of common keys and keys that prettier used internal. + +If you have full list of visitor keys + +```js +const visitorKeys = { + Program: ["body"], + Identifier: [], + // ... +}; + +function getVisitorKeys(node /* , nonTraversableKeys*/) { + // Return `[]` for unknown node to prevent Prettier fallback to use `Object.keys()` + return visitorKeys[node.type] ?? []; +} +``` + +If you only need exclude a small set of keys + +```js +const ignoredKeys = new Set(["prev", "next", "range"]); + +function getVisitorKeys(node, nonTraversableKeys) { + return Object.keys(node).filter( + (key) => !nonTraversableKeys.has(key) && !ignoredKeys.has(key), + ); +} ``` #### (optional) `insertPragma` @@ -309,7 +387,7 @@ function getCommentChildNodes( // The node whose children should be returned. node: AST, // Current options - options: object + options: object, ): AST[] | undefined; ``` @@ -324,7 +402,7 @@ function printComment( // Path to the current comment node commentPath: AstPath, // Current options - options: object + options: object, ): Doc; ``` @@ -355,18 +433,18 @@ Returns whether or not the AST node is a block comment. The `handleComments` object contains three optional functions, each with signature ```ts -function( - // The AST node corresponding to the comment - comment: AST, - // The full source code text - text: string, - // The global options object - options: object, - // The AST - ast: AST, - // Whether this comment is the last comment - isLastComment: boolean -): boolean +( + // The AST node corresponding to the comment + comment: AST, + // The full source code text + text: string, + // The global options object + options: object, + // The AST + ast: AST, + // Whether this comment is the last comment + isLastComment: boolean, +) => boolean; ``` These functions are used to override Prettier's default comment attachment algorithm. `ownLine`/`endOfLine`/`remaining` is expected to either manually attach a comment to a node and return `true`, or return `false` and let Prettier attach the comment. @@ -384,7 +462,7 @@ At the time of dispatching, Prettier will have annotated each AST comment node ( The `util.addTrailingComment`/`addLeadingComment`/`addDanglingComment` functions can be used to manually attach a comment to an AST node. An example `ownLine` function that ensures a comment does not follow a "punctuation" node (made up for demonstration purposes) might look like: ```js -const { util } = require("prettier"); +import { util } from "prettier"; function ownLine(comment, text, options, ast, isLastComment) { const { precedingNode } = comment; @@ -411,54 +489,142 @@ The `--debug-print-comments` CLI flag can help with debugging comment attachment Example: ```js -options: { - openingBraceNewLine: { - type: "boolean", - category: "Global", - default: true, - description: "Move open brace for code blocks onto new line." - } -} +export default { + // ... plugin implementation + options: { + openingBraceNewLine: { + type: "boolean", + category: "Global", + default: true, + description: "Move open brace for code blocks onto new line.", + }, + }, +}; ``` ### `defaultOptions` If your plugin requires different default values for some of Prettier’s core options, you can specify them in `defaultOptions`: -``` -defaultOptions: { - tabWidth: 4 -} +```js +export default { + // ... plugin implementation + defaultOptions: { + tabWidth: 4, + }, +}; ``` ### Utility functions A `util` module from Prettier core is considered a private API and is not meant to be consumed by plugins. Instead, the `util-shared` module provides the following limited set of utility functions for plugins: - ```ts type Quote = '"' | "'"; type SkipOptions = { backwards?: boolean }; -function getMaxContinuousCount(str: string, target: string): number; + +function getMaxContinuousCount(text: string, searchString: string): number; + function getStringWidth(text: string): number; -function getAlignmentSize(value: string, tabWidth: number, startIndex?: number): number; + +function getAlignmentSize( + text: string, + tabWidth: number, + startIndex?: number, +): number; + function getIndentSize(value: string, tabWidth: number): number; -function skip(chars: string | RegExp): (text: string, index: number | false, opts?: SkipOptions) => number | false; -function skipWhitespace(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipSpaces(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipToLineEnd(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipEverythingButNewLine(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipInlineComment(text: string, index: number | false): number | false; -function skipTrailingComment(text: string, index: number | false): number | false; -function skipNewline(text: string, index: number | false, opts?: SkipOptions): number | false; -function hasNewline(text: string, index: number, opts?: SkipOptions): boolean; -function hasNewlineInRange(text: string, start: number, end: number): boolean; -function hasSpaces(text: string, index: number, opts?: SkipOptions): boolean; -function makeString(rawContent: string, enclosingQuote: Quote, unescapeUnnecessaryEscapes?: boolean): string; -function getNextNonSpaceNonCommentCharacterIndex(text: string, node: N, locEnd: (node: N) => number): number | false; -function isNextLineEmptyAfterIndex(text: string, index: number): boolean; -function isNextLineEmpty(text: string, node: N, locEnd: (node: N) => number): boolean; -function isPreviousLineEmpty(text: string, node: N, locStart: (node: N) => number): boolean; + +function skip( + characters: string | RegExp, +): ( + text: string, + startIndex: number | false, + options?: SkipOptions, +) => number | false; + +function skipWhitespace( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipSpaces( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipToLineEnd( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipEverythingButNewLine( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipInlineComment( + text: string, + startIndex: number | false, +): number | false; + +function skipTrailingComment( + text: string, + startIndex: number | false, +): number | false; + +function skipNewline( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function hasNewline( + text: string, + startIndex: number, + options?: SkipOptions, +): boolean; + +function hasNewlineInRange( + text: string, + startIndex: number, + startIndex: number, +): boolean; + +function hasSpaces( + text: string, + startIndex: number, + options?: SkipOptions, +): boolean; + +function getPreferredQuote( + text: string, + preferredQuoteOrPreferSingleQuote: Quote | boolean, +): Quote; + +function makeString( + rawText: string, + enclosingQuote: Quote, + unescapeUnnecessaryEscapes?: boolean, +): string; + +function getNextNonSpaceNonCommentCharacter( + text: string, + startIndex: number, +): string; + +function getNextNonSpaceNonCommentCharacterIndex( + text: string, + startIndex: number, +): number | false; + +function isNextLineEmpty(text: string, startIndex: number): boolean; + +function isPreviousLineEmpty(text: string, startIndex: number): boolean; ``` ### Tutorials @@ -470,9 +636,9 @@ function isPreviousLineEmpty(text: string, node: N, locStart: (node: N) => nu Since plugins can be resolved using relative paths, when working on one you can do: ```js -const prettier = require("prettier"); +import * as prettier from "prettier"; const code = "(add 1 2)"; -prettier.format(code, { +await prettier.format(code, { parser: "lisp", plugins: ["."], }); diff --git a/docs/precommit.md b/docs/precommit.md index b093dad18701..dcaaf92c4e85 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -3,6 +3,9 @@ id: precommit title: Pre-commit Hook --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + You can use Prettier with a pre-commit tool. This can re-format your files that are marked as “staged” via `git add` before you commit. ## Option 1. [lint-staged](https://github.com/okonet/lint-staged) @@ -19,49 +22,54 @@ This will install [husky](https://github.com/typicode/husky) and [lint-staged](h Read more at the [lint-staged](https://github.com/okonet/lint-staged#configuration) repo. -## Option 2. [pretty-quick](https://github.com/azz/pretty-quick) +## Option 2. [pretty-quick](https://github.com/prettier/pretty-quick) **Use Case:** Great for when you want an entire file formatting on your changed/staged files. -Install it along with [husky](https://github.com/typicode/husky): +Install it along with [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks): - - + + ```bash -npx husky-init -npm install --save-dev pretty-quick -npx husky set .husky/pre-commit "npx pretty-quick --staged" +npm install --save-dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "npx pretty-quick --staged"\n}\n' > .simple-git-hooks.json +npx simple-git-hooks ``` - + + ```bash -npx husky-init # add --yarn2 for Yarn 2 -yarn add --dev pretty-quick -yarn husky set .husky/pre-commit "npx pretty-quick --staged" +yarn add --dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "yarn pretty-quick --staged"\n}\n' > .simple-git-hooks.json +yarn simple-git-hooks ``` - - -Read more at the [pretty-quick](https://github.com/azz/pretty-quick) repo. + + -## Option 3. [pre-commit](https://github.com/pre-commit/pre-commit) - -**Use Case:** Great when working with multi-language projects. +```bash +pnpm add --save-dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "pnpm pretty-quick --staged"\n}\n' > .simple-git-hooks.json +pnpm simple-git-hooks +``` -Copy the following config into your `.pre-commit-config.yaml` file: + + -```yaml -- repo: https://github.com/pre-commit/mirrors-prettier - rev: "" # Use the sha or tag you want to point at - hooks: - - id: prettier +```bash +bun add --dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "bun pretty-quick --staged"\n}\n' > .simple-git-hooks.json +bun simple-git-hooks ``` -Read more at [mirror of prettier package for pre-commit](https://github.com/pre-commit/mirrors-prettier) and the [pre-commit](https://pre-commit.com) website. + + -## Option 4. [Husky.Net](https://github.com/alirezanet/Husky.Net) +Read more at the [pretty-quick](https://github.com/prettier/pretty-quick) repo. + +## Option 3. [Husky.Net](https://github.com/alirezanet/Husky.Net) **Use Case:** A dotnet solution to use Prettier along with other code quality tools (e.g. dotnet-format, ESLint, Stylelint, etc.). It supports multiple file states (staged - last-commit, git-files etc.) @@ -82,7 +90,7 @@ after installation you can add prettier task to the `task-runner.json`. } ``` -## Option 5. [git-format-staged](https://github.com/hallettj/git-format-staged) +## Option 4. [git-format-staged](https://github.com/hallettj/git-format-staged) **Use Case:** Great for when you want to format partially-staged files, and other options do not provide a good fit for your project. @@ -95,30 +103,50 @@ Git-format-staged is used to run any formatter that can accept file content via Git-format-staged requires Python v3 or v2.7. Python is usually pre-installed on Linux and macOS, but not on Windows. Use git-format-staged with [husky](https://github.com/typicode/husky): - - + + ```bash -npx husky-init +npx husky init npm install --save-dev git-format-staged -npx husky set .husky/pre-commit "git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' ." +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" ``` - + + ```bash -npx husky-init # add --yarn2 for Yarn 2 +yarn husky init yarn add --dev git-format-staged -yarn husky set .husky/pre-commit "git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' ." +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" +``` + + + + +```bash +pnpm exec husky init +pnpm add --save-dev git-format-staged +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" +``` + + + + +```bash +bunx husky init +bun add --dev git-format-staged +bun --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" ``` - + + Add or remove file extensions to suit your project. Note that regardless of which extensions you list formatting will respect any `.prettierignore` files in your project. To read about how git-format-staged works see [Automatic Code Formatting for Partially-Staged Files](https://www.olioapps.com/blog/automatic-code-formatting/). -## Option 6. Shell script +## Option 5. Shell script Alternately you can save this script as `.git/hooks/pre-commit` and give it execute permission: diff --git a/docs/rationale.md b/docs/rationale.md index 569f0de6c1bd..8884cb0a44e1 100644 --- a/docs/rationale.md +++ b/docs/rationale.md @@ -13,9 +13,9 @@ The first requirement of Prettier is to output valid code that has the exact sam ### Strings -Double or single quotes? Prettier chooses the one which results in the fewest number of escapes. `"It's gettin' better!"`, not `'It\'s gettin\' better!'`. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes (but that can be changed via the [singleQuote](options.html#quotes) option). +Double or single quotes? Prettier chooses the one which results in the fewest number of escapes. `"It's gettin' better!"`, not `'It\'s gettin\' better!'`. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes (but that can be changed via the [singleQuote](/docs/options#quotes) option). -JSX has its own option for quotes: [jsxSingleQuote](options.html#jsx-quotes). +JSX has its own option for quotes: [jsxSingleQuote](/docs/options#jsx-quotes). JSX takes its roots from HTML, where the dominant use of quotes for attributes is double quotes. Browser developer tools also follow this convention by always displaying HTML with double quotes, even if the source code uses single quotes. A separate option allows using single quotes for JS and double quotes for "HTML" (JSX). Prettier maintains the way your string is escaped. For example, `"🙂"` won’t be formatted into `"\uD83D\uDE42"` and vice versa. @@ -29,9 +29,11 @@ It turns out that empty lines are very hard to automatically generate. The appro ### Multi-line objects -By default, Prettier’s printing algorithm prints expressions on a single line if they fit. Objects are used for a lot of different things in JavaScript, though, and sometimes it really helps readability if they stay multiline. See [object lists], [nested configs], [stylesheets] and [keyed methods], for example. We haven’t been able to find a good rule for all those cases, so Prettier instead keeps objects multiline if there’s a newline between the `{` and the first key in the original source code. A consequence of this is that long singleline objects are automatically expanded, but short multiline objects are never collapsed. +By default, Prettier’s printing algorithm prints expressions on a single line if they fit. Objects are used for a lot of different things in JavaScript, though, and sometimes it really helps readability if they stay multiline. See [object lists], [nested configs], [stylesheets] and [keyed methods], for example. We haven’t been able to find a good rule for all those cases, so by default Prettier keeps objects multi-line if there’s a newline between the `{` and the first key in the original source code. Consequently, long single-line objects are automatically expanded, but short multi-line objects are never collapsed. -**Tip:** If you have a multiline object that you’d like to join up into a single line: +You can disable this conditional behavior with the [`objectWrap`](options.md#object-wrap) option. + +**Tip:** If you have a multi-line object that you’d like to join up into a single line: ```js const user = { @@ -55,7 +57,7 @@ const user = { name: "John Doe", const user = { name: "John Doe", age: 30 }; ``` -And if you’d like to go multiline again, add in a newline after `{`: +And if you’d like to go multi-line again, add in a newline after `{`: ```js @@ -77,17 +79,19 @@ 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. +:::note[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. -```js +```ts @Component({ selector: "hero-button", template: ``, @@ -108,14 +112,14 @@ class HeroButtonComponent { There’s one exception: classes. We don’t think it ever makes sense to inline the decorators for them, so they are always moved to their own line. -```js +```ts // Before running Prettier: @observer class OrderLine { @observable price: number = 0; } ``` -```js +```ts // After running Prettier: @observer class OrderLine { @@ -125,7 +129,7 @@ class OrderLine { Note: Prettier 1.14.x and older tried to automatically move your decorators, so if you've run an older Prettier version on your code you might need to manually join up some decorators here and there to avoid inconsistencies: -```js +```ts @observer class OrderLine { @observable price: number = 0; @@ -134,15 +138,21 @@ class OrderLine { } ``` -One final thing: TC39 has [not yet decided if decorators come before or after `export`](https://github.com/tc39/proposal-decorators/issues/69). In the meantime, Prettier supports both: +### Template literals + +Template literals can contain interpolations. Deciding whether it's appropriate to insert a linebreak within an interpolation unfortunately depends on the semantic content of the template - for example, introducing a linebreak in the middle of a natural-language sentence is usually undesirable. Since Prettier doesn't have enough information to make this decision itself, it uses a heuristic similar to that used for objects: it will only split an interpolation expression across multiple lines if there was already a linebreak within that interpolation. + +This means that a literal like the following will not be broken onto multiple lines, even if it exceeds the print width: ```js -@decorator export class Foo {} - -export @decorator class Foo {} +`this is a long message which contains an interpolation: ${format(data)} <- like this`; ``` +If you want Prettier to split up an interpolation, you'll need to ensure there's a linebreak somewhere within the `${...}`. Otherwise it will keep everything on a single line, no matter how long it is. + +The team would prefer not to depend on the original formatting in this way, but it's the best heuristic we have at the moment. + ### Semicolons This is about using the [noSemi](options.md#semicolons) option. @@ -211,7 +221,7 @@ console.log("Running a background task")(async () => { The [printWidth](options.md#print-width) option is more of a guideline to Prettier than a hard rule. It is not the upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified print width. -There are some edge cases, such as really long string literals, regexps, comments and variable names, which cannot be broken across lines (without using code transforms which [Prettier doesn’t do](#what-prettier-is-_not_-concerned-about)). Or if you nest your code 50 levels deep your lines are of course going to be mostly indentation :) +There are some edge cases, such as really long string literals, regexps, comments and variable names, which cannot be broken across lines (without using code transforms which [Prettier doesn’t do](#what-prettier-is-not-concerned-about)). Or if you nest your code 50 levels deep your lines are of course going to be mostly indentation :) Apart from that, there are a few cases where Prettier intentionally exceeds the print width. @@ -331,6 +341,10 @@ If possible, prefer comments that operate on line ranges (e.g. `eslint-disable` Prettier is often able to recognize and format non-standard syntax such as ECMAScript early-stage proposals and Markdown syntax extensions not defined by any specification. The support for such syntax is considered best-effort and experimental. Incompatibilities may be introduced in any release and should not be viewed as breaking changes. +## Disclaimer about machine-generated files + +Some files, like `package.json` or `composer.lock`, are machine-generated and regularly updated by the package manager. If Prettier were to use the same JSON formatting rules as with other files, it would regularly conflict with these other tools. To avoid this inconvenience, Prettier will use a formatter based on `JSON.stringify` on such files instead. You may notice these differences, such as the removal of vertical whitespace, but this is an intended behavior. + ## What Prettier is _not_ concerned about Prettier only _prints_ code. It does not transform it. This is to limit the scope of Prettier. Let’s focus on the printing and do it really well! diff --git a/docs/related-projects.md b/docs/related-projects.md index 75d160ce98f8..32c1fdedfba2 100644 --- a/docs/related-projects.md +++ b/docs/related-projects.md @@ -30,3 +30,4 @@ title: Related Projects - [prettier-chrome](https://github.com/u3u/prettier-chrome) is an extension that runs Prettier in the browser - [spotless](https://github.com/diffplug/spotless) lets you run prettier from [gradle](https://github.com/diffplug/spotless/tree/main/plugin-gradle#prettier) or [maven](https://github.com/diffplug/spotless/tree/main/plugin-maven#prettier). - [csharpier](https://github.com/belav/csharpier) is a port of Prettier for C# +- [reviewdog-action-prettier](https://github.com/EPMatt/reviewdog-action-prettier) runs Prettier in GitHub Actions CI/CD workflows diff --git a/docs/sharing-configurations.md b/docs/sharing-configurations.md new file mode 100644 index 000000000000..50490bb29a31 --- /dev/null +++ b/docs/sharing-configurations.md @@ -0,0 +1,223 @@ +--- +id: sharing-configurations +title: Sharing configurations +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +In case you have many different projects, it can be helpful to have a **shared configuration** which can be used in all of them, instead of copy-pasting the same config for every project. + +This page explains how to create, publish and consume a shareable config. + +## Creating a Shareable Config + +Sharable configs are just [npm packages](https://docs.npmjs.com/about-packages-and-modules#about-packages) that export a single [prettier config file](./configuration.md). + +Before we start, make sure you have: + +- An account for [npmjs.com](https://www.npmjs.com/) to publish the package +- Basic understating about [how to create a Node.js module](https://docs.npmjs.com/creating-node-js-modules) + +First, create a new package. We recommend creating a [scoped package](https://docs.npmjs.com/cli/v10/using-npm/scope) with the name `@username/prettier-config`. + +A minimal package should have at least two files. A `package.json` for the package configuration and an `index.js` which holds the shared prettier configuration object: + +```text +prettier-config/ +├── index.js +└── package.json +``` + +Example `package.json`: + +```json +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "prettier": ">=3.0.0" + } +} +``` + +`index.js` is where you put the shared configuration. This file just exports a [regular prettier configuration](./configuration.md) with the same syntax and same options: + +```js +const config = { + trailingComma: "es5", + tabWidth: 4, + singleQuote: true, +}; + +export default config; +``` + +An example shared configuration repository is available [here](https://github.com/azz/prettier-config). + +## Publishing a Shareable Config + +Once you are ready, you can [publish your package to npm](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages#publishing-scoped-public-packages): + +```bash +npm publish +``` + +## Using a Shareable Config + +You first need to install your published configuration, for example: + + + + +```bash +npm install --save-dev @username/prettier-config +``` + + + + +```bash +yarn add --dev @username/prettier-config +``` + + + + +```bash +pnpm add --save-dev @username/prettier-config +``` + + + + +```bash +bun add --dev @username/prettier-config +``` + + + + +Then, you can reference it in your `package.json`: + +```json +{ + "name": "my-cool-library", + "version": "1.0.0", + "prettier": "@username/prettier-config" +} +``` + +If you don’t want to use `package.json`, you can use any of the supported extensions to export a string, e.g. `.prettierrc`: + +```json +"@company/prettier-config" +``` + +### Extending a Sharable Config + +To _extend_ the configuration to overwrite some properties from the shared configuration, import the file in a `.prettierrc.mjs` file and export the modifications, e.g: + +```js +import usernamePrettierConfig from "@username/prettier-config"; + +/** + * @type {import("prettier").Config} + */ +const config = { + ...usernamePrettierConfig, + semi: false, +}; + +export default config; +``` + +## Other examples + +### Using Type Annotation in the Shared Config + +You can get type safety and autocomplete support in your shared configuration by using a `jsdoc` type annotation: + +```js +/** + * @type {import("prettier").Config} + */ +const config = { + trailingComma: "es5", + tabWidth: 4, + semi: false, + singleQuote: true, +}; + +export default config; +``` + +In order to make this work, you have to [install `prettier`](./install.md) for the project. + +After that, your `package.json` file should look like this: + +```diff +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "prettier": ">=3.0.0" + }, ++ "devDependencies": { ++ "prettier": "^3.3.3" ++ } +} +``` + +### Include Plugins in Shareable Configurations + +In case you want to use [plugins](./plugins.md) in your shared configuration, you need to declare those plugins in the config file's `plugin` array and as `dependencies` in `package.json`: + +```js +// index.js +const config = { + singleQuote: true, + plugins: ["prettier-plugin-xml"], +}; + +export default config; +``` + +```diff +// package.json +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, ++ "dependencies": { ++ "prettier-plugin-xml": "3.4.1" ++ }, + "peerDependencies": { + "prettier": ">=3.0.0" + } +} +``` + +An example repository can be found [here](https://github.com/kachkaev/routine-npm-packages/tree/bc3e658f88c0b41beb118c7a1b9b91ec647f8478/packages/prettier-config) + +**Note:** You can use [`peerDependencies`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#peerdependencies) instead of [`dependencies`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies). To learn about their differences, you can read [this blog post from Domenic Denicola about peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies) diff --git a/docs/webstorm.md b/docs/webstorm.md index 4dad0c3db261..262cad7b29d2 100644 --- a/docs/webstorm.md +++ b/docs/webstorm.md @@ -13,7 +13,7 @@ Once it’s done, you can do a few things in your IDE. You can use the **Reforma You can also configure WebStorm to run Prettier on save (_Cmd+S/Ctrl+S_) or use it as the default formatter (_Opt+Cmd+L/Ctrl+Alt+L_). For this, open _Preferences / Settings | Languages & Frameworks | JavaScript | Prettier_ and tick the corresponding checkbox: **On save** and/or **On ‘Reformat Code’** action. -![Example](/docs/assets/webstorm/prettier-settings.png) +![Example](/images/webstorm/prettier-settings.png) By default, WebStorm will apply formatting to all _.js, .ts, .jsx_, and _.tsx_ files that you’ve edited in your project. To apply the formatting to other file types, or to limit formatting to files located only in specific directories, you can customize the default configuration by using [glob patterns](https://github.com/isaacs/node-glob). diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000000..964ef20ca937 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,491 @@ +import url from "node:url"; +import eslintPluginJs from "@eslint/js"; +import eslintPluginEslintReact from "@eslint-react/eslint-plugin"; +import eslintPluginStylistic from "@stylistic/eslint-plugin"; +import eslintPluginTypescriptEslint from "@typescript-eslint/eslint-plugin"; +import { isCI } from "ci-info"; +import eslintConfigPrettier from "eslint-config-prettier"; +import eslintPluginJest from "eslint-plugin-jest"; +import eslintPluginN from "eslint-plugin-n"; +import eslintPluginRegexp from "eslint-plugin-regexp"; +import eslintPluginSimpleImportSort from "eslint-plugin-simple-import-sort"; +import eslintPluginUnicorn from "eslint-plugin-unicorn"; +import globals from "globals"; +import eslintPluginPrettierInternalRules from "./scripts/tools/eslint-plugin-prettier-internal-rules/index.js"; + +const toPath = (file) => url.fileURLToPath(new URL(file, import.meta.url)); + +const ignores = ` +**/.tmp +test*.* +# Ignore directories and files in 'tests/format' +tests/format/**/* +# Unignore directories and 'format.test.js' file +!tests/format/**/ +!tests/format/**/format.test.js +tests/integration/cli/ +scripts/release/node_modules +coverage/ +dist*/ +**/node_modules/** +website/build/ +website/static/lib/ +website/static/playground/ +website/.docusaurus +scripts/benchmark/*/ +**/.yarn/** +**/.pnp.* +` + .split("\n") + .filter((pattern) => pattern && !pattern.startsWith("#")); + +export default [ + eslintPluginJs.configs.recommended, + eslintPluginRegexp.configs["flat/recommended"], + eslintPluginUnicorn.configs["flat/recommended"], + eslintConfigPrettier, + { + languageOptions: { + globals: { ...globals.builtin, ...globals.node }, + }, + plugins: { + "@stylistic": eslintPluginStylistic, + "@typescript-eslint": eslintPluginTypescriptEslint, + n: eslintPluginN, + "prettier-internal-rules": eslintPluginPrettierInternalRules, + "simple-import-sort": eslintPluginSimpleImportSort, + }, + + rules: { + "arrow-body-style": ["error", "as-needed"], + curly: "error", + "dot-notation": "error", + eqeqeq: "error", + "logical-assignment-operators": "error", + "no-console": isCI ? "error" : "warn", + "no-constant-binary-expression": "error", + "no-duplicate-imports": "error", + "no-else-return": [ + "error", + { + allowElseIf: false, + }, + ], + "no-implicit-coercion": "error", + "no-inner-declarations": "error", + "no-lonely-if": "error", + "no-unneeded-ternary": "error", + "no-useless-return": "error", + "no-unused-expressions": [ + "error", + { + allowShortCircuit: true, + allowTernary: true, + }, + ], + "no-unused-vars": [ + "error", + { + ignoreRestSiblings: true, + }, + ], + "no-var": "error", + "object-shorthand": [ + "error", + "always", + { + avoidExplicitReturnArrows: true, + }, + ], + "one-var": ["error", "never"], + "prefer-arrow-callback": "error", + "prefer-const": [ + "error", + { + destructuring: "all", + }, + ], + "prefer-destructuring": [ + "error", + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: false, + object: false, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + "prefer-object-has-own": "error", + "prefer-object-spread": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "require-await": "error", + "require-unicode-regexp": "error", + "symbol-description": "error", + yoda: [ + "error", + "never", + { + exceptRange: true, + }, + ], + + // Internal rules + "prettier-internal-rules/jsx-identifier-case": "error", + "prettier-internal-rules/massage-ast-parameter-names": "error", + "prettier-internal-rules/no-identifier-n": "error", + "prettier-internal-rules/prefer-fs-promises-submodule": "error", + + /* @stylistic/eslint-plugin */ + "@stylistic/quotes": [ + "error", + "double", + { + avoidEscape: true, + }, + ], + + /* @typescript-eslint/eslint-plugin */ + "@typescript-eslint/prefer-ts-expect-error": "error", + + /* eslint-plugin-n */ + "n/no-path-concat": "error", + + /* eslint-plugin-regexp */ + "regexp/match-any": [ + "error", + { + allows: ["dotAll"], + }, + ], + /* cspell:disable-next-line */ + "regexp/no-extra-lookaround-assertions": "error", + "regexp/no-missing-g-flag": "error", + "regexp/no-useless-flag": [ + "error", + { + strictTypes: false, + }, + ], + /* cspell:disable-next-line */ + "regexp/prefer-lookaround": [ + "error", + { + strictTypes: false, + }, + ], + "regexp/no-super-linear-backtracking": "off", + "regexp/unicode-property": [ + "error", + { + generalCategory: "never", + key: "long", + property: { + binary: "long", + generalCategory: "long", + script: "long", + }, + }, + ], + + /* eslint-plugin-simple-import-sort */ + "simple-import-sort/imports": [ + "error", + { + groups: [ + // https://github.com/lydell/eslint-plugin-simple-import-sort/blob/20e25f3b83c713825f96b8494e2091e6600954d6/src/imports.js#L5-L19 + // Side effect imports. + [String.raw`^\u0000`], + // Remove blank lines between groups + // https://github.com/lydell/eslint-plugin-simple-import-sort#how-do-i-remove-all-blank-lines-between-imports + [ + // Node.js builtins prefixed with `node:`. + "^node:", + // Packages. + // Things that start with a letter (or digit or underscore), or `@` followed by a letter. + String.raw`^@?\w`, + // Absolute imports and other imports such as Vue-style `@/foo`. + // Anything not matched in another group. + "^", + // Relative imports. + // Anything that starts with a dot. + String.raw`^\.`, + ], + ], + }, + ], + "simple-import-sort/exports": "error", + + /* eslint-plugin-unicorn */ + "unicorn/escape-case": "off", + "unicorn/catch-error-name": "off", + "unicorn/consistent-destructuring": "off", + "unicorn/consistent-function-scoping": "off", + "unicorn/import-style": "off", + "unicorn/no-array-callback-reference": "off", + "unicorn/no-array-method-this-argument": "off", + "unicorn/no-array-reduce": "off", + "unicorn/no-await-expression-member": "off", + "unicorn/no-for-loop": "off", + "unicorn/no-hex-escape": "off", + "unicorn/no-negated-condition": "off", + "unicorn/no-nested-ternary": "off", + "unicorn/no-null": "off", + "unicorn/no-process-exit": "off", + "unicorn/no-thenable": "off", + "unicorn/no-unreadable-array-destructuring": "off", + "unicorn/no-useless-switch-case": "off", + "unicorn/no-useless-undefined": [ + "error", + { + checkArrowFunctionBody: false, + }, + ], + "unicorn/number-literal-case": "off", + "unicorn/numeric-separators-style": "off", + "unicorn/prefer-array-flat": [ + "error", + { + functions: ["flat", "flatten"], + }, + ], + "unicorn/prefer-add-event-listener": "off", + "unicorn/prefer-at": [ + "error", + { + getLastElementFunctions: ["getLast"], + }, + ], + "unicorn/prefer-code-point": "off", + "unicorn/prefer-dom-node-append": "off", + "unicorn/prefer-dom-node-remove": "off", + "unicorn/prefer-export-from": [ + "error", + { + ignoreUsedVariables: true, + }, + ], + "unicorn/prefer-global-this": "off", + "unicorn/prefer-query-selector": "off", + "unicorn/prefer-ternary": "off", + "unicorn/prevent-abbreviations": "off", + "unicorn/relative-url-style": "off", + "unicorn/switch-case-braces": ["error", "avoid"], + "unicorn/template-indent": "error", + }, + + linterOptions: { + reportUnusedDisableDirectives: "error", + }, + }, + { + ignores, + }, + // CommonJS modules + { + files: ["**/*.cjs", "website/**/*.js"], + languageOptions: { + sourceType: "script", + }, + rules: { + strict: ["error", "global"], + "unicorn/prefer-module": "off", + "unicorn/prefer-node-protocol": "off", + }, + }, + { + files: ["scripts/**/*", "tests/config/install-prettier.js"], + rules: { + "no-console": "off", + }, + }, + { + files: ["scripts/**/*.js"], + rules: { + "unicorn/prefer-top-level-await": "error", + }, + }, + { + files: [ + "tests/config/**/*.js", + "tests/format/**/format.test.js", + "tests/integration/**/*.js", + "tests/unit/**/*.js", + "tests/dts/unit/**/*.js", + "scripts/release/__tests__/**/*.spec.js", + ], + plugins: { jest: eslintPluginJest }, + languageOptions: { + globals: eslintPluginJest.environments.globals.globals, + }, + rules: { + "@stylistic/quotes": [ + "error", + "double", + { + avoidEscape: true, + allowTemplateLiterals: true, + }, + ], + "jest/valid-expect": [ + "error", + { + alwaysAwait: true, + }, + ], + "jest/prefer-to-be": "error", + }, + }, + { + files: ["tests/format/**/*.js"], + rules: { + "prettier-internal-rules/no-legacy-format-test": "error", + }, + }, + { + files: ["tests/integration/**/*.js"], + rules: { + "prettier-internal-rules/await-cli-tests": "error", + }, + }, + { + files: ["tests/**/*.js"], + rules: { + // TODO: Enable this when we drop support for Node.js v14 + "logical-assignment-operators": "off", + "unicorn/prefer-array-flat": "off", + "unicorn/prefer-array-flat-map": "off", + "unicorn/prefer-string-replace-all": "off", + }, + languageOptions: { + globals: { + runCli: "readonly", + runFormatTest: "readonly", + }, + }, + }, + { + files: ["src/cli/**/*.js"], + rules: { + "n/no-restricted-import": [ + "error", + [ + { + name: [ + toPath("src/**"), + `!${toPath("src/cli/**")}`, + `!${toPath("src/index.js")}`, + ], + message: "Don't use code from other directory.", + }, + ], + ], + }, + }, + { + files: ["src/language-js/needs-parens.js"], + rules: { + "prettier-internal-rules/better-parent-property-check-in-needs-parens": + "error", + }, + }, + { + files: ["src/**/*.js"], + rules: { + "prettier-internal-rules/flat-ast-path-call": "error", + "prettier-internal-rules/no-conflicting-comment-check-flags": "error", + "prettier-internal-rules/no-doc-public-import": "error", + "prettier-internal-rules/no-empty-flat-contents-for-if-break": "error", + "prettier-internal-rules/no-unnecessary-ast-path-call": "error", + "prettier-internal-rules/prefer-ast-path-each": "error", + "prettier-internal-rules/prefer-indent-if-break": "error", + "prettier-internal-rules/prefer-is-non-empty-array": "error", + "prettier-internal-rules/prefer-ast-path-getters": "error", + }, + }, + { + files: ["src/language-*/**/*.js"], + rules: { + "prettier-internal-rules/directly-loc-start-end": "error", + "prettier-internal-rules/print-function-parameter-order": "error", + }, + }, + { + files: ["src/language-js/**/*.js"], + ignores: ["src/language-js/parse/postprocess/*.js"], + rules: { + "prettier-internal-rules/no-node-comments": [ + "error", + { + file: "src/language-js/utils/index.js", + functions: ["hasComment", "getComments"], + }, + "src/language-js/pragma.js", + "src/language-js/parse/babel.js", + "src/language-js/parse/meriyah.js", + "src/language-js/parse/json.js", + "src/language-js/parse/acorn.js", + "src/language-js/parse/oxc.js", + "src/language-js/parse/utils/wrap-babel-expression.js", + ], + "prettier-internal-rules/prefer-create-type-check-function": [ + "error", + { + ignoreSingleType: true, + onlyTopLevelFunctions: true, + }, + ], + }, + }, + { + files: ["website/**/*"], + ...eslintPluginEslintReact.configs.recommended, + }, + { + files: ["website/**/*"], + languageOptions: { + globals: { ...globals.browser, ...globals.worker }, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + settings: { + "react-x": { + version: "18", + }, + }, + rules: { + "unicorn/filename-case": "off", + }, + }, + { + files: ["website/docusaurus.config.js", "website/playground/**/*"], + languageOptions: { + sourceType: "module", + }, + }, + { + files: ["bin/prettier.cjs"], + languageOptions: { + ecmaVersion: 5, + }, + rules: { + "no-var": "off", + "prefer-arrow-callback": "off", + }, + }, + // ESBuild doesn't support regular expressions with `u` flag + // https://github.com/evanw/esbuild/issues/4128 + { + files: ["scripts/build/esbuild-plugins/**/*"], + rules: { "require-unicode-regexp": "off" }, + }, +]; diff --git a/index.js b/index.js index dc0ab434bd3b..e258df15c9cc 100644 --- a/index.js +++ b/index.js @@ -1,3 +1 @@ -"use strict"; - -module.exports = require("./src/index.js"); +export * from "./src/index.js"; diff --git a/jest.config.js b/jest.config.js index bfaf23c4e0ce..439d658a1ca0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,97 +1,103 @@ -"use strict"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import installPrettier from "./tests/config/install-prettier.js"; -const path = require("path"); -const installPrettier = require("./tests/config/install-prettier.js"); - -const PROJECT_ROOT = __dirname; +const { dirname: PROJECT_ROOT } = createEsmUtils(import.meta); const isProduction = process.env.NODE_ENV === "production"; -const ENABLE_CODE_COVERAGE = Boolean(process.env.ENABLE_CODE_COVERAGE); +// Disabled https://github.com/nicolo-ribaudo/jest-light-runner/pull/13 +// const ENABLE_CODE_COVERAGE = Boolean(process.env.ENABLE_CODE_COVERAGE); const TEST_STANDALONE = Boolean(process.env.TEST_STANDALONE); const INSTALL_PACKAGE = Boolean(process.env.INSTALL_PACKAGE); -const SKIP_TESTS_WITH_NEW_SYNTAX = - process.versions.node.startsWith("10.") || - process.versions.node.startsWith("12."); +// When debugging production test, this flag can skip installing package +const SKIP_PRODUCTION_INSTALL = Boolean(process.env.SKIP_PRODUCTION_INSTALL); +const nodejsMajorVersion = Number(process.versions.node.split(".")[0]); let PRETTIER_DIR = isProduction - ? path.join(PROJECT_ROOT, "dist") + ? path.join(PROJECT_ROOT, "dist/prettier") : PROJECT_ROOT; -if (INSTALL_PACKAGE || (isProduction && !TEST_STANDALONE)) { - PRETTIER_DIR = installPrettier(PRETTIER_DIR); +let PRETTIER_INSTALLED_DIR = ""; +if ( + INSTALL_PACKAGE || + (isProduction && !TEST_STANDALONE && !SKIP_PRODUCTION_INSTALL) +) { + PRETTIER_INSTALLED_DIR = installPrettier(PRETTIER_DIR); + PRETTIER_DIR = path.join(PRETTIER_INSTALLED_DIR, "node_modules/prettier"); } +process.env.PRETTIER_INSTALLED_DIR = PRETTIER_INSTALLED_DIR; process.env.PRETTIER_DIR = PRETTIER_DIR; const testPathIgnorePatterns = []; -let transform = {}; if (TEST_STANDALONE) { testPathIgnorePatterns.push("/tests/integration/"); } if (isProduction) { - // `esm` bundles need transform - transform = { - "(?:\\.mjs|codeSamples\\.js)$": [ - "babel-jest", - { - presets: [ - [ - "@babel/env", - { - targets: { node: "current" }, - exclude: [ - "transform-async-to-generator", - "transform-classes", - "proposal-async-generator-functions", - "transform-regenerator", - ], - }, - ], - ], - }, - ], - }; + // Only run unit test for development + testPathIgnorePatterns.push("/tests/unit/"); } else { // Only test bundles for production testPathIgnorePatterns.push( - "/tests/integration/__tests__/bundle.js" + "/tests/integration/__tests__/bundle.js", + ); +} + +if (nodejsMajorVersion <= 16) { + // Uses import attributes + testPathIgnorePatterns.push( + "/tests/integration/__tests__/help-options.js", ); } -if (SKIP_TESTS_WITH_NEW_SYNTAX) { +if (nodejsMajorVersion <= 14) { testPathIgnorePatterns.push( - "/tests/integration/__tests__/help-options.js" + "/tests/integration/__tests__/plugin-parsers.js", + "/tests/integration/__tests__/normalize-doc.js", + "/tests/integration/__tests__/doc-utils-clean-doc.js", + "/tests/integration/__tests__/config-invalid.js", + // `@prettier/cli` uses `node:stream/consumers`, not available on Node.js v14 + "/tests/integration/__tests__/experimental-cli.js", + // Fails on Node.js v14 + "/tests/dts/unit/run.js", ); } -module.exports = { - setupFiles: ["/tests/config/setup.js"], +const config = { + setupFiles: [ + "/tests/config/format-test-setup.js", + "/tests/integration/integration-test-setup.js", + ], + runner: "jest-light-runner/child-process", snapshotSerializers: [ "jest-snapshot-serializer-raw", "jest-snapshot-serializer-ansi", ], - snapshotFormat: { - escapeString: false, - printBasicPrototype: false, - }, - testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$", + testMatch: [ + "/tests/format/**/format.test.js", + "/tests/integration/__tests__/**/*.js", + "/tests/unit/**/*.js", + "/tests/dts/unit/**/*.js", + ], testPathIgnorePatterns, - collectCoverage: ENABLE_CODE_COVERAGE, + // collectCoverage: ENABLE_CODE_COVERAGE, collectCoverageFrom: ["/src/**/*.js", "/bin/**/*.js"], coveragePathIgnorePatterns: [ "/src/standalone.js", - "/src/document/doc-debug.js", + "/src/document/debug.js", ], coverageReporters: ["text", "lcov"], moduleNameMapper: { - "prettier-local": "/tests/config/require-prettier.js", - "prettier-standalone": "/tests/config/require-standalone.js", + "prettier-local": "/tests/config/prettier-entry.js", + "prettier-standalone": "/tests/config/require-standalone.cjs", }, modulePathIgnorePatterns: [ "/dist", "/website", "/scripts/release", ], - transform, + transform: {}, watchPlugins: [ "jest-watch-typeahead/filename", "jest-watch-typeahead/testname", ], }; + +export default config; diff --git a/knip.config.js b/knip.config.js new file mode 100644 index 000000000000..29bb20bd2869 --- /dev/null +++ b/knip.config.js @@ -0,0 +1,38 @@ +export default { + workspaces: { + ".": { + entry: [ + "src/plugins/*", + "scripts/**", + // We use `new Function()` to create `import()` in our `bin` file (bin/prettier.cjs) + // so there is no actual use of the CLI files + "src/cli/index.js", + "src/experimental-cli/index.js", + "packages/plugin-oxc/index.js", + "packages/plugin-hermes/index.js", + ], + project: ["src/**", "scripts/**"], + ignore: [ + "scripts/build/config.js", + "scripts/build/build-javascript-module.js", + "scripts/tools/**", + "src/experimental-cli/**", + ], + ignoreDependencies: ["eslint-formatter-friendly", "ts-expect", "buffer"], + ignoreBinaries: [ + "test-coverage", + "renovate-config-validator", + "pkg-pr-new", + ], + }, + // TODO: Enable this after we fix https://github.com/prettier/prettier/issues/11409 + website: { + ignore: ["**/*"], + }, + "scripts/tools/bundle-test": {}, + "scripts/tools/eslint-plugin-prettier-internal-rules": {}, + "scripts/release": { + entry: ["release.js"], + }, + }, +}; diff --git a/netlify.toml b/netlify.toml index f33101cd2aa6..8380f27d01ca 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,9 +1,11 @@ [build] command = "yarn build:website" + publish = "website/build/" [build.environment] NODE_VERSION = "lts/*" - YARN_VERSION = "1.22.19" + YARN_VERSION = "1.22.22" + [[headers]] for = "/worker.js" [headers.values] diff --git a/package.json b/package.json index 3789b77a41c6..2d29e8208a94 100644 --- a/package.json +++ b/package.json @@ -1,176 +1,224 @@ { "name": "prettier", - "version": "2.8.8", + "version": "3.6.2", "description": "Prettier is an opinionated code formatter", - "bin": "./bin/prettier.js", + "bin": "./bin/prettier.cjs", "repository": "prettier/prettier", "funding": "https://github.com/prettier/prettier?sponsor=1", "homepage": "https://prettier.io", "author": "James Long", + "type": "module", "license": "MIT", - "main": "./index.js", + "main": "./src/index.cjs", "browser": "./standalone.js", "unpkg": "./standalone.js", + "exports": { + ".": { + "types": "./src/index.d.ts", + "require": "./src/index.cjs", + "default": "./src/index.js" + }, + "./standalone": "./src/standalone.js", + "./plugins/*": "./src/plugins/*.js", + "./*": "./*" + }, "engines": { - "node": ">=14" + "node": ">=18" }, "files": [ "index.js", "standalone.js", "src", - "bin", - "vendors" + "bin" ], "dependencies": { - "@angular/compiler": "12.2.16", - "@babel/code-frame": "7.18.6", - "@babel/parser": "7.21.3", - "@glimmer/syntax": "0.84.2", - "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "5.55.0", - "acorn": "8.8.1", + "@angular/compiler": "20.0.5", + "@babel/code-frame": "7.27.1", + "@babel/parser": "7.27.7", + "@babel/types": "7.27.7", + "@glimmer/syntax": "0.94.9", + "@prettier/cli": "0.9.0", + "@prettier/html-tags": "1.0.0", + "@prettier/parse-srcset": "3.1.0", + "@typescript-eslint/typescript-estree": "8.34.1", + "@typescript-eslint/visitor-keys": "8.34.1", + "acorn": "8.15.0", "acorn-jsx": "5.3.2", - "angular-estree-parser": "2.5.1", - "angular-html-parser": "1.8.0", - "camelcase": "6.3.0", - "chalk": "5.0.1", - "ci-info": "3.3.0", - "cjk-regex": "2.0.1", + "angular-estree-parser": "12.1.0", + "angular-html-parser": "8.1.0", + "camelcase": "8.0.0", + "ci-info": "4.2.0", + "cjk-regex": "3.3.0", "collapse-white-space": "1.0.6", - "cosmiconfig": "7.0.1", - "css-units-list": "1.1.0", + "css-units-list": "2.1.0", "dashify": "2.0.0", - "diff": "5.0.0", + "deno-path-from-file-url": "0.0.3", + "diff": "8.0.2", "editorconfig": "0.15.3", - "editorconfig-to-prettier": "1.0.0", + "emoji-regex": "10.4.0", "escape-string-regexp": "5.0.0", - "espree": "9.4.1", - "esutils": "2.0.3", - "fast-glob": "3.2.12", + "espree": "10.4.0", + "fast-glob": "3.3.3", "fast-json-stable-stringify": "2.1.0", - "file-entry-cache": "6.0.1", - "find-cache-dir": "3.3.2", - "find-parent-dir": "0.3.1", - "flow-parser": "0.180.0", - "get-stdin": "8.0.0", - "graphql": "15.6.1", - "html-element-attributes": "3.1.0", - "html-styles": "1.0.0", - "html-tag-names": "2.0.1", - "ignore": "5.2.0", - "jest-docblock": "28.1.1", - "json5": "2.2.2", + "file-entry-cache": "10.1.1", + "find-cache-directory": "6.0.0", + "flow-parser": "0.274.1", + "get-east-asian-width": "1.3.0", + "get-stdin": "9.0.0", + "graphql": "16.11.0", + "hermes-parser": "0.29.0", + "html-element-attributes": "3.4.0", + "html-ua-styles": "0.0.8", + "ignore": "7.0.5", + "import-meta-resolve": "4.1.0", + "index-to-position": "1.1.0", + "is-es5-identifier-name": "1.0.0", + "jest-docblock": "30.0.1", + "json5": "2.2.3", "leven": "4.0.0", - "lines-and-columns": "2.0.3", - "linguist-languages": "7.21.0", - "mem": "9.0.2", - "meriyah": "4.2.1", - "micromatch": "4.0.5", - "minimist": "1.2.6", + "linguist-languages": "8.0.0", + "meriyah": "6.1.3", + "micromatch": "4.0.8", + "minimist": "1.2.8", "n-readlines": "1.0.1", "outdent": "0.8.0", - "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee", + "oxc-parser": "0.75.0", + "parse-json": "8.3.0", + "picocolors": "1.1.1", "please-upgrade-node": "3.2.0", - "postcss-less": "3.1.4", + "postcss": "8.5.6", + "postcss-less": "6.0.0", "postcss-media-query-parser": "0.2.3", - "postcss-scss": "2.1.1", + "postcss-scss": "4.0.9", "postcss-selector-parser": "2.2.3", "postcss-values-parser": "2.0.1", - "regexp-util": "1.2.2", + "regexp-util": "2.0.3", "remark-footnotes": "2.0.0", "remark-math": "3.0.1", "remark-parse": "8.0.3", - "resolve": "1.22.1", "sdbm": "2.0.0", - "semver": "7.3.7", - "string-width": "5.0.1", - "strip-ansi": "7.0.1", - "typescript": "5.0.2", - "unicode-regex": "3.0.0", - "unified": "9.2.1", - "vnopts": "1.0.2", - "wcwidth": "1.0.1", - "yaml-unist-parser": "1.3.1" + "search-closest": "1.1.0", + "smol-toml": "1.3.4", + "strip-ansi": "7.1.0", + "to-fast-properties": "4.0.0", + "trim-newlines": "5.0.0", + "typescript": "5.8.3", + "unicode-regex": "4.1.2", + "unified": "9.2.2", + "url-or-path": "2.6.1", + "vnopts": "2.0.2", + "wcwidth.js": "2.0.0", + "yaml": "1.10.2", + "yaml-unist-parser": "2.0.5" }, "devDependencies": { - "@babel/core": "7.21.3", - "@babel/preset-env": "7.20.2", - "@babel/types": "7.20.7", - "@esbuild-plugins/node-modules-polyfill": "0.1.4", - "@glimmer/reference": "0.84.2", - "@types/estree": "0.0.51", - "@types/file-entry-cache": "5.0.2", - "@types/find-cache-dir": "3.2.1", - "@types/jest": "27.4.1", - "@typescript-eslint/eslint-plugin": "5.55.0", - "babel-jest": "27.5.1", - "benchmark": "2.1.4", - "browserslist-to-esbuild": "1.2.0", - "core-js": "3.26.1", + "@babel/generator": "7.27.5", + "@eslint-react/eslint-plugin": "1.52.2", + "@eslint/js": "9.29.0", + "@stylistic/eslint-plugin": "5.0.0", + "@types/estree": "1.0.8", + "@typescript-eslint/eslint-plugin": "8.34.1", + "@typescript-eslint/parser": "8.34.1", + "browserslist": "4.25.1", + "browserslist-to-esbuild": "2.1.1", + "buffer": "6.0.3", + "c8": "10.1.3", "cross-env": "7.0.3", - "cspell": "5.19.7", - "enquirer": "2.3.6", - "esbuild": "0.16.10", - "esbuild-visualizer": "0.4.0", - "eslint": "8.30.0", - "eslint-config-prettier": "8.5.0", + "cspell": "9.1.1", + "enquirer": "2.4.1", + "esbuild": "0.25.5", + "esbuild-plugins-node-modules-polyfill": "1.7.1", + "esbuild-visualizer": "0.7.0", + "eslint": "9.29.0", + "eslint-config-prettier": "10.1.5", "eslint-formatter-friendly": "7.0.0", - "eslint-plugin-compat": "4.0.2", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "26.1.5", - "eslint-plugin-prettier-internal-rules": "2.0.1", - "eslint-plugin-react": "7.29.4", - "eslint-plugin-regexp": "1.7.0", - "eslint-plugin-unicorn": "43.0.0", - "esm-utils": "3.0.0", - "execa": "6.1.0", - "jest": "27.5.1", - "jest-snapshot-serializer-ansi": "1.0.0", - "jest-snapshot-serializer-raw": "1.2.0", - "jest-watch-typeahead": "1.0.0", - "magic-string": "0.27.0", - "node-actionlint": "1.2.2", - "node-fetch": "3.2.10", - "npm-run-all": "4.1.5", - "path-browserify": "1.0.1", - "prettier": "2.8.5", - "pretty-bytes": "6.0.0", - "rimraf": "3.0.2", - "rollup-plugin-license": "2.7.0", - "snapshot-diff": "0.9.0", - "tempy": "2.0.0" + "eslint-plugin-compat": "6.0.2", + "eslint-plugin-jest": "29.0.1", + "eslint-plugin-n": "17.20.0", + "eslint-plugin-regexp": "2.9.0", + "eslint-plugin-simple-import-sort": "12.1.1", + "eslint-plugin-unicorn": "59.0.1", + "esm-utils": "4.4.2", + "globals": "16.2.0", + "jest": "30.0.3", + "jest-light-runner": "0.7.9", + "jest-snapshot-serializer-ansi": "2.2.1", + "jest-snapshot-serializer-raw": "2.0.0", + "jest-watch-typeahead": "3.0.1", + "knip": "5.61.2", + "magic-string": "0.30.17", + "nano-spawn": "1.0.2", + "node-style-text": "0.0.8", + "npm-run-all2": "8.0.4", + "prettier": "3.6.1", + "pretty-bytes": "7.0.0", + "pretty-ms": "9.2.0", + "rollup-plugin-license": "3.6.0", + "semver": "7.7.2", + "serialize-javascript": "6.0.2", + "snapshot-diff": "0.10.0", + "tempy": "3.1.0", + "tinybench": "4.0.1", + "ts-expect": "1.3.0" + }, + "resolutions": { + "trim": "1.0.1" }, "scripts": { "prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1", "test": "jest", - "test:dev-package": "cross-env INSTALL_PACKAGE=1 jest", - "test:dist": "cross-env NODE_ENV=production jest", - "test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest", - "test:integration": "jest tests/integration", - "test:dist-lint": "eslint --no-eslintrc --no-ignore --no-inline-config --config=./scripts/bundle-eslint-config.cjs \"dist/**/*.{js,mjs}\"", - "perf": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js", - "perf:inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js", + "test:dev-package": "cross-env INSTALL_PACKAGE=1 yarn test", + "test:production": "cross-env NODE_ENV=production yarn test", + "test:production-standalone": "cross-env TEST_STANDALONE=1 yarn test:production", + "test:production-lint": "eslint dist/prettier --config=./scripts/bundle-eslint-config.js --quiet --format friendly", + "perf": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/prettier/bin/prettier.cjs", + "perf:inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/prettier/bin/prettier.cjs", "perf:benchmark": "yarn perf --debug-benchmark", "perf:compare": "./scripts/benchmark/compare.sh", - "lint": "run-p lint:*", + "lint": "run-p --continue-on-error \"lint:*\"", "lint:typecheck": "tsc", "lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly", - "lint:changelog": "node ./scripts/lint-changelog.mjs", - "lint:prettier": "prettier . \"!test*\" --check", + "lint:changelog": "node ./scripts/lint-changelog.js", + "lint:prettier": "prettier . --check --cache", "lint:spellcheck": "cspell --no-progress --relative --dot --gitignore", - "lint:deps": "node ./scripts/check-deps.mjs", - "lint:actionlint": "node-actionlint", - "fix": "run-s fix:eslint fix:prettier", + "lint:deps": "node ./scripts/check-deps.js", + "lint:knip": "knip", + "lint:format-test": "node ./scripts/format-test-lint.js", + "fix": "run-s --continue-on-error fix:eslint fix:prettier", "fix:eslint": "yarn lint:eslint --fix", "fix:prettier": "yarn lint:prettier --write", - "build": "node ./scripts/build/build.mjs", - "build:website": "node ./scripts/build-website.mjs", - "vendors:bundle": "node ./scripts/vendors/bundle-vendors.mjs" + "build": "node ./scripts/build/build.js", + "build:website": "node ./scripts/build-website.js", + "gen:changelog": "node ./scripts/generate-changelog.js", + "debug": "node bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js", + "debug:watch": "node --watch bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js", + "debug:inspect": "node --inspect-brk bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js" + }, + "c8": { + "reporter": [ + "lcov", + "text" + ], + "all": true, + "include": [ + "src/**", + "bin/**" + ], + "exclude": [ + "bin/prettier.js", + "src/standalone.js", + "src/index.cjs", + "src/document/debug.js", + "src/utils/unexpected-node-error.js", + "src/language-js/types/estree.d.ts", + "src/**/**/*.d.ts" + ] }, "browserslist": [ ">0.5%", - "not ie 11", - "not safari 5.1", + "not dead", "not op_mini all" - ] + ], + "preferUnplugged": true, + "packageManager": "yarn@4.9.2" } diff --git a/packages/plugin-hermes/README.md b/packages/plugin-hermes/README.md new file mode 100644 index 000000000000..21cb4f87a363 --- /dev/null +++ b/packages/plugin-hermes/README.md @@ -0,0 +1,35 @@ +# @prettier/plugin-hermes + +[![Npm Version](https://img.shields.io/npm/v/@prettier/plugin-hermes.svg?style=flat-square)](https://www.npmjs.com/package/@prettier/plugin-hermes) +[![MIT License](https://img.shields.io/npm/l/@prettier/plugin-hermes.svg?style=flat-square)](https://github.com/prettier/prettier/blob/main/license) + +> Prettier [Hermes](https://github.com/facebook/hermes/blob/main/README.md) plugin. + +## Install + +```bash +yarn add --dev prettier @prettier/plugin-hermes +``` + +## Usage + +Create or modify your [prettier configuration file](https://prettier.io/docs/en/configuration) to use the plugin: + +```yaml +plugins: + - "@prettier/plugin-hermes" +``` + +**Requires prettier >= 3.6** + +Or config explicitly + +```yaml +overrides: + - files: + - "**/*.{js.flow,js,mjs,cjs}" + options: + plugins: + - "@prettier/plugin-hermes" + parser: hermes +``` diff --git a/packages/plugin-hermes/index.js b/packages/plugin-hermes/index.js new file mode 100644 index 000000000000..4da52b513f79 --- /dev/null +++ b/packages/plugin-hermes/index.js @@ -0,0 +1,18 @@ +import * as hermesParsers from "../../src/language-js/parse/hermes.js"; +import * as estreePrinter from "../../src/language-js/printer.js"; + +const AST_FORMAT = "estree-hermes"; + +export const parsers = Object.fromEntries( + Object.entries(hermesParsers).map(([name, parser]) => [ + name, + { ...parser, astFormat: AST_FORMAT }, + ]), +); + +export const printers = { + [AST_FORMAT]: estreePrinter, +}; + +export { default as options } from "../../src/language-js/options.js"; +export { default as languages } from "./languages.evaluate.js"; diff --git a/packages/plugin-hermes/languages.evaluate.js b/packages/plugin-hermes/languages.evaluate.js new file mode 100644 index 000000000000..a65637a5847c --- /dev/null +++ b/packages/plugin-hermes/languages.evaluate.js @@ -0,0 +1,15 @@ +import builtinJsLanguages from "../../src/language-js/languages.evaluate.js"; + +const replacements = new Map([["flow", "hermes"]]); + +const languages = builtinJsLanguages + .map((language) => { + const parsers = language.parsers + .map((parser) => replacements.get(parser)) + .filter(Boolean); + + return parsers.length > 0 ? { ...language, parsers } : undefined; + }) + .filter(Boolean); + +export default languages; diff --git a/packages/plugin-hermes/package.json b/packages/plugin-hermes/package.json new file mode 100644 index 000000000000..48e46e2a2bf0 --- /dev/null +++ b/packages/plugin-hermes/package.json @@ -0,0 +1,22 @@ +{ + "name": "@prettier/plugin-hermes", + "version": "0.0.3", + "description": "Prettier Hermes plugin.", + "type": "module", + "exports": { + ".": { + "types": "./index.d.js", + "default": "./index.mjs" + }, + "./*": "./*" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/prettier.git", + "directory": "packages/plugin-hermes" + }, + "funding": "https://github.com/prettier/prettier?sponsor=1", + "homepage": "https://github.com/prettier/prettier/packages/plugin-hermes", + "author": "fisker Cheung ", + "license": "MIT" +} diff --git a/packages/plugin-oxc/README.md b/packages/plugin-oxc/README.md new file mode 100644 index 000000000000..dbb90526c989 --- /dev/null +++ b/packages/plugin-oxc/README.md @@ -0,0 +1,41 @@ +# @prettier/plugin-oxc + +[![Npm Version](https://img.shields.io/npm/v/@prettier/plugin-oxc.svg?style=flat-square)](https://www.npmjs.com/package/@prettier/plugin-oxc) +[![MIT License](https://img.shields.io/npm/l/@prettier/plugin-oxc.svg?style=flat-square)](https://github.com/prettier/prettier/blob/main/license) + +> Prettier [Oxc](https://oxc.rs/) plugin. + +## Install + +```bash +yarn add --dev prettier @prettier/plugin-oxc +``` + +## Usage + +Create or modify your [prettier configuration file](https://prettier.io/docs/en/configuration) to use the plugin: + +```yaml +plugins: + - "@prettier/plugin-oxc" +``` + +**Requires prettier >= 3.6** + +Or config explicitly + +```yaml +overrides: + - files: + - "**/*.{js,mjs,cjs,jsx}" + options: + plugins: + - "@prettier/plugin-oxc" + parser: oxc + - files: + - "**/*.{ts,mts,cts,tsx}" + options: + plugins: + - "@prettier/plugin-oxc" + parser: oxc-ts +``` diff --git a/packages/plugin-oxc/index.js b/packages/plugin-oxc/index.js new file mode 100644 index 000000000000..732f89bf2a96 --- /dev/null +++ b/packages/plugin-oxc/index.js @@ -0,0 +1,18 @@ +import * as oxcParsers from "../../src/language-js/parse/oxc.js"; +import * as estreePrinter from "../../src/language-js/printer.js"; + +const AST_FORMAT = "estree-oxc"; + +export const parsers = Object.fromEntries( + Object.entries(oxcParsers).map(([name, parser]) => [ + name, + { ...parser, astFormat: AST_FORMAT }, + ]), +); + +export const printers = { + [AST_FORMAT]: estreePrinter, +}; + +export { default as options } from "../../src/language-js/options.js"; +export { default as languages } from "./languages.evaluate.js"; diff --git a/packages/plugin-oxc/languages.evaluate.js b/packages/plugin-oxc/languages.evaluate.js new file mode 100644 index 000000000000..6f0c5171e173 --- /dev/null +++ b/packages/plugin-oxc/languages.evaluate.js @@ -0,0 +1,18 @@ +import builtinJsLanguages from "../../src/language-js/languages.evaluate.js"; + +const replacements = new Map([ + ["babel", "oxc"], + ["typescript", "oxc-ts"], +]); + +const languages = builtinJsLanguages + .map((language) => { + const parsers = language.parsers + .map((parser) => replacements.get(parser)) + .filter(Boolean); + + return parsers.length > 0 ? { ...language, parsers } : undefined; + }) + .filter(Boolean); + +export default languages; diff --git a/packages/plugin-oxc/package.json b/packages/plugin-oxc/package.json new file mode 100644 index 000000000000..4273b6c7a740 --- /dev/null +++ b/packages/plugin-oxc/package.json @@ -0,0 +1,22 @@ +{ + "name": "@prettier/plugin-oxc", + "version": "0.0.4", + "description": "Prettier Oxc plugin.", + "type": "module", + "exports": { + ".": { + "types": "./index.d.js", + "default": "./index.mjs" + }, + "./*": "./*" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/prettier/prettier.git", + "directory": "packages/plugin-oxc" + }, + "funding": "https://github.com/prettier/prettier?sponsor=1", + "homepage": "https://github.com/prettier/prettier/packages/plugin-oxc", + "author": "fisker Cheung ", + "license": "MIT" +} diff --git a/scripts/benchmark/bench.js b/scripts/benchmark/bench.js new file mode 100644 index 000000000000..59bc10cbe10a --- /dev/null +++ b/scripts/benchmark/bench.js @@ -0,0 +1,28 @@ +import { readFileSync } from "node:fs"; + +const [, , version, method, groupCountString = 100, groupSizeString = 10] = + process.argv; +const groupCount = Number(groupCountString); +const groupSize = Number(groupSizeString); +const { format } = await import(`./${version}/dist/index.mjs`); + +const sourceText = readFileSync( + process.env.PRETTIER_PERF_FILENAME || "../../src/language-js/utils/index.js", + "utf8", +); + +for (let i = 0; i < groupCount; i++) { + if (method === "serial") { + for (let i = 0; i < groupSize; i++) { + await format(sourceText, { parser: "typescript" }); + } + } + + if (method === "parallel") { + await Promise.allSettled( + Array.from({ length: groupSize }, () => + format(sourceText, { parser: "typescript" }), + ), + ); + } +} diff --git a/scripts/benchmark/bench.mjs b/scripts/benchmark/bench.mjs deleted file mode 100644 index 6b600d6b9385..000000000000 --- a/scripts/benchmark/bench.mjs +++ /dev/null @@ -1,28 +0,0 @@ -import { readFileSync } from "node:fs"; - -const [, , version, method, groupCountString = 100, groupSizeString = 10] = - process.argv; -const groupCount = Number(groupCountString); -const groupSize = Number(groupSizeString); -const { format } = await import(`./${version}/dist/index.js`); - -const sourceText = readFileSync( - process.env.PRETTIER_PERF_FILENAME || "../../src/language-js/utils/index.js", - "utf8" -); - -for (let i = 0; i < groupCount; i++) { - if (method === "serial") { - for (let i = 0; i < groupSize; i++) { - await format(sourceText, { parser: "typescript" }); - } - } - - if (method === "parallel") { - await Promise.allSettled( - Array.from({ length: groupSize }, () => - format(sourceText, { parser: "typescript" }) - ) - ); - } -} diff --git a/scripts/benchmark/compare.sh b/scripts/benchmark/compare.sh index 68416ed5b8fd..c2fda1d2a30d 100755 --- a/scripts/benchmark/compare.sh +++ b/scripts/benchmark/compare.sh @@ -18,8 +18,8 @@ for commit in "${commits[@]}"; do rm -rf $commit git -C "$root" archive $commit --prefix $commit/ ':!tests*' ':!website' ':!docs' | tar -x (cd $commit; yarn; yarn build) - args+=("node ./bench.mjs $commit serial") - args+=("node ./bench.mjs $commit parallel") + args+=("node ./bench.js $commit serial") + args+=("node ./bench.js $commit parallel") done hyperfine --warmup 3 "${args[@]}" diff --git a/scripts/build-website.js b/scripts/build-website.js new file mode 100644 index 000000000000..43c38857a8a2 --- /dev/null +++ b/scripts/build-website.js @@ -0,0 +1,138 @@ +#!/usr/bin/env node + +import fs from "node:fs/promises"; +import path from "node:path"; +import url from "node:url"; +import esbuild from "esbuild"; +import fastGlob from "fast-glob"; +import spawn from "nano-spawn"; +import serialize from "serialize-javascript"; +import { + copyFile, + DIST_DIR, + PROJECT_ROOT, + WEBSITE_DIR, + writeFile, + writeJson, +} from "./utils/index.js"; + +const runYarn = (command, args, options) => + spawn("yarn", [command, ...args], { stdio: "inherit", ...options }); +const IS_PULL_REQUEST = process.env.PULL_REQUEST === "true"; +const PACKAGES_DIRECTORY = IS_PULL_REQUEST + ? DIST_DIR + : url.fileURLToPath(new URL("../node_modules", import.meta.url)); +const PLAYGROUND_LIB_DIRECTORY = path.join(WEBSITE_DIR, "static/lib"); + +async function writeScript(file, code) { + const { code: minified } = await esbuild.transform(code, { + loader: "js", + minify: true, + }); + await writeFile(path.join(PLAYGROUND_LIB_DIRECTORY, file), minified.trim()); +} + +async function buildPrettier() { + // --- Build prettier for PR --- + const packageJsonFile = path.join(PROJECT_ROOT, "package.json"); + const packageJsonContent = await fs.readFile(packageJsonFile); + const packageJson = JSON.parse(packageJsonContent); + await writeJson(packageJsonFile, { + ...packageJson, + version: `999.999.999-pr.${process.env.REVIEW_ID}`, + }); + + try { + await runYarn("build", ["--clean", "--playground"], { + cwd: PROJECT_ROOT, + }); + } finally { + // restore + await writeFile(packageJsonFile, packageJsonContent); + } +} + +async function buildPlaygroundFiles() { + const pluginFiles = []; + + // Builtin plugins + for (const fileName of await fastGlob(["plugins/*.mjs"], { + cwd: path.join(PACKAGES_DIRECTORY, "prettier"), + })) { + pluginFiles.push(`prettier/${fileName}`); + } + + // TODO: Support stable version + // External plugins + if (IS_PULL_REQUEST) { + for (const pluginName of ["plugin-hermes"]) { + pluginFiles.push(`${pluginName}/index.mjs`); + } + } + + const packageManifest = { + prettier: { + file: "prettier/standalone.mjs", + }, + }; + + packageManifest.plugins = await Promise.all( + pluginFiles.map(async (file) => { + const plugin = { file }; + + const pluginModule = await import( + url.pathToFileURL(path.join(PACKAGES_DIRECTORY, file)) + ); + + for (const property of ["languages", "options", "defaultOptions"]) { + const value = pluginModule[property]; + if (value !== undefined) { + plugin[property] = value; + } + } + + for (const property of ["parsers", "printers"]) { + const value = pluginModule[property]; + if (value !== undefined) { + plugin[property] = Object.keys(value); + } + } + + return plugin; + }), + ); + + await Promise.all([ + ...[packageManifest.prettier, ...packageManifest.plugins].map(({ file }) => + copyFile( + path.join(PACKAGES_DIRECTORY, file), + path.join(PLAYGROUND_LIB_DIRECTORY, file), + ), + ), + writeScript( + "package-manifest.mjs", + `export default ${serialize(packageManifest, { space: 2 })};`, + ), + ]); +} + +if (IS_PULL_REQUEST) { + console.log("Building prettier..."); + await buildPrettier(); +} + +console.log("Preparing files for playground..."); +await buildPlaygroundFiles(); + +// --- Site --- +console.log("Installing website dependencies..."); +await runYarn("install", [], { cwd: WEBSITE_DIR }); + +if (IS_PULL_REQUEST) { + console.log("Synchronizing docs..."); + process.env.PRETTIER_VERSION = `999.999.999-pr.${process.env.REVIEW_ID}`; + await runYarn("update-stable-docs", [], { cwd: WEBSITE_DIR }); +} + +console.log("Building website..."); +await runYarn("build", [], { cwd: WEBSITE_DIR }); diff --git a/scripts/build-website.mjs b/scripts/build-website.mjs deleted file mode 100644 index 870011998e1e..000000000000 --- a/scripts/build-website.mjs +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env node - -import path from "node:path"; -import fs from "node:fs/promises"; -import fastGlob from "fast-glob"; -import prettier from "prettier"; -import createEsmUtils from "esm-utils"; -import { execa } from "execa"; -import { - PROJECT_ROOT, - DIST_DIR, - WEBSITE_DIR, - writeJson, - copyFile, - writeFile, -} from "./utils/index.mjs"; - -const { require } = createEsmUtils(import.meta); -const runYarn = (command, args, options) => - execa("yarn", [command, ...args], { - stdout: "inherit", - stderr: "inherit", - ...options, - }); -const IS_PULL_REQUEST = process.env.PULL_REQUEST === "true"; -const PRETTIER_DIR = IS_PULL_REQUEST - ? DIST_DIR - : path.dirname(require.resolve("prettier")); -const PLAYGROUND_PRETTIER_DIR = path.join(WEBSITE_DIR, "static/lib"); - -async function buildPrettier() { - // --- Build prettier for PR --- - const packageJsonFile = path.join(PROJECT_ROOT, "package.json"); - const packageJsonContent = await fs.readFile(packageJsonFile); - const packageJson = JSON.parse(packageJsonContent); - await writeJson(packageJsonFile, { - ...packageJson, - version: `999.999.999-pr.${process.env.REVIEW_ID}`, - }); - - try { - await runYarn("build", ["--playground", "--no-babel", "--clean"], { - cwd: PROJECT_ROOT, - }); - } finally { - // restore - await writeFile(packageJsonFile, packageJsonContent); - } -} - -async function buildPlaygroundFiles() { - const files = await fastGlob(["standalone.js", "parser-*.js"], { - cwd: PRETTIER_DIR, - }); - const parsers = {}; - for (const fileName of files) { - const file = path.join(PRETTIER_DIR, fileName); - await copyFile(file, path.join(PLAYGROUND_PRETTIER_DIR, fileName)); - - if (fileName === "standalone.js") { - continue; - } - - const plugin = require(file); - // We add plugins to the global `prettierPlugins` object - // the name after `parser-` is used as property - // For example to get parsers in `parser-babel.js` via `prettierPlugins.babel` - // See `scripts/build/config.mjs` - const property = fileName.replace(/\.js$/, "").split("-")[1]; - parsers[fileName] = { - property, - parsers: Object.keys(plugin.parsers), - }; - } - - await writeFile( - path.join(PLAYGROUND_PRETTIER_DIR, "parsers-location.js"), - prettier.format( - ` - "use strict"; - - const parsersLocation = ${JSON.stringify(parsers)}; - `, - { parser: "babel" } - ) - ); -} - -if (IS_PULL_REQUEST) { - console.log("Building prettier..."); - await buildPrettier(); -} - -console.log("Preparing files for playground..."); -await buildPlaygroundFiles(); - -// --- Site --- -console.log("Installing website dependencies..."); -await runYarn("install", [], { cwd: WEBSITE_DIR }); - -console.log("Building website..."); -await runYarn("build", [], { cwd: WEBSITE_DIR }); diff --git a/scripts/build/README.md b/scripts/build/README.md index a5e6c9baad7c..67a3d5401ea1 100644 --- a/scripts/build/README.md +++ b/scripts/build/README.md @@ -2,7 +2,7 @@ ## Requirements -- Node.js version `>= 14.18`. +- Node.js version `>= 16.16`. ## Usage @@ -12,6 +12,16 @@ yarn build ## Flags +### `--package` + +What package to build, will build all packages if omitted. + +``` +yarn build +yarn build --package prettier +yarn build --package prettier --package @prettier/plugin-oxc +``` + ### `--clean` Remove `dist` directory before bundle files. @@ -75,12 +85,10 @@ Available reporter formats: - `stdout` Log report information in console. ```sh -yarn build --report +yarn build --report=all yarn build --report=stdout --report=text --report=html ``` -**`--report` equals to `--report=html`** - ### `--minify` and `--no-minify` By default, the file minification is controlled by `config.mjs` and `bundler.mjs`, these flags are added to override that behavior. @@ -98,21 +106,3 @@ Disable minify files: ```sh yarn build --file=parser-babel.js --no-minify ``` - -### `--no-babel` - -Currently, we need babel to transform/shim following new language features: - -- `Array#flat()` for Node.js 10 -- `Array#flatMap()` for Node.js 10 -- `Object.fromEntries()` for Node.js 10 - -When debugging the build script, we may want skip this step, so the build process can be faster. - -Playground use this flag to speed up the build too. - -`--babel` have no effect, don't use. - -```sh -yarn build --file=index.js --no-babel -``` diff --git a/scripts/build/build-dependencies-license.js b/scripts/build/build-dependencies-license.js new file mode 100644 index 000000000000..1a98edd2c011 --- /dev/null +++ b/scripts/build/build-dependencies-license.js @@ -0,0 +1,155 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import { outdent } from "outdent"; +import rollupPluginLicense from "rollup-plugin-license"; +import { PROJECT_ROOT } from "../utils/index.js"; + +const separator = `\n${"-".repeat(40)}\n\n`; + +function toBlockQuote(text) { + return text + .trim() + .split("\n") + .map((line) => (line ? `> ${line}` : ">")) + .join("\n"); +} + +function getDependencies(results) { + // A fake rollup chunk + const chunk = { + modules: Object.fromEntries( + results + .flatMap((result) => + Object.keys(result.esbuildResult?.metafile.inputs ?? {}), + ) + .map((file) => [file, { renderedLength: 1 }]), + ), + }; + + let dependencies; + const plugin = rollupPluginLicense({ + cwd: PROJECT_ROOT, + thirdParty: { + includePrivate: true, + output(_dependencies) { + dependencies = _dependencies; + }, + }, + }); + plugin.renderChunk("", chunk); + plugin.generateBundle(); + + return dependencies; +} + +function getLicenseText(packageConfig, dependencies) { + dependencies = dependencies.filter( + (dependency, index) => + // Exclude self + dependency.name !== packageConfig.packageName && + // Unique by `name` and `version` + index === + dependencies.findIndex( + ({ name, version }) => + dependency.name === name && dependency.version === version, + ), + ); + + dependencies.sort( + (dependencyA, dependencyB) => + dependencyA.name.localeCompare(dependencyB.name) || + dependencyA.version.localeCompare(dependencyB.version), + ); + + const licenses = [ + ...new Set( + dependencies + .filter(({ license }) => license) + .map(({ license }) => license), + ), + ]; + + const head = outdent` + # Licenses of bundled dependencies + + The published ${packageConfig.packageDisplayName ?? packageConfig.packageName} artifact additionally contains code with the following licenses: + ${new Intl.ListFormat("en-US", { type: "conjunction" }).format(licenses)}. + `; + + const content = dependencies + .map((dependency) => { + let text = `## ${dependency.name}@v${dependency.version}\n`; + + const meta = []; + + if (dependency.description) { + meta.push(toBlockQuote(dependency.description) + "\n"); + } + + if (dependency.license) { + meta.push(`License: ${dependency.license} `); + } + if (dependency.homepage) { + meta.push(`Homepage: <${dependency.homepage}> `); + } + if (dependency.repository?.url) { + meta.push(`Repository: <${dependency.repository.url}> `); + } + if (dependency.author) { + meta.push(`Author: ${dependency.author.text()} `); + } + if (dependency.contributors?.length > 0) { + const contributors = dependency.contributors + .map((contributor) => ` - ${contributor.text()}`) + .join("\n"); + + meta.push(`Contributors:\n${contributors}`); + } + + if (meta.length > 0) { + text += "\n" + meta.join("\n") + "\n"; + } + + if (dependency.licenseText) { + text += "\n" + toBlockQuote(dependency.licenseText) + "\n"; + } + return text; + }) + .join(separator); + + return [head, content].join("\n\n"); +} + +async function buildDependenciesLicense({ + packageConfig, + file, + results, + cliOptions, +}) { + const { distDirectory, files } = packageConfig; + + const fileName = file.output.file; + + if (files.at(-1) !== file) { + throw new Error(`${fileName} should be last file to build.`); + } + + const shouldBuildLicense = + !cliOptions.files && typeof cliOptions.minify !== "boolean"; + + if (!shouldBuildLicense) { + return { skipped: true }; + } + + const dependencies = getDependencies(results); + + if (dependencies.length === 0) { + throw new Error("Fail to collect dependencies."); + } + + const text = getLicenseText(packageConfig, dependencies); + + await fs.writeFile(path.join(distDirectory, fileName), text); +} + +export default buildDependenciesLicense; diff --git a/scripts/build/build-javascript-module.js b/scripts/build/build-javascript-module.js new file mode 100644 index 000000000000..ba7d59e55209 --- /dev/null +++ b/scripts/build/build-javascript-module.js @@ -0,0 +1,292 @@ +import path from "node:path"; +import url from "node:url"; +import browserslistToEsbuild from "browserslist-to-esbuild"; +import esbuild from "esbuild"; +import { nodeModulesPolyfillPlugin as esbuildPluginNodeModulePolyfills } from "esbuild-plugins-node-modules-polyfill"; +import createEsmUtils from "esm-utils"; +import { + PRODUCTION_MINIMAL_NODE_JS_VERSION, + PROJECT_ROOT, +} from "../utils/index.js"; +import esbuildPluginAddDefaultExport from "./esbuild-plugins/add-default-export.js"; +import esbuildPluginEvaluate from "./esbuild-plugins/evaluate.js"; +import esbuildPluginPrimitiveDefine from "./esbuild-plugins/primitive-define.js"; +import esbuildPluginReplaceModule from "./esbuild-plugins/replace-module.js"; +import esbuildPluginShimCommonjsObjects from "./esbuild-plugins/shim-commonjs-objects.js"; +import esbuildPluginStripNodeProtocol from "./esbuild-plugins/strip-node-protocol.js"; +import esbuildPluginThrowWarnings from "./esbuild-plugins/throw-warnings.js"; +import esbuildPluginUmd from "./esbuild-plugins/umd.js"; +import esbuildPluginVisualizer from "./esbuild-plugins/visualizer.js"; +import transform from "./transform/index.js"; +import { getPackageFile } from "./utils.js"; + +const { + dirname, + readJsonSync, + require, + resolve: importMetaResolve, +} = createEsmUtils(import.meta); +const packageJson = readJsonSync("../../package.json"); + +const universalTarget = browserslistToEsbuild(packageJson.browserslist); +const getRelativePath = (from, to) => { + const relativePath = path.posix.relative(path.dirname(`/${from}`), `/${to}`); + if (!relativePath.startsWith(".")) { + return `./${relativePath}`; + } + + return relativePath; +}; + +function getEsbuildOptions({ packageConfig, file, cliOptions }) { + const { distDirectory, files } = packageConfig; + + // Save dependencies to file + file.dependencies = []; + + const replaceModule = [ + /* + `jest-docblock` try to detect new line in code, and it will fallback to `os.EOL`, + We already replaced line end to `\n` before calling it + */ + { + module: url.fileURLToPath(importMetaResolve("jest-docblock")), + path: require.resolve("jest-docblock"), + }, + { + module: require.resolve("jest-docblock"), + process(text) { + const exports = [ + ...text.matchAll( + /(?<=\n)exports\.(?\w+) = \k;/gu, + ), + ].map((match) => match.groups.specifier); + + const lines = text.split("\n"); + const startMarkLine = lines.findIndex((line) => + line.includes("function _interopRequireDefault"), + ); + const endMarkLine = lines.indexOf( + "module.exports = __webpack_exports__;", + ); + + if ( + lines[startMarkLine + 1] !== "/**" || + lines[endMarkLine - 2] !== "})();" + ) { + throw new Error("Unexpected source"); + } + + text = lines.slice(startMarkLine + 1, endMarkLine - 2).join("\n"); + + text = text + .replace( + "const line = (0, _detectNewline().default)(docblock) ?? _os().EOL;", + String.raw`const line = "\n"`, + ) + .replace( + "const line = (0, _detectNewline().default)(comments) ?? _os().EOL;", + String.raw`const line = "\n"`, + ); + + text += "\n\n" + `export {${exports.join(", ")}};`; + + return text; + }, + }, + // Transform `.at`, `Object.hasOwn`, and `String#replaceAll` + { + module: "*", + process: transform, + }, + // #12493, not sure what the problem is, but replace the cjs version with esm version seems fix it + { + module: require.resolve("tslib"), + path: require.resolve("tslib").replace(/tslib\.js$/u, "tslib.es6.js"), + }, + // https://github.com/evanw/esbuild/issues/2103 + { + module: getPackageFile("outdent/lib-module/index.js"), + process(text) { + const index = text.indexOf('if (typeof module !== "undefined") {'); + if (index === -1) { + throw new Error("Unexpected code"); + } + return text.slice(0, index); + }, + }, + ]; + + const define = { + "process.env.PRETTIER_TARGET": file.platform, + "process.env.NODE_ENV": "production", + }; + + if (file.platform === "universal") { + // We can't reference `process` in UMD bundles and this is + // an undocumented "feature" + replaceModule.push({ + module: "*", + find: "process.env.PRETTIER_DEBUG", + replacement: "globalThis.PRETTIER_DEBUG", + }); + + define.process = undefined; + // @babel/code-frame/lib/index.js + define["process.emitWarning"] = undefined; + // postcss/lib/postcss.js + define["process.env.LANG"] = ""; + // @typescript-eslint/typescript-estree + define["process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER"] = ""; + + // Replace `__dirname` and `__filename` with a fake value + // So `parser-typescript.js` won't contain a path of working directory + // See #8268 + define.__filename = "/prettier-security-filename-placeholder.js"; + define.__dirname = "/prettier-security-dirname-placeholder"; + } + + if (file.platform === "node") { + // External other bundled files + replaceModule.push( + ...files + .filter( + (bundle) => + bundle.input === "package.json" || + (file.input !== bundle.input && bundle.output.format === "esm"), + ) + .map((bundle) => { + let output = bundle.output.file; + if ( + file.output.file === "index.cjs" && + bundle.output.file === "doc.mjs" + ) { + output = "doc.js"; + } + + return { + module: path.join(PROJECT_ROOT, bundle.input), + external: getRelativePath(file.output.file, output), + }; + }), + ); + } else { + replaceModule.push( + // When running build script with `--no-minify`, `esbuildPluginNodeModulePolyfills` shim `module` module incorrectly + { + module: "*", + find: 'import { createRequire } from "node:module";', + replacement: "", + }, + // Prevent `esbuildPluginNodeModulePolyfills` shim `assert`, which will include a big `buffer` shim + // TODO[@fisker]: Find a better way + { + module: "*", + find: ' from "node:assert";', + replacement: ` from ${JSON.stringify( + path.join(dirname, "./shims/assert.js"), + )};`, + }, + // Prevent `esbuildPluginNodeModulePolyfills` include shim for this module + { + module: "assert", + path: path.join(dirname, "./shims/assert.js"), + }, + // `esbuildPluginNodeModulePolyfills` didn't shim this module + { + module: "module", + text: "export const createRequire = () => {};", + }, + // This module requires file access, should not include in universal bundle + { + module: path.join(PROJECT_ROOT, "src/utils/get-interpreter.js"), + text: "export default undefined;", + }, + ); + } + + // Current version of `yaml` is not tree-shakable, + // but when we update it, we may reduce size, + // since the UMD version don't need expose `__parsePrettierYamlConfig` + if (file.output.format === "umd" && file.output.file === "plugins/yaml.js") { + replaceModule.push({ + module: path.join(PROJECT_ROOT, file.input), + text: 'export * from "../language-yaml/index.js";', + }); + } + + const { buildOptions } = file; + const shouldMinify = + cliOptions.minify ?? buildOptions.minify ?? file.platform === "universal"; + + const esbuildOptions = { + entryPoints: [path.join(PROJECT_ROOT, file.input)], + bundle: true, + metafile: true, + plugins: [ + esbuildPluginPrimitiveDefine({ ...define, ...buildOptions.define }), + esbuildPluginEvaluate(), + esbuildPluginStripNodeProtocol(), + esbuildPluginReplaceModule({ + replacements: [...replaceModule, ...(buildOptions.replaceModule ?? [])], + }), + file.platform === "universal" && esbuildPluginNodeModulePolyfills(), + cliOptions.reports && + esbuildPluginVisualizer({ formats: cliOptions.reports }), + esbuildPluginThrowWarnings({ + allowDynamicRequire: file.platform === "node", + allowDynamicImport: file.platform === "node", + }), + buildOptions.addDefaultExport && esbuildPluginAddDefaultExport(), + ].filter(Boolean), + minify: shouldMinify, + legalComments: "none", + external: ["pnpapi", ...(buildOptions.external ?? [])], + // Disable esbuild auto discover `tsconfig.json` file + tsconfigRaw: JSON.stringify({}), + target: [ + ...(buildOptions.target ?? [`node${PRODUCTION_MINIMAL_NODE_JS_VERSION}`]), + ], + logLevel: "error", + format: file.output.format, + outfile: path.join(distDirectory, cliOptions.saveAs ?? file.output.file), + // https://esbuild.github.io/api/#main-fields + mainFields: file.platform === "node" ? ["module", "main"] : undefined, + supported: { + // https://github.com/evanw/esbuild/issues/3471 + "regexp-unicode-property-escapes": true, + }, + packages: "bundle", + }; + + if (file.platform === "universal") { + if (!buildOptions.target) { + esbuildOptions.target.push(...universalTarget); + } + + if (file.output.format === "umd") { + esbuildOptions.plugins.push( + esbuildPluginUmd({ + name: file.output.umdVariableName, + }), + ); + } + } else { + esbuildOptions.platform = "node"; + esbuildOptions.external.push(...files.map((file) => file.output.file)); + + // https://github.com/evanw/esbuild/issues/1921 + if (file.output.format === "esm") { + esbuildOptions.plugins.push(esbuildPluginShimCommonjsObjects()); + } + } + + return esbuildOptions; +} + +async function runEsbuild(options) { + const esbuildOptions = getEsbuildOptions(options); + return { esbuildResult: await esbuild.build(esbuildOptions) }; +} + +export default runEsbuild; diff --git a/scripts/build/build-package-json.js b/scripts/build/build-package-json.js new file mode 100644 index 000000000000..d8b6186e3809 --- /dev/null +++ b/scripts/build/build-package-json.js @@ -0,0 +1,184 @@ +import path from "node:path"; +import { + PRODUCTION_MINIMAL_NODE_JS_VERSION, + PROJECT_ROOT, + readJson, + writeJson, +} from "../utils/index.js"; + +const keysToKeep = [ + "name", + "version", + "description", + "bin", + "repository", + "funding", + "homepage", + "author", + "license", + "main", + "browser", + "unpkg", + "exports", + "engines", + "files", + "preferUnplugged", +]; + +const publishConfig = { + access: "public", + registry: "https://registry.npmjs.org/", +}; + +async function buildPrettierPackageJson({ packageConfig, file }) { + const { distDirectory, files } = packageConfig; + const packageJson = await readJson(path.join(PROJECT_ROOT, file.input)); + + const bin = files.find( + (file) => + path.join(PROJECT_ROOT, packageJson.bin) === + path.join(PROJECT_ROOT, file.input), + ).output.file; + + const overrides = { + bin: `./${bin}`, + main: "./index.cjs", + engines: { + ...packageJson.engines, + // https://github.com/prettier/prettier/pull/13118#discussion_r922708068 + // Don't delete, event it's the same in package.json + node: `>=${PRODUCTION_MINIMAL_NODE_JS_VERSION}`, + }, + type: "commonjs", + exports: { + ".": { + types: "./index.d.ts", + require: "./index.cjs", + browser: { + import: "./standalone.mjs", + default: "./standalone.js", + }, + default: "./index.mjs", + }, + "./*": "./*", + ...Object.fromEntries( + files + .filter((file) => file.output.format === "umd") + .map((file) => { + const basename = path.basename(file.output.file, ".js"); + return [ + file.isPlugin ? `./plugins/${basename}` : `./${basename}`, + { + types: `./${file.output.file.replace(/\.js$/u, ".d.ts")}`, + // `module-sync` condition can prevent CJS plugins from working: https://github.com/prettier/prettier/issues/17139 + // Perform a test before re-adding it. + require: `./${file.output.file}`, + default: `./${file.output.file.replace(/\.js$/u, ".mjs")}`, + }, + ]; + }), + ), + // Legacy entries + // TODO: Remove bellow in v4 + "./esm/standalone.mjs": "./standalone.mjs", + ...Object.fromEntries( + files + .filter( + (file) => + file.isPlugin && + file.output.format === "umd" && + file.output.file !== "plugins/estree.js", + ) + .flatMap((file) => { + let basename = path.basename(file.output.file, ".js"); + if (basename === "acorn") { + basename = "espree"; + } + return [ + [`./parser-${basename}`, `./${file.output.file}`], + [`./parser-${basename}.js`, `./${file.output.file}`], + [ + `./esm/parser-${basename}.mjs`, + `./${file.output.file.replace(/\.js$/u, ".mjs")}`, + ], + ]; + }), + ), + }, + files: files.map(({ output: { file } }) => file).sort(), + scripts: { + prepublishOnly: + "node -e \"assert.equal(require('.').version, require('..').version)\"", + }, + }; + + await writeJson( + path.join(distDirectory, file.output.file), + Object.assign(pick(packageJson, keysToKeep), overrides), + ); +} + +async function buildPluginOxcPackageJson({ packageConfig, file }) { + const { distDirectory, files } = packageConfig; + const packageJson = await readJson(path.join(PROJECT_ROOT, file.input)); + const projectPackageJson = await readJson( + path.join(PROJECT_ROOT, "package.json"), + ); + + const overrides = { + engines: { + ...packageJson.engines, + // https://github.com/prettier/prettier/pull/13118#discussion_r922708068 + // Don't delete, event it's the same in package.json + node: `>=${PRODUCTION_MINIMAL_NODE_JS_VERSION}`, + }, + // Use `commonjs` since we may provide browser build in future. + type: "commonjs", + files: files.map(({ output: { file } }) => file).sort(), + dependencies: { + "oxc-parser": projectPackageJson.dependencies["oxc-parser"], + }, + publishConfig, + }; + + await writeJson( + path.join(distDirectory, file.output.file), + Object.assign(pick(packageJson, keysToKeep), overrides), + ); +} + +async function buildPluginHermesPackageJson({ packageConfig, file }) { + const { distDirectory, files } = packageConfig; + const packageJson = await readJson(path.join(PROJECT_ROOT, file.input)); + + const overrides = { + engines: { + ...packageJson.engines, + // https://github.com/prettier/prettier/pull/13118#discussion_r922708068 + // Don't delete, event it's the same in package.json + node: `>=${PRODUCTION_MINIMAL_NODE_JS_VERSION}`, + }, + // Use `commonjs` since we may provide browser build in future. + type: "commonjs", + files: files.map(({ output: { file } }) => file).sort(), + publishConfig, + }; + + await writeJson( + path.join(distDirectory, file.output.file), + Object.assign(pick(packageJson, keysToKeep), overrides), + ); +} + +function pick(object, keys) { + keys = new Set(keys); + return Object.fromEntries( + Object.entries(object).filter(([key]) => keys.has(key)), + ); +} + +export { + buildPluginHermesPackageJson, + buildPluginOxcPackageJson, + buildPrettierPackageJson, +}; diff --git a/scripts/build/build-types.js b/scripts/build/build-types.js new file mode 100644 index 000000000000..358b25469de9 --- /dev/null +++ b/scripts/build/build-types.js @@ -0,0 +1,70 @@ +import fs from "node:fs"; +import path from "node:path"; +import url from "node:url"; +import { isValidIdentifier } from "@babel/types"; +import { outdent } from "outdent"; +import { PROJECT_ROOT, writeFile } from "../utils/index.js"; + +async function typesFileBuilder({ packageConfig, file }) { + /** + * @typedef {{ from: string, to: string }} ImportPathReplacement + * @typedef {{ [input: string]: Array }} ReplacementMap + */ + + /** @type {ReplacementMap} */ + const pathReplacementMap = { + "src/index.d.ts": [{ from: "./document/public.js", to: "./doc.js" }], + }; + const replacements = pathReplacementMap[file.input] ?? []; + let text = await fs.promises.readFile(file.input, "utf8"); + for (const { from, to } of replacements) { + text = text.replaceAll(` from "${from}";`, ` from "${to}";`); + } + await writeFile( + path.join(packageConfig.distDirectory, file.output.file), + text, + ); +} + +function toPropertyKey(name) { + return isValidIdentifier(name) ? name : JSON.stringify(name); +} + +async function buildPluginTypes({ packageConfig, file: { input, output } }) { + const pluginModule = await import( + url.pathToFileURL(path.join(PROJECT_ROOT, input)) + ); + const plugin = pluginModule.default ?? pluginModule; + const parserNames = Object.keys(plugin.parsers ?? {}); + + // We only add `parsers` to types file, printers should not be used alone + // For `estree` plugin, we just export an empty object to ensure it treated as a module + const code = + parserNames.length === 0 + ? "export {};" + : outdent` + import { Parser } from "${packageConfig.packageName === "prettier" ? "../index.js" : "prettier"}"; + + export declare const parsers: { + ${parserNames + .map( + (parserName) => + `${" ".repeat(2)}${toPropertyKey(parserName)}: Parser;`, + ) + .join("\n")} + }; + `; + + await writeFile( + path.join(packageConfig.distDirectory, output.file), + `${code}\n`, + ); +} + +function buildTypes(options) { + return options.file.isPlugin + ? buildPluginTypes(options) + : typesFileBuilder(options); +} + +export default buildTypes; diff --git a/scripts/build/build.js b/scripts/build/build.js new file mode 100644 index 000000000000..c65c14d0b1c2 --- /dev/null +++ b/scripts/build/build.js @@ -0,0 +1,196 @@ +#!/usr/bin/env node + +import fs from "node:fs/promises"; +import path from "node:path"; +import readline from "node:readline"; +import createEsmUtils from "esm-utils"; +import styleText from "node-style-text"; +import prettyBytes from "pretty-bytes"; +import prettyMilliseconds from "pretty-ms"; +import { DIST_DIR } from "../utils/index.js"; +import packageConfigs from "./config.js"; +import parseArguments from "./parse-arguments.js"; + +const { require } = createEsmUtils(import.meta); + +const statusConfig = [ + { color: "bgGreen", text: "DONE" }, + { color: "bgRed", text: "FAIL" }, + { color: "bgGray", text: "SKIPPED" }, +]; +const maxLength = Math.max(...statusConfig.map(({ text }) => text.length)) + 2; +const padStatusText = (text) => { + while (text.length < maxLength) { + text = text.length % 2 ? `${text} ` : ` ${text}`; + } + return text; +}; +const status = {}; +for (const { color, text } of statusConfig) { + status[text] = styleText[color].black(padStatusText(text)); +} + +function fitTerminal(input, suffix = "") { + const columns = Math.min(process.stdout.columns || 40, 80); + const WIDTH = columns - maxLength + 1; + if (input.length < WIDTH) { + const repeatCount = Math.max(WIDTH - input.length - 1 - suffix.length, 0); + input += styleText.dim(".").repeat(repeatCount) + suffix; + } + return input; +} + +const clear = () => { + readline.clearLine(process.stdout, 0); + readline.cursorTo(process.stdout, 0, null); +}; + +async function buildFile({ packageConfig, file, cliOptions, results }) { + const { distDirectory } = packageConfig; + let displayName = file.output.file; + if ( + (file.platform === "universal" && file.output.format !== "esm") || + (file.output.file.startsWith("index.") && file.output.format !== "esm") || + file.kind === "types" + ) { + displayName = ` ${displayName}`; + } + + process.stdout.write(fitTerminal(displayName)); + + if ( + (cliOptions.files && !cliOptions.files.has(file.output.file)) || + (cliOptions.playground && !file.playground) + ) { + console.log(status.SKIPPED); + return; + } + + let result; + try { + result = await file.build({ packageConfig, file, cliOptions, results }); + } catch (error) { + console.log(status.FAIL + "\n"); + console.error(error); + throw error; + } + + result ??= {}; + + if (result.skipped) { + console.log(status.SKIPPED); + return; + } + + const outputFile = cliOptions.saveAs ?? file.output.file; + + const sizeMessages = []; + if (cliOptions.printSize) { + const { size } = await fs.stat(path.join(distDirectory, outputFile)); + sizeMessages.push(prettyBytes(size)); + } + + if (cliOptions.compareSize) { + // TODO: Use `import.meta.resolve` when Node.js support + const stablePrettierDirectory = path.dirname(require.resolve("prettier")); + const stableVersionFile = path.join(stablePrettierDirectory, outputFile); + let stableSize; + try { + ({ size: stableSize } = await fs.stat(stableVersionFile)); + } catch { + // No op + } + + if (stableSize) { + const { size } = await fs.stat(path.join(distDirectory, outputFile)); + const sizeDiff = size - stableSize; + const message = styleText[sizeDiff > 0 ? "yellow" : "green"]( + prettyBytes(sizeDiff), + ); + + sizeMessages.push(`${message}`); + } else { + sizeMessages.push(styleText.blue("[NEW FILE]")); + } + } + + if (sizeMessages.length > 0) { + // Clear previous line + clear(); + process.stdout.write( + fitTerminal(displayName, `${sizeMessages.join(", ")} `), + ); + } + + console.log(status.DONE); + + return result; +} + +async function run() { + const cliOptions = parseArguments(); + + let packagesToBuild = []; + if (cliOptions.packages) { + for (const packageName of cliOptions.packages) { + const packageConfig = packageConfigs.find( + (packageConfig) => packageConfig.packageName === packageName, + ); + + if (!packageConfig) { + throw new Error(`Unknown package "${packageName}"`); + } + + packagesToBuild.push(packageConfig); + } + } else { + packagesToBuild = packageConfigs; + } + + // TODO: Clear package dist directory instead + if (cliOptions.clean) { + let stat; + try { + stat = await fs.stat(DIST_DIR); + } catch { + // No op + } + + if (stat) { + if (stat.isDirectory()) { + await fs.rm(DIST_DIR, { recursive: true, force: true }); + } else { + throw new Error(`"${DIST_DIR}" is not a directory`); + } + } + } + + for (const [index, packageConfig] of packagesToBuild.entries()) { + if (index > 0) { + console.log(); + } + + console.log( + styleText.inverse( + `[${index + 1}/${packagesToBuild.length}] Building package '${packageConfig.packageName}'`, + ), + ); + + const startTime = performance.now(); + const results = []; + for (const file of packageConfig.files) { + const result = await buildFile({ + packageConfig, + file, + cliOptions, + results, + }); + results.push(result); + } + console.log( + `Build package '${packageConfig.packageName}' success in ${prettyMilliseconds(performance.now() - startTime)}`, + ); + } +} + +await run(); diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs deleted file mode 100644 index d9cb514eef97..000000000000 --- a/scripts/build/build.mjs +++ /dev/null @@ -1,269 +0,0 @@ -#!/usr/bin/env node - -import path from "node:path"; -import fs from "node:fs/promises"; -import readline from "node:readline"; -import chalk from "chalk"; -import minimist from "minimist"; -import prettyBytes from "pretty-bytes"; -import createEsmUtils from "esm-utils"; -import { - PROJECT_ROOT, - DIST_DIR, - readJson, - writeJson, - copyFile, -} from "../utils/index.mjs"; -import bundler from "./bundler.mjs"; -import bundleConfigs from "./config.mjs"; -import saveLicenses from "./save-licenses.mjs"; - -const { require } = createEsmUtils(import.meta); - -const statusConfig = [ - { color: "bgGreen", text: "DONE" }, - { color: "bgRed", text: "FAIL" }, - { color: "bgGray", text: "SKIPPED" }, -]; -const maxLength = Math.max(...statusConfig.map(({ text }) => text.length)) + 2; -const padStatusText = (text) => { - while (text.length < maxLength) { - text = text.length % 2 ? `${text} ` : ` ${text}`; - } - return text; -}; -const status = {}; -for (const { color, text } of statusConfig) { - status[text] = chalk[color].black(padStatusText(text)); -} - -function fitTerminal(input, suffix = "") { - const columns = Math.min(process.stdout.columns || 40, 80); - const WIDTH = columns - maxLength + 1; - if (input.length < WIDTH) { - const repeatCount = Math.max(WIDTH - input.length - 1 - suffix.length, 0); - input += chalk.dim(".").repeat(repeatCount) + suffix; - } - return input; -} - -const clear = () => { - readline.clearLine(process.stdout, 0); - readline.cursorTo(process.stdout, 0, null); -}; - -async function createBundle(bundleConfig, options) { - try { - for await (const { - name, - started, - skipped, - relativePath, - absolutePath, - } of bundler(bundleConfig, options)) { - const displayName = name.startsWith("esm/") ? ` ${name}` : name; - - if (started) { - process.stdout.write(fitTerminal(displayName)); - continue; - } - - if (skipped) { - if (!options.files) { - process.stdout.write(fitTerminal(displayName)); - console.log(status.SKIPPED); - } - - continue; - } - - const sizeMessages = []; - - if (options.printSize) { - const { size } = await fs.stat(absolutePath); - sizeMessages.push(prettyBytes(size)); - } - - if (options.compareSize) { - // TODO: Use `import.meta.resolve` when Node.js support - const stablePrettierDirectory = path.dirname( - require.resolve("prettier") - ); - const stableVersionFile = path.join( - stablePrettierDirectory, - relativePath - ); - let stableSize; - try { - ({ size: stableSize } = await fs.stat(stableVersionFile)); - } catch { - // No op - } - - if (stableSize) { - const { size } = await fs.stat(absolutePath); - const sizeDiff = size - stableSize; - const message = chalk[sizeDiff > 0 ? "yellow" : "green"]( - prettyBytes(sizeDiff) - ); - - sizeMessages.push(`${message}`); - } else { - sizeMessages.push(chalk.blue("[NEW FILE]")); - } - } - - if (sizeMessages.length > 0) { - // Clear previous line - clear(); - process.stdout.write( - fitTerminal(displayName, `${sizeMessages.join(", ")} `) - ); - } - - console.log(status.DONE); - } - } catch (error) { - console.log(status.FAIL + "\n"); - console.error(error); - throw error; - } -} - -async function preparePackage() { - const packageJson = await readJson(path.join(PROJECT_ROOT, "package.json")); - packageJson.bin = "./bin-prettier.js"; - packageJson.engines.node = ">=10.13.0"; - delete packageJson.dependencies; - delete packageJson.devDependencies; - delete packageJson.browserslist; - packageJson.scripts = { - prepublishOnly: - "node -e \"assert.equal(require('.').version, require('..').version)\"", - }; - packageJson.files = ["*.js", "esm/*.mjs"]; - await writeJson(path.join(DIST_DIR, "package.json"), packageJson); - - for (const file of ["README.md", "LICENSE"]) { - await copyFile(path.join(PROJECT_ROOT, file), path.join(DIST_DIR, file)); - } -} - -async function run(params) { - params.files = params.file ? new Set([params.file].flat()) : params.file; - delete params.file; - - params.saveAs = params["save-as"]; - delete params["save-as"]; - - params.printSize = params["print-size"]; - delete params["print-size"]; - - params.compareSize = params["compare-size"]; - delete params["compare-size"]; - - if (params.report === "") { - params.report = ["html"]; - } - params.reports = params.report ? [params.report].flat() : params.report; - delete params.report; - - if (params.saveAs && !(params.files && params.files.size === 1)) { - throw new Error("'--save-as' can only use together with one '--file' flag"); - } - - if ( - params.saveAs && - !path.join(DIST_DIR, params.saveAs).startsWith(DIST_DIR) - ) { - throw new Error("'--save-as' can only relative path"); - } - - if (params.clean) { - let stat; - try { - stat = await fs.stat(DIST_DIR); - } catch { - // No op - } - - if (stat) { - if (stat.isDirectory()) { - await fs.rm(DIST_DIR, { recursive: true, force: true }); - } else { - throw new Error(`"${DIST_DIR}" is not a directory`); - } - } - } - - if (params.compareSize) { - if (params.minify === false) { - throw new Error( - "'--compare-size' can not use together with '--no-minify' flag" - ); - } - - if (params.saveAs) { - throw new Error( - "'--compare-size' can not use together with '--save-as' flag" - ); - } - } - - const shouldPreparePackage = - !params.playground && !params.files && params.minify === null; - const shouldSaveBundledPackagesLicenses = shouldPreparePackage; - - const licenses = []; - if (shouldSaveBundledPackagesLicenses) { - params.onLicenseFound = (dependencies) => licenses.push(...dependencies); - } - - console.log(chalk.inverse(" Building packages ")); - - for (const bundleConfig of bundleConfigs) { - await createBundle(bundleConfig, params); - } - - if (shouldPreparePackage) { - await preparePackage(); - } - - if (shouldSaveBundledPackagesLicenses) { - const vendorMeta = await readJson( - new URL("../vendors/vendor-meta.json", import.meta.url) - ); - licenses.push(...vendorMeta.licenses); - - await saveLicenses(licenses.filter(({ name }) => name !== "prettier")); - } else { - console.warn( - chalk.red("Bundled packages licenses not included in `dist/LICENSE`.") - ); - } -} - -await run( - minimist(process.argv.slice(2), { - boolean: [ - "playground", - "print-size", - "compare-size", - "minify", - "babel", - "clean", - ], - string: ["file", "save-as", "report"], - default: { - clean: false, - playground: false, - printSize: false, - compareSize: false, - minify: null, - babel: true, - }, - unknown(flag) { - throw new Error(`Unknown flag ${chalk.red(flag)}`); - }, - }) -); diff --git a/scripts/build/bundler.mjs b/scripts/build/bundler.mjs deleted file mode 100644 index e1fe88b71ace..000000000000 --- a/scripts/build/bundler.mjs +++ /dev/null @@ -1,293 +0,0 @@ -import fs from "node:fs/promises"; -import path from "node:path"; -import createEsmUtils from "esm-utils"; -import * as babel from "@babel/core"; -import esbuild from "esbuild"; -import { NodeModulesPolyfillPlugin as esbuildPluginNodeModulePolyfills } from "@esbuild-plugins/node-modules-polyfill"; -import browserslistToEsbuild from "browserslist-to-esbuild"; -import { PROJECT_ROOT, DIST_DIR } from "../utils/index.mjs"; -import { vendorMetaFile, vendorsDirectory } from "../vendors/utils.mjs"; -import esbuildPluginEvaluate from "./esbuild-plugins/evaluate.mjs"; -import esbuildPluginReplaceModule from "./esbuild-plugins/replace-module.mjs"; -import esbuildPluginLicense from "./esbuild-plugins/license.mjs"; -import esbuildPluginUmd from "./esbuild-plugins/umd.mjs"; -import esbuildPluginVisualizer from "./esbuild-plugins/visualizer.mjs"; -import esbuildPluginThrowWarnings from "./esbuild-plugins/throw-warnings.mjs"; -import bundles from "./config.mjs"; - -const { __dirname, readJsonSync, require } = createEsmUtils(import.meta); -const packageJson = readJsonSync("../../package.json"); - -const umdTarget = browserslistToEsbuild(packageJson.browserslist); -const vendorsReplacements = Object.entries(readJsonSync(vendorMetaFile).entries) - .filter(([, entry]) => !entry.endsWith(".json")) - .map(([vendorName, entry]) => ({ - module: path.join(vendorsDirectory, entry), - path: require.resolve(vendorName), - })); - -function getBabelConfig(bundle) { - const config = { - babelrc: false, - assumptions: { - setSpreadProperties: true, - }, - sourceType: "unambiguous", - plugins: bundle.babelPlugins || [], - compact: false, - exclude: [/\/core-js\//], - }; - const targets = { node: "10" }; - if (bundle.target === "universal") { - targets.browsers = packageJson.browserslist; - } - config.presets = [ - [ - "@babel/preset-env", - { - targets, - exclude: [ - "es.array.unscopables.flat", - "es.array.unscopables.flat-map", - "es.array.sort", - "es.promise", - "es.promise.finally", - "es.string.replace", - "es.symbol.description", - "es.typed-array.*", - "web.*", - ], - modules: false, - useBuiltIns: "usage", - corejs: { - version: 3, - }, - debug: false, - }, - ], - ]; - config.plugins.push([ - "@babel/plugin-proposal-object-rest-spread", - { useBuiltIns: true }, - ]); - return config; -} - -const bundledFiles = [ - ...bundles, - { input: "package.json", output: "package.json" }, -].map(({ input, output }) => ({ - input: path.join(PROJECT_ROOT, input), - output: `./${output}`, -})); - -function* getEsbuildOptions(bundle, buildOptions) { - const replaceModule = [ - ...vendorsReplacements, - // #12493, not sure what the problem is, but replace the cjs version with esm version seems fix it - { - module: require.resolve("tslib"), - path: require.resolve("tslib").replace(/tslib\.js$/, "tslib.es6.js"), - }, - ]; - - const define = { - "process.env.PRETTIER_TARGET": JSON.stringify(bundle.target), - "process.env.NODE_ENV": JSON.stringify("production"), - }; - - if (bundle.target === "universal") { - // We can't reference `process` in UMD bundles and this is - // an undocumented "feature" - replaceModule.push({ - module: "*", - find: "process.env.PRETTIER_DEBUG", - replacement: "globalThis.PRETTIER_DEBUG", - }); - - define.process = JSON.stringify({ env: {}, argv: [] }); - - // Replace `__dirname` and `__filename` with a fake value - // So `parser-typescript.js` won't contain a path of working directory - // See #8268 - define.__filename = JSON.stringify( - "/prettier-security-filename-placeholder.js" - ); - define.__dirname = JSON.stringify("/prettier-security-dirname-placeholder"); - } - - // Replace other bundled files - if (bundle.target === "node") { - // Replace bundled files and `package.json` with dynamic `require()` - for (const { input, output } of bundledFiles) { - replaceModule.push({ module: input, external: output }); - } - } else { - // Universal bundle only use version info from package.json - // Replace package.json with `{version: "{VERSION}"}` - replaceModule.push({ - module: path.join(PROJECT_ROOT, "package.json"), - text: JSON.stringify({ version: packageJson.version }), - loader: "json", - }); - - // Replace parser getters with `undefined` - for (const file of [ - "src/language-css/parsers.js", - "src/language-graphql/parsers.js", - "src/language-handlebars/parsers.js", - "src/language-html/parsers.js", - "src/language-js/parse/parsers.js", - "src/language-markdown/parsers.js", - "src/language-yaml/parsers.js", - ]) { - replaceModule.push({ module: path.join(PROJECT_ROOT, file), text: "" }); - } - - // Prevent `esbuildPluginNodeModulePolyfills` include shim for this module - replaceModule.push({ - module: "assert", - path: require.resolve("./shims/assert.cjs"), - }); - } - - let shouldMinify = buildOptions.minify; - if (typeof shouldMinify !== "boolean") { - shouldMinify = bundle.minify !== false && bundle.target === "universal"; - } - - const esbuildOptions = { - entryPoints: [path.join(PROJECT_ROOT, bundle.input)], - define, - bundle: true, - metafile: true, - plugins: [ - esbuildPluginEvaluate(), - esbuildPluginReplaceModule({ - replacements: [...replaceModule, ...(bundle.replaceModule ?? [])], - }), - bundle.target === "universal" && esbuildPluginNodeModulePolyfills(), - buildOptions.onLicenseFound && - esbuildPluginLicense({ - cwd: PROJECT_ROOT, - thirdParty: { - includePrivate: true, - output: buildOptions.onLicenseFound, - }, - }), - buildOptions.reports && - esbuildPluginVisualizer({ formats: buildOptions.reports }), - esbuildPluginThrowWarnings({ - allowDynamicRequire: bundle.target === "node", - }), - ].filter(Boolean), - minify: shouldMinify, - legalComments: "none", - external: [...(bundle.external ?? [])], - // Disable esbuild auto discover `tsconfig.json` file - tsconfig: path.join(__dirname, "empty-tsconfig.json"), - target: [...(bundle.esbuildTarget ?? ["node10"])], - logLevel: "error", - }; - - if (bundle.target === "universal") { - if (!bundle.esbuildTarget) { - esbuildOptions.target.push(...umdTarget); - } - - yield { - ...esbuildOptions, - outfile: bundle.output, - plugins: [ - esbuildPluginUmd({ name: bundle.name }), - ...esbuildOptions.plugins, - ], - format: "umd", - }; - - if (/^(?:standalone|parser-.*)\.js$/.test(bundle.output)) { - yield { - ...esbuildOptions, - outfile: `esm/${bundle.output.replace(".js", ".mjs")}`, - format: "esm", - }; - } - } else { - esbuildOptions.platform = "node"; - esbuildOptions.external.push(...bundledFiles.map(({ output }) => output)); - - yield { - ...esbuildOptions, - outfile: bundle.output, - format: "cjs", - }; - } -} - -async function runBuild(bundle, esbuildOptions, buildOptions) { - if (!buildOptions.babel || bundle.skipBabel) { - await esbuild.build(esbuildOptions); - return; - } - - const { format, plugins, outfile } = esbuildOptions; - const temporaryFile = path.join( - DIST_DIR, - `_${bundle.output}.${esbuildOptions.format}.${ - esbuildOptions.format === "esm" ? "mjs" : "js" - }` - ); - - await esbuild.build({ - ...esbuildOptions, - plugins: plugins.filter(({ name }) => name !== "umd"), - format: format === "umd" ? "cjs" : format, - minify: false, - target: undefined, - outfile: temporaryFile, - }); - - const text = await fs.readFile(temporaryFile); - - const { code } = await babel.transformAsync(text, { - filename: outfile, - ...getBabelConfig(bundle), - }); - await fs.writeFile(temporaryFile, code); - - await esbuild.build({ - ...esbuildOptions, - define: {}, - plugins: plugins.filter( - ({ name }) => name === "umd" || name === "throw-warnings" - ), - entryPoints: [temporaryFile], - }); - - await fs.unlink(temporaryFile); -} - -async function* createBundle(bundle, buildOptions) { - for (const esbuildOptions of getEsbuildOptions(bundle, buildOptions)) { - const { outfile: file } = esbuildOptions; - - if ( - (buildOptions.files && !buildOptions.files.has(file)) || - (buildOptions.playground && esbuildOptions.format !== "umd") - ) { - yield { name: file, skipped: true }; - continue; - } - - const relativePath = buildOptions.saveAs || file; - const absolutePath = path.join(DIST_DIR, relativePath); - - esbuildOptions.outfile = absolutePath; - - yield { name: file, started: true }; - await runBuild(bundle, esbuildOptions, buildOptions); - yield { name: file, relativePath, absolutePath }; - } -} - -export default createBundle; diff --git a/scripts/build/config.js b/scripts/build/config.js new file mode 100644 index 000000000000..f8070660bcbc --- /dev/null +++ b/scripts/build/config.js @@ -0,0 +1,1084 @@ +import fs from "node:fs"; +import path from "node:path"; +import url from "node:url"; +import createEsmUtils from "esm-utils"; +import { outdent } from "outdent"; +import { copyFile, DIST_DIR, PROJECT_ROOT } from "../utils/index.js"; +import buildDependenciesLicense from "./build-dependencies-license.js"; +import buildJavascriptModule from "./build-javascript-module.js"; +import { + buildPluginHermesPackageJson, + buildPluginOxcPackageJson, + buildPrettierPackageJson, +} from "./build-package-json.js"; +import buildTypes from "./build-types.js"; +import esmifyTypescriptEslint from "./esmify-typescript-eslint.js"; +import modifyTypescriptModule from "./modify-typescript-module.js"; +import { getPackageFile } from "./utils.js"; + +const { + require, + dirname, + resolve: importMetaResolve, +} = createEsmUtils(import.meta); +const resolveEsmModulePath = (specifier) => + url.fileURLToPath(importMetaResolve(specifier)); +const copyFileBuilder = ({ packageConfig, file }) => + copyFile( + path.join(PROJECT_ROOT, file.input), + path.join(packageConfig.distDirectory, file.output.file), + ); + +function getTypesFileConfig({ input: jsFileInput, outputBaseName, isPlugin }) { + let input = jsFileInput; + if (!isPlugin) { + input = jsFileInput.replace(/\.[cm]?js$/u, ".d.ts"); + + if (!fs.existsSync(path.join(PROJECT_ROOT, input))) { + return; + } + } + + return { + input, + output: { + file: `${outputBaseName}.d.ts`, + }, + kind: "types", + isPlugin, + build: buildTypes, + }; +} + +/** + * @typedef {Object} BuildOptions + * @property {object[]?} replaceModule - Module replacements + * @property {string[]?} target - ESBuild targets + * @property {string[]?} external - array of paths that should not be included in the final bundle + * @property {boolean?} minify - disable code minification + * + * @typedef {Object} Output + * @property {"esm" | "umd" | "cjs" | "text" | "json"} format - File format + * @property {string} file - path of the output file in the `dist/` folder + * @property {string?} umdVariableName - name for the UMD file (for plugins, it'll be `prettierPlugins.${name}`) + * + * @typedef {Object} File + * @property {string} input - input of the file + * @property {Output} output - output of the file + * @property {"javascript" | "types" | "meta"} kind - file kind + * @property {function} build - file generate function + * @property {"node" | "universal"} platform - ESBuild platform + * @property {BuildOptions} buildOptions - ESBuild options + * @property {boolean?} isPlugin - file is a plugin + * @property {boolean?} addDefaultExport - add default export to bundle + */ + +const extensions = { + esm: ".mjs", + umd: ".js", + cjs: ".cjs", +}; + +const pluginFiles = [ + "src/plugins/estree.js", + { + input: "src/plugins/babel.js", + replaceModule: [ + { + // We don't use value of JSXText + module: require.resolve("@babel/parser"), + process: (text) => + text.replaceAll( + /const entity\s?=\s?entities\[desc\];/gu, + "const entity = undefined;", + ), + }, + ], + }, + { + input: "src/plugins/flow.js", + replaceModule: [ + { + module: require.resolve("flow-parser"), + process(text) { + const { fsModuleNameVariableName } = text.match( + /,(?[\p{ID_Start}_$][\p{ID_Continue}$]*)="fs",/u, + ).groups; + + return text + .replaceAll(`require(${fsModuleNameVariableName})`, "{}") + .replaceAll('require("fs")', "{}") + .replaceAll('require("constants")', "{}"); + }, + }, + ], + }, + { + input: "src/plugins/typescript.js", + replaceModule: [ + { + module: require.resolve("typescript"), + process: modifyTypescriptModule, + }, + { + module: getPackageFile( + "@typescript-eslint/typescript-estree/dist/index.js", + ), + path: getPackageFile( + "@typescript-eslint/typescript-estree/dist/parser.js", + ), + }, + { + module: getPackageFile( + "@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js", + ), + process: (text) => + text + .replace( + 'require("path")', + '{extname: file => "." + file.split(".").pop()}', + ) + .replace( + 'require("node:path")', + '{extname: file => "." + file.split(".").pop()}', + ), + }, + { + module: getPackageFile( + "@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js", + ), + process(text) { + return text + .replace( + "process.cwd()", + JSON.stringify("/prettier-security-dirname-placeholder"), + ) + .replace( + "parseSettings.projects = ", + "parseSettings.projects = true ? new Map() : ", + ) + .replace( + 'require("node:path")', + '{extname: file => "." + file.split(".").pop()}', + ) + .replace('require("@typescript-eslint/project-service")', "{}"); + }, + }, + { + module: "*", + process: esmifyTypescriptEslint, + }, + { + module: "*", + process(text, file) { + if (/require\(["'](?:typescript|ts-api-utils)["']\)/u.test(text)) { + throw new Error(`Unexpected \`require("typescript")\` in ${file}.`); + } + + return text; + }, + }, + ...[ + { + file: "@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js", + text: "export const inferSingleRun = () => false;", + }, + { + file: "@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js", + text: outdent` + export const DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = undefined; + export const ExpiringCache = class {}; + `, + }, + { + file: "@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js", + text: "export const resolveProjectList = () => [];", + }, + { + file: "@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js", + text: "export const resolveProjectList = () => [];", + }, + { + file: "@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js", + text: "export const warnAboutTSVersion = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/version-check.js", + text: "export const typescriptVersionIsAtLeast = new Proxy({}, {get: () => true})", + }, + { + file: "@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js", + text: "export const xhtmlEntities = {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/simple-traverse.js", + text: "export const simpleTraverse = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/create-program/shared.js", + text: "export const ensureAbsolutePath = path => path;", + }, + { + file: "@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js", + text: "export const createIsolatedProgram = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js", + text: outdent` + export const useProvidedPrograms = () => {}; + export const createProgramFromConfigFile = () => {}; + `, + }, + { + file: "@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js", + text: "export const validateDefaultProjectForFilesGlob = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js", + text: "export const getWatchProgramsForProjects = () => {};", + }, + "@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js", + { + file: "@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js", + text: "export const createProjectProgram = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js", + text: "export const useProgramFromProjectService = () => {};", + }, + { + file: "@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js", + text: "export const getFirstSemanticOrSyntacticError = () => {};", + }, + ].map((options) => { + options = typeof options === "string" ? { file: options } : options; + return { + module: getPackageFile(options.file), + text: options.text || "export {};", + }; + }), + + // Only needed if `range`/`loc` in parse options is `false` + { + module: getPackageFile("debug/src/browser.js"), + path: path.join(dirname, "./shims/debug.js"), + }, + { + module: require.resolve("ts-api-utils"), + process() { + throw new Error( + "Please replace the CJS version of 'ts-api-utils' with ESM version.", + ); + }, + }, + { + module: getPackageFile( + "@typescript-eslint/types/dist/generated/ast-spec.js", + ), + text: outdent` + const TYPE_STORE = new Proxy({}, {get: (_, type) => type}); + export { TYPE_STORE as AST_TOKEN_TYPES, TYPE_STORE as AST_NODE_TYPES}; + `, + }, + // Use named import from `typescript` + { + module: getPackageFile("ts-api-utils/lib/index.js"), + process(text) { + const typescriptVariables = [ + ...text.matchAll( + /import (?\w+) from ["']typescript["']/gu, + ), + ].map((match) => match.groups.variable); + + // Remove `'property' in typescript` check + text = text.replaceAll( + new RegExp( + `".*?" in (?:${typescriptVariables.join("|")})(?=\\W)`, + "gu", + ), + "true", + ); + + text = text.replaceAll( + /(?<=import )(?=\w+ from ["']typescript["'])/gu, + "* as ", + ); + + return text; + }, + }, + ], + }, + { + input: "src/plugins/acorn.js", + replaceModule: [ + { + module: resolveEsmModulePath("espree"), + process(text) { + const lines = text.split("\n"); + + let lineIndex; + + // Remove `eslint-visitor-keys` + lineIndex = lines.findIndex((line) => + line.endsWith(' from "eslint-visitor-keys";'), + ); + lines.splice(lineIndex, 1); + + // Remove code after `// Public` + lineIndex = lines.indexOf("// Public") - 1; + lines.length = lineIndex; + + // Save code after `// Parser` + lineIndex = lines.indexOf("// Parser") - 1; + const parserCodeLines = lines.slice(lineIndex); + lines.length = lineIndex; + + // Remove code after `// Tokenizer` + lineIndex = lines.indexOf("// Tokenizer") - 1; + lines.length = lineIndex; + + text = [...lines, ...parserCodeLines].join("\n"); + + return text; + }, + }, + { + // We don't use value of JSXText + module: getPackageFile("acorn-jsx/xhtml.js"), + text: "module.exports = {};", + }, + { + module: getPackageFile("acorn-jsx/index.js"), + find: 'require("acorn")', + replacement: "undefined", + }, + ], + }, + { + input: "src/plugins/meriyah.js", + replaceModule: [ + // We don't use value of JSXText + { + module: resolveEsmModulePath("meriyah"), + find: "parser.tokenValue = decodeHTMLStrict(raw);", + replacement: "parser.tokenValue = raw;", + }, + ], + }, + { + input: "src/plugins/angular.js", + replaceModule: [ + { + module: resolveEsmModulePath("@angular/compiler"), + process(text) { + text = text.replace( + "const phases = [", + "const phases = undefined && [", + ); + text = text.replace("publishFacade(_global)", ""); + text = text.replace( + "const serializerVisitor = new GetMsgSerializerVisitor()", + "", + ); + text = text.replace( + "const compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder", + "", + ); + text = text.replace( + "const domSchema = new DomElementSchemaRegistry()", + "", + ); + text = text.replace( + "const elementRegistry = new DomElementSchemaRegistry()", + "", + ); + text = text.replace( + "const serializerVisitor$1 = new _SerializerVisitor()", + "", + ); + text = text.replace( + "const NON_BINDABLE_VISITOR = new NonBindableVisitor()", + "", + ); + text = text.replace( + "const NULL_EXPR = new LiteralExpr(null, null, null)", + "", + ); + text = text.replace( + "const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null)", + "", + ); + text = text.replace("const _visitor = new _Visitor$2()", ""); + text = text.replaceAll( + /const (.*?) = new BuiltinType\(BuiltinTypeName\..*?\);/gu, + "const $1 = undefined;", + ); + text = text.replaceAll(/var output_ast =.*?;\n/gsu, "var output_ast"); + + text = text.replace( + "const serializer = new IcuSerializerVisitor();", + "", + ); + text = text.replace( + "const _TAG_DEFINITION = new XmlTagDefinition();", + "", + ); + + text = text.replaceAll( + /function transformExpressionsInExpression\(.*?\n.*?\n\}\n/gsu, + "function transformExpressionsInExpression(){}", + ); + + text = text.replaceAll( + /const deferTriggerToR3TriggerInstructionsMap = new Map\(\[\n.*?\n\]\);\n/gsu, + "const deferTriggerToR3TriggerInstructionsMap = undefined;", + ); + + text = text.replaceAll( + /const BINARY_OPERATORS = new Map\(\[\n.*?\n\]\);\n/gsu, + "const BINARY_OPERATORS = undefined;", + ); + + text = text.replaceAll( + /const PIPE_BINDINGS = \[\n.*?\n\];\n/gsu, + "const PIPE_BINDINGS = undefined;", + ); + + text = text.replaceAll( + /const TEXT_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const TEXT_INTERPOLATE_CONFIG = undefined;", + ); + + text = text.replaceAll( + /const CHAINABLE = new Set\(\[\n.*?\n\]\);\n/gsu, + "const CHAINABLE = undefined;", + ); + + text = text.replaceAll( + /const PROPERTY_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const PROPERTY_INTERPOLATE_CONFIG = undefined;", + ); + text = text.replaceAll( + /const STYLE_PROP_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const STYLE_PROP_INTERPOLATE_CONFIG = undefined;", + ); + + text = text.replaceAll( + /const ATTRIBUTE_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const ATTRIBUTE_INTERPOLATE_CONFIG = undefined;", + ); + text = text.replaceAll( + /const STYLE_MAP_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const STYLE_MAP_INTERPOLATE_CONFIG = undefined;", + ); + text = text.replaceAll( + /const CLASS_MAP_INTERPOLATE_CONFIG = \{\n.*?\n\};\n/gsu, + "const CLASS_MAP_INTERPOLATE_CONFIG = undefined;", + ); + text = text.replaceAll( + /const PURE_FUNCTION_CONFIG = \{\n.*?\n\};\n/gsu, + "const PURE_FUNCTION_CONFIG = undefined;", + ); + text = text.replaceAll( + /const NAMED_ENTITIES = \{\n.*?\n\};\n/gsu, + "const NAMED_ENTITIES = {};", + ); + + return text; + }, + }, + ], + }, + { + input: "src/plugins/postcss.js", + replaceModule: [ + // The following two replacements prevent load `source-map` module + { + module: getPackageFile("postcss/lib/previous-map.js"), + text: "module.exports = class {};", + }, + { + module: getPackageFile("postcss/lib/map-generator.js"), + text: "module.exports = class { generate() {} };", + }, + { + module: getPackageFile("postcss/lib/input.js"), + process: (text) => + text.replace("require('url')", "{}").replace("require('path')", "{}"), + }, + // `postcss-values-parser` uses constructor.name, it will be changed by bundler + // https://github.com/shellscape/postcss-values-parser/blob/c00f858ab8c86ce9f06fdb702e8f26376f467248/lib/parser.js#L499 + { + module: getPackageFile("postcss-values-parser/lib/parser.js"), + find: "node.constructor.name === 'Word'", + replacement: "node.type === 'word'", + }, + // Prevent `node:util`, `node:utl`, and `node:path` shim + { + module: getPackageFile("postcss-values-parser/lib/tokenize.js"), + process: (text) => + text + .replace("require('util')", "{}") + .replace( + "let message = util.format('Unclosed %s at line: %d, column: %d, token: %d', what, line, pos - offset, pos);", + "let message = `Unclosed ${what} at line: ${line}, column: ${pos - offset}, token: ${pos}`;", + ) + .replace( + "let message = util.format('Syntax error at line: %d, column: %d, token: %d', line, pos - offset, pos);", + "let message = `Syntax error at line: ${line}, column: ${pos - offset}, token: ${pos}`;", + ), + }, + ], + }, + "src/plugins/graphql.js", + { + input: "src/plugins/markdown.js", + replaceModule: [ + { + module: getPackageFile("parse-entities/decode-entity.browser.js"), + path: getPackageFile("parse-entities/decode-entity.js"), + }, + ], + }, + { + input: "src/plugins/glimmer.js", + replaceModule: [ + ...["@glimmer/util", "@glimmer/wire-format", "@glimmer/syntax"].map( + (packageName) => ({ + module: getPackageFile(`${packageName}/dist/prod/index.js`), + path: getPackageFile(`${packageName}/dist/dev/index.js`), + }), + ), + { + module: getPackageFile("@glimmer/syntax/dist/dev/index.js"), + process(text) { + text = text.replace( + 'import { DEBUG } from "@glimmer/env";', + "const DEBUG = false;", + ); + + // This passed to plugins, our plugin don't need access to the options + text = text.replace(/(?<=\sconst syntax = )\{.*?\n\}(?=;\n)/su, "{}"); + + text = text.replaceAll( + /\sclass \S+ extends[(\s]+node\(.*?\).*?\{(?:\n.*?\n)?\}\n/gsu, + "\n", + ); + + text = text.replaceAll( + /\nvar api\S* = \s*(?:\/\*#__PURE__\*\/)?\s*Object\.freeze\(\{.*?\n\}\);/gsu, + "", + ); + + text = text.replace( + "const ARGUMENT_RESOLUTION = ", + "const ARGUMENT_RESOLUTION = undefined &&", + ); + + text = text.replace( + "const HTML_RESOLUTION = ", + "const HTML_RESOLUTION = undefined &&", + ); + + text = text.replace( + "const LOCAL_DEBUG = ", + "const LOCAL_DEBUG = false &&", + ); + + text = text.replace(/(?<=\n)export .*?;/u, "export { preprocess };"); + + return text; + }, + }, + { + module: getPackageFile("@handlebars/parser/dist/esm/index.js"), + path: getPackageFile("@handlebars/parser/dist/esm/parse.js"), + }, + ], + }, + "src/plugins/html.js", + "src/plugins/yaml.js", +].map((file) => { + if (typeof file === "string") { + file = { input: file }; + } + + let { input, umdPropertyName, outputBaseName, ...buildOptions } = file; + + outputBaseName ??= input.match(/\/plugins\/(?.*?)\.js$/u) + .groups.outputBaseName; + + const umdVariableName = `prettierPlugins.${ + umdPropertyName ?? outputBaseName + }`; + + return { + input, + outputBaseName: `plugins/${outputBaseName}`, + umdVariableName, + buildOptions, + isPlugin: true, + }; +}); + +const nonPluginUniversalFiles = [ + { + input: "src/document/public.js", + outputBaseName: "doc", + umdVariableName: "doc", + minify: false, + }, + { + input: "src/standalone.js", + umdVariableName: "prettier", + replaceModule: [ + { + module: require.resolve("@babel/code-frame"), + process(text) { + text = text.replaceAll("var picocolors = require('picocolors');", ""); + text = text.replaceAll("var jsTokens = require('js-tokens');", ""); + text = text.replaceAll( + "var helperValidatorIdentifier = require('@babel/helper-validator-identifier');", + "", + ); + + text = text.replaceAll( + /(?<=\n)let tokenize;\n\{\n.*?\n\}(?=\n)/gsu, + "", + ); + + text = text.replaceAll( + /(?<=\n)function highlight\(text\) \{\n.*?\n\}(?=\n)/gsu, + "function highlight(text) {return text}", + ); + + text = text.replaceAll( + /(?<=\n)function getDefs\(enabled\) \{\n.*?\n\}(?=\n)/gsu, + outdent` + function getDefs() { + return new Proxy({}, {get: () => (text) => text}) + } + `, + ); + + text = text.replaceAll( + "const defsOn = buildDefs(picocolors.createColors(true));", + "", + ); + text = text.replaceAll( + "const defsOff = buildDefs(picocolors.createColors(false));", + "", + ); + + text = text.replaceAll( + "const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;", + "const shouldHighlight = false;", + ); + + text = text.replaceAll("exports.default = index;", ""); + text = text.replaceAll("exports.highlight = highlight;", ""); + + return text; + }, + }, + // Smaller size + { + module: getPackageFile("picocolors/picocolors.browser.js"), + path: path.join(dirname, "./shims/colors.js"), + }, + ], + }, +].map((file) => { + const { + input, + outputBaseName = path.basename(input, ".js"), + umdVariableName, + ...buildOptions + } = file; + + return { + input, + outputBaseName, + umdVariableName, + buildOptions, + }; +}); + +const universalFiles = [...nonPluginUniversalFiles, ...pluginFiles].flatMap( + (file) => { + let { input, outputBaseName, umdVariableName, buildOptions, isPlugin } = + file; + + outputBaseName ??= path.basename(input); + + return [ + ...[ + { + format: "esm", + file: `${outputBaseName}${extensions.esm}`, + }, + { + format: "umd", + file: `${outputBaseName}${extensions.umd}`, + umdVariableName, + }, + ].map((output) => ({ + input, + output, + platform: "universal", + buildOptions: { + addDefaultExport: output.format === "esm", + ...buildOptions, + }, + isPlugin, + build: buildJavascriptModule, + kind: "javascript", + playground: output.format === "esm" && outputBaseName !== "doc", + })), + getTypesFileConfig({ input, outputBaseName, isPlugin }), + ]; + }, +); + +const nodejsFiles = [ + { + input: "src/index.js", + replaceModule: [ + // `editorconfig` use a older version of `semver` and only uses `semver.gte` + { + module: require.resolve("editorconfig"), + find: 'var semver = __importStar(require("semver"));', + replacement: ` + var semver = { + gte: require(${JSON.stringify( + require.resolve("semver/functions/gte"), + )}) + }; + `, + }, + { + module: require.resolve("n-readlines"), + find: "const readBuffer = new Buffer(this.options.readChunk);", + replacement: "const readBuffer = Buffer.alloc(this.options.readChunk);", + }, + // `parse-json` use another copy of `@babel/code-frame` + { + module: require.resolve("@babel/code-frame", { + paths: [require.resolve("parse-json")], + }), + path: require.resolve("@babel/code-frame"), + }, + { + module: getPackageFile("json5/dist/index.mjs"), + find: "export default lib;", + replacement: "export default { parse };", + }, + ], + addDefaultExport: true, + }, + { + input: "src/index.cjs", + }, + { + input: "bin/prettier.cjs", + outputBaseName: "bin/prettier", + target: ["node0.10"], + replaceModule: [ + { + module: path.join(PROJECT_ROOT, "bin/prettier.cjs"), + process(text) { + text = text.replace( + "../src/cli/index.js", + "../internal/legacy-cli.mjs", + ); + text = text.replace( + "../src/experimental-cli/index.js", + "../internal/experimental-cli.mjs", + ); + return text; + }, + }, + ], + }, + { + input: "src/cli/index.js", + outputBaseName: "internal/legacy-cli", + external: ["tinybench"], + // TODO: Remove this when we drop support for Node.js v16 + replaceModule: [ + { + module: resolveEsmModulePath("cacheable"), + process: (text) => + outdent` + const structuredClone = + globalThis.structuredClone ?? + ((value) => JSON.parse(JSON.stringify(value))); + + ${text} + `, + }, + ], + }, + ...[ + { + input: "src/experimental-cli/index.js", + outputBaseName: "internal/experimental-cli", + replaceModule: [ + { + module: getPackageFile("@prettier/cli/dist/prettier_serial.js"), + external: "./experimental-cli-worker.mjs", + }, + { + module: getPackageFile("@prettier/cli/dist/prettier_parallel.js"), + find: 'new URL("./prettier_serial.js", import.meta.url)', + replacement: + 'new URL("./experimental-cli-worker.mjs", import.meta.url)', + }, + ], + }, + { + input: "src/experimental-cli/worker.js", + outputBaseName: "internal/experimental-cli-worker", + }, + ].map(({ input, outputBaseName, replaceModule = [] }) => ({ + input, + outputBaseName, + replaceModule: [ + ...replaceModule, + { + module: getPackageFile("@prettier/cli/dist/constants.js"), + path: path.join( + PROJECT_ROOT, + "src/experimental-cli/constants.evaluate.js", + ), + }, + ...["package.json", "index.mjs"].map((file) => ({ + module: getPackageFile(`prettier/${file}`), + external: `../${file}`, + })), + ], + })), +].flatMap((file) => { + let { input, output, outputBaseName, ...buildOptions } = file; + + const format = input.endsWith(".cjs") ? "cjs" : "esm"; + outputBaseName ??= path.basename(input, path.extname(input)); + + return [ + { + input, + output: { + format, + file: `${outputBaseName}${extensions[format]}`, + }, + platform: "node", + buildOptions, + build: buildJavascriptModule, + kind: "javascript", + }, + getTypesFileConfig({ input, outputBaseName }), + ]; +}); + +const metaFiles = [ + { + input: "package.json", + output: { + format: "json", + }, + build: buildPrettierPackageJson, + }, + { + input: "README.md", + build: copyFileBuilder, + }, + { + input: "LICENSE", + build: copyFileBuilder, + }, + { + output: { + file: "THIRD-PARTY-NOTICES.md", + }, + build: buildDependenciesLicense, + }, +].map((file) => ({ + ...file, + output: { file: file.input, ...file.output }, + kind: "meta", +})); + +/** @type {Files[]} */ +const files = [...nodejsFiles, ...universalFiles, ...metaFiles].filter(Boolean); +export default [ + { + packageName: "prettier", + // Used in THIRD-PARTY-NOTICES.md + packageDisplayName: "Prettier", + distDirectory: path.join(DIST_DIR, "prettier"), + files, + }, + { + packageName: "@prettier/plugin-oxc", + distDirectory: path.join(DIST_DIR, "plugin-oxc"), + files: [ + ...[ + { + input: "packages/plugin-oxc/index.js", + addDefaultExport: true, + external: ["oxc-parser"], + }, + ].flatMap((file) => { + let { input, output, outputBaseName, ...buildOptions } = file; + + const format = input.endsWith(".cjs") ? "cjs" : "esm"; + outputBaseName ??= path.basename(input, path.extname(input)); + + return [ + { + input, + output: { + format, + file: `${outputBaseName}${extensions[format]}`, + }, + platform: "node", + buildOptions, + build: buildJavascriptModule, + kind: "javascript", + }, + getTypesFileConfig({ input, outputBaseName, isPlugin: true }), + ]; + }), + ...[ + { + input: "packages/plugin-oxc/package.json", + output: { + file: "package.json", + format: "json", + }, + build: buildPluginOxcPackageJson, + }, + { + input: "packages/plugin-oxc/README.md", + output: { + file: "README.md", + }, + build: copyFileBuilder, + }, + { + input: "LICENSE", + output: { + file: "LICENSE", + }, + build: copyFileBuilder, + }, + { + output: { + file: "THIRD-PARTY-NOTICES.md", + }, + build: buildDependenciesLicense, + }, + ].map((file) => ({ + ...file, + output: { file: file.input, ...file.output }, + kind: "meta", + })), + ], + }, + { + packageName: "@prettier/plugin-hermes", + distDirectory: path.join(DIST_DIR, "plugin-hermes"), + files: [ + ...[ + { + input: "packages/plugin-hermes/index.js", + addDefaultExport: true, + replaceModule: [ + { + module: require.resolve("hermes-parser/dist/HermesParser.js"), + process(text) { + text = + 'const Buffer = globalThis.Buffer ?? require("buffer/").Buffer;' + + text; + return text; + }, + }, + { + module: require.resolve("hermes-parser/dist/HermesParserWASM.js"), + process(text) { + text = text.replaceAll("process.argv", "[]"); + text = text.replaceAll('require("fs")', "undefined"); + text = text.replaceAll('require("path")', "undefined"); + text = + 'const Buffer = globalThis.Buffer ?? require("buffer/").Buffer;' + + text; + + return text; + }, + }, + ], + }, + ].flatMap((file) => { + let { input, output, outputBaseName, ...buildOptions } = file; + + outputBaseName ??= path.basename(input, path.extname(input)); + const format = input.endsWith(".cjs") ? "cjs" : "esm"; + + return [ + { + input, + output: { + format, + file: `${outputBaseName}${extensions[format]}`, + }, + platform: "universal", + buildOptions: { + addDefaultExport: true, + ...buildOptions, + }, + isPlugin: true, + build: buildJavascriptModule, + playground: true, + kind: "javascript", + }, + getTypesFileConfig({ input, outputBaseName, isPlugin: true }), + ]; + }), + ...[ + { + input: "packages/plugin-hermes/package.json", + output: { + file: "package.json", + format: "json", + }, + build: buildPluginHermesPackageJson, + }, + { + input: "packages/plugin-hermes/README.md", + output: { + file: "README.md", + }, + build: copyFileBuilder, + }, + { + input: "LICENSE", + output: { + file: "LICENSE", + }, + build: copyFileBuilder, + }, + { + output: { + file: "THIRD-PARTY-NOTICES.md", + }, + build: buildDependenciesLicense, + }, + ].map((file) => ({ + ...file, + output: { file: file.input, ...file.output }, + kind: "meta", + })), + ], + }, +]; diff --git a/scripts/build/config.mjs b/scripts/build/config.mjs deleted file mode 100644 index e06d5bbbc48a..000000000000 --- a/scripts/build/config.mjs +++ /dev/null @@ -1,283 +0,0 @@ -import path from "node:path"; -import { createRequire } from "node:module"; -import createEsmUtils from "esm-utils"; -import { PROJECT_ROOT } from "../utils/index.mjs"; -import modifyTypescriptModule from "./modify-typescript-module.mjs"; - -const { require } = createEsmUtils(import.meta); - -/** - * @typedef {Object} Bundle - * @property {string} input - input of the bundle - * @property {string?} output - path of the output file in the `dist/` folder - * @property {string?} name - name for the UMD bundle (for plugins, it'll be `prettierPlugins.${name}`) - * @property {'node' | 'universal'} target - should generate a CJS only for node or universal bundle - * @property {'core' | 'plugin'} type - it's a plugin bundle or core part of prettier - * @property {string[]} external - array of paths that should not be included in the final bundle - * @property {object[]} replaceModule - Module replacements - * @property {string[]} babelPlugins - babel plugins - * @property {boolean?} minify - minify - * @property {string[]?} esbuildTarget - ESBuild target - * @property {boolean?} skipBabel - Skip babel transform - - * @typedef {Object} CommonJSConfig - * @property {string[]} ignore - paths of CJS modules to ignore - */ - -/* -`diff` use deprecated folder mapping "./" in the "exports" field, -so we can't `require("diff/lib/diff/array.js")` directly. -To reduce the bundle size, replace the entry with smaller files. - -We can switch to deep require once https://github.com/kpdecker/jsdiff/pull/351 get merged -*/ -const replaceDiffPackageEntry = (file) => ({ - module: require.resolve("diff"), - path: path.join(path.dirname(require.resolve("diff/package.json")), file), -}); - -/** @type {Bundle[]} */ -const parsers = [ - { - input: "src/language-js/parse/babel.js", - }, - { - input: "src/language-js/parse/flow.js", - replaceModule: [ - // `flow-parser` use this for `globalThis`, can't work in strictMode - { - module: require.resolve("flow-parser"), - find: "(function(){return this}())", - replacement: "(globalThis)", - }, - ], - }, - { - input: "src/language-js/parse/typescript.js", - replaceModule: [ - // `@typescript-eslint/typescript-estree` v4 - { - module: "*", - find: 'require("globby")', - replacement: "{}", - }, - { - module: "*", - find: "extra.projects = prepareAndTransformProjects(", - replacement: "extra.projects = [] || prepareAndTransformProjects(", - }, - { - module: "*", - find: "process.versions.node", - replacement: JSON.stringify("999.999.999"), - }, - { - module: "*", - find: "process.cwd()", - replacement: JSON.stringify("/prettier-security-dirname-placeholder"), - }, - { - module: "*", - find: 'require("perf_hooks")', - replacement: "{}", - }, - { - module: "*", - find: 'require("inspector")', - replacement: "{}", - }, - { - module: "*", - find: "typescriptVersionIsAtLeast[version] = semverCheck(version);", - replacement: "typescriptVersionIsAtLeast[version] = true;", - }, - // The next two replacement fixed webpack warning `Critical dependency: require function is used in a way in which dependencies cannot be statically extracted` - // #12338 - { - module: require.resolve( - "@typescript-eslint/typescript-estree/dist/create-program/shared.js" - ), - find: "moduleResolver = require(moduleResolverPath);", - replacement: "throw new Error('Dynamic require is not supported');", - }, - { - module: require.resolve("typescript"), - process: modifyTypescriptModule, - }, - { - module: require.resolve("debug/src/browser.js"), - path: require.resolve("./shims/debug.cjs"), - }, - ], - }, - { - input: "src/language-js/parse/acorn-and-espree.js", - name: "prettierPlugins.espree", - // TODO: Rename this file to `parser-acorn-and-espree.js` or find a better way - output: "parser-espree.js", - replaceModule: [ - { - module: require.resolve("espree"), - find: "const Syntax = (function() {", - replacement: "const Syntax = undefined && (function() {", - }, - { - module: require.resolve("espree"), - find: "var visitorKeys = require('eslint-visitor-keys');", - replacement: "var visitorKeys;", - }, - ], - }, - { - input: "src/language-js/parse/meriyah.js", - }, - { - input: "src/language-js/parse/angular.js", - replaceModule: [ - { - module: "*", - find: 'require("@angular/compiler/src/', - replacement: 'require("@angular/compiler/esm2015/src/', - }, - ], - }, - { - input: "src/language-css/parser-postcss.js", - replaceModule: [ - // `postcss-values-parser` uses constructor.name, it will be changed by bundler - // https://github.com/shellscape/postcss-values-parser/blob/c00f858ab8c86ce9f06fdb702e8f26376f467248/lib/parser.js#L499 - { - module: require.resolve("postcss-values-parser/lib/parser.js"), - find: "node.constructor.name === 'Word'", - replacement: "node.type === 'word'", - }, - // The following two replacements prevent load `source-map` module - { - module: require.resolve("postcss/lib/previous-map.js"), - text: "module.exports = class {};", - }, - { - module: require.resolve("postcss/lib/map-generator.js"), - text: "module.exports = class { generate() {} };", - }, - ], - }, - { - input: "src/language-graphql/parser-graphql.js", - }, - { - input: "src/language-markdown/parser-markdown.js", - replaceModule: [ - { - module: require.resolve("parse-entities/decode-entity.browser.js"), - path: require.resolve("parse-entities/decode-entity.js"), - }, - ], - }, - { - input: "src/language-handlebars/parser-glimmer.js", - }, - { - input: "src/language-html/parser-html.js", - }, - { - input: "src/language-yaml/parser-yaml.js", - }, -].map((bundle) => { - const { name } = bundle.input.match( - /(?:parser-|parse\/)(?.*?)\.js$/ - ).groups; - - return { - type: "plugin", - target: "universal", - name: `prettierPlugins.${name}`, - output: `parser-${name}.js`, - ...bundle, - }; -}); - -/** @type {Bundle[]} */ -const coreBundles = [ - { - input: "src/index.js", - replaceModule: [ - { - module: require.resolve("@iarna/toml/lib/toml-parser.js"), - find: "const utilInspect = eval(\"require('util').inspect\")", - replacement: "const utilInspect = require('util').inspect", - }, - // `editorconfig` use a older version of `semver` and only uses `semver.gte` - { - module: require.resolve("editorconfig"), - find: 'var semver = __importStar(require("semver"));', - replacement: ` - var semver = { - gte: require(${JSON.stringify( - require.resolve("semver/functions/gte") - )}) - }; - `, - }, - replaceDiffPackageEntry("lib/diff/array.js"), - ], - }, - { - input: "src/document/index.js", - name: "doc", - output: "doc.js", - target: "universal", - format: "umd", - minify: false, - }, - { - input: "src/standalone.js", - name: "prettier", - target: "universal", - replaceModule: [ - { - module: require.resolve("@babel/highlight"), - path: require.resolve("./shims/babel-highlight.cjs"), - }, - { - module: createRequire(require.resolve("vnopts")).resolve("chalk"), - path: require.resolve("./shims/chalk.cjs"), - }, - replaceDiffPackageEntry("lib/diff/array.js"), - { - module: path.join(PROJECT_ROOT, "src/main/load-parser.js"), - text: "module.exports = () => {};", - }, - ], - }, - { - input: "bin/prettier.js", - output: "bin-prettier.js", - esbuildTarget: ["node0.10"], - skipBabel: true, - }, - { - input: "src/cli/index.js", - output: "cli.js", - external: ["benchmark"], - replaceModule: [replaceDiffPackageEntry("lib/patch/create.js")], - }, - { - input: "src/common/third-party.js", - replaceModule: [ - // cosmiconfig@6 -> import-fresh can't find parentModule, since module is bundled - { - module: require.resolve("parent-module"), - path: require.resolve("./shims/parent-module.cjs"), - }, - ], - }, -].map((bundle) => ({ - type: "core", - target: "node", - output: path.basename(bundle.input), - ...bundle, -})); - -const configs = [...coreBundles, ...parsers]; -export default configs; diff --git a/scripts/build/esbuild-plugins/add-default-export.js b/scripts/build/esbuild-plugins/add-default-export.js new file mode 100644 index 000000000000..a2e091875cf3 --- /dev/null +++ b/scripts/build/esbuild-plugins/add-default-export.js @@ -0,0 +1,43 @@ +import path from "node:path"; + +const PLUGIN_NAMESPACE = "with-default-export"; +export default function esbuildPluginAddDefaultExport() { + return { + name: "addDefaultExport", + setup(build) { + const { initialOptions } = build; + if (initialOptions.format !== "esm") { + return; + } + + build.onResolve({ filter: /./, namespace: "file" }, (module) => { + if (module.kind === "entry-point") { + const file = module.path; + const relativePath = path + .relative(module.resolveDir, file) + .replaceAll("\\", "/"); + return { + path: relativePath, + namespace: PLUGIN_NAMESPACE, + pluginData: { file }, + }; + } + }); + + build.onLoad({ filter: /./, namespace: PLUGIN_NAMESPACE }, (module) => { + const { file } = module.pluginData; + const source = JSON.stringify(`./${path.basename(file)}`); + + return { + contents: /* indent */ ` + import * as namespace from ${source}; + + export * from ${source}; + export default namespace; + `, + resolveDir: path.dirname(file), + }; + }); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/evaluate.js b/scripts/build/esbuild-plugins/evaluate.js new file mode 100644 index 000000000000..009bdd09027a --- /dev/null +++ b/scripts/build/esbuild-plugins/evaluate.js @@ -0,0 +1,36 @@ +import url from "node:url"; +import { isValidIdentifier } from "@babel/types"; +import serialize from "serialize-javascript"; + +export default function esbuildPluginEvaluate() { + return { + name: "evaluate", + setup(build) { + build.onLoad( + { filter: /\.evaluate\.[cm]?js$/, namespace: "file" }, + async ({ path }) => { + const module = await import(url.pathToFileURL(path)); + const text = Object.entries(module) + .map(([specifier, value]) => { + const code = + value instanceof RegExp + ? `/${value.source}/${value.flags}` + : serialize(value, { space: 2 }); + + if (specifier === "default") { + return `export default ${code};`; + } + + if (!isValidIdentifier(specifier)) { + throw new Error(`${specifier} is not a valid specifier`); + } + + return `export const ${specifier} = ${code};`; + }) + .join("\n"); + return { contents: text }; + }, + ); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/evaluate.mjs b/scripts/build/esbuild-plugins/evaluate.mjs deleted file mode 100644 index ba76a0159764..000000000000 --- a/scripts/build/esbuild-plugins/evaluate.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import createEsmUtils from "esm-utils"; - -const { require } = createEsmUtils(import.meta); - -export default function esbuildPluginEvaluate() { - return { - name: "evaluate", - - setup(build) { - build.onLoad({ filter: /\.evaluate\.js$/ }, ({ path }) => { - const json = JSON.stringify(require(path), (_, v) => { - if (typeof v === "function") { - throw new TypeError("Cannot evaluate functions."); - } - return v; - }); - - return { loader: "json", contents: json }; - }); - }, - }; -} diff --git a/scripts/build/esbuild-plugins/license.mjs b/scripts/build/esbuild-plugins/license.mjs deleted file mode 100644 index a9d121943e29..000000000000 --- a/scripts/build/esbuild-plugins/license.mjs +++ /dev/null @@ -1,28 +0,0 @@ -import rollupPluginLicense from "rollup-plugin-license"; - -export default function esbuildPluginLicense(options) { - const plugin = rollupPluginLicense(options); - - return { - name: "license", - - setup(build) { - build.initialOptions.metafile = true; - - build.onEnd((result) => { - if (result.errors.length > 0) { - return; - } - - const files = Object.keys(result.metafile.inputs); - const chunk = { - modules: Object.fromEntries( - files.map((file) => [file, { renderedLength: 1 }]) - ), - }; - plugin.renderChunk("", chunk); - plugin.generateBundle(); - }); - }, - }; -} diff --git a/scripts/build/esbuild-plugins/primitive-define.js b/scripts/build/esbuild-plugins/primitive-define.js new file mode 100644 index 000000000000..5c4c850a3bd9 --- /dev/null +++ b/scripts/build/esbuild-plugins/primitive-define.js @@ -0,0 +1,32 @@ +function stringify(value) { + if ( + value !== null && + !["boolean", "number", "string", "undefined"].includes(typeof value) + ) { + throw Object.assign(new TypeError("value not allowed"), { value }); + } + + return value === undefined ? "undefined" : JSON.stringify(value); +} + +/* +Non-primitive value will cause esbuild inject a function call in every file +only primitive values are allowed to use. +*/ +export default function esbuildPluginPrimitiveDefine(define) { + return { + name: "primitive-define", + setup(build) { + const esbuildConfig = build.initialOptions; + if (esbuildConfig.define) { + throw new Error( + "Use `esbuildPluginPrimitiveDefine(define)` instead of 'define' option", + ); + } + + esbuildConfig.define = Object.fromEntries( + Object.entries(define).map(([key, value]) => [key, stringify(value)]), + ); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/replace-module.js b/scripts/build/esbuild-plugins/replace-module.js new file mode 100644 index 000000000000..69b6326a8aad --- /dev/null +++ b/scripts/build/esbuild-plugins/replace-module.js @@ -0,0 +1,199 @@ +import fs from "node:fs/promises"; + +const DEFAULT_ON_RESOLVE_CONCEPTS = { filter: /./, namespace: "file" }; +const DEFAULT_ON_LOAD_CONCEPTS = { + filter: /\.(?:js|json|mjs|cjs)$/, + namespace: "file", +}; + +function processReplacements(replacements) { + const onResolveReplacements = new Map(); + const onLoadReplacements = new Map(); + const onLoadProcessors = []; + + const checkPathReplaced = (module) => { + if (!onResolveReplacements.has(module)) { + return; + } + + throw new Error(`module: '${module}' already replaced with another path.`); + }; + + const checkTextReplaced = (module) => { + if (!onLoadReplacements.has(module)) { + return; + } + + throw new Error( + `module: '${module}' already replaced with another content.`, + ); + }; + + for (const replacement of replacements) { + const { module } = replacement; + + if (typeof module !== "string") { + throw new TypeError("'module' option is required."); + } + + if ( + Object.hasOwn(replacement, "external") || + Object.hasOwn(replacement, "path") + ) { + if (module === "*") { + throw new Error("Can not replace all modules with the same path."); + } + + checkPathReplaced(module); + + onResolveReplacements.set( + module, + Object.hasOwn(replacement, "external") + ? { external: true, path: replacement.external } + : { path: replacement.path }, + ); + + continue; + } + + if (Object.hasOwn(replacement, "text")) { + if (module === "*") { + throw new Error("Can not replace all modules with the same content."); + } + + checkPathReplaced(module); + checkTextReplaced(module); + + onLoadReplacements.set(module, { + contents: replacement.text, + loader: replacement.loader, + }); + + continue; + } + + checkPathReplaced(module); + checkTextReplaced(module); + + let { process } = replacement; + + if (Object.hasOwn(replacement, "process")) { + if (typeof process !== "function") { + throw new TypeError("'process' option should be a function."); + } + } else if ( + Object.hasOwn(replacement, "find") && + Object.hasOwn(replacement, "replacement") + ) { + process = (text) => + text.replaceAll(replacement.find, replacement.replacement); + } else { + console.log(replacement); + throw new Error("Unexpected replacement option."); + } + + onLoadProcessors.push({ module, process }); + } + + return { onResolveReplacements, onLoadReplacements, onLoadProcessors }; +} + +function setupOnResolveListener(build, { concepts, replacements }) { + if (replacements.size === 0) { + return; + } + + // `build.resolve()` will call `onResolve` listener + // Use a `Set` to avoid infinite loop + const seenModules = new Set(); + build.onResolve(concepts, async (args) => { + if ( + !( + args.kind === "require-call" || + args.kind === "import-statement" || + args.kind === "dynamic-import" + ) + ) { + return; + } + + const key = JSON.stringify(args); + if (seenModules.has(key)) { + return; + } + seenModules.add(key); + + const resolveResult = await build.resolve(args.path, { + importer: args.importer, + namespace: args.namespace, + resolveDir: args.resolveDir, + kind: args.kind, + pluginData: args.pluginData, + }); + + // `build.resolve()` seems not respecting `browser` field in `package.json`, + // `resolveResult` maybe not correct, return `undefined` to let esbuild process the file. + return replacements.get(resolveResult.path); + }); +} + +function setupOnLoadListener(build, { concepts, replacements, processors }) { + if (replacements.size === 0 && processors.length === 0) { + return; + } + + build.onLoad(concepts, async ({ path: file }) => { + if (replacements.has(file)) { + return replacements.get(file); + } + + const processFunctions = processors + .filter(({ module }) => module === "*" || module === file) + .map((processor) => processor.process); + + if (processFunctions.length === 0) { + return; + } + + const original = await fs.readFile(file, "utf8"); + + let text = original; + for (const process of processFunctions) { + text = process(text, file); + } + + // For files not JavaScript, we need add correct `loader` to the result, + // We can simply return `undefined` to let esbuild process the file. + if (original === text) { + return; + } + + return { contents: text }; + }); +} + +export default function esbuildPluginReplaceModule({ + onLoadConcepts = DEFAULT_ON_LOAD_CONCEPTS, + onResolveConcepts = DEFAULT_ON_RESOLVE_CONCEPTS, + replacements, +}) { + const { onResolveReplacements, onLoadReplacements, onLoadProcessors } = + processReplacements(replacements); + const onResolveListenerOptions = { + concepts: onResolveConcepts, + replacements: onResolveReplacements, + }; + const onLoadListenerOptions = { + concepts: onLoadConcepts, + replacements: onLoadReplacements, + processors: onLoadProcessors, + }; + + return { + name: "replace-module", + setup(build) { + setupOnResolveListener(build, onResolveListenerOptions); + setupOnLoadListener(build, onLoadListenerOptions); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/replace-module.mjs b/scripts/build/esbuild-plugins/replace-module.mjs deleted file mode 100644 index 5ff53189e874..000000000000 --- a/scripts/build/esbuild-plugins/replace-module.mjs +++ /dev/null @@ -1,208 +0,0 @@ -import fs from "node:fs/promises"; - -const DEFAULT_ON_RESOLVE_CONCEPTS = { filter: /./, namespace: "file" }; -const DEFAULT_ON_LOAD_CONCEPTS = { - filter: /\.(?:js|json|mjs|cjs)$/, - namespace: "file", -}; - -function processReplacements(replacements) { - const onResolveReplacements = new Map(); - const onLoadReplacements = new Map(); - const onLoadProcessors = new Map(); - - const checkPathReplaced = (module) => { - if (!onResolveReplacements.has(module)) { - return; - } - - throw new Error(`module: '${module}' already replaced with another path.`); - }; - - const checkTextReplaced = (module) => { - if (!onLoadReplacements.has(module)) { - return; - } - - throw new Error( - `module: '${module}' already replaced with another content.` - ); - }; - - for (const replacement of replacements) { - const { module } = replacement; - - if (typeof module !== "string") { - throw new TypeError("'module' option is required."); - } - - if ( - Reflect.has(replacement, "external") || - Reflect.has(replacement, "path") - ) { - if (module === "*") { - throw new Error("Can not replace all modules with the same path."); - } - - checkPathReplaced(module); - - onResolveReplacements.set( - module, - Reflect.has(replacement, "external") - ? { external: true, path: replacement.external } - : { path: replacement.path } - ); - - continue; - } - - if (Reflect.has(replacement, "text")) { - if (module === "*") { - throw new Error("Can not replace all modules with the same content."); - } - - checkPathReplaced(module); - checkTextReplaced(module); - - onLoadReplacements.set(module, { - contents: replacement.text, - loader: replacement.loader, - }); - - continue; - } - - checkPathReplaced(module); - checkTextReplaced(module); - - if (!onLoadProcessors.has(module)) { - onLoadProcessors.set(module, []); - } - - const processFunctions = onLoadProcessors.get(module); - - if (Reflect.has(replacement, "process")) { - const { process } = replacement; - if (typeof process !== "function") { - throw new TypeError("'process' option should be a function."); - } - - processFunctions.push(process); - continue; - } - - if ( - Reflect.has(replacement, "find") && - Reflect.has(replacement, "replacement") - ) { - processFunctions.push((text) => - text.replaceAll(replacement.find, replacement.replacement) - ); - continue; - } - - console.log(replacement); - throw new Error("Unexpected replacement option."); - } - - return { onResolveReplacements, onLoadReplacements, onLoadProcessors }; -} - -function setupOnResolveListener(build, { concepts, replacements }) { - if (replacements.size === 0) { - return; - } - - // `build.resolve()` will call `onResolve` listener - // Use a `Set` to avoid infinite loop - const seenModules = new Set(); - build.onResolve(concepts, async (args) => { - if (!(args.kind === "require-call" || args.kind === "import-statement")) { - return; - } - - const key = JSON.stringify(args); - if (seenModules.has(key)) { - return; - } - seenModules.add(key); - - const resolveResult = await build.resolve(args.path, { - importer: args.importer, - namespace: args.namespace, - resolveDir: args.resolveDir, - kind: args.kind, - pluginData: args.pluginData, - }); - - // `build.resolve()` seems not respecting `browser` field in `package.json`, - // `resolveResult` maybe not correct, return `undefined` to let esbuild process the file. - return replacements.get(resolveResult.path); - }); -} - -function setupOnLoadListener(build, { concepts, replacements, processors }) { - if (replacements.size === 0 && processors.size === 0) { - return; - } - - const processFunctionsForAllModules = processors.has("*") - ? processors.get("*") - : []; - - build.onLoad(concepts, async ({ path: file }) => { - if (replacements.has(file)) { - return replacements.get(file); - } - - const processFunctions = [ - ...processFunctionsForAllModules, - ...(processors.has(file) ? processors.get(file) : []), - ]; - - if (processFunctions.length === 0) { - return; - } - - const original = await fs.readFile(file, "utf8"); - - let text = original; - for (const process of processFunctions) { - text = process(text); - } - - // For files not JavaScript, we need add correct `loader` to the result, - // We can simply return `undefined` to let esbuild process the file. - if (original === text) { - return; - } - - return { contents: text }; - }); -} - -export default function esbuildPluginReplaceModule({ - onLoadConcepts = DEFAULT_ON_LOAD_CONCEPTS, - onResolveConcepts = DEFAULT_ON_RESOLVE_CONCEPTS, - replacements, -}) { - const { onResolveReplacements, onLoadReplacements, onLoadProcessors } = - processReplacements(replacements); - const onResolveListenerOptions = { - concepts: onResolveConcepts, - replacements: onResolveReplacements, - }; - const onLoadListenerOptions = { - concepts: onLoadConcepts, - replacements: onLoadReplacements, - processors: onLoadProcessors, - }; - - return { - name: "replace-module", - setup(build) { - setupOnResolveListener(build, onResolveListenerOptions); - setupOnLoadListener(build, onLoadListenerOptions); - }, - }; -} diff --git a/scripts/build/esbuild-plugins/shim-commonjs-objects.js b/scripts/build/esbuild-plugins/shim-commonjs-objects.js new file mode 100644 index 000000000000..47ccfd9802a5 --- /dev/null +++ b/scripts/build/esbuild-plugins/shim-commonjs-objects.js @@ -0,0 +1,36 @@ +import fs from "node:fs"; +import { outdent } from "outdent"; + +export default function esbuildPluginShimCommonjsObjects() { + return { + name: "shim-commonjs-objects", + setup(build) { + const { onEnd, initialOptions: esbuildOptions } = build; + + onEnd(() => { + const file = esbuildOptions.outfile; + + if (!fs.existsSync(file)) { + throw new Error(`${file} not exists`); + } + + const text = fs.readFileSync(file, "utf8"); + + // Use `__prettier` prefix to avoid possible conflicts + fs.writeFileSync( + file, + outdent` + import { createRequire as __prettierCreateRequire } from "module"; + import { fileURLToPath as __prettierFileUrlToPath } from "url"; + import { dirname as __prettierDirname } from "path"; + const require = __prettierCreateRequire(import.meta.url); + const __filename = __prettierFileUrlToPath(import.meta.url); + const __dirname = __prettierDirname(__filename); + + ${text} + `, + ); + }); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/strip-node-protocol.js b/scripts/build/esbuild-plugins/strip-node-protocol.js new file mode 100644 index 000000000000..feaa11a334f1 --- /dev/null +++ b/scripts/build/esbuild-plugins/strip-node-protocol.js @@ -0,0 +1,11 @@ +export default function esbuildPluginStripNodeProtocol() { + return { + name: "strip-node-protocol", + setup(build) { + build.onResolve( + { filter: /^node:/, namespace: "file" }, + ({ path, kind }) => build.resolve(path.slice(5), { kind }), + ); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/throw-warnings.js b/scripts/build/esbuild-plugins/throw-warnings.js new file mode 100644 index 000000000000..144606e2a7d4 --- /dev/null +++ b/scripts/build/esbuild-plugins/throw-warnings.js @@ -0,0 +1,123 @@ +/* +Open https://esbuild.github.io/api/#log-override, run + +```js +[...document.querySelectorAll('details > summary > code')].map(code => code.textContent) +``` + +in console to get all message ids. +*/ +const ESBUILD_MESSAGE_IDS = [ + "assert-to-with", + "assert-type-json", + "assign-to-constant", + "assign-to-define", + "assign-to-import", + "call-import-namespace", + "class-name-will-throw", + "commonjs-variable-in-esm", + "delete-super-property", + "direct-eval", + "duplicate-case", + "duplicate-class-member", + "duplicate-object-key", + "empty-import-meta", + "equals-nan", + "equals-negative-zero", + "equals-new-object", + "html-comment-in-js", + "impossible-typeof", + "indirect-require", + "private-name-will-throw", + "semicolon-after-return", + "suspicious-boolean-not", + "suspicious-define", + "suspicious-logical-operator", + "suspicious-nullish-coalescing", + "this-is-undefined-in-esm", + "unsupported-dynamic-import", + "unsupported-jsx-comment", + "unsupported-regexp", + "unsupported-require-call", + "css-syntax-error", + "invalid-@charset", + "invalid-@import", + "invalid-@layer", + "invalid-calc", + "js-comment-in-css", + "undefined-composes-from", + "unsupported-@charset", + "unsupported-@namespace", + "unsupported-css-property", + "unsupported-css-nesting", + "ambiguous-reexport", + "different-path-case", + "empty-glob", + "ignored-bare-import", + "ignored-dynamic-import", + "import-is-undefined", + "require-resolve-not-external", + "invalid-source-mappings", + "sections-in-source-map", + "missing-source-map", + "unsupported-source-map-comment", + "package.json", + "tsconfig.json", +]; +const logOverride = Object.fromEntries( + ESBUILD_MESSAGE_IDS.map((id) => [id, "warning"]), +); + +export default function esbuildPluginThrowWarnings({ + allowDynamicRequire, + allowDynamicImport, +}) { + return { + name: "throw-warnings", + setup(build) { + const options = build.initialOptions; + options.logOverride = { + ...logOverride, + ...options.logOverride, + }; + + build.onEnd((result) => { + if (result.errors.length > 0) { + return; + } + + for (const warning of result.warnings) { + if ( + allowDynamicRequire && + ["unsupported-require-call", "indirect-require"].includes( + warning.id, + ) + ) { + continue; + } + + if ( + allowDynamicImport && + warning.id === "unsupported-dynamic-import" + ) { + continue; + } + + if ( + [ + "node_modules/flow-parser/flow_parser.js", + "dist/_parser-flow.js.umd.js", + "dist/_parser-flow.js.esm.mjs", + ].includes(warning.location.file) && + warning.id === "duplicate-case" + ) { + continue; + } + + console.log(warning); + throw new Error(warning.text); + } + }); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/throw-warnings.mjs b/scripts/build/esbuild-plugins/throw-warnings.mjs deleted file mode 100644 index 85c5a47ba3f6..000000000000 --- a/scripts/build/esbuild-plugins/throw-warnings.mjs +++ /dev/null @@ -1,78 +0,0 @@ -// https://github.com/evanw/esbuild/commit/1916318ca7f803253dbdae0942af1c9a6d3a6910 -const ESBUILD_MESSAGE_IDS = [ - "assign-to-constant", - "call-import-namespace", - "commonjs-variable-in-esm", - "delete-super-property", - "direct-eval", - "duplicate-case", - "duplicate-object-key", - "empty-import-meta", - "equals-nan", - "equals-negative-zero", - "equals-new-object", - "html-comment-in-js", - "impossible-typeof", - "private-name-will-throw", - "semicolon-after-return", - "suspicious-boolean-not", - "this-is-undefined-in-esm", - "unsupported-dynamic-import", - "unsupported-jsx-comment", - "unsupported-regexp", - "unsupported-require-call", - "different-path-case", - "ignored-bare-import", - "ignored-dynamic-import", - "import-is-undefined", - "package.json", - "require-resolve-not-external", - "tsconfig.json", -]; -const logOverride = Object.fromEntries( - ESBUILD_MESSAGE_IDS.map((id) => [id, "warning"]) -); - -export default function esbuildPluginThrowWarnings({ allowDynamicRequire }) { - return { - name: "throw-warnings", - setup(build) { - const options = build.initialOptions; - options.logOverride = { - ...logOverride, - ...options.logOverride, - }; - - build.onEnd((result) => { - if (result.errors.length > 0) { - return; - } - - for (const warning of result.warnings) { - if ( - allowDynamicRequire && - warning.text === - 'This call to "require" will not be bundled because the argument is not a string literal' - ) { - continue; - } - - if ( - [ - "node_modules/flow-parser/flow_parser.js", - "dist/_parser-flow.js.umd.js", - "dist/_parser-flow.js.esm.mjs", - ].includes(warning.location.file) && - warning.text === - "This case clause will never be evaluated because it duplicates an earlier case clause" - ) { - continue; - } - - console.log(warning); - throw new Error(warning.text); - } - }); - }, - }; -} diff --git a/scripts/build/esbuild-plugins/umd.js b/scripts/build/esbuild-plugins/umd.js new file mode 100644 index 000000000000..3d309a94e7f1 --- /dev/null +++ b/scripts/build/esbuild-plugins/umd.js @@ -0,0 +1,146 @@ +import fs from "node:fs"; +import camelCase from "camelcase"; +import { outdent } from "outdent"; + +const PLACEHOLDER = "__PLACEHOLDER__"; +function getUmdWrapper({ name }, build) { + const path = name.split("."); + const { minify } = build.initialOptions; + const temporaryName = minify ? "m" : camelCase(name); + + let globalObjectText = []; + for (let index = 0; index < path.length; index++) { + const object = ["root", ...path.slice(0, index + 1)].join("."); + if (index === path.length - 1) { + globalObjectText.push(`${object}`); + } else { + globalObjectText.push(`${object} = ${object} || {};`); + } + } + globalObjectText = globalObjectText + .map((text) => `${" ".repeat(4)}${text}`) + .join("\n"); + + let wrapper = outdent` + (function (factory) { + function interopModuleDefault() { + var module = factory(); + return module.default || module; + } + + if (typeof exports === "object" && typeof module === "object") { + module.exports = interopModuleDefault(); + } else if (typeof define === "function" && define.amd) { + define(interopModuleDefault); + } else { + var root = + typeof globalThis !== "undefined" + ? globalThis + : typeof global !== "undefined" + ? global + : typeof self !== "undefined" + ? self + : this || {}; + ${globalObjectText.trimStart()} = interopModuleDefault(); + } + })(function () { + "use strict";${PLACEHOLDER} + }); + `; + + if (minify) { + wrapper = build.esbuild + .transformSync(wrapper, { loader: "js", minify }) + .code.trim(); + if (!wrapper.includes(PLACEHOLDER)) { + throw new Error("Unexpected code"); + } + } + + const [intro, outro] = wrapper.split(PLACEHOLDER); + + return { + name: temporaryName, + intro, + outro, + expectedOutput: { + start: minify + ? `var ${temporaryName}=(()=>{` + : `var ${temporaryName} = (() => {`, + end: "})();", + }, + }; +} + +export default function esbuildPluginUmd(options) { + return { + name: "umd", + setup(build) { + const esbuildOptions = build.initialOptions; + const { globalName, format, outfile } = esbuildOptions; + + if (globalName) { + throw new Error("'globalName' in esbuildOptions cannot be set."); + } + + if (format !== "umd") { + throw new Error("'format' esbuildOptions must be 'umd'."); + } + + if (!outfile) { + throw new Error("'outfile' esbuildOptions is required."); + } + + const { + name: temporaryName, + intro, + outro, + expectedOutput, + } = getUmdWrapper(options, build); + esbuildOptions.globalName = temporaryName; + esbuildOptions.format = "iife"; + + build.onEnd((result) => { + if (result.errors.length > 0) { + return; + } + + if (!fs.existsSync(outfile)) { + throw new Error(`${outfile} not exists`); + } + let text = fs.readFileSync(outfile, "utf8").trim(); + // We already insert `"use strict";` in the wrapper + if (text.startsWith('"use strict";')) { + text = text.slice('"use strict";'.length).trimStart(); + } + + const actualOutput = { + start: text.slice(0, expectedOutput.start.length), + end: text.slice(-expectedOutput.end.length), + }; + for (const property of ["start", "end"]) { + if (actualOutput[property] !== expectedOutput[property]) { + console.log(); + console.error(outdent` + Expected output ${property}s with: + ${expectedOutput[property]} + + Got: + ${actualOutput[property]} + `); + throw new Error("Unexpected output"); + } + } + + fs.writeFileSync( + outfile, + intro + + text + .slice(expectedOutput.start.length, -expectedOutput.end.length) + .trimEnd() + + outro, + ); + }); + }, + }; +} diff --git a/scripts/build/esbuild-plugins/umd.mjs b/scripts/build/esbuild-plugins/umd.mjs deleted file mode 100644 index f98fb44a6597..000000000000 --- a/scripts/build/esbuild-plugins/umd.mjs +++ /dev/null @@ -1,133 +0,0 @@ -import fs from "node:fs"; -import camelCase from "camelcase"; -import { outdent } from "outdent"; - -function getUmdWrapper(name, build) { - const path = name.split("."); - const { minify } = build.initialOptions; - const temporaryName = minify ? "m" : camelCase(name); - const placeholder = "/*! bundled code !*/"; - - let globalObjectText = []; - for (let index = 0; index < path.length; index++) { - const object = ["root", ...path.slice(0, index + 1)].join("."); - if (index === path.length - 1) { - globalObjectText.push(`${object} = factory();`); - } else { - globalObjectText.push(`${object} = ${object} || {};`); - } - } - globalObjectText = globalObjectText - .map((text) => `${" ".repeat(4)}${text}`) - .join("\n"); - - let wrapper = outdent` - (function (factory) { - if (typeof exports === "object" && typeof module === "object") { - module.exports = factory(); - } else if (typeof define === "function" && define.amd) { - define(factory); - } else { - var root = - typeof globalThis !== "undefined" - ? globalThis - : typeof global !== "undefined" - ? global - : typeof self !== "undefined" - ? self - : this || {}; - ${globalObjectText.trimStart()} - } - })(function() { - "use strict";${placeholder} - }); - `; - - if (minify) { - wrapper = build.esbuild - .transformSync(wrapper, { loader: "js", minify }) - .code.trim(); - } - - const [intro, outro] = wrapper.split(placeholder); - - return { - name: temporaryName, - intro, - outro, - expectedOutput: { - start: minify - ? `"use strict";var ${temporaryName}=(()=>{` - : `"use strict";\nvar ${temporaryName} = (() => {`, - end: "})();", - }, - }; -} - -export default function esbuildPluginUmd({ name }) { - return { - name: "umd", - setup(build) { - const options = build.initialOptions; - const { globalName, format, outfile } = options; - - if (globalName) { - throw new Error("'globalName' in options cannot be set."); - } - - if (format !== "umd") { - throw new Error("'format' options must be 'umd'."); - } - - if (!outfile) { - throw new Error("'outfile' options is required."); - } - - const { - name: temporaryName, - intro, - outro, - expectedOutput, - } = getUmdWrapper(name, build); - options.globalName = temporaryName; - options.format = "iife"; - - build.onEnd((result) => { - if (result.errors.length > 0) { - return; - } - - if (!fs.existsSync(outfile)) { - throw new Error(`${outfile} not exists`); - } - const text = fs.readFileSync(outfile, "utf8").trim(); - const actualOutput = { - start: text.slice(0, expectedOutput.start.length), - end: text.slice(-expectedOutput.end.length), - }; - for (const property of ["start", "end"]) { - if (actualOutput[property] !== expectedOutput[property]) { - console.log(); - console.error(outdent` - Expected output ${property}s with: - ${expectedOutput[property]} - - Got: - ${actualOutput[property]} - `); - throw new Error("Unexpected output"); - } - } - - fs.writeFileSync( - outfile, - intro + - text - .slice(expectedOutput.start.length, -expectedOutput.end.length) - .trimEnd() + - outro - ); - }); - }, - }; -} diff --git a/scripts/build/esbuild-plugins/visualizer.mjs b/scripts/build/esbuild-plugins/visualizer.js similarity index 100% rename from scripts/build/esbuild-plugins/visualizer.mjs rename to scripts/build/esbuild-plugins/visualizer.js diff --git a/scripts/build/esmify-typescript-eslint.js b/scripts/build/esmify-typescript-eslint.js new file mode 100644 index 000000000000..694b4e862cdd --- /dev/null +++ b/scripts/build/esmify-typescript-eslint.js @@ -0,0 +1,176 @@ +/* Transform `@typescript-eslint/*` module to ESM */ + +import * as path from "node:path"; +import { outdent } from "outdent"; +import { PROJECT_ROOT, writeFile } from "../utils/index.js"; + +function esmifyTypescriptEslint(text) { + /* + ```js + const foo = __importStar(require("foo")); + const foo = require("foo"); + ``` + -> + ```js + import * as foo from "foo"; + ```` + */ + text = text.replaceAll( + // TODO: Use duplicate capture group name when eslint supports + /(?<=\n)(?:const|let|var) (?\w+) = (?:__importStar\(require\(["'](?.*?)["']\)\)|require\(["'](?.*?)["']\));/gu, + (...args) => { + const groups = args.at(-1); + return `import * as ${groups.variable} from "${groups.moduleName1 || groups.moduleName2}";`; + }, + ); + + /* + ```js + const foo = __importDefault(require("foo")); + ``` + -> + ```js + import foo_default_export from "foo"; + const foo = {default: foo_default_export}; + ```` + */ + text = text.replaceAll( + /(?<=\n)(?:const|let|var) (?\w+) = __importDefault\(require\(["'](?.*?)["']\)\);/gu, + outdent` + import $_default_export from "$"; + const $ = {default: $_default_export}; + `, + ); + + text = text.replaceAll('"use strict";', ""); + text = text + .replaceAll( + 'Object.defineProperty(exports, "__esModule", { value: true });', + "", + ) + .replaceAll( + outdent` + Object.defineProperty(exports, "__esModule", { + value: true + }); + `, + "", + ); + + text = text.replaceAll(/(?<=\n)(?:exports\.\w+ = )+void 0;/gu, ""); + text = text.replaceAll( + /(?<=\n)exports\.(?\w+) = (?\w+);/gu, + (...args) => { + const { variable, specifier } = args.at(-1); + if (specifier === variable) { + return `export {${specifier}};`; + } + + return `export const ${specifier} = ${variable};`; + }, + ); + + text = text.replaceAll( + /(?<=\n)exports\.(?\w+)(?= = `)/gu, + "export const $", + ); + + /* + ```js + __exportStar(require("foo"), exports); + ``` + -> + ```js + export * from "foo"; + ```` + */ + text = text.replaceAll( + /(?<=\n)__exportStar\(require\(["'](?.*?)["']\), exports\);/gu, + 'export * from "$";', + ); + + /* + ```js + Object.defineProperty(exports, "foo", { enumerable: true, get: function () { return foo; } }); + ``` + -> + ```js + export * from "foo"; + ```` + */ + text = text.replaceAll( + /(?<=\n)Object\.defineProperty\(exports, "(?\w+)", \{ enumerable: true, get: function \(\) \{ return (?.*?); \} \}\);/gu, + "export const $ = $;", + ); + + /* + ```js + exports.foo = __importStar(require("foo")); + ``` + -> + ```js + import * as foo_namespace_export from "foo"; + export {foo_namespace_export as foo}; + ```` + */ + text = text.replaceAll( + /(?<=\n)exports\.(?\w+) = __importStar\(require\(["'](?.*?)["']\)\);/gu, + outdent` + import * as $_namespace_export from "$"; + export {$_namespace_export as $}; + `, + ); + + /** + ```js + var FOO; + (function (FOO) { + })(FOO || (exports.FOO = FOO = {})); + ``` + -> + ```js + var FOO; + (function (FOO) { + })(FOO ?? {})); + export {FOO}; + ``` + */ + text = text.replaceAll( + /(?<=\n\}\))\((?\S+) \|\| \(exports\.\k = \k = \{\}\)\);/gu, + outdent` + ($ ??= {}); + export {$}; + `, + ); + + // Make sure ESBuild treat it as Module + text += "\nexport {};"; + + return text; +} + +const NODE_MODULES_DIRECTORY = path.join( + PROJECT_ROOT, + "node_modules/@typescript-eslint/", +); +// Save modified code to `{PROJECT_ROOT}/.tmp/@typescript-eslint/` for debug +const saveToDisk = (process) => (text, file) => { + if (!file.startsWith(NODE_MODULES_DIRECTORY)) { + return text; + } + + const code = process(text); + + writeFile( + path.join( + PROJECT_ROOT, + ".tmp/@typescript-eslint-esm/", + path.relative(NODE_MODULES_DIRECTORY, file), + ), + code, + ); + + return code; +}; + +export default saveToDisk(esmifyTypescriptEslint); diff --git a/scripts/build/modify-typescript-module.js b/scripts/build/modify-typescript-module.js new file mode 100644 index 000000000000..7a93bd8913b8 --- /dev/null +++ b/scripts/build/modify-typescript-module.js @@ -0,0 +1,367 @@ +import path from "node:path"; +import escapeStringRegexp from "escape-string-regexp"; +import MagicString from "magic-string"; +import { outdent } from "outdent"; +import { PROJECT_ROOT, writeFile } from "../utils/index.js"; +import UNUSED_SPECIFIERS from "./typescript-unused-specifiers.js"; + +function* getModules(text) { + const parts = text.split(/(?<=\n)(\/\/ src\/\S+\n)/u); + + let start = parts[0].length; + + for (let partIndex = 1; partIndex < parts.length - 1; partIndex += 2) { + const comment = parts[partIndex]; + const code = parts[partIndex + 1]; + + const path = comment.slice("// ".length, -1); + const end = start + comment.length + code.length; + + yield { + isEntry: path === "src/typescript/typescript.ts", + path, + start: start + comment.length, + end: end - 1, + code, + }; + + start = end; + } +} + +class TypeScriptModuleSource { + #source; + modules; + + constructor(text) { + this.#source = new MagicString(text); + this.modules = [...getModules(text)]; + } + + replaceModule(module, replacement) { + if (typeof module === "string") { + const found = this.modules.find((searching) => searching.path === module); + + if (!found) { + throw new Error(`Module '${module}' not found`); + } + + module = found; + } + + this.#source.overwrite(module.start, module.end, replacement); + return this; + } + + removeModule(module) { + return this.replaceModule(module, ""); + } + + hasModule(module) { + return this.modules.some((searching) => searching.path === module); + } + + replaceAlignedCode({ start, end, replacement = "" }) { + const regexp = new RegExp( + [ + "(?<=\n)", + String.raw`(?\s*)`, + escapeStringRegexp(start), + ".*?", + "(?<=\n)", + String.raw`\k`, + escapeStringRegexp(end), + "(?=\n)", + ].join(""), + "gsu", + ); + + this.#source.replaceAll(regexp, replacement); + return this; + } + + remove(...args) { + this.#source.remove(...args); + return this; + } + + prepend(...args) { + this.#source.prepend(...args); + return this; + } + + append(...args) { + this.#source.append(...args); + return this; + } + + replace(...args) { + this.#source.replace(...args); + return this; + } + + replaceAll(...args) { + this.#source.replaceAll(...args); + return this; + } + + applyChanges() { + const text = this.#source.toString(); + this.#source = new MagicString(text); + this.modules = getModules(text); + } + + toString() { + return this.#source.toString(); + } +} + +function unwrap(text) { + const startMark = 'var ts = {}; ((module) => {\n"use strict";'; + const endMark = "// src/typescript/typescript.ts"; + const start = text.indexOf(startMark); + const end = text.lastIndexOf(endMark); + + if (start === -1 || end === -1) { + throw new Error("Unexpected source"); + } + + text = text.slice(start + startMark.length, end); + + return text; +} + +function getExports(entry) { + let lines = entry.code.trim().split("\n"); + + if ( + !( + lines[0] === "var typescript_exports = {};" && + lines[1] === "__export(typescript_exports, {" && + lines.at(-2) === "});" && + lines.at(-1) === "module.exports = __toCommonJS(typescript_exports);" + ) + ) { + throw new Error("Unexpected source"); + } + + lines = lines.slice(2, -2); + + const exports = lines + .map((line) => { + const match = line.match( + /^\s*(?.*?): \(\) => (?.*?),?$/u, + ); + + if (!match) { + throw new Error("Unexpected source"); + } + + if (UNUSED_SPECIFIERS.has(match.groups.specifier)) { + return; + } + + return match.groups; + }) + .filter(Boolean); + + return exports; +} + +function modifyTypescriptModule(text) { + text = unwrap(text); + + const source = new TypeScriptModuleSource(text); + + const entry = source.modules.find((module) => module.isEntry); + const exports = getExports(entry); + source.removeModule(entry); + + // Deprecated + for (const module of source.modules) { + if (module.path.startsWith("src/deprecatedCompat/")) { + source.removeModule(module); + } + } + + // jsTyping + for (const module of source.modules) { + if (module.path.startsWith("src/jsTyping/")) { + source.removeModule(module); + } + } + + // services + for (const module of source.modules) { + if (module.path === "src/services/services.ts") { + continue; + } + + // This is a big module, most code except `scanner` is not used + if (module.path === "src/services/utilities.ts") { + source.replaceModule( + module, + "var scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ true);", + ); + continue; + } + + if (module.path.startsWith("src/services/")) { + source.removeModule(module); + } + } + + // server + source.removeModule("src/typescript/_namespaces/ts.server.ts"); + for (const module of source.modules) { + if (module.path.startsWith("src/server/")) { + source.removeModule(module); + } + } + + // `transformers` + source.removeModule("src/compiler/transformer.ts"); + for (const module of source.modules) { + if (module.path.startsWith("src/compiler/transformers/")) { + source.removeModule(module); + } + } + + // `typingsInstaller` + for (const module of source.modules) { + if (module.path.startsWith("src/typingsInstallerCore/")) { + source.removeModule(module); + } + } + + // `ts.moduleSpecifiers` + source.removeModule("src/compiler/_namespaces/ts.moduleSpecifiers.ts"); + source.removeModule("src/compiler/moduleSpecifiers.ts"); + + // Sourcemap + source.removeModule("src/compiler/sourcemap.ts"); + + // watch + source.removeModule("src/compiler/watch.ts"); + source.removeModule("src/compiler/watchPublic.ts"); + source.removeModule("src/compiler/watchUtilities.ts"); + + // build + source.removeModule("src/compiler/commandLineParser.ts"); + source.removeModule("src/compiler/builder.ts"); + source.removeModule("src/compiler/builderPublic.ts"); + source.removeModule("src/compiler/resolutionCache.ts"); + source.removeModule("src/compiler/tsbuild.ts"); + source.removeModule("src/compiler/tsbuildPublic.ts"); + source.removeModule("src/compiler/builderState.ts"); + + // Misc + source.removeModule("src/compiler/symbolWalker.ts"); + source.removeModule("src/compiler/binder.ts"); + source.removeModule("src/compiler/semver.ts"); + source.removeModule("src/compiler/program.ts"); + source.removeModule("src/compiler/moduleNameResolver.ts"); + source.removeModule("src/compiler/checker.ts"); + source.removeModule("src/compiler/visitorPublic.ts"); + source.removeModule("src/compiler/emitter.ts"); + source.removeModule("src/compiler/_namespaces/ts.performance.ts"); + source.removeModule("src/compiler/executeCommandLine.ts"); + source.removeModule("src/compiler/expressionToTypeNode.ts"); + + // File system + source.replaceModule("src/compiler/sys.ts", "var sys;"); + source.replaceModule("src/compiler/tracing.ts", "var tracing;"); + + // performance + source.replaceModule( + "src/compiler/performanceCore.ts", + outdent` + var tryGetNativePerformanceHooks = () => {}; + var timestamp = Date.now; + `, + ); + source.replaceModule( + "src/compiler/performance.ts", + outdent` + var mark = () => {}; + var measure = () => {}; + `, + ); + + // `factory` + source.removeModule("src/compiler/factory/emitNode.ts"); + source.removeModule("src/compiler/factory/emitHelpers.ts"); + source.removeModule("src/compiler/factory/nodeConverters.ts"); + + // `pnp` + if (source.hasModule("src/compiler/pnp.ts")) { + source.removeModule("src/compiler/pnp.ts"); + } + if (source.hasModule("src/compiler/pnpapi.ts")) { + source.removeModule("src/compiler/pnpapi.ts"); + } + + source.replaceAlignedCode({ + start: "function isNodeLikeSystem(", + end: "}", + replacement: "function isNodeLikeSystem() {return false}", + }); + + /* spell-checker: disable */ + // `ts.createParenthesizerRules` + source.replaceAlignedCode({ + start: "function createParenthesizerRules(", + end: "}", + }); + /* spell-checker: enable */ + + source.append(createExports(exports)); + + // Used in `ts-api-utils` + source.append( + outdent` + export const isUnparsedPrepend = () => false; + export const isUnparsedTextLike = () => false; + `, + ); + + // Used in `@typescript-eslint/typescript-estree`, but we manually removed them + // source.append( + // outdent` + // export const createProgram = () => {}; + // export const flattenDiagnosticMessageText = () => {}; + // export const FileWatcherEventKind = () => {}; + // export const createWatchCompilerHost = () => {}; + // export const createAbstractBuilder = () => {}; + // export const createWatchProgram = () => {}; + // export const getParsedCommandLineOfConfigFile = () => {}; + // export const createCompilerHost = () => {}; + // export const formatDiagnostics = () => {}; + // `, + // ); + + return { code: source.toString(), exports }; +} + +function createExports(exports) { + return outdent` + export { + ${exports + .map(({ specifier, variable }) => + variable === specifier ? specifier : `${variable} as ${specifier}`, + ) + .map((line) => ` ${line},`) + .join("\n")} + }; + `; +} + +// Save modified code to `{PROJECT_ROOT}/.tmp/modified-typescript.js` for debug +const saveOutputToDisk = (process) => (text) => { + const { code } = process(text); + writeFile(path.join(PROJECT_ROOT, ".tmp/modified-typescript.js"), code); + return code; +}; + +export default saveOutputToDisk(modifyTypescriptModule); +export { modifyTypescriptModule }; diff --git a/scripts/build/modify-typescript-module.mjs b/scripts/build/modify-typescript-module.mjs deleted file mode 100644 index 5ab60a80f0b3..000000000000 --- a/scripts/build/modify-typescript-module.mjs +++ /dev/null @@ -1,301 +0,0 @@ -import path from "node:path"; -import escapeStringRegexp from "escape-string-regexp"; -import { outdent } from "outdent"; -import MagicString from "magic-string"; -import { writeFile, PROJECT_ROOT } from "../utils/index.mjs"; - -function* getModules(text) { - const parts = text.split(/(?<=\n)( {2}\/\/ src\/\S+\n)/); - - let start = parts[0].length; - - for (let partIndex = 1; partIndex < parts.length - 1; partIndex += 2) { - const comment = parts[partIndex]; - const code = parts[partIndex + 1]; - - const path = comment.slice(" // ".length, -1); - const end = start + comment.length + code.length; - - if (/\S/.test(code)) { - const esmRegExp = new RegExp( - [ - "\\s*var (?\\w+) = __esm\\({", - `\\s*"${escapeStringRegexp(path)}"\\(\\) {`, - ".*", - "\\s*}", - "\\s*}\\);", - ].join("\\n"), - "s" - ); - const match = code.match(esmRegExp); - - yield { - isEntry: path === "src/typescript/typescript.ts", - path, - start: start + comment.length, - end: end - 1, - code, - esmModuleInitFunctionName: match?.groups.initFunctionName, - }; - } - - start = end; - } -} - -class TypeScriptModuleSource { - #source; - modules; - - constructor(text) { - this.#source = new MagicString(text); - this.modules = [...getModules(text)]; - } - - replaceModule(module, replacement) { - if (typeof module === "string") { - module = this.modules.find((searching) => searching.path === module); - } - - if (!module) { - throw Object.assign(new Error("Module not found"), { module }); - } - - const { esmModuleInitFunctionName } = module; - const moduleInitCode = esmModuleInitFunctionName - ? `var ${esmModuleInitFunctionName} = () => {};` - : ""; - - this.#source.overwrite( - module.start, - module.end, - moduleInitCode + replacement - ); - return this; - } - - removeModule(module) { - if (typeof module === "string") { - module = this.modules.find((searching) => searching.path === module); - } - - return this.replaceModule(module, ""); - } - - replaceAlignedCode({ start, end, replacement = "" }) { - const regexp = new RegExp( - [ - "(?<=\n)", - "(?\\s*)", - escapeStringRegexp(start), - ".*?", - "(?<=\n)", - "\\k", - escapeStringRegexp(end), - "(?=\n)", - ].join(""), - "gsu" - ); - - this.#source.replaceAll(regexp, replacement); - return this; - } - - remove(...args) { - this.#source.remove(...args); - return this; - } - - prepend(...args) { - this.#source.prepend(...args); - return this; - } - - append(...args) { - this.#source.append(...args); - return this; - } - - replace(...args) { - this.#source.replace(...args); - return this; - } - - replaceAll(...args) { - this.#source.replaceAll(...args); - return this; - } - - applyChanges() { - const text = this.#source.toString(); - this.#source = new MagicString(text); - this.modules = getModules(text); - } - - toString() { - return this.#source.toString(); - } -} - -function unwrap(text) { - const startMark = "var ts = (() => {"; - const endMark = "return require_typescript();"; - const start = text.indexOf(startMark); - const end = text.lastIndexOf(endMark); - - if (start === -1 || end === -1) { - throw new Error("Unexpected source"); - } - - return text.slice(start + startMark.length, end); -} - -function modifyTypescriptModule(text) { - text = unwrap(text); - - const source = new TypeScriptModuleSource(text); - - // Deprecated - for (const module of source.modules) { - if (module.path.startsWith("src/deprecatedCompat/")) { - source.removeModule(module); - } - } - - // jsTyping - for (const module of source.modules) { - if (module.path.startsWith("src/jsTyping/")) { - source.removeModule(module); - } - } - - // services - for (const module of source.modules) { - if ( - module.path === "src/services/services.ts" || - module.path === "src/services/_namespaces/ts.ts" - ) { - continue; - } - - // This is a big module, most code except `scanner` is not used - if (module.path === "src/services/utilities.ts") { - source.replaceModule( - module, - outdent` - var scanner; - var ${module.esmModuleInitFunctionName} = () => { - init_debug(); - scanner = createScanner(99 /* Latest */, /*skipTrivia*/ true); - }; - ` - ); - continue; - } - - if (module.path.startsWith("src/services/")) { - source.removeModule(module); - } - } - - // `transformers` - source.removeModule("src/compiler/transformer.ts"); - for (const module of source.modules) { - if (module.path.startsWith("src/compiler/transformers/")) { - source.removeModule(module); - } - } - - // `ts.moduleSpecifiers` - source.removeModule("src/compiler/_namespaces/ts.moduleSpecifiers.ts"); - source.removeModule("src/compiler/moduleSpecifiers.ts"); - - // Sourcemap - source.removeModule("src/compiler/sourcemap.ts"); - - // watch - source.removeModule("src/compiler/watch.ts"); - source.removeModule("src/compiler/watchPublic.ts"); - source.removeModule("src/compiler/watchUtilities.ts"); - - // build - source.removeModule("src/compiler/commandLineParser.ts"); - source.removeModule("src/compiler/builder.ts"); - source.removeModule("src/compiler/builderPublic.ts"); - source.removeModule("src/compiler/resolutionCache.ts"); - source.removeModule("src/compiler/tsbuild.ts"); - source.removeModule("src/compiler/tsbuildPublic.ts"); - source.removeModule("src/compiler/builderState.ts"); - source.removeModule("src/compiler/builderStatePublic.ts"); - - // Misc - source.removeModule("src/compiler/symbolWalker.ts"); - source.removeModule("src/compiler/binder.ts"); - source.removeModule("src/compiler/semver.ts"); - source.removeModule("src/compiler/program.ts"); - source.removeModule("src/compiler/moduleNameResolver.ts"); - source.removeModule("src/compiler/checker.ts"); - source.removeModule("src/compiler/visitorPublic.ts"); - source.removeModule("src/compiler/emitter.ts"); - source.removeModule("src/compiler/_namespaces/ts.performance.ts"); - - // File system - source.replaceModule("src/compiler/sys.ts", "var sys;"); - source.replaceModule("src/compiler/tracing.ts", "var tracing;"); - - // perfLogger - source.replaceModule( - "src/compiler/perfLogger.ts", - "var perfLogger = new Proxy(() => {}, {get: () => perfLogger});" - ); - - // performanceCore - source.replaceModule( - "src/compiler/performanceCore.ts", - outdent` - var tryGetNativePerformanceHooks = () => {}; - var timestamp = Date.now; - ` - ); - - // `factory` - source.removeModule("src/compiler/factory/emitNode.ts"); - source.removeModule("src/compiler/factory/emitHelpers.ts"); - source.replaceModule( - "src/compiler/factory/nodeConverters.ts", - outdent` - var createNodeConverters = () => new Proxy({}, {get: () => () => {}}); - ` - ); - - /* spell-checker: disable */ - // `ts.createParenthesizerRules` - source.replaceAlignedCode({ - start: "function createParenthesizerRules(", - end: "}", - }); - /* spell-checker: enable */ - - source.replaceAlignedCode({ - start: "function getScriptTargetFeatures(", - end: "}", - }); - - source.replaceAlignedCode({ - start: "var __require = ", - end: "});", - }); - - source.append("module.exports = require_typescript();"); - - return source.toString(); -} - -// Save modified code to `{PROJECT_ROOT}/.tmp/modified-typescript.js` for debug -const saveOutputToDisk = (process) => (text) => { - const result = process(text); - writeFile(path.join(PROJECT_ROOT, ".tmp/modified-typescript.js"), result); - return result; -}; - -export default saveOutputToDisk(modifyTypescriptModule); diff --git a/scripts/build/parse-arguments.js b/scripts/build/parse-arguments.js new file mode 100644 index 000000000000..25c0743c7a0f --- /dev/null +++ b/scripts/build/parse-arguments.js @@ -0,0 +1,84 @@ +import path from "node:path"; +import { parseArgs } from "node:util"; +import { DIST_DIR } from "../utils/index.js"; + +const isUnique = (array) => new Set(array).size === array.length; + +function parseArguments() { + const { values } = parseArgs({ + options: { + package: { type: "string", multiple: true }, + playground: { type: "boolean", default: false }, + "print-size": { type: "boolean", default: false }, + "compare-size": { type: "boolean", default: false }, + minify: { type: "boolean" }, + "no-minify": { type: "boolean" }, + clean: { type: "boolean", default: false }, + file: { type: "string", multiple: true }, + "save-as": { type: "string" }, + report: { type: "string", multiple: true }, + }, + }); + + if (values.minify && values["no-minify"]) { + throw new Error("'--minify' and '--no-minify' can't be used together."); + } + + const result = { + files: Array.isArray(values.file) ? new Set(values.file) : undefined, + playground: values.playground, + printSize: values["print-size"], + compareSize: values["compare-size"], + minify: values.minify ? true : values["no-minify"] ? false : undefined, + clean: values.clean, + saveAs: values["save-as"], + reports: values.report, + packages: values.package, + }; + + if (Array.isArray(result.packages) && !isUnique(result.packages)) { + throw new Error("'--package' should be unique."); + } + + if (result.saveAs) { + if (result.files?.size !== 1) { + throw new Error( + "'--save-as' can only use together with one '--file' flag.", + ); + } + + // TODO: Support package name + const distDirectory = path.join(DIST_DIR, "prettier"); + if (!path.join(distDirectory, result.saveAs).startsWith(distDirectory)) { + throw new Error("'--save-as' can only relative path."); + } + } + + if (result.compareSize) { + if (result.minify === false) { + throw new Error( + "'--compare-size' can not use together with '--no-minify' flag.", + ); + } + + if (result.saveAs) { + throw new Error( + "'--compare-size' can not use together with '--save-as' flag.", + ); + } + } + + if (Array.isArray(result.reports) && result.reports.includes("all")) { + if (result.reports.length !== 1) { + throw new Error( + "'--report=all' can not use with another '--report' flag.", + ); + } + + result.reports = ["html", "text", "stdout"]; + } + + return result; +} + +export default parseArguments; diff --git a/scripts/build/save-licenses.mjs b/scripts/build/save-licenses.mjs deleted file mode 100644 index 12f323fc5396..000000000000 --- a/scripts/build/save-licenses.mjs +++ /dev/null @@ -1,87 +0,0 @@ -import path from "node:path"; -import { promises as fs } from "node:fs"; -import { outdent } from "outdent"; -import { DIST_DIR } from "../utils/index.mjs"; - -const file = path.join(DIST_DIR, "LICENSE"); -const separator = `\n${"-".repeat(40)}\n\n`; - -async function saveLicenses(dependencies) { - // Unique by `name` and `version` - dependencies = dependencies.filter( - (dependency, index) => - index === - dependencies.findIndex( - ({ name, version }) => - dependency.name === name && dependency.version === version - ) - ); - - dependencies.sort( - (dependencyA, dependencyB) => - dependencyA.name.localeCompare(dependencyB.name) || - dependencyA.version.localeCompare(dependencyB.version) - ); - - const prettierLicense = await fs.readFile(file, "utf8"); - - const licenses = [ - ...new Set( - dependencies - .filter(({ license }) => license) - .map(({ license }) => license) - ), - ]; - const text = outdent` - # Prettier license - - Prettier is released under the MIT license: - - ${prettierLicense.trim()} - - ## Licenses of bundled dependencies - - The published Prettier artifact additionally contains code with the following licenses: - ${licenses.join(", ")} - - ## Bundled dependencies - `; - - const content = dependencies - .map((dependency) => { - let text = `### ${dependency.name}@v${dependency.version}\n`; - - const meta = []; - - if (dependency.license) { - meta.push(`License: ${dependency.license}`); - } - if (dependency.author?.name) { - meta.push(`By: ${dependency.author.name}`); - } - if (dependency.repository?.url) { - meta.push(`Repository: <${dependency.repository.url}>`); - } - - if (meta.length > 0) { - text += "\n" + meta.join("\n") + "\n"; - } - - if (dependency.licenseText) { - text += - "\n" + - dependency.licenseText - .trim() - .split("\n") - .map((line) => (line ? `> ${line}` : ">")) - .join("\n") + - "\n"; - } - return text; - }) - .join(separator); - - await fs.writeFile(file, text + "\n\n" + content); -} - -export default saveLicenses; diff --git a/scripts/build/shims/array-find-last-index.js b/scripts/build/shims/array-find-last-index.js new file mode 100644 index 000000000000..ceb4b9905b9b --- /dev/null +++ b/scripts/build/shims/array-find-last-index.js @@ -0,0 +1,20 @@ +const arrayFindLastIndex = (isOptionalObject, array, callback) => { + if (isOptionalObject && (array === undefined || array === null)) { + return; + } + + if (array.findLastIndex) { + return array.findLastIndex(callback); + } + + for (let index = array.length - 1; index >= 0; index--) { + const element = array[index]; + if (callback(element, index, array)) { + return index; + } + } + + return -1; +}; + +export default arrayFindLastIndex; diff --git a/scripts/build/shims/array-find-last.js b/scripts/build/shims/array-find-last.js new file mode 100644 index 000000000000..e4b5b6ac858e --- /dev/null +++ b/scripts/build/shims/array-find-last.js @@ -0,0 +1,18 @@ +const arrayFindLast = (isOptionalObject, array, callback) => { + if (isOptionalObject && (array === undefined || array === null)) { + return; + } + + if (array.findLast) { + return array.findLast(callback); + } + + for (let index = array.length - 1; index >= 0; index--) { + const element = array[index]; + if (callback(element, index, array)) { + return element; + } + } +}; + +export default arrayFindLast; diff --git a/scripts/build/shims/array-to-reversed.js b/scripts/build/shims/array-to-reversed.js new file mode 100644 index 000000000000..2d9226f581f0 --- /dev/null +++ b/scripts/build/shims/array-to-reversed.js @@ -0,0 +1,13 @@ +const arrayToReversed = (isOptionalObject, array) => { + if (isOptionalObject && (array === undefined || array === null)) { + return; + } + + if (array.toReversed || !Array.isArray(array)) { + return array.toReversed(); + } + + return [...array].reverse(); +}; + +export default arrayToReversed; diff --git a/scripts/build/shims/assert.cjs b/scripts/build/shims/assert.cjs deleted file mode 100644 index 42b11599131a..000000000000 --- a/scripts/build/shims/assert.cjs +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -const assert = () => {}; -assert.ok = assert; -assert.strictEqual = assert; -module.exports = assert; diff --git a/scripts/build/shims/assert.js b/scripts/build/shims/assert.js new file mode 100644 index 000000000000..97ea2db2d646 --- /dev/null +++ b/scripts/build/shims/assert.js @@ -0,0 +1,3 @@ +const assert = new Proxy(() => {}, { get: () => assert }); + +export default assert; diff --git a/scripts/build/shims/at.js b/scripts/build/shims/at.js new file mode 100644 index 000000000000..799238fafd33 --- /dev/null +++ b/scripts/build/shims/at.js @@ -0,0 +1,23 @@ +/* +Note: + +1. `acorn` contains `RegExpValidationState` class with `.at` method (2 arguments) +2. `postcss` contains `Container` class with `.at` method +*/ + +const at = (isOptionalObject, object, index) => { + if (isOptionalObject && (object === undefined || object === null)) { + return; + } + + // "relative indexing" is not available in Node.js v14 + // `.at` method is slower than property access on Node.js v16 and v18, see #14396 + // Only checked arrays and strings, since we haven't use `TypedArray`, and the transform only works for sources + if (Array.isArray(object) || typeof object === "string") { + return object[index < 0 ? object.length + index : index]; + } + + return object.at(index); +}; + +export default at; diff --git a/scripts/build/shims/babel-highlight.cjs b/scripts/build/shims/babel-highlight.cjs deleted file mode 100644 index 3b23660e012a..000000000000 --- a/scripts/build/shims/babel-highlight.cjs +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -const chalk = require("./chalk.cjs"); -const highlight = { shouldHighlight: () => false, getChalk: () => chalk }; - -module.exports = highlight; diff --git a/scripts/build/shims/babel-highlight.js b/scripts/build/shims/babel-highlight.js new file mode 100644 index 000000000000..964af8fa1560 --- /dev/null +++ b/scripts/build/shims/babel-highlight.js @@ -0,0 +1,2 @@ +export const shouldHighlight = () => false; +export default String; diff --git a/scripts/build/shims/chalk.cjs b/scripts/build/shims/chalk.cjs deleted file mode 100644 index 8ce0658d321a..000000000000 --- a/scripts/build/shims/chalk.cjs +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -const chalk = (x) => x; -chalk.grey = chalk; -chalk.red = chalk; -chalk.bold = chalk; -chalk.yellow = chalk; -chalk.blue = chalk; -chalk.default = chalk; - -module.exports = chalk; diff --git a/scripts/build/shims/colors.js b/scripts/build/shims/colors.js new file mode 100644 index 000000000000..239a7d54a1bd --- /dev/null +++ b/scripts/build/shims/colors.js @@ -0,0 +1,3 @@ +const colors = new Proxy(String, { get: () => colors }); + +export default colors; diff --git a/scripts/build/shims/debug.cjs b/scripts/build/shims/debug.cjs deleted file mode 100644 index 9d9e8288e611..000000000000 --- a/scripts/build/shims/debug.cjs +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = () => () => {}; diff --git a/scripts/build/shims/debug.js b/scripts/build/shims/debug.js new file mode 100644 index 000000000000..61b0f15d815f --- /dev/null +++ b/scripts/build/shims/debug.js @@ -0,0 +1,3 @@ +const debug = () => () => {}; + +export default debug; diff --git a/scripts/build/shims/parent-module.cjs b/scripts/build/shims/parent-module.cjs deleted file mode 100644 index 0bcecab1c281..000000000000 --- a/scripts/build/shims/parent-module.cjs +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = (file) => file; diff --git a/scripts/build/shims/string-replace-all.js b/scripts/build/shims/string-replace-all.js new file mode 100644 index 000000000000..d6a2bc55d2ad --- /dev/null +++ b/scripts/build/shims/string-replace-all.js @@ -0,0 +1,19 @@ +const stringReplaceAll = (isOptionalObject, original, pattern, replacement) => { + if (isOptionalObject && (original === undefined || original === null)) { + return; + } + + if (original.replaceAll) { + return original.replaceAll(pattern, replacement); + } + + // Simple detection to check if pattern is a `RegExp` + if (pattern.global) { + return original.replace(pattern, replacement); + } + + // Doesn't work for substitutes, eg `.replaceAll("*", "\\$&")` + return original.split(pattern).join(replacement); +}; + +export default stringReplaceAll; diff --git a/scripts/build/transform/index.js b/scripts/build/transform/index.js new file mode 100644 index 000000000000..377294aa835d --- /dev/null +++ b/scripts/build/transform/index.js @@ -0,0 +1,99 @@ +import path from "node:path"; +import babelGenerator from "@babel/generator"; +import { parse } from "@babel/parser"; +import { traverseFast as traverse } from "@babel/types"; +import { outdent } from "outdent"; +import { PROJECT_ROOT, SOURCE_DIR } from "../../utils/index.js"; +import allTransforms from "./transforms/index.js"; + +const generate = babelGenerator.default; + +/* Doesn't work for dependencies, optional call, computed property, and spread arguments */ + +function transform(original, file) { + if ( + !( + file.startsWith(SOURCE_DIR) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/camelcase/")) || + file.startsWith( + path.join(PROJECT_ROOT, "node_modules/angular-estree-parser/"), + ) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/jest-docblock/")) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/espree/")) || + file.startsWith( + path.join( + PROJECT_ROOT, + "node_modules/@typescript-eslint/typescript-estree/", + ), + ) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/meriyah/")) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/@glimmer/")) || + file.startsWith(path.join(PROJECT_ROOT, "node_modules/hermes-parser/")) + ) + ) { + return original; + } + + const transforms = allTransforms.filter( + (transform) => !transform.shouldSkip(original, file), + ); + + if (transforms.length === 0) { + return original; + } + + let changed = false; + const injected = new Set(); + + const ast = parse(original, { + filename: file, + sourceType: "module", + tokens: true, + createParenthesizedExpressions: true, + }); + traverse(ast, (node) => { + for (const transform of transforms) { + if (!transform.test(node)) { + continue; + } + + transform.transform(node); + + if (transform.inject) { + injected.add(transform.inject); + } + + changed ||= true; + } + }); + + if (!changed) { + return original; + } + + let { code } = generate( + ast, + { + sourceFileName: file, + experimental_preserveFormat: true, + retainLines: true, + comments: true, + jsescOption: null, + minified: false, + compact: false, + }, + original, + ); + + if (injected.size > 0) { + code = outdent` + ${[...injected].join("\n")} + + ${code} + `; + } + + return code; +} + +export default transform; diff --git a/scripts/build/transform/transforms/create-method-call-transform.js b/scripts/build/transform/transforms/create-method-call-transform.js new file mode 100644 index 000000000000..2b34fb24f810 --- /dev/null +++ b/scripts/build/transform/transforms/create-method-call-transform.js @@ -0,0 +1,63 @@ +import { fileURLToPath } from "node:url"; + +/** + * @param {import("@babel/types").Node} node + * @returns {boolean} + */ +function isMethodCall(node, { methodName, argumentsLength }) { + return ( + (node.type === "CallExpression" || + node.type === "OptionalCallExpression") && + !node.optional && + node.arguments.length === argumentsLength && + node.arguments.every(({ type }) => type !== "SpreadElement") && + (node.callee.type === "MemberExpression" || + node.callee.type === "OptionalMemberExpression") && + !node.callee.computed && + node.callee.object.type !== "ThisExpression" && + node.callee.property.type === "Identifier" && + node.callee.property.name === methodName + ); +} + +/** + * `foo.at(index)` -> `__at(false, foo, index)` + * `foo?.at(index)` -> `__at(true, foo, index)` + * + * @param {import("@babel/types").CallExpression | import("@babel/types").OptionalCallExpression} node + * @returns {import("@babel/types").CallExpression} + */ +function transformMethodCallToFunctionCall(node, functionName) { + // `__at(isOptionalObject, object, ...arguments)` + node.arguments.unshift( + { + type: "BooleanLiteral", + value: node.callee.type === "OptionalMemberExpression", + leadingComments: [{ type: "CommentBlock", value: " isOptionalObject " }], + }, + node.callee.object, + ); + + node.callee = { type: "Identifier", name: functionName }; +} + +function createMethodCallTransform({ + methodName, + argumentsLength, + functionName = `__${methodName}`, + functionImplementationUrl, +}) { + const functionImplementationPath = fileURLToPath(functionImplementationUrl); + + return { + shouldSkip: (text, file) => + !text.includes(`.${methodName}(`) || file === functionImplementationPath, + test: (node) => isMethodCall(node, { methodName, argumentsLength }), + transform: (node) => transformMethodCallToFunctionCall(node, functionName), + inject: `import ${functionName} from ${JSON.stringify( + functionImplementationPath, + )};`, + }; +} + +export default createMethodCallTransform; diff --git a/scripts/build/transform/transforms/index.js b/scripts/build/transform/transforms/index.js new file mode 100644 index 000000000000..b8a0b79cb7f5 --- /dev/null +++ b/scripts/build/transform/transforms/index.js @@ -0,0 +1,24 @@ +import transformArrayFindLast from "./transform-array-find-last.js"; +import transformArrayFindLastIndex from "./transform-array-find-last-index.js"; +import transformArrayToReversed from "./transform-array-to-reversed.js"; +import transformObjectHasOwnCall from "./transform-object-has-own.js"; +import transformRelativeIndexing from "./transform-relative-indexing.js"; +import transformStringReplaceAll from "./transform-string-replace-all.js"; + +// These transforms are like Babel and core-js +// Allow us to use JavaScript features in our source code that are not yet +// implemented in the Node.js version we support + +export default [ + // Node.js 18.0.0 + transformArrayFindLast, + transformArrayFindLastIndex, + // Node.js 16.9.0 + transformObjectHasOwnCall, + // Node.js 16.6.0 + transformRelativeIndexing, + // Node.js 15.0.0 + transformStringReplaceAll, + // Node.js 20 + transformArrayToReversed, +]; diff --git a/scripts/build/transform/transforms/transform-array-find-last-index.js b/scripts/build/transform/transforms/transform-array-find-last-index.js new file mode 100644 index 000000000000..68598bb53213 --- /dev/null +++ b/scripts/build/transform/transforms/transform-array-find-last-index.js @@ -0,0 +1,13 @@ +import createMethodCallTransform from "./create-method-call-transform.js"; + +const transformArrayFindLastIndex = createMethodCallTransform({ + methodName: "findLastIndex", + argumentsLength: 1, + functionName: "__arrayFindLastIndex", + functionImplementationUrl: new URL( + "../../shims/array-find-last-index.js", + import.meta.url, + ), +}); + +export default transformArrayFindLastIndex; diff --git a/scripts/build/transform/transforms/transform-array-find-last.js b/scripts/build/transform/transforms/transform-array-find-last.js new file mode 100644 index 000000000000..22737751e705 --- /dev/null +++ b/scripts/build/transform/transforms/transform-array-find-last.js @@ -0,0 +1,13 @@ +import createMethodCallTransform from "./create-method-call-transform.js"; + +const transformArrayFindLast = createMethodCallTransform({ + methodName: "findLast", + argumentsLength: 1, + functionName: "__arrayFindLast", + functionImplementationUrl: new URL( + "../../shims/array-find-last.js", + import.meta.url, + ), +}); + +export default transformArrayFindLast; diff --git a/scripts/build/transform/transforms/transform-array-to-reversed.js b/scripts/build/transform/transforms/transform-array-to-reversed.js new file mode 100644 index 000000000000..212b5e62b9ae --- /dev/null +++ b/scripts/build/transform/transforms/transform-array-to-reversed.js @@ -0,0 +1,13 @@ +import createMethodCallTransform from "./create-method-call-transform.js"; + +const transformArrayToReversed = createMethodCallTransform({ + methodName: "toReversed", + argumentsLength: 0, + functionName: "__arrayToReversed", + functionImplementationUrl: new URL( + "../../shims/array-to-reversed.js", + import.meta.url, + ), +}); + +export default transformArrayToReversed; diff --git a/scripts/build/transform/transforms/transform-object-has-own.js b/scripts/build/transform/transforms/transform-object-has-own.js new file mode 100644 index 000000000000..0f4ca2ee914d --- /dev/null +++ b/scripts/build/transform/transforms/transform-object-has-own.js @@ -0,0 +1,47 @@ +/* +`Object.hasOwn(foo, "bar")` -> `Object.prototype.hasOwnProperty.call(foo, "bar")` +*/ + +const transformObjectHasOwnCall = { + shouldSkip: (text) => !text.includes("Object.hasOwn("), + /** + * @param {import("@babel/types").Node} node + * @returns {boolean} + */ + test(node) { + return ( + node.type === "CallExpression" && + !node.optional && + node.arguments.length === 2 && + node.arguments.every(({ type }) => type !== "SpreadElement") && + node.callee.type === "MemberExpression" && + !node.callee.optional && + !node.callee.computed && + node.callee.object.type === "Identifier" && + node.callee.object.name === "Object" && + node.callee.property.type === "Identifier" && + node.callee.property.name === "hasOwn" + ); + }, + /** + * @param {import("@babel/types").CallExpression} node + * @returns {import("@babel/types").CallExpression} + */ + transform(node) { + node.callee = { + type: "MemberExpression", + object: { + type: "MemberExpression", + object: { + type: "MemberExpression", + object: { type: "Identifier", name: "Object" }, + property: { type: "Identifier", name: "prototype" }, + }, + property: { type: "Identifier", name: "hasOwnProperty" }, + }, + property: { type: "Identifier", name: "call" }, + }; + }, +}; + +export default transformObjectHasOwnCall; diff --git a/scripts/build/transform/transforms/transform-relative-indexing.js b/scripts/build/transform/transforms/transform-relative-indexing.js new file mode 100644 index 000000000000..6a36b56d142f --- /dev/null +++ b/scripts/build/transform/transforms/transform-relative-indexing.js @@ -0,0 +1,9 @@ +import createMethodCallTransform from "./create-method-call-transform.js"; + +const transformRelativeIndexing = createMethodCallTransform({ + methodName: "at", + argumentsLength: 1, + functionImplementationUrl: new URL("../../shims/at.js", import.meta.url), +}); + +export default transformRelativeIndexing; diff --git a/scripts/build/transform/transforms/transform-string-replace-all.js b/scripts/build/transform/transforms/transform-string-replace-all.js new file mode 100644 index 000000000000..f3038fcde672 --- /dev/null +++ b/scripts/build/transform/transforms/transform-string-replace-all.js @@ -0,0 +1,13 @@ +import createMethodCallTransform from "./create-method-call-transform.js"; + +const transformStringReplaceAll = createMethodCallTransform({ + methodName: "replaceAll", + argumentsLength: 2, + functionName: "__stringReplaceAll", + functionImplementationUrl: new URL( + "../../shims/string-replace-all.js", + import.meta.url, + ), +}); + +export default transformStringReplaceAll; diff --git a/scripts/build/typescript-unused-specifiers.js b/scripts/build/typescript-unused-specifiers.js new file mode 100644 index 000000000000..67ad9e0d6d58 --- /dev/null +++ b/scripts/build/typescript-unused-specifiers.js @@ -0,0 +1,736 @@ +export default new Set([ + "ANONYMOUS", + "BreakpointResolver", + "BuilderFileEmit", + "BuilderProgramKind", + "BuilderState", + "CallHierarchy", + "CheckMode", + "ClassificationType", + "ClassificationTypeNames", + "CompletionInfoFlags", + "CompletionTriggerKind", + "Completions", + "ContainerFlags", + "DocumentHighlights", + "EndOfLineState", + "ExportKind", + "FileSystemEntryKind", + "FileWatcherEventKind", + "FindAllReferences", + "FlattenLevel", + "ForegroundColorEscapeSequences", + "GoToDefinition", + "HighlightSpanKind", + "IdentifierNameMap", + "ImportKind", + "IndentStyle", + "InlayHintKind", + "InlayHints", + "InvalidatedProjectKind", + "JsDoc", + "JsTyping", + "LanguageServiceMode", + "MapCode", + "ModuleInstanceState", + "NavigateTo", + "NavigationBar", + "NodeResolutionFeatures", + "OrganizeImports", + "OrganizeImportsMode", + "OutliningElementsCollector", + "OutliningSpanKind", + "OutputFileType", + "PackageJsonAutoImportPreference", + "PackageJsonDependencyGroup", + "PatternMatchKind", + "PollingInterval", + "PreparePasteEdits", + "PrivateIdentifierKind", + "ProcessLevel", + "ProgramUpdateLevel", + "QuotePreference", + "Rename", + "ScriptElementKind", + "ScriptElementKindModifier", + "ScriptSnapshot", + "SemanticClassificationFormat", + "SemanticMeaning", + "SemicolonPreference", + "SignatureCheckMode", + "SignatureHelp", + "SignatureInfo", + "SmartSelectionRange", + "StatisticType", + "SymbolDisplay", + "SymbolDisplayPartKind", + "TokenClass", + "TypeFacts", + "UpToDateStatusType", + "Version", + "VersionRange", + "WatchLogLevel", + "WatchType", + "accessPrivateIdentifier", + "addEmitFlags", + "addEmitHelper", + "addEmitHelpers", + "addInternalEmitFlags", + "addSyntheticLeadingComment", + "addSyntheticTrailingComment", + "advancedAsyncSuperHelper", + "affectsDeclarationPathOptionDeclarations", + "affectsEmitOptionDeclarations", + "allKeysStartWithDot", + "asyncSuperHelper", + "bindSourceFile", + "breakIntoCharacterSpans", + "breakIntoWordSpans", + "buildLinkParts", + "buildOpts", + "buildOverload", + "bundlerModuleNameResolver", + "canBeConvertedToAsync", + "canJsonReportNoInputFiles", + "canProduceDiagnostics", + "canWatchAffectingLocation", + "canWatchAtTypes", + "canWatchDirectoryOrFile", + "canWatchDirectoryOrFilePath", + "chainBundle", + "changeCompilerHostLikeToUseCache", + "classHasClassThisAssignment", + "classHasDeclaredOrExplicitlyAssignedName", + "classHasExplicitlyAssignedName", + "classicNameResolver", + "classifier", + "cleanExtendedConfigCache", + "clearSharedExtendedConfigFileWatcher", + "climbPastPropertyAccess", + "cloneCompilerOptions", + "closeFileWatcherOf", + "codefix", + "collectExternalModuleInfo", + "commandLineOptionOfCustomType", + "commonOptionsWithBuild", + "compareEmitHelpers", + "comparePatternKeys", + "compilerOptionsDidYouMeanDiagnostics", + "compilerOptionsIndicateEsModules", + "computeCommonSourceDirectoryOfFilenames", + "computeSignatureWithDiagnostics", + "computeSuggestionDiagnostics", + "consumesNodeCoreModules", + "convertCompilerOptionsForTelemetry", + "convertCompilerOptionsFromJson", + "convertJsonOption", + "convertToJson", + "convertToObject", + "convertToOptionsWithAbsolutePaths", + "convertToTSConfig", + "convertTypeAcquisitionFromJson", + "copyComments", + "copyLeadingComments", + "copyTrailingAsLeadingComments", + "copyTrailingComments", + "createAbstractBuilder", + "createBuilderProgram", + "createBuilderProgramUsingIncrementalBuildInfo", + "createBuilderStatusReporter", + "createCacheableExportInfoMap", + "createCachedDirectoryStructureHost", + "createClassifier", + "createCompilerDiagnosticForInvalidCustomType", + "createCompilerHost", + "createCompilerHostFromProgramHost", + "createCompilerHostWorker", + "createDiagnosticReporter", + "createDocumentPositionMapper", + "createDocumentRegistry", + "createDocumentRegistryInternal", + "createEmitAndSemanticDiagnosticsBuilderProgram", + "createEmitHelperFactory", + "createFlowNode", + "createFutureSourceFile", + "createGetIsolatedDeclarationErrors", + "createGetSourceFile", + "createGetSymbolAccessibilityDiagnosticForNode", + "createGetSymbolAccessibilityDiagnosticForNodeName", + "createGetSymbolWalker", + "createIncrementalCompilerHost", + "createIncrementalProgram", + "createModeAwareCache", + "createModeAwareCacheKey", + "createModuleResolutionCache", + "createModuleResolutionLoader", + "createModuleResolutionLoaderUsingGlobalCache", + "createModuleSpecifierResolutionHost", + "createNodeConverters", + "createOptionNameMap", + "createOverload", + "createPackageJsonImportFilter", + "createPackageJsonInfo", + "createParenthesizerRules", + "createPatternMatcher", + "createPrinter", + "createPrinterWithDefaults", + "createPrinterWithRemoveComments", + "createPrinterWithRemoveCommentsNeverAsciiEscape", + "createPrinterWithRemoveCommentsOmitTrailingSemicolon", + "createProgram", + "createProgramHost", + "createRedirectedBuilderProgram", + "createResolutionCache", + "createRuntimeTypeSerializer", + "createSemanticDiagnosticsBuilderProgram", + "createSolutionBuilder", + "createSolutionBuilderHost", + "createSolutionBuilderWithWatch", + "createSolutionBuilderWithWatchHost", + "createSourceMapGenerator", + "createSuperAccessVariableStatement", + "createSyntacticTypeNodeBuilder", + "createSystemWatchFunctions", + "createTextChange", + "createTextChangeFromStartLength", + "createTextRangeFromNode", + "createTextRangeFromSpan", + "createTextSpanFromNode", + "createTextSpanFromRange", + "createTextSpanFromStringLiteralLikeContent", + "createTypeChecker", + "createTypeReferenceDirectiveResolutionCache", + "createTypeReferenceResolutionLoader", + "createWatchCompilerHost", + "createWatchCompilerHostOfConfigFile", + "createWatchCompilerHostOfFilesAndCompilerOptions", + "createWatchFactory", + "createWatchHost", + "createWatchProgram", + "createWatchStatusReporter", + "createWriteFileMeasuringIO", + "decodeMappings", + "defaultInitCompilerOptions", + "diagnosticToString", + "displayPart", + "disposeEmitNodes", + "documentSpansEqual", + "dumpTracingLegend", + "emitFiles", + "emitFilesAndReportErrors", + "emitFilesAndReportErrorsAndGetExitStatus", + "emitResolverSkipsTypeChecking", + "emitSkippedWithNoDiagnostics", + "emptyOptions", + "executeCommandLine", + "explainFiles", + "explainIfFileIsRedirectAndImpliedFormat", + "fileIncludeReasonToDiagnostics", + "fileShouldUseJavaScriptRequire", + "filterSemanticDiagnostics", + "findChildOfKind", + "findConfigFile", + "findContainingList", + "findDiagnosticForNode", + "findFirstNonJsxWhitespaceToken", + "findListItemInfo", + "findModifier", + "findNextToken", + "findPackageJson", + "findPackageJsons", + "findPrecedingMatchingToken", + "findPrecedingToken", + "findSuperStatementIndexPath", + "findTokenOnLeftOfPosition", + "firstOrOnly", + "fixupCompilerOptions", + "flattenDestructuringAssignment", + "flattenDestructuringBinding", + "flattenDiagnosticMessageText", + "forEachAncestorDirectoryStoppingAtGlobalCache", + "forEachEmittedFile", + "forEachExternalModuleToImportFrom", + "forEachNameOfDefaultExport", + "forEachResolvedProjectReference", + "forEachUnique", + "formatColorAndReset", + "formatDiagnostic", + "formatDiagnostics", + "formatDiagnosticsWithColorAndContext", + "formatLocation", + "formatting", + "generateDjb2Hash", + "generateTSConfig", + "getAdjustedReferenceLocation", + "getAdjustedRenameLocation", + "getAllDecoratorsOfClass", + "getAllDecoratorsOfClassElement", + "getAllProjectOutputs", + "getAutomaticTypeDirectiveNames", + "getBuildInfo", + "getBuildInfoFileVersionMap", + "getBuildInfoText", + "getBuildOrderFromAnyBuildOrder", + "getBuilderCreationParameters", + "getBuilderFileEmit", + "getCommentRange", + "getCommonSourceDirectory", + "getCommonSourceDirectoryOfConfig", + "getCompilerOptionsDiffValue", + "getConditions", + "getConfigFileParsingDiagnostics", + "getConstantValue", + "getContainerFlags", + "getContainerNode", + "getContextualTypeFromParent", + "getContextualTypeFromParentOrAncestorTypeNode", + "getDeclarationDiagnostics", + "getDefaultFormatCodeSettings", + "getDefaultLikeExportInfo", + "getDefaultLikeExportNameFromDeclaration", + "getDefaultResolutionModeForFileWorker", + "getDiagnosticText", + "getDiagnosticsWithinSpan", + "getDirectoryToWatchFailedLookupLocation", + "getDirectoryToWatchFailedLookupLocationFromTypeRoot", + "getDocumentPositionMapper", + "getDocumentSpansEqualityComparer", + "getEditsForFileRename", + "getEffectiveTypeRoots", + "getEmitHelpers", + "getEmitModuleFormatOfFileWorker", + "getEncodedSemanticClassifications", + "getEncodedSyntacticClassifications", + "getEntrypointsFromPackageJsonInfo", + "getErrorCountForSummary", + "getErrorSummaryText", + "getExportInfoMap", + "getExportNeedsImportStarHelper", + "getFallbackOptions", + "getFileEmitOutput", + "getFileNamesFromConfigSpecs", + "getFileWatcherEventKind", + "getFilesInErrorForSummary", + "getFirstNonSpaceCharacterPosition", + "getFirstProjectOutput", + "getFixableErrorSpanExpression", + "getFormatCodeSettingsForWriting", + "getIdentifierAutoGenerate", + "getIdentifierGeneratedImportReference", + "getIdentifierTypeArguments", + "getImpliedNodeFormatForEmitWorker", + "getImpliedNodeFormatForFile", + "getImpliedNodeFormatForFileWorker", + "getImportNeedsImportDefaultHelper", + "getImportNeedsImportStarHelper", + "getInferredLibraryNameResolveFrom", + "getIsFileExcluded", + "getKeyForCompilerOptions", + "getLibraryNameFromLibFileName", + "getLineInfo", + "getLineStartPositionForPosition", + "getLocaleTimeString", + "getMappedContextSpan", + "getMappedDocumentSpan", + "getMappedLocation", + "getMatchedFileSpec", + "getMatchedIncludeSpec", + "getMeaningFromDeclaration", + "getMeaningFromLocation", + "getModeForFileReference", + "getModeForResolutionAtIndex", + "getModeForUsageLocation", + "getModifiedTime", + "getModuleInstanceState", + "getModuleNameStringLiteralAt", + "getModuleSpecifierResolverHost", + "getNameForExportedSymbol", + "getNameFromPropertyName", + "getNameOfCompilerOptionValue", + "getNewLineKind", + "getNewLineOrDefaultFromHost", + "getNodeId", + "getNodeKind", + "getNodeModifiers", + "getNonAssignmentOperatorForCompoundAssignment", + "getNonIncrementalBuildInfoRoots", + "getOptionFromName", + "getOptionsForLibraryResolution", + "getOptionsNameMap", + "getOrCreateEmitNode", + "getOriginalNodeId", + "getOutputDeclarationFileName", + "getOutputDeclarationFileNameWorker", + "getOutputExtension", + "getOutputFileNames", + "getOutputJSFileNameWorker", + "getOutputPathsFor", + "getPackageJsonTypesVersionsPaths", + "getPackageNameFromTypesPackageName", + "getPackageScopeForPath", + "getParentNodeInSpan", + "getParsedCommandLineOfConfigFile", + "getPathUpdater", + "getPendingEmitKindWithSeen", + "getPossibleGenericSignatures", + "getPossibleTypeArgumentsInfo", + "getPreEmitDiagnostics", + "getPrecedingNonSpaceCharacterPosition", + "getPrivateIdentifier", + "getProperties", + "getPropertySymbolFromBindingElement", + "getQuoteFromPreference", + "getQuotePreference", + "getRefactorContextSpan", + "getReferencedFileLocation", + "getRenameLocation", + "getReplacementSpanForContextToken", + "getResolutionDiagnostic", + "getResolutionModeOverride", + "getRootDirectoryOfResolutionCache", + "getScriptKind", + "getSemanticClassifications", + "getSnapshotText", + "getSnippetElement", + "getSourceFileVersionAsHashFromText", + "getSourceMapRange", + "getSourceMapper", + "getStartsOnNewLine", + "getStaticPropertiesAndClassStaticBlock", + "getSuperCallFromStatement", + "getSwitchedType", + "getSymbolId", + "getSymbolTarget", + "getSyntacticClassifications", + "getSynthesizedDeepClone", + "getSynthesizedDeepCloneWithReplacements", + "getSynthesizedDeepClones", + "getSynthesizedDeepClonesWithReplacements", + "getSyntheticLeadingComments", + "getSyntheticTrailingComments", + "getTargetLabel", + "getTemporaryModuleResolutionState", + "getTokenAtPosition", + "getTokenSourceMapRange", + "getTouchingPropertyName", + "getTouchingToken", + "getTransformers", + "getTsBuildInfoEmitOutputFilePath", + "getTypeArgumentOrTypeParameterList", + "getTypeKeywordOfTypeOnlyImport", + "getTypeNode", + "getTypeNodeIfAccessible", + "getTypesPackageName", + "getUniqueName", + "getUniqueSymbolId", + "getWatchErrorSummaryDiagnosticMessage", + "getWatchFactory", + "handleNoEmitOptions", + "handleWatchOptionsConfigDirTemplateSubstitution", + "hasDocComment", + "hasIndexSignature", + "hasPropertyAccessExpressionWithName", + "identitySourceMapConsumer", + "ignoreSourceNewlines", + "ignoredPaths", + "inferredTypesContainingFile", + "injectClassNamedEvaluationHelperBlockIfMissing", + "injectClassThisAssignmentIfMissing", + "insertImports", + "inverseJsxOptionMap", + "isAccessibilityModifier", + "isApplicableVersionedTypesKey", + "isArgumentExpressionOfElementAccess", + "isArrayLiteralOrObjectLiteralDestructuringPattern", + "isBlockLike", + "isBuildCommand", + "isBuildInfoFile", + "isBuilderProgram", + "isCallExpressionTarget", + "isCallOrNewExpressionTarget", + "isCallToHelper", + "isCircularBuildOrder", + "isClassNamedEvaluationHelperBlock", + "isClassThisAssignmentBlock", + "isComment", + "isCompoundAssignment", + "isDecoratorTarget", + "isDeprecatedDeclaration", + "isDocumentRegistryEntry", + "isEmittedFileOfProgram", + "isEqualityOperatorKind", + "isExcludedFile", + "isExclusivelyTypeOnlyImportOrExport", + "isExportsOrModuleExportsOrAlias", + "isExpressionOfExternalModuleImportEqualsDeclaration", + "isExternalModuleSymbol", + "isFirstDeclarationOfSymbolParameter", + "isFixablePromiseHandler", + "isIgnoredFileFromWildCardWatching", + "isImportOrExportSpecifierName", + "isImportable", + "isInComment", + "isInJSXText", + "isInNonReferenceComment", + "isInReferenceComment", + "isInRightSideOfInternalImportEqualsDeclaration", + "isInString", + "isInTemplateString", + "isIncrementalBuildInfo", + "isIncrementalBundleEmitBuildInfo", + "isInitializedProperty", + "isInsideJsxElement", + "isInsideJsxElementOrAttribute", + "isInsideNodeModules", + "isInsideTemplateLiteral", + "isInstantiatedModule", + "isJsxOpeningLikeElementTagName", + "isJumpStatementTarget", + "isLabelName", + "isLabelOfLabeledStatement", + "isLiteralNameOfPropertyDeclarationOrIndexAccess", + "isMissingPackageJsonInfo", + "isModuleSpecifierLike", + "isNameOfFunctionDeclaration", + "isNameOfModuleDeclaration", + "isNewExpressionTarget", + "isNonStaticMethodOrAccessorWithPrivateName", + "isObjectBindingElementWithoutPropertyName", + "isPackageJsonInfo", + "isPossiblyTypeArgumentPosition", + "isProgramUptoDate", + "isReferenceFileLocation", + "isReferencedFile", + "isReturnStatementWithFixablePromiseHandler", + "isRightSideOfPropertyAccess", + "isRightSideOfQualifiedName", + "isSimpleCopiableExpression", + "isSimpleInlineableExpression", + "isSimpleParameterList", + "isSolutionConfig", + "isSourceFileFromLibrary", + "isSourceMapping", + "isStringAndEmptyAnonymousObjectIntersection", + "isStringLiteralOrTemplate", + "isStringOrRegularExpressionOrTemplateLiteral", + "isTagName", + "isTaggedTemplateTag", + "isTextWhiteSpaceLike", + "isThis", + "isTraceEnabled", + "isTypeKeyword", + "isTypeKeywordTokenOrIdentifier", + "jsxModeNeedsExplicitImport", + "keywordPart", + "libMap", + "libs", + "lineBreakPart", + "loadModuleFromGlobalCache", + "loadWithModeAwareCache", + "makeImport", + "makeStringLiteral", + "mangleScopedPackageName", + "mapOneOrMany", + "mapToDisplayParts", + "matchesExclude", + "matchesExcludeWorker", + "missingFileModifiedTime", + "moduleOptionDeclaration", + "moduleResolutionNameAndModeGetter", + "moduleResolutionOptionDeclarations", + "moduleResolutionUsesNodeModules", + "moduleSpecifierToValidIdentifier", + "moduleSpecifiers", + "moduleSymbolToValidIdentifier", + "moveEmitHelpers", + "moveSyntheticComments", + "needsParentheses", + "newCaseClauseTracker", + "newPrivateEnvironment", + "noEmitNotification", + "noEmitSubstitution", + "noTransformers", + "nodeModuleNameResolver", + "nodeModulesPathPart", + "nodeNextJsonConfigResolver", + "nodeOverlapsWithStartEnd", + "nodeSeenTracker", + "noopFileWatcher", + "notImplementedResolver", + "nullNodeConverters", + "nullTransformationContext", + "operatorPart", + "optionDeclarations", + "optionMapToObject", + "optionsAffectingProgramStructure", + "optionsForBuild", + "optionsForWatch", + "parameterNamePart", + "parseBuildCommand", + "parseCommandLine", + "parseCommandLineWorker", + "parseConfigFileTextToJson", + "parseConfigFileWithSystem", + "parseConfigHostFromCompilerHostLike", + "parseCustomTypeOption", + "parseJsonConfigFileContent", + "parseJsonSourceFileConfigFileContent", + "parseListTypeOption", + "parseNodeModuleFromPath", + "parsePackageName", + "pasteEdits", + "patchWriteFileEnsuringDirectory", + "pathContainsNodeModules", + "performIncrementalCompilation", + "performance", + "positionBelongsToNode", + "positionIsASICandidate", + "preProcessFile", + "probablyUsesSemicolons", + "processTaggedTemplateExpression", + "programContainsEsModules", + "programContainsModules", + "propertyNamePart", + "punctuationPart", + "quote", + "quotePreferenceFromString", + "rangeContainsPosition", + "rangeContainsPositionExclusive", + "rangeContainsRange", + "rangeContainsRangeExclusive", + "rangeContainsStartEnd", + "rangeOverlapsWithStartEnd", + "readBuilderProgram", + "readConfigFile", + "readJsonConfigFile", + "refactor", + "removeAllComments", + "removeEmitHelper", + "removeIgnoredPath", + "repeatString", + "resolveConfigFileProjectName", + "resolveJSModule", + "resolveLibrary", + "resolveModuleName", + "resolveModuleNameFromCache", + "resolvePackageNameToPackageJson", + "resolveProjectReferencePath", + "resolveTripleslashReference", + "resolveTypeReferenceDirective", + "returnNoopFileWatcher", + "returnsPromise", + "rewriteModuleSpecifier", + "sameMapping", + "semanticDiagnosticsOptionDeclarations", + "serializeCompilerOptions", + "server", + "setCommentRange", + "setConfigFileInOptions", + "setConstantValue", + "setEmitFlags", + "setGetSourceFileAsHashVersioned", + "setIdentifierAutoGenerate", + "setIdentifierGeneratedImportReference", + "setIdentifierTypeArguments", + "setInternalEmitFlags", + "setPrivateIdentifier", + "setSnippetElement", + "setSourceMapRange", + "setStackTraceLimit", + "setStartsOnNewLine", + "setSyntheticLeadingComments", + "setSyntheticTrailingComments", + "setSys", + "setSysLog", + "setTokenSourceMapRange", + "setTypeNode", + "shouldAllowImportingTsExtension", + "shouldUseUriStyleNodeCoreModules", + "signatureHasRestParameter", + "signatureToDisplayParts", + "skipConstraint", + "sourceFileAffectingCompilerOptions", + "sourceMapCommentRegExp", + "sourceMapCommentRegExpDontCareLineStart", + "spacePart", + "startEndContainsRange", + "startEndOverlapsWithStartEnd", + "startTracing", + "startsWithUnderscore", + "stringContainsAt", + "suppressLeadingAndTrailingTrivia", + "suppressLeadingTrivia", + "suppressTrailingTrivia", + "symbolEscapedNameNoDefault", + "symbolNameNoDefault", + "symbolToDisplayParts", + "sysLog", + "targetOptionDeclaration", + "testFormatSettings", + "textChanges", + "textOrKeywordPart", + "textPart", + "textSpansEqual", + "toBuilderFileEmit", + "toBuilderStateFileInfoForMultiEmit", + "toProgramEmitPending", + "trace", + "tracingEnabled", + "transform", + "transformClassFields", + "transformDeclarations", + "transformECMAScriptModule", + "transformES2015", + "transformES2016", + "transformES2017", + "transformES2018", + "transformES2019", + "transformES2020", + "transformES2021", + "transformESDecorators", + "transformESNext", + "transformGenerators", + "transformImpliedNodeFormatDependentModule", + "transformJsx", + "transformLegacyDecorators", + "transformModule", + "transformNamedEvaluation", + "transformNodes", + "transformSystemModule", + "transformTypeScript", + "transpile", + "transpileDeclaration", + "transpileModule", + "transpileOptionValueCompilerOptions", + "tryAndIgnoreErrors", + "tryDirectoryExists", + "tryFileExists", + "tryGetDirectories", + "tryGetSourceMappingURL", + "tryParseRawSourceMap", + "tryReadDirectory", + "tryReadFile", + "tscBuildOption", + "typeAcquisitionDeclarations", + "typeAliasNamePart", + "typeKeywords", + "typeParameterNamePart", + "typeToDisplayParts", + "unchangedPollThresholds", + "unmangleScopedPackageName", + "updateErrorForNoInputFiles", + "updateMissingFilePathsWatch", + "updateResolutionField", + "updateSharedExtendedConfigFileWatcher", + "updateWatchingWildcardDirectories", + "visitArray", + "visitCommaListElements", + "visitEachChild", + "visitFunctionBody", + "visitIterationBody", + "visitLexicalEnvironment", + "visitNode", + "visitNodes", + "visitParameterList", + "whitespaceOrMapCommentRegExp", +]); diff --git a/scripts/build/utils.js b/scripts/build/utils.js new file mode 100644 index 000000000000..2493e8d740c8 --- /dev/null +++ b/scripts/build/utils.js @@ -0,0 +1,15 @@ +import fs from "node:fs"; +import path from "node:path"; +import { PROJECT_ROOT } from "../utils/index.js"; + +function getPackageFile(file) { + const resolved = path.join(PROJECT_ROOT, `node_modules/${file}`); + + if (!fs.existsSync(resolved)) { + throw new Error(`'${file}' not exist.`); + } + + return resolved; +} + +export { getPackageFile }; diff --git a/scripts/bundle-eslint-config.cjs b/scripts/bundle-eslint-config.cjs deleted file mode 100644 index bcdb281ef83d..000000000000 --- a/scripts/bundle-eslint-config.cjs +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -const targets = require("../package.json").browserslist; - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: "latest", - }, - settings: { - targets, - lintAllEsApis: true, - polyfills: [ - // These are not really polyfilled, but seems safe to use in target browsers - "BigInt", - "Symbol.asyncIterator", - ], - }, - plugins: ["compat"], - overrides: [ - { - files: ["**/*.mjs"], - parserOptions: { - sourceType: "module", - }, - }, - { - files: [ - "doc.js", - "parser-*.js", - "standalone.js", - "parser-*.mjs", - "standalone.mjs", - ], - env: { - browser: true, - }, - rules: { - "compat/compat": "error", - }, - }, - { - files: ["bin-prettier.js"], - parserOptions: { - ecmaVersion: 5, - }, - rules: { - "compat/compat": "error", - }, - }, - { - files: ["index.js", "bin-prettier.js", "cli.js", "third-party.js"], - rules: { - "no-restricted-syntax": [ - "error", - // Forbid top level `require()` parsers - { - selector: - 'CallExpression:not(:function *)[callee.name="require"][arguments.0.value=/parser-/]', - message: "Parsers should be inline `require()`d.", - }, - ], - }, - }, - { - files: ["doc.js", "parser-*.js", "standalone.js"], - rules: { - "no-restricted-syntax": [ - "error", - // Forbid `require()` - { - selector: 'CallExpression[callee.name="require"]', - message: "UMD bundles should not include any `require()` call.", - }, - ], - }, - }, - ], -}; diff --git a/scripts/bundle-eslint-config.js b/scripts/bundle-eslint-config.js new file mode 100644 index 000000000000..802e95b6caf5 --- /dev/null +++ b/scripts/bundle-eslint-config.js @@ -0,0 +1,122 @@ +import fs from "node:fs/promises"; +import eslintPluginCompat from "eslint-plugin-compat"; + +const { browserslist: targets } = JSON.parse( + await fs.readFile(new URL("../package.json", import.meta.url)), +); + +const browserFiles = [ + "doc.js", + "doc.mjs", + "standalone.js", + "standalone.mjs", + "plugins/*", +]; + +const nodejsFiles = ["index.cjs", "index.mjs", "bin/*", "internal/*"]; + +const restrictedSyntaxes = [ + { + selector: String.raw`CallExpression[callee.name="require"][arguments.0.value=/^\..*?\.mjs$/]`, + message: ".mjs file can't be `require()`d", + }, +]; + +const browserRestrictedSyntaxes = [ + { + selector: 'CallExpression[callee.name="require"]', + message: "Universal bundles should not include any `require()` call.", + }, + { + selector: "ImportDeclaration", + message: "Universal bundles should not include any `import` declaration.", + }, + { + selector: + ":matches(ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration)[source]", + message: "Universal bundles should not `export` from other files.", + }, + { + selector: "ImportExpression", + message: "Universal bundles should not include any `import()`.", + }, +]; + +const nodejsRestrictedSyntaxes = [ + // Forbid top level `require()` parsers + { + selector: + 'CallExpression:not(:function *)[callee.name="require"][arguments.0.value=/plugins/]', + message: "Parsers should be inline `require()`d.", + }, + // Forbid top level `import()` parsers + { + selector: "ImportExpression:not(:function *)[source.value=/plugins/]", + message: "Parsers should be inline `import()`ed.", + }, + // Forbid `import`/`export` parsers + { + selector: + ":matches(ImportDeclaration, ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration)[source.value=/plugins/]", + message: "Parsers should be inline `import()`ed.", + }, +]; + +/* TODO[@fisker]: Fix `no-restricted-syntax` */ + +export default [ + { + plugins: { + compat: eslintPluginCompat, + }, + settings: { + targets, + lintAllEsApis: true, + polyfills: [ + // These are not really polyfilled, but seems safe to use in target browsers + "BigInt", + "Symbol.asyncIterator", + ], + }, + linterOptions: { + noInlineConfig: true, + reportUnusedDisableDirectives: "off", + }, + rules: { + "compat/compat": "error", + "no-restricted-syntax": ["error", ...restrictedSyntaxes], + }, + }, + + { + files: browserFiles, + rules: { + "no-restricted-syntax": [ + "error", + ...restrictedSyntaxes, + ...browserRestrictedSyntaxes, + ], + }, + }, + + { + files: nodejsFiles, + rules: { + "no-restricted-syntax": [ + "error", + ...restrictedSyntaxes, + ...nodejsRestrictedSyntaxes, + ], + }, + }, + + { + files: ["bin/prettier.cjs"], + languageOptions: { + ecmaVersion: 5, + }, + rules: { + "compat/compat": "error", + }, + }, +]; diff --git a/scripts/changelog-for-patch.js b/scripts/changelog-for-patch.js new file mode 100644 index 000000000000..bccd256660be --- /dev/null +++ b/scripts/changelog-for-patch.js @@ -0,0 +1,56 @@ +#!/usr/bin/env node + +import path from "node:path"; +import { parseArgs } from "node:util"; +import semver from "semver"; +import { + categories, + changelogUnreleasedDirPath, + changelogUnreleasedDirs, + getEntries, + printEntries, + replaceVersions, +} from "./utils/changelog.js"; + +const { previousVersion, newVersion } = parseArguments(); + +const entries = changelogUnreleasedDirs.flatMap((dir) => { + const dirPath = path.join(changelogUnreleasedDirPath, dir.name); + const { title } = categories.find((category) => category.dir === dir.name); + + return getEntries(dirPath).map((entry) => { + const content = + entry.content.slice(0, 4) + ` ${title}:` + entry.content.slice(4); + return { ...entry, content }; + }); +}); + +console.log( + replaceVersions( + printEntries(entries).join("\n\n"), + previousVersion, + newVersion, + /** isPatch */ true, + ), +); + +function parseArguments() { + const { + values: { "prev-version": previousVersion, "new-version": newVersion }, + } = parseArgs({ + options: { + "prev-version": { type: "string" }, + "new-version": { type: "string" }, + }, + }); + if ( + !previousVersion || + !newVersion || + semver.compare(previousVersion, newVersion) !== -1 + ) { + throw new Error( + `Invalid argv, prev-version: ${previousVersion}, new-version: ${newVersion}`, + ); + } + return { previousVersion, newVersion }; +} diff --git a/scripts/changelog-for-patch.mjs b/scripts/changelog-for-patch.mjs deleted file mode 100644 index 8b59409906ab..000000000000 --- a/scripts/changelog-for-patch.mjs +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env node - -import path from "node:path"; -import minimist from "minimist"; -import semver from "semver"; -import { - changelogUnreleasedDirPath, - changelogUnreleasedDirs, - getEntries, - printEntries, - replaceVersions, -} from "./utils/changelog.mjs"; - -const { previousVersion, newVersion } = parseArgv(); - -const entries = changelogUnreleasedDirs.flatMap((dir) => { - const dirPath = path.join(changelogUnreleasedDirPath, dir.name); - return getEntries(dirPath); -}); - -console.log( - replaceVersions( - printEntries(entries).join("\n\n"), - previousVersion, - newVersion, - /** isPatch */ true - ) -); - -function parseArgv() { - const argv = minimist(process.argv.slice(2)); - const previousVersion = argv["prev-version"]; - const newVersion = argv["new-version"]; - if ( - !previousVersion || - !newVersion || - semver.compare(previousVersion, newVersion) !== -1 - ) { - throw new Error( - `Invalid argv, prev-version: ${previousVersion}, new-version: ${newVersion}` - ); - } - return { previousVersion, newVersion }; -} diff --git a/scripts/check-deps.js b/scripts/check-deps.js new file mode 100644 index 000000000000..463f7f5096b8 --- /dev/null +++ b/scripts/check-deps.js @@ -0,0 +1,57 @@ +#!/usr/bin/env node + +import fs from "node:fs/promises"; +import styleText from "node-style-text"; + +const PROJECT_ROOT = new URL("../", import.meta.url); +const ERROR = styleText.bgRed.black(" ERROR "); +const PASS = "✅ All dependency versions are pinned."; + +for (const [index, directory] of [ + "./", + "./website/", + "./scripts/release/", + "./scripts/tools/bundle-test/", + "./scripts/tools/eslint-plugin-prettier-internal-rules/", +].entries()) { + const file = new URL(`${directory}package.json`, PROJECT_ROOT); + + if (index > 0) { + console.log(); + } + + console.log( + `Checking '${styleText.gray(file.href.slice(PROJECT_ROOT.href.length - 1))}'...`, + ); + const ok = await validatePackageJson(file); + if (ok) { + console.log(PASS); + } +} + +async function validatePackageJson(packageJsonFile) { + const packageJson = JSON.parse(await fs.readFile(packageJsonFile)); + + let ok = true; + for (const property of ["dependencies", "devDependencies", "resolutions"]) { + const value = packageJson[property]; + + if (!value) { + continue; + } + + for (const [name, version] of Object.entries(value)) { + if (version[0] === "^" || version[0] === "~") { + console.error( + ERROR, + `Dependency "${styleText.bold.blue(name)}" in "${styleText.gray.underline(property)}" should be pinned.`, + ); + + ok = false; + process.exitCode = 1; + } + } + } + + return ok; +} diff --git a/scripts/check-deps.mjs b/scripts/check-deps.mjs deleted file mode 100644 index 61e7b9fdbca2..000000000000 --- a/scripts/check-deps.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import fs from "node:fs/promises"; -import chalk from "chalk"; - -const packageJson = JSON.parse( - await fs.readFile(new URL("../package.json", import.meta.url)) -); - -validateDependencyObject(packageJson.dependencies); -validateDependencyObject(packageJson.devDependencies); - -function validateDependencyObject(object) { - for (const key of Object.keys(object)) { - if (object[key][0] === "^" || object[key][0] === "~") { - console.error( - chalk.red("error"), - `Dependency "${chalk.bold.red(key)}" should be pinned.` - ); - process.exitCode = 1; - } - } -} diff --git a/scripts/clean-changelog-unreleased.mjs b/scripts/clean-changelog-unreleased.mjs deleted file mode 100644 index dcc75641d3ba..000000000000 --- a/scripts/clean-changelog-unreleased.mjs +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -import fs from "node:fs"; -import { fileURLToPath } from "node:url"; -import fastGlob from "fast-glob"; - -const changelogUnreleasedDir = fileURLToPath( - new URL("../changelog_unreleased", import.meta.url) -); - -const files = fastGlob.sync(["blog-post-intro.md", "*/*.md"], { - cwd: changelogUnreleasedDir, - absolute: true, -}); -for (const file of files) { - fs.unlinkSync(file); -} diff --git a/scripts/clean-cspell.js b/scripts/clean-cspell.js new file mode 100644 index 000000000000..72bdae0d5bb4 --- /dev/null +++ b/scripts/clean-cspell.js @@ -0,0 +1,61 @@ +#!/usr/bin/env node + +import fs from "node:fs/promises"; +import spawn from "nano-spawn"; + +const CSPELL_CONFIG_FILE = new URL("../cspell.json", import.meta.url); +const updateConfig = (config) => + fs.writeFile(CSPELL_CONFIG_FILE, JSON.stringify(config, undefined, 4) + "\n"); +const runSpellcheck = (args, options) => + spawn("yarn", ["lint:spellcheck", ...args], options); + +console.log("Empty words ..."); +const config = JSON.parse(await fs.readFile(CSPELL_CONFIG_FILE)); +const original = config.words; +await updateConfig({ ...config, words: [] }); + +console.log("Running spellcheck with empty words ..."); +let stdout = ""; +try { + await runSpellcheck(["--words-only", "--unique"]); +} catch (error) { + ({ stdout } = error); +} + +const words = stdout + ? stdout + .split("\n") + // Remove upper case word, if lower case one already exists + .filter((word, _, words) => { + const lowerCased = word.toLowerCase(); + return lowerCased === word || !words.includes(lowerCased); + }) + // Compare function from https://github.com/streetsidesoftware/vscode-spell-checker/blob/2fde3bc5c658ee51da5a56580aa1370bf8174070/packages/client/src/settings/CSpellSettings.ts#L78 + .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) + : []; +config.words = words; + +const removed = original.filter((word) => !words.includes(word)); +if (removed.length > 0) { + console.log( + `${removed.length} words removed: \n${removed + .map((word) => ` - ${word}`) + .join("\n")}`, + ); +} +const added = words.filter((word) => !original.includes(word)); +if (added.length > 0) { + console.log( + `${added.length} words added: \n${added + .map((word) => ` - ${word}`) + .join("\n")}`, + ); +} + +console.log("Updating words ..."); +await updateConfig(config); + +console.log("Running spellcheck with new words ..."); +await runSpellcheck([], { stdio: "inherit" }); + +console.log("CSpell config file updated."); diff --git a/scripts/clean-cspell.mjs b/scripts/clean-cspell.mjs deleted file mode 100644 index 4c70ca14a364..000000000000 --- a/scripts/clean-cspell.mjs +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env node - -import fs from "node:fs/promises"; -import { execa } from "execa"; - -const CSPELL_CONFIG_FILE = new URL("../cspell.json", import.meta.url); -const updateConfig = (config) => - fs.writeFile(CSPELL_CONFIG_FILE, JSON.stringify(config, undefined, 4) + "\n"); -const runSpellcheck = (options) => { - const { yarnArgs, args, execaOptions } = { - yarnArgs: [], - args: [], - ...options, - }; - return execa("yarn", [...yarnArgs, "lint:spellcheck", ...args], execaOptions); -}; - -console.log("Empty words ..."); -const config = JSON.parse(await fs.readFile(CSPELL_CONFIG_FILE)); -const original = config.words; -await updateConfig({ ...config, words: [] }); - -console.log("Running spellcheck with empty words ..."); -const { stdout } = await runSpellcheck({ - yarnArgs: ["--silent"], - args: ["--words-only", "--unique"], - execaOptions: { reject: false }, -}); - -const words = stdout - .split("\n") - // Remove upper case word, if lower case one already exists - .filter((word, _, words) => { - const lowerCased = word.toLowerCase(); - return lowerCased === word || !words.includes(lowerCased); - }) - // Compare function from https://github.com/streetsidesoftware/vscode-spell-checker/blob/2fde3bc5c658ee51da5a56580aa1370bf8174070/packages/client/src/settings/CSpellSettings.ts#L78 - .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())); -config.words = words; - -const removed = original.filter((word) => !words.includes(word)); -if (removed.length > 0) { - console.log( - `${removed.length} words removed: \n${removed - .map((word) => ` - ${word}`) - .join("\n")}` - ); -} -const added = words.filter((word) => !original.includes(word)); -if (added.length > 0) { - console.log( - `${added.length} words added: \n${added - .map((word) => ` - ${word}`) - .join("\n")}` - ); -} - -console.log("Updating words ..."); -await updateConfig(config); - -console.log("Running spellcheck with new words ..."); -await runSpellcheck({ execaOptions: { stdout: "inherit" } }); - -console.log("CSpell config file updated."); diff --git a/scripts/clean-git-blame-ignore-revs-file.js b/scripts/clean-git-blame-ignore-revs-file.js new file mode 100644 index 000000000000..357c5683d67d --- /dev/null +++ b/scripts/clean-git-blame-ignore-revs-file.js @@ -0,0 +1,48 @@ +#!/usr/bin/env node + +/* +Clean up `.git-blame-ignore-revs` + +Remove revs without actual file change +*/ + +import fs from "node:fs/promises"; +import spawn from "nano-spawn"; + +const FILE = new URL("../.git-blame-ignore-revs", import.meta.url); +const content = await fs.readFile(FILE, "utf8"); + +const lines = content.split("\n"); +const revsToRemove = new Set(); + +const IGNORED_FILES = new Set(["package.json", "yarn.lock"]); +async function getChangedFiles(rev) { + const { stdout } = await spawn("git", [ + "show", + "--name-only", + "--pretty=", + rev, + ]); + + const files = stdout.split("\n"); + return files; +} + +for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } + + const rev = line; + const changedFiles = await getChangedFiles(rev); + + if (changedFiles.every((file) => IGNORED_FILES.has(file))) { + revsToRemove.add(rev); + } +} + +if (revsToRemove.size > 0) { + const updated = lines.filter((line) => !revsToRemove.has(line)).join("\n"); + + await fs.writeFile(FILE, updated); +} diff --git a/scripts/draft-blog-post.js b/scripts/draft-blog-post.js new file mode 100644 index 000000000000..e20cc778e454 --- /dev/null +++ b/scripts/draft-blog-post.js @@ -0,0 +1,109 @@ +#!/usr/bin/env node + +import fs from "node:fs"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import fg from "fast-glob"; +import semver from "semver"; +import { + categories, + changelogUnreleasedDirPath, + changelogUnreleasedDirs, + getEntries, + printEntries, + replaceVersions, +} from "./utils/changelog.js"; + +const { __dirname, require } = createEsmUtils(import.meta); +const blogDir = path.join(__dirname, "../website/blog"); +const introTemplateFile = path.join( + changelogUnreleasedDirPath, + "BLOG_POST_INTRO_TEMPLATE.md", +); +const introFile = path.join(changelogUnreleasedDirPath, "blog-post-intro.md"); +if (!fs.existsSync(introFile)) { + fs.copyFileSync(introTemplateFile, introFile); +} + +const prevVersion = require("../node_modules/prettier/package.json").version; +const { version } = require("../package.json"); +const nextVersion = `${semver.major(version)}.${semver.minor( + version, +)}.${semver.patch(version)}`; + +const postGlob = path.join(blogDir, `????-??-??-${nextVersion}.md`); +const postFile = path.join( + blogDir, + `${new Date().toISOString().replace(/T.+/u, "")}-${nextVersion}.md`, +); + +const categoriesByDir = new Map( + categories.map((category) => [category.dir, category]), +); + +for (const dir of changelogUnreleasedDirs) { + const dirPath = path.join(changelogUnreleasedDirPath, dir.name); + const category = categoriesByDir.get(dir.name); + + if (!category) { + throw new Error("Unknown category: " + dir.name); + } + + category.entries = getEntries(dirPath, { useFriendlyHeadingId: true }); +} + +for (const filePath of fg.sync(postGlob)) { + fs.rmSync(filePath); +} + +const introFileData = fs.readFileSync(introFile, "utf8").trim(); + +const TRUNCATE_COMMENT = ""; +const shouldPrintTruncate = !introFileData.includes(TRUNCATE_COMMENT); + +fs.writeFileSync( + postFile, + replaceVersions( + [ + introFileData, + shouldPrintTruncate ? TRUNCATE_COMMENT : "", + ...printEntriesWithTitle({ + title: "Highlights", + filter: (entry) => entry.section === "highlight", + }), + ...printEntriesWithTitle({ + title: "Breaking Changes", + filter: (entry) => entry.section === "breaking", + }), + ...printEntriesWithTitle({ + title: "Formatting Improvements", + filter: (entry) => entry.section === "improvement", + }), + ...printEntriesWithTitle({ + title: "Other Changes", + filter: (entry) => !entry.section, + }), + ] + .filter(Boolean) + .join("\n\n") + "\n", + prevVersion, + nextVersion, + ), +); + +function printEntriesWithTitle({ title, filter }) { + const result = []; + + for (const { entries = [], title } of categories) { + const filteredEntries = entries.filter(filter); + if (filteredEntries.length > 0) { + result.push("### " + title, ...printEntries(filteredEntries)); + } + } + + if (result.length > 0) { + result.unshift("## " + title); + } + + return result; +} diff --git a/scripts/draft-blog-post.mjs b/scripts/draft-blog-post.mjs deleted file mode 100644 index 1b3d1bdf4e81..000000000000 --- a/scripts/draft-blog-post.mjs +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env node - -import fs from "node:fs"; -import path from "node:path"; -import rimraf from "rimraf"; -import createEsmUtils from "esm-utils"; -import { - getEntries, - replaceVersions, - changelogUnreleasedDirPath, - changelogUnreleasedDirs, - printEntries, -} from "./utils/changelog.mjs"; - -const { __dirname, require } = createEsmUtils(import.meta); -const blogDir = path.join(__dirname, "../website/blog"); -const introTemplateFile = path.join( - changelogUnreleasedDirPath, - "BLOG_POST_INTRO_TEMPLATE.md" -); -const introFile = path.join(changelogUnreleasedDirPath, "blog-post-intro.md"); -if (!fs.existsSync(introFile)) { - fs.copyFileSync(introTemplateFile, introFile); -} -const previousVersion = require("prettier/package.json").version; -const version = require("../package.json").version.replace(/-.+/, ""); -const postGlob = path.join(blogDir, `????-??-??-${version}.md`); -const postFile = path.join( - blogDir, - `${new Date().toISOString().replace(/T.+/, "")}-${version}.md` -); - -const categories = [ - { dir: "javascript", title: "JavaScript" }, - { dir: "typescript", title: "TypeScript" }, - { dir: "flow", title: "Flow" }, - { dir: "json", title: "JSON" }, - { dir: "css", title: "CSS" }, - { dir: "scss", title: "SCSS" }, - { dir: "less", title: "Less" }, - { dir: "html", title: "HTML" }, - { dir: "vue", title: "Vue" }, - { dir: "angular", title: "Angular" }, - { dir: "lwc", title: "LWC" }, - { dir: "handlebars", title: "Ember / Handlebars" }, - { dir: "graphql", title: "GraphQL" }, - { dir: "markdown", title: "Markdown" }, - { dir: "mdx", title: "MDX" }, - { dir: "yaml", title: "YAML" }, - { dir: "api", title: "API" }, - { dir: "cli", title: "CLI" }, - { dir: "misc", title: "Miscellaneous" }, -]; - -const categoriesByDir = new Map( - categories.map((category) => [category.dir, category]) -); - -for (const dir of changelogUnreleasedDirs) { - const dirPath = path.join(changelogUnreleasedDirPath, dir.name); - const category = categoriesByDir.get(dir.name); - - if (!category) { - throw new Error("Unknown category: " + dir.name); - } - - category.entries = getEntries(dirPath); -} - -rimraf.sync(postGlob); - -const introFileData = fs.readFileSync(introFile, "utf8").trim(); - -const TRUNCATE_COMMENT = ""; -const shouldPrintTruncate = !introFileData.includes(TRUNCATE_COMMENT); - -fs.writeFileSync( - postFile, - replaceVersions( - [ - introFileData, - shouldPrintTruncate ? TRUNCATE_COMMENT : "", - ...printEntriesWithTitle({ - title: "Highlights", - filter: (entry) => entry.section === "highlight", - }), - ...printEntriesWithTitle({ - title: "Breaking Changes", - filter: (entry) => entry.section === "breaking", - }), - ...printEntriesWithTitle({ - title: "Formatting Improvements", - filter: (entry) => entry.section === "improvement", - }), - ...printEntriesWithTitle({ - title: "Other Changes", - filter: (entry) => !entry.section, - }), - ] - .filter(Boolean) - .join("\n\n") + "\n", - previousVersion, - version - ) -); - -function printEntriesWithTitle({ title, filter }) { - const result = []; - - for (const { entries = [], title } of categories) { - const filteredEntries = entries.filter(filter); - if (filteredEntries.length > 0) { - result.push("### " + title, ...printEntries(filteredEntries)); - } - } - - if (result.length > 0) { - result.unshift("## " + title); - } - - return result; -} diff --git a/scripts/format-test-lint.js b/scripts/format-test-lint.js new file mode 100644 index 000000000000..aed9b1831459 --- /dev/null +++ b/scripts/format-test-lint.js @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +// Make sure format test directories contains format test script. + +import fs from "node:fs/promises"; +import path from "node:path"; +import { PROJECT_ROOT } from "./utils/index.js"; + +const FORMAT_TEST_DIRECTORY = path.join(PROJECT_ROOT, "tests/format/"); +const TEST_SCRIPT_FILE_NAME = "format.test.js"; +const SNAPSHOTS_DIRECTORY_NAME = "__snapshots__"; +const IGNORED = new Set([ + path.join(FORMAT_TEST_DIRECTORY, "markdown/spec/remark-bug"), +]); + +async function* checkDirectory(directory) { + if (IGNORED.has(directory)) { + return; + } + + const files = await fs.readdir(directory, { withFileTypes: true }); + + yield { + directory, + ok: + directory === FORMAT_TEST_DIRECTORY || + !files.some( + (file) => file.isFile() && file.name !== TEST_SCRIPT_FILE_NAME, + ) || + files.some( + (file) => file.isFile() && file.name === TEST_SCRIPT_FILE_NAME, + ), + }; + + for (const dirent of files) { + if (dirent.isDirectory() && dirent.name !== SNAPSHOTS_DIRECTORY_NAME) { + yield* checkDirectory(path.join(dirent.parentPath, dirent.name)); + } + } +} + +const directories = []; +for await (const { directory, ok } of checkDirectory(FORMAT_TEST_DIRECTORY)) { + const name = path.relative(PROJECT_ROOT, directory).replaceAll("\\", "/"); + + if (!ok) { + console.log(name); + directories.push(name); + } +} + +if (directories.length > 0) { + console.log(); + console.error( + `${directories.length > 1 ? "Directories" : "Directory"} above missing "${TEST_SCRIPT_FILE_NAME}" file.`, + ); + process.exitCode = 1; +} else { + console.log("Pass."); +} diff --git a/scripts/generate-changelog.js b/scripts/generate-changelog.js new file mode 100755 index 000000000000..f2912f24605c --- /dev/null +++ b/scripts/generate-changelog.js @@ -0,0 +1,197 @@ +#!/usr/bin/env node + +/** + * When you run the script, enter the number and category of the Pull Request at the prompt. + * Get the PR title and author name via the GitHub API and create a file in ./changelog_unreleased + * + * $ node ./scripts/generate-changelog.js + * ✔ Input your Pull Request number: 10961 + * ✔ Input category of your Pull Request: typescript + */ + +import fs from "node:fs/promises"; +import enquirer from "enquirer"; +import { CHANGELOG_CATEGORIES } from "./utils/changelog-categories.js"; + +const prNumberPrompt = new enquirer.NumberPrompt({ + message: "Input your Pull Request number:", +}); +const prNumber = await prNumberPrompt.run(); + +const categoryPrompt = new enquirer.AutoComplete({ + message: "Input category of your Pull Request:", + limit: CHANGELOG_CATEGORIES.length, + // The array passed to `choices` will be broken, so copy it. + choices: [...CHANGELOG_CATEGORIES], +}); +const category = (await categoryPrompt.run()).trim(); + +if (!prNumber || !category) { + throw new Error("Two args are required."); +} +assertCategory(category); + +const { title, user } = await getPr(prNumber); + +const content = await createChangelog(title, user, prNumber, category); + +const file = await addNewChangelog(prNumber, category, content); + +const relativePath = file.href.slice( + new URL("../", import.meta.url).href.length, +); + +console.log("Generated changelog file: " + relativePath); + +/** + * @param {number} prNumber + * @returns {Promise<{ title: string; user: string }>} + */ +async function getPr(prNumber) { + // https://docs.github.com/en/rest/reference/pulls#get-a-pull-request + const url = `https://api.github.com/repos/prettier/prettier/pulls/${prNumber}`; + const response = await fetch(url, { + Headers: { + "Content-Type": "application/json", + Accept: "application/vnd.github.v3+json", + }, + }); + if (!response.ok) { + if (response.status === 404) { + throw new Error(`Pull Request #${prNumber} not found.`); + } + throw new Error(response); + } + const { title, user } = await response.json(); + return { + title, + user: user.login, + }; +} + +/** + * @param {number} prNumber + * @param {string} category + * @param {string} content + * @returns {Promise} + */ +async function addNewChangelog(prNumber, category, content) { + const file = new URL( + `../changelog_unreleased/${category}/${prNumber}.md`, + import.meta.url, + ); + await fs.writeFile(file, content); + return file; +} + +/** + * @param {string} title + * @param {string} user + * @param {number} prNumber + * @param {string} string + * @returns {Promise} + */ +async function createChangelog(title, user, prNumber, category) { + const templateFile = new URL( + "../changelog_unreleased/TEMPLATE.md", + import.meta.url, + ); + const changelogTemplate = await fs.readFile(templateFile, "utf8"); + + const titlePart = "Title"; + const prNumberPart = "#XXXX"; + const userPart = "@user"; + const codeBlockPart = "```jsx\n"; + const inputCommentPart = "// Input\n"; + const stableCommentPart = "// Prettier stable\n"; + const mainCommentPart = "// Prettier main\n"; + + const syntax = getSyntaxFromCategory(category); + + return changelogTemplate + .replace(titlePart, title) + .replace(prNumberPart, `#${prNumber}`) + .replace(userPart, `@${user}`) + .replace(codeBlockPart, `\`\`\`${syntax}\n`) + .replace(inputCommentPart, getCommentForSyntax(syntax, "Input") + "\n") + .replace( + stableCommentPart, + getCommentForSyntax(syntax, "Prettier stable") + "\n", + ) + .replace( + mainCommentPart, + getCommentForSyntax(syntax, "Prettier main") + "\n", + ); +} + +/** + * @param {string} category + * @returns {string} + */ +function getSyntaxFromCategory(category) { + switch (category) { + case "angular": + case "html": + case "lwc": + case "mjml": + return "html"; + case "cli": + return "sh"; + case "graphql": + return "gql"; + case "handlebars": + return "hbs"; + case "json": + return "jsonc"; + case "markdown": + return "md"; + case "mdx": + return "mdx"; + case "flow": + case "javascript": + case "api": + case "misc": + return "jsx"; + case "typescript": + return "tsx"; + case "css": + case "scss": + case "less": + return "css"; + default: + return category; + } +} + +/** + * @param {string} syntax + * @param {string} comment + * @returns {string} + */ +function getCommentForSyntax(syntax, comment) { + switch (syntax) { + case "md": + case "mdx": + case "html": + return ``; + case "sh": + case "gql": + return `# ${comment}`; + case "hbs": + return `{{! ${comment} }}`; + case "css": + return `/* ${comment} */`; + default: + return `// ${comment}`; + } +} + +/** + * @param {unknown} + * @returns {void} + */ +function assertCategory(category) { + if (!CHANGELOG_CATEGORIES.includes(category)) { + throw new Error(`${category} is invalid category`); + } +} diff --git a/scripts/generate-changelog.mjs b/scripts/generate-changelog.mjs deleted file mode 100644 index f3d9e7ffc2cd..000000000000 --- a/scripts/generate-changelog.mjs +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/env node - -/** - * When you run the script, enter the number and category of the Pull Request at the prompt. - * Get the PR title and author name via the GitHub API and create a file in ./changelog_unreleased - * - * $ node ./scripts/generate-changelog.mjs - * ✔ Input your Pull Request number: · 10961 - * ✔ Input category of your Pull Request: · typescript - */ - -import fs from "node:fs/promises"; -import path from "node:path"; -import fetch from "node-fetch"; -import createEsmUtils from "esm-utils"; -import enquirer from "enquirer"; -import { CHANGELOG_CATEGORIES } from "./utils/changelog-categories.mjs"; - -const { __dirname } = createEsmUtils(import.meta); - -const prNumberPrompt = new enquirer.NumberPrompt({ - message: "Input your Pull Request number:", -}); -const prNumber = await prNumberPrompt.run(); - -const categoryPrompt = new enquirer.AutoComplete({ - message: "Input category of your Pull Request:", - limit: CHANGELOG_CATEGORIES.length, - // The array passed to `choices` will be broken, so copy it. - choices: [...CHANGELOG_CATEGORIES], -}); -const category = (await categoryPrompt.run()).trim(); - -if (!prNumber || !category) { - throw new Error("Two args are required."); -} -assertCategory(category); - -const { title, user } = await getPr(prNumber); - -const newChangelog = await createChangelog(title, user, prNumber, category); - -const changelogPath = await addNewChangelog(prNumber, category, newChangelog); - -const relativePath = path.relative(path.join(__dirname, ".."), changelogPath); -console.log("Generated changelog file: " + relativePath); - -/** - * @param {number} prNumber - * @returns {Promise<{ title: string; user: string }>} - */ -async function getPr(prNumber) { - // https://docs.github.com/en/rest/reference/pulls#get-a-pull-request - const url = `https://api.github.com/repos/prettier/prettier/pulls/${prNumber}`; - const response = await fetch(url, { - Headers: { - "Content-Type": "application/json", - Accept: "application/vnd.github.v3+json", - }, - }); - if (!response.ok) { - if (response.status === 404) { - throw new Error(`Pull Request #${prNumber} not found.`); - } - throw new Error(response); - } - const { title, user } = await response.json(); - return { - title, - user: user.login, - }; -} - -/** - * @param {number} prNumber - * @param {string} category - * @param {string} newChangelog - * @returns {Promise} - */ -async function addNewChangelog(prNumber, category, newChangelog) { - const newChangelogPath = path.resolve( - __dirname, - `../changelog_unreleased/${category}/${prNumber}.md` - ); - await fs.writeFile(newChangelogPath, newChangelog); - return newChangelogPath; -} - -/** - * @param {string} title - * @param {string} user - * @param {number} prNumber - * @param {string} string - * @returns {string} - */ -async function createChangelog(title, user, prNumber, category) { - const changelogTemplatePath = path.resolve( - __dirname, - "../changelog_unreleased/TEMPLATE.md" - ); - const changelogTemplate = await fs.readFile(changelogTemplatePath, "utf8"); - - const titlePart = "Title"; - const prNumberPart = "#XXXX"; - const userPart = "@user"; - const codeBlockPart = "```jsx\n"; - const inputCommentPart = "// Input\n"; - const stableCommentPart = "// Prettier stable\n"; - const mainCommentPart = "// Prettier main\n"; - - const syntax = getSyntaxFromCategory(category); - - return changelogTemplate - .replace(titlePart, title) - .replace(prNumberPart, `#${prNumber}`) - .replace(userPart, `@${user}`) - .replace(codeBlockPart, `\`\`\`${syntax}\n`) - .replace(inputCommentPart, getCommentForSyntax(syntax, "Input") + "\n") - .replace( - stableCommentPart, - getCommentForSyntax(syntax, "Prettier stable") + "\n" - ) - .replace( - mainCommentPart, - getCommentForSyntax(syntax, "Prettier main") + "\n" - ); -} - -/** - * @param {string} category - * @returns {string} - */ -function getSyntaxFromCategory(category) { - switch (category) { - case "angular": - case "html": - case "lwc": - return "html"; - case "cli": - return "sh"; - case "graphql": - return "gql"; - case "handlebars": - return "hbs"; - case "json": - return "jsonc"; - case "markdown": - return "md"; - case "mdx": - return "mdx"; - case "flow": - case "javascript": - case "api": - return "jsx"; - case "typescript": - return "tsx"; - case "css": - case "scss": - case "less": - return "css"; - default: - return category; - } -} - -/** - * @param {string} syntax - * @param {string} comment - * @returns {string} - */ -function getCommentForSyntax(syntax, comment) { - switch (syntax) { - case "md": - case "mdx": - case "html": - return ``; - case "sh": - case "gql": - return `# ${comment}`; - case "hbs": - return `{{! ${comment} }}`; - case "css": - return `/* ${comment} */`; - default: - return `// ${comment}`; - } -} - -/** - * @param {unknown} - * @returns {void} - */ -function assertCategory(category) { - if (!CHANGELOG_CATEGORIES.includes(category)) { - throw new Error(`${category} is invalid category`); - } -} diff --git a/scripts/generate-schema.js b/scripts/generate-schema.js new file mode 100644 index 000000000000..fac2f42b747d --- /dev/null +++ b/scripts/generate-schema.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +import { generateSchema } from "./utils/generate-schema.js"; + +console.log(await generateSchema()); diff --git a/scripts/generate-schema.mjs b/scripts/generate-schema.mjs deleted file mode 100644 index 71a61e85c372..000000000000 --- a/scripts/generate-schema.mjs +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node - -import prettier from "../index.js"; -import generateSchema from "./utils/generate-schema.js"; - -console.log( - prettier.format( - JSON.stringify(generateSchema(prettier.getSupportInfo().options)), - { parser: "json" } - ) -); diff --git a/scripts/generate-unused-typescript-specifiers.js b/scripts/generate-unused-typescript-specifiers.js new file mode 100644 index 000000000000..808561a1ec3b --- /dev/null +++ b/scripts/generate-unused-typescript-specifiers.js @@ -0,0 +1,61 @@ +import fs from "node:fs/promises"; +import esbuild from "esbuild"; +import * as importMetaResolve from "import-meta-resolve"; +import { outdent } from "outdent"; +import * as prettier from "prettier"; +import * as typescript from "typescript"; +import { modifyTypescriptModule } from "./build/modify-typescript-module.js"; +import UNUSED_SPECIFIERS from "./build/typescript-unused-specifiers.js"; + +async function getRemovedSpecifiers(code, exports) { + let errors = []; + try { + await esbuild.transformSync(code, { loader: "js" }); + return; + } catch (error) { + ({ errors } = error); + } + + const specifiers = []; + for (const { text } of errors) { + const match = text.match( + /^"(?.*?)" is not declared in this file$/u, + ); + + if (match) { + const { specifier } = exports.find( + ({ variable }) => variable === match.groups.variable, + ); + specifiers.push(specifier); + } + } + + return specifiers; +} + +async function main() { + const original = await fs.readFile( + new URL(importMetaResolve.resolve("typescript", import.meta.url)), + "utf8", + ); + const { code, exports } = modifyTypescriptModule(original); + + let specifiers = (await getRemovedSpecifiers(code, exports)) ?? []; + + specifiers = [...new Set([...UNUSED_SPECIFIERS, ...specifiers])] + .filter((specifier) => Object.hasOwn(typescript, specifier)) + .sort(); + + await fs.writeFile( + new URL("./build/typescript-unused-specifiers.js", import.meta.url), + await prettier.format( + outdent` + export default new Set(${JSON.stringify(specifiers, undefined, 2)}); + `, + { parser: "meriyah" }, + ), + ); + console.log("typescript-unused-specifiers.js updated."); +} + +await main(); diff --git a/scripts/lint-changelog.js b/scripts/lint-changelog.js new file mode 100644 index 000000000000..a558d149ed00 --- /dev/null +++ b/scripts/lint-changelog.js @@ -0,0 +1,154 @@ +#!/usr/bin/env node + +import fs from "node:fs"; +import indexToPosition from "index-to-position"; +import { outdent } from "outdent"; +import { CHANGELOG_CATEGORIES } from "./utils/changelog-categories.js"; + +const CHANGELOG_DIR = "changelog_unreleased"; +const TEMPLATE_FILE = "TEMPLATE.md"; +const BLOG_POST_INTRO_TEMPLATE_FILE = "BLOG_POST_INTRO_TEMPLATE.md"; +const BLOG_POST_INTRO_FILE = "blog-post-intro.md"; +const CHANGELOG_ROOT = new URL(`../${CHANGELOG_DIR}/`, import.meta.url); +const showErrorMessage = (message) => { + console.error(message); + process.exitCode = 1; +}; + +const files = fs.readdirSync(CHANGELOG_ROOT); +for (const file of files) { + if ( + file !== TEMPLATE_FILE && + file !== BLOG_POST_INTRO_FILE && + file !== BLOG_POST_INTRO_TEMPLATE_FILE && + !CHANGELOG_CATEGORIES.includes(file) + ) { + showErrorMessage(`Please remove "${file}" from "${CHANGELOG_DIR}".`); + } +} +for (const file of [ + TEMPLATE_FILE, + BLOG_POST_INTRO_TEMPLATE_FILE, + ...CHANGELOG_CATEGORIES, +]) { + if (!files.includes(file)) { + showErrorMessage(`Please don't remove "${file}" from "${CHANGELOG_DIR}".`); + } +} + +const authorRegex = /by @[\w-]+|by \[@([\w-]+)\]\(https:\/\/github\.com\/\1\)/u; +const titleRegex = /^#{4} (.*?)\((#\d{4,}|\[#\d{4,}\])/u; + +const template = fs.readFileSync( + new URL(TEMPLATE_FILE, CHANGELOG_ROOT), + "utf8", +); +const templateComments = template.match(//gsu); +const [templateAuthorLink] = template.match(authorRegex); +const checkedFiles = new Map(); + +for (const category of CHANGELOG_CATEGORIES) { + const files = fs.readdirSync(new URL(`${category}/`, CHANGELOG_ROOT)); + if (!files.includes(".gitkeep")) { + showErrorMessage( + `Please don't remove ".gitkeep" from "${CHANGELOG_DIR}/${category}".`, + ); + } + + for (const prFile of files) { + if (prFile === ".gitkeep") { + continue; + } + + const match = prFile.match(/^(\d{4,})(-\d+)?\.md$/u); + const displayPath = `${CHANGELOG_DIR}/${category}/${prFile}`; + + if (!match) { + showErrorMessage( + `[${displayPath}]: Filename is not in form of "{PR_NUMBER}.md".`, + ); + continue; + } + const [, prNumber] = match; + const prLink = `#${prNumber}`; + if (checkedFiles.has(prFile)) { + showErrorMessage( + outdent` + Duplicate files for ${prLink} found. + - ${checkedFiles.get(prFile)} + - ${displayPath} + `, + ); + } + checkedFiles.set(prFile, displayPath); + const content = fs.readFileSync( + new URL(`${category}/${prFile}`, CHANGELOG_ROOT), + "utf8", + ); + + if (!content.includes(prLink)) { + showErrorMessage(`[${displayPath}]: PR link "${prLink}" is missing.`); + } + if (!authorRegex.test(content)) { + showErrorMessage(`[${displayPath}]: Author link is missing.`); + } + for (const comment of templateComments) { + if (comment !== "" && content.includes(comment)) { + showErrorMessage( + `[${displayPath}]: Please remove ${getCommentDescription( + content, + comment, + )}`, + ); + } + } + if (content.includes(templateAuthorLink)) { + showErrorMessage( + `[${displayPath}]: Please change author link to your github account.`, + ); + } + if (!content.startsWith("#### ")) { + showErrorMessage(`[${displayPath}]: Please use h4 ("####") for title.`); + } + const titleMatch = content.match(titleRegex); + if (!titleMatch) { + showErrorMessage(`[${displayPath}]: Something wrong in title.`); + continue; + } + const [, title] = titleMatch; + const categoryInTitle = title.split(":").shift().trim(); + if ( + [...CHANGELOG_CATEGORIES, "js"].includes(categoryInTitle.toLowerCase()) + ) { + showErrorMessage( + `[${displayPath}]: Please remove "${categoryInTitle}:" in title.`, + ); + } + + if (!title.endsWith(" ") || title.length - title.trimEnd().length !== 1) { + showErrorMessage( + `[${displayPath}]: Please put one space between title and PR link.`, + ); + } + + if (/prettier master/iu.test(content)) { + showErrorMessage( + `[${displayPath}]: Please use "main" instead of "master".`, + ); + } + } +} + +function getCommentDescription(content, comment) { + const start = content.indexOf(comment); + const end = start + comment.length; + const [startLine, endLine] = [start, end].map( + (index) => indexToPosition(content, index, { oneBased: true }).line, + ); + + if (startLine === endLine) { + return `template comment "${comment}" on line ${startLine}`; + } + + return `template comment on line ${startLine}-${endLine}`; +} diff --git a/scripts/lint-changelog.mjs b/scripts/lint-changelog.mjs deleted file mode 100644 index b715e561d21c..000000000000 --- a/scripts/lint-changelog.mjs +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env node - -import path from "node:path"; -import fs from "node:fs"; -import { outdent } from "outdent"; -import createEsmUtils from "esm-utils"; -import { CHANGELOG_CATEGORIES } from "./utils/changelog-categories.mjs"; - -const { __dirname } = createEsmUtils(import.meta); -const CHANGELOG_DIR = "changelog_unreleased"; -const TEMPLATE_FILE = "TEMPLATE.md"; -const BLOG_POST_INTRO_TEMPLATE_FILE = "BLOG_POST_INTRO_TEMPLATE.md"; -const BLOG_POST_INTRO_FILE = "blog-post-intro.md"; -const CHANGELOG_ROOT = path.join(__dirname, `../${CHANGELOG_DIR}`); -const showErrorMessage = (message) => { - console.error(message); - process.exitCode = 1; -}; - -const files = fs.readdirSync(CHANGELOG_ROOT); -for (const file of files) { - if ( - file !== TEMPLATE_FILE && - file !== BLOG_POST_INTRO_FILE && - file !== BLOG_POST_INTRO_TEMPLATE_FILE && - !CHANGELOG_CATEGORIES.includes(file) - ) { - showErrorMessage(`Please remove "${file}" from "${CHANGELOG_DIR}".`); - } -} -for (const file of [ - TEMPLATE_FILE, - BLOG_POST_INTRO_TEMPLATE_FILE, - ...CHANGELOG_CATEGORIES, -]) { - if (!files.includes(file)) { - showErrorMessage(`Please don't remove "${file}" from "${CHANGELOG_DIR}".`); - } -} - -const authorRegex = /by @[\w-]+|by \[@([\w-]+)]\(https:\/\/github\.com\/\1\)/; -const titleRegex = /^#{4} (.*?)\((#\d{4,}|\[#\d{4,}])/; - -const template = fs.readFileSync( - path.join(CHANGELOG_ROOT, TEMPLATE_FILE), - "utf8" -); -const [templateComment] = template.match(//s); -const [templateAuthorLink] = template.match(authorRegex); -const checkedFiles = new Map(); - -for (const category of CHANGELOG_CATEGORIES) { - const files = fs.readdirSync(path.join(CHANGELOG_ROOT, category)); - if (!files.includes(".gitkeep")) { - showErrorMessage( - `Please don't remove ".gitkeep" from "${CHANGELOG_DIR}/${category}".` - ); - } - - for (const prFile of files) { - if (prFile === ".gitkeep") { - continue; - } - - const match = prFile.match(/^(\d{4,})\.md$/); - const displayPath = `${CHANGELOG_DIR}/${category}/${prFile}`; - - if (!match) { - showErrorMessage( - `[${displayPath}]: Filename is not in form of "{PR_NUMBER}.md".` - ); - continue; - } - const [, prNumber] = match; - const prLink = `#${prNumber}`; - if (checkedFiles.has(prNumber)) { - showErrorMessage( - outdent` - Duplicate files for ${prLink} found. - - ${checkedFiles.get(prNumber)} - - ${displayPath} - ` - ); - } - checkedFiles.set(prNumber, displayPath); - const content = fs.readFileSync( - path.join(CHANGELOG_DIR, category, prFile), - "utf8" - ); - - if (!content.includes(prLink)) { - showErrorMessage(`[${displayPath}]: PR link "${prLink}" is missing.`); - } - if (!authorRegex.test(content)) { - showErrorMessage(`[${displayPath}]: Author link is missing.`); - } - if (content.includes(templateComment)) { - showErrorMessage( - `[${displayPath}]: Please remove template comments at top.` - ); - } - if (content.includes(templateAuthorLink)) { - showErrorMessage( - `[${displayPath}]: Please change author link to your github account.` - ); - } - if (!content.startsWith("#### ")) { - showErrorMessage(`[${displayPath}]: Please use h4 ("####") for title.`); - } - const titleMatch = content.match(titleRegex); - if (!titleMatch) { - showErrorMessage(`[${displayPath}]: Something wrong in title.`); - continue; - } - const [, title] = titleMatch; - const categoryInTitle = title.split(":").shift().trim(); - if ( - [...CHANGELOG_CATEGORIES, "js"].includes(categoryInTitle.toLowerCase()) - ) { - showErrorMessage( - `[${displayPath}]: Please remove "${categoryInTitle}:" in title.` - ); - } - - if (!title.endsWith(" ") || title.length - title.trimEnd().length !== 1) { - showErrorMessage( - `[${displayPath}]: Please put one space between title and PR link.` - ); - } - - if (/prettier master/i.test(content)) { - showErrorMessage( - `[${displayPath}]: Please use "main" instead of "master".` - ); - } - } -} diff --git a/scripts/prepare-test-for-legacy-nodejs.js b/scripts/prepare-test-for-legacy-nodejs.js new file mode 100644 index 000000000000..b9c255787909 --- /dev/null +++ b/scripts/prepare-test-for-legacy-nodejs.js @@ -0,0 +1,96 @@ +import fs from "node:fs"; + +const packageJsonFile = new URL("../package.json", import.meta.url); +const packageJson = JSON.parse(fs.readFileSync(packageJsonFile)); + +const argv = process.argv.slice(2); +const nodeVersion = Number(argv[1]); + +if (argv[0] !== "--node-version" || !Number.isInteger(nodeVersion)) { + throw new Error("Expect `--node-version` argument."); +} + +let jestVersion; + +if (nodeVersion === 14) { + // `jest@30.0.0-alpha.2` is the last version that supports Node.js v14 + jestVersion = "30.0.0-alpha.2"; +} else if (nodeVersion === 16) { + // `jest@30.0.0-alpha.7` is the last version that supports Node.js v16 + jestVersion = "30.0.0-alpha.7"; +} else { + throw new Error("Unexpected `--node-version`."); +} + +// Script to get dependencies +// console.log( +// Object.fromEntries( +// Array.from( +// fs +// .readFileSync("./yarn.lock", "utf8") +// .matchAll(/"(.*?)@npm:30\.0\.0-alpha\.3[",]/g), +// (match) => match[1], +// ) +// .sort() +// .map((dependency) => [dependency, "30.0.0-alpha.2"]), +// ), +// ); + +fs.writeFileSync( + packageJsonFile, + JSON.stringify( + { + ...packageJson, + resolutions: { + ...packageJson.resolutions, + "@jest/console": jestVersion, + "@jest/core": jestVersion, + "@jest/environment": jestVersion, + "@jest/expect": jestVersion, + "@jest/expect-utils": jestVersion, + "@jest/fake-timers": jestVersion, + "@jest/globals": jestVersion, + "@jest/reporters": jestVersion, + "@jest/schemas": jestVersion, + "@jest/source-map": jestVersion, + "@jest/test-result": jestVersion, + "@jest/test-sequencer": jestVersion, + "@jest/transform": jestVersion, + // "@jest/types": jestVersion, + "babel-jest": jestVersion, + "babel-plugin-jest-hoist": jestVersion, + "babel-preset-jest": jestVersion, + "diff-sequences": jestVersion, + expect: jestVersion, + jest: jestVersion, + "jest-changed-files": jestVersion, + "jest-circus": jestVersion, + "jest-cli": jestVersion, + "jest-config": jestVersion, + "jest-diff": jestVersion, + // "jest-docblock": jestVersion, + "jest-each": jestVersion, + "jest-environment-node": jestVersion, + "jest-get-type": jestVersion, + "jest-haste-map": jestVersion, + "jest-leak-detector": jestVersion, + "jest-matcher-utils": jestVersion, + "jest-message-util": jestVersion, + "jest-mock": jestVersion, + "jest-regex-util": jestVersion, + "jest-resolve": jestVersion, + "jest-resolve-dependencies": jestVersion, + "jest-runner": jestVersion, + "jest-runtime": jestVersion, + "jest-snapshot": jestVersion, + "jest-util": jestVersion, + "jest-validate": jestVersion, + "jest-watcher": jestVersion, + "jest-worker": jestVersion, + "pretty-format": jestVersion, + }, + }, + undefined, + 2, + ), +); diff --git a/scripts/release/README.md b/scripts/release/README.md index d89679b18d16..4d9237f1bbd6 100644 --- a/scripts/release/README.md +++ b/scripts/release/README.md @@ -3,11 +3,21 @@ ## Usage ```sh -node ./scripts/release/release.js --version NEW_VERSION +node ./scripts/release/release.js ``` The script has its own `package.json` so we can reinstall the root's `node_modules/` while making the release. +## Flags + +| Flag | Description | +| ----------------------------- | --------------------------------------------------------------------------------------- | +| `--version` | Version to release | +| `--manual` | Manual run release process instead of publish from GitHub actions | +| `--dry` | Dry run | +| `--skip-dependencies-install` | Skip dependencies installation | +| `--next` | Pre-release such as alpha and beta. It must be run on the `next` branch or it will fail | + ## Credits This script was inspired by [React's release script](https://github.com/facebook/react/tree/001f9ef/scripts/release). diff --git a/scripts/release/__tests__/setup.js b/scripts/release/__tests__/setup.js deleted file mode 100644 index 937bf0bce8e8..000000000000 --- a/scripts/release/__tests__/setup.js +++ /dev/null @@ -1,9 +0,0 @@ -import { jest } from "@jest/globals"; - -jest.unstable_mockModule("../get-formatted-date", () => ({ - default: () => ({ - year: "2021", - month: "09", - day: "01", - }), -})); diff --git a/scripts/release/__tests__/steps/publish-to-npm.spec.js b/scripts/release/__tests__/steps/publish-to-npm.spec.js deleted file mode 100644 index ced6df5efc6a..000000000000 --- a/scripts/release/__tests__/steps/publish-to-npm.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -import { getReleaseUrl } from "../../steps/show-instructions-after-npm-publish.js"; - -describe("publish-to-npm", () => { - describe("getReleaseUrl", () => { - it("returns URL for patch releasing", () => { - const result = getReleaseUrl("2.3.1", "2.3.0"); - expect(result).toBe( - "https://github.com/prettier/prettier/releases/new?tag=2.3.1&title=2.3.1&body=%F0%9F%94%97%20%5BChangelog%5D(https%3A%2F%2Fgithub.com%2Fprettier%2Fprettier%2Fblob%2Fmain%2FCHANGELOG.md%23231)" - ); - }); - - it("returns URL for minor releasing", () => { - const result = getReleaseUrl("2.4.0", "2.3.0"); - expect(result).toBe( - "https://github.com/prettier/prettier/releases/new?tag=2.4.0&title=2.4.0&body=%5Bdiff%5D(https%3A%2F%2Fgithub.com%2Fprettier%2Fprettier%2Fcompare%2F2.3.0...2.4.0)%0A%0A%F0%9F%94%97%20%5BRelease%20note%5D(https%3A%2F%2Fprettier.io%2Fblog%2F2021%2F09%2F01%2F2.4.0.html)" - ); - }); - - it("returns URL for major releasing", () => { - const result = getReleaseUrl("2.3.0", "2.2.0"); - expect(result).toBe( - "https://github.com/prettier/prettier/releases/new?tag=2.3.0&title=2.3.0&body=%5Bdiff%5D(https%3A%2F%2Fgithub.com%2Fprettier%2Fprettier%2Fcompare%2F2.2.0...2.3.0)%0A%0A%F0%9F%94%97%20%5BRelease%20note%5D(https%3A%2F%2Fprettier.io%2Fblog%2F2021%2F09%2F01%2F2.3.0.html)" - ); - }); - }); -}); diff --git a/scripts/release/__tests__/steps/validate-new-version.spec.js b/scripts/release/__tests__/steps/validate-new-version.spec.js deleted file mode 100644 index 68d53a461bdf..000000000000 --- a/scripts/release/__tests__/steps/validate-new-version.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -import chalk from "chalk"; -import step from "../../steps/validate-new-version.js"; - -describe("validate-new-version", () => { - it("throws error for invalid semver", () => { - expect(() => { - step({ version: "foo" }); - }).toThrow("Invalid version specified"); - }); - it("throws error when version isn't greater than prev version", () => { - expect(() => { - step({ version: "0.0.1", previousVersion: "0.0.2" }); - }).toThrow(`Version ${chalk.yellow("0.0.1")} has already been published`); - }); -}); diff --git a/scripts/release/__tests__/steps/version-check.spec.js b/scripts/release/__tests__/steps/version-check.spec.js deleted file mode 100644 index 478f3a532ad4..000000000000 --- a/scripts/release/__tests__/steps/version-check.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -import { isVersionReleased } from "../../steps/wait-for-bot-release.js"; - -describe("isVersionReleased", () => { - test("returns true for existing version", async () => { - const result = await isVersionReleased("1.0.0"); - expect(result).toBe(true); - }); - test("rejects true for non-existing version", async () => { - await expect( - isVersionReleased("999.0.0") - ).rejects.toThrowErrorMatchingInlineSnapshot( - '"prettier@999.0.0 doesn\'t exit."' - ); - }); -}); diff --git a/scripts/release/get-formatted-date.js b/scripts/release/get-formatted-date.js index 21b96e12cf8b..0d7c40c8a3cd 100644 --- a/scripts/release/get-formatted-date.js +++ b/scripts/release/get-formatted-date.js @@ -1,8 +1,11 @@ // TODO: Implement this in `utils.js` when jest.importActual is landed. export default function getFormattedDate() { const date = new Date(); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, "0"); - const day = String(date.getDate()).padStart(2, "0"); + const isoStr = date.toISOString(); + + const year = isoStr.slice(0, 4); + const month = isoStr.slice(5, 7); + const day = isoStr.slice(8, 10); + return { year, month, day }; } diff --git a/scripts/release/jest.config.js b/scripts/release/jest.config.js deleted file mode 100644 index 861952394721..000000000000 --- a/scripts/release/jest.config.js +++ /dev/null @@ -1,6 +0,0 @@ -const config = { - testMatch: ["/__tests__/**/*.spec.js"], - setupFiles: ["/__tests__/setup.js"], -}; - -export default config; diff --git a/scripts/release/package.json b/scripts/release/package.json index ec336a3f0ff3..3dd990244911 100644 --- a/scripts/release/package.json +++ b/scripts/release/package.json @@ -2,20 +2,18 @@ "private": true, "type": "module", "scripts": { - "test": "NODE_OPTIONS=--experimental-vm-modules jest" + "test": "node --test" }, "dependencies": { - "chalk": "4.1.2", - "enquirer": "2.3.6", - "execa": "6.1.0", - "minimist": "1.2.6", - "node-fetch": "3.2.10", + "enquirer": "2.4.1", + "fast-glob": "3.3.3", + "nano-spawn": "1.0.2", + "node-style-text": "0.0.8", "outdent": "0.8.0", - "semver": "7.3.7", - "string-width": "5.1.2" + "semver": "7.7.2" }, - "devDependencies": { - "@jest/globals": "27.5.1", - "jest": "27.5.1" - } + "engines": { + "node": ">=20" + }, + "packageManager": "yarn@4.9.2" } diff --git a/scripts/release/parse-arguments.js b/scripts/release/parse-arguments.js new file mode 100644 index 000000000000..8fb03914c59d --- /dev/null +++ b/scripts/release/parse-arguments.js @@ -0,0 +1,46 @@ +import { parseArgs } from "node:util"; + +function parseArguments() { + const { + values: { + version, + repo = "git@github.com:prettier/prettier.git", + manual = false, + dry = false, + "skip-dependencies-install": skipDependenciesInstall = false, + next = false, + }, + } = parseArgs({ + options: { + version: { + type: "string", + }, + repo: { + type: "string", + }, + dry: { + type: "boolean", + }, + manual: { + type: "boolean", + }, + "skip-dependencies-install": { + type: "boolean", + }, + next: { + type: "boolean", + }, + }, + }); + + return { + version, + repo, + manual, + dry, + skipDependenciesInstall, + next, + }; +} + +export default parseArguments; diff --git a/scripts/release/release.js b/scripts/release/release.js index 002a1eb35289..c2a2cb297f32 100644 --- a/scripts/release/release.js +++ b/scripts/release/release.js @@ -1,91 +1,30 @@ #!/usr/bin/env node +/* This file can't use any dependency since the dependencies may not installed yet */ import { exec } from "node:child_process"; -import { fileURLToPath } from "node:url"; import path from "node:path"; +import { fileURLToPath } from "node:url"; -async function run() { - const importDefault = async (module) => (await import(module)).default; - - const chalk = await importDefault("chalk"); - const minimist = await importDefault("minimist"); - const semver = await importDefault("semver"); - const { string: outdentString } = await importDefault("outdent"); - const { runGit, readJson } = await import("./utils.js"); - - const params = minimist(process.argv.slice(2), { - string: ["version", "repo"], - boolean: ["dry", "manual", "skip-dependencies-install"], - alias: { v: "version" }, - default: { - manual: false, - dry: false, - "skip-dependencies-install": false, - repo: "git@github.com:prettier/prettier.git", - }, +const directory = path.dirname(fileURLToPath(import.meta.url)); +function runCommand(command) { + return new Promise((resolve, reject) => { + const { stdout, stderr } = exec(command, { cwd: directory }, (error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }); + stdout.pipe(process.stdout); + stderr.pipe(process.stderr); }); +} - const { stdout: previousVersion } = await runGit([ - "describe", - "--tags", - "--abbrev=0", - ]); - - if (semver.parse(previousVersion) === null) { - throw new Error(`Unexpected previousVersion: ${previousVersion}`); - } else { - params.previousVersion = previousVersion; - params.previousVersionOnDefaultBranch = ( - await readJson("package.json") - ).version; - } - - const steps = await Promise.all( - [ - // "./steps/validate-new-version.js", - "./steps/check-git-status.js", - !params["skip-dependencies-install"] && "./steps/install-dependencies.js", - params.manual && "./steps/run-tests.js", - "./steps/update-version.js", - params.manual && "./steps/generate-bundles.js", - "./steps/update-changelog.js", - "./steps/push-to-git.js", - params.manual - ? "./steps/publish-to-npm.js" - : "./steps/wait-for-bot-release.js", - "./steps/show-instructions-after-npm-publish.js", - "./steps/update-dependents-count.js", - "./steps/bump-prettier.js", - "./steps/post-publish-steps.js", - ] - .filter(Boolean) - .map((step) => importDefault(step)) - ); +// Fetch git tags to get the previous version number (i.e. the latest tag) +await runCommand("git fetch --tags"); - try { - for (const step of steps) { - await step(params); - } - } catch (error) { - const message = outdentString(error.message.trim()); - const stack = error.stack.replace(message, ""); - console.error(`${chalk.red("error")} ${message}\n${stack}`); - process.exit(1); - } -} +// Install script's dependencies before any require +await runCommand("yarn"); -exec( - [ - "git fetch --tags", // Fetch git tags to get the previous version number (i.e. the latest tag) - "yarn install", // Install script's dependencies before any require - ].join(" && "), - { cwd: path.dirname(fileURLToPath(import.meta.url)) }, - (error) => { - if (error) { - console.error(error); - process.exit(1); - } else { - run(); - } - } -); +// Ready to run +await import("./run.js"); diff --git a/scripts/release/run.js b/scripts/release/run.js new file mode 100644 index 000000000000..97bba9c516af --- /dev/null +++ b/scripts/release/run.js @@ -0,0 +1,83 @@ +import semver from "semver"; +import parseArguments from "./parse-arguments.js"; +import * as steps from "./steps/index.js"; +import { logPromise, readJson } from "./utils.js"; + +const params = parseArguments(); +const { + default: { version: previousVersion }, +} = await import("prettier/package.json", { + with: { type: "json" }, +}); +if (semver.parse(previousVersion) === null) { + throw new Error(`Unexpected previousVersion: ${previousVersion}`); +} else { + params.previousVersion = previousVersion; + params.previousVersionOnDefaultBranch = ( + await readJson("package.json") + ).version; +} + +for (let step of [ + { + process: steps.chooseVersion, + skip: Boolean(params.version), + }, + { + name: "Validating new version", + process: steps.validateNewVersion, + }, + { + name: "Checking git status", + process: steps.checkGitStatus, + skip: params.dry, + }, + { + name: "Installing NPM dependencies", + process: steps.installDependencies, + skip: params.dry || params.skipDependenciesInstall || !params.manual, + }, + { + name: "Linting files", + process: steps.lintFiles, + skip: params.dry, + }, + { + name: "Bumping version", + process: steps.updateVersion, + skip: params.dry, + }, + steps.generateBundles, + steps.updateChangelog, + { + name: "Committing and pushing to remote", + process: steps.pushToGit, + skip: params.dry, + }, + params.manual ? steps.publishToNpm : steps.waitForBotRelease, + steps.showInstructionsAfterNpmPublish, + { + name: "Merge release notes PR", + process: steps.mergeBlogPost, + }, + steps.updateDependentsCount, + { + name: "Cleaning changelog", + process: steps.cleanChangelog, + skip: params.dry || params.next, + }, + steps.bumpPrettier, + steps.postPublishSteps, +]) { + if (typeof step === "function") { + step = { process: step }; + } + + const runStep = () => step.process(params); + + if (step.name) { + await logPromise(step.name, runStep, step.skip); + } else if (!step.skip) { + await runStep(); + } +} diff --git a/scripts/release/steps/bump-prettier.js b/scripts/release/steps/bump-prettier.js index 924b733817be..c77c89082eb4 100644 --- a/scripts/release/steps/bump-prettier.js +++ b/scripts/release/steps/bump-prettier.js @@ -1,23 +1,34 @@ import fs from "node:fs"; import semver from "semver"; -import { runYarn, runGit, logPromise, readJson, writeJson } from "../utils.js"; +import { logPromise, readJson, runGit, runYarn, writeJson } from "../utils.js"; async function format() { - await runYarn(["lint:eslint", "--fix"]); - await runYarn(["lint:prettier", "--write"]); + await runYarn(["fix:prettier"]); +} + +// Only add commit to `.git-blame-ignore-revs` when files except `package.json` and `yarn.lock` changed +const IGNORED_FILES = new Set(["package.json", "yarn.lock"]); +async function shouldAddToGitBlameIgnoreRevsFile() { + const { stdout } = await runGit(["diff", "--name-only"]); + const changedFiles = stdout.split("\n"); + return changedFiles.some((file) => !IGNORED_FILES.has(file)); } async function commit({ version, repo }) { + const filesChanged = await shouldAddToGitBlameIgnoreRevsFile(); + await runGit(["commit", "-am", `Bump Prettier dependency to ${version}`]); // Add rev to `.git-blame-ignore-revs` file - const file = ".git-blame-ignore-revs"; - const mark = "# Prettier bump after release"; - const { stdout: rev } = await runGit(["rev-parse", "HEAD"]); - let text = fs.readFileSync(file, "utf8"); - text = text.replace(mark, `${mark}\n# ${version}\n${rev}`); - fs.writeFileSync(file, text); - await runGit(["commit", "-am", `Git blame ignore ${version}`]); + if (filesChanged) { + const file = ".git-blame-ignore-revs"; + const mark = "# Prettier bump after release"; + const { stdout: rev } = await runGit(["rev-parse", "HEAD"]); + let text = fs.readFileSync(file, "utf8"); + text = text.replace(mark, `${mark}\n# ${version}\n${rev}`); + fs.writeFileSync(file, text); + await runGit(["commit", "-am", `Git blame ignore ${version}`]); + } await runGit(["push", "--repo", repo]); } @@ -37,18 +48,21 @@ async function bump({ } export default async function bumpPrettier(params) { - const { dry, version } = params; + const { dry, version, next } = params; - if (dry) { + if (dry || next) { return; } + /* + This should be done before installing Prettier, + otherwise the yarn.lock will merge `prettier@npm:, prettier@workspace:.` + */ + await logPromise("Bump default branch version", bump(params)); await logPromise( "Installing Prettier", - runYarn(["add", "--dev", `prettier@${version}`]) + runYarn(["add", "--dev", `prettier@${version}`]), ); - - await logPromise("Updating files", format()); - await logPromise("Bump default branch version", bump(params)); + await logPromise("Formatting files", format()); await logPromise("Committing changed files", commit(params)); } diff --git a/scripts/release/steps/check-git-status.js b/scripts/release/steps/check-git-status.js index 400cc8b0e1f6..f30abd8c3032 100644 --- a/scripts/release/steps/check-git-status.js +++ b/scripts/release/steps/check-git-status.js @@ -1,12 +1,21 @@ import { runGit } from "../utils.js"; -export default async function checkGitStatus() { +export default async function checkGitStatus({ next }) { const { stdout: status } = await runGit(["status", "--porcelain"]); if (status) { throw new Error( "Uncommitted local changes. " + - "Please revert or commit all local changes before making a release." + "Please revert or commit all local changes before making a release.", ); } + + if (next) { + const { stdout: branch } = await runGit(["branch", "--show-current"]); + if (branch !== "next") { + throw new Error( + `Expected to be on "next" branch, but currently on "${branch}"`, + ); + } + } } diff --git a/scripts/release/steps/choose-version.js b/scripts/release/steps/choose-version.js new file mode 100644 index 000000000000..9ca83fd1b427 --- /dev/null +++ b/scripts/release/steps/choose-version.js @@ -0,0 +1,34 @@ +import enquirer from "enquirer"; +import semver from "semver"; + +const SEMVER_INCREMENTS = ["patch", "minor", "major"]; +const CUSTOM_VERSION_VALUE_PLACEHOLDER = "custom-version"; + +export default async function chooseVersion(params) { + let version = await new enquirer.Select({ + name: "version", + message: `Choose a version to release (current: ${params.previousVersion})`, + choices: [ + ...SEMVER_INCREMENTS.map((type) => { + const version = semver.inc(params.previousVersion, type); + + return { + message: `${type}: ${version}`, + value: version, + }; + }), + { role: "separator" }, + { message: "Other", value: CUSTOM_VERSION_VALUE_PLACEHOLDER }, + ], + }).run(); + + if (version === CUSTOM_VERSION_VALUE_PLACEHOLDER) { + ({ version } = await enquirer.prompt({ + type: "input", + name: "version", + message: `Input version (current: ${params.previousVersion})`, + })); + } + + params.version = version; +} diff --git a/scripts/release/steps/clean-changelog.js b/scripts/release/steps/clean-changelog.js new file mode 100644 index 000000000000..24482ace12ec --- /dev/null +++ b/scripts/release/steps/clean-changelog.js @@ -0,0 +1,20 @@ +import fs from "node:fs/promises"; +import { fileURLToPath } from "node:url"; +import fastGlob from "fast-glob"; +import { runGit } from "../utils.js"; + +export default async function cleanChangelog({ repo }) { + const changelogUnreleasedDir = fileURLToPath( + new URL("../../../changelog_unreleased", import.meta.url), + ); + + const files = await fastGlob(["blog-post-intro.md", "*/*.md"], { + cwd: changelogUnreleasedDir, + absolute: true, + }); + + await Promise.all(files.map((file) => fs.unlink(file))); + + await runGit(["commit", "-am", "Clean changelog_unreleased"]); + await runGit(["push", "--repo", repo]); +} diff --git a/scripts/release/steps/generate-bundles.js b/scripts/release/steps/generate-bundles.js index 1a36232aad30..5a536be3e7db 100644 --- a/scripts/release/steps/generate-bundles.js +++ b/scripts/release/steps/generate-bundles.js @@ -1,20 +1,28 @@ -import chalk from "chalk"; -import { runYarn, logPromise, readJson } from "../utils.js"; +import styleText from "node-style-text"; +import { logPromise, readJson, runYarn } from "../utils.js"; + +export default async function generateBundles({ dry, version, manual }) { + if (!manual) { + return; + } -export default async function generateBundles({ version }) { await logPromise( "Generating bundles", - runYarn(["build", "--clean", "--print-size", "--compare-size"]) + runYarn([ + "build", + "--package=prettier", + "--clean", + "--print-size", + "--compare-size", + ]), ); - const builtPkg = await readJson("dist/package.json"); - if (builtPkg.version !== version) { + const builtPkg = await readJson("dist/prettier/package.json"); + if (!dry && builtPkg.version !== version) { throw new Error( - `Expected ${version} in dist/package.json but found ${builtPkg.version}` + `Expected ${version} in dist/prettier/package.json but found ${builtPkg.version}`, ); } - await logPromise("Running tests on generated bundles", runYarn("test:dist")); - - console.log(chalk.green.bold("Build successful!\n")); + console.log(styleText.green.bold("Build successful!\n")); } diff --git a/scripts/release/steps/index.js b/scripts/release/steps/index.js new file mode 100644 index 000000000000..5a83689031c6 --- /dev/null +++ b/scripts/release/steps/index.js @@ -0,0 +1,17 @@ +export { default as bumpPrettier } from "./bump-prettier.js"; +export { default as checkGitStatus } from "./check-git-status.js"; +export { default as chooseVersion } from "./choose-version.js"; +export { default as cleanChangelog } from "./clean-changelog.js"; +export { default as generateBundles } from "./generate-bundles.js"; +export { default as installDependencies } from "./install-dependencies.js"; +export { default as lintFiles } from "./lint-files.js"; +export { default as mergeBlogPost } from "./merge-blog-post.js"; +export { default as postPublishSteps } from "./post-publish-steps.js"; +export { default as publishToNpm } from "./publish-to-npm.js"; +export { default as pushToGit } from "./push-to-git.js"; +export { default as showInstructionsAfterNpmPublish } from "./show-instructions-after-npm-publish.js"; +export { default as updateChangelog } from "./update-changelog.js"; +export { default as updateDependentsCount } from "./update-dependents-count.js"; +export { default as updateVersion } from "./update-version.js"; +export { default as validateNewVersion } from "./validate-new-version.js"; +export { default as waitForBotRelease } from "./wait-for-bot-release.js"; diff --git a/scripts/release/steps/install-dependencies.js b/scripts/release/steps/install-dependencies.js index 106d879d9621..3e108d82a00e 100644 --- a/scripts/release/steps/install-dependencies.js +++ b/scripts/release/steps/install-dependencies.js @@ -1,21 +1,27 @@ -import { execa } from "execa"; -import { runYarn, runGit, logPromise } from "../utils.js"; +import fs from "node:fs/promises"; +import { runGit, runYarn } from "../utils.js"; -async function install() { - await execa("rm", ["-rf", "node_modules"]); - await runYarn(["install"]); +const PROJECT_ROOT = new URL("../../../", import.meta.url); - await execa("rm", ["-rf", "node_modules"], { cwd: "./website" }); - await runYarn(["install"], { cwd: "./website" }); +async function installDependenciesInDirectory(directory) { + await fs.rm(new URL("./node_modules/", directory), { + recursive: true, + force: true, + }); + await runYarn("install", { cwd: directory }); +} + +export default async function installDependencies() { + await Promise.all( + [PROJECT_ROOT, new URL("./website/", PROJECT_ROOT)].map((directory) => + installDependenciesInDirectory(directory), + ), + ); const { stdout: status } = await runGit(["ls-files", "-m"]); if (status) { throw new Error( - "The lockfile needs to be updated, commit it before making the release." + "The lockfile needs to be updated, commit it before making the release.", ); } } - -export default function installDependencies() { - return logPromise("Installing NPM dependencies", install()); -} diff --git a/scripts/release/steps/lint-files.js b/scripts/release/steps/lint-files.js new file mode 100644 index 000000000000..8442d66f2947 --- /dev/null +++ b/scripts/release/steps/lint-files.js @@ -0,0 +1,5 @@ +import { runYarn } from "../utils.js"; + +const lintFiles = () => runYarn("lint"); + +export default lintFiles; diff --git a/scripts/release/steps/merge-blog-post.js b/scripts/release/steps/merge-blog-post.js new file mode 100644 index 000000000000..0b3546d41ca1 --- /dev/null +++ b/scripts/release/steps/merge-blog-post.js @@ -0,0 +1,25 @@ +import styleText from "node-style-text"; +import semver from "semver"; +import { runGit, waitForEnter } from "../utils.js"; + +export default async function mergeBlogPost({ + dry, + repo, + version, + previousVersion, +}) { + if (dry) { + return; + } + + if (semver.diff(version, previousVersion) === "patch") { + return; + } + + console.log( + styleText.yellow.bold("Please merge the release notes PR if exits."), + ); + + await waitForEnter(); + await runGit(["pull", repo]); +} diff --git a/scripts/release/steps/post-publish-steps.js b/scripts/release/steps/post-publish-steps.js index 6a3accc2d9de..988fde2b24ae 100644 --- a/scripts/release/steps/post-publish-steps.js +++ b/scripts/release/steps/post-publish-steps.js @@ -1,9 +1,6 @@ -import chalk from "chalk"; +import styleText from "node-style-text"; import outdent from "outdent"; -import { execa } from "execa"; -import { fetchText, logPromise } from "../utils.js"; - -const outdentString = outdent.string; +import { fetchText, logPromise, writeFile } from "../utils.js"; const SCHEMA_REPO = "SchemaStore/schemastore"; const SCHEMA_PATH = "src/schemas/json/prettierrc.json"; @@ -13,52 +10,60 @@ const EDIT_URL = `https://github.com/${SCHEMA_REPO}/edit/master/${SCHEMA_PATH}`; // Any optional or manual step can be warned in this script. async function checkSchema() { - const { stdout: schema } = await execa("node", [ - "scripts/generate-schema.mjs", - ]); + const { generateSchema } = await import("../../utils/generate-schema.js"); + const schema = await generateSchema(); const remoteSchema = await logPromise( "Checking current schema in SchemaStore", - fetchText(RAW_URL) + fetchText(RAW_URL), ); - if (schema === remoteSchema.trim()) { + if (schema.trim() === remoteSchema.trim()) { return; } - return outdentString(chalk` - {bold.underline The schema in {yellow SchemaStore} needs an update.} - - Open {cyan.underline ${EDIT_URL}} - - Run {yellow node scripts/generate-schema.mjs} and copy the new schema + writeFile( + new URL("../../../.tmp/schema/prettierrc.json", import.meta.url), + schema, + ); + + return outdent` + ${styleText.bold.underline( + "The schema in {yellow SchemaStore", + )} needs an update.} + - Open ${styleText.cyan.underline(EDIT_URL)} + - Open ${styleText.cyan.underline("/.tmp/schema/prettierrc.json")} file and copy the content - Paste it on GitHub interface - Open a PR - `); + `; } function twitterAnnouncement() { - return outdentString(chalk` - {bold.underline Announce on Twitter} - - Open {cyan.underline https://tweetdeck.twitter.com} - - Make sure you are tweeting from the {yellow @PrettierCode} account. + return outdent` + ${styleText.bold.underline("Announce on Twitter")} + - Open ${styleText.cyan.underline("https://tweetdeck.twitter.com")} + - Make sure you are tweeting from the ${styleText.yellow("@PrettierCode")} account. - Tweet about the release, including the blog post URL. - `); + `; } -export default async function postPublishSteps() { - const steps = [await checkSchema(), twitterAnnouncement()].filter(Boolean); +export default async function postPublishSteps({ dry, next }) { + console.log(styleText.bold.green("The script has finished!\n")); - console.log(chalk.bold.green("The script has finished!\n")); - - if (steps.length === 0) { + if (dry || next) { return; } + const steps = [await checkSchema(), twitterAnnouncement()].filter(Boolean); + console.log( - outdentString(chalk` - {yellow.bold The following ${ - steps.length === 1 ? "step is" : "steps are" - } optional.} + outdent` + ${styleText.yellow.bold( + `The following ${ + steps.length === 1 ? "step is" : "steps are" + } optional.`, + )} ${steps.join("\n\n")} - `) + `, ); } diff --git a/scripts/release/steps/publish-to-npm.js b/scripts/release/steps/publish-to-npm.js index 775c0e4392c2..ec6c4ca2320b 100644 --- a/scripts/release/steps/publish-to-npm.js +++ b/scripts/release/steps/publish-to-npm.js @@ -1,19 +1,35 @@ -import { execa } from "execa"; import enquirer from "enquirer"; -import { logPromise } from "../utils.js"; +import spawn from "nano-spawn"; +import { waitForEnter } from "../utils.js"; + +export default async function publishToNpm({ dry }) { + console.log(`Ready to publish to NPM${dry ? "(--dry-run)" : ""}`); + + await waitForEnter(); + + const commonArgs = ["publish"]; + if (dry) { + commonArgs.push("--dry-run"); + } -/** - * Retry "npm publish" when to enter OTP is failed. - */ -async function retryNpmPublish() { const runNpmPublish = async () => { - const { otp } = await enquirer.prompt({ - type: "input", - name: "otp", - message: "Please enter your npm OTP", - }); - await execa("npm", ["publish", "--otp", otp], { cwd: "./dist" }); + const args = [...commonArgs]; + + if (!dry) { + const { otp } = await enquirer.prompt({ + type: "input", + name: "otp", + message: "Please enter your npm OTP", + }); + args.push("--otp", otp); + } + + await spawn("npm", args, { cwd: "./dist/prettier" }); }; + + /** + * Retry "npm publish" when to enter OTP is failed. + */ for (let i = 5; i > 0; i--) { try { return await runNpmPublish(); @@ -26,11 +42,3 @@ async function retryNpmPublish() { } } } - -export default async function publishToNpm({ dry }) { - if (dry) { - return; - } - - await logPromise("Publishing to npm", retryNpmPublish()); -} diff --git a/scripts/release/steps/push-to-git.js b/scripts/release/steps/push-to-git.js index 9fd548d3cbc6..7304c56ac271 100644 --- a/scripts/release/steps/push-to-git.js +++ b/scripts/release/steps/push-to-git.js @@ -1,16 +1,8 @@ -import { runGit, logPromise } from "../utils.js"; +import { runGit } from "../utils.js"; -async function pushGit({ version, repo }) { +export default async function pushToGit({ version, repo }) { await runGit(["commit", "-am", `Release ${version}`]); await runGit(["tag", "-a", version, "-m", `Release ${version}`]); await runGit(["push", "--repo", repo]); await runGit(["push", "--tags", "--repo", repo]); } - -export default function pushToGit(params) { - if (params.dry) { - return; - } - - return logPromise("Committing and pushing to remote", pushGit(params)); -} diff --git a/scripts/release/steps/run-tests.js b/scripts/release/steps/run-tests.js deleted file mode 100644 index 268a104bf069..000000000000 --- a/scripts/release/steps/run-tests.js +++ /dev/null @@ -1,7 +0,0 @@ -import { runYarn, logPromise } from "../utils.js"; - -export default async function runTests() { - await logPromise("Running linter", runYarn("lint:eslint")); - await logPromise("Running Prettier on docs", runYarn("lint:prettier")); - await logPromise("Running tests", runYarn("test")); -} diff --git a/scripts/release/steps/show-instructions-after-npm-publish.js b/scripts/release/steps/show-instructions-after-npm-publish.js index 5a015ca5fc0a..428e8bd23eab 100644 --- a/scripts/release/steps/show-instructions-after-npm-publish.js +++ b/scripts/release/steps/show-instructions-after-npm-publish.js @@ -1,4 +1,4 @@ -import chalk from "chalk"; +import styleText from "node-style-text"; import outdent from "outdent"; import semver from "semver"; import { @@ -7,8 +7,7 @@ import { waitForEnter, } from "../utils.js"; -const outdentString = outdent.string; - +const RELEASE_URL_BASE = "https://github.com/prettier/prettier/releases/new?"; export function getReleaseUrl(version, previousVersion) { const semverDiff = semver.diff(version, previousVersion); const isPatch = semverDiff === "patch"; @@ -26,33 +25,39 @@ export function getReleaseUrl(version, previousVersion) { body: `🔗 [Release note](https://prettier.io/${blogPostInfo.path})`, }); } - body = encodeURIComponent(body); - return `https://github.com/prettier/prettier/releases/new?tag=${version}&title=${version}&body=${body}`; + const parameters = new URLSearchParams({ + tag: version, + title: version, + body, + }); + return `${RELEASE_URL_BASE}${parameters}`; } export default async function showInstructionsAfterNpmPublish({ version, previousVersion, + next, }) { - const releaseUrl = getReleaseUrl(version, previousVersion); + if (next) { + console.log(`${styleText.green.bold(`Prettier ${version} published!`)}`); + await waitForEnter(); + return; + } + const releaseUrl = getReleaseUrl(version, previousVersion); console.log( - outdentString(chalk` - {green.bold Prettier ${version} published!} - - {yellow.bold Some manual steps are necessary.} + outdent` + ${styleText.green.bold(`Prettier ${version} published!`)} - {bold.underline Create a GitHub Release} - - Go to {cyan.underline ${releaseUrl}} - - Press {bgGreen.black Publish release } + ${styleText.yellow.bold("Some manual steps are necessary.")} - {bold.underline Test the new release} - - In a new session, run {yellow npm i prettier@latest} in another directory - - Test the API and CLI + ${styleText.bold.underline("Create a GitHub Release")} + - Go to ${styleText.cyan.underline(releaseUrl)} + - Press ${styleText.bgGreen.black("Publish release")} After that, we can proceed to bump this repo's Prettier dependency. - Press ENTER to continue. - `) + `, ); + await waitForEnter(); } diff --git a/scripts/release/steps/update-changelog.js b/scripts/release/steps/update-changelog.js index c49de6760719..2c391755d10a 100644 --- a/scripts/release/steps/update-changelog.js +++ b/scripts/release/steps/update-changelog.js @@ -1,18 +1,15 @@ import fs from "node:fs"; -import { execa } from "execa"; -import chalk from "chalk"; -import outdent from "outdent"; +import spawn from "nano-spawn"; +import styleText from "node-style-text"; import semver from "semver"; import { - waitForEnter, - runYarn, - logPromise, getBlogPostInfo, getChangelogContent, + logPromise, + runYarn, + waitForEnter, } from "../utils.js"; -const outdentString = outdent.string; - function writeChangelog(params) { const changelog = fs.readFileSync("CHANGELOG.md", "utf8"); const newEntry = `# ${params.version}\n\n` + getChangelogContent(params); @@ -20,8 +17,8 @@ function writeChangelog(params) { } async function getChangelogForPatch({ version, previousVersion }) { - const { stdout: changelog } = await execa("node", [ - "scripts/changelog-for-patch.mjs", + const { stdout: changelog } = await spawn(process.execPath, [ + "scripts/changelog-for-patch.js", "--prev-version", previousVersion, "--new-version", @@ -30,7 +27,16 @@ async function getChangelogForPatch({ version, previousVersion }) { return changelog; } -export default async function updateChangelog({ version, previousVersion }) { +export default async function updateChangelog({ + dry, + version, + previousVersion, + next, +}) { + if (dry || next) { + return; + } + const semverDiff = semver.diff(version, previousVersion); if (semverDiff !== "patch") { @@ -45,11 +51,11 @@ export default async function updateChangelog({ version, previousVersion }) { return; } console.warn( - outdentString(chalk` - {yellow warning} The file {bold ${blogPost.file}} doesn't exist, but it will be referenced in {bold CHANGELOG.md}. Make sure to create it later. - - Press ENTER to continue. - `) + `${styleText.yellow("warning")} The file ${styleText.bold( + blogPost.file, + )} doesn't exist, but it will be referenced in ${styleText.bold( + "CHANGELOG.md", + )}. Make sure to create it later.`, ); } else { const body = await getChangelogForPatch({ @@ -61,12 +67,11 @@ export default async function updateChangelog({ version, previousVersion }) { previousVersion, body, }); - console.log("Press ENTER to continue."); } await waitForEnter(); await logPromise( "Re-running Prettier on docs", - runYarn(["lint:prettier", "--write"]) + runYarn(["lint:prettier", "--write"]), ); } diff --git a/scripts/release/steps/update-dependents-count.js b/scripts/release/steps/update-dependents-count.js index 1d402ed151ad..318ae8efe3b8 100644 --- a/scripts/release/steps/update-dependents-count.js +++ b/scripts/release/steps/update-dependents-count.js @@ -1,62 +1,62 @@ -import chalk from "chalk"; -import { runGit, fetchText, logPromise, processFile } from "../utils.js"; +import styleText from "node-style-text"; +import { fetchText, logPromise, processFile, runGit } from "../utils.js"; -async function update() { +async function update({ repo }) { const npmPage = await logPromise( "Fetching npm dependents count", - fetchText("https://www.npmjs.com/package/prettier") + fetchText("https://www.npmjs.com/package/prettier"), ); const dependentsCountNpm = Number( - npmPage.match(/"dependentsCount":(\d+),/)[1] + npmPage.match(/"dependentsCount":(\d+),/u)[1], ); if (Number.isNaN(dependentsCountNpm)) { throw new TypeError( - "Invalid data from https://www.npmjs.com/package/prettier" + "Invalid data from https://www.npmjs.com/package/prettier", ); } const githubPage = await logPromise( "Fetching github dependents count", - fetchText("https://github.com/prettier/prettier/network/dependents") + fetchText("https://github.com/prettier/prettier/network/dependents"), ); const dependentsCountGithub = Number( githubPage - .replace(/\n/g, "") + .replaceAll("\n", "") .match( - /.*?<\/svg>\s*([\d,]+)\s*Repositories\s*<\/a>/ + /.*?<\/svg>\s*([\d,]+)\s*Repositories\s*<\/a>/u, )[1] - .replace(/,/g, "") + .replaceAll(",", ""), ); if (Number.isNaN(dependentsCountNpm)) { throw new TypeError( - "Invalid data from https://github.com/prettier/prettier/network/dependents" + "Invalid data from https://github.com/prettier/prettier/network/dependents", ); } - processFile("website/pages/en/index.js", (content) => + processFile("website/src/pages/index.jsx", (content) => content .replace( - /()(.*?)(<\/strong>)/, - `$1${formatNumber(dependentsCountNpm)}$3` + /()(.*?)(<\/strong>)/u, + `$1${formatNumber(dependentsCountNpm)}$3`, ) .replace( - /()(.*?)(<\/strong>)/, - `$1${formatNumber(dependentsCountGithub)}$3` - ) + /()(.*?)(<\/strong>)/u, + `$1${formatNumber(dependentsCountGithub)}$3`, + ), ); const isUpdated = await logPromise( "Checking if dependents count has been updated", async () => (await runGit(["diff", "--name-only"])).stdout === - "website/pages/en/index.js" + "website/src/pages/index.jsx", ); if (isUpdated) { await logPromise("Committing and pushing to remote", async () => { await runGit(["add", "."]); await runGit(["commit", "-m", "Update dependents count"]); - await runGit(["push"]); + await runGit(["push", "--repo", repo]); }); } } @@ -71,10 +71,14 @@ function formatNumber(value) { return Math.floor(value / 1e5) / 10 + " million"; } -export default async function updateDependentsCount() { +export default async function updateDependentsCount({ dry, next, repo }) { + if (dry || next) { + return; + } + try { - await update(); + await update({ repo }); } catch (error) { - console.log(chalk.red.bold(error.message)); + console.log(styleText.red.bold(error.message)); } } diff --git a/scripts/release/steps/update-version.js b/scripts/release/steps/update-version.js index 56ab17054afd..210631e117f1 100644 --- a/scripts/release/steps/update-version.js +++ b/scripts/release/steps/update-version.js @@ -1,40 +1,27 @@ -import { - runYarn, - logPromise, - readJson, - writeJson, - processFile, -} from "../utils.js"; +import { processFile, readJson, runYarn, writeJson } from "../utils.js"; -async function bump({ version }) { +export default async function updateVersion({ version, next }) { const pkg = await readJson("package.json"); pkg.version = version; await writeJson("package.json", pkg); + // For pre-release, just update package.json + if (next) { + return; + } + // Update github issue templates processFile(".github/ISSUE_TEMPLATE/formatting.md", (content) => - content.replace(/^(\*\*Prettier ).*?(\*\*)$/m, `$1${version}$2`) + content.replace(/^(\*\*Prettier ).*?(\*\*)$/mu, `$1${version}$2`), ); processFile(".github/ISSUE_TEMPLATE/integration.md", (content) => - content.replace(/^(- Prettier Version: ).*$/m, `$1${version}`) - ); - processFile("docs/install.md", (content) => - content.replace(/^(npx prettier@)\S+/m, `$1${version}`) + content.replace(/^(- Prettier Version: ).*$/mu, `$1${version}`), ); - // Update unpkg link in docs - processFile("docs/browser.md", (content) => - content.replace( - /(\/\/unpkg\.com\/(?:browse\/)?prettier@).*?\//g, - `$1${version}/` - ) - ); + await runYarn(["install"], { cwd: "./website" }); + process.env.PRETTIER_VERSION = version; await runYarn(["update-stable-docs"], { cwd: "./website", }); } - -export default async function updateVersion(params) { - await logPromise("Bumping version", bump(params)); -} diff --git a/scripts/release/steps/validate-new-version.js b/scripts/release/steps/validate-new-version.js index 09ed33051fbc..980b948e6eee 100644 --- a/scripts/release/steps/validate-new-version.js +++ b/scripts/release/steps/validate-new-version.js @@ -1,14 +1,28 @@ -import chalk from "chalk"; +import styleText from "node-style-text"; import semver from "semver"; -export default function validateNewVersion({ version, previousVersion }) { +export default function validateNewVersion({ version, previousVersion, next }) { + if (!version) { + throw new Error("'--version' is required"); + } + if (!semver.valid(version)) { - throw new Error("Invalid version specified"); + throw new Error( + `Invalid version '${styleText.red.underline(version)}' specified`, + ); } if (!semver.gt(version, previousVersion)) { throw new Error( - `Version ${chalk.yellow(version)} has already been published` + `Version '${styleText.yellow.underline(version)}' has already been published`, + ); + } + + if (next && semver.prerelease(version) === null) { + throw new Error( + `Version '${styleText.yellow.underline( + version, + )}' is not a prerelease version`, ); } } diff --git a/scripts/release/steps/wait-for-bot-release.js b/scripts/release/steps/wait-for-bot-release.js index dfcbd64bd74e..18a63b81dd72 100644 --- a/scripts/release/steps/wait-for-bot-release.js +++ b/scripts/release/steps/wait-for-bot-release.js @@ -1,9 +1,6 @@ -import chalk from "chalk"; +import styleText from "node-style-text"; import outdent from "outdent"; -import fetch from "node-fetch"; -import { waitForEnter, logPromise } from "../utils.js"; - -const outdentString = outdent.string; +import { logPromise, waitForEnter } from "../utils.js"; export async function isVersionReleased(version) { const response = await fetch("https://registry.npmjs.org/prettier/"); @@ -24,49 +21,57 @@ async function checkBotPermission() { return maintainers.some(({ name }) => name === "prettier-bot"); } -checkBotPermission(); - const sleep = () => new Promise((resolve) => { setTimeout(resolve, 30_000); }); -export default async function waitForBotRelease({ dry, version }) { +export default async function waitForBotRelease({ dry, version, next }) { if (dry) { return; } if (!(await checkBotPermission())) { console.log( - outdentString(chalk/* indent */ ` - 1. Go to {green.underline https://www.npmjs.com/package/prettier/access} - 2. Add "{yellow prettier-bot}" as prettier package maintainer. - - Press ENTER to continue. - `) + outdent` + 1. Go to ${styleText.green.underline( + "https://www.npmjs.com/package/prettier/access", + )} + 2. Add "${styleText.yellow("prettier-bot")}" as prettier package maintainer. + `, ); await waitForEnter(); } console.log( - outdentString(chalk/* indent */ ` - 1. Go to {green.underline https://www.npmjs.com/package/prettier/access} - 2. Make sure "{yellow Publishing access}" section is set to "{yellow Require two-factor authentication or automation tokens}". - - Press ENTER to continue. - `) + outdent` + 1. Go to ${styleText.green.underline( + "https://www.npmjs.com/package/prettier/access", + )} + 2. Make sure "${styleText.yellow( + "Publishing access", + )}" section is set to "${styleText.yellow( + "Require two-factor authentication or an automation or granular access token", + )}". + `, ); await waitForEnter(); console.log( - outdentString(chalk/* indent */ ` - 1. Go to {green.underline https://github.com/prettier/release-workflow/actions/workflows/release.yml} - 2. Click "{green Run workflow}" button, type "{yellow.underline ${version}}" in "Version to release", uncheck all checkboxes, hit the "{bgGreen Run workflow}" button. - - Press ENTER to continue. - `) + outdent` + 1. Go to ${styleText.green.underline( + "https://github.com/prettier/release-workflow/actions/workflows/release.yml", + )} + 2. Click "${styleText.green( + "Run workflow", + )}" button, type "${styleText.yellow.underline( + version, + )}" in "Version to release", ${ + next ? 'check only "Unstable version"' : "uncheck all checkboxes" + }, hit the "${styleText.bgGreen("Run workflow")}" button. + `, ); await waitForEnter(); @@ -76,7 +81,7 @@ export default async function waitForBotRelease({ dry, version }) { try { released = await logPromise( "Checking release status", - isVersionReleased(version) + isVersionReleased(version), ); } catch { // No op diff --git a/scripts/release/tests/publish-to-npm.test.js b/scripts/release/tests/publish-to-npm.test.js new file mode 100644 index 000000000000..6f03106ce0f6 --- /dev/null +++ b/scripts/release/tests/publish-to-npm.test.js @@ -0,0 +1,66 @@ +import assert from "node:assert/strict"; +import { describe, it } from "node:test"; +import { URLSearchParams } from "node:url"; +import { getReleaseUrl } from "../steps/show-instructions-after-npm-publish.js"; + +const RELEASE_URL_BASE = "https://github.com/prettier/prettier/releases/new?"; +const getExpectedReleaseUrl = (parameters) => { + parameters = new URLSearchParams(parameters); + return `${RELEASE_URL_BASE}${parameters}`; +}; + +const getDateParts = () => [ + new Date().getFullYear(), + String(new Date().getMonth() + 1).padStart(2, "0"), + String(new Date().getDate()).padStart(2, "0"), +]; + +describe("publish-to-npm", () => { + describe("getReleaseUrl", () => { + it("returns URL for patch releasing", () => { + const result = getReleaseUrl("2.3.1", "2.3.0"); + assert.equal( + result, + getExpectedReleaseUrl({ + tag: "2.3.1", + title: "2.3.1", + body: "🔗 [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#231)", + }), + ); + }); + + it("returns URL for minor releasing", () => { + const result = getReleaseUrl("2.4.0", "2.3.0"); + assert.equal( + result, + getExpectedReleaseUrl({ + tag: "2.4.0", + title: "2.4.0", + body: [ + "[diff](https://github.com/prettier/prettier/compare/2.3.0...2.4.0)", + `🔗 [Release note](https://prettier.io/blog/${getDateParts().join( + "/", + )}/2.4.0)`, + ].join("\n\n"), + }), + ); + }); + + it("returns URL for major releasing", () => { + const result = getReleaseUrl("2.3.0", "2.2.0"); + assert.equal( + result, + getExpectedReleaseUrl({ + tag: "2.3.0", + title: "2.3.0", + body: [ + "[diff](https://github.com/prettier/prettier/compare/2.2.0...2.3.0)", + `🔗 [Release note](https://prettier.io/blog/${getDateParts().join( + "/", + )}/2.3.0)`, + ].join("\n\n"), + }), + ); + }); + }); +}); diff --git a/scripts/release/tests/validate-new-version.test.js b/scripts/release/tests/validate-new-version.test.js new file mode 100644 index 000000000000..a7e0926fb12b --- /dev/null +++ b/scripts/release/tests/validate-new-version.test.js @@ -0,0 +1,37 @@ +import assert from "node:assert/strict"; +import { describe, it } from "node:test"; +import styleText from "node-style-text"; +import validateNewVersion from "../steps/validate-new-version.js"; + +describe("validate-new-version", () => { + it("throws error for missing version", () => { + assert.throws( + () => { + validateNewVersion({}); + }, + { message: "'--version' is required" }, + ); + }); + it("throws error for invalid semver", () => { + assert.throws( + () => { + validateNewVersion({ version: "foo" }); + }, + { + message: `Invalid version '${styleText.red.underline("foo")}' specified`, + }, + ); + }); + it("throws error when version isn't greater than prev version", () => { + assert.throws( + () => { + validateNewVersion({ version: "0.0.1", previousVersion: "0.0.2" }); + }, + { + message: `Version '${styleText.yellow.underline( + "0.0.1", + )}' has already been published`, + }, + ); + }); +}); diff --git a/scripts/release/tests/version-check.test.js b/scripts/release/tests/version-check.test.js new file mode 100644 index 000000000000..d5f7e23cf1fd --- /dev/null +++ b/scripts/release/tests/version-check.test.js @@ -0,0 +1,14 @@ +import assert from "node:assert/strict"; +import { describe, it } from "node:test"; +import { isVersionReleased } from "../steps/wait-for-bot-release.js"; + +describe("isVersionReleased", () => { + it("returns true for existing version", async () => { + assert.ok(await isVersionReleased("1.0.0")); + }); + it("rejects for non-existing version", async () => { + await assert.rejects(() => isVersionReleased("999.0.0"), { + message: "prettier@999.0.0 doesn't exit.", + }); + }); +}); diff --git a/scripts/release/utils.js b/scripts/release/utils.js index d3bc41f7962e..dcd25de954c8 100644 --- a/scripts/release/utils.js +++ b/scripts/release/utils.js @@ -1,40 +1,57 @@ import fs from "node:fs"; +import path from "node:path"; import readline from "node:readline"; -import chalk from "chalk"; -import { execa } from "execa"; -import stringWidth from "string-width"; -import fetch from "node-fetch"; +import url from "node:url"; +import spawn from "nano-spawn"; +import styleText from "node-style-text"; import outdent from "outdent"; import getFormattedDate from "./get-formatted-date.js"; readline.emitKeypressEvents(process.stdin); -const OK = chalk.bgGreen.black(" DONE "); -const FAIL = chalk.bgRed.black(" FAIL "); +const statusConfig = [ + { color: "bgGreen", text: "DONE" }, + { color: "bgRed", text: "FAIL" }, + { color: "bgGray", text: "SKIPPED" }, +]; +const maxLength = Math.max(...statusConfig.map(({ text }) => text.length)) + 2; +const padStatusText = (text) => { + while (text.length < maxLength) { + text = text.length % 2 ? `${text} ` : ` ${text}`; + } + return text; +}; +const status = {}; +for (const { color, text } of statusConfig) { + status[text] = styleText[color].black(padStatusText(text)); +} -function fitTerminal(input) { - const columns = Math.min(process.stdout.columns, 80); - const WIDTH = columns - stringWidth(OK) + 1; +function fitTerminal(input, suffix = "") { + const columns = Math.min(process.stdout.columns || 40, 80); + const WIDTH = columns - maxLength + 1; if (input.length < WIDTH) { - input += chalk.dim(".").repeat(WIDTH - input.length - 1); + const repeatCount = Math.max(WIDTH - input.length - 1 - suffix.length, 0); + input += styleText.dim(".").repeat(repeatCount) + suffix; } return input; } -async function logPromise(name, promiseOrAsyncFunction) { - const promise = - typeof promiseOrAsyncFunction === "function" - ? promiseOrAsyncFunction() - : promiseOrAsyncFunction; - +async function logPromise(name, promiseOrAsyncFunction, shouldSkip = false) { process.stdout.write(fitTerminal(name)); + if (shouldSkip) { + process.stdout.write(`${status.SKIPPED}\n`); + return; + } + try { - const result = await promise; - process.stdout.write(`${OK}\n`); + const result = await (typeof promiseOrAsyncFunction === "function" + ? promiseOrAsyncFunction() + : promiseOrAsyncFunction); + process.stdout.write(`${status.DONE}\n`); return result; } catch (error) { - process.stdout.write(`${FAIL}\n`); + process.stdout.write(`${status.FAIL}\n`); throw error; } } @@ -43,7 +60,7 @@ async function runYarn(args, options) { args = Array.isArray(args) ? args : [args]; try { - return await execa("yarn", ["--silent", ...args], options); + return await spawn("yarn", [...args], options); } catch (error) { throw new Error(`\`yarn ${args.join(" ")}\` failed\n${error.stdout}`); } @@ -51,10 +68,13 @@ async function runYarn(args, options) { function runGit(args, options) { args = Array.isArray(args) ? args : [args]; - return execa("git", args, options); + return spawn("git", args, options); } function waitForEnter() { + console.log(); + console.log(styleText.gray("Press ENTER to continue.")); + process.stdin.setRawMode(true); return new Promise((resolve, reject) => { @@ -78,8 +98,20 @@ function readJson(filename) { return JSON.parse(fs.readFileSync(filename)); } -function writeJson(filename, content) { - fs.writeFileSync(filename, JSON.stringify(content, null, 2) + "\n"); +function writeJson(file, content) { + writeFile(file, JSON.stringify(content, null, 2) + "\n"); +} + +const toPath = (urlOrPath) => + urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath; +function writeFile(file, content) { + try { + fs.mkdirSync(path.dirname(toPath(file)), { recursive: true }); + } catch { + // noop + } + + fs.writeFileSync(file, content); } function processFile(filename, fn) { @@ -97,7 +129,7 @@ function getBlogPostInfo(version) { return { file: `website/blog/${year}-${month}-${day}-${version}.md`, - path: `blog/${year}/${month}/${day}/${version}.html`, + path: `blog/${year}/${month}/${day}/${version}`, }; } @@ -110,14 +142,15 @@ function getChangelogContent({ version, previousVersion, body }) { } export { - runYarn, - runGit, fetchText, + getBlogPostInfo, + getChangelogContent, logPromise, processFile, readJson, - writeJson, + runGit, + runYarn, waitForEnter, - getBlogPostInfo, - getChangelogContent, + writeFile, + writeJson, }; diff --git a/scripts/release/yarn.lock b/scripts/release/yarn.lock index c498b199a5e2..cf335966e348 100644 --- a/scripts/release/yarn.lock +++ b/scripts/release/yarn.lock @@ -1,2657 +1,237 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz" - integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== - dependencies: - "@babel/highlight" "^7.14.5" - -"@babel/compat-data@^7.15.0": - version "7.15.0" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz" - integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== - -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.15.5" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz" - integrity sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.15.4" - "@babel/helper-compilation-targets" "^7.15.4" - "@babel/helper-module-transforms" "^7.15.4" - "@babel/helpers" "^7.15.4" - "@babel/parser" "^7.15.5" - "@babel/template" "^7.15.4" - "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/generator@^7.15.4", "@babel/generator@^7.7.2": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz" - integrity sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw== - dependencies: - "@babel/types" "^7.15.4" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/helper-compilation-targets@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz" - integrity sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ== - dependencies: - "@babel/compat-data" "^7.15.0" - "@babel/helper-validator-option" "^7.14.5" - browserslist "^4.16.6" - semver "^6.3.0" - -"@babel/helper-function-name@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz" - integrity sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw== - dependencies: - "@babel/helper-get-function-arity" "^7.15.4" - "@babel/template" "^7.15.4" - "@babel/types" "^7.15.4" - -"@babel/helper-get-function-arity@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz" - integrity sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-hoist-variables@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz" - integrity sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-member-expression-to-functions@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz" - integrity sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-module-imports@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz" - integrity sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-module-transforms@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz" - integrity sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw== - dependencies: - "@babel/helper-module-imports" "^7.15.4" - "@babel/helper-replace-supers" "^7.15.4" - "@babel/helper-simple-access" "^7.15.4" - "@babel/helper-split-export-declaration" "^7.15.4" - "@babel/helper-validator-identifier" "^7.14.9" - "@babel/template" "^7.15.4" - "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" - -"@babel/helper-optimise-call-expression@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz" - integrity sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz" - integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== - -"@babel/helper-replace-supers@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz" - integrity sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.15.4" - "@babel/helper-optimise-call-expression" "^7.15.4" - "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" - -"@babel/helper-simple-access@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz" - integrity sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-split-export-declaration@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz" - integrity sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw== - dependencies: - "@babel/types" "^7.15.4" - -"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": - version "7.14.9" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz" - integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== - -"@babel/helper-validator-option@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz" - integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== - -"@babel/helpers@^7.15.4": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz" - integrity sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ== - dependencies: - "@babel/template" "^7.15.4" - "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" - -"@babel/highlight@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz" - integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== - dependencies: - "@babel/helper-validator-identifier" "^7.14.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5": - version "7.15.5" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.15.5.tgz" - integrity sha512-2hQstc6I7T6tQsWzlboMh3SgMRPaS4H6H7cPQsJkdzTzEGqQrpLDsE2BGASU5sBPoEQyHzeqU6C8uKbFeEk6sg== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz" - integrity sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/template@^7.15.4", "@babel/template@^7.3.3": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz" - integrity sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/parser" "^7.15.4" - "@babel/types" "^7.15.4" - -"@babel/traverse@^7.15.4", "@babel/traverse@^7.7.2": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz" - integrity sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.15.4" - "@babel/helper-function-name" "^7.15.4" - "@babel/helper-hoist-variables" "^7.15.4" - "@babel/helper-split-export-declaration" "^7.15.4" - "@babel/parser" "^7.15.4" - "@babel/types" "^7.15.4" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.15.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.15.4" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.15.4.tgz" - integrity sha512-0f1HJFuGmmbrKTCZtbm3cU+b/AqdEYk5toj5iQur58xkVMlS0JWaKxTBSmCXd47uiN7vbcozAupm6Mvs80GNhw== - dependencies: - "@babel/helper-validator-identifier" "^7.14.9" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" - slash "^3.0.0" - -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" - micromatch "^4.0.4" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== - dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== - dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" - "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" - -"@jest/globals@27.5.1", "@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" - -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" - -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.9" - source-map "^0.6.0" - -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== - dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== - dependencies: - "@jest/test-result" "^27.5.1" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" - -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^8.0.1": - version "8.0.1" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz" - integrity sha512-AU7kwFxreVd6OAXcAFlKSmZquiRUU0FvYm44k1Y1QbK7Co4m0aqfGMhjykIeQp/H6rcl+nFmj0zfdUcGVs9Dew== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.1.15" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.15.tgz" - integrity sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.3" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz" - integrity sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.1" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.14.2" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz" - integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== - dependencies: - "@babel/types" "^7.3.0" - -"@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz" - integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/node@*": - version "16.7.10" - resolved "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz" - integrity sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA== - -"@types/prettier@^2.1.5": - version "2.3.2" - resolved "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz" - integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/yargs-parser@*": - version "20.2.1" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz" - integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== - -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" - -abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz" - integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== - -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn@^7.1.1: - version "7.4.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -acorn@^8.2.4: - version "8.5.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz" - integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== - -agent-base@6: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.0, ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== - dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== - dependencies: - babel-plugin-jest-hoist "^27.5.1" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.1: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - -browserslist@^4.16.6: - version "4.17.0" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz" - integrity sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g== - dependencies: - caniuse-lite "^1.0.30001254" - colorette "^1.3.0" - electron-to-chromium "^1.3.830" - escalade "^3.1.1" - node-releases "^1.1.75" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -caniuse-lite@^1.0.30001254: - version "1.0.30001255" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz" - integrity sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ== - -chalk@4.1.2, chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -ci-info@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz" - integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colorette@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz" - integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - -data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== - -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1: - version "4.3.2" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - -decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= - -deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== - -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - -eastasianwidth@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" - integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - -electron-to-chromium@^1.3.830: - version "1.3.830" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.830.tgz" - integrity sha512-gBN7wNAxV5vl1430dG+XRcQhD4pIeYeak6p6rjdCtlz5wWNwDad8jwvphe5oi1chL5MV6RNRikfffBBiFuj+rQ== - -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -enquirer@2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -execa@6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz" - integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^3.0.1" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== - dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== - dependencies: - bser "2.1.1" - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.1.4" - resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.1.4.tgz" - integrity sha512-Eq5Xv5+VlSrYWEqKrusxY1C3Hm/hjeAsCGVG3ft7pZahlUAChpGZT/Ms1WmSLnEAisEXszjzu/s+ce6HZB2VHA== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0, get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.1.7" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -graceful-fs@^4.2.9: - version "4.2.9" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -human-signals@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz" - integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-core-module@^2.2.0: - version "2.6.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz" - integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== - dependencies: - has "^1.0.3" - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz" - integrity sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz" - integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz" - integrity sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== - dependencies: - "@jest/types" "^27.5.1" - execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== - dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - prompts "^2.0.1" - yargs "^16.2.0" - -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== - dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^27.5.1" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== - dependencies: - detect-newline "^3.0.0" - -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== - dependencies: - "@jest/types" "^27.5.1" - chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" - -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== - dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== - dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^27.5.1" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== - dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" - -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== - dependencies: - "@jest/types" "^27.5.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.5.1" - graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" - natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" - -jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== - dependencies: - "@jest/types" "^27.5.1" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.5.1" - leven "^3.1.0" - pretty-format "^27.5.1" - -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== - dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - jest-util "^27.5.1" - string-length "^4.0.1" - -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== - dependencies: - "@jest/core" "^27.5.1" - import-local "^3.0.2" - jest-cli "^27.5.1" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json5@^2.1.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash@^4.7.0: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= - dependencies: - tmpl "1.0.x" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -micromatch@^4.0.4: - version "4.0.4" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== - dependencies: - braces "^3.0.1" - picomatch "^2.2.3" - -mime-db@1.49.0: - version "1.49.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz" - integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== - -mime-types@^2.1.12: - version "2.1.32" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz" - integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== - dependencies: - mime-db "1.49.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - -minimatch@^3.0.4: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@3.2.10: - version "3.2.10" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.10.tgz#e8347f94b54ae18b57c9c049ef641cef398a85c8" - integrity sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - -node-releases@^1.1.75: - version "1.1.75" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz" - integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -outdent@0.8.0: - version "0.8.0" - resolved "https://registry.npmjs.org/outdent/-/outdent-0.8.0.tgz" - integrity sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A== - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - -path-parse@^1.0.6: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -picomatch@^2.0.4, picomatch@^2.2.3: - version "2.3.0" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -pirates@^4.0.4: - version "4.0.4" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz" - integrity sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" - -prompts@^2.0.1: - version "2.4.1" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz" - integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -psl@^1.1.33: - version "1.8.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.20.0: - version "1.20.0" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - -semver@7.3.7, semver@^7.3.2: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map-support@^0.5.6: - version "0.5.19" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.5.0: - version "0.5.7" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -stack-utils@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz" - integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== - dependencies: - escape-string-regexp "^2.0.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-width@5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== - -tmpl@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -v8-to-istanbul@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz" - integrity sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= - dependencies: - makeerror "1.0.x" - -web-streams-polyfill@^3.0.3: - version "3.1.1" - resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.1.1.tgz" - integrity sha512-Czi3fG883e96T4DLEPRvufrF2ydhOOW1+1a6c3gNjH2aIh50DNFBdfwh2AKoOf1rXvpvavAoA11Qdq9+BKjE0Q== - -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -ws@^7.4.6: - version "7.5.4" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz" - integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg== - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10/6ab2a9b8a1d67b067922c36f259e3b3dfd6b97b219c540877a4944549a4d49ea5ceba5663905ab5289682f1f3c15ff441d02f0447f620a42e1cb5e1937174d4b + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10/012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10/40033e33e96e97d77fba5a238e4bba4487b8284678906a9f616b5579ddaf868a18874c0054a75402c9fbaaa033a25ceae093af58c9c30278e35c23c9479e79b0 + languageName: node + linkType: hard + +"ansi-colors@npm:^4.1.1": + version: 4.1.3 + resolution: "ansi-colors@npm:4.1.3" + checksum: 10/43d6e2fc7b1c6e4dc373de708ee76311ec2e0433e7e8bd3194e7ff123ea6a747428fc61afdcf5969da5be3a5f0fd054602bec56fc0ebe249ce2fcde6e649e3c2 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"enquirer@npm:2.4.1": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: "npm:^4.1.1" + strip-ansi: "npm:^6.0.1" + checksum: 10/b3726486cd98f0d458a851a03326a2a5dd4d84f37ff94ff2a2960c915e0fc865865da3b78f0877dc36ac5c1189069eca603e82ec63d5bc6b0dd9985bf6426d7a + languageName: node + linkType: hard + +"fast-glob@npm:3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.8" + checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.17.1 + resolution: "fastq@npm:1.17.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10/a443180068b527dd7b3a63dc7f2a47ceca2f3e97b9c00a1efe5538757e6cc4056a3526df94308075d7727561baf09ebaa5b67da8dcbddb913a021c5ae69d1f69 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/6bf2a01672e7965eb9941d1f02044fad2bd12486b5553dc1116ff24c09a8723157601dc992e74c911d896175918448762df3b3fd0a6b61037dd1a9766ddfbf58 + languageName: node + linkType: hard + +"nano-spawn@npm:1.0.2": + version: 1.0.2 + resolution: "nano-spawn@npm:1.0.2" + checksum: 10/6ce9e60846d2e37c0e3cd048472683c81dbcaadef9ebe73bfc8754ee7da2a574f724436d3dcdeda5d807aedc857cc8cbc278a9882529164b5ef4b170b95cfe0b + languageName: node + linkType: hard + +"node-style-text@npm:0.0.8": + version: 0.0.8 + resolution: "node-style-text@npm:0.0.8" + checksum: 10/c716b208f99ff2dcb52432f5cd0406e8f6df006bb927dd522c56406b53a64799dc155e29724fecec38c855dc62a2297b1e2530f57681c6504d7c4e5075e1478e + languageName: node + linkType: hard + +"outdent@npm:0.8.0": + version: 0.8.0 + resolution: "outdent@npm:0.8.0" + checksum: 10/a556c5c308705ad4e3441be435f2b2cf014cb5f9753a24cbd080eadc473b988c77d0d529a6a9a57c3931fb4178e5a81d668cc4bc49892b668191a5d0ba3df76e + languageName: node + linkType: hard + +"picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10/72900df0616e473e824202113c3df6abae59150dfb73ed13273503127235320e9c8ca4aaaaccfd58cf417c6ca92a6e68ee9a5c3182886ae949a768639b388a7b + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.0.4 + resolution: "reusify@npm:1.0.4" + checksum: 10/14222c9e1d3f9ae01480c50d96057228a8524706db79cdeb5a2ce5bb7070dd9f409a6f84a02cbef8cdc80d39aef86f2dd03d155188a1300c599b05437dcd2ffb + languageName: node + linkType: hard + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + enquirer: "npm:2.4.1" + fast-glob: "npm:3.3.3" + nano-spawn: "npm:1.0.2" + node-style-text: "npm:0.0.8" + outdent: "npm:0.8.0" + semver: "npm:7.7.2" + languageName: unknown + linkType: soft + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10/cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + languageName: node + linkType: hard + +"semver@npm:7.7.2": + version: 7.7.2 + resolution: "semver@npm:7.7.2" + bin: + semver: bin/semver.js + checksum: 10/7a24cffcaa13f53c09ce55e05efe25cd41328730b2308678624f8b9f5fc3093fc4d189f47950f0b811ff8f3c3039c24a2c36717ba7961615c682045bf03e1dda + languageName: node + linkType: hard + +"strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard diff --git a/scripts/sync-flow-tests.cjs b/scripts/sync-flow-tests.cjs new file mode 100644 index 000000000000..bd75abf8d0ca --- /dev/null +++ b/scripts/sync-flow-tests.cjs @@ -0,0 +1,128 @@ +"use strict"; + +const fs = require("fs"); +const path = require("path"); +const flowParser = require("flow-parser"); +const fastGlob = require("fast-glob"); + +const DEFAULT_SPEC_CONTENT = "runFormatTest(import.meta);\n"; +const SPEC_FILE_NAME = "format.test.js"; +const FLOW_TESTS_DIR = path.join(__dirname, "../tests/format/flow-repo"); + +function tryParse(file, content) { + // Keep this sync with `/src/language-js/parse/flow.js` + const ast = flowParser.parse(content, { + comments: false, + enums: true, + esproposal_decorators: true, + esproposal_export_star_as: true, + }); + + if (ast.errors.length > 0) { + const { line, column } = ast.errors[0].loc.start; + const { message } = ast.errors[0]; + return `${file}:${line}:${column}: ${message}`; + } + + return null; +} + +function syncTests(syncDir) { + const specFiles = fastGlob.sync( + path.join(FLOW_TESTS_DIR, "**", SPEC_FILE_NAME), + ); + const filesToCopy = fastGlob.sync(path.join(syncDir, "**/*.js")); + + if (filesToCopy.length === 0) { + throw new Error( + [ + "Couldn't find any files to copy.", + `Please make sure that \`${syncDir}\` exists and contains the flow tests.`, + ].join("\n"), + ); + } + + const specContents = specFiles.reduce((obj, specFile) => { + obj[specFile] = fs.readFileSync(specFile, "utf8"); + return obj; + }, {}); + + const skipped = []; + + fs.rmSync(FLOW_TESTS_DIR); + + for (const file of filesToCopy) { + const content = fs.readFileSync(file, "utf8"); + const parseError = tryParse(file, content); + + if (parseError) { + skipped.push(parseError); + continue; + } + + const newFile = path.join(FLOW_TESTS_DIR, path.relative(syncDir, file)); + const dirname = path.dirname(newFile); + const specFile = path.join(dirname, SPEC_FILE_NAME); + const specContent = specContents[specFile] || DEFAULT_SPEC_CONTENT; + + fs.mkdirSync(dirname, { recursive: true }); + fs.writeFileSync(newFile, content); + fs.writeFileSync(specFile, specContent); + } + + return skipped; +} + +function run(argv) { + if (argv.length !== 1) { + console.error( + [ + "You must provide the path to a flow tests directory to sync from!", + "Example: node scripts/sync-flow-tests.cjs ../flow/tests/", + ].join("\n"), + ); + return 1; + } + + const syncDir = argv[0]; + let skipped = []; + + try { + skipped = syncTests(syncDir); + } catch (error) { + console.error(`Failed to sync.\n${error}`); + return 1; + } + + if (skipped.length > 0) { + console.log( + [ + "Some files were skipped due to syntax errors.", + "This is expected since flow tests for handling invalid code,", + "but that's not interesting for Prettier's tests.", + "This is the skipped stuff:", + "", + ...skipped, + "", + ].join("\n"), + ); + } + + console.log( + [ + "Done syncing! Now you need to:", + "", + `1. Optional: Adjust some ${SPEC_FILE_NAME} files.`, + "2. Run `jest -u` to create snapshots.", + "3. Run `git diff` to check how tests and snapshots have changed", + "4. Take a look at new snapshots to see if they're OK.", + ].join("\n"), + ); + + return 0; +} + +if (require.main === module) { + const exitCode = run(process.argv.slice(2)); + process.exit(exitCode); +} diff --git a/scripts/sync-flow-tests.js b/scripts/sync-flow-tests.js deleted file mode 100644 index 57fc2b9f09ca..000000000000 --- a/scripts/sync-flow-tests.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const flowParser = require("flow-parser"); -const fastGlob = require("fast-glob"); -const rimraf = require("rimraf"); - -const DEFAULT_SPEC_CONTENT = "run_spec(__dirname);\n"; -const SPEC_FILE_NAME = "jsfmt.spec.js"; -const FLOW_TESTS_DIR = path.join(__dirname, "..", "tests", "flow-repo"); - -function tryParse(file, content) { - // Keep this sync with `/src/language-js/parse/flow.js` - const ast = flowParser.parse(content, { - comments: false, - enums: true, - esproposal_decorators: true, - esproposal_export_star_as: true, - }); - - if (ast.errors.length > 0) { - const { line, column } = ast.errors[0].loc.start; - const { message } = ast.errors[0]; - return `${file}:${line}:${column}: ${message}`; - } - - return null; -} - -function syncTests(syncDir) { - const specFiles = fastGlob.sync( - path.join(FLOW_TESTS_DIR, "**", SPEC_FILE_NAME) - ); - const filesToCopy = fastGlob.sync(path.join(syncDir, "**/*.js")); - - if (filesToCopy.length === 0) { - throw new Error( - [ - "Couldn't find any files to copy.", - `Please make sure that \`${syncDir}\` exists and contains the flow tests.`, - ].join("\n") - ); - } - - const specContents = specFiles.reduce((obj, specFile) => { - obj[specFile] = fs.readFileSync(specFile, "utf8"); - return obj; - }, {}); - - const skipped = []; - - rimraf.sync(FLOW_TESTS_DIR); - - for (const file of filesToCopy) { - const content = fs.readFileSync(file, "utf8"); - const parseError = tryParse(file, content); - - if (parseError) { - skipped.push(parseError); - continue; - } - - const newFile = path.join(FLOW_TESTS_DIR, path.relative(syncDir, file)); - const dirname = path.dirname(newFile); - const specFile = path.join(dirname, SPEC_FILE_NAME); - const specContent = specContents[specFile] || DEFAULT_SPEC_CONTENT; - - fs.mkdirSync(dirname, { recursive: true }); - fs.writeFileSync(newFile, content); - fs.writeFileSync(specFile, specContent); - } - - return skipped; -} - -function run(argv) { - if (argv.length !== 1) { - console.error( - [ - "You must provide the path to a flow tests directory to sync from!", - "Example: node scripts/sync-flow-tests.js ../flow/tests/", - ].join("\n") - ); - return 1; - } - - const syncDir = argv[0]; - let skipped = []; - - try { - skipped = syncTests(syncDir); - } catch (error) { - console.error(`Failed to sync.\n${error}`); - return 1; - } - - if (skipped.length > 0) { - console.log( - [ - "Some files were skipped due to syntax errors.", - "This is expected since flow tests for handling invalid code,", - "but that's not interesting for Prettier's tests.", - "This is the skipped stuff:", - "", - ...skipped, - "", - ].join("\n") - ); - } - - console.log( - [ - "Done syncing! Now you need to:", - "", - `1. Optional: Adjust some ${SPEC_FILE_NAME} files.`, - "2. Run `jest -u` to create snapshots.", - "3. Run `git diff` to check how tests and snapshots have changed", - "4. Take a look at new snapshots to see if they're OK.", - ].join("\n") - ); - - return 0; -} - -if (require.main === module) { - const exitCode = run(process.argv.slice(2)); - process.exit(exitCode); -} diff --git a/scripts/tools/bundle-test/index.js b/scripts/tools/bundle-test/index.js index 2150dc876da4..02929e2f7449 100644 --- a/scripts/tools/bundle-test/index.js +++ b/scripts/tools/bundle-test/index.js @@ -1,9 +1,8 @@ -import { fileURLToPath } from "node:url"; -import path from "node:path"; -import fs from "node:fs/promises"; import { createRequire } from "node:module"; +import path from "node:path"; +import url from "node:url"; import webpack from "webpack"; -import { DIST_DIR } from "../../../scripts/utils/index.mjs"; +import packageConfigs from "../../build/config.js"; function runWebpack(config) { return new Promise((resolve, reject) => { @@ -26,42 +25,27 @@ function runWebpack(config) { }); } -const TEMPORARY_DIRECTORY = fileURLToPath(new URL("./.tmp", import.meta.url)); - -/* `require` in `parser-typescript.js`, #12338 */ -(async () => { - const esmFilesDirectory = path.join(DIST_DIR, "esm"); +const TEMPORARY_DIRECTORY = url.fileURLToPath( + new URL("./.tmp", import.meta.url), +); - const files = [ - (await fs.readdir(DIST_DIR)) - .filter( - (name) => - name.startsWith("parser-") || - name === "standalone.js" || - name === "doc.js" - ) - .map((name) => ({ - displayName: name, - name, - file: path.join(DIST_DIR, name), - })), - (await fs.readdir(esmFilesDirectory)).map((name) => ({ - displayName: `esm/${name}`, - name, - file: path.join(esmFilesDirectory, name), - })), - ].flat(); - - for (const { displayName, name, file } of files) { - console.log(`${displayName}: `); - const isEsmModule = name.endsWith(".mjs"); +for (const packageConfig of packageConfigs) { + const { distDirectory, files } = packageConfig; + /* `require` in `parser-typescript.js`, #12338 */ + for (const file of files) { + if (file.platform !== "universal") { + continue; + } + console.log(`${file.output.file}: `); const stats = await runWebpack({ mode: "production", - entry: file, + entry: path.join(distDirectory, file.output.file), output: { path: TEMPORARY_DIRECTORY, - filename: `${name}.[contenthash:7].${isEsmModule ? "mjs" : "cjs"}`, + filename: `${file.output.file}.[contenthash:7].${ + file.output.format === "esm" ? "mjs" : "cjs" + }`, }, performance: { hints: false }, optimization: { minimize: false }, @@ -79,18 +63,21 @@ const TEMPORARY_DIRECTORY = fileURLToPath(new URL("./.tmp", import.meta.url)); throw new Error("Unexpected assets."); } - if (!isEsmModule) { - const outputFile = assets[0].name; - const require = createRequire(import.meta.url); + const outputFileName = assets[0].name; + const outputFile = path.join(TEMPORARY_DIRECTORY, outputFileName); + const require = createRequire(import.meta.url); - try { - require(path.join(TEMPORARY_DIRECTORY, assets[0].name)); - } catch (error) { - console.log(`'${outputFile}' is not functional.`); - throw error; + try { + if (file.output.format !== "esm") { + require(outputFile); + } else { + await import(url.pathToFileURL(outputFile)); } + } catch (error) { + console.log(`'${outputFileName}' is not functional.`); + throw error; } console.log(" Passed."); } -})(); +} diff --git a/scripts/tools/bundle-test/package.json b/scripts/tools/bundle-test/package.json index d93695134eea..115e92f8ba7f 100644 --- a/scripts/tools/bundle-test/package.json +++ b/scripts/tools/bundle-test/package.json @@ -1,12 +1,13 @@ { "name": "@prettier/bundle-test", "version": "0.0.0", - "private": "true", + "private": true, "type": "module", "devDependencies": { - "webpack": "5.76.0" + "webpack": "5.99.9" }, "scripts": { "test": "node ./index.js" - } + }, + "packageManager": "yarn@4.9.2" } diff --git a/scripts/tools/bundle-test/yarn.lock b/scripts/tools/bundle-test/yarn.lock index 94e741aa7b02..3c337632d616 100644 --- a/scripts/tools/bundle-test/yarn.lock +++ b/scripts/tools/bundle-test/yarn.lock @@ -1,524 +1,732 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@jridgewell/gen-mapping@^0.3.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@types/eslint-scope@^3.7.3": - version "3.7.3" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" - integrity sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.4.1" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.1.tgz#c48251553e8759db9e656de3efc846954ac32304" - integrity sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/json-schema@*", "@types/json-schema@^7.0.8": - version "7.0.10" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.10.tgz#9b05b7896166cd00e9cbd59864853abf65d9ac23" - integrity sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A== - -"@types/node@*": - version "17.0.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644" - integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ== - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn@^8.5.0, acorn@^8.7.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -browserslist@^4.14.5: - version "4.20.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88" - integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA== - dependencies: - caniuse-lite "^1.0.30001317" - electron-to-chromium "^1.4.84" - escalade "^3.1.1" - node-releases "^2.0.2" - picocolors "^1.0.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -caniuse-lite@^1.0.30001317: - version "1.0.30001317" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz#0548fb28fd5bc259a70b8c1ffdbe598037666a1b" - integrity sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ== - -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -electron-to-chromium@^1.4.84: - version "1.4.86" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.86.tgz#90fe4a9787f48d6522957213408e08a8126b2ebc" - integrity sha512-EVTZ+igi8x63pK4bPuA95PXIs2b2Cowi3WQwI9f9qManLiZJOD1Lash1J3W4TvvcUCcIR4o/rgi9o8UicXSO+w== - -enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -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== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -node-releases@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" - integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -terser-webpack-plugin@^5.1.3: - version "5.3.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54" - integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== - dependencies: - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.0" - source-map "^0.6.1" - terser "^5.7.2" - -terser@^5.7.2: - version "5.14.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" - integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack@5.76.0: - version "5.76.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.0.tgz#f9fb9fb8c4a7dbdcd0d56a98e56b8a942ee2692c" - integrity sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" - webpack-sources "^3.2.3" +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.8 + resolution: "@jridgewell/gen-mapping@npm:0.3.8" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/9d3a56ab3612ab9b85d38b2a93b87f3324f11c5130859957f6500e4ac8ce35f299d5ccc3ecd1ae87597601ecf83cee29e9afd04c18777c24011073992ff946df + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + checksum: 10/0a9aca9320dc9044014ba0ef989b3a8411b0d778895553e3b7ca2ac0a75a20af4a5ad3f202acfb1879fa40466036a4417e1d5b38305baed8b9c1ebe6e4b3e7f5 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@prettier/bundle-test@workspace:.": + version: 0.0.0-use.local + resolution: "@prettier/bundle-test@workspace:." + dependencies: + webpack: "npm:5.99.9" + languageName: unknown + linkType: soft + +"@types/eslint-scope@npm:^3.7.7": + version: 3.7.7 + resolution: "@types/eslint-scope@npm:3.7.7" + dependencies: + "@types/eslint": "npm:*" + "@types/estree": "npm:*" + checksum: 10/e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e + languageName: node + linkType: hard + +"@types/eslint@npm:*": + version: 9.6.1 + resolution: "@types/eslint@npm:9.6.1" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 10/719fcd255760168a43d0e306ef87548e1e15bffe361d5f4022b0f266575637acc0ecb85604ac97879ee8ae83c6a6d0613b0ed31d0209ddf22a0fe6d608fc56fe + languageName: node + linkType: hard + +"@types/estree@npm:*, @types/estree@npm:^1.0.6": + version: 1.0.7 + resolution: "@types/estree@npm:1.0.7" + checksum: 10/419c845ece767ad4b21171e6e5b63dabb2eb46b9c0d97361edcd9cabbf6a95fcadb91d89b5fa098d1336fa0b8fceaea82fca97a2ef3971f5c86e53031e157b21 + languageName: node + linkType: hard + +"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.9": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 22.15.29 + resolution: "@types/node@npm:22.15.29" + dependencies: + undici-types: "npm:~6.21.0" + checksum: 10/3426790c5aa22df445213d7f37e57ea261cf3013030fe9b3025d87c302097799a9db3b848e2a9bdb07cab8ec6c7e9947ac770cf11e12e420148296b63d63e7db + languageName: node + linkType: hard + +"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/ast@npm:1.14.1" + dependencies: + "@webassemblyjs/helper-numbers": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + checksum: 10/f83e6abe38057f5d87c1fb356513a371a8b43c9b87657f2790741a66b1ef8ecf958d1391bc42f27c5fb33f58ab8286a38ea849fdd21f433cd4df1307424bab45 + languageName: node + linkType: hard + +"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" + checksum: 10/e866ec8433f4a70baa511df5e8f2ebcd6c24f4e2cc6274c7c5aabe2bcce3459ea4680e0f35d450e1f3602acf3913b6b8e4f15069c8cfd34ae8609fb9a7d01795 + languageName: node + linkType: hard + +"@webassemblyjs/helper-api-error@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" + checksum: 10/48b5df7fd3095bb252f59a139fe2cbd999a62ac9b488123e9a0da3906ad8a2f2da7b2eb21d328c01a90da987380928706395c2897d1f3ed9e2125b6d75a920d0 + languageName: node + linkType: hard + +"@webassemblyjs/helper-buffer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" + checksum: 10/9690afeafa5e765a34620aa6216e9d40f9126d4e37e9726a2594bf60cab6b211ef20ab6670fd3c4449dd4a3497e69e49b2b725c8da0fb213208c7f45f15f5d5b + languageName: node + linkType: hard + +"@webassemblyjs/helper-numbers@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" + dependencies: + "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@xtuc/long": "npm:4.2.2" + checksum: 10/e4c7d0b09811e1cda8eec644a022b560b28f4e974f50195375ccd007df5ee48a922a6dcff5ac40b6a8ec850d56d0ea6419318eee49fec7819ede14e90417a6a4 + languageName: node + linkType: hard + +"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" + checksum: 10/3edd191fff7296df1ef3b023bdbe6cb5ea668f6386fd197ccfce46015c6f2a8cc9763cfb86503a0b94973ad27996645afff2252ee39a236513833259a47af6ed + languageName: node + linkType: hard + +"@webassemblyjs/helper-wasm-section@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + checksum: 10/6b73874f906532512371181d7088460f767966f26309e836060c5a8e4e4bfe6d523fb5f4c034b34aa22ebb1192815f95f0e264298769485c1f0980fdd63ae0ce + languageName: node + linkType: hard + +"@webassemblyjs/ieee754@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/ieee754@npm:1.13.2" + dependencies: + "@xtuc/ieee754": "npm:^1.2.0" + checksum: 10/d7e3520baa37a7309fa7db4d73d69fb869878853b1ebd4b168821bd03fcc4c0e1669c06231315b0039035d9a7a462e53de3ad982da4a426a4b0743b5888e8673 + languageName: node + linkType: hard + +"@webassemblyjs/leb128@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/leb128@npm:1.13.2" + dependencies: + "@xtuc/long": "npm:4.2.2" + checksum: 10/3a10542c86807061ec3230bac8ee732289c852b6bceb4b88ebd521a12fbcecec7c432848284b298154f28619e2746efbed19d6904aef06c49ef20a0b85f650cf + languageName: node + linkType: hard + +"@webassemblyjs/utf8@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/utf8@npm:1.13.2" + checksum: 10/27885e5d19f339501feb210867d69613f281eda695ac508f04d69fa3398133d05b6870969c0242b054dc05420ed1cc49a64dea4fe0588c18d211cddb0117cc54 + languageName: node + linkType: hard + +"@webassemblyjs/wasm-edit@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/helper-wasm-section": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-opt": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + "@webassemblyjs/wast-printer": "npm:1.14.1" + checksum: 10/c62c50eadcf80876713f8c9f24106b18cf208160ab842fcb92060fd78c37bf37e7fcf0b7cbf1afc05d230277c2ce0f3f728432082c472dd1293e184a95f9dbdd + languageName: node + linkType: hard + +"@webassemblyjs/wasm-gen@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/6085166b0987d3031355fe17a4f9ef0f412e08098d95454059aced2bd72a4c3df2bc099fa4d32d640551fc3eca1ac1a997b44432e46dc9d84642688e42c17ed4 + languageName: node + linkType: hard + +"@webassemblyjs/wasm-opt@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + checksum: 10/fa5d1ef8d2156e7390927f938f513b7fb4440dd6804b3d6c8622b7b1cf25a3abf1a5809f615896d4918e04b27b52bc3cbcf18faf2d563cb563ae0a9204a492db + languageName: node + linkType: hard + +"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/07d9805fda88a893c984ed93d5a772d20d671e9731358ab61c6c1af8e0e58d1c42fc230c18974dfddebc9d2dd7775d514ba4d445e70080b16478b4b16c39c7d9 + languageName: node + linkType: hard + +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@xtuc/long": "npm:4.2.2" + checksum: 10/cef09aad2fcd291bfcf9efdae2ea1e961a1ba0f925d1d9dcdd8c746d32fbaf431b6d26a0241699c0e39f82139018aa720b4ceb84ac6f4c78f13072747480db69 + languageName: node + linkType: hard + +"@xtuc/ieee754@npm:^1.2.0": + version: 1.2.0 + resolution: "@xtuc/ieee754@npm:1.2.0" + checksum: 10/ab033b032927d77e2f9fa67accdf31b1ca7440974c21c9cfabc8349e10ca2817646171c4f23be98d0e31896d6c2c3462a074fe37752e523abc3e45c79254259c + languageName: node + linkType: hard + +"@xtuc/long@npm:4.2.2": + version: 4.2.2 + resolution: "@xtuc/long@npm:4.2.2" + checksum: 10/7217bae9fe240e0d804969e7b2af11cb04ec608837c78b56ca88831991b287e232a0b7fce8d548beaff42aaf0197ffa471d81be6ac4c4e53b0148025a2c076ec + languageName: node + linkType: hard + +"acorn@npm:^8.14.0": + version: 8.14.1 + resolution: "acorn@npm:8.14.1" + bin: + acorn: bin/acorn + checksum: 10/d1379bbee224e8d44c3c3946e6ba6973e999fbdd4e22e41c3455d7f9b6f72f7ce18d3dc218002e1e48eea789539cf1cb6d1430c81838c6744799c712fb557d92 + languageName: node + linkType: hard + +"ajv-formats@npm:^2.1.1": + version: 2.1.1 + resolution: "ajv-formats@npm:2.1.1" + dependencies: + ajv: "npm:^8.0.0" + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 10/70c263ded219bf277ffd9127f793b625f10a46113b2e901e150da41931fcfd7f5592da6d66862f4449bb157ffe65867c3294a7df1d661cc232c4163d5a1718ed + languageName: node + linkType: hard + +"ajv-keywords@npm:^5.1.0": + version: 5.1.0 + resolution: "ajv-keywords@npm:5.1.0" + dependencies: + fast-deep-equal: "npm:^3.1.3" + peerDependencies: + ajv: ^8.8.2 + checksum: 10/5021f96ab7ddd03a4005326bd06f45f448ebfbb0fe7018b1b70b6c28142fa68372bda2057359814b83fd0b2d4c8726c297f0a7557b15377be7b56ce5344533d8 + languageName: node + linkType: hard + +"ajv@npm:^8.0.0, ajv@npm:^8.9.0": + version: 8.17.1 + resolution: "ajv@npm:8.17.1" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^3.0.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + checksum: 10/ee3c62162c953e91986c838f004132b6a253d700f1e51253b99791e2dbfdb39161bc950ebdc2f156f8568035bb5ed8be7bd78289cd9ecbf3381fe8f5b82e3f33 + languageName: node + linkType: hard + +"browserslist@npm:^4.24.0": + version: 4.25.0 + resolution: "browserslist@npm:4.25.0" + dependencies: + caniuse-lite: "npm:^1.0.30001718" + electron-to-chromium: "npm:^1.5.160" + node-releases: "npm:^2.0.19" + update-browserslist-db: "npm:^1.1.3" + bin: + browserslist: cli.js + checksum: 10/4a5442b1a0d09c4c64454f184b8fed17d8c3e202034bf39de28f74497d7bd28dddee121b2bab4e34825fe0ed4c166d84e32a39f576c76fce73c1f8f05e4b6ee6 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001718": + version: 1.0.30001720 + resolution: "caniuse-lite@npm:1.0.30001720" + checksum: 10/6557c5052fa17fd531f3e1a8013b5924fb69afcd53d9f3e3b9adc9e31c5a7e436b674c000c53659e097fe1fda1c290d1bd17c7f3f98d13749644386ed722ab5f + languageName: node + linkType: hard + +"chrome-trace-event@npm:^1.0.2": + version: 1.0.4 + resolution: "chrome-trace-event@npm:1.0.4" + checksum: 10/1762bed739774903bf5915fe3045c3120fc3c7f7d929d88e566447ea38944937a6370ccb687278318c43c24f837ad22dac780bed67c066336815557b8cf558c6 + languageName: node + linkType: hard + +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.5.160": + version: 1.5.162 + resolution: "electron-to-chromium@npm:1.5.162" + checksum: 10/a89a615f7cdc3a2ab3f451616998a5655c04392ec68517d28ca0f6a63a461b6504580ea005d1bd1b2278073bf58882246d0b7af3f6c4d5b21bc6d6a0c633e34c + languageName: node + linkType: hard + +"enhanced-resolve@npm:^5.17.1": + version: 5.18.1 + resolution: "enhanced-resolve@npm:5.18.1" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/50e81c7fe2239fba5670ebce78a34709906ed3a79274aa416434f7307b252e0b7824d76a7dd403eca795571dc6afd9a44183fc45a68475e8f2fdfbae6e92fcc3 + languageName: node + linkType: hard + +"es-module-lexer@npm:^1.2.1": + version: 1.7.0 + resolution: "es-module-lexer@npm:1.7.0" + checksum: 10/b6f3e576a3fed4d82b0d0ad4bbf6b3a5ad694d2e7ce8c4a069560da3db6399381eaba703616a182b16dde50ce998af64e07dcf49f2ae48153b9e07be3f107087 + languageName: node + linkType: hard + +"escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10/9d7169e3965b2f9ae46971afa392f6e5a25545ea30f2e2dd99c9b0a95a3f52b5653681a84f5b2911a413ddad2d7a93d3514165072f349b5ffc59c75a899970d6 + languageName: node + linkType: hard + +"eslint-scope@npm:5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^4.1.1" + checksum: 10/c541ef384c92eb5c999b7d3443d80195fcafb3da335500946f6db76539b87d5826c8f2e1d23bf6afc3154ba8cd7c8e566f8dc00f1eea25fdf3afc8fb9c87b238 + languageName: node + linkType: hard + +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" + dependencies: + estraverse: "npm:^5.2.0" + checksum: 10/44ffcd89e714ea6b30143e7f119b104fc4d75e77ee913f34d59076b40ef2d21967f84e019f84e1fd0465b42cdbf725db449f232b5e47f29df29ed76194db8e16 + languageName: node + linkType: hard + +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb + languageName: node + linkType: hard + +"estraverse@npm:^5.2.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e + languageName: node + linkType: hard + +"events@npm:^3.2.0": + version: 3.3.0 + resolution: "events@npm:3.3.0" + checksum: 10/a3d47e285e28d324d7180f1e493961a2bbb4cad6412090e4dec114f4db1f5b560c7696ee8e758f55e23913ede856e3689cd3aa9ae13c56b5d8314cd3b3ddd1be + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-uri@npm:^3.0.1": + version: 3.0.6 + resolution: "fast-uri@npm:3.0.6" + checksum: 10/43c87cd03926b072a241590e49eca0e2dfe1d347ddffd4b15307613b42b8eacce00a315cf3c7374736b5f343f27e27ec88726260eb03a758336d507d6fbaba0a + languageName: node + linkType: hard + +"glob-to-regexp@npm:^0.4.1": + version: 0.4.1 + resolution: "glob-to-regexp@npm:0.4.1" + checksum: 10/9009529195a955c40d7b9690794aeff5ba665cc38f1519e111c58bb54366fd0c106bde80acf97ba4e533208eb53422c83b136611a54c5fefb1edd8dc267cb62e + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"jest-worker@npm:^27.4.5": + version: 27.5.1 + resolution: "jest-worker@npm:27.5.1" + dependencies: + "@types/node": "npm:*" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/06c6e2a84591d9ede704d5022fc13791e8876e83397c89d481b0063332abbb64c0f01ef4ca7de520b35c7a1058556078d6bdc3631376f4e9ffb42316c1a8488e + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^2.3.1": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 10/5f3a99009ed5f2a5a67d06e2f298cc97bc86d462034173308156f15b43a6e850be8511dc204b9b94566305da2947f7d90289657237d210351a39059ff9d666cf + languageName: node + linkType: hard + +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 10/02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad + languageName: node + linkType: hard + +"loader-runner@npm:^4.2.0": + version: 4.3.0 + resolution: "loader-runner@npm:4.3.0" + checksum: 10/555ae002869c1e8942a0efd29a99b50a0ce6c3296efea95caf48f00d7f6f7f659203ed6613688b6181aa81dc76de3e65ece43094c6dffef3127fe1a84d973cd3 + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 10/6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 10/54bb60bf39e6f8689f6622784e668a3d7f8bed6b0d886f5c3c446cb3284be28b30bf707ed05d0fe44a036f8469976b2629bbea182684977b084de9da274694d7 + languageName: node + linkType: hard + +"mime-types@npm:^2.1.27": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 10/89aa9651b67644035de2784a6e665fc685d79aba61857e02b9c8758da874a754aed4a9aced9265f5ed1171fd934331e5516b84a7f0218031b6fa0270eca1e51a + languageName: node + linkType: hard + +"neo-async@npm:^2.6.2": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: 10/1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002 + languageName: node + linkType: hard + +"node-releases@npm:^2.0.19": + version: 2.0.19 + resolution: "node-releases@npm:2.0.19" + checksum: 10/c2b33b4f0c40445aee56141f13ca692fa6805db88510e5bbb3baadb2da13e1293b738e638e15e4a8eb668bb9e97debb08e7a35409b477b5cc18f171d35a83045 + languageName: node + linkType: hard + +"picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10/e1cf46bf84886c79055fdfa9dcb3e4711ad259949e3565154b004b260cd356c5d54b31a1437ce9782624bf766272fe6b0154f5f0c744fb7af5d454d2b60db045 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: 10/839a3a890102a658f4cb3e7b2aa13a1f80a3a976b512020c3d1efc418491c48a886b6e481ea56afc6c4cb5eef678f23b2a4e70575e7534eccadf5e30ed2e56eb + languageName: node + linkType: hard + +"safe-buffer@npm:^5.1.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"schema-utils@npm:^4.3.0, schema-utils@npm:^4.3.2": + version: 4.3.2 + resolution: "schema-utils@npm:4.3.2" + dependencies: + "@types/json-schema": "npm:^7.0.9" + ajv: "npm:^8.9.0" + ajv-formats: "npm:^2.1.1" + ajv-keywords: "npm:^5.1.0" + checksum: 10/02c32c34aae762d48468f98465a96a167fede637772871c7c7d8923671ddb9f20b2cc6f6e8448ae6bef5363e3597493c655212c8b06a4ee73aa099d9452fbd8b + languageName: node + linkType: hard + +"serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/445a420a6fa2eaee4b70cbd884d538e259ab278200a2ededd73253ada17d5d48e91fb1f4cd224a236ab62ea7ba0a70c6af29fc93b4f3d3078bf7da1c031fde58 + languageName: node + linkType: hard + +"source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"tapable@npm:^2.1.1, tapable@npm:^2.2.0": + version: 2.2.2 + resolution: "tapable@npm:2.2.2" + checksum: 10/065a0dc44aba1b32020faa1c27c719e8f76e5345347515d8494bf158524f36e9f22ad9eaa5b5494f9d5d67bf0640afdd5698505948c46d720b6b7e69d19349a6 + languageName: node + linkType: hard + +"terser-webpack-plugin@npm:^5.3.11": + version: 5.3.14 + resolution: "terser-webpack-plugin@npm:5.3.14" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.25" + jest-worker: "npm:^27.4.5" + schema-utils: "npm:^4.3.0" + serialize-javascript: "npm:^6.0.2" + terser: "npm:^5.31.1" + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: 10/5b7290f7edb179b83cefb8827c12371ddddc088cf251cf58a1c738d82628331ae6604273b61fe991d77411d4bb6b7178c3826aa47edf01b4ee21f973d6c8b8fb + languageName: node + linkType: hard + +"terser@npm:^5.31.1": + version: 5.40.0 + resolution: "terser@npm:5.40.0" + dependencies: + "@jridgewell/source-map": "npm:^0.3.3" + acorn: "npm:^8.14.0" + commander: "npm:^2.20.0" + source-map-support: "npm:~0.5.20" + bin: + terser: bin/terser + checksum: 10/686ff65c1f379fedd38d688c7d9b21af590191c61934d2181645a12a539bc738ecabd99ab7219320d93dcc0f42a0b02924b34cce2cc718f88091f18c0d871e8c + languageName: node + linkType: hard + +"undici-types@npm:~6.21.0": + version: 6.21.0 + resolution: "undici-types@npm:6.21.0" + checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.1.3": + version: 1.1.3 + resolution: "update-browserslist-db@npm:1.1.3" + dependencies: + escalade: "npm:^3.2.0" + picocolors: "npm:^1.1.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/87af2776054ffb9194cf95e0201547d041f72ee44ce54b144da110e65ea7ca01379367407ba21de5c9edd52c74d95395366790de67f3eb4cc4afa0fe4424e76f + languageName: node + linkType: hard + +"watchpack@npm:^2.4.1": + version: 2.4.4 + resolution: "watchpack@npm:2.4.4" + dependencies: + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.1.2" + checksum: 10/cfa3473fc12a1a1b88123056941e90c462a67aedc10b242229eeeccdd45ed0b763c3b591caaffb0f7d77295b539b5518bb1ad3bcd891ae6505dfeae4cf51fd15 + languageName: node + linkType: hard + +"webpack-sources@npm:^3.2.3": + version: 3.3.2 + resolution: "webpack-sources@npm:3.3.2" + checksum: 10/c3e7f8c387cacad619e80e75c1dfc74bd458a6c744f9fee53220da317d13acb4d8cd56c85666039edb7085761d482c35795a94f2c97d192950c08d054e758714 + languageName: node + linkType: hard + +"webpack@npm:5.99.9": + version: 5.99.9 + resolution: "webpack@npm:5.99.9" + dependencies: + "@types/eslint-scope": "npm:^3.7.7" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" + "@webassemblyjs/ast": "npm:^1.14.1" + "@webassemblyjs/wasm-edit": "npm:^1.14.1" + "@webassemblyjs/wasm-parser": "npm:^1.14.1" + acorn: "npm:^8.14.0" + browserslist: "npm:^4.24.0" + chrome-trace-event: "npm:^1.0.2" + enhanced-resolve: "npm:^5.17.1" + es-module-lexer: "npm:^1.2.1" + eslint-scope: "npm:5.1.1" + events: "npm:^3.2.0" + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.2.11" + json-parse-even-better-errors: "npm:^2.3.1" + loader-runner: "npm:^4.2.0" + mime-types: "npm:^2.1.27" + neo-async: "npm:^2.6.2" + schema-utils: "npm:^4.3.2" + tapable: "npm:^2.1.1" + terser-webpack-plugin: "npm:^5.3.11" + watchpack: "npm:^2.4.1" + webpack-sources: "npm:^3.2.3" + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 10/cf4a217239bcaa892f93702639ac837a16510edb7a1326955fb042d499d297cbdb16f20a81f3be6ec041b22ab47c599c757e505fdee1dd89b7f7a1ce4337fbf3 + languageName: node + linkType: hard diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/await-cli-tests.js b/scripts/tools/eslint-plugin-prettier-internal-rules/await-cli-tests.js index b066f1a07fad..1e4f1d965e0f 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/await-cli-tests.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/await-cli-tests.js @@ -1,24 +1,18 @@ -"use strict"; - const selector = [ "CallExpression", '[callee.type="Identifier"]', - '[callee.name="runPrettier"]', + '[callee.name="runCli"]', ].join(""); const MESSAGE_ID_CALL = "await-cli-tests/call"; const MESSAGE_ID_GETTER = "await-cli-tests/getter"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/await-cli-tests.js", - }, messages: { - [MESSAGE_ID_CALL]: - "'runPrettier()' should be awaited or calling `.test()`.", - [MESSAGE_ID_GETTER]: "'runPrettier().{{property}}' should be awaited.", + [MESSAGE_ID_CALL]: "'runCli()' should be awaited or calling `.test()`.", + [MESSAGE_ID_GETTER]: "'runCli().{{property}}' should be awaited.", }, }, create(context) { @@ -32,6 +26,18 @@ module.exports = { return; } + // wrapped + // `const runCliWithoutGitignore = () => runCli()` + // `const runCliWithoutGitignore = () => { return runCli() }` + if ( + (parent.type === "ArrowFunctionExpression" && + parent.body === callExpression) || + (parent.type === "ReturnStatement" && + parent.argument === callExpression) + ) { + return; + } + if ( parent.type === "MemberExpression" && parent.object === callExpression && diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/better-parent-property-check-in-needs-parens.js b/scripts/tools/eslint-plugin-prettier-internal-rules/better-parent-property-check-in-needs-parens.js index f39069033d2b..327101525271 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/better-parent-property-check-in-needs-parens.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/better-parent-property-check-in-needs-parens.js @@ -1,6 +1,4 @@ -"use strict"; - -const path = require("path"); +import path from "node:path"; const parentPropertyCheckSelector = [ "FunctionDeclaration", @@ -29,32 +27,28 @@ const parentPropertyCheckSelector = [ ")", ].join(""); -const nameCheckSelector = [ +const keyCheckSelector = [ "LogicalExpression", '[right.type="BinaryExpression"]', '[right.left.type="Identifier"]', - '[right.left.name="name"]', + '[right.left.name="key"]', ":not(", '[left.type="BinaryExpression"]', '[left.left.type="Identifier"]', - '[left.left.name="name"]', + '[left.left.name="key"]', ")", ].join(""); -const MESSAGE_ID_PREFER_NAME_CHECK = "prefer-name-check"; -const MESSAGE_ID_NAME_CHECK_FIRST = "name-check-on-left"; +const MESSAGE_ID_PREFER_KEY_CHECK = "prefer-key-check"; +const MESSAGE_ID_KEY_CHECK_FIRST = "key-check-on-left"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/better-parent-property-check-in-needs-parens.js", - }, messages: { - [MESSAGE_ID_PREFER_NAME_CHECK]: - "Prefer `name {{operator}} {{propertyText}}` over `parent.{{property}} {{operator}} node`.", - [MESSAGE_ID_NAME_CHECK_FIRST]: - "`name` comparison should be on left side.", + [MESSAGE_ID_PREFER_KEY_CHECK]: + "Prefer `key {{operator}} {{propertyText}}` over `parent.{{property}} {{operator}} node`.", + [MESSAGE_ID_KEY_CHECK_FIRST]: "`key` comparison should be on left side.", }, fixable: "code", }, @@ -68,7 +62,7 @@ module.exports = { [parentPropertyCheckSelector](node) { const { operator, left, right } = node; const { property } = [left, right].find( - ({ type }) => type === "MemberExpression" + ({ type }) => type === "MemberExpression", ); const propertyText = property.type === "Identifier" @@ -77,20 +71,20 @@ module.exports = { context.report({ node, - messageId: MESSAGE_ID_PREFER_NAME_CHECK, + messageId: MESSAGE_ID_PREFER_KEY_CHECK, data: { property: sourceCode.getText(property), propertyText, operator, }, fix: (fixer) => - fixer.replaceText(node, `name ${operator} ${propertyText}`), + fixer.replaceText(node, `key ${operator} ${propertyText}`), }); }, - [nameCheckSelector](node) { + [keyCheckSelector](node) { context.report({ node, - messageId: MESSAGE_ID_NAME_CHECK_FIRST, + messageId: MESSAGE_ID_KEY_CHECK_FIRST, }); }, }; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/consistent-negative-index-access.js b/scripts/tools/eslint-plugin-prettier-internal-rules/consistent-negative-index-access.js deleted file mode 100644 index 50f30494145d..000000000000 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/consistent-negative-index-access.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; - -const selector = [ - "MemberExpression", - "[computed=true]", - "[optional=false]", - '[property.type="BinaryExpression"]', - '[property.operator="-"]', - '[property.left.type="MemberExpression"]', - "[property.left.optional=false]", - "[property.left.computed=false]", - '[property.left.property.type="Identifier"]', - '[property.left.property.name="length"]', - '[property.right.type="Literal"]', - `:not(${[ - "AssignmentExpression > .left", - "UpdateExpression > .argument", - // Ignore `getPenultimate` and `getLast` function self - 'VariableDeclarator[id.name="getPenultimate"] > ArrowFunctionExpression.init *', - 'VariableDeclarator[id.name="getLast"] > ArrowFunctionExpression.init *', - ].join(", ")})`, -].join(""); - -const messageId = "consistent-negative-index-access"; - -module.exports = { - meta: { - type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/consistent-negative-index-access.js", - }, - messages: { - [messageId]: "Prefer `{{method}}(…)` over `…[….length - {{index}}]`.", - }, - fixable: "code", - }, - create(context) { - const sourceCode = context.getSourceCode(); - - return { - [selector](node) { - const { value: index } = node.property.right; - - if (index !== 1 && index !== 2) { - return; - } - - const { object } = node; - const lengthObject = node.property.left.object; - - const objectText = sourceCode.getText(object); - // Simply use text to compare object - if (sourceCode.getText(lengthObject) !== objectText) { - return; - } - - const method = ["getLast", "getPenultimate"][index - 1]; - - context.report({ - node, - messageId, - data: { - index, - method, - }, - fix: (fixer) => fixer.replaceText(node, `${method}(${objectText})`), - }); - }, - }; - }, -}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/directly-loc-start-end.js b/scripts/tools/eslint-plugin-prettier-internal-rules/directly-loc-start-end.js index 024cbc131014..0dc5ed2ce071 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/directly-loc-start-end.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/directly-loc-start-end.js @@ -1,5 +1,3 @@ -"use strict"; - const selector = [ "MemberExpression", "[computed=false]", @@ -9,12 +7,9 @@ const selector = [ const MESSAGE_ID = "directly-loc-start-end"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/directly-loc-start-end.js", - }, messages: { [MESSAGE_ID]: "Please import `{{function}}` function and use it directly.", diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/flat-ast-path-call.js b/scripts/tools/eslint-plugin-prettier-internal-rules/flat-ast-path-call.js index 135274818013..9e87c555a1ee 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/flat-ast-path-call.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/flat-ast-path-call.js @@ -1,5 +1,3 @@ -"use strict"; - // This rule only work for nested `AstPath#call()` for now function astPathCallSelector(path) { @@ -29,12 +27,9 @@ const selector = [ const MESSAGE_ID = "flat-ast-path-call"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/flat-ast-path-call.js", - }, messages: { [MESSAGE_ID]: "Do not use nested `AstPath#{{method}}(…)`.", }, @@ -83,7 +78,7 @@ module.exports = { // ^ innerCallback.range[0], ], - "" + "", ); // path.call((childPath) => childPath.call(print, "b"), "a") @@ -96,17 +91,17 @@ module.exports = { let innerNamesText = sourceCode.text.slice( innerNamesStart, - innerNamesEnd + innerNamesEnd, ); yield fixer.replaceTextRange( [innerNamesStart, innerNamesEnd + 1], - "" + "", ); const [penultimateToken, lastToken] = sourceCode.getLastTokens( outerCall, - 2 + 2, ); // `outer` call has `trailing comma` diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/index.js b/scripts/tools/eslint-plugin-prettier-internal-rules/index.js index b58a79e9711c..89ebbe688830 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/index.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/index.js @@ -1,21 +1,40 @@ -"use strict"; - -module.exports = { - rules: { - "await-cli-tests": require("./await-cli-tests.js"), - "better-parent-property-check-in-needs-parens": require("./better-parent-property-check-in-needs-parens.js"), - "consistent-negative-index-access": require("./consistent-negative-index-access.js"), - "directly-loc-start-end": require("./directly-loc-start-end.js"), - "flat-ast-path-call": require("./flat-ast-path-call.js"), - "jsx-identifier-case": require("./jsx-identifier-case.js"), - "no-conflicting-comment-check-flags": require("./no-conflicting-comment-check-flags.js"), - "no-doc-builder-concat": require("./no-doc-builder-concat.js"), - "no-empty-flat-contents-for-if-break": require("./no-empty-flat-contents-for-if-break.js"), - "no-identifier-n": require("./no-identifier-n.js"), - "no-node-comments": require("./no-node-comments.js"), - "no-unnecessary-ast-path-call": require("./no-unnecessary-ast-path-call.js"), - "prefer-ast-path-each": require("./prefer-ast-path-each.js"), - "prefer-indent-if-break": require("./prefer-indent-if-break.js"), - "prefer-is-non-empty-array": require("./prefer-is-non-empty-array.js"), - }, +import fs from "node:fs/promises"; +import path from "node:path"; +import packageJson from "./package.json" with { type: "json" }; + +const rules = {}; + +for (const dirent of await fs.readdir(import.meta.dirname, { + withFileTypes: true, +})) { + const fileName = dirent.name; + + if ( + dirent.isDirectory() || + !fileName.endsWith(".js") || + fileName === "index.js" || + fileName === "test.js" + ) { + continue; + } + + const name = path.basename(fileName, ".js"); + const { default: rule } = await import( + new URL(fileName, import.meta.url).href + ); + + if (rule.meta?.docs?.url) { + throw new Error(`Please remove 'meta.docs.url' from '${fileName}'.`); + } + + rule.meta ??= {}; + rule.meta.docs ??= {}; + rule.meta.docs.url = `https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/${fileName}`; + + rules[name] = rule; +} + +export default { + meta: { name: packageJson.name, version: packageJson.version }, + rules, }; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/jsx-identifier-case.js b/scripts/tools/eslint-plugin-prettier-internal-rules/jsx-identifier-case.js index 392a5a329c63..8e293b961a64 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/jsx-identifier-case.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/jsx-identifier-case.js @@ -1,26 +1,25 @@ -"use strict"; - const MESSAGE_ID = "jsx-identifier-case"; // To ignore variables, config eslint like this // {'prettier-internal-rules/jsx-identifier-case': ['error', 'name1', ... 'nameN']} -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/jsx-identifier-case.js", - }, messages: { [MESSAGE_ID]: "Please rename '{{name}}' to '{{fixed}}'.", }, fixable: "code", + schema: { + type: "array", + uniqueItems: true, + }, }, create(context) { const ignored = new Set(context.options); return { "Identifier[name=/JSX/]:not(ObjectExpression > Property.properties > .key)"( - node + node, ) { const { name } = node; @@ -28,7 +27,7 @@ module.exports = { return; } - const fixed = name.replace(/JSX/g, "Jsx"); + const fixed = name.replaceAll("JSX", "Jsx"); context.report({ node, messageId: MESSAGE_ID, @@ -38,8 +37,4 @@ module.exports = { }, }; }, - schema: { - type: "array", - uniqueItems: true, - }, }; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/massage-ast-parameter-names.js b/scripts/tools/eslint-plugin-prettier-internal-rules/massage-ast-parameter-names.js new file mode 100644 index 000000000000..aa27cfd7e397 --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/massage-ast-parameter-names.js @@ -0,0 +1,60 @@ +const MESSAGE_ID = "massage-ast-parameter-names"; + +const massageAstFunctionSelector = [ + "FunctionDeclaration", + "[async!=true]", + "[generator!=true]", + '[id.type="Identifier"]', + '[id.name="clean"]', +].join(""); + +const getVariableIdentifiers = ({ identifiers, references }) => [ + ...new Set([ + ...identifiers, + ...references.map(({ identifier }) => identifier), + ]), +]; + +export default { + meta: { + type: "suggestion", + messages: { + [MESSAGE_ID]: + "The {{name}} node parameter '{{original}}' should be named '{{name}}'.", + }, + fixable: "code", + schema: { + type: "array", + uniqueItems: true, + }, + }, + create: (context) => + Object.fromEntries( + ["original", "cloned"].map((name, index) => [ + `${massageAstFunctionSelector} > Identifier[name!="${name}"].params:nth-child(${index + 1})`, + (parameter) => { + const variables = context.sourceCode.getDeclaredVariables( + parameter.parent, + ); + const variable = variables.find( + (variable) => variable.name === parameter.name, + ); + if (!variable) { + throw new Error("Unexpected error."); + } + + context.report({ + node: parameter, + messageId: MESSAGE_ID, + data: { original: parameter.name, name }, + // Good enough for our use case + // A prefect fix should be https://github.com/sindresorhus/eslint-plugin-unicorn/blob/702d51bed176a9c2c93bc4a2ca52e700dd0c2339/rules/fix/rename-variable.js#L5 + fix: (fixer) => + getVariableIdentifiers(variable).map((node) => + fixer.replaceText(node, name), + ), + }); + }, + ]), + ), +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-conflicting-comment-check-flags.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-conflicting-comment-check-flags.js index 5b91b5a468de..3975d5f6dc70 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-conflicting-comment-check-flags.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-conflicting-comment-check-flags.js @@ -1,4 +1,3 @@ -"use strict"; const MESSAGE_ID_UNIQUE = "unique"; const MESSAGE_ID_CONFLICTING = "conflicting"; @@ -37,12 +36,9 @@ const flatFlags = (node) => { return flags.map((node) => node.property.name); }; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-conflicting-comment-check-flags.js", - }, messages: { [MESSAGE_ID_UNIQUE]: "Do not use same flag multiple times.", [MESSAGE_ID_CONFLICTING]: "Do not use {{flags}} together.", diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-builder-concat.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-builder-concat.js deleted file mode 100644 index b62696b92ae9..000000000000 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-builder-concat.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -const selector = [ - "CallExpression", - ">", - "Identifier.callee", - '[name="concat"]', -].join(""); - -const messageId = "no-doc-builder-concat"; - -module.exports = { - meta: { - type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-builder-concat.js", - }, - messages: { - [messageId]: "Use array directly instead of `concat([])`", - }, - fixable: "code", - }, - create(context) { - return { - [selector](node) { - context.report({ - node, - messageId, - fix: (fixer) => fixer.replaceText(node, ""), - }); - }, - }; - }, -}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-public-import.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-public-import.js new file mode 100644 index 000000000000..53ca92d10d21 --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-doc-public-import.js @@ -0,0 +1,128 @@ +import path from "node:path"; + +const selector = [ + ":matches(ImportDeclaration, ExportNamedDeclaration, ImportExpression)", + " > ", + "Literal.source", +].join(""); + +const messageId = "no-doc-public-import"; +const docIndexFile = path.join( + import.meta.dirname, + "../../../src/document/public.js", +); +const ignored = new Set([ + path.join(import.meta.dirname, "../../../src/index.js"), + path.join(import.meta.dirname, "../../../src/standalone.js"), +]); + +const docProperties = new Set(["builders", "debug", "printer", "utils"]); + +function fix(source, context) { + // only fix `import doc from './document/public.js'` + if ( + !( + source.parent.type === "ImportDeclaration" && + source.parent.specifiers.length === 1 && + source.parent.specifiers[0].type === "ImportDefaultSpecifier" && + source.parent.specifiers[0].local.type === "Identifier" && + source.parent.specifiers[0].local.name === "doc" + ) + ) { + return; + } + + const variables = context.getDeclaredVariables(source.parent); + if (variables.length !== 1 || variables[0].name !== "doc") { + return; + } + + const [{ references }] = variables; + if (references.length !== 1) { + return; + } + + // Only fix `const {builders: {}} = doc` + const [{ identifier }] = references; + + if ( + !( + identifier.parent.type === "VariableDeclarator" && + identifier.parent.init === identifier && + identifier.parent.id.type === "ObjectPattern" && + identifier.parent.id.properties.every( + (property) => + property.type === "Property" && + !property.computed && + property.key.type === "Identifier" && + docProperties.has(property.key.name), + ) && + identifier.parent.parent.type === "VariableDeclaration" && + identifier.parent.parent.kind === "const" && + identifier.parent.parent.declarations.length === 1 && + identifier.parent.parent.declarations[0] === identifier.parent + ) + ) { + return; + } + + return function* (fixer) { + const sourceCode = context.getSourceCode(); + const text = identifier.parent.id.properties + .map((property) => { + const propertyName = property.key.name; + + return `import ${sourceCode.getText( + property.value, + )} from "${source.value.replace( + "/document/public.js", + `/document/${propertyName}.js`, + )}";`; + }) + .join("\n"); + + yield fixer.replaceText(source.parent, text); + yield fixer.remove(identifier.parent.parent); + }; +} + +export default { + meta: { + type: "suggestion", + messages: { + [messageId]: "Do not {{type}} document/public.js file", + }, + fixable: "code", + }, + create(context) { + const file = context.getPhysicalFilename(); + if (ignored.has(file)) { + return {}; + } + + const dir = path.dirname(file); + + return { + [selector](node) { + const { value } = node; + + if ( + !value.startsWith(".") || + !value.endsWith("/document/public.js") || + path.join(dir, value) !== docIndexFile + ) { + return; + } + + context.report({ + node, + messageId, + data: { + type: node.parent.type.slice(0, 6).toLowerCase(), + }, + fix: fix(node, context), + }); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-empty-flat-contents-for-if-break.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-empty-flat-contents-for-if-break.js index 7c5783924987..cc1a5b82fb29 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-empty-flat-contents-for-if-break.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-empty-flat-contents-for-if-break.js @@ -1,5 +1,3 @@ -"use strict"; - const selector = [ "CallExpression", "[optional=false]", @@ -13,12 +11,9 @@ const selector = [ const messageId = "no-empty-flat-contents-for-if-break"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-empty-flat-contents-for-if-break.js", - }, messages: { [messageId]: "Please don't pass an empty string to second parameter of ifBreak.", diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js index 84c6cf75c896..f80c164b9ccb 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js @@ -1,7 +1,5 @@ -"use strict"; +import { findVariable } from "@eslint-community/eslint-utils"; -// eslint-disable-next-line import/no-extraneous-dependencies -const { findVariable } = require("eslint-utils"); const ERROR = "error"; const SUGGESTION = "suggestion"; const selector = [ @@ -13,12 +11,9 @@ const selector = [ ].join(", ")})`, ].join(""); -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-identifier-n.js", - }, messages: { [ERROR]: "Please rename variable 'n'.", [SUGGESTION]: "Rename to `node`.", @@ -30,7 +25,7 @@ module.exports = { const variables = new Map(); return { [selector](node) { - const scope = context.getScope(); + const scope = context.sourceCode.getScope(node); const variable = findVariable(scope, node); /* istanbul ignore next */ diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-legacy-format-test.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-legacy-format-test.js new file mode 100644 index 000000000000..523aa79cceca --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-legacy-format-test.js @@ -0,0 +1,93 @@ +import path from "node:path"; + +const legacyRunFormatTestCall = [ + "CallExpression", + '[callee.type="Identifier"]', + '[callee.name="run_spec"]', +].join(""); + +const runFormatTestCall = [ + "CallExpression", + '[callee.type="Identifier"]', + '[callee.name="runFormatTest"]', +].join(""); + +const dirnameArgumentSelector = [ + runFormatTestCall, + " > ", + "Identifier.arguments:first-child", + '[name="__dirname"]', +].join(""); + +const dirnamePropertySelector = [ + runFormatTestCall, + " > ", + "ObjectExpression.arguments:first-child", + " > ", + "Property.properties", + '[key.type="Identifier"]', + '[key.name="dirname"]', + '[value.type="Identifier"]', + '[value.name="__dirname"]', +].join(""); + +const MESSAGE_ID_LEGACY_FUNCTION_NAME = "legacy-function-name"; +const MESSAGE_ID_ARGUMENT = "dirname-argument"; +const MESSAGE_ID_PROPERTY = "dirname-property"; +const MESSAGE_ID_LEGACY_FILENAME = "legacy-filename"; + +export default { + meta: { + type: "suggestion", + messages: { + [MESSAGE_ID_LEGACY_FUNCTION_NAME]: + "Use `runFormatTest(…)` instead of `run_spec(…)`.", + [MESSAGE_ID_ARGUMENT]: "Use `import.meta` instead of `__dirname`.", + [MESSAGE_ID_PROPERTY]: + "Use `importMeta: import.meta` instead of `dirname: __dirname`.", + [MESSAGE_ID_LEGACY_FILENAME]: "File should be named as 'format.test.js'.", + }, + fixable: "code", + hasSuggestions: true, + }, + create(context) { + return { + [legacyRunFormatTestCall](callExpression) { + context.report({ + node: callExpression.callee, + messageId: MESSAGE_ID_LEGACY_FUNCTION_NAME, + fix: (fixer) => + fixer.replaceText(callExpression.callee, "runFormatTest"), + }); + }, + [dirnameArgumentSelector](node) { + context.report({ + node, + messageId: MESSAGE_ID_ARGUMENT, + fix: (fixer) => fixer.replaceText(node, "import.meta"), + }); + }, + [dirnamePropertySelector](node) { + context.report({ + node, + messageId: MESSAGE_ID_PROPERTY, + fix: (fixer) => [ + fixer.replaceText(node.key, "importMeta"), + fixer.replaceText(node.value, "import.meta"), + ], + }); + }, + Program(node) { + const filename = path.basename(context.physicalFilename); + if (filename !== "jsfmt.spec.js") { + return; + } + + context.report({ + node, + messageId: MESSAGE_ID_LEGACY_FILENAME, + }); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-node-comments.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-node-comments.js index ddff4cb0fd8f..514c397eecb8 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-node-comments.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-node-comments.js @@ -1,5 +1,4 @@ -"use strict"; -const path = require("path"); +import path from "node:path"; // `node.comments` const memberExpressionSelector = [ @@ -25,15 +24,30 @@ const selector = `:matches(${memberExpressionSelector}, ${objectPatternSelector} const messageId = "no-node-comments"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-node-comments.js", - }, messages: { [messageId]: "Do not access node.comments.", }, + schema: { + type: "array", + items: { + anyOf: [ + { type: "string" }, + { + type: "object", + properties: { + file: { type: "string" }, + functions: { + type: "array", + items: { type: "string" }, + }, + }, + }, + ], + }, + }, }, create(context) { const fileName = context.getFilename(); @@ -44,10 +58,10 @@ module.exports = { } const { file, functions } = option; return [ - path.join(__dirname, "../../..", file), + path.join(import.meta.dirname, "../../..", file), functions ? new Set(functions) : true, ]; - }) + }), ); // avoid report on `const {comments} = node` twice const reported = new Set(); diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/no-unnecessary-ast-path-call.js b/scripts/tools/eslint-plugin-prettier-internal-rules/no-unnecessary-ast-path-call.js index 9b46fafea285..a90e0d1f2d60 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/no-unnecessary-ast-path-call.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/no-unnecessary-ast-path-call.js @@ -1,5 +1,3 @@ -"use strict"; - const selector = [ "CallExpression", "[optional=false]", @@ -14,12 +12,9 @@ const selector = [ const messageId = "no-unnecessary-ast-path-call"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/no-unnecessary-ast-path-call.js", - }, messages: { [messageId]: "Do not use `AstPath.call()` with one argument.", }, diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/package.json b/scripts/tools/eslint-plugin-prettier-internal-rules/package.json index aaee2c7dccf6..0134623ecb3a 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/package.json +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/package.json @@ -3,11 +3,13 @@ "version": "1.0.3", "description": "Prettier internal eslint rules", "private": true, + "type": "module", "author": "fisker", - "main": "./index.js", + "exports": "./index.js", "license": "MIT", "scripts": { "test": "node test.js", "test-coverage": "npx nyc node test.js" - } + }, + "packageManager": "yarn@4.9.2" } diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-each.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-each.js index b9685cf89fd5..02d64f196add 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-each.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-each.js @@ -1,5 +1,3 @@ -"use strict"; - const selector = [ "ExpressionStatement", ">", @@ -16,12 +14,9 @@ const selector = [ const messageId = "prefer-ast-path-each"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/require-json-extensions.js", - }, messages: { [messageId]: "Prefer `AstPath#each()` over `AstPath#map()`.", }, diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-getters.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-getters.js new file mode 100644 index 000000000000..fd47dd5a527a --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-ast-path-getters.js @@ -0,0 +1,104 @@ +const selector = [ + "CallExpression", + "[optional=false]", + "[arguments.length<2]", + '[callee.type="MemberExpression"]', + "[callee.computed=false]", + "[callee.optional=false]", + '[callee.object.type="Identifier"]', + "[callee.object.name=/[pP]ath$/]", + '[callee.property.type="Identifier"]', +].join(""); + +const messageId = "prefer-ast-path-getters"; +const messageIdSuggestion = "prefer-ast-path-getters/suggestion"; + +function getReplacement(callExpression) { + const method = callExpression.callee.property.name; + const description = `${method}()`; + switch (method) { + case "getValue": + case "getNode": + if (callExpression.arguments.length === 0) { + return { getter: "node", description }; + } + break; + case "getName": + return { getters: ["key", "index"], description }; + + case "getParentNode": { + // `path.getParentNode()` + if (callExpression.arguments.length === 0) { + return { getter: "parent", description }; + } + + // `path.getParentNode(count)` + const [countNode] = callExpression.arguments; + if (countNode.type !== "Literal") { + return; + } + + const count = countNode.value; + if (count === 0) { + return { getter: "parent", description: `${method}(0)` }; + } + + if (count === 1) { + return { getter: "grandparent", description: `${method}(1)` }; + } + break; + } + } +} + +export default { + meta: { + type: "suggestion", + fixable: "code", + hasSuggestions: true, + messages: { + [messageId]: "Prefer {{replacement}} over `AstPath#{{ description }}`.", + [messageIdSuggestion]: "Use `AstPath#{{getter}}`.", + }, + }, + create(context) { + return { + [selector](callExpression) { + const replacement = getReplacement(callExpression); + if (!replacement) { + return; + } + + const getters = replacement.getters ?? [replacement.getter]; + const problem = { + node: callExpression.callee, + messageId, + data: { + replacement: new Intl.ListFormat("en-US", { + type: "disjunction", + }).format(getters.map((getter) => `\`AstPath#${getter}\``)), + description: replacement.description, + }, + }; + + const useGetter = (getter) => (fixer) => + fixer.replaceTextRange( + [callExpression.callee.property.range[0], callExpression.range[1]], + getter, + ); + + if (replacement.getter) { + problem.fix = useGetter(replacement.getter); + } else { + problem.suggest = getters.map((getter) => ({ + messageId: messageIdSuggestion, + data: { getter }, + fix: useGetter(getter), + })); + } + + context.report(problem); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-create-type-check-function.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-create-type-check-function.js new file mode 100644 index 000000000000..366f7d877ded --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-create-type-check-function.js @@ -0,0 +1,257 @@ +const MESSAGE_ID = "prefer-create-type-check-function"; + +const isTypeAccess = (node, parameterName) => { + if (node.type === "ChainExpression") { + node = node.expression; + } + + return ( + node.type === "MemberExpression" && + !node.computed && + node.object.type === "Identifier" && + node.object.name === parameterName && + node.property.type === "Identifier" && + node.property.name === "type" + ); +}; + +const isEqualCheck = (node) => + node.type === "BinaryExpression" && node.operator === "==="; + +const isTypeIdentifier = (node) => + node.type === "Identifier" && node.name === "type"; + +const isTypeIdentifierCheck = (node) => + isEqualCheck(node) && isTypeIdentifier(node.left); +const isTypeAccessCheck = (node, parameterName) => + isEqualCheck(node) && isTypeAccess(node.left, parameterName); + +const isSetHasOrArrayIncludesCall = (node) => + node.type === "CallExpression" && + node.arguments.length === 1 && + node.callee.type === "MemberExpression" && + node.callee.property.type === "Identifier" && + (node.callee.property.name === "has" || + node.callee.property.name === "includes"); + +const isMultipleTypeAccessCheck = (node, parameterName) => + isSetHasOrArrayIncludesCall(node) && + isTypeAccess(node.arguments[0], parameterName); + +const isMultipleTypeIdentifierCheck = (node) => + isSetHasOrArrayIncludesCall(node) && isTypeIdentifier(node.arguments[0]); + +function getTypesFromNodeParameter(node, parameterName) { + if (isTypeAccessCheck(node, parameterName)) { + return [{ type: "single", node: node.right }]; + } + if (isMultipleTypeAccessCheck(node, parameterName)) { + return [{ type: "multiple", node: node.callee.object }]; + } + + if (node.type === "LogicalExpression" && node.operator === "||") { + const left = getTypesFromNodeParameter(node.left, parameterName); + + if (!left) { + return; + } + const right = getTypesFromNodeParameter(node.right, parameterName); + + if (!right) { + return; + } + + return [...left, ...right]; + } +} + +function getTypesFromTypeParameter(node) { + if (isTypeIdentifierCheck(node)) { + return [{ type: "single", node: node.right }]; + } + if (isMultipleTypeIdentifierCheck(node)) { + return [{ type: "multiple", node: node.callee.object }]; + } + + if (node.type === "LogicalExpression" && node.operator === "||") { + const left = getTypesFromTypeParameter(node.left); + + if (!left) { + return; + } + const right = getTypesFromTypeParameter(node.right); + + if (!right) { + return; + } + + return [...left, ...right]; + } +} + +function getTypes(node, parameter) { + // `function(node) {}` + if (parameter.type === "Identifier") { + return getTypesFromNodeParameter(node, parameter.name); + } + + // `function({type}) {}` + if ( + parameter.type === "ObjectPattern" && + parameter.properties.length === 1 && + parameter.properties[0].type === "Property" + ) { + const [{ shorthand, computed, key, value }] = parameter.properties; + + if ( + shorthand && + !computed && + key.type === "Identifier" && + key.name === "type" && + value.type === "Identifier" && + value.name === "type" + ) { + return getTypesFromTypeParameter(node); + } + } +} + +function isTopLevelFunction(node) { + return ( + node.parent.type === "Program" || + (node.parent.type === "VariableDeclarator" && + node.parent.parent.type === "VariableDeclaration" && + node.parent.parent.parent.type === "Program") || + node.parent.type === "ExportDefaultDeclaration" + ); +} + +const selector = [ + ":function", + "[params.length=1]", + "[async!=true]", + "[generator!=true]", +].join(""); + +export default { + meta: { + type: "suggestion", + messages: { + [MESSAGE_ID]: + "Prefer use `createTypeCheckFunction` to create this function", + }, + schema: [ + { + type: "object", + additionalProperties: false, + properties: { + ignoreSingleType: { + type: "boolean", + default: false, + }, + onlyTopLevelFunctions: { + type: "boolean", + default: false, + }, + }, + }, + ], + fixable: "code", + }, + create(context) { + const { ignoreSingleType = false, onlyTopLevelFunctions = false } = { + ...context.options[0], + }; + const sourceCode = context.getSourceCode(); + + return { + [selector](functionNode) { + if (onlyTopLevelFunctions && !isTopLevelFunction(functionNode)) { + return; + } + + let returnStatementArgument = functionNode.body; + if (functionNode.body.type === "BlockStatement") { + const { body } = functionNode; + if ( + body.body.length !== 1 || + body.body[0].type !== "ReturnStatement" || + !body.body[0].argument + ) { + return; + } + returnStatementArgument = body.body[0].argument; + } + + const [parameter] = functionNode.params; + const types = getTypes(returnStatementArgument, parameter); + + if (!types) { + return; + } + + if ( + ignoreSingleType && + types.length === 1 && + types[0].type === "single" + ) { + return; + } + + const problem = { + node: functionNode, + messageId: MESSAGE_ID, + }; + + const commentsInFunction = + sourceCode.getCommentsInside(functionNode).length; + const commentsInTypes = + commentsInFunction === 0 + ? 0 + : types.reduce( + (count, { node }) => + count + sourceCode.getCommentsInside(node).length, + 0, + ); + + if (commentsInFunction === commentsInTypes) { + problem.fix = (fixer) => { + const typesText = + types.length === 1 && types[0].type === "multiple" + ? sourceCode.getText(types[0].node) + : `[${types + .map( + ({ type, node }) => + `${type === "single" ? "" : "..."}${sourceCode.getText( + node, + )}`, + ) + .join(", ")}]`; + + let text = `createTypeCheckFunction(${typesText})`; + + if (functionNode.type === "FunctionDeclaration") { + const functionName = + functionNode.id?.name ?? "__please_name_this_function"; + text = `const ${functionName} = ${text};`; + + if ( + functionNode.parent.type === "ExportDefaultDeclaration" && + functionNode.parent.declaration === functionNode + ) { + return fixer.replaceText( + functionNode.parent, + `${text}\nexport default ${functionName};`, + ); + } + } + + return fixer.replaceText(functionNode, text); + }; + } + + context.report(problem); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-fs-promises-submodule.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-fs-promises-submodule.js new file mode 100644 index 000000000000..4ce907cae035 --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-fs-promises-submodule.js @@ -0,0 +1,30 @@ +const selector = [ + "ImportDeclaration", + "[specifiers.length=1]", + '[source.value="node:fs"]', + ">", + "ImportSpecifier:first-child", + '[imported.name="promises"]', +].join(""); + +const messageId = "prefer-fs-promises-submodule"; + +export default { + meta: { + type: "suggestion", + messages: { + [messageId]: + 'Prefer `import fs from "node:fs/promises"` instead of `import { promises as fs } from "fs";`', + }, + }, + create(context) { + return { + [selector](node) { + context.report({ + node, + messageId, + }); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-indent-if-break.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-indent-if-break.js index 7cf0ced68776..952ddb66700e 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-indent-if-break.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-indent-if-break.js @@ -1,5 +1,3 @@ -"use strict"; - const selector = [ "CallExpression", "[optional=false]", @@ -18,12 +16,9 @@ const selector = [ const messageId = "prefer-indent-if-break"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-indent-if-break.js", - }, messages: { [messageId]: "Prefer `indentIfBreak(…)` over `ifBreak(indent(…), …)`.", }, @@ -48,15 +43,15 @@ module.exports = { *fix(fixer) { yield fixer.replaceText(node.callee, "indentIfBreak"); const openingParenthesisToken = sourceCode.getTokenAfter( - node.callee + node.callee, ); const commaToken = sourceCode.getTokenBefore( doc, - ({ type, value }) => type === "Punctuator" && value === "," + ({ type, value }) => type === "Punctuator" && value === ",", ); yield fixer.replaceTextRange( [openingParenthesisToken.range[1], commaToken.range[1]], - "" + "", ); }, }); diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-is-non-empty-array.js b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-is-non-empty-array.js index 6b4a8e81bf46..7763adb47443 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-is-non-empty-array.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-is-non-empty-array.js @@ -1,5 +1,3 @@ -"use strict"; - const getLengthSelector = (path) => `[${path}.type="MemberExpression"][${path}.property.type="Identifier"][${path}.property.name="length"]`; const selector = [ @@ -52,12 +50,9 @@ const isArrayIsArrayCall = (node) => const MESSAGE_ID = "prefer-is-non-empty-array"; -module.exports = { +export default { meta: { type: "suggestion", - docs: { - url: "https://github.com/prettier/prettier/blob/main/scripts/tools/eslint-plugin-prettier-internal-rules/prefer-is-non-empty-array.js", - }, messages: { [MESSAGE_ID]: "Please use `isNonEmptyArray()`.", }, @@ -99,7 +94,7 @@ module.exports = { fix(fixer) { return fixer.replaceTextRange( [start, end], - `isNonEmptyArray(${objectText})` + `isNonEmptyArray(${objectText})`, ); }, }); @@ -141,7 +136,7 @@ module.exports = { fix(fixer) { return fixer.replaceTextRange( [start, end], - `!isNonEmptyArray(${objectText})` + `!isNonEmptyArray(${objectText})`, ); }, }); diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/print-function-parameter-order.js b/scripts/tools/eslint-plugin-prettier-internal-rules/print-function-parameter-order.js new file mode 100644 index 000000000000..14033b75b48e --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/print-function-parameter-order.js @@ -0,0 +1,55 @@ +const messageId = "print-function-parameter-order"; +const expectedParameters = ["path", "options", "print"]; + +export default { + meta: { + type: "suggestion", + messages: { + [messageId]: + "`{{functionName}}` function parameters should in order of `path`, `options` and `print`.", + }, + }, + create(context) { + const sourceCode = context.getSourceCode(); + + return { + ":function[params.length>=3]"(node) { + const parameterNames = node.params.map((node) => + node.type === "Identifier" ? node.name : "", + ); + + // `embed` function order is `textToDoc, print, path, options` + if (parameterNames.includes("textToDoc")) { + return; + } + + // Only if all three parameters exists + if (expectedParameters.some((name) => !parameterNames.includes(name))) { + return; + } + + // In correct order + if ( + expectedParameters.every( + (name, index) => name === parameterNames[index], + ) + ) { + return; + } + + const firstToken = sourceCode.getFirstToken(node); + const tokenBeforeBody = sourceCode.getTokenBefore(node.body); + const functionName = node.id ? node.id.name : "print*"; + context.report({ + node, + loc: { + start: firstToken.loc.start, + end: tokenBeforeBody.loc.end, + }, + messageId, + data: { functionName }, + }); + }, + }; + }, +}; diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/test.js b/scripts/tools/eslint-plugin-prettier-internal-rules/test.js index 861dd804d4ff..5878aa80127a 100644 --- a/scripts/tools/eslint-plugin-prettier-internal-rules/test.js +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/test.js @@ -1,41 +1,34 @@ -/* eslint-disable import/no-extraneous-dependencies */ -"use strict"; - -const path = require("path"); -const { outdent } = require("outdent"); -const { RuleTester } = require("eslint"); -const { rules } = require("."); +import path from "node:path"; +import { RuleTester } from "eslint"; +import { outdent } from "outdent"; +import plugin from "./index.js"; const test = (ruleId, tests) => { - new RuleTester({ parserOptions: { ecmaVersion: 2021 } }).run( - ruleId, - rules[ruleId], - tests - ); + new RuleTester().run(ruleId, plugin.rules[ruleId], tests); }; test("await-cli-tests", { valid: [ - "async () => await runPrettier()", - "runPrettier().test()", - "notRunPrettier()", - "async () => await runPrettier().stderr", + "async () => await runCli()", + "runCli().test()", + "notRunCli()", + "async () => await runCli().stderr", outdent` async () => { - const originalStdout = await runPrettier("plugins/options", ["--help"]).stdout; + const originalStdout = await runCli("plugins/options", ["--help"]).stdout; } `, ], invalid: [ { - code: "runPrettier()", + code: "runCli()", errors: [ - { message: "'runPrettier()' should be awaited or calling `.test()`." }, + { message: "'runCli()' should be awaited or calling `.test()`." }, ], }, { - code: "runPrettier().stderr", - errors: [{ message: "'runPrettier().stderr' should be awaited." }], + code: "runCli().stderr", + errors: [{ message: "'runCli().stderr' should be awaited." }], }, ], }); @@ -44,85 +37,43 @@ test("better-parent-property-check-in-needs-parens", { valid: ["function needsParens() {return parent.test === node;}"], invalid: [ { - code: 'return parent.type === "MemberExpression" && name === "object";', - errors: [{ message: "`name` comparison should be on left side." }], + code: 'return parent.type === "MemberExpression" && key === "object";', + errors: [{ message: "`key` comparison should be on left side." }], }, { code: "return parent.test === node;", - output: 'return name === "test";', + output: 'return key === "test";', errors: [ - { message: 'Prefer `name === "test"` over `parent.test === node`.' }, + { message: 'Prefer `key === "test"` over `parent.test === node`.' }, ], }, { code: "return parent.test !== node;", - output: 'return name !== "test";', + output: 'return key !== "test";', errors: [ - { message: 'Prefer `name !== "test"` over `parent.test !== node`.' }, + { message: 'Prefer `key !== "test"` over `parent.test !== node`.' }, ], }, { code: 'return parent["property"] === node;', - output: 'return name === "property";', + output: 'return key === "property";', errors: [ { message: - 'Prefer `name === "property"` over `parent."property" === node`.', + 'Prefer `key === "property"` over `parent."property" === node`.', }, ], }, ].map((testCase) => ({ ...testCase, code: `function needsParens() {${testCase.code}}`, - output: `function needsParens() {${testCase.output || testCase.code}}`, + output: testCase.output + ? `function needsParens() {${testCase.output}}` + : null, filename: "needs-parens.js", })), }); -test("consistent-negative-index-access", { - valid: [ - "getLast(foo)", - "getPenultimate(foo)", - "foo[foo.length]", - "foo[foo.length - 3]", - "foo[foo.length + 1]", - "foo[foo.length + -1]", - "foo[foo.length * -1]", - "foo.length - 1", - "foo?.[foo.length - 1]", - "foo[foo?.length - 1]", - "foo[foo['length'] - 1]", - "foo[bar.length - 1]", - "foo.bar[foo. bar.length - 1]", - "foo[foo.length - 1]++", - "--foo[foo.length - 1]", - "foo[foo.length - 1] += 1", - "foo[foo.length - 1] = 1", - ], - invalid: [ - { - code: "foo[foo.length - 1]", - output: "getLast(foo)", - errors: 1, - }, - { - code: "foo[foo.length - 2]", - output: "getPenultimate(foo)", - errors: 1, - }, - { - code: "foo[foo.length - 0b10]", - output: "getPenultimate(foo)", - errors: 1, - }, - { - code: "foo()[foo().length - 1]", - output: "getLast(foo())", - errors: 1, - }, - ], -}); - test("directly-loc-start-end", { valid: [], invalid: [ @@ -252,22 +203,6 @@ test("no-conflicting-comment-check-flags", { ], }); -test("no-doc-builder-concat", { - valid: ["notConcat([])", "concat", "[].concat([])"], - invalid: [ - { - code: "concat(parts)", - output: "(parts)", - errors: 1, - }, - { - code: "concat(['foo', line])", - output: "(['foo', line])", - errors: 1, - }, - ], -}); - test("no-identifier-n", { valid: ["const a = {n: 1}", "const m = 1", "a.n = 1"], invalid: [ @@ -296,19 +231,13 @@ test("no-identifier-n", { alert(n) } `, - output: outdent` - const n = 1; - function a(node) { - alert(n, node) - } - function b() { - alert(n) - } - `, + output: null, errors: [ { + messageId: "error", suggestions: [ { + messageId: "suggestion", output: outdent` const node = 1; function a(node) { @@ -323,10 +252,51 @@ test("no-identifier-n", { }, ], }, + // ESLint>=8 doesn't allow suggest invalid code + // { + // code: "const n = 1;const node = 2;", + // output: null, + // errors: [ + // { + // messageId: "error", + // suggestions: [ + // { + // messageId: "suggestion", + // output: "const node = 1;const node = 2;", + // }, + // ], + // }, + // ], + // }, + ], +}); + +test("no-legacy-format-test", { + valid: [ + "runFormatTest(import.meta, ['babel'])", + "runFormatTest({importMeta: import.meta}, ['babel'])", + ], + invalid: [ { - code: "const n = 1;const node = 2;", - output: "const n = 1;const node = 2;", - errors: [{ suggestions: [{ output: "const node = 1;const node = 2;" }] }], + code: "run_spec(import.meta, ['babel'])", + errors: [{ message: "Use `runFormatTest(…)` instead of `run_spec(…)`." }], + output: "runFormatTest(import.meta, ['babel'])", + }, + { + code: "runFormatTest(__dirname, ['babel'])", + errors: [{ message: "Use `import.meta` instead of `__dirname`." }], + output: "runFormatTest(import.meta, ['babel'])", + }, + { + code: "runFormatTest({snippets: ['x'], dirname: __dirname}, ['babel'])", + errors: [ + { + message: + "Use `importMeta: import.meta` instead of `dirname: __dirname`.", + }, + ], + output: + "runFormatTest({snippets: ['x'], importMeta: import.meta}, ['babel'])", }, ], }); @@ -336,12 +306,12 @@ test("no-node-comments", { "const comments = node.notComments", { code: "function functionName() {return node.comments;}", - filename: path.join(__dirname, "../../..", "a.js"), + filename: path.join(import.meta.dirname, "../../..", "a.js"), options: ["a.js"], }, { code: "function functionName() {return node.comments;}", - filename: path.join(__dirname, "../../..", "a.js"), + filename: path.join(import.meta.dirname, "../../..", "a.js"), options: [{ file: "a.js", functions: ["functionName"] }], }, ], @@ -352,13 +322,13 @@ test("no-node-comments", { "const {comments: nodeComments} = node", ].map((code) => ({ code, - output: code, + output: null, errors: [{ message: "Do not access node.comments." }], })), { code: "function notFunctionName() {return node.comments;}", - output: "function notFunctionName() {return node.comments;}", - filename: path.join(__dirname, "../../..", "a.js"), + output: null, + filename: path.join(import.meta.dirname, "../../..", "a.js"), options: [{ file: "a.js", functions: ["functionName"] }], errors: [{ message: "Do not access node.comments." }], }, @@ -376,6 +346,233 @@ test("prefer-ast-path-each", { ], }); +test("prefer-create-type-check-function", { + valid: [ + 'node.type === "Identifier"', + 'node.type === "Identifier" || node.type === "FunctionExpression"', + "const isIdentifier = node => {}", + 'const isIdentifier = async node => node.type === "Identifier"', + outdent` + function * isIdentifier(node){ + return node.type === "Identifier"; + } + `, + outdent` + async function isIdentifier(node){ + return node.type === "Identifier"; + } + `, + outdent` + async function * isIdentifier(node){ + return node.type === "Identifier"; + } + `, + outdent` + function isIdentifier(node){ + return; + } + `, + outdent` + function isIdentifier(node, extraParameter){ + return node.type === "Identifier"; + } + `, + outdent` + function isIdentifier(){ + return node.type === "Identifier"; + } + `, + outdent` + function isIdentifier({node}){ + return node.type === "Identifier"; + } + `, + outdent` + function isIdentifier(node){ + return node.type === "Identifier" && node.type === "FunctionExpression"; + } + `, + outdent` + function isIdentifier(node){ + return node.type !== "Identifier"; + } + `, + outdent` + function isIdentifier(node){ + return node[type] === "Identifier"; + } + `, + outdent` + function isIdentifier(node){ + return node.type === "Identifier" || node.type === "FunctionExpression" || notTypeChecking(); + } + `, + { + code: 'const isIdentifier = node => node.type === "Identifier";', + options: [{ ignoreSingleType: true }], + }, + { + code: outdent` + function foo() { + use(node => node.type === "Identifier" || node.type === "FunctionExpression"); + } + `, + options: [{ onlyTopLevelFunctions: true }], + }, + outdent` + function isGetterOrSetter(node) { + return node.kind === "get" || node.kind === "set"; + } + `, + outdent` + const isClassProperty = ({ notType }) => + notType === "ClassProperty" || + notType === "PropertyDefinition"; + `, + ], + invalid: [ + { + code: outdent` + function isIdentifier(node) { + return node.type === "Identifier"; + } + `, + output: 'const isIdentifier = createTypeCheckFunction(["Identifier"]);', + errors: 1, + }, + { + code: outdent` + export default function isIdentifier(node) { + return node.type === "Identifier"; + } + `, + output: outdent` + const isIdentifier = createTypeCheckFunction(["Identifier"]); + export default isIdentifier; + `, + errors: 1, + }, + { + code: outdent` + export default function (node) { + return node.type === "Identifier"; + } + `, + output: outdent` + const __please_name_this_function = createTypeCheckFunction(["Identifier"]); + export default __please_name_this_function; + `, + errors: 1, + }, + { + code: outdent` + use(function isIdentifier(node) { + return node.type === "Identifier"; + }) + `, + output: 'use(createTypeCheckFunction(["Identifier"]))', + errors: 1, + }, + { + code: outdent` + const foo = node => node.type === "Identifier"; + `, + output: 'const foo = createTypeCheckFunction(["Identifier"]);', + errors: 1, + }, + { + code: outdent` + const foo = node => { + return node.type === "Identifier"; + }; + `, + output: 'const foo = createTypeCheckFunction(["Identifier"]);', + errors: 1, + }, + { + code: outdent` + const foo = node => + node.type === "Identifier" || node.type === "FunctionExpression"; + `, + output: + 'const foo = createTypeCheckFunction(["Identifier", "FunctionExpression"]);', + errors: 1, + }, + { + code: outdent` + const foo = node => + node.type === "Identifier" || node?.type === "FunctionExpression"; + `, + output: + 'const foo = createTypeCheckFunction(["Identifier", "FunctionExpression"]);', + errors: 1, + }, + { + code: outdent` + const foo = node => node.type === a.complex.way.to.get.type(); + `, + output: + "const foo = createTypeCheckFunction([a.complex.way.to.get.type()]);", + errors: 1, + }, + { + code: outdent` + const foo = ({type}) => type === a.complex.way.to.get.type(); + `, + output: + "const foo = createTypeCheckFunction([a.complex.way.to.get.type()]);", + errors: 1, + }, + { + code: outdent` + const foo = ({type}) => + a.complex.way.to.get.types().includes(type) || + another.complex.way.to.get.types().has(type) || + type === "Identifier"; + `, + output: + 'const foo = createTypeCheckFunction([...a.complex.way.to.get.types(), ...another.complex.way.to.get.types(), "Identifier"]);', + errors: 1, + }, + { + code: outdent` + const foo = (node) => + a.complex.way.to.get.types().includes(node.type) || + another.complex.way.to.get.types().has(node.type) || + node.type === "Identifier"; + `, + output: + 'const foo = createTypeCheckFunction([...a.complex.way.to.get.types(), ...another.complex.way.to.get.types(), "Identifier"]);', + errors: 1, + }, + // Single set + { + code: "const foo = ({type}) => foo.has(type);", + output: "const foo = createTypeCheckFunction(foo);", + errors: 1, + }, + // Skip fix if comments can't be kept + { + code: outdent` + const foo = node => + node.type === "Identifier" || /* comment */ node.type === "FunctionExpression"; + `, + output: null, + errors: 1, + }, + { + code: outdent` + const isClassProperty = ({ type }) => + type === "ClassProperty" || + type === "PropertyDefinition"; + `, + output: + 'const isClassProperty = createTypeCheckFunction(["ClassProperty", "PropertyDefinition"]);', + errors: 1, + }, + ], +}); + test("prefer-indent-if-break", { valid: [ "ifBreak(indent(doc))", @@ -443,6 +640,31 @@ test("prefer-is-non-empty-array", { ], }); +test("print-function-parameter-order", { + valid: [ + "function printFoo(path, options, print) {}", + "function printFoo(path, opts, print) {}", + "function printFoo(path, options, printPath) {}", + "function printFoo() {}", + "function printFoo(path, print) {}", + "function printFoo(path, options) {}", + "function printFoo(print, options) {}", + "function embed(path, print, textToDoc, options) {}", + ], + invalid: [ + "function printFoo(path, print, options) {}", + "function printFoo(path, print, options, args) {}", + "function printFoo(options, print, path) {}", + "const printFoo = function (path, print, options) {}", + "const printFoo = function printFoo(path, print, options) {}", + "const printFoo = (path, print, options) => {}", + ].map((code) => ({ + code, + output: null, + errors: 1, + })), +}); + test("no-empty-flat-contents-for-if-break", { valid: [ "ifBreak('foo', 'bar')", @@ -505,7 +727,224 @@ test("no-unnecessary-ast-path-call", { }, { code: "foo.call(() => bar)", - output: "foo.call(() => bar)", + output: null, + errors: 1, + }, + ], +}); + +test("prefer-fs-promises-submodule", { + valid: [ + "import fs from 'node:fs';", + "import fs from 'node:fs/promises';", + "import fs, { promises as fsPromises } from 'node:fs';", + "import { promises as fs, statSync } from 'node:fs';", + ], + invalid: [ + { + code: "import { promises as fsPromises } from 'node:fs';", + errors: 1, + }, + { + code: "import { promises as fs } from 'node:fs';", + errors: 1, + }, + ], +}); + +test("prefer-ast-path-getters", { + valid: [ + "path.getNode(2)", + "path.getNode", + "getNode", + "this.getNode()", + "path.node", + "path.getParentNode(2)", + "path.getParentNode", + "getParentNode", + "this.getParentNode()", + "path.parent", + "path.grandparent", + ], + invalid: [ + // path.getNode + { + code: "path.getNode()", + output: "path.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getNode()`.", + }, + ], + }, + { + code: "const node = path.getNode()", + output: "const node = path.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getNode()`.", + }, + ], + }, + { + code: "fooPath.getNode()", + output: "fooPath.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getNode()`.", + }, + ], + }, + + // path.getValue() + { + code: "path.getValue()", + output: "path.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getValue()`.", + }, + ], + }, + { + code: "const node = path.getValue()", + output: "const node = path.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getValue()`.", + }, + ], + }, + { + code: "fooPath.getValue()", + output: "fooPath.node", + errors: [ + { + message: "Prefer `AstPath#node` over `AstPath#getValue()`.", + }, + ], + }, + + // path.getParentNode() + { + code: "path.getParentNode()", + output: "path.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode()`.", + }, + ], + }, + { + code: "const node = path.getParentNode()", + output: "const node = path.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode()`.", + }, + ], + }, + { + code: "fooPath.getParentNode()", + output: "fooPath.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode()`.", + }, + ], + }, + + // path.getParentNode(0) + { + code: "path.getParentNode(0)", + output: "path.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode(0)`.", + }, + ], + }, + { + code: "const node = path.getParentNode(0)", + output: "const node = path.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode(0)`.", + }, + ], + }, + { + code: "fooPath.getParentNode(0)", + output: "fooPath.parent", + errors: [ + { + message: "Prefer `AstPath#parent` over `AstPath#getParentNode(0)`.", + }, + ], + }, + + // path.getParentNode(1) + { + code: "path.getParentNode(1)", + output: "path.grandparent", + errors: [ + { + message: + "Prefer `AstPath#grandparent` over `AstPath#getParentNode(1)`.", + }, + ], + }, + { + code: "const node = path.getParentNode(1)", + output: "const node = path.grandparent", + errors: [ + { + message: + "Prefer `AstPath#grandparent` over `AstPath#getParentNode(1)`.", + }, + ], + }, + { + code: "fooPath.getParentNode(1)", + output: "fooPath.grandparent", + errors: [ + { + message: + "Prefer `AstPath#grandparent` over `AstPath#getParentNode(1)`.", + }, + ], + }, + { + code: "path.getName()", + output: null, + errors: [ + { + message: + "Prefer `AstPath#key` or `AstPath#index` over `AstPath#getName()`.", + suggestions: [ + { desc: "Use `AstPath#key`.", output: "path.key" }, + { desc: "Use `AstPath#index`.", output: "path.index" }, + ], + }, + ], + }, + ], +}); + +test("massage-ast-parameter-names", { + valid: [ + "function notNamedClean(a, b) {}", + "function clean(original, cloned) {}", + ], + invalid: [ + { + code: "function clean(theOriginalNode, cloned) {delete theOriginalNode.property}", + output: "function clean(original, cloned) {delete original.property}", + errors: 1, + }, + { + code: "function clean(original, theClonedNode) {delete theClonedNode.property}", + output: "function clean(original, cloned) {delete cloned.property}", errors: 1, }, ], diff --git a/scripts/tools/eslint-plugin-prettier-internal-rules/yarn.lock b/scripts/tools/eslint-plugin-prettier-internal-rules/yarn.lock new file mode 100644 index 000000000000..bebb7e5aa421 --- /dev/null +++ b/scripts/tools/eslint-plugin-prettier-internal-rules/yarn.lock @@ -0,0 +1,12 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"eslint-plugin-prettier-internal-rules@workspace:.": + version: 0.0.0-use.local + resolution: "eslint-plugin-prettier-internal-rules@workspace:." + languageName: unknown + linkType: soft diff --git a/scripts/utils/changelog-categories.js b/scripts/utils/changelog-categories.js new file mode 100644 index 000000000000..da74b1d411f6 --- /dev/null +++ b/scripts/utils/changelog-categories.js @@ -0,0 +1,22 @@ +export const CHANGELOG_CATEGORIES = [ + "angular", + "api", + "cli", + "css", + "flow", + "graphql", + "handlebars", + "html", + "javascript", + "json", + "less", + "lwc", + "mjml", + "markdown", + "mdx", + "scss", + "typescript", + "vue", + "yaml", + "misc", +]; diff --git a/scripts/utils/changelog-categories.mjs b/scripts/utils/changelog-categories.mjs deleted file mode 100644 index a5b25175bfb5..000000000000 --- a/scripts/utils/changelog-categories.mjs +++ /dev/null @@ -1,21 +0,0 @@ -export const CHANGELOG_CATEGORIES = [ - "angular", - "api", - "cli", - "css", - "flow", - "graphql", - "handlebars", - "html", - "javascript", - "json", - "less", - "lwc", - "markdown", - "mdx", - "scss", - "typescript", - "vue", - "yaml", - "misc", -]; diff --git a/scripts/utils/changelog.js b/scripts/utils/changelog.js new file mode 100644 index 000000000000..2932f7b4d0eb --- /dev/null +++ b/scripts/utils/changelog.js @@ -0,0 +1,126 @@ +import fs from "node:fs"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import semver from "semver"; + +const { __dirname } = createEsmUtils(import.meta); + +export const changelogUnreleasedDirPath = path.join( + __dirname, + "../../changelog_unreleased", +); + +export const categories = [ + { dir: "javascript", title: "JavaScript" }, + { dir: "typescript", title: "TypeScript" }, + { dir: "flow", title: "Flow" }, + { dir: "json", title: "JSON" }, + { dir: "css", title: "CSS" }, + { dir: "scss", title: "SCSS" }, + { dir: "less", title: "Less" }, + { dir: "html", title: "HTML" }, + { dir: "vue", title: "Vue" }, + { dir: "angular", title: "Angular" }, + { dir: "lwc", title: "LWC" }, + { dir: "mjml", title: "MJML" }, + { dir: "handlebars", title: "Ember / Handlebars" }, + { dir: "graphql", title: "GraphQL" }, + { dir: "markdown", title: "Markdown" }, + { dir: "mdx", title: "MDX" }, + { dir: "yaml", title: "YAML" }, + { dir: "api", title: "API" }, + { dir: "cli", title: "CLI" }, + { dir: "misc", title: "Miscellaneous" }, +]; + +export const changelogUnreleasedDirs = fs + .readdirSync(changelogUnreleasedDirPath, { + withFileTypes: true, + }) + .filter((entry) => entry.isDirectory()); + +export function getEntries(dirPath, options) { + const fileNames = fs + .readdirSync(dirPath) + .filter((fileName) => path.extname(fileName) === ".md"); + const useFriendlyHeadingId = options?.useFriendlyHeadingId; + const entries = fileNames.map((fileName) => { + const filePath = path.join(dirPath, fileName); + let [title, ...rest] = fs.readFileSync(filePath, "utf8").trim().split("\n"); + + const improvement = title.match(/\[IMPROVEMENT(:(\d+))?\]/u); + + const section = title.includes("[HIGHLIGHT]") + ? "highlight" + : title.includes("[BREAKING]") + ? "breaking" + : improvement + ? "improvement" + : undefined; + + const order = + section === "improvement" && improvement[2] !== undefined + ? Number(improvement[2]) + : undefined; + + title = processTitle(title); + + if (useFriendlyHeadingId) { + // `1000` or `1000-2` + const basename = path.basename(filePath, ".md"); + title += ` {#change-${basename}}`; + } + + const content = [title, ...rest].join("\n"); + return { fileName, section, order, content }; + }); + return entries; +} + +export function printEntries(entries) { + const result = []; + if (entries.length > 0) { + entries.sort((a, b) => { + if (a.order !== undefined) { + return b.order === undefined ? 1 : a.order - b.order; + } + return a.fileName.localeCompare(b.fileName, "en", { numeric: true }); + }); + result.push(...entries.map((entry) => entry.content)); + } + return result; +} + +export function replaceVersions(data, prevVer, newVer, isPatch = false) { + if (semver.compare(prevVer, newVer) >= 0) { + throw new Error( + `[INVALID VERSION] Next version(${newVer}) should be greater than previous version(${prevVer}).`, + ); + } + + return data + .replaceAll( + /prettier stable/giu, + `Prettier ${isPatch ? prevVer : formatVersion(prevVer)}`, + ) + .replaceAll( + /prettier main/giu, + `Prettier ${isPatch ? newVer : formatVersion(newVer)}`, + ); +} + +function formatVersion(version) { + return `${semver.major(version)}.${semver.minor(version)}`; +} + +function processTitle(title) { + return title + .replaceAll(/\[(BREAKING|HIGHLIGHT|IMPROVEMENT(:\d+)?)\]/gu, "") + .replaceAll(/\s+/gu, " ") + .replace(/^#{4} [a-z]/u, (s) => s.toUpperCase()) + .replaceAll(/(? entry.isDirectory()); - -export function getEntries(dirPath) { - const fileNames = fs - .readdirSync(dirPath) - .filter((fileName) => path.extname(fileName) === ".md"); - const entries = fileNames.map((fileName) => { - const [title, ...rest] = fs - .readFileSync(path.join(dirPath, fileName), "utf8") - .trim() - .split("\n"); - - const improvement = title.match(/\[IMPROVEMENT(:(\d+))?]/); - - const section = title.includes("[HIGHLIGHT]") - ? "highlight" - : title.includes("[BREAKING]") - ? "breaking" - : improvement - ? "improvement" - : undefined; - - const order = - section === "improvement" && improvement[2] !== undefined - ? Number(improvement[2]) - : undefined; - - const content = [processTitle(title), ...rest].join("\n"); - - return { fileName, section, order, content }; - }); - return entries; -} - -export function printEntries(entries) { - const result = []; - if (entries.length > 0) { - entries.sort((a, b) => { - if (a.order !== undefined) { - return b.order === undefined ? 1 : a.order - b.order; - } - return a.fileName.localeCompare(b.fileName, "en", { numeric: true }); - }); - result.push(...entries.map((entry) => entry.content)); - } - return result; -} - -export function replaceVersions(data, prevVer, newVer, isPatch = false) { - return data - .replace( - /prettier stable/gi, - `Prettier ${isPatch ? prevVer : formatVersion(prevVer)}` - ) - .replace( - /prettier main/gi, - `Prettier ${isPatch ? newVer : formatVersion(newVer)}` - ); -} - -function formatVersion(version) { - return `${semver.major(version)}.${semver.minor(version)}`; -} - -function processTitle(title) { - return title - .replace(/\[(BREAKING|HIGHLIGHT|IMPROVEMENT(:\d+)?)]/g, "") - .replace(/\s+/g, " ") - .replace(/^#{4} [a-z]/, (s) => s.toUpperCase()) - .replace(/(? [option.name, optionToSchema(option)]) + options + .sort(({ name: optionNameA }, { name: optionNameB }) => + optionNameA.localeCompare(optionNameB), + ) + .map((option) => [option.name, optionToSchema(option)]), ), }, overridesDefinition: { @@ -39,9 +39,9 @@ function generateSchema(options) { ], }, options: { + $ref: "#/definitions/optionsDefinition", type: "object", description: "The options to apply for this override.", - $ref: "#/definitions/optionsDefinition", }, }, additionalProperties: false, @@ -62,6 +62,7 @@ function generateSchema(options) { type: "string", }, ], + title: "Schema for .prettierrc", }; } @@ -84,19 +85,6 @@ function optionToSchema(option) { } if (option.array) { schema = wrapWithArraySchema(schema); - - // #10274 - if (option.name === "pluginSearchDirs") { - schema = { - oneOf: [ - schema, - { - enum: [false], - description: "Disable plugin autoloading.", - }, - ], - }; - } } return { description: option.description, @@ -117,7 +105,7 @@ function optionTypeToSchemaType(optionType) { return optionType; case "choice": throw new Error( - "Please use `oneOf` instead of `enum` for better description support." + "Please use `oneOf` instead of `enum` for better description support.", ); case "path": return "string"; @@ -129,3 +117,12 @@ function optionTypeToSchemaType(optionType) { function choiceToSchema(choice) { return { enum: [choice.value], description: choice.description }; } + +async function generateSchema() { + const { format, getSupportInfo } = await import("../../src/index.js"); + const supportInfo = await getSupportInfo(); + const schema = generateSchemaData(supportInfo.options); + return format(JSON.stringify(schema, undefined, 2), { parser: "json" }); +} + +export { generateSchema, generateSchemaData }; diff --git a/scripts/utils/index.js b/scripts/utils/index.js new file mode 100644 index 000000000000..386889472b0a --- /dev/null +++ b/scripts/utils/index.js @@ -0,0 +1,51 @@ +import fs from "node:fs/promises"; +import path from "node:path"; +import url from "node:url"; + +const toPath = (path) => (path instanceof URL ? url.fileURLToPath(path) : path); + +async function readJson(file) { + const data = await fs.readFile(file); + return JSON.parse(data); +} + +function writeJson(file, content) { + content = JSON.stringify(content, null, 2) + "\n"; + return writeFile(file, content); +} + +async function copyFile(from, to) { + await createDirectory(path.dirname(toPath(to))); + return fs.copyFile(from, to); +} + +async function createDirectory(directory) { + try { + await fs.mkdir(directory, { recursive: true }); + } catch { + // noop + } +} + +async function writeFile(file, content) { + await createDirectory(path.dirname(toPath(file))); + return fs.writeFile(file, content); +} + +const PROJECT_ROOT = url.fileURLToPath(new URL("../../", import.meta.url)); +const DIST_DIR = path.join(PROJECT_ROOT, "dist"); +const WEBSITE_DIR = path.join(PROJECT_ROOT, "website"); +const SOURCE_DIR = path.join(PROJECT_ROOT, "src"); +const PRODUCTION_MINIMAL_NODE_JS_VERSION = "14"; + +export { + copyFile, + DIST_DIR, + PRODUCTION_MINIMAL_NODE_JS_VERSION, + PROJECT_ROOT, + readJson, + SOURCE_DIR, + WEBSITE_DIR, + writeFile, + writeJson, +}; diff --git a/scripts/utils/index.mjs b/scripts/utils/index.mjs deleted file mode 100644 index 9e9e1c5a5751..000000000000 --- a/scripts/utils/index.mjs +++ /dev/null @@ -1,44 +0,0 @@ -import fs from "node:fs/promises"; -import url from "node:url"; -import path from "node:path"; - -const toPath = (path) => (path instanceof URL ? url.fileURLToPath(path) : path); - -async function readJson(file) { - const data = await fs.readFile(file); - return JSON.parse(data); -} - -function writeJson(file, content) { - content = JSON.stringify(content, null, 2) + "\n"; - return writeFile(file, content); -} - -async function copyFile(from, to) { - const data = await fs.readFile(from); - return writeFile(to, data); -} - -async function writeFile(file, content) { - const directory = path.dirname(toPath(file)); - try { - await fs.mkdir(directory, { recursive: true }); - } catch { - // noop - } - return fs.writeFile(file, content); -} - -const PROJECT_ROOT = url.fileURLToPath(new URL("../../", import.meta.url)); -const DIST_DIR = path.join(PROJECT_ROOT, "dist"); -const WEBSITE_DIR = path.join(PROJECT_ROOT, "website"); - -export { - PROJECT_ROOT, - DIST_DIR, - WEBSITE_DIR, - readJson, - writeJson, - writeFile, - copyFile, -}; diff --git a/scripts/vendors/README.md b/scripts/vendors/README.md deleted file mode 100644 index 9a513786c301..000000000000 --- a/scripts/vendors/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# `./scripts/vendors` - -Scripts for bundling Pure ESM Packages to CommonJS so that Prettier can use them. - -## Context - - - -Currently, Prettier is developed using CommonJS Modules. This is for historical reasons, and we are considering [migrating to ECMAScript Modules](https://github.com/prettier/prettier/issues/10157) in the future. - -However, migrating to ECMAScript Modules is not an easy task. - -While we are working on it, several important packages are being migrated to Pure ESM. Please see from [@sindresorhus](https://github.com/sindresorhus) about Pure ESM Packages. - -It would be a problem if Prettier could not use the new Pure ESM Package until we have completed that work. - -So we will put the files bundled with Pure ESM Packages as CommonJS Modules under `/vendors`, and Prettier will use them. - -**This will be removed during the migration to ESM.** - -## Usage - -### `/scripts/vendors/bundle-vendors.mjs` - -```bash -yarn vendors:bundle -``` - -This script do the following 4 things: - -**1. Bundle ESM Packages to CommonJS** - -Bundles listed packages in `vendors.mjs` into `/vendors/*.js` as CommonJS. - -**2. Save vendors license info** - -Saves vendors licenses info to `vendor-meta.json`. - -**3. Generate `/vendors/*.d.ts`** - -Generates a definition files that satisfies `lint:typecheck` for each vendors. diff --git a/scripts/vendors/bundle-vendors.mjs b/scripts/vendors/bundle-vendors.mjs deleted file mode 100644 index 50d1c6872fcf..000000000000 --- a/scripts/vendors/bundle-vendors.mjs +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env node - -import fs from "node:fs/promises"; -import path from "node:path"; -import assert from "node:assert"; -import createEsmUtils from "esm-utils"; -import esbuild from "esbuild"; -import { outdent } from "outdent"; -import { PROJECT_ROOT, writeJson } from "../utils/index.mjs"; -import esbuildPluginLicense from "../build/esbuild-plugins/license.mjs"; -import vendors from "./vendors.mjs"; -import { - vendorsDirectory, - vendorMetaFile, - saveVendorLicenses, - saveVendorEntry, -} from "./utils.mjs"; -import esbuildPluginTsNocheck from "./esbuild-plugin-ts-nocheck.mjs"; - -const { require } = createEsmUtils(import.meta); -// prettier/vendors/*.js -const getVendorFilePath = (vendorName, extension = "js") => - path.join(vendorsDirectory, `${vendorName}.${extension}`); - -// Unsafe, but good enough for now. -const isJson = (value) => { - try { - assert.deepStrictEqual(JSON.parse(JSON.stringify(value)), { ...value }); - return true; - } catch { - return false; - } -}; - -async function clean() { - for (const directoryOrFile of [vendorsDirectory, vendorMetaFile]) { - try { - await fs.rm(directoryOrFile, { recursive: true, force: true }); - } catch { - // No op - } - } -} - -async function generateDts({ vendor, module }) { - const hasDefault = Boolean(module.default); - await fs.writeFile( - path.join(vendorsDirectory, `${vendor}.d.ts`), - [ - "// This file is generated automatically.", - hasDefault ? `export {default} from "${vendor}";` : null, - `export * from "${vendor}";`, - "", - ] - .filter((line) => line !== null) - .join("\n"), - "utf8" - ); -} - -async function bundle(vendor, options) { - const outfile = getVendorFilePath(vendor); - - /** @type {import("esbuild").CommonOptions} */ - const esbuildOption = { - entryPoints: [require.resolve(vendor)], - bundle: true, - target: ["node12.17.0"], - platform: "node", - plugins: [ - esbuildPluginTsNocheck(), - esbuildPluginLicense({ - cwd: PROJECT_ROOT, - thirdParty: { - includePrivate: true, - output: options.onLicenseFound, - }, - }), - ], - outfile, - }; - await esbuild.build(esbuildOption); - - // Still running esbuild, because we want collect license - const module = await import(vendor); - if (isJson(module)) { - await fs.rm(outfile); - const file = getVendorFilePath(vendor, "json"); - await writeJson(file, module); - saveVendorEntry(vendor, file); - return; - } - - await generateDts({ vendor, module }); - saveVendorEntry(vendor, outfile); -} - -async function main() { - await clean(); - - const licenses = []; - for (const vendor of vendors) { - await bundle(vendor, { - onLicenseFound(dependencies) { - licenses.push(...dependencies); - }, - }); - console.log(`Bundled: ${vendor}`); - } - - await saveVendorLicenses(licenses); - console.log("Vendor licenses saved"); - - await fs.writeFile( - path.join(vendorsDirectory, "README.md"), - outdent` - # \`./vendors\` - - **JavaScript Files that included in this directory are auto generated by [\`/scripts/vendor/bundle-vendors.mjs\`](../scripts/vendors/bundle-vendors.mjs).** - - See [\`/scripts/vendors/README.md\`](../scripts/vendors/README.md) for the context. - ` + "\n" - ); - console.log("`README.md` file saved"); -} - -await main(); diff --git a/scripts/vendors/esbuild-plugin-ts-nocheck.mjs b/scripts/vendors/esbuild-plugin-ts-nocheck.mjs deleted file mode 100644 index 17c0d0b22e5a..000000000000 --- a/scripts/vendors/esbuild-plugin-ts-nocheck.mjs +++ /dev/null @@ -1,20 +0,0 @@ -import fs from "node:fs"; - -const tsNoCheck = "// @ts-nocheck\n// This file is generated automatically\n"; - -export default function esbuildPluginTsNocheck() { - return { - name: "ts-no-check", - setup(build) { - const options = build.initialOptions; - const { outfile } = options; - build.onEnd(() => { - if (!fs.existsSync(outfile)) { - throw new Error(`${outfile} not exists`); - } - const text = fs.readFileSync(outfile, "utf8"); - fs.writeFileSync(outfile, tsNoCheck + text); - }); - }, - }; -} diff --git a/scripts/vendors/utils.mjs b/scripts/vendors/utils.mjs deleted file mode 100644 index ee65078ae2fa..000000000000 --- a/scripts/vendors/utils.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import { PROJECT_ROOT, readJson, writeJson } from "../utils/index.mjs"; - -export const vendorsDirectory = path.join(PROJECT_ROOT, "vendors"); -export const vendorMetaFile = new URL("./vendor-meta.json", import.meta.url); -const getMeta = () => - fs.existsSync(vendorMetaFile) ? readJson(vendorMetaFile) : {}; - -export async function saveVendorLicenses(licenses) { - const meta = await getMeta(); - meta.licenses = licenses; - await writeJson(vendorMetaFile, meta); -} - -export async function saveVendorEntry(vendorName, file) { - const meta = await getMeta(); - meta.entries = { - ...meta.entries, - [vendorName]: path.relative(vendorsDirectory, file), - }; - await writeJson(vendorMetaFile, meta); -} diff --git a/scripts/vendors/vendor-meta.json b/scripts/vendors/vendor-meta.json deleted file mode 100644 index 0f2a7d6f7651..000000000000 --- a/scripts/vendors/vendor-meta.json +++ /dev/null @@ -1,1662 +0,0 @@ -{ - "entries": { - "chalk": "chalk.js", - "css-units-list": "css-units-list.json", - "escape-string-regexp": "escape-string-regexp.js", - "execa": "execa.js", - "html-element-attributes": "html-element-attributes.json", - "html-tag-names": "html-tag-names.json", - "leven": "leven.js", - "mem": "mem.js", - "sdbm": "sdbm.js", - "string-width": "string-width.js", - "strip-ansi": "strip-ansi.js" - }, - "licenses": [ - { - "name": "chalk", - "maintainers": [], - "version": "5.0.1", - "description": "Terminal string styling done right", - "repository": "chalk/chalk", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "css-units-list", - "maintainers": [], - "version": "1.1.0", - "description": "List of CSS:Cascading Style Sheets Units", - "repository": "fisker/css-units-list", - "homepage": "https://github.com/fisker/css-units-list#readme", - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) fisker Cheung (https://www.fiskercheung.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": { - "name": "fisker Cheung", - "email": "lionkay@gmail.com", - "url": "https://www.fiskercheung.com/" - }, - "contributors": [] - }, - { - "name": "escape-string-regexp", - "maintainers": [], - "version": "5.0.0", - "description": "Escape RegExp special characters", - "repository": "sindresorhus/escape-string-regexp", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "isexe", - "maintainers": [], - "version": "2.0.0", - "description": "Minimal module to check if a file is executable.", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" - }, - "homepage": "https://github.com/isaacs/isexe#readme", - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "which", - "maintainers": [], - "version": "2.0.2", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "contributors": [] - }, - { - "name": "path-key", - "maintainers": [], - "version": "3.1.1", - "description": "Get the PATH environment variable key cross-platform", - "repository": "sindresorhus/path-key", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "cross-spawn", - "maintainers": [], - "version": "7.0.3", - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "repository": { - "type": "git", - "url": "git@github.com:moxystudio/node-cross-spawn.git" - }, - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2018 Made With MOXY Lda \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "André Cruz", - "email": "andre@moxy.studio", - "url": null - }, - "contributors": [] - }, - { - "name": "shebang-regex", - "maintainers": [], - "version": "3.0.0", - "description": "Regular expression for matching a shebang line", - "repository": "sindresorhus/shebang-regex", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "shebang-command", - "maintainers": [], - "version": "2.0.0", - "description": "Get the command from a shebang", - "repository": "kevva/shebang-command", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Kevin Mårtensson (github.com/kevva)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Kevin Mårtensson", - "email": "kevinmartensson@gmail.com", - "url": "github.com/kevva" - }, - "contributors": [] - }, - { - "name": "strip-final-newline", - "maintainers": [], - "version": "3.0.0", - "description": "Strip the final newline character from a string/buffer", - "repository": "sindresorhus/strip-final-newline", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "npm-run-path", - "maintainers": [], - "version": "5.1.0", - "description": "Get your PATH prepended with locally installed binaries", - "repository": "sindresorhus/npm-run-path", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "mimic-fn", - "maintainers": [], - "version": "4.0.0", - "description": "Make a function mimic another one", - "repository": "sindresorhus/mimic-fn", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "onetime", - "maintainers": [], - "version": "6.0.0", - "description": "Ensure a function is only called once", - "repository": "sindresorhus/onetime", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "human-signals", - "maintainers": [], - "version": "3.0.1", - "description": "Human-friendly process signals", - "repository": "ehmicky/human-signals", - "homepage": "https://git.io/JeluP", - "private": false, - "license": "Apache-2.0", - "licenseText": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright 2021 ehmicky \n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n", - "author": { - "name": "ehmicky", - "email": "ehmicky@gmail.com", - "url": "https://github.com/ehmicky" - }, - "contributors": [] - }, - { - "name": "execa", - "maintainers": [], - "version": "6.1.0", - "description": "Process execution for humans", - "repository": "sindresorhus/execa", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "signal-exit", - "maintainers": [], - "version": "3.0.7", - "description": "when you want to fire an event no matter how a process exits.", - "repository": { - "type": "git", - "url": "https://github.com/tapjs/signal-exit.git" - }, - "homepage": "https://github.com/tapjs/signal-exit", - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) 2015, Contributors\n\nPermission to use, copy, modify, and/or distribute this software\nfor any purpose with or without fee is hereby granted, provided\nthat the above copyright notice and this permission notice\nappear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE\nLIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES\nOR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,\nWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\nARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com", - "url": null - }, - "contributors": [] - }, - { - "name": "is-stream", - "maintainers": [], - "version": "3.0.0", - "description": "Check if something is a Node.js stream", - "repository": "sindresorhus/is-stream", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "get-stream", - "maintainers": [], - "version": "6.0.1", - "description": "Get a stream as a string, buffer, or array", - "repository": "sindresorhus/get-stream", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "merge-stream", - "maintainers": [], - "version": "2.0.0", - "description": "Create a stream that emits events from multiple other streams", - "repository": "grncdr/merge-stream", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Stephen Sugden (stephensugden.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Stephen Sugden", - "email": "me@stephensugden.com", - "url": null - }, - "contributors": [] - }, - { - "name": "html-element-attributes", - "maintainers": [], - "version": "3.1.0", - "description": "Map of HTML elements to allowed attributes", - "repository": "wooorm/html-element-attributes", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "(The MIT License)\n\nCopyright (c) 2016 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Titus Wormer", - "email": "tituswormer@gmail.com", - "url": "https://wooorm.com" - }, - "contributors": [ - { - "name": "Titus Wormer", - "email": "tituswormer@gmail.com", - "url": "https://wooorm.com" - } - ] - }, - { - "name": "html-tag-names", - "maintainers": [], - "version": "2.0.1", - "description": "List of known HTML tag names", - "repository": "wooorm/html-tag-names", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "(The MIT License)\n\nCopyright (c) 2016 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Titus Wormer", - "email": "tituswormer@gmail.com", - "url": "https://wooorm.com" - }, - "contributors": [ - { - "name": "Titus Wormer", - "email": "tituswormer@gmail.com", - "url": "https://wooorm.com" - }, - { - "name": "Valerio Coltrè", - "email": "mister.gamer@gmail.com", - "url": null - } - ] - }, - { - "name": "leven", - "maintainers": [], - "version": "4.0.0", - "description": "Measure the difference between two strings using the Levenshtein distance algorithm", - "repository": "sindresorhus/leven", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "mimic-fn", - "maintainers": [], - "version": "4.0.0", - "description": "Make a function mimic another one", - "repository": "sindresorhus/mimic-fn", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "p-defer", - "maintainers": [], - "version": "1.0.0", - "description": "Create a deferred promise", - "repository": "sindresorhus/p-defer", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "map-age-cleaner", - "maintainers": [], - "version": "0.1.3", - "description": "Automatically cleanup expired items in a Map", - "repository": "SamVerschueren/map-age-cleaner", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sam Verschueren (github.com/SamVerschueren)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sam Verschueren", - "email": "sam.verschueren@gmail.com", - "url": "github.com/SamVerschueren" - }, - "contributors": [] - }, - { - "name": "mem", - "maintainers": [], - "version": "9.0.2", - "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", - "repository": "sindresorhus/mem", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "sdbm", - "maintainers": [], - "version": "2.0.0", - "description": "SDBM non-cryptographic hash function", - "repository": "sindresorhus/sdbm", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "ansi-regex", - "maintainers": [], - "version": "6.0.1", - "description": "Regular expression for matching ANSI escape codes", - "repository": "chalk/ansi-regex", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "strip-ansi", - "maintainers": [], - "version": "7.0.1", - "description": "Strip ANSI escape codes from a string", - "repository": "chalk/strip-ansi", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "is-fullwidth-code-point", - "maintainers": [], - "version": "4.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "repository": "sindresorhus/is-fullwidth-code-point", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "emoji-regex", - "maintainers": [], - "version": "9.2.2", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "homepage": "https://mths.be/emoji-regex", - "private": false, - "license": "MIT", - "licenseText": "Copyright Mathias Bynens \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Mathias Bynens", - "email": null, - "url": "https://mathiasbynens.be/" - }, - "contributors": [] - }, - { - "name": "string-width", - "maintainers": [], - "version": "5.0.1", - "description": "Get the visual width of a string - the number of columns required to display it", - "repository": "sindresorhus/string-width", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "ansi-regex", - "maintainers": [], - "version": "6.0.1", - "description": "Regular expression for matching ANSI escape codes", - "repository": "chalk/ansi-regex", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "strip-ansi", - "maintainers": [], - "version": "7.0.1", - "description": "Strip ANSI escape codes from a string", - "repository": "chalk/strip-ansi", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "crypto-random-string", - "maintainers": [], - "version": "4.0.0", - "description": "Generate a cryptographically strong random string", - "repository": "sindresorhus/crypto-random-string", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "unique-string", - "maintainers": [], - "version": "3.0.0", - "description": "Generate a unique random string", - "repository": "sindresorhus/unique-string", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "temp-dir", - "maintainers": [], - "version": "2.0.0", - "description": "Get the real path of the system temp directory", - "repository": "sindresorhus/temp-dir", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "is-stream", - "maintainers": [], - "version": "3.0.0", - "description": "Check if something is a Node.js stream", - "repository": "sindresorhus/is-stream", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "array-union", - "maintainers": [], - "version": "2.1.0", - "description": "Create an array of unique values, in order, from the input arrays", - "repository": "sindresorhus/array-union", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "merge2", - "maintainers": [], - "version": "1.4.1", - "description": "Merge multiple streams into one stream in sequence or parallel.", - "repository": { - "type": "git", - "url": "git@github.com:teambition/merge2.git" - }, - "homepage": "https://github.com/teambition/merge2", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-2020 Teambition\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "fast-glob", - "maintainers": [], - "version": "3.2.12", - "description": "It's a very fast and efficient glob library for Node.js", - "repository": "mrmlnc/fast-glob", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Denis Malinochkin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": { - "name": "Denis Malinochkin", - "email": null, - "url": "https://mrmlnc.com" - }, - "contributors": [] - }, - { - "name": "is-extglob", - "maintainers": [], - "version": "2.1.1", - "description": "Returns true if a string has an extglob.", - "repository": "jonschlinkert/is-extglob", - "homepage": "https://github.com/jonschlinkert/is-extglob", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-2016, Jon Schlinkert\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [] - }, - { - "name": "is-glob", - "maintainers": [], - "version": "4.0.3", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "repository": "micromatch/is-glob", - "homepage": "https://github.com/micromatch/is-glob", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-2017, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": "Brian Woodward", - "email": null, - "url": "https://twitter.com/doowb" - }, - { - "name": "Daniel Perez", - "email": null, - "url": "https://tuvistavie.com" - }, - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - } - ] - }, - { - "name": "glob-parent", - "maintainers": [], - "version": "5.1.2", - "description": "Extract the non-magic parent path from a glob string.", - "repository": "gulpjs/glob-parent", - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) 2015, 2019 Elan Shanker\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "https://gulpjs.com/" - }, - "contributors": [ - { - "name": "Elan Shanker", - "email": null, - "url": "https://github.com/es128" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": null - } - ] - }, - { - "name": "braces", - "maintainers": [], - "version": "3.0.2", - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "repository": "micromatch/braces", - "homepage": "https://github.com/micromatch/braces", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-2018, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": "Brian Woodward", - "email": null, - "url": "https://twitter.com/doowb" - }, - { - "name": "Elan Shanker", - "email": null, - "url": "https://github.com/es128" - }, - { - "name": "Eugene Sharygin", - "email": null, - "url": "https://github.com/eush77" - }, - { - "name": "hemanth.hm", - "email": null, - "url": "http://h3manth.com" - }, - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - } - ] - }, - { - "name": "is-number", - "maintainers": [], - "version": "7.0.0", - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "repository": "jonschlinkert/is-number", - "homepage": "https://github.com/jonschlinkert/is-number", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-present, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Olsten Larck", - "email": null, - "url": "https://i.am.charlike.online" - }, - { - "name": "Rouven Weßling", - "email": null, - "url": "www.rouvenwessling.de" - } - ] - }, - { - "name": "to-regex-range", - "maintainers": [], - "version": "5.0.1", - "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", - "repository": "micromatch/to-regex-range", - "homepage": "https://github.com/micromatch/to-regex-range", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2015-present, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Rouven Weßling", - "email": null, - "url": "www.rouvenwessling.de" - } - ] - }, - { - "name": "fill-range", - "maintainers": [], - "version": "7.0.1", - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "repository": "jonschlinkert/fill-range", - "homepage": "https://github.com/jonschlinkert/fill-range", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-present, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": "Edo Rivai", - "email": null, - "url": "edo.rivai.nl" - }, - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Paul Miller", - "email": null, - "url": "paulmillr.com" - }, - { - "name": "Rouven Weßling", - "email": null, - "url": "www.rouvenwessling.de" - }, - { - "name": null, - "email": null, - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ] - }, - { - "name": "picomatch", - "maintainers": [], - "version": "2.3.1", - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "repository": "micromatch/picomatch", - "homepage": "https://github.com/micromatch/picomatch", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2017-present, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [] - }, - { - "name": "micromatch", - "maintainers": [], - "version": "4.0.5", - "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.", - "repository": "micromatch/micromatch", - "homepage": "https://github.com/micromatch/micromatch", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2014-present, Jon Schlinkert.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Jon Schlinkert", - "email": null, - "url": "https://github.com/jonschlinkert" - }, - "contributors": [ - { - "name": null, - "email": null, - "url": "https://github.com/DianeLooney" - }, - { - "name": "Amila Welihinda", - "email": null, - "url": "amilajack.com" - }, - { - "name": "Bogdan Chadkin", - "email": null, - "url": "https://github.com/TrySound" - }, - { - "name": "Brian Woodward", - "email": null, - "url": "https://twitter.com/doowb" - }, - { - "name": "Devon Govett", - "email": null, - "url": "http://badassjs.com" - }, - { - "name": "Elan Shanker", - "email": null, - "url": "https://github.com/es128" - }, - { - "name": "Fabrício Matté", - "email": null, - "url": "https://ultcombo.js.org" - }, - { - "name": "Jon Schlinkert", - "email": null, - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Martin Kolárik", - "email": null, - "url": "https://kolarik.sk" - }, - { - "name": "Olsten Larck", - "email": null, - "url": "https://i.am.charlike.online" - }, - { - "name": "Paul Miller", - "email": null, - "url": "paulmillr.com" - }, - { - "name": "Tom Byrer", - "email": null, - "url": "https://github.com/tomByrer" - }, - { - "name": "Tyler Akins", - "email": null, - "url": "http://rumkin.com" - }, - { - "name": "Peter Bright", - "email": "drpizza@quiscalusmexicanus.org", - "url": "https://github.com/drpizza" - }, - { - "name": "Kuba Juszczyk", - "email": null, - "url": "https://github.com/ku8ar" - } - ] - }, - { - "name": "@nodelib/fs.stat", - "maintainers": [], - "version": "2.0.5", - "description": "Get the status of a file with some features", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Denis Malinochkin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "queue-microtask", - "maintainers": [], - "version": "1.2.3", - "description": "fast, tiny `queueMicrotask` shim for modern engines", - "repository": { - "type": "git", - "url": "git://github.com/feross/queue-microtask.git" - }, - "homepage": "https://github.com/feross/queue-microtask", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Feross Aboukhadijeh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "contributors": [] - }, - { - "name": "run-parallel", - "maintainers": [], - "version": "1.2.0", - "description": "Run an array of functions in parallel", - "repository": { - "type": "git", - "url": "git://github.com/feross/run-parallel.git" - }, - "homepage": "https://github.com/feross/run-parallel", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Feross Aboukhadijeh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "contributors": [] - }, - { - "name": "@nodelib/fs.scandir", - "maintainers": [], - "version": "2.1.5", - "description": "List files and directories inside the specified directory", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Denis Malinochkin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "reusify", - "maintainers": [], - "version": "1.0.4", - "description": "Reuse objects and functions with style", - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/reusify.git" - }, - "homepage": "https://github.com/mcollina/reusify#readme", - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2015 Matteo Collina\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com", - "url": null - }, - "contributors": [] - }, - { - "name": "fastq", - "maintainers": [], - "version": "1.14.0", - "description": "Fast, in memory work queue", - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/fastq.git" - }, - "homepage": "https://github.com/mcollina/fastq#readme", - "private": false, - "license": "ISC", - "licenseText": "Copyright (c) 2015-2020, Matteo Collina \n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com", - "url": null - }, - "contributors": [] - }, - { - "name": "@nodelib/fs.walk", - "maintainers": [], - "version": "1.2.8", - "description": "A library for efficiently walking a directory recursively", - "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Denis Malinochkin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "path-type", - "maintainers": [], - "version": "4.0.0", - "description": "Check if a path is a file, directory, or symlink", - "repository": "sindresorhus/path-type", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "dir-glob", - "maintainers": [], - "version": "3.0.1", - "description": "Convert directories to glob compatible strings", - "repository": "kevva/dir-glob", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Kevin Mårtensson (github.com/kevva)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Kevin Mårtensson", - "email": "kevinmartensson@gmail.com", - "url": "github.com/kevva" - }, - "contributors": [] - }, - { - "name": "ignore", - "maintainers": [], - "version": "5.2.4", - "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", - "repository": { - "type": "git", - "url": "git@github.com:kaelzhang/node-ignore.git" - }, - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "Copyright (c) 2013 Kael Zhang , contributors\nhttp://kael.me/\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "author": { - "name": "kael", - "email": null, - "url": null - }, - "contributors": [] - }, - { - "name": "slash", - "maintainers": [], - "version": "3.0.0", - "description": "Convert Windows backslash paths to slash paths", - "repository": "sindresorhus/slash", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "globby", - "maintainers": [], - "version": "11.1.0", - "description": "User-friendly glob matching", - "repository": "sindresorhus/globby", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "graceful-fs", - "maintainers": [], - "version": "4.2.10", - "description": "A drop-in replacement for fs, making various improvements.", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-graceful-fs" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": null, - "contributors": [] - }, - { - "name": "is-path-cwd", - "maintainers": [], - "version": "2.2.0", - "description": "Check if a path is the current working directory", - "repository": "sindresorhus/is-path-cwd", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "is-path-inside", - "maintainers": [], - "version": "3.0.3", - "description": "Check if a path is inside another path", - "repository": "sindresorhus/is-path-inside", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "fs.realpath", - "maintainers": [], - "version": "1.0.0", - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n----\n\nThis library bundles a version of the `fs.realpath` and `fs.realpathSync`\nmethods from Node.js v0.10 under the terms of the Node.js MIT license.\n\nNode's license follows, also included at the header of `old.js` which contains\nthe licensed code:\n\n Copyright Joyent, Inc. and other Node contributors.\n\n Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the \"Software\"),\n to deal in the Software without restriction, including without limitation\n the rights to use, copy, modify, merge, publish, distribute, sublicense,\n and/or sell copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "concat-map", - "maintainers": [], - "version": "0.0.1", - "description": "concatenative mapdashery", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "This software is released under the MIT license:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "contributors": [] - }, - { - "name": "balanced-match", - "maintainers": [], - "version": "1.0.2", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "private": false, - "license": "MIT", - "licenseText": "(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "contributors": [] - }, - { - "name": "brace-expansion", - "maintainers": [], - "version": "1.1.11", - "description": "Brace expansion as known from sh/bash", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) 2013 Julian Gruber \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "contributors": [] - }, - { - "name": "minimatch", - "maintainers": [], - "version": "3.1.2", - "description": "a glob matcher in javascript", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "contributors": [] - }, - { - "name": "inherits", - "maintainers": [], - "version": "2.0.4", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "repository": "git://github.com/isaacs/inherits", - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n\n", - "author": null, - "contributors": [] - }, - { - "name": "path-is-absolute", - "maintainers": [], - "version": "1.0.1", - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "repository": "sindresorhus/path-is-absolute", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "The MIT License (MIT)\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "glob", - "maintainers": [], - "version": "7.2.3", - "description": "a little globber", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n## Glob Logo\n\nGlob's logo created by Tanya Brassie , licensed\nunder a Creative Commons Attribution-ShareAlike 4.0 International License\nhttps://creativecommons.org/licenses/by-sa/4.0/\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "wrappy", - "maintainers": [], - "version": "1.0.2", - "description": "Callback wrapping utility", - "repository": { - "type": "git", - "url": "https://github.com/npm/wrappy" - }, - "homepage": "https://github.com/npm/wrappy", - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "once", - "maintainers": [], - "version": "1.4.0", - "description": "Run a function exactly one time", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "inflight", - "maintainers": [], - "version": "1.0.6", - "description": "Add callbacks to requests in flight to avoid async duplication", - "repository": { - "type": "git", - "url": "https://github.com/npm/inflight.git" - }, - "homepage": "https://github.com/isaacs/inflight", - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "rimraf", - "maintainers": [], - "version": "3.0.2", - "description": "A deep deletion module for node (like `rm -rf`)", - "repository": "git://github.com/isaacs/rimraf.git", - "homepage": null, - "private": false, - "license": "ISC", - "licenseText": "The ISC License\n\nCopyright (c) Isaac Z. Schlueter and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\nIN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "contributors": [] - }, - { - "name": "indent-string", - "maintainers": [], - "version": "4.0.0", - "description": "Indent each line in a string", - "repository": "sindresorhus/indent-string", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "clean-stack", - "maintainers": [], - "version": "2.2.0", - "description": "Clean up error stack traces", - "repository": "sindresorhus/clean-stack", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "aggregate-error", - "maintainers": [], - "version": "3.1.0", - "description": "Create an error from multiple errors", - "repository": "sindresorhus/aggregate-error", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "p-map", - "maintainers": [], - "version": "4.0.0", - "description": "Map over promises concurrently", - "repository": "sindresorhus/p-map", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "del", - "maintainers": [], - "version": "6.1.1", - "description": "Delete files and directories", - "repository": "sindresorhus/del", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - }, - { - "name": "tempy", - "maintainers": [], - "version": "2.0.0", - "description": "Get a random temporary file or directory path", - "repository": "sindresorhus/tempy", - "homepage": null, - "private": false, - "license": "MIT", - "licenseText": "MIT License\n\nCopyright (c) Sindre Sorhus (https://sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "contributors": [] - } - ] -} diff --git a/scripts/vendors/vendors.mjs b/scripts/vendors/vendors.mjs deleted file mode 100644 index 888fb6345c94..000000000000 --- a/scripts/vendors/vendors.mjs +++ /dev/null @@ -1,16 +0,0 @@ -const vendors = [ - "chalk", - "css-units-list", - "escape-string-regexp", - "execa", - "html-element-attributes", - "html-tag-names", - "leven", - "mem", - "sdbm", - "string-width", - "strip-ansi", - "tempy", -]; - -export default vendors; diff --git a/src/cli/cli-options.evaluate.js b/src/cli/cli-options.evaluate.js new file mode 100644 index 000000000000..79662ca78944 --- /dev/null +++ b/src/cli/cli-options.evaluate.js @@ -0,0 +1,245 @@ +import { outdent } from "outdent"; +import { optionCategories } from "./prettier-internal.js"; + +/** + * { + * [optionName]: { + * // The type of the option. For 'choice', see also `choices` below. + * // When passing a type other than the ones listed below, the option is + * // treated as taking any string as argument, and `--option <${type}>` will + * // be displayed in --help. + * type: "boolean" | "choice" | "int" | string; + * + * // Default value to be passed to the minimist option `default`. + * default?: any; + * + * // Alias name to be passed to the minimist option `alias`. + * alias?: string; + * + * // For grouping options by category in --help. + * category?: string; + * + * // Description to be displayed in --help. If omitted, the option won't be + * // shown at all in --help (but see also `oppositeDescription` below). + * description?: string; + * + * // Description for `--no-${name}` to be displayed in --help. If omitted, + * // `--no-${name}` won't be shown. + * oppositeDescription?: string; + * + * // Indicate if this option is simply passed to the API. + * // true: use camelified name as the API option name. + * // string: use this value as the API option name. + * forwardToApi?: boolean | string; + * + * // Indicate that a CLI flag should be an array when forwarded to the API. + * array?: boolean; + * + * // Specify available choices for validation. They will also be displayed + * // in --help as . + * // Use an object instead of a string if a choice is deprecated and should + * // be treated as `redirect` instead, or if you'd like to add description for + * // the choice. + * choices?: Array< + * | string + * | { value: string, description?: string, deprecated?: boolean, redirect?: string } + * >; + * + * // If the option has a value that is an exception to the regular value + * // constraints, indicate that value here (or use a function for more + * // flexibility). + * exception?: ((value: any) => boolean); + * + * // Indicate that the option is deprecated. Use a string to add an extra + * // message to --help for the option, for example to suggest a replacement + * // option. + * deprecated?: true | string; + * } + * } + * + * Note: The options below are sorted alphabetically. + */ +/* eslint sort-keys: "error" */ +const options = { + cache: { + default: false, + description: "Only format changed files. Cannot use with --stdin-filepath.", + type: "boolean", + }, + cacheLocation: { + description: "Path to the cache file.", + type: "path", + }, + cacheStrategy: { + choices: [ + { + description: "Use the file metadata such as timestamps as cache keys", + value: "metadata", + }, + { + description: "Use the file content as cache keys", + value: "content", + }, + ], + description: "Strategy for the cache to use for detecting changed files.", + type: "choice", + }, + check: { + alias: "c", + category: optionCategories.CATEGORY_OUTPUT, + description: outdent` + Check if the given files are formatted, print a human-friendly summary + message and paths to unformatted files (see also --list-different). + `, + type: "boolean", + }, + color: { + // The colors packages looks directly at + // `process.argv` for `--no-color` and such-like options. The reason it is + // listed here is to avoid "Ignored unknown option: --no-color" warnings. + // See https://github.com/alexeyraspopov/picocolors/blob/0e7c4af2de299dd7bc5916f2bddd151fa2f66740/picocolors.js#L3. + default: true, + description: "Colorize error messages.", + oppositeDescription: "Do not colorize error messages.", + type: "boolean", + }, + config: { + category: optionCategories.CATEGORY_CONFIG, + description: + "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", + exception: (value) => value === false, + oppositeDescription: "Do not look for a configuration file.", + type: "path", + }, + configPrecedence: { + category: optionCategories.CATEGORY_CONFIG, + choices: [ + { + description: "CLI options take precedence over config file", + value: "cli-override", + }, + { + description: "Config file take precedence over CLI options", + value: "file-override", + }, + { + description: outdent` + If a config file is found will evaluate it and ignore other CLI options. + If no config file is found CLI options will evaluate as normal. + `, + value: "prefer-file", + }, + ], + default: "cli-override", + description: + "Define in which order config files and CLI options should be evaluated.", + type: "choice", + }, + debugBenchmark: { + // Run the formatting benchmarks. Requires 'benchmark' module to be installed. + type: "boolean", + }, + debugCheck: { + // Run the formatting once again on the formatted output, throw if different. + type: "boolean", + }, + debugPrintAst: { + type: "boolean", + }, + debugPrintComments: { + type: "boolean", + }, + debugPrintDoc: { + type: "boolean", + }, + debugRepeat: { + // Repeat the formatting a few times and measure the average duration. + default: 0, + type: "int", + }, + editorconfig: { + category: optionCategories.CATEGORY_CONFIG, + default: true, + description: "Take .editorconfig into account when parsing configuration.", + oppositeDescription: + "Don't take .editorconfig into account when parsing configuration.", + type: "boolean", + }, + errorOnUnmatchedPattern: { + oppositeDescription: "Prevent errors when pattern is unmatched.", + type: "boolean", + }, + fileInfo: { + description: outdent` + Extract the following info (as JSON) for a given file path. Reported fields: + * ignored (boolean) - true if file path is filtered by --ignore-path + * inferredParser (string | null) - name of parser inferred from file path + `, + type: "path", + }, + findConfigPath: { + category: optionCategories.CATEGORY_CONFIG, + description: + "Find and print the path to a configuration file for the given input file.", + type: "path", + }, + help: { + alias: "h", + description: outdent` + Show CLI usage, or details about the given flag. + Example: --help write + `, + exception: (value) => value === "", + type: "flag", + }, + ignorePath: { + array: true, + category: optionCategories.CATEGORY_CONFIG, + default: [{ value: [".gitignore", ".prettierignore"] }], + description: outdent` + Path to a file with patterns describing files to ignore. + Multiple values are accepted. + `, + type: "path", + }, + ignoreUnknown: { + alias: "u", + description: "Ignore unknown files.", + type: "boolean", + }, + listDifferent: { + alias: "l", + category: optionCategories.CATEGORY_OUTPUT, + description: + "Print the names of files that are different from Prettier's formatting (see also --check).", + type: "boolean", + }, + logLevel: { + choices: ["silent", "error", "warn", "log", "debug"], + default: "log", + description: "What level of logs to report.", + type: "choice", + }, + supportInfo: { + description: "Print support information as JSON.", + type: "boolean", + }, + version: { + alias: "v", + description: "Print Prettier version.", + type: "boolean", + }, + withNodeModules: { + category: optionCategories.CATEGORY_CONFIG, + description: "Process files inside 'node_modules' directory.", + type: "boolean", + }, + write: { + alias: "w", + category: optionCategories.CATEGORY_OUTPUT, + description: "Edit files in-place. (Beware!)", + type: "boolean", + }, +}; + +export default options; diff --git a/src/cli/constant.js b/src/cli/constant.js deleted file mode 100644 index 33a64f3d180f..000000000000 --- a/src/cli/constant.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; - -const { outdent } = require("outdent"); -const { coreOptions } = require("./prettier-internal.js"); - -const categoryOrder = [ - coreOptions.CATEGORY_OUTPUT, - coreOptions.CATEGORY_FORMAT, - coreOptions.CATEGORY_CONFIG, - coreOptions.CATEGORY_EDITOR, - coreOptions.CATEGORY_OTHER, -]; - -/** - * { - * [optionName]: { - * // The type of the option. For 'choice', see also `choices` below. - * // When passing a type other than the ones listed below, the option is - * // treated as taking any string as argument, and `--option <${type}>` will - * // be displayed in --help. - * type: "boolean" | "choice" | "int" | string; - * - * // Default value to be passed to the minimist option `default`. - * default?: any; - * - * // Alias name to be passed to the minimist option `alias`. - * alias?: string; - * - * // For grouping options by category in --help. - * category?: string; - * - * // Description to be displayed in --help. If omitted, the option won't be - * // shown at all in --help (but see also `oppositeDescription` below). - * description?: string; - * - * // Description for `--no-${name}` to be displayed in --help. If omitted, - * // `--no-${name}` won't be shown. - * oppositeDescription?: string; - * - * // Indicate if this option is simply passed to the API. - * // true: use camelified name as the API option name. - * // string: use this value as the API option name. - * forwardToApi?: boolean | string; - * - * // Indicate that a CLI flag should be an array when forwarded to the API. - * array?: boolean; - * - * // Specify available choices for validation. They will also be displayed - * // in --help as . - * // Use an object instead of a string if a choice is deprecated and should - * // be treated as `redirect` instead, or if you'd like to add description for - * // the choice. - * choices?: Array< - * | string - * | { value: string, description?: string, deprecated?: boolean, redirect?: string } - * >; - * - * // If the option has a value that is an exception to the regular value - * // constraints, indicate that value here (or use a function for more - * // flexibility). - * exception?: ((value: any) => boolean); - * - * // Indicate that the option is deprecated. Use a string to add an extra - * // message to --help for the option, for example to suggest a replacement - * // option. - * deprecated?: true | string; - * } - * } - * - * Note: The options below are sorted alphabetically. - */ -/* eslint sort-keys: "error" */ -const options = { - cache: { - default: false, - description: "Only format changed files. Cannot use with --stdin-filepath.", - type: "boolean", - }, - "cache-location": { - description: "Path to the cache file.", - type: "path", - }, - "cache-strategy": { - choices: [ - { - description: "Use the file metadata such as timestamps as cache keys", - value: "metadata", - }, - { - description: "Use the file content as cache keys", - value: "content", - }, - ], - description: "Strategy for the cache to use for detecting changed files.", - type: "choice", - }, - check: { - alias: "c", - category: coreOptions.CATEGORY_OUTPUT, - description: outdent` - Check if the given files are formatted, print a human-friendly summary - message and paths to unformatted files (see also --list-different). - `, - type: "boolean", - }, - color: { - // The supports-color package (a sub sub dependency) looks directly at - // `process.argv` for `--no-color` and such-like options. The reason it is - // listed here is to avoid "Ignored unknown option: --no-color" warnings. - // See https://github.com/chalk/supports-color/#info for more information. - default: true, - description: "Colorize error messages.", - oppositeDescription: "Do not colorize error messages.", - type: "boolean", - }, - config: { - category: coreOptions.CATEGORY_CONFIG, - description: - "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", - exception: (value) => value === false, - oppositeDescription: "Do not look for a configuration file.", - type: "path", - }, - "config-precedence": { - category: coreOptions.CATEGORY_CONFIG, - choices: [ - { - description: "CLI options take precedence over config file", - value: "cli-override", - }, - { - description: "Config file take precedence over CLI options", - value: "file-override", - }, - { - description: outdent` - If a config file is found will evaluate it and ignore other CLI options. - If no config file is found CLI options will evaluate as normal. - `, - value: "prefer-file", - }, - ], - default: "cli-override", - description: - "Define in which order config files and CLI options should be evaluated.", - type: "choice", - }, - "debug-benchmark": { - // Run the formatting benchmarks. Requires 'benchmark' module to be installed. - type: "boolean", - }, - "debug-check": { - // Run the formatting once again on the formatted output, throw if different. - type: "boolean", - }, - "debug-print-ast": { - type: "boolean", - }, - "debug-print-comments": { - type: "boolean", - }, - "debug-print-doc": { - type: "boolean", - }, - "debug-repeat": { - // Repeat the formatting a few times and measure the average duration. - default: 0, - type: "int", - }, - editorconfig: { - category: coreOptions.CATEGORY_CONFIG, - default: true, - description: "Take .editorconfig into account when parsing configuration.", - oppositeDescription: - "Don't take .editorconfig into account when parsing configuration.", - type: "boolean", - }, - "error-on-unmatched-pattern": { - oppositeDescription: "Prevent errors when pattern is unmatched.", - type: "boolean", - }, - "file-info": { - description: outdent` - Extract the following info (as JSON) for a given file path. Reported fields: - * ignored (boolean) - true if file path is filtered by --ignore-path - * inferredParser (string | null) - name of parser inferred from file path - `, - type: "path", - }, - "find-config-path": { - category: coreOptions.CATEGORY_CONFIG, - description: - "Find and print the path to a configuration file for the given input file.", - type: "path", - }, - help: { - alias: "h", - description: outdent` - Show CLI usage, or details about the given flag. - Example: --help write - `, - exception: (value) => value === "", - type: "flag", - }, - "ignore-path": { - category: coreOptions.CATEGORY_CONFIG, - default: ".prettierignore", - description: "Path to a file with patterns describing files to ignore.", - type: "path", - }, - "ignore-unknown": { - alias: "u", - description: "Ignore unknown files.", - type: "boolean", - }, - "list-different": { - alias: "l", - category: coreOptions.CATEGORY_OUTPUT, - description: - "Print the names of files that are different from Prettier's formatting (see also --check).", - type: "boolean", - }, - loglevel: { - choices: ["silent", "error", "warn", "log", "debug"], - default: "log", - description: "What level of logs to report.", - type: "choice", - }, - "plugin-search": { - oppositeDescription: "Disable plugin autoloading.", - type: "boolean", - }, - "support-info": { - description: "Print support information as JSON.", - type: "boolean", - }, - version: { - alias: "v", - description: "Print Prettier version.", - type: "boolean", - }, - "with-node-modules": { - category: coreOptions.CATEGORY_CONFIG, - description: "Process files inside 'node_modules' directory.", - type: "boolean", - }, - write: { - alias: "w", - category: coreOptions.CATEGORY_OUTPUT, - description: "Edit files in-place. (Beware!)", - type: "boolean", - }, -}; - -const usageSummary = outdent` - Usage: prettier [options] [file/dir/glob ...] - - By default, output is written to stdout. - Stdin is read if it is piped to Prettier and no files are given. -`; - -module.exports = { - categoryOrder, - options, - usageSummary, -}; diff --git a/src/cli/constants.evaluate.js b/src/cli/constants.evaluate.js new file mode 100644 index 000000000000..863c5a1af4c2 --- /dev/null +++ b/src/cli/constants.evaluate.js @@ -0,0 +1,19 @@ +import { outdent } from "outdent"; +import { optionCategories } from "./prettier-internal.js"; + +const categoryOrder = [ + optionCategories.CATEGORY_OUTPUT, + optionCategories.CATEGORY_FORMAT, + optionCategories.CATEGORY_CONFIG, + optionCategories.CATEGORY_EDITOR, + optionCategories.CATEGORY_OTHER, +]; + +const usageSummary = outdent` + Usage: prettier [options] [file/dir/glob ...] + + By default, output is written to stdout. + Stdin is read if it is piped to Prettier and no files are given. +`; + +export { categoryOrder, usageSummary }; diff --git a/src/cli/context.js b/src/cli/context.js index aca12fad3eee..7d7a7d207a04 100644 --- a/src/cli/context.js +++ b/src/cli/context.js @@ -1,12 +1,8 @@ -"use strict"; -const { - utils: { getLast }, -} = require("./prettier-internal.js"); -const getContextOptions = require("./options/get-context-options.js"); -const { +import { getContextOptions } from "./options/get-context-options.js"; +import { parseArgv, parseArgvWithoutPlugins, -} = require("./options/parse-cli-arguments.js"); +} from "./options/parse-cli-arguments.js"; /** * @typedef {Object} Context @@ -16,8 +12,6 @@ const { * @property {string[]} filePatterns * @property {any[]} supportOptions * @property detailedOptions - * @property detailedOptionMap - * @property apiDefaultOptions * @property languages * @property {Partial[]} stack * @property pushContextPlugins @@ -25,49 +19,52 @@ const { */ class Context { + #stack = []; + constructor({ rawArguments, logger }) { this.rawArguments = rawArguments; this.logger = logger; - this.stack = []; + } + + async init() { + const { rawArguments, logger } = this; - const { plugins, pluginSearchDirs } = parseArgvWithoutPlugins( - rawArguments, - logger, - ["plugin", "plugin-search-dir"] - ); + const { plugins } = parseArgvWithoutPlugins(rawArguments, logger, [ + "plugin", + ]); - this.pushContextPlugins(plugins, pluginSearchDirs); + await this.pushContextPlugins(plugins); const argv = parseArgv(rawArguments, this.detailedOptions, logger); this.argv = argv; - this.filePatterns = argv._.map(String); + this.filePatterns = argv._; } /** * @param {string[]} plugins - * @param {string[]=} pluginSearchDirs */ - pushContextPlugins(plugins, pluginSearchDirs) { - const options = getContextOptions(plugins, pluginSearchDirs); - this.stack.push(options); + async pushContextPlugins(plugins) { + const options = await getContextOptions(plugins); + this.#stack.push(options); Object.assign(this, options); } popContextPlugins() { - this.stack.pop(); - Object.assign(this, getLast(this.stack)); + this.#stack.pop(); + Object.assign(this, this.#stack.at(-1)); } // eslint-disable-next-line getter-return get performanceTestFlag() { const { debugBenchmark, debugRepeat } = this.argv; - /* istanbul ignore next */ + /* c8 ignore start */ if (debugBenchmark) { return { name: "--debug-benchmark", debugBenchmark: true, }; } + /* c8 ignore stop */ if (debugRepeat > 0) { return { @@ -76,14 +73,16 @@ class Context { }; } + /* c8 ignore start */ const { PRETTIER_PERF_REPEAT } = process.env; - if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) { + if (PRETTIER_PERF_REPEAT && /^\d+$/u.test(PRETTIER_PERF_REPEAT)) { return { name: "PRETTIER_PERF_REPEAT (environment variable)", debugRepeat: Number(PRETTIER_PERF_REPEAT), }; } + /* c8 ignore stop */ } } -module.exports = Context; +export default Context; diff --git a/src/cli/directory-ignorer.js b/src/cli/directory-ignorer.js new file mode 100644 index 000000000000..89ce3a63e3d7 --- /dev/null +++ b/src/cli/directory-ignorer.js @@ -0,0 +1,42 @@ +import path from "node:path"; + +// Ignores files in version control systems directories and `node_modules` +const alwaysIgnoredDirectories = [".git", ".sl", ".svn", ".hg", ".jj"]; +const withNodeModules = [...alwaysIgnoredDirectories, "node_modules"]; +const cwd = process.cwd(); + +class DirectoryIgnorer { + #directories; + ignorePatterns; + + constructor(shouldIgnoreNodeModules) { + const directories = shouldIgnoreNodeModules + ? withNodeModules + : alwaysIgnoredDirectories; + const patterns = directories.map((directory) => `**/${directory}`); + + this.#directories = new Set(directories); + this.ignorePatterns = patterns; + } + + /** + * @param {string} absolutePathOrPattern + */ + shouldIgnore(absolutePathOrPattern) { + const directoryNames = path + .relative(cwd, absolutePathOrPattern) + .split(path.sep); + return directoryNames.some((directoryName) => + this.#directories.has(directoryName), + ); + } +} + +const directoryIgnorerWithNodeModules = new DirectoryIgnorer( + /* shouldIgnoreNodeModules */ true, +); +const directoryIgnorerWithoutNodeModules = new DirectoryIgnorer( + /* shouldIgnoreNodeModules */ false, +); + +export { directoryIgnorerWithNodeModules, directoryIgnorerWithoutNodeModules }; diff --git a/src/cli/expand-patterns.js b/src/cli/expand-patterns.js index acdf9f575301..6e75e585ed68 100644 --- a/src/cli/expand-patterns.js +++ b/src/cli/expand-patterns.js @@ -1,36 +1,38 @@ -"use strict"; +import path from "node:path"; +import { + directoryIgnorerWithNodeModules, + directoryIgnorerWithoutNodeModules, +} from "./directory-ignorer.js"; +import { fastGlob } from "./prettier-internal.js"; +import { lstatSafe, normalizeToPosix } from "./utils.js"; -const path = require("path"); -const fastGlob = require("fast-glob"); - -const { statSafe } = require("./utils.js"); - -/** @typedef {import('./context').Context} Context */ +/** @import {Context} from './context.js' */ /** * @param {Context} context */ async function* expandPatterns(context) { - const cwd = process.cwd(); const seen = new Set(); let noResults = true; - for await (const pathOrError of expandPatternsInternal(context)) { + for await (const { filePath, ignoreUnknown, error } of expandPatternsInternal( + context, + )) { noResults = false; - if (typeof pathOrError !== "string") { - yield pathOrError; + if (error) { + yield { error }; continue; } - const relativePath = path.relative(cwd, pathOrError); + const filename = path.resolve(filePath); // filter out duplicates - if (seen.has(relativePath)) { + if (seen.has(filename)) { continue; } - seen.add(relativePath); - yield relativePath; + seen.add(filename); + yield { filename, ignoreUnknown }; } if (noResults && context.argv.errorOnUnmatchedPattern !== false) { @@ -45,32 +47,40 @@ async function* expandPatterns(context) { * @param {Context} context */ async function* expandPatternsInternal(context) { - // Ignores files in version control systems directories and `node_modules` - const silentlyIgnoredDirs = [".git", ".sl", ".svn", ".hg"]; - if (context.argv.withNodeModules !== true) { - silentlyIgnoredDirs.push("node_modules"); - } + const directoryIgnorer = + context.argv.withNodeModules === true + ? directoryIgnorerWithoutNodeModules + : directoryIgnorerWithNodeModules; const globOptions = { dot: true, - ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir), + ignore: [...directoryIgnorer.ignorePatterns], + followSymbolicLinks: false, }; - - let supportedFilesGlob; const cwd = process.cwd(); /** @type {Array<{ type: 'file' | 'dir' | 'glob'; glob: string; input: string; }>} */ const entries = []; for (const pattern of context.filePatterns) { - const absolutePath = path.resolve(cwd, pattern); + const absolutePath = path.resolve(pattern); - if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) { + if (directoryIgnorer.shouldIgnore(absolutePath)) { continue; } - const stat = await statSafe(absolutePath); + const stat = await lstatSafe(absolutePath); if (stat) { - if (stat.isFile()) { + if (stat.isSymbolicLink()) { + if (context.argv.errorOnUnmatchedPattern !== false) { + yield { + error: `Explicitly specified pattern "${pattern}" is a symbolic link.`, + }; + } else { + context.logger.debug( + `Skipping pattern "${pattern}", as it is a symbolic link.`, + ); + } + } else if (stat.isFile()) { entries.push({ type: "file", glob: escapePathForGlob(fixWindowsSlashes(pattern)), @@ -83,13 +93,12 @@ async function* expandPatternsInternal(context) { it returns files like 'src/../index.js' */ const relativePath = path.relative(cwd, absolutePath) || "."; + const prefix = escapePathForGlob(fixWindowsSlashes(relativePath)); entries.push({ type: "dir", - glob: - escapePathForGlob(fixWindowsSlashes(relativePath)) + - "/" + - getSupportedFilesGlob(), + glob: `${prefix}/**/*`, input: pattern, + ignoreUnknown: true, }); } } else if (pattern[0] === "!") { @@ -104,15 +113,16 @@ async function* expandPatternsInternal(context) { } } - for (const { type, glob, input } of entries) { + for (const { type, glob, input, ignoreUnknown } of entries) { let result; try { result = await fastGlob(glob, globOptions); } catch ({ message }) { - /* istanbul ignore next */ - yield { error: `${errorMessages.globError[type]}: ${input}\n${message}` }; - /* istanbul ignore next */ + /* c8 ignore next 4 */ + yield { + error: `${errorMessages.globError[type]}: "${input}".\n${message}`, + }; continue; } @@ -121,24 +131,8 @@ async function* expandPatternsInternal(context) { yield { error: `${errorMessages.emptyResults[type]}: "${input}".` }; } } else { - yield* sortPaths(result); - } - } - - function getSupportedFilesGlob() { - if (!supportedFilesGlob) { - const extensions = context.languages.flatMap( - (lang) => lang.extensions || [] - ); - const filenames = context.languages.flatMap( - (lang) => lang.filenames || [] - ); - supportedFilesGlob = `**/{${[ - ...extensions.map((ext) => "*" + (ext[0] === "." ? ext : "." + ext)), - ...filenames, - ]}}`; + yield* sortPaths(result).map((filePath) => ({ filePath, ignoreUnknown })); } - return supportedFilesGlob; } } @@ -155,18 +149,6 @@ const errorMessages = { }, }; -/** - * @param {string} absolutePath - * @param {string} cwd - * @param {string[]} ignoredDirectories - */ -function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) { - return path - .relative(cwd, absolutePath) - .split(path.sep) - .some((dir) => ignoredDirectories.includes(dir)); -} - /** * @param {string[]} paths */ @@ -183,26 +165,18 @@ function sortPaths(paths) { function escapePathForGlob(path) { return fastGlob .escapePath( - path.replace(/\\/g, "\0") // Workaround for fast-glob#262 (part 1) + path.replaceAll("\\", "\0"), // Workaround for fast-glob#262 (part 1) ) - .replace(/\\!/g, "@(!)") // Workaround for fast-glob#261 - .replace(/\0/g, "@(\\\\)"); // Workaround for fast-glob#262 (part 2) + .replaceAll(String.raw`\!`, "@(!)") // Workaround for fast-glob#261 + .replaceAll("\0", String.raw`@(\\)`); // Workaround for fast-glob#262 (part 2) } -const isWindows = path.sep === "\\"; - /** * Using backslashes in globs is probably not okay, but not accepting * backslashes as path separators on Windows is even more not okay. * https://github.com/prettier/prettier/pull/6776#discussion_r380723717 * https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows - * @param {string} pattern */ -function fixWindowsSlashes(pattern) { - return isWindows ? pattern.replace(/\\/g, "/") : pattern; -} +const fixWindowsSlashes = normalizeToPosix; -module.exports = { - expandPatterns, - fixWindowsSlashes, -}; +export { expandPatterns }; diff --git a/src/cli/file-info.js b/src/cli/file-info.js index c13c8243b1da..1b21bdfbc2d4 100644 --- a/src/cli/file-info.js +++ b/src/cli/file-info.js @@ -1,29 +1,28 @@ -"use strict"; - -const stringify = require("fast-json-stable-stringify"); -// eslint-disable-next-line no-restricted-modules -const prettier = require("../index.js"); -const { printToScreen } = require("./utils.js"); +import path from "node:path"; +import stringify from "fast-json-stable-stringify"; +import { format, getFileInfo } from "../index.js"; +import { printToScreen } from "./utils.js"; +// Note: This does not work with `--config-precedence` async function logFileInfoOrDie(context) { const { fileInfo: file, ignorePath, withNodeModules, plugins, - pluginSearchDirs, config, } = context.argv; - const fileInfo = await prettier.getFileInfo(file, { + const fileInfo = await getFileInfo(path.resolve(file), { ignorePath, withNodeModules, - plugins, - pluginSearchDirs, + plugins: plugins.length > 0 ? plugins : undefined, resolveConfig: config !== false, }); - printToScreen(prettier.format(stringify(fileInfo), { parser: "json" })); + const result = await format(stringify(fileInfo), { parser: "json" }); + + printToScreen(result.trim()); } -module.exports = logFileInfoOrDie; +export default logFileInfoOrDie; diff --git a/src/cli/find-cache-file.js b/src/cli/find-cache-file.js index cc6ebee79821..7e58613d9e09 100644 --- a/src/cli/find-cache-file.js +++ b/src/cli/find-cache-file.js @@ -1,17 +1,15 @@ -"use strict"; - -const fs = require("fs").promises; -const os = require("os"); -const path = require("path"); -const findCacheDir = require("find-cache-dir"); -const { statSafe, isJson } = require("./utils.js"); +import fs from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; +import findCacheDirectory from "find-cache-directory"; +import { isJson, statSafe } from "./utils.js"; /** - * Find default cache file (`./node_modules/.cache/prettier/.prettier-cache`) using https://github.com/avajs/find-cache-dir + * Find default cache file (`./node_modules/.cache/prettier/.prettier-cache`) using https://github.com/sindresorhus/find-cache-directory */ function findDefaultCacheFile() { const cacheDir = - findCacheDir({ name: "prettier", create: true }) || os.tmpdir(); + findCacheDirectory({ name: "prettier", create: true }) || os.tmpdir(); const cacheFilePath = path.join(cacheDir, ".prettier-cache"); return cacheFilePath; } @@ -23,7 +21,7 @@ async function findCacheFileFromOption(cacheLocation) { if (stat) { if (stat.isDirectory()) { throw new Error( - `Resolved --cache-location '${cacheFile}' is a directory` + `Resolved --cache-location '${cacheFile}' is a directory`, ); } @@ -48,4 +46,4 @@ async function findCacheFile(cacheLocation) { return cacheFile; } -module.exports = findCacheFile; +export default findCacheFile; diff --git a/src/cli/find-config-path.js b/src/cli/find-config-path.js index 7f2ec6b79f2d..bc752efbb3bd 100644 --- a/src/cli/find-config-path.js +++ b/src/cli/find-config-path.js @@ -1,19 +1,15 @@ -"use strict"; - -const path = require("path"); - -// eslint-disable-next-line no-restricted-modules -const prettier = require("../index.js"); -const { printToScreen } = require("./utils.js"); +import path from "node:path"; +import { resolveConfigFile } from "../index.js"; +import { normalizeToPosix, printToScreen } from "./utils.js"; async function logResolvedConfigPathOrDie(context) { const file = context.argv.findConfigPath; - const configFile = await prettier.resolveConfigFile(file); + const configFile = await resolveConfigFile(file); if (configFile) { - printToScreen(path.relative(process.cwd(), configFile)); + printToScreen(normalizeToPosix(path.relative(process.cwd(), configFile))); } else { - throw new Error(`Can not find configure file for "${file}"`); + throw new Error(`Can not find configure file for "${file}".`); } } -module.exports = logResolvedConfigPathOrDie; +export default logResolvedConfigPathOrDie; diff --git a/src/cli/format-results-cache.js b/src/cli/format-results-cache.js index 4f14c27ca0e9..7cc6b691cd9c 100644 --- a/src/cli/format-results-cache.js +++ b/src/cli/format-results-cache.js @@ -1,16 +1,14 @@ -"use strict"; - // Inspired by LintResultsCache from ESLint // https://github.com/eslint/eslint/blob/c2d0a830754b6099a3325e6d3348c3ba983a677a/lib/cli-engine/lint-result-cache.js -const fileEntryCache = require("file-entry-cache"); -const stringify = require("fast-json-stable-stringify"); -// eslint-disable-next-line no-restricted-modules -const { version: prettierVersion } = require("../index.js"); -const { createHash } = require("./utils.js"); +import fs from "node:fs"; +import stringify from "fast-json-stable-stringify"; +import fileEntryCache from "file-entry-cache"; +import { version as prettierVersion } from "../index.js"; +import { createHash } from "./utils.js"; const optionsHashCache = new WeakMap(); -const nodeVersion = process && process.version; +const nodeVersion = process.version; /** * @param {*} options @@ -21,24 +19,26 @@ function getHashOfOptions(options) { return optionsHashCache.get(options); } const hash = createHash( - `${prettierVersion}_${nodeVersion}_${stringify(options)}` + `${prettierVersion}_${nodeVersion}_${stringify(options)}`, ); optionsHashCache.set(options, hash); return hash; } /** - * @typedef {{ hashOfOptions?: string }} OurMeta - * @typedef {import("file-entry-cache").FileDescriptor} FileDescriptor + * @import {FileDescriptor, FileDescriptorMeta} from "file-entry-cache" * - * @param {import("file-entry-cache").FileDescriptor} fileDescriptor - * @returns {FileDescriptor["meta"] & OurMeta} + * @param {FileDescriptor} fileDescriptor + * @returns {FileDescriptorMeta & {data?: {hashOfOptions?: string }}}} */ function getMetadataFromFileDescriptor(fileDescriptor) { return fileDescriptor.meta; } class FormatResultsCache { + #useChecksum; + #fileEntryCache; + /** * @param {string} cacheFileLocation The path of cache file location. (default: `node_modules/.cache/prettier/.prettier-cache`) * @param {string} cacheStrategy @@ -46,12 +46,26 @@ class FormatResultsCache { constructor(cacheFileLocation, cacheStrategy) { const useChecksum = cacheStrategy === "content"; - this.cacheFileLocation = cacheFileLocation; - this.fileEntryCache = fileEntryCache.create( - /* cacheId */ cacheFileLocation, - /* directory */ undefined, - useChecksum - ); + try { + this.#fileEntryCache = fileEntryCache.createFromFile( + /* filePath */ cacheFileLocation, + useChecksum, + ); + } catch { + // https://github.com/prettier/prettier/issues/17092 + // If `createFromFile()` fails, it's probably because the format + // of cache file changed,it happened when we release v3.5.0 + if (fs.existsSync(cacheFileLocation)) { + fs.unlinkSync(cacheFileLocation); + // retry + this.#fileEntryCache = fileEntryCache.createFromFile( + /* filePath */ cacheFileLocation, + useChecksum, + ); + } + } + + this.#useChecksum = useChecksum; } /** @@ -59,18 +73,14 @@ class FormatResultsCache { * @param {any} options */ existsAvailableFormatResultsCache(filePath, options) { - const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath); - - if (fileDescriptor.notFound) { + const fileDescriptor = this.#getFileDescriptor(filePath); + if (fileDescriptor.notFound || fileDescriptor.changed) { return false; } - const hashOfOptions = getHashOfOptions(options); - const meta = getMetadataFromFileDescriptor(fileDescriptor); - const changed = - fileDescriptor.changed || meta.hashOfOptions !== hashOfOptions; - - return !changed; + const hashOfOptions = + getMetadataFromFileDescriptor(fileDescriptor).data?.hashOfOptions; + return hashOfOptions && hashOfOptions === getHashOfOptions(options); } /** @@ -78,10 +88,10 @@ class FormatResultsCache { * @param {any} options */ setFormatResultsCache(filePath, options) { - const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath); - const meta = getMetadataFromFileDescriptor(fileDescriptor); - if (fileDescriptor && !fileDescriptor.notFound) { - meta.hashOfOptions = getHashOfOptions(options); + const fileDescriptor = this.#getFileDescriptor(filePath); + if (!fileDescriptor.notFound) { + const meta = getMetadataFromFileDescriptor(fileDescriptor); + meta.data = { ...meta.data, hashOfOptions: getHashOfOptions(options) }; } } @@ -89,12 +99,18 @@ class FormatResultsCache { * @param {string} filePath */ removeFormatResultsCache(filePath) { - this.fileEntryCache.removeEntry(filePath); + this.#fileEntryCache.removeEntry(filePath); } reconcile() { - this.fileEntryCache.reconcile(); + this.#fileEntryCache.reconcile(); + } + + #getFileDescriptor(filePath) { + return this.#fileEntryCache.getFileDescriptor(filePath, { + useModifiedTime: !this.#useChecksum, + }); } } -module.exports = FormatResultsCache; +export default FormatResultsCache; diff --git a/src/cli/format.js b/src/cli/format.js index 278060302d5a..c0a50e3fbad5 100644 --- a/src/cli/format.js +++ b/src/cli/format.js @@ -1,54 +1,54 @@ -"use strict"; +import fs from "node:fs/promises"; +import path from "node:path"; +import getStdin from "get-stdin"; +import * as prettier from "../index.js"; +import { expandPatterns } from "./expand-patterns.js"; +import findCacheFile from "./find-cache-file.js"; +import FormatResultsCache from "./format-results-cache.js"; +import mockable from "./mockable.js"; +import getOptionsForFile from "./options/get-options-for-file.js"; +import { + createIsIgnoredFunction, + createTwoFilesPatch, + errors, + picocolors, +} from "./prettier-internal.js"; +import { normalizeToPosix, statSafe } from "./utils.js"; -const { promises: fs } = require("fs"); -const path = require("path"); +function diff(a, b) { + return createTwoFilesPatch("", "", a, b, "", "", { context: 2 }); +} -// eslint-disable-next-line no-restricted-modules -const { default: chalk } = require("../../vendors/chalk.js"); +class DebugError extends Error { + name = "DebugError"; +} -// eslint-disable-next-line no-restricted-modules -const prettier = require("../index.js"); -// eslint-disable-next-line no-restricted-modules -const { getStdin } = require("../common/third-party.js"); +function handleError(context, filename, error, printedFilename, ignoreUnknown) { + ignoreUnknown ||= context.argv.ignoreUnknown; -const { createIgnorer, errors } = require("./prettier-internal.js"); -const { expandPatterns, fixWindowsSlashes } = require("./expand-patterns.js"); -const getOptionsForFile = require("./options/get-options-for-file.js"); -const isTTY = require("./is-tty.js"); -const findCacheFile = require("./find-cache-file.js"); -const FormatResultsCache = require("./format-results-cache.js"); -const { statSafe } = require("./utils.js"); + const errorIsUndefinedParseError = + error instanceof errors.UndefinedParserError; -function diff(a, b) { - return require("diff").createTwoFilesPatch("", "", a, b, "", "", { - context: 2, - }); -} + if (errorIsUndefinedParseError && ignoreUnknown) { + // Can't test on CI, `isTTY` is always false, see comments in `formatFiles` + printedFilename?.clear(); -function handleError(context, filename, error, printedFilename) { - if (error instanceof errors.UndefinedParserError) { - // Can't test on CI, `isTTY()` is always false, see ./is-tty.js - /* istanbul ignore next */ - if ((context.argv.write || context.argv.ignoreUnknown) && printedFilename) { - printedFilename.clear(); - } - if (context.argv.ignoreUnknown) { - return; - } - if (!context.argv.check && !context.argv.listDifferent) { - process.exitCode = 2; - } - context.logger.error(error.message); - return; + return true; } - if (context.argv.write) { + if (printedFilename) { // Add newline to split errors from filename line. process.stdout.write("\n"); } - const isParseError = Boolean(error && error.loc); - const isValidationError = /^Invalid \S+ value\./.test(error && error.message); + if (errorIsUndefinedParseError) { + context.logger.error(error.message); + process.exitCode = 2; + return; + } + + const isParseError = Boolean(error?.loc); + const isValidationError = /^Invalid \S+ value\./u.test(error?.message); if (isParseError) { // `invalid.js: SyntaxError: Unexpected token (1:1)`. @@ -58,12 +58,12 @@ function handleError(context, filename, error, printedFilename) { context.logger.error(error.message); // If validation fails for one file, it will fail for all of them. process.exit(1); - } else if (error instanceof errors.DebugError) { + } else if (error instanceof DebugError) { // `invalid.js: Some debug error message` context.logger.error(`${filename}: ${error.message}`); } else { // `invalid.js: Error: Some unexpected error\n[stack trace]` - /* istanbul ignore next */ + /* c8 ignore next */ context.logger.error(filename + ": " + (error.stack || error)); } @@ -74,7 +74,7 @@ function handleError(context, filename, error, printedFilename) { function writeOutput(context, result, options) { // Don't use `console.log` here since it adds an extra newline at the end. process.stdout.write( - context.argv.debugCheck ? result.filepath : result.formatted + context.argv.debugCheck ? result.filepath : result.formatted, ); if (options && options.cursorOffset >= 0) { @@ -82,22 +82,15 @@ function writeOutput(context, result, options) { } } -function listDifferent(context, input, options, filename) { +async function listDifferent(context, input, options, filename) { if (!context.argv.check && !context.argv.listDifferent) { return; } try { - if (!options.filepath && !options.parser) { - throw new errors.UndefinedParserError( - "No parser and no file path given, couldn't infer a parser." - ); - } - if (!prettier.check(input, options)) { - if (!context.argv.write) { - context.logger.log(filename); - process.exitCode = 1; - } + if (!(await prettier.check(input, options)) && !context.argv.write) { + context.logger.log(filename); + process.exitCode = 1; } } catch (error) { context.logger.error(error.message); @@ -106,134 +99,122 @@ function listDifferent(context, input, options, filename) { return true; } -function format(context, input, opt) { - if (!opt.parser && !opt.filepath) { - throw new errors.UndefinedParserError( - "No parser and no file path given, couldn't infer a parser." - ); - } - +async function format(context, input, opt) { if (context.argv.debugPrintDoc) { - const doc = prettier.__debug.printToDoc(input, opt); - return { formatted: prettier.__debug.formatDoc(doc) + "\n" }; + const doc = await prettier.__debug.printToDoc(input, opt); + return { formatted: (await prettier.__debug.formatDoc(doc)) + "\n" }; } if (context.argv.debugPrintComments) { return { - formatted: prettier.format( - JSON.stringify(prettier.formatWithCursor(input, opt).comments || []), - { parser: "json" } + formatted: await prettier.format( + JSON.stringify( + (await prettier.formatWithCursor(input, opt)).comments || [], + ), + { parser: "json" }, ), }; } if (context.argv.debugPrintAst) { - const { ast } = prettier.__debug.parse(input, opt); + const { ast } = await prettier.__debug.parse(input, opt); return { formatted: JSON.stringify(ast), }; } if (context.argv.debugCheck) { - const pp = prettier.format(input, opt); - const pppp = prettier.format(pp, opt); + const pp = await prettier.format(input, opt); + const pppp = await prettier.format(pp, opt); if (pp !== pppp) { - throw new errors.DebugError( - "prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp) + throw new DebugError( + "prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp), ); } else { const stringify = (obj) => JSON.stringify(obj, null, 2); const ast = stringify( - prettier.__debug.parse(input, opt, /* massage */ true).ast + (await prettier.__debug.parse(input, opt, { massage: true })).ast, ); const past = stringify( - prettier.__debug.parse(pp, opt, /* massage */ true).ast + (await prettier.__debug.parse(pp, opt, { massage: true })).ast, ); - /* istanbul ignore next */ + /* c8 ignore start */ if (ast !== past) { const MAX_AST_SIZE = 2097152; // 2MB const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past); - throw new errors.DebugError( + throw new DebugError( "ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + - diff(input, pp) + diff(input, pp), ); } + /* c8 ignore end */ } return { formatted: pp, filepath: opt.filepath || "(stdin)\n" }; } const { performanceTestFlag } = context; if (performanceTestFlag?.debugBenchmark) { - let benchmark; + let Bench; try { - // eslint-disable-next-line import/no-extraneous-dependencies - benchmark = require("benchmark"); + ({ Bench } = await import("tinybench")); } catch { context.logger.debug( - "'--debug-benchmark' requires the 'benchmark' package to be installed." + "'--debug-benchmark' requires the 'tinybench' package to be installed.", ); process.exit(2); } context.logger.debug( - "'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module." + "'--debug-benchmark' option found, measuring formatWithCursor with 'tinybench' module.", + ); + const bench = new Bench(); + bench.add("Format", () => prettier.formatWithCursor(input, opt)); + await bench.run(); + + const [result] = bench.table(); + context.logger.debug( + "'--debug-benchmark' measurements for formatWithCursor: " + + JSON.stringify(result, undefined, 2), ); - const suite = new benchmark.Suite(); - suite - .add("format", () => { - prettier.formatWithCursor(input, opt); - }) - .on("cycle", (event) => { - const results = { - benchmark: String(event.target), - hz: event.target.hz, - ms: event.target.times.cycle * 1000, - }; - context.logger.debug( - "'--debug-benchmark' measurements for formatWithCursor: " + - JSON.stringify(results, null, 2) - ); - }) - .run({ async: false }); } else if (performanceTestFlag?.debugRepeat) { - const repeat = context.argv.debugRepeat; + const repeat = performanceTestFlag.debugRepeat; context.logger.debug( - "'--debug-repeat' option found, running formatWithCursor " + - repeat + - " times." + `'${performanceTestFlag.name}' found, running formatWithCursor ${repeat} times.`, ); - let totalMs = 0; + const start = mockable.getTimestamp(); for (let i = 0; i < repeat; ++i) { - // should be using `performance.now()`, but only `Date` is cross-platform enough - const startMs = Date.now(); - prettier.formatWithCursor(input, opt); - totalMs += Date.now() - startMs; + await prettier.formatWithCursor(input, opt); } - const averageMs = totalMs / repeat; + const averageMs = (mockable.getTimestamp() - start) / repeat; const results = { repeat, hz: 1000 / averageMs, ms: averageMs, }; context.logger.debug( - "'--debug-repeat' measurements for formatWithCursor: " + - JSON.stringify(results, null, 2) + `'${ + performanceTestFlag.name + }' measurements for formatWithCursor: ${JSON.stringify( + results, + null, + 2, + )}`, ); } return prettier.formatWithCursor(input, opt); } -async function createIgnorerFromContextOrDie(context) { +async function createIsIgnoredFromContextOrDie(context) { try { - return await createIgnorer( + return await createIsIgnoredFunction( context.argv.ignorePath, - context.argv.withNodeModules + context.argv.withNodeModules, ); } catch (e) { context.logger.error(e.message); @@ -242,56 +223,60 @@ async function createIgnorerFromContextOrDie(context) { } async function formatStdin(context) { - const filepath = context.argv.filepath - ? path.resolve(process.cwd(), context.argv.filepath) - : process.cwd(); - - const ignorer = await createIgnorerFromContextOrDie(context); - // If there's an ignore-path set, the filename must be relative to the - // ignore path, not the current working directory. - const relativeFilepath = context.argv.ignorePath - ? path.relative(path.dirname(context.argv.ignorePath), filepath) - : path.relative(process.cwd(), filepath); + const { filepath } = context.argv; try { const input = await getStdin(); + // TODO[@fisker]: Exit if no input. + // `prettier --config-precedence cli-override` - if ( - relativeFilepath && - ignorer.ignores(fixWindowsSlashes(relativeFilepath)) - ) { + const absoluteFilepath = filepath ? path.resolve(filepath) : undefined; + + let isFileIgnored = false; + if (absoluteFilepath) { + const isIgnored = await createIsIgnoredFromContextOrDie(context); + isFileIgnored = isIgnored(absoluteFilepath); + } + + if (isFileIgnored) { writeOutput(context, { formatted: input }); return; } - const options = await getOptionsForFile(context, filepath); + const options = { + ...(await getOptionsForFile(context, absoluteFilepath)), + // `getOptionsForFile` forwards `--stdin-filepath` directly, which can be a relative path + filepath: absoluteFilepath, + }; - if (listDifferent(context, input, options, "(stdin)")) { + if (await listDifferent(context, input, options, "(stdin)")) { return; } - const formatted = format(context, input, options); + const formatted = await format(context, input, options); const { performanceTestFlag } = context; if (performanceTestFlag) { context.logger.log( - `'${performanceTestFlag.name}' option found, skipped print code to screen.` + `'${performanceTestFlag.name}' option found, skipped print code to screen.`, ); return; } writeOutput(context, formatted, options); } catch (error) { - handleError(context, relativeFilepath || "stdin", error); + handleError(context, filepath || "stdin", error); } } async function formatFiles(context) { - // The ignorer will be used to filter file paths after the glob is checked, + // This will be used to filter file paths after the glob is checked, // before any files are actually written - const ignorer = await createIgnorerFromContextOrDie(context); + const isIgnored = await createIsIgnoredFromContextOrDie(context); + const cwd = process.cwd(); let numberOfUnformattedFilesFound = 0; + let numberOfFilesWithError = 0; const { performanceTestFlag } = context; if (context.argv.check && !performanceTestFlag) { @@ -303,41 +288,33 @@ async function formatFiles(context) { if (context.argv.cache) { formatResultsCache = new FormatResultsCache( cacheFilePath, - context.argv.cacheStrategy || "content" + context.argv.cacheStrategy || "content", ); - } else { - if (context.argv.cacheStrategy) { - context.logger.error( - "`--cache-strategy` cannot be used without `--cache`." - ); - process.exit(2); - } - if (!context.argv.cacheLocation) { - const stat = await statSafe(cacheFilePath); - if (stat) { - await fs.unlink(cacheFilePath); - } + } else if (!context.argv.cacheLocation) { + const stat = await statSafe(cacheFilePath); + if (stat) { + await fs.unlink(cacheFilePath); } } - for await (const pathOrError of expandPatterns(context)) { - if (typeof pathOrError === "object") { - context.logger.error(pathOrError.error); + // Some CI pipelines incorrectly report process.stdout.isTTY status, + // which causes unwanted lines in the output. An additional check for isCI() helps. + // See https://github.com/prettier/prettier/issues/5801 + const isTTY = mockable.isStreamTTY(process.stdout) && !mockable.isCI(); + + for await (const { error, filename, ignoreUnknown } of expandPatterns( + context, + )) { + if (error) { + context.logger.error(error); // Don't exit, but set the exit code to 2 process.exitCode = 2; continue; } - const filename = pathOrError; - // If there's an ignore-path set, the filename must be relative to the - // ignore path, not the current working directory. - const ignoreFilename = context.argv.ignorePath - ? path.relative(path.dirname(context.argv.ignorePath), filename) - : filename; - - const fileIgnored = ignorer.ignores(fixWindowsSlashes(ignoreFilename)); + const isFileIgnored = isIgnored(filename); if ( - fileIgnored && + isFileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || @@ -351,9 +328,10 @@ async function formatFiles(context) { filepath: filename, }; + const fileNameToDisplay = normalizeToPosix(path.relative(cwd, filename)); let printedFilename; - if (isTTY()) { - printedFilename = context.logger.log(filename, { + if (isTTY) { + printedFilename = context.logger.log(fileNameToDisplay, { newline: false, clearable: true, }); @@ -364,32 +342,31 @@ async function formatFiles(context) { input = await fs.readFile(filename, "utf8"); } catch (error) { // Add newline to split errors from filename line. - /* istanbul ignore next */ + /* c8 ignore start */ context.logger.log(""); - /* istanbul ignore next */ context.logger.error( - `Unable to read file: ${filename}\n${error.message}` + `Unable to read file "${fileNameToDisplay}":\n${error.message}`, ); // Don't exit the process if one file failed - /* istanbul ignore next */ process.exitCode = 2; - /* istanbul ignore next */ continue; + /* c8 ignore stop */ } - if (fileIgnored) { + if (isFileIgnored) { + printedFilename?.clear(); writeOutput(context, { formatted: input }, options); continue; } - const start = Date.now(); + const start = mockable.getTimestamp(); const isCacheExists = formatResultsCache?.existsAvailableFormatResultsCache( filename, - options + options, ); let result; @@ -399,52 +376,62 @@ async function formatFiles(context) { if (isCacheExists) { result = { formatted: input }; } else { - result = format(context, input, options); + result = await format(context, input, options); } output = result.formatted; } catch (error) { - handleError(context, filename, error, printedFilename); + const errorIsIgnored = handleError( + context, + fileNameToDisplay, + error, + printedFilename, + ignoreUnknown, + ); + + if (!errorIsIgnored) { + numberOfFilesWithError += 1; + } + continue; } const isDifferent = output !== input; let shouldSetCache = !isDifferent; - if (printedFilename) { - // Remove previously printed filename to log it with duration. - printedFilename.clear(); - } + // Remove previously printed filename to log it with duration. + printedFilename?.clear(); if (performanceTestFlag) { context.logger.log( - `'${performanceTestFlag.name}' option found, skipped print code or write files.` + `'${performanceTestFlag.name}' option found, skipped print code or write files.`, ); return; } if (context.argv.write) { + const timeToDisplay = `${Math.round(mockable.getTimestamp() - start)}ms`; // Don't write the file if it won't change in order not to invalidate // mtime based caches. if (isDifferent) { if (!context.argv.check && !context.argv.listDifferent) { - context.logger.log(`${filename} ${Date.now() - start}ms`); + context.logger.log(`${fileNameToDisplay} ${timeToDisplay}`); } try { - await fs.writeFile(filename, output, "utf8"); + await mockable.writeFormattedFile(filename, output); // Set cache if format succeeds shouldSetCache = true; } catch (error) { context.logger.error( - `Unable to write file: ${filename}\n${error.message}` + `Unable to write file "${fileNameToDisplay}":\n${error.message}`, ); // Don't exit the process if one file failed process.exitCode = 2; } } else if (!context.argv.check && !context.argv.listDifferent) { - const message = `${chalk.grey(filename)} ${Date.now() - start}ms`; + const message = `${picocolors.gray(fileNameToDisplay)} ${timeToDisplay} (unchanged)`; if (isCacheExists) { context.logger.log(`${message} (cached)`); } else { @@ -452,10 +439,10 @@ async function formatFiles(context) { } } } else if (context.argv.debugCheck) { - /* istanbul ignore else */ if (result.filepath) { - context.logger.log(result.filepath); + context.logger.log(fileNameToDisplay); } else { + /* c8 ignore next */ process.exitCode = 2; } } else if (!context.argv.check && !context.argv.listDifferent) { @@ -470,9 +457,9 @@ async function formatFiles(context) { if (isDifferent) { if (context.argv.check) { - context.logger.warn(filename); + context.logger.warn(fileNameToDisplay); } else if (context.argv.listDifferent) { - context.logger.log(filename); + context.logger.log(fileNameToDisplay); } numberOfUnformattedFilesFound += 1; } @@ -482,23 +469,25 @@ async function formatFiles(context) { // Print check summary based on expected exit code if (context.argv.check) { - if (numberOfUnformattedFilesFound === 0) { - context.logger.log("All matched files use Prettier code style!"); - } else if (numberOfUnformattedFilesFound === 1) { - context.logger.warn( - context.argv.write - ? "Code style issues fixed in the above file." - : "Code style issues found in the above file. Forgot to run Prettier?" + if (numberOfFilesWithError > 0) { + const files = + numberOfFilesWithError === 1 + ? "the above file" + : `${numberOfFilesWithError} files`; + context.logger.log( + `Error occurred when checking code style in ${files}.`, ); + } else if (numberOfUnformattedFilesFound === 0) { + context.logger.log("All matched files use Prettier code style!"); } else { + const files = + numberOfUnformattedFilesFound === 1 + ? "the above file" + : `${numberOfUnformattedFilesFound} files`; context.logger.warn( context.argv.write - ? "Code style issues found in " + - numberOfUnformattedFilesFound + - " files." - : "Code style issues found in " + - numberOfUnformattedFilesFound + - " files. Forgot to run Prettier?" + ? `Code style issues fixed in ${files}.` + : `Code style issues found in ${files}. Run Prettier with --write to fix.`, ); } } @@ -514,4 +503,4 @@ async function formatFiles(context) { } } -module.exports = { formatStdin, formatFiles }; +export { formatFiles, formatStdin }; diff --git a/src/cli/index.js b/src/cli/index.js index 6cb0a64d5aaa..0b97d62cab7d 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -1,34 +1,30 @@ -"use strict"; - -const stringify = require("fast-json-stable-stringify"); -// eslint-disable-next-line no-restricted-modules -const prettier = require("../index.js"); -const createLogger = require("./logger.js"); -const Context = require("./context.js"); -const { parseArgvWithoutPlugins } = require("./options/parse-cli-arguments.js"); -const { createDetailedUsage, createUsage } = require("./usage.js"); -const { formatStdin, formatFiles } = require("./format.js"); -const logFileInfoOrDie = require("./file-info.js"); -const logResolvedConfigPathOrDie = require("./find-config-path.js"); -const { - utils: { isNonEmptyArray }, -} = require("./prettier-internal.js"); -const { printToScreen } = require("./utils.js"); - -async function run(rawArguments) { +import * as prettier from "../index.js"; +import Context from "./context.js"; +import logFileInfoOrDie from "./file-info.js"; +import logResolvedConfigPathOrDie from "./find-config-path.js"; +import { formatFiles, formatStdin } from "./format.js"; +import createLogger from "./logger.js"; +import mockable from "./mockable.js"; +import { parseArgvWithoutPlugins } from "./options/parse-cli-arguments.js"; +import printSupportInfo from "./print-support-info.js"; +import { createDetailedUsage, createUsage } from "./usage.js"; +import { printToScreen } from "./utils.js"; + +async function run(rawArguments = process.argv.slice(2)) { // Create a default level logger, so we can log errors during `logLevel` parsing let logger = createLogger(); try { - const logLevel = parseArgvWithoutPlugins( + const { logLevel } = parseArgvWithoutPlugins( rawArguments, logger, - "loglevel" - ).loglevel; + "log-level", + ); if (logLevel !== logger.logLevel) { logger = createLogger(logLevel); } const context = new Context({ rawArguments, logger }); + await context.init(); if (logger.logLevel !== "debug" && context.performanceTestFlag) { context.logger = createLogger("debug"); } @@ -43,16 +39,11 @@ async function run(rawArguments) { async function main(context) { context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`); - if (context.argv.pluginSearch === false) { - const rawPluginSearchDirs = context.argv.__raw["plugin-search-dir"]; - if ( - typeof rawPluginSearchDirs === "string" || - isNonEmptyArray(rawPluginSearchDirs) - ) { - throw new Error( - "Cannot use --no-plugin-search and --plugin-search-dir together." - ); - } + if ( + (context.argv.config === false && context.argv.__raw.config !== false) || + (context.argv.config && context.rawArguments.includes("--no-config")) + ) { + throw new Error("Cannot use --no-config and --config together."); } if (context.argv.check && context.argv.listDifferent) { @@ -71,6 +62,10 @@ async function main(context) { throw new Error("Cannot use --file-info with multiple files"); } + if (!context.argv.cache && context.argv.cacheStrategy) { + throw new Error("`--cache-strategy` cannot be used without `--cache`."); + } + if (context.argv.version) { printToScreen(prettier.version); return; @@ -80,42 +75,48 @@ async function main(context) { printToScreen( typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) - : createUsage(context) + : createUsage(context), ); return; } if (context.argv.supportInfo) { - printToScreen( - prettier.format(stringify(prettier.getSupportInfo()), { - parser: "json", - }) - ); + return printSupportInfo(); + } + + if (context.argv.findConfigPath) { + await logResolvedConfigPathOrDie(context); + return; + } + + if (context.argv.fileInfo) { + await logFileInfoOrDie(context); return; } const hasFilePatterns = context.filePatterns.length > 0; const useStdin = - !hasFilePatterns && (!process.stdin.isTTY || context.argv.filePath); + !hasFilePatterns && + (!mockable.isStreamTTY(process.stdin) || context.argv.filepath); - if (context.argv.findConfigPath) { - await logResolvedConfigPathOrDie(context); - } else if (context.argv.fileInfo) { - await logFileInfoOrDie(context); - } else if (useStdin) { + if (useStdin) { if (context.argv.cache) { - context.logger.error("`--cache` cannot be used with stdin."); - process.exit(2); + throw new Error("`--cache` cannot be used when formatting stdin."); } + await formatStdin(context); - } else if (hasFilePatterns) { + return; + } + + if (hasFilePatterns) { await formatFiles(context); - } else { - process.exitCode = 1; - printToScreen(createUsage(context)); + return; } + + process.exitCode = 1; + printToScreen(createUsage(context)); } -module.exports = { - run, -}; +export { run }; +// Exposed for tests +export { mockable } from "./mockable.js"; diff --git a/src/cli/is-tty.js b/src/cli/is-tty.js deleted file mode 100644 index b3e10b71cd09..000000000000 --- a/src/cli/is-tty.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -// eslint-disable-next-line no-restricted-modules -const { isCI } = require("../common/third-party.js"); - -// Some CI pipelines incorrectly report process.stdout.isTTY status, -// which causes unwanted lines in the output. An additional check for isCI() helps. -// See https://github.com/prettier/prettier/issues/5801 -module.exports = function isTTY() { - return process.stdout.isTTY && !isCI(); -}; diff --git a/src/cli/logger.js b/src/cli/logger.js index 9b0ef9288d27..99a94b860dbe 100644 --- a/src/cli/logger.js +++ b/src/cli/logger.js @@ -1,34 +1,21 @@ -"use strict"; +import mockable from "./mockable.js"; +import { picocolors } from "./prettier-internal.js"; -const readline = require("readline"); -const wcwidth = require("wcwidth"); - -// eslint-disable-next-line no-restricted-modules -const { default: stripAnsi } = require("../../vendors/strip-ansi.js"); -// eslint-disable-next-line no-restricted-modules -const { default: chalk, chalkStderr } = require("../../vendors/chalk.js"); - -const countLines = (stream, text) => { - const columns = stream.columns || 80; - let lineCount = 0; - for (const line of stripAnsi(text).split("\n")) { - lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns)); - } - return lineCount; -}; - -const clear = (stream, text) => () => { - const lineCount = countLines(stream, text); - - for (let line = 0; line < lineCount; line++) { - if (line > 0) { - readline.moveCursor(stream, 0, -1); - } - - readline.clearLine(stream, 0); - readline.cursorTo(stream, 0); - } -}; +const { argv, env } = process; +// https://github.com/alexeyraspopov/picocolors/blob/0e7c4af2de299dd7bc5916f2bddd151fa2f66740/picocolors.js#L2 +// Not working on Windows, but this is how `picocolors` works for stdout, let's keep it this way for now +const isStderrColorSupported = + !(Boolean(env.NO_COLOR) || argv.includes("--no-color")) && + (Boolean(env.FORCE_COLOR) || + argv.includes("--color") || + process.platform === "win32" || + (process.stderr.isTTY && env.TERM !== "dumb") || + Boolean(env.CI)); +// To test this feature, +// run `echo foo | node bin/prettier --unknown-flag --log-level=debug 2>error.log` +// open error.log check if `[warn]` or `[debug]` is colored +// https://github.com/prettier/prettier/issues/13097 +const picocolorsStderr = picocolors.createColors(isStderrColorSupported); const emptyLogResult = { clear() {} }; function createLogger(logLevel = "log") { @@ -46,8 +33,8 @@ function createLogger(logLevel = "log") { } const stream = process[loggerName === "log" ? "stdout" : "stderr"]; - const chalkInstance = loggerName === "log" ? chalk : chalkStderr; - const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : ""; + const colors = loggerName === "log" ? picocolors : picocolorsStderr; + const prefix = color ? `[${colors[color](loggerName)}] ` : ""; return (message, options) => { options = { @@ -55,12 +42,13 @@ function createLogger(logLevel = "log") { clearable: false, ...options, }; - message = message.replace(/^/gm, prefix) + (options.newline ? "\n" : ""); + message = + message.replaceAll(/^/gmu, prefix) + (options.newline ? "\n" : ""); stream.write(message); if (options.clearable) { return { - clear: clear(stream, message), + clear: () => mockable.clearStreamText(stream, message), }; } }; @@ -91,4 +79,4 @@ function createLogger(logLevel = "log") { } } -module.exports = createLogger; +export default createLogger; diff --git a/src/cli/mockable.js b/src/cli/mockable.js new file mode 100644 index 000000000000..804da58fd66b --- /dev/null +++ b/src/cli/mockable.js @@ -0,0 +1,17 @@ +import fs from "node:fs/promises"; +import { performance } from "node:perf_hooks"; +import { isCI } from "ci-info"; +// @ts-expect-error +import { __internal as sharedWithCli } from "../index.js"; +import clearStreamText from "./utilities/clear-stream-text.js"; + +const mockable = sharedWithCli.utils.createMockable({ + clearStreamText, + getTimestamp: performance.now.bind(performance), + isCI: () => isCI, + isStreamTTY: (stream) => stream.isTTY, + writeFormattedFile: (file, data) => fs.writeFile(file, data), +}); + +export default mockable.mocked; +export { mockable }; diff --git a/src/cli/options/create-minimist-options.js b/src/cli/options/create-minimist-options.js index fe0deb200649..153f684942aa 100644 --- a/src/cli/options/create-minimist-options.js +++ b/src/cli/options/create-minimist-options.js @@ -1,37 +1,30 @@ -"use strict"; +export default function createMinimistOptions(detailedOptions) { + const booleanNames = []; + const stringNames = []; + const defaultValues = {}; -const { - utils: { partition }, -} = require("../prettier-internal.js"); + for (const option of detailedOptions) { + const { name, alias, type } = option; + const names = type === "boolean" ? booleanNames : stringNames; + names.push(name); + if (alias) { + names.push(alias); + } -module.exports = function createMinimistOptions(detailedOptions) { - const [boolean, string] = partition( - detailedOptions, - ({ type }) => type === "boolean" - ).map((detailedOptions) => - detailedOptions.flatMap(({ name, alias }) => - alias ? [name, alias] : [name] - ) - ); - - const defaults = Object.fromEntries( - detailedOptions - .filter( - (option) => - !option.deprecated && - (!option.forwardToApi || - option.name === "plugin" || - option.name === "plugin-search-dir") && - option.default !== undefined - ) - .map((option) => [option.name, option.default]) - ); + if ( + !option.deprecated && + (!option.forwardToApi || name === "plugin") && + option.default !== undefined + ) { + defaultValues[option.name] = option.default; + } + } return { // we use vnopts' AliasSchema to handle aliases for better error messages alias: {}, - boolean, - string, - default: defaults, + boolean: booleanNames, + string: stringNames, + default: defaultValues, }; -}; +} diff --git a/src/cli/options/get-context-options.js b/src/cli/options/get-context-options.js index f637a42be6e3..b485e3d76c8e 100644 --- a/src/cli/options/get-context-options.js +++ b/src/cli/options/get-context-options.js @@ -1,47 +1,81 @@ -"use strict"; -// eslint-disable-next-line no-restricted-modules -const prettier = require("../../index.js"); -const { - optionsModule, - utils: { arrayify }, -} = require("../prettier-internal.js"); -const constant = require("../constant.js"); -const { - normalizeDetailedOptionMap, - createDetailedOptionMap, -} = require("./option-map.js"); - -function getContextOptions(plugins, pluginSearchDirs) { - const { options: supportOptions, languages } = prettier.getSupportInfo({ - showDeprecated: true, - showUnreleased: true, - showInternal: true, - plugins, - pluginSearchDirs, - }); - const detailedOptionMap = normalizeDetailedOptionMap({ - ...createDetailedOptionMap(supportOptions), - ...constant.options, - }); +import dashify from "dashify"; +import { getSupportInfo } from "../../index.js"; +import cliOptions from "../cli-options.evaluate.js"; +import { + getSupportInfoWithoutPlugins, + normalizeOptionSettings, + optionCategories, +} from "../prettier-internal.js"; - const detailedOptions = arrayify(detailedOptionMap, "name"); +const detailedCliOptions = normalizeOptionSettings(cliOptions).map((option) => + normalizeDetailedOption(option), +); - const apiDefaultOptions = { - ...optionsModule.hiddenDefaults, - ...Object.fromEntries( - supportOptions - .filter(({ deprecated }) => !deprecated) - .map((option) => [option.name, option.default]) - ), +function apiOptionToCliOption(apiOption) { + const cliOption = { + ...apiOption, + description: apiOption.cliDescription ?? apiOption.description, + category: apiOption.cliCategory ?? optionCategories.CATEGORY_FORMAT, + forwardToApi: apiOption.name, }; + /* c8 ignore start */ + if (apiOption.deprecated) { + delete cliOption.forwardToApi; + delete cliOption.description; + delete cliOption.oppositeDescription; + cliOption.deprecated = true; + } + /* c8 ignore stop */ + + return normalizeDetailedOption(cliOption); +} + +function normalizeDetailedOption(option) { + return { + category: optionCategories.CATEGORY_OTHER, + ...option, + name: option.cliName ?? dashify(option.name), + choices: option.choices?.map((choice) => { + const newChoice = { + description: "", + deprecated: false, + ...(typeof choice === "object" ? choice : { value: choice }), + }; + /* c8 ignore next 3 */ + if (newChoice.value === true) { + newChoice.value = ""; // backward compatibility for original boolean option + } + return newChoice; + }), + }; +} + +function supportInfoToContextOptions({ options: supportOptions, languages }) { + const detailedOptions = [ + ...detailedCliOptions, + ...supportOptions.map((apiOption) => apiOptionToCliOption(apiOption)), + ]; + return { supportOptions, - detailedOptions, - detailedOptionMap, - apiDefaultOptions, languages, + detailedOptions, }; } -module.exports = getContextOptions; +async function getContextOptions(plugins) { + const supportInfo = await getSupportInfo({ + showDeprecated: true, + plugins, + }); + + return supportInfoToContextOptions(supportInfo); +} + +function getContextOptionsWithoutPlugins() { + const supportInfo = getSupportInfoWithoutPlugins(); + return supportInfoToContextOptions(supportInfo); +} + +export { getContextOptions, getContextOptionsWithoutPlugins }; diff --git a/src/cli/options/get-options-for-file.js b/src/cli/options/get-options-for-file.js index 3a031b462f0a..3f2e668a5926 100644 --- a/src/cli/options/get-options-for-file.js +++ b/src/cli/options/get-options-for-file.js @@ -1,18 +1,15 @@ -"use strict"; - -const dashify = require("dashify"); -// eslint-disable-next-line no-restricted-modules -const prettier = require("../../index.js"); -const { optionsNormalizer } = require("../prettier-internal.js"); -const minimist = require("./minimist.js"); -const createMinimistOptions = require("./create-minimist-options.js"); -const normalizeCliOptions = require("./normalize-cli-options.js"); +import dashify from "dashify"; +import { resolveConfig } from "../../index.js"; +import { normalizeOptions as normalizeApiOptions } from "../prettier-internal.js"; +import createMinimistOptions from "./create-minimist-options.js"; +import minimist from "./minimist.js"; +import normalizeCliOptions from "./normalize-cli-options.js"; function getOptions(argv, detailedOptions) { return Object.fromEntries( detailedOptions .filter(({ forwardToApi }) => forwardToApi) - .map(({ forwardToApi, name }) => [forwardToApi, argv[name]]) + .map(({ forwardToApi, name }) => [forwardToApi, argv[name]]), ); } @@ -23,7 +20,7 @@ function cliifyOptions(object, apiDetailedOptionMap) { const cliKey = apiOption ? apiOption.name : key; return [dashify(cliKey), value]; - }) + }), ); } @@ -31,16 +28,16 @@ function createApiDetailedOptionMap(detailedOptions) { return Object.fromEntries( detailedOptions .filter( - (option) => option.forwardToApi && option.forwardToApi !== option.name + (option) => option.forwardToApi && option.forwardToApi !== option.name, ) - .map((option) => [option.forwardToApi, option]) + .map((option) => [option.forwardToApi, option]), ); } function parseArgsToOptions(context, overrideDefaults) { const minimistOptions = createMinimistOptions(context.detailedOptions); const apiDetailedOptionMap = createApiDetailedOptionMap( - context.detailedOptions + context.detailedOptions, ); return getOptions( normalizeCliOptions( @@ -50,9 +47,9 @@ function parseArgsToOptions(context, overrideDefaults) { default: cliifyOptions(overrideDefaults, apiDetailedOptionMap), }), context.detailedOptions, - { logger: false } + { logger: false }, ), - context.detailedOptions + context.detailedOptions, ); } @@ -60,7 +57,7 @@ async function getOptionsOrDie(context, filePath) { try { if (context.argv.config === false) { context.logger.debug( - "'--no-config' option found, skip loading config file." + "'--no-config' option found, skip loading config file.", ); return null; } @@ -68,10 +65,10 @@ async function getOptionsOrDie(context, filePath) { context.logger.debug( context.argv.config ? `load config file from '${context.argv.config}'` - : `resolve config from '${filePath}'` + : `resolve config from '${filePath}'`, ); - const options = await prettier.resolveConfig(filePath, { + const options = await resolveConfig(filePath, { editorconfig: context.argv.editorconfig, config: context.argv.config, }); @@ -80,7 +77,8 @@ async function getOptionsOrDie(context, filePath) { return options; } catch (error) { context.logger.error( - `Invalid configuration file \`${filePath}\`: ` + error.message + `Invalid configuration${filePath ? ` for file "${filePath}"` : ""}:\n` + + error.message, ); process.exit(2); } @@ -97,20 +95,18 @@ function applyConfigPrecedence(context, options) { return options || parseArgsToOptions(context); } } catch (error) { - /* istanbul ignore next */ + /* c8 ignore start */ context.logger.error(error.toString()); - - /* istanbul ignore next */ process.exit(2); + /* c8 ignore stop */ } } async function getOptionsForFile(context, filepath) { const options = await getOptionsOrDie(context, filepath); - - const hasPlugins = options && options.plugins; + const hasPlugins = options?.plugins; if (hasPlugins) { - context.pushContextPlugins(options.plugins); + await context.pushContextPlugins(options.plugins); } const appliedOptions = { @@ -118,15 +114,15 @@ async function getOptionsForFile(context, filepath) { ...applyConfigPrecedence( context, options && - optionsNormalizer.normalizeApiOptions(options, context.supportOptions, { + normalizeApiOptions(options, context.supportOptions, { logger: context.logger, - }) + }), ), }; context.logger.debug( `applied config-precedence (${context.argv.configPrecedence}): ` + - `${JSON.stringify(appliedOptions)}` + `${JSON.stringify(appliedOptions)}`, ); if (hasPlugins) { @@ -136,4 +132,4 @@ async function getOptionsForFile(context, filepath) { return appliedOptions; } -module.exports = getOptionsForFile; +export default getOptionsForFile; diff --git a/src/cli/options/minimist.js b/src/cli/options/minimist.js index 7556db18c23b..e4c6d98e4134 100644 --- a/src/cli/options/minimist.js +++ b/src/cli/options/minimist.js @@ -1,27 +1,27 @@ -"use strict"; - -const minimist = require("minimist"); +import minimist from "minimist"; const PLACEHOLDER = null; /** * unspecified boolean flag without default value is parsed as `undefined` instead of `false` */ -module.exports = function (args, options) { - const boolean = options.boolean || []; - const defaults = options.default || {}; +export default function minimistParse(args, options) { + /* c8 ignore next */ + const boolean = options.boolean ?? []; + /* c8 ignore next */ + const defaults = options.default ?? {}; const booleanWithoutDefault = boolean.filter((key) => !(key in defaults)); const newDefaults = { ...defaults, ...Object.fromEntries( - booleanWithoutDefault.map((key) => [key, PLACEHOLDER]) + booleanWithoutDefault.map((key) => [key, PLACEHOLDER]), ), }; const parsed = minimist(args, { ...options, default: newDefaults }); return Object.fromEntries( - Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER) + Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER), ); -}; +} diff --git a/src/cli/options/normalize-cli-options.js b/src/cli/options/normalize-cli-options.js index b0a9d378de96..cb1afa65a28d 100644 --- a/src/cli/options/normalize-cli-options.js +++ b/src/cli/options/normalize-cli-options.js @@ -1,17 +1,61 @@ -"use strict"; +import { + leven, + normalizeOptions, + picocolors, + vnopts, +} from "../prettier-internal.js"; -// eslint-disable-next-line no-restricted-modules -const { default: chalk } = require("../../../vendors/chalk.js"); -// eslint-disable-next-line no-restricted-modules -const { default: leven } = require("../../../vendors/leven.js"); -const { optionsNormalizer } = require("../prettier-internal.js"); +const descriptor = { + key: (key) => (key.length === 1 ? `-${key}` : `--${key}`), + value: (value) => vnopts.apiDescriptor.value(value), + pair: ({ key, value }) => + value === false + ? `--no-${key}` + : value === true + ? descriptor.key(key) + : value === "" + ? `${descriptor.key(key)} without an argument` + : `${descriptor.key(key)}=${value}`, +}; + +class FlagSchema extends vnopts.ChoiceSchema { + #flags = []; + + constructor({ name, flags }) { + super({ name, choices: flags }); + this.#flags = [...flags].sort(); + } + preprocess(value, utils) { + if ( + typeof value === "string" && + value.length > 0 && + !this.#flags.includes(value) + ) { + const suggestion = this.#flags.find((flag) => leven(flag, value) < 3); + if (suggestion) { + utils.logger.warn( + [ + `Unknown flag ${picocolors.yellow(utils.descriptor.value(value))},`, + `did you mean ${picocolors.blue(utils.descriptor.value(suggestion))}?`, + ].join(" "), + ); + return suggestion; + } + } + return value; + } + expected() { + return "a flag"; + } +} function normalizeCliOptions(options, optionInfos, opts) { - return optionsNormalizer.normalizeCliOptions(options, optionInfos, { - colorsModule: chalk, - levenshteinDistance: leven, + return normalizeOptions(options, optionInfos, { ...opts, + isCLI: true, + FlagSchema, + descriptor, }); } -module.exports = normalizeCliOptions; +export default normalizeCliOptions; diff --git a/src/cli/options/option-map.js b/src/cli/options/option-map.js deleted file mode 100644 index 08917ca07c92..000000000000 --- a/src/cli/options/option-map.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -const dashify = require("dashify"); -const { coreOptions } = require("../prettier-internal.js"); - -function normalizeDetailedOption(name, option) { - return { - category: coreOptions.CATEGORY_OTHER, - ...option, - choices: - option.choices && - option.choices.map((choice) => { - const newChoice = { - description: "", - deprecated: false, - ...(typeof choice === "object" ? choice : { value: choice }), - }; - /* istanbul ignore next */ - if (newChoice.value === true) { - newChoice.value = ""; // backward compatibility for original boolean option - } - return newChoice; - }), - }; -} - -function normalizeDetailedOptionMap(detailedOptionMap) { - return Object.fromEntries( - Object.entries(detailedOptionMap) - .sort(([leftName], [rightName]) => leftName.localeCompare(rightName)) - .map(([name, option]) => [name, normalizeDetailedOption(name, option)]) - ); -} - -function createDetailedOptionMap(supportOptions) { - return Object.fromEntries( - supportOptions.map((option) => { - const newOption = { - ...option, - name: option.cliName || dashify(option.name), - description: option.cliDescription || option.description, - category: option.cliCategory || coreOptions.CATEGORY_FORMAT, - forwardToApi: option.name, - }; - - /* istanbul ignore next */ - if (option.deprecated) { - delete newOption.forwardToApi; - delete newOption.description; - delete newOption.oppositeDescription; - newOption.deprecated = true; - } - - return [newOption.name, newOption]; - }) - ); -} - -module.exports = { - normalizeDetailedOptionMap, - createDetailedOptionMap, -}; diff --git a/src/cli/options/parse-cli-arguments.js b/src/cli/options/parse-cli-arguments.js index ba3142162c47..ba6b69eff8e7 100644 --- a/src/cli/options/parse-cli-arguments.js +++ b/src/cli/options/parse-cli-arguments.js @@ -1,22 +1,17 @@ -"use strict"; -const camelCase = require("camelcase"); -const { pick } = require("../utils.js"); -const getContextOptions = require("./get-context-options.js"); -const minimist = require("./minimist.js"); -const createMinimistOptions = require("./create-minimist-options.js"); -const normalizeCliOptions = require("./normalize-cli-options.js"); +import camelCase from "camelcase"; +import { pick } from "../utils.js"; +import createMinimistOptions from "./create-minimist-options.js"; +import { getContextOptionsWithoutPlugins } from "./get-context-options.js"; +import minimist from "./minimist.js"; +import normalizeCliOptions from "./normalize-cli-options.js"; function parseArgv(rawArguments, detailedOptions, logger, keys) { const minimistOptions = createMinimistOptions(detailedOptions); let argv = minimist(rawArguments, minimistOptions); if (keys) { - if (keys.includes("plugin-search-dir") && !keys.includes("plugin-search")) { - keys.push("plugin-search"); - } - detailedOptions = detailedOptions.filter((option) => - keys.includes(option.name) + keys.includes(option.name), ); argv = pick(argv, keys); } @@ -27,30 +22,28 @@ function parseArgv(rawArguments, detailedOptions, logger, keys) { ...Object.fromEntries( Object.entries(normalized).map(([key, value]) => { const option = detailedOptions.find(({ name }) => name === key) || {}; - // If the flag is a prettier option, use the option name - // `--plugin-search-dir` -> `pluginSearchDirs` + // If the flag is a prettier api option, use the option name // Otherwise use camel case for readability // `--ignore-unknown` -> `ignoreUnknown` return [option.forwardToApi || camelCase(key), value]; - }) + }), ), + _: normalized._?.map(String), get __raw() { return argv; }, }; } -const detailedOptionsWithoutPlugins = getContextOptions( - [], - false -).detailedOptions; +const { detailedOptions: detailedOptionsWithoutPlugins } = + getContextOptionsWithoutPlugins(); function parseArgvWithoutPlugins(rawArguments, logger, keys) { return parseArgv( rawArguments, detailedOptionsWithoutPlugins, logger, - typeof keys === "string" ? [keys] : keys + typeof keys === "string" ? [keys] : keys, ); } -module.exports = { parseArgv, parseArgvWithoutPlugins }; +export { parseArgv, parseArgvWithoutPlugins }; diff --git a/src/cli/prettier-internal.js b/src/cli/prettier-internal.js index cee1851c962b..05511405478c 100644 --- a/src/cli/prettier-internal.js +++ b/src/cli/prettier-internal.js @@ -1,4 +1,17 @@ -"use strict"; +// @ts-expect-error +import { __internal as sharedWithCli } from "../index.js"; -// eslint-disable-next-line no-restricted-modules -module.exports = require("../index.js").__internal; +export const { + errors, + optionCategories, + createIsIgnoredFunction, + formatOptionsHiddenDefaults, + normalizeOptions, + getSupportInfoWithoutPlugins, + normalizeOptionSettings, + vnopts, + fastGlob, + createTwoFilesPatch, + picocolors, + leven, +} = sharedWithCli; diff --git a/src/cli/print-support-info.js b/src/cli/print-support-info.js new file mode 100644 index 000000000000..5dc91d7662d4 --- /dev/null +++ b/src/cli/print-support-info.js @@ -0,0 +1,22 @@ +import stringify from "fast-json-stable-stringify"; +import { format, getSupportInfo } from "../index.js"; +import { omit, printToScreen } from "./utils.js"; + +const sortByName = (array) => + array.sort((a, b) => a.name.localeCompare(b.name)); + +async function printSupportInfo() { + const { languages, options } = await getSupportInfo(); + const supportInfo = { + languages: sortByName(languages), + options: sortByName(options).map((option) => + omit(option, ["cliName", "cliCategory", "cliDescription"]), + ), + }; + + const result = await format(stringify(supportInfo), { parser: "json" }); + + printToScreen(result.trim()); +} + +export default printSupportInfo; diff --git a/src/cli/usage.js b/src/cli/usage.js index d74bdb2379ed..f40337c87aeb 100644 --- a/src/cli/usage.js +++ b/src/cli/usage.js @@ -1,15 +1,14 @@ -"use strict"; - -const camelCase = require("camelcase"); -const constant = require("./constant.js"); -const { groupBy } = require("./utils.js"); +import camelCase from "camelcase"; +import { categoryOrder, usageSummary } from "./constants.evaluate.js"; +import { formatOptionsHiddenDefaults } from "./prettier-internal.js"; +import { groupBy } from "./utils.js"; const OPTION_USAGE_THRESHOLD = 25; const CHOICE_USAGE_MARGIN = 3; const CHOICE_USAGE_INDENTATION = 2; function indent(str, spaces) { - return str.replace(/^/gm, " ".repeat(spaces)); + return str.replaceAll(/^/gmu, " ".repeat(spaces)); } function createDefaultValueDisplay(value) { @@ -20,20 +19,21 @@ function createDefaultValueDisplay(value) { function getOptionDefaultValue(context, optionName) { // --no-option - if (!(optionName in context.detailedOptionMap)) { - return; - } - - const option = context.detailedOptionMap[optionName]; + const option = context.detailedOptions.find( + ({ name }) => name === optionName, + ); - if (option.default !== undefined) { + if (option?.default !== undefined) { return option.default; } const optionCamelName = camelCase(optionName); - if (optionCamelName in context.apiDefaultOptions) { - return context.apiDefaultOptions[optionCamelName]; - } + return ( + formatOptionsHiddenDefaults[optionCamelName] ?? + context.supportOptions.find( + (option) => !option.deprecated && option.name === optionCamelName, + )?.default + ); } function createOptionUsageHeader(option) { @@ -49,7 +49,7 @@ function createOptionUsageRow(header, content, threshold) { ? `\n${" ".repeat(threshold)}` : " ".repeat(threshold - header.length); - const description = content.replace(/\n/g, `\n${" ".repeat(threshold)}`); + const description = content.replaceAll("\n", `\n${" ".repeat(threshold)}`); return `${header}${separator}${description}`; } @@ -60,7 +60,7 @@ function createOptionUsageType(option) { return null; case "choice": return `<${option.choices - .filter((choice) => !choice.deprecated && choice.since !== null) + .filter((choice) => !choice.deprecated) .map((choice) => choice.value) .join("|")}>`; default: @@ -69,16 +69,14 @@ function createOptionUsageType(option) { } function createChoiceUsages(choices, margin, indentation) { - const activeChoices = choices.filter( - (choice) => !choice.deprecated && choice.since !== null - ); + const activeChoices = choices.filter((choice) => !choice.deprecated); const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin; return activeChoices.map((choice) => indent( createOptionUsageRow(choice.value, choice.description, threshold), - indentation - ) + indentation, + ), ); } @@ -92,7 +90,7 @@ function createOptionUsage(context, option, threshold) { ? "" : `\nDefaults to ${createDefaultValueDisplay(optionDefaultValue)}.` }`, - threshold + threshold, ); } @@ -113,22 +111,25 @@ function getOptionsWithOpposites(options) { } function createUsage(context) { - const options = getOptionsWithOpposites(context.detailedOptions).filter( + const sortedOptions = context.detailedOptions.sort((optionA, optionB) => + optionA.name.localeCompare(optionB.name), + ); + + const options = getOptionsWithOpposites(sortedOptions).filter( // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help (option) => !( option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-") - ) + ), ); - const groupedOptions = groupBy(options, (option) => option.category); - const firstCategories = constant.categoryOrder.slice(0, -1); - const lastCategories = constant.categoryOrder.slice(-1); + const firstCategories = categoryOrder.slice(0, -1); + const lastCategories = categoryOrder.slice(-1); const restCategories = Object.keys(groupedOptions).filter( - (category) => !constant.categoryOrder.includes(category) + (category) => !categoryOrder.includes(category), ); const allCategories = [ ...firstCategories, @@ -139,18 +140,35 @@ function createUsage(context) { const optionsUsage = allCategories.map((category) => { const categoryOptions = groupedOptions[category] .map((option) => - createOptionUsage(context, option, OPTION_USAGE_THRESHOLD) + createOptionUsage(context, option, OPTION_USAGE_THRESHOLD), ) .join("\n"); return `${category} options:\n\n${indent(categoryOptions, 2)}`; }); - return [constant.usageSummary, ...optionsUsage, ""].join("\n\n"); + return [usageSummary, ...optionsUsage, ""].join("\n\n"); +} + +function createPluginDefaults(pluginDefaults) { + if (!pluginDefaults || Object.keys(pluginDefaults).length === 0) { + return ""; + } + + const defaults = Object.entries(pluginDefaults) + .sort(([pluginNameA], [pluginNameB]) => + pluginNameA.localeCompare(pluginNameB), + ) + .map( + ([plugin, value]) => `* ${plugin}: ${createDefaultValueDisplay(value)}`, + ) + .join("\n"); + + return `\nPlugin defaults:\n${defaults}`; } function createDetailedUsage(context, flag) { const option = getOptionsWithOpposites(context.detailedOptions).find( - (option) => option.name === flag || option.alias === flag + (option) => option.name === flag || option.alias === flag, ); const header = createOptionUsageHeader(option); @@ -162,7 +180,7 @@ function createDetailedUsage(context, flag) { : `\n\nValid options:\n\n${createChoiceUsages( option.choices, CHOICE_USAGE_MARGIN, - CHOICE_USAGE_INDENTATION + CHOICE_USAGE_INDENTATION, ).join("\n")}`; const optionDefaultValue = getOptionDefaultValue(context, option.name); @@ -171,16 +189,8 @@ function createDetailedUsage(context, flag) { ? `\n\nDefault: ${createDefaultValueDisplay(optionDefaultValue)}` : ""; - const pluginDefaults = - option.pluginDefaults && Object.keys(option.pluginDefaults).length > 0 - ? `\nPlugin defaults:${Object.entries(option.pluginDefaults).map( - ([key, value]) => `\n* ${key}: ${createDefaultValueDisplay(value)}` - )}` - : ""; + const pluginDefaults = createPluginDefaults(option.pluginDefaults); return `${header}${description}${choices}${defaults}${pluginDefaults}`; } -module.exports = { - createUsage, - createDetailedUsage, -}; +export { createDetailedUsage, createUsage }; diff --git a/src/cli/utilities/clear-stream-text.js b/src/cli/utilities/clear-stream-text.js new file mode 100644 index 000000000000..36c8355f22a7 --- /dev/null +++ b/src/cli/utilities/clear-stream-text.js @@ -0,0 +1,28 @@ +import readline from "node:readline"; +import stripAnsi from "strip-ansi"; +import wcwidth from "wcwidth.js"; + +const countLines = (stream, text) => { + const columns = stream.columns || 80; + let lineCount = 0; + for (const line of stripAnsi(text).split("\n")) { + lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns)); + } + return lineCount; +}; + +function clearStreamText(stream, text) { + const lineCount = countLines(stream, text); + + for (let line = 0; line < lineCount; line++) { + /* c8 ignore next 3 */ + if (line > 0) { + readline.moveCursor(stream, 0, -1); + } + + readline.clearLine(stream, 0); + readline.cursorTo(stream, 0); + } +} + +export default clearStreamText; diff --git a/src/cli/utils.js b/src/cli/utils.js index d13b5efcf15c..01de5ed484a3 100644 --- a/src/cli/utils.js +++ b/src/cli/utils.js @@ -1,9 +1,8 @@ -"use strict"; - -const { promises: fs } = require("fs"); - -// eslint-disable-next-line no-restricted-modules -const { default: sdbm } = require("../../vendors/sdbm.js"); +import fs from "node:fs/promises"; +import path from "node:path"; +import sdbm from "sdbm"; +// @ts-expect-error +import { __internal as sharedWithCli } from "../index.js"; // eslint-disable-next-line no-console const printToScreen = console.log.bind(console); @@ -51,16 +50,33 @@ function createHash(source) { return String(sdbm(source)); } +/** @import {Stats} from "fs" */ /** * Get stats of a given path. * @param {string} filePath The path to target file. - * @returns {Promise} The stats. + * @returns {Promise} The stats. */ async function statSafe(filePath) { try { return await fs.stat(filePath); - } catch (error) { - /* istanbul ignore next */ + } catch (/** @type {any} */ error) { + /* c8 ignore next 3 */ + if (error.code !== "ENOENT") { + throw error; + } + } +} + +/** + * Get stats of a given path without following symbolic links. + * @param {string} filePath The path to target file. + * @returns {Promise} The stats. + */ +async function lstatSafe(filePath) { + try { + return await fs.lstat(filePath); + } catch (/** @type {any} */ error) { + /* c8 ignore next 3 */ if (error.code !== "ENOENT") { throw error; } @@ -80,4 +96,24 @@ function isJson(value) { } } -module.exports = { printToScreen, groupBy, pick, createHash, statSafe, isJson }; +/** + * Replace `\` with `/` on Windows + * @param {string} filepath + * @returns {string} + */ +const normalizeToPosix = + path.sep === "\\" + ? (filepath) => filepath.replaceAll("\\", "/") + : (filepath) => filepath; + +export const { omit } = sharedWithCli.utils; +export { + createHash, + groupBy, + isJson, + lstatSafe, + normalizeToPosix, + pick, + printToScreen, + statSafe, +}; diff --git a/src/common/ast-path.js b/src/common/ast-path.js index ade4952a13c5..50f05f6a0397 100644 --- a/src/common/ast-path.js +++ b/src/common/ast-path.js @@ -1,52 +1,121 @@ -"use strict"; -const getLast = require("../utils/get-last.js"); +class AstPath { + constructor(value) { + this.stack = [value]; + } -function getNodeHelper(path, count) { - const stackIndex = getNodeStackIndexHelper(path.stack, count); - return stackIndex === -1 ? null : path.stack[stackIndex]; -} + /** @type {string | null} */ + get key() { + const { stack, siblings } = this; + return stack.at(siblings === null ? -2 : -4) ?? null; + } -function getNodeStackIndexHelper(stack, count) { - for (let i = stack.length - 1; i >= 0; i -= 2) { - const value = stack[i]; - if (value && !Array.isArray(value) && --count < 0) { - return i; - } + /** @type {number | null} */ + get index() { + return this.siblings === null ? null : this.stack.at(-2); } - return -1; -} -class AstPath { - constructor(value) { - this.stack = [value]; + /** @type {object} */ + get node() { + return this.stack.at(-1); + } + + /** @type {object | null} */ + get parent() { + return this.getNode(1); + } + + /** @type {object | null} */ + get grandparent() { + return this.getNode(2); + } + + /** @type {boolean} */ + get isInArray() { + return this.siblings !== null; + } + + /** @type {object[] | null} */ + get siblings() { + const { stack } = this; + const maybeArray = stack.at(-3); + return Array.isArray(maybeArray) ? maybeArray : null; + } + + /** @type {object | null} */ + get next() { + const { siblings } = this; + return siblings === null ? null : siblings[this.index + 1]; + } + + /** @type {object | null} */ + get previous() { + const { siblings } = this; + return siblings === null ? null : siblings[this.index - 1]; + } + + /** @type {boolean} */ + get isFirst() { + return this.index === 0; + } + + /** @type {boolean} */ + get isLast() { + const { siblings, index } = this; + return siblings !== null && index === siblings.length - 1; + } + + /** @type {boolean} */ + get isRoot() { + return this.stack.length === 1; + } + + /** @type {object} */ + get root() { + return this.stack[0]; + } + + /** @type {object[]} */ + get ancestors() { + return [...this.#getAncestors()]; } // The name of the current property is always the penultimate element of - // this.stack, and always a String. + // this.stack, and always a string/number/symbol. getName() { const { stack } = this; const { length } = stack; if (length > 1) { - return stack[length - 2]; + return stack.at(-2); } - // Since the name is always a string, null is a safe sentinel value to - // return if we do not know the name of the (root) value. - /* istanbul ignore next */ + // Since the name is a string/number/symbol, null is a safe sentinel value + // to return if we do not know the name of the (root) value. + /* c8 ignore next */ return null; } // The value of the current property is always the final element of // this.stack. getValue() { - return getLast(this.stack); + return this.stack.at(-1); } getNode(count = 0) { - return getNodeHelper(this, count); + const stackIndex = this.#getNodeStackIndex(count); + return stackIndex === -1 ? null : this.stack[stackIndex]; } getParentNode(count = 0) { - return getNodeHelper(this, count + 1); + return this.getNode(count + 1); + } + + #getNodeStackIndex(count) { + const { stack } = this; + for (let i = stack.length - 1; i >= 0; i -= 2) { + if (!Array.isArray(stack[i]) && --count < 0) { + return i; + } + } + return -1; } // Temporarily push properties named by string arguments given after the @@ -57,23 +126,33 @@ class AstPath { call(callback, ...names) { const { stack } = this; const { length } = stack; - let value = getLast(stack); + let value = stack.at(-1); for (const name of names) { value = value[name]; stack.push(name, value); } - const result = callback(this); - stack.length = length; - return result; + try { + return callback(this); + } finally { + stack.length = length; + } } + /** + * @template {(path: AstPath) => any} T + * @param {T} callback + * @param {number} [count=0] + * @returns {ReturnType} + */ callParent(callback, count = 0) { - const stackIndex = getNodeStackIndexHelper(this.stack, count + 1); + const stackIndex = this.#getNodeStackIndex(count + 1); const parentValues = this.stack.splice(stackIndex + 1); - const result = callback(this); - this.stack.push(...parentValues); - return result; + try { + return callback(this); + } finally { + this.stack.push(...parentValues); + } } // Similar to AstPath.prototype.call, except that the value obtained by @@ -83,20 +162,22 @@ class AstPath { each(callback, ...names) { const { stack } = this; const { length } = stack; - let value = getLast(stack); + let value = stack.at(-1); for (const name of names) { value = value[name]; stack.push(name, value); } - for (let i = 0; i < value.length; ++i) { - stack.push(i, value[i]); - callback(this, i, value); - stack.length -= 2; + try { + for (let i = 0; i < value.length; ++i) { + stack.push(i, value[i]); + callback(this, i, value); + stack.length -= 2; + } + } finally { + stack.length = length; } - - stack.length = length; } // Similar to AstPath.prototype.each, except that the results of the @@ -104,27 +185,15 @@ class AstPath { // the end of the iteration. map(callback, ...names) { const result = []; - this.each((path, index, value) => { - result[index] = callback(path, index, value); - }, ...names); + this.each( + (path, index, value) => { + result[index] = callback(path, index, value); + }, + ...names, + ); return result; } - /** - * @param {() => void} callback - * @internal Unstable API. Don't use in plugins for now. - */ - try(callback) { - const { stack } = this; - const stackBackup = [...stack]; - try { - return callback(); - } finally { - stack.length = 0; - stack.push(...stackBackup); - } - } - /** * @param {...( * | ((node: any, name: string | null, number: number | null) => boolean) @@ -138,7 +207,7 @@ class AstPath { let node = this.stack[stackPointer--]; for (const predicate of predicates) { - /* istanbul ignore next */ + /* c8 ignore next 3 */ if (node === undefined) { return false; } @@ -166,32 +235,45 @@ class AstPath { * Traverses the ancestors of the current node heading toward the tree root * until it finds a node that matches the provided predicate function. Will * return the first matching ancestor. If no such node exists, returns undefined. - * @param {(node: any, name: string, number: number | null) => boolean} predicate + * @param {(node: any) => boolean} predicate * @internal Unstable API. Don't use in plugins for now. */ findAncestor(predicate) { - let stackPointer = this.stack.length - 1; - - let name = null; - let node = this.stack[stackPointer--]; - - while (node) { - // skip index/array - let number = null; - if (typeof name === "number") { - number = name; - name = this.stack[stackPointer--]; - node = this.stack[stackPointer--]; + for (const node of this.#getAncestors()) { + if (predicate(node)) { + return node; } + } + } - if (name !== null && predicate(node, name, number)) { - return node; + /** + * Traverses the ancestors of the current node heading toward the tree root + * until it finds a node that matches the provided predicate function. + * returns true if matched node found. + * @param {(node: any) => boolean} predicate + * @returns {boolean} + * @internal Unstable API. Don't use in plugins for now. + */ + hasAncestor(predicate) { + for (const node of this.#getAncestors()) { + if (predicate(node)) { + return true; } + } - name = this.stack[stackPointer--]; - node = this.stack[stackPointer--]; + return false; + } + + *#getAncestors() { + const { stack } = this; + + for (let index = stack.length - 3; index >= 0; index -= 2) { + const value = stack[index]; + if (!Array.isArray(value)) { + yield value; + } } } } -module.exports = AstPath; +export default AstPath; diff --git a/src/common/common-options.evaluate.js b/src/common/common-options.evaluate.js new file mode 100644 index 000000000000..3b68ebdaeeb5 --- /dev/null +++ b/src/common/common-options.evaluate.js @@ -0,0 +1,70 @@ +const CATEGORY_COMMON = "Common"; + +// format based on https://github.com/prettier/prettier/blob/main/src/main/core-options.evaluate.js +const options = { + bracketSpacing: { + category: CATEGORY_COMMON, + type: "boolean", + default: true, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets.", + }, + objectWrap: { + category: CATEGORY_COMMON, + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [ + { + value: "preserve", + description: + "Keep as multi-line, if there is a newline between the opening brace and first property.", + }, + { + value: "collapse", + description: "Fit to a single line when possible.", + }, + ], + }, + singleQuote: { + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: "Use single quotes instead of double quotes.", + }, + proseWrap: { + category: CATEGORY_COMMON, + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width.", + }, + { + value: "never", + description: "Do not wrap prose.", + }, + { + value: "preserve", + description: "Wrap prose as-is.", + }, + ], + }, + bracketSameLine: { + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: + "Put > of opening tags on the last line instead of on a new line.", + }, + singleAttributePerLine: { + category: CATEGORY_COMMON, + type: "boolean", + default: false, + description: "Enforce single attribute per line in HTML, Vue and JSX.", + }, +}; + +export default options; diff --git a/src/common/common-options.js b/src/common/common-options.js deleted file mode 100644 index 7fa62085a5ea..000000000000 --- a/src/common/common-options.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; - -const CATEGORY_COMMON = "Common"; - -// format based on https://github.com/prettier/prettier/blob/main/src/main/core-options.js -module.exports = { - bracketSpacing: { - since: "0.0.0", - category: CATEGORY_COMMON, - type: "boolean", - default: true, - description: "Print spaces between brackets.", - oppositeDescription: "Do not print spaces between brackets.", - }, - singleQuote: { - since: "0.0.0", - category: CATEGORY_COMMON, - type: "boolean", - default: false, - description: "Use single quotes instead of double quotes.", - }, - proseWrap: { - since: "1.8.2", - category: CATEGORY_COMMON, - type: "choice", - default: [ - { since: "1.8.2", value: true }, - { since: "1.9.0", value: "preserve" }, - ], - description: "How to wrap prose.", - choices: [ - { - since: "1.9.0", - value: "always", - description: "Wrap prose if it exceeds the print width.", - }, - { - since: "1.9.0", - value: "never", - description: "Do not wrap prose.", - }, - { - since: "1.9.0", - value: "preserve", - description: "Wrap prose as-is.", - }, - ], - }, - bracketSameLine: { - since: "2.4.0", - category: CATEGORY_COMMON, - type: "boolean", - default: false, - description: - "Put > of opening tags on the last line instead of on a new line.", - }, - singleAttributePerLine: { - since: "2.6.0", - category: CATEGORY_COMMON, - type: "boolean", - default: false, - description: "Enforce single attribute per line in HTML, Vue and JSX.", - }, -}; diff --git a/src/common/create-ignorer.js b/src/common/create-ignorer.js deleted file mode 100644 index 5bae530ad4a6..000000000000 --- a/src/common/create-ignorer.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -const path = require("path"); -const ignore = require("ignore").default; -const getFileContentOrNull = require("../utils/get-file-content-or-null.js"); - -/** - * @param {string?} ignorePath - * @param {boolean?} withNodeModules - */ -async function createIgnorer(ignorePath, withNodeModules) { - const ignoreContent = ignorePath - ? await getFileContentOrNull(path.resolve(ignorePath)) - : null; - - return _createIgnorer(ignoreContent, withNodeModules); -} - -/** - * @param {string?} ignorePath - * @param {boolean?} withNodeModules - */ -createIgnorer.sync = function (ignorePath, withNodeModules) { - const ignoreContent = !ignorePath - ? null - : getFileContentOrNull.sync(path.resolve(ignorePath)); - return _createIgnorer(ignoreContent, withNodeModules); -}; - -/** - * @param {null | string} ignoreContent - * @param {boolean?} withNodeModules - */ -function _createIgnorer(ignoreContent, withNodeModules) { - const ignorer = ignore({ allowRelativePaths: true }).add(ignoreContent || ""); - if (!withNodeModules) { - ignorer.add("node_modules"); - } - return ignorer; -} - -module.exports = createIgnorer; diff --git a/src/common/end-of-line.js b/src/common/end-of-line.js index 994443c599c8..54bc688d02c1 100644 --- a/src/common/end-of-line.js +++ b/src/common/end-of-line.js @@ -1,8 +1,6 @@ -"use strict"; - function guessEndOfLine(text) { const index = text.indexOf("\r"); - if (index >= 0) { + if (index !== -1) { return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; } return "lf"; @@ -24,16 +22,16 @@ function countEndOfLineChars(text, eol) { switch (eol) { case "\n": - regex = /\n/g; + regex = /\n/gu; break; case "\r": - regex = /\r/g; + regex = /\r/gu; break; case "\r\n": - regex = /\r\n/g; + regex = /\r\n/gu; break; default: - /* istanbul ignore next */ + /* c8 ignore next */ throw new Error(`Unexpected "eol" ${JSON.stringify(eol)}.`); } @@ -42,12 +40,12 @@ function countEndOfLineChars(text, eol) { } function normalizeEndOfLine(text) { - return text.replace(/\r\n?/g, "\n"); + return text.replaceAll(/\r\n?/gu, "\n"); } -module.exports = { - guessEndOfLine, +export { convertEndOfLineToChars, countEndOfLineChars, + guessEndOfLine, normalizeEndOfLine, }; diff --git a/src/common/errors.js b/src/common/errors.js index 60979117bbf2..39a01489825a 100644 --- a/src/common/errors.js +++ b/src/common/errors.js @@ -1,13 +1,13 @@ -"use strict"; +class ConfigError extends Error { + name = "ConfigError"; +} -class ConfigError extends Error {} -class DebugError extends Error {} -class UndefinedParserError extends Error {} -class ArgExpansionBailout extends Error {} +class UndefinedParserError extends Error { + name = "UndefinedParserError"; +} -module.exports = { - ConfigError, - DebugError, - UndefinedParserError, - ArgExpansionBailout, -}; +class ArgExpansionBailout extends Error { + name = "ArgExpansionBailout"; +} + +export { ArgExpansionBailout, ConfigError, UndefinedParserError }; diff --git a/src/common/get-file-info.js b/src/common/get-file-info.js index e6851e39f6c1..6a967db6f448 100644 --- a/src/common/get-file-info.js +++ b/src/common/get-file-info.js @@ -1,123 +1,65 @@ -"use strict"; - -const path = require("path"); -const options = require("../main/options.js"); -const config = require("../config/resolve-config.js"); -const createIgnorer = require("./create-ignorer.js"); +import { resolveConfig } from "../config/resolve-config.js"; +import { loadBuiltinPlugins, loadPlugins } from "../main/plugins/index.js"; +import { isIgnored } from "../utils/ignore.js"; +import inferParser from "../utils/infer-parser.js"; /** - * @typedef {{ ignorePath?: string, withNodeModules?: boolean, plugins: object, resolveConfig?: boolean }} FileInfoOptions + * @typedef {{ ignorePath?: string | URL | (string | URL)[], withNodeModules?: boolean, plugins: object, resolveConfig?: boolean }} FileInfoOptions * @typedef {{ ignored: boolean, inferredParser: string | null }} FileInfoResult */ /** - * @param {string} filePath - * @param {FileInfoOptions} opts + * @param {string | URL} file + * @param {FileInfoOptions} options * @returns {Promise} * - * Please note that prettier.getFileInfo() expects opts.plugins to be an array of paths, - * not an object. A transformation from this array to an object is automatically done - * internally by the method wrapper. See withPlugins() in index.js. + * Please note that prettier.getFileInfo() expects options.plugins to be an array of paths, + * not an object. */ -async function getFileInfo(filePath, opts) { - if (typeof filePath !== "string") { +async function getFileInfo(file, options = {}) { + if (typeof file !== "string" && !(file instanceof URL)) { throw new TypeError( - `expect \`filePath\` to be a string, got \`${typeof filePath}\`` + `expect \`file\` to be a string or URL, got \`${typeof file}\``, ); } - const ignorer = await createIgnorer(opts.ignorePath, opts.withNodeModules); - return _getFileInfo({ - ignorer, - filePath, - plugins: opts.plugins, - resolveConfig: opts.resolveConfig, - ignorePath: opts.ignorePath, - sync: false, - }); -} - -/** - * @param {string} filePath - * @param {FileInfoOptions} opts - * @returns {FileInfoResult} - */ -getFileInfo.sync = function (filePath, opts) { - if (typeof filePath !== "string") { - throw new TypeError( - `expect \`filePath\` to be a string, got \`${typeof filePath}\`` - ); + let { ignorePath, withNodeModules } = options; + // In API we allow single `ignorePath` + if (!Array.isArray(ignorePath)) { + ignorePath = [ignorePath]; } - const ignorer = createIgnorer.sync(opts.ignorePath, opts.withNodeModules); - return _getFileInfo({ - ignorer, - filePath, - plugins: opts.plugins, - resolveConfig: opts.resolveConfig, - ignorePath: opts.ignorePath, - sync: true, - }); -}; - -function getFileParser(resolvedConfig, filePath, plugins) { - if (resolvedConfig && resolvedConfig.parser) { - return resolvedConfig.parser; + const ignored = await isIgnored(file, { ignorePath, withNodeModules }); + let inferredParser; + if (!ignored) { + inferredParser = options.parser ?? (await getParser(file, options)); } - const inferredParser = options.inferParser(filePath, plugins); - - if (inferredParser) { - return inferredParser; - } - - return null; -} - -function _getFileInfo({ - ignorer, - filePath, - plugins, - resolveConfig = false, - ignorePath, - sync = false, -}) { - const normalizedFilePath = normalizeFilePath(filePath, ignorePath); - - const fileInfo = { - ignored: ignorer.ignores(normalizedFilePath), - inferredParser: null, + return { + ignored, + inferredParser: inferredParser ?? null, }; +} - if (fileInfo.ignored) { - return fileInfo; +async function getParser(file, options) { + let config; + if (options.resolveConfig !== false) { + config = await resolveConfig(file, { + // No need read `.editorconfig` + editorconfig: false, + }); } - let resolvedConfig; - - if (resolveConfig) { - if (sync) { - resolvedConfig = config.resolveConfig.sync(filePath); - } else { - return config.resolveConfig(filePath).then((resolvedConfig) => { - fileInfo.inferredParser = getFileParser( - resolvedConfig, - filePath, - plugins - ); - return fileInfo; - }); - } + if (config?.parser) { + return config.parser; } - fileInfo.inferredParser = getFileParser(resolvedConfig, filePath, plugins); - return fileInfo; -} + let plugins = options.plugins ?? config?.plugins ?? []; + plugins = ( + await Promise.all([loadBuiltinPlugins(), loadPlugins(plugins)]) + ).flat(); -function normalizeFilePath(filePath, ignorePath) { - return ignorePath - ? path.relative(path.dirname(ignorePath), filePath) - : filePath; + return inferParser({ plugins }, { physicalFile: file }); } -module.exports = getFileInfo; +export default getFileInfo; diff --git a/src/common/load-plugins.js b/src/common/load-plugins.js deleted file mode 100644 index fd520ef1d119..000000000000 --- a/src/common/load-plugins.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const fastGlob = require("fast-glob"); -const partition = require("../utils/partition.js"); -const uniqByKey = require("../utils/uniq-by-key.js"); -const internalPlugins = require("../languages.js"); -const { default: mem, memClear } = require("../../vendors/mem.js"); -const thirdParty = require("./third-party.js"); -const resolve = require("./resolve.js"); - -const memoizedLoad = mem(load, { cacheKey: JSON.stringify }); -const memoizedSearch = mem(findPluginsInNodeModules); -const clearCache = () => { - memClear(memoizedLoad); - memClear(memoizedSearch); -}; - -function load(plugins, pluginSearchDirs) { - if (!plugins) { - plugins = []; - } - - if (pluginSearchDirs === false) { - pluginSearchDirs = []; - } else { - pluginSearchDirs = pluginSearchDirs || []; - - // unless pluginSearchDirs are provided, auto-load plugins from node_modules that are parent to Prettier - if (pluginSearchDirs.length === 0) { - const autoLoadDir = thirdParty.findParentDir(__dirname, "node_modules"); - if (autoLoadDir) { - pluginSearchDirs = [autoLoadDir]; - } - } - } - - const [externalPluginNames, externalPluginInstances] = partition( - plugins, - (plugin) => typeof plugin === "string" - ); - - const externalManualLoadPluginInfos = externalPluginNames.map( - (pluginName) => { - let requirePath; - try { - // try local files - requirePath = resolve(path.resolve(process.cwd(), pluginName)); - } catch { - // try node modules - requirePath = resolve(pluginName, { paths: [process.cwd()] }); - } - - return { - name: pluginName, - requirePath, - }; - } - ); - - const externalAutoLoadPluginInfos = pluginSearchDirs.flatMap( - (pluginSearchDir) => { - const resolvedPluginSearchDir = path.resolve( - process.cwd(), - pluginSearchDir - ); - - const nodeModulesDir = path.resolve( - resolvedPluginSearchDir, - "node_modules" - ); - - // In some fringe cases (ex: files "mounted" as virtual directories), the - // isDirectory(resolvedPluginSearchDir) check might be false even though - // the node_modules actually exists. - if ( - !isDirectory(nodeModulesDir) && - !isDirectory(resolvedPluginSearchDir) - ) { - throw new Error( - `${pluginSearchDir} does not exist or is not a directory` - ); - } - - return memoizedSearch(nodeModulesDir).map((pluginName) => ({ - name: pluginName, - requirePath: resolve(pluginName, { paths: [resolvedPluginSearchDir] }), - })); - } - ); - - const externalPlugins = [ - ...uniqByKey( - [...externalManualLoadPluginInfos, ...externalAutoLoadPluginInfos], - "requirePath" - ).map((externalPluginInfo) => ({ - name: externalPluginInfo.name, - ...require(externalPluginInfo.requirePath), - })), - ...externalPluginInstances, - ]; - - return [...internalPlugins, ...externalPlugins]; -} - -function findPluginsInNodeModules(nodeModulesDir) { - const pluginPackageJsonPaths = fastGlob.sync( - [ - "prettier-plugin-*/package.json", - "@*/prettier-plugin-*/package.json", - "@prettier/plugin-*/package.json", - ], - { - cwd: nodeModulesDir, - } - ); - return pluginPackageJsonPaths.map(path.dirname); -} - -function isDirectory(dir) { - try { - return fs.statSync(dir).isDirectory(); - } catch { - return false; - } -} - -module.exports = { - loadPlugins: memoizedLoad, - clearCache, -}; diff --git a/src/common/mockable.js b/src/common/mockable.js new file mode 100644 index 000000000000..cbf68566c89e --- /dev/null +++ b/src/common/mockable.js @@ -0,0 +1,8 @@ +import createMockable from "../utils/create-mockable.js"; + +const mockable = createMockable({ + getPrettierConfigSearchStopDirectory: () => undefined, +}); + +export default mockable.mocked; +export { mockable }; diff --git a/src/common/parser-create-error.js b/src/common/parser-create-error.js index f7ee8e5e1043..93810edfc367 100644 --- a/src/common/parser-create-error.js +++ b/src/common/parser-create-error.js @@ -1,13 +1,17 @@ -"use strict"; +function createError(message, options) { + // TODO: Use `Error.prototype.cause` when we drop support for Node.js<18.7.0 -function createError(message, loc) { // Construct an error similar to the ones thrown by Babel. const error = new SyntaxError( - message + " (" + loc.start.line + ":" + loc.start.column + ")" + message + + " (" + + options.loc.start.line + + ":" + + options.loc.start.column + + ")", ); - // @ts-expect-error - TBD (...) - error.loc = loc; - return error; + + return Object.assign(error, options); } -module.exports = createError; +export default createError; diff --git a/src/common/resolve.js b/src/common/resolve.js deleted file mode 100644 index 8989edc97f86..000000000000 --- a/src/common/resolve.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -let { resolve } = require; - -// In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument. -if (resolve.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) { - // @ts-expect-error - resolve = (id, options) => { - let basedir; - if (options && options.paths && options.paths.length === 1) { - basedir = options.paths[0]; - } - - return require("resolve").sync(id, { basedir }); - }; -} - -module.exports = resolve; diff --git a/src/common/third-party.js b/src/common/third-party.js deleted file mode 100644 index a70e30d3b63b..000000000000 --- a/src/common/third-party.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = { - cosmiconfig: require("cosmiconfig").cosmiconfig, - cosmiconfigSync: require("cosmiconfig").cosmiconfigSync, - findParentDir: require("find-parent-dir").sync, - getStdin: require("get-stdin"), - isCI: () => require("ci-info").isCI, -}; diff --git a/src/common/util-shared.js b/src/common/util-shared.js deleted file mode 100644 index 0c03bb731453..000000000000 --- a/src/common/util-shared.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -const { - getMaxContinuousCount, - getStringWidth, - getAlignmentSize, - getIndentSize, - skip, - skipWhitespace, - skipSpaces, - skipNewline, - skipToLineEnd, - skipEverythingButNewLine, - skipInlineComment, - skipTrailingComment, - hasNewline, - hasNewlineInRange, - hasSpaces, - isNextLineEmpty, - isNextLineEmptyAfterIndex, - isPreviousLineEmpty, - getNextNonSpaceNonCommentCharacterIndex, - makeString, - addLeadingComment, - addDanglingComment, - addTrailingComment, -} = require("./util.js"); - -module.exports = { - getMaxContinuousCount, - getStringWidth, - getAlignmentSize, - getIndentSize, - skip, - skipWhitespace, - skipSpaces, - skipNewline, - skipToLineEnd, - skipEverythingButNewLine, - skipInlineComment, - skipTrailingComment, - hasNewline, - hasNewlineInRange, - hasSpaces, - isNextLineEmpty, - isNextLineEmptyAfterIndex, - isPreviousLineEmpty, - getNextNonSpaceNonCommentCharacterIndex, - makeString, - addLeadingComment, - addDanglingComment, - addTrailingComment, -}; diff --git a/src/common/util.js b/src/common/util.js deleted file mode 100644 index b395ab3e8e59..000000000000 --- a/src/common/util.js +++ /dev/null @@ -1,520 +0,0 @@ -"use strict"; - -const { - default: escapeStringRegexp, -} = require("../../vendors/escape-string-regexp.js"); -const getLast = require("../utils/get-last.js"); -const { getSupportInfo } = require("../main/support.js"); -const isNonEmptyArray = require("../utils/is-non-empty-array.js"); -const getStringWidth = require("../utils/get-string-width.js"); -const { - skipWhitespace, - skipSpaces, - skipToLineEnd, - skipEverythingButNewLine, -} = require("../utils/text/skip.js"); -const skipInlineComment = require("../utils/text/skip-inline-comment.js"); -const skipTrailingComment = require("../utils/text/skip-trailing-comment.js"); -const skipNewline = require("../utils/text/skip-newline.js"); -const getNextNonSpaceNonCommentCharacterIndexWithStartIndex = require("../utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"); - -const getPenultimate = (arr) => arr[arr.length - 2]; - -/** - * @typedef {{backwards?: boolean}} SkipOptions - */ - -/** - * @param {string | RegExp} chars - * @returns {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ -function skip(chars) { - return (text, index, opts) => { - const backwards = opts && opts.backwards; - - // Allow `skip` functions to be threaded together without having - // to check for failures (did someone say monads?). - /* istanbul ignore next */ - if (index === false) { - return false; - } - - const { length } = text; - let cursor = index; - while (cursor >= 0 && cursor < length) { - const c = text.charAt(cursor); - if (chars instanceof RegExp) { - if (!chars.test(c)) { - return cursor; - } - } else if (!chars.includes(c)) { - return cursor; - } - - backwards ? cursor-- : cursor++; - } - - if (cursor === -1 || cursor === length) { - // If we reached the beginning or end of the file, return the - // out-of-bounds cursor. It's up to the caller to handle this - // correctly. We don't want to indicate `false` though if it - // actually skipped valid characters. - return cursor; - } - return false; - }; -} - -/** - * @param {string} text - * @param {number} index - * @param {SkipOptions=} opts - * @returns {boolean} - */ -function hasNewline(text, index, opts = {}) { - const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); - const idx2 = skipNewline(text, idx, opts); - return idx !== idx2; -} - -/** - * @param {string} text - * @param {number} start - * @param {number} end - * @returns {boolean} - */ -function hasNewlineInRange(text, start, end) { - for (let i = start; i < end; ++i) { - if (text.charAt(i) === "\n") { - return true; - } - } - return false; -} - -// Note: this function doesn't ignore leading comments unlike isNextLineEmpty -/** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locStart - */ -function isPreviousLineEmpty(text, node, locStart) { - /** @type {number | false} */ - let idx = locStart(node) - 1; - idx = skipSpaces(text, idx, { backwards: true }); - idx = skipNewline(text, idx, { backwards: true }); - idx = skipSpaces(text, idx, { backwards: true }); - const idx2 = skipNewline(text, idx, { backwards: true }); - return idx !== idx2; -} - -/** - * @param {string} text - * @param {number} index - * @returns {boolean} - */ -function isNextLineEmptyAfterIndex(text, index) { - /** @type {number | false} */ - let oldIdx = null; - /** @type {number | false} */ - let idx = index; - while (idx !== oldIdx) { - // We need to skip all the potential trailing inline comments - oldIdx = idx; - idx = skipToLineEnd(text, idx); - idx = skipInlineComment(text, idx); - idx = skipSpaces(text, idx); - } - idx = skipTrailingComment(text, idx); - idx = skipNewline(text, idx); - return idx !== false && hasNewline(text, idx); -} - -/** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {boolean} - */ -function isNextLineEmpty(text, node, locEnd) { - return isNextLineEmptyAfterIndex(text, locEnd(node)); -} - -/** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {number | false} - */ -function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { - return getNextNonSpaceNonCommentCharacterIndexWithStartIndex( - text, - locEnd(node) - ); -} - -/** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {string} - */ -function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { - return text.charAt( - // @ts-expect-error => TBD: can return false, should we define a fallback? - getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) - ); -} - -// Not using, but it's public utils -/* istanbul ignore next */ -/** - * @param {string} text - * @param {number} index - * @param {SkipOptions=} opts - * @returns {boolean} - */ -function hasSpaces(text, index, opts = {}) { - const idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); - return idx !== index; -} - -/** - * @param {string} value - * @param {number} tabWidth - * @param {number=} startIndex - * @returns {number} - */ -function getAlignmentSize(value, tabWidth, startIndex = 0) { - let size = 0; - for (let i = startIndex; i < value.length; ++i) { - if (value[i] === "\t") { - // Tabs behave in a way that they are aligned to the nearest - // multiple of tabWidth: - // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4 - // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ... - size = size + tabWidth - (size % tabWidth); - } else { - size++; - } - } - - return size; -} - -/** - * @param {string} value - * @param {number} tabWidth - * @returns {number} - */ -function getIndentSize(value, tabWidth) { - const lastNewlineIndex = value.lastIndexOf("\n"); - if (lastNewlineIndex === -1) { - return 0; - } - - return getAlignmentSize( - // All the leading whitespaces - value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0], - tabWidth - ); -} - -/** - * @typedef {'"' | "'"} Quote - */ - -/** - * - * @param {string} rawContent - * @param {Quote} preferredQuote - * @returns {{ quote: Quote, regex: RegExp, escaped: string }} - */ - -function getPreferredQuote(rawContent, preferredQuote) { - /** @type {{ quote: '"', regex: RegExp, escaped: """ }} */ - const double = { quote: '"', regex: /"/g, escaped: """ }; - /** @type {{ quote: "'", regex: RegExp, escaped: "'" }} */ - const single = { quote: "'", regex: /'/g, escaped: "'" }; - - const preferred = preferredQuote === "'" ? single : double; - const alternate = preferred === single ? double : single; - - let result = preferred; - - // If `rawContent` contains at least one of the quote preferred for enclosing - // the string, we might want to enclose with the alternate quote instead, to - // minimize the number of escaped quotes. - if ( - rawContent.includes(preferred.quote) || - rawContent.includes(alternate.quote) - ) { - const numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; - const numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; - - result = numPreferredQuotes > numAlternateQuotes ? alternate : preferred; - } - - return result; -} - -function printString(raw, options) { - // `rawContent` is the string exactly like it appeared in the input source - // code, without its enclosing quotes. - const rawContent = raw.slice(1, -1); - - /** @type {Quote} */ - const enclosingQuote = - options.parser === "json" || - (options.parser === "json5" && - options.quoteProps === "preserve" && - !options.singleQuote) - ? '"' - : options.__isInHtmlAttribute - ? "'" - : getPreferredQuote(rawContent, options.singleQuote ? "'" : '"').quote; - - // It might sound unnecessary to use `makeString` even if the string already - // is enclosed with `enclosingQuote`, but it isn't. The string could contain - // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes - // sure that we consistently output the minimum amount of escaped quotes. - return makeString( - rawContent, - enclosingQuote, - !( - options.parser === "css" || - options.parser === "less" || - options.parser === "scss" || - options.__embeddedInHtml - ) - ); -} - -/** - * @param {string} rawContent - * @param {Quote} enclosingQuote - * @param {boolean=} unescapeUnnecessaryEscapes - * @returns {string} - */ -function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { - const otherQuote = enclosingQuote === '"' ? "'" : '"'; - - // Matches _any_ escape and unescaped quotes (both single and double). - const regex = /\\(.)|(["'])/gs; - - // Escape and unescape single and double quotes as needed to be able to - // enclose `rawContent` with `enclosingQuote`. - const newContent = rawContent.replace(regex, (match, escaped, quote) => { - // If we matched an escape, and the escaped character is a quote of the - // other type than we intend to enclose the string with, there's no need for - // it to be escaped, so return it _without_ the backslash. - if (escaped === otherQuote) { - return escaped; - } - - // If we matched an unescaped quote and it is of the _same_ type as we - // intend to enclose the string with, it must be escaped, so return it with - // a backslash. - if (quote === enclosingQuote) { - return "\\" + quote; - } - - if (quote) { - return quote; - } - - // Unescape any unnecessarily escaped character. - // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27 - return unescapeUnnecessaryEscapes && - /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(escaped) - ? escaped - : "\\" + escaped; - }); - - return enclosingQuote + newContent + enclosingQuote; -} - -function printNumber(rawNumber) { - return ( - rawNumber - .toLowerCase() - // Remove unnecessary plus and zeroes from scientific notation. - .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") - // Remove unnecessary scientific notation (1e0). - .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") - // Make sure numbers always start with a digit. - .replace(/^([+-])?\./, "$10.") - // Remove extraneous trailing decimal zeroes. - .replace(/(\.\d+?)0+(?=e|$)/, "$1") - // Remove trailing dot. - .replace(/\.(?=e|$)/, "") - ); -} - -/** - * @param {string} str - * @param {string} target - * @returns {number} - */ -function getMaxContinuousCount(str, target) { - const results = str.match( - new RegExp(`(${escapeStringRegexp(target)})+`, "g") - ); - - if (results === null) { - return 0; - } - - return results.reduce( - (maxCount, result) => Math.max(maxCount, result.length / target.length), - 0 - ); -} - -function getMinNotPresentContinuousCount(str, target) { - const matches = str.match( - new RegExp(`(${escapeStringRegexp(target)})+`, "g") - ); - - if (matches === null) { - return 0; - } - - const countPresent = new Map(); - let max = 0; - - for (const match of matches) { - const count = match.length / target.length; - countPresent.set(count, true); - if (count > max) { - max = count; - } - } - - for (let i = 1; i < max; i++) { - if (!countPresent.get(i)) { - return i; - } - } - - return max + 1; -} - -function addCommentHelper(node, comment) { - const comments = node.comments || (node.comments = []); - comments.push(comment); - comment.printed = false; - comment.nodeDescription = describeNodeForDebugging(node); -} - -function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); -} - -function addDanglingComment(node, comment, marker) { - comment.leading = false; - comment.trailing = false; - if (marker) { - comment.marker = marker; - } - addCommentHelper(node, comment); -} - -function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); -} - -function inferParserByLanguage(language, options) { - const { languages } = getSupportInfo({ plugins: options.plugins }); - const matched = - languages.find(({ name }) => name.toLowerCase() === language) || - languages.find( - ({ aliases }) => Array.isArray(aliases) && aliases.includes(language) - ) || - languages.find( - ({ extensions }) => - Array.isArray(extensions) && extensions.includes(`.${language}`) - ); - return matched && matched.parsers[0]; -} - -function isFrontMatterNode(node) { - return node && node.type === "front-matter"; -} - -/** - * @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); - }; -} - -function describeNodeForDebugging(node) { - const nodeType = node.type || node.kind || "(unknown type)"; - let nodeName = String( - node.name || - (node.id && (typeof node.id === "object" ? node.id.name : node.id)) || - (node.key && (typeof node.key === "object" ? node.key.name : node.key)) || - (node.value && - (typeof node.value === "object" ? "" : String(node.value))) || - node.operator || - "" - ); - if (nodeName.length > 20) { - nodeName = nodeName.slice(0, 19) + "…"; - } - return nodeType + (nodeName ? " " + nodeName : ""); -} - -module.exports = { - inferParserByLanguage, - getStringWidth, - getMaxContinuousCount, - getMinNotPresentContinuousCount, - getPenultimate, - getLast, - getNextNonSpaceNonCommentCharacterIndexWithStartIndex, - getNextNonSpaceNonCommentCharacterIndex, - getNextNonSpaceNonCommentCharacter, - skip, - skipWhitespace, - skipSpaces, - skipToLineEnd, - skipEverythingButNewLine, - skipInlineComment, - skipTrailingComment, - skipNewline, - isNextLineEmptyAfterIndex, - isNextLineEmpty, - isPreviousLineEmpty, - hasNewline, - hasNewlineInRange, - hasSpaces, - getAlignmentSize, - getIndentSize, - getPreferredQuote, - printString, - printNumber, - makeString, - addLeadingComment, - addDanglingComment, - addTrailingComment, - isFrontMatterNode, - isNonEmptyArray, - createGroupIdMapper, -}; diff --git a/src/config/editorconfig/editorconfig-to-prettier.js b/src/config/editorconfig/editorconfig-to-prettier.js new file mode 100644 index 000000000000..70e5743a25c2 --- /dev/null +++ b/src/config/editorconfig/editorconfig-to-prettier.js @@ -0,0 +1,68 @@ +function removeUnset(editorConfig) { + const result = {}; + const keys = Object.keys(editorConfig); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (editorConfig[key] === "unset") { + continue; + } + result[key] = editorConfig[key]; + } + return result; +} + +function editorConfigToPrettier(editorConfig) { + if (!editorConfig) { + return null; + } + + editorConfig = removeUnset(editorConfig); + + if (Object.keys(editorConfig).length === 0) { + return null; + } + + const result = {}; + + if (editorConfig.indent_style) { + result.useTabs = editorConfig.indent_style === "tab"; + } + + if (editorConfig.indent_size === "tab") { + result.useTabs = true; + } + + if (result.useTabs && editorConfig.tab_width) { + result.tabWidth = editorConfig.tab_width; + } else if ( + editorConfig.indent_style === "space" && + editorConfig.indent_size && + editorConfig.indent_size !== "tab" + ) { + result.tabWidth = editorConfig.indent_size; + } else if (editorConfig.tab_width !== undefined) { + result.tabWidth = editorConfig.tab_width; + } + + if (editorConfig.max_line_length) { + if (editorConfig.max_line_length === "off") { + result.printWidth = Number.POSITIVE_INFINITY; + } else { + result.printWidth = editorConfig.max_line_length; + } + } + + if (editorConfig.quote_type === "single") { + result.singleQuote = true; + } else if (editorConfig.quote_type === "double") { + result.singleQuote = false; + } + + if (["cr", "crlf", "lf"].includes(editorConfig.end_of_line)) { + result.endOfLine = editorConfig.end_of_line; + } + + return result; +} + +export default editorConfigToPrettier; diff --git a/src/config/editorconfig/index.js b/src/config/editorconfig/index.js new file mode 100644 index 000000000000..7a5384a33b9e --- /dev/null +++ b/src/config/editorconfig/index.js @@ -0,0 +1,42 @@ +import path from "node:path"; +import editorconfig from "editorconfig"; +import { + clearFindProjectRootCache, + findProjectRoot, +} from "../find-project-root.js"; +import editorConfigToPrettier from "./editorconfig-to-prettier.js"; + +const editorconfigCache = new Map(); + +function clearEditorconfigCache() { + clearFindProjectRootCache(); + editorconfigCache.clear(); +} + +async function loadEditorconfigInternal(file, { shouldCache }) { + const directory = path.dirname(file); + const root = await findProjectRoot(directory, { shouldCache }); + const editorConfig = await editorconfig.parse(file, { root }); + const config = editorConfigToPrettier(editorConfig); + return config; +} + +/** + * @param {string} file + * @param {{shouldCache?: boolean}} options + */ +function loadEditorconfig(file, { shouldCache }) { + file = path.resolve(file); + + if (!shouldCache || !editorconfigCache.has(file)) { + // Even if `shouldCache` is false, we still cache the result, so we can use it when `shouldCache` is true + editorconfigCache.set( + file, + loadEditorconfigInternal(file, { shouldCache }), + ); + } + + return editorconfigCache.get(file); +} + +export { clearEditorconfigCache, loadEditorconfig }; diff --git a/src/config/find-project-root.js b/src/config/find-project-root.js index 10ca7faeb982..200edad1004e 100644 --- a/src/config/find-project-root.js +++ b/src/config/find-project-root.js @@ -1,26 +1,31 @@ -"use strict"; - // Simple version of `find-project-root` // https://github.com/kirstein/find-project-root/blob/master/index.js -const fs = require("fs"); -const path = require("path"); +import * as path from "node:path"; +import { DirectorySearcher } from "search-closest"; + +const DIRECTORIES = [".git", ".hg"]; -const MARKERS = [".git", ".hg"]; +/** @type {DirectorySearcher} */ +let searcher; -const markerExists = (directory) => - MARKERS.some((mark) => fs.existsSync(path.join(directory, mark))); +/** + * Find the directory contains a version control system directory + * @param {string} startDirectory + * @param {{shouldCache?: boolean}} options + * @returns {Promise} + */ +async function findProjectRoot(startDirectory, options) { + searcher ??= new DirectorySearcher(DIRECTORIES, { allowSymlinks: false }); + const directory = await searcher.search(startDirectory, { + cache: options.shouldCache, + }); -function findProjectRoot(directory) { - while (!markerExists(directory)) { - const parentDirectory = path.resolve(directory, ".."); - if (parentDirectory === directory) { - break; - } - directory = parentDirectory; - } + return directory ? path.dirname(directory) : undefined; +} - return directory; +function clearFindProjectRootCache() { + searcher?.clearCache(); } -module.exports = findProjectRoot; +export { clearFindProjectRootCache, findProjectRoot }; diff --git a/src/config/prettier-config/config-searcher.js b/src/config/prettier-config/config-searcher.js new file mode 100644 index 000000000000..474509757892 --- /dev/null +++ b/src/config/prettier-config/config-searcher.js @@ -0,0 +1,59 @@ +import { FileSearcher } from "search-closest"; +import { + loadConfigFromPackageJson, + loadConfigFromPackageYaml, +} from "./loaders.js"; + +/** +@import {SearcherOptions} from 'search-closest' +*/ + +const CONFIG_FILE_NAMES = [ + "package.json", + "package.yaml", + ".prettierrc", + ".prettierrc.json", + ".prettierrc.yaml", + ".prettierrc.yml", + ".prettierrc.json5", + ".prettierrc.js", + ".prettierrc.ts", + ".prettierrc.mjs", + ".prettierrc.mts", + ".prettierrc.cjs", + ".prettierrc.cts", + "prettier.config.js", + "prettier.config.ts", + "prettier.config.mjs", + "prettier.config.mts", + "prettier.config.cjs", + "prettier.config.cts", + ".prettierrc.toml", +]; + +/** @type {SearcherOptions["filter"]} */ +async function filter({ name, path: file }) { + if (name === "package.json") { + try { + return Boolean(await loadConfigFromPackageJson(file)); + } catch { + return false; + } + } + + if (name === "package.yaml") { + try { + return Boolean(await loadConfigFromPackageYaml(file)); + } catch { + return false; + } + } + + return true; +} + +function getSearcher(stopDirectory) { + return new FileSearcher(CONFIG_FILE_NAMES, { filter, stopDirectory }); +} + +export default getSearcher; diff --git a/src/config/prettier-config/index.js b/src/config/prettier-config/index.js new file mode 100644 index 000000000000..d86fe2868b99 --- /dev/null +++ b/src/config/prettier-config/index.js @@ -0,0 +1,66 @@ +import path from "node:path"; +import mockable from "../../common/mockable.js"; +import getConfigSearcher from "./config-searcher.js"; +import loadConfig from "./load-config.js"; + +/** +@import {FileSearcher} from 'search-closest' +*/ + +const loadCache = new Map(); +const searchCache = new Map(); +function clearPrettierConfigCache() { + loadCache.clear(); + searchCache.clear(); +} + +/** + * @param {string} configFile + * @param {{shouldCache?: boolean}} param1 + * @returns {Promise>} + */ +function loadPrettierConfig(configFile, { shouldCache }) { + configFile = path.resolve(configFile); + + if (!shouldCache || !loadCache.has(configFile)) { + // Even if `shouldCache` is false, we still cache the result, so we can use it when `shouldCache` is true + loadCache.set(configFile, loadConfig(configFile)); + } + + return loadCache.get(configFile); +} + +/** +@param {string} stopDirectory +@returns {FileSearcher["search"]} +*/ +function getSearchFunction(stopDirectory) { + stopDirectory = stopDirectory ? path.resolve(stopDirectory) : undefined; + + if (!searchCache.has(stopDirectory)) { + const searcher = getConfigSearcher(stopDirectory); + const searchFunction = searcher.search.bind(searcher); + searchCache.set(stopDirectory, searchFunction); + } + + return searchCache.get(stopDirectory); +} + +/** + * @param {string} startDirectory + * @param {{shouldCache?: boolean}} options + * @returns {Promise} + */ +function searchPrettierConfig(startDirectory, options = {}) { + startDirectory = startDirectory + ? path.resolve(startDirectory) + : process.cwd(); + + const stopDirectory = mockable.getPrettierConfigSearchStopDirectory(); + + const search = getSearchFunction(stopDirectory); + + return search(startDirectory, { cache: options.shouldCache }); +} + +export { clearPrettierConfigCache, loadPrettierConfig, searchPrettierConfig }; diff --git a/src/config/prettier-config/load-config.js b/src/config/prettier-config/load-config.js new file mode 100644 index 000000000000..b0aa7174b63a --- /dev/null +++ b/src/config/prettier-config/load-config.js @@ -0,0 +1,53 @@ +import path from "node:path"; +import loadExternalConfig from "./load-external-config.js"; +import loaders, { + loadConfigFromPackageJson, + loadConfigFromPackageYaml, +} from "./loaders.js"; + +async function loadConfig(configFile) { + const { base: fileName, ext: extension } = path.parse(configFile); + const load = + fileName === "package.json" + ? loadConfigFromPackageJson + : fileName === "package.yaml" + ? loadConfigFromPackageYaml + : loaders[extension]; + + if (!load) { + throw new Error( + `No loader specified for extension "${extension || "noExt"}"`, + ); + } + + let config = await load(configFile); + + if (!config) { + return; + } + + /* + We support external config + + ```json + { + "prettier": "my-prettier-config-package-or-file" + } + ``` + */ + if (typeof config === "string") { + config = await loadExternalConfig(config, configFile); + } + + if (typeof config !== "object") { + throw new TypeError( + "Config is only allowed to be an object, " + + `but received ${typeof config} in "${configFile}"`, + ); + } + + delete config.$schema; + return config; +} + +export default loadConfig; diff --git a/src/config/prettier-config/load-external-config.js b/src/config/prettier-config/load-external-config.js new file mode 100644 index 000000000000..0f69763b50e7 --- /dev/null +++ b/src/config/prettier-config/load-external-config.js @@ -0,0 +1,36 @@ +import importFromFile from "../../utils/import-from-file.js"; +import requireFromFile from "../../utils/require-from-file.js"; + +const requireErrorCodesShouldBeIgnored = new Set([ + "MODULE_NOT_FOUND", + "ERR_REQUIRE_ESM", + "ERR_PACKAGE_PATH_NOT_EXPORTED", + "ERR_REQUIRE_ASYNC_MODULE", +]); +async function loadExternalConfig(externalConfig, configFile) { + /* + Try `require()` first, this is how it works in Prettier v2. + Kept this because the external config path or package may can't load with `import()`: + 1. is JSON file or package + 2. is CommonJS file without extension + 3. is a dirname with index.js inside + */ + try { + const required = requireFromFile(externalConfig, configFile); + // Since Node.js v22.12 onwards, it is possible to load ESM via `require()`. + // If that feature is enabled, it is necessary to return the default. + if (process.features.require_module && required.__esModule) { + return required.default; + } + return required; + } catch (/** @type {any} */ error) { + if (!requireErrorCodesShouldBeIgnored.has(error?.code)) { + throw error; + } + } + + const module = await importFromFile(externalConfig, configFile); + return module.default; +} + +export default loadExternalConfig; diff --git a/src/config/prettier-config/loaders.js b/src/config/prettier-config/loaders.js new file mode 100644 index 000000000000..48a29d33e760 --- /dev/null +++ b/src/config/prettier-config/loaders.js @@ -0,0 +1,110 @@ +import { pathToFileURL } from "node:url"; +import json5 from "json5"; +import parseJson from "parse-json"; +import { parse as parseToml } from "smol-toml"; +import readFile from "../../utils/read-file.js"; + +async function readJson(file) { + const content = await readFile(file); + try { + return parseJson(content); + } catch (/** @type {any} */ error) { + error.message = `JSON Error in ${file}:\n${error.message}`; + throw error; + } +} + +async function importModuleDefault(file) { + const module = await import(pathToFileURL(file).href); + return module.default; +} + +async function readBunPackageJson(file) { + try { + return await readJson(file); + } catch (error) { + // TODO: Add tests for this + // Bun supports comments and trialing comma in `package.json` + // And it can load via `import()` + // https://bun.sh/blog/bun-v1.2#jsonc-support-in-package-json + try { + return await importModuleDefault(file); + } catch { + // No op + } + + throw error; + } +} + +const loadConfigFromPackageJson = process.versions.bun + ? async function loadConfigFromBunPackageJson(file) { + const { prettier } = await readBunPackageJson(file); + return prettier; + } + : async function loadConfigFromPackageJson(file) { + const { prettier } = await readJson(file); + return prettier; + }; + +async function loadConfigFromPackageYaml(file) { + const { prettier } = await loadYaml(file); + return prettier; +} + +let parseYaml; +async function loadYaml(file) { + const content = await readFile(file); + + if (!parseYaml) { + ({ __parsePrettierYamlConfig: parseYaml } = await import( + "../../plugins/yaml.js" + )); + } + + try { + return parseYaml(content); + } catch (/** @type {any} */ error) { + error.message = `YAML Error in ${file}:\n${error.message}`; + throw error; + } +} + +async function loadToml(file) { + const content = await readFile(file); + try { + return parseToml(content); + } catch (/** @type {any} */ error) { + error.message = `TOML Error in ${file}:\n${error.message}`; + throw error; + } +} + +async function loadJson5(file) { + const content = await readFile(file); + try { + return json5.parse(content); + } catch (/** @type {any} */ error) { + error.message = `JSON5 Error in ${file}:\n${error.message}`; + throw error; + } +} + +const loaders = { + ".toml": loadToml, + ".json5": loadJson5, + ".json": readJson, + ".js": importModuleDefault, + ".mjs": importModuleDefault, + ".cjs": importModuleDefault, + ".ts": importModuleDefault, + ".mts": importModuleDefault, + ".cts": importModuleDefault, + ".yaml": loadYaml, + ".yml": loadYaml, + // No extension + "": loadYaml, +}; + +export default loaders; +export { loadConfigFromPackageJson, loadConfigFromPackageYaml }; diff --git a/src/config/resolve-config-editorconfig.js b/src/config/resolve-config-editorconfig.js deleted file mode 100644 index e7db00d1c8fd..000000000000 --- a/src/config/resolve-config-editorconfig.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -const path = require("path"); - -const editorconfig = require("editorconfig"); -const editorConfigToPrettier = require("editorconfig-to-prettier"); -const { default: mem, memClear } = require("../../vendors/mem.js"); -const findProjectRoot = require("./find-project-root.js"); - -const jsonStringifyMem = (fn) => mem(fn, { cacheKey: JSON.stringify }); - -const maybeParse = (filePath, parse) => - filePath && - parse(filePath, { - root: findProjectRoot(path.dirname(path.resolve(filePath))), - }); - -const editorconfigAsyncNoCache = async (filePath) => - editorConfigToPrettier(await maybeParse(filePath, editorconfig.parse)); -const editorconfigAsyncWithCache = jsonStringifyMem(editorconfigAsyncNoCache); - -const editorconfigSyncNoCache = (filePath) => - editorConfigToPrettier(maybeParse(filePath, editorconfig.parseSync)); -const editorconfigSyncWithCache = jsonStringifyMem(editorconfigSyncNoCache); - -function getLoadFunction(opts) { - if (!opts.editorconfig) { - return () => null; - } - - if (opts.sync) { - return opts.cache ? editorconfigSyncWithCache : editorconfigSyncNoCache; - } - - return opts.cache ? editorconfigAsyncWithCache : editorconfigAsyncNoCache; -} - -function clearCache() { - memClear(editorconfigSyncWithCache); - memClear(editorconfigAsyncWithCache); -} - -module.exports = { - getLoadFunction, - clearCache, -}; diff --git a/src/config/resolve-config.js b/src/config/resolve-config.js index e5ee802212bd..d817c6f823a9 100644 --- a/src/config/resolve-config.js +++ b/src/config/resolve-config.js @@ -1,165 +1,98 @@ -"use strict"; - -const path = require("path"); -const micromatch = require("micromatch"); -const thirdParty = require("../common/third-party.js"); - -const loadToml = require("../utils/load-toml.js"); -const loadJson5 = require("../utils/load-json5.js"); -const partition = require("../utils/partition.js"); -const resolve = require("../common/resolve.js"); -const { default: mem, memClear } = require("../../vendors/mem.js"); -const resolveEditorConfig = require("./resolve-config-editorconfig.js"); - -/** - * @typedef {ReturnType} Explorer - * @typedef {ReturnType} SyncExplorer - * @typedef {{sync?: boolean; cache?: boolean }} Options - */ - -/** - * @template {Options} Opts - * @param {Opts} opts - * @return {Opts["sync"] extends true ? SyncExplorer : Explorer} - */ -const getExplorerMemoized = mem( - (opts) => { - const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")]; - const explorer = cosmiconfig("prettier", { - cache: opts.cache, - transform: (result) => { - if (result && result.config) { - if (typeof result.config === "string") { - const dir = path.dirname(result.filepath); - const modulePath = resolve(result.config, { paths: [dir] }); - result.config = require(modulePath); - } - - if (typeof result.config !== "object") { - throw new TypeError( - "Config is only allowed to be an object, " + - `but received ${typeof result.config} in "${result.filepath}"` - ); - } - - delete result.config.$schema; - } - return result; - }, - searchPlaces: [ - "package.json", - ".prettierrc", - ".prettierrc.json", - ".prettierrc.yaml", - ".prettierrc.yml", - ".prettierrc.json5", - ".prettierrc.js", - ".prettierrc.cjs", - "prettier.config.js", - "prettier.config.cjs", - ".prettierrc.toml", - ], - loaders: { - ".toml": loadToml, - ".json5": loadJson5, - }, - }); - - return explorer; - }, - { cacheKey: JSON.stringify } -); - -/** - * @template {Options} Opts - * @param {Opts} opts - * @return {Opts["sync"] extends true ? SyncExplorer : Explorer} - */ -function getExplorer(opts) { - // Normalize opts before passing to a memoized function - opts = { sync: false, cache: false, ...opts }; - return getExplorerMemoized(opts); +import path from "node:path"; +import micromatch from "micromatch"; +import { toPath } from "url-or-path"; +import partition from "../utils/partition.js"; +import { + clearEditorconfigCache, + loadEditorconfig as loadEditorconfigForFile, +} from "./editorconfig/index.js"; +import { + clearPrettierConfigCache, + loadPrettierConfig as loadPrettierConfigFile, + searchPrettierConfig, +} from "./prettier-config/index.js"; + +function clearCache() { + clearPrettierConfigCache(); + clearEditorconfigCache(); } -function _resolveConfig(filePath, opts, sync) { - opts = { useCache: true, ...opts }; - const loadOpts = { - cache: Boolean(opts.useCache), - sync: Boolean(sync), - editorconfig: Boolean(opts.editorconfig), - }; - const { load, search } = getExplorer(loadOpts); - const loadEditorConfig = resolveEditorConfig.getLoadFunction(loadOpts); - /** @type {[any, any]} */ - const arr = [ - opts.config ? load(opts.config) : search(filePath), - loadEditorConfig(filePath), - ]; - - const unwrapAndMerge = ([result, editorConfigured]) => { - const merged = { - ...editorConfigured, - ...mergeOverrides(result, filePath), - }; - - for (const optionName of ["plugins", "pluginSearchDirs"]) { - if (Array.isArray(merged[optionName])) { - merged[optionName] = merged[optionName].map((value) => - typeof value === "string" && value.startsWith(".") // relative path - ? path.resolve(path.dirname(result.filepath), value) - : value - ); - } - } +function loadEditorconfig(file, options) { + if (!file || !options.editorconfig) { + return; + } - if (!result && !editorConfigured) { - return null; - } + const shouldCache = options.useCache; + return loadEditorconfigForFile(file, { shouldCache }); +} - // We are not using this option - delete merged.insertFinalNewline; - return merged; - }; +async function loadPrettierConfig(file, options) { + const shouldCache = options.useCache; + let configFile = options.config; + + if (!configFile) { + const directory = file ? path.dirname(path.resolve(file)) : undefined; + configFile = await searchPrettierConfig(directory, { shouldCache }); + } - if (loadOpts.sync) { - return unwrapAndMerge(arr); + if (!configFile) { + return; } - return Promise.all(arr).then(unwrapAndMerge); + configFile = toPath(configFile); + const config = await loadPrettierConfigFile(configFile, { shouldCache }); + + return { config, configFile }; } -const resolveConfig = (filePath, opts) => _resolveConfig(filePath, opts, false); +async function resolveConfig(fileUrlOrPath, options) { + options = { useCache: true, ...options }; + const filePath = toPath(fileUrlOrPath); -resolveConfig.sync = (filePath, opts) => _resolveConfig(filePath, opts, true); + const [result, editorConfigured] = await Promise.all([ + loadPrettierConfig(filePath, options), + loadEditorconfig(filePath, options), + ]); -function clearCache() { - memClear(getExplorerMemoized); - resolveEditorConfig.clearCache(); -} + if (!result && !editorConfigured) { + return null; + } -async function resolveConfigFile(filePath) { - const { search } = getExplorer({ sync: false }); - const result = await search(filePath); - return result ? result.filepath : null; + const merged = { + ...editorConfigured, + ...mergeOverrides(result, filePath), + }; + + if (Array.isArray(merged.plugins)) { + merged.plugins = merged.plugins.map((value) => + typeof value === "string" && value.startsWith(".") // relative path + ? path.resolve(path.dirname(result.configFile), value) + : value, + ); + } + + return merged; } -resolveConfigFile.sync = (filePath) => { - const { search } = getExplorer({ sync: true }); - const result = search(filePath); - return result ? result.filepath : null; -}; +async function resolveConfigFile(fileUrlOrPath) { + const directory = fileUrlOrPath + ? path.dirname(path.resolve(toPath(fileUrlOrPath))) + : undefined; + const result = await searchPrettierConfig(directory, { shouldCache: false }); + return result ?? null; +} function mergeOverrides(configResult, filePath) { - const { config, filepath: configPath } = configResult || {}; + const { config, configFile } = configResult || {}; const { overrides, ...options } = config || {}; if (filePath && overrides) { - const relativeFilePath = path.relative(path.dirname(configPath), filePath); + const relativeFilePath = path.relative(path.dirname(configFile), filePath); for (const override of overrides) { if ( pathMatchesGlobs( relativeFilePath, override.files, - override.excludeFiles + override.excludeFiles, ) ) { Object.assign(options, override.options); @@ -176,7 +109,7 @@ function pathMatchesGlobs(filePath, patterns, excludedPatterns) { // micromatch always matches against basename when the option is enabled // use only patterns without slashes with it to match minimatch behavior const [withSlashes, withoutSlashes] = partition(patternList, (pattern) => - pattern.includes("/") + pattern.includes("/"), ); return ( @@ -193,8 +126,4 @@ function pathMatchesGlobs(filePath, patterns, excludedPatterns) { ); } -module.exports = { - resolveConfig, - resolveConfigFile, - clearCache, -}; +export { clearCache, resolveConfig, resolveConfigFile }; diff --git a/src/document/builders.js b/src/document/builders.js new file mode 100644 index 000000000000..460478e87de8 --- /dev/null +++ b/src/document/builders.js @@ -0,0 +1,264 @@ +import { + DOC_TYPE_ALIGN, + DOC_TYPE_BREAK_PARENT, + DOC_TYPE_CURSOR, + DOC_TYPE_FILL, + DOC_TYPE_GROUP, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LABEL, + DOC_TYPE_LINE, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_TRIM, +} from "./constants.js"; +import { + assertDoc, + assertDocArray, + assertDocFillParts, +} from "./utils/assert-doc.js"; + +/** + * TBD properly tagged union for Doc object type is needed here. + * + * @typedef {object} DocObject + * @property {string} type + * @property {boolean} [hard] + * @property {boolean} [literal] + * + * @typedef {Doc[]} DocArray + * + * @typedef {string | DocObject | DocArray} Doc + */ + +/** + * @param {Doc} contents + * @returns Doc + */ +function indent(contents) { + assertDoc(contents); + + return { type: DOC_TYPE_INDENT, contents }; +} + +/** + * @param {number | string} widthOrString + * @param {Doc} contents + * @returns Doc + */ +function align(widthOrString, contents) { + assertDoc(contents); + + return { type: DOC_TYPE_ALIGN, contents, n: widthOrString }; +} + +/** + * @param {Doc} contents + * @param {object} [opts] - TBD ??? + * @returns Doc + */ +function group(contents, opts = {}) { + assertDoc(contents); + assertDocArray(opts.expandedStates, /* optional */ true); + + return { + type: DOC_TYPE_GROUP, + id: opts.id, + contents, + break: Boolean(opts.shouldBreak), + expandedStates: opts.expandedStates, + }; +} + +/** + * @param {Doc} contents + * @returns Doc + */ +function dedentToRoot(contents) { + return align(Number.NEGATIVE_INFINITY, contents); +} + +/** + * @param {Doc} contents + * @returns Doc + */ +function markAsRoot(contents) { + // @ts-expect-error - TBD ???: + return align({ type: "root" }, contents); +} + +/** + * @param {Doc} contents + * @returns Doc + */ +function dedent(contents) { + return align(-1, contents); +} + +/** + * @param {Doc[]} states + * @param {object} [opts] - TBD ??? + * @returns Doc + */ +function conditionalGroup(states, opts) { + return group(states[0], { ...opts, expandedStates: states }); +} + +/** + * @param {Doc[]} parts + * @returns Doc + */ +function fill(parts) { + assertDocFillParts(parts); + + return { type: DOC_TYPE_FILL, parts }; +} + +/** + * @param {Doc} breakContents + * @param {Doc} [flatContents] + * @param {object} [opts] - TBD ??? + * @returns Doc + */ +function ifBreak(breakContents, flatContents = "", opts = {}) { + assertDoc(breakContents); + if (flatContents !== "") { + assertDoc(flatContents); + } + + return { + type: DOC_TYPE_IF_BREAK, + breakContents, + flatContents, + groupId: opts.groupId, + }; +} + +/** + * Optimized version of `ifBreak(indent(doc), doc, { groupId: ... })` + * @param {Doc} contents + * @param {{ groupId: symbol, negate?: boolean }} opts + * @returns Doc + */ +function indentIfBreak(contents, opts) { + assertDoc(contents); + + return { + type: DOC_TYPE_INDENT_IF_BREAK, + contents, + groupId: opts.groupId, + negate: opts.negate, + }; +} + +/** + * @param {Doc} contents + * @returns Doc + */ +function lineSuffix(contents) { + assertDoc(contents); + + return { type: DOC_TYPE_LINE_SUFFIX, contents }; +} + +const lineSuffixBoundary = { type: DOC_TYPE_LINE_SUFFIX_BOUNDARY }; +const breakParent = { type: DOC_TYPE_BREAK_PARENT }; +const trim = { type: DOC_TYPE_TRIM }; + +const hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true }; +const literallineWithoutBreakParent = { + type: DOC_TYPE_LINE, + hard: true, + literal: true, +}; + +const line = { type: DOC_TYPE_LINE }; +const softline = { type: DOC_TYPE_LINE, soft: true }; +const hardline = [hardlineWithoutBreakParent, breakParent]; +const literalline = [literallineWithoutBreakParent, breakParent]; + +const cursor = { type: DOC_TYPE_CURSOR }; + +/** + * @param {Doc} separator + * @param {Doc[]} docs + * @returns Doc + */ +function join(separator, docs) { + assertDoc(separator); + assertDocArray(docs); + + const parts = []; + + for (let i = 0; i < docs.length; i++) { + if (i !== 0) { + parts.push(separator); + } + + parts.push(docs[i]); + } + + return parts; +} + +/** + * @param {Doc} doc + * @param {number} size + * @param {number} tabWidth + */ +function addAlignmentToDoc(doc, size, tabWidth) { + assertDoc(doc); + + let aligned = doc; + if (size > 0) { + // Use indent to add tabs for all the levels of tabs we need + for (let i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent(aligned); + } + // Use align for all the spaces that are needed + aligned = align(size % tabWidth, aligned); + // size is absolute from 0 and not relative to the current + // indentation, so we use -Infinity to reset the indentation to 0 + aligned = align(Number.NEGATIVE_INFINITY, aligned); + } + return aligned; +} + +/** + * Mark a doc with an arbitrary truthy value. This doesn't affect how the doc is printed, but can be useful for heuristics based on doc introspection. + * @param {any} label If falsy, the `contents` doc is returned as is. + * @param {Doc} contents + */ +function label(label, contents) { + assertDoc(contents); + + return label ? { type: DOC_TYPE_LABEL, label, contents } : contents; +} + +export { + addAlignmentToDoc, + align, + breakParent, + conditionalGroup, + cursor, + dedent, + dedentToRoot, + fill, + group, + hardline, + hardlineWithoutBreakParent, + ifBreak, + indent, + indentIfBreak, + join, + label, + line, + lineSuffix, + lineSuffixBoundary, + literalline, + literallineWithoutBreakParent, + markAsRoot, + softline, + trim, +}; diff --git a/src/document/constants.js b/src/document/constants.js new file mode 100644 index 000000000000..3e8af63fe89e --- /dev/null +++ b/src/document/constants.js @@ -0,0 +1,31 @@ +export const DOC_TYPE_STRING = "string"; +export const DOC_TYPE_ARRAY = "array"; +export const DOC_TYPE_CURSOR = "cursor"; +export const DOC_TYPE_INDENT = "indent"; +export const DOC_TYPE_ALIGN = "align"; +export const DOC_TYPE_TRIM = "trim"; +export const DOC_TYPE_GROUP = "group"; +export const DOC_TYPE_FILL = "fill"; +export const DOC_TYPE_IF_BREAK = "if-break"; +export const DOC_TYPE_INDENT_IF_BREAK = "indent-if-break"; +export const DOC_TYPE_LINE_SUFFIX = "line-suffix"; +export const DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary"; +export const DOC_TYPE_LINE = "line"; +export const DOC_TYPE_LABEL = "label"; +export const DOC_TYPE_BREAK_PARENT = "break-parent"; + +export const VALID_OBJECT_DOC_TYPES = new Set([ + DOC_TYPE_CURSOR, + DOC_TYPE_INDENT, + DOC_TYPE_ALIGN, + DOC_TYPE_TRIM, + DOC_TYPE_GROUP, + DOC_TYPE_FILL, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_LINE, + DOC_TYPE_LABEL, + DOC_TYPE_BREAK_PARENT, +]); diff --git a/src/document/debug.js b/src/document/debug.js new file mode 100644 index 000000000000..f8a4b28c0bc8 --- /dev/null +++ b/src/document/debug.js @@ -0,0 +1,224 @@ +import { + DOC_TYPE_ALIGN, + DOC_TYPE_BREAK_PARENT, + DOC_TYPE_CURSOR, + DOC_TYPE_FILL, + DOC_TYPE_GROUP, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LABEL, + DOC_TYPE_LINE, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_TRIM, +} from "./constants.js"; + +function flattenDoc(doc) { + if (!doc) { + return ""; + } + + if (Array.isArray(doc)) { + const res = []; + for (const part of doc) { + if (Array.isArray(part)) { + res.push(...flattenDoc(part)); + } else { + const flattened = flattenDoc(part); + if (flattened !== "") { + res.push(flattened); + } + } + } + + return res; + } + + if (doc.type === DOC_TYPE_IF_BREAK) { + return { + ...doc, + breakContents: flattenDoc(doc.breakContents), + flatContents: flattenDoc(doc.flatContents), + }; + } + + if (doc.type === DOC_TYPE_GROUP) { + return { + ...doc, + contents: flattenDoc(doc.contents), + expandedStates: doc.expandedStates?.map(flattenDoc), + }; + } + + if (doc.type === DOC_TYPE_FILL) { + return { type: "fill", parts: doc.parts.map(flattenDoc) }; + } + + if (doc.contents) { + return { ...doc, contents: flattenDoc(doc.contents) }; + } + + return doc; +} + +function printDocToDebug(doc) { + /** @type Record */ + const printedSymbols = Object.create(null); + /** @type Set */ + const usedKeysForSymbols = new Set(); + return printDoc(flattenDoc(doc)); + + function printDoc(doc, index, parentParts) { + if (typeof doc === "string") { + return JSON.stringify(doc); + } + + if (Array.isArray(doc)) { + const printed = doc.map(printDoc).filter(Boolean); + return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`; + } + + if (doc.type === DOC_TYPE_LINE) { + const withBreakParent = + parentParts?.[index + 1]?.type === DOC_TYPE_BREAK_PARENT; + if (doc.literal) { + return withBreakParent + ? "literalline" + : "literallineWithoutBreakParent"; + } + if (doc.hard) { + return withBreakParent ? "hardline" : "hardlineWithoutBreakParent"; + } + if (doc.soft) { + return "softline"; + } + return "line"; + } + + if (doc.type === DOC_TYPE_BREAK_PARENT) { + const afterHardline = + parentParts?.[index - 1]?.type === DOC_TYPE_LINE && + parentParts[index - 1].hard; + return afterHardline ? undefined : "breakParent"; + } + + if (doc.type === DOC_TYPE_TRIM) { + return "trim"; + } + + if (doc.type === DOC_TYPE_INDENT) { + return "indent(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === DOC_TYPE_ALIGN) { + return doc.n === Number.NEGATIVE_INFINITY + ? "dedentToRoot(" + printDoc(doc.contents) + ")" + : doc.n < 0 + ? "dedent(" + printDoc(doc.contents) + ")" + : doc.n.type === "root" + ? "markAsRoot(" + printDoc(doc.contents) + ")" + : "align(" + + JSON.stringify(doc.n) + + ", " + + printDoc(doc.contents) + + ")"; + } + + if (doc.type === DOC_TYPE_IF_BREAK) { + return ( + "ifBreak(" + + printDoc(doc.breakContents) + + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + + (doc.groupId + ? (!doc.flatContents ? ', ""' : "") + + `, { groupId: ${printGroupId(doc.groupId)} }` + : "") + + ")" + ); + } + + if (doc.type === DOC_TYPE_INDENT_IF_BREAK) { + const optionsParts = []; + + if (doc.negate) { + optionsParts.push("negate: true"); + } + + if (doc.groupId) { + optionsParts.push(`groupId: ${printGroupId(doc.groupId)}`); + } + + const options = + optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + + return `indentIfBreak(${printDoc(doc.contents)}${options})`; + } + + if (doc.type === DOC_TYPE_GROUP) { + const optionsParts = []; + + if (doc.break && doc.break !== "propagated") { + optionsParts.push("shouldBreak: true"); + } + + if (doc.id) { + optionsParts.push(`id: ${printGroupId(doc.id)}`); + } + + const options = + optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + + if (doc.expandedStates) { + return `conditionalGroup([${doc.expandedStates + .map((part) => printDoc(part)) + .join(",")}]${options})`; + } + + return `group(${printDoc(doc.contents)}${options})`; + } + + if (doc.type === DOC_TYPE_FILL) { + return `fill([${doc.parts.map((part) => printDoc(part)).join(", ")}])`; + } + + if (doc.type === DOC_TYPE_LINE_SUFFIX) { + return "lineSuffix(" + printDoc(doc.contents) + ")"; + } + + if (doc.type === DOC_TYPE_LINE_SUFFIX_BOUNDARY) { + return "lineSuffixBoundary"; + } + + if (doc.type === DOC_TYPE_LABEL) { + return `label(${JSON.stringify(doc.label)}, ${printDoc(doc.contents)})`; + } + + if (doc.type === DOC_TYPE_CURSOR) { + return "cursor"; + } + + throw new Error("Unknown doc type " + doc.type); + } + + function printGroupId(id) { + if (typeof id !== "symbol") { + return JSON.stringify(String(id)); + } + + if (id in printedSymbols) { + return printedSymbols[id]; + } + + const prefix = id.description || "symbol"; + for (let counter = 0; ; counter++) { + const key = prefix + (counter > 0 ? ` #${counter}` : ""); + if (!usedKeysForSymbols.has(key)) { + usedKeysForSymbols.add(key); + return (printedSymbols[id] = `Symbol.for(${JSON.stringify(key)})`); + } + } + } +} + +export { printDocToDebug }; diff --git a/src/document/doc-builders.js b/src/document/doc-builders.js deleted file mode 100644 index c119695be289..000000000000 --- a/src/document/doc-builders.js +++ /dev/null @@ -1,292 +0,0 @@ -"use strict"; - -/** - * TBD properly tagged union for Doc object type is needed here. - * - * @typedef {object} DocObject - * @property {string} type - * @property {boolean} [hard] - * @property {boolean} [literal] - * - * @typedef {Doc[]} DocArray - * - * @typedef {string | DocObject | DocArray} Doc - */ - -/** - * @param {Doc} val - */ -function assertDoc(val) { - if (typeof val === "string") { - return; - } - - if (Array.isArray(val)) { - for (const doc of val) { - assertDoc(doc); - } - return; - } - - if (val && typeof val.type === "string") { - return; - } - - /* istanbul ignore next */ - throw new Error("Value " + JSON.stringify(val) + " is not a valid document"); -} - -/** - * @param {Doc[]} parts - * @returns Doc - */ -function concat(parts) { - if (process.env.NODE_ENV !== "production") { - for (const part of parts) { - assertDoc(part); - } - } - - // We cannot do this until we change `printJSXElement` to not - // access the internals of a document directly. - // if(parts.length === 1) { - // // If it's a single document, no need to concat it. - // return parts[0]; - // } - return { type: "concat", parts }; -} - -/** - * @param {Doc} contents - * @returns Doc - */ -function indent(contents) { - if (process.env.NODE_ENV !== "production") { - assertDoc(contents); - } - - return { type: "indent", contents }; -} - -/** - * @param {number | string} widthOrString - * @param {Doc} contents - * @returns Doc - */ -function align(widthOrString, contents) { - if (process.env.NODE_ENV !== "production") { - assertDoc(contents); - } - - return { type: "align", contents, n: widthOrString }; -} - -/** - * @param {Doc} contents - * @param {object} [opts] - TBD ??? - * @returns Doc - */ -function group(contents, opts = {}) { - if (process.env.NODE_ENV !== "production") { - assertDoc(contents); - } - - return { - type: "group", - id: opts.id, - contents, - break: Boolean(opts.shouldBreak), - expandedStates: opts.expandedStates, - }; -} - -/** - * @param {Doc} contents - * @returns Doc - */ -function dedentToRoot(contents) { - return align(Number.NEGATIVE_INFINITY, contents); -} - -/** - * @param {Doc} contents - * @returns Doc - */ -function markAsRoot(contents) { - // @ts-expect-error - TBD ???: - return align({ type: "root" }, contents); -} - -/** - * @param {Doc} contents - * @returns Doc - */ -function dedent(contents) { - return align(-1, contents); -} - -/** - * @param {Doc[]} states - * @param {object} [opts] - TBD ??? - * @returns Doc - */ -function conditionalGroup(states, opts) { - return group(states[0], { ...opts, expandedStates: states }); -} - -/** - * @param {Doc[]} parts - * @returns Doc - */ -function fill(parts) { - if (process.env.NODE_ENV !== "production") { - for (const part of parts) { - assertDoc(part); - } - } - - return { type: "fill", parts }; -} - -/** - * @param {Doc} [breakContents] - * @param {Doc} [flatContents] - * @param {object} [opts] - TBD ??? - * @returns Doc - */ -function ifBreak(breakContents, flatContents, opts = {}) { - if (process.env.NODE_ENV !== "production") { - if (breakContents) { - assertDoc(breakContents); - } - if (flatContents) { - assertDoc(flatContents); - } - } - - return { - type: "if-break", - breakContents, - flatContents, - groupId: opts.groupId, - }; -} - -/** - * Optimized version of `ifBreak(indent(doc), doc, { groupId: ... })` - * @param {Doc} contents - * @param {{ groupId: symbol, negate?: boolean }} opts - * @returns Doc - */ -function indentIfBreak(contents, opts) { - return { - type: "indent-if-break", - contents, - groupId: opts.groupId, - negate: opts.negate, - }; -} - -/** - * @param {Doc} contents - * @returns Doc - */ -function lineSuffix(contents) { - if (process.env.NODE_ENV !== "production") { - assertDoc(contents); - } - return { type: "line-suffix", contents }; -} - -const lineSuffixBoundary = { type: "line-suffix-boundary" }; -const breakParent = { type: "break-parent" }; -const trim = { type: "trim" }; - -const hardlineWithoutBreakParent = { type: "line", hard: true }; -const literallineWithoutBreakParent = { - type: "line", - hard: true, - literal: true, -}; - -const line = { type: "line" }; -const softline = { type: "line", soft: true }; -// eslint-disable-next-line prettier-internal-rules/no-doc-builder-concat -const hardline = concat([hardlineWithoutBreakParent, breakParent]); -// eslint-disable-next-line prettier-internal-rules/no-doc-builder-concat -const literalline = concat([literallineWithoutBreakParent, breakParent]); - -const cursor = { type: "cursor", placeholder: Symbol("cursor") }; - -/** - * @param {Doc} sep - * @param {Doc[]} arr - * @returns Doc - */ -function join(sep, arr) { - const res = []; - - for (let i = 0; i < arr.length; i++) { - if (i !== 0) { - res.push(sep); - } - - res.push(arr[i]); - } - - // eslint-disable-next-line prettier-internal-rules/no-doc-builder-concat - return concat(res); -} - -/** - * @param {Doc} doc - * @param {number} size - * @param {number} tabWidth - */ -function addAlignmentToDoc(doc, size, tabWidth) { - let aligned = doc; - if (size > 0) { - // Use indent to add tabs for all the levels of tabs we need - for (let i = 0; i < Math.floor(size / tabWidth); ++i) { - aligned = indent(aligned); - } - // Use align for all the spaces that are needed - aligned = align(size % tabWidth, aligned); - // size is absolute from 0 and not relative to the current - // indentation, so we use -Infinity to reset the indentation to 0 - aligned = align(Number.NEGATIVE_INFINITY, aligned); - } - return aligned; -} - -function label(label, contents) { - return { type: "label", label, contents }; -} - -module.exports = { - concat, - join, - line, - softline, - hardline, - literalline, - group, - conditionalGroup, - fill, - lineSuffix, - lineSuffixBoundary, - cursor, - breakParent, - ifBreak, - trim, - indent, - indentIfBreak, - align, - addAlignmentToDoc, - markAsRoot, - dedentToRoot, - dedent, - hardlineWithoutBreakParent, - literallineWithoutBreakParent, - label, -}; diff --git a/src/document/doc-debug.js b/src/document/doc-debug.js deleted file mode 100644 index 02a65e4361e3..000000000000 --- a/src/document/doc-debug.js +++ /dev/null @@ -1,213 +0,0 @@ -"use strict"; - -const { isConcat, getDocParts } = require("./doc-utils.js"); - -function flattenDoc(doc) { - if (!doc) { - return ""; - } - - if (isConcat(doc)) { - const res = []; - for (const part of getDocParts(doc)) { - if (isConcat(part)) { - res.push(...flattenDoc(part).parts); - } else { - const flattened = flattenDoc(part); - if (flattened !== "") { - res.push(flattened); - } - } - } - - return { type: "concat", parts: res }; - } - - if (doc.type === "if-break") { - return { - ...doc, - breakContents: flattenDoc(doc.breakContents), - flatContents: flattenDoc(doc.flatContents), - }; - } - - if (doc.type === "group") { - return { - ...doc, - contents: flattenDoc(doc.contents), - expandedStates: doc.expandedStates && doc.expandedStates.map(flattenDoc), - }; - } - - if (doc.type === "fill") { - return { type: "fill", parts: doc.parts.map(flattenDoc) }; - } - - if (doc.contents) { - return { ...doc, contents: flattenDoc(doc.contents) }; - } - - return doc; -} - -function printDocToDebug(doc) { - /** @type Record */ - const printedSymbols = Object.create(null); - /** @type Set */ - const usedKeysForSymbols = new Set(); - return printDoc(flattenDoc(doc)); - - function printDoc(doc, index, parentParts) { - if (typeof doc === "string") { - return JSON.stringify(doc); - } - - if (isConcat(doc)) { - const printed = getDocParts(doc).map(printDoc).filter(Boolean); - return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`; - } - - if (doc.type === "line") { - const withBreakParent = - Array.isArray(parentParts) && - parentParts[index + 1] && - parentParts[index + 1].type === "break-parent"; - if (doc.literal) { - return withBreakParent - ? "literalline" - : "literallineWithoutBreakParent"; - } - if (doc.hard) { - return withBreakParent ? "hardline" : "hardlineWithoutBreakParent"; - } - if (doc.soft) { - return "softline"; - } - return "line"; - } - - if (doc.type === "break-parent") { - const afterHardline = - Array.isArray(parentParts) && - parentParts[index - 1] && - parentParts[index - 1].type === "line" && - parentParts[index - 1].hard; - return afterHardline ? undefined : "breakParent"; - } - - if (doc.type === "trim") { - return "trim"; - } - - if (doc.type === "indent") { - return "indent(" + printDoc(doc.contents) + ")"; - } - - if (doc.type === "align") { - return doc.n === Number.NEGATIVE_INFINITY - ? "dedentToRoot(" + printDoc(doc.contents) + ")" - : doc.n < 0 - ? "dedent(" + printDoc(doc.contents) + ")" - : doc.n.type === "root" - ? "markAsRoot(" + printDoc(doc.contents) + ")" - : "align(" + - JSON.stringify(doc.n) + - ", " + - printDoc(doc.contents) + - ")"; - } - - if (doc.type === "if-break") { - return ( - "ifBreak(" + - printDoc(doc.breakContents) + - (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + - (doc.groupId - ? (!doc.flatContents ? ', ""' : "") + - `, { groupId: ${printGroupId(doc.groupId)} }` - : "") + - ")" - ); - } - - if (doc.type === "indent-if-break") { - const optionsParts = []; - - if (doc.negate) { - optionsParts.push("negate: true"); - } - - if (doc.groupId) { - optionsParts.push(`groupId: ${printGroupId(doc.groupId)}`); - } - - const options = - optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; - - return `indentIfBreak(${printDoc(doc.contents)}${options})`; - } - - if (doc.type === "group") { - const optionsParts = []; - - if (doc.break && doc.break !== "propagated") { - optionsParts.push("shouldBreak: true"); - } - - if (doc.id) { - optionsParts.push(`id: ${printGroupId(doc.id)}`); - } - - const options = - optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; - - if (doc.expandedStates) { - return `conditionalGroup([${doc.expandedStates - .map((part) => printDoc(part)) - .join(",")}]${options})`; - } - - return `group(${printDoc(doc.contents)}${options})`; - } - - if (doc.type === "fill") { - return `fill([${doc.parts.map((part) => printDoc(part)).join(", ")}])`; - } - - if (doc.type === "line-suffix") { - return "lineSuffix(" + printDoc(doc.contents) + ")"; - } - - if (doc.type === "line-suffix-boundary") { - return "lineSuffixBoundary"; - } - - if (doc.type === "label") { - return `label(${JSON.stringify(doc.label)}, ${printDoc(doc.contents)})`; - } - - throw new Error("Unknown doc type " + doc.type); - } - - function printGroupId(id) { - if (typeof id !== "symbol") { - return JSON.stringify(String(id)); - } - - if (id in printedSymbols) { - return printedSymbols[id]; - } - - // TODO: use Symbol.prototype.description instead of slice once Node 10 is dropped - const prefix = String(id).slice(7, -1) || "symbol"; - for (let counter = 0; ; counter++) { - const key = prefix + (counter > 0 ? ` #${counter}` : ""); - if (!usedKeysForSymbols.has(key)) { - usedKeysForSymbols.add(key); - return (printedSymbols[id] = `Symbol.for(${JSON.stringify(key)})`); - } - } - } -} - -module.exports = { printDocToDebug }; diff --git a/src/document/doc-printer.js b/src/document/doc-printer.js deleted file mode 100644 index b0d07af64e92..000000000000 --- a/src/document/doc-printer.js +++ /dev/null @@ -1,581 +0,0 @@ -"use strict"; - -const { convertEndOfLineToChars } = require("../common/end-of-line.js"); -const getLast = require("../utils/get-last.js"); -const getStringWidth = require("../utils/get-string-width.js"); -const { fill, cursor, indent } = require("./doc-builders.js"); -const { isConcat, getDocParts } = require("./doc-utils.js"); - -/** @typedef {typeof MODE_BREAK | typeof MODE_FLAT} Mode */ -/** @typedef {{ ind: any, doc: any, mode: Mode }} Command */ - -/** @type {Record} */ -let groupModeMap; - -// prettier-ignore -const MODE_BREAK = /** @type {const} */ (1); -// prettier-ignore -const MODE_FLAT = /** @type {const} */ (2); - -function rootIndent() { - return { value: "", length: 0, queue: [] }; -} - -function makeIndent(ind, options) { - return generateInd(ind, { type: "indent" }, options); -} - -function makeAlign(indent, widthOrDoc, options) { - if (widthOrDoc === Number.NEGATIVE_INFINITY) { - return indent.root || rootIndent(); - } - - if (widthOrDoc < 0) { - return generateInd(indent, { type: "dedent" }, options); - } - - if (!widthOrDoc) { - return indent; - } - - if (widthOrDoc.type === "root") { - return { ...indent, root: indent }; - } - - const alignType = - typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign"; - - return generateInd(indent, { type: alignType, n: widthOrDoc }, options); -} - -function generateInd(ind, newPart, options) { - const queue = - newPart.type === "dedent" - ? ind.queue.slice(0, -1) - : [...ind.queue, newPart]; - - let value = ""; - let length = 0; - let lastTabs = 0; - let lastSpaces = 0; - - for (const part of queue) { - switch (part.type) { - case "indent": - flush(); - if (options.useTabs) { - addTabs(1); - } else { - addSpaces(options.tabWidth); - } - break; - case "stringAlign": - flush(); - value += part.n; - length += part.n.length; - break; - case "numberAlign": - lastTabs += 1; - lastSpaces += part.n; - break; - /* istanbul ignore next */ - default: - throw new Error(`Unexpected type '${part.type}'`); - } - } - - flushSpaces(); - - return { ...ind, value, length, queue }; - - function addTabs(count) { - value += "\t".repeat(count); - length += options.tabWidth * count; - } - - function addSpaces(count) { - value += " ".repeat(count); - length += count; - } - - function flush() { - if (options.useTabs) { - flushTabs(); - } else { - flushSpaces(); - } - } - - function flushTabs() { - if (lastTabs > 0) { - addTabs(lastTabs); - } - resetLast(); - } - - function flushSpaces() { - if (lastSpaces > 0) { - addSpaces(lastSpaces); - } - resetLast(); - } - - function resetLast() { - lastTabs = 0; - lastSpaces = 0; - } -} - -function trim(out) { - if (out.length === 0) { - return 0; - } - - let trimCount = 0; - - // Trim whitespace at the end of line - while ( - out.length > 0 && - typeof getLast(out) === "string" && - /^[\t ]*$/.test(getLast(out)) - ) { - trimCount += out.pop().length; - } - - if (out.length > 0 && typeof getLast(out) === "string") { - const trimmed = getLast(out).replace(/[\t ]*$/, ""); - trimCount += getLast(out).length - trimmed.length; - out[out.length - 1] = trimmed; - } - - return trimCount; -} - -/** - * @param {Command} next - * @param {Command[]} restCommands - * @param {number} width - * @param {boolean} hasLineSuffix - * @param {boolean} [mustBeFlat] - * @returns {boolean} - */ -function fits(next, restCommands, width, hasLineSuffix, mustBeFlat) { - let restIdx = restCommands.length; - /** @type {Array>} */ - const cmds = [next]; - // `out` is only used for width counting because `trim` requires to look - // backwards for space characters. - const out = []; - while (width >= 0) { - if (cmds.length === 0) { - if (restIdx === 0) { - return true; - } - cmds.push(restCommands[--restIdx]); - continue; - } - - const { mode, doc } = cmds.pop(); - - if (typeof doc === "string") { - out.push(doc); - width -= getStringWidth(doc); - } else if (isConcat(doc) || doc.type === "fill") { - const parts = getDocParts(doc); - for (let i = parts.length - 1; i >= 0; i--) { - cmds.push({ mode, doc: parts[i] }); - } - } else { - switch (doc.type) { - case "indent": - case "align": - case "indent-if-break": - case "label": - cmds.push({ mode, doc: doc.contents }); - break; - - case "trim": - width += trim(out); - break; - - case "group": { - if (mustBeFlat && doc.break) { - return false; - } - const groupMode = doc.break ? MODE_BREAK : mode; - // The most expanded state takes up the least space on the current line. - const contents = - doc.expandedStates && groupMode === MODE_BREAK - ? getLast(doc.expandedStates) - : doc.contents; - cmds.push({ mode: groupMode, doc: contents }); - break; - } - - case "if-break": { - const groupMode = doc.groupId - ? groupModeMap[doc.groupId] || MODE_FLAT - : mode; - const contents = - groupMode === MODE_BREAK ? doc.breakContents : doc.flatContents; - if (contents) { - cmds.push({ mode, doc: contents }); - } - break; - } - - case "line": - if (mode === MODE_BREAK || doc.hard) { - return true; - } - if (!doc.soft) { - out.push(" "); - width--; - } - break; - - case "line-suffix": - hasLineSuffix = true; - break; - - case "line-suffix-boundary": - if (hasLineSuffix) { - return false; - } - break; - } - } - } - return false; -} - -function printDocToString(doc, options) { - groupModeMap = {}; - - const width = options.printWidth; - const newLine = convertEndOfLineToChars(options.endOfLine); - let pos = 0; - // cmds is basically a stack. We've turned a recursive call into a - // while loop which is much faster. The while loop below adds new - // cmds to the array instead of recursively calling `print`. - /** @type Command[] */ - const cmds = [{ ind: rootIndent(), mode: MODE_BREAK, doc }]; - const out = []; - let shouldRemeasure = false; - /** @type Command[] */ - const lineSuffix = []; - - while (cmds.length > 0) { - const { ind, mode, doc } = cmds.pop(); - - if (typeof doc === "string") { - const formatted = newLine !== "\n" ? doc.replace(/\n/g, newLine) : doc; - out.push(formatted); - pos += getStringWidth(formatted); - } else if (isConcat(doc)) { - const parts = getDocParts(doc); - for (let i = parts.length - 1; i >= 0; i--) { - cmds.push({ ind, mode, doc: parts[i] }); - } - } else { - switch (doc.type) { - case "cursor": - out.push(cursor.placeholder); - - break; - case "indent": - cmds.push({ ind: makeIndent(ind, options), mode, doc: doc.contents }); - - break; - case "align": - cmds.push({ - ind: makeAlign(ind, doc.n, options), - mode, - doc: doc.contents, - }); - - break; - case "trim": - pos -= trim(out); - - break; - case "group": - switch (mode) { - case MODE_FLAT: - if (!shouldRemeasure) { - cmds.push({ - ind, - mode: doc.break ? MODE_BREAK : MODE_FLAT, - doc: doc.contents, - }); - - break; - } - // fallthrough - - case MODE_BREAK: { - shouldRemeasure = false; - - const next = { ind, mode: MODE_FLAT, doc: doc.contents }; - const rem = width - pos; - const hasLineSuffix = lineSuffix.length > 0; - - if (!doc.break && fits(next, cmds, rem, hasLineSuffix)) { - cmds.push(next); - } else { - // Expanded states are a rare case where a document - // can manually provide multiple representations of - // itself. It provides an array of documents - // going from the least expanded (most flattened) - // representation first to the most expanded. If a - // group has these, we need to manually go through - // these states and find the first one that fits. - if (doc.expandedStates) { - const mostExpanded = getLast(doc.expandedStates); - - if (doc.break) { - cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded }); - - break; - } else { - for (let i = 1; i < doc.expandedStates.length + 1; i++) { - if (i >= doc.expandedStates.length) { - cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded }); - - break; - } else { - const state = doc.expandedStates[i]; - const cmd = { ind, mode: MODE_FLAT, doc: state }; - - if (fits(cmd, cmds, rem, hasLineSuffix)) { - cmds.push(cmd); - - break; - } - } - } - } - } else { - cmds.push({ ind, mode: MODE_BREAK, doc: doc.contents }); - } - } - - break; - } - } - - if (doc.id) { - groupModeMap[doc.id] = getLast(cmds).mode; - } - break; - // Fills each line with as much code as possible before moving to a new - // line with the same indentation. - // - // Expects doc.parts to be an array of alternating content and - // whitespace. The whitespace contains the linebreaks. - // - // For example: - // ["I", line, "love", line, "monkeys"] - // or - // [{ type: group, ... }, softline, { type: group, ... }] - // - // It uses this parts structure to handle three main layout cases: - // * The first two content items fit on the same line without - // breaking - // -> output the first content item and the whitespace "flat". - // * Only the first content item fits on the line without breaking - // -> output the first content item "flat" and the whitespace with - // "break". - // * Neither content item fits on the line without breaking - // -> output the first content item and the whitespace with "break". - case "fill": { - const rem = width - pos; - - const { parts } = doc; - if (parts.length === 0) { - break; - } - - const [content, whitespace] = parts; - const contentFlatCmd = { ind, mode: MODE_FLAT, doc: content }; - const contentBreakCmd = { ind, mode: MODE_BREAK, doc: content }; - const contentFits = fits( - contentFlatCmd, - [], - rem, - lineSuffix.length > 0, - true - ); - - if (parts.length === 1) { - if (contentFits) { - cmds.push(contentFlatCmd); - } else { - cmds.push(contentBreakCmd); - } - break; - } - - const whitespaceFlatCmd = { ind, mode: MODE_FLAT, doc: whitespace }; - const whitespaceBreakCmd = { ind, mode: MODE_BREAK, doc: whitespace }; - - if (parts.length === 2) { - if (contentFits) { - cmds.push(whitespaceFlatCmd, contentFlatCmd); - } else { - cmds.push(whitespaceBreakCmd, contentBreakCmd); - } - break; - } - - // At this point we've handled the first pair (context, separator) - // and will create a new fill doc for the rest of the content. - // Ideally we wouldn't mutate the array here but copying all the - // elements to a new array would make this algorithm quadratic, - // which is unusable for large arrays (e.g. large texts in JSX). - parts.splice(0, 2); - const remainingCmd = { ind, mode, doc: fill(parts) }; - - const secondContent = parts[0]; - - const firstAndSecondContentFlatCmd = { - ind, - mode: MODE_FLAT, - doc: [content, whitespace, secondContent], - }; - const firstAndSecondContentFits = fits( - firstAndSecondContentFlatCmd, - [], - rem, - lineSuffix.length > 0, - true - ); - - if (firstAndSecondContentFits) { - cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd); - } else if (contentFits) { - cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd); - } else { - cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd); - } - break; - } - case "if-break": - case "indent-if-break": { - const groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; - if (groupMode === MODE_BREAK) { - const breakContents = - doc.type === "if-break" - ? doc.breakContents - : doc.negate - ? doc.contents - : indent(doc.contents); - if (breakContents) { - cmds.push({ ind, mode, doc: breakContents }); - } - } - if (groupMode === MODE_FLAT) { - const flatContents = - doc.type === "if-break" - ? doc.flatContents - : doc.negate - ? indent(doc.contents) - : doc.contents; - if (flatContents) { - cmds.push({ ind, mode, doc: flatContents }); - } - } - - break; - } - case "line-suffix": - lineSuffix.push({ ind, mode, doc: doc.contents }); - break; - case "line-suffix-boundary": - if (lineSuffix.length > 0) { - cmds.push({ ind, mode, doc: { type: "line", hard: true } }); - } - break; - case "line": - switch (mode) { - case MODE_FLAT: - if (!doc.hard) { - if (!doc.soft) { - out.push(" "); - - pos += 1; - } - - break; - } else { - // This line was forced into the output even if we - // were in flattened mode, so we need to tell the next - // group that no matter what, it needs to remeasure - // because the previous measurement didn't accurately - // capture the entire expression (this is necessary - // for nested groups) - shouldRemeasure = true; - } - // fallthrough - - case MODE_BREAK: - if (lineSuffix.length > 0) { - cmds.push({ ind, mode, doc }, ...lineSuffix.reverse()); - lineSuffix.length = 0; - break; - } - - if (doc.literal) { - if (ind.root) { - out.push(newLine, ind.root.value); - pos = ind.root.length; - } else { - out.push(newLine); - pos = 0; - } - } else { - pos -= trim(out); - out.push(newLine + ind.value); - pos = ind.length; - } - break; - } - break; - case "label": - cmds.push({ ind, mode, doc: doc.contents }); - break; - default: - } - } - - // Flush remaining line-suffix contents at the end of the document, in case - // there is no new line after the line-suffix. - if (cmds.length === 0 && lineSuffix.length > 0) { - cmds.push(...lineSuffix.reverse()); - lineSuffix.length = 0; - } - } - - const cursorPlaceholderIndex = out.indexOf(cursor.placeholder); - if (cursorPlaceholderIndex !== -1) { - const otherCursorPlaceholderIndex = out.indexOf( - cursor.placeholder, - cursorPlaceholderIndex + 1 - ); - const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); - const aroundCursor = out - .slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex) - .join(""); - const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); - - return { - formatted: beforeCursor + aroundCursor + afterCursor, - cursorNodeStart: beforeCursor.length, - cursorNodeText: aroundCursor, - }; - } - - return { formatted: out.join("") }; -} - -module.exports = { printDocToString }; diff --git a/src/document/doc-utils.js b/src/document/doc-utils.js deleted file mode 100644 index 7392976b1733..000000000000 --- a/src/document/doc-utils.js +++ /dev/null @@ -1,431 +0,0 @@ -"use strict"; - -const getLast = require("../utils/get-last.js"); -const { literalline, join } = require("./doc-builders.js"); - -const isConcat = (doc) => Array.isArray(doc) || (doc && doc.type === "concat"); -const getDocParts = (doc) => { - if (Array.isArray(doc)) { - return doc; - } - - /* istanbul ignore next */ - if (doc.type !== "concat" && doc.type !== "fill") { - throw new Error("Expect doc type to be `concat` or `fill`."); - } - - return doc.parts; -}; - -// Using a unique object to compare by reference. -const traverseDocOnExitStackMarker = {}; - -function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { - const docsStack = [doc]; - - while (docsStack.length > 0) { - const doc = docsStack.pop(); - - if (doc === traverseDocOnExitStackMarker) { - onExit(docsStack.pop()); - continue; - } - - if (onExit) { - docsStack.push(doc, traverseDocOnExitStackMarker); - } - - if ( - // Should Recurse - !onEnter || - onEnter(doc) !== false - ) { - // When there are multiple parts to process, - // the parts need to be pushed onto the stack in reverse order, - // so that they are processed in the original order - // when the stack is popped. - if (isConcat(doc) || doc.type === "fill") { - const parts = getDocParts(doc); - for (let ic = parts.length, i = ic - 1; i >= 0; --i) { - docsStack.push(parts[i]); - } - } else if (doc.type === "if-break") { - if (doc.flatContents) { - docsStack.push(doc.flatContents); - } - if (doc.breakContents) { - docsStack.push(doc.breakContents); - } - } else if (doc.type === "group" && doc.expandedStates) { - if (shouldTraverseConditionalGroups) { - for (let ic = doc.expandedStates.length, i = ic - 1; i >= 0; --i) { - docsStack.push(doc.expandedStates[i]); - } - } else { - docsStack.push(doc.contents); - } - } else if (doc.contents) { - docsStack.push(doc.contents); - } - } - } -} - -function mapDoc(doc, cb) { - // Within a doc tree, the same subtrees can be found multiple times. - // E.g., often this happens in conditional groups. - // As an optimization (those subtrees can be huge) and to maintain the - // reference structure of the tree, the mapping results are cached in - // a map and reused. - const mapped = new Map(); - - return rec(doc); - - function rec(doc) { - if (mapped.has(doc)) { - return mapped.get(doc); - } - const result = process(doc); - mapped.set(doc, result); - return result; - } - - function process(doc) { - if (Array.isArray(doc)) { - return cb(doc.map(rec)); - } - - if (doc.type === "concat" || doc.type === "fill") { - const parts = doc.parts.map(rec); - return cb({ ...doc, parts }); - } - - if (doc.type === "if-break") { - const breakContents = doc.breakContents && rec(doc.breakContents); - const flatContents = doc.flatContents && rec(doc.flatContents); - return cb({ ...doc, breakContents, flatContents }); - } - - if (doc.type === "group" && doc.expandedStates) { - const expandedStates = doc.expandedStates.map(rec); - const contents = expandedStates[0]; - return cb({ ...doc, contents, expandedStates }); - } - - if (doc.contents) { - const contents = rec(doc.contents); - return cb({ ...doc, contents }); - } - - return cb(doc); - } -} - -function findInDoc(doc, fn, defaultValue) { - let result = defaultValue; - let hasStopped = false; - function findInDocOnEnterFn(doc) { - const maybeResult = fn(doc); - if (maybeResult !== undefined) { - hasStopped = true; - result = maybeResult; - } - if (hasStopped) { - return false; - } - } - traverseDoc(doc, findInDocOnEnterFn); - return result; -} - -function willBreakFn(doc) { - if (doc.type === "group" && doc.break) { - return true; - } - if (doc.type === "line" && doc.hard) { - return true; - } - if (doc.type === "break-parent") { - return true; - } -} - -function willBreak(doc) { - return findInDoc(doc, willBreakFn, false); -} - -function breakParentGroup(groupStack) { - if (groupStack.length > 0) { - const parentGroup = getLast(groupStack); - // Breaks are not propagated through conditional groups because - // the user is expected to manually handle what breaks. - if (!parentGroup.expandedStates && !parentGroup.break) { - // An alternative truthy value allows to distinguish propagated group breaks - // and not to print them as `group(..., { break: true })` in `--debug-print-doc`. - parentGroup.break = "propagated"; - } - } - return null; -} - -function propagateBreaks(doc) { - const alreadyVisitedSet = new Set(); - const groupStack = []; - function propagateBreaksOnEnterFn(doc) { - if (doc.type === "break-parent") { - breakParentGroup(groupStack); - } - if (doc.type === "group") { - groupStack.push(doc); - if (alreadyVisitedSet.has(doc)) { - return false; - } - alreadyVisitedSet.add(doc); - } - } - function propagateBreaksOnExitFn(doc) { - if (doc.type === "group") { - const group = groupStack.pop(); - if (group.break) { - breakParentGroup(groupStack); - } - } - } - traverseDoc( - doc, - propagateBreaksOnEnterFn, - propagateBreaksOnExitFn, - /* shouldTraverseConditionalGroups */ true - ); -} - -function removeLinesFn(doc) { - // Force this doc into flat mode by statically converting all - // lines into spaces (or soft lines into nothing). Hard lines - // should still output because there's too great of a chance - // of breaking existing assumptions otherwise. - if (doc.type === "line" && !doc.hard) { - return doc.soft ? "" : " "; - } - - if (doc.type === "if-break") { - return doc.flatContents || ""; - } - - return doc; -} - -function removeLines(doc) { - return mapDoc(doc, removeLinesFn); -} - -const isHardline = (doc, nextDoc) => - doc && - doc.type === "line" && - doc.hard && - nextDoc && - nextDoc.type === "break-parent"; -function stripDocTrailingHardlineFromDoc(doc) { - if (!doc) { - return doc; - } - - if (isConcat(doc) || doc.type === "fill") { - const parts = getDocParts(doc); - - while (parts.length > 1 && isHardline(...parts.slice(-2))) { - parts.length -= 2; - } - - if (parts.length > 0) { - const lastPart = stripDocTrailingHardlineFromDoc(getLast(parts)); - parts[parts.length - 1] = lastPart; - } - return Array.isArray(doc) ? parts : { ...doc, parts }; - } - - switch (doc.type) { - case "align": - case "indent": - case "indent-if-break": - case "group": - case "line-suffix": - case "label": { - const contents = stripDocTrailingHardlineFromDoc(doc.contents); - return { ...doc, contents }; - } - case "if-break": { - const breakContents = stripDocTrailingHardlineFromDoc(doc.breakContents); - const flatContents = stripDocTrailingHardlineFromDoc(doc.flatContents); - return { ...doc, breakContents, flatContents }; - } - } - - return doc; -} - -function stripTrailingHardline(doc) { - // HACK remove ending hardline, original PR: #1984 - return stripDocTrailingHardlineFromDoc(cleanDoc(doc)); -} - -function cleanDocFn(doc) { - switch (doc.type) { - case "fill": - if (doc.parts.every((part) => part === "")) { - return ""; - } - break; - case "group": - if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) { - return ""; - } - // Remove nested only group - if ( - doc.contents.type === "group" && - doc.contents.id === doc.id && - doc.contents.break === doc.break && - doc.contents.expandedStates === doc.expandedStates - ) { - return doc.contents; - } - break; - case "align": - case "indent": - case "indent-if-break": - case "line-suffix": - if (!doc.contents) { - return ""; - } - break; - case "if-break": - if (!doc.flatContents && !doc.breakContents) { - return ""; - } - break; - } - - if (!isConcat(doc)) { - return doc; - } - - const parts = []; - for (const part of getDocParts(doc)) { - if (!part) { - continue; - } - const [currentPart, ...restParts] = isConcat(part) - ? getDocParts(part) - : [part]; - if (typeof currentPart === "string" && typeof getLast(parts) === "string") { - parts[parts.length - 1] += currentPart; - } else { - parts.push(currentPart); - } - parts.push(...restParts); - } - - if (parts.length === 0) { - return ""; - } - - if (parts.length === 1) { - return parts[0]; - } - return Array.isArray(doc) ? parts : { ...doc, parts }; -} -// A safer version of `normalizeDoc` -// - `normalizeDoc` concat strings and flat "concat" in `fill`, while `cleanDoc` don't -// - On `concat` object, `normalizeDoc` always return object with `parts`, `cleanDoc` may return strings -// - `cleanDoc` also remove nested `group`s and empty `fill`/`align`/`indent`/`line-suffix`/`if-break` if possible -function cleanDoc(doc) { - return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc)); -} - -function normalizeParts(parts) { - const newParts = []; - - const restParts = parts.filter(Boolean); - while (restParts.length > 0) { - const part = restParts.shift(); - - if (!part) { - continue; - } - - if (isConcat(part)) { - restParts.unshift(...getDocParts(part)); - continue; - } - - if ( - newParts.length > 0 && - typeof getLast(newParts) === "string" && - typeof part === "string" - ) { - newParts[newParts.length - 1] += part; - continue; - } - - newParts.push(part); - } - - return newParts; -} - -function normalizeDoc(doc) { - return mapDoc(doc, (currentDoc) => { - if (Array.isArray(currentDoc)) { - return normalizeParts(currentDoc); - } - if (!currentDoc.parts) { - return currentDoc; - } - return { - ...currentDoc, - parts: normalizeParts(currentDoc.parts), - }; - }); -} - -function replaceEndOfLine(doc) { - return mapDoc(doc, (currentDoc) => - typeof currentDoc === "string" && currentDoc.includes("\n") - ? replaceTextEndOfLine(currentDoc) - : currentDoc - ); -} - -// This function need return array -// TODO: remove `.parts` when we remove `docBuilders.concat()` -function replaceTextEndOfLine(text, replacement = literalline) { - return join(replacement, text.split("\n")).parts; -} - -function canBreakFn(doc) { - if (doc.type === "line") { - return true; - } -} - -function canBreak(doc) { - return findInDoc(doc, canBreakFn, false); -} - -module.exports = { - isConcat, - getDocParts, - willBreak, - traverseDoc, - findInDoc, - mapDoc, - propagateBreaks, - removeLines, - stripTrailingHardline, - normalizeParts, - normalizeDoc, - cleanDoc, - replaceTextEndOfLine, - replaceEndOfLine, - canBreak, -}; diff --git a/src/document/index.js b/src/document/index.js deleted file mode 100644 index 03eebf216632..000000000000 --- a/src/document/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -/** - * @typedef {import("./doc-builders").Doc} Doc - */ - -module.exports = { - builders: require("./doc-builders.js"), - printer: require("./doc-printer.js"), - utils: require("./doc-utils.js"), - debug: require("./doc-debug.js"), -}; diff --git a/src/document/invalid-doc-error.js b/src/document/invalid-doc-error.js new file mode 100644 index 000000000000..09ff9b6998c3 --- /dev/null +++ b/src/document/invalid-doc-error.js @@ -0,0 +1,40 @@ +import { VALID_OBJECT_DOC_TYPES } from "./constants.js"; +import getDocType from "./utils/get-doc-type.js"; + +const disjunctionListFormat = (list) => + new Intl.ListFormat("en-US", { type: "disjunction" }).format(list); + +function getDocErrorMessage(doc) { + const type = doc === null ? "null" : typeof doc; + if (type !== "string" && type !== "object") { + return `Unexpected doc '${type}', \nExpected it to be 'string' or 'object'.`; + } + + /* c8 ignore next 3 */ + if (getDocType(doc)) { + throw new Error("doc is valid."); + } + + // eslint-disable-next-line prettier-internal-rules/no-unnecessary-ast-path-call + const objectType = Object.prototype.toString.call(doc); + if (objectType !== "[object Object]") { + return `Unexpected doc '${objectType}'.`; + } + + const EXPECTED_TYPE_VALUES = disjunctionListFormat( + [...VALID_OBJECT_DOC_TYPES].map((type) => `'${type}'`), + ); + + return `Unexpected doc.type '${doc.type}'.\nExpected it to be ${EXPECTED_TYPE_VALUES}.`; +} + +class InvalidDocError extends Error { + name = "InvalidDocError"; + + constructor(doc) { + super(getDocErrorMessage(doc)); + this.doc = doc; + } +} + +export default InvalidDocError; diff --git a/src/document/printer.js b/src/document/printer.js new file mode 100644 index 000000000000..23a268feddcc --- /dev/null +++ b/src/document/printer.js @@ -0,0 +1,703 @@ +import { convertEndOfLineToChars } from "../common/end-of-line.js"; +import getStringWidth from "../utils/get-string-width.js"; +import { hardlineWithoutBreakParent, indent } from "./builders.js"; +import { + DOC_TYPE_ALIGN, + DOC_TYPE_ARRAY, + DOC_TYPE_BREAK_PARENT, + DOC_TYPE_CURSOR, + DOC_TYPE_FILL, + DOC_TYPE_GROUP, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LABEL, + DOC_TYPE_LINE, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_STRING, + DOC_TYPE_TRIM, +} from "./constants.js"; +import InvalidDocError from "./invalid-doc-error.js"; +import { getDocType, propagateBreaks } from "./utils.js"; + +/** @typedef {typeof MODE_BREAK | typeof MODE_FLAT} Mode */ +/** @typedef {{ ind: any, doc: any, mode: Mode }} Command */ +/** @typedef {Record} GroupModeMap */ + +/** @type {unique symbol} */ +const MODE_BREAK = Symbol("MODE_BREAK"); +/** @type {unique symbol} */ +const MODE_FLAT = Symbol("MODE_FLAT"); + +const CURSOR_PLACEHOLDER = Symbol("cursor"); + +const DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH"); + +function rootIndent() { + return { value: "", length: 0, queue: [] }; +} + +function makeIndent(ind, options) { + return generateInd(ind, { type: "indent" }, options); +} + +function makeAlign(indent, widthOrDoc, options) { + if (widthOrDoc === Number.NEGATIVE_INFINITY) { + return indent.root || rootIndent(); + } + + if (widthOrDoc < 0) { + return generateInd(indent, { type: "dedent" }, options); + } + + if (!widthOrDoc) { + return indent; + } + + if (widthOrDoc.type === "root") { + return { ...indent, root: indent }; + } + + const alignType = + typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign"; + + return generateInd(indent, { type: alignType, n: widthOrDoc }, options); +} + +function generateInd(ind, newPart, options) { + const queue = + newPart.type === "dedent" + ? ind.queue.slice(0, -1) + : [...ind.queue, newPart]; + + let value = ""; + let length = 0; + let lastTabs = 0; + let lastSpaces = 0; + + for (const part of queue) { + switch (part.type) { + case "indent": + flush(); + if (options.useTabs) { + addTabs(1); + } else { + addSpaces(options.tabWidth); + } + break; + case "stringAlign": + flush(); + value += part.n; + length += part.n.length; + break; + case "numberAlign": + lastTabs += 1; + lastSpaces += part.n; + break; + default: + /* c8 ignore next */ + throw new Error(`Unexpected type '${part.type}'`); + } + } + + flushSpaces(); + + return { ...ind, value, length, queue }; + + function addTabs(count) { + value += "\t".repeat(count); + length += options.tabWidth * count; + } + + function addSpaces(count) { + value += " ".repeat(count); + length += count; + } + + function flush() { + if (options.useTabs) { + flushTabs(); + } else { + flushSpaces(); + } + } + + function flushTabs() { + if (lastTabs > 0) { + addTabs(lastTabs); + } + resetLast(); + } + + function flushSpaces() { + if (lastSpaces > 0) { + addSpaces(lastSpaces); + } + resetLast(); + } + + function resetLast() { + lastTabs = 0; + lastSpaces = 0; + } +} + +// Trim `Tab(U+0009)` and `Space(U+0020)` at the end of line +function trim(out) { + let trimCount = 0; + let cursorCount = 0; + let outIndex = out.length; + + outer: while (outIndex--) { + const last = out[outIndex]; + + if (last === CURSOR_PLACEHOLDER) { + cursorCount++; + continue; + } + + /* c8 ignore next 3 */ + if (process.env.NODE_ENV !== "production" && typeof last !== "string") { + throw new Error(`Unexpected value in trim: '${typeof last}'`); + } + + // Not using a regexp here because regexps for trimming off trailing + // characters are known to have performance issues. + for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) { + const char = last[charIndex]; + if (char === " " || char === "\t") { + trimCount++; + } else { + out[outIndex] = last.slice(0, charIndex + 1); + break outer; + } + } + } + + if (trimCount > 0 || cursorCount > 0) { + out.length = outIndex + 1; + + while (cursorCount-- > 0) { + out.push(CURSOR_PLACEHOLDER); + } + } + + return trimCount; +} + +/** + * @param {Command} next + * @param {Command[]} restCommands + * @param {number} width + * @param {boolean} hasLineSuffix + * @param {GroupModeMap} groupModeMap + * @param {boolean} [mustBeFlat] + * @returns {boolean} + */ +function fits( + next, + restCommands, + width, + hasLineSuffix, + groupModeMap, + mustBeFlat, +) { + if (width === Number.POSITIVE_INFINITY) { + return true; + } + + let restIdx = restCommands.length; + /** @type {Array>} */ + const cmds = [next]; + // `out` is only used for width counting because `trim` requires to look + // backwards for space characters. + const out = []; + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + cmds.push(restCommands[--restIdx]); + + continue; + } + + const { mode, doc } = cmds.pop(); + const docType = getDocType(doc); + switch (docType) { + case DOC_TYPE_STRING: + out.push(doc); + width -= getStringWidth(doc); + break; + + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL: { + const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts; + const end = doc[DOC_FILL_PRINTED_LENGTH] ?? 0; + for (let i = parts.length - 1; i >= end; i--) { + cmds.push({ mode, doc: parts[i] }); + } + break; + } + + case DOC_TYPE_INDENT: + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + cmds.push({ mode, doc: doc.contents }); + break; + + case DOC_TYPE_TRIM: + width += trim(out); + break; + + case DOC_TYPE_GROUP: { + if (mustBeFlat && doc.break) { + return false; + } + const groupMode = doc.break ? MODE_BREAK : mode; + // The most expanded state takes up the least space on the current line. + const contents = + doc.expandedStates && groupMode === MODE_BREAK + ? doc.expandedStates.at(-1) + : doc.contents; + cmds.push({ mode: groupMode, doc: contents }); + break; + } + + case DOC_TYPE_IF_BREAK: { + const groupMode = doc.groupId + ? groupModeMap[doc.groupId] || MODE_FLAT + : mode; + const contents = + groupMode === MODE_BREAK ? doc.breakContents : doc.flatContents; + if (contents) { + cmds.push({ mode, doc: contents }); + } + break; + } + + case DOC_TYPE_LINE: + if (mode === MODE_BREAK || doc.hard) { + return true; + } + if (!doc.soft) { + out.push(" "); + width--; + } + break; + + case DOC_TYPE_LINE_SUFFIX: + hasLineSuffix = true; + break; + + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + if (hasLineSuffix) { + return false; + } + break; + } + } + return false; +} + +function printDocToString(doc, options) { + /** @type GroupModeMap */ + const groupModeMap = {}; + + const width = options.printWidth; + const newLine = convertEndOfLineToChars(options.endOfLine); + let pos = 0; + // cmds is basically a stack. We've turned a recursive call into a + // while loop which is much faster. The while loop below adds new + // cmds to the array instead of recursively calling `print`. + /** @type Command[] */ + const cmds = [{ ind: rootIndent(), mode: MODE_BREAK, doc }]; + const out = []; + let shouldRemeasure = false; + /** @type Command[] */ + const lineSuffix = []; + let printedCursorCount = 0; + + propagateBreaks(doc); + + while (cmds.length > 0) { + const { ind, mode, doc } = cmds.pop(); + switch (getDocType(doc)) { + case DOC_TYPE_STRING: { + const formatted = + newLine !== "\n" ? doc.replaceAll("\n", newLine) : doc; + out.push(formatted); + // Plugins may print single string, should skip measure the width + if (cmds.length > 0) { + pos += getStringWidth(formatted); + } + break; + } + + case DOC_TYPE_ARRAY: + for (let i = doc.length - 1; i >= 0; i--) { + cmds.push({ ind, mode, doc: doc[i] }); + } + break; + + case DOC_TYPE_CURSOR: + if (printedCursorCount >= 2) { + throw new Error("There are too many 'cursor' in doc."); + } + out.push(CURSOR_PLACEHOLDER); + printedCursorCount++; + break; + + case DOC_TYPE_INDENT: + cmds.push({ ind: makeIndent(ind, options), mode, doc: doc.contents }); + break; + + case DOC_TYPE_ALIGN: + cmds.push({ + ind: makeAlign(ind, doc.n, options), + mode, + doc: doc.contents, + }); + break; + + case DOC_TYPE_TRIM: + pos -= trim(out); + break; + + case DOC_TYPE_GROUP: + switch (mode) { + case MODE_FLAT: + if (!shouldRemeasure) { + cmds.push({ + ind, + mode: doc.break ? MODE_BREAK : MODE_FLAT, + doc: doc.contents, + }); + + break; + } + // fallthrough + + case MODE_BREAK: { + shouldRemeasure = false; + + /** @type {Command} */ + const next = { ind, mode: MODE_FLAT, doc: doc.contents }; + const rem = width - pos; + const hasLineSuffix = lineSuffix.length > 0; + + if ( + !doc.break && + fits(next, cmds, rem, hasLineSuffix, groupModeMap) + ) { + cmds.push(next); + } else { + // Expanded states are a rare case where a document + // can manually provide multiple representations of + // itself. It provides an array of documents + // going from the least expanded (most flattened) + // representation first to the most expanded. If a + // group has these, we need to manually go through + // these states and find the first one that fits. + // eslint-disable-next-line no-lonely-if + if (doc.expandedStates) { + const mostExpanded = doc.expandedStates.at(-1); + + if (doc.break) { + cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded }); + + break; + } else { + for (let i = 1; i < doc.expandedStates.length + 1; i++) { + if (i >= doc.expandedStates.length) { + cmds.push({ ind, mode: MODE_BREAK, doc: mostExpanded }); + + break; + } else { + const state = doc.expandedStates[i]; + /** @type {Command} */ + const cmd = { ind, mode: MODE_FLAT, doc: state }; + + if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) { + cmds.push(cmd); + + break; + } + } + } + } + } else { + cmds.push({ ind, mode: MODE_BREAK, doc: doc.contents }); + } + } + + break; + } + } + + if (doc.id) { + groupModeMap[doc.id] = cmds.at(-1).mode; + } + break; + // Fills each line with as much code as possible before moving to a new + // line with the same indentation. + // + // Expects doc.parts to be an array of alternating content and + // whitespace. The whitespace contains the linebreaks. + // + // For example: + // ["I", line, "love", line, "monkeys"] + // or + // [{ type: group, ... }, softline, { type: group, ... }] + // + // It uses this parts structure to handle three main layout cases: + // * The first two content items fit on the same line without + // breaking + // -> output the first content item and the whitespace "flat". + // * Only the first content item fits on the line without breaking + // -> output the first content item "flat" and the whitespace with + // "break". + // * Neither content item fits on the line without breaking + // -> output the first content item and the whitespace with "break". + case DOC_TYPE_FILL: { + const rem = width - pos; + + const offset = doc[DOC_FILL_PRINTED_LENGTH] ?? 0; + const { parts } = doc; + const length = parts.length - offset; + if (length === 0) { + break; + } + + const content = parts[offset + 0]; + const whitespace = parts[offset + 1]; + /** @type {Command} */ + const contentFlatCmd = { ind, mode: MODE_FLAT, doc: content }; + /** @type {Command} */ + const contentBreakCmd = { ind, mode: MODE_BREAK, doc: content }; + const contentFits = fits( + contentFlatCmd, + [], + rem, + lineSuffix.length > 0, + groupModeMap, + true, + ); + + if (length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + break; + } + + /** @type {Command} */ + const whitespaceFlatCmd = { ind, mode: MODE_FLAT, doc: whitespace }; + /** @type {Command} */ + const whitespaceBreakCmd = { ind, mode: MODE_BREAK, doc: whitespace }; + + if (length === 2) { + if (contentFits) { + cmds.push(whitespaceFlatCmd, contentFlatCmd); + } else { + cmds.push(whitespaceBreakCmd, contentBreakCmd); + } + break; + } + + const secondContent = parts[offset + 2]; + + /** @type {Command} */ + const remainingCmd = { + ind, + mode, + doc: { ...doc, [DOC_FILL_PRINTED_LENGTH]: offset + 2 }, + }; + + /** @type {Command} */ + const firstAndSecondContentFlatCmd = { + ind, + mode: MODE_FLAT, + doc: [content, whitespace, secondContent], + }; + const firstAndSecondContentFits = fits( + firstAndSecondContentFlatCmd, + [], + rem, + lineSuffix.length > 0, + groupModeMap, + true, + ); + + if (firstAndSecondContentFits) { + cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd); + } else if (contentFits) { + cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd); + } else { + cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd); + } + break; + } + case DOC_TYPE_IF_BREAK: + case DOC_TYPE_INDENT_IF_BREAK: { + const groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; + if (groupMode === MODE_BREAK) { + const breakContents = + doc.type === DOC_TYPE_IF_BREAK + ? doc.breakContents + : doc.negate + ? doc.contents + : indent(doc.contents); + if (breakContents) { + cmds.push({ ind, mode, doc: breakContents }); + } + } + if (groupMode === MODE_FLAT) { + const flatContents = + doc.type === DOC_TYPE_IF_BREAK + ? doc.flatContents + : doc.negate + ? indent(doc.contents) + : doc.contents; + if (flatContents) { + cmds.push({ ind, mode, doc: flatContents }); + } + } + + break; + } + case DOC_TYPE_LINE_SUFFIX: + lineSuffix.push({ ind, mode, doc: doc.contents }); + break; + + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + if (lineSuffix.length > 0) { + cmds.push({ ind, mode, doc: hardlineWithoutBreakParent }); + } + break; + + case DOC_TYPE_LINE: + switch (mode) { + case MODE_FLAT: + if (!doc.hard) { + if (!doc.soft) { + out.push(" "); + + pos += 1; + } + + break; + } else { + // This line was forced into the output even if we + // were in flattened mode, so we need to tell the next + // group that no matter what, it needs to remeasure + // because the previous measurement didn't accurately + // capture the entire expression (this is necessary + // for nested groups) + shouldRemeasure = true; + } + // fallthrough + + case MODE_BREAK: + if (lineSuffix.length > 0) { + cmds.push({ ind, mode, doc }, ...lineSuffix.reverse()); + lineSuffix.length = 0; + break; + } + + if (doc.literal) { + if (ind.root) { + out.push(newLine, ind.root.value); + pos = ind.root.length; + } else { + out.push(newLine); + pos = 0; + } + } else { + pos -= trim(out); + out.push(newLine + ind.value); + pos = ind.length; + } + break; + } + break; + + case DOC_TYPE_LABEL: + cmds.push({ ind, mode, doc: doc.contents }); + break; + + case DOC_TYPE_BREAK_PARENT: + // No op + break; + + default: + throw new InvalidDocError(doc); + } + + // Flush remaining line-suffix contents at the end of the document, in case + // there is no new line after the line-suffix. + if (cmds.length === 0 && lineSuffix.length > 0) { + cmds.push(...lineSuffix.reverse()); + lineSuffix.length = 0; + } + } + + const cursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER); + if (cursorPlaceholderIndex !== -1) { + const otherCursorPlaceholderIndex = out.indexOf( + CURSOR_PLACEHOLDER, + cursorPlaceholderIndex + 1, + ); + + if (otherCursorPlaceholderIndex === -1) { + // If we got here, the doc must have contained ONE cursor command, + // instead of the expected zero or two. If the doc being printed was + // returned by printAstToDoc, then the only ways this can have happened + // are if: + // 1. a plugin added a cursor command itself, or + // 2. one (but not both) of options.nodeAfterCursor and + // options.nodeAfterCursor pointed to a node within a subtree of the + // AST that the printer plugin used in printAstToDoc simply omits from + // the doc, or that it prints without recursively calling mainPrint, + // with the consequence that the logic for adding a cursor command in + // callPluginPrintFunction was never called for that node. + // These are both weird scenarios that should be considered a bug if they + // ever occur with one of Prettier's built-in plugins. If a third-party + // plugin was used when printing the AST to a doc, the possibility of + // reaching this scenario MIGHT be reasonable to consider a bug in the + // plugin. However, we try to at least not crash if this ever happens; + // instead we simply give up on returning a cursorNodeStart or + // cursorNodeText. + // + // coreFormat has logic specifically to handle this scenario - where it + // is supposed to preserve the cursor position but the printer gives it + // no information about where the nodes around the cursor ended up - + // although that logic is unavoidably slower (and has more potential to + // return a perverse result) than the happy path where we help out + // coreFormat by returning a cursorNodeStart and cursorNodeText here. + return { + formatted: out.filter((char) => char !== CURSOR_PLACEHOLDER).join(""), + }; + } + + const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + const aroundCursor = out + .slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex) + .join(""); + const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); + + return { + formatted: beforeCursor + aroundCursor + afterCursor, + cursorNodeStart: beforeCursor.length, + cursorNodeText: aroundCursor, + }; + } + + return { formatted: out.join("") }; +} + +export { printDocToString }; diff --git a/src/document/public.d.ts b/src/document/public.d.ts new file mode 100644 index 000000000000..50117757c42a --- /dev/null +++ b/src/document/public.d.ts @@ -0,0 +1,254 @@ +// https://github.com/prettier/prettier/blob/next/src/document/public.js +export namespace builders { + type DocCommand = + | Align + | BreakParent + | Cursor + | Fill + | Group + | IfBreak + | Indent + | IndentIfBreak + | Label + | Line + | LineSuffix + | LineSuffixBoundary + | Trim; + type Doc = string | Doc[] | DocCommand; + + interface Align { + type: "align"; + contents: Doc; + n: number | string | { type: "root" }; + } + + interface BreakParent { + type: "break-parent"; + } + + interface Cursor { + type: "cursor"; + placeholder: symbol; + } + + interface Fill { + type: "fill"; + parts: Doc[]; + } + + interface Group { + type: "group"; + id?: symbol; + contents: Doc; + break: boolean; + expandedStates: Doc[]; + } + + interface HardlineWithoutBreakParent extends Line { + hard: true; + } + + interface IfBreak { + type: "if-break"; + breakContents: Doc; + flatContents: Doc; + } + + interface Indent { + type: "indent"; + contents: Doc; + } + + interface IndentIfBreak { + type: "indent-if-break"; + } + + interface Label { + type: "label"; + label: any; + contents: Doc; + } + + interface Line { + type: "line"; + soft?: boolean | undefined; + hard?: boolean | undefined; + literal?: boolean | undefined; + } + + interface LineSuffix { + type: "line-suffix"; + contents: Doc; + } + + interface LineSuffixBoundary { + type: "line-suffix-boundary"; + } + + interface LiterallineWithoutBreakParent extends Line { + hard: true; + literal: true; + } + + type LiteralLine = [LiterallineWithoutBreakParent, BreakParent]; + + interface Softline extends Line { + soft: true; + } + + type Hardline = [HardlineWithoutBreakParent, BreakParent]; + + interface Trim { + type: "trim"; + } + + interface GroupOptions { + shouldBreak?: boolean | undefined; + id?: symbol | undefined; + } + + function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc; + + /** @see [align](https://github.com/prettier/prettier/blob/main/commands.md#align) */ + function align(widthOrString: Align["n"], doc: Doc): Align; + + /** @see [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent) */ + const breakParent: BreakParent; + + /** @see [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup) */ + function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group; + + /** @see [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent) */ + function dedent(doc: Doc): Align; + + /** @see [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot) */ + function dedentToRoot(doc: Doc): Align; + + /** @see [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill) */ + function fill(docs: Doc[]): Fill; + + /** @see [group](https://github.com/prettier/prettier/blob/main/commands.md#group) */ + function group(doc: Doc, opts?: GroupOptions): Group; + + /** @see [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline) */ + const hardline: Hardline; + + /** @see [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */ + const hardlineWithoutBreakParent: HardlineWithoutBreakParent; + + /** @see [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak) */ + function ifBreak( + ifBreak: Doc, + noBreak?: Doc, + options?: { groupId?: symbol | undefined }, + ): IfBreak; + + /** @see [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent) */ + function indent(doc: Doc): Indent; + + /** @see [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak) */ + function indentIfBreak( + doc: Doc, + opts: { groupId: symbol; negate?: boolean | undefined }, + ): IndentIfBreak; + + /** @see [join](https://github.com/prettier/prettier/blob/main/commands.md#join) */ + function join(sep: Doc, docs: Doc[]): Doc[]; + + /** @see [label](https://github.com/prettier/prettier/blob/main/commands.md#label) */ + function label(label: any | undefined, contents: Doc): Doc; + + /** @see [line](https://github.com/prettier/prettier/blob/main/commands.md#line) */ + const line: Line; + + /** @see [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix) */ + function lineSuffix(suffix: Doc): LineSuffix; + + /** @see [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary) */ + const lineSuffixBoundary: LineSuffixBoundary; + + /** @see [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline) */ + const literalline: LiteralLine; + + /** @see [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent) */ + const literallineWithoutBreakParent: LiterallineWithoutBreakParent; + + /** @see [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot) */ + function markAsRoot(doc: Doc): Align; + + /** @see [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline) */ + const softline: Softline; + + /** @see [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim) */ + const trim: Trim; + + /** @see [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor) */ + const cursor: Cursor; +} + +export namespace printer { + function printDocToString( + doc: builders.Doc, + options: Options, + ): { + formatted: string; + /** + * This property is a misnomer, and has been since the changes in + * https://github.com/prettier/prettier/pull/15709. + * The region of the document indicated by `cursorNodeStart` and `cursorNodeText` will + * sometimes actually be what lies BETWEEN a pair of leaf nodes in the AST, rather than a node. + */ + cursorNodeStart?: number | undefined; + + /** + * Note that, like cursorNodeStart, this is a misnomer and may actually be the text between two + * leaf nodes in the AST instead of the text of a node. + */ + cursorNodeText?: string | undefined; + }; + interface Options { + /** + * Specify the line length that the printer will wrap on. + * @default 80 + */ + printWidth: number; + /** + * Specify the number of spaces per indentation-level. + * @default 2 + */ + tabWidth: number; + /** + * Indent lines with tabs instead of spaces + * @default false + */ + useTabs?: boolean; + parentParser?: string | undefined; + __embeddedInHtml?: boolean | undefined; + } +} + +export namespace utils { + function willBreak(doc: builders.Doc): boolean; + function traverseDoc( + doc: builders.Doc, + onEnter?: (doc: builders.Doc) => void | boolean, + onExit?: (doc: builders.Doc) => void, + shouldTraverseConditionalGroups?: boolean, + ): void; + function findInDoc( + doc: builders.Doc, + callback: (doc: builders.Doc) => T, + defaultValue: T, + ): T; + function mapDoc( + doc: builders.Doc, + callback: (doc: builders.Doc) => T, + ): T; + function removeLines(doc: builders.Doc): builders.Doc; + function stripTrailingHardline(doc: builders.Doc): builders.Doc; + function replaceEndOfLine( + doc: builders.Doc, + replacement?: builders.Doc, + ): builders.Doc; + function canBreak(doc: builders.Doc): boolean; +} diff --git a/src/document/public.js b/src/document/public.js new file mode 100644 index 000000000000..44c6464082da --- /dev/null +++ b/src/document/public.js @@ -0,0 +1,77 @@ +import { + addAlignmentToDoc, + align, + breakParent, + conditionalGroup, + cursor, + dedent, + dedentToRoot, + fill, + group, + hardline, + hardlineWithoutBreakParent, + ifBreak, + indent, + indentIfBreak, + join, + label, + line, + lineSuffix, + lineSuffixBoundary, + literalline, + literallineWithoutBreakParent, + markAsRoot, + softline, + trim, +} from "./builders.js"; +import { printDocToString } from "./printer.js"; +import { + canBreak, + findInDoc, + mapDoc, + removeLines, + replaceEndOfLine, + stripTrailingHardline, + traverseDoc, + willBreak, +} from "./utils.js"; + +export const builders = { + join, + line, + softline, + hardline, + literalline, + group, + conditionalGroup, + fill, + lineSuffix, + lineSuffixBoundary, + cursor, + breakParent, + ifBreak, + trim, + indent, + indentIfBreak, + align, + addAlignmentToDoc, + markAsRoot, + dedentToRoot, + dedent, + hardlineWithoutBreakParent, + literallineWithoutBreakParent, + label, + // TODO: Remove this in v4 + concat: (parts) => parts, +}; +export const printer = { printDocToString }; +export const utils = { + willBreak, + traverseDoc, + findInDoc, + mapDoc, + removeLines, + stripTrailingHardline, + replaceEndOfLine, + canBreak, +}; diff --git a/src/document/utils.js b/src/document/utils.js new file mode 100644 index 000000000000..fecff97050ae --- /dev/null +++ b/src/document/utils.js @@ -0,0 +1,413 @@ +import { trimNewlinesEnd } from "trim-newlines"; +import { join, literalline } from "./builders.js"; +import { + DOC_TYPE_ALIGN, + DOC_TYPE_ARRAY, + DOC_TYPE_BREAK_PARENT, + DOC_TYPE_CURSOR, + DOC_TYPE_FILL, + DOC_TYPE_GROUP, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LABEL, + DOC_TYPE_LINE, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_STRING, + DOC_TYPE_TRIM, +} from "./constants.js"; +import InvalidDocError from "./invalid-doc-error.js"; +import getDocType from "./utils/get-doc-type.js"; +import traverseDoc from "./utils/traverse-doc.js"; + +function mapDoc(doc, cb) { + // Avoid creating `Map` + if (typeof doc === "string") { + return cb(doc); + } + + // Within a doc tree, the same subtrees can be found multiple times. + // E.g., often this happens in conditional groups. + // As an optimization (those subtrees can be huge) and to maintain the + // reference structure of the tree, the mapping results are cached in + // a map and reused. + const mapped = new Map(); + + return rec(doc); + + function rec(doc) { + if (mapped.has(doc)) { + return mapped.get(doc); + } + const result = process(doc); + mapped.set(doc, result); + return result; + } + + function process(doc) { + switch (getDocType(doc)) { + case DOC_TYPE_ARRAY: + return cb(doc.map(rec)); + + case DOC_TYPE_FILL: + return cb({ ...doc, parts: doc.parts.map(rec) }); + + case DOC_TYPE_IF_BREAK: + return cb({ + ...doc, + breakContents: rec(doc.breakContents), + flatContents: rec(doc.flatContents), + }); + + case DOC_TYPE_GROUP: { + let { expandedStates, contents } = doc; + if (expandedStates) { + expandedStates = expandedStates.map(rec); + contents = expandedStates[0]; + } else { + contents = rec(contents); + } + return cb({ ...doc, contents, expandedStates }); + } + + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + case DOC_TYPE_LINE_SUFFIX: + return cb({ ...doc, contents: rec(doc.contents) }); + + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + return cb(doc); + + default: + /* c8 ignore next 3 */ + throw new InvalidDocError(doc); + } + } +} + +function findInDoc(doc, fn, defaultValue) { + let result = defaultValue; + let shouldSkipFurtherProcessing = false; + function findInDocOnEnterFn(doc) { + if (shouldSkipFurtherProcessing) { + return false; + } + + const maybeResult = fn(doc); + if (maybeResult !== undefined) { + shouldSkipFurtherProcessing = true; + result = maybeResult; + } + } + traverseDoc(doc, findInDocOnEnterFn); + return result; +} + +function willBreakFn(doc) { + if (doc.type === DOC_TYPE_GROUP && doc.break) { + return true; + } + if (doc.type === DOC_TYPE_LINE && doc.hard) { + return true; + } + if (doc.type === DOC_TYPE_BREAK_PARENT) { + return true; + } +} + +function willBreak(doc) { + return findInDoc(doc, willBreakFn, false); +} + +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + const parentGroup = groupStack.at(-1); + // Breaks are not propagated through conditional groups because + // the user is expected to manually handle what breaks. + if (!parentGroup.expandedStates && !parentGroup.break) { + // An alternative truthy value allows to distinguish propagated group breaks + // and not to print them as `group(..., { break: true })` in `--debug-print-doc`. + parentGroup.break = "propagated"; + } + } + return null; +} + +function propagateBreaks(doc) { + const alreadyVisitedSet = new Set(); + const groupStack = []; + function propagateBreaksOnEnterFn(doc) { + if (doc.type === DOC_TYPE_BREAK_PARENT) { + breakParentGroup(groupStack); + } + if (doc.type === DOC_TYPE_GROUP) { + groupStack.push(doc); + if (alreadyVisitedSet.has(doc)) { + return false; + } + alreadyVisitedSet.add(doc); + } + } + function propagateBreaksOnExitFn(doc) { + if (doc.type === DOC_TYPE_GROUP) { + const group = groupStack.pop(); + if (group.break) { + breakParentGroup(groupStack); + } + } + } + traverseDoc( + doc, + propagateBreaksOnEnterFn, + propagateBreaksOnExitFn, + /* shouldTraverseConditionalGroups */ true, + ); +} + +function removeLinesFn(doc) { + // Force this doc into flat mode by statically converting all + // lines into spaces (or soft lines into nothing). Hard lines + // should still output because there's too great of a chance + // of breaking existing assumptions otherwise. + if (doc.type === DOC_TYPE_LINE && !doc.hard) { + return doc.soft ? "" : " "; + } + + if (doc.type === DOC_TYPE_IF_BREAK) { + return doc.flatContents; + } + + return doc; +} + +function removeLines(doc) { + return mapDoc(doc, removeLinesFn); +} + +function stripTrailingHardlineFromParts(parts) { + parts = [...parts]; + + while ( + parts.length >= 2 && + parts.at(-2).type === DOC_TYPE_LINE && + parts.at(-1).type === DOC_TYPE_BREAK_PARENT + ) { + parts.length -= 2; + } + + if (parts.length > 0) { + const lastPart = stripTrailingHardlineFromDoc(parts.at(-1)); + parts[parts.length - 1] = lastPart; + } + + return parts; +} + +function stripTrailingHardlineFromDoc(doc) { + switch (getDocType(doc)) { + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_GROUP: + case DOC_TYPE_LINE_SUFFIX: + case DOC_TYPE_LABEL: { + const contents = stripTrailingHardlineFromDoc(doc.contents); + return { ...doc, contents }; + } + + case DOC_TYPE_IF_BREAK: + return { + ...doc, + breakContents: stripTrailingHardlineFromDoc(doc.breakContents), + flatContents: stripTrailingHardlineFromDoc(doc.flatContents), + }; + + case DOC_TYPE_FILL: + return { ...doc, parts: stripTrailingHardlineFromParts(doc.parts) }; + + case DOC_TYPE_ARRAY: + return stripTrailingHardlineFromParts(doc); + + case DOC_TYPE_STRING: + return trimNewlinesEnd(doc); + + case DOC_TYPE_ALIGN: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + // No op + break; + + default: + throw new InvalidDocError(doc); + } + + return doc; +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + return stripTrailingHardlineFromDoc(cleanDoc(doc)); +} + +function cleanDocFn(doc) { + switch (getDocType(doc)) { + case DOC_TYPE_FILL: + if (doc.parts.every((part) => part === "")) { + return ""; + } + break; + case DOC_TYPE_GROUP: + if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) { + return ""; + } + // Remove nested only group + if ( + doc.contents.type === DOC_TYPE_GROUP && + doc.contents.id === doc.id && + doc.contents.break === doc.break && + doc.contents.expandedStates === doc.expandedStates + ) { + return doc.contents; + } + break; + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LINE_SUFFIX: + if (!doc.contents) { + return ""; + } + break; + case DOC_TYPE_IF_BREAK: + if (!doc.flatContents && !doc.breakContents) { + return ""; + } + break; + case DOC_TYPE_ARRAY: { + // Flat array, concat strings + const parts = []; + for (const part of doc) { + if (!part) { + continue; + } + const [currentPart, ...restParts] = Array.isArray(part) ? part : [part]; + if ( + typeof currentPart === "string" && + typeof parts.at(-1) === "string" + ) { + parts[parts.length - 1] += currentPart; + } else { + parts.push(currentPart); + } + parts.push(...restParts); + } + + if (parts.length === 0) { + return ""; + } + + if (parts.length === 1) { + return parts[0]; + } + + return parts; + } + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_LABEL: + case DOC_TYPE_BREAK_PARENT: + // No op + break; + default: + /* c8 ignore next 3 */ + throw new InvalidDocError(doc); + } + + return doc; +} + +// - concat strings +// - flat arrays except for parts of `fill` +// - merge arrays of strings into single strings +// - remove nested `group`s and empty `fill`/`align`/`indent`/`line-suffix`/`if-break` if possible +function cleanDoc(doc) { + return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc)); +} + +function replaceEndOfLine(doc, replacement = literalline) { + return mapDoc(doc, (currentDoc) => + typeof currentDoc === "string" + ? join(replacement, currentDoc.split("\n")) + : currentDoc, + ); +} + +function canBreakFn(doc) { + if (doc.type === DOC_TYPE_LINE) { + return true; + } +} + +function canBreak(doc) { + return findInDoc(doc, canBreakFn, false); +} + +function inheritLabel(doc, fn) { + return doc.type === DOC_TYPE_LABEL + ? { ...doc, contents: fn(doc.contents) } + : fn(doc); +} + +/** + * returns true iff cleanDoc(doc) === "" + * @param {import("./builders.js").Doc} doc + * @returns {boolean} + */ +function isEmptyDoc(doc) { + let isEmpty = true; + traverseDoc(doc, (doc) => { + switch (getDocType(doc)) { + case DOC_TYPE_STRING: + if (doc === "") { + break; + } + // fallthrough + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + isEmpty = false; + return false; + } + }); + return isEmpty; +} + +export { + canBreak, + cleanDoc, + findInDoc, + getDocType, + inheritLabel, + isEmptyDoc, + mapDoc, + propagateBreaks, + removeLines, + replaceEndOfLine, + stripTrailingHardline, + traverseDoc, + willBreak, +}; diff --git a/src/document/utils/assert-doc.js b/src/document/utils/assert-doc.js new file mode 100644 index 000000000000..2c148e329d65 --- /dev/null +++ b/src/document/utils/assert-doc.js @@ -0,0 +1,102 @@ +import { + DOC_TYPE_IF_BREAK, + DOC_TYPE_LINE, + DOC_TYPE_STRING, +} from "../constants.js"; +import { isEmptyDoc } from "../utils.js"; +import getDocType from "./get-doc-type.js"; +import traverseDoc from "./traverse-doc.js"; + +/** + * @typedef {import("../builders.js").Doc} Doc + */ + +const checked = process.env.NODE_ENV !== "production" && new WeakSet(); +const noop = () => {}; +const assertDoc = + process.env.NODE_ENV === "production" + ? noop + : function (doc) { + traverseDoc(doc, (doc) => { + if (checked.has(doc)) { + return false; + } + + if (typeof doc !== "string") { + checked.add(doc); + } + }); + }; + +const assertDocArray = + process.env.NODE_ENV === "production" + ? noop + : function (docs, optional = false) { + if (optional && !docs) { + return; + } + + if (!Array.isArray(docs)) { + throw new TypeError("Unexpected doc array."); + } + + for (const doc of docs) { + assertDoc(doc); + } + }; + +const assertDocFillParts = + process.env.NODE_ENV === "production" + ? noop + : /** + * @param {Doc[]} parts + */ + function (parts) { + assertDocArray(parts); + if (parts.length > 1 && isEmptyDoc(parts.at(-1))) { + // stripTrailingHardline can transform trailing hardline into empty string. + // The trailing empty string is not a problem even if it's a line element. + parts = parts.slice(0, -1); + } + for (const [i, doc] of parts.entries()) { + if (i % 2 === 1 && !isValidSeparator(doc)) { + const type = getDocType(doc); + throw new Error( + `Unexpected non-line-break doc at ${i}. Doc type is ${type}.`, + ); + } + } + }; + +/** + * @param {Doc} doc + * @returns {boolean} + */ +function isValidSeparator(doc) { + let hasLine = false; + let hasUnexpectedString = false; + function rec(doc) { + switch (getDocType(doc)) { + case DOC_TYPE_LINE: + hasLine = true; + return; + case DOC_TYPE_STRING: + if (doc === "{' '}" || doc === '{" "}' || doc === " ") { + // As of now, we can include `{' '}` in line part of `fill()`. + // This sometimes causes overflows https://github.com/prettier/prettier/issues/2553 + // We don't have a good way to handle this case. + return; + } + hasUnexpectedString = true; + return; + case DOC_TYPE_IF_BREAK: + traverseDoc(doc.breakContents, rec); + return false; + default: + } + } + traverseDoc(doc, rec); + return hasLine && !hasUnexpectedString; +} + +export { assertDoc, assertDocArray, assertDocFillParts }; diff --git a/src/document/utils/get-doc-type.js b/src/document/utils/get-doc-type.js new file mode 100644 index 000000000000..7cb3bed508fd --- /dev/null +++ b/src/document/utils/get-doc-type.js @@ -0,0 +1,27 @@ +import { + DOC_TYPE_ARRAY, + DOC_TYPE_STRING, + VALID_OBJECT_DOC_TYPES, +} from "../constants.js"; + +function getDocType(doc) { + if (typeof doc === "string") { + return DOC_TYPE_STRING; + } + + if (Array.isArray(doc)) { + return DOC_TYPE_ARRAY; + } + + if (!doc) { + return; + } + + const { type } = doc; + + if (VALID_OBJECT_DOC_TYPES.has(type)) { + return type; + } +} + +export default getDocType; diff --git a/src/document/utils/traverse-doc.js b/src/document/utils/traverse-doc.js new file mode 100644 index 000000000000..7d5e25463e77 --- /dev/null +++ b/src/document/utils/traverse-doc.js @@ -0,0 +1,101 @@ +import { + DOC_TYPE_ALIGN, + DOC_TYPE_ARRAY, + DOC_TYPE_BREAK_PARENT, + DOC_TYPE_CURSOR, + DOC_TYPE_FILL, + DOC_TYPE_GROUP, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LABEL, + DOC_TYPE_LINE, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_STRING, + DOC_TYPE_TRIM, +} from "../constants.js"; +import InvalidDocError from "../invalid-doc-error.js"; +import getDocType from "./get-doc-type.js"; + +// Using a unique object to compare by reference. +const traverseDocOnExitStackMarker = {}; + +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + const docsStack = [doc]; + + while (docsStack.length > 0) { + const doc = docsStack.pop(); + + if (doc === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + + if (onExit) { + docsStack.push(doc, traverseDocOnExitStackMarker); + } + + const docType = getDocType(doc); + if (!docType) { + throw new InvalidDocError(doc); + } + + // Should Recurse + if (onEnter?.(doc) === false) { + continue; + } + + // When there are multiple parts to process, + // the parts need to be pushed onto the stack in reverse order, + // so that they are processed in the original order + // when the stack is popped. + + switch (docType) { + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL: { + const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts; + for (let ic = parts.length, i = ic - 1; i >= 0; --i) { + docsStack.push(parts[i]); + } + break; + } + + case DOC_TYPE_IF_BREAK: + docsStack.push(doc.flatContents, doc.breakContents); + break; + + case DOC_TYPE_GROUP: + if (shouldTraverseConditionalGroups && doc.expandedStates) { + for (let ic = doc.expandedStates.length, i = ic - 1; i >= 0; --i) { + docsStack.push(doc.expandedStates[i]); + } + } else { + docsStack.push(doc.contents); + } + break; + + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + case DOC_TYPE_LINE_SUFFIX: + docsStack.push(doc.contents); + break; + + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + // No children + break; + + default: + throw new InvalidDocError(doc); + } + } +} + +export default traverseDoc; diff --git a/src/experimental-cli/constants.evaluate.js b/src/experimental-cli/constants.evaluate.js new file mode 100644 index 000000000000..069fc85db860 --- /dev/null +++ b/src/experimental-cli/constants.evaluate.js @@ -0,0 +1,2 @@ +export { default as PRETTIER_VERSION } from "../main/version.evaluate.js"; +export * from "@prettier/cli/dist/constants.js"; diff --git a/src/experimental-cli/index.js b/src/experimental-cli/index.js new file mode 100644 index 000000000000..9b8a93ecf715 --- /dev/null +++ b/src/experimental-cli/index.js @@ -0,0 +1 @@ +export * from "@prettier/cli/bin"; diff --git a/src/experimental-cli/worker.js b/src/experimental-cli/worker.js new file mode 100644 index 000000000000..0b85a5e71230 --- /dev/null +++ b/src/experimental-cli/worker.js @@ -0,0 +1 @@ +export * from "@prettier/cli/dist/prettier_serial.js"; diff --git a/src/index.cjs b/src/index.cjs new file mode 100644 index 000000000000..b8e3befb0681 --- /dev/null +++ b/src/index.cjs @@ -0,0 +1,77 @@ +"use strict"; + +const prettierPromise = import("./index.js"); + +const functionNames = [ + "formatWithCursor", + "format", + "check", + "resolveConfig", + "resolveConfigFile", + "clearConfigCache", + "getFileInfo", + "getSupportInfo", +]; + +const prettier = Object.create(null); +for (const name of functionNames) { + prettier[name] = async (...args) => { + const prettier = await prettierPromise; + return prettier[name](...args); + }; +} + +const debugApiFunctionNames = [ + "parse", + "formatAST", + "formatDoc", + "printToDoc", + "printDocToString", +]; + +const debugApis = Object.create(null); +for (const name of debugApiFunctionNames) { + debugApis[name] = async (...args) => { + const prettier = await prettierPromise; + return prettier.__debug[name](...args); + }; +} +prettier.__debug = debugApis; + +if (process.env.NODE_ENV === "production") { + prettier.util = require("./utils/public.js"); + prettier.doc = require("./document/public.js"); + prettier.version = require("./main/version.evaluate.js").default; +} else { + Object.defineProperties(prettier, { + util: { + get() { + try { + return require("./utils/public.js"); + } catch { + // No op + } + + throw new Error( + "prettier.util is not available in development CommonJS version", + ); + }, + }, + doc: { + get() { + try { + return require("./document/public.js"); + } catch { + // No op + } + + throw new Error( + "prettier.doc is not available in development CommonJS version", + ); + }, + }, + }); + prettier.version = require("../package.json").version; +} + +module.exports = prettier; diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 000000000000..3cb809ad112e --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,962 @@ +// Copied from `@types/prettier` +// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5bb07fc4b087cb7ee91084afa6fe750551a7bbb1/types/prettier/index.d.ts + +// Minimum TypeScript Version: 4.2 + +// Add `export {}` here to shut off automatic exporting from index.d.ts. There +// are quite a few utility types here that don't need to be shipped with the +// exported module. +export {}; + +import { builders, printer, utils } from "./document/public.js"; + +export namespace doc { + export { builders, printer, utils }; +} + +// This utility is here to handle the case where you have an explicit union +// between string literals and the generic string type. It would normally +// resolve out to just the string type, but this generic LiteralUnion maintains +// the intellisense of the original union. +// +// It comes from this issue: microsoft/TypeScript#29729: +// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227 +export type LiteralUnion = + | T + | (Pick & { _?: never | undefined }); + +export type AST = any; +export type Doc = doc.builders.Doc; + +// The type of elements that make up the given array T. +type ArrayElement = T extends Array ? E : never; + +// A union of the properties of the given object that are arrays. +type ArrayProperties = { + [K in keyof T]: NonNullable extends readonly any[] ? K : never; +}[keyof T]; + +// A union of the properties of the given array T that can be used to index it. +// If the array is a tuple, then that's going to be the explicit indices of the +// array, otherwise it's going to just be number. +type IndexProperties = + IsTuple extends true ? Exclude["length"], T["length"]> : number; + +// Effectively performing T[P], except that it's telling TypeScript that it's +// safe to do this for tuples, arrays, or objects. +type IndexValue = T extends any[] + ? P extends number + ? T[P] + : never + : P extends keyof T + ? T[P] + : never; + +// Determines if an object T is an array like string[] (in which case this +// evaluates to false) or a tuple like [string] (in which case this evaluates to +// true). +// eslint-disable-next-line @typescript-eslint/no-unused-vars +type IsTuple = T extends [] + ? true + : T extends [infer First, ...infer Remain] + ? IsTuple + : false; + +type CallProperties = T extends any[] ? IndexProperties : keyof T; +type IterProperties = T extends any[] + ? IndexProperties + : ArrayProperties; + +type CallCallback = (path: AstPath, index: number, value: any) => U; +type EachCallback = ( + path: AstPath>, + index: number, + value: any, +) => void; +type MapCallback = ( + path: AstPath>, + index: number, + value: any, +) => U; + +// https://github.com/prettier/prettier/blob/next/src/common/ast-path.js +export class AstPath { + constructor(value: T); + + get key(): string | null; + get index(): number | null; + get node(): T; + get parent(): T | null; + get grandparent(): T | null; + get isInArray(): boolean; + get siblings(): T[] | null; + get next(): T | null; + get previous(): T | null; + get isFirst(): boolean; + get isLast(): boolean; + get isRoot(): boolean; + get root(): T; + get ancestors(): T[]; + + stack: T[]; + + callParent(callback: (path: this) => U, count?: number): U; + + /** + * @deprecated Please use `AstPath#key` or `AstPath#index` + */ + getName(): PropertyKey | null; + + /** + * @deprecated Please use `AstPath#node` or `AstPath#siblings` + */ + getValue(): T; + + getNode(count?: number): T | null; + + getParentNode(count?: number): T | null; + + match( + ...predicates: Array< + (node: any, name: string | null, number: number | null) => boolean + > + ): boolean; + + // For each of the tree walk functions (call, each, and map) this provides 5 + // strict type signatures, along with a fallback at the end if you end up + // calling more than 5 properties deep. This helps a lot with typing because + // for the majority of cases you're calling fewer than 5 properties, so the + // tree walk functions have a clearer understanding of what you're doing. + // + // Note that resolving these types is somewhat complicated, and it wasn't + // even supported until TypeScript 4.2 (before it would just say that the + // type instantiation was excessively deep and possibly infinite). + + call(callback: CallCallback): U; + call>( + callback: CallCallback, U>, + prop1: P1, + ): U; + call>( + callback: CallCallback, P2>, U>, + prop1: P1, + prop2: P2, + ): U; + call< + U, + P1 extends keyof T, + P2 extends CallProperties, + P3 extends CallProperties>, + >( + callback: CallCallback< + IndexValue, P2>, P3>, + U + >, + prop1: P1, + prop2: P2, + prop3: P3, + ): U; + call< + U, + P1 extends keyof T, + P2 extends CallProperties, + P3 extends CallProperties>, + P4 extends CallProperties, P3>>, + >( + callback: CallCallback< + IndexValue, P2>, P3>, P4>, + U + >, + prop1: P1, + prop2: P2, + prop3: P3, + prop4: P4, + ): U; + call( + callback: CallCallback, + prop1: P, + prop2: P, + prop3: P, + prop4: P, + ...props: P[] + ): U; + + each(callback: EachCallback): void; + each>( + callback: EachCallback>, + prop1: P1, + ): void; + each>( + callback: EachCallback, P2>>, + prop1: P1, + prop2: P2, + ): void; + each< + P1 extends keyof T, + P2 extends IterProperties, + P3 extends IterProperties>, + >( + callback: EachCallback, P2>, P3>>, + prop1: P1, + prop2: P2, + prop3: P3, + ): void; + each< + P1 extends keyof T, + P2 extends IterProperties, + P3 extends IterProperties>, + P4 extends IterProperties, P3>>, + >( + callback: EachCallback< + IndexValue, P2>, P3>, P4> + >, + prop1: P1, + prop2: P2, + prop3: P3, + prop4: P4, + ): void; + each( + callback: EachCallback, + prop1: PropertyKey, + prop2: PropertyKey, + prop3: PropertyKey, + prop4: PropertyKey, + ...props: PropertyKey[] + ): void; + + map(callback: MapCallback): U[]; + map>( + callback: MapCallback, U>, + prop1: P1, + ): U[]; + map>( + callback: MapCallback, P2>, U>, + prop1: P1, + prop2: P2, + ): U[]; + map< + U, + P1 extends keyof T, + P2 extends IterProperties, + P3 extends IterProperties>, + >( + callback: MapCallback, P2>, P3>, U>, + prop1: P1, + prop2: P2, + prop3: P3, + ): U[]; + map< + U, + P1 extends keyof T, + P2 extends IterProperties, + P3 extends IterProperties>, + P4 extends IterProperties, P3>>, + >( + callback: MapCallback< + IndexValue, P2>, P3>, P4>, + U + >, + prop1: P1, + prop2: P2, + prop3: P3, + prop4: P4, + ): U[]; + map( + callback: MapCallback, + prop1: PropertyKey, + prop2: PropertyKey, + prop3: PropertyKey, + prop4: PropertyKey, + ...props: PropertyKey[] + ): U[]; +} + +/** @deprecated `FastPath` was renamed to `AstPath` */ +export type FastPath = AstPath; + +export type BuiltInParser = (text: string, options?: any) => AST; +export type BuiltInParserName = + | "acorn" + | "angular" + | "babel-flow" + | "babel-ts" + | "babel" + | "css" + | "espree" + | "flow" + | "glimmer" + | "graphql" + | "html" + | "json-stringify" + | "json" + | "json5" + | "jsonc" + | "less" + | "lwc" + | "markdown" + | "mdx" + | "meriyah" + | "mjml" + | "scss" + | "typescript" + | "vue" + | "yaml"; +export type BuiltInParsers = Record; + +/** + * For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts` + */ +export interface Config extends Options { + overrides?: Array<{ + files: string | string[]; + excludeFiles?: string | string[]; + options?: Options; + }>; +} + +export interface Options extends Partial {} + +export interface RequiredOptions extends doc.printer.Options { + /** + * Print semicolons at the ends of statements. + * @default true + */ + semi: boolean; + /** + * Use single quotes instead of double quotes. + * @default false + */ + singleQuote: boolean; + /** + * Use single quotes in JSX. + * @default false + */ + jsxSingleQuote: boolean; + /** + * Print trailing commas wherever possible. + * @default "all" + */ + trailingComma: "none" | "es5" | "all"; + /** + * Print spaces between brackets in object literals. + * @default true + */ + bracketSpacing: boolean; + /** + * How to wrap object literals. + * @default "preserve" + */ + objectWrap: "preserve" | "collapse"; + /** + * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being + * alone on the next line (does not apply to self closing elements). + * @default false + */ + bracketSameLine: boolean; + /** + * Format only a segment of a file. + * @default 0 + */ + rangeStart: number; + /** + * Format only a segment of a file. + * @default Number.POSITIVE_INFINITY + */ + rangeEnd: number; + /** + * Specify which parser to use. + */ + parser: LiteralUnion; + /** + * Specify the input filepath. This will be used to do parser inference. + */ + filepath: string; + /** + * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. + * This is very useful when gradually transitioning large, unformatted codebases to prettier. + * @default false + */ + requirePragma: boolean; + /** + * Prettier can insert a special @format marker at the top of files specifying that + * the file has been formatted with prettier. This works well when used in tandem with + * the --require-pragma option. If there is already a docblock at the top of + * the file then this option will add a newline to it with the @format marker. + * @default false + */ + insertPragma: boolean; + /** + * Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file. + * @default false + */ + checkIgnorePragma: boolean; + /** + * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. + * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. + * @default "preserve" + */ + proseWrap: "always" | "never" | "preserve"; + /** + * Include parentheses around a sole arrow function parameter. + * @default "always" + */ + arrowParens: "avoid" | "always"; + /** + * Provide ability to support new languages to prettier. + */ + plugins: Array; + /** + * How to handle whitespaces in HTML. + * @default "css" + */ + htmlWhitespaceSensitivity: "css" | "strict" | "ignore"; + /** + * Which end of line characters to apply. + * @default "lf" + */ + endOfLine: "auto" | "lf" | "crlf" | "cr"; + /** + * Change when properties in objects are quoted. + * @default "as-needed" + */ + quoteProps: "as-needed" | "consistent" | "preserve"; + /** + * Whether or not to indent the code inside +
Warning!
+Warning! + + + +=====================================output===================================== +
+ Warning! +
+Warning! + + +
Warning!
+Warning! + + + +================================================================================ +`; + +exports[`angularjs.html - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +
Warning!
+Warning! + + +
Warning!
+Warning! + + + +=====================================output===================================== +
+ Warning! +
+Warning! + + +
Warning!
+Warning! + + + +================================================================================ +`; diff --git a/tests/format/angular/bracket-same-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/bracket-same-line/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 048f1e498fa0..000000000000 --- a/tests/format/angular/bracket-same-line/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,128 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`angularjs.html - {"bracketSameLine":false} format 1`] = ` -====================================options===================================== -bracketSameLine: false -parsers: ["angular"] -printWidth: 80 - | printWidth -=====================================input====================================== -
Warning!
-Warning! - - -
Warning!
-Warning! - - - -=====================================output===================================== -
- Warning! -
-Warning! - - -
Warning!
-Warning! - - - -================================================================================ -`; - -exports[`angularjs.html - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["angular"] -printWidth: 80 - | printWidth -=====================================input====================================== -
Warning!
-Warning! - - -
Warning!
-Warning! - - - -=====================================output===================================== -
- Warning! -
-Warning! - - -
Warning!
-Warning! - - - -================================================================================ -`; diff --git a/tests/format/angular/bracket-same-line/format.test.js b/tests/format/angular/bracket-same-line/format.test.js new file mode 100644 index 000000000000..634e29d7e16c --- /dev/null +++ b/tests/format/angular/bracket-same-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["angular"], { bracketSameLine: true }); +runFormatTest(import.meta, ["angular"], { bracketSameLine: false }); diff --git a/tests/format/angular/bracket-same-line/jsfmt.spec.js b/tests/format/angular/bracket-same-line/jsfmt.spec.js deleted file mode 100644 index ddbb32302dc5..000000000000 --- a/tests/format/angular/bracket-same-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["angular"], { bracketSameLine: true }); -run_spec(__dirname, ["angular"], { bracketSameLine: false }); diff --git a/tests/format/angular/control-flow/__snapshots__/format.test.js.snap b/tests/format/angular/control-flow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a8a352bcdd5c --- /dev/null +++ b/tests/format/angular/control-flow/__snapshots__/format.test.js.snap @@ -0,0 +1,656 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`after-close-tag.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + @for (let item of items; index as i; trackBy: trackByFn) { + @if ( + areaId && + canTweet + ) { + + } + } + + + + + + + +@if ( + areaId && + canTweet + ) { + + } + +=====================================output===================================== + + @for (let item of items; index as i; trackBy: trackByFn) { + + @if (areaId && canTweet) { + + } + } + + + + + + +@if (areaId && canTweet) { + +} + +================================================================================ +`; + +exports[`chid.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if (test) {text} +
@if (test) {text}
+ +=====================================output===================================== + + @if (test) { + text + } + +
+ @if (test) { + text + } +
+ +================================================================================ +`; + +exports[`defer.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@defer (when isCheckedDefer()) { + +} +@placeholder { +Placeholder +} +@error { +Error +} +@loading(minimum 1s) { +Loading... +} + + +@defer (on interaction) { +Clicked +} +@placeholder { +Placeholder (click on it!) +} + + +@defer (on hover) { +Hovered +} +@placeholder { +Placeholder (hover it!) +} + + +@defer (on idle) { +Browser has reached an idle state +} +@placeholder { +Placeholder +} + + +@defer (on timer(5s)) { +Visible after 5s +} +@placeholder { +Placeholder +} + + +@defer (on viewport) { + +} +@placeholder { +Placeholder +} + + +@defer (on interaction; prefetch on hover) { + +} +@placeholder { +Placeholder (hover it, then click on it!) +} + + +@defer (on interaction; prefetch on hover) { + +} +@placeholder { +Placeholder (hover it, then click on it!) +} + +=====================================output===================================== +@defer (when isCheckedDefer()) { + +} @placeholder { + Placeholder +} @error { + Error +} @loading (minimum 1s) { + Loading... +} + +@defer (on interaction) { + Clicked +} @placeholder { + Placeholder (click on it!) +} + +@defer (on hover) { + Hovered +} @placeholder { + Placeholder (hover it!) +} + +@defer (on idle) { + Browser has reached an idle state +} @placeholder { + Placeholder +} + +@defer (on timer(5s)) { + Visible after 5s +} @placeholder { + Placeholder +} + +@defer (on viewport) { + +} @placeholder { + Placeholder +} + +@defer (on interaction; prefetch on hover) { + +} @placeholder { + Placeholder (hover it, then click on it!) +} + +@defer (on interaction; prefetch on hover) { + +} @placeholder { + Placeholder (hover it, then click on it!) +} + +================================================================================ +`; + +exports[`element-tags.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if (true) {} + +=====================================output===================================== +@if (true) { + +} + +================================================================================ +`; + +exports[`for.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    +@for ( + let + + item of items;index as +i; + trackBy: trackByFn +) { +
  • {{item.name}}
  • +} +@empty { +The collection is empty +} +
+ + +
  • + + + +
      +@for (item of collection; track item.id; let index = $index, first = $first; let last = $last, even = $even, odd = $odd; let count = $count) { + +
    • {{item.name}} index={{index}} first={{first}} last={{last}} even={{even}} odd={{odd}} count={{count}}
    • + +} +
    + +
      +@for (item of + emptyCollection; track item.id;) { +
    • {{item.name}}
    • +} +@empty { + The collection is empty +} +
    +
  • + +
    + @for ( item of items; track item){ + } + +
    +
    + +
    + @for (item of items; let i = $index; track block) {} + +
    +
    + +
    + @for (item of items; let i = $index; let count = $count; track block) {} + +
    +
    + +=====================================output===================================== +
      + @for (let item of items; index as i; trackBy: trackByFn) { +
    • + {{ item.name }} +
    • + } @empty { + The collection is empty + } +
    + +
  • + +
      + @for ( + item of collection; + track item.id; + let index = $index, first = $first; + let last = $last, even = $even, odd = $odd; + let count = $count + ) { +
    • + {{ item.name }} index={{ index }} first={{ + first + }} + last={{ last }} even={{ even }} odd={{ odd }} count={{ count }} +
    • + } +
    + +
      + @for (item of emptyCollection; track item.id) { +
    • + {{ item.name }} +
    • + } @empty { + The collection is empty + } +
    +
  • + +
    + @for (item of items; track item) {} + +
    +
    + +
    + @for (item of items; let i = $index; track block) {} + +
    +
    + +
    + @for (item of items; let i = $index; let count = $count; track block) {} + +
    +
    + +================================================================================ +`; + +exports[`if.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +

    @if and @else

    +
    + +
    +
    +@if (isChecked()) { +Checked +} +@else { +Not checked +} +
    + +@if (users$ | async; as users) { {{ users.length }} } +@else if (users$ | async; as users) { {{ users.length }} } + +
    {{ users.length }}
    + +@else {} + + +@if (isDev) {} +@else if (test) {} + +@if (foo( "quotes")) {} +@else if (foo( 'quotes')) {} + +@if ( widthCategory !== undefined && widthCategory > +topStartToSideStartMaxSize) { + +} + +@if ( widthCategory; as item) { +} + +
    + +=====================================output===================================== +

    @if and @else

    +
    + +
    +
    + @if (isChecked()) { + Checked + } @else { + Not checked + } +
    + +@if (users$ | async; as users) { + {{ users.length }} +} @else if (users$ | async; as users) { + {{ users.length }} +} + +
    {{ users.length }}
    + +@else {} + +@if (isDev) { +} @else if (test) {} + +@if (foo("quotes")) { +} @else if (foo("quotes")) {} + +@if ( + widthCategory !== undefined && widthCategory > topStartToSideStartMaxSize +) { + +} + +@if (widthCategory; as item) {} + +
    + +================================================================================ +`; + +exports[`ignore.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + +@if (condition) { + Foo +} @else { + Other +} + + +@if (condition) { + Foo +} + +@else { + Other +} + +=====================================output===================================== + +@if (condition) { + Foo +} +@else { + Other +} + +@if (condition) { + Foo +} + +@else { + Other +} + +================================================================================ +`; + +exports[`mix.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if (user.isHuman) { + +} @else if (user.isRobot) { + +@defer { + +} +} @else { +

    The profile is unknown!

    +} + +=====================================output===================================== +@if (user.isHuman) { + +} @else if (user.isRobot) { + + @defer { + + } +} @else { +

    The profile is unknown!

    +} + +================================================================================ +`; + +exports[`switch.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@switch (radioValue()) { +@case (1) { +Case 1 +} +@case (2) { +Case 2 +} +@default { +Default case (Not 1 or 2) +} +} + + +@switch( + should +.be.formatted +) { + @case( + should +.be.formatted) {} +} + +=====================================output===================================== +@switch (radioValue()) { + @case (1) { + Case 1 + } + @case (2) { + Case 2 + } + @default { + Default case (Not 1 or 2) + } +} + +@switch (should.be.formatted) { + @case (should.be.formatted) {} +} + +================================================================================ +`; + +exports[`unclosed.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@empty{} + +@else {} + +=====================================output===================================== +@empty {} + +@else {} + +================================================================================ +`; + +exports[`unknown-block.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@unknown (foo) { +} @unknown (foo) { +} + +=====================================output===================================== +@unknown (foo) {} +@unknown (foo) {} + +================================================================================ +`; + +exports[`with-comment.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    + + Not checked +
    + + + +@if (isChecked()) { + + Checked + + +} +@else { +Not checked +} + + +=====================================output===================================== +
    + + Not checked +
    + + +@if (isChecked()) { + + Checked + + +} + +@else { + Not checked +} + + +================================================================================ +`; diff --git a/tests/format/angular/control-flow/after-close-tag.html b/tests/format/angular/control-flow/after-close-tag.html new file mode 100644 index 000000000000..35dad3d61fc3 --- /dev/null +++ b/tests/format/angular/control-flow/after-close-tag.html @@ -0,0 +1,25 @@ + + @for (let item of items; index as i; trackBy: trackByFn) { + @if ( + areaId && + canTweet + ) { + + } + } + + + + + + + +@if ( + areaId && + canTweet + ) { + + } diff --git a/tests/format/angular/control-flow/chid.html b/tests/format/angular/control-flow/chid.html new file mode 100644 index 000000000000..89b3e2d5aa1d --- /dev/null +++ b/tests/format/angular/control-flow/chid.html @@ -0,0 +1,2 @@ +@if (test) {text} +
    @if (test) {text}
    diff --git a/tests/format/angular/control-flow/defer.html b/tests/format/angular/control-flow/defer.html new file mode 100644 index 000000000000..eabeceab1619 --- /dev/null +++ b/tests/format/angular/control-flow/defer.html @@ -0,0 +1,68 @@ +@defer (when isCheckedDefer()) { + +} +@placeholder { +Placeholder +} +@error { +Error +} +@loading(minimum 1s) { +Loading... +} + + +@defer (on interaction) { +Clicked +} +@placeholder { +Placeholder (click on it!) +} + + +@defer (on hover) { +Hovered +} +@placeholder { +Placeholder (hover it!) +} + + +@defer (on idle) { +Browser has reached an idle state +} +@placeholder { +Placeholder +} + + +@defer (on timer(5s)) { +Visible after 5s +} +@placeholder { +Placeholder +} + + +@defer (on viewport) { + +} +@placeholder { +Placeholder +} + + +@defer (on interaction; prefetch on hover) { + +} +@placeholder { +Placeholder (hover it, then click on it!) +} + + +@defer (on interaction; prefetch on hover) { + +} +@placeholder { +Placeholder (hover it, then click on it!) +} diff --git a/tests/format/angular/control-flow/element-tags.html b/tests/format/angular/control-flow/element-tags.html new file mode 100644 index 000000000000..4126bc853e9d --- /dev/null +++ b/tests/format/angular/control-flow/element-tags.html @@ -0,0 +1 @@ +@if (true) {} diff --git a/tests/format/angular/control-flow/embedded-language-formatting-off/__snapshots__/format.test.js.snap b/tests/format/angular/control-flow/embedded-language-formatting-off/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..06559da98b18 --- /dev/null +++ b/tests/format/angular/control-flow/embedded-language-formatting-off/__snapshots__/format.test.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`if.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if (should. not. format) { } +@else if (should. not. format) { } + +=====================================output===================================== +@if (should. not. format) { +} @else if (should. not. format) {} + +================================================================================ +`; diff --git a/tests/format/angular/control-flow/embedded-language-formatting-off/format.test.js b/tests/format/angular/control-flow/embedded-language-formatting-off/format.test.js new file mode 100644 index 000000000000..4b1453b04ca7 --- /dev/null +++ b/tests/format/angular/control-flow/embedded-language-formatting-off/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/angular/control-flow/embedded-language-formatting-off/if.html b/tests/format/angular/control-flow/embedded-language-formatting-off/if.html new file mode 100644 index 000000000000..c003dde3f8c2 --- /dev/null +++ b/tests/format/angular/control-flow/embedded-language-formatting-off/if.html @@ -0,0 +1,2 @@ +@if (should. not. format) { } +@else if (should. not. format) { } diff --git a/tests/format/angular/control-flow/for.html b/tests/format/angular/control-flow/for.html new file mode 100644 index 000000000000..62f7c1b590ef --- /dev/null +++ b/tests/format/angular/control-flow/for.html @@ -0,0 +1,66 @@ +
      +@for ( + let + + item of items;index as +i; + trackBy: trackByFn +) { +
    • {{item.name}}
    • +} +@empty { +The collection is empty +} +
    + + +
  • + + + +
      +@for (item of collection; track item.id; let index = $index, first = $first; let last = $last, even = $even, odd = $odd; let count = $count) { + +
    • {{item.name}} index={{index}} first={{first}} last={{last}} even={{even}} odd={{odd}} count={{count}}
    • + +} +
    + +
      +@for (item of + emptyCollection; track item.id;) { +
    • {{item.name}}
    • +} +@empty { + The collection is empty +} +
    +
  • + +
    + @for ( item of items; track item){ + } + +
    +
    + +
    + @for (item of items; let i = $index; track block) {} + +
    +
    + +
    + @for (item of items; let i = $index; let count = $count; track block) {} + +
    +
    diff --git a/tests/format/angular/control-flow/format.test.js b/tests/format/angular/control-flow/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/control-flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/control-flow/if.html b/tests/format/angular/control-flow/if.html new file mode 100644 index 000000000000..f3c09225fa9a --- /dev/null +++ b/tests/format/angular/control-flow/if.html @@ -0,0 +1,36 @@ +

    @if and @else

    +
    + +
    +
    +@if (isChecked()) { +Checked +} +@else { +Not checked +} +
    + +@if (users$ | async; as users) { {{ users.length }} } +@else if (users$ | async; as users) { {{ users.length }} } + +
    {{ users.length }}
    + +@else {} + + +@if (isDev) {} +@else if (test) {} + +@if (foo( "quotes")) {} +@else if (foo( 'quotes')) {} + +@if ( widthCategory !== undefined && widthCategory > +topStartToSideStartMaxSize) { + +} + +@if ( widthCategory; as item) { +} + +
    diff --git a/tests/format/angular/control-flow/ignore.html b/tests/format/angular/control-flow/ignore.html new file mode 100644 index 000000000000..f8612df35dc2 --- /dev/null +++ b/tests/format/angular/control-flow/ignore.html @@ -0,0 +1,15 @@ + +@if (condition) { + Foo +} @else { + Other +} + + +@if (condition) { + Foo +} + +@else { + Other +} diff --git a/tests/format/angular/control-flow/mix.html b/tests/format/angular/control-flow/mix.html new file mode 100644 index 000000000000..008dd7dffd3e --- /dev/null +++ b/tests/format/angular/control-flow/mix.html @@ -0,0 +1,10 @@ +@if (user.isHuman) { + +} @else if (user.isRobot) { + +@defer { + +} +} @else { +

    The profile is unknown!

    +} diff --git a/tests/format/angular/control-flow/small-print-width/__snapshots__/format.test.js.snap b/tests/format/angular/control-flow/small-print-width/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4997d47bae16 --- /dev/null +++ b/tests/format/angular/control-flow/small-print-width/__snapshots__/format.test.js.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.html - {"printWidth":20} format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 20 + | printWidth +=====================================input====================================== +@unknown (long expression;long expression;long expression;long expression;long expression;long expression;long expression;long expression;) { + +} + +=====================================output===================================== +@unknown ( + long expression; + long expression; + long expression; + long expression; + long expression; + long expression; + long expression; + long expression +) {} + +================================================================================ +`; diff --git a/tests/format/angular/control-flow/small-print-width/format.test.js b/tests/format/angular/control-flow/small-print-width/format.test.js new file mode 100644 index 000000000000..8ad20d2435f9 --- /dev/null +++ b/tests/format/angular/control-flow/small-print-width/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"], { printWidth: 20 }); diff --git a/tests/format/angular/control-flow/small-print-width/test.html b/tests/format/angular/control-flow/small-print-width/test.html new file mode 100644 index 000000000000..dffe53b37194 --- /dev/null +++ b/tests/format/angular/control-flow/small-print-width/test.html @@ -0,0 +1,3 @@ +@unknown (long expression;long expression;long expression;long expression;long expression;long expression;long expression;long expression;) { + +} diff --git a/tests/format/angular/control-flow/switch.html b/tests/format/angular/control-flow/switch.html new file mode 100644 index 000000000000..f3c2bcc3a339 --- /dev/null +++ b/tests/format/angular/control-flow/switch.html @@ -0,0 +1,21 @@ +@switch (radioValue()) { +@case (1) { +Case 1 +} +@case (2) { +Case 2 +} +@default { +Default case (Not 1 or 2) +} +} + + +@switch( + should +.be.formatted +) { + @case( + should +.be.formatted) {} +} diff --git a/tests/format/angular/control-flow/unclosed.html b/tests/format/angular/control-flow/unclosed.html new file mode 100644 index 000000000000..f25927cc8af3 --- /dev/null +++ b/tests/format/angular/control-flow/unclosed.html @@ -0,0 +1,3 @@ +@empty{} + +@else {} diff --git a/tests/format/angular/control-flow/unknown-block.html b/tests/format/angular/control-flow/unknown-block.html new file mode 100644 index 000000000000..23bdd997caf2 --- /dev/null +++ b/tests/format/angular/control-flow/unknown-block.html @@ -0,0 +1,3 @@ +@unknown (foo) { +} @unknown (foo) { +} diff --git a/tests/format/angular/control-flow/with-comment.html b/tests/format/angular/control-flow/with-comment.html new file mode 100644 index 000000000000..0085029f7442 --- /dev/null +++ b/tests/format/angular/control-flow/with-comment.html @@ -0,0 +1,17 @@ +
    + + Not checked +
    + + + +@if (isChecked()) { + + Checked + + +} +@else { +Not checked +} + diff --git a/tests/format/angular/icu-expression/__snapshots__/format.test.js.snap b/tests/format/angular/icu-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4e4c64665fc6 --- /dev/null +++ b/tests/format/angular/icu-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,226 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic-plural-01.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}} + +=====================================output===================================== +Updated + {minutes, plural, + =0 {just now} + =1 {one minute ago} + other {{{minutes}} minutes ago} + } + +================================================================================ +`; + +exports[`basic-plural-02.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ count, plural, + =0 {{ sex, select, + other {

    deeply nested

    } + }} + =other {a lot} +} + +{ count123, plural, + =0 {{ sex, select, + other {

    deeply nested

    } + }} + =other {a lot} +} + +=====================================output===================================== +{count, plural, =0 {{sex, select, other {

    deeply nested

    }}} =other {a lot}} + +{count123, plural, + =0 {{sex, select, other {

    deeply nested

    }}} + =other {a lot} +} + +================================================================================ +`; + +exports[`basic-plural-03.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + {VAR_PLURAL, plural, =0 {zero} =1 {un} =2 {deux} other {beaucoup} } + {VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {many} } + + +=====================================output===================================== + + {VAR_PLURAL, plural, + =0 {zero} + =1 {un} + =2 {deux} + other { + beaucoup + } + } + {VAR_PLURAL, plural, + =0 {zero} + =1 {one} + =2 {two} + other { + many + } + } + + +================================================================================ +`; + +exports[`basic-plural-04.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + {VAR_PLURAL, plural, =0 {Found no results} =1 {Found one result} other {Found results} } + + +=====================================output===================================== + + {VAR_PLURAL, plural, + =0 {Found no results} + =1 {Found one result} + other { + Found + + results + } + } + + +================================================================================ +`; + +exports[`basic-select-01.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +The author is {gender, select, male {male} female {female} other {other}} + +=====================================output===================================== +The author is + {gender, select, male {male} female {female} other {other}} + +================================================================================ +`; + +exports[`basic-select-02.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{gender, select, male {male} female {female} other {other}} +{age, select, 10 {ten} 20 {twenty} other {other}} + +=====================================output===================================== +{gender, select, + male {male} + female {female} + other {other} +} +{age, select, 10 {ten} 20 {twenty} other {other}} + +================================================================================ +`; + +exports[`combination-01.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +Updated: {minutes, plural, + =0 {just now} + =1 {one minute ago} + other {{{minutes}} minutes ago by {gender, select, male {male} female {female} other {other}}}} + + +=====================================output===================================== +Updated: + {minutes, plural, + =0 {just now} + =1 {one minute ago} + other { + {{minutes}} minutes ago by + {gender, select, male {male} female {female} other {other}} + } + } + + +================================================================================ +`; + +exports[`issue-16914.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } +} + +=====================================output===================================== +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } +} + +================================================================================ +`; diff --git a/tests/format/angular/icu-expression/basic-plural-01.html b/tests/format/angular/icu-expression/basic-plural-01.html new file mode 100644 index 000000000000..ed160952ebcf --- /dev/null +++ b/tests/format/angular/icu-expression/basic-plural-01.html @@ -0,0 +1 @@ +Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}} diff --git a/tests/format/angular/icu-expression/basic-plural-02.html b/tests/format/angular/icu-expression/basic-plural-02.html new file mode 100644 index 000000000000..ce3d949adaff --- /dev/null +++ b/tests/format/angular/icu-expression/basic-plural-02.html @@ -0,0 +1,13 @@ +{ count, plural, + =0 {{ sex, select, + other {

    deeply nested

    } + }} + =other {a lot} +} + +{ count123, plural, + =0 {{ sex, select, + other {

    deeply nested

    } + }} + =other {a lot} +} diff --git a/tests/format/angular/icu-expression/basic-plural-03.html b/tests/format/angular/icu-expression/basic-plural-03.html new file mode 100644 index 000000000000..fc51a7647a1d --- /dev/null +++ b/tests/format/angular/icu-expression/basic-plural-03.html @@ -0,0 +1,4 @@ + + {VAR_PLURAL, plural, =0 {zero} =1 {un} =2 {deux} other {beaucoup} } + {VAR_PLURAL, plural, =0 {zero} =1 {one} =2 {two} other {many} } + diff --git a/tests/format/angular/icu-expression/basic-plural-04.html b/tests/format/angular/icu-expression/basic-plural-04.html new file mode 100644 index 000000000000..e62fe881681b --- /dev/null +++ b/tests/format/angular/icu-expression/basic-plural-04.html @@ -0,0 +1,3 @@ + + {VAR_PLURAL, plural, =0 {Found no results} =1 {Found one result} other {Found results} } + diff --git a/tests/format/angular/icu-expression/basic-select-01.html b/tests/format/angular/icu-expression/basic-select-01.html new file mode 100644 index 000000000000..1fb55daba675 --- /dev/null +++ b/tests/format/angular/icu-expression/basic-select-01.html @@ -0,0 +1 @@ +The author is {gender, select, male {male} female {female} other {other}} diff --git a/tests/format/angular/icu-expression/basic-select-02.html b/tests/format/angular/icu-expression/basic-select-02.html new file mode 100644 index 000000000000..55000e8c042f --- /dev/null +++ b/tests/format/angular/icu-expression/basic-select-02.html @@ -0,0 +1,2 @@ +{gender, select, male {male} female {female} other {other}} +{age, select, 10 {ten} 20 {twenty} other {other}} diff --git a/tests/format/angular/icu-expression/combination-01.html b/tests/format/angular/icu-expression/combination-01.html new file mode 100644 index 000000000000..088a8ac1bd40 --- /dev/null +++ b/tests/format/angular/icu-expression/combination-01.html @@ -0,0 +1,5 @@ +Updated: {minutes, plural, + =0 {just now} + =1 {one minute ago} + other {{{minutes}} minutes ago by {gender, select, male {male} female {female} other {other}}}} + diff --git a/tests/format/angular/icu-expression/format.test.js b/tests/format/angular/icu-expression/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/icu-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/icu-expression/issue-16914.html b/tests/format/angular/icu-expression/issue-16914.html new file mode 100644 index 000000000000..5a5020f18e84 --- /dev/null +++ b/tests/format/angular/icu-expression/issue-16914.html @@ -0,0 +1,8 @@ +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } +} diff --git a/tests/format/angular/interpolation/__snapshots__/format.test.js.snap b/tests/format/angular/interpolation/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bcfde61ef5bf --- /dev/null +++ b/tests/format/angular/interpolation/__snapshots__/format.test.js.snap @@ -0,0 +1,135 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`computed-optional-member-expression.ng - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + a?.[0] +] + +=====================================output===================================== +[a?.[0]] +================================================================================ +`; + +exports[`logical-expression.ng - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1, + (x && y) ?? z +] + +=====================================output===================================== +[ + advancedSearchService.patientInformationFieldsRow2 && + advancedSearchService.patientInformationFieldsRow2.indexOf( + advancedSearchService.formElementData.customFieldList[i].customFieldType + ) !== -1, + (x && y) ?? z +] +================================================================================ +`; + +exports[`optional-chaining.ng - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ a?.b[c], (a?.b)[c] ] + +=====================================output===================================== +[a?.b[c], (a?.b)[c]] +================================================================================ +`; + +exports[`pipe-expression.ng - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + a ? (b | c : d) : (e | f : g), + a | b | c | d, + ((a | b) | c) | d, + a | b:(c | d), + { a: b | c }, + (a + b) | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe:'arg1':'arg2':'arg3', + value + | pipeA: { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection) +] + +=====================================output===================================== +[ + a ? (b | c: d) : (e | f: g), + a | b | c | d, + a | b | c | d, + a | b: (c | d), + { a: b | c }, + a + b | c, + (a | b) + c, + fn(a | b), + a?.b(c | d), + a[b | c], + ($students | async).items, + ($students | async)(), + myData | myPipe: "arg1" : "arg2" : "arg3", + value + | pipeA + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + : { + keyA: reallySuperLongValue, + keyB: shortValue | pipeB | pipeC: valueToPipeC + } + | aaa, + (hideLinqPanel + ? "ReportSelection.HideShowLabel_Show.String" + : "ReportSelection.HideShowLabel_Hide.String" + ) | localize: localizationSection +] +================================================================================ +`; + +exports[`pipe-in-object.ng - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["__ng_interpolation"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[{ AngularJS: '1.x', 'color': ('#222' | darken)}] + +=====================================output===================================== +[{ AngularJS: "1.x", color: ("#222" | darken) }] +================================================================================ +`; diff --git a/tests/format/angular/interpolation/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/interpolation/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index cca4d443794a..000000000000 --- a/tests/format/angular/interpolation/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`logical-expression.ng - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["__ng_interpolation"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -[ - advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1 -] - -=====================================output===================================== -[ - advancedSearchService.patientInformationFieldsRow2 && - advancedSearchService.patientInformationFieldsRow2.indexOf( - advancedSearchService.formElementData.customFieldList[i].customFieldType - ) !== -1 -] -================================================================================ -`; - -exports[`optional-chaining.ng - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["__ng_interpolation"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -[ a?.b[c], (a?.b)[c] ] - -=====================================output===================================== -[a?.b[c], (a?.b)[c]] -================================================================================ -`; - -exports[`pipe-expression.ng - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["__ng_interpolation"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -[ - a ? (b | c : d) : (e | f : g), - a | b | c | d, - ((a | b) | c) | d, - a | b:(c | d), - { a: b | c }, - (a + b) | c, - (a | b) + c, - fn(a | b), - a?.b(c | d), - a[b | c], - ($students | async).items, - ($students | async)(), - myData | myPipe:'arg1':'arg2':'arg3', - value - | pipeA: { - keyA: reallySuperLongValue, - keyB: shortValue | pipeB | pipeC: valueToPipeC - } : { - keyA: reallySuperLongValue, - keyB: shortValue | pipeB | pipeC: valueToPipeC - } - | aaa, - (hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection) -] - -=====================================output===================================== -[ - a ? (b | c : d) : (e | f : g), - a | b | c | d, - a | b | c | d, - a | b : (c | d), - { a: b | c }, - a + b | c, - (a | b) + c, - fn(a | b), - a?.b(c | d), - a[b | c], - ($students | async).items, - ($students | async)(), - myData | myPipe : "arg1" : "arg2" : "arg3", - value - | pipeA - : { - keyA: reallySuperLongValue, - keyB: shortValue | pipeB | pipeC : valueToPipeC - } - : { - keyA: reallySuperLongValue, - keyB: shortValue | pipeB | pipeC : valueToPipeC - } - | aaa, - (hideLinqPanel - ? "ReportSelection.HideShowLabel_Show.String" - : "ReportSelection.HideShowLabel_Hide.String" - ) | localize : localizationSection -] -================================================================================ -`; - -exports[`pipe-in-object.ng - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["__ng_interpolation"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -[{ AngularJS: '1.x', 'color': ('#222' | darken)}] - -=====================================output===================================== -[{ AngularJS: "1.x", color: ("#222" | darken) }] -================================================================================ -`; diff --git a/tests/format/angular/interpolation/computed-optional-member-expression.ng b/tests/format/angular/interpolation/computed-optional-member-expression.ng new file mode 100644 index 000000000000..b0c955e71d4a --- /dev/null +++ b/tests/format/angular/interpolation/computed-optional-member-expression.ng @@ -0,0 +1,3 @@ +[ + a?.[0] +] diff --git a/tests/format/angular/interpolation/format.test.js b/tests/format/angular/interpolation/format.test.js new file mode 100644 index 000000000000..13c336074633 --- /dev/null +++ b/tests/format/angular/interpolation/format.test.js @@ -0,0 +1,2 @@ +// We always pass {trailingComma: "none"} when printing +runFormatTest(import.meta, ["__ng_interpolation"], { trailingComma: "none" }); diff --git a/tests/format/angular/interpolation/html/17428.html b/tests/format/angular/interpolation/html/17428.html new file mode 100644 index 000000000000..13d079f76fcd --- /dev/null +++ b/tests/format/angular/interpolation/html/17428.html @@ -0,0 +1 @@ +(there is no {{`${activityType === '' ? 'activity' : ''}${activityType === '' && costCenter === '' ? ' or ' : ''}${costCenter === '' ? 'cost center' : ''}`}}) diff --git a/tests/format/angular/interpolation/html/__snapshots__/format.test.js.snap b/tests/format/angular/interpolation/html/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e1c361775328 --- /dev/null +++ b/tests/format/angular/interpolation/html/__snapshots__/format.test.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`17428.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +(there is no {{\`\${activityType === '' ? 'activity' : ''}\${activityType === '' && costCenter === '' ? ' or ' : ''}\${costCenter === '' ? 'cost center' : ''}\`}}) + +=====================================output===================================== +(there is no +{{ + \`\${activityType === "" ? "activity" : ""}\${activityType === "" && costCenter === "" ? " or " : ""}\${costCenter === "" ? "cost center" : ""}\` +}}) + +================================================================================ +`; diff --git a/tests/format/angular/interpolation/html/format.test.js b/tests/format/angular/interpolation/html/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/interpolation/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/interpolation/jsfmt.spec.js b/tests/format/angular/interpolation/jsfmt.spec.js deleted file mode 100644 index a71bd7c5995d..000000000000 --- a/tests/format/angular/interpolation/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -// We always pass {trailingComma: "none"} when printing -run_spec(__dirname, ["__ng_interpolation"], { trailingComma: "none" }); diff --git a/tests/format/angular/interpolation/logical-expression.ng b/tests/format/angular/interpolation/logical-expression.ng index fc56a8e99723..b079c11058c0 100644 --- a/tests/format/angular/interpolation/logical-expression.ng +++ b/tests/format/angular/interpolation/logical-expression.ng @@ -1,3 +1,4 @@ [ - advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1 + advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1, + (x && y) ?? z ] diff --git a/tests/format/angular/let-declaration/__snapshots__/format.test.js.snap b/tests/format/angular/let-declaration/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b57cd22a656f --- /dev/null +++ b/tests/format/angular/let-declaration/__snapshots__/format.test.js.snap @@ -0,0 +1,280 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic-01.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@let name = 'Frodo'; +

    Dashboard for {{name}}

    +Hello, {{name}} + +=====================================output===================================== +@let name = "Frodo"; +

    Dashboard for {{ name }}

    +Hello, {{ name }} + +================================================================================ +`; + +exports[`basic-02.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +@let greeting = 'Hello ' + name.value; + +@let user = user$ | async; + +=====================================output===================================== + + +@let greeting = "Hello " + name.value; + +@let user = user$ | async; + +================================================================================ +`; + +exports[`basic-03.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@let topLevel = value; + +@if (condition) { + @let nested = value; +} + +
    + @let nestedNgIf = value; +
    + +{{topLevel}} + +{{nested}} + +{{nestedNgIf}} + +=====================================output===================================== +@let topLevel = value; + +@if (condition) { + @let nested = value; +} + +
    + @let nestedNgIf = value; +
    + +{{ topLevel }} + +{{ nested }} + +{{ nestedNgIf }} + +================================================================================ +`; + +exports[`complex.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@let foo = a | b : c:d :e; +@let foo = a | pipe; +@let foo = 0 - 1; +@let foo = - 1; +@let foo = a ? 1 : 2; +@let foo = a ( 1 ) ( 2 ); +@let foo = a [ b ]; +@let foo = [ 1 ]; +@let foo = { 'a' : 1 }; +@let foo = { a : 1 }; +@let foo = true; +@let foo = undefined; +@let foo = null; +@let foo = ( 1 ); +@let foo = 1; +@let foo = 'hello'; +@let foo = a ( 1 , 2 ); +@let foo = a . b ( 1 , 2 ); +@let foo = x !; +@let foo = ! x; +@let foo = ( ( a ) ); +@let foo = a; +@let foo = a; // hello +@let foo = a . b; +@let foo = a ?. b ( ); +@let foo = a ?. b; +@let foo = a; // hello +@let foo = "SearchSelection.transmissionLayoutRadioButton" | localize:localizationSection; +@let foo = copyTypes[options.copyType]; +@let foo = listRow.NextScheduledSendStatus == 1 || listRow.NextScheduledSendStatus == 2 || listRow.NextScheduledSendStatus == 3; +@let foo = a; +@let foo = b; +@let foo = aNormalValue | aPipe; +@let foo = aReallyReallySuperLongValue | andASuperLongPipeJustToBreakThis; +@let foo = 'delete' | translate: {what: ('entities' | translate: {count: array.length})}; +@let foo = {a:1+{} }; +@let foo = {a:a==={} }; +@let foo = {a:!{} }; +@let foo = {a:a?b:{} }; + +=====================================output===================================== +@let foo = a | b: c : d : e; +@let foo = a | pipe; +@let foo = 0 - 1; +@let foo = -1; +@let foo = a ? 1 : 2; +@let foo = a(1)(2); +@let foo = a[b]; +@let foo = [1]; +@let foo = { a: 1 }; +@let foo = { a: 1 }; +@let foo = true; +@let foo = undefined; +@let foo = null; +@let foo = 1; +@let foo = 1; +@let foo = "hello"; +@let foo = a(1, 2); +@let foo = a.b(1, 2); +@let foo = x!; +@let foo = !x; +@let foo = a; +@let foo = a; +@let foo = a; // hello +@let foo = a.b; +@let foo = a?.b(); +@let foo = a?.b; +@let foo = a; // hello +@let foo = + "SearchSelection.transmissionLayoutRadioButton" + | localize: localizationSection; +@let foo = copyTypes[options.copyType]; +@let foo = + listRow.NextScheduledSendStatus == 1 || + listRow.NextScheduledSendStatus == 2 || + listRow.NextScheduledSendStatus == 3; +@let foo = a; +@let foo = b; +@let foo = aNormalValue | aPipe; +@let foo = aReallyReallySuperLongValue | andASuperLongPipeJustToBreakThis; +@let foo = + "delete" + | translate: { what: ("entities" | translate: { count: array.length }) }; +@let foo = { a: 1 + {} }; +@let foo = { a: a === {} }; +@let foo = { a: !{} }; +@let foo = { a: a ? b : {} }; + +================================================================================ +`; + +exports[`valid-from-tokenizer-test.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +@let foo = 123 + 456; + +@let foo = 123 + 456; +@let foo=123 + 456; +@let foo =123 + 456; +@let foo= 123 + 456; + +@let +foo = 123; +@let +foo = 123; +@let + foo = 123; +@let foo += 123; +@let foo + = 123; +@let foo + = 123; +@let + foo + = 123; + +@let foo = +123 + + 456 + + 789 + ; + +@block {@let foo = 123 + 456;} + +@let foo = 'a; b'; +@let foo = "';'"; + +@let foo = '\\';\\'' + "\\","; + +@let foo = fn(a, b) + fn2(c, d, e); + +@let foo = [1, 2, 3]; + +@let foo = [0, [foo[1]], 3]; + +@let foo = {a: 1, b: {c: something + 2}}; +@let foo = {}; +@let foo = {foo: ";"}; + +@let foo = fn({a: 1, b: [otherFn([{c: ";"}], 321, {d: [',']})]}); + +=====================================output===================================== + + +@let foo = 123 + 456; + +@let foo = 123 + 456; +@let foo = 123 + 456; +@let foo = 123 + 456; +@let foo = 123 + 456; + +@let foo = 123; +@let foo = 123; +@let foo = 123; +@let foo = 123; +@let foo = 123; +@let foo = 123; +@let foo = 123; + +@let foo = 123 + 456 + 789; + +@block { + @let foo = 123 + 456; +} + +@let foo = "a; b"; +@let foo = "';'"; + +@let foo = "';'" + '",'; + +@let foo = fn(a, b) + fn2(c, d, e); + +@let foo = [1, 2, 3]; + +@let foo = [0, [foo[1]], 3]; + +@let foo = { a: 1, b: { c: something + 2 } }; +@let foo = {}; +@let foo = { foo: ";" }; + +@let foo = fn({ a: 1, b: [otherFn([{ c: ";" }], 321, { d: [","] })] }); + +================================================================================ +`; diff --git a/tests/format/angular/let-declaration/basic-01.html b/tests/format/angular/let-declaration/basic-01.html new file mode 100644 index 000000000000..fda2d91866a1 --- /dev/null +++ b/tests/format/angular/let-declaration/basic-01.html @@ -0,0 +1,3 @@ +@let name = 'Frodo'; +

    Dashboard for {{name}}

    +Hello, {{name}} diff --git a/tests/format/angular/let-declaration/basic-02.html b/tests/format/angular/let-declaration/basic-02.html new file mode 100644 index 000000000000..44aed5497d2d --- /dev/null +++ b/tests/format/angular/let-declaration/basic-02.html @@ -0,0 +1,5 @@ + + +@let greeting = 'Hello ' + name.value; + +@let user = user$ | async; diff --git a/tests/format/angular/let-declaration/basic-03.html b/tests/format/angular/let-declaration/basic-03.html new file mode 100644 index 000000000000..763884dedd12 --- /dev/null +++ b/tests/format/angular/let-declaration/basic-03.html @@ -0,0 +1,15 @@ +@let topLevel = value; + +@if (condition) { + @let nested = value; +} + +
    + @let nestedNgIf = value; +
    + +{{topLevel}} + +{{nested}} + +{{nestedNgIf}} diff --git a/tests/format/angular/let-declaration/complex.html b/tests/format/angular/let-declaration/complex.html new file mode 100644 index 000000000000..77b7bf62ff2c --- /dev/null +++ b/tests/format/angular/let-declaration/complex.html @@ -0,0 +1,39 @@ +@let foo = a | b : c:d :e; +@let foo = a | pipe; +@let foo = 0 - 1; +@let foo = - 1; +@let foo = a ? 1 : 2; +@let foo = a ( 1 ) ( 2 ); +@let foo = a [ b ]; +@let foo = [ 1 ]; +@let foo = { 'a' : 1 }; +@let foo = { a : 1 }; +@let foo = true; +@let foo = undefined; +@let foo = null; +@let foo = ( 1 ); +@let foo = 1; +@let foo = 'hello'; +@let foo = a ( 1 , 2 ); +@let foo = a . b ( 1 , 2 ); +@let foo = x !; +@let foo = ! x; +@let foo = ( ( a ) ); +@let foo = a; +@let foo = a; // hello +@let foo = a . b; +@let foo = a ?. b ( ); +@let foo = a ?. b; +@let foo = a; // hello +@let foo = "SearchSelection.transmissionLayoutRadioButton" | localize:localizationSection; +@let foo = copyTypes[options.copyType]; +@let foo = listRow.NextScheduledSendStatus == 1 || listRow.NextScheduledSendStatus == 2 || listRow.NextScheduledSendStatus == 3; +@let foo = a; +@let foo = b; +@let foo = aNormalValue | aPipe; +@let foo = aReallyReallySuperLongValue | andASuperLongPipeJustToBreakThis; +@let foo = 'delete' | translate: {what: ('entities' | translate: {count: array.length})}; +@let foo = {a:1+{} }; +@let foo = {a:a==={} }; +@let foo = {a:!{} }; +@let foo = {a:a?b:{} }; diff --git a/tests/format/angular/let-declaration/format.test.js b/tests/format/angular/let-declaration/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/let-declaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/let-declaration/minor-options/__snapshots__/format.test.js.snap b/tests/format/angular/let-declaration/minor-options/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..73d489e955cf --- /dev/null +++ b/tests/format/angular/let-declaration/minor-options/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +@let foo = 'Hello' + ', World'; +=====================================output===================================== +@let foo = 'Hello' + ', World'; + +================================================================================ +`; + +exports[`snippet: #0 - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +@let foo = 'Hello' + ', World'; +=====================================output===================================== +@let foo = "Hello" + ", World"; + +================================================================================ +`; diff --git a/tests/format/angular/let-declaration/minor-options/format.test.js b/tests/format/angular/let-declaration/minor-options/format.test.js new file mode 100644 index 000000000000..e5f35ba2cb13 --- /dev/null +++ b/tests/format/angular/let-declaration/minor-options/format.test.js @@ -0,0 +1,19 @@ +const snippets = ["@let foo = 'Hello' + ', World'; "]; + +runFormatTest( + { + importMeta: import.meta, + snippets, + }, + ["angular"], + { embeddedLanguageFormatting: "off" }, +); + +runFormatTest( + { + importMeta: import.meta, + snippets, + }, + ["angular"], + { semi: false }, +); diff --git a/tests/format/angular/let-declaration/valid-from-tokenizer-test.html b/tests/format/angular/let-declaration/valid-from-tokenizer-test.html new file mode 100644 index 000000000000..ab7211158f49 --- /dev/null +++ b/tests/format/angular/let-declaration/valid-from-tokenizer-test.html @@ -0,0 +1,49 @@ + + +@let foo = 123 + 456; + +@let foo = 123 + 456; +@let foo=123 + 456; +@let foo =123 + 456; +@let foo= 123 + 456; + +@let +foo = 123; +@let +foo = 123; +@let + foo = 123; +@let foo += 123; +@let foo + = 123; +@let foo + = 123; +@let + foo + = 123; + +@let foo = +123 + + 456 + + 789 + ; + +@block {@let foo = 123 + 456;} + +@let foo = 'a; b'; +@let foo = "';'"; + +@let foo = '\';\'' + "\","; + +@let foo = fn(a, b) + fn2(c, d, e); + +@let foo = [1, 2, 3]; + +@let foo = [0, [foo[1]], 3]; + +@let foo = {a: 1, b: {c: something + 2}}; +@let foo = {}; +@let foo = {foo: ";"}; + +@let foo = fn({a: 1, b: [otherFn([{c: ";"}], 321, {d: [',']})]}); diff --git a/tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/self-closing/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/angular/self-closing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/angular/self-closing/__snapshots__/format.test.js.snap diff --git a/tests/format/angular/self-closing/format.test.js b/tests/format/angular/self-closing/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/self-closing/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/self-closing/jsfmt.spec.js b/tests/format/angular/self-closing/jsfmt.spec.js deleted file mode 100644 index b802ad8670c5..000000000000 --- a/tests/format/angular/self-closing/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["angular"]); diff --git a/tests/format/angular/shorthand/__snapshots__/format.test.js.snap b/tests/format/angular/shorthand/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f28ab5fde3d4 --- /dev/null +++ b/tests/format/angular/shorthand/__snapshots__/format.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    + +=====================================output===================================== + +
    + +================================================================================ +`; diff --git a/tests/format/angular/shorthand/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/shorthand/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b3036f4c2a3e..000000000000 --- a/tests/format/angular/shorthand/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,15 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.html format 1`] = ` -====================================options===================================== -parsers: ["angular"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; diff --git a/tests/format/angular/shorthand/basic.html b/tests/format/angular/shorthand/basic.html index 7d7223d9bf74..89ebdbfa1e1d 100644 --- a/tests/format/angular/shorthand/basic.html +++ b/tests/format/angular/shorthand/basic.html @@ -1 +1,2 @@ +
    diff --git a/tests/format/angular/shorthand/format.test.js b/tests/format/angular/shorthand/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/shorthand/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/shorthand/jsfmt.spec.js b/tests/format/angular/shorthand/jsfmt.spec.js deleted file mode 100644 index b802ad8670c5..000000000000 --- a/tests/format/angular/shorthand/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["angular"]); diff --git a/tests/format/angular/template-literal/__snapshots__/format.test.js.snap b/tests/format/angular/template-literal/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3e65bd4d7512 --- /dev/null +++ b/tests/format/angular/template-literal/__snapshots__/format.test.js.snap @@ -0,0 +1,40 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`template-literal.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    +{{ +\` hello, \${ world } \` +}} + +{{ \`\` }} {{ ( ( \`a \${b} \\u0063 \`))}} +
    + + +=====================================output===================================== +
    + {{ \` hello, \${world} \` }} + + {{ \`\` }} {{ \`a \${b} \\u0063 \` }} +
    + +================================================================================ +`; diff --git a/tests/format/angular/template-literal/format.test.js b/tests/format/angular/template-literal/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/template-literal/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/template-literal/template-literal.html b/tests/format/angular/template-literal/template-literal.html new file mode 100644 index 000000000000..a7087ac79cab --- /dev/null +++ b/tests/format/angular/template-literal/template-literal.html @@ -0,0 +1,18 @@ +
    +{{ +` hello, ${ world } ` +}} + +{{ `` }} {{ ( ( `a ${b} \u0063 `))}} +
    + diff --git a/tests/format/angular/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/angular/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4f734d6a6f49 --- /dev/null +++ b/tests/format/angular/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,622 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`trailing-comma.html - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +
    + +=====================================output===================================== +
    + +================================================================================ +`; + +exports[`trailing-comma.html - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +
    + +=====================================output===================================== +
    + +================================================================================ +`; + +exports[`trailing-comma.html - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +
    + +=====================================output===================================== +
    + +================================================================================ +`; diff --git a/tests/format/angular/trailing-comma/format.test.js b/tests/format/angular/trailing-comma/format.test.js new file mode 100644 index 000000000000..08fb6de70833 --- /dev/null +++ b/tests/format/angular/trailing-comma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["angular"], { trailingComma: "none" }); +runFormatTest(import.meta, ["angular"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["angular"], { trailingComma: "all" }); diff --git a/tests/format/angular/trailing-comma/trailing-comma.html b/tests/format/angular/trailing-comma/trailing-comma.html new file mode 100644 index 000000000000..7e40dc499c6e --- /dev/null +++ b/tests/format/angular/trailing-comma/trailing-comma.html @@ -0,0 +1,56 @@ +
    diff --git a/tests/format/angular/typeof-expression/__snapshots__/format.test.js.snap b/tests/format/angular/typeof-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..82acc255be9a --- /dev/null +++ b/tests/format/angular/typeof-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,62 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`typeof-expression.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    + {{ typeof + x}} + {{ typeof + x === + 'object'}} + {{ + !(typeof + x === + 'object') + }} +
    + +=====================================output===================================== +
    + {{ typeof x }} + {{ typeof x === "object" }} + {{ !(typeof x === "object") }} +
    + +================================================================================ +`; diff --git a/tests/format/angular/typeof-expression/format.test.js b/tests/format/angular/typeof-expression/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/typeof-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/typeof-expression/typeof-expression.html b/tests/format/angular/typeof-expression/typeof-expression.html new file mode 100644 index 000000000000..04d9802611d6 --- /dev/null +++ b/tests/format/angular/typeof-expression/typeof-expression.html @@ -0,0 +1,36 @@ +
    + {{ typeof + x}} + {{ typeof + x === + 'object'}} + {{ + !(typeof + x === + 'object') + }} +
    diff --git a/tests/format/angular/upper-case/__snapshots__/format.test.js.snap b/tests/format/angular/upper-case/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d38ae505d36a --- /dev/null +++ b/tests/format/angular/upper-case/__snapshots__/format.test.js.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`upper-case-html-tag.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +=====================================output===================================== + + +================================================================================ +`; + +exports[`upper-case-html-tag-2.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + +=====================================output===================================== + + + + + +================================================================================ +`; diff --git a/tests/format/angular/upper-case/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/upper-case/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index abc502089690..000000000000 --- a/tests/format/angular/upper-case/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`upper-case-html-tag.html format 1`] = ` -====================================options===================================== -parsers: ["angular"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; - -exports[`upper-case-html-tag-2.html format 1`] = ` -====================================options===================================== -parsers: ["angular"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - -=====================================output===================================== - - - - - -================================================================================ -`; diff --git a/tests/format/angular/upper-case/format.test.js b/tests/format/angular/upper-case/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/upper-case/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/upper-case/jsfmt.spec.js b/tests/format/angular/upper-case/jsfmt.spec.js deleted file mode 100644 index b802ad8670c5..000000000000 --- a/tests/format/angular/upper-case/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["angular"]); diff --git a/tests/format/angular/v20-syntax/__snapshots__/format.test.js.snap b/tests/format/angular/v20-syntax/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2fbe21142b3b --- /dev/null +++ b/tests/format/angular/v20-syntax/__snapshots__/format.test.js.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`exponentiation-operators.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + (a) ** b +}} + +=====================================output===================================== +{{ a ** b }} + +================================================================================ +`; + +exports[`in-operators.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + + ( (a in (b))) +}} + +=====================================output===================================== +{{ a in b }} + +================================================================================ +`; + +exports[`tagged-template-literal.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + + ( (tag \` a \${ b } \\\\u0063 \`)) +}} + +=====================================output===================================== +{{ tag\` a \${b} \\\\u0063 \` }} + +================================================================================ +`; + +exports[`template-literal.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + + ( (\` a \${ b } \\\\u0063 \`)) +}} + +=====================================output===================================== +{{ \` a \${b} \\\\u0063 \` }} + +================================================================================ +`; + +exports[`void-operators.html format 1`] = ` +====================================options===================================== +parsers: ["angular"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + + void (1 +2) +}} + +=====================================output===================================== +{{ void (1 + 2) }} + +================================================================================ +`; diff --git a/tests/format/angular/v20-syntax/exponentiation-operators.html b/tests/format/angular/v20-syntax/exponentiation-operators.html new file mode 100644 index 000000000000..00d9bf01a778 --- /dev/null +++ b/tests/format/angular/v20-syntax/exponentiation-operators.html @@ -0,0 +1,3 @@ +{{ + (a) ** b +}} diff --git a/tests/format/angular/v20-syntax/format.test.js b/tests/format/angular/v20-syntax/format.test.js new file mode 100644 index 000000000000..8cbc48b1a555 --- /dev/null +++ b/tests/format/angular/v20-syntax/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["angular"]); diff --git a/tests/format/angular/v20-syntax/in-operators.html b/tests/format/angular/v20-syntax/in-operators.html new file mode 100644 index 000000000000..afa74ca691c4 --- /dev/null +++ b/tests/format/angular/v20-syntax/in-operators.html @@ -0,0 +1,4 @@ +{{ + + ( (a in (b))) +}} diff --git a/tests/format/angular/v20-syntax/tagged-template-literal.html b/tests/format/angular/v20-syntax/tagged-template-literal.html new file mode 100644 index 000000000000..28970416d5d3 --- /dev/null +++ b/tests/format/angular/v20-syntax/tagged-template-literal.html @@ -0,0 +1,4 @@ +{{ + + ( (tag ` a ${ b } \\u0063 `)) +}} diff --git a/tests/format/angular/v20-syntax/template-literal.html b/tests/format/angular/v20-syntax/template-literal.html new file mode 100644 index 000000000000..a18443e3143d --- /dev/null +++ b/tests/format/angular/v20-syntax/template-literal.html @@ -0,0 +1,4 @@ +{{ + + ( (` a ${ b } \\u0063 `)) +}} diff --git a/tests/format/angular/v20-syntax/void-operators.html b/tests/format/angular/v20-syntax/void-operators.html new file mode 100644 index 000000000000..a665e20499a8 --- /dev/null +++ b/tests/format/angular/v20-syntax/void-operators.html @@ -0,0 +1,4 @@ +{{ + + void (1 +2) +}} diff --git a/tests/format/css/atrule/__snapshots__/format.test.js.snap b/tests/format/css/atrule/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..dcd0c70d0526 --- /dev/null +++ b/tests/format/css/atrule/__snapshots__/format.test.js.snap @@ -0,0 +1,4857 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`at-root.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { +@at-root { +.child1 { +width: 100px; +} +.child2 { +width: 200px; +} +} +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent +{ +@at-root +{ +.child1 +{ +width +: +100px +; +} +.child2 +{ +width +: +200px +; +} +} +} +.parent + +{ + +@at-root + +{ + +.child1 + +{ + +width + +: + +100px + +; + +} +.child2 + +{ + +width + +: + +200px + +; + +} + +} + +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { +@at-root .child { +width: 100px; +} +} +.parent{ + @at-root .child{ + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent +{ +@at-root +.child +{ +width +: +100px +; +} +} +.parent + +{ + +@at-root + +.child + +{ + +width + +: + +100px + +; + +} + +} +.parent { +@at-root +input[ +type += +'radio' +] +{ +color +: +red +; +} +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { +.page { +width: 8in; + +@at-root (with: media) { +color: red; +} +} +} +@media print{ + .page{ + width: 8in; + + @at-root (with:media){ + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root ( with : media ) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root ( with : media ) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root + (with: media) { + color: red; + } + } +} +@media print +{ +.page +{ +width +: +8in +; +@at-root +( +with +: +media +) +{ +color +: +red +; +} +} +} +@media print + +{ + +.page + +{ + +width + +: + +8in + +; + +@at-root + +( + +with + +: + +media + +) + +{ + +color +: + +red + +; + +} + +} + +} +@media print { + .page { + width: 8in; + + @at-root (without: media) { + color: red; + } + } +} + +=====================================output===================================== +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root { + .child1 { + width: 100px; + } + .child2 { + width: 200px; + } + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root .child { + width: 100px; + } +} +.parent { + @at-root input[type="radio"] { + color: red; + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (with: media) { + color: red; + } + } +} +@media print { + .page { + width: 8in; + + @at-root (without: media) { + color: red; + } + } +} + +================================================================================ +`; + +exports[`charset.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@charset "UTF-8"; +@charset "iso-8859-15"; +@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */ +@charset "UTF-8"; /* Invalid, more than one space */ +@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */ +@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS */ + +=====================================output===================================== +@charset "UTF-8"; +@charset "iso-8859-15"; +@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */ +@charset "UTF-8"; /* Invalid, more than one space */ +@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */ +@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS */ + +================================================================================ +`; + +exports[`counter-style.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { +system: cyclic; +symbols: "\\1F44D"; +suffix: " "; +} +@counter-style identifier{ + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style +identifier +{ +system +: +cyclic +; +symbols +: +"\\1F44D" +; +suffix +: +" " +; +} + +@counter-style + +identifier + +{ + +system + +: + +cyclic + +; + +symbols + + +: + +"\\1F44D" + +; + +suffix + +: + +" " + +; + +} + +=====================================output===================================== +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} +@counter-style identifier { + system: cyclic; + symbols: "\\1F44D"; + suffix: " "; +} + +@counter-style identifier { + system: cyclic; + + symbols: "\\1F44D"; + + suffix: " "; +} + +================================================================================ +`; + +exports[`custom-media.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width:30em); +@custom-media --small-viewport ( max-width : 30em ) ; +@custom-media --small-viewport + (max-width: 30em); +@custom-media + --small-viewport + ( + max-width: 30em + ); +@custom-media +--small-viewport +( +max-width +: +30em +) +; +@custom-media + +--small-viewport + +( + +max-width + +: + +30em + +) + +; +@custom-media --none not all; +@custom-media --none not all ; +@custom-media --none + not all; +@custom-media --none + not + all; +@custom-media +--none +not +all +; +@custom-media + +--none + +not + +all + +; +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width:768px) and (max-width:1279px); +@custom-media --tablet ( min-width : 768px ) and ( max-width : 1279px ) ; +@custom-media --tablet + (min-width: 768px) and (max-width: 1279px); +@custom-media + --tablet + (min-width: 768px) and + (max-width: 1279px); +@custom-media +--tablet +( +min-width +: +768px +) +and +( +max-width +: +1279px +) +; +@custom-media + +--tablet + +( + +min-width + +: + +768px + +) + +and + +( + +max-width + +: + +1279px + +) + +; + +=====================================output===================================== +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --small-viewport (max-width: 30em); +@custom-media --none not all; +@custom-media --none not all; +@custom-media --none not all; +@custom-media --none not all; +@custom-media --none not all; +@custom-media --none not all; +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); +@custom-media --tablet (min-width: 768px) and (max-width: 1279px); + +================================================================================ +`; + +exports[`custom-selector.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1,h2,h3,h4,h5,h6; +@custom-selector :--heading h1 , h2 , h3 , h4 , h5 , h6 ; +@custom-selector :--heading + h1, h2, h3, h4, h5, h6; +@custom-selector + :--heading + h1, + h2, + h3, + h4, + h5, + h6; +@custom-selector +:--heading +h1 +, +h2 +, +h3 +, +h4 +, +h5 +, +h6 +; +@custom-selector + +:--heading + +h1 + +, + +h2 + +, + +h3 + +, + +h4 + +, + +h5 + +, + +h6 + +; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1, h2, h3, h4, h5, h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1 + h1, h2, h3, h4, h5, h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name .very-very-very-very-very-very-very-very-very-long-selector-name + very-very-very-very-very-very-very-very-very-long-selector-name-other, h2, h3, h4, h5, h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1 h1, h2, h3, h4, h5, h6; +@custom-selector :--heading .very-very-very-very-very-very-very-very-very-very-long-class-name, .very-very-very-very-very-very-very-very-very-very-long-class-name-other; +@custom-selector :--enter :hover, :focus; +@custom-selector :--visible :global.visible; +@custom-selector :--icon i[class^='icon-'], i[class*=' icon-']; +@custom-selector :--placeholder :placehoder-shown, ::-webkit-input-placeholder, ::-moz-placeholder, :-ms-input-placeholder; +@custom-selector :--enter :matches(:hover, :focus, :active); + +=====================================output===================================== +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--heading h1, h2, h3, h4, h5, h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name + h1, + h2, + h3, + h4, + h5, + h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name + h1 + h1, + h2, + h3, + h4, + h5, + h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name + .very-very-very-very-very-very-very-very-very-long-selector-name + + very-very-very-very-very-very-very-very-very-long-selector-name-other, + h2, + h3, + h4, + h5, + h6; +@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name + h1 h1, + h2, + h3, + h4, + h5, + h6; +@custom-selector :--heading + .very-very-very-very-very-very-very-very-very-very-long-class-name, + .very-very-very-very-very-very-very-very-very-very-long-class-name-other; +@custom-selector :--enter :hover, :focus; +@custom-selector :--visible :global.visible; +@custom-selector :--icon i[class^="icon-"], i[class*=" icon-"]; +@custom-selector :--placeholder + :placehoder-shown, + ::-webkit-input-placeholder, + ::-moz-placeholder, + :-ms-input-placeholder; +@custom-selector :--enter :matches(:hover, :focus, :active); + +================================================================================ +`; + +exports[`debug.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@debug 10em + 12em; +@debug 10em+12em; +@debug 10em + 12em ; +@debug 10em + + + 12em + ; +@debug +10em ++ +12em +; +@debug + +10em + ++ + +12em + +; +@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var; + +=====================================output===================================== +@debug 10em + 12em; +@debug 10em+12em; +@debug 10em + 12em; +@debug 10em + 12em; +@debug 10em + 12em; +@debug 10em + 12em; +@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var; + +================================================================================ +`; + +exports[`each.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@each $animal in puma, sea-slug, egret, salamander {} +@each $animal in puma,sea-slug,egret,salamander{} +@each $animal in puma , sea-slug , egret , salamander {} +@each $animal in + puma, sea-slug, egret, salamander {} +@each + $animal + in + puma + , + sea-slug + , + egret + , + salamander + { + } +@each +$animal +in +puma +, +sea-slug +, +egret +, +salamander +{ +} +@each + +$animal + +in + +puma + +, + +sea-slug + +, + +egret + +, + +salamander + +{ + +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) {} +@each $animal in((puma),(sea-slug),(egret),(salamander)){} +@each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) {} +@each $animal + in ((puma), (sea-slug), (egret), (salamander)) {} +@each + $animal + in ( + (puma), + (sea-slug), + (egret), + (salamander) + ) { } +@each + $animal + in + ( + ( + puma + ) + , + ( + sea-slug + ) + , + ( + egret + ) + , + ( + salamander + ) + ) + { + } +@each + + $animal + + in + + ( + + ( + + puma + + ) + + , + + ( + + sea-slug + + ) + + , + + ( + + egret + + ) + + , + + ( + + salamander + + ) + + ) + + { + + } +@each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $animal,$color,$cursor in (puma,black,default),(sea-slug,blue,pointer),(egret,white,move){} +@each $animal, $color, $cursor in + (puma, black, default), + (sea-slug, blue, pointer), + (egret, white, move) {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var in puma, sea-slug, egret, salamander {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each $element,$size in(h1:20px,h2:16px,h3:14px){} +@each $element , $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) {} +@each $element, + $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each + $element, + $size + in + ( + h1 + : + 20px + , + h2 + : + 16px + , + h3 + : + 14px + ) + { + } +@each +$element, +$size +in +( +h1 +: +20px +, +h2 +: +16px +, +h3 +: +14px +) +{ +} +@each +$element, + +$size + +in + +( + +h1 + +: + +20px + +, + +h2 + +: + +16px + +, + +h3 + +: + +14px + +) + +{ + +} + +=====================================output===================================== +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) { +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) { +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) { +} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + in puma, + sea-slug, egret, salamander { +} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in(h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, + $size in + ( + h1: 20px, + + h2: 16px, + + h3: 14px + ) { +} + +================================================================================ +`; + +exports[`extend.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.master { + color: black; + font-size: 12px; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { +@extend .master; +font-weight: bold; +} +.emphasis { + @extend .master ; + font-weight: bold; +} +.emphasis { + @extend .master ; + font-weight: bold; +} +.emphasis +{ +@extend +.master +; +font-weight +: +bold +; +} +.emphasis + +{ + +@extend + +.master + +; + +font-weight + +: + +bold + +; + +} +%message-shared { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} +.message { + @extend %message-shared; +} +.message { +@extend %message-shared; +} +.message { + @extend %message-shared ; +} +.message { + @extend %message-shared ; +} +.message { +@extend +%message-shared; +} +.message { + +@extend + +%message-shared; + +} +a.important { + @extend .notice !optional; +} +a.important { +@extend .notice !optional; +} +a.important { + @extend .notice !optional ; +} +a.important { + @extend .notice !optional ; +} +a.important +{ +@extend +.notice +!optional +; +} +a.important + +{ + +@extend + +.notice + +!optional + +; + +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message , .important ; +} +.message-error { + @extend .message , .important ; +} +.message-error { + @extend .message, + .important; +} +.message-error { + @extend + .message, + .important; +} +.message-error +{ +@extend +.message +, +.important +; +} +.message-error + +{ + +@extend + +.message + +, + +.important; + +} +.message-error { + @extend .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector, .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector; +} + +=====================================output===================================== +.master { + color: black; + font-size: 12px; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { + @extend .master; + font-weight: bold; +} +.emphasis { + @extend .master; + + font-weight: bold; +} +%message-shared { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} +.message { + @extend %message-shared; +} +.message { + @extend %message-shared; +} +.message { + @extend %message-shared; +} +.message { + @extend %message-shared; +} +.message { + @extend %message-shared; +} +.message { + @extend %message-shared; +} +a.important { + @extend .notice !optional; +} +a.important { + @extend .notice !optional; +} +a.important { + @extend .notice !optional; +} +a.important { + @extend .notice !optional; +} +a.important { + @extend .notice !optional; +} +a.important { + @extend .notice !optional; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .message, .important; +} +.message-error { + @extend .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector, + .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector; +} + +================================================================================ +`; + +exports[`font-face.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@font-face { + font-family: "Open Sans"; + src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { +font-family: "Open Sans"; +src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), +url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face{ + font-family: "Open Sans"; + src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face +{ +font-family +: +"Open Sans" +; +src +: +url( +"/fonts/OpenSans-Regular-webfont.woff2" +) +format( +"woff2" +) +, +url( +"/fonts/OpenSans-Regular-webfont.woff" +) +format( +"woff" +) +; +} +@font-face + +{ + +font-family + +: + +"Open Sans" + +; + +src + +: + +url( + +"/fonts/OpenSans-Regular-webfont.woff2" + +) + +format( + +"woff2" + +) + +, + +url( + +"/fonts/OpenSans-Regular-webfont.woff" + +) + +format( + + +"woff" + +) + +; + +} + +=====================================output===================================== +@font-face { + font-family: "Open Sans"; + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} +@font-face { + font-family: "Open Sans"; + + src: + url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), + url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); +} + +================================================================================ +`; + +exports[`font-feature-values.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values Font One { +@styleset { +nice-style: 12; +} +} +@font-feature-values Font One{ + @styleset{ + nice-style: 12; + } +} +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values +Font One +{ +@styleset +{ +nice-style +: +12 +; +} +} + +@font-feature-values + +Font One + +{ + +@styleset +{ + +nice-style + +: + +12 + +; + +} + +} + +=====================================output===================================== +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +================================================================================ +`; + +exports[`for.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@for $i from 1 through 8 {} +@for $i from 1 through 8{} +@for $i from 1 through 8 {} +@for $i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for + +$i + +from + +1 + +through + +8 + +{} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from 1 through 5 {} +@for $i from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through 5 {} +@for $i from 1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($var1 + $var1) through ($var-2 + $var-2) {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1) through ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2) {} + +=====================================output===================================== +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from 1 through 5 { +} +@for $i from + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + through 5 { +} +@for $i from 1 through + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + through + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + end + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from ($var1 + $var1) through ($var-2 + $var-2) { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from + ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + ) + through + ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + ) { +} + +================================================================================ +`; + +exports[`function.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg,$arg1,$arg2:10,$args...){ + @return "Func"; +} +@function func ( $arg , $arg1 , $arg2 : 10 , $args ... ) { + @return "Func"; +} +@function func ( $arg , $arg1 , $arg2 : 10 , $args ... ) { + @return "Func"; +} +@function func( + $arg, + $arg1, + $arg2: 10, + $args... +) { + @return "Func"; +} +@function + func( + $arg, + $arg1, + $arg2: 10, + $args... + ) { + @return "Func"; +} +@function +func +( +$arg +, +$arg1 +, +$arg2 +: +10 +, +$args +... +) +{ +@return +"Func" +; +} +@function + +func + +( + +$arg + +, + +$arg1 + +, + +$arg2 + +: + +10 + +, + +$args + +... + +) + +{ + +@return + +"Func" + +; + +} +@function func($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args...) { + @return "Func"; +} + +=====================================output===================================== +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func($arg, $arg1, $arg2: 10, $args...) { + @return "Func"; +} +@function func( + $arg, + $arg1, + $arg2: 10, + + $args... +) { + @return "Func"; +} +@function func( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args... +) { + @return "Func"; +} + +================================================================================ +`; + +exports[`if-else.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if $media == phonePortrait { + $k: .15625; +} @else if $media == phoneLandscape { + $k: .08803; +} @else if $media == tabletPortrait { + $k: .065106; +} +p { + @if $type == ocean {} + @if $type==ocean{} + @if $type == ocean {} + @if $type + == ocean {} + @if + $type + == + ocean + { + } + @if + + $type + + == + + ocean + + { + + } + @if (($type) == (ocean)) {} + @if (($type)==(ocean)){} + @if ( ( $type ) == ( ocean ) ) {} + @if (($type) + == (ocean)) {} + @if + ( + ( + $type + ) + == + ( + ocean + ) + ) + { + } + @if + + ( + + ( + + $type + + ) + + == + + ( + + ocean + + ) + + ) + + { + + } + @if $type == ocean { + color: blue; + } @else if $type == matador { + color: red; + } @else if $type == monster { + color: green; + } @else { + color: black; + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type==ocean{}@else if $type==matador{} + @if $type == ocean { } @else if $type == matador { } + @if $type == ocean {} + @else if $type == matador {} + @if + $type == ocean {} + @else if + $type == matador {} + @if + $type + == + ocean + { + } + @else + if + $type + == + matador + { + } + @if + + $type + + == + + ocean + + { + + } + + @else + + if + + $type + + == + + matador + + { + + } + @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: blue; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: red; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: green; + } @else { + color: black; + } + @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 and $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 {} + @if $base-font-size != 16px or $base-line-height != 24px or $base-unit != 'em' or $h1-font-size != 2 * $base-font-size or $h2-font-size != 1.5 * $base-font-size or $h3-font-size != 1.17 * $base-font-size or $h4-font-size != 1 * $base-font-size or $h5-font-size != 0.83 * $base-font-size or $h6-font-size != 0.67 * $base-font-size or $indent-amount != 40px {} + @if (str-slice($item, 0, 1) == ":") {} + @if (str-slice($item, 0, 3) == " : ") {} + @if ($type == ocean) {} @else if ($type == matador) {} @else {} +} + +=====================================output===================================== +@if $media == phonePortrait { + $k: 0.15625; +} @else if $media == phoneLandscape { + $k: 0.08803; +} @else if $media == tabletPortrait { + $k: 0.065106; +} +p { + @if $type == ocean { + } + @if $type==ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if (($type) == (ocean)) { + } + @if (($type) ==(ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if $type == ocean { + color: blue; + } @else if $type == matador { + color: red; + } @else if $type == monster { + color: green; + } @else { + color: black; + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type==ocean { + } @else if $type==matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: blue; + } @else if + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: red; + } @else if + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: green; + } @else { + color: black; + } + @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 { + } + @if $very-very-very-very-very-very-long-var == 0 and $very-very-very-long-var + == 0 { + } + @if $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 and + $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 { + } + @if $base-font-size != 16px or $base-line-height != 24px or $base-unit != "em" + or $h1-font-size != 2 * $base-font-size or $h2-font-size != 1.5 * + $base-font-size or $h3-font-size != 1.17 * $base-font-size or $h4-font-size + != 1 * $base-font-size or $h5-font-size != 0.83 * $base-font-size or + $h6-font-size != 0.67 * $base-font-size or $indent-amount != 40px { + } + @if (str-slice($item, 0, 1) == ":") { + } + @if (str-slice($item, 0, 3) == " : ") { + } + @if ($type == ocean) { + } @else if ($type == matador) { + } @else { + } +} + +================================================================================ +`; + +exports[`import.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@import url("fineprint.css") print; +@import url("bluish.css") projection, tv; +@import 'custom.css'; +@import url("chrome://communicator/skin/"); +@import "common.css" screen, projection; +@import "common.css" screen projection; +@import url('landscape.css') screen and (orientation:landscape); + +@import (multiple) "foo.less"; + +/* This isn't valid CSS, SCSS or Less, but we should be lenient and make sure +/* that nothing is lost when printing. */ +@import "one" two "three"; + +#main { + @import "example"; +} +#main { +@import "example"; +} +#main { + @import "example" ; +} +#main { + @import "example" ; +} +#main { + @import + "example"; +} +#main +{ +@import +"example"; +} +#main + +{ + +@import + +"example"; + +} + +@import "test.less" {} +@import "test.less" { + a: b; + c: d; +} + +@import url('foo'); +$dir: 'fonts'; + +@import url("foo.css"); +@import url('foo.css'); +@import url("foo.css"); +@import url("foo.css"); +@import url("fineprint.css")print; +@import url("fineprint.css") print; +@import url("fineprint.css") print; +@import url("fineprint.css") + print; +@import url("bluish.css") projection,tv; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection ,tv; +@import url("bluish.css") projection , tv; +@import url("bluish.css") projection , tv; +@import url("bluish.css") + projection, + tv; +@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") projection,tv; +@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") projection tv; +@import url('landscape.css') screen and (orientation:landscape); +@import "rounded-corners", "text-shadow"; +@import 'rounded-corners', 'text-shadow'; +$family: unquote("Droid+Sans"); +@import url("http://fonts.googleapis.com/css?family=#{$family}"); +@import url( "foo.css"); +@import url("foo.css" ); +@import url( "foo.css" ); +@import url( "foo.css" ); +@import url("foo bar baz.css"); +@import url( "foo bar baz.css" ); +@import url("foo bar baz.css"); +@import url( +"foo.css" +); +@import 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600'; +@import url( +"foo.css,800" +); + +=====================================output===================================== +@import url("fineprint.css") print; +@import url("bluish.css") projection, tv; +@import "custom.css"; +@import url("chrome://communicator/skin/"); +@import "common.css" screen, projection; +@import "common.css" screen projection; +@import url("landscape.css") screen and (orientation: landscape); + +@import (multiple) "foo.less"; + +/* This isn't valid CSS, SCSS or Less, but we should be lenient and make sure +/* that nothing is lost when printing. */ +@import "one" two "three"; + +#main { + @import "example"; +} +#main { + @import "example"; +} +#main { + @import "example"; +} +#main { + @import "example"; +} +#main { + @import "example"; +} +#main { + @import "example"; +} +#main { + @import "example"; +} + +@import "test.less" { +} +@import "test.less" { + a: b; + c: d; +} + +@import url("foo"); +$dir: "fonts"; + +@import url("foo.css"); +@import url("foo.css"); +@import url("foo.css"); +@import url("foo.css"); +@import url("fineprint.css") print; +@import url("fineprint.css") print; +@import url("fineprint.css") print; +@import url("fineprint.css") print; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection, tv; +@import url("bluish.css") projection, tv; +@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") + projection, + tv; +@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") + projection tv; +@import url("landscape.css") screen and (orientation: landscape); +@import "rounded-corners", "text-shadow"; +@import "rounded-corners", "text-shadow"; +$family: unquote("Droid+Sans"); +@import url("http://fonts.googleapis.com/css?family=#{$family}"); +@import url("foo.css"); +@import url("foo.css"); +@import url("foo.css"); +@import url("foo.css"); +@import url("foo bar baz.css"); +@import url("foo bar baz.css"); +@import url("foo bar baz.css"); +@import url("foo.css"); +@import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600"; +@import url("foo.css,800"); + +================================================================================ +`; + +exports[`include.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px,2px,$arg2:10,2px 4px 6px); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix +( +1px +, +2px +, +$arg2 +: +10 +, +2px +4px +6px +) +; +@include + +mix + +( + +1px + +, + +2px + +, + +$arg2 + +: + +10 + +, + +2px + +4px + +6px + +) + +; +@include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); +a { + @include global-variable-overriding; + @include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); + @include apply-to-ie6-only {} + @include apply-to-ie6-only{} + @include apply-to-ie6-only + {} + @include + apply-to-ie6-only + { + } + @include + + apply-to-ie6-only + + { + + } +} + +a { +@include section-type-1( +$header: (margin: 0 0 $margin-base, text-align: left), +$decoration: (type: base, margin: 0 auto -1px 0, primary-color: $brand-primary, secondary-color: $gray-light), +$title: (margin: 0 0 $margin-small, color: false, font-size: $font-size-h3, font-weight: false, line-height: $line-height-h3) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +(box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15)) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $brand-primary +) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) +); +} + +=====================================output===================================== +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix( + 1px, + 2px, + $arg2: 10, + + 2px 4px 6px +); +@include mix( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: + 1px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: + 2px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + 2px 4px 6px +); +a { + @include global-variable-overriding; + @include mix( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: + 1px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: + 2px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + 2px 4px 6px + ); + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } +} + +a { + @include section-type-1( + $header: (margin: 0 0 $margin-base, text-align: left), + $decoration: ( + type: base, + margin: 0 auto -1px 0, + primary-color: $brand-primary, + secondary-color: $gray-light + ), + $title: ( + margin: 0 0 $margin-small, + color: false, + font-size: $font-size-h3, + font-weight: false, + line-height: $line-height-h3 + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + (box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15)) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + (box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), border-color: $brand-primary) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + border-color: + $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value + ) + ); +} + +================================================================================ +`; + +exports[`keyframes.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { +0%{top:0;left:0;} +30%{top: 50px;} +68%,72%{left: 50px;} +100%{top: 100px; left: 100%;} +} +@keyframes identifier{ + 0% { + top:0; + left:0; + } + 30% { + top: 50px; + } + 68%, 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top:0; + left:0; + } + 30% { + top: 50px; + } + 68%, 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes +identifier +{ +0% +{ +top +: +0; +left +: +0 +; +} +30% +{ +top +: +50px +; +} +68% +, +72% +{ +left +: +50px +; +} +100% +{ +top +: +100px +; +left +: +100% +; +} +} +@keyframes + +identifier + +{ + +0% + +{ + +top + +: + +0 + +; + +left + +: + +0 + +; + +} + +30% + +{ + +top + +: + +50px + +; + +} + +68% + +, + +72% + +{ + +left + +: + +50px + +; + +} + +100% + +{ + +top + +: + +100px + +; + +left + +: + +100% + +; + +} + +} +@keyframes identifier { + from { + margin-top: 50px; + } + to { + margin-top: 100px; + } +} +@keyframes +identifier +{ +from +{ +margin-top: 50px; +} +to +{ +margin-top: 100px; +} +} +@keyframes + +identifier + +{ + +from + +{ + +margin-top: 50px; + +} + +to + +{ + +margin-top: 100px; + +} + +} +@-webkit-keyframes identifier { + 0% { opacity: 0; top: 4rem; } + 100% { opacity: 1; top: 0; } +} + +=====================================output===================================== +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top: 0; + left: 0; + } + 30% { + top: 50px; + } + 68%, + 72% { + left: 50px; + } + 100% { + top: 100px; + left: 100%; + } +} +@keyframes identifier { + 0% { + top: 0; + + left: 0; + } + + 30% { + top: 50px; + } + + 68%, + 72% { + left: 50px; + } + + 100% { + top: 100px; + + left: 100%; + } +} +@keyframes identifier { + from { + margin-top: 50px; + } + to { + margin-top: 100px; + } +} +@keyframes identifier { + from { + margin-top: 50px; + } + to { + margin-top: 100px; + } +} +@keyframes identifier { + from { + margin-top: 50px; + } + + to { + margin-top: 100px; + } +} +@-webkit-keyframes identifier { + 0% { + opacity: 0; + top: 4rem; + } + 100% { + opacity: 1; + top: 0; + } +} + +================================================================================ +`; + +exports[`media.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@media screen and (min-width: 480px) {} +@media screen and (min-width: 480px) {} +@MEDIA screen and (min-width: 480px) {} +@MEDIA screen and (min-width: 480px) {} +@media screen and (min-width: 480px) {} +@media screen and (min-width: 480px) {} +@media screen and (min-width :480px) {} +@media screen and (min-width : 480px) {} +@media screen and (min-width : 480px) {} +@media + screen + and + (min-width + : + 480px) {} +@media screen and ( min-width: 480px) {} +@media screen and (min-width: 480px ) {} +@media screen and ( min-width: 480px ) {} +@media screen and ( min-width: 480px ) {} +@media not screen and (color), print and (color) { } +@media not screen and (color) , print and (color) { } +@media not screen and (color),print and (color) { } +@media not screen and (color) , print and (color) { } +@media not screen and (color) , print and (color) { } +@media not screen and ( color), print and (color) { } +@media not screen and (color ), print and (color) { } +@media not screen and ( color ), print and (color) { } +@media not screen and ( color ), print and (color) { } +@media (--small-viewport) {} +@media +( +--small-viewport +) +{ +} +@media + +( + +--small-viewport + +) + +{ + +} + +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { +@media screen { +color: green; + +@media (min-width: 768px) { +color: red; +} +} +@media tv { +color: black; +} +} +.screen-color{ + @media screen{ + color: green; + + @media (min-width: 768px){ + color: red; + } + } + @media tv{ + color: black; + } +} +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color +{ +@media +screen +{ +color +: +green +; +@media +( +min-width +: +768px +) +{ +color +: +red +; +} +} +@media +tv +{ +color +: +black +; +} +} +.screen-color + +{ + +@media + +screen + +{ + +color + +: + +green + +; + +@media + +( + +min-width + +: + +768px + +) + +{ + +color + +: + +red + +; + +} + +} + +@media + +tv + +{ + +color + +: + +black + +; + +} + +} + +@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {} + +=====================================output===================================== +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media screen and (min-width: 480px) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media not screen and (color), print and (color) { +} +@media (--small-viewport) { +} +@media (--small-viewport) { +} +@media (--small-viewport) { +} + +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { + @media screen { + color: green; + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} +.screen-color { + @media screen { + color: green; + + @media (min-width: 768px) { + color: red; + } + } + + @media tv { + color: black; + } +} + +@media all and (-webkit-min-device-pixel-ratio: 1.5), + all and (-o-min-device-pixel-ratio: 3/2), + all and (min--moz-device-pixel-ratio: 1.5), + all and (min-device-pixel-ratio: 1.5) { +} + +================================================================================ +`; + +exports[`mixin.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@mixin clearfix {} +@mixin clearfix{} +@mixin clearfix {} +@mixin clearfix + {} +@mixin + clearfix + {} +@mixin +clearfix +{ +} +@mixin + +clearfix + +{ + +} + +@mixin mix($arg, $arg1, $arg2: 10, $args...) {} +@mixin mix($arg,$arg1,$arg2:10,$args...){} +@mixin mix ( $arg , $arg1 , $arg2 : 10 , $args ... ) {} +@mixin mix ( $arg , $arg1 , $arg2 : 10 , $args ... ) {} +@mixin mix( + $arg, + $arg1, + $arg2: 10, + $args... +) {} +@mixin +mix( + $arg, + $arg1, + $arg2: 10, + $args... + ) {} +@mixin +mix +( +$arg +, +$arg1 +, +$arg2 +: +10 +, +$args +... +) +{ +} +@mixin + +mix + +( + +$arg + +, + +$arg1 + +, + +$arg2 + +: + +10 + +, + +$args + +... + +) + +{ +} +@mixin mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args...) {} +@mixin component($conf: ()) {} +@mixin component($conf: ( )) {} +@mixin button-variant($hover-background: darken($background, 7.5%)) {} +@mixin button-variant( $hover-background : darken( $background , 7.5% ) ) {} +@mixin button-variant($hover-background:darken($background,7.5%)) {} +@mixin button-variant( + $hover-background: darken($background, 7.5%) +) {} +@mixin +button-variant( +$hover-background +: +darken( +$background +, +7.5% +) +) +{} +@mixin button-variant($foo: "...") {} +@mixin button-variant($foo: " ... ") {} +@mixin button-variant($foo: " ... ") {} +@mixin sexy-border($color, $width, $foo: (color: red)) {} + +@mixin selector($param: "value") {} + +=====================================output===================================== +@mixin clearfix { +} +@mixin clearfix { +} +@mixin clearfix { +} +@mixin clearfix { +} +@mixin clearfix { +} +@mixin clearfix { +} +@mixin clearfix { +} + +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix($arg, $arg1, $arg2: 10, $args...) { +} +@mixin mix( + $arg, + $arg1, + $arg2: 10, + + $args... +) { +} +@mixin mix( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args... +) { +} +@mixin component($conf: ()) { +} +@mixin component($conf: ()) { +} +@mixin button-variant($hover-background: darken($background, 7.5%)) { +} +@mixin button-variant($hover-background: darken($background, 7.5%)) { +} +@mixin button-variant($hover-background: darken($background, 7.5%)) { +} +@mixin button-variant($hover-background: darken($background, 7.5%)) { +} +@mixin button-variant($hover-background: darken($background, 7.5%)) { +} +@mixin button-variant($foo: "...") { +} +@mixin button-variant($foo: " ... ") { +} +@mixin button-variant($foo: " ... ") { +} +@mixin sexy-border($color, $width, $foo: (color: red)) { +} + +@mixin selector($param: "value") { +} + +================================================================================ +`; + +exports[`namespaces.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@namespace toto "http://toto.example.org"; +@namespace toto url("http://toto.example.org"); +@namespace toto "http://toto.example.org" ; +@namespace toto "http://toto.example.org" ; +@namespace +toto +"http://toto.example.org" +; +@namespace + +toto + +"http://toto.example.org" + +; +@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; +@namespace +very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace +"http://toto.example.org" +; +@namespace + +very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace + +"http://toto.example.org" + +; +@namespace "http://example.com/foo"; +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo") ; +@namespace url("http://example.com/foo") ; +@namespace +url("http://example.com/foo"); +@namespace + +url("http://example.com/foo"); +@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); +@namespace +url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); +@namespace + +url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); + +=====================================output===================================== +@namespace toto "http://toto.example.org"; +@namespace toto url("http://toto.example.org"); +@namespace toto "http://toto.example.org"; +@namespace toto "http://toto.example.org"; +@namespace toto "http://toto.example.org"; +@namespace toto "http://toto.example.org"; +@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; +@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; +@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; +@namespace "http://example.com/foo"; +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo"); +@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); +@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); +@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); + +================================================================================ +`; + +exports[`page.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@page { + margin: 1cm; +} +@page { +margin: 1cm; +} +@page{ +margin: 1cm; +} +@page { + margin: 1cm; +} +@page +{ +margin +: +1cm +; +} +@page + +{ + +margin +: + +1cm + +; + +} +@page :first { + margin: 2cm; +} +@page :first { +margin: 2cm; +} +@page :first{ + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page +:first +{ +margin +: +2cm +; +} +@page + +:first + +{ + +margin + +: + +2cm + +; + +} +@page vertical { + size: A4 portrait; +} + +=====================================output===================================== +@page { + margin: 1cm; +} +@page { + margin: 1cm; +} +@page { + margin: 1cm; +} +@page { + margin: 1cm; +} +@page { + margin: 1cm; +} +@page { + margin: 1cm; +} +@page :first { + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page :first { + margin: 2cm; +} +@page vertical { + size: A4 portrait; +} + +================================================================================ +`; + +exports[`return.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { +@return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { +@return $n*$grid-width+($n-1)*$gutter-width/10; +} +@function grid-width($n) { + @return $n * $grid-width + ( $n - 1 ) * $gutter-width / 10 ; +} +@function grid-width($n) { + @return $n * $grid-width + ( $n - 1 ) * $gutter-width / 10 ; +} +@function grid-width($n) { + @return $n + * + $grid-width + + ( + $n + - + 1 + ) + * + $gutter-width + / + 10 + ; +} +@function grid-width($n) { + @return + $n + * + $grid-width + + ( + $n + - + 1 + ) + * + $gutter-width + / + 10 + ; +} +@function +grid-width( +$n +) +{ +@return +$n +* +$grid-width ++ +( +$n +- +1 +) +* +$gutter-width +/ +10 +; +} +@function + +grid-width( + +$n + +) + +{ + +@return + +$n + +* + +$grid-width + ++ + +( + +$n + +- + +1 + +) + +* + +$gutter-width + +/ + +10 + +; + +} +@function grid-width($n) { + @return $very-very-very-very-very-very-vey-long-var * $very-very-very-very-very-very-vey-long-var + ($very-very-very-very-very-very-vey-long-var - 1) * $very-very-very-very-very-very-vey-long-var; +} +@function extend($obj, $ext-obj) { + @return map-merge($obj, $ext-obj); +} +@function extend($obj, $ext-obj) { + @return map-merge( $obj , $ext-obj ) ; +} +@function extend($obj, $ext-obj) { + @return map-merge($obj,$ext-obj); +} +@function extend($obj, $ext-obj) { + @return + map-merge( + $obj + , + $ext-obj + ) + ; +} + +=====================================output===================================== +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n-1) * $gutter-width/10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $n * $grid-width + ($n - 1) * $gutter-width / 10; +} +@function grid-width($n) { + @return $very-very-very-very-very-very-vey-long-var * + $very-very-very-very-very-very-vey-long-var + + ($very-very-very-very-very-very-vey-long-var - 1) * + $very-very-very-very-very-very-vey-long-var; +} +@function extend($obj, $ext-obj) { + @return map-merge($obj, $ext-obj); +} +@function extend($obj, $ext-obj) { + @return map-merge($obj, $ext-obj); +} +@function extend($obj, $ext-obj) { + @return map-merge($obj, $ext-obj); +} +@function extend($obj, $ext-obj) { + @return map-merge($obj, $ext-obj); +} + +================================================================================ +`; + +exports[`supports.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@supports (transform-origin: 5% 5%) {} +@supports (transform-origin:5% 5%) {} +@supports ( transform-origin : 5% 5% ) {} +@supports ( transform-origin : 5% 5% ) {} +@supports + (transform-origin: 5% 5%) {} +@supports +(transform-origin: 5% 5%) {} +@supports +( +transform-origin +: +5% +5% +) {} +@supports + +( + +transform-origin + +: + +5% + +5% + +) + +{} +@supports (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} +@supports + (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} +@supports +( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) {} +@supports + +( + +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop + +: + +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value + +) + +{} +@supports not(transform-origin: 10em 10em 10em) {} +@supports not (transform-origin: 10em 10em 10em) {} +@supports not ( transform-origin : 10em 10em 10em ) {} +@supports not ( transform-origin : 10em 10em 10em ) {} +@supports not + (transform-origin: 10em 10em 10em) {} +@supports + not (transform-origin: 10em 10em 10em) {} +@supports + not + (transform-origin: 10em 10em 10em) {} +@supports +not +( +transform-origin +: +10em +10em +10em +) {} +@supports + +not + +( + +transform-origin + +: + +10em + +10em + +10em + +) + +{} +@supports not (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} +@supports + not (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} +@supports not + (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} +@supports +not +( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) {} +@supports + +not + +( + +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop + +: + +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value + +) + +{} +@supports not (not (transform-origin: 2px)) {} +@supports not(not(transform-origin:2px)) {} +@supports not ( not ( transform-origin : 2px ) ) {} +@supports not ( not ( transform-origin : 2px ) ) {} +@supports not + (not (transform-origin: 2px)) {} +@supports not + ( + not (transform-origin: 2px) + ) {} +@supports +not +( +not +( +transform-origin +: +2px +) +) {} +@supports + +not + +( + +not + +( + +transform-origin + +: + +2px + +) + +) + +{} +@supports (display: flexbox) and (not (display: inline-grid)) {} +@supports (display: table-cell) and (display: list-item) {} +@supports ( display : table-cell ) and ( display : list-item ) {} +@supports ( display : table-cell ) and ( display : list-item ) {} +@supports + (display: table-cell) and (display: list-item) {} +@supports (display: table-cell) and + (display: list-item) {} +@supports (display: table-cell) + and (display: list-item) {} +@supports +( +display +: +table-cell +) +and +( +display +: +list-item +) {} +@supports + +( + +display + +: + +table-cell + +) + +and + +( + +display + +: + +list-item + +) + +{} +@supports (display: table-cell) and (display: list-item) and (display: run-in) {} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) {} +@supports + (display: table-cell) and ((display: list-item) and (display: run-in)) {} +@supports (display: table-cell) + and ((display: list-item) + and (display: run-in)) {} +@supports (display: table-cell) and + ((display: list-item) and + (display: run-in)) {} +@supports +( +display +: +table-cell +) +and +( +( +display +: +list-item +) +and +( +display +: +run-in +) +) {} +@supports + +( + +display + +: + +table-cell + +) + +and + +( + +( + +display + +: + +list-item + +) + +and + +( + +display + +: + +run-in + +) + +) + +{} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) {} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve) {} +@supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} +@supports not((text-align-last:justify)or(-moz-text-align-last:justify)){ } +@supports not((text-align-last:justify)and(-moz-text-align-last:justify)){ } +@supports (--foo:green) {} + +@supports selector(:after) {} +@supports selector(:focus) {} +@supports selector(:focus-visible) {} +@supports selector(A>B) {} +@supports selector(A > B) {} +@supports selector(A > + B) {} +@supports selector(A +> +B +) {} +@supports selector( +A +< +B +) {} +@supports selector(.a:not(.b)){} +@supports selector(:not(.b)){} +@supports not selector(:after){ +} +@supports (--foo:green) and selector(:after){ +} +@supports selector(:before) and selector(:focus-visible){ +} +@supports selector(:not(.a,.b)) and selector(:focus-visible){ +} +@supports selector(.a,.b){ + +} +@supports selector(){ + +} + +@supports selector(:focus-visible) { + button:focus { + outline: none; + } + + button:focus-visible { + outline: 2px solid orange; + } +} + +@supports selector(:not(.a,.b)) { +} + +@supports selector(:not(.a,.b), :not(.b,.c)) { +} +@supports selector(:not(.a,.b), .b, .c) { +} + +@supports selector( + :not( + .a,.b) + ) { +} +@supports selector( + :not( + .a,.b + ) + ) { +} +@supports selector(.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas, +.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas){ +} +@supports selector(.parent>.child ){ +} +@supports selector(> .child-one){ +} +@supports selector(.parent ~ .child){ +} +@supports selector(ns|* ){ +} +@supports selector(svg|a ){ +} +@supports selector(|B ){ +} +@supports selector(*|*){ +} +@supports selector(|*){ +} +@supports selector(.a,.b,:not(asdasldaskdhjkashdahsdkjahskdjhakj,asdasldaskdhjkashdahsdkjahskdjhakj)){ +} +@supports not (selector(:before) or not (not (selector(:before)))) { +} +@supports selector(selector(:focus-visible)) {} +@supports selector(:::selector(:focus-visible)) {} +@supports selector(--selector(:focus-visible)) {} +@supports not (transform-origin: 10em 10em 10em) {} +@supports not (not (transform-origin: 2px)) {} +@supports (display: grid) and (not (display: inline-grid)) {} +@supports (display: table-cell) and (display: list-item) and (display:run-in) {} +@supports (display: table-cell) and ((display: list-item) and (display:run-in)) {} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) {} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) or + (-o-transform-style: preserve) or (-webkit-transform-style: preserve) {} + +@supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or + ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} + +=====================================output===================================== +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports (transform-origin: 5% 5%) { +} +@supports ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports (display: flexbox) and (not (display: inline-grid)) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) { +} +@supports (display: table-cell) and (display: list-item) and (display: run-in) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) { +} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) or + (-o-transform-style: preserve) or (-webkit-transform-style: preserve) { +} +@supports (transform-style: preserve-3d) or + ( + (-moz-transform-style: preserve-3d) or + ( + (-o-transform-style: preserve-3d) or + (-webkit-transform-style: preserve-3d) + ) + ) { +} +@supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) { +} +@supports not ((text-align-last: justify) and (-moz-text-align-last: justify)) { +} +@supports (--foo: green) { +} + +@supports selector(:after) { +} +@supports selector(:focus) { +} +@supports selector(:focus-visible) { +} +@supports selector(A > B) { +} +@supports selector(A > B) { +} +@supports selector(A > B) { +} +@supports selector(A > B) { +} +@supports selector(A < B) { +} +@supports selector(.a:not(.b)) { +} +@supports selector(:not(.b)) { +} +@supports not selector(:after) { +} +@supports (--foo: green) and selector(:after) { +} +@supports selector(:before) and selector(:focus-visible) { +} +@supports selector(:not(.a, .b)) and selector(:focus-visible) { +} +@supports selector( + .a, + .b +) { +} +@supports selector() { +} + +@supports selector(:focus-visible) { + button:focus { + outline: none; + } + + button:focus-visible { + outline: 2px solid orange; + } +} + +@supports selector(:not(.a, .b)) { +} + +@supports selector( + :not(.a, .b), + :not(.b, .c) +) { +} +@supports selector( + :not(.a, .b), + .b, + .c +) { +} + +@supports selector(:not(.a, .b)) { +} +@supports selector(:not(.a, .b)) { +} +@supports selector( + .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas + .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas, + .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas + .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas +) { +} +@supports selector(.parent > .child) { +} +@supports selector(> .child-one) { +} +@supports selector(.parent ~ .child) { +} +@supports selector(ns|*) { +} +@supports selector(svg|a) { +} +@supports selector(|B) { +} +@supports selector(*|*) { +} +@supports selector(|*) { +} +@supports selector( + .a, + .b, + :not(asdasldaskdhjkashdahsdkjahskdjhakj, asdasldaskdhjkashdahsdkjahskdjhakj) +) { +} +@supports not (selector(:before) or not (not (selector(:before)))) { +} +@supports selector(selector(:focus-visible)) { +} +@supports selector(:::selector(:focus-visible)) { +} +@supports selector(--selector(:focus-visible)) { +} +@supports not (transform-origin: 10em 10em 10em) { +} +@supports not (not (transform-origin: 2px)) { +} +@supports (display: grid) and (not (display: inline-grid)) { +} +@supports (display: table-cell) and (display: list-item) and (display: run-in) { +} +@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { +} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) { +} +@supports (transform-style: preserve) or (-moz-transform-style: preserve) or + (-o-transform-style: preserve) or (-webkit-transform-style: preserve) { +} + +@supports (transform-style: preserve-3d) or + ( + (-moz-transform-style: preserve-3d) or + ( + (-o-transform-style: preserve-3d) or + (-webkit-transform-style: preserve-3d) + ) + ) { +} + +================================================================================ +`; + +exports[`viewport.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { +min-width: 640px; +max-width: 800px; +} + +@viewport{ + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport +{ +min-width +: +640px +; +max-width +: +800px +; +} + +@viewport + +{ + +min-width + +: + +640px + +; + +max-width + +: + +800px + +; + +} + +=====================================output===================================== +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + max-width: 800px; +} + +@viewport { + min-width: 640px; + + max-width: 800px; +} + +================================================================================ +`; + +exports[`while.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@while $i > 0 {} +@while $i>0{} +@while $i > 0 {} +@while $i + > + 0 + {} +@while + $i + > + 0 + {} +@while +$i +> +0 +{ +} +@while + +$i + +> + +0 + +{ + +} +@while ($i > 0) {} +@while ($i>0){} +@while ( $i > 0 ) {} +@while ( $i > 0 ) {} +@while ( + $i > 0 +) {} +@while + ($i > 0) {} +@while +( +$i +> +0 +) +{ +} +@while + +( + +$i + +> + +0 + +) + +{ + +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 {} +@while 1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while (($i) > (0)) {} +@while (($i)>(0)){} +@while ( ( $i ) > ( 0 ) ) {} +@while (($i) + > + (0) +) {} +@while +( +( +$i +) +> +( +0 +) +) +{ +} +@while + +( + +( + +$i + +) + +> + +( + +0 + +) + +) + +{ + +} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while (1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} + +=====================================output===================================== +@while $i > 0 { +} +@while $i>0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while ($i > 0) { +} +@while ($i>0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + > 1 { +} +@while 1 > + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var { +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + > + $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var { +} +@while (($i) > (0)) { +} +@while (($i) >(0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 +) { +} +@while ( + 1 > + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + > 1 +) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + > + $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +) { +} + +================================================================================ +`; diff --git a/tests/format/css/atrule/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/atrule/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5c66574796c0..000000000000 --- a/tests/format/css/atrule/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4898 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`at-root.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { -@at-root { -.child1 { -width: 100px; -} -.child2 { -width: 200px; -} -} -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent -{ -@at-root -{ -.child1 -{ -width -: -100px -; -} -.child2 -{ -width -: -200px -; -} -} -} -.parent - -{ - -@at-root - -{ - -.child1 - -{ - -width - -: - -100px - -; - -} -.child2 - -{ - -width - -: - -200px - -; - -} - -} - -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { -@at-root .child { -width: 100px; -} -} -.parent{ - @at-root .child{ - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent -{ -@at-root -.child -{ -width -: -100px -; -} -} -.parent - -{ - -@at-root - -.child - -{ - -width - -: - -100px - -; - -} - -} -.parent { -@at-root -input[ -type -= -'radio' -] -{ -color -: -red -; -} -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { -.page { -width: 8in; - -@at-root (with: media) { -color: red; -} -} -} -@media print{ - .page{ - width: 8in; - - @at-root (with:media){ - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root ( with : media ) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root ( with : media ) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root - (with: media) { - color: red; - } - } -} -@media print -{ -.page -{ -width -: -8in -; -@at-root -( -with -: -media -) -{ -color -: -red -; -} -} -} -@media print - -{ - -.page - -{ - -width - -: - -8in - -; - -@at-root - -( - -with - -: - -media - -) - -{ - -color -: - -red - -; - -} - -} - -} -@media print { - .page { - width: 8in; - - @at-root (without: media) { - color: red; - } - } -} - -=====================================output===================================== -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root { - .child1 { - width: 100px; - } - .child2 { - width: 200px; - } - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root .child { - width: 100px; - } -} -.parent { - @at-root input[type="radio"] { - color: red; - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (with: media) { - color: red; - } - } -} -@media print { - .page { - width: 8in; - - @at-root (without: media) { - color: red; - } - } -} - -================================================================================ -`; - -exports[`charset.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@charset "UTF-8"; -@charset "iso-8859-15"; -@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */ -@charset "UTF-8"; /* Invalid, more than one space */ -@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */ -@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS */ - -=====================================output===================================== -@charset "UTF-8"; -@charset "iso-8859-15"; -@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */ -@charset "UTF-8"; /* Invalid, more than one space */ -@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */ -@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS */ - -================================================================================ -`; - -exports[`counter-style.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { -system: cyclic; -symbols: "\\1F44D"; -suffix: " "; -} -@counter-style identifier{ - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style -identifier -{ -system -: -cyclic -; -symbols -: -"\\1F44D" -; -suffix -: -" " -; -} - -@counter-style - -identifier - -{ - -system - -: - -cyclic - -; - -symbols - - -: - -"\\1F44D" - -; - -suffix - -: - -" " - -; - -} - -=====================================output===================================== -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} -@counter-style identifier { - system: cyclic; - symbols: "\\1F44D"; - suffix: " "; -} - -@counter-style identifier { - system: cyclic; - - symbols: "\\1F44D"; - - suffix: " "; -} - -================================================================================ -`; - -exports[`custom-media.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width:30em); -@custom-media --small-viewport ( max-width : 30em ) ; -@custom-media --small-viewport - (max-width: 30em); -@custom-media - --small-viewport - ( - max-width: 30em - ); -@custom-media ---small-viewport -( -max-width -: -30em -) -; -@custom-media - ---small-viewport - -( - -max-width - -: - -30em - -) - -; -@custom-media --none not all; -@custom-media --none not all ; -@custom-media --none - not all; -@custom-media --none - not - all; -@custom-media ---none -not -all -; -@custom-media - ---none - -not - -all - -; -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width:768px) and (max-width:1279px); -@custom-media --tablet ( min-width : 768px ) and ( max-width : 1279px ) ; -@custom-media --tablet - (min-width: 768px) and (max-width: 1279px); -@custom-media - --tablet - (min-width: 768px) and - (max-width: 1279px); -@custom-media ---tablet -( -min-width -: -768px -) -and -( -max-width -: -1279px -) -; -@custom-media - ---tablet - -( - -min-width - -: - -768px - -) - -and - -( - -max-width - -: - -1279px - -) - -; - -=====================================output===================================== -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --small-viewport (max-width: 30em); -@custom-media --none not all; -@custom-media --none not all; -@custom-media --none not all; -@custom-media --none not all; -@custom-media --none not all; -@custom-media --none not all; -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); -@custom-media --tablet (min-width: 768px) and (max-width: 1279px); - -================================================================================ -`; - -exports[`custom-selector.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1,h2,h3,h4,h5,h6; -@custom-selector :--heading h1 , h2 , h3 , h4 , h5 , h6 ; -@custom-selector :--heading - h1, h2, h3, h4, h5, h6; -@custom-selector - :--heading - h1, - h2, - h3, - h4, - h5, - h6; -@custom-selector -:--heading -h1 -, -h2 -, -h3 -, -h4 -, -h5 -, -h6 -; -@custom-selector - -:--heading - -h1 - -, - -h2 - -, - -h3 - -, - -h4 - -, - -h5 - -, - -h6 - -; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1, h2, h3, h4, h5, h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1 + h1, h2, h3, h4, h5, h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name .very-very-very-very-very-very-very-very-very-long-selector-name + very-very-very-very-very-very-very-very-very-long-selector-name-other, h2, h3, h4, h5, h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name h1 h1, h2, h3, h4, h5, h6; -@custom-selector :--heading .very-very-very-very-very-very-very-very-very-very-long-class-name, .very-very-very-very-very-very-very-very-very-very-long-class-name-other; -@custom-selector :--enter :hover, :focus; -@custom-selector :--visible :global.visible; -@custom-selector :--icon i[class^='icon-'], i[class*=' icon-']; -@custom-selector :--placeholder :placehoder-shown, ::-webkit-input-placeholder, ::-moz-placeholder, :-ms-input-placeholder; -@custom-selector :--enter :matches(:hover, :focus, :active); - -=====================================output===================================== -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--heading h1, h2, h3, h4, h5, h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name - h1, - h2, - h3, - h4, - h5, - h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name - h1 + h1, - h2, - h3, - h4, - h5, - h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name - .very-very-very-very-very-very-very-very-very-long-selector-name - + very-very-very-very-very-very-very-very-very-long-selector-name-other, - h2, - h3, - h4, - h5, - h6; -@custom-selector :--very-very-very-very-very-very-very-very-very-long-selector-name - h1 h1, - h2, - h3, - h4, - h5, - h6; -@custom-selector :--heading - .very-very-very-very-very-very-very-very-very-very-long-class-name, - .very-very-very-very-very-very-very-very-very-very-long-class-name-other; -@custom-selector :--enter :hover, :focus; -@custom-selector :--visible :global.visible; -@custom-selector :--icon i[class^="icon-"], i[class*=" icon-"]; -@custom-selector :--placeholder - :placehoder-shown, - ::-webkit-input-placeholder, - ::-moz-placeholder, - :-ms-input-placeholder; -@custom-selector :--enter :matches(:hover, :focus, :active); - -================================================================================ -`; - -exports[`debug.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@debug 10em + 12em; -@debug 10em+12em; -@debug 10em + 12em ; -@debug 10em - + - 12em - ; -@debug -10em -+ -12em -; -@debug - -10em - -+ - -12em - -; -@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var; - -=====================================output===================================== -@debug 10em + 12em; -@debug 10em+12em; -@debug 10em + 12em; -@debug 10em + 12em; -@debug 10em + 12em; -@debug 10em + 12em; -@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var; - -================================================================================ -`; - -exports[`each.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@each $animal in puma, sea-slug, egret, salamander {} -@each $animal in puma,sea-slug,egret,salamander{} -@each $animal in puma , sea-slug , egret , salamander {} -@each $animal in - puma, sea-slug, egret, salamander {} -@each - $animal - in - puma - , - sea-slug - , - egret - , - salamander - { - } -@each -$animal -in -puma -, -sea-slug -, -egret -, -salamander -{ -} -@each - -$animal - -in - -puma - -, - -sea-slug - -, - -egret - -, - -salamander - -{ - -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) {} -@each $animal in((puma),(sea-slug),(egret),(salamander)){} -@each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) {} -@each $animal - in ((puma), (sea-slug), (egret), (salamander)) {} -@each - $animal - in ( - (puma), - (sea-slug), - (egret), - (salamander) - ) { } -@each - $animal - in - ( - ( - puma - ) - , - ( - sea-slug - ) - , - ( - egret - ) - , - ( - salamander - ) - ) - { - } -@each - - $animal - - in - - ( - - ( - - puma - - ) - - , - - ( - - sea-slug - - ) - - , - - ( - - egret - - ) - - , - - ( - - salamander - - ) - - ) - - { - - } -@each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} -@each $animal,$color,$cursor in (puma,black,default),(sea-slug,blue,pointer),(egret,white,move){} -@each $animal, $color, $cursor in - (puma, black, default), - (sea-slug, blue, pointer), - (egret, white, move) {} -@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var in puma, sea-slug, egret, salamander {} -@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} -@each $element,$size in(h1:20px,h2:16px,h3:14px){} -@each $element , $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) {} -@each $element, - $size in (h1: 20px, h2: 16px, h3: 14px) {} -@each - $element, - $size - in - ( - h1 - : - 20px - , - h2 - : - 16px - , - h3 - : - 14px - ) - { - } -@each -$element, -$size -in -( -h1 -: -20px -, -h2 -: -16px -, -h3 -: -14px -) -{ -} -@each -$element, - -$size - -in - -( - -h1 - -: - -20px - -, - -h2 - -: - -16px - -, - -h3 - -: - -14px - -) - -{ - -} - -=====================================output===================================== -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in puma, sea-slug, egret, salamander { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal in ((puma), (sea-slug), (egret), (salamander)) { -} -@each $animal, $color, $cursor in (puma, black, default), - (sea-slug, blue, pointer), (egret, white, move) -{ -} -@each $animal, $color, $cursor in (puma, black, default), - (sea-slug, blue, pointer), (egret, white, move) -{ -} -@each $animal, $color, $cursor in (puma, black, default), - (sea-slug, blue, pointer), (egret, white, move) -{ -} -@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - in puma, - sea-slug, egret, salamander -{ -} -@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 - in (puma, black, default), - (sea-slug, blue, pointer), (egret, white, move) -{ -} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, $size in(h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { -} -@each $element, - $size - in ( - h1: 20px, - - h2: 16px, - - h3: 14px - ) -{ -} - -================================================================================ -`; - -exports[`extend.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.master { - color: black; - font-size: 12px; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { -@extend .master; -font-weight: bold; -} -.emphasis { - @extend .master ; - font-weight: bold; -} -.emphasis { - @extend .master ; - font-weight: bold; -} -.emphasis -{ -@extend -.master -; -font-weight -: -bold -; -} -.emphasis - -{ - -@extend - -.master - -; - -font-weight - -: - -bold - -; - -} -%message-shared { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} -.message { - @extend %message-shared; -} -.message { -@extend %message-shared; -} -.message { - @extend %message-shared ; -} -.message { - @extend %message-shared ; -} -.message { -@extend -%message-shared; -} -.message { - -@extend - -%message-shared; - -} -a.important { - @extend .notice !optional; -} -a.important { -@extend .notice !optional; -} -a.important { - @extend .notice !optional ; -} -a.important { - @extend .notice !optional ; -} -a.important -{ -@extend -.notice -!optional -; -} -a.important - -{ - -@extend - -.notice - -!optional - -; - -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message , .important ; -} -.message-error { - @extend .message , .important ; -} -.message-error { - @extend .message, - .important; -} -.message-error { - @extend - .message, - .important; -} -.message-error -{ -@extend -.message -, -.important -; -} -.message-error - -{ - -@extend - -.message - -, - -.important; - -} -.message-error { - @extend .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector, .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector; -} - -=====================================output===================================== -.master { - color: black; - font-size: 12px; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { - @extend .master; - font-weight: bold; -} -.emphasis { - @extend .master; - - font-weight: bold; -} -%message-shared { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} -.message { - @extend %message-shared; -} -.message { - @extend %message-shared; -} -.message { - @extend %message-shared; -} -.message { - @extend %message-shared; -} -.message { - @extend %message-shared; -} -.message { - @extend %message-shared; -} -a.important { - @extend .notice !optional; -} -a.important { - @extend .notice !optional; -} -a.important { - @extend .notice !optional; -} -a.important { - @extend .notice !optional; -} -a.important { - @extend .notice !optional; -} -a.important { - @extend .notice !optional; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .message, .important; -} -.message-error { - @extend .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector, - .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector; -} - -================================================================================ -`; - -exports[`font-face.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { -font-family: "Open Sans"; -src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), -url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face{ - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face -{ -font-family -: -"Open Sans" -; -src -: -url( -"/fonts/OpenSans-Regular-webfont.woff2" -) -format( -"woff2" -) -, -url( -"/fonts/OpenSans-Regular-webfont.woff" -) -format( -"woff" -) -; -} -@font-face - -{ - -font-family - -: - -"Open Sans" - -; - -src - -: - -url( - -"/fonts/OpenSans-Regular-webfont.woff2" - -) - -format( - -"woff2" - -) - -, - -url( - -"/fonts/OpenSans-Regular-webfont.woff" - -) - -format( - - -"woff" - -) - -; - -} - -=====================================output===================================== -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} -@font-face { - font-family: "Open Sans"; - - src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"), - url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); -} - -================================================================================ -`; - -exports[`font-feature-values.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values Font One { -@styleset { -nice-style: 12; -} -} -@font-feature-values Font One{ - @styleset{ - nice-style: 12; - } -} -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values -Font One -{ -@styleset -{ -nice-style -: -12 -; -} -} - -@font-feature-values - -Font One - -{ - -@styleset -{ - -nice-style - -: - -12 - -; - -} - -} - -=====================================output===================================== -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} - -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} - -================================================================================ -`; - -exports[`for.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@for $i from 1 through 8 {} -@for $i from 1 through 8{} -@for $i from 1 through 8 {} -@for $i -from -1 -through -8 -{} -@for -$i -from -1 -through -8 -{} -@for -$i -from -1 -through -8 -{} -@for - -$i - -from - -1 - -through - -8 - -{} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from 1 through 5 {} -@for $i from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through 5 {} -@for $i from 1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($var1 + $var1) through ($var-2 + $var-2) {} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1) through ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2) {} - -=====================================output===================================== -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $i from 1 through 8 { -} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - from 1 - through 5 -{ -} -@for $i - from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 - through 5 -{ -} -@for $i - from 1 - through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 -{ -} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 - through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 -{ -} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 - end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 -{ -} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - from ($var1 + $var1) - through ($var-2 + $var-2) -{ -} -@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var - from ( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 - ) - through ( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 - ) -{ -} - -================================================================================ -`; - -exports[`function.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg,$arg1,$arg2:10,$args...){ - @return "Func"; -} -@function func ( $arg , $arg1 , $arg2 : 10 , $args ... ) { - @return "Func"; -} -@function func ( $arg , $arg1 , $arg2 : 10 , $args ... ) { - @return "Func"; -} -@function func( - $arg, - $arg1, - $arg2: 10, - $args... -) { - @return "Func"; -} -@function - func( - $arg, - $arg1, - $arg2: 10, - $args... - ) { - @return "Func"; -} -@function -func -( -$arg -, -$arg1 -, -$arg2 -: -10 -, -$args -... -) -{ -@return -"Func" -; -} -@function - -func - -( - -$arg - -, - -$arg1 - -, - -$arg2 - -: - -10 - -, - -$args - -... - -) - -{ - -@return - -"Func" - -; - -} -@function func($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args...) { - @return "Func"; -} - -=====================================output===================================== -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func($arg, $arg1, $arg2: 10, $args...) { - @return "Func"; -} -@function func( - $arg, - $arg1, - $arg2: 10, - - $args... -) { - @return "Func"; -} -@function func( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: - 10, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args... -) { - @return "Func"; -} - -================================================================================ -`; - -exports[`if-else.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@if $media == phonePortrait { - $k: .15625; -} @else if $media == phoneLandscape { - $k: .08803; -} @else if $media == tabletPortrait { - $k: .065106; -} -p { - @if $type == ocean {} - @if $type==ocean{} - @if $type == ocean {} - @if $type - == ocean {} - @if - $type - == - ocean - { - } - @if - - $type - - == - - ocean - - { - - } - @if (($type) == (ocean)) {} - @if (($type)==(ocean)){} - @if ( ( $type ) == ( ocean ) ) {} - @if (($type) - == (ocean)) {} - @if - ( - ( - $type - ) - == - ( - ocean - ) - ) - { - } - @if - - ( - - ( - - $type - - ) - - == - - ( - - ocean - - ) - - ) - - { - - } - @if $type == ocean { - color: blue; - } @else if $type == matador { - color: red; - } @else if $type == monster { - color: green; - } @else { - color: black; - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type==ocean{}@else if $type==matador{} - @if $type == ocean { } @else if $type == matador { } - @if $type == ocean {} - @else if $type == matador {} - @if - $type == ocean {} - @else if - $type == matador {} - @if - $type - == - ocean - { - } - @else - if - $type - == - matador - { - } - @if - - $type - - == - - ocean - - { - - } - - @else - - if - - $type - - == - - matador - - { - - } - @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { - color: blue; - } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { - color: red; - } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { - color: green; - } @else { - color: black; - } - @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} - @if $very-very-very-very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} - @if $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 and $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 {} - @if $base-font-size != 16px or $base-line-height != 24px or $base-unit != 'em' or $h1-font-size != 2 * $base-font-size or $h2-font-size != 1.5 * $base-font-size or $h3-font-size != 1.17 * $base-font-size or $h4-font-size != 1 * $base-font-size or $h5-font-size != 0.83 * $base-font-size or $h6-font-size != 0.67 * $base-font-size or $indent-amount != 40px {} - @if (str-slice($item, 0, 1) == ":") {} - @if (str-slice($item, 0, 3) == " : ") {} - @if ($type == ocean) {} @else if ($type == matador) {} @else {} -} - -=====================================output===================================== -@if $media == phonePortrait { - $k: 0.15625; -} @else if $media == phoneLandscape { - $k: 0.08803; -} @else if $media == tabletPortrait { - $k: 0.065106; -} -p { - @if $type == ocean { - } - @if $type==ocean { - } - @if $type == ocean { - } - @if $type == ocean { - } - @if $type == ocean { - } - @if $type == ocean { - } - @if (($type) == (ocean)) { - } - @if (($type) ==(ocean)) { - } - @if (($type) == (ocean)) { - } - @if (($type) == (ocean)) { - } - @if (($type) == (ocean)) { - } - @if (($type) == (ocean)) { - } - @if $type == ocean { - color: blue; - } @else if $type == matador { - color: red; - } @else if $type == monster { - color: green; - } @else { - color: black; - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type==ocean { - } @else if $type==matador { - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type == ocean { - } @else if $type == matador { - } - @if $type == ocean { - } @else if $type == matador { - } - @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables - { - color: blue; - } @else if - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables - { - color: red; - } @else if - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables - { - color: green; - } @else { - color: black; - } - @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 { - } - @if $very-very-very-very-very-very-long-var == - 0 and - $very-very-very-long-var == - 0 - { - } - @if $very-very-very-very-very-very-very-very-very-very-very-long-var == - 0 and - $very-very-very-very-very-very-very-very-very-very-very-long-var == - 0 - { - } - @if $base-font-size != - 16px or - $base-line-height != - 24px or - $base-unit != - "em" or - $h1-font-size != - 2 * - $base-font-size or - $h2-font-size != - 1.5 * - $base-font-size or - $h3-font-size != - 1.17 * - $base-font-size or - $h4-font-size != - 1 * - $base-font-size or - $h5-font-size != - 0.83 * - $base-font-size or - $h6-font-size != - 0.67 * - $base-font-size or - $indent-amount != - 40px - { - } - @if (str-slice($item, 0, 1) == ":") { - } - @if (str-slice($item, 0, 3) == " : ") { - } - @if ($type == ocean) { - } @else if ($type == matador) { - } @else { - } -} - -================================================================================ -`; - -exports[`import.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@import url("fineprint.css") print; -@import url("bluish.css") projection, tv; -@import 'custom.css'; -@import url("chrome://communicator/skin/"); -@import "common.css" screen, projection; -@import "common.css" screen projection; -@import url('landscape.css') screen and (orientation:landscape); - -@import (multiple) "foo.less"; - -/* This isn't valid CSS, SCSS or Less, but we should be lenient and make sure -/* that nothing is lost when printing. */ -@import "one" two "three"; - -#main { - @import "example"; -} -#main { -@import "example"; -} -#main { - @import "example" ; -} -#main { - @import "example" ; -} -#main { - @import - "example"; -} -#main -{ -@import -"example"; -} -#main - -{ - -@import - -"example"; - -} - -@import "test.less" {} -@import "test.less" { - a: b; - c: d; -} - -@import url('foo'); -$dir: 'fonts'; - -@import url("foo.css"); -@import url('foo.css'); -@import url("foo.css"); -@import url("foo.css"); -@import url("fineprint.css")print; -@import url("fineprint.css") print; -@import url("fineprint.css") print; -@import url("fineprint.css") - print; -@import url("bluish.css") projection,tv; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection ,tv; -@import url("bluish.css") projection , tv; -@import url("bluish.css") projection , tv; -@import url("bluish.css") - projection, - tv; -@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") projection,tv; -@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") projection tv; -@import url('landscape.css') screen and (orientation:landscape); -@import "rounded-corners", "text-shadow"; -@import 'rounded-corners', 'text-shadow'; -$family: unquote("Droid+Sans"); -@import url("http://fonts.googleapis.com/css?family=#{$family}"); -@import url( "foo.css"); -@import url("foo.css" ); -@import url( "foo.css" ); -@import url( "foo.css" ); -@import url("foo bar baz.css"); -@import url( "foo bar baz.css" ); -@import url("foo bar baz.css"); -@import url( -"foo.css" -); -@import 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600'; -@import url( -"foo.css,800" -); - -=====================================output===================================== -@import url("fineprint.css") print; -@import url("bluish.css") projection, tv; -@import "custom.css"; -@import url("chrome://communicator/skin/"); -@import "common.css" screen, projection; -@import "common.css" screen projection; -@import url("landscape.css") screen and (orientation: landscape); - -@import (multiple) "foo.less"; - -/* This isn't valid CSS, SCSS or Less, but we should be lenient and make sure -/* that nothing is lost when printing. */ -@import "one" two "three"; - -#main { - @import "example"; -} -#main { - @import "example"; -} -#main { - @import "example"; -} -#main { - @import "example"; -} -#main { - @import "example"; -} -#main { - @import "example"; -} -#main { - @import "example"; -} - -@import "test.less" { -} -@import "test.less" { - a: b; - c: d; -} - -@import url("foo"); -$dir: "fonts"; - -@import url("foo.css"); -@import url("foo.css"); -@import url("foo.css"); -@import url("foo.css"); -@import url("fineprint.css") print; -@import url("fineprint.css") print; -@import url("fineprint.css") print; -@import url("fineprint.css") print; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection, tv; -@import url("bluish.css") projection, tv; -@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") - projection, - tv; -@import url("very-very-very-very-very-very-very-very-very-very-long-name.css") - projection tv; -@import url("landscape.css") screen and (orientation: landscape); -@import "rounded-corners", "text-shadow"; -@import "rounded-corners", "text-shadow"; -$family: unquote("Droid+Sans"); -@import url("http://fonts.googleapis.com/css?family=#{$family}"); -@import url("foo.css"); -@import url("foo.css"); -@import url("foo.css"); -@import url("foo.css"); -@import url("foo bar baz.css"); -@import url("foo bar baz.css"); -@import url("foo bar baz.css"); -@import url("foo.css"); -@import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600"; -@import url("foo.css,800"); - -================================================================================ -`; - -exports[`include.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px,2px,$arg2:10,2px 4px 6px); -@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); -@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); -@include mix( - 1px, - 2px, - $arg2: 10, - 2px 4px 6px -); -@include -mix( - 1px, - 2px, - $arg2: 10, - 2px 4px 6px -); -@include -mix -( -1px -, -2px -, -$arg2 -: -10 -, -2px -4px -6px -) -; -@include - -mix - -( - -1px - -, - -2px - -, - -$arg2 - -: - -10 - -, - -2px - -4px - -6px - -) - -; -@include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); -a { - @include global-variable-overriding; - @include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); - @include apply-to-ie6-only {} - @include apply-to-ie6-only{} - @include apply-to-ie6-only - {} - @include - apply-to-ie6-only - { - } - @include - - apply-to-ie6-only - - { - - } -} - -a { -@include section-type-1( -$header: (margin: 0 0 $margin-base, text-align: left), -$decoration: (type: base, margin: 0 auto -1px 0, primary-color: $brand-primary, secondary-color: $gray-light), -$title: (margin: 0 0 $margin-small, color: false, font-size: $font-size-h3, font-weight: false, line-height: $line-height-h3) -); -} - -a { -@include item-spotlight-properties-transition( -"-title", -(box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15)) -); -} - -a { -@include item-spotlight-properties-transition( -"-title", -( -box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), -border-color: $brand-primary -) -); -} - -a { -@include item-spotlight-properties-transition( -"-title", -( -box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), -border-color: $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) -); -} - -=====================================output===================================== -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); -@include mix( - 1px, - 2px, - $arg2: 10, - - 2px 4px 6px -); -@include mix( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: - 1px, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: - 2px, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: - 10, - 2px 4px 6px -); -a { - @include global-variable-overriding; - @include mix( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: - 1px, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: - 2px, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: - 10, - 2px 4px 6px - ); - @include apply-to-ie6-only { - } - @include apply-to-ie6-only { - } - @include apply-to-ie6-only { - } - @include apply-to-ie6-only { - } - @include apply-to-ie6-only { - } -} - -a { - @include section-type-1( - $header: ( - margin: 0 0 $margin-base, - text-align: left, - ), - $decoration: ( - type: base, - margin: 0 auto -1px 0, - primary-color: $brand-primary, - secondary-color: $gray-light, - ), - $title: ( - margin: 0 0 $margin-small, - color: false, - font-size: $font-size-h3, - font-weight: false, - line-height: $line-height-h3, - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), - border-color: $brand-primary, - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), - border-color: - $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value, - ) - ); -} - -================================================================================ -`; - -exports[`keyframes.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { -0%{top:0;left:0;} -30%{top: 50px;} -68%,72%{left: 50px;} -100%{top: 100px; left: 100%;} -} -@keyframes identifier{ - 0% { - top:0; - left:0; - } - 30% { - top: 50px; - } - 68%, 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top:0; - left:0; - } - 30% { - top: 50px; - } - 68%, 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes -identifier -{ -0% -{ -top -: -0; -left -: -0 -; -} -30% -{ -top -: -50px -; -} -68% -, -72% -{ -left -: -50px -; -} -100% -{ -top -: -100px -; -left -: -100% -; -} -} -@keyframes - -identifier - -{ - -0% - -{ - -top - -: - -0 - -; - -left - -: - -0 - -; - -} - -30% - -{ - -top - -: - -50px - -; - -} - -68% - -, - -72% - -{ - -left - -: - -50px - -; - -} - -100% - -{ - -top - -: - -100px - -; - -left - -: - -100% - -; - -} - -} -@keyframes identifier { - from { - margin-top: 50px; - } - to { - margin-top: 100px; - } -} -@keyframes -identifier -{ -from -{ -margin-top: 50px; -} -to -{ -margin-top: 100px; -} -} -@keyframes - -identifier - -{ - -from - -{ - -margin-top: 50px; - -} - -to - -{ - -margin-top: 100px; - -} - -} -@-webkit-keyframes identifier { - 0% { opacity: 0; top: 4rem; } - 100% { opacity: 1; top: 0; } -} - -=====================================output===================================== -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top: 0; - left: 0; - } - 30% { - top: 50px; - } - 68%, - 72% { - left: 50px; - } - 100% { - top: 100px; - left: 100%; - } -} -@keyframes identifier { - 0% { - top: 0; - - left: 0; - } - - 30% { - top: 50px; - } - - 68%, - 72% { - left: 50px; - } - - 100% { - top: 100px; - - left: 100%; - } -} -@keyframes identifier { - from { - margin-top: 50px; - } - to { - margin-top: 100px; - } -} -@keyframes identifier { - from { - margin-top: 50px; - } - to { - margin-top: 100px; - } -} -@keyframes identifier { - from { - margin-top: 50px; - } - - to { - margin-top: 100px; - } -} -@-webkit-keyframes identifier { - 0% { - opacity: 0; - top: 4rem; - } - 100% { - opacity: 1; - top: 0; - } -} - -================================================================================ -`; - -exports[`media.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@media screen and (min-width: 480px) {} -@media screen and (min-width: 480px) {} -@MEDIA screen and (min-width: 480px) {} -@MEDIA screen and (min-width: 480px) {} -@media screen and (min-width: 480px) {} -@media screen and (min-width: 480px) {} -@media screen and (min-width :480px) {} -@media screen and (min-width : 480px) {} -@media screen and (min-width : 480px) {} -@media - screen - and - (min-width - : - 480px) {} -@media screen and ( min-width: 480px) {} -@media screen and (min-width: 480px ) {} -@media screen and ( min-width: 480px ) {} -@media screen and ( min-width: 480px ) {} -@media not screen and (color), print and (color) { } -@media not screen and (color) , print and (color) { } -@media not screen and (color),print and (color) { } -@media not screen and (color) , print and (color) { } -@media not screen and (color) , print and (color) { } -@media not screen and ( color), print and (color) { } -@media not screen and (color ), print and (color) { } -@media not screen and ( color ), print and (color) { } -@media not screen and ( color ), print and (color) { } -@media (--small-viewport) {} -@media -( ---small-viewport -) -{ -} -@media - -( - ---small-viewport - -) - -{ - -} - -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { -@media screen { -color: green; - -@media (min-width: 768px) { -color: red; -} -} -@media tv { -color: black; -} -} -.screen-color{ - @media screen{ - color: green; - - @media (min-width: 768px){ - color: red; - } - } - @media tv{ - color: black; - } -} -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color -{ -@media -screen -{ -color -: -green -; -@media -( -min-width -: -768px -) -{ -color -: -red -; -} -} -@media -tv -{ -color -: -black -; -} -} -.screen-color - -{ - -@media - -screen - -{ - -color - -: - -green - -; - -@media - -( - -min-width - -: - -768px - -) - -{ - -color - -: - -red - -; - -} - -} - -@media - -tv - -{ - -color - -: - -black - -; - -} - -} - -@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {} - -=====================================output===================================== -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media screen and (min-width: 480px) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media not screen and (color), print and (color) { -} -@media (--small-viewport) { -} -@media (--small-viewport) { -} -@media (--small-viewport) { -} - -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { - @media screen { - color: green; - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} -.screen-color { - @media screen { - color: green; - - @media (min-width: 768px) { - color: red; - } - } - - @media tv { - color: black; - } -} - -@media all and (-webkit-min-device-pixel-ratio: 1.5), - all and (-o-min-device-pixel-ratio: 3/2), - all and (min--moz-device-pixel-ratio: 1.5), - all and (min-device-pixel-ratio: 1.5) { -} - -================================================================================ -`; - -exports[`mixin.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@mixin clearfix {} -@mixin clearfix{} -@mixin clearfix {} -@mixin clearfix - {} -@mixin - clearfix - {} -@mixin -clearfix -{ -} -@mixin - -clearfix - -{ - -} - -@mixin mix($arg, $arg1, $arg2: 10, $args...) {} -@mixin mix($arg,$arg1,$arg2:10,$args...){} -@mixin mix ( $arg , $arg1 , $arg2 : 10 , $args ... ) {} -@mixin mix ( $arg , $arg1 , $arg2 : 10 , $args ... ) {} -@mixin mix( - $arg, - $arg1, - $arg2: 10, - $args... -) {} -@mixin -mix( - $arg, - $arg1, - $arg2: 10, - $args... - ) {} -@mixin -mix -( -$arg -, -$arg1 -, -$arg2 -: -10 -, -$args -... -) -{ -} -@mixin - -mix - -( - -$arg - -, - -$arg1 - -, - -$arg2 - -: - -10 - -, - -$args - -... - -) - -{ -} -@mixin mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args...) {} -@mixin component($conf: ()) {} -@mixin component($conf: ( )) {} -@mixin button-variant($hover-background: darken($background, 7.5%)) {} -@mixin button-variant( $hover-background : darken( $background , 7.5% ) ) {} -@mixin button-variant($hover-background:darken($background,7.5%)) {} -@mixin button-variant( - $hover-background: darken($background, 7.5%) -) {} -@mixin -button-variant( -$hover-background -: -darken( -$background -, -7.5% -) -) -{} -@mixin button-variant($foo: "...") {} -@mixin button-variant($foo: " ... ") {} -@mixin button-variant($foo: " ... ") {} -@mixin sexy-border($color, $width, $foo: (color: red)) {} - -@mixin selector($param: "value") {} - -=====================================output===================================== -@mixin clearfix { -} -@mixin clearfix { -} -@mixin clearfix { -} -@mixin clearfix { -} -@mixin clearfix { -} -@mixin clearfix { -} -@mixin clearfix { -} - -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix($arg, $arg1, $arg2: 10, $args...) { -} -@mixin mix( - $arg, - $arg1, - $arg2: 10, - - $args... -) { -} -@mixin mix( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: - 10, - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args... -) { -} -@mixin component($conf: ()) { -} -@mixin component($conf: ()) { -} -@mixin button-variant($hover-background: darken($background, 7.5%)) { -} -@mixin button-variant($hover-background: darken($background, 7.5%)) { -} -@mixin button-variant($hover-background: darken($background, 7.5%)) { -} -@mixin button-variant($hover-background: darken($background, 7.5%)) { -} -@mixin button-variant($hover-background: darken($background, 7.5%)) { -} -@mixin button-variant($foo: "...") { -} -@mixin button-variant($foo: " ... ") { -} -@mixin button-variant($foo: " ... ") { -} -@mixin sexy-border($color, $width, $foo: (color: red)) { -} - -@mixin selector($param: "value") { -} - -================================================================================ -`; - -exports[`namespaces.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@namespace toto "http://toto.example.org"; -@namespace toto url("http://toto.example.org"); -@namespace toto "http://toto.example.org" ; -@namespace toto "http://toto.example.org" ; -@namespace -toto -"http://toto.example.org" -; -@namespace - -toto - -"http://toto.example.org" - -; -@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; -@namespace -very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace -"http://toto.example.org" -; -@namespace - -very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace - -"http://toto.example.org" - -; -@namespace "http://example.com/foo"; -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo") ; -@namespace url("http://example.com/foo") ; -@namespace -url("http://example.com/foo"); -@namespace - -url("http://example.com/foo"); -@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); -@namespace -url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); -@namespace - -url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); - -=====================================output===================================== -@namespace toto "http://toto.example.org"; -@namespace toto url("http://toto.example.org"); -@namespace toto "http://toto.example.org"; -@namespace toto "http://toto.example.org"; -@namespace toto "http://toto.example.org"; -@namespace toto "http://toto.example.org"; -@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; -@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; -@namespace very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-namespace "http://toto.example.org"; -@namespace "http://example.com/foo"; -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo"); -@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); -@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); -@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very"); - -================================================================================ -`; - -exports[`page.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@page { - margin: 1cm; -} -@page { -margin: 1cm; -} -@page{ -margin: 1cm; -} -@page { - margin: 1cm; -} -@page -{ -margin -: -1cm -; -} -@page - -{ - -margin -: - -1cm - -; - -} -@page :first { - margin: 2cm; -} -@page :first { -margin: 2cm; -} -@page :first{ - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page -:first -{ -margin -: -2cm -; -} -@page - -:first - -{ - -margin - -: - -2cm - -; - -} -@page vertical { - size: A4 portrait; -} - -=====================================output===================================== -@page { - margin: 1cm; -} -@page { - margin: 1cm; -} -@page { - margin: 1cm; -} -@page { - margin: 1cm; -} -@page { - margin: 1cm; -} -@page { - margin: 1cm; -} -@page :first { - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page :first { - margin: 2cm; -} -@page vertical { - size: A4 portrait; -} - -================================================================================ -`; - -exports[`return.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { -@return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { -@return $n*$grid-width+($n-1)*$gutter-width/10; -} -@function grid-width($n) { - @return $n * $grid-width + ( $n - 1 ) * $gutter-width / 10 ; -} -@function grid-width($n) { - @return $n * $grid-width + ( $n - 1 ) * $gutter-width / 10 ; -} -@function grid-width($n) { - @return $n - * - $grid-width - + ( - $n - - - 1 - ) - * - $gutter-width - / - 10 - ; -} -@function grid-width($n) { - @return - $n - * - $grid-width - + ( - $n - - - 1 - ) - * - $gutter-width - / - 10 - ; -} -@function -grid-width( -$n -) -{ -@return -$n -* -$grid-width -+ -( -$n -- -1 -) -* -$gutter-width -/ -10 -; -} -@function - -grid-width( - -$n - -) - -{ - -@return - -$n - -* - -$grid-width - -+ - -( - -$n - -- - -1 - -) - -* - -$gutter-width - -/ - -10 - -; - -} -@function grid-width($n) { - @return $very-very-very-very-very-very-vey-long-var * $very-very-very-very-very-very-vey-long-var + ($very-very-very-very-very-very-vey-long-var - 1) * $very-very-very-very-very-very-vey-long-var; -} -@function extend($obj, $ext-obj) { - @return map-merge($obj, $ext-obj); -} -@function extend($obj, $ext-obj) { - @return map-merge( $obj , $ext-obj ) ; -} -@function extend($obj, $ext-obj) { - @return map-merge($obj,$ext-obj); -} -@function extend($obj, $ext-obj) { - @return - map-merge( - $obj - , - $ext-obj - ) - ; -} - -=====================================output===================================== -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n-1) * $gutter-width/10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $n * $grid-width + ($n - 1) * $gutter-width / 10; -} -@function grid-width($n) { - @return $very-very-very-very-very-very-vey-long-var * - $very-very-very-very-very-very-vey-long-var + - ($very-very-very-very-very-very-vey-long-var - 1) * - $very-very-very-very-very-very-vey-long-var; -} -@function extend($obj, $ext-obj) { - @return map-merge($obj, $ext-obj); -} -@function extend($obj, $ext-obj) { - @return map-merge($obj, $ext-obj); -} -@function extend($obj, $ext-obj) { - @return map-merge($obj, $ext-obj); -} -@function extend($obj, $ext-obj) { - @return map-merge($obj, $ext-obj); -} - -================================================================================ -`; - -exports[`supports.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@supports (transform-origin: 5% 5%) {} -@supports (transform-origin:5% 5%) {} -@supports ( transform-origin : 5% 5% ) {} -@supports ( transform-origin : 5% 5% ) {} -@supports - (transform-origin: 5% 5%) {} -@supports -(transform-origin: 5% 5%) {} -@supports -( -transform-origin -: -5% -5% -) {} -@supports - -( - -transform-origin - -: - -5% - -5% - -) - -{} -@supports (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} -@supports - (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} -@supports -( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) {} -@supports - -( - -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop - -: - -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value - -) - -{} -@supports not(transform-origin: 10em 10em 10em) {} -@supports not (transform-origin: 10em 10em 10em) {} -@supports not ( transform-origin : 10em 10em 10em ) {} -@supports not ( transform-origin : 10em 10em 10em ) {} -@supports not - (transform-origin: 10em 10em 10em) {} -@supports - not (transform-origin: 10em 10em 10em) {} -@supports - not - (transform-origin: 10em 10em 10em) {} -@supports -not -( -transform-origin -: -10em -10em -10em -) {} -@supports - -not - -( - -transform-origin - -: - -10em - -10em - -10em - -) - -{} -@supports not (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} -@supports - not (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} -@supports not - (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value) {} -@supports -not -( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) {} -@supports - -not - -( - -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop - -: - -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value - -) - -{} -@supports not (not (transform-origin: 2px)) {} -@supports not(not(transform-origin:2px)) {} -@supports not ( not ( transform-origin : 2px ) ) {} -@supports not ( not ( transform-origin : 2px ) ) {} -@supports not - (not (transform-origin: 2px)) {} -@supports not - ( - not (transform-origin: 2px) - ) {} -@supports -not -( -not -( -transform-origin -: -2px -) -) {} -@supports - -not - -( - -not - -( - -transform-origin - -: - -2px - -) - -) - -{} -@supports (display: flexbox) and (not (display: inline-grid)) {} -@supports (display: table-cell) and (display: list-item) {} -@supports ( display : table-cell ) and ( display : list-item ) {} -@supports ( display : table-cell ) and ( display : list-item ) {} -@supports - (display: table-cell) and (display: list-item) {} -@supports (display: table-cell) and - (display: list-item) {} -@supports (display: table-cell) - and (display: list-item) {} -@supports -( -display -: -table-cell -) -and -( -display -: -list-item -) {} -@supports - -( - -display - -: - -table-cell - -) - -and - -( - -display - -: - -list-item - -) - -{} -@supports (display: table-cell) and (display: list-item) and (display: run-in) {} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) {} -@supports - (display: table-cell) and ((display: list-item) and (display: run-in)) {} -@supports (display: table-cell) - and ((display: list-item) - and (display: run-in)) {} -@supports (display: table-cell) and - ((display: list-item) and - (display: run-in)) {} -@supports -( -display -: -table-cell -) -and -( -( -display -: -list-item -) -and -( -display -: -run-in -) -) {} -@supports - -( - -display - -: - -table-cell - -) - -and - -( - -( - -display - -: - -list-item - -) - -and - -( - -display - -: - -run-in - -) - -) - -{} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) {} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve) {} -@supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} -@supports not((text-align-last:justify)or(-moz-text-align-last:justify)){ } -@supports not((text-align-last:justify)and(-moz-text-align-last:justify)){ } -@supports (--foo:green) {} - -@supports selector(:after) {} -@supports selector(:focus) {} -@supports selector(:focus-visible) {} -@supports selector(A>B) {} -@supports selector(A > B) {} -@supports selector(A > - B) {} -@supports selector(A -> -B -) {} -@supports selector( -A -< -B -) {} -@supports selector(.a:not(.b)){} -@supports selector(:not(.b)){} -@supports not selector(:after){ -} -@supports (--foo:green) and selector(:after){ -} -@supports selector(:before) and selector(:focus-visible){ -} -@supports selector(:not(.a,.b)) and selector(:focus-visible){ -} -@supports selector(.a,.b){ - -} -@supports selector(){ - -} - -@supports selector(:focus-visible) { - button:focus { - outline: none; - } - - button:focus-visible { - outline: 2px solid orange; - } -} - -@supports selector(:not(.a,.b)) { -} - -@supports selector(:not(.a,.b), :not(.b,.c)) { -} -@supports selector(:not(.a,.b), .b, .c) { -} - -@supports selector( - :not( - .a,.b) - ) { -} -@supports selector( - :not( - .a,.b - ) - ) { -} -@supports selector(.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas, -.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas){ -} -@supports selector(.parent>.child ){ -} -@supports selector(> .child-one){ -} -@supports selector(.parent ~ .child){ -} -@supports selector(ns|* ){ -} -@supports selector(svg|a ){ -} -@supports selector(|B ){ -} -@supports selector(*|*){ -} -@supports selector(|*){ -} -@supports selector(.a,.b,:not(asdasldaskdhjkashdahsdkjahskdjhakj,asdasldaskdhjkashdahsdkjahskdjhakj)){ -} -@supports not (selector(:before) or not (not (selector(:before)))) { -} -@supports selector(selector(:focus-visible)) {} -@supports selector(:::selector(:focus-visible)) {} -@supports selector(--selector(:focus-visible)) {} -@supports not (transform-origin: 10em 10em 10em) {} -@supports not (not (transform-origin: 2px)) {} -@supports (display: grid) and (not (display: inline-grid)) {} -@supports (display: table-cell) and (display: list-item) and (display:run-in) {} -@supports (display: table-cell) and ((display: list-item) and (display:run-in)) {} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) {} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) or - (-o-transform-style: preserve) or (-webkit-transform-style: preserve) {} - -@supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or - ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} - -=====================================output===================================== -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports (transform-origin: 5% 5%) { -} -@supports ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-prop: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value -) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports (display: flexbox) and (not (display: inline-grid)) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) { -} -@supports (display: table-cell) and (display: list-item) and (display: run-in) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) { -} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) or - (-o-transform-style: preserve) or (-webkit-transform-style: preserve) { -} -@supports (transform-style: preserve-3d) or - ( - (-moz-transform-style: preserve-3d) or - ( - (-o-transform-style: preserve-3d) or - (-webkit-transform-style: preserve-3d) - ) - ) { -} -@supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) { -} -@supports not ((text-align-last: justify) and (-moz-text-align-last: justify)) { -} -@supports (--foo: green) { -} - -@supports selector(:after) { -} -@supports selector(:focus) { -} -@supports selector(:focus-visible) { -} -@supports selector(A > B) { -} -@supports selector(A > B) { -} -@supports selector(A > B) { -} -@supports selector(A > B) { -} -@supports selector(A < B) { -} -@supports selector(.a:not(.b)) { -} -@supports selector(:not(.b)) { -} -@supports not selector(:after) { -} -@supports (--foo: green) and selector(:after) { -} -@supports selector(:before) and selector(:focus-visible) { -} -@supports selector(:not(.a, .b)) and selector(:focus-visible) { -} -@supports selector( - .a, - .b -) { -} -@supports selector() { -} - -@supports selector(:focus-visible) { - button:focus { - outline: none; - } - - button:focus-visible { - outline: 2px solid orange; - } -} - -@supports selector(:not(.a, .b)) { -} - -@supports selector( - :not(.a, .b), - :not(.b, .c) -) { -} -@supports selector( - :not(.a, .b), - .b, - .c -) { -} - -@supports selector(:not(.a, .b)) { -} -@supports selector(:not(.a, .b)) { -} -@supports selector( - .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas - .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas, - .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas - .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas -) { -} -@supports selector(.parent > .child) { -} -@supports selector(> .child-one) { -} -@supports selector(.parent ~ .child) { -} -@supports selector(ns|*) { -} -@supports selector(svg|a) { -} -@supports selector(|B) { -} -@supports selector(*|*) { -} -@supports selector(|*) { -} -@supports selector( - .a, - .b, - :not(asdasldaskdhjkashdahsdkjahskdjhakj, asdasldaskdhjkashdahsdkjahskdjhakj) -) { -} -@supports not (selector(:before) or not (not (selector(:before)))) { -} -@supports selector(selector(:focus-visible)) { -} -@supports selector(:::selector(:focus-visible)) { -} -@supports selector(--selector(:focus-visible)) { -} -@supports not (transform-origin: 10em 10em 10em) { -} -@supports not (not (transform-origin: 2px)) { -} -@supports (display: grid) and (not (display: inline-grid)) { -} -@supports (display: table-cell) and (display: list-item) and (display: run-in) { -} -@supports (display: table-cell) and ((display: list-item) and (display: run-in)) { -} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) { -} -@supports (transform-style: preserve) or (-moz-transform-style: preserve) or - (-o-transform-style: preserve) or (-webkit-transform-style: preserve) { -} - -@supports (transform-style: preserve-3d) or - ( - (-moz-transform-style: preserve-3d) or - ( - (-o-transform-style: preserve-3d) or - (-webkit-transform-style: preserve-3d) - ) - ) { -} - -================================================================================ -`; - -exports[`viewport.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { -min-width: 640px; -max-width: 800px; -} - -@viewport{ - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport -{ -min-width -: -640px -; -max-width -: -800px -; -} - -@viewport - -{ - -min-width - -: - -640px - -; - -max-width - -: - -800px - -; - -} - -=====================================output===================================== -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - max-width: 800px; -} - -@viewport { - min-width: 640px; - - max-width: 800px; -} - -================================================================================ -`; - -exports[`while.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@while $i > 0 {} -@while $i>0{} -@while $i > 0 {} -@while $i - > - 0 - {} -@while - $i - > - 0 - {} -@while -$i -> -0 -{ -} -@while - -$i - -> - -0 - -{ - -} -@while ($i > 0) {} -@while ($i>0){} -@while ( $i > 0 ) {} -@while ( $i > 0 ) {} -@while ( - $i > 0 -) {} -@while - ($i > 0) {} -@while -( -$i -> -0 -) -{ -} -@while - -( - -$i - -> - -0 - -) - -{ - -} -@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 {} -@while 1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} -@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} -@while (($i) > (0)) {} -@while (($i)>(0)){} -@while ( ( $i ) > ( 0 ) ) {} -@while (($i) - > - (0) -) {} -@while -( -( -$i -) -> -( -0 -) -) -{ -} -@while - -( - -( - -$i - -) - -> - -( - -0 - -) - -) - -{ - -} -@while ($very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} -@while (1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} -@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} -@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} - -=====================================output===================================== -@while $i > 0 { -} -@while $i>0 { -} -@while $i > 0 { -} -@while $i > 0 { -} -@while $i > 0 { -} -@while $i > 0 { -} -@while $i > 0 { -} -@while ($i > 0) { -} -@while ($i>0) { -} -@while ($i > 0) { -} -@while ($i > 0) { -} -@while ($i > 0) { -} -@while ($i > 0) { -} -@while ($i > 0) { -} -@while ($i > 0) { -} -@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > - 1 -{ -} -@while 1 > - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var -{ -} -@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > - $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var -{ -} -@while (($i) > (0)) { -} -@while (($i) >(0)) { -} -@while (($i) > (0)) { -} -@while (($i) > (0)) { -} -@while (($i) > (0)) { -} -@while (($i) > (0)) { -} -@while ( - $very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 -) { -} -@while ( - 1 > - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var -) { -} -@while ( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > - 1 -) { -} -@while ( - $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > - $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var -) { -} - -================================================================================ -`; diff --git a/tests/format/css/atrule/format.test.js b/tests/format/css/atrule/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/atrule/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/atrule/jsfmt.spec.js b/tests/format/css/atrule/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/atrule/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/attribute/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/attribute/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/attribute/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/attribute/__snapshots__/format.test.js.snap diff --git a/tests/format/css/attribute/format.test.js b/tests/format/css/attribute/format.test.js new file mode 100644 index 000000000000..248fee62a15f --- /dev/null +++ b/tests/format/css/attribute/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["css"]); +runFormatTest(import.meta, ["css"], { singleQuote: true }); diff --git a/tests/format/css/attribute/jsfmt.spec.js b/tests/format/css/attribute/jsfmt.spec.js deleted file mode 100644 index a1f5dde8bcea..000000000000 --- a/tests/format/css/attribute/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["css"]); -run_spec(__dirname, ["css"], { singleQuote: true }); diff --git a/tests/format/css/atword/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/atword/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/atword/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/atword/__snapshots__/format.test.js.snap diff --git a/tests/format/css/atword/format.test.js b/tests/format/css/atword/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/atword/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/atword/jsfmt.spec.js b/tests/format/css/atword/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/atword/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/bom/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/bom/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/bom/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/bom/__snapshots__/format.test.js.snap diff --git a/tests/format/css/bom/format.test.js b/tests/format/css/bom/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/bom/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/bom/jsfmt.spec.js b/tests/format/css/bom/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/bom/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/case/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/case/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/case/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/case/__snapshots__/format.test.js.snap diff --git a/tests/format/css/case/format.test.js b/tests/format/css/case/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/case/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/case/jsfmt.spec.js b/tests/format/css/case/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/case/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/character-escaping/__snapshots__/format.test.js.snap b/tests/format/css/character-escaping/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..045c291781da --- /dev/null +++ b/tests/format/css/character-escaping/__snapshots__/format.test.js.snap @@ -0,0 +1,169 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`character_escaping.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +#♥ {} +#© {} +#“‘’” {} +#☺☃ {} +#⌘⌥ {} +#𝄞♪♩♫♬ {} +#💩 {} +#\\? {} +#\\@ {} +#\\. {} +#\\3A \\) {} +#\\3A \\\`\\( {} +#\\31 23 {} +#\\31 a2b3c {} +#\\ {} +#\\<\\>\\<\\<\\<\\>\\>\\<\\> {} +#\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. {} +#\\# {} +#\\#\\# {} +#\\#\\.\\#\\.\\# {} +#\\#fake-id {} /* matches the element with id="#fake-id" */ +#\\_ {} +#\\{\\} {} +#\\.fake\\-class {} +#foo\\.bar {} +#\\3A hover {} +#\\3A hover\\3A focus\\3A active {} +#\\[attr\\=value\\] {} +#f\\/o\\/o {} +#f\\\\o\\\\o {} +#f\\*o\\*o {} +#f\\!o\\!o {} +#f\\'o\\'o {} +#f\\~o\\~o {} +#f\\+o\\+o {} +#-a-b-c- {} +#a\\\\b {} + +@keyframes \\@mymove { + from {top: 0px;} + to {top: 200px;} +} + +.foo { + animation-name: \\@mymove; + content: "\\21D3"; +} + +/* Ignore escape "\\" in CSS classes */ +.bar\\/baz { + animation-name: \\@mymove; + content: "\\21D3"; +} + +.grid { + grid-template-rows: + [row-1-00\\:00] auto; +} + +=====================================output===================================== +#♥ { +} +#© { +} +#“‘’” { +} +#☺☃ { +} +#⌘⌥ { +} +#𝄞♪♩♫♬ { +} +#💩 { +} +#\\? { +} +#\\@ { +} +#\\. { +} +#\\3A \\) { +} +#\\3A \\\`\\( { +} +#\\31 23 { +} +#\\31 a2b3c { +} +#\\ { +} +#\\<\\>\\<\\<\\<\\>\\>\\<\\> { +} +#\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { +} +#\\# { +} +#\\#\\# { +} +#\\#\\.\\#\\.\\# { +} +#\\#fake-id { +} /* matches the element with id="#fake-id" */ +#\\_ { +} +#\\{\\} { +} +#\\.fake\\-class { +} +#foo\\.bar { +} +#\\3A hover { +} +#\\3A hover\\3A focus\\3A active { +} +#\\[attr\\=value\\] { +} +#f\\/o\\/o { +} +#f\\\\o\\\\o { +} +#f\\*o\\*o { +} +#f\\!o\\!o { +} +#f\\'o\\'o { +} +#f\\~o\\~o { +} +#f\\+o\\+o { +} +#-a-b-c- { +} +#a\\\\b { +} + +@keyframes \\@mymove { + from { + top: 0px; + } + to { + top: 200px; + } +} + +.foo { + animation-name: \\@mymove; + content: "\\21D3"; +} + +/* Ignore escape "\\" in CSS classes */ +.bar\\/baz { + animation-name: \\@mymove; + content: "\\21D3"; +} + +.grid { + grid-template-rows: [row-1-00\\:00] auto; +} + +================================================================================ +`; diff --git a/tests/format/css/character-escaping/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/character-escaping/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f1ad30870b79..000000000000 --- a/tests/format/css/character-escaping/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,169 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`character_escaping.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -#♥ {} -#© {} -#“‘’” {} -#☺☃ {} -#⌘⌥ {} -#𝄞♪♩♫♬ {} -#💩 {} -#\\? {} -#\\@ {} -#\\. {} -#\\3A \\) {} -#\\3A \\\`\\( {} -#\\31 23 {} -#\\31 a2b3c {} -#\\ {} -#\\<\\>\\<\\<\\<\\>\\>\\<\\> {} -#\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. {} -#\\# {} -#\\#\\# {} -#\\#\\.\\#\\.\\# {} -#\\#fake-id {} /* matches the element with id="#fake-id" */ -#\\_ {} -#\\{\\} {} -#\\.fake\\-class {} -#foo\\.bar {} -#\\3A hover {} -#\\3A hover\\3A focus\\3A active {} -#\\[attr\\=value\\] {} -#f\\/o\\/o {} -#f\\\\o\\\\o {} -#f\\*o\\*o {} -#f\\!o\\!o {} -#f\\'o\\'o {} -#f\\~o\\~o {} -#f\\+o\\+o {} -#-a-b-c- {} -#a\\\\b {} - -@keyframes \\@mymove { - from {top: 0px;} - to {top: 200px;} -} - -.foo { - animation-name: \\@mymove; - content: "\\21D3"; -} - -/* Ignore escape "\\" in CSS classes */ -.bar\\/baz { - animation-name: \\@mymove; - content: "\\21D3"; -} - -.grid { - grid-template-rows: - [row-1-00\\:00] auto; -} - -=====================================output===================================== -#♥ { -} -#© { -} -#“‘’” { -} -#☺☃ { -} -#⌘⌥ { -} -#𝄞♪♩♫♬ { -} -#💩 { -} -#\\? { -} -#\\@ { -} -#\\. { -} -#\\3A \\) { -} -#\\3A \\\`\\( { -} -#\\31 23 { -} -#\\31 a2b3c { -} -#\\ { -} -#\\<\\>\\<\\<\\<\\>\\>\\<\\> { -} -#\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { -} -#\\# { -} -#\\#\\# { -} -#\\#\\.\\#\\.\\# { -} -#\\#fake-id { -} /* matches the element with id="#fake-id" */ -#\\_ { -} -#\\{\\} { -} -#\\.fake\\-class { -} -#foo\\.bar { -} -#\\3A hover { -} -#\\3A hover\\3a focus\\3a active { -} -#\\[attr\\=value\\] { -} -#f\\/o\\/o { -} -#f\\\\o\\\\o { -} -#f\\*o\\*o { -} -#f\\!o\\!o { -} -#f\\'o\\'o { -} -#f\\~o\\~o { -} -#f\\+o\\+o { -} -#-a-b-c- { -} -#a\\\\b { -} - -@keyframes \\@mymove { - from { - top: 0px; - } - to { - top: 200px; - } -} - -.foo { - animation-name: \\@mymove; - content: "\\21D3"; -} - -/* Ignore escape "\\" in CSS classes */ -.bar\\/baz { - animation-name: \\@mymove; - content: "\\21D3"; -} - -.grid { - grid-template-rows: [row-1-00\\:00] auto; -} - -================================================================================ -`; diff --git a/tests/format/css/character-escaping/format.test.js b/tests/format/css/character-escaping/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/character-escaping/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/character-escaping/jsfmt.spec.js b/tests/format/css/character-escaping/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/character-escaping/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/colon/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/colon/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/colon/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/colon/__snapshots__/format.test.js.snap diff --git a/tests/format/css/colon/format.test.js b/tests/format/css/colon/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/colon/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/colon/jsfmt.spec.js b/tests/format/css/colon/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/colon/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/color/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/color/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/color/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/color/__snapshots__/format.test.js.snap diff --git a/tests/format/css/color/format.test.js b/tests/format/css/color/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/color/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/color/jsfmt.spec.js b/tests/format/css/color/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/color/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/combinator/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/combinator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/combinator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/combinator/__snapshots__/format.test.js.snap diff --git a/tests/format/css/combinator/format.test.js b/tests/format/css/combinator/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/combinator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/combinator/jsfmt.spec.js b/tests/format/css/combinator/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/combinator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/comments/15948.css b/tests/format/css/comments/15948.css new file mode 100644 index 000000000000..1937a1c1dbe0 --- /dev/null +++ b/tests/format/css/comments/15948.css @@ -0,0 +1,12 @@ +h1 { + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; +} diff --git a/tests/format/css/comments/__snapshots__/format.test.js.snap b/tests/format/css/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..330099c3315f --- /dev/null +++ b/tests/format/css/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,1097 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`15948.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +h1 { + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; +} + +=====================================output===================================== +h1 { + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; + --OFF: /* OFF */; +} + +================================================================================ +`; + +exports[`CRLF.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* + * Comment 1 + */ +#header { + /* + * Comment 2 + */ + color: red; +} + +@media only screen and (max-width: 600px) { + /* + * Comment 3 + */ + body { + background-color: lightblue; /* Comment 4 */ + color: red; /* Comment 5 */ + } +} + +=====================================output===================================== +/* + * Comment 1 + */ +#header { + /* + * Comment 2 + */ + color: red; +} + +@media only screen and (max-width: 600px) { + /* + * Comment 3 + */ + body { + background-color: lightblue; /* Comment 4 */ + color: red; /* Comment 5 */ + } +} + +================================================================================ +`; + +exports[`at-rules.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@charset "utf-8"; /* comment 1 */ + +@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print /* comment 4 */; /* comment 5 */ +@import /* comment 6 */ url("bluish.css") /* comment 7 */ projection /* comment 8 */, /* comment 9 */ tv /* comment 10 */; +/* comment 11 */ @import /* comment 12 */ + /* comment 13 */ url("bluish.css") /* comment 14 */ + /* comment 15 */ projection /* comment 16 */, + /* comment 17 */ tv /* comment 18 */; /* comment 19 */ +/* comment 20 */ +@import/* comment 21 */url("bluish.css")/* comment 22 */projection/* comment 23 */,/* comment 24 */tv/* comment 25 */; +@import /* comment 26 */'custom.css'/* comment 27 */;/* comment 28 */ +@import /* comment 29 */ url('landscape.css') /* comment 30 */ screen /* comment 31 */ and /* comment 32 */ (/* comment 33 */orientation/* comment 34 */:/* comment 35 */landscape/* comment 36 */)/* comment 37 */; + +@namespace /* comment 38 */ url(http://www.w3.org/1999/xhtml) /* comment 39 */ ; +@namespace /* comment 40 */ svg /* comment 41 */ url(http://www.w3.org/2000/svg) /* comment 42 */; + +@keyframes /* comment 43 */ slidein /* comment 44 */ {} + +/* comment 45 */ @font-feature-values /* comment 46 */ Font Two /* comment 47 */ { /* comment 48 */ + /* comment 49 */ @styleset /* comment 50 */ { /* comment 51 */ + nice-style: 4; + /* comment 52 */ } /* comment 53 */ +/* comment 54 */ } /* comment 55 */ + +/* comment 56 */ @counter-style /* comment 57 */ thumbs /* comment 58 */ {} + +/* comment 59 */ @viewport /* comment 60 */ {} + +@page /* comment 61 */ {} +@page /* comment 62 */ :first /* comment 63 */ {} +@page /* comment 64 */ vertical /* comment 65 */ {} + +/* comment 66 */ @media /* comment 67 */ print /* comment 68 */ {} +@media /* comment 69 */ screen /* comment 70 */ , /* comment 71 */ print /* comment 72 */ {} /* comment 73 */ +@media /* comment 74 */ only /* comment 75 */ screen /* comment 76 */ and /* comment 77 */ ( /* comment 78 */ min-width /* comment 79 */ : /* comment 80 */ 320px /* comment 81 */ ) /* comment 82 */ and /* comment 83 */ ( /* comment 84 */ max-width /* comment 85 */ : /* comment 86 */ 480px /* comment 87 */ ) /* comment 88 */ and /* comment 89 */ ( /* comment 90 */ resolution /* comment 91 */ : /* comment 92 */ 150dpi /* comment 93 */ ) /* comment 94 */ {} +@media/* comment 95 */only/* comment 96 */screen/* comment 97 */and/* comment 98 */(/* comment 99 */min-width/* comment 100 */:/* comment 101 */320px/* comment 102 */)/* comment 103 */and/* comment 104 */(/* comment 105 */max-width/* comment 106 */:/* comment 107 */480px/* comment 108 */)/* comment 109 */and/* comment 110 */(/* comment 111 */resolution/* comment 112 */:/* comment 113 */150dpi/* comment 114 */)/* comment 115 */{} +/* comment 116 */@media/* comment 117 */ + /* comment 118 */only/* comment 119 */ + /* comment 120 */screen/* comment 121 */ + /* comment 122 */and/* comment 123 */ + /* comment 124 */(/* comment 125 */ + /* comment 126 */min-width/* comment 127 */ + /* comment 128 */:/* comment 129 */ + /* comment 130 */320px/* comment 131 */ + /* comment 132 */)/* comment 133 */ + /* comment 134 */and/* comment 135 */ + /* comment 136 */(/* comment 137 */ + /* comment 138 */max-width/* comment 139 */ + /* comment 140 */:/* comment 141 */ + /* comment 142 */480px/* comment 143 */ + /* comment 144 */)/* comment 145 */ + /* comment 146 */and/* comment 147 */ + /* comment 148 */(/* comment 149 */ + /* comment 150 */resolution/* comment 151 */ + /* comment 152 */:/* comment 153 */ + /* comment 154 */150dpi/* comment 155 */ + /* comment 156 */)/* comment 157 */ + /* comment 158 */{}/* comment 159 */ + +@supports /* comment 160 */ ( /* comment 161 */ display /* comment 162 */ : /* comment 163 */ flex /* comment 164 */ ) /* comment 165 */ {} +@supports /* comment 166 */ not /* comment 167 */ ( /* comment 168 */ display /* comment 169 */ : /* comment 170 */ flex /* comment 171 */ ) /* comment 172 */ {} +@supports /* comment 173 */ (/* comment 174 */ display /* comment 175 */ : /* comment 176 */ table-cell /* comment 177 */ ) /* comment 178 */ and /* comment 179 */ ( /* comment 180 */ display /* comment 181 */ : /* comment 182 */ list-item /* comment 183 */ ) /* comment 184 */ and /* comment 185 */ ( /* comment 186 */display /* comment 187 */ : /* comment 188 */ run-in /* comment 189 */ ) /* comment 190 */ {} +@supports /* comment 191 */ (/* comment 192 */ --foo /* comment 193 */ : /* comment 194 */ green /* comment 195 */ ) /* comment 196 */ {} + +/* comment 197 */ @supports /* comment 198 */ ( /* comment 199 */ display /* comment 200 */ : /* comment 201 */ flex /* comment 202 */ ) /* comment 203 */ { + /* comment 204 */ @media /* comment 205 */ screen /* comment 206 */ and /* comment 207 */ ( /* comment 208 */ min-width /* comment 209 */ : /* comment 210 */ 900px /* comment 211 */ ) /* comment 212 */ { + /* comment 213 */ } /* comment 214 */ +/* comment 215 */ } /* comment 216 */ + + +=====================================output===================================== +@charset "utf-8"; /* comment 1 */ + +@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print + /* comment 4 */; /* comment 5 */ +@import /* comment 6 */ url("bluish.css") /* comment 7 */ projection + /* comment 8 */, + /* comment 9 */ tv /* comment 10 */; +/* comment 11 */ +@import /* comment 12 */ /* comment 13 */ url("bluish.css") /* comment 14 */ + /* comment 15 */ projection /* comment 16 */, + /* comment 17 */ tv /* comment 18 */; /* comment 19 */ +/* comment 20 */ +@import /* comment 21 */ url("bluish.css") /* comment 22 */ projection + /* comment 23 */, + /* comment 24 */ tv /* comment 25 */; +@import /* comment 26 */ "custom.css" /* comment 27 */; /* comment 28 */ +@import /* comment 29 */ url("landscape.css") /* comment 30 */ screen + /* comment 31 */ and /* comment 32 */ + ( + /* comment 33 */ orientation /* comment 34 */: /* comment 35 */ landscape + /* comment 36 */ + ) + /* comment 37 */; + +@namespace /* comment 38 */ url(http://www.w3.org/1999/xhtml) /* comment 39 */; +@namespace /* comment 40 */ svg /* comment 41 */ url(http://www.w3.org/2000/svg) /* comment 42 */; + +@keyframes /* comment 43 */ slidein /* comment 44 */ { +} + +/* comment 45 */ +@font-feature-values /* comment 46 */ Font Two /* comment 47 */ { + /* comment 48 */ + /* comment 49 */ + @styleset /* comment 50 */ { + /* comment 51 */ + nice-style: 4; + /* comment 52 */ + } /* comment 53 */ + /* comment 54 */ +} /* comment 55 */ + +/* comment 56 */ +@counter-style /* comment 57 */ thumbs /* comment 58 */ { +} + +/* comment 59 */ +@viewport /* comment 60 */ { +} + +@page /* comment 61 */ { +} +@page /* comment 62 */ :first /* comment 63 */ { +} +@page /* comment 64 */ vertical /* comment 65 */ { +} + +/* comment 66 */ +@media /* comment 67 */ print /* comment 68 */ { +} +@media /* comment 69 */ screen /* comment 70 */, + /* comment 71 */ print /* comment 72 */ { +} /* comment 73 */ +@media /* comment 74 */ only /* comment 75 */ screen /* comment 76 */ and /* comment 77 */ (/* comment 78 */ min-width /* comment 79 */: /* comment 80 */ 320px /* comment 81 */) /* comment 82 */ and /* comment 83 */ (/* comment 84 */ max-width /* comment 85 */: /* comment 86 */ 480px /* comment 87 */) /* comment 88 */ and /* comment 89 */ (/* comment 90 */ resolution /* comment 91 */: /* comment 92 */ 150dpi /* comment 93 */) /* comment 94 */ { +} +@media /* comment 95 */only/* comment 96 */screen/* comment 97 */and/* comment 98 */(/* comment 99 */min-width/* comment 100 */:/* comment 101 */320px/* comment 102 */) /* comment 103 */and/* comment 104 */(/* comment 105 */max-width/* comment 106 */:/* comment 107 */480px/* comment 108 */) /* comment 109 */and/* comment 110 */(/* comment 111 */resolution/* comment 112 */:/* comment 113 */150dpi/* comment 114 */) /* comment 115 */ { +} +/* comment 116 */ +@media /* comment 117 */ /* comment 118 */only/* comment 119 */ /* comment 120 */screen/* comment 121 */ /* comment 122 */and/* comment 123 */ /* comment 124 */(/* comment 125 */ + /* comment 126 */min-width/* comment 127 */ + /* comment 128 */:/* comment 129 */ + /* comment 130 */320px/* comment 131 */ + /* comment 132 */) /* comment 133 */ /* comment 134 */and/* comment 135 */ /* comment 136 */(/* comment 137 */ + /* comment 138 */max-width/* comment 139 */ + /* comment 140 */:/* comment 141 */ + /* comment 142 */480px/* comment 143 */ + /* comment 144 */) /* comment 145 */ /* comment 146 */and/* comment 147 */ /* comment 148 */(/* comment 149 */ + /* comment 150 */resolution/* comment 151 */ + /* comment 152 */:/* comment 153 */ + /* comment 154 */150dpi/* comment 155 */ + /* comment 156 */) /* comment 157 */ /* comment 158 */ { +} /* comment 159 */ + +@supports /* comment 160 */ + ( + /* comment 161 */ display /* comment 162 */: /* comment 163 */ flex + /* comment 164 */ + ) + /* comment 165 */ { +} +@supports /* comment 166 */ not /* comment 167 */ + ( + /* comment 168 */ display /* comment 169 */: /* comment 170 */ flex + /* comment 171 */ + ) + /* comment 172 */ { +} +@supports /* comment 173 */ + ( + /* comment 174 */ display /* comment 175 */: /* comment 176 */ table-cell + /* comment 177 */ + ) + /* comment 178 */ and /* comment 179 */ + ( + /* comment 180 */ display /* comment 181 */: /* comment 182 */ list-item + /* comment 183 */ + ) + /* comment 184 */ and /* comment 185 */ + ( + /* comment 186 */ display /* comment 187 */: /* comment 188 */ run-in + /* comment 189 */ + ) + /* comment 190 */ { +} +@supports /* comment 191 */ + ( + /* comment 192 */ --foo /* comment 193 */: /* comment 194 */ green + /* comment 195 */ + ) + /* comment 196 */ { +} + +/* comment 197 */ +@supports /* comment 198 */ + ( + /* comment 199 */ display /* comment 200 */: /* comment 201 */ flex + /* comment 202 */ + ) + /* comment 203 */ { + /* comment 204 */ + @media /* comment 205 */ screen /* comment 206 */ and /* comment 207 */ (/* comment 208 */ min-width /* comment 209 */: /* comment 210 */ 900px /* comment 211 */) /* comment 212 */ { + /* comment 213 */ + } /* comment 214 */ + /* comment 215 */ +} /* comment 216 */ + +================================================================================ +`; + +exports[`block.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* Kikoo */ +/** + * Kikoo + */ + +=====================================output===================================== +/* Kikoo */ +/** + * Kikoo + */ + +================================================================================ +`; + +exports[`bug.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* Catchall baseclass */ +.glyphicon { +} + +=====================================output===================================== +/* Catchall baseclass */ +.glyphicon { +} + +================================================================================ +`; + +exports[`custom-properties.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== + /* comment 1 */ + :root { + /* comment 2 */ + --prop : { + /* comment 3 */ +color/* comment 4 */: /* comment 5 */#fff/* comment 6 */;/* comment 7 */ + /* comment 8 */ +font-size: 12px; + /* comment 9 */ + }; + /* comment 10 */ +} + /* comment 11 */ + +=====================================output===================================== +/* comment 1 */ +:root { + /* comment 2 */ + --prop: { + /* comment 3 */ + color/* comment 4 */: /* comment 5 */ #fff /* comment 6 */; /* comment 7 */ + /* comment 8 */ + font-size: 12px; + /* comment 9 */ + }; + /* comment 10 */ +} +/* comment 11 */ + +================================================================================ +`; + +exports[`declaration.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +a { + /* comment 1 */ + /* comment 2 */ padding /* comment 3 */ : /* comment 4 */ 10px /* comment 5 */ 10px /* comment 6 */; /* comment 7 */ + /* comment 8 */ + transform: translate(/* comment 9 */ 10px /* comment 10 */); + color: /* comment 11 */ red /* comment 12 */ !important /* comment 13 */ ; /* comment 14 */ + /* comment 15 */ +} + +@font-face { + font-family: "Prettier"; + src: /* comment 16 */ local(/* comment 17 */ "Prettier" /* comment 18 */), /* comment 19 */ + /* comment 20 */ url("http://prettier.com/font.woff") /* comment 21 */ ; /* comment 22 */ +} + +.foo {/* comment 23 */color/* comment 24 */:/* comment 25 */blue/* comment 26 */;/* comment 27 */transform/* comment 28 */:/* comment 29 */translate(/* comment 30 */10px/* comment 31 */)/* comment 32 */;/* comment 33 */} +.foo { /* comment 34 */ color /* comment 35 */ : /* comment 36 */ blue /* comment 37 */ ; /* comment 38 */ transform /* comment 39 */ : /* comment 40 */ translate( /* comment 41 */ 10px /* comment 42 */ ) /* comment 43 */ ; /* comment 44 */ } +.foo { + /* comment 45 */ + /* comment 46 */ color /* comment 47 */ + /* comment 48 */ + /* comment 49 */ : /* comment 50 */ + /* comment 51 */ + /* comment 52 */ blue /* comment 53 */ + /* comment 54 */ + /* comment 55 */ ; /* comment 56 */ + /* comment 57 */ + /* comment 58 */ transform /* comment 59 */ + /* comment 60 */ + /* comment 61 */ : /* comment 62 */ + /* comment 63 */ + /* comment 64 */ translate( /* comment 65 */ + /* comment 66 */ + /* comment 67 */ 10px /* comment 68 */ + /* comment 69 */ + /* comment 70 */ ) /* comment 71 */ + /* comment 72 */ + /* comment 73 */ ; /* comment 74 */ + /* comment 75 */ +} + +body {/* comment 76 */} +body { /* comment 77 */ } +body +{ + /* comment 78 */ +} +body +{ + /* comment 79 */ +} +body +{ + + /* comment 80 */ + +} + +.tab-bar { + .tab {} /* comment 81 */ +} + +.selector { + /* comment 82 */ + position: absolute; + + /* comment 83 */ + display: inline-block; + + /* comment 84 */ + background: #000; +} + +=====================================output===================================== +a { + /* comment 1 */ + /* comment 2 */ + padding/* comment 3 */ : /* comment 4 */ 10px /* comment 5 */ 10px + /* comment 6 */; /* comment 7 */ + /* comment 8 */ + transform: translate(/* comment 9 */ 10px /* comment 10 */); + color: /* comment 11 */ red /* comment 12 */ !important /* comment 13 */ ; /* comment 14 */ + /* comment 15 */ +} + +@font-face { + font-family: "Prettier"; + src: /* comment 16 */ + local(/* comment 17 */ "Prettier" /* comment 18 */), + /* comment 19 */ /* comment 20 */ url("http://prettier.com/font.woff") + /* comment 21 */; /* comment 22 */ +} + +.foo { + /* comment 23 */ + color/* comment 24 */:/* comment 25 */ blue /* comment 26 */; /* comment 27 */ + transform/* comment 28 */:/* comment 29 */ translate( + /* comment 30 */ 10px /* comment 31 */ + ) + /* comment 32 */; /* comment 33 */ +} +.foo { + /* comment 34 */ + color/* comment 35 */ : /* comment 36 */ blue /* comment 37 */; /* comment 38 */ + transform/* comment 39 */ : /* comment 40 */ translate( + /* comment 41 */ 10px /* comment 42 */ + ) + /* comment 43 */; /* comment 44 */ +} +.foo { + /* comment 45 */ + /* comment 46 */ + color/* comment 47 */ + /* comment 48 */ + /* comment 49 */ : /* comment 50 */ + /* comment 51 */ + /* comment 52 */ blue + /* comment 53 */ /* comment 54 */ /* comment 55 */; /* comment 56 */ + /* comment 57 */ + /* comment 58 */ + transform/* comment 59 */ + /* comment 60 */ + /* comment 61 */ : /* comment 62 */ + /* comment 63 */ + /* comment 64 */ translate( + /* comment 65 */ /* comment 66 */ /* comment 67 */ 10px /* comment 68 */ + /* comment 69 */ /* comment 70 */ + ) + /* comment 71 */ /* comment 72 */ /* comment 73 */; /* comment 74 */ + /* comment 75 */ +} + +body { + /* comment 76 */ +} +body { + /* comment 77 */ +} +body { + /* comment 78 */ +} +body { + /* comment 79 */ +} +body { + /* comment 80 */ +} + +.tab-bar { + .tab { + } /* comment 81 */ +} + +.selector { + /* comment 82 */ + position: absolute; + + /* comment 83 */ + display: inline-block; + + /* comment 84 */ + background: #000; +} + +================================================================================ +`; + +exports[`prettier-ignore.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +=====================================output===================================== +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +================================================================================ +`; + +exports[`selectors.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.powerPathNavigator .helm button.pressedButton, /* comment 1 */ +.powerPathNavigator .helm button:active:not(.disabledButton), +.powerPathNavigator table.powerPathInfo th:active, +.powerPathNavigator table.powerPathInfo th:active + th:last-child { +} + +/* comment 2 */ +.powerPathNavigator .helm button.pressedButton, +.powerPathNavigator .helm button:active:not(.disabledButton) { +} + +.foo, +/* comment 3 */ +.bar { + display: block; +} + +/* comment 4 */ +/* comment 5 */ .field /* comment 6 */ +/* comment 7 */ +/* comment 8 */ { /* comment 9 */ + /* comment 10 */ + background: green; + /* comment 11 */ +/* comment 12 */ } /* comment 13 */ +/* comment 14 */ + +/* comment 15 */ .element /* comment 16 */ , /* comment 17 */ .element /* comment 18 */ {} +/* comment 19 */ +.element +/* comment 20 */ +, +/* comment 21 */ +.element +/* comment 22 */ +{} + +/* comment 23 */ .element /* comment 24 */ .element /* comment 25 */ {} +/* comment 26 */ +.element +/* comment 27 */ +.element +/* comment 28 */ +{} + +/* comment 29 */ .element /* comment 30 */ > /* comment 31 */ .element /* comment 32 */ {} +/* comment 33 */ +.element +/* comment 34 */ +> +/* comment 35 */ +.element +/* comment 36 */ +{} + +/* comment 37 */ .element /* comment 38 */ + /* comment 39 */ .element /* comment 40 */ {} +/* comment 41 */ +.element +/* comment 42 */ ++ +/* comment 43 */ +.element +/* comment 44 */ +{} + +/* comment 45 */ .element /* comment 46 */ ~ /* comment 47 */ .element /* comment 48 */ {} +/* comment 49 */ +.element +/* comment 50 */ +~ +/* comment 51 */ +.element +/* comment 52 */ +{} + +/* comment 53 */ .element /* comment 54 */ >>> /* comment 55 */ .element /* comment 56 */ {} +/* comment 57 */ +.element +/* comment 58 */ +>>> +/* comment 59 */ +.element +/* comment 60 */ +{} + +a[/* comment 61 */target/* comment 62 */] {} +a[/* comment 63 */target/* comment 64 */=/* comment 65 */"_blank"/* comment 66 */] {} +a[/* comment 67 */target/* comment 68 */~=/* comment 69 */"_blank"/* comment 70 */] {} +a[/* comment 71 */target/* comment 72 */|=/* comment 73 */"_blank"/* comment 74 */] {} +a[/* comment 75 */target/* comment 76 */^=/* comment 77 */"_blank"/* comment 78 */] {} +a[/* comment 79 */target/* comment 80 */$=/* comment 81 */"_blank"/* comment 82 */] {} +a[/* comment 83 */target/* comment 84 */*=/* comment 85 */"_blank"/* comment 86 */] {} + +[/* comment 87 */foo/* comment 88 */|/* comment 89 */att/* comment 90 */=/* comment 91 */val/* comment 92 */] {} +[/* comment 93 */*/* comment 94 */|/* comment 95 */att/* comment 96 */] {} +[/* comment 97 */|/* comment 98 */att/* comment 99 */] {} + +a/* comment 100 */:/* comment 101 */active {} + +a/* comment 102 */::/* comment 103 */after {} + +p:lang(/* comment 104 */it/* comment 105 */) {} + +span:nth-child(/* comment 106 */2n/* comment 107 */+/* comment 108 */1/* comment 109 */) {} + +/* comment 110 */::-webkit-progress-bar {} + +/* comment 111 */:matches(/* comment 112 */section/* comment 113 */,/* comment 114 */ article/* comment 115 */) /* comment 116 */ h1 {} + +/* comment 117 */*/* comment 118 */ {} + +/* comment 119 */#container/* comment 120 */{} + +/* comment 121 */.error/* comment 122 */{} + +/* comment 123 */a/* comment 124 */{} + +input:not(/* comment 125 */[/* comment 126 */disabled/* comment 127 */]/* comment 128 */) {} + +/* comment 129 */h1/* comment 130 */, /* comment 131 */h2/* comment 132 */,/* comment 133 */ h3/* comment 134 */ {} + +/* comment 135 */.phone/* comment 136 */ { /* comment 137 */ + /* comment 138 */&_title/* comment 139 */ { /* comment 140 */ + width: 500px; + /* comment 141 */body.is_dark/* comment 142 */ & /* comment 143 */{ /* comment 144 */ + color: white; + /* comment 145 */ } /* comment 146 */ + /* comment 147 */ } /* comment 148 */ + + /* comment 149 */ img/* comment 150 */ { /* comment 151 */ + display: block; + /* comment 152 */ } /* comment 153 */ +/* comment 154 */ +} /* comment 155 */ + +@media (max-width: 500px) { + /* comment 156 */ a /* comment 157 */ { /* comment 158 */ + /* comment 159 */b/* comment 160 */ {/* comment 161 */} /* comment 162 */ + /* comment 163 */ } /* comment 164 */ +/* comment 165 */ } /* comment 166 */ + +/* comment 167 */ article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /* comment 171 */ {} + +/* comment 172 */ .foo /* comment 173 */ :global /* comment 174 */.bar /* comment 175 */{} +/* comment 176 */ .foo /* comment 177 */ :global(/* comment 178 */.bar/* comment 179 */) /* comment 180 */ .baz /* comment 181 */ {} + +/* comment 182 */ .foo /* comment 183 */ :local /* comment 184 */ .bar /* comment 185 */ {} +/* comment 186 */ .foo /* comment 187 */ :local(/* comment 188 */.foo/* comment 189 */) /* comment 190 */ .bar /* comment 191 */ {} + +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +=====================================output===================================== +.powerPathNavigator .helm button.pressedButton, /* comment 1 */ +.powerPathNavigator .helm button:active:not(.disabledButton), +.powerPathNavigator table.powerPathInfo th:active, +.powerPathNavigator table.powerPathInfo th:active + th:last-child { +} + +/* comment 2 */ +.powerPathNavigator .helm button.pressedButton, +.powerPathNavigator .helm button:active:not(.disabledButton) { +} + +.foo, +/* comment 3 */ +.bar { + display: block; +} + +/* comment 4 */ +/* comment 5 */ +.field /* comment 6 */ +/* comment 7 */ +/* comment 8 */ { + /* comment 9 */ + /* comment 10 */ + background: green; + /* comment 11 */ + /* comment 12 */ +} /* comment 13 */ +/* comment 14 */ + +/* comment 15 */ +.element /* comment 16 */ , /* comment 17 */ .element /* comment 18 */ { +} +/* comment 19 */ +.element +/* comment 20 */ +, +/* comment 21 */ +.element +/* comment 22 */ { +} + +/* comment 23 */ +.element /* comment 24 */ .element /* comment 25 */ { +} +/* comment 26 */ +.element +/* comment 27 */ +.element +/* comment 28 */ { +} + +/* comment 29 */ +.element /* comment 30 */ > /* comment 31 */ .element /* comment 32 */ { +} +/* comment 33 */ +.element +/* comment 34 */ +> +/* comment 35 */ +.element +/* comment 36 */ { +} + +/* comment 37 */ +.element /* comment 38 */ + /* comment 39 */ .element /* comment 40 */ { +} +/* comment 41 */ +.element +/* comment 42 */ ++ +/* comment 43 */ +.element +/* comment 44 */ { +} + +/* comment 45 */ +.element /* comment 46 */ ~ /* comment 47 */ .element /* comment 48 */ { +} +/* comment 49 */ +.element +/* comment 50 */ +~ +/* comment 51 */ +.element +/* comment 52 */ { +} + +/* comment 53 */ +.element /* comment 54 */ >>> /* comment 55 */ .element /* comment 56 */ { +} +/* comment 57 */ +.element +/* comment 58 */ +>>> +/* comment 59 */ +.element +/* comment 60 */ { +} + +a[/* comment 61 */target/* comment 62 */] { +} +a[/* comment 63 */target/* comment 64 */=/* comment 65 */"_blank"/* comment 66 */] { +} +a[/* comment 67 */target/* comment 68 */~=/* comment 69 */"_blank"/* comment 70 */] { +} +a[/* comment 71 */target/* comment 72 */|=/* comment 73 */"_blank"/* comment 74 */] { +} +a[/* comment 75 */target/* comment 76 */^=/* comment 77 */"_blank"/* comment 78 */] { +} +a[/* comment 79 */target/* comment 80 */$=/* comment 81 */"_blank"/* comment 82 */] { +} +a[/* comment 83 */target/* comment 84 */*=/* comment 85 */"_blank"/* comment 86 */] { +} + +[/* comment 87 */foo/* comment 88 */|/* comment 89 */att/* comment 90 */=/* comment 91 */val/* comment 92 */] { +} +[/* comment 93 */*/* comment 94 */|/* comment 95 */att/* comment 96 */] { +} +[/* comment 97 */|/* comment 98 */att/* comment 99 */] { +} + +a/* comment 100 */:/* comment 101 */active { +} + +a/* comment 102 */::/* comment 103 */after { +} + +p:lang(/* comment 104 */it/* comment 105 */) { +} + +span:nth-child(/* comment 106 */2n/* comment 107 */+/* comment 108 */1/* comment 109 */) { +} + +/* comment 110 */ +::-webkit-progress-bar { +} + +/* comment 111 */ +:matches(/* comment 112 */section/* comment 113 */,/* comment 114 */ article/* comment 115 */) /* comment 116 */ h1 { +} + +/* comment 117 */ +*/* comment 118 */ { +} + +/* comment 119 */ +#container/* comment 120 */ { +} + +/* comment 121 */ +.error/* comment 122 */ { +} + +/* comment 123 */ +a/* comment 124 */ { +} + +input:not(/* comment 125 */[/* comment 126 */disabled/* comment 127 */]/* comment 128 */) { +} + +/* comment 129 */ +h1/* comment 130 */, /* comment 131 */h2/* comment 132 */,/* comment 133 */ h3/* comment 134 */ { +} + +/* comment 135 */ +.phone/* comment 136 */ { + /* comment 137 */ + /* comment 138 */ + &_title/* comment 139 */ { + /* comment 140 */ + width: 500px; + /* comment 141 */ + body.is_dark/* comment 142 */ & /* comment 143 */ { + /* comment 144 */ + color: white; + /* comment 145 */ + } /* comment 146 */ + /* comment 147 */ + } /* comment 148 */ + + /* comment 149 */ + img/* comment 150 */ { + /* comment 151 */ + display: block; + /* comment 152 */ + } /* comment 153 */ + /* comment 154 */ +} /* comment 155 */ + +@media (max-width: 500px) { + /* comment 156 */ + a /* comment 157 */ { + /* comment 158 */ + /* comment 159 */ + b/* comment 160 */ { + /* comment 161 */ + } /* comment 162 */ + /* comment 163 */ + } /* comment 164 */ + /* comment 165 */ +} /* comment 166 */ + +/* comment 167 */ +article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /* comment 171 */ { +} + +/* comment 172 */ +.foo /* comment 173 */ :global /* comment 174 */.bar /* comment 175 */ { +} +/* comment 176 */ +.foo /* comment 177 */ :global(/* comment 178 */.bar/* comment 179 */) /* comment 180 */ .baz /* comment 181 */ { +} + +/* comment 182 */ +.foo /* comment 183 */ :local /* comment 184 */ .bar /* comment 185 */ { +} +/* comment 186 */ +.foo /* comment 187 */ :local(/* comment 188 */.foo/* comment 189 */) /* comment 190 */ .bar /* comment 191 */ { +} + +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ + --centered/* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +================================================================================ +`; + +exports[`source-map.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.foo { + color: red; +} + +/*# sourceMappingURL=file.css.map */ + +=====================================output===================================== +.foo { + color: red; +} + +/*# sourceMappingURL=file.css.map */ + +================================================================================ +`; + +exports[`types.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* This is a basic comment */ + +/* ========================================================================== + This is a Section Comment + ========================================================================== */ + +/* + This is a sub-section comment + ========================================================================== */ + +/** + * Short description using Doxygen-style comment format + * + * The first sentence of the long description starts here and continues on this + * line for a while finally concluding here at the end of this paragraph. + * + * The long description is ideal for more detailed explanations and + * documentation. It can include example HTML, URLs, or any other information + * that is deemed necessary or useful. + * + * @tag This is a tag named 'tag' + * + * TODO: This is a todo statement that describes an atomic task to be completed + * at a later date. It wraps after 80 characters and following lines are + * indented by 2 spaces. + */ + +/** + * TODO: + * + * => Write some code + * => Make some lists + * + */ + +/* +span { + color: blue; + font-size: 1.5em; +} +*/ + +/* +Lorem ipsum dolor +*/ + +=====================================output===================================== +/* This is a basic comment */ + +/* ========================================================================== + This is a Section Comment + ========================================================================== */ + +/* + This is a sub-section comment + ========================================================================== */ + +/** + * Short description using Doxygen-style comment format + * + * The first sentence of the long description starts here and continues on this + * line for a while finally concluding here at the end of this paragraph. + * + * The long description is ideal for more detailed explanations and + * documentation. It can include example HTML, URLs, or any other information + * that is deemed necessary or useful. + * + * @tag This is a tag named 'tag' + * + * TODO: This is a todo statement that describes an atomic task to be completed + * at a later date. It wraps after 80 characters and following lines are + * indented by 2 spaces. + */ + +/** + * TODO: + * + * => Write some code + * => Make some lists + * + */ + +/* +span { + color: blue; + font-size: 1.5em; +} +*/ + +/* +Lorem ipsum dolor +*/ + +================================================================================ +`; diff --git a/tests/format/css/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index af5a18338448..000000000000 --- a/tests/format/css/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1022 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CRLF.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* - * Comment 1 - */ -#header { - /* - * Comment 2 - */ - color: red; -} - -@media only screen and (max-width: 600px) { - /* - * Comment 3 - */ - body { - background-color: lightblue; /* Comment 4 */ - color: red; /* Comment 5 */ - } -} - -=====================================output===================================== -/* - * Comment 1 - */ -#header { - /* - * Comment 2 - */ - color: red; -} - -@media only screen and (max-width: 600px) { - /* - * Comment 3 - */ - body { - background-color: lightblue; /* Comment 4 */ - color: red; /* Comment 5 */ - } -} - -================================================================================ -`; - -exports[`at-rules.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@charset "utf-8"; /* comment 1 */ - -@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print /* comment 4 */; /* comment 5 */ -@import /* comment 6 */ url("bluish.css") /* comment 7 */ projection /* comment 8 */, /* comment 9 */ tv /* comment 10 */; -/* comment 11 */ @import /* comment 12 */ - /* comment 13 */ url("bluish.css") /* comment 14 */ - /* comment 15 */ projection /* comment 16 */, - /* comment 17 */ tv /* comment 18 */; /* comment 19 */ -/* comment 20 */ -@import/* comment 21 */url("bluish.css")/* comment 22 */projection/* comment 23 */,/* comment 24 */tv/* comment 25 */; -@import /* comment 26 */'custom.css'/* comment 27 */;/* comment 28 */ -@import /* comment 29 */ url('landscape.css') /* comment 30 */ screen /* comment 31 */ and /* comment 32 */ (/* comment 33 */orientation/* comment 34 */:/* comment 35 */landscape/* comment 36 */)/* comment 37 */; - -@namespace /* comment 38 */ url(http://www.w3.org/1999/xhtml) /* comment 39 */ ; -@namespace /* comment 40 */ svg /* comment 41 */ url(http://www.w3.org/2000/svg) /* comment 42 */; - -@keyframes /* comment 43 */ slidein /* comment 44 */ {} - -/* comment 45 */ @font-feature-values /* comment 46 */ Font Two /* comment 47 */ { /* comment 48 */ - /* comment 49 */ @styleset /* comment 50 */ { /* comment 51 */ - nice-style: 4; - /* comment 52 */ } /* comment 53 */ -/* comment 54 */ } /* comment 55 */ - -/* comment 56 */ @counter-style /* comment 57 */ thumbs /* comment 58 */ {} - -/* comment 59 */ @viewport /* comment 60 */ {} - -@page /* comment 61 */ {} -@page /* comment 62 */ :first /* comment 63 */ {} -@page /* comment 64 */ vertical /* comment 65 */ {} - -/* comment 66 */ @media /* comment 67 */ print /* comment 68 */ {} -@media /* comment 69 */ screen /* comment 70 */ , /* comment 71 */ print /* comment 72 */ {} /* comment 73 */ -@media /* comment 74 */ only /* comment 75 */ screen /* comment 76 */ and /* comment 77 */ ( /* comment 78 */ min-width /* comment 79 */ : /* comment 80 */ 320px /* comment 81 */ ) /* comment 82 */ and /* comment 83 */ ( /* comment 84 */ max-width /* comment 85 */ : /* comment 86 */ 480px /* comment 87 */ ) /* comment 88 */ and /* comment 89 */ ( /* comment 90 */ resolution /* comment 91 */ : /* comment 92 */ 150dpi /* comment 93 */ ) /* comment 94 */ {} -@media/* comment 95 */only/* comment 96 */screen/* comment 97 */and/* comment 98 */(/* comment 99 */min-width/* comment 100 */:/* comment 101 */320px/* comment 102 */)/* comment 103 */and/* comment 104 */(/* comment 105 */max-width/* comment 106 */:/* comment 107 */480px/* comment 108 */)/* comment 109 */and/* comment 110 */(/* comment 111 */resolution/* comment 112 */:/* comment 113 */150dpi/* comment 114 */)/* comment 115 */{} -/* comment 116 */@media/* comment 117 */ - /* comment 118 */only/* comment 119 */ - /* comment 120 */screen/* comment 121 */ - /* comment 122 */and/* comment 123 */ - /* comment 124 */(/* comment 125 */ - /* comment 126 */min-width/* comment 127 */ - /* comment 128 */:/* comment 129 */ - /* comment 130 */320px/* comment 131 */ - /* comment 132 */)/* comment 133 */ - /* comment 134 */and/* comment 135 */ - /* comment 136 */(/* comment 137 */ - /* comment 138 */max-width/* comment 139 */ - /* comment 140 */:/* comment 141 */ - /* comment 142 */480px/* comment 143 */ - /* comment 144 */)/* comment 145 */ - /* comment 146 */and/* comment 147 */ - /* comment 148 */(/* comment 149 */ - /* comment 150 */resolution/* comment 151 */ - /* comment 152 */:/* comment 153 */ - /* comment 154 */150dpi/* comment 155 */ - /* comment 156 */)/* comment 157 */ - /* comment 158 */{}/* comment 159 */ - -@supports /* comment 160 */ ( /* comment 161 */ display /* comment 162 */ : /* comment 163 */ flex /* comment 164 */ ) /* comment 165 */ {} -@supports /* comment 166 */ not /* comment 167 */ ( /* comment 168 */ display /* comment 169 */ : /* comment 170 */ flex /* comment 171 */ ) /* comment 172 */ {} -@supports /* comment 173 */ (/* comment 174 */ display /* comment 175 */ : /* comment 176 */ table-cell /* comment 177 */ ) /* comment 178 */ and /* comment 179 */ ( /* comment 180 */ display /* comment 181 */ : /* comment 182 */ list-item /* comment 183 */ ) /* comment 184 */ and /* comment 185 */ ( /* comment 186 */display /* comment 187 */ : /* comment 188 */ run-in /* comment 189 */ ) /* comment 190 */ {} -@supports /* comment 191 */ (/* comment 192 */ --foo /* comment 193 */ : /* comment 194 */ green /* comment 195 */ ) /* comment 196 */ {} - -/* comment 197 */ @supports /* comment 198 */ ( /* comment 199 */ display /* comment 200 */ : /* comment 201 */ flex /* comment 202 */ ) /* comment 203 */ { - /* comment 204 */ @media /* comment 205 */ screen /* comment 206 */ and /* comment 207 */ ( /* comment 208 */ min-width /* comment 209 */ : /* comment 210 */ 900px /* comment 211 */ ) /* comment 212 */ { - /* comment 213 */ } /* comment 214 */ -/* comment 215 */ } /* comment 216 */ - - -=====================================output===================================== -@charset "utf-8"; /* comment 1 */ - -@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print - /* comment 4 */; /* comment 5 */ -@import /* comment 6 */ url("bluish.css") /* comment 7 */ projection - /* comment 8 */, - /* comment 9 */ tv /* comment 10 */; -/* comment 11 */ -@import /* comment 12 */ /* comment 13 */ url("bluish.css") /* comment 14 */ - /* comment 15 */ projection /* comment 16 */, - /* comment 17 */ tv /* comment 18 */; /* comment 19 */ -/* comment 20 */ -@import /* comment 21 */ url("bluish.css") /* comment 22 */ projection - /* comment 23 */, - /* comment 24 */ tv /* comment 25 */; -@import /* comment 26 */ "custom.css" /* comment 27 */; /* comment 28 */ -@import /* comment 29 */ url("landscape.css") /* comment 30 */ screen - /* comment 31 */ and /* comment 32 */ - ( - /* comment 33 */ orientation /* comment 34 */: /* comment 35 */ landscape - /* comment 36 */ - ) - /* comment 37 */; - -@namespace /* comment 38 */ url(http://www.w3.org/1999/xhtml) /* comment 39 */; -@namespace /* comment 40 */ svg /* comment 41 */ url(http://www.w3.org/2000/svg) /* comment 42 */; - -@keyframes /* comment 43 */ slidein /* comment 44 */ { -} - -/* comment 45 */ -@font-feature-values /* comment 46 */ Font Two /* comment 47 */ { - /* comment 48 */ - /* comment 49 */ - @styleset /* comment 50 */ { - /* comment 51 */ - nice-style: 4; - /* comment 52 */ - } /* comment 53 */ - /* comment 54 */ -} /* comment 55 */ - -/* comment 56 */ -@counter-style /* comment 57 */ thumbs /* comment 58 */ { -} - -/* comment 59 */ -@viewport /* comment 60 */ { -} - -@page /* comment 61 */ { -} -@page /* comment 62 */ :first /* comment 63 */ { -} -@page /* comment 64 */ vertical /* comment 65 */ { -} - -/* comment 66 */ -@media /* comment 67 */ print /* comment 68 */ { -} -@media /* comment 69 */ screen /* comment 70 */, - /* comment 71 */ print /* comment 72 */ { -} /* comment 73 */ -@media /* comment 74 */ only /* comment 75 */ screen /* comment 76 */ and /* comment 77 */ (/* comment 78 */ min-width /* comment 79 */: /* comment 80 */ 320px /* comment 81 */) /* comment 82 */ and /* comment 83 */ (/* comment 84 */ max-width /* comment 85 */: /* comment 86 */ 480px /* comment 87 */) /* comment 88 */ and /* comment 89 */ (/* comment 90 */ resolution /* comment 91 */: /* comment 92 */ 150dpi /* comment 93 */) /* comment 94 */ { -} -@media /* comment 95 */only/* comment 96 */screen/* comment 97 */and/* comment 98 */(/* comment 99 */min-width/* comment 100 */:/* comment 101 */320px/* comment 102 */) /* comment 103 */and/* comment 104 */(/* comment 105 */max-width/* comment 106 */:/* comment 107 */480px/* comment 108 */) /* comment 109 */and/* comment 110 */(/* comment 111 */resolution/* comment 112 */:/* comment 113 */150dpi/* comment 114 */) /* comment 115 */ { -} -/* comment 116 */ -@media /* comment 117 */ /* comment 118 */only/* comment 119 */ /* comment 120 */screen/* comment 121 */ /* comment 122 */and/* comment 123 */ /* comment 124 */(/* comment 125 */ - /* comment 126 */min-width/* comment 127 */ - /* comment 128 */:/* comment 129 */ - /* comment 130 */320px/* comment 131 */ - /* comment 132 */) /* comment 133 */ /* comment 134 */and/* comment 135 */ /* comment 136 */(/* comment 137 */ - /* comment 138 */max-width/* comment 139 */ - /* comment 140 */:/* comment 141 */ - /* comment 142 */480px/* comment 143 */ - /* comment 144 */) /* comment 145 */ /* comment 146 */and/* comment 147 */ /* comment 148 */(/* comment 149 */ - /* comment 150 */resolution/* comment 151 */ - /* comment 152 */:/* comment 153 */ - /* comment 154 */150dpi/* comment 155 */ - /* comment 156 */) /* comment 157 */ /* comment 158 */ { -} /* comment 159 */ - -@supports /* comment 160 */ - ( - /* comment 161 */ display /* comment 162 */: /* comment 163 */ flex - /* comment 164 */ - ) - /* comment 165 */ { -} -@supports /* comment 166 */ not /* comment 167 */ - ( - /* comment 168 */ display /* comment 169 */: /* comment 170 */ flex - /* comment 171 */ - ) - /* comment 172 */ { -} -@supports /* comment 173 */ - ( - /* comment 174 */ display /* comment 175 */: /* comment 176 */ table-cell - /* comment 177 */ - ) - /* comment 178 */ and /* comment 179 */ - ( - /* comment 180 */ display /* comment 181 */: /* comment 182 */ list-item - /* comment 183 */ - ) - /* comment 184 */ and /* comment 185 */ - ( - /* comment 186 */ display /* comment 187 */: /* comment 188 */ run-in - /* comment 189 */ - ) - /* comment 190 */ { -} -@supports /* comment 191 */ - ( - /* comment 192 */ --foo /* comment 193 */: /* comment 194 */ green - /* comment 195 */ - ) - /* comment 196 */ { -} - -/* comment 197 */ -@supports /* comment 198 */ - ( - /* comment 199 */ display /* comment 200 */: /* comment 201 */ flex - /* comment 202 */ - ) - /* comment 203 */ { - /* comment 204 */ - @media /* comment 205 */ screen /* comment 206 */ and /* comment 207 */ (/* comment 208 */ min-width /* comment 209 */: /* comment 210 */ 900px /* comment 211 */) /* comment 212 */ { - /* comment 213 */ - } /* comment 214 */ - /* comment 215 */ -} /* comment 216 */ - -================================================================================ -`; - -exports[`block.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* Kikoo */ -/** - * Kikoo - */ - -=====================================output===================================== -/* Kikoo */ -/** - * Kikoo - */ - -================================================================================ -`; - -exports[`bug.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* Catchall baseclass */ -.glyphicon { -} - -=====================================output===================================== -/* Catchall baseclass */ -.glyphicon { -} - -================================================================================ -`; - -exports[`declaration.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { - /* comment 1 */ - /* comment 2 */ padding /* comment 3 */ : /* comment 4 */ 10px /* comment 5 */ 10px /* comment 6 */; /* comment 7 */ - /* comment 8 */ - transform: translate(/* comment 9 */ 10px /* comment 10 */); - color: /* comment 11 */ red /* comment 12 */ !important /* comment 13 */ ; /* comment 14 */ - /* comment 15 */ -} - -@font-face { - font-family: "Prettier"; - src: /* comment 16 */ local(/* comment 17 */ "Prettier" /* comment 18 */), /* comment 19 */ - /* comment 20 */ url("http://prettier.com/font.woff") /* comment 21 */ ; /* comment 22 */ -} - -.foo {/* comment 23 */color/* comment 24 */:/* comment 25 */blue/* comment 26 */;/* comment 27 */transform/* comment 28 */:/* comment 29 */translate(/* comment 30 */10px/* comment 31 */)/* comment 32 */;/* comment 33 */} -.foo { /* comment 34 */ color /* comment 35 */ : /* comment 36 */ blue /* comment 37 */ ; /* comment 38 */ transform /* comment 39 */ : /* comment 40 */ translate( /* comment 41 */ 10px /* comment 42 */ ) /* comment 43 */ ; /* comment 44 */ } -.foo { - /* comment 45 */ - /* comment 46 */ color /* comment 47 */ - /* comment 48 */ - /* comment 49 */ : /* comment 50 */ - /* comment 51 */ - /* comment 52 */ blue /* comment 53 */ - /* comment 54 */ - /* comment 55 */ ; /* comment 56 */ - /* comment 57 */ - /* comment 58 */ transform /* comment 59 */ - /* comment 60 */ - /* comment 61 */ : /* comment 62 */ - /* comment 63 */ - /* comment 64 */ translate( /* comment 65 */ - /* comment 66 */ - /* comment 67 */ 10px /* comment 68 */ - /* comment 69 */ - /* comment 70 */ ) /* comment 71 */ - /* comment 72 */ - /* comment 73 */ ; /* comment 74 */ - /* comment 75 */ -} - -body {/* comment 76 */} -body { /* comment 77 */ } -body -{ - /* comment 78 */ -} -body -{ - /* comment 79 */ -} -body -{ - - /* comment 80 */ - -} - -.tab-bar { - .tab {} /* comment 81 */ -} - -.selector { - /* comment 82 */ - position: absolute; - - /* comment 83 */ - display: inline-block; - - /* comment 84 */ - background: #000; -} - -=====================================output===================================== -a { - /* comment 1 */ - /* comment 2 */ - padding/* comment 3 */ : /* comment 4 */ 10px /* comment 5 */ 10px - /* comment 6 */; /* comment 7 */ - /* comment 8 */ - transform: translate(/* comment 9 */ 10px /* comment 10 */); - color: /* comment 11 */ red /* comment 12 */ !important /* comment 13 */ ; /* comment 14 */ - /* comment 15 */ -} - -@font-face { - font-family: "Prettier"; - src: /* comment 16 */ local(/* comment 17 */ "Prettier" /* comment 18 */), - /* comment 19 */ /* comment 20 */ url("http://prettier.com/font.woff") - /* comment 21 */; /* comment 22 */ -} - -.foo { - /* comment 23 */ - color/* comment 24 */:/* comment 25 */ blue /* comment 26 */; /* comment 27 */ - transform/* comment 28 */:/* comment 29 */ translate( - /* comment 30 */ 10px /* comment 31 */ - ) - /* comment 32 */; /* comment 33 */ -} -.foo { - /* comment 34 */ - color/* comment 35 */ : /* comment 36 */ blue /* comment 37 */; /* comment 38 */ - transform/* comment 39 */ : /* comment 40 */ translate( - /* comment 41 */ 10px /* comment 42 */ - ) - /* comment 43 */; /* comment 44 */ -} -.foo { - /* comment 45 */ - /* comment 46 */ - color/* comment 47 */ - /* comment 48 */ - /* comment 49 */ : /* comment 50 */ - /* comment 51 */ - /* comment 52 */ blue - /* comment 53 */ /* comment 54 */ /* comment 55 */; /* comment 56 */ - /* comment 57 */ - /* comment 58 */ - transform/* comment 59 */ - /* comment 60 */ - /* comment 61 */ : /* comment 62 */ - /* comment 63 */ - /* comment 64 */ translate( - /* comment 65 */ /* comment 66 */ /* comment 67 */ 10px /* comment 68 */ - /* comment 69 */ /* comment 70 */ - ) - /* comment 71 */ /* comment 72 */ /* comment 73 */; /* comment 74 */ - /* comment 75 */ -} - -body { - /* comment 76 */ -} -body { - /* comment 77 */ -} -body { - /* comment 78 */ -} -body { - /* comment 79 */ -} -body { - /* comment 80 */ -} - -.tab-bar { - .tab { - } /* comment 81 */ -} - -.selector { - /* comment 82 */ - position: absolute; - - /* comment 83 */ - display: inline-block; - - /* comment 84 */ - background: #000; -} - -================================================================================ -`; - -exports[`prettier-ignore.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -=====================================output===================================== -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -================================================================================ -`; - -exports[`selectors.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.powerPathNavigator .helm button.pressedButton, /* comment 1 */ -.powerPathNavigator .helm button:active:not(.disabledButton), -.powerPathNavigator table.powerPathInfo th:active, -.powerPathNavigator table.powerPathInfo th:active + th:last-child { -} - -/* comment 2 */ -.powerPathNavigator .helm button.pressedButton, -.powerPathNavigator .helm button:active:not(.disabledButton) { -} - -.foo, -/* comment 3 */ -.bar { - display: block; -} - -/* comment 4 */ -/* comment 5 */ .field /* comment 6 */ -/* comment 7 */ -/* comment 8 */ { /* comment 9 */ - /* comment 10 */ - background: green; - /* comment 11 */ -/* comment 12 */ } /* comment 13 */ -/* comment 14 */ - -/* comment 15 */ .element /* comment 16 */ , /* comment 17 */ .element /* comment 18 */ {} -/* comment 19 */ -.element -/* comment 20 */ -, -/* comment 21 */ -.element -/* comment 22 */ -{} - -/* comment 23 */ .element /* comment 24 */ .element /* comment 25 */ {} -/* comment 26 */ -.element -/* comment 27 */ -.element -/* comment 28 */ -{} - -/* comment 29 */ .element /* comment 30 */ > /* comment 31 */ .element /* comment 32 */ {} -/* comment 33 */ -.element -/* comment 34 */ -> -/* comment 35 */ -.element -/* comment 36 */ -{} - -/* comment 37 */ .element /* comment 38 */ + /* comment 39 */ .element /* comment 40 */ {} -/* comment 41 */ -.element -/* comment 42 */ -+ -/* comment 43 */ -.element -/* comment 44 */ -{} - -/* comment 45 */ .element /* comment 46 */ ~ /* comment 47 */ .element /* comment 48 */ {} -/* comment 49 */ -.element -/* comment 50 */ -~ -/* comment 51 */ -.element -/* comment 52 */ -{} - -/* comment 53 */ .element /* comment 54 */ >>> /* comment 55 */ .element /* comment 56 */ {} -/* comment 57 */ -.element -/* comment 58 */ ->>> -/* comment 59 */ -.element -/* comment 60 */ -{} - -a[/* comment 61 */target/* comment 62 */] {} -a[/* comment 63 */target/* comment 64 */=/* comment 65 */"_blank"/* comment 66 */] {} -a[/* comment 67 */target/* comment 68 */~=/* comment 69 */"_blank"/* comment 70 */] {} -a[/* comment 71 */target/* comment 72 */|=/* comment 73 */"_blank"/* comment 74 */] {} -a[/* comment 75 */target/* comment 76 */^=/* comment 77 */"_blank"/* comment 78 */] {} -a[/* comment 79 */target/* comment 80 */$=/* comment 81 */"_blank"/* comment 82 */] {} -a[/* comment 83 */target/* comment 84 */*=/* comment 85 */"_blank"/* comment 86 */] {} - -[/* comment 87 */foo/* comment 88 */|/* comment 89 */att/* comment 90 */=/* comment 91 */val/* comment 92 */] {} -[/* comment 93 */*/* comment 94 */|/* comment 95 */att/* comment 96 */] {} -[/* comment 97 */|/* comment 98 */att/* comment 99 */] {} - -a/* comment 100 */:/* comment 101 */active {} - -a/* comment 102 */::/* comment 103 */after {} - -p:lang(/* comment 104 */it/* comment 105 */) {} - -span:nth-child(/* comment 106 */2n/* comment 107 */+/* comment 108 */1/* comment 109 */) {} - -/* comment 110 */::-webkit-progress-bar {} - -/* comment 111 */:matches(/* comment 112 */section/* comment 113 */,/* comment 114 */ article/* comment 115 */) /* comment 116 */ h1 {} - -/* comment 117 */*/* comment 118 */ {} - -/* comment 119 */#container/* comment 120 */{} - -/* comment 121 */.error/* comment 122 */{} - -/* comment 123 */a/* comment 124 */{} - -input:not(/* comment 125 */[/* comment 126 */disabled/* comment 127 */]/* comment 128 */) {} - -/* comment 129 */h1/* comment 130 */, /* comment 131 */h2/* comment 132 */,/* comment 133 */ h3/* comment 134 */ {} - -/* comment 135 */.phone/* comment 136 */ { /* comment 137 */ - /* comment 138 */&_title/* comment 139 */ { /* comment 140 */ - width: 500px; - /* comment 141 */body.is_dark/* comment 142 */ & /* comment 143 */{ /* comment 144 */ - color: white; - /* comment 145 */ } /* comment 146 */ - /* comment 147 */ } /* comment 148 */ - - /* comment 149 */ img/* comment 150 */ { /* comment 151 */ - display: block; - /* comment 152 */ } /* comment 153 */ -/* comment 154 */ -} /* comment 155 */ - -@media (max-width: 500px) { - /* comment 156 */ a /* comment 157 */ { /* comment 158 */ - /* comment 159 */b/* comment 160 */ {/* comment 161 */} /* comment 162 */ - /* comment 163 */ } /* comment 164 */ -/* comment 165 */ } /* comment 166 */ - -/* comment 167 */ article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /* comment 171 */ {} - -/* comment 172 */ .foo /* comment 173 */ :global /* comment 174 */.bar /* comment 175 */{} -/* comment 176 */ .foo /* comment 177 */ :global(/* comment 178 */.bar/* comment 179 */) /* comment 180 */ .baz /* comment 181 */ {} - -/* comment 182 */ .foo /* comment 183 */ :local /* comment 184 */ .bar /* comment 185 */ {} -/* comment 186 */ .foo /* comment 187 */ :local(/* comment 188 */.foo/* comment 189 */) /* comment 190 */ .bar /* comment 191 */ {} - -/* custom properties set & @apply rule */ -:root { - /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { - display: flex; - align-items: center; - justify-content: center; - }; -} - -=====================================output===================================== -.powerPathNavigator .helm button.pressedButton, /* comment 1 */ -.powerPathNavigator .helm button:active:not(.disabledButton), -.powerPathNavigator table.powerPathInfo th:active, -.powerPathNavigator table.powerPathInfo th:active + th:last-child { -} - -/* comment 2 */ -.powerPathNavigator .helm button.pressedButton, -.powerPathNavigator .helm button:active:not(.disabledButton) { -} - -.foo, -/* comment 3 */ -.bar { - display: block; -} - -/* comment 4 */ -/* comment 5 */ -.field /* comment 6 */ -/* comment 7 */ -/* comment 8 */ { - /* comment 9 */ - /* comment 10 */ - background: green; - /* comment 11 */ - /* comment 12 */ -} /* comment 13 */ -/* comment 14 */ - -/* comment 15 */ -.element /* comment 16 */ , /* comment 17 */ .element /* comment 18 */ { -} -/* comment 19 */ -.element -/* comment 20 */ -, -/* comment 21 */ -.element -/* comment 22 */ { -} - -/* comment 23 */ -.element /* comment 24 */ .element /* comment 25 */ { -} -/* comment 26 */ -.element -/* comment 27 */ -.element -/* comment 28 */ { -} - -/* comment 29 */ -.element /* comment 30 */ > /* comment 31 */ .element /* comment 32 */ { -} -/* comment 33 */ -.element -/* comment 34 */ -> -/* comment 35 */ -.element -/* comment 36 */ { -} - -/* comment 37 */ -.element /* comment 38 */ + /* comment 39 */ .element /* comment 40 */ { -} -/* comment 41 */ -.element -/* comment 42 */ -+ -/* comment 43 */ -.element -/* comment 44 */ { -} - -/* comment 45 */ -.element /* comment 46 */ ~ /* comment 47 */ .element /* comment 48 */ { -} -/* comment 49 */ -.element -/* comment 50 */ -~ -/* comment 51 */ -.element -/* comment 52 */ { -} - -/* comment 53 */ -.element /* comment 54 */ >>> /* comment 55 */ .element /* comment 56 */ { -} -/* comment 57 */ -.element -/* comment 58 */ ->>> -/* comment 59 */ -.element -/* comment 60 */ { -} - -a[/* comment 61 */target/* comment 62 */] { -} -a[/* comment 63 */target/* comment 64 */=/* comment 65 */"_blank"/* comment 66 */] { -} -a[/* comment 67 */target/* comment 68 */~=/* comment 69 */"_blank"/* comment 70 */] { -} -a[/* comment 71 */target/* comment 72 */|=/* comment 73 */"_blank"/* comment 74 */] { -} -a[/* comment 75 */target/* comment 76 */^=/* comment 77 */"_blank"/* comment 78 */] { -} -a[/* comment 79 */target/* comment 80 */$=/* comment 81 */"_blank"/* comment 82 */] { -} -a[/* comment 83 */target/* comment 84 */*=/* comment 85 */"_blank"/* comment 86 */] { -} - -[/* comment 87 */foo/* comment 88 */|/* comment 89 */att/* comment 90 */=/* comment 91 */val/* comment 92 */] { -} -[/* comment 93 */*/* comment 94 */|/* comment 95 */att/* comment 96 */] { -} -[/* comment 97 */|/* comment 98 */att/* comment 99 */] { -} - -a/* comment 100 */:/* comment 101 */active { -} - -a/* comment 102 */::/* comment 103 */after { -} - -p:lang(/* comment 104 */it/* comment 105 */) { -} - -span:nth-child(/* comment 106 */2n/* comment 107 */+/* comment 108 */1/* comment 109 */) { -} - -/* comment 110 */ -::-webkit-progress-bar { -} - -/* comment 111 */ -:matches(/* comment 112 */section/* comment 113 */,/* comment 114 */ article/* comment 115 */) /* comment 116 */ h1 { -} - -/* comment 117 */ -*/* comment 118 */ { -} - -/* comment 119 */ -#container/* comment 120 */ { -} - -/* comment 121 */ -.error/* comment 122 */ { -} - -/* comment 123 */ -a/* comment 124 */ { -} - -input:not(/* comment 125 */[/* comment 126 */disabled/* comment 127 */]/* comment 128 */) { -} - -/* comment 129 */ -h1/* comment 130 */, /* comment 131 */h2/* comment 132 */,/* comment 133 */ h3/* comment 134 */ { -} - -/* comment 135 */ -.phone/* comment 136 */ { - /* comment 137 */ - /* comment 138 */ - &_title/* comment 139 */ { - /* comment 140 */ - width: 500px; - /* comment 141 */ - body.is_dark/* comment 142 */ & /* comment 143 */ { - /* comment 144 */ - color: white; - /* comment 145 */ - } /* comment 146 */ - /* comment 147 */ - } /* comment 148 */ - - /* comment 149 */ - img/* comment 150 */ { - /* comment 151 */ - display: block; - /* comment 152 */ - } /* comment 153 */ - /* comment 154 */ -} /* comment 155 */ - -@media (max-width: 500px) { - /* comment 156 */ - a /* comment 157 */ { - /* comment 158 */ - /* comment 159 */ - b/* comment 160 */ { - /* comment 161 */ - } /* comment 162 */ - /* comment 163 */ - } /* comment 164 */ - /* comment 165 */ -} /* comment 166 */ - -/* comment 167 */ -article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /* comment 171 */ { -} - -/* comment 172 */ -.foo /* comment 173 */ :global /* comment 174 */.bar /* comment 175 */ { -} -/* comment 176 */ -.foo /* comment 177 */ :global(/* comment 178 */.bar/* comment 179 */) /* comment 180 */ .baz /* comment 181 */ { -} - -/* comment 182 */ -.foo /* comment 183 */ :local /* comment 184 */ .bar /* comment 185 */ { -} -/* comment 186 */ -.foo /* comment 187 */ :local(/* comment 188 */.foo/* comment 189 */) /* comment 190 */ .bar /* comment 191 */ { -} - -/* custom properties set & @apply rule */ -:root { - /* comments 192 */ - --centered /* comments 193 */ : /* comments 194 */ { - display: flex; - align-items: center; - justify-content: center; - } -} - -================================================================================ -`; - -exports[`source-map.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.foo { - color: red; -} - -/*# sourceMappingURL=file.css.map */ - -=====================================output===================================== -.foo { - color: red; -} - -/*# sourceMappingURL=file.css.map */ - -================================================================================ -`; - -exports[`types.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* This is a basic comment */ - -/* ========================================================================== - This is a Section Comment - ========================================================================== */ - -/* - This is a sub-section comment - ========================================================================== */ - -/** - * Short description using Doxygen-style comment format - * - * The first sentence of the long description starts here and continues on this - * line for a while finally concluding here at the end of this paragraph. - * - * The long description is ideal for more detailed explanations and - * documentation. It can include example HTML, URLs, or any other information - * that is deemed necessary or useful. - * - * @tag This is a tag named 'tag' - * - * TODO: This is a todo statement that describes an atomic task to be completed - * at a later date. It wraps after 80 characters and following lines are - * indented by 2 spaces. - */ - -/** - * TODO: - * - * => Write some code - * => Make some lists - * - */ - -/* -span { - color: blue; - font-size: 1.5em; -} -*/ - -/* -Lorem ipsum dolor -*/ - -=====================================output===================================== -/* This is a basic comment */ - -/* ========================================================================== - This is a Section Comment - ========================================================================== */ - -/* - This is a sub-section comment - ========================================================================== */ - -/** - * Short description using Doxygen-style comment format - * - * The first sentence of the long description starts here and continues on this - * line for a while finally concluding here at the end of this paragraph. - * - * The long description is ideal for more detailed explanations and - * documentation. It can include example HTML, URLs, or any other information - * that is deemed necessary or useful. - * - * @tag This is a tag named 'tag' - * - * TODO: This is a todo statement that describes an atomic task to be completed - * at a later date. It wraps after 80 characters and following lines are - * indented by 2 spaces. - */ - -/** - * TODO: - * - * => Write some code - * => Make some lists - * - */ - -/* -span { - color: blue; - font-size: 1.5em; -} -*/ - -/* -Lorem ipsum dolor -*/ - -================================================================================ -`; diff --git a/tests/format/css/comments/custom-properties.css b/tests/format/css/comments/custom-properties.css new file mode 100644 index 000000000000..03119bfe11b1 --- /dev/null +++ b/tests/format/css/comments/custom-properties.css @@ -0,0 +1,13 @@ + /* comment 1 */ + :root { + /* comment 2 */ + --prop : { + /* comment 3 */ +color/* comment 4 */: /* comment 5 */#fff/* comment 6 */;/* comment 7 */ + /* comment 8 */ +font-size: 12px; + /* comment 9 */ + }; + /* comment 10 */ +} + /* comment 11 */ diff --git a/tests/format/css/comments/format.test.js b/tests/format/css/comments/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/comments/jsfmt.spec.js b/tests/format/css/comments/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/composes/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/composes/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/composes/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/composes/__snapshots__/format.test.js.snap diff --git a/tests/format/css/composes/format.test.js b/tests/format/css/composes/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/composes/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/composes/jsfmt.spec.js b/tests/format/css/composes/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/composes/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/cursor/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/cursor/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/cursor/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/cursor/__snapshots__/format.test.js.snap diff --git a/tests/format/css/cursor/format.test.js b/tests/format/css/cursor/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/cursor/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/cursor/jsfmt.spec.js b/tests/format/css/cursor/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/cursor/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/empty/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/empty/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/empty/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/empty/__snapshots__/format.test.js.snap diff --git a/tests/format/css/empty/format.test.js b/tests/format/css/empty/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/empty/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/empty/jsfmt.spec.js b/tests/format/css/empty/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/empty/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/fill-value/__snapshots__/format.test.js.snap b/tests/format/css/fill-value/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b1934e564de2 --- /dev/null +++ b/tests/format/css/fill-value/__snapshots__/format.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`fill.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +div { + border-left: 1px solid mix($warningBackgroundColors, $warningBorderColors, 50%); + $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +=====================================output===================================== +div { + border-left: 1px solid + mix($warningBackgroundColors, $warningBorderColors, 50%); + $fontFamily: + "Lato", + -apple-system, + "Helvetica Neue", + Helvetica, + Arial, + sans-serif; +} + +================================================================================ +`; diff --git a/tests/format/css/fill-value/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/fill-value/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3dab5c46205c..000000000000 --- a/tests/format/css/fill-value/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,23 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`fill.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -div { - border-left: 1px solid mix($warningBackgroundColors, $warningBorderColors, 50%); - $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -=====================================output===================================== -div { - border-left: 1px solid - mix($warningBackgroundColors, $warningBorderColors, 50%); - $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, - sans-serif; -} - -================================================================================ -`; diff --git a/tests/format/css/fill-value/format.test.js b/tests/format/css/fill-value/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/fill-value/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/fill-value/jsfmt.spec.js b/tests/format/css/fill-value/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/fill-value/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/front-matter/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/front-matter/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/front-matter/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/front-matter/__snapshots__/format.test.js.snap diff --git a/tests/format/css/front-matter/format.test.js b/tests/format/css/front-matter/format.test.js new file mode 100644 index 000000000000..19d2938f39ed --- /dev/null +++ b/tests/format/css/front-matter/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css", "scss", "less"]); diff --git a/tests/format/css/front-matter/jsfmt.spec.js b/tests/format/css/front-matter/jsfmt.spec.js deleted file mode 100644 index 2bd421ca6676..000000000000 --- a/tests/format/css/front-matter/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css", "scss", "less"]); diff --git a/tests/format/css/grid/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/grid/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/grid/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/grid/__snapshots__/format.test.js.snap diff --git a/tests/format/css/grid/format.test.js b/tests/format/css/grid/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/grid/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/grid/jsfmt.spec.js b/tests/format/css/grid/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/grid/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/important/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/important/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/important/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/important/__snapshots__/format.test.js.snap diff --git a/tests/format/css/important/format.test.js b/tests/format/css/important/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/important/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/important/jsfmt.spec.js b/tests/format/css/important/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/important/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/indent/__snapshots__/format.test.js.snap b/tests/format/css/indent/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..385f35cb3c1f --- /dev/null +++ b/tests/format/css/indent/__snapshots__/format.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`indent.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +div { + background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y; + box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15); + padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new)); +} + +=====================================output===================================== +div { + background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 + repeat-y; + box-shadow: + 0 0 1px 2px rgba(88, 144, 255, 0.75), + 0 1px 1px rgba(0, 0, 0, 0.15); + padding-bottom: calc( + var(ads-help-tray-footer-with-support-link-height) + + var(ads-help-tray-header-height-new) + ); +} + +================================================================================ +`; + +exports[`selectors.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +a { + ~ .Pagination-itemWrapper:not(.is-separator):not([data-priority^='#{$priority}']) + ~ .Pagination-itemWrapper.is-separator[data-priority^='#{$priority}'] { + display: flex; + } +} + +=====================================output===================================== +a { + ~ .Pagination-itemWrapper:not(.is-separator):not( + [data-priority^="#{$priority}"] + ) + ~ .Pagination-itemWrapper.is-separator[data-priority^="#{$priority}"] { + display: flex; + } +} + +================================================================================ +`; diff --git a/tests/format/css/indent/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/indent/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b00a54f5cb29..000000000000 --- a/tests/format/css/indent/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,54 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`indent.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -div { - background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y; - box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15); - padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new)); -} - -=====================================output===================================== -div { - background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 - repeat-y; - box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), - 0 1px 1px rgba(0, 0, 0, 0.15); - padding-bottom: calc( - var(ads-help-tray-footer-with-support-link-height) + - var(ads-help-tray-header-height-new) - ); -} - -================================================================================ -`; - -exports[`selectors.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { - ~ .Pagination-itemWrapper:not(.is-separator):not([data-priority^='#{$priority}']) - ~ .Pagination-itemWrapper.is-separator[data-priority^='#{$priority}'] { - display: flex; - } -} - -=====================================output===================================== -a { - ~ .Pagination-itemWrapper:not(.is-separator):not( - [data-priority^="#{$priority}"] - ) - ~ .Pagination-itemWrapper.is-separator[data-priority^="#{$priority}"] { - display: flex; - } -} - -================================================================================ -`; diff --git a/tests/format/css/indent/format.test.js b/tests/format/css/indent/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/indent/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/indent/jsfmt.spec.js b/tests/format/css/indent/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/indent/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/inline-url/__snapshots__/format.test.js.snap b/tests/format/css/inline-url/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6943d7409d9b --- /dev/null +++ b/tests/format/css/inline-url/__snapshots__/format.test.js.snap @@ -0,0 +1,130 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@font-face { + src: url(); +} + +=====================================output===================================== +@font-face { + src: url(); +} + +================================================================================ +`; + +exports[`inline_url.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.stringContentIsNotModifiedEvenIfInvalid { + background: url('@images'); + background: url("$images"); + background: url('/+0PX!/"\\a?~^[]{} $%#'); + background: url("/+0PX!/'\\a?~^[]{} $%#"); + background: url( + "whitespace-around-string" + ); +} + +.validUnquotedUrls { + background: url( + whitespace-around-string + ); + background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); + background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) center center no-repeat; + background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); + offset-path: url(#path); + background: url(data/+0ThisShouldNotBeLowerCased); + background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); + background: url(https://example.com/some/quite,long,url,with,commas.jpg); + background: url(http://123.example.com); +} +@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); + +.validUnqotedUrlsThatAreParsedByLess { + background: url(@foo); +} + +.validUnquotedUrlsThatAreParsedBySass { + background: url($foo); + background: url($foo+$bar); + background: url($foo*3); + background: url($foo/$bar); +} + +.invalidUnquotedUrlsButWeParseThemAnyway { + background: url(--var(foo-bar,#dadce0)); + -fb-sprite: url(fbglyph:cross-outline, fig-white); +} + +.number { + background-image: url(http://123.com); + background: url(path/to/123.jpg); + background: url(#123.foo); + background: no-repeat center/80% url(http://123.com); + background: no-repeat center/80% url(path/to/123.jpg); + background: no-repeat center/80% url(#123.foo); +} + +=====================================output===================================== +.stringContentIsNotModifiedEvenIfInvalid { + background: url("@images"); + background: url("$images"); + background: url('/+0PX!/"\\a?~^[]{} $%#'); + background: url("/+0PX!/'\\a?~^[]{} $%#"); + background: url("whitespace-around-string"); +} + +.validUnquotedUrls { + background: url(whitespace-around-string); + background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); + background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) + center center no-repeat; + background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); + offset-path: url(#path); + background: url(data/+0ThisShouldNotBeLowerCased); + background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); + background: url(https://example.com/some/quite,long,url,with,commas.jpg); + background: url(http://123.example.com); +} +@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); + +.validUnqotedUrlsThatAreParsedByLess { + background: url(@foo); +} + +.validUnquotedUrlsThatAreParsedBySass { + background: url($foo); + background: url($foo+$bar); + background: url($foo*3); + background: url($foo/$bar); +} + +.invalidUnquotedUrlsButWeParseThemAnyway { + background: url(--var(foo-bar, #dadce0)); + -fb-sprite: url(fbglyph:cross-outline, fig-white); +} + +.number { + background-image: url(http://123.com); + background: url(path/to/123.jpg); + background: url(#123.foo); + background: no-repeat center/80% url(http://123.com); + background: no-repeat center/80% url(path/to/123.jpg); + background: no-repeat center/80% url(#123.foo); +} + +================================================================================ +`; diff --git a/tests/format/css/inline-url/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/inline-url/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 05ccdfdf1386..000000000000 --- a/tests/format/css/inline-url/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,130 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@font-face { - src: url(); -} - -=====================================output===================================== -@font-face { - src: url(); -} - -================================================================================ -`; - -exports[`inline_url.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.stringContentIsNotModifiedEvenIfInvalid { - background: url('@images'); - background: url("$images"); - background: url('/+0PX!/"\\a?~^[]{} $%#'); - background: url("/+0PX!/'\\a?~^[]{} $%#"); - background: url( - "whitespace-around-string" - ); -} - -.validUnquotedUrls { - background: url( - whitespace-around-string - ); - background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); - background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) center center no-repeat; - background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); - offset-path: url(#path); - background: url(data/+0ThisShouldNotBeLowerCased); - background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); - background: url(https://example.com/some/quite,long,url,with,commas.jpg); - background: url(http://123.example.com); -} -@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); - -.validUnqotedUrlsThatAreParsedByLess { - background: url(@foo); -} - -.validUnquotedUrlsThatAreParsedBySass { - background: url($foo); - background: url($foo+$bar); - background: url($foo*3); - background: url($foo/$bar); -} - -.invalidUnquotedUrlsButWeParseThemAnyway { - background: url(--var(foo-bar,#dadce0)); - -fb-sprite: url(fbglyph:cross-outline, fig-white); -} - -.number { - background-image: url(http://123.com); - background: url(path/to/123.jpg); - background: url(#123.foo); - background: no-repeat center/80% url(http://123.com); - background: no-repeat center/80% url(path/to/123.jpg); - background: no-repeat center/80% url(#123.foo); -} - -=====================================output===================================== -.stringContentIsNotModifiedEvenIfInvalid { - background: url("@images"); - background: url("$images"); - background: url('/+0PX!/"\\a?~^[]{} $%#'); - background: url("/+0PX!/'\\a?~^[]{} $%#"); - background: url("whitespace-around-string"); -} - -.validUnquotedUrls { - background: url(whitespace-around-string); - background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); - background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) - center center no-repeat; - background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); - offset-path: url(#path); - background: url(data/+0ThisShouldNotBeLowerCased); - background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); - background: url(https://example.com/some/quite,long,url,with,commas.jpg); - background: url(http://123.example.com); -} -@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); - -.validUnqotedUrlsThatAreParsedByLess { - background: url(@foo); -} - -.validUnquotedUrlsThatAreParsedBySass { - background: url($foo); - background: url($foo + $bar); - background: url($foo*3); - background: url($foo/$bar); -} - -.invalidUnquotedUrlsButWeParseThemAnyway { - background: url(--var(foo-bar, #dadce0)); - -fb-sprite: url(fbglyph:cross-outline, fig-white); -} - -.number { - background-image: url(http://123.com); - background: url(path/to/123.jpg); - background: url(#123.foo); - background: no-repeat center/80% url(http://123.com); - background: no-repeat center/80% url(path/to/123.jpg); - background: no-repeat center/80% url(#123.foo); -} - -================================================================================ -`; diff --git a/tests/format/css/inline-url/format.test.js b/tests/format/css/inline-url/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/inline-url/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/inline-url/jsfmt.spec.js b/tests/format/css/inline-url/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/inline-url/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/long-rule/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/long-rule/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/long-rule/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/long-rule/__snapshots__/format.test.js.snap diff --git a/tests/format/css/long-rule/format.test.js b/tests/format/css/long-rule/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/long-rule/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/long-rule/jsfmt.spec.js b/tests/format/css/long-rule/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/long-rule/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/loose/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/loose/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/loose/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/loose/__snapshots__/format.test.js.snap diff --git a/tests/format/css/loose/format.test.js b/tests/format/css/loose/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/loose/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/loose/jsfmt.spec.js b/tests/format/css/loose/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/loose/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/modules/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/modules/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/modules/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/modules/__snapshots__/format.test.js.snap diff --git a/tests/format/css/modules/format.test.js b/tests/format/css/modules/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/modules/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/modules/jsfmt.spec.js b/tests/format/css/modules/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/modules/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/no-semicolon/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/no-semicolon/__snapshots__/format.test.js.snap diff --git a/tests/format/css/no-semicolon/format.test.js b/tests/format/css/no-semicolon/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/no-semicolon/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/no-semicolon/jsfmt.spec.js b/tests/format/css/no-semicolon/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/no-semicolon/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/numbers/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/numbers/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/numbers/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/numbers/__snapshots__/format.test.js.snap diff --git a/tests/format/css/numbers/format.test.js b/tests/format/css/numbers/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/numbers/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/numbers/jsfmt.spec.js b/tests/format/css/numbers/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/numbers/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/params/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/params/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/params/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/params/__snapshots__/format.test.js.snap diff --git a/tests/format/css/params/format.test.js b/tests/format/css/params/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/params/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/params/jsfmt.spec.js b/tests/format/css/params/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/params/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/parens/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/parens/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/parens/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/parens/__snapshots__/format.test.js.snap diff --git a/tests/format/css/parens/format.test.js b/tests/format/css/parens/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/parens/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/parens/jsfmt.spec.js b/tests/format/css/parens/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/parens/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/postcss-8-improment/__snapshots__/format.test.js.snap b/tests/format/css/postcss-8-improment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8d6e26db3a98 --- /dev/null +++ b/tests/format/css/postcss-8-improment/__snapshots__/format.test.js.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty-props.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +:root { + --empty:; + --one-space: ; + --two-space: ; +--many-space: ; +} + +=====================================output===================================== +:root { + --empty:; + --one-space: ; + --two-space: ; + --many-space: ; +} + +================================================================================ +`; + +exports[`test.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} + +=====================================output===================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a": 1}}, [4]]; + --javascript: function(rule) {console.log(rule)}; +} + +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} + +================================================================================ +`; diff --git a/tests/format/css/postcss-8-improment/empty-props.css b/tests/format/css/postcss-8-improment/empty-props.css new file mode 100644 index 000000000000..172a41d5f6ba --- /dev/null +++ b/tests/format/css/postcss-8-improment/empty-props.css @@ -0,0 +1,6 @@ +:root { + --empty:; + --one-space: ; + --two-space: ; +--many-space: ; +} diff --git a/tests/format/css/postcss-8-improment/format.test.js b/tests/format/css/postcss-8-improment/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/postcss-8-improment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/postcss-8-improment/test.css b/tests/format/css/postcss-8-improment/test.css new file mode 100644 index 000000000000..d269083a9d4c --- /dev/null +++ b/tests/format/css/postcss-8-improment/test.css @@ -0,0 +1,17 @@ +/* +This test is copied from `postcss@8` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} diff --git a/tests/format/css/postcss-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/postcss-plugins/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/postcss-plugins/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/postcss-plugins/__snapshots__/format.test.js.snap diff --git a/tests/format/css/postcss-plugins/format.test.js b/tests/format/css/postcss-plugins/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/postcss-plugins/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/postcss-plugins/jsfmt.spec.js b/tests/format/css/postcss-plugins/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/postcss-plugins/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/prefix/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/prefix/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/prefix/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/prefix/__snapshots__/format.test.js.snap diff --git a/tests/format/css/prefix/format.test.js b/tests/format/css/prefix/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/prefix/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/prefix/jsfmt.spec.js b/tests/format/css/prefix/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/prefix/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/pseudo-call/__snapshots__/format.test.js.snap b/tests/format/css/pseudo-call/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1d32b0fbe0c6 --- /dev/null +++ b/tests/format/css/pseudo-call/__snapshots__/format.test.js.snap @@ -0,0 +1,262 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`has.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] +) { + display: none; +} + +=====================================output===================================== +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] +) { + display: none; +} + +================================================================================ +`; + +exports[`indent.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +:where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +:is(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :is(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +:not(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :not(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +=====================================output===================================== +:where( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select +) { + /* CSS here */ +} + +.foooooooooooooooooooo + :where( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select + ) { + /* CSS here */ +} + +:is( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select +) { + /* CSS here */ +} + +.foooooooooooooooooooo + :is( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select + ) { + /* CSS here */ +} + +:not( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select +) { + /* CSS here */ +} + +.foooooooooooooooooooo + :not( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select + ) { + /* CSS here */ +} + +================================================================================ +`; + +exports[`is.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +:is(ol, ul, menu:unsupported) :is(ol, ul) { + color: green; +} + +:is(ol, ul) :is(ol, ul) ol { + list-style-type: lower-greek; + color: chocolate; +} + +:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) :is(ul, menu, dir) { + list-style-type: square; +} + +/* Level 0 */ +h1 { + font-size: 30px; +} +/* Level 1 */ +:is(section, article, aside, nav) h1 { + font-size: 25px; +} +/* Level 2 */ +:is(section, article, aside, nav) :is(section, article, aside, nav) h1 { + font-size: 20px; +} +/* Level 3 */ +:is(section, article, aside, nav) :is(section, article, aside, nav) :is(section, article, aside, nav) h1 { + font-size: 15px; +} + +some-element:is(::before, ::after) { + display: block; +} + +=====================================output===================================== +:is(ol, ul, menu:unsupported) :is(ol, ul) { + color: green; +} + +:is(ol, ul) :is(ol, ul) ol { + list-style-type: lower-greek; + color: chocolate; +} + +:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) :is(ul, menu, dir) { + list-style-type: square; +} + +/* Level 0 */ +h1 { + font-size: 30px; +} +/* Level 1 */ +:is(section, article, aside, nav) h1 { + font-size: 25px; +} +/* Level 2 */ +:is(section, article, aside, nav) :is(section, article, aside, nav) h1 { + font-size: 20px; +} +/* Level 3 */ +:is(section, article, aside, nav) + :is(section, article, aside, nav) + :is(section, article, aside, nav) + h1 { + font-size: 15px; +} + +some-element:is(::before, ::after) { + display: block; +} + +================================================================================ +`; + +exports[`pseudo_call.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +div:not(:last-child) { +} + +=====================================output===================================== +div:not(:last-child) { +} + +================================================================================ +`; + +exports[`where.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +:where(#p0:checked ~ #play:checked ~ #c1:checked, #p1:checked ~ #play:checked ~ #c2:checked, #p2:checked ~ #play:checked ~ #cO:checked) ~ #result > +#c { display: block; } + +:where(ol, ul, menu:unsupported) :where(ol, ul) { + color: green; +} + +:where(ol, ul) :where(ol, ul) ol { + list-style-type: lower-greek; + color: chocolate; +} + +:is(section.is-styling, aside.is-styling, footer.is-styling) a { + color: red; +} + +:where(section.where-styling, aside.where-styling, footer.where-styling) a { + color: orange; +} + +=====================================output===================================== +:where( + #p0:checked ~ #play:checked ~ #c1:checked, + #p1:checked ~ #play:checked ~ #c2:checked, + #p2:checked ~ #play:checked ~ #cO:checked + ) + ~ #result + > #c { + display: block; +} + +:where(ol, ul, menu:unsupported) :where(ol, ul) { + color: green; +} + +:where(ol, ul) :where(ol, ul) ol { + list-style-type: lower-greek; + color: chocolate; +} + +:is(section.is-styling, aside.is-styling, footer.is-styling) a { + color: red; +} + +:where(section.where-styling, aside.where-styling, footer.where-styling) a { + color: orange; +} + +================================================================================ +`; diff --git a/tests/format/css/pseudo-call/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/pseudo-call/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5a3dbabd431e..000000000000 --- a/tests/format/css/pseudo-call/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,155 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`is.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -:is(ol, ul, menu:unsupported) :is(ol, ul) { - color: green; -} - -:is(ol, ul) :is(ol, ul) ol { - list-style-type: lower-greek; - color: chocolate; -} - -:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) :is(ul, menu, dir) { - list-style-type: square; -} - -/* Level 0 */ -h1 { - font-size: 30px; -} -/* Level 1 */ -:is(section, article, aside, nav) h1 { - font-size: 25px; -} -/* Level 2 */ -:is(section, article, aside, nav) :is(section, article, aside, nav) h1 { - font-size: 20px; -} -/* Level 3 */ -:is(section, article, aside, nav) :is(section, article, aside, nav) :is(section, article, aside, nav) h1 { - font-size: 15px; -} - -some-element:is(::before, ::after) { - display: block; -} - -=====================================output===================================== -:is(ol, ul, menu:unsupported) :is(ol, ul) { - color: green; -} - -:is(ol, ul) :is(ol, ul) ol { - list-style-type: lower-greek; - color: chocolate; -} - -:is(ol, ul, menu, dir) :is(ol, ul, menu, dir) :is(ul, menu, dir) { - list-style-type: square; -} - -/* Level 0 */ -h1 { - font-size: 30px; -} -/* Level 1 */ -:is(section, article, aside, nav) h1 { - font-size: 25px; -} -/* Level 2 */ -:is(section, article, aside, nav) :is(section, article, aside, nav) h1 { - font-size: 20px; -} -/* Level 3 */ -:is(section, article, aside, nav) - :is(section, article, aside, nav) - :is(section, article, aside, nav) - h1 { - font-size: 15px; -} - -some-element:is(::before, ::after) { - display: block; -} - -================================================================================ -`; - -exports[`pseudo_call.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -div:not(:last-child) { -} - -=====================================output===================================== -div:not(:last-child) { -} - -================================================================================ -`; - -exports[`where.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -:where(#p0:checked ~ #play:checked ~ #c1:checked, #p1:checked ~ #play:checked ~ #c2:checked, #p2:checked ~ #play:checked ~ #cO:checked) ~ #result > -#c { display: block; } - -:where(ol, ul, menu:unsupported) :where(ol, ul) { - color: green; -} - -:where(ol, ul) :where(ol, ul) ol { - list-style-type: lower-greek; - color: chocolate; -} - -:is(section.is-styling, aside.is-styling, footer.is-styling) a { - color: red; -} - -:where(section.where-styling, aside.where-styling, footer.where-styling) a { - color: orange; -} - -=====================================output===================================== -:where( - #p0:checked ~ #play:checked ~ #c1:checked, - #p1:checked ~ #play:checked ~ #c2:checked, - #p2:checked ~ #play:checked ~ #cO:checked - ) - ~ #result - > #c { - display: block; -} - -:where(ol, ul, menu:unsupported) :where(ol, ul) { - color: green; -} - -:where(ol, ul) :where(ol, ul) ol { - list-style-type: lower-greek; - color: chocolate; -} - -:is(section.is-styling, aside.is-styling, footer.is-styling) a { - color: red; -} - -:where(section.where-styling, aside.where-styling, footer.where-styling) a { - color: orange; -} - -================================================================================ -`; diff --git a/tests/format/css/pseudo-call/format.test.js b/tests/format/css/pseudo-call/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/pseudo-call/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/pseudo-call/has.css b/tests/format/css/pseudo-call/has.css new file mode 100644 index 000000000000..b68a6806d550 --- /dev/null +++ b/tests/format/css/pseudo-call/has.css @@ -0,0 +1,5 @@ +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] +) { + display: none; +} diff --git a/tests/format/css/pseudo-call/indent.css b/tests/format/css/pseudo-call/indent.css new file mode 100644 index 000000000000..8812d57a8224 --- /dev/null +++ b/tests/format/css/pseudo-call/indent.css @@ -0,0 +1,23 @@ +:where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +:is(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :is(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +:not(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +.foooooooooooooooooooo :not(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} diff --git a/tests/format/css/pseudo-call/jsfmt.spec.js b/tests/format/css/pseudo-call/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/pseudo-call/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/quotes/__snapshots__/format.test.js.snap b/tests/format/css/quotes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b4baa9988aaa --- /dev/null +++ b/tests/format/css/quotes/__snapshots__/format.test.js.snap @@ -0,0 +1,394 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`quotes.css - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +@charset "UTF-8"; +/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ +/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ +@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ + +@supports (content: one "two" three 'four') { + a[href="foo" y], + abbr[title^='It\\'s a trap!'], + img[src=""] { + /* Simple strings. */ + content: "abc"; + content: 'abc'; + + /* Escape. */ + content: '\\A'; + + /* Emoji. */ + content: '🐶'; + + /* Empty string. */ + content: ""; + content: ''; + + /* Single double quote. */ + content: "\\""; + content: '"'; + + /* Single single quote. */ + content: "'"; + content: '\\''; + + /* One of each. */ + content: "\\"'"; + content: '"\\''; + + /* One of each with unnecessary escapes. */ + content: "\\"\\'"; + content: '\\"\\''; + + /* More double quotes than single quotes. */ + content: "\\"'\\""; + content: '"\\'"'; + + /* More single quotes than double quotes. */ + content: "\\"''"; + content: '"\\'\\''; + + /* Two of each. */ + content: "\\"\\"''"; + content: '""\\'\\''; + + /* Single backslash. */ + content: '\\\\'; + content: "\\\\"; + + /* Backslases. */ + content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; + content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; + + /* Somewhat more real-word example. */ + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + content: 'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.'; + + /* Somewhat more real-word example 2. */ + content: "var backslash = \\"\\\\\\", doubleQuote = '\\"';"; + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + + /* Leave all "escapes" alone. */ + content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; + content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; + } +} + +@import "file.css"; +@import 'file.css'; + +@import url("foo.css"); +@import url('foo.css'); + +@import "foo.css" screen and (orientation: landscape); +@import 'foo.css' screen and (orientation: landscape); + +@foo "one"; +@foo 'one'; +@foo "one" two 'three'; +@foo ("one"); +@foo ('one'); +@foo ("one" two 'three'); + +one "two" three {} +one 'two' three {} + +=====================================output===================================== +@charset "UTF-8"; +/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ +/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ +@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ + +@supports (content: one 'two' three 'four') { + a[href='foo' y], + abbr[title^="It's a trap!"], + img[src=''] { + /* Simple strings. */ + content: 'abc'; + content: 'abc'; + + /* Escape. */ + content: '\\A'; + + /* Emoji. */ + content: '🐶'; + + /* Empty string. */ + content: ''; + content: ''; + + /* Single double quote. */ + content: '"'; + content: '"'; + + /* Single single quote. */ + content: "'"; + content: "'"; + + /* One of each. */ + content: '"\\''; + content: '"\\''; + + /* One of each with unnecessary escapes. */ + content: '"\\''; + content: '\\"\\''; + + /* More double quotes than single quotes. */ + content: '"\\'"'; + content: '"\\'"'; + + /* More single quotes than double quotes. */ + content: "\\"''"; + content: "\\"''"; + + /* Two of each. */ + content: '""\\'\\''; + content: '""\\'\\''; + + /* Single backslash. */ + content: '\\\\'; + content: '\\\\'; + + /* Backslases. */ + content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; + content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; + + /* Somewhat more real-word example. */ + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + + /* Somewhat more real-word example 2. */ + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + + /* Leave all "escapes" alone. */ + content: '\\Abc4 foo \\n' /* "comment" */ '\\end'; + content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; + } +} + +@import 'file.css'; +@import 'file.css'; + +@import url('foo.css'); +@import url('foo.css'); + +@import 'foo.css' screen and (orientation: landscape); +@import 'foo.css' screen and (orientation: landscape); + +@foo "one"; +@foo 'one'; +@foo "one" two 'three'; +@foo ("one"); +@foo ('one'); +@foo ("one" two 'three'); + +one 'two' three { +} +one 'two' three { +} + +================================================================================ +`; + +exports[`quotes.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@charset "UTF-8"; +/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ +/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ +@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ + +@supports (content: one "two" three 'four') { + a[href="foo" y], + abbr[title^='It\\'s a trap!'], + img[src=""] { + /* Simple strings. */ + content: "abc"; + content: 'abc'; + + /* Escape. */ + content: '\\A'; + + /* Emoji. */ + content: '🐶'; + + /* Empty string. */ + content: ""; + content: ''; + + /* Single double quote. */ + content: "\\""; + content: '"'; + + /* Single single quote. */ + content: "'"; + content: '\\''; + + /* One of each. */ + content: "\\"'"; + content: '"\\''; + + /* One of each with unnecessary escapes. */ + content: "\\"\\'"; + content: '\\"\\''; + + /* More double quotes than single quotes. */ + content: "\\"'\\""; + content: '"\\'"'; + + /* More single quotes than double quotes. */ + content: "\\"''"; + content: '"\\'\\''; + + /* Two of each. */ + content: "\\"\\"''"; + content: '""\\'\\''; + + /* Single backslash. */ + content: '\\\\'; + content: "\\\\"; + + /* Backslases. */ + content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; + content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; + + /* Somewhat more real-word example. */ + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + content: 'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.'; + + /* Somewhat more real-word example 2. */ + content: "var backslash = \\"\\\\\\", doubleQuote = '\\"';"; + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + + /* Leave all "escapes" alone. */ + content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; + content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; + } +} + +@import "file.css"; +@import 'file.css'; + +@import url("foo.css"); +@import url('foo.css'); + +@import "foo.css" screen and (orientation: landscape); +@import 'foo.css' screen and (orientation: landscape); + +@foo "one"; +@foo 'one'; +@foo "one" two 'three'; +@foo ("one"); +@foo ('one'); +@foo ("one" two 'three'); + +one "two" three {} +one 'two' three {} + +=====================================output===================================== +@charset "UTF-8"; +/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ +/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ +@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ + +@supports (content: one "two" three "four") { + a[href="foo" y], + abbr[title^="It's a trap!"], + img[src=""] { + /* Simple strings. */ + content: "abc"; + content: "abc"; + + /* Escape. */ + content: "\\A"; + + /* Emoji. */ + content: "🐶"; + + /* Empty string. */ + content: ""; + content: ""; + + /* Single double quote. */ + content: '"'; + content: '"'; + + /* Single single quote. */ + content: "'"; + content: "'"; + + /* One of each. */ + content: "\\"'"; + content: "\\"'"; + + /* One of each with unnecessary escapes. */ + content: "\\"\\'"; + content: "\\"'"; + + /* More double quotes than single quotes. */ + content: '"\\'"'; + content: '"\\'"'; + + /* More single quotes than double quotes. */ + content: "\\"''"; + content: "\\"''"; + + /* Two of each. */ + content: "\\"\\"''"; + content: "\\"\\"''"; + + /* Single backslash. */ + content: "\\\\"; + content: "\\\\"; + + /* Backslases. */ + content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; + content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; + + /* Somewhat more real-word example. */ + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; + + /* Somewhat more real-word example 2. */ + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; + + /* Leave all "escapes" alone. */ + content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; + content: "\\Abc4 foo \\n" /* 'comment' */ "\\end"; + } +} + +@import "file.css"; +@import "file.css"; + +@import url("foo.css"); +@import url("foo.css"); + +@import "foo.css" screen and (orientation: landscape); +@import "foo.css" screen and (orientation: landscape); + +@foo "one"; +@foo 'one'; +@foo "one" two 'three'; +@foo ("one"); +@foo ('one'); +@foo ("one" two 'three'); + +one "two" three { +} +one "two" three { +} + +================================================================================ +`; diff --git a/tests/format/css/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/quotes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 67eed4b426d8..000000000000 --- a/tests/format/css/quotes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,394 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`quotes.css - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -@charset "UTF-8"; -/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ -/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ -@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ - -@supports (content: one "two" three 'four') { - a[href="foo" y], - abbr[title^='It\\'s a trap!'], - img[src=""] { - /* Simple strings. */ - content: "abc"; - content: 'abc'; - - /* Escape. */ - content: '\\A'; - - /* Emoji. */ - content: '🐶'; - - /* Empty string. */ - content: ""; - content: ''; - - /* Single double quote. */ - content: "\\""; - content: '"'; - - /* Single single quote. */ - content: "'"; - content: '\\''; - - /* One of each. */ - content: "\\"'"; - content: '"\\''; - - /* One of each with unnecessary escapes. */ - content: "\\"\\'"; - content: '\\"\\''; - - /* More double quotes than single quotes. */ - content: "\\"'\\""; - content: '"\\'"'; - - /* More single quotes than double quotes. */ - content: "\\"''"; - content: '"\\'\\''; - - /* Two of each. */ - content: "\\"\\"''"; - content: '""\\'\\''; - - /* Single backslash. */ - content: '\\\\'; - content: "\\\\"; - - /* Backslases. */ - content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; - content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; - - /* Somewhat more real-word example. */ - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - content: 'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.'; - - /* Somewhat more real-word example 2. */ - content: "var backslash = \\"\\\\\\", doubleQuote = '\\"';"; - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - - /* Leave all "escapes" alone. */ - content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; - content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; - } -} - -@import "file.css"; -@import 'file.css'; - -@import url("foo.css"); -@import url('foo.css'); - -@import "foo.css" screen and (orientation: landscape); -@import 'foo.css' screen and (orientation: landscape); - -@foo "one"; -@foo 'one'; -@foo "one" two 'three'; -@foo ("one"); -@foo ('one'); -@foo ("one" two 'three'); - -one "two" three {} -one 'two' three {} - -=====================================output===================================== -@charset "UTF-8"; -/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ -/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ -@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ - -@supports (content: one 'two' three 'four') { - a[href='foo' y], - abbr[title^="It's a trap!"], - img[src=''] { - /* Simple strings. */ - content: 'abc'; - content: 'abc'; - - /* Escape. */ - content: '\\A'; - - /* Emoji. */ - content: '🐶'; - - /* Empty string. */ - content: ''; - content: ''; - - /* Single double quote. */ - content: '"'; - content: '"'; - - /* Single single quote. */ - content: "'"; - content: "'"; - - /* One of each. */ - content: '"\\''; - content: '"\\''; - - /* One of each with unnecessary escapes. */ - content: '"\\''; - content: '"\\''; - - /* More double quotes than single quotes. */ - content: '"\\'"'; - content: '"\\'"'; - - /* More single quotes than double quotes. */ - content: "\\"''"; - content: "\\"''"; - - /* Two of each. */ - content: '""\\'\\''; - content: '""\\'\\''; - - /* Single backslash. */ - content: '\\\\'; - content: '\\\\'; - - /* Backslases. */ - content: "\\"\\\\\\"\\\\\\\\\\" ''\\\\'\\\\'\\\\\\\\'"; - content: '\\'\\\\\\'\\\\\\\\\\' ""\\\\"\\\\"\\\\\\\\"'; - - /* Somewhat more real-word example. */ - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - - /* Somewhat more real-word example 2. */ - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - - /* Leave all "escapes" alone. */ - content: '\\Abc4 foo \\n' /* "comment" */ '\\end'; - content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; - } -} - -@import 'file.css'; -@import 'file.css'; - -@import url('foo.css'); -@import url('foo.css'); - -@import 'foo.css' screen and (orientation: landscape); -@import 'foo.css' screen and (orientation: landscape); - -@foo "one"; -@foo 'one'; -@foo "one" two 'three'; -@foo ("one"); -@foo ('one'); -@foo ("one" two 'three'); - -one 'two' three { -} -one 'two' three { -} - -================================================================================ -`; - -exports[`quotes.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -@charset "UTF-8"; -/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ -/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ -@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ - -@supports (content: one "two" three 'four') { - a[href="foo" y], - abbr[title^='It\\'s a trap!'], - img[src=""] { - /* Simple strings. */ - content: "abc"; - content: 'abc'; - - /* Escape. */ - content: '\\A'; - - /* Emoji. */ - content: '🐶'; - - /* Empty string. */ - content: ""; - content: ''; - - /* Single double quote. */ - content: "\\""; - content: '"'; - - /* Single single quote. */ - content: "'"; - content: '\\''; - - /* One of each. */ - content: "\\"'"; - content: '"\\''; - - /* One of each with unnecessary escapes. */ - content: "\\"\\'"; - content: '\\"\\''; - - /* More double quotes than single quotes. */ - content: "\\"'\\""; - content: '"\\'"'; - - /* More single quotes than double quotes. */ - content: "\\"''"; - content: '"\\'\\''; - - /* Two of each. */ - content: "\\"\\"''"; - content: '""\\'\\''; - - /* Single backslash. */ - content: '\\\\'; - content: "\\\\"; - - /* Backslases. */ - content: "\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"; - content: '\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'; - - /* Somewhat more real-word example. */ - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - content: 'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.'; - - /* Somewhat more real-word example 2. */ - content: "var backslash = \\"\\\\\\", doubleQuote = '\\"';"; - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - - /* Leave all "escapes" alone. */ - content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; - content: '\\Abc4 foo \\n' /* 'comment' */ '\\end'; - } -} - -@import "file.css"; -@import 'file.css'; - -@import url("foo.css"); -@import url('foo.css'); - -@import "foo.css" screen and (orientation: landscape); -@import 'foo.css' screen and (orientation: landscape); - -@foo "one"; -@foo 'one'; -@foo "one" two 'three'; -@foo ("one"); -@foo ('one'); -@foo ("one" two 'three'); - -one "two" three {} -one 'two' three {} - -=====================================output===================================== -@charset "UTF-8"; -/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */ -/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */ -@charset 'UTF-8'; /* Single quotes are invalid here. Keep them since we don't know what the user is doing. */ - -@supports (content: one "two" three "four") { - a[href="foo" y], - abbr[title^="It's a trap!"], - img[src=""] { - /* Simple strings. */ - content: "abc"; - content: "abc"; - - /* Escape. */ - content: "\\A"; - - /* Emoji. */ - content: "🐶"; - - /* Empty string. */ - content: ""; - content: ""; - - /* Single double quote. */ - content: '"'; - content: '"'; - - /* Single single quote. */ - content: "'"; - content: "'"; - - /* One of each. */ - content: "\\"'"; - content: "\\"'"; - - /* One of each with unnecessary escapes. */ - content: "\\"'"; - content: "\\"'"; - - /* More double quotes than single quotes. */ - content: '"\\'"'; - content: '"\\'"'; - - /* More single quotes than double quotes. */ - content: "\\"''"; - content: "\\"''"; - - /* Two of each. */ - content: "\\"\\"''"; - content: "\\"\\"''"; - - /* Single backslash. */ - content: "\\\\"; - content: "\\\\"; - - /* Backslases. */ - content: "\\"\\\\\\"\\\\\\\\\\" ''\\\\'\\\\'\\\\\\\\'"; - content: '\\'\\\\\\'\\\\\\\\\\' ""\\\\"\\\\"\\\\\\\\"'; - - /* Somewhat more real-word example. */ - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - content: "He's sayin': \\"How's it goin'?\\" Don't ask me why."; - - /* Somewhat more real-word example 2. */ - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - content: 'var backslash = "\\\\", doubleQuote = \\'"\\';'; - - /* Leave all "escapes" alone. */ - content: "\\Abc4 foo \\n" /* "comment" */ "\\end"; - content: "\\Abc4 foo \\n" /* 'comment' */ "\\end"; - } -} - -@import "file.css"; -@import "file.css"; - -@import url("foo.css"); -@import url("foo.css"); - -@import "foo.css" screen and (orientation: landscape); -@import "foo.css" screen and (orientation: landscape); - -@foo "one"; -@foo 'one'; -@foo "one" two 'three'; -@foo ("one"); -@foo ('one'); -@foo ("one" two 'three'); - -one "two" three { -} -one "two" three { -} - -================================================================================ -`; diff --git a/tests/format/css/quotes/format.test.js b/tests/format/css/quotes/format.test.js new file mode 100644 index 000000000000..248fee62a15f --- /dev/null +++ b/tests/format/css/quotes/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["css"]); +runFormatTest(import.meta, ["css"], { singleQuote: true }); diff --git a/tests/format/css/quotes/jsfmt.spec.js b/tests/format/css/quotes/jsfmt.spec.js deleted file mode 100644 index a1f5dde8bcea..000000000000 --- a/tests/format/css/quotes/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["css"]); -run_spec(__dirname, ["css"], { singleQuote: true }); diff --git a/tests/format/css/range/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/range/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/range/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/range/__snapshots__/format.test.js.snap diff --git a/tests/format/css/range/format.test.js b/tests/format/css/range/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/range/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/range/jsfmt.spec.js b/tests/format/css/range/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/range/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/selector-call/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/selector-call/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/selector-call/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/selector-call/__snapshots__/format.test.js.snap diff --git a/tests/format/css/selector-call/format.test.js b/tests/format/css/selector-call/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/selector-call/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/selector-call/jsfmt.spec.js b/tests/format/css/selector-call/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/selector-call/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/selector-list/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/selector-list/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/selector-list/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/selector-list/__snapshots__/format.test.js.snap diff --git a/tests/format/css/selector-list/format.test.js b/tests/format/css/selector-list/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/selector-list/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/selector-list/jsfmt.spec.js b/tests/format/css/selector-list/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/selector-list/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/selector-string/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/selector-string/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/selector-string/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/selector-string/__snapshots__/format.test.js.snap diff --git a/tests/format/css/selector-string/format.test.js b/tests/format/css/selector-string/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/selector-string/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/selector-string/jsfmt.spec.js b/tests/format/css/selector-string/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/selector-string/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/tailwind/__snapshots__/format.test.js.snap b/tests/format/css/tailwind/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..03352385e364 --- /dev/null +++ b/tests/format/css/tailwind/__snapshots__/format.test.js.snap @@ -0,0 +1,103 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`utility-directive.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@utility tab-* { + tab-size: --value(--tab-size-*); +} + +@utility tab-* { + tab-size: --value(integer); +} + +@utility tab-* { + tab-size: --value([integer]); + tab-size: --value(integer); + tab-size: --value(--tab-size-*); +} + +@utility opacity-* { + opacity: --value([percentage]); + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*); +} + +@utility tab-* { + tab-size: --value(--tab-size-*, integer, [integer]); +} + +@utility opacity-* { + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*, [percentage]); +} + +@utility inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length])); +} + +@utility -inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length]) * -1); +} + +@utility text-* { + font-size: --value(--font-size-*, [length]); + line-height: --modifier(--line-height-*, [length], [*]); +} + +@utility aspect-* { + aspect-ratio: --value(--aspect-ratio-*, ratio, [ratio]); +} + +=====================================output===================================== +@utility tab-* { + tab-size: --value(--tab-size-*); +} + +@utility tab-* { + tab-size: --value(integer); +} + +@utility tab-* { + tab-size: --value([integer]); + tab-size: --value(integer); + tab-size: --value(--tab-size-*); +} + +@utility opacity-* { + opacity: --value([percentage]); + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*); +} + +@utility tab-* { + tab-size: --value(--tab-size-*, integer, [integer]); +} + +@utility opacity-* { + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*, [percentage]); +} + +@utility inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length])); +} + +@utility -inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length]) * -1); +} + +@utility text-* { + font-size: --value(--font-size-*, [length]); + line-height: --modifier(--line-height-*, [length], [*]); +} + +@utility aspect-* { + aspect-ratio: --value(--aspect-ratio-*, ratio, [ratio]); +} + +================================================================================ +`; diff --git a/tests/format/css/tailwind/format.test.js b/tests/format/css/tailwind/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/tailwind/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/tailwind/utility-directive.css b/tests/format/css/tailwind/utility-directive.css new file mode 100644 index 000000000000..2f267db043c6 --- /dev/null +++ b/tests/format/css/tailwind/utility-directive.css @@ -0,0 +1,45 @@ +@utility tab-* { + tab-size: --value(--tab-size-*); +} + +@utility tab-* { + tab-size: --value(integer); +} + +@utility tab-* { + tab-size: --value([integer]); + tab-size: --value(integer); + tab-size: --value(--tab-size-*); +} + +@utility opacity-* { + opacity: --value([percentage]); + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*); +} + +@utility tab-* { + tab-size: --value(--tab-size-*, integer, [integer]); +} + +@utility opacity-* { + opacity: calc(--value(integer) * 1%); + opacity: --value(--opacity-*, [percentage]); +} + +@utility inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length])); +} + +@utility -inset-* { + inset: calc(--var(--spacing) * --value([percentage], [length]) * -1); +} + +@utility text-* { + font-size: --value(--font-size-*, [length]); + line-height: --modifier(--line-height-*, [length], [*]); +} + +@utility aspect-* { + aspect-ratio: --value(--aspect-ratio-*, ratio, [ratio]); +} diff --git a/tests/format/css/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/css/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..867f8c99505c --- /dev/null +++ b/tests/format/css/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`var-func.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.foo { + --bar: var(--baz,); + --bar: var(--baz ,); + --bar: var(--baz , ); + --bar: var(--baz,); + --bar: var( --baz1, --baz2 , ); +} + +=====================================output===================================== +.foo { + --bar: var(--baz,); + --bar: var(--baz,); + --bar: var(--baz,); + --bar: var(--baz,); + --bar: var(--baz1, --baz2,); +} + +================================================================================ +`; diff --git a/tests/format/css/trailing-comma/format.test.js b/tests/format/css/trailing-comma/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/trailing-comma/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/trailing-comma/var-func.css b/tests/format/css/trailing-comma/var-func.css new file mode 100644 index 000000000000..e3e6f6b512ed --- /dev/null +++ b/tests/format/css/trailing-comma/var-func.css @@ -0,0 +1,7 @@ +.foo { + --bar: var(--baz,); + --bar: var(--baz ,); + --bar: var(--baz , ); + --bar: var(--baz,); + --bar: var( --baz1, --baz2 , ); +} diff --git a/tests/format/css/units/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/units/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/units/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/units/__snapshots__/format.test.js.snap diff --git a/tests/format/css/units/format.test.js b/tests/format/css/units/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/units/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/units/jsfmt.spec.js b/tests/format/css/units/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/units/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/url/__snapshots__/format.test.js.snap b/tests/format/css/url/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8f0b9dc29a34 --- /dev/null +++ b/tests/format/css/url/__snapshots__/format.test.js.snap @@ -0,0 +1,73 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`url.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +div { + background: url(/images/bg.png); + background: -fb-url(/images/bg.png); +} + +@font-face { + src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); + src: url(foo.ttf?query=foo,bar,); + src: url(foo.woff2?foo=rgb\\(255,255,0\\)); +} + +a { + content: url(https://example.com/\\)\\).jpg); + content: url(https://example.com/\\(\\(.jpg); + content: url(https://example.com/\\ \\ .jpg); + content: url( https://example.com/\\)\\).jpg ); + content: url( https://example.com/\\(\\(.jpg ); + content: url( https://example.com/\\ \\ .jpg ); + + background: + no-repeat url(https://example.com/\\)\\).jpg), + no-repeat url(https://example.com/\\(\\(.jpg), + no-repeat url(https://example.com/\\ \\ .jpg), + no-repeat url( https://example.com/\\)\\).jpg ), + no-repeat url( https://example.com/\\(\\(.jpg ), + no-repeat url( https://example.com/\\ \\ .jpg ), + no-repeat url(foo.ttf?query=foo,bar,), + no-repeat url(foo.woff2?foo=rgb\\(255,255,0\\)) + no-repeat url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); + ; +} + +=====================================output===================================== +div { + background: url(/images/bg.png); + background: -fb-url(/images/bg.png); +} + +@font-face { + src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); + src: url(foo.ttf?query=foo,bar,); + src: url(foo.woff2?foo=rgb\\(255,255,0\\)); +} + +a { + content: url(https://example.com/\\)\\).jpg); + content: url(https://example.com/\\(\\(.jpg); + content: url(https://example.com/\\ \\ .jpg); + content: url( https://example.com/\\)\\).jpg ); + content: url( https://example.com/\\(\\(.jpg ); + content: url(https://example.com/\\ \\ .jpg); + + background: no-repeat url(https://example.com/\\)\\).jpg), + no-repeat url(https://example.com/\\(\\(.jpg), + no-repeat url(https://example.com/\\ \\ .jpg), + no-repeat url( https://example.com/\\)\\).jpg ), + no-repeat url( https://example.com/\\(\\(.jpg ), + no-repeat url( https://example.com/\\ \\ .jpg ), + no-repeat url(foo.ttf?query=foo,bar,), + no-repeat url(foo.woff2?foo=rgb\\(255,255,0\\)) + no-repeat url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); +} + +================================================================================ +`; diff --git a/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ff0a122daf39..000000000000 --- a/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`url.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -div { - background: url(/images/bg.png); - background: -fb-url(/images/bg.png); -} - -=====================================output===================================== -div { - background: url(/images/bg.png); - background: -fb-url(/images/bg.png); -} - -================================================================================ -`; diff --git a/tests/format/css/url/format.test.js b/tests/format/css/url/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/url/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/url/jsfmt.spec.js b/tests/format/css/url/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/url/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/url/url.css b/tests/format/css/url/url.css index db4e231406be..d31282c7e301 100644 --- a/tests/format/css/url/url.css +++ b/tests/format/css/url/url.css @@ -2,3 +2,30 @@ div { background: url(/images/bg.png); background: -fb-url(/images/bg.png); } + +@font-face { + src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); + src: url(foo.ttf?query=foo,bar,); + src: url(foo.woff2?foo=rgb\(255,255,0\)); +} + +a { + content: url(https://example.com/\)\).jpg); + content: url(https://example.com/\(\(.jpg); + content: url(https://example.com/\ \ .jpg); + content: url( https://example.com/\)\).jpg ); + content: url( https://example.com/\(\(.jpg ); + content: url( https://example.com/\ \ .jpg ); + + background: + no-repeat url(https://example.com/\)\).jpg), + no-repeat url(https://example.com/\(\(.jpg), + no-repeat url(https://example.com/\ \ .jpg), + no-repeat url( https://example.com/\)\).jpg ), + no-repeat url( https://example.com/\(\(.jpg ), + no-repeat url( https://example.com/\ \ .jpg ), + no-repeat url(foo.ttf?query=foo,bar,), + no-repeat url(foo.woff2?foo=rgb\(255,255,0\)) + no-repeat url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); + ; +} diff --git a/tests/format/css/variables/__snapshots__/format.test.js.snap b/tests/format/css/variables/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..61e7ec4fb31f --- /dev/null +++ b/tests/format/css/variables/__snapshots__/format.test.js.snap @@ -0,0 +1,111 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`apply-rule.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +=====================================output===================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: { + color: red; + }; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +================================================================================ +`; + +exports[`variables.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.foo { + --prop: 10px; + prop1: var(--prop); + prop2: var(--my-var, --my-background, pink); + prop3: calc(var(--prop) * 1px); +} + +@supports (--foo: green) { + body { + color: var(--varName); + } +} + +=====================================output===================================== +.foo { + --prop: 10px; + prop1: var(--prop); + prop2: var(--my-var, --my-background, pink); + prop3: calc(var(--prop) * 1px); +} + +@supports (--foo: green) { + body { + color: var(--varName); + } +} + +================================================================================ +`; diff --git a/tests/format/css/variables/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/variables/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ea1a54c90da2..000000000000 --- a/tests/format/css/variables/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`variables.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.foo { - --prop: 10px; - prop1: var(--prop); - prop2: var(--my-var, --my-background, pink); - prop3: calc(var(--prop) * 1px); -} - -@supports (--foo: green) { - body { - color: var(--varName); - } -} - -=====================================output===================================== -.foo { - --prop: 10px; - prop1: var(--prop); - prop2: var(--my-var, --my-background, pink); - prop3: calc(var(--prop) * 1px); -} - -@supports (--foo: green) { - body { - color: var(--varName); - } -} - -================================================================================ -`; diff --git a/tests/format/css/variables/apply-rule.css b/tests/format/css/variables/apply-rule.css new file mode 100644 index 000000000000..56c04e2c251a --- /dev/null +++ b/tests/format/css/variables/apply-rule.css @@ -0,0 +1,30 @@ +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} diff --git a/tests/format/css/variables/format.test.js b/tests/format/css/variables/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/variables/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/variables/jsfmt.spec.js b/tests/format/css/variables/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/variables/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/css/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/yaml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/css/yaml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/css/yaml/__snapshots__/format.test.js.snap diff --git a/tests/format/css/yaml/format.test.js b/tests/format/css/yaml/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/css/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/css/yaml/jsfmt.spec.js b/tests/format/css/yaml/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/css/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ab6d595f1c03 --- /dev/null +++ b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap @@ -0,0 +1,30 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +=====================================output===================================== + + +================================================================================ +`; + +exports[`xhtml-doctype.xhtml format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + +

    Hello world! This is HTML5 Boilerplate.

    + + + + + + + + + + + + +================================================================================ +`; + +exports[`issue-9368.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +a->b-> + +=====================================output===================================== +a->b-> + +================================================================================ +`; + +exports[`issue-9368-2.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +a-b- + +=====================================output===================================== +a-b- + +================================================================================ +`; + +exports[`issue-9368-3.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +a trackpad, or a gyroscope. + +=====================================output===================================== +a trackpad, or a gyroscope. + +================================================================================ +`; + +exports[`more-html.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + Anchor + + + + +=====================================output===================================== + + + + Anchor + + + + +================================================================================ +`; + +exports[`void-elements.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; + +exports[`void-elements-2.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +text after + + +1 + +1 + +=====================================output===================================== +text after + + + + + 1 + +1 + +================================================================================ +`; + +exports[`with-colon.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    + +
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    +
    block
    BLOCK
    block
    block
    block
    +
     pre pr
    +e
    + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + block BLOCK block block block + pre pr +e + pre-wrap pr +e-wrap + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline
    +
    + + +
    + +
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    +
    block
    BLOCK
    block
    block
    block
    +
     pre pr
    +e
    + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + block BLOCK block block block + pre pr +e + pre-wrap pr +e-wrap + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline
    +
    + + +
    + +
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    +
    block
    BLOCK
    block
    block
    block
    +
     pre pr
    +e
    + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + block BLOCK block block block + pre pr +e + pre-wrap pr +e-wrap + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline
    +
    + + +
    + +
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    +
    block
    BLOCK
    block
    block
    block
    +
     pre pr
    +e
    + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + block BLOCK block block block + pre pr +e + pre-wrap pr +e-wrap + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline
    +
    + + +
    +
    +
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    +
    block
    BLOCK
    block
    block
    block
    +
     pre pr
    +e
    + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + block BLOCK block block block + pre pr +e + pre-wrap pr +e-wrap + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + inline inline inline inline
    +
    + + + +

    text text text text text text text text text text text text text text

    + +
    + + + + + + +const func = function() { console.log('Hello, there');} +.a{color:#f00} + + + +const func = function() { console.log('Hello, there');} +.a{color:#f00} + +=====================================output===================================== + +
    + +
    + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block +
    +
    block
    +
    BLOCK
    +
    block
    +
    block
    +
    block
    +
    + pre pr
    +e
    + + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline inline inline + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + + block BLOCK + block block block + pre pr e + pre-wrap pr e-wrap + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline + inline inline
    +
    + + +
    + +
    + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block +
    +
    block
    +
    BLOCK
    +
    block
    +
    block
    +
    block
    +
    + pre pr
    +e
    + + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline inline inline + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + + block BLOCK + block block block + pre pr e + pre-wrap pr e-wrap + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline + inline inline
    +
    + + +
    + +
    + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block +
    +
    block
    +
    BLOCK
    +
    block
    +
    block
    +
    block
    +
    + pre pr
    +e
    + + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline inline inline + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + + block BLOCK + block block block + pre pr e + pre-wrap pr e-wrap + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline + inline inline
    +
    + + +
    + +
    + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block +
    +
    block
    +
    BLOCK
    +
    block
    +
    block
    +
    block
    +
    + pre pr
    +e
    + + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline inline inline + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + + block BLOCK + block block block + pre pr e + pre-wrap pr e-wrap + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline + inline inline
    +
    + + +
    +
    +
    + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block +
    +
    block
    +
    BLOCK
    +
    block
    +
    block
    +
    block
    +
    + pre pr
    +e
    + + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline inline inline + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block + + block BLOCK + block block block + pre pr e + pre-wrap pr e-wrap + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline + + inline inline + inline inline +
    +
    + + + +
    +

    + text text text text text text text text text text text text text text +

    +
    + +
    + + + + + + + const func = function() { console.log('Hello, there');} + .a{color:#f00} + + + + + + + +const func = function() { console.log('Hello, there');} +.a{color:#f00} + +================================================================================ +`; diff --git a/tests/format/html/basics/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/basics/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9df0a56d170c..000000000000 --- a/tests/format/html/basics/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,983 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`broken-html.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - -
    - - - -< - -=====================================output===================================== - -
    <
    - -================================================================================ -`; - -exports[`comment.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; - -exports[`empty.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - -=====================================output===================================== - -================================================================================ -`; - -exports[`empty-doc.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - -=====================================output===================================== - - - - - - -================================================================================ -`; - -exports[`form.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -
    -
    - - - We'll never share your email with anyone else. -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - - This is some placeholder block-level help text for the above input. It's a bit lighter and easily wraps to a new line. -
    -
    - Radio buttons -
    - -
    -
    - -
    -
    - -
    -
    -
    - -
    - -
    - -=====================================output===================================== -
    -
    - - - We'll never share your email with anyone else. -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - - This is some placeholder block-level help text for the above input. It's - a bit lighter and easily wraps to a new line. -
    -
    - Radio buttons -
    - -
    -
    - -
    -
    - -
    -
    -
    - -
    - -
    - -================================================================================ -`; - -exports[`hello-world.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - Document - - - -

    Hello World

    - - - - -=====================================output===================================== - - - - - - - Document - - - -

    Hello World

    - - - -================================================================================ -`; - -exports[`html-comments.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - Anchor - - - - -=====================================output===================================== - - - - Anchor - - - - -================================================================================ -`; - -exports[`html5-boilerplate.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - -

    Hello world! This is HTML5 Boilerplate.

    - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - -

    Hello world! This is HTML5 Boilerplate.

    - - - - - - - - - - - - -================================================================================ -`; - -exports[`issue-9368.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -a->b-> - -=====================================output===================================== -a->b-> - -================================================================================ -`; - -exports[`issue-9368-2.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -a-b- - -=====================================output===================================== -a-b- - -================================================================================ -`; - -exports[`issue-9368-3.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -a trackpad, or a gyroscope. - -=====================================output===================================== -a trackpad, or a gyroscope. - -================================================================================ -`; - -exports[`more-html.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - Anchor - - - - -=====================================output===================================== - - - - Anchor - - - - -================================================================================ -`; - -exports[`void-elements.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - -=====================================output===================================== - - - - - - - - -================================================================================ -`; - -exports[`void-elements-2.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -text after - - -1 - -1 - -=====================================output===================================== -text after - - - - - 1 - -1 - -================================================================================ -`; - -exports[`with-colon.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - -
    - -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    BLOCK
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - block BLOCK block block block - pre pr -e - pre-wrap pr -e-wrap - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline
    -
    - - -
    - -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    BLOCK
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - block BLOCK block block block - pre pr -e - pre-wrap pr -e-wrap - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline
    -
    - - -
    - -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    BLOCK
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - block BLOCK block block block - pre pr -e - pre-wrap pr -e-wrap - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline
    -
    - - -
    - -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    BLOCK
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - block BLOCK block block block - pre pr -e - pre-wrap pr -e-wrap - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline
    -
    - - -
    -
    -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    BLOCK
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - block BLOCK block block block - pre pr -e - pre-wrap pr -e-wrap - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline
    -
    - - - -

    text text text text text text text text text text text text text text

    - -
    - - - - - - -const func = function() { console.log('Hello, there');} -.a{color:#f00} - - - -const func = function() { console.log('Hello, there');} -.a{color:#f00} - -=====================================output===================================== - -
    - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    BLOCK
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - - block BLOCK - block block block - pre pr e - pre-wrap pr e-wrap - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline - inline inline
    -
    - - -
    - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    BLOCK
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - - block BLOCK - block block block - pre pr e - pre-wrap pr e-wrap - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline - inline inline
    -
    - - -
    - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    BLOCK
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - - block BLOCK - block block block - pre pr e - pre-wrap pr e-wrap - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline - inline inline
    -
    - - -
    - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    BLOCK
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - - block BLOCK - block block block - pre pr e - pre-wrap pr e-wrap - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline - inline inline
    -
    - - -
    -
    -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    BLOCK
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block - - block BLOCK - block block block - pre pr e - pre-wrap pr e-wrap - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline - inline inline -
    -
    - - - -
    -

    - text text text text text text text text text text text text text text -

    -
    - -
    - - - - - - - const func = function() { console.log('Hello, there');} - .a{color:#f00} - - - - - - - -const func = function() { console.log('Hello, there');} -.a{color:#f00} - -================================================================================ -`; diff --git a/tests/format/html/basics/format.test.js b/tests/format/html/basics/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/basics/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/basics/jsfmt.spec.js b/tests/format/html/basics/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/basics/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/bracket-same-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/bracket-same-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/bracket-same-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/bracket-same-line/__snapshots__/format.test.js.snap diff --git a/tests/format/html/bracket-same-line/format.test.js b/tests/format/html/bracket-same-line/format.test.js new file mode 100644 index 000000000000..18f44d14ce5d --- /dev/null +++ b/tests/format/html/bracket-same-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["html"], { bracketSameLine: true }); +runFormatTest(import.meta, ["html"], { bracketSameLine: false }); diff --git a/tests/format/html/bracket-same-line/jsfmt.spec.js b/tests/format/html/bracket-same-line/jsfmt.spec.js deleted file mode 100644 index fdc42ac3f5b2..000000000000 --- a/tests/format/html/bracket-same-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["html"], { bracketSameLine: true }); -run_spec(__dirname, ["html"], { bracketSameLine: false }); diff --git a/tests/format/html/case/__snapshots__/format.test.js.snap b/tests/format/html/case/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..43a87faa0083 --- /dev/null +++ b/tests/format/html/case/__snapshots__/format.test.js.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`case.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + My tITlE + + + +

    Hello world!
    This is HTML5 Boilerplate.

    + + + + + +=====================================output===================================== + + + + + My tITlE + + + +

    + Hello world!
    + This is HTML5 Boilerplate. +

    + + + + + +================================================================================ +`; diff --git a/tests/format/html/case/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/case/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6b4e7adf2c5c..000000000000 --- a/tests/format/html/case/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,57 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`case.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - My tITlE - - - -

    Hello world!
    This is HTML5 Boilerplate.

    - - - - - -=====================================output===================================== - - - - - My tITlE - - - -

    - Hello world!
    - This is HTML5 Boilerplate. -

    - - - - - -================================================================================ -`; diff --git a/tests/format/html/case/format.test.js b/tests/format/html/case/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/case/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/case/jsfmt.spec.js b/tests/format/html/case/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/case/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/cdata/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/cdata/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/cdata/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/cdata/__snapshots__/format.test.js.snap diff --git a/tests/format/html/cdata/format.test.js b/tests/format/html/cdata/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/cdata/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/cdata/jsfmt.spec.js b/tests/format/html/cdata/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/cdata/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/comments/__snapshots__/format.test.js.snap b/tests/format/html/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..cb474f0c2f64 --- /dev/null +++ b/tests/format/html/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,2118 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`before-text.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +123 + +=====================================output===================================== + + +123 + +================================================================================ +`; + +exports[`before-text.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +123 + +=====================================output===================================== + + +123 + +================================================================================ +`; + +exports[`before-text.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== + + +123 + +=====================================output===================================== + + +123 + +================================================================================ +`; + +exports[`before-text.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== + + +123 + +=====================================output===================================== + + +123 + +================================================================================ +`; + +exports[`before-text.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +123 + +=====================================output===================================== + + +123 + +================================================================================ +`; + +exports[`bogus.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`bogus.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`bogus.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`bogus.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`bogus.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`conditional.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +================================================================================ +`; + +exports[`conditional.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +================================================================================ +`; + +exports[`conditional.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +================================================================================ +`; + +exports[`conditional.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +================================================================================ +`; + +exports[`conditional.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +================================================================================ +`; + +exports[`for_debugging.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + +================================================================================ +`; + +exports[`for_debugging.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + +================================================================================ +`; + +exports[`for_debugging.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + +================================================================================ +`; + +exports[`for_debugging.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + +================================================================================ +`; + +exports[`for_debugging.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + + + + + +=====================================output===================================== + + + + + + + + + + + +================================================================================ +`; + +exports[`hidden.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + +

    This is a paragraph.

    + + + + + +=====================================output===================================== + + + + + + + +

    This is a paragraph.

    + + + + +================================================================================ +`; + +exports[`hidden.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + +

    This is a paragraph.

    + + + + + +=====================================output===================================== + + + + + + + +

    This is a paragraph.

    + + + + +================================================================================ +`; + +exports[`hidden.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== + + + + + + + + +

    This is a paragraph.

    + + + + + +=====================================output===================================== + + + + + + + +

    This is a paragraph.

    + + + + +================================================================================ +`; + +exports[`hidden.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== + + + + + + + + +

    This is a paragraph.

    + + + + + +=====================================output===================================== + + + + + + + +

    + This + is + a + paragraph. +

    + + + + +================================================================================ +`; + +exports[`hidden.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + +

    This is a paragraph.

    + + + + + +=====================================output===================================== + + + + + + + +

    This is a paragraph.

    + + + + +================================================================================ +`; + +exports[`surrounding-empty-line.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 + +123456 + + + + + + + +=====================================output===================================== +
      + +
    • First
    • + +
    • Second
    • + +
    • Second
    • +
    + + + a + + b + + + + + a + + b + + + + + a + + b + + + +123 + +456 123 + +456 + + + + + + + +================================================================================ +`; + +exports[`surrounding-empty-line.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 + +123456 + + + + + + + +=====================================output===================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 123456 + + + + + + + +================================================================================ +`; + +exports[`surrounding-empty-line.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 + +123456 + + + + + + + +=====================================output===================================== +
      + +
    • First
    • + +
    • Second
    • + +
    • Second
    • +
    +ab + +ab + +ab + +123456 123456 + + + + + + + +================================================================================ +`; + +exports[`surrounding-empty-line.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 + +123456 + + + + + + + +=====================================output===================================== +
      + +
    • + First +
    • + +
    • + Second +
    • + +
    • + Second +
    • +
    +ab + +ab + +ab + +123456 +123456 + + + + + + + +================================================================================ +`; + +exports[`surrounding-empty-line.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    • First
    • Second
    • Second
    +ab + +ab + +ab + +123456 + +123456 + + + + + + + +=====================================output===================================== +
      + +
    • First
    • + +
    • Second
    • + +
    • Second
    • +
    +ab + +ab + +ab + +123456 123456 + + + + + + + +================================================================================ +`; diff --git a/tests/format/html/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ff415b7972ff..000000000000 --- a/tests/format/html/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,2118 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`before-text.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -123 - -=====================================output===================================== - - -123 - -================================================================================ -`; - -exports[`before-text.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -123 - -=====================================output===================================== - - -123 - -================================================================================ -`; - -exports[`before-text.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== - - -123 - -=====================================output===================================== - - -123 - -================================================================================ -`; - -exports[`before-text.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== - - -123 - -=====================================output===================================== - - -123 - -================================================================================ -`; - -exports[`before-text.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -123 - -=====================================output===================================== - - -123 - -================================================================================ -`; - -exports[`bogus.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`bogus.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`bogus.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`bogus.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`bogus.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`conditional.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -================================================================================ -`; - -exports[`conditional.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -================================================================================ -`; - -exports[`conditional.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -================================================================================ -`; - -exports[`conditional.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -================================================================================ -`; - -exports[`conditional.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -================================================================================ -`; - -exports[`for_debugging.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - -================================================================================ -`; - -exports[`for_debugging.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - -================================================================================ -`; - -exports[`for_debugging.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - -================================================================================ -`; - -exports[`for_debugging.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - -================================================================================ -`; - -exports[`for_debugging.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - - - - - -=====================================output===================================== - - - - - - - - - - - -================================================================================ -`; - -exports[`hidden.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - -

    This is a paragraph.

    - - - - - -=====================================output===================================== - - - - - - - -

    This is a paragraph.

    - - - - -================================================================================ -`; - -exports[`hidden.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - -

    This is a paragraph.

    - - - - - -=====================================output===================================== - - - - - - - -

    This is a paragraph.

    - - - - -================================================================================ -`; - -exports[`hidden.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== - - - - - - - - -

    This is a paragraph.

    - - - - - -=====================================output===================================== - - - - - - - -

    This is a paragraph.

    - - - - -================================================================================ -`; - -exports[`hidden.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== - - - - - - - - -

    This is a paragraph.

    - - - - - -=====================================output===================================== - - - - - - - -

    - This - is - a - paragraph. -

    - - - - -================================================================================ -`; - -exports[`hidden.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - -

    This is a paragraph.

    - - - - - -=====================================output===================================== - - - - - - - -

    This is a paragraph.

    - - - - -================================================================================ -`; - -exports[`surrounding-empty-line.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 - -123456 - - - - - - - -=====================================output===================================== -
      - -
    • First
    • - -
    • Second
    • - -
    • Second
    • -
    - - - a - - b - - - - - a - - b - - - - - a - - b - - - -123 - -456 123 - -456 - - - - - - - -================================================================================ -`; - -exports[`surrounding-empty-line.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 - -123456 - - - - - - - -=====================================output===================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 123456 - - - - - - - -================================================================================ -`; - -exports[`surrounding-empty-line.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 - -123456 - - - - - - - -=====================================output===================================== -
      - -
    • First
    • - -
    • Second
    • - -
    • Second
    • -
    -ab - -ab - -ab - -123456 123456 - - - - - - - -================================================================================ -`; - -exports[`surrounding-empty-line.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 - -123456 - - - - - - - -=====================================output===================================== -
      - -
    • - First -
    • - -
    • - Second -
    • - -
    • - Second -
    • -
    -ab - -ab - -ab - -123456 -123456 - - - - - - - -================================================================================ -`; - -exports[`surrounding-empty-line.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -
    • First
    • Second
    • Second
    -ab - -ab - -ab - -123456 - -123456 - - - - - - - -=====================================output===================================== -
      - -
    • First
    • - -
    • Second
    • - -
    • Second
    • -
    -ab - -ab - -ab - -123456 123456 - - - - - - - -================================================================================ -`; diff --git a/tests/format/html/comments/format.test.js b/tests/format/html/comments/format.test.js new file mode 100644 index 000000000000..515373280a5c --- /dev/null +++ b/tests/format/html/comments/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["html"]); +runFormatTest(import.meta, ["html"], { printWidth: 1 }); +runFormatTest(import.meta, ["html"], { printWidth: Number.POSITIVE_INFINITY }); +runFormatTest(import.meta, ["html"], { htmlWhitespaceSensitivity: "strict" }); +runFormatTest(import.meta, ["html"], { htmlWhitespaceSensitivity: "ignore" }); diff --git a/tests/format/html/comments/jsfmt.spec.js b/tests/format/html/comments/jsfmt.spec.js deleted file mode 100644 index fb2a2d11b29c..000000000000 --- a/tests/format/html/comments/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["html"]); -run_spec(__dirname, ["html"], { printWidth: 1 }); -run_spec(__dirname, ["html"], { printWidth: Number.POSITIVE_INFINITY }); -run_spec(__dirname, ["html"], { htmlWhitespaceSensitivity: "strict" }); -run_spec(__dirname, ["html"], { htmlWhitespaceSensitivity: "ignore" }); diff --git a/tests/format/html/css/__snapshots__/format.test.js.snap b/tests/format/html/css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2c461660f410 --- /dev/null +++ b/tests/format/html/css/__snapshots__/format.test.js.snap @@ -0,0 +1,270 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +=====================================output===================================== + + +================================================================================ +`; + +exports[`less.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`mj-style.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + .should-not-format{ + as: 'css' +} + + + +=====================================output===================================== + + .should-not-format{ as: 'css' } + + +================================================================================ +`; + +exports[`postcss.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`scss.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + +=====================================output===================================== + + + + + + +================================================================================ +`; + +exports[`simple.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + Sample styled page + + + + +

    Sample styled page

    +

    This page is just a demo.

    + + + +=====================================output===================================== + + + + Sample styled page + + + + +

    Sample styled page

    +

    This page is just a demo.

    + + + +================================================================================ +`; + +exports[`single-style.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; diff --git a/tests/format/html/css/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/css/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 578644480637..000000000000 --- a/tests/format/html/css/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,248 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; - -exports[`less.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - -=====================================output===================================== - - - - -================================================================================ -`; - -exports[`postcss.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - -=====================================output===================================== - - - - -================================================================================ -`; - -exports[`scss.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - -=====================================output===================================== - - - - - - -================================================================================ -`; - -exports[`simple.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - Sample styled page - - - - -

    Sample styled page

    -

    This page is just a demo.

    - - - -=====================================output===================================== - - - - Sample styled page - - - - -

    Sample styled page

    -

    This page is just a demo.

    - - - -================================================================================ -`; - -exports[`single-style.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; diff --git a/tests/format/html/css/format.test.js b/tests/format/html/css/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/css/jsfmt.spec.js b/tests/format/html/css/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/css/mj-style.html b/tests/format/html/css/mj-style.html new file mode 100644 index 000000000000..0efa7a6a9719 --- /dev/null +++ b/tests/format/html/css/mj-style.html @@ -0,0 +1,7 @@ + + + .should-not-format{ + as: 'css' +} + + diff --git a/tests/format/html/cursor/__snapshots__/format.test.js.snap b/tests/format/html/cursor/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ca29f0d2886f --- /dev/null +++ b/tests/format/html/cursor/__snapshots__/format.test.js.snap @@ -0,0 +1,327 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cursor-0.html format 1`] = ` +====================================options===================================== +cursorOffset: 354 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    bla bla + + +<|>
    + +=====================================output===================================== + +
    bla blaiv> + +================================================================================ +`; + +exports[`cursor-1.html format 1`] = ` +====================================options===================================== +cursorOffset: 354 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    bla bla + + +<|>
    + + +=====================================output===================================== + +
    bla blaiv> + + +================================================================================ +`; + +exports[`cursor-2.html format 1`] = ` +====================================options===================================== +cursorOffset: 48 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    bla bla + + +
    + + +=====================================output===================================== +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-3.html format 1`] = ` +====================================options===================================== +cursorOffset: 43 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    bla bla + + +
    + + +=====================================output===================================== +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-4.html format 1`] = ` +====================================options===================================== +cursorOffset: 399 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    bla bla + + +
    + + +=====================================output===================================== + +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-5.html format 1`] = ` +====================================options===================================== +cursorOffset: 65 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    bla bla + + +
    + + +=====================================output===================================== +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-6.html format 1`] = ` +====================================options===================================== +cursorOffset: 660 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +
    bla bla + + +
    + + +=====================================output===================================== + +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-7.html format 1`] = ` +====================================options===================================== +cursorOffset: 470 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +
    bla bla + + +
    + + +=====================================output===================================== + + +
    bla bla
    + + +================================================================================ +`; + +exports[`cursor-8.html format 1`] = ` +====================================options===================================== +cursorOffset: 137 +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-2.html b/tests/format/html/cursor/cursor-2.html new file mode 100644 index 000000000000..21e8807ca253 --- /dev/null +++ b/tests/format/html/cursor/cursor-2.html @@ -0,0 +1,9 @@ +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-3.html b/tests/format/html/cursor/cursor-3.html new file mode 100644 index 000000000000..11173af37f2d --- /dev/null +++ b/tests/format/html/cursor/cursor-3.html @@ -0,0 +1,9 @@ +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-4.html b/tests/format/html/cursor/cursor-4.html new file mode 100644 index 000000000000..ae2f89a258a9 --- /dev/null +++ b/tests/format/html/cursor/cursor-4.html @@ -0,0 +1,15 @@ + +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-5.html b/tests/format/html/cursor/cursor-5.html new file mode 100644 index 000000000000..ca072f71ca00 --- /dev/null +++ b/tests/format/html/cursor/cursor-5.html @@ -0,0 +1,9 @@ +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-6.html b/tests/format/html/cursor/cursor-6.html new file mode 100644 index 000000000000..af8b979998fa --- /dev/null +++ b/tests/format/html/cursor/cursor-6.html @@ -0,0 +1,18 @@ + +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-7.html b/tests/format/html/cursor/cursor-7.html new file mode 100644 index 000000000000..a326ec029c78 --- /dev/null +++ b/tests/format/html/cursor/cursor-7.html @@ -0,0 +1,16 @@ + + +
    bla bla + + +
    + diff --git a/tests/format/html/cursor/cursor-8.html b/tests/format/html/cursor/cursor-8.html new file mode 100644 index 000000000000..88bbd3a7d0c6 --- /dev/null +++ b/tests/format/html/cursor/cursor-8.html @@ -0,0 +1,9 @@ +
    bla bla + + +
    + + +=====================================output===================================== + + +================================================================================ +`; + +exports[`js.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; + +exports[`simple.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + Sample styled page + + + + +

    Sample styled page

    +

    This page is just a demo.

    + + + +=====================================output===================================== + + + + Sample styled page + + + + +

    Sample styled page

    +

    This page is just a demo.

    + + + +================================================================================ +`; + +exports[`single-script.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + +=====================================output===================================== + + + +================================================================================ +`; + +exports[`something-else.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +=====================================output===================================== + + +================================================================================ +`; + +exports[`template-literal.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; + +exports[`typescript.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; diff --git a/tests/format/html/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/js/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 590076f2e0b2..000000000000 --- a/tests/format/html/js/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,385 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; - -exports[`js.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - -=====================================output===================================== - - - - - - -================================================================================ -`; - -exports[`simple.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - Sample styled page - - - - -

    Sample styled page

    -

    This page is just a demo.

    - - - -=====================================output===================================== - - - - Sample styled page - - - - -

    Sample styled page

    -

    This page is just a demo.

    - - - -================================================================================ -`; - -exports[`single-script.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - -=====================================output===================================== - - - -================================================================================ -`; - -exports[`something-else.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; - -exports[`template-literal.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - -=====================================output===================================== - - - - - - - - -================================================================================ -`; - -exports[`typescript.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - -=====================================output===================================== - - - - -================================================================================ -`; diff --git a/tests/format/html/js/format.test.js b/tests/format/html/js/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/js/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/js/js.html b/tests/format/html/js/js.html index abbeb6b1010d..9fab287467f2 100644 --- a/tests/format/html/js/js.html +++ b/tests/format/html/js/js.html @@ -16,6 +16,10 @@ + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; + +exports[`script-tag-escaping.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +=====================================output===================================== + + +================================================================================ +`; diff --git a/tests/format/html/multiparser/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/multiparser/js/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6ed1a2dc8960..000000000000 --- a/tests/format/html/multiparser/js/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,75 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`html-with-js-script.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - -=====================================output===================================== - - - - - - - - -================================================================================ -`; - -exports[`script-tag-escaping.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -=====================================output===================================== - - -================================================================================ -`; diff --git a/tests/format/html/multiparser/js/format.test.js b/tests/format/html/multiparser/js/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/multiparser/js/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/multiparser/js/jsfmt.spec.js b/tests/format/html/multiparser/js/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/multiparser/js/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/multiparser/markdown/__snapshots__/format.test.js.snap b/tests/format/html/multiparser/markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1f4d4a5f19f7 --- /dev/null +++ b/tests/format/html/multiparser/markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-with-markdown-script.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; diff --git a/tests/format/html/multiparser/markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/multiparser/markdown/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 41dddc52676c..000000000000 --- a/tests/format/html/multiparser/markdown/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`html-with-markdown-script.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - -=====================================output===================================== - - - - - - - - -================================================================================ -`; diff --git a/tests/format/html/multiparser/markdown/format.test.js b/tests/format/html/multiparser/markdown/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/multiparser/markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/multiparser/markdown/jsfmt.spec.js b/tests/format/html/multiparser/markdown/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/multiparser/markdown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/multiparser/ts/__snapshots__/format.test.js.snap b/tests/format/html/multiparser/ts/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9ccd1d622f77 --- /dev/null +++ b/tests/format/html/multiparser/ts/__snapshots__/format.test.js.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-with-ts-script.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + + + +=====================================output===================================== + + + + + + + + +================================================================================ +`; diff --git a/tests/format/html/multiparser/ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/multiparser/ts/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5f3579aa379b..000000000000 --- a/tests/format/html/multiparser/ts/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,48 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`html-with-ts-script.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - - - - -=====================================output===================================== - - - - - - - - -================================================================================ -`; diff --git a/tests/format/html/multiparser/ts/format.test.js b/tests/format/html/multiparser/ts/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/multiparser/ts/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/multiparser/ts/jsfmt.spec.js b/tests/format/html/multiparser/ts/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/multiparser/ts/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/multiparser/unknown/__snapshots__/format.test.js.snap b/tests/format/html/multiparser/unknown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..879bfaac443c --- /dev/null +++ b/tests/format/html/multiparser/unknown/__snapshots__/format.test.js.snap @@ -0,0 +1,81 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unknown-lang.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + Document + + + + + + + + + + + + +=====================================output===================================== + + + + + + Document + + + + + + + + + + + + +================================================================================ +`; diff --git a/tests/format/html/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 160a944843b7..000000000000 --- a/tests/format/html/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,81 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`unknown-lang.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - - - - Document - - - - - - - - - - - - -=====================================output===================================== - - - - - - Document - - - - - - - - - - - - -================================================================================ -`; diff --git a/tests/format/html/multiparser/unknown/format.test.js b/tests/format/html/multiparser/unknown/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/multiparser/unknown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/multiparser/unknown/jsfmt.spec.js b/tests/format/html/multiparser/unknown/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/multiparser/unknown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/next_empty_line/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/next_empty_line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/next_empty_line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/next_empty_line/__snapshots__/format.test.js.snap diff --git a/tests/format/html/next_empty_line/format.test.js b/tests/format/html/next_empty_line/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/next_empty_line/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/next_empty_line/jsfmt.spec.js b/tests/format/html/next_empty_line/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/next_empty_line/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/pragma/__snapshots__/format.test.js.snap b/tests/format/html/pragma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a8af8a7904d5 --- /dev/null +++ b/tests/format/html/pragma/__snapshots__/format.test.js.snap @@ -0,0 +1,138 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-pragma.html - {"insertPragma":true} format 1`] = ` +====================================options===================================== +insertPragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + + + +================================================================================ +`; + +exports[`no-pragma.html - {"requirePragma":true} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 +requirePragma: true + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + + + + +================================================================================ +`; + +exports[`with-pragma.html - {"insertPragma":true} format 1`] = ` +====================================options===================================== +insertPragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`with-pragma.html - {"requirePragma":true} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 +requirePragma: true + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`with-pragma-2.html - {"insertPragma":true} format 1`] = ` +====================================options===================================== +insertPragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`with-pragma-2.html - {"requirePragma":true} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 +requirePragma: true + | printWidth +=====================================input====================================== + + + + + + + +=====================================output===================================== + + + + +================================================================================ +`; diff --git a/tests/format/html/pragma/format.test.js b/tests/format/html/pragma/format.test.js new file mode 100644 index 000000000000..b200e525294b --- /dev/null +++ b/tests/format/html/pragma/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["html"], { requirePragma: true }); +runFormatTest(import.meta, ["html"], { insertPragma: true }); diff --git a/tests/format/html/pragma/no-pragma.html b/tests/format/html/pragma/no-pragma.html new file mode 100644 index 000000000000..a6cde3bcc855 --- /dev/null +++ b/tests/format/html/pragma/no-pragma.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/format/html/pragma/with-pragma-2.html b/tests/format/html/pragma/with-pragma-2.html new file mode 100644 index 000000000000..3c4a58159d2b --- /dev/null +++ b/tests/format/html/pragma/with-pragma-2.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/format/html/pragma/with-pragma.html b/tests/format/html/pragma/with-pragma.html new file mode 100644 index 000000000000..9c2e13e2e611 --- /dev/null +++ b/tests/format/html/pragma/with-pragma.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/format/html/prettier_ignore/__snapshots__/format.test.js.snap b/tests/format/html/prettier_ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..77bc894adbb9 --- /dev/null +++ b/tests/format/html/prettier_ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,257 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cases.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +123456 + + + +=====================================output===================================== +123456 + + + +================================================================================ +`; + +exports[`document.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + Title + + + +

    + Test Test Test +

    + + +

    + Test Test Test +

    + + +
    • First
    • Second1
      String
    + + +
    + + + + + +
    + + +
    • First
    • Second
    + + +
    + + + +=====================================output===================================== + + + + + + Title + + + +

    + Test Test Test +

    + + +

    + Test Test Test +

    + + +
    • First
    • Second1
      String
    + + +
    + + + + + +
    + + +
    • First
    • Second
    + + +
    + + + +================================================================================ +`; + +exports[`issue-15738.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + + + +# Hello world! + +\`\`\`html +<p>Look at these <span id="html">HTML tags</span></p> +<div class="box">They aren't being <code>interpreted</code> as actual HTML</div> +\`\`\` + +But this HTML is <mark>actually parsed</mark> just like **normal**. + +> <em>Markdown</em> lets you include <strong>arbitrary</strong> <abbr>HTML</abbr> in it. + +=====================================output===================================== +<head></head> +<link + rel="stylesheet" + href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css" +/> +<style> + marked-md:not(:defined) { + display: none; + } +</style> +<script type="module" src="../auto.js"></script> +<!-- prettier-ignore --> +<marked-md display="block"><plaintext> +# Hello world! + +\`\`\`html +<p>Look at these <span id="html">HTML tags</span></p> +<div class="box">They aren't being <code>interpreted</code> as actual HTML</div> +\`\`\` + +But this HTML is <mark>actually parsed</mark> just like **normal**. + +> <em>Markdown</em> lets you include <strong>arbitrary</strong> <abbr>HTML</abbr> in it. + +================================================================================ +`; + +exports[`long_lines.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- prettier-ignore --> +A super long string that has been marked as ignore because it was probably generated by some script. + +<p> + Just some ordinary text that should be wrapped up because it is super long and has not been marked as ignore. +</p> + +<p> + <!-- prettier-ignore --> + A super long string that has been marked as ignore because it was probably generated by some script. +</p> + +<!-- prettier-ignore --> +| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | +| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | +| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | +=====================================output===================================== +<!-- prettier-ignore --> +A super long string that has been marked as ignore because it was probably generated by some script. + +<p> + Just some ordinary text that should be wrapped up because it is super long and + has not been marked as ignore. +</p> + +<p> + <!-- prettier-ignore --> + A super long string that has been marked as ignore because it was probably generated by some script. +</p> + +<!-- prettier-ignore --> +| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | +| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | +| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | + +================================================================================ +`; + +exports[`unclosed.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- prettier-ignore --> +<div> +# Hello world! +<span> + +=====================================output===================================== +<!-- prettier-ignore --> +<div> +# Hello world! +<span> + +================================================================================ +`; + +exports[`unclosed2.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- prettier-ignore --> +<p> +# Hello world! +<div> + +=====================================output===================================== +<!-- prettier-ignore --> +<p> +# Hello world! + +<div></div> + +================================================================================ +`; diff --git a/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c7291c2c3545..000000000000 --- a/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,162 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cases.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -123<!--prettier-ignore-->456 - -<span></span><!--prettier-ignore--><span></span> - -=====================================output===================================== -123<!--prettier-ignore-->456 - -<span></span -><!--prettier-ignore--><span></span> - -================================================================================ -`; - -exports[`document.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!doctype html> -<html class="no-js" lang="en"> - <head> - <meta charset="utf-8"> - <meta http-equiv="x-ua-compatible" content="ie=edge"> - <title>Title</title> - </head> - <body> - <!-- prettier-ignore --> - <p> - Test Test Test - </p> - - <!-- prettier-ignore --> - <p attribute = "value"> - Test Test Test - </p> - - <!-- prettier-ignore --> - <ul - ><li> First </li - ><li>Second<i>1</i><div><div>String</div></div></li - ></ul> - - <!-- prettier-ignore --> - <div> - - - - - - </div> - - <!-- prettier-ignore --> - <ul><!-- - --><li> First </li><!-- - --><li> Second </li><!-- - --></ul> - - <!-- prettier-ignore --> - <br /> - </body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html class="no-js" lang="en"> - <head> - <meta charset="utf-8" /> - <meta http-equiv="x-ua-compatible" content="ie=edge" /> - <title>Title</title> - </head> - <body> - <!-- prettier-ignore --> - <p> - Test Test Test - </p> - - <!-- prettier-ignore --> - <p attribute = "value"> - Test Test Test - </p> - - <!-- prettier-ignore --> - <ul - ><li> First </li - ><li>Second<i>1</i><div><div>String</div></div></li - ></ul> - - <!-- prettier-ignore --> - <div> - - - - - - </div> - - <!-- prettier-ignore --> - <ul><!-- - --><li> First </li><!-- - --><li> Second </li><!-- - --></ul> - - <!-- prettier-ignore --> - <br /> - </body> -</html> - -================================================================================ -`; - -exports[`long_lines.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- prettier-ignore --> -A super long string that has been marked as ignore because it was probably generated by some script. - -<p> - Just some ordinary text that should be wrapped up because it is super long and has not been marked as ignore. -</p> - -<p> - <!-- prettier-ignore --> - A super long string that has been marked as ignore because it was probably generated by some script. -</p> - -<!-- prettier-ignore --> -| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | -| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | -| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | -=====================================output===================================== -<!-- prettier-ignore --> -A super long string that has been marked as ignore because it was probably generated by some script. - -<p> - Just some ordinary text that should be wrapped up because it is super long and - has not been marked as ignore. -</p> - -<p> - <!-- prettier-ignore --> - A super long string that has been marked as ignore because it was probably generated by some script. -</p> - -<!-- prettier-ignore --> -| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | -| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | -| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | - -================================================================================ -`; diff --git a/tests/format/html/prettier_ignore/format.test.js b/tests/format/html/prettier_ignore/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/prettier_ignore/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/prettier_ignore/issue-15738.html b/tests/format/html/prettier_ignore/issue-15738.html new file mode 100644 index 000000000000..c954272c41df --- /dev/null +++ b/tests/format/html/prettier_ignore/issue-15738.html @@ -0,0 +1,19 @@ +<head></head> +<link + rel="stylesheet" + href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css" +/> +<style>marked-md:not(:defined) { display: none }</style> +<script type="module" src="../auto.js"></script> +<!-- prettier-ignore --> +<marked-md display="block"><plaintext> +# Hello world! + +```html +<p>Look at these <span id="html">HTML tags</span></p> +<div class="box">They aren't being <code>interpreted</code> as actual HTML</div> +``` + +But this HTML is <mark>actually parsed</mark> just like **normal**. + +> <em>Markdown</em> lets you include <strong>arbitrary</strong> <abbr>HTML</abbr> in it. diff --git a/tests/format/html/prettier_ignore/jsfmt.spec.js b/tests/format/html/prettier_ignore/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/prettier_ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/prettier_ignore/unclosed.html b/tests/format/html/prettier_ignore/unclosed.html new file mode 100644 index 000000000000..1f8ac0f36fb2 --- /dev/null +++ b/tests/format/html/prettier_ignore/unclosed.html @@ -0,0 +1,4 @@ +<!-- prettier-ignore --> +<div> +# Hello world! +<span> diff --git a/tests/format/html/prettier_ignore/unclosed2.html b/tests/format/html/prettier_ignore/unclosed2.html new file mode 100644 index 000000000000..be70dabfcea1 --- /dev/null +++ b/tests/format/html/prettier_ignore/unclosed2.html @@ -0,0 +1,4 @@ +<!-- prettier-ignore --> +<p> +# Hello world! +<div> diff --git a/tests/format/html/script/__snapshots__/format.test.js.snap b/tests/format/html/script/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3020f5197a54 --- /dev/null +++ b/tests/format/html/script/__snapshots__/format.test.js.snap @@ -0,0 +1,241 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`babel.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script type="text/babel" data-presets="react" data-type="module"> +import { h, + render } from 'https://unpkg.com/preact?module'; +render( +<h1>Hello World!</h1>, + document.body +); +</script> + +<script type="text/jsx" data-presets="react" data-type="module"> +import { h, + render } from 'https://unpkg.com/preact?module'; +render( +<h1>Hello World!</h1>, + document.body +); +</script> + +<script type="text/babel"> +<!-- +alert(1) +--> +</script> + +=====================================output===================================== +<script type="text/babel" data-presets="react" data-type="module"> + import { h, render } from "https://unpkg.com/preact?module"; + render(<h1>Hello World!</h1>, document.body); +</script> + +<script type="text/jsx" data-presets="react" data-type="module"> + import { h, render } from "https://unpkg.com/preact?module"; + render(<h1>Hello World!</h1>, document.body); +</script> + +<script type="text/babel"> + <!-- + alert(1); + --> +</script> + +================================================================================ +`; + +exports[`legacy.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + +<script> +<!-- +alert(1) +--> +</script> + +<script> +<!-- +alert(2) +//--> +</script> + +=====================================output===================================== +<script> + <!-- + alert(1); + --> +</script> + +<script> + <!-- + alert(2); + //--> +</script> + +================================================================================ +`; + +exports[`module.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script type="module"> +import prettier from "prettier/standalone"; +import parserGraphql from "prettier/parser-graphql"; + +prettier.format("query { }", { + parser: "graphql", + plugins: [ +parserGraphql], +}); +</script> + +<script type="module"> +async function foo() { + let x=10;while(x-->0)console.log(x) + await(import('mod')) +} +</script> + +=====================================output===================================== +<script type="module"> + import prettier from "prettier/standalone"; + import parserGraphql from "prettier/parser-graphql"; + + prettier.format("query { }", { + parser: "graphql", + plugins: [parserGraphql], + }); +</script> + +<script type="module"> + async function foo() { + let x = 10; + while (x-- > 0) console.log(x); + await import("mod"); + } +</script> + +================================================================================ +`; + +exports[`module-attributes.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script src="foo.wasm" type="module" withtype="webassembly"></script> + +=====================================output===================================== +<script src="foo.wasm" type="module" withtype="webassembly"></script> + +================================================================================ +`; + +exports[`script.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script type="application/ld+json"> + { "json": true } +</script> +<script type="application/json"> + { "json":true } +</script> +<script type="importmap"> + { "json":true } +</script> +<script type="systemjs-importmap"> + { "json":true } +</script><script type="invalid"> + { "json":false } +</script> +<script type="text/html"> + <div> + <p>foo</p> + </div> +</script> + +<script + async="" + id="" + src="/_next/static/development/pages/_app.js?ts=1565732195968" +></script><script></script> + +<!-- #8147 --> +<script lang="vbscript"> +Function hello() +End Function +</script> + +<script lang="unknown"> +</script> + +<script type="speculationrules"> + { + "prerender": [ + {"source": "list", "urls": ["https://a.test/foo"]} + ] + } + </script> + +=====================================output===================================== +<script type="application/ld+json"> + { "json": true } +</script> +<script type="application/json"> + { "json": true } +</script> +<script type="importmap"> + { "json": true } +</script> +<script type="systemjs-importmap"> + { "json": true } +</script> +<script type="invalid"> + { "json":false } +</script> +<script type="text/html"> + <div> + <p>foo</p> + </div> +</script> + +<script + async="" + id="" + src="/_next/static/development/pages/_app.js?ts=1565732195968" +></script> +<script></script> + +<!-- #8147 --> +<script lang="vbscript"> + Function hello() + End Function +</script> + +<script lang="unknown"></script> + +<script type="speculationrules"> + { + "prerender": [{ "source": "list", "urls": ["https://a.test/foo"] }] + } +</script> + +================================================================================ +`; diff --git a/tests/format/html/script/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/script/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ce92e69e48e6..000000000000 --- a/tests/format/html/script/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,227 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`babel.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script type="text/babel" data-presets="react" data-type="module"> -import { h, - render } from 'https://unpkg.com/preact?module'; -render( -<h1>Hello World!</h1>, - document.body -); -</script> - -<script type="text/babel"> -<!-- -alert(1) ---> -</script> - -=====================================output===================================== -<script type="text/babel" data-presets="react" data-type="module"> - import { h, render } from "https://unpkg.com/preact?module"; - render(<h1>Hello World!</h1>, document.body); -</script> - -<script type="text/babel"> - <!-- - alert(1); - --> -</script> - -================================================================================ -`; - -exports[`legacy.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== - -<script> -<!-- -alert(1) ---> -</script> - -<script> -<!-- -alert(2) -//--> -</script> - -=====================================output===================================== -<script> - <!-- - alert(1); - --> -</script> - -<script> - <!-- - alert(2); - //--> -</script> - -================================================================================ -`; - -exports[`module.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script type="module"> -import prettier from "prettier/standalone"; -import parserGraphql from "prettier/parser-graphql"; - -prettier.format("query { }", { - parser: "graphql", - plugins: [ -parserGraphql], -}); -</script> - -<script type="module"> -async function foo() { - let x=10;while(x-->0)console.log(x) - await(import('mod')) -} -</script> - -=====================================output===================================== -<script type="module"> - import prettier from "prettier/standalone"; - import parserGraphql from "prettier/parser-graphql"; - - prettier.format("query { }", { - parser: "graphql", - plugins: [parserGraphql], - }); -</script> - -<script type="module"> - async function foo() { - let x = 10; - while (x-- > 0) console.log(x); - await import("mod"); - } -</script> - -================================================================================ -`; - -exports[`module-attributes.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script src="foo.wasm" type="module" withtype="webassembly"></script> - -=====================================output===================================== -<script src="foo.wasm" type="module" withtype="webassembly"></script> - -================================================================================ -`; - -exports[`script.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script type="application/ld+json"> - { "json": true } -</script> -<script type="application/json"> - { "json":true } -</script> -<script type="importmap"> - { "json":true } -</script> -<script type="systemjs-importmap"> - { "json":true } -</script><script type="invalid"> - { "json":false } -</script> -<script type="text/html"> - <div> - <p>foo</p> - </div> -</script> - -<script - async="" - id="" - src="/_next/static/development/pages/_app.js?ts=1565732195968" -></script><script></script> - -<!-- #8147 --> -<script lang="vbscript"> -Function hello() -End Function -</script> - -<script lang="unknown"> -</script> - -<script type="speculationrules"> - { - "prerender": [ - {"source": "list", "urls": ["https://a.test/foo"]} - ] - } - </script> - -=====================================output===================================== -<script type="application/ld+json"> - { "json": true } -</script> -<script type="application/json"> - { "json": true } -</script> -<script type="importmap"> - { "json": true } -</script> -<script type="systemjs-importmap"> - { "json": true } -</script> -<script type="invalid"> - { "json":false } -</script> -<script type="text/html"> - <div> - <p>foo</p> - </div> -</script> - -<script - async="" - id="" - src="/_next/static/development/pages/_app.js?ts=1565732195968" -></script> -<script></script> - -<!-- #8147 --> -<script lang="vbscript"> - Function hello() - End Function -</script> - -<script lang="unknown"></script> - -<script type="speculationrules"> - { - "prerender": [{ "source": "list", "urls": ["https://a.test/foo"] }] - } -</script> - -================================================================================ -`; diff --git a/tests/format/html/script/babel.html b/tests/format/html/script/babel.html index 75ff3bed275a..fcf3d7ccb20c 100644 --- a/tests/format/html/script/babel.html +++ b/tests/format/html/script/babel.html @@ -7,6 +7,15 @@ <h1>Hello World!</h1>, ); </script> +<script type="text/jsx" data-presets="react" data-type="module"> +import { h, + render } from 'https://unpkg.com/preact?module'; +render( +<h1>Hello World!</h1>, + document.body +); +</script> + <script type="text/babel"> <!-- alert(1) diff --git a/tests/format/html/script/format.test.js b/tests/format/html/script/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/script/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/script/jsfmt.spec.js b/tests/format/html/script/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/script/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/single-attribute-per-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/single-attribute-per-line/__snapshots__/format.test.js.snap diff --git a/tests/format/html/single-attribute-per-line/format.test.js b/tests/format/html/single-attribute-per-line/format.test.js new file mode 100644 index 000000000000..998e78e1c99d --- /dev/null +++ b/tests/format/html/single-attribute-per-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["html"]); +runFormatTest(import.meta, ["html"], { singleAttributePerLine: true }); diff --git a/tests/format/html/single-attribute-per-line/jsfmt.spec.js b/tests/format/html/single-attribute-per-line/jsfmt.spec.js deleted file mode 100644 index d9ac94f5d020..000000000000 --- a/tests/format/html/single-attribute-per-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["html"]); -run_spec(__dirname, ["html"], { singleAttributePerLine: true }); diff --git a/tests/format/html/srcset/__snapshots__/format.test.js.snap b/tests/format/html/srcset/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4c66764c0edf --- /dev/null +++ b/tests/format/html/srcset/__snapshots__/format.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img src="a" +srcset=" + should-not-format 400w 100h, + should-not-format 500w 200h +" + alt=""/> + +<img src="a" +srcset=" + should-not-format ,, should-not-format 0q,,, +" + alt=""/> + +<img src="a" +srcset=",,,"/> + +<img src="a" +srcset=" "/> + +=====================================output===================================== +<img + src="a" + srcset=" + should-not-format 400w 100h, + should-not-format 500w 200h +" + alt="" +/> + +<img + src="a" + srcset=" + should-not-format ,, should-not-format 0q,,, +" + alt="" +/> + +<img src="a" srcset=",,," /> + +<img src="a" srcset=" " /> + +================================================================================ +`; diff --git a/tests/format/html/srcset/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/srcset/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 502b9318a308..000000000000 --- a/tests/format/html/srcset/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,41 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<img src="a" -srcset=" - should-not-format 400w 100h, - should-not-format 500w 200h -" - alt=""/> - -<img src="a" -srcset=" - should-not-format ,, should-not-format 0q,,, -" - alt=""/> - -=====================================output===================================== -<img - src="a" - srcset=" - should-not-format 400w 100h, - should-not-format 500w 200h -" - alt="" -/> - -<img - src="a" - srcset=" - should-not-format ,, should-not-format 0q,,, -" - alt="" -/> - -================================================================================ -`; diff --git a/tests/format/html/srcset/format.test.js b/tests/format/html/srcset/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/srcset/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/srcset/invalid.html b/tests/format/html/srcset/invalid.html index 7978c5469c4e..3ec7accae1bb 100644 --- a/tests/format/html/srcset/invalid.html +++ b/tests/format/html/srcset/invalid.html @@ -10,3 +10,9 @@ should-not-format ,, should-not-format 0q,,, " alt=""/> + +<img src="a" +srcset=",,,"/> + +<img src="a" +srcset=" "/> diff --git a/tests/format/html/srcset/jsfmt.spec.js b/tests/format/html/srcset/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/srcset/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/svg/__snapshots__/format.test.js.snap b/tests/format/html/svg/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4bbcb552cdc8 --- /dev/null +++ b/tests/format/html/svg/__snapshots__/format.test.js.snap @@ -0,0 +1,88 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`svg.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html> + <head> + <title>SVG</title> + </head> + <body> + <svg width="100" height="100"> + <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> + </svg> + </body> +</html> + +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<defs /> + + <g> + <g><polygon points="5,5 195,10 185,185 10,195" /> + <text> Text</text></g> + </g> + + <!-- Common use case: embed HTML text into SVG --> + <foreignObject x="20" y="20" width="160" height="160"> + <!-- + In the context of SVG embeded into HTML, the XHTML namespace could be avoided, but it is mandatory in the context of an SVG document + --> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p> + 123 + </p> + <span> + 123 + </span> + </div> + </foreignObject> +</svg> + +=====================================output===================================== +<!doctype html> +<html> + <head> + <title>SVG</title> + </head> + <body> + <svg width="100" height="100"> + <circle + cx="50" + cy="50" + r="40" + stroke="green" + stroke-width="4" + fill="yellow" + /> + </svg> + </body> +</html> + +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <defs /> + + <g> + <g> + <polygon points="5,5 195,10 185,185 10,195" /> + <text>Text</text> + </g> + </g> + + <!-- Common use case: embed HTML text into SVG --> + <foreignObject x="20" y="20" width="160" height="160"> + <!-- + In the context of SVG embeded into HTML, the XHTML namespace could be avoided, but it is mandatory in the context of an SVG document + --> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>123</p> + <span> 123 </span> + </div> + </foreignObject> +</svg> + +================================================================================ +`; diff --git a/tests/format/html/svg/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/svg/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 46c9a4ff480b..000000000000 --- a/tests/format/html/svg/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,109 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`svg.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html> -<html> - <head> - <title>SVG</title> - </head> - <body> - <svg width="100" height="100"> - <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> - </svg> - </body> -</html> - -<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> -<defs /> <style > - polygon { fill: black } - - div { - color: white; - font:18px serif; - height: 100%; - overflow: auto; - } - </style> - - <g> - <g><polygon points="5,5 195,10 185,185 10,195" /> - <text> Text</text></g> - </g> - - <!-- Common use case: embed HTML text into SVG --> - <foreignObject x="20" y="20" width="160" height="160"> - <!-- - In the context of SVG embeded into HTML, the XHTML namespace could be avoided, but it is mandatory in the context of an SVG document - --> - <div xmlns="http://www.w3.org/1999/xhtml"> - <p> - 123 - </p> - <span> - 123 - </span> - </div> - </foreignObject> -</svg> - -=====================================output===================================== -<!DOCTYPE html> -<html> - <head> - <title>SVG</title> - </head> - <body> - <svg width="100" height="100"> - <circle - cx="50" - cy="50" - r="40" - stroke="green" - stroke-width="4" - fill="yellow" - /> - </svg> - </body> -</html> - -<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> - <defs /> - <style> - polygon { - fill: black; - } - - div { - color: white; - font: 18px serif; - height: 100%; - overflow: auto; - } - </style> - - <g> - <g> - <polygon points="5,5 195,10 185,185 10,195" /> - <text>Text</text> - </g> - </g> - - <!-- Common use case: embed HTML text into SVG --> - <foreignObject x="20" y="20" width="160" height="160"> - <!-- - In the context of SVG embeded into HTML, the XHTML namespace could be avoided, but it is mandatory in the context of an SVG document - --> - <div xmlns="http://www.w3.org/1999/xhtml"> - <p>123</p> - <span> 123 </span> - </div> - </foreignObject> -</svg> - -================================================================================ -`; diff --git a/tests/format/html/svg/embeded/__snapshots__/format.test.js.snap b/tests/format/html/svg/embeded/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f8796610d2ca --- /dev/null +++ b/tests/format/html/svg/embeded/__snapshots__/format.test.js.snap @@ -0,0 +1,253 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`svg.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html> + <head> + <title>SVG</title> + </head> + <body> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + </body> +</html> + +=====================================output===================================== +<!doctype html> +<html> + <head> + <title>SVG</title> + </head> + <body> + <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener( + 'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { + element.fillStyle = 'currentColor' + } + }); + </script> + <style> + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> + </svg> + </body> +</html> + +================================================================================ +`; + +exports[`svg.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html> + <head> + <title>SVG</title> + </head> + <body> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + </body> +</html> + +=====================================output===================================== +<!doctype html> +<html> + <head> + <title>SVG</title> + </head> + <body> + <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener("DOMContentLoaded", () => { + const element = document.getElementById("foo"); + if (element) { + element.fillStyle = "currentColor"; + } + }); + </script> + <style> + polygon { + fill: black; + } + + div { + color: white; + font: 18px serif; + height: 100%; + overflow: auto; + } + </style> + </svg> + </body> +</html> + +================================================================================ +`; + +exports[`svg.svg - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + +=====================================output===================================== +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener( + 'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { + element.fillStyle = 'currentColor' + } + }); + </script> + <style> + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + +================================================================================ +`; + +exports[`svg.svg format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + +=====================================output===================================== +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener("DOMContentLoaded", () => { + const element = document.getElementById("foo"); + if (element) { + element.fillStyle = "currentColor"; + } + }); + </script> + <style> + polygon { + fill: black; + } + + div { + color: white; + font: 18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + +================================================================================ +`; diff --git a/tests/format/html/svg/embeded/format.test.js b/tests/format/html/svg/embeded/format.test.js new file mode 100644 index 000000000000..2eba9a1fc5fe --- /dev/null +++ b/tests/format/html/svg/embeded/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["html"]); +runFormatTest(import.meta, ["html"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/html/svg/embeded/svg.html b/tests/format/html/svg/embeded/svg.html new file mode 100644 index 000000000000..6934c58a7604 --- /dev/null +++ b/tests/format/html/svg/embeded/svg.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> + <head> + <title>SVG</title> + </head> + <body> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> + </body> +</html> diff --git a/tests/format/html/svg/embeded/svg.svg b/tests/format/html/svg/embeded/svg.svg new file mode 100644 index 000000000000..2a86602fb068 --- /dev/null +++ b/tests/format/html/svg/embeded/svg.svg @@ -0,0 +1,21 @@ +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +<style > + polygon { fill: black } + + div { + color: white; + font:18px serif; + height: 100%; + overflow: auto; + } + </style> +</svg> diff --git a/tests/format/html/svg/format.test.js b/tests/format/html/svg/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/svg/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/svg/jsfmt.spec.js b/tests/format/html/svg/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/svg/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/svg/svg.html b/tests/format/html/svg/svg.html index 7009b55de539..21f7256f3f80 100644 --- a/tests/format/html/svg/svg.html +++ b/tests/format/html/svg/svg.html @@ -11,16 +11,7 @@ </html> <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> -<defs /> <style > - polygon { fill: black } - - div { - color: white; - font:18px serif; - height: 100%; - overflow: auto; - } - </style> +<defs /> <g> <g><polygon points="5,5 195,10 185,185 10,195" /> diff --git a/tests/format/html/symbol_entities/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/symbol_entities/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/symbol_entities/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/symbol_entities/__snapshots__/format.test.js.snap diff --git a/tests/format/html/symbol_entities/format.test.js b/tests/format/html/symbol_entities/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/symbol_entities/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/symbol_entities/jsfmt.spec.js b/tests/format/html/symbol_entities/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/symbol_entities/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/tags/__snapshots__/format.test.js.snap b/tests/format/html/tags/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b7ecbab49ceb --- /dev/null +++ b/tests/format/html/tags/__snapshots__/format.test.js.snap @@ -0,0 +1,5299 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`case-sensitive.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +=====================================output===================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +================================================================================ +`; + +exports[`case-sensitive.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +=====================================output===================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +================================================================================ +`; + +exports[`case-sensitive.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +=====================================output===================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +================================================================================ +`; + +exports[`case-sensitive.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +=====================================output===================================== +<CaseSensitive + CaseSensitive="true" + >hello + world</CaseSensitive +> + +================================================================================ +`; + +exports[`case-sensitive.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +=====================================output===================================== +<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> + +================================================================================ +`; + +exports[`closing-at-start.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +=====================================output===================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + > + bbbbbbbbbb + </a> + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + > + bbbbbbbbbb + </a> + cccccccccc +</div> + +================================================================================ +`; + +exports[`closing-at-start.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +=====================================output===================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +================================================================================ +`; + +exports[`closing-at-start.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +=====================================output===================================== +<div> + aaaaaaaaaa + <a href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong">bbbbbbbbbb</a> + cccccccccc +</div> +<div> + aaaaaaaaaa + <a href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong">bbbbbbbbbb</a>cccccccccc +</div> + +================================================================================ +`; + +exports[`closing-at-start.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +=====================================output===================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +================================================================================ +`; + +exports[`closing-at-start.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +=====================================output===================================== +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + > + cccccccccc +</div> +<div> + aaaaaaaaaa + <a + href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" + >bbbbbbbbbb</a + >cccccccccc +</div> + +================================================================================ +`; + +exports[`custom-element.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<app-foo></app-foo> +<app-bar></app-bar> + +=====================================output===================================== +<app-foo></app-foo> +<app-bar></app-bar> + +================================================================================ +`; + +exports[`custom-element.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<app-foo></app-foo> +<app-bar></app-bar> + +=====================================output===================================== +<app-foo></app-foo> +<app-bar></app-bar> + +================================================================================ +`; + +exports[`custom-element.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<app-foo></app-foo> +<app-bar></app-bar> + +=====================================output===================================== +<app-foo></app-foo> +<app-bar></app-bar> + +================================================================================ +`; + +exports[`custom-element.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<app-foo></app-foo> +<app-bar></app-bar> + +=====================================output===================================== +<app-foo></app-foo> +<app-bar></app-bar> + +================================================================================ +`; + +exports[`custom-element.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<app-foo></app-foo> +<app-bar></app-bar> + +=====================================output===================================== +<app-foo></app-foo> +<app-bar></app-bar> + +================================================================================ +`; + +exports[`marquee.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +=====================================output===================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border: solid" +> + <marquee behavior="alternate">This text will bounce</marquee> +</marquee> + +================================================================================ +`; + +exports[`marquee.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +=====================================output===================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border: solid" +> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +================================================================================ +`; + +exports[`marquee.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +=====================================output===================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee direction="down" width="250" height="200" behavior="alternate" style="border: solid"> + <marquee behavior="alternate">This text will bounce</marquee> +</marquee> + +================================================================================ +`; + +exports[`marquee.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +=====================================output===================================== +<marquee> + This + text + will + scroll + from + right + to + left +</marquee> + +<marquee + direction="up" +> + This + text + will + scroll + from + bottom + to + top +</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style=" + border: solid; + " +> + <marquee + behavior="alternate" + > + This + text + will + bounce + </marquee> +</marquee> + +================================================================================ +`; + +exports[`marquee.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> + +=====================================output===================================== +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border: solid" +> + <marquee behavior="alternate">This text will bounce</marquee> +</marquee> + +================================================================================ +`; + +exports[`menu.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +=====================================output===================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +================================================================================ +`; + +exports[`menu.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +=====================================output===================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +================================================================================ +`; + +exports[`menu.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +=====================================output===================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +================================================================================ +`; + +exports[`menu.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +=====================================output===================================== +<menu> + <li> + <button + onclick="copy()" + > + Copy + </button> + </li> + <li> + <button + onclick="cut()" + > + Cut + </button> + </li> + <li> + <button + onclick="paste()" + > + Paste + </button> + </li> +</menu> + +================================================================================ +`; + +exports[`menu.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +=====================================output===================================== +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> + +================================================================================ +`; + +exports[`openging-at-end.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p + >Want to write us a letter? Use our<a + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +=====================================output===================================== +<p> + Want to write us a letter? Use our + <a> + <b><a>mailing address</a></b> + </a> + . +</p> + +<p> + Want to write us a letter? Use our + <a href="contacts.html#Mailing_address"> + <b><a>mailing address</a></b> + </a> + . +</p> + +<p> + Want to write us a letter? Use our + <a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + > + <b><a>mailing address</a></b> + </a> + . +</p> + +================================================================================ +`; + +exports[`openging-at-end.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p + >Want to write us a letter? Use our<a + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +=====================================output===================================== +<p + >Want to write us a letter? Use our<a + ><b><a>mailing address</a></b></a + >.</p +> + +<p + >Want to write us a letter? Use our<a href="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >.</p +> + +================================================================================ +`; + +exports[`openging-at-end.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<p + >Want to write us a letter? Use our<a + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +=====================================output===================================== +<p> + Want to write us a letter? Use our<a + ><b><a>mailing address</a></b></a + >. +</p> + +<p> + Want to write us a letter? Use our<a href="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >. +</p> + +<p> + Want to write us a letter? Use our<a href="contacts.html#Mailing_address" href1="contacts.html#Mailing_address" href2="contacts.html#Mailing_address" href3="contacts.html#Mailing_address" href4="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >. +</p> + +================================================================================ +`; + +exports[`openging-at-end.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<p + >Want to write us a letter? Use our<a + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +=====================================output===================================== +<p> + Want + to + write + us + a + letter? + Use + our<a + ><b + ><a + >mailing + address</a + ></b + ></a + >. +</p> + +<p> + Want + to + write + us + a + letter? + Use + our<a + href="contacts.html#Mailing_address" + ><b + ><a + >mailing + address</a + ></b + ></a + >. +</p> + +<p> + Want + to + write + us + a + letter? + Use + our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a + >mailing + address</a + ></b + ></a + >. +</p> + +================================================================================ +`; + +exports[`openging-at-end.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p + >Want to write us a letter? Use our<a + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +<p + >Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b + ><a>mailing address</a></b + ></a + >.</p +> + +=====================================output===================================== +<p> + Want to write us a letter? Use our<a + ><b><a>mailing address</a></b></a + >. +</p> + +<p> + Want to write us a letter? Use our<a href="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >. +</p> + +<p> + Want to write us a letter? Use our<a + href="contacts.html#Mailing_address" + href1="contacts.html#Mailing_address" + href2="contacts.html#Mailing_address" + href3="contacts.html#Mailing_address" + href4="contacts.html#Mailing_address" + ><b><a>mailing address</a></b></a + >. +</p> + +================================================================================ +`; + +exports[`option.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> +<input list=colors> +<datalist id=colors><option>Blue</option><option>Green</option></datalist> + +=====================================output===================================== +<select> + <option>Blue</option> + <option>Green</option> + <optgroup label="Darker"> + <option>Dark Blue</option> + <option>Dark Green</option> + </optgroup> +</select> +<input list="colors" /> +<datalist id="colors"> + <option>Blue</option> + <option>Green</option> +</datalist> + +================================================================================ +`; + +exports[`option.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> +<input list=colors> +<datalist id=colors><option>Blue</option><option>Green</option></datalist> + +=====================================output===================================== +<select + ><option>Blue</option + ><option>Green</option + ><optgroup label="Darker" + ><option>Dark Blue</option><option>Dark Green</option></optgroup + ></select +> +<input list="colors" /> +<datalist id="colors"><option>Blue</option><option>Green</option></datalist> + +================================================================================ +`; + +exports[`option.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> +<input list=colors> +<datalist id=colors><option>Blue</option><option>Green</option></datalist> + +=====================================output===================================== +<select> + <option>Blue</option> + <option>Green</option> + <optgroup label="Darker"> + <option>Dark Blue</option> + <option>Dark Green</option> + </optgroup> +</select> +<input list="colors" /> +<datalist id="colors"> + <option>Blue</option> + <option>Green</option> +</datalist> + +================================================================================ +`; + +exports[`option.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> +<input list=colors> +<datalist id=colors><option>Blue</option><option>Green</option></datalist> + +=====================================output===================================== +<select> + <option> + Blue + </option> + <option> + Green + </option> + <optgroup + label="Darker" + > + <option> + Dark + Blue + </option> + <option> + Dark + Green + </option> + </optgroup> +</select> +<input + list="colors" +/> +<datalist + id="colors" +> + <option> + Blue + </option> + <option> + Green + </option> +</datalist> + +================================================================================ +`; + +exports[`option.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> +<input list=colors> +<datalist id=colors><option>Blue</option><option>Green</option></datalist> + +=====================================output===================================== +<select> + <option>Blue</option> + <option>Green</option> + <optgroup label="Darker"> + <option>Dark Blue</option> + <option>Dark Green</option> + </optgroup> +</select> +<input list="colors" /> +<datalist id="colors"> + <option>Blue</option> + <option>Green</option> +</datalist> + +================================================================================ +`; + +exports[`pre.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre>Foo Bar +</pre> +<pre> + Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. + </figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre></details> + +<details><pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<PRE><HR></PRE> +<pre><br/></pre> +<PRE><HR/></PRE> +<pre><br /></pre> +<PRE><HR /></PRE> +<pre><span></span></pre> +<PRE><DIV></DIV></PRE> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +=====================================output===================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre> +Foo Bar +</pre> +<pre> Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using + preformatted text characters. + </figcaption> +</figure> +<pre + data-attr-1="foo" + data-attr-2="foo" + data-attr-3="foo" + data-attr-4="foo" + data-attr-5="foo" + data-attr-6="foo" +> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre> +</details> + +<details> + <pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<pre><HR></pre> +<pre><br/></pre> +<pre><HR/></pre> +<pre><br /></pre> +<pre><HR /></pre> +<pre><span></span></pre> +<pre><DIV></DIV></pre> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +================================================================================ +`; + +exports[`pre.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre>Foo Bar +</pre> +<pre> + Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. + </figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre></details> + +<details><pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<PRE><HR></PRE> +<pre><br/></pre> +<PRE><HR/></PRE> +<pre><br /></pre> +<PRE><HR /></PRE> +<pre><span></span></pre> +<PRE><DIV></DIV></PRE> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +=====================================output===================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre> +Foo Bar +</pre> +<pre> Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using + preformatted text characters. + </figcaption> +</figure> +<pre + data-attr-1="foo" + data-attr-2="foo" + data-attr-3="foo" + data-attr-4="foo" + data-attr-5="foo" + data-attr-6="foo" +> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre> +</details> + +<details> + <pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<pre><HR></pre> +<pre><br/></pre> +<pre><HR/></pre> +<pre><br /></pre> +<pre><HR /></pre> +<pre><span></span></pre> +<pre><DIV></DIV></pre> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +================================================================================ +`; + +exports[`pre.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre>Foo Bar +</pre> +<pre> + Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. + </figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre></details> + +<details><pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<PRE><HR></PRE> +<pre><br/></pre> +<PRE><HR/></PRE> +<pre><br /></pre> +<PRE><HR /></PRE> +<pre><span></span></pre> +<PRE><DIV></DIV></PRE> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +=====================================output===================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre> +Foo Bar +</pre> +<pre> Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption">A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters.</figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre> +</details> + +<details> + <pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<pre><HR></pre> +<pre><br/></pre> +<pre><HR/></pre> +<pre><br /></pre> +<pre><HR /></pre> +<pre><span></span></pre> +<pre><DIV></DIV></pre> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +================================================================================ +`; + +exports[`pre.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre>Foo Bar +</pre> +<pre> + Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. + </figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre></details> + +<details><pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<PRE><HR></PRE> +<pre><br/></pre> +<PRE><HR/></PRE> +<pre><br /></pre> +<PRE><HR /></PRE> +<pre><span></span></pre> +<PRE><DIV></DIV></PRE> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +=====================================output===================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> + Foo Bar </pre +> +<pre> + Foo Bar +</pre> +<pre> +Foo Bar +</pre> +<pre> + Foo Bar</pre +> +<figure + role="img" + aria-labelledby="cow-caption" +> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption + id="cow-caption" + > + A + cow + saying, + "I'm + an + expert + in + my + field." + The + cow + is + illustrated + using + preformatted + text + characters. + </figcaption> +</figure> +<pre + data-attr-1="foo" + data-attr-2="foo" + data-attr-3="foo" + data-attr-4="foo" + data-attr-5="foo" + data-attr-6="foo" +> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre> +</details> + +<details> + <pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<pre><HR></pre> +<pre><br/></pre> +<pre><HR/></pre> +<pre><br /></pre> +<pre><HR /></pre> +<pre><span></span></pre> +<pre><DIV></DIV></pre> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +================================================================================ +`; + +exports[`pre.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre>Foo Bar +</pre> +<pre> + Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. + </figcaption> +</figure> +<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre></details> + +<details><pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<PRE><HR></PRE> +<pre><br/></pre> +<PRE><HR/></PRE> +<pre><br /></pre> +<PRE><HR /></PRE> +<pre><span></span></pre> +<PRE><DIV></DIV></PRE> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +=====================================output===================================== +<pre> +-------------------------------------------------------------------------------- + + + * * * + ** ** *** + ** ** * + **** *** **** ******** ******** *** **** + * *** * **** **** * *** ******** ******** *** *** **** **** * + * **** ** **** * *** ** ** *** * *** ** **** +** ** ** * *** ** ** ** * *** ** +** ** ** ** *** ** ** ** ** *** ** +** ** ** ******** ** ** ** ******** ** +** ** ** ******* ** ** ** ******* ** +** ** ** ** ** ** ** ** ** +******* *** **** * ** ** ** **** * *** +****** *** ******* ** ** *** * ******* *** +** ***** *** ***** +** +** + ** + +-------------------------------------------------------------------------------- +</pre> +<pre> + + Text in a pre element + + is displayed in a fixed-width + + font, and it preserves + + both spaces and + + line breaks + +</pre> +<pre> Foo Bar </pre> +<pre> + Foo Bar +</pre> +<pre> +Foo Bar +</pre> +<pre> Foo Bar</pre> +<figure role="img" aria-labelledby="cow-caption"> + <pre> +___________________________ +< I'm an expert in my field. > +--------------------------- + \\ ^__^ + \\ (oo)\\_______ + (__)\\ )\\/\\ + ||----w | + || || +___________________________ + </pre> + <figcaption id="cow-caption"> + A cow saying, "I'm an expert in my field." The cow is illustrated using + preformatted text characters. + </figcaption> +</figure> +<pre + data-attr-1="foo" + data-attr-2="foo" + data-attr-3="foo" + data-attr-4="foo" + data-attr-5="foo" + data-attr-6="foo" +> + Foo Bar +</pre> +<div> + <div> + <div> + <div> + <pre> + ______ + STRING + ______ + </pre> + </div> + </div> + </div> +</div> +<pre></pre> + +<pre><code #foo></code></pre> + +<details> + <pre><!--Comments--> + </pre> +</details> + +<details> + <pre> + <!--Comments--> +</pre> +</details> + +<!-- #6028 --> +<pre><br></pre> +<pre><HR></pre> +<pre><br/></pre> +<pre><HR/></pre> +<pre><br /></pre> +<pre><HR /></pre> +<pre><span></span></pre> +<pre><DIV></DIV></pre> +<pre><br/>long long long text long long long text long long long text long long long text <br></pre> +<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> + +================================================================================ +`; + +exports[`seach.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search" /> + <button type="submit">Go!</button> + </form> + </search> + + <search></search> + </header> + </body> +</html> + +================================================================================ +`; + +exports[`seach.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search" /> + <button type="submit">Go!</button> + </form> + </search> + + <search></search> + </header> + </body> +</html> + +================================================================================ +`; + +exports[`seach.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search" /> + <button type="submit">Go!</button> + </form> + </search> + + <search></search> + </header> + </body> +</html> + +================================================================================ +`; + +exports[`seach.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html + lang="en" +> + <head> + <meta + charset="UTF-8" + /> + <meta + http-equiv="X-UA-Compatible" + content="IE=edge" + /> + <meta + name="viewport" + content="width=device-width, initial-scale=1.0" + /> + <title> + Document + </title> + </head> + <body> + <header> + <h1> + <a + href="/" + >My + fancy + blog</a + > + </h1> + ... + <search> + <form + action="search.php" + > + <label + for="query" + >Find + an + article</label + > + <input + id="query" + name="q" + type="search" + /> + <button + type="submit" + > + Go! + </button> + </form> + </search> + + <search></search> + </header> + </body> +</html> + +================================================================================ +`; + +exports[`seach.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search" /> + <button type="submit">Go!</button> + </form> + </search> + + <search></search> + </header> + </body> +</html> + +================================================================================ +`; + +exports[`tags.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<br/> +<br /> +<br /> +<br +/> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br + attribute-a="value" +/> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4"> + <source src="movie.ogg" type="video/ogg"> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div><div><div>string</div></div><div>string</div></div> +<div><div>string</div><div><div>string</div></div></div> +<div><div></div></div> +<div><div></div><div></div></div> +<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> +<div> + <div>string</div> +</div> +<div> + + <div>string</div> + +</div> +<div> + + <div>string</div> + + <div>string</div> + +</div> +<ul + >123<li + class="foo" + id="bar" + >First</li + >456<li + class="baz" + >Second</li + >789</ul +> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr/>456</div> +<p>x<span a="b"></span></p> +<p>x<meta a></p> +<p>x<meta></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> +<app-nav></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-nav [input]="something"></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-primary-navigation></app-primary-navigation> +<router-outlet></router-outlet> +<app-footer [input]="something"></app-footer> +</div> +<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> +</tr> +</table><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox"/> </span> +<span><span><input type="checkbox"/></span></span> +<span><input type="checkbox"/></span> + +=====================================output===================================== +<br /> +<br /> +<br /> +<br /> +<br attribute-a /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +/> +<br attribute-a="value" /> +<br attribute-a="value" /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +/> +<br + attribute-a="value" + attribute-b="value" + attribute-c="value" + attribute-d="value" + attribute-e="value" + attribute-f="value" +/> +<div>string</div> +<div> + very very very very very very very very very very very very very very very + very long string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +> + string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +> + string +</div> +<div + attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +> + string +</div> +<div attribute="value"> + very very very very very very very very very very very very very very very + very long string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + very very very very very very very very very very very very very very very + very long string +</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4" /> + <source src="movie.ogg" type="video/ogg" /> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div> + <div>string</div> + <div>string</div> +</div> +<div> + <div><div>string</div></div> + <div>string</div> +</div> +<div> + <div>string</div> + <div><div>string</div></div> +</div> +<div><div></div></div> +<div> + <div></div> + <div></div> +</div> +<div> + <div> + <div> + <div> + <div> + <div><div>string</div></div> + </div> + </div> + </div> + </div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> + + <div>string</div> +</div> +<ul> + 123 + <li class="foo" id="bar">First</li> + 456 + <li class="baz">Second</li> + 789 +</ul> +<span> + * + <b>200</b> +</span> +<img + src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" +/> +123 +<div> + 123 + <meta attr /> + 456 +</div> +<p> + x + <span a="b"></span> +</p> +<p> + x + <meta a /> +</p> +<p> + x + <meta /> +</p> +<span></span> + +<label + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +></label> +| +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /> +<br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)"> + Disabled Cancel +</button> +<br /> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /> +<br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)"> + Disabled Cancel +</button> +<br /> +<br /> +<p> + " + <span [innerHTML]="title"></span> + " is the + <i>property bound</i> + title. +</p> +<li> + 12345678901234567890123456789012345678901234567890123456789012345678901234567890 +</li> +<div> + <app-nav></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-nav [input]="something"></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-primary-navigation></app-primary-navigation> + <router-outlet></router-outlet> + <app-footer [input]="something"></app-footer> +</div> +<x:root> + <span>tag name in other namespace should also lower cased</span> +</x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, " + <strong>seddoeiusmod</strong> + ". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong> + . +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr></tr></table> +<div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox" /></span> +<span> + <span><input type="checkbox" /></span> +</span> +<span><input type="checkbox" /></span> + +================================================================================ +`; + +exports[`tags.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<br/> +<br /> +<br /> +<br +/> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br + attribute-a="value" +/> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4"> + <source src="movie.ogg" type="video/ogg"> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div><div><div>string</div></div><div>string</div></div> +<div><div>string</div><div><div>string</div></div></div> +<div><div></div></div> +<div><div></div><div></div></div> +<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> +<div> + <div>string</div> +</div> +<div> + + <div>string</div> + +</div> +<div> + + <div>string</div> + + <div>string</div> + +</div> +<ul + >123<li + class="foo" + id="bar" + >First</li + >456<li + class="baz" + >Second</li + >789</ul +> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr/>456</div> +<p>x<span a="b"></span></p> +<p>x<meta a></p> +<p>x<meta></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> +<app-nav></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-nav [input]="something"></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-primary-navigation></app-primary-navigation> +<router-outlet></router-outlet> +<app-footer [input]="something"></app-footer> +</div> +<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> +</tr> +</table><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox"/> </span> +<span><span><input type="checkbox"/></span></span> +<span><input type="checkbox"/></span> + +=====================================output===================================== +<br /> +<br /> +<br /> +<br /> +<br attribute-a /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +/> +<br attribute-a="value" /> +<br attribute-a="value" /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +/> +<br + attribute-a="value" + attribute-b="value" + attribute-c="value" + attribute-d="value" + attribute-e="value" + attribute-f="value" +/> +<div>string</div> +<div + >very very very very very very very very very very very very very very very + very long string</div +> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute + >string</div +> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" + >string</div +> +<div + attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" + >string</div +> +<div attribute="value" + >very very very very very very very very very very very very very very very + very long string</div +> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" + >string</div +> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" + >very very very very very very very very very very very very very very very + very long string</div +> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4" /> + <source src="movie.ogg" type="video/ogg" /> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div + ><div><div>string</div></div + ><div>string</div></div +> +<div + ><div>string</div><div><div>string</div></div></div +> +<div><div></div></div> +<div><div></div><div></div></div> +<div + ><div + ><div + ><div + ><div + ><div><div>string</div></div></div + ></div + ></div + ></div + ></div +> +<div> + <div>string</div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> + + <div>string</div> +</div> +<ul + >123<li class="foo" id="bar">First</li + >456<li class="baz">Second</li + >789</ul +> +<span>*<b>200</b></span> +<img + src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" +/>123 +<div>123<meta attr />456</div> +<p>x<span a="b"></span></p> +<p>x<meta a /></p> +<p>x<meta /></p> +<span></span> + +<label + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +></label> +| +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li + >12345678901234567890123456789012345678901234567890123456789012345678901234567890</li +> +<div> + <app-nav></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-nav [input]="something"></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-primary-navigation></app-primary-navigation> + <router-outlet></router-outlet> + <app-footer [input]="something"></app-footer> +</div> +<x:root + ><span>tag name in other namespace should also lower cased</span></x:root +> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> </tr> </table +><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox" /> </span> +<span + ><span><input type="checkbox" /></span +></span> +<span><input type="checkbox" /></span> + +================================================================================ +`; + +exports[`tags.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<br/> +<br /> +<br /> +<br +/> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br + attribute-a="value" +/> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4"> + <source src="movie.ogg" type="video/ogg"> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div><div><div>string</div></div><div>string</div></div> +<div><div>string</div><div><div>string</div></div></div> +<div><div></div></div> +<div><div></div><div></div></div> +<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> +<div> + <div>string</div> +</div> +<div> + + <div>string</div> + +</div> +<div> + + <div>string</div> + + <div>string</div> + +</div> +<ul + >123<li + class="foo" + id="bar" + >First</li + >456<li + class="baz" + >Second</li + >789</ul +> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr/>456</div> +<p>x<span a="b"></span></p> +<p>x<meta a></p> +<p>x<meta></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> +<app-nav></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-nav [input]="something"></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-primary-navigation></app-primary-navigation> +<router-outlet></router-outlet> +<app-footer [input]="something"></app-footer> +</div> +<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> +</tr> +</table><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox"/> </span> +<span><span><input type="checkbox"/></span></span> +<span><input type="checkbox"/></span> + +=====================================output===================================== +<br /> +<br /> +<br /> +<br /> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br attribute-a="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4" /> + <source src="movie.ogg" type="video/ogg" /> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div> + <div>string</div> + <div>string</div> +</div> +<div> + <div><div>string</div></div> + <div>string</div> +</div> +<div> + <div>string</div> + <div><div>string</div></div> +</div> +<div><div></div></div> +<div> + <div></div> + <div></div> +</div> +<div> + <div> + <div> + <div> + <div> + <div><div>string</div></div> + </div> + </div> + </div> + </div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> + + <div>string</div> +</div> +<ul> + 123 + <li class="foo" id="bar">First</li> + 456 + <li class="baz">Second</li> + 789 +</ul> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr />456</div> +<p>x<span a="b"></span></p> +<p>x<meta a /></p> +<p>x<meta /></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)">Disabled Cancel</button> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)">Disabled Cancel</button> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> + <app-nav></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-nav [input]="something"></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-primary-navigation></app-primary-navigation> + <router-outlet></router-outlet> + <app-footer [input]="something"></app-footer> +</div> +<x:root><span>tag name in other namespace should also lower cased</span></x:root> +<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, "<strong>seddoeiusmod</strong>".</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table> + <tr></tr> +</table> +<div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox" /> </span> +<span + ><span><input type="checkbox" /></span +></span> +<span><input type="checkbox" /></span> + +================================================================================ +`; + +exports[`tags.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<br/> +<br /> +<br /> +<br +/> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br + attribute-a="value" +/> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4"> + <source src="movie.ogg" type="video/ogg"> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div><div><div>string</div></div><div>string</div></div> +<div><div>string</div><div><div>string</div></div></div> +<div><div></div></div> +<div><div></div><div></div></div> +<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> +<div> + <div>string</div> +</div> +<div> + + <div>string</div> + +</div> +<div> + + <div>string</div> + + <div>string</div> + +</div> +<ul + >123<li + class="foo" + id="bar" + >First</li + >456<li + class="baz" + >Second</li + >789</ul +> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr/>456</div> +<p>x<span a="b"></span></p> +<p>x<meta a></p> +<p>x<meta></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> +<app-nav></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-nav [input]="something"></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-primary-navigation></app-primary-navigation> +<router-outlet></router-outlet> +<app-footer [input]="something"></app-footer> +</div> +<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> +</tr> +</table><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox"/> </span> +<span><span><input type="checkbox"/></span></span> +<span><input type="checkbox"/></span> + +=====================================output===================================== +<br /> +<br /> +<br /> +<br /> +<br + attribute-a +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +/> +<br + attribute-a="value" +/> +<br + attribute-a="value" +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +/> +<br + attribute-a="value" + attribute-b="value" + attribute-c="value" + attribute-d="value" + attribute-e="value" + attribute-f="value" +/> +<div> + string +</div> +<div> + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + long + string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +> + string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +> + string +</div> +<div + attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +> + string +</div> +<div + attribute="value" +> + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + long + string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + very + long + string +</div> +<video + width="320" + height="240" + controls +> + <source + src="movie.mp4" + type="video/mp4" + /> + <source + src="movie.ogg" + type="video/ogg" + /> + Your + browser + does + not + support + the + video + tag. +</video> +<div> + <div> + string + </div> +</div> +<div> + <div> + string + </div> + <div> + string + </div> +</div> +<div> + <div> + <div> + string + </div> + </div> + <div> + string + </div> +</div> +<div> + <div> + string + </div> + <div> + <div> + string + </div> + </div> +</div> +<div> + <div></div> +</div> +<div> + <div></div> + <div></div> +</div> +<div> + <div> + <div> + <div> + <div> + <div> + <div> + string + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<div> + <div> + string + </div> +</div> +<div> + <div> + string + </div> +</div> +<div> + <div> + string + </div> + + <div> + string + </div> +</div> +<ul> + 123 + <li + class="foo" + id="bar" + > + First + </li> + 456 + <li + class="baz" + > + Second + </li> + 789 +</ul> +<span + >*<b + >200</b + ></span +> +<img + src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" +/>123 +<div> + 123<meta + attr + />456 +</div> +<p> + x<span + a="b" + ></span> +</p> +<p> + x<meta + a + /> +</p> +<p> + x<meta /> +</p> +<span></span> + +<label + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +></label> +| +<span></span> +<br /> +<button + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +> + 12345678901234567890 +</button> +<br /><br /> + +<button + bind-disabled="isUnchanged" + on-click="onSave($event)" +> + Disabled + Cancel +</button> +<br /><br /> +<button + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +> + 12345678901234567890 +</button> +<br /><br /> + +<button + bind-disabled="isUnchanged" + on-click="onSave($event)" +> + Disabled + Cancel +</button> +<br /><br /> +<p> + "<span + [innerHTML]="title" + ></span + >" + is + the + <i + >property + bound</i + > + title. +</p> +<li> + 12345678901234567890123456789012345678901234567890123456789012345678901234567890 +</li> +<div> + <app-nav></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-nav + [input]="something" + ></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-primary-navigation></app-primary-navigation> + <router-outlet></router-outlet> + <app-footer + [input]="something" + ></app-footer> +</div> +<x:root + ><span + >tag + name + in + other + namespace + should + also + lower + cased</span + ></x:root +> +<div> + Lorem + ipsum + dolor + sit + amet, + consectetur + adipiscing + elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem + ipsum + dolor + sit + amet, + consectetur + adipiscing + elit, + <strong + >seddoeiusmod</strong + >. +</div> +<span> + <i + class="fa fa-refresh fa-spin" + /> + <i + class="fa fa-refresh fa-spin" + /> + <i + class="fa fa-refresh fa-spin" + /> +</span> + +<!-- #5810 --> +<table> + <tr></tr> +</table> +<div> + Should + not + insert + empty + line + before + this + div +</div> + +<!-- self-closing --> +<span + ><input + type="checkbox" + /> +</span> +<span + ><span + ><input + type="checkbox" /></span +></span> +<span + ><input + type="checkbox" +/></span> + +================================================================================ +`; + +exports[`tags.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<br/> +<br /> +<br /> +<br +/> +<br attribute-a /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> +<br attribute-a="value" /> +<br + attribute-a="value" +/> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> +<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> +<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> +<div>string</div> +<div>very very very very very very very very very very very very very very very very long string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> +<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> +<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> +<div attribute="value">very very very very very very very very very very very very very very very very long string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> +<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4"> + <source src="movie.ogg" type="video/ogg"> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div><div>string</div><div>string</div></div> +<div><div><div>string</div></div><div>string</div></div> +<div><div>string</div><div><div>string</div></div></div> +<div><div></div></div> +<div><div></div><div></div></div> +<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> +<div> + <div>string</div> +</div> +<div> + + <div>string</div> + +</div> +<div> + + <div>string</div> + + <div>string</div> + +</div> +<ul + >123<li + class="foo" + id="bar" + >First</li + >456<li + class="baz" + >Second</li + >789</ul +> +<span>*<b>200</b></span> +<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 +<div>123<meta attr/>456</div> +<p>x<span a="b"></span></p> +<p>x<meta a></p> +<p>x<meta></p> +<span></span> + +<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + >12345678901234567890</button +> <br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)" + >Disabled Cancel</button +> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> +<div> +<app-nav></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-nav [input]="something"></app-nav> +<router-outlet></router-outlet> +<app-footer></app-footer> + +<app-primary-navigation></app-primary-navigation> +<router-outlet></router-outlet> +<app-footer [input]="something"></app-footer> +</div> +<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table><tr> +</tr> +</table><div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox"/> </span> +<span><span><input type="checkbox"/></span></span> +<span><input type="checkbox"/></span> + +=====================================output===================================== +<br /> +<br /> +<br /> +<br /> +<br attribute-a /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +/> +<br attribute-a="value" /> +<br attribute-a="value" /> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +/> +<br + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +/> +<br + attribute-a="value" + attribute-b="value" + attribute-c="value" + attribute-d="value" + attribute-e="value" + attribute-f="value" +/> +<div>string</div> +<div> + very very very very very very very very very very very very very very very + very long string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute +> + string +</div> +<div + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" +> + string +</div> +<div + attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" +> + string +</div> +<div attribute="value"> + very very very very very very very very very very very very very very very + very long string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + string +</div> +<div + attribute="value" + attributea="value" + attributeb="value" + attributec="value" + attributed="value" + attributef="value" +> + very very very very very very very very very very very very very very very + very long string +</div> +<video width="320" height="240" controls> + <source src="movie.mp4" type="video/mp4" /> + <source src="movie.ogg" type="video/ogg" /> + Your browser does not support the video tag. +</video> +<div><div>string</div></div> +<div> + <div>string</div> + <div>string</div> +</div> +<div> + <div><div>string</div></div> + <div>string</div> +</div> +<div> + <div>string</div> + <div><div>string</div></div> +</div> +<div><div></div></div> +<div> + <div></div> + <div></div> +</div> +<div> + <div> + <div> + <div> + <div> + <div><div>string</div></div> + </div> + </div> + </div> + </div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> +</div> +<div> + <div>string</div> + + <div>string</div> +</div> +<ul> + 123 + <li class="foo" id="bar">First</li> + 456 + <li class="baz">Second</li> + 789 +</ul> +<span>*<b>200</b></span> +<img + src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" +/>123 +<div>123<meta attr />456</div> +<p>x<span a="b"></span></p> +<p>x<meta a /></p> +<p>x<meta /></p> +<span></span> + +<label + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +></label> +| +<span></span> +<br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)"> + Disabled Cancel +</button> +<br /><br /> +<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> +<br /><br /> + +<button bind-disabled="isUnchanged" on-click="onSave($event)"> + Disabled Cancel +</button> +<br /><br /> +<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> +<li> + 12345678901234567890123456789012345678901234567890123456789012345678901234567890 +</li> +<div> + <app-nav></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-nav [input]="something"></app-nav> + <router-outlet></router-outlet> + <app-footer></app-footer> + + <app-primary-navigation></app-primary-navigation> + <router-outlet></router-outlet> + <app-footer [input]="something"></app-footer> +</div> +<x:root + ><span>tag name in other namespace should also lower cased</span></x:root +> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + "<strong>seddoeiusmod</strong>". +</div> +<div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, + <strong>seddoeiusmod</strong>. +</div> +<span> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> + <i class="fa fa-refresh fa-spin" /> +</span> + +<!-- #5810 --> +<table> + <tr></tr> +</table> +<div>Should not insert empty line before this div</div> + +<!-- self-closing --> +<span><input type="checkbox" /> </span> +<span + ><span><input type="checkbox" /></span +></span> +<span><input type="checkbox" /></span> + +================================================================================ +`; + +exports[`tags2.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div>before<details><summary>summary long long long long </summary>details</details>after</div> + +<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> + +<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +=====================================output===================================== +<div> + before + <noscript>noscript long long long long long long long long</noscript> + after +</div> + +<div> + before + <details> + <summary>summary long long long long</summary> + details + </details> + after +</div> + +<div> + before + <dialog open>dialog long long long long long long long long</dialog> + after +</div> + +<div> + before + <object data="horse.wav"> + <param name="autoplay" value="true" /> + <param name="autoplay" value="true" /> + </object> + after +</div> + +<div> + before + <meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter> + after +</div> + +<div> + before + <progress value=".5" max="1"></progress> + after +</div> + +================================================================================ +`; + +exports[`tags2.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div>before<details><summary>summary long long long long </summary>details</details>after</div> + +<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> + +<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +=====================================output===================================== +<div + >before<noscript>noscript long long long long long long long long</noscript + >after</div +> + +<div + >before<details + ><summary>summary long long long long </summary>details</details + >after</div +> + +<div + >before<dialog open>dialog long long long long long long long long </dialog + >after</div +> + +<div + >before<object data="horse.wav" + ><param name="autoplay" value="true" /><param + name="autoplay" + value="true" /></object + >after</div +> + +<div + >before<meter + min="0" + max="1" + low=".4" + high=".7" + optimum=".5" + value=".2" + ></meter + >after</div +> + +<div>before<progress value=".5" max="1"></progress>after</div> + +================================================================================ +`; + +exports[`tags2.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div>before<details><summary>summary long long long long </summary>details</details>after</div> + +<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> + +<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +=====================================output===================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div> + before + <details> + <summary>summary long long long long</summary> + details + </details> + after +</div> + +<div> + before + <dialog open>dialog long long long long long long long long</dialog> + after +</div> + +<div> + before<object data="horse.wav"> + <param name="autoplay" value="true" /> + <param name="autoplay" value="true" /></object + >after +</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +================================================================================ +`; + +exports[`tags2.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div>before<details><summary>summary long long long long </summary>details</details>after</div> + +<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> + +<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +=====================================output===================================== +<div> + before<noscript + >noscript + long + long + long + long + long + long + long + long</noscript + >after +</div> + +<div> + before + <details> + <summary> + summary + long + long + long + long + </summary> + details + </details> + after +</div> + +<div> + before + <dialog + open + > + dialog + long + long + long + long + long + long + long + long + </dialog> + after +</div> + +<div> + before<object + data="horse.wav" + > + <param + name="autoplay" + value="true" + /> + <param + name="autoplay" + value="true" + /></object + >after +</div> + +<div> + before<meter + min="0" + max="1" + low=".4" + high=".7" + optimum=".5" + value=".2" + ></meter + >after +</div> + +<div> + before<progress + value=".5" + max="1" + ></progress + >after +</div> + +================================================================================ +`; + +exports[`tags2.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>before<noscript>noscript long long long long long long long long</noscript>after</div> + +<div>before<details><summary>summary long long long long </summary>details</details>after</div> + +<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> + +<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> + +<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +=====================================output===================================== +<div> + before<noscript>noscript long long long long long long long long</noscript + >after +</div> + +<div> + before + <details> + <summary>summary long long long long</summary> + details + </details> + after +</div> + +<div> + before + <dialog open>dialog long long long long long long long long</dialog> + after +</div> + +<div> + before<object data="horse.wav"> + <param name="autoplay" value="true" /> + <param name="autoplay" value="true" /></object + >after +</div> + +<div> + before<meter + min="0" + max="1" + low=".4" + high=".7" + optimum=".5" + value=".2" + ></meter + >after +</div> + +<div>before<progress value=".5" max="1"></progress>after</div> + +================================================================================ +`; + +exports[`textarea.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +=====================================output===================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +================================================================================ +`; + +exports[`textarea.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +=====================================output===================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +================================================================================ +`; + +exports[`textarea.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +=====================================output===================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +================================================================================ +`; + +exports[`textarea.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +=====================================output===================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea + rows="10" + cols="45" + name="text" + > + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div> + <textarea> +lorem ipsum</textarea + > +</div> + +================================================================================ +`; + +exports[`textarea.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +=====================================output===================================== +<div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <div> + <textarea rows="10" cols="45" name="text"> + String + </textarea> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<textarea></textarea> + +<div><textarea>lorem ipsum</textarea></div> + +================================================================================ +`; + +exports[`unsupported.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<center></center> + +=====================================output===================================== +<center></center> + +================================================================================ +`; + +exports[`unsupported.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<center></center> + +=====================================output===================================== +<center></center> + +================================================================================ +`; + +exports[`unsupported.html - {"printWidth":"Infinity"} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: Infinity +=====================================input====================================== +<center></center> + +=====================================output===================================== +<center></center> + +================================================================================ +`; + +exports[`unsupported.html - {"printWidth":1} format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 1 + | printWidth +=====================================input====================================== +<center></center> + +=====================================output===================================== +<center></center> + +================================================================================ +`; + +exports[`unsupported.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<center></center> + +=====================================output===================================== +<center></center> + +================================================================================ +`; diff --git a/tests/format/html/tags/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/tags/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5e7a41abbe62..000000000000 --- a/tests/format/html/tags/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4626 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`case-sensitive.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -=====================================output===================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -================================================================================ -`; - -exports[`case-sensitive.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -=====================================output===================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -================================================================================ -`; - -exports[`case-sensitive.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -=====================================output===================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -================================================================================ -`; - -exports[`case-sensitive.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -=====================================output===================================== -<CaseSensitive - CaseSensitive="true" - >hello - world</CaseSensitive -> - -================================================================================ -`; - -exports[`case-sensitive.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -=====================================output===================================== -<CaseSensitive CaseSensitive="true">hello world</CaseSensitive> - -================================================================================ -`; - -exports[`closing-at-start.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -=====================================output===================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - > - bbbbbbbbbb - </a> - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - > - bbbbbbbbbb - </a> - cccccccccc -</div> - -================================================================================ -`; - -exports[`closing-at-start.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -=====================================output===================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -================================================================================ -`; - -exports[`closing-at-start.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -=====================================output===================================== -<div> - aaaaaaaaaa - <a href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong">bbbbbbbbbb</a> - cccccccccc -</div> -<div> - aaaaaaaaaa - <a href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong">bbbbbbbbbb</a>cccccccccc -</div> - -================================================================================ -`; - -exports[`closing-at-start.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -=====================================output===================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -================================================================================ -`; - -exports[`closing-at-start.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -=====================================output===================================== -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - > - cccccccccc -</div> -<div> - aaaaaaaaaa - <a - href="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" - >bbbbbbbbbb</a - >cccccccccc -</div> - -================================================================================ -`; - -exports[`custom-element.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<app-foo></app-foo> -<app-bar></app-bar> - -=====================================output===================================== -<app-foo></app-foo> -<app-bar></app-bar> - -================================================================================ -`; - -exports[`custom-element.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<app-foo></app-foo> -<app-bar></app-bar> - -=====================================output===================================== -<app-foo></app-foo> -<app-bar></app-bar> - -================================================================================ -`; - -exports[`custom-element.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<app-foo></app-foo> -<app-bar></app-bar> - -=====================================output===================================== -<app-foo></app-foo> -<app-bar></app-bar> - -================================================================================ -`; - -exports[`custom-element.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<app-foo></app-foo> -<app-bar></app-bar> - -=====================================output===================================== -<app-foo></app-foo> -<app-bar></app-bar> - -================================================================================ -`; - -exports[`custom-element.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<app-foo></app-foo> -<app-bar></app-bar> - -=====================================output===================================== -<app-foo></app-foo> -<app-bar></app-bar> - -================================================================================ -`; - -exports[`openging-at-end.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p - >Want to write us a letter? Use our<a - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -=====================================output===================================== -<p> - Want to write us a letter? Use our - <a> - <b><a>mailing address</a></b> - </a> - . -</p> - -<p> - Want to write us a letter? Use our - <a href="contacts.html#Mailing_address"> - <b><a>mailing address</a></b> - </a> - . -</p> - -<p> - Want to write us a letter? Use our - <a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - > - <b><a>mailing address</a></b> - </a> - . -</p> - -================================================================================ -`; - -exports[`openging-at-end.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p - >Want to write us a letter? Use our<a - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -=====================================output===================================== -<p - >Want to write us a letter? Use our<a - ><b><a>mailing address</a></b></a - >.</p -> - -<p - >Want to write us a letter? Use our<a href="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >.</p -> - -================================================================================ -`; - -exports[`openging-at-end.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<p - >Want to write us a letter? Use our<a - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -=====================================output===================================== -<p> - Want to write us a letter? Use our<a - ><b><a>mailing address</a></b></a - >. -</p> - -<p> - Want to write us a letter? Use our<a href="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >. -</p> - -<p> - Want to write us a letter? Use our<a href="contacts.html#Mailing_address" href1="contacts.html#Mailing_address" href2="contacts.html#Mailing_address" href3="contacts.html#Mailing_address" href4="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >. -</p> - -================================================================================ -`; - -exports[`openging-at-end.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<p - >Want to write us a letter? Use our<a - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -=====================================output===================================== -<p> - Want - to - write - us - a - letter? - Use - our<a - ><b - ><a - >mailing - address</a - ></b - ></a - >. -</p> - -<p> - Want - to - write - us - a - letter? - Use - our<a - href="contacts.html#Mailing_address" - ><b - ><a - >mailing - address</a - ></b - ></a - >. -</p> - -<p> - Want - to - write - us - a - letter? - Use - our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a - >mailing - address</a - ></b - ></a - >. -</p> - -================================================================================ -`; - -exports[`openging-at-end.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p - >Want to write us a letter? Use our<a - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -<p - >Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b - ><a>mailing address</a></b - ></a - >.</p -> - -=====================================output===================================== -<p> - Want to write us a letter? Use our<a - ><b><a>mailing address</a></b></a - >. -</p> - -<p> - Want to write us a letter? Use our<a href="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >. -</p> - -<p> - Want to write us a letter? Use our<a - href="contacts.html#Mailing_address" - href1="contacts.html#Mailing_address" - href2="contacts.html#Mailing_address" - href3="contacts.html#Mailing_address" - href4="contacts.html#Mailing_address" - ><b><a>mailing address</a></b></a - >. -</p> - -================================================================================ -`; - -exports[`option.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> -<input list=colors> -<datalist id=colors><option>Blue</option><option>Green</option></datalist> - -=====================================output===================================== -<select> - <option>Blue</option> - <option>Green</option> - <optgroup label="Darker"> - <option>Dark Blue</option> - <option>Dark Green</option> - </optgroup> -</select> -<input list="colors" /> -<datalist id="colors"> - <option>Blue</option> - <option>Green</option> -</datalist> - -================================================================================ -`; - -exports[`option.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> -<input list=colors> -<datalist id=colors><option>Blue</option><option>Green</option></datalist> - -=====================================output===================================== -<select - ><option>Blue</option - ><option>Green</option - ><optgroup label="Darker" - ><option>Dark Blue</option><option>Dark Green</option></optgroup - ></select -> -<input list="colors" /> -<datalist id="colors"><option>Blue</option><option>Green</option></datalist> - -================================================================================ -`; - -exports[`option.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> -<input list=colors> -<datalist id=colors><option>Blue</option><option>Green</option></datalist> - -=====================================output===================================== -<select> - <option>Blue</option> - <option>Green</option> - <optgroup label="Darker"> - <option>Dark Blue</option> - <option>Dark Green</option> - </optgroup> -</select> -<input list="colors" /> -<datalist id="colors"> - <option>Blue</option> - <option>Green</option> -</datalist> - -================================================================================ -`; - -exports[`option.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> -<input list=colors> -<datalist id=colors><option>Blue</option><option>Green</option></datalist> - -=====================================output===================================== -<select> - <option> - Blue - </option> - <option> - Green - </option> - <optgroup - label="Darker" - > - <option> - Dark - Blue - </option> - <option> - Dark - Green - </option> - </optgroup> -</select> -<input - list="colors" -/> -<datalist - id="colors" -> - <option> - Blue - </option> - <option> - Green - </option> -</datalist> - -================================================================================ -`; - -exports[`option.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<select><option>Blue</option><option>Green</option><optgroup label="Darker"><option>Dark Blue</option><option>Dark Green</option></optgroup></select> -<input list=colors> -<datalist id=colors><option>Blue</option><option>Green</option></datalist> - -=====================================output===================================== -<select> - <option>Blue</option> - <option>Green</option> - <optgroup label="Darker"> - <option>Dark Blue</option> - <option>Dark Green</option> - </optgroup> -</select> -<input list="colors" /> -<datalist id="colors"> - <option>Blue</option> - <option>Green</option> -</datalist> - -================================================================================ -`; - -exports[`pre.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre>Foo Bar -</pre> -<pre> - Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. - </figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre></details> - -<details><pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<PRE><HR></PRE> -<pre><br/></pre> -<PRE><HR/></PRE> -<pre><br /></pre> -<PRE><HR /></PRE> -<pre><span></span></pre> -<PRE><DIV></DIV></PRE> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -=====================================output===================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre> -Foo Bar -</pre> -<pre> Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using - preformatted text characters. - </figcaption> -</figure> -<pre - data-attr-1="foo" - data-attr-2="foo" - data-attr-3="foo" - data-attr-4="foo" - data-attr-5="foo" - data-attr-6="foo" -> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre> -</details> - -<details> - <pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<pre><HR></pre> -<pre><br/></pre> -<pre><HR/></pre> -<pre><br /></pre> -<pre><HR /></pre> -<pre><span></span></pre> -<pre><DIV></DIV></pre> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -================================================================================ -`; - -exports[`pre.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre>Foo Bar -</pre> -<pre> - Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. - </figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre></details> - -<details><pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<PRE><HR></PRE> -<pre><br/></pre> -<PRE><HR/></PRE> -<pre><br /></pre> -<PRE><HR /></PRE> -<pre><span></span></pre> -<PRE><DIV></DIV></PRE> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -=====================================output===================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre> -Foo Bar -</pre> -<pre> Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using - preformatted text characters. - </figcaption> -</figure> -<pre - data-attr-1="foo" - data-attr-2="foo" - data-attr-3="foo" - data-attr-4="foo" - data-attr-5="foo" - data-attr-6="foo" -> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre> -</details> - -<details> - <pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<pre><HR></pre> -<pre><br/></pre> -<pre><HR/></pre> -<pre><br /></pre> -<pre><HR /></pre> -<pre><span></span></pre> -<pre><DIV></DIV></pre> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -================================================================================ -`; - -exports[`pre.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre>Foo Bar -</pre> -<pre> - Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. - </figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre></details> - -<details><pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<PRE><HR></PRE> -<pre><br/></pre> -<PRE><HR/></PRE> -<pre><br /></pre> -<PRE><HR /></PRE> -<pre><span></span></pre> -<PRE><DIV></DIV></PRE> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -=====================================output===================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre> -Foo Bar -</pre> -<pre> Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption">A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters.</figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre> -</details> - -<details> - <pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<pre><HR></pre> -<pre><br/></pre> -<pre><HR/></pre> -<pre><br /></pre> -<pre><HR /></pre> -<pre><span></span></pre> -<pre><DIV></DIV></pre> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -================================================================================ -`; - -exports[`pre.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre>Foo Bar -</pre> -<pre> - Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. - </figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre></details> - -<details><pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<PRE><HR></PRE> -<pre><br/></pre> -<PRE><HR/></PRE> -<pre><br /></pre> -<PRE><HR /></PRE> -<pre><span></span></pre> -<PRE><DIV></DIV></PRE> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -=====================================output===================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> - Foo Bar </pre -> -<pre> - Foo Bar -</pre> -<pre> -Foo Bar -</pre> -<pre> - Foo Bar</pre -> -<figure - role="img" - aria-labelledby="cow-caption" -> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption - id="cow-caption" - > - A - cow - saying, - "I'm - an - expert - in - my - field." - The - cow - is - illustrated - using - preformatted - text - characters. - </figcaption> -</figure> -<pre - data-attr-1="foo" - data-attr-2="foo" - data-attr-3="foo" - data-attr-4="foo" - data-attr-5="foo" - data-attr-6="foo" -> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre> -</details> - -<details> - <pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<pre><HR></pre> -<pre><br/></pre> -<pre><HR/></pre> -<pre><br /></pre> -<pre><HR /></pre> -<pre><span></span></pre> -<pre><DIV></DIV></pre> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -================================================================================ -`; - -exports[`pre.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre>Foo Bar -</pre> -<pre> - Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using preformatted text characters. - </figcaption> -</figure> -<pre data-attr-1="foo" data-attr-2="foo" data-attr-3="foo" data-attr-4="foo" data-attr-5="foo" data-attr-6="foo"> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre></details> - -<details><pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<PRE><HR></PRE> -<pre><br/></pre> -<PRE><HR/></PRE> -<pre><br /></pre> -<PRE><HR /></PRE> -<pre><span></span></pre> -<PRE><DIV></DIV></PRE> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -=====================================output===================================== -<pre> --------------------------------------------------------------------------------- - - - * * * - ** ** *** - ** ** * - **** *** **** ******** ******** *** **** - * *** * **** **** * *** ******** ******** *** *** **** **** * - * **** ** **** * *** ** ** *** * *** ** **** -** ** ** * *** ** ** ** * *** ** -** ** ** ** *** ** ** ** ** *** ** -** ** ** ******** ** ** ** ******** ** -** ** ** ******* ** ** ** ******* ** -** ** ** ** ** ** ** ** ** -******* *** **** * ** ** ** **** * *** -****** *** ******* ** ** *** * ******* *** -** ***** *** ***** -** -** - ** - --------------------------------------------------------------------------------- -</pre> -<pre> - - Text in a pre element - - is displayed in a fixed-width - - font, and it preserves - - both spaces and - - line breaks - -</pre> -<pre> Foo Bar </pre> -<pre> - Foo Bar -</pre> -<pre> -Foo Bar -</pre> -<pre> Foo Bar</pre> -<figure role="img" aria-labelledby="cow-caption"> - <pre> -___________________________ -< I'm an expert in my field. > ---------------------------- - \\ ^__^ - \\ (oo)\\_______ - (__)\\ )\\/\\ - ||----w | - || || -___________________________ - </pre> - <figcaption id="cow-caption"> - A cow saying, "I'm an expert in my field." The cow is illustrated using - preformatted text characters. - </figcaption> -</figure> -<pre - data-attr-1="foo" - data-attr-2="foo" - data-attr-3="foo" - data-attr-4="foo" - data-attr-5="foo" - data-attr-6="foo" -> - Foo Bar -</pre> -<div> - <div> - <div> - <div> - <pre> - ______ - STRING - ______ - </pre> - </div> - </div> - </div> -</div> -<pre></pre> - -<pre><code #foo></code></pre> - -<details> - <pre><!--Comments--> - </pre> -</details> - -<details> - <pre> - <!--Comments--> -</pre> -</details> - -<!-- #6028 --> -<pre><br></pre> -<pre><HR></pre> -<pre><br/></pre> -<pre><HR/></pre> -<pre><br /></pre> -<pre><HR /></pre> -<pre><span></span></pre> -<pre><DIV></DIV></pre> -<pre><br/>long long long text long long long text long long long text long long long text <br></pre> -<pre><br>long long long text long long long text long long long text long long long text <BR/></pre> - -================================================================================ -`; - -exports[`tags.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<br/> -<br /> -<br /> -<br -/> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br - attribute-a="value" -/> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4"> - <source src="movie.ogg" type="video/ogg"> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div><div><div>string</div></div><div>string</div></div> -<div><div>string</div><div><div>string</div></div></div> -<div><div></div></div> -<div><div></div><div></div></div> -<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> -<div> - <div>string</div> -</div> -<div> - - <div>string</div> - -</div> -<div> - - <div>string</div> - - <div>string</div> - -</div> -<ul - >123<li - class="foo" - id="bar" - >First</li - >456<li - class="baz" - >Second</li - >789</ul -> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr/>456</div> -<p>x<span a="b"></span></p> -<p>x<meta a></p> -<p>x<meta></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> -<app-nav></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-nav [input]="something"></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-primary-navigation></app-primary-navigation> -<router-outlet></router-outlet> -<app-footer [input]="something"></app-footer> -</div> -<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> -</tr> -</table><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox"/> </span> -<span><span><input type="checkbox"/></span></span> -<span><input type="checkbox"/></span> - -=====================================output===================================== -<br /> -<br /> -<br /> -<br /> -<br attribute-a /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -/> -<br attribute-a="value" /> -<br attribute-a="value" /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -/> -<br - attribute-a="value" - attribute-b="value" - attribute-c="value" - attribute-d="value" - attribute-e="value" - attribute-f="value" -/> -<div>string</div> -<div> - very very very very very very very very very very very very very very very - very long string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -> - string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -> - string -</div> -<div - attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -> - string -</div> -<div attribute="value"> - very very very very very very very very very very very very very very very - very long string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - very very very very very very very very very very very very very very very - very long string -</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4" /> - <source src="movie.ogg" type="video/ogg" /> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div> - <div>string</div> - <div>string</div> -</div> -<div> - <div><div>string</div></div> - <div>string</div> -</div> -<div> - <div>string</div> - <div><div>string</div></div> -</div> -<div><div></div></div> -<div> - <div></div> - <div></div> -</div> -<div> - <div> - <div> - <div> - <div> - <div><div>string</div></div> - </div> - </div> - </div> - </div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> - - <div>string</div> -</div> -<ul> - 123 - <li class="foo" id="bar">First</li> - 456 - <li class="baz">Second</li> - 789 -</ul> -<span> - * - <b>200</b> -</span> -<img - src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" -/> -123 -<div> - 123 - <meta attr /> - 456 -</div> -<p> - x - <span a="b"></span> -</p> -<p> - x - <meta a /> -</p> -<p> - x - <meta /> -</p> -<span></span> - -<label - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -></label> -| -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /> -<br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)"> - Disabled Cancel -</button> -<br /> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /> -<br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)"> - Disabled Cancel -</button> -<br /> -<br /> -<p> - " - <span [innerHTML]="title"></span> - " is the - <i>property bound</i> - title. -</p> -<li> - 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -</li> -<div> - <app-nav></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-nav [input]="something"></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-primary-navigation></app-primary-navigation> - <router-outlet></router-outlet> - <app-footer [input]="something"></app-footer> -</div> -<x:root> - <span>tag name in other namespace should also lower cased</span> -</x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, " - <strong>seddoeiusmod</strong> - ". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong> - . -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr></tr></table> -<div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox" /></span> -<span> - <span><input type="checkbox" /></span> -</span> -<span><input type="checkbox" /></span> - -================================================================================ -`; - -exports[`tags.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<br/> -<br /> -<br /> -<br -/> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br - attribute-a="value" -/> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4"> - <source src="movie.ogg" type="video/ogg"> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div><div><div>string</div></div><div>string</div></div> -<div><div>string</div><div><div>string</div></div></div> -<div><div></div></div> -<div><div></div><div></div></div> -<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> -<div> - <div>string</div> -</div> -<div> - - <div>string</div> - -</div> -<div> - - <div>string</div> - - <div>string</div> - -</div> -<ul - >123<li - class="foo" - id="bar" - >First</li - >456<li - class="baz" - >Second</li - >789</ul -> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr/>456</div> -<p>x<span a="b"></span></p> -<p>x<meta a></p> -<p>x<meta></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> -<app-nav></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-nav [input]="something"></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-primary-navigation></app-primary-navigation> -<router-outlet></router-outlet> -<app-footer [input]="something"></app-footer> -</div> -<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> -</tr> -</table><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox"/> </span> -<span><span><input type="checkbox"/></span></span> -<span><input type="checkbox"/></span> - -=====================================output===================================== -<br /> -<br /> -<br /> -<br /> -<br attribute-a /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -/> -<br attribute-a="value" /> -<br attribute-a="value" /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -/> -<br - attribute-a="value" - attribute-b="value" - attribute-c="value" - attribute-d="value" - attribute-e="value" - attribute-f="value" -/> -<div>string</div> -<div - >very very very very very very very very very very very very very very very - very long string</div -> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute - >string</div -> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" - >string</div -> -<div - attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" - >string</div -> -<div attribute="value" - >very very very very very very very very very very very very very very very - very long string</div -> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" - >string</div -> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" - >very very very very very very very very very very very very very very very - very long string</div -> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4" /> - <source src="movie.ogg" type="video/ogg" /> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div - ><div><div>string</div></div - ><div>string</div></div -> -<div - ><div>string</div><div><div>string</div></div></div -> -<div><div></div></div> -<div><div></div><div></div></div> -<div - ><div - ><div - ><div - ><div - ><div><div>string</div></div></div - ></div - ></div - ></div - ></div -> -<div> - <div>string</div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> - - <div>string</div> -</div> -<ul - >123<li class="foo" id="bar">First</li - >456<li class="baz">Second</li - >789</ul -> -<span>*<b>200</b></span> -<img - src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" -/>123 -<div>123<meta attr />456</div> -<p>x<span a="b"></span></p> -<p>x<meta a /></p> -<p>x<meta /></p> -<span></span> - -<label - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -></label> -| -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li - >12345678901234567890123456789012345678901234567890123456789012345678901234567890</li -> -<div> - <app-nav></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-nav [input]="something"></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-primary-navigation></app-primary-navigation> - <router-outlet></router-outlet> - <app-footer [input]="something"></app-footer> -</div> -<x:root - ><span>tag name in other namespace should also lower cased</span></x:root -> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> </tr> </table -><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox" /> </span> -<span - ><span><input type="checkbox" /></span -></span> -<span><input type="checkbox" /></span> - -================================================================================ -`; - -exports[`tags.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<br/> -<br /> -<br /> -<br -/> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br - attribute-a="value" -/> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4"> - <source src="movie.ogg" type="video/ogg"> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div><div><div>string</div></div><div>string</div></div> -<div><div>string</div><div><div>string</div></div></div> -<div><div></div></div> -<div><div></div><div></div></div> -<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> -<div> - <div>string</div> -</div> -<div> - - <div>string</div> - -</div> -<div> - - <div>string</div> - - <div>string</div> - -</div> -<ul - >123<li - class="foo" - id="bar" - >First</li - >456<li - class="baz" - >Second</li - >789</ul -> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr/>456</div> -<p>x<span a="b"></span></p> -<p>x<meta a></p> -<p>x<meta></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> -<app-nav></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-nav [input]="something"></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-primary-navigation></app-primary-navigation> -<router-outlet></router-outlet> -<app-footer [input]="something"></app-footer> -</div> -<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> -</tr> -</table><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox"/> </span> -<span><span><input type="checkbox"/></span></span> -<span><input type="checkbox"/></span> - -=====================================output===================================== -<br /> -<br /> -<br /> -<br /> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br attribute-a="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4" /> - <source src="movie.ogg" type="video/ogg" /> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div> - <div>string</div> - <div>string</div> -</div> -<div> - <div><div>string</div></div> - <div>string</div> -</div> -<div> - <div>string</div> - <div><div>string</div></div> -</div> -<div><div></div></div> -<div> - <div></div> - <div></div> -</div> -<div> - <div> - <div> - <div> - <div> - <div><div>string</div></div> - </div> - </div> - </div> - </div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> - - <div>string</div> -</div> -<ul> - 123 - <li class="foo" id="bar">First</li> - 456 - <li class="baz">Second</li> - 789 -</ul> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr />456</div> -<p>x<span a="b"></span></p> -<p>x<meta a /></p> -<p>x<meta /></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)">Disabled Cancel</button> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)">Disabled Cancel</button> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> - <app-nav></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-nav [input]="something"></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-primary-navigation></app-primary-navigation> - <router-outlet></router-outlet> - <app-footer [input]="something"></app-footer> -</div> -<x:root><span>tag name in other namespace should also lower cased</span></x:root> -<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, "<strong>seddoeiusmod</strong>".</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table> - <tr></tr> -</table> -<div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox" /> </span> -<span - ><span><input type="checkbox" /></span -></span> -<span><input type="checkbox" /></span> - -================================================================================ -`; - -exports[`tags.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<br/> -<br /> -<br /> -<br -/> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br - attribute-a="value" -/> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4"> - <source src="movie.ogg" type="video/ogg"> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div><div><div>string</div></div><div>string</div></div> -<div><div>string</div><div><div>string</div></div></div> -<div><div></div></div> -<div><div></div><div></div></div> -<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> -<div> - <div>string</div> -</div> -<div> - - <div>string</div> - -</div> -<div> - - <div>string</div> - - <div>string</div> - -</div> -<ul - >123<li - class="foo" - id="bar" - >First</li - >456<li - class="baz" - >Second</li - >789</ul -> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr/>456</div> -<p>x<span a="b"></span></p> -<p>x<meta a></p> -<p>x<meta></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> -<app-nav></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-nav [input]="something"></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-primary-navigation></app-primary-navigation> -<router-outlet></router-outlet> -<app-footer [input]="something"></app-footer> -</div> -<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> -</tr> -</table><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox"/> </span> -<span><span><input type="checkbox"/></span></span> -<span><input type="checkbox"/></span> - -=====================================output===================================== -<br /> -<br /> -<br /> -<br /> -<br - attribute-a -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -/> -<br - attribute-a="value" -/> -<br - attribute-a="value" -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -/> -<br - attribute-a="value" - attribute-b="value" - attribute-c="value" - attribute-d="value" - attribute-e="value" - attribute-f="value" -/> -<div> - string -</div> -<div> - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - long - string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -> - string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -> - string -</div> -<div - attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -> - string -</div> -<div - attribute="value" -> - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - long - string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - very - long - string -</div> -<video - width="320" - height="240" - controls -> - <source - src="movie.mp4" - type="video/mp4" - /> - <source - src="movie.ogg" - type="video/ogg" - /> - Your - browser - does - not - support - the - video - tag. -</video> -<div> - <div> - string - </div> -</div> -<div> - <div> - string - </div> - <div> - string - </div> -</div> -<div> - <div> - <div> - string - </div> - </div> - <div> - string - </div> -</div> -<div> - <div> - string - </div> - <div> - <div> - string - </div> - </div> -</div> -<div> - <div></div> -</div> -<div> - <div></div> - <div></div> -</div> -<div> - <div> - <div> - <div> - <div> - <div> - <div> - string - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<div> - <div> - string - </div> -</div> -<div> - <div> - string - </div> -</div> -<div> - <div> - string - </div> - - <div> - string - </div> -</div> -<ul> - 123 - <li - class="foo" - id="bar" - > - First - </li> - 456 - <li - class="baz" - > - Second - </li> - 789 -</ul> -<span - >*<b - >200</b - ></span -> -<img - src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" -/>123 -<div> - 123<meta - attr - />456 -</div> -<p> - x<span - a="b" - ></span> -</p> -<p> - x<meta - a - /> -</p> -<p> - x<meta /> -</p> -<span></span> - -<label - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -></label> -| -<span></span> -<br /> -<button - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -> - 12345678901234567890 -</button> -<br /><br /> - -<button - bind-disabled="isUnchanged" - on-click="onSave($event)" -> - Disabled - Cancel -</button> -<br /><br /> -<button - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -> - 12345678901234567890 -</button> -<br /><br /> - -<button - bind-disabled="isUnchanged" - on-click="onSave($event)" -> - Disabled - Cancel -</button> -<br /><br /> -<p> - "<span - [innerHTML]="title" - ></span - >" - is - the - <i - >property - bound</i - > - title. -</p> -<li> - 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -</li> -<div> - <app-nav></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-nav - [input]="something" - ></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-primary-navigation></app-primary-navigation> - <router-outlet></router-outlet> - <app-footer - [input]="something" - ></app-footer> -</div> -<x:root - ><span - >tag - name - in - other - namespace - should - also - lower - cased</span - ></x:root -> -<div> - Lorem - ipsum - dolor - sit - amet, - consectetur - adipiscing - elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem - ipsum - dolor - sit - amet, - consectetur - adipiscing - elit, - <strong - >seddoeiusmod</strong - >. -</div> -<span> - <i - class="fa fa-refresh fa-spin" - /> - <i - class="fa fa-refresh fa-spin" - /> - <i - class="fa fa-refresh fa-spin" - /> -</span> - -<!-- #5810 --> -<table> - <tr></tr> -</table> -<div> - Should - not - insert - empty - line - before - this - div -</div> - -<!-- self-closing --> -<span - ><input - type="checkbox" - /> -</span> -<span - ><span - ><input - type="checkbox" /></span -></span> -<span - ><input - type="checkbox" -/></span> - -================================================================================ -`; - -exports[`tags.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<br/> -<br /> -<br /> -<br -/> -<br attribute-a /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute /> -<br attribute-a="value" /> -<br - attribute-a="value" -/> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" /> -<br very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" /> -<br attribute-a="value" attribute-b="value" attribute-c="value" attribute-d="value" attribute-e="value" attribute-f="value" /> -<div>string</div> -<div>very very very very very very very very very very very very very very very very long string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute>string</div> -<div very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value">string</div> -<div attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value">string</div> -<div attribute="value">very very very very very very very very very very very very very very very very long string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">string</div> -<div attribute="value" attributea="value" attributeb="value" attributec="value" attributed="value" attributef="value">very very very very very very very very very very very very very very very very long string</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4"> - <source src="movie.ogg" type="video/ogg"> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div><div>string</div><div>string</div></div> -<div><div><div>string</div></div><div>string</div></div> -<div><div>string</div><div><div>string</div></div></div> -<div><div></div></div> -<div><div></div><div></div></div> -<div><div><div><div><div><div><div>string</div></div></div></div></div></div></div> -<div> - <div>string</div> -</div> -<div> - - <div>string</div> - -</div> -<div> - - <div>string</div> - - <div>string</div> - -</div> -<ul - >123<li - class="foo" - id="bar" - >First</li - >456<li - class="baz" - >Second</li - >789</ul -> -<span>*<b>200</b></span> -<img src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" />123 -<div>123<meta attr/>456</div> -<p>x<span a="b"></span></p> -<p>x<meta a></p> -<p>x<meta></p> -<span></span> - -<label aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa></label> | -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - >12345678901234567890</button -> <br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)" - >Disabled Cancel</button -> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li>12345678901234567890123456789012345678901234567890123456789012345678901234567890</li> -<div> -<app-nav></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-nav [input]="something"></app-nav> -<router-outlet></router-outlet> -<app-footer></app-footer> - -<app-primary-navigation></app-primary-navigation> -<router-outlet></router-outlet> -<app-footer [input]="something"></app-footer> -</div> -<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table><tr> -</tr> -</table><div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox"/> </span> -<span><span><input type="checkbox"/></span></span> -<span><input type="checkbox"/></span> - -=====================================output===================================== -<br /> -<br /> -<br /> -<br /> -<br attribute-a /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -/> -<br attribute-a="value" /> -<br attribute-a="value" /> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -/> -<br - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -/> -<br - attribute-a="value" - attribute-b="value" - attribute-c="value" - attribute-d="value" - attribute-e="value" - attribute-f="value" -/> -<div>string</div> -<div> - very very very very very very very very very very very very very very very - very long string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute -> - string -</div> -<div - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-attribute="value" -> - string -</div> -<div - attribute="very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-value" -> - string -</div> -<div attribute="value"> - very very very very very very very very very very very very very very very - very long string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - string -</div> -<div - attribute="value" - attributea="value" - attributeb="value" - attributec="value" - attributed="value" - attributef="value" -> - very very very very very very very very very very very very very very very - very long string -</div> -<video width="320" height="240" controls> - <source src="movie.mp4" type="video/mp4" /> - <source src="movie.ogg" type="video/ogg" /> - Your browser does not support the video tag. -</video> -<div><div>string</div></div> -<div> - <div>string</div> - <div>string</div> -</div> -<div> - <div><div>string</div></div> - <div>string</div> -</div> -<div> - <div>string</div> - <div><div>string</div></div> -</div> -<div><div></div></div> -<div> - <div></div> - <div></div> -</div> -<div> - <div> - <div> - <div> - <div> - <div><div>string</div></div> - </div> - </div> - </div> - </div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> -</div> -<div> - <div>string</div> - - <div>string</div> -</div> -<ul> - 123 - <li class="foo" id="bar">First</li> - 456 - <li class="baz">Second</li> - 789 -</ul> -<span>*<b>200</b></span> -<img - src="longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" -/>123 -<div>123<meta attr />456</div> -<p>x<span a="b"></span></p> -<p>x<meta a /></p> -<p>x<meta /></p> -<span></span> - -<label - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -></label> -| -<span></span> -<br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)"> - Disabled Cancel -</button> -<br /><br /> -<button xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>12345678901234567890</button> -<br /><br /> - -<button bind-disabled="isUnchanged" on-click="onSave($event)"> - Disabled Cancel -</button> -<br /><br /> -<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p> -<li> - 12345678901234567890123456789012345678901234567890123456789012345678901234567890 -</li> -<div> - <app-nav></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-nav [input]="something"></app-nav> - <router-outlet></router-outlet> - <app-footer></app-footer> - - <app-primary-navigation></app-primary-navigation> - <router-outlet></router-outlet> - <app-footer [input]="something"></app-footer> -</div> -<x:root - ><span>tag name in other namespace should also lower cased</span></x:root -> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - "<strong>seddoeiusmod</strong>". -</div> -<div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, - <strong>seddoeiusmod</strong>. -</div> -<span> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> - <i class="fa fa-refresh fa-spin" /> -</span> - -<!-- #5810 --> -<table> - <tr></tr> -</table> -<div>Should not insert empty line before this div</div> - -<!-- self-closing --> -<span><input type="checkbox" /> </span> -<span - ><span><input type="checkbox" /></span -></span> -<span><input type="checkbox" /></span> - -================================================================================ -`; - -exports[`tags2.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div>before<details><summary>summary long long long long </summary>details</details>after</div> - -<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> - -<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -=====================================output===================================== -<div> - before - <noscript>noscript long long long long long long long long</noscript> - after -</div> - -<div> - before - <details> - <summary>summary long long long long</summary> - details - </details> - after -</div> - -<div> - before - <dialog open>dialog long long long long long long long long</dialog> - after -</div> - -<div> - before - <object data="horse.wav"> - <param name="autoplay" value="true" /> - <param name="autoplay" value="true" /> - </object> - after -</div> - -<div> - before - <meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter> - after -</div> - -<div> - before - <progress value=".5" max="1"></progress> - after -</div> - -================================================================================ -`; - -exports[`tags2.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div>before<details><summary>summary long long long long </summary>details</details>after</div> - -<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> - -<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -=====================================output===================================== -<div - >before<noscript>noscript long long long long long long long long</noscript - >after</div -> - -<div - >before<details - ><summary>summary long long long long </summary>details</details - >after</div -> - -<div - >before<dialog open>dialog long long long long long long long long </dialog - >after</div -> - -<div - >before<object data="horse.wav" - ><param name="autoplay" value="true" /><param - name="autoplay" - value="true" /></object - >after</div -> - -<div - >before<meter - min="0" - max="1" - low=".4" - high=".7" - optimum=".5" - value=".2" - ></meter - >after</div -> - -<div>before<progress value=".5" max="1"></progress>after</div> - -================================================================================ -`; - -exports[`tags2.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div>before<details><summary>summary long long long long </summary>details</details>after</div> - -<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> - -<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -=====================================output===================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div> - before - <details> - <summary>summary long long long long</summary> - details - </details> - after -</div> - -<div> - before - <dialog open>dialog long long long long long long long long</dialog> - after -</div> - -<div> - before<object data="horse.wav"> - <param name="autoplay" value="true" /> - <param name="autoplay" value="true" /></object - >after -</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -================================================================================ -`; - -exports[`tags2.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div>before<details><summary>summary long long long long </summary>details</details>after</div> - -<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> - -<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -=====================================output===================================== -<div> - before<noscript - >noscript - long - long - long - long - long - long - long - long</noscript - >after -</div> - -<div> - before - <details> - <summary> - summary - long - long - long - long - </summary> - details - </details> - after -</div> - -<div> - before - <dialog - open - > - dialog - long - long - long - long - long - long - long - long - </dialog> - after -</div> - -<div> - before<object - data="horse.wav" - > - <param - name="autoplay" - value="true" - /> - <param - name="autoplay" - value="true" - /></object - >after -</div> - -<div> - before<meter - min="0" - max="1" - low=".4" - high=".7" - optimum=".5" - value=".2" - ></meter - >after -</div> - -<div> - before<progress - value=".5" - max="1" - ></progress - >after -</div> - -================================================================================ -`; - -exports[`tags2.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>before<noscript>noscript long long long long long long long long</noscript>after</div> - -<div>before<details><summary>summary long long long long </summary>details</details>after</div> - -<div>before<dialog open>dialog long long long long long long long long </dialog>after</div> - -<div>before<object data="horse.wav"><param name="autoplay" value="true"/><param name="autoplay" value="true"/></object>after</div> - -<div>before<meter min="0" max="1" low=".4" high=".7" optimum=".5" value=".2"></meter>after</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -=====================================output===================================== -<div> - before<noscript>noscript long long long long long long long long</noscript - >after -</div> - -<div> - before - <details> - <summary>summary long long long long</summary> - details - </details> - after -</div> - -<div> - before - <dialog open>dialog long long long long long long long long</dialog> - after -</div> - -<div> - before<object data="horse.wav"> - <param name="autoplay" value="true" /> - <param name="autoplay" value="true" /></object - >after -</div> - -<div> - before<meter - min="0" - max="1" - low=".4" - high=".7" - optimum=".5" - value=".2" - ></meter - >after -</div> - -<div>before<progress value=".5" max="1"></progress>after</div> - -================================================================================ -`; - -exports[`textarea.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -=====================================output===================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -================================================================================ -`; - -exports[`textarea.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -=====================================output===================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -================================================================================ -`; - -exports[`textarea.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -=====================================output===================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -================================================================================ -`; - -exports[`textarea.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -=====================================output===================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea - rows="10" - cols="45" - name="text" - > - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div> - <textarea> -lorem ipsum</textarea - > -</div> - -================================================================================ -`; - -exports[`textarea.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -=====================================output===================================== -<div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <div> - <textarea rows="10" cols="45" name="text"> - String - </textarea> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -<textarea></textarea> - -<div><textarea>lorem ipsum</textarea></div> - -================================================================================ -`; - -exports[`unsupported.html - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<center></center> - -=====================================output===================================== -<center></center> - -================================================================================ -`; - -exports[`unsupported.html - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "strict" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<center></center> - -=====================================output===================================== -<center></center> - -================================================================================ -`; - -exports[`unsupported.html - {"printWidth":"Infinity"} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: Infinity -=====================================input====================================== -<center></center> - -=====================================output===================================== -<center></center> - -================================================================================ -`; - -exports[`unsupported.html - {"printWidth":1} format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 1 - | printWidth -=====================================input====================================== -<center></center> - -=====================================output===================================== -<center></center> - -================================================================================ -`; - -exports[`unsupported.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<center></center> - -=====================================output===================================== -<center></center> - -================================================================================ -`; diff --git a/tests/format/html/tags/format.test.js b/tests/format/html/tags/format.test.js new file mode 100644 index 000000000000..515373280a5c --- /dev/null +++ b/tests/format/html/tags/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["html"]); +runFormatTest(import.meta, ["html"], { printWidth: 1 }); +runFormatTest(import.meta, ["html"], { printWidth: Number.POSITIVE_INFINITY }); +runFormatTest(import.meta, ["html"], { htmlWhitespaceSensitivity: "strict" }); +runFormatTest(import.meta, ["html"], { htmlWhitespaceSensitivity: "ignore" }); diff --git a/tests/format/html/tags/jsfmt.spec.js b/tests/format/html/tags/jsfmt.spec.js deleted file mode 100644 index fb2a2d11b29c..000000000000 --- a/tests/format/html/tags/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["html"]); -run_spec(__dirname, ["html"], { printWidth: 1 }); -run_spec(__dirname, ["html"], { printWidth: Number.POSITIVE_INFINITY }); -run_spec(__dirname, ["html"], { htmlWhitespaceSensitivity: "strict" }); -run_spec(__dirname, ["html"], { htmlWhitespaceSensitivity: "ignore" }); diff --git a/tests/format/html/tags/marquee.html b/tests/format/html/tags/marquee.html new file mode 100644 index 000000000000..94e19d673cc2 --- /dev/null +++ b/tests/format/html/tags/marquee.html @@ -0,0 +1,12 @@ +<marquee>This text will scroll from right to left</marquee> + +<marquee direction="up">This text will scroll from bottom to top</marquee> + +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"> + <marquee behavior="alternate"> This text will bounce </marquee> +</marquee> diff --git a/tests/format/html/tags/menu.html b/tests/format/html/tags/menu.html new file mode 100644 index 000000000000..edd87a9fe110 --- /dev/null +++ b/tests/format/html/tags/menu.html @@ -0,0 +1,5 @@ +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> diff --git a/tests/format/html/tags/object-prototype-properties/__snapshots__/format.test.js.snap b/tests/format/html/tags/object-prototype-properties/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..01c2cf3ed961 --- /dev/null +++ b/tests/format/html/tags/object-prototype-properties/__snapshots__/format.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`object-prototype-properties.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<constructor>constructor</constructor> +<hasOwnProperty>hasOwnProperty</hasOwnProperty> +<isPrototypeOf>isPrototypeOf</isPrototypeOf> +<propertyIsEnumerable>propertyIsEnumerable</propertyIsEnumerable> +<toLocaleString>toLocaleString</toLocaleString> +<toString>toString</toString> +<valueOf>valueOf</valueOf> +<!-- <__defineGetter__>__defineGetter__</__defineGetter__> --> +<!-- <__defineSetter__>__defineSetter__</__defineSetter__> --> +<!-- <__lookupGetter__>__lookupGetter__</__lookupGetter__> --> +<!-- <__lookupSetter__>__lookupSetter__</__lookupSetter__> --> +<!-- <__proto__>__proto__</__proto__> --> + +=====================================output===================================== +<constructor>constructor</constructor> +<hasOwnProperty>hasOwnProperty</hasOwnProperty> +<isPrototypeOf>isPrototypeOf</isPrototypeOf> +<propertyIsEnumerable>propertyIsEnumerable</propertyIsEnumerable> +<toLocaleString>toLocaleString</toLocaleString> +<toString>toString</toString> +<valueOf>valueOf</valueOf> +<!-- <__defineGetter__>__defineGetter__</__defineGetter__> --> +<!-- <__defineSetter__>__defineSetter__</__defineSetter__> --> +<!-- <__lookupGetter__>__lookupGetter__</__lookupGetter__> --> +<!-- <__lookupSetter__>__lookupSetter__</__lookupSetter__> --> +<!-- <__proto__>__proto__</__proto__> --> + +================================================================================ +`; diff --git a/tests/format/html/tags/object-prototype-properties/format.test.js b/tests/format/html/tags/object-prototype-properties/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/tags/object-prototype-properties/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/tags/object-prototype-properties/object-prototype-properties.html b/tests/format/html/tags/object-prototype-properties/object-prototype-properties.html new file mode 100644 index 000000000000..f3855a49e7bc --- /dev/null +++ b/tests/format/html/tags/object-prototype-properties/object-prototype-properties.html @@ -0,0 +1,12 @@ +<constructor>constructor</constructor> +<hasOwnProperty>hasOwnProperty</hasOwnProperty> +<isPrototypeOf>isPrototypeOf</isPrototypeOf> +<propertyIsEnumerable>propertyIsEnumerable</propertyIsEnumerable> +<toLocaleString>toLocaleString</toLocaleString> +<toString>toString</toString> +<valueOf>valueOf</valueOf> +<!-- <__defineGetter__>__defineGetter__</__defineGetter__> --> +<!-- <__defineSetter__>__defineSetter__</__defineSetter__> --> +<!-- <__lookupGetter__>__lookupGetter__</__lookupGetter__> --> +<!-- <__lookupSetter__>__lookupSetter__</__lookupSetter__> --> +<!-- <__proto__>__proto__</__proto__> --> diff --git a/tests/format/html/tags/seach.html b/tests/format/html/tags/seach.html new file mode 100644 index 000000000000..fb21682974c2 --- /dev/null +++ b/tests/format/html/tags/seach.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<header> + <h1><a href="/">My fancy blog</a></h1> + ... + <search> + <form action="search.php"> + <label for="query">Find an article</label> + <input id="query" name="q" type="search"> + <button type="submit">Go!</button> + </form> + </search> + + <SEARCH></SEARCH> +</header> +</body> +</html> diff --git a/tests/format/html/text/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/text/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/text/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/text/__snapshots__/format.test.js.snap diff --git a/tests/format/html/text/format.test.js b/tests/format/html/text/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/text/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/text/jsfmt.spec.js b/tests/format/html/text/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/text/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/html/whitespace/__snapshots__/format.test.js.snap b/tests/format/html/whitespace/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d154af9ec512 --- /dev/null +++ b/tests/format/html/whitespace/__snapshots__/format.test.js.snap @@ -0,0 +1,667 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break-tags.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<a>Lorem</a>, ispum dolor sit <strong>amet</strong>. +<div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> +<div><div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div></div> + +=====================================output===================================== +<a>Lorem</a>, ispum dolor sit <strong>amet</strong>. +<div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> +<div> + <div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> +</div> + +================================================================================ +`; + +exports[`display-inline-block.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> +<button> +Click here! Click here! Click here! Click here! Click here! Click here! +</button> +<div> +<button>Click here! Click here! Click here! Click here! Click here! Click here!</button><button>Click here! Click here! Click here! Click here! Click here! Click here!</button> +</div> +<div> +<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> +<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> +</div> +<video src="brave.webm"><track kind=subtitles src=brave.en.vtt srclang=en label="English"><track kind=subtitles src=brave.en.vtt srclang=en label="English"></video> + +=====================================output===================================== +<button> + Click here! Click here! Click here! Click here! Click here! Click here! +</button> +<button> + Click here! Click here! Click here! Click here! Click here! Click here! +</button> +<div> + <button> + Click here! Click here! Click here! Click here! Click here! Click here!</button + ><button> + Click here! Click here! Click here! Click here! Click here! Click here! + </button> +</div> +<div> + <button> + Click here! Click here! Click here! Click here! Click here! Click here! + </button> + <button> + Click here! Click here! Click here! Click here! Click here! Click here! + </button> +</div> +<video src="brave.webm"> + <track kind="subtitles" src="brave.en.vtt" srclang="en" label="English" /> + <track kind="subtitles" src="brave.en.vtt" srclang="en" label="English" /> +</video> + +================================================================================ +`; + +exports[`display-none.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html><HTML CLASS="no-js mY-ClAsS"><HEAD><META CHARSET="utf-8"><TITLE>My tITlE</TITLE><META NAME="description" content="My CoNtEnT"></HEAD></HTML> + +=====================================output===================================== +<!doctype html> +<html class="no-js mY-ClAsS"> + <head> + <meta charset="utf-8" /> + <title>My tITlE</title> + <meta name="description" content="My CoNtEnT" /> + </head> +</html> + +================================================================================ +`; + +exports[`fill.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p> + <img + src="/images/pansies.jpg" + alt="about fedco bottom image" + style="float: left;" + /><strong>We are a cooperative</strong>, one of the few seed companies so organized + in the United States. Because we do not have an individual owner or beneficiary, + profit is not our primary goal. Consumers own 60% of the cooperative and worker + members 40%. Consumer and worker members share proportionately in the cooperative&#8217;s + profits through our annual patronage dividends. +</p> + +=====================================output===================================== +<p> + <img + src="/images/pansies.jpg" + alt="about fedco bottom image" + style="float: left" + /><strong>We are a cooperative</strong>, one of the few seed companies so + organized in the United States. Because we do not have an individual owner or + beneficiary, profit is not our primary goal. Consumers own 60% of the + cooperative and worker members 40%. Consumer and worker members share + proportionately in the cooperative&#8217;s profits through our annual + patronage dividends. +</p> + +================================================================================ +`; + +exports[`inline-leading-trailing-spaces.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span> 321 </span> + +<span> <a>321</a> </span> + +=====================================output===================================== +<span> 321 </span> + +<span> <a>321</a> </span> + +================================================================================ +`; + +exports[`inline-nodes.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue +vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim. +Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh. +Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui. +Sed eu scelerisque neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, vehicula +euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p> + +<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue +vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim. +Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh. +Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui. +Sed eu scelerisque neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus turpis, vehicula +euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per +conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p> + +=====================================output===================================== +<p> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa + vel augue vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet + urna consectetur dignissim. Sam vitae neque quis ex dapibus faucibus at sed + ligula. Nulla sit amet aliquet nibh. Vestibulum at congue mi. Suspendisse + vitae odio vitae massa hendrerit mattis sed eget dui. Sed eu scelerisque + neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, + vehicula euismod ante vel, ultricies eleifend dui. Class aptent taciti + sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec + in ornare velit. +</p> + +<p> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa + vel augue vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet + urna consectetur dignissim. Sam vitae neque quis ex dapibus faucibus at sed + ligula. Nulla sit amet aliquet nibh. Vestibulum at congue mi. Suspendisse + vitae odio vitae massa hendrerit mattis sed eget dui. Sed eu scelerisque + neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus + turpis, vehicula euismod ante vel, ultricies eleifend dui. Class aptent taciti + sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec + in ornare velit. +</p> + +================================================================================ +`; + +exports[`nested-inline-without-whitespace.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<a href="/wiki/Help:IPA/English" title="Help:IPA/English">/<span style="border-bottom:1px dotted"><span title="/ˌ/: secondary stress follows">ˌ</span +><span title="/ɪ/: &#39;i&#39; in &#39;kit&#39;">ɪ</span +><span title="&#39;l&#39; in &#39;lie&#39;">l</span +><span title="/ə/: &#39;a&#39; in &#39;about&#39;">ə</span +><span title="/ˈ/: primary stress follows">ˈ</span +><span title="&#39;n&#39; in &#39;nigh&#39;">n</span +><span title="/ɔɪ/: &#39;oi&#39; in &#39;choice&#39;">ɔɪ</span></span>/</a> + +<span class="word"><span class="syllable"><span class="letter vowel">i</span><span class="letter consonant">p</span></span +><span class="syllable"><span class="letter consonant onset">s</span><span class="letter vowel">u</span><span class="letter consonant">m</span></span></span> + +=====================================output===================================== +<a href="/wiki/Help:IPA/English" title="Help:IPA/English" + >/<span style="border-bottom: 1px dotted" + ><span title="/ˌ/: secondary stress follows">ˌ</span + ><span title="/ɪ/: &#39;i&#39; in &#39;kit&#39;">ɪ</span + ><span title="&#39;l&#39; in &#39;lie&#39;">l</span + ><span title="/ə/: &#39;a&#39; in &#39;about&#39;">ə</span + ><span title="/ˈ/: primary stress follows">ˈ</span + ><span title="&#39;n&#39; in &#39;nigh&#39;">n</span + ><span title="/ɔɪ/: &#39;oi&#39; in &#39;choice&#39;">ɔɪ</span></span + >/</a +> + +<span class="word" + ><span class="syllable" + ><span class="letter vowel">i</span + ><span class="letter consonant">p</span></span + ><span class="syllable" + ><span class="letter consonant onset">s</span + ><span class="letter vowel">u</span + ><span class="letter consonant">m</span></span + ></span +> + +================================================================================ +`; + +exports[`non-breaking-whitespace.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- normal whitespaces --> +<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span> +<!-- non-breaking whitespaces --> +<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span> +<!-- non-breaking narrow whitespaces --> +<span>Prix : 32 €</span> + +=====================================output===================================== +<!-- normal whitespaces --> +<span + >Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores + voluptas quaerat ut qui sunt vitae error.</span +> +<!-- non-breaking whitespaces --> +<span + >Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span +> +<!-- non-breaking narrow whitespaces --> +<span>Prix : 32 €</span> + +================================================================================ +`; + +exports[`snippet: #18 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> </div> +=====================================output===================================== +<div> </div> + +================================================================================ +`; + +exports[`snippet: #19 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>   </div> +=====================================output===================================== +<div> </div> + +================================================================================ +`; + +exports[`snippet: #20 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>    </div> +=====================================output===================================== +<div>  </div> + +================================================================================ +`; + +exports[`snippet: #21 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>     </div> +=====================================output===================================== +<div>   </div> + +================================================================================ +`; + +exports[`snippet: #22 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span> </span> +=====================================output===================================== +<span> </span> + +================================================================================ +`; + +exports[`snippet: #23 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span>   </span> +=====================================output===================================== +<span>   </span> + +================================================================================ +`; + +exports[`snippet: #24 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span>    </span> +=====================================output===================================== +<span>    </span> + +================================================================================ +`; + +exports[`snippet: #25 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span>     </span> +=====================================output===================================== +<span>     </span> + +================================================================================ +`; + +exports[`snippet: #26 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img/> <img/> +=====================================output===================================== +<img /> <img /> + +================================================================================ +`; + +exports[`snippet: #27 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img/>   <img/> +=====================================output===================================== +<img />   <img /> + +================================================================================ +`; + +exports[`snippet: #28 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img/>    <img/> +=====================================output===================================== +<img />    <img /> + +================================================================================ +`; + +exports[`snippet: #29 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img/>     <img/> +=====================================output===================================== +<img />     <img /> + +================================================================================ +`; + +exports[`snippet: #30 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<i />   |   <i /> +=====================================output===================================== +<i />   |   <i /> + +================================================================================ +`; + +exports[`snippet: #31 format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<p><span>X</span>   or   <span>Y</span></p><p>X   or   Y</p> +=====================================output===================================== +<p><span>X</span>   or   <span>Y</span></p> +<p>X   or   Y</p> + +================================================================================ +`; + +exports[`snippet: \`U+2005\` should format like \`U+005F\` not like \`U+0020\` format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- U+2005 --> +<div>before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> +<!-- U+005F --> +<div>before<span>_</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> +<!-- U+0020 --> +<div>before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> +=====================================output===================================== +<!-- U+2005 --> +<div> + before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter +</div> +<!-- U+005F --> +<div> + before<span>_</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter +</div> +<!-- U+0020 --> +<div> + before<span + > </span + >afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter +</div> + +================================================================================ +`; + +exports[`snippet: \`U+2005\` should indent like \`U+005F\` not like \`U+0020\` format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- U+2005 --> +<script type="text/unknown" lang="unknown"> +   // comment + // comment + // comment + // comment +</script> +<!-- U+005F --> +<script type="text/unknown" lang="unknown"> + _ // comment + // comment + // comment + // comment +</script> +<!-- U+0020 --> +<script type="text/unknown" lang="unknown"> + // comment + // comment + // comment + // comment +</script> +=====================================output===================================== +<!-- U+2005 --> +<script type="text/unknown" lang="unknown"> +   // comment + // comment + // comment + // comment +</script> +<!-- U+005F --> +<script type="text/unknown" lang="unknown"> + _ // comment + // comment + // comment + // comment +</script> +<!-- U+0020 --> +<script type="text/unknown" lang="unknown"> + // comment + // comment + // comment + // comment +</script> + +================================================================================ +`; + +exports[`surrounding-linebreak.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<span>123</span> +<span> +123</span> +<span>123 +</span> +<span> +123 +</span> + +<div>123</div> +<div> +123</div> +<div>123 +</div> +<div> +123 +</div> + +=====================================output===================================== +<span>123</span> +<span> 123</span> +<span>123 </span> +<span> 123 </span> + +<div>123</div> +<div>123</div> +<div>123</div> +<div>123</div> + +================================================================================ +`; + +exports[`table.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<table> + <thead> + <tr> + <th>A</th> + <th>B</th> + <th>C</th> + </tr> + </thead> +</table> + +<table><thead><tr><th>A</th><th>B</th><th>C</th></tr></thead></table> + +<table> <thead> <tr> <th> A </th> <th> B </th> <th> C </th> </tr> </thead> </table> + +<table> + <thead> + <tr> + </tr> + </thead> +</table> + +=====================================output===================================== +<table> + <thead> + <tr> + <th>A</th> + <th>B</th> + <th>C</th> + </tr> + </thead> +</table> + +<table> + <thead> + <tr> + <th>A</th> + <th>B</th> + <th>C</th> + </tr> + </thead> +</table> + +<table> + <thead> + <tr> + <th>A</th> + <th>B</th> + <th>C</th> + </tr> + </thead> +</table> + +<table> + <thead> + <tr></tr> + </thead> +</table> + +================================================================================ +`; + +exports[`template.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <template>foo</template> +</template> + +<template> + <template>foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</template> +</template> + +=====================================output===================================== +<template> + <template>foo</template> +</template> + +<template> + <template + >foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</template + > +</template> + +================================================================================ +`; diff --git a/tests/format/html/whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/whitespace/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b3baa2d63ff0..000000000000 --- a/tests/format/html/whitespace/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,667 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break-tags.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<a>Lorem</a>, ispum dolor sit <strong>amet</strong>. -<div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> -<div><div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div></div> - -=====================================output===================================== -<a>Lorem</a>, ispum dolor sit <strong>amet</strong>. -<div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> -<div> - <div><a>Lorem</a>, ispum dolor sit <strong>amet</strong>.</div> -</div> - -================================================================================ -`; - -exports[`display-inline-block.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> -<button> -Click here! Click here! Click here! Click here! Click here! Click here! -</button> -<div> -<button>Click here! Click here! Click here! Click here! Click here! Click here!</button><button>Click here! Click here! Click here! Click here! Click here! Click here!</button> -</div> -<div> -<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> -<button>Click here! Click here! Click here! Click here! Click here! Click here!</button> -</div> -<video src="brave.webm"><track kind=subtitles src=brave.en.vtt srclang=en label="English"><track kind=subtitles src=brave.en.vtt srclang=en label="English"></video> - -=====================================output===================================== -<button> - Click here! Click here! Click here! Click here! Click here! Click here! -</button> -<button> - Click here! Click here! Click here! Click here! Click here! Click here! -</button> -<div> - <button> - Click here! Click here! Click here! Click here! Click here! Click here!</button - ><button> - Click here! Click here! Click here! Click here! Click here! Click here! - </button> -</div> -<div> - <button> - Click here! Click here! Click here! Click here! Click here! Click here! - </button> - <button> - Click here! Click here! Click here! Click here! Click here! Click here! - </button> -</div> -<video src="brave.webm"> - <track kind="subtitles" src="brave.en.vtt" srclang="en" label="English" /> - <track kind="subtitles" src="brave.en.vtt" srclang="en" label="English" /> -</video> - -================================================================================ -`; - -exports[`display-none.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html><HTML CLASS="no-js mY-ClAsS"><HEAD><META CHARSET="utf-8"><TITLE>My tITlE</TITLE><META NAME="description" content="My CoNtEnT"></HEAD></HTML> - -=====================================output===================================== -<!DOCTYPE html> -<html class="no-js mY-ClAsS"> - <head> - <meta charset="utf-8" /> - <title>My tITlE</title> - <meta name="description" content="My CoNtEnT" /> - </head> -</html> - -================================================================================ -`; - -exports[`fill.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p> - <img - src="/images/pansies.jpg" - alt="about fedco bottom image" - style="float: left;" - /><strong>We are a cooperative</strong>, one of the few seed companies so organized - in the United States. Because we do not have an individual owner or beneficiary, - profit is not our primary goal. Consumers own 60% of the cooperative and worker - members 40%. Consumer and worker members share proportionately in the cooperative&#8217;s - profits through our annual patronage dividends. -</p> - -=====================================output===================================== -<p> - <img - src="/images/pansies.jpg" - alt="about fedco bottom image" - style="float: left" - /><strong>We are a cooperative</strong>, one of the few seed companies so - organized in the United States. Because we do not have an individual owner or - beneficiary, profit is not our primary goal. Consumers own 60% of the - cooperative and worker members 40%. Consumer and worker members share - proportionately in the cooperative&#8217;s profits through our annual - patronage dividends. -</p> - -================================================================================ -`; - -exports[`inline-leading-trailing-spaces.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span> 321 </span> - -<span> <a>321</a> </span> - -=====================================output===================================== -<span> 321 </span> - -<span> <a>321</a> </span> - -================================================================================ -`; - -exports[`inline-nodes.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue -vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim. -Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh. -Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui. -Sed eu scelerisque neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, vehicula -euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p> - -<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa vel augue -vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet urna consectetur dignissim. -Sam vitae neque quis ex dapibus faucibus at sed ligula. Nulla sit amet aliquet nibh. -Vestibulum at congue mi. Suspendisse vitae odio vitae massa hendrerit mattis sed eget dui. -Sed eu scelerisque neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus turpis, vehicula -euismod ante vel, ultricies eleifend dui. Class aptent taciti sociosqu ad litora torquent per -conubia nostra, per inceptos himenaeos. Donec in ornare velit.</p> - -=====================================output===================================== -<p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa - vel augue vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet - urna consectetur dignissim. Sam vitae neque quis ex dapibus faucibus at sed - ligula. Nulla sit amet aliquet nibh. Vestibulum at congue mi. Suspendisse - vitae odio vitae massa hendrerit mattis sed eget dui. Sed eu scelerisque - neque. Donec <b>maximus</b> rhoncus pellentesque. Aenean purus turpis, - vehicula euismod ante vel, ultricies eleifend dui. Class aptent taciti - sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec - in ornare velit. -</p> - -<p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus massa - vel augue vestibulum facilisis in porta turpis. Ut faucibus lectus sit amet - urna consectetur dignissim. Sam vitae neque quis ex dapibus faucibus at sed - ligula. Nulla sit amet aliquet nibh. Vestibulum at congue mi. Suspendisse - vitae odio vitae massa hendrerit mattis sed eget dui. Sed eu scelerisque - neque. Donec <a href="#"><b>maximus</b></a> rhoncus pellentesque. Aenean purus - turpis, vehicula euismod ante vel, ultricies eleifend dui. Class aptent taciti - sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec - in ornare velit. -</p> - -================================================================================ -`; - -exports[`nested-inline-without-whitespace.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<a href="/wiki/Help:IPA/English" title="Help:IPA/English">/<span style="border-bottom:1px dotted"><span title="/ˌ/: secondary stress follows">ˌ</span -><span title="/ɪ/: &#39;i&#39; in &#39;kit&#39;">ɪ</span -><span title="&#39;l&#39; in &#39;lie&#39;">l</span -><span title="/ə/: &#39;a&#39; in &#39;about&#39;">ə</span -><span title="/ˈ/: primary stress follows">ˈ</span -><span title="&#39;n&#39; in &#39;nigh&#39;">n</span -><span title="/ɔɪ/: &#39;oi&#39; in &#39;choice&#39;">ɔɪ</span></span>/</a> - -<span class="word"><span class="syllable"><span class="letter vowel">i</span><span class="letter consonant">p</span></span -><span class="syllable"><span class="letter consonant onset">s</span><span class="letter vowel">u</span><span class="letter consonant">m</span></span></span> - -=====================================output===================================== -<a href="/wiki/Help:IPA/English" title="Help:IPA/English" - >/<span style="border-bottom: 1px dotted" - ><span title="/ˌ/: secondary stress follows">ˌ</span - ><span title="/ɪ/: &#39;i&#39; in &#39;kit&#39;">ɪ</span - ><span title="&#39;l&#39; in &#39;lie&#39;">l</span - ><span title="/ə/: &#39;a&#39; in &#39;about&#39;">ə</span - ><span title="/ˈ/: primary stress follows">ˈ</span - ><span title="&#39;n&#39; in &#39;nigh&#39;">n</span - ><span title="/ɔɪ/: &#39;oi&#39; in &#39;choice&#39;">ɔɪ</span></span - >/</a -> - -<span class="word" - ><span class="syllable" - ><span class="letter vowel">i</span - ><span class="letter consonant">p</span></span - ><span class="syllable" - ><span class="letter consonant onset">s</span - ><span class="letter vowel">u</span - ><span class="letter consonant">m</span></span - ></span -> - -================================================================================ -`; - -exports[`non-breaking-whitespace.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- normal whitespaces --> -<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span> -<!-- non-breaking whitespaces --> -<span>Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span> -<!-- non-breaking narrow whitespaces --> -<span>Prix : 32 €</span> - -=====================================output===================================== -<!-- normal whitespaces --> -<span - >Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores - voluptas quaerat ut qui sunt vitae error.</span -> -<!-- non-breaking whitespaces --> -<span - >Nihil aut odit omnis. Quam maxime est molestiae. Maxime dolorem dolores voluptas quaerat ut qui sunt vitae error.</span -> -<!-- non-breaking narrow whitespaces --> -<span>Prix : 32 €</span> - -================================================================================ -`; - -exports[`snippet: #18 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> </div> -=====================================output===================================== -<div> </div> - -================================================================================ -`; - -exports[`snippet: #19 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>   </div> -=====================================output===================================== -<div> </div> - -================================================================================ -`; - -exports[`snippet: #20 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>    </div> -=====================================output===================================== -<div>  </div> - -================================================================================ -`; - -exports[`snippet: #21 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>     </div> -=====================================output===================================== -<div>   </div> - -================================================================================ -`; - -exports[`snippet: #22 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span> </span> -=====================================output===================================== -<span> </span> - -================================================================================ -`; - -exports[`snippet: #23 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span>   </span> -=====================================output===================================== -<span>   </span> - -================================================================================ -`; - -exports[`snippet: #24 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span>    </span> -=====================================output===================================== -<span>    </span> - -================================================================================ -`; - -exports[`snippet: #25 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span>     </span> -=====================================output===================================== -<span>     </span> - -================================================================================ -`; - -exports[`snippet: #26 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<img/> <img/> -=====================================output===================================== -<img /> <img /> - -================================================================================ -`; - -exports[`snippet: #27 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<img/>   <img/> -=====================================output===================================== -<img />   <img /> - -================================================================================ -`; - -exports[`snippet: #28 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<img/>    <img/> -=====================================output===================================== -<img />    <img /> - -================================================================================ -`; - -exports[`snippet: #29 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<img/>     <img/> -=====================================output===================================== -<img />     <img /> - -================================================================================ -`; - -exports[`snippet: #30 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i />   |   <i /> -=====================================output===================================== -<i />   |   <i /> - -================================================================================ -`; - -exports[`snippet: #31 format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<p><span>X</span>   or   <span>Y</span></p><p>X   or   Y</p> -=====================================output===================================== -<p><span>X</span>   or   <span>Y</span></p> -<p>X   or   Y</p> - -================================================================================ -`; - -exports[`snippet: \`U+2005\` should format like \`U+005F\` not like \`U+0020\` format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- U+2005 --> -<div>before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> -<!-- U+005F --> -<div>before<span>_</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> -<!-- U+0020 --> -<div>before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> -=====================================output===================================== -<!-- U+2005 --> -<div> - before<span> </span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter -</div> -<!-- U+005F --> -<div> - before<span>_</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter -</div> -<!-- U+0020 --> -<div> - before<span - > </span - >afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter -</div> - -================================================================================ -`; - -exports[`snippet: \`U+2005\` should indent like \`U+005F\` not like \`U+0020\` format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- U+2005 --> -<script type="text/unknown" lang="unknown"> -   // comment - // comment - // comment - // comment -</script> -<!-- U+005F --> -<script type="text/unknown" lang="unknown"> - _ // comment - // comment - // comment - // comment -</script> -<!-- U+0020 --> -<script type="text/unknown" lang="unknown"> - // comment - // comment - // comment - // comment -</script> -=====================================output===================================== -<!-- U+2005 --> -<script type="text/unknown" lang="unknown"> -   // comment - // comment - // comment - // comment -</script> -<!-- U+005F --> -<script type="text/unknown" lang="unknown"> - _ // comment - // comment - // comment - // comment -</script> -<!-- U+0020 --> -<script type="text/unknown" lang="unknown"> - // comment - // comment - // comment - // comment -</script> - -================================================================================ -`; - -exports[`surrounding-linebreak.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<span>123</span> -<span> -123</span> -<span>123 -</span> -<span> -123 -</span> - -<div>123</div> -<div> -123</div> -<div>123 -</div> -<div> -123 -</div> - -=====================================output===================================== -<span>123</span> -<span> 123</span> -<span>123 </span> -<span> 123 </span> - -<div>123</div> -<div>123</div> -<div>123</div> -<div>123</div> - -================================================================================ -`; - -exports[`table.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<table> - <thead> - <tr> - <th>A</th> - <th>B</th> - <th>C</th> - </tr> - </thead> -</table> - -<table><thead><tr><th>A</th><th>B</th><th>C</th></tr></thead></table> - -<table> <thead> <tr> <th> A </th> <th> B </th> <th> C </th> </tr> </thead> </table> - -<table> - <thead> - <tr> - </tr> - </thead> -</table> - -=====================================output===================================== -<table> - <thead> - <tr> - <th>A</th> - <th>B</th> - <th>C</th> - </tr> - </thead> -</table> - -<table> - <thead> - <tr> - <th>A</th> - <th>B</th> - <th>C</th> - </tr> - </thead> -</table> - -<table> - <thead> - <tr> - <th>A</th> - <th>B</th> - <th>C</th> - </tr> - </thead> -</table> - -<table> - <thead> - <tr></tr> - </thead> -</table> - -================================================================================ -`; - -exports[`template.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <template>foo</template> -</template> - -<template> - <template>foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</template> -</template> - -=====================================output===================================== -<template> - <template>foo</template> -</template> - -<template> - <template - >foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo</template - > -</template> - -================================================================================ -`; diff --git a/tests/format/html/whitespace/format.test.js b/tests/format/html/whitespace/format.test.js new file mode 100644 index 000000000000..8281e6de7786 --- /dev/null +++ b/tests/format/html/whitespace/format.test.js @@ -0,0 +1,130 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + ...[ + // https://developer.mozilla.org/en-US/docs/Glossary/Whitespace#In_HTML + // single + "\u0009", + "\u000A", + "\u000C", + "\u000D", + "\u0020", + + // many + "\u0009\u000A\u000C\u000D\u0020", + ].map((textContent) => ({ + code: `<div>${textContent}</div>`, + name: "should be empty", + output: "<div></div>\n", + })), + + ...[ + // single + "\u0009", + "\u000A", + "\u000C", + "\u000D", + "\u0020", + + // many + "\u0009\u000A\u000C\u000D\u0020", + ].map((textContent) => ({ + code: `<span>${textContent}</span>`, + name: "should keep one space", + output: "<span> </span>\n", + })), + + ...[ + // single + "\u0009", + "\u000A", + "\u000C", + "\u000D", + "\u0020", + ].map((textContent) => ({ + code: `<img/>${textContent}<img/>`, + name: "between", + output: "<img /> <img />\n", + })), + + { + code: "<img/>\u0009\u000A\u000C\u000D\u0020<img/>", + output: "<img />\n\n<img />\n", + }, + + // non-space + ...[ + "\u2005", + " \u2005 ", + " \u2005\u2005 ", + " \u2005 \u2005 ", + ].map((textContent) => `<div>${textContent}</div>`), + + ...[ + "\u2005", + " \u2005 ", + " \u2005\u2005 ", + " \u2005 \u2005 ", + ].map((textContent) => `<span>${textContent}</span>`), + + ...[ + "\u2005", + " \u2005 ", + " \u2005\u2005 ", + " \u2005 \u2005 ", + ].map((textContent) => `<img/>${textContent}<img/>`), + + // #7103 minimal reproduction + "<i /> \u2005 | \u2005 <i />", + + // #7103 + "<p><span>X</span> \u2005 or \u2005 <span>Y</span></p><p>X \u2005 or \u2005 Y</p>", + + // This test maybe not good, `U+2005` there don't make sense, + // but the node has to be `whitespaceSensitive` and `indentationSensitive`, + // to make the `whitespace check logic` work. + { + name: "`U+2005` should indent like `U+005F` not like `U+0020`", + code: outdent` + <!-- U+2005 --> + <script type="text/unknown" lang="unknown"> + \u2005 // comment + // comment + // comment + // comment + </script> + <!-- U+005F --> + <script type="text/unknown" lang="unknown"> + \u005F // comment + // comment + // comment + // comment + </script> + <!-- U+0020 --> + <script type="text/unknown" lang="unknown"> + \u0020 // comment + // comment + // comment + // comment + </script> + `, + }, + + { + name: "`U+2005` should format like `U+005F` not like `U+0020`", + code: outdent` + <!-- U+2005 --> + <div>before<span>\u2005</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> + <!-- U+005F --> + <div>before<span>\u005F</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> + <!-- U+0020 --> + <div>before<span>\u0020</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> + `, + }, + ], + }, + ["html"], +); diff --git a/tests/format/html/whitespace/jsfmt.spec.js b/tests/format/html/whitespace/jsfmt.spec.js deleted file mode 100644 index 2f87f77405d7..000000000000 --- a/tests/format/html/whitespace/jsfmt.spec.js +++ /dev/null @@ -1,130 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - ...[ - // https://developer.mozilla.org/en-US/docs/Glossary/Whitespace#In_HTML - // single - "\u0009", - "\u000A", - "\u000C", - "\u000D", - "\u0020", - - // many - "\u0009\u000A\u000C\u000D\u0020", - ].map((textContent) => ({ - code: `<div>${textContent}</div>`, - name: "should be empty", - output: "<div></div>\n", - })), - - ...[ - // single - "\u0009", - "\u000A", - "\u000C", - "\u000D", - "\u0020", - - // many - "\u0009\u000A\u000C\u000D\u0020", - ].map((textContent) => ({ - code: `<span>${textContent}</span>`, - name: "should keep one space", - output: "<span> </span>\n", - })), - - ...[ - // single - "\u0009", - "\u000A", - "\u000C", - "\u000D", - "\u0020", - ].map((textContent) => ({ - code: `<img/>${textContent}<img/>`, - name: "between", - output: "<img /> <img />\n", - })), - - { - code: "<img/>\u0009\u000A\u000C\u000D\u0020<img/>", - output: "<img />\n\n<img />\n", - }, - - // non-space - ...[ - "\u2005", - " \u2005 ", - " \u2005\u2005 ", - " \u2005 \u2005 ", - ].map((textContent) => `<div>${textContent}</div>`), - - ...[ - "\u2005", - " \u2005 ", - " \u2005\u2005 ", - " \u2005 \u2005 ", - ].map((textContent) => `<span>${textContent}</span>`), - - ...[ - "\u2005", - " \u2005 ", - " \u2005\u2005 ", - " \u2005 \u2005 ", - ].map((textContent) => `<img/>${textContent}<img/>`), - - // #7103 minimal reproduction - "<i /> \u2005 | \u2005 <i />", - - // #7103 - "<p><span>X</span> \u2005 or \u2005 <span>Y</span></p><p>X \u2005 or \u2005 Y</p>", - - // This test maybe not good, `U+2005` there don't make sense, - // but the node has to be `whitespaceSensitive` and `indentationSensitive`, - // to make the `whitespace check logic` work. - { - name: "`U+2005` should indent like `U+005F` not like `U+0020`", - code: outdent` - <!-- U+2005 --> - <script type="text/unknown" lang="unknown"> - \u2005 // comment - // comment - // comment - // comment - </script> - <!-- U+005F --> - <script type="text/unknown" lang="unknown"> - \u005F // comment - // comment - // comment - // comment - </script> - <!-- U+0020 --> - <script type="text/unknown" lang="unknown"> - \u0020 // comment - // comment - // comment - // comment - </script> - `, - }, - - { - name: "`U+2005` should format like `U+005F` not like `U+0020`", - code: outdent` - <!-- U+2005 --> - <div>before<span>\u2005</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> - <!-- U+005F --> - <div>before<span>\u005F</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> - <!-- U+0020 --> - <div>before<span>\u0020</span>afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter</div> - `, - }, - ], - }, - ["html"] -); diff --git a/tests/format/html/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/yaml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/html/yaml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/html/yaml/__snapshots__/format.test.js.snap diff --git a/tests/format/html/yaml/format.test.js b/tests/format/html/yaml/format.test.js new file mode 100644 index 000000000000..88a427864598 --- /dev/null +++ b/tests/format/html/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"]); diff --git a/tests/format/html/yaml/jsfmt.spec.js b/tests/format/html/yaml/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/html/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/js/array-spread/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/array-spread/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/array-spread/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/array-spread/__snapshots__/format.test.js.snap diff --git a/tests/format/js/array-spread/format.test.js b/tests/format/js/array-spread/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/array-spread/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/array-spread/jsfmt.spec.js b/tests/format/js/array-spread/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/array-spread/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/arrays/__snapshots__/format.test.js.snap b/tests/format/js/arrays/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7ef86cea08e6 --- /dev/null +++ b/tests/format/js/arrays/__snapshots__/format.test.js.snap @@ -0,0 +1,1035 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-tuple.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = [ + [1,2], + [1,2], +] + +a = [ + {a, b}, + {a, b}, +] + +=====================================output===================================== +a = [ + [1, 2], + [1, 2], +]; + +a = [ + { a, b }, + { a, b }, +]; + +================================================================================ +`; + +exports[`empty.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || []; +const b = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {}; + +=====================================output===================================== +const a = + someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || []; +const b = + someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {}; + +================================================================================ +`; + +exports[`holes-in-args.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new Test() + .test() + .test([, 0]) + .test(); + +=====================================output===================================== +new Test().test().test([, 0]).test(); + +================================================================================ +`; + +exports[`issue-10159.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{for (const srcPath of [src, \`\${src}.js\`, \`\${src}/index\`, \`\${src}/index.js\`]) {}} +{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_43]) {}} +{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_432]) {}} +{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_4321]) {}} + +=====================================output===================================== +{ + for (const srcPath of [src, \`\${src}.js\`, \`\${src}/index\`, \`\${src}/index.js\`]) { + } +} +{ + for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_43]) { + } +} +{ + for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_432]) { + } +} +{ + for (const srcPath of [ + 123, 123_123_123, 123_123_123_1, 13_123_3123_31_4321, + ]) { + } +} + +================================================================================ +`; + +exports[`last.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[,]; +[,,]; +[,,1,]; +[,,1,1]; + +=====================================output===================================== +[,]; +[, ,]; +[, , 1]; +[, , 1, 1]; + +================================================================================ +`; + +exports[`nested.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[[]]; +[[], []]; +[[], [], []]; +[[], [0], []]; +[[], [0], [0]]; +[[], [0, 1], [0]]; +[[], [0, 1], [0, 1]]; +[[0]]; +[[0], []]; +[[0], [], []]; +[[0], [0], []]; +[[0], [0], [0]]; +[[0], [0, 1], [0]]; +[[0], [0, 1], [0, 1]]; +[[0, 1]]; +[[0, 1], []]; +[[0, 1], [], []]; +[[0, 1], [0], []]; +[[0, 1], [0], [0]]; +[[0, 1], [0, 1], [0]]; +[[0, 1], [0, 1], [0, 1]]; +[[], [1, 2, 3]]; +[[1], [1]]; +[[1, 2], [1, 2, 3]]; +[[1, 0], [1, 0]]; +[{}]; +[{}, {}]; +[{}, {}, {}]; +[{}, { a }]; +[{}, { a, b }]; +[{}, { a, b, c }]; +[{ a }]; +[{ a }, { a }]; +[{ a }, { a }, { a }]; +[{ a }, { a, b }]; +[{ a }, { a, b, c}]; +[{ a, b }]; +[{ a, b }, { a }]; +[{ a, b }, { a }, { a }]; +[{ a, b }, { a, b }]; +[{ a, b }, { a, b, c }]; + +=====================================output===================================== +[[]]; +[[], []]; +[[], [], []]; +[[], [0], []]; +[[], [0], [0]]; +[[], [0, 1], [0]]; +[[], [0, 1], [0, 1]]; +[[0]]; +[[0], []]; +[[0], [], []]; +[[0], [0], []]; +[[0], [0], [0]]; +[[0], [0, 1], [0]]; +[[0], [0, 1], [0, 1]]; +[[0, 1]]; +[[0, 1], []]; +[[0, 1], [], []]; +[[0, 1], [0], []]; +[[0, 1], [0], [0]]; +[[0, 1], [0, 1], [0]]; +[ + [0, 1], + [0, 1], + [0, 1], +]; +[[], [1, 2, 3]]; +[[1], [1]]; +[ + [1, 2], + [1, 2, 3], +]; +[ + [1, 0], + [1, 0], +]; +[{}]; +[{}, {}]; +[{}, {}, {}]; +[{}, { a }]; +[{}, { a, b }]; +[{}, { a, b, c }]; +[{ a }]; +[{ a }, { a }]; +[{ a }, { a }, { a }]; +[{ a }, { a, b }]; +[{ a }, { a, b, c }]; +[{ a, b }]; +[{ a, b }, { a }]; +[{ a, b }, { a }, { a }]; +[ + { a, b }, + { a, b }, +]; +[ + { a, b }, + { a, b, c }, +]; + +================================================================================ +`; + +exports[`numbers-in-args.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +expect(bifornCringerMoshedPerplexSawder.getArrayOfNumbers()).toEqual( + [1, 2, 3, 4, 5] +); + +expect(bifornCringerMoshedPerplexSawder.getLongArrayOfNumbers()).toEqual( + [ + 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, + 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, + 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, + 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, + 48,78,97 + ] +); + +=====================================output===================================== +expect(bifornCringerMoshedPerplexSawder.getArrayOfNumbers()).toEqual([ + 1, 2, 3, 4, 5, +]); + +expect(bifornCringerMoshedPerplexSawder.getLongArrayOfNumbers()).toEqual([ + 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, + 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, 33, + 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, 91, 27, + 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, 31, 86, + 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, 35, 48, + 78, 97, +]); + +================================================================================ +`; + +exports[`numbers-in-assignment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers = [ + 1, + 2, + 3, + 4, + 5 +]; + +bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers2 = [ + 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, + 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, + 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, + 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, + 48,78,97 +]; + +=====================================output===================================== +bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers = [ + 1, 2, 3, 4, 5, +]; + +bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers2 = [ + 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, + 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, 33, + 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, 91, 27, + 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, 31, 86, + 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, 35, 48, + 78, 97, +]; + +================================================================================ +`; + +exports[`numbers-negative.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const numbers1 = [-2017,-506252,-744011292,-7224,-70.4,-83353.6,-708.4,-174023963.52,-40385, +// comment1 +-380014, +-253951682,-728,-15.84,-2058467564.56,-43,-33,-85134845,-67092,-1,-78820379,-2371.6,-16,7, +// comment2 +-62454,-4282239912, +-10816495.36,0.88,-100622682,8.8,-67087.68000000001,-3758276,-25.5211,-54,-1184265243,-46073628,-280423.44, +-41833463,-27961.12,-305.36,-199875.28]; + +const numbers2 = [-234, -342 // comment3 +, -223, -333333.33,12345] + +=====================================output===================================== +const numbers1 = [ + -2017, -506252, -744011292, -7224, -70.4, -83353.6, -708.4, -174023963.52, + -40385, + // comment1 + -380014, -253951682, -728, -15.84, -2058467564.56, -43, -33, -85134845, + -67092, -1, -78820379, -2371.6, -16, 7, + // comment2 + -62454, -4282239912, -10816495.36, 0.88, -100622682, 8.8, -67087.68000000001, + -3758276, -25.5211, -54, -1184265243, -46073628, -280423.44, -41833463, + -27961.12, -305.36, -199875.28, +]; + +const numbers2 = [ + -234, + -342, // comment3 + -223, + -333333.33, + 12345, +]; + +================================================================================ +`; + +exports[`numbers-negative-comment-after-minus.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const numbers = [-2017,-506252,-744011292,-7224,-70.4,-83353.6,-708.4,-174023963.52,-40385,-// comment1 +380014, +-253951682,-728,-15.84,-2058467564.56,-43,-33,-85134845,-67092,-1,-78820379,-2371.6,-16,7, +// comment2 +-62454,-4282239912, +-10816495.36,0.88,-100622682,8.8,-67087.68000000001,-3758276,-25.5211,-54,-1184265243,-46073628,-280423.44, +-41833463,-27961.12,-305.36,-199875.28]; + +c = [ + - /**/ 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, 223323 +]; + +=====================================output===================================== +const numbers = [ + -2017, + -506252, + -744011292, + -7224, + -70.4, + -83353.6, + -708.4, + -174023963.52, + -40385, + -( + // comment1 + 380014 + ), + -253951682, + -728, + -15.84, + -2058467564.56, + -43, + -33, + -85134845, + -67092, + -1, + -78820379, + -2371.6, + -16, + 7, + // comment2 + -62454, + -4282239912, + -10816495.36, + 0.88, + -100622682, + 8.8, + -67087.68000000001, + -3758276, + -25.5211, + -54, + -1184265243, + -46073628, + -280423.44, + -41833463, + -27961.12, + -305.36, + -199875.28, +]; + +c = [ + -(/**/ 66), + 66, + 57, + 45, + 47, + 33, + 53, + 82, + 81, + 76, + 66, + 57, + 45, + 47, + 33, + 53, + 82, + 81, + 223323, +]; + +================================================================================ +`; + +exports[`numbers-trailing-comma.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// --------------- print-width ------------------------------------------------- +c = [ + 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, 223323, +]; + +=====================================output===================================== +// --------------- print-width ------------------------------------------------- +c = [ + 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, + 223323, +]; + +================================================================================ +`; + +exports[`numbers-with-holes.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const numberWithHoles1 = [ + 7234932941, + 7234932722, + 7234932312, + // comment before a hole 1 + , + 7234932841, + , + 7234932843, + , + // comment after a hole 1 + 7234932436, +]; + +const numberWithHoles2 = [ + 0x234932941, + 0x234932722, + 0x234932312, + + // comment before a hole 2 + , + 0x234932841, + , + 0x234932843, + , + + // comment after a hole 2 + 0x234932436, +]; + +=====================================output===================================== +const numberWithHoles1 = [ + 7234932941, + 7234932722, + 7234932312, + , + // comment before a hole 1 + 7234932841, + , + 7234932843, + , + // comment after a hole 1 + 7234932436, +]; + +const numberWithHoles2 = [ + 0x234932941, + 0x234932722, + 0x234932312, + + , + // comment before a hole 2 + 0x234932841, + , + 0x234932843, + , + // comment after a hole 2 + 0x234932436, +]; + +================================================================================ +`; + +exports[`numbers-with-trailing-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function isUnusedDiagnostic(code) { + return [ + 6133, // '{0}' is declared but never used. + 6138, // Property '{0}' is declared but its value is never read. + 6192, // All imports in import declaration are unused. + 6196, // '{0}' is declared but its value is never read. + 6198, + 6199, + 6205, // All type parameters are unused. + ].includes(code); +} + +=====================================output===================================== +function isUnusedDiagnostic(code) { + return [ + 6133, // '{0}' is declared but never used. + 6138, // Property '{0}' is declared but its value is never read. + 6192, // All imports in import declaration are unused. + 6196, // '{0}' is declared but its value is never read. + 6198, + 6199, + 6205, // All type parameters are unused. + ].includes(code); +} + +================================================================================ +`; + +exports[`numbers-with-tricky-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const lazyCatererNumbers = [1, 2, 4, 7, 11, 16, 22, 29, 37, 46, +56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466, /*block*/ +// line +497, 529, 562, 596, 631, 667, 704, 742, 781, +821, 862, 904, 947, 991, 1036, 1082, 1129, 1177, 1226, +// line 2 +1276, 1327, 1379]; + +=====================================output===================================== +const lazyCatererNumbers = [ + 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, + 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466 /*block*/, + // line + 497, 529, 562, 596, 631, 667, 704, 742, 781, 821, 862, 904, 947, 991, 1036, + 1082, 1129, 1177, 1226, + // line 2 + 1276, 1327, 1379, +]; + +================================================================================ +`; + +exports[`numbers1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const numbers1 = [ + 7234932941, + 7234932722, + 7234932312, + 7234932933, + 7234932841, + 7234932166, + 7234932843, + 7234932978, + 7234932436, + 7234932687, + 7234932269, + 7234932573, + 7234932913, + 7234932873, + 7234932748, + 7234932354, + 7234932153, + 7234932181, + 7234932947, + 7234932563, + 7234932324, + 7234932952, + 7234932885, + 7234932911, + 7234932698, + 7234932248, + 7234932764, + 7234932431, + 7234932811, + 7234932344, + 7234932855, + 7234932430, + 7234932396, + 7234932981, + 7234932594, + 7234932131, + 7234932489, + 7234932552, + 7234932116, + 7234932833, + 7234932521, + 7234932252, + 7234932503, + 7234932540, + 7234932893, + 7234932736, + 7234932969, + 7234932145, + 7234932925, + 7234932417, + 7234932344, + 7234932108, + 7234932161, + 7234932777, + 7234932971, + 7234932159, + 7234932158, + 7234932908, + 7234932511, + 7234932876, + 7234932768, + 7234932284, + 7234932640, + 7234932309, + 7234932651, + 7234932292, + 7234932898, + 7234932284, + 7234932201, + 7234932506, + 7234932654, + 7234932840, + 7234932334, + 7234932246, + 7234932376, + 7234932398, + 7234932714, + 7234932134, + 7234932435, + 7234932181, + 7234932980, + 7234932594, + 7234932396, + 7234932100, + 7234932743, + 7234932812, + 7234932583, + 7234932622, + 7234932800, + 7234932310, + 7234932111, + 7234932537, + 7234932751, + 7234932920, + 7234932872, + 7234932700, + 7234932702, + 7234932655, + 7234932515, + 7234932298 +]; + +=====================================output===================================== +const numbers1 = [ + 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, + 7234932843, 7234932978, 7234932436, 7234932687, 7234932269, 7234932573, + 7234932913, 7234932873, 7234932748, 7234932354, 7234932153, 7234932181, + 7234932947, 7234932563, 7234932324, 7234932952, 7234932885, 7234932911, + 7234932698, 7234932248, 7234932764, 7234932431, 7234932811, 7234932344, + 7234932855, 7234932430, 7234932396, 7234932981, 7234932594, 7234932131, + 7234932489, 7234932552, 7234932116, 7234932833, 7234932521, 7234932252, + 7234932503, 7234932540, 7234932893, 7234932736, 7234932969, 7234932145, + 7234932925, 7234932417, 7234932344, 7234932108, 7234932161, 7234932777, + 7234932971, 7234932159, 7234932158, 7234932908, 7234932511, 7234932876, + 7234932768, 7234932284, 7234932640, 7234932309, 7234932651, 7234932292, + 7234932898, 7234932284, 7234932201, 7234932506, 7234932654, 7234932840, + 7234932334, 7234932246, 7234932376, 7234932398, 7234932714, 7234932134, + 7234932435, 7234932181, 7234932980, 7234932594, 7234932396, 7234932100, + 7234932743, 7234932812, 7234932583, 7234932622, 7234932800, 7234932310, + 7234932111, 7234932537, 7234932751, 7234932920, 7234932872, 7234932700, + 7234932702, 7234932655, 7234932515, 7234932298, +]; + +================================================================================ +`; + +exports[`numbers2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const userIds1 = [ + 7234932941, + 7234932722, + 7234932312, + 7234932933, +]; + +const userIds2 = [ + 7234932941, + 7234932722, + 7234932312, + 7234932933, + 7234932841, + 7234932166, + 7234932843, + 7234932978, + 7234932436, +]; + +const userIds3 = [ + 7234932941, + 7234932722, + 7234932312, + 7234932933, + 7234932841, + 7234932166, + 7234932843, + + 7234932978, + 7234932436, +]; + +const userIds4 = [ + 7234932941, + 7234932722, + 7234932312, + 7234932933, + 7234932841, + 7234932166, + // comment 1 + 7234932843, + + 7234932978, + + // comment 2 + 7234932436, + // comment 3 +]; + + +=====================================output===================================== +const userIds1 = [7234932941, 7234932722, 7234932312, 7234932933]; + +const userIds2 = [ + 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, + 7234932843, 7234932978, 7234932436, +]; + +const userIds3 = [ + 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, + 7234932843, + + 7234932978, 7234932436, +]; + +const userIds4 = [ + 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, + // comment 1 + 7234932843, + + 7234932978, + + // comment 2 + 7234932436, + // comment 3 +]; + +================================================================================ +`; + +exports[`numbers3.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let test_case = [ + [ + 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, + 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, + 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, + 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, + 48,78,97 + ], + [ + 41,83,31,62,15,70,10,90,/*21,*/48,39,76,14,48,63,62,16,17,61,97,86,80,34,27, + 39,53,90,80,56,71,31,22,29,7,71,90,65,17,48,85,14,94,16,32,4,96,49,97, + 53,87,54,2,78,37,21,3,97,62,93,62,11,27,14,29,64,44,11,5,39,43,94,52,0, + 4,86,58,63,42,97,54,2,1,53,17,92,79,52,47,81,93,34,17,93,20,61,68,58,49, + 27,45 + ] +]; + +=====================================output===================================== +let test_case = [ + [ + 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, + 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, + 33, 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, + 91, 27, 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, + 31, 86, 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, + 35, 48, 78, 97, + ], + [ + 41, 83, 31, 62, 15, 70, 10, 90, /*21,*/ 48, 39, 76, 14, 48, 63, 62, 16, 17, + 61, 97, 86, 80, 34, 27, 39, 53, 90, 80, 56, 71, 31, 22, 29, 7, 71, 90, 65, + 17, 48, 85, 14, 94, 16, 32, 4, 96, 49, 97, 53, 87, 54, 2, 78, 37, 21, 3, 97, + 62, 93, 62, 11, 27, 14, 29, 64, 44, 11, 5, 39, 43, 94, 52, 0, 4, 86, 58, 63, + 42, 97, 54, 2, 1, 53, 17, 92, 79, 52, 47, 81, 93, 34, 17, 93, 20, 61, 68, + 58, 49, 27, 45, + ], +]; + +================================================================================ +`; + +exports[`preserve_empty_lines.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = [ + + 1, + 2, + + 3, + + + 4, + + +] + +b = [ + 100, + + (200) + , + + 300 + , + + 1 + , + 2, 3 +] + +c = [ + "apple", + "banana", + "blueberry", + + "red", + "blue" + , + "yellow", + + "broccoli", + "celery", + "lettuce" + , + + "green" + , + "green", + "green", + + //an egg + "egg", + //a bigger egg + "big egg" + //the biggest egg + , + "huge egg" + , + + //not an egg + "lasagna" + +] + +_ = [ + a, + + b // +] + +_ = [ + (a), + + b, // +]; + +_ = [ + ((((( + a = b/* comment */))/* comment */))), + + c // +] + +_ = [ + ((((( + (a = b)/* comment */))/* comment */))), + + c // +] + +_ = [ + (a=b + + ), + b, // +]; + +=====================================output===================================== +a = [ + 1, 2, + + 3, + + 4, +]; + +b = [ + 100, + + 200, + + 300, + + 1, 2, 3, +]; + +c = [ + "apple", + "banana", + "blueberry", + + "red", + "blue", + "yellow", + + "broccoli", + "celery", + "lettuce", + + "green", + "green", + "green", + + //an egg + "egg", + //a bigger egg + "big egg", + //the biggest egg + "huge egg", + + //not an egg + "lasagna", +]; + +_ = [ + a, + + b, // +]; + +_ = [ + a, + + b, // +]; + +_ = [ + (a = b) /* comment */ /* comment */, + + c, // +]; + +_ = [ + (a = b) /* comment */ /* comment */, + + c, // +]; + +_ = [ + (a = b), + b, // +]; + +================================================================================ +`; diff --git a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c1d523ae81c2..000000000000 --- a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,857 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || []; -const b = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {}; - -=====================================output===================================== -const a = - someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || []; -const b = - someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {}; - -================================================================================ -`; - -exports[`holes-in-args.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new Test() - .test() - .test([, 0]) - .test(); - -=====================================output===================================== -new Test().test().test([, 0]).test(); - -================================================================================ -`; - -exports[`issue-10159.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -{for (const srcPath of [src, \`\${src}.js\`, \`\${src}/index\`, \`\${src}/index.js\`]) {}} -{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_43]) {}} -{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_432]) {}} -{for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_4321]) {}} - -=====================================output===================================== -{ - for (const srcPath of [src, \`\${src}.js\`, \`\${src}/index\`, \`\${src}/index.js\`]) { - } -} -{ - for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_43]) { - } -} -{ - for (const srcPath of [123, 123_123_123, 123_123_123_1, 13_123_3123_31_432]) { - } -} -{ - for (const srcPath of [ - 123, 123_123_123, 123_123_123_1, 13_123_3123_31_4321, - ]) { - } -} - -================================================================================ -`; - -exports[`last.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -[,]; -[,,]; -[,,1,]; -[,,1,1]; - -=====================================output===================================== -[,]; -[, ,]; -[, , 1]; -[, , 1, 1]; - -================================================================================ -`; - -exports[`nested.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -[[]]; -[[], []]; -[[], [], []]; -[[], [0], []]; -[[], [0], [0]]; -[[], [0, 1], [0]]; -[[], [0, 1], [0, 1]]; -[[0]]; -[[0], []]; -[[0], [], []]; -[[0], [0], []]; -[[0], [0], [0]]; -[[0], [0, 1], [0]]; -[[0], [0, 1], [0, 1]]; -[[0, 1]]; -[[0, 1], []]; -[[0, 1], [], []]; -[[0, 1], [0], []]; -[[0, 1], [0], [0]]; -[[0, 1], [0, 1], [0]]; -[[0, 1], [0, 1], [0, 1]]; -[[], [1, 2, 3]]; -[[1], [1]]; -[[1, 2], [1, 2, 3]]; -[[1, 0], [1, 0]]; -[{}]; -[{}, {}]; -[{}, {}, {}]; -[{}, { a }]; -[{}, { a, b }]; -[{}, { a, b, c }]; -[{ a }]; -[{ a }, { a }]; -[{ a }, { a }, { a }]; -[{ a }, { a, b }]; -[{ a }, { a, b, c}]; -[{ a, b }]; -[{ a, b }, { a }]; -[{ a, b }, { a }, { a }]; -[{ a, b }, { a, b }]; -[{ a, b }, { a, b, c }]; - -=====================================output===================================== -[[]]; -[[], []]; -[[], [], []]; -[[], [0], []]; -[[], [0], [0]]; -[[], [0, 1], [0]]; -[[], [0, 1], [0, 1]]; -[[0]]; -[[0], []]; -[[0], [], []]; -[[0], [0], []]; -[[0], [0], [0]]; -[[0], [0, 1], [0]]; -[[0], [0, 1], [0, 1]]; -[[0, 1]]; -[[0, 1], []]; -[[0, 1], [], []]; -[[0, 1], [0], []]; -[[0, 1], [0], [0]]; -[[0, 1], [0, 1], [0]]; -[ - [0, 1], - [0, 1], - [0, 1], -]; -[[], [1, 2, 3]]; -[[1], [1]]; -[ - [1, 2], - [1, 2, 3], -]; -[ - [1, 0], - [1, 0], -]; -[{}]; -[{}, {}]; -[{}, {}, {}]; -[{}, { a }]; -[{}, { a, b }]; -[{}, { a, b, c }]; -[{ a }]; -[{ a }, { a }]; -[{ a }, { a }, { a }]; -[{ a }, { a, b }]; -[{ a }, { a, b, c }]; -[{ a, b }]; -[{ a, b }, { a }]; -[{ a, b }, { a }, { a }]; -[ - { a, b }, - { a, b }, -]; -[ - { a, b }, - { a, b, c }, -]; - -================================================================================ -`; - -exports[`numbers-in-args.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -expect(bifornCringerMoshedPerplexSawder.getArrayOfNumbers()).toEqual( - [1, 2, 3, 4, 5] -); - -expect(bifornCringerMoshedPerplexSawder.getLongArrayOfNumbers()).toEqual( - [ - 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, - 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, - 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, - 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, - 48,78,97 - ] -); - -=====================================output===================================== -expect(bifornCringerMoshedPerplexSawder.getArrayOfNumbers()).toEqual([ - 1, 2, 3, 4, 5, -]); - -expect(bifornCringerMoshedPerplexSawder.getLongArrayOfNumbers()).toEqual([ - 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, - 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, 33, - 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, 91, 27, - 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, 31, 86, - 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, 35, 48, - 78, 97, -]); - -================================================================================ -`; - -exports[`numbers-in-assignment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers = [ - 1, - 2, - 3, - 4, - 5 -]; - -bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers2 = [ - 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, - 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, - 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, - 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, - 48,78,97 -]; - -=====================================output===================================== -bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers = [ - 1, 2, 3, 4, 5, -]; - -bifornCringerMoshedPerplex.bifornCringerMoshedPerplexSawder.arrayOfNumbers2 = [ - 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, - 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, 33, - 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, 91, 27, - 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, 31, 86, - 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, 35, 48, - 78, 97, -]; - -================================================================================ -`; - -exports[`numbers-negative.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const numbers1 = [-2017,-506252,-744011292,-7224,-70.4,-83353.6,-708.4,-174023963.52,-40385, -// comment1 --380014, --253951682,-728,-15.84,-2058467564.56,-43,-33,-85134845,-67092,-1,-78820379,-2371.6,-16,7, -// comment2 --62454,-4282239912, --10816495.36,0.88,-100622682,8.8,-67087.68000000001,-3758276,-25.5211,-54,-1184265243,-46073628,-280423.44, --41833463,-27961.12,-305.36,-199875.28]; - -const numbers2 = [-234, -342 // comment3 -, -223, -333333.33,12345] - -=====================================output===================================== -const numbers1 = [ - -2017, -506252, -744011292, -7224, -70.4, -83353.6, -708.4, -174023963.52, - -40385, - // comment1 - -380014, -253951682, -728, -15.84, -2058467564.56, -43, -33, -85134845, - -67092, -1, -78820379, -2371.6, -16, 7, - // comment2 - -62454, -4282239912, -10816495.36, 0.88, -100622682, 8.8, -67087.68000000001, - -3758276, -25.5211, -54, -1184265243, -46073628, -280423.44, -41833463, - -27961.12, -305.36, -199875.28, -]; - -const numbers2 = [ - -234, - -342, // comment3 - -223, - -333333.33, - 12345, -]; - -================================================================================ -`; - -exports[`numbers-negative-comment-after-minus.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const numbers = [-2017,-506252,-744011292,-7224,-70.4,-83353.6,-708.4,-174023963.52,-40385,-// comment1 -380014, --253951682,-728,-15.84,-2058467564.56,-43,-33,-85134845,-67092,-1,-78820379,-2371.6,-16,7, -// comment2 --62454,-4282239912, --10816495.36,0.88,-100622682,8.8,-67087.68000000001,-3758276,-25.5211,-54,-1184265243,-46073628,-280423.44, --41833463,-27961.12,-305.36,-199875.28]; - -c = [ - - /**/ 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, 223323 -]; - -=====================================output===================================== -const numbers = [ - -2017, - -506252, - -744011292, - -7224, - -70.4, - -83353.6, - -708.4, - -174023963.52, - -40385, - -( - // comment1 - 380014 - ), - -253951682, - -728, - -15.84, - -2058467564.56, - -43, - -33, - -85134845, - -67092, - -1, - -78820379, - -2371.6, - -16, - 7, - // comment2 - -62454, - -4282239912, - -10816495.36, - 0.88, - -100622682, - 8.8, - -67087.68000000001, - -3758276, - -25.5211, - -54, - -1184265243, - -46073628, - -280423.44, - -41833463, - -27961.12, - -305.36, - -199875.28, -]; - -c = [ - -(/**/ 66), - 66, - 57, - 45, - 47, - 33, - 53, - 82, - 81, - 76, - 66, - 57, - 45, - 47, - 33, - 53, - 82, - 81, - 223323, -]; - -================================================================================ -`; - -exports[`numbers-trailing-comma.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// --------------- print-width ------------------------------------------------- -c = [ - 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, 223323, -]; - -=====================================output===================================== -// --------------- print-width ------------------------------------------------- -c = [ - 66, 66, 57, 45, 47, 33, 53, 82, 81, 76, 66, 57, 45, 47, 33, 53, 82, 81, - 223323, -]; - -================================================================================ -`; - -exports[`numbers-with-holes.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const numberWithHoles1 = [ - 7234932941, - 7234932722, - 7234932312, - // comment before a hole 1 - , - 7234932841, - , - 7234932843, - , - // comment after a hole 1 - 7234932436, -]; - -const numberWithHoles2 = [ - 0x234932941, - 0x234932722, - 0x234932312, - - // comment before a hole 2 - , - 0x234932841, - , - 0x234932843, - , - - // comment after a hole 2 - 0x234932436, -]; - -=====================================output===================================== -const numberWithHoles1 = [ - 7234932941, - 7234932722, - 7234932312, - , - // comment before a hole 1 - 7234932841, - , - 7234932843, - , - // comment after a hole 1 - 7234932436, -]; - -const numberWithHoles2 = [ - 0x234932941, - 0x234932722, - 0x234932312, - - , - // comment before a hole 2 - 0x234932841, - , - 0x234932843, - , - // comment after a hole 2 - 0x234932436, -]; - -================================================================================ -`; - -exports[`numbers-with-trailing-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function isUnusedDiagnostic(code) { - return [ - 6133, // '{0}' is declared but never used. - 6138, // Property '{0}' is declared but its value is never read. - 6192, // All imports in import declaration are unused. - 6196, // '{0}' is declared but its value is never read. - 6198, - 6199, - 6205, // All type parameters are unused. - ].includes(code); -} - -=====================================output===================================== -function isUnusedDiagnostic(code) { - return [ - 6133, // '{0}' is declared but never used. - 6138, // Property '{0}' is declared but its value is never read. - 6192, // All imports in import declaration are unused. - 6196, // '{0}' is declared but its value is never read. - 6198, - 6199, - 6205, // All type parameters are unused. - ].includes(code); -} - -================================================================================ -`; - -exports[`numbers-with-tricky-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const lazyCatererNumbers = [1, 2, 4, 7, 11, 16, 22, 29, 37, 46, -56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466, /*block*/ -// line -497, 529, 562, 596, 631, 667, 704, 742, 781, -821, 862, 904, 947, 991, 1036, 1082, 1129, 1177, 1226, -// line 2 -1276, 1327, 1379]; - -=====================================output===================================== -const lazyCatererNumbers = [ - 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, - 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466 /*block*/, - // line - 497, 529, 562, 596, 631, 667, 704, 742, 781, 821, 862, 904, 947, 991, 1036, - 1082, 1129, 1177, 1226, - // line 2 - 1276, 1327, 1379, -]; - -================================================================================ -`; - -exports[`numbers1.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const numbers1 = [ - 7234932941, - 7234932722, - 7234932312, - 7234932933, - 7234932841, - 7234932166, - 7234932843, - 7234932978, - 7234932436, - 7234932687, - 7234932269, - 7234932573, - 7234932913, - 7234932873, - 7234932748, - 7234932354, - 7234932153, - 7234932181, - 7234932947, - 7234932563, - 7234932324, - 7234932952, - 7234932885, - 7234932911, - 7234932698, - 7234932248, - 7234932764, - 7234932431, - 7234932811, - 7234932344, - 7234932855, - 7234932430, - 7234932396, - 7234932981, - 7234932594, - 7234932131, - 7234932489, - 7234932552, - 7234932116, - 7234932833, - 7234932521, - 7234932252, - 7234932503, - 7234932540, - 7234932893, - 7234932736, - 7234932969, - 7234932145, - 7234932925, - 7234932417, - 7234932344, - 7234932108, - 7234932161, - 7234932777, - 7234932971, - 7234932159, - 7234932158, - 7234932908, - 7234932511, - 7234932876, - 7234932768, - 7234932284, - 7234932640, - 7234932309, - 7234932651, - 7234932292, - 7234932898, - 7234932284, - 7234932201, - 7234932506, - 7234932654, - 7234932840, - 7234932334, - 7234932246, - 7234932376, - 7234932398, - 7234932714, - 7234932134, - 7234932435, - 7234932181, - 7234932980, - 7234932594, - 7234932396, - 7234932100, - 7234932743, - 7234932812, - 7234932583, - 7234932622, - 7234932800, - 7234932310, - 7234932111, - 7234932537, - 7234932751, - 7234932920, - 7234932872, - 7234932700, - 7234932702, - 7234932655, - 7234932515, - 7234932298 -]; - -=====================================output===================================== -const numbers1 = [ - 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, - 7234932843, 7234932978, 7234932436, 7234932687, 7234932269, 7234932573, - 7234932913, 7234932873, 7234932748, 7234932354, 7234932153, 7234932181, - 7234932947, 7234932563, 7234932324, 7234932952, 7234932885, 7234932911, - 7234932698, 7234932248, 7234932764, 7234932431, 7234932811, 7234932344, - 7234932855, 7234932430, 7234932396, 7234932981, 7234932594, 7234932131, - 7234932489, 7234932552, 7234932116, 7234932833, 7234932521, 7234932252, - 7234932503, 7234932540, 7234932893, 7234932736, 7234932969, 7234932145, - 7234932925, 7234932417, 7234932344, 7234932108, 7234932161, 7234932777, - 7234932971, 7234932159, 7234932158, 7234932908, 7234932511, 7234932876, - 7234932768, 7234932284, 7234932640, 7234932309, 7234932651, 7234932292, - 7234932898, 7234932284, 7234932201, 7234932506, 7234932654, 7234932840, - 7234932334, 7234932246, 7234932376, 7234932398, 7234932714, 7234932134, - 7234932435, 7234932181, 7234932980, 7234932594, 7234932396, 7234932100, - 7234932743, 7234932812, 7234932583, 7234932622, 7234932800, 7234932310, - 7234932111, 7234932537, 7234932751, 7234932920, 7234932872, 7234932700, - 7234932702, 7234932655, 7234932515, 7234932298, -]; - -================================================================================ -`; - -exports[`numbers2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const userIds1 = [ - 7234932941, - 7234932722, - 7234932312, - 7234932933, -]; - -const userIds2 = [ - 7234932941, - 7234932722, - 7234932312, - 7234932933, - 7234932841, - 7234932166, - 7234932843, - 7234932978, - 7234932436, -]; - -const userIds3 = [ - 7234932941, - 7234932722, - 7234932312, - 7234932933, - 7234932841, - 7234932166, - 7234932843, - - 7234932978, - 7234932436, -]; - -const userIds4 = [ - 7234932941, - 7234932722, - 7234932312, - 7234932933, - 7234932841, - 7234932166, - // comment 1 - 7234932843, - - 7234932978, - - // comment 2 - 7234932436, - // comment 3 -]; - - -=====================================output===================================== -const userIds1 = [7234932941, 7234932722, 7234932312, 7234932933]; - -const userIds2 = [ - 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, - 7234932843, 7234932978, 7234932436, -]; - -const userIds3 = [ - 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, - 7234932843, - - 7234932978, 7234932436, -]; - -const userIds4 = [ - 7234932941, 7234932722, 7234932312, 7234932933, 7234932841, 7234932166, - // comment 1 - 7234932843, - - 7234932978, - - // comment 2 - 7234932436, - // comment 3 -]; - -================================================================================ -`; - -exports[`numbers3.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let test_case = [ - [ - 66,57,45,47,33,53,82,81,76,78,10,78,15,98,24,29,32,27,28,76,41,65,84,35, - 97,90,75,24,88,45,23,75,63,86,24,39,9,51,33,40,58,17,49,86,63,59,97,91, - 98,99,5,69,51,44,34,69,17,91,27,83,26,34,93,29,66,88,49,33,49,73,9,81,4, - 36,5,14,43,31,86,27,39,75,98,99,55,19,39,21,85,86,46,82,11,44,48,77,35, - 48,78,97 - ], - [ - 41,83,31,62,15,70,10,90,/*21,*/48,39,76,14,48,63,62,16,17,61,97,86,80,34,27, - 39,53,90,80,56,71,31,22,29,7,71,90,65,17,48,85,14,94,16,32,4,96,49,97, - 53,87,54,2,78,37,21,3,97,62,93,62,11,27,14,29,64,44,11,5,39,43,94,52,0, - 4,86,58,63,42,97,54,2,1,53,17,92,79,52,47,81,93,34,17,93,20,61,68,58,49, - 27,45 - ] -]; - -=====================================output===================================== -let test_case = [ - [ - 66, 57, 45, 47, 33, 53, 82, 81, 76, 78, 10, 78, 15, 98, 24, 29, 32, 27, 28, - 76, 41, 65, 84, 35, 97, 90, 75, 24, 88, 45, 23, 75, 63, 86, 24, 39, 9, 51, - 33, 40, 58, 17, 49, 86, 63, 59, 97, 91, 98, 99, 5, 69, 51, 44, 34, 69, 17, - 91, 27, 83, 26, 34, 93, 29, 66, 88, 49, 33, 49, 73, 9, 81, 4, 36, 5, 14, 43, - 31, 86, 27, 39, 75, 98, 99, 55, 19, 39, 21, 85, 86, 46, 82, 11, 44, 48, 77, - 35, 48, 78, 97, - ], - [ - 41, 83, 31, 62, 15, 70, 10, 90, /*21,*/ 48, 39, 76, 14, 48, 63, 62, 16, 17, - 61, 97, 86, 80, 34, 27, 39, 53, 90, 80, 56, 71, 31, 22, 29, 7, 71, 90, 65, - 17, 48, 85, 14, 94, 16, 32, 4, 96, 49, 97, 53, 87, 54, 2, 78, 37, 21, 3, 97, - 62, 93, 62, 11, 27, 14, 29, 64, 44, 11, 5, 39, 43, 94, 52, 0, 4, 86, 58, 63, - 42, 97, 54, 2, 1, 53, 17, 92, 79, 52, 47, 81, 93, 34, 17, 93, 20, 61, 68, - 58, 49, 27, 45, - ], -]; - -================================================================================ -`; - -exports[`preserve_empty_lines.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = [ - - 1, - 2, - - 3, - - - 4, - - -] - -=====================================output===================================== -a = [ - 1, 2, - - 3, - - 4, -]; - -================================================================================ -`; diff --git a/tests/format/js/arrays/array-and-tuple.js b/tests/format/js/arrays/array-and-tuple.js new file mode 100644 index 000000000000..babac9fa9ba8 --- /dev/null +++ b/tests/format/js/arrays/array-and-tuple.js @@ -0,0 +1,9 @@ +a = [ + [1,2], + [1,2], +] + +a = [ + {a, b}, + {a, b}, +] diff --git a/tests/format/js/arrays/format.test.js b/tests/format/js/arrays/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/arrays/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/arrays/jsfmt.spec.js b/tests/format/js/arrays/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/arrays/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/arrays/preserve_empty_lines.js b/tests/format/js/arrays/preserve_empty_lines.js index 0cd853eef8df..63bf3c725e7d 100644 --- a/tests/format/js/arrays/preserve_empty_lines.js +++ b/tests/format/js/arrays/preserve_empty_lines.js @@ -10,3 +10,84 @@ a = [ ] + +b = [ + 100, + + (200) + , + + 300 + , + + 1 + , + 2, 3 +] + +c = [ + "apple", + "banana", + "blueberry", + + "red", + "blue" + , + "yellow", + + "broccoli", + "celery", + "lettuce" + , + + "green" + , + "green", + "green", + + //an egg + "egg", + //a bigger egg + "big egg" + //the biggest egg + , + "huge egg" + , + + //not an egg + "lasagna" + +] + +_ = [ + a, + + b // +] + +_ = [ + (a), + + b, // +]; + +_ = [ + ((((( + a = b/* comment */))/* comment */))), + + c // +] + +_ = [ + ((((( + (a = b)/* comment */))/* comment */))), + + c // +] + +_ = [ + (a=b + + ), + b, // +]; diff --git a/tests/format/js/arrow-call/__snapshots__/format.test.js.snap b/tests/format/js/arrow-call/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..55bb36a8901f --- /dev/null +++ b/tests/format/js/arrow-call/__snapshots__/format.test.js.snap @@ -0,0 +1,367 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow_call.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const testResults = results.testResults.map(testResult => + formatResult(testResult, formatter, reporter) +); + +it('mocks regexp instances', () => { + expect( + () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) + .not.toThrowError(); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) + .not.toThrowError(); + +const a = Observable + .fromPromise(axiosInstance.post('/carts/mine')) + .map((response) => response.data) + +const b = Observable.fromPromise(axiosInstance.get(url)) + .map((response) => response.data) + +func( + veryLoooooooooooooooooooooooongName, + veryLooooooooooooooooooooooooongName => + veryLoooooooooooooooongName.something() +); + +promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); + +=====================================output===================================== +const testResults = results.testResults.map((testResult) => + formatResult(testResult, formatter, reporter), +); + +it("mocks regexp instances", () => { + expect(() => + moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( + /Required parameter/, +); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }), +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }), +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint" }), +).not.toThrowError(); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }), +).not.toThrowError(); + +const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( + (response) => response.data, +); + +const b = Observable.fromPromise(axiosInstance.get(url)).map( + (response) => response.data, +); + +func( + veryLoooooooooooooooooooooooongName, + (veryLooooooooooooooooooooooooongName) => + veryLoooooooooooooooongName.something(), +); + +promise.then((result) => + result.veryLongVariable.veryLongPropertyName > someOtherVariable + ? "ok" + : "fail", +); + +================================================================================ +`; + +exports[`arrow_call.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const testResults = results.testResults.map(testResult => + formatResult(testResult, formatter, reporter) +); + +it('mocks regexp instances', () => { + expect( + () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) + .not.toThrowError(); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) + .not.toThrowError(); + +const a = Observable + .fromPromise(axiosInstance.post('/carts/mine')) + .map((response) => response.data) + +const b = Observable.fromPromise(axiosInstance.get(url)) + .map((response) => response.data) + +func( + veryLoooooooooooooooooooooooongName, + veryLooooooooooooooooooooooooongName => + veryLoooooooooooooooongName.something() +); + +promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); + +=====================================output===================================== +const testResults = results.testResults.map((testResult) => + formatResult(testResult, formatter, reporter), +); + +it("mocks regexp instances", () => { + expect(() => + moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( + /Required parameter/, +); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }), +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }), +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint" }), +).not.toThrowError(); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }), +).not.toThrowError(); + +const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( + (response) => response.data, +); + +const b = Observable.fromPromise(axiosInstance.get(url)).map( + (response) => response.data, +); + +func( + veryLoooooooooooooooooooooooongName, + (veryLooooooooooooooooooooooooongName) => + veryLoooooooooooooooongName.something(), +); + +promise.then((result) => + result.veryLongVariable.veryLongPropertyName > someOtherVariable + ? "ok" + : "fail", +); + +================================================================================ +`; + +exports[`arrow_call.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const testResults = results.testResults.map(testResult => + formatResult(testResult, formatter, reporter) +); + +it('mocks regexp instances', () => { + expect( + () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) + .toThrowError(/Required parameter/); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) + .not.toThrowError(); + +expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) + .not.toThrowError(); + +const a = Observable + .fromPromise(axiosInstance.post('/carts/mine')) + .map((response) => response.data) + +const b = Observable.fromPromise(axiosInstance.get(url)) + .map((response) => response.data) + +func( + veryLoooooooooooooooooooooooongName, + veryLooooooooooooooooooooooooongName => + veryLoooooooooooooooongName.something() +); + +promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); + +=====================================output===================================== +const testResults = results.testResults.map((testResult) => + formatResult(testResult, formatter, reporter) +); + +it("mocks regexp instances", () => { + expect(() => + moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)) + ).not.toThrow(); +}); + +expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( + /Required parameter/ +); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }) +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }) +).toThrowError(/Required parameter/); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint" }) +).not.toThrowError(); + +expect(() => + asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }) +).not.toThrowError(); + +const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( + (response) => response.data +); + +const b = Observable.fromPromise(axiosInstance.get(url)).map( + (response) => response.data +); + +func( + veryLoooooooooooooooooooooooongName, + (veryLooooooooooooooooooooooooongName) => + veryLoooooooooooooooongName.something() +); + +promise.then((result) => + result.veryLongVariable.veryLongPropertyName > someOtherVariable + ? "ok" + : "fail" +); + +================================================================================ +`; + +exports[`class-property.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +=====================================output===================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +================================================================================ +`; + +exports[`class-property.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +=====================================output===================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +================================================================================ +`; + +exports[`class-property.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +=====================================output===================================== +const composition = (ViewComponent, ContainerComponent) => + class extends React.Component { + static propTypes = {}; + }; + +================================================================================ +`; diff --git a/tests/format/js/arrow-call/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrow-call/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0a3a3cd0e918..000000000000 --- a/tests/format/js/arrow-call/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,365 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow_call.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const testResults = results.testResults.map(testResult => - formatResult(testResult, formatter, reporter) -); - -it('mocks regexp instances', () => { - expect( - () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) - .not.toThrowError(); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) - .not.toThrowError(); - -const a = Observable - .fromPromise(axiosInstance.post('/carts/mine')) - .map((response) => response.data) - -const b = Observable.fromPromise(axiosInstance.get(url)) - .map((response) => response.data) - -func( - veryLoooooooooooooooooooooooongName, - veryLooooooooooooooooooooooooongName => - veryLoooooooooooooooongName.something() -); - -promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); - -=====================================output===================================== -const testResults = results.testResults.map((testResult) => - formatResult(testResult, formatter, reporter) -); - -it("mocks regexp instances", () => { - expect(() => - moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)) - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( - /Required parameter/ -); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }) -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }) -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint" }) -).not.toThrowError(); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }) -).not.toThrowError(); - -const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( - (response) => response.data -); - -const b = Observable.fromPromise(axiosInstance.get(url)).map( - (response) => response.data -); - -func( - veryLoooooooooooooooooooooooongName, - (veryLooooooooooooooooooooooooongName) => - veryLoooooooooooooooongName.something() -); - -promise.then((result) => - result.veryLongVariable.veryLongPropertyName > someOtherVariable - ? "ok" - : "fail" -); - -================================================================================ -`; - -exports[`arrow_call.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const testResults = results.testResults.map(testResult => - formatResult(testResult, formatter, reporter) -); - -it('mocks regexp instances', () => { - expect( - () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) - .not.toThrowError(); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) - .not.toThrowError(); - -const a = Observable - .fromPromise(axiosInstance.post('/carts/mine')) - .map((response) => response.data) - -const b = Observable.fromPromise(axiosInstance.get(url)) - .map((response) => response.data) - -func( - veryLoooooooooooooooooooooooongName, - veryLooooooooooooooooooooooooongName => - veryLoooooooooooooooongName.something() -); - -promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); - -=====================================output===================================== -const testResults = results.testResults.map((testResult) => - formatResult(testResult, formatter, reporter), -); - -it("mocks regexp instances", () => { - expect(() => - moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( - /Required parameter/, -); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }), -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }), -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint" }), -).not.toThrowError(); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }), -).not.toThrowError(); - -const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( - (response) => response.data, -); - -const b = Observable.fromPromise(axiosInstance.get(url)).map( - (response) => response.data, -); - -func( - veryLoooooooooooooooooooooooongName, - (veryLooooooooooooooooooooooooongName) => - veryLoooooooooooooooongName.something(), -); - -promise.then((result) => - result.veryLongVariable.veryLongPropertyName > someOtherVariable - ? "ok" - : "fail", -); - -================================================================================ -`; - -exports[`arrow_call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const testResults = results.testResults.map(testResult => - formatResult(testResult, formatter, reporter) -); - -it('mocks regexp instances', () => { - expect( - () => moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)), - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" })) - .toThrowError(/Required parameter/); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint" })) - .not.toThrowError(); - -expect(() => asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" })) - .not.toThrowError(); - -const a = Observable - .fromPromise(axiosInstance.post('/carts/mine')) - .map((response) => response.data) - -const b = Observable.fromPromise(axiosInstance.get(url)) - .map((response) => response.data) - -func( - veryLoooooooooooooooooooooooongName, - veryLooooooooooooooooooooooooongName => - veryLoooooooooooooooongName.something() -); - -promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail"); - -=====================================output===================================== -const testResults = results.testResults.map((testResult) => - formatResult(testResult, formatter, reporter) -); - -it("mocks regexp instances", () => { - expect(() => - moduleMocker.generateFromMetadata(moduleMocker.getMetadata(/a/)) - ).not.toThrow(); -}); - -expect(() => asyncRequest({ url: "/test-endpoint" })).toThrowError( - /Required parameter/ -); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-long-url" }) -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ url: "/test-endpoint-but-with-a-suuuuuuuuper-long-url" }) -).toThrowError(/Required parameter/); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint" }) -).not.toThrowError(); - -expect(() => - asyncRequest({ type: "foo", url: "/test-endpoint-but-with-a-long-url" }) -).not.toThrowError(); - -const a = Observable.fromPromise(axiosInstance.post("/carts/mine")).map( - (response) => response.data -); - -const b = Observable.fromPromise(axiosInstance.get(url)).map( - (response) => response.data -); - -func( - veryLoooooooooooooooooooooooongName, - (veryLooooooooooooooooooooooooongName) => - veryLoooooooooooooooongName.something() -); - -promise.then((result) => - result.veryLongVariable.veryLongPropertyName > someOtherVariable - ? "ok" - : "fail" -); - -================================================================================ -`; - -exports[`class-property.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -=====================================output===================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -================================================================================ -`; - -exports[`class-property.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -=====================================output===================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -================================================================================ -`; - -exports[`class-property.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -=====================================output===================================== -const composition = (ViewComponent, ContainerComponent) => - class extends React.Component { - static propTypes = {}; - }; - -================================================================================ -`; diff --git a/tests/format/js/arrow-call/format.test.js b/tests/format/js/arrow-call/format.test.js new file mode 100644 index 000000000000..f94a8479e355 --- /dev/null +++ b/tests/format/js/arrow-call/format.test.js @@ -0,0 +1,14 @@ +const errors = {}; + +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "es5", + errors, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "all", + errors, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + arrowParens: "always", + errors, +}); diff --git a/tests/format/js/arrow-call/jsfmt.spec.js b/tests/format/js/arrow-call/jsfmt.spec.js deleted file mode 100644 index c4f8a4239881..000000000000 --- a/tests/format/js/arrow-call/jsfmt.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -const errors = {}; - -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - trailingComma: "all", - errors, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - arrowParens: "always", - errors, -}); diff --git a/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap b/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..527f05812aa7 --- /dev/null +++ b/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap @@ -0,0 +1,58 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrows-bind.js [acorn] format 1`] = ` +"Unexpected token (1:9) +> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); + | ^ + 2 | (a => b)::c; + 3 | a::(b => c); + 4 | +Cause: Unexpected token (1:8)" +`; + +exports[`arrows-bind.js [espree] format 1`] = ` +"Unexpected token : (1:9) +> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); + | ^ + 2 | (a => b)::c; + 3 | a::(b => c); + 4 | +Cause: Unexpected token :" +`; + +exports[`arrows-bind.js [meriyah] format 1`] = ` +"Expected ')' (1:9) +> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); + | ^ + 2 | (a => b)::c; + 3 | a::(b => c); + 4 | +Cause: [1:8-1:9]: Expected ')'" +`; + +exports[`arrows-bind.js [oxc] format 1`] = ` +"Expected \`,\` but found \`:\` (1:9) +> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); + | ^ + 2 | (a => b)::c; + 3 | a::(b => c); + 4 |" +`; + +exports[`arrows-bind.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); +(a => b)::c; +a::(b => c); + +=====================================output===================================== +(a) => ({})::b()\`\`[""].c++ && 0 ? 0 : 0; +((a) => b)::c; +a::((b) => c); + +================================================================================ +`; diff --git a/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 84be5b56fe59..000000000000 --- a/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,46 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrows-bind.js [acorn] format 1`] = ` -"Unexpected token (1:9) -> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); - | ^ - 2 | (a => b)::c; - 3 | a::(b => c); - 4 |" -`; - -exports[`arrows-bind.js [espree] format 1`] = ` -"Unexpected token : (1:9) -> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); - | ^ - 2 | (a => b)::c; - 3 | a::(b => c); - 4 |" -`; - -exports[`arrows-bind.js [meriyah] format 1`] = ` -"Expected ')' (1:9) -> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); - | ^ - 2 | (a => b)::c; - 3 | a::(b => c); - 4 |" -`; - -exports[`arrows-bind.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0); -(a => b)::c; -a::(b => c); - -=====================================output===================================== -(a) => ({}::b()\`\`[""].c++ && 0 ? 0 : 0); -((a) => b)::c; -a::((b) => c); - -================================================================================ -`; diff --git a/tests/format/js/arrows-bind/format.test.js b/tests/format/js/arrows-bind/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/arrows-bind/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/arrows-bind/jsfmt.spec.js b/tests/format/js/arrows-bind/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/arrows-bind/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/arrows/__snapshots__/format.test.js.snap b/tests/format/js/arrows/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..91388aeea299 --- /dev/null +++ b/tests/format/js/arrows/__snapshots__/format.test.js.snap @@ -0,0 +1,4605 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-object.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn12 = (a) => (b) => (c) => (d) => (e) => + ({ foo: bar, bar: baz, baz: foo }); + +map(() => ([ + // comment + foo +])); + +map(() => ({ + // comment + foo +})); + +=====================================output===================================== +const fn12 = (a) => (b) => (c) => (d) => (e) => ({ + foo: bar, + bar: baz, + baz: foo, +}); + +map(() => [ + // comment + foo, +]); + +map(() => ({ + // comment + foo, +})); + +================================================================================ +`; + +exports[`array-and-object.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn12 = (a) => (b) => (c) => (d) => (e) => + ({ foo: bar, bar: baz, baz: foo }); + +map(() => ([ + // comment + foo +])); + +map(() => ({ + // comment + foo +})); + +=====================================output===================================== +const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); + +map(() => [ + // comment + foo, +]); + +map(() => ({ + // comment + foo, +})); + +================================================================================ +`; + +exports[`arrow_function_expression.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a => {}).length +typeof (() => {}); +export default (() => {})(); +(() => {})()\`\`; +(() => {})\`\`; +new (() => {}); +if ((() => {}) ? 1 : 0) {} +let f = () => ({}()) +let a = () => ({} instanceof a); +a = () => ({} && a); +a = () => ({}() && a); +a = () => ({} && a && b); +a = () => ({} + a); +a = () => ({}()() && a); +a = () => ({}.b && a); +a = () => ({}[b] && a); +a = () => ({}\`\` && a); +a = () => ({} = 0); +a = () => ({}, a); +a => a instanceof {}; +a => ({}().b && 0) +a => ({}().c = 0) +x => ({}()()) +x => ({}()\`\`) +x => ({}().b); +a = b => c; +x => (y = z); +x => (y += z); +f(a => ({})) + 1; +(a => ({})) || 0; +a = b => c; +a = b => { + return c +}; + +=====================================output===================================== +((a) => {}).length; +typeof (() => {}); +export default (() => {})(); +(() => {})()\`\`; +(() => {})\`\`; +new (() => {})(); +if ((() => {}) ? 1 : 0) { +} +let f = () => ({})(); +let a = () => ({}) instanceof a; +a = () => ({}) && a; +a = () => ({})() && a; +a = () => ({}) && a && b; +a = () => ({}) + a; +a = () => ({})()() && a; +a = () => ({}).b && a; +a = () => ({})[b] && a; +a = () => ({})\`\` && a; +a = () => ({} = 0); +a = () => ({}, a); +(a) => a instanceof {}; +(a) => ({})().b && 0; +(a) => ({}().c = 0); +(x) => ({})()(); +(x) => ({})()\`\`; +(x) => ({})().b; +a = (b) => c; +(x) => (y = z); +(x) => (y += z); +f((a) => ({})) + 1; +((a) => ({})) || 0; +a = (b) => c; +a = (b) => { + return c; +}; + +================================================================================ +`; + +exports[`arrow_function_expression.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a => {}).length +typeof (() => {}); +export default (() => {})(); +(() => {})()\`\`; +(() => {})\`\`; +new (() => {}); +if ((() => {}) ? 1 : 0) {} +let f = () => ({}()) +let a = () => ({} instanceof a); +a = () => ({} && a); +a = () => ({}() && a); +a = () => ({} && a && b); +a = () => ({} + a); +a = () => ({}()() && a); +a = () => ({}.b && a); +a = () => ({}[b] && a); +a = () => ({}\`\` && a); +a = () => ({} = 0); +a = () => ({}, a); +a => a instanceof {}; +a => ({}().b && 0) +a => ({}().c = 0) +x => ({}()()) +x => ({}()\`\`) +x => ({}().b); +a = b => c; +x => (y = z); +x => (y += z); +f(a => ({})) + 1; +(a => ({})) || 0; +a = b => c; +a = b => { + return c +}; + +=====================================output===================================== +(a => {}).length; +typeof (() => {}); +export default (() => {})(); +(() => {})()\`\`; +(() => {})\`\`; +new (() => {})(); +if ((() => {}) ? 1 : 0) { +} +let f = () => ({})(); +let a = () => ({}) instanceof a; +a = () => ({}) && a; +a = () => ({})() && a; +a = () => ({}) && a && b; +a = () => ({}) + a; +a = () => ({})()() && a; +a = () => ({}).b && a; +a = () => ({})[b] && a; +a = () => ({})\`\` && a; +a = () => ({} = 0); +a = () => ({}, a); +a => a instanceof {}; +a => ({})().b && 0; +a => ({}().c = 0); +x => ({})()(); +x => ({})()\`\`; +x => ({})().b; +a = b => c; +x => (y = z); +x => (y += z); +f(a => ({})) + 1; +(a => ({})) || 0; +a = b => c; +a = b => { + return c; +}; + +================================================================================ +`; + +exports[`arrow-chain-with-trailing-comments.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x = (bifornCringerMoshedPerplexSawder) => ((askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => (f00) => { + averredBathersBoxroomBuggyNurl(); +} // BOOM +) + +x2 = (a) => ((askTrovenaBeenaDependsRowans1, askTrovenaBeenaDependsRowans2, askTrovenaBeenaDependsRowans3) => { + c(); +} /* ! */ // KABOOM +) + +=====================================output===================================== +x = + (bifornCringerMoshedPerplexSawder) => + (askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => + (f00) => { + averredBathersBoxroomBuggyNurl(); + }; // BOOM + +x2 = + (a) => + ( + askTrovenaBeenaDependsRowans1, + askTrovenaBeenaDependsRowans2, + askTrovenaBeenaDependsRowans3, + ) => { + c(); + } /* ! */; // KABOOM + +================================================================================ +`; + +exports[`arrow-chain-with-trailing-comments.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x = (bifornCringerMoshedPerplexSawder) => ((askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => (f00) => { + averredBathersBoxroomBuggyNurl(); +} // BOOM +) + +x2 = (a) => ((askTrovenaBeenaDependsRowans1, askTrovenaBeenaDependsRowans2, askTrovenaBeenaDependsRowans3) => { + c(); +} /* ! */ // KABOOM +) + +=====================================output===================================== +x = + bifornCringerMoshedPerplexSawder => + (askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => + f00 => { + averredBathersBoxroomBuggyNurl(); + }; // BOOM + +x2 = + a => + ( + askTrovenaBeenaDependsRowans1, + askTrovenaBeenaDependsRowans2, + askTrovenaBeenaDependsRowans3, + ) => { + c(); + } /* ! */; // KABOOM + +================================================================================ +`; + +exports[`assignment-chain-with-arrow-chain.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, +) => restOfTheArguments12345678 => { + return "baz"; +}; + +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, + argumentThree +) => restOfTheArguments12345678 => { + return "baz"; +}; + +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, + argumentThree +) => { + return "baz"; +}; + +const bifornCringer1 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { + return "baz"; + }; + +const bifornCringer2 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments12345678) => { + return "baz"; + }; + +const bifornCringer3 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }; + +=====================================output===================================== +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { + return "baz"; + }; + +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments12345678) => { + return "baz"; + }; + +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }; + +const bifornCringer1 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { + return "baz"; + }); + +const bifornCringer2 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments12345678) => { + return "baz"; + }); + +const bifornCringer3 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }); + +================================================================================ +`; + +exports[`assignment-chain-with-arrow-chain.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, +) => restOfTheArguments12345678 => { + return "baz"; +}; + +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, + argumentThree +) => restOfTheArguments12345678 => { + return "baz"; +}; + +bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( + argumentOne, + argumentTwo, + argumentThree +) => { + return "baz"; +}; + +const bifornCringer1 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { + return "baz"; + }; + +const bifornCringer2 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments12345678) => { + return "baz"; + }; + +const bifornCringer3 = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }; + +=====================================output===================================== +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => restOfTheArguments12345678 => { + return "baz"; + }; + +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => restOfTheArguments12345678 => { + return "baz"; + }; + +bifornCringer = + askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }; + +const bifornCringer1 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo) => restOfTheArguments12345678 => { + return "baz"; + }); + +const bifornCringer2 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => restOfTheArguments12345678 => { + return "baz"; + }); + +const bifornCringer3 = + (askTrovenaBeenaDepends = + glimseGlyphs = + (argumentOne, argumentTwo, argumentThree) => { + return "baz"; + }); + +================================================================================ +`; + +exports[`block_like.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = () => ({} = this); + +=====================================output===================================== +a = () => ({} = this); + +================================================================================ +`; + +exports[`block_like.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = () => ({} = this); + +=====================================output===================================== +a = () => ({} = this); + +================================================================================ +`; + +exports[`call.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Seq(typeDef.interface.groups).forEach(group => + Seq(group.members).forEach((member, memberName) => + markdownDoc( + member.doc, + { typePath: typePath.concat(memberName.slice(1)), + signatures: member.signatures } + ) + ) +) + +const promiseFromCallback = fn => + new Promise((resolve, reject) => + fn((err, result) => { + if (err) return reject(err); + return resolve(result); + }) + ); + +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1 + }, +); + +function render() { + return ( + <View> + <Image + onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + 100 * e.nativeEvent.loaded / e.nativeEvent.total, + ), + })} + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + 100 * e.nativeEvent.loaded / e.nativeEvent.total, + ), + })} + /> + </View> + ); +} + +jest.mock( + '../SearchSource', + () => class { + findMatchingTests(pattern) { + return {paths: []}; + } + }, +); + +fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next => + dispatch(action), +); + +foo( + ({ + a, + + b + }) => {} +); + +foo( + ({ + a, + b + + }) => {} +); + +foo( + ({ + a, + b + }) => {} +); + +foo( + a, + ({ + a, + + b + }) => {} +) + +foo( + ({ + a, + + b + }) => a +); + +foo( + ({ + a, + b + }) => a +); + +foo( + ({ + a, + b + + }) => a +); + +foo( + ({ + a: { + a, + + b + } + }) => {} +); + +foo( + ({ + a: { + b: { + c, + + d + } + } + }) => {} +); + +foo( + ({ + a: { + b: { + c: { + d, + + e + } + } + } + }) => {} +); + +foo( + ({ + a: { + a, + + b + } + }) => a +); + +foo( + ({ + a: { + b: { + c, + + d + } + } + }) => a +); + +foo( + ({ + a: { + b: { + c: { + d, + + e + } + } + } + }) => a +); + +foo( + ([ + { + a: { + b: { + c: { + d, + + e + } + } + } + } + ]) => {} +); + +foo( + ([ + ...{ + a: { + b: { + c: { + d, + + e + } + } + } + } + ]) => {} +); + +foo( + ( + n = { + a: { + b: { + c: { + d, + + e + } + } + } + } + ) => {} +); + +foo( + ({ + x: [ + { + a, + + b + } + ] + }) => {} +); + +foo( + ( + a = [ + { + a, + + b + } + ] + ) => a +); + +foo( + ([ + [ + { + a, + + b + } + ] + ]) => {} +); + +foo( + ([ + [ + [ + [ + { + a, + b: { + c, + d: { + e, + + f + } + } + } + ] + ] + ] + ]) => {} +); + +foo( + ( + ...{ + a, + + b + } + ) => {} +); + +foo( + ( + ...[ + { + a, + + b + } + ] + ) => {} +); + +foo( + ([ + ...[ + { + a, + + b + } + ] + ]) => {} +); + +foo( + ( + a = [{ + a, + + b + }] + ) => {} +); + +foo( + ( + a = (({ + a, + + b + }) => {})() + ) => {} +); + +foo( + ( + a = f({ + a, + + b + }) + ) => {} +); + +foo( + ( + a = ({ + a, + + b + }) => {} + ) => {} +); + +foo( + ( + a = 1 + + f({ + a, + + b + }) + ) => {} +); + +=====================================output===================================== +Seq(typeDef.interface.groups).forEach((group) => + Seq(group.members).forEach((member, memberName) => + markdownDoc(member.doc, { + typePath: typePath.concat(memberName.slice(1)), + signatures: member.signatures, + }), + ), +); + +const promiseFromCallback = (fn) => + new Promise((resolve, reject) => + fn((err, result) => { + if (err) return reject(err); + return resolve(result); + }), + ); + +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1; + }, +); + +function render() { + return ( + <View> + <Image + onProgress={(e) => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={(e) => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={(e) => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +jest.mock( + "../SearchSource", + () => + class { + findMatchingTests(pattern) { + return { paths: [] }; + } + }, +); + +fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => (next) => dispatch(action), +); + +foo( + ({ + a, + + b, + }) => {}, +); + +foo(({ a, b }) => {}); + +foo(({ a, b }) => {}); + +foo( + a, + ({ + a, + + b, + }) => {}, +); + +foo( + ({ + a, + + b, + }) => a, +); + +foo(({ a, b }) => a); + +foo(({ a, b }) => a); + +foo( + ({ + a: { + a, + + b, + }, + }) => {}, +); + +foo( + ({ + a: { + b: { + c, + + d, + }, + }, + }) => {}, +); + +foo( + ({ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }) => {}, +); + +foo( + ({ + a: { + a, + + b, + }, + }) => a, +); + +foo( + ({ + a: { + b: { + c, + + d, + }, + }, + }) => a, +); + +foo( + ({ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }) => a, +); + +foo( + ([ + { + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }, + ]) => {}, +); + +foo( + ([ + ...{ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + } + ]) => {}, +); + +foo( + ( + n = { + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }, + ) => {}, +); + +foo( + ({ + x: [ + { + a, + + b, + }, + ], + }) => {}, +); + +foo( + ( + a = [ + { + a, + + b, + }, + ], + ) => a, +); + +foo( + ([ + [ + { + a, + + b, + }, + ], + ]) => {}, +); + +foo( + ([ + [ + [ + [ + { + a, + b: { + c, + d: { + e, + + f, + }, + }, + }, + ], + ], + ], + ]) => {}, +); + +foo( + ( + ...{ + a, + + b, + } + ) => {}, +); + +foo( + ( + ...[ + { + a, + + b, + }, + ] + ) => {}, +); + +foo( + ([ + ...[ + { + a, + + b, + }, + ] + ]) => {}, +); + +foo( + ( + a = [ + { + a, + + b, + }, + ], + ) => {}, +); + +foo( + ( + a = (({ + a, + + b, + }) => {})(), + ) => {}, +); + +foo( + ( + a = f({ + a, + + b, + }), + ) => {}, +); + +foo( + ( + a = ({ + a, + + b, + }) => {}, + ) => {}, +); + +foo( + ( + a = 1 + + f({ + a, + + b, + }), + ) => {}, +); + +================================================================================ +`; + +exports[`call.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Seq(typeDef.interface.groups).forEach(group => + Seq(group.members).forEach((member, memberName) => + markdownDoc( + member.doc, + { typePath: typePath.concat(memberName.slice(1)), + signatures: member.signatures } + ) + ) +) + +const promiseFromCallback = fn => + new Promise((resolve, reject) => + fn((err, result) => { + if (err) return reject(err); + return resolve(result); + }) + ); + +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1 + }, +); + +function render() { + return ( + <View> + <Image + onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + 100 * e.nativeEvent.loaded / e.nativeEvent.total, + ), + })} + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + 100 * e.nativeEvent.loaded / e.nativeEvent.total, + ), + })} + /> + </View> + ); +} + +jest.mock( + '../SearchSource', + () => class { + findMatchingTests(pattern) { + return {paths: []}; + } + }, +); + +fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next => + dispatch(action), +); + +foo( + ({ + a, + + b + }) => {} +); + +foo( + ({ + a, + b + + }) => {} +); + +foo( + ({ + a, + b + }) => {} +); + +foo( + a, + ({ + a, + + b + }) => {} +) + +foo( + ({ + a, + + b + }) => a +); + +foo( + ({ + a, + b + }) => a +); + +foo( + ({ + a, + b + + }) => a +); + +foo( + ({ + a: { + a, + + b + } + }) => {} +); + +foo( + ({ + a: { + b: { + c, + + d + } + } + }) => {} +); + +foo( + ({ + a: { + b: { + c: { + d, + + e + } + } + } + }) => {} +); + +foo( + ({ + a: { + a, + + b + } + }) => a +); + +foo( + ({ + a: { + b: { + c, + + d + } + } + }) => a +); + +foo( + ({ + a: { + b: { + c: { + d, + + e + } + } + } + }) => a +); + +foo( + ([ + { + a: { + b: { + c: { + d, + + e + } + } + } + } + ]) => {} +); + +foo( + ([ + ...{ + a: { + b: { + c: { + d, + + e + } + } + } + } + ]) => {} +); + +foo( + ( + n = { + a: { + b: { + c: { + d, + + e + } + } + } + } + ) => {} +); + +foo( + ({ + x: [ + { + a, + + b + } + ] + }) => {} +); + +foo( + ( + a = [ + { + a, + + b + } + ] + ) => a +); + +foo( + ([ + [ + { + a, + + b + } + ] + ]) => {} +); + +foo( + ([ + [ + [ + [ + { + a, + b: { + c, + d: { + e, + + f + } + } + } + ] + ] + ] + ]) => {} +); + +foo( + ( + ...{ + a, + + b + } + ) => {} +); + +foo( + ( + ...[ + { + a, + + b + } + ] + ) => {} +); + +foo( + ([ + ...[ + { + a, + + b + } + ] + ]) => {} +); + +foo( + ( + a = [{ + a, + + b + }] + ) => {} +); + +foo( + ( + a = (({ + a, + + b + }) => {})() + ) => {} +); + +foo( + ( + a = f({ + a, + + b + }) + ) => {} +); + +foo( + ( + a = ({ + a, + + b + }) => {} + ) => {} +); + +foo( + ( + a = 1 + + f({ + a, + + b + }) + ) => {} +); + +=====================================output===================================== +Seq(typeDef.interface.groups).forEach(group => + Seq(group.members).forEach((member, memberName) => + markdownDoc(member.doc, { + typePath: typePath.concat(memberName.slice(1)), + signatures: member.signatures, + }), + ), +); + +const promiseFromCallback = fn => + new Promise((resolve, reject) => + fn((err, result) => { + if (err) return reject(err); + return resolve(result); + }), + ); + +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1; + }, +); + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +function render() { + return ( + <View> + <Image + onProgress={e => + this.setState({ + progress: Math.round( + (100 * e.nativeEvent.loaded) / e.nativeEvent.total, + ), + }) + } + /> + </View> + ); +} + +jest.mock( + "../SearchSource", + () => + class { + findMatchingTests(pattern) { + return { paths: [] }; + } + }, +); + +fooooooooooooooooooooooooooooooooooooooooooooooooooo( + action => next => dispatch(action), +); + +foo( + ({ + a, + + b, + }) => {}, +); + +foo(({ a, b }) => {}); + +foo(({ a, b }) => {}); + +foo( + a, + ({ + a, + + b, + }) => {}, +); + +foo( + ({ + a, + + b, + }) => a, +); + +foo(({ a, b }) => a); + +foo(({ a, b }) => a); + +foo( + ({ + a: { + a, + + b, + }, + }) => {}, +); + +foo( + ({ + a: { + b: { + c, + + d, + }, + }, + }) => {}, +); + +foo( + ({ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }) => {}, +); + +foo( + ({ + a: { + a, + + b, + }, + }) => a, +); + +foo( + ({ + a: { + b: { + c, + + d, + }, + }, + }) => a, +); + +foo( + ({ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }) => a, +); + +foo( + ([ + { + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }, + ]) => {}, +); + +foo( + ([ + ...{ + a: { + b: { + c: { + d, + + e, + }, + }, + }, + } + ]) => {}, +); + +foo( + ( + n = { + a: { + b: { + c: { + d, + + e, + }, + }, + }, + }, + ) => {}, +); + +foo( + ({ + x: [ + { + a, + + b, + }, + ], + }) => {}, +); + +foo( + ( + a = [ + { + a, + + b, + }, + ], + ) => a, +); + +foo( + ([ + [ + { + a, + + b, + }, + ], + ]) => {}, +); + +foo( + ([ + [ + [ + [ + { + a, + b: { + c, + d: { + e, + + f, + }, + }, + }, + ], + ], + ], + ]) => {}, +); + +foo( + ( + ...{ + a, + + b, + } + ) => {}, +); + +foo( + ( + ...[ + { + a, + + b, + }, + ] + ) => {}, +); + +foo( + ([ + ...[ + { + a, + + b, + }, + ] + ]) => {}, +); + +foo( + ( + a = [ + { + a, + + b, + }, + ], + ) => {}, +); + +foo( + ( + a = (({ + a, + + b, + }) => {})(), + ) => {}, +); + +foo( + ( + a = f({ + a, + + b, + }), + ) => {}, +); + +foo( + ( + a = ({ + a, + + b, + }) => {}, + ) => {}, +); + +foo( + ( + a = 1 + + f({ + a, + + b, + }), + ) => {}, +); + +================================================================================ +`; + +exports[`chain-as-arg.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const w = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); + +const x = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const y = a.b( + 1, + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const z = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0, + 2 +)(x); + + +=====================================output===================================== +const w = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + (e) => + 0, +); + +const x = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + (e) => + 0, +)(x); + +const y = a.b( + 1, + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + (e) => + 0, +)(x); + +const z = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + (e) => + 0, + 2, +)(x); + +================================================================================ +`; + +exports[`chain-as-arg.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const w = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); + +const x = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const y = a.b( + 1, + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const z = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0, + 2 +)(x); + + +=====================================output===================================== +const w = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + e => + 0, +); + +const x = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + e => + 0, +)(x); + +const y = a.b( + 1, + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + e => + 0, +)(x); + +const z = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + e => + 0, + 2, +)(x); + +================================================================================ +`; + +exports[`chain-in-logical-expression.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const x = a.b ?? ( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); + +=====================================output===================================== +const x = + a.b ?? + (( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + (e) => + 0); + +================================================================================ +`; + +exports[`chain-in-logical-expression.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const x = a.b ?? ( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); + +=====================================output===================================== +const x = + a.b ?? + (( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + ) => + e => + 0); + +================================================================================ +`; + +exports[`comment.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * Curried function that ends with a BEM CSS Selector + * + * @param {String} block - the BEM Block you'd like to select. + * @returns {Function} + */ +export const bem = block => + /** + * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. + * @returns {Function} + */ + element => + /** + * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. + * @returns {String} + */ + modifier => + [ + ".", + css(block), + element ? \`__\${css(element)}\` : "", + modifier ? \`--\${css(modifier)}\` : "" + ].join(""); + +<FlatList + renderItem={( + info, // $FlowExpectedError - bad widgetCount type 6, should be Object + ) => <span>{info.item.widget.missingProp}</span>} + data={data} +/> + +func(() => // comment +a); +func(() => () => // comment +a); +func(() => () => () => // comment +a); + +func(() => // comment +a ? b : c); +func(() => () => // comment +a ? b : c); +func(() => () => () => // comment +a ? b : c); + +func(() => // comment +(a , b , c)) +func(() => () => // comment +(a , b , c)) +func(() => () => () => // comment +(a , b , c)) + +=====================================output===================================== +/** + * Curried function that ends with a BEM CSS Selector + * + * @param {String} block - the BEM Block you'd like to select. + * @returns {Function} + */ +export const bem = + (block) => + /** + * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. + * @returns {Function} + */ + (element) => + /** + * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. + * @returns {String} + */ + (modifier) => + [ + ".", + css(block), + element ? \`__\${css(element)}\` : "", + modifier ? \`--\${css(modifier)}\` : "", + ].join(""); + +<FlatList + renderItem={( + info, // $FlowExpectedError - bad widgetCount type 6, should be Object + ) => <span>{info.item.widget.missingProp}</span>} + data={data} +/>; + +func( + () => + // comment + a, +); +func( + () => () => + // comment + a, +); +func( + () => () => () => + // comment + a, +); + +func(() => + // comment + a ? b : c, +); +func( + () => () => + // comment + a ? b : c, +); +func( + () => () => () => + // comment + a ? b : c, +); + +func( + () => + // comment + (a, b, c), +); +func( + () => () => + // comment + (a, b, c), +); +func( + () => () => () => + // comment + (a, b, c), +); + +================================================================================ +`; + +exports[`comment.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * Curried function that ends with a BEM CSS Selector + * + * @param {String} block - the BEM Block you'd like to select. + * @returns {Function} + */ +export const bem = block => + /** + * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. + * @returns {Function} + */ + element => + /** + * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. + * @returns {String} + */ + modifier => + [ + ".", + css(block), + element ? \`__\${css(element)}\` : "", + modifier ? \`--\${css(modifier)}\` : "" + ].join(""); + +<FlatList + renderItem={( + info, // $FlowExpectedError - bad widgetCount type 6, should be Object + ) => <span>{info.item.widget.missingProp}</span>} + data={data} +/> + +func(() => // comment +a); +func(() => () => // comment +a); +func(() => () => () => // comment +a); + +func(() => // comment +a ? b : c); +func(() => () => // comment +a ? b : c); +func(() => () => () => // comment +a ? b : c); + +func(() => // comment +(a , b , c)) +func(() => () => // comment +(a , b , c)) +func(() => () => () => // comment +(a , b , c)) + +=====================================output===================================== +/** + * Curried function that ends with a BEM CSS Selector + * + * @param {String} block - the BEM Block you'd like to select. + * @returns {Function} + */ +export const bem = + block => + /** + * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. + * @returns {Function} + */ + element => + /** + * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. + * @returns {String} + */ + modifier => + [ + ".", + css(block), + element ? \`__\${css(element)}\` : "", + modifier ? \`--\${css(modifier)}\` : "", + ].join(""); + +<FlatList + renderItem={( + info, // $FlowExpectedError - bad widgetCount type 6, should be Object + ) => <span>{info.item.widget.missingProp}</span>} + data={data} +/>; + +func( + () => + // comment + a, +); +func( + () => () => + // comment + a, +); +func( + () => () => () => + // comment + a, +); + +func(() => + // comment + a ? b : c, +); +func( + () => () => + // comment + a ? b : c, +); +func( + () => () => () => + // comment + a ? b : c, +); + +func( + () => + // comment + (a, b, c), +); +func( + () => () => + // comment + (a, b, c), +); +func( + () => () => () => + // comment + (a, b, c), +); + +================================================================================ +`; + +exports[`curried.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn1 = a => 3; +const fn2 = a => b => 3; +const fn3 = a => b => c => 3; +const fn4 = a => b => c => d => 3; +const fn5 = a => b => c => d => e => 3; +const fn6 = a => b => c => d => e => g => 3; +const fn7 = a => b => c => d => e => g => f => 3; + +const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); +const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); +const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); +const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); +const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); +const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); +const fn14 = a => b => c => d => e => g => f => ({ foo: bar, bar: baz, baz: foo }); + +const curryTest = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => + ({ + foo: argument1, + bar: argument2, + }); + +let curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +throw (argument1) => +(argument2) => +(argument3) => +(argument4) => +(argument5) => +(argument6) => +(argument7) => +(argument8) => +(argument9) => +(argument10) => +(argument11) => +(argument12) => { + const foo = "foo"; + return foo + "bar"; +}; + +foo((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => 3); + +foo((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + baz: foo + })); + +foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + } +); + +((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => 3)(3); + +bar( + foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + }) + ) +); + +const baaaz = (aaaaa1, bbbbb1) => (aaaaa2, bbbbb2) => (aaaaa3, bbbbb3) => (aaaaa4, bbbbb4) => ({ + foo: bar +}); + +new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => + (next) => + (next) => + (next) => + (next) => + (next) => + (next) => + dispatch(action) +); + +foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => + (next) => + (next) => + (next) => + (next) => + (next) => + (next) => + dispatch(action) +); + +foo(action => action => action); + +import( (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }); + +=====================================output===================================== +const fn1 = (a) => 3; +const fn2 = (a) => (b) => 3; +const fn3 = (a) => (b) => (c) => 3; +const fn4 = (a) => (b) => (c) => (d) => 3; +const fn5 = (a) => (b) => (c) => (d) => (e) => 3; +const fn6 = (a) => (b) => (c) => (d) => (e) => (g) => 3; +const fn7 = (a) => (b) => (c) => (d) => (e) => (g) => (f) => 3; + +const fn8 = (a) => ({ foo: bar, bar: baz, baz: foo }); +const fn9 = (a) => (b) => ({ foo: bar, bar: baz, baz: foo }); +const fn10 = (a) => (b) => (c) => ({ foo: bar, bar: baz, baz: foo }); +const fn11 = (a) => (b) => (c) => (d) => ({ foo: bar, bar: baz, baz: foo }); +const fn12 = (a) => (b) => (c) => (d) => (e) => ({ + foo: bar, + bar: baz, + baz: foo, +}); +const fn13 = (a) => (b) => (c) => (d) => (e) => (g) => ({ + foo: bar, + bar: baz, + baz: foo, +}); +const fn14 = (a) => (b) => (c) => (d) => (e) => (g) => (f) => ({ + foo: bar, + bar: baz, + baz: foo, +}); + +const curryTest = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: argument1, + bar: argument2, + }); + +let curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +throw (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => + 3, +); + +foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + baz: foo, + }), +); + +foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }, +); + +( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => + 3 +)(3); + +bar( + foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + }), + ), +); + +const baaaz = + (aaaaa1, bbbbb1) => + (aaaaa2, bbbbb2) => + (aaaaa3, bbbbb3) => + (aaaaa4, bbbbb4) => ({ + foo: bar, + }); + +new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => (next) => (next) => (next) => (next) => (next) => (next) => + dispatch(action), +); + +foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => (next) => (next) => (next) => (next) => (next) => (next) => + dispatch(action), +); + +foo((action) => (action) => action); + +import( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + } +); + +================================================================================ +`; + +exports[`curried.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn1 = a => 3; +const fn2 = a => b => 3; +const fn3 = a => b => c => 3; +const fn4 = a => b => c => d => 3; +const fn5 = a => b => c => d => e => 3; +const fn6 = a => b => c => d => e => g => 3; +const fn7 = a => b => c => d => e => g => f => 3; + +const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); +const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); +const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); +const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); +const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); +const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); +const fn14 = a => b => c => d => e => g => f => ({ foo: bar, bar: baz, baz: foo }); + +const curryTest = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => + ({ + foo: argument1, + bar: argument2, + }); + +let curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +curryTest2 = + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }; + +throw (argument1) => +(argument2) => +(argument3) => +(argument4) => +(argument5) => +(argument6) => +(argument7) => +(argument8) => +(argument9) => +(argument10) => +(argument11) => +(argument12) => { + const foo = "foo"; + return foo + "bar"; +}; + +foo((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => 3); + +foo((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + baz: foo + })); + +foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + } +); + +((argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => 3)(3); + +bar( + foo( + (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => ({ + foo: bar, + bar: baz, + }) + ) +); + +const baaaz = (aaaaa1, bbbbb1) => (aaaaa2, bbbbb2) => (aaaaa3, bbbbb3) => (aaaaa4, bbbbb4) => ({ + foo: bar +}); + +new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => + (next) => + (next) => + (next) => + (next) => + (next) => + (next) => + dispatch(action) +); + +foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + (action) => + (next) => + (next) => + (next) => + (next) => + (next) => + (next) => + dispatch(action) +); + +foo(action => action => action); + +import( (argument1) => + (argument2) => + (argument3) => + (argument4) => + (argument5) => + (argument6) => + (argument7) => + (argument8) => + (argument9) => + (argument10) => + (argument11) => + (argument12) => { + const foo = "foo"; + return foo + "bar"; + }); + +=====================================output===================================== +const fn1 = a => 3; +const fn2 = a => b => 3; +const fn3 = a => b => c => 3; +const fn4 = a => b => c => d => 3; +const fn5 = a => b => c => d => e => 3; +const fn6 = a => b => c => d => e => g => 3; +const fn7 = a => b => c => d => e => g => f => 3; + +const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); +const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); +const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); +const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); +const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); +const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); +const fn14 = a => b => c => d => e => g => f => ({ + foo: bar, + bar: baz, + baz: foo, +}); + +const curryTest = + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => ({ + foo: argument1, + bar: argument2, + }); + +let curryTest2 = + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => { + const foo = "foo"; + return foo + "bar"; + }; + +curryTest2 = + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => { + const foo = "foo"; + return foo + "bar"; + }; + +throw argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => { + const foo = "foo"; + return foo + "bar"; + }; + +foo( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => + 3, +); + +foo( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => ({ + foo: bar, + bar: baz, + baz: foo, + }), +); + +foo( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => { + const foo = "foo"; + return foo + "bar"; + }, +); + +( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => + 3 +)(3); + +bar( + foo( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => ({ + foo: bar, + bar: baz, + }), + ), +); + +const baaaz = + (aaaaa1, bbbbb1) => + (aaaaa2, bbbbb2) => + (aaaaa3, bbbbb3) => + (aaaaa4, bbbbb4) => ({ + foo: bar, + }); + +new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + action => next => next => next => next => next => next => dispatch(action), +); + +foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( + action => next => next => next => next => next => next => dispatch(action), +); + +foo(action => action => action); + +import( + argument1 => + argument2 => + argument3 => + argument4 => + argument5 => + argument6 => + argument7 => + argument8 => + argument9 => + argument10 => + argument11 => + argument12 => { + const foo = "foo"; + return foo + "bar"; + } +); + +================================================================================ +`; + +exports[`currying.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn = b => c => d => { + return 3; +}; + +const foo = (a, b) => c => d => { + return 3; +}; + +const bar = a => b => c => a + b + c + +const mw = store => next => action => { + return next(action) +} + +const middleware = options => (req, res, next) => { + // ... +}; + +=====================================output===================================== +const fn = (b) => (c) => (d) => { + return 3; +}; + +const foo = (a, b) => (c) => (d) => { + return 3; +}; + +const bar = (a) => (b) => (c) => a + b + c; + +const mw = (store) => (next) => (action) => { + return next(action); +}; + +const middleware = (options) => (req, res, next) => { + // ... +}; + +================================================================================ +`; + +exports[`currying.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn = b => c => d => { + return 3; +}; + +const foo = (a, b) => c => d => { + return 3; +}; + +const bar = a => b => c => a + b + c + +const mw = store => next => action => { + return next(action) +} + +const middleware = options => (req, res, next) => { + // ... +}; + +=====================================output===================================== +const fn = b => c => d => { + return 3; +}; + +const foo = (a, b) => c => d => { + return 3; +}; + +const bar = a => b => c => a + b + c; + +const mw = store => next => action => { + return next(action); +}; + +const middleware = options => (req, res, next) => { + // ... +}; + +================================================================================ +`; + +exports[`currying-2.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = + (x) => (y) => (z) => + x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; + +request.get('https://preview-9992--prettier.netlify.app', head => body => { + console.log(head, body); +}); + +request.get('https://preview-9992--prettier.netlify.app', head => body => mody => { + console.log(head, body); +}); + +request.get('https://preview-9992--prettier.netlify.app', head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { + console.log(head, body); +}); +=====================================output===================================== +const a = (x) => (y) => (z) => + x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; + +request.get("https://preview-9992--prettier.netlify.app", (head) => (body) => { + console.log(head, body); +}); + +request.get( + "https://preview-9992--prettier.netlify.app", + (head) => (body) => (mody) => { + console.log(head, body); + }, +); + +request.get( + "https://preview-9992--prettier.netlify.app", + (head) => + (body) => + (modyLoremIpsumDolorAbstractProviderFactoryServiceModule) => { + console.log(head, body); + }, +); + +================================================================================ +`; + +exports[`currying-2.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = + (x) => (y) => (z) => + x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; + +request.get('https://preview-9992--prettier.netlify.app', head => body => { + console.log(head, body); +}); + +request.get('https://preview-9992--prettier.netlify.app', head => body => mody => { + console.log(head, body); +}); + +request.get('https://preview-9992--prettier.netlify.app', head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { + console.log(head, body); +}); +=====================================output===================================== +const a = x => y => z => + x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; + +request.get("https://preview-9992--prettier.netlify.app", head => body => { + console.log(head, body); +}); + +request.get( + "https://preview-9992--prettier.netlify.app", + head => body => mody => { + console.log(head, body); + }, +); + +request.get( + "https://preview-9992--prettier.netlify.app", + head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { + console.log(head, body); + }, +); + +================================================================================ +`; + +exports[`currying-3.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +((b) => (c) => (d) => { + return 3; +})(x); + +function f( + a = (fooLorem) => (bazIpsum) => (barLorem) => { + return 3; + } +) {} + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => { + return 3; + } +)(x); + +( + (b) => (c) => (d) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); + +( + (fooLorem) => (bazIpsum) => (barLorem) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(boo); + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x); +=====================================output===================================== +((b) => (c) => (d) => { + return 3; +})(x); + +function f( + a = (fooLorem) => (bazIpsum) => (barLorem) => { + return 3; + }, +) {} + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => { + return 3; + } +)(x); + +( + (b) => (c) => (d) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); + +( + (fooLorem) => (bazIpsum) => (barLorem) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(boo); + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x); + +================================================================================ +`; + +exports[`currying-3.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +((b) => (c) => (d) => { + return 3; +})(x); + +function f( + a = (fooLorem) => (bazIpsum) => (barLorem) => { + return 3; + } +) {} + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => { + return 3; + } +)(x); + +( + (b) => (c) => (d) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); + +( + (fooLorem) => (bazIpsum) => (barLorem) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(boo); + +( + (fooLoremIpsumFactory) => + (bazLoremIpsumFactory) => + (barLoremIpsumServiceFactory) => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x); +=====================================output===================================== +(b => c => d => { + return 3; +})(x); + +function f( + a = fooLorem => bazIpsum => barLorem => { + return 3; + }, +) {} + +( + fooLoremIpsumFactory => + bazLoremIpsumFactory => + barLoremIpsumServiceFactory => { + return 3; + } +)(x); + +( + b => c => d => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); + +( + fooLorem => bazIpsum => barLorem => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(boo); + +( + fooLoremIpsumFactory => bazLoremIpsumFactory => barLoremIpsumServiceFactory => + b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) +)(x); + +================================================================================ +`; + +exports[`currying-4.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Y(() => a ? b : c); + +Y(() => () => a ? b : c); + +Y(() => () => () => a ? b : c); + +Y(() => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +const x1 = (() => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x2 = (() => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x3 = (() => () => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +f((a) => (1, 2, 3) /* a */); +f((a) => ( + (b) => (1, 2, 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1, 2, 3) /* c */ + ) /* b */ +) /* a */); + +f((a) => (1 ? 2 : 3) /* a */); +f((a) => ( + (b) => (1 ? 2 : 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1 ? 2 : 3) /* c */ + ) /* b */ +) /* a */); + +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => test, +); +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => (test ? 1 : 2), +); + +=====================================output===================================== +Y(() => (a ? b : c)); + +Y(() => () => (a ? b : c)); + +Y(() => () => () => (a ? b : c)); + +Y(() => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +Y( + () => () => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +Y( + () => () => () => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +const x1 = () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +const x2 = () => () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +const x3 = () => () => () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +f((a) => (1, 2, 3) /* a */); +f((a) => (b) => (1, 2, 3) /* b */ /* a */); +f((a) => (b) => (c) => (1, 2, 3) /* c */ /* b */ /* a */); + +f((a) => (1 ? 2 : 3) /* a */); +f((a) => (b) => (1 ? 2 : 3) /* b */ /* a */); +f((a) => (b) => (c) => (1 ? 2 : 3) /* c */ /* b */ /* a */); + +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => + test, +); +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => + test ? 1 : 2, +); + +================================================================================ +`; + +exports[`currying-4.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Y(() => a ? b : c); + +Y(() => () => a ? b : c); + +Y(() => () => () => a ? b : c); + +Y(() => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +const x1 = (() => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x2 = (() => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x3 = (() => () => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +f((a) => (1, 2, 3) /* a */); +f((a) => ( + (b) => (1, 2, 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1, 2, 3) /* c */ + ) /* b */ +) /* a */); + +f((a) => (1 ? 2 : 3) /* a */); +f((a) => ( + (b) => (1 ? 2 : 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1 ? 2 : 3) /* c */ + ) /* b */ +) /* a */); + +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => test, +); +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => (test ? 1 : 2), +); + +=====================================output===================================== +Y(() => (a ? b : c)); + +Y(() => () => (a ? b : c)); + +Y(() => () => () => (a ? b : c)); + +Y(() => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +Y( + () => () => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +Y( + () => () => () => + longlonglonglonglonglonglonglonglonglongCondition + ? "Prettier is an opinionated code formatter." + : "Prettier takes your code and reprints it from scratch by taking the line length into account.", +); + +const x1 = () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +const x2 = () => () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +const x3 = () => () => () => [ + "The", + "green", + "dragon", + "liked", + "to", + "knit", + "sweaters", + "for", + "the", + "fluffy", + "clouds", + "in", + "the", + "sky.", +]; + +f(a => (1, 2, 3) /* a */); +f(a => b => (1, 2, 3) /* b */ /* a */); +f(a => b => c => (1, 2, 3) /* c */ /* b */ /* a */); + +f(a => (1 ? 2 : 3) /* a */); +f(a => b => (1 ? 2 : 3) /* b */ /* a */); +f(a => b => c => (1 ? 2 : 3) /* c */ /* b */ /* a */); + +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => + test, +); +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => + test ? 1 : 2, +); + +================================================================================ +`; + +exports[`issue-1389-curry.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foobar = (argumentOne, argumentTwo, argumentThree) => + (...restOfTheArguments) => { + return "baz"; + }; + +const foobaz = (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments123, j) => { + return "baz"; + }; + + +const makeSomeFunction = + (services = {logger:null}) => + (a, b, c) => + services.logger(a,b,c) + +const makeSomeFunction2 = + (services = { + logger: null + }) => + (a, b, c) => + services.logger(a, b, c) + +=====================================output===================================== +const foobar = + (argumentOne, argumentTwo, argumentThree) => + (...restOfTheArguments) => { + return "baz"; + }; + +const foobaz = + (argumentOne, argumentTwo, argumentThree) => (restOfTheArguments123, j) => { + return "baz"; + }; + +const makeSomeFunction = + (services = { logger: null }) => + (a, b, c) => + services.logger(a, b, c); + +const makeSomeFunction2 = + ( + services = { + logger: null, + }, + ) => + (a, b, c) => + services.logger(a, b, c); + +================================================================================ +`; + +exports[`issue-1389-curry.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foobar = (argumentOne, argumentTwo, argumentThree) => + (...restOfTheArguments) => { + return "baz"; + }; + +const foobaz = (argumentOne, argumentTwo, argumentThree) => + (restOfTheArguments123, j) => { + return "baz"; + }; + + +const makeSomeFunction = + (services = {logger:null}) => + (a, b, c) => + services.logger(a,b,c) + +const makeSomeFunction2 = + (services = { + logger: null + }) => + (a, b, c) => + services.logger(a, b, c) + +=====================================output===================================== +const foobar = + (argumentOne, argumentTwo, argumentThree) => + (...restOfTheArguments) => { + return "baz"; + }; + +const foobaz = + (argumentOne, argumentTwo, argumentThree) => (restOfTheArguments123, j) => { + return "baz"; + }; + +const makeSomeFunction = + (services = { logger: null }) => + (a, b, c) => + services.logger(a, b, c); + +const makeSomeFunction2 = + ( + services = { + logger: null, + }, + ) => + (a, b, c) => + services.logger(a, b, c); + +================================================================================ +`; + +exports[`issue-4166-curry.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const myCurriedFn = arg1 => + arg2 => + arg3 => arg1 + arg2 + arg3; + +=====================================output===================================== +const myCurriedFn = (arg1) => (arg2) => (arg3) => arg1 + arg2 + arg3; + +================================================================================ +`; + +exports[`issue-4166-curry.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const myCurriedFn = arg1 => + arg2 => + arg3 => arg1 + arg2 + arg3; + +=====================================output===================================== +const myCurriedFn = arg1 => arg2 => arg3 => arg1 + arg2 + arg3; + +================================================================================ +`; + +exports[`long-call-no-args.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) + +=====================================output===================================== +veryLongCall( + VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, + () => {}, +); + +================================================================================ +`; + +exports[`long-call-no-args.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) + +=====================================output===================================== +veryLongCall( + VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, + () => {}, +); + +================================================================================ +`; + +exports[`long-contents.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = () => { + expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); +}; + +=====================================output===================================== +const foo = () => { + expect(arg1, arg2, arg3).toEqual({ + message: "test", + messageType: "SMS", + status: "Unknown", + created: "11/01/2017 13:36", + }); +}; + +================================================================================ +`; + +exports[`long-contents.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = () => { + expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); +}; + +=====================================output===================================== +const foo = () => { + expect(arg1, arg2, arg3).toEqual({ + message: "test", + messageType: "SMS", + status: "Unknown", + created: "11/01/2017 13:36", + }); +}; + +================================================================================ +`; + +exports[`parens.js - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +promise.then( + (result) => result, + (err) => err +) + +promise.then( + (result) => { f(); return result }, + (err) => { f(); return err } +) + +foo(a => b) +foo(a => { return b }) +foo(c, a => b) +foo(c, a => b, d) +foo(a => b, d) + +foo(a => (0, 1)); +foo(a => b => (0, 1)); + +() => ({} ? 1 : 2); +() => () => ({} ? 1 : 2); + +=====================================output===================================== +promise.then( + (result) => result, + (err) => err, +); + +promise.then( + (result) => { + f(); + return result; + }, + (err) => { + f(); + return err; + }, +); + +foo((a) => b); +foo((a) => { + return b; +}); +foo(c, (a) => b); +foo(c, (a) => b, d); +foo((a) => b, d); + +foo((a) => (0, 1)); +foo((a) => (b) => (0, 1)); + +() => ({}) ? 1 : 2; +() => () => ({}) ? 1 : 2; + +================================================================================ +`; + +exports[`parens.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +promise.then( + (result) => result, + (err) => err +) + +promise.then( + (result) => { f(); return result }, + (err) => { f(); return err } +) + +foo(a => b) +foo(a => { return b }) +foo(c, a => b) +foo(c, a => b, d) +foo(a => b, d) + +foo(a => (0, 1)); +foo(a => b => (0, 1)); + +() => ({} ? 1 : 2); +() => () => ({} ? 1 : 2); + +=====================================output===================================== +promise.then( + result => result, + err => err, +); + +promise.then( + result => { + f(); + return result; + }, + err => { + f(); + return err; + }, +); + +foo(a => b); +foo(a => { + return b; +}); +foo(c, a => b); +foo(c, a => b, d); +foo(a => b, d); + +foo(a => (0, 1)); +foo(a => b => (0, 1)); + +() => ({}) ? 1 : 2; +() => () => ({}) ? 1 : 2; + +================================================================================ +`; diff --git a/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e9f44111fe0c..000000000000 --- a/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,3783 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow_function_expression.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a => {}).length -typeof (() => {}); -export default (() => {})(); -(() => {})()\`\`; -(() => {})\`\`; -new (() => {}); -if ((() => {}) ? 1 : 0) {} -let f = () => ({}()) -let a = () => ({} instanceof a); -a = () => ({} && a); -a = () => ({}() && a); -a = () => ({} && a && b); -a = () => ({} + a); -a = () => ({}()() && a); -a = () => ({}.b && a); -a = () => ({}[b] && a); -a = () => ({}\`\` && a); -a = () => ({} = 0); -a = () => ({}, a); -a => a instanceof {}; -a => ({}().b && 0) -a => ({}().c = 0) -x => ({}()()) -x => ({}()\`\`) -x => ({}().b); -a = b => c; -x => (y = z); -x => (y += z); -f(a => ({})) + 1; -(a => ({})) || 0; -a = b => c; -a = b => { - return c -}; - -=====================================output===================================== -((a) => {}).length; -typeof (() => {}); -export default (() => {})(); -(() => {})()\`\`; -(() => {})\`\`; -new (() => {})(); -if ((() => {}) ? 1 : 0) { -} -let f = () => ({}()); -let a = () => ({} instanceof a); -a = () => ({} && a); -a = () => ({}() && a); -a = () => ({} && a && b); -a = () => ({} + a); -a = () => ({}()() && a); -a = () => ({}.b && a); -a = () => ({}[b] && a); -a = () => ({}\`\` && a); -a = () => ({} = 0); -a = () => ({}, a); -(a) => a instanceof {}; -(a) => ({}().b && 0); -(a) => ({}().c = 0); -(x) => ({}()()); -(x) => ({}()\`\`); -(x) => ({}().b); -a = (b) => c; -(x) => (y = z); -(x) => (y += z); -f((a) => ({})) + 1; -((a) => ({})) || 0; -a = (b) => c; -a = (b) => { - return c; -}; - -================================================================================ -`; - -exports[`arrow_function_expression.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a => {}).length -typeof (() => {}); -export default (() => {})(); -(() => {})()\`\`; -(() => {})\`\`; -new (() => {}); -if ((() => {}) ? 1 : 0) {} -let f = () => ({}()) -let a = () => ({} instanceof a); -a = () => ({} && a); -a = () => ({}() && a); -a = () => ({} && a && b); -a = () => ({} + a); -a = () => ({}()() && a); -a = () => ({}.b && a); -a = () => ({}[b] && a); -a = () => ({}\`\` && a); -a = () => ({} = 0); -a = () => ({}, a); -a => a instanceof {}; -a => ({}().b && 0) -a => ({}().c = 0) -x => ({}()()) -x => ({}()\`\`) -x => ({}().b); -a = b => c; -x => (y = z); -x => (y += z); -f(a => ({})) + 1; -(a => ({})) || 0; -a = b => c; -a = b => { - return c -}; - -=====================================output===================================== -(a => {}).length; -typeof (() => {}); -export default (() => {})(); -(() => {})()\`\`; -(() => {})\`\`; -new (() => {})(); -if ((() => {}) ? 1 : 0) { -} -let f = () => ({}()); -let a = () => ({} instanceof a); -a = () => ({} && a); -a = () => ({}() && a); -a = () => ({} && a && b); -a = () => ({} + a); -a = () => ({}()() && a); -a = () => ({}.b && a); -a = () => ({}[b] && a); -a = () => ({}\`\` && a); -a = () => ({} = 0); -a = () => ({}, a); -a => a instanceof {}; -a => ({}().b && 0); -a => ({}().c = 0); -x => ({}()()); -x => ({}()\`\`); -x => ({}().b); -a = b => c; -x => (y = z); -x => (y += z); -f(a => ({})) + 1; -(a => ({})) || 0; -a = b => c; -a = b => { - return c; -}; - -================================================================================ -`; - -exports[`arrow-chain-with-trailing-comments.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -x = (bifornCringerMoshedPerplexSawder) => ((askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => (f00) => { - averredBathersBoxroomBuggyNurl(); -} // BOOM -) - -x2 = (a) => ((askTrovenaBeenaDependsRowans1, askTrovenaBeenaDependsRowans2, askTrovenaBeenaDependsRowans3) => { - c(); -} /* ! */ // KABOOM -) - -=====================================output===================================== -x = - (bifornCringerMoshedPerplexSawder) => - (askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => - (f00) => { - averredBathersBoxroomBuggyNurl(); - }; // BOOM - -x2 = - (a) => - ( - askTrovenaBeenaDependsRowans1, - askTrovenaBeenaDependsRowans2, - askTrovenaBeenaDependsRowans3 - ) => { - c(); - } /* ! */; // KABOOM - -================================================================================ -`; - -exports[`arrow-chain-with-trailing-comments.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -x = (bifornCringerMoshedPerplexSawder) => ((askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => (f00) => { - averredBathersBoxroomBuggyNurl(); -} // BOOM -) - -x2 = (a) => ((askTrovenaBeenaDependsRowans1, askTrovenaBeenaDependsRowans2, askTrovenaBeenaDependsRowans3) => { - c(); -} /* ! */ // KABOOM -) - -=====================================output===================================== -x = - bifornCringerMoshedPerplexSawder => - (askTrovenaBeenaDependsRowans, glimseGlyphsHazardNoopsTieTie) => - f00 => { - averredBathersBoxroomBuggyNurl(); - }; // BOOM - -x2 = - a => - ( - askTrovenaBeenaDependsRowans1, - askTrovenaBeenaDependsRowans2, - askTrovenaBeenaDependsRowans3 - ) => { - c(); - } /* ! */; // KABOOM - -================================================================================ -`; - -exports[`assignment-chain-with-arrow-chain.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, -) => restOfTheArguments12345678 => { - return "baz"; -}; - -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, - argumentThree -) => restOfTheArguments12345678 => { - return "baz"; -}; - -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, - argumentThree -) => { - return "baz"; -}; - -const bifornCringer1 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { - return "baz"; - }; - -const bifornCringer2 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments12345678) => { - return "baz"; - }; - -const bifornCringer3 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }; - -=====================================output===================================== -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { - return "baz"; - }; - -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments12345678) => { - return "baz"; - }; - -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }; - -const bifornCringer1 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { - return "baz"; - }); - -const bifornCringer2 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments12345678) => { - return "baz"; - }); - -const bifornCringer3 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }); - -================================================================================ -`; - -exports[`assignment-chain-with-arrow-chain.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, -) => restOfTheArguments12345678 => { - return "baz"; -}; - -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, - argumentThree -) => restOfTheArguments12345678 => { - return "baz"; -}; - -bifornCringer = askTrovenaBeenaDepends = glimseGlyphs = ( - argumentOne, - argumentTwo, - argumentThree -) => { - return "baz"; -}; - -const bifornCringer1 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => (restOfTheArguments12345678) => { - return "baz"; - }; - -const bifornCringer2 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments12345678) => { - return "baz"; - }; - -const bifornCringer3 = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }; - -=====================================output===================================== -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => restOfTheArguments12345678 => { - return "baz"; - }; - -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => restOfTheArguments12345678 => { - return "baz"; - }; - -bifornCringer = - askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }; - -const bifornCringer1 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo) => restOfTheArguments12345678 => { - return "baz"; - }); - -const bifornCringer2 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => restOfTheArguments12345678 => { - return "baz"; - }); - -const bifornCringer3 = - (askTrovenaBeenaDepends = - glimseGlyphs = - (argumentOne, argumentTwo, argumentThree) => { - return "baz"; - }); - -================================================================================ -`; - -exports[`block_like.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = () => ({} = this); - -=====================================output===================================== -a = () => ({} = this); - -================================================================================ -`; - -exports[`block_like.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = () => ({} = this); - -=====================================output===================================== -a = () => ({} = this); - -================================================================================ -`; - -exports[`call.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -Seq(typeDef.interface.groups).forEach(group => - Seq(group.members).forEach((member, memberName) => - markdownDoc( - member.doc, - { typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures } - ) - ) -) - -const promiseFromCallback = fn => - new Promise((resolve, reject) => - fn((err, result) => { - if (err) return reject(err); - return resolve(result); - }) - ); - -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1 - }, -); - -function render() { - return ( - <View> - <Image - onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - 100 * e.nativeEvent.loaded / e.nativeEvent.total, - ), - })} - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - 100 * e.nativeEvent.loaded / e.nativeEvent.total, - ), - })} - /> - </View> - ); -} - -jest.mock( - '../SearchSource', - () => class { - findMatchingTests(pattern) { - return {paths: []}; - } - }, -); - -fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next => - dispatch(action), -); - -foo( - ({ - a, - - b - }) => {} -); - -foo( - ({ - a, - b - - }) => {} -); - -foo( - ({ - a, - b - }) => {} -); - -foo( - a, - ({ - a, - - b - }) => {} -) - -foo( - ({ - a, - - b - }) => a -); - -foo( - ({ - a, - b - }) => a -); - -foo( - ({ - a, - b - - }) => a -); - -foo( - ({ - a: { - a, - - b - } - }) => {} -); - -foo( - ({ - a: { - b: { - c, - - d - } - } - }) => {} -); - -foo( - ({ - a: { - b: { - c: { - d, - - e - } - } - } - }) => {} -); - -foo( - ({ - a: { - a, - - b - } - }) => a -); - -foo( - ({ - a: { - b: { - c, - - d - } - } - }) => a -); - -foo( - ({ - a: { - b: { - c: { - d, - - e - } - } - } - }) => a -); - -foo( - ([ - { - a: { - b: { - c: { - d, - - e - } - } - } - } - ]) => {} -); - -foo( - ([ - ...{ - a: { - b: { - c: { - d, - - e - } - } - } - } - ]) => {} -); - -foo( - ( - n = { - a: { - b: { - c: { - d, - - e - } - } - } - } - ) => {} -); - -foo( - ({ - x: [ - { - a, - - b - } - ] - }) => {} -); - -foo( - ( - a = [ - { - a, - - b - } - ] - ) => a -); - -foo( - ([ - [ - { - a, - - b - } - ] - ]) => {} -); - -foo( - ([ - [ - [ - [ - { - a, - b: { - c, - d: { - e, - - f - } - } - } - ] - ] - ] - ]) => {} -); - -foo( - ( - ...{ - a, - - b - } - ) => {} -); - -foo( - ( - ...[ - { - a, - - b - } - ] - ) => {} -); - -foo( - ([ - ...[ - { - a, - - b - } - ] - ]) => {} -); - -foo( - ( - a = [{ - a, - - b - }] - ) => {} -); - -foo( - ( - a = (({ - a, - - b - }) => {})() - ) => {} -); - -foo( - ( - a = f({ - a, - - b - }) - ) => {} -); - -foo( - ( - a = ({ - a, - - b - }) => {} - ) => {} -); - -foo( - ( - a = 1 + - f({ - a, - - b - }) - ) => {} -); - -=====================================output===================================== -Seq(typeDef.interface.groups).forEach((group) => - Seq(group.members).forEach((member, memberName) => - markdownDoc(member.doc, { - typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures, - }) - ) -); - -const promiseFromCallback = (fn) => - new Promise((resolve, reject) => - fn((err, result) => { - if (err) return reject(err); - return resolve(result); - }) - ); - -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1; - } -); - -function render() { - return ( - <View> - <Image - onProgress={(e) => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={(e) => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={(e) => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -jest.mock( - "../SearchSource", - () => - class { - findMatchingTests(pattern) { - return { paths: [] }; - } - } -); - -fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => (next) => dispatch(action) -); - -foo( - ({ - a, - - b, - }) => {} -); - -foo(({ a, b }) => {}); - -foo(({ a, b }) => {}); - -foo( - a, - ({ - a, - - b, - }) => {} -); - -foo( - ({ - a, - - b, - }) => a -); - -foo(({ a, b }) => a); - -foo(({ a, b }) => a); - -foo( - ({ - a: { - a, - - b, - }, - }) => {} -); - -foo( - ({ - a: { - b: { - c, - - d, - }, - }, - }) => {} -); - -foo( - ({ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }) => {} -); - -foo( - ({ - a: { - a, - - b, - }, - }) => a -); - -foo( - ({ - a: { - b: { - c, - - d, - }, - }, - }) => a -); - -foo( - ({ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }) => a -); - -foo( - ([ - { - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }, - ]) => {} -); - -foo( - ([ - ...{ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - } - ]) => {} -); - -foo( - ( - n = { - a: { - b: { - c: { - d, - - e, - }, - }, - }, - } - ) => {} -); - -foo( - ({ - x: [ - { - a, - - b, - }, - ], - }) => {} -); - -foo( - ( - a = [ - { - a, - - b, - }, - ] - ) => a -); - -foo( - ([ - [ - { - a, - - b, - }, - ], - ]) => {} -); - -foo( - ([ - [ - [ - [ - { - a, - b: { - c, - d: { - e, - - f, - }, - }, - }, - ], - ], - ], - ]) => {} -); - -foo( - ( - ...{ - a, - - b, - } - ) => {} -); - -foo( - ( - ...[ - { - a, - - b, - }, - ] - ) => {} -); - -foo( - ([ - ...[ - { - a, - - b, - }, - ] - ]) => {} -); - -foo( - ( - a = [ - { - a, - - b, - }, - ] - ) => {} -); - -foo( - ( - a = (({ - a, - - b, - }) => {})() - ) => {} -); - -foo( - ( - a = f({ - a, - - b, - }) - ) => {} -); - -foo( - ( - a = ({ - a, - - b, - }) => {} - ) => {} -); - -foo( - ( - a = 1 + - f({ - a, - - b, - }) - ) => {} -); - -================================================================================ -`; - -exports[`call.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -Seq(typeDef.interface.groups).forEach(group => - Seq(group.members).forEach((member, memberName) => - markdownDoc( - member.doc, - { typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures } - ) - ) -) - -const promiseFromCallback = fn => - new Promise((resolve, reject) => - fn((err, result) => { - if (err) return reject(err); - return resolve(result); - }) - ); - -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1 - }, -); - -function render() { - return ( - <View> - <Image - onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - 100 * e.nativeEvent.loaded / e.nativeEvent.total, - ), - })} - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - 100 * e.nativeEvent.loaded / e.nativeEvent.total, - ), - })} - /> - </View> - ); -} - -jest.mock( - '../SearchSource', - () => class { - findMatchingTests(pattern) { - return {paths: []}; - } - }, -); - -fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next => - dispatch(action), -); - -foo( - ({ - a, - - b - }) => {} -); - -foo( - ({ - a, - b - - }) => {} -); - -foo( - ({ - a, - b - }) => {} -); - -foo( - a, - ({ - a, - - b - }) => {} -) - -foo( - ({ - a, - - b - }) => a -); - -foo( - ({ - a, - b - }) => a -); - -foo( - ({ - a, - b - - }) => a -); - -foo( - ({ - a: { - a, - - b - } - }) => {} -); - -foo( - ({ - a: { - b: { - c, - - d - } - } - }) => {} -); - -foo( - ({ - a: { - b: { - c: { - d, - - e - } - } - } - }) => {} -); - -foo( - ({ - a: { - a, - - b - } - }) => a -); - -foo( - ({ - a: { - b: { - c, - - d - } - } - }) => a -); - -foo( - ({ - a: { - b: { - c: { - d, - - e - } - } - } - }) => a -); - -foo( - ([ - { - a: { - b: { - c: { - d, - - e - } - } - } - } - ]) => {} -); - -foo( - ([ - ...{ - a: { - b: { - c: { - d, - - e - } - } - } - } - ]) => {} -); - -foo( - ( - n = { - a: { - b: { - c: { - d, - - e - } - } - } - } - ) => {} -); - -foo( - ({ - x: [ - { - a, - - b - } - ] - }) => {} -); - -foo( - ( - a = [ - { - a, - - b - } - ] - ) => a -); - -foo( - ([ - [ - { - a, - - b - } - ] - ]) => {} -); - -foo( - ([ - [ - [ - [ - { - a, - b: { - c, - d: { - e, - - f - } - } - } - ] - ] - ] - ]) => {} -); - -foo( - ( - ...{ - a, - - b - } - ) => {} -); - -foo( - ( - ...[ - { - a, - - b - } - ] - ) => {} -); - -foo( - ([ - ...[ - { - a, - - b - } - ] - ]) => {} -); - -foo( - ( - a = [{ - a, - - b - }] - ) => {} -); - -foo( - ( - a = (({ - a, - - b - }) => {})() - ) => {} -); - -foo( - ( - a = f({ - a, - - b - }) - ) => {} -); - -foo( - ( - a = ({ - a, - - b - }) => {} - ) => {} -); - -foo( - ( - a = 1 + - f({ - a, - - b - }) - ) => {} -); - -=====================================output===================================== -Seq(typeDef.interface.groups).forEach(group => - Seq(group.members).forEach((member, memberName) => - markdownDoc(member.doc, { - typePath: typePath.concat(memberName.slice(1)), - signatures: member.signatures, - }) - ) -); - -const promiseFromCallback = fn => - new Promise((resolve, reject) => - fn((err, result) => { - if (err) return reject(err); - return resolve(result); - }) - ); - -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1; - } -); - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -function render() { - return ( - <View> - <Image - onProgress={e => - this.setState({ - progress: Math.round( - (100 * e.nativeEvent.loaded) / e.nativeEvent.total - ), - }) - } - /> - </View> - ); -} - -jest.mock( - "../SearchSource", - () => - class { - findMatchingTests(pattern) { - return { paths: [] }; - } - } -); - -fooooooooooooooooooooooooooooooooooooooooooooooooooo( - action => next => dispatch(action) -); - -foo( - ({ - a, - - b, - }) => {} -); - -foo(({ a, b }) => {}); - -foo(({ a, b }) => {}); - -foo( - a, - ({ - a, - - b, - }) => {} -); - -foo( - ({ - a, - - b, - }) => a -); - -foo(({ a, b }) => a); - -foo(({ a, b }) => a); - -foo( - ({ - a: { - a, - - b, - }, - }) => {} -); - -foo( - ({ - a: { - b: { - c, - - d, - }, - }, - }) => {} -); - -foo( - ({ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }) => {} -); - -foo( - ({ - a: { - a, - - b, - }, - }) => a -); - -foo( - ({ - a: { - b: { - c, - - d, - }, - }, - }) => a -); - -foo( - ({ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }) => a -); - -foo( - ([ - { - a: { - b: { - c: { - d, - - e, - }, - }, - }, - }, - ]) => {} -); - -foo( - ([ - ...{ - a: { - b: { - c: { - d, - - e, - }, - }, - }, - } - ]) => {} -); - -foo( - ( - n = { - a: { - b: { - c: { - d, - - e, - }, - }, - }, - } - ) => {} -); - -foo( - ({ - x: [ - { - a, - - b, - }, - ], - }) => {} -); - -foo( - ( - a = [ - { - a, - - b, - }, - ] - ) => a -); - -foo( - ([ - [ - { - a, - - b, - }, - ], - ]) => {} -); - -foo( - ([ - [ - [ - [ - { - a, - b: { - c, - d: { - e, - - f, - }, - }, - }, - ], - ], - ], - ]) => {} -); - -foo( - ( - ...{ - a, - - b, - } - ) => {} -); - -foo( - ( - ...[ - { - a, - - b, - }, - ] - ) => {} -); - -foo( - ([ - ...[ - { - a, - - b, - }, - ] - ]) => {} -); - -foo( - ( - a = [ - { - a, - - b, - }, - ] - ) => {} -); - -foo( - ( - a = (({ - a, - - b, - }) => {})() - ) => {} -); - -foo( - ( - a = f({ - a, - - b, - }) - ) => {} -); - -foo( - ( - a = ({ - a, - - b, - }) => {} - ) => {} -); - -foo( - ( - a = 1 + - f({ - a, - - b, - }) - ) => {} -); - -================================================================================ -`; - -exports[`comment.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/** - * Curried function that ends with a BEM CSS Selector - * - * @param {String} block - the BEM Block you'd like to select. - * @returns {Function} - */ -export const bem = block => - /** - * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. - * @returns {Function} - */ - element => - /** - * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. - * @returns {String} - */ - modifier => - [ - ".", - css(block), - element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "" - ].join(""); - -<FlatList - renderItem={( - info, // $FlowExpectedError - bad widgetCount type 6, should be Object - ) => <span>{info.item.widget.missingProp}</span>} - data={data} -/> - -=====================================output===================================== -/** - * Curried function that ends with a BEM CSS Selector - * - * @param {String} block - the BEM Block you'd like to select. - * @returns {Function} - */ -export const bem = - (block) => - /** - * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. - * @returns {Function} - */ - (element) => - /** - * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. - * @returns {String} - */ - (modifier) => - [ - ".", - css(block), - element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "", - ].join(""); - -<FlatList - renderItem={( - info // $FlowExpectedError - bad widgetCount type 6, should be Object - ) => <span>{info.item.widget.missingProp}</span>} - data={data} -/>; - -================================================================================ -`; - -exports[`comment.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/** - * Curried function that ends with a BEM CSS Selector - * - * @param {String} block - the BEM Block you'd like to select. - * @returns {Function} - */ -export const bem = block => - /** - * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. - * @returns {Function} - */ - element => - /** - * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. - * @returns {String} - */ - modifier => - [ - ".", - css(block), - element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "" - ].join(""); - -<FlatList - renderItem={( - info, // $FlowExpectedError - bad widgetCount type 6, should be Object - ) => <span>{info.item.widget.missingProp}</span>} - data={data} -/> - -=====================================output===================================== -/** - * Curried function that ends with a BEM CSS Selector - * - * @param {String} block - the BEM Block you'd like to select. - * @returns {Function} - */ -export const bem = - block => - /** - * @param {String} [element] - the BEM Element within that block; if undefined, selects the block itself. - * @returns {Function} - */ - element => - /** - * @param {?String} [modifier] - the BEM Modifier for the Block or Element; if undefined, selects the Block or Element unmodified. - * @returns {String} - */ - modifier => - [ - ".", - css(block), - element ? \`__\${css(element)}\` : "", - modifier ? \`--\${css(modifier)}\` : "", - ].join(""); - -<FlatList - renderItem={( - info // $FlowExpectedError - bad widgetCount type 6, should be Object - ) => <span>{info.item.widget.missingProp}</span>} - data={data} -/>; - -================================================================================ -`; - -exports[`curried.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn1 = a => 3; -const fn2 = a => b => 3; -const fn3 = a => b => c => 3; -const fn4 = a => b => c => d => 3; -const fn5 = a => b => c => d => e => 3; -const fn6 = a => b => c => d => e => g => 3; -const fn7 = a => b => c => d => e => g => f => 3; - -const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); -const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); -const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); -const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); -const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); -const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); -const fn14 = a => b => c => d => e => g => f => ({ foo: bar, bar: baz, baz: foo }); - -const curryTest = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => - ({ - foo: argument1, - bar: argument2, - }); - -let curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -throw (argument1) => -(argument2) => -(argument3) => -(argument4) => -(argument5) => -(argument6) => -(argument7) => -(argument8) => -(argument9) => -(argument10) => -(argument11) => -(argument12) => { - const foo = "foo"; - return foo + "bar"; -}; - -foo((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => 3); - -foo((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - baz: foo - })); - -foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - } -); - -((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => 3)(3); - -bar( - foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - }) - ) -); - -const baaaz = (aaaaa1, bbbbb1) => (aaaaa2, bbbbb2) => (aaaaa3, bbbbb3) => (aaaaa4, bbbbb4) => ({ - foo: bar -}); - -new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => - (next) => - (next) => - (next) => - (next) => - (next) => - (next) => - dispatch(action) -); - -foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => - (next) => - (next) => - (next) => - (next) => - (next) => - (next) => - dispatch(action) -); - -foo(action => action => action); - -import( (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }); - -=====================================output===================================== -const fn1 = (a) => 3; -const fn2 = (a) => (b) => 3; -const fn3 = (a) => (b) => (c) => 3; -const fn4 = (a) => (b) => (c) => (d) => 3; -const fn5 = (a) => (b) => (c) => (d) => (e) => 3; -const fn6 = (a) => (b) => (c) => (d) => (e) => (g) => 3; -const fn7 = (a) => (b) => (c) => (d) => (e) => (g) => (f) => 3; - -const fn8 = (a) => ({ foo: bar, bar: baz, baz: foo }); -const fn9 = (a) => (b) => ({ foo: bar, bar: baz, baz: foo }); -const fn10 = (a) => (b) => (c) => ({ foo: bar, bar: baz, baz: foo }); -const fn11 = (a) => (b) => (c) => (d) => ({ foo: bar, bar: baz, baz: foo }); -const fn12 = (a) => (b) => (c) => (d) => (e) => ({ - foo: bar, - bar: baz, - baz: foo, -}); -const fn13 = (a) => (b) => (c) => (d) => (e) => (g) => ({ - foo: bar, - bar: baz, - baz: foo, -}); -const fn14 = (a) => (b) => (c) => (d) => (e) => (g) => (f) => ({ - foo: bar, - bar: baz, - baz: foo, -}); - -const curryTest = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: argument1, - bar: argument2, - }); - -let curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -throw (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => - 3 -); - -foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - baz: foo, - }) -); - -foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - } -); - -( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => - 3 -)(3); - -bar( - foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - }) - ) -); - -const baaaz = - (aaaaa1, bbbbb1) => - (aaaaa2, bbbbb2) => - (aaaaa3, bbbbb3) => - (aaaaa4, bbbbb4) => ({ - foo: bar, - }); - -new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => (next) => (next) => (next) => (next) => (next) => (next) => - dispatch(action) -); - -foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => (next) => (next) => (next) => (next) => (next) => (next) => - dispatch(action) -); - -foo((action) => (action) => action); - -import( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - } -); - -================================================================================ -`; - -exports[`curried.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn1 = a => 3; -const fn2 = a => b => 3; -const fn3 = a => b => c => 3; -const fn4 = a => b => c => d => 3; -const fn5 = a => b => c => d => e => 3; -const fn6 = a => b => c => d => e => g => 3; -const fn7 = a => b => c => d => e => g => f => 3; - -const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); -const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); -const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); -const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); -const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); -const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); -const fn14 = a => b => c => d => e => g => f => ({ foo: bar, bar: baz, baz: foo }); - -const curryTest = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => - ({ - foo: argument1, - bar: argument2, - }); - -let curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -curryTest2 = - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }; - -throw (argument1) => -(argument2) => -(argument3) => -(argument4) => -(argument5) => -(argument6) => -(argument7) => -(argument8) => -(argument9) => -(argument10) => -(argument11) => -(argument12) => { - const foo = "foo"; - return foo + "bar"; -}; - -foo((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => 3); - -foo((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - baz: foo - })); - -foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - } -); - -((argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => 3)(3); - -bar( - foo( - (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => ({ - foo: bar, - bar: baz, - }) - ) -); - -const baaaz = (aaaaa1, bbbbb1) => (aaaaa2, bbbbb2) => (aaaaa3, bbbbb3) => (aaaaa4, bbbbb4) => ({ - foo: bar -}); - -new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => - (next) => - (next) => - (next) => - (next) => - (next) => - (next) => - dispatch(action) -); - -foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - (action) => - (next) => - (next) => - (next) => - (next) => - (next) => - (next) => - dispatch(action) -); - -foo(action => action => action); - -import( (argument1) => - (argument2) => - (argument3) => - (argument4) => - (argument5) => - (argument6) => - (argument7) => - (argument8) => - (argument9) => - (argument10) => - (argument11) => - (argument12) => { - const foo = "foo"; - return foo + "bar"; - }); - -=====================================output===================================== -const fn1 = a => 3; -const fn2 = a => b => 3; -const fn3 = a => b => c => 3; -const fn4 = a => b => c => d => 3; -const fn5 = a => b => c => d => e => 3; -const fn6 = a => b => c => d => e => g => 3; -const fn7 = a => b => c => d => e => g => f => 3; - -const fn8 = a => ({ foo: bar, bar: baz, baz: foo }); -const fn9 = a => b => ({ foo: bar, bar: baz, baz: foo }); -const fn10 = a => b => c => ({ foo: bar, bar: baz, baz: foo }); -const fn11 = a => b => c => d => ({ foo: bar, bar: baz, baz: foo }); -const fn12 = a => b => c => d => e => ({ foo: bar, bar: baz, baz: foo }); -const fn13 = a => b => c => d => e => g => ({ foo: bar, bar: baz, baz: foo }); -const fn14 = a => b => c => d => e => g => f => ({ - foo: bar, - bar: baz, - baz: foo, -}); - -const curryTest = - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => ({ - foo: argument1, - bar: argument2, - }); - -let curryTest2 = - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => { - const foo = "foo"; - return foo + "bar"; - }; - -curryTest2 = - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => { - const foo = "foo"; - return foo + "bar"; - }; - -throw argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => { - const foo = "foo"; - return foo + "bar"; - }; - -foo( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => - 3 -); - -foo( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => ({ - foo: bar, - bar: baz, - baz: foo, - }) -); - -foo( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => { - const foo = "foo"; - return foo + "bar"; - } -); - -( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => - 3 -)(3); - -bar( - foo( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => ({ - foo: bar, - bar: baz, - }) - ) -); - -const baaaz = - (aaaaa1, bbbbb1) => - (aaaaa2, bbbbb2) => - (aaaaa3, bbbbb3) => - (aaaaa4, bbbbb4) => ({ - foo: bar, - }); - -new Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - action => next => next => next => next => next => next => dispatch(action) -); - -foo?.Fooooooooooooooooooooooooooooooooooooooooooooooooooo( - action => next => next => next => next => next => next => dispatch(action) -); - -foo(action => action => action); - -import( - argument1 => - argument2 => - argument3 => - argument4 => - argument5 => - argument6 => - argument7 => - argument8 => - argument9 => - argument10 => - argument11 => - argument12 => { - const foo = "foo"; - return foo + "bar"; - } -); - -================================================================================ -`; - -exports[`currying.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn = b => c => d => { - return 3; -}; - -const foo = (a, b) => c => d => { - return 3; -}; - -const bar = a => b => c => a + b + c - -const mw = store => next => action => { - return next(action) -} - -const middleware = options => (req, res, next) => { - // ... -}; - -=====================================output===================================== -const fn = (b) => (c) => (d) => { - return 3; -}; - -const foo = (a, b) => (c) => (d) => { - return 3; -}; - -const bar = (a) => (b) => (c) => a + b + c; - -const mw = (store) => (next) => (action) => { - return next(action); -}; - -const middleware = (options) => (req, res, next) => { - // ... -}; - -================================================================================ -`; - -exports[`currying.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn = b => c => d => { - return 3; -}; - -const foo = (a, b) => c => d => { - return 3; -}; - -const bar = a => b => c => a + b + c - -const mw = store => next => action => { - return next(action) -} - -const middleware = options => (req, res, next) => { - // ... -}; - -=====================================output===================================== -const fn = b => c => d => { - return 3; -}; - -const foo = (a, b) => c => d => { - return 3; -}; - -const bar = a => b => c => a + b + c; - -const mw = store => next => action => { - return next(action); -}; - -const middleware = options => (req, res, next) => { - // ... -}; - -================================================================================ -`; - -exports[`currying-2.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = - (x) => (y) => (z) => - x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; - -request.get('https://preview-9992--prettier.netlify.app', head => body => { - console.log(head, body); -}); - -request.get('https://preview-9992--prettier.netlify.app', head => body => mody => { - console.log(head, body); -}); - -request.get('https://preview-9992--prettier.netlify.app', head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { - console.log(head, body); -}); -=====================================output===================================== -const a = (x) => (y) => (z) => - x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; - -request.get("https://preview-9992--prettier.netlify.app", (head) => (body) => { - console.log(head, body); -}); - -request.get( - "https://preview-9992--prettier.netlify.app", - (head) => (body) => (mody) => { - console.log(head, body); - } -); - -request.get( - "https://preview-9992--prettier.netlify.app", - (head) => - (body) => - (modyLoremIpsumDolorAbstractProviderFactoryServiceModule) => { - console.log(head, body); - } -); - -================================================================================ -`; - -exports[`currying-2.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = - (x) => (y) => (z) => - x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; - -request.get('https://preview-9992--prettier.netlify.app', head => body => { - console.log(head, body); -}); - -request.get('https://preview-9992--prettier.netlify.app', head => body => mody => { - console.log(head, body); -}); - -request.get('https://preview-9992--prettier.netlify.app', head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { - console.log(head, body); -}); -=====================================output===================================== -const a = x => y => z => - x / 0.123456789 + (y * calculateSomething(z)) / Math.PI; - -request.get("https://preview-9992--prettier.netlify.app", head => body => { - console.log(head, body); -}); - -request.get( - "https://preview-9992--prettier.netlify.app", - head => body => mody => { - console.log(head, body); - } -); - -request.get( - "https://preview-9992--prettier.netlify.app", - head => body => modyLoremIpsumDolorAbstractProviderFactoryServiceModule => { - console.log(head, body); - } -); - -================================================================================ -`; - -exports[`currying-3.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -((b) => (c) => (d) => { - return 3; -})(x); - -function f( - a = (fooLorem) => (bazIpsum) => (barLorem) => { - return 3; - } -) {} - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => { - return 3; - } -)(x); - -( - (b) => (c) => (d) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); - -( - (fooLorem) => (bazIpsum) => (barLorem) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(boo); - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x); -=====================================output===================================== -((b) => (c) => (d) => { - return 3; -})(x); - -function f( - a = (fooLorem) => (bazIpsum) => (barLorem) => { - return 3; - } -) {} - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => { - return 3; - } -)(x); - -( - (b) => (c) => (d) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); - -( - (fooLorem) => (bazIpsum) => (barLorem) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(boo); - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x); - -================================================================================ -`; - -exports[`currying-3.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -((b) => (c) => (d) => { - return 3; -})(x); - -function f( - a = (fooLorem) => (bazIpsum) => (barLorem) => { - return 3; - } -) {} - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => { - return 3; - } -)(x); - -( - (b) => (c) => (d) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); - -( - (fooLorem) => (bazIpsum) => (barLorem) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(boo); - -( - (fooLoremIpsumFactory) => - (bazLoremIpsumFactory) => - (barLoremIpsumServiceFactory) => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x); -=====================================output===================================== -(b => c => d => { - return 3; -})(x); - -function f( - a = fooLorem => bazIpsum => barLorem => { - return 3; - } -) {} - -( - fooLoremIpsumFactory => - bazLoremIpsumFactory => - barLoremIpsumServiceFactory => { - return 3; - } -)(x); - -( - b => c => d => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x, fooLoremIpsumFactory, fooLoremIpsumFactory); - -( - fooLorem => bazIpsum => barLorem => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(boo); - -( - fooLoremIpsumFactory => bazLoremIpsumFactory => barLoremIpsumServiceFactory => - b + fooLoremIpsumFactory(c) - bazLoremIpsumFactory(b + d) -)(x); - -================================================================================ -`; - -exports[`issue-1389-curry.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foobar = (argumentOne, argumentTwo, argumentThree) => - (...restOfTheArguments) => { - return "baz"; - }; - -const foobaz = (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments123, j) => { - return "baz"; - }; - - -const makeSomeFunction = - (services = {logger:null}) => - (a, b, c) => - services.logger(a,b,c) - -const makeSomeFunction2 = - (services = { - logger: null - }) => - (a, b, c) => - services.logger(a, b, c) - -=====================================output===================================== -const foobar = - (argumentOne, argumentTwo, argumentThree) => - (...restOfTheArguments) => { - return "baz"; - }; - -const foobaz = - (argumentOne, argumentTwo, argumentThree) => (restOfTheArguments123, j) => { - return "baz"; - }; - -const makeSomeFunction = - (services = { logger: null }) => - (a, b, c) => - services.logger(a, b, c); - -const makeSomeFunction2 = - ( - services = { - logger: null, - } - ) => - (a, b, c) => - services.logger(a, b, c); - -================================================================================ -`; - -exports[`issue-1389-curry.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foobar = (argumentOne, argumentTwo, argumentThree) => - (...restOfTheArguments) => { - return "baz"; - }; - -const foobaz = (argumentOne, argumentTwo, argumentThree) => - (restOfTheArguments123, j) => { - return "baz"; - }; - - -const makeSomeFunction = - (services = {logger:null}) => - (a, b, c) => - services.logger(a,b,c) - -const makeSomeFunction2 = - (services = { - logger: null - }) => - (a, b, c) => - services.logger(a, b, c) - -=====================================output===================================== -const foobar = - (argumentOne, argumentTwo, argumentThree) => - (...restOfTheArguments) => { - return "baz"; - }; - -const foobaz = - (argumentOne, argumentTwo, argumentThree) => (restOfTheArguments123, j) => { - return "baz"; - }; - -const makeSomeFunction = - (services = { logger: null }) => - (a, b, c) => - services.logger(a, b, c); - -const makeSomeFunction2 = - ( - services = { - logger: null, - } - ) => - (a, b, c) => - services.logger(a, b, c); - -================================================================================ -`; - -exports[`issue-4166-curry.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const myCurriedFn = arg1 => - arg2 => - arg3 => arg1 + arg2 + arg3; - -=====================================output===================================== -const myCurriedFn = (arg1) => (arg2) => (arg3) => arg1 + arg2 + arg3; - -================================================================================ -`; - -exports[`issue-4166-curry.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const myCurriedFn = arg1 => - arg2 => - arg3 => arg1 + arg2 + arg3; - -=====================================output===================================== -const myCurriedFn = arg1 => arg2 => arg3 => arg1 + arg2 + arg3; - -================================================================================ -`; - -exports[`long-call-no-args.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) - -=====================================output===================================== -veryLongCall( - VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, - () => {} -); - -================================================================================ -`; - -exports[`long-call-no-args.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) - -=====================================output===================================== -veryLongCall( - VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, - () => {} -); - -================================================================================ -`; - -exports[`long-contents.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = () => { - expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); -}; - -=====================================output===================================== -const foo = () => { - expect(arg1, arg2, arg3).toEqual({ - message: "test", - messageType: "SMS", - status: "Unknown", - created: "11/01/2017 13:36", - }); -}; - -================================================================================ -`; - -exports[`long-contents.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = () => { - expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); -}; - -=====================================output===================================== -const foo = () => { - expect(arg1, arg2, arg3).toEqual({ - message: "test", - messageType: "SMS", - status: "Unknown", - created: "11/01/2017 13:36", - }); -}; - -================================================================================ -`; - -exports[`parens.js - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -promise.then( - (result) => result, - (err) => err -) - -promise.then( - (result) => { f(); return result }, - (err) => { f(); return err } -) - -foo(a => b) -foo(a => { return b }) -foo(c, a => b) -foo(c, a => b, d) -foo(a => b, d) - -foo(a => (0, 1)); -foo(a => b => (0, 1)); - -=====================================output===================================== -promise.then( - (result) => result, - (err) => err -); - -promise.then( - (result) => { - f(); - return result; - }, - (err) => { - f(); - return err; - } -); - -foo((a) => b); -foo((a) => { - return b; -}); -foo(c, (a) => b); -foo(c, (a) => b, d); -foo((a) => b, d); - -foo((a) => (0, 1)); -foo((a) => (b) => (0, 1)); - -================================================================================ -`; - -exports[`parens.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -promise.then( - (result) => result, - (err) => err -) - -promise.then( - (result) => { f(); return result }, - (err) => { f(); return err } -) - -foo(a => b) -foo(a => { return b }) -foo(c, a => b) -foo(c, a => b, d) -foo(a => b, d) - -foo(a => (0, 1)); -foo(a => b => (0, 1)); - -=====================================output===================================== -promise.then( - result => result, - err => err -); - -promise.then( - result => { - f(); - return result; - }, - err => { - f(); - return err; - } -); - -foo(a => b); -foo(a => { - return b; -}); -foo(c, a => b); -foo(c, a => b, d); -foo(a => b, d); - -foo(a => (0, 1)); -foo(a => b => (0, 1)); - -================================================================================ -`; diff --git a/tests/format/js/arrows/array-and-object.js b/tests/format/js/arrows/array-and-object.js new file mode 100644 index 000000000000..b923ebe58e77 --- /dev/null +++ b/tests/format/js/arrows/array-and-object.js @@ -0,0 +1,12 @@ +const fn12 = (a) => (b) => (c) => (d) => (e) => + ({ foo: bar, bar: baz, baz: foo }); + +map(() => ([ + // comment + foo +])); + +map(() => ({ + // comment + foo +})); diff --git a/tests/format/js/arrows/chain-as-arg.js b/tests/format/js/arrows/chain-as-arg.js new file mode 100644 index 000000000000..9614d9d8211e --- /dev/null +++ b/tests/format/js/arrows/chain-as-arg.js @@ -0,0 +1,38 @@ +const w = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); + +const x = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const y = a.b( + 1, + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +)(x); + +const z = a.b( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0, + 2 +)(x); + diff --git a/tests/format/js/arrows/chain-in-logical-expression.js b/tests/format/js/arrows/chain-in-logical-expression.js new file mode 100644 index 000000000000..cc7ab253e624 --- /dev/null +++ b/tests/format/js/arrows/chain-in-logical-expression.js @@ -0,0 +1,8 @@ +const x = a.b ?? ( + ( + c = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef", + d = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" + ) => + (e) => + 0 +); diff --git a/tests/format/js/arrows/comment.js b/tests/format/js/arrows/comment.js index 66b101229632..fc0d1a061506 100644 --- a/tests/format/js/arrows/comment.js +++ b/tests/format/js/arrows/comment.js @@ -28,3 +28,24 @@ export const bem = block => ) => <span>{info.item.widget.missingProp}</span>} data={data} /> + +func(() => // comment +a); +func(() => () => // comment +a); +func(() => () => () => // comment +a); + +func(() => // comment +a ? b : c); +func(() => () => // comment +a ? b : c); +func(() => () => () => // comment +a ? b : c); + +func(() => // comment +(a , b , c)) +func(() => () => // comment +(a , b , c)) +func(() => () => () => // comment +(a , b , c)) diff --git a/tests/format/js/arrows/currying-4.js b/tests/format/js/arrows/currying-4.js new file mode 100644 index 000000000000..7aaaeef0abac --- /dev/null +++ b/tests/format/js/arrows/currying-4.js @@ -0,0 +1,60 @@ +Y(() => a ? b : c); + +Y(() => () => a ? b : c); + +Y(() => () => () => a ? b : c); + +Y(() => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +Y(() => () => () => longlonglonglonglonglonglonglonglonglongCondition ? 'Prettier is an opinionated code formatter.' : 'Prettier takes your code and reprints it from scratch by taking the line length into account.') + +const x1 = (() => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x2 = (() => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +const x3 = (() => () => () => ['The', 'green', 'dragon', 'liked', 'to', 'knit', 'sweaters', 'for', 'the', 'fluffy', 'clouds', 'in', 'the', 'sky.']) + +f((a) => (1, 2, 3) /* a */); +f((a) => ( + (b) => (1, 2, 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1, 2, 3) /* c */ + ) /* b */ +) /* a */); + +f((a) => (1 ? 2 : 3) /* a */); +f((a) => ( + (b) => (1 ? 2 : 3) /* b */ +) /* a */); +f((a) => ( + (b) => ( + (c) => (1 ? 2 : 3) /* c */ + ) /* b */ +) /* a */); + +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => test, +); +a( + "", + "", + ({}) => + () => + () => + () => + () => + () => + () => (test ? 1 : 2), +); diff --git a/tests/format/js/arrows/format.test.js b/tests/format/js/arrows/format.test.js new file mode 100644 index 000000000000..863a6c1384e5 --- /dev/null +++ b/tests/format/js/arrows/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "always" }); +runFormatTest(import.meta, ["babel", "typescript"], { arrowParens: "avoid" }); diff --git a/tests/format/js/arrows/jsfmt.spec.js b/tests/format/js/arrows/jsfmt.spec.js deleted file mode 100644 index 8ac4df02da1c..000000000000 --- a/tests/format/js/arrows/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { arrowParens: "always" }); -run_spec(__dirname, ["babel", "typescript"], { arrowParens: "avoid" }); diff --git a/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8a8713a20a00..000000000000 --- a/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,40 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`newline-before-arrow.js [acorn] format 1`] = ` -"Unexpected token (2:1) - 1 | async x -> 2 | => x - | ^ - 3 |" -`; - -exports[`newline-before-arrow.js [espree] format 1`] = ` -"Unexpected token => (2:1) - 1 | async x -> 2 | => x - | ^ - 3 |" -`; - -exports[`newline-before-arrow.js [meriyah] format 1`] = ` -"No line break is allowed after '=>' (2:2) - 1 | async x -> 2 | => x - | ^ - 3 |" -`; - -exports[`newline-before-arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -async x -=> x - -=====================================output===================================== -async (x) => x; - -================================================================================ -`; diff --git a/tests/format/js/arrows/newline-before-arrow/jsfmt.spec.js b/tests/format/js/arrows/newline-before-arrow/jsfmt.spec.js deleted file mode 100644 index e8dbf5e36e40..000000000000 --- a/tests/format/js/arrows/newline-before-arrow/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { - acorn: ["newline-before-arrow.js"], - espree: ["newline-before-arrow.js"], - meriyah: ["newline-before-arrow.js"], - }, -}); diff --git a/tests/format/js/arrows/parens.js b/tests/format/js/arrows/parens.js index 33fc3771e0c7..895b76af121b 100644 --- a/tests/format/js/arrows/parens.js +++ b/tests/format/js/arrows/parens.js @@ -16,3 +16,6 @@ foo(a => b, d) foo(a => (0, 1)); foo(a => b => (0, 1)); + +() => ({} ? 1 : 2); +() => () => ({} ? 1 : 2); diff --git a/tests/format/js/arrows/semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows/semi/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/arrows/semi/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/arrows/semi/__snapshots__/format.test.js.snap diff --git a/tests/format/js/arrows/semi/format.test.js b/tests/format/js/arrows/semi/format.test.js new file mode 100644 index 000000000000..362ce5fd5bf6 --- /dev/null +++ b/tests/format/js/arrows/semi/format.test.js @@ -0,0 +1,8 @@ +runFormatTest(import.meta, ["babel", "typescript"], { + arrowParens: "always", + semi: false, +}); +runFormatTest(import.meta, ["babel", "typescript"], { + arrowParens: "avoid", + semi: false, +}); diff --git a/tests/format/js/arrows/semi/jsfmt.spec.js b/tests/format/js/arrows/semi/jsfmt.spec.js deleted file mode 100644 index 755d83d5227b..000000000000 --- a/tests/format/js/arrows/semi/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { - arrowParens: "always", - semi: false, -}); -run_spec(__dirname, ["babel", "typescript"], { - arrowParens: "avoid", - semi: false, -}); diff --git a/tests/format/js/assignment-comments/__snapshots__/format.test.js.snap b/tests/format/js/assignment-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1eccc9b21fcb --- /dev/null +++ b/tests/format/js/assignment-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,461 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (true) + if (true) + if (true) + if (true) + if (true) + longVariableName1 = // @ts-ignore + (variable01 + veryLongVariableNameNumber2).method(); + +=====================================output===================================== +if (true) + if (true) + if (true) + if (true) + if (true) + longVariableName1 = // @ts-ignore + (variable01 + veryLongVariableNameNumber2).method(); + +================================================================================ +`; + +exports[`call2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const kochabCooieGameOnOboleUnweave = // ??? + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); + +=====================================output===================================== +const kochabCooieGameOnOboleUnweave = // ??? + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); + +================================================================================ +`; + +exports[`function.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f1 = ( + a = + //comment + b +) => {}; + +f2 = ( + a = //comment + b +) => {}; + +f3 = ( + a = + b //comment +) => {}; + +f4 = // Comment + () => {}; + +f5 = + + // Comment + + () => {} + +f6 = /* comment */ + + // Comment + + () => {} + +let f1 = ( + a = + //comment + b +) => {}; + +let f2 = ( + a = //comment + b +) => {}; + +let f3 = ( + a = + b //comment +) => {}; + +let f4 = // Comment + () => {}; + +let f5 = + + // Comment + + () => {} + +let f6 = /* comment */ + + // Comment + + () => {} + +=====================================output===================================== +f1 = ( + //comment + a = b, +) => {}; + +f2 = ( + a = b, //comment +) => {}; + +f3 = ( + a = b, //comment +) => {}; + +f4 = // Comment + () => {}; + +f5 = + // Comment + + () => {}; + +f6 = + /* comment */ + + // Comment + + () => {}; + +let f1 = ( + //comment + a = b, +) => {}; + +let f2 = ( + a = b, //comment +) => {}; + +let f3 = ( + a = b, //comment +) => {}; + +let f4 = // Comment + () => {}; + +let f5 = + // Comment + + () => {}; + +let f6 = + /* comment */ + + // Comment + + () => {}; + +================================================================================ +`; + +exports[`identifier.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const kochabCooieGameOnOboleUnweave = // ??? + annularCooeedSplicesWalksWayWay; + +const bifornCringerMoshedPerplexSawder = // !!! + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl - + anodyneCondosMalateOverateRetinol; + +=====================================output===================================== +const kochabCooieGameOnOboleUnweave = // ??? + annularCooeedSplicesWalksWayWay; + +const bifornCringerMoshedPerplexSawder = // !!! + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl - + anodyneCondosMalateOverateRetinol; + +================================================================================ +`; + +exports[`number.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +fnNumber = + // Comment + 3; + +fnNumber = + + // Comment + + 3; + +fnNumber = + // Comment0 + // Comment1 + 3; + +fnNumber = /* comment */ + 3; + +fnNumber = /* comments0 */ + /* comments1 */ + 3; + +fnNumber = + // Comment + 3; + +var fnNumber = + + // Comment + + 3; + +var fnNumber = + // Comment0 + // Comment1 + 3; + +var fnNumber = /* comment */ + 3; + +var fnNumber = /* comments0 */ + /* comments1 */ + 3; + +=====================================output===================================== +fnNumber = + // Comment + 3; + +fnNumber = + // Comment + + 3; + +fnNumber = + // Comment0 + // Comment1 + 3; + +fnNumber = /* comment */ 3; + +fnNumber = + /* comments0 */ + /* comments1 */ + 3; + +fnNumber = + // Comment + 3; + +var fnNumber = + // Comment + + 3; + +var fnNumber = + // Comment0 + // Comment1 + 3; + +var fnNumber = /* comment */ 3; + +var fnNumber = + /* comments0 */ + /* comments1 */ + 3; + +================================================================================ +`; + +exports[`string.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +fnString = + // Comment + 'some' + 'long' + 'string'; + +fnString = + // Comment + + 'some' + 'long' + 'string'; + +fnString = + + // Comment + + 'some' + 'long' + 'string'; + +fnString = + /* comment */ + 'some' + 'long' + 'string'; + +fnString = + /** + * multi-line + */ + 'some' + 'long' + 'string'; + +fnString = + /* inline */ 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string'; + +fnString = // Comment0 + // Comment1 + 'some' + 'long' + 'string'; + +fnString = // Comment + 'some' + 'long' + 'string'; + +fnString = + // Comment + 'some' + 'long' + 'string'; + +var fnString = + // Comment + + 'some' + 'long' + 'string'; + +var fnString = + + // Comment + + 'some' + 'long' + 'string'; + +var fnString = + /* comment */ + 'some' + 'long' + 'string'; + +var fnString = + /** + * multi-line + */ + 'some' + 'long' + 'string'; + +var fnString = + /* inline */ 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string'; + +var fnString = // Comment0 + // Comment1 + 'some' + 'long' + 'string'; + +var fnString = // Comment + 'some' + 'long' + 'string'; + +=====================================output===================================== +fnString = + // Comment + "some" + "long" + "string"; + +fnString = + // Comment + + "some" + "long" + "string"; + +fnString = + // Comment + + "some" + "long" + "string"; + +fnString = + /* comment */ + "some" + "long" + "string"; + +fnString = + /** + * multi-line + */ + "some" + "long" + "string"; + +fnString = + /* inline */ "some" + + "long" + + "string" + + "some" + + "long" + + "string" + + "some" + + "long" + + "string" + + "some" + + "long" + + "string"; + +fnString = // Comment0 + // Comment1 + "some" + "long" + "string"; + +fnString = "some" + "long" + "string"; // Comment + +fnString = + // Comment + "some" + "long" + "string"; + +var fnString = + // Comment + + "some" + "long" + "string"; + +var fnString = + // Comment + + "some" + "long" + "string"; + +var fnString = + /* comment */ + "some" + "long" + "string"; + +var fnString = + /** + * multi-line + */ + "some" + "long" + "string"; + +var fnString = + /* inline */ "some" + + "long" + + "string" + + "some" + + "long" + + "string" + + "some" + + "long" + + "string" + + "some" + + "long" + + "string"; + +var fnString = // Comment0 + // Comment1 + "some" + "long" + "string"; + +var fnString = "some" + "long" + "string"; // Comment + +================================================================================ +`; diff --git a/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 84351ac844f4..000000000000 --- a/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,461 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (true) - if (true) - if (true) - if (true) - if (true) - longVariableName1 = // @ts-ignore - (variable01 + veryLongVariableNameNumber2).method(); - -=====================================output===================================== -if (true) - if (true) - if (true) - if (true) - if (true) - longVariableName1 = // @ts-ignore - (variable01 + veryLongVariableNameNumber2).method(); - -================================================================================ -`; - -exports[`call2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const kochabCooieGameOnOboleUnweave = // ??? - rhubarbRhubarb(annularCooeedSplicesWalksWayWay); - -=====================================output===================================== -const kochabCooieGameOnOboleUnweave = // ??? - rhubarbRhubarb(annularCooeedSplicesWalksWayWay); - -================================================================================ -`; - -exports[`function.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -f1 = ( - a = - //comment - b -) => {}; - -f2 = ( - a = //comment - b -) => {}; - -f3 = ( - a = - b //comment -) => {}; - -f4 = // Comment - () => {}; - -f5 = - - // Comment - - () => {} - -f6 = /* comment */ - - // Comment - - () => {} - -let f1 = ( - a = - //comment - b -) => {}; - -let f2 = ( - a = //comment - b -) => {}; - -let f3 = ( - a = - b //comment -) => {}; - -let f4 = // Comment - () => {}; - -let f5 = - - // Comment - - () => {} - -let f6 = /* comment */ - - // Comment - - () => {} - -=====================================output===================================== -f1 = ( - //comment - a = b -) => {}; - -f2 = ( - a = b //comment -) => {}; - -f3 = ( - a = b //comment -) => {}; - -f4 = // Comment - () => {}; - -f5 = - // Comment - - () => {}; - -f6 = - /* comment */ - - // Comment - - () => {}; - -let f1 = ( - //comment - a = b -) => {}; - -let f2 = ( - a = b //comment -) => {}; - -let f3 = ( - a = b //comment -) => {}; - -let f4 = // Comment - () => {}; - -let f5 = - // Comment - - () => {}; - -let f6 = - /* comment */ - - // Comment - - () => {}; - -================================================================================ -`; - -exports[`identifier.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const kochabCooieGameOnOboleUnweave = // ??? - annularCooeedSplicesWalksWayWay; - -const bifornCringerMoshedPerplexSawder = // !!! - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl - - anodyneCondosMalateOverateRetinol; - -=====================================output===================================== -const kochabCooieGameOnOboleUnweave = // ??? - annularCooeedSplicesWalksWayWay; - -const bifornCringerMoshedPerplexSawder = // !!! - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl - - anodyneCondosMalateOverateRetinol; - -================================================================================ -`; - -exports[`number.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -fnNumber = - // Comment - 3; - -fnNumber = - - // Comment - - 3; - -fnNumber = - // Comment0 - // Comment1 - 3; - -fnNumber = /* comment */ - 3; - -fnNumber = /* comments0 */ - /* comments1 */ - 3; - -fnNumber = - // Comment - 3; - -var fnNumber = - - // Comment - - 3; - -var fnNumber = - // Comment0 - // Comment1 - 3; - -var fnNumber = /* comment */ - 3; - -var fnNumber = /* comments0 */ - /* comments1 */ - 3; - -=====================================output===================================== -fnNumber = - // Comment - 3; - -fnNumber = - // Comment - - 3; - -fnNumber = - // Comment0 - // Comment1 - 3; - -fnNumber = /* comment */ 3; - -fnNumber = - /* comments0 */ - /* comments1 */ - 3; - -fnNumber = - // Comment - 3; - -var fnNumber = - // Comment - - 3; - -var fnNumber = - // Comment0 - // Comment1 - 3; - -var fnNumber = /* comment */ 3; - -var fnNumber = - /* comments0 */ - /* comments1 */ - 3; - -================================================================================ -`; - -exports[`string.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -fnString = - // Comment - 'some' + 'long' + 'string'; - -fnString = - // Comment - - 'some' + 'long' + 'string'; - -fnString = - - // Comment - - 'some' + 'long' + 'string'; - -fnString = - /* comment */ - 'some' + 'long' + 'string'; - -fnString = - /** - * multi-line - */ - 'some' + 'long' + 'string'; - -fnString = - /* inline */ 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string'; - -fnString = // Comment0 - // Comment1 - 'some' + 'long' + 'string'; - -fnString = // Comment - 'some' + 'long' + 'string'; - -fnString = - // Comment - 'some' + 'long' + 'string'; - -var fnString = - // Comment - - 'some' + 'long' + 'string'; - -var fnString = - - // Comment - - 'some' + 'long' + 'string'; - -var fnString = - /* comment */ - 'some' + 'long' + 'string'; - -var fnString = - /** - * multi-line - */ - 'some' + 'long' + 'string'; - -var fnString = - /* inline */ 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string' + 'some' + 'long' + 'string'; - -var fnString = // Comment0 - // Comment1 - 'some' + 'long' + 'string'; - -var fnString = // Comment - 'some' + 'long' + 'string'; - -=====================================output===================================== -fnString = - // Comment - "some" + "long" + "string"; - -fnString = - // Comment - - "some" + "long" + "string"; - -fnString = - // Comment - - "some" + "long" + "string"; - -fnString = - /* comment */ - "some" + "long" + "string"; - -fnString = - /** - * multi-line - */ - "some" + "long" + "string"; - -fnString = - /* inline */ "some" + - "long" + - "string" + - "some" + - "long" + - "string" + - "some" + - "long" + - "string" + - "some" + - "long" + - "string"; - -fnString = // Comment0 - // Comment1 - "some" + "long" + "string"; - -fnString = "some" + "long" + "string"; // Comment - -fnString = - // Comment - "some" + "long" + "string"; - -var fnString = - // Comment - - "some" + "long" + "string"; - -var fnString = - // Comment - - "some" + "long" + "string"; - -var fnString = - /* comment */ - "some" + "long" + "string"; - -var fnString = - /** - * multi-line - */ - "some" + "long" + "string"; - -var fnString = - /* inline */ "some" + - "long" + - "string" + - "some" + - "long" + - "string" + - "some" + - "long" + - "string" + - "some" + - "long" + - "string"; - -var fnString = // Comment0 - // Comment1 - "some" + "long" + "string"; - -var fnString = "some" + "long" + "string"; // Comment - -================================================================================ -`; diff --git a/tests/format/js/assignment-comments/format.test.js b/tests/format/js/assignment-comments/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/assignment-comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/assignment-comments/jsfmt.spec.js b/tests/format/js/assignment-comments/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/assignment-comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/assignment-expression/__snapshots__/format.test.js.snap b/tests/format/js/assignment-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..dfda0f9cfad5 --- /dev/null +++ b/tests/format/js/assignment-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,92 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`assignment_expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +this.size = this._origin = this._capacity = 0; + +=====================================output===================================== +this.size = this._origin = this._capacity = 0; + +================================================================================ +`; + +exports[`property-key.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = { + [this.resource = resource]: 1, +} + +class A { + [this.resource = resource] = 1; + + [this.resource = resource]() { + + } +} + +=====================================output===================================== +a = { + [(this.resource = resource)]: 1, +}; + +class A { + [(this.resource = resource)] = 1; + + [(this.resource = resource)]() {} +} + +================================================================================ +`; + +exports[`property-value.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = { + resource: (this.resource = resource), +} + +class A { + property = (this.resource = resource) +} + +map(([resource]) => ({ + resource: (this.resource = resource), +})) + +map(([resource]) => class A{ + resource = (this.resource = resource) +}) + +=====================================output===================================== +a = { + resource: (this.resource = resource), +}; + +class A { + property = (this.resource = resource); +} + +map(([resource]) => ({ + resource: (this.resource = resource), +})); + +map( + ([resource]) => + class A { + resource = (this.resource = resource); + }, +); + +================================================================================ +`; diff --git a/tests/format/js/assignment-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/assignment-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5b78460b3db1..000000000000 --- a/tests/format/js/assignment-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,15 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`assignment_expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -this.size = this._origin = this._capacity = 0; - -=====================================output===================================== -this.size = this._origin = this._capacity = 0; - -================================================================================ -`; diff --git a/tests/format/js/assignment-expression/format.test.js b/tests/format/js/assignment-expression/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/assignment-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/assignment-expression/jsfmt.spec.js b/tests/format/js/assignment-expression/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/assignment-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/assignment-expression/property-key.js b/tests/format/js/assignment-expression/property-key.js new file mode 100644 index 000000000000..f111b9b455dd --- /dev/null +++ b/tests/format/js/assignment-expression/property-key.js @@ -0,0 +1,11 @@ +a = { + [this.resource = resource]: 1, +} + +class A { + [this.resource = resource] = 1; + + [this.resource = resource]() { + + } +} diff --git a/tests/format/js/assignment-expression/property-value.js b/tests/format/js/assignment-expression/property-value.js new file mode 100644 index 000000000000..1fac131add36 --- /dev/null +++ b/tests/format/js/assignment-expression/property-value.js @@ -0,0 +1,15 @@ +a = { + resource: (this.resource = resource), +} + +class A { + property = (this.resource = resource) +} + +map(([resource]) => ({ + resource: (this.resource = resource), +})) + +map(([resource]) => class A{ + resource = (this.resource = resource) +}) diff --git a/tests/format/js/assignment/__snapshots__/format.test.js.snap b/tests/format/js/assignment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8e102fd6371b --- /dev/null +++ b/tests/format/js/assignment/__snapshots__/format.test.js.snap @@ -0,0 +1,955 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`binaryish.js [hermes] format 1`] = ` +"invalid assignment left-hand side (6:0) + 4 | descriptionLines; + 5 | +> 6 | computedDescriptionLines = (focused && + 7 | !loading && + 8 | descriptionLinesFocused) || + 9 | descriptionLines; +Cause: invalid assignment left-hand side (6:0) +computedDescriptionLines = (focused && +^~~~~~~~~~~~~~~~~~~~~~~~" +`; + +exports[`binaryish.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const computedDescriptionLines = (showConfirm && + descriptionLinesConfirming) || + (focused && !loading && descriptionLinesFocused) || + descriptionLines; + +computedDescriptionLines = (focused && + !loading && + descriptionLinesFocused) || + descriptionLines; + +=====================================output===================================== +const computedDescriptionLines = + (showConfirm && descriptionLinesConfirming) || + (focused && !loading && descriptionLinesFocused) || + descriptionLines; + +computedDescriptionLines = + (focused && !loading && descriptionLinesFocused) || descriptionLines; + +================================================================================ +`; + +exports[`call-with-template.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const result = template(\` + if (SOME_VAR === "") {} +\`)({ + SOME_VAR: value, +}); + +const output = + template(\`function f() %%A%%\`)({ + A: t.blockStatement([]), + }); + +=====================================output===================================== +const result = template(\` + if (SOME_VAR === "") {} +\`)({ + SOME_VAR: value, +}); + +const output = template(\`function f() %%A%%\`)({ + A: t.blockStatement([]), +}); + +================================================================================ +`; + +exports[`chain.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let bifornCringerMoshedPerplexSawder= +askTrovenaBeenaDependsRowans= +glimseGlyphsHazardNoopsTieTie= +averredBathersBoxroomBuggyNurl= +anodyneCondosMalateOverateRetinol= +annularCooeedSplicesWalksWayWay= +kochabCooieGameOnOboleUnweave; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans = + glimseGlyphsHazardNoopsTieTie = + x = + averredBathersBoxroomBuggyNurl = + anodyneCondosMal(sdsadsa,dasdas,asd(()=>sdf)).ateOverateRetinol = + annularCooeedSplicesWalksWayWay = + kochabCooieGameOnOboleUnweave; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans = + glimseGlyphsHazardNoopsTieTie = + x = + averredBathersBoxroomBuggyNurl = + anodyneCondosMal(sdsadsa,dasdas,asd(()=>sdf)).ateOverateRetinol = + annularCooeedSplicesWalksWayWay = + kochabCooieGameOnOboleUnweave+kochabCooieGameOnOboleUnweave; + +a=b=c; + +=====================================output===================================== +let bifornCringerMoshedPerplexSawder = + (askTrovenaBeenaDependsRowans = + glimseGlyphsHazardNoopsTieTie = + averredBathersBoxroomBuggyNurl = + anodyneCondosMalateOverateRetinol = + annularCooeedSplicesWalksWayWay = + kochabCooieGameOnOboleUnweave); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans = + glimseGlyphsHazardNoopsTieTie = + x = + averredBathersBoxroomBuggyNurl = + anodyneCondosMal( + sdsadsa, + dasdas, + asd(() => sdf), + ).ateOverateRetinol = + annularCooeedSplicesWalksWayWay = + kochabCooieGameOnOboleUnweave; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans = + glimseGlyphsHazardNoopsTieTie = + x = + averredBathersBoxroomBuggyNurl = + anodyneCondosMal( + sdsadsa, + dasdas, + asd(() => sdf), + ).ateOverateRetinol = + annularCooeedSplicesWalksWayWay = + kochabCooieGameOnOboleUnweave + kochabCooieGameOnOboleUnweave; + +a = b = c; + +================================================================================ +`; + +exports[`chain-two-segments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +tt.parenR.updateContext = tt.braceR.updateContext = function () { + if (this.state.context.length === 1) { + return; + } +} + +=====================================output===================================== +tt.parenR.updateContext = tt.braceR.updateContext = function () { + if (this.state.context.length === 1) { + return; + } +}; + +================================================================================ +`; + +exports[`destructuring.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let { + bottom: offsetBottom, + left: offsetLeft, + right: offsetRight, + top: offsetTop, +} = getPressRectOffset == null ? DEFAULT_PRESS_RECT : getPressRectOffset(); + +const { accessibilityModule: FooAccessibilityModule, accessibilityModule: FooAccessibilityModule2, accessibilityModule: FooAccessibilityModule3, accessibilityModule: FooAccessibilityModule4, + } = foo || {}; + +({ prop: toAssign = "default" } = { prop: "propval" }); + +=====================================output===================================== +let { + bottom: offsetBottom, + left: offsetLeft, + right: offsetRight, + top: offsetTop, +} = getPressRectOffset == null ? DEFAULT_PRESS_RECT : getPressRectOffset(); + +const { + accessibilityModule: FooAccessibilityModule, + accessibilityModule: FooAccessibilityModule2, + accessibilityModule: FooAccessibilityModule3, + accessibilityModule: FooAccessibilityModule4, +} = foo || {}; + +({ prop: toAssign = "default" } = { prop: "propval" }); + +================================================================================ +`; + +exports[`destructuring-array.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const [ + width= nextWidth, + height= nextHeight, + baseline= nextBaseline, +] = measureText(nextText, getFontString(element)); + +=====================================output===================================== +const [width = nextWidth, height = nextHeight, baseline = nextBaseline] = + measureText(nextText, getFontString(element)); + +================================================================================ +`; + +exports[`destructuring-heuristic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + const { + id, + static: isStatic, + method: isMethod, + methodId, + getId, + setId, + } = privateNamesMap.get(name); + + const { + id1, + method: isMethod1, + methodId1 + } = privateNamesMap.get(name); + + const { + id2, + method: isMethod2, + methodId2 + } = privateNamesMap.get(bifornCringerMoshedPerplexSawder); + + const { + id3, + method: isMethod3, + methodId3 + } = anodyneCondosMalateOverateRetinol.get(bifornCringerMoshedPerplexSawder); +}} + +=====================================output===================================== +{ + { + const { + id, + static: isStatic, + method: isMethod, + methodId, + getId, + setId, + } = privateNamesMap.get(name); + + const { id1, method: isMethod1, methodId1 } = privateNamesMap.get(name); + + const { + id2, + method: isMethod2, + methodId2, + } = privateNamesMap.get(bifornCringerMoshedPerplexSawder); + + const { + id3, + method: isMethod3, + methodId3, + } = anodyneCondosMalateOverateRetinol.get(bifornCringerMoshedPerplexSawder); + } +} + +================================================================================ +`; + +exports[`discussion-15196.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = await looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = await looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = await looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = !await looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong5 = void !!await looooooooooooooong.looooooooooooooong.loooooong; + + const longlonglonglonglonglonglong1 = await new Promise((resolve, reject) => { setTimeout(() => { resolve('foo'); }, 300); }) + const longlonglonglonglonglonglong2 = await { then(onFulfilled, onRejected) { onFulfilled(1234567890) } }; +} + +function* g() { + const { section, rubric, authors, tags } = yield utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = yield looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = yield looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = yield looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = !(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong5 = void !!(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong6 = yield* looooooooooooooong.looooooooooooooong.loooooong; + + const longlonglonglonglonglonglong1 = yield qwertyuiop(asdfghjkl, zxcvbnm, qwertyuiop, asdfghjkl); + const longlonglonglonglonglonglong2 = yield { qwertyuiop: 1234567890, asdfghjkl: 1234567890, zxcvbnm: 123456789 }; + + const x = yield; +} + +=====================================output===================================== +async function f() { + const { section, rubric, authors, tags } = + await utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = + await looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = + await looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = + await looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = + !(await looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong5 = + void !!(await looooooooooooooong.looooooooooooooong.loooooong); + + const longlonglonglonglonglonglong1 = await new Promise((resolve, reject) => { + setTimeout(() => { + resolve("foo"); + }, 300); + }); + const longlonglonglonglonglonglong2 = await { + then(onFulfilled, onRejected) { + onFulfilled(1234567890); + }, + }; +} + +function* g() { + const { section, rubric, authors, tags } = + yield utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = + yield looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = + yield looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = + yield looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = + !(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong5 = + void !!(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong6 = + yield* looooooooooooooong.looooooooooooooong.loooooong; + + const longlonglonglonglonglonglong1 = yield qwertyuiop( + asdfghjkl, + zxcvbnm, + qwertyuiop, + asdfghjkl, + ); + const longlonglonglonglonglonglong2 = yield { + qwertyuiop: 1234567890, + asdfghjkl: 1234567890, + zxcvbnm: 123456789, + }; + + const x = yield; +} + +================================================================================ +`; + +exports[`issue-1419.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +someReallyLongThingStoredInAMapWithAReallyBigName[pageletID] = + _someVariableThatWeAreCheckingForFalsiness + ? Date.now() - _someVariableThatWeAreCheckingForFalsiness + : 0; + +=====================================output===================================== +someReallyLongThingStoredInAMapWithAReallyBigName[pageletID] = + _someVariableThatWeAreCheckingForFalsiness + ? Date.now() - _someVariableThatWeAreCheckingForFalsiness + : 0; + +================================================================================ +`; + +exports[`issue-1966.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const aVeryLongNameThatGoesOnAndOn = this.someOtherObject.someOtherNestedObject.someLongFunctionName(); + +this.someObject.someOtherNestedObject = this.someOtherObject.whyNotNestAnotherOne.someLongFunctionName(); + +this.isaverylongmethodexpression.withmultiplelevels = this.isanotherverylongexpression.thatisalsoassigned = 0; + +=====================================output===================================== +const aVeryLongNameThatGoesOnAndOn = + this.someOtherObject.someOtherNestedObject.someLongFunctionName(); + +this.someObject.someOtherNestedObject = + this.someOtherObject.whyNotNestAnotherOne.someLongFunctionName(); + +this.isaverylongmethodexpression.withmultiplelevels = + this.isanotherverylongexpression.thatisalsoassigned = 0; + +================================================================================ +`; + +exports[`issue-2184.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const areaPercentageDiff = ( + topRankedZoneFit.areaPercentageRemaining + - previousZoneFitNow.areaPercentageRemaining +).toFixed(2) + +=====================================output===================================== +const areaPercentageDiff = ( + topRankedZoneFit.areaPercentageRemaining - + previousZoneFitNow.areaPercentageRemaining +).toFixed(2); + +================================================================================ +`; + +exports[`issue-2482-1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + 'a very long string for illustrative purposes'.length; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes(); + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes.length; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes + 1; + + +=====================================output===================================== +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + "a very long string for illustrative purposes".length; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes(); + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes.length; + +aParticularlyLongAndObnoxiousNameForIllustrativePurposes = + anotherVeryLongNameForIllustrativePurposes + 1; + +================================================================================ +`; + +exports[`issue-2482-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class foo { + bar() { + const median = dates.length % 2 + ? dates[half].getTime() + : (dates[half - 1].getTime() + dates[half].getTime()) / 2.0; + } +} + +=====================================output===================================== +class foo { + bar() { + const median = + dates.length % 2 + ? dates[half].getTime() + : (dates[half - 1].getTime() + dates[half].getTime()) / 2.0; + } +} + +================================================================================ +`; + +exports[`issue-2540.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +manifestCache[templateId] = readFileSync(\`\${MANIFESTS_PATH}/\${templateId}.json\`, { encoding: 'utf-8' }); + +=====================================output===================================== +manifestCache[templateId] = readFileSync( + \`\${MANIFESTS_PATH}/\${templateId}.json\`, + { encoding: "utf-8" }, +); + +================================================================================ +`; + +exports[`issue-3819.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +this.dummy.type1.dummyPropertyFunction + = this.dummy.type2.dummyPropertyFunction + = this.dummy.type3.dummyPropertyFunction + = this.dummy.type4.dummyPropertyFunction + = this.dummy.type5.dummyPropertyFunction + = this.dummy.type6.dummyPropertyFunction + = this.dummy.type7.dummyPropertyFunction + = this.dummy.type8.dummyPropertyFunction + = () => { + return 'dummy'; + }; + +=====================================output===================================== +this.dummy.type1.dummyPropertyFunction = + this.dummy.type2.dummyPropertyFunction = + this.dummy.type3.dummyPropertyFunction = + this.dummy.type4.dummyPropertyFunction = + this.dummy.type5.dummyPropertyFunction = + this.dummy.type6.dummyPropertyFunction = + this.dummy.type7.dummyPropertyFunction = + this.dummy.type8.dummyPropertyFunction = + () => { + return "dummy"; + }; + +================================================================================ +`; + +exports[`issue-4094.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (something) { + const otherBrandsWithThisAdjacencyCount123 = Object.values(edge.to.edges).length +} + +=====================================output===================================== +if (something) { + const otherBrandsWithThisAdjacencyCount123 = Object.values( + edge.to.edges, + ).length; +} + +================================================================================ +`; + +exports[`issue-5610.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Function call wrapping is not optimal for readability: +// Function names tend to get pushed to the right, whereas arguments end up on the left, +// creating a wide gap that the eyes have to cross in order to read the call. +const {qfwvfkwjdqgz, bctsyljqucgz, xuodxhmgwwpw} = + qbhtcuzxwedz(yrwimwkjeeiu, njwvozigdkfi, alvvjgkmnmhd); + +=====================================output===================================== +// Function call wrapping is not optimal for readability: +// Function names tend to get pushed to the right, whereas arguments end up on the left, +// creating a wide gap that the eyes have to cross in order to read the call. +const { qfwvfkwjdqgz, bctsyljqucgz, xuodxhmgwwpw } = qbhtcuzxwedz( + yrwimwkjeeiu, + njwvozigdkfi, + alvvjgkmnmhd, +); + +================================================================================ +`; + +exports[`issue-6922.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + const { data, status } = await request.delete( + \`/account/\${accountId}/documents/\${type}/\${documentNumber}\`, + { validateStatus: () => true } + ); + return { data, status }; +} + +const data1 = request.delete( + '----------------------------------------------', + { validateStatus: () => true } +); + +const data2 = request.delete( + '----------------------------------------------x', + { validateStatus: () => true } +); + +const data3 = request.delete( + '----------------------------------------------xx', + { validateStatus: () => true } +); + +const data4 = request.delete( + '----------------------------------------------xxx', + { validateStatus: () => true } +); + +=====================================output===================================== +async function f() { + const { data, status } = await request.delete( + \`/account/\${accountId}/documents/\${type}/\${documentNumber}\`, + { validateStatus: () => true }, + ); + return { data, status }; +} + +const data1 = request.delete("----------------------------------------------", { + validateStatus: () => true, +}); + +const data2 = request.delete( + "----------------------------------------------x", + { validateStatus: () => true }, +); + +const data3 = request.delete( + "----------------------------------------------xx", + { validateStatus: () => true }, +); + +const data4 = request.delete( + "----------------------------------------------xxx", + { validateStatus: () => true }, +); + +================================================================================ +`; + +exports[`issue-7091.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { + imStore, showChat, customerServiceAccount +} = store[config.reduxStoreName] + +=====================================output===================================== +const { imStore, showChat, customerServiceAccount } = + store[config.reduxStoreName]; + +================================================================================ +`; + +exports[`issue-7572.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const t = { + "hello": world(), + 'this-is-a-very-long-key-and-the-assignment-should-be-put-on-the-next-line': + orMaybeIAmMisunderstandingAndIHaveSetSomethingWrongInMyConfig(), + "can-someone-explain": this() +}; + +=====================================output===================================== +const t = { + hello: world(), + "this-is-a-very-long-key-and-the-assignment-should-be-put-on-the-next-line": + orMaybeIAmMisunderstandingAndIHaveSetSomethingWrongInMyConfig(), + "can-someone-explain": this(), +}; + +================================================================================ +`; + +exports[`issue-7961.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// works as expected +something.veeeeeery.looooooooooooooooooooooooooong = some.other.rather.long.chain; + +// does not work if it ends with a function call +something.veeeeeery.looooooooooooooooooooooooooong = some.other.rather.long.chain.functionCall(); + +=====================================output===================================== +// works as expected +something.veeeeeery.looooooooooooooooooooooooooong = + some.other.rather.long.chain; + +// does not work if it ends with a function call +something.veeeeeery.looooooooooooooooooooooooooong = + some.other.rather.long.chain.functionCall(); + +================================================================================ +`; + +exports[`issue-8218.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const pendingIndicators = shield.alarmGeneratorConfiguration.getPendingVersionColumnValues; + +const pendingIndicatorz = + shield.alarmGeneratorConfiguration.getPendingVersionColumnValues(); + +=====================================output===================================== +const pendingIndicators = + shield.alarmGeneratorConfiguration.getPendingVersionColumnValues; + +const pendingIndicatorz = + shield.alarmGeneratorConfiguration.getPendingVersionColumnValues(); + +================================================================================ +`; + +exports[`issue-10218.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const _id1 = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty._id; + +const {_id2} = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty; + +const {_id:id3} = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty; + +=====================================output===================================== +const _id1 = + data.createTestMessageWithAReallyLongName.someVeryLongProperty + .thisIsAlsoALongProperty._id; + +const { _id2 } = + data.createTestMessageWithAReallyLongName.someVeryLongProperty + .thisIsAlsoALongProperty; + +const { _id: id3 } = + data.createTestMessageWithAReallyLongName.someVeryLongProperty + .thisIsAlsoALongProperty; + +================================================================================ +`; + +exports[`issue-15534.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +params["redirectTo"] = \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +params["redirectTo"]["codePointAt"]["name"] = + \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +params.redirectTo.bar.bar.ba.barab["foo"].abr = + \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +=====================================output===================================== +params["redirectTo"] = + \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +params["redirectTo"]["codePointAt"]["name"] = + \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +params.redirectTo.bar.bar.ba.barab["foo"].abr = + \`\${window.location.pathname}\${window.location.search}\${window.location.hash}\`; + +================================================================================ +`; + +exports[`issue-17437.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +didScheduleRenderPhaseUpdateDuringThisPassFoo = +didScheduleRenderPhaseUpdate + = true + +=====================================output===================================== +didScheduleRenderPhaseUpdateDuringThisPassFoo = + didScheduleRenderPhaseUpdate = true; + +================================================================================ +`; + +exports[`lone-arg.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let vgChannel = pointPositionDefaultRef({ + model, + defaultPos, + channel, +})() + +let vgChannel2 = pointPositionDefaultRef({ model, + defaultPos, + channel, +})() + +const bifornCringerMoshedPerplexSawderGlyphsHa = + someBigFunctionName("foo")("bar"); + +if (true) { + node.id = this.flowParseTypeAnnotatableIdentifier(/*allowPrimitiveOverride*/ true); +} + +const bifornCringerMoshedPerplexSawderGlyphsHb = someBigFunctionName(\`foo +\`)("bar"); + +=====================================output===================================== +let vgChannel = pointPositionDefaultRef({ + model, + defaultPos, + channel, +})(); + +let vgChannel2 = pointPositionDefaultRef({ model, defaultPos, channel })(); + +const bifornCringerMoshedPerplexSawderGlyphsHa = + someBigFunctionName("foo")("bar"); + +if (true) { + node.id = this.flowParseTypeAnnotatableIdentifier( + /*allowPrimitiveOverride*/ true, + ); +} + +const bifornCringerMoshedPerplexSawderGlyphsHb = someBigFunctionName(\`foo +\`)("bar"); + +================================================================================ +`; + +exports[`sequence.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for ((i = 0), (len = arr.length); i < len; i++) { + console.log(arr[i]) +} + +for (i = 0, len = arr.length; i < len; i++) { + console.log(arr[i]) +} + +=====================================output===================================== +for (i = 0, len = arr.length; i < len; i++) { + console.log(arr[i]); +} + +for (i = 0, len = arr.length; i < len; i++) { + console.log(arr[i]); +} + +================================================================================ +`; + +exports[`unary.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const loooooooooooooooooooooooooong1 = void looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong2 = void "looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong3 = !looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong4 = !"looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong5 = void void looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong6 = void void "looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong7 = !!looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong8 = !!"looooooooooooooooooooooooooooooooooooooooooog"; + +=====================================output===================================== +const loooooooooooooooooooooooooong1 = + void looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong2 = + void "looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong3 = + !looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong4 = + !"looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong5 = + void void looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong6 = + void void "looooooooooooooooooooooooooooooooooooooooooog"; +const loooooooooooooooooooooooooong7 = + !!looooooooooooooong.looooooooooooooong.loooooong; +const loooooooooooooooooooooooooong8 = + !!"looooooooooooooooooooooooooooooooooooooooooog"; + +================================================================================ +`; diff --git a/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 82cae3cb879c..000000000000 --- a/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,800 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binaryish.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const computedDescriptionLines = (showConfirm && - descriptionLinesConfirming) || - (focused && !loading && descriptionLinesFocused) || - descriptionLines; - -computedDescriptionLines = (focused && - !loading && - descriptionLinesFocused) || - descriptionLines; - -=====================================output===================================== -const computedDescriptionLines = - (showConfirm && descriptionLinesConfirming) || - (focused && !loading && descriptionLinesFocused) || - descriptionLines; - -computedDescriptionLines = - (focused && !loading && descriptionLinesFocused) || descriptionLines; - -================================================================================ -`; - -exports[`call-with-template.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const result = template(\` - if (SOME_VAR === "") {} -\`)({ - SOME_VAR: value, -}); - -const output = - template(\`function f() %%A%%\`)({ - A: t.blockStatement([]), - }); - -=====================================output===================================== -const result = template(\` - if (SOME_VAR === "") {} -\`)({ - SOME_VAR: value, -}); - -const output = template(\`function f() %%A%%\`)({ - A: t.blockStatement([]), -}); - -================================================================================ -`; - -exports[`chain.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let bifornCringerMoshedPerplexSawder= -askTrovenaBeenaDependsRowans= -glimseGlyphsHazardNoopsTieTie= -averredBathersBoxroomBuggyNurl= -anodyneCondosMalateOverateRetinol= -annularCooeedSplicesWalksWayWay= -kochabCooieGameOnOboleUnweave; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans = - glimseGlyphsHazardNoopsTieTie = - x = - averredBathersBoxroomBuggyNurl = - anodyneCondosMal(sdsadsa,dasdas,asd(()=>sdf)).ateOverateRetinol = - annularCooeedSplicesWalksWayWay = - kochabCooieGameOnOboleUnweave; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans = - glimseGlyphsHazardNoopsTieTie = - x = - averredBathersBoxroomBuggyNurl = - anodyneCondosMal(sdsadsa,dasdas,asd(()=>sdf)).ateOverateRetinol = - annularCooeedSplicesWalksWayWay = - kochabCooieGameOnOboleUnweave+kochabCooieGameOnOboleUnweave; - -a=b=c; - -=====================================output===================================== -let bifornCringerMoshedPerplexSawder = - (askTrovenaBeenaDependsRowans = - glimseGlyphsHazardNoopsTieTie = - averredBathersBoxroomBuggyNurl = - anodyneCondosMalateOverateRetinol = - annularCooeedSplicesWalksWayWay = - kochabCooieGameOnOboleUnweave); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans = - glimseGlyphsHazardNoopsTieTie = - x = - averredBathersBoxroomBuggyNurl = - anodyneCondosMal( - sdsadsa, - dasdas, - asd(() => sdf) - ).ateOverateRetinol = - annularCooeedSplicesWalksWayWay = - kochabCooieGameOnOboleUnweave; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans = - glimseGlyphsHazardNoopsTieTie = - x = - averredBathersBoxroomBuggyNurl = - anodyneCondosMal( - sdsadsa, - dasdas, - asd(() => sdf) - ).ateOverateRetinol = - annularCooeedSplicesWalksWayWay = - kochabCooieGameOnOboleUnweave + kochabCooieGameOnOboleUnweave; - -a = b = c; - -================================================================================ -`; - -exports[`chain-two-segments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -tt.parenR.updateContext = tt.braceR.updateContext = function () { - if (this.state.context.length === 1) { - return; - } -} - -=====================================output===================================== -tt.parenR.updateContext = tt.braceR.updateContext = function () { - if (this.state.context.length === 1) { - return; - } -}; - -================================================================================ -`; - -exports[`destructuring.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let { - bottom: offsetBottom, - left: offsetLeft, - right: offsetRight, - top: offsetTop, -} = getPressRectOffset == null ? DEFAULT_PRESS_RECT : getPressRectOffset(); - -const { accessibilityModule: FooAccessibilityModule, accessibilityModule: FooAccessibilityModule2, accessibilityModule: FooAccessibilityModule3, accessibilityModule: FooAccessibilityModule4, - } = foo || {}; - -({ prop: toAssign = "default" } = { prop: "propval" }); - -=====================================output===================================== -let { - bottom: offsetBottom, - left: offsetLeft, - right: offsetRight, - top: offsetTop, -} = getPressRectOffset == null ? DEFAULT_PRESS_RECT : getPressRectOffset(); - -const { - accessibilityModule: FooAccessibilityModule, - accessibilityModule: FooAccessibilityModule2, - accessibilityModule: FooAccessibilityModule3, - accessibilityModule: FooAccessibilityModule4, -} = foo || {}; - -({ prop: toAssign = "default" } = { prop: "propval" }); - -================================================================================ -`; - -exports[`destructuring-array.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const [ - width= nextWidth, - height= nextHeight, - baseline= nextBaseline, -] = measureText(nextText, getFontString(element)); - -=====================================output===================================== -const [width = nextWidth, height = nextHeight, baseline = nextBaseline] = - measureText(nextText, getFontString(element)); - -================================================================================ -`; - -exports[`destructuring-heuristic.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -{{ - const { - id, - static: isStatic, - method: isMethod, - methodId, - getId, - setId, - } = privateNamesMap.get(name); - - const { - id1, - method: isMethod1, - methodId1 - } = privateNamesMap.get(name); - - const { - id2, - method: isMethod2, - methodId2 - } = privateNamesMap.get(bifornCringerMoshedPerplexSawder); - - const { - id3, - method: isMethod3, - methodId3 - } = anodyneCondosMalateOverateRetinol.get(bifornCringerMoshedPerplexSawder); -}} - -=====================================output===================================== -{ - { - const { - id, - static: isStatic, - method: isMethod, - methodId, - getId, - setId, - } = privateNamesMap.get(name); - - const { id1, method: isMethod1, methodId1 } = privateNamesMap.get(name); - - const { - id2, - method: isMethod2, - methodId2, - } = privateNamesMap.get(bifornCringerMoshedPerplexSawder); - - const { - id3, - method: isMethod3, - methodId3, - } = anodyneCondosMalateOverateRetinol.get(bifornCringerMoshedPerplexSawder); - } -} - -================================================================================ -`; - -exports[`issue-1419.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -someReallyLongThingStoredInAMapWithAReallyBigName[pageletID] = - _someVariableThatWeAreCheckingForFalsiness - ? Date.now() - _someVariableThatWeAreCheckingForFalsiness - : 0; - -=====================================output===================================== -someReallyLongThingStoredInAMapWithAReallyBigName[pageletID] = - _someVariableThatWeAreCheckingForFalsiness - ? Date.now() - _someVariableThatWeAreCheckingForFalsiness - : 0; - -================================================================================ -`; - -exports[`issue-1966.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const aVeryLongNameThatGoesOnAndOn = this.someOtherObject.someOtherNestedObject.someLongFunctionName(); - -this.someObject.someOtherNestedObject = this.someOtherObject.whyNotNestAnotherOne.someLongFunctionName(); - -this.isaverylongmethodexpression.withmultiplelevels = this.isanotherverylongexpression.thatisalsoassigned = 0; - -=====================================output===================================== -const aVeryLongNameThatGoesOnAndOn = - this.someOtherObject.someOtherNestedObject.someLongFunctionName(); - -this.someObject.someOtherNestedObject = - this.someOtherObject.whyNotNestAnotherOne.someLongFunctionName(); - -this.isaverylongmethodexpression.withmultiplelevels = - this.isanotherverylongexpression.thatisalsoassigned = 0; - -================================================================================ -`; - -exports[`issue-2184.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const areaPercentageDiff = ( - topRankedZoneFit.areaPercentageRemaining - - previousZoneFitNow.areaPercentageRemaining -).toFixed(2) - -=====================================output===================================== -const areaPercentageDiff = ( - topRankedZoneFit.areaPercentageRemaining - - previousZoneFitNow.areaPercentageRemaining -).toFixed(2); - -================================================================================ -`; - -exports[`issue-2482-1.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - 'a very long string for illustrative purposes'.length; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes(); - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes.length; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes + 1; - - -=====================================output===================================== -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - "a very long string for illustrative purposes".length; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes(); - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes.length; - -aParticularlyLongAndObnoxiousNameForIllustrativePurposes = - anotherVeryLongNameForIllustrativePurposes + 1; - -================================================================================ -`; - -exports[`issue-2482-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class foo { - bar() { - const median = dates.length % 2 - ? dates[half].getTime() - : (dates[half - 1].getTime() + dates[half].getTime()) / 2.0; - } -} - -=====================================output===================================== -class foo { - bar() { - const median = - dates.length % 2 - ? dates[half].getTime() - : (dates[half - 1].getTime() + dates[half].getTime()) / 2.0; - } -} - -================================================================================ -`; - -exports[`issue-2540.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -manifestCache[templateId] = readFileSync(\`\${MANIFESTS_PATH}/\${templateId}.json\`, { encoding: 'utf-8' }); - -=====================================output===================================== -manifestCache[templateId] = readFileSync( - \`\${MANIFESTS_PATH}/\${templateId}.json\`, - { encoding: "utf-8" } -); - -================================================================================ -`; - -exports[`issue-3819.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -this.dummy.type1.dummyPropertyFunction - = this.dummy.type2.dummyPropertyFunction - = this.dummy.type3.dummyPropertyFunction - = this.dummy.type4.dummyPropertyFunction - = this.dummy.type5.dummyPropertyFunction - = this.dummy.type6.dummyPropertyFunction - = this.dummy.type7.dummyPropertyFunction - = this.dummy.type8.dummyPropertyFunction - = () => { - return 'dummy'; - }; - -=====================================output===================================== -this.dummy.type1.dummyPropertyFunction = - this.dummy.type2.dummyPropertyFunction = - this.dummy.type3.dummyPropertyFunction = - this.dummy.type4.dummyPropertyFunction = - this.dummy.type5.dummyPropertyFunction = - this.dummy.type6.dummyPropertyFunction = - this.dummy.type7.dummyPropertyFunction = - this.dummy.type8.dummyPropertyFunction = - () => { - return "dummy"; - }; - -================================================================================ -`; - -exports[`issue-4094.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (something) { - const otherBrandsWithThisAdjacencyCount123 = Object.values(edge.to.edges).length -} - -=====================================output===================================== -if (something) { - const otherBrandsWithThisAdjacencyCount123 = Object.values( - edge.to.edges - ).length; -} - -================================================================================ -`; - -exports[`issue-5610.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Function call wrapping is not optimal for readability: -// Function names tend to get pushed to the right, whereas arguments end up on the left, -// creating a wide gap that the eyes have to cross in order to read the call. -const {qfwvfkwjdqgz, bctsyljqucgz, xuodxhmgwwpw} = - qbhtcuzxwedz(yrwimwkjeeiu, njwvozigdkfi, alvvjgkmnmhd); - -=====================================output===================================== -// Function call wrapping is not optimal for readability: -// Function names tend to get pushed to the right, whereas arguments end up on the left, -// creating a wide gap that the eyes have to cross in order to read the call. -const { qfwvfkwjdqgz, bctsyljqucgz, xuodxhmgwwpw } = qbhtcuzxwedz( - yrwimwkjeeiu, - njwvozigdkfi, - alvvjgkmnmhd -); - -================================================================================ -`; - -exports[`issue-6922.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f() { - const { data, status } = await request.delete( - \`/account/\${accountId}/documents/\${type}/\${documentNumber}\`, - { validateStatus: () => true } - ); - return { data, status }; -} - -const data1 = request.delete( - '----------------------------------------------', - { validateStatus: () => true } -); - -const data2 = request.delete( - '----------------------------------------------x', - { validateStatus: () => true } -); - -const data3 = request.delete( - '----------------------------------------------xx', - { validateStatus: () => true } -); - -const data4 = request.delete( - '----------------------------------------------xxx', - { validateStatus: () => true } -); - -=====================================output===================================== -async function f() { - const { data, status } = await request.delete( - \`/account/\${accountId}/documents/\${type}/\${documentNumber}\`, - { validateStatus: () => true } - ); - return { data, status }; -} - -const data1 = request.delete("----------------------------------------------", { - validateStatus: () => true, -}); - -const data2 = request.delete( - "----------------------------------------------x", - { validateStatus: () => true } -); - -const data3 = request.delete( - "----------------------------------------------xx", - { validateStatus: () => true } -); - -const data4 = request.delete( - "----------------------------------------------xxx", - { validateStatus: () => true } -); - -================================================================================ -`; - -exports[`issue-7091.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { - imStore, showChat, customerServiceAccount -} = store[config.reduxStoreName] - -=====================================output===================================== -const { imStore, showChat, customerServiceAccount } = - store[config.reduxStoreName]; - -================================================================================ -`; - -exports[`issue-7572.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const t = { - "hello": world(), - 'this-is-a-very-long-key-and-the-assignment-should-be-put-on-the-next-line': - orMaybeIAmMisunderstandingAndIHaveSetSomethingWrongInMyConfig(), - "can-someone-explain": this() -}; - -=====================================output===================================== -const t = { - hello: world(), - "this-is-a-very-long-key-and-the-assignment-should-be-put-on-the-next-line": - orMaybeIAmMisunderstandingAndIHaveSetSomethingWrongInMyConfig(), - "can-someone-explain": this(), -}; - -================================================================================ -`; - -exports[`issue-7961.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// works as expected -something.veeeeeery.looooooooooooooooooooooooooong = some.other.rather.long.chain; - -// does not work if it ends with a function call -something.veeeeeery.looooooooooooooooooooooooooong = some.other.rather.long.chain.functionCall(); - -=====================================output===================================== -// works as expected -something.veeeeeery.looooooooooooooooooooooooooong = - some.other.rather.long.chain; - -// does not work if it ends with a function call -something.veeeeeery.looooooooooooooooooooooooooong = - some.other.rather.long.chain.functionCall(); - -================================================================================ -`; - -exports[`issue-8218.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const pendingIndicators = shield.alarmGeneratorConfiguration.getPendingVersionColumnValues; - -const pendingIndicatorz = - shield.alarmGeneratorConfiguration.getPendingVersionColumnValues(); - -=====================================output===================================== -const pendingIndicators = - shield.alarmGeneratorConfiguration.getPendingVersionColumnValues; - -const pendingIndicatorz = - shield.alarmGeneratorConfiguration.getPendingVersionColumnValues(); - -================================================================================ -`; - -exports[`issue-10218.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const _id1 = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty._id; - -const {_id2} = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty; - -const {_id:id3} = data.createTestMessageWithAReallyLongName.someVeryLongProperty.thisIsAlsoALongProperty; - -=====================================output===================================== -const _id1 = - data.createTestMessageWithAReallyLongName.someVeryLongProperty - .thisIsAlsoALongProperty._id; - -const { _id2 } = - data.createTestMessageWithAReallyLongName.someVeryLongProperty - .thisIsAlsoALongProperty; - -const { _id: id3 } = - data.createTestMessageWithAReallyLongName.someVeryLongProperty - .thisIsAlsoALongProperty; - -================================================================================ -`; - -exports[`lone-arg.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let vgChannel = pointPositionDefaultRef({ - model, - defaultPos, - channel, -})() - -let vgChannel2 = pointPositionDefaultRef({ model, - defaultPos, - channel, -})() - -const bifornCringerMoshedPerplexSawderGlyphsHa = - someBigFunctionName("foo")("bar"); - -if (true) { - node.id = this.flowParseTypeAnnotatableIdentifier(/*allowPrimitiveOverride*/ true); -} - -const bifornCringerMoshedPerplexSawderGlyphsHb = someBigFunctionName(\`foo -\`)("bar"); - -=====================================output===================================== -let vgChannel = pointPositionDefaultRef({ - model, - defaultPos, - channel, -})(); - -let vgChannel2 = pointPositionDefaultRef({ model, defaultPos, channel })(); - -const bifornCringerMoshedPerplexSawderGlyphsHa = - someBigFunctionName("foo")("bar"); - -if (true) { - node.id = this.flowParseTypeAnnotatableIdentifier( - /*allowPrimitiveOverride*/ true - ); -} - -const bifornCringerMoshedPerplexSawderGlyphsHb = someBigFunctionName(\`foo -\`)("bar"); - -================================================================================ -`; - -exports[`sequence.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for ((i = 0), (len = arr.length); i < len; i++) { - console.log(arr[i]) -} - -for (i = 0, len = arr.length; i < len; i++) { - console.log(arr[i]) -} - -=====================================output===================================== -for (i = 0, len = arr.length; i < len; i++) { - console.log(arr[i]); -} - -for (i = 0, len = arr.length; i < len; i++) { - console.log(arr[i]); -} - -================================================================================ -`; - -exports[`unary.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const loooooooooooooooooooooooooong1 = void looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong2 = void "looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong3 = !looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong4 = !"looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong5 = void void looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong6 = void void "looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong7 = !!looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong8 = !!"looooooooooooooooooooooooooooooooooooooooooog"; - -=====================================output===================================== -const loooooooooooooooooooooooooong1 = - void looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong2 = - void "looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong3 = - !looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong4 = - !"looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong5 = - void void looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong6 = - void void "looooooooooooooooooooooooooooooooooooooooooog"; -const loooooooooooooooooooooooooong7 = - !!looooooooooooooong.looooooooooooooong.loooooong; -const loooooooooooooooooooooooooong8 = - !!"looooooooooooooooooooooooooooooooooooooooooog"; - -================================================================================ -`; diff --git a/tests/format/js/assignment/discussion-15196.js b/tests/format/js/assignment/discussion-15196.js new file mode 100644 index 000000000000..b6836faaa239 --- /dev/null +++ b/tests/format/js/assignment/discussion-15196.js @@ -0,0 +1,28 @@ +async function f() { + const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = await looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = await looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = await looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = !await looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong5 = void !!await looooooooooooooong.looooooooooooooong.loooooong; + + const longlonglonglonglonglonglong1 = await new Promise((resolve, reject) => { setTimeout(() => { resolve('foo'); }, 300); }) + const longlonglonglonglonglonglong2 = await { then(onFulfilled, onRejected) { onFulfilled(1234567890) } }; +} + +function* g() { + const { section, rubric, authors, tags } = yield utils.upsertCommonData(mainData); + + const loooooooooooooooooooooooooong1 = yield looooooooooooooong.looooooooooooooong.loooooong; + const loooooooooooooooooooooooooong2 = yield looooooooooooooong.looooooooooooooong.loooooong(); + const loooooooooooooooooooooooooong3 = yield looooooooooooooooooooooooooooooooooooooooooooog(); + const loooooooooooooooooooooooooong4 = !(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong5 = void !!(yield looooooooooooooong.looooooooooooooong.loooooong); + const loooooooooooooooooooooooooong6 = yield* looooooooooooooong.looooooooooooooong.loooooong; + + const longlonglonglonglonglonglong1 = yield qwertyuiop(asdfghjkl, zxcvbnm, qwertyuiop, asdfghjkl); + const longlonglonglonglonglonglong2 = yield { qwertyuiop: 1234567890, asdfghjkl: 1234567890, zxcvbnm: 123456789 }; + + const x = yield; +} diff --git a/tests/format/js/assignment/format.test.js b/tests/format/js/assignment/format.test.js new file mode 100644 index 000000000000..6f905dd2b528 --- /dev/null +++ b/tests/format/js/assignment/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + hermes: ["binaryish.js"], + }, +}); diff --git a/tests/format/js/assignment/issue-15534.js b/tests/format/js/assignment/issue-15534.js new file mode 100644 index 000000000000..f93b90a4db7a --- /dev/null +++ b/tests/format/js/assignment/issue-15534.js @@ -0,0 +1,7 @@ +params["redirectTo"] = `${window.location.pathname}${window.location.search}${window.location.hash}`; + +params["redirectTo"]["codePointAt"]["name"] = + `${window.location.pathname}${window.location.search}${window.location.hash}`; + +params.redirectTo.bar.bar.ba.barab["foo"].abr = + `${window.location.pathname}${window.location.search}${window.location.hash}`; diff --git a/tests/format/js/assignment/issue-17437.js b/tests/format/js/assignment/issue-17437.js new file mode 100644 index 000000000000..3b3eada38080 --- /dev/null +++ b/tests/format/js/assignment/issue-17437.js @@ -0,0 +1,3 @@ +didScheduleRenderPhaseUpdateDuringThisPassFoo = +didScheduleRenderPhaseUpdate + = true diff --git a/tests/format/js/assignment/jsfmt.spec.js b/tests/format/js/assignment/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/assignment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap b/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f6c50c8fa055 --- /dev/null +++ b/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap @@ -0,0 +1,96 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`async-do-expressions.js [acorn] format 1`] = ` +"Unexpected token (1:7) +> 1 | async do { + | ^ + 2 | 1; + 3 | }; + 4 | +Cause: Unexpected token (1:6)" +`; + +exports[`async-do-expressions.js [espree] format 1`] = ` +"Unexpected token do (1:7) +> 1 | async do { + | ^ + 2 | 1; + 3 | }; + 4 | +Cause: Unexpected token do" +`; + +exports[`async-do-expressions.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (1:7) +> 1 | async do { + | ^^ + 2 | 1; + 3 | }; + 4 | +Cause: [1:6-1:8]: Unexpected token: 'do'" +`; + +exports[`async-do-expressions.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6) +> 1 | async do { + | ^ + 2 | 1; + 3 | }; + 4 |" +`; + +exports[`async-do-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +async do { + 1; +}; + +(async do {}); + +let x = async do { + if (foo()) { f() } + else if (bar()) { g() } + else { h() } +}; + +async do { + await 42 +} + +let x = async do { + let tmp = f(); + tmp * tmp + 1 +}; + +=====================================output===================================== +(async do { + 1; +}); + +(async do {}); + +let x = async do { + if (foo()) { + f(); + } else if (bar()) { + g(); + } else { + h(); + } +}; + +(async do { + await 42; +}); + +let x = async do { + let tmp = f(); + tmp * tmp + 1; +}; + +================================================================================ +`; diff --git a/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9930e719b545..000000000000 --- a/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,96 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-do-expressions.js [acorn] format 1`] = ` -"Unexpected token (1:7) -> 1 | async do { - | ^ - 2 | 1; - 3 | }; - 4 |" -`; - -exports[`async-do-expressions.js [espree] format 1`] = ` -"Unexpected token do (1:7) -> 1 | async do { - | ^ - 2 | 1; - 3 | }; - 4 |" -`; - -exports[`async-do-expressions.js [meriyah] format 1`] = ` -"Unexpected token: 'do' (1:8) -> 1 | async do { - | ^ - 2 | 1; - 3 | }; - 4 |" -`; - -exports[`async-do-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -async do { - 1; -}; - -(async do {}); - -let x = async do { - if (foo()) { f() } - else if (bar()) { g() } - else { h() } -}; - -async do { - await 42 -} - -function iter() { - return async do { - return 1; - } -}; - -let x = async do { - let tmp = f(); - tmp * tmp + 1 -}; - -=====================================output===================================== -(async do { - 1; -}); - -(async do {}); - -let x = async do { - if (foo()) { - f(); - } else if (bar()) { - g(); - } else { - h(); - } -}; - -(async do { - await 42; -}); - -function iter() { - return async do { - return 1; - }; -} - -let x = async do { - let tmp = f(); - tmp * tmp + 1; -}; - -================================================================================ -`; diff --git a/tests/format/js/async-do-expressions/async-do-expressions.js b/tests/format/js/async-do-expressions/async-do-expressions.js index fbd33b8980d5..85bd63c3bd04 100644 --- a/tests/format/js/async-do-expressions/async-do-expressions.js +++ b/tests/format/js/async-do-expressions/async-do-expressions.js @@ -14,12 +14,6 @@ async do { await 42 } -function iter() { - return async do { - return 1; - } -}; - let x = async do { let tmp = f(); tmp * tmp + 1 diff --git a/tests/format/js/async-do-expressions/format.test.js b/tests/format/js/async-do-expressions/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/async-do-expressions/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/async-do-expressions/jsfmt.spec.js b/tests/format/js/async-do-expressions/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/async-do-expressions/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/async/__snapshots__/format.test.js.snap b/tests/format/js/async/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..98e1299bd6f7 --- /dev/null +++ b/tests/format/js/async/__snapshots__/format.test.js.snap @@ -0,0 +1,266 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async-iteration.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +async function * a() { + yield* b(); +} + +class X { + async * b() { + yield* a(); + } +} + +=====================================output===================================== +async function* a() { + yield* b(); +} + +class X { + async *b() { + yield* a(); + } +} + +================================================================================ +`; + +exports[`async-shorthand-method.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +({ + async get() {}, + async set() {} +}); + +=====================================output===================================== +({ + async get() {}, + async set() {}, +}); + +================================================================================ +`; + +exports[`await-parse.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f1() { (await f()).length } +async function g() { + invariant( + (await driver.navigator.getUrl()).substr(-7) + ); +} +function *f2(){ + !(yield a); +} +async function f3() { + a = !await f(); +} +async () => { + new A(await x); + obj[await x]; +} + +=====================================output===================================== +async function f1() { + (await f()).length; +} +async function g() { + invariant((await driver.navigator.getUrl()).substr(-7)); +} +function* f2() { + !(yield a); +} +async function f3() { + a = !(await f()); +} +async () => { + new A(await x); + obj[await x]; +}; + +================================================================================ +`; + +exports[`conditional-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + const result = typeof fn === 'function' ? await fn() : null; +} + +(async function() { + console.log( + await (true ? Promise.resolve("A") : Promise.resolve("B")) + ); +})() + +async function f2() { + await (spellcheck && spellcheck.setChecking(false)); + await spellcheck && spellcheck.setChecking(false) +} + +=====================================output===================================== +async function f() { + const result = typeof fn === "function" ? await fn() : null; +} + +(async function () { + console.log(await (true ? Promise.resolve("A") : Promise.resolve("B"))); +})(); + +async function f2() { + await (spellcheck && spellcheck.setChecking(false)); + (await spellcheck) && spellcheck.setChecking(false); +} + +================================================================================ +`; + +exports[`exponentiation.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async () => (await 5) ** 6; + +=====================================output===================================== +async () => (await 5) ** 6; + +================================================================================ +`; + +exports[`inline-await.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + const admins = (await(db.select('*').from('admins').leftJoin('bla').where('id', 'in', [1,2,3,4]))).map(({id, name})=>({id, name})) +} + +=====================================output===================================== +async function f() { + const admins = ( + await db + .select("*") + .from("admins") + .leftJoin("bla") + .where("id", "in", [1, 2, 3, 4]) + ).map(({ id, name }) => ({ id, name })); +} + +================================================================================ +`; + +exports[`nested.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const getAccountCount = async () => + (await + (await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks") + ).getChildren() + ).length + +=====================================output===================================== +const getAccountCount = async () => + ( + await ( + await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks") + ).getChildren() + ).length; + +================================================================================ +`; + +exports[`nested2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { +await Promise.all( + (await readdir("src")).map(async (path) => { + import(\`./\${path}\`); + }) +);} + +=====================================output===================================== +async function f() { + await Promise.all( + (await readdir("src")).map(async (path) => { + import(\`./\${path}\`); + }), + ); +} + +================================================================================ +`; + +exports[`parens.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function *f(){ await (yield x); } + +async function f2(){ await (() => {}); } + +=====================================output===================================== +async function* f() { + await (yield x); +} + +async function f2() { + await (() => {}); +} + +================================================================================ +`; + +exports[`simple-nested-await.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + const a = await (await request()).json(); + const b = await fs.writeFile(file, await (await request()).text()); +} + +=====================================output===================================== +async function f() { + const a = await (await request()).json(); + const b = await fs.writeFile(file, await (await request()).text()); +} + +================================================================================ +`; diff --git a/tests/format/js/async/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/async/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8e352335252b..000000000000 --- a/tests/format/js/async/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,241 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-iteration.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -async function * a() { - yield* b(); -} - -class X { - async * b() { - yield* a(); - } -} - -=====================================output===================================== -async function* a() { - yield* b(); -} - -class X { - async *b() { - yield* a(); - } -} - -================================================================================ -`; - -exports[`async-shorthand-method.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -({ - async get() {}, - async set() {} -}); - -=====================================output===================================== -({ - async get() {}, - async set() {}, -}); - -================================================================================ -`; - -exports[`await-parse.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f1() { (await f()).length } -async function g() { - invariant( - (await driver.navigator.getUrl()).substr(-7) - ); -} -function *f2(){ - !(yield a); -} -async function f3() { - a = !await f(); -} -async () => { - new A(await x); - obj[await x]; -} - -=====================================output===================================== -async function f1() { - (await f()).length; -} -async function g() { - invariant((await driver.navigator.getUrl()).substr(-7)); -} -function* f2() { - !(yield a); -} -async function f3() { - a = !(await f()); -} -async () => { - new A(await x); - obj[await x]; -}; - -================================================================================ -`; - -exports[`conditional-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f() { - const result = typeof fn === 'function' ? await fn() : null; -} - -(async function() { - console.log( - await (true ? Promise.resolve("A") : Promise.resolve("B")) - ); -})() - -async function f2() { - await (spellcheck && spellcheck.setChecking(false)); - await spellcheck && spellcheck.setChecking(false) -} - -=====================================output===================================== -async function f() { - const result = typeof fn === "function" ? await fn() : null; -} - -(async function () { - console.log(await (true ? Promise.resolve("A") : Promise.resolve("B"))); -})(); - -async function f2() { - await (spellcheck && spellcheck.setChecking(false)); - (await spellcheck) && spellcheck.setChecking(false); -} - -================================================================================ -`; - -exports[`exponentiation.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async () => (await 5) ** 6; - -=====================================output===================================== -async () => (await 5) ** 6; - -================================================================================ -`; - -exports[`inline-await.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f() { - const admins = (await(db.select('*').from('admins').leftJoin('bla').where('id', 'in', [1,2,3,4]))).map(({id, name})=>({id, name})) -} - -=====================================output===================================== -async function f() { - const admins = ( - await db - .select("*") - .from("admins") - .leftJoin("bla") - .where("id", "in", [1, 2, 3, 4]) - ).map(({ id, name }) => ({ id, name })); -} - -================================================================================ -`; - -exports[`nested.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const getAccountCount = async () => - (await - (await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks") - ).getChildren() - ).length - -=====================================output===================================== -const getAccountCount = async () => - ( - await ( - await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks") - ).getChildren() - ).length; - -================================================================================ -`; - -exports[`parens.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function *f(){ await (yield x); } - -async function f2(){ await (() => {}); } - -=====================================output===================================== -async function* f() { - await (yield x); -} - -async function f2() { - await (() => {}); -} - -================================================================================ -`; - -exports[`simple-nested-await.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f() { - const a = await (await request()).json(); - const b = await fs.writeFile(file, await (await request()).text()); -} - -=====================================output===================================== -async function f() { - const a = await (await request()).json(); - const b = await fs.writeFile(file, await (await request()).text()); -} - -================================================================================ -`; diff --git a/tests/format/js/async/format.test.js b/tests/format/js/async/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/async/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/async/jsfmt.spec.js b/tests/format/js/async/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/async/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/async/nested2.js b/tests/format/js/async/nested2.js new file mode 100644 index 000000000000..5b7ec8637b26 --- /dev/null +++ b/tests/format/js/async/nested2.js @@ -0,0 +1,6 @@ +async function f() { +await Promise.all( + (await readdir("src")).map(async (path) => { + import(`./${path}`); + }) +);} diff --git a/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap b/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..11edced75969 --- /dev/null +++ b/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap @@ -0,0 +1,2690 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`async-do-expressions.js [acorn] format 1`] = ` +"Unexpected token (1:7) +> 1 | async do { await requestAPI().json() }; + | ^ + 2 | +Cause: Unexpected token (1:6)" +`; + +exports[`async-do-expressions.js [espree] format 1`] = ` +"Unexpected token do (1:7) +> 1 | async do { await requestAPI().json() }; + | ^ + 2 | +Cause: Unexpected token do" +`; + +exports[`async-do-expressions.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (1:7) +> 1 | async do { await requestAPI().json() }; + | ^^ + 2 | +Cause: [1:6-1:8]: Unexpected token: 'do'" +`; + +exports[`async-do-expressions.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6) +> 1 | async do { await requestAPI().json() }; + | ^ + 2 |" +`; + +exports[`async-do-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +async do { await requestAPI().json() }; + +=====================================output===================================== +(async do { + await requestAPI().json(); +}); + +================================================================================ +`; + +exports[`async-generators.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-async-generator-functions + +async function* agf() { + await 1; + yield 2; +} + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-async-generator-functions + +async function* agf() { + await 1; + yield 2; +} + +================================================================================ +`; + +exports[`bigint.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/tc39/proposal-bigint + +const previousMaxSafe = BigInt(Number.MAX_SAFE_INTEGER); +// ↪ 9007199254740991 + +const maxPlusOne = previousMaxSafe + 1n; +// ↪ 9007199254740992n + +const theFuture = previousMaxSafe + 2n; +// ↪ 9007199254740993n, this works now! + +const multi = previousMaxSafe * 2n; +// ↪ 18014398509481982n + +// \`–\` is not minus sign, +// SIC https://github.com/tc39/proposal-bigint#operators +// const subtr = multi – 10n; +// ↪ 18014398509481972n + +const mod = multi % 10n; +// ↪ 2n + +const bigN = 2n ** 54n; +// ↪ 18014398509481984n + +bigN * -1n +// ↪ –18014398509481984n + +0n === 0 +// ↪ false + +0n == 0 +// ↪ true + +1n < 2 +// ↪ true + +2n > 1 +// ↪ true + +2 > 2 +// ↪ false + +2n > 2 +// ↪ false + +2n >= 2 +// ↪ true + +const mixed = [4n, 6, -12n, 10, 4, 0, 0n]; +// ↪ [4n, 6, -12n, 10, 4, 0, 0n] + +mixed.sort(); +// ↪ [-12n, 0, 0n, 10, 4n, 4, 6] + +if (0n) { + console.log('Hello from the if!'); +} else { + console.log('Hello from the else!'); +} + +// ↪ "Hello from the else!" + +0n || 12n +// ↪ 12n + +0n && 12n +// ↪ 0n + +Boolean(0n) +// ↪ false + +Boolean(12n) +// ↪ true + +!12n +// ↪ false + +!0n +// ↪ true + +const view = new BigInt64Array(4); +// ↪ [0n, 0n, 0n, 0n] +view.length; +// ↪ 4 +view[0]; +// ↪ 0n +view[0] = 42n; +view[0]; +// ↪ 42n + +// Highest possible BigInt value that can be represented as a +// signed 64-bit integer. +const max = 2n ** (64n - 1n) - 1n; +view[0] = max; +view[0]; +// ↪ 9_223_372_036_854_775_807n +view[0] = max + 1n; +view[0]; +// ↪ -9_223_372_036_854_775_808n +// ^ negative because of overflow + +1n + 2 +// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions + +1n * 2 +// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions + ++1n +// ↪ TypeError: Cannot convert a BigInt value to a number + +Number(1n) +// ↪ 1 + +1n + '2' +// ↪ "12" + +'2' + 1n +// ↪ "21" + +const badPrecision = BigInt(9007199254740993); +// ↪9007199254740992n + +const goodPrecision = BigInt('9007199254740993'); +// ↪9007199254740993n + +const alsoGoodPrecision = 9007199254740993n; +// ↪9007199254740993n + +=====================================output===================================== +// https://github.com/tc39/proposal-bigint + +const previousMaxSafe = BigInt(Number.MAX_SAFE_INTEGER); +// ↪ 9007199254740991 + +const maxPlusOne = previousMaxSafe + 1n; +// ↪ 9007199254740992n + +const theFuture = previousMaxSafe + 2n; +// ↪ 9007199254740993n, this works now! + +const multi = previousMaxSafe * 2n; +// ↪ 18014398509481982n + +// \`–\` is not minus sign, +// SIC https://github.com/tc39/proposal-bigint#operators +// const subtr = multi – 10n; +// ↪ 18014398509481972n + +const mod = multi % 10n; +// ↪ 2n + +const bigN = 2n ** 54n; +// ↪ 18014398509481984n + +bigN * -1n; +// ↪ –18014398509481984n + +0n === 0; +// ↪ false + +0n == 0; +// ↪ true + +1n < 2; +// ↪ true + +2n > 1; +// ↪ true + +2 > 2; +// ↪ false + +2n > 2; +// ↪ false + +2n >= 2; +// ↪ true + +const mixed = [4n, 6, -12n, 10, 4, 0, 0n]; +// ↪ [4n, 6, -12n, 10, 4, 0, 0n] + +mixed.sort(); +// ↪ [-12n, 0, 0n, 10, 4n, 4, 6] + +if (0n) { + console.log("Hello from the if!"); +} else { + console.log("Hello from the else!"); +} + +// ↪ "Hello from the else!" + +0n || 12n; +// ↪ 12n + +0n && 12n; +// ↪ 0n + +Boolean(0n); +// ↪ false + +Boolean(12n); +// ↪ true + +!12n; +// ↪ false + +!0n; +// ↪ true + +const view = new BigInt64Array(4); +// ↪ [0n, 0n, 0n, 0n] +view.length; +// ↪ 4 +view[0]; +// ↪ 0n +view[0] = 42n; +view[0]; +// ↪ 42n + +// Highest possible BigInt value that can be represented as a +// signed 64-bit integer. +const max = 2n ** (64n - 1n) - 1n; +view[0] = max; +view[0]; +// ↪ 9_223_372_036_854_775_807n +view[0] = max + 1n; +view[0]; +// ↪ -9_223_372_036_854_775_808n +// ^ negative because of overflow + +1n + 2; +// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions + +1n * 2 + + // ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions + + 1n; +// ↪ TypeError: Cannot convert a BigInt value to a number + +Number(1n); +// ↪ 1 + +1n + "2"; +// ↪ "12" + +"2" + 1n; +// ↪ "21" + +const badPrecision = BigInt(9007199254740993); +// ↪9007199254740992n + +const goodPrecision = BigInt("9007199254740993"); +// ↪9007199254740993n + +const alsoGoodPrecision = 9007199254740993n; +// ↪9007199254740993n + +================================================================================ +`; + +exports[`class-properties.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-class-properties + +class Bork { + //Property initializer syntax + instanceProperty = "bork"; + boundFunction = () => { + return this.instanceProperty; + }; + + //Static class properties + static staticProperty = "babelIsCool"; + static staticFunction = function() { + return Bork.staticProperty; + }; + } + + let myBork = new Bork; + + //Property initializers are not on the prototype. + console.log(myBork.__proto__.boundFunction); // > undefined + + //Bound functions are bound to the class instance. + console.log(myBork.boundFunction.call(undefined)); // > "bork" + + //Static function exists on the class. + console.log(Bork.staticFunction()); // > "babelIsCool" + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-class-properties + +class Bork { + //Property initializer syntax + instanceProperty = "bork"; + boundFunction = () => { + return this.instanceProperty; + }; + + //Static class properties + static staticProperty = "babelIsCool"; + static staticFunction = function () { + return Bork.staticProperty; + }; +} + +let myBork = new Bork(); + +//Property initializers are not on the prototype. +console.log(myBork.__proto__.boundFunction); // > undefined + +//Bound functions are bound to the class instance. +console.log(myBork.boundFunction.call(undefined)); // > "bork" + +//Static function exists on the class. +console.log(Bork.staticFunction()); // > "babelIsCool" + +================================================================================ +`; + +exports[`class-static-block.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + static #x = 42; + static y; + static { + try { + this.y = doSomethingWith(this.#x); + } catch { + this.y = "unknown"; + } + } +} + +=====================================output===================================== +class C { + static #x = 42; + static y; + static { + try { + this.y = doSomethingWith(this.#x); + } catch { + this.y = "unknown"; + } + } +} + +================================================================================ +`; + +exports[`decorator-auto-accessors.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class C extends HTMLElement { +> 2 | accessor clicked = false; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`decorator-auto-accessors.js [espree] format 1`] = ` +"Unexpected token clicked (2:12) + 1 | class C extends HTMLElement { +> 2 | accessor clicked = false; + | ^ + 3 | } + 4 | +Cause: Unexpected token clicked" +`; + +exports[`decorator-auto-accessors.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C extends HTMLElement { + accessor clicked = false; +} + +=====================================output===================================== +class C extends HTMLElement { + accessor clicked = false; +} + +================================================================================ +`; + +exports[`decorators.js [acorn] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators + 2 | +> 3 | @annotation + | ^ + 4 | class MyClass { } + 5 | + 6 | function annotation(target) { +Cause: Unexpected character '@' (3:0)" +`; + +exports[`decorators.js [espree] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators + 2 | +> 3 | @annotation + | ^ + 4 | class MyClass { } + 5 | + 6 | function annotation(target) { +Cause: Unexpected character '@'" +`; + +exports[`decorators.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-decorators + +@annotation +class MyClass { } + +function annotation(target) { + target.annotated = true; +} + +@isTestable(true) +class MyClass { } + +function isTestable(value) { + return function decorator(target) { + target.isTestable = value; + } +} + +class C { + @enumerable(false) + method() { } +} + +function enumerable(value) { + return function (target, key, descriptor) { + descriptor.enumerable = value; + return descriptor; + } +} + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-decorators + +@annotation +class MyClass {} + +function annotation(target) { + target.annotated = true; +} + +@isTestable(true) +class MyClass {} + +function isTestable(value) { + return function decorator(target) { + target.isTestable = value; + }; +} + +class C { + @enumerable(false) + method() {} +} + +function enumerable(value) { + return function (target, key, descriptor) { + descriptor.enumerable = value; + return descriptor; + }; +} + +================================================================================ +`; + +exports[`deferred-import-evaluation.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`deferred-import-evaluation.js [espree] format 1`] = ` +"Unexpected token * (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: Unexpected token *" +`; + +exports[`deferred-import-evaluation.js [meriyah] format 1`] = ` +"Expected 'from' (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: [1:13-1:14]: Expected 'from'" +`; + +exports[`deferred-import-evaluation.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import defer * as ns from "x"; + +=====================================output===================================== +import defer * as ns from "x"; + +================================================================================ +`; + +exports[`destructuring-private.js [acorn] format 1`] = ` +"Unexpected token (5:13) + 3 | constructor() { + 4 | console.log(this.#x); // => 1 +> 5 | const { #x: x } = this; + | ^ + 6 | console.log(x); // => 1 + 7 | } + 8 | equals({ #x: otherX }) { +Cause: Unexpected token (5:12)" +`; + +exports[`destructuring-private.js [espree] format 1`] = ` +"Unexpected token #x (5:13) + 3 | constructor() { + 4 | console.log(this.#x); // => 1 +> 5 | const { #x: x } = this; + | ^ + 6 | console.log(x); // => 1 + 7 | } + 8 | equals({ #x: otherX }) { +Cause: Unexpected token #x" +`; + +exports[`destructuring-private.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (5:13) + 3 | constructor() { + 4 | console.log(this.#x); // => 1 +> 5 | const { #x: x } = this; + | ^ + 6 | console.log(x); // => 1 + 7 | } + 8 | equals({ #x: otherX }) { +Cause: [5:12-5:13]: Unexpected token: 'PrivateField'" +`; + +exports[`destructuring-private.js [oxc] format 1`] = ` +"Unexpected token (5:13) + 3 | constructor() { + 4 | console.log(this.#x); // => 1 +> 5 | const { #x: x } = this; + | ^^ + 6 | console.log(x); // => 1 + 7 | } + 8 | equals({ #x: otherX }) {" +`; + +exports[`destructuring-private.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + #x = 1; + constructor() { + console.log(this.#x); // => 1 + const { #x: x } = this; + console.log(x); // => 1 + } + equals({ #x: otherX }) { + const { #x: currentX } = this; + return currentX === otherX; + } +} + +=====================================output===================================== +class Foo { + #x = 1; + constructor() { + console.log(this.#x); // => 1 + const { #x: x } = this; + console.log(x); // => 1 + } + equals({ #x: otherX }) { + const { #x: currentX } = this; + return currentX === otherX; + } +} + +================================================================================ +`; + +exports[`do-expressions.js [acorn] format 1`] = ` +"Unexpected token (3:9) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions + 2 | +> 3 | let a = do { + | ^ + 4 | if(x > 10) { + 5 | 'big'; + 6 | } else { +Cause: Unexpected token (3:8)" +`; + +exports[`do-expressions.js [espree] format 1`] = ` +"Unexpected token do (3:9) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions + 2 | +> 3 | let a = do { + | ^ + 4 | if(x > 10) { + 5 | 'big'; + 6 | } else { +Cause: Unexpected token do" +`; + +exports[`do-expressions.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (3:9) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions + 2 | +> 3 | let a = do { + | ^^ + 4 | if(x > 10) { + 5 | 'big'; + 6 | } else { +Cause: [3:8-3:10]: Unexpected token: 'do'" +`; + +exports[`do-expressions.js [oxc] format 1`] = ` +"Unexpected token (3:9) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions + 2 | +> 3 | let a = do { + | ^^ + 4 | if(x > 10) { + 5 | 'big'; + 6 | } else {" +`; + +exports[`do-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-do-expressions + +let a = do { + if(x > 10) { + 'big'; + } else { + 'small'; + } +}; +// is equivalent to: +let a = x > 10 ? 'big' : 'small'; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-do-expressions + +let a = do { + if (x > 10) { + ("big"); + } else { + ("small"); + } +}; +// is equivalent to: +let a = x > 10 ? "big" : "small"; + +================================================================================ +`; + +exports[`dynamic-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-syntax-dynamic-import + +// There is no example code on babel website + +import('./prettier.mjs'); +import(prettier); +import('./prettier.mjs').then(module => console.log(module)); +import(prettier).then(module => console.log(module)); + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-syntax-dynamic-import + +// There is no example code on babel website + +import("./prettier.mjs"); +import(prettier); +import("./prettier.mjs").then((module) => console.log(module)); +import(prettier).then((module) => console.log(module)); + +================================================================================ +`; + +exports[`explicit-resource-management.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:9) + 1 | function * g() { +> 2 | using handle = acquireFileHandle(); // block-scoped critical resource + | ^^^^^^ + 3 | } // cleanup + 4 | + 5 | { +Cause: [2:8-2:14]: Unexpected token: 'identifier'" +`; + +exports[`explicit-resource-management.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function * g() { + using handle = acquireFileHandle(); // block-scoped critical resource +} // cleanup + +{ + using obj = g(); // block-scoped declaration + const r = obj.next(); +} // calls finally blocks in \`g\` + +{ + await using obj = g(); +} + +=====================================output===================================== +function* g() { + using handle = acquireFileHandle(); // block-scoped critical resource +} // cleanup + +{ + using obj = g(); // block-scoped declaration + const r = obj.next(); +} // calls finally blocks in \`g\` + +{ + await using obj = g(); +} + +================================================================================ +`; + +exports[`export-default-from.js [acorn] format 1`] = ` +"Unexpected token (4:8) + 2 | + 3 | +> 4 | export v from 'mod'; + | ^ + 5 | +Cause: Unexpected token (4:7)" +`; + +exports[`export-default-from.js [espree] format 1`] = ` +"Unexpected token v (4:8) + 2 | + 3 | +> 4 | export v from 'mod'; + | ^ + 5 | +Cause: Unexpected token v" +`; + +exports[`export-default-from.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (4:8) + 2 | + 3 | +> 4 | export v from 'mod'; + | ^ + 5 | +Cause: [4:7-4:8]: Unexpected token: 'identifier'" +`; + +exports[`export-default-from.js [oxc] format 1`] = ` +"Unexpected token (4:8) + 2 | + 3 | +> 4 | export v from 'mod'; + | ^ + 5 |" +`; + +exports[`export-default-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-export-default-from + + +export v from 'mod'; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-export-default-from + +export v from "mod"; + +================================================================================ +`; + +exports[`export-namespace-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-export-namespace-from + +export * as ns from 'mod'; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-export-namespace-from + +export * as ns from "mod"; + +================================================================================ +`; + +exports[`flow.js [__babel_estree] format 1`] = ` +"Unexpected token, expected "," (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 | +Cause: Unexpected token, expected "," (3:16)" +`; + +exports[`flow.js [acorn] format 1`] = ` +"Unexpected token (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 | +Cause: Unexpected token (3:16)" +`; + +exports[`flow.js [babel] format 1`] = ` +"Unexpected token, expected "," (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 | +Cause: Unexpected token, expected "," (3:16)" +`; + +exports[`flow.js [babel-flow] format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-preset-flow + +function foo(one: any, two: number, three?): string {} + +=====================================output===================================== +// https://babeljs.io/docs/babel-preset-flow + +function foo(one: any, two: number, three?): string {} + +================================================================================ +`; + +exports[`flow.js [babel-ts] format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-preset-flow + +function foo(one: any, two: number, three?): string {} + +=====================================output===================================== +// https://babeljs.io/docs/babel-preset-flow + +function foo(one: any, two: number, three?): string {} + +================================================================================ +`; + +exports[`flow.js [espree] format 1`] = ` +"Unexpected token : (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 | +Cause: Unexpected token :" +`; + +exports[`flow.js [meriyah] format 1`] = ` +"Expected ')' (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 | +Cause: [3:16-3:17]: Expected ')'" +`; + +exports[`flow.js [oxc] format 1`] = ` +"Expected \`,\` but found \`:\` (3:17) + 1 | // https://babeljs.io/docs/babel-preset-flow + 2 | +> 3 | function foo(one: any, two: number, three?): string {} + | ^ + 4 |" +`; + +exports[`function-bind.js [acorn] format 1`] = ` +"Unexpected token (3:5) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind + 2 | +> 3 | obj::func + | ^ + 4 | // is equivalent to: + 5 | func.bind(obj) + 6 | +Cause: Unexpected token (3:4)" +`; + +exports[`function-bind.js [espree] format 1`] = ` +"Unexpected token : (3:5) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind + 2 | +> 3 | obj::func + | ^ + 4 | // is equivalent to: + 5 | func.bind(obj) + 6 | +Cause: Unexpected token :" +`; + +exports[`function-bind.js [meriyah] format 1`] = ` +"Unexpected token: ':' (3:5) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind + 2 | +> 3 | obj::func + | ^ + 4 | // is equivalent to: + 5 | func.bind(obj) + 6 | +Cause: [3:4-3:5]: Unexpected token: ':'" +`; + +exports[`function-bind.js [oxc] format 1`] = ` +"Unexpected token (3:5) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind + 2 | +> 3 | obj::func + | ^ + 4 | // is equivalent to: + 5 | func.bind(obj) + 6 |" +`; + +exports[`function-bind.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-function-bind + +obj::func +// is equivalent to: +func.bind(obj) + +::obj.func +// is equivalent to: +obj.func.bind(obj) + +obj::func(val) +// is equivalent to: +func.call(obj, val) + +::obj.func(val) +// is equivalent to: +obj.func.call(obj, val) + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-function-bind + +obj::func; +// is equivalent to: +func.bind(obj)::obj.func; +// is equivalent to: +obj.func.bind(obj); + +obj::func(val); +// is equivalent to: +func + .call(obj, val) + + ::obj.func(val); +// is equivalent to: +obj.func.call(obj, val); + +================================================================================ +`; + +exports[`function-sent.js [acorn] format 1`] = ` +"Unexpected token (4:33) + 2 | + 3 | function* generator() { +> 4 | console.log("Sent", function.sent); + | ^ + 5 | console.log("Yield", yield); + 6 | } + 7 | +Cause: Unexpected token (4:32)" +`; + +exports[`function-sent.js [espree] format 1`] = ` +"Unexpected token . (4:33) + 2 | + 3 | function* generator() { +> 4 | console.log("Sent", function.sent); + | ^ + 5 | console.log("Yield", yield); + 6 | } + 7 | +Cause: Unexpected token ." +`; + +exports[`function-sent.js [meriyah] format 1`] = ` +"Expected '(' (4:33) + 2 | + 3 | function* generator() { +> 4 | console.log("Sent", function.sent); + | ^ + 5 | console.log("Yield", yield); + 6 | } + 7 | +Cause: [4:32-4:33]: Expected '('" +`; + +exports[`function-sent.js [oxc] format 1`] = ` +"Expected \`(\` but found \`.\` (4:33) + 2 | + 3 | function* generator() { +> 4 | console.log("Sent", function.sent); + | ^ + 5 | console.log("Yield", yield); + 6 | } + 7 |" +`; + +exports[`function-sent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-function-sent + +function* generator() { + console.log("Sent", function.sent); + console.log("Yield", yield); +} + +const iterator = generator(); +iterator.next(1); // Logs "Sent 1" +iterator.next(2); // Logs "Yield 2" + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-function-sent + +function* generator() { + console.log("Sent", function.sent); + console.log("Yield", yield); +} + +const iterator = generator(); +iterator.next(1); // Logs "Sent 1" +iterator.next(2); // Logs "Yield 2" + +================================================================================ +`; + +exports[`import-assertions-dynamic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { assert: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", { assert: { type: "json" } }); + +================================================================================ +`; + +exports[`import-assertions-static.js [acorn] format 1`] = ` +"Unexpected token (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token (1:30)" +`; + +exports[`import-assertions-static.js [espree] format 1`] = ` +"Unexpected token assert (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`import-assertions-static.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^^^^^^ + 2 | +Cause: [1:30-1:36]: Unexpected token: 'identifier'" +`; + +exports[`import-assertions-static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" assert { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" assert { type: "json" }; + +================================================================================ +`; + +exports[`import-attributes-dynamic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { with: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", { with: { type: "json" } }); + +================================================================================ +`; + +exports[`import-attributes-static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" with { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" with { type: "json" }; + +================================================================================ +`; + +exports[`import-meta.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-syntax-import-meta + +// Enabled by default https://github.com/babel/babel/pull/11406 + +// from https://github.com/tc39/proposal-import-meta + +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url)); + const blob = await response.blob(); + + const size = import.meta.scriptElement.dataset.size || 300; + + const image = new Image(); + image.src = URL.createObjectURL(blob); + image.width = image.height = size; + + document.body.appendChild(image); +})(); + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-syntax-import-meta + +// Enabled by default https://github.com/babel/babel/pull/11406 + +// from https://github.com/tc39/proposal-import-meta + +(async () => { + const response = await fetch(new URL("../hamsters.jpg", import.meta.url)); + const blob = await response.blob(); + + const size = import.meta.scriptElement.dataset.size || 300; + + const image = new Image(); + image.src = URL.createObjectURL(blob); + image.width = image.height = size; + + document.body.appendChild(image); +})(); + +================================================================================ +`; + +exports[`jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-syntax-jsx + +var profile = <div> + <img src="avatar.png" className="profile" /> + <h3>{[user.firstName, user.lastName].join(' ')}</h3> +</div>; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-syntax-jsx + +var profile = ( + <div> + <img src="avatar.png" className="profile" /> + <h3>{[user.firstName, user.lastName].join(" ")}</h3> + </div> +); + +================================================================================ +`; + +exports[`logical-assignment-operators.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-logical-assignment-operators + +a ||= b; +obj.a.b ||= c; + +a &&= b; +obj.a.b &&= c; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-logical-assignment-operators + +a ||= b; +obj.a.b ||= c; + +a &&= b; +obj.a.b &&= c; + +================================================================================ +`; + +exports[`module-blocks.js [acorn] format 1`] = ` +"Unexpected token (1:16) +> 1 | let m = module { + | ^ + 2 | export let m = 2; + 3 | export let n = 3; + 4 | }; +Cause: Unexpected token (1:15)" +`; + +exports[`module-blocks.js [espree] format 1`] = ` +"Unexpected token { (1:16) +> 1 | let m = module { + | ^ + 2 | export let m = 2; + 3 | export let n = 3; + 4 | }; +Cause: Unexpected token {" +`; + +exports[`module-blocks.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:16) +> 1 | let m = module { + | ^ + 2 | export let m = 2; + 3 | export let n = 3; + 4 | }; +Cause: [1:15-1:16]: Unexpected token: '{'" +`; + +exports[`module-blocks.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:15) +> 1 | let m = module { + | ^ + 2 | export let m = 2; + 3 | export let n = 3; + 4 | };" +`; + +exports[`module-blocks.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let m = module { + export let m = 2; + export let n = 3; +}; + +=====================================output===================================== +let m = module { + export let m = 2; + export let n = 3; +}; + +================================================================================ +`; + +exports[`module-string-names.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { "😄" as smile } from "./emojis.js"; +export { smile as "😄" } from "./emojis.js"; + +=====================================output===================================== +import { "😄" as smile } from "./emojis.js"; +export { smile as "😄" } from "./emojis.js"; + +================================================================================ +`; + +exports[`nullish-coalescing-operator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-nullish-coalescing-operator + +var foo = object.foo ?? "default"; + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-nullish-coalescing-operator + +var foo = object.foo ?? "default"; + +================================================================================ +`; + +exports[`numeric-separator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-numeric-separator + +let budget = 1_000_000_000_000; + +// What is the value of \`budget\`? It's 1 trillion! +// +// Let's confirm: +console.log(budget === 10 ** 12); // true + +let nibbles = 0b1010_0001_1000_0101; + +// Is bit 7 on? It sure is! +// 0b1010_0001_1000_0101 +// ^ +// +// We can double check: +console.log(!!(nibbles & (1 << 7))); // true + +// Messages are sent as 24 bit values, but should be +// treated as 3 distinct bytes: +let message = 0xa0_b0_c0; + +// What's the value of the upper most byte? It's A0, or 160. +// We can confirm that: +let a = (message >> 16) & 0xff; +console.log(a.toString(16), a); // a0, 160 + +// What's the value of the middle byte? It's B0, or 176. +// Let's just make sure... +let b = (message >> 8) & 0xff; +console.log(b.toString(16), b); // b0, 176 + +// What's the value of the lower most byte? It's C0, or 192. +// Again, let's prove that: +let c = message & 0xff; +console.log(c.toString(16), b); // c0, 192 + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-numeric-separator + +let budget = 1_000_000_000_000; + +// What is the value of \`budget\`? It's 1 trillion! +// +// Let's confirm: +console.log(budget === 10 ** 12); // true + +let nibbles = 0b1010_0001_1000_0101; + +// Is bit 7 on? It sure is! +// 0b1010_0001_1000_0101 +// ^ +// +// We can double check: +console.log(!!(nibbles & (1 << 7))); // true + +// Messages are sent as 24 bit values, but should be +// treated as 3 distinct bytes: +let message = 0xa0_b0_c0; + +// What's the value of the upper most byte? It's A0, or 160. +// We can confirm that: +let a = (message >> 16) & 0xff; +console.log(a.toString(16), a); // a0, 160 + +// What's the value of the middle byte? It's B0, or 176. +// Let's just make sure... +let b = (message >> 8) & 0xff; +console.log(b.toString(16), b); // b0, 176 + +// What's the value of the lower most byte? It's C0, or 192. +// Again, let's prove that: +let c = message & 0xff; +console.log(c.toString(16), b); // c0, 192 + +================================================================================ +`; + +exports[`object-rest-spread.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-transform-object-rest-spread + +let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; +console.log(x); // 1 +console.log(y); // 2 +console.log(z); // { a: 3, b: 4 } + +let n = { x, y, ...z }; +console.log(n); // { x: 1, y: 2, a: 3, b: 4 } + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-transform-object-rest-spread + +let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; +console.log(x); // 1 +console.log(y); // 2 +console.log(z); // { a: 3, b: 4 } + +let n = { x, y, ...z }; +console.log(n); // { x: 1, y: 2, a: 3, b: 4 } + +================================================================================ +`; + +exports[`optional-catch-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-optional-catch-binding + +try { + throw 0; +} catch { + doSomethingWhichDoesNotCareAboutTheValueThrown(); +} + +try { + throw 0; +} catch { + doSomethingWhichDoesNotCareAboutTheValueThrown(); +} finally { + doSomeCleanup(); +} + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-optional-catch-binding + +try { + throw 0; +} catch { + doSomethingWhichDoesNotCareAboutTheValueThrown(); +} + +try { + throw 0; +} catch { + doSomethingWhichDoesNotCareAboutTheValueThrown(); +} finally { + doSomeCleanup(); +} + +================================================================================ +`; + +exports[`optional-chaining.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-optional-chaining + +const obj = { + foo: { + bar: { + baz: 42, + }, + }, +}; + +const baz = obj?.foo?.bar?.baz; // 42 + +const safe = obj?.qux?.baz; // undefined + +// Optional chaining and normal chaining can be intermixed +obj?.foo.bar?.baz; // Only access \`foo\` if \`obj\` exists, and \`baz\` if + // \`bar\` exists + +// Example usage with bracket notation: +obj?.['foo']?.bar?.baz // 42 + +const obj2 = { + foo: { + bar: { + baz() { + return 42; + }, + }, + }, +}; + +const baz2 = obj?.foo?.bar?.baz(); // 42 + +const safe3 = obj?.qux?.baz(); // undefined +const safe4 = obj?.foo.bar.qux?.(); // undefined + +const willThrow = obj?.foo.bar.qux(); // Error: not a function + +// Top function can be called directly, too. +function test() { + return 42; +} +test?.(); // 42 + +exists?.(); // undefined + +const obj3 = { + foo: { + bar: { + baz: class { + }, + }, + }, +}; + +const obj4 = { + foo: { + bar: {} + }, +}; + +const ret = delete obj?.foo?.bar?.baz; // true + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-optional-chaining + +const obj = { + foo: { + bar: { + baz: 42, + }, + }, +}; + +const baz = obj?.foo?.bar?.baz; // 42 + +const safe = obj?.qux?.baz; // undefined + +// Optional chaining and normal chaining can be intermixed +obj?.foo.bar?.baz; // Only access \`foo\` if \`obj\` exists, and \`baz\` if +// \`bar\` exists + +// Example usage with bracket notation: +obj?.["foo"]?.bar?.baz; // 42 + +const obj2 = { + foo: { + bar: { + baz() { + return 42; + }, + }, + }, +}; + +const baz2 = obj?.foo?.bar?.baz(); // 42 + +const safe3 = obj?.qux?.baz(); // undefined +const safe4 = obj?.foo.bar.qux?.(); // undefined + +const willThrow = obj?.foo.bar.qux(); // Error: not a function + +// Top function can be called directly, too. +function test() { + return 42; +} +test?.(); // 42 + +exists?.(); // undefined + +const obj3 = { + foo: { + bar: { + baz: class {}, + }, + }, +}; + +const obj4 = { + foo: { + bar: {}, + }, +}; + +const ret = delete obj?.foo?.bar?.baz; // true + +================================================================================ +`; + +exports[`optional-chaining-assignment.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | maybeAnObj?.prop = theValue; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" +`; + +exports[`optional-chaining-assignment.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | maybeAnObj?.prop = theValue; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`optional-chaining-assignment.js [meriyah] format 1`] = ` +"Invalid left-hand side in assignment (1:18) +> 1 | maybeAnObj?.prop = theValue; + | ^ + 2 | +Cause: [1:17-1:18]: Invalid left-hand side in assignment" +`; + +exports[`optional-chaining-assignment.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:1) +> 1 | maybeAnObj?.prop = theValue; + | ^^^^^^^^^^^^^^^^ + 2 |" +`; + +exports[`optional-chaining-assignment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +maybeAnObj?.prop = theValue; + +=====================================output===================================== +maybeAnObj?.prop = theValue; + +================================================================================ +`; + +exports[`partial-application.js [acorn] format 1`] = ` +"Unexpected token (5:23) + 3 | function add(x, y) { return x + y; } + 4 | +> 5 | const addOne = add(1, ?); // apply from the left + | ^ + 6 | addOne(2); // 3 + 7 | + 8 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token (5:22)" +`; + +exports[`partial-application.js [espree] format 1`] = ` +"Unexpected token ? (5:23) + 3 | function add(x, y) { return x + y; } + 4 | +> 5 | const addOne = add(1, ?); // apply from the left + | ^ + 6 | addOne(2); // 3 + 7 | + 8 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token ?" +`; + +exports[`partial-application.js [meriyah] format 1`] = ` +"Unexpected token: '?' (5:23) + 3 | function add(x, y) { return x + y; } + 4 | +> 5 | const addOne = add(1, ?); // apply from the left + | ^ + 6 | addOne(2); // 3 + 7 | + 8 | const addTen = add(?, 10); // apply from the right +Cause: [5:22-5:23]: Unexpected token: '?'" +`; + +exports[`partial-application.js [oxc] format 1`] = ` +"Unexpected token (5:23) + 3 | function add(x, y) { return x + y; } + 4 | +> 5 | const addOne = add(1, ?); // apply from the left + | ^ + 6 | addOne(2); // 3 + 7 | + 8 | const addTen = add(?, 10); // apply from the right" +`; + +exports[`partial-application.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-partial-application + +function add(x, y) { return x + y; } + +const addOne = add(1, ?); // apply from the left +addOne(2); // 3 + +const addTen = add(?, 10); // apply from the right +addTen(2); // 12 + +let newScore = player.score + |> add(7, ?) + |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. + +f(x, ?) // partial application from left +f(?, x) // partial application from right +f(?, x, ?) // partial application for any arg +o.f(x, ?) // partial application from left +o.f(?, x) // partial application from right +o.f(?, x, ?) // partial application for any arg +super.f(?) // partial application allowed for call on |SuperProperty| + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-partial-application + +function add(x, y) { + return x + y; +} + +const addOne = add(1, ?); // apply from the left +addOne(2); // 3 + +const addTen = add(?, 10); // apply from the right +addTen(2); // 12 + +let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. + +f(x, ?); // partial application from left +f(?, x); // partial application from right +f(?, x, ?); // partial application for any arg +o.f(x, ?); // partial application from left +o.f(?, x); // partial application from right +o.f(?, x, ?); // partial application for any arg +super.f(?); // partial application allowed for call on |SuperProperty| + +================================================================================ +`; + +exports[`pipeline-operator-fsharp.js [acorn] format 1`] = ` +"Unexpected token (5:4) + 3 | + 4 | promise +> 5 | |> await + | ^ + 6 | |> x => doubleSay(x, ', ') + 7 | |> capitalize + 8 | |> x => x + '!' +Cause: Unexpected token (5:3)" +`; + +exports[`pipeline-operator-fsharp.js [espree] format 1`] = ` +"Unexpected token > (5:4) + 3 | + 4 | promise +> 5 | |> await + | ^ + 6 | |> x => doubleSay(x, ', ') + 7 | |> capitalize + 8 | |> x => x + '!' +Cause: Unexpected token >" +`; + +exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = ` +"Unexpected token: '>' (5:4) + 3 | + 4 | promise +> 5 | |> await + | ^ + 6 | |> x => doubleSay(x, ', ') + 7 | |> capitalize + 8 | |> x => x + '!' +Cause: [5:3-5:4]: Unexpected token: '>'" +`; + +exports[`pipeline-operator-fsharp.js [oxc] format 1`] = ` +"Unexpected token (5:4) + 3 | + 4 | promise +> 5 | |> await + | ^ + 6 | |> x => doubleSay(x, ', ') + 7 | |> capitalize + 8 | |> x => x + '!'" +`; + +exports[`pipeline-operator-fsharp.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/valtech-nyc/proposal-fsharp-pipelines + +promise + |> await + |> x => doubleSay(x, ', ') + |> capitalize + |> x => x + '!' + |> x => new User.Message(x) + |> x => stream.write(x) + |> await + |> console.log; + +const result = exclaim(capitalize(doubleSay("hello"))); +result //=> "Hello, hello!" + +const result = "hello" + |> doubleSay + |> capitalize + |> exclaim; + +result //=> "Hello, hello!" + +const person = { score: 25 }; + +const newScore = person.score + |> double + |> n => add(7, n) + |> n => boundScore(0, 100, n); + +newScore //=> 57 + +// As opposed to: +let newScore = boundScore(0, 100, add(7, double(person.score))); + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/valtech-nyc/proposal-fsharp-pipelines + +promise + |> await + |> (x) => doubleSay(x, ", ") + |> capitalize + |> (x) => x + "!" + |> (x) => new User.Message(x) + |> (x) => stream.write(x) + |> await + |> console.log; + +const result = exclaim(capitalize(doubleSay("hello"))); +result; //=> "Hello, hello!" + +const result = "hello" |> doubleSay |> capitalize |> exclaim; + +result; //=> "Hello, hello!" + +const person = { score: 25 }; + +const newScore = + person.score |> double |> (n) => add(7, n) |> (n) => boundScore(0, 100, n); + +newScore; //=> 57 + +// As opposed to: +let newScore = boundScore(0, 100, add(7, double(person.score))); + +================================================================================ +`; + +exports[`pipeline-operator-hack.js [acorn] format 1`] = ` +"Unexpected token (5:3) + 3 | + 4 | return list +> 5 | |> take(prefix.length, %) + | ^ + 6 | |> equals(%, prefix); + 7 | + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: Unexpected token (5:2)" +`; + +exports[`pipeline-operator-hack.js [espree] format 1`] = ` +"Unexpected token > (5:3) + 3 | + 4 | return list +> 5 | |> take(prefix.length, %) + | ^ + 6 | |> equals(%, prefix); + 7 | + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: Unexpected token >" +`; + +exports[`pipeline-operator-hack.js [meriyah] format 1`] = ` +"Unexpected token: '>' (5:3) + 3 | + 4 | return list +> 5 | |> take(prefix.length, %) + | ^ + 6 | |> equals(%, prefix); + 7 | + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: [5:2-5:3]: Unexpected token: '>'" +`; + +exports[`pipeline-operator-hack.js [oxc] format 1`] = ` +"Unexpected token (5:3) + 3 | + 4 | return list +> 5 | |> take(prefix.length, %) + | ^ + 6 | |> equals(%, prefix); + 7 | + 8 | // (The % token isn't final; it might instead be @ or ? or #.)" +`; + +exports[`pipeline-operator-hack.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/js-choi/proposal-hack-pipes + +return list + |> take(prefix.length, %) + |> equals(%, prefix); + +// (The % token isn't final; it might instead be @ or ? or #.) + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/js-choi/proposal-hack-pipes + +return list |> take(prefix.length, %) |> equals(%, prefix); + +// (The % token isn't final; it might instead be @ or ? or #.) + +================================================================================ +`; + +exports[`pipeline-operator-minimal.js [acorn] format 1`] = ` +"Identifier 'result' has already been declared (7:5) + 5 | result //=> "Hello, hello!" + 6 | +> 7 | let result = "hello" + | ^ + 8 | |> doubleSay + 9 | |> capitalize + 10 | |> exclaim; +Cause: Identifier 'result' has already been declared (7:4)" +`; + +exports[`pipeline-operator-minimal.js [espree] format 1`] = ` +"Identifier 'result' has already been declared (7:5) + 5 | result //=> "Hello, hello!" + 6 | +> 7 | let result = "hello" + | ^ + 8 | |> doubleSay + 9 | |> capitalize + 10 | |> exclaim; +Cause: Identifier 'result' has already been declared" +`; + +exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` +"Unexpected token: '>' (8:4) + 6 | + 7 | let result = "hello" +> 8 | |> doubleSay + | ^ + 9 | |> capitalize + 10 | |> exclaim; + 11 | +Cause: [8:3-8:4]: Unexpected token: '>'" +`; + +exports[`pipeline-operator-minimal.js [oxc] format 1`] = ` +"Unexpected token (8:4) + 6 | + 7 | let result = "hello" +> 8 | |> doubleSay + | ^ + 9 | |> capitalize + 10 | |> exclaim; + 11 |" +`; + +exports[`pipeline-operator-minimal.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/tc39/proposal-pipeline-operator/ + +let result = exclaim(capitalize(doubleSay("hello"))); +result //=> "Hello, hello!" + +let result = "hello" + |> doubleSay + |> capitalize + |> exclaim; + +result //=> "Hello, hello!" + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator +// https://github.com/tc39/proposal-pipeline-operator/ + +let result = exclaim(capitalize(doubleSay("hello"))); +result; //=> "Hello, hello!" + +let result = "hello" |> doubleSay |> capitalize |> exclaim; + +result; //=> "Hello, hello!" + +================================================================================ +`; + +exports[`private-fields-in-in.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/tc39/proposal-private-fields-in-in + +class C { + #brand; + + static isC(obj) { + try { + obj.#brand; + return true; + } catch { + return false; + } + } +} + +class C2 { + #data = null; // populated later + + get #getter() { + if (!this.#data) { + throw new Error('no data yet!'); + } + return this.#data; + } + + static isC(obj) { + try { + obj.#getter; + return true; + } catch { + return false; // oops! might have gotten here because \`#getter\` threw :-( + } + } +} + +class C3 { + #brand; + + #method() {} + + get #getter() {} + + static isC(obj) { + return #brand in obj && #method in obj && #getter in obj; + } +} + +// Invalid https://github.com/tc39/proposal-private-fields-in-in#try-statement +// class C { +// #brand; + +// static isC(obj) { +// return try obj.#brand; +// } +// } + +=====================================output===================================== +// https://github.com/tc39/proposal-private-fields-in-in + +class C { + #brand; + + static isC(obj) { + try { + obj.#brand; + return true; + } catch { + return false; + } + } +} + +class C2 { + #data = null; // populated later + + get #getter() { + if (!this.#data) { + throw new Error("no data yet!"); + } + return this.#data; + } + + static isC(obj) { + try { + obj.#getter; + return true; + } catch { + return false; // oops! might have gotten here because \`#getter\` threw :-( + } + } +} + +class C3 { + #brand; + + #method() {} + + get #getter() {} + + static isC(obj) { + return #brand in obj && #method in obj && #getter in obj; + } +} + +// Invalid https://github.com/tc39/proposal-private-fields-in-in#try-statement +// class C { +// #brand; + +// static isC(obj) { +// return try obj.#brand; +// } +// } + +================================================================================ +`; + +exports[`private-methods.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-private-methods + +// Test for \`classPrivateProperties\` and \`classPrivateMethods\` + +class Counter extends HTMLElement { + #xValue = 0; + #render() {} + + get #x() { return this.#xValue; } + set #x(value) { + this.#xValue = value; + window.requestAnimationFrame( + this.#render.bind(this)); + } + + #clicked() { + this.#x++; + } +} + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-private-methods + +// Test for \`classPrivateProperties\` and \`classPrivateMethods\` + +class Counter extends HTMLElement { + #xValue = 0; + #render() {} + + get #x() { + return this.#xValue; + } + set #x(value) { + this.#xValue = value; + window.requestAnimationFrame(this.#render.bind(this)); + } + + #clicked() { + this.#x++; + } +} + +================================================================================ +`; + +exports[`regex-v-flag.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +/a/v; + +=====================================output===================================== +/a/v; + +================================================================================ +`; + +exports[`regexp-modifiers.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const re = /^(?i:[a-z])[a-z]$/; + +=====================================output===================================== +const re = /^(?i:[a-z])[a-z]$/; + +================================================================================ +`; + +exports[`source-phase-imports.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source fooSource from "foo"; + | ^ + 2 | import.source("x"); + 3 | +Cause: Unexpected token (1:14)" +`; + +exports[`source-phase-imports.js [espree] format 1`] = ` +"Unexpected token fooSource (1:15) +> 1 | import source fooSource from "foo"; + | ^ + 2 | import.source("x"); + 3 | +Cause: Unexpected token fooSource" +`; + +exports[`source-phase-imports.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source fooSource from "foo"; + | ^^^^^^^^^ + 2 | import.source("x"); + 3 | +Cause: [1:14-1:23]: Expected 'from'" +`; + +exports[`source-phase-imports.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source fooSource from "foo"; +import.source("x"); + +=====================================output===================================== +import source fooSource from "foo"; +import.source("x"); + +================================================================================ +`; + +exports[`throw-expressions.js [acorn] format 1`] = ` +"Unexpected token (3:23) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + 2 | +> 3 | function test(param = throw new Error('required!')) { + | ^ + 4 | const test = param === true || throw new Error('Falsy!'); + 5 | } + 6 | +Cause: Unexpected token (3:22)" +`; + +exports[`throw-expressions.js [espree] format 1`] = ` +"Unexpected token throw (3:23) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + 2 | +> 3 | function test(param = throw new Error('required!')) { + | ^ + 4 | const test = param === true || throw new Error('Falsy!'); + 5 | } + 6 | +Cause: Unexpected token throw" +`; + +exports[`throw-expressions.js [meriyah] format 1`] = ` +"Unexpected token: 'throw' (3:23) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + 2 | +> 3 | function test(param = throw new Error('required!')) { + | ^^^^^ + 4 | const test = param === true || throw new Error('Falsy!'); + 5 | } + 6 | +Cause: [3:22-3:27]: Unexpected token: 'throw'" +`; + +exports[`throw-expressions.js [oxc] format 1`] = ` +"Unexpected token (3:23) + 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + 2 | +> 3 | function test(param = throw new Error('required!')) { + | ^^^^^ + 4 | const test = param === true || throw new Error('Falsy!'); + 5 | } + 6 |" +`; + +exports[`throw-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + +function test(param = throw new Error('required!')) { + const test = param === true || throw new Error('Falsy!'); +} + +=====================================output===================================== +// https://babeljs.io/docs/babel-plugin-proposal-throw-expressions + +function test(param = throw new Error("required!")) { + const test = param === true || throw new Error("Falsy!"); +} + +================================================================================ +`; + +exports[`typescript.js [__babel_estree] format 1`] = ` +"Unexpected token (3:8) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 | +Cause: Unexpected token (3:7)" +`; + +exports[`typescript.js [acorn] format 1`] = ` +"Unexpected token (3:8) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 | +Cause: Unexpected token (3:7)" +`; + +exports[`typescript.js [babel] format 1`] = ` +"Unexpected token (3:8) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 | +Cause: Unexpected token (3:7)" +`; + +exports[`typescript.js [babel-flow] format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-preset-typescript + +const x: number = 0; + +=====================================output===================================== +// https://babeljs.io/docs/babel-preset-typescript + +const x: number = 0; + +================================================================================ +`; + +exports[`typescript.js [babel-ts] format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://babeljs.io/docs/babel-preset-typescript + +const x: number = 0; + +=====================================output===================================== +// https://babeljs.io/docs/babel-preset-typescript + +const x: number = 0; + +================================================================================ +`; + +exports[`typescript.js [espree] format 1`] = ` +"Unexpected token : (3:8) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 | +Cause: Unexpected token :" +`; + +exports[`typescript.js [meriyah] format 1`] = ` +"Missing initializer in const declaration (3:8) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 | +Cause: [3:7-3:8]: Missing initializer in const declaration" +`; + +exports[`typescript.js [oxc] format 1`] = ` +"Missing initializer in const declaration (3:7) + 1 | // https://babeljs.io/docs/babel-preset-typescript + 2 | +> 3 | const x: number = 0; + | ^ + 4 |" +`; + +exports[`v8intrinsic.js [acorn] format 1`] = ` +"Unexpected token (3:1) + 1 | // https://github.com/babel/babel/pull/10148 + 2 | +> 3 | %DebugPrint(foo); + | ^ + 4 | + 5 | + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: Unexpected token (3:0)" +`; + +exports[`v8intrinsic.js [espree] format 1`] = ` +"Unexpected token % (3:1) + 1 | // https://github.com/babel/babel/pull/10148 + 2 | +> 3 | %DebugPrint(foo); + | ^ + 4 | + 5 | + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: Unexpected token %" +`; + +exports[`v8intrinsic.js [meriyah] format 1`] = ` +"Unexpected token: '%' (3:1) + 1 | // https://github.com/babel/babel/pull/10148 + 2 | +> 3 | %DebugPrint(foo); + | ^ + 4 | + 5 | + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: [3:0-3:1]: Unexpected token: '%'" +`; + +exports[`v8intrinsic.js [oxc] format 1`] = ` +"Unexpected token (3:1) + 1 | // https://github.com/babel/babel/pull/10148 + 2 | +> 3 | %DebugPrint(foo); + | ^ + 4 | + 5 | + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" +`; + +exports[`v8intrinsic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-ts", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/10148 + +%DebugPrint(foo); + + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +// ::%DebugPrint(null) + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-member-expression/options.json +// a.%DebugPrint(); + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json +// const i = %DebugPrint; +// i(foo); + +// https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json +// %DebugPrint?.(null) + +new %DebugPrint(null); + +function *foo() { + yield %StringParseInt("42", 10) +} + +foo%bar() + +=====================================output===================================== +// https://github.com/babel/babel/pull/10148 + +%DebugPrint(foo); + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +// ::%DebugPrint(null) + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-member-expression/options.json +// a.%DebugPrint(); + +// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json +// const i = %DebugPrint; +// i(foo); + +// https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json +// %DebugPrint?.(null) + +new %DebugPrint(null); + +function* foo() { + yield %StringParseInt("42", 10); +} + +foo % bar(); + +================================================================================ +`; diff --git a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2e11f5dbfbb3..000000000000 --- a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,2439 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-do-expressions.js [acorn] format 1`] = ` -"Unexpected token (1:7) -> 1 | async do { await requestAPI().json() }; - | ^ - 2 |" -`; - -exports[`async-do-expressions.js [espree] format 1`] = ` -"Unexpected token do (1:7) -> 1 | async do { await requestAPI().json() }; - | ^ - 2 |" -`; - -exports[`async-do-expressions.js [meriyah] format 1`] = ` -"Unexpected token: 'do' (1:8) -> 1 | async do { await requestAPI().json() }; - | ^ - 2 |" -`; - -exports[`async-do-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -async do { await requestAPI().json() }; - -=====================================output===================================== -(async do { - await requestAPI().json(); -}); - -================================================================================ -`; - -exports[`async-generators.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions - -async function* agf() { - await 1; - yield 2; -} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions - -async function* agf() { - await 1; - yield 2; -} - -================================================================================ -`; - -exports[`bigint.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/tc39/proposal-bigint - -const previousMaxSafe = BigInt(Number.MAX_SAFE_INTEGER); -// ↪ 9007199254740991 - -const maxPlusOne = previousMaxSafe + 1n; -// ↪ 9007199254740992n - -const theFuture = previousMaxSafe + 2n; -// ↪ 9007199254740993n, this works now! - -const multi = previousMaxSafe * 2n; -// ↪ 18014398509481982n - -// \`–\` is not minus sign, -// SIC https://github.com/tc39/proposal-bigint#operators -// const subtr = multi – 10n; -// ↪ 18014398509481972n - -const mod = multi % 10n; -// ↪ 2n - -const bigN = 2n ** 54n; -// ↪ 18014398509481984n - -bigN * -1n -// ↪ –18014398509481984n - -0n === 0 -// ↪ false - -0n == 0 -// ↪ true - -1n < 2 -// ↪ true - -2n > 1 -// ↪ true - -2 > 2 -// ↪ false - -2n > 2 -// ↪ false - -2n >= 2 -// ↪ true - -const mixed = [4n, 6, -12n, 10, 4, 0, 0n]; -// ↪ [4n, 6, -12n, 10, 4, 0, 0n] - -mixed.sort(); -// ↪ [-12n, 0, 0n, 10, 4n, 4, 6] - -if (0n) { - console.log('Hello from the if!'); -} else { - console.log('Hello from the else!'); -} - -// ↪ "Hello from the else!" - -0n || 12n -// ↪ 12n - -0n && 12n -// ↪ 0n - -Boolean(0n) -// ↪ false - -Boolean(12n) -// ↪ true - -!12n -// ↪ false - -!0n -// ↪ true - -const view = new BigInt64Array(4); -// ↪ [0n, 0n, 0n, 0n] -view.length; -// ↪ 4 -view[0]; -// ↪ 0n -view[0] = 42n; -view[0]; -// ↪ 42n - -// Highest possible BigInt value that can be represented as a -// signed 64-bit integer. -const max = 2n ** (64n - 1n) - 1n; -view[0] = max; -view[0]; -// ↪ 9_223_372_036_854_775_807n -view[0] = max + 1n; -view[0]; -// ↪ -9_223_372_036_854_775_808n -// ^ negative because of overflow - -1n + 2 -// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions - -1n * 2 -// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions - -+1n -// ↪ TypeError: Cannot convert a BigInt value to a number - -Number(1n) -// ↪ 1 - -1n + '2' -// ↪ "12" - -'2' + 1n -// ↪ "21" - -const badPrecision = BigInt(9007199254740993); -// ↪9007199254740992n - -const goodPrecision = BigInt('9007199254740993'); -// ↪9007199254740993n - -const alsoGoodPrecision = 9007199254740993n; -// ↪9007199254740993n - -=====================================output===================================== -// https://github.com/tc39/proposal-bigint - -const previousMaxSafe = BigInt(Number.MAX_SAFE_INTEGER); -// ↪ 9007199254740991 - -const maxPlusOne = previousMaxSafe + 1n; -// ↪ 9007199254740992n - -const theFuture = previousMaxSafe + 2n; -// ↪ 9007199254740993n, this works now! - -const multi = previousMaxSafe * 2n; -// ↪ 18014398509481982n - -// \`–\` is not minus sign, -// SIC https://github.com/tc39/proposal-bigint#operators -// const subtr = multi – 10n; -// ↪ 18014398509481972n - -const mod = multi % 10n; -// ↪ 2n - -const bigN = 2n ** 54n; -// ↪ 18014398509481984n - -bigN * -1n; -// ↪ –18014398509481984n - -0n === 0; -// ↪ false - -0n == 0; -// ↪ true - -1n < 2; -// ↪ true - -2n > 1; -// ↪ true - -2 > 2; -// ↪ false - -2n > 2; -// ↪ false - -2n >= 2; -// ↪ true - -const mixed = [4n, 6, -12n, 10, 4, 0, 0n]; -// ↪ [4n, 6, -12n, 10, 4, 0, 0n] - -mixed.sort(); -// ↪ [-12n, 0, 0n, 10, 4n, 4, 6] - -if (0n) { - console.log("Hello from the if!"); -} else { - console.log("Hello from the else!"); -} - -// ↪ "Hello from the else!" - -0n || 12n; -// ↪ 12n - -0n && 12n; -// ↪ 0n - -Boolean(0n); -// ↪ false - -Boolean(12n); -// ↪ true - -!12n; -// ↪ false - -!0n; -// ↪ true - -const view = new BigInt64Array(4); -// ↪ [0n, 0n, 0n, 0n] -view.length; -// ↪ 4 -view[0]; -// ↪ 0n -view[0] = 42n; -view[0]; -// ↪ 42n - -// Highest possible BigInt value that can be represented as a -// signed 64-bit integer. -const max = 2n ** (64n - 1n) - 1n; -view[0] = max; -view[0]; -// ↪ 9_223_372_036_854_775_807n -view[0] = max + 1n; -view[0]; -// ↪ -9_223_372_036_854_775_808n -// ^ negative because of overflow - -1n + 2; -// ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions - -1n * 2 + - // ↪ TypeError: Cannot mix BigInt and other types, use explicit conversions - - 1n; -// ↪ TypeError: Cannot convert a BigInt value to a number - -Number(1n); -// ↪ 1 - -1n + "2"; -// ↪ "12" - -"2" + 1n; -// ↪ "21" - -const badPrecision = BigInt(9007199254740993); -// ↪9007199254740992n - -const goodPrecision = BigInt("9007199254740993"); -// ↪9007199254740993n - -const alsoGoodPrecision = 9007199254740993n; -// ↪9007199254740993n - -================================================================================ -`; - -exports[`class-properties.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-class-properties - -class Bork { - //Property initializer syntax - instanceProperty = "bork"; - boundFunction = () => { - return this.instanceProperty; - }; - - //Static class properties - static staticProperty = "babelIsCool"; - static staticFunction = function() { - return Bork.staticProperty; - }; - } - - let myBork = new Bork; - - //Property initializers are not on the prototype. - console.log(myBork.__proto__.boundFunction); // > undefined - - //Bound functions are bound to the class instance. - console.log(myBork.boundFunction.call(undefined)); // > "bork" - - //Static function exists on the class. - console.log(Bork.staticFunction()); // > "babelIsCool" - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-class-properties - -class Bork { - //Property initializer syntax - instanceProperty = "bork"; - boundFunction = () => { - return this.instanceProperty; - }; - - //Static class properties - static staticProperty = "babelIsCool"; - static staticFunction = function () { - return Bork.staticProperty; - }; -} - -let myBork = new Bork(); - -//Property initializers are not on the prototype. -console.log(myBork.__proto__.boundFunction); // > undefined - -//Bound functions are bound to the class instance. -console.log(myBork.boundFunction.call(undefined)); // > "bork" - -//Static function exists on the class. -console.log(Bork.staticFunction()); // > "babelIsCool" - -================================================================================ -`; - -exports[`class-static-block.js [meriyah] format 1`] = ` -"Unexpected token: '{' (4:10) - 2 | static #x = 42; - 3 | static y; -> 4 | static { - | ^ - 5 | try { - 6 | this.y = doSomethingWith(this.#x); - 7 | } catch {" -`; - -exports[`class-static-block.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - static #x = 42; - static y; - static { - try { - this.y = doSomethingWith(this.#x); - } catch { - this.y = "unknown"; - } - } -} - -=====================================output===================================== -class C { - static #x = 42; - static y; - static { - try { - this.y = doSomethingWith(this.#x); - } catch { - this.y = "unknown"; - } - } -} - -================================================================================ -`; - -exports[`decimal.js [acorn] format 1`] = ` -"Identifier directly after number (3:4) - 1 | // https://github.com/babel/babel/pull/11640 - 2 | -> 3 | 100m; - | ^ - 4 | 9223372036854775807m; - 5 | 0.m; - 6 | 3.1415926535897932m;" -`; - -exports[`decimal.js [espree] format 1`] = ` -"Identifier directly after number (3:4) - 1 | // https://github.com/babel/babel/pull/11640 - 2 | -> 3 | 100m; - | ^ - 4 | 9223372036854775807m; - 5 | 0.m; - 6 | 3.1415926535897932m;" -`; - -exports[`decimal.js [meriyah] format 1`] = ` -"No identifiers allowed directly after numeric literal (3:3) - 1 | // https://github.com/babel/babel/pull/11640 - 2 | -> 3 | 100m; - | ^ - 4 | 9223372036854775807m; - 5 | 0.m; - 6 | 3.1415926535897932m;" -`; - -exports[`decimal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11640 - -100m; -9223372036854775807m; -0.m; -3.1415926535897932m; -100.000m; -.1m; -({ 0m: 0, .1m() {}, get 0.2m(){}, set 3m(_){}, async 4m() {}, *.5m() {} }); -1.m; -100m; -9223372036854775807m; -100.m; - -// Invalid decimal -2e9m; -016432m; -089m; - -// https://github.com/tc39/proposal-decimal -.1m + .2m === .3m; -2.00m; --0m; -typeof 1m === "bigdecimal"; -typeof 1m === "decimal128"; - - -=====================================output===================================== -// https://github.com/babel/babel/pull/11640 - -100m; -9223372036854775807m; -0m; -3.1415926535897932m; -100.0m; -0.1m; -({ 0m: 0, 0.1m() {}, get 0.2m() {}, set 3m(_) {}, async 4m() {}, *0.5m() {} }); -1m; -100m; -9223372036854775807m; -100m; - -// Invalid decimal -2e9m; -016432m; -089m; - -// https://github.com/tc39/proposal-decimal -0.1m + 0.2m === 0.3m; -2.0m; --0m; -typeof 1m === "bigdecimal"; -typeof 1m === "decimal128"; - -================================================================================ -`; - -exports[`decorator-auto-accessors.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class C extends HTMLElement { -> 2 | accessor clicked = false; - | ^ - 3 | } - 4 |" -`; - -exports[`decorator-auto-accessors.js [espree] format 1`] = ` -"Unexpected token clicked (2:12) - 1 | class C extends HTMLElement { -> 2 | accessor clicked = false; - | ^ - 3 | } - 4 |" -`; - -exports[`decorator-auto-accessors.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C extends HTMLElement { - accessor clicked = false; -} - -=====================================output===================================== -class C extends HTMLElement { - accessor clicked = false; -} - -================================================================================ -`; - -exports[`decorators.js [acorn] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-decorators - 2 | -> 3 | @annotation - | ^ - 4 | class MyClass { } - 5 | - 6 | function annotation(target) {" -`; - -exports[`decorators.js [espree] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-decorators - 2 | -> 3 | @annotation - | ^ - 4 | class MyClass { } - 5 | - 6 | function annotation(target) {" -`; - -exports[`decorators.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-decorators - -@annotation -class MyClass { } - -function annotation(target) { - target.annotated = true; -} - -@isTestable(true) -class MyClass { } - -function isTestable(value) { - return function decorator(target) { - target.isTestable = value; - } -} - -class C { - @enumerable(false) - method() { } -} - -function enumerable(value) { - return function (target, key, descriptor) { - descriptor.enumerable = value; - return descriptor; - } -} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-decorators - -@annotation -class MyClass {} - -function annotation(target) { - target.annotated = true; -} - -@isTestable(true) -class MyClass {} - -function isTestable(value) { - return function decorator(target) { - target.isTestable = value; - }; -} - -class C { - @enumerable(false) - method() {} -} - -function enumerable(value) { - return function (target, key, descriptor) { - descriptor.enumerable = value; - return descriptor; - }; -} - -================================================================================ -`; - -exports[`destructuring-private.js [acorn] format 1`] = ` -"Unexpected token (5:13) - 3 | constructor() { - 4 | console.log(this.#x); // => 1 -> 5 | const { #x: x } = this; - | ^ - 6 | console.log(x); // => 1 - 7 | } - 8 | equals({ #x: otherX }) {" -`; - -exports[`destructuring-private.js [espree] format 1`] = ` -"Unexpected token #x (5:13) - 3 | constructor() { - 4 | console.log(this.#x); // => 1 -> 5 | const { #x: x } = this; - | ^ - 6 | console.log(x); // => 1 - 7 | } - 8 | equals({ #x: otherX }) {" -`; - -exports[`destructuring-private.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (5:13) - 3 | constructor() { - 4 | console.log(this.#x); // => 1 -> 5 | const { #x: x } = this; - | ^ - 6 | console.log(x); // => 1 - 7 | } - 8 | equals({ #x: otherX }) {" -`; - -exports[`destructuring-private.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - #x = 1; - constructor() { - console.log(this.#x); // => 1 - const { #x: x } = this; - console.log(x); // => 1 - } - equals({ #x: otherX }) { - const { #x: currentX } = this; - return currentX === otherX; - } -} - -=====================================output===================================== -class Foo { - #x = 1; - constructor() { - console.log(this.#x); // => 1 - const { #x: x } = this; - console.log(x); // => 1 - } - equals({ #x: otherX }) { - const { #x: currentX } = this; - return currentX === otherX; - } -} - -================================================================================ -`; - -exports[`do-expressions.js [acorn] format 1`] = ` -"Unexpected token (3:9) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions - 2 | -> 3 | let a = do { - | ^ - 4 | if(x > 10) { - 5 | 'big'; - 6 | } else {" -`; - -exports[`do-expressions.js [espree] format 1`] = ` -"Unexpected token do (3:9) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions - 2 | -> 3 | let a = do { - | ^ - 4 | if(x > 10) { - 5 | 'big'; - 6 | } else {" -`; - -exports[`do-expressions.js [meriyah] format 1`] = ` -"Unexpected token: 'do' (3:10) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions - 2 | -> 3 | let a = do { - | ^ - 4 | if(x > 10) { - 5 | 'big'; - 6 | } else {" -`; - -exports[`do-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions - -let a = do { - if(x > 10) { - 'big'; - } else { - 'small'; - } -}; -// is equivalent to: -let a = x > 10 ? 'big' : 'small'; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions - -let a = do { - if (x > 10) { - ("big"); - } else { - ("small"); - } -}; -// is equivalent to: -let a = x > 10 ? "big" : "small"; - -================================================================================ -`; - -exports[`dynamic-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import - -// There is no example code on babel website - -import('./prettier.mjs'); -import(prettier); -import('./prettier.mjs').then(module => console.log(module)); -import(prettier).then(module => console.log(module)); - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import - -// There is no example code on babel website - -import("./prettier.mjs"); -import(prettier); -import("./prettier.mjs").then((module) => console.log(module)); -import(prettier).then((module) => console.log(module)); - -================================================================================ -`; - -exports[`export-default-from.js [acorn] format 1`] = ` -"Unexpected token (4:8) - 2 | - 3 | -> 4 | export v from 'mod'; - | ^ - 5 |" -`; - -exports[`export-default-from.js [espree] format 1`] = ` -"Unexpected token v (4:8) - 2 | - 3 | -> 4 | export v from 'mod'; - | ^ - 5 |" -`; - -exports[`export-default-from.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (4:8) - 2 | - 3 | -> 4 | export v from 'mod'; - | ^ - 5 |" -`; - -exports[`export-default-from.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-export-default-from - - -export v from 'mod'; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-export-default-from - -export v from "mod"; - -================================================================================ -`; - -exports[`export-namespace-from.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-export-namespace-from - -export * as ns from 'mod'; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-export-namespace-from - -export * as ns from "mod"; - -================================================================================ -`; - -exports[`flow.js [acorn] format 1`] = ` -"Unexpected token (3:17) - 1 | // https://babeljs.io/docs/en/babel-preset-flow - 2 | -> 3 | function foo(one: any, two: number, three?): string {} - | ^ - 4 |" -`; - -exports[`flow.js [espree] format 1`] = ` -"Unexpected token : (3:17) - 1 | // https://babeljs.io/docs/en/babel-preset-flow - 2 | -> 3 | function foo(one: any, two: number, three?): string {} - | ^ - 4 |" -`; - -exports[`flow.js [meriyah] format 1`] = ` -"Expected ')' (3:17) - 1 | // https://babeljs.io/docs/en/babel-preset-flow - 2 | -> 3 | function foo(one: any, two: number, three?): string {} - | ^ - 4 |" -`; - -exports[`flow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-preset-flow - -function foo(one: any, two: number, three?): string {} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-preset-flow - -function foo(one: any, two: number, three?): string {} - -================================================================================ -`; - -exports[`function-bind.js [acorn] format 1`] = ` -"Unexpected token (3:5) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind - 2 | -> 3 | obj::func - | ^ - 4 | // is equivalent to: - 5 | func.bind(obj) - 6 |" -`; - -exports[`function-bind.js [espree] format 1`] = ` -"Unexpected token : (3:5) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind - 2 | -> 3 | obj::func - | ^ - 4 | // is equivalent to: - 5 | func.bind(obj) - 6 |" -`; - -exports[`function-bind.js [meriyah] format 1`] = ` -"Unexpected token: ':' (3:5) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind - 2 | -> 3 | obj::func - | ^ - 4 | // is equivalent to: - 5 | func.bind(obj) - 6 |" -`; - -exports[`function-bind.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-function-bind - -obj::func -// is equivalent to: -func.bind(obj) - -::obj.func -// is equivalent to: -obj.func.bind(obj) - -obj::func(val) -// is equivalent to: -func.call(obj, val) - -::obj.func(val) -// is equivalent to: -obj.func.call(obj, val) - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-function-bind - -obj::func; -// is equivalent to: -func.bind(obj)::obj.func; -// is equivalent to: -obj.func.bind(obj); - -obj::func(val); -// is equivalent to: -func - .call(obj, val) - - ::obj.func(val); -// is equivalent to: -obj.func.call(obj, val); - -================================================================================ -`; - -exports[`function-sent.js [acorn] format 1`] = ` -"Unexpected token (4:33) - 2 | - 3 | function* generator() { -> 4 | console.log("Sent", function.sent); - | ^ - 5 | console.log("Yield", yield); - 6 | } - 7 |" -`; - -exports[`function-sent.js [espree] format 1`] = ` -"Unexpected token . (4:33) - 2 | - 3 | function* generator() { -> 4 | console.log("Sent", function.sent); - | ^ - 5 | console.log("Yield", yield); - 6 | } - 7 |" -`; - -exports[`function-sent.js [meriyah] format 1`] = ` -"Expected '(' (4:33) - 2 | - 3 | function* generator() { -> 4 | console.log("Sent", function.sent); - | ^ - 5 | console.log("Yield", yield); - 6 | } - 7 |" -`; - -exports[`function-sent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-function-sent - -function* generator() { - console.log("Sent", function.sent); - console.log("Yield", yield); -} - -const iterator = generator(); -iterator.next(1); // Logs "Sent 1" -iterator.next(2); // Logs "Yield 2" - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-function-sent - -function* generator() { - console.log("Sent", function.sent); - console.log("Yield", yield); -} - -const iterator = generator(); -iterator.next(1); // Logs "Sent 1" -iterator.next(2); // Logs "Yield 2" - -================================================================================ -`; - -exports[`import-assertions-dynamic.js [acorn] format 1`] = ` -"Unexpected token (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`import-assertions-dynamic.js [espree] format 1`] = ` -"Unexpected token , (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`import-assertions-dynamic.js [meriyah] format 1`] = ` -"Expected ')' (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`import-assertions-dynamic.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -import("./foo.json", { assert: { type: "json" } }); - -=====================================output===================================== -import("./foo.json", { assert: { type: "json" } }); - -================================================================================ -`; - -exports[`import-assertions-static.js [acorn] format 1`] = ` -"Unexpected token (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`import-assertions-static.js [espree] format 1`] = ` -"Unexpected token assert (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`import-assertions-static.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:36) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`import-assertions-static.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -import json from "./foo.json" assert { type: "json" }; - -=====================================output===================================== -import json from "./foo.json" assert { type: "json" }; - -================================================================================ -`; - -exports[`import-meta.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-import-meta - -// Enabled by default https://github.com/babel/babel/pull/11406 - -// from https://github.com/tc39/proposal-import-meta - -(async () => { - const response = await fetch(new URL("../hamsters.jpg", import.meta.url)); - const blob = await response.blob(); - - const size = import.meta.scriptElement.dataset.size || 300; - - const image = new Image(); - image.src = URL.createObjectURL(blob); - image.width = image.height = size; - - document.body.appendChild(image); -})(); - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-import-meta - -// Enabled by default https://github.com/babel/babel/pull/11406 - -// from https://github.com/tc39/proposal-import-meta - -(async () => { - const response = await fetch(new URL("../hamsters.jpg", import.meta.url)); - const blob = await response.blob(); - - const size = import.meta.scriptElement.dataset.size || 300; - - const image = new Image(); - image.src = URL.createObjectURL(blob); - image.width = image.height = size; - - document.body.appendChild(image); -})(); - -================================================================================ -`; - -exports[`jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-jsx - -var profile = <div> - <img src="avatar.png" className="profile" /> - <h3>{[user.firstName, user.lastName].join(' ')}</h3> -</div>; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-syntax-jsx - -var profile = ( - <div> - <img src="avatar.png" className="profile" /> - <h3>{[user.firstName, user.lastName].join(" ")}</h3> - </div> -); - -================================================================================ -`; - -exports[`logical-assignment-operators.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators - -a ||= b; -obj.a.b ||= c; - -a &&= b; -obj.a.b &&= c; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators - -a ||= b; -obj.a.b ||= c; - -a &&= b; -obj.a.b &&= c; - -================================================================================ -`; - -exports[`module-blocks.js [acorn] format 1`] = ` -"Unexpected token (1:16) -> 1 | let m = module { - | ^ - 2 | export let m = 2; - 3 | export let n = 3; - 4 | };" -`; - -exports[`module-blocks.js [espree] format 1`] = ` -"Unexpected token { (1:16) -> 1 | let m = module { - | ^ - 2 | export let m = 2; - 3 | export let n = 3; - 4 | };" -`; - -exports[`module-blocks.js [meriyah] format 1`] = ` -"Unexpected token: '{' (1:16) -> 1 | let m = module { - | ^ - 2 | export let m = 2; - 3 | export let n = 3; - 4 | };" -`; - -exports[`module-blocks.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -let m = module { - export let m = 2; - export let n = 3; -}; - -=====================================output===================================== -let m = module { - export let m = 2; - export let n = 3; -}; - -================================================================================ -`; - -exports[`module-string-names.js [meriyah] format 1`] = ` -"Expected '}' (1:13) -> 1 | import { "😄" as smile } from "./emojis.js"; - | ^ - 2 | export { smile as "😄" } from "./emojis.js"; - 3 |" -`; - -exports[`module-string-names.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { "😄" as smile } from "./emojis.js"; -export { smile as "😄" } from "./emojis.js"; - -=====================================output===================================== -import { "😄" as smile } from "./emojis.js"; -export { smile as "😄" } from "./emojis.js"; - -================================================================================ -`; - -exports[`nullish-coalescing-operator.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator - -var foo = object.foo ?? "default"; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator - -var foo = object.foo ?? "default"; - -================================================================================ -`; - -exports[`numeric-separator.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator - -let budget = 1_000_000_000_000; - -// What is the value of \`budget\`? It's 1 trillion! -// -// Let's confirm: -console.log(budget === 10 ** 12); // true - -let nibbles = 0b1010_0001_1000_0101; - -// Is bit 7 on? It sure is! -// 0b1010_0001_1000_0101 -// ^ -// -// We can double check: -console.log(!!(nibbles & (1 << 7))); // true - -// Messages are sent as 24 bit values, but should be -// treated as 3 distinct bytes: -let message = 0xa0_b0_c0; - -// What's the value of the upper most byte? It's A0, or 160. -// We can confirm that: -let a = (message >> 16) & 0xff; -console.log(a.toString(16), a); // a0, 160 - -// What's the value of the middle byte? It's B0, or 176. -// Let's just make sure... -let b = (message >> 8) & 0xff; -console.log(b.toString(16), b); // b0, 176 - -// What's the value of the lower most byte? It's C0, or 192. -// Again, let's prove that: -let c = message & 0xff; -console.log(c.toString(16), b); // c0, 192 - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator - -let budget = 1_000_000_000_000; - -// What is the value of \`budget\`? It's 1 trillion! -// -// Let's confirm: -console.log(budget === 10 ** 12); // true - -let nibbles = 0b1010_0001_1000_0101; - -// Is bit 7 on? It sure is! -// 0b1010_0001_1000_0101 -// ^ -// -// We can double check: -console.log(!!(nibbles & (1 << 7))); // true - -// Messages are sent as 24 bit values, but should be -// treated as 3 distinct bytes: -let message = 0xa0_b0_c0; - -// What's the value of the upper most byte? It's A0, or 160. -// We can confirm that: -let a = (message >> 16) & 0xff; -console.log(a.toString(16), a); // a0, 160 - -// What's the value of the middle byte? It's B0, or 176. -// Let's just make sure... -let b = (message >> 8) & 0xff; -console.log(b.toString(16), b); // b0, 176 - -// What's the value of the lower most byte? It's C0, or 192. -// Again, let's prove that: -let c = message & 0xff; -console.log(c.toString(16), b); // c0, 192 - -================================================================================ -`; - -exports[`object-rest-spread.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-transform-object-rest-spread - -let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; -console.log(x); // 1 -console.log(y); // 2 -console.log(z); // { a: 3, b: 4 } - -let n = { x, y, ...z }; -console.log(n); // { x: 1, y: 2, a: 3, b: 4 } - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-transform-object-rest-spread - -let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; -console.log(x); // 1 -console.log(y); // 2 -console.log(z); // { a: 3, b: 4 } - -let n = { x, y, ...z }; -console.log(n); // { x: 1, y: 2, a: 3, b: 4 } - -================================================================================ -`; - -exports[`optional-catch-binding.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding - -try { - throw 0; -} catch { - doSomethingWhichDoesNotCareAboutTheValueThrown(); -} - -try { - throw 0; -} catch { - doSomethingWhichDoesNotCareAboutTheValueThrown(); -} finally { - doSomeCleanup(); -} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding - -try { - throw 0; -} catch { - doSomethingWhichDoesNotCareAboutTheValueThrown(); -} - -try { - throw 0; -} catch { - doSomethingWhichDoesNotCareAboutTheValueThrown(); -} finally { - doSomeCleanup(); -} - -================================================================================ -`; - -exports[`optional-chaining.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining - -const obj = { - foo: { - bar: { - baz: 42, - }, - }, -}; - -const baz = obj?.foo?.bar?.baz; // 42 - -const safe = obj?.qux?.baz; // undefined - -// Optional chaining and normal chaining can be intermixed -obj?.foo.bar?.baz; // Only access \`foo\` if \`obj\` exists, and \`baz\` if - // \`bar\` exists - -// Example usage with bracket notation: -obj?.['foo']?.bar?.baz // 42 - -const obj2 = { - foo: { - bar: { - baz() { - return 42; - }, - }, - }, -}; - -const baz2 = obj?.foo?.bar?.baz(); // 42 - -const safe3 = obj?.qux?.baz(); // undefined -const safe4 = obj?.foo.bar.qux?.(); // undefined - -const willThrow = obj?.foo.bar.qux(); // Error: not a function - -// Top function can be called directly, too. -function test() { - return 42; -} -test?.(); // 42 - -exists?.(); // undefined - -const obj3 = { - foo: { - bar: { - baz: class { - }, - }, - }, -}; - -const obj4 = { - foo: { - bar: {} - }, -}; - -const ret = delete obj?.foo?.bar?.baz; // true - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining - -const obj = { - foo: { - bar: { - baz: 42, - }, - }, -}; - -const baz = obj?.foo?.bar?.baz; // 42 - -const safe = obj?.qux?.baz; // undefined - -// Optional chaining and normal chaining can be intermixed -obj?.foo.bar?.baz; // Only access \`foo\` if \`obj\` exists, and \`baz\` if -// \`bar\` exists - -// Example usage with bracket notation: -obj?.["foo"]?.bar?.baz; // 42 - -const obj2 = { - foo: { - bar: { - baz() { - return 42; - }, - }, - }, -}; - -const baz2 = obj?.foo?.bar?.baz(); // 42 - -const safe3 = obj?.qux?.baz(); // undefined -const safe4 = obj?.foo.bar.qux?.(); // undefined - -const willThrow = obj?.foo.bar.qux(); // Error: not a function - -// Top function can be called directly, too. -function test() { - return 42; -} -test?.(); // 42 - -exists?.(); // undefined - -const obj3 = { - foo: { - bar: { - baz: class {}, - }, - }, -}; - -const obj4 = { - foo: { - bar: {}, - }, -}; - -const ret = delete obj?.foo?.bar?.baz; // true - -================================================================================ -`; - -exports[`partial-application.js [acorn] format 1`] = ` -"Unexpected token (5:23) - 3 | function add(x, y) { return x + y; } - 4 | -> 5 | const addOne = add(1, ?); // apply from the left - | ^ - 6 | addOne(2); // 3 - 7 | - 8 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`partial-application.js [espree] format 1`] = ` -"Unexpected token ? (5:23) - 3 | function add(x, y) { return x + y; } - 4 | -> 5 | const addOne = add(1, ?); // apply from the left - | ^ - 6 | addOne(2); // 3 - 7 | - 8 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`partial-application.js [meriyah] format 1`] = ` -"Unexpected token: '?' (5:23) - 3 | function add(x, y) { return x + y; } - 4 | -> 5 | const addOne = add(1, ?); // apply from the left - | ^ - 6 | addOne(2); // 3 - 7 | - 8 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`partial-application.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-partial-application - -function add(x, y) { return x + y; } - -const addOne = add(1, ?); // apply from the left -addOne(2); // 3 - -const addTen = add(?, 10); // apply from the right -addTen(2); // 12 - -let newScore = player.score - |> add(7, ?) - |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. - -f(x, ?) // partial application from left -f(?, x) // partial application from right -f(?, x, ?) // partial application for any arg -o.f(x, ?) // partial application from left -o.f(?, x) // partial application from right -o.f(?, x, ?) // partial application for any arg -super.f(?) // partial application allowed for call on |SuperProperty| - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-partial-application - -function add(x, y) { - return x + y; -} - -const addOne = add(1, ?); // apply from the left -addOne(2); // 3 - -const addTen = add(?, 10); // apply from the right -addTen(2); // 12 - -let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. - -f(x, ?); // partial application from left -f(?, x); // partial application from right -f(?, x, ?); // partial application for any arg -o.f(x, ?); // partial application from left -o.f(?, x); // partial application from right -o.f(?, x, ?); // partial application for any arg -super.f(?); // partial application allowed for call on |SuperProperty| - -================================================================================ -`; - -exports[`pipeline-operator-fsharp.js [acorn] format 1`] = ` -"Unexpected token (5:4) - 3 | - 4 | promise -> 5 | |> await - | ^ - 6 | |> x => doubleSay(x, ', ') - 7 | |> capitalize - 8 | |> x => x + '!'" -`; - -exports[`pipeline-operator-fsharp.js [espree] format 1`] = ` -"Unexpected token > (5:4) - 3 | - 4 | promise -> 5 | |> await - | ^ - 6 | |> x => doubleSay(x, ', ') - 7 | |> capitalize - 8 | |> x => x + '!'" -`; - -exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = ` -"Unexpected token: '>' (5:4) - 3 | - 4 | promise -> 5 | |> await - | ^ - 6 | |> x => doubleSay(x, ', ') - 7 | |> capitalize - 8 | |> x => x + '!'" -`; - -exports[`pipeline-operator-fsharp.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/valtech-nyc/proposal-fsharp-pipelines - -promise - |> await - |> x => doubleSay(x, ', ') - |> capitalize - |> x => x + '!' - |> x => new User.Message(x) - |> x => stream.write(x) - |> await - |> console.log; - -const result = exclaim(capitalize(doubleSay("hello"))); -result //=> "Hello, hello!" - -const result = "hello" - |> doubleSay - |> capitalize - |> exclaim; - -result //=> "Hello, hello!" - -const person = { score: 25 }; - -const newScore = person.score - |> double - |> n => add(7, n) - |> n => boundScore(0, 100, n); - -newScore //=> 57 - -// As opposed to: -let newScore = boundScore(0, 100, add(7, double(person.score))); - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/valtech-nyc/proposal-fsharp-pipelines - -promise - |> await - |> (x) => doubleSay(x, ", ") - |> capitalize - |> (x) => x + "!" - |> (x) => new User.Message(x) - |> (x) => stream.write(x) - |> await - |> console.log; - -const result = exclaim(capitalize(doubleSay("hello"))); -result; //=> "Hello, hello!" - -const result = "hello" |> doubleSay |> capitalize |> exclaim; - -result; //=> "Hello, hello!" - -const person = { score: 25 }; - -const newScore = - person.score |> double |> (n) => add(7, n) |> (n) => boundScore(0, 100, n); - -newScore; //=> 57 - -// As opposed to: -let newScore = boundScore(0, 100, add(7, double(person.score))); - -================================================================================ -`; - -exports[`pipeline-operator-hack.js [acorn] format 1`] = ` -"Unexpected token (5:3) - 3 | - 4 | return list -> 5 | |> take(prefix.length, %) - | ^ - 6 | |> equals(%, prefix); - 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" -`; - -exports[`pipeline-operator-hack.js [espree] format 1`] = ` -"Unexpected token > (5:3) - 3 | - 4 | return list -> 5 | |> take(prefix.length, %) - | ^ - 6 | |> equals(%, prefix); - 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" -`; - -exports[`pipeline-operator-hack.js [meriyah] format 1`] = ` -"Unexpected token: '>' (5:3) - 3 | - 4 | return list -> 5 | |> take(prefix.length, %) - | ^ - 6 | |> equals(%, prefix); - 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" -`; - -exports[`pipeline-operator-hack.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/js-choi/proposal-hack-pipes - -return list - |> take(prefix.length, %) - |> equals(%, prefix); - -// (The % token isn't final; it might instead be @ or ? or #.) - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/js-choi/proposal-hack-pipes - -return list |> take(prefix.length, %) |> equals(%, prefix); - -// (The % token isn't final; it might instead be @ or ? or #.) - -================================================================================ -`; - -exports[`pipeline-operator-minimal.js [acorn] format 1`] = ` -"Identifier 'result' has already been declared (7:5) - 5 | result //=> "Hello, hello!" - 6 | -> 7 | let result = "hello" - | ^ - 8 | |> doubleSay - 9 | |> capitalize - 10 | |> exclaim;" -`; - -exports[`pipeline-operator-minimal.js [espree] format 1`] = ` -"Identifier 'result' has already been declared (7:5) - 5 | result //=> "Hello, hello!" - 6 | -> 7 | let result = "hello" - | ^ - 8 | |> doubleSay - 9 | |> capitalize - 10 | |> exclaim;" -`; - -exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` -"Unexpected token: '>' (8:4) - 6 | - 7 | let result = "hello" -> 8 | |> doubleSay - | ^ - 9 | |> capitalize - 10 | |> exclaim; - 11 |" -`; - -exports[`pipeline-operator-minimal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/tc39/proposal-pipeline-operator/ - -let result = exclaim(capitalize(doubleSay("hello"))); -result //=> "Hello, hello!" - -let result = "hello" - |> doubleSay - |> capitalize - |> exclaim; - -result //=> "Hello, hello!" - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator -// https://github.com/tc39/proposal-pipeline-operator/ - -let result = exclaim(capitalize(doubleSay("hello"))); -result; //=> "Hello, hello!" - -let result = "hello" |> doubleSay |> capitalize |> exclaim; - -result; //=> "Hello, hello!" - -================================================================================ -`; - -exports[`private-fields-in-in.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/tc39/proposal-private-fields-in-in - -class C { - #brand; - - static isC(obj) { - try { - obj.#brand; - return true; - } catch { - return false; - } - } -} - -class C2 { - #data = null; // populated later - - get #getter() { - if (!this.#data) { - throw new Error('no data yet!'); - } - return this.#data; - } - - static isC(obj) { - try { - obj.#getter; - return true; - } catch { - return false; // oops! might have gotten here because \`#getter\` threw :-( - } - } -} - -class C3 { - #brand; - - #method() {} - - get #getter() {} - - static isC(obj) { - return #brand in obj && #method in obj && #getter in obj; - } -} - -// Invalid https://github.com/tc39/proposal-private-fields-in-in#try-statement -// class C { -// #brand; - -// static isC(obj) { -// return try obj.#brand; -// } -// } - -=====================================output===================================== -// https://github.com/tc39/proposal-private-fields-in-in - -class C { - #brand; - - static isC(obj) { - try { - obj.#brand; - return true; - } catch { - return false; - } - } -} - -class C2 { - #data = null; // populated later - - get #getter() { - if (!this.#data) { - throw new Error("no data yet!"); - } - return this.#data; - } - - static isC(obj) { - try { - obj.#getter; - return true; - } catch { - return false; // oops! might have gotten here because \`#getter\` threw :-( - } - } -} - -class C3 { - #brand; - - #method() {} - - get #getter() {} - - static isC(obj) { - return #brand in obj && #method in obj && #getter in obj; - } -} - -// Invalid https://github.com/tc39/proposal-private-fields-in-in#try-statement -// class C { -// #brand; - -// static isC(obj) { -// return try obj.#brand; -// } -// } - -================================================================================ -`; - -exports[`private-methods.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-private-methods - -// Test for \`classPrivateProperties\` and \`classPrivateMethods\` - -class Counter extends HTMLElement { - #xValue = 0; - #render() {} - - get #x() { return this.#xValue; } - set #x(value) { - this.#xValue = value; - window.requestAnimationFrame( - this.#render.bind(this)); - } - - #clicked() { - this.#x++; - } -} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-private-methods - -// Test for \`classPrivateProperties\` and \`classPrivateMethods\` - -class Counter extends HTMLElement { - #xValue = 0; - #render() {} - - get #x() { - return this.#xValue; - } - set #x(value) { - this.#xValue = value; - window.requestAnimationFrame(this.#render.bind(this)); - } - - #clicked() { - this.#x++; - } -} - -================================================================================ -`; - -exports[`record-tuple-record.js [acorn] format 1`] = ` -"Unexpected character '{' (1:18) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record-tuple-record.js [espree] format 1`] = ` -"Unexpected character '{' (1:18) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record-tuple-record.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:17) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record-tuple-record.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{...record1, b: 5}; - -=====================================output===================================== -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{ ...record1, b: 5 }; - -================================================================================ -`; - -exports[`record-tuple-tuple.js [acorn] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 |" -`; - -exports[`record-tuple-tuple.js [espree] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 |" -`; - -exports[`record-tuple-tuple.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:16) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 |" -`; - -exports[`record-tuple-tuple.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const tuple1 = #[1, 2, 3]; - -=====================================output===================================== -const tuple1 = #[1, 2, 3]; - -================================================================================ -`; - -exports[`regex-v-flag.js [acorn] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`regex-v-flag.js [espree] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`regex-v-flag.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:3) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`regex-v-flag.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -/a/v; - -=====================================output===================================== -/a/v; - -================================================================================ -`; - -exports[`throw-expressions.js [acorn] format 1`] = ` -"Unexpected token (3:23) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions - 2 | -> 3 | function test(param = throw new Error('required!')) { - | ^ - 4 | const test = param === true || throw new Error('Falsy!'); - 5 | } - 6 |" -`; - -exports[`throw-expressions.js [espree] format 1`] = ` -"Unexpected token throw (3:23) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions - 2 | -> 3 | function test(param = throw new Error('required!')) { - | ^ - 4 | const test = param === true || throw new Error('Falsy!'); - 5 | } - 6 |" -`; - -exports[`throw-expressions.js [meriyah] format 1`] = ` -"Unexpected token: 'throw' (3:27) - 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions - 2 | -> 3 | function test(param = throw new Error('required!')) { - | ^ - 4 | const test = param === true || throw new Error('Falsy!'); - 5 | } - 6 |" -`; - -exports[`throw-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions - -function test(param = throw new Error('required!')) { - const test = param === true || throw new Error('Falsy!'); -} - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions - -function test(param = throw new Error("required!")) { - const test = param === true || throw new Error("Falsy!"); -} - -================================================================================ -`; - -exports[`typescript.js [acorn] format 1`] = ` -"Unexpected token (3:8) - 1 | // https://babeljs.io/docs/en/babel-preset-typescript - 2 | -> 3 | const x: number = 0; - | ^ - 4 |" -`; - -exports[`typescript.js [espree] format 1`] = ` -"Unexpected token : (3:8) - 1 | // https://babeljs.io/docs/en/babel-preset-typescript - 2 | -> 3 | const x: number = 0; - | ^ - 4 |" -`; - -exports[`typescript.js [meriyah] format 1`] = ` -"Missing initializer in const declaration (3:8) - 1 | // https://babeljs.io/docs/en/babel-preset-typescript - 2 | -> 3 | const x: number = 0; - | ^ - 4 |" -`; - -exports[`typescript.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://babeljs.io/docs/en/babel-preset-typescript - -const x: number = 0; - -=====================================output===================================== -// https://babeljs.io/docs/en/babel-preset-typescript - -const x: number = 0; - -================================================================================ -`; - -exports[`v8intrinsic.js [acorn] format 1`] = ` -"Unexpected token (3:1) - 1 | // https://github.com/babel/babel/pull/10148 - 2 | -> 3 | %DebugPrint(foo); - | ^ - 4 | - 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" -`; - -exports[`v8intrinsic.js [espree] format 1`] = ` -"Unexpected token % (3:1) - 1 | // https://github.com/babel/babel/pull/10148 - 2 | -> 3 | %DebugPrint(foo); - | ^ - 4 | - 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" -`; - -exports[`v8intrinsic.js [meriyah] format 1`] = ` -"Unexpected token: '%' (3:1) - 1 | // https://github.com/babel/babel/pull/10148 - 2 | -> 3 | %DebugPrint(foo); - | ^ - 4 | - 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" -`; - -exports[`v8intrinsic.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-ts", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/10148 - -%DebugPrint(foo); - - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json -// ::%DebugPrint(null) - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-member-expression/options.json -// a.%DebugPrint(); - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json -// const i = %DebugPrint; -// i(foo); - -// https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json -// %DebugPrint?.(null) - -new %DebugPrint(null); - -function *foo() { - yield %StringParseInt("42", 10) -} - -foo%bar() - -=====================================output===================================== -// https://github.com/babel/babel/pull/10148 - -%DebugPrint(foo); - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json -// ::%DebugPrint(null) - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-member-expression/options.json -// a.%DebugPrint(); - -// Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json -// const i = %DebugPrint; -// i(foo); - -// https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/not-in-call-expression/options.json -// %DebugPrint?.(null) - -new %DebugPrint(null); - -function* foo() { - yield %StringParseInt("42", 10); -} - -foo % bar(); - -================================================================================ -`; diff --git a/tests/format/js/babel-plugins/async-generators.js b/tests/format/js/babel-plugins/async-generators.js index d3fc2cdac2ba..841bf6f7fcfd 100644 --- a/tests/format/js/babel-plugins/async-generators.js +++ b/tests/format/js/babel-plugins/async-generators.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions +// https://babeljs.io/docs/babel-plugin-proposal-async-generator-functions async function* agf() { await 1; diff --git a/tests/format/js/babel-plugins/class-properties.js b/tests/format/js/babel-plugins/class-properties.js index 916c975a603f..c8b1c083b669 100644 --- a/tests/format/js/babel-plugins/class-properties.js +++ b/tests/format/js/babel-plugins/class-properties.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-class-properties +// https://babeljs.io/docs/babel-plugin-proposal-class-properties class Bork { //Property initializer syntax diff --git a/tests/format/js/babel-plugins/decimal.js b/tests/format/js/babel-plugins/decimal.js deleted file mode 100644 index 1d2b96ca8639..000000000000 --- a/tests/format/js/babel-plugins/decimal.js +++ /dev/null @@ -1,26 +0,0 @@ -// https://github.com/babel/babel/pull/11640 - -100m; -9223372036854775807m; -0.m; -3.1415926535897932m; -100.000m; -.1m; -({ 0m: 0, .1m() {}, get 0.2m(){}, set 3m(_){}, async 4m() {}, *.5m() {} }); -1.m; -100m; -9223372036854775807m; -100.m; - -// Invalid decimal -2e9m; -016432m; -089m; - -// https://github.com/tc39/proposal-decimal -.1m + .2m === .3m; -2.00m; --0m; -typeof 1m === "bigdecimal"; -typeof 1m === "decimal128"; - diff --git a/tests/format/js/babel-plugins/decorators.js b/tests/format/js/babel-plugins/decorators.js index 03744072ca93..470f2834073d 100644 --- a/tests/format/js/babel-plugins/decorators.js +++ b/tests/format/js/babel-plugins/decorators.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-decorators +// https://babeljs.io/docs/babel-plugin-proposal-decorators @annotation class MyClass { } diff --git a/tests/format/js/babel-plugins/deferred-import-evaluation.js b/tests/format/js/babel-plugins/deferred-import-evaluation.js new file mode 100644 index 000000000000..806ae2bb7690 --- /dev/null +++ b/tests/format/js/babel-plugins/deferred-import-evaluation.js @@ -0,0 +1 @@ +import defer * as ns from "x"; diff --git a/tests/format/js/babel-plugins/do-expressions.js b/tests/format/js/babel-plugins/do-expressions.js index 5a139893dc35..13f276b14847 100644 --- a/tests/format/js/babel-plugins/do-expressions.js +++ b/tests/format/js/babel-plugins/do-expressions.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions +// https://babeljs.io/docs/babel-plugin-proposal-do-expressions let a = do { if(x > 10) { diff --git a/tests/format/js/babel-plugins/dynamic-import.js b/tests/format/js/babel-plugins/dynamic-import.js index bd361096dcd1..8c891a02ae84 100644 --- a/tests/format/js/babel-plugins/dynamic-import.js +++ b/tests/format/js/babel-plugins/dynamic-import.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import +// https://babeljs.io/docs/babel-plugin-syntax-dynamic-import // There is no example code on babel website diff --git a/tests/format/js/babel-plugins/explicit-resource-management.js b/tests/format/js/babel-plugins/explicit-resource-management.js new file mode 100644 index 000000000000..1912ca649337 --- /dev/null +++ b/tests/format/js/babel-plugins/explicit-resource-management.js @@ -0,0 +1,12 @@ +function * g() { + using handle = acquireFileHandle(); // block-scoped critical resource +} // cleanup + +{ + using obj = g(); // block-scoped declaration + const r = obj.next(); +} // calls finally blocks in `g` + +{ + await using obj = g(); +} diff --git a/tests/format/js/babel-plugins/export-default-from.js b/tests/format/js/babel-plugins/export-default-from.js index 67a17a8e4393..ce824ceed3a8 100644 --- a/tests/format/js/babel-plugins/export-default-from.js +++ b/tests/format/js/babel-plugins/export-default-from.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-export-default-from +// https://babeljs.io/docs/babel-plugin-proposal-export-default-from export v from 'mod'; diff --git a/tests/format/js/babel-plugins/export-namespace-from.js b/tests/format/js/babel-plugins/export-namespace-from.js index 9c06dcd5b2db..6525bdc75b93 100644 --- a/tests/format/js/babel-plugins/export-namespace-from.js +++ b/tests/format/js/babel-plugins/export-namespace-from.js @@ -1,3 +1,3 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-export-namespace-from +// https://babeljs.io/docs/babel-plugin-proposal-export-namespace-from export * as ns from 'mod'; diff --git a/tests/format/js/babel-plugins/flow.js b/tests/format/js/babel-plugins/flow.js index 44c0e33053d3..ae8f62f3d810 100644 --- a/tests/format/js/babel-plugins/flow.js +++ b/tests/format/js/babel-plugins/flow.js @@ -1,3 +1,3 @@ -// https://babeljs.io/docs/en/babel-preset-flow +// https://babeljs.io/docs/babel-preset-flow function foo(one: any, two: number, three?): string {} diff --git a/tests/format/js/babel-plugins/format.test.js b/tests/format/js/babel-plugins/format.test.js new file mode 100644 index 000000000000..ba925a06d94d --- /dev/null +++ b/tests/format/js/babel-plugins/format.test.js @@ -0,0 +1,116 @@ +// Only testing babel parsing +// Do not add extra parsers here + +runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], { + errors: { + acorn: [ + "decorators.js", + "destructuring-private.js", + "do-expressions.js", + "export-default-from.js", + "flow.js", + "function-bind.js", + "function-sent.js", + "import-assertions-static.js", + "partial-application.js", + "pipeline-operator-fsharp.js", + "pipeline-operator-minimal.js", + "pipeline-operator-hack.js", + "throw-expressions.js", + "typescript.js", + "v8intrinsic.js", + "module-blocks.js", + "async-do-expressions.js", + "decorator-auto-accessors.js", + "source-phase-imports.js", + "deferred-import-evaluation.js", + "optional-chaining-assignment.js", + ], + espree: [ + "decorators.js", + "destructuring-private.js", + "do-expressions.js", + "export-default-from.js", + "flow.js", + "function-bind.js", + "function-sent.js", + "import-assertions-static.js", + "partial-application.js", + "pipeline-operator-fsharp.js", + "pipeline-operator-minimal.js", + "pipeline-operator-hack.js", + "throw-expressions.js", + "typescript.js", + "v8intrinsic.js", + "module-blocks.js", + "async-do-expressions.js", + "decorator-auto-accessors.js", + "source-phase-imports.js", + "deferred-import-evaluation.js", + "optional-chaining-assignment.js", + ], + meriyah: [ + "do-expressions.js", + "destructuring-private.js", + "export-default-from.js", + "flow.js", + "function-bind.js", + "function-sent.js", + "module-attributes-dynamic.js", + "module-attributes-static.js", + "partial-application.js", + "pipeline-operator-fsharp.js", + "pipeline-operator-minimal.js", + "pipeline-operator-hack.js", + "throw-expressions.js", + "typescript.js", + "v8intrinsic.js", + "import-assertions-static.js", + "module-blocks.js", + "async-do-expressions.js", + "explicit-resource-management.js", + "regexp-modifiers.js", + "source-phase-imports.js", + "deferred-import-evaluation.js", + "optional-chaining-assignment.js", + ], + oxc: [ + "async-do-expressions.js", + "destructuring-private.js", + "do-expressions.js", + "export-default-from.js", + "flow.js", + "function-bind.js", + "function-sent.js", + "module-blocks.js", + "optional-chaining-assignment.js", + "partial-application.js", + "pipeline-operator-fsharp.js", + "pipeline-operator-hack.js", + "pipeline-operator-minimal.js", + "throw-expressions.js", + "typescript.js", + "v8intrinsic.js", + ], + "oxc-ts": [ + "async-do-expressions.js", + "destructuring-private.js", + "do-expressions.js", + "export-default-from.js", + "flow.js", + "function-bind.js", + "function-sent.js", + "module-blocks.js", + "optional-chaining-assignment.js", + "partial-application.js", + "pipeline-operator-fsharp.js", + "pipeline-operator-hack.js", + "pipeline-operator-minimal.js", + "throw-expressions.js", + "typescript.js", + "v8intrinsic.js", + ], + babel: ["flow.js", "typescript.js"], + __babel_estree: ["flow.js", "typescript.js"], + }, +}); diff --git a/tests/format/js/babel-plugins/function-bind.js b/tests/format/js/babel-plugins/function-bind.js index 41075578e20c..144e94edb3a7 100644 --- a/tests/format/js/babel-plugins/function-bind.js +++ b/tests/format/js/babel-plugins/function-bind.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-function-bind +// https://babeljs.io/docs/babel-plugin-proposal-function-bind obj::func // is equivalent to: diff --git a/tests/format/js/babel-plugins/function-sent.js b/tests/format/js/babel-plugins/function-sent.js index f7fc8e3d04f9..e2601b0e5373 100644 --- a/tests/format/js/babel-plugins/function-sent.js +++ b/tests/format/js/babel-plugins/function-sent.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-function-sent +// https://babeljs.io/docs/babel-plugin-proposal-function-sent function* generator() { console.log("Sent", function.sent); diff --git a/tests/format/js/babel-plugins/import-attributes-dynamic.js b/tests/format/js/babel-plugins/import-attributes-dynamic.js new file mode 100644 index 000000000000..717b72d4a84f --- /dev/null +++ b/tests/format/js/babel-plugins/import-attributes-dynamic.js @@ -0,0 +1 @@ +import("./foo.json", { with: { type: "json" } }); diff --git a/tests/format/js/babel-plugins/import-attributes-static.js b/tests/format/js/babel-plugins/import-attributes-static.js new file mode 100644 index 000000000000..7770ae1f06b0 --- /dev/null +++ b/tests/format/js/babel-plugins/import-attributes-static.js @@ -0,0 +1 @@ +import json from "./foo.json" with { type: "json" }; diff --git a/tests/format/js/babel-plugins/import-meta.js b/tests/format/js/babel-plugins/import-meta.js index 3ef8f5a96466..0bc02cea0d63 100644 --- a/tests/format/js/babel-plugins/import-meta.js +++ b/tests/format/js/babel-plugins/import-meta.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-syntax-import-meta +// https://babeljs.io/docs/babel-plugin-syntax-import-meta // Enabled by default https://github.com/babel/babel/pull/11406 diff --git a/tests/format/js/babel-plugins/jsfmt.spec.js b/tests/format/js/babel-plugins/jsfmt.spec.js deleted file mode 100644 index 1e6b705ec207..000000000000 --- a/tests/format/js/babel-plugins/jsfmt.spec.js +++ /dev/null @@ -1,84 +0,0 @@ -// Only testing babel parsing -// Do not add extra parsers here - -run_spec(__dirname, ["babel", "babel-ts", "babel-flow"], { - errors: { - acorn: [ - "decimal.js", - "decorators.js", - "destructuring-private.js", - "do-expressions.js", - "export-default-from.js", - "flow.js", - "function-bind.js", - "function-sent.js", - "import-assertions-dynamic.js", - "import-assertions-static.js", - "partial-application.js", - "pipeline-operator-fsharp.js", - "pipeline-operator-minimal.js", - "pipeline-operator-hack.js", - "record-tuple-record.js", - "record-tuple-tuple.js", - "throw-expressions.js", - "typescript.js", - "v8intrinsic.js", - "module-blocks.js", - "async-do-expressions.js", - "regex-v-flag.js", - "decorator-auto-accessors.js", - ], - espree: [ - "decimal.js", - "decorators.js", - "destructuring-private.js", - "do-expressions.js", - "export-default-from.js", - "flow.js", - "function-bind.js", - "function-sent.js", - "import-assertions-dynamic.js", - "import-assertions-static.js", - "partial-application.js", - "pipeline-operator-fsharp.js", - "pipeline-operator-minimal.js", - "pipeline-operator-hack.js", - "record-tuple-record.js", - "record-tuple-tuple.js", - "throw-expressions.js", - "typescript.js", - "v8intrinsic.js", - "module-blocks.js", - "async-do-expressions.js", - "regex-v-flag.js", - "decorator-auto-accessors.js", - ], - meriyah: [ - "decimal.js", - "do-expressions.js", - "destructuring-private.js", - "export-default-from.js", - "flow.js", - "function-bind.js", - "function-sent.js", - "module-attributes-dynamic.js", - "module-attributes-static.js", - "partial-application.js", - "pipeline-operator-fsharp.js", - "pipeline-operator-minimal.js", - "pipeline-operator-hack.js", - "record-tuple-record.js", - "record-tuple-tuple.js", - "throw-expressions.js", - "typescript.js", - "v8intrinsic.js", - "class-static-block.js", - "import-assertions-dynamic.js", - "import-assertions-static.js", - "module-string-names.js", - "module-blocks.js", - "async-do-expressions.js", - "regex-v-flag.js", - ], - }, -}); diff --git a/tests/format/js/babel-plugins/jsx.js b/tests/format/js/babel-plugins/jsx.js index f5a6d9ef0f02..d2ff9e3369ce 100644 --- a/tests/format/js/babel-plugins/jsx.js +++ b/tests/format/js/babel-plugins/jsx.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-syntax-jsx +// https://babeljs.io/docs/babel-plugin-syntax-jsx var profile = <div> <img src="avatar.png" className="profile" /> diff --git a/tests/format/js/babel-plugins/logical-assignment-operators.js b/tests/format/js/babel-plugins/logical-assignment-operators.js index 43e332171e39..fba4a46c09c6 100644 --- a/tests/format/js/babel-plugins/logical-assignment-operators.js +++ b/tests/format/js/babel-plugins/logical-assignment-operators.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators +// https://babeljs.io/docs/babel-plugin-proposal-logical-assignment-operators a ||= b; obj.a.b ||= c; diff --git a/tests/format/js/babel-plugins/nullish-coalescing-operator.js b/tests/format/js/babel-plugins/nullish-coalescing-operator.js index b786659b2190..2ad3de0ca20e 100644 --- a/tests/format/js/babel-plugins/nullish-coalescing-operator.js +++ b/tests/format/js/babel-plugins/nullish-coalescing-operator.js @@ -1,3 +1,3 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator +// https://babeljs.io/docs/babel-plugin-proposal-nullish-coalescing-operator var foo = object.foo ?? "default"; diff --git a/tests/format/js/babel-plugins/numeric-separator.js b/tests/format/js/babel-plugins/numeric-separator.js index 3ea80118c7af..23066a9dcad7 100644 --- a/tests/format/js/babel-plugins/numeric-separator.js +++ b/tests/format/js/babel-plugins/numeric-separator.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator +// https://babeljs.io/docs/babel-plugin-proposal-numeric-separator let budget = 1_000_000_000_000; diff --git a/tests/format/js/babel-plugins/object-rest-spread.js b/tests/format/js/babel-plugins/object-rest-spread.js index 6e9ffbff024a..df90dd66915d 100644 --- a/tests/format/js/babel-plugins/object-rest-spread.js +++ b/tests/format/js/babel-plugins/object-rest-spread.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-transform-object-rest-spread +// https://babeljs.io/docs/babel-plugin-transform-object-rest-spread let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; console.log(x); // 1 diff --git a/tests/format/js/babel-plugins/optional-catch-binding.js b/tests/format/js/babel-plugins/optional-catch-binding.js index 1327104c7ddf..969b3ebebbcc 100644 --- a/tests/format/js/babel-plugins/optional-catch-binding.js +++ b/tests/format/js/babel-plugins/optional-catch-binding.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding +// https://babeljs.io/docs/babel-plugin-proposal-optional-catch-binding try { throw 0; diff --git a/tests/format/js/babel-plugins/optional-chaining-assignment.js b/tests/format/js/babel-plugins/optional-chaining-assignment.js new file mode 100644 index 000000000000..d15b0a21305a --- /dev/null +++ b/tests/format/js/babel-plugins/optional-chaining-assignment.js @@ -0,0 +1 @@ +maybeAnObj?.prop = theValue; diff --git a/tests/format/js/babel-plugins/optional-chaining.js b/tests/format/js/babel-plugins/optional-chaining.js index d0d5842054ea..10522a9f2148 100644 --- a/tests/format/js/babel-plugins/optional-chaining.js +++ b/tests/format/js/babel-plugins/optional-chaining.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining +// https://babeljs.io/docs/babel-plugin-proposal-optional-chaining const obj = { foo: { diff --git a/tests/format/js/babel-plugins/partial-application.js b/tests/format/js/babel-plugins/partial-application.js index 6aaee6003315..a7b6f59b2dfc 100644 --- a/tests/format/js/babel-plugins/partial-application.js +++ b/tests/format/js/babel-plugins/partial-application.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-partial-application +// https://babeljs.io/docs/babel-plugin-proposal-partial-application function add(x, y) { return x + y; } diff --git a/tests/format/js/babel-plugins/pipeline-operator-fsharp.js b/tests/format/js/babel-plugins/pipeline-operator-fsharp.js index 66a7983722bb..feaad1f7b71d 100644 --- a/tests/format/js/babel-plugins/pipeline-operator-fsharp.js +++ b/tests/format/js/babel-plugins/pipeline-operator-fsharp.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator // https://github.com/valtech-nyc/proposal-fsharp-pipelines promise diff --git a/tests/format/js/babel-plugins/pipeline-operator-hack.js b/tests/format/js/babel-plugins/pipeline-operator-hack.js index 553e20358126..1d8c19a51681 100644 --- a/tests/format/js/babel-plugins/pipeline-operator-hack.js +++ b/tests/format/js/babel-plugins/pipeline-operator-hack.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator // https://github.com/js-choi/proposal-hack-pipes return list diff --git a/tests/format/js/babel-plugins/pipeline-operator-minimal.js b/tests/format/js/babel-plugins/pipeline-operator-minimal.js index e15c9d95ca70..a57a2bffb133 100644 --- a/tests/format/js/babel-plugins/pipeline-operator-minimal.js +++ b/tests/format/js/babel-plugins/pipeline-operator-minimal.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator +// https://babeljs.io/docs/babel-plugin-proposal-pipeline-operator // https://github.com/tc39/proposal-pipeline-operator/ let result = exclaim(capitalize(doubleSay("hello"))); diff --git a/tests/format/js/babel-plugins/private-methods.js b/tests/format/js/babel-plugins/private-methods.js index 0a9fc7c9f681..fed3387598eb 100644 --- a/tests/format/js/babel-plugins/private-methods.js +++ b/tests/format/js/babel-plugins/private-methods.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-private-methods +// https://babeljs.io/docs/babel-plugin-proposal-private-methods // Test for `classPrivateProperties` and `classPrivateMethods` diff --git a/tests/format/js/babel-plugins/record-tuple-record.js b/tests/format/js/babel-plugins/record-tuple-record.js deleted file mode 100644 index 097878f370d5..000000000000 --- a/tests/format/js/babel-plugins/record-tuple-record.js +++ /dev/null @@ -1,7 +0,0 @@ -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{...record1, b: 5}; diff --git a/tests/format/js/babel-plugins/record-tuple-tuple.js b/tests/format/js/babel-plugins/record-tuple-tuple.js deleted file mode 100644 index b98e3b8a2b44..000000000000 --- a/tests/format/js/babel-plugins/record-tuple-tuple.js +++ /dev/null @@ -1 +0,0 @@ -const tuple1 = #[1, 2, 3]; diff --git a/tests/format/js/babel-plugins/regexp-modifiers.js b/tests/format/js/babel-plugins/regexp-modifiers.js new file mode 100644 index 000000000000..21cfd8487fe6 --- /dev/null +++ b/tests/format/js/babel-plugins/regexp-modifiers.js @@ -0,0 +1 @@ +const re = /^(?i:[a-z])[a-z]$/; diff --git a/tests/format/js/babel-plugins/source-phase-imports.js b/tests/format/js/babel-plugins/source-phase-imports.js new file mode 100644 index 000000000000..fe8697e02109 --- /dev/null +++ b/tests/format/js/babel-plugins/source-phase-imports.js @@ -0,0 +1,2 @@ +import source fooSource from "foo"; +import.source("x"); diff --git a/tests/format/js/babel-plugins/throw-expressions.js b/tests/format/js/babel-plugins/throw-expressions.js index 3cded22842e3..2fb5facdefc9 100644 --- a/tests/format/js/babel-plugins/throw-expressions.js +++ b/tests/format/js/babel-plugins/throw-expressions.js @@ -1,4 +1,4 @@ -// https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions +// https://babeljs.io/docs/babel-plugin-proposal-throw-expressions function test(param = throw new Error('required!')) { const test = param === true || throw new Error('Falsy!'); diff --git a/tests/format/js/babel-plugins/typescript.js b/tests/format/js/babel-plugins/typescript.js index 7fe7124f31e7..9b0f9b2ba6b0 100644 --- a/tests/format/js/babel-plugins/typescript.js +++ b/tests/format/js/babel-plugins/typescript.js @@ -1,3 +1,3 @@ -// https://babeljs.io/docs/en/babel-preset-typescript +// https://babeljs.io/docs/babel-preset-typescript const x: number = 0; diff --git a/tests/format/js/big-int/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/big-int/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/big-int/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/big-int/__snapshots__/format.test.js.snap diff --git a/tests/format/js/big-int/format.test.js b/tests/format/js/big-int/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/big-int/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/big-int/jsfmt.spec.js b/tests/format/js/big-int/jsfmt.spec.js deleted file mode 100644 index 61966a7d00c3..000000000000 --- a/tests/format/js/big-int/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/binary-expressions/__snapshots__/format.test.js.snap b/tests/format/js/binary-expressions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..34ffaa6bb481 --- /dev/null +++ b/tests/format/js/binary-expressions/__snapshots__/format.test.js.snap @@ -0,0 +1,2468 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-object.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = foo || [ + // comment + a, +] + +foo = foo || { + // comment + a, +} + +=====================================output===================================== +foo = foo || [ + // comment + a, +]; + +foo = foo || { + // comment + a, +}; + +================================================================================ +`; + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = foo || [ + // comment + a, +] + +foo = foo || { + // comment + a, +} + +=====================================output===================================== +foo = foo || [ + // comment + a, +]; + +foo = foo || { + // comment + a, +}; + +================================================================================ +`; + +exports[`arrow.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + const appEntities = getAppEntities(loadObject).filter( + entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() + ) +} + +function f2() { + const appEntities = getAppEntities(loadObject).map( + entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() && { + id: entity.id + } + ) +} + +((x) => x) + ''; +'' + ((x) => x); + +=====================================output===================================== +function f() { + const appEntities = getAppEntities(loadObject).filter( + (entity) => + entity + && entity.isInstallAvailable() + && !entity.isQueue() + && entity.isDisabled(), + ); +} + +function f2() { + const appEntities = getAppEntities(loadObject).map( + (entity) => + entity + && entity.isInstallAvailable() + && !entity.isQueue() + && entity.isDisabled() && { + id: entity.id, + }, + ); +} + +((x) => x) + ""; +"" + ((x) => x); + +================================================================================ +`; + +exports[`arrow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + const appEntities = getAppEntities(loadObject).filter( + entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() + ) +} + +function f2() { + const appEntities = getAppEntities(loadObject).map( + entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() && { + id: entity.id + } + ) +} + +((x) => x) + ''; +'' + ((x) => x); + +=====================================output===================================== +function f() { + const appEntities = getAppEntities(loadObject).filter( + (entity) => + entity && + entity.isInstallAvailable() && + !entity.isQueue() && + entity.isDisabled(), + ); +} + +function f2() { + const appEntities = getAppEntities(loadObject).map( + (entity) => + entity && + entity.isInstallAvailable() && + !entity.isQueue() && + entity.isDisabled() && { + id: entity.id, + }, + ); +} + +((x) => x) + ""; +"" + ((x) => x); + +================================================================================ +`; + +exports[`bitwise-flags.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const FLAG_A = 1 << 0; +const FLAG_B = 1 << 1; +const FLAG_C = 1 << 2; + +const all = FLAG_A | FLAG_B | FLAG_C; + +=====================================output===================================== +const FLAG_A = 1 << 0; +const FLAG_B = 1 << 1; +const FLAG_C = 1 << 2; + +const all = FLAG_A | FLAG_B | FLAG_C; + +================================================================================ +`; + +exports[`bitwise-flags.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const FLAG_A = 1 << 0; +const FLAG_B = 1 << 1; +const FLAG_C = 1 << 2; + +const all = FLAG_A | FLAG_B | FLAG_C; + +=====================================output===================================== +const FLAG_A = 1 << 0; +const FLAG_B = 1 << 1; +const FLAG_C = 1 << 2; + +const all = FLAG_A | FLAG_B | FLAG_C; + +================================================================================ +`; + +exports[`call.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +( + aa && + bb && + cc && + dd && + ee +)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + + bbbbbbbbbbbbbbbbbbbbbbbbb + + ccccccccccccccccccccccccc + + ddddddddddddddddddddddddd + + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +( + aa + + bb + + cc + + dd + + ee +)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)()()(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +); + +=====================================output===================================== +( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +(aa && bb && cc && dd && ee)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + + bbbbbbbbbbbbbbbbbbbbbbbbb + + ccccccccccccccccccccccccc + + ddddddddddddddddddddddddd + + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +(aa + bb + cc + dd + ee)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee +)()()(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee, +)( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee, +)( + aaaaaaaaaaaaaaaaaaaaaaaaa + && bbbbbbbbbbbbbbbbbbbbbbbbb + && ccccccccccccccccccccccccc + && ddddddddddddddddddddddddd + && eeeeeeeeeeeeeeeeeeeeeeeee, +); + +================================================================================ +`; + +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +( + aa && + bb && + cc && + dd && + ee +)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + + bbbbbbbbbbbbbbbbbbbbbbbbb + + ccccccccccccccccccccccccc + + ddddddddddddddddddddddddd + + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +( + aa + + bb + + cc + + dd + + ee +)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)()()(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +); + +=====================================output===================================== +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +(aa && bb && cc && dd && ee)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa + + bbbbbbbbbbbbbbbbbbbbbbbbb + + ccccccccccccccccccccccccc + + ddddddddddddddddddddddddd + + eeeeeeeeeeeeeeeeeeeeeeeee +)(); + +(aa + bb + cc + dd + ee)(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)()()(); + +( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee, +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee, +)( + aaaaaaaaaaaaaaaaaaaaaaaaa && + bbbbbbbbbbbbbbbbbbbbbbbbb && + ccccccccccccccccccccccccc && + ddddddddddddddddddddddddd && + eeeeeeeeeeeeeeeeeeeeeeeee, +); + +================================================================================ +`; + +exports[`comment.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = ( + // Comment 1 + (Math.random() * (yRange * (1 - minVerticalFraction))) + + (minVerticalFraction * yRange) +) - offset; + +a + + a + + a + // comment + a + + a; + +a && + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong && // comment + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong + +a || + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong || // comment + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong + +var a = x(abifornCringerMoshedPerplexSawder ++ kochabCooieGameOnOboleUnweave // f ++ glimseGlyphsHazardNoopsTieTie+bifornCringerMoshedPerplexSawder); + +foo[ + a + + a + // comment + a + + bar[ + b + + b + + b + // comment + b + + b + ] +]; + +!( + a + + a + // comment + a + + !( + b + + b + + b + // comment + b + + b + ) +); + +const logical_expression = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ && + /* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && + // line comment + cccccccccccccccccccccccc; + +const bc = a /* internal before */ || /* internal after */ b; + +a + + /**/ + a.a().a(); + +=====================================output===================================== +a = + // Comment 1 + Math.random() * (yRange * (1 - minVerticalFraction)) + + minVerticalFraction * yRange + - offset; + +a + + a + + a // comment + + a + + a; + +a + && longLongLongLongLongLongLongLongLong + && longLongLongLongLongLongLongLongLong // comment + && longLongLongLongLongLongLongLongLong + && longLongLongLongLongLongLongLongLong; + +a + || longLongLongLongLongLongLongLongLong + || longLongLongLongLongLongLongLongLong // comment + || longLongLongLongLongLongLongLongLong + || longLongLongLongLongLongLongLongLong; + +var a = x( + abifornCringerMoshedPerplexSawder + + kochabCooieGameOnOboleUnweave // f + + glimseGlyphsHazardNoopsTieTie + + bifornCringerMoshedPerplexSawder, +); + +foo[ + a + + a // comment + + a + + bar[ + b + + b + + b // comment + + b + + b + ] +]; + +!( + a + + a // comment + + a + + !( + b + + b + + b // comment + + b + + b + ) +); + +const logical_expression = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ + && /* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + // line comment + && cccccccccccccccccccccccc; + +const bc = a /* internal before */ || /* internal after */ b; + +a + /**/ + + a.a().a(); + +================================================================================ +`; + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = ( + // Comment 1 + (Math.random() * (yRange * (1 - minVerticalFraction))) + + (minVerticalFraction * yRange) +) - offset; + +a + + a + + a + // comment + a + + a; + +a && + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong && // comment + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong + +a || + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong || // comment + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong + +var a = x(abifornCringerMoshedPerplexSawder ++ kochabCooieGameOnOboleUnweave // f ++ glimseGlyphsHazardNoopsTieTie+bifornCringerMoshedPerplexSawder); + +foo[ + a + + a + // comment + a + + bar[ + b + + b + + b + // comment + b + + b + ] +]; + +!( + a + + a + // comment + a + + !( + b + + b + + b + // comment + b + + b + ) +); + +const logical_expression = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ && + /* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && + // line comment + cccccccccccccccccccccccc; + +const bc = a /* internal before */ || /* internal after */ b; + +a + + /**/ + a.a().a(); + +=====================================output===================================== +a = + // Comment 1 + Math.random() * (yRange * (1 - minVerticalFraction)) + + minVerticalFraction * yRange - + offset; + +a + + a + + a + // comment + a + + a; + +a && + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong && // comment + longLongLongLongLongLongLongLongLong && + longLongLongLongLongLongLongLongLong; + +a || + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong || // comment + longLongLongLongLongLongLongLongLong || + longLongLongLongLongLongLongLongLong; + +var a = x( + abifornCringerMoshedPerplexSawder + + kochabCooieGameOnOboleUnweave + // f + glimseGlyphsHazardNoopsTieTie + + bifornCringerMoshedPerplexSawder, +); + +foo[ + a + + a + // comment + a + + bar[ + b + + b + + b + // comment + b + + b + ] +]; + +!( + a + + a + // comment + a + + !( + b + + b + + b + // comment + b + + b + ) +); + +const logical_expression = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ && + /* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && + // line comment + cccccccccccccccccccccccc; + +const bc = a /* internal before */ || /* internal after */ b; + +a + + /**/ + a.a().a(); + +================================================================================ +`; + +exports[`equality.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x == y == z; +x != y == z; +x == y != z; +x != y != z; + +x === y === z; +x !== y === z; +x === y !== z; +x !== y !== z; + +=====================================output===================================== +(x == y) == z; +(x != y) == z; +(x == y) != z; +(x != y) != z; + +(x === y) === z; +(x !== y) === z; +(x === y) !== z; +(x !== y) !== z; + +================================================================================ +`; + +exports[`equality.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x == y == z; +x != y == z; +x == y != z; +x != y != z; + +x === y === z; +x !== y === z; +x === y !== z; +x !== y !== z; + +=====================================output===================================== +(x == y) == z; +(x != y) == z; +(x == y) != z; +(x != y) != z; + +(x === y) === z; +(x !== y) === z; +(x === y) !== z; +(x !== y) !== z; + +================================================================================ +`; + +exports[`exp.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a ** b ** c; +(a ** b) ** c; +a.b ** c; +(-a) ** b; +a ** -b; +-(a**b); +(a * b) ** c; +a ** (b * c); +(a % b) ** c; + +=====================================output===================================== +a ** (b ** c); +(a ** b) ** c; +a.b ** c; +(-a) ** b; +a ** -b; +-(a ** b); +(a * b) ** c; +a ** (b * c); +(a % b) ** c; + +================================================================================ +`; + +exports[`exp.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a ** b ** c; +(a ** b) ** c; +a.b ** c; +(-a) ** b; +a ** -b; +-(a**b); +(a * b) ** c; +a ** (b * c); +(a % b) ** c; + +=====================================output===================================== +a ** (b ** c); +(a ** b) ** c; +a.b ** c; +(-a) ** b; +a ** -b; +-(a ** b); +(a * b) ** c; +a ** (b * c); +(a % b) ** c; + +================================================================================ +`; + +exports[`if.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (this.hasPlugin("dynamicImports") && this.lookahead().type) {} + +if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {} + +if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right) {} + +if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong) { +} + +=====================================output===================================== +if (this.hasPlugin("dynamicImports") && this.lookahead().type) { +} + +if ( + this.hasPlugin("dynamicImports") + && this.lookahead().type === tt.parenLeft +) { +} + +if ( + this.hasPlugin("dynamicImports") + && this.lookahead().type === tt.parenLeft.right +) { +} + +if ( + VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong +) { +} + +================================================================================ +`; + +exports[`if.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (this.hasPlugin("dynamicImports") && this.lookahead().type) {} + +if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {} + +if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right) {} + +if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong) { +} + +=====================================output===================================== +if (this.hasPlugin("dynamicImports") && this.lookahead().type) { +} + +if ( + this.hasPlugin("dynamicImports") && + this.lookahead().type === tt.parenLeft +) { +} + +if ( + this.hasPlugin("dynamicImports") && + this.lookahead().type === tt.parenLeft.right +) { +} + +if ( + VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong +) { +} + +================================================================================ +`; + +exports[`in_instanceof.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +!foo in bar; +(!foo in bar); +!(foo in bar); +(!foo) in bar; + +!foo instanceof Bar; +(!foo instanceof Bar); +!(foo instanceof Bar); +(!foo) instanceof Bar; + +~foo in bar; +(~foo in bar); +~(foo in bar); +(~foo) in bar; + +~foo instanceof Bar; +(~foo instanceof Bar); +~(foo instanceof Bar); +(~foo) instanceof Bar; + ++foo in bar; +(+foo in bar); ++(foo in bar); +(+foo) in bar; + ++foo instanceof Bar; +(+foo instanceof Bar); ++(foo instanceof Bar); +(+foo) instanceof Bar; + +-foo in bar; +(-foo in bar); +-(foo in bar); +(-foo) in bar; + +-foo instanceof Bar; +(-foo instanceof Bar); +-(foo instanceof Bar); +(-foo) instanceof Bar; + +void 0 in bar; +(void 0 in bar); +void (0 in bar); +(void 0) in bar; + +void 0 instanceof bar; +(void 0 instanceof bar); +void (0 instanceof bar); +(void 0) instanceof bar; + +delete 0 in bar; +(delete 0 in bar); +delete (0 in bar); +(delete 0) in bar; + +delete 0 instanceof bar; +(delete 0 instanceof bar); +delete (0 instanceof bar); +(delete 0) instanceof bar; + +typeof 0 in bar; +(typeof 0 in bar); +typeof (0 in bar); +(typeof 0) in bar; + +typeof 0 instanceof bar; +(typeof 0 instanceof bar); +typeof (0 instanceof bar); +(typeof 0) instanceof bar; + +++x instanceof bar; // not ambiguous, because ++(x instanceof bar) is obviously invalid + +!!foo instanceof Bar; + +=====================================output===================================== +(!foo) in bar; +(!foo) in bar; +!(foo in bar); +(!foo) in bar; + +(!foo) instanceof Bar; +(!foo) instanceof Bar; +!(foo instanceof Bar); +(!foo) instanceof Bar; + +(~foo) in bar; +(~foo) in bar; +~(foo in bar); +(~foo) in bar; + +(~foo) instanceof Bar; +(~foo) instanceof Bar; +~(foo instanceof Bar); +(~foo) instanceof Bar; + +(+foo) in bar; +(+foo) in bar; ++(foo in bar); +(+foo) in bar; + +(+foo) instanceof Bar; +(+foo) instanceof Bar; ++(foo instanceof Bar); +(+foo) instanceof Bar; + +(-foo) in bar; +(-foo) in bar; +-(foo in bar); +(-foo) in bar; + +(-foo) instanceof Bar; +(-foo) instanceof Bar; +-(foo instanceof Bar); +(-foo) instanceof Bar; + +(void 0) in bar; +(void 0) in bar; +void (0 in bar); +(void 0) in bar; + +(void 0) instanceof bar; +(void 0) instanceof bar; +void (0 instanceof bar); +(void 0) instanceof bar; + +(delete 0) in bar; +(delete 0) in bar; +delete (0 in bar); +(delete 0) in bar; + +(delete 0) instanceof bar; +(delete 0) instanceof bar; +delete (0 instanceof bar); +(delete 0) instanceof bar; + +(typeof 0) in bar; +(typeof 0) in bar; +typeof (0 in bar); +(typeof 0) in bar; + +(typeof 0) instanceof bar; +(typeof 0) instanceof bar; +typeof (0 instanceof bar); +(typeof 0) instanceof bar; + +++x instanceof bar; // not ambiguous, because ++(x instanceof bar) is obviously invalid + +(!!foo) instanceof Bar; + +================================================================================ +`; + +exports[`in_instanceof.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +!foo in bar; +(!foo in bar); +!(foo in bar); +(!foo) in bar; + +!foo instanceof Bar; +(!foo instanceof Bar); +!(foo instanceof Bar); +(!foo) instanceof Bar; + +~foo in bar; +(~foo in bar); +~(foo in bar); +(~foo) in bar; + +~foo instanceof Bar; +(~foo instanceof Bar); +~(foo instanceof Bar); +(~foo) instanceof Bar; + ++foo in bar; +(+foo in bar); ++(foo in bar); +(+foo) in bar; + ++foo instanceof Bar; +(+foo instanceof Bar); ++(foo instanceof Bar); +(+foo) instanceof Bar; + +-foo in bar; +(-foo in bar); +-(foo in bar); +(-foo) in bar; + +-foo instanceof Bar; +(-foo instanceof Bar); +-(foo instanceof Bar); +(-foo) instanceof Bar; + +void 0 in bar; +(void 0 in bar); +void (0 in bar); +(void 0) in bar; + +void 0 instanceof bar; +(void 0 instanceof bar); +void (0 instanceof bar); +(void 0) instanceof bar; + +delete 0 in bar; +(delete 0 in bar); +delete (0 in bar); +(delete 0) in bar; + +delete 0 instanceof bar; +(delete 0 instanceof bar); +delete (0 instanceof bar); +(delete 0) instanceof bar; + +typeof 0 in bar; +(typeof 0 in bar); +typeof (0 in bar); +(typeof 0) in bar; + +typeof 0 instanceof bar; +(typeof 0 instanceof bar); +typeof (0 instanceof bar); +(typeof 0) instanceof bar; + +++x instanceof bar; // not ambiguous, because ++(x instanceof bar) is obviously invalid + +!!foo instanceof Bar; + +=====================================output===================================== +(!foo) in bar; +(!foo) in bar; +!(foo in bar); +(!foo) in bar; + +(!foo) instanceof Bar; +(!foo) instanceof Bar; +!(foo instanceof Bar); +(!foo) instanceof Bar; + +(~foo) in bar; +(~foo) in bar; +~(foo in bar); +(~foo) in bar; + +(~foo) instanceof Bar; +(~foo) instanceof Bar; +~(foo instanceof Bar); +(~foo) instanceof Bar; + +(+foo) in bar; +(+foo) in bar; ++(foo in bar); +(+foo) in bar; + +(+foo) instanceof Bar; +(+foo) instanceof Bar; ++(foo instanceof Bar); +(+foo) instanceof Bar; + +(-foo) in bar; +(-foo) in bar; +-(foo in bar); +(-foo) in bar; + +(-foo) instanceof Bar; +(-foo) instanceof Bar; +-(foo instanceof Bar); +(-foo) instanceof Bar; + +(void 0) in bar; +(void 0) in bar; +void (0 in bar); +(void 0) in bar; + +(void 0) instanceof bar; +(void 0) instanceof bar; +void (0 instanceof bar); +(void 0) instanceof bar; + +(delete 0) in bar; +(delete 0) in bar; +delete (0 in bar); +(delete 0) in bar; + +(delete 0) instanceof bar; +(delete 0) instanceof bar; +delete (0 instanceof bar); +(delete 0) instanceof bar; + +(typeof 0) in bar; +(typeof 0) in bar; +typeof (0 in bar); +(typeof 0) in bar; + +(typeof 0) instanceof bar; +(typeof 0) instanceof bar; +typeof (0 instanceof bar); +(typeof 0) instanceof bar; + +++x instanceof bar; // not ambiguous, because ++(x instanceof bar) is obviously invalid + +(!!foo) instanceof Bar; + +================================================================================ +`; + +exports[`inline-jsx.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const user = renderedUser || <div><User name={this.state.user.name} age={this.state.user.age} /></div>; + +const user2 = renderedUser || shouldRenderUser && <div><User name={this.state.user.name} age={this.state.user.age} /></div>; + +const avatar = hasAvatar && <Gravatar user={author} size={size} />; + +const avatar2 = (hasAvatar || showPlaceholder) && <Gravatar user={author} size={size} />; + +=====================================output===================================== +const user = renderedUser || ( + <div> + <User name={this.state.user.name} age={this.state.user.age} /> + </div> +); + +const user2 = + renderedUser + || (shouldRenderUser && ( + <div> + <User name={this.state.user.name} age={this.state.user.age} /> + </div> + )); + +const avatar = hasAvatar && <Gravatar user={author} size={size} />; + +const avatar2 = (hasAvatar || showPlaceholder) && ( + <Gravatar user={author} size={size} /> +); + +================================================================================ +`; + +exports[`inline-jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const user = renderedUser || <div><User name={this.state.user.name} age={this.state.user.age} /></div>; + +const user2 = renderedUser || shouldRenderUser && <div><User name={this.state.user.name} age={this.state.user.age} /></div>; + +const avatar = hasAvatar && <Gravatar user={author} size={size} />; + +const avatar2 = (hasAvatar || showPlaceholder) && <Gravatar user={author} size={size} />; + +=====================================output===================================== +const user = renderedUser || ( + <div> + <User name={this.state.user.name} age={this.state.user.age} /> + </div> +); + +const user2 = + renderedUser || + (shouldRenderUser && ( + <div> + <User name={this.state.user.name} age={this.state.user.age} /> + </div> + )); + +const avatar = hasAvatar && <Gravatar user={author} size={size} />; + +const avatar2 = (hasAvatar || showPlaceholder) && ( + <Gravatar user={author} size={size} /> +); + +================================================================================ +`; + +exports[`inline-object-array.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +prevState = prevState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, +}; + +prevState = prevState || + defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +prevState = prevState || + defaultState && { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +prevState = prevState || useDefault && defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +this.steps = steps || [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +this.steps = steps || checkStep && [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +this.steps = steps && checkStep || [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +const create = () => { + const result = doSomething(); + return ( + shouldReturn && + result.ok && { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt + } + ); +} + +const create2 = () => { + const result = doSomething(); + return ( + shouldReturn && result.ok && result || { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt + } + ); +} + +const obj = { + state: shouldHaveState && + stateIsOK && { + loadState: LOADED, + opened: false + }, + loadNext: stateIsOK && hasNext || { + skipNext: true + }, + loaded: true +} + +=====================================output===================================== +prevState = prevState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, +}; + +prevState = prevState + || defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }; + +prevState = + prevState + || (defaultState && { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }); + +prevState = prevState + || (useDefault && defaultState) || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }; + +this.steps = steps || [ + { + name: "mock-module", + path: "/nux/mock-module", + }, +]; + +this.steps = + steps + || (checkStep && [ + { + name: "mock-module", + path: "/nux/mock-module", + }, + ]); + +this.steps = (steps && checkStep) || [ + { + name: "mock-module", + path: "/nux/mock-module", + }, +]; + +const create = () => { + const result = doSomething(); + return ( + shouldReturn + && result.ok && { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt, + } + ); +}; + +const create2 = () => { + const result = doSomething(); + return ( + (shouldReturn && result.ok && result) || { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt, + } + ); +}; + +const obj = { + state: shouldHaveState + && stateIsOK && { + loadState: LOADED, + opened: false, + }, + loadNext: (stateIsOK && hasNext) || { + skipNext: true, + }, + loaded: true, +}; + +================================================================================ +`; + +exports[`inline-object-array.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +prevState = prevState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, +}; + +prevState = prevState || + defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +prevState = prevState || + defaultState && { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +prevState = prevState || useDefault && defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: '', + selectedCatalog: null, + }; + +this.steps = steps || [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +this.steps = steps || checkStep && [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +this.steps = steps && checkStep || [ + { + name: 'mock-module', + path: '/nux/mock-module', + }, +]; + +const create = () => { + const result = doSomething(); + return ( + shouldReturn && + result.ok && { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt + } + ); +} + +const create2 = () => { + const result = doSomething(); + return ( + shouldReturn && result.ok && result || { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt + } + ); +} + +const obj = { + state: shouldHaveState && + stateIsOK && { + loadState: LOADED, + opened: false + }, + loadNext: stateIsOK && hasNext || { + skipNext: true + }, + loaded: true +} + +=====================================output===================================== +prevState = prevState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, +}; + +prevState = prevState || + defaultState || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }; + +prevState = + prevState || + (defaultState && { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }); + +prevState = prevState || + (useDefault && defaultState) || { + catalogs: [], + loadState: LOADED, + opened: false, + searchQuery: "", + selectedCatalog: null, + }; + +this.steps = steps || [ + { + name: "mock-module", + path: "/nux/mock-module", + }, +]; + +this.steps = + steps || + (checkStep && [ + { + name: "mock-module", + path: "/nux/mock-module", + }, + ]); + +this.steps = (steps && checkStep) || [ + { + name: "mock-module", + path: "/nux/mock-module", + }, +]; + +const create = () => { + const result = doSomething(); + return ( + shouldReturn && + result.ok && { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt, + } + ); +}; + +const create2 = () => { + const result = doSomething(); + return ( + (shouldReturn && result.ok && result) || { + status: "ok", + createdAt: result.createdAt, + updatedAt: result.updatedAt, + } + ); +}; + +const obj = { + state: shouldHaveState && + stateIsOK && { + loadState: LOADED, + opened: false, + }, + loadNext: (stateIsOK && hasNext) || { + skipNext: true, + }, + loaded: true, +}; + +================================================================================ +`; + +exports[`jsx_parent.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div + src={ + !isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty + } +/>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty} +</div>; + +<div + style={ + !isJellyfishEnabled && + diffUpdateMessageInput && { + fontSize: 14, + color: '#fff' + } + } +/>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && <div><span>Text</span></div>} +</div>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && child || <div><span>Text</span></div>} +</div>; + +=====================================output===================================== +<div + src={ + !isJellyfishEnabled + && diffUpdateMessageInput != null + && this.state.isUpdateMessageEmpty + } +/>; + +<div> + {!isJellyfishEnabled + && diffUpdateMessageInput != null + && this.state.isUpdateMessageEmpty} +</div>; + +<div + style={ + !isJellyfishEnabled + && diffUpdateMessageInput && { + fontSize: 14, + color: "#fff", + } + } +/>; + +<div> + {!isJellyfishEnabled && diffUpdateMessageInput != null && ( + <div> + <span>Text</span> + </div> + )} +</div>; + +<div> + {(!isJellyfishEnabled && diffUpdateMessageInput != null && child) || ( + <div> + <span>Text</span> + </div> + )} +</div>; + +================================================================================ +`; + +exports[`jsx_parent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div + src={ + !isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty + } +/>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty} +</div>; + +<div + style={ + !isJellyfishEnabled && + diffUpdateMessageInput && { + fontSize: 14, + color: '#fff' + } + } +/>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && <div><span>Text</span></div>} +</div>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && child || <div><span>Text</span></div>} +</div>; + +=====================================output===================================== +<div + src={ + !isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty + } +/>; + +<div> + {!isJellyfishEnabled && + diffUpdateMessageInput != null && + this.state.isUpdateMessageEmpty} +</div>; + +<div + style={ + !isJellyfishEnabled && + diffUpdateMessageInput && { + fontSize: 14, + color: "#fff", + } + } +/>; + +<div> + {!isJellyfishEnabled && diffUpdateMessageInput != null && ( + <div> + <span>Text</span> + </div> + )} +</div>; + +<div> + {(!isJellyfishEnabled && diffUpdateMessageInput != null && child) || ( + <div> + <span>Text</span> + </div> + )} +</div>; + +================================================================================ +`; + +exports[`like-regexp.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +0 ? a : { b : 1 }/2; + +=====================================output===================================== +0 ? a : { b: 1 } / 2; + +================================================================================ +`; + +exports[`like-regexp.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +0 ? a : { b : 1 }/2; + +=====================================output===================================== +0 ? a : { b: 1 } / 2; + +================================================================================ +`; + +exports[`math.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x + y / z; +x / y + z; + +x * y % z; +x / y % z; +x % y * z; +x % y / z; + +x % y % z; + +x << y >> z; +x >>> y << z; +x >>> y >>> z; +x + y >> z; + +x | y & z; +x & y | z; +x ^ y ^ z; +x & y & z; +x | y | z; +x & y >> z; +x << y | z; + +=====================================output===================================== +x + y / z; +x / y + z; + +(x * y) % z; +(x / y) % z; +(x % y) * z; +(x % y) / z; + +(x % y) % z; + +(x << y) >> z; +(x >>> y) << z; +(x >>> y) >>> z; +(x + y) >> z; + +x | (y & z); +(x & y) | z; +x ^ y ^ z; +x & y & z; +x | y | z; +x & (y >> z); +(x << y) | z; + +================================================================================ +`; + +exports[`math.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x + y / z; +x / y + z; + +x * y % z; +x / y % z; +x % y * z; +x % y / z; + +x % y % z; + +x << y >> z; +x >>> y << z; +x >>> y >>> z; +x + y >> z; + +x | y & z; +x & y | z; +x ^ y ^ z; +x & y & z; +x | y | z; +x & y >> z; +x << y | z; + +=====================================output===================================== +x + y / z; +x / y + z; + +(x * y) % z; +(x / y) % z; +(x % y) * z; +(x % y) / z; + +(x % y) % z; + +(x << y) >> z; +(x >>> y) << z; +(x >>> y) >>> z; +(x + y) >> z; + +x | (y & z); +(x & y) | z; +x ^ y ^ z; +x & y & z; +x | y | z; +x & (y >> z); +(x << y) | z; + +================================================================================ +`; + +exports[`return.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right; +} + +function foo2() { + return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right + ? true + : false; +} + +function foo3() { + return this.calculate().compute().first.numberOfThings > this.calculate().compute().last.numberOfThings + ? true + : false; +} + +=====================================output===================================== +function foo() { + return ( + this.hasPlugin("dynamicImports") + && this.lookahead().type === tt.parenLeft.right + ); +} + +function foo2() { + return this.hasPlugin("dynamicImports") + && this.lookahead().type === tt.parenLeft.right + ? true + : false; +} + +function foo3() { + return this.calculate().compute().first.numberOfThings + > this.calculate().compute().last.numberOfThings + ? true + : false; +} + +================================================================================ +`; + +exports[`return.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right; +} + +function foo2() { + return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right + ? true + : false; +} + +function foo3() { + return this.calculate().compute().first.numberOfThings > this.calculate().compute().last.numberOfThings + ? true + : false; +} + +=====================================output===================================== +function foo() { + return ( + this.hasPlugin("dynamicImports") && + this.lookahead().type === tt.parenLeft.right + ); +} + +function foo2() { + return this.hasPlugin("dynamicImports") && + this.lookahead().type === tt.parenLeft.right + ? true + : false; +} + +function foo3() { + return this.calculate().compute().first.numberOfThings > + this.calculate().compute().last.numberOfThings + ? true + : false; +} + +================================================================================ +`; + +exports[`short-right.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +this._cumulativeHeights && + Math.abs( + this._cachedItemHeight(this._firstVisibleIndex + i) - + this._provider.fastHeight(i + this._firstVisibleIndex), + ) > + 1 + +foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( + aaaaaaaaaaaaaaaaaaa +) + + a; + +const isPartOfPackageJSON = dependenciesArray.indexOf( + dependencyWithOutRelativePath.split('/')[0], +) !== -1; + +defaultContent.filter(defaultLocale => { + // ... +})[0] || null; + +=====================================output===================================== +this._cumulativeHeights + && Math.abs( + this._cachedItemHeight(this._firstVisibleIndex + i) + - this._provider.fastHeight(i + this._firstVisibleIndex), + ) > 1; + +foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(aaaaaaaaaaaaaaaaaaa) + + a; + +const isPartOfPackageJSON = + dependenciesArray.indexOf(dependencyWithOutRelativePath.split("/")[0]) !== -1; + +defaultContent.filter((defaultLocale) => { + // ... +})[0] || null; + +================================================================================ +`; + +exports[`short-right.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +this._cumulativeHeights && + Math.abs( + this._cachedItemHeight(this._firstVisibleIndex + i) - + this._provider.fastHeight(i + this._firstVisibleIndex), + ) > + 1 + +foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( + aaaaaaaaaaaaaaaaaaa +) + + a; + +const isPartOfPackageJSON = dependenciesArray.indexOf( + dependencyWithOutRelativePath.split('/')[0], +) !== -1; + +defaultContent.filter(defaultLocale => { + // ... +})[0] || null; + +=====================================output===================================== +this._cumulativeHeights && + Math.abs( + this._cachedItemHeight(this._firstVisibleIndex + i) - + this._provider.fastHeight(i + this._firstVisibleIndex), + ) > 1; + +foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( + aaaaaaaaaaaaaaaaaaa, +) + a; + +const isPartOfPackageJSON = + dependenciesArray.indexOf(dependencyWithOutRelativePath.split("/")[0]) !== -1; + +defaultContent.filter((defaultLocale) => { + // ... +})[0] || null; + +================================================================================ +`; + +exports[`test.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// It should always break the highest precedence operators first, and +// break them all at the same time. + +const x = longVariable + longVariable + longVariable; +const x1 = longVariable + longVariable + longVariable + longVariable - longVariable + longVariable; +const x2 = longVariable + longVariable * longVariable + longVariable - longVariable + longVariable; +const x3 = longVariable + longVariable * longVariable * longVariable / longVariable + longVariable; + +const x4 = longVariable && longVariable && longVariable && longVariable && longVariable && longVariable; +const x5 = longVariable && longVariable || longVariable && longVariable || longVariable && longVariable; +const x6 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || {}; +const x7 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || []; +const x8 = call(firstItemWithAVeryLongNameThatKeepsGoing, firstItemWithAVeryLongNameThatKeepsGoing) || []; + +const x9 = longVariable * longint && longVariable >> 0 && longVariable + longVariable; + +const x10 = longVariable > longint && longVariable === 0 + longVariable * longVariable; + +foo(obj.property * new Class() && obj instanceof Class && longVariable ? number + 5 : false); + +=====================================output===================================== +// It should always break the highest precedence operators first, and +// break them all at the same time. + +const x = longVariable + longVariable + longVariable; +const x1 = + longVariable + + longVariable + + longVariable + + longVariable + - longVariable + + longVariable; +const x2 = + longVariable + + longVariable * longVariable + + longVariable + - longVariable + + longVariable; +const x3 = + longVariable + + (longVariable * longVariable * longVariable) / longVariable + + longVariable; + +const x4 = + longVariable + && longVariable + && longVariable + && longVariable + && longVariable + && longVariable; +const x5 = + (longVariable && longVariable) + || (longVariable && longVariable) + || (longVariable && longVariable); +const x6 = + firstItemWithAVeryLongNameThatKeepsGoing + || firstItemWithAVeryLongNameThatKeepsGoing + || {}; +const x7 = + firstItemWithAVeryLongNameThatKeepsGoing + || firstItemWithAVeryLongNameThatKeepsGoing + || []; +const x8 = + call( + firstItemWithAVeryLongNameThatKeepsGoing, + firstItemWithAVeryLongNameThatKeepsGoing, + ) || []; + +const x9 = + longVariable * longint && longVariable >> 0 && longVariable + longVariable; + +const x10 = + longVariable > longint && longVariable === 0 + longVariable * longVariable; + +foo( + obj.property * new Class() && obj instanceof Class && longVariable + ? number + 5 + : false, +); + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// It should always break the highest precedence operators first, and +// break them all at the same time. + +const x = longVariable + longVariable + longVariable; +const x1 = longVariable + longVariable + longVariable + longVariable - longVariable + longVariable; +const x2 = longVariable + longVariable * longVariable + longVariable - longVariable + longVariable; +const x3 = longVariable + longVariable * longVariable * longVariable / longVariable + longVariable; + +const x4 = longVariable && longVariable && longVariable && longVariable && longVariable && longVariable; +const x5 = longVariable && longVariable || longVariable && longVariable || longVariable && longVariable; +const x6 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || {}; +const x7 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || []; +const x8 = call(firstItemWithAVeryLongNameThatKeepsGoing, firstItemWithAVeryLongNameThatKeepsGoing) || []; + +const x9 = longVariable * longint && longVariable >> 0 && longVariable + longVariable; + +const x10 = longVariable > longint && longVariable === 0 + longVariable * longVariable; + +foo(obj.property * new Class() && obj instanceof Class && longVariable ? number + 5 : false); + +=====================================output===================================== +// It should always break the highest precedence operators first, and +// break them all at the same time. + +const x = longVariable + longVariable + longVariable; +const x1 = + longVariable + + longVariable + + longVariable + + longVariable - + longVariable + + longVariable; +const x2 = + longVariable + + longVariable * longVariable + + longVariable - + longVariable + + longVariable; +const x3 = + longVariable + + (longVariable * longVariable * longVariable) / longVariable + + longVariable; + +const x4 = + longVariable && + longVariable && + longVariable && + longVariable && + longVariable && + longVariable; +const x5 = + (longVariable && longVariable) || + (longVariable && longVariable) || + (longVariable && longVariable); +const x6 = + firstItemWithAVeryLongNameThatKeepsGoing || + firstItemWithAVeryLongNameThatKeepsGoing || + {}; +const x7 = + firstItemWithAVeryLongNameThatKeepsGoing || + firstItemWithAVeryLongNameThatKeepsGoing || + []; +const x8 = + call( + firstItemWithAVeryLongNameThatKeepsGoing, + firstItemWithAVeryLongNameThatKeepsGoing, + ) || []; + +const x9 = + longVariable * longint && longVariable >> 0 && longVariable + longVariable; + +const x10 = + longVariable > longint && longVariable === 0 + longVariable * longVariable; + +foo( + obj.property * new Class() && obj instanceof Class && longVariable + ? number + 5 + : false, +); + +================================================================================ +`; + +exports[`unary.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const anyTestFailures = !( + aggregatedResults.numFailedTests === 0 && + aggregatedResults.numRuntimeErrorTestSuites === 0 +); + +=====================================output===================================== +const anyTestFailures = !( + aggregatedResults.numFailedTests === 0 + && aggregatedResults.numRuntimeErrorTestSuites === 0 +); + +================================================================================ +`; + +exports[`unary.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const anyTestFailures = !( + aggregatedResults.numFailedTests === 0 && + aggregatedResults.numRuntimeErrorTestSuites === 0 +); + +=====================================output===================================== +const anyTestFailures = !( + aggregatedResults.numFailedTests === 0 && + aggregatedResults.numRuntimeErrorTestSuites === 0 +); + +================================================================================ +`; diff --git a/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f13fc2fbd244..000000000000 --- a/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1014 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - const appEntities = getAppEntities(loadObject).filter( - entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() - ) -} - -function f2() { - const appEntities = getAppEntities(loadObject).map( - entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() && { - id: entity.id - } - ) -} - -((x) => x) + ''; -'' + ((x) => x); - -=====================================output===================================== -function f() { - const appEntities = getAppEntities(loadObject).filter( - (entity) => - entity && - entity.isInstallAvailable() && - !entity.isQueue() && - entity.isDisabled() - ); -} - -function f2() { - const appEntities = getAppEntities(loadObject).map( - (entity) => - entity && - entity.isInstallAvailable() && - !entity.isQueue() && - entity.isDisabled() && { - id: entity.id, - } - ); -} - -((x) => x) + ""; -"" + ((x) => x); - -================================================================================ -`; - -exports[`bitwise-flags.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const FLAG_A = 1 << 0; -const FLAG_B = 1 << 1; -const FLAG_C = 1 << 2; - -const all = FLAG_A | FLAG_B | FLAG_C; - -=====================================output===================================== -const FLAG_A = 1 << 0; -const FLAG_B = 1 << 1; -const FLAG_C = 1 << 2; - -const all = FLAG_A | FLAG_B | FLAG_C; - -================================================================================ -`; - -exports[`call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)(); - -( - aa && - bb && - cc && - dd && - ee -)(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa + - bbbbbbbbbbbbbbbbbbbbbbbbb + - ccccccccccccccccccccccccc + - ddddddddddddddddddddddddd + - eeeeeeeeeeeeeeeeeeeeeeeee -)(); - -( - aa + - bb + - cc + - dd + - ee -)(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)()()(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -); - -=====================================output===================================== -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)(); - -(aa && bb && cc && dd && ee)(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa + - bbbbbbbbbbbbbbbbbbbbbbbbb + - ccccccccccccccccccccccccc + - ddddddddddddddddddddddddd + - eeeeeeeeeeeeeeeeeeeeeeeee -)(); - -(aa + bb + cc + dd + ee)(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)()()(); - -( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -)( - aaaaaaaaaaaaaaaaaaaaaaaaa && - bbbbbbbbbbbbbbbbbbbbbbbbb && - ccccccccccccccccccccccccc && - ddddddddddddddddddddddddd && - eeeeeeeeeeeeeeeeeeeeeeeee -); - -================================================================================ -`; - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = ( - // Comment 1 - (Math.random() * (yRange * (1 - minVerticalFraction))) - + (minVerticalFraction * yRange) -) - offset; - -a + - a + - a + // comment - a + - a; - -a && - longLongLongLongLongLongLongLongLong && - longLongLongLongLongLongLongLongLong && // comment - longLongLongLongLongLongLongLongLong && - longLongLongLongLongLongLongLongLong - -a || - longLongLongLongLongLongLongLongLong || - longLongLongLongLongLongLongLongLong || // comment - longLongLongLongLongLongLongLongLong || - longLongLongLongLongLongLongLongLong - -var a = x(abifornCringerMoshedPerplexSawder -+ kochabCooieGameOnOboleUnweave // f -+ glimseGlyphsHazardNoopsTieTie+bifornCringerMoshedPerplexSawder); - -foo[ - a + - a + // comment - a + - bar[ - b + - b + - b + // comment - b + - b - ] -]; - -!( - a + - a + // comment - a + - !( - b + - b + - b + // comment - b + - b - ) -); - -=====================================output===================================== -a = - // Comment 1 - Math.random() * (yRange * (1 - minVerticalFraction)) + - minVerticalFraction * yRange - - offset; - -a + - a + - a + // comment - a + - a; - -a && - longLongLongLongLongLongLongLongLong && - longLongLongLongLongLongLongLongLong && // comment - longLongLongLongLongLongLongLongLong && - longLongLongLongLongLongLongLongLong; - -a || - longLongLongLongLongLongLongLongLong || - longLongLongLongLongLongLongLongLong || // comment - longLongLongLongLongLongLongLongLong || - longLongLongLongLongLongLongLongLong; - -var a = x( - abifornCringerMoshedPerplexSawder + - kochabCooieGameOnOboleUnweave + // f - glimseGlyphsHazardNoopsTieTie + - bifornCringerMoshedPerplexSawder -); - -foo[ - a + - a + // comment - a + - bar[ - b + - b + - b + // comment - b + - b - ] -]; - -!( - a + - a + // comment - a + - !( - b + - b + - b + // comment - b + - b - ) -); - -================================================================================ -`; - -exports[`equality.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -x == y == z; -x != y == z; -x == y != z; -x != y != z; - -x === y === z; -x !== y === z; -x === y !== z; -x !== y !== z; - -=====================================output===================================== -(x == y) == z; -(x != y) == z; -(x == y) != z; -(x != y) != z; - -(x === y) === z; -(x !== y) === z; -(x === y) !== z; -(x !== y) !== z; - -================================================================================ -`; - -exports[`exp.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a ** b ** c; -(a ** b) ** c; -a.b ** c; -(-a) ** b; -a ** -b; --(a**b); -(a * b) ** c; -a ** (b * c); -(a % b) ** c; - -=====================================output===================================== -a ** (b ** c); -(a ** b) ** c; -a.b ** c; -(-a) ** b; -a ** -b; --(a ** b); -(a * b) ** c; -a ** (b * c); -(a % b) ** c; - -================================================================================ -`; - -exports[`if.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (this.hasPlugin("dynamicImports") && this.lookahead().type) {} - -if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {} - -if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right) {} - -if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong) { -} - -=====================================output===================================== -if (this.hasPlugin("dynamicImports") && this.lookahead().type) { -} - -if ( - this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft -) { -} - -if ( - this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft.right -) { -} - -if ( - VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong -) { -} - -================================================================================ -`; - -exports[`inline-jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const user = renderedUser || <div><User name={this.state.user.name} age={this.state.user.age} /></div>; - -const user2 = renderedUser || shouldRenderUser && <div><User name={this.state.user.name} age={this.state.user.age} /></div>; - -const avatar = hasAvatar && <Gravatar user={author} size={size} />; - -const avatar2 = (hasAvatar || showPlaceholder) && <Gravatar user={author} size={size} />; - -=====================================output===================================== -const user = renderedUser || ( - <div> - <User name={this.state.user.name} age={this.state.user.age} /> - </div> -); - -const user2 = - renderedUser || - (shouldRenderUser && ( - <div> - <User name={this.state.user.name} age={this.state.user.age} /> - </div> - )); - -const avatar = hasAvatar && <Gravatar user={author} size={size} />; - -const avatar2 = (hasAvatar || showPlaceholder) && ( - <Gravatar user={author} size={size} /> -); - -================================================================================ -`; - -exports[`inline-object-array.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -prevState = prevState || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: '', - selectedCatalog: null, -}; - -prevState = prevState || - defaultState || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: '', - selectedCatalog: null, - }; - -prevState = prevState || - defaultState && { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: '', - selectedCatalog: null, - }; - -prevState = prevState || useDefault && defaultState || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: '', - selectedCatalog: null, - }; - -this.steps = steps || [ - { - name: 'mock-module', - path: '/nux/mock-module', - }, -]; - -this.steps = steps || checkStep && [ - { - name: 'mock-module', - path: '/nux/mock-module', - }, -]; - -this.steps = steps && checkStep || [ - { - name: 'mock-module', - path: '/nux/mock-module', - }, -]; - -const create = () => { - const result = doSomething(); - return ( - shouldReturn && - result.ok && { - status: "ok", - createdAt: result.createdAt, - updatedAt: result.updatedAt - } - ); -} - -const create2 = () => { - const result = doSomething(); - return ( - shouldReturn && result.ok && result || { - status: "ok", - createdAt: result.createdAt, - updatedAt: result.updatedAt - } - ); -} - -const obj = { - state: shouldHaveState && - stateIsOK && { - loadState: LOADED, - opened: false - }, - loadNext: stateIsOK && hasNext || { - skipNext: true - }, - loaded: true -} - -=====================================output===================================== -prevState = prevState || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: "", - selectedCatalog: null, -}; - -prevState = prevState || - defaultState || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: "", - selectedCatalog: null, - }; - -prevState = - prevState || - (defaultState && { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: "", - selectedCatalog: null, - }); - -prevState = prevState || - (useDefault && defaultState) || { - catalogs: [], - loadState: LOADED, - opened: false, - searchQuery: "", - selectedCatalog: null, - }; - -this.steps = steps || [ - { - name: "mock-module", - path: "/nux/mock-module", - }, -]; - -this.steps = - steps || - (checkStep && [ - { - name: "mock-module", - path: "/nux/mock-module", - }, - ]); - -this.steps = (steps && checkStep) || [ - { - name: "mock-module", - path: "/nux/mock-module", - }, -]; - -const create = () => { - const result = doSomething(); - return ( - shouldReturn && - result.ok && { - status: "ok", - createdAt: result.createdAt, - updatedAt: result.updatedAt, - } - ); -}; - -const create2 = () => { - const result = doSomething(); - return ( - (shouldReturn && result.ok && result) || { - status: "ok", - createdAt: result.createdAt, - updatedAt: result.updatedAt, - } - ); -}; - -const obj = { - state: shouldHaveState && - stateIsOK && { - loadState: LOADED, - opened: false, - }, - loadNext: (stateIsOK && hasNext) || { - skipNext: true, - }, - loaded: true, -}; - -================================================================================ -`; - -exports[`jsx_parent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div - src={ - !isJellyfishEnabled && - diffUpdateMessageInput != null && - this.state.isUpdateMessageEmpty - } -/>; - -<div> - {!isJellyfishEnabled && - diffUpdateMessageInput != null && - this.state.isUpdateMessageEmpty} -</div>; - -<div - style={ - !isJellyfishEnabled && - diffUpdateMessageInput && { - fontSize: 14, - color: '#fff' - } - } -/>; - -<div> - {!isJellyfishEnabled && - diffUpdateMessageInput != null && <div><span>Text</span></div>} -</div>; - -<div> - {!isJellyfishEnabled && - diffUpdateMessageInput != null && child || <div><span>Text</span></div>} -</div>; - -=====================================output===================================== -<div - src={ - !isJellyfishEnabled && - diffUpdateMessageInput != null && - this.state.isUpdateMessageEmpty - } -/>; - -<div> - {!isJellyfishEnabled && - diffUpdateMessageInput != null && - this.state.isUpdateMessageEmpty} -</div>; - -<div - style={ - !isJellyfishEnabled && - diffUpdateMessageInput && { - fontSize: 14, - color: "#fff", - } - } -/>; - -<div> - {!isJellyfishEnabled && diffUpdateMessageInput != null && ( - <div> - <span>Text</span> - </div> - )} -</div>; - -<div> - {(!isJellyfishEnabled && diffUpdateMessageInput != null && child) || ( - <div> - <span>Text</span> - </div> - )} -</div>; - -================================================================================ -`; - -exports[`like-regexp.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -0 ? a : { b : 1 }/2; - -=====================================output===================================== -0 ? a : { b: 1 } / 2; - -================================================================================ -`; - -exports[`math.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -x + y / z; -x / y + z; - -x * y % z; -x / y % z; -x % y * z; -x % y / z; - -x % y % z; - -x << y >> z; -x >>> y << z; -x >>> y >>> z; -x + y >> z; - -x | y & z; -x & y | z; -x ^ y ^ z; -x & y & z; -x | y | z; -x & y >> z; -x << y | z; - -=====================================output===================================== -x + y / z; -x / y + z; - -(x * y) % z; -(x / y) % z; -(x % y) * z; -(x % y) / z; - -(x % y) % z; - -(x << y) >> z; -(x >>> y) << z; -(x >>> y) >>> z; -(x + y) >> z; - -x | (y & z); -(x & y) | z; -x ^ y ^ z; -x & y & z; -x | y | z; -x & (y >> z); -(x << y) | z; - -================================================================================ -`; - -exports[`return.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo() { - return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right; -} - -function foo2() { - return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right - ? true - : false; -} - -function foo3() { - return this.calculate().compute().first.numberOfThings > this.calculate().compute().last.numberOfThings - ? true - : false; -} - -=====================================output===================================== -function foo() { - return ( - this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft.right - ); -} - -function foo2() { - return this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft.right - ? true - : false; -} - -function foo3() { - return this.calculate().compute().first.numberOfThings > - this.calculate().compute().last.numberOfThings - ? true - : false; -} - -================================================================================ -`; - -exports[`short-right.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -this._cumulativeHeights && - Math.abs( - this._cachedItemHeight(this._firstVisibleIndex + i) - - this._provider.fastHeight(i + this._firstVisibleIndex), - ) > - 1 - -foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( - aaaaaaaaaaaaaaaaaaa -) + - a; - -const isPartOfPackageJSON = dependenciesArray.indexOf( - dependencyWithOutRelativePath.split('/')[0], -) !== -1; - -defaultContent.filter(defaultLocale => { - // ... -})[0] || null; - -=====================================output===================================== -this._cumulativeHeights && - Math.abs( - this._cachedItemHeight(this._firstVisibleIndex + i) - - this._provider.fastHeight(i + this._firstVisibleIndex) - ) > 1; - -foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo( - aaaaaaaaaaaaaaaaaaa -) + a; - -const isPartOfPackageJSON = - dependenciesArray.indexOf(dependencyWithOutRelativePath.split("/")[0]) !== -1; - -defaultContent.filter((defaultLocale) => { - // ... -})[0] || null; - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// It should always break the highest precedence operators first, and -// break them all at the same time. - -const x = longVariable + longVariable + longVariable; -const x1 = longVariable + longVariable + longVariable + longVariable - longVariable + longVariable; -const x2 = longVariable + longVariable * longVariable + longVariable - longVariable + longVariable; -const x3 = longVariable + longVariable * longVariable * longVariable / longVariable + longVariable; - -const x4 = longVariable && longVariable && longVariable && longVariable && longVariable && longVariable; -const x5 = longVariable && longVariable || longVariable && longVariable || longVariable && longVariable; -const x6 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || {}; -const x7 = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || []; -const x8 = call(firstItemWithAVeryLongNameThatKeepsGoing, firstItemWithAVeryLongNameThatKeepsGoing) || []; - -const x9 = longVariable * longint && longVariable >> 0 && longVariable + longVariable; - -const x10 = longVariable > longint && longVariable === 0 + longVariable * longVariable; - -foo(obj.property * new Class() && obj instanceof Class && longVariable ? number + 5 : false); - -=====================================output===================================== -// It should always break the highest precedence operators first, and -// break them all at the same time. - -const x = longVariable + longVariable + longVariable; -const x1 = - longVariable + - longVariable + - longVariable + - longVariable - - longVariable + - longVariable; -const x2 = - longVariable + - longVariable * longVariable + - longVariable - - longVariable + - longVariable; -const x3 = - longVariable + - (longVariable * longVariable * longVariable) / longVariable + - longVariable; - -const x4 = - longVariable && - longVariable && - longVariable && - longVariable && - longVariable && - longVariable; -const x5 = - (longVariable && longVariable) || - (longVariable && longVariable) || - (longVariable && longVariable); -const x6 = - firstItemWithAVeryLongNameThatKeepsGoing || - firstItemWithAVeryLongNameThatKeepsGoing || - {}; -const x7 = - firstItemWithAVeryLongNameThatKeepsGoing || - firstItemWithAVeryLongNameThatKeepsGoing || - []; -const x8 = - call( - firstItemWithAVeryLongNameThatKeepsGoing, - firstItemWithAVeryLongNameThatKeepsGoing - ) || []; - -const x9 = - longVariable * longint && longVariable >> 0 && longVariable + longVariable; - -const x10 = - longVariable > longint && longVariable === 0 + longVariable * longVariable; - -foo( - obj.property * new Class() && obj instanceof Class && longVariable - ? number + 5 - : false -); - -================================================================================ -`; - -exports[`unary.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const anyTestFailures = !( - aggregatedResults.numFailedTests === 0 && - aggregatedResults.numRuntimeErrorTestSuites === 0 -); - -=====================================output===================================== -const anyTestFailures = !( - aggregatedResults.numFailedTests === 0 && - aggregatedResults.numRuntimeErrorTestSuites === 0 -); - -================================================================================ -`; diff --git a/tests/format/js/binary-expressions/array-and-object.js b/tests/format/js/binary-expressions/array-and-object.js new file mode 100644 index 000000000000..0f6514d9465c --- /dev/null +++ b/tests/format/js/binary-expressions/array-and-object.js @@ -0,0 +1,9 @@ +foo = foo || [ + // comment + a, +] + +foo = foo || { + // comment + a, +} diff --git a/tests/format/js/binary-expressions/comment.js b/tests/format/js/binary-expressions/comment.js index b8d21dd0cf33..8845d29d7064 100644 --- a/tests/format/js/binary-expressions/comment.js +++ b/tests/format/js/binary-expressions/comment.js @@ -51,3 +51,15 @@ foo[ b ) ); + +const logical_expression = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ && + /* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb && + // line comment + cccccccccccccccccccccccc; + +const bc = a /* internal before */ || /* internal after */ b; + +a + + /**/ + a.a().a(); diff --git a/tests/format/js/binary-expressions/format.test.js b/tests/format/js/binary-expressions/format.test.js new file mode 100644 index 000000000000..51d943b41ce4 --- /dev/null +++ b/tests/format/js/binary-expressions/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalOperatorPosition: "start", +}); diff --git a/tests/format/js/binary-expressions/in_instanceof.js b/tests/format/js/binary-expressions/in_instanceof.js new file mode 100644 index 000000000000..35e89db9f952 --- /dev/null +++ b/tests/format/js/binary-expressions/in_instanceof.js @@ -0,0 +1,73 @@ +!foo in bar; +(!foo in bar); +!(foo in bar); +(!foo) in bar; + +!foo instanceof Bar; +(!foo instanceof Bar); +!(foo instanceof Bar); +(!foo) instanceof Bar; + +~foo in bar; +(~foo in bar); +~(foo in bar); +(~foo) in bar; + +~foo instanceof Bar; +(~foo instanceof Bar); +~(foo instanceof Bar); +(~foo) instanceof Bar; + ++foo in bar; +(+foo in bar); ++(foo in bar); +(+foo) in bar; + ++foo instanceof Bar; +(+foo instanceof Bar); ++(foo instanceof Bar); +(+foo) instanceof Bar; + +-foo in bar; +(-foo in bar); +-(foo in bar); +(-foo) in bar; + +-foo instanceof Bar; +(-foo instanceof Bar); +-(foo instanceof Bar); +(-foo) instanceof Bar; + +void 0 in bar; +(void 0 in bar); +void (0 in bar); +(void 0) in bar; + +void 0 instanceof bar; +(void 0 instanceof bar); +void (0 instanceof bar); +(void 0) instanceof bar; + +delete 0 in bar; +(delete 0 in bar); +delete (0 in bar); +(delete 0) in bar; + +delete 0 instanceof bar; +(delete 0 instanceof bar); +delete (0 instanceof bar); +(delete 0) instanceof bar; + +typeof 0 in bar; +(typeof 0 in bar); +typeof (0 in bar); +(typeof 0) in bar; + +typeof 0 instanceof bar; +(typeof 0 instanceof bar); +typeof (0 instanceof bar); +(typeof 0) instanceof bar; + +++x instanceof bar; // not ambiguous, because ++(x instanceof bar) is obviously invalid + +!!foo instanceof Bar; diff --git a/tests/format/js/binary-expressions/jsfmt.spec.js b/tests/format/js/binary-expressions/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/binary-expressions/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/binary-expressions/mutiple-comments/17192.js b/tests/format/js/binary-expressions/mutiple-comments/17192.js new file mode 100644 index 000000000000..ff4c91a0963d --- /dev/null +++ b/tests/format/js/binary-expressions/mutiple-comments/17192.js @@ -0,0 +1,12 @@ +ErrorLike = + SerializedProps & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; diff --git a/tests/format/js/binary-expressions/mutiple-comments/__snapshots__/format.test.js.snap b/tests/format/js/binary-expressions/mutiple-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a05e91e85d54 --- /dev/null +++ b/tests/format/js/binary-expressions/mutiple-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,74 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`17192.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +ErrorLike = + SerializedProps & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +=====================================output===================================== +ErrorLike = + SerializedProps + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + & { cause: unknown }; + +ErrorLike = + SerializedProps // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + & { cause: unknown }; + +================================================================================ +`; + +exports[`17192.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +ErrorLike = + SerializedProps & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +=====================================output===================================== +ErrorLike = + SerializedProps & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +================================================================================ +`; diff --git a/tests/format/js/binary-expressions/mutiple-comments/format.test.js b/tests/format/js/binary-expressions/mutiple-comments/format.test.js new file mode 100644 index 000000000000..51d943b41ce4 --- /dev/null +++ b/tests/format/js/binary-expressions/mutiple-comments/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalOperatorPosition: "start", +}); diff --git a/tests/format/js/binary_math/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/binary_math/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/binary_math/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/binary_math/__snapshots__/format.test.js.snap diff --git a/tests/format/js/binary_math/format.test.js b/tests/format/js/binary_math/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/binary_math/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/binary_math/jsfmt.spec.js b/tests/format/js/binary_math/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/binary_math/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap b/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..02da7a260d3f --- /dev/null +++ b/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap @@ -0,0 +1,1021 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`await.js [acorn] format 1`] = ` +"Unexpected token (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: Unexpected token (3:26)" +`; + +exports[`await.js [espree] format 1`] = ` +"Unexpected token : (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: Unexpected token :" +`; + +exports[`await.js [meriyah] format 1`] = ` +"Unexpected token: ':' (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: [3:26-3:27]: Unexpected token: ':'" +`; + +exports[`await.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 |" +`; + +exports[`await.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: Unexpected token (3:26)" +`; + +exports[`await.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: Unexpected token :" +`; + +exports[`await.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 | +Cause: [3:26-3:27]: Unexpected token: ':'" +`; + +exports[`await.js - {"semi":false} [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27) + 1 | const doBothThings = async () => { + 2 | const request = doAsyncThing(); +> 3 | return (await request)::doSyncThing(); + | ^ + 4 | }; + 5 |" +`; + +exports[`await.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const doBothThings = async () => { + const request = doAsyncThing(); + return (await request)::doSyncThing(); +}; + +=====================================output===================================== +const doBothThings = async () => { + const request = doAsyncThing() + return (await request)::doSyncThing() +} + +================================================================================ +`; + +exports[`await.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const doBothThings = async () => { + const request = doAsyncThing(); + return (await request)::doSyncThing(); +}; + +=====================================output===================================== +const doBothThings = async () => { + const request = doAsyncThing(); + return (await request)::doSyncThing(); +}; + +================================================================================ +`; + +exports[`bind_parens.js [acorn] format 1`] = ` +"Unexpected token (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: Unexpected token (1:8)" +`; + +exports[`bind_parens.js [espree] format 1`] = ` +"Unexpected token : (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: Unexpected token :" +`; + +exports[`bind_parens.js [meriyah] format 1`] = ` +"Unexpected token: ':' (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: [1:8-1:9]: Unexpected token: ':'" +`; + +exports[`bind_parens.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func();" +`; + +exports[`bind_parens.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: Unexpected token (1:8)" +`; + +exports[`bind_parens.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: Unexpected token :" +`; + +exports[`bind_parens.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func(); +Cause: [1:8-1:9]: Unexpected token: ':'" +`; + +exports[`bind_parens.js - {"semi":false} [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9) +> 1 | (a || b)::c; + | ^ + 2 | a || (b::c); + 3 | ::obj.prop; + 4 | (void 0)::func();" +`; + +exports[`bind_parens.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +(a || b)::c; +a || (b::c); +::obj.prop; +(void 0)::func(); +(+0)::is(-0); +a::(b.c); +a::(b.c()); +a::b.c(); +a::(b.c()()); +a::((b.c())()); +a::(b.c())(); +a::(b.c().d); +a::(c().d.e); +a::(b()); +a::(b::c()); +a::(b()::c); +a::(b().c::d); +a::(b.c::d); +a::(b::c.d); +a::(b.c::d::e); +a::(b::c::d); +a::(b::c::d.e); +a::((b::c::d).e); +a::(void 0); +a::(b.c()::d.e); +a::(b.c::d.e); +a::(b.c::d.e)::f.g; +b.c::d.e; +(b.c::d).e; +(b::c::d).e; +new (a::b)(); +new f(a::b); +f[a::b]; +f[a::b()]; + +=====================================output===================================== +;(a || b)::c +a || b::c +;::obj.prop +;(void 0)::func() +;(+0)::is(-0) +a::b.c +a::(b.c()) +a::b.c() +a::(b.c()()) +a::(b.c()()) +a::(b.c())() +a::(b.c().d) +a::(c().d.e) +a::(b()) +a::(b::c()) +a::(b()::c) +a::(b().c::d) +a::(b.c::d) +a::(b::c.d) +a::(b.c::d::e) +a::(b::c::d) +a::(b::c::d.e) +a::(b::c::d).e +a::(void 0) +a::(b.c()::d.e) +a::(b.c::d.e) +a::(b.c::d.e)::f.g +b.c::d.e +;(b.c::d).e +;(b::c::d).e +new (a::b)() +new f(a::b) +f[a::b] +f[a::b()] + +================================================================================ +`; + +exports[`bind_parens.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a || b)::c; +a || (b::c); +::obj.prop; +(void 0)::func(); +(+0)::is(-0); +a::(b.c); +a::(b.c()); +a::b.c(); +a::(b.c()()); +a::((b.c())()); +a::(b.c())(); +a::(b.c().d); +a::(c().d.e); +a::(b()); +a::(b::c()); +a::(b()::c); +a::(b().c::d); +a::(b.c::d); +a::(b::c.d); +a::(b.c::d::e); +a::(b::c::d); +a::(b::c::d.e); +a::((b::c::d).e); +a::(void 0); +a::(b.c()::d.e); +a::(b.c::d.e); +a::(b.c::d.e)::f.g; +b.c::d.e; +(b.c::d).e; +(b::c::d).e; +new (a::b)(); +new f(a::b); +f[a::b]; +f[a::b()]; + +=====================================output===================================== +(a || b)::c; +a || b::c; +::obj.prop; +(void 0)::func(); +(+0)::is(-0); +a::b.c; +a::(b.c()); +a::b.c(); +a::(b.c()()); +a::(b.c()()); +a::(b.c())(); +a::(b.c().d); +a::(c().d.e); +a::(b()); +a::(b::c()); +a::(b()::c); +a::(b().c::d); +a::(b.c::d); +a::(b::c.d); +a::(b.c::d::e); +a::(b::c::d); +a::(b::c::d.e); +a::(b::c::d).e; +a::(void 0); +a::(b.c()::d.e); +a::(b.c::d.e); +a::(b.c::d.e)::f.g; +b.c::d.e; +(b.c::d).e; +(b::c::d).e; +new (a::b)(); +new f(a::b); +f[a::b]; +f[a::b()]; + +================================================================================ +`; + +exports[`long_name_method.js [acorn] format 1`] = ` +"Unexpected token (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token (3:53)" +`; + +exports[`long_name_method.js [espree] format 1`] = ` +"Unexpected token : (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token :" +`; + +exports[`long_name_method.js [meriyah] format 1`] = ` +"Unexpected token: ':' (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: [3:53-3:54]: Unexpected token: ':'" +`; + +exports[`long_name_method.js [oxc] format 1`] = ` +"Unexpected token (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() {" +`; + +exports[`long_name_method.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token (3:53)" +`; + +exports[`long_name_method.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token :" +`; + +exports[`long_name_method.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: [3:53-3:54]: Unexpected token: ':'" +`; + +exports[`long_name_method.js - {"semi":false} [oxc] format 1`] = ` +"Unexpected token (3:54) + 1 | class X { + 2 | constructor() { +> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + | ^ + 4 | } + 5 | + 6 | testLongNameMethodAndSomethingElseLallala() {" +`; + +exports[`long_name_method.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class X { + constructor() { + this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + } + + testLongNameMethodAndSomethingElseLallala() { + return true; + } +} +=====================================output===================================== +class X { + constructor() { + this.testLongNameMethodAndSomethingElseLallala = + ::this.testLongNameMethodAndSomethingElseLallala + } + + testLongNameMethodAndSomethingElseLallala() { + return true + } +} + +================================================================================ +`; + +exports[`long_name_method.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class X { + constructor() { + this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; + } + + testLongNameMethodAndSomethingElseLallala() { + return true; + } +} +=====================================output===================================== +class X { + constructor() { + this.testLongNameMethodAndSomethingElseLallala = + ::this.testLongNameMethodAndSomethingElseLallala; + } + + testLongNameMethodAndSomethingElseLallala() { + return true; + } +} + +================================================================================ +`; + +exports[`method_chain.js [acorn] format 1`] = ` +"Unexpected token (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: Unexpected token (10:8)" +`; + +exports[`method_chain.js [espree] format 1`] = ` +"Unexpected token : (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: Unexpected token :" +`; + +exports[`method_chain.js [meriyah] format 1`] = ` +"Unexpected token: ':' (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: [10:8-10:9]: Unexpected token: ':'" +`; + +exports[`method_chain.js [oxc] format 1`] = ` +"Unexpected token (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1)" +`; + +exports[`method_chain.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: Unexpected token (10:8)" +`; + +exports[`method_chain.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: Unexpected token :" +`; + +exports[`method_chain.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1) +Cause: [10:8-10:9]: Unexpected token: ':'" +`; + +exports[`method_chain.js - {"semi":false} [oxc] format 1`] = ` +"Unexpected token (10:9) + 8 | function test(observable) { + 9 | return observable +> 10 | ::filter(data => data.someTest) + | ^ + 11 | ::throttle(() => + 12 | interval(10) + 13 | ::take(1)" +`; + +exports[`method_chain.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import {interval} from 'rxjs/observable/interval'; +import {filter} from 'rxjs/operator/filter'; +import {take} from 'rxjs/operator/take'; +import {map} from 'rxjs/operator/map'; +import {throttle} from 'rxjs/operator/throttle'; +import {takeUntil} from 'rxjs/operator/takeUntil'; + +function test(observable) { + return observable + ::filter(data => data.someTest) + ::throttle(() => + interval(10) + ::take(1) + ::takeUntil(observable::filter(data => someOtherTest)) + ) + ::map(someFunction); +} + +=====================================output===================================== +import { interval } from "rxjs/observable/interval" +import { filter } from "rxjs/operator/filter" +import { take } from "rxjs/operator/take" +import { map } from "rxjs/operator/map" +import { throttle } from "rxjs/operator/throttle" +import { takeUntil } from "rxjs/operator/takeUntil" + +function test(observable) { + return observable + ::filter((data) => data.someTest) + ::throttle(() => + interval(10) + ::take(1) + ::takeUntil(observable::filter((data) => someOtherTest)), + ) + ::map(someFunction) +} + +================================================================================ +`; + +exports[`method_chain.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import {interval} from 'rxjs/observable/interval'; +import {filter} from 'rxjs/operator/filter'; +import {take} from 'rxjs/operator/take'; +import {map} from 'rxjs/operator/map'; +import {throttle} from 'rxjs/operator/throttle'; +import {takeUntil} from 'rxjs/operator/takeUntil'; + +function test(observable) { + return observable + ::filter(data => data.someTest) + ::throttle(() => + interval(10) + ::take(1) + ::takeUntil(observable::filter(data => someOtherTest)) + ) + ::map(someFunction); +} + +=====================================output===================================== +import { interval } from "rxjs/observable/interval"; +import { filter } from "rxjs/operator/filter"; +import { take } from "rxjs/operator/take"; +import { map } from "rxjs/operator/map"; +import { throttle } from "rxjs/operator/throttle"; +import { takeUntil } from "rxjs/operator/takeUntil"; + +function test(observable) { + return observable + ::filter((data) => data.someTest) + ::throttle(() => + interval(10) + ::take(1) + ::takeUntil(observable::filter((data) => someOtherTest)), + ) + ::map(someFunction); +} + +================================================================================ +`; + +exports[`short_name_method.js [acorn] format 1`] = ` +"Unexpected token (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: Unexpected token (3:23)" +`; + +exports[`short_name_method.js [espree] format 1`] = ` +"Unexpected token : (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: Unexpected token :" +`; + +exports[`short_name_method.js [meriyah] format 1`] = ` +"Unexpected token: ':' (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: [3:23-3:24]: Unexpected token: ':'" +`; + +exports[`short_name_method.js [oxc] format 1`] = ` +"Unexpected token (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() {" +`; + +exports[`short_name_method.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: Unexpected token (3:23)" +`; + +exports[`short_name_method.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: Unexpected token :" +`; + +exports[`short_name_method.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() { +Cause: [3:23-3:24]: Unexpected token: ':'" +`; + +exports[`short_name_method.js - {"semi":false} [oxc] format 1`] = ` +"Unexpected token (3:24) + 1 | class X { + 2 | constructor() { +> 3 | this.shortMethod = ::this.shortMethod; + | ^ + 4 | } + 5 | + 6 | shortMethod() {" +`; + +exports[`short_name_method.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class X { + constructor() { + this.shortMethod = ::this.shortMethod; + } + + shortMethod() { + return true; + } +} +=====================================output===================================== +class X { + constructor() { + this.shortMethod = ::this.shortMethod + } + + shortMethod() { + return true + } +} + +================================================================================ +`; + +exports[`short_name_method.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class X { + constructor() { + this.shortMethod = ::this.shortMethod; + } + + shortMethod() { + return true; + } +} +=====================================output===================================== +class X { + constructor() { + this.shortMethod = ::this.shortMethod; + } + + shortMethod() { + return true; + } +} + +================================================================================ +`; + +exports[`unary.js [acorn] format 1`] = ` +"Unexpected token (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: Unexpected token (1:2)" +`; + +exports[`unary.js [espree] format 1`] = ` +"Unexpected token : (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: Unexpected token :" +`; + +exports[`unary.js [meriyah] format 1`] = ` +"Unexpected token: ':' (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: [1:2-1:3]: Unexpected token: ':'" +`; + +exports[`unary.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !(" +`; + +exports[`unary.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: Unexpected token (1:2)" +`; + +exports[`unary.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: Unexpected token :" +`; + +exports[`unary.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !( +Cause: [1:2-1:3]: Unexpected token: ':'" +`; + +exports[`unary.js - {"semi":false} [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3) +> 1 | !x::y; + | ^ + 2 | !(x::y /* foo */); + 3 | !(/* foo */ x::y); + 4 | !(" +`; + +exports[`unary.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +!x::y; +!(x::y /* foo */); +!(/* foo */ x::y); +!( + /* foo */ + x::y +); +!( + x::y + /* foo */ +); +!( + x::y // foo +); + +=====================================output===================================== +!x::y +!(x::y /* foo */) +!(/* foo */ x::y) +!( + /* foo */ + x::y +) +!( + x::y + /* foo */ +) +!( + x::y // foo +) + +================================================================================ +`; + +exports[`unary.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +!x::y; +!(x::y /* foo */); +!(/* foo */ x::y); +!( + /* foo */ + x::y +); +!( + x::y + /* foo */ +); +!( + x::y // foo +); + +=====================================output===================================== +!x::y; +!(x::y /* foo */); +!(/* foo */ x::y); +!( + /* foo */ + x::y +); +!( + x::y + /* foo */ +); +!( + x::y // foo +); + +================================================================================ +`; diff --git a/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 35e2c9e8d260..000000000000 --- a/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,863 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`await.js [acorn] format 1`] = ` -"Unexpected token (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js [espree] format 1`] = ` -"Unexpected token : (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js [meriyah] format 1`] = ` -"Unexpected token: ':' (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (3:27) - 1 | const doBothThings = async () => { - 2 | const request = doAsyncThing(); -> 3 | return (await request)::doSyncThing(); - | ^ - 4 | }; - 5 |" -`; - -exports[`await.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const doBothThings = async () => { - const request = doAsyncThing(); - return (await request)::doSyncThing(); -}; - -=====================================output===================================== -const doBothThings = async () => { - const request = doAsyncThing() - return (await request)::doSyncThing() -} - -================================================================================ -`; - -exports[`await.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const doBothThings = async () => { - const request = doAsyncThing(); - return (await request)::doSyncThing(); -}; - -=====================================output===================================== -const doBothThings = async () => { - const request = doAsyncThing(); - return (await request)::doSyncThing(); -}; - -================================================================================ -`; - -exports[`bind_parens.js [acorn] format 1`] = ` -"Unexpected token (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js [espree] format 1`] = ` -"Unexpected token : (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js [meriyah] format 1`] = ` -"Unexpected token: ':' (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (1:9) -> 1 | (a || b)::c; - | ^ - 2 | a || (b::c); - 3 | ::obj.prop; - 4 | (void 0)::func();" -`; - -exports[`bind_parens.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -(a || b)::c; -a || (b::c); -::obj.prop; -(void 0)::func(); -(+0)::is(-0); -a::(b.c); -a::(b.c()); -a::b.c(); -a::(b.c()()); -a::((b.c())()); -a::(b.c())(); -a::(b.c().d); -a::(c().d.e); -a::(b()); -a::(b::c()); -a::(b()::c); -a::(b().c::d); -a::(b.c::d); -a::(b::c.d); -a::(b.c::d::e); -a::(b::c::d); -a::(b::c::d.e); -a::((b::c::d).e); -a::(void 0); -a::(b.c()::d.e); -a::(b.c::d.e); -a::(b.c::d.e)::f.g; -b.c::d.e; -(b.c::d).e; -(b::c::d).e; -new (a::b)(); -new f(a::b); -f[a::b]; -f[a::b()]; - -=====================================output===================================== -;(a || b)::c -a || b::c -;::obj.prop -;(void 0)::func() -;(+0)::is(-0) -a::b.c -a::(b.c()) -a::b.c() -a::(b.c()()) -a::(b.c()()) -a::(b.c())() -a::(b.c().d) -a::(c().d.e) -a::(b()) -a::(b::c()) -a::(b()::c) -a::(b().c::d) -a::(b.c::d) -a::(b::c.d) -a::(b.c::d::e) -a::(b::c::d) -a::(b::c::d.e) -a::(b::c::d).e -a::(void 0) -a::(b.c()::d.e) -a::(b.c::d.e) -a::(b.c::d.e)::f.g -b.c::d.e -;(b.c::d).e -;(b::c::d).e -new (a::b)() -new f(a::b) -f[a::b] -f[a::b()] - -================================================================================ -`; - -exports[`bind_parens.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a || b)::c; -a || (b::c); -::obj.prop; -(void 0)::func(); -(+0)::is(-0); -a::(b.c); -a::(b.c()); -a::b.c(); -a::(b.c()()); -a::((b.c())()); -a::(b.c())(); -a::(b.c().d); -a::(c().d.e); -a::(b()); -a::(b::c()); -a::(b()::c); -a::(b().c::d); -a::(b.c::d); -a::(b::c.d); -a::(b.c::d::e); -a::(b::c::d); -a::(b::c::d.e); -a::((b::c::d).e); -a::(void 0); -a::(b.c()::d.e); -a::(b.c::d.e); -a::(b.c::d.e)::f.g; -b.c::d.e; -(b.c::d).e; -(b::c::d).e; -new (a::b)(); -new f(a::b); -f[a::b]; -f[a::b()]; - -=====================================output===================================== -(a || b)::c; -a || b::c; -::obj.prop; -(void 0)::func(); -(+0)::is(-0); -a::b.c; -a::(b.c()); -a::b.c(); -a::(b.c()()); -a::(b.c()()); -a::(b.c())(); -a::(b.c().d); -a::(c().d.e); -a::(b()); -a::(b::c()); -a::(b()::c); -a::(b().c::d); -a::(b.c::d); -a::(b::c.d); -a::(b.c::d::e); -a::(b::c::d); -a::(b::c::d.e); -a::(b::c::d).e; -a::(void 0); -a::(b.c()::d.e); -a::(b.c::d.e); -a::(b.c::d.e)::f.g; -b.c::d.e; -(b.c::d).e; -(b::c::d).e; -new (a::b)(); -new f(a::b); -f[a::b]; -f[a::b()]; - -================================================================================ -`; - -exports[`long_name_method.js [acorn] format 1`] = ` -"Unexpected token (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js [espree] format 1`] = ` -"Unexpected token : (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js [meriyah] format 1`] = ` -"Unexpected token: ':' (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (3:54) - 1 | class X { - 2 | constructor() { -> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - | ^ - 4 | } - 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" -`; - -exports[`long_name_method.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class X { - constructor() { - this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - } - - testLongNameMethodAndSomethingElseLallala() { - return true; - } -} -=====================================output===================================== -class X { - constructor() { - this.testLongNameMethodAndSomethingElseLallala = - ::this.testLongNameMethodAndSomethingElseLallala - } - - testLongNameMethodAndSomethingElseLallala() { - return true - } -} - -================================================================================ -`; - -exports[`long_name_method.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class X { - constructor() { - this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala; - } - - testLongNameMethodAndSomethingElseLallala() { - return true; - } -} -=====================================output===================================== -class X { - constructor() { - this.testLongNameMethodAndSomethingElseLallala = - ::this.testLongNameMethodAndSomethingElseLallala; - } - - testLongNameMethodAndSomethingElseLallala() { - return true; - } -} - -================================================================================ -`; - -exports[`method_chain.js [acorn] format 1`] = ` -"Unexpected token (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js [espree] format 1`] = ` -"Unexpected token : (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js [meriyah] format 1`] = ` -"Unexpected token: ':' (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (10:9) - 8 | function test(observable) { - 9 | return observable -> 10 | ::filter(data => data.someTest) - | ^ - 11 | ::throttle(() => - 12 | interval(10) - 13 | ::take(1)" -`; - -exports[`method_chain.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import {interval} from 'rxjs/observable/interval'; -import {filter} from 'rxjs/operator/filter'; -import {take} from 'rxjs/operator/take'; -import {map} from 'rxjs/operator/map'; -import {throttle} from 'rxjs/operator/throttle'; -import {takeUntil} from 'rxjs/operator/takeUntil'; - -function test(observable) { - return observable - ::filter(data => data.someTest) - ::throttle(() => - interval(10) - ::take(1) - ::takeUntil(observable::filter(data => someOtherTest)) - ) - ::map(someFunction); -} - -=====================================output===================================== -import { interval } from "rxjs/observable/interval" -import { filter } from "rxjs/operator/filter" -import { take } from "rxjs/operator/take" -import { map } from "rxjs/operator/map" -import { throttle } from "rxjs/operator/throttle" -import { takeUntil } from "rxjs/operator/takeUntil" - -function test(observable) { - return observable - ::filter((data) => data.someTest) - ::throttle(() => - interval(10) - ::take(1) - ::takeUntil(observable::filter((data) => someOtherTest)) - ) - ::map(someFunction) -} - -================================================================================ -`; - -exports[`method_chain.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import {interval} from 'rxjs/observable/interval'; -import {filter} from 'rxjs/operator/filter'; -import {take} from 'rxjs/operator/take'; -import {map} from 'rxjs/operator/map'; -import {throttle} from 'rxjs/operator/throttle'; -import {takeUntil} from 'rxjs/operator/takeUntil'; - -function test(observable) { - return observable - ::filter(data => data.someTest) - ::throttle(() => - interval(10) - ::take(1) - ::takeUntil(observable::filter(data => someOtherTest)) - ) - ::map(someFunction); -} - -=====================================output===================================== -import { interval } from "rxjs/observable/interval"; -import { filter } from "rxjs/operator/filter"; -import { take } from "rxjs/operator/take"; -import { map } from "rxjs/operator/map"; -import { throttle } from "rxjs/operator/throttle"; -import { takeUntil } from "rxjs/operator/takeUntil"; - -function test(observable) { - return observable - ::filter((data) => data.someTest) - ::throttle(() => - interval(10) - ::take(1) - ::takeUntil(observable::filter((data) => someOtherTest)) - ) - ::map(someFunction); -} - -================================================================================ -`; - -exports[`short_name_method.js [acorn] format 1`] = ` -"Unexpected token (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js [espree] format 1`] = ` -"Unexpected token : (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js [meriyah] format 1`] = ` -"Unexpected token: ':' (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (3:24) - 1 | class X { - 2 | constructor() { -> 3 | this.shortMethod = ::this.shortMethod; - | ^ - 4 | } - 5 | - 6 | shortMethod() {" -`; - -exports[`short_name_method.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class X { - constructor() { - this.shortMethod = ::this.shortMethod; - } - - shortMethod() { - return true; - } -} -=====================================output===================================== -class X { - constructor() { - this.shortMethod = ::this.shortMethod - } - - shortMethod() { - return true - } -} - -================================================================================ -`; - -exports[`short_name_method.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class X { - constructor() { - this.shortMethod = ::this.shortMethod; - } - - shortMethod() { - return true; - } -} -=====================================output===================================== -class X { - constructor() { - this.shortMethod = ::this.shortMethod; - } - - shortMethod() { - return true; - } -} - -================================================================================ -`; - -exports[`unary.js [acorn] format 1`] = ` -"Unexpected token (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js [espree] format 1`] = ` -"Unexpected token : (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js [meriyah] format 1`] = ` -"Unexpected token: ':' (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (1:3) -> 1 | !x::y; - | ^ - 2 | !(x::y /* foo */); - 3 | !(/* foo */ x::y); - 4 | !(" -`; - -exports[`unary.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -!x::y; -!(x::y /* foo */); -!(/* foo */ x::y); -!( - /* foo */ - x::y -); -!( - x::y - /* foo */ -); -!( - x::y // foo -); - -=====================================output===================================== -!x::y -!(x::y /* foo */) -!(/* foo */ x::y) -!( - /* foo */ - x::y -) -!( - x::y - /* foo */ -) -!( - x::y // foo -) - -================================================================================ -`; - -exports[`unary.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -!x::y; -!(x::y /* foo */); -!(/* foo */ x::y); -!( - /* foo */ - x::y -); -!( - x::y - /* foo */ -); -!( - x::y // foo -); - -=====================================output===================================== -!x::y; -!(x::y /* foo */); -!(/* foo */ x::y); -!( - /* foo */ - x::y -); -!( - x::y - /* foo */ -); -!( - x::y // foo -); - -================================================================================ -`; diff --git a/tests/format/js/bind-expressions/format.test.js b/tests/format/js/bind-expressions/format.test.js new file mode 100644 index 000000000000..ab36700a0097 --- /dev/null +++ b/tests/format/js/bind-expressions/format.test.js @@ -0,0 +1,10 @@ +const errors = { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, +}; + +runFormatTest(import.meta, ["babel"], { errors }); +runFormatTest(import.meta, ["babel"], { semi: false, errors }); diff --git a/tests/format/js/bind-expressions/jsfmt.spec.js b/tests/format/js/bind-expressions/jsfmt.spec.js deleted file mode 100644 index 7b852963ceb1..000000000000 --- a/tests/format/js/bind-expressions/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); -run_spec(__dirname, ["babel"], { - semi: false, - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/bom/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/bom/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/bom/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/bom/__snapshots__/format.test.js.snap diff --git a/tests/format/js/bom/format.test.js b/tests/format/js/bom/format.test.js new file mode 100644 index 000000000000..d0d747525c1e --- /dev/null +++ b/tests/format/js/bom/format.test.js @@ -0,0 +1,18 @@ +import fs from "node:fs"; +const fixtureDirectory = new URL("../eol/", import.meta.url); + +const snippets = fs + .readdirSync(fixtureDirectory) + .filter( + (fileName) => fileName !== "__snapshots__" && fileName !== "format.test.js", + ) + .map((fileName) => { + const file = new URL(fileName, fixtureDirectory); + const code = "\uFEFF" + fs.readFileSync(file, "utf8"); + return { + name: fileName, + code, + }; + }); + +runFormatTest({ importMeta: import.meta, snippets }, ["babel"]); diff --git a/tests/format/js/bom/jsfmt.spec.js b/tests/format/js/bom/jsfmt.spec.js deleted file mode 100644 index 851064803356..000000000000 --- a/tests/format/js/bom/jsfmt.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const fixtureDirectory = path.join(__dirname, "../eol"); - -const snippets = fs - .readdirSync(fixtureDirectory) - .filter( - (fileName) => fileName !== "__snapshots__" && fileName !== "jsfmt.spec.js" - ) - .map((fileName) => { - const file = path.join(fixtureDirectory, fileName); - const code = "\uFEFF" + fs.readFileSync(file, "utf8"); - return { - name: fileName, - code, - }; - }); - -run_spec({ dirname: __dirname, snippets }, ["babel"]); diff --git a/tests/format/js/bracket-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/bracket-spacing/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/bracket-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/bracket-spacing/__snapshots__/format.test.js.snap diff --git a/tests/format/js/bracket-spacing/format.test.js b/tests/format/js/bracket-spacing/format.test.js new file mode 100644 index 000000000000..118654d2d9ea --- /dev/null +++ b/tests/format/js/bracket-spacing/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + bracketSpacing: false, +}); diff --git a/tests/format/js/bracket-spacing/jsfmt.spec.js b/tests/format/js/bracket-spacing/jsfmt.spec.js deleted file mode 100644 index df3db0cc4bb6..000000000000 --- a/tests/format/js/bracket-spacing/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { bracketSpacing: false }); diff --git a/tests/format/js/break-calls/__snapshots__/format.test.js.snap b/tests/format/js/break-calls/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..24f8445c8d41 --- /dev/null +++ b/tests/format/js/break-calls/__snapshots__/format.test.js.snap @@ -0,0 +1,433 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +h(f(g(() => { + a +}))) + +deepCopyAndAsyncMapLeavesA( + { source: sourceValue, destination: destination[sourceKey] }, + { valueMapper, overwriteExistingKeys } +) + +deepCopyAndAsyncMapLeavesB( + 1337, + { source: sourceValue, destination: destination[sourceKey] }, + { valueMapper, overwriteExistingKeys } +) + +deepCopyAndAsyncMapLeavesC( + { source: sourceValue, destination: destination[sourceKey] }, + 1337, + { valueMapper, overwriteExistingKeys } +) + +function someFunction(url) { + return get(url) + .then( + json => dispatch(success(json)), + error => dispatch(failed(error)) + ); +} + +const mapChargeItems = fp.flow( + l => l < 10 ? l: 1, + l => Immutable.Range(l).toMap() +); + +expect(new LongLongLongLongLongRange([0, 0], [0, 0])).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0])); + +["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce( + (allColors, color) => { + return allColors.concat(color); + }, + [] +); + + +=====================================output===================================== +h( + f( + g(() => { + a; + }), + ), +); + +deepCopyAndAsyncMapLeavesA( + { source: sourceValue, destination: destination[sourceKey] }, + { valueMapper, overwriteExistingKeys }, +); + +deepCopyAndAsyncMapLeavesB( + 1337, + { source: sourceValue, destination: destination[sourceKey] }, + { valueMapper, overwriteExistingKeys }, +); + +deepCopyAndAsyncMapLeavesC( + { source: sourceValue, destination: destination[sourceKey] }, + 1337, + { valueMapper, overwriteExistingKeys }, +); + +function someFunction(url) { + return get(url).then( + (json) => dispatch(success(json)), + (error) => dispatch(failed(error)), + ); +} + +const mapChargeItems = fp.flow( + (l) => (l < 10 ? l : 1), + (l) => Immutable.Range(l).toMap(), +); + +expect( + new LongLongLongLongLongRange([0, 0], [0, 0]), +).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0])); + +["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce( + (allColors, color) => { + return allColors.concat(color); + }, + [], +); + +================================================================================ +`; + +exports[`parent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1 + }, +); + +=====================================output===================================== +runtimeAgent.getProperties( + objectId, + false, // ownProperties + false, // accessorPropertiesOnly + false, // generatePreview + (error, properties, internalProperties) => { + return 1; + }, +); + +================================================================================ +`; + +exports[`react.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function helloWorld() { + useEffect(() => { + // do something + }, [props.value]) + useEffect(() => { + // do something + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]) +} + +function helloWorldWithReact() { + React.useEffect(() => { + // do something + }, [props.value]) + React.useEffect(() => { + // do something + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]) +} + +function MyComponent(props) { + useEffect( + () => { + console.log("some code", props.foo); + }, + + // We need to disable the eslint warning here, + // because of some complicated reason. + // eslint-disable line react-hooks/exhaustive-deps + [] + ); + + return null; +} + +function Comp1() { + const { firstName, lastName } = useMemo( + () => parseFullName(fullName), + [fullName], + ); +} + +function Comp2() { + const { firstName, lastName } = useMemo( + () => func(), + [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value] + ) +} + +function Comp3() { + const { firstName, lastName } = useMemo( + (aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk) => func(aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk), + [foo, bar, baz] + ); +} + +function Comp4() { + const { firstName, lastName } = useMemo( + () => foo && bar && baz || baz || foo && baz(foo) + bar(foo) + foo && bar && baz || baz || foo && baz(foo) + bar(foo), + [foo, bar, baz] + ) +} + +function Comp5() { + const { firstName, lastName } = useMemo(() => func(), [foo]); +} + +function Component1() { + useImperativeHandle(ref, () => { + /* Function body */ + }, []); + useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]); +} + +function Component2() { + React.useImperativeHandle(ref, () => { + /* Function body */ + }, []); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]); +} + +function Component3() { + useImperativeHandle( + ref, + () => { + /* Function body */ + }, + [], + ); +} + +=====================================output===================================== +function helloWorld() { + useEffect(() => { + // do something + }, [props.value]); + useEffect(() => { + // do something + }, [ + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + ]); +} + +function helloWorldWithReact() { + React.useEffect(() => { + // do something + }, [props.value]); + React.useEffect(() => { + // do something + }, [ + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + ]); +} + +function MyComponent(props) { + useEffect( + () => { + console.log("some code", props.foo); + }, + + // We need to disable the eslint warning here, + // because of some complicated reason. + // eslint-disable line react-hooks/exhaustive-deps + [], + ); + + return null; +} + +function Comp1() { + const { firstName, lastName } = useMemo( + () => parseFullName(fullName), + [fullName], + ); +} + +function Comp2() { + const { firstName, lastName } = useMemo( + () => func(), + [ + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + ], + ); +} + +function Comp3() { + const { firstName, lastName } = useMemo( + (aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk) => + func(aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk), + [foo, bar, baz], + ); +} + +function Comp4() { + const { firstName, lastName } = useMemo( + () => + (foo && bar && baz) || + baz || + (foo && baz(foo) + bar(foo) + foo && bar && baz) || + baz || + (foo && baz(foo) + bar(foo)), + [foo, bar, baz], + ); +} + +function Comp5() { + const { firstName, lastName } = useMemo(() => func(), [foo]); +} + +function Component1() { + useImperativeHandle(ref, () => { + /* Function body */ + }, []); + useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + useImperativeHandle(ref, () => { + /* Function body */ + }, [ + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + ]); +} + +function Component2() { + React.useImperativeHandle(ref, () => { + /* Function body */ + }, []); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [ + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + props.value, + ]); +} + +function Component3() { + useImperativeHandle(ref, () => { + /* Function body */ + }, []); +} + +================================================================================ +`; + +exports[`reduce.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const [ first1 ] = array.reduce( + () => [accumulator, element, accumulator, element], + [fullName] +); + +const [ first2 ] = array.reduce( + (accumulator, element, ) => [accumulator, element], + [fullName] +); + +=====================================output===================================== +const [first1] = array.reduce( + () => [accumulator, element, accumulator, element], + [fullName], +); + +const [first2] = array.reduce( + (accumulator, element) => [accumulator, element], + [fullName], +); + +================================================================================ +`; diff --git a/tests/format/js/break-calls/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/break-calls/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b96303db48be..000000000000 --- a/tests/format/js/break-calls/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,345 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -h(f(g(() => { - a -}))) - -deepCopyAndAsyncMapLeavesA( - { source: sourceValue, destination: destination[sourceKey] }, - { valueMapper, overwriteExistingKeys } -) - -deepCopyAndAsyncMapLeavesB( - 1337, - { source: sourceValue, destination: destination[sourceKey] }, - { valueMapper, overwriteExistingKeys } -) - -deepCopyAndAsyncMapLeavesC( - { source: sourceValue, destination: destination[sourceKey] }, - 1337, - { valueMapper, overwriteExistingKeys } -) - -function someFunction(url) { - return get(url) - .then( - json => dispatch(success(json)), - error => dispatch(failed(error)) - ); -} - -const mapChargeItems = fp.flow( - l => l < 10 ? l: 1, - l => Immutable.Range(l).toMap() -); - -expect(new LongLongLongLongLongRange([0, 0], [0, 0])).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0])); - -["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce( - (allColors, color) => { - return allColors.concat(color); - }, - [] -); - - -=====================================output===================================== -h( - f( - g(() => { - a; - }) - ) -); - -deepCopyAndAsyncMapLeavesA( - { source: sourceValue, destination: destination[sourceKey] }, - { valueMapper, overwriteExistingKeys } -); - -deepCopyAndAsyncMapLeavesB( - 1337, - { source: sourceValue, destination: destination[sourceKey] }, - { valueMapper, overwriteExistingKeys } -); - -deepCopyAndAsyncMapLeavesC( - { source: sourceValue, destination: destination[sourceKey] }, - 1337, - { valueMapper, overwriteExistingKeys } -); - -function someFunction(url) { - return get(url).then( - (json) => dispatch(success(json)), - (error) => dispatch(failed(error)) - ); -} - -const mapChargeItems = fp.flow( - (l) => (l < 10 ? l : 1), - (l) => Immutable.Range(l).toMap() -); - -expect( - new LongLongLongLongLongRange([0, 0], [0, 0]) -).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0])); - -["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce( - (allColors, color) => { - return allColors.concat(color); - }, - [] -); - -================================================================================ -`; - -exports[`parent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1 - }, -); - -=====================================output===================================== -runtimeAgent.getProperties( - objectId, - false, // ownProperties - false, // accessorPropertiesOnly - false, // generatePreview - (error, properties, internalProperties) => { - return 1; - } -); - -================================================================================ -`; - -exports[`react.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function helloWorld() { - useEffect(() => { - // do something - }, [props.value]) - useEffect(() => { - // do something - }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]) -} - -function helloWorldWithReact() { - React.useEffect(() => { - // do something - }, [props.value]) - React.useEffect(() => { - // do something - }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]) -} - -function MyComponent(props) { - useEffect( - () => { - console.log("some code", props.foo); - }, - - // We need to disable the eslint warning here, - // because of some complicated reason. - // eslint-disable line react-hooks/exhaustive-deps - [] - ); - - return null; -} - -function Comp1() { - const { firstName, lastName } = useMemo( - () => parseFullName(fullName), - [fullName], - ); -} - -function Comp2() { - const { firstName, lastName } = useMemo( - () => func(), - [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value] - ) -} - -function Comp3() { - const { firstName, lastName } = useMemo( - (aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk) => func(aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk), - [foo, bar, baz] - ); -} - -function Comp4() { - const { firstName, lastName } = useMemo( - () => foo && bar && baz || baz || foo && baz(foo) + bar(foo) + foo && bar && baz || baz || foo && baz(foo) + bar(foo), - [foo, bar, baz] - ) -} - -function Comp5() { - const { firstName, lastName } = useMemo(() => func(), [foo]); -} - -=====================================output===================================== -function helloWorld() { - useEffect(() => { - // do something - }, [props.value]); - useEffect(() => { - // do something - }, [ - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - ]); -} - -function helloWorldWithReact() { - React.useEffect(() => { - // do something - }, [props.value]); - React.useEffect(() => { - // do something - }, [ - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - ]); -} - -function MyComponent(props) { - useEffect( - () => { - console.log("some code", props.foo); - }, - - // We need to disable the eslint warning here, - // because of some complicated reason. - // eslint-disable line react-hooks/exhaustive-deps - [] - ); - - return null; -} - -function Comp1() { - const { firstName, lastName } = useMemo( - () => parseFullName(fullName), - [fullName] - ); -} - -function Comp2() { - const { firstName, lastName } = useMemo( - () => func(), - [ - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - props.value, - ] - ); -} - -function Comp3() { - const { firstName, lastName } = useMemo( - (aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk) => - func(aaa, bbb, ccc, ddd, eee, fff, ggg, hhh, iii, jjj, kkk), - [foo, bar, baz] - ); -} - -function Comp4() { - const { firstName, lastName } = useMemo( - () => - (foo && bar && baz) || - baz || - (foo && baz(foo) + bar(foo) + foo && bar && baz) || - baz || - (foo && baz(foo) + bar(foo)), - [foo, bar, baz] - ); -} - -function Comp5() { - const { firstName, lastName } = useMemo(() => func(), [foo]); -} - -================================================================================ -`; - -exports[`reduce.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const [ first1 ] = array.reduce( - () => [accumulator, element, accumulator, element], - [fullName] -); - -const [ first2 ] = array.reduce( - (accumulator, element, ) => [accumulator, element], - [fullName] -); - -=====================================output===================================== -const [first1] = array.reduce( - () => [accumulator, element, accumulator, element], - [fullName] -); - -const [first2] = array.reduce( - (accumulator, element) => [accumulator, element], - [fullName] -); - -================================================================================ -`; diff --git a/tests/format/js/break-calls/format.test.js b/tests/format/js/break-calls/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/break-calls/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/break-calls/jsfmt.spec.js b/tests/format/js/break-calls/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/break-calls/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/break-calls/react.js b/tests/format/js/break-calls/react.js index 134574291163..bbf8f18f8c42 100644 --- a/tests/format/js/break-calls/react.js +++ b/tests/format/js/break-calls/react.js @@ -62,3 +62,37 @@ function Comp4() { function Comp5() { const { firstName, lastName } = useMemo(() => func(), [foo]); } + +function Component1() { + useImperativeHandle(ref, () => { + /* Function body */ + }, []); + useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]); +} + +function Component2() { + React.useImperativeHandle(ref, () => { + /* Function body */ + }, []); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value]); + React.useImperativeHandle(ref, () => { + /* Function body */ + }, [props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value, props.value]); +} + +function Component3() { + useImperativeHandle( + ref, + () => { + /* Function body */ + }, + [], + ); +} diff --git a/tests/format/js/call/first-argument-expansion/__snapshots__/format.test.js.snap b/tests/format/js/call/first-argument-expansion/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7393dd7ec18d --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/__snapshots__/format.test.js.snap @@ -0,0 +1,554 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`expression-2nd-arg.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +call( + function() { + return 1; + }, + 200_000_000_000n * askTrovenaBeenaDependsRowans +); + +call( + function() { + return 1; + }, + 200_000_000_000n * askTrovenaBeenaDependsRowans / glimseGlyphsHazardNoopsTieTie +); + +call( + function() { + return 1; + }, + askTrovenaBeenaDependsRowans = glimseGlyphsHazardNoopsTieTie = 200_000_000_000n +); + +=====================================output===================================== +call(function () { + return 1; +}, 200_000_000_000n * askTrovenaBeenaDependsRowans); + +call( + function () { + return 1; + }, + (200_000_000_000n * askTrovenaBeenaDependsRowans) / + glimseGlyphsHazardNoopsTieTie, +); + +call( + function () { + return 1; + }, + (askTrovenaBeenaDependsRowans = glimseGlyphsHazardNoopsTieTie = + 200_000_000_000n), +); + +================================================================================ +`; + +exports[`issue-2456.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f(x => { y }, err.message.includes("asd") && err.message.includes("id") && + err.message.includes('"1"') && err.message.includes("Model") && + err.message.includes("/id") && err.message.includes("identifier(number)") +) + +=====================================output===================================== +f( + (x) => { + y; + }, + err.message.includes("asd") && + err.message.includes("id") && + err.message.includes('"1"') && + err.message.includes("Model") && + err.message.includes("/id") && + err.message.includes("identifier(number)"), +); + +================================================================================ +`; + +exports[`issue-4401.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export function test() { + setTimeout( + () => { console.warn({}, 'Lambda approaching timeout.') }, + Math.max(context.getRemainingTimeInMillis() - WARN_TIMEOUT_MS, 0), + ); +} + +=====================================output===================================== +export function test() { + setTimeout( + () => { + console.warn({}, "Lambda approaching timeout."); + }, + Math.max(context.getRemainingTimeInMillis() - WARN_TIMEOUT_MS, 0), + ); +} + +================================================================================ +`; + +exports[`issue-5172.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +call( + function() { + return 1; + }, + $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? 'test' +); + +call(function () { + return 1; +}, $var || ($var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? "test")); + +=====================================output===================================== +call( + function () { + return 1; + }, + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + "test", +); + +call( + function () { + return 1; + }, + $var || + ($var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? "test"), +); + +================================================================================ +`; + +exports[`issue-12892.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +setTimeout(() => { + console.log('test'); +}, someFunctionCall( + veryLongParameterName1, + veryLongParameterName2, + veryLongParameterName3, + veryLongParameterName4, +)); + +=====================================output===================================== +setTimeout( + () => { + console.log("test"); + }, + someFunctionCall( + veryLongParameterName1, + veryLongParameterName2, + veryLongParameterName3, + veryLongParameterName4, + ), +); + +================================================================================ +`; + +exports[`issue-13237.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* version 1 */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); + +/* version 2 (only difference is that \`//\`) */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, // + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); + +=====================================output===================================== +/* version 1 */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); + +/* version 2 (only difference is that \`//\`) */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, // + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); + +================================================================================ +`; + +exports[`issue-14454.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f(() => {}, scroller.qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq) + +=====================================output===================================== +f( + () => {}, + scroller.qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq, +); + +================================================================================ +`; + +exports[`jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<elem onFlip={wrap(function () {flop('!'); }, arg2)}>content</elem> + +=====================================output===================================== +<elem + onFlip={wrap(function () { + flop("!"); + }, arg2)} +> + content +</elem>; + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +setTimeout(function() { + thing(); +}, 500); + +["a","b","c"].reduce(function(item, thing) { + return thing + " " + item; +}, "letters:") + +func(() => { + thing(); +}, identifier); + +func(function() { + thing(); +}, this.props.timeout * 1000); + +func((that) => { + thing(); +}, this.props.getTimeout()); + +func(() => { + thing(); +}, true); + +func(() => { + thing(); +}, null); + +func(() => { + thing(); +}, undefined); + +func(() => { + thing(); +}, /regex.*?/); + +func(() => { + thing(); +}, 1 ? 2 : 3); + +func(function() { + return thing() +}, 1 ? 2 : 3); + +func(() => { + thing(); +}, something() ? someOtherThing() : somethingElse(true, 0)); + + +func(() => { + thing(); +}, something(longArgumentName, anotherLongArgumentName) ? someOtherThing() : somethingElse(true, 0)); + + +func(() => { + thing(); +}, something(longArgumentName, anotherLongArgumentName, anotherLongArgumentName, anotherLongArgumentName) ? someOtherThing() : somethingElse(true, 0)); + +compose((a) => { + return a.thing; +}, b => b * b); + +somthing.reduce(function(item, thing) { + return thing.blah = item; +}, {}) + +somthing.reduce(function(item, thing) { + return thing.push(item); +}, []) + +reallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongMethod((f, g, h) => { + return f.pop(); +}, true); + +// Don't do the rest of these + +func(function() { + thing(); +}, true, false); + +func(() => { + thing(); +}, {yes: true, cats: 5}); + +compose((a) => { + return a.thing; +}, b => { + return b + ""; +}); + +compose((a) => { + return a.thing; +}, b => [1, 2, 3, 4, 5]); + +renderThing(a => + <div>Content. So much to say. Oh my. Are we done yet?</div> +,args); + +setTimeout( + // Something + function() { + thing(); + }, + 500 +); + +setTimeout(/* blip */ function() { + thing(); +}, 500); + +func((args) => { + execute(args); +}, result => result && console.log("success")) + +=====================================output===================================== +setTimeout(function () { + thing(); +}, 500); + +["a", "b", "c"].reduce(function (item, thing) { + return thing + " " + item; +}, "letters:"); + +func(() => { + thing(); +}, identifier); + +func(function () { + thing(); +}, this.props.timeout * 1000); + +func((that) => { + thing(); +}, this.props.getTimeout()); + +func(() => { + thing(); +}, true); + +func(() => { + thing(); +}, null); + +func(() => { + thing(); +}, undefined); + +func(() => { + thing(); +}, /regex.*?/); + +func( + () => { + thing(); + }, + 1 ? 2 : 3, +); + +func( + function () { + return thing(); + }, + 1 ? 2 : 3, +); + +func( + () => { + thing(); + }, + something() ? someOtherThing() : somethingElse(true, 0), +); + +func( + () => { + thing(); + }, + something(longArgumentName, anotherLongArgumentName) + ? someOtherThing() + : somethingElse(true, 0), +); + +func( + () => { + thing(); + }, + something( + longArgumentName, + anotherLongArgumentName, + anotherLongArgumentName, + anotherLongArgumentName, + ) + ? someOtherThing() + : somethingElse(true, 0), +); + +compose( + (a) => { + return a.thing; + }, + (b) => b * b, +); + +somthing.reduce(function (item, thing) { + return (thing.blah = item); +}, {}); + +somthing.reduce(function (item, thing) { + return thing.push(item); +}, []); + +reallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongMethod( + (f, g, h) => { + return f.pop(); + }, + true, +); + +// Don't do the rest of these + +func( + function () { + thing(); + }, + true, + false, +); + +func( + () => { + thing(); + }, + { yes: true, cats: 5 }, +); + +compose( + (a) => { + return a.thing; + }, + (b) => { + return b + ""; + }, +); + +compose( + (a) => { + return a.thing; + }, + (b) => [1, 2, 3, 4, 5], +); + +renderThing( + (a) => <div>Content. So much to say. Oh my. Are we done yet?</div>, + args, +); + +setTimeout( + // Something + function () { + thing(); + }, + 500, +); + +setTimeout( + /* blip */ function () { + thing(); + }, + 500, +); + +func( + (args) => { + execute(args); + }, + (result) => result && console.log("success"), +); + +================================================================================ +`; diff --git a/tests/format/js/call/first-argument-expansion/expression-2nd-arg.js b/tests/format/js/call/first-argument-expansion/expression-2nd-arg.js new file mode 100644 index 000000000000..7b45856a28b5 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/expression-2nd-arg.js @@ -0,0 +1,20 @@ +call( + function() { + return 1; + }, + 200_000_000_000n * askTrovenaBeenaDependsRowans +); + +call( + function() { + return 1; + }, + 200_000_000_000n * askTrovenaBeenaDependsRowans / glimseGlyphsHazardNoopsTieTie +); + +call( + function() { + return 1; + }, + askTrovenaBeenaDependsRowans = glimseGlyphsHazardNoopsTieTie = 200_000_000_000n +); diff --git a/tests/format/js/call/first-argument-expansion/format.test.js b/tests/format/js/call/first-argument-expansion/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/call/first-argument-expansion/issue-12892.js b/tests/format/js/call/first-argument-expansion/issue-12892.js new file mode 100644 index 000000000000..61b374de32ab --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-12892.js @@ -0,0 +1,8 @@ +setTimeout(() => { + console.log('test'); +}, someFunctionCall( + veryLongParameterName1, + veryLongParameterName2, + veryLongParameterName3, + veryLongParameterName4, +)); diff --git a/tests/format/js/call/first-argument-expansion/issue-13237.js b/tests/format/js/call/first-argument-expansion/issue-13237.js new file mode 100644 index 000000000000..a2b0664226e5 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-13237.js @@ -0,0 +1,19 @@ +/* version 1 */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); + +/* version 2 (only difference is that `//`) */ + +exportDefaultWhatever(function ( + aaaaaaaaaaaString, // + bbbbbbbbbbbString, + cccccccccccString, +) { + return null; +}, "xyz"); diff --git a/tests/format/js/call/first-argument-expansion/issue-14454.js b/tests/format/js/call/first-argument-expansion/issue-14454.js new file mode 100644 index 000000000000..2afbd7c38372 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-14454.js @@ -0,0 +1 @@ +f(() => {}, scroller.qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq) diff --git a/tests/format/js/call/first-argument-expansion/issue-2456.js b/tests/format/js/call/first-argument-expansion/issue-2456.js new file mode 100644 index 000000000000..7d85a7ff7e24 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-2456.js @@ -0,0 +1,4 @@ +f(x => { y }, err.message.includes("asd") && err.message.includes("id") && + err.message.includes('"1"') && err.message.includes("Model") && + err.message.includes("/id") && err.message.includes("identifier(number)") +) diff --git a/tests/format/js/call/first-argument-expansion/issue-4401.js b/tests/format/js/call/first-argument-expansion/issue-4401.js new file mode 100644 index 000000000000..054c6aedf269 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-4401.js @@ -0,0 +1,6 @@ +export function test() { + setTimeout( + () => { console.warn({}, 'Lambda approaching timeout.') }, + Math.max(context.getRemainingTimeInMillis() - WARN_TIMEOUT_MS, 0), + ); +} diff --git a/tests/format/js/call/first-argument-expansion/issue-5172.js b/tests/format/js/call/first-argument-expansion/issue-5172.js new file mode 100644 index 000000000000..bf3941a81f80 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/issue-5172.js @@ -0,0 +1,10 @@ +call( + function() { + return 1; + }, + $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? 'test' +); + +call(function () { + return 1; +}, $var || ($var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? "test")); diff --git a/tests/format/js/call/first-argument-expansion/jsx.js b/tests/format/js/call/first-argument-expansion/jsx.js new file mode 100644 index 000000000000..4bea0a84f469 --- /dev/null +++ b/tests/format/js/call/first-argument-expansion/jsx.js @@ -0,0 +1 @@ +<elem onFlip={wrap(function () {flop('!'); }, arg2)}>content</elem> diff --git a/tests/format/js/first-argument-expansion/test.js b/tests/format/js/call/first-argument-expansion/test.js similarity index 100% rename from tests/format/js/first-argument-expansion/test.js rename to tests/format/js/call/first-argument-expansion/test.js diff --git a/tests/format/js/call/invalid/__snapshots__/format.test.js.snap b/tests/format/js/call/invalid/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..94d714d58e0b --- /dev/null +++ b/tests/format/js/call/invalid/__snapshots__/format.test.js.snap @@ -0,0 +1,60 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`null-arguments-item.js [__babel_estree] format 1`] = ` +"Unexpected token ','. (1:12) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo("a", + 4 | //1 +Cause: Unexpected token ','. (1:11)" +`; + +exports[`null-arguments-item.js [acorn] format 1`] = ` +"Unexpected token (1:11) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo("a", + 4 | //1 +Cause: Unexpected token (1:10)" +`; + +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 +Cause: Unexpected token ','. (1:11)" +`; + +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 +Cause: Unexpected token ," +`; + +exports[`null-arguments-item.js [meriyah] format 1`] = ` +"Unexpected token: ',' (1:11) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo("a", + 4 | //1 +Cause: [1:10-1:11]: Unexpected token: ','" +`; + +exports[`null-arguments-item.js [oxc] format 1`] = ` +"Unexpected token (1:11) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo("a", + 4 | //1" +`; diff --git a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 44dad66138cc..000000000000 --- a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,46 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`null-arguments-item.js [__babel_estree] format 1`] = ` -"Unexpected token ','. (1:12) -> 1 | foor('a', , 'b'); - | ^ - 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo("a", - 4 | //1" -`; - -exports[`null-arguments-item.js [acorn] format 1`] = ` -"Unexpected token (1:11) -> 1 | foor('a', , 'b'); - | ^ - 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo("a", - 4 | //1" -`; - -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`] = ` -"Unexpected token: ',' (1:11) -> 1 | foor('a', , 'b'); - | ^ - 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo("a", - 4 | //1" -`; diff --git a/tests/format/js/call/invalid/format.test.js b/tests/format/js/call/invalid/format.test.js new file mode 100644 index 000000000000..e3c45792c5da --- /dev/null +++ b/tests/format/js/call/invalid/format.test.js @@ -0,0 +1,11 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + babel: true, + __babel_estree: true, + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/call/invalid/jsfmt.spec.js b/tests/format/js/call/invalid/jsfmt.spec.js deleted file mode 100644 index 36dc1ad438b8..000000000000 --- a/tests/format/js/call/invalid/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { - babel: true, - __babel_estree: true, - acorn: true, - espree: true, - meriyah: true, - }, -}); diff --git a/tests/format/js/call/no-argument/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/call/no-argument/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/call/no-argument/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/call/no-argument/__snapshots__/format.test.js.snap diff --git a/tests/format/js/call/no-argument/format.test.js b/tests/format/js/call/no-argument/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/call/no-argument/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/call/no-argument/jsfmt.spec.js b/tests/format/js/call/no-argument/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/call/no-argument/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/chain-expression/__snapshots__/format.test.js.snap b/tests/format/js/chain-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9ea87beb4995 --- /dev/null +++ b/tests/format/js/chain-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,525 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b) (); +(a.b?.c) (); +(a?.b.c) (); +(a[b?.c]) (); +((a?.b).c) (); +(a[b?.()]) (); +((a?.b).c) (); +((a?.()).b) (); + +// Call expressions +(a?.()) (); +(a.b.c?.()) (); +(a.b?.c()) (); +(a?.b.c()) (); +(a(b?.c)) (); +((a?.b)()) (); +((a?.())()) (); + +// Not \`.callee\` +foo(a?.b) + +=====================================output===================================== +// Member expressions +(a?.b)(); +(a.b?.c)(); +(a?.b.c)(); +a[b?.c](); +(a?.b).c(); +a[b?.()](); +(a?.b).c(); +(a?.()).b(); + +// Call expressions +(a?.())(); +(a.b.c?.())(); +(a.b?.c())(); +(a?.b.c())(); +a(b?.c)(); +(a?.b)()(); +(a?.())()(); + +// Not \`.callee\` +foo(a?.b); + +================================================================================ +`; + +exports[`issue-15785-1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function someFunctionName( + someLongBreakingParameterName, + anotherLongParameterName, +) { + return isEqual(a?.map(([t, _]) => t?.id), b?.map(([t, _]) => t?.id)); + return isEqual(a.map(([t, _]) => t?.id), b.map(([t, _]) => t?.id)); +} + + +=====================================output===================================== +function someFunctionName( + someLongBreakingParameterName, + anotherLongParameterName, +) { + return isEqual( + a?.map(([t, _]) => t?.id), + b?.map(([t, _]) => t?.id), + ); + return isEqual( + a.map(([t, _]) => t?.id), + b.map(([t, _]) => t?.id), + ); +} + +================================================================================ +`; + +exports[`issue-15785-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const theValue = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere?.includes(listingId), +); +const theValue2 = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere.includes(listingId), +); + +=====================================output===================================== +const theValue = Object.entries(someLongObjectName).filter(([listingId]) => + someListToCompareToHere?.includes(listingId), +); +const theValue2 = Object.entries(someLongObjectName).filter(([listingId]) => + someListToCompareToHere.includes(listingId), +); + +================================================================================ +`; + +exports[`issue-15785-3.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +logger.log( + \`A long template string with a conditional: \${channel?.id}, and then some more content that continues until \${JSON.stringify(location)}\` +); +logger.log( + \`A long template string with a conditional: \${channel.id}, and then some more content that continues until \${JSON.stringify(location)}\` +); + +=====================================output===================================== +logger.log( + \`A long template string with a conditional: \${channel?.id}, and then some more content that continues until \${JSON.stringify(location)}\`, +); +logger.log( + \`A long template string with a conditional: \${channel.id}, and then some more content that continues until \${JSON.stringify(location)}\`, +); + +================================================================================ +`; + +exports[`issue-15912.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +test() + .test2() + .test2(thing?.something); + +=====================================output===================================== +test().test2().test2(thing?.something); + +================================================================================ +`; + +exports[`issue-15916.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const randomFuncion = (value) => { + if (value.a) { + funcA( + "", + funcB( + dayjs(value.a?.toString()) + .add(1, "day") + .toISOString() + ) + ); + } +}; + +=====================================output===================================== +const randomFuncion = (value) => { + if (value.a) { + funcA("", funcB(dayjs(value.a?.toString()).add(1, "day").toISOString())); + } +}; + +================================================================================ +`; + +exports[`member-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b) .foo; +(a.b?.c) .foo; +(a?.b.c) .foo; +(a[b?.c]) .foo; +((a?.b).c) .foo; +(a[b?.()]) .foo; +((a?.b).c) .foo; +((a?.()).b) .foo; + +// Call expressions +(a?.()) .foo; +(a.b.c?.()) .foo; +(a.b?.c()) .foo; +(a?.b.c()) .foo; +(a(b?.c)) .foo; +((a?.b)()) .foo; +((a?.())()) .foo; + +// Not \`.object\` +_[a?.b]; + +// Computed +(a?.b) [foo]; + +=====================================output===================================== +// Member expressions +(a?.b).foo; +(a.b?.c).foo; +(a?.b.c).foo; +a[b?.c].foo; +(a?.b).c.foo; +a[b?.()].foo; +(a?.b).c.foo; +(a?.()).b.foo; + +// Call expressions +(a?.()).foo; +(a.b.c?.()).foo; +(a.b?.c()).foo; +(a?.b.c()).foo; +a(b?.c).foo; +(a?.b)().foo; +(a?.())().foo; + +// Not \`.object\` +_[a?.b]; + +// Computed +(a?.b)[foo]; + +================================================================================ +`; + +exports[`new-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +new (a?.b) (); +new (a.b?.c) (); +new (a?.b.c) (); +new (a[b?.c]) (); +new ((a?.b).c) (); +new (a[b?.()]) (); +new ((a?.b).c) (); +// FIXME: new ((a?.()).b) (); + +// Call expressions +new (a?.()) (); +new (a.b.c?.()) (); +new (a.b?.c()) (); +new (a?.b.c()) (); +new (a(b?.c)) (); +new ((a?.b)()) (); +new ((a?.())()) (); + +// Not \`.callee\` +new Foo(a?.b) + +=====================================output===================================== +// Member expressions +new (a?.b)(); +new (a.b?.c)(); +new (a?.b.c)(); +new a[b?.c](); +new (a?.b).c(); +new a[b?.()](); +new (a?.b).c(); +// FIXME: new ((a?.()).b) (); + +// Call expressions +new (a?.())(); +new (a.b.c?.())(); +new (a.b?.c())(); +new (a?.b.c())(); +new (a(b?.c))(); +new ((a?.b)())(); +new ((a?.())())(); + +// Not \`.callee\` +new Foo(a?.b); + +================================================================================ +`; + +exports[`number.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +(1.).toString(); +(1.).toString?.(); +(1.)?.toString(); +(1).toString(); +(1)?.toString(); + +(1.).toString; +(1.)?.toString; + +a[1.].toString(); +a[1.].toString?.(); +a[1.]?.toString(); +a?.[1.].toString(); + +a[1.].toString; +a[1.]?.toString; +a?.[1.].toString; + +=====================================output===================================== +(1).toString(); +(1).toString?.(); +(1)?.toString(); +(1).toString(); +(1)?.toString(); + +(1).toString; +(1)?.toString; + +a[1].toString(); +a[1].toString?.(); +a[1]?.toString(); +a?.[1].toString(); + +a[1].toString; +a[1]?.toString; +a?.[1].toString; + +================================================================================ +`; + +exports[`tagged-template-literals.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b) \`\`; +(a.b?.c) \`\`; +(a?.b.c) \`\`; +(a[b?.c]) \`\`; +((a?.b).c) \`\`; +(a[b?.()]) \`\`; +((a?.b).c) \`\`; +((a?.()).b) \`\`; + +// Call expressions +(a?.()) \`\`; +(a.b.c?.()) \`\`; +(a.b?.c()) \`\`; +(a?.b.c()) \`\`; +(a(b?.c)) \`\`; +((a?.b)()) \`\`; +((a?.())()) \`\`; + +=====================================output===================================== +// Member expressions +(a?.b)\`\`; +(a.b?.c)\`\`; +(a?.b.c)\`\`; +a[b?.c]\`\`; +(a?.b).c\`\`; +a[b?.()]\`\`; +(a?.b).c\`\`; +(a?.()).b\`\`; + +// Call expressions +(a?.())\`\`; +(a.b.c?.())\`\`; +(a.b?.c())\`\`; +(a?.b.c())\`\`; +a(b?.c)\`\`; +(a?.b)()\`\`; +(a?.())()\`\`; + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a?.b).c; +(a?.()).b; + +(a?.b)(); +(a?.())(); + +new (a?.b)(); +new (a?.())(); + +=====================================output===================================== +(a?.b).c; +(a?.()).b; + +(a?.b)(); +(a?.())(); + +new (a?.b)(); +new (a?.())(); + +================================================================================ +`; + +exports[`test-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{{{ + const [lastCommittedX, lastCommittedY] = + multiElement?.lastCommittedPoint ?? [0, 0]; +}}}} + +=====================================output===================================== +{ + { + { + { + const [lastCommittedX, lastCommittedY] = + multiElement?.lastCommittedPoint ?? [0, 0]; + } + } + } +} + +================================================================================ +`; + +exports[`test-3.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function getLanguageByInterpreter(languages, file) { + return languages.find((language) => language.interpreters?.includes(interpreter), + ); + return languages.find((language) =>language.interpreters.includes(interpreter), + ); +} + +=====================================output===================================== +function getLanguageByInterpreter(languages, file) { + return languages.find((language) => + language.interpreters?.includes(interpreter), + ); + return languages.find((language) => + language.interpreters.includes(interpreter), + ); +} + +================================================================================ +`; + +exports[`test-4.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/marmelab/react-admin/blob/8c1ddfeb4e011a94609d709c0f4f139fb5d480e8/packages/ra-data-localstorage/src/index.ts#L112 +export default (params) => { + return { + updateMany: (resource, params) => { + updateLocalStorage(() => { + params.ids.forEach(id => { + const index = data.data.data.data.data[resource]?.findIndex( + record => record.id == id + ); + const index2 = data.data.data.data.data[resource].findIndex( + record => record.id == id + ); + data[resource][index] = { + ...data[resource][index], + ...params.data, + }; + }); + }); + return baseDataProvider.updateMany(resource, params); + }, + } +} + +=====================================output===================================== +// https://github.com/marmelab/react-admin/blob/8c1ddfeb4e011a94609d709c0f4f139fb5d480e8/packages/ra-data-localstorage/src/index.ts#L112 +export default (params) => { + return { + updateMany: (resource, params) => { + updateLocalStorage(() => { + params.ids.forEach((id) => { + const index = data.data.data.data.data[resource]?.findIndex( + (record) => record.id == id, + ); + const index2 = data.data.data.data.data[resource].findIndex( + (record) => record.id == id, + ); + data[resource][index] = { + ...data[resource][index], + ...params.data, + }; + }); + }); + return baseDataProvider.updateMany(resource, params); + }, + }; +}; + +================================================================================ +`; diff --git a/tests/format/js/chain-expression/call-expression.js b/tests/format/js/chain-expression/call-expression.js new file mode 100644 index 000000000000..e696ac173ead --- /dev/null +++ b/tests/format/js/chain-expression/call-expression.js @@ -0,0 +1,21 @@ +// Member expressions +(a?.b) (); +(a.b?.c) (); +(a?.b.c) (); +(a[b?.c]) (); +((a?.b).c) (); +(a[b?.()]) (); +((a?.b).c) (); +((a?.()).b) (); + +// Call expressions +(a?.()) (); +(a.b.c?.()) (); +(a.b?.c()) (); +(a?.b.c()) (); +(a(b?.c)) (); +((a?.b)()) (); +((a?.())()) (); + +// Not `.callee` +foo(a?.b) diff --git a/tests/format/js/chain-expression/format.test.js b/tests/format/js/chain-expression/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/chain-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/chain-expression/issue-15785-1.js b/tests/format/js/chain-expression/issue-15785-1.js new file mode 100644 index 000000000000..b712e1101009 --- /dev/null +++ b/tests/format/js/chain-expression/issue-15785-1.js @@ -0,0 +1,8 @@ +function someFunctionName( + someLongBreakingParameterName, + anotherLongParameterName, +) { + return isEqual(a?.map(([t, _]) => t?.id), b?.map(([t, _]) => t?.id)); + return isEqual(a.map(([t, _]) => t?.id), b.map(([t, _]) => t?.id)); +} + diff --git a/tests/format/js/chain-expression/issue-15785-2.js b/tests/format/js/chain-expression/issue-15785-2.js new file mode 100644 index 000000000000..2579ceb83646 --- /dev/null +++ b/tests/format/js/chain-expression/issue-15785-2.js @@ -0,0 +1,6 @@ +const theValue = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere?.includes(listingId), +); +const theValue2 = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere.includes(listingId), +); diff --git a/tests/format/js/chain-expression/issue-15785-3.js b/tests/format/js/chain-expression/issue-15785-3.js new file mode 100644 index 000000000000..b08e22591b66 --- /dev/null +++ b/tests/format/js/chain-expression/issue-15785-3.js @@ -0,0 +1,6 @@ +logger.log( + `A long template string with a conditional: ${channel?.id}, and then some more content that continues until ${JSON.stringify(location)}` +); +logger.log( + `A long template string with a conditional: ${channel.id}, and then some more content that continues until ${JSON.stringify(location)}` +); diff --git a/tests/format/js/chain-expression/issue-15912.js b/tests/format/js/chain-expression/issue-15912.js new file mode 100644 index 000000000000..19a6fd6a8026 --- /dev/null +++ b/tests/format/js/chain-expression/issue-15912.js @@ -0,0 +1,3 @@ +test() + .test2() + .test2(thing?.something); diff --git a/tests/format/js/chain-expression/issue-15916.js b/tests/format/js/chain-expression/issue-15916.js new file mode 100644 index 000000000000..f3906f78b84a --- /dev/null +++ b/tests/format/js/chain-expression/issue-15916.js @@ -0,0 +1,12 @@ +const randomFuncion = (value) => { + if (value.a) { + funcA( + "", + funcB( + dayjs(value.a?.toString()) + .add(1, "day") + .toISOString() + ) + ); + } +}; diff --git a/tests/format/js/chain-expression/member-expression.js b/tests/format/js/chain-expression/member-expression.js new file mode 100644 index 000000000000..3306ec31e4ab --- /dev/null +++ b/tests/format/js/chain-expression/member-expression.js @@ -0,0 +1,24 @@ +// Member expressions +(a?.b) .foo; +(a.b?.c) .foo; +(a?.b.c) .foo; +(a[b?.c]) .foo; +((a?.b).c) .foo; +(a[b?.()]) .foo; +((a?.b).c) .foo; +((a?.()).b) .foo; + +// Call expressions +(a?.()) .foo; +(a.b.c?.()) .foo; +(a.b?.c()) .foo; +(a?.b.c()) .foo; +(a(b?.c)) .foo; +((a?.b)()) .foo; +((a?.())()) .foo; + +// Not `.object` +_[a?.b]; + +// Computed +(a?.b) [foo]; diff --git a/tests/format/js/chain-expression/new-expression.js b/tests/format/js/chain-expression/new-expression.js new file mode 100644 index 000000000000..3583f5ce275e --- /dev/null +++ b/tests/format/js/chain-expression/new-expression.js @@ -0,0 +1,21 @@ +// Member expressions +new (a?.b) (); +new (a.b?.c) (); +new (a?.b.c) (); +new (a[b?.c]) (); +new ((a?.b).c) (); +new (a[b?.()]) (); +new ((a?.b).c) (); +// FIXME: new ((a?.()).b) (); + +// Call expressions +new (a?.()) (); +new (a.b.c?.()) (); +new (a.b?.c()) (); +new (a?.b.c()) (); +new (a(b?.c)) (); +new ((a?.b)()) (); +new ((a?.())()) (); + +// Not `.callee` +new Foo(a?.b) diff --git a/tests/format/js/chain-expression/number.js b/tests/format/js/chain-expression/number.js new file mode 100644 index 000000000000..13d49a78683d --- /dev/null +++ b/tests/format/js/chain-expression/number.js @@ -0,0 +1,17 @@ +(1.).toString(); +(1.).toString?.(); +(1.)?.toString(); +(1).toString(); +(1)?.toString(); + +(1.).toString; +(1.)?.toString; + +a[1.].toString(); +a[1.].toString?.(); +a[1.]?.toString(); +a?.[1.].toString(); + +a[1.].toString; +a[1.]?.toString; +a?.[1.].toString; diff --git a/tests/format/js/chain-expression/tagged-template-literals.js b/tests/format/js/chain-expression/tagged-template-literals.js new file mode 100644 index 000000000000..96d9e93f36fe --- /dev/null +++ b/tests/format/js/chain-expression/tagged-template-literals.js @@ -0,0 +1,18 @@ +// Member expressions +(a?.b) ``; +(a.b?.c) ``; +(a?.b.c) ``; +(a[b?.c]) ``; +((a?.b).c) ``; +(a[b?.()]) ``; +((a?.b).c) ``; +((a?.()).b) ``; + +// Call expressions +(a?.()) ``; +(a.b.c?.()) ``; +(a.b?.c()) ``; +(a?.b.c()) ``; +(a(b?.c)) ``; +((a?.b)()) ``; +((a?.())()) ``; diff --git a/tests/format/js/chain-expression/test-2.js b/tests/format/js/chain-expression/test-2.js new file mode 100644 index 000000000000..943ecac70cfb --- /dev/null +++ b/tests/format/js/chain-expression/test-2.js @@ -0,0 +1,4 @@ +{{{{ + const [lastCommittedX, lastCommittedY] = + multiElement?.lastCommittedPoint ?? [0, 0]; +}}}} diff --git a/tests/format/js/chain-expression/test-3.js b/tests/format/js/chain-expression/test-3.js new file mode 100644 index 000000000000..5cd3432af192 --- /dev/null +++ b/tests/format/js/chain-expression/test-3.js @@ -0,0 +1,6 @@ +function getLanguageByInterpreter(languages, file) { + return languages.find((language) => language.interpreters?.includes(interpreter), + ); + return languages.find((language) =>language.interpreters.includes(interpreter), + ); +} diff --git a/tests/format/js/chain-expression/test-4.js b/tests/format/js/chain-expression/test-4.js new file mode 100644 index 000000000000..5f0843743347 --- /dev/null +++ b/tests/format/js/chain-expression/test-4.js @@ -0,0 +1,22 @@ +// https://github.com/marmelab/react-admin/blob/8c1ddfeb4e011a94609d709c0f4f139fb5d480e8/packages/ra-data-localstorage/src/index.ts#L112 +export default (params) => { + return { + updateMany: (resource, params) => { + updateLocalStorage(() => { + params.ids.forEach(id => { + const index = data.data.data.data.data[resource]?.findIndex( + record => record.id == id + ); + const index2 = data.data.data.data.data[resource].findIndex( + record => record.id == id + ); + data[resource][index] = { + ...data[resource][index], + ...params.data, + }; + }); + }); + return baseDataProvider.updateMany(resource, params); + }, + } +} diff --git a/tests/format/js/chain-expression/test.js b/tests/format/js/chain-expression/test.js new file mode 100644 index 000000000000..86b2e6bd9acf --- /dev/null +++ b/tests/format/js/chain-expression/test.js @@ -0,0 +1,8 @@ +(a?.b).c; +(a?.()).b; + +(a?.b)(); +(a?.())(); + +new (a?.b)(); +new (a?.())(); diff --git a/tests/format/js/class-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/class-comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/class-comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/class-comment/__snapshots__/format.test.js.snap diff --git a/tests/format/js/class-comment/format.test.js b/tests/format/js/class-comment/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/class-comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/class-comment/jsfmt.spec.js b/tests/format/js/class-comment/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/class-comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/class-extends/__snapshots__/format.test.js.snap b/tests/format/js/class-extends/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..94614163d0dc --- /dev/null +++ b/tests/format/js/class-extends/__snapshots__/format.test.js.snap @@ -0,0 +1,193 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A extends {} {} + +class C extends [] {} + +=====================================output===================================== +class A extends ({}) {} + +class C extends [] {} + +================================================================================ +`; + +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"] +printWidth: 80 + | printWidth +=====================================input====================================== +// "ArrowFunctionExpression" +class a1 extends (() => {}) {} + +// "AssignmentExpression" +class a2 extends (b = c) {} + +// "AwaitExpression" +async function f() { + class a extends (await b) {} +} + +// "BinaryExpression" +class a3 extends (b + c) {} + +// "CallExpression" +class a4 extends b() {} + +// "ClassExpression" +class a5 extends class {} {} + +// "ConditionalExpression" +class a6 extends (b ? c : d) {} + +// "FunctionExpression" +class a7 extends (function() {}) {} + +// "LogicalExpression" +class a8 extends (b || c) {} + +// "MemberExpression" +class a9 extends b.c {} + +// "NewExpression" +class a10 extends (new B()) {} + +// "ObjectExpression" +class a11 extends ({}) {} + +// "SequenceExpression" +class a12 extends (b, c) {} + +// "TaggedTemplateExpression" +class a13 extends \`\` {} + +// "UnaryExpression" +class a14 extends (void b) {} + +// "UpdateExpression" +class a15 extends (++b) {} + +// "YieldExpression" +function* f2() { + // Flow has a bug parsing it. + // class a extends (yield 1) {} +} + +x = class extends (++b) {} + +=====================================output===================================== +// "ArrowFunctionExpression" +class a1 extends (() => {}) {} + +// "AssignmentExpression" +class a2 extends (b = c) {} + +// "AwaitExpression" +async function f() { + class a extends (await b) {} +} + +// "BinaryExpression" +class a3 extends (b + c) {} + +// "CallExpression" +class a4 extends b() {} + +// "ClassExpression" +class a5 extends class {} {} + +// "ConditionalExpression" +class a6 extends (b ? c : d) {} + +// "FunctionExpression" +class a7 extends function () {} {} + +// "LogicalExpression" +class a8 extends (b || c) {} + +// "MemberExpression" +class a9 extends b.c {} + +// "NewExpression" +class a10 extends (new B()) {} + +// "ObjectExpression" +class a11 extends ({}) {} + +// "SequenceExpression" +class a12 extends (b, c) {} + +// "TaggedTemplateExpression" +class a13 extends \`\` {} + +// "UnaryExpression" +class a14 extends (void b) {} + +// "UpdateExpression" +class a15 extends (++b) {} + +// "YieldExpression" +function* f2() { + // Flow has a bug parsing it. + // class a extends (yield 1) {} +} + +x = class extends (++b) {}; + +================================================================================ +`; diff --git a/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8dcb70a92510..000000000000 --- a/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,175 +0,0 @@ -// 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"] -printWidth: 80 - | printWidth -=====================================input====================================== -// "ArrowFunctionExpression" -class a1 extends (() => {}) {} - -// "AssignmentExpression" -class a2 extends (b = c) {} - -// "AwaitExpression" -async function f() { - class a extends (await b) {} -} - -// "BinaryExpression" -class a3 extends (b + c) {} - -// "CallExpression" -class a4 extends b() {} - -// "ClassExpression" -class a5 extends class {} {} - -// "ConditionalExpression" -class a6 extends (b ? c : d) {} - -// "FunctionExpression" -class a7 extends (function() {}) {} - -// "LogicalExpression" -class a8 extends (b || c) {} - -// "MemberExpression" -class a9 extends b.c {} - -// "NewExpression" -class a10 extends (new B()) {} - -// "ObjectExpression" -class a11 extends ({}) {} - -// "SequenceExpression" -class a12 extends (b, c) {} - -// "TaggedTemplateExpression" -class a13 extends \`\` {} - -// "UnaryExpression" -class a14 extends (void b) {} - -// "UpdateExpression" -class a15 extends (++b) {} - -// "YieldExpression" -function* f2() { - // Flow has a bug parsing it. - // class a extends (yield 1) {} -} - -x = class extends (++b) {} - -=====================================output===================================== -// "ArrowFunctionExpression" -class a1 extends (() => {}) {} - -// "AssignmentExpression" -class a2 extends (b = c) {} - -// "AwaitExpression" -async function f() { - class a extends (await b) {} -} - -// "BinaryExpression" -class a3 extends (b + c) {} - -// "CallExpression" -class a4 extends b() {} - -// "ClassExpression" -class a5 extends class {} {} - -// "ConditionalExpression" -class a6 extends (b ? c : d) {} - -// "FunctionExpression" -class a7 extends function () {} {} - -// "LogicalExpression" -class a8 extends (b || c) {} - -// "MemberExpression" -class a9 extends b.c {} - -// "NewExpression" -class a10 extends (new B()) {} - -// "ObjectExpression" -class a11 extends ({}) {} - -// "SequenceExpression" -class a12 extends (b, c) {} - -// "TaggedTemplateExpression" -class a13 extends \`\` {} - -// "UnaryExpression" -class a14 extends (void b) {} - -// "UpdateExpression" -class a15 extends (++b) {} - -// "YieldExpression" -function* f2() { - // Flow has a bug parsing it. - // class a extends (yield 1) {} -} - -x = class extends (++b) {}; - -================================================================================ -`; diff --git a/tests/format/js/class-extends/array-and-object.js b/tests/format/js/class-extends/array-and-object.js new file mode 100644 index 000000000000..ce27bd33f24f --- /dev/null +++ b/tests/format/js/class-extends/array-and-object.js @@ -0,0 +1,3 @@ +class A extends {} {} + +class C extends [] {} diff --git a/tests/format/js/class-extends/format.test.js b/tests/format/js/class-extends/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/class-extends/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/class-extends/jsfmt.spec.js b/tests/format/js/class-extends/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/class-extends/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/class-static-block/__snapshots__/format.test.js.snap b/tests/format/js/class-static-block/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..10e0d99adc94 --- /dev/null +++ b/tests/format/js/class-static-block/__snapshots__/format.test.js.snap @@ -0,0 +1,92 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class-static-block.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + static #x = 42; + static y; + static { + try { + this.y = doSomethingWith(this.#x); + } catch { + this.y = "unknown"; + } + } +} + +class Foo { + static {} +} + +class A1 { + static { + foo; + } +} + +class A2 { + static { + foo; + bar; + } +} + +=====================================output===================================== +class C { + static #x = 42; + static y; + static { + try { + this.y = doSomethingWith(this.#x); + } catch { + this.y = "unknown"; + } + } +} + +class Foo { + static {} +} + +class A1 { + static { + foo; + } +} + +class A2 { + static { + foo; + bar; + } +} + +================================================================================ +`; + +exports[`with-line-breaks.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + static + { + 1 + 1; + } +}; + +=====================================output===================================== +class Foo { + static { + 1 + 1; + } +} + +================================================================================ +`; diff --git a/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index dd0cc3f438e9..000000000000 --- a/tests/format/js/class-static-block/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,114 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`class-static-block.js [meriyah] format 1`] = ` -"Unexpected token: '{' (4:10) - 2 | static #x = 42; - 3 | static y; -> 4 | static { - | ^ - 5 | try { - 6 | this.y = doSomethingWith(this.#x); - 7 | } catch {" -`; - -exports[`class-static-block.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - static #x = 42; - static y; - static { - try { - this.y = doSomethingWith(this.#x); - } catch { - this.y = "unknown"; - } - } -} - -class Foo { - static {} -} - -class A1 { - static { - foo; - } -} - -class A2 { - static { - foo; - bar; - } -} - -=====================================output===================================== -class C { - static #x = 42; - static y; - static { - try { - this.y = doSomethingWith(this.#x); - } catch { - this.y = "unknown"; - } - } -} - -class Foo { - static {} -} - -class A1 { - static { - foo; - } -} - -class A2 { - static { - foo; - bar; - } -} - -================================================================================ -`; - -exports[`with-line-breaks.js [meriyah] format 1`] = ` -"Unexpected token: '{' (3:3) - 1 | class Foo { - 2 | static -> 3 | { - | ^ - 4 | 1 + 1; - 5 | } - 6 | };" -`; - -exports[`with-line-breaks.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - static - { - 1 + 1; - } -}; - -=====================================output===================================== -class Foo { - static { - 1 + 1; - } -} - -================================================================================ -`; diff --git a/tests/format/js/class-static-block/format.test.js b/tests/format/js/class-static-block/format.test.js new file mode 100644 index 000000000000..f509b709ec61 --- /dev/null +++ b/tests/format/js/class-static-block/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/js/class-static-block/jsfmt.spec.js b/tests/format/js/class-static-block/jsfmt.spec.js deleted file mode 100644 index 16a688ef5c6d..000000000000 --- a/tests/format/js/class-static-block/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"], { errors: { meriyah: true } }); diff --git a/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap b/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..97d8101fde6f --- /dev/null +++ b/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap @@ -0,0 +1,368 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`optional-chaining.js [espree] format 1`] = ` +"Private field '#x' must be declared in an enclosing class (3:13) + 1 | // https://github.com/babel/babel/pull/11669 + 2 | +> 3 | delete obj?.#x.a + | ^ + 4 | +Cause: Private field '#x' must be declared in an enclosing class" +`; + +exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = ` +"Private field '#x' must be declared in an enclosing class (3:13) + 1 | // https://github.com/babel/babel/pull/11669 + 2 | +> 3 | delete obj?.#x.a + | ^ + 4 | +Cause: Private field '#x' must be declared in an enclosing class" +`; + +exports[`optional-chaining.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11669 + +delete obj?.#x.a + +=====================================output===================================== +// https://github.com/babel/babel/pull/11669 + +delete obj?.#x.a + +================================================================================ +`; + +exports[`optional-chaining.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11669 + +delete obj?.#x.a + +=====================================output===================================== +// https://github.com/babel/babel/pull/11669 + +delete obj?.#x.a; + +================================================================================ +`; + +exports[`private_fields.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { #x; #y; } +class B { #x = 0; #y = 1; } + +class C { + static #x; + static #y = 1; +} + +class D { + #x + #y +} + +class Point { + #x = 1; + #y = 2; + + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + } + + get x() { return this.#x } + set x(value) { this.#x = +value } + + get y() { return this.#y } + set y(value) { this.#y = +value } + + equals(p) { return this.#x === p.#x && this.#y === p.#y } + + toString() { return \`Point<\${ this.#x },\${ this.#y }>\` } +} + +class E { + async #a() {} + #b() {} + get #c() {} + set #c(bar) {} + *#d() {} + async *#e() {} + get #f() {} + set #f(taz) {} +} + +class F { + #func(id, { blog: { title } }) { + return id + title; + } +} + +=====================================output===================================== +class A { + #x + #y +} +class B { + #x = 0 + #y = 1 +} + +class C { + static #x + static #y = 1 +} + +class D { + #x + #y +} + +class Point { + #x = 1 + #y = 2 + + constructor(x = 0, y = 0) { + this.#x = +x + this.#y = +y + } + + get x() { + return this.#x + } + set x(value) { + this.#x = +value + } + + get y() { + return this.#y + } + set y(value) { + this.#y = +value + } + + equals(p) { + return this.#x === p.#x && this.#y === p.#y + } + + toString() { + return \`Point<\${this.#x},\${this.#y}>\` + } +} + +class E { + async #a() {} + #b() {} + get #c() {} + set #c(bar) {} + *#d() {} + async *#e() {} + get #f() {} + set #f(taz) {} +} + +class F { + #func(id, { blog: { title } }) { + return id + title + } +} + +================================================================================ +`; + +exports[`private_fields.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { #x; #y; } +class B { #x = 0; #y = 1; } + +class C { + static #x; + static #y = 1; +} + +class D { + #x + #y +} + +class Point { + #x = 1; + #y = 2; + + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + } + + get x() { return this.#x } + set x(value) { this.#x = +value } + + get y() { return this.#y } + set y(value) { this.#y = +value } + + equals(p) { return this.#x === p.#x && this.#y === p.#y } + + toString() { return \`Point<\${ this.#x },\${ this.#y }>\` } +} + +class E { + async #a() {} + #b() {} + get #c() {} + set #c(bar) {} + *#d() {} + async *#e() {} + get #f() {} + set #f(taz) {} +} + +class F { + #func(id, { blog: { title } }) { + return id + title; + } +} + +=====================================output===================================== +class A { + #x; + #y; +} +class B { + #x = 0; + #y = 1; +} + +class C { + static #x; + static #y = 1; +} + +class D { + #x; + #y; +} + +class Point { + #x = 1; + #y = 2; + + constructor(x = 0, y = 0) { + this.#x = +x; + this.#y = +y; + } + + get x() { + return this.#x; + } + set x(value) { + this.#x = +value; + } + + get y() { + return this.#y; + } + set y(value) { + this.#y = +value; + } + + equals(p) { + return this.#x === p.#x && this.#y === p.#y; + } + + toString() { + return \`Point<\${this.#x},\${this.#y}>\`; + } +} + +class E { + async #a() {} + #b() {} + get #c() {} + set #c(bar) {} + *#d() {} + async *#e() {} + get #f() {} + set #f(taz) {} +} + +class F { + #func(id, { blog: { title } }) { + return id + title; + } +} + +================================================================================ +`; + +exports[`with_comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + #foobar = + // comment to break + 1 + + // comment to break again + 2; +} + +=====================================output===================================== +class A { + #foobar = + // comment to break + 1 + + // comment to break again + 2 +} + +================================================================================ +`; + +exports[`with_comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + #foobar = + // comment to break + 1 + + // comment to break again + 2; +} + +=====================================output===================================== +class A { + #foobar = + // comment to break + 1 + + // comment to break again + 2; +} + +================================================================================ +`; diff --git a/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f6184ecb64cc..000000000000 --- a/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,402 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`optional-chaining.js [acorn] format 1`] = ` -"Private field '#x' must be declared in an enclosing class (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js [espree] format 1`] = ` -"Private field '#x' must be declared in an enclosing class (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js [meriyah] format 1`] = ` -"Dot property must be an identifier (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js - {"semi":false} [acorn] format 1`] = ` -"Private field '#x' must be declared in an enclosing class (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = ` -"Private field '#x' must be declared in an enclosing class (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js - {"semi":false} [meriyah] format 1`] = ` -"Dot property must be an identifier (3:13) - 1 | // https://github.com/babel/babel/pull/11669 - 2 | -> 3 | delete obj?.#x.a - | ^ - 4 |" -`; - -exports[`optional-chaining.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11669 - -delete obj?.#x.a - -=====================================output===================================== -// https://github.com/babel/babel/pull/11669 - -delete obj?.#x.a - -================================================================================ -`; - -exports[`optional-chaining.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11669 - -delete obj?.#x.a - -=====================================output===================================== -// https://github.com/babel/babel/pull/11669 - -delete obj?.#x.a; - -================================================================================ -`; - -exports[`private_fields.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { #x; #y; } -class B { #x = 0; #y = 1; } - -class C { - static #x; - static #y = 1; -} - -class D { - #x - #y -} - -class Point { - #x = 1; - #y = 2; - - constructor(x = 0, y = 0) { - this.#x = +x; - this.#y = +y; - } - - get x() { return this.#x } - set x(value) { this.#x = +value } - - get y() { return this.#y } - set y(value) { this.#y = +value } - - equals(p) { return this.#x === p.#x && this.#y === p.#y } - - toString() { return \`Point<\${ this.#x },\${ this.#y }>\` } -} - -class E { - async #a() {} - #b() {} - get #c() {} - set #c(bar) {} - *#d() {} - async *#e() {} - get #f() {} - set #f(taz) {} -} - -class F { - #func(id, { blog: { title } }) { - return id + title; - } -} - -=====================================output===================================== -class A { - #x - #y -} -class B { - #x = 0 - #y = 1 -} - -class C { - static #x - static #y = 1 -} - -class D { - #x - #y -} - -class Point { - #x = 1 - #y = 2 - - constructor(x = 0, y = 0) { - this.#x = +x - this.#y = +y - } - - get x() { - return this.#x - } - set x(value) { - this.#x = +value - } - - get y() { - return this.#y - } - set y(value) { - this.#y = +value - } - - equals(p) { - return this.#x === p.#x && this.#y === p.#y - } - - toString() { - return \`Point<\${this.#x},\${this.#y}>\` - } -} - -class E { - async #a() {} - #b() {} - get #c() {} - set #c(bar) {} - *#d() {} - async *#e() {} - get #f() {} - set #f(taz) {} -} - -class F { - #func(id, { blog: { title } }) { - return id + title - } -} - -================================================================================ -`; - -exports[`private_fields.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { #x; #y; } -class B { #x = 0; #y = 1; } - -class C { - static #x; - static #y = 1; -} - -class D { - #x - #y -} - -class Point { - #x = 1; - #y = 2; - - constructor(x = 0, y = 0) { - this.#x = +x; - this.#y = +y; - } - - get x() { return this.#x } - set x(value) { this.#x = +value } - - get y() { return this.#y } - set y(value) { this.#y = +value } - - equals(p) { return this.#x === p.#x && this.#y === p.#y } - - toString() { return \`Point<\${ this.#x },\${ this.#y }>\` } -} - -class E { - async #a() {} - #b() {} - get #c() {} - set #c(bar) {} - *#d() {} - async *#e() {} - get #f() {} - set #f(taz) {} -} - -class F { - #func(id, { blog: { title } }) { - return id + title; - } -} - -=====================================output===================================== -class A { - #x; - #y; -} -class B { - #x = 0; - #y = 1; -} - -class C { - static #x; - static #y = 1; -} - -class D { - #x; - #y; -} - -class Point { - #x = 1; - #y = 2; - - constructor(x = 0, y = 0) { - this.#x = +x; - this.#y = +y; - } - - get x() { - return this.#x; - } - set x(value) { - this.#x = +value; - } - - get y() { - return this.#y; - } - set y(value) { - this.#y = +value; - } - - equals(p) { - return this.#x === p.#x && this.#y === p.#y; - } - - toString() { - return \`Point<\${this.#x},\${this.#y}>\`; - } -} - -class E { - async #a() {} - #b() {} - get #c() {} - set #c(bar) {} - *#d() {} - async *#e() {} - get #f() {} - set #f(taz) {} -} - -class F { - #func(id, { blog: { title } }) { - return id + title; - } -} - -================================================================================ -`; - -exports[`with_comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - #foobar = - // comment to break - 1 + - // comment to break again - 2; -} - -=====================================output===================================== -class A { - #foobar = - // comment to break - 1 + - // comment to break again - 2 -} - -================================================================================ -`; - -exports[`with_comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - #foobar = - // comment to break - 1 + - // comment to break again - 2; -} - -=====================================output===================================== -class A { - #foobar = - // comment to break - 1 + - // comment to break again - 2; -} - -================================================================================ -`; diff --git a/tests/format/js/classes-private-fields/format.test.js b/tests/format/js/classes-private-fields/format.test.js new file mode 100644 index 000000000000..8a7838c28cdd --- /dev/null +++ b/tests/format/js/classes-private-fields/format.test.js @@ -0,0 +1,10 @@ +const errors = { + espree: ["optional-chaining.js"], +}; +runFormatTest(import.meta, ["babel"], { + errors, +}); +runFormatTest(import.meta, ["babel"], { + semi: false, + errors, +}); diff --git a/tests/format/js/classes-private-fields/jsfmt.spec.js b/tests/format/js/classes-private-fields/jsfmt.spec.js deleted file mode 100644 index 5370268ddab2..000000000000 --- a/tests/format/js/classes-private-fields/jsfmt.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -const errors = { - acorn: ["optional-chaining.js"], - espree: ["optional-chaining.js"], - meriyah: ["optional-chaining.js"], -}; -run_spec(__dirname, ["babel"], { - errors, -}); -run_spec(__dirname, ["babel"], { - semi: false, - errors, -}); diff --git a/tests/format/js/classes/__snapshots__/format.test.js.snap b/tests/format/js/classes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..65d8400359f7 --- /dev/null +++ b/tests/format/js/classes/__snapshots__/format.test.js.snap @@ -0,0 +1,414 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`asi.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/facebook/flow/commit/78f657e8da014e16ff509ad34f8178b158c47af7 +class C { + foo + () {} +} + +=====================================output===================================== +// https://github.com/facebook/flow/commit/78f657e8da014e16ff509ad34f8178b158c47af7 +class C { + foo() {} +} + +================================================================================ +`; + +exports[`assignment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( + aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg1 +) { + method () { + console.log("foo"); + } +}; + +foo = class extends bar { + method() { + console.log("foo"); + } +}; + +aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends bar { + method() { + console.log("foo"); + } +}; + +foo = class extends aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 { + method() { + console.log("foo"); + } +}; + +module.exports = class A extends B { + method () { + console.log("foo"); + } +}; + +=====================================output===================================== +aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( + aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg1 +) { + method() { + console.log("foo"); + } +}; + +foo = class extends bar { + method() { + console.log("foo"); + } +}; + +aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( + bar +) { + method() { + console.log("foo"); + } +}; + +foo = class extends ( + aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 +) { + method() { + console.log("foo"); + } +}; + +module.exports = class A extends B { + method() { + console.log("foo"); + } +}; + +================================================================================ +`; + +exports[`binary.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(class {}) + 1; +(class a {}) + 1; +(class extends b {}) + 1; +(class a extends b {}) + 1; + +=====================================output===================================== +(class {}) + 1; +(class a {}) + 1; +(class extends b {}) + 1; +(class a extends b {}) + 1; + +================================================================================ +`; + +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(class {})(class {}); + +=====================================output===================================== +(class {})(class {}); + +================================================================================ +`; + +exports[`class-fields-features.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + static epoch = new CustomDate(0); + #xValue = 0; + get #x() { return this.#xValue; } + set #x(value) { + this.#xValue = value; + window.requestAnimationFrame(this.#render.bind(this)); + } + #clicked() { + this.#x++; + } + #render() { + this.textContent = this.#x.toString(); + } +} + +=====================================output===================================== +class Foo { + static epoch = new CustomDate(0); + #xValue = 0; + get #x() { + return this.#xValue; + } + set #x(value) { + this.#xValue = value; + window.requestAnimationFrame(this.#render.bind(this)); + } + #clicked() { + this.#x++; + } + #render() { + this.textContent = this.#x.toString(); + } +} + +================================================================================ +`; + +exports[`constructor.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Literal +class A { + "constructor"() { } +} + +// Identifier +class B { + constructor() { } +} + +=====================================output===================================== +// Literal +class A { + constructor() {} +} + +// Identifier +class B { + constructor() {} +} + +================================================================================ +`; + +exports[`empty.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A1 { + // comment +} + +class A2 { // comment +} + +class A3 { +} + +class A4 { + m() {} +} + +=====================================output===================================== +class A1 { + // comment +} + +class A2 { + // comment +} + +class A3 {} + +class A4 { + m() {} +} + +================================================================================ +`; + +exports[`member.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(class {})[1]; +(class {}).a; + +=====================================output===================================== +(class {})[1]; +(class {}).a; + +================================================================================ +`; + +exports[`method.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class C { + name/*comment*/() { + } +}; + + +({ + name/*comment*/() { + } +}); + +=====================================output===================================== +class C { + name /*comment*/() {} +} + +({ + name /*comment*/() {}, +}); + +================================================================================ +`; + +exports[`multiple-static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + static + static + static + a() {} +} + +=====================================output===================================== +class C { + static static; + static a() {} +} + +================================================================================ +`; + +exports[`new.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new class {}; +new Ctor(class {}); + +=====================================output===================================== +new (class {})(); +new Ctor(class {}); + +================================================================================ +`; + +exports[`property.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + foobar = + // comment to break + 1 + + // comment to break again + 2; +} + +class B { + someInstanceProperty = this.props.foofoofoofoofoofoo && + this.props.barbarbarbar; + + someInstanceProperty2 = { foo: this.props.foofoofoofoofoofoo && + this.props.barbarbarbar }; + + someInstanceProperty3 = + "foo"; +} + +=====================================output===================================== +class A { + foobar = + // comment to break + 1 + + // comment to break again + 2; +} + +class B { + someInstanceProperty = + this.props.foofoofoofoofoofoo && this.props.barbarbarbar; + + someInstanceProperty2 = { + foo: this.props.foofoofoofoofoofoo && this.props.barbarbarbar, + }; + + someInstanceProperty3 = "foo"; +} + +================================================================================ +`; + +exports[`super.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A extends B { + #a() { + super.x(); + } +} + +=====================================output===================================== +class A extends B { + #a() { + super.x(); + } +} + +================================================================================ +`; + +exports[`ternary.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (1) (class {}) ? 1 : 2; + +=====================================output===================================== +if (1) (class {}) ? 1 : 2; + +================================================================================ +`; diff --git a/tests/format/js/classes/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ec8ab049c7b2..000000000000 --- a/tests/format/js/classes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,362 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`asi.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/facebook/flow/commit/78f657e8da014e16ff509ad34f8178b158c47af7 -class C { - foo - () {} -} - -=====================================output===================================== -// https://github.com/facebook/flow/commit/78f657e8da014e16ff509ad34f8178b158c47af7 -class C { - foo() {} -} - -================================================================================ -`; - -exports[`assignment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( - aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg1 -) { - method () { - console.log("foo"); - } -}; - -foo = class extends bar { - method() { - console.log("foo"); - } -}; - -aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends bar { - method() { - console.log("foo"); - } -}; - -foo = class extends aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 { - method() { - console.log("foo"); - } -}; - -module.exports = class A extends B { - method () { - console.log("foo"); - } -}; - -=====================================output===================================== -aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( - aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg1 -) { - method() { - console.log("foo"); - } -}; - -foo = class extends bar { - method() { - console.log("foo"); - } -}; - -aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 = class extends ( - bar -) { - method() { - console.log("foo"); - } -}; - -foo = class extends ( - aaaaaaaa.bbbbbbbb.cccccccc.dddddddd.eeeeeeee.ffffffff.gggggggg2 -) { - method() { - console.log("foo"); - } -}; - -module.exports = class A extends B { - method() { - console.log("foo"); - } -}; - -================================================================================ -`; - -exports[`binary.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(class {}) + 1; -(class a {}) + 1; -(class extends b {}) + 1; -(class a extends b {}) + 1; - -=====================================output===================================== -(class {}) + 1; -(class a {}) + 1; -(class extends b {}) + 1; -(class a extends b {}) + 1; - -================================================================================ -`; - -exports[`call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(class {})(class {}); - -=====================================output===================================== -(class {})(class {}); - -================================================================================ -`; - -exports[`class-fields-features.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - static epoch = new CustomDate(0); - #xValue = 0; - get #x() { return this.#xValue; } - set #x(value) { - this.#xValue = value; - window.requestAnimationFrame(this.#render.bind(this)); - } - #clicked() { - this.#x++; - } - #render() { - this.textContent = this.#x.toString(); - } -} - -=====================================output===================================== -class Foo { - static epoch = new CustomDate(0); - #xValue = 0; - get #x() { - return this.#xValue; - } - set #x(value) { - this.#xValue = value; - window.requestAnimationFrame(this.#render.bind(this)); - } - #clicked() { - this.#x++; - } - #render() { - this.textContent = this.#x.toString(); - } -} - -================================================================================ -`; - -exports[`empty.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A1 { - // comment -} - -class A2 { // comment -} - -class A3 { -} - -class A4 { - m() {} -} - -=====================================output===================================== -class A1 { - // comment -} - -class A2 { - // comment -} - -class A3 {} - -class A4 { - m() {} -} - -================================================================================ -`; - -exports[`member.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(class {})[1]; -(class {}).a; - -=====================================output===================================== -(class {})[1]; -(class {}).a; - -================================================================================ -`; - -exports[`method.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class C { - name/*comment*/() { - } -}; - - -({ - name/*comment*/() { - } -}); - -=====================================output===================================== -class C { - name /*comment*/() {} -} - -({ - name /*comment*/() {}, -}); - -================================================================================ -`; - -exports[`new.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new class {}; -new Ctor(class {}); - -=====================================output===================================== -new (class {})(); -new Ctor(class {}); - -================================================================================ -`; - -exports[`property.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - foobar = - // comment to break - 1 + - // comment to break again - 2; -} - -class B { - someInstanceProperty = this.props.foofoofoofoofoofoo && - this.props.barbarbarbar; - - someInstanceProperty2 = { foo: this.props.foofoofoofoofoofoo && - this.props.barbarbarbar }; - - someInstanceProperty3 = - "foo"; -} - -=====================================output===================================== -class A { - foobar = - // comment to break - 1 + - // comment to break again - 2; -} - -class B { - someInstanceProperty = - this.props.foofoofoofoofoofoo && this.props.barbarbarbar; - - someInstanceProperty2 = { - foo: this.props.foofoofoofoofoofoo && this.props.barbarbarbar, - }; - - someInstanceProperty3 = "foo"; -} - -================================================================================ -`; - -exports[`super.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A extends B { - #a() { - super.x(); - } -} - -=====================================output===================================== -class A extends B { - #a() { - super.x(); - } -} - -================================================================================ -`; - -exports[`ternary.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (1) (class {}) ? 1 : 2; - -=====================================output===================================== -if (1) (class {}) ? 1 : 2; - -================================================================================ -`; diff --git a/tests/format/js/classes/constructor.js b/tests/format/js/classes/constructor.js new file mode 100644 index 000000000000..ed4756c98582 --- /dev/null +++ b/tests/format/js/classes/constructor.js @@ -0,0 +1,9 @@ +// Literal +class A { + "constructor"() { } +} + +// Identifier +class B { + constructor() { } +} diff --git a/tests/format/js/classes/format.test.js b/tests/format/js/classes/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/classes/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/classes/jsfmt.spec.js b/tests/format/js/classes/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/classes/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/classes/keyword-property/__snapshots__/format.test.js.snap b/tests/format/js/classes/keyword-property/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e3ddff7bb5ca --- /dev/null +++ b/tests/format/js/classes/keyword-property/__snapshots__/format.test.js.snap @@ -0,0 +1,631 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + async; + foo() {}; +} + +class B { + async = 1; + foo() {} +} + +=====================================output===================================== +class A { + async + foo() {} +} + +class B { + async = 1 + foo() {} +} + +================================================================================ +`; + +exports[`async.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + async; + foo() {}; +} + +class B { + async = 1; + foo() {} +} + +=====================================output===================================== +class A { + async; + foo() {} +} + +class B { + async = 1; + foo() {} +} + +================================================================================ +`; + +exports[`computed.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class B { + [get]; + foo() {} +} + +class C { + [set]; + foo(v) {} +} + +=====================================output===================================== +class B { + [get] + foo() {} +} + +class C { + [set] + foo(v) {} +} + +================================================================================ +`; + +exports[`computed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class B { + [get]; + foo() {} +} + +class C { + [set]; + foo(v) {} +} + +=====================================output===================================== +class B { + [get]; + foo() {} +} + +class C { + [set]; + foo(v) {} +} + +================================================================================ +`; + +exports[`get.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + get; + foo() {} +} + +class B { + get = 1; + foo() {} +} + +=====================================output===================================== +class A { + get; + foo() {} +} + +class B { + get = 1 + foo() {} +} + +================================================================================ +`; + +exports[`get.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + get; + foo() {} +} + +class B { + get = 1; + foo() {} +} + +=====================================output===================================== +class A { + get; + foo() {} +} + +class B { + get = 1; + foo() {} +} + +================================================================================ +`; + +exports[`private.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + #static; + foo() {} +} + +class B { + #get; + foo() {} +} + +class C { + #set; + foo(v) {} +} + +=====================================output===================================== +class A { + #static + foo() {} +} + +class B { + #get + foo() {} +} + +class C { + #set + foo(v) {} +} + +================================================================================ +`; + +exports[`private.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + #static; + foo() {} +} + +class B { + #get; + foo() {} +} + +class C { + #set; + foo(v) {} +} + +=====================================output===================================== +class A { + #static; + foo() {} +} + +class B { + #get; + foo() {} +} + +class C { + #set; + foo(v) {} +} + +================================================================================ +`; + +exports[`set.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + set; + foo(v) {} +} + +class B { + set = 1; + foo(v) {} +} + +=====================================output===================================== +class A { + set; + foo(v) {} +} + +class B { + set = 1 + foo(v) {} +} + +================================================================================ +`; + +exports[`set.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + set; + foo(v) {} +} + +class B { + set = 1; + foo(v) {} +} + +=====================================output===================================== +class A { + set; + foo(v) {} +} + +class B { + set = 1; + foo(v) {} +} + +================================================================================ +`; + +exports[`static.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + static; + foo() {}; +} + +class B { + static = 1; + foo() {}; +} + +=====================================output===================================== +class A { + static; + foo() {} +} + +class B { + static = 1 + foo() {} +} + +================================================================================ +`; + +exports[`static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + static; + foo() {}; +} + +class B { + static = 1; + foo() {}; +} + +=====================================output===================================== +class A { + static; + foo() {} +} + +class B { + static = 1; + foo() {} +} + +================================================================================ +`; + +exports[`static-async.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + static async; + foo() {} +} + +class B { + static async = 1; + foo() {} +} + +=====================================output===================================== +class A { + static async + foo() {} +} + +class B { + static async = 1 + foo() {} +} + +================================================================================ +`; + +exports[`static-async.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + static async; + foo() {} +} + +class B { + static async = 1; + foo() {} +} + +=====================================output===================================== +class A { + static async; + foo() {} +} + +class B { + static async = 1; + foo() {} +} + +================================================================================ +`; + +exports[`static-get.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + static get; + foo() {} +} + +class B { + static get = 1; + foo() {} +} + +=====================================output===================================== +class A { + static get; + foo() {} +} + +class B { + static get = 1 + foo() {} +} + +================================================================================ +`; + +exports[`static-get.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + static get; + foo() {} +} + +class B { + static get = 1; + foo() {} +} + +=====================================output===================================== +class A { + static get; + foo() {} +} + +class B { + static get = 1; + foo() {} +} + +================================================================================ +`; + +exports[`static-set.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + static set; + foo(v) {} +} + +class B { + static set = 1; + foo(v) {} +} + +=====================================output===================================== +class A { + static set; + foo(v) {} +} + +class B { + static set = 1 + foo(v) {} +} + +================================================================================ +`; + +exports[`static-set.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + static set; + foo(v) {} +} + +class B { + static set = 1; + foo(v) {} +} + +=====================================output===================================== +class A { + static set; + foo(v) {} +} + +class B { + static set = 1; + foo(v) {} +} + +================================================================================ +`; + +exports[`static-static.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + static static; + foo() {} +} + +class B { + static static = 1; + foo() {} +} + +=====================================output===================================== +class A { + static static; + foo() {} +} + +class B { + static static = 1 + foo() {} +} + +================================================================================ +`; + +exports[`static-static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + static static; + foo() {} +} + +class B { + static static = 1; + foo() {} +} + +=====================================output===================================== +class A { + static static; + foo() {} +} + +class B { + static static = 1; + foo() {} +} + +================================================================================ +`; diff --git a/tests/format/js/classes/keyword-property/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes/keyword-property/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 517b02b76d89..000000000000 --- a/tests/format/js/classes/keyword-property/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,651 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - async; - foo() {}; -} - -class B { - async = 1; - foo() {} -} - -=====================================output===================================== -class A { - async - foo() {} -} - -class B { - async = 1 - foo() {} -} - -================================================================================ -`; - -exports[`async.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - async; - foo() {}; -} - -class B { - async = 1; - foo() {} -} - -=====================================output===================================== -class A { - async; - foo() {} -} - -class B { - async = 1; - foo() {} -} - -================================================================================ -`; - -exports[`computed.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class B { - [get]; - foo() {} -} - -class C { - [set]; - foo(v) {} -} - -=====================================output===================================== -class B { - [get] - foo() {} -} - -class C { - [set] - foo(v) {} -} - -================================================================================ -`; - -exports[`computed.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class B { - [get]; - foo() {} -} - -class C { - [set]; - foo(v) {} -} - -=====================================output===================================== -class B { - [get]; - foo() {} -} - -class C { - [set]; - foo(v) {} -} - -================================================================================ -`; - -exports[`get.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - get; - foo() {} -} - -class B { - get = 1; - foo() {} -} - -=====================================output===================================== -class A { - get; - foo() {} -} - -class B { - get = 1 - foo() {} -} - -================================================================================ -`; - -exports[`get.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - get; - foo() {} -} - -class B { - get = 1; - foo() {} -} - -=====================================output===================================== -class A { - get; - foo() {} -} - -class B { - get = 1; - foo() {} -} - -================================================================================ -`; - -exports[`private.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - #static; - foo() {} -} - -class B { - #get; - foo() {} -} - -class C { - #set; - foo(v) {} -} - -=====================================output===================================== -class A { - #static - foo() {} -} - -class B { - #get - foo() {} -} - -class C { - #set - foo(v) {} -} - -================================================================================ -`; - -exports[`private.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - #static; - foo() {} -} - -class B { - #get; - foo() {} -} - -class C { - #set; - foo(v) {} -} - -=====================================output===================================== -class A { - #static; - foo() {} -} - -class B { - #get; - foo() {} -} - -class C { - #set; - foo(v) {} -} - -================================================================================ -`; - -exports[`set.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - set; - foo(v) {} -} - -class B { - set = 1; - foo(v) {} -} - -=====================================output===================================== -class A { - set; - foo(v) {} -} - -class B { - set = 1 - foo(v) {} -} - -================================================================================ -`; - -exports[`set.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - set; - foo(v) {} -} - -class B { - set = 1; - foo(v) {} -} - -=====================================output===================================== -class A { - set; - foo(v) {} -} - -class B { - set = 1; - foo(v) {} -} - -================================================================================ -`; - -exports[`static.js [flow] format 1`] = ` -"Unexpected token \`;\`, expected an identifier (2:9) - 1 | class A { -> 2 | static; - | ^ - 3 | foo() {}; - 4 | } - 5 |" -`; - -exports[`static.js - {"semi":false} [flow] format 1`] = ` -"Unexpected token \`;\`, expected an identifier (2:9) - 1 | class A { -> 2 | static; - | ^ - 3 | foo() {}; - 4 | } - 5 |" -`; - -exports[`static.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - static; - foo() {}; -} - -class B { - static = 1; - foo() {}; -} - -=====================================output===================================== -class A { - static; - foo() {} -} - -class B { - static = 1 - foo() {} -} - -================================================================================ -`; - -exports[`static.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - static; - foo() {}; -} - -class B { - static = 1; - foo() {}; -} - -=====================================output===================================== -class A { - static; - foo() {} -} - -class B { - static = 1; - foo() {} -} - -================================================================================ -`; - -exports[`static-async.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - static async; - foo() {} -} - -class B { - static async = 1; - foo() {} -} - -=====================================output===================================== -class A { - static async - foo() {} -} - -class B { - static async = 1 - foo() {} -} - -================================================================================ -`; - -exports[`static-async.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - static async; - foo() {} -} - -class B { - static async = 1; - foo() {} -} - -=====================================output===================================== -class A { - static async; - foo() {} -} - -class B { - static async = 1; - foo() {} -} - -================================================================================ -`; - -exports[`static-get.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - static get; - foo() {} -} - -class B { - static get = 1; - foo() {} -} - -=====================================output===================================== -class A { - static get; - foo() {} -} - -class B { - static get = 1 - foo() {} -} - -================================================================================ -`; - -exports[`static-get.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - static get; - foo() {} -} - -class B { - static get = 1; - foo() {} -} - -=====================================output===================================== -class A { - static get; - foo() {} -} - -class B { - static get = 1; - foo() {} -} - -================================================================================ -`; - -exports[`static-set.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - static set; - foo(v) {} -} - -class B { - static set = 1; - foo(v) {} -} - -=====================================output===================================== -class A { - static set; - foo(v) {} -} - -class B { - static set = 1 - foo(v) {} -} - -================================================================================ -`; - -exports[`static-set.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - static set; - foo(v) {} -} - -class B { - static set = 1; - foo(v) {} -} - -=====================================output===================================== -class A { - static set; - foo(v) {} -} - -class B { - static set = 1; - foo(v) {} -} - -================================================================================ -`; - -exports[`static-static.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - static static; - foo() {} -} - -class B { - static static = 1; - foo() {} -} - -=====================================output===================================== -class A { - static static; - foo() {} -} - -class B { - static static = 1 - foo() {} -} - -================================================================================ -`; - -exports[`static-static.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - static static; - foo() {} -} - -class B { - static static = 1; - foo() {} -} - -=====================================output===================================== -class A { - static static; - foo() {} -} - -class B { - static static = 1; - foo() {} -} - -================================================================================ -`; diff --git a/tests/format/js/classes/keyword-property/format.test.js b/tests/format/js/classes/keyword-property/format.test.js new file mode 100644 index 000000000000..5f0ff42da986 --- /dev/null +++ b/tests/format/js/classes/keyword-property/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/classes/keyword-property/jsfmt.spec.js b/tests/format/js/classes/keyword-property/jsfmt.spec.js deleted file mode 100644 index a0d2e24cda04..000000000000 --- a/tests/format/js/classes/keyword-property/jsfmt.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -const errors = { - flow: ["static.js"], -}; - -run_spec(__dirname, ["babel", "flow", "typescript"], { errors }); -run_spec(__dirname, ["babel", "flow", "typescript"], { errors, semi: false }); diff --git a/tests/format/js/classes/multiple-static.js b/tests/format/js/classes/multiple-static.js new file mode 100644 index 000000000000..edea5416eaf3 --- /dev/null +++ b/tests/format/js/classes/multiple-static.js @@ -0,0 +1,6 @@ +class C { + static + static + static + a() {} +} diff --git a/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap b/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d4d8dcef080d --- /dev/null +++ b/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`example.js [acorn] format 1`] = ` +"super() call outside constructor of a subclass (1:1) +> 1 | super(); + | ^ + 2 | +Cause: super() call outside constructor of a subclass (1:0)" +`; + +exports[`example.js [espree] format 1`] = ` +"'super' keyword outside a method (1:1) +> 1 | super(); + | ^ + 2 | +Cause: 'super' keyword outside a method" +`; + +exports[`example.js [meriyah] format 1`] = ` +"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6) +> 1 | super(); + | ^ + 2 | +Cause: [1:5-1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass" +`; + +exports[`example.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +super(); + +=====================================output===================================== +super(); + +================================================================================ +`; diff --git a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 37af8ce7c502..000000000000 --- a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,36 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`example.js [acorn] format 1`] = ` -"super() call outside constructor of a subclass (1:1) -> 1 | super(); - | ^ - 2 |" -`; - -exports[`example.js [espree] format 1`] = ` -"'super' keyword outside a method (1:1) -> 1 | super(); - | ^ - 2 |" -`; - -exports[`example.js [meriyah] format 1`] = ` -"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6) -> 1 | super(); - | ^ - 2 |" -`; - -exports[`example.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -super(); - -=====================================output===================================== -super(); - -================================================================================ -`; diff --git a/tests/format/js/classes/top-level-super/format.test.js b/tests/format/js/classes/top-level-super/format.test.js new file mode 100644 index 000000000000..249d9b8eb861 --- /dev/null +++ b/tests/format/js/classes/top-level-super/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "typescript"], { + errors: { acorn: true, espree: true, meriyah: true }, +}); diff --git a/tests/format/js/classes/top-level-super/jsfmt.spec.js b/tests/format/js/classes/top-level-super/jsfmt.spec.js deleted file mode 100644 index 8caf42e4458c..000000000000 --- a/tests/format/js/classes/top-level-super/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/comments-closure-typecast/__snapshots__/format.test.js.snap b/tests/format/js/comments-closure-typecast/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..fae7b4d1a009 --- /dev/null +++ b/tests/format/js/comments-closure-typecast/__snapshots__/format.test.js.snap @@ -0,0 +1,717 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = /** @type A */ ({ + // comment + width, + height, + ...margins, +}); + +foo = /** @type A */ ([ + // comment + width, + height, + ...margins, +]); + +=====================================output===================================== +foo = /** @type A */ ({ + // comment + width, + height, + ...margins, +}); + +foo = /** @type A */ ([ + // comment + width, + height, + ...margins, +]); + +================================================================================ +`; + +exports[`binary-expr.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +var a = b || /** @type {string} */ + (c); + +=====================================output===================================== +var a = b || /** @type {string} */ (c); + +================================================================================ +`; + +exports[`closure-compiler-type-cast.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +// test to make sure comments are attached correctly +let inlineComment = /* some comment */ ( + someReallyLongFunctionCall(withLots, ofArguments)); + +let object = { + key: /* some comment */ (someReallyLongFunctionCall(withLots, ofArguments)) +}; + +// preserve parens only for type casts +let assignment = /** @type {string} */ (getValue()); +let value = /** @type {string} */ (this.members[0]).functionCall(); + +functionCall(1 + /** @type {string} */ (value), /** @type {!Foo} */ ({})); + +function returnValue() { + return /** @type {!Array.<string>} */ (['hello', 'you']); +} + +// Only numberOrString is typecast +var newArray = /** @type {array} */ (numberOrString).map(x => x); +var newArray = /** @type {array} */ ((numberOrString)).map(x => x); +var newArray = test(/** @type {array} */ (numberOrString).map(x => x)); +var newArray = test(/** @type {array} */ ((numberOrString)).map(x => x)); + +// The numberOrString.map CallExpression is typecast +var newArray = /** @type {array} */ (numberOrString.map(x => x)); +var newArray = /** @type {array} */ ((numberOrString).map(x => x)); +var newArray = test(/** @type {array} */ (numberOrString.map(x => x))); +var newArray = test(/** @type {array} */ ((numberOrString).map(x => x))); + +test(/** @type {number} */(num) + 1); +test(/** @type {!Array} */(arrOrString).length + 1); +test(/** @type {!Array} */((arrOrString)).length + 1); + +const data = functionCall( + arg1, + arg2, + /** @type {{height: number, width: number}} */ (arg3)); + +const style = /** @type {{ + width: number, + height: number, + marginTop: number, + marginLeft: number, + marginRight: number, + marginBottom: number, +}} */ ({ + width, + height, + ...margins, +}); + +const style2 =/** + * @type {{ + * width: number, + * }} +*/({ + width, +}); + + +=====================================output===================================== +// test to make sure comments are attached correctly +let inlineComment = /* some comment */ someReallyLongFunctionCall( + withLots, + ofArguments, +); + +let object = { + key: /* some comment */ someReallyLongFunctionCall(withLots, ofArguments), +}; + +// preserve parens only for type casts +let assignment = /** @type {string} */ (getValue()); +let value = /** @type {string} */ (this.members[0]).functionCall(); + +functionCall(1 + /** @type {string} */ (value), /** @type {!Foo} */ ({})); + +function returnValue() { + return /** @type {!Array.<string>} */ (["hello", "you"]); +} + +// Only numberOrString is typecast +var newArray = /** @type {array} */ (numberOrString).map((x) => x); +var newArray = /** @type {array} */ (numberOrString).map((x) => x); +var newArray = test(/** @type {array} */ (numberOrString).map((x) => x)); +var newArray = test(/** @type {array} */ (numberOrString).map((x) => x)); + +// The numberOrString.map CallExpression is typecast +var newArray = /** @type {array} */ (numberOrString.map((x) => x)); +var newArray = /** @type {array} */ (numberOrString.map((x) => x)); +var newArray = test(/** @type {array} */ (numberOrString.map((x) => x))); +var newArray = test(/** @type {array} */ (numberOrString.map((x) => x))); + +test(/** @type {number} */ (num) + 1); +test(/** @type {!Array} */ (arrOrString).length + 1); +test(/** @type {!Array} */ (arrOrString).length + 1); + +const data = functionCall( + arg1, + arg2, + /** @type {{height: number, width: number}} */ (arg3), +); + +const style = /** @type {{ + width: number, + height: number, + marginTop: number, + marginLeft: number, + marginRight: number, + marginBottom: number, +}} */ ({ + width, + height, + ...margins, +}); + +const style2 = /** + * @type {{ + * width: number, + * }} + */ ({ + width, +}); + +================================================================================ +`; + +exports[`comment-in-the-middle.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +var a = +/** + * bla bla bla + * @type {string | + * number + * } +* bla bla bla + */ +//2 + ((window['s'])).toString(); +console.log(a.foo()); + +=====================================output===================================== +var a = + /** + * bla bla bla + * @type {string | + * number + * } + * bla bla bla + */ + //2 + window["s"].toString(); +console.log(a.foo()); + +================================================================================ +`; + +exports[`comment-placement.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1 = /** @type {string} */ + (value); + +const foo2 = + /** @type {string} */ + (value); + +const foo3 = + + /** @type {string} */ + (value); + + +const foo4 = + /** @type {string} */(value); + +const foo5 = + /** @type {string} */ ( + value + ); + +=====================================output===================================== +const foo1 = /** @type {string} */ (value); + +const foo2 = + /** @type {string} */ + (value); + +const foo3 = + /** @type {string} */ + (value); + +const foo4 = /** @type {string} */ (value); + +const foo5 = /** @type {string} */ (value); + +================================================================================ +`; + +exports[`extra-spaces-and-asterisks.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1 = /** @type {!Foo} */(bar); +const foo2 = /** @type {!Foo} **/(bar); +const foo3 = /** @type {!Foo} * */(bar); +const foo4 = /** @type {!Foo} ***/(bar); +const foo5 = /** @type {!Foo} * * */(bar); +const foo6 = /** @type {!Foo} *****/(bar); +const foo7 = /** @type {!Foo} * * * * */(bar); +const foo8 = /** @type {!Foo} ** * * */(bar); + +=====================================output===================================== +const foo1 = /** @type {!Foo} */ (bar); +const foo2 = /** @type {!Foo} **/ (bar); +const foo3 = /** @type {!Foo} * */ (bar); +const foo4 = /** @type {!Foo} ***/ (bar); +const foo5 = /** @type {!Foo} * * */ (bar); +const foo6 = /** @type {!Foo} *****/ (bar); +const foo7 = /** @type {!Foo} * * * * */ (bar); +const foo8 = /** @type {!Foo} ** * * */ (bar); + +================================================================================ +`; + +exports[`iife.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const helpers1 = /** @type {Helpers} */ (( + (helpers = {}) => helpers +)()); + +const helpers2 = /** @type {Helpers} */ (( + function() { return something } +)()); + +// TODO: @param is misplaced https://github.com/prettier/prettier/issues/5850 +const helpers = /** @type {Helpers} */ (( + /** @param {Partial<Helpers>} helpers */ + (helpers = {}) => helpers +)()); + +=====================================output===================================== +const helpers1 = /** @type {Helpers} */ (((helpers = {}) => helpers)()); + +const helpers2 = /** @type {Helpers} */ ( + (function () { + return something; + })() +); + +// TODO: @param is misplaced https://github.com/prettier/prettier/issues/5850 +const helpers = /** @type {Helpers} */ ( + /** @param {Partial<Helpers>} helpers */ + ((helpers = {}) => helpers)() +); + +================================================================================ +`; + +exports[`iife-issue-5850-isolated.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = /** @param {*} b */ +((b) => {})(); + +=====================================output===================================== +const a = /** @param {*} b */ ((b) => {})(); + +================================================================================ +`; + +exports[`issue-4124.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @type {Object} */(myObject.property).someProp = true; +(/** @type {Object} */(myObject.property)).someProp = true; + +const prop = /** @type {Object} */(myObject.property).someProp; + +const test = /** @type (function (*): ?|undefined) */ + (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); + +const foo1 = /** @type (function (*): ?|undefined) */ (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); + +const model = /** @type {?{getIndex: Function}} */ (model); + +const foo = /** @type {string} */ + (bar); + +const foo2 = /** @type (function (*): ?|undefined) */ (foo); + +=====================================output===================================== +/** @type {Object} */ (myObject.property).someProp = true; +/** @type {Object} */ (myObject.property).someProp = true; + +const prop = /** @type {Object} */ (myObject.property).someProp; + +const test = + /** @type (function (*): ?|undefined) */ + (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); + +const foo1 = /** @type (function (*): ?|undefined) */ ( + goog.partial(NewThing.onTemplateChange, rationaleField, typeField) +); + +const model = /** @type {?{getIndex: Function}} */ (model); + +const foo = /** @type {string} */ (bar); + +const foo2 = /** @type (function (*): ?|undefined) */ (foo); + +================================================================================ +`; + +exports[`issue-8045.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); + +function jsdocCastInReturn() { + return /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); +} + +const myLongVariableFoo1 = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz); + +function jsdocCastInReturn() { + return (/** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz)); +} + +const myLongVariableFoo2 = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz); + +function jsdocCastInReturn() { + return (/** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz)); +} + +=====================================output===================================== +const myLongVariableName = + /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); + +function jsdocCastInReturn() { + return /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ ( + fooBarBaz + ); +} + +const myLongVariableFoo1 = + /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz); + +function jsdocCastInReturn() { + return ( + /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz) + ); +} + +const myLongVariableFoo2 = + /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz); + +function jsdocCastInReturn() { + return ( + /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ + (fooBarBaz) + ); +} + +================================================================================ +`; + +exports[`issue-9358.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fooooba1 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo); +const fooooba2 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems + foo); +const fooooba3 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo) ? foo : bar; +const fooooba4 = /** @type {Array.<fooo.barr.baaaaaaz>} */ + (fooobaarbazzItems || foo) ? foo : bar; + +=====================================output===================================== +const fooooba1 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( + fooobaarbazzItems || foo +); +const fooooba2 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( + fooobaarbazzItems + foo +); +const fooooba3 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( + fooobaarbazzItems || foo +) + ? foo + : bar; +const fooooba4 = + /** @type {Array.<fooo.barr.baaaaaaz>} */ + (fooobaarbazzItems || foo) ? foo : bar; + +================================================================================ +`; + +exports[`member.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = (/** @type {!Baz} */ (baz).bar); + +=====================================output===================================== +foo = /** @type {!Baz} */ (baz).bar; + +================================================================================ +`; + +exports[`nested.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = /** @type {!Foo} */ (/** @type {!Baz} */ (baz).bar ); + +const BarImpl = /** @type {BarConstructor} */ ( + /** @type {unknown} */ + (function Bar() { + throw new Error("Internal error: Illegal constructor"); + }) +); + +=====================================output===================================== +foo = /** @type {!Foo} */ (/** @type {!Baz} */ (baz).bar); + +const BarImpl = /** @type {BarConstructor} */ ( + /** @type {unknown} */ + ( + function Bar() { + throw new Error("Internal error: Illegal constructor"); + } + ) +); + +================================================================================ +`; + +exports[`non-casts.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* @type { } */ +z(x => { + (foo)((bar)(2+(3))) + return (1); +}) + +/** @type { } */ +z(x => { + (foo)((bar)(2+(3))) + return (1); +}) + +/** @type {number} */ +let q = z(x => { + return (1); +}) + +const w1 = /** @typefoo Foo */ (value); + +=====================================output===================================== +/* @type { } */ +z((x) => { + foo(bar(2 + 3)); + return 1; +}); + +/** @type { } */ +z((x) => { + foo(bar(2 + 3)); + return 1; +}); + +/** @type {number} */ +let q = z((x) => { + return 1; +}); + +const w1 = /** @typefoo Foo */ value; + +================================================================================ +`; + +exports[`object-with-comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const objectWithComment = /** @type MyType */ ( + /* comment */ + { + foo: bar + } +); + +const objectWithComment2 = /** @type MyType */ ( /* comment */ { + foo: bar + } +); + +=====================================output===================================== +const objectWithComment = /** @type MyType */ ( + /* comment */ + { + foo: bar, + } +); + +const objectWithComment2 = /** @type MyType */ ( + /* comment */ { + foo: bar, + } +); + +================================================================================ +`; + +exports[`satisfies.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +module.exports = /** @satisfies {Record<string, string>} */ ({ + hello: 1337, +}); + +=====================================output===================================== +module.exports = /** @satisfies {Record<string, string>} */ ({ + hello: 1337, +}); + +================================================================================ +`; + +exports[`styled-components.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const OverlapWrapper = + /** @type {import('styled-components').ThemedStyledFunction<'div',null,{overlap: boolean}>} */ + (styled.div)\` +position:relative; + > { + position: absolute; + bottom: \${p => p.overlap === 'previous' && 0}; +top: \${p => p.overlap === 'next' && 0}; +} +\` + +=====================================output===================================== +const OverlapWrapper = + /** @type {import('styled-components').ThemedStyledFunction<'div',null,{overlap: boolean}>} */ + (styled.div)\` + position: relative; + > { + position: absolute; + bottom: \${(p) => p.overlap === "previous" && 0}; + top: \${(p) => p.overlap === "next" && 0}; + } + \`; + +================================================================================ +`; + +exports[`superclass.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo extends /** @type {string} */ (Bar) {} + +=====================================output===================================== +class Foo extends /** @type {string} */ (Bar) {} + +================================================================================ +`; + +exports[`ways-to-specify-type.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const curlyBraces = /** @type {string} */ (foo); +const curlyBraces2 = /**@type {string} */ (foo); +const noWhitespace = /** @type{string} */ (foo); +const noWhitespace2 = /**@type{string} */ (foo); +const noBraces = /** @type string */ (foo); +const parens = /** @type (string | number) */ (foo); + +// Prettier just searches for "@type" and doesn't check the syntax of types. +const v1 = /** @type {} */ (value); +const v2 = /** @type {}} */ (value); +const v3 = /** @type } */ (value); +const v4 = /** @type { */ (value); +const v5 = /** @type {{} */ (value); + +=====================================output===================================== +const curlyBraces = /** @type {string} */ (foo); +const curlyBraces2 = /**@type {string} */ (foo); +const noWhitespace = /** @type{string} */ (foo); +const noWhitespace2 = /**@type{string} */ (foo); +const noBraces = /** @type string */ (foo); +const parens = /** @type (string | number) */ (foo); + +// Prettier just searches for "@type" and doesn't check the syntax of types. +const v1 = /** @type {} */ (value); +const v2 = /** @type {}} */ (value); +const v3 = /** @type } */ (value); +const v4 = /** @type { */ (value); +const v5 = /** @type {{} */ (value); + +================================================================================ +`; diff --git a/tests/format/js/comments-closure-typecast/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments-closure-typecast/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7fc196e42681..000000000000 --- a/tests/format/js/comments-closure-typecast/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,674 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binary-expr.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -var a = b || /** @type {string} */ - (c); - -=====================================output===================================== -var a = b || /** @type {string} */ (c); - -================================================================================ -`; - -exports[`closure-compiler-type-cast.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// test to make sure comments are attached correctly -let inlineComment = /* some comment */ ( - someReallyLongFunctionCall(withLots, ofArguments)); - -let object = { - key: /* some comment */ (someReallyLongFunctionCall(withLots, ofArguments)) -}; - -// preserve parens only for type casts -let assignment = /** @type {string} */ (getValue()); -let value = /** @type {string} */ (this.members[0]).functionCall(); - -functionCall(1 + /** @type {string} */ (value), /** @type {!Foo} */ ({})); - -function returnValue() { - return /** @type {!Array.<string>} */ (['hello', 'you']); -} - -// Only numberOrString is typecast -var newArray = /** @type {array} */ (numberOrString).map(x => x); -var newArray = /** @type {array} */ ((numberOrString)).map(x => x); -var newArray = test(/** @type {array} */ (numberOrString).map(x => x)); -var newArray = test(/** @type {array} */ ((numberOrString)).map(x => x)); - -// The numberOrString.map CallExpression is typecast -var newArray = /** @type {array} */ (numberOrString.map(x => x)); -var newArray = /** @type {array} */ ((numberOrString).map(x => x)); -var newArray = test(/** @type {array} */ (numberOrString.map(x => x))); -var newArray = test(/** @type {array} */ ((numberOrString).map(x => x))); - -test(/** @type {number} */(num) + 1); -test(/** @type {!Array} */(arrOrString).length + 1); -test(/** @type {!Array} */((arrOrString)).length + 1); - -const data = functionCall( - arg1, - arg2, - /** @type {{height: number, width: number}} */ (arg3)); - -const style = /** @type {{ - width: number, - height: number, - marginTop: number, - marginLeft: number, - marginRight: number, - marginBottom: number, -}} */ ({ - width, - height, - ...margins, -}); - -const style2 =/** - * @type {{ - * width: number, - * }} -*/({ - width, -}); - - -=====================================output===================================== -// test to make sure comments are attached correctly -let inlineComment = /* some comment */ someReallyLongFunctionCall( - withLots, - ofArguments -); - -let object = { - key: /* some comment */ someReallyLongFunctionCall(withLots, ofArguments), -}; - -// preserve parens only for type casts -let assignment = /** @type {string} */ (getValue()); -let value = /** @type {string} */ (this.members[0]).functionCall(); - -functionCall(1 + /** @type {string} */ (value), /** @type {!Foo} */ ({})); - -function returnValue() { - return /** @type {!Array.<string>} */ (["hello", "you"]); -} - -// Only numberOrString is typecast -var newArray = /** @type {array} */ (numberOrString).map((x) => x); -var newArray = /** @type {array} */ (numberOrString).map((x) => x); -var newArray = test(/** @type {array} */ (numberOrString).map((x) => x)); -var newArray = test(/** @type {array} */ (numberOrString).map((x) => x)); - -// The numberOrString.map CallExpression is typecast -var newArray = /** @type {array} */ (numberOrString.map((x) => x)); -var newArray = /** @type {array} */ (numberOrString.map((x) => x)); -var newArray = test(/** @type {array} */ (numberOrString.map((x) => x))); -var newArray = test(/** @type {array} */ (numberOrString.map((x) => x))); - -test(/** @type {number} */ (num) + 1); -test(/** @type {!Array} */ (arrOrString).length + 1); -test(/** @type {!Array} */ (arrOrString).length + 1); - -const data = functionCall( - arg1, - arg2, - /** @type {{height: number, width: number}} */ (arg3) -); - -const style = /** @type {{ - width: number, - height: number, - marginTop: number, - marginLeft: number, - marginRight: number, - marginBottom: number, -}} */ ({ - width, - height, - ...margins, -}); - -const style2 = /** - * @type {{ - * width: number, - * }} - */ ({ - width, -}); - -================================================================================ -`; - -exports[`comment-in-the-middle.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -var a = -/** - * bla bla bla - * @type {string | - * number - * } -* bla bla bla - */ -//2 - ((window['s'])).toString(); -console.log(a.foo()); - -=====================================output===================================== -var a = - /** - * bla bla bla - * @type {string | - * number - * } - * bla bla bla - */ - //2 - (window["s"]).toString(); -console.log(a.foo()); - -================================================================================ -`; - -exports[`comment-placement.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo1 = /** @type {string} */ - (value); - -const foo2 = - /** @type {string} */ - (value); - -const foo3 = - - /** @type {string} */ - (value); - - -const foo4 = - /** @type {string} */(value); - -const foo5 = - /** @type {string} */ ( - value - ); - -=====================================output===================================== -const foo1 = /** @type {string} */ (value); - -const foo2 = - /** @type {string} */ - (value); - -const foo3 = - /** @type {string} */ - (value); - -const foo4 = /** @type {string} */ (value); - -const foo5 = /** @type {string} */ (value); - -================================================================================ -`; - -exports[`extra-spaces-and-asterisks.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo1 = /** @type {!Foo} */(bar); -const foo2 = /** @type {!Foo} **/(bar); -const foo3 = /** @type {!Foo} * */(bar); -const foo4 = /** @type {!Foo} ***/(bar); -const foo5 = /** @type {!Foo} * * */(bar); -const foo6 = /** @type {!Foo} *****/(bar); -const foo7 = /** @type {!Foo} * * * * */(bar); -const foo8 = /** @type {!Foo} ** * * */(bar); - -=====================================output===================================== -const foo1 = /** @type {!Foo} */ (bar); -const foo2 = /** @type {!Foo} **/ (bar); -const foo3 = /** @type {!Foo} * */ (bar); -const foo4 = /** @type {!Foo} ***/ (bar); -const foo5 = /** @type {!Foo} * * */ (bar); -const foo6 = /** @type {!Foo} *****/ (bar); -const foo7 = /** @type {!Foo} * * * * */ (bar); -const foo8 = /** @type {!Foo} ** * * */ (bar); - -================================================================================ -`; - -exports[`iife.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const helpers1 = /** @type {Helpers} */ (( - (helpers = {}) => helpers -)()); - -const helpers2 = /** @type {Helpers} */ (( - function() { return something } -)()); - -// TODO: @param is misplaced https://github.com/prettier/prettier/issues/5850 -const helpers = /** @type {Helpers} */ (( - /** @param {Partial<Helpers>} helpers */ - (helpers = {}) => helpers -)()); - -=====================================output===================================== -const helpers1 = /** @type {Helpers} */ (((helpers = {}) => helpers)()); - -const helpers2 = /** @type {Helpers} */ ( - (function () { - return something; - })() -); - -// TODO: @param is misplaced https://github.com/prettier/prettier/issues/5850 -const helpers = /** @type {Helpers} */ ( - /** @param {Partial<Helpers>} helpers */ - ((helpers = {}) => helpers)() -); - -================================================================================ -`; - -exports[`iife-issue-5850-isolated.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = /** @param {*} b */ -((b) => {})(); - -=====================================output===================================== -const a = /** @param {*} b */ ((b) => {})(); - -================================================================================ -`; - -exports[`issue-4124.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -/** @type {Object} */(myObject.property).someProp = true; -(/** @type {Object} */(myObject.property)).someProp = true; - -const prop = /** @type {Object} */(myObject.property).someProp; - -const test = /** @type (function (*): ?|undefined) */ - (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); - -const test = /** @type (function (*): ?|undefined) */ (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); - -const model = /** @type {?{getIndex: Function}} */ (model); - -const foo = /** @type {string} */ - (bar); - -const test = /** @type (function (*): ?|undefined) */ (foo); - -=====================================output===================================== -/** @type {Object} */ (myObject.property).someProp = true; -/** @type {Object} */ (myObject.property).someProp = true; - -const prop = /** @type {Object} */ (myObject.property).someProp; - -const test = - /** @type (function (*): ?|undefined) */ - (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); - -const test = /** @type (function (*): ?|undefined) */ ( - goog.partial(NewThing.onTemplateChange, rationaleField, typeField) -); - -const model = /** @type {?{getIndex: Function}} */ (model); - -const foo = /** @type {string} */ (bar); - -const test = /** @type (function (*): ?|undefined) */ (foo); - -================================================================================ -`; - -exports[`issue-8045.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); - -function jsdocCastInReturn() { - return /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); -} - -const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz); - -function jsdocCastInReturn() { - return (/** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz)); -} - -const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz); - -function jsdocCastInReturn() { - return (/** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz)); -} - -=====================================output===================================== -const myLongVariableName = - /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); - -function jsdocCastInReturn() { - return /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ ( - fooBarBaz - ); -} - -const myLongVariableName = - /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz); - -function jsdocCastInReturn() { - return ( - /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz) - ); -} - -const myLongVariableName = - /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz); - -function jsdocCastInReturn() { - return ( - /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ - (fooBarBaz) - ); -} - -================================================================================ -`; - -exports[`issue-9358.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fooooba1 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo); -const fooooba2 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems + foo); -const fooooba3 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo) ? foo : bar; - -=====================================output===================================== -const fooooba1 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( - fooobaarbazzItems || foo -); -const fooooba2 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( - fooobaarbazzItems + foo -); -const fooooba3 = /** @type {Array.<fooo.barr.baaaaaaz>} */ ( - fooobaarbazzItems || foo -) - ? foo - : bar; - -================================================================================ -`; - -exports[`member.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = (/** @type {!Baz} */ (baz).bar); - -=====================================output===================================== -foo = /** @type {!Baz} */ (baz).bar; - -================================================================================ -`; - -exports[`nested.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = /** @type {!Foo} */ (/** @type {!Baz} */ (baz).bar ); - -const BarImpl = /** @type {BarConstructor} */ ( - /** @type {unknown} */ - (function Bar() { - throw new Error("Internal error: Illegal constructor"); - }) -); - -=====================================output===================================== -foo = /** @type {!Foo} */ (/** @type {!Baz} */ (baz).bar); - -const BarImpl = /** @type {BarConstructor} */ ( - /** @type {unknown} */ - ( - function Bar() { - throw new Error("Internal error: Illegal constructor"); - } - ) -); - -================================================================================ -`; - -exports[`non-casts.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* @type { } */ -z(x => { - (foo)((bar)(2+(3))) - return (1); -}) - -/** @type { } */ -z(x => { - (foo)((bar)(2+(3))) - return (1); -}) - -/** @type {number} */ -let q = z(x => { - return (1); -}) - -const w1 = /** @typefoo Foo */ (value); - -=====================================output===================================== -/* @type { } */ -z((x) => { - foo(bar(2 + 3)); - return 1; -}); - -/** @type { } */ -z((x) => { - foo(bar(2 + 3)); - return 1; -}); - -/** @type {number} */ -let q = z((x) => { - return 1; -}); - -const w1 = /** @typefoo Foo */ value; - -================================================================================ -`; - -exports[`object-with-comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const objectWithComment = /** @type MyType */ ( - /* comment */ - { - foo: bar - } -); - -const objectWithComment2 = /** @type MyType */ ( /* comment */ { - foo: bar - } -); - -=====================================output===================================== -const objectWithComment = /** @type MyType */ ( - /* comment */ - { - foo: bar, - } -); - -const objectWithComment2 = /** @type MyType */ ( - /* comment */ { - foo: bar, - } -); - -================================================================================ -`; - -exports[`satisfies.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -module.exports = /** @satisfies {Record<string, string>} */ ({ - hello: 1337, -}); - -=====================================output===================================== -module.exports = /** @satisfies {Record<string, string>} */ ({ - hello: 1337, -}); - -================================================================================ -`; - -exports[`styled-components.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const OverlapWrapper = - /** @type {import('styled-components').ThemedStyledFunction<'div',null,{overlap: boolean}>} */ - (styled.div)\` -position:relative; - > { - position: absolute; - bottom: \${p => p.overlap === 'previous' && 0}; -top: \${p => p.overlap === 'next' && 0}; -} -\` - -=====================================output===================================== -const OverlapWrapper = - /** @type {import('styled-components').ThemedStyledFunction<'div',null,{overlap: boolean}>} */ - (styled.div)\` - position: relative; - > { - position: absolute; - bottom: \${(p) => p.overlap === "previous" && 0}; - top: \${(p) => p.overlap === "next" && 0}; - } - \`; - -================================================================================ -`; - -exports[`superclass.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo extends /** @type {string} */ (Bar) {} - -=====================================output===================================== -class Foo extends /** @type {string} */ (Bar) {} - -================================================================================ -`; - -exports[`ways-to-specify-type.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const curlyBraces = /** @type {string} */ (foo); -const curlyBraces2 = /**@type {string} */ (foo); -const noWhitespace = /** @type{string} */ (foo); -const noWhitespace2 = /**@type{string} */ (foo); -const noBraces = /** @type string */ (foo); -const parens = /** @type (string | number) */ (foo); - -// Prettier just searches for "@type" and doesn't check the syntax of types. -const v1 = /** @type {} */ (value); -const v2 = /** @type {}} */ (value); -const v3 = /** @type } */ (value); -const v4 = /** @type { */ (value); -const v5 = /** @type {{} */ (value); - -=====================================output===================================== -const curlyBraces = /** @type {string} */ (foo); -const curlyBraces2 = /**@type {string} */ (foo); -const noWhitespace = /** @type{string} */ (foo); -const noWhitespace2 = /**@type{string} */ (foo); -const noBraces = /** @type string */ (foo); -const parens = /** @type (string | number) */ (foo); - -// Prettier just searches for "@type" and doesn't check the syntax of types. -const v1 = /** @type {} */ (value); -const v2 = /** @type {}} */ (value); -const v3 = /** @type } */ (value); -const v4 = /** @type { */ (value); -const v5 = /** @type {{} */ (value); - -================================================================================ -`; diff --git a/tests/format/js/comments-closure-typecast/array-and-object.js b/tests/format/js/comments-closure-typecast/array-and-object.js new file mode 100644 index 000000000000..7bf32e2d02d5 --- /dev/null +++ b/tests/format/js/comments-closure-typecast/array-and-object.js @@ -0,0 +1,13 @@ +foo = /** @type A */ ({ + // comment + width, + height, + ...margins, +}); + +foo = /** @type A */ ([ + // comment + width, + height, + ...margins, +]); diff --git a/tests/format/js/comments-closure-typecast/format.test.js b/tests/format/js/comments-closure-typecast/format.test.js new file mode 100644 index 000000000000..f509b709ec61 --- /dev/null +++ b/tests/format/js/comments-closure-typecast/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/js/comments-closure-typecast/issue-4124.js b/tests/format/js/comments-closure-typecast/issue-4124.js index da87ba6ba365..44c9ce127cab 100644 --- a/tests/format/js/comments-closure-typecast/issue-4124.js +++ b/tests/format/js/comments-closure-typecast/issue-4124.js @@ -6,11 +6,11 @@ const prop = /** @type {Object} */(myObject.property).someProp; const test = /** @type (function (*): ?|undefined) */ (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); -const test = /** @type (function (*): ?|undefined) */ (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); +const foo1 = /** @type (function (*): ?|undefined) */ (goog.partial(NewThing.onTemplateChange, rationaleField, typeField)); const model = /** @type {?{getIndex: Function}} */ (model); const foo = /** @type {string} */ (bar); -const test = /** @type (function (*): ?|undefined) */ (foo); +const foo2 = /** @type (function (*): ?|undefined) */ (foo); diff --git a/tests/format/js/comments-closure-typecast/issue-8045.js b/tests/format/js/comments-closure-typecast/issue-8045.js index 02c7fb2c7f07..ee1400285a56 100644 --- a/tests/format/js/comments-closure-typecast/issue-8045.js +++ b/tests/format/js/comments-closure-typecast/issue-8045.js @@ -4,7 +4,7 @@ function jsdocCastInReturn() { return /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); } -const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ +const myLongVariableFoo1 = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); function jsdocCastInReturn() { @@ -12,7 +12,7 @@ function jsdocCastInReturn() { (fooBarBaz)); } -const myLongVariableName = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ +const myLongVariableFoo2 = /** @type {ThisIsAVeryLongTypeThatShouldTriggerLineWrapping} */ (fooBarBaz); function jsdocCastInReturn() { diff --git a/tests/format/js/comments-closure-typecast/issue-9358.js b/tests/format/js/comments-closure-typecast/issue-9358.js index d98246653781..fcf881d5630b 100644 --- a/tests/format/js/comments-closure-typecast/issue-9358.js +++ b/tests/format/js/comments-closure-typecast/issue-9358.js @@ -1,3 +1,5 @@ const fooooba1 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo); const fooooba2 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems + foo); const fooooba3 = /** @type {Array.<fooo.barr.baaaaaaz>} */ (fooobaarbazzItems || foo) ? foo : bar; +const fooooba4 = /** @type {Array.<fooo.barr.baaaaaaz>} */ + (fooobaarbazzItems || foo) ? foo : bar; diff --git a/tests/format/js/comments-closure-typecast/jsfmt.spec.js b/tests/format/js/comments-closure-typecast/jsfmt.spec.js deleted file mode 100644 index 8382eddeb1db..000000000000 --- a/tests/format/js/comments-closure-typecast/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"]); diff --git a/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap b/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0746fc55c5c7 --- /dev/null +++ b/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap @@ -0,0 +1,136 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`pipeline_own_line.js [acorn] format 1`] = ` +"Unexpected token (4:3) + 2 | 0 + 3 | // Comment +> 4 | |> x + | ^ + 5 | } + 6 | + 7 | bifornCringerMoshedPerplexSawder( +Cause: Unexpected token (4:2)" +`; + +exports[`pipeline_own_line.js [espree] format 1`] = ` +"Unexpected token > (4:3) + 2 | 0 + 3 | // Comment +> 4 | |> x + | ^ + 5 | } + 6 | + 7 | bifornCringerMoshedPerplexSawder( +Cause: Unexpected token >" +`; + +exports[`pipeline_own_line.js [meriyah] format 1`] = ` +"Unexpected token: '>' (4:3) + 2 | 0 + 3 | // Comment +> 4 | |> x + | ^ + 5 | } + 6 | + 7 | bifornCringerMoshedPerplexSawder( +Cause: [4:2-4:3]: Unexpected token: '>'" +`; + +exports[`pipeline_own_line.js [oxc] format 1`] = ` +"Unexpected token (4:3) + 2 | 0 + 3 | // Comment +> 4 | |> x + | ^ + 5 | } + 6 | + 7 | bifornCringerMoshedPerplexSawder(" +`; + +exports[`pipeline_own_line.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +function pipeline() { + 0 + // Comment + |> x +} + +bifornCringerMoshedPerplexSawder( + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie, + averredBathersBoxroomBuggyNurl +) // comment +|> kochabCooieGameOnOboleUnweave +|> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder( + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie +) +|> foo // comment +|> kochabCooieGameOnOboleUnweave +|> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder[ + askTrovenaBeenaDependsRowans + + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl +] // comment +|> kochabCooieGameOnOboleUnweave +|> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder[ + askTrovenaBeenaDependsRowans + + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl +] +|> foo // comment +|> kochabCooieGameOnOboleUnweave +|> glimseGlyphsHazardNoopsTieTie; + +=====================================output===================================== +function pipeline() { + 0 |> + // Comment + x; +} + +bifornCringerMoshedPerplexSawder( + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie, + averredBathersBoxroomBuggyNurl, +) // comment + |> kochabCooieGameOnOboleUnweave + |> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder( + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie, +) + |> foo // comment + |> kochabCooieGameOnOboleUnweave + |> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder[ + askTrovenaBeenaDependsRowans + + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl +] // comment + |> kochabCooieGameOnOboleUnweave + |> glimseGlyphsHazardNoopsTieTie; + +bifornCringerMoshedPerplexSawder[ + askTrovenaBeenaDependsRowans + + glimseGlyphsHazardNoopsTieTie + + averredBathersBoxroomBuggyNurl +] + |> foo // comment + |> kochabCooieGameOnOboleUnweave + |> glimseGlyphsHazardNoopsTieTie; + +================================================================================ +`; diff --git a/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 67630267ba85..000000000000 --- a/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,122 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`pipeline_own_line.js [acorn] format 1`] = ` -"Unexpected token (4:3) - 2 | 0 - 3 | // Comment -> 4 | |> x - | ^ - 5 | } - 6 | - 7 | bifornCringerMoshedPerplexSawder(" -`; - -exports[`pipeline_own_line.js [espree] format 1`] = ` -"Unexpected token > (4:3) - 2 | 0 - 3 | // Comment -> 4 | |> x - | ^ - 5 | } - 6 | - 7 | bifornCringerMoshedPerplexSawder(" -`; - -exports[`pipeline_own_line.js [meriyah] format 1`] = ` -"Unexpected token: '>' (4:3) - 2 | 0 - 3 | // Comment -> 4 | |> x - | ^ - 5 | } - 6 | - 7 | bifornCringerMoshedPerplexSawder(" -`; - -exports[`pipeline_own_line.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -function pipeline() { - 0 - // Comment - |> x -} - -bifornCringerMoshedPerplexSawder( - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie, - averredBathersBoxroomBuggyNurl -) // comment -|> kochabCooieGameOnOboleUnweave -|> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder( - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie -) -|> foo // comment -|> kochabCooieGameOnOboleUnweave -|> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder[ - askTrovenaBeenaDependsRowans + - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl -] // comment -|> kochabCooieGameOnOboleUnweave -|> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder[ - askTrovenaBeenaDependsRowans + - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl -] -|> foo // comment -|> kochabCooieGameOnOboleUnweave -|> glimseGlyphsHazardNoopsTieTie; - -=====================================output===================================== -function pipeline() { - 0 |> - // Comment - x; -} - -bifornCringerMoshedPerplexSawder( - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie, - averredBathersBoxroomBuggyNurl -) // comment - |> kochabCooieGameOnOboleUnweave - |> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder( - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie -) - |> foo // comment - |> kochabCooieGameOnOboleUnweave - |> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder[ - askTrovenaBeenaDependsRowans + - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl -] // comment - |> kochabCooieGameOnOboleUnweave - |> glimseGlyphsHazardNoopsTieTie; - -bifornCringerMoshedPerplexSawder[ - askTrovenaBeenaDependsRowans + - glimseGlyphsHazardNoopsTieTie + - averredBathersBoxroomBuggyNurl -] - |> foo // comment - |> kochabCooieGameOnOboleUnweave - |> glimseGlyphsHazardNoopsTieTie; - -================================================================================ -`; diff --git a/tests/format/js/comments-pipeline-own-line/format.test.js b/tests/format/js/comments-pipeline-own-line/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/comments-pipeline-own-line/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/comments-pipeline-own-line/jsfmt.spec.js b/tests/format/js/comments-pipeline-own-line/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/comments-pipeline-own-line/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/comments/15661.js b/tests/format/js/comments/15661.js new file mode 100644 index 000000000000..a19c6411cf41 --- /dev/null +++ b/tests/format/js/comments/15661.js @@ -0,0 +1,71 @@ +!( + x || // foo + y || // bar + z /* + * comment + */ +) + +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); + +!( + a && // alpha + b || // bravo + c // charlie +); + +!( + x || // foo + (y && z) // bar +); + +!( + a || // first condition + (b || c) // second condition + || d // third condition +); + +void( + p && // first + q || // second + r && // third + s // fourth +); + +void( + cond1 || // foo + cond2 && // bar + cond3 || // baz + cond4 // qux +); + +!( + (cond1 && cond2) || // multi-cond1 + (cond3 || cond4) // multi-cond2 +); + +!( + (cond1 || cond2) && // complex-cond1 + (cond3 || cond4) || // complex-cond2 + cond5 // complex-cond3 +); + +void( + (condA || condB) && // test A + (condC || condD) || // test B + condE // test C +); + +void( + (x || y) && ( // nested + z || w) // comment for w +); + +!( + a && ( // begin nested + b || c) // end nested +); diff --git a/tests/format/js/comments/16398.js b/tests/format/js/comments/16398.js new file mode 100644 index 000000000000..38588282ac99 --- /dev/null +++ b/tests/format/js/comments/16398.js @@ -0,0 +1,5 @@ +if (foo) a = b; +/* foo */ else foo.split; + +if (foo) a = b; +else /* foo */ foo.split; diff --git a/tests/format/js/comments/__snapshots__/format.test.js.snap b/tests/format/js/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..43f6dd0380c0 --- /dev/null +++ b/tests/format/js/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,6952 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`15661.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +!( + x || // foo + y || // bar + z /* + * comment + */ +) + +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); + +!( + a && // alpha + b || // bravo + c // charlie +); + +!( + x || // foo + (y && z) // bar +); + +!( + a || // first condition + (b || c) // second condition + || d // third condition +); + +void( + p && // first + q || // second + r && // third + s // fourth +); + +void( + cond1 || // foo + cond2 && // bar + cond3 || // baz + cond4 // qux +); + +!( + (cond1 && cond2) || // multi-cond1 + (cond3 || cond4) // multi-cond2 +); + +!( + (cond1 || cond2) && // complex-cond1 + (cond3 || cond4) || // complex-cond2 + cond5 // complex-cond3 +); + +void( + (condA || condB) && // test A + (condC || condD) || // test B + condE // test C +); + +void( + (x || y) && ( // nested + z || w) // comment for w +); + +!( + a && ( // begin nested + b || c) // end nested +); + +=====================================output===================================== +!( + ( + x || // foo + y || // bar + z + ) /* + * comment + */ +) + +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +) + +!( + (a && // alpha + b) || // bravo + c // charlie +) + +!( + x || // foo + (y && z) // bar +) + +!( + a || // first condition + b || + c || // second condition + d // third condition +) + +void ( + ( + (p && // first + q) || // second + (r && // third + s) + ) // fourth +) + +void ( + cond1 || // foo + (cond2 && // bar + cond3) || // baz + cond4 // qux +) + +!( + (cond1 && cond2) || // multi-cond1 + cond3 || + cond4 // multi-cond2 +) + +!( + ((cond1 || cond2) && // complex-cond1 + (cond3 || cond4)) || // complex-cond2 + cond5 // complex-cond3 +) + +void ( + ((condA || condB) && // test A + (condC || condD)) || // test B + condE // test C +) + +void ( + (x || y) && // nested + (z || w) // comment for w +) + +!( + a && // begin nested + (b || c) // end nested +) + +================================================================================ +`; + +exports[`15661.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +!( + x || // foo + y || // bar + z /* + * comment + */ +) + +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); + +!( + a && // alpha + b || // bravo + c // charlie +); + +!( + x || // foo + (y && z) // bar +); + +!( + a || // first condition + (b || c) // second condition + || d // third condition +); + +void( + p && // first + q || // second + r && // third + s // fourth +); + +void( + cond1 || // foo + cond2 && // bar + cond3 || // baz + cond4 // qux +); + +!( + (cond1 && cond2) || // multi-cond1 + (cond3 || cond4) // multi-cond2 +); + +!( + (cond1 || cond2) && // complex-cond1 + (cond3 || cond4) || // complex-cond2 + cond5 // complex-cond3 +); + +void( + (condA || condB) && // test A + (condC || condD) || // test B + condE // test C +); + +void( + (x || y) && ( // nested + z || w) // comment for w +); + +!( + a && ( // begin nested + b || c) // end nested +); + +=====================================output===================================== +!( + ( + x || // foo + y || // bar + z + ) /* + * comment + */ +); + +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); + +!( + (a && // alpha + b) || // bravo + c // charlie +); + +!( + x || // foo + (y && z) // bar +); + +!( + a || // first condition + b || + c || // second condition + d // third condition +); + +void ( + ( + (p && // first + q) || // second + (r && // third + s) + ) // fourth +); + +void ( + cond1 || // foo + (cond2 && // bar + cond3) || // baz + cond4 // qux +); + +!( + (cond1 && cond2) || // multi-cond1 + cond3 || + cond4 // multi-cond2 +); + +!( + ((cond1 || cond2) && // complex-cond1 + (cond3 || cond4)) || // complex-cond2 + cond5 // complex-cond3 +); + +void ( + ((condA || condB) && // test A + (condC || condD)) || // test B + condE // test C +); + +void ( + (x || y) && // nested + (z || w) // comment for w +); + +!( + a && // begin nested + (b || c) // end nested +); + +================================================================================ +`; + +exports[`16398.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +if (foo) a = b; +/* foo */ else foo.split; + +if (foo) a = b; +else /* foo */ foo.split; + +=====================================output===================================== +if (foo) a = b +/* foo */ else foo.split + +if (foo) a = b +else /* foo */ foo.split + +================================================================================ +`; + +exports[`16398.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (foo) a = b; +/* foo */ else foo.split; + +if (foo) a = b; +else /* foo */ foo.split; + +=====================================output===================================== +if (foo) a = b; +/* foo */ else foo.split; + +if (foo) a = b; +else /* foo */ foo.split; + +================================================================================ +`; + +exports[`array-and-object.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +let object = // Comment +{ + key: 'value' +} + +let array = // Comment +[ + 'value' +] + +=====================================output===================================== +let object = + // Comment + { + key: "value", + } + +let array = + // Comment + ["value"] + +================================================================================ +`; + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let object = // Comment +{ + key: 'value' +} + +let array = // Comment +[ + 'value' +] + +=====================================output===================================== +let object = + // Comment + { + key: "value", + }; + +let array = + // Comment + ["value"]; + +================================================================================ +`; + +exports[`arrow.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const fn = (/*event, data*/) => doSomething(); + +const fn2 = (/*event, data*/) => doSomething(anything); + +=====================================output===================================== +const fn = (/*event, data*/) => doSomething() + +const fn2 = (/*event, data*/) => doSomething(anything) + +================================================================================ +`; + +exports[`arrow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn = (/*event, data*/) => doSomething(); + +const fn2 = (/*event, data*/) => doSomething(anything); + +=====================================output===================================== +const fn = (/*event, data*/) => doSomething(); + +const fn2 = (/*event, data*/) => doSomething(anything); + +================================================================================ +`; + +exports[`assignment-pattern.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const { a /* comment */ = 1 } = b; + +const { c = 1 /* comment */ } = d; + +let {d //comment += b} = c + +=====================================output===================================== +const { a /* comment */ = 1 } = b + +const { c = 1 /* comment */ } = d + +let { + d = b, //comment +} = c + +================================================================================ +`; + +exports[`assignment-pattern.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { a /* comment */ = 1 } = b; + +const { c = 1 /* comment */ } = d; + +let {d //comment += b} = c + +=====================================output===================================== +const { a /* comment */ = 1 } = b; + +const { c = 1 /* comment */ } = d; + +let { + d = b, //comment +} = c; + +================================================================================ +`; + +exports[`before-comma.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const foo = { + a: 'a' /* comment for this line */, + + /* Section B */ + b: 'b', +}; + +=====================================output===================================== +const foo = { + a: "a" /* comment for this line */, + + /* Section B */ + b: "b", +} + +================================================================================ +`; + +exports[`before-comma.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = { + a: 'a' /* comment for this line */, + + /* Section B */ + b: 'b', +}; + +=====================================output===================================== +const foo = { + a: "a" /* comment for this line */, + + /* Section B */ + b: "b", +}; + +================================================================================ +`; + +exports[`binary-expressions.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function addition() { + 0 + // Comment + + x +} + +function multiplication() { + 0 + // Comment + * x +} + +function division() { + 0 + // Comment + / x +} + +function substraction() { + 0 + // Comment + - x +} + +function remainder() { + 0 + // Comment + % x +} + +function exponentiation() { + 0 + // Comment + ** x +} + +function leftShift() { + 0 + // Comment + << x +} + +function rightShift() { + 0 + // Comment + >> x +} + +function unsignedRightShift() { + 0 + // Comment + >>> x +} + +function bitwiseAnd() { + 0 + // Comment + & x +} + +function bitwiseOr() { + 0 + // Comment + | x +} + +function bitwiseXor() { + 0 + // Comment + ^ x +} + +=====================================output===================================== +function addition() { + 0 + + // Comment + x +} + +function multiplication() { + 0 * + // Comment + x +} + +function division() { + 0 / + // Comment + x +} + +function substraction() { + 0 - + // Comment + x +} + +function remainder() { + 0 % + // Comment + x +} + +function exponentiation() { + 0 ** + // Comment + x +} + +function leftShift() { + 0 << + // Comment + x +} + +function rightShift() { + 0 >> + // Comment + x +} + +function unsignedRightShift() { + 0 >>> + // Comment + x +} + +function bitwiseAnd() { + 0 & + // Comment + x +} + +function bitwiseOr() { + 0 | + // Comment + x +} + +function bitwiseXor() { + 0 ^ + // Comment + x +} + +================================================================================ +`; + +exports[`binary-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function addition() { + 0 + // Comment + + x +} + +function multiplication() { + 0 + // Comment + * x +} + +function division() { + 0 + // Comment + / x +} + +function substraction() { + 0 + // Comment + - x +} + +function remainder() { + 0 + // Comment + % x +} + +function exponentiation() { + 0 + // Comment + ** x +} + +function leftShift() { + 0 + // Comment + << x +} + +function rightShift() { + 0 + // Comment + >> x +} + +function unsignedRightShift() { + 0 + // Comment + >>> x +} + +function bitwiseAnd() { + 0 + // Comment + & x +} + +function bitwiseOr() { + 0 + // Comment + | x +} + +function bitwiseXor() { + 0 + // Comment + ^ x +} + +=====================================output===================================== +function addition() { + 0 + + // Comment + x; +} + +function multiplication() { + 0 * + // Comment + x; +} + +function division() { + 0 / + // Comment + x; +} + +function substraction() { + 0 - + // Comment + x; +} + +function remainder() { + 0 % + // Comment + x; +} + +function exponentiation() { + 0 ** + // Comment + x; +} + +function leftShift() { + 0 << + // Comment + x; +} + +function rightShift() { + 0 >> + // Comment + x; +} + +function unsignedRightShift() { + 0 >>> + // Comment + x; +} + +function bitwiseAnd() { + 0 & + // Comment + x; +} + +function bitwiseOr() { + 0 | + // Comment + x; +} + +function bitwiseXor() { + 0 ^ + // Comment + x; +} + +================================================================================ +`; + +exports[`binary-expressions-block-comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a = b || /** Comment */ +c; + +a = b /** Comment */ || +c; + +a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || +c; + +a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b && /** Comment */ +c; + +a = b /** Comment */ && +c; + +a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && +c; + +a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b + /** Comment */ +c; + +a = b /** Comment */ + +c; + +a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + +c; + +a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; +=====================================output===================================== +a = b /** Comment */ || c + +a = b /** Comment */ || c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || + c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || + c + +a = + b || + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c + +a = b /** Comment */ && c + +a = b /** Comment */ && c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && + c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && + c + +a = + b && + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c + +a = b /** Comment */ + c + +a = b /** Comment */ + c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + + c + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + + c + +a = + b + + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c + +================================================================================ +`; + +exports[`binary-expressions-block-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = b || /** Comment */ +c; + +a = b /** Comment */ || +c; + +a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || +c; + +a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b && /** Comment */ +c; + +a = b /** Comment */ && +c; + +a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && +c; + +a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b + /** Comment */ +c; + +a = b /** Comment */ + +c; + +a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ +c; + +a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + +c; + +a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; +=====================================output===================================== +a = b /** Comment */ || c; + +a = b /** Comment */ || c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || + c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || + c; + +a = + b || + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b /** Comment */ && c; + +a = b /** Comment */ && c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && + c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && + c; + +a = + b && + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +a = b /** Comment */ + c; + +a = b /** Comment */ + c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + + c; + +a = + b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + + c; + +a = + b + + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; + +================================================================================ +`; + +exports[`binary-expressions-parens.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +Math.min( + ( + /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this comment and + * run flow */ + document.body.scrollHeight - + (window.scrollY + window.innerHeight) + ) - devsite_footer_height, + 0, +) + +=====================================output===================================== +Math.min( + /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this comment and + * run flow */ + document.body.scrollHeight - + (window.scrollY + window.innerHeight) - + devsite_footer_height, + 0, +) + +================================================================================ +`; + +exports[`binary-expressions-parens.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Math.min( + ( + /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this comment and + * run flow */ + document.body.scrollHeight - + (window.scrollY + window.innerHeight) + ) - devsite_footer_height, + 0, +) + +=====================================output===================================== +Math.min( + /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the + * deployment of v0.38.0. To see the error, remove this comment and + * run flow */ + document.body.scrollHeight - + (window.scrollY + window.innerHeight) - + devsite_footer_height, + 0, +); + +================================================================================ +`; + +exports[`binary-expressions-single-comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a = b || // Comment +c; + +a = b || // TODO this is a very very very very long comment that makes it go > 80 columns +c; + +a = b && // Comment +c; + +a = b && // TODO this is a very very very very long comment that makes it go > 80 columns +c; + +a = b + // Comment +c; + +a = b + // TODO this is a very very very very long comment that makes it go > 80 columns +c; +=====================================output===================================== +a = + b || // Comment + c + +a = + b || // TODO this is a very very very very long comment that makes it go > 80 columns + c + +a = + b && // Comment + c + +a = + b && // TODO this is a very very very very long comment that makes it go > 80 columns + c + +a = + b + // Comment + c + +a = + b + // TODO this is a very very very very long comment that makes it go > 80 columns + c + +================================================================================ +`; + +exports[`binary-expressions-single-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = b || // Comment +c; + +a = b || // TODO this is a very very very very long comment that makes it go > 80 columns +c; + +a = b && // Comment +c; + +a = b && // TODO this is a very very very very long comment that makes it go > 80 columns +c; + +a = b + // Comment +c; + +a = b + // TODO this is a very very very very long comment that makes it go > 80 columns +c; +=====================================output===================================== +a = + b || // Comment + c; + +a = + b || // TODO this is a very very very very long comment that makes it go > 80 columns + c; + +a = + b && // Comment + c; + +a = + b && // TODO this is a very very very very long comment that makes it go > 80 columns + c; + +a = + b + // Comment + c; + +a = + b + // TODO this is a very very very very long comment that makes it go > 80 columns + c; + +================================================================================ +`; + +exports[`blank.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// This file only +// has comments. This comment +// should still exist +// +// when printed. + +/** + * @typedef {DataDrivenMapping|ConstantMapping} Mapping + */ +/** + * @typedef {Object.<String, Mapping>} ConfigurationMapping + */ + +/** + * @typedef {Function} D3Scale - a D3 scale + * @property {Function} ticks + * @property {Function} tickFormat + */ +// comment + +// comment + +=====================================output===================================== +// This file only +// has comments. This comment +// should still exist +// +// when printed. + +/** + * @typedef {DataDrivenMapping|ConstantMapping} Mapping + */ +/** + * @typedef {Object.<String, Mapping>} ConfigurationMapping + */ + +/** + * @typedef {Function} D3Scale - a D3 scale + * @property {Function} ticks + * @property {Function} tickFormat + */ +// comment + +// comment + +================================================================================ +`; + +exports[`blank.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// This file only +// has comments. This comment +// should still exist +// +// when printed. + +/** + * @typedef {DataDrivenMapping|ConstantMapping} Mapping + */ +/** + * @typedef {Object.<String, Mapping>} ConfigurationMapping + */ + +/** + * @typedef {Function} D3Scale - a D3 scale + * @property {Function} ticks + * @property {Function} tickFormat + */ +// comment + +// comment + +=====================================output===================================== +// This file only +// has comments. This comment +// should still exist +// +// when printed. + +/** + * @typedef {DataDrivenMapping|ConstantMapping} Mapping + */ +/** + * @typedef {Object.<String, Mapping>} ConfigurationMapping + */ + +/** + * @typedef {Function} D3Scale - a D3 scale + * @property {Function} ticks + * @property {Function} tickFormat + */ +// comment + +// comment + +================================================================================ +`; + +exports[`break-continue-statements.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +for (;;) { + break /* comment */; + continue /* comment */; +} + +loop: for (;;) { + break /* comment */ loop; + break loop /* comment */; + continue /* comment */ loop; + continue loop /* comment */; +} + +=====================================output===================================== +for (;;) { + break /* comment */ + continue /* comment */ +} + +loop: for (;;) { + break /* comment */ loop + break loop /* comment */ + continue /* comment */ loop + continue loop /* comment */ +} + +================================================================================ +`; + +exports[`break-continue-statements.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (;;) { + break /* comment */; + continue /* comment */; +} + +loop: for (;;) { + break /* comment */ loop; + break loop /* comment */; + continue /* comment */ loop; + continue loop /* comment */; +} + +=====================================output===================================== +for (;;) { + break; /* comment */ + continue; /* comment */ +} + +loop: for (;;) { + break /* comment */ loop; + break loop /* comment */; + continue /* comment */ loop; + continue loop /* comment */; +} + +================================================================================ +`; + +exports[`call_comment.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +render( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +React.render( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +render?.( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +=====================================output===================================== +render( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +) + +React.render( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +) + +render?.( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +) + +================================================================================ +`; + +exports[`call_comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +render( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +React.render( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +render?.( // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container +); + +=====================================output===================================== +render( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +); + +React.render( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +); + +render?.( + // Warm any cache + <ChildUpdates renderAnchor={true} anchorClassOn={true} />, + container, +); + +================================================================================ +`; + +exports[`class.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// #8718 +class C { + ma() {} /* D */ /* E */ + mb() {} +} + +class D { + ma() {} /* D */ /* E */ /* F */ + mb() {} +} + +=====================================output===================================== +// #8718 +class C { + ma() {} /* D */ /* E */ + mb() {} +} + +class D { + ma() {} /* D */ /* E */ /* F */ + mb() {} +} + +================================================================================ +`; + +exports[`class.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #8718 +class C { + ma() {} /* D */ /* E */ + mb() {} +} + +class D { + ma() {} /* D */ /* E */ /* F */ + mb() {} +} + +=====================================output===================================== +// #8718 +class C { + ma() {} /* D */ /* E */ + mb() {} +} + +class D { + ma() {} /* D */ /* E */ /* F */ + mb() {} +} + +================================================================================ +`; + +exports[`dangling.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +var a = {/* dangling */}; +var b = { + // dangling +}; +var b = [/* dangling */]; +function d() { + /* dangling */ +} +new Thing(/* dangling */); +Thing(/* dangling */); +export /* dangling */{}; + +=====================================output===================================== +var a = { + /* dangling */ +} +var b = { + // dangling +} +var b = [ + /* dangling */ +] +function d() { + /* dangling */ +} +new Thing(/* dangling */) +Thing(/* dangling */) +export /* dangling */ {} + +================================================================================ +`; + +exports[`dangling.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var a = {/* dangling */}; +var b = { + // dangling +}; +var b = [/* dangling */]; +function d() { + /* dangling */ +} +new Thing(/* dangling */); +Thing(/* dangling */); +export /* dangling */{}; + +=====================================output===================================== +var a = { + /* dangling */ +}; +var b = { + // dangling +}; +var b = [ + /* dangling */ +]; +function d() { + /* dangling */ +} +new Thing(/* dangling */); +Thing(/* dangling */); +export /* dangling */ {}; + +================================================================================ +`; + +exports[`dangling_array.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +expect(() => {}).toTriggerReadyStateChanges([ + // Nothing. +]); + +[1 /* first comment */, 2 /* second comment */, 3]; + +=====================================output===================================== +expect(() => {}).toTriggerReadyStateChanges([ + // Nothing. +]) + +;[1 /* first comment */, 2 /* second comment */, 3] + +================================================================================ +`; + +exports[`dangling_array.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +expect(() => {}).toTriggerReadyStateChanges([ + // Nothing. +]); + +[1 /* first comment */, 2 /* second comment */, 3]; + +=====================================output===================================== +expect(() => {}).toTriggerReadyStateChanges([ + // Nothing. +]); + +[1 /* first comment */, 2 /* second comment */, 3]; + +================================================================================ +`; + +exports[`dangling_for.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +for // comment +(;;); + +for /* comment */(;;); + +=====================================output===================================== +// comment +for (;;); + +/* comment */ +for (;;); + +================================================================================ +`; + +exports[`dangling_for.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for // comment +(;;); + +for /* comment */(;;); + +=====================================output===================================== +// comment +for (;;); + +/* comment */ +for (;;); + +================================================================================ +`; + +exports[`dynamic_imports.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import(/* Hello */ 'something') + +import('something' /* Hello */) + +import(/* Hello */ 'something' /* Hello */) + +import('something' /* Hello */ + 'else') + +import( + /* Hello */ + 'something' + /* Hello */ +) + +wrap( + import(/* Hello */ + 'something' + ) +) + +=====================================output===================================== +import(/* Hello */ "something") + +import("something" /* Hello */) + +import(/* Hello */ "something" /* Hello */) + +import("something" /* Hello */ + "else") + +import( + /* Hello */ + "something" + /* Hello */ +) + +wrap(import(/* Hello */ "something")) + +================================================================================ +`; + +exports[`dynamic_imports.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import(/* Hello */ 'something') + +import('something' /* Hello */) + +import(/* Hello */ 'something' /* Hello */) + +import('something' /* Hello */ + 'else') + +import( + /* Hello */ + 'something' + /* Hello */ +) + +wrap( + import(/* Hello */ + 'something' + ) +) + +=====================================output===================================== +import(/* Hello */ "something"); + +import("something" /* Hello */); + +import(/* Hello */ "something" /* Hello */); + +import("something" /* Hello */ + "else"); + +import( + /* Hello */ + "something" + /* Hello */ +); + +wrap(import(/* Hello */ "something")); + +================================================================================ +`; + +exports[`emoji.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +/* #2091 */ + +const test = '💖' +// This comment +// should not get collapsed + +=====================================output===================================== +/* #2091 */ + +const test = "💖" +// This comment +// should not get collapsed + +================================================================================ +`; + +exports[`emoji.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* #2091 */ + +const test = '💖' +// This comment +// should not get collapsed + +=====================================output===================================== +/* #2091 */ + +const test = "💖"; +// This comment +// should not get collapsed + +================================================================================ +`; + +exports[`empty-statements.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a; /* a */ // b +; /* c */ + +foo; // first +;// second +;// third + +function x() { +} // first +; // second + +a = ( + b // 1 + + // 2 + c // 3 + + // 4 + d // 5 + + /* 6 */ + e // 7 +); + +=====================================output===================================== +a /* a */ // b +/* c */ +foo // first +// second +// third +function x() {} // first +// second +a = + b + // 1 + // 2 + c + // 3 + // 4 + d + // 5 + /* 6 */ + e // 7 + +================================================================================ +`; + +exports[`empty-statements.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a; /* a */ // b +; /* c */ + +foo; // first +;// second +;// third + +function x() { +} // first +; // second + +a = ( + b // 1 + + // 2 + c // 3 + + // 4 + d // 5 + + /* 6 */ + e // 7 +); + +=====================================output===================================== +a; /* a */ // b +/* c */ +foo; // first +// second +// third +function x() {} // first +// second +a = + b + // 1 + // 2 + c + // 3 + // 4 + d + // 5 + /* 6 */ + e; // 7 + +================================================================================ +`; + +exports[`export.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +export //comment +{} + +export /* comment */ {}; + +const foo = '' +export { + foo // comment +} + +const bar = '' +export { + // comment + bar +} + +const fooo = '' +const barr = '' +export { + fooo, // comment + barr, // comment +} + +const foooo = '' +const barrr = '' +export { + foooo, + + barrr as // comment + baz, +} from 'foo' + +const fooooo = '' +const barrrr = '' +export { + fooooo, + + barrrr as // comment + bazz, +} + +=====================================output===================================== +export //comment + {} + +export /* comment */ {} + +const foo = "" +export { + foo, // comment +} + +const bar = "" +export { + // comment + bar, +} + +const fooo = "" +const barr = "" +export { + fooo, // comment + barr, // comment +} + +const foooo = "" +const barrr = "" +export { + foooo, + // comment + barrr as baz, +} from "foo" + +const fooooo = "" +const barrrr = "" +export { + fooooo, + // comment + barrrr as bazz, +} + +================================================================================ +`; + +exports[`export.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export //comment +{} + +export /* comment */ {}; + +const foo = '' +export { + foo // comment +} + +const bar = '' +export { + // comment + bar +} + +const fooo = '' +const barr = '' +export { + fooo, // comment + barr, // comment +} + +const foooo = '' +const barrr = '' +export { + foooo, + + barrr as // comment + baz, +} from 'foo' + +const fooooo = '' +const barrrr = '' +export { + fooooo, + + barrrr as // comment + bazz, +} + +=====================================output===================================== +export //comment + {}; + +export /* comment */ {}; + +const foo = ""; +export { + foo, // comment +}; + +const bar = ""; +export { + // comment + bar, +}; + +const fooo = ""; +const barr = ""; +export { + fooo, // comment + barr, // comment +}; + +const foooo = ""; +const barrr = ""; +export { + foooo, + // comment + barrr as baz, +} from "foo"; + +const fooooo = ""; +const barrrr = ""; +export { + fooooo, + // comment + barrrr as bazz, +}; + +================================================================================ +`; + +exports[`export-and-import.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// These are tests to compare comment formats in \`export\` and \`import\`. + +export { + foo, + + bar as // comment + baz, +} from 'foo' + +const fooo = "" +const barr = "" + +export { + fooo, + + barr as // comment + bazz, +} + +import { + foo, + + bar as // comment + baz, +} from 'foo' + +=====================================output===================================== +// These are tests to compare comment formats in \`export\` and \`import\`. + +export { + foo, + // comment + bar as baz, +} from "foo" + +const fooo = "" +const barr = "" + +export { + fooo, + // comment + barr as bazz, +} + +import { + foo, + // comment + bar as baz, +} from "foo" + +================================================================================ +`; + +exports[`export-and-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// These are tests to compare comment formats in \`export\` and \`import\`. + +export { + foo, + + bar as // comment + baz, +} from 'foo' + +const fooo = "" +const barr = "" + +export { + fooo, + + barr as // comment + bazz, +} + +import { + foo, + + bar as // comment + baz, +} from 'foo' + +=====================================output===================================== +// These are tests to compare comment formats in \`export\` and \`import\`. + +export { + foo, + // comment + bar as baz, +} from "foo"; + +const fooo = ""; +const barr = ""; + +export { + fooo, + // comment + barr as bazz, +}; + +import { + foo, + // comment + bar as baz, +} from "foo"; + +================================================================================ +`; + +exports[`first-line.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a // comment +b + +=====================================output===================================== +a // comment +b + +================================================================================ +`; + +exports[`first-line.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a // comment +b + +=====================================output===================================== +a; // comment +b; + +================================================================================ +`; + +exports[`function-declaration.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function a(/* comment */) {} // comment +function b() {} // comment +function c(/* comment */ argA, argB, argC) {} // comment +call((/*object*/ row) => {}); +KEYPAD_NUMBERS.map(num => ( // Buttons 0-9 + <div /> +)); + +function f1 /* f */() {} +function f2 (/* args */) {} +function f3 () /* returns */ {} +function f4 /* f */(/* args */) /* returns */ {} + +function f5 /* f */(/* a */ a) {} +function f6 /* f */(a /* a */) {} +function f7 /* f */(/* a */ a) /* returns */ {} + +const obj = { + f1 /* f */() {}, + f2 (/* args */) {}, + f3 () /* returns */ {}, + f4 /* f */(/* args */) /* returns */ {}, +}; + +(function f /* f */() {})(); +(function f (/* args */) {})(); +(function f () /* returns */ {})(); +(function f /* f */(/* args */) /* returns */ {})(); + +class C1 { + f/* f */() {} +} +class C2 { + f(/* args */) {} +} +class C3 { + f() /* returns */ {} +} +class C4 { + f/* f */(/* args */) /* returns */ {} +} + +function foo1() +// this is a function +{ + return 42 +} + +function foo2() // this is a function +{ + return 42 +} + +function foo3() { // this is a function + return 42 +} + +function foo4() { + // this is a function + return 42; +} + +=====================================output===================================== +function a(/* comment */) {} // comment +function b() {} // comment +function c(/* comment */ argA, argB, argC) {} // comment +call((/*object*/ row) => {}) +KEYPAD_NUMBERS.map( + ( + num, // Buttons 0-9 + ) => <div />, +) + +function f1 /* f */() {} +function f2(/* args */) {} +function f3() /* returns */ {} +function f4 /* f */(/* args */) /* returns */ {} + +function f5 /* f */(/* a */ a) {} +function f6 /* f */(a /* a */) {} +function f7 /* f */(/* a */ a) /* returns */ {} + +const obj = { + f1 /* f */() {}, + f2(/* args */) {}, + f3() /* returns */ {}, + f4 /* f */(/* args */) /* returns */ {}, +} + +;(function f /* f */() {})() +;(function f(/* args */) {})() +;(function f() /* returns */ {})() +;(function f /* f */(/* args */) /* returns */ {})() + +class C1 { + f /* f */() {} +} +class C2 { + f(/* args */) {} +} +class C3 { + f() /* returns */ {} +} +class C4 { + f /* f */(/* args */) /* returns */ {} +} + +function foo1() { + // this is a function + return 42 +} + +function foo2() { + // this is a function + return 42 +} + +function foo3() { + // this is a function + return 42 +} + +function foo4() { + // this is a function + return 42 +} + +================================================================================ +`; + +exports[`function-declaration.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a(/* comment */) {} // comment +function b() {} // comment +function c(/* comment */ argA, argB, argC) {} // comment +call((/*object*/ row) => {}); +KEYPAD_NUMBERS.map(num => ( // Buttons 0-9 + <div /> +)); + +function f1 /* f */() {} +function f2 (/* args */) {} +function f3 () /* returns */ {} +function f4 /* f */(/* args */) /* returns */ {} + +function f5 /* f */(/* a */ a) {} +function f6 /* f */(a /* a */) {} +function f7 /* f */(/* a */ a) /* returns */ {} + +const obj = { + f1 /* f */() {}, + f2 (/* args */) {}, + f3 () /* returns */ {}, + f4 /* f */(/* args */) /* returns */ {}, +}; + +(function f /* f */() {})(); +(function f (/* args */) {})(); +(function f () /* returns */ {})(); +(function f /* f */(/* args */) /* returns */ {})(); + +class C1 { + f/* f */() {} +} +class C2 { + f(/* args */) {} +} +class C3 { + f() /* returns */ {} +} +class C4 { + f/* f */(/* args */) /* returns */ {} +} + +function foo1() +// this is a function +{ + return 42 +} + +function foo2() // this is a function +{ + return 42 +} + +function foo3() { // this is a function + return 42 +} + +function foo4() { + // this is a function + return 42; +} + +=====================================output===================================== +function a(/* comment */) {} // comment +function b() {} // comment +function c(/* comment */ argA, argB, argC) {} // comment +call((/*object*/ row) => {}); +KEYPAD_NUMBERS.map( + ( + num, // Buttons 0-9 + ) => <div />, +); + +function f1 /* f */() {} +function f2(/* args */) {} +function f3() /* returns */ {} +function f4 /* f */(/* args */) /* returns */ {} + +function f5 /* f */(/* a */ a) {} +function f6 /* f */(a /* a */) {} +function f7 /* f */(/* a */ a) /* returns */ {} + +const obj = { + f1 /* f */() {}, + f2(/* args */) {}, + f3() /* returns */ {}, + f4 /* f */(/* args */) /* returns */ {}, +}; + +(function f /* f */() {})(); +(function f(/* args */) {})(); +(function f() /* returns */ {})(); +(function f /* f */(/* args */) /* returns */ {})(); + +class C1 { + f /* f */() {} +} +class C2 { + f(/* args */) {} +} +class C3 { + f() /* returns */ {} +} +class C4 { + f /* f */(/* args */) /* returns */ {} +} + +function foo1() { + // this is a function + return 42; +} + +function foo2() { + // this is a function + return 42; +} + +function foo3() { + // this is a function + return 42; +} + +function foo4() { + // this is a function + return 42; +} + +================================================================================ +`; + +exports[`if.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +if (1) +// comment +{ + false +} +// comment +else if (2) + true +// multi +// ple +// lines +else if (3) + // existing comment + true +// okay? +else if (4) { + // empty with existing comment +} +// comment +else { +} + +if (5) // comment +true + +if (6) // comment +{true} +else if (7) // comment +true +else // comment +{true} + +if (8) // comment +// comment +{true} +else if (9) // comment +// comment +true +else // comment +// comment +{true} + +if (10) /* comment */ // comment +{true} +else if (11) /* comment */ +true +else if (12) // comment /* comment */ // comment +true +else if (13) /* comment */ /* comment */ // comment +true +else /* comment */ +{true} + +if (14) // comment +/* comment */ +// comment +{true} +else if (15) // comment +/* comment */ +/* comment */ // comment +true + +=====================================output===================================== +if (1) { + // comment + false +} +// comment +else if (2) true +// multi +// ple +// lines +else if (3) + // existing comment + true +// okay? +else if (4) { + // empty with existing comment +} +// comment +else { +} + +if (5) + // comment + true + +if (6) { + // comment + true +} else if (7) + // comment + true +// comment +else { + true +} + +if (8) { + // comment + // comment + true +} else if (9) + // comment + // comment + true +// comment +// comment +else { + true +} + +if (10) { + /* comment */ // comment + true +} else if (11) /* comment */ true +else if (12) + // comment /* comment */ // comment + true +else if (13) + /* comment */ /* comment */ // comment + true +/* comment */ else { + true +} + +if (14) { + // comment + /* comment */ + // comment + true +} else if (15) + // comment + /* comment */ + /* comment */ // comment + true + +================================================================================ +`; + +exports[`if.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (1) +// comment +{ + false +} +// comment +else if (2) + true +// multi +// ple +// lines +else if (3) + // existing comment + true +// okay? +else if (4) { + // empty with existing comment +} +// comment +else { +} + +if (5) // comment +true + +if (6) // comment +{true} +else if (7) // comment +true +else // comment +{true} + +if (8) // comment +// comment +{true} +else if (9) // comment +// comment +true +else // comment +// comment +{true} + +if (10) /* comment */ // comment +{true} +else if (11) /* comment */ +true +else if (12) // comment /* comment */ // comment +true +else if (13) /* comment */ /* comment */ // comment +true +else /* comment */ +{true} + +if (14) // comment +/* comment */ +// comment +{true} +else if (15) // comment +/* comment */ +/* comment */ // comment +true + +=====================================output===================================== +if (1) { + // comment + false; +} +// comment +else if (2) true; +// multi +// ple +// lines +else if (3) + // existing comment + true; +// okay? +else if (4) { + // empty with existing comment +} +// comment +else { +} + +if (5) + // comment + true; + +if (6) { + // comment + true; +} else if (7) + // comment + true; +// comment +else { + true; +} + +if (8) { + // comment + // comment + true; +} else if (9) + // comment + // comment + true; +// comment +// comment +else { + true; +} + +if (10) { + /* comment */ // comment + true; +} else if (11) /* comment */ true; +else if (12) + // comment /* comment */ // comment + true; +else if (13) + /* comment */ /* comment */ // comment + true; +/* comment */ else { + true; +} + +if (14) { + // comment + /* comment */ + // comment + true; +} else if (15) + // comment + /* comment */ + /* comment */ // comment + true; + +================================================================================ +`; + +exports[`issue-3532.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import React from 'react'; + +/* +import styled from 'react-emotion'; + +const AspectRatioBox = styled.div\` + &::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + padding-top: \${props => 100 / props.aspectRatio}%; + } + + &::after { + /* To clear float *//* + content: ''; + display: table; + clear: both; + } +\`; +*/ + +const AspectRatioBox = ({ + aspectRatio, + children, + ...props +}) => ( + <div + className={\`height: 0; + overflow: hidden; + padding-top: \${props => 100 / props.aspectRatio}%; + background: white; + position: relative;\`} + > + <div>{children}</div> + </div> +); + +export default AspectRatioBox; + +=====================================output===================================== +import React from "react" + +/* +import styled from 'react-emotion'; + +const AspectRatioBox = styled.div\` + &::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + padding-top: \${props => 100 / props.aspectRatio}%; + } + + &::after { + /* To clear float */ /* + content: ''; + display: table; + clear: both; + } +\`; +*/ + +const AspectRatioBox = ({ aspectRatio, children, ...props }) => ( + <div + className={\`height: 0; + overflow: hidden; + padding-top: \${(props) => 100 / props.aspectRatio}%; + background: white; + position: relative;\`} + > + <div>{children}</div> + </div> +) + +export default AspectRatioBox + +================================================================================ +`; + +exports[`issue-3532.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import React from 'react'; + +/* +import styled from 'react-emotion'; + +const AspectRatioBox = styled.div\` + &::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + padding-top: \${props => 100 / props.aspectRatio}%; + } + + &::after { + /* To clear float *//* + content: ''; + display: table; + clear: both; + } +\`; +*/ + +const AspectRatioBox = ({ + aspectRatio, + children, + ...props +}) => ( + <div + className={\`height: 0; + overflow: hidden; + padding-top: \${props => 100 / props.aspectRatio}%; + background: white; + position: relative;\`} + > + <div>{children}</div> + </div> +); + +export default AspectRatioBox; + +=====================================output===================================== +import React from "react"; + +/* +import styled from 'react-emotion'; + +const AspectRatioBox = styled.div\` + &::before { + content: ''; + width: 1px; + margin-left: -1px; + float: left; + height: 0; + padding-top: \${props => 100 / props.aspectRatio}%; + } + + &::after { + /* To clear float */ /* + content: ''; + display: table; + clear: both; + } +\`; +*/ + +const AspectRatioBox = ({ aspectRatio, children, ...props }) => ( + <div + className={\`height: 0; + overflow: hidden; + padding-top: \${(props) => 100 / props.aspectRatio}%; + background: white; + position: relative;\`} + > + <div>{children}</div> + </div> +); + +export default AspectRatioBox; + +================================================================================ +`; + +exports[`issues.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// Does not need to break as it fits in 80 columns +this.call(a, /* comment */ b); + +// Comments should either stay at the end of the line or always before, but +// not one before and one after. +throw new ProcessSystemError({ + code: acc.error.code, // Alias of errno + originalError: acc.error, // Just in case. +}); + +// Missing one level of indentation because of the comment +const rootEpic = (actions, store) => ( + combineEpics(...epics)(actions, store) + // Log errors and continue. + .catch((err, stream) => { + getLogger().error(err); + return stream; + }) +); + +// optional trailing comma gets moved all the way to the beginning +const regex = new RegExp( + '^\\\\s*' + // beginning of the line + 'name\\\\s*=\\\\s*' + // name = + '[\\'"]' + // opening quotation mark + escapeStringRegExp(target.name) + // target name + '[\\'"]' + // closing quotation mark + ',?$', // optional trailing comma +); + +// The comment is moved and doesn't trigger the eslint rule anymore +import path from 'path'; // eslint-disable-line nuclide-internal/prefer-nuclide-uri + +// Comments disappear in-between MemberExpressions +Observable.of(process) + // Don't complete until we say so! + .merge(Observable.never()) + // Get the errors. + .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) + .takeUntil(exit); + +// Comments disappear inside of JSX +<div> + {/* Some comment */} +</div>; + +// Comments in JSX tag are placed in a non optimal way +<div + // comment +/>; + +// Comments disappear in empty blocks +if (1) { + // Comment +} + +// Comments trigger invalid JavaScript in-between else if +if (1) { +} +// Comment +else { + +} + +// The comment makes the line break in a weird way +const result = asyncExecute('non_existing_command', /* args */ []); + +// The closing paren is printed on the same line as the comment +foo({} + // Hi +); + +=====================================output===================================== +// Does not need to break as it fits in 80 columns +this.call(a, /* comment */ b) + +// Comments should either stay at the end of the line or always before, but +// not one before and one after. +throw new ProcessSystemError({ + code: acc.error.code, // Alias of errno + originalError: acc.error, // Just in case. +}) + +// Missing one level of indentation because of the comment +const rootEpic = (actions, store) => + combineEpics(...epics)(actions, store) + // Log errors and continue. + .catch((err, stream) => { + getLogger().error(err) + return stream + }) + +// optional trailing comma gets moved all the way to the beginning +const regex = new RegExp( + "^\\\\s*" + // beginning of the line + "name\\\\s*=\\\\s*" + // name = + "['\\"]" + // opening quotation mark + escapeStringRegExp(target.name) + // target name + "['\\"]" + // closing quotation mark + ",?$", // optional trailing comma +) + +// The comment is moved and doesn't trigger the eslint rule anymore +import path from "path" // eslint-disable-line nuclide-internal/prefer-nuclide-uri + +// Comments disappear in-between MemberExpressions +Observable.of(process) + // Don't complete until we say so! + .merge(Observable.never()) + // Get the errors. + .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) + .takeUntil(exit) + +// Comments disappear inside of JSX +;<div>{/* Some comment */}</div> + +// Comments in JSX tag are placed in a non optimal way +;<div +// comment +/> + +// Comments disappear in empty blocks +if (1) { + // Comment +} + +// Comments trigger invalid JavaScript in-between else if +if (1) { +} +// Comment +else { +} + +// The comment makes the line break in a weird way +const result = asyncExecute("non_existing_command", /* args */ []) + +// The closing paren is printed on the same line as the comment +foo( + {}, + // Hi +) + +================================================================================ +`; + +exports[`issues.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Does not need to break as it fits in 80 columns +this.call(a, /* comment */ b); + +// Comments should either stay at the end of the line or always before, but +// not one before and one after. +throw new ProcessSystemError({ + code: acc.error.code, // Alias of errno + originalError: acc.error, // Just in case. +}); + +// Missing one level of indentation because of the comment +const rootEpic = (actions, store) => ( + combineEpics(...epics)(actions, store) + // Log errors and continue. + .catch((err, stream) => { + getLogger().error(err); + return stream; + }) +); + +// optional trailing comma gets moved all the way to the beginning +const regex = new RegExp( + '^\\\\s*' + // beginning of the line + 'name\\\\s*=\\\\s*' + // name = + '[\\'"]' + // opening quotation mark + escapeStringRegExp(target.name) + // target name + '[\\'"]' + // closing quotation mark + ',?$', // optional trailing comma +); + +// The comment is moved and doesn't trigger the eslint rule anymore +import path from 'path'; // eslint-disable-line nuclide-internal/prefer-nuclide-uri + +// Comments disappear in-between MemberExpressions +Observable.of(process) + // Don't complete until we say so! + .merge(Observable.never()) + // Get the errors. + .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) + .takeUntil(exit); + +// Comments disappear inside of JSX +<div> + {/* Some comment */} +</div>; + +// Comments in JSX tag are placed in a non optimal way +<div + // comment +/>; + +// Comments disappear in empty blocks +if (1) { + // Comment +} + +// Comments trigger invalid JavaScript in-between else if +if (1) { +} +// Comment +else { + +} + +// The comment makes the line break in a weird way +const result = asyncExecute('non_existing_command', /* args */ []); + +// The closing paren is printed on the same line as the comment +foo({} + // Hi +); + +=====================================output===================================== +// Does not need to break as it fits in 80 columns +this.call(a, /* comment */ b); + +// Comments should either stay at the end of the line or always before, but +// not one before and one after. +throw new ProcessSystemError({ + code: acc.error.code, // Alias of errno + originalError: acc.error, // Just in case. +}); + +// Missing one level of indentation because of the comment +const rootEpic = (actions, store) => + combineEpics(...epics)(actions, store) + // Log errors and continue. + .catch((err, stream) => { + getLogger().error(err); + return stream; + }); + +// optional trailing comma gets moved all the way to the beginning +const regex = new RegExp( + "^\\\\s*" + // beginning of the line + "name\\\\s*=\\\\s*" + // name = + "['\\"]" + // opening quotation mark + escapeStringRegExp(target.name) + // target name + "['\\"]" + // closing quotation mark + ",?$", // optional trailing comma +); + +// The comment is moved and doesn't trigger the eslint rule anymore +import path from "path"; // eslint-disable-line nuclide-internal/prefer-nuclide-uri + +// Comments disappear in-between MemberExpressions +Observable.of(process) + // Don't complete until we say so! + .merge(Observable.never()) + // Get the errors. + .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) + .takeUntil(exit); + +// Comments disappear inside of JSX +<div>{/* Some comment */}</div>; + +// Comments in JSX tag are placed in a non optimal way +<div +// comment +/>; + +// Comments disappear in empty blocks +if (1) { + // Comment +} + +// Comments trigger invalid JavaScript in-between else if +if (1) { +} +// Comment +else { +} + +// The comment makes the line break in a weird way +const result = asyncExecute("non_existing_command", /* args */ []); + +// The closing paren is printed on the same line as the comment +foo( + {}, + // Hi +); + +================================================================================ +`; + +exports[`jsdoc.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +/** @type {any} */ +const x = ( + <div> + <div /> + </div> +); + +/** + * @type {object} + */ +() => ( + <div> + sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp + </div> +); + +/** + * @type {object} + */ +function HelloWorld() { + return ( + <div> + <span>Test</span> + </div> + ); +} +=====================================output===================================== +/** @type {any} */ +const x = ( + <div> + <div /> + </div> +) + +/** + * @type {object} + */ +;() => ( + <div> + sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp + </div> +) + +/** + * @type {object} + */ +function HelloWorld() { + return ( + <div> + <span>Test</span> + </div> + ) +} + +================================================================================ +`; + +exports[`jsdoc.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @type {any} */ +const x = ( + <div> + <div /> + </div> +); + +/** + * @type {object} + */ +() => ( + <div> + sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp + </div> +); + +/** + * @type {object} + */ +function HelloWorld() { + return ( + <div> + <span>Test</span> + </div> + ); +} +=====================================output===================================== +/** @type {any} */ +const x = ( + <div> + <div /> + </div> +); + +/** + * @type {object} + */ +() => ( + <div> + sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp + </div> +); + +/** + * @type {object} + */ +function HelloWorld() { + return ( + <div> + <span>Test</span> + </div> + ); +} + +================================================================================ +`; + +exports[`jsdoc-nestled.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const issues = { + see: "#7724 and #12653" + /** Trailing comment 1 (not nestled as both comments should be multiline for that) *//** + * Trailing comment 2 + */ +}; + +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +/** Trailing nestled comment 1 + *//** Trailing nestled comment 2 + *//** Trailing nestled comment 3 + */ + +=====================================output===================================== +const issues = { + see: "#7724 and #12653", + /** Trailing comment 1 (not nestled as both comments should be multiline for that) */ /** + * Trailing comment 2 + */ +} + +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value) + } else { + return new Value(type) + } +} + +/** Trailing nestled comment 1 + *//** Trailing nestled comment 2 + *//** Trailing nestled comment 3 + */ + +================================================================================ +`; + +exports[`jsdoc-nestled.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const issues = { + see: "#7724 and #12653" + /** Trailing comment 1 (not nestled as both comments should be multiline for that) *//** + * Trailing comment 2 + */ +}; + +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +/** Trailing nestled comment 1 + *//** Trailing nestled comment 2 + *//** Trailing nestled comment 3 + */ + +=====================================output===================================== +const issues = { + see: "#7724 and #12653", + /** Trailing comment 1 (not nestled as both comments should be multiline for that) */ /** + * Trailing comment 2 + */ +}; + +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +/** Trailing nestled comment 1 + *//** Trailing nestled comment 2 + *//** Trailing nestled comment 3 + */ + +================================================================================ +`; + +exports[`jsdoc-nestled-dangling.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +{{{{{{{ +o={ + /** + * A + *//** + * B + */ + +} +}}}}}}} + +=====================================output===================================== +{ + { + { + { + { + { + { + o = { + /** + * A + *//** + * B + */ + } + } + } + } + } + } + } +} + +================================================================================ +`; + +exports[`jsdoc-nestled-dangling.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{{{{{{ +o={ + /** + * A + *//** + * B + */ + +} +}}}}}}} + +=====================================output===================================== +{ + { + { + { + { + { + { + o = { + /** + * A + *//** + * B + */ + }; + } + } + } + } + } + } +} + +================================================================================ +`; + +exports[`jsx.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<div> + { + /* comment */ + } +</div>; + +<div> + {/* comment */ + } +</div>; + +<div> + {/* comment +*/ + } +</div>; + +<div> + {a/* comment +*/ + } +</div>; + +<div> + {/* comment +*/ + a + } +</div>; + +<div> + {/* comment */ + } +</div>; + +<div> + {/* comment */} +</div>; + +<div> + { + // single line comment + } +</div>; + +<div> + { + // multiple line comments 1 + // multiple line comments 2 + } +</div>; + +<div> + { + // multiple mixed comments 1 + /* multiple mixed comments 2 */ + /* multiple mixed comments 3 */ + // multiple mixed comments 4 + } +</div>; + +<div> + { + // Some very v ery very very merry (xmas) very very long line to break line width limit + } +</div>; + +<div>{/*<div> Some very v ery very very long line to break line width limit </div>*/}</div>; + +<div> + {/** + * JSDoc-y comment in JSX. I wonder what will happen to it? + */} +</div>; + +<div> + { + /** + * Another JSDoc comment in JSX. + */ + } +</div>; + +<div + /** + * Handles clicks. +*/ +onClick={() => {}}> + +</div>; + +<div + // comment +> + {foo} +</div>; + +<div + className="foo" // comment +> + {foo} +</div>; + +<div + className="foo" + // comment +> + {foo} +</div>; + +<div // comment + id="foo" +> + {children} +</div>; + +<Wrapper> + {} + <Component /> +</Wrapper> + +=====================================output===================================== +;<div>{/* comment */}</div> + +;<div>{/* comment */}</div> + +;<div> + {/* comment + */} +</div> + +;<div> + { + a /* comment + */ + } +</div> + +;<div> + { + /* comment + */ + a + } +</div> + +;<div>{/* comment */}</div> + +;<div>{/* comment */}</div> + +;<div> + { + // single line comment + } +</div> + +;<div> + { + // multiple line comments 1 + // multiple line comments 2 + } +</div> + +;<div> + { + // multiple mixed comments 1 + /* multiple mixed comments 2 */ + /* multiple mixed comments 3 */ + // multiple mixed comments 4 + } +</div> + +;<div> + { + // Some very v ery very very merry (xmas) very very long line to break line width limit + } +</div> + +;<div> + {/*<div> Some very v ery very very long line to break line width limit </div>*/} +</div> + +;<div> + {/** + * JSDoc-y comment in JSX. I wonder what will happen to it? + */} +</div> + +;<div> + {/** + * Another JSDoc comment in JSX. + */} +</div> + +;<div + /** + * Handles clicks. + */ + onClick={() => {}} +></div> + +;<div +// comment +> + {foo} +</div> + +;<div + className="foo" // comment +> + {foo} +</div> + +;<div + className="foo" + // comment +> + {foo} +</div> + +;<div // comment + id="foo" +> + {children} +</div> + +;<Wrapper> + {} + <Component /> +</Wrapper> + +================================================================================ +`; + +exports[`jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + { + /* comment */ + } +</div>; + +<div> + {/* comment */ + } +</div>; + +<div> + {/* comment +*/ + } +</div>; + +<div> + {a/* comment +*/ + } +</div>; + +<div> + {/* comment +*/ + a + } +</div>; + +<div> + {/* comment */ + } +</div>; + +<div> + {/* comment */} +</div>; + +<div> + { + // single line comment + } +</div>; + +<div> + { + // multiple line comments 1 + // multiple line comments 2 + } +</div>; + +<div> + { + // multiple mixed comments 1 + /* multiple mixed comments 2 */ + /* multiple mixed comments 3 */ + // multiple mixed comments 4 + } +</div>; + +<div> + { + // Some very v ery very very merry (xmas) very very long line to break line width limit + } +</div>; + +<div>{/*<div> Some very v ery very very long line to break line width limit </div>*/}</div>; + +<div> + {/** + * JSDoc-y comment in JSX. I wonder what will happen to it? + */} +</div>; + +<div> + { + /** + * Another JSDoc comment in JSX. + */ + } +</div>; + +<div + /** + * Handles clicks. +*/ +onClick={() => {}}> + +</div>; + +<div + // comment +> + {foo} +</div>; + +<div + className="foo" // comment +> + {foo} +</div>; + +<div + className="foo" + // comment +> + {foo} +</div>; + +<div // comment + id="foo" +> + {children} +</div>; + +<Wrapper> + {} + <Component /> +</Wrapper> + +=====================================output===================================== +<div>{/* comment */}</div>; + +<div>{/* comment */}</div>; + +<div> + {/* comment + */} +</div>; + +<div> + { + a /* comment + */ + } +</div>; + +<div> + { + /* comment + */ + a + } +</div>; + +<div>{/* comment */}</div>; + +<div>{/* comment */}</div>; + +<div> + { + // single line comment + } +</div>; + +<div> + { + // multiple line comments 1 + // multiple line comments 2 + } +</div>; + +<div> + { + // multiple mixed comments 1 + /* multiple mixed comments 2 */ + /* multiple mixed comments 3 */ + // multiple mixed comments 4 + } +</div>; + +<div> + { + // Some very v ery very very merry (xmas) very very long line to break line width limit + } +</div>; + +<div> + {/*<div> Some very v ery very very long line to break line width limit </div>*/} +</div>; + +<div> + {/** + * JSDoc-y comment in JSX. I wonder what will happen to it? + */} +</div>; + +<div> + {/** + * Another JSDoc comment in JSX. + */} +</div>; + +<div + /** + * Handles clicks. + */ + onClick={() => {}} +></div>; + +<div +// comment +> + {foo} +</div>; + +<div + className="foo" // comment +> + {foo} +</div>; + +<div + className="foo" + // comment +> + {foo} +</div>; + +<div // comment + id="foo" +> + {children} +</div>; + +<Wrapper> + {} + <Component /> +</Wrapper>; + +================================================================================ +`; + +exports[`last-arg.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + +class Foo { + a(lol /*string*/) {} + + b(lol /*string*/ + ) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) /*string*/ {} + + // prettier-ignore + c(lol /*string*/ + ) {} + + // prettier-ignore + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + // prettier-ignore + e( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} /* string*/ +} + +=====================================output===================================== +class Foo { + a(lol /*string*/) {} + + b(lol /*string*/) {} + + d(lol /*string*/, lol2 /*string*/, lol3 /*string*/, lol4 /*string*/) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/, + ) /*string*/ {} + + // prettier-ignore + c(lol /*string*/ + ) {} + + // prettier-ignore + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + // prettier-ignore + e( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} /* string*/ +} + +================================================================================ +`; + +exports[`last-arg.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class Foo { + a(lol /*string*/) {} + + b(lol /*string*/ + ) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) /*string*/ {} + + // prettier-ignore + c(lol /*string*/ + ) {} + + // prettier-ignore + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + // prettier-ignore + e( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} /* string*/ +} + +=====================================output===================================== +class Foo { + a(lol /*string*/) {} + + b(lol /*string*/) {} + + d(lol /*string*/, lol2 /*string*/, lol3 /*string*/, lol4 /*string*/) {} + + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/, + ) /*string*/ {} + + // prettier-ignore + c(lol /*string*/ + ) {} + + // prettier-ignore + d( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} + + // prettier-ignore + e( + lol /*string*/, + lol2 /*string*/, + lol3 /*string*/, + lol4 /*string*/ + ) {} /* string*/ +} + +================================================================================ +`; + +exports[`multi-comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// #8323 + +import { MapViewProps } from 'react-native-maps'; /* +comment 14 +*/ /* comment1 +10 +*/ /*/ comment 13 */ +/* + comment 9 + ****/ +import * as ts from 'typescript'; + +x; /* +1 */ /* 2 */ + +y + +x; /*1*//*2*/ +y; + +=====================================output===================================== +// #8323 + +import { MapViewProps } from "react-native-maps" /* +comment 14 +*/ /* comment1 +10 +*/ /*/ comment 13 */ +/* + comment 9 + ****/ +import * as ts from "typescript" + +x /* +1 */ /* 2 */ + +y + +x /*1*/ /*2*/ +y + +================================================================================ +`; + +exports[`multi-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #8323 + +import { MapViewProps } from 'react-native-maps'; /* +comment 14 +*/ /* comment1 +10 +*/ /*/ comment 13 */ +/* + comment 9 + ****/ +import * as ts from 'typescript'; + +x; /* +1 */ /* 2 */ + +y + +x; /*1*//*2*/ +y; + +=====================================output===================================== +// #8323 + +import { MapViewProps } from "react-native-maps"; /* +comment 14 +*/ /* comment1 +10 +*/ /*/ comment 13 */ +/* + comment 9 + ****/ +import * as ts from "typescript"; + +x; /* +1 */ /* 2 */ + +y; + +x; /*1*/ /*2*/ +y; + +================================================================================ +`; + +exports[`multi-comments-2.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + const x = 0; + + /* istanbul ignore if */ // debug case currently not triggered + if (true) { + x; + } + +=====================================output===================================== +const x = 0 + +/* istanbul ignore if */ // debug case currently not triggered +if (true) { + x +} + +================================================================================ +`; + +exports[`multi-comments-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + const x = 0; + + /* istanbul ignore if */ // debug case currently not triggered + if (true) { + x; + } + +=====================================output===================================== +const x = 0; + +/* istanbul ignore if */ // debug case currently not triggered +if (true) { + x; +} + +================================================================================ +`; + +exports[`multi-comments-on-same-line.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +/*========= All on same line =========*/ +a; +/*1*//*2*//*3*/ +b; + +a;/*1*//*2*//*3*/ +b; + +a; +/*1*//*2*//*3*/b; + +a; +/* +1*//*2*//*3 +*/ +b; + +a;/* +1*//*2*//*3 +*/ +b; + +a;/* +1*//*2*//*3 +*/b; + +/*========= First two on same line =========*/ +a; +/*1*//*2*/ +/*3*/ +b; + +a;/*1*//*2*/ +/*3*/ +b; + +a; +/*1*//*2*/ +/*3*/b; + +a; +/* +1*//*2*/ +/*3 +*/ +b; + +a;/* +1*//*2*/ +/*3 +*/ +b; + +a;/* +1*//*2*/ +/*3 +*/b; + +/*========= Last two on same line =========*/ +a; +/*1*/ +/*2*//*3*/ +b; + +a;/*1*/ +/*2*//*3*/ +b; + +a; +/*1*/ +/*2*//*3*/b; + +a; +/* +1*/ +/*2*//*3 +*/ +b; + +a;/* +1*/ +/*2*//*3 +*/ +b; + +a;/* +1*/ +/*2*//*3 +*/b; + +=====================================output===================================== +/*========= All on same line =========*/ +a +/*1*/ /*2*/ /*3*/ +b + +a /*1*/ /*2*/ /*3*/ +b + +a +/*1*/ /*2*/ /*3*/ b + +a +/* +1*/ /*2*/ /*3 + */ +b + +a /* +1*/ /*2*/ /*3 + */ +b + +a +/* +1*/ /*2*/ /*3 + */ b + +/*========= First two on same line =========*/ +a +/*1*/ /*2*/ +/*3*/ +b + +a /*1*/ /*2*/ +/*3*/ +b + +a +/*1*/ /*2*/ +/*3*/ b + +a +/* +1*/ /*2*/ +/*3 + */ +b + +a /* +1*/ /*2*/ +/*3 + */ +b + +a /* +1*/ /*2*/ +/*3 + */ b + +/*========= Last two on same line =========*/ +a +/*1*/ +/*2*/ /*3*/ +b + +a /*1*/ +/*2*/ /*3*/ +b + +a +/*1*/ +/*2*/ /*3*/ b + +a +/* +1*/ +/*2*/ /*3 + */ +b + +a /* +1*/ +/*2*/ /*3 + */ +b + +a /* +1*/ +/*2*/ /*3 + */ b + +================================================================================ +`; + +exports[`multi-comments-on-same-line.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/*========= All on same line =========*/ +a; +/*1*//*2*//*3*/ +b; + +a;/*1*//*2*//*3*/ +b; + +a; +/*1*//*2*//*3*/b; + +a; +/* +1*//*2*//*3 +*/ +b; + +a;/* +1*//*2*//*3 +*/ +b; + +a;/* +1*//*2*//*3 +*/b; + +/*========= First two on same line =========*/ +a; +/*1*//*2*/ +/*3*/ +b; + +a;/*1*//*2*/ +/*3*/ +b; + +a; +/*1*//*2*/ +/*3*/b; + +a; +/* +1*//*2*/ +/*3 +*/ +b; + +a;/* +1*//*2*/ +/*3 +*/ +b; + +a;/* +1*//*2*/ +/*3 +*/b; + +/*========= Last two on same line =========*/ +a; +/*1*/ +/*2*//*3*/ +b; + +a;/*1*/ +/*2*//*3*/ +b; + +a; +/*1*/ +/*2*//*3*/b; + +a; +/* +1*/ +/*2*//*3 +*/ +b; + +a;/* +1*/ +/*2*//*3 +*/ +b; + +a;/* +1*/ +/*2*//*3 +*/b; + +=====================================output===================================== +/*========= All on same line =========*/ +a; +/*1*/ /*2*/ /*3*/ +b; + +a; /*1*/ /*2*/ /*3*/ +b; + +a; +/*1*/ /*2*/ /*3*/ b; + +a; +/* +1*/ /*2*/ /*3 + */ +b; + +a; /* +1*/ /*2*/ /*3 + */ +b; + +a; +/* +1*/ /*2*/ /*3 + */ b; + +/*========= First two on same line =========*/ +a; +/*1*/ /*2*/ +/*3*/ +b; + +a; /*1*/ /*2*/ +/*3*/ +b; + +a; +/*1*/ /*2*/ +/*3*/ b; + +a; +/* +1*/ /*2*/ +/*3 + */ +b; + +a; /* +1*/ /*2*/ +/*3 + */ +b; + +a; /* +1*/ /*2*/ +/*3 + */ b; + +/*========= Last two on same line =========*/ +a; +/*1*/ +/*2*/ /*3*/ +b; + +a; /*1*/ +/*2*/ /*3*/ +b; + +a; +/*1*/ +/*2*/ /*3*/ b; + +a; +/* +1*/ +/*2*/ /*3 + */ +b; + +a; /* +1*/ +/*2*/ /*3 + */ +b; + +a; /* +1*/ +/*2*/ /*3 + */ b; + +================================================================================ +`; + +exports[`multi-comments-on-same-line-2.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +/* 1 */ /* 2 */ /* 3 */ a; +a; /* 4 */ /* 5 */ /* 6 */ + +=====================================output===================================== +/* 1 */ /* 2 */ /* 3 */ a +a /* 4 */ /* 5 */ /* 6 */ + +================================================================================ +`; + +exports[`multi-comments-on-same-line-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* 1 */ /* 2 */ /* 3 */ a; +a; /* 4 */ /* 5 */ /* 6 */ + +=====================================output===================================== +/* 1 */ /* 2 */ /* 3 */ a; +a; /* 4 */ /* 5 */ /* 6 */ + +================================================================================ +`; + +exports[`preserve-new-line-last.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function f() { + a + /* eslint-disable */ +} + +function f() { + a + + /* eslint-disable */ +} + +function name() { + // comment1 + func1() + + // comment2 + func2() + + // comment3 why func3 commented + // func3() +} + +=====================================output===================================== +function f() { + a + /* eslint-disable */ +} + +function f() { + a + + /* eslint-disable */ +} + +function name() { + // comment1 + func1() + + // comment2 + func2() + + // comment3 why func3 commented + // func3() +} + +================================================================================ +`; + +exports[`preserve-new-line-last.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + a + /* eslint-disable */ +} + +function f() { + a + + /* eslint-disable */ +} + +function name() { + // comment1 + func1() + + // comment2 + func2() + + // comment3 why func3 commented + // func3() +} + +=====================================output===================================== +function f() { + a; + /* eslint-disable */ +} + +function f() { + a; + + /* eslint-disable */ +} + +function name() { + // comment1 + func1(); + + // comment2 + func2(); + + // comment3 why func3 commented + // func3() +} + +================================================================================ +`; + +exports[`return-statement.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function jsx() { + return ( + // Comment + <div /> + ); +} + +function unary() { + return ( + // Comment + !!x + ); +} + +function numericLiteralNoParen() { + return 1337; // Comment +} + +function logical() { + return ( + // Reason for 42 + 42 + ) && 84 +} + +function binary() { + return ( + // Reason for 42 + 42 + ) * 84 +} + +function binaryInBinaryLeft() { + return ( + // Reason for 42 + 42 + ) * 84 + 2 +} + +function binaryInBinaryRight() { + return ( + // Reason for 42 + 42 + ) + 84 * 2 +} + +function conditional() { + return ( + // Reason for 42 + 42 + ) ? 1 : 2 +} + +function binaryInConditional() { + return ( + // Reason for 42 + 42 + ) * 3 ? 1 : 2 +} + +function call() { + return ( + // Reason for a + a + )() +} + +function memberInside() { + return ( + // Reason for a.b + a.b + ).c +} + +function memberOutside() { + return ( + // Reason for a + a + ).b.c +} + +function memberInAndOutWithCalls() { + return ( + // Reason for a + aFunction.b() + ).c.d() +} + +function excessiveEverything() { + return ( + // Reason for stuff + a.b() * 3 + 4 ? (a\`hi\`, 1) ? 1 : 1 : 1 + ) +} + +// See https://github.com/prettier/prettier/issues/2392 +// function sequenceExpression() { +// return ( +// // Reason for a +// a +// ), b +// } + +function sequenceExpressionInside() { + return ( // Reason for a + a, b + ); +} + +function taggedTemplate() { + return ( + // Reason for a + a + )\`b\` +} + +function inlineComment() { + return ( + /* hi */ 42 + ) || 42 +} + +function multilineBlockSameLine() { + return ( + /** + * @type {string} + */ 'result' + ) +} + +function multilineBlockNextLine() { + return ( + /** + * @type {string} + */ + 'result' + ) +} + +function multilineBlockSameLineJsx() { + return ( + /** + * JSX Same line + */ <div></div> + ) +} + +function multilineBlockNextLineJsx() { + return ( + /** + * JSX Next line + */ + <div></div> + ) +} + +function singleLineBlockSameLine() { + return ( + /** Result -> */ 'result' + ) +} + +function singleLineBlockNextLine() { + return ( + /** Result below */ + 'result' + ) +} + +=====================================output===================================== +function jsx() { + return ( + // Comment + <div /> + ) +} + +function unary() { + return ( + // Comment + !!x + ) +} + +function numericLiteralNoParen() { + return 1337 // Comment +} + +function logical() { + return ( + // Reason for 42 + 42 && 84 + ) +} + +function binary() { + return ( + // Reason for 42 + 42 * 84 + ) +} + +function binaryInBinaryLeft() { + return ( + // Reason for 42 + 42 * + 84 + + 2 + ) +} + +function binaryInBinaryRight() { + return ( + // Reason for 42 + 42 + + 84 * 2 + ) +} + +function conditional() { + return ( + // Reason for 42 + 42 + ? 1 + : 2 + ) +} + +function binaryInConditional() { + return ( + // Reason for 42 + 42 * 3 + ? 1 + : 2 + ) +} + +function call() { + return ( + // Reason for a + a() + ) +} + +function memberInside() { + return ( + // Reason for a.b + a.b.c + ) +} + +function memberOutside() { + return ( + // Reason for a + a.b.c + ) +} + +function memberInAndOutWithCalls() { + return ( + aFunction + .b// Reason for a + () + .c.d() + ) +} + +function excessiveEverything() { + return ( + // Reason for stuff + a.b() * 3 + 4 ? ((a\`hi\`, 1) ? 1 : 1) : 1 + ) +} + +// See https://github.com/prettier/prettier/issues/2392 +// function sequenceExpression() { +// return ( +// // Reason for a +// a +// ), b +// } + +function sequenceExpressionInside() { + return ( + // Reason for a + (a, b) + ) +} + +function taggedTemplate() { + return ( + // Reason for a + a\`b\` + ) +} + +function inlineComment() { + return /* hi */ 42 || 42 +} + +function multilineBlockSameLine() { + return ( + /** + * @type {string} + */ "result" + ) +} + +function multilineBlockNextLine() { + return ( + /** + * @type {string} + */ + "result" + ) +} + +function multilineBlockSameLineJsx() { + return ( + /** + * JSX Same line + */ <div></div> + ) +} + +function multilineBlockNextLineJsx() { + return ( + /** + * JSX Next line + */ + <div></div> + ) +} + +function singleLineBlockSameLine() { + return /** Result -> */ "result" +} + +function singleLineBlockNextLine() { + return ( + /** Result below */ + "result" + ) +} + +================================================================================ +`; + +exports[`return-statement.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function jsx() { + return ( + // Comment + <div /> + ); +} + +function unary() { + return ( + // Comment + !!x + ); +} + +function numericLiteralNoParen() { + return 1337; // Comment +} + +function logical() { + return ( + // Reason for 42 + 42 + ) && 84 +} + +function binary() { + return ( + // Reason for 42 + 42 + ) * 84 +} + +function binaryInBinaryLeft() { + return ( + // Reason for 42 + 42 + ) * 84 + 2 +} + +function binaryInBinaryRight() { + return ( + // Reason for 42 + 42 + ) + 84 * 2 +} + +function conditional() { + return ( + // Reason for 42 + 42 + ) ? 1 : 2 +} + +function binaryInConditional() { + return ( + // Reason for 42 + 42 + ) * 3 ? 1 : 2 +} + +function call() { + return ( + // Reason for a + a + )() +} + +function memberInside() { + return ( + // Reason for a.b + a.b + ).c +} + +function memberOutside() { + return ( + // Reason for a + a + ).b.c +} + +function memberInAndOutWithCalls() { + return ( + // Reason for a + aFunction.b() + ).c.d() +} + +function excessiveEverything() { + return ( + // Reason for stuff + a.b() * 3 + 4 ? (a\`hi\`, 1) ? 1 : 1 : 1 + ) +} + +// See https://github.com/prettier/prettier/issues/2392 +// function sequenceExpression() { +// return ( +// // Reason for a +// a +// ), b +// } + +function sequenceExpressionInside() { + return ( // Reason for a + a, b + ); +} + +function taggedTemplate() { + return ( + // Reason for a + a + )\`b\` +} + +function inlineComment() { + return ( + /* hi */ 42 + ) || 42 +} + +function multilineBlockSameLine() { + return ( + /** + * @type {string} + */ 'result' + ) +} + +function multilineBlockNextLine() { + return ( + /** + * @type {string} + */ + 'result' + ) +} + +function multilineBlockSameLineJsx() { + return ( + /** + * JSX Same line + */ <div></div> + ) +} + +function multilineBlockNextLineJsx() { + return ( + /** + * JSX Next line + */ + <div></div> + ) +} + +function singleLineBlockSameLine() { + return ( + /** Result -> */ 'result' + ) +} + +function singleLineBlockNextLine() { + return ( + /** Result below */ + 'result' + ) +} + +=====================================output===================================== +function jsx() { + return ( + // Comment + <div /> + ); +} + +function unary() { + return ( + // Comment + !!x + ); +} + +function numericLiteralNoParen() { + return 1337; // Comment +} + +function logical() { + return ( + // Reason for 42 + 42 && 84 + ); +} + +function binary() { + return ( + // Reason for 42 + 42 * 84 + ); +} + +function binaryInBinaryLeft() { + return ( + // Reason for 42 + 42 * + 84 + + 2 + ); +} + +function binaryInBinaryRight() { + return ( + // Reason for 42 + 42 + + 84 * 2 + ); +} + +function conditional() { + return ( + // Reason for 42 + 42 + ? 1 + : 2 + ); +} + +function binaryInConditional() { + return ( + // Reason for 42 + 42 * 3 + ? 1 + : 2 + ); +} + +function call() { + return ( + // Reason for a + a() + ); +} + +function memberInside() { + return ( + // Reason for a.b + a.b.c + ); +} + +function memberOutside() { + return ( + // Reason for a + a.b.c + ); +} + +function memberInAndOutWithCalls() { + return ( + aFunction + .b// Reason for a + () + .c.d() + ); +} + +function excessiveEverything() { + return ( + // Reason for stuff + a.b() * 3 + 4 ? ((a\`hi\`, 1) ? 1 : 1) : 1 + ); +} + +// See https://github.com/prettier/prettier/issues/2392 +// function sequenceExpression() { +// return ( +// // Reason for a +// a +// ), b +// } + +function sequenceExpressionInside() { + return ( + // Reason for a + (a, b) + ); +} + +function taggedTemplate() { + return ( + // Reason for a + a\`b\` + ); +} + +function inlineComment() { + return /* hi */ 42 || 42; +} + +function multilineBlockSameLine() { + return ( + /** + * @type {string} + */ "result" + ); +} + +function multilineBlockNextLine() { + return ( + /** + * @type {string} + */ + "result" + ); +} + +function multilineBlockSameLineJsx() { + return ( + /** + * JSX Same line + */ <div></div> + ); +} + +function multilineBlockNextLineJsx() { + return ( + /** + * JSX Next line + */ + <div></div> + ); +} + +function singleLineBlockSameLine() { + return /** Result -> */ "result"; +} + +function singleLineBlockNextLine() { + return ( + /** Result below */ + "result" + ); +} + +================================================================================ +`; + +exports[`single-star-jsdoc.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +/* + * Looking good! + */ + +if(true) { + /* + * Oh no + */ +} + + /** first line +* second line + * third line */ + + /* first line +* second line + * third line */ + + /*! first line +*second line + * third line */ + +/*! +* Extracted from vue codebase +* https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js +* HTML Parser By John Resig (ejohn.org) +* Modified by Juriy "kangax" Zaytsev +* Original code by Erik Arvidsson, Mozilla Public License +* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js +*/ + +=====================================output===================================== +/* + * Looking good! + */ + +if (true) { + /* + * Oh no + */ +} + +/** first line + * second line + * third line */ + +/* first line + * second line + * third line */ + +/*! first line + *second line + * third line */ + +/*! + * Extracted from vue codebase + * https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js + * HTML Parser By John Resig (ejohn.org) + * Modified by Juriy "kangax" Zaytsev + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + */ + +================================================================================ +`; + +exports[`single-star-jsdoc.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* + * Looking good! + */ + +if(true) { + /* + * Oh no + */ +} + + /** first line +* second line + * third line */ + + /* first line +* second line + * third line */ + + /*! first line +*second line + * third line */ + +/*! +* Extracted from vue codebase +* https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js +* HTML Parser By John Resig (ejohn.org) +* Modified by Juriy "kangax" Zaytsev +* Original code by Erik Arvidsson, Mozilla Public License +* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js +*/ + +=====================================output===================================== +/* + * Looking good! + */ + +if (true) { + /* + * Oh no + */ +} + +/** first line + * second line + * third line */ + +/* first line + * second line + * third line */ + +/*! first line + *second line + * third line */ + +/*! + * Extracted from vue codebase + * https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js + * HTML Parser By John Resig (ejohn.org) + * Modified by Juriy "kangax" Zaytsev + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + */ + +================================================================================ +`; + +exports[`snippet: #0 - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +var a = { /* comment */ +b }; +=====================================output===================================== +var a = { + /* comment */ b, +} + +================================================================================ +`; + +exports[`snippet: #0 format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var a = { /* comment */ +b }; +=====================================output===================================== +var a = { + /* comment */ b, +}; + +================================================================================ +`; + +exports[`snippet: #1 - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +var a = { /* comment */ +b }; +=====================================output===================================== +var a = { + /* comment */ b, +} + +================================================================================ +`; + +exports[`snippet: #1 format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var a = { /* comment */ +b }; +=====================================output===================================== +var a = { + /* comment */ b, +}; + +================================================================================ +`; + +exports[`switch.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +switch (node && node.type) { + case "Property": + case "MethodDefinition": + prop = node.key; + break; + + case "MemberExpression": + prop = node.property; + break; + + // no default +} + +switch (foo) { + case "bar": + doThing() + + // no default +} + +switch (foo) { + case "bar": //comment + doThing(); //comment + + case "baz": + doOtherThing(); //comment + +} + +switch (foo) { + case "bar": { + doThing(); + } //comment + + case "baz": { + doThing(); + } //comment +} + +=====================================output===================================== +switch (node && node.type) { + case "Property": + case "MethodDefinition": + prop = node.key + break + + case "MemberExpression": + prop = node.property + break + + // no default +} + +switch (foo) { + case "bar": + doThing() + + // no default +} + +switch (foo) { + case "bar": //comment + doThing() //comment + + case "baz": + doOtherThing() //comment +} + +switch (foo) { + case "bar": { + doThing() + } //comment + + case "baz": { + doThing() + } //comment +} + +================================================================================ +`; + +exports[`switch.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (node && node.type) { + case "Property": + case "MethodDefinition": + prop = node.key; + break; + + case "MemberExpression": + prop = node.property; + break; + + // no default +} + +switch (foo) { + case "bar": + doThing() + + // no default +} + +switch (foo) { + case "bar": //comment + doThing(); //comment + + case "baz": + doOtherThing(); //comment + +} + +switch (foo) { + case "bar": { + doThing(); + } //comment + + case "baz": { + doThing(); + } //comment +} + +=====================================output===================================== +switch (node && node.type) { + case "Property": + case "MethodDefinition": + prop = node.key; + break; + + case "MemberExpression": + prop = node.property; + break; + + // no default +} + +switch (foo) { + case "bar": + doThing(); + + // no default +} + +switch (foo) { + case "bar": //comment + doThing(); //comment + + case "baz": + doOtherThing(); //comment +} + +switch (foo) { + case "bar": { + doThing(); + } //comment + + case "baz": { + doThing(); + } //comment +} + +================================================================================ +`; + +exports[`tagged-template-literal.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +foo\`\`; // comment 1 + +foo // comment 2 +\`\`; + +foo // comment 3 +\` +\`; + +foo /* comment 4 */\` +\`; + +foo /* comment 5 */ +\` +\`; + +=====================================output===================================== +foo\`\` // comment 1 + +foo // comment 2 +\`\` + +foo // comment 3 +\` +\` + +foo /* comment 4 */ \` +\` + +foo /* comment 5 */\` +\` + +================================================================================ +`; + +exports[`tagged-template-literal.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo\`\`; // comment 1 + +foo // comment 2 +\`\`; + +foo // comment 3 +\` +\`; + +foo /* comment 4 */\` +\`; + +foo /* comment 5 */ +\` +\`; + +=====================================output===================================== +foo\`\`; // comment 1 + +foo // comment 2 +\`\`; + +foo // comment 3 +\` +\`; + +foo /* comment 4 */ \` +\`; + +foo /* comment 5 */\` +\`; + +================================================================================ +`; + +exports[`template-literal.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +\` +\${a // comment +} + +\${b /* comment */} + +\${/* comment */ c /* comment */} + +\${// comment +d //comment +}; +\` + +=====================================output===================================== +;\` +\${ + a // comment +} + +\${b /* comment */} + +\${/* comment */ c /* comment */} + +\${ + // comment + d //comment +}; +\` + +================================================================================ +`; + +exports[`template-literal.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\` +\${a // comment +} + +\${b /* comment */} + +\${/* comment */ c /* comment */} + +\${// comment +d //comment +}; +\` + +=====================================output===================================== +\` +\${ + a // comment +} + +\${b /* comment */} + +\${/* comment */ c /* comment */} + +\${ + // comment + d //comment +}; +\`; + +================================================================================ +`; + +exports[`trailing_space.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +#!/there/is-space-here-> + +// Do not trim trailing whitespace from this source file! + +// There is some space here -> + +=====================================output===================================== +#!/there/is-space-here-> + +// Do not trim trailing whitespace from this source file! + +// There is some space here -> + +================================================================================ +`; + +exports[`trailing_space.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +#!/there/is-space-here-> + +// Do not trim trailing whitespace from this source file! + +// There is some space here -> + +=====================================output===================================== +#!/there/is-space-here-> + +// Do not trim trailing whitespace from this source file! + +// There is some space here -> + +================================================================================ +`; + +exports[`trailing-jsdocs.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const CONNECTION_STATUS = exports.CONNECTION_STATUS = { + CLOSED: Object.freeze({ kind: 'CLOSED' }), + CONNECTED: Object.freeze({ kind: 'CONNECTED' }), + CONNECTING: Object.freeze({ kind: 'CONNECTING' }), + NOT_CONNECTED: Object.freeze({ kind: 'NOT_CONNECTED' }) }; + +/* A comment */ /** +* A type that can be written to a buffer. +*/ /** +* Describes the connection status of a ReactiveSocket/DuplexConnection. +* - NOT_CONNECTED: no connection established or pending. +* - CONNECTING: when \`connect()\` has been called but a connection is not yet +* established. +* - CONNECTED: when a connection is established. +* - CLOSED: when the connection has been explicitly closed via \`close()\`. +* - ERROR: when the connection has been closed for any other reason. +*/ /** +* A contract providing different interaction models per the [ReactiveSocket protocol] +* (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). +*/ /** +* A single unit of data exchanged between the peers of a \`ReactiveSocket\`. +*/ + +=====================================output===================================== +const CONNECTION_STATUS = (exports.CONNECTION_STATUS = { + CLOSED: Object.freeze({ kind: "CLOSED" }), + CONNECTED: Object.freeze({ kind: "CONNECTED" }), + CONNECTING: Object.freeze({ kind: "CONNECTING" }), + NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }), +}) + +/* A comment */ /** + * A type that can be written to a buffer. + */ /** + * Describes the connection status of a ReactiveSocket/DuplexConnection. + * - NOT_CONNECTED: no connection established or pending. + * - CONNECTING: when \`connect()\` has been called but a connection is not yet + * established. + * - CONNECTED: when a connection is established. + * - CLOSED: when the connection has been explicitly closed via \`close()\`. + * - ERROR: when the connection has been closed for any other reason. + */ /** + * A contract providing different interaction models per the [ReactiveSocket protocol] + * (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). + */ /** + * A single unit of data exchanged between the peers of a \`ReactiveSocket\`. + */ + +================================================================================ +`; + +exports[`trailing-jsdocs.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const CONNECTION_STATUS = exports.CONNECTION_STATUS = { + CLOSED: Object.freeze({ kind: 'CLOSED' }), + CONNECTED: Object.freeze({ kind: 'CONNECTED' }), + CONNECTING: Object.freeze({ kind: 'CONNECTING' }), + NOT_CONNECTED: Object.freeze({ kind: 'NOT_CONNECTED' }) }; + +/* A comment */ /** +* A type that can be written to a buffer. +*/ /** +* Describes the connection status of a ReactiveSocket/DuplexConnection. +* - NOT_CONNECTED: no connection established or pending. +* - CONNECTING: when \`connect()\` has been called but a connection is not yet +* established. +* - CONNECTED: when a connection is established. +* - CLOSED: when the connection has been explicitly closed via \`close()\`. +* - ERROR: when the connection has been closed for any other reason. +*/ /** +* A contract providing different interaction models per the [ReactiveSocket protocol] +* (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). +*/ /** +* A single unit of data exchanged between the peers of a \`ReactiveSocket\`. +*/ + +=====================================output===================================== +const CONNECTION_STATUS = (exports.CONNECTION_STATUS = { + CLOSED: Object.freeze({ kind: "CLOSED" }), + CONNECTED: Object.freeze({ kind: "CONNECTED" }), + CONNECTING: Object.freeze({ kind: "CONNECTING" }), + NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }), +}); + +/* A comment */ /** + * A type that can be written to a buffer. + */ /** + * Describes the connection status of a ReactiveSocket/DuplexConnection. + * - NOT_CONNECTED: no connection established or pending. + * - CONNECTING: when \`connect()\` has been called but a connection is not yet + * established. + * - CONNECTED: when a connection is established. + * - CLOSED: when the connection has been explicitly closed via \`close()\`. + * - ERROR: when the connection has been closed for any other reason. + */ /** + * A contract providing different interaction models per the [ReactiveSocket protocol] + * (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). + */ /** + * A single unit of data exchanged between the peers of a \`ReactiveSocket\`. + */ + +================================================================================ +`; + +exports[`try.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// Comment 1 +try { // Comment 2 + // Comment 3 +} +// Comment 4 +catch(e) { // Comment 5 + // Comment 6 +} +// Comment 7 +finally { // Comment 8 + // Comment 9 +} +// Comment 10 + +=====================================output===================================== +// Comment 1 +try { + // Comment 2 + // Comment 3 +} catch (e) { + // Comment 4 + // Comment 5 + // Comment 6 +} finally { + // Comment 7 + // Comment 8 + // Comment 9 +} +// Comment 10 + +================================================================================ +`; + +exports[`try.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Comment 1 +try { // Comment 2 + // Comment 3 +} +// Comment 4 +catch(e) { // Comment 5 + // Comment 6 +} +// Comment 7 +finally { // Comment 8 + // Comment 9 +} +// Comment 10 + +=====================================output===================================== +// Comment 1 +try { + // Comment 2 + // Comment 3 +} catch (e) { + // Comment 4 + // Comment 5 + // Comment 6 +} finally { + // Comment 7 + // Comment 8 + // Comment 9 +} +// Comment 10 + +================================================================================ +`; + +exports[`variable_declarator.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +let obj1 = // Comment +{ + key: 'val' +} + +let obj2 // Comment += { + key: 'val' +} + +let obj3 = { // Comment + key: 'val' +} + +let obj4 = { + // Comment + key: 'val' +} + +let obj5 = // Comment +[ + 'val' +] + +let obj6 // Comment += [ + 'val' +] + +let obj7 = [ // Comment + 'val' +] + +let obj8 = [ + // Comment + 'val' +] + +let obj9 = // Comment +\`val\`; + +let obj10 = // Comment +\` +val +val +\`; + +let obj11 = // Comment +tag\`val\`; + +let obj12 = // Comment +tag\` +val +val +\`; + +let // Comment + foo1 = 'val'; + +let // Comment + foo2 = 'val', + bar = 'val'; + +const foo3 = 123 +// Nothing to see here. +;["2", "3"].forEach(x => console.log(x)) + +=====================================output===================================== +let obj1 = + // Comment + { + key: "val", + } + +let obj2 = + // Comment + { + key: "val", + } + +let obj3 = { + // Comment + key: "val", +} + +let obj4 = { + // Comment + key: "val", +} + +let obj5 = + // Comment + ["val"] + +let obj6 = + // Comment + ["val"] + +let obj7 = [ + // Comment + "val", +] + +let obj8 = [ + // Comment + "val", +] + +let obj9 = + // Comment + \`val\` + +let obj10 = + // Comment + \` +val +val +\` + +let obj11 = + // Comment + tag\`val\` + +let obj12 = + // Comment + tag\` +val +val +\` + +let // Comment + foo1 = "val" + +let // Comment + foo2 = "val", + bar = "val" + +const foo3 = 123 +// Nothing to see here. +;["2", "3"].forEach((x) => console.log(x)) + +================================================================================ +`; + +exports[`variable_declarator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let obj1 = // Comment +{ + key: 'val' +} + +let obj2 // Comment += { + key: 'val' +} + +let obj3 = { // Comment + key: 'val' +} + +let obj4 = { + // Comment + key: 'val' +} + +let obj5 = // Comment +[ + 'val' +] + +let obj6 // Comment += [ + 'val' +] + +let obj7 = [ // Comment + 'val' +] + +let obj8 = [ + // Comment + 'val' +] + +let obj9 = // Comment +\`val\`; + +let obj10 = // Comment +\` +val +val +\`; + +let obj11 = // Comment +tag\`val\`; + +let obj12 = // Comment +tag\` +val +val +\`; + +let // Comment + foo1 = 'val'; + +let // Comment + foo2 = 'val', + bar = 'val'; + +const foo3 = 123 +// Nothing to see here. +;["2", "3"].forEach(x => console.log(x)) + +=====================================output===================================== +let obj1 = + // Comment + { + key: "val", + }; + +let obj2 = + // Comment + { + key: "val", + }; + +let obj3 = { + // Comment + key: "val", +}; + +let obj4 = { + // Comment + key: "val", +}; + +let obj5 = + // Comment + ["val"]; + +let obj6 = + // Comment + ["val"]; + +let obj7 = [ + // Comment + "val", +]; + +let obj8 = [ + // Comment + "val", +]; + +let obj9 = + // Comment + \`val\`; + +let obj10 = + // Comment + \` +val +val +\`; + +let obj11 = + // Comment + tag\`val\`; + +let obj12 = + // Comment + tag\` +val +val +\`; + +let // Comment + foo1 = "val"; + +let // Comment + foo2 = "val", + bar = "val"; + +const foo3 = 123; +// Nothing to see here. +["2", "3"].forEach((x) => console.log(x)); + +================================================================================ +`; + +exports[`while.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +while( + true + // Comment + ) {} + +while(true)// Comment +{} + +while(true){}// Comment + +while(true)/*Comment*/{} + +while( + true // Comment + && true // Comment + ){} + +while(true) {} // comment + +while(true) /* comment */ ++x; + +while(1) // Comment + foo(); + +=====================================output===================================== +while ( + true + // Comment +) {} + +while (true) { + // Comment +} + +while (true) {} // Comment + +while (true) { + /*Comment*/ +} + +while ( + true && // Comment + true // Comment +) {} + +while (true) {} // comment + +while (true) /* comment */ ++x + +while (1) + // Comment + foo() + +================================================================================ +`; + +exports[`while.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +while( + true + // Comment + ) {} + +while(true)// Comment +{} + +while(true){}// Comment + +while(true)/*Comment*/{} + +while( + true // Comment + && true // Comment + ){} + +while(true) {} // comment + +while(true) /* comment */ ++x; + +while(1) // Comment + foo(); + +=====================================output===================================== +while ( + true + // Comment +) {} + +while (true) { + // Comment +} + +while (true) {} // Comment + +while (true) { + /*Comment*/ +} + +while ( + true && // Comment + true // Comment +) {} + +while (true) {} // comment + +while (true) /* comment */ ++x; + +while (1) + // Comment + foo(); + +================================================================================ +`; diff --git a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9c21079b109f..000000000000 --- a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,6129 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const fn = (/*event, data*/) => doSomething(); - -const fn2 = (/*event, data*/) => doSomething(anything); - -=====================================output===================================== -const fn = (/*event, data*/) => doSomething() - -const fn2 = (/*event, data*/) => doSomething(anything) - -================================================================================ -`; - -exports[`arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn = (/*event, data*/) => doSomething(); - -const fn2 = (/*event, data*/) => doSomething(anything); - -=====================================output===================================== -const fn = (/*event, data*/) => doSomething(); - -const fn2 = (/*event, data*/) => doSomething(anything); - -================================================================================ -`; - -exports[`assignment-pattern.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const { a /* comment */ = 1 } = b; - -const { c = 1 /* comment */ } = d; - -let {d //comment -= b} = c - -=====================================output===================================== -const { a /* comment */ = 1 } = b - -const { c = 1 /* comment */ } = d - -let { - d = b, //comment -} = c - -================================================================================ -`; - -exports[`assignment-pattern.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { a /* comment */ = 1 } = b; - -const { c = 1 /* comment */ } = d; - -let {d //comment -= b} = c - -=====================================output===================================== -const { a /* comment */ = 1 } = b; - -const { c = 1 /* comment */ } = d; - -let { - d = b, //comment -} = c; - -================================================================================ -`; - -exports[`before-comma.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const foo = { - a: 'a' /* comment for this line */, - - /* Section B */ - b: 'b', -}; - -=====================================output===================================== -const foo = { - a: "a" /* comment for this line */, - - /* Section B */ - b: "b", -} - -================================================================================ -`; - -exports[`before-comma.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = { - a: 'a' /* comment for this line */, - - /* Section B */ - b: 'b', -}; - -=====================================output===================================== -const foo = { - a: "a" /* comment for this line */, - - /* Section B */ - b: "b", -}; - -================================================================================ -`; - -exports[`binary-expressions.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function addition() { - 0 - // Comment - + x -} - -function multiplication() { - 0 - // Comment - * x -} - -function division() { - 0 - // Comment - / x -} - -function substraction() { - 0 - // Comment - - x -} - -function remainder() { - 0 - // Comment - % x -} - -function exponentiation() { - 0 - // Comment - ** x -} - -function leftShift() { - 0 - // Comment - << x -} - -function rightShift() { - 0 - // Comment - >> x -} - -function unsignedRightShift() { - 0 - // Comment - >>> x -} - -function bitwiseAnd() { - 0 - // Comment - & x -} - -function bitwiseOr() { - 0 - // Comment - | x -} - -function bitwiseXor() { - 0 - // Comment - ^ x -} - -=====================================output===================================== -function addition() { - 0 + - // Comment - x -} - -function multiplication() { - 0 * - // Comment - x -} - -function division() { - 0 / - // Comment - x -} - -function substraction() { - 0 - - // Comment - x -} - -function remainder() { - 0 % - // Comment - x -} - -function exponentiation() { - 0 ** - // Comment - x -} - -function leftShift() { - 0 << - // Comment - x -} - -function rightShift() { - 0 >> - // Comment - x -} - -function unsignedRightShift() { - 0 >>> - // Comment - x -} - -function bitwiseAnd() { - 0 & - // Comment - x -} - -function bitwiseOr() { - 0 | - // Comment - x -} - -function bitwiseXor() { - 0 ^ - // Comment - x -} - -================================================================================ -`; - -exports[`binary-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function addition() { - 0 - // Comment - + x -} - -function multiplication() { - 0 - // Comment - * x -} - -function division() { - 0 - // Comment - / x -} - -function substraction() { - 0 - // Comment - - x -} - -function remainder() { - 0 - // Comment - % x -} - -function exponentiation() { - 0 - // Comment - ** x -} - -function leftShift() { - 0 - // Comment - << x -} - -function rightShift() { - 0 - // Comment - >> x -} - -function unsignedRightShift() { - 0 - // Comment - >>> x -} - -function bitwiseAnd() { - 0 - // Comment - & x -} - -function bitwiseOr() { - 0 - // Comment - | x -} - -function bitwiseXor() { - 0 - // Comment - ^ x -} - -=====================================output===================================== -function addition() { - 0 + - // Comment - x; -} - -function multiplication() { - 0 * - // Comment - x; -} - -function division() { - 0 / - // Comment - x; -} - -function substraction() { - 0 - - // Comment - x; -} - -function remainder() { - 0 % - // Comment - x; -} - -function exponentiation() { - 0 ** - // Comment - x; -} - -function leftShift() { - 0 << - // Comment - x; -} - -function rightShift() { - 0 >> - // Comment - x; -} - -function unsignedRightShift() { - 0 >>> - // Comment - x; -} - -function bitwiseAnd() { - 0 & - // Comment - x; -} - -function bitwiseOr() { - 0 | - // Comment - x; -} - -function bitwiseXor() { - 0 ^ - // Comment - x; -} - -================================================================================ -`; - -exports[`binary-expressions-block-comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -a = b || /** Comment */ -c; - -a = b /** Comment */ || -c; - -a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || -c; - -a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b && /** Comment */ -c; - -a = b /** Comment */ && -c; - -a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && -c; - -a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b + /** Comment */ -c; - -a = b /** Comment */ + -c; - -a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + -c; - -a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; -=====================================output===================================== -a = b /** Comment */ || c - -a = b /** Comment */ || c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || - c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || - c - -a = - b || - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c - -a = b /** Comment */ && c - -a = b /** Comment */ && c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && - c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && - c - -a = - b && - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c - -a = b /** Comment */ + c - -a = b /** Comment */ + c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + - c - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + - c - -a = - b + - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c - -================================================================================ -`; - -exports[`binary-expressions-block-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = b || /** Comment */ -c; - -a = b /** Comment */ || -c; - -a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || -c; - -a = b || /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b && /** Comment */ -c; - -a = b /** Comment */ && -c; - -a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && -c; - -a = b && /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b + /** Comment */ -c; - -a = b /** Comment */ + -c; - -a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ -c; - -a = b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + -c; - -a = b + /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; -=====================================output===================================== -a = b /** Comment */ || c; - -a = b /** Comment */ || c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || - c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ || - c; - -a = - b || - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b /** Comment */ && c; - -a = b /** Comment */ && c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && - c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ && - c; - -a = - b && - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -a = b /** Comment */ + c; - -a = b /** Comment */ + c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + - c; - -a = - b /** TODO this is a very very very very long comment that makes it go > 80 columns */ + - c; - -a = - b + - /** TODO this is a very very very very long comment that makes it go > 80 columns */ c; - -================================================================================ -`; - -exports[`binary-expressions-parens.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -Math.min( - ( - /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this comment and - * run flow */ - document.body.scrollHeight - - (window.scrollY + window.innerHeight) - ) - devsite_footer_height, - 0, -) - -=====================================output===================================== -Math.min( - /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this comment and - * run flow */ - document.body.scrollHeight - - (window.scrollY + window.innerHeight) - - devsite_footer_height, - 0 -) - -================================================================================ -`; - -exports[`binary-expressions-parens.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -Math.min( - ( - /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this comment and - * run flow */ - document.body.scrollHeight - - (window.scrollY + window.innerHeight) - ) - devsite_footer_height, - 0, -) - -=====================================output===================================== -Math.min( - /* $FlowFixMe(>=0.38.0 site=www) - Flow error detected during the - * deployment of v0.38.0. To see the error, remove this comment and - * run flow */ - document.body.scrollHeight - - (window.scrollY + window.innerHeight) - - devsite_footer_height, - 0 -); - -================================================================================ -`; - -exports[`binary-expressions-single-comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -a = b || // Comment -c; - -a = b || // TODO this is a very very very very long comment that makes it go > 80 columns -c; - -a = b && // Comment -c; - -a = b && // TODO this is a very very very very long comment that makes it go > 80 columns -c; - -a = b + // Comment -c; - -a = b + // TODO this is a very very very very long comment that makes it go > 80 columns -c; -=====================================output===================================== -a = - b || // Comment - c - -a = - b || // TODO this is a very very very very long comment that makes it go > 80 columns - c - -a = - b && // Comment - c - -a = - b && // TODO this is a very very very very long comment that makes it go > 80 columns - c - -a = - b + // Comment - c - -a = - b + // TODO this is a very very very very long comment that makes it go > 80 columns - c - -================================================================================ -`; - -exports[`binary-expressions-single-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = b || // Comment -c; - -a = b || // TODO this is a very very very very long comment that makes it go > 80 columns -c; - -a = b && // Comment -c; - -a = b && // TODO this is a very very very very long comment that makes it go > 80 columns -c; - -a = b + // Comment -c; - -a = b + // TODO this is a very very very very long comment that makes it go > 80 columns -c; -=====================================output===================================== -a = - b || // Comment - c; - -a = - b || // TODO this is a very very very very long comment that makes it go > 80 columns - c; - -a = - b && // Comment - c; - -a = - b && // TODO this is a very very very very long comment that makes it go > 80 columns - c; - -a = - b + // Comment - c; - -a = - b + // TODO this is a very very very very long comment that makes it go > 80 columns - c; - -================================================================================ -`; - -exports[`blank.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// This file only -// has comments. This comment -// should still exist -// -// when printed. - -/** - * @typedef {DataDrivenMapping|ConstantMapping} Mapping - */ -/** - * @typedef {Object.<String, Mapping>} ConfigurationMapping - */ - -/** - * @typedef {Function} D3Scale - a D3 scale - * @property {Function} ticks - * @property {Function} tickFormat - */ -// comment - -// comment - -=====================================output===================================== -// This file only -// has comments. This comment -// should still exist -// -// when printed. - -/** - * @typedef {DataDrivenMapping|ConstantMapping} Mapping - */ -/** - * @typedef {Object.<String, Mapping>} ConfigurationMapping - */ - -/** - * @typedef {Function} D3Scale - a D3 scale - * @property {Function} ticks - * @property {Function} tickFormat - */ -// comment - -// comment - -================================================================================ -`; - -exports[`blank.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// This file only -// has comments. This comment -// should still exist -// -// when printed. - -/** - * @typedef {DataDrivenMapping|ConstantMapping} Mapping - */ -/** - * @typedef {Object.<String, Mapping>} ConfigurationMapping - */ - -/** - * @typedef {Function} D3Scale - a D3 scale - * @property {Function} ticks - * @property {Function} tickFormat - */ -// comment - -// comment - -=====================================output===================================== -// This file only -// has comments. This comment -// should still exist -// -// when printed. - -/** - * @typedef {DataDrivenMapping|ConstantMapping} Mapping - */ -/** - * @typedef {Object.<String, Mapping>} ConfigurationMapping - */ - -/** - * @typedef {Function} D3Scale - a D3 scale - * @property {Function} ticks - * @property {Function} tickFormat - */ -// comment - -// comment - -================================================================================ -`; - -exports[`break-continue-statements.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -for (;;) { - break /* comment */; - continue /* comment */; -} - -loop: for (;;) { - break /* comment */ loop; - break loop /* comment */; - continue /* comment */ loop; - continue loop /* comment */; -} - -=====================================output===================================== -for (;;) { - break /* comment */ - continue /* comment */ -} - -loop: for (;;) { - break /* comment */ loop - break loop /* comment */ - continue /* comment */ loop - continue loop /* comment */ -} - -================================================================================ -`; - -exports[`break-continue-statements.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for (;;) { - break /* comment */; - continue /* comment */; -} - -loop: for (;;) { - break /* comment */ loop; - break loop /* comment */; - continue /* comment */ loop; - continue loop /* comment */; -} - -=====================================output===================================== -for (;;) { - break; /* comment */ - continue; /* comment */ -} - -loop: for (;;) { - break /* comment */ loop; - break loop /* comment */; - continue /* comment */ loop; - continue loop /* comment */; -} - -================================================================================ -`; - -exports[`call_comment.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -render( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -React.render( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -render?.( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -=====================================output===================================== -render( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -) - -React.render( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -) - -render?.( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -) - -================================================================================ -`; - -exports[`call_comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -render( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -React.render( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -render?.( // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -=====================================output===================================== -render( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -React.render( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -render?.( - // Warm any cache - <ChildUpdates renderAnchor={true} anchorClassOn={true} />, - container -); - -================================================================================ -`; - -exports[`class.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// #8718 -class C { - ma() {} /* D */ /* E */ - mb() {} -} - -class D { - ma() {} /* D */ /* E */ /* F */ - mb() {} -} - -=====================================output===================================== -// #8718 -class C { - ma() {} /* D */ /* E */ - mb() {} -} - -class D { - ma() {} /* D */ /* E */ /* F */ - mb() {} -} - -================================================================================ -`; - -exports[`class.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #8718 -class C { - ma() {} /* D */ /* E */ - mb() {} -} - -class D { - ma() {} /* D */ /* E */ /* F */ - mb() {} -} - -=====================================output===================================== -// #8718 -class C { - ma() {} /* D */ /* E */ - mb() {} -} - -class D { - ma() {} /* D */ /* E */ /* F */ - mb() {} -} - -================================================================================ -`; - -exports[`dangling.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -var a = {/* dangling */}; -var b = { - // dangling -}; -var b = [/* dangling */]; -function d() { - /* dangling */ -} -new Thing(/* dangling */); -Thing(/* dangling */); -export /* dangling */{}; - -=====================================output===================================== -var a = { - /* dangling */ -} -var b = { - // dangling -} -var b = [ - /* dangling */ -] -function d() { - /* dangling */ -} -new Thing(/* dangling */) -Thing(/* dangling */) -export /* dangling */ {} - -================================================================================ -`; - -exports[`dangling.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var a = {/* dangling */}; -var b = { - // dangling -}; -var b = [/* dangling */]; -function d() { - /* dangling */ -} -new Thing(/* dangling */); -Thing(/* dangling */); -export /* dangling */{}; - -=====================================output===================================== -var a = { - /* dangling */ -}; -var b = { - // dangling -}; -var b = [ - /* dangling */ -]; -function d() { - /* dangling */ -} -new Thing(/* dangling */); -Thing(/* dangling */); -export /* dangling */ {}; - -================================================================================ -`; - -exports[`dangling_array.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -expect(() => {}).toTriggerReadyStateChanges([ - // Nothing. -]); - -[1 /* first comment */, 2 /* second comment */, 3]; - -=====================================output===================================== -expect(() => {}).toTriggerReadyStateChanges([ - // Nothing. -]) - -;[1 /* first comment */, 2 /* second comment */, 3] - -================================================================================ -`; - -exports[`dangling_array.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -expect(() => {}).toTriggerReadyStateChanges([ - // Nothing. -]); - -[1 /* first comment */, 2 /* second comment */, 3]; - -=====================================output===================================== -expect(() => {}).toTriggerReadyStateChanges([ - // Nothing. -]); - -[1 /* first comment */, 2 /* second comment */, 3]; - -================================================================================ -`; - -exports[`dangling_for.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -for // comment -(;;); - -for /* comment */(;;); - -=====================================output===================================== -// comment -for (;;); - -/* comment */ -for (;;); - -================================================================================ -`; - -exports[`dangling_for.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for // comment -(;;); - -for /* comment */(;;); - -=====================================output===================================== -// comment -for (;;); - -/* comment */ -for (;;); - -================================================================================ -`; - -exports[`dynamic_imports.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import(/* Hello */ 'something') - -import('something' /* Hello */) - -import(/* Hello */ 'something' /* Hello */) - -import('something' /* Hello */ + 'else') - -import( - /* Hello */ - 'something' - /* Hello */ -) - -wrap( - import(/* Hello */ - 'something' - ) -) - -=====================================output===================================== -import(/* Hello */ "something") - -import("something" /* Hello */) - -import(/* Hello */ "something" /* Hello */) - -import("something" /* Hello */ + "else") - -import( - /* Hello */ - "something" - /* Hello */ -) - -wrap(import(/* Hello */ "something")) - -================================================================================ -`; - -exports[`dynamic_imports.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import(/* Hello */ 'something') - -import('something' /* Hello */) - -import(/* Hello */ 'something' /* Hello */) - -import('something' /* Hello */ + 'else') - -import( - /* Hello */ - 'something' - /* Hello */ -) - -wrap( - import(/* Hello */ - 'something' - ) -) - -=====================================output===================================== -import(/* Hello */ "something"); - -import("something" /* Hello */); - -import(/* Hello */ "something" /* Hello */); - -import("something" /* Hello */ + "else"); - -import( - /* Hello */ - "something" - /* Hello */ -); - -wrap(import(/* Hello */ "something")); - -================================================================================ -`; - -exports[`emoji.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -/* #2091 */ - -const test = '💖' -// This comment -// should not get collapsed - -=====================================output===================================== -/* #2091 */ - -const test = "💖" -// This comment -// should not get collapsed - -================================================================================ -`; - -exports[`emoji.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* #2091 */ - -const test = '💖' -// This comment -// should not get collapsed - -=====================================output===================================== -/* #2091 */ - -const test = "💖"; -// This comment -// should not get collapsed - -================================================================================ -`; - -exports[`export.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -export //comment -{} - -export /* comment */ {}; - -const foo = '' -export { - foo // comment -} - -const bar = '' -export { - // comment - bar -} - -const fooo = '' -const barr = '' -export { - fooo, // comment - barr, // comment -} - -const foooo = '' -const barrr = '' -export { - foooo, - - barrr as // comment - baz, -} from 'foo' - -const fooooo = '' -const barrrr = '' -export { - fooooo, - - barrrr as // comment - bazz, -} - -=====================================output===================================== -export //comment - {} - -export /* comment */ {} - -const foo = "" -export { - foo, // comment -} - -const bar = "" -export { - // comment - bar, -} - -const fooo = "" -const barr = "" -export { - fooo, // comment - barr, // comment -} - -const foooo = "" -const barrr = "" -export { - foooo, - // comment - barrr as baz, -} from "foo" - -const fooooo = "" -const barrrr = "" -export { - fooooo, - // comment - barrrr as bazz, -} - -================================================================================ -`; - -exports[`export.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export //comment -{} - -export /* comment */ {}; - -const foo = '' -export { - foo // comment -} - -const bar = '' -export { - // comment - bar -} - -const fooo = '' -const barr = '' -export { - fooo, // comment - barr, // comment -} - -const foooo = '' -const barrr = '' -export { - foooo, - - barrr as // comment - baz, -} from 'foo' - -const fooooo = '' -const barrrr = '' -export { - fooooo, - - barrrr as // comment - bazz, -} - -=====================================output===================================== -export //comment - {}; - -export /* comment */ {}; - -const foo = ""; -export { - foo, // comment -}; - -const bar = ""; -export { - // comment - bar, -}; - -const fooo = ""; -const barr = ""; -export { - fooo, // comment - barr, // comment -}; - -const foooo = ""; -const barrr = ""; -export { - foooo, - // comment - barrr as baz, -} from "foo"; - -const fooooo = ""; -const barrrr = ""; -export { - fooooo, - // comment - barrrr as bazz, -}; - -================================================================================ -`; - -exports[`export-and-import.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// These are tests to compare comment formats in \`export\` and \`import\`. - -export { - foo, - - bar as // comment - baz, -} from 'foo' - -const fooo = "" -const barr = "" - -export { - fooo, - - barr as // comment - bazz, -} - -import { - foo, - - bar as // comment - baz, -} from 'foo' - -=====================================output===================================== -// These are tests to compare comment formats in \`export\` and \`import\`. - -export { - foo, - // comment - bar as baz, -} from "foo" - -const fooo = "" -const barr = "" - -export { - fooo, - // comment - barr as bazz, -} - -import { - foo, - // comment - bar as baz, -} from "foo" - -================================================================================ -`; - -exports[`export-and-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// These are tests to compare comment formats in \`export\` and \`import\`. - -export { - foo, - - bar as // comment - baz, -} from 'foo' - -const fooo = "" -const barr = "" - -export { - fooo, - - barr as // comment - bazz, -} - -import { - foo, - - bar as // comment - baz, -} from 'foo' - -=====================================output===================================== -// These are tests to compare comment formats in \`export\` and \`import\`. - -export { - foo, - // comment - bar as baz, -} from "foo"; - -const fooo = ""; -const barr = ""; - -export { - fooo, - // comment - barr as bazz, -}; - -import { - foo, - // comment - bar as baz, -} from "foo"; - -================================================================================ -`; - -exports[`first-line.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -a // comment -b - -=====================================output===================================== -a // comment -b - -================================================================================ -`; - -exports[`first-line.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a // comment -b - -=====================================output===================================== -a; // comment -b; - -================================================================================ -`; - -exports[`function-declaration.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function a(/* comment */) {} // comment -function b() {} // comment -function c(/* comment */ argA, argB, argC) {} // comment -call((/*object*/ row) => {}); -KEYPAD_NUMBERS.map(num => ( // Buttons 0-9 - <div /> -)); - -function f1 /* f */() {} -function f2 (/* args */) {} -function f3 () /* returns */ {} -function f4 /* f */(/* args */) /* returns */ {} - -function f5 /* f */(/* a */ a) {} -function f6 /* f */(a /* a */) {} -function f7 /* f */(/* a */ a) /* returns */ {} - -const obj = { - f1 /* f */() {}, - f2 (/* args */) {}, - f3 () /* returns */ {}, - f4 /* f */(/* args */) /* returns */ {}, -}; - -(function f /* f */() {})(); -(function f (/* args */) {})(); -(function f () /* returns */ {})(); -(function f /* f */(/* args */) /* returns */ {})(); - -class C1 { - f/* f */() {} -} -class C2 { - f(/* args */) {} -} -class C3 { - f() /* returns */ {} -} -class C4 { - f/* f */(/* args */) /* returns */ {} -} - -function foo1() -// this is a function -{ - return 42 -} - -function foo2() // this is a function -{ - return 42 -} - -function foo3() { // this is a function - return 42 -} - -function foo4() { - // this is a function - return 42; -} - -=====================================output===================================== -function a(/* comment */) {} // comment -function b() {} // comment -function c(/* comment */ argA, argB, argC) {} // comment -call((/*object*/ row) => {}) -KEYPAD_NUMBERS.map( - ( - num // Buttons 0-9 - ) => <div /> -) - -function f1 /* f */() {} -function f2(/* args */) {} -function f3() /* returns */ {} -function f4 /* f */(/* args */) /* returns */ {} - -function f5 /* f */(/* a */ a) {} -function f6 /* f */(a /* a */) {} -function f7 /* f */(/* a */ a) /* returns */ {} - -const obj = { - f1 /* f */() {}, - f2(/* args */) {}, - f3() /* returns */ {}, - f4 /* f */(/* args */) /* returns */ {}, -} - -;(function f /* f */() {})() -;(function f(/* args */) {})() -;(function f() /* returns */ {})() -;(function f /* f */(/* args */) /* returns */ {})() - -class C1 { - f /* f */() {} -} -class C2 { - f(/* args */) {} -} -class C3 { - f() /* returns */ {} -} -class C4 { - f /* f */(/* args */) /* returns */ {} -} - -function foo1() { - // this is a function - return 42 -} - -function foo2() { - // this is a function - return 42 -} - -function foo3() { - // this is a function - return 42 -} - -function foo4() { - // this is a function - return 42 -} - -================================================================================ -`; - -exports[`function-declaration.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a(/* comment */) {} // comment -function b() {} // comment -function c(/* comment */ argA, argB, argC) {} // comment -call((/*object*/ row) => {}); -KEYPAD_NUMBERS.map(num => ( // Buttons 0-9 - <div /> -)); - -function f1 /* f */() {} -function f2 (/* args */) {} -function f3 () /* returns */ {} -function f4 /* f */(/* args */) /* returns */ {} - -function f5 /* f */(/* a */ a) {} -function f6 /* f */(a /* a */) {} -function f7 /* f */(/* a */ a) /* returns */ {} - -const obj = { - f1 /* f */() {}, - f2 (/* args */) {}, - f3 () /* returns */ {}, - f4 /* f */(/* args */) /* returns */ {}, -}; - -(function f /* f */() {})(); -(function f (/* args */) {})(); -(function f () /* returns */ {})(); -(function f /* f */(/* args */) /* returns */ {})(); - -class C1 { - f/* f */() {} -} -class C2 { - f(/* args */) {} -} -class C3 { - f() /* returns */ {} -} -class C4 { - f/* f */(/* args */) /* returns */ {} -} - -function foo1() -// this is a function -{ - return 42 -} - -function foo2() // this is a function -{ - return 42 -} - -function foo3() { // this is a function - return 42 -} - -function foo4() { - // this is a function - return 42; -} - -=====================================output===================================== -function a(/* comment */) {} // comment -function b() {} // comment -function c(/* comment */ argA, argB, argC) {} // comment -call((/*object*/ row) => {}); -KEYPAD_NUMBERS.map( - ( - num // Buttons 0-9 - ) => <div /> -); - -function f1 /* f */() {} -function f2(/* args */) {} -function f3() /* returns */ {} -function f4 /* f */(/* args */) /* returns */ {} - -function f5 /* f */(/* a */ a) {} -function f6 /* f */(a /* a */) {} -function f7 /* f */(/* a */ a) /* returns */ {} - -const obj = { - f1 /* f */() {}, - f2(/* args */) {}, - f3() /* returns */ {}, - f4 /* f */(/* args */) /* returns */ {}, -}; - -(function f /* f */() {})(); -(function f(/* args */) {})(); -(function f() /* returns */ {})(); -(function f /* f */(/* args */) /* returns */ {})(); - -class C1 { - f /* f */() {} -} -class C2 { - f(/* args */) {} -} -class C3 { - f() /* returns */ {} -} -class C4 { - f /* f */(/* args */) /* returns */ {} -} - -function foo1() { - // this is a function - return 42; -} - -function foo2() { - // this is a function - return 42; -} - -function foo3() { - // this is a function - return 42; -} - -function foo4() { - // this is a function - return 42; -} - -================================================================================ -`; - -exports[`if.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -if (1) -// comment -{ - false -} -// comment -else if (2) - true -// multi -// ple -// lines -else if (3) - // existing comment - true -// okay? -else if (4) { - // empty with existing comment -} -// comment -else { -} - -if (5) // comment -true - -if (6) // comment -{true} -else if (7) // comment -true -else // comment -{true} - -if (8) // comment -// comment -{true} -else if (9) // comment -// comment -true -else // comment -// comment -{true} - -if (10) /* comment */ // comment -{true} -else if (11) /* comment */ -true -else if (12) // comment /* comment */ // comment -true -else if (13) /* comment */ /* comment */ // comment -true -else /* comment */ -{true} - -if (14) // comment -/* comment */ -// comment -{true} -else if (15) // comment -/* comment */ -/* comment */ // comment -true - -=====================================output===================================== -if (1) { - // comment - false -} -// comment -else if (2) true -// multi -// ple -// lines -else if (3) - // existing comment - true -// okay? -else if (4) { - // empty with existing comment -} -// comment -else { -} - -if (5) - // comment - true - -if (6) { - // comment - true -} else if (7) - // comment - true -// comment -else { - true -} - -if (8) { - // comment - // comment - true -} else if (9) - // comment - // comment - true -// comment -// comment -else { - true -} - -if (10) { - /* comment */ // comment - true -} else if (11) /* comment */ true -else if (12) - // comment /* comment */ // comment - true -else if (13) - /* comment */ /* comment */ // comment - true -/* comment */ else { - true -} - -if (14) { - // comment - /* comment */ - // comment - true -} else if (15) - // comment - /* comment */ - /* comment */ // comment - true - -================================================================================ -`; - -exports[`if.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (1) -// comment -{ - false -} -// comment -else if (2) - true -// multi -// ple -// lines -else if (3) - // existing comment - true -// okay? -else if (4) { - // empty with existing comment -} -// comment -else { -} - -if (5) // comment -true - -if (6) // comment -{true} -else if (7) // comment -true -else // comment -{true} - -if (8) // comment -// comment -{true} -else if (9) // comment -// comment -true -else // comment -// comment -{true} - -if (10) /* comment */ // comment -{true} -else if (11) /* comment */ -true -else if (12) // comment /* comment */ // comment -true -else if (13) /* comment */ /* comment */ // comment -true -else /* comment */ -{true} - -if (14) // comment -/* comment */ -// comment -{true} -else if (15) // comment -/* comment */ -/* comment */ // comment -true - -=====================================output===================================== -if (1) { - // comment - false; -} -// comment -else if (2) true; -// multi -// ple -// lines -else if (3) - // existing comment - true; -// okay? -else if (4) { - // empty with existing comment -} -// comment -else { -} - -if (5) - // comment - true; - -if (6) { - // comment - true; -} else if (7) - // comment - true; -// comment -else { - true; -} - -if (8) { - // comment - // comment - true; -} else if (9) - // comment - // comment - true; -// comment -// comment -else { - true; -} - -if (10) { - /* comment */ // comment - true; -} else if (11) /* comment */ true; -else if (12) - // comment /* comment */ // comment - true; -else if (13) - /* comment */ /* comment */ // comment - true; -/* comment */ else { - true; -} - -if (14) { - // comment - /* comment */ - // comment - true; -} else if (15) - // comment - /* comment */ - /* comment */ // comment - true; - -================================================================================ -`; - -exports[`issue-3532.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import React from 'react'; - -/* -import styled from 'react-emotion'; - -const AspectRatioBox = styled.div\` - &::before { - content: ''; - width: 1px; - margin-left: -1px; - float: left; - height: 0; - padding-top: \${props => 100 / props.aspectRatio}%; - } - - &::after { - /* To clear float *//* - content: ''; - display: table; - clear: both; - } -\`; -*/ - -const AspectRatioBox = ({ - aspectRatio, - children, - ...props -}) => ( - <div - className={\`height: 0; - overflow: hidden; - padding-top: \${props => 100 / props.aspectRatio}%; - background: white; - position: relative;\`} - > - <div>{children}</div> - </div> -); - -export default AspectRatioBox; - -=====================================output===================================== -import React from "react" - -/* -import styled from 'react-emotion'; - -const AspectRatioBox = styled.div\` - &::before { - content: ''; - width: 1px; - margin-left: -1px; - float: left; - height: 0; - padding-top: \${props => 100 / props.aspectRatio}%; - } - - &::after { - /* To clear float */ /* - content: ''; - display: table; - clear: both; - } -\`; -*/ - -const AspectRatioBox = ({ aspectRatio, children, ...props }) => ( - <div - className={\`height: 0; - overflow: hidden; - padding-top: \${(props) => 100 / props.aspectRatio}%; - background: white; - position: relative;\`} - > - <div>{children}</div> - </div> -) - -export default AspectRatioBox - -================================================================================ -`; - -exports[`issue-3532.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import React from 'react'; - -/* -import styled from 'react-emotion'; - -const AspectRatioBox = styled.div\` - &::before { - content: ''; - width: 1px; - margin-left: -1px; - float: left; - height: 0; - padding-top: \${props => 100 / props.aspectRatio}%; - } - - &::after { - /* To clear float *//* - content: ''; - display: table; - clear: both; - } -\`; -*/ - -const AspectRatioBox = ({ - aspectRatio, - children, - ...props -}) => ( - <div - className={\`height: 0; - overflow: hidden; - padding-top: \${props => 100 / props.aspectRatio}%; - background: white; - position: relative;\`} - > - <div>{children}</div> - </div> -); - -export default AspectRatioBox; - -=====================================output===================================== -import React from "react"; - -/* -import styled from 'react-emotion'; - -const AspectRatioBox = styled.div\` - &::before { - content: ''; - width: 1px; - margin-left: -1px; - float: left; - height: 0; - padding-top: \${props => 100 / props.aspectRatio}%; - } - - &::after { - /* To clear float */ /* - content: ''; - display: table; - clear: both; - } -\`; -*/ - -const AspectRatioBox = ({ aspectRatio, children, ...props }) => ( - <div - className={\`height: 0; - overflow: hidden; - padding-top: \${(props) => 100 / props.aspectRatio}%; - background: white; - position: relative;\`} - > - <div>{children}</div> - </div> -); - -export default AspectRatioBox; - -================================================================================ -`; - -exports[`issue-7724.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - *//** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} -=====================================output===================================== -const foo = "Bar" - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - */ /** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value) - } else { - return new Value(type) - } -} - -================================================================================ -`; - -exports[`issue-7724.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - *//** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} -=====================================output===================================== -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - */ /** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} - -================================================================================ -`; - -exports[`issues.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// Does not need to break as it fits in 80 columns -this.call(a, /* comment */ b); - -// Comments should either stay at the end of the line or always before, but -// not one before and one after. -throw new ProcessSystemError({ - code: acc.error.code, // Alias of errno - originalError: acc.error, // Just in case. -}); - -// Missing one level of indentation because of the comment -const rootEpic = (actions, store) => ( - combineEpics(...epics)(actions, store) - // Log errors and continue. - .catch((err, stream) => { - getLogger().error(err); - return stream; - }) -); - -// optional trailing comma gets moved all the way to the beginning -const regex = new RegExp( - '^\\\\s*' + // beginning of the line - 'name\\\\s*=\\\\s*' + // name = - '[\\'"]' + // opening quotation mark - escapeStringRegExp(target.name) + // target name - '[\\'"]' + // closing quotation mark - ',?$', // optional trailing comma -); - -// The comment is moved and doesn't trigger the eslint rule anymore -import path from 'path'; // eslint-disable-line nuclide-internal/prefer-nuclide-uri - -// Comments disappear in-between MemberExpressions -Observable.of(process) - // Don't complete until we say so! - .merge(Observable.never()) - // Get the errors. - .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) - .takeUntil(exit); - -// Comments disappear inside of JSX -<div> - {/* Some comment */} -</div>; - -// Comments in JSX tag are placed in a non optimal way -<div - // comment -/>; - -// Comments disappear in empty blocks -if (1) { - // Comment -} - -// Comments trigger invalid JavaScript in-between else if -if (1) { -} -// Comment -else { - -} - -// The comment makes the line break in a weird way -const result = asyncExecute('non_existing_command', /* args */ []); - -// The closing paren is printed on the same line as the comment -foo({} - // Hi -); - -=====================================output===================================== -// Does not need to break as it fits in 80 columns -this.call(a, /* comment */ b) - -// Comments should either stay at the end of the line or always before, but -// not one before and one after. -throw new ProcessSystemError({ - code: acc.error.code, // Alias of errno - originalError: acc.error, // Just in case. -}) - -// Missing one level of indentation because of the comment -const rootEpic = (actions, store) => - combineEpics(...epics)(actions, store) - // Log errors and continue. - .catch((err, stream) => { - getLogger().error(err) - return stream - }) - -// optional trailing comma gets moved all the way to the beginning -const regex = new RegExp( - "^\\\\s*" + // beginning of the line - "name\\\\s*=\\\\s*" + // name = - "['\\"]" + // opening quotation mark - escapeStringRegExp(target.name) + // target name - "['\\"]" + // closing quotation mark - ",?$" // optional trailing comma -) - -// The comment is moved and doesn't trigger the eslint rule anymore -import path from "path" // eslint-disable-line nuclide-internal/prefer-nuclide-uri - -// Comments disappear in-between MemberExpressions -Observable.of(process) - // Don't complete until we say so! - .merge(Observable.never()) - // Get the errors. - .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) - .takeUntil(exit) - -// Comments disappear inside of JSX -;<div>{/* Some comment */}</div> - -// Comments in JSX tag are placed in a non optimal way -;<div -// comment -/> - -// Comments disappear in empty blocks -if (1) { - // Comment -} - -// Comments trigger invalid JavaScript in-between else if -if (1) { -} -// Comment -else { -} - -// The comment makes the line break in a weird way -const result = asyncExecute("non_existing_command", /* args */ []) - -// The closing paren is printed on the same line as the comment -foo( - {} - // Hi -) - -================================================================================ -`; - -exports[`issues.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Does not need to break as it fits in 80 columns -this.call(a, /* comment */ b); - -// Comments should either stay at the end of the line or always before, but -// not one before and one after. -throw new ProcessSystemError({ - code: acc.error.code, // Alias of errno - originalError: acc.error, // Just in case. -}); - -// Missing one level of indentation because of the comment -const rootEpic = (actions, store) => ( - combineEpics(...epics)(actions, store) - // Log errors and continue. - .catch((err, stream) => { - getLogger().error(err); - return stream; - }) -); - -// optional trailing comma gets moved all the way to the beginning -const regex = new RegExp( - '^\\\\s*' + // beginning of the line - 'name\\\\s*=\\\\s*' + // name = - '[\\'"]' + // opening quotation mark - escapeStringRegExp(target.name) + // target name - '[\\'"]' + // closing quotation mark - ',?$', // optional trailing comma -); - -// The comment is moved and doesn't trigger the eslint rule anymore -import path from 'path'; // eslint-disable-line nuclide-internal/prefer-nuclide-uri - -// Comments disappear in-between MemberExpressions -Observable.of(process) - // Don't complete until we say so! - .merge(Observable.never()) - // Get the errors. - .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) - .takeUntil(exit); - -// Comments disappear inside of JSX -<div> - {/* Some comment */} -</div>; - -// Comments in JSX tag are placed in a non optimal way -<div - // comment -/>; - -// Comments disappear in empty blocks -if (1) { - // Comment -} - -// Comments trigger invalid JavaScript in-between else if -if (1) { -} -// Comment -else { - -} - -// The comment makes the line break in a weird way -const result = asyncExecute('non_existing_command', /* args */ []); - -// The closing paren is printed on the same line as the comment -foo({} - // Hi -); - -=====================================output===================================== -// Does not need to break as it fits in 80 columns -this.call(a, /* comment */ b); - -// Comments should either stay at the end of the line or always before, but -// not one before and one after. -throw new ProcessSystemError({ - code: acc.error.code, // Alias of errno - originalError: acc.error, // Just in case. -}); - -// Missing one level of indentation because of the comment -const rootEpic = (actions, store) => - combineEpics(...epics)(actions, store) - // Log errors and continue. - .catch((err, stream) => { - getLogger().error(err); - return stream; - }); - -// optional trailing comma gets moved all the way to the beginning -const regex = new RegExp( - "^\\\\s*" + // beginning of the line - "name\\\\s*=\\\\s*" + // name = - "['\\"]" + // opening quotation mark - escapeStringRegExp(target.name) + // target name - "['\\"]" + // closing quotation mark - ",?$" // optional trailing comma -); - -// The comment is moved and doesn't trigger the eslint rule anymore -import path from "path"; // eslint-disable-line nuclide-internal/prefer-nuclide-uri - -// Comments disappear in-between MemberExpressions -Observable.of(process) - // Don't complete until we say so! - .merge(Observable.never()) - // Get the errors. - .takeUntil(throwOnError ? errors.flatMap(Observable.throw) : errors) - .takeUntil(exit); - -// Comments disappear inside of JSX -<div>{/* Some comment */}</div>; - -// Comments in JSX tag are placed in a non optimal way -<div -// comment -/>; - -// Comments disappear in empty blocks -if (1) { - // Comment -} - -// Comments trigger invalid JavaScript in-between else if -if (1) { -} -// Comment -else { -} - -// The comment makes the line break in a weird way -const result = asyncExecute("non_existing_command", /* args */ []); - -// The closing paren is printed on the same line as the comment -foo( - {} - // Hi -); - -================================================================================ -`; - -exports[`jsdoc.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -/** @type {any} */ -const x = ( - <div> - <div /> - </div> -); - -/** - * @type {object} - */ -() => ( - <div> - sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp - </div> -); - -/** - * @type {object} - */ -function HelloWorld() { - return ( - <div> - <span>Test</span> - </div> - ); -} -=====================================output===================================== -/** @type {any} */ -const x = ( - <div> - <div /> - </div> -) - -/** - * @type {object} - */ -;() => ( - <div> - sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp - </div> -) - -/** - * @type {object} - */ -function HelloWorld() { - return ( - <div> - <span>Test</span> - </div> - ) -} - -================================================================================ -`; - -exports[`jsdoc.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/** @type {any} */ -const x = ( - <div> - <div /> - </div> -); - -/** - * @type {object} - */ -() => ( - <div> - sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp - </div> -); - -/** - * @type {object} - */ -function HelloWorld() { - return ( - <div> - <span>Test</span> - </div> - ); -} -=====================================output===================================== -/** @type {any} */ -const x = ( - <div> - <div /> - </div> -); - -/** - * @type {object} - */ -() => ( - <div> - sajdfpoiasdjfpoiasdjfpoiasdjfpoiadsjfpaoisdjfapsdiofjapioisadfaskfaspiofjp - </div> -); - -/** - * @type {object} - */ -function HelloWorld() { - return ( - <div> - <span>Test</span> - </div> - ); -} - -================================================================================ -`; - -exports[`jsx.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<div> - { - /* comment */ - } -</div>; - -<div> - {/* comment */ - } -</div>; - -<div> - {/* comment -*/ - } -</div>; - -<div> - {a/* comment -*/ - } -</div>; - -<div> - {/* comment -*/ - a - } -</div>; - -<div> - {/* comment */ - } -</div>; - -<div> - {/* comment */} -</div>; - -<div> - { - // single line comment - } -</div>; - -<div> - { - // multiple line comments 1 - // multiple line comments 2 - } -</div>; - -<div> - { - // multiple mixed comments 1 - /* multiple mixed comments 2 */ - /* multiple mixed comments 3 */ - // multiple mixed comments 4 - } -</div>; - -<div> - { - // Some very v ery very very merry (xmas) very very long line to break line width limit - } -</div>; - -<div>{/*<div> Some very v ery very very long line to break line width limit </div>*/}</div>; - -<div> - {/** - * JSDoc-y comment in JSX. I wonder what will happen to it? - */} -</div>; - -<div> - { - /** - * Another JSDoc comment in JSX. - */ - } -</div>; - -<div - /** - * Handles clicks. -*/ -onClick={() => {}}> - -</div>; - -<div - // comment -> - {foo} -</div>; - -<div - className="foo" // comment -> - {foo} -</div>; - -<div - className="foo" - // comment -> - {foo} -</div>; - -<div // comment - id="foo" -> - {children} -</div>; - -<Wrapper> - {} - <Component /> -</Wrapper> - -=====================================output===================================== -;<div>{/* comment */}</div> - -;<div>{/* comment */}</div> - -;<div> - {/* comment - */} -</div> - -;<div> - { - a - /* comment - */ - } -</div> - -;<div> - { - /* comment - */ - a - } -</div> - -;<div>{/* comment */}</div> - -;<div>{/* comment */}</div> - -;<div> - { - // single line comment - } -</div> - -;<div> - { - // multiple line comments 1 - // multiple line comments 2 - } -</div> - -;<div> - { - // multiple mixed comments 1 - /* multiple mixed comments 2 */ - /* multiple mixed comments 3 */ - // multiple mixed comments 4 - } -</div> - -;<div> - { - // Some very v ery very very merry (xmas) very very long line to break line width limit - } -</div> - -;<div> - {/*<div> Some very v ery very very long line to break line width limit </div>*/} -</div> - -;<div> - {/** - * JSDoc-y comment in JSX. I wonder what will happen to it? - */} -</div> - -;<div> - {/** - * Another JSDoc comment in JSX. - */} -</div> - -;<div - /** - * Handles clicks. - */ - onClick={() => {}} -></div> - -;<div -// comment -> - {foo} -</div> - -;<div - className="foo" // comment -> - {foo} -</div> - -;<div - className="foo" - // comment -> - {foo} -</div> - -;<div // comment - id="foo" -> - {children} -</div> - -;<Wrapper> - {} - <Component /> -</Wrapper> - -================================================================================ -`; - -exports[`jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - { - /* comment */ - } -</div>; - -<div> - {/* comment */ - } -</div>; - -<div> - {/* comment -*/ - } -</div>; - -<div> - {a/* comment -*/ - } -</div>; - -<div> - {/* comment -*/ - a - } -</div>; - -<div> - {/* comment */ - } -</div>; - -<div> - {/* comment */} -</div>; - -<div> - { - // single line comment - } -</div>; - -<div> - { - // multiple line comments 1 - // multiple line comments 2 - } -</div>; - -<div> - { - // multiple mixed comments 1 - /* multiple mixed comments 2 */ - /* multiple mixed comments 3 */ - // multiple mixed comments 4 - } -</div>; - -<div> - { - // Some very v ery very very merry (xmas) very very long line to break line width limit - } -</div>; - -<div>{/*<div> Some very v ery very very long line to break line width limit </div>*/}</div>; - -<div> - {/** - * JSDoc-y comment in JSX. I wonder what will happen to it? - */} -</div>; - -<div> - { - /** - * Another JSDoc comment in JSX. - */ - } -</div>; - -<div - /** - * Handles clicks. -*/ -onClick={() => {}}> - -</div>; - -<div - // comment -> - {foo} -</div>; - -<div - className="foo" // comment -> - {foo} -</div>; - -<div - className="foo" - // comment -> - {foo} -</div>; - -<div // comment - id="foo" -> - {children} -</div>; - -<Wrapper> - {} - <Component /> -</Wrapper> - -=====================================output===================================== -<div>{/* comment */}</div>; - -<div>{/* comment */}</div>; - -<div> - {/* comment - */} -</div>; - -<div> - { - a - /* comment - */ - } -</div>; - -<div> - { - /* comment - */ - a - } -</div>; - -<div>{/* comment */}</div>; - -<div>{/* comment */}</div>; - -<div> - { - // single line comment - } -</div>; - -<div> - { - // multiple line comments 1 - // multiple line comments 2 - } -</div>; - -<div> - { - // multiple mixed comments 1 - /* multiple mixed comments 2 */ - /* multiple mixed comments 3 */ - // multiple mixed comments 4 - } -</div>; - -<div> - { - // Some very v ery very very merry (xmas) very very long line to break line width limit - } -</div>; - -<div> - {/*<div> Some very v ery very very long line to break line width limit </div>*/} -</div>; - -<div> - {/** - * JSDoc-y comment in JSX. I wonder what will happen to it? - */} -</div>; - -<div> - {/** - * Another JSDoc comment in JSX. - */} -</div>; - -<div - /** - * Handles clicks. - */ - onClick={() => {}} -></div>; - -<div -// comment -> - {foo} -</div>; - -<div - className="foo" // comment -> - {foo} -</div>; - -<div - className="foo" - // comment -> - {foo} -</div>; - -<div // comment - id="foo" -> - {children} -</div>; - -<Wrapper> - {} - <Component /> -</Wrapper>; - -================================================================================ -`; - -exports[`last-arg.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== - -class Foo { - a(lol /*string*/) {} - - b(lol /*string*/ - ) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) /*string*/ {} - - // prettier-ignore - c(lol /*string*/ - ) {} - - // prettier-ignore - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - // prettier-ignore - e( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} /* string*/ -} - -=====================================output===================================== -class Foo { - a(lol /*string*/) {} - - b(lol /*string*/) {} - - d(lol /*string*/, lol2 /*string*/, lol3 /*string*/, lol4 /*string*/) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) /*string*/ {} - - // prettier-ignore - c(lol /*string*/ - ) {} - - // prettier-ignore - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - // prettier-ignore - e( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} /* string*/ -} - -================================================================================ -`; - -exports[`last-arg.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class Foo { - a(lol /*string*/) {} - - b(lol /*string*/ - ) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) /*string*/ {} - - // prettier-ignore - c(lol /*string*/ - ) {} - - // prettier-ignore - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - // prettier-ignore - e( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} /* string*/ -} - -=====================================output===================================== -class Foo { - a(lol /*string*/) {} - - b(lol /*string*/) {} - - d(lol /*string*/, lol2 /*string*/, lol3 /*string*/, lol4 /*string*/) {} - - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) /*string*/ {} - - // prettier-ignore - c(lol /*string*/ - ) {} - - // prettier-ignore - d( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} - - // prettier-ignore - e( - lol /*string*/, - lol2 /*string*/, - lol3 /*string*/, - lol4 /*string*/ - ) {} /* string*/ -} - -================================================================================ -`; - -exports[`multi-comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// #8323 - -import { MapViewProps } from 'react-native-maps'; /* -comment 14 -*/ /* comment1 -10 -*/ /*/ comment 13 */ -/* - comment 9 - ****/ -import * as ts from 'typescript'; - -x; /* -1 */ /* 2 */ - -y - -x; /*1*//*2*/ -y; - -=====================================output===================================== -// #8323 - -import { MapViewProps } from "react-native-maps" /* -comment 14 -*/ /* comment1 -10 -*/ /*/ comment 13 */ -/* - comment 9 - ****/ -import * as ts from "typescript" - -x /* -1 */ /* 2 */ - -y - -x /*1*/ /*2*/ -y - -================================================================================ -`; - -exports[`multi-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #8323 - -import { MapViewProps } from 'react-native-maps'; /* -comment 14 -*/ /* comment1 -10 -*/ /*/ comment 13 */ -/* - comment 9 - ****/ -import * as ts from 'typescript'; - -x; /* -1 */ /* 2 */ - -y - -x; /*1*//*2*/ -y; - -=====================================output===================================== -// #8323 - -import { MapViewProps } from "react-native-maps"; /* -comment 14 -*/ /* comment1 -10 -*/ /*/ comment 13 */ -/* - comment 9 - ****/ -import * as ts from "typescript"; - -x; /* -1 */ /* 2 */ - -y; - -x; /*1*/ /*2*/ -y; - -================================================================================ -`; - -exports[`multi-comments-2.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== - const x = 0; - - /* istanbul ignore if */ // debug case currently not triggered - if (true) { - x; - } - -=====================================output===================================== -const x = 0 - -/* istanbul ignore if */ // debug case currently not triggered -if (true) { - x -} - -================================================================================ -`; - -exports[`multi-comments-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - const x = 0; - - /* istanbul ignore if */ // debug case currently not triggered - if (true) { - x; - } - -=====================================output===================================== -const x = 0; - -/* istanbul ignore if */ // debug case currently not triggered -if (true) { - x; -} - -================================================================================ -`; - -exports[`multi-comments-on-same-line.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -/*========= All on same line =========*/ -a; -/*1*//*2*//*3*/ -b; - -a;/*1*//*2*//*3*/ -b; - -a; -/*1*//*2*//*3*/b; - -a; -/* -1*//*2*//*3 -*/ -b; - -a;/* -1*//*2*//*3 -*/ -b; - -a;/* -1*//*2*//*3 -*/b; - -/*========= First two on same line =========*/ -a; -/*1*//*2*/ -/*3*/ -b; - -a;/*1*//*2*/ -/*3*/ -b; - -a; -/*1*//*2*/ -/*3*/b; - -a; -/* -1*//*2*/ -/*3 -*/ -b; - -a;/* -1*//*2*/ -/*3 -*/ -b; - -a;/* -1*//*2*/ -/*3 -*/b; - -/*========= Last two on same line =========*/ -a; -/*1*/ -/*2*//*3*/ -b; - -a;/*1*/ -/*2*//*3*/ -b; - -a; -/*1*/ -/*2*//*3*/b; - -a; -/* -1*/ -/*2*//*3 -*/ -b; - -a;/* -1*/ -/*2*//*3 -*/ -b; - -a;/* -1*/ -/*2*//*3 -*/b; - -=====================================output===================================== -/*========= All on same line =========*/ -a -/*1*/ /*2*/ /*3*/ -b - -a /*1*/ /*2*/ /*3*/ -b - -a -/*1*/ /*2*/ /*3*/ b - -a -/* -1*/ /*2*/ /*3 - */ -b - -a /* -1*/ /*2*/ -/*3 - */ -b - -a -/* -1*/ /*2*/ /*3 - */ b - -/*========= First two on same line =========*/ -a -/*1*/ /*2*/ -/*3*/ -b - -a /*1*/ /*2*/ -/*3*/ -b - -a -/*1*/ /*2*/ -/*3*/ b - -a -/* -1*/ /*2*/ -/*3 - */ -b - -a /* -1*/ /*2*/ -/*3 - */ -b - -a /* -1*/ /*2*/ -/*3 - */ b - -/*========= Last two on same line =========*/ -a -/*1*/ -/*2*/ /*3*/ -b - -a /*1*/ -/*2*/ /*3*/ -b - -a -/*1*/ -/*2*/ /*3*/ b - -a -/* -1*/ -/*2*/ /*3 - */ -b - -a /* -1*/ -/*2*/ /*3 - */ -b - -a /* -1*/ -/*2*/ /*3 - */ b - -================================================================================ -`; - -exports[`multi-comments-on-same-line.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/*========= All on same line =========*/ -a; -/*1*//*2*//*3*/ -b; - -a;/*1*//*2*//*3*/ -b; - -a; -/*1*//*2*//*3*/b; - -a; -/* -1*//*2*//*3 -*/ -b; - -a;/* -1*//*2*//*3 -*/ -b; - -a;/* -1*//*2*//*3 -*/b; - -/*========= First two on same line =========*/ -a; -/*1*//*2*/ -/*3*/ -b; - -a;/*1*//*2*/ -/*3*/ -b; - -a; -/*1*//*2*/ -/*3*/b; - -a; -/* -1*//*2*/ -/*3 -*/ -b; - -a;/* -1*//*2*/ -/*3 -*/ -b; - -a;/* -1*//*2*/ -/*3 -*/b; - -/*========= Last two on same line =========*/ -a; -/*1*/ -/*2*//*3*/ -b; - -a;/*1*/ -/*2*//*3*/ -b; - -a; -/*1*/ -/*2*//*3*/b; - -a; -/* -1*/ -/*2*//*3 -*/ -b; - -a;/* -1*/ -/*2*//*3 -*/ -b; - -a;/* -1*/ -/*2*//*3 -*/b; - -=====================================output===================================== -/*========= All on same line =========*/ -a; -/*1*/ /*2*/ /*3*/ -b; - -a; /*1*/ /*2*/ /*3*/ -b; - -a; -/*1*/ /*2*/ /*3*/ b; - -a; -/* -1*/ /*2*/ /*3 - */ -b; - -a; /* -1*/ /*2*/ -/*3 - */ -b; - -a; -/* -1*/ /*2*/ /*3 - */ b; - -/*========= First two on same line =========*/ -a; -/*1*/ /*2*/ -/*3*/ -b; - -a; /*1*/ /*2*/ -/*3*/ -b; - -a; -/*1*/ /*2*/ -/*3*/ b; - -a; -/* -1*/ /*2*/ -/*3 - */ -b; - -a; /* -1*/ /*2*/ -/*3 - */ -b; - -a; /* -1*/ /*2*/ -/*3 - */ b; - -/*========= Last two on same line =========*/ -a; -/*1*/ -/*2*/ /*3*/ -b; - -a; /*1*/ -/*2*/ /*3*/ -b; - -a; -/*1*/ -/*2*/ /*3*/ b; - -a; -/* -1*/ -/*2*/ /*3 - */ -b; - -a; /* -1*/ -/*2*/ /*3 - */ -b; - -a; /* -1*/ -/*2*/ /*3 - */ b; - -================================================================================ -`; - -exports[`multi-comments-on-same-line-2.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -/* 1 */ /* 2 */ /* 3 */ a; -a; /* 4 */ /* 5 */ /* 6 */ - -=====================================output===================================== -/* 1 */ /* 2 */ /* 3 */ a -a /* 4 */ /* 5 */ /* 6 */ - -================================================================================ -`; - -exports[`multi-comments-on-same-line-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* 1 */ /* 2 */ /* 3 */ a; -a; /* 4 */ /* 5 */ /* 6 */ - -=====================================output===================================== -/* 1 */ /* 2 */ /* 3 */ a; -a; /* 4 */ /* 5 */ /* 6 */ - -================================================================================ -`; - -exports[`preserve-new-line-last.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function f() { - a - /* eslint-disable */ -} - -function f() { - a - - /* eslint-disable */ -} - -function name() { - // comment1 - func1() - - // comment2 - func2() - - // comment3 why func3 commented - // func3() -} - -=====================================output===================================== -function f() { - a - /* eslint-disable */ -} - -function f() { - a - - /* eslint-disable */ -} - -function name() { - // comment1 - func1() - - // comment2 - func2() - - // comment3 why func3 commented - // func3() -} - -================================================================================ -`; - -exports[`preserve-new-line-last.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - a - /* eslint-disable */ -} - -function f() { - a - - /* eslint-disable */ -} - -function name() { - // comment1 - func1() - - // comment2 - func2() - - // comment3 why func3 commented - // func3() -} - -=====================================output===================================== -function f() { - a; - /* eslint-disable */ -} - -function f() { - a; - - /* eslint-disable */ -} - -function name() { - // comment1 - func1(); - - // comment2 - func2(); - - // comment3 why func3 commented - // func3() -} - -================================================================================ -`; - -exports[`return-statement.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function jsx() { - return ( - // Comment - <div /> - ); -} - -function unary() { - return ( - // Comment - !!x - ); -} - -function numericLiteralNoParen() { - return 1337; // Comment -} - -function logical() { - return ( - // Reason for 42 - 42 - ) && 84 -} - -function binary() { - return ( - // Reason for 42 - 42 - ) * 84 -} - -function binaryInBinaryLeft() { - return ( - // Reason for 42 - 42 - ) * 84 + 2 -} - -function binaryInBinaryRight() { - return ( - // Reason for 42 - 42 - ) + 84 * 2 -} - -function conditional() { - return ( - // Reason for 42 - 42 - ) ? 1 : 2 -} - -function binaryInConditional() { - return ( - // Reason for 42 - 42 - ) * 3 ? 1 : 2 -} - -function call() { - return ( - // Reason for a - a - )() -} - -function memberInside() { - return ( - // Reason for a.b - a.b - ).c -} - -function memberOutside() { - return ( - // Reason for a - a - ).b.c -} - -function memberInAndOutWithCalls() { - return ( - // Reason for a - aFunction.b() - ).c.d() -} - -function excessiveEverything() { - return ( - // Reason for stuff - a.b() * 3 + 4 ? (a\`hi\`, 1) ? 1 : 1 : 1 - ) -} - -// See https://github.com/prettier/prettier/issues/2392 -// function sequenceExpression() { -// return ( -// // Reason for a -// a -// ), b -// } - -function sequenceExpressionInside() { - return ( // Reason for a - a, b - ); -} - -function taggedTemplate() { - return ( - // Reason for a - a - )\`b\` -} - -function inlineComment() { - return ( - /* hi */ 42 - ) || 42 -} - -=====================================output===================================== -function jsx() { - return ( - // Comment - <div /> - ) -} - -function unary() { - return ( - // Comment - !!x - ) -} - -function numericLiteralNoParen() { - return 1337 // Comment -} - -function logical() { - return ( - // Reason for 42 - 42 && 84 - ) -} - -function binary() { - return ( - // Reason for 42 - 42 * 84 - ) -} - -function binaryInBinaryLeft() { - return ( - // Reason for 42 - 42 * - 84 + - 2 - ) -} - -function binaryInBinaryRight() { - return ( - // Reason for 42 - 42 + - 84 * 2 - ) -} - -function conditional() { - return ( - // Reason for 42 - 42 - ? 1 - : 2 - ) -} - -function binaryInConditional() { - return ( - // Reason for 42 - 42 * 3 - ? 1 - : 2 - ) -} - -function call() { - return ( - // Reason for a - a() - ) -} - -function memberInside() { - return ( - // Reason for a.b - a.b.c - ) -} - -function memberOutside() { - return ( - // Reason for a - a.b.c - ) -} - -function memberInAndOutWithCalls() { - return ( - aFunction - .b// Reason for a - () - .c.d() - ) -} - -function excessiveEverything() { - return ( - // Reason for stuff - a.b() * 3 + 4 ? ((a\`hi\`, 1) ? 1 : 1) : 1 - ) -} - -// See https://github.com/prettier/prettier/issues/2392 -// function sequenceExpression() { -// return ( -// // Reason for a -// a -// ), b -// } - -function sequenceExpressionInside() { - return ( - // Reason for a - a, b - ) -} - -function taggedTemplate() { - return ( - // Reason for a - a\`b\` - ) -} - -function inlineComment() { - return /* hi */ 42 || 42 -} - -================================================================================ -`; - -exports[`return-statement.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function jsx() { - return ( - // Comment - <div /> - ); -} - -function unary() { - return ( - // Comment - !!x - ); -} - -function numericLiteralNoParen() { - return 1337; // Comment -} - -function logical() { - return ( - // Reason for 42 - 42 - ) && 84 -} - -function binary() { - return ( - // Reason for 42 - 42 - ) * 84 -} - -function binaryInBinaryLeft() { - return ( - // Reason for 42 - 42 - ) * 84 + 2 -} - -function binaryInBinaryRight() { - return ( - // Reason for 42 - 42 - ) + 84 * 2 -} - -function conditional() { - return ( - // Reason for 42 - 42 - ) ? 1 : 2 -} - -function binaryInConditional() { - return ( - // Reason for 42 - 42 - ) * 3 ? 1 : 2 -} - -function call() { - return ( - // Reason for a - a - )() -} - -function memberInside() { - return ( - // Reason for a.b - a.b - ).c -} - -function memberOutside() { - return ( - // Reason for a - a - ).b.c -} - -function memberInAndOutWithCalls() { - return ( - // Reason for a - aFunction.b() - ).c.d() -} - -function excessiveEverything() { - return ( - // Reason for stuff - a.b() * 3 + 4 ? (a\`hi\`, 1) ? 1 : 1 : 1 - ) -} - -// See https://github.com/prettier/prettier/issues/2392 -// function sequenceExpression() { -// return ( -// // Reason for a -// a -// ), b -// } - -function sequenceExpressionInside() { - return ( // Reason for a - a, b - ); -} - -function taggedTemplate() { - return ( - // Reason for a - a - )\`b\` -} - -function inlineComment() { - return ( - /* hi */ 42 - ) || 42 -} - -=====================================output===================================== -function jsx() { - return ( - // Comment - <div /> - ); -} - -function unary() { - return ( - // Comment - !!x - ); -} - -function numericLiteralNoParen() { - return 1337; // Comment -} - -function logical() { - return ( - // Reason for 42 - 42 && 84 - ); -} - -function binary() { - return ( - // Reason for 42 - 42 * 84 - ); -} - -function binaryInBinaryLeft() { - return ( - // Reason for 42 - 42 * - 84 + - 2 - ); -} - -function binaryInBinaryRight() { - return ( - // Reason for 42 - 42 + - 84 * 2 - ); -} - -function conditional() { - return ( - // Reason for 42 - 42 - ? 1 - : 2 - ); -} - -function binaryInConditional() { - return ( - // Reason for 42 - 42 * 3 - ? 1 - : 2 - ); -} - -function call() { - return ( - // Reason for a - a() - ); -} - -function memberInside() { - return ( - // Reason for a.b - a.b.c - ); -} - -function memberOutside() { - return ( - // Reason for a - a.b.c - ); -} - -function memberInAndOutWithCalls() { - return ( - aFunction - .b// Reason for a - () - .c.d() - ); -} - -function excessiveEverything() { - return ( - // Reason for stuff - a.b() * 3 + 4 ? ((a\`hi\`, 1) ? 1 : 1) : 1 - ); -} - -// See https://github.com/prettier/prettier/issues/2392 -// function sequenceExpression() { -// return ( -// // Reason for a -// a -// ), b -// } - -function sequenceExpressionInside() { - return ( - // Reason for a - a, b - ); -} - -function taggedTemplate() { - return ( - // Reason for a - a\`b\` - ); -} - -function inlineComment() { - return /* hi */ 42 || 42; -} - -================================================================================ -`; - -exports[`single-star-jsdoc.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -/* - * Looking good! - */ - -if(true) { - /* - * Oh no - */ -} - - /** first line -* second line - * third line */ - - /* first line -* second line - * third line */ - - /*! first line -*second line - * third line */ - -/*! -* Extracted from vue codebase -* https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js -* HTML Parser By John Resig (ejohn.org) -* Modified by Juriy "kangax" Zaytsev -* Original code by Erik Arvidsson, Mozilla Public License -* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js -*/ - -=====================================output===================================== -/* - * Looking good! - */ - -if (true) { - /* - * Oh no - */ -} - -/** first line - * second line - * third line */ - -/* first line - * second line - * third line */ - -/*! first line - *second line - * third line */ - -/*! - * Extracted from vue codebase - * https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js - * HTML Parser By John Resig (ejohn.org) - * Modified by Juriy "kangax" Zaytsev - * Original code by Erik Arvidsson, Mozilla Public License - * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js - */ - -================================================================================ -`; - -exports[`single-star-jsdoc.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* - * Looking good! - */ - -if(true) { - /* - * Oh no - */ -} - - /** first line -* second line - * third line */ - - /* first line -* second line - * third line */ - - /*! first line -*second line - * third line */ - -/*! -* Extracted from vue codebase -* https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js -* HTML Parser By John Resig (ejohn.org) -* Modified by Juriy "kangax" Zaytsev -* Original code by Erik Arvidsson, Mozilla Public License -* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js -*/ - -=====================================output===================================== -/* - * Looking good! - */ - -if (true) { - /* - * Oh no - */ -} - -/** first line - * second line - * third line */ - -/* first line - * second line - * third line */ - -/*! first line - *second line - * third line */ - -/*! - * Extracted from vue codebase - * https://github.com/vuejs/vue/blob/cfd73c2386623341fdbb3ac636c4baf84ea89c2c/src/compiler/parser/html-parser.js - * HTML Parser By John Resig (ejohn.org) - * Modified by Juriy "kangax" Zaytsev - * Original code by Erik Arvidsson, Mozilla Public License - * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js - */ - -================================================================================ -`; - -exports[`snippet: #0 - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -var a = { /* comment */ -b }; -=====================================output===================================== -var a = { - /* comment */ b, -} - -================================================================================ -`; - -exports[`snippet: #0 format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var a = { /* comment */ -b }; -=====================================output===================================== -var a = { - /* comment */ b, -}; - -================================================================================ -`; - -exports[`snippet: #1 - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -var a = { /* comment */ -b }; -=====================================output===================================== -var a = { - /* comment */ b, -} - -================================================================================ -`; - -exports[`snippet: #1 format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var a = { /* comment */ -b }; -=====================================output===================================== -var a = { - /* comment */ b, -}; - -================================================================================ -`; - -exports[`switch.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -switch (node && node.type) { - case "Property": - case "MethodDefinition": - prop = node.key; - break; - - case "MemberExpression": - prop = node.property; - break; - - // no default -} - -switch (foo) { - case "bar": - doThing() - - // no default -} - -switch (foo) { - case "bar": //comment - doThing(); //comment - - case "baz": - doOtherThing(); //comment - -} - -switch (foo) { - case "bar": { - doThing(); - } //comment - - case "baz": { - doThing(); - } //comment -} - -=====================================output===================================== -switch (node && node.type) { - case "Property": - case "MethodDefinition": - prop = node.key - break - - case "MemberExpression": - prop = node.property - break - - // no default -} - -switch (foo) { - case "bar": - doThing() - - // no default -} - -switch (foo) { - case "bar": //comment - doThing() //comment - - case "baz": - doOtherThing() //comment -} - -switch (foo) { - case "bar": { - doThing() - } //comment - - case "baz": { - doThing() - } //comment -} - -================================================================================ -`; - -exports[`switch.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (node && node.type) { - case "Property": - case "MethodDefinition": - prop = node.key; - break; - - case "MemberExpression": - prop = node.property; - break; - - // no default -} - -switch (foo) { - case "bar": - doThing() - - // no default -} - -switch (foo) { - case "bar": //comment - doThing(); //comment - - case "baz": - doOtherThing(); //comment - -} - -switch (foo) { - case "bar": { - doThing(); - } //comment - - case "baz": { - doThing(); - } //comment -} - -=====================================output===================================== -switch (node && node.type) { - case "Property": - case "MethodDefinition": - prop = node.key; - break; - - case "MemberExpression": - prop = node.property; - break; - - // no default -} - -switch (foo) { - case "bar": - doThing(); - - // no default -} - -switch (foo) { - case "bar": //comment - doThing(); //comment - - case "baz": - doOtherThing(); //comment -} - -switch (foo) { - case "bar": { - doThing(); - } //comment - - case "baz": { - doThing(); - } //comment -} - -================================================================================ -`; - -exports[`tagged-template-literal.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -foo\`\`; // comment - -foo // comment -\`\`; - -foo // comment -\` -\`; - -foo /* comment */\` -\`; - -foo /* comment */ -\` -\`; - -=====================================output===================================== -foo\`\` // comment - -foo // comment -\`\` - -foo // comment -\` -\` - -foo/* comment */ \` -\` - -foo /* comment */\` -\` - -================================================================================ -`; - -exports[`tagged-template-literal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo\`\`; // comment - -foo // comment -\`\`; - -foo // comment -\` -\`; - -foo /* comment */\` -\`; - -foo /* comment */ -\` -\`; - -=====================================output===================================== -foo\`\`; // comment - -foo // comment -\`\`; - -foo // comment -\` -\`; - -foo/* comment */ \` -\`; - -foo /* comment */\` -\`; - -================================================================================ -`; - -exports[`template-literal.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -\` -\${a // comment -} - -\${b /* comment */} - -\${/* comment */ c /* comment */} - -\${// comment -d //comment -}; -\` - -=====================================output===================================== -;\` -\${ - a // comment -} - -\${b /* comment */} - -\${/* comment */ c /* comment */} - -\${ - // comment - d //comment -}; -\` - -================================================================================ -`; - -exports[`template-literal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -\` -\${a // comment -} - -\${b /* comment */} - -\${/* comment */ c /* comment */} - -\${// comment -d //comment -}; -\` - -=====================================output===================================== -\` -\${ - a // comment -} - -\${b /* comment */} - -\${/* comment */ c /* comment */} - -\${ - // comment - d //comment -}; -\`; - -================================================================================ -`; - -exports[`trailing_space.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -#!/there/is-space-here-> - -// Do not trim trailing whitespace from this source file! - -// There is some space here -> - -=====================================output===================================== -#!/there/is-space-here-> - -// Do not trim trailing whitespace from this source file! - -// There is some space here -> - -================================================================================ -`; - -exports[`trailing_space.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -#!/there/is-space-here-> - -// Do not trim trailing whitespace from this source file! - -// There is some space here -> - -=====================================output===================================== -#!/there/is-space-here-> - -// Do not trim trailing whitespace from this source file! - -// There is some space here -> - -================================================================================ -`; - -exports[`trailing-jsdocs.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const CONNECTION_STATUS = exports.CONNECTION_STATUS = { - CLOSED: Object.freeze({ kind: 'CLOSED' }), - CONNECTED: Object.freeze({ kind: 'CONNECTED' }), - CONNECTING: Object.freeze({ kind: 'CONNECTING' }), - NOT_CONNECTED: Object.freeze({ kind: 'NOT_CONNECTED' }) }; - -/* A comment */ /** -* A type that can be written to a buffer. -*/ /** -* Describes the connection status of a ReactiveSocket/DuplexConnection. -* - NOT_CONNECTED: no connection established or pending. -* - CONNECTING: when \`connect()\` has been called but a connection is not yet -* established. -* - CONNECTED: when a connection is established. -* - CLOSED: when the connection has been explicitly closed via \`close()\`. -* - ERROR: when the connection has been closed for any other reason. -*/ /** -* A contract providing different interaction models per the [ReactiveSocket protocol] -* (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). -*/ /** -* A single unit of data exchanged between the peers of a \`ReactiveSocket\`. -*/ - -=====================================output===================================== -const CONNECTION_STATUS = (exports.CONNECTION_STATUS = { - CLOSED: Object.freeze({ kind: "CLOSED" }), - CONNECTED: Object.freeze({ kind: "CONNECTED" }), - CONNECTING: Object.freeze({ kind: "CONNECTING" }), - NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }), -}) - -/* A comment */ -/** - * A type that can be written to a buffer. - */ -/** - * Describes the connection status of a ReactiveSocket/DuplexConnection. - * - NOT_CONNECTED: no connection established or pending. - * - CONNECTING: when \`connect()\` has been called but a connection is not yet - * established. - * - CONNECTED: when a connection is established. - * - CLOSED: when the connection has been explicitly closed via \`close()\`. - * - ERROR: when the connection has been closed for any other reason. - */ -/** - * A contract providing different interaction models per the [ReactiveSocket protocol] - * (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). - */ -/** - * A single unit of data exchanged between the peers of a \`ReactiveSocket\`. - */ - -================================================================================ -`; - -exports[`trailing-jsdocs.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const CONNECTION_STATUS = exports.CONNECTION_STATUS = { - CLOSED: Object.freeze({ kind: 'CLOSED' }), - CONNECTED: Object.freeze({ kind: 'CONNECTED' }), - CONNECTING: Object.freeze({ kind: 'CONNECTING' }), - NOT_CONNECTED: Object.freeze({ kind: 'NOT_CONNECTED' }) }; - -/* A comment */ /** -* A type that can be written to a buffer. -*/ /** -* Describes the connection status of a ReactiveSocket/DuplexConnection. -* - NOT_CONNECTED: no connection established or pending. -* - CONNECTING: when \`connect()\` has been called but a connection is not yet -* established. -* - CONNECTED: when a connection is established. -* - CLOSED: when the connection has been explicitly closed via \`close()\`. -* - ERROR: when the connection has been closed for any other reason. -*/ /** -* A contract providing different interaction models per the [ReactiveSocket protocol] -* (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). -*/ /** -* A single unit of data exchanged between the peers of a \`ReactiveSocket\`. -*/ - -=====================================output===================================== -const CONNECTION_STATUS = (exports.CONNECTION_STATUS = { - CLOSED: Object.freeze({ kind: "CLOSED" }), - CONNECTED: Object.freeze({ kind: "CONNECTED" }), - CONNECTING: Object.freeze({ kind: "CONNECTING" }), - NOT_CONNECTED: Object.freeze({ kind: "NOT_CONNECTED" }), -}); - -/* A comment */ -/** - * A type that can be written to a buffer. - */ -/** - * Describes the connection status of a ReactiveSocket/DuplexConnection. - * - NOT_CONNECTED: no connection established or pending. - * - CONNECTING: when \`connect()\` has been called but a connection is not yet - * established. - * - CONNECTED: when a connection is established. - * - CLOSED: when the connection has been explicitly closed via \`close()\`. - * - ERROR: when the connection has been closed for any other reason. - */ -/** - * A contract providing different interaction models per the [ReactiveSocket protocol] - * (https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md). - */ -/** - * A single unit of data exchanged between the peers of a \`ReactiveSocket\`. - */ - -================================================================================ -`; - -exports[`try.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// Comment 1 -try { // Comment 2 - // Comment 3 -} -// Comment 4 -catch(e) { // Comment 5 - // Comment 6 -} -// Comment 7 -finally { // Comment 8 - // Comment 9 -} -// Comment 10 - -=====================================output===================================== -// Comment 1 -try { - // Comment 2 - // Comment 3 -} catch (e) { - // Comment 4 - // Comment 5 - // Comment 6 -} finally { - // Comment 7 - // Comment 8 - // Comment 9 -} -// Comment 10 - -================================================================================ -`; - -exports[`try.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Comment 1 -try { // Comment 2 - // Comment 3 -} -// Comment 4 -catch(e) { // Comment 5 - // Comment 6 -} -// Comment 7 -finally { // Comment 8 - // Comment 9 -} -// Comment 10 - -=====================================output===================================== -// Comment 1 -try { - // Comment 2 - // Comment 3 -} catch (e) { - // Comment 4 - // Comment 5 - // Comment 6 -} finally { - // Comment 7 - // Comment 8 - // Comment 9 -} -// Comment 10 - -================================================================================ -`; - -exports[`variable_declarator.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -let obj1 = // Comment -{ - key: 'val' -} - -let obj2 // Comment -= { - key: 'val' -} - -let obj3 = { // Comment - key: 'val' -} - -let obj4 = { - // Comment - key: 'val' -} - -let obj5 = // Comment -[ - 'val' -] - -let obj6 // Comment -= [ - 'val' -] - -let obj7 = [ // Comment - 'val' -] - -let obj8 = [ - // Comment - 'val' -] - -let obj9 = // Comment -\`val\`; - -let obj10 = // Comment -\` -val -val -\`; - -let obj11 = // Comment -tag\`val\`; - -let obj12 = // Comment -tag\` -val -val -\`; - -let // Comment - foo1 = 'val'; - -let // Comment - foo2 = 'val', - bar = 'val'; - -const foo3 = 123 -// Nothing to see here. -;["2", "3"].forEach(x => console.log(x)) - -=====================================output===================================== -let obj1 = - // Comment - { - key: "val", - } - -let obj2 = - // Comment - { - key: "val", - } - -let obj3 = { - // Comment - key: "val", -} - -let obj4 = { - // Comment - key: "val", -} - -let obj5 = - // Comment - ["val"] - -let obj6 = - // Comment - ["val"] - -let obj7 = [ - // Comment - "val", -] - -let obj8 = [ - // Comment - "val", -] - -let obj9 = - // Comment - \`val\` - -let obj10 = - // Comment - \` -val -val -\` - -let obj11 = - // Comment - tag\`val\` - -let obj12 = - // Comment - tag\` -val -val -\` - -let // Comment - foo1 = "val" - -let // Comment - foo2 = "val", - bar = "val" - -const foo3 = 123 -// Nothing to see here. -;["2", "3"].forEach((x) => console.log(x)) - -================================================================================ -`; - -exports[`variable_declarator.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let obj1 = // Comment -{ - key: 'val' -} - -let obj2 // Comment -= { - key: 'val' -} - -let obj3 = { // Comment - key: 'val' -} - -let obj4 = { - // Comment - key: 'val' -} - -let obj5 = // Comment -[ - 'val' -] - -let obj6 // Comment -= [ - 'val' -] - -let obj7 = [ // Comment - 'val' -] - -let obj8 = [ - // Comment - 'val' -] - -let obj9 = // Comment -\`val\`; - -let obj10 = // Comment -\` -val -val -\`; - -let obj11 = // Comment -tag\`val\`; - -let obj12 = // Comment -tag\` -val -val -\`; - -let // Comment - foo1 = 'val'; - -let // Comment - foo2 = 'val', - bar = 'val'; - -const foo3 = 123 -// Nothing to see here. -;["2", "3"].forEach(x => console.log(x)) - -=====================================output===================================== -let obj1 = - // Comment - { - key: "val", - }; - -let obj2 = - // Comment - { - key: "val", - }; - -let obj3 = { - // Comment - key: "val", -}; - -let obj4 = { - // Comment - key: "val", -}; - -let obj5 = - // Comment - ["val"]; - -let obj6 = - // Comment - ["val"]; - -let obj7 = [ - // Comment - "val", -]; - -let obj8 = [ - // Comment - "val", -]; - -let obj9 = - // Comment - \`val\`; - -let obj10 = - // Comment - \` -val -val -\`; - -let obj11 = - // Comment - tag\`val\`; - -let obj12 = - // Comment - tag\` -val -val -\`; - -let // Comment - foo1 = "val"; - -let // Comment - foo2 = "val", - bar = "val"; - -const foo3 = 123; -// Nothing to see here. -["2", "3"].forEach((x) => console.log(x)); - -================================================================================ -`; - -exports[`while.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -while( - true - // Comment - ) {} - -while(true)// Comment -{} - -while(true){}// Comment - -while(true)/*Comment*/{} - -while( - true // Comment - && true // Comment - ){} - -while(true) {} // comment - -while(true) /* comment */ ++x; - -while(1) // Comment - foo(); - -=====================================output===================================== -while ( - true - // Comment -) {} - -while (true) { - // Comment -} - -while (true) {} // Comment - -while (true) { - /*Comment*/ -} - -while ( - true && // Comment - true // Comment -) {} - -while (true) {} // comment - -while (true) /* comment */ ++x - -while (1) - // Comment - foo() - -================================================================================ -`; - -exports[`while.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -while( - true - // Comment - ) {} - -while(true)// Comment -{} - -while(true){}// Comment - -while(true)/*Comment*/{} - -while( - true // Comment - && true // Comment - ){} - -while(true) {} // comment - -while(true) /* comment */ ++x; - -while(1) // Comment - foo(); - -=====================================output===================================== -while ( - true - // Comment -) {} - -while (true) { - // Comment -} - -while (true) {} // Comment - -while (true) { - /*Comment*/ -} - -while ( - true && // Comment - true // Comment -) {} - -while (true) {} // comment - -while (true) /* comment */ ++x; - -while (1) - // Comment - foo(); - -================================================================================ -`; diff --git a/tests/format/js/comments/array-and-object.js b/tests/format/js/comments/array-and-object.js new file mode 100644 index 000000000000..f09ef750f897 --- /dev/null +++ b/tests/format/js/comments/array-and-object.js @@ -0,0 +1,9 @@ +let object = // Comment +{ + key: 'value' +} + +let array = // Comment +[ + 'value' +] diff --git a/tests/format/js/comments/empty-statements.js b/tests/format/js/comments/empty-statements.js new file mode 100644 index 000000000000..c2386508afa0 --- /dev/null +++ b/tests/format/js/comments/empty-statements.js @@ -0,0 +1,20 @@ +a; /* a */ // b +; /* c */ + +foo; // first +;// second +;// third + +function x() { +} // first +; // second + +a = ( + b // 1 + + // 2 + c // 3 + + // 4 + d // 5 + + /* 6 */ + e // 7 +); diff --git a/tests/format/js/comments/flow-types/__snapshots__/format.test.js.snap b/tests/format/js/comments/flow-types/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3f7cb2281244 --- /dev/null +++ b/tests/format/js/comments/flow-types/__snapshots__/format.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inline.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +btnActions[1] = () => ( + <button> test </button> + // :testC +) + +a( + // :: + 1 +); + +=====================================output===================================== +btnActions[1] = () => ( + <button> test </button> + // :testC +); + +a( + // :: + 1, +); + +================================================================================ +`; diff --git a/tests/format/js/comments/flow-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/flow-types/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c0641b06fd1f..000000000000 --- a/tests/format/js/comments/flow-types/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`inline.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -btnActions[1] = () => ( - <button> test </button> - // :testC -) - -a( - // :: - 1 -); - -=====================================output===================================== -btnActions[1] = () => ( - <button> test </button> - // :testC -); - -a( - // :: - 1 -); - -================================================================================ -`; diff --git a/tests/format/js/comments/flow-types/format.test.js b/tests/format/js/comments/flow-types/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/comments/flow-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/comments/flow-types/jsfmt.spec.js b/tests/format/js/comments/flow-types/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/comments/flow-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/comments/format.test.js b/tests/format/js/comments/format.test.js new file mode 100644 index 000000000000..f72cc9a11a20 --- /dev/null +++ b/tests/format/js/comments/format.test.js @@ -0,0 +1,10 @@ +const fixtures = { + importMeta: import.meta, + snippets: [ + "var a = { /* comment */ \nb };", // trailing whitespace after comment + "var a = { /* comment */\nb };", + ], +}; + +runFormatTest(fixtures, ["babel", "flow", "typescript"]); +runFormatTest(fixtures, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/comments/function/__snapshots__/format.test.js.snap b/tests/format/js/comments/function/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c5de94d7b508 --- /dev/null +++ b/tests/format/js/comments/function/__snapshots__/format.test.js.snap @@ -0,0 +1,78 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`between-parentheses-and-function-body.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function function_declaration() +// this is a function +{ + return 42 +} + +(function named() +// this is a function +{ + return 42 +})(); + + +(function () +// this is a function +{ + return 42 +})(); + +/* anonymous declaration */ +export default function () +// this is a function +{ + return 42 +} + +a = { + foo() + // this is a function + {}, + + bar: function() + // this is a function + {}, +} + +=====================================output===================================== +function function_declaration() { + // this is a function + return 42; +} + +(function named() { + // this is a function + return 42; +})(); + +(function () { + // this is a function + return 42; +})(); + +/* anonymous declaration */ +export default function () { + // this is a function + return 42; +} + +a = { + foo() { + // this is a function + }, + + bar: function () { + // this is a function + }, +}; + +================================================================================ +`; diff --git a/tests/format/js/comments/function/between-parentheses-and-function-body.js b/tests/format/js/comments/function/between-parentheses-and-function-body.js new file mode 100644 index 000000000000..c3553778f752 --- /dev/null +++ b/tests/format/js/comments/function/between-parentheses-and-function-body.js @@ -0,0 +1,35 @@ +function function_declaration() +// this is a function +{ + return 42 +} + +(function named() +// this is a function +{ + return 42 +})(); + + +(function () +// this is a function +{ + return 42 +})(); + +/* anonymous declaration */ +export default function () +// this is a function +{ + return 42 +} + +a = { + foo() + // this is a function + {}, + + bar: function() + // this is a function + {}, +} diff --git a/tests/format/js/comments/function/format.test.js b/tests/format/js/comments/function/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/comments/function/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/comments/html-like/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/html-like/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/comments/html-like/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/comments/html-like/__snapshots__/format.test.js.snap diff --git a/tests/format/js/comments/html-like/format.test.js b/tests/format/js/comments/html-like/format.test.js new file mode 100644 index 000000000000..a43f91a5e036 --- /dev/null +++ b/tests/format/js/comments/html-like/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["meriyah"]); diff --git a/tests/format/js/comments/html-like/jsfmt.spec.js b/tests/format/js/comments/html-like/jsfmt.spec.js deleted file mode 100644 index 15a55dd5a70f..000000000000 --- a/tests/format/js/comments/html-like/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["meriyah"]); diff --git a/tests/format/js/comments/issue-7724.js b/tests/format/js/comments/issue-7724.js deleted file mode 100644 index 50b7c53c97a0..000000000000 --- a/tests/format/js/comments/issue-7724.js +++ /dev/null @@ -1,18 +0,0 @@ -const foo = "Bar"; - -/** - * @template T - * @param {Type} type - * @param {T} value - * @return {Value} - *//** - * @param {Type} type - * @return {Value} - */ -function value(type, value) { - if (arguments.length === 2) { - return new ConcreteValue(type, value); - } else { - return new Value(type); - } -} \ No newline at end of file diff --git a/tests/format/js/comments/jsdoc-nestled-dangling.js b/tests/format/js/comments/jsdoc-nestled-dangling.js new file mode 100644 index 000000000000..6962ecef2efb --- /dev/null +++ b/tests/format/js/comments/jsdoc-nestled-dangling.js @@ -0,0 +1,10 @@ +{{{{{{{ +o={ + /** + * A + *//** + * B + */ + +} +}}}}}}} diff --git a/tests/format/js/comments/jsdoc-nestled.js b/tests/format/js/comments/jsdoc-nestled.js new file mode 100644 index 000000000000..9723175b504f --- /dev/null +++ b/tests/format/js/comments/jsdoc-nestled.js @@ -0,0 +1,28 @@ +const issues = { + see: "#7724 and #12653" + /** Trailing comment 1 (not nestled as both comments should be multiline for that) *//** + * Trailing comment 2 + */ +}; + +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +/** Trailing nestled comment 1 + *//** Trailing nestled comment 2 + *//** Trailing nestled comment 3 + */ diff --git a/tests/format/js/comments/jsfmt.spec.js b/tests/format/js/comments/jsfmt.spec.js deleted file mode 100644 index 8b690d2cc583..000000000000 --- a/tests/format/js/comments/jsfmt.spec.js +++ /dev/null @@ -1,10 +0,0 @@ -const fixtures = { - dirname: __dirname, - snippets: [ - "var a = { /* comment */ \nb };", // trailing whitespace after comment - "var a = { /* comment */\nb };", - ], -}; - -run_spec(fixtures, ["babel", "flow", "typescript"]); -run_spec(fixtures, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/comments/return-statement.js b/tests/format/js/comments/return-statement.js index 4953d6b71885..a034d5a559c3 100644 --- a/tests/format/js/comments/return-statement.js +++ b/tests/format/js/comments/return-statement.js @@ -119,3 +119,50 @@ function inlineComment() { /* hi */ 42 ) || 42 } + +function multilineBlockSameLine() { + return ( + /** + * @type {string} + */ 'result' + ) +} + +function multilineBlockNextLine() { + return ( + /** + * @type {string} + */ + 'result' + ) +} + +function multilineBlockSameLineJsx() { + return ( + /** + * JSX Same line + */ <div></div> + ) +} + +function multilineBlockNextLineJsx() { + return ( + /** + * JSX Next line + */ + <div></div> + ) +} + +function singleLineBlockSameLine() { + return ( + /** Result -> */ 'result' + ) +} + +function singleLineBlockNextLine() { + return ( + /** Result below */ + 'result' + ) +} diff --git a/tests/format/js/comments/tagged-template-literal.js b/tests/format/js/comments/tagged-template-literal.js index 11e9974456a0..7afab7961467 100644 --- a/tests/format/js/comments/tagged-template-literal.js +++ b/tests/format/js/comments/tagged-template-literal.js @@ -1,15 +1,15 @@ -foo``; // comment +foo``; // comment 1 -foo // comment +foo // comment 2 ``; -foo // comment +foo // comment 3 ` `; -foo /* comment */` +foo /* comment 4 */` `; -foo /* comment */ +foo /* comment 5 */ ` `; diff --git a/tests/format/js/comments/tagged-template-literal/11662.js b/tests/format/js/comments/tagged-template-literal/11662.js new file mode 100644 index 000000000000..771ddae471ea --- /dev/null +++ b/tests/format/js/comments/tagged-template-literal/11662.js @@ -0,0 +1,8 @@ +foo + // TEST + // 1 + // 2 + // 3 + // 4 + // 5 + `x` diff --git a/tests/format/js/comments/tagged-template-literal/__snapshots__/format.test.js.snap b/tests/format/js/comments/tagged-template-literal/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a65d610ffad4 --- /dev/null +++ b/tests/format/js/comments/tagged-template-literal/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`11662.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo + // TEST + // 1 + // 2 + // 3 + // 4 + // 5 + \`x\` + +=====================================output===================================== +foo +// TEST +// 1 +// 2 +// 3 +// 4 +// 5 +\`x\`; + +================================================================================ +`; diff --git a/tests/format/js/comments/tagged-template-literal/format.test.js b/tests/format/js/comments/tagged-template-literal/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/comments/tagged-template-literal/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/computed-props/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/computed-props/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/computed-props/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/computed-props/__snapshots__/format.test.js.snap diff --git a/tests/format/js/computed-props/format.test.js b/tests/format/js/computed-props/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/computed-props/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/computed-props/jsfmt.spec.js b/tests/format/js/computed-props/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/computed-props/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/conditional/__snapshots__/format.test.js.snap b/tests/format/js/conditional/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..90675cc6f84d --- /dev/null +++ b/tests/format/js/conditional/__snapshots__/format.test.js.snap @@ -0,0 +1,2634 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var inspect = 4 === util.inspect.length + ? // node <= 0.8.x + (function(v, colors) { + return util.inspect(v, void 0, void 0, colors); + }) + : // node > 0.8.x + (function(v, colors) { + return util.inspect(v, { colors: colors }); + }); + +var inspect = 4 === util.inspect.length + ? // node <= 0.8.x + (function(v, colors) { + return util.inspect(v, void 0, void 0, colors); + }) + : // node > 0.8.x + (function(v, colors) { + return util.inspect(v, { colors: colors }); + }); + +const extractTextPluginOptions = shouldUseRelativeAssetPaths + // Making sure that the publicPath goes back to to build folder. + ? { publicPath: Array(cssFilename.split('/').length).join('../') } : + {}; + +const extractTextPluginOptions2 = shouldUseRelativeAssetPaths + ? // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions3 = shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. + ? { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const { configureStore } = process.env.NODE_ENV === "production" + ? require("./configureProdStore") // a + : require("./configureDevStore"); // b + +test /* comment + comment + comment +*/ + ? foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : test + ? /* comment + comment + comment */ + foo + : bar; + +test + ? /* comment */ + foo + : bar; + +test + ? foo + : /* comment + comment + comment + comment + */ + bar; + +test + ? foo + : /* comment + comment + comment + comment + A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. + */ + test + ? foo + : /* comment + comment + comment + */ + bar; + + +// It is at least possible to delete the extra newline that was +// unfortunately added before the second condition above: +test ? + foo :/* comment + comment + comment + comment + */ +test ? + foo : + /* comment + comment + comment + */ + bar; + +test + ? foo + : /* comment */ + bar; + +test ? test /* c +c */? foo : bar : bar; + +=====================================output===================================== +var inspect = + 4 === util.inspect.length ? + // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } + // node > 0.8.x + : function (v, colors) { + return util.inspect(v, { colors: colors }); + }; + +var inspect = + 4 === util.inspect.length ? + // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } + // node > 0.8.x + : function (v, colors) { + return util.inspect(v, { colors: colors }); + }; + +const extractTextPluginOptions = + shouldUseRelativeAssetPaths ? + // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions2 = + shouldUseRelativeAssetPaths ? + // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions3 = + ( + shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. + ) ? + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const { configureStore } = + process.env.NODE_ENV === "production" ? + require("./configureProdStore") // a + : require("./configureDevStore"); // b + +( + test /* comment + comment + comment +*/ +) ? + foo +: bar; + +test ? + /* comment + comment + comment + comment + */ + foo +: bar; + +test ? + /* comment + comment + comment + comment + */ + foo +: test ? + /* comment + comment + comment */ + foo +: bar; + +test ? /* comment */ foo : bar; + +test ? foo + /* comment + comment + comment + comment + */ +: bar; + +test ? foo + /* comment + comment + comment + comment + A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. + */ +: test ? foo + /* comment + comment + comment + */ +: bar; + +// It is at least possible to delete the extra newline that was +// unfortunately added before the second condition above: +test ? + foo /* comment + comment + comment + comment + */ +: test ? foo + /* comment + comment + comment + */ +: bar; + +test ? foo : /* comment */ bar; + +test ? + ( + test /* c +c */ + ) ? + foo + : bar +: bar; + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var inspect = 4 === util.inspect.length + ? // node <= 0.8.x + (function(v, colors) { + return util.inspect(v, void 0, void 0, colors); + }) + : // node > 0.8.x + (function(v, colors) { + return util.inspect(v, { colors: colors }); + }); + +var inspect = 4 === util.inspect.length + ? // node <= 0.8.x + (function(v, colors) { + return util.inspect(v, void 0, void 0, colors); + }) + : // node > 0.8.x + (function(v, colors) { + return util.inspect(v, { colors: colors }); + }); + +const extractTextPluginOptions = shouldUseRelativeAssetPaths + // Making sure that the publicPath goes back to to build folder. + ? { publicPath: Array(cssFilename.split('/').length).join('../') } : + {}; + +const extractTextPluginOptions2 = shouldUseRelativeAssetPaths + ? // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions3 = shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. + ? { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const { configureStore } = process.env.NODE_ENV === "production" + ? require("./configureProdStore") // a + : require("./configureDevStore"); // b + +test /* comment + comment + comment +*/ + ? foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : test + ? /* comment + comment + comment */ + foo + : bar; + +test + ? /* comment */ + foo + : bar; + +test + ? foo + : /* comment + comment + comment + comment + */ + bar; + +test + ? foo + : /* comment + comment + comment + comment + A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. + */ + test + ? foo + : /* comment + comment + comment + */ + bar; + + +// It is at least possible to delete the extra newline that was +// unfortunately added before the second condition above: +test ? + foo :/* comment + comment + comment + comment + */ +test ? + foo : + /* comment + comment + comment + */ + bar; + +test + ? foo + : /* comment */ + bar; + +test ? test /* c +c */? foo : bar : bar; + +=====================================output===================================== +var inspect = + 4 === util.inspect.length + ? // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } + : // node > 0.8.x + function (v, colors) { + return util.inspect(v, { colors: colors }); + }; + +var inspect = + 4 === util.inspect.length + ? // node <= 0.8.x + function (v, colors) { + return util.inspect(v, void 0, void 0, colors); + } + : // node > 0.8.x + function (v, colors) { + return util.inspect(v, { colors: colors }); + }; + +const extractTextPluginOptions = shouldUseRelativeAssetPaths + ? // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions2 = shouldUseRelativeAssetPaths + ? // Making sure that the publicPath goes back to to build folder. + { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const extractTextPluginOptions3 = shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. + ? { publicPath: Array(cssFilename.split("/").length).join("../") } + : {}; + +const { configureStore } = + process.env.NODE_ENV === "production" + ? require("./configureProdStore") // a + : require("./configureDevStore"); // b + +test /* comment + comment + comment +*/ + ? foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : bar; + +test + ? /* comment + comment + comment + comment + */ + foo + : test + ? /* comment + comment + comment */ + foo + : bar; + +test ? /* comment */ foo : bar; + +test + ? foo + : /* comment + comment + comment + comment + */ + bar; + +test + ? foo + : /* comment + comment + comment + comment + A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. + */ + test + ? foo + : /* comment + comment + comment + */ + bar; + +// It is at least possible to delete the extra newline that was +// unfortunately added before the second condition above: +test + ? foo /* comment + comment + comment + comment + */ + : test + ? foo + : /* comment + comment + comment + */ + bar; + +test ? foo : /* comment */ bar; + +test + ? test /* c +c */ + ? foo + : bar + : bar; + +================================================================================ +`; + +exports[`new-expression.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const testConsole = new TestConsole( + config.useStderr ? process.stderr : process.stdout +); + +=====================================output===================================== +const testConsole = new TestConsole( + config.useStderr ? process.stderr : process.stdout, +); + +================================================================================ +`; + +exports[`new-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const testConsole = new TestConsole( + config.useStderr ? process.stderr : process.stdout +); + +=====================================output===================================== +const testConsole = new TestConsole( + config.useStderr ? process.stderr : process.stdout, +); + +================================================================================ +`; + +exports[`new-ternary-examples.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts +// EXAMPLES +// mostly taken from https://github.com/prettier/prettier/issues/9561 + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessageShort = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessageWithABreak = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? + "There was an issue with your CVC number, and you need to take a prompt action on it." + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const typeofExample = + definition.encode ? + definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + ) + : typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null; + +// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) +const typeofExampleFlipped = + definition.encode ? + definition.encode( + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], + ) + : typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field]; + +// JSX Examples: + +const typicalLongConsequentWithNullAlternate = ( + <div> + {children && !isEmptyChildren(children) ? + <FooComponent + className="a bunch of css classes might go here, wow so many" + foo={foo} + bar={includeBar ? bar : null} + /> + : null} + </div> +); + +const reactRouterExampleJSX = ( + <div> + {children && !isEmptyChildren(children) ? + children + : props.match ? + component ? + React.createElement(component, props) + : render ? + render(props) + : null + : null} + </div> +); + +const reactRouterExampleNonJSX = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +inJSXExpressionContainer.withLongConditionals.example = ( + <div> + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? + someReallyLargeExpression.toMakeMeowNoise().willCauseParens() + : someReallyLongCondition || moreInThisLongCondition ? + bark() + : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} + </div> +); + +inJSXExpressionContainer.withLoops.orBooleans.example = ( + <div> + {items ? + items.map((item) => + item.display ? + <Item item={item} attr="breaks ternary but not consequent" /> + : <Blank />, + ) + : null} + + {showTheStuff && + (foo ? + <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> + : <OtherThing />)} + </div> +); + +inJSXExpressionContainer.withNullConditional = ( + <div> + {isACat() ? null : <Foo />} + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( + <Foo /> + )} + {( + isACat() && + (someReallyLongCondition || + moreInThisLongCondition || + evenMoreInThisExtraLongConditional) + ) ? + null + : <Foo />} + </div> +); + +=====================================output===================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts +// EXAMPLES +// mostly taken from https://github.com/prettier/prettier/issues/9561 + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessageShort = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessageWithABreak = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? + "There was an issue with your CVC number, and you need to take a prompt action on it." + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const typeofExample = + definition.encode ? + definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + ) + : typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null; + +// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) +const typeofExampleFlipped = + definition.encode ? + definition.encode( + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], + ) + : typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field]; + +// JSX Examples: + +const typicalLongConsequentWithNullAlternate = ( + <div> + {children && !isEmptyChildren(children) ? + <FooComponent + className="a bunch of css classes might go here, wow so many" + foo={foo} + bar={includeBar ? bar : null} + /> + : null} + </div> +); + +const reactRouterExampleJSX = ( + <div> + {children && !isEmptyChildren(children) ? + children + : props.match ? + component ? + React.createElement(component, props) + : render ? + render(props) + : null + : null} + </div> +); + +const reactRouterExampleNonJSX = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +inJSXExpressionContainer.withLongConditionals.example = ( + <div> + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? + someReallyLargeExpression.toMakeMeowNoise().willCauseParens() + : someReallyLongCondition || moreInThisLongCondition ? + bark() + : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} + </div> +); + +inJSXExpressionContainer.withLoops.orBooleans.example = ( + <div> + {items ? + items.map((item) => + item.display ? + <Item item={item} attr="breaks ternary but not consequent" /> + : <Blank />, + ) + : null} + + {showTheStuff && + (foo ? + <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> + : <OtherThing />)} + </div> +); + +inJSXExpressionContainer.withNullConditional = ( + <div> + {isACat() ? null : <Foo />} + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( + <Foo /> + )} + {( + isACat() && + (someReallyLongCondition || + moreInThisLongCondition || + evenMoreInThisExtraLongConditional) + ) ? + null + : <Foo />} + </div> +); + +================================================================================ +`; + +exports[`new-ternary-examples.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts +// EXAMPLES +// mostly taken from https://github.com/prettier/prettier/issues/9561 + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessageShort = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessageWithABreak = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? + "There was an issue with your CVC number, and you need to take a prompt action on it." + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const typeofExample = + definition.encode ? + definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + ) + : typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null; + +// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) +const typeofExampleFlipped = + definition.encode ? + definition.encode( + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], + ) + : typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field]; + +// JSX Examples: + +const typicalLongConsequentWithNullAlternate = ( + <div> + {children && !isEmptyChildren(children) ? + <FooComponent + className="a bunch of css classes might go here, wow so many" + foo={foo} + bar={includeBar ? bar : null} + /> + : null} + </div> +); + +const reactRouterExampleJSX = ( + <div> + {children && !isEmptyChildren(children) ? + children + : props.match ? + component ? + React.createElement(component, props) + : render ? + render(props) + : null + : null} + </div> +); + +const reactRouterExampleNonJSX = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +inJSXExpressionContainer.withLongConditionals.example = ( + <div> + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? + someReallyLargeExpression.toMakeMeowNoise().willCauseParens() + : someReallyLongCondition || moreInThisLongCondition ? + bark() + : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} + </div> +); + +inJSXExpressionContainer.withLoops.orBooleans.example = ( + <div> + {items ? + items.map((item) => + item.display ? + <Item item={item} attr="breaks ternary but not consequent" /> + : <Blank />, + ) + : null} + + {showTheStuff && + (foo ? + <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> + : <OtherThing />)} + </div> +); + +inJSXExpressionContainer.withNullConditional = ( + <div> + {isACat() ? null : <Foo />} + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( + <Foo /> + )} + {( + isACat() && + (someReallyLongCondition || + moreInThisLongCondition || + evenMoreInThisExtraLongConditional) + ) ? + null + : <Foo />} + </div> +); + +=====================================output===================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts +// EXAMPLES +// mostly taken from https://github.com/prettier/prettier/issues/9561 + +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +const paymentMessageShort = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number" + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessageWithABreak = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number, and you need to take a prompt action on it." + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const typeofExample = definition.encode + ? definition.encode( + typeof row[field] !== "undefined" + ? row[field] + : typeof definition.default !== "undefined" + ? definition.default + : null, + ) + : typeof row[field] !== "undefined" + ? row[field] + : typeof definition.default !== "undefined" + ? definition.default + : null; + +// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) +const typeofExampleFlipped = definition.encode + ? definition.encode( + typeof row[field] === "undefined" + ? typeof definition.default === "undefined" + ? null + : definition.default + : row[field], + ) + : typeof row[field] === "undefined" + ? typeof definition.default === "undefined" + ? null + : definition.default + : row[field]; + +// JSX Examples: + +const typicalLongConsequentWithNullAlternate = ( + <div> + {children && !isEmptyChildren(children) ? ( + <FooComponent + className="a bunch of css classes might go here, wow so many" + foo={foo} + bar={includeBar ? bar : null} + /> + ) : null} + </div> +); + +const reactRouterExampleJSX = ( + <div> + {children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null} + </div> +); + +const reactRouterExampleNonJSX = + children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +inJSXExpressionContainer.withLongConditionals.example = ( + <div> + {isACat() && (someReallyLongCondition || moreInThisLongCondition) + ? someReallyLargeExpression.toMakeMeowNoise().willCauseParens() + : someReallyLongCondition || moreInThisLongCondition + ? bark() + : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} + </div> +); + +inJSXExpressionContainer.withLoops.orBooleans.example = ( + <div> + {items + ? items.map((item) => + item.display ? ( + <Item item={item} attr="breaks ternary but not consequent" /> + ) : ( + <Blank /> + ), + ) + : null} + + {showTheStuff && + (foo ? ( + <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> + ) : ( + <OtherThing /> + ))} + </div> +); + +inJSXExpressionContainer.withNullConditional = ( + <div> + {isACat() ? null : <Foo />} + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( + <Foo /> + )} + {isACat() && + (someReallyLongCondition || + moreInThisLongCondition || + evenMoreInThisExtraLongConditional) ? null : ( + <Foo /> + )} + </div> +); + +================================================================================ +`; + +exports[`new-ternary-spec.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts + +// remain on one line if possible: +const short = isLoud() ? makeNoise() : silent(); + +// next, put everything after the = +const lessShort = + isLoudReallyLoud() ? makeNoiseReallyLoudly.omgSoLoud() : silent(); + +// next, indent the consequent: +const andIndented = + isLoudReallyReallyReallyReallyLoud() ? + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + : silent(); + +// unless the consequent is short (less than ten characters long): +const shortSoCase = + isLoudReallyReallyReallyReallyLoud() ? silent() : ( + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + ); + +// if chained, always break and put after the = +const chainedShort = + isCat() ? meow() + : isDog() ? bark() + : silent(); + +// when a consequent breaks in a chain: +const chainedWithLongConsequent = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : silent(); + +// nested ternary in consequent always breaks: +const chainedWithTernaryConsequent = + isCat() ? + aNestedCondition ? theResult() + : theAlternate() + : isDog() ? bark() + : silent(); + +// consequent and terminal alternate break: +const consequentAndTerminalAlternateBreak = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// multiline conditions and consequents/alternates: +const multilineConditionsConsequentsAndAlternates = + ( + isAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : ( + isNotAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + bark() + : shortCondition() ? shortConsequent() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// illustrating case of mostly short conditionals +const mostlyShort = + x === 1 ? "one" + : x === 2 ? "two" + : x === 3 ? "three" + : ( + x === 5 && + y === 7 && + someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() + ) ? + "four" + : x === 6 ? "six" + : "idk"; + +// long conditional, short consequent/alternate, not chained - do indent after ? +const longConditional = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : "bar"; + +// long conditional, short consequent/alternate, chained +// (break on short consequents iff in chained ternary and its conditional broke) +const longConditionalChained = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : anotherCondition ? "bar" + : "baz"; + +// As a function parameter, don't add an extra indent: +definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], +); + +// In a return, break and over-indent: +const inReturn = () => { + if (short) { + return foo ? 1 : 2; + } + return typeof row[aVeryLongFieldName] !== "undefined" ? + row[aVeryLongFieldName] + : null; +}; + +// Remove current JSX Mode, and replace it with this algorithm: +// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, +// force the consequent to break, +// and if the alternate breaks, +// add a newline before the closing curly brace. +// Special case when the consequent is \`null\`: +// do not add a line before or after it, +// and wrap the alternate in parens. + +const someJSX = ( + <div> + Typical jsx case: + {showFoo ? + <Foo attribute="such and such stuff here" /> + : <Bar short />} + Nested, and with a non-jsx consequent is the same: + {component ? + React.createElement(component, props) + : render ? + <div>{render(props)}</div> + : <div>Nothing is here</div>} + As is a non-jsx consequent: + {showTheJSXElement ? + <div>the stuff</div> + : renderOtherStuff()} + But if the alternate breaks, add a newline before the closing curly brace: + {showTheThing || pleaseShowTheThing ? + <Foo attribute="such and such stuff here" /> + : <Bar + attribute="such and such stuff here" + another="more stuff here" + third="and even more, hooray!" + /> + } + When the consequent is \`null\` and the alternate breaks, + hug it with parens to match boolean behavior: + {!thing ? null : ( + <TheThing + thing={thing} + someVeryLongPropertyThatBreaksTheAlternate="hello" + /> + )} + </div> +); + +ternaryWithJSXElements.hasNoSpecialCasing = + component ? <div>{React.createElement(component, props)}</div> + : render ? <div>{render(props)}</div> + : <div>Nothing is here</div>; + +jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( + <Foo + withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} + withJSXBroken={ + isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? + <RedColorThing /> + : <GreenColorThing /> + } + /> +); + +=====================================output===================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts + +// remain on one line if possible: +const short = isLoud() ? makeNoise() : silent(); + +// next, put everything after the = +const lessShort = + isLoudReallyLoud() ? makeNoiseReallyLoudly.omgSoLoud() : silent(); + +// next, indent the consequent: +const andIndented = + isLoudReallyReallyReallyReallyLoud() ? + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + : silent(); + +// unless the consequent is short (less than ten characters long): +const shortSoCase = + isLoudReallyReallyReallyReallyLoud() ? silent() : ( + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + ); + +// if chained, always break and put after the = +const chainedShort = + isCat() ? meow() + : isDog() ? bark() + : silent(); + +// when a consequent breaks in a chain: +const chainedWithLongConsequent = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : silent(); + +// nested ternary in consequent always breaks: +const chainedWithTernaryConsequent = + isCat() ? + aNestedCondition ? theResult() + : theAlternate() + : isDog() ? bark() + : silent(); + +// consequent and terminal alternate break: +const consequentAndTerminalAlternateBreak = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// multiline conditions and consequents/alternates: +const multilineConditionsConsequentsAndAlternates = + ( + isAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : ( + isNotAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + bark() + : shortCondition() ? shortConsequent() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// illustrating case of mostly short conditionals +const mostlyShort = + x === 1 ? "one" + : x === 2 ? "two" + : x === 3 ? "three" + : ( + x === 5 && + y === 7 && + someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() + ) ? + "four" + : x === 6 ? "six" + : "idk"; + +// long conditional, short consequent/alternate, not chained - do indent after ? +const longConditional = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : "bar"; + +// long conditional, short consequent/alternate, chained +// (break on short consequents iff in chained ternary and its conditional broke) +const longConditionalChained = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : anotherCondition ? "bar" + : "baz"; + +// As a function parameter, don't add an extra indent: +definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], +); + +// In a return, break and over-indent: +const inReturn = () => { + if (short) { + return foo ? 1 : 2; + } + return typeof row[aVeryLongFieldName] !== "undefined" ? + row[aVeryLongFieldName] + : null; +}; + +// Remove current JSX Mode, and replace it with this algorithm: +// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, +// force the consequent to break, +// and if the alternate breaks, +// add a newline before the closing curly brace. +// Special case when the consequent is \`null\`: +// do not add a line before or after it, +// and wrap the alternate in parens. + +const someJSX = ( + <div> + Typical jsx case: + {showFoo ? + <Foo attribute="such and such stuff here" /> + : <Bar short />} + Nested, and with a non-jsx consequent is the same: + {component ? + React.createElement(component, props) + : render ? + <div>{render(props)}</div> + : <div>Nothing is here</div>} + As is a non-jsx consequent: + {showTheJSXElement ? + <div>the stuff</div> + : renderOtherStuff()} + But if the alternate breaks, add a newline before the closing curly brace: + {showTheThing || pleaseShowTheThing ? + <Foo attribute="such and such stuff here" /> + : <Bar + attribute="such and such stuff here" + another="more stuff here" + third="and even more, hooray!" + /> + } + When the consequent is \`null\` and the alternate breaks, hug it with parens + to match boolean behavior: + {!thing ? null : ( + <TheThing + thing={thing} + someVeryLongPropertyThatBreaksTheAlternate="hello" + /> + )} + </div> +); + +ternaryWithJSXElements.hasNoSpecialCasing = + component ? <div>{React.createElement(component, props)}</div> + : render ? <div>{render(props)}</div> + : <div>Nothing is here</div>; + +jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( + <Foo + withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} + withJSXBroken={ + isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? + <RedColorThing /> + : <GreenColorThing /> + } + /> +); + +================================================================================ +`; + +exports[`new-ternary-spec.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts + +// remain on one line if possible: +const short = isLoud() ? makeNoise() : silent(); + +// next, put everything after the = +const lessShort = + isLoudReallyLoud() ? makeNoiseReallyLoudly.omgSoLoud() : silent(); + +// next, indent the consequent: +const andIndented = + isLoudReallyReallyReallyReallyLoud() ? + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + : silent(); + +// unless the consequent is short (less than ten characters long): +const shortSoCase = + isLoudReallyReallyReallyReallyLoud() ? silent() : ( + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + ); + +// if chained, always break and put after the = +const chainedShort = + isCat() ? meow() + : isDog() ? bark() + : silent(); + +// when a consequent breaks in a chain: +const chainedWithLongConsequent = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : silent(); + +// nested ternary in consequent always breaks: +const chainedWithTernaryConsequent = + isCat() ? + aNestedCondition ? theResult() + : theAlternate() + : isDog() ? bark() + : silent(); + +// consequent and terminal alternate break: +const consequentAndTerminalAlternateBreak = + isCat() ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() ? bark() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// multiline conditions and consequents/alternates: +const multilineConditionsConsequentsAndAlternates = + ( + isAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : ( + isNotAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ) ? + bark() + : shortCondition() ? shortConsequent() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// illustrating case of mostly short conditionals +const mostlyShort = + x === 1 ? "one" + : x === 2 ? "two" + : x === 3 ? "three" + : ( + x === 5 && + y === 7 && + someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() + ) ? + "four" + : x === 6 ? "six" + : "idk"; + +// long conditional, short consequent/alternate, not chained - do indent after ? +const longConditional = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : "bar"; + +// long conditional, short consequent/alternate, chained +// (break on short consequents iff in chained ternary and its conditional broke) +const longConditionalChained = + ( + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ) ? + "foo" + : anotherCondition ? "bar" + : "baz"; + +// As a function parameter, don't add an extra indent: +definition.encode( + typeof row[field] !== "undefined" ? row[field] + : typeof definition.default !== "undefined" ? definition.default + : null, + typeof row[field] === "undefined" ? + typeof definition.default === "undefined" ? + null + : definition.default + : row[field], +); + +// In a return, break and over-indent: +const inReturn = () => { + if (short) { + return foo ? 1 : 2; + } + return typeof row[aVeryLongFieldName] !== "undefined" ? + row[aVeryLongFieldName] + : null; +}; + +// Remove current JSX Mode, and replace it with this algorithm: +// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, +// force the consequent to break, +// and if the alternate breaks, +// add a newline before the closing curly brace. +// Special case when the consequent is \`null\`: +// do not add a line before or after it, +// and wrap the alternate in parens. + +const someJSX = ( + <div> + Typical jsx case: + {showFoo ? + <Foo attribute="such and such stuff here" /> + : <Bar short />} + Nested, and with a non-jsx consequent is the same: + {component ? + React.createElement(component, props) + : render ? + <div>{render(props)}</div> + : <div>Nothing is here</div>} + As is a non-jsx consequent: + {showTheJSXElement ? + <div>the stuff</div> + : renderOtherStuff()} + But if the alternate breaks, add a newline before the closing curly brace: + {showTheThing || pleaseShowTheThing ? + <Foo attribute="such and such stuff here" /> + : <Bar + attribute="such and such stuff here" + another="more stuff here" + third="and even more, hooray!" + /> + } + When the consequent is \`null\` and the alternate breaks, + hug it with parens to match boolean behavior: + {!thing ? null : ( + <TheThing + thing={thing} + someVeryLongPropertyThatBreaksTheAlternate="hello" + /> + )} + </div> +); + +ternaryWithJSXElements.hasNoSpecialCasing = + component ? <div>{React.createElement(component, props)}</div> + : render ? <div>{render(props)}</div> + : <div>Nothing is here</div>; + +jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( + <Foo + withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} + withJSXBroken={ + isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? + <RedColorThing /> + : <GreenColorThing /> + } + /> +); + +=====================================output===================================== +// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 +// Input and output should match (for 2-space indent formatting). +// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts + +// remain on one line if possible: +const short = isLoud() ? makeNoise() : silent(); + +// next, put everything after the = +const lessShort = isLoudReallyLoud() + ? makeNoiseReallyLoudly.omgSoLoud() + : silent(); + +// next, indent the consequent: +const andIndented = isLoudReallyReallyReallyReallyLoud() + ? makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + : silent(); + +// unless the consequent is short (less than ten characters long): +const shortSoCase = isLoudReallyReallyReallyReallyLoud() + ? silent() + : makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud(); + +// if chained, always break and put after the = +const chainedShort = isCat() ? meow() : isDog() ? bark() : silent(); + +// when a consequent breaks in a chain: +const chainedWithLongConsequent = isCat() + ? someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() + ? bark() + : silent(); + +// nested ternary in consequent always breaks: +const chainedWithTernaryConsequent = isCat() + ? aNestedCondition + ? theResult() + : theAlternate() + : isDog() + ? bark() + : silent(); + +// consequent and terminal alternate break: +const consequentAndTerminalAlternateBreak = isCat() + ? someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isDog() + ? bark() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// multiline conditions and consequents/alternates: +const multilineConditionsConsequentsAndAlternates = + isAnAdorableKittyCat() && (someReallyLongCondition || moreInThisLongCondition) + ? someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens() + : isNotAnAdorableKittyCat() && + (someReallyLongCondition || moreInThisLongCondition) + ? bark() + : shortCondition() + ? shortConsequent() + : someReallyLargeExpression + .thatWouldCauseALineBreak() + .willCauseAnIndentButNotParens(); + +// illustrating case of mostly short conditionals +const mostlyShort = + x === 1 + ? "one" + : x === 2 + ? "two" + : x === 3 + ? "three" + : x === 5 && + y === 7 && + someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() + ? "four" + : x === 6 + ? "six" + : "idk"; + +// long conditional, short consequent/alternate, not chained - do indent after ? +const longConditional = + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ? "foo" + : "bar"; + +// long conditional, short consequent/alternate, chained +// (break on short consequents iff in chained ternary and its conditional broke) +const longConditionalChained = + bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && + glimseGlyphsHazardNoopsTieTie >= + averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() + ? "foo" + : anotherCondition + ? "bar" + : "baz"; + +// As a function parameter, don't add an extra indent: +definition.encode( + typeof row[field] !== "undefined" + ? row[field] + : typeof definition.default !== "undefined" + ? definition.default + : null, + typeof row[field] === "undefined" + ? typeof definition.default === "undefined" + ? null + : definition.default + : row[field], +); + +// In a return, break and over-indent: +const inReturn = () => { + if (short) { + return foo ? 1 : 2; + } + return typeof row[aVeryLongFieldName] !== "undefined" + ? row[aVeryLongFieldName] + : null; +}; + +// Remove current JSX Mode, and replace it with this algorithm: +// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, +// force the consequent to break, +// and if the alternate breaks, +// add a newline before the closing curly brace. +// Special case when the consequent is \`null\`: +// do not add a line before or after it, +// and wrap the alternate in parens. + +const someJSX = ( + <div> + Typical jsx case: + {showFoo ? <Foo attribute="such and such stuff here" /> : <Bar short />} + Nested, and with a non-jsx consequent is the same: + {component ? ( + React.createElement(component, props) + ) : render ? ( + <div>{render(props)}</div> + ) : ( + <div>Nothing is here</div> + )} + As is a non-jsx consequent: + {showTheJSXElement ? <div>the stuff</div> : renderOtherStuff()} + But if the alternate breaks, add a newline before the closing curly brace: + {showTheThing || pleaseShowTheThing ? ( + <Foo attribute="such and such stuff here" /> + ) : ( + <Bar + attribute="such and such stuff here" + another="more stuff here" + third="and even more, hooray!" + /> + )} + When the consequent is \`null\` and the alternate breaks, hug it with parens + to match boolean behavior: + {!thing ? null : ( + <TheThing + thing={thing} + someVeryLongPropertyThatBreaksTheAlternate="hello" + /> + )} + </div> +); + +ternaryWithJSXElements.hasNoSpecialCasing = component ? ( + <div>{React.createElement(component, props)}</div> +) : render ? ( + <div>{render(props)}</div> +) : ( + <div>Nothing is here</div> +); + +jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( + <Foo + withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} + withJSXBroken={ + isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? ( + <RedColorThing /> + ) : ( + <GreenColorThing /> + ) + } + /> +); + +================================================================================ +`; + +exports[`no-confusing-arrow.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// no-confusing-arrow +var x = a => 1 ? 2 : 3; +var x = a <= 1 ? 2 : 3; + +=====================================output===================================== +// no-confusing-arrow +var x = (a) => (1 ? 2 : 3); +var x = a <= 1 ? 2 : 3; + +================================================================================ +`; + +exports[`no-confusing-arrow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// no-confusing-arrow +var x = a => 1 ? 2 : 3; +var x = a <= 1 ? 2 : 3; + +=====================================output===================================== +// no-confusing-arrow +var x = (a) => (1 ? 2 : 3); +var x = a <= 1 ? 2 : 3; + +================================================================================ +`; + +exports[`postfix-ternary-regressions.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +// concatened string in consequent should be visually distinguishable from alternate +// … or maybe this is okay, because the colon is enough? +const avatar = has_ordered ? + 'https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-' + + numberOfCustomers + + '.jpeg' + : undefined; + +// Similarly, in the alternate: +const redirectUrl = pathName ? + pathName + : nextPathName + nextSearch || + defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks; + +// And another, more pathological case of the above: +const isEmpty = obj => + obj instanceof Date ? + false + : obj === '' || + obj === null || + obj === undefined || + obj === somethingThatIsLonger || + shallowEqual(obj, {}); + + +// Again, this case is a bit hard to distinguish the alternate. +const eventsFromOrders = + orderIds && orders ? + orderIds.map(id => ({ + type: 'order', + date: orders[id].date, + data: orders[id], + })) + : []; + +// Kinda weird to have dedents to the level of "return" in a function. +function foo() { + return !linkTo ? + false + : typeof linkTo === 'function' + ? linkTo(record, reference) + : linkToRecord(rootPath, sourceId, linkTo_as_string); +} +function foo2() { + return React.isValidElement(emptyText) + ? React.cloneElement(emptyText) + : emptyText === '' + ? ' ' // em space, forces the display of an empty line of normal height + : translate(emptyText, { _: emptyText }); +} + +// Function call ideally wouldnt break break +const matchingReferencesError = isMatchingReferencesError( + matchingReferences +) + ? translate(matchingReferences.error, { + _: matchingReferences.error, + }) + : null; + +// This one is kinda confusing any way you slice it… +const obj = { + error: + matchingReferencesError && + (!input.value || + (input.value && + selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) + ? translate('ra.input.references.all_missing', { + _: 'ra.input.references.all_missing', + }) + : null, +} + +// I think we should indent after the inner || on this, and do better wtih the parens around the && +const obj2 = { + warning: + matchingReferencesError || + (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) + ? matchingReferencesError || + translate('ra.input.references.many_missing', { + _: 'ra.input.references.many_missing', + }) + : null, +} + +// The boolean conditions in the test should look cohesive. +const selectedReferencesDataStatus = + !isEmpty(value) && typeof value === 'string' && !pattern.test(value) + ? getMessage(message, { pattern }, value, values) + : undefined + + +// Would be nice if these two nested ternaries didn't look like a single one. +resolveRedirectTo( + redirectTo, + basePath, + payload + ? payload.id || (payload.data ? payload.data.id : null) + : requestPayload + ? requestPayload.id + : null, + payload && payload.data + ? payload.data + : requestPayload && requestPayload.data + ? requestPayload.data + : null +) + +const delayedDataProvider = new Proxy(restProvider, { + get: (target, name, self) => + name === 'then' ? // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method + self + : ( + (resource, params) => + new Promise(resolve => + setTimeout( + () => + resolve( + restProvider[name](resource, params) + ), + 500 + ) + ) + ), +}); + +function foo4() { + return !match || match.length < 5 ? line : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo5() { + return !match || match.length < 5 ? foo(line) : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo6() { + return !match || match.length < 5 ? linethatisverylongandbreaksthelinehooray : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo7() { + return !match || match.length < 5 ? linethatisverylongandbreaksthelinehoorayjustabitlonger : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +const badComments = + schema.model ? schema + // If model is an array where the items schema is a referred model then we need to use that + : schema.type === 'array' ? schema.items + : schema; + +const anotherBadComment = + refModel ? + // If we're in a shared params file then reference the model name directly + inSharedParamsFile ? refModel + // If we're not in a shared params file then reference the in-file type + : classRef() + // We don't have a model name, use the in-file name + : classRef() + +=====================================output===================================== +// concatened string in consequent should be visually distinguishable from alternate +// … or maybe this is okay, because the colon is enough? +const avatar = + has_ordered ? + "https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-" + + numberOfCustomers + + ".jpeg" + : undefined; + +// Similarly, in the alternate: +const redirectUrl = + pathName ? pathName : ( + nextPathName + nextSearch || + defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks + ); + +// And another, more pathological case of the above: +const isEmpty = (obj) => + obj instanceof Date ? false : ( + obj === "" || + obj === null || + obj === undefined || + obj === somethingThatIsLonger || + shallowEqual(obj, {}) + ); + +// Again, this case is a bit hard to distinguish the alternate. +const eventsFromOrders = + orderIds && orders ? + orderIds.map((id) => ({ + type: "order", + date: orders[id].date, + data: orders[id], + })) + : []; + +// Kinda weird to have dedents to the level of "return" in a function. +function foo() { + return ( + !linkTo ? false + : typeof linkTo === "function" ? linkTo(record, reference) + : linkToRecord(rootPath, sourceId, linkTo_as_string) + ); +} +function foo2() { + return ( + React.isValidElement(emptyText) ? React.cloneElement(emptyText) + : emptyText === "" ? + " " // em space, forces the display of an empty line of normal height + : translate(emptyText, { _: emptyText }) + ); +} + +// Function call ideally wouldnt break break +const matchingReferencesError = + isMatchingReferencesError(matchingReferences) ? + translate(matchingReferences.error, { + _: matchingReferences.error, + }) + : null; + +// This one is kinda confusing any way you slice it… +const obj = { + error: + ( + matchingReferencesError && + (!input.value || + (input.value && + selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) + ) ? + translate("ra.input.references.all_missing", { + _: "ra.input.references.all_missing", + }) + : null, +}; + +// I think we should indent after the inner || on this, and do better wtih the parens around the && +const obj2 = { + warning: + ( + matchingReferencesError || + (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) + ) ? + matchingReferencesError || + translate("ra.input.references.many_missing", { + _: "ra.input.references.many_missing", + }) + : null, +}; + +// The boolean conditions in the test should look cohesive. +const selectedReferencesDataStatus = + !isEmpty(value) && typeof value === "string" && !pattern.test(value) ? + getMessage(message, { pattern }, value, values) + : undefined; + +// Would be nice if these two nested ternaries didn't look like a single one. +resolveRedirectTo( + redirectTo, + basePath, + payload ? payload.id || (payload.data ? payload.data.id : null) + : requestPayload ? requestPayload.id + : null, + payload && payload.data ? payload.data + : requestPayload && requestPayload.data ? requestPayload.data + : null, +); + +const delayedDataProvider = new Proxy(restProvider, { + get: (target, name, self) => + ( + name === "then" // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method + ) ? + self + : (resource, params) => + new Promise((resolve) => + setTimeout(() => resolve(restProvider[name](resource, params)), 500), + ), +}); + +function foo4() { + return !match || match.length < 5 ? + line + : match[1] + match[2] + match[3] + match[4]; +} + +function foo5() { + return !match || match.length < 5 ? + foo(line) + : match[1] + match[2] + match[3] + match[4]; +} + +function foo6() { + return !match || match.length < 5 ? + linethatisverylongandbreaksthelinehooray + : match[1] + match[2] + match[3] + match[4]; +} + +function foo7() { + return !match || match.length < 5 ? + linethatisverylongandbreaksthelinehoorayjustabitlonger + : match[1] + match[2] + match[3] + match[4]; +} + +const badComments = + schema.model ? schema + // If model is an array where the items schema is a referred model then we need to use that + : schema.type === "array" ? schema.items + : schema; + +const anotherBadComment = + refModel ? + // If we're in a shared params file then reference the model name directly + inSharedParamsFile ? refModel + // If we're not in a shared params file then reference the in-file type + : classRef() + // We don't have a model name, use the in-file name + : classRef(); + +================================================================================ +`; + +exports[`postfix-ternary-regressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +// concatened string in consequent should be visually distinguishable from alternate +// … or maybe this is okay, because the colon is enough? +const avatar = has_ordered ? + 'https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-' + + numberOfCustomers + + '.jpeg' + : undefined; + +// Similarly, in the alternate: +const redirectUrl = pathName ? + pathName + : nextPathName + nextSearch || + defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks; + +// And another, more pathological case of the above: +const isEmpty = obj => + obj instanceof Date ? + false + : obj === '' || + obj === null || + obj === undefined || + obj === somethingThatIsLonger || + shallowEqual(obj, {}); + + +// Again, this case is a bit hard to distinguish the alternate. +const eventsFromOrders = + orderIds && orders ? + orderIds.map(id => ({ + type: 'order', + date: orders[id].date, + data: orders[id], + })) + : []; + +// Kinda weird to have dedents to the level of "return" in a function. +function foo() { + return !linkTo ? + false + : typeof linkTo === 'function' + ? linkTo(record, reference) + : linkToRecord(rootPath, sourceId, linkTo_as_string); +} +function foo2() { + return React.isValidElement(emptyText) + ? React.cloneElement(emptyText) + : emptyText === '' + ? ' ' // em space, forces the display of an empty line of normal height + : translate(emptyText, { _: emptyText }); +} + +// Function call ideally wouldnt break break +const matchingReferencesError = isMatchingReferencesError( + matchingReferences +) + ? translate(matchingReferences.error, { + _: matchingReferences.error, + }) + : null; + +// This one is kinda confusing any way you slice it… +const obj = { + error: + matchingReferencesError && + (!input.value || + (input.value && + selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) + ? translate('ra.input.references.all_missing', { + _: 'ra.input.references.all_missing', + }) + : null, +} + +// I think we should indent after the inner || on this, and do better wtih the parens around the && +const obj2 = { + warning: + matchingReferencesError || + (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) + ? matchingReferencesError || + translate('ra.input.references.many_missing', { + _: 'ra.input.references.many_missing', + }) + : null, +} + +// The boolean conditions in the test should look cohesive. +const selectedReferencesDataStatus = + !isEmpty(value) && typeof value === 'string' && !pattern.test(value) + ? getMessage(message, { pattern }, value, values) + : undefined + + +// Would be nice if these two nested ternaries didn't look like a single one. +resolveRedirectTo( + redirectTo, + basePath, + payload + ? payload.id || (payload.data ? payload.data.id : null) + : requestPayload + ? requestPayload.id + : null, + payload && payload.data + ? payload.data + : requestPayload && requestPayload.data + ? requestPayload.data + : null +) + +const delayedDataProvider = new Proxy(restProvider, { + get: (target, name, self) => + name === 'then' ? // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method + self + : ( + (resource, params) => + new Promise(resolve => + setTimeout( + () => + resolve( + restProvider[name](resource, params) + ), + 500 + ) + ) + ), +}); + +function foo4() { + return !match || match.length < 5 ? line : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo5() { + return !match || match.length < 5 ? foo(line) : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo6() { + return !match || match.length < 5 ? linethatisverylongandbreaksthelinehooray : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +function foo7() { + return !match || match.length < 5 ? linethatisverylongandbreaksthelinehoorayjustabitlonger : ( + match[1] + match[2] + match[3] + match[4] + ) +} + +const badComments = + schema.model ? schema + // If model is an array where the items schema is a referred model then we need to use that + : schema.type === 'array' ? schema.items + : schema; + +const anotherBadComment = + refModel ? + // If we're in a shared params file then reference the model name directly + inSharedParamsFile ? refModel + // If we're not in a shared params file then reference the in-file type + : classRef() + // We don't have a model name, use the in-file name + : classRef() + +=====================================output===================================== +// concatened string in consequent should be visually distinguishable from alternate +// … or maybe this is okay, because the colon is enough? +const avatar = has_ordered + ? "https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-" + + numberOfCustomers + + ".jpeg" + : undefined; + +// Similarly, in the alternate: +const redirectUrl = pathName + ? pathName + : nextPathName + nextSearch || + defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks; + +// And another, more pathological case of the above: +const isEmpty = (obj) => + obj instanceof Date + ? false + : obj === "" || + obj === null || + obj === undefined || + obj === somethingThatIsLonger || + shallowEqual(obj, {}); + +// Again, this case is a bit hard to distinguish the alternate. +const eventsFromOrders = + orderIds && orders + ? orderIds.map((id) => ({ + type: "order", + date: orders[id].date, + data: orders[id], + })) + : []; + +// Kinda weird to have dedents to the level of "return" in a function. +function foo() { + return !linkTo + ? false + : typeof linkTo === "function" + ? linkTo(record, reference) + : linkToRecord(rootPath, sourceId, linkTo_as_string); +} +function foo2() { + return React.isValidElement(emptyText) + ? React.cloneElement(emptyText) + : emptyText === "" + ? " " // em space, forces the display of an empty line of normal height + : translate(emptyText, { _: emptyText }); +} + +// Function call ideally wouldnt break break +const matchingReferencesError = isMatchingReferencesError(matchingReferences) + ? translate(matchingReferences.error, { + _: matchingReferences.error, + }) + : null; + +// This one is kinda confusing any way you slice it… +const obj = { + error: + matchingReferencesError && + (!input.value || + (input.value && selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) + ? translate("ra.input.references.all_missing", { + _: "ra.input.references.all_missing", + }) + : null, +}; + +// I think we should indent after the inner || on this, and do better wtih the parens around the && +const obj2 = { + warning: + matchingReferencesError || + (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) + ? matchingReferencesError || + translate("ra.input.references.many_missing", { + _: "ra.input.references.many_missing", + }) + : null, +}; + +// The boolean conditions in the test should look cohesive. +const selectedReferencesDataStatus = + !isEmpty(value) && typeof value === "string" && !pattern.test(value) + ? getMessage(message, { pattern }, value, values) + : undefined; + +// Would be nice if these two nested ternaries didn't look like a single one. +resolveRedirectTo( + redirectTo, + basePath, + payload + ? payload.id || (payload.data ? payload.data.id : null) + : requestPayload + ? requestPayload.id + : null, + payload && payload.data + ? payload.data + : requestPayload && requestPayload.data + ? requestPayload.data + : null, +); + +const delayedDataProvider = new Proxy(restProvider, { + get: (target, name, self) => + name === "then" // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method + ? self + : (resource, params) => + new Promise((resolve) => + setTimeout( + () => resolve(restProvider[name](resource, params)), + 500, + ), + ), +}); + +function foo4() { + return !match || match.length < 5 + ? line + : match[1] + match[2] + match[3] + match[4]; +} + +function foo5() { + return !match || match.length < 5 + ? foo(line) + : match[1] + match[2] + match[3] + match[4]; +} + +function foo6() { + return !match || match.length < 5 + ? linethatisverylongandbreaksthelinehooray + : match[1] + match[2] + match[3] + match[4]; +} + +function foo7() { + return !match || match.length < 5 + ? linethatisverylongandbreaksthelinehoorayjustabitlonger + : match[1] + match[2] + match[3] + match[4]; +} + +const badComments = schema.model + ? schema + : // If model is an array where the items schema is a referred model then we need to use that + schema.type === "array" + ? schema.items + : schema; + +const anotherBadComment = refModel + ? // If we're in a shared params file then reference the model name directly + inSharedParamsFile + ? refModel + : // If we're not in a shared params file then reference the in-file type + classRef() + : // We don't have a model name, use the in-file name + classRef(); + +================================================================================ +`; diff --git a/tests/format/js/conditional/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/conditional/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 31cbd272ff2b..000000000000 --- a/tests/format/js/conditional/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1284 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var inspect = 4 === util.inspect.length - ? // node <= 0.8.x - (function(v, colors) { - return util.inspect(v, void 0, void 0, colors); - }) - : // node > 0.8.x - (function(v, colors) { - return util.inspect(v, { colors: colors }); - }); - -var inspect = 4 === util.inspect.length - ? // node <= 0.8.x - (function(v, colors) { - return util.inspect(v, void 0, void 0, colors); - }) - : // node > 0.8.x - (function(v, colors) { - return util.inspect(v, { colors: colors }); - }); - -const extractTextPluginOptions = shouldUseRelativeAssetPaths - // Making sure that the publicPath goes back to to build folder. - ? { publicPath: Array(cssFilename.split('/').length).join('../') } : - {}; - -const extractTextPluginOptions2 = shouldUseRelativeAssetPaths - ? // Making sure that the publicPath goes back to to build folder. - { publicPath: Array(cssFilename.split("/").length).join("../") } - : {}; - -const extractTextPluginOptions3 = shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. - ? { publicPath: Array(cssFilename.split("/").length).join("../") } - : {}; - -const { configureStore } = process.env.NODE_ENV === "production" - ? require("./configureProdStore") // a - : require("./configureDevStore"); // b - -test /* comment - comment - comment -*/ - ? foo - : bar; - -test - ? /* comment - comment - comment - comment - */ - foo - : bar; - -test - ? /* comment - comment - comment - comment - */ - foo - : test - ? /* comment - comment - comment */ - foo - : bar; - -test - ? /* comment */ - foo - : bar; - -test - ? foo - : /* comment - comment - comment - comment - */ - bar; - -test - ? foo - : /* comment - comment - comment - comment - A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. - */ - test - ? foo - : /* comment - comment - comment - */ - bar; - - -// It is at least possible to delete the extra newline that was -// unfortunately added before the second condition above: -test ? - foo :/* comment - comment - comment - comment - */ -test ? - foo : - /* comment - comment - comment - */ - bar; - -test - ? foo - : /* comment */ - bar; - -test ? test /* c -c */? foo : bar : bar; - -=====================================output===================================== -var inspect = - 4 === util.inspect.length - ? // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } - : // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - }; - -var inspect = - 4 === util.inspect.length - ? // node <= 0.8.x - function (v, colors) { - return util.inspect(v, void 0, void 0, colors); - } - : // node > 0.8.x - function (v, colors) { - return util.inspect(v, { colors: colors }); - }; - -const extractTextPluginOptions = shouldUseRelativeAssetPaths - ? // Making sure that the publicPath goes back to to build folder. - { publicPath: Array(cssFilename.split("/").length).join("../") } - : {}; - -const extractTextPluginOptions2 = shouldUseRelativeAssetPaths - ? // Making sure that the publicPath goes back to to build folder. - { publicPath: Array(cssFilename.split("/").length).join("../") } - : {}; - -const extractTextPluginOptions3 = shouldUseRelativeAssetPaths // Making sure that the publicPath goes back to to build folder. - ? { publicPath: Array(cssFilename.split("/").length).join("../") } - : {}; - -const { configureStore } = - process.env.NODE_ENV === "production" - ? require("./configureProdStore") // a - : require("./configureDevStore"); // b - -test /* comment - comment - comment -*/ - ? foo - : bar; - -test - ? /* comment - comment - comment - comment - */ - foo - : bar; - -test - ? /* comment - comment - comment - comment - */ - foo - : test - ? /* comment - comment - comment */ - foo - : bar; - -test ? /* comment */ foo : bar; - -test - ? foo - : /* comment - comment - comment - comment - */ - bar; - -test - ? foo - : /* comment - comment - comment - comment - A newline will be added after this comment, unfortunately – but it can be removed manually, see next statement. - */ - test - ? foo - : /* comment - comment - comment - */ - bar; - -// It is at least possible to delete the extra newline that was -// unfortunately added before the second condition above: -test - ? foo /* comment - comment - comment - comment - */ - : test - ? foo - : /* comment - comment - comment - */ - bar; - -test ? foo : /* comment */ bar; - -test - ? test /* c -c */ - ? foo - : bar - : bar; - -================================================================================ -`; - -exports[`new-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const testConsole = new TestConsole( - config.useStderr ? process.stderr : process.stdout -); - -=====================================output===================================== -const testConsole = new TestConsole( - config.useStderr ? process.stderr : process.stdout -); - -================================================================================ -`; - -exports[`new-ternary-examples.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 -// Input and output should match (for 2-space indent formatting). -// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts -// EXAMPLES -// mostly taken from https://github.com/prettier/prettier/issues/9561 - -const message = - i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" - : i % 3 === 0 ? "fizz" - : i % 5 === 0 ? "buzz" - : String(i); - -const paymentMessageShort = - state == "success" ? "Payment completed successfully" - : state == "processing" ? "Payment processing" - : state == "invalid_cvc" ? "There was an issue with your CVC number" - : state == "invalid_expiry" ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessageWithABreak = - state == "success" ? "Payment completed successfully" - : state == "processing" ? "Payment processing" - : state == "invalid_cvc" ? - "There was an issue with your CVC number, and you need to take a prompt action on it." - : state == "invalid_expiry" ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const typeofExample = - definition.encode ? - definition.encode( - typeof row[field] !== "undefined" ? row[field] - : typeof definition.default !== "undefined" ? definition.default - : null - ) - : typeof row[field] !== "undefined" ? row[field] - : typeof definition.default !== "undefined" ? definition.default - : null - -// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) -const typeofExampleFlipped = - definition.encode ? - definition.encode( - typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null - : definition.default - : row[field] - ) - : typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null - : definition.default - : row[field]; - - -// JSX Examples: - -const typicalLongConsequentWithNullAlternate = ( - <div> - {children && !isEmptyChildren(children) ? - <FooComponent - className="a bunch of css classes might go here, wow so many" - foo={foo} - bar={includeBar ? bar : null} - /> - : null} - </div> -); - -const reactRouterExampleJSX = ( - <div> - {children && !isEmptyChildren(children) ? - children - : props.match ? - component ? React.createElement(component, props) - : render ? render(props) - : null - : null} - </div> -); - -const reactRouterExampleNonJSX = - children && !isEmptyChildren(children) ? children - : props.match ? - component ? React.createElement(component, props) - : render ? render(props) - : null - : null; - -inJSXExpressionContainer.withLongConditionals.example = ( - <div> - {( - isACat() && - (someReallyLongCondition || - moreInThisLongCondition) - ) ? - someReallyLargeExpression - .toMakeMeowNoise() - .willCauseParens() - : ( - someReallyLongCondition || - moreInThisLongCondition - ) ? - bark() - : someReallyLargeExpression - .toMakeMeowNoise() - .willCauseParens() - } - </div> -); - -inJSXExpressionContainer.withLoops.orBooleans.example = ( - <div> - {items ? - items.map((item) => ( - item.display ? - <Item item={item} attr="breaks ternary but not consequent" /> - : <Blank /> - )) - : null} - - {showTheStuff && ( - foo ? - <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> - : <OtherThing /> - )} - </div> -); - -inJSXExpressionContainer.withNullConditional = ( - <div> - {isACat() ? null : <Foo />} - {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( - <Foo /> - )} - {isACat() && (someReallyLongCondition || moreInThisLongCondition || evenMoreInThisExtraLongConditional) ? null : ( - <Foo /> - )} - </div> -); - -=====================================output===================================== -// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 -// Input and output should match (for 2-space indent formatting). -// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts -// EXAMPLES -// mostly taken from https://github.com/prettier/prettier/issues/9561 - -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -const paymentMessageShort = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number" - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessageWithABreak = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number, and you need to take a prompt action on it." - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const typeofExample = definition.encode - ? definition.encode( - typeof row[field] !== "undefined" - ? row[field] - : typeof definition.default !== "undefined" - ? definition.default - : null - ) - : typeof row[field] !== "undefined" - ? row[field] - : typeof definition.default !== "undefined" - ? definition.default - : null; - -// (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) -const typeofExampleFlipped = definition.encode - ? definition.encode( - typeof row[field] === "undefined" - ? typeof definition.default === "undefined" - ? null - : definition.default - : row[field] - ) - : typeof row[field] === "undefined" - ? typeof definition.default === "undefined" - ? null - : definition.default - : row[field]; - -// JSX Examples: - -const typicalLongConsequentWithNullAlternate = ( - <div> - {children && !isEmptyChildren(children) ? ( - <FooComponent - className="a bunch of css classes might go here, wow so many" - foo={foo} - bar={includeBar ? bar : null} - /> - ) : null} - </div> -); - -const reactRouterExampleJSX = ( - <div> - {children && !isEmptyChildren(children) - ? children - : props.match - ? component - ? React.createElement(component, props) - : render - ? render(props) - : null - : null} - </div> -); - -const reactRouterExampleNonJSX = - children && !isEmptyChildren(children) - ? children - : props.match - ? component - ? React.createElement(component, props) - : render - ? render(props) - : null - : null; - -inJSXExpressionContainer.withLongConditionals.example = ( - <div> - {isACat() && (someReallyLongCondition || moreInThisLongCondition) - ? someReallyLargeExpression.toMakeMeowNoise().willCauseParens() - : someReallyLongCondition || moreInThisLongCondition - ? bark() - : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} - </div> -); - -inJSXExpressionContainer.withLoops.orBooleans.example = ( - <div> - {items - ? items.map((item) => - item.display ? ( - <Item item={item} attr="breaks ternary but not consequent" /> - ) : ( - <Blank /> - ) - ) - : null} - - {showTheStuff && - (foo ? ( - <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> - ) : ( - <OtherThing /> - ))} - </div> -); - -inJSXExpressionContainer.withNullConditional = ( - <div> - {isACat() ? null : <Foo />} - {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( - <Foo /> - )} - {isACat() && - (someReallyLongCondition || - moreInThisLongCondition || - evenMoreInThisExtraLongConditional) ? null : ( - <Foo /> - )} - </div> -); - -================================================================================ -`; - -exports[`new-ternary-spec.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 -// Input and output should match (for 2-space indent formatting). -// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts - -// remain on one line if possible: -const short = isLoud() ? makeNoise() : silent(); - -// next, put everything after the = -const lessShort = - isLoudReallyLoud() ? makeNoiseReallyLoudly.omgSoLoud() : silent(); - -// next, indent the consequent: -const andIndented = isLoudReallyReallyReallyReallyLoud() ? - makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() - : silent(); - -// unless the consequent is short (less than ten characters long): -const shortSoCase = isLoudReallyReallyReallyReallyLoud() ? silent() - : makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud(); - -// if chained, always break and put after the = -const chainedShort = - isCat() ? meow() - : isDog() ? bark() - : silent(); - -// when a consequent breaks in a chain: -const chainedWithLongConsequent = - isCat() ? - someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : isDog() ? bark() - : silent(); - -// nested ternary in consequent always breaks: -const chainedWithTernaryConsequent = - isCat() ? - aNestedCondition ? theResult() - : theAlternate() - : isDog() ? bark() - : silent(); - -// consequent and terminal alternate break: -const consequentAndTerminalAlternateBreak = - isCat() ? - someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : isDog() ? bark() - : someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens(); - -// multiline conditions and consequents/alternates: -const multilineConditionsConsequentsAndAlternates = - ( - isAnAdorableKittyCat() && - (someReallyLongCondition || moreInThisLongCondition) - ) ? - someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : ( - isNotAnAdorableKittyCat() && - (someReallyLongCondition || moreInThisLongCondition) - ) ? - bark() - : shortCondition() ? shortConsequent() - : someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens(); - -// illustrating case of mostly short conditionals -const mostlyShort = - x === 1 ? "one" - : x === 2 ? "two" - : x === 3 ? "three" - : ( - x === 5 && - y === 7 && - someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() - ) ? - "four" - : x === 6 ? "six" - : "idk"; - -// long conditional, short consequent/alternate, not chained - do indent after ? -const longConditional = ( - bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && - glimseGlyphsHazardNoopsTieTie >= - averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() - ) ? - "foo" - : "bar"; - -// long conditional, short consequent/alternate, chained -// (break on short consequents iff in chained ternary and its conditional broke) -const longConditionalChained = - ( - bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && - glimseGlyphsHazardNoopsTieTie >= - averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() - ) ? - "foo" - : anotherCondition ? "bar" - : "baz"; - -// As a function parameter, don't add an extra indent: -definition.encode( - typeof row[field] !== "undefined" ? row[field] - : typeof definition.default !== "undefined" ? definition.default - : null, - typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null - : definition.default - : row[field] -); - -// In a return, break and over-indent: -const inReturn = () => { - if (short) { - return foo ? 1 : 2; - } - return typeof row[aVeryLongFieldName] !== "undefined" ? - row[aVeryLongFieldName] - : null; -}; - -// Remove current JSX Mode, and replace it with this algorithm: -// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, -// force the consequent to break, -// and if the alternate breaks, -// add a newline before the closing curly brace. -// Special case when the consequent is \`null\`: -// do not add a line before or after it, -// and wrap the alternate in parens. - -const someJSX = ( - <div> - Typical jsx case: - {showFoo ? - <Foo attribute="such and such stuff here" /> - : <Bar short />} - Nested, and with a non-jsx consequent is the same: - {component ? - React.createElement(component, props) - : render ? - <div>{render(props)}</div> - : <div>Nothing is here</div>} - As is a non-jsx consequent: - {showTheJSXElement ? - <div>the stuff</div> - : renderOtherStuff()} - But if the alternate breaks, add a newline before the closing curly brace: - {showTheThing || pleaseShowTheThing ? - <Foo attribute="such and such stuff here" /> - : <Bar - attribute="such and such stuff here" - another="more stuff here" - third="and even more, hooray!" - /> - } - When the consequent is \`null\` and the alternate breaks, - hug it with parens to match boolean behavior: - {!thing ? null : ( - <TheThing - thing={thing} - someVeryLongPropertyThatBreaksTheAlternate="hello" - /> - )} - </div> -); - -ternaryWithJSXElements.hasNoSpecialCasing = - component ? <div>{React.createElement(component, props)}</div> - : render ? <div>{render(props)}</div> - : <div>Nothing is here</div>; - -jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( - <Foo - withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} - withJSXBroken={ - isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? - <RedColorThing /> - : <GreenColorThing /> - } - /> -); - -=====================================output===================================== -// from https://gist.github.com/rattrayalex/dacbf5838571a47f22d0ae1f8b960268 -// Input and output should match (for 2-space indent formatting). -// TypeScript is here: prettier/tests/format/typescript/conditional-types/new-ternary-spec.ts - -// remain on one line if possible: -const short = isLoud() ? makeNoise() : silent(); - -// next, put everything after the = -const lessShort = isLoudReallyLoud() - ? makeNoiseReallyLoudly.omgSoLoud() - : silent(); - -// next, indent the consequent: -const andIndented = isLoudReallyReallyReallyReallyLoud() - ? makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() - : silent(); - -// unless the consequent is short (less than ten characters long): -const shortSoCase = isLoudReallyReallyReallyReallyLoud() - ? silent() - : makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud(); - -// if chained, always break and put after the = -const chainedShort = isCat() ? meow() : isDog() ? bark() : silent(); - -// when a consequent breaks in a chain: -const chainedWithLongConsequent = isCat() - ? someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : isDog() - ? bark() - : silent(); - -// nested ternary in consequent always breaks: -const chainedWithTernaryConsequent = isCat() - ? aNestedCondition - ? theResult() - : theAlternate() - : isDog() - ? bark() - : silent(); - -// consequent and terminal alternate break: -const consequentAndTerminalAlternateBreak = isCat() - ? someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : isDog() - ? bark() - : someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens(); - -// multiline conditions and consequents/alternates: -const multilineConditionsConsequentsAndAlternates = - isAnAdorableKittyCat() && (someReallyLongCondition || moreInThisLongCondition) - ? someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens() - : isNotAnAdorableKittyCat() && - (someReallyLongCondition || moreInThisLongCondition) - ? bark() - : shortCondition() - ? shortConsequent() - : someReallyLargeExpression - .thatWouldCauseALineBreak() - .willCauseAnIndentButNotParens(); - -// illustrating case of mostly short conditionals -const mostlyShort = - x === 1 - ? "one" - : x === 2 - ? "two" - : x === 3 - ? "three" - : x === 5 && - y === 7 && - someOtherThing.thatIsSoLong.thatItBreaksTheTestCondition() - ? "four" - : x === 6 - ? "six" - : "idk"; - -// long conditional, short consequent/alternate, not chained - do indent after ? -const longConditional = - bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && - glimseGlyphsHazardNoopsTieTie >= - averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() - ? "foo" - : "bar"; - -// long conditional, short consequent/alternate, chained -// (break on short consequents iff in chained ternary and its conditional broke) -const longConditionalChained = - bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && - glimseGlyphsHazardNoopsTieTie >= - averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() - ? "foo" - : anotherCondition - ? "bar" - : "baz"; - -// As a function parameter, don't add an extra indent: -definition.encode( - typeof row[field] !== "undefined" - ? row[field] - : typeof definition.default !== "undefined" - ? definition.default - : null, - typeof row[field] === "undefined" - ? typeof definition.default === "undefined" - ? null - : definition.default - : row[field] -); - -// In a return, break and over-indent: -const inReturn = () => { - if (short) { - return foo ? 1 : 2; - } - return typeof row[aVeryLongFieldName] !== "undefined" - ? row[aVeryLongFieldName] - : null; -}; - -// Remove current JSX Mode, and replace it with this algorithm: -// When a ternary's parent is a JSXExpressionContainer which is not in a JSXAttribute, -// force the consequent to break, -// and if the alternate breaks, -// add a newline before the closing curly brace. -// Special case when the consequent is \`null\`: -// do not add a line before or after it, -// and wrap the alternate in parens. - -const someJSX = ( - <div> - Typical jsx case: - {showFoo ? <Foo attribute="such and such stuff here" /> : <Bar short />} - Nested, and with a non-jsx consequent is the same: - {component ? ( - React.createElement(component, props) - ) : render ? ( - <div>{render(props)}</div> - ) : ( - <div>Nothing is here</div> - )} - As is a non-jsx consequent: - {showTheJSXElement ? <div>the stuff</div> : renderOtherStuff()} - But if the alternate breaks, add a newline before the closing curly brace: - {showTheThing || pleaseShowTheThing ? ( - <Foo attribute="such and such stuff here" /> - ) : ( - <Bar - attribute="such and such stuff here" - another="more stuff here" - third="and even more, hooray!" - /> - )} - When the consequent is \`null\` and the alternate breaks, hug it with parens - to match boolean behavior: - {!thing ? null : ( - <TheThing - thing={thing} - someVeryLongPropertyThatBreaksTheAlternate="hello" - /> - )} - </div> -); - -ternaryWithJSXElements.hasNoSpecialCasing = component ? ( - <div>{React.createElement(component, props)}</div> -) : render ? ( - <div>{render(props)}</div> -) : ( - <div>Nothing is here</div> -); - -jsxExpressionContainer.inJSXAttribute.hasNoSpecialCasing = ( - <Foo - withJSX={isRed ? <RedColorThing /> : <GreenColorThing />} - withJSXBroken={ - isRed || isSomeOtherLongCondition.thatBreaksTheLine() ? ( - <RedColorThing /> - ) : ( - <GreenColorThing /> - ) - } - /> -); - -================================================================================ -`; - -exports[`no-confusing-arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// no-confusing-arrow -var x = a => 1 ? 2 : 3; -var x = a <= 1 ? 2 : 3; - -=====================================output===================================== -// no-confusing-arrow -var x = (a) => (1 ? 2 : 3); -var x = a <= 1 ? 2 : 3; - -================================================================================ -`; - -exports[`postfix-ternary-regressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -// concatened string in consequent should be visually distinguishable from alternate -// … or maybe this is okay, because the colon is enough? -const avatar = has_ordered ? - 'https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-' + - numberOfCustomers + - '.jpeg' - : undefined; - -// Similarly, in the alternate: -const redirectUrl = pathName ? - pathName - : nextPathName + nextSearch || - defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks; - -// And another, more pathological case of the above: -const isEmpty = obj => - obj instanceof Date ? - false - : obj === '' || - obj === null || - obj === undefined || - obj === somethingThatIsLonger || - shallowEqual(obj, {}); - - -// Again, this case is a bit hard to distinguish the alternate. -const eventsFromOrders = - orderIds && orders ? - orderIds.map(id => ({ - type: 'order', - date: orders[id].date, - data: orders[id], - })) - : []; - -// Kinda weird to have dedents to the level of "return" in a function. -function foo() { - return !linkTo ? - false - : typeof linkTo === 'function' - ? linkTo(record, reference) - : linkToRecord(rootPath, sourceId, linkTo_as_string); -} -function foo2() { - return React.isValidElement(emptyText) - ? React.cloneElement(emptyText) - : emptyText === '' - ? ' ' // em space, forces the display of an empty line of normal height - : translate(emptyText, { _: emptyText }); -} - -// Function call ideally wouldnt break break -const matchingReferencesError = isMatchingReferencesError( - matchingReferences -) - ? translate(matchingReferences.error, { - _: matchingReferences.error, - }) - : null; - -// This one is kinda confusing any way you slice it… -const obj = { - error: - matchingReferencesError && - (!input.value || - (input.value && - selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) - ? translate('ra.input.references.all_missing', { - _: 'ra.input.references.all_missing', - }) - : null, -} - -// I think we should indent after the inner || on this, and do better wtih the parens around the && -const obj2 = { - warning: - matchingReferencesError || - (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) - ? matchingReferencesError || - translate('ra.input.references.many_missing', { - _: 'ra.input.references.many_missing', - }) - : null, -} - -// The boolean conditions in the test should look cohesive. -const selectedReferencesDataStatus = - !isEmpty(value) && typeof value === 'string' && !pattern.test(value) - ? getMessage(message, { pattern }, value, values) - : undefined - - -// Would be nice if these two nested ternaries didn't look like a single one. -resolveRedirectTo( - redirectTo, - basePath, - payload - ? payload.id || (payload.data ? payload.data.id : null) - : requestPayload - ? requestPayload.id - : null, - payload && payload.data - ? payload.data - : requestPayload && requestPayload.data - ? requestPayload.data - : null -) - -const delayedDataProvider = new Proxy(restProvider, { - get: (target, name, self) => - name === 'then' ? // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method - self - : ( - (resource, params) => - new Promise(resolve => - setTimeout( - () => - resolve( - restProvider[name](resource, params) - ), - 500 - ) - ) - ), -}); - -function foo4() { - return !match || match.length < 5 ? line : ( - match[1] + match[2] + match[3] + match[4] - ) -} - -function foo5() { - return !match || match.length < 5 ? foo(line) : ( - match[1] + match[2] + match[3] + match[4] - ) -} - -function foo6() { - return !match || match.length < 5 ? linethatisverylongandbreaksthelinehooray : ( - match[1] + match[2] + match[3] + match[4] - ) -} - -function foo7() { - return !match || match.length < 5 ? linethatisverylongandbreaksthelinehoorayjustabitlonger : ( - match[1] + match[2] + match[3] + match[4] - ) -} - -=====================================output===================================== -// concatened string in consequent should be visually distinguishable from alternate -// … or maybe this is okay, because the colon is enough? -const avatar = has_ordered - ? "https://marmelab.com/posters/avatar/longer-word-that-breaks-consequent-" + - numberOfCustomers + - ".jpeg" - : undefined; - -// Similarly, in the alternate: -const redirectUrl = pathName - ? pathName - : nextPathName + nextSearch || - defaultAuthParams.afterLoginUrl.makeThisLongerSoItBreaks; - -// And another, more pathological case of the above: -const isEmpty = (obj) => - obj instanceof Date - ? false - : obj === "" || - obj === null || - obj === undefined || - obj === somethingThatIsLonger || - shallowEqual(obj, {}); - -// Again, this case is a bit hard to distinguish the alternate. -const eventsFromOrders = - orderIds && orders - ? orderIds.map((id) => ({ - type: "order", - date: orders[id].date, - data: orders[id], - })) - : []; - -// Kinda weird to have dedents to the level of "return" in a function. -function foo() { - return !linkTo - ? false - : typeof linkTo === "function" - ? linkTo(record, reference) - : linkToRecord(rootPath, sourceId, linkTo_as_string); -} -function foo2() { - return React.isValidElement(emptyText) - ? React.cloneElement(emptyText) - : emptyText === "" - ? " " // em space, forces the display of an empty line of normal height - : translate(emptyText, { _: emptyText }); -} - -// Function call ideally wouldnt break break -const matchingReferencesError = isMatchingReferencesError(matchingReferences) - ? translate(matchingReferences.error, { - _: matchingReferences.error, - }) - : null; - -// This one is kinda confusing any way you slice it… -const obj = { - error: - matchingReferencesError && - (!input.value || - (input.value && selectedReferencesDataStatus === REFERENCES_STATUS_EMPTY)) - ? translate("ra.input.references.all_missing", { - _: "ra.input.references.all_missing", - }) - : null, -}; - -// I think we should indent after the inner || on this, and do better wtih the parens around the && -const obj2 = { - warning: - matchingReferencesError || - (input.value && selectedReferencesDataStatus !== REFERENCES_STATUS_READY) - ? matchingReferencesError || - translate("ra.input.references.many_missing", { - _: "ra.input.references.many_missing", - }) - : null, -}; - -// The boolean conditions in the test should look cohesive. -const selectedReferencesDataStatus = - !isEmpty(value) && typeof value === "string" && !pattern.test(value) - ? getMessage(message, { pattern }, value, values) - : undefined; - -// Would be nice if these two nested ternaries didn't look like a single one. -resolveRedirectTo( - redirectTo, - basePath, - payload - ? payload.id || (payload.data ? payload.data.id : null) - : requestPayload - ? requestPayload.id - : null, - payload && payload.data - ? payload.data - : requestPayload && requestPayload.data - ? requestPayload.data - : null -); - -const delayedDataProvider = new Proxy(restProvider, { - get: (target, name, self) => - name === "then" // as we await for the dataProvider, JS calls then on it. We must trap that call or else the dataProvider will be called with the then method - ? self - : (resource, params) => - new Promise((resolve) => - setTimeout(() => resolve(restProvider[name](resource, params)), 500) - ), -}); - -function foo4() { - return !match || match.length < 5 - ? line - : match[1] + match[2] + match[3] + match[4]; -} - -function foo5() { - return !match || match.length < 5 - ? foo(line) - : match[1] + match[2] + match[3] + match[4]; -} - -function foo6() { - return !match || match.length < 5 - ? linethatisverylongandbreaksthelinehooray - : match[1] + match[2] + match[3] + match[4]; -} - -function foo7() { - return !match || match.length < 5 - ? linethatisverylongandbreaksthelinehoorayjustabitlonger - : match[1] + match[2] + match[3] + match[4]; -} - -================================================================================ -`; diff --git a/tests/format/js/conditional/format.test.js b/tests/format/js/conditional/format.test.js new file mode 100644 index 000000000000..cd08c1c86c2f --- /dev/null +++ b/tests/format/js/conditional/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalTernaries: true, +}); diff --git a/tests/format/js/conditional/jsfmt.spec.js b/tests/format/js/conditional/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/conditional/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/conditional/new-ternary-examples.js b/tests/format/js/conditional/new-ternary-examples.js index 8c319faf941a..599e8df1bfc4 100644 --- a/tests/format/js/conditional/new-ternary-examples.js +++ b/tests/format/js/conditional/new-ternary-examples.js @@ -30,27 +30,28 @@ const typeofExample = definition.encode( typeof row[field] !== "undefined" ? row[field] : typeof definition.default !== "undefined" ? definition.default - : null + : null, ) : typeof row[field] !== "undefined" ? row[field] : typeof definition.default !== "undefined" ? definition.default - : null + : null; // (the following is semantically equivalent to the above, but written in a more-confusing style – it'd be hard to grok no matter the formatting) const typeofExampleFlipped = definition.encode ? definition.encode( typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null + typeof definition.default === "undefined" ? + null : definition.default - : row[field] + : row[field], ) : typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null + typeof definition.default === "undefined" ? + null : definition.default : row[field]; - // JSX Examples: const typicalLongConsequentWithNullAlternate = ( @@ -70,8 +71,10 @@ const reactRouterExampleJSX = ( {children && !isEmptyChildren(children) ? children : props.match ? - component ? React.createElement(component, props) - : render ? render(props) + component ? + React.createElement(component, props) + : render ? + render(props) : null : null} </div> @@ -87,41 +90,28 @@ const reactRouterExampleNonJSX = inJSXExpressionContainer.withLongConditionals.example = ( <div> - {( - isACat() && - (someReallyLongCondition || - moreInThisLongCondition) - ) ? - someReallyLargeExpression - .toMakeMeowNoise() - .willCauseParens() - : ( - someReallyLongCondition || - moreInThisLongCondition - ) ? + {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? + someReallyLargeExpression.toMakeMeowNoise().willCauseParens() + : someReallyLongCondition || moreInThisLongCondition ? bark() - : someReallyLargeExpression - .toMakeMeowNoise() - .willCauseParens() - } + : someReallyLargeExpression.toMakeMeowNoise().willCauseParens()} </div> ); inJSXExpressionContainer.withLoops.orBooleans.example = ( <div> {items ? - items.map((item) => ( + items.map((item) => item.display ? <Item item={item} attr="breaks ternary but not consequent" /> - : <Blank /> - )) + : <Blank />, + ) : null} - {showTheStuff && ( - foo ? + {showTheStuff && + (foo ? <Thing thing={foooooooooooooooooooooooooo} bar="bazzzzzz" /> - : <OtherThing /> - )} + : <OtherThing />)} </div> ); @@ -131,8 +121,13 @@ inJSXExpressionContainer.withNullConditional = ( {isACat() && (someReallyLongCondition || moreInThisLongCondition) ? null : ( <Foo /> )} - {isACat() && (someReallyLongCondition || moreInThisLongCondition || evenMoreInThisExtraLongConditional) ? null : ( - <Foo /> - )} + {( + isACat() && + (someReallyLongCondition || + moreInThisLongCondition || + evenMoreInThisExtraLongConditional) + ) ? + null + : <Foo />} </div> ); diff --git a/tests/format/js/conditional/new-ternary-spec.js b/tests/format/js/conditional/new-ternary-spec.js index 74e7a362ac23..4d41dd6f7541 100644 --- a/tests/format/js/conditional/new-ternary-spec.js +++ b/tests/format/js/conditional/new-ternary-spec.js @@ -10,13 +10,16 @@ const lessShort = isLoudReallyLoud() ? makeNoiseReallyLoudly.omgSoLoud() : silent(); // next, indent the consequent: -const andIndented = isLoudReallyReallyReallyReallyLoud() ? +const andIndented = + isLoudReallyReallyReallyReallyLoud() ? makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() : silent(); // unless the consequent is short (less than ten characters long): -const shortSoCase = isLoudReallyReallyReallyReallyLoud() ? silent() - : makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud(); +const shortSoCase = + isLoudReallyReallyReallyReallyLoud() ? silent() : ( + makeNoiseReallyReallyReallyReallyReallyLoudly.omgSoLoud() + ); // if chained, always break and put after the = const chainedShort = @@ -86,7 +89,8 @@ const mostlyShort = : "idk"; // long conditional, short consequent/alternate, not chained - do indent after ? -const longConditional = ( +const longConditional = + ( bifornCringerMoshedPerplexSawder === 2 / askTrovenaBeenaDependsRowans && glimseGlyphsHazardNoopsTieTie >= averredBathersBoxroomBuggyNurl().anodyneCondosMalateOverateRetinol() @@ -112,9 +116,10 @@ definition.encode( : typeof definition.default !== "undefined" ? definition.default : null, typeof row[field] === "undefined" ? - typeof definition.default === "undefined" ? null + typeof definition.default === "undefined" ? + null : definition.default - : row[field] + : row[field], ); // In a return, break and over-indent: diff --git a/tests/format/js/conditional/postfix-ternary-regressions.js b/tests/format/js/conditional/postfix-ternary-regressions.js index 3d1f9ce7ecd8..f21af9133485 100644 --- a/tests/format/js/conditional/postfix-ternary-regressions.js +++ b/tests/format/js/conditional/postfix-ternary-regressions.js @@ -148,3 +148,18 @@ function foo7() { match[1] + match[2] + match[3] + match[4] ) } + +const badComments = + schema.model ? schema + // If model is an array where the items schema is a referred model then we need to use that + : schema.type === 'array' ? schema.items + : schema; + +const anotherBadComment = + refModel ? + // If we're in a shared params file then reference the model name directly + inSharedParamsFile ? refModel + // If we're not in a shared params file then reference the in-file type + : classRef() + // We don't have a model name, use the in-file name + : classRef() diff --git a/tests/format/js/cursor/__snapshots__/format.test.js.snap b/tests/format/js/cursor/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6ccf97c5a279 --- /dev/null +++ b/tests/format/js/cursor/__snapshots__/format.test.js.snap @@ -0,0 +1,671 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments-1.js format 1`] = ` +====================================options===================================== +cursorOffset: 7 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// hi l<|>ol +function ehllooo () { + const hi = "hi" +} + +=====================================output===================================== +// hi l<|>ol +function ehllooo() { + const hi = "hi"; +} + +================================================================================ +`; + +exports[`comments-2.js format 1`] = ` +====================================options===================================== +cursorOffset: 0 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<|> +// howdy +// hi lol +const y = 5 + +=====================================output===================================== +<|>// howdy +// hi lol +const y = 5; + +================================================================================ +`; + +exports[`comments-3.js format 1`] = ` +====================================options===================================== +cursorOffset: 1 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +/<|>/ howdy +// hi lol +const y = 5 + +=====================================output===================================== +/<|>/ howdy +// hi lol +const y = 5; + +================================================================================ +`; + +exports[`comments-4.js format 1`] = ` +====================================options===================================== +cursorOffset: 44 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// howdy +// hi lol +const y = 5 +// traling! <|> + +=====================================output===================================== +// howdy +// hi lol +const y = 5; +// traling!<|> + +================================================================================ +`; + +exports[`cursor-0.js format 1`] = ` +====================================options===================================== +cursorOffset: 27 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +(function() {return <|> 15})() + +=====================================output===================================== +(function () { + return <|>15; +})(); + +================================================================================ +`; + +exports[`cursor-1.js format 1`] = ` +====================================options===================================== +cursorOffset: 26 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +(function(){return <|>15})() + +=====================================output===================================== +(function () { + return <|>15; +})(); + +================================================================================ +`; + +exports[`cursor-2.js format 1`] = ` +====================================options===================================== +cursorOffset: 6 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +foo <|> (bar); + +=====================================output===================================== +foo<|>(bar); + +================================================================================ +`; + +exports[`cursor-3.js format 1`] = ` +====================================options===================================== +cursorOffset: 4 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + <|> + + const y = 5 + +=====================================output===================================== +<|>const y = 5; + +================================================================================ +`; + +exports[`cursor-4.js format 1`] = ` +====================================options===================================== +cursorOffset: 19 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + const y = 5 + + <|> + + const z = 9 + +=====================================output===================================== +const y = 5; + +<|>const z = 9; + +================================================================================ +`; + +exports[`cursor-5.js format 1`] = ` +====================================options===================================== +cursorOffset: 13 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const /* h<|>i */ y = 5 + +=====================================output===================================== +const /* h<|>i */ y = 5; + +================================================================================ +`; + +exports[`cursor-6.js format 1`] = ` +====================================options===================================== +cursorOffset: 20 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const y /* h<|>i */ = 5 + +=====================================output===================================== +const y /* h<|>i */ = 5; + +================================================================================ +`; + +exports[`cursor-7.js format 1`] = ` +====================================options===================================== +cursorOffset: 12 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const y = 5 +<|> + +const z = 9 + +=====================================output===================================== +const y = 5; +<|> +const z = 9; + +================================================================================ +`; + +exports[`cursor-8.js format 1`] = ` +====================================options===================================== +cursorOffset: 6 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + func<|>tion banana(){} +=====================================output===================================== +func<|>tion banana() {} + +================================================================================ +`; + +exports[`cursor-9.js format 1`] = ` +====================================options===================================== +cursorOffset: 26 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + thisWillBeFormatted <|> (2 ,3, ) +=====================================output===================================== +thisWillBeFormatted<|>(2, 3); + +================================================================================ +`; + +exports[`cursor-10.js format 1`] = ` +====================================options===================================== +cursorOffset: 16 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const y = 5 + + + + +<|> + +=====================================output===================================== +const y = 5; +<|> +================================================================================ +`; + +exports[`cursor-11.js format 1`] = ` +====================================options===================================== +cursorOffset: 57 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + [ + [ + [ + 1, + 2, + <|> 3, "looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ] + ] + ] +] + +=====================================output===================================== +[ + [ + [ + [ + 1, + 2, + <|>3, + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ], + ], + ], +]; + +================================================================================ +`; + +exports[`cursor-12.js format 1`] = ` +====================================options===================================== +cursorOffset: 330 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// At the time of adding this test, the cursor positioning we end up with +// here seems clearly wrong. +// I'm adding the test case anyway to demonstrate the brokenness and ensure +// that if a future changes fixes it, it'll be obvious from the PR diff that +// the fix happened. +[ + [ + [ + [ + 1, + 2, + 3 <|> ,"looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ] + ] + ] +] + +=====================================output===================================== +// At the time of adding this test, the cursor positioning we end up with +// here seems clearly wrong. +// I'm adding the test case anyway to demonstrate the brokenness and ensure +// that if a future changes fixes it, it'll be obvious from the PR diff that +// the fix happened. +[ + [ + [ + [ + 1, + 2, + 3, + <|> "looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ], + ], + ], +]; + +================================================================================ +`; + +exports[`cursor-13.js format 1`] = ` +====================================options===================================== +cursorOffset: 84 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + import lib from './lib.js'; + + function myFunction() { return 'foo'; }<|> + +=====================================output===================================== +import lib from "./lib.js"; + +function myFunction() { + return "foo"; +}<|> + +================================================================================ +`; + +exports[`cursor-emoji.js format 1`] = ` +====================================options===================================== +cursorOffset: 9 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +"😀😀😀😀<|>" + +=====================================output===================================== +"😀😀😀😀<|>"; + +================================================================================ +`; + +exports[`file-start-with-comment-1.js format 1`] = ` +====================================options===================================== +cursorOffset: 5 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// hi<|> lol +haha() + +=====================================output===================================== +// hi<|> lol +haha(); + +================================================================================ +`; + +exports[`file-start-with-comment-2.js format 1`] = ` +====================================options===================================== +cursorOffset: 16 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// hi lol +haha()<|> + +=====================================output===================================== +// hi lol +haha()<|>; + +================================================================================ +`; + +exports[`file-start-with-comment-3.js format 1`] = ` +====================================options===================================== +cursorOffset: 127 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// All messages are represented in JSON. +// So, the prettier.py controls a subprocess which spawns "node {this_file}". +import {<|> } from "fs" + +=====================================output===================================== +// All messages are represented in JSON. +// So, the prettier.py controls a subprocess which spawns "node {this_file}". +import {<|>} from "fs"; + +================================================================================ +`; + +exports[`range-0.js format 1`] = ` +====================================options===================================== +cursorOffset: 56 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 72 +rangeStart: 31 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted ( 1 ,3) + 2 | +> 3 | thisWillBeFormatted <|> (2 ,3, ) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^ +> 5 | thisWontBeFormatted (2, 90 ,) + | ^ + 6 | +=====================================output===================================== +thisWontBeFormatted ( 1 ,3) + + thisWillBeFormatted<|>(2, 3); + + thisWontBeFormatted (2, 90 ,) + +================================================================================ +`; + +exports[`range-1.js format 1`] = ` +====================================options===================================== +cursorOffset: 64 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 72 +rangeStart: 31 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted ( 1 ,3) + 2 | +> 3 | thisWillBeFormatted (2 ,3<|>, ) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^ +> 5 | thisWontBeFormatted (2, 90 ,) + | ^ + 6 | +=====================================output===================================== +thisWontBeFormatted ( 1 ,3) + + thisWillBeFormatted(2, 3<|>); + + thisWontBeFormatted (2, 90 ,) + +================================================================================ +`; + +exports[`range-2.js format 1`] = ` +====================================options===================================== +cursorOffset: 67 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 72 +rangeStart: 31 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted ( 1 ,3) + 2 | +> 3 | thisWillBeFormatted (2 ,3, <|> ) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^ +> 5 | thisWontBeFormatted (2, 90 ,) + | ^ + 6 | +=====================================output===================================== +thisWontBeFormatted ( 1 ,3) + + thisWillBeFormatted(2, 3<|>); + + thisWontBeFormatted (2, 90 ,) + +================================================================================ +`; + +exports[`range-3.js format 1`] = ` +====================================options===================================== +cursorOffset: 20 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 72 +rangeStart: 30 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted <|> ( 1 ,3) +> 2 | + | ^ +> 3 | thisWillBeFormatted (2 ,3, ) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 5 | thisWontBeFormatted (2, 90 ,) + | ^ + 6 | +=====================================output===================================== +thisWontBeFormatted <|> ( 1 ,3) + + thisWillBeFormatted(2, 3); + + thisWontBeFormatted (2, 90 ,) + +================================================================================ +`; + +exports[`range-4.js format 1`] = ` +====================================options===================================== +cursorOffset: 101 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 75 +rangeStart: 31 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted ( 1 ,3) + 2 | +> 3 | thisWillBeFormatted (2 ,3, ) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^ +> 5 | thisWontBeFormatted (2, 9<|>0 ,) + | ^^^^ + 6 | +=====================================output===================================== +thisWontBeFormatted ( 1 ,3) + + thisWillBeFormatted(2, 3); + + thisWontBeFormatted (2, 9<|>0 ,) + +================================================================================ +`; + +exports[`range-5.js format 1`] = ` +====================================options===================================== +cursorOffset: 23 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 23 +rangeStart: 14 + | | printWidth +=====================================input====================================== +> 1 | const myVar = aFunction<|> + | ^^^^^^^^^ + 2 | +=====================================output===================================== +const myVar = aFunction<|>; + +================================================================================ +`; + +exports[`range-6.js format 1`] = ` +====================================options===================================== +cursorOffset: 24 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 24 +rangeStart: 14 + | | printWidth +=====================================input====================================== +> 1 | const myVar = aFunction;<|> + | ^^^^^^^^^^ + 2 | +=====================================output===================================== +const myVar = aFunction;<|> + +================================================================================ +`; + +exports[`range-7.js format 1`] = ` +====================================options===================================== +cursorOffset: 23 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 24 +rangeStart: 14 + | | printWidth +=====================================input====================================== +> 1 | const myVar = aFunction<|>; + | ^^^^^^^^^^^^^ + 2 | +=====================================output===================================== +const myVar = aFunction<|>; + +================================================================================ +`; + +exports[`range-8.js format 1`] = ` +====================================options===================================== +cursorOffset: 69 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 +rangeEnd: 72 +rangeStart: 30 + | | printWidth +=====================================input====================================== + 1 | thisWontBeFormatted ( 1 ,3) +> 2 | + | ^ +> 3 | thisWillBeFormatted (2 ,3, )<|> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 4 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 5 | thisWontBeFormatted (2, 90 ,) + | ^ + 6 | +=====================================output===================================== +thisWontBeFormatted ( 1 ,3) + + thisWillBeFormatted(2, 3)<|>; + + thisWontBeFormatted (2, 90 ,) + +================================================================================ +`; diff --git a/tests/format/js/cursor/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/cursor/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0690c25f0089..000000000000 --- a/tests/format/js/cursor/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,530 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments-1.js format 1`] = ` -====================================options===================================== -cursorOffset: 7 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// hi l<|>ol -function ehllooo () { - const hi = "hi" -} - -=====================================output===================================== -// hi l<|>ol -function ehllooo() { - const hi = "hi"; -} - -================================================================================ -`; - -exports[`comments-2.js format 1`] = ` -====================================options===================================== -cursorOffset: 0 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -<|> -// howdy -// hi lol -const y = 5 - -=====================================output===================================== -<|>// howdy -// hi lol -const y = 5; - -================================================================================ -`; - -exports[`comments-3.js format 1`] = ` -====================================options===================================== -cursorOffset: 1 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -/<|>/ howdy -// hi lol -const y = 5 - -=====================================output===================================== -/<|>/ howdy -// hi lol -const y = 5; - -================================================================================ -`; - -exports[`comments-4.js format 1`] = ` -====================================options===================================== -cursorOffset: 44 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// howdy -// hi lol -const y = 5 -// traling! <|> - -=====================================output===================================== -// howdy -// hi lol -const y = 5; -// traling!<|> - -================================================================================ -`; - -exports[`cursor-0.js format 1`] = ` -====================================options===================================== -cursorOffset: 27 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -(function() {return <|> 15})() - -=====================================output===================================== -(function () { - return <|>15; -})(); - -================================================================================ -`; - -exports[`cursor-1.js format 1`] = ` -====================================options===================================== -cursorOffset: 26 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -(function(){return <|>15})() - -=====================================output===================================== -(function () { - return <|>15; -})(); - -================================================================================ -`; - -exports[`cursor-2.js format 1`] = ` -====================================options===================================== -cursorOffset: 6 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - -foo <|> (bar); - -=====================================output===================================== -foo<|>(bar); - -================================================================================ -`; - -exports[`cursor-3.js format 1`] = ` -====================================options===================================== -cursorOffset: 4 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - <|> - - const y = 5 - -=====================================output===================================== -<|>const y = 5; - -================================================================================ -`; - -exports[`cursor-4.js format 1`] = ` -====================================options===================================== -cursorOffset: 19 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - - - const y = 5 - - <|> - - const z = 9 - -=====================================output===================================== -const y = 5; - -<|>const z = 9; - -================================================================================ -`; - -exports[`cursor-5.js format 1`] = ` -====================================options===================================== -cursorOffset: 13 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const /* h<|>i */ y = 5 - -=====================================output===================================== -const /* h<|>i */ y = 5; - -================================================================================ -`; - -exports[`cursor-6.js format 1`] = ` -====================================options===================================== -cursorOffset: 20 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const y /* h<|>i */ = 5 - -=====================================output===================================== -const y /* h<|>i */ = 5; - -================================================================================ -`; - -exports[`cursor-7.js format 1`] = ` -====================================options===================================== -cursorOffset: 12 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const y = 5 -<|> - -const z = 9 - -=====================================output===================================== -const y = 5; -<|> -const z = 9; - -================================================================================ -`; - -exports[`cursor-8.js format 1`] = ` -====================================options===================================== -cursorOffset: 6 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - func<|>tion banana(){} -=====================================output===================================== -func<|>tion banana() {} - -================================================================================ -`; - -exports[`cursor-9.js format 1`] = ` -====================================options===================================== -cursorOffset: 26 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - thisWillBeFormatted <|> (2 ,3, ) -=====================================output===================================== -thisWillBeFormatted<|>(2, 3); - -================================================================================ -`; - -exports[`cursor-10.js format 1`] = ` -====================================options===================================== -cursorOffset: 16 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const y = 5 - - - - -<|> - -=====================================output===================================== -const y = 5; -<|> -================================================================================ -`; - -exports[`file-start-with-comment-1.js format 1`] = ` -====================================options===================================== -cursorOffset: 5 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// hi<|> lol -haha() - -=====================================output===================================== -// hi<|> lol -haha(); - -================================================================================ -`; - -exports[`file-start-with-comment-2.js format 1`] = ` -====================================options===================================== -cursorOffset: 16 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// hi lol -haha()<|> - -=====================================output===================================== -// hi lol -haha()<|>; - -================================================================================ -`; - -exports[`range-0.js format 1`] = ` -====================================options===================================== -cursorOffset: 56 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 72 -rangeStart: 31 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted ( 1 ,3) - 2 | -> 3 | thisWillBeFormatted <|> (2 ,3, ) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^ -> 5 | thisWontBeFormatted (2, 90 ,) - | ^ - 6 | -=====================================output===================================== -thisWontBeFormatted ( 1 ,3) - - thisWillBeFormatted<|>(2, 3); - - thisWontBeFormatted (2, 90 ,) - -================================================================================ -`; - -exports[`range-1.js format 1`] = ` -====================================options===================================== -cursorOffset: 64 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 72 -rangeStart: 31 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted ( 1 ,3) - 2 | -> 3 | thisWillBeFormatted (2 ,3<|>, ) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^ -> 5 | thisWontBeFormatted (2, 90 ,) - | ^ - 6 | -=====================================output===================================== -thisWontBeFormatted ( 1 ,3) - - thisWillBeFormatted(2, 3<|>); - - thisWontBeFormatted (2, 90 ,) - -================================================================================ -`; - -exports[`range-2.js format 1`] = ` -====================================options===================================== -cursorOffset: 67 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 72 -rangeStart: 31 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted ( 1 ,3) - 2 | -> 3 | thisWillBeFormatted (2 ,3, <|> ) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^ -> 5 | thisWontBeFormatted (2, 90 ,) - | ^ - 6 | -=====================================output===================================== -thisWontBeFormatted ( 1 ,3) - - thisWillBeFormatted(2, 3<|>); - - thisWontBeFormatted (2, 90 ,) - -================================================================================ -`; - -exports[`range-3.js format 1`] = ` -====================================options===================================== -cursorOffset: 20 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 72 -rangeStart: 30 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted <|> ( 1 ,3) -> 2 | - | ^ -> 3 | thisWillBeFormatted (2 ,3, ) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 5 | thisWontBeFormatted (2, 90 ,) - | ^ - 6 | -=====================================output===================================== -thisWontBeFormatted <|> ( 1 ,3) - - thisWillBeFormatted(2, 3); - - thisWontBeFormatted (2, 90 ,) - -================================================================================ -`; - -exports[`range-4.js format 1`] = ` -====================================options===================================== -cursorOffset: 101 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 75 -rangeStart: 31 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted ( 1 ,3) - 2 | -> 3 | thisWillBeFormatted (2 ,3, ) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^ -> 5 | thisWontBeFormatted (2, 9<|>0 ,) - | ^^^^ - 6 | -=====================================output===================================== -thisWontBeFormatted ( 1 ,3) - - thisWillBeFormatted(2, 3); - - thisWontBeFormatted (2, 9<|>0 ,) - -================================================================================ -`; - -exports[`range-5.js format 1`] = ` -====================================options===================================== -cursorOffset: 23 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 23 -rangeStart: 14 - | | printWidth -=====================================input====================================== -> 1 | const myVar = aFunction<|> - | ^^^^^^^^^ - 2 | -=====================================output===================================== -const myVar = aFunction<|>; - -================================================================================ -`; - -exports[`range-6.js format 1`] = ` -====================================options===================================== -cursorOffset: 24 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 24 -rangeStart: 14 - | | printWidth -=====================================input====================================== -> 1 | const myVar = aFunction;<|> - | ^^^^^^^^^^ - 2 | -=====================================output===================================== -const myVar = aFunction;<|> - -================================================================================ -`; - -exports[`range-7.js format 1`] = ` -====================================options===================================== -cursorOffset: 23 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 24 -rangeStart: 14 - | | printWidth -=====================================input====================================== -> 1 | const myVar = aFunction<|>; - | ^^^^^^^^^^^^^ - 2 | -=====================================output===================================== -const myVar = aFunction<|>; - -================================================================================ -`; - -exports[`range-8.js format 1`] = ` -====================================options===================================== -cursorOffset: 69 -parsers: ["babel", "typescript", "flow"] -printWidth: 80 -rangeEnd: 72 -rangeStart: 30 - | | printWidth -=====================================input====================================== - 1 | thisWontBeFormatted ( 1 ,3) -> 2 | - | ^ -> 3 | thisWillBeFormatted (2 ,3, )<|> - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> 5 | thisWontBeFormatted (2, 90 ,) - | ^ - 6 | -=====================================output===================================== -thisWontBeFormatted ( 1 ,3) - - thisWillBeFormatted(2, 3)<|>; - - thisWontBeFormatted (2, 90 ,) - -================================================================================ -`; diff --git a/tests/format/js/cursor/cursor-11.js b/tests/format/js/cursor/cursor-11.js new file mode 100644 index 000000000000..04e14cdec975 --- /dev/null +++ b/tests/format/js/cursor/cursor-11.js @@ -0,0 +1,12 @@ +[ + [ + [ + [ + 1, + 2, + <|> 3, "looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ] + ] + ] +] diff --git a/tests/format/js/cursor/cursor-12.js b/tests/format/js/cursor/cursor-12.js new file mode 100644 index 000000000000..4189afdbc86f --- /dev/null +++ b/tests/format/js/cursor/cursor-12.js @@ -0,0 +1,17 @@ +// At the time of adding this test, the cursor positioning we end up with +// here seems clearly wrong. +// I'm adding the test case anyway to demonstrate the brokenness and ensure +// that if a future changes fixes it, it'll be obvious from the PR diff that +// the fix happened. +[ + [ + [ + [ + 1, + 2, + 3 <|> ,"looooooooooooooooooooooooooooooooooooooooooooooooooong", + "looooooooooooooooooooooooooooooooooooooooooooooooooong", + ] + ] + ] +] diff --git a/tests/format/js/cursor/cursor-13.js b/tests/format/js/cursor/cursor-13.js new file mode 100644 index 000000000000..fce7e1b0cc10 --- /dev/null +++ b/tests/format/js/cursor/cursor-13.js @@ -0,0 +1,3 @@ + import lib from './lib.js'; + + function myFunction() { return 'foo'; }<|> diff --git a/tests/format/js/cursor/cursor-emoji.js b/tests/format/js/cursor/cursor-emoji.js new file mode 100644 index 000000000000..c1a8863d5150 --- /dev/null +++ b/tests/format/js/cursor/cursor-emoji.js @@ -0,0 +1 @@ +"😀😀😀😀<|>" diff --git a/tests/format/js/cursor/file-start-with-comment-3.js b/tests/format/js/cursor/file-start-with-comment-3.js new file mode 100644 index 000000000000..f90242103084 --- /dev/null +++ b/tests/format/js/cursor/file-start-with-comment-3.js @@ -0,0 +1,3 @@ +// All messages are represented in JSON. +// So, the prettier.py controls a subprocess which spawns "node {this_file}". +import {<|> } from "fs" diff --git a/tests/format/js/cursor/format.test.js b/tests/format/js/cursor/format.test.js new file mode 100644 index 000000000000..37a3eec0cee4 --- /dev/null +++ b/tests/format/js/cursor/format.test.js @@ -0,0 +1,84 @@ +import { outdent } from "outdent"; +import getPrettier from "../../../config/get-prettier.js"; + +runFormatTest(import.meta, ["babel", "typescript", "flow"]); + +let prettier; +beforeAll(async () => { + prettier = await getPrettier(); +}); + +test("translates cursor correctly in basic case", async () => { + expect( + await prettier.formatWithCursor(" 1", { parser: "babel", cursorOffset: 2 }), + ).toMatchObject({ + formatted: "1;\n", + cursorOffset: 1, + }); +}); + +test("positions cursor relative to closest node, not SourceElement", async () => { + const code = "return 15"; + expect( + await prettier.formatWithCursor(code, { + parser: "babel", + cursorOffset: 15, + }), + ).toMatchObject({ + formatted: "return 15;\n", + cursorOffset: 7, + }); +}); + +test("keeps cursor inside formatted node", async () => { + const code = "return 15"; + expect( + await prettier.formatWithCursor(code, { + parser: "babel", + cursorOffset: 14, + }), + ).toMatchObject({ + formatted: "return 15;\n", + cursorOffset: 7, + }); +}); + +test("doesn't insert second placeholder for nonexistent TypeAnnotation", async () => { + const code = + "\n" + + outdent` + foo('bar', cb => { + console.log('stuff') + }) + `; + expect( + await prettier.formatWithCursor(code, { + parser: "babel", + cursorOffset: 24, + }), + ).toMatchObject({ + formatted: + outdent` + foo("bar", (cb) => { + console.log("stuff"); + }); + ` + "\n", + cursorOffset: 25, + }); +}); + +test("cursorOffset === rangeStart", async () => { + const code = "1.0000\n2.0000\n3.0000"; + + expect( + await prettier.formatWithCursor(code, { + parser: "babel", + cursorOffset: 7, + rangeStart: 7, + rangeEnd: 8, + }), + ).toMatchObject({ + formatted: "1.0000\n2.0;\n3.0000", + cursorOffset: 7, + }); +}); diff --git a/tests/format/js/cursor/jsfmt.spec.js b/tests/format/js/cursor/jsfmt.spec.js deleted file mode 100644 index 499d7e225cc7..000000000000 --- a/tests/format/js/cursor/jsfmt.spec.js +++ /dev/null @@ -1,70 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); - -const prettier = require("prettier-local"); -const { outdent } = require("outdent"); - -test("translates cursor correctly in basic case", () => { - expect( - prettier.formatWithCursor(" 1", { parser: "babel", cursorOffset: 2 }) - ).toMatchObject({ - formatted: "1;\n", - cursorOffset: 1, - }); -}); - -test("positions cursor relative to closest node, not SourceElement", () => { - const code = "return 15"; - expect( - prettier.formatWithCursor(code, { parser: "babel", cursorOffset: 15 }) - ).toMatchObject({ - formatted: "return 15;\n", - cursorOffset: 7, - }); -}); - -test("keeps cursor inside formatted node", () => { - const code = "return 15"; - expect( - prettier.formatWithCursor(code, { parser: "babel", cursorOffset: 14 }) - ).toMatchObject({ - formatted: "return 15;\n", - cursorOffset: 7, - }); -}); - -test("doesn't insert second placeholder for nonexistent TypeAnnotation", () => { - const code = - "\n" + - outdent` - foo('bar', cb => { - console.log('stuff') - }) - `; - expect( - prettier.formatWithCursor(code, { parser: "babel", cursorOffset: 24 }) - ).toMatchObject({ - formatted: - outdent` - foo("bar", (cb) => { - console.log("stuff"); - }); - ` + "\n", - cursorOffset: 25, - }); -}); - -test("cursorOffset === rangeStart", () => { - const code = "1.0000\n2.0000\n3.0000"; - - expect( - prettier.formatWithCursor(code, { - parser: "babel", - cursorOffset: 7, - rangeStart: 7, - rangeEnd: 8, - }) - ).toMatchObject({ - formatted: "1.0000\n2.0;\n3.0000", - cursorOffset: 7, - }); -}); diff --git a/tests/format/js/cursor/require-pragma/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/cursor/require-pragma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/cursor/require-pragma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/cursor/require-pragma/__snapshots__/format.test.js.snap diff --git a/tests/format/js/cursor/require-pragma/format.test.js b/tests/format/js/cursor/require-pragma/format.test.js new file mode 100644 index 000000000000..815a597791ac --- /dev/null +++ b/tests/format/js/cursor/require-pragma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"], { + requirePragma: true, +}); diff --git a/tests/format/js/cursor/require-pragma/jsfmt.spec.js b/tests/format/js/cursor/require-pragma/jsfmt.spec.js deleted file mode 100644 index 391b481e70ef..000000000000 --- a/tests/format/js/cursor/require-pragma/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"], { requirePragma: true }); diff --git a/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap b/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c6bcfecb48ee --- /dev/null +++ b/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap @@ -0,0 +1,796 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`basic.js [espree] format 1`] = ` +"Unexpected token bar (2:12) + 1 | class Foo { +> 2 | accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token bar" +`; + +exports[`basic.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`basic.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token bar (2:12) + 1 | class Foo { +> 2 | accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token bar" +`; + +exports[`basic.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + accessor bar; +} + +=====================================output===================================== +class Foo { + accessor bar +} + +================================================================================ +`; + +exports[`basic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor bar; +} + +=====================================output===================================== +class Foo { + accessor bar; +} + +================================================================================ +`; + +exports[`comments.js [acorn] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class A { +> 2 | @dec() + | ^ + 3 | // comment + 4 | accessor b; + 5 | } +Cause: Unexpected character '@' (2:2)" +`; + +exports[`comments.js [espree] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class A { +> 2 | @dec() + | ^ + 3 | // comment + 4 | accessor b; + 5 | } +Cause: Unexpected character '@'" +`; + +exports[`comments.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class A { +> 2 | @dec() + | ^ + 3 | // comment + 4 | accessor b; + 5 | } +Cause: Unexpected character '@' (2:2)" +`; + +exports[`comments.js - {"semi":false} [espree] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class A { +> 2 | @dec() + | ^ + 3 | // comment + 4 | accessor b; + 5 | } +Cause: Unexpected character '@'" +`; + +exports[`comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + @dec() + // comment + accessor b; +} + +=====================================output===================================== +class A { + @dec() + // comment + accessor b +} + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + @dec() + // comment + accessor b; +} + +=====================================output===================================== +class A { + @dec() + // comment + accessor b; +} + +================================================================================ +`; + +exports[`computed.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`computed.js [espree] format 1`] = ` +"Unexpected token [ (2:12) + 1 | class Foo { +> 2 | accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token [" +`; + +exports[`computed.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`computed.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token [ (2:12) + 1 | class Foo { +> 2 | accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token [" +`; + +exports[`computed.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + accessor ["bar"]; +} + +=====================================output===================================== +class Foo { + accessor ["bar"] +} + +================================================================================ +`; + +exports[`computed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor ["bar"]; +} + +=====================================output===================================== +class Foo { + accessor ["bar"]; +} + +================================================================================ +`; + +exports[`not-accessor-method.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + accessor() {} +} + +=====================================output===================================== +class Foo { + accessor() {} +} + +================================================================================ +`; + +exports[`not-accessor-method.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor() {} +} + +=====================================output===================================== +class Foo { + accessor() {} +} + +================================================================================ +`; + +exports[`not-accessor-property.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + accessor = 123; +} + +=====================================output===================================== +class Foo { + accessor = 123 +} + +================================================================================ +`; + +exports[`not-accessor-property.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor = 123; +} + +=====================================output===================================== +class Foo { + accessor = 123; +} + +================================================================================ +`; + +exports[`private.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`private.js [espree] format 1`] = ` +"Unexpected token #bar (2:12) + 1 | class Foo { +> 2 | accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token #bar" +`; + +exports[`private.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class Foo { +> 2 | accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:11)" +`; + +exports[`private.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token #bar (2:12) + 1 | class Foo { +> 2 | accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token #bar" +`; + +exports[`private.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + accessor #bar; +} + +=====================================output===================================== +class Foo { + accessor #bar +} + +================================================================================ +`; + +exports[`private.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor #bar; +} + +=====================================output===================================== +class Foo { + accessor #bar; +} + +================================================================================ +`; + +exports[`static.js [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static.js [espree] format 1`] = ` +"Unexpected token bar (2:19) + 1 | class Foo { +> 2 | static accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token bar" +`; + +exports[`static.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token bar (2:19) + 1 | class Foo { +> 2 | static accessor bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token bar" +`; + +exports[`static.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + static accessor bar; +} + +=====================================output===================================== +class Foo { + static accessor bar +} + +================================================================================ +`; + +exports[`static.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + static accessor bar; +} + +=====================================output===================================== +class Foo { + static accessor bar; +} + +================================================================================ +`; + +exports[`static-computed.js [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static-computed.js [espree] format 1`] = ` +"Unexpected token [ (2:19) + 1 | class Foo { +> 2 | static accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token [" +`; + +exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static-computed.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token [ (2:19) + 1 | class Foo { +> 2 | static accessor ["bar"]; + | ^ + 3 | } + 4 | +Cause: Unexpected token [" +`; + +exports[`static-computed.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + static accessor ["bar"]; +} + +=====================================output===================================== +class Foo { + static accessor ["bar"] +} + +================================================================================ +`; + +exports[`static-computed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + static accessor ["bar"]; +} + +=====================================output===================================== +class Foo { + static accessor ["bar"]; +} + +================================================================================ +`; + +exports[`static-private.js [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static-private.js [espree] format 1`] = ` +"Unexpected token #bar (2:19) + 1 | class Foo { +> 2 | static accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token #bar" +`; + +exports[`static-private.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:19) + 1 | class Foo { +> 2 | static accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token (2:18)" +`; + +exports[`static-private.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token #bar (2:19) + 1 | class Foo { +> 2 | static accessor #bar; + | ^ + 3 | } + 4 | +Cause: Unexpected token #bar" +`; + +exports[`static-private.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo { + static accessor #bar; +} + +=====================================output===================================== +class Foo { + static accessor #bar +} + +================================================================================ +`; + +exports[`static-private.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + static accessor #bar; +} + +=====================================output===================================== +class Foo { + static accessor #bar; +} + +================================================================================ +`; + +exports[`with-semicolon-1.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | [foo]() {} + 4 | } + 5 | +Cause: Unexpected token (2:11)" +`; + +exports[`with-semicolon-1.js [espree] format 1`] = ` +"Unexpected token clicked (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | [foo]() {} + 4 | } + 5 | +Cause: Unexpected token clicked" +`; + +exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | [foo]() {} + 4 | } + 5 | +Cause: Unexpected token (2:11)" +`; + +exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token clicked (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | [foo]() {} + 4 | } + 5 | +Cause: Unexpected token clicked" +`; + +exports[`with-semicolon-1.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class C { + accessor clicked = "value"; + [foo]() {} +} + +=====================================output===================================== +class C { + accessor clicked = "value"; + [foo]() {} +} + +================================================================================ +`; + +exports[`with-semicolon-1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + accessor clicked = "value"; + [foo]() {} +} + +=====================================output===================================== +class C { + accessor clicked = "value"; + [foo]() {} +} + +================================================================================ +`; + +exports[`with-semicolon-2.js [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | *foo() {} + 4 | } + 5 | +Cause: Unexpected token (2:11)" +`; + +exports[`with-semicolon-2.js [espree] format 1`] = ` +"Unexpected token clicked (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | *foo() {} + 4 | } + 5 | +Cause: Unexpected token clicked" +`; + +exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | *foo() {} + 4 | } + 5 | +Cause: Unexpected token (2:11)" +`; + +exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token clicked (2:12) + 1 | class C { +> 2 | accessor clicked = "value"; + | ^ + 3 | *foo() {} + 4 | } + 5 | +Cause: Unexpected token clicked" +`; + +exports[`with-semicolon-2.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class C { + accessor clicked = "value"; + *foo() {} +} + +=====================================output===================================== +class C { + accessor clicked = "value"; + *foo() {} +} + +================================================================================ +`; + +exports[`with-semicolon-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + accessor clicked = "value"; + *foo() {} +} + +=====================================output===================================== +class C { + accessor clicked = "value"; + *foo() {} +} + +================================================================================ +`; diff --git a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2263bc534b61..000000000000 --- a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,760 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`basic.js [espree] format 1`] = ` -"Unexpected token bar (2:12) - 1 | class Foo { -> 2 | accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`basic.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`basic.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token bar (2:12) - 1 | class Foo { -> 2 | accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`basic.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor bar; -} - -=====================================output===================================== -class Foo { - accessor bar -} - -================================================================================ -`; - -exports[`basic.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor bar; -} - -=====================================output===================================== -class Foo { - accessor bar; -} - -================================================================================ -`; - -exports[`comments.js [acorn] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class A { -> 2 | @dec() - | ^ - 3 | // comment - 4 | accessor b; - 5 | }" -`; - -exports[`comments.js [espree] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class A { -> 2 | @dec() - | ^ - 3 | // comment - 4 | accessor b; - 5 | }" -`; - -exports[`comments.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class A { -> 2 | @dec() - | ^ - 3 | // comment - 4 | accessor b; - 5 | }" -`; - -exports[`comments.js - {"semi":false} [espree] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class A { -> 2 | @dec() - | ^ - 3 | // comment - 4 | accessor b; - 5 | }" -`; - -exports[`comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - @dec() - // comment - accessor b; -} - -=====================================output===================================== -class A { - @dec() - // comment - accessor b -} - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - @dec() - // comment - accessor b; -} - -=====================================output===================================== -class A { - @dec() - // comment - accessor b; -} - -================================================================================ -`; - -exports[`computed.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`computed.js [espree] format 1`] = ` -"Unexpected token [ (2:12) - 1 | class Foo { -> 2 | accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`computed.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`computed.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token [ (2:12) - 1 | class Foo { -> 2 | accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`computed.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor ["bar"]; -} - -=====================================output===================================== -class Foo { - accessor ["bar"] -} - -================================================================================ -`; - -exports[`computed.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor ["bar"]; -} - -=====================================output===================================== -class Foo { - accessor ["bar"]; -} - -================================================================================ -`; - -exports[`not-accessor-method.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor() {} -} - -=====================================output===================================== -class Foo { - accessor() {} -} - -================================================================================ -`; - -exports[`not-accessor-method.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor() {} -} - -=====================================output===================================== -class Foo { - accessor() {} -} - -================================================================================ -`; - -exports[`not-accessor-property.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor = 123; -} - -=====================================output===================================== -class Foo { - accessor = 123 -} - -================================================================================ -`; - -exports[`not-accessor-property.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor = 123; -} - -=====================================output===================================== -class Foo { - accessor = 123; -} - -================================================================================ -`; - -exports[`private.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`private.js [espree] format 1`] = ` -"Unexpected token #bar (2:12) - 1 | class Foo { -> 2 | accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`private.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class Foo { -> 2 | accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`private.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token #bar (2:12) - 1 | class Foo { -> 2 | accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`private.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor #bar; -} - -=====================================output===================================== -class Foo { - accessor #bar -} - -================================================================================ -`; - -exports[`private.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor #bar; -} - -=====================================output===================================== -class Foo { - accessor #bar; -} - -================================================================================ -`; - -exports[`static.js [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static.js [espree] format 1`] = ` -"Unexpected token bar (2:19) - 1 | class Foo { -> 2 | static accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token bar (2:19) - 1 | class Foo { -> 2 | static accessor bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - static accessor bar; -} - -=====================================output===================================== -class Foo { - static accessor bar -} - -================================================================================ -`; - -exports[`static.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - static accessor bar; -} - -=====================================output===================================== -class Foo { - static accessor bar; -} - -================================================================================ -`; - -exports[`static-computed.js [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`static-computed.js [espree] format 1`] = ` -"Unexpected token [ (2:19) - 1 | class Foo { -> 2 | static accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`static-computed.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token [ (2:19) - 1 | class Foo { -> 2 | static accessor ["bar"]; - | ^ - 3 | } - 4 |" -`; - -exports[`static-computed.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - static accessor ["bar"]; -} - -=====================================output===================================== -class Foo { - static accessor ["bar"] -} - -================================================================================ -`; - -exports[`static-computed.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - static accessor ["bar"]; -} - -=====================================output===================================== -class Foo { - static accessor ["bar"]; -} - -================================================================================ -`; - -exports[`static-private.js [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static-private.js [espree] format 1`] = ` -"Unexpected token #bar (2:19) - 1 | class Foo { -> 2 | static accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static-private.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:19) - 1 | class Foo { -> 2 | static accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static-private.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token #bar (2:19) - 1 | class Foo { -> 2 | static accessor #bar; - | ^ - 3 | } - 4 |" -`; - -exports[`static-private.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - static accessor #bar; -} - -=====================================output===================================== -class Foo { - static accessor #bar -} - -================================================================================ -`; - -exports[`static-private.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - static accessor #bar; -} - -=====================================output===================================== -class Foo { - static accessor #bar; -} - -================================================================================ -`; - -exports[`with-semicolon-1.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | [foo]() {} - 4 | } - 5 | " -`; - -exports[`with-semicolon-1.js [espree] format 1`] = ` -"Unexpected token clicked (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | [foo]() {} - 4 | } - 5 | " -`; - -exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | [foo]() {} - 4 | } - 5 | " -`; - -exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token clicked (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | [foo]() {} - 4 | } - 5 | " -`; - -exports[`with-semicolon-1.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class C { - accessor clicked = "value"; - [foo]() {} -} - -=====================================output===================================== -class C { - accessor clicked = "value"; - [foo]() {} -} - -================================================================================ -`; - -exports[`with-semicolon-1.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - accessor clicked = "value"; - [foo]() {} -} - -=====================================output===================================== -class C { - accessor clicked = "value"; - [foo]() {} -} - -================================================================================ -`; - -exports[`with-semicolon-2.js [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | *foo() {} - 4 | } - 5 |" -`; - -exports[`with-semicolon-2.js [espree] format 1`] = ` -"Unexpected token clicked (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | *foo() {} - 4 | } - 5 |" -`; - -exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | *foo() {} - 4 | } - 5 |" -`; - -exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token clicked (2:12) - 1 | class C { -> 2 | accessor clicked = "value"; - | ^ - 3 | *foo() {} - 4 | } - 5 |" -`; - -exports[`with-semicolon-2.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class C { - accessor clicked = "value"; - *foo() {} -} - -=====================================output===================================== -class C { - accessor clicked = "value"; - *foo() {} -} - -================================================================================ -`; - -exports[`with-semicolon-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - accessor clicked = "value"; - *foo() {} -} - -=====================================output===================================== -class C { - accessor clicked = "value"; - *foo() {} -} - -================================================================================ -`; diff --git a/tests/format/js/decorator-auto-accessors/format.test.js b/tests/format/js/decorator-auto-accessors/format.test.js new file mode 100644 index 000000000000..5dcdd44bfd41 --- /dev/null +++ b/tests/format/js/decorator-auto-accessors/format.test.js @@ -0,0 +1,27 @@ +const parsers = ["babel", "typescript", "babel-flow"]; +const errors = { + espree: [ + "basic.js", + "computed.js", + "private.js", + "static-computed.js", + "static-private.js", + "static.js", + "with-semicolon-1.js", + "with-semicolon-2.js", + "comments.js", + ], + acorn: [ + "basic.js", + "computed.js", + "private.js", + "static-computed.js", + "static-private.js", + "static.js", + "with-semicolon-1.js", + "with-semicolon-2.js", + "comments.js", + ], +}; +runFormatTest(import.meta, parsers, { errors }); +runFormatTest(import.meta, parsers, { errors, semi: false }); diff --git a/tests/format/js/decorator-auto-accessors/jsfmt.spec.js b/tests/format/js/decorator-auto-accessors/jsfmt.spec.js deleted file mode 100644 index 8c402a09ea0b..000000000000 --- a/tests/format/js/decorator-auto-accessors/jsfmt.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -const parsers = ["babel", "typescript", "babel-flow"]; -const errors = { - espree: [ - "basic.js", - "computed.js", - "private.js", - "static-computed.js", - "static-private.js", - "static.js", - "with-semicolon-1.js", - "with-semicolon-2.js", - "comments.js", - ], - acorn: [ - "basic.js", - "computed.js", - "private.js", - "static-computed.js", - "static-private.js", - "static.js", - "with-semicolon-1.js", - "with-semicolon-2.js", - "comments.js", - ], -}; -run_spec(__dirname, parsers, { errors }); -run_spec(__dirname, parsers, { errors, semi: false }); diff --git a/tests/format/js/decorator-comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorator-comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 74842af57a38..000000000000 --- a/tests/format/js/decorator-comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,53 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.js [acorn] format 1`] = ` -"Unexpected character '@' (2:5) - 1 | class Something { -> 2 | @Annotateme() - | ^ - 3 | // comment - 4 | static property: Array<string>; - 5 | }" -`; - -exports[`comments.js [espree] format 1`] = ` -"Unexpected character '@' (2:5) - 1 | class Something { -> 2 | @Annotateme() - | ^ - 3 | // comment - 4 | static property: Array<string>; - 5 | }" -`; - -exports[`comments.js [meriyah] format 1`] = ` -"Unexpected token: ':' (4:20) - 2 | @Annotateme() - 3 | // comment -> 4 | static property: Array<string>; - | ^ - 5 | } - 6 |" -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Something { - @Annotateme() - // comment - static property: Array<string>; -} - -=====================================output===================================== -class Something { - @Annotateme() - // comment - static property: Array<string>; -} - -================================================================================ -`; diff --git a/tests/format/js/decorator-comments/jsfmt.spec.js b/tests/format/js/decorator-comments/jsfmt.spec.js deleted file mode 100644 index 8caf42e4458c..000000000000 --- a/tests/format/js/decorator-comments/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/decorators-export/__snapshots__/format.test.js.snap b/tests/format/js/decorators-export/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0b23236a52dc --- /dev/null +++ b/tests/format/js/decorators-export/__snapshots__/format.test.js.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`after_export.js [acorn] format 1`] = ` +"Unexpected character '@' (1:8) +> 1 | export @decorator class Foo {} + | ^ + 2 | + 3 | export default @decorator class {} + 4 | +Cause: Unexpected character '@' (1:7)" +`; + +exports[`after_export.js [espree] format 1`] = ` +"Unexpected character '@' (1:8) +> 1 | export @decorator class Foo {} + | ^ + 2 | + 3 | export default @decorator class {} + 4 | +Cause: Unexpected character '@'" +`; + +exports[`after_export.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export @decorator class Foo {} + +export default @decorator class {} + +=====================================output===================================== +export +@decorator +class Foo {} + +export default +@decorator +class {} + +================================================================================ +`; + +exports[`before_export.js [acorn] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @decorator + | ^ + 2 | export class Foo {} + 3 | + 4 | @decorator +Cause: Unexpected character '@' (1:0)" +`; + +exports[`before_export.js [espree] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @decorator + | ^ + 2 | export class Foo {} + 3 | + 4 | @decorator +Cause: Unexpected character '@'" +`; + +exports[`before_export.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +@decorator +export class Foo {} + +@decorator +export default class {} + +=====================================output===================================== +@decorator +export class Foo {} + +@decorator +export default class {} + +================================================================================ +`; diff --git a/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 36873709b8e0..000000000000 --- a/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,90 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`after_export.js [acorn] format 1`] = ` -"Unexpected character '@' (1:8) -> 1 | export @decorator class Foo {} - | ^ - 2 | - 3 | export default @decorator class {} - 4 |" -`; - -exports[`after_export.js [espree] format 1`] = ` -"Unexpected character '@' (1:8) -> 1 | export @decorator class Foo {} - | ^ - 2 | - 3 | export default @decorator class {} - 4 |" -`; - -exports[`after_export.js [meriyah] format 1`] = ` -"Unexpected token: '@' (1:8) -> 1 | export @decorator class Foo {} - | ^ - 2 | - 3 | export default @decorator class {} - 4 |" -`; - -exports[`after_export.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -export @decorator class Foo {} - -export default @decorator class {} - -=====================================output===================================== -export -@decorator -class Foo {} - -export default -@decorator -class {} - -================================================================================ -`; - -exports[`before_export.js [acorn] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @decorator - | ^ - 2 | export class Foo {} - 3 | - 4 | @decorator" -`; - -exports[`before_export.js [espree] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @decorator - | ^ - 2 | export class Foo {} - 3 | - 4 | @decorator" -`; - -exports[`before_export.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -@decorator -export class Foo {} - -@decorator -export default class {} - -=====================================output===================================== -@decorator -export class Foo {} - -@decorator -export default class {} - -================================================================================ -`; diff --git a/tests/format/js/decorators-export/format.test.js b/tests/format/js/decorators-export/format.test.js new file mode 100644 index 000000000000..f107b6f814f9 --- /dev/null +++ b/tests/format/js/decorators-export/format.test.js @@ -0,0 +1,4 @@ +// TypeScript and Flow don't accept decorator after export +runFormatTest(import.meta, ["babel"], { + errors: { acorn: true, espree: true }, +}); diff --git a/tests/format/js/decorators-export/jsfmt.spec.js b/tests/format/js/decorators-export/jsfmt.spec.js deleted file mode 100644 index 8a6b2e90569b..000000000000 --- a/tests/format/js/decorators-export/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -// TypeScript and Flow don't accept decorator after export -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: ["after_export.js"] }, -}); diff --git a/tests/format/js/decorators/__snapshots__/format.test.js.snap b/tests/format/js/decorators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8f941a0147b7 --- /dev/null +++ b/tests/format/js/decorators/__snapshots__/format.test.js.snap @@ -0,0 +1,918 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`classes.js [acorn] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @deco class Foo {} + | ^ + 2 | + 3 | @deco export class Bar {} + 4 | +Cause: Unexpected character '@' (1:0)" +`; + +exports[`classes.js [espree] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @deco class Foo {} + | ^ + 2 | + 3 | @deco export class Bar {} + 4 | +Cause: Unexpected character '@'" +`; + +exports[`classes.js [flow] format 1`] = ` +"Unexpected token \`@\` (7:13) + 5 | @deco export default class Baz {} + 6 | +> 7 | const foo = @deco class { + | ^ + 8 | // + 9 | }; + 10 |" +`; + +exports[`classes.js [hermes] format 1`] = ` +"unrecognized character '@' (1:0) +> 1 | @deco class Foo {} + 2 | + 3 | @deco export class Bar {} + 4 | +Cause: unrecognized character '@' (1:0) +@deco class Foo {} +^" +`; + +exports[`classes.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +@deco class Foo {} + +@deco export class Bar {} + +@deco export default class Baz {} + +const foo = @deco class { + // +}; + +const bar = + @deco + class { + // + }; + +=====================================output===================================== +@deco +class Foo {} + +@deco +export class Bar {} + +@deco +export default class Baz {} + +const foo = + @deco + class { + // + }; + +const bar = + @deco + class { + // + }; + +================================================================================ +`; + +exports[`comments.js [acorn] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | var x = 100 + 2 | +> 3 | @Hello({ + | ^ + 4 | a: 'a', // Comment is in the wrong place + 5 | // test + 6 | b: '2' +Cause: Unexpected character '@' (3:0)" +`; + +exports[`comments.js [espree] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | var x = 100 + 2 | +> 3 | @Hello({ + | ^ + 4 | a: 'a', // Comment is in the wrong place + 5 | // test + 6 | b: '2' +Cause: Unexpected character '@'" +`; + +exports[`comments.js [hermes] format 1`] = ` +"unrecognized character '@' (3:0) + 1 | var x = 100 + 2 | +> 3 | @Hello({ + 4 | a: 'a', // Comment is in the wrong place + 5 | // test + 6 | b: '2' +Cause: unrecognized character '@' (3:0) +@Hello({ +^" +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var x = 100 + +@Hello({ + a: 'a', // Comment is in the wrong place + // test + b: '2' +}) +class X { + +} + + +@NgModule({ + // Imports. + imports: [ + // Angular modules. + BrowserModule, + + // App modules. + CoreModule, + SharedModule, + ], +}) +export class AppModule {} + +// A +@Foo() +// B +@Bar() +// C +export class Bar{} + +class Something { + @Annotateme() + property; +} + +=====================================output===================================== +var x = 100; + +@Hello({ + a: "a", // Comment is in the wrong place + // test + b: "2", +}) +class X {} + +@NgModule({ + // Imports. + imports: [ + // Angular modules. + BrowserModule, + + // App modules. + CoreModule, + SharedModule, + ], +}) +export class AppModule {} + +// A +@Foo() +// B +@Bar() +// C +export class Bar {} + +class Something { + @Annotateme() + property; +} + +================================================================================ +`; + +exports[`member-expression.js [acorn] format 1`] = ` +"Unexpected character '@' (3:5) + 1 | [ + 2 | class { +> 3 | @(decorator) + | ^ + 4 | method() {} + 5 | }, + 6 | class { +Cause: Unexpected character '@' (3:4)" +`; + +exports[`member-expression.js [espree] format 1`] = ` +"Unexpected character '@' (3:5) + 1 | [ + 2 | class { +> 3 | @(decorator) + | ^ + 4 | method() {} + 5 | }, + 6 | class { +Cause: Unexpected character '@'" +`; + +exports[`member-expression.js [hermes] format 1`] = ` +"unrecognized character '@' (3:4) + 1 | [ + 2 | class { +> 3 | @(decorator) + | ^ + 4 | method() {} + 5 | }, + 6 | class { +Cause: unrecognized character '@' (3:4) + @(decorator) + ^" +`; + +exports[`member-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + class { + @(decorator) + method() {} + }, + class { + @(decorator()) + method() {} + }, + class { + @(decorator?.()) + method() {} + }, + class { + @(decorators[0]) + method() {} + }, + class { + @decorators[0] + method() {} + }, + class { + @(decorators?.[0]) + method() {} + }, + class { + @(decorators.at(0)) + method() {} + }, + class { + @(decorators?.at(0)) + method() {} + }, + class { + @(decorators.at?.(0)) + method() {} + }, + class { + @(decorators.first) + method() {} + }, + class { + @(decorators?.first) + method() {} + }, + class { + @(decorators[first]) + method() {} + }, + class { + @decorators[first] + method() {} + }, + class { + @(decorators["first"]) + method() {} + }, + @(decorators[first]) + class { + method() {} + }, + @(decorators[0]) + class { + method() {} + }, +] + +=====================================output===================================== +[ + class { + @decorator + method() {} + }, + class { + @decorator() + method() {} + }, + class { + @(decorator?.()) + method() {} + }, + class { + @(decorators[0]) + method() {} + }, + class { + @decorators [0]; + method() {} + }, + class { + @(decorators?.[0]) + method() {} + }, + class { + @decorators.at(0) + method() {} + }, + class { + @(decorators?.at(0)) + method() {} + }, + class { + @(decorators.at?.(0)) + method() {} + }, + class { + @decorators.first + method() {} + }, + class { + @(decorators?.first) + method() {} + }, + class { + @(decorators[first]) + method() {} + }, + class { + @decorators [first]; + method() {} + }, + class { + @(decorators["first"]) + method() {} + }, + @(decorators[first]) + class { + method() {} + }, + @(decorators[0]) + class { + method() {} + }, +]; + +================================================================================ +`; + +exports[`methods.js [acorn] format 1`] = ` +"Unexpected character '@' (3:3) + 1 | + 2 | class Yo { +> 3 | @foo("hello") + | ^ + 4 | async plop() {} + 5 | + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument") +Cause: Unexpected character '@' (3:2)" +`; + +exports[`methods.js [espree] format 1`] = ` +"Unexpected character '@' (3:3) + 1 | + 2 | class Yo { +> 3 | @foo("hello") + | ^ + 4 | async plop() {} + 5 | + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument") +Cause: Unexpected character '@'" +`; + +exports[`methods.js [hermes] format 1`] = ` +"unrecognized character '@' (3:2) + 1 | + 2 | class Yo { +> 3 | @foo("hello") + | ^ + 4 | async plop() {} + 5 | + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument") +Cause: unrecognized character '@' (3:2) + @foo("hello") + ^" +`; + +exports[`methods.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class Yo { + @foo("hello") + async plop() {} + + @anotherDecoratorWithALongName("and a very long string as a first argument") + async plip() {} + + @anotherDecoratorWithALongName("another very long string, but now inline") async plip() {} +} + +=====================================output===================================== +class Yo { + @foo("hello") + async plop() {} + + @anotherDecoratorWithALongName("and a very long string as a first argument") + async plip() {} + + @anotherDecoratorWithALongName("another very long string, but now inline") + async plip() {} +} + +================================================================================ +`; + +exports[`mixed.js [acorn] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | // https://github.com/prettier/prettier/issues/6747 + 2 | +> 3 | @foo + | ^ + 4 | export default class MyComponent { + 5 | @task + 6 | *foo() { +Cause: Unexpected character '@' (3:0)" +`; + +exports[`mixed.js [espree] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | // https://github.com/prettier/prettier/issues/6747 + 2 | +> 3 | @foo + | ^ + 4 | export default class MyComponent { + 5 | @task + 6 | *foo() { +Cause: Unexpected character '@'" +`; + +exports[`mixed.js [hermes] format 1`] = ` +"unrecognized character '@' (3:0) + 1 | // https://github.com/prettier/prettier/issues/6747 + 2 | +> 3 | @foo + 4 | export default class MyComponent { + 5 | @task + 6 | *foo() { +Cause: unrecognized character '@' (3:0) +@foo +^" +`; + +exports[`mixed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/issues/6747 + +@foo +export default class MyComponent { + @task + *foo() { + } +} +=====================================output===================================== +// https://github.com/prettier/prettier/issues/6747 + +@foo +export default class MyComponent { + @task + *foo() {} +} + +================================================================================ +`; + +exports[`mobx.js [acorn] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | import {observable} from "mobx"; + 2 | +> 3 | @observer class OrderLine { + | ^ + 4 | @observable price = 0; + 5 | @observable amount = 1; + 6 | +Cause: Unexpected character '@' (3:0)" +`; + +exports[`mobx.js [espree] format 1`] = ` +"Unexpected character '@' (3:1) + 1 | import {observable} from "mobx"; + 2 | +> 3 | @observer class OrderLine { + | ^ + 4 | @observable price = 0; + 5 | @observable amount = 1; + 6 | +Cause: Unexpected character '@'" +`; + +exports[`mobx.js [hermes] format 1`] = ` +"unrecognized character '@' (3:0) + 1 | import {observable} from "mobx"; + 2 | +> 3 | @observer class OrderLine { + 4 | @observable price = 0; + 5 | @observable amount = 1; + 6 | +Cause: unrecognized character '@' (3:0) +@observer class OrderLine { +^" +`; + +exports[`mobx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import {observable} from "mobx"; + +@observer class OrderLine { + @observable price = 0; + @observable amount = 1; + + constructor(price) { + this.price = price; + } + + @computed get total() { + return this.price * this.amount; + } + + @action.bound setPrice(price) { + this.price = price; + } + + @computed + get total() { + return this.price * this.amount; + } + + @action.bound + setPrice(price) { + this.price = price; + } + + @computed @computed @computed @computed @computed @computed @computed get total() { + return this.price * this.amount; + } + + @action handleDecrease = (event) => this.count--; + + @action handleSomething = (event) => doSomething(); +} + +=====================================output===================================== +import { observable } from "mobx"; + +@observer +class OrderLine { + @observable price = 0; + @observable amount = 1; + + constructor(price) { + this.price = price; + } + + @computed get total() { + return this.price * this.amount; + } + + @action.bound setPrice(price) { + this.price = price; + } + + @computed + get total() { + return this.price * this.amount; + } + + @action.bound + setPrice(price) { + this.price = price; + } + + @computed + @computed + @computed + @computed + @computed + @computed + @computed + get total() { + return this.price * this.amount; + } + + @action handleDecrease = (event) => this.count--; + + @action handleSomething = (event) => doSomething(); +} + +================================================================================ +`; + +exports[`multiline.js [acorn] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class Foo { +> 2 | @deco([ + | ^ + 3 | foo, + 4 | bar + 5 | ]) prop = value; +Cause: Unexpected character '@' (2:2)" +`; + +exports[`multiline.js [espree] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class Foo { +> 2 | @deco([ + | ^ + 3 | foo, + 4 | bar + 5 | ]) prop = value; +Cause: Unexpected character '@'" +`; + +exports[`multiline.js [hermes] format 1`] = ` +"unrecognized character '@' (2:2) + 1 | class Foo { +> 2 | @deco([ + | ^ + 3 | foo, + 4 | bar + 5 | ]) prop = value; +Cause: unrecognized character '@' (2:2) + @deco([ + ^" +`; + +exports[`multiline.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + @deco([ + foo, + bar + ]) prop = value; + + @decorator([]) method() {} + + @decorator([ + ]) method() {} + + @decorator({}) method() {} + + @decorator({ + }) method() {} +} + +=====================================output===================================== +class Foo { + @deco([foo, bar]) prop = value; + + @decorator([]) method() {} + + @decorator([]) method() {} + + @decorator({}) method() {} + + @decorator({}) method() {} +} + +================================================================================ +`; + +exports[`multiple.js [acorn] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | const dog = class { +> 2 | @readonly + | ^ + 3 | @nonenumerable + 4 | @doubledValue + 5 | legs = 4; +Cause: Unexpected character '@' (2:2)" +`; + +exports[`multiple.js [espree] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | const dog = class { +> 2 | @readonly + | ^ + 3 | @nonenumerable + 4 | @doubledValue + 5 | legs = 4; +Cause: Unexpected character '@'" +`; + +exports[`multiple.js [hermes] format 1`] = ` +"unrecognized character '@' (2:2) + 1 | const dog = class { +> 2 | @readonly + | ^ + 3 | @nonenumerable + 4 | @doubledValue + 5 | legs = 4; +Cause: unrecognized character '@' (2:2) + @readonly + ^" +`; + +exports[`multiple.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const dog = class { + @readonly + @nonenumerable + @doubledValue + legs = 4; + + @readonly + @nonenumerable + @doubledValue + eyes() {return 2} +}; + +const foo = class { + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName = "A very long string as value" + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName() { "A very long string as value"} +}; + +=====================================output===================================== +const dog = class { + @readonly + @nonenumerable + @doubledValue + legs = 4; + + @readonly + @nonenumerable + @doubledValue + eyes() { + return 2; + } +}; + +const foo = class { + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName = + "A very long string as value"; + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName() { + "A very long string as value"; + } +}; + +================================================================================ +`; + +exports[`parens.js [acorn] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class X { +> 2 | @(computed().volatile()) + | ^ + 3 | x + 4 | } + 5 | +Cause: Unexpected character '@' (2:2)" +`; + +exports[`parens.js [espree] format 1`] = ` +"Unexpected character '@' (2:3) + 1 | class X { +> 2 | @(computed().volatile()) + | ^ + 3 | x + 4 | } + 5 | +Cause: Unexpected character '@'" +`; + +exports[`parens.js [hermes] format 1`] = ` +"unrecognized character '@' (2:2) + 1 | class X { +> 2 | @(computed().volatile()) + | ^ + 3 | x + 4 | } + 5 | +Cause: unrecognized character '@' (2:2) + @(computed().volatile()) + ^" +`; + +exports[`parens.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class X { + @(computed().volatile()) + x +} + +=====================================output===================================== +class X { + @(computed().volatile()) + x; +} + +================================================================================ +`; + +exports[`redux.js [acorn] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @connect(mapStateToProps, mapDispatchToProps) + | ^ + 2 | export class MyApp extends React.Component {} + 3 | + 4 | @connect(state => ({ todos: state.todos })) +Cause: Unexpected character '@' (1:0)" +`; + +exports[`redux.js [espree] format 1`] = ` +"Unexpected character '@' (1:1) +> 1 | @connect(mapStateToProps, mapDispatchToProps) + | ^ + 2 | export class MyApp extends React.Component {} + 3 | + 4 | @connect(state => ({ todos: state.todos })) +Cause: Unexpected character '@'" +`; + +exports[`redux.js [hermes] format 1`] = ` +"unrecognized character '@' (1:0) +> 1 | @connect(mapStateToProps, mapDispatchToProps) + 2 | export class MyApp extends React.Component {} + 3 | + 4 | @connect(state => ({ todos: state.todos })) +Cause: unrecognized character '@' (1:0) +@connect(mapStateToProps, mapDispatchToProps) +^" +`; + +exports[`redux.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +@connect(mapStateToProps, mapDispatchToProps) +export class MyApp extends React.Component {} + +@connect(state => ({ todos: state.todos })) +export class Home extends React.Component {} + +=====================================output===================================== +@connect(mapStateToProps, mapDispatchToProps) +export class MyApp extends React.Component {} + +@connect((state) => ({ todos: state.todos })) +export class Home extends React.Component {} + +================================================================================ +`; diff --git a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ce9aaf5a5ebc..000000000000 --- a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,744 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`classes.js [acorn] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @deco class Foo {} - | ^ - 2 | - 3 | @deco export class Bar {} - 4 |" -`; - -exports[`classes.js [espree] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @deco class Foo {} - | ^ - 2 | - 3 | @deco export class Bar {} - 4 |" -`; - -exports[`classes.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -@deco class Foo {} - -@deco export class Bar {} - -@deco export default class Baz {} - -const foo = @deco class { - // -}; - -const bar = - @deco - class { - // - }; - -=====================================output===================================== -@deco -class Foo {} - -@deco -export class Bar {} - -@deco -export default class Baz {} - -const foo = - ( - @deco - class { - // - } - ); - -const bar = - ( - @deco - class { - // - } - ); - -================================================================================ -`; - -exports[`comments.js [acorn] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | var x = 100 - 2 | -> 3 | @Hello({ - | ^ - 4 | a: 'a', // Comment is in the wrong place - 5 | // test - 6 | b: '2'" -`; - -exports[`comments.js [espree] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | var x = 100 - 2 | -> 3 | @Hello({ - | ^ - 4 | a: 'a', // Comment is in the wrong place - 5 | // test - 6 | b: '2'" -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -var x = 100 - -@Hello({ - a: 'a', // Comment is in the wrong place - // test - b: '2' -}) -class X { - -} - - -@NgModule({ - // Imports. - imports: [ - // Angular modules. - BrowserModule, - - // App modules. - CoreModule, - SharedModule, - ], -}) -export class AppModule {} - -// A -@Foo() -// B -@Bar() -// C -export class Bar{} - -=====================================output===================================== -var x = 100; - -@Hello({ - a: "a", // Comment is in the wrong place - // test - b: "2", -}) -class X {} - -@NgModule({ - // Imports. - imports: [ - // Angular modules. - BrowserModule, - - // App modules. - CoreModule, - SharedModule, - ], -}) -export class AppModule {} - -// A -@Foo() -// B -@Bar() -// C -export class Bar {} - -================================================================================ -`; - -exports[`member-expression.js [acorn] format 1`] = ` -"Unexpected character '@' (3:5) - 1 | [ - 2 | class { -> 3 | @(decorators[0]) - | ^ - 4 | method() {} - 5 | }, - 6 | class {" -`; - -exports[`member-expression.js [espree] format 1`] = ` -"Unexpected character '@' (3:5) - 1 | [ - 2 | class { -> 3 | @(decorators[0]) - | ^ - 4 | method() {} - 5 | }, - 6 | class {" -`; - -exports[`member-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - class { - @(decorators[0]) - method() {} - }, - class { - @decorators[0] - method() {} - }, - class { - @(decorators?.[0]) - method() {} - }, - class { - @(decorators.at(0)) - method() {} - }, - class { - @(decorators?.at(0)) - method() {} - }, - class { - @(decorators.first) - method() {} - }, - class { - @(decorators?.first) - method() {} - }, - class { - @(decorators[first]) - method() {} - }, - class { - @decorators[first] - method() {} - }, - class { - @(decorators["first"]) - method() {} - }, - @(decorators[first]) - class { - method() {} - }, - @(decorators[0]) - class { - method() {} - }, -] - -=====================================output===================================== -[ - class { - @(decorators[0]) - method() {} - }, - class { - @decorators [0]; - method() {} - }, - class { - @(decorators?.[0]) - method() {} - }, - class { - @decorators.at(0) - method() {} - }, - class { - @(decorators?.at(0)) - method() {} - }, - class { - @decorators.first - method() {} - }, - class { - @(decorators?.first) - method() {} - }, - class { - @(decorators[first]) - method() {} - }, - class { - @decorators [first]; - method() {} - }, - class { - @(decorators["first"]) - method() {} - }, - ( - @(decorators[first]) - class { - method() {} - } - ), - ( - @(decorators[0]) - class { - method() {} - } - ), -]; - -================================================================================ -`; - -exports[`methods.js [acorn] format 1`] = ` -"Unexpected character '@' (3:3) - 1 | - 2 | class Yo { -> 3 | @foo("hello") - | ^ - 4 | async plop() {} - 5 | - 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" -`; - -exports[`methods.js [espree] format 1`] = ` -"Unexpected character '@' (3:3) - 1 | - 2 | class Yo { -> 3 | @foo("hello") - | ^ - 4 | async plop() {} - 5 | - 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" -`; - -exports[`methods.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class Yo { - @foo("hello") - async plop() {} - - @anotherDecoratorWithALongName("and a very long string as a first argument") - async plip() {} - - @anotherDecoratorWithALongName("another very long string, but now inline") async plip() {} -} - -=====================================output===================================== -class Yo { - @foo("hello") - async plop() {} - - @anotherDecoratorWithALongName("and a very long string as a first argument") - async plip() {} - - @anotherDecoratorWithALongName("another very long string, but now inline") - async plip() {} -} - -================================================================================ -`; - -exports[`mixed.js [acorn] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | // https://github.com/prettier/prettier/issues/6747 - 2 | -> 3 | @foo - | ^ - 4 | export default class MyComponent { - 5 | @task - 6 | *foo() {" -`; - -exports[`mixed.js [espree] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | // https://github.com/prettier/prettier/issues/6747 - 2 | -> 3 | @foo - | ^ - 4 | export default class MyComponent { - 5 | @task - 6 | *foo() {" -`; - -exports[`mixed.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/issues/6747 - -@foo -export default class MyComponent { - @task - *foo() { - } -} -=====================================output===================================== -// https://github.com/prettier/prettier/issues/6747 - -@foo -export default class MyComponent { - @task - *foo() {} -} - -================================================================================ -`; - -exports[`mobx.js [acorn] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | import {observable} from "mobx"; - 2 | -> 3 | @observer class OrderLine { - | ^ - 4 | @observable price:number = 0; - 5 | @observable amount:number = 1; - 6 |" -`; - -exports[`mobx.js [espree] format 1`] = ` -"Unexpected character '@' (3:1) - 1 | import {observable} from "mobx"; - 2 | -> 3 | @observer class OrderLine { - | ^ - 4 | @observable price:number = 0; - 5 | @observable amount:number = 1; - 6 |" -`; - -exports[`mobx.js [meriyah] format 1`] = ` -"Unexpected token: ':' (4:20) - 2 | - 3 | @observer class OrderLine { -> 4 | @observable price:number = 0; - | ^ - 5 | @observable amount:number = 1; - 6 | - 7 | constructor(price) {" -`; - -exports[`mobx.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import {observable} from "mobx"; - -@observer class OrderLine { - @observable price:number = 0; - @observable amount:number = 1; - - constructor(price) { - this.price = price; - } - - @computed get total() { - return this.price * this.amount; - } - - @action.bound setPrice(price) { - this.price = price; - } - - @computed - get total() { - return this.price * this.amount; - } - - @action.bound - setPrice(price) { - this.price = price; - } - - @computed @computed @computed @computed @computed @computed @computed get total() { - return this.price * this.amount; - } - - @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; - - @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); -} - -=====================================output===================================== -import { observable } from "mobx"; - -@observer -class OrderLine { - @observable price: number = 0; - @observable amount: number = 1; - - constructor(price) { - this.price = price; - } - - @computed get total() { - return this.price * this.amount; - } - - @action.bound setPrice(price) { - this.price = price; - } - - @computed - get total() { - return this.price * this.amount; - } - - @action.bound - setPrice(price) { - this.price = price; - } - - @computed - @computed - @computed - @computed - @computed - @computed - @computed - get total() { - return this.price * this.amount; - } - - @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => - this.count--; - - @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => - doSomething(); -} - -================================================================================ -`; - -exports[`multiline.js [acorn] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class Foo { -> 2 | @deco([ - | ^ - 3 | foo, - 4 | bar - 5 | ]) prop = value;" -`; - -exports[`multiline.js [espree] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class Foo { -> 2 | @deco([ - | ^ - 3 | foo, - 4 | bar - 5 | ]) prop = value;" -`; - -exports[`multiline.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - @deco([ - foo, - bar - ]) prop = value; - - @decorator([]) method() {} - - @decorator([ - ]) method() {} - - @decorator({}) method() {} - - @decorator({ - }) method() {} -} - -=====================================output===================================== -class Foo { - @deco([foo, bar]) prop = value; - - @decorator([]) method() {} - - @decorator([]) method() {} - - @decorator({}) method() {} - - @decorator({}) method() {} -} - -================================================================================ -`; - -exports[`multiple.js [acorn] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | const dog = { -> 2 | @readonly - | ^ - 3 | @nonenumerable - 4 | @doubledValue - 5 | legs: 4," -`; - -exports[`multiple.js [espree] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | const dog = { -> 2 | @readonly - | ^ - 3 | @nonenumerable - 4 | @doubledValue - 5 | legs: 4," -`; - -exports[`multiple.js [meriyah] format 1`] = ` -"Unexpected token: '@' (2:3) - 1 | const dog = { -> 2 | @readonly - | ^ - 3 | @nonenumerable - 4 | @doubledValue - 5 | legs: 4," -`; - -exports[`multiple.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const dog = { - @readonly - @nonenumerable - @doubledValue - legs: 4, - - @readonly - @nonenumerable - @doubledValue - eyes: 2 -}; - -const foo = { - @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName: "A very long string as value" -}; - -=====================================output===================================== -const dog = { - @readonly - @nonenumerable - @doubledValue - legs: 4, - - @readonly - @nonenumerable - @doubledValue - eyes: 2, -}; - -const foo = { - @multipleDecorators - @inline - @theyWontAllFitInOneline - aVeryLongPropName: "A very long string as value", -}; - -================================================================================ -`; - -exports[`parens.js [acorn] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class X { -> 2 | @(computed().volatile()) - | ^ - 3 | x - 4 | } - 5 |" -`; - -exports[`parens.js [espree] format 1`] = ` -"Unexpected character '@' (2:3) - 1 | class X { -> 2 | @(computed().volatile()) - | ^ - 3 | x - 4 | } - 5 |" -`; - -exports[`parens.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class X { - @(computed().volatile()) - x -} - -=====================================output===================================== -class X { - @(computed().volatile()) - x; -} - -================================================================================ -`; - -exports[`redux.js [acorn] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @connect(mapStateToProps, mapDispatchToProps) - | ^ - 2 | export class MyApp extends React.Component {} - 3 | - 4 | @connect(state => ({ todos: state.todos }))" -`; - -exports[`redux.js [espree] format 1`] = ` -"Unexpected character '@' (1:1) -> 1 | @connect(mapStateToProps, mapDispatchToProps) - | ^ - 2 | export class MyApp extends React.Component {} - 3 | - 4 | @connect(state => ({ todos: state.todos }))" -`; - -exports[`redux.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -@connect(mapStateToProps, mapDispatchToProps) -export class MyApp extends React.Component {} - -@connect(state => ({ todos: state.todos })) -export class Home extends React.Component {} - -=====================================output===================================== -@connect(mapStateToProps, mapDispatchToProps) -export class MyApp extends React.Component {} - -@connect((state) => ({ todos: state.todos })) -export class Home extends React.Component {} - -================================================================================ -`; diff --git a/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..543fa9929bc8 --- /dev/null +++ b/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,567 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arguments.js [acorn] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: Unexpected character '@' (1:12)" +`; + +exports[`arguments.js [espree] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: Unexpected character '@'" +`; + +exports[`arguments.js [flow] format 1`] = ` +"Unexpected token \`@\` (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 |" +`; + +exports[`arguments.js [hermes] format 1`] = ` +"unrecognized character '@' (1:12) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: unrecognized character '@' (1:12) +console.log(@deco class Foo {}) + ^" +`; + +exports[`arguments.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: Unexpected character '@' (1:12)" +`; + +exports[`arguments.js - {"semi":false} [espree] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: Unexpected character '@'" +`; + +exports[`arguments.js - {"semi":false} [flow] format 1`] = ` +"Unexpected token \`@\` (1:13) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 |" +`; + +exports[`arguments.js - {"semi":false} [hermes] format 1`] = ` +"unrecognized character '@' (1:12) +> 1 | console.log(@deco class Foo {}) + | ^ + 2 | console.log(@deco class {}) + 3 | +Cause: unrecognized character '@' (1:12) +console.log(@deco class Foo {}) + ^" +`; + +exports[`arguments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +console.log(@deco class Foo {}) +console.log(@deco class {}) + +=====================================output===================================== +console.log( + @deco + class Foo {}, +) +console.log( + @deco + class {}, +) + +================================================================================ +`; + +exports[`arguments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +console.log(@deco class Foo {}) +console.log(@deco class {}) + +=====================================output===================================== +console.log( + @deco + class Foo {}, +); +console.log( + @deco + class {}, +); + +================================================================================ +`; + +exports[`class-expression.js [acorn] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: Unexpected character '@' (1:12)" +`; + +exports[`class-expression.js [espree] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: Unexpected character '@'" +`; + +exports[`class-expression.js [flow] format 1`] = ` +"Unexpected token \`@\` (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {});" +`; + +exports[`class-expression.js [hermes] format 1`] = ` +"unrecognized character '@' (1:12) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: unrecognized character '@' (1:12) +const a1 = (@deco class Foo {}); + ^" +`; + +exports[`class-expression.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: Unexpected character '@' (1:12)" +`; + +exports[`class-expression.js - {"semi":false} [espree] format 1`] = ` +"Unexpected character '@' (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: Unexpected character '@'" +`; + +exports[`class-expression.js - {"semi":false} [flow] format 1`] = ` +"Unexpected token \`@\` (1:13) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {});" +`; + +exports[`class-expression.js - {"semi":false} [hermes] format 1`] = ` +"unrecognized character '@' (1:12) +> 1 | const a1 = (@deco class Foo {}); + | ^ + 2 | const a2 = (@deco class {}); + 3 | + 4 | (@deco class Foo {}); +Cause: unrecognized character '@' (1:12) +const a1 = (@deco class Foo {}); + ^" +`; + +exports[`class-expression.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const a1 = (@deco class Foo {}); +const a2 = (@deco class {}); + +(@deco class Foo {}); +(@deco class {}); + +const b1 = [] +;(@deco class Foo {}) + +const b2 = [] +;(@deco class {}) + +// This is not a \`ClassExpression\` but \`ClassDeclaration\` +@deco class Foo {} + +=====================================output===================================== +const a1 = + @deco + class Foo {} +const a2 = + @deco + class {} + +;( + @deco + class Foo {} +) +;( + @deco + class {} +) + +const b1 = [] +;( + @deco + class Foo {} +) + +const b2 = [] +;( + @deco + class {} +) + +// This is not a \`ClassExpression\` but \`ClassDeclaration\` +@deco +class Foo {} + +================================================================================ +`; + +exports[`class-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a1 = (@deco class Foo {}); +const a2 = (@deco class {}); + +(@deco class Foo {}); +(@deco class {}); + +const b1 = [] +;(@deco class Foo {}) + +const b2 = [] +;(@deco class {}) + +// This is not a \`ClassExpression\` but \`ClassDeclaration\` +@deco class Foo {} + +=====================================output===================================== +const a1 = + @deco + class Foo {}; +const a2 = + @deco + class {}; + +( + @deco + class Foo {} +); +( + @deco + class {} +); + +const b1 = []; +( + @deco + class Foo {} +); + +const b2 = []; +( + @deco + class {} +); + +// This is not a \`ClassExpression\` but \`ClassDeclaration\` +@deco +class Foo {} + +================================================================================ +`; + +exports[`member-expression.js [acorn] format 1`] = ` +"Unexpected character '@' (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: Unexpected character '@' (1:1)" +`; + +exports[`member-expression.js [espree] format 1`] = ` +"Unexpected character '@' (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: Unexpected character '@'" +`; + +exports[`member-expression.js [flow] format 1`] = ` +"Unexpected token \`@\` (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 |" +`; + +exports[`member-expression.js [hermes] format 1`] = ` +"unrecognized character '@' (1:1) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: unrecognized character '@' (1:1) +(@deco class Foo {}).name; + ^" +`; + +exports[`member-expression.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected character '@' (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: Unexpected character '@' (1:1)" +`; + +exports[`member-expression.js - {"semi":false} [espree] format 1`] = ` +"Unexpected character '@' (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: Unexpected character '@'" +`; + +exports[`member-expression.js - {"semi":false} [flow] format 1`] = ` +"Unexpected token \`@\` (1:2) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 |" +`; + +exports[`member-expression.js - {"semi":false} [hermes] format 1`] = ` +"unrecognized character '@' (1:1) +> 1 | (@deco class Foo {}).name; + | ^ + 2 | (@deco class {}).name; + 3 | +Cause: unrecognized character '@' (1:1) +(@deco class Foo {}).name; + ^" +`; + +exports[`member-expression.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +(@deco class Foo {}).name; +(@deco class {}).name; + +=====================================output===================================== +;( + @deco + class Foo {} +).name +;( + @deco + class {} +).name + +================================================================================ +`; + +exports[`member-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(@deco class Foo {}).name; +(@deco class {}).name; + +=====================================output===================================== +( + @deco + class Foo {} +).name; +( + @deco + class {} +).name; + +================================================================================ +`; + +exports[`super-class.js [acorn] format 1`] = ` +"Unexpected character '@' (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: Unexpected character '@' (1:19)" +`; + +exports[`super-class.js [espree] format 1`] = ` +"Unexpected character '@' (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: Unexpected character '@'" +`; + +exports[`super-class.js [flow] format 1`] = ` +"Unexpected token \`@\` (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 |" +`; + +exports[`super-class.js [hermes] format 1`] = ` +"unrecognized character '@' (1:19) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: unrecognized character '@' (1:19) +class Foo extends (@deco class Foo {}){} + ^" +`; + +exports[`super-class.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected character '@' (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: Unexpected character '@' (1:19)" +`; + +exports[`super-class.js - {"semi":false} [espree] format 1`] = ` +"Unexpected character '@' (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: Unexpected character '@'" +`; + +exports[`super-class.js - {"semi":false} [flow] format 1`] = ` +"Unexpected token \`@\` (1:20) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 |" +`; + +exports[`super-class.js - {"semi":false} [hermes] format 1`] = ` +"unrecognized character '@' (1:19) +> 1 | class Foo extends (@deco class Foo {}){} + | ^ + 2 | + 3 | class Foo extends (@deco class {}){} + 4 | +Cause: unrecognized character '@' (1:19) +class Foo extends (@deco class Foo {}){} + ^" +`; + +exports[`super-class.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Foo extends (@deco class Foo {}){} + +class Foo extends (@deco class {}){} + +=====================================output===================================== +class Foo extends ( + @deco + class Foo {} +) {} + +class Foo extends ( + @deco + class {} +) {} + +================================================================================ +`; + +exports[`super-class.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo extends (@deco class Foo {}){} + +class Foo extends (@deco class {}){} + +=====================================output===================================== +class Foo extends ( + @deco + class Foo {} +) {} + +class Foo extends ( + @deco + class {} +) {} + +================================================================================ +`; diff --git a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 38356821e791..000000000000 --- a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,475 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arguments.js [acorn] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js [espree] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js [flow] format 1`] = ` -"Unexpected token \`@\` (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js - {"semi":false} [espree] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js - {"semi":false} [flow] format 1`] = ` -"Unexpected token \`@\` (1:13) -> 1 | console.log(@deco class Foo {}) - | ^ - 2 | console.log(@deco class {}) - 3 |" -`; - -exports[`arguments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -console.log(@deco class Foo {}) -console.log(@deco class {}) - -=====================================output===================================== -console.log( - ( - @deco - class Foo {} - ) -) -console.log( - ( - @deco - class {} - ) -) - -================================================================================ -`; - -exports[`arguments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -console.log(@deco class Foo {}) -console.log(@deco class {}) - -=====================================output===================================== -console.log( - ( - @deco - class Foo {} - ) -); -console.log( - ( - @deco - class {} - ) -); - -================================================================================ -`; - -exports[`class-expression.js [acorn] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js [espree] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js [flow] format 1`] = ` -"Unexpected token \`@\` (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js - {"semi":false} [espree] format 1`] = ` -"Unexpected character '@' (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js - {"semi":false} [flow] format 1`] = ` -"Unexpected token \`@\` (1:13) -> 1 | const a1 = (@deco class Foo {}); - | ^ - 2 | const a2 = (@deco class {}); - 3 | - 4 | (@deco class Foo {});" -`; - -exports[`class-expression.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const a1 = (@deco class Foo {}); -const a2 = (@deco class {}); - -(@deco class Foo {}); -(@deco class {}); - -const b1 = [] -;(@deco class Foo {}) - -const b2 = [] -;(@deco class {}) - -// This is not a \`ClassExpression\` but \`ClassDeclaration\` -@deco class Foo {} - -=====================================output===================================== -const a1 = - ( - @deco - class Foo {} - ) -const a2 = - ( - @deco - class {} - ) - -;( - @deco - class Foo {} -) -;( - @deco - class {} -) - -const b1 = [] -;( - @deco - class Foo {} -) - -const b2 = [] -;( - @deco - class {} -) - -// This is not a \`ClassExpression\` but \`ClassDeclaration\` -@deco -class Foo {} - -================================================================================ -`; - -exports[`class-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a1 = (@deco class Foo {}); -const a2 = (@deco class {}); - -(@deco class Foo {}); -(@deco class {}); - -const b1 = [] -;(@deco class Foo {}) - -const b2 = [] -;(@deco class {}) - -// This is not a \`ClassExpression\` but \`ClassDeclaration\` -@deco class Foo {} - -=====================================output===================================== -const a1 = - ( - @deco - class Foo {} - ); -const a2 = - ( - @deco - class {} - ); - -( - @deco - class Foo {} -); -( - @deco - class {} -); - -const b1 = []; -( - @deco - class Foo {} -); - -const b2 = []; -( - @deco - class {} -); - -// This is not a \`ClassExpression\` but \`ClassDeclaration\` -@deco -class Foo {} - -================================================================================ -`; - -exports[`member-expression.js [acorn] format 1`] = ` -"Unexpected character '@' (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js [espree] format 1`] = ` -"Unexpected character '@' (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js [flow] format 1`] = ` -"Unexpected token \`@\` (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected character '@' (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js - {"semi":false} [espree] format 1`] = ` -"Unexpected character '@' (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js - {"semi":false} [flow] format 1`] = ` -"Unexpected token \`@\` (1:2) -> 1 | (@deco class Foo {}).name; - | ^ - 2 | (@deco class {}).name; - 3 |" -`; - -exports[`member-expression.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -(@deco class Foo {}).name; -(@deco class {}).name; - -=====================================output===================================== -;( - @deco - class Foo {} -).name -;( - @deco - class {} -).name - -================================================================================ -`; - -exports[`member-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(@deco class Foo {}).name; -(@deco class {}).name; - -=====================================output===================================== -( - @deco - class Foo {} -).name; -( - @deco - class {} -).name; - -================================================================================ -`; - -exports[`super-class.js [acorn] format 1`] = ` -"Unexpected character '@' (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js [espree] format 1`] = ` -"Unexpected character '@' (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js [flow] format 1`] = ` -"Unexpected token \`@\` (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected character '@' (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js - {"semi":false} [espree] format 1`] = ` -"Unexpected character '@' (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js - {"semi":false} [flow] format 1`] = ` -"Unexpected token \`@\` (1:20) -> 1 | class Foo extends (@deco class Foo {}){} - | ^ - 2 | - 3 | class Foo extends (@deco class {}){} - 4 |" -`; - -exports[`super-class.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo extends (@deco class Foo {}){} - -class Foo extends (@deco class {}){} - -=====================================output===================================== -class Foo extends ( - @deco - class Foo {} -) {} - -class Foo extends ( - @deco - class {} -) {} - -================================================================================ -`; - -exports[`super-class.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo extends (@deco class Foo {}){} - -class Foo extends (@deco class {}){} - -=====================================output===================================== -class Foo extends ( - @deco - class Foo {} -) {} - -class Foo extends ( - @deco - class {} -) {} - -================================================================================ -`; diff --git a/tests/format/js/decorators/class-expression/format.test.js b/tests/format/js/decorators/class-expression/format.test.js new file mode 100644 index 000000000000..929abd4c0109 --- /dev/null +++ b/tests/format/js/decorators/class-expression/format.test.js @@ -0,0 +1,12 @@ +const errors = { + flow: true, + hermes: true, + acorn: true, + espree: true, +}; + +runFormatTest(import.meta, ["babel", "flow", "typescript"], { errors }); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + semi: false, + errors, +}); diff --git a/tests/format/js/decorators/class-expression/jsfmt.spec.js b/tests/format/js/decorators/class-expression/jsfmt.spec.js deleted file mode 100644 index 028ed3fa8eac..000000000000 --- a/tests/format/js/decorators/class-expression/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -const errors = { - flow: true, - acorn: true, - espree: true, -}; - -run_spec(__dirname, ["babel", "flow", "typescript"], { errors }); -run_spec(__dirname, ["babel", "flow", "typescript"], { semi: false, errors }); diff --git a/tests/format/js/decorators/comments.js b/tests/format/js/decorators/comments.js index 8aa68576c591..8a647cdcf91d 100644 --- a/tests/format/js/decorators/comments.js +++ b/tests/format/js/decorators/comments.js @@ -29,3 +29,8 @@ export class AppModule {} @Bar() // C export class Bar{} + +class Something { + @Annotateme() + property; +} diff --git a/tests/format/js/decorators/format.test.js b/tests/format/js/decorators/format.test.js new file mode 100644 index 000000000000..d50e6d95846a --- /dev/null +++ b/tests/format/js/decorators/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { acorn: true, espree: true, flow: ["classes.js"], hermes: true }, +}); diff --git a/tests/format/js/decorators/jsfmt.spec.js b/tests/format/js/decorators/jsfmt.spec.js deleted file mode 100644 index f49386480b2f..000000000000 --- a/tests/format/js/decorators/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: ["multiple.js", "mobx.js"] }, -}); diff --git a/tests/format/js/decorators/member-expression.js b/tests/format/js/decorators/member-expression.js index 05baf20bc8d2..89eda88861f2 100644 --- a/tests/format/js/decorators/member-expression.js +++ b/tests/format/js/decorators/member-expression.js @@ -1,4 +1,16 @@ [ + class { + @(decorator) + method() {} + }, + class { + @(decorator()) + method() {} + }, + class { + @(decorator?.()) + method() {} + }, class { @(decorators[0]) method() {} @@ -19,6 +31,10 @@ @(decorators?.at(0)) method() {} }, + class { + @(decorators.at?.(0)) + method() {} + }, class { @(decorators.first) method() {} diff --git a/tests/format/js/decorators/mobx.js b/tests/format/js/decorators/mobx.js index 8a497af80622..2974474a586a 100644 --- a/tests/format/js/decorators/mobx.js +++ b/tests/format/js/decorators/mobx.js @@ -1,8 +1,8 @@ import {observable} from "mobx"; @observer class OrderLine { - @observable price:number = 0; - @observable amount:number = 1; + @observable price = 0; + @observable amount = 1; constructor(price) { this.price = price; @@ -25,12 +25,12 @@ import {observable} from "mobx"; setPrice(price) { this.price = price; } - + @computed @computed @computed @computed @computed @computed @computed get total() { return this.price * this.amount; } - @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; - - @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); + @action handleDecrease = (event) => this.count--; + + @action handleSomething = (event) => doSomething(); } diff --git a/tests/format/js/decorators/multiple.js b/tests/format/js/decorators/multiple.js index f35b7018f590..0a83753c91c9 100644 --- a/tests/format/js/decorators/multiple.js +++ b/tests/format/js/decorators/multiple.js @@ -1,15 +1,16 @@ -const dog = { +const dog = class { @readonly @nonenumerable @doubledValue - legs: 4, + legs = 4; @readonly @nonenumerable @doubledValue - eyes: 2 + eyes() {return 2} }; -const foo = { - @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName: "A very long string as value" +const foo = class { + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName = "A very long string as value" + @multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName() { "A very long string as value"} }; diff --git a/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap b/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..af97d294d8bf --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap @@ -0,0 +1,247 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js [acorn] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("foo"); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" +`; + +exports[`dynamic-import.js [espree] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("foo"); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta'" +`; + +exports[`dynamic-import.js [meriyah] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("foo"); + | ^^^^^ + 2 | +Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'" +`; + +exports[`dynamic-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import.defer("foo"); + +=====================================output===================================== +import.defer("foo"); + +================================================================================ +`; + +exports[`dynamic-import-attributes-expression.js [acorn] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("x", { with: { attr: "val" } }); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" +`; + +exports[`dynamic-import-attributes-expression.js [espree] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("x", { with: { attr: "val" } }); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta'" +`; + +exports[`dynamic-import-attributes-expression.js [meriyah] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.defer("x", { with: { attr: "val" } }); + | ^^^^^ + 2 | +Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'" +`; + +exports[`dynamic-import-attributes-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import.defer("x", { with: { attr: "val" } }); + +=====================================output===================================== +import.defer("x", { with: { attr: "val" } }); + +================================================================================ +`; + +exports[`import-defer.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`import-defer.js [espree] format 1`] = ` +"Unexpected token * (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: Unexpected token *" +`; + +exports[`import-defer.js [meriyah] format 1`] = ` +"Expected 'from' (1:14) +> 1 | import defer * as ns from "x"; + | ^ + 2 | +Cause: [1:13-1:14]: Expected 'from'" +`; + +exports[`import-defer.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import defer * as ns from "x"; + +=====================================output===================================== +import defer * as ns from "x"; + +================================================================================ +`; + +exports[`import-defer-attributes-declaration.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import defer * as ns from "x" with { attr: "val" }; + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`import-defer-attributes-declaration.js [espree] format 1`] = ` +"Unexpected token * (1:14) +> 1 | import defer * as ns from "x" with { attr: "val" }; + | ^ + 2 | +Cause: Unexpected token *" +`; + +exports[`import-defer-attributes-declaration.js [meriyah] format 1`] = ` +"Expected 'from' (1:14) +> 1 | import defer * as ns from "x" with { attr: "val" }; + | ^ + 2 | +Cause: [1:13-1:14]: Expected 'from'" +`; + +exports[`import-defer-attributes-declaration.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import defer * as ns from "x" with { attr: "val" }; + +=====================================output===================================== +import defer * as ns from "x" with { attr: "val" }; + +================================================================================ +`; + +exports[`no-default.js [__babel_estree] format 1`] = ` +"Only \`import defer * as x from "./module"\` is valid. (1:14) +> 1 | import defer x from "x"; + | ^ + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)" +`; + +exports[`no-default.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import defer x from "x"; + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`no-default.js [babel] format 1`] = ` +"Only \`import defer * as x from "./module"\` is valid. (1:14) +> 1 | import defer x from "x"; + | ^ + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)" +`; + +exports[`no-default.js [espree] format 1`] = ` +"Unexpected token x (1:14) +> 1 | import defer x from "x"; + | ^ + 2 | +Cause: Unexpected token x" +`; + +exports[`no-default.js [meriyah] format 1`] = ` +"Expected 'from' (1:14) +> 1 | import defer x from "x"; + | ^ + 2 | +Cause: [1:13-1:14]: Expected 'from'" +`; + +exports[`no-default.js [oxc] format 1`] = ` +"Expected \`from\` but found \`Identifier\` (1:14) +> 1 | import defer x from "x"; + | ^ + 2 |" +`; + +exports[`no-named.js [__babel_estree] format 1`] = ` +"Only \`import defer * as x from "./module"\` is valid. (1:16) +> 1 | import defer { x } from "x"; + | ^ + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)" +`; + +exports[`no-named.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import defer { x } from "x"; + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`no-named.js [babel] format 1`] = ` +"Only \`import defer * as x from "./module"\` is valid. (1:16) +> 1 | import defer { x } from "x"; + | ^ + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)" +`; + +exports[`no-named.js [espree] format 1`] = ` +"Unexpected token { (1:14) +> 1 | import defer { x } from "x"; + | ^ + 2 | +Cause: Unexpected token {" +`; + +exports[`no-named.js [meriyah] format 1`] = ` +"Expected 'from' (1:14) +> 1 | import defer { x } from "x"; + | ^ + 2 | +Cause: [1:13-1:14]: Expected 'from'" +`; + +exports[`no-named.js [oxc] format 1`] = ` +"Expected \`from\` but found \`{\` (1:14) +> 1 | import defer { x } from "x"; + | ^ + 2 |" +`; diff --git a/tests/format/js/deferred-import-evaluation/dynamic-import-attributes-expression.js b/tests/format/js/deferred-import-evaluation/dynamic-import-attributes-expression.js new file mode 100644 index 000000000000..999759d1e2a8 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/dynamic-import-attributes-expression.js @@ -0,0 +1 @@ +import.defer("x", { with: { attr: "val" } }); diff --git a/tests/format/js/deferred-import-evaluation/dynamic-import.js b/tests/format/js/deferred-import-evaluation/dynamic-import.js new file mode 100644 index 000000000000..a0939dce0f4a --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/dynamic-import.js @@ -0,0 +1 @@ +import.defer("foo"); diff --git a/tests/format/js/deferred-import-evaluation/format.test.js b/tests/format/js/deferred-import-evaluation/format.test.js new file mode 100644 index 000000000000..d3fc06873920 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/format.test.js @@ -0,0 +1,19 @@ +const importDeferTests = [ + "import-defer.js", + "import-defer-attributes-declaration.js", + "dynamic-import.js", + "dynamic-import-attributes-expression.js", +]; +const invalidSyntaxTests = ["no-default.js", "no-named.js"]; + +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: [...importDeferTests, ...invalidSyntaxTests], + espree: [...importDeferTests, ...invalidSyntaxTests], + meriyah: [...importDeferTests, ...invalidSyntaxTests], + oxc: invalidSyntaxTests, + "oxc-ts": invalidSyntaxTests, + babel: invalidSyntaxTests, + __babel_estree: invalidSyntaxTests, + }, +}); diff --git a/tests/format/js/deferred-import-evaluation/import-defer-attributes-declaration.js b/tests/format/js/deferred-import-evaluation/import-defer-attributes-declaration.js new file mode 100644 index 000000000000..e8e5628b5521 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/import-defer-attributes-declaration.js @@ -0,0 +1 @@ +import defer * as ns from "x" with { attr: "val" }; diff --git a/tests/format/js/deferred-import-evaluation/import-defer.js b/tests/format/js/deferred-import-evaluation/import-defer.js new file mode 100644 index 000000000000..806ae2bb7690 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/import-defer.js @@ -0,0 +1 @@ +import defer * as ns from "x"; diff --git a/tests/format/js/deferred-import-evaluation/no-default.js b/tests/format/js/deferred-import-evaluation/no-default.js new file mode 100644 index 000000000000..d96ed9fc96e9 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/no-default.js @@ -0,0 +1 @@ +import defer x from "x"; diff --git a/tests/format/js/deferred-import-evaluation/no-named.js b/tests/format/js/deferred-import-evaluation/no-named.js new file mode 100644 index 000000000000..5c307da2a7d5 --- /dev/null +++ b/tests/format/js/deferred-import-evaluation/no-named.js @@ -0,0 +1 @@ +import defer { x } from "x"; diff --git a/tests/format/js/destructuring-ignore/__snapshots__/format.test.js.snap b/tests/format/js/destructuring-ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6f432db4da51 --- /dev/null +++ b/tests/format/js/destructuring-ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,292 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ignore.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const { + // prettier-ignore + bar = 1, +} = foo + +const { + _, + // prettier-ignore + bar2 = 1, +} = foo + +/* comments */ +const { + // prettier-ignore + bar3 = 1, // comment +} = foo + +const { + // prettier-ignore + bar4 = 1, /* comment */ +} = foo + +const { + // prettier-ignore + bar5 = /* comment */ 1, +} = foo + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3] +}, + // prettier-ignore + bar7 = 1, +} = foo + +=====================================output===================================== +const { + // prettier-ignore + bar = 1, +} = foo; + +const { + _, + // prettier-ignore + bar2 = 1, +} = foo; + +/* comments */ +const { + // prettier-ignore + bar3 = 1, // comment +} = foo; + +const { + // prettier-ignore + bar4 = 1 /* comment */, +} = foo; + +const { + // prettier-ignore + bar5 = /* comment */ 1, +} = foo; + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo; + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3], + }, + // prettier-ignore + bar7 = 1, +} = foo; + +================================================================================ +`; + +exports[`ignore.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const { + // prettier-ignore + bar = 1, +} = foo + +const { + _, + // prettier-ignore + bar2 = 1, +} = foo + +/* comments */ +const { + // prettier-ignore + bar3 = 1, // comment +} = foo + +const { + // prettier-ignore + bar4 = 1, /* comment */ +} = foo + +const { + // prettier-ignore + bar5 = /* comment */ 1, +} = foo + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3] +}, + // prettier-ignore + bar7 = 1, +} = foo + +=====================================output===================================== +const { + // prettier-ignore + bar = 1, +} = foo; + +const { + _, + // prettier-ignore + bar2 = 1, +} = foo; + +/* comments */ +const { + // prettier-ignore + bar3 = 1, // comment +} = foo; + +const { + // prettier-ignore + bar4 = 1 /* comment */, +} = foo; + +const { + // prettier-ignore + bar5 = /* comment */ 1, +} = foo; + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo; + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3], + }, + // prettier-ignore + bar7 = 1, +} = foo; + +================================================================================ +`; + +exports[`ignore.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +const { + // prettier-ignore + bar = 1, +} = foo + +const { + _, + // prettier-ignore + bar2 = 1, +} = foo + +/* comments */ +const { + // prettier-ignore + bar3 = 1, // comment +} = foo + +const { + // prettier-ignore + bar4 = 1, /* comment */ +} = foo + +const { + // prettier-ignore + bar5 = /* comment */ 1, +} = foo + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3] +}, + // prettier-ignore + bar7 = 1, +} = foo + +=====================================output===================================== +const { + // prettier-ignore + bar = 1 +} = foo; + +const { + _, + // prettier-ignore + bar2 = 1 +} = foo; + +/* comments */ +const { + // prettier-ignore + bar3 = 1 // comment +} = foo; + +const { + // prettier-ignore + bar4 = 1 /* comment */ +} = foo; + +const { + // prettier-ignore + bar5 = /* comment */ 1 +} = foo; + +/* RestElement */ +const { + // prettier-ignore + ...bar6 +} = foo; + +// Nested +const { + baz: { + // prettier-ignore + foo2 = [1, 2, 3] + }, + // prettier-ignore + bar7 = 1 +} = foo; + +================================================================================ +`; diff --git a/tests/format/js/destructuring-ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/destructuring-ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4918aad523f2..000000000000 --- a/tests/format/js/destructuring-ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignore.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const { - // prettier-ignore - bar = 1, -} = foo - -const { - _, - // prettier-ignore - bar2 = 1, -} = foo - -/* comments */ -const { - // prettier-ignore - bar3 = 1, // comment -} = foo - -const { - // prettier-ignore - bar4 = 1, /* comment */ -} = foo - -const { - // prettier-ignore - bar5 = /* comment */ 1, -} = foo - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3] -}, - // prettier-ignore - bar7 = 1, -} = foo - -=====================================output===================================== -const { - // prettier-ignore - bar = 1, -} = foo; - -const { - _, - // prettier-ignore - bar2 = 1, -} = foo; - -/* comments */ -const { - // prettier-ignore - bar3 = 1, // comment -} = foo; - -const { - // prettier-ignore - bar4 = 1 /* comment */, -} = foo; - -const { - // prettier-ignore - bar5 = /* comment */ 1, -} = foo; - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo; - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3], - }, - // prettier-ignore - bar7 = 1, -} = foo; - -================================================================================ -`; - -exports[`ignore.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -const { - // prettier-ignore - bar = 1, -} = foo - -const { - _, - // prettier-ignore - bar2 = 1, -} = foo - -/* comments */ -const { - // prettier-ignore - bar3 = 1, // comment -} = foo - -const { - // prettier-ignore - bar4 = 1, /* comment */ -} = foo - -const { - // prettier-ignore - bar5 = /* comment */ 1, -} = foo - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3] -}, - // prettier-ignore - bar7 = 1, -} = foo - -=====================================output===================================== -const { - // prettier-ignore - bar = 1 -} = foo; - -const { - _, - // prettier-ignore - bar2 = 1 -} = foo; - -/* comments */ -const { - // prettier-ignore - bar3 = 1 // comment -} = foo; - -const { - // prettier-ignore - bar4 = 1 /* comment */ -} = foo; - -const { - // prettier-ignore - bar5 = /* comment */ 1 -} = foo; - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo; - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3] - }, - // prettier-ignore - bar7 = 1 -} = foo; - -================================================================================ -`; - -exports[`ignore.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { - // prettier-ignore - bar = 1, -} = foo - -const { - _, - // prettier-ignore - bar2 = 1, -} = foo - -/* comments */ -const { - // prettier-ignore - bar3 = 1, // comment -} = foo - -const { - // prettier-ignore - bar4 = 1, /* comment */ -} = foo - -const { - // prettier-ignore - bar5 = /* comment */ 1, -} = foo - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3] -}, - // prettier-ignore - bar7 = 1, -} = foo - -=====================================output===================================== -const { - // prettier-ignore - bar = 1, -} = foo; - -const { - _, - // prettier-ignore - bar2 = 1, -} = foo; - -/* comments */ -const { - // prettier-ignore - bar3 = 1, // comment -} = foo; - -const { - // prettier-ignore - bar4 = 1 /* comment */, -} = foo; - -const { - // prettier-ignore - bar5 = /* comment */ 1, -} = foo; - -/* RestElement */ -const { - // prettier-ignore - ...bar6 -} = foo; - -// Nested -const { - baz: { - // prettier-ignore - foo2 = [1, 2, 3], - }, - // prettier-ignore - bar7 = 1, -} = foo; - -================================================================================ -`; diff --git a/tests/format/js/destructuring-ignore/format.test.js b/tests/format/js/destructuring-ignore/format.test.js new file mode 100644 index 000000000000..cd8d8ff7c375 --- /dev/null +++ b/tests/format/js/destructuring-ignore/format.test.js @@ -0,0 +1,5 @@ +const parser = ["babel", "flow", "typescript"]; + +runFormatTest(import.meta, parser, { trailingComma: "es5" }); +runFormatTest(import.meta, parser, { trailingComma: "none" }); +runFormatTest(import.meta, parser, { trailingComma: "all" }); diff --git a/tests/format/js/destructuring-ignore/jsfmt.spec.js b/tests/format/js/destructuring-ignore/jsfmt.spec.js deleted file mode 100644 index 67d7fda657b9..000000000000 --- a/tests/format/js/destructuring-ignore/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -const parser = ["babel", "flow", "typescript"]; - -run_spec(__dirname, parser /*, { trailingComma: "es5" }*/); -run_spec(__dirname, parser, { trailingComma: "none" }); -run_spec(__dirname, parser, { trailingComma: "all" }); diff --git a/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap b/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4cacd419160c --- /dev/null +++ b/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap @@ -0,0 +1,491 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow-params.js [acorn] format 1`] = ` +"Unexpected token (3:11) + 1 | class C { + 2 | #x = 1; +> 3 | #p = ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: Unexpected token (3:10)" +`; + +exports[`arrow-params.js [espree] format 1`] = ` +"Unexpected token #x (3:11) + 1 | class C { + 2 | #x = 1; +> 3 | #p = ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: Unexpected token #x" +`; + +exports[`arrow-params.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (3:11) + 1 | class C { + 2 | #x = 1; +> 3 | #p = ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: [3:10-3:11]: Unexpected token: 'PrivateField'" +`; + +exports[`arrow-params.js [oxc] format 1`] = ` +"Unexpected token (3:11) + 1 | class C { + 2 | #x = 1; +> 3 | #p = ({ #x: x }) => {} + | ^^ + 4 | } + 5 |" +`; + +exports[`arrow-params.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + #p = ({ #x: x }) => {} +} + +=====================================output===================================== +class C { + #x = 1; + #p = ({ #x: x }) => {}; +} + +================================================================================ +`; + +exports[`assignment.js [acorn] format 1`] = ` +"Unexpected token (5:8) + 3 | m() { + 4 | let x; +> 5 | ({ #x: x } = this); + | ^ + 6 | } + 7 | } + 8 | +Cause: Unexpected token (5:7)" +`; + +exports[`assignment.js [espree] format 1`] = ` +"Unexpected token #x (5:8) + 3 | m() { + 4 | let x; +> 5 | ({ #x: x } = this); + | ^ + 6 | } + 7 | } + 8 | +Cause: Unexpected token #x" +`; + +exports[`assignment.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (5:8) + 3 | m() { + 4 | let x; +> 5 | ({ #x: x } = this); + | ^ + 6 | } + 7 | } + 8 | +Cause: [5:7-5:8]: Unexpected token: 'PrivateField'" +`; + +exports[`assignment.js [oxc] format 1`] = ` +"Unexpected token (5:8) + 3 | m() { + 4 | let x; +> 5 | ({ #x: x } = this); + | ^^ + 6 | } + 7 | } + 8 |" +`; + +exports[`assignment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + m() { + let x; + ({ #x: x } = this); + } +} + +=====================================output===================================== +class C { + #x = 1; + m() { + let x; + ({ #x: x } = this); + } +} + +================================================================================ +`; + +exports[`async-arrow-params.js [acorn] format 1`] = ` +"Unexpected token (3:17) + 1 | class C { + 2 | #x = 1; +> 3 | #p = async ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: Unexpected token (3:16)" +`; + +exports[`async-arrow-params.js [espree] format 1`] = ` +"Unexpected token #x (3:17) + 1 | class C { + 2 | #x = 1; +> 3 | #p = async ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: Unexpected token #x" +`; + +exports[`async-arrow-params.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (3:17) + 1 | class C { + 2 | #x = 1; +> 3 | #p = async ({ #x: x }) => {} + | ^ + 4 | } + 5 | +Cause: [3:16-3:17]: Unexpected token: 'PrivateField'" +`; + +exports[`async-arrow-params.js [oxc] format 1`] = ` +"Unexpected token (3:17) + 1 | class C { + 2 | #x = 1; +> 3 | #p = async ({ #x: x }) => {} + | ^^ + 4 | } + 5 |" +`; + +exports[`async-arrow-params.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + #p = async ({ #x: x }) => {} +} + +=====================================output===================================== +class C { + #x = 1; + #p = async ({ #x: x }) => {}; +} + +================================================================================ +`; + +exports[`bindings.js [acorn] format 1`] = ` +"Unexpected token (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token (4:11)" +`; + +exports[`bindings.js [espree] format 1`] = ` +"Unexpected token #x (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token #x" +`; + +exports[`bindings.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: [4:11-4:12]: Unexpected token: 'PrivateField'" +`; + +exports[`bindings.js [oxc] format 1`] = ` +"Unexpected token (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x} = this; + | ^^ + 5 | } + 6 | } + 7 |" +`; + +exports[`bindings.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + m() { + const {#x: x} = this; + } +} + +=====================================output===================================== +class C { + #x = 1; + m() { + const { #x: x } = this; + } +} + +================================================================================ +`; + +exports[`for-lhs.js [acorn] format 1`] = ` +"Unexpected token (5:11) + 3 | m() { + 4 | let x; +> 5 | for ({#x: x} of [this]); + | ^ + 6 | } + 7 | } + 8 | +Cause: Unexpected token (5:10)" +`; + +exports[`for-lhs.js [espree] format 1`] = ` +"Unexpected token #x (5:11) + 3 | m() { + 4 | let x; +> 5 | for ({#x: x} of [this]); + | ^ + 6 | } + 7 | } + 8 | +Cause: Unexpected token #x" +`; + +exports[`for-lhs.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (5:11) + 3 | m() { + 4 | let x; +> 5 | for ({#x: x} of [this]); + | ^ + 6 | } + 7 | } + 8 | +Cause: [5:10-5:11]: Unexpected token: 'PrivateField'" +`; + +exports[`for-lhs.js [oxc] format 1`] = ` +"Unexpected token (5:11) + 3 | m() { + 4 | let x; +> 5 | for ({#x: x} of [this]); + | ^^ + 6 | } + 7 | } + 8 |" +`; + +exports[`for-lhs.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + m() { + let x; + for ({#x: x} of [this]); + } +} + +=====================================output===================================== +class C { + #x = 1; + m() { + let x; + for ({ #x: x } of [this]); + } +} + +================================================================================ +`; + +exports[`nested-bindings.js [acorn] format 1`] = ` +"Unexpected token (4:17) + 2 | #x = 1; + 3 | m() { +> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token (4:16)" +`; + +exports[`nested-bindings.js [espree] format 1`] = ` +"Unexpected token #x (4:17) + 2 | #x = 1; + 3 | m() { +> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token #x" +`; + +exports[`nested-bindings.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (4:17) + 2 | #x = 1; + 3 | m() { +> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: [4:16-4:17]: Unexpected token: 'PrivateField'" +`; + +exports[`nested-bindings.js [oxc] format 1`] = ` +"Unexpected token (4:17) + 2 | #x = 1; + 3 | m() { +> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; + | ^^ + 5 | } + 6 | } + 7 |" +`; + +exports[`nested-bindings.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + m() { + const {x: { #x: [x] }, y: [...{ #x: y }]} = this; + } +} + +=====================================output===================================== +class C { + #x = 1; + m() { + const { + x: { + #x: [x], + }, + y: [...{ #x: y }], + } = this; + } +} + +================================================================================ +`; + +exports[`valid-multiple-bindings.js [acorn] format 1`] = ` +"Unexpected token (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x1, #x: x2 = x1 } = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token (4:11)" +`; + +exports[`valid-multiple-bindings.js [espree] format 1`] = ` +"Unexpected token #x (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x1, #x: x2 = x1 } = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: Unexpected token #x" +`; + +exports[`valid-multiple-bindings.js [meriyah] format 1`] = ` +"Unexpected token: 'PrivateField' (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x1, #x: x2 = x1 } = this; + | ^ + 5 | } + 6 | } + 7 | +Cause: [4:11-4:12]: Unexpected token: 'PrivateField'" +`; + +exports[`valid-multiple-bindings.js [oxc] format 1`] = ` +"Unexpected token (4:12) + 2 | #x = 1; + 3 | m() { +> 4 | const {#x: x1, #x: x2 = x1 } = this; + | ^^ + 5 | } + 6 | } + 7 |" +`; + +exports[`valid-multiple-bindings.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "babel-flow", "babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #x = 1; + m() { + const {#x: x1, #x: x2 = x1 } = this; + } +} + +=====================================output===================================== +class C { + #x = 1; + m() { + const { #x: x1, #x: x2 = x1 } = this; + } +} + +================================================================================ +`; diff --git a/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 43e7fa3a453b..000000000000 --- a/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow-params.js [acorn] format 1`] = ` -"Unexpected token (3:11) - 1 | class C { - 2 | #x = 1; -> 3 | #p = ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`arrow-params.js [espree] format 1`] = ` -"Unexpected token #x (3:11) - 1 | class C { - 2 | #x = 1; -> 3 | #p = ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`arrow-params.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (3:11) - 1 | class C { - 2 | #x = 1; -> 3 | #p = ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`arrow-params.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - #p = ({ #x: x }) => {} -} - -=====================================output===================================== -class C { - #x = 1; - #p = ({ #x: x }) => {}; -} - -================================================================================ -`; - -exports[`assignment.js [acorn] format 1`] = ` -"Unexpected token (5:8) - 3 | m() { - 4 | let x; -> 5 | ({ #x: x } = this); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`assignment.js [espree] format 1`] = ` -"Unexpected token #x (5:8) - 3 | m() { - 4 | let x; -> 5 | ({ #x: x } = this); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`assignment.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (5:8) - 3 | m() { - 4 | let x; -> 5 | ({ #x: x } = this); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`assignment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - m() { - let x; - ({ #x: x } = this); - } -} - -=====================================output===================================== -class C { - #x = 1; - m() { - let x; - ({ #x: x } = this); - } -} - -================================================================================ -`; - -exports[`async-arrow-params.js [acorn] format 1`] = ` -"Unexpected token (3:17) - 1 | class C { - 2 | #x = 1; -> 3 | #p = async ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`async-arrow-params.js [espree] format 1`] = ` -"Unexpected token #x (3:17) - 1 | class C { - 2 | #x = 1; -> 3 | #p = async ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`async-arrow-params.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (3:17) - 1 | class C { - 2 | #x = 1; -> 3 | #p = async ({ #x: x }) => {} - | ^ - 4 | } - 5 |" -`; - -exports[`async-arrow-params.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - #p = async ({ #x: x }) => {} -} - -=====================================output===================================== -class C { - #x = 1; - #p = async ({ #x: x }) => {}; -} - -================================================================================ -`; - -exports[`bindings.js [acorn] format 1`] = ` -"Unexpected token (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`bindings.js [espree] format 1`] = ` -"Unexpected token #x (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`bindings.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`bindings.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - m() { - const {#x: x} = this; - } -} - -=====================================output===================================== -class C { - #x = 1; - m() { - const { #x: x } = this; - } -} - -================================================================================ -`; - -exports[`for-lhs.js [acorn] format 1`] = ` -"Unexpected token (5:11) - 3 | m() { - 4 | let x; -> 5 | for ({#x: x} of [this]); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`for-lhs.js [espree] format 1`] = ` -"Unexpected token #x (5:11) - 3 | m() { - 4 | let x; -> 5 | for ({#x: x} of [this]); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`for-lhs.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (5:11) - 3 | m() { - 4 | let x; -> 5 | for ({#x: x} of [this]); - | ^ - 6 | } - 7 | } - 8 |" -`; - -exports[`for-lhs.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - m() { - let x; - for ({#x: x} of [this]); - } -} - -=====================================output===================================== -class C { - #x = 1; - m() { - let x; - for ({ #x: x } of [this]); - } -} - -================================================================================ -`; - -exports[`nested-bindings.js [acorn] format 1`] = ` -"Unexpected token (4:17) - 2 | #x = 1; - 3 | m() { -> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`nested-bindings.js [espree] format 1`] = ` -"Unexpected token #x (4:17) - 2 | #x = 1; - 3 | m() { -> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`nested-bindings.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (4:17) - 2 | #x = 1; - 3 | m() { -> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`nested-bindings.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - m() { - const {x: { #x: [x] }, y: [...{ #x: y }]} = this; - } -} - -=====================================output===================================== -class C { - #x = 1; - m() { - const { - x: { - #x: [x], - }, - y: [...{ #x: y }], - } = this; - } -} - -================================================================================ -`; - -exports[`valid-multiple-bindings.js [acorn] format 1`] = ` -"Unexpected token (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x1, #x: x2 = x1 } = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`valid-multiple-bindings.js [espree] format 1`] = ` -"Unexpected token #x (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x1, #x: x2 = x1 } = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`valid-multiple-bindings.js [meriyah] format 1`] = ` -"Unexpected token: 'PrivateField' (4:12) - 2 | #x = 1; - 3 | m() { -> 4 | const {#x: x1, #x: x2 = x1 } = this; - | ^ - 5 | } - 6 | } - 7 |" -`; - -exports[`valid-multiple-bindings.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "babel-flow", "babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #x = 1; - m() { - const {#x: x1, #x: x2 = x1 } = this; - } -} - -=====================================output===================================== -class C { - #x = 1; - m() { - const { #x: x1, #x: x2 = x1 } = this; - } -} - -================================================================================ -`; diff --git a/tests/format/js/destructuring-private-fields/format.test.js b/tests/format/js/destructuring-private-fields/format.test.js new file mode 100644 index 000000000000..9ba1253eb413 --- /dev/null +++ b/tests/format/js/destructuring-private-fields/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel", "babel-flow", "babel-ts"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/destructuring-private-fields/jsfmt.spec.js b/tests/format/js/destructuring-private-fields/jsfmt.spec.js deleted file mode 100644 index 08e01a9b7cc7..000000000000 --- a/tests/format/js/destructuring-private-fields/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "babel-flow", "babel-ts"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/destructuring/__snapshots__/format.test.js.snap b/tests/format/js/destructuring/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3630a9a3b408 --- /dev/null +++ b/tests/format/js/destructuring/__snapshots__/format.test.js.snap @@ -0,0 +1,148 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`destructuring.js [hermes] format 1`] = ` +"invalid assignment left-hand side (2:0) + 1 | const [one, two = null, three = null] = arr; +> 2 | a = ([s=1,]) => 1 + 3 | const { children, ...props } = this.props + 4 | + 5 | const { user: { firstName, lastName } } = this.props; +Cause: invalid assignment left-hand side (2:0) +a = ([s=1,]) => 1 +^" +`; + +exports[`destructuring.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const [one, two = null, three = null] = arr; +a = ([s=1,]) => 1 +const { children, ...props } = this.props + +const { user: { firstName, lastName } } = this.props; + +const { + name: { first, last }, + organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } } +} = user; + +function f({ data: { name } }) {} + +const UserComponent = function({ + name: { first, last }, + organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } }, +}) { + return +}; + +const { a, b, c, d: { e } } = someObject; + +try { + // code +} catch ({ data: { message }}) { + // code +} + +try { + // code +} catch ({ data: { message: { errors }}}) { + // code +} + +const obj = { + func(id, { blog: { title } }) { + return id + title; + }, +}; + +class A { + func(id, { blog: { title } }) { + return id + title; + } +} + +=====================================output===================================== +const [one, two = null, three = null] = arr; +a = ([s = 1]) => 1; +const { children, ...props } = this.props; + +const { + user: { firstName, lastName }, +} = this.props; + +const { + name: { first, last }, + organisation: { + address: { street: orgStreetAddress, postcode: orgPostcode }, + }, +} = user; + +function f({ data: { name } }) {} + +const UserComponent = function ({ + name: { first, last }, + organisation: { + address: { street: orgStreetAddress, postcode: orgPostcode }, + }, +}) { + return; +}; + +const { + a, + b, + c, + d: { e }, +} = someObject; + +try { + // code +} catch ({ data: { message } }) { + // code +} + +try { + // code +} catch ({ + data: { + message: { errors }, + }, +}) { + // code +} + +const obj = { + func(id, { blog: { title } }) { + return id + title; + }, +}; + +class A { + func(id, { blog: { title } }) { + return id + title; + } +} + +================================================================================ +`; + +exports[`issue-5988.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { foo, bar: bazAndSomething, quxIsLong } = someBigFunctionName("foo")("bar"); + +=====================================output===================================== +const { + foo, + bar: bazAndSomething, + quxIsLong, +} = someBigFunctionName("foo")("bar"); + +================================================================================ +`; diff --git a/tests/format/js/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/destructuring/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1659a2d8c6c2..000000000000 --- a/tests/format/js/destructuring/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,136 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`destructuring.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const [one, two = null, three = null] = arr; -a = ([s=1,]) => 1 -const { children, ...props } = this.props - -const { user: { firstName, lastName } } = this.props; - -const { - name: { first, last }, - organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } } -} = user; - -function f({ data: { name } }) {} - -const UserComponent = function({ - name: { first, last }, - organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } }, -}) { - return -}; - -const { a, b, c, d: { e } } = someObject; - -try { - // code -} catch ({ data: { message }}) { - // code -} - -try { - // code -} catch ({ data: { message: { errors }}}) { - // code -} - -const obj = { - func(id, { blog: { title } }) { - return id + title; - }, -}; - -class A { - func(id, { blog: { title } }) { - return id + title; - } -} - -=====================================output===================================== -const [one, two = null, three = null] = arr; -a = ([s = 1]) => 1; -const { children, ...props } = this.props; - -const { - user: { firstName, lastName }, -} = this.props; - -const { - name: { first, last }, - organisation: { - address: { street: orgStreetAddress, postcode: orgPostcode }, - }, -} = user; - -function f({ data: { name } }) {} - -const UserComponent = function ({ - name: { first, last }, - organisation: { - address: { street: orgStreetAddress, postcode: orgPostcode }, - }, -}) { - return; -}; - -const { - a, - b, - c, - d: { e }, -} = someObject; - -try { - // code -} catch ({ data: { message } }) { - // code -} - -try { - // code -} catch ({ - data: { - message: { errors }, - }, -}) { - // code -} - -const obj = { - func(id, { blog: { title } }) { - return id + title; - }, -}; - -class A { - func(id, { blog: { title } }) { - return id + title; - } -} - -================================================================================ -`; - -exports[`issue-5988.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { foo, bar: bazAndSomething, quxIsLong } = someBigFunctionName("foo")("bar"); - -=====================================output===================================== -const { - foo, - bar: bazAndSomething, - quxIsLong, -} = someBigFunctionName("foo")("bar"); - -================================================================================ -`; diff --git a/tests/format/js/destructuring/format.test.js b/tests/format/js/destructuring/format.test.js new file mode 100644 index 000000000000..3957a9ec1824 --- /dev/null +++ b/tests/format/js/destructuring/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + hermes: ["destructuring.js"], + }, +}); diff --git a/tests/format/js/destructuring/jsfmt.spec.js b/tests/format/js/destructuring/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/destructuring/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/directives/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/directives/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/directives/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/directives/__snapshots__/format.test.js.snap diff --git a/tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/directives/comments/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/directives/comments/__snapshots__/format.test.js.snap diff --git a/tests/format/js/directives/comments/format.test.js b/tests/format/js/directives/comments/format.test.js new file mode 100644 index 000000000000..dbd76b798ae9 --- /dev/null +++ b/tests/format/js/directives/comments/format.test.js @@ -0,0 +1,58 @@ +import { outdent } from "outdent"; +const indent = (text) => + text + .split("\n") + .map((line) => (line ? ` ${line}` : line)) + .join("\n"); + +const snippets = [ + "/* comment */ 'use strict';", + "'use strict' /* comment */;", + outdent` + // comment + 'use strict'; + `, + outdent` + 'use strict' // comment + `, + outdent` + 'use strict'; + /* comment */ + (function () {})(); + `, + outdent` + /* comment */ + 'use strict'; + (function () {})(); + `, + outdent` + 'use strict'; + // comment + (function () {})(); + `, + outdent` + // comment + 'use strict'; + (function () {})(); + `, +].flatMap((code) => [ + code, + outdent` + function foo() { + ${indent(code)} + } + `, +]); + +runFormatTest({ importMeta: import.meta, snippets }, [ + "babel", + "flow", + "typescript", +]); +runFormatTest( + { importMeta: import.meta, snippets }, + ["babel", "flow", "typescript"], + { + semi: false, + }, +); diff --git a/tests/format/js/directives/comments/jsfmt.spec.js b/tests/format/js/directives/comments/jsfmt.spec.js deleted file mode 100644 index e85b3df3ed9b..000000000000 --- a/tests/format/js/directives/comments/jsfmt.spec.js +++ /dev/null @@ -1,55 +0,0 @@ -const { outdent } = require("outdent"); -const indent = (text) => - text - .split("\n") - .map((line) => (line ? ` ${line}` : line)) - .join("\n"); -// TODO: Remove this when we drop support for Node.js v10 -// eslint-disable-next-line unicorn/prefer-spread -const flat = (array) => [].concat(...array); - -const snippets = flat( - [ - "/* comment */ 'use strict';", - "'use strict' /* comment */;", - outdent` - // comment - 'use strict'; - `, - outdent` - 'use strict' // comment - `, - outdent` - 'use strict'; - /* comment */ - (function () {})(); - `, - outdent` - /* comment */ - 'use strict'; - (function () {})(); - `, - outdent` - 'use strict'; - // comment - (function () {})(); - `, - outdent` - // comment - 'use strict'; - (function () {})(); - `, - ].map((code) => [ - code, - outdent` - function foo() { - ${indent(code)} - } - `, - ]) -); - -run_spec({ dirname: __dirname, snippets }, ["babel", "flow", "typescript"]); -run_spec({ dirname: __dirname, snippets }, ["babel", "flow", "typescript"], { - semi: false, -}); diff --git a/tests/format/js/directives/format.test.js b/tests/format/js/directives/format.test.js new file mode 100644 index 000000000000..38556bb5381c --- /dev/null +++ b/tests/format/js/directives/format.test.js @@ -0,0 +1,53 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + code: outdent` + 'use strict'; + + // comment + `, + output: + outdent` + "use strict"; + + // comment + ` + "\n", + }, + { + code: outdent` + 'use strict'; + // comment + `, + output: + outdent` + "use strict"; + // comment + ` + "\n", + }, + { + code: + outdent` + 'use strict'; + + // comment + ` + "\n", + output: + outdent` + "use strict"; + + // comment + ` + "\n", + }, + { + // should be kept as directive for all parsers https://github.com/prettier/prettier/issues/17458 + code: '"";', + output: '"";' + "\n", + }, + ], + }, + ["babel", "flow", "typescript"], +); diff --git a/tests/format/js/directives/jsfmt.spec.js b/tests/format/js/directives/jsfmt.spec.js deleted file mode 100644 index f5b37cd79521..000000000000 --- a/tests/format/js/directives/jsfmt.spec.js +++ /dev/null @@ -1,48 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - { - code: outdent` - 'use strict'; - - // comment - `, - output: - outdent` - "use strict"; - - // comment - ` + "\n", - }, - { - code: outdent` - 'use strict'; - // comment - `, - output: - outdent` - "use strict"; - // comment - ` + "\n", - }, - { - code: - outdent` - 'use strict'; - - // comment - ` + "\n", - output: - outdent` - "use strict"; - - // comment - ` + "\n", - }, - ], - }, - ["babel", "flow", "typescript"] -); diff --git a/tests/format/js/do/__snapshots__/format.test.js.snap b/tests/format/js/do/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8d98614ba0a2 --- /dev/null +++ b/tests/format/js/do/__snapshots__/format.test.js.snap @@ -0,0 +1,332 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call-arguments.js [acorn] format 1`] = ` +"Unexpected token (3:3) + 1 | // from https://github.com/babel/babel/pull/13122/ + 2 | expect( +> 3 | do { + | ^ + 4 | var bar = "foo"; + 5 | if (!bar) throw new Error( + 6 | "unreachable" +Cause: Unexpected token (3:2)" +`; + +exports[`call-arguments.js [espree] format 1`] = ` +"Unexpected token do (3:3) + 1 | // from https://github.com/babel/babel/pull/13122/ + 2 | expect( +> 3 | do { + | ^ + 4 | var bar = "foo"; + 5 | if (!bar) throw new Error( + 6 | "unreachable" +Cause: Unexpected token do" +`; + +exports[`call-arguments.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (3:3) + 1 | // from https://github.com/babel/babel/pull/13122/ + 2 | expect( +> 3 | do { + | ^^ + 4 | var bar = "foo"; + 5 | if (!bar) throw new Error( + 6 | "unreachable" +Cause: [3:2-3:4]: Unexpected token: 'do'" +`; + +exports[`call-arguments.js [oxc] format 1`] = ` +"Unexpected token (3:3) + 1 | // from https://github.com/babel/babel/pull/13122/ + 2 | expect( +> 3 | do { + | ^^ + 4 | var bar = "foo"; + 5 | if (!bar) throw new Error( + 6 | "unreachable"" +`; + +exports[`call-arguments.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +// from https://github.com/babel/babel/pull/13122/ +expect( + do { + var bar = "foo"; + if (!bar) throw new Error( + "unreachable" + ) + bar; + } +).toBe("foo"); +expect(bar).toBe("foo"); + +var x = do { + var bar = "foo"; + if (!bar) throw new Error( + "unreachable" + ) + bar; +}; + +expect( + do { + var bar = "foo"; + bar; + } +).toBe("foo"); +expect(bar).toBe("foo"); + +var x = do { + var bar = "foo"; + bar; +}; + +expect( + () => do { + () => { + var bar = "foo"; + }; + bar; + } +).toThrow(ReferenceError); + +=====================================output===================================== +// from https://github.com/babel/babel/pull/13122/ +expect(do { + var bar = "foo"; + if (!bar) throw new Error("unreachable"); + bar; +}).toBe("foo"); +expect(bar).toBe("foo"); + +var x = do { + var bar = "foo"; + if (!bar) throw new Error("unreachable"); + bar; +}; + +expect(do { + var bar = "foo"; + bar; +}).toBe("foo"); +expect(bar).toBe("foo"); + +var x = do { + var bar = "foo"; + bar; +}; + +expect( + () => do { + () => { + var bar = "foo"; + }; + bar; + }, +).toThrow(ReferenceError); + +================================================================================ +`; + +exports[`do.js [acorn] format 1`] = ` +"Unexpected token (3:5) + 1 | const envSpecific = { + 2 | domain: +> 3 | do { + | ^ + 4 | if(env === 'production') 'https://abc.mno.com/'; + 5 | else if(env === 'development') 'http://localhost:4000'; + 6 | } +Cause: Unexpected token (3:4)" +`; + +exports[`do.js [espree] format 1`] = ` +"Unexpected token do (3:5) + 1 | const envSpecific = { + 2 | domain: +> 3 | do { + | ^ + 4 | if(env === 'production') 'https://abc.mno.com/'; + 5 | else if(env === 'development') 'http://localhost:4000'; + 6 | } +Cause: Unexpected token do" +`; + +exports[`do.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (3:5) + 1 | const envSpecific = { + 2 | domain: +> 3 | do { + | ^^ + 4 | if(env === 'production') 'https://abc.mno.com/'; + 5 | else if(env === 'development') 'http://localhost:4000'; + 6 | } +Cause: [3:4-3:6]: Unexpected token: 'do'" +`; + +exports[`do.js [oxc] format 1`] = ` +"Unexpected token (3:5) + 1 | const envSpecific = { + 2 | domain: +> 3 | do { + | ^^ + 4 | if(env === 'production') 'https://abc.mno.com/'; + 5 | else if(env === 'development') 'http://localhost:4000'; + 6 | }" +`; + +exports[`do.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const envSpecific = { + domain: + do { + if(env === 'production') 'https://abc.mno.com/'; + else if(env === 'development') 'http://localhost:4000'; + } +}; + +let x = do { + let tmp = f(); + tmp * tmp + 1 +}; + +let y = do { + if (foo()) { f() } + else if (bar()) { g() } + else { h() } +}; + +function foo() { + return ( + <nav> + <Home /> + { + do { + if (loggedIn) { + <LogoutButton /> + } else { + <LoginButton /> + } + } + } + </nav> + ); +} + +(do {}); +(do {} + 1); +(1 + do {}); +() => do {}; + +(do { + switch(0) { + case 0: "foo"; + case 1: break; + } +}); + +() => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +() => ( ) => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +a =>b=> c => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +=====================================output===================================== +const envSpecific = { + domain: do { + if (env === "production") "https://abc.mno.com/"; + else if (env === "development") "http://localhost:4000"; + }, +}; + +let x = do { + let tmp = f(); + tmp * tmp + 1; +}; + +let y = do { + if (foo()) { + f(); + } else if (bar()) { + g(); + } else { + h(); + } +}; + +function foo() { + return ( + <nav> + <Home /> + {do { + if (loggedIn) { + <LogoutButton />; + } else { + <LoginButton />; + } + }} + </nav> + ); +} + +(do {}); +(do {}) + 1; +1 + do {}; +() => do {}; + +(do { + switch (0) { + case 0: + "foo"; + case 1: + break; + } +}); + +() => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +() => () => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +(a) => (b) => (c) => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +================================================================================ +`; diff --git a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c45caccc8275..000000000000 --- a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,276 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`call-arguments.js [acorn] format 1`] = ` -"Unexpected token (3:3) - 1 | // from https://github.com/babel/babel/pull/13122/ - 2 | expect( -> 3 | do { - | ^ - 4 | var bar = "foo"; - 5 | if (!bar) throw new Error( - 6 | "unreachable"" -`; - -exports[`call-arguments.js [espree] format 1`] = ` -"Unexpected token do (3:3) - 1 | // from https://github.com/babel/babel/pull/13122/ - 2 | expect( -> 3 | do { - | ^ - 4 | var bar = "foo"; - 5 | if (!bar) throw new Error( - 6 | "unreachable"" -`; - -exports[`call-arguments.js [meriyah] format 1`] = ` -"Unexpected token: 'do' (3:4) - 1 | // from https://github.com/babel/babel/pull/13122/ - 2 | expect( -> 3 | do { - | ^ - 4 | var bar = "foo"; - 5 | if (!bar) throw new Error( - 6 | "unreachable"" -`; - -exports[`call-arguments.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// from https://github.com/babel/babel/pull/13122/ -expect( - do { - var bar = "foo"; - if (!bar) throw new Error( - "unreachable" - ) - bar; - } -).toBe("foo"); -expect(bar).toBe("foo"); - -var x = do { - var bar = "foo"; - if (!bar) throw new Error( - "unreachable" - ) - bar; -}; - -expect( - do { - var bar = "foo"; - bar; - } -).toBe("foo"); -expect(bar).toBe("foo"); - -var x = do { - var bar = "foo"; - bar; -}; - -expect( - () => do { - () => { - var bar = "foo"; - }; - bar; - } -).toThrow(ReferenceError); - -=====================================output===================================== -// from https://github.com/babel/babel/pull/13122/ -expect(do { - var bar = "foo"; - if (!bar) throw new Error("unreachable"); - bar; -}).toBe("foo"); -expect(bar).toBe("foo"); - -var x = do { - var bar = "foo"; - if (!bar) throw new Error("unreachable"); - bar; -}; - -expect(do { - var bar = "foo"; - bar; -}).toBe("foo"); -expect(bar).toBe("foo"); - -var x = do { - var bar = "foo"; - bar; -}; - -expect( - () => do { - () => { - var bar = "foo"; - }; - bar; - } -).toThrow(ReferenceError); - -================================================================================ -`; - -exports[`do.js [acorn] format 1`] = ` -"Unexpected token (3:5) - 1 | const envSpecific = { - 2 | domain: -> 3 | do { - | ^ - 4 | if(env === 'production') 'https://abc.mno.com/'; - 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" -`; - -exports[`do.js [espree] format 1`] = ` -"Unexpected token do (3:5) - 1 | const envSpecific = { - 2 | domain: -> 3 | do { - | ^ - 4 | if(env === 'production') 'https://abc.mno.com/'; - 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" -`; - -exports[`do.js [meriyah] format 1`] = ` -"Unexpected token: 'do' (3:6) - 1 | const envSpecific = { - 2 | domain: -> 3 | do { - | ^ - 4 | if(env === 'production') 'https://abc.mno.com/'; - 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" -`; - -exports[`do.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const envSpecific = { - domain: - do { - if(env === 'production') 'https://abc.mno.com/'; - else if(env === 'development') 'http://localhost:4000'; - } -}; - -let x = do { - let tmp = f(); - tmp * tmp + 1 -}; - -let y = do { - if (foo()) { f() } - else if (bar()) { g() } - else { h() } -}; - -function foo() { - return ( - <nav> - <Home /> - { - do { - if (loggedIn) { - <LogoutButton /> - } else { - <LoginButton /> - } - } - } - </nav> - ); -} - -(do {}); -(do {} + 1); -(1 + do {}); -() => do {}; - -(do { - switch(0) { - case 0: "foo"; - case 1: break; - } -}); - -() => do { - var obj = { foo: "bar", bar: "foo" }; - for (var key in obj) { - obj[key]; - } -}; - -=====================================output===================================== -const envSpecific = { - domain: do { - if (env === "production") "https://abc.mno.com/"; - else if (env === "development") "http://localhost:4000"; - }, -}; - -let x = do { - let tmp = f(); - tmp * tmp + 1; -}; - -let y = do { - if (foo()) { - f(); - } else if (bar()) { - g(); - } else { - h(); - } -}; - -function foo() { - return ( - <nav> - <Home /> - {do { - if (loggedIn) { - <LogoutButton />; - } else { - <LoginButton />; - } - }} - </nav> - ); -} - -(do {}); -(do {}) + 1; -1 + do {}; -() => do {}; - -(do { - switch (0) { - case 0: - "foo"; - case 1: - break; - } -}); - -() => do { - var obj = { foo: "bar", bar: "foo" }; - for (var key in obj) { - obj[key]; - } -}; - -================================================================================ -`; diff --git a/tests/format/js/do/do.js b/tests/format/js/do/do.js index e2b497108029..8e368c09d9c8 100644 --- a/tests/format/js/do/do.js +++ b/tests/format/js/do/do.js @@ -52,3 +52,17 @@ function foo() { obj[key]; } }; + +() => ( ) => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; + +a =>b=> c => do { + var obj = { foo: "bar", bar: "foo" }; + for (var key in obj) { + obj[key]; + } +}; diff --git a/tests/format/js/do/format.test.js b/tests/format/js/do/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/do/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/do/jsfmt.spec.js b/tests/format/js/do/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/do/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..80c769f95f1c --- /dev/null +++ b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap @@ -0,0 +1,165 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`assertions.js [flow] format 1`] = ` +"Unexpected token \`,\`, expected the token \`)\` (1:20) +> 1 | import("./foo.json", { assert: { type: "json" } }); + | ^ + 2 |" +`; + +exports[`assertions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { assert: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", { assert: { type: "json" } }); + +================================================================================ +`; + +exports[`import-phase.js [acorn] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source(\`data:text/javascript, + | ^ + 2 | console.log("RUN"); + 3 | \`) + 4 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" +`; + +exports[`import-phase.js [espree] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source(\`data:text/javascript, + | ^ + 2 | console.log("RUN"); + 3 | \`) + 4 | +Cause: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-phase.js [flow] format 1`] = ` +"Unexpected identifier, expected the identifier \`meta\` (1:8) +> 1 | import.source(\`data:text/javascript, + | ^^^^^^ + 2 | console.log("RUN"); + 3 | \`) + 4 |" +`; + +exports[`import-phase.js [hermes] format 1`] = ` +"'meta' expected in member expression (1:7) +> 1 | import.source(\`data:text/javascript, + | ^ + 2 | console.log("RUN"); + 3 | \`) + 4 | +Cause: 'meta' expected in member expression (1:7) +import.source(\`data:text/javascript, + ^~~~~~ +note: start of member expression (1:0) +import.source(\`data:text/javascript, +^" +`; + +exports[`import-phase.js [meriyah] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source(\`data:text/javascript, + | ^^^^^^ + 2 | console.log("RUN"); + 3 | \`) + 4 | +Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-phase.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import.source(\`data:text/javascript, + console.log("RUN"); +\`) + +import.source(String.raw\`data:text/javascript, + console.log("RUN"); +\`) + +=====================================output===================================== +import.source(\`data:text/javascript, + console.log("RUN"); +\`); + +import.source(String.raw\`data:text/javascript, + console.log("RUN"); +\`); + +================================================================================ +`; + +exports[`template-literal.js [flow] format 1`] = ` +"Unexpected token \`import\`, expected the end of an expression statement (\`;\`) (1:20) +> 1 | module = await import(\`data:text/javascript, + | ^^^^^^ + 2 | console.log("RUN"); + 3 | \`); + 4 |" +`; + +exports[`template-literal.js [hermes] format 1`] = ` +"unexpected token after assignment expression (1:19) +> 1 | module = await import(\`data:text/javascript, + | ^ + 2 | console.log("RUN"); + 3 | \`); + 4 | +Cause: unexpected token after assignment expression (1:19) +module = await import(\`data:text/javascript, + ^" +`; + +exports[`template-literal.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module = await import(\`data:text/javascript, + console.log("RUN"); +\`); + +module = await import(String.raw\`data:text/javascript, + console.log("RUN"); +\`); + +=====================================output===================================== +module = await import(\`data:text/javascript, + console.log("RUN"); +\`); + +module = await import(String.raw\`data:text/javascript, + console.log("RUN"); +\`); + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("module.js"); +import("module.js").then((a) => a); + +=====================================output===================================== +import("module.js"); +import("module.js").then((a) => a); + +================================================================================ +`; diff --git a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2f14318ed2cd..000000000000 --- a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`assertions.js [acorn] format 1`] = ` -"Unexpected token (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`assertions.js [espree] format 1`] = ` -"Unexpected token , (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`assertions.js [flow] format 1`] = ` -"Unexpected token \`,\`, expected the token \`)\` (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`assertions.js [meriyah] format 1`] = ` -"Expected ')' (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`assertions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import("./foo.json", { assert: { type: "json" } }); - -=====================================output===================================== -import("./foo.json", { assert: { type: "json" } }); - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import("module.js"); -import("module.js").then((a) => a); - -=====================================output===================================== -import("module.js"); -import("module.js").then((a) => a); - -================================================================================ -`; diff --git a/tests/format/js/dynamic-import/format.test.js b/tests/format/js/dynamic-import/format.test.js new file mode 100644 index 000000000000..ced22507d753 --- /dev/null +++ b/tests/format/js/dynamic-import/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + flow: ["assertions.js", "template-literal.js", "import-phase.js"], + hermes: ["template-literal.js", "import-phase.js"], + acorn: ["import-phase.js"], + espree: ["import-phase.js"], + meriyah: ["import-phase.js"], + }, +}); diff --git a/tests/format/js/dynamic-import/import-phase.js b/tests/format/js/dynamic-import/import-phase.js new file mode 100644 index 000000000000..fe96b30c4701 --- /dev/null +++ b/tests/format/js/dynamic-import/import-phase.js @@ -0,0 +1,7 @@ +import.source(`data:text/javascript, + console.log("RUN"); +`) + +import.source(String.raw`data:text/javascript, + console.log("RUN"); +`) diff --git a/tests/format/js/dynamic-import/jsfmt.spec.js b/tests/format/js/dynamic-import/jsfmt.spec.js deleted file mode 100644 index 75e3467c6b0b..000000000000 --- a/tests/format/js/dynamic-import/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - flow: ["assertions.js"], - acorn: ["assertions.js"], - espree: ["assertions.js"], - meriyah: ["assertions.js"], - }, -}); diff --git a/tests/format/js/dynamic-import/template-literal.js b/tests/format/js/dynamic-import/template-literal.js new file mode 100644 index 000000000000..bf159aea5176 --- /dev/null +++ b/tests/format/js/dynamic-import/template-literal.js @@ -0,0 +1,7 @@ +module = await import(`data:text/javascript, + console.log("RUN"); +`); + +module = await import(String.raw`data:text/javascript, + console.log("RUN"); +`); diff --git a/tests/format/js/empty-paren-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/empty-paren-comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/empty-paren-comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/empty-paren-comment/__snapshots__/format.test.js.snap diff --git a/tests/format/js/empty-paren-comment/format.test.js b/tests/format/js/empty-paren-comment/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/empty-paren-comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/empty-paren-comment/jsfmt.spec.js b/tests/format/js/empty-paren-comment/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/empty-paren-comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/empty-statement/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/empty-statement/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/empty-statement/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/empty-statement/__snapshots__/format.test.js.snap diff --git a/tests/format/js/empty-statement/format.test.js b/tests/format/js/empty-statement/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/empty-statement/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/empty-statement/jsfmt.spec.js b/tests/format/js/empty-statement/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/empty-statement/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/empty/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/empty/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/empty/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/empty/__snapshots__/format.test.js.snap diff --git a/tests/format/js/empty/format.test.js b/tests/format/js/empty/format.test.js new file mode 100644 index 000000000000..8c1fb22cff06 --- /dev/null +++ b/tests/format/js/empty/format.test.js @@ -0,0 +1,31 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + ...[ + // empty + "", + // empty lines + "\n", + "\n\n\n\n", + // semicolons + ";", + ";;;;", + ";\n", + ";\n\n;;;\n", + ].map((code) => ({ code, output: "" })), + // comments + "// comment", + "/* comment */", + "// comment\n", + "/* comment */\n", + "\n// comment\n", + "\n/* comment */\n", + "// comment\n;", + "/* comment */\n;", + ";\n// comment\n", + "\n;/* comment */\n", + ], + }, + ["babel", "flow", "typescript"], +); diff --git a/tests/format/js/empty/jsfmt.spec.js b/tests/format/js/empty/jsfmt.spec.js deleted file mode 100644 index 0672272d9774..000000000000 --- a/tests/format/js/empty/jsfmt.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - ...[ - // empty - "", - // empty lines - "\n", - "\n\n\n\n", - // semicolons - ";", - ";;;;", - ";\n", - ";\n\n;;;\n", - ].map((code) => ({ code, output: "" })), - // comments - "// comment", - "/* comment */", - "// comment\n", - "/* comment */\n", - "\n// comment\n", - "\n/* comment */\n", - "// comment\n;", - "/* comment */\n;", - ";\n// comment\n", - "\n;/* comment */\n", - ], - }, - ["babel", "flow", "typescript"] -); diff --git a/tests/format/js/end-of-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/end-of-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/end-of-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/end-of-line/__snapshots__/format.test.js.snap diff --git a/tests/format/js/end-of-line/format.test.js b/tests/format/js/end-of-line/format.test.js new file mode 100644 index 000000000000..665fcb18f603 --- /dev/null +++ b/tests/format/js/end-of-line/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel"], { endOfLine: "lf" }); +runFormatTest(import.meta, ["babel"], { endOfLine: "cr" }); +runFormatTest(import.meta, ["babel"], { endOfLine: "crlf" }); diff --git a/tests/format/js/end-of-line/jsfmt.spec.js b/tests/format/js/end-of-line/jsfmt.spec.js deleted file mode 100644 index ee8f5b520ce3..000000000000 --- a/tests/format/js/end-of-line/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { endOfLine: "lf" }); -run_spec(__dirname, ["babel"], { endOfLine: "cr" }); -run_spec(__dirname, ["babel"], { endOfLine: "crlf" }); diff --git a/tests/format/js/eol/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/eol/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/eol/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/eol/__snapshots__/format.test.js.snap diff --git a/tests/format/js/eol/format.test.js b/tests/format/js/eol/format.test.js new file mode 100644 index 000000000000..bbdca4c02940 --- /dev/null +++ b/tests/format/js/eol/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel"], { endOfLine: "lf" }); +runFormatTest(import.meta, ["babel"], { endOfLine: "crlf" }); +runFormatTest(import.meta, ["babel"], { endOfLine: "cr" }); +runFormatTest(import.meta, ["babel"], { endOfLine: "auto" }); diff --git a/tests/format/js/eol/jsfmt.spec.js b/tests/format/js/eol/jsfmt.spec.js deleted file mode 100644 index 98d86cf6f319..000000000000 --- a/tests/format/js/eol/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["babel"], { endOfLine: "lf" }); -run_spec(__dirname, ["babel"], { endOfLine: "crlf" }); -run_spec(__dirname, ["babel"], { endOfLine: "cr" }); -run_spec(__dirname, ["babel"], { endOfLine: "auto" }); diff --git a/tests/format/js/es6modules/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/es6modules/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/es6modules/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/es6modules/__snapshots__/format.test.js.snap diff --git a/tests/format/js/es6modules/format.test.js b/tests/format/js/es6modules/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/es6modules/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/es6modules/jsfmt.spec.js b/tests/format/js/es6modules/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/es6modules/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9318ad720953 --- /dev/null +++ b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap @@ -0,0 +1,1375 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`for-await-using-of-comments.js [flow] format 1`] = ` +"Unexpected token \`await\`, expected the token \`(\` (1:19) +> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; + | ^^^^^ + 2 |" +`; + +exports[`for-await-using-of-comments.js [hermes] format 1`] = ` +"'(' expected after 'for' (1:18) +> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; + | ^ + 2 | +Cause: '(' expected after 'for' (1:18) +/*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; + ~~~~~~~~~~~~^" +`; + +exports[`for-await-using-of-comments.js [meriyah] format 1`] = ` +"for await (... of ...) is only valid in async functions and async generators (1:51) +> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; + | ^^ + 2 | +Cause: [1:50-1:52]: for await (... of ...) is only valid in async functions and async generators" +`; + +exports[`for-await-using-of-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; + +=====================================output===================================== +/*1*/ for await (/* 2 */ /*3*/ /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/ /*9*/); + +================================================================================ +`; + +exports[`invalid-duplicate-using-bindings.js [acorn] format 1`] = ` +"Identifier 'f' has already been declared (2:20) + 1 | { +> 2 | using f = foo(), f = foo(); + | ^ + 3 | } + 4 | { + 5 | using g = foo(); +Cause: Identifier 'f' has already been declared (2:19)" +`; + +exports[`invalid-duplicate-using-bindings.js [espree] format 1`] = ` +"Identifier 'f' has already been declared (2:20) + 1 | { +> 2 | using f = foo(), f = foo(); + | ^ + 3 | } + 4 | { + 5 | using g = foo(); +Cause: Identifier 'f' has already been declared" +`; + +exports[`invalid-duplicate-using-bindings.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9) + 1 | { +> 2 | using f = foo(), f = foo(); + | ^ + 3 | } + 4 | { + 5 | using g = foo();" +`; + +exports[`invalid-duplicate-using-bindings.js [hermes] format 1`] = ` +"';' expected (2:8) + 1 | { +> 2 | using f = foo(), f = foo(); + | ^ + 3 | } + 4 | { + 5 | using g = foo(); +Cause: ';' expected (2:8) + using f = foo(), f = foo(); + ^" +`; + +exports[`invalid-duplicate-using-bindings.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:9) + 1 | { +> 2 | using f = foo(), f = foo(); + | ^ + 3 | } + 4 | { + 5 | using g = foo(); +Cause: [2:8-2:9]: Unexpected token: 'identifier'" +`; + +exports[`invalid-duplicate-using-bindings.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + using f = foo(), f = foo(); +} +{ + using g = foo(); + using g = foo(); +} + +=====================================output===================================== +{ + using f = foo(), + f = foo(); +} +{ + using g = foo(); + using g = foo(); +} + +================================================================================ +`; + +exports[`invalid-script-top-level-using-binding.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:7) +> 1 | using x = bar(); + | ^ + 2 |" +`; + +exports[`invalid-script-top-level-using-binding.js [hermes] format 1`] = ` +"';' expected (1:6) +> 1 | using x = bar(); + | ^ + 2 | +Cause: ';' expected (1:6) +using x = bar(); + ^" +`; + +exports[`invalid-script-top-level-using-binding.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:7) +> 1 | using x = bar(); + | ^ + 2 | +Cause: [1:6-1:7]: Unexpected token: 'identifier'" +`; + +exports[`invalid-script-top-level-using-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +using x = bar(); + +=====================================output===================================== +using x = bar(); + +================================================================================ +`; + +exports[`using-declarations.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:17) + 1 | { +> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo() + | ^ + 3 | } + 4 | + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);" +`; + +exports[`using-declarations.js [hermes] format 1`] = ` +"';' expected (2:16) + 1 | { +> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo() + | ^ + 3 | } + 4 | + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); +Cause: ';' expected (2:16) + using /* 1 */ a = foo(), /* 2 */ b = foo() + ^" +`; + +exports[`using-declarations.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:17) + 1 | { +> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo() + | ^ + 3 | } + 4 | + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); +Cause: [2:16-2:17]: Unexpected token: 'identifier'" +`; + +exports[`using-declarations.js [typescript] format 1`] = ` +"'using' declarations may not be initialized in for statement. (5:19) + 3 | } + 4 | +> 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); + | ^^^^^^^^^ + 6 | + 7 | for(using /* 1 */ foo of bar()); + 8 | +Cause: 'using' declarations may not be initialized in for statement." +`; + +exports[`using-declarations.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + using /* 1 */ a = foo(), /* 2 */ b = foo() +} + +for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); + +for(using /* 1 */ foo of bar()); + +=====================================output===================================== +{ + using /* 1 */ a = foo(), + /* 2 */ b = foo(); +} + +for (using /* 1 */ a = foo(), /* 2 */ b = foo(); ; ); + +for (using /* 1 */ foo of bar()); + +================================================================================ +`; + +exports[`valid-await-expr-using.js [acorn] format 1`] = ` +"Unexpected token (2:14) + 1 | async function f() { +> 2 | await using[x]; + | ^ + 3 | await using.x + await using(x) ? await using?.x : await using\`x\`; + 4 | } + 5 | +Cause: Unexpected token (2:13)" +`; + +exports[`valid-await-expr-using.js [espree] format 1`] = ` +"Unexpected token [ (2:14) + 1 | async function f() { +> 2 | await using[x]; + | ^ + 3 | await using.x + await using(x) ? await using?.x : await using\`x\`; + 4 | } + 5 | +Cause: Unexpected token [" +`; + +exports[`valid-await-expr-using.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using[x]; + await using.x + await using(x) ? await using?.x : await using\`x\`; +} + +=====================================output===================================== +async function f() { + await using[x]; + (await using.x) + (await using(x)) ? await using?.x : await using\`x\`; +} + +================================================================================ +`; + +exports[`valid-await-expr-using-in.js [acorn] format 1`] = ` +"Unexpected keyword 'in' (2:15) + 1 | async function f() { +> 2 | await using in foo; + | ^ + 3 | } + 4 | +Cause: Unexpected keyword 'in' (2:14)" +`; + +exports[`valid-await-expr-using-in.js [espree] format 1`] = ` +"Unexpected keyword 'in' (2:15) + 1 | async function f() { +> 2 | await using in foo; + | ^ + 3 | } + 4 | +Cause: Unexpected keyword 'in'" +`; + +exports[`valid-await-expr-using-in.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using in foo; +} + +=====================================output===================================== +async function f() { + (await using) in foo; +} + +================================================================================ +`; + +exports[`valid-await-expr-using-instanceof.js [acorn] format 1`] = ` +"Unexpected keyword 'instanceof' (2:15) + 1 | async function f() { +> 2 | await using instanceof foo; + | ^ + 3 | } + 4 | +Cause: Unexpected keyword 'instanceof' (2:14)" +`; + +exports[`valid-await-expr-using-instanceof.js [espree] format 1`] = ` +"Unexpected keyword 'instanceof' (2:15) + 1 | async function f() { +> 2 | await using instanceof foo; + | ^ + 3 | } + 4 | +Cause: Unexpected keyword 'instanceof'" +`; + +exports[`valid-await-expr-using-instanceof.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using instanceof foo; +} + +=====================================output===================================== +async function f() { + (await using) instanceof foo; +} + +================================================================================ +`; + +exports[`valid-await-using-asi-assignment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using + using = h(); +} + +=====================================output===================================== +async function f() { + await using; + using = h(); +} + +================================================================================ +`; + +exports[`valid-await-using-binding-basic.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15) + 1 | async function f() { +> 2 | await using basic = getReader(); + | ^^^^^ + 3 | } + 4 |" +`; + +exports[`valid-await-using-binding-basic.js [hermes] format 1`] = ` +"';' expected (2:14) + 1 | async function f() { +> 2 | await using basic = getReader(); + | ^ + 3 | } + 4 | +Cause: ';' expected (2:14) + await using basic = getReader(); + ^" +`; + +exports[`valid-await-using-binding-basic.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:15) + 1 | async function f() { +> 2 | await using basic = getReader(); + | ^^^^^ + 3 | } + 4 | +Cause: [2:14-2:19]: Unexpected token: 'identifier'" +`; + +exports[`valid-await-using-binding-basic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using basic = getReader(); +} + +=====================================output===================================== +async function f() { + await using basic = getReader(); +} + +================================================================================ +`; + +exports[`valid-await-using-binding-escaped.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15) + 1 | async function f() { +> 2 | await using \\u0061b = c; + | ^^^^^^^ + 3 | } + 4 |" +`; + +exports[`valid-await-using-binding-escaped.js [hermes] format 1`] = ` +"';' expected (2:14) + 1 | async function f() { +> 2 | await using \\u0061b = c; + | ^ + 3 | } + 4 | +Cause: ';' expected (2:14) + await using \\u0061b = c; + ^" +`; + +exports[`valid-await-using-binding-escaped.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:15) + 1 | async function f() { +> 2 | await using \\u0061b = c; + | ^^^^^^^ + 3 | } + 4 | +Cause: [2:14-2:21]: Unexpected token: 'identifier'" +`; + +exports[`valid-await-using-binding-escaped.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using \\u0061b = c; +} + +=====================================output===================================== +async function f() { + await using ab = c; +} + +================================================================================ +`; + +exports[`valid-await-using-binding-non-bmp.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15) + 1 | async function f() { +> 2 | await using 𠮷 = foo(); + | ^ + 3 | } + 4 |" +`; + +exports[`valid-await-using-binding-non-bmp.js [hermes] format 1`] = ` +"';' expected (2:14) + 1 | async function f() { +> 2 | await using 𠮷 = foo(); + | ^ + 3 | } + 4 | +Cause: ';' expected (2:14) + await using 𠮷 = foo();" +`; + +exports[`valid-await-using-binding-non-bmp.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:15) + 1 | async function f() { +> 2 | await using 𠮷 = foo(); + | ^^ + 3 | } + 4 | +Cause: [2:14-2:16]: Unexpected token: 'identifier'" +`; + +exports[`valid-await-using-binding-non-bmp.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using 𠮷 = foo(); +} + +=====================================output===================================== +async function f() { + await using 𠮷 = foo(); +} + +================================================================================ +`; + +exports[`valid-await-using-binding-using.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15) + 1 | async function f() { +> 2 | await using using = of; + | ^^^^^ + 3 | for (await using using of of); + 4 | } + 5 |" +`; + +exports[`valid-await-using-binding-using.js [hermes] format 1`] = ` +"';' expected (2:14) + 1 | async function f() { +> 2 | await using using = of; + | ^ + 3 | for (await using using of of); + 4 | } + 5 | +Cause: ';' expected (2:14) + await using using = of; + ^" +`; + +exports[`valid-await-using-binding-using.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:15) + 1 | async function f() { +> 2 | await using using = of; + | ^^^^^ + 3 | for (await using using of of); + 4 | } + 5 | +Cause: [2:14-2:19]: Unexpected token: 'identifier'" +`; + +exports[`valid-await-using-binding-using.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + await using using = of; + for (await using using of of); +} + +=====================================output===================================== +async function f() { + await using using = of; + for (await using using of of); +} + +================================================================================ +`; + +exports[`valid-await-using-comments.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (3:28) + 1 | async function f() { + 2 | { +> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; + | ^ + 4 | } + 5 | { + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;" +`; + +exports[`valid-await-using-comments.js [hermes] format 1`] = ` +"';' expected (3:27) + 1 | async function f() { + 2 | { +> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; + | ^ + 4 | } + 5 | { + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +Cause: ';' expected (3:27) + /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; + ^" +`; + +exports[`valid-await-using-comments.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (3:28) + 1 | async function f() { + 2 | { +> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; + | ^ + 4 | } + 5 | { + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +Cause: [3:27-3:28]: Unexpected token: 'identifier'" +`; + +exports[`valid-await-using-comments.js [typescript] format 1`] = ` +"'await using' declarations may not be initialized in for statement. (6:42) + 4 | } + 5 | { +> 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; + | ^^^^^^^^^^^^^ + 7 | } + 8 | { + 9 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; +Cause: 'await using' declarations may not be initialized in for statement." +`; + +exports[`valid-await-using-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { +{ + /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; +} +{ + /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +} +{ + /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; +} +{ + /*0*/for/*1*/await/*2*/(/*3*/await/*4*/using/*5*/b/*6*/of/*7*/x/*8*/)/*9*/; +} +} + +=====================================output===================================== +async function f() { + { + /*0*/ await using /*1*/ /*2*/ b /*3*/ = /*4*/ f(); /*5*/ + } + { + /*0*/ for ( + /*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ = + /*6*/ x /*7*/ /*8*/ /*9*/ /*10*/; + ; + + ); + } + { + /*0*/ for (/*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ of /*6*/ x /*7*/ /*8*/); + } + { + /*0*/ for await (/*1*/ /*2*/ /*3*/ await using /*4*/ /*5*/ b /*6*/ of /*7*/ x /*8*/ /*9*/); + } +} + +================================================================================ +`; + +exports[`valid-for-await-using-binding-escaped-of-of.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TODO: Fix this test +// for await (using \\u006ff of of); + +=====================================output===================================== +// TODO: Fix this test +// for await (using \\u006ff of of); + +================================================================================ +`; + +exports[`valid-for-using-binding-escaped-of-of.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TODO: Fix this test +// for (using o\\u0066 of of); + +=====================================output===================================== +// TODO: Fix this test +// for (using o\\u0066 of of); + +================================================================================ +`; + +exports[`valid-for-using-binding-of-of.js [flow] format 1`] = ` +"Invalid left-hand side in for-of (2:8) + 1 | async function f() { +> 2 | for (await using of of of); + | ^^^^^^^^^^^ + 3 | for await (await using of of of); + 4 | } + 5 |" +`; + +exports[`valid-for-using-binding-of-of.js [hermes] format 1`] = ` +"')' expected after 'for(... in/of ...' (2:25) + 1 | async function f() { +> 2 | for (await using of of of); + | ^ + 3 | for await (await using of of of); + 4 | } + 5 | +Cause: ')' expected after 'for(... in/of ...' (2:25) + for (await using of of of); + ~~~~~~~~~~~~~~~~~~~^" +`; + +exports[`valid-for-using-binding-of-of.js [meriyah] format 1`] = ` +"Invalid left-hand side in for-of (2:20) + 1 | async function f() { +> 2 | for (await using of of of); + | ^^ + 3 | for await (await using of of of); + 4 | } + 5 | +Cause: [2:19-2:21]: Invalid left-hand side in for-of" +`; + +exports[`valid-for-using-binding-of-of.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + for (await using of of of); + for await (await using of of of); +} + +=====================================output===================================== +async function f() { + for (await using of of of); + for await (await using of of of); +} + +================================================================================ +`; + +exports[`valid-for-using-declaration.js [flow] format 1`] = ` +"Unexpected identifier, expected the token \`;\` (2:20) + 1 | async function f() { +> 2 | for (await using basic = reader();;); + | ^^^^^ + 3 | } + 4 |" +`; + +exports[`valid-for-using-declaration.js [hermes] format 1`] = ` +"';' or 'in' expected inside 'for' (2:19) + 1 | async function f() { +> 2 | for (await using basic = reader();;); + | ^ + 3 | } + 4 | +Cause: ';' or 'in' expected inside 'for' (2:19) + for (await using basic = reader();;); + ~~~~~~~~~~~~~~~~~^" +`; + +exports[`valid-for-using-declaration.js [meriyah] format 1`] = ` +"Expected ';' (2:20) + 1 | async function f() { +> 2 | for (await using basic = reader();;); + | ^^^^^ + 3 | } + 4 | +Cause: [2:19-2:24]: Expected ';'" +`; + +exports[`valid-for-using-declaration.js [typescript] format 1`] = ` +"'await using' declarations may not be initialized in for statement. (2:20) + 1 | async function f() { +> 2 | for (await using basic = reader();;); + | ^^^^^^^^^^^^^^^^ + 3 | } + 4 | +Cause: 'await using' declarations may not be initialized in for statement." +`; + +exports[`valid-for-using-declaration.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f() { + for (await using basic = reader();;); +} + +=====================================output===================================== +async function f() { + for (await using basic = reader(); ; ); +} + +================================================================================ +`; + +exports[`valid-module-block-top-level-await-using-binding.js [acorn] format 1`] = ` +"Unexpected token (1:18) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 | +Cause: Unexpected token (1:17)" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [espree] format 1`] = ` +"Unexpected token { (1:18) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 | +Cause: Unexpected token {" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [flow] format 1`] = ` +"Unexpected token \`{\`, expected the token \`;\` (1:18) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [hermes] format 1`] = ` +"';' expected (1:17) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 | +Cause: ';' expected (1:17) +const m = module { + ^" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:18) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 | +Cause: [1:17-1:18]: Unexpected token: '{'" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [oxc-ts] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-await-using-binding.js [typescript] format 1`] = ` +"',' expected. (1:18) +> 1 | const m = module { + | ^ + 2 | await using foo = bar(); + 3 | } + 4 | +Cause: ',' expected." +`; + +exports[`valid-module-block-top-level-await-using-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const m = module { + await using foo = bar(); +} + +=====================================output===================================== +const m = module { + await using foo = bar(); +}; + +================================================================================ +`; + +exports[`valid-module-block-top-level-using-binding.js [acorn] format 1`] = ` +"Unexpected token (1:8) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 | +Cause: Unexpected token (1:7)" +`; + +exports[`valid-module-block-top-level-using-binding.js [espree] format 1`] = ` +"Unexpected token { (1:8) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 | +Cause: Unexpected token {" +`; + +exports[`valid-module-block-top-level-using-binding.js [flow] format 1`] = ` +"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (1:8) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-using-binding.js [hermes] format 1`] = ` +"';' expected (1:7) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 | +Cause: ';' expected (1:7) +module { + ^" +`; + +exports[`valid-module-block-top-level-using-binding.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:8) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 | +Cause: [1:7-1:8]: Unexpected token: '{'" +`; + +exports[`valid-module-block-top-level-using-binding.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-using-binding.js [oxc-ts] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 |" +`; + +exports[`valid-module-block-top-level-using-binding.js [typescript] format 1`] = ` +"Namespace must be given a name. (1:8) +> 1 | module { + | ^ + 2 | using foo = bar(); + 3 | } + 4 | +Cause: Namespace must be given a name." +`; + +exports[`valid-module-block-top-level-using-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module { + using foo = bar(); +} + +=====================================output===================================== +module { + using foo = bar(); +}; + +================================================================================ +`; + +exports[`valid-using-as-identifier-computed-member.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +using [x] = 0; +for (using [x] of []); + +=====================================output===================================== +using[x] = 0; +for (using[x] of []); + +================================================================================ +`; + +exports[`valid-using-as-identifier-expression-statement.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +using +reader = getReader() + +=====================================output===================================== +using; +reader = getReader(); + +================================================================================ +`; + +exports[`valid-using-as-identifier-for-await-of.js [flow] format 1`] = ` +"Unexpected token \`await\`, expected the token \`(\` (1:5) +> 1 | for await (using of of); + | ^^^^^ + 2 |" +`; + +exports[`valid-using-as-identifier-for-await-of.js [hermes] format 1`] = ` +"'(' expected after 'for' (1:4) +> 1 | for await (using of of); + | ^ + 2 | +Cause: '(' expected after 'for' (1:4) +for await (using of of); +~~~~^" +`; + +exports[`valid-using-as-identifier-for-await-of.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for await (using of of); + +=====================================output===================================== +for await (using of of); + +================================================================================ +`; + +exports[`valid-using-as-identifier-for-in.js [acorn] format 1`] = ` +"Unexpected keyword 'in' (1:12) +> 1 | for (using in []); + | ^ + 2 | for (using.foo in []); + 3 | for (using().foo in []); + 4 | for (using\`\`.foo in []); +Cause: Unexpected keyword 'in' (1:11)" +`; + +exports[`valid-using-as-identifier-for-in.js [espree] format 1`] = ` +"Unexpected keyword 'in' (1:12) +> 1 | for (using in []); + | ^ + 2 | for (using.foo in []); + 3 | for (using().foo in []); + 4 | for (using\`\`.foo in []); +Cause: Unexpected keyword 'in'" +`; + +exports[`valid-using-as-identifier-for-in.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (using in []); +for (using.foo in []); +for (using().foo in []); +for (using\`\`.foo in []); + +=====================================output===================================== +for (using in []); +for (using.foo in []); +for (using().foo in []); +for (using\`\`.foo in []); + +================================================================================ +`; + +exports[`valid-using-as-identifier-for-init.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for ( + using; + reader = getReader();); + +=====================================output===================================== +for (using; (reader = getReader()); ); + +================================================================================ +`; + +exports[`valid-using-as-identifier-for-of.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (using of of); +for (using.foo of of); +for (using().foo of of); +for (using\`\`.foo of of); + +=====================================output===================================== +for (using of of); +for (using.foo of of); +for (using().foo of of); +for (using\`\`.foo of of); + +================================================================================ +`; + +exports[`valid-using-as-identifier-in.js [acorn] format 1`] = ` +"Unexpected keyword 'in' (1:7) +> 1 | using in using instanceof using; + | ^ + 2 | +Cause: Unexpected keyword 'in' (1:6)" +`; + +exports[`valid-using-as-identifier-in.js [espree] format 1`] = ` +"Unexpected keyword 'in' (1:7) +> 1 | using in using instanceof using; + | ^ + 2 | +Cause: Unexpected keyword 'in'" +`; + +exports[`valid-using-as-identifier-in.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +using in using instanceof using; + +=====================================output===================================== +using in using instanceof using; + +================================================================================ +`; + +exports[`valid-using-binding-basic.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9) + 1 | { +> 2 | using basic = getReader(); + | ^^^^^ + 3 | } + 4 |" +`; + +exports[`valid-using-binding-basic.js [hermes] format 1`] = ` +"';' expected (2:8) + 1 | { +> 2 | using basic = getReader(); + | ^ + 3 | } + 4 | +Cause: ';' expected (2:8) + using basic = getReader(); + ^" +`; + +exports[`valid-using-binding-basic.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:9) + 1 | { +> 2 | using basic = getReader(); + | ^^^^^ + 3 | } + 4 | +Cause: [2:8-2:13]: Unexpected token: 'identifier'" +`; + +exports[`valid-using-binding-basic.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + using basic = getReader(); +} + +=====================================output===================================== +{ + using basic = getReader(); +} + +================================================================================ +`; + +exports[`valid-using-binding-escaped.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:9) +> 1 | { using \\u0061b = c; } + | ^^^^^^^ + 2 |" +`; + +exports[`valid-using-binding-escaped.js [hermes] format 1`] = ` +"';' expected (1:8) +> 1 | { using \\u0061b = c; } + | ^ + 2 | +Cause: ';' expected (1:8) +{ using \\u0061b = c; } + ^" +`; + +exports[`valid-using-binding-escaped.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:9) +> 1 | { using \\u0061b = c; } + | ^^^^^^^ + 2 | +Cause: [1:8-1:15]: Unexpected token: 'identifier'" +`; + +exports[`valid-using-binding-escaped.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ using \\u0061b = c; } + +=====================================output===================================== +{ + using ab = c; +} + +================================================================================ +`; + +exports[`valid-using-binding-non-bmp.js [acorn] format 1`] = ` +"Unexpected token (1:9) +> 1 | { using 𠮷 = foo(); } + | ^ + 2 | +Cause: Unexpected token (1:8)" +`; + +exports[`valid-using-binding-non-bmp.js [espree] format 1`] = ` +"Unexpected token 𠮷 (1:9) +> 1 | { using 𠮷 = foo(); } + | ^ + 2 | +Cause: Unexpected token 𠮷" +`; + +exports[`valid-using-binding-non-bmp.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:9) +> 1 | { using 𠮷 = foo(); } + | ^ + 2 |" +`; + +exports[`valid-using-binding-non-bmp.js [hermes] format 1`] = ` +"';' expected (1:8) +> 1 | { using 𠮷 = foo(); } + | ^ + 2 | +Cause: ';' expected (1:8) +{ using 𠮷 = foo(); }" +`; + +exports[`valid-using-binding-non-bmp.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:9) +> 1 | { using 𠮷 = foo(); } + | ^^ + 2 | +Cause: [1:8-1:10]: Unexpected token: 'identifier'" +`; + +exports[`valid-using-binding-non-bmp.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ using 𠮷 = foo(); } + +=====================================output===================================== +{ + using 𠮷 = foo(); +} + +================================================================================ +`; + +exports[`valid-using-binding-using.js [flow] format 1`] = ` +"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9) + 1 | { +> 2 | using using = of; + | ^^^^^ + 3 | for (using using of of); + 4 | } + 5 |" +`; + +exports[`valid-using-binding-using.js [hermes] format 1`] = ` +"';' expected (2:8) + 1 | { +> 2 | using using = of; + | ^ + 3 | for (using using of of); + 4 | } + 5 | +Cause: ';' expected (2:8) + using using = of; + ^" +`; + +exports[`valid-using-binding-using.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:9) + 1 | { +> 2 | using using = of; + | ^^^^^ + 3 | for (using using of of); + 4 | } + 5 | +Cause: [2:8-2:13]: Unexpected token: 'identifier'" +`; + +exports[`valid-using-binding-using.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + using using = of; + for (using using of of); +} + +=====================================output===================================== +{ + using using = of; + for (using using of of); +} + +================================================================================ +`; diff --git a/tests/format/js/explicit-resource-management/for-await-using-of-comments.js b/tests/format/js/explicit-resource-management/for-await-using-of-comments.js new file mode 100644 index 000000000000..97230845f53d --- /dev/null +++ b/tests/format/js/explicit-resource-management/for-await-using-of-comments.js @@ -0,0 +1 @@ +/*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; diff --git a/tests/format/js/explicit-resource-management/format.test.js b/tests/format/js/explicit-resource-management/format.test.js new file mode 100644 index 000000000000..653273f3ad48 --- /dev/null +++ b/tests/format/js/explicit-resource-management/format.test.js @@ -0,0 +1,121 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + flow: [ + "for-await-using-of-comments.js", + "invalid-duplicate-using-bindings.js", + "invalid-script-top-level-using-binding.js", + "using-declarations.js", + // "valid-for-await-using-binding-escaped-of-of.js", + // "valid-for-using-binding-escaped-of-of.js", + "valid-module-block-top-level-using-binding.js", + "valid-using-as-identifier-for-await-of.js", + "valid-using-binding-basic.js", + "valid-using-binding-escaped.js", + "valid-using-binding-non-bmp.js", + "valid-using-binding-using.js", + + "valid-await-using-binding-basic.js", + "valid-await-using-binding-escaped.js", + "valid-await-using-binding-non-bmp.js", + "valid-await-using-binding-using.js", + "valid-await-using-comments.js", + "valid-for-lhs-await-as-identifier.js", + "valid-for-using-binding-of-of.js", + "valid-for-using-declaration.js", + "valid-module-block-top-level-await-using-binding.js", + ], + hermes: [ + "for-await-using-of-comments.js", + "invalid-duplicate-using-bindings.js", + "invalid-script-top-level-using-binding.js", + "using-declarations.js", + // "valid-for-await-using-binding-escaped-of-of.js", + // "valid-for-using-binding-escaped-of-of.js", + "valid-module-block-top-level-using-binding.js", + "valid-using-as-identifier-for-await-of.js", + "valid-using-binding-basic.js", + "valid-using-binding-escaped.js", + "valid-using-binding-non-bmp.js", + "valid-using-binding-using.js", + + "valid-await-using-binding-basic.js", + "valid-await-using-binding-escaped.js", + "valid-await-using-binding-non-bmp.js", + "valid-await-using-binding-using.js", + "valid-await-using-comments.js", + "valid-for-lhs-await-as-identifier.js", + "valid-for-using-binding-of-of.js", + "valid-for-using-declaration.js", + "valid-module-block-top-level-await-using-binding.js", + ], + typescript: [ + // https://github.com/typescript-eslint/typescript-eslint/blob/4f34d0ba34474926ba1eed623704b583a037f886/packages/typescript-estree/src/convert.ts#L1035-L1050 + "valid-for-using-declaration.js", + "valid-await-using-comments.js", + "using-declarations.js", + + // TypeScript does not support module expr + "valid-module-block-top-level-using-binding.js", + "valid-module-block-top-level-await-using-binding.js", + ], + acorn: [ + "invalid-duplicate-using-bindings.js", + // "invalid-script-top-level-using-binding.js", + "valid-await-expr-using-in.js", + "valid-await-expr-using-instanceof.js", + "valid-await-expr-using.js", + "valid-module-block-top-level-using-binding.js", + "valid-module-block-top-level-await-using-binding.js", + "valid-using-as-identifier-for-in.js", + "valid-using-as-identifier-in.js", + "valid-using-binding-non-bmp.js", + ], + espree: [ + "invalid-duplicate-using-bindings.js", + // "invalid-script-top-level-using-binding.js", + "valid-await-expr-using-in.js", + "valid-await-expr-using-instanceof.js", + "valid-await-expr-using.js", + "valid-module-block-top-level-using-binding.js", + "valid-module-block-top-level-await-using-binding.js", + "valid-using-as-identifier-for-in.js", + "valid-using-as-identifier-in.js", + "valid-using-binding-non-bmp.js", + ], + meriyah: [ + "for-await-using-of-comments.js", + "invalid-duplicate-using-bindings.js", + "invalid-script-top-level-using-binding.js", + "using-declarations.js", + // "valid-for-await-using-binding-escaped-of-of.js", + // "valid-for-using-binding-escaped-of-of.js", + "valid-module-block-top-level-using-binding.js", + "valid-using-binding-basic.js", + "valid-using-binding-escaped.js", + "valid-using-binding-non-bmp.js", + "valid-using-binding-using.js", + + "valid-await-using-binding-basic.js", + "valid-await-using-binding-escaped.js", + "valid-await-using-binding-non-bmp.js", + "valid-await-using-binding-using.js", + "valid-await-using-comments.js", + "valid-for-lhs-await-as-identifier.js", + "valid-for-using-binding-of-of.js", + "valid-for-using-declaration.js", + "valid-module-block-top-level-await-using-binding.js", + ], + oxc: [ + // "invalid-duplicate-using-bindings.js", + // "invalid-script-top-level-using-binding.js", + "valid-module-block-top-level-using-binding.js", + "valid-module-block-top-level-await-using-binding.js", + ], + "oxc-ts": [ + // "invalid-duplicate-using-bindings.js", + // "invalid-script-top-level-using-binding.js", + "valid-module-block-top-level-using-binding.js", + "valid-module-block-top-level-await-using-binding.js", + ], + }, +}); diff --git a/tests/format/js/explicit-resource-management/invalid-duplicate-using-bindings.js b/tests/format/js/explicit-resource-management/invalid-duplicate-using-bindings.js new file mode 100644 index 000000000000..833b376dd31b --- /dev/null +++ b/tests/format/js/explicit-resource-management/invalid-duplicate-using-bindings.js @@ -0,0 +1,7 @@ +{ + using f = foo(), f = foo(); +} +{ + using g = foo(); + using g = foo(); +} diff --git a/tests/format/js/explicit-resource-management/invalid-script-top-level-using-binding.js b/tests/format/js/explicit-resource-management/invalid-script-top-level-using-binding.js new file mode 100644 index 000000000000..e33689ba7080 --- /dev/null +++ b/tests/format/js/explicit-resource-management/invalid-script-top-level-using-binding.js @@ -0,0 +1 @@ +using x = bar(); diff --git a/tests/format/js/explicit-resource-management/using-declarations.js b/tests/format/js/explicit-resource-management/using-declarations.js new file mode 100644 index 000000000000..508806aee5c6 --- /dev/null +++ b/tests/format/js/explicit-resource-management/using-declarations.js @@ -0,0 +1,7 @@ +{ + using /* 1 */ a = foo(), /* 2 */ b = foo() +} + +for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); + +for(using /* 1 */ foo of bar()); diff --git a/tests/format/js/explicit-resource-management/valid-await-expr-using-in.js b/tests/format/js/explicit-resource-management/valid-await-expr-using-in.js new file mode 100644 index 000000000000..7dcf9e0239b2 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-expr-using-in.js @@ -0,0 +1,3 @@ +async function f() { + await using in foo; +} diff --git a/tests/format/js/explicit-resource-management/valid-await-expr-using-instanceof.js b/tests/format/js/explicit-resource-management/valid-await-expr-using-instanceof.js new file mode 100644 index 000000000000..1818647e4761 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-expr-using-instanceof.js @@ -0,0 +1,3 @@ +async function f() { + await using instanceof foo; +} diff --git a/tests/format/js/explicit-resource-management/valid-await-expr-using.js b/tests/format/js/explicit-resource-management/valid-await-expr-using.js new file mode 100644 index 000000000000..f056de21db03 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-expr-using.js @@ -0,0 +1,4 @@ +async function f() { + await using[x]; + await using.x + await using(x) ? await using?.x : await using`x`; +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-asi-assignment.js b/tests/format/js/explicit-resource-management/valid-await-using-asi-assignment.js new file mode 100644 index 000000000000..2dde3680d926 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-asi-assignment.js @@ -0,0 +1,4 @@ +async function f() { + await using + using = h(); +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-binding-basic.js b/tests/format/js/explicit-resource-management/valid-await-using-binding-basic.js new file mode 100644 index 000000000000..321993e916c9 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-binding-basic.js @@ -0,0 +1,3 @@ +async function f() { + await using basic = getReader(); +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-binding-escaped.js b/tests/format/js/explicit-resource-management/valid-await-using-binding-escaped.js new file mode 100644 index 000000000000..76af5903fa74 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-binding-escaped.js @@ -0,0 +1,3 @@ +async function f() { + await using \u0061b = c; +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-binding-non-bmp.js b/tests/format/js/explicit-resource-management/valid-await-using-binding-non-bmp.js new file mode 100644 index 000000000000..cbf4ce251996 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-binding-non-bmp.js @@ -0,0 +1,3 @@ +async function f() { + await using 𠮷 = foo(); +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-binding-using.js b/tests/format/js/explicit-resource-management/valid-await-using-binding-using.js new file mode 100644 index 000000000000..fd4e32547db8 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-binding-using.js @@ -0,0 +1,4 @@ +async function f() { + await using using = of; + for (await using using of of); +} diff --git a/tests/format/js/explicit-resource-management/valid-await-using-comments.js b/tests/format/js/explicit-resource-management/valid-await-using-comments.js new file mode 100644 index 000000000000..3ce48f45b7b2 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-await-using-comments.js @@ -0,0 +1,14 @@ +async function f() { +{ + /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; +} +{ + /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +} +{ + /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; +} +{ + /*0*/for/*1*/await/*2*/(/*3*/await/*4*/using/*5*/b/*6*/of/*7*/x/*8*/)/*9*/; +} +} diff --git a/tests/format/js/explicit-resource-management/valid-for-await-using-binding-escaped-of-of.js b/tests/format/js/explicit-resource-management/valid-for-await-using-binding-escaped-of-of.js new file mode 100644 index 000000000000..a44a6abe3492 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-for-await-using-binding-escaped-of-of.js @@ -0,0 +1,2 @@ +// TODO: Fix this test +// for await (using \u006ff of of); diff --git a/tests/format/js/explicit-resource-management/valid-for-using-binding-escaped-of-of.js b/tests/format/js/explicit-resource-management/valid-for-using-binding-escaped-of-of.js new file mode 100644 index 000000000000..c4c021078a65 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-for-using-binding-escaped-of-of.js @@ -0,0 +1,2 @@ +// TODO: Fix this test +// for (using o\u0066 of of); diff --git a/tests/format/js/explicit-resource-management/valid-for-using-binding-of-of.js b/tests/format/js/explicit-resource-management/valid-for-using-binding-of-of.js new file mode 100644 index 000000000000..4efb8f85a6fd --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-for-using-binding-of-of.js @@ -0,0 +1,4 @@ +async function f() { + for (await using of of of); + for await (await using of of of); +} diff --git a/tests/format/js/explicit-resource-management/valid-for-using-declaration.js b/tests/format/js/explicit-resource-management/valid-for-using-declaration.js new file mode 100644 index 000000000000..a13b51758dcd --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-for-using-declaration.js @@ -0,0 +1,3 @@ +async function f() { + for (await using basic = reader();;); +} diff --git a/tests/format/js/explicit-resource-management/valid-module-block-top-level-await-using-binding.js b/tests/format/js/explicit-resource-management/valid-module-block-top-level-await-using-binding.js new file mode 100644 index 000000000000..fffa04d7c7af --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-module-block-top-level-await-using-binding.js @@ -0,0 +1,3 @@ +const m = module { + await using foo = bar(); +} diff --git a/tests/format/js/explicit-resource-management/valid-module-block-top-level-using-binding.js b/tests/format/js/explicit-resource-management/valid-module-block-top-level-using-binding.js new file mode 100644 index 000000000000..b9c213bf2e94 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-module-block-top-level-using-binding.js @@ -0,0 +1,3 @@ +module { + using foo = bar(); +} diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-computed-member.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-computed-member.js new file mode 100644 index 000000000000..76021eb02570 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-computed-member.js @@ -0,0 +1,2 @@ +using [x] = 0; +for (using [x] of []); diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-expression-statement.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-expression-statement.js new file mode 100644 index 000000000000..8261b5a2e0b3 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-expression-statement.js @@ -0,0 +1,2 @@ +using +reader = getReader() diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-await-of.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-await-of.js new file mode 100644 index 000000000000..9c1ceb473d77 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-await-of.js @@ -0,0 +1 @@ +for await (using of of); diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-in.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-in.js new file mode 100644 index 000000000000..43f6861ee621 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-in.js @@ -0,0 +1,4 @@ +for (using in []); +for (using.foo in []); +for (using().foo in []); +for (using``.foo in []); diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-init.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-init.js new file mode 100644 index 000000000000..e2115da2feae --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-init.js @@ -0,0 +1,3 @@ +for ( + using; + reader = getReader();); diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-of.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-of.js new file mode 100644 index 000000000000..098c11b05616 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-for-of.js @@ -0,0 +1,4 @@ +for (using of of); +for (using.foo of of); +for (using().foo of of); +for (using``.foo of of); diff --git a/tests/format/js/explicit-resource-management/valid-using-as-identifier-in.js b/tests/format/js/explicit-resource-management/valid-using-as-identifier-in.js new file mode 100644 index 000000000000..b7574f490471 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-as-identifier-in.js @@ -0,0 +1 @@ +using in using instanceof using; diff --git a/tests/format/js/explicit-resource-management/valid-using-binding-basic.js b/tests/format/js/explicit-resource-management/valid-using-binding-basic.js new file mode 100644 index 000000000000..9f8f2445bc6a --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-binding-basic.js @@ -0,0 +1,3 @@ +{ + using basic = getReader(); +} diff --git a/tests/format/js/explicit-resource-management/valid-using-binding-escaped.js b/tests/format/js/explicit-resource-management/valid-using-binding-escaped.js new file mode 100644 index 000000000000..475887f4dbdf --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-binding-escaped.js @@ -0,0 +1 @@ +{ using \u0061b = c; } diff --git a/tests/format/js/explicit-resource-management/valid-using-binding-non-bmp.js b/tests/format/js/explicit-resource-management/valid-using-binding-non-bmp.js new file mode 100644 index 000000000000..ff01e43dfd6f --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-binding-non-bmp.js @@ -0,0 +1 @@ +{ using 𠮷 = foo(); } diff --git a/tests/format/js/explicit-resource-management/valid-using-binding-using.js b/tests/format/js/explicit-resource-management/valid-using-binding-using.js new file mode 100644 index 000000000000..62baf2a5e640 --- /dev/null +++ b/tests/format/js/explicit-resource-management/valid-using-binding-using.js @@ -0,0 +1,4 @@ +{ + using using = of; + for (using using of of); +} diff --git a/tests/format/js/export-default/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/export-default/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/export-default/__snapshots__/format.test.js.snap diff --git a/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap b/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5c45036ebba6 --- /dev/null +++ b/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`default-escaped.js [acorn] format 1`] = ` +"Unexpected token (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^ +Cause: Unexpected token (2:7)" +`; + +exports[`default-escaped.js [espree] format 1`] = ` +"Unexpected token n\\u{63} (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^ +Cause: Unexpected token n\\u{63}" +`; + +exports[`default-escaped.js [flow] format 1`] = ` +"Unexpected identifier, expected a declaration, statement or export specifiers (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^^^^^^^" +`; + +exports[`default-escaped.js [hermes] format 1`] = ` +"expected declaration in export (2:7) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^ +Cause: expected declaration in export (2:7) +export n\\u{63} from "async"; + ^~~~~~~" +`; + +exports[`default-escaped.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^^^^^^^ +Cause: [2:7-2:14]: Unexpected token: 'identifier'" +`; + +exports[`default-escaped.js [oxc] format 1`] = ` +"Unexpected token (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; + | ^^^^^^^" +`; + +exports[`default-escaped.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// export asyn\\u{63} from "async"; +export n\\u{63} from "async"; +=====================================output===================================== +// export asyn\\u{63} from "async"; +export nc from "async"; + +================================================================================ +`; diff --git a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e45c64b19806..000000000000 --- a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`default-escaped.js [acorn] format 1`] = ` -"Unexpected token (2:8) - 1 | // export asyn\\u{63} from "async"; -> 2 | export n\\u{63} from "async"; - | ^" -`; - -exports[`default-escaped.js [espree] format 1`] = ` -"Unexpected token n\\u{63} (2:8) - 1 | // export asyn\\u{63} from "async"; -> 2 | export n\\u{63} from "async"; - | ^" -`; - -exports[`default-escaped.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (2:12) - 1 | // export asyn\\u{63} from "async"; -> 2 | export n\\u{63} from "async"; - | ^" -`; - -exports[`default-escaped.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// export asyn\\u{63} from "async"; -export n\\u{63} from "async"; -=====================================output===================================== -// export asyn\\u{63} from "async"; -export nc from "async"; - -================================================================================ -`; diff --git a/tests/format/js/export-default/escaped/format.test.js b/tests/format/js/export-default/escaped/format.test.js new file mode 100644 index 000000000000..8461922b9ad2 --- /dev/null +++ b/tests/format/js/export-default/escaped/format.test.js @@ -0,0 +1,11 @@ +runFormatTest(import.meta, ["babel", "flow"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + flow: true, + hermes: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/export-default/escaped/jsfmt.spec.js b/tests/format/js/export-default/escaped/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/export-default/escaped/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap b/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7841a6ffa83e --- /dev/null +++ b/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap @@ -0,0 +1,75 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`export.js [acorn] format 1`] = ` +"Unexpected token (2:8) + 1 | export * as ns from 'mod'; +> 2 | export v from 'mod'; + | ^ + 3 | export a, * as b from 'mod'; + 4 | export c, { foo } from 'mod'; + 5 | export * as d from 'mod'; +Cause: Unexpected token (2:7)" +`; + +exports[`export.js [espree] format 1`] = ` +"Unexpected token v (2:8) + 1 | export * as ns from 'mod'; +> 2 | export v from 'mod'; + | ^ + 3 | export a, * as b from 'mod'; + 4 | export c, { foo } from 'mod'; + 5 | export * as d from 'mod'; +Cause: Unexpected token v" +`; + +exports[`export.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:8) + 1 | export * as ns from 'mod'; +> 2 | export v from 'mod'; + | ^ + 3 | export a, * as b from 'mod'; + 4 | export c, { foo } from 'mod'; + 5 | export * as d from 'mod'; +Cause: [2:7-2:8]: Unexpected token: 'identifier'" +`; + +exports[`export.js [oxc] format 1`] = ` +"Unexpected token (2:8) + 1 | export * as ns from 'mod'; +> 2 | export v from 'mod'; + | ^ + 3 | export a, * as b from 'mod'; + 4 | export c, { foo } from 'mod'; + 5 | export * as d from 'mod';" +`; + +exports[`export.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as ns from 'mod'; +export v from 'mod'; +export a, * as b from 'mod'; +export c, { foo } from 'mod'; +export * as d from 'mod'; +export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; +export Bar from "barrrrrrrrrrrrrrrrrrrrrrrrrrrr"; +export { foooooooooooooooooooooooooooooooooooooooooooooo, fooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; + +=====================================output===================================== +export * as ns from "mod"; +export v from "mod"; +export a, * as b from "mod"; +export c, { foo } from "mod"; +export * as d from "mod"; +export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; +export Bar from "barrrrrrrrrrrrrrrrrrrrrrrrrrrr"; +export { + foooooooooooooooooooooooooooooooooooooooooooooo, + fooooooooooooooooooooooooooooooooooooooooooooooo, +} from "fooooooooooooooooooooooooooooo"; + +================================================================================ +`; diff --git a/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fa0a79dc12d2..000000000000 --- a/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,62 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`export.js [acorn] format 1`] = ` -"Unexpected token (2:8) - 1 | export * as ns from 'mod'; -> 2 | export v from 'mod'; - | ^ - 3 | export a, * as b from 'mod'; - 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" -`; - -exports[`export.js [espree] format 1`] = ` -"Unexpected token v (2:8) - 1 | export * as ns from 'mod'; -> 2 | export v from 'mod'; - | ^ - 3 | export a, * as b from 'mod'; - 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" -`; - -exports[`export.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (2:8) - 1 | export * as ns from 'mod'; -> 2 | export v from 'mod'; - | ^ - 3 | export a, * as b from 'mod'; - 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" -`; - -exports[`export.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as ns from 'mod'; -export v from 'mod'; -export a, * as b from 'mod'; -export c, { foo } from 'mod'; -export * as d from 'mod'; -export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; -export Bar from "barrrrrrrrrrrrrrrrrrrrrrrrrrrr"; -export { foooooooooooooooooooooooooooooooooooooooooooooo, fooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; - -=====================================output===================================== -export * as ns from "mod"; -export v from "mod"; -export a, * as b from "mod"; -export c, { foo } from "mod"; -export * as d from "mod"; -export { fooooooooooooooooooooooooooooooooooooooooooooooooo } from "fooooooooooooooooooooooooooooo"; -export Bar from "barrrrrrrrrrrrrrrrrrrrrrrrrrrr"; -export { - foooooooooooooooooooooooooooooooooooooooooooooo, - fooooooooooooooooooooooooooooooooooooooooooooooo, -} from "fooooooooooooooooooooooooooooo"; - -================================================================================ -`; diff --git a/tests/format/js/export-default/export-default-from/format.test.js b/tests/format/js/export-default/export-default-from/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/export-default/export-default-from/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/export-default/export-default-from/jsfmt.spec.js b/tests/format/js/export-default/export-default-from/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/export-default/export-default-from/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/export-default/format.test.js b/tests/format/js/export-default/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/export-default/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/export-default/jsfmt.spec.js b/tests/format/js/export-default/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/export-default/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/export-star/__snapshots__/format.test.js.snap b/tests/format/js/export-star/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3840c102dad8 --- /dev/null +++ b/tests/format/js/export-star/__snapshots__/format.test.js.snap @@ -0,0 +1,127 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`export-star.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * from "mod"; + + +=====================================output===================================== +export * from "mod"; + +================================================================================ +`; + +exports[`export-star-as.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as ns from "mod"; + + +=====================================output===================================== +export * as ns from "mod"; + +================================================================================ +`; + +exports[`export-star-as-default.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as default from 'foo' + +=====================================output===================================== +export * as default from "foo"; + +================================================================================ +`; + +exports[`export-star-as-reserved-word.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as function from 'foo' +export * as const from 'foo' +export * as as from 'foo' +export * as from from 'foo' + +=====================================output===================================== +export * as function from "foo"; +export * as const from "foo"; +export * as as from "foo"; +export * as from from "foo"; + +================================================================================ +`; + +exports[`export-star-as-string.js [flow] format 1`] = ` +"Unexpected string, expected an identifier (1:13) +> 1 | export * as 'foo' from 'foo' + | ^^^^^ + 2 |" +`; + +exports[`export-star-as-string.js [hermes] format 1`] = ` +"'identifier' expected in export clause (1:12) +> 1 | export * as 'foo' from 'foo' + | ^ + 2 | +Cause: 'identifier' expected in export clause (1:12) +export * as 'foo' from 'foo' +~~~~~~~~~~~~^" +`; + +exports[`export-star-as-string.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as 'foo' from 'foo' + +=====================================output===================================== +export * as "foo" from "foo"; + +================================================================================ +`; + +exports[`export-star-as-string2.js [flow] format 1`] = ` +"Unexpected string, expected an identifier (1:13) +> 1 | export * as "foo" from 'foo' + | ^^^^^ + 2 |" +`; + +exports[`export-star-as-string2.js [hermes] format 1`] = ` +"'identifier' expected in export clause (1:12) +> 1 | export * as "foo" from 'foo' + | ^ + 2 | +Cause: 'identifier' expected in export clause (1:12) +export * as "foo" from 'foo' +~~~~~~~~~~~~^" +`; + +exports[`export-star-as-string2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as "foo" from 'foo' + +=====================================output===================================== +export * as "foo" from "foo"; + +================================================================================ +`; diff --git a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e0d758b5e384..000000000000 --- a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,137 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`export-star.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * from "mod"; - - -=====================================output===================================== -export * from "mod"; - -================================================================================ -`; - -exports[`export-star-as.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as ns from "mod"; - - -=====================================output===================================== -export * as ns from "mod"; - -================================================================================ -`; - -exports[`export-star-as-default.js [flow] format 1`] = ` -"Unexpected token \`default\` (1:13) -> 1 | export * as default from 'foo' - | ^^^^^^^ - 2 |" -`; - -exports[`export-star-as-default.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as default from 'foo' - -=====================================output===================================== -export * as default from "foo"; - -================================================================================ -`; - -exports[`export-star-as-reserved-word.js [flow] format 1`] = ` -"Unexpected token \`function\` (1:13) -> 1 | export * as function from 'foo' - | ^^^^^^^^ - 2 | export * as const from 'foo' - 3 | export * as as from 'foo' - 4 | export * as from from 'foo'" -`; - -exports[`export-star-as-reserved-word.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as function from 'foo' -export * as const from 'foo' -export * as as from 'foo' -export * as from from 'foo' - -=====================================output===================================== -export * as function from "foo"; -export * as const from "foo"; -export * as as from "foo"; -export * as from from "foo"; - -================================================================================ -`; - -exports[`export-star-as-string.js [flow] format 1`] = ` -"Unexpected string, expected an identifier (1:13) -> 1 | export * as 'foo' from 'foo' - | ^^^^^ - 2 |" -`; - -exports[`export-star-as-string.js [typescript] format 1`] = ` -"Identifier expected. (1:13) -> 1 | export * as 'foo' from 'foo' - | ^ - 2 |" -`; - -exports[`export-star-as-string.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as 'foo' from 'foo' - -=====================================output===================================== -export * as "foo" from "foo"; - -================================================================================ -`; - -exports[`export-star-as-string2.js [flow] format 1`] = ` -"Unexpected string, expected an identifier (1:13) -> 1 | export * as "foo" from 'foo' - | ^^^^^ - 2 |" -`; - -exports[`export-star-as-string2.js [typescript] format 1`] = ` -"Identifier expected. (1:13) -> 1 | export * as "foo" from 'foo' - | ^ - 2 |" -`; - -exports[`export-star-as-string2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as "foo" from 'foo' - -=====================================output===================================== -export * as "foo" from "foo"; - -================================================================================ -`; diff --git a/tests/format/js/export-star/format.test.js b/tests/format/js/export-star/format.test.js new file mode 100644 index 000000000000..bd9283f96775 --- /dev/null +++ b/tests/format/js/export-star/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + flow: ["export-star-as-string.js", "export-star-as-string2.js"], + hermes: ["export-star-as-string.js", "export-star-as-string2.js"], + }, +}); diff --git a/tests/format/js/export-star/jsfmt.spec.js b/tests/format/js/export-star/jsfmt.spec.js deleted file mode 100644 index a96c304ecf10..000000000000 --- a/tests/format/js/export-star/jsfmt.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - flow: [ - "export-star-as-default.js", - "export-star-as-string.js", - "export-star-as-string2.js", - "export-star-as-reserved-word.js", - ], - typescript: ["export-star-as-string.js", "export-star-as-string2.js"], - }, -}); diff --git a/tests/format/js/export/__snapshots__/format.test.js.snap b/tests/format/js/export/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5eff834edb2e --- /dev/null +++ b/tests/format/js/export/__snapshots__/format.test.js.snap @@ -0,0 +1,407 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`blank-line-between-specifiers.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { + // a + foo1, + + // b + bar1, + baz1, +} from "mod"; + +const foo2 = 1; +const bar2 = 1; +const baz2 = 1; + +export { + // a + foo2, + + // b + bar2, + baz2, +}; + +=====================================output===================================== +export { + // a + foo1, + + // b + bar1, + baz1, +} from "mod"; + +const foo2 = 1; +const bar2 = 1; +const baz2 = 1; + +export { + // a + foo2, + + // b + bar2, + baz2, +}; + +================================================================================ +`; + +exports[`blank-line-between-specifiers.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { + // a + foo1, + + // b + bar1, + baz1, +} from "mod"; + +const foo2 = 1; +const bar2 = 1; +const baz2 = 1; + +export { + // a + foo2, + + // b + bar2, + baz2, +}; + +=====================================output===================================== +export { + // a + foo1, + + // b + bar1, + baz1, +} from "mod"; + +const foo2 = 1; +const bar2 = 1; +const baz2 = 1; + +export { + // a + foo2, + + // b + bar2, + baz2, +}; + +================================================================================ +`; + +exports[`bracket.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns,fitsIn, oneLine} = {} +export { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns +}; +export {fitsIn, oneLine}; + +=====================================output===================================== +const { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, + fitsIn, + oneLine, +} = {}; +export { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, +}; +export {fitsIn, oneLine}; + +================================================================================ +`; + +exports[`bracket.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns,fitsIn, oneLine} = {} +export { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns +}; +export {fitsIn, oneLine}; + +=====================================output===================================== +const { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, + fitsIn, + oneLine, +} = {}; +export { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, +}; +export { fitsIn, oneLine }; + +================================================================================ +`; + +exports[`empty.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export {}; +export {} from "."; + +=====================================output===================================== +export {}; +export {} from "."; + +================================================================================ +`; + +exports[`empty.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export {}; +export {} from "."; + +=====================================output===================================== +export {}; +export {} from "."; + +================================================================================ +`; + +exports[`same-local-and-exported.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export {a} from 'a'; +export {b as b} from 'b'; +export {c as /* comment */c} from 'c'; + +=====================================output===================================== +export {a} from "a"; +export {b as b} from "b"; +export {c as /* comment */ c} from "c"; + +================================================================================ +`; + +exports[`same-local-and-exported.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export {a} from 'a'; +export {b as b} from 'b'; +export {c as /* comment */c} from 'c'; + +=====================================output===================================== +export { a } from "a"; +export { b as b } from "b"; +export { c as /* comment */ c } from "c"; + +================================================================================ +`; + +exports[`test.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; + +export * as ns from "mod"; + +export * as foo from "./baz"; + +=====================================output===================================== +export { + value1, + value2 as value2_renamed, + value3, + value4 as value4_renamed, + value5, +} from "exports"; + +export * as ns from "mod"; + +export * as foo from "./baz"; + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; + +export * as ns from "mod"; + +export * as foo from "./baz"; + +=====================================output===================================== +export { + value1, + value2 as value2_renamed, + value3, + value4 as value4_renamed, + value5, +} from "exports"; + +export * as ns from "mod"; + +export * as foo from "./baz"; + +================================================================================ +`; + +exports[`undefined.js [acorn] format 1`] = ` +"Export 'undefinedExport' is not defined (1:10) +> 1 | export { undefinedExport }; + | ^ + 2 | +Cause: Export 'undefinedExport' is not defined (1:9)" +`; + +exports[`undefined.js [espree] format 1`] = ` +"Export 'undefinedExport' is not defined (1:10) +> 1 | export { undefinedExport }; + | ^ + 2 | +Cause: Export 'undefinedExport' is not defined" +`; + +exports[`undefined.js - {"bracketSpacing":false} [acorn] format 1`] = ` +"Export 'undefinedExport' is not defined (1:10) +> 1 | export { undefinedExport }; + | ^ + 2 | +Cause: Export 'undefinedExport' is not defined (1:9)" +`; + +exports[`undefined.js - {"bracketSpacing":false} [espree] format 1`] = ` +"Export 'undefinedExport' is not defined (1:10) +> 1 | export { undefinedExport }; + | ^ + 2 | +Cause: Export 'undefinedExport' is not defined" +`; + +exports[`undefined.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { undefinedExport }; + +=====================================output===================================== +export {undefinedExport}; + +================================================================================ +`; + +exports[`undefined.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { undefinedExport }; + +=====================================output===================================== +export { undefinedExport }; + +================================================================================ +`; diff --git a/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 89f34379b17a..000000000000 --- a/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,389 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`blank-line-between-specifiers.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { - // a - foo1, - - // b - bar1, - baz1, -} from "mod"; - -const foo2 = 1; -const bar2 = 1; -const baz2 = 1; - -export { - // a - foo2, - - // b - bar2, - baz2, -}; - -=====================================output===================================== -export { - // a - foo1, - - // b - bar1, - baz1, -} from "mod"; - -const foo2 = 1; -const bar2 = 1; -const baz2 = 1; - -export { - // a - foo2, - - // b - bar2, - baz2, -}; - -================================================================================ -`; - -exports[`blank-line-between-specifiers.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { - // a - foo1, - - // b - bar1, - baz1, -} from "mod"; - -const foo2 = 1; -const bar2 = 1; -const baz2 = 1; - -export { - // a - foo2, - - // b - bar2, - baz2, -}; - -=====================================output===================================== -export { - // a - foo1, - - // b - bar1, - baz1, -} from "mod"; - -const foo2 = 1; -const bar2 = 1; -const baz2 = 1; - -export { - // a - foo2, - - // b - bar2, - baz2, -}; - -================================================================================ -`; - -exports[`bracket.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns,fitsIn, oneLine} = {} -export { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns -}; -export {fitsIn, oneLine}; - -=====================================output===================================== -const { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, - fitsIn, - oneLine, -} = {}; -export { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, -}; -export {fitsIn, oneLine}; - -================================================================================ -`; - -exports[`bracket.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns,fitsIn, oneLine} = {} -export { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns -}; -export {fitsIn, oneLine}; - -=====================================output===================================== -const { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, - fitsIn, - oneLine, -} = {}; -export { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, -}; -export { fitsIn, oneLine }; - -================================================================================ -`; - -exports[`empty.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export {}; -export {} from "."; - -=====================================output===================================== -export {}; -export {} from "."; - -================================================================================ -`; - -exports[`empty.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export {}; -export {} from "."; - -=====================================output===================================== -export {}; -export {} from "."; - -================================================================================ -`; - -exports[`same-local-and-exported.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export {a} from 'a'; -export {b as b} from 'b'; -export {c as /* comment */c} from 'c'; - -=====================================output===================================== -export {a} from "a"; -export {b as b} from "b"; -export {c as /* comment */ c} from "c"; - -================================================================================ -`; - -exports[`same-local-and-exported.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export {a} from 'a'; -export {b as b} from 'b'; -export {c as /* comment */c} from 'c'; - -=====================================output===================================== -export { a } from "a"; -export { b as b } from "b"; -export { c as /* comment */ c } from "c"; - -================================================================================ -`; - -exports[`test.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; - -export * as ns from "mod"; - -export * as foo from "./baz"; - -=====================================output===================================== -export { - value1, - value2 as value2_renamed, - value3, - value4 as value4_renamed, - value5, -} from "exports"; - -export * as ns from "mod"; - -export * as foo from "./baz"; - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; - -export * as ns from "mod"; - -export * as foo from "./baz"; - -=====================================output===================================== -export { - value1, - value2 as value2_renamed, - value3, - value4 as value4_renamed, - value5, -} from "exports"; - -export * as ns from "mod"; - -export * as foo from "./baz"; - -================================================================================ -`; - -exports[`undefined.js [espree] format 1`] = ` -"Export 'undefinedExport' is not defined (1:10) -> 1 | export { undefinedExport }; - | ^ - 2 |" -`; - -exports[`undefined.js - {"bracketSpacing":false} [espree] format 1`] = ` -"Export 'undefinedExport' is not defined (1:10) -> 1 | export { undefinedExport }; - | ^ - 2 |" -`; - -exports[`undefined.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { undefinedExport }; - -=====================================output===================================== -export {undefinedExport}; - -================================================================================ -`; - -exports[`undefined.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { undefinedExport }; - -=====================================output===================================== -export { undefinedExport }; - -================================================================================ -`; diff --git a/tests/format/js/export/format.test.js b/tests/format/js/export/format.test.js new file mode 100644 index 000000000000..171053779d91 --- /dev/null +++ b/tests/format/js/export/format.test.js @@ -0,0 +1,10 @@ +const errors = { + acorn: ["undefined.js"], + espree: ["undefined.js"], +}; + +runFormatTest(import.meta, ["babel", "flow", "typescript"], { errors }); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors, + bracketSpacing: false, +}); diff --git a/tests/format/js/export/jsfmt.spec.js b/tests/format/js/export/jsfmt.spec.js deleted file mode 100644 index 70e567c0cbfc..000000000000 --- a/tests/format/js/export/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { espree: ["undefined.js"] }, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - bracketSpacing: false, - errors: { espree: ["undefined.js"] }, -}); diff --git a/tests/format/js/expression_statement/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/expression_statement/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/expression_statement/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/expression_statement/__snapshots__/format.test.js.snap diff --git a/tests/format/js/expression_statement/format.test.js b/tests/format/js/expression_statement/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/expression_statement/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/expression_statement/jsfmt.spec.js b/tests/format/js/expression_statement/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/expression_statement/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/first-argument-expansion/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/first-argument-expansion/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d164143369c9..000000000000 --- a/tests/format/js/first-argument-expansion/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,287 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -setTimeout(function() { - thing(); -}, 500); - -["a","b","c"].reduce(function(item, thing) { - return thing + " " + item; -}, "letters:") - -func(() => { - thing(); -}, identifier); - -func(function() { - thing(); -}, this.props.timeout * 1000); - -func((that) => { - thing(); -}, this.props.getTimeout()); - -func(() => { - thing(); -}, true); - -func(() => { - thing(); -}, null); - -func(() => { - thing(); -}, undefined); - -func(() => { - thing(); -}, /regex.*?/); - -func(() => { - thing(); -}, 1 ? 2 : 3); - -func(function() { - return thing() -}, 1 ? 2 : 3); - -func(() => { - thing(); -}, something() ? someOtherThing() : somethingElse(true, 0)); - - -func(() => { - thing(); -}, something(longArgumentName, anotherLongArgumentName) ? someOtherThing() : somethingElse(true, 0)); - - -func(() => { - thing(); -}, something(longArgumentName, anotherLongArgumentName, anotherLongArgumentName, anotherLongArgumentName) ? someOtherThing() : somethingElse(true, 0)); - -compose((a) => { - return a.thing; -}, b => b * b); - -somthing.reduce(function(item, thing) { - return thing.blah = item; -}, {}) - -somthing.reduce(function(item, thing) { - return thing.push(item); -}, []) - -reallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongMethod((f, g, h) => { - return f.pop(); -}, true); - -// Don't do the rest of these - -func(function() { - thing(); -}, true, false); - -func(() => { - thing(); -}, {yes: true, cats: 5}); - -compose((a) => { - return a.thing; -}, b => { - return b + ""; -}); - -compose((a) => { - return a.thing; -}, b => [1, 2, 3, 4, 5]); - -renderThing(a => - <div>Content. So much to say. Oh my. Are we done yet?</div> -,args); - -setTimeout( - // Something - function() { - thing(); - }, - 500 -); - -setTimeout(/* blip */ function() { - thing(); -}, 500); - -func((args) => { - execute(args); -}, result => result && console.log("success")) - -=====================================output===================================== -setTimeout(function () { - thing(); -}, 500); - -["a", "b", "c"].reduce(function (item, thing) { - return thing + " " + item; -}, "letters:"); - -func(() => { - thing(); -}, identifier); - -func(function () { - thing(); -}, this.props.timeout * 1000); - -func((that) => { - thing(); -}, this.props.getTimeout()); - -func(() => { - thing(); -}, true); - -func(() => { - thing(); -}, null); - -func(() => { - thing(); -}, undefined); - -func(() => { - thing(); -}, /regex.*?/); - -func( - () => { - thing(); - }, - 1 ? 2 : 3 -); - -func( - function () { - return thing(); - }, - 1 ? 2 : 3 -); - -func( - () => { - thing(); - }, - something() ? someOtherThing() : somethingElse(true, 0) -); - -func( - () => { - thing(); - }, - something(longArgumentName, anotherLongArgumentName) - ? someOtherThing() - : somethingElse(true, 0) -); - -func( - () => { - thing(); - }, - something( - longArgumentName, - anotherLongArgumentName, - anotherLongArgumentName, - anotherLongArgumentName - ) - ? someOtherThing() - : somethingElse(true, 0) -); - -compose( - (a) => { - return a.thing; - }, - (b) => b * b -); - -somthing.reduce(function (item, thing) { - return (thing.blah = item); -}, {}); - -somthing.reduce(function (item, thing) { - return thing.push(item); -}, []); - -reallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongMethod( - (f, g, h) => { - return f.pop(); - }, - true -); - -// Don't do the rest of these - -func( - function () { - thing(); - }, - true, - false -); - -func( - () => { - thing(); - }, - { yes: true, cats: 5 } -); - -compose( - (a) => { - return a.thing; - }, - (b) => { - return b + ""; - } -); - -compose( - (a) => { - return a.thing; - }, - (b) => [1, 2, 3, 4, 5] -); - -renderThing( - (a) => <div>Content. So much to say. Oh my. Are we done yet?</div>, - args -); - -setTimeout( - // Something - function () { - thing(); - }, - 500 -); - -setTimeout( - /* blip */ function () { - thing(); - }, - 500 -); - -func( - (args) => { - execute(args); - }, - (result) => result && console.log("success") -); - -================================================================================ -`; diff --git a/tests/format/js/first-argument-expansion/jsfmt.spec.js b/tests/format/js/first-argument-expansion/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/first-argument-expansion/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/for-await/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/for-await/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/for-await/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/for-await/__snapshots__/format.test.js.snap diff --git a/tests/format/js/for-await/format.test.js b/tests/format/js/for-await/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/for-await/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/for-await/jsfmt.spec.js b/tests/format/js/for-await/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/for-await/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/for-of/__snapshots__/format.test.js.snap b/tests/format/js/for-of/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ba300877d4f0 --- /dev/null +++ b/tests/format/js/for-of/__snapshots__/format.test.js.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async-identifier.js [meriyah] format 1`] = ` +"Expected '=>' (6:23) + 4 | + 5 | async function f() { +> 6 | for await (async of []); + | ^ + 7 | for await ((async) of []); + 8 | for await ((foo) of async); + 9 | for await ((foo) of []) async; +Cause: [6:22-6:23]: Expected '=>'" +`; + +exports[`async-identifier.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for ((async) of []); +for ((foo) of async); +for ((foo) of []) async; + +async function f() { + for await (async of []); + for await ((async) of []); + for await ((foo) of async); + for await ((foo) of []) async; +} + +=====================================output===================================== +for ((async) of []); +for (foo of async); +for (foo of []) async; + +async function f() { + for await (async of []); + for await (async of []); + for await (foo of async); + for await (foo of []) async; +} + +================================================================================ +`; diff --git a/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1aaf61bd1c8a..000000000000 --- a/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,33 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-identifier.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for ((async) of []); -for ((foo) of async); -for ((foo) of []) async; - -async function f() { - for await (async of []); - for await ((async) of []); - for await ((foo) of async); - for await ((foo) of []) async; -} - -=====================================output===================================== -for ((async) of []); -for (foo of async); -for (foo of []) async; - -async function f() { - for await (async of []); - for await (async of []); - for await (foo of async); - for await (foo of []) async; -} - -================================================================================ -`; diff --git a/tests/format/js/for-of/format.test.js b/tests/format/js/for-of/format.test.js new file mode 100644 index 000000000000..8cd6851c547e --- /dev/null +++ b/tests/format/js/for-of/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { meriyah: ["async-identifier.js"] }, +}); diff --git a/tests/format/js/for-of/jsfmt.spec.js b/tests/format/js/for-of/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/for-of/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/for/__snapshots__/format.test.js.snap b/tests/format/js/for/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5112371acd08 --- /dev/null +++ b/tests/format/js/for/__snapshots__/format.test.js.snap @@ -0,0 +1,1039 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (x +/*a*/ +in //b +y) //c +; + +for (x in /*a*/ //b +y); //c + +for (x /*a*/ in y); //b //c + +for (x +//a +in y); + +for(x in +//a +y); + +for (x +/*a*/ +of //b +y) //c +; + +for (x of /*a*/ //b +y); //c + +for (x /*a*/ of y); //b //c + +for (x +//a +of y); + +for(x of +//a +y); + +=====================================output===================================== +/*a*/ +for (x in y); //b //c + +for (x /*a*/ in y); //b //c + +for (x /*a*/ in y); //b //c + +//a +for (x in y); + +//a +for (x in y); + +/*a*/ +for (x of y); //b //c + +for (x /*a*/ of y); //b //c + +for (x /*a*/ of y); //b //c + +//a +for (x of y); + +//a +for (x of y); + +================================================================================ +`; + +exports[`continue-and-break-comment-1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for(;;) { + continue // comment + ; +} + +for (;;) { + break // comment + ; +} + +for (const f of []) { + continue // comment + ; +} + +for (const f of []) { + break // comment + ; +} + +for (const f in {}) { + continue // comment + ; +} + +for (const f in {}) { + break // comment + ; +} + +while(true) { + continue // comment + ; +} + +while (true) { + break // comment + ; +} + +do { + continue // comment + ; +} while(true); + + +do { + break // comment + ; +} while(true); + +label1: for (;;) { + continue label1 // comment + ; +} + +label2: { + break label2 // comment + ; +}; + +for(;;) { + continue /* comment */ + ; +} + +for (;;) { + break /* comment */ + ; +} + +for (const f of []) { + continue /* comment */ + ; +} + +for (const f of []) { + break /* comment */ + ; +} + +for (const f in {}) { + continue /* comment */ + ; +} + +for (const f in {}) { + break /* comment */ + ; +} + +while(true) { + continue /* comment */ + ; +} + +while (true) { + break /* comment */ + ; +} + +do { + continue /* comment */ + ; +} while(true); + + +do { + break /* comment */ + ; +} while(true); + +label1: for (;;) { + continue label1 /* comment */ + ; +} + +label2: { + break label2 /* comment */ + ; +}; + +=====================================output===================================== +for (;;) { + continue; // comment +} + +for (;;) { + break; // comment +} + +for (const f of []) { + continue; // comment +} + +for (const f of []) { + break; // comment +} + +for (const f in {}) { + continue; // comment +} + +for (const f in {}) { + break; // comment +} + +while (true) { + continue; // comment +} + +while (true) { + break; // comment +} + +do { + continue; // comment +} while (true); + +do { + break; // comment +} while (true); + +label1: for (;;) { + continue label1; // comment +} + +label2: { + break label2; // comment +} + +for (;;) { + continue; /* comment */ +} + +for (;;) { + break; /* comment */ +} + +for (const f of []) { + continue; /* comment */ +} + +for (const f of []) { + break; /* comment */ +} + +for (const f in {}) { + continue; /* comment */ +} + +for (const f in {}) { + break; /* comment */ +} + +while (true) { + continue; /* comment */ +} + +while (true) { + break; /* comment */ +} + +do { + continue; /* comment */ +} while (true); + +do { + break; /* comment */ +} while (true); + +label1: for (;;) { + continue label1 /* comment */; +} + +label2: { + break label2 /* comment */; +} + +================================================================================ +`; + +exports[`continue-and-break-comment-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for(;;) { + continue + // comment + ; +} + +for (;;) { + break + // comment + ; +} + +for (const f of []) { + continue + // comment + ; +} + +for (const f of []) { + break + // comment + ; +} + +for (const f in {}) { + continue + // comment + ; +} + +for (const f in {}) { + break + // comment + ; +} + +while(true) { + continue + // comment + ; +} + +while (true) { + break + // comment + ; +} + +do { + continue + // comment + ; +} while(true); + + +do { + break + // comment + ; +} while(true); + +label1: for (;;) { + continue label1 + // comment + ; +} + +label2: { + break label2 + // comment + ; +}; + +for(;;) { + continue + /* comment */ + ; +} + +for (;;) { + break + /* comment */ + ; +} + +for (const f of []) { + continue + /* comment */ + ; +} + +for (const f of []) { + break + /* comment */ + ; +} + +for (const f in {}) { + continue + /* comment */ + ; +} + +for (const f in {}) { + break + /* comment */ + ; +} + +while(true) { + continue + /* comment */ + ; +} + +while (true) { + break + /* comment */ + ; +} + +do { + continue + /* comment */ + ; +} while(true); + + +do { + break + /* comment */ + ; +} while(true); + +label1: for (;;) { + continue label1 + /* comment */ + ; +} + +label2: { + break label2 + /* comment */ + ; +}; + +=====================================output===================================== +for (;;) { + continue; + // comment +} + +for (;;) { + break; + // comment +} + +for (const f of []) { + continue; + // comment +} + +for (const f of []) { + break; + // comment +} + +for (const f in {}) { + continue; + // comment +} + +for (const f in {}) { + break; + // comment +} + +while (true) { + continue; + // comment +} + +while (true) { + break; + // comment +} + +do { + continue; + // comment +} while (true); + +do { + break; + // comment +} while (true); + +label1: for (;;) { + continue label1; + // comment +} + +label2: { + break label2; + // comment +} + +for (;;) { + continue; + /* comment */ +} + +for (;;) { + break; + /* comment */ +} + +for (const f of []) { + continue; + /* comment */ +} + +for (const f of []) { + break; + /* comment */ +} + +for (const f in {}) { + continue; + /* comment */ +} + +for (const f in {}) { + break; + /* comment */ +} + +while (true) { + continue; + /* comment */ +} + +while (true) { + break; + /* comment */ +} + +do { + continue; + /* comment */ +} while (true); + +do { + break; + /* comment */ +} while (true); + +label1: for (;;) { + continue label1; + /* comment */ +} + +label2: { + break label2; + /* comment */ +} + +================================================================================ +`; + +exports[`continue-and-break-comment-without-blocks.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for(;;) continue +// comment +; + +for (;;) break +// comment +; + +for (const f of []) continue +// comment +; + +for (const f of []) break +// comment +; + +for (const f in {}) continue +// comment +; + +for (const f in {}) break +// comment +; + +for(;;) continue // comment +; + +for (;;) break // comment +; + +for (const f of []) continue // comment +; + +for (const f of []) break // comment +; + +for (const f in {}) continue // comment +; + +for (const f in {}) break // comment +; + +for(;;) continue /* comment */ +; + +for (;;) break /* comment */ +; + +for (const f of []) continue /* comment */ +; + +for (const f of []) break /* comment */ +; + +for (const f in {}) continue /* comment */ +; + +for (const f in {}) break /* comment */ +; + +for(;;) continue +/* comment */ +; + +for (;;) break +/* comment */ +; + +for (const f of []) continue +/* comment */ +; + +for (const f of []) break +/* comment */ +; + +for (const f in {}) continue +/* comment */ +; + +for (const f in {}) break +/* comment */ +; + +label1: for (;;) continue label1 /* comment */ +; + +label1: for (;;) continue label1 +/* comment */ +; + +label1: for (;;) continue label1 // comment +; + +label1: for (;;) continue label1 +// comment +; + +=====================================output===================================== +for (;;) + continue; + // comment + +for (;;) + break; + // comment + +for (const f of []) + continue; + // comment + +for (const f of []) + break; + // comment + +for (const f in {}) + continue; + // comment + +for (const f in {}) + break; + // comment + +for (;;) + continue; // comment + +for (;;) + break; // comment + +for (const f of []) + continue; // comment + +for (const f of []) + break; // comment + +for (const f in {}) + continue; // comment + +for (const f in {}) + break; // comment + +for (;;) continue; /* comment */ + +for (;;) break; /* comment */ + +for (const f of []) continue; /* comment */ + +for (const f of []) break; /* comment */ + +for (const f in {}) continue; /* comment */ + +for (const f in {}) break; /* comment */ + +for (;;) + continue; + /* comment */ + +for (;;) + break; + /* comment */ + +for (const f of []) + continue; + /* comment */ + +for (const f of []) + break; + /* comment */ + +for (const f in {}) + continue; + /* comment */ + +for (const f in {}) + break; + /* comment */ + +label1: for (;;) continue label1 /* comment */; + +label1: for (;;) + continue label1; + /* comment */ + +label1: for (;;) + continue label1; // comment + +label1: for (;;) + continue label1; + // comment + +================================================================================ +`; + +exports[`for.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (;;) {} +for (var i = 0; i < 10; ++i) {} + +for (;;) 0; +for (var i = 0; i < 10; ++i) 0; + +=====================================output===================================== +for (;;) {} +for (var i = 0; i < 10; ++i) {} + +for (;;) 0; +for (var i = 0; i < 10; ++i) 0; + +================================================================================ +`; + +exports[`for-in-with-initializer.js [flow] format 1`] = ` +"Invalid left-hand side in for-in (3:6) + 1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + 2 | +> 3 | for (var a = (b in c) in {}); + | ^^^^^^^^^^^^^^^^ + 4 | for (var a = 1 || (b in c) in {}); + 5 | for (var a = 1 + (2 || (b in c)) in {}); + 6 | for (var a = (() => b in c) in {});" +`; + +exports[`for-in-with-initializer.js [typescript] format 1`] = ` +"',' expected. (9:17) + 7 | for (var a = 1 || (() => b in c) in {}); + 8 | for (var a = (() => { b in c; }) in {}); +> 9 | for (var a = [b in c] in {}); + | ^ + 10 | for (var a = {b: b in c} in {}); + 11 | // Meriyah can't parse + 12 | // for (var a = (x = b in c) => {} in {}); +Cause: ',' expected." +`; + +exports[`for-in-with-initializer.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c) in {}); +for (var a = 1 || (b in c) in {}); +for (var a = 1 + (2 || (b in c)) in {}); +for (var a = (() => b in c) in {}); +for (var a = 1 || (() => b in c) in {}); +for (var a = (() => { b in c; }) in {}); +for (var a = [b in c] in {}); +for (var a = {b: b in c} in {}); +// Meriyah can't parse +// for (var a = (x = b in c) => {} in {}); +for (var a = class extends (b in c) {} in {}); +for (var a = function (x = b in c) {} in {}); + +=====================================output===================================== +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c) in {}); +for (var a = (1 || b in c) in {}); +for (var a = (1 + (2 || b in c)) in {}); +for (var a = (() => b in c) in {}); +for (var a = (1 || (() => b in c)) in {}); +for (var a = (() => { + b in c; +}) in {}); +for (var a = ([b in c]) in {}); +for (var a = ({ b: b in c }) in {}); +// Meriyah can't parse +// for (var a = (x = b in c) => {} in {}); +for (var a = (class extends (b in c) {}) in {}); +for (var a = (function (x = b in c) {}) in {}); + +================================================================================ +`; + +exports[`in.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for ((x in a);;) {} +for (a=(a in b);;) {} +for (let a = (b in c); ; ); +for (a && (b in c); ; ); +for (a => (b in c); ; ); +function* g() { + for (yield (a in b); ; ); +} +async function f() { + for (await (a in b); ; ); +} +for (a in b) 0; + +=====================================output===================================== +for ((x in a); ; ) {} +for (a = (a in b); ; ) {} +for (let a = (b in c); ; ); +for (a && (b in c); ; ); +for ((a) => (b in c); ; ); +function* g() { + for (yield (a in b); ; ); +} +async function f() { + for (await (a in b); ; ); +} +for (a in b) 0; + +================================================================================ +`; + +exports[`parentheses.js [flow] format 1`] = ` +"Unexpected token \`=>\`, expected the token \`;\` (11:27) + 9 | for (var a = [b in c];;); + 10 | for (var a = {b: b in c};;); +> 11 | for (var a = (x = b in c) => {};;); + | ^^ + 12 | for (var a = class extends (b in c) {};;); + 13 | for (var a = function (x = b in c) {};;); + 14 |" +`; + +exports[`parentheses.js [typescript] format 1`] = ` +"',' expected. (9:17) + 7 | for (var a = 1 || (() => b in c);;); + 8 | for (var a = (() => { b in c; });;); +> 9 | for (var a = [b in c];;); + | ^ + 10 | for (var a = {b: b in c};;); + 11 | for (var a = (x = b in c) => {};;); + 12 | for (var a = class extends (b in c) {};;); +Cause: ',' expected." +`; + +exports[`parentheses.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c);;); +for (var a = 1 || (b in c);;); +for (var a = 1 + (2 || (b in c));;); +for (var a = (() => b in c);;); +for (var a = 1 || (() => b in c);;); +for (var a = (() => { b in c; });;); +for (var a = [b in c];;); +for (var a = {b: b in c};;); +for (var a = (x = b in c) => {};;); +for (var a = class extends (b in c) {};;); +for (var a = function (x = b in c) {};;); + +for (var a in (b in c)); +for (var a in 1 || (b in c)); +for (var a in 1 + (2 || (b in c))); +for (var a in (() => b in c)); +for (var a in 1 || (() => b in c)); +for (var a in (() => { b in c; })); +for (var a in [b in c]); +for (var a in {b: b in c}); +for (var a in (x = b in c) => {}); +for (var a in class extends (b in c) {}); +for (var a in function (x = b in c) {}); + +for (;a = (b in c);); +for (;a = 1 || (b in c);); +for (;a = 1 + (2 || (b in c));); +for (;a = (() => b in c);); +for (;a = 1 || (() => b in c);); +for (;a = (() => { b in c; });); +for (;a = [b in c];); +for (;a = {b: b in c};); +for (;a = (x = b in c) => {};); +for (;a = class extends (b in c) {};); +for (;a = function (x = b in c) {};); + +=====================================output===================================== +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c); ; ); +for (var a = 1 || (b in c); ; ); +for (var a = 1 + (2 || (b in c)); ; ); +for (var a = () => (b in c); ; ); +for (var a = 1 || (() => (b in c)); ; ); +for ( + var a = () => { + (b in c); + }; + ; + +); +for (var a = [(b in c)]; ; ); +for (var a = { b: (b in c) }; ; ); +for (var a = (x = (b in c)) => {}; ; ); +for (var a = class extends (b in c) {}; ; ); +for (var a = function (x = (b in c)) {}; ; ); + +for (var a in b in c); +for (var a in 1 || b in c); +for (var a in 1 + (2 || b in c)); +for (var a in () => b in c); +for (var a in 1 || (() => b in c)); +for (var a in () => { + b in c; +}); +for (var a in [b in c]); +for (var a in { b: b in c }); +for (var a in (x = b in c) => {}); +for (var a in class extends (b in c) {}); +for (var a in function (x = b in c) {}); + +for (; (a = b in c); ); +for (; (a = 1 || b in c); ); +for (; (a = 1 + (2 || b in c)); ); +for (; (a = () => b in c); ); +for (; (a = 1 || (() => b in c)); ); +for ( + ; + (a = () => { + b in c; + }); + +); +for (; (a = [b in c]); ); +for (; (a = { b: b in c }); ); +for (; (a = (x = b in c) => {}); ); +for (; (a = class extends (b in c) {}); ); +for (; (a = function (x = b in c) {}); ); + +================================================================================ +`; + +exports[`var.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (a in b) var c = {}; []; + +=====================================output===================================== +for (a in b) var c = {}; +[]; + +================================================================================ +`; diff --git a/tests/format/js/for/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/for/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 69f2556fe76d..000000000000 --- a/tests/format/js/for/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,851 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for (x -/*a*/ -in //b -y) //c -; - -for (x in /*a*/ //b -y); //c - -for (x /*a*/ in y); //b //c - -for (x -//a -in y); - -for(x in -//a -y); - -for (x -/*a*/ -of //b -y) //c -; - -for (x of /*a*/ //b -y); //c - -for (x /*a*/ of y); //b //c - -for (x -//a -of y); - -for(x of -//a -y); - -=====================================output===================================== -/*a*/ -for (x in y); //b //c - -for (x /*a*/ in y); //b //c - -for (x /*a*/ in y); //b //c - -//a -for (x in y); - -//a -for (x in y); - -/*a*/ -for (x of y); //b //c - -for (x /*a*/ of y); //b //c - -for (x /*a*/ of y); //b //c - -//a -for (x of y); - -//a -for (x of y); - -================================================================================ -`; - -exports[`continue-and-break-comment-1.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for(;;) { - continue // comment - ; -} - -for (;;) { - break // comment - ; -} - -for (const f of []) { - continue // comment - ; -} - -for (const f of []) { - break // comment - ; -} - -for (const f in {}) { - continue // comment - ; -} - -for (const f in {}) { - break // comment - ; -} - -while(true) { - continue // comment - ; -} - -while (true) { - break // comment - ; -} - -do { - continue // comment - ; -} while(true); - - -do { - break // comment - ; -} while(true); - -label1: for (;;) { - continue label1 // comment - ; -} - -label2: { - break label2 // comment - ; -}; - -for(;;) { - continue /* comment */ - ; -} - -for (;;) { - break /* comment */ - ; -} - -for (const f of []) { - continue /* comment */ - ; -} - -for (const f of []) { - break /* comment */ - ; -} - -for (const f in {}) { - continue /* comment */ - ; -} - -for (const f in {}) { - break /* comment */ - ; -} - -while(true) { - continue /* comment */ - ; -} - -while (true) { - break /* comment */ - ; -} - -do { - continue /* comment */ - ; -} while(true); - - -do { - break /* comment */ - ; -} while(true); - -label1: for (;;) { - continue label1 /* comment */ - ; -} - -label2: { - break label2 /* comment */ - ; -}; - -=====================================output===================================== -for (;;) { - continue; // comment -} - -for (;;) { - break; // comment -} - -for (const f of []) { - continue; // comment -} - -for (const f of []) { - break; // comment -} - -for (const f in {}) { - continue; // comment -} - -for (const f in {}) { - break; // comment -} - -while (true) { - continue; // comment -} - -while (true) { - break; // comment -} - -do { - continue; // comment -} while (true); - -do { - break; // comment -} while (true); - -label1: for (;;) { - continue label1; // comment -} - -label2: { - break label2; // comment -} - -for (;;) { - continue; /* comment */ -} - -for (;;) { - break; /* comment */ -} - -for (const f of []) { - continue; /* comment */ -} - -for (const f of []) { - break; /* comment */ -} - -for (const f in {}) { - continue; /* comment */ -} - -for (const f in {}) { - break; /* comment */ -} - -while (true) { - continue; /* comment */ -} - -while (true) { - break; /* comment */ -} - -do { - continue; /* comment */ -} while (true); - -do { - break; /* comment */ -} while (true); - -label1: for (;;) { - continue label1 /* comment */; -} - -label2: { - break label2 /* comment */; -} - -================================================================================ -`; - -exports[`continue-and-break-comment-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for(;;) { - continue - // comment - ; -} - -for (;;) { - break - // comment - ; -} - -for (const f of []) { - continue - // comment - ; -} - -for (const f of []) { - break - // comment - ; -} - -for (const f in {}) { - continue - // comment - ; -} - -for (const f in {}) { - break - // comment - ; -} - -while(true) { - continue - // comment - ; -} - -while (true) { - break - // comment - ; -} - -do { - continue - // comment - ; -} while(true); - - -do { - break - // comment - ; -} while(true); - -label1: for (;;) { - continue label1 - // comment - ; -} - -label2: { - break label2 - // comment - ; -}; - -for(;;) { - continue - /* comment */ - ; -} - -for (;;) { - break - /* comment */ - ; -} - -for (const f of []) { - continue - /* comment */ - ; -} - -for (const f of []) { - break - /* comment */ - ; -} - -for (const f in {}) { - continue - /* comment */ - ; -} - -for (const f in {}) { - break - /* comment */ - ; -} - -while(true) { - continue - /* comment */ - ; -} - -while (true) { - break - /* comment */ - ; -} - -do { - continue - /* comment */ - ; -} while(true); - - -do { - break - /* comment */ - ; -} while(true); - -label1: for (;;) { - continue label1 - /* comment */ - ; -} - -label2: { - break label2 - /* comment */ - ; -}; - -=====================================output===================================== -for (;;) { - continue; - // comment -} - -for (;;) { - break; - // comment -} - -for (const f of []) { - continue; - // comment -} - -for (const f of []) { - break; - // comment -} - -for (const f in {}) { - continue; - // comment -} - -for (const f in {}) { - break; - // comment -} - -while (true) { - continue; - // comment -} - -while (true) { - break; - // comment -} - -do { - continue; - // comment -} while (true); - -do { - break; - // comment -} while (true); - -label1: for (;;) { - continue label1; - // comment -} - -label2: { - break label2; - // comment -} - -for (;;) { - continue; - /* comment */ -} - -for (;;) { - break; - /* comment */ -} - -for (const f of []) { - continue; - /* comment */ -} - -for (const f of []) { - break; - /* comment */ -} - -for (const f in {}) { - continue; - /* comment */ -} - -for (const f in {}) { - break; - /* comment */ -} - -while (true) { - continue; - /* comment */ -} - -while (true) { - break; - /* comment */ -} - -do { - continue; - /* comment */ -} while (true); - -do { - break; - /* comment */ -} while (true); - -label1: for (;;) { - continue label1; - /* comment */ -} - -label2: { - break label2; - /* comment */ -} - -================================================================================ -`; - -exports[`continue-and-break-comment-without-blocks.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for(;;) continue -// comment -; - -for (;;) break -// comment -; - -for (const f of []) continue -// comment -; - -for (const f of []) break -// comment -; - -for (const f in {}) continue -// comment -; - -for (const f in {}) break -// comment -; - -for(;;) continue // comment -; - -for (;;) break // comment -; - -for (const f of []) continue // comment -; - -for (const f of []) break // comment -; - -for (const f in {}) continue // comment -; - -for (const f in {}) break // comment -; - -for(;;) continue /* comment */ -; - -for (;;) break /* comment */ -; - -for (const f of []) continue /* comment */ -; - -for (const f of []) break /* comment */ -; - -for (const f in {}) continue /* comment */ -; - -for (const f in {}) break /* comment */ -; - -for(;;) continue -/* comment */ -; - -for (;;) break -/* comment */ -; - -for (const f of []) continue -/* comment */ -; - -for (const f of []) break -/* comment */ -; - -for (const f in {}) continue -/* comment */ -; - -for (const f in {}) break -/* comment */ -; - -label1: for (;;) continue label1 /* comment */ -; - -label1: for (;;) continue label1 -/* comment */ -; - -label1: for (;;) continue label1 // comment -; - -label1: for (;;) continue label1 -// comment -; - -=====================================output===================================== -for (;;) - continue; - // comment - -for (;;) - break; - // comment - -for (const f of []) - continue; - // comment - -for (const f of []) - break; - // comment - -for (const f in {}) - continue; - // comment - -for (const f in {}) - break; - // comment - -for (;;) - continue; // comment - -for (;;) - break; // comment - -for (const f of []) - continue; // comment - -for (const f of []) - break; // comment - -for (const f in {}) - continue; // comment - -for (const f in {}) - break; // comment - -for (;;) continue; /* comment */ - -for (;;) break; /* comment */ - -for (const f of []) continue; /* comment */ - -for (const f of []) break; /* comment */ - -for (const f in {}) continue; /* comment */ - -for (const f in {}) break; /* comment */ - -for (;;) - continue; - /* comment */ - -for (;;) - break; - /* comment */ - -for (const f of []) - continue; - /* comment */ - -for (const f of []) - break; - /* comment */ - -for (const f in {}) - continue; - /* comment */ - -for (const f in {}) - break; - /* comment */ - -label1: for (;;) continue label1 /* comment */; - -label1: for (;;) - continue label1; - /* comment */ - -label1: for (;;) - continue label1; // comment - -label1: for (;;) - continue label1; - // comment - -================================================================================ -`; - -exports[`for.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for (;;) {} -for (var i = 0; i < 10; ++i) {} - -for (;;) 0; -for (var i = 0; i < 10; ++i) 0; - -=====================================output===================================== -for (;;) {} -for (var i = 0; i < 10; ++i) {} - -for (;;) 0; -for (var i = 0; i < 10; ++i) 0; - -================================================================================ -`; - -exports[`in.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for ((x in a);;) {} -for (a=(a in b);;) {} -for (let a = (b in c); ; ); -for (a && (b in c); ; ); -for (a => (b in c); ; ); -function* g() { - for (yield (a in b); ; ); -} -async function f() { - for (await (a in b); ; ); -} -for (a in b) 0; - -=====================================output===================================== -for ((x in a); ; ) {} -for (a = (a in b); ; ) {} -for (let a = (b in c); ; ); -for (a && (b in c); ; ); -for ((a) => (b in c); ; ); -function* g() { - for (yield (a in b); ; ); -} -async function f() { - for (await (a in b); ; ); -} -for (a in b) 0; - -================================================================================ -`; - -exports[`var.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for (a in b) var c = {}; []; - -=====================================output===================================== -for (a in b) var c = {}; -[]; - -================================================================================ -`; diff --git a/tests/format/js/for/for-in-with-initializer.js b/tests/format/js/for/for-in-with-initializer.js new file mode 100644 index 000000000000..616920da7f72 --- /dev/null +++ b/tests/format/js/for/for-in-with-initializer.js @@ -0,0 +1,14 @@ +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c) in {}); +for (var a = 1 || (b in c) in {}); +for (var a = 1 + (2 || (b in c)) in {}); +for (var a = (() => b in c) in {}); +for (var a = 1 || (() => b in c) in {}); +for (var a = (() => { b in c; }) in {}); +for (var a = [b in c] in {}); +for (var a = {b: b in c} in {}); +// Meriyah can't parse +// for (var a = (x = b in c) => {} in {}); +for (var a = class extends (b in c) {} in {}); +for (var a = function (x = b in c) {} in {}); diff --git a/tests/format/js/for/format.test.js b/tests/format/js/for/format.test.js new file mode 100644 index 000000000000..441b72f6d07b --- /dev/null +++ b/tests/format/js/for/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + flow: ["parentheses.js", "for-in-with-initializer.js"], + typescript: ["parentheses.js", "for-in-with-initializer.js"], + }, +}); diff --git a/tests/format/js/for/jsfmt.spec.js b/tests/format/js/for/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/for/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/for/parentheses.js b/tests/format/js/for/parentheses.js new file mode 100644 index 000000000000..2a150ba8e0c5 --- /dev/null +++ b/tests/format/js/for/parentheses.js @@ -0,0 +1,37 @@ +// https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js + +for (var a = (b in c);;); +for (var a = 1 || (b in c);;); +for (var a = 1 + (2 || (b in c));;); +for (var a = (() => b in c);;); +for (var a = 1 || (() => b in c);;); +for (var a = (() => { b in c; });;); +for (var a = [b in c];;); +for (var a = {b: b in c};;); +for (var a = (x = b in c) => {};;); +for (var a = class extends (b in c) {};;); +for (var a = function (x = b in c) {};;); + +for (var a in (b in c)); +for (var a in 1 || (b in c)); +for (var a in 1 + (2 || (b in c))); +for (var a in (() => b in c)); +for (var a in 1 || (() => b in c)); +for (var a in (() => { b in c; })); +for (var a in [b in c]); +for (var a in {b: b in c}); +for (var a in (x = b in c) => {}); +for (var a in class extends (b in c) {}); +for (var a in function (x = b in c) {}); + +for (;a = (b in c);); +for (;a = 1 || (b in c);); +for (;a = 1 + (2 || (b in c));); +for (;a = (() => b in c);); +for (;a = 1 || (() => b in c);); +for (;a = (() => { b in c; });); +for (;a = [b in c];); +for (;a = {b: b in c};); +for (;a = (x = b in c) => {};); +for (;a = class extends (b in c) {};); +for (;a = function (x = b in c) {};); diff --git a/tests/format/js/function-comments/__snapshots__/format.test.js.snap b/tests/format/js/function-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8fcb18de1c69 --- /dev/null +++ b/tests/format/js/function-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,61 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`params-trail-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function Foo( + bar + // Trailing comment +) {} + +function Foo( + {bar} + // Trailing comment +) {} + +function Foo( + [bar] + // Trailing comment +) {} + +function Foo( + bar = 1 + // Trailing comment +) {} + +function Foo( + ...bar + // Trailing comment +) {} + +=====================================output===================================== +function Foo( + bar, + // Trailing comment +) {} + +function Foo( + { bar }, + // Trailing comment +) {} + +function Foo( + [bar], + // Trailing comment +) {} + +function Foo( + bar = 1, + // Trailing comment +) {} + +function Foo( + ...bar + // Trailing comment +) {} + +================================================================================ +`; diff --git a/tests/format/js/function-comments/format.test.js b/tests/format/js/function-comments/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/function-comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/function-comments/params-trail-comments.js b/tests/format/js/function-comments/params-trail-comments.js new file mode 100644 index 000000000000..baac237b8803 --- /dev/null +++ b/tests/format/js/function-comments/params-trail-comments.js @@ -0,0 +1,24 @@ +function Foo( + bar + // Trailing comment +) {} + +function Foo( + {bar} + // Trailing comment +) {} + +function Foo( + [bar] + // Trailing comment +) {} + +function Foo( + bar = 1 + // Trailing comment +) {} + +function Foo( + ...bar + // Trailing comment +) {} diff --git a/tests/format/js/function-first-param/__snapshots__/format.test.js.snap b/tests/format/js/function-first-param/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0e4ca883a094 --- /dev/null +++ b/tests/format/js/function-first-param/__snapshots__/format.test.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`function_expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +//https://github.com/prettier/prettier/issues/3002 +beep.boop().baz("foo", +{ + some: { + thing: { + nested: true + } + } +}, +{ another: { thing: true } }, +() => {}); + + +//https://github.com/prettier/prettier/issues/2984 +db.collection('indexOptionDefault').createIndex({ a: 1 }, { + indexOptionDefaults: true, + w: 2, + wtimeout: 1000 +}, function(err) { + test.equal(null, err); + test.deepEqual({ w: 2, wtimeout: 1000 }, commandResult.writeConcern); + + client.close(); + done(); +}); +=====================================output===================================== +//https://github.com/prettier/prettier/issues/3002 +beep.boop().baz( + "foo", + { + some: { + thing: { + nested: true, + }, + }, + }, + { another: { thing: true } }, + () => {}, +); + +//https://github.com/prettier/prettier/issues/2984 +db.collection("indexOptionDefault").createIndex( + { a: 1 }, + { + indexOptionDefaults: true, + w: 2, + wtimeout: 1000, + }, + function (err) { + test.equal(null, err); + test.deepEqual({ w: 2, wtimeout: 1000 }, commandResult.writeConcern); + + client.close(); + done(); + }, +); + +================================================================================ +`; diff --git a/tests/format/js/function-first-param/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/function-first-param/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fa349ad41b1b..000000000000 --- a/tests/format/js/function-first-param/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,67 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`function_expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -//https://github.com/prettier/prettier/issues/3002 -beep.boop().baz("foo", -{ - some: { - thing: { - nested: true - } - } -}, -{ another: { thing: true } }, -() => {}); - - -//https://github.com/prettier/prettier/issues/2984 -db.collection('indexOptionDefault').createIndex({ a: 1 }, { - indexOptionDefaults: true, - w: 2, - wtimeout: 1000 -}, function(err) { - test.equal(null, err); - test.deepEqual({ w: 2, wtimeout: 1000 }, commandResult.writeConcern); - - client.close(); - done(); -}); -=====================================output===================================== -//https://github.com/prettier/prettier/issues/3002 -beep.boop().baz( - "foo", - { - some: { - thing: { - nested: true, - }, - }, - }, - { another: { thing: true } }, - () => {} -); - -//https://github.com/prettier/prettier/issues/2984 -db.collection("indexOptionDefault").createIndex( - { a: 1 }, - { - indexOptionDefaults: true, - w: 2, - wtimeout: 1000, - }, - function (err) { - test.equal(null, err); - test.deepEqual({ w: 2, wtimeout: 1000 }, commandResult.writeConcern); - - client.close(); - done(); - } -); - -================================================================================ -`; diff --git a/tests/format/js/function-first-param/format.test.js b/tests/format/js/function-first-param/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/function-first-param/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/function-first-param/jsfmt.spec.js b/tests/format/js/function-first-param/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/function-first-param/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/function-single-destructuring/__snapshots__/format.test.js.snap b/tests/format/js/function-single-destructuring/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..679013d86910 --- /dev/null +++ b/tests/format/js/function-single-destructuring/__snapshots__/format.test.js.snap @@ -0,0 +1,292 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function excludeFirstFiveResults([first, second, third, fourth, fifth, ...rest]) { + return rest; +} + +function excludeFirstFiveResults2([first, second, third, fourth, fifth, ...rest] = DEFAULT_FIVE_RESULTS) { + return rest; +} + +function excludeFirstFiveResults3([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest] = [1, 2, 3, 4, 5]) { + return rest; +} + +const excludeFirstFiveResults5 = ([first, second, third, fourth, fifth, ...rest]) => { + return rest; +} + +class A { + excludeFirstFiveResults([first, second, third, fourth, fifth, ...restOfResults]) { + return restOfResults; + } +} + +promise.then(([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest]) => { + return rest; +}); + +=====================================output===================================== +function excludeFirstFiveResults([ + first, + second, + third, + fourth, + fifth, + ...rest +]) { + return rest; +} + +function excludeFirstFiveResults2([ + first, + second, + third, + fourth, + fifth, + ...rest +] = DEFAULT_FIVE_RESULTS) { + return rest; +} + +function excludeFirstFiveResults3( + [ + firstResult, + secondResult, + thirdResult, + fourthResult, + fifthResult, + ...rest + ] = [1, 2, 3, 4, 5], +) { + return rest; +} + +const excludeFirstFiveResults5 = ([ + first, + second, + third, + fourth, + fifth, + ...rest +]) => { + return rest; +}; + +class A { + excludeFirstFiveResults([ + first, + second, + third, + fourth, + fifth, + ...restOfResults + ]) { + return restOfResults; + } +} + +promise.then( + ([ + firstResult, + secondResult, + thirdResult, + fourthResult, + fifthResult, + ...rest + ]) => { + return rest; + }, +); + +================================================================================ +`; + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function StatelessFunctionalComponent1({ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], +} = {}) { +} + +function StatelessFunctionalComponent3([ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], +] = []) { +} + +=====================================output===================================== +function StatelessFunctionalComponent1({ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = "", + items = [], +} = {}) {} + +function StatelessFunctionalComponent3([ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = "", + items = [], +] = []) {} + +================================================================================ +`; + +exports[`object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function StatelessFunctionalComponent({ + isActive, + onFiltersUpdated, + onSelect, + onSubmitAndDeselect, + onCancel, + searchFilters, + title, + items, +}) { + return <div /> +} + +function StatelessFunctionalComponent2({ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], +} = {}) { + return <div /> +} + +function StatelessFunctionalComponent3( + { + isActive, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], + } = { + isActive: true + } +) { + return <div /> +} + + +class C { + StatelessFunctionalComponent({ + isActive, + onFiltersUpdated, + onSelect, + onSubmitAndDeselect, + onCancel, + searchFilters, + title, + items, + }) { + return <div /> + } +} + +=====================================output===================================== +function StatelessFunctionalComponent({ + isActive, + onFiltersUpdated, + onSelect, + onSubmitAndDeselect, + onCancel, + searchFilters, + title, + items, +}) { + return <div />; +} + +function StatelessFunctionalComponent2({ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = "", + items = [], +} = {}) { + return <div />; +} + +function StatelessFunctionalComponent3( + { + isActive, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = "", + items = [], + } = { + isActive: true, + }, +) { + return <div />; +} + +class C { + StatelessFunctionalComponent({ + isActive, + onFiltersUpdated, + onSelect, + onSubmitAndDeselect, + onCancel, + searchFilters, + title, + items, + }) { + return <div />; + } +} + +================================================================================ +`; diff --git a/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 878103c30b2b..000000000000 --- a/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,236 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`array.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function excludeFirstFiveResults([first, second, third, fourth, fifth, ...rest]) { - return rest; -} - -function excludeFirstFiveResults2([first, second, third, fourth, fifth, ...rest] = DEFAULT_FIVE_RESULTS) { - return rest; -} - -function excludeFirstFiveResults3([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest] = [1, 2, 3, 4, 5]) { - return rest; -} - -const excludeFirstFiveResults5 = ([first, second, third, fourth, fifth, ...rest]) => { - return rest; -} - -class A { - excludeFirstFiveResults([first, second, third, fourth, fifth, ...restOfResults]) { - return restOfResults; - } -} - -promise.then(([firstResult, secondResult, thirdResult, fourthResult, fifthResult, ...rest]) => { - return rest; -}); - -=====================================output===================================== -function excludeFirstFiveResults([ - first, - second, - third, - fourth, - fifth, - ...rest -]) { - return rest; -} - -function excludeFirstFiveResults2([ - first, - second, - third, - fourth, - fifth, - ...rest -] = DEFAULT_FIVE_RESULTS) { - return rest; -} - -function excludeFirstFiveResults3( - [ - firstResult, - secondResult, - thirdResult, - fourthResult, - fifthResult, - ...rest - ] = [1, 2, 3, 4, 5] -) { - return rest; -} - -const excludeFirstFiveResults5 = ([ - first, - second, - third, - fourth, - fifth, - ...rest -]) => { - return rest; -}; - -class A { - excludeFirstFiveResults([ - first, - second, - third, - fourth, - fifth, - ...restOfResults - ]) { - return restOfResults; - } -} - -promise.then( - ([ - firstResult, - secondResult, - thirdResult, - fourthResult, - fifthResult, - ...rest - ]) => { - return rest; - } -); - -================================================================================ -`; - -exports[`object.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function StatelessFunctionalComponent({ - isActive, - onFiltersUpdated, - onSelect, - onSubmitAndDeselect, - onCancel, - searchFilters, - title, - items, -}) { - return <div /> -} - -function StatelessFunctionalComponent2({ - isActive = true, - onFiltersUpdated = () => null, - onSelect = () => null, - onSubmitAndDeselect = () => null, - onCancel = () => null, - searchFilters = null, - title = '', - items = [], -} = {}) { - return <div /> -} - -function StatelessFunctionalComponent3( - { - isActive, - onFiltersUpdated = () => null, - onSelect = () => null, - onSubmitAndDeselect = () => null, - onCancel = () => null, - searchFilters = null, - title = '', - items = [], - } = { - isActive: true - } -) { - return <div /> -} - - -class C { - StatelessFunctionalComponent({ - isActive, - onFiltersUpdated, - onSelect, - onSubmitAndDeselect, - onCancel, - searchFilters, - title, - items, - }) { - return <div /> - } -} - -=====================================output===================================== -function StatelessFunctionalComponent({ - isActive, - onFiltersUpdated, - onSelect, - onSubmitAndDeselect, - onCancel, - searchFilters, - title, - items, -}) { - return <div />; -} - -function StatelessFunctionalComponent2({ - isActive = true, - onFiltersUpdated = () => null, - onSelect = () => null, - onSubmitAndDeselect = () => null, - onCancel = () => null, - searchFilters = null, - title = "", - items = [], -} = {}) { - return <div />; -} - -function StatelessFunctionalComponent3( - { - isActive, - onFiltersUpdated = () => null, - onSelect = () => null, - onSubmitAndDeselect = () => null, - onCancel = () => null, - searchFilters = null, - title = "", - items = [], - } = { - isActive: true, - } -) { - return <div />; -} - -class C { - StatelessFunctionalComponent({ - isActive, - onFiltersUpdated, - onSelect, - onSubmitAndDeselect, - onCancel, - searchFilters, - title, - items, - }) { - return <div />; - } -} - -================================================================================ -`; diff --git a/tests/format/js/function-single-destructuring/array-and-object.js b/tests/format/js/function-single-destructuring/array-and-object.js new file mode 100644 index 000000000000..45f2c94a7967 --- /dev/null +++ b/tests/format/js/function-single-destructuring/array-and-object.js @@ -0,0 +1,23 @@ +function StatelessFunctionalComponent1({ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], +} = {}) { +} + +function StatelessFunctionalComponent3([ + isActive = true, + onFiltersUpdated = () => null, + onSelect = () => null, + onSubmitAndDeselect = () => null, + onCancel = () => null, + searchFilters = null, + title = '', + items = [], +] = []) { +} diff --git a/tests/format/js/function-single-destructuring/format.test.js b/tests/format/js/function-single-destructuring/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/function-single-destructuring/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/function-single-destructuring/jsfmt.spec.js b/tests/format/js/function-single-destructuring/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/function-single-destructuring/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/function/__snapshots__/format.test.js.snap b/tests/format/js/function/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..15b6cba585cf --- /dev/null +++ b/tests/format/js/function/__snapshots__/format.test.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`function_expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(function() {}).length +typeof (function() {}); +export default (function() {})(); +(function() {})()\`\`; +(function() {})\`\`; +new (function() {}); +(function() {}); +a = function f() {} || b; +(function() {} && a); +a + function() {}; +new function() {}; + +=====================================output===================================== +(function () {}).length; +typeof function () {}; +export default (function () {})(); +(function () {})()\`\`; +(function () {})\`\`; +new (function () {})(); +(function () {}); +a = function f() {} || b; +(function () {}) && a; +a + function () {}; +new (function () {})(); + +================================================================================ +`; + +exports[`issue-10277.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(fold => fold)(fmap => algebra => function doFold(v) {return algebra(fmap(doFold)(v))}) + +=====================================output===================================== +((fold) => fold)( + (fmap) => (algebra) => + function doFold(v) { + return algebra(fmap(doFold)(v)); + }, +); + +================================================================================ +`; diff --git a/tests/format/js/function/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/function/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 880984ffee97..000000000000 --- a/tests/format/js/function/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,54 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`function_expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(function() {}).length -typeof (function() {}); -export default (function() {})(); -(function() {})()\`\`; -(function() {})\`\`; -new (function() {}); -(function() {}); -a = function f() {} || b; -(function() {} && a); -a + function() {}; -new function() {}; - -=====================================output===================================== -(function () {}).length; -typeof function () {}; -export default (function () {})(); -(function () {})()\`\`; -(function () {})\`\`; -new (function () {})(); -(function () {}); -a = function f() {} || b; -(function () {}) && a; -a + function () {}; -new (function () {})(); - -================================================================================ -`; - -exports[`issue-10277.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(fold => fold)(fmap => algebra => function doFold(v) {return algebra(fmap(doFold)(v))}) - -=====================================output===================================== -((fold) => fold)( - (fmap) => (algebra) => - function doFold(v) { - return algebra(fmap(doFold)(v)); - } -); - -================================================================================ -`; diff --git a/tests/format/js/function/format.test.js b/tests/format/js/function/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/function/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/function/jsfmt.spec.js b/tests/format/js/function/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/function/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/functional-composition/__snapshots__/format.test.js.snap b/tests/format/js/functional-composition/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..401f34d6ecbf --- /dev/null +++ b/tests/format/js/functional-composition/__snapshots__/format.test.js.snap @@ -0,0 +1,721 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`functional_compose.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +compose( + sortBy(x => x), + flatten, + map(x => [x, x*2]) +); + +somelib.compose( + sortBy(x => x), + flatten, + map(x => [x, x*2]) +); + +composeFlipped( + sortBy(x => x), + flatten, + map(x => [x, x*2]) +); + +somelib.composeFlipped( + sortBy(x => x), + flatten, + map(x => [x, x*2]) +); + +// no regression (#4602) +const hasValue = hasOwnProperty(a, b); + +this.compose(sortBy(x => x), flatten); +this.a.b.c.compose(sortBy(x => x), flatten); +someObj.someMethod(this.field.compose(a, b)); + +class A extends B { + compose() { + super.compose(sortBy(x => x), flatten); + } +} + +this.subscriptions.add( + this.componentUpdates + .pipe(startWith(this.props), distinctUntilChanged(isEqual)) + .subscribe(props => { + + }) + ) + +=====================================output===================================== +compose( + sortBy((x) => x), + flatten, + map((x) => [x, x * 2]), +); + +somelib.compose( + sortBy((x) => x), + flatten, + map((x) => [x, x * 2]), +); + +composeFlipped( + sortBy((x) => x), + flatten, + map((x) => [x, x * 2]), +); + +somelib.composeFlipped( + sortBy((x) => x), + flatten, + map((x) => [x, x * 2]), +); + +// no regression (#4602) +const hasValue = hasOwnProperty(a, b); + +this.compose( + sortBy((x) => x), + flatten, +); +this.a.b.c.compose( + sortBy((x) => x), + flatten, +); +someObj.someMethod(this.field.compose(a, b)); + +class A extends B { + compose() { + super.compose( + sortBy((x) => x), + flatten, + ); + } +} + +this.subscriptions.add( + this.componentUpdates + .pipe(startWith(this.props), distinctUntilChanged(isEqual)) + .subscribe((props) => {}), +); + +================================================================================ +`; + +exports[`gobject_connect.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +button.connect( + "clicked", + () => doSomething() +); +app.connect( + "activate", + async () => { + await data.load(); + win.show_all(); + } +); + +=====================================output===================================== +button.connect("clicked", () => doSomething()); +app.connect("activate", async () => { + await data.load(); + win.show_all(); +}); + +================================================================================ +`; + +exports[`lodash_flow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { flow } from "lodash"; + +const foo = flow( + x => x + 1, + x => x * 3, + x => x - 6, +); + +foo(6); + +import * as _ from "lodash"; + +const bar = _.flow( + x => x + 1, + x => x * 3, + x => x - 6, +); + +bar(6); + +=====================================output===================================== +import { flow } from "lodash"; + +const foo = flow( + (x) => x + 1, + (x) => x * 3, + (x) => x - 6, +); + +foo(6); + +import * as _ from "lodash"; + +const bar = _.flow( + (x) => x + 1, + (x) => x * 3, + (x) => x - 6, +); + +bar(6); + +================================================================================ +`; + +exports[`lodash_flow_right.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { flowRight } from "lodash"; + +const foo = flowRight( + x => x + 1, + x => x * 3, + x => x - 6, +); + +foo(6); + +import * as _ from "lodash"; + +const bar = _.flowRight( + x => x + 1, + x => x * 3, + x => x - 6, +); + +bar(6); + +=====================================output===================================== +import { flowRight } from "lodash"; + +const foo = flowRight( + (x) => x + 1, + (x) => x * 3, + (x) => x - 6, +); + +foo(6); + +import * as _ from "lodash"; + +const bar = _.flowRight( + (x) => x + 1, + (x) => x * 3, + (x) => x - 6, +); + +bar(6); + +================================================================================ +`; + +exports[`mongo_connect.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +MongoClient.connect( + "mongodb://localhost:27017/posts", + (err, db) => { + assert.equal(null, err); + db.close(); + } +); + +=====================================output===================================== +MongoClient.connect("mongodb://localhost:27017/posts", (err, db) => { + assert.equal(null, err); + db.close(); +}); + +================================================================================ +`; + +exports[`pipe-function-calls.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(() => { + pipe( + timelines, + everyCommitTimestamps, + A.sort(ordDate), + A.head + ); + + pipe( + serviceEventFromMessage(msg), + TE.chain( + flow( + publishServiceEvent(analytics), + TE.mapLeft(nackFromError) + ) + ) + )() + .then(messageResponse(logger, msg)) + .catch((err) => { + logger.error( + pipe( + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)) + ) + ); + process.exit(1); + }); + + pipe( + Changelog.timestampOfFirstCommit([[commit]]), + O.toUndefined + ); + + chain( + flow( + getUploadUrl, + E.mapLeft(Errors.unknownError), + TE.fromEither + ) + ); +})(); + +=====================================output===================================== +(() => { + pipe(timelines, everyCommitTimestamps, A.sort(ordDate), A.head); + + pipe( + serviceEventFromMessage(msg), + TE.chain(flow(publishServiceEvent(analytics), TE.mapLeft(nackFromError))), + )() + .then(messageResponse(logger, msg)) + .catch((err) => { + logger.error( + pipe(O.fromNullable(err.stack), O.getOrElse(constant(err.message))), + ); + process.exit(1); + }); + + pipe(Changelog.timestampOfFirstCommit([[commit]]), O.toUndefined); + + chain(flow(getUploadUrl, E.mapLeft(Errors.unknownError), TE.fromEither)); +})(); + +================================================================================ +`; + +exports[`pipe-function-calls-with-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// input with some comments added to avoid reformatting + +(() => { + pipe( + // add a descriptive comment here + timelines, + everyCommitTimestamps, + A.sort(ordDate), + A.head + ); + + pipe( + // add a descriptive comment here + serviceEventFromMessage(msg), + TE.chain( + flow( + // add a descriptive comment here + publishServiceEvent(analytics), + TE.mapLeft(nackFromError) + ) + ) + )() + .then(messageResponse(logger, msg)) + .catch((err) => { + logger.error( + pipe( + // add a descriptive comment here + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)) + ) + ); + process.exit(1); + }); + + pipe( + // add a descriptive comment here + Changelog.timestampOfFirstCommit([[commit]]), + O.toUndefined + ); + + chain( + flow( + // add a descriptive comment here + getUploadUrl, + E.mapLeft(Errors.unknownError), + TE.fromEither + ) + ); +})(); + +=====================================output===================================== +// input with some comments added to avoid reformatting + +(() => { + pipe( + // add a descriptive comment here + timelines, + everyCommitTimestamps, + A.sort(ordDate), + A.head, + ); + + pipe( + // add a descriptive comment here + serviceEventFromMessage(msg), + TE.chain( + flow( + // add a descriptive comment here + publishServiceEvent(analytics), + TE.mapLeft(nackFromError), + ), + ), + )() + .then(messageResponse(logger, msg)) + .catch((err) => { + logger.error( + pipe( + // add a descriptive comment here + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)), + ), + ); + process.exit(1); + }); + + pipe( + // add a descriptive comment here + Changelog.timestampOfFirstCommit([[commit]]), + O.toUndefined, + ); + + chain( + flow( + // add a descriptive comment here + getUploadUrl, + E.mapLeft(Errors.unknownError), + TE.fromEither, + ), + ); +})(); + +================================================================================ +`; + +exports[`ramda_compose.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var classyGreeting = (firstName, lastName) => + "The name's " + lastName + ", " + firstName + " " + lastName; +var yellGreeting = R.compose(R.toUpper, classyGreeting); +yellGreeting("James", "Bond"); //=> "THE NAME'S BOND, JAMES BOND" + +R.compose(Math.abs, R.add(1), R.multiply(2))(-4); //=> 7 + +// get :: String -> Object -> Maybe * +var get = R.curry((propName, obj) => Maybe(obj[propName])); + +// getStateCode :: Maybe String -> Maybe String +var getStateCode = R.composeK( + R.compose(Maybe.of, R.toUpper), + get("state"), + get("address"), + get("user") +); +getStateCode({ user: { address: { state: "ny" } } }); //=> Maybe.Just("NY") +getStateCode({}); //=> Maybe.Nothing() + +var db = { + users: { + JOE: { + name: "Joe", + followers: ["STEVE", "SUZY"] + } + } +}; + +// We'll pretend to do a db lookup which returns a promise +var lookupUser = userId => Promise.resolve(db.users[userId]); +var lookupFollowers = user => Promise.resolve(user.followers); +lookupUser("JOE").then(lookupFollowers); + +// followersForUser :: String -> Promise [UserId] +var followersForUser = R.composeP(lookupFollowers, lookupUser); +followersForUser("JOE").then(followers => console.log("Followers:", followers)); +// Followers: ["STEVE","SUZY"] + +const mapStateToProps = state => ({ + users: R.compose( R.filter(R.propEq('status', 'active')), + R.values)(state.users) +}); + +=====================================output===================================== +var classyGreeting = (firstName, lastName) => + "The name's " + lastName + ", " + firstName + " " + lastName; +var yellGreeting = R.compose(R.toUpper, classyGreeting); +yellGreeting("James", "Bond"); //=> "THE NAME'S BOND, JAMES BOND" + +R.compose(Math.abs, R.add(1), R.multiply(2))(-4); //=> 7 + +// get :: String -> Object -> Maybe * +var get = R.curry((propName, obj) => Maybe(obj[propName])); + +// getStateCode :: Maybe String -> Maybe String +var getStateCode = R.composeK( + R.compose(Maybe.of, R.toUpper), + get("state"), + get("address"), + get("user"), +); +getStateCode({ user: { address: { state: "ny" } } }); //=> Maybe.Just("NY") +getStateCode({}); //=> Maybe.Nothing() + +var db = { + users: { + JOE: { + name: "Joe", + followers: ["STEVE", "SUZY"], + }, + }, +}; + +// We'll pretend to do a db lookup which returns a promise +var lookupUser = (userId) => Promise.resolve(db.users[userId]); +var lookupFollowers = (user) => Promise.resolve(user.followers); +lookupUser("JOE").then(lookupFollowers); + +// followersForUser :: String -> Promise [UserId] +var followersForUser = R.composeP(lookupFollowers, lookupUser); +followersForUser("JOE").then((followers) => + console.log("Followers:", followers), +); +// Followers: ["STEVE","SUZY"] + +const mapStateToProps = (state) => ({ + users: R.compose( + R.filter(R.propEq("status", "active")), + R.values, + )(state.users), +}); + +================================================================================ +`; + +exports[`ramda_pipe.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var f = R.pipe(Math.pow, R.negate, R.inc); + +f(3, 4); // -(3^4) + 1 + +// parseJson :: String -> Maybe * +// get :: String -> Object -> Maybe * + +// getStateCode :: Maybe String -> Maybe String +var getStateCode = R.pipeK( + parseJson, + get("user"), + get("address"), + get("state"), + R.compose(Maybe.of, R.toUpper) +); + +getStateCode('{"user":{"address":{"state":"ny"}}}'); +//=> Just('NY') +getStateCode("[Invalid JSON]"); +//=> Nothing() + +// followersForUser :: String -> Promise [User] +var followersForUser = R.pipeP(db.getUserById, db.getFollowers); + +=====================================output===================================== +var f = R.pipe(Math.pow, R.negate, R.inc); + +f(3, 4); // -(3^4) + 1 + +// parseJson :: String -> Maybe * +// get :: String -> Object -> Maybe * + +// getStateCode :: Maybe String -> Maybe String +var getStateCode = R.pipeK( + parseJson, + get("user"), + get("address"), + get("state"), + R.compose(Maybe.of, R.toUpper), +); + +getStateCode('{"user":{"address":{"state":"ny"}}}'); +//=> Just('NY') +getStateCode("[Invalid JSON]"); +//=> Nothing() + +// followersForUser :: String -> Promise [User] +var followersForUser = R.pipeP(db.getUserById, db.getFollowers); + +================================================================================ +`; + +exports[`redux_compose.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { createStore, applyMiddleware, compose } from 'redux'; +import thunk from 'redux-thunk'; +import DevTools from './containers/DevTools'; +import reducer from '../reducers'; + +const store = createStore( + reducer, + compose( + applyMiddleware(thunk), + DevTools.instrument() + ) +) + + +=====================================output===================================== +import { createStore, applyMiddleware, compose } from "redux"; +import thunk from "redux-thunk"; +import DevTools from "./containers/DevTools"; +import reducer from "../reducers"; + +const store = createStore( + reducer, + compose(applyMiddleware(thunk), DevTools.instrument()), +); + +================================================================================ +`; + +exports[`redux_connect.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const ArtistInput = connect(mapStateToProps, mapDispatchToProps, mergeProps)(Component); + +=====================================output===================================== +const ArtistInput = connect( + mapStateToProps, + mapDispatchToProps, + mergeProps, +)(Component); + +================================================================================ +`; + +exports[`reselect_createselector.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { createSelector } from 'reselect'; + +const foo = createSelector( + getIds, + getObjects, + (ids, objects) => ids.map(id => objects[id]) +); + +const bar = createSelector( + [getIds, getObjects], + (ids, objects) => ids.map(id => objects[id]) +); + +=====================================output===================================== +import { createSelector } from "reselect"; + +const foo = createSelector(getIds, getObjects, (ids, objects) => + ids.map((id) => objects[id]), +); + +const bar = createSelector([getIds, getObjects], (ids, objects) => + ids.map((id) => objects[id]), +); + +================================================================================ +`; + +exports[`rxjs_pipe.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { range } from 'rxjs/observable/range'; +import { map, filter, scan } from 'rxjs/operators'; + +const source$ = range(0, 10); + +source$.pipe( + filter(x => x % 2 === 0), + map(x => x + x), + scan((acc, x) => acc + x, 0) +) +.subscribe(x => console.log(x)) + +=====================================output===================================== +import { range } from "rxjs/observable/range"; +import { map, filter, scan } from "rxjs/operators"; + +const source$ = range(0, 10); + +source$ + .pipe( + filter((x) => x % 2 === 0), + map((x) => x + x), + scan((acc, x) => acc + x, 0), + ) + .subscribe((x) => console.log(x)); + +================================================================================ +`; diff --git a/tests/format/js/functional-composition/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/functional-composition/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 25fee5bb52ec..000000000000 --- a/tests/format/js/functional-composition/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,721 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`functional_compose.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -compose( - sortBy(x => x), - flatten, - map(x => [x, x*2]) -); - -somelib.compose( - sortBy(x => x), - flatten, - map(x => [x, x*2]) -); - -composeFlipped( - sortBy(x => x), - flatten, - map(x => [x, x*2]) -); - -somelib.composeFlipped( - sortBy(x => x), - flatten, - map(x => [x, x*2]) -); - -// no regression (#4602) -const hasValue = hasOwnProperty(a, b); - -this.compose(sortBy(x => x), flatten); -this.a.b.c.compose(sortBy(x => x), flatten); -someObj.someMethod(this.field.compose(a, b)); - -class A extends B { - compose() { - super.compose(sortBy(x => x), flatten); - } -} - -this.subscriptions.add( - this.componentUpdates - .pipe(startWith(this.props), distinctUntilChanged(isEqual)) - .subscribe(props => { - - }) - ) - -=====================================output===================================== -compose( - sortBy((x) => x), - flatten, - map((x) => [x, x * 2]) -); - -somelib.compose( - sortBy((x) => x), - flatten, - map((x) => [x, x * 2]) -); - -composeFlipped( - sortBy((x) => x), - flatten, - map((x) => [x, x * 2]) -); - -somelib.composeFlipped( - sortBy((x) => x), - flatten, - map((x) => [x, x * 2]) -); - -// no regression (#4602) -const hasValue = hasOwnProperty(a, b); - -this.compose( - sortBy((x) => x), - flatten -); -this.a.b.c.compose( - sortBy((x) => x), - flatten -); -someObj.someMethod(this.field.compose(a, b)); - -class A extends B { - compose() { - super.compose( - sortBy((x) => x), - flatten - ); - } -} - -this.subscriptions.add( - this.componentUpdates - .pipe(startWith(this.props), distinctUntilChanged(isEqual)) - .subscribe((props) => {}) -); - -================================================================================ -`; - -exports[`gobject_connect.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -button.connect( - "clicked", - () => doSomething() -); -app.connect( - "activate", - async () => { - await data.load(); - win.show_all(); - } -); - -=====================================output===================================== -button.connect("clicked", () => doSomething()); -app.connect("activate", async () => { - await data.load(); - win.show_all(); -}); - -================================================================================ -`; - -exports[`lodash_flow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { flow } from "lodash"; - -const foo = flow( - x => x + 1, - x => x * 3, - x => x - 6, -); - -foo(6); - -import * as _ from "lodash"; - -const bar = _.flow( - x => x + 1, - x => x * 3, - x => x - 6, -); - -bar(6); - -=====================================output===================================== -import { flow } from "lodash"; - -const foo = flow( - (x) => x + 1, - (x) => x * 3, - (x) => x - 6 -); - -foo(6); - -import * as _ from "lodash"; - -const bar = _.flow( - (x) => x + 1, - (x) => x * 3, - (x) => x - 6 -); - -bar(6); - -================================================================================ -`; - -exports[`lodash_flow_right.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { flowRight } from "lodash"; - -const foo = flowRight( - x => x + 1, - x => x * 3, - x => x - 6, -); - -foo(6); - -import * as _ from "lodash"; - -const bar = _.flowRight( - x => x + 1, - x => x * 3, - x => x - 6, -); - -bar(6); - -=====================================output===================================== -import { flowRight } from "lodash"; - -const foo = flowRight( - (x) => x + 1, - (x) => x * 3, - (x) => x - 6 -); - -foo(6); - -import * as _ from "lodash"; - -const bar = _.flowRight( - (x) => x + 1, - (x) => x * 3, - (x) => x - 6 -); - -bar(6); - -================================================================================ -`; - -exports[`mongo_connect.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -MongoClient.connect( - "mongodb://localhost:27017/posts", - (err, db) => { - assert.equal(null, err); - db.close(); - } -); - -=====================================output===================================== -MongoClient.connect("mongodb://localhost:27017/posts", (err, db) => { - assert.equal(null, err); - db.close(); -}); - -================================================================================ -`; - -exports[`pipe-function-calls.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(() => { - pipe( - timelines, - everyCommitTimestamps, - A.sort(ordDate), - A.head - ); - - pipe( - serviceEventFromMessage(msg), - TE.chain( - flow( - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err) => { - logger.error( - pipe( - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); - - pipe( - Changelog.timestampOfFirstCommit([[commit]]), - O.toUndefined - ); - - chain( - flow( - getUploadUrl, - E.mapLeft(Errors.unknownError), - TE.fromEither - ) - ); -})(); - -=====================================output===================================== -(() => { - pipe(timelines, everyCommitTimestamps, A.sort(ordDate), A.head); - - pipe( - serviceEventFromMessage(msg), - TE.chain(flow(publishServiceEvent(analytics), TE.mapLeft(nackFromError))) - )() - .then(messageResponse(logger, msg)) - .catch((err) => { - logger.error( - pipe(O.fromNullable(err.stack), O.getOrElse(constant(err.message))) - ); - process.exit(1); - }); - - pipe(Changelog.timestampOfFirstCommit([[commit]]), O.toUndefined); - - chain(flow(getUploadUrl, E.mapLeft(Errors.unknownError), TE.fromEither)); -})(); - -================================================================================ -`; - -exports[`pipe-function-calls-with-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// input with some comments added to avoid reformatting - -(() => { - pipe( - // add a descriptive comment here - timelines, - everyCommitTimestamps, - A.sort(ordDate), - A.head - ); - - pipe( - // add a descriptive comment here - serviceEventFromMessage(msg), - TE.chain( - flow( - // add a descriptive comment here - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err) => { - logger.error( - pipe( - // add a descriptive comment here - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); - - pipe( - // add a descriptive comment here - Changelog.timestampOfFirstCommit([[commit]]), - O.toUndefined - ); - - chain( - flow( - // add a descriptive comment here - getUploadUrl, - E.mapLeft(Errors.unknownError), - TE.fromEither - ) - ); -})(); - -=====================================output===================================== -// input with some comments added to avoid reformatting - -(() => { - pipe( - // add a descriptive comment here - timelines, - everyCommitTimestamps, - A.sort(ordDate), - A.head - ); - - pipe( - // add a descriptive comment here - serviceEventFromMessage(msg), - TE.chain( - flow( - // add a descriptive comment here - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err) => { - logger.error( - pipe( - // add a descriptive comment here - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); - - pipe( - // add a descriptive comment here - Changelog.timestampOfFirstCommit([[commit]]), - O.toUndefined - ); - - chain( - flow( - // add a descriptive comment here - getUploadUrl, - E.mapLeft(Errors.unknownError), - TE.fromEither - ) - ); -})(); - -================================================================================ -`; - -exports[`ramda_compose.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var classyGreeting = (firstName, lastName) => - "The name's " + lastName + ", " + firstName + " " + lastName; -var yellGreeting = R.compose(R.toUpper, classyGreeting); -yellGreeting("James", "Bond"); //=> "THE NAME'S BOND, JAMES BOND" - -R.compose(Math.abs, R.add(1), R.multiply(2))(-4); //=> 7 - -// get :: String -> Object -> Maybe * -var get = R.curry((propName, obj) => Maybe(obj[propName])); - -// getStateCode :: Maybe String -> Maybe String -var getStateCode = R.composeK( - R.compose(Maybe.of, R.toUpper), - get("state"), - get("address"), - get("user") -); -getStateCode({ user: { address: { state: "ny" } } }); //=> Maybe.Just("NY") -getStateCode({}); //=> Maybe.Nothing() - -var db = { - users: { - JOE: { - name: "Joe", - followers: ["STEVE", "SUZY"] - } - } -}; - -// We'll pretend to do a db lookup which returns a promise -var lookupUser = userId => Promise.resolve(db.users[userId]); -var lookupFollowers = user => Promise.resolve(user.followers); -lookupUser("JOE").then(lookupFollowers); - -// followersForUser :: String -> Promise [UserId] -var followersForUser = R.composeP(lookupFollowers, lookupUser); -followersForUser("JOE").then(followers => console.log("Followers:", followers)); -// Followers: ["STEVE","SUZY"] - -const mapStateToProps = state => ({ - users: R.compose( R.filter(R.propEq('status', 'active')), - R.values)(state.users) -}); - -=====================================output===================================== -var classyGreeting = (firstName, lastName) => - "The name's " + lastName + ", " + firstName + " " + lastName; -var yellGreeting = R.compose(R.toUpper, classyGreeting); -yellGreeting("James", "Bond"); //=> "THE NAME'S BOND, JAMES BOND" - -R.compose(Math.abs, R.add(1), R.multiply(2))(-4); //=> 7 - -// get :: String -> Object -> Maybe * -var get = R.curry((propName, obj) => Maybe(obj[propName])); - -// getStateCode :: Maybe String -> Maybe String -var getStateCode = R.composeK( - R.compose(Maybe.of, R.toUpper), - get("state"), - get("address"), - get("user") -); -getStateCode({ user: { address: { state: "ny" } } }); //=> Maybe.Just("NY") -getStateCode({}); //=> Maybe.Nothing() - -var db = { - users: { - JOE: { - name: "Joe", - followers: ["STEVE", "SUZY"], - }, - }, -}; - -// We'll pretend to do a db lookup which returns a promise -var lookupUser = (userId) => Promise.resolve(db.users[userId]); -var lookupFollowers = (user) => Promise.resolve(user.followers); -lookupUser("JOE").then(lookupFollowers); - -// followersForUser :: String -> Promise [UserId] -var followersForUser = R.composeP(lookupFollowers, lookupUser); -followersForUser("JOE").then((followers) => - console.log("Followers:", followers) -); -// Followers: ["STEVE","SUZY"] - -const mapStateToProps = (state) => ({ - users: R.compose( - R.filter(R.propEq("status", "active")), - R.values - )(state.users), -}); - -================================================================================ -`; - -exports[`ramda_pipe.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var f = R.pipe(Math.pow, R.negate, R.inc); - -f(3, 4); // -(3^4) + 1 - -// parseJson :: String -> Maybe * -// get :: String -> Object -> Maybe * - -// getStateCode :: Maybe String -> Maybe String -var getStateCode = R.pipeK( - parseJson, - get("user"), - get("address"), - get("state"), - R.compose(Maybe.of, R.toUpper) -); - -getStateCode('{"user":{"address":{"state":"ny"}}}'); -//=> Just('NY') -getStateCode("[Invalid JSON]"); -//=> Nothing() - -// followersForUser :: String -> Promise [User] -var followersForUser = R.pipeP(db.getUserById, db.getFollowers); - -=====================================output===================================== -var f = R.pipe(Math.pow, R.negate, R.inc); - -f(3, 4); // -(3^4) + 1 - -// parseJson :: String -> Maybe * -// get :: String -> Object -> Maybe * - -// getStateCode :: Maybe String -> Maybe String -var getStateCode = R.pipeK( - parseJson, - get("user"), - get("address"), - get("state"), - R.compose(Maybe.of, R.toUpper) -); - -getStateCode('{"user":{"address":{"state":"ny"}}}'); -//=> Just('NY') -getStateCode("[Invalid JSON]"); -//=> Nothing() - -// followersForUser :: String -> Promise [User] -var followersForUser = R.pipeP(db.getUserById, db.getFollowers); - -================================================================================ -`; - -exports[`redux_compose.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { createStore, applyMiddleware, compose } from 'redux'; -import thunk from 'redux-thunk'; -import DevTools from './containers/DevTools'; -import reducer from '../reducers'; - -const store = createStore( - reducer, - compose( - applyMiddleware(thunk), - DevTools.instrument() - ) -) - - -=====================================output===================================== -import { createStore, applyMiddleware, compose } from "redux"; -import thunk from "redux-thunk"; -import DevTools from "./containers/DevTools"; -import reducer from "../reducers"; - -const store = createStore( - reducer, - compose(applyMiddleware(thunk), DevTools.instrument()) -); - -================================================================================ -`; - -exports[`redux_connect.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const ArtistInput = connect(mapStateToProps, mapDispatchToProps, mergeProps)(Component); - -=====================================output===================================== -const ArtistInput = connect( - mapStateToProps, - mapDispatchToProps, - mergeProps -)(Component); - -================================================================================ -`; - -exports[`reselect_createselector.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { createSelector } from 'reselect'; - -const foo = createSelector( - getIds, - getObjects, - (ids, objects) => ids.map(id => objects[id]) -); - -const bar = createSelector( - [getIds, getObjects], - (ids, objects) => ids.map(id => objects[id]) -); - -=====================================output===================================== -import { createSelector } from "reselect"; - -const foo = createSelector(getIds, getObjects, (ids, objects) => - ids.map((id) => objects[id]) -); - -const bar = createSelector([getIds, getObjects], (ids, objects) => - ids.map((id) => objects[id]) -); - -================================================================================ -`; - -exports[`rxjs_pipe.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { range } from 'rxjs/observable/range'; -import { map, filter, scan } from 'rxjs/operators'; - -const source$ = range(0, 10); - -source$.pipe( - filter(x => x % 2 === 0), - map(x => x + x), - scan((acc, x) => acc + x, 0) -) -.subscribe(x => console.log(x)) - -=====================================output===================================== -import { range } from "rxjs/observable/range"; -import { map, filter, scan } from "rxjs/operators"; - -const source$ = range(0, 10); - -source$ - .pipe( - filter((x) => x % 2 === 0), - map((x) => x + x), - scan((acc, x) => acc + x, 0) - ) - .subscribe((x) => console.log(x)); - -================================================================================ -`; diff --git a/tests/format/js/functional-composition/format.test.js b/tests/format/js/functional-composition/format.test.js new file mode 100644 index 000000000000..597c515d4a43 --- /dev/null +++ b/tests/format/js/functional-composition/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + acorn: [], + espree: [], + }, +}); diff --git a/tests/format/js/functional-composition/jsfmt.spec.js b/tests/format/js/functional-composition/jsfmt.spec.js deleted file mode 100644 index d8da3ef3d9b9..000000000000 --- a/tests/format/js/functional-composition/jsfmt.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - acorn: [], - espree: [], - }, -}); diff --git a/tests/format/js/generator/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/generator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/generator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/generator/__snapshots__/format.test.js.snap diff --git a/tests/format/js/generator/format.test.js b/tests/format/js/generator/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/generator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/generator/jsfmt.spec.js b/tests/format/js/generator/jsfmt.spec.js deleted file mode 100644 index 61966a7d00c3..000000000000 --- a/tests/format/js/generator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/identifier/for-of/__snapshots__/format.test.js.snap b/tests/format/js/identifier/for-of/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..77a267375d61 --- /dev/null +++ b/tests/format/js/identifier/for-of/__snapshots__/format.test.js.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`await.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function a() { + for await((let) of foo); + for await((let).a of foo); + for await((let)[a] of foo); + for await((let)()[a] of foo); +} + +=====================================output===================================== +async function a() { + for await ((let) of foo); + for await ((let).a of foo); + for await ((let)[a] of foo); + for await ((let)()[a] of foo); +} + +================================================================================ +`; + +exports[`let.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for ((let) of foo); +for (foo of let); +for (foo of let.a); +for (foo of let[a]); +for ((let.a) of foo); +for ((let[a]) of foo); +for ((let)().a of foo); +for (letFoo of foo); + +for ((let.a) in foo); +for ((let[a]) in foo); + +for (let of of let); + +=====================================output===================================== +for ((let) of foo); +for (foo of let); +for (foo of let.a); +for (foo of let[a]); +for ((let).a of foo); +for ((let)[a] of foo); +for ((let)().a of foo); +for (letFoo of foo); + +for (let.a in foo); +for ((let)[a] in foo); + +for (let of of let); + +================================================================================ +`; diff --git a/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1a376e0823a1..000000000000 --- a/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,63 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`await.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function a() { - for await((let) of foo); - for await((let).a of foo); - for await((let)[a] of foo); - for await((let)()[a] of foo); -} - -=====================================output===================================== -async function a() { - for await ((let) of foo); - for await ((let).a of foo); - for await ((let)[a] of foo); - for await ((let)()[a] of foo); -} - -================================================================================ -`; - -exports[`let.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for ((let) of foo); -for (foo of let); -for (foo of let.a); -for (foo of let[a]); -for ((let.a) of foo); -for ((let[a]) of foo); -for ((let)().a of foo); -for (letFoo of foo); - -for ((let.a) in foo); -for ((let[a]) in foo); - -for (let of of let); - -=====================================output===================================== -for ((let) of foo); -for (foo of let); -for (foo of let.a); -for (foo of let[a]); -for ((let).a of foo); -for ((let)[a] of foo); -for ((let)().a of foo); -for (letFoo of foo); - -for (let.a in foo); -for ((let)[a] in foo); - -for (let of of let); - -================================================================================ -`; diff --git a/tests/format/js/identifier/for-of/format.test.js b/tests/format/js/identifier/for-of/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/identifier/for-of/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/identifier/for-of/jsfmt.spec.js b/tests/format/js/identifier/for-of/jsfmt.spec.js deleted file mode 100644 index 0e59aa341125..000000000000 --- a/tests/format/js/identifier/for-of/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, [ - "babel", - // "flow", - "typescript", -]); diff --git a/tests/format/js/identifier/parentheses/__snapshots__/format.test.js.snap b/tests/format/js/identifier/parentheses/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7f349d9d9d45 --- /dev/null +++ b/tests/format/js/identifier/parentheses/__snapshots__/format.test.js.snap @@ -0,0 +1,481 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`const.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const [a = ((let)[0] = 1)] = 2; + +=====================================output===================================== +const [a = (let[0] = 1)] = 2 + +================================================================================ +`; + +exports[`const.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const [a = ((let)[0] = 1)] = 2; + +=====================================output===================================== +const [a = (let[0] = 1)] = 2; + +================================================================================ +`; + +exports[`let.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +let.a = 1; + +let.a[0] = 1; + +(let[a] = 1); + +(let[a].b.c.e = 1); + +foo[let[a]] = 1; + +(let)[let[a]] = 1; + +(let[a] ??= 1); + +foo = let[a]; + +let()[a] = 1; + +foo(let)[a] = 1; + +foo(let[a])[a] = 1; + +(let[0] = 1); + +(let["a"] = 1); + +let = 1; + +var let = 1; + +[let[a]] = 1; + +({a: let[a]} = 1); + +alert(let[0] = 1); + +(let[0] = 1) || 2; + +((let[0] = 1), 2); + +((let[0] = 1) ? a : b); + +if (let[0] = 1); + +while (let[0] = 1); + +do{} while (let[0] = 1); + +var a = (let[0] = 1); + +(let[0] = 1) instanceof a; + +void (let[0] = 1); + +(let[0] = 1)(); + +new (let[0] = 1)(); + +((let)[0] = 1)\`\`; + +((let)[0] = 1).toString; + +((let)[0] = 1)?.toString; + +[...(let[0] = 1)]; + +foo = () => (let[0] = 1); + +function * foo() {yield (let[0] = 1)} + +async function foo() {await (let[0] = 1)} + +function foo() {return (let[0] = 1)} + +while (true) (let[0] = 1); + +throw (let[0] = 1); + +({foo: (let[0] = 1)}); + +[(let[0] = 1)]; + +for ((let[0] = 1);;); +for ((let)[0] in {}); +for ((let)[0] of []); + +switch (let[0] = 1) {} + +switch (foo) { + case let[0] = 1: +} + +with (let[0] = 1); + +(let[x]).foo(); + +let.let[x].foo(); + +a = let[x].foo(); + +(let)[2]; + +a[1] + (let[2] = 2); + +=====================================output===================================== +let.a = 1 + +let.a[0] = 1 + +;(let)[a] = 1 + +;(let)[a].b.c.e = 1 + +foo[let[a]] = 1 + +;(let)[let[a]] = 1 + +;(let)[a] ??= 1 + +foo = let[a] + +let()[a] = 1 + +foo(let)[a] = 1 + +foo(let[a])[a] = 1 + +;(let)[0] = 1 + +;(let)["a"] = 1 + +let = 1 + +var let = 1 + +;[let[a]] = 1 + +;({ a: let[a] } = 1) + +alert((let[0] = 1)) + +;((let)[0] = 1) || 2 + +;(((let)[0] = 1), 2) + +;((let)[0] = 1) ? a : b + +if ((let[0] = 1)); + +while ((let[0] = 1)); + +do {} while ((let[0] = 1)) + +var a = (let[0] = 1) + +;((let)[0] = 1) instanceof a + +void (let[0] = 1) + +;((let)[0] = 1)() + +new (let[0] = 1)() + +;((let)[0] = 1)\`\` + +;((let)[0] = 1).toString + +;((let)[0] = 1)?.toString + +;[...(let[0] = 1)] + +foo = () => (let[0] = 1) + +function* foo() { + yield (let[0] = 1) +} + +async function foo() { + await (let[0] = 1) +} + +function foo() { + return (let[0] = 1) +} + +while (true) (let)[0] = 1 + +throw (let[0] = 1) + +;({ foo: (let[0] = 1) }) + +;[(let[0] = 1)] + +for ((let)[0] = 1; ; ); +for ((let)[0] in {}); +for ((let)[0] of []); + +switch ((let[0] = 1)) { +} + +switch (foo) { + case (let[0] = 1): +} + +with ((let[0] = 1)); + +;(let)[x].foo() + +let.let[x].foo() + +a = let[x].foo() + +;(let)[2] + +a[1] + (let[2] = 2) + +================================================================================ +`; + +exports[`let.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let.a = 1; + +let.a[0] = 1; + +(let[a] = 1); + +(let[a].b.c.e = 1); + +foo[let[a]] = 1; + +(let)[let[a]] = 1; + +(let[a] ??= 1); + +foo = let[a]; + +let()[a] = 1; + +foo(let)[a] = 1; + +foo(let[a])[a] = 1; + +(let[0] = 1); + +(let["a"] = 1); + +let = 1; + +var let = 1; + +[let[a]] = 1; + +({a: let[a]} = 1); + +alert(let[0] = 1); + +(let[0] = 1) || 2; + +((let[0] = 1), 2); + +((let[0] = 1) ? a : b); + +if (let[0] = 1); + +while (let[0] = 1); + +do{} while (let[0] = 1); + +var a = (let[0] = 1); + +(let[0] = 1) instanceof a; + +void (let[0] = 1); + +(let[0] = 1)(); + +new (let[0] = 1)(); + +((let)[0] = 1)\`\`; + +((let)[0] = 1).toString; + +((let)[0] = 1)?.toString; + +[...(let[0] = 1)]; + +foo = () => (let[0] = 1); + +function * foo() {yield (let[0] = 1)} + +async function foo() {await (let[0] = 1)} + +function foo() {return (let[0] = 1)} + +while (true) (let[0] = 1); + +throw (let[0] = 1); + +({foo: (let[0] = 1)}); + +[(let[0] = 1)]; + +for ((let[0] = 1);;); +for ((let)[0] in {}); +for ((let)[0] of []); + +switch (let[0] = 1) {} + +switch (foo) { + case let[0] = 1: +} + +with (let[0] = 1); + +(let[x]).foo(); + +let.let[x].foo(); + +a = let[x].foo(); + +(let)[2]; + +a[1] + (let[2] = 2); + +=====================================output===================================== +let.a = 1; + +let.a[0] = 1; + +(let)[a] = 1; + +(let)[a].b.c.e = 1; + +foo[let[a]] = 1; + +(let)[let[a]] = 1; + +(let)[a] ??= 1; + +foo = let[a]; + +let()[a] = 1; + +foo(let)[a] = 1; + +foo(let[a])[a] = 1; + +(let)[0] = 1; + +(let)["a"] = 1; + +let = 1; + +var let = 1; + +[let[a]] = 1; + +({ a: let[a] } = 1); + +alert((let[0] = 1)); + +((let)[0] = 1) || 2; + +(((let)[0] = 1), 2); + +((let)[0] = 1) ? a : b; + +if ((let[0] = 1)); + +while ((let[0] = 1)); + +do {} while ((let[0] = 1)); + +var a = (let[0] = 1); + +((let)[0] = 1) instanceof a; + +void (let[0] = 1); + +((let)[0] = 1)(); + +new (let[0] = 1)(); + +((let)[0] = 1)\`\`; + +((let)[0] = 1).toString; + +((let)[0] = 1)?.toString; + +[...(let[0] = 1)]; + +foo = () => (let[0] = 1); + +function* foo() { + yield (let[0] = 1); +} + +async function foo() { + await (let[0] = 1); +} + +function foo() { + return (let[0] = 1); +} + +while (true) (let)[0] = 1; + +throw (let[0] = 1); + +({ foo: (let[0] = 1) }); + +[(let[0] = 1)]; + +for ((let)[0] = 1; ; ); +for ((let)[0] in {}); +for ((let)[0] of []); + +switch ((let[0] = 1)) { +} + +switch (foo) { + case (let[0] = 1): +} + +with ((let[0] = 1)); + +(let)[x].foo(); + +let.let[x].foo(); + +a = let[x].foo(); + +(let)[2]; + +a[1] + (let[2] = 2); + +================================================================================ +`; diff --git a/tests/format/js/identifier/parentheses/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/identifier/parentheses/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6d0419713d22..000000000000 --- a/tests/format/js/identifier/parentheses/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,481 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`const.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const [a = ((let)[0] = 1)] = 2; - -=====================================output===================================== -const [a = (let[0] = 1)] = 2 - -================================================================================ -`; - -exports[`const.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const [a = ((let)[0] = 1)] = 2; - -=====================================output===================================== -const [a = (let[0] = 1)] = 2; - -================================================================================ -`; - -exports[`let.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -let.a = 1; - -let.a[0] = 1; - -(let[a] = 1); - -(let[a].b.c.e = 1); - -foo[let[a]] = 1; - -(let)[let[a]] = 1; - -(let[a] ??= 1); - -foo = let[a]; - -let()[a] = 1; - -foo(let)[a] = 1; - -foo(let[a])[a] = 1; - -(let[0] = 1); - -(let["a"] = 1); - -let = 1; - -var let = 1; - -[let[a]] = 1; - -({a: let[a]} = 1); - -alert(let[0] = 1); - -(let[0] = 1) || 2; - -((let[0] = 1), 2); - -((let[0] = 1) ? a : b); - -if (let[0] = 1); - -while (let[0] = 1); - -do{} while (let[0] = 1); - -var a = (let[0] = 1); - -(let[0] = 1) instanceof a; - -void (let[0] = 1); - -(let[0] = 1)(); - -new (let[0] = 1)(); - -((let)[0] = 1)\`\`; - -((let)[0] = 1).toString; - -((let)[0] = 1)?.toString; - -[...(let[0] = 1)]; - -foo = () => (let[0] = 1); - -function * foo() {yield (let[0] = 1)} - -async function foo() {await (let[0] = 1)} - -function foo() {return (let[0] = 1)} - -while (true) (let[0] = 1); - -throw (let[0] = 1); - -({foo: (let[0] = 1)}); - -[(let[0] = 1)]; - -for ((let[0] = 1);;); -for ((let)[0] in {}); -for ((let)[0] of []); - -switch (let[0] = 1) {} - -switch (foo) { - case let[0] = 1: -} - -with (let[0] = 1); - -(let[x]).foo(); - -let.let[x].foo(); - -a = let[x].foo(); - -(let)[2]; - -a[1] + (let[2] = 2); - -=====================================output===================================== -let.a = 1 - -let.a[0] = 1 - -;(let)[a] = 1 - -;(let)[a].b.c.e = 1 - -foo[let[a]] = 1 - -;(let)[let[a]] = 1 - -;(let)[a] ??= 1 - -foo = let[a] - -let()[a] = 1 - -foo(let)[a] = 1 - -foo(let[a])[a] = 1 - -;(let)[0] = 1 - -;(let)["a"] = 1 - -let = 1 - -var let = 1 - -;[let[a]] = 1 - -;({ a: let[a] } = 1) - -alert((let[0] = 1)) - -;((let)[0] = 1) || 2 - -;((let)[0] = 1), 2 - -;((let)[0] = 1) ? a : b - -if ((let[0] = 1)); - -while ((let[0] = 1)); - -do {} while ((let[0] = 1)) - -var a = (let[0] = 1) - -;((let)[0] = 1) instanceof a - -void (let[0] = 1) - -;((let)[0] = 1)() - -new (let[0] = 1)() - -;((let)[0] = 1)\`\` - -;((let)[0] = 1).toString - -;((let)[0] = 1)?.toString - -;[...(let[0] = 1)] - -foo = () => (let[0] = 1) - -function* foo() { - yield (let[0] = 1) -} - -async function foo() { - await (let[0] = 1) -} - -function foo() { - return (let[0] = 1) -} - -while (true) (let)[0] = 1 - -throw (let[0] = 1) - -;({ foo: (let[0] = 1) }) - -;[(let[0] = 1)] - -for ((let)[0] = 1; ; ); -for ((let)[0] in {}); -for ((let)[0] of []); - -switch ((let[0] = 1)) { -} - -switch (foo) { - case (let[0] = 1): -} - -with ((let[0] = 1)); - -;(let)[x].foo() - -let.let[x].foo() - -a = let[x].foo() - -;(let)[2] - -a[1] + (let[2] = 2) - -================================================================================ -`; - -exports[`let.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let.a = 1; - -let.a[0] = 1; - -(let[a] = 1); - -(let[a].b.c.e = 1); - -foo[let[a]] = 1; - -(let)[let[a]] = 1; - -(let[a] ??= 1); - -foo = let[a]; - -let()[a] = 1; - -foo(let)[a] = 1; - -foo(let[a])[a] = 1; - -(let[0] = 1); - -(let["a"] = 1); - -let = 1; - -var let = 1; - -[let[a]] = 1; - -({a: let[a]} = 1); - -alert(let[0] = 1); - -(let[0] = 1) || 2; - -((let[0] = 1), 2); - -((let[0] = 1) ? a : b); - -if (let[0] = 1); - -while (let[0] = 1); - -do{} while (let[0] = 1); - -var a = (let[0] = 1); - -(let[0] = 1) instanceof a; - -void (let[0] = 1); - -(let[0] = 1)(); - -new (let[0] = 1)(); - -((let)[0] = 1)\`\`; - -((let)[0] = 1).toString; - -((let)[0] = 1)?.toString; - -[...(let[0] = 1)]; - -foo = () => (let[0] = 1); - -function * foo() {yield (let[0] = 1)} - -async function foo() {await (let[0] = 1)} - -function foo() {return (let[0] = 1)} - -while (true) (let[0] = 1); - -throw (let[0] = 1); - -({foo: (let[0] = 1)}); - -[(let[0] = 1)]; - -for ((let[0] = 1);;); -for ((let)[0] in {}); -for ((let)[0] of []); - -switch (let[0] = 1) {} - -switch (foo) { - case let[0] = 1: -} - -with (let[0] = 1); - -(let[x]).foo(); - -let.let[x].foo(); - -a = let[x].foo(); - -(let)[2]; - -a[1] + (let[2] = 2); - -=====================================output===================================== -let.a = 1; - -let.a[0] = 1; - -(let)[a] = 1; - -(let)[a].b.c.e = 1; - -foo[let[a]] = 1; - -(let)[let[a]] = 1; - -(let)[a] ??= 1; - -foo = let[a]; - -let()[a] = 1; - -foo(let)[a] = 1; - -foo(let[a])[a] = 1; - -(let)[0] = 1; - -(let)["a"] = 1; - -let = 1; - -var let = 1; - -[let[a]] = 1; - -({ a: let[a] } = 1); - -alert((let[0] = 1)); - -((let)[0] = 1) || 2; - -((let)[0] = 1), 2; - -((let)[0] = 1) ? a : b; - -if ((let[0] = 1)); - -while ((let[0] = 1)); - -do {} while ((let[0] = 1)); - -var a = (let[0] = 1); - -((let)[0] = 1) instanceof a; - -void (let[0] = 1); - -((let)[0] = 1)(); - -new (let[0] = 1)(); - -((let)[0] = 1)\`\`; - -((let)[0] = 1).toString; - -((let)[0] = 1)?.toString; - -[...(let[0] = 1)]; - -foo = () => (let[0] = 1); - -function* foo() { - yield (let[0] = 1); -} - -async function foo() { - await (let[0] = 1); -} - -function foo() { - return (let[0] = 1); -} - -while (true) (let)[0] = 1; - -throw (let[0] = 1); - -({ foo: (let[0] = 1) }); - -[(let[0] = 1)]; - -for ((let)[0] = 1; ; ); -for ((let)[0] in {}); -for ((let)[0] of []); - -switch ((let[0] = 1)) { -} - -switch (foo) { - case (let[0] = 1): -} - -with ((let[0] = 1)); - -(let)[x].foo(); - -let.let[x].foo(); - -a = let[x].foo(); - -(let)[2]; - -a[1] + (let[2] = 2); - -================================================================================ -`; diff --git a/tests/format/js/identifier/parentheses/format.test.js b/tests/format/js/identifier/parentheses/format.test.js new file mode 100644 index 000000000000..ed93e5ed09c8 --- /dev/null +++ b/tests/format/js/identifier/parentheses/format.test.js @@ -0,0 +1,14 @@ +runFormatTest(import.meta, [ + "babel", + // "flow", + "typescript", +]); +runFormatTest( + import.meta, + [ + "babel", + // "flow", + "typescript", + ], + { semi: false }, +); diff --git a/tests/format/js/identifier/parentheses/jsfmt.spec.js b/tests/format/js/identifier/parentheses/jsfmt.spec.js deleted file mode 100644 index 9556557681db..000000000000 --- a/tests/format/js/identifier/parentheses/jsfmt.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -run_spec(__dirname, [ - "babel", - // "flow", - "typescript", -]); -run_spec( - __dirname, - [ - "babel", - // "flow", - "typescript", - ], - { semi: false } -); diff --git a/tests/format/js/if/__snapshots__/format.test.js.snap b/tests/format/js/if/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0f7ac19100c0 --- /dev/null +++ b/tests/format/js/if/__snapshots__/format.test.js.snap @@ -0,0 +1,404 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment_before_else.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (cond) { + stuff; +} /* comment */ else if (cond) { + stuff; +} +// comment +else { + stuff; +} + +if (cond) stuff; +// comment +else stuff; + +=====================================output===================================== +if (cond) { + stuff; +} /* comment */ else if (cond) { + stuff; +} +// comment +else { + stuff; +} + +if (cond) stuff; +// comment +else stuff; + +================================================================================ +`; + +exports[`else.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Both functions below should be formatted exactly the same + +function f() { + if (position) + return {name: pair}; + else + return {name: pair.substring(0, position), value: pair.substring(position + 1)}; +} + +function f() { + if (position) + return {name: pair}; + else + return { + name: pair.substring(0, position), + value: pair.substring(position + 1) + }; +} + +=====================================output===================================== +// Both functions below should be formatted exactly the same + +function f() { + if (position) return { name: pair }; + else + return { + name: pair.substring(0, position), + value: pair.substring(position + 1), + }; +} + +function f() { + if (position) return { name: pair }; + else + return { + name: pair.substring(0, position), + value: pair.substring(position + 1), + }; +} + +================================================================================ +`; + +exports[`expr_and_same_line_comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + if (a === 0) doSomething(); // comment A1 +else if (a === 1) doSomethingElse(); // comment B1 +else if (a === 2) doSomethingElse(); // comment C1 + + if (a === 0) doSomething(); /* comment A2 */ +else if (a === 1) doSomethingElse(); /* comment B2 */ +else if (a === 2) doSomethingElse(); /* comment C2 */ + + if (a === 0) expr; // comment A3 +else if (a === 1) expr; // comment B3 +else if (a === 2) expr; // comment C3 + + if (a === 0) expr; /* comment A4 */ +else if (a === 1) expr; /* comment B4 */ +else if (a === 2) expr; /* comment C4 */ + + if (a === 0) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 +else if (a === 1) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment B5 +else if (a === 2) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment C5 + +function a() { + if (a) return; /* comment 6a */ + else return 2; + + if (a) return 1; /* comment 6b */ + else return 2; + + if (a) throw e; /* comment 6d */ + else return 2; + + if (a) var a = 1; /* comment 6e */ + else return 2; + + if (a) if (b); /* comment 6f */ + else return 2; +} + +=====================================output===================================== +if (a === 0) + doSomething(); // comment A1 +else if (a === 1) + doSomethingElse(); // comment B1 +else if (a === 2) doSomethingElse(); // comment C1 + +if (a === 0) doSomething(); /* comment A2 */ +else if (a === 1) doSomethingElse(); /* comment B2 */ +else if (a === 2) doSomethingElse(); /* comment C2 */ + +if (a === 0) + expr; // comment A3 +else if (a === 1) + expr; // comment B3 +else if (a === 2) expr; // comment C3 + +if (a === 0) expr; /* comment A4 */ +else if (a === 1) expr; /* comment B4 */ +else if (a === 2) expr; /* comment C4 */ + +if (a === 0) + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 +else if (a === 1) + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment B5 +else if (a === 2) + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment C5 + +function a() { + if (a) return; /* comment 6a */ + else return 2; + + if (a) return 1; /* comment 6b */ + else return 2; + + if (a) throw e; /* comment 6d */ + else return 2; + + if (a) var a = 1; /* comment 6e */ + else return 2; + + if (a) + if (b /* comment 6f */); + else return 2; +} + +================================================================================ +`; + +exports[`if_comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function f1() { + if (untrackedChoice === 0) /* Cancel */ { + return null; + } else if (untrackedChoice === 1) /* Add */ { + await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } else if (untrackedChoice === 2) /* Allow Untracked */ { + allowUntracked = true; + } +} + +async function f2() { + if (untrackedChoice === 0) /* Cancel */ + null; + else if (untrackedChoice === 1) /* Add */ + shouldAmend = true; + else if (untrackedChoice === 2) /* Allow Untracked */ + allowUntracked = true; +} + +async function f3() { + if (untrackedChoice === 0) /* Cancel */ // Cancel + null; + else if (untrackedChoice === 1) /* Add */ // Add + shouldAmend = true; + else if (untrackedChoice === 2) /* Allow Untracked */ // Allow Untracked + allowUntracked = true; +} + +async function f4() { + if (untrackedChoice === 0) + /* Cancel */ { + return null; + } + else if (untrackedChoice === 1) + /* Add */ { + await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } + else if (untrackedChoice === 2) + /* Allow Untracked */ { + allowUntracked = true; + } +} + +async function f5() { + if (untrackedChoice === 0) { + /* Cancel */ return null; + } else if (untrackedChoice === 1) { + /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } else if (untrackedChoice === 2) { + /* Allow Untracked */ allowUntracked = true; + } +} + +=====================================output===================================== +async function f1() { + if (untrackedChoice === 0) { + /* Cancel */ return null; + } else if (untrackedChoice === 1) { + /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } else if (untrackedChoice === 2) { + /* Allow Untracked */ allowUntracked = true; + } +} + +async function f2() { + if (untrackedChoice === 0) /* Cancel */ null; + else if (untrackedChoice === 1) /* Add */ shouldAmend = true; + else if (untrackedChoice === 2) /* Allow Untracked */ allowUntracked = true; +} + +async function f3() { + if (untrackedChoice === 0) + /* Cancel */ // Cancel + null; + else if (untrackedChoice === 1) + /* Add */ // Add + shouldAmend = true; + else if (untrackedChoice === 2) + /* Allow Untracked */ // Allow Untracked + allowUntracked = true; +} + +async function f4() { + if (untrackedChoice === 0) { + /* Cancel */ return null; + } else if (untrackedChoice === 1) { + /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } else if (untrackedChoice === 2) { + /* Allow Untracked */ allowUntracked = true; + } +} + +async function f5() { + if (untrackedChoice === 0) { + /* Cancel */ return null; + } else if (untrackedChoice === 1) { + /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); + shouldAmend = true; + } else if (untrackedChoice === 2) { + /* Allow Untracked */ allowUntracked = true; + } +} + +================================================================================ +`; + +exports[`issue-15168.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +for (const division of collidingDivisions) { + if (!division.properties.canRemove) { + if (division.canContainSingleParagraph(startParagraph)) continue; // selection starting in r/o div: always OK to delete + else if (endParagraph !== division.endParagraph && division.canContainSingleParagraph(endParagraph)) continue; // selection ending in r/o div: OK to delete IF it is NOT last paragraph (which would get absorbed) + else { // selection over whole r/o div OR ending in last paragraph (which would get absorbed) -> FAIL + console.warn('deleteSelectedTextAndJoinRemainingNodes(): cannot delete because of must-keep division: ' + division.properties.name); + } + } +} + +=====================================output===================================== +for (const division of collidingDivisions) { + if (!division.properties.canRemove) { + if (division.canContainSingleParagraph(startParagraph)) + continue; // selection starting in r/o div: always OK to delete + else if ( + endParagraph !== division.endParagraph && + division.canContainSingleParagraph(endParagraph) + ) + continue; // selection ending in r/o div: OK to delete IF it is NOT last paragraph (which would get absorbed) + else { + // selection over whole r/o div OR ending in last paragraph (which would get absorbed) -> FAIL + console.warn( + "deleteSelectedTextAndJoinRemainingNodes(): cannot delete because of must-keep division: " + + division.properties.name, + ); + } + } +} + +================================================================================ +`; + +exports[`non-block.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (foo) for (i = 2; i > 0; i--) console.log(i); // foo +else bar(); + +if (foo) do { console.log(i) } while(i--) // foo +else bar(); + +=====================================output===================================== +if (foo) + for (i = 2; i > 0; i--) console.log(i); // foo +else bar(); + +if (foo) + do { + console.log(i); + } while (i--); // foo +else bar(); + +================================================================================ +`; + +exports[`trailing_comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (code === 92 /* '\\' */) {} +if (code === 92 /* '\\' */ /* '\\' */) {} + +if (code === 92) /* '\\' */ {} +if (code === 92) { /* '\\' */ } + +if ( + 1 + // Comment +) { + a; +} + +=====================================output===================================== +if (code === 92 /* '\\' */) { +} +if (code === 92 /* '\\' */ /* '\\' */) { +} + +if (code === 92) { + /* '\\' */ +} +if (code === 92) { + /* '\\' */ +} + +if ( + 1 + // Comment +) { + a; +} + +================================================================================ +`; diff --git a/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fc49b1e98588..000000000000 --- a/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,300 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment_before_else.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (cond) { - stuff; -} /* comment */ else if (cond) { - stuff; -} -// comment -else { - stuff; -} - -if (cond) stuff; -// comment -else stuff; - -=====================================output===================================== -if (cond) { - stuff; -} /* comment */ else if (cond) { - stuff; -} -// comment -else { - stuff; -} - -if (cond) stuff; -// comment -else stuff; - -================================================================================ -`; - -exports[`else.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Both functions below should be formatted exactly the same - -function f() { - if (position) - return {name: pair}; - else - return {name: pair.substring(0, position), value: pair.substring(position + 1)}; -} - -function f() { - if (position) - return {name: pair}; - else - return { - name: pair.substring(0, position), - value: pair.substring(position + 1) - }; -} - -=====================================output===================================== -// Both functions below should be formatted exactly the same - -function f() { - if (position) return { name: pair }; - else - return { - name: pair.substring(0, position), - value: pair.substring(position + 1), - }; -} - -function f() { - if (position) return { name: pair }; - else - return { - name: pair.substring(0, position), - value: pair.substring(position + 1), - }; -} - -================================================================================ -`; - -exports[`expr_and_same_line_comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (a === 0) doSomething(); // comment A1 -else if (a === 1) doSomethingElse(); // comment B1 -else if (a === 2) doSomethingElse(); // comment C1 - -if (a === 0) doSomething(); /* comment A2 */ -else if (a === 1) doSomethingElse(); /* comment B2 */ -else if (a === 2) doSomethingElse(); /* comment C2 */ - -if (a === 0) expr; // comment A3 -else if (a === 1) expr; // comment B3 -else if (a === 2) expr; // comment C3 - -if (a === 0) expr; /* comment A4 */ -else if (a === 1) expr; /* comment B4 */ -else if (a === 2) expr; /* comment C4 */ - -if (a === 0) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 -else if (a === 1) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment B5 -else if (a === 2) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment C5 - -=====================================output===================================== -if (a === 0) doSomething(); // comment A1 -else if (a === 1) doSomethingElse(); // comment B1 -else if (a === 2) doSomethingElse(); // comment C1 - -if (a === 0) doSomething(); /* comment A2 */ -else if (a === 1) doSomethingElse(); /* comment B2 */ -else if (a === 2) doSomethingElse(); /* comment C2 */ - -if (a === 0) expr; // comment A3 -else if (a === 1) expr; // comment B3 -else if (a === 2) expr; // comment C3 - -if (a === 0) expr; /* comment A4 */ -else if (a === 1) expr; /* comment B4 */ -else if (a === 2) expr; /* comment C4 */ - -if (a === 0) - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 -else if (a === 1) - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment B5 -else if (a === 2) - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment C5 - -================================================================================ -`; - -exports[`if_comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -async function f1() { - if (untrackedChoice === 0) /* Cancel */ { - return null; - } else if (untrackedChoice === 1) /* Add */ { - await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } else if (untrackedChoice === 2) /* Allow Untracked */ { - allowUntracked = true; - } -} - -async function f2() { - if (untrackedChoice === 0) /* Cancel */ - null; - else if (untrackedChoice === 1) /* Add */ - shouldAmend = true; - else if (untrackedChoice === 2) /* Allow Untracked */ - allowUntracked = true; -} - -async function f3() { - if (untrackedChoice === 0) /* Cancel */ // Cancel - null; - else if (untrackedChoice === 1) /* Add */ // Add - shouldAmend = true; - else if (untrackedChoice === 2) /* Allow Untracked */ // Allow Untracked - allowUntracked = true; -} - -async function f4() { - if (untrackedChoice === 0) - /* Cancel */ { - return null; - } - else if (untrackedChoice === 1) - /* Add */ { - await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } - else if (untrackedChoice === 2) - /* Allow Untracked */ { - allowUntracked = true; - } -} - -async function f5() { - if (untrackedChoice === 0) { - /* Cancel */ return null; - } else if (untrackedChoice === 1) { - /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } else if (untrackedChoice === 2) { - /* Allow Untracked */ allowUntracked = true; - } -} - -=====================================output===================================== -async function f1() { - if (untrackedChoice === 0) { - /* Cancel */ return null; - } else if (untrackedChoice === 1) { - /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } else if (untrackedChoice === 2) { - /* Allow Untracked */ allowUntracked = true; - } -} - -async function f2() { - if (untrackedChoice === 0) /* Cancel */ null; - else if (untrackedChoice === 1) /* Add */ shouldAmend = true; - else if (untrackedChoice === 2) /* Allow Untracked */ allowUntracked = true; -} - -async function f3() { - if (untrackedChoice === 0) - /* Cancel */ // Cancel - null; - else if (untrackedChoice === 1) - /* Add */ // Add - shouldAmend = true; - else if (untrackedChoice === 2) - /* Allow Untracked */ // Allow Untracked - allowUntracked = true; -} - -async function f4() { - if (untrackedChoice === 0) { - /* Cancel */ return null; - } else if (untrackedChoice === 1) { - /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } else if (untrackedChoice === 2) { - /* Allow Untracked */ allowUntracked = true; - } -} - -async function f5() { - if (untrackedChoice === 0) { - /* Cancel */ return null; - } else if (untrackedChoice === 1) { - /* Add */ await repository.addAll(Array.from(untrackedChanges.keys())); - shouldAmend = true; - } else if (untrackedChoice === 2) { - /* Allow Untracked */ allowUntracked = true; - } -} - -================================================================================ -`; - -exports[`trailing_comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (code === 92 /* '\\' */) {} -if (code === 92 /* '\\' */ /* '\\' */) {} - -if (code === 92) /* '\\' */ {} -if (code === 92) { /* '\\' */ } - -if ( - 1 - // Comment -) { - a; -} - -=====================================output===================================== -if (code === 92 /* '\\' */) { -} -if (code === 92 /* '\\' */ /* '\\' */) { -} - -if (code === 92) { - /* '\\' */ -} -if (code === 92) { - /* '\\' */ -} - -if ( - 1 - // Comment -) { - a; -} - -================================================================================ -`; diff --git a/tests/format/js/if/expr_and_same_line_comments.js b/tests/format/js/if/expr_and_same_line_comments.js index 9611becdedee..b316f4fa34ea 100644 --- a/tests/format/js/if/expr_and_same_line_comments.js +++ b/tests/format/js/if/expr_and_same_line_comments.js @@ -1,19 +1,36 @@ -if (a === 0) doSomething(); // comment A1 + if (a === 0) doSomething(); // comment A1 else if (a === 1) doSomethingElse(); // comment B1 else if (a === 2) doSomethingElse(); // comment C1 -if (a === 0) doSomething(); /* comment A2 */ + if (a === 0) doSomething(); /* comment A2 */ else if (a === 1) doSomethingElse(); /* comment B2 */ else if (a === 2) doSomethingElse(); /* comment C2 */ -if (a === 0) expr; // comment A3 + if (a === 0) expr; // comment A3 else if (a === 1) expr; // comment B3 else if (a === 2) expr; // comment C3 -if (a === 0) expr; /* comment A4 */ + if (a === 0) expr; /* comment A4 */ else if (a === 1) expr; /* comment B4 */ else if (a === 2) expr; /* comment C4 */ -if (a === 0) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 + if (a === 0) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment A5 else if (a === 1) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment B5 else if (a === 2) looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong; // comment C5 + +function a() { + if (a) return; /* comment 6a */ + else return 2; + + if (a) return 1; /* comment 6b */ + else return 2; + + if (a) throw e; /* comment 6d */ + else return 2; + + if (a) var a = 1; /* comment 6e */ + else return 2; + + if (a) if (b); /* comment 6f */ + else return 2; +} diff --git a/tests/format/js/if/format.test.js b/tests/format/js/if/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/if/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/if/issue-15168.js b/tests/format/js/if/issue-15168.js new file mode 100644 index 000000000000..6dc290d13ca4 --- /dev/null +++ b/tests/format/js/if/issue-15168.js @@ -0,0 +1,9 @@ +for (const division of collidingDivisions) { + if (!division.properties.canRemove) { + if (division.canContainSingleParagraph(startParagraph)) continue; // selection starting in r/o div: always OK to delete + else if (endParagraph !== division.endParagraph && division.canContainSingleParagraph(endParagraph)) continue; // selection ending in r/o div: OK to delete IF it is NOT last paragraph (which would get absorbed) + else { // selection over whole r/o div OR ending in last paragraph (which would get absorbed) -> FAIL + console.warn('deleteSelectedTextAndJoinRemainingNodes(): cannot delete because of must-keep division: ' + division.properties.name); + } + } +} diff --git a/tests/format/js/if/jsfmt.spec.js b/tests/format/js/if/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/if/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/if/non-block.js b/tests/format/js/if/non-block.js new file mode 100644 index 000000000000..68c128000d4f --- /dev/null +++ b/tests/format/js/if/non-block.js @@ -0,0 +1,5 @@ +if (foo) for (i = 2; i > 0; i--) console.log(i); // foo +else bar(); + +if (foo) do { console.log(i) } while(i--) // foo +else bar(); diff --git a/tests/format/js/ignore/__snapshots__/format.test.js.snap b/tests/format/js/ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a24854c9a0ee --- /dev/null +++ b/tests/format/js/ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,515 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class-expression-decorator.js [acorn] format 1`] = ` +"Unexpected character '@' (3:3) + 1 | ( + 2 | // prettier-ignore +> 3 | @decorator + | ^ + 4 | class {} + 5 | ); + 6 | +Cause: Unexpected character '@' (3:2)" +`; + +exports[`class-expression-decorator.js [espree] format 1`] = ` +"Unexpected character '@' (3:3) + 1 | ( + 2 | // prettier-ignore +> 3 | @decorator + | ^ + 4 | class {} + 5 | ); + 6 | +Cause: Unexpected character '@'" +`; + +exports[`class-expression-decorator.js [flow] format 1`] = ` +"Unexpected token \`@\` (3:3) + 1 | ( + 2 | // prettier-ignore +> 3 | @decorator + | ^ + 4 | class {} + 5 | ); + 6 |" +`; + +exports[`class-expression-decorator.js [hermes] format 1`] = ` +"unrecognized character '@' (3:2) + 1 | ( + 2 | // prettier-ignore +> 3 | @decorator + | ^ + 4 | class {} + 5 | ); + 6 | +Cause: unrecognized character '@' (3:2) + @decorator + ^" +`; + +exports[`class-expression-decorator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +( + // prettier-ignore + @decorator + class {} +); + +=====================================output===================================== +// prettier-ignore +( + @decorator + class {} +); + +================================================================================ +`; + +exports[`decorator.js [acorn] format 1`] = ` +"Unexpected character '@' (2:1) + 1 | // prettier-ignore +> 2 | @decorator + | ^ + 3 | class A {} + 4 | +Cause: Unexpected character '@' (2:0)" +`; + +exports[`decorator.js [espree] format 1`] = ` +"Unexpected character '@' (2:1) + 1 | // prettier-ignore +> 2 | @decorator + | ^ + 3 | class A {} + 4 | +Cause: Unexpected character '@'" +`; + +exports[`decorator.js [hermes] format 1`] = ` +"unrecognized character '@' (2:0) + 1 | // prettier-ignore +> 2 | @decorator + 3 | class A {} + 4 | +Cause: unrecognized character '@' (2:0) +@decorator +^" +`; + +exports[`decorator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// prettier-ignore +@decorator +class A {} + +=====================================output===================================== +// prettier-ignore +@decorator +class A {} + +================================================================================ +`; + +exports[`ignore.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a() { + // prettier-ignore + var fnString = + '"' + this.USE + ' ' + this.STRICT + '";\\n' + + this.filterPrefix() + + 'var fn=' + this.generateFunction('fn', 's,l,a,i') + + extra + + this.watchFns() + + 'return fn;'; + + // prettier-ignore + const identity = Matrix.create( + 1, 0, 0, + 0, 1, 0, + 0, 0, 0 + ); + + // Let's make sure that this comment doesn't interfere + + // prettier-ignore + const commentsWithPrettierIgnore = { + "ewww": + "gross-formatting", + }; + + function giveMeSome() { + a( a ); // prettier-ignore + // shouldn't I return something? :shrug: + } + + // prettier-ignore + console.error( + 'In order to use ' + prompt + ', you need to configure a ' + + 'few environment variables to be able to commit to the ' + + 'repository. Follow those steps to get you setup:\\n' + + '\\n' + + 'Go to https://github.com/settings/tokens/new\\n' + + ' - Fill "Token description" with "' + prompt + ' for ' + + repoSlug + '"\\n' + + ' - Check "public_repo"\\n' + + ' - Press "Generate Token"\\n' + + '\\n' + + 'In a different tab, go to https://travis-ci.org/' + + repoSlug + '/settings\\n' + + ' - Make sure "Build only if .travis.yml is present" is ON\\n' + + ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' + + 'account you generated the token with. Press "Add"\\n' + + '\\n' + + 'Once this is done, commit anything to the repository to restart ' + + 'Travis and it should work :)' + ); +} + +const response = { + // prettier-ignore + '_text': 'Turn on the lights', + intent: 'lights', +}; + +=====================================output===================================== +function a() { + // prettier-ignore + var fnString = + '"' + this.USE + ' ' + this.STRICT + '";\\n' + + this.filterPrefix() + + 'var fn=' + this.generateFunction('fn', 's,l,a,i') + + extra + + this.watchFns() + + 'return fn;'; + + // prettier-ignore + const identity = Matrix.create( + 1, 0, 0, + 0, 1, 0, + 0, 0, 0 + ); + + // Let's make sure that this comment doesn't interfere + + // prettier-ignore + const commentsWithPrettierIgnore = { + "ewww": + "gross-formatting", + }; + + function giveMeSome() { + a( a ); // prettier-ignore + // shouldn't I return something? :shrug: + } + + // prettier-ignore + console.error( + 'In order to use ' + prompt + ', you need to configure a ' + + 'few environment variables to be able to commit to the ' + + 'repository. Follow those steps to get you setup:\\n' + + '\\n' + + 'Go to https://github.com/settings/tokens/new\\n' + + ' - Fill "Token description" with "' + prompt + ' for ' + + repoSlug + '"\\n' + + ' - Check "public_repo"\\n' + + ' - Press "Generate Token"\\n' + + '\\n' + + 'In a different tab, go to https://travis-ci.org/' + + repoSlug + '/settings\\n' + + ' - Make sure "Build only if .travis.yml is present" is ON\\n' + + ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' + + 'account you generated the token with. Press "Add"\\n' + + '\\n' + + 'Once this is done, commit anything to the repository to restart ' + + 'Travis and it should work :)' + ); +} + +const response = { + // prettier-ignore + '_text': 'Turn on the lights', + intent: "lights", +}; + +================================================================================ +`; + +exports[`ignore-2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #8736 + +function HelloWorld() { + return ( + <div + {...{} /* + // @ts-ignore */ /* prettier-ignore */} + invalidProp="HelloWorld" + > + test + </div> + ); +} + +a = <div {.../* prettier-ignore */b}/> +a = <div {...b/* prettier-ignore */}/> +a = <div {.../* prettier-ignore */{}}/> +a = <div {...{/* prettier-ignore */}}/> +a = <div {...{}/* prettier-ignore */}/> + +=====================================output===================================== +// #8736 + +function HelloWorld() { + return ( + <div + {...{} /* + // @ts-ignore */ /* prettier-ignore */} + invalidProp="HelloWorld" + > + test + </div> + ); +} + +a = <div {.../* prettier-ignore */ b} />; +a = <div {...b /* prettier-ignore */} />; +a = <div {.../* prettier-ignore */ {}} />; +a = <div {...{/* prettier-ignore */}} />; +a = <div {...{} /* prettier-ignore */} />; + +================================================================================ +`; + +exports[`issue-9335.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class foo extends + // prettier-ignore + f {} + +=====================================output===================================== +class foo + // prettier-ignore + extends f {} + +================================================================================ +`; + +exports[`issue-9877.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default function test() { + return { + matrix: // prettier-ignore + new Float32Array([ + 0, 0, + 1, 0, + 1, 1, + 0, 1 + ]), + }; +} + +=====================================output===================================== +export default function test() { + return { + matrix: // prettier-ignore + new Float32Array([ + 0, 0, + 1, 0, + 1, 1, + 0, 1 + ]), + }; +} + +================================================================================ +`; + +exports[`issue-10661.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +verylongidentifierthatwillwrap123123123123123( + a.b + // prettier-ignore + // Some other comment here + .c +); + +call( + // comment + a. + // prettier-ignore + b +) + +call( + a( +/* +this won't get formatted too, +because the prettier-ignore comment is attached as MemberExpression leading comment +*/ +1, +2.0000, 3 +) + // prettier-ignore + .c +) + +=====================================output===================================== +verylongidentifierthatwillwrap123123123123123( + a.b + // prettier-ignore + // Some other comment here + .c, +); + +call( + // comment + a. + // prettier-ignore + b, +); + +call( + a( +/* +this won't get formatted too, +because the prettier-ignore comment is attached as MemberExpression leading comment +*/ +1, +2.0000, 3 +) + // prettier-ignore + .c, +); + +================================================================================ +`; + +exports[`issue-11077.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function HelloWorld(x) { + + ( + // prettier-ignore + // eslint-disable-next-line + x.a | + x.b + ).call(null) + +} + +function HelloWorld(x) { + // prettier-ignore + ( + // eslint-disable-next-line + x.a | + x.b + ).call(null) + +} + +=====================================output===================================== +function HelloWorld(x) { + // prettier-ignore + // eslint-disable-next-line + (x.a | + x.b).call(null); +} + +function HelloWorld(x) { + // prettier-ignore + ( + // eslint-disable-next-line + x.a | + x.b + ).call(null) +} + +================================================================================ +`; + +exports[`issue-13737.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +oneArgument( + // prettier-ignore + (0, 1) +) + +a=( + // prettier-ignore + (0, 1) +) + +=====================================output===================================== +oneArgument( + // prettier-ignore + (0, 1), +); + +a = + // prettier-ignore + (0, 1); + +================================================================================ +`; + +exports[`issue-14404.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +async function foo() { +( + // prettier-ignore + // b + await thing() +).blah +} + +=====================================output===================================== +async function foo() { + // prettier-ignore + // b + (await thing()).blah; +} + +================================================================================ +`; diff --git a/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 08ca9cd17139..000000000000 --- a/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,243 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignore.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a() { - // prettier-ignore - var fnString = - '"' + this.USE + ' ' + this.STRICT + '";\\n' + - this.filterPrefix() + - 'var fn=' + this.generateFunction('fn', 's,l,a,i') + - extra + - this.watchFns() + - 'return fn;'; - - // prettier-ignore - const identity = Matrix.create( - 1, 0, 0, - 0, 1, 0, - 0, 0, 0 - ); - - // Let's make sure that this comment doesn't interfere - - // prettier-ignore - const commentsWithPrettierIgnore = { - "ewww": - "gross-formatting", - }; - - function giveMeSome() { - a( a ); // prettier-ignore - // shouldn't I return something? :shrug: - } - - // prettier-ignore - console.error( - 'In order to use ' + prompt + ', you need to configure a ' + - 'few environment variables to be able to commit to the ' + - 'repository. Follow those steps to get you setup:\\n' + - '\\n' + - 'Go to https://github.com/settings/tokens/new\\n' + - ' - Fill "Token description" with "' + prompt + ' for ' + - repoSlug + '"\\n' + - ' - Check "public_repo"\\n' + - ' - Press "Generate Token"\\n' + - '\\n' + - 'In a different tab, go to https://travis-ci.org/' + - repoSlug + '/settings\\n' + - ' - Make sure "Build only if .travis.yml is present" is ON\\n' + - ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' + - 'account you generated the token with. Press "Add"\\n' + - '\\n' + - 'Once this is done, commit anything to the repository to restart ' + - 'Travis and it should work :)' - ); -} - -const response = { - // prettier-ignore - '_text': 'Turn on the lights', - intent: 'lights', -}; - -=====================================output===================================== -function a() { - // prettier-ignore - var fnString = - '"' + this.USE + ' ' + this.STRICT + '";\\n' + - this.filterPrefix() + - 'var fn=' + this.generateFunction('fn', 's,l,a,i') + - extra + - this.watchFns() + - 'return fn;'; - - // prettier-ignore - const identity = Matrix.create( - 1, 0, 0, - 0, 1, 0, - 0, 0, 0 - ); - - // Let's make sure that this comment doesn't interfere - - // prettier-ignore - const commentsWithPrettierIgnore = { - "ewww": - "gross-formatting", - }; - - function giveMeSome() { - a( a ); // prettier-ignore - // shouldn't I return something? :shrug: - } - - // prettier-ignore - console.error( - 'In order to use ' + prompt + ', you need to configure a ' + - 'few environment variables to be able to commit to the ' + - 'repository. Follow those steps to get you setup:\\n' + - '\\n' + - 'Go to https://github.com/settings/tokens/new\\n' + - ' - Fill "Token description" with "' + prompt + ' for ' + - repoSlug + '"\\n' + - ' - Check "public_repo"\\n' + - ' - Press "Generate Token"\\n' + - '\\n' + - 'In a different tab, go to https://travis-ci.org/' + - repoSlug + '/settings\\n' + - ' - Make sure "Build only if .travis.yml is present" is ON\\n' + - ' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' + - 'account you generated the token with. Press "Add"\\n' + - '\\n' + - 'Once this is done, commit anything to the repository to restart ' + - 'Travis and it should work :)' - ); -} - -const response = { - // prettier-ignore - '_text': 'Turn on the lights', - intent: "lights", -}; - -================================================================================ -`; - -exports[`ignore-2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #8736 - -function HelloWorld() { - return ( - <div - {...{} /* - // @ts-ignore */ /* prettier-ignore */} - invalidProp="HelloWorld" - > - test - </div> - ); -} - -a = <div {.../* prettier-ignore */b}/> -a = <div {...b/* prettier-ignore */}/> -a = <div {.../* prettier-ignore */{}}/> -a = <div {...{/* prettier-ignore */}}/> -a = <div {...{}/* prettier-ignore */}/> - -=====================================output===================================== -// #8736 - -function HelloWorld() { - return ( - <div - {...{} /* - // @ts-ignore */ /* prettier-ignore */} - invalidProp="HelloWorld" - > - test - </div> - ); -} - -a = <div {.../* prettier-ignore */ b} />; -a = <div {...b /* prettier-ignore */} />; -a = <div {.../* prettier-ignore */ {}} />; -a = <div {...{/* prettier-ignore */}} />; -a = <div {...{} /* prettier-ignore */} />; - -================================================================================ -`; - -exports[`issue-10661.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -verylongidentifierthatwillwrap123123123123123( - a.b - // prettier-ignore - // Some other comment here - .c -); - -call( - // comment - a. - // prettier-ignore - b -) - -call( - a( -/* -this won't get formatted too, -because the prettier-ignore comment is attached as MemberExpression leading comment -*/ -1, -2.0000, 3 -) - // prettier-ignore - .c -) - -=====================================output===================================== -verylongidentifierthatwillwrap123123123123123( - a.b - // prettier-ignore - // Some other comment here - .c -); - -call( - // comment - a. - // prettier-ignore - b -); - -call( - a( -/* -this won't get formatted too, -because the prettier-ignore comment is attached as MemberExpression leading comment -*/ -1, -2.0000, 3 -) - // prettier-ignore - .c -); - -================================================================================ -`; diff --git a/tests/format/js/ignore/class-expression-decorator.js b/tests/format/js/ignore/class-expression-decorator.js new file mode 100644 index 000000000000..8d6863350e9a --- /dev/null +++ b/tests/format/js/ignore/class-expression-decorator.js @@ -0,0 +1,5 @@ +( + // prettier-ignore + @decorator + class {} +); diff --git a/tests/format/js/ignore/decorator.js b/tests/format/js/ignore/decorator.js new file mode 100644 index 000000000000..7d2b146ff351 --- /dev/null +++ b/tests/format/js/ignore/decorator.js @@ -0,0 +1,3 @@ +// prettier-ignore +@decorator +class A {} diff --git a/tests/format/js/ignore/format.test.js b/tests/format/js/ignore/format.test.js new file mode 100644 index 000000000000..d7e7dd5594ec --- /dev/null +++ b/tests/format/js/ignore/format.test.js @@ -0,0 +1,8 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + acorn: ["decorator.js", "class-expression-decorator.js"], + espree: ["decorator.js", "class-expression-decorator.js"], + flow: ["class-expression-decorator.js"], + hermes: ["decorator.js", "class-expression-decorator.js"], + }, +}); diff --git a/tests/format/js/ignore/issue-11077.js b/tests/format/js/ignore/issue-11077.js new file mode 100644 index 000000000000..8f1367c17722 --- /dev/null +++ b/tests/format/js/ignore/issue-11077.js @@ -0,0 +1,20 @@ +function HelloWorld(x) { + + ( + // prettier-ignore + // eslint-disable-next-line + x.a | + x.b + ).call(null) + +} + +function HelloWorld(x) { + // prettier-ignore + ( + // eslint-disable-next-line + x.a | + x.b + ).call(null) + +} diff --git a/tests/format/js/ignore/issue-13737.js b/tests/format/js/ignore/issue-13737.js new file mode 100644 index 000000000000..63bfb767b400 --- /dev/null +++ b/tests/format/js/ignore/issue-13737.js @@ -0,0 +1,9 @@ +oneArgument( + // prettier-ignore + (0, 1) +) + +a=( + // prettier-ignore + (0, 1) +) diff --git a/tests/format/js/ignore/issue-14404.js b/tests/format/js/ignore/issue-14404.js new file mode 100644 index 000000000000..62ec236ce507 --- /dev/null +++ b/tests/format/js/ignore/issue-14404.js @@ -0,0 +1,7 @@ +async function foo() { +( + // prettier-ignore + // b + await thing() +).blah +} diff --git a/tests/format/js/ignore/issue-9335.js b/tests/format/js/ignore/issue-9335.js new file mode 100644 index 000000000000..51be980f896b --- /dev/null +++ b/tests/format/js/ignore/issue-9335.js @@ -0,0 +1,3 @@ +class foo extends + // prettier-ignore + f {} diff --git a/tests/format/js/ignore/issue-9877.js b/tests/format/js/ignore/issue-9877.js new file mode 100644 index 000000000000..8a51508ad523 --- /dev/null +++ b/tests/format/js/ignore/issue-9877.js @@ -0,0 +1,11 @@ +export default function test() { + return { + matrix: // prettier-ignore + new Float32Array([ + 0, 0, + 1, 0, + 1, 1, + 0, 1 + ]), + }; +} diff --git a/tests/format/js/ignore/jsfmt.spec.js b/tests/format/js/ignore/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/ignore/semi/__snapshots__/format.test.js.snap b/tests/format/js/ignore/semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8faed14324e1 --- /dev/null +++ b/tests/format/js/ignore/semi/__snapshots__/format.test.js.snap @@ -0,0 +1,99 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`asi.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +foo; +// prettier-ignore +[1].map(); + +=====================================output===================================== +foo +// prettier-ignore +;[1].map(); + +================================================================================ +`; + +exports[`asi.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo; +// prettier-ignore +[1].map(); + +=====================================output===================================== +foo; +// prettier-ignore +[1].map(); + +================================================================================ +`; + +exports[`directive.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// prettier-ignore +'use strict'; +[].forEach(); + +function foo() { +// prettier-ignore +'use strict'; +[].forEach(); +} + +=====================================output===================================== +// prettier-ignore +'use strict'; +;[].forEach() + +function foo() { + // prettier-ignore + 'use strict'; + ;[].forEach() +} + +================================================================================ +`; + +exports[`directive.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// prettier-ignore +'use strict'; +[].forEach(); + +function foo() { +// prettier-ignore +'use strict'; +[].forEach(); +} + +=====================================output===================================== +// prettier-ignore +'use strict'; +[].forEach(); + +function foo() { + // prettier-ignore + 'use strict'; + [].forEach(); +} + +================================================================================ +`; diff --git a/tests/format/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e836b8979c5e..000000000000 --- a/tests/format/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,62 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`directive.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// prettier-ignore -'use strict'; -[].forEach(); - -function foo() { -// prettier-ignore -'use strict'; -[].forEach(); -} - -=====================================output===================================== -// prettier-ignore -'use strict'; -;[].forEach() - -function foo() { - // prettier-ignore - 'use strict'; - ;[].forEach() -} - -================================================================================ -`; - -exports[`directive.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// prettier-ignore -'use strict'; -[].forEach(); - -function foo() { -// prettier-ignore -'use strict'; -[].forEach(); -} - -=====================================output===================================== -// prettier-ignore -'use strict'; -[].forEach(); - -function foo() { - // prettier-ignore - 'use strict'; - [].forEach(); -} - -================================================================================ -`; diff --git a/tests/format/js/ignore/semi/asi.js b/tests/format/js/ignore/semi/asi.js new file mode 100644 index 000000000000..94cb77939ef2 --- /dev/null +++ b/tests/format/js/ignore/semi/asi.js @@ -0,0 +1,3 @@ +foo; +// prettier-ignore +[1].map(); diff --git a/tests/format/js/ignore/semi/format.test.js b/tests/format/js/ignore/semi/format.test.js new file mode 100644 index 000000000000..5f0ff42da986 --- /dev/null +++ b/tests/format/js/ignore/semi/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/ignore/semi/jsfmt.spec.js b/tests/format/js/ignore/semi/jsfmt.spec.js deleted file mode 100644 index 728e1ab5ce4e..000000000000 --- a/tests/format/js/ignore/semi/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/import-assertions/__snapshots__/format.test.js.snap b/tests/format/js/import-assertions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..95188e76932d --- /dev/null +++ b/tests/format/js/import-assertions/__snapshots__/format.test.js.snap @@ -0,0 +1,343 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { assert: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", { assert: { type: "json" } }); + +================================================================================ +`; + +exports[`empty.js [acorn] format 1`] = ` +"Unexpected token (2:33) + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } + | ^ + 3 | export * as baz from "baz.json" assert { /* comment */ } + 4 | + 5 | import * as foo from "foo.json" +Cause: Unexpected token (2:32)" +`; + +exports[`empty.js [espree] format 1`] = ` +"Unexpected token assert (2:33) + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } + | ^ + 3 | export * as baz from "baz.json" assert { /* comment */ } + 4 | + 5 | import * as foo from "foo.json" +Cause: Unexpected token assert" +`; + +exports[`empty.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (2:33) + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } + | ^^^^^^ + 3 | export * as baz from "baz.json" assert { /* comment */ } + 4 | + 5 | import * as foo from "foo.json" +Cause: [2:32-2:38]: Unexpected token: 'identifier'" +`; + +exports[`empty.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as foo from "foo.json" +export * as bar from "bar.json" assert { } +export * as baz from "baz.json" assert { /* comment */ } + +import * as foo from "foo.json" +import * as bar from "bar.json" assert { } +import * as baz from "baz.json" assert { /* comment */ } +=====================================output===================================== +export * as foo from "foo.json"; +export * as bar from "bar.json" assert {}; +export * as baz from "baz.json" /* comment */ assert {}; + +import * as foo from "foo.json"; +import * as bar from "bar.json" assert {}; +import * as baz from "baz.json" /* comment */ assert {}; + +================================================================================ +`; + +exports[`keyword-detect.js [acorn] format 1`] = ` +"Unexpected token (1:33) +> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" } + | ^ + 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" } + 3 | + 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" } +Cause: Unexpected token (1:32)" +`; + +exports[`keyword-detect.js [espree] format 1`] = ` +"Unexpected token assert (1:33) +> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" } + | ^ + 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" } + 3 | + 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" } +Cause: Unexpected token assert" +`; + +exports[`keyword-detect.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:33) +> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" } + | ^^^^^^ + 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" } + 3 | + 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" } +Cause: [1:32-1:38]: Unexpected token: 'identifier'" +`; + +exports[`keyword-detect.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "./test.json" /* with */ assert /* with */ { type: "json" } +import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" } + +export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" } + +export * from "./test.json" /* with */ assert /* with */ { type: "json" } + +=====================================output===================================== +import "./test.json" /* with */ /* with */ assert { type: "json" }; +import { default as b } from "./test.json" /* with */ /* with */ assert { type: "json" }; + +export { default as e } from "./test.json" /* with */ /* with */ assert { type: "json" }; + +export * from "./test.json" /* with */ /* with */ assert { type: "json" }; + +================================================================================ +`; + +exports[`multi-types.js [acorn] format 1`] = ` +"Unexpected token (1:31) +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; + | ^ + 2 | +Cause: Unexpected token (1:30)" +`; + +exports[`multi-types.js [espree] format 1`] = ` +"Unexpected token assert (1:31) +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`multi-types.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:31) +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; + | ^^^^^^ + 2 | +Cause: [1:30-1:36]: Unexpected token: 'identifier'" +`; + +exports[`multi-types.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" assert { type: "json", type: "bar" }; + +=====================================output===================================== +import json from "./foo.json" assert { type: "json", type: "bar" }; + +================================================================================ +`; + +exports[`non-type.js [acorn] format 1`] = ` +"Unexpected token (1:28) +> 1 | import foo from "foo.json" assert { lazy: "true" }; + | ^ + 2 | +Cause: Unexpected token (1:27)" +`; + +exports[`non-type.js [espree] format 1`] = ` +"Unexpected token assert (1:28) +> 1 | import foo from "foo.json" assert { lazy: "true" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`non-type.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:28) +> 1 | import foo from "foo.json" assert { lazy: "true" }; + | ^^^^^^ + 2 | +Cause: [1:27-1:33]: Unexpected token: 'identifier'" +`; + +exports[`non-type.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import foo from "foo.json" assert { lazy: "true" }; + +=====================================output===================================== +import foo from "foo.json" assert { lazy: "true" }; + +================================================================================ +`; + +exports[`not-import-assertions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "x" +assert ({type: 'json'}); + +=====================================output===================================== +import "x"; +assert({ type: "json" }); + +================================================================================ +`; + +exports[`re-export.js [acorn] format 1`] = ` +"Unexpected token (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^ + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; + 4 | +Cause: Unexpected token (1:43)" +`; + +exports[`re-export.js [espree] format 1`] = ` +"Unexpected token assert (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^ + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; + 4 | +Cause: Unexpected token assert" +`; + +exports[`re-export.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^^^^^^ + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; + 4 | +Cause: [1:43-1:49]: Unexpected token: 'identifier'" +`; + +exports[`re-export.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { default as foo2 } from "foo.json" assert { type: "json" }; +export * from "foo.json" assert { type: "json" }; +export * as foo3 from "foo.json" assert { type: "json" }; + +=====================================output===================================== +export { default as foo2 } from "foo.json" assert { type: "json" }; +export * from "foo.json" assert { type: "json" }; +export * as foo3 from "foo.json" assert { type: "json" }; + +================================================================================ +`; + +exports[`static-import.js [acorn] format 1`] = ` +"Unexpected token (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token (1:30)" +`; + +exports[`static-import.js [espree] format 1`] = ` +"Unexpected token assert (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`static-import.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^^^^^^ + 2 | +Cause: [1:30-1:36]: Unexpected token: 'identifier'" +`; + +exports[`static-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" assert { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" assert { type: "json" }; + +================================================================================ +`; + +exports[`without-from.js [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | import "foo" assert { type: "json" } + | ^ + 2 | +Cause: Unexpected token (1:13)" +`; + +exports[`without-from.js [espree] format 1`] = ` +"Unexpected token assert (1:14) +> 1 | import "foo" assert { type: "json" } + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`without-from.js [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:14) +> 1 | import "foo" assert { type: "json" } + | ^^^^^^ + 2 | +Cause: [1:13-1:19]: Unexpected token: 'identifier'" +`; + +exports[`without-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "foo" assert { type: "json" } + +=====================================output===================================== +import "foo" assert { type: "json" }; + +================================================================================ +`; diff --git a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d6ea22a64305..000000000000 --- a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`dynamic-import.js [acorn] format 1`] = ` -"Unexpected token (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js [espree] format 1`] = ` -"Unexpected token , (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js [meriyah] format 1`] = ` -"Expected ')' (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import("./foo.json", { assert: { type: "json" } }); - -=====================================output===================================== -import("./foo.json", { assert: { type: "json" } }); - -================================================================================ -`; - -exports[`empty.js [acorn] format 1`] = ` -"Unexpected token (2:33) - 1 | export * as foo from "foo.json" -> 2 | export * as bar from "bar.json" assert { } - | ^ - 3 | export * as baz from "baz.json" assert { /* comment */ } - 4 | - 5 | import * as foo from "foo.json"" -`; - -exports[`empty.js [espree] format 1`] = ` -"Unexpected token assert (2:33) - 1 | export * as foo from "foo.json" -> 2 | export * as bar from "bar.json" assert { } - | ^ - 3 | export * as baz from "baz.json" assert { /* comment */ } - 4 | - 5 | import * as foo from "foo.json"" -`; - -exports[`empty.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (2:38) - 1 | export * as foo from "foo.json" -> 2 | export * as bar from "bar.json" assert { } - | ^ - 3 | export * as baz from "baz.json" assert { /* comment */ } - 4 | - 5 | import * as foo from "foo.json"" -`; - -exports[`empty.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as foo from "foo.json" -export * as bar from "bar.json" assert { } -export * as baz from "baz.json" assert { /* comment */ } - -import * as foo from "foo.json" -import * as bar from "bar.json" assert { } -import * as baz from "baz.json" assert { /* comment */ } -=====================================output===================================== -export * as foo from "foo.json"; -export * as bar from "bar.json"; -export * as baz from "baz.json" /* comment */; - -import * as foo from "foo.json"; -import * as bar from "bar.json"; -import * as baz from "baz.json" /* comment */; - -================================================================================ -`; - -exports[`multi-types.js [acorn] format 1`] = ` -"Unexpected token (1:31) -> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; - | ^ - 2 |" -`; - -exports[`multi-types.js [espree] format 1`] = ` -"Unexpected token assert (1:31) -> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; - | ^ - 2 |" -`; - -exports[`multi-types.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:36) -> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; - | ^ - 2 |" -`; - -exports[`multi-types.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import json from "./foo.json" assert { type: "json", type: "bar" }; - -=====================================output===================================== -import json from "./foo.json" assert { type: "json", type: "bar" }; - -================================================================================ -`; - -exports[`non-type.js [acorn] format 1`] = ` -"Unexpected token (1:28) -> 1 | import foo from "foo.json" assert { lazy: "true" }; - | ^ - 2 |" -`; - -exports[`non-type.js [espree] format 1`] = ` -"Unexpected token assert (1:28) -> 1 | import foo from "foo.json" assert { lazy: "true" }; - | ^ - 2 |" -`; - -exports[`non-type.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:33) -> 1 | import foo from "foo.json" assert { lazy: "true" }; - | ^ - 2 |" -`; - -exports[`non-type.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import foo from "foo.json" assert { lazy: "true" }; - -=====================================output===================================== -import foo from "foo.json" assert { lazy: "true" }; - -================================================================================ -`; - -exports[`not-import-assertions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import "x" -assert ({type: 'json'}); - -=====================================output===================================== -import "x"; -assert({ type: "json" }); - -================================================================================ -`; - -exports[`re-export.js [acorn] format 1`] = ` -"Unexpected token (1:44) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 | export * from "foo.json" assert { type: "json" }; - 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" -`; - -exports[`re-export.js [espree] format 1`] = ` -"Unexpected token assert (1:44) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 | export * from "foo.json" assert { type: "json" }; - 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" -`; - -exports[`re-export.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:49) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 | export * from "foo.json" assert { type: "json" }; - 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" -`; - -exports[`re-export.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { default as foo2 } from "foo.json" assert { type: "json" }; -export * from "foo.json" assert { type: "json" }; -export * as foo3 from "foo.json" assert { type: "json" }; - -=====================================output===================================== -export { default as foo2 } from "foo.json" assert { type: "json" }; -export * from "foo.json" assert { type: "json" }; -export * as foo3 from "foo.json" assert { type: "json" }; - -================================================================================ -`; - -exports[`static-import.js [acorn] format 1`] = ` -"Unexpected token (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js [espree] format 1`] = ` -"Unexpected token assert (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:36) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import json from "./foo.json" assert { type: "json" }; - -=====================================output===================================== -import json from "./foo.json" assert { type: "json" }; - -================================================================================ -`; - -exports[`without-from.js [acorn] format 1`] = ` -"Unexpected token (1:14) -> 1 | import "foo" assert { type: "json" } - | ^ - 2 |" -`; - -exports[`without-from.js [espree] format 1`] = ` -"Unexpected token assert (1:14) -> 1 | import "foo" assert { type: "json" } - | ^ - 2 |" -`; - -exports[`without-from.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:19) -> 1 | import "foo" assert { type: "json" } - | ^ - 2 |" -`; - -exports[`without-from.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import "foo" assert { type: "json" } - -=====================================output===================================== -import "foo" assert { type: "json" }; - -================================================================================ -`; diff --git a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1ebf0774ba76 --- /dev/null +++ b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap @@ -0,0 +1,129 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { assert: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", {assert: {type: "json"}}); + +================================================================================ +`; + +exports[`empty.js - {"bracketSpacing":false} [acorn] format 1`] = ` +"Unexpected token (1:33) +> 1 | export * as bar from "bar.json" assert { } + | ^ +Cause: Unexpected token (1:32)" +`; + +exports[`empty.js - {"bracketSpacing":false} [espree] format 1`] = ` +"Unexpected token assert (1:33) +> 1 | export * as bar from "bar.json" assert { } + | ^ +Cause: Unexpected token assert" +`; + +exports[`empty.js - {"bracketSpacing":false} [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:33) +> 1 | export * as bar from "bar.json" assert { } + | ^^^^^^ +Cause: [1:32-1:38]: Unexpected token: 'identifier'" +`; + +exports[`empty.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as bar from "bar.json" assert { } +=====================================output===================================== +export * as bar from "bar.json" assert {}; + +================================================================================ +`; + +exports[`re-export.js - {"bracketSpacing":false} [acorn] format 1`] = ` +"Unexpected token (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token (1:43)" +`; + +exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = ` +"Unexpected token assert (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:44) +> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; + | ^^^^^^ + 2 | +Cause: [1:43-1:49]: Unexpected token: 'identifier'" +`; + +exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { default as foo2 } from "foo.json" assert { type: "json" }; + +=====================================output===================================== +export {default as foo2} from "foo.json" assert {type: "json"}; + +================================================================================ +`; + +exports[`static-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` +"Unexpected token (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token (1:30)" +`; + +exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = ` +"Unexpected token assert (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^ + 2 | +Cause: Unexpected token assert" +`; + +exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` +"Unexpected token: 'identifier' (1:31) +> 1 | import json from "./foo.json" assert { type: "json" }; + | ^^^^^^ + 2 | +Cause: [1:30-1:36]: Unexpected token: 'identifier'" +`; + +exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" assert { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" assert {type: "json"}; + +================================================================================ +`; diff --git a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8ac26309bbfa..000000000000 --- a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,141 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`dynamic-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` -"Unexpected token (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js - {"bracketSpacing":false} [espree] format 1`] = ` -"Unexpected token , (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` -"Expected ')' (1:20) -> 1 | import("./foo.json", { assert: { type: "json" } }); - | ^ - 2 |" -`; - -exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import("./foo.json", { assert: { type: "json" } }); - -=====================================output===================================== -import("./foo.json", {assert: {type: "json"}}); - -================================================================================ -`; - -exports[`empty.js - {"bracketSpacing":false} [acorn] format 1`] = ` -"Unexpected token (1:33) -> 1 | export * as bar from "bar.json" assert { } - | ^" -`; - -exports[`empty.js - {"bracketSpacing":false} [espree] format 1`] = ` -"Unexpected token assert (1:33) -> 1 | export * as bar from "bar.json" assert { } - | ^" -`; - -exports[`empty.js - {"bracketSpacing":false} [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:38) -> 1 | export * as bar from "bar.json" assert { } - | ^" -`; - -exports[`empty.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as bar from "bar.json" assert { } -=====================================output===================================== -export * as bar from "bar.json"; - -================================================================================ -`; - -exports[`re-export.js - {"bracketSpacing":false} [acorn] format 1`] = ` -"Unexpected token (1:44) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = ` -"Unexpected token assert (1:44) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:49) -> 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { default as foo2 } from "foo.json" assert { type: "json" }; - -=====================================output===================================== -export {default as foo2} from "foo.json" assert {type: "json"}; - -================================================================================ -`; - -exports[`static-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` -"Unexpected token (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = ` -"Unexpected token assert (1:31) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:36) -> 1 | import json from "./foo.json" assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import json from "./foo.json" assert { type: "json" }; - -=====================================output===================================== -import json from "./foo.json" assert {type: "json"}; - -================================================================================ -`; diff --git a/tests/format/js/import-assertions/bracket-spacing/format.test.js b/tests/format/js/import-assertions/bracket-spacing/format.test.js new file mode 100644 index 000000000000..22128e084dd0 --- /dev/null +++ b/tests/format/js/import-assertions/bracket-spacing/format.test.js @@ -0,0 +1,8 @@ +runFormatTest(import.meta, ["babel"], { + bracketSpacing: false, + errors: { + acorn: ["static-import.js", "re-export.js", "empty.js"], + espree: ["static-import.js", "re-export.js", "empty.js"], + meriyah: ["static-import.js", "re-export.js", "empty.js"], + }, +}); diff --git a/tests/format/js/import-assertions/bracket-spacing/jsfmt.spec.js b/tests/format/js/import-assertions/bracket-spacing/jsfmt.spec.js deleted file mode 100644 index 4e5de669e5fb..000000000000 --- a/tests/format/js/import-assertions/bracket-spacing/jsfmt.spec.js +++ /dev/null @@ -1,23 +0,0 @@ -run_spec(__dirname, ["babel"], { - bracketSpacing: false, - errors: { - acorn: [ - "dynamic-import.js", - "static-import.js", - "re-export.js", - "empty.js", - ], - espree: [ - "dynamic-import.js", - "static-import.js", - "re-export.js", - "empty.js", - ], - meriyah: [ - "dynamic-import.js", - "static-import.js", - "re-export.js", - "empty.js", - ], - }, -}); diff --git a/tests/format/js/import-assertions/format.test.js b/tests/format/js/import-assertions/format.test.js new file mode 100644 index 000000000000..65202051a0d7 --- /dev/null +++ b/tests/format/js/import-assertions/format.test.js @@ -0,0 +1,31 @@ +runFormatTest(import.meta, ["babel", "typescript"], { + errors: { + acorn: [ + "empty.js", + "multi-types.js", + "static-import.js", + "re-export.js", + "without-from.js", + "non-type.js", + "keyword-detect.js", + ], + espree: [ + "empty.js", + "multi-types.js", + "static-import.js", + "re-export.js", + "without-from.js", + "non-type.js", + "keyword-detect.js", + ], + meriyah: [ + "empty.js", + "multi-types.js", + "static-import.js", + "re-export.js", + "without-from.js", + "non-type.js", + "keyword-detect.js", + ], + }, +}); diff --git a/tests/format/js/import-assertions/jsfmt.spec.js b/tests/format/js/import-assertions/jsfmt.spec.js deleted file mode 100644 index 8c0e8ce0fd1e..000000000000 --- a/tests/format/js/import-assertions/jsfmt.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { - errors: { - acorn: [ - "dynamic-import.js", - "empty.js", - "multi-types.js", - "static-import.js", - "re-export.js", - "without-from.js", - "non-type.js", - ], - espree: [ - "dynamic-import.js", - "empty.js", - "multi-types.js", - "static-import.js", - "re-export.js", - "without-from.js", - "non-type.js", - ], - meriyah: [ - "dynamic-import.js", - "empty.js", - "multi-types.js", - "static-import.js", - "re-export.js", - "without-from.js", - "non-type.js", - ], - }, -}); diff --git a/tests/format/js/import-assertions/keyword-detect.js b/tests/format/js/import-assertions/keyword-detect.js new file mode 100644 index 000000000000..1f12de365b4a --- /dev/null +++ b/tests/format/js/import-assertions/keyword-detect.js @@ -0,0 +1,6 @@ +import "./test.json" /* with */ assert /* with */ { type: "json" } +import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" } + +export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" } + +export * from "./test.json" /* with */ assert /* with */ { type: "json" } diff --git a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..88598227af56 --- /dev/null +++ b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap @@ -0,0 +1,242 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { with: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", { with: { type: "json" } }); + +================================================================================ +`; + +exports[`empty.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as foo from "foo.json" +export * as bar from "bar.json" with { } +export * as baz from "baz.json" with { /* comment */ } + +import * as foo from "foo.json" +import * as bar from "bar.json" with { } +import * as baz from "baz.json" with { /* comment */ } + +=====================================output===================================== +export * as foo from "foo.json"; +export * as bar from "bar.json" with {}; +export * as baz from "baz.json" /* comment */ with {}; + +import * as foo from "foo.json"; +import * as bar from "bar.json" with {}; +import * as baz from "baz.json" /* comment */ with {}; + +================================================================================ +`; + +exports[`keyword-detect.js [meriyah] format 1`] = ` +"Invalid binding in JSON import (1:69) +> 1 | import "./test.json" /* assert */ with /* assert */ { type: "json" } + | ^ + 2 | import a from "./test.json" /* assert */ with /* assert */ { type: "json" } + 3 | + 4 | export {default as c} from "./test.json" /* assert */ with /* assert */ { type: "json" } +Cause: [1:68-1:69]: Invalid binding in JSON import" +`; + +exports[`keyword-detect.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "./test.json" /* assert */ with /* assert */ { type: "json" } +import a from "./test.json" /* assert */ with /* assert */ { type: "json" } + +export {default as c} from "./test.json" /* assert */ with /* assert */ { type: "json" } + +export * from "./test.json" /* assert */ with /* assert */ { type: "json" } + +=====================================output===================================== +import "./test.json" /* assert */ /* assert */ with { type: "json" }; +import a from "./test.json" /* assert */ /* assert */ with { type: "json" }; + +export { default as c } from "./test.json" /* assert */ /* assert */ with { type: "json" }; + +export * from "./test.json" /* assert */ /* assert */ with { type: "json" }; + +================================================================================ +`; + +exports[`long-sources.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import a10 from "./aaaaaaaaaa.json" with { +type: "json" }; +import a20 from "./aaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a30 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a40 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a50 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a60 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a70 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { +type: "json" }; +import a80 +from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; + +import("./aaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) + +=====================================output===================================== +import a10 from "./aaaaaaaaaa.json" with { type: "json" }; +import a20 from "./aaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a30 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a40 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a50 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a60 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a70 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a80 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; + +import("./aaaaaaaaaa.json", { with: { type: "json" } }); +import("./aaaaaaaaaaaaaaaaaaaa.json", { with: { type: "json" } }); +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", { with: { type: "json" } }); +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", { + with: { type: "json" }, +}); +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", { + with: { type: "json" }, +}); +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", { + with: { type: "json" }, +}); +import( + "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", + { with: { type: "json" } } +); +import( + "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", + { with: { type: "json" } } +); + +================================================================================ +`; + +exports[`multi-types.js [acorn] format 1`] = ` +"Duplicate attribute key 'type' (1:52) +> 1 | import json from "./foo.json" with { type: "json", type: "bar" }; + | ^ + 2 | +Cause: Duplicate attribute key 'type' (1:51)" +`; + +exports[`multi-types.js [espree] format 1`] = ` +"Duplicate attribute key 'type' (1:52) +> 1 | import json from "./foo.json" with { type: "json", type: "bar" }; + | ^ + 2 | +Cause: Duplicate attribute key 'type'" +`; + +exports[`multi-types.js [meriyah] format 1`] = ` +"Duplicate binding 'type' (1:64) +> 1 | import json from "./foo.json" with { type: "json", type: "bar" }; + | ^ + 2 | +Cause: [1:63-1:64]: Duplicate binding 'type'" +`; + +exports[`multi-types.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" with { type: "json", type: "bar" }; + +=====================================output===================================== +import json from "./foo.json" with { type: "json", type: "bar" }; + +================================================================================ +`; + +exports[`non-type.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import foo from "foo.json" with { lazy: "true" }; + +=====================================output===================================== +import foo from "foo.json" with { lazy: "true" }; + +================================================================================ +`; + +exports[`re-export.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { default as foo2 } from "foo.json" with { type: "json" }; +export * from "foo.json" with { type: "json" }; +export * as foo3 from "foo.json" with { type: "json" }; + +=====================================output===================================== +export { default as foo2 } from "foo.json" with { type: "json" }; +export * from "foo.json" with { type: "json" }; +export * as foo3 from "foo.json" with { type: "json" }; + +================================================================================ +`; + +exports[`static-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" with { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" with { type: "json" }; + +================================================================================ +`; + +exports[`without-from.js [meriyah] format 1`] = ` +"Invalid binding in JSON import (1:34) +> 1 | import "foo" with { type: "json" } + | ^ + 2 | +Cause: [1:33-1:34]: Invalid binding in JSON import" +`; + +exports[`without-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "foo" with { type: "json" } + +=====================================output===================================== +import "foo" with { type: "json" }; + +================================================================================ +`; diff --git a/tests/format/js/import-attributes/bracket-spacing/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/bracket-spacing/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c137c69e55cb --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/__snapshots__/format.test.js.snap @@ -0,0 +1,60 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import("./foo.json", { with: { type: "json" } }); + +=====================================output===================================== +import("./foo.json", {with: {type: "json"}}); + +================================================================================ +`; + +exports[`empty.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as bar from "bar.json" with { } +=====================================output===================================== +export * as bar from "bar.json" with {}; + +================================================================================ +`; + +exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { default as foo2 } from "foo.json" with { type: "json" }; + +=====================================output===================================== +export {default as foo2} from "foo.json" with {type: "json"}; + +================================================================================ +`; + +exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json from "./foo.json" with { type: "json" }; + +=====================================output===================================== +import json from "./foo.json" with {type: "json"}; + +================================================================================ +`; diff --git a/tests/format/js/import-attributes/bracket-spacing/dynamic-import.js b/tests/format/js/import-attributes/bracket-spacing/dynamic-import.js new file mode 100644 index 000000000000..717b72d4a84f --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/dynamic-import.js @@ -0,0 +1 @@ +import("./foo.json", { with: { type: "json" } }); diff --git a/tests/format/js/import-attributes/bracket-spacing/empty.js b/tests/format/js/import-attributes/bracket-spacing/empty.js new file mode 100644 index 000000000000..22cfde938dbe --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/empty.js @@ -0,0 +1 @@ +export * as bar from "bar.json" with { } \ No newline at end of file diff --git a/tests/format/js/import-attributes/bracket-spacing/format.test.js b/tests/format/js/import-attributes/bracket-spacing/format.test.js new file mode 100644 index 000000000000..f4c9bb466497 --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"], { bracketSpacing: false }); diff --git a/tests/format/js/import-attributes/bracket-spacing/re-export.js b/tests/format/js/import-attributes/bracket-spacing/re-export.js new file mode 100644 index 000000000000..12b98b761f48 --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/re-export.js @@ -0,0 +1 @@ +export { default as foo2 } from "foo.json" with { type: "json" }; diff --git a/tests/format/js/import-attributes/bracket-spacing/static-import.js b/tests/format/js/import-attributes/bracket-spacing/static-import.js new file mode 100644 index 000000000000..7770ae1f06b0 --- /dev/null +++ b/tests/format/js/import-attributes/bracket-spacing/static-import.js @@ -0,0 +1 @@ +import json from "./foo.json" with { type: "json" }; diff --git a/tests/format/js/import-attributes/dynamic-import.js b/tests/format/js/import-attributes/dynamic-import.js new file mode 100644 index 000000000000..717b72d4a84f --- /dev/null +++ b/tests/format/js/import-attributes/dynamic-import.js @@ -0,0 +1 @@ +import("./foo.json", { with: { type: "json" } }); diff --git a/tests/format/js/import-attributes/empty.js b/tests/format/js/import-attributes/empty.js new file mode 100644 index 000000000000..ab1ee6f33e4e --- /dev/null +++ b/tests/format/js/import-attributes/empty.js @@ -0,0 +1,7 @@ +export * as foo from "foo.json" +export * as bar from "bar.json" with { } +export * as baz from "baz.json" with { /* comment */ } + +import * as foo from "foo.json" +import * as bar from "bar.json" with { } +import * as baz from "baz.json" with { /* comment */ } diff --git a/tests/format/js/import-attributes/format.test.js b/tests/format/js/import-attributes/format.test.js new file mode 100644 index 000000000000..3e25a96fbba3 --- /dev/null +++ b/tests/format/js/import-attributes/format.test.js @@ -0,0 +1,6 @@ +const errors = { + acorn: ["multi-types.js"], + espree: ["multi-types.js"], + meriyah: ["multi-types.js", "without-from.js", "keyword-detect.js"], +}; +runFormatTest(import.meta, ["babel", "typescript"], { errors }); diff --git a/tests/format/js/import-attributes/keyword-detect.js b/tests/format/js/import-attributes/keyword-detect.js new file mode 100644 index 000000000000..2db5299c8d7b --- /dev/null +++ b/tests/format/js/import-attributes/keyword-detect.js @@ -0,0 +1,6 @@ +import "./test.json" /* assert */ with /* assert */ { type: "json" } +import a from "./test.json" /* assert */ with /* assert */ { type: "json" } + +export {default as c} from "./test.json" /* assert */ with /* assert */ { type: "json" } + +export * from "./test.json" /* assert */ with /* assert */ { type: "json" } diff --git a/tests/format/js/import-attributes/long-sources.js b/tests/format/js/import-attributes/long-sources.js new file mode 100644 index 000000000000..042d421cc956 --- /dev/null +++ b/tests/format/js/import-attributes/long-sources.js @@ -0,0 +1,20 @@ +import a10 from "./aaaaaaaaaa.json" with { +type: "json" }; +import a20 from "./aaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a30 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a40 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a50 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a60 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; +import a70 from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { +type: "json" }; +import a80 +from "./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" with { type: "json" }; + +import("./aaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) +import("./aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json", {with: { type: "json" }}) diff --git a/tests/format/js/import-attributes/multi-types.js b/tests/format/js/import-attributes/multi-types.js new file mode 100644 index 000000000000..0f0e7115f307 --- /dev/null +++ b/tests/format/js/import-attributes/multi-types.js @@ -0,0 +1 @@ +import json from "./foo.json" with { type: "json", type: "bar" }; diff --git a/tests/format/js/import-attributes/non-type.js b/tests/format/js/import-attributes/non-type.js new file mode 100644 index 000000000000..1858e49c2022 --- /dev/null +++ b/tests/format/js/import-attributes/non-type.js @@ -0,0 +1 @@ +import foo from "foo.json" with { lazy: "true" }; diff --git a/tests/format/js/import-attributes/quote-props/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/quote-props/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..20bec1c6ccdb --- /dev/null +++ b/tests/format/js/import-attributes/quote-props/__snapshots__/format.test.js.snap @@ -0,0 +1,99 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`quoted-keys.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +import json1 from './mod.js' with { "type":"json" }; +import json2 from './mod.js' with { "foobar":"json" }; +import json3 from './mod.js' with { "type-foo" :"json" }; +import json4 from './mod.js' with { "333foo" :"json" }; +import json5 from './mod.js' with { "0" :"json" }; +import json6 from './mod.js' with { "0n" :"json" }; +import json7 from './mod.js' with { "33333" :"json" }; +import json8 from './mod.js' with { "33333n" :"json" }; +import json9 from './mod.js' with { "33333b" :"json" }; +import json10 from './mod.js' with { "03333" :"json" }; + +=====================================output===================================== +import json1 from "./mod.js" with { type: "json" }; +import json2 from "./mod.js" with { foobar: "json" }; +import json3 from "./mod.js" with { "type-foo": "json" }; +import json4 from "./mod.js" with { "333foo": "json" }; +import json5 from "./mod.js" with { "0": "json" }; +import json6 from "./mod.js" with { "0n": "json" }; +import json7 from "./mod.js" with { "33333": "json" }; +import json8 from "./mod.js" with { "33333n": "json" }; +import json9 from "./mod.js" with { "33333b": "json" }; +import json10 from "./mod.js" with { "03333": "json" }; + +================================================================================ +`; + +exports[`quoted-keys.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +import json1 from './mod.js' with { "type":"json" }; +import json2 from './mod.js' with { "foobar":"json" }; +import json3 from './mod.js' with { "type-foo" :"json" }; +import json4 from './mod.js' with { "333foo" :"json" }; +import json5 from './mod.js' with { "0" :"json" }; +import json6 from './mod.js' with { "0n" :"json" }; +import json7 from './mod.js' with { "33333" :"json" }; +import json8 from './mod.js' with { "33333n" :"json" }; +import json9 from './mod.js' with { "33333b" :"json" }; +import json10 from './mod.js' with { "03333" :"json" }; + +=====================================output===================================== +import json1 from "./mod.js" with { "type": "json" }; +import json2 from "./mod.js" with { "foobar": "json" }; +import json3 from "./mod.js" with { "type-foo": "json" }; +import json4 from "./mod.js" with { "333foo": "json" }; +import json5 from "./mod.js" with { "0": "json" }; +import json6 from "./mod.js" with { "0n": "json" }; +import json7 from "./mod.js" with { "33333": "json" }; +import json8 from "./mod.js" with { "33333n": "json" }; +import json9 from "./mod.js" with { "33333b": "json" }; +import json10 from "./mod.js" with { "03333": "json" }; + +================================================================================ +`; + +exports[`quoted-keys.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import json1 from './mod.js' with { "type":"json" }; +import json2 from './mod.js' with { "foobar":"json" }; +import json3 from './mod.js' with { "type-foo" :"json" }; +import json4 from './mod.js' with { "333foo" :"json" }; +import json5 from './mod.js' with { "0" :"json" }; +import json6 from './mod.js' with { "0n" :"json" }; +import json7 from './mod.js' with { "33333" :"json" }; +import json8 from './mod.js' with { "33333n" :"json" }; +import json9 from './mod.js' with { "33333b" :"json" }; +import json10 from './mod.js' with { "03333" :"json" }; + +=====================================output===================================== +import json1 from "./mod.js" with { type: "json" }; +import json2 from "./mod.js" with { foobar: "json" }; +import json3 from "./mod.js" with { "type-foo": "json" }; +import json4 from "./mod.js" with { "333foo": "json" }; +import json5 from "./mod.js" with { "0": "json" }; +import json6 from "./mod.js" with { "0n": "json" }; +import json7 from "./mod.js" with { "33333": "json" }; +import json8 from "./mod.js" with { "33333n": "json" }; +import json9 from "./mod.js" with { "33333b": "json" }; +import json10 from "./mod.js" with { "03333": "json" }; + +================================================================================ +`; diff --git a/tests/format/js/import-attributes/quote-props/format.test.js b/tests/format/js/import-attributes/quote-props/format.test.js new file mode 100644 index 000000000000..3182f606094e --- /dev/null +++ b/tests/format/js/import-attributes/quote-props/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["babel", "typescript"]); +runFormatTest(import.meta, ["babel", "typescript"], { + quoteProps: "consistent", +}); +runFormatTest(import.meta, ["babel", "typescript"], { quoteProps: "preserve" }); diff --git a/tests/format/js/import-attributes/quote-props/quoted-keys.js b/tests/format/js/import-attributes/quote-props/quoted-keys.js new file mode 100644 index 000000000000..3e2be9d051a6 --- /dev/null +++ b/tests/format/js/import-attributes/quote-props/quoted-keys.js @@ -0,0 +1,10 @@ +import json1 from './mod.js' with { "type":"json" }; +import json2 from './mod.js' with { "foobar":"json" }; +import json3 from './mod.js' with { "type-foo" :"json" }; +import json4 from './mod.js' with { "333foo" :"json" }; +import json5 from './mod.js' with { "0" :"json" }; +import json6 from './mod.js' with { "0n" :"json" }; +import json7 from './mod.js' with { "33333" :"json" }; +import json8 from './mod.js' with { "33333n" :"json" }; +import json9 from './mod.js' with { "33333b" :"json" }; +import json10 from './mod.js' with { "03333" :"json" }; diff --git a/tests/format/js/import-attributes/re-export.js b/tests/format/js/import-attributes/re-export.js new file mode 100644 index 000000000000..8b7f8a81728d --- /dev/null +++ b/tests/format/js/import-attributes/re-export.js @@ -0,0 +1,3 @@ +export { default as foo2 } from "foo.json" with { type: "json" }; +export * from "foo.json" with { type: "json" }; +export * as foo3 from "foo.json" with { type: "json" }; diff --git a/tests/format/js/import-attributes/static-import.js b/tests/format/js/import-attributes/static-import.js new file mode 100644 index 000000000000..7770ae1f06b0 --- /dev/null +++ b/tests/format/js/import-attributes/static-import.js @@ -0,0 +1 @@ +import json from "./foo.json" with { type: "json" }; diff --git a/tests/format/js/import-attributes/without-from.js b/tests/format/js/import-attributes/without-from.js new file mode 100644 index 000000000000..5009c441a73c --- /dev/null +++ b/tests/format/js/import-attributes/without-from.js @@ -0,0 +1 @@ +import "foo" with { type: "json" } diff --git a/tests/format/js/import-meta/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-meta/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/import-meta/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/import-meta/__snapshots__/format.test.js.snap diff --git a/tests/format/js/import-meta/format.test.js b/tests/format/js/import-meta/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/import-meta/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/import-meta/jsfmt.spec.js b/tests/format/js/import-meta/jsfmt.spec.js deleted file mode 100644 index 61966a7d00c3..000000000000 --- a/tests/format/js/import-meta/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/import/__snapshots__/format.test.js.snap b/tests/format/js/import/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..debf429eb53f --- /dev/null +++ b/tests/format/js/import/__snapshots__/format.test.js.snap @@ -0,0 +1,620 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`brackets.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns +} from '.'; +import {fitsIn, oneLine} from '.'; + +=====================================output===================================== +import { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, +} from "."; +import {fitsIn, oneLine} from "."; + +================================================================================ +`; + +exports[`brackets.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns +} from '.'; +import {fitsIn, oneLine} from '.'; + +=====================================output===================================== +import { + runTaskForChanged, + description, + someOtherLabel, + thatMakes, + itGo, + multiLine, + andMore, + soWeCanGetItTo80Columns, +} from "."; +import { fitsIn, oneLine } from "."; + +================================================================================ +`; + +exports[`comments.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { a //comment1 +//comment2 +//comment3 +as b} from ""; + +import { + a as //comment1 + //comment2 + //comment3 + b1 +} from ""; + +import { + a as //comment2 //comment1 + //comment3 + b2 +} from ""; + +import { + a as //comment3 //comment2 //comment1 + b3 +} from ""; + +import { + // comment 1 + FN1, // comment 2 + /* comment 3 */ FN2, + // FN3, + FN4 /* comment 4 */ + // FN4, + // FN5 +} from "./module"; + +import { + ExecutionResult, + DocumentNode, + /* tslint:disable */ + SelectionSetNode, + /* tslint:enable */ +} from 'graphql'; + +import x, { + // comment + y +} from 'z'; + +=====================================output===================================== +import { + //comment1 + //comment2 + //comment3 + a as b, +} from ""; + +import { + //comment1 + //comment2 + //comment3 + a as b1, +} from ""; + +import { + //comment2 //comment1 + //comment3 + a as b2, +} from ""; + +import { + //comment3 //comment2 //comment1 + a as b3, +} from ""; + +import { + // comment 1 + FN1, // comment 2 + /* comment 3 */ FN2, + // FN3, + FN4 /* comment 4 */, + // FN4, + // FN5 +} from "./module"; + +import { + ExecutionResult, + DocumentNode, + /* tslint:disable */ + SelectionSetNode, + /* tslint:enable */ +} from "graphql"; + +import x, { + // comment + y, +} from "z"; + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { a //comment1 +//comment2 +//comment3 +as b} from ""; + +import { + a as //comment1 + //comment2 + //comment3 + b1 +} from ""; + +import { + a as //comment2 //comment1 + //comment3 + b2 +} from ""; + +import { + a as //comment3 //comment2 //comment1 + b3 +} from ""; + +import { + // comment 1 + FN1, // comment 2 + /* comment 3 */ FN2, + // FN3, + FN4 /* comment 4 */ + // FN4, + // FN5 +} from "./module"; + +import { + ExecutionResult, + DocumentNode, + /* tslint:disable */ + SelectionSetNode, + /* tslint:enable */ +} from 'graphql'; + +import x, { + // comment + y +} from 'z'; + +=====================================output===================================== +import { + //comment1 + //comment2 + //comment3 + a as b, +} from ""; + +import { + //comment1 + //comment2 + //comment3 + a as b1, +} from ""; + +import { + //comment2 //comment1 + //comment3 + a as b2, +} from ""; + +import { + //comment3 //comment2 //comment1 + a as b3, +} from ""; + +import { + // comment 1 + FN1, // comment 2 + /* comment 3 */ FN2, + // FN3, + FN4 /* comment 4 */, + // FN4, + // FN5 +} from "./module"; + +import { + ExecutionResult, + DocumentNode, + /* tslint:disable */ + SelectionSetNode, + /* tslint:enable */ +} from "graphql"; + +import x, { + // comment + y, +} from "z"; + +================================================================================ +`; + +exports[`empty-import.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { } from '@types/googlemaps'; +import 'a'; +import /* comment */ 'a'; +import // comment +'a'; +import { /* comment */ } from 'a'; +import /* comment */ {} from 'a'; +import {} /* comment */ from 'a'; +import {} from /* comment */ 'a'; +import /* comment */ {/* comment */} /* comment */ from /* comment */ 'a'; +import { + // comment +} from 'a'; +import // comment +{} from 'a'; +import {} +// comment +from 'a'; +import {} from +// comment +'a'; +import +// comment +{ +// comment +} +// comment +from +// comment +'a'; + +import // {} from +'a'; +import {} from // comment ends with from +'a'; +import {} from /* comment ends with from */ 'a'; +import {} from // comment not ends with from ___ +'a'; +import {} from /* comment not ends with from ___ */ 'a'; + +import // comment ends with from +'a'; +import /* comment ends with from */ 'a'; +import // comment not ends with from ___ +'a'; +import /* comment not ends with from ___ */ 'a'; + +=====================================output===================================== +import {} from "@types/googlemaps"; +import "a"; +import /* comment */ "a"; +import // comment +"a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ /* comment */ /* comment */ /* comment */ "a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +// comment +// comment +// comment +"a"; + +import // {} from +"a"; +import {} from // comment ends with from +"a"; +import {} from /* comment ends with from */ "a"; +import {} from // comment not ends with from ___ +"a"; +import {} from /* comment not ends with from ___ */ "a"; + +import // comment ends with from +"a"; +import /* comment ends with from */ "a"; +import // comment not ends with from ___ +"a"; +import /* comment not ends with from ___ */ "a"; + +================================================================================ +`; + +exports[`empty-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { } from '@types/googlemaps'; +import 'a'; +import /* comment */ 'a'; +import // comment +'a'; +import { /* comment */ } from 'a'; +import /* comment */ {} from 'a'; +import {} /* comment */ from 'a'; +import {} from /* comment */ 'a'; +import /* comment */ {/* comment */} /* comment */ from /* comment */ 'a'; +import { + // comment +} from 'a'; +import // comment +{} from 'a'; +import {} +// comment +from 'a'; +import {} from +// comment +'a'; +import +// comment +{ +// comment +} +// comment +from +// comment +'a'; + +import // {} from +'a'; +import {} from // comment ends with from +'a'; +import {} from /* comment ends with from */ 'a'; +import {} from // comment not ends with from ___ +'a'; +import {} from /* comment not ends with from ___ */ 'a'; + +import // comment ends with from +'a'; +import /* comment ends with from */ 'a'; +import // comment not ends with from ___ +'a'; +import /* comment not ends with from ___ */ 'a'; + +=====================================output===================================== +import {} from "@types/googlemaps"; +import "a"; +import /* comment */ "a"; +import // comment +"a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ "a"; +import {} from /* comment */ /* comment */ /* comment */ /* comment */ "a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +"a"; +import {} from // comment +// comment +// comment +// comment +"a"; + +import // {} from +"a"; +import {} from // comment ends with from +"a"; +import {} from /* comment ends with from */ "a"; +import {} from // comment not ends with from ___ +"a"; +import {} from /* comment not ends with from ___ */ "a"; + +import // comment ends with from +"a"; +import /* comment ends with from */ "a"; +import // comment not ends with from ___ +"a"; +import /* comment not ends with from ___ */ "a"; + +================================================================================ +`; + +exports[`inline.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import somethingSuperLongsomethingSuperLong from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import {somethingSuperLongsomethingSuperLong1} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import a, {somethingSuperLongsomethingSuperLong2} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import {a2, somethingSuperLongsomethingSuperLong3} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' + +=====================================output===================================== +import somethingSuperLongsomethingSuperLong from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import {somethingSuperLongsomethingSuperLong1} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import a, { + somethingSuperLongsomethingSuperLong2, +} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import { + a2, + somethingSuperLongsomethingSuperLong3, +} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; + +================================================================================ +`; + +exports[`inline.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import somethingSuperLongsomethingSuperLong from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import {somethingSuperLongsomethingSuperLong1} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import a, {somethingSuperLongsomethingSuperLong2} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' +import {a2, somethingSuperLongsomethingSuperLong3} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' + +=====================================output===================================== +import somethingSuperLongsomethingSuperLong from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import { somethingSuperLongsomethingSuperLong1 } from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import a, { + somethingSuperLongsomethingSuperLong2, +} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; +import { + a2, + somethingSuperLongsomethingSuperLong3, +} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; + +================================================================================ +`; + +exports[`long-line.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; + +=====================================output===================================== +import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithARatherLongName"; + +================================================================================ +`; + +exports[`long-line.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; + +=====================================output===================================== +import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithARatherLongName"; + +================================================================================ +`; + +exports[`multiple_standalones.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import a, * as b from 'a'; + +=====================================output===================================== +import a, * as b from "a"; + +================================================================================ +`; + +exports[`multiple_standalones.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import a, * as b from 'a'; + +=====================================output===================================== +import a, * as b from "a"; + +================================================================================ +`; + +exports[`same-local-and-imported.js - {"bracketSpacing":false} format 1`] = ` +====================================options===================================== +bracketSpacing: false +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import {a} from 'a'; +import {b as b} from 'b'; +import {c as /* comment */c} from 'c'; + +=====================================output===================================== +import {a} from "a"; +import {b as b} from "b"; +import {c as /* comment */ c} from "c"; + +================================================================================ +`; + +exports[`same-local-and-imported.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import {a} from 'a'; +import {b as b} from 'b'; +import {c as /* comment */c} from 'c'; + +=====================================output===================================== +import { a } from "a"; +import { b as b } from "b"; +import { c as /* comment */ c } from "c"; + +================================================================================ +`; diff --git a/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c61aafb15441..000000000000 --- a/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,454 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`brackets.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns -} from '.'; -import {fitsIn, oneLine} from '.'; - -=====================================output===================================== -import { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, -} from "."; -import {fitsIn, oneLine} from "."; - -================================================================================ -`; - -exports[`brackets.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns -} from '.'; -import {fitsIn, oneLine} from '.'; - -=====================================output===================================== -import { - runTaskForChanged, - description, - someOtherLabel, - thatMakes, - itGo, - multiLine, - andMore, - soWeCanGetItTo80Columns, -} from "."; -import { fitsIn, oneLine } from "."; - -================================================================================ -`; - -exports[`comments.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { a //comment1 -//comment2 -//comment3 -as b} from ""; - -import { - a as //comment1 - //comment2 - //comment3 - b1 -} from ""; - -import { - a as //comment2 //comment1 - //comment3 - b2 -} from ""; - -import { - a as //comment3 //comment2 //comment1 - b3 -} from ""; - -import { - // comment 1 - FN1, // comment 2 - /* comment 3 */ FN2, - // FN3, - FN4 /* comment 4 */ - // FN4, - // FN5 -} from "./module"; - -import { - ExecutionResult, - DocumentNode, - /* tslint:disable */ - SelectionSetNode, - /* tslint:enable */ -} from 'graphql'; - -import x, { - // comment - y -} from 'z'; - -=====================================output===================================== -import { - //comment1 - //comment2 - //comment3 - a as b, -} from ""; - -import { - //comment1 - //comment2 - //comment3 - a as b1, -} from ""; - -import { - //comment2 //comment1 - //comment3 - a as b2, -} from ""; - -import { - //comment3 //comment2 //comment1 - a as b3, -} from ""; - -import { - // comment 1 - FN1, // comment 2 - /* comment 3 */ FN2, - // FN3, - FN4 /* comment 4 */, - // FN4, - // FN5 -} from "./module"; - -import { - ExecutionResult, - DocumentNode, - /* tslint:disable */ - SelectionSetNode, - /* tslint:enable */ -} from "graphql"; - -import x, { - // comment - y, -} from "z"; - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { a //comment1 -//comment2 -//comment3 -as b} from ""; - -import { - a as //comment1 - //comment2 - //comment3 - b1 -} from ""; - -import { - a as //comment2 //comment1 - //comment3 - b2 -} from ""; - -import { - a as //comment3 //comment2 //comment1 - b3 -} from ""; - -import { - // comment 1 - FN1, // comment 2 - /* comment 3 */ FN2, - // FN3, - FN4 /* comment 4 */ - // FN4, - // FN5 -} from "./module"; - -import { - ExecutionResult, - DocumentNode, - /* tslint:disable */ - SelectionSetNode, - /* tslint:enable */ -} from 'graphql'; - -import x, { - // comment - y -} from 'z'; - -=====================================output===================================== -import { - //comment1 - //comment2 - //comment3 - a as b, -} from ""; - -import { - //comment1 - //comment2 - //comment3 - a as b1, -} from ""; - -import { - //comment2 //comment1 - //comment3 - a as b2, -} from ""; - -import { - //comment3 //comment2 //comment1 - a as b3, -} from ""; - -import { - // comment 1 - FN1, // comment 2 - /* comment 3 */ FN2, - // FN3, - FN4 /* comment 4 */, - // FN4, - // FN5 -} from "./module"; - -import { - ExecutionResult, - DocumentNode, - /* tslint:disable */ - SelectionSetNode, - /* tslint:enable */ -} from "graphql"; - -import x, { - // comment - y, -} from "z"; - -================================================================================ -`; - -exports[`empty-import.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { } from '@types/googlemaps'; - -=====================================output===================================== -import {} from "@types/googlemaps"; - -================================================================================ -`; - -exports[`empty-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { } from '@types/googlemaps'; - -=====================================output===================================== -import {} from "@types/googlemaps"; - -================================================================================ -`; - -exports[`inline.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import somethingSuperLongsomethingSuperLong from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import {somethingSuperLongsomethingSuperLong1} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import a, {somethingSuperLongsomethingSuperLong2} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import {a2, somethingSuperLongsomethingSuperLong3} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' - -=====================================output===================================== -import somethingSuperLongsomethingSuperLong from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import {somethingSuperLongsomethingSuperLong1} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import a, { - somethingSuperLongsomethingSuperLong2, -} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import { - a2, - somethingSuperLongsomethingSuperLong3, -} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; - -================================================================================ -`; - -exports[`inline.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import somethingSuperLongsomethingSuperLong from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import {somethingSuperLongsomethingSuperLong1} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import a, {somethingSuperLongsomethingSuperLong2} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' -import {a2, somethingSuperLongsomethingSuperLong3} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong' - -=====================================output===================================== -import somethingSuperLongsomethingSuperLong from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import { somethingSuperLongsomethingSuperLong1 } from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import a, { - somethingSuperLongsomethingSuperLong2, -} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; -import { - a2, - somethingSuperLongsomethingSuperLong3, -} from "somethingSuperLongsomethingSuperLongsomethingSuperLong"; - -================================================================================ -`; - -exports[`long-line.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; - -=====================================output===================================== -import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithARatherLongName"; - -================================================================================ -`; - -exports[`long-line.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; - -=====================================output===================================== -import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithARatherLongName"; - -================================================================================ -`; - -exports[`multiple_standalones.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import a, * as b from 'a'; - -=====================================output===================================== -import a, * as b from "a"; - -================================================================================ -`; - -exports[`multiple_standalones.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import a, * as b from 'a'; - -=====================================output===================================== -import a, * as b from "a"; - -================================================================================ -`; - -exports[`same-local-and-imported.js - {"bracketSpacing":false} format 1`] = ` -====================================options===================================== -bracketSpacing: false -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import {a} from 'a'; -import {b as b} from 'b'; -import {c as /* comment */c} from 'c'; - -=====================================output===================================== -import {a} from "a"; -import {b as b} from "b"; -import {c as /* comment */ c} from "c"; - -================================================================================ -`; - -exports[`same-local-and-imported.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import {a} from 'a'; -import {b as b} from 'b'; -import {c as /* comment */c} from 'c'; - -=====================================output===================================== -import { a } from "a"; -import { b as b } from "b"; -import { c as /* comment */ c } from "c"; - -================================================================================ -`; diff --git a/tests/format/js/import/empty-import.js b/tests/format/js/import/empty-import.js index f08bd78604fe..aa75b16d10be 100644 --- a/tests/format/js/import/empty-import.js +++ b/tests/format/js/import/empty-import.js @@ -1 +1,46 @@ import { } from '@types/googlemaps'; +import 'a'; +import /* comment */ 'a'; +import // comment +'a'; +import { /* comment */ } from 'a'; +import /* comment */ {} from 'a'; +import {} /* comment */ from 'a'; +import {} from /* comment */ 'a'; +import /* comment */ {/* comment */} /* comment */ from /* comment */ 'a'; +import { + // comment +} from 'a'; +import // comment +{} from 'a'; +import {} +// comment +from 'a'; +import {} from +// comment +'a'; +import +// comment +{ +// comment +} +// comment +from +// comment +'a'; + +import // {} from +'a'; +import {} from // comment ends with from +'a'; +import {} from /* comment ends with from */ 'a'; +import {} from // comment not ends with from ___ +'a'; +import {} from /* comment not ends with from ___ */ 'a'; + +import // comment ends with from +'a'; +import /* comment ends with from */ 'a'; +import // comment not ends with from ___ +'a'; +import /* comment not ends with from ___ */ 'a'; diff --git a/tests/format/js/import/format.test.js b/tests/format/js/import/format.test.js new file mode 100644 index 000000000000..118654d2d9ea --- /dev/null +++ b/tests/format/js/import/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + bracketSpacing: false, +}); diff --git a/tests/format/js/import/jsfmt.spec.js b/tests/format/js/import/jsfmt.spec.js deleted file mode 100644 index df3db0cc4bb6..000000000000 --- a/tests/format/js/import/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { bracketSpacing: false }); diff --git a/tests/format/js/in/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/in/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/in/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/in/__snapshots__/format.test.js.snap diff --git a/tests/format/js/in/format.test.js b/tests/format/js/in/format.test.js new file mode 100644 index 000000000000..2224f9a91798 --- /dev/null +++ b/tests/format/js/in/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: ["arrow-function-invalid.js"], +}); diff --git a/tests/format/js/in/jsfmt.spec.js b/tests/format/js/in/jsfmt.spec.js deleted file mode 100644 index 270de08db48e..000000000000 --- a/tests/format/js/in/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: ["arrow-function-invalid.js"], -}); diff --git a/tests/format/js/invalid-code/__snapshots__/format.test.js.snap b/tests/format/js/invalid-code/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ac2c64befe5d --- /dev/null +++ b/tests/format/js/invalid-code/__snapshots__/format.test.js.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`duplicate_bindings.js [acorn] format 1`] = ` +"Identifier 'A' has already been declared (1:19) +> 1 | class A{} class A{} + | ^ + 2 | +Cause: Identifier 'A' has already been declared (1:18)" +`; + +exports[`duplicate_bindings.js [espree] format 1`] = ` +"Identifier 'A' has already been declared (1:19) +> 1 | class A{} class A{} + | ^ + 2 | +Cause: Identifier 'A' has already been declared" +`; + +exports[`duplicate_bindings.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A{} class A{} + +=====================================output===================================== +class A {} +class A {} + +================================================================================ +`; diff --git a/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a40691a62b8f..000000000000 --- a/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`duplicate_bindings.js [acorn] format 1`] = ` -"Identifier 'A' has already been declared (1:19) -> 1 | class A{} class A{} - | ^ - 2 |" -`; - -exports[`duplicate_bindings.js [espree] format 1`] = ` -"Identifier 'A' has already been declared (1:19) -> 1 | class A{} class A{} - | ^ - 2 |" -`; - -exports[`duplicate_bindings.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A{} class A{} - -=====================================output===================================== -class A {} -class A {} - -================================================================================ -`; diff --git a/tests/format/js/invalid-code/format.test.js b/tests/format/js/invalid-code/format.test.js new file mode 100644 index 000000000000..9f8d910e66d7 --- /dev/null +++ b/tests/format/js/invalid-code/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel"], { + errors: { acorn: true, espree: true }, +}); diff --git a/tests/format/js/invalid-code/jsfmt.spec.js b/tests/format/js/invalid-code/jsfmt.spec.js deleted file mode 100644 index 0e68cd0b8b5c..000000000000 --- a/tests/format/js/invalid-code/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"], { errors: { acorn: true, espree: true } }); diff --git a/tests/format/js/label/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/label/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/label/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/label/__snapshots__/format.test.js.snap diff --git a/tests/format/js/label/format.test.js b/tests/format/js/label/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/label/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/label/jsfmt.spec.js b/tests/format/js/label/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/label/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/last-argument-expansion/__snapshots__/format.test.js.snap b/tests/format/js/last-argument-expansion/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2563c846337d --- /dev/null +++ b/tests/format/js/last-argument-expansion/__snapshots__/format.test.js.snap @@ -0,0 +1,862 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default function searchUsers(action$) { + return action$.ofType(ActionTypes.SEARCHED_USERS) + .map(action => action.payload.query) + .filter(q => !!q) + .switchMap(q => + Observable.timer(800) // debounce + .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) + .mergeMap(() => Observable.merge( + Observable.of(replace(\`?q=\${q}\`)), + ajax.getJSON(\`https://api.github.com/search/users?q=\${q}\`) + .map(res => res.items) + .map(receiveUsers) + )) + ); +}; + +=====================================output===================================== +export default function searchUsers(action$) { + return action$ + .ofType(ActionTypes.SEARCHED_USERS) + .map((action) => action.payload.query) + .filter((q) => !!q) + .switchMap((q) => + Observable.timer(800) // debounce + .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) + .mergeMap(() => + Observable.merge( + Observable.of(replace(\`?q=\${q}\`)), + ajax + .getJSON(\`https://api.github.com/search/users?q=\${q}\`) + .map((res) => res.items) + .map(receiveUsers), + ), + ), + ); +} + +================================================================================ +`; + +exports[`assignment-pattern.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +bob.doL(({ a, b = () => { + console.log; +}}) => something.else.else({})); + +=====================================output===================================== +bob.doL( + ({ + a, + b = () => { + console.log; + }, + }) => something.else.else({}), +); + +================================================================================ +`; + +exports[`break-parent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +({ + processors: [ + require("autoprefixer", { + browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"] + }), + require("postcss-url")({ + url: url => + url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\` + }) + ] +}); + +true + ? test({ + a: 1 + }) + : <div + a={123412342314} + b={123412341234} + c={123412341234} + d={123412341234} + e={123412341234} + f={123412341234} + g={123412341234} + />; + +=====================================output===================================== +({ + processors: [ + require("autoprefixer", { + browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"], + }), + require("postcss-url")({ + url: (url) => + url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`, + }), + ], +}); + +true ? ( + test({ + a: 1, + }) +) : ( + <div + a={123412342314} + b={123412341234} + c={123412341234} + d={123412341234} + e={123412341234} + f={123412341234} + g={123412341234} + /> +); + +================================================================================ +`; + +exports[`dangling-comment-in-arrow-function.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo( + ( + // foo + ) => {} +); + +=====================================output===================================== +foo(() => + // foo + {}, +); + +================================================================================ +`; + +exports[`edge_case.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +a( + SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, + [ + { + SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1 + } + ] +); + +exports.examples = [ + { + render: withGraphQLQuery( + 'node(1234567890){image{uri}}', + function(container, data) { + return ( + <div> + <InlineBlock> + <img + src={data[1234567890].image.uri} + style={{position: 'absolute', top: '0', left: '0', zIndex:'-1'}} + /> + </InlineBlock> + </div> + ); + } + ) + } +]; + +someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a([ + [], + // comment + [], +]); + +(function webpackUniversalModuleDefinition() {})(this, function(__WEBPACK_EXTERNAL_MODULE_85__, __WEBPACK_EXTERNAL_MODULE_115__) { +return /******/ (function(modules) { // webpackBootstrap + +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + +/***/ } +/******/ ]) +}); + +=====================================output===================================== +a( + SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, + [ + { + SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1, + }, + ], +); + +exports.examples = [ + { + render: withGraphQLQuery( + "node(1234567890){image{uri}}", + function (container, data) { + return ( + <div> + <InlineBlock> + <img + src={data[1234567890].image.uri} + style={{ + position: "absolute", + top: "0", + left: "0", + zIndex: "-1", + }} + /> + </InlineBlock> + </div> + ); + }, + ), + }, +]; + +someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a( + [ + [], + // comment + [], + ], +); + +(function webpackUniversalModuleDefinition() {})( + this, + function (__WEBPACK_EXTERNAL_MODULE_85__, __WEBPACK_EXTERNAL_MODULE_115__) { + return /******/ (function (modules) { + // webpackBootstrap + /******/ + })( + /************************************************************************/ + /******/ [ + /* 0 */ + /***/ function (module, exports, __webpack_require__) { + /***/ + }, + /* 1 */ + /***/ function (module, exports, __webpack_require__) { + /***/ + }, + /* 2 */ + /***/ function (module, exports, __webpack_require__) { + /***/ + }, + /******/ + ], + ); + }, +); + +================================================================================ +`; + +exports[`embed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo(/* HTML */ \`<!-- bar1 --> bar <!-- bar2 -->\`); +foo(/* HTML */ \` <!-- bar1 --> bar <!-- bar2 --> \`); +foo(/* HTML */ \`<div><p>bar</p>foo</div>\`); +foo(/* HTML */ \` <div><p>bar</p>foo</div> \`); +foo(/* GraphQL */ \`query { foo { bar } }\`); +foo(/* ... */ css\`color:magenta\`); +const a = b => /* HTML */ \`<!-- bar1 --> bar <!-- bar2 -->\` +const c = b => /* HTML */ \` <!-- bar1 --> bar <!-- bar2 --> \` + +=====================================output===================================== +foo( + /* HTML */ \`<!-- bar1 --> + bar + <!-- bar2 -->\`, +); +foo(/* HTML */ \` + <!-- bar1 --> + bar + <!-- bar2 --> +\`); +foo( + /* HTML */ \`<div> + <p>bar</p> + foo + </div>\`, +); +foo(/* HTML */ \` + <div> + <p>bar</p> + foo + </div> +\`); +foo(/* GraphQL */ \` + query { + foo { + bar + } + } +\`); +foo(/* ... */ css\` + color: magenta; +\`); +const a = (b) => + /* HTML */ \`<!-- bar1 --> + bar + <!-- bar2 -->\`; +const c = (b) => /* HTML */ \` + <!-- bar1 --> + bar + <!-- bar2 --> +\`; + +================================================================================ +`; + +exports[`empty-lines.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +all_verylongcall_verylongcall_verylongcall_verylongcall_verylongcall( + (a, + + b) => { + console.log() + } +) + +=====================================output===================================== +all_verylongcall_verylongcall_verylongcall_verylongcall_verylongcall( + ( + a, + + b, + ) => { + console.log(); + }, +); + +================================================================================ +`; + +exports[`empty-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +func(first, second, third, fourth, fifth, aReallyLongArgumentsListToForceItToBreak, { + // comment +}) + +func({ + // comment +}) + +func( + {} // comment +) + +func( + {} + // comment +) + +func( + // comment + {} +) + +=====================================output===================================== +func( + first, + second, + third, + fourth, + fifth, + aReallyLongArgumentsListToForceItToBreak, + { + // comment + }, +); + +func({ + // comment +}); + +func( + {}, // comment +); + +func( + {}, + // comment +); + +func( + // comment + {}, +); + +================================================================================ +`; + +exports[`function-body-in-mode-break.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +fs.readdirSync(suiteLoc).forEach(function (testName) { + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +}); + +{ + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +} + +=====================================output===================================== +fs.readdirSync(suiteLoc).forEach(function (testName) { + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +}); + +{ + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +} + +================================================================================ +`; + +exports[`function-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function* mySagas() { + yield effects.takeEvery( + rexpress.actionTypes.REQUEST_START, + function*({ id }) { + console.log(id); + yield rexpress.actions(store).writeHead(id, 400); + yield rexpress.actions(store).end(id, 'pong'); + console.log('pong'); + } + ); +} + +function mySagas2() { + return effects.takeEvery( + rexpress.actionTypes.REQUEST_START, + function({ id }) { + console.log(id); + } + ); +} + +=====================================output===================================== +function* mySagas() { + yield effects.takeEvery( + rexpress.actionTypes.REQUEST_START, + function* ({ id }) { + console.log(id); + yield rexpress.actions(store).writeHead(id, 400); + yield rexpress.actions(store).end(id, "pong"); + console.log("pong"); + }, + ); +} + +function mySagas2() { + return effects.takeEvery( + rexpress.actionTypes.REQUEST_START, + function ({ id }) { + console.log(id); + }, + ); +} + +================================================================================ +`; + +exports[`function-expression-issue-2239.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +someFunctionCallWithBigArgumentsAndACallback(thisArgumentIsQuiteLong, function(cool) { + return cool +}) + +=====================================output===================================== +someFunctionCallWithBigArgumentsAndACallback( + thisArgumentIsQuiteLong, + function (cool) { + return cool; + }, +); + +================================================================================ +`; + +exports[`issue-7518.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Broken = React.forwardRef(({ + children, + // 1 + // 2 + title, + hidden, + // 3 +}, ref) => ( + <div ref={ref}> + {children} + </div> +)) + +=====================================output===================================== +const Broken = React.forwardRef( + ( + { + children, + // 1 + // 2 + title, + hidden, + // 3 + }, + ref, + ) => <div ref={ref}>{children}</div>, +); + +================================================================================ +`; + +exports[`issue-10708.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +bob + .doL(({ a, b: { + // comment + }}) => something + .else + .else({})) + +=====================================output===================================== +bob.doL( + ({ + a, + b: { + // comment + }, + }) => something.else.else({}), +); + +================================================================================ +`; + +exports[`jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const els = items.map(item => ( + <div className="whatever"> + <span>{children}</span> + </div> +)); + +=====================================output===================================== +const els = items.map((item) => ( + <div className="whatever"> + <span>{children}</span> + </div> +)); + +================================================================================ +`; + +exports[`number-only-array.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +instantiate(game, [ + transform([-0.7, 0.5, 0]), + render_colored_diffuse(game.MaterialDiffuse, game.Meshes["monkey_flat"], [1, 1, 0.3, 1]), +]); + +=====================================output===================================== +instantiate(game, [ + transform([-0.7, 0.5, 0]), + render_colored_diffuse( + game.MaterialDiffuse, + game.Meshes["monkey_flat"], + [1, 1, 0.3, 1], + ), +]); + +================================================================================ +`; + +exports[`object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const formatData = pipe( + zip, + map(([ ref, data ]) => ({ + nodeId: ref.nodeId.toString(), + ...attributeFromDataValue(ref.attributeId, data) + })), + groupBy(prop('nodeId')), + map(mergeAll), + values +); + +export const setProp = y => ({ + ...y, + a: 'very, very, very long very, very long text' +}); + +export const log = y => { + console.log('very, very, very long very, very long text') +}; + +=====================================output===================================== +const formatData = pipe( + zip, + map(([ref, data]) => ({ + nodeId: ref.nodeId.toString(), + ...attributeFromDataValue(ref.attributeId, data), + })), + groupBy(prop("nodeId")), + map(mergeAll), + values, +); + +export const setProp = (y) => ({ + ...y, + a: "very, very, very long very, very long text", +}); + +export const log = (y) => { + console.log("very, very, very long very, very long text"); +}; + +================================================================================ +`; + +exports[`overflow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => { + // comment +}); + +func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, []); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [ + // Comments +]); +func(five, six, seven, eig, is, this, too, long, yes, [ + // Comments +]); + +func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {}); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {}); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, { + // Comments +}); + +foo( + ( + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ten, + eleven, + twelve, + thirteen, + fourteen, + ) => {}, +); + +const contentTypes = function(tile, singleSelection) { + return compute( + function contentTypesContentTypes( + tile, + searchString = '', + filteredContentTypes = [], + contentTypesArray = [], + selectedGroup, + singleSelection) { + selectedGroup = (tile.state && tile.state.group) || selectedGroup; + } + ); +}; + +=====================================output===================================== +SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall( + (err, result) => { + // comment + }, +); + +func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []); +func( + one, + two, + three, + four, + five, + six, + seven, + eig, + is, + this, + too, + long, + yes, + [], +); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [ + // Comments +]); +func(five, six, seven, eig, is, this, too, long, yes, [ + // Comments +]); + +func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {}); +func( + one, + two, + three, + four, + five, + six, + seven, + eig, + is, + this, + too, + long, + yes, + {}, +); +func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, { + // Comments +}); + +foo( + ( + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ten, + eleven, + twelve, + thirteen, + fourteen, + ) => {}, +); + +const contentTypes = function (tile, singleSelection) { + return compute(function contentTypesContentTypes( + tile, + searchString = "", + filteredContentTypes = [], + contentTypesArray = [], + selectedGroup, + singleSelection, + ) { + selectedGroup = (tile.state && tile.state.group) || selectedGroup; + }); +}; + +================================================================================ +`; diff --git a/tests/format/js/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 230d33f1275d..000000000000 --- a/tests/format/js/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,759 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default function searchUsers(action$) { - return action$.ofType(ActionTypes.SEARCHED_USERS) - .map(action => action.payload.query) - .filter(q => !!q) - .switchMap(q => - Observable.timer(800) // debounce - .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) - .mergeMap(() => Observable.merge( - Observable.of(replace(\`?q=\${q}\`)), - ajax.getJSON(\`https://api.github.com/search/users?q=\${q}\`) - .map(res => res.items) - .map(receiveUsers) - )) - ); -}; - -=====================================output===================================== -export default function searchUsers(action$) { - return action$ - .ofType(ActionTypes.SEARCHED_USERS) - .map((action) => action.payload.query) - .filter((q) => !!q) - .switchMap((q) => - Observable.timer(800) // debounce - .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) - .mergeMap(() => - Observable.merge( - Observable.of(replace(\`?q=\${q}\`)), - ajax - .getJSON(\`https://api.github.com/search/users?q=\${q}\`) - .map((res) => res.items) - .map(receiveUsers) - ) - ) - ); -} - -================================================================================ -`; - -exports[`assignment-pattern.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -bob.doL(({ a, b = () => { - console.log; -}}) => something.else.else({})); - -=====================================output===================================== -bob.doL( - ({ - a, - b = () => { - console.log; - }, - }) => something.else.else({}) -); - -================================================================================ -`; - -exports[`break-parent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -({ - processors: [ - require("autoprefixer", { - browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"] - }), - require("postcss-url")({ - url: url => - url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\` - }) - ] -}); - -true - ? test({ - a: 1 - }) - : <div - a={123412342314} - b={123412341234} - c={123412341234} - d={123412341234} - e={123412341234} - f={123412341234} - g={123412341234} - />; - -=====================================output===================================== -({ - processors: [ - require("autoprefixer", { - browsers: ["> 1%", "last 2 versions", "ie >= 11", "Firefox ESR"], - }), - require("postcss-url")({ - url: (url) => - url.startsWith("/") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`, - }), - ], -}); - -true ? ( - test({ - a: 1, - }) -) : ( - <div - a={123412342314} - b={123412341234} - c={123412341234} - d={123412341234} - e={123412341234} - f={123412341234} - g={123412341234} - /> -); - -================================================================================ -`; - -exports[`dangling-comment-in-arrow-function.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo( - ( - // foo - ) => {} -); - -=====================================output===================================== -foo(() => - // foo - {} -); - -================================================================================ -`; - -exports[`edge_case.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - - -a( - SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, - [ - { - SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1 - } - ] -); - -exports.examples = [ - { - render: withGraphQLQuery( - 'node(1234567890){image{uri}}', - function(container, data) { - return ( - <div> - <InlineBlock> - <img - src={data[1234567890].image.uri} - style={{position: 'absolute', top: '0', left: '0', zIndex:'-1'}} - /> - </InlineBlock> - </div> - ); - } - ) - } -]; - -someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a([ - [], - // comment - [], -]); - -(function webpackUniversalModuleDefinition() {})(this, function(__WEBPACK_EXTERNAL_MODULE_85__, __WEBPACK_EXTERNAL_MODULE_115__) { -return /******/ (function(modules) { // webpackBootstrap - -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - -/***/ } -/******/ ]) -}); - -=====================================output===================================== -a( - SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, - [ - { - SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1, - }, - ] -); - -exports.examples = [ - { - render: withGraphQLQuery( - "node(1234567890){image{uri}}", - function (container, data) { - return ( - <div> - <InlineBlock> - <img - src={data[1234567890].image.uri} - style={{ - position: "absolute", - top: "0", - left: "0", - zIndex: "-1", - }} - /> - </InlineBlock> - </div> - ); - } - ), - }, -]; - -someReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReally.a( - [ - [], - // comment - [], - ] -); - -(function webpackUniversalModuleDefinition() {})( - this, - function (__WEBPACK_EXTERNAL_MODULE_85__, __WEBPACK_EXTERNAL_MODULE_115__) { - return /******/ (function (modules) { - // webpackBootstrap - /******/ - })( - /************************************************************************/ - /******/ [ - /* 0 */ - /***/ function (module, exports, __webpack_require__) { - /***/ - }, - /* 1 */ - /***/ function (module, exports, __webpack_require__) { - /***/ - }, - /* 2 */ - /***/ function (module, exports, __webpack_require__) { - /***/ - }, - /******/ - ] - ); - } -); - -================================================================================ -`; - -exports[`empty-lines.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -all_verylongcall_verylongcall_verylongcall_verylongcall_verylongcall( - (a, - - b) => { - console.log() - } -) - -=====================================output===================================== -all_verylongcall_verylongcall_verylongcall_verylongcall_verylongcall( - ( - a, - - b - ) => { - console.log(); - } -); - -================================================================================ -`; - -exports[`empty-object.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -func(first, second, third, fourth, fifth, aReallyLongArgumentsListToForceItToBreak, { - // comment -}) - -func({ - // comment -}) - -func( - {} // comment -) - -func( - {} - // comment -) - -func( - // comment - {} -) - -=====================================output===================================== -func( - first, - second, - third, - fourth, - fifth, - aReallyLongArgumentsListToForceItToBreak, - { - // comment - } -); - -func({ - // comment -}); - -func( - {} // comment -); - -func( - {} - // comment -); - -func( - // comment - {} -); - -================================================================================ -`; - -exports[`function-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function* mySagas() { - yield effects.takeEvery( - rexpress.actionTypes.REQUEST_START, - function*({ id }) { - console.log(id); - yield rexpress.actions(store).writeHead(id, 400); - yield rexpress.actions(store).end(id, 'pong'); - console.log('pong'); - } - ); -} - -function mySagas2() { - return effects.takeEvery( - rexpress.actionTypes.REQUEST_START, - function({ id }) { - console.log(id); - } - ); -} - -=====================================output===================================== -function* mySagas() { - yield effects.takeEvery( - rexpress.actionTypes.REQUEST_START, - function* ({ id }) { - console.log(id); - yield rexpress.actions(store).writeHead(id, 400); - yield rexpress.actions(store).end(id, "pong"); - console.log("pong"); - } - ); -} - -function mySagas2() { - return effects.takeEvery( - rexpress.actionTypes.REQUEST_START, - function ({ id }) { - console.log(id); - } - ); -} - -================================================================================ -`; - -exports[`function-expression-issue-2239.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -someFunctionCallWithBigArgumentsAndACallback(thisArgumentIsQuiteLong, function(cool) { - return cool -}) - -=====================================output===================================== -someFunctionCallWithBigArgumentsAndACallback( - thisArgumentIsQuiteLong, - function (cool) { - return cool; - } -); - -================================================================================ -`; - -exports[`issue-7518.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Broken = React.forwardRef(({ - children, - // 1 - // 2 - title, - hidden, - // 3 -}, ref) => ( - <div ref={ref}> - {children} - </div> -)) - -=====================================output===================================== -const Broken = React.forwardRef( - ( - { - children, - // 1 - // 2 - title, - hidden, - // 3 - }, - ref - ) => <div ref={ref}>{children}</div> -); - -================================================================================ -`; - -exports[`issue-10708.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -bob - .doL(({ a, b: { - // comment - }}) => something - .else - .else({})) - -=====================================output===================================== -bob.doL( - ({ - a, - b: { - // comment - }, - }) => something.else.else({}) -); - -================================================================================ -`; - -exports[`jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const els = items.map(item => ( - <div className="whatever"> - <span>{children}</span> - </div> -)); - -=====================================output===================================== -const els = items.map((item) => ( - <div className="whatever"> - <span>{children}</span> - </div> -)); - -================================================================================ -`; - -exports[`number-only-array.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -instantiate(game, [ - transform([-0.7, 0.5, 0]), - render_colored_diffuse(game.MaterialDiffuse, game.Meshes["monkey_flat"], [1, 1, 0.3, 1]), -]); - -=====================================output===================================== -instantiate(game, [ - transform([-0.7, 0.5, 0]), - render_colored_diffuse( - game.MaterialDiffuse, - game.Meshes["monkey_flat"], - [1, 1, 0.3, 1] - ), -]); - -================================================================================ -`; - -exports[`object.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const formatData = pipe( - zip, - map(([ ref, data ]) => ({ - nodeId: ref.nodeId.toString(), - ...attributeFromDataValue(ref.attributeId, data) - })), - groupBy(prop('nodeId')), - map(mergeAll), - values -); - -export const setProp = y => ({ - ...y, - a: 'very, very, very long very, very long text' -}); - -export const log = y => { - console.log('very, very, very long very, very long text') -}; - -=====================================output===================================== -const formatData = pipe( - zip, - map(([ref, data]) => ({ - nodeId: ref.nodeId.toString(), - ...attributeFromDataValue(ref.attributeId, data), - })), - groupBy(prop("nodeId")), - map(mergeAll), - values -); - -export const setProp = (y) => ({ - ...y, - a: "very, very, very long very, very long text", -}); - -export const log = (y) => { - console.log("very, very, very long very, very long text"); -}; - -================================================================================ -`; - -exports[`overflow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => { - // comment -}); - -func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, []); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [ - // Comments -]); -func(five, six, seven, eig, is, this, too, long, yes, [ - // Comments -]); - -func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {}); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {}); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, { - // Comments -}); - -foo( - ( - one, - two, - three, - four, - five, - six, - seven, - eight, - nine, - ten, - eleven, - twelve, - thirteen, - fourteen, - ) => {}, -); - -const contentTypes = function(tile, singleSelection) { - return compute( - function contentTypesContentTypes( - tile, - searchString = '', - filteredContentTypes = [], - contentTypesArray = [], - selectedGroup, - singleSelection) { - selectedGroup = (tile.state && tile.state.group) || selectedGroup; - } - ); -}; - -=====================================output===================================== -SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall( - (err, result) => { - // comment - } -); - -func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []); -func( - one, - two, - three, - four, - five, - six, - seven, - eig, - is, - this, - too, - long, - yes, - [] -); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [ - // Comments -]); -func(five, six, seven, eig, is, this, too, long, yes, [ - // Comments -]); - -func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {}); -func( - one, - two, - three, - four, - five, - six, - seven, - eig, - is, - this, - too, - long, - yes, - {} -); -func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, { - // Comments -}); - -foo( - ( - one, - two, - three, - four, - five, - six, - seven, - eight, - nine, - ten, - eleven, - twelve, - thirteen, - fourteen - ) => {} -); - -const contentTypes = function (tile, singleSelection) { - return compute(function contentTypesContentTypes( - tile, - searchString = "", - filteredContentTypes = [], - contentTypesArray = [], - selectedGroup, - singleSelection - ) { - selectedGroup = (tile.state && tile.state.group) || selectedGroup; - }); -}; - -================================================================================ -`; diff --git a/tests/format/js/last-argument-expansion/embed.js b/tests/format/js/last-argument-expansion/embed.js new file mode 100644 index 000000000000..a8ba2c14905f --- /dev/null +++ b/tests/format/js/last-argument-expansion/embed.js @@ -0,0 +1,8 @@ +foo(/* HTML */ `<!-- bar1 --> bar <!-- bar2 -->`); +foo(/* HTML */ ` <!-- bar1 --> bar <!-- bar2 --> `); +foo(/* HTML */ `<div><p>bar</p>foo</div>`); +foo(/* HTML */ ` <div><p>bar</p>foo</div> `); +foo(/* GraphQL */ `query { foo { bar } }`); +foo(/* ... */ css`color:magenta`); +const a = b => /* HTML */ `<!-- bar1 --> bar <!-- bar2 -->` +const c = b => /* HTML */ ` <!-- bar1 --> bar <!-- bar2 --> ` diff --git a/tests/format/js/last-argument-expansion/format.test.js b/tests/format/js/last-argument-expansion/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/last-argument-expansion/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/last-argument-expansion/function-body-in-mode-break.js b/tests/format/js/last-argument-expansion/function-body-in-mode-break.js new file mode 100644 index 000000000000..feb86e80e5c1 --- /dev/null +++ b/tests/format/js/last-argument-expansion/function-body-in-mode-break.js @@ -0,0 +1,15 @@ +fs.readdirSync(suiteLoc).forEach(function (testName) { + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +}); + +{ + (skip ? it.skip : it)( + testName, + buildTest(binName, testName, opts), + 2_000_000, + ); +} diff --git a/tests/format/js/last-argument-expansion/jsfmt.spec.js b/tests/format/js/last-argument-expansion/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/last-argument-expansion/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/line-suffix-boundary/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/line-suffix-boundary/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/line-suffix-boundary/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/line-suffix-boundary/__snapshots__/format.test.js.snap diff --git a/tests/format/js/line-suffix-boundary/format.test.js b/tests/format/js/line-suffix-boundary/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/line-suffix-boundary/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/line-suffix-boundary/jsfmt.spec.js b/tests/format/js/line-suffix-boundary/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/line-suffix-boundary/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/line/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/line/__snapshots__/format.test.js.snap diff --git a/tests/format/js/line/format.test.js b/tests/format/js/line/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/line/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/line/jsfmt.spec.js b/tests/format/js/line/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/line/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/literal-numeric-separator/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/literal-numeric-separator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/literal-numeric-separator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/literal-numeric-separator/__snapshots__/format.test.js.snap diff --git a/tests/format/js/literal-numeric-separator/format.test.js b/tests/format/js/literal-numeric-separator/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/literal-numeric-separator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/literal-numeric-separator/jsfmt.spec.js b/tests/format/js/literal-numeric-separator/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/literal-numeric-separator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/literal/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/literal/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/literal/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/literal/__snapshots__/format.test.js.snap diff --git a/tests/format/js/literal/format.test.js b/tests/format/js/literal/format.test.js new file mode 100644 index 000000000000..5b8304c9e5c5 --- /dev/null +++ b/tests/format/js/literal/format.test.js @@ -0,0 +1,2 @@ +// flow-parser@0.38.0 fails to parse `1.e1`, so use babel here. +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/js/literal/jsfmt.spec.js b/tests/format/js/literal/jsfmt.spec.js deleted file mode 100644 index d1f25e544c5a..000000000000 --- a/tests/format/js/literal/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -// flow-parser@0.38.0 fails to parse `1.e1`, so use babel here. -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/js/logical-assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/logical-assignment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/logical-assignment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/logical-assignment/__snapshots__/format.test.js.snap diff --git a/tests/format/js/logical-assignment/format.test.js b/tests/format/js/logical-assignment/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/logical-assignment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/logical-assignment/jsfmt.spec.js b/tests/format/js/logical-assignment/jsfmt.spec.js deleted file mode 100644 index 61966a7d00c3..000000000000 --- a/tests/format/js/logical-assignment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/logical-expressions/__snapshots__/format.test.js.snap b/tests/format/js/logical-expressions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..01e9e1702c24 --- /dev/null +++ b/tests/format/js/logical-expressions/__snapshots__/format.test.js.snap @@ -0,0 +1,98 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-7024.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const radioSelectedAttr = + (isAnyValueSelected && + node.getAttribute(radioAttr.toLowerCase()) === radioValue) || + ((!isAnyValueSelected && values[a].default === true) || a === 0); + +=====================================output===================================== +const radioSelectedAttr = + (isAnyValueSelected && + node.getAttribute(radioAttr.toLowerCase()) === radioValue) || + (!isAnyValueSelected && values[a].default === true) || + a === 0; + +================================================================================ +`; + +exports[`logical-expression-operators.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Same operators do not require parens +(foo && bar) && baz; +foo && (bar && baz); +foo && ((bar && baz) && qux); +foo && (bar && (baz && qux)); +foo && (bar && ((baz && qux) && xyz)); +foo && (bar && (baz && (qux && xyz))); + +(foo || bar) || baz; +foo || (bar || baz); +foo || ((bar || baz) || qux); +foo || (bar || (baz || qux)); +foo || (bar || ((baz || qux) || xyz)); +foo || (bar || (baz || (qux || xyz))); + +(foo ?? bar) ?? baz; +foo ?? (bar ?? baz); +foo ?? ((bar ?? baz) ?? qux); +foo ?? (bar ?? (baz ?? qux)); +foo ?? (bar ?? ((baz ?? qux) ?? xyz)); +foo ?? (bar ?? (baz ?? (qux ?? xyz))); + +// Explicitly parenthesized && and || requires parens +(foo && bar) || baz; +(foo || bar) && baz; + +foo && (bar || baz); +foo || (bar && baz); + +// Implicitly parenthesized && and || requires parens +foo && bar || baz; +foo || bar && baz; + +=====================================output===================================== +// Same operators do not require parens +foo && bar && baz; +foo && bar && baz; +foo && bar && baz && qux; +foo && bar && baz && qux; +foo && bar && baz && qux && xyz; +foo && bar && baz && qux && xyz; + +foo || bar || baz; +foo || bar || baz; +foo || bar || baz || qux; +foo || bar || baz || qux; +foo || bar || baz || qux || xyz; +foo || bar || baz || qux || xyz; + +foo ?? bar ?? baz; +foo ?? bar ?? baz; +foo ?? bar ?? baz ?? qux; +foo ?? bar ?? baz ?? qux; +foo ?? bar ?? baz ?? qux ?? xyz; +foo ?? bar ?? baz ?? qux ?? xyz; + +// Explicitly parenthesized && and || requires parens +(foo && bar) || baz; +(foo || bar) && baz; + +foo && (bar || baz); +foo || (bar && baz); + +// Implicitly parenthesized && and || requires parens +(foo && bar) || baz; +foo || (bar && baz); + +================================================================================ +`; diff --git a/tests/format/js/logical-expressions/format.test.js b/tests/format/js/logical-expressions/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/logical-expressions/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/logical_expressions/issue-7024.js b/tests/format/js/logical-expressions/issue-7024.js similarity index 100% rename from tests/format/js/logical_expressions/issue-7024.js rename to tests/format/js/logical-expressions/issue-7024.js diff --git a/tests/format/js/logical_expressions/logical_expression_operators.js b/tests/format/js/logical-expressions/logical-expression-operators.js similarity index 100% rename from tests/format/js/logical_expressions/logical_expression_operators.js rename to tests/format/js/logical-expressions/logical-expression-operators.js diff --git a/tests/format/js/logical-expressions/multiple-comments/17192.js b/tests/format/js/logical-expressions/multiple-comments/17192.js new file mode 100644 index 000000000000..211d68ff86a2 --- /dev/null +++ b/tests/format/js/logical-expressions/multiple-comments/17192.js @@ -0,0 +1,12 @@ +ErrorLike = + SerializedProps && + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps && // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; diff --git a/tests/format/js/logical-expressions/multiple-comments/__snapshots__/format.test.js.snap b/tests/format/js/logical-expressions/multiple-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..54885c9bd653 --- /dev/null +++ b/tests/format/js/logical-expressions/multiple-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,70 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`17192.js - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +ErrorLike = + SerializedProps && + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps && // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +=====================================output===================================== +ErrorLike = SerializedProps && + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = SerializedProps && // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +================================================================================ +`; + +exports[`17192.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +ErrorLike = + SerializedProps && + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = + SerializedProps && // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +=====================================output===================================== +ErrorLike = SerializedProps && + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +ErrorLike = SerializedProps && // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause: unknown }; + +================================================================================ +`; diff --git a/tests/format/js/logical-expressions/multiple-comments/format.test.js b/tests/format/js/logical-expressions/multiple-comments/format.test.js new file mode 100644 index 000000000000..51d943b41ce4 --- /dev/null +++ b/tests/format/js/logical-expressions/multiple-comments/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalOperatorPosition: "start", +}); diff --git a/tests/format/js/logical_expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/logical_expressions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 590cc5f2fd43..000000000000 --- a/tests/format/js/logical_expressions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,98 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-7024.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const radioSelectedAttr = - (isAnyValueSelected && - node.getAttribute(radioAttr.toLowerCase()) === radioValue) || - ((!isAnyValueSelected && values[a].default === true) || a === 0); - -=====================================output===================================== -const radioSelectedAttr = - (isAnyValueSelected && - node.getAttribute(radioAttr.toLowerCase()) === radioValue) || - (!isAnyValueSelected && values[a].default === true) || - a === 0; - -================================================================================ -`; - -exports[`logical_expression_operators.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Same operators do not require parens -(foo && bar) && baz; -foo && (bar && baz); -foo && ((bar && baz) && qux); -foo && (bar && (baz && qux)); -foo && (bar && ((baz && qux) && xyz)); -foo && (bar && (baz && (qux && xyz))); - -(foo || bar) || baz; -foo || (bar || baz); -foo || ((bar || baz) || qux); -foo || (bar || (baz || qux)); -foo || (bar || ((baz || qux) || xyz)); -foo || (bar || (baz || (qux || xyz))); - -(foo ?? bar) ?? baz; -foo ?? (bar ?? baz); -foo ?? ((bar ?? baz) ?? qux); -foo ?? (bar ?? (baz ?? qux)); -foo ?? (bar ?? ((baz ?? qux) ?? xyz)); -foo ?? (bar ?? (baz ?? (qux ?? xyz))); - -// Explicitly parenthesized && and || requires parens -(foo && bar) || baz; -(foo || bar) && baz; - -foo && (bar || baz); -foo || (bar && baz); - -// Implicitly parenthesized && and || requires parens -foo && bar || baz; -foo || bar && baz; - -=====================================output===================================== -// Same operators do not require parens -foo && bar && baz; -foo && bar && baz; -foo && bar && baz && qux; -foo && bar && baz && qux; -foo && bar && baz && qux && xyz; -foo && bar && baz && qux && xyz; - -foo || bar || baz; -foo || bar || baz; -foo || bar || baz || qux; -foo || bar || baz || qux; -foo || bar || baz || qux || xyz; -foo || bar || baz || qux || xyz; - -foo ?? bar ?? baz; -foo ?? bar ?? baz; -foo ?? bar ?? baz ?? qux; -foo ?? bar ?? baz ?? qux; -foo ?? bar ?? baz ?? qux ?? xyz; -foo ?? bar ?? baz ?? qux ?? xyz; - -// Explicitly parenthesized && and || requires parens -(foo && bar) || baz; -(foo || bar) && baz; - -foo && (bar || baz); -foo || (bar && baz); - -// Implicitly parenthesized && and || requires parens -(foo && bar) || baz; -foo || (bar && baz); - -================================================================================ -`; diff --git a/tests/format/js/logical_expressions/jsfmt.spec.js b/tests/format/js/logical_expressions/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/logical_expressions/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/member/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/member/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/member/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/member/__snapshots__/format.test.js.snap diff --git a/tests/format/js/member/format.test.js b/tests/format/js/member/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/member/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/member/jsfmt.spec.js b/tests/format/js/member/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/member/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/method-chain/__snapshots__/format.test.js.snap b/tests/format/js/method-chain/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b6ba83d91364 --- /dev/null +++ b/tests/format/js/method-chain/__snapshots__/format.test.js.snap @@ -0,0 +1,1601 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`13018.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo(_a).bar().leet(); +foo(-a).bar().leet(); +foo(+a).bar().leet(); +foo(~a).bar().leet(); +foo(++a).bar().leet(); +foo(--a).bar().leet(); +foo(a++).bar().leet(); +foo(a--).bar().leet(); + +=====================================output===================================== +foo(_a).bar().leet(); +foo(-a).bar().leet(); +foo(+a).bar().leet(); +foo(~a).bar().leet(); +foo(++a).bar().leet(); +foo(--a).bar().leet(); +foo(a++).bar().leet(); +foo(a--).bar().leet(); + +================================================================================ +`; + +exports[`array-and-object.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo.a().b().c([n, o]) + +foo.a().b().c({n, o}) + +=====================================output===================================== +foo.a().b().c([n, o]); + +foo.a().b().c({ n, o }); + +================================================================================ +`; + +exports[`assignment-lhs.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +document.querySelector("#output-abcdef").textContent = \`metaKey pressed? \${e.metaKey}\`; + +document.querySelector("p").textContent = \`Shader program did not link successfully. Error log: \${linkErrLog}\`; + +=====================================output===================================== +document.querySelector("#output-abcdef").textContent = + \`metaKey pressed? \${e.metaKey}\`; + +document.querySelector("p").textContent = + \`Shader program did not link successfully. Error log: \${linkErrLog}\`; + +================================================================================ +`; + +exports[`bracket_0.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a() { + function b() { + queryThenMutateDOM( + () => { + title = SomeThing.call(root, 'someLongStringThatPushesThisTextReallyFar')[0]; + } + ); + } +} + +=====================================output===================================== +function a() { + function b() { + queryThenMutateDOM(() => { + title = SomeThing.call( + root, + "someLongStringThatPushesThisTextReallyFar", + )[0]; + }); + } +} + +================================================================================ +`; + +exports[`bracket_0-1.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const thingamabobMetaAlias = +path.scope.getProgramParent().path.get("body")[0].node; + +=====================================output===================================== +const thingamabobMetaAlias = path.scope + .getProgramParent() + .path.get("body")[0].node; + +================================================================================ +`; + +exports[`break-last-call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default store => { + return callApi(endpoint, schema).then( + response => next(actionWith({ + response, + type: successType + })), + error => next(actionWith({ + type: failureType, + error: error.message || 'Something bad happened' + })) + ) +} + +it('should group messages with same created time', () => { + expect( + groupMessages(messages).toJS(), + ).toEqual({ + '11/01/2017 13:36': [ + {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}, + {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:36'}, + ], + '09/01/2017 17:25': [ + {message: 'te', messageType: 'SMS', status: 'Unknown', created: '09/01/2017 17:25'}, + {message: 'te', messageType: 'Email', status: 'Unknown', created: '09/01/2017 17:25'}, + ], + '11/01/2017 13:33': [ + {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:33'}, + {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:33'}, + ], + '11/01/2017 13:37': [ + {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:37'}, + {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:37'}, + ], + }); +}); + +=====================================output===================================== +export default (store) => { + return callApi(endpoint, schema).then( + (response) => + next( + actionWith({ + response, + type: successType, + }), + ), + (error) => + next( + actionWith({ + type: failureType, + error: error.message || "Something bad happened", + }), + ), + ); +}; + +it("should group messages with same created time", () => { + expect(groupMessages(messages).toJS()).toEqual({ + "11/01/2017 13:36": [ + { + message: "test", + messageType: "SMS", + status: "Unknown", + created: "11/01/2017 13:36", + }, + { + message: "test", + messageType: "Email", + status: "Unknown", + created: "11/01/2017 13:36", + }, + ], + "09/01/2017 17:25": [ + { + message: "te", + messageType: "SMS", + status: "Unknown", + created: "09/01/2017 17:25", + }, + { + message: "te", + messageType: "Email", + status: "Unknown", + created: "09/01/2017 17:25", + }, + ], + "11/01/2017 13:33": [ + { + message: "test", + messageType: "SMS", + status: "Unknown", + created: "11/01/2017 13:33", + }, + { + message: "test", + messageType: "Email", + status: "Unknown", + created: "11/01/2017 13:33", + }, + ], + "11/01/2017 13:37": [ + { + message: "test", + messageType: "SMS", + status: "Unknown", + created: "11/01/2017 13:37", + }, + { + message: "test", + messageType: "Email", + status: "Unknown", + created: "11/01/2017 13:37", + }, + ], + }); +}); + +================================================================================ +`; + +exports[`break-last-member.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +SomeVeryLongUpperCaseConstant.someVeryLongCallExpression().some_very_long_member_expression +weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode + .childrenInAnArray[0]; +superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered; +superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered[0]; + +expect( + findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0].style.paddingRight +).toBe('1000px'); + +const { course, conflicts = [], index, scheduleId, studentId, something } = a.this.props; + +const { course2, conflicts2 = [], index2, scheduleId2, studentId2, something2 } = this.props; + +const { + updated, + author: { identifier: ownerId }, + location, + category: categories, +} = rawAd.entry; + +=====================================output===================================== +SomeVeryLongUpperCaseConstant.someVeryLongCallExpression() + .some_very_long_member_expression; +weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode + .childrenInAnArray[0]; +superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered; +superSupersuperSupersuperSupersuperSupersuperSuperLong + .exampleOfOrderOfGetterAndSetterReordered[0]; + +expect( + findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0] + .style.paddingRight, +).toBe("1000px"); + +const { + course, + conflicts = [], + index, + scheduleId, + studentId, + something, +} = a.this.props; + +const { + course2, + conflicts2 = [], + index2, + scheduleId2, + studentId2, + something2, +} = this.props; + +const { + updated, + author: { identifier: ownerId }, + location, + category: categories, +} = rawAd.entry; + +================================================================================ +`; + +exports[`break-multiple.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +object.foo().bar().baz(); + +foo().bar().baz(); + +foo().bar.baz(); + +=====================================output===================================== +object.foo().bar().baz(); + +foo().bar().baz(); + +foo().bar.baz(); + +================================================================================ +`; + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + return observableFromSubscribeFunction() + // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is + // configurable. + .debounceTime(debounceInterval); +} + +_.a(a) + /* very very very very very very very long such that it is longer than 80 columns */ + .a() + +_.a( + a +)/* very very very very very very very long such that it is longer than 80 columns */ +.a(); + +_.a( + a +) /* very very very very very very very long such that it is longer than 80 columns */.a(); + +Something + // $FlowFixMe(>=0.41.0) + .getInstance(this.props.dao) + .getters() + +// Warm-up first +measure() + .then(() => { + SomethingLong(); + }); + +measure() // Warm-up first + .then(() => { + SomethingLong(); + }); + +const configModel = this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + .merge(this.cachedWorkspaceConfig); + +this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions + .then(() => null, + error => { + return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target, value); + }); + +ret = __DEV__ ? + // $FlowFixMe: this type differs according to the env +vm.runInContext(source, ctx) +: a + +angular.module('AngularAppModule') + // Hello, I am comment. + .constant('API_URL', 'http://localhost:8080/api'); + +=====================================output===================================== +function f() { + return ( + observableFromSubscribeFunction() + // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is + // configurable. + .debounceTime(debounceInterval) + ); +} + +_.a(a) + /* very very very very very very very long such that it is longer than 80 columns */ + .a(); + +_.a( + a, +) /* very very very very very very very long such that it is longer than 80 columns */ + .a(); + +_.a( + a, +) /* very very very very very very very long such that it is longer than 80 columns */ + .a(); + +Something + // $FlowFixMe(>=0.41.0) + .getInstance(this.props.dao) + .getters(); + +// Warm-up first +measure().then(() => { + SomethingLong(); +}); + +measure() // Warm-up first + .then(() => { + SomethingLong(); + }); + +const configModel = this.baseConfigurationService + .getCache() + .consolidated // global/default values (do NOT modify) + .merge(this.cachedWorkspaceConfig); + +this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions + .then( + () => null, + (error) => { + return options.donotNotifyError + ? TPromise.wrapError(error) + : this.onError(error, target, value); + }, + ); + +ret = __DEV__ + ? // $FlowFixMe: this type differs according to the env + vm.runInContext(source, ctx) + : a; + +angular + .module("AngularAppModule") + // Hello, I am comment. + .constant("API_URL", "http://localhost:8080/api"); + +================================================================================ +`; + +exports[`complex-args.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +client.execute( + Post.selectAll() + .where(Post.id.eq(42)) + .where(Post.published.eq(true)) +); + +=====================================output===================================== +client.execute( + Post.selectAll().where(Post.id.eq(42)).where(Post.published.eq(true)), +); + +================================================================================ +`; + +exports[`computed.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +nock(/test/) + .matchHeader('Accept', 'application/json') + [httpMethodNock(method)]('/foo') + .reply(200, { + foo: 'bar', + }); + +=====================================output===================================== +nock(/test/) + .matchHeader("Accept", "application/json") + [httpMethodNock(method)]("/foo") + .reply(200, { + foo: "bar", + }); + +================================================================================ +`; + +exports[`computed-merge.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[].forEach(key => { + data[key]('foo') + .then(() => console.log('bar')) + .catch(() => console.log('baz')); +}); + +[].forEach(key => { + data('foo') + [key]('bar') + .then(() => console.log('bar')) + .catch(() => console.log('baz')); +}); + +window.Data[key]("foo") + .then(() => a) + .catch(() => b); + +=====================================output===================================== +[].forEach((key) => { + data[key]("foo") + .then(() => console.log("bar")) + .catch(() => console.log("baz")); +}); + +[].forEach((key) => { + data("foo") + [key]("bar") + .then(() => console.log("bar")) + .catch(() => console.log("baz")); +}); + +window.Data[key]("foo") + .then(() => a) + .catch(() => b); + +================================================================================ +`; + +exports[`conditional.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a ? b : c).d(); + +(a ? b : c).d().e(); + +(a ? b : c).d().e().f(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(this.defaultUser)) +.map(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(this.defaultUser)) +.map().filter(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(defaultUser)) +.map(); + +object[valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(defaultUser)] +.map(); + +=====================================output===================================== +(a ? b : c).d(); + +(a ? b : c).d().e(); + +(a ? b : c).d().e().f(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(this.defaultUser) +).map(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(this.defaultUser) +) + .map() + .filter(); + +(valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(defaultUser) +).map(); + +object[ + valid + ? helper.responseBody(this.currentUser) + : helper.responseBody(defaultUser) +].map(); + +================================================================================ +`; + +exports[`cypress.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +cy.get('option:first') + .should('be.selected') + .and('have.value', 'Metallica') + +cy.get(".ready") + .should("have.text", "FOO") + .should("have.css", "color", "#aaa"); + +=====================================output===================================== +cy.get("option:first").should("be.selected").and("have.value", "Metallica"); + +cy.get(".ready").should("have.text", "FOO").should("have.css", "color", "#aaa"); + +================================================================================ +`; + +exports[`d3.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +d3.select('body') + .append('circle') + .at({ width: 30, fill: '#f0f' }) + .st({ fontWeight: 600 }) + +const myScale = d3.scaleLinear() + .domain([1950, 1980]) + .range([0, width]) + +not.d3.select('body') + .append('circle') + .at({ width: 30, fill: '#f0f' }) + .st({ fontWeight: 600 }) + +not.d3.scaleLinear() + .domain([1950, 1980]) + .range([0, width]) + +=====================================output===================================== +d3.select("body") + .append("circle") + .at({ width: 30, fill: "#f0f" }) + .st({ fontWeight: 600 }); + +const myScale = d3.scaleLinear().domain([1950, 1980]).range([0, width]); + +not.d3 + .select("body") + .append("circle") + .at({ width: 30, fill: "#f0f" }) + .st({ fontWeight: 600 }); + +not.d3.scaleLinear().domain([1950, 1980]).range([0, width]); + +================================================================================ +`; + +exports[`first_long.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default function theFunction(action$, store) { + return action$.ofType(THE_ACTION).switchMap(action => Observable + .webSocket({ + url: THE_URL, + more: stuff(), + evenMore: stuff({ + value1: true, + value2: false, + value3: false + }) + }) + .filter(data => theFilter(data)) + .map(({ theType, ...data }) => theMap(theType, data)) + .retryWhen(errors => errors)); +} + +function f() { + return this._getWorker(workerOptions)({ + filePath, + hasteImplModulePath: this._options.hasteImplModulePath, + }).then( + metadata => { + // \`1\` for truthy values instead of \`true\` to save cache space. + fileMetadata[H.VISITED] = 1; + const metadataId = metadata.id; + const metadataModule = metadata.module; + if (metadataId && metadataModule) { + fileMetadata[H.ID] = metadataId; + setModule(metadataId, metadataModule); + } + fileMetadata[H.DEPENDENCIES] = metadata.dependencies || []; + } + ); +} + +=====================================output===================================== +export default function theFunction(action$, store) { + return action$.ofType(THE_ACTION).switchMap((action) => + Observable.webSocket({ + url: THE_URL, + more: stuff(), + evenMore: stuff({ + value1: true, + value2: false, + value3: false, + }), + }) + .filter((data) => theFilter(data)) + .map(({ theType, ...data }) => theMap(theType, data)) + .retryWhen((errors) => errors), + ); +} + +function f() { + return this._getWorker(workerOptions)({ + filePath, + hasteImplModulePath: this._options.hasteImplModulePath, + }).then((metadata) => { + // \`1\` for truthy values instead of \`true\` to save cache space. + fileMetadata[H.VISITED] = 1; + const metadataId = metadata.id; + const metadataModule = metadata.module; + if (metadataId && metadataModule) { + fileMetadata[H.ID] = metadataId; + setModule(metadataId, metadataModule); + } + fileMetadata[H.DEPENDENCIES] = metadata.dependencies || []; + }); +} + +================================================================================ +`; + +exports[`fluent-configuration.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +domain + .concept('Page') + .val('title', 'string') + .vals('widgets', 'Widget') +domain + .concept('Widget') + .val('title', 'string') + .val('color', 'Color') + .val('foo', 'Foo') + .val('bar', 'Bar') +domain + .concept('Widget') + .val('title', 'string') + .val('color', 'Color') +domain + .concept(CONCEPT_NAME) + .val('title') + .vals() + +=====================================output===================================== +domain.concept("Page").val("title", "string").vals("widgets", "Widget"); +domain + .concept("Widget") + .val("title", "string") + .val("color", "Color") + .val("foo", "Foo") + .val("bar", "Bar"); +domain.concept("Widget").val("title", "string").val("color", "Color"); +domain.concept(CONCEPT_NAME).val("title").vals(); + +================================================================================ +`; + +exports[`inline_merge.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +Object.keys( + availableLocales({ + test: true + }) +) +.forEach(locale => { + // ... +}); + +this.layoutPartsToHide = this.utils.hashset( + _.flatMap(this.visibilityHandlers, fn => fn()) + .concat(this.record.resolved_legacy_visrules) + .filter(Boolean) +); + +var jqxhr = $.ajax("example.php") + .done(doneFn) + .fail(failFn); + +=====================================output===================================== +Object.keys( + availableLocales({ + test: true, + }), +).forEach((locale) => { + // ... +}); + +this.layoutPartsToHide = this.utils.hashset( + _.flatMap(this.visibilityHandlers, (fn) => fn()) + .concat(this.record.resolved_legacy_visrules) + .filter(Boolean), +); + +var jqxhr = $.ajax("example.php").done(doneFn).fail(failFn); + +================================================================================ +`; + +exports[`issue-3594.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fetched = fetch("/foo"); +fetched + .then(response => response.json()) + .then(json => processThings(json.data.things)); + +let column = new Column(null, conn) + .table(data.table) + .json(data.column); + +=====================================output===================================== +const fetched = fetch("/foo"); +fetched + .then((response) => response.json()) + .then((json) => processThings(json.data.things)); + +let column = new Column(null, conn).table(data.table).json(data.column); + +================================================================================ +`; + +exports[`issue-3621.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const palindrome = str => { + const s = str.toLowerCase().replace(/[\\W_]/g, ''); + return s === s.split('').reverse().join(''); +}; + +const apiCurrencies = api().currencies().all() + +expect(cells.at(1).render().text()).toBe('link text1') +expect(cells.at(2).render().text()).toBe('link text2') +expect(cells.at(3).render().text()).toBe('link text3') +expect(cells.at(4).render().text()).toBe('link text4') + +=====================================output===================================== +const palindrome = (str) => { + const s = str.toLowerCase().replace(/[\\W_]/g, ""); + return s === s.split("").reverse().join(""); +}; + +const apiCurrencies = api().currencies().all(); + +expect(cells.at(1).render().text()).toBe("link text1"); +expect(cells.at(2).render().text()).toBe("link text2"); +expect(cells.at(3).render().text()).toBe("link text3"); +expect(cells.at(4).render().text()).toBe("link text4"); + +================================================================================ +`; + +exports[`issue-4125.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// examples from https://github.com/prettier/prettier/issues/4125 + +const sha256 = (data) => crypto.createHash("sha256").update(data).digest("hex"); + +req.checkBody('id').isInt().optional(); +req.checkBody('name').notEmpty().optional(); + +const x = moment().add(1, 'day').valueOf() + +// should stay on one line: +const y = obj.foo(1).foo(2).foo(3); +const z = obj.foo(-1).foo(import('2')).foo(!x).check(/[A-Z]/); + +// better on multiple lines: +somePromise.then(format).then((val)=>doSomething(val)).catch((err)=>handleError(err)) + +// you can still force multi-line chaining with a comment: +const sha256_2 = (data) => + crypto // breakme + .createHash("sha256") + .update(data) + .digest("hex"); + +// examples from https://github.com/prettier/prettier/pull/4765 + +if ($(el).attr("href").includes("/wiki/")) { +} + +if ($(el).attr("href").includes("/wiki/")) { + if ($(el).attr("xyz").includes("/whatever/")) { + if ($(el).attr("hello").includes("/world/")) { + } + } +} + +const parseNumbers = s => s.split('').map(Number).sort() + +function palindrome(a, b) { + return a.slice().reverse().join(',') === b.slice().sort().join(','); +} + +// examples from https://github.com/prettier/prettier/issues/1565 + +d3.select("body").selectAll("p").data([1, 2, 3]).enter().style("color", "white"); + +Object.keys(props).filter(key => key in own === false).reduce((a, key) => { + a[key] = props[key]; + return a; +}, {}) + +point().x(4).y(3).z(6).plot(); + +assert.equal(this.$().text().trim(), '1000'); + +something().then(() => doSomethingElse()).then(result => dontForgetThisAsWell(result)) + +db.branch( + db.table('users').filter({ email }).count(), + db.table('users').filter({ email: 'a@b.com' }).count(), + db.table('users').insert({ email }), + db.table('users').filter({ email }), +) + +sandbox.stub(config, 'get').withArgs('env').returns('dev') + +const date = moment.utc(userInput).hour(0).minute(0).second(0) + +fetchUser(id) + .then(fetchAccountForUser) + .catch(handleFetchError) + +fetchUser(id) // + .then(fetchAccountForUser) + .catch(handleFetchError) + +// examples from https://github.com/prettier/prettier/issues/3107 + +function HelloWorld() { + window.FooClient.setVars({ + locale: getFooLocale({ page }), + authorizationToken: data.token, + }).initVerify('foo_container'); + + fejax.ajax({ + url: '/verification/', + dataType: 'json', + }).then( + (data) => { + this.setState({ isLoading: false }); + this.initWidget(data); + }, + (data) => { + this.logImpression('foo_fetch_error', data); + Flash.error(I18n.t('offline_identity.foo_issue')); + }, + ); +} + +action$.ofType(ActionTypes.SEARCHED_USERS) + .map(action => action.payload.query) + .filter(q => !!q) + .switchMap(q => + Observable.timer(800) // debounce + .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) + .mergeMap(() => + Observable.merge( + Observable.of(replace(\`?q=\${q}\`)), + ajax + .getJSON(\`https://api.github.com/search/users?q=\${q}\`) + .map(res => res.items) + .map(receiveUsers) + ) + ) + ); + +window.FooClient + .setVars({ + locale: getFooLocale({ page }), + authorizationToken: data.token, + }) + .initVerify('foo_container'); + +it('gets triggered by mouseenter', () => { + const wrapper = shallow(<CalendarDay />); + wrapper.dive().find(Button).prop(); +}); + +const a1 = x.a(true).b(null).c(123) +const a2 = x.d('').e(\`\`).f(g) +const a3 = x.d('').e(\`\${123}\`).f(g) +const a4 = x.h(i.j).k(l()).m([n, o]) +class X { + y() { + const j = x.a(this).b(super.cde()).f(/g/).h(new i()).j(); + } +} + +// should break when call expressions get complex +x.a().b([c, [d, [e]]]).f() +x.a().b(c(d(e()))).f() +x.a().b(\`\${c(d())}\`).f() + +xyz.a().b().c(a(a(b(c(d().p).p).p).p)) + +var l = base + .replace(/^\\w*:\\/\\//, '') + .replace(/\\/$/, '') + .split('/').length + + +=====================================output===================================== +// examples from https://github.com/prettier/prettier/issues/4125 + +const sha256 = (data) => crypto.createHash("sha256").update(data).digest("hex"); + +req.checkBody("id").isInt().optional(); +req.checkBody("name").notEmpty().optional(); + +const x = moment().add(1, "day").valueOf(); + +// should stay on one line: +const y = obj.foo(1).foo(2).foo(3); +const z = obj.foo(-1).foo(import("2")).foo(!x).check(/[A-Z]/); + +// better on multiple lines: +somePromise + .then(format) + .then((val) => doSomething(val)) + .catch((err) => handleError(err)); + +// you can still force multi-line chaining with a comment: +const sha256_2 = (data) => + crypto // breakme + .createHash("sha256") + .update(data) + .digest("hex"); + +// examples from https://github.com/prettier/prettier/pull/4765 + +if ($(el).attr("href").includes("/wiki/")) { +} + +if ($(el).attr("href").includes("/wiki/")) { + if ($(el).attr("xyz").includes("/whatever/")) { + if ($(el).attr("hello").includes("/world/")) { + } + } +} + +const parseNumbers = (s) => s.split("").map(Number).sort(); + +function palindrome(a, b) { + return a.slice().reverse().join(",") === b.slice().sort().join(","); +} + +// examples from https://github.com/prettier/prettier/issues/1565 + +d3.select("body") + .selectAll("p") + .data([1, 2, 3]) + .enter() + .style("color", "white"); + +Object.keys(props) + .filter((key) => key in own === false) + .reduce((a, key) => { + a[key] = props[key]; + return a; + }, {}); + +point().x(4).y(3).z(6).plot(); + +assert.equal(this.$().text().trim(), "1000"); + +something() + .then(() => doSomethingElse()) + .then((result) => dontForgetThisAsWell(result)); + +db.branch( + db.table("users").filter({ email }).count(), + db.table("users").filter({ email: "a@b.com" }).count(), + db.table("users").insert({ email }), + db.table("users").filter({ email }), +); + +sandbox.stub(config, "get").withArgs("env").returns("dev"); + +const date = moment.utc(userInput).hour(0).minute(0).second(0); + +fetchUser(id).then(fetchAccountForUser).catch(handleFetchError); + +fetchUser(id) // + .then(fetchAccountForUser) + .catch(handleFetchError); + +// examples from https://github.com/prettier/prettier/issues/3107 + +function HelloWorld() { + window.FooClient.setVars({ + locale: getFooLocale({ page }), + authorizationToken: data.token, + }).initVerify("foo_container"); + + fejax + .ajax({ + url: "/verification/", + dataType: "json", + }) + .then( + (data) => { + this.setState({ isLoading: false }); + this.initWidget(data); + }, + (data) => { + this.logImpression("foo_fetch_error", data); + Flash.error(I18n.t("offline_identity.foo_issue")); + }, + ); +} + +action$ + .ofType(ActionTypes.SEARCHED_USERS) + .map((action) => action.payload.query) + .filter((q) => !!q) + .switchMap((q) => + Observable.timer(800) // debounce + .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) + .mergeMap(() => + Observable.merge( + Observable.of(replace(\`?q=\${q}\`)), + ajax + .getJSON(\`https://api.github.com/search/users?q=\${q}\`) + .map((res) => res.items) + .map(receiveUsers), + ), + ), + ); + +window.FooClient.setVars({ + locale: getFooLocale({ page }), + authorizationToken: data.token, +}).initVerify("foo_container"); + +it("gets triggered by mouseenter", () => { + const wrapper = shallow(<CalendarDay />); + wrapper.dive().find(Button).prop(); +}); + +const a1 = x.a(true).b(null).c(123); +const a2 = x.d("").e(\`\`).f(g); +const a3 = x.d("").e(\`\${123}\`).f(g); +const a4 = x.h(i.j).k(l()).m([n, o]); +class X { + y() { + const j = x.a(this).b(super.cde()).f(/g/).h(new i()).j(); + } +} + +// should break when call expressions get complex +x.a() + .b([c, [d, [e]]]) + .f(); +x.a() + .b(c(d(e()))) + .f(); +x.a() + .b(\`\${c(d())}\`) + .f(); + +xyz + .a() + .b() + .c(a(a(b(c(d().p).p).p).p)); + +var l = base + .replace(/^\\w*:\\/\\//, "") + .replace(/\\/$/, "") + .split("/").length; + +================================================================================ +`; + +exports[`issue-11298.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo1(/𠮟𠮟𠮟/).foo2(bar).foo3(baz); + +foo1(/叱叱叱/).foo2(bar).foo3(baz); + +=====================================output===================================== +foo1(/𠮟𠮟𠮟/) + .foo2(bar) + .foo3(baz); + +foo1(/叱叱叱/) + .foo2(bar) + .foo3(baz); + +================================================================================ +`; + +exports[`issue-17457.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +s.get(u)?.trigger({ triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123 }); + +=====================================output===================================== +s.get(u)?.trigger({ + triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123, +}); + +================================================================================ +`; + +exports[`logical.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const someLongVariableName = (idx( + this.props, + props => props.someLongPropertyName +) || [] +).map(edge => edge.node); + +(veryLongVeryLongVeryLong || e).map(tickets => + TicketRecord.createFromSomeLongString()); + +(veryLongVeryLongVeryLong || e).map(tickets => + TicketRecord.createFromSomeLongString()).filter(obj => !!obj); + +(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets => + TicketRecord.createFromSomeLongString()); + +(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets => + TicketRecord.createFromSomeLongString()).filter(obj => !!obj); + +=====================================output===================================== +const someLongVariableName = ( + idx(this.props, (props) => props.someLongPropertyName) || [] +).map((edge) => edge.node); + +(veryLongVeryLongVeryLong || e).map((tickets) => + TicketRecord.createFromSomeLongString(), +); + +(veryLongVeryLongVeryLong || e) + .map((tickets) => TicketRecord.createFromSomeLongString()) + .filter((obj) => !!obj); + +( + veryLongVeryLongVeryLong || + anotherVeryLongVeryLongVeryLong || + veryVeryVeryLongError +).map((tickets) => TicketRecord.createFromSomeLongString()); + +( + veryLongVeryLongVeryLong || + anotherVeryLongVeryLongVeryLong || + veryVeryVeryLongError +) + .map((tickets) => TicketRecord.createFromSomeLongString()) + .filter((obj) => !!obj); + +================================================================================ +`; + +exports[`multiple-members.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (testConfig.ENABLE_ONLINE_TESTS === "true") { + describe("POST /users/me/pet", function() { + it("saves pet", function() { + function assert(pet) { + expect(pet).to.have.property("OwnerAddress").that.deep.equals({ + AddressLine1: "Alexanderstrasse", + AddressLine2: "", + PostalCode: "10999", + Region: "Berlin", + City: "Berlin", + Country: "DE" + }); + } + }); + }); +} + +wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')().then(function() { + doSomething(); +}); + +wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument').then(function() { + doSomething(); +}); + +wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName', 'second argument that pushes this group past 80 characters')('argument').then(function() { + doSomething(); +}); + +wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument', 'second argument that pushes this group past 80 characters').then(function() { + doSomething(); +}); + +=====================================output===================================== +if (testConfig.ENABLE_ONLINE_TESTS === "true") { + describe("POST /users/me/pet", function () { + it("saves pet", function () { + function assert(pet) { + expect(pet).to.have.property("OwnerAddress").that.deep.equals({ + AddressLine1: "Alexanderstrasse", + AddressLine2: "", + PostalCode: "10999", + Region: "Berlin", + City: "Berlin", + Country: "DE", + }); + } + }); + }); +} + +wrapper + .find("SomewhatLongNodeName") + .prop("longPropFunctionName")() + .then(function () { + doSomething(); + }); + +wrapper + .find("SomewhatLongNodeName") + .prop("longPropFunctionName")("argument") + .then(function () { + doSomething(); + }); + +wrapper + .find("SomewhatLongNodeName") + .prop( + "longPropFunctionName", + "second argument that pushes this group past 80 characters", + )("argument") + .then(function () { + doSomething(); + }); + +wrapper + .find("SomewhatLongNodeName") + .prop("longPropFunctionName")( + "argument", + "second argument that pushes this group past 80 characters", + ) + .then(function () { + doSomething(); + }); + +================================================================================ +`; + +exports[`object-literal.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +of("test") + .pipe(throwIfEmpty()) + .subscribe({ + error(err) { + thrown = err; + } + }); + +of("test") + .pipe(throwIfEmpty()) + .subscribe({ + get foo() { + bar(); + } + }); + +=====================================output===================================== +of("test") + .pipe(throwIfEmpty()) + .subscribe({ + error(err) { + thrown = err; + }, + }); + +of("test") + .pipe(throwIfEmpty()) + .subscribe({ + get foo() { + bar(); + }, + }); + +================================================================================ +`; + +exports[`pr-7889.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Profile = view.with({ name: (state) => state.name }).as((props) => ( + <div> + <h1>Hello, {props.name}</h1> + </div> +)) + +const Profile2 = view.with({ name }).as((props) => ( + <div> + <h1>Hello, {props.name}</h1> + </div> +)) + +=====================================output===================================== +const Profile = view.with({ name: (state) => state.name }).as((props) => ( + <div> + <h1>Hello, {props.name}</h1> + </div> +)); + +const Profile2 = view.with({ name }).as((props) => ( + <div> + <h1>Hello, {props.name}</h1> + </div> +)); + +================================================================================ +`; + +exports[`short-names.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const svgJsFiles = fs + .readdirSync(svgDir) + .filter(f => svgJsFileExtRegex.test(f)) + .map(f => path.join(svgDir, f)); + +=====================================output===================================== +const svgJsFiles = fs + .readdirSync(svgDir) + .filter((f) => svgJsFileExtRegex.test(f)) + .map((f) => path.join(svgDir, f)); + +================================================================================ +`; + +exports[`simple-args.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fieldsToSend = _(["id", extra]).without("transition").uniq(); + +console.log(values.filter(isValid).map(extractId).slice(-5, -1)); + +=====================================output===================================== +const fieldsToSend = _(["id", extra]).without("transition").uniq(); + +console.log(values.filter(isValid).map(extractId).slice(-5, -1)); + +================================================================================ +`; + +exports[`square_0.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const version = someLongString + .split('jest version =') + .pop() + .split(EOL)[0] + .trim(); + +const component = find('.org-lclp-edit-copy-url-banner__link')[0] + .getAttribute('href') + .indexOf(this.landingPageLink); + +=====================================output===================================== +const version = someLongString + .split("jest version =") + .pop() + .split(EOL)[0] + .trim(); + +const component = find(".org-lclp-edit-copy-url-banner__link")[0] + .getAttribute("href") + .indexOf(this.landingPageLink); + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +method().then(x => x) + ["abc"](x => x) + [abc](x => x); + +({}.a().b()); +({}).a().b(); + +=====================================output===================================== +method() + .then((x) => x) + ["abc"]((x) => x) + [abc]((x) => x); + +({}).a().b(); +({}).a().b(); + +================================================================================ +`; + +exports[`this.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const sel = this.connections + .concat(this.activities.concat(this.operators)) + .filter(x => x.selected); + +=====================================output===================================== +const sel = this.connections + .concat(this.activities.concat(this.operators)) + .filter((x) => x.selected); + +================================================================================ +`; diff --git a/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0fb85afc2c6c..000000000000 --- a/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1547 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`13018.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo(_a).bar().leet(); -foo(-a).bar().leet(); -foo(+a).bar().leet(); -foo(~a).bar().leet(); -foo(++a).bar().leet(); -foo(--a).bar().leet(); -foo(a++).bar().leet(); -foo(a--).bar().leet(); - -=====================================output===================================== -foo(_a).bar().leet(); -foo(-a).bar().leet(); -foo(+a).bar().leet(); -foo(~a).bar().leet(); -foo(++a).bar().leet(); -foo(--a).bar().leet(); -foo(a++).bar().leet(); -foo(a--).bar().leet(); - -================================================================================ -`; - -exports[`bracket_0.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a() { - function b() { - queryThenMutateDOM( - () => { - title = SomeThing.call(root, 'someLongStringThatPushesThisTextReallyFar')[0]; - } - ); - } -} - -=====================================output===================================== -function a() { - function b() { - queryThenMutateDOM(() => { - title = SomeThing.call( - root, - "someLongStringThatPushesThisTextReallyFar" - )[0]; - }); - } -} - -================================================================================ -`; - -exports[`bracket_0-1.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const thingamabobMetaAlias = -path.scope.getProgramParent().path.get("body")[0].node; - -=====================================output===================================== -const thingamabobMetaAlias = path.scope - .getProgramParent() - .path.get("body")[0].node; - -================================================================================ -`; - -exports[`break-last-call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default store => { - return callApi(endpoint, schema).then( - response => next(actionWith({ - response, - type: successType - })), - error => next(actionWith({ - type: failureType, - error: error.message || 'Something bad happened' - })) - ) -} - -it('should group messages with same created time', () => { - expect( - groupMessages(messages).toJS(), - ).toEqual({ - '11/01/2017 13:36': [ - {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}, - {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:36'}, - ], - '09/01/2017 17:25': [ - {message: 'te', messageType: 'SMS', status: 'Unknown', created: '09/01/2017 17:25'}, - {message: 'te', messageType: 'Email', status: 'Unknown', created: '09/01/2017 17:25'}, - ], - '11/01/2017 13:33': [ - {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:33'}, - {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:33'}, - ], - '11/01/2017 13:37': [ - {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:37'}, - {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:37'}, - ], - }); -}); - -=====================================output===================================== -export default (store) => { - return callApi(endpoint, schema).then( - (response) => - next( - actionWith({ - response, - type: successType, - }) - ), - (error) => - next( - actionWith({ - type: failureType, - error: error.message || "Something bad happened", - }) - ) - ); -}; - -it("should group messages with same created time", () => { - expect(groupMessages(messages).toJS()).toEqual({ - "11/01/2017 13:36": [ - { - message: "test", - messageType: "SMS", - status: "Unknown", - created: "11/01/2017 13:36", - }, - { - message: "test", - messageType: "Email", - status: "Unknown", - created: "11/01/2017 13:36", - }, - ], - "09/01/2017 17:25": [ - { - message: "te", - messageType: "SMS", - status: "Unknown", - created: "09/01/2017 17:25", - }, - { - message: "te", - messageType: "Email", - status: "Unknown", - created: "09/01/2017 17:25", - }, - ], - "11/01/2017 13:33": [ - { - message: "test", - messageType: "SMS", - status: "Unknown", - created: "11/01/2017 13:33", - }, - { - message: "test", - messageType: "Email", - status: "Unknown", - created: "11/01/2017 13:33", - }, - ], - "11/01/2017 13:37": [ - { - message: "test", - messageType: "SMS", - status: "Unknown", - created: "11/01/2017 13:37", - }, - { - message: "test", - messageType: "Email", - status: "Unknown", - created: "11/01/2017 13:37", - }, - ], - }); -}); - -================================================================================ -`; - -exports[`break-last-member.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -SomeVeryLongUpperCaseConstant.someVeryLongCallExpression().some_very_long_member_expression -weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode - .childrenInAnArray[0]; -superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered; -superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered[0]; - -expect( - findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0].style.paddingRight -).toBe('1000px'); - -const { course, conflicts = [], index, scheduleId, studentId, something } = a.this.props; - -const { course2, conflicts2 = [], index2, scheduleId2, studentId2, something2 } = this.props; - -const { - updated, - author: { identifier: ownerId }, - location, - category: categories, -} = rawAd.entry; - -=====================================output===================================== -SomeVeryLongUpperCaseConstant.someVeryLongCallExpression() - .some_very_long_member_expression; -weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode - .childrenInAnArray[0]; -superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered; -superSupersuperSupersuperSupersuperSupersuperSuperLong - .exampleOfOrderOfGetterAndSetterReordered[0]; - -expect( - findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0] - .style.paddingRight -).toBe("1000px"); - -const { - course, - conflicts = [], - index, - scheduleId, - studentId, - something, -} = a.this.props; - -const { - course2, - conflicts2 = [], - index2, - scheduleId2, - studentId2, - something2, -} = this.props; - -const { - updated, - author: { identifier: ownerId }, - location, - category: categories, -} = rawAd.entry; - -================================================================================ -`; - -exports[`break-multiple.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -object.foo().bar().baz(); - -foo().bar().baz(); - -foo().bar.baz(); - -=====================================output===================================== -object.foo().bar().baz(); - -foo().bar().baz(); - -foo().bar.baz(); - -================================================================================ -`; - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - return observableFromSubscribeFunction() - // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is - // configurable. - .debounceTime(debounceInterval); -} - -_.a(a) - /* very very very very very very very long such that it is longer than 80 columns */ - .a() - -_.a( - a -)/* very very very very very very very long such that it is longer than 80 columns */ -.a(); - -_.a( - a -) /* very very very very very very very long such that it is longer than 80 columns */.a(); - -Something - // $FlowFixMe(>=0.41.0) - .getInstance(this.props.dao) - .getters() - -// Warm-up first -measure() - .then(() => { - SomethingLong(); - }); - -measure() // Warm-up first - .then(() => { - SomethingLong(); - }); - -const configModel = this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); - -this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions - .then(() => null, - error => { - return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target, value); - }); - -ret = __DEV__ ? - // $FlowFixMe: this type differs according to the env -vm.runInContext(source, ctx) -: a - -angular.module('AngularAppModule') - // Hello, I am comment. - .constant('API_URL', 'http://localhost:8080/api'); - -=====================================output===================================== -function f() { - return ( - observableFromSubscribeFunction() - // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is - // configurable. - .debounceTime(debounceInterval) - ); -} - -_.a(a) - /* very very very very very very very long such that it is longer than 80 columns */ - .a(); - -_.a( - a -) /* very very very very very very very long such that it is longer than 80 columns */ - .a(); - -_.a( - a -) /* very very very very very very very long such that it is longer than 80 columns */ - .a(); - -Something - // $FlowFixMe(>=0.41.0) - .getInstance(this.props.dao) - .getters(); - -// Warm-up first -measure().then(() => { - SomethingLong(); -}); - -measure() // Warm-up first - .then(() => { - SomethingLong(); - }); - -const configModel = this.baseConfigurationService - .getCache() - .consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); - -this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions - .then( - () => null, - (error) => { - return options.donotNotifyError - ? TPromise.wrapError(error) - : this.onError(error, target, value); - } - ); - -ret = __DEV__ - ? // $FlowFixMe: this type differs according to the env - vm.runInContext(source, ctx) - : a; - -angular - .module("AngularAppModule") - // Hello, I am comment. - .constant("API_URL", "http://localhost:8080/api"); - -================================================================================ -`; - -exports[`complex-args.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -client.execute( - Post.selectAll() - .where(Post.id.eq(42)) - .where(Post.published.eq(true)) -); - -=====================================output===================================== -client.execute( - Post.selectAll().where(Post.id.eq(42)).where(Post.published.eq(true)) -); - -================================================================================ -`; - -exports[`computed.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -nock(/test/) - .matchHeader('Accept', 'application/json') - [httpMethodNock(method)]('/foo') - .reply(200, { - foo: 'bar', - }); - -=====================================output===================================== -nock(/test/) - .matchHeader("Accept", "application/json") - [httpMethodNock(method)]("/foo") - .reply(200, { - foo: "bar", - }); - -================================================================================ -`; - -exports[`computed-merge.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -[].forEach(key => { - data[key]('foo') - .then(() => console.log('bar')) - .catch(() => console.log('baz')); -}); - -[].forEach(key => { - data('foo') - [key]('bar') - .then(() => console.log('bar')) - .catch(() => console.log('baz')); -}); - -window.Data[key]("foo") - .then(() => a) - .catch(() => b); - -=====================================output===================================== -[].forEach((key) => { - data[key]("foo") - .then(() => console.log("bar")) - .catch(() => console.log("baz")); -}); - -[].forEach((key) => { - data("foo") - [key]("bar") - .then(() => console.log("bar")) - .catch(() => console.log("baz")); -}); - -window.Data[key]("foo") - .then(() => a) - .catch(() => b); - -================================================================================ -`; - -exports[`conditional.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a ? b : c).d(); - -(a ? b : c).d().e(); - -(a ? b : c).d().e().f(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(this.defaultUser)) -.map(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(this.defaultUser)) -.map().filter(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(defaultUser)) -.map(); - -object[valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(defaultUser)] -.map(); - -=====================================output===================================== -(a ? b : c).d(); - -(a ? b : c).d().e(); - -(a ? b : c).d().e().f(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(this.defaultUser) -).map(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(this.defaultUser) -) - .map() - .filter(); - -(valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(defaultUser) -).map(); - -object[ - valid - ? helper.responseBody(this.currentUser) - : helper.responseBody(defaultUser) -].map(); - -================================================================================ -`; - -exports[`cypress.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -cy.get('option:first') - .should('be.selected') - .and('have.value', 'Metallica') - -cy.get(".ready") - .should("have.text", "FOO") - .should("have.css", "color", "#aaa"); - -=====================================output===================================== -cy.get("option:first").should("be.selected").and("have.value", "Metallica"); - -cy.get(".ready").should("have.text", "FOO").should("have.css", "color", "#aaa"); - -================================================================================ -`; - -exports[`d3.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -d3.select('body') - .append('circle') - .at({ width: 30, fill: '#f0f' }) - .st({ fontWeight: 600 }) - -const myScale = d3.scaleLinear() - .domain([1950, 1980]) - .range([0, width]) - -not.d3.select('body') - .append('circle') - .at({ width: 30, fill: '#f0f' }) - .st({ fontWeight: 600 }) - -not.d3.scaleLinear() - .domain([1950, 1980]) - .range([0, width]) - -=====================================output===================================== -d3.select("body") - .append("circle") - .at({ width: 30, fill: "#f0f" }) - .st({ fontWeight: 600 }); - -const myScale = d3.scaleLinear().domain([1950, 1980]).range([0, width]); - -not.d3 - .select("body") - .append("circle") - .at({ width: 30, fill: "#f0f" }) - .st({ fontWeight: 600 }); - -not.d3.scaleLinear().domain([1950, 1980]).range([0, width]); - -================================================================================ -`; - -exports[`first_long.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default function theFunction(action$, store) { - return action$.ofType(THE_ACTION).switchMap(action => Observable - .webSocket({ - url: THE_URL, - more: stuff(), - evenMore: stuff({ - value1: true, - value2: false, - value3: false - }) - }) - .filter(data => theFilter(data)) - .map(({ theType, ...data }) => theMap(theType, data)) - .retryWhen(errors => errors)); -} - -function f() { - return this._getWorker(workerOptions)({ - filePath, - hasteImplModulePath: this._options.hasteImplModulePath, - }).then( - metadata => { - // \`1\` for truthy values instead of \`true\` to save cache space. - fileMetadata[H.VISITED] = 1; - const metadataId = metadata.id; - const metadataModule = metadata.module; - if (metadataId && metadataModule) { - fileMetadata[H.ID] = metadataId; - setModule(metadataId, metadataModule); - } - fileMetadata[H.DEPENDENCIES] = metadata.dependencies || []; - } - ); -} - -=====================================output===================================== -export default function theFunction(action$, store) { - return action$.ofType(THE_ACTION).switchMap((action) => - Observable.webSocket({ - url: THE_URL, - more: stuff(), - evenMore: stuff({ - value1: true, - value2: false, - value3: false, - }), - }) - .filter((data) => theFilter(data)) - .map(({ theType, ...data }) => theMap(theType, data)) - .retryWhen((errors) => errors) - ); -} - -function f() { - return this._getWorker(workerOptions)({ - filePath, - hasteImplModulePath: this._options.hasteImplModulePath, - }).then((metadata) => { - // \`1\` for truthy values instead of \`true\` to save cache space. - fileMetadata[H.VISITED] = 1; - const metadataId = metadata.id; - const metadataModule = metadata.module; - if (metadataId && metadataModule) { - fileMetadata[H.ID] = metadataId; - setModule(metadataId, metadataModule); - } - fileMetadata[H.DEPENDENCIES] = metadata.dependencies || []; - }); -} - -================================================================================ -`; - -exports[`fluent-configuration.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -domain - .concept('Page') - .val('title', 'string') - .vals('widgets', 'Widget') -domain - .concept('Widget') - .val('title', 'string') - .val('color', 'Color') - .val('foo', 'Foo') - .val('bar', 'Bar') -domain - .concept('Widget') - .val('title', 'string') - .val('color', 'Color') -domain - .concept(CONCEPT_NAME) - .val('title') - .vals() - -=====================================output===================================== -domain.concept("Page").val("title", "string").vals("widgets", "Widget"); -domain - .concept("Widget") - .val("title", "string") - .val("color", "Color") - .val("foo", "Foo") - .val("bar", "Bar"); -domain.concept("Widget").val("title", "string").val("color", "Color"); -domain.concept(CONCEPT_NAME).val("title").vals(); - -================================================================================ -`; - -exports[`inline_merge.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -Object.keys( - availableLocales({ - test: true - }) -) -.forEach(locale => { - // ... -}); - -this.layoutPartsToHide = this.utils.hashset( - _.flatMap(this.visibilityHandlers, fn => fn()) - .concat(this.record.resolved_legacy_visrules) - .filter(Boolean) -); - -var jqxhr = $.ajax("example.php") - .done(doneFn) - .fail(failFn); - -=====================================output===================================== -Object.keys( - availableLocales({ - test: true, - }) -).forEach((locale) => { - // ... -}); - -this.layoutPartsToHide = this.utils.hashset( - _.flatMap(this.visibilityHandlers, (fn) => fn()) - .concat(this.record.resolved_legacy_visrules) - .filter(Boolean) -); - -var jqxhr = $.ajax("example.php").done(doneFn).fail(failFn); - -================================================================================ -`; - -exports[`issue-3594.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fetched = fetch("/foo"); -fetched - .then(response => response.json()) - .then(json => processThings(json.data.things)); - -let column = new Column(null, conn) - .table(data.table) - .json(data.column); - -=====================================output===================================== -const fetched = fetch("/foo"); -fetched - .then((response) => response.json()) - .then((json) => processThings(json.data.things)); - -let column = new Column(null, conn).table(data.table).json(data.column); - -================================================================================ -`; - -exports[`issue-3621.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const palindrome = str => { - const s = str.toLowerCase().replace(/[\\W_]/g, ''); - return s === s.split('').reverse().join(''); -}; - -const apiCurrencies = api().currencies().all() - -expect(cells.at(1).render().text()).toBe('link text1') -expect(cells.at(2).render().text()).toBe('link text2') -expect(cells.at(3).render().text()).toBe('link text3') -expect(cells.at(4).render().text()).toBe('link text4') - -=====================================output===================================== -const palindrome = (str) => { - const s = str.toLowerCase().replace(/[\\W_]/g, ""); - return s === s.split("").reverse().join(""); -}; - -const apiCurrencies = api().currencies().all(); - -expect(cells.at(1).render().text()).toBe("link text1"); -expect(cells.at(2).render().text()).toBe("link text2"); -expect(cells.at(3).render().text()).toBe("link text3"); -expect(cells.at(4).render().text()).toBe("link text4"); - -================================================================================ -`; - -exports[`issue-4125.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// examples from https://github.com/prettier/prettier/issues/4125 - -const sha256 = (data) => crypto.createHash("sha256").update(data).digest("hex"); - -req.checkBody('id').isInt().optional(); -req.checkBody('name').notEmpty().optional(); - -const x = moment().add(1, 'day').valueOf() - -// should stay on one line: -const y = obj.foo(1).foo(2).foo(3); -const z = obj.foo(-1).foo(import('2')).foo(!x).check(/[A-Z]/); - -// better on multiple lines: -somePromise.then(format).then((val)=>doSomething(val)).catch((err)=>handleError(err)) - -// you can still force multi-line chaining with a comment: -const sha256_2 = (data) => - crypto // breakme - .createHash("sha256") - .update(data) - .digest("hex"); - -// examples from https://github.com/prettier/prettier/pull/4765 - -if ($(el).attr("href").includes("/wiki/")) { -} - -if ($(el).attr("href").includes("/wiki/")) { - if ($(el).attr("xyz").includes("/whatever/")) { - if ($(el).attr("hello").includes("/world/")) { - } - } -} - -const parseNumbers = s => s.split('').map(Number).sort() - -function palindrome(a, b) { - return a.slice().reverse().join(',') === b.slice().sort().join(','); -} - -// examples from https://github.com/prettier/prettier/issues/1565 - -d3.select("body").selectAll("p").data([1, 2, 3]).enter().style("color", "white"); - -Object.keys(props).filter(key => key in own === false).reduce((a, key) => { - a[key] = props[key]; - return a; -}, {}) - -point().x(4).y(3).z(6).plot(); - -assert.equal(this.$().text().trim(), '1000'); - -something().then(() => doSomethingElse()).then(result => dontForgetThisAsWell(result)) - -db.branch( - db.table('users').filter({ email }).count(), - db.table('users').filter({ email: 'a@b.com' }).count(), - db.table('users').insert({ email }), - db.table('users').filter({ email }), -) - -sandbox.stub(config, 'get').withArgs('env').returns('dev') - -const date = moment.utc(userInput).hour(0).minute(0).second(0) - -fetchUser(id) - .then(fetchAccountForUser) - .catch(handleFetchError) - -fetchUser(id) // - .then(fetchAccountForUser) - .catch(handleFetchError) - -// examples from https://github.com/prettier/prettier/issues/3107 - -function HelloWorld() { - window.FooClient.setVars({ - locale: getFooLocale({ page }), - authorizationToken: data.token, - }).initVerify('foo_container'); - - fejax.ajax({ - url: '/verification/', - dataType: 'json', - }).then( - (data) => { - this.setState({ isLoading: false }); - this.initWidget(data); - }, - (data) => { - this.logImpression('foo_fetch_error', data); - Flash.error(I18n.t('offline_identity.foo_issue')); - }, - ); -} - -action$.ofType(ActionTypes.SEARCHED_USERS) - .map(action => action.payload.query) - .filter(q => !!q) - .switchMap(q => - Observable.timer(800) // debounce - .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) - .mergeMap(() => - Observable.merge( - Observable.of(replace(\`?q=\${q}\`)), - ajax - .getJSON(\`https://api.github.com/search/users?q=\${q}\`) - .map(res => res.items) - .map(receiveUsers) - ) - ) - ); - -window.FooClient - .setVars({ - locale: getFooLocale({ page }), - authorizationToken: data.token, - }) - .initVerify('foo_container'); - -it('gets triggered by mouseenter', () => { - const wrapper = shallow(<CalendarDay />); - wrapper.dive().find(Button).prop(); -}); - -const a1 = x.a(true).b(null).c(123) -const a2 = x.d('').e(\`\`).f(g) -const a3 = x.d('').e(\`\${123}\`).f(g) -const a4 = x.h(i.j).k(l()).m([n, o]) -class X { - y() { - const j = x.a(this).b(super.cde()).f(/g/).h(new i()).j(); - } -} - -// should break when call expressions get complex -x.a().b([c, [d, [e]]]).f() -x.a().b(c(d(e()))).f() -x.a().b(\`\${c(d())}\`).f() - -xyz.a().b().c(a(a(b(c(d().p).p).p).p)) - -var l = base - .replace(/^\\w*:\\/\\//, '') - .replace(/\\/$/, '') - .split('/').length - - -=====================================output===================================== -// examples from https://github.com/prettier/prettier/issues/4125 - -const sha256 = (data) => crypto.createHash("sha256").update(data).digest("hex"); - -req.checkBody("id").isInt().optional(); -req.checkBody("name").notEmpty().optional(); - -const x = moment().add(1, "day").valueOf(); - -// should stay on one line: -const y = obj.foo(1).foo(2).foo(3); -const z = obj.foo(-1).foo(import("2")).foo(!x).check(/[A-Z]/); - -// better on multiple lines: -somePromise - .then(format) - .then((val) => doSomething(val)) - .catch((err) => handleError(err)); - -// you can still force multi-line chaining with a comment: -const sha256_2 = (data) => - crypto // breakme - .createHash("sha256") - .update(data) - .digest("hex"); - -// examples from https://github.com/prettier/prettier/pull/4765 - -if ($(el).attr("href").includes("/wiki/")) { -} - -if ($(el).attr("href").includes("/wiki/")) { - if ($(el).attr("xyz").includes("/whatever/")) { - if ($(el).attr("hello").includes("/world/")) { - } - } -} - -const parseNumbers = (s) => s.split("").map(Number).sort(); - -function palindrome(a, b) { - return a.slice().reverse().join(",") === b.slice().sort().join(","); -} - -// examples from https://github.com/prettier/prettier/issues/1565 - -d3.select("body") - .selectAll("p") - .data([1, 2, 3]) - .enter() - .style("color", "white"); - -Object.keys(props) - .filter((key) => key in own === false) - .reduce((a, key) => { - a[key] = props[key]; - return a; - }, {}); - -point().x(4).y(3).z(6).plot(); - -assert.equal(this.$().text().trim(), "1000"); - -something() - .then(() => doSomethingElse()) - .then((result) => dontForgetThisAsWell(result)); - -db.branch( - db.table("users").filter({ email }).count(), - db.table("users").filter({ email: "a@b.com" }).count(), - db.table("users").insert({ email }), - db.table("users").filter({ email }) -); - -sandbox.stub(config, "get").withArgs("env").returns("dev"); - -const date = moment.utc(userInput).hour(0).minute(0).second(0); - -fetchUser(id).then(fetchAccountForUser).catch(handleFetchError); - -fetchUser(id) // - .then(fetchAccountForUser) - .catch(handleFetchError); - -// examples from https://github.com/prettier/prettier/issues/3107 - -function HelloWorld() { - window.FooClient.setVars({ - locale: getFooLocale({ page }), - authorizationToken: data.token, - }).initVerify("foo_container"); - - fejax - .ajax({ - url: "/verification/", - dataType: "json", - }) - .then( - (data) => { - this.setState({ isLoading: false }); - this.initWidget(data); - }, - (data) => { - this.logImpression("foo_fetch_error", data); - Flash.error(I18n.t("offline_identity.foo_issue")); - } - ); -} - -action$ - .ofType(ActionTypes.SEARCHED_USERS) - .map((action) => action.payload.query) - .filter((q) => !!q) - .switchMap((q) => - Observable.timer(800) // debounce - .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) - .mergeMap(() => - Observable.merge( - Observable.of(replace(\`?q=\${q}\`)), - ajax - .getJSON(\`https://api.github.com/search/users?q=\${q}\`) - .map((res) => res.items) - .map(receiveUsers) - ) - ) - ); - -window.FooClient.setVars({ - locale: getFooLocale({ page }), - authorizationToken: data.token, -}).initVerify("foo_container"); - -it("gets triggered by mouseenter", () => { - const wrapper = shallow(<CalendarDay />); - wrapper.dive().find(Button).prop(); -}); - -const a1 = x.a(true).b(null).c(123); -const a2 = x.d("").e(\`\`).f(g); -const a3 = x.d("").e(\`\${123}\`).f(g); -const a4 = x.h(i.j).k(l()).m([n, o]); -class X { - y() { - const j = x.a(this).b(super.cde()).f(/g/).h(new i()).j(); - } -} - -// should break when call expressions get complex -x.a() - .b([c, [d, [e]]]) - .f(); -x.a() - .b(c(d(e()))) - .f(); -x.a() - .b(\`\${c(d())}\`) - .f(); - -xyz - .a() - .b() - .c(a(a(b(c(d().p).p).p).p)); - -var l = base - .replace(/^\\w*:\\/\\//, "") - .replace(/\\/$/, "") - .split("/").length; - -================================================================================ -`; - -exports[`issue-11298.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo1(/𠮟𠮟𠮟/).foo2(bar).foo3(baz); - -foo1(/叱叱叱/).foo2(bar).foo3(baz); - -=====================================output===================================== -foo1(/𠮟𠮟𠮟/) - .foo2(bar) - .foo3(baz); - -foo1(/叱叱叱/) - .foo2(bar) - .foo3(baz); - -================================================================================ -`; - -exports[`logical.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const someLongVariableName = (idx( - this.props, - props => props.someLongPropertyName -) || [] -).map(edge => edge.node); - -(veryLongVeryLongVeryLong || e).map(tickets => - TicketRecord.createFromSomeLongString()); - -(veryLongVeryLongVeryLong || e).map(tickets => - TicketRecord.createFromSomeLongString()).filter(obj => !!obj); - -(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets => - TicketRecord.createFromSomeLongString()); - -(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets => - TicketRecord.createFromSomeLongString()).filter(obj => !!obj); - -=====================================output===================================== -const someLongVariableName = ( - idx(this.props, (props) => props.someLongPropertyName) || [] -).map((edge) => edge.node); - -(veryLongVeryLongVeryLong || e).map((tickets) => - TicketRecord.createFromSomeLongString() -); - -(veryLongVeryLongVeryLong || e) - .map((tickets) => TicketRecord.createFromSomeLongString()) - .filter((obj) => !!obj); - -( - veryLongVeryLongVeryLong || - anotherVeryLongVeryLongVeryLong || - veryVeryVeryLongError -).map((tickets) => TicketRecord.createFromSomeLongString()); - -( - veryLongVeryLongVeryLong || - anotherVeryLongVeryLongVeryLong || - veryVeryVeryLongError -) - .map((tickets) => TicketRecord.createFromSomeLongString()) - .filter((obj) => !!obj); - -================================================================================ -`; - -exports[`multiple-members.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (testConfig.ENABLE_ONLINE_TESTS === "true") { - describe("POST /users/me/pet", function() { - it("saves pet", function() { - function assert(pet) { - expect(pet).to.have.property("OwnerAddress").that.deep.equals({ - AddressLine1: "Alexanderstrasse", - AddressLine2: "", - PostalCode: "10999", - Region: "Berlin", - City: "Berlin", - Country: "DE" - }); - } - }); - }); -} - -wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')().then(function() { - doSomething(); -}); - -wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument').then(function() { - doSomething(); -}); - -wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName', 'second argument that pushes this group past 80 characters')('argument').then(function() { - doSomething(); -}); - -wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument', 'second argument that pushes this group past 80 characters').then(function() { - doSomething(); -}); - -=====================================output===================================== -if (testConfig.ENABLE_ONLINE_TESTS === "true") { - describe("POST /users/me/pet", function () { - it("saves pet", function () { - function assert(pet) { - expect(pet).to.have.property("OwnerAddress").that.deep.equals({ - AddressLine1: "Alexanderstrasse", - AddressLine2: "", - PostalCode: "10999", - Region: "Berlin", - City: "Berlin", - Country: "DE", - }); - } - }); - }); -} - -wrapper - .find("SomewhatLongNodeName") - .prop("longPropFunctionName")() - .then(function () { - doSomething(); - }); - -wrapper - .find("SomewhatLongNodeName") - .prop("longPropFunctionName")("argument") - .then(function () { - doSomething(); - }); - -wrapper - .find("SomewhatLongNodeName") - .prop( - "longPropFunctionName", - "second argument that pushes this group past 80 characters" - )("argument") - .then(function () { - doSomething(); - }); - -wrapper - .find("SomewhatLongNodeName") - .prop("longPropFunctionName")( - "argument", - "second argument that pushes this group past 80 characters" - ) - .then(function () { - doSomething(); - }); - -================================================================================ -`; - -exports[`object-literal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -of("test") - .pipe(throwIfEmpty()) - .subscribe({ - error(err) { - thrown = err; - } - }); - -of("test") - .pipe(throwIfEmpty()) - .subscribe({ - get foo() { - bar(); - } - }); - -=====================================output===================================== -of("test") - .pipe(throwIfEmpty()) - .subscribe({ - error(err) { - thrown = err; - }, - }); - -of("test") - .pipe(throwIfEmpty()) - .subscribe({ - get foo() { - bar(); - }, - }); - -================================================================================ -`; - -exports[`pr-7889.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Profile = view.with({ name: (state) => state.name }).as((props) => ( - <div> - <h1>Hello, {props.name}</h1> - </div> -)) - -const Profile2 = view.with({ name }).as((props) => ( - <div> - <h1>Hello, {props.name}</h1> - </div> -)) - -=====================================output===================================== -const Profile = view.with({ name: (state) => state.name }).as((props) => ( - <div> - <h1>Hello, {props.name}</h1> - </div> -)); - -const Profile2 = view.with({ name }).as((props) => ( - <div> - <h1>Hello, {props.name}</h1> - </div> -)); - -================================================================================ -`; - -exports[`short-names.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const svgJsFiles = fs - .readdirSync(svgDir) - .filter(f => svgJsFileExtRegex.test(f)) - .map(f => path.join(svgDir, f)); - -=====================================output===================================== -const svgJsFiles = fs - .readdirSync(svgDir) - .filter((f) => svgJsFileExtRegex.test(f)) - .map((f) => path.join(svgDir, f)); - -================================================================================ -`; - -exports[`simple-args.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fieldsToSend = _(["id", extra]).without("transition").uniq(); - -console.log(values.filter(isValid).map(extractId).slice(-5, -1)); - -=====================================output===================================== -const fieldsToSend = _(["id", extra]).without("transition").uniq(); - -console.log(values.filter(isValid).map(extractId).slice(-5, -1)); - -================================================================================ -`; - -exports[`square_0.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const version = someLongString - .split('jest version =') - .pop() - .split(EOL)[0] - .trim(); - -const component = find('.org-lclp-edit-copy-url-banner__link')[0] - .getAttribute('href') - .indexOf(this.landingPageLink); - -=====================================output===================================== -const version = someLongString - .split("jest version =") - .pop() - .split(EOL)[0] - .trim(); - -const component = find(".org-lclp-edit-copy-url-banner__link")[0] - .getAttribute("href") - .indexOf(this.landingPageLink); - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -method().then(x => x) - ["abc"](x => x) - [abc](x => x); - -({}.a().b()); -({}).a().b(); - -=====================================output===================================== -method() - .then((x) => x) - ["abc"]((x) => x) - [abc]((x) => x); - -({}).a().b(); -({}).a().b(); - -================================================================================ -`; - -exports[`this.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const sel = this.connections - .concat(this.activities.concat(this.operators)) - .filter(x => x.selected); - -=====================================output===================================== -const sel = this.connections - .concat(this.activities.concat(this.operators)) - .filter((x) => x.selected); - -================================================================================ -`; diff --git a/tests/format/js/method-chain/array-and-object.js b/tests/format/js/method-chain/array-and-object.js new file mode 100644 index 000000000000..8aeb9cf04f00 --- /dev/null +++ b/tests/format/js/method-chain/array-and-object.js @@ -0,0 +1,3 @@ +foo.a().b().c([n, o]) + +foo.a().b().c({n, o}) diff --git a/tests/format/js/method-chain/assignment-lhs.js b/tests/format/js/method-chain/assignment-lhs.js new file mode 100644 index 000000000000..ddba03a2758f --- /dev/null +++ b/tests/format/js/method-chain/assignment-lhs.js @@ -0,0 +1,3 @@ +document.querySelector("#output-abcdef").textContent = `metaKey pressed? ${e.metaKey}`; + +document.querySelector("p").textContent = `Shader program did not link successfully. Error log: ${linkErrLog}`; diff --git a/tests/format/js/method-chain/format.test.js b/tests/format/js/method-chain/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/method-chain/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/method-chain/issue-17457.js b/tests/format/js/method-chain/issue-17457.js new file mode 100644 index 000000000000..a7cf0457bd3a --- /dev/null +++ b/tests/format/js/method-chain/issue-17457.js @@ -0,0 +1 @@ +s.get(u)?.trigger({ triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123 }); diff --git a/tests/format/js/method-chain/jsfmt.spec.js b/tests/format/js/method-chain/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/method-chain/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/method-chain/print-width-120/__snapshots__/format.test.js.snap b/tests/format/js/method-chain/print-width-120/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..59221dd96148 --- /dev/null +++ b/tests/format/js/method-chain/print-width-120/__snapshots__/format.test.js.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`constructor.js - {"printWidth":120} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 120 + | printWidth +=====================================input====================================== +const writer = new BufferStackItem( + new BinaryWriter() + .writeUInt8(StackItemType.ByteArray) + .writeVarBytesLE(Buffer.alloc(10, 1)) + .toBuffer(), +); + +const writer2 = new BufferStackItem( + new Extra.BinaryWriter() + .writeUInt8(StackItemType.ByteArray) + .writeVarBytesLE(Buffer.alloc(10, 1)) + .toBuffer(), +); + +=====================================output===================================== +const writer = new BufferStackItem( + new BinaryWriter().writeUInt8(StackItemType.ByteArray).writeVarBytesLE(Buffer.alloc(10, 1)).toBuffer(), +); + +const writer2 = new BufferStackItem( + new Extra.BinaryWriter().writeUInt8(StackItemType.ByteArray).writeVarBytesLE(Buffer.alloc(10, 1)).toBuffer(), +); + +================================================================================ +`; + +exports[`issue-7884.js - {"printWidth":120} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 120 + | printWidth +=====================================input====================================== + cy.get(".ready") + .should("have.text", "READY") + .should("have.css", "background-color", "rgb(136, 228, 229)"); + cy.get(".pending") + .should("have.text", "PENDING") + .should("have.css", "background-color", "rgb(253, 212, 90)"); + cy.get(".live") + .should("have.text", "LIVE") + .should("have.css", "background-color", "rgb(175, 221, 255)"); + cy.get(".draft") + .should("have.text", "DRAFT") + .should("have.css", "background-color", "rgb(255, 181, 181)"); + cy.get(".scheduled") + .should("have.text", "SCHEDULED") + .should("have.css", "background-color", "rgb(222, 222, 222)"); + +=====================================output===================================== +cy.get(".ready").should("have.text", "READY").should("have.css", "background-color", "rgb(136, 228, 229)"); +cy.get(".pending").should("have.text", "PENDING").should("have.css", "background-color", "rgb(253, 212, 90)"); +cy.get(".live").should("have.text", "LIVE").should("have.css", "background-color", "rgb(175, 221, 255)"); +cy.get(".draft").should("have.text", "DRAFT").should("have.css", "background-color", "rgb(255, 181, 181)"); +cy.get(".scheduled").should("have.text", "SCHEDULED").should("have.css", "background-color", "rgb(222, 222, 222)"); + +================================================================================ +`; diff --git a/tests/format/js/method-chain/print-width-120/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/method-chain/print-width-120/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index df75f1f81c50..000000000000 --- a/tests/format/js/method-chain/print-width-120/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,65 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`constructor.js - {"printWidth":120} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 120 - | printWidth -=====================================input====================================== -const writer = new BufferStackItem( - new BinaryWriter() - .writeUInt8(StackItemType.ByteArray) - .writeVarBytesLE(Buffer.alloc(10, 1)) - .toBuffer(), -); - -const writer2 = new BufferStackItem( - new Extra.BinaryWriter() - .writeUInt8(StackItemType.ByteArray) - .writeVarBytesLE(Buffer.alloc(10, 1)) - .toBuffer(), -); - -=====================================output===================================== -const writer = new BufferStackItem( - new BinaryWriter().writeUInt8(StackItemType.ByteArray).writeVarBytesLE(Buffer.alloc(10, 1)).toBuffer() -); - -const writer2 = new BufferStackItem( - new Extra.BinaryWriter().writeUInt8(StackItemType.ByteArray).writeVarBytesLE(Buffer.alloc(10, 1)).toBuffer() -); - -================================================================================ -`; - -exports[`issue-7884.js - {"printWidth":120} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 120 - | printWidth -=====================================input====================================== - cy.get(".ready") - .should("have.text", "READY") - .should("have.css", "background-color", "rgb(136, 228, 229)"); - cy.get(".pending") - .should("have.text", "PENDING") - .should("have.css", "background-color", "rgb(253, 212, 90)"); - cy.get(".live") - .should("have.text", "LIVE") - .should("have.css", "background-color", "rgb(175, 221, 255)"); - cy.get(".draft") - .should("have.text", "DRAFT") - .should("have.css", "background-color", "rgb(255, 181, 181)"); - cy.get(".scheduled") - .should("have.text", "SCHEDULED") - .should("have.css", "background-color", "rgb(222, 222, 222)"); - -=====================================output===================================== -cy.get(".ready").should("have.text", "READY").should("have.css", "background-color", "rgb(136, 228, 229)"); -cy.get(".pending").should("have.text", "PENDING").should("have.css", "background-color", "rgb(253, 212, 90)"); -cy.get(".live").should("have.text", "LIVE").should("have.css", "background-color", "rgb(175, 221, 255)"); -cy.get(".draft").should("have.text", "DRAFT").should("have.css", "background-color", "rgb(255, 181, 181)"); -cy.get(".scheduled").should("have.text", "SCHEDULED").should("have.css", "background-color", "rgb(222, 222, 222)"); - -================================================================================ -`; diff --git a/tests/format/js/method-chain/print-width-120/format.test.js b/tests/format/js/method-chain/print-width-120/format.test.js new file mode 100644 index 000000000000..0b41995b6a6b --- /dev/null +++ b/tests/format/js/method-chain/print-width-120/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + printWidth: 120, +}); diff --git a/tests/format/js/method-chain/print-width-120/jsfmt.spec.js b/tests/format/js/method-chain/print-width-120/jsfmt.spec.js deleted file mode 100644 index 45e42ddd0202..000000000000 --- a/tests/format/js/method-chain/print-width-120/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { printWidth: 120 }); diff --git a/tests/format/js/module-blocks/__snapshots__/format.test.js.snap b/tests/format/js/module-blocks/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..034ae7ac98b0 --- /dev/null +++ b/tests/format/js/module-blocks/__snapshots__/format.test.js.snap @@ -0,0 +1,297 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`comments.js [acorn] format 1`] = ` +"Unexpected token (1:32) +> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ + | ^ + 2 | /*A4*/ + 3 | export const foo = "foo"; + 4 | export { foo }; /*A5*/ +Cause: Unexpected token (1:31)" +`; + +exports[`comments.js [espree] format 1`] = ` +"Unexpected token { (1:32) +> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ + | ^ + 2 | /*A4*/ + 3 | export const foo = "foo"; + 4 | export { foo }; /*A5*/ +Cause: Unexpected token {" +`; + +exports[`comments.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:32) +> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ + | ^ + 2 | /*A4*/ + 3 | export const foo = "foo"; + 4 | export { foo }; /*A5*/ +Cause: [1:31-1:32]: Unexpected token: '{'" +`; + +exports[`comments.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:24) +> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ + | ^ + 2 | /*A4*/ + 3 | export const foo = "foo"; + 4 | export { foo }; /*A5*/" +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const m = /*A1*/ module /*A2*/ { /*A3*/ + /*A4*/ + export const foo = "foo"; + export { foo }; /*A5*/ + /*A6*/ +}/*A7*/;/*A8*/ + +const m2 = module/* B1 */{ + /* B2 */ +}; + +=====================================output===================================== +const m = /*A1*/ module /*A2*/ { + /*A3*/ + /*A4*/ + export const foo = "foo"; + export { foo }; /*A5*/ + /*A6*/ +}; /*A7*/ /*A8*/ + +const m2 = module /* B1 */ { + /* B2 */ +}; + +================================================================================ +`; + +exports[`module-blocks.js [acorn] format 1`] = ` +"Unexpected token (1:8) +> 1 | module { await 3 }; + | ^ + 2 | + 3 | class B { + 4 | #p() { +Cause: Unexpected token (1:7)" +`; + +exports[`module-blocks.js [espree] format 1`] = ` +"Unexpected token { (1:8) +> 1 | module { await 3 }; + | ^ + 2 | + 3 | class B { + 4 | #p() { +Cause: Unexpected token {" +`; + +exports[`module-blocks.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:8) +> 1 | module { await 3 }; + | ^ + 2 | + 3 | class B { + 4 | #p() { +Cause: [1:7-1:8]: Unexpected token: '{'" +`; + +exports[`module-blocks.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7) +> 1 | module { await 3 }; + | ^ + 2 | + 3 | class B { + 4 | #p() {" +`; + +exports[`module-blocks.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +module { await 3 }; + +class B { + #p() { + module { + class C { [this.#p]; } + }; + } +} + +const m = module { + export const foo = "foo"; + export { foo }; +}; + +module { + export { foo } +}; + +const m = module {}; + +const worker = new Worker(module { + export const foo = "foo"; +}); + +let m = module { + module { + export let foo = "foo"; + }; +}; + +const m = module { export const foo = "foo" }; + +let moduleBlock = module { export let y = 1; }; + +foo(module { export let foo = "foo"; }); + +let m = module { /* foo */ }; + +=====================================output===================================== +module { + await 3; +}; + +class B { + #p() { + module { + class C { + [this.#p]; + } + }; + } +} + +const m = module { + export const foo = "foo"; + export { foo }; +}; + +module { + export { foo }; +}; + +const m = module {}; + +const worker = new Worker(module { + export const foo = "foo"; +}); + +let m = module { + module { + export let foo = "foo"; + }; +}; + +const m = module { + export const foo = "foo"; +}; + +let moduleBlock = module { + export let y = 1; +}; + +foo(module { + export let foo = "foo"; +}); + +let m = module { + /* foo */ +}; + +================================================================================ +`; + +exports[`non-module-blocks.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const m = module +{} + +=====================================output===================================== +const m = module; +{ +} + +================================================================================ +`; + +exports[`range.js [acorn] format 1`] = ` +"Unexpected token (1:26) +> 1 | let moduleBlock = module { export let y = 1; + | ^ + 2 | }; + 3 | + 4 | foo(module { export let foo = "foo"; }) +Cause: Unexpected token (1:25)" +`; + +exports[`range.js [espree] format 1`] = ` +"Unexpected token { (1:26) +> 1 | let moduleBlock = module { export let y = 1; + | ^ + 2 | }; + 3 | + 4 | foo(module { export let foo = "foo"; }) +Cause: Unexpected token {" +`; + +exports[`range.js [meriyah] format 1`] = ` +"Unexpected token: '{' (1:26) +> 1 | let moduleBlock = module { export let y = 1; + | ^ + 2 | }; + 3 | + 4 | foo(module { export let foo = "foo"; }) +Cause: [1:25-1:26]: Unexpected token: '{'" +`; + +exports[`range.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:25) +> 1 | let moduleBlock = module { export let y = 1; + | ^ + 2 | }; + 3 | + 4 | foo(module { export let foo = "foo"; })" +`; + +exports[`range.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +rangeEnd: 52 +rangeStart: 28 + | | printWidth +=====================================input====================================== +> 1 | let moduleBlock = module { export let y = 1; + | ^^^^^^^^^^^^^^^^^ +> 2 | }; + | ^^ +> 3 | + | ^^ +> 4 | foo(module { export let foo = "foo"; }) + | ^^ + 5 | +=====================================output===================================== +let moduleBlock = module { + export let y = 1; +}; + +foo(module { + export let foo = "foo"; +}); + +================================================================================ +`; diff --git a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 541e7ff44706..000000000000 --- a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,338 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.js [acorn] format 1`] = ` -"Unexpected token (1:32) -> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ - | ^ - 2 | /*A4*/ - 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" -`; - -exports[`comments.js [espree] format 1`] = ` -"Unexpected token { (1:32) -> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ - | ^ - 2 | /*A4*/ - 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" -`; - -exports[`comments.js [meriyah] format 1`] = ` -"Unexpected token: '{' (1:32) -> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ - | ^ - 2 | /*A4*/ - 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const m = /*A1*/ module /*A2*/ { /*A3*/ - /*A4*/ - export const foo = "foo"; - export { foo }; /*A5*/ - /*A6*/ -}/*A7*/;/*A8*/ - -const m2 = module/* B1 */{ - /* B2 */ -}; - -=====================================output===================================== -const m = /*A1*/ module { - /*A2*/ /*A3*/ - /*A4*/ - export const foo = "foo"; - export { foo }; /*A5*/ - /*A6*/ -}; /*A7*/ /*A8*/ - -const m2 = module { - /* B1 */ - /* B2 */ -}; - -================================================================================ -`; - -exports[`module-blocks.js [acorn] format 1`] = ` -"Unexpected token (1:8) -> 1 | module { await 3 }; - | ^ - 2 | - 3 | class B { - 4 | #p() {" -`; - -exports[`module-blocks.js [espree] format 1`] = ` -"Unexpected token { (1:8) -> 1 | module { await 3 }; - | ^ - 2 | - 3 | class B { - 4 | #p() {" -`; - -exports[`module-blocks.js [meriyah] format 1`] = ` -"Unexpected token: '{' (1:8) -> 1 | module { await 3 }; - | ^ - 2 | - 3 | class B { - 4 | #p() {" -`; - -exports[`module-blocks.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -module { await 3 }; - -class B { - #p() { - module { - class C { [this.#p]; } - }; - } -} - -const m = module { - export const foo = "foo"; - export { foo }; -}; - -module { - export { foo } -}; - -const m = module {}; - -const worker = new Worker(module { - export const foo = "foo"; -}); - -let m = module { - module { - export let foo = "foo"; - }; -}; - -const m = module { export const foo = "foo" }; - -let moduleBlock = module { export let y = 1; }; - -foo(module { export let foo = "foo"; }); - -let m = module { /* foo */ }; - -=====================================output===================================== -module { - await 3; -}; - -class B { - #p() { - module { - class C { - [this.#p]; - } - }; - } -} - -const m = module { - export const foo = "foo"; - export { foo }; -}; - -module { - export { foo }; -}; - -const m = module {}; - -const worker = new Worker(module { - export const foo = "foo"; -}); - -let m = module { - module { - export let foo = "foo"; - }; -}; - -const m = module { - export const foo = "foo"; -}; - -let moduleBlock = module { - export let y = 1; -}; - -foo(module { - export let foo = "foo"; -}); - -let m = module { - /* foo */ -}; - -================================================================================ -`; - -exports[`non-module-blocks.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const m = module -{} - -=====================================output===================================== -const m = module; -{ -} - -================================================================================ -`; - -exports[`range.js [acorn] format 1`] = ` -"Unexpected token (1:26) -> 1 | let moduleBlock = module { export let y = 1; - | ^ - 2 | }; - 3 | - 4 | foo(module { export let foo = "foo"; })" -`; - -exports[`range.js [espree] format 1`] = ` -"Unexpected token { (1:26) -> 1 | let moduleBlock = module { export let y = 1; - | ^ - 2 | }; - 3 | - 4 | foo(module { export let foo = "foo"; })" -`; - -exports[`range.js [meriyah] format 1`] = ` -"Unexpected token: '{' (1:26) -> 1 | let moduleBlock = module { export let y = 1; - | ^ - 2 | }; - 3 | - 4 | foo(module { export let foo = "foo"; })" -`; - -exports[`range.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -rangeEnd: 52 -rangeStart: 28 - | | printWidth -=====================================input====================================== -> 1 | let moduleBlock = module { export let y = 1; - | ^^^^^^^^^^^^^^^^^ -> 2 | }; - | ^^ -> 3 | - | ^^ -> 4 | foo(module { export let foo = "foo"; }) - | ^^ - 5 | -=====================================output===================================== -let moduleBlock = module { - export let y = 1; -}; - -foo(module { - export let foo = "foo"; -}); - -================================================================================ -`; - -exports[`worker.js [acorn] format 1`] = ` -"Unexpected token (1:32) -> 1 | let worker = new Worker(module { - | ^ - 2 | onmessage = function({data}) { - 3 | let mod = import(data); - 4 | postMessage(mod.fn());" -`; - -exports[`worker.js [espree] format 1`] = ` -"Unexpected token { (1:32) -> 1 | let worker = new Worker(module { - | ^ - 2 | onmessage = function({data}) { - 3 | let mod = import(data); - 4 | postMessage(mod.fn());" -`; - -exports[`worker.js [meriyah] format 1`] = ` -"Expected ')' (1:32) -> 1 | let worker = new Worker(module { - | ^ - 2 | onmessage = function({data}) { - 3 | let mod = import(data); - 4 | postMessage(mod.fn());" -`; - -exports[`worker.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -let worker = new Worker(module { - onmessage = function({data}) { - let mod = import(data); - postMessage(mod.fn()); - } -}, {type: "module"}); - -let worker = new Worker(module { - onmessage = function({data}) { - let mod = import(data); - postMessage(mod.fn()); - } -}, {type: "module", foo: "bar" }); - -worker.postMessage(module { export function fn() { return "hello!" } }); - -=====================================output===================================== -let worker = new Worker(module { - onmessage = function ({ data }) { - let mod = import(data); - postMessage(mod.fn()); - }; -}, { type: "module" }); - -let worker = new Worker( - module { - onmessage = function ({ data }) { - let mod = import(data); - postMessage(mod.fn()); - }; - }, - { type: "module", foo: "bar" } -); - -worker.postMessage(module { - export function fn() { - return "hello!"; - } -}); - -================================================================================ -`; diff --git a/tests/format/js/module-blocks/format.test.js b/tests/format/js/module-blocks/format.test.js new file mode 100644 index 000000000000..25579dd1296c --- /dev/null +++ b/tests/format/js/module-blocks/format.test.js @@ -0,0 +1,9 @@ +const errors = { + acorn: ["module-blocks.js", "range.js", "comments.js"], + espree: ["module-blocks.js", "range.js", "comments.js"], + meriyah: ["module-blocks.js", "range.js", "comments.js"], + oxc: ["module-blocks.js", "range.js", "comments.js"], + "oxc-ts": ["module-blocks.js", "range.js", "comments.js"], +}; + +runFormatTest(import.meta, ["babel"], { errors }); diff --git a/tests/format/js/module-blocks/jsfmt.spec.js b/tests/format/js/module-blocks/jsfmt.spec.js deleted file mode 100644 index 015fbd80e1a3..000000000000 --- a/tests/format/js/module-blocks/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { - acorn: ["module-blocks.js", "range.js", "comments.js", "worker.js"], - espree: ["module-blocks.js", "range.js", "comments.js", "worker.js"], - meriyah: ["module-blocks.js", "range.js", "comments.js", "worker.js"], - }, -}); diff --git a/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap b/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..efd2f8fc2c61 --- /dev/null +++ b/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap @@ -0,0 +1,137 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`worker.js [acorn] format 1`] = ` +"Unexpected token (1:28) +> 1 | worker = new Worker(module { + | ^ + 2 | onmessage = function({data}) { + 3 | let mod = import(data); + 4 | postMessage(mod.fn()); +Cause: Unexpected token (1:27)" +`; + +exports[`worker.js [espree] format 1`] = ` +"Unexpected token { (1:28) +> 1 | worker = new Worker(module { + | ^ + 2 | onmessage = function({data}) { + 3 | let mod = import(data); + 4 | postMessage(mod.fn()); +Cause: Unexpected token {" +`; + +exports[`worker.js [meriyah] format 1`] = ` +"Expected ')' (1:28) +> 1 | worker = new Worker(module { + | ^ + 2 | onmessage = function({data}) { + 3 | let mod = import(data); + 4 | postMessage(mod.fn()); +Cause: [1:27-1:28]: Expected ')'" +`; + +exports[`worker.js [oxc] format 1`] = ` +"Expected \`,\` but found \`{\` (1:28) +> 1 | worker = new Worker(module { + | ^ + 2 | onmessage = function({data}) { + 3 | let mod = import(data); + 4 | postMessage(mod.fn());" +`; + +exports[`worker.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {type: "module"}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {'type': "module"}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {type: "module", foo: "bar" }); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {...{type: "module"}}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {[type]: "module"}); + +worker.postMessage(module { export function fn() { return "hello!" } }); + +=====================================output===================================== +worker = new Worker(module { + onmessage = function ({ data }) { + let mod = import(data); + postMessage(mod.fn()); + }; +}, { type: "module" }); + +worker = new Worker(module { + onmessage = function ({ data }) { + let mod = import(data); + postMessage(mod.fn()); + }; +}, { type: "module" }); + +worker = new Worker( + module { + onmessage = function ({ data }) { + let mod = import(data); + postMessage(mod.fn()); + }; + }, + { type: "module", foo: "bar" }, +); + +worker = new Worker( + module { + onmessage = function ({ data }) { + let mod = import(data); + postMessage(mod.fn()); + }; + }, + { ...{ type: "module" } }, +); + +worker = new Worker( + module { + onmessage = function ({ data }) { + let mod = import(data); + postMessage(mod.fn()); + }; + }, + { [type]: "module" }, +); + +worker.postMessage(module { + export function fn() { + return "hello!"; + } +}); + +================================================================================ +`; diff --git a/tests/format/js/module-blocks/quote-props/format.test.js b/tests/format/js/module-blocks/quote-props/format.test.js new file mode 100644 index 000000000000..67806e92229a --- /dev/null +++ b/tests/format/js/module-blocks/quote-props/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: ["worker.js"], + espree: ["worker.js"], + meriyah: ["worker.js"], + oxc: ["worker.js"], + "oxc-ts": ["worker.js"], + }, +}); diff --git a/tests/format/js/module-blocks/quote-props/worker.js b/tests/format/js/module-blocks/quote-props/worker.js new file mode 100644 index 000000000000..a8247cd9d410 --- /dev/null +++ b/tests/format/js/module-blocks/quote-props/worker.js @@ -0,0 +1,36 @@ +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {type: "module"}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {'type': "module"}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {type: "module", foo: "bar" }); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {...{type: "module"}}); + +worker = new Worker(module { + onmessage = function({data}) { + let mod = import(data); + postMessage(mod.fn()); + } +}, {[type]: "module"}); + +worker.postMessage(module { export function fn() { return "hello!" } }); diff --git a/tests/format/js/module-blocks/worker.js b/tests/format/js/module-blocks/worker.js deleted file mode 100644 index c60963f774ee..000000000000 --- a/tests/format/js/module-blocks/worker.js +++ /dev/null @@ -1,15 +0,0 @@ -let worker = new Worker(module { - onmessage = function({data}) { - let mod = import(data); - postMessage(mod.fn()); - } -}, {type: "module"}); - -let worker = new Worker(module { - onmessage = function({data}) { - let mod = import(data); - postMessage(mod.fn()); - } -}, {type: "module", foo: "bar" }); - -worker.postMessage(module { export function fn() { return "hello!" } }); diff --git a/tests/format/js/module-string-names/__snapshots__/format.test.js.snap b/tests/format/js/module-string-names/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..dadbde36f360 --- /dev/null +++ b/tests/format/js/module-string-names/__snapshots__/format.test.js.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`module-string-names-export.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +export { smile as "smile1" } from "./emojis.js"; +export { "smile" as smile2 } from "./emojis.js"; +export { "smile" as "smile3" } from "./emojis.js"; +export { foo1, bar as "foo2" } from "./emojis.js"; +export { "學而時習之,不亦說乎?", "吾道一以貫之。" as "忠恕。" } from "Confucius"; +export { "smile4" } from "./emojis.js"; + +=====================================output===================================== +export { smile as "smile1" } from "./emojis.js"; +export { "smile" as smile2 } from "./emojis.js"; +export { "smile" as "smile3" } from "./emojis.js"; +export { foo1, bar as "foo2" } from "./emojis.js"; +export { + "學而時習之,不亦說乎?", + "吾道一以貫之。" as "忠恕。", +} from "Confucius"; +export { "smile4" } from "./emojis.js"; + +================================================================================ +`; + +exports[`module-string-names-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { "default" as quotation1 } from "Confucius"; +import { "foo" as bar, "default" as qux } from "module-a"; +import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; + +=====================================output===================================== +import { "default" as quotation1 } from "Confucius"; +import { "foo" as bar, "default" as qux } from "module-a"; +import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; + +================================================================================ +`; diff --git a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 59fca2ebe01d..000000000000 --- a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,64 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`module-string-names-export.js [meriyah] format 1`] = ` -"Only a identifier can be used to indicate alias (1:26) -> 1 | export { smile as "smile1" } from "./emojis.js"; - | ^ - 2 | export { "smile" as smile2 } from "./emojis.js"; - 3 | export { "smile" as "smile3" } from "./emojis.js"; - 4 | export { foo1, bar as "foo2" } from "./emojis.js";" -`; - -exports[`module-string-names-export.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -export { smile as "smile1" } from "./emojis.js"; -export { "smile" as smile2 } from "./emojis.js"; -export { "smile" as "smile3" } from "./emojis.js"; -export { foo1, bar as "foo2" } from "./emojis.js"; -export { "學而時習之,不亦說乎?", "吾道一以貫之。" as "忠恕。" } from "Confucius"; -export { "smile4" } from "./emojis.js"; - -=====================================output===================================== -export { smile as "smile1" } from "./emojis.js"; -export { "smile" as smile2 } from "./emojis.js"; -export { "smile" as "smile3" } from "./emojis.js"; -export { foo1, bar as "foo2" } from "./emojis.js"; -export { - "學而時習之,不亦說乎?", - "吾道一以貫之。" as "忠恕。", -} from "Confucius"; -export { "smile4" } from "./emojis.js"; - -================================================================================ -`; - -exports[`module-string-names-import.js [meriyah] format 1`] = ` -"Expected '}' (1:18) -> 1 | import { "default" as quotation1 } from "Confucius"; - | ^ - 2 | import { "foo" as bar, "default" as qux } from "module-a"; - 3 | import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; - 4 |" -`; - -exports[`module-string-names-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { "default" as quotation1 } from "Confucius"; -import { "foo" as bar, "default" as qux } from "module-a"; -import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; - -=====================================output===================================== -import { "default" as quotation1 } from "Confucius"; -import { "foo" as bar, "default" as qux } from "module-a"; -import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; - -================================================================================ -`; diff --git a/tests/format/js/module-string-names/format.test.js b/tests/format/js/module-string-names/format.test.js new file mode 100644 index 000000000000..f509b709ec61 --- /dev/null +++ b/tests/format/js/module-string-names/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/js/module-string-names/jsfmt.spec.js b/tests/format/js/module-string-names/jsfmt.spec.js deleted file mode 100644 index 84c005b1f96c..000000000000 --- a/tests/format/js/module-string-names/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { meriyah: true }, -}); diff --git a/tests/format/js/multiparser-comments/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6570a6f1d45d --- /dev/null +++ b/tests/format/js/multiparser-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,190 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-inside.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #9274 +html\` + <div> + \${this.set && this.set.artist + /* avoid console errors if \`this.set\` is undefined */} + </div> +\`; + +html\`\${ + foo + /* comment */ +}\`; +html\` +\${ + foo + /* comment */ +} +\`; + + +graphql\`\${ + foo + /* comment */ +}\`; +graphql\` +\${ + foo + /* comment */ +} +\`; + + +css\`\${ + foo + /* comment */ +}\`; +css\` +\${ + foo + /* comment */ +} +\`; + +markdown\`\${ + foo + /* comment */ +}\`; +markdown\` +\${ + foo + /* comment */ +} +\`; + +// https://github.com/prettier/prettier/pull/9278#issuecomment-700589195 +expr1 = html\` + <div> + \${x(foo, // fg + bar + )}</div> +\`; + +=====================================output===================================== +// #9274 +html\` + <div> + \${ + this.set && this.set.artist + /* avoid console errors if \`this.set\` is undefined */ + } + </div> +\`; + +html\`\${ + foo + /* comment */ +}\`; +html\` + \${ + foo + /* comment */ + } +\`; + +graphql\` + \${ + foo + /* comment */ + } +\`; +graphql\` + \${ + foo + /* comment */ + } +\`; + +css\` + \${ + foo + /* comment */ + } +\`; +css\` + \${ + foo + /* comment */ + } +\`; + +markdown\`\${ + foo + /* comment */ +}\`; +markdown\` +\${ + foo + /* comment */ +} +\`; + +// https://github.com/prettier/prettier/pull/9278#issuecomment-700589195 +expr1 = html\` + <div> + \${x( + foo, // fg + bar, + )} + </div> +\`; + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +graphql.experimental\` + # required by createPaginationContainer + fragment MobileHomeDiffsSearchList_search on DifferentialRevisionSearch { + # required by createPaginationContainer + name + } +\`; + +=====================================output===================================== +graphql.experimental\` + # required by createPaginationContainer + fragment MobileHomeDiffsSearchList_search on DifferentialRevisionSearch { + # required by createPaginationContainer + name + } +\`; + +================================================================================ +`; + +exports[`tagged.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo(html // oops +\` <div><p>bar</p>foo</div> \`); + +=====================================output===================================== +foo( + html // oops + \` + <div> + <p>bar</p> + foo + </div> + \`, +); + +================================================================================ +`; diff --git a/tests/format/js/multiparser-comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f993855ec20c..000000000000 --- a/tests/format/js/multiparser-comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,167 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment-inside.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #9274 -html\` - <div> - \${this.set && this.set.artist - /* avoid console errors if \`this.set\` is undefined */} - </div> -\`; - -html\`\${ - foo - /* comment */ -}\`; -html\` -\${ - foo - /* comment */ -} -\`; - - -graphql\`\${ - foo - /* comment */ -}\`; -graphql\` -\${ - foo - /* comment */ -} -\`; - - -css\`\${ - foo - /* comment */ -}\`; -css\` -\${ - foo - /* comment */ -} -\`; - -markdown\`\${ - foo - /* comment */ -}\`; -markdown\` -\${ - foo - /* comment */ -} -\`; - -// https://github.com/prettier/prettier/pull/9278#issuecomment-700589195 -expr1 = html\` - <div> - \${x(foo, // fg - bar - )}</div> -\`; - -=====================================output===================================== -// #9274 -html\` - <div> - \${ - this.set && this.set.artist - /* avoid console errors if \`this.set\` is undefined */ - } - </div> -\`; - -html\`\${ - foo - /* comment */ -}\`; -html\` - \${ - foo - /* comment */ - } -\`; - -graphql\` - \${ - foo - /* comment */ - } -\`; -graphql\` - \${ - foo - /* comment */ - } -\`; - -css\` - \${ - foo - /* comment */ - } -\`; -css\` - \${ - foo - /* comment */ - } -\`; - -markdown\`\${ - foo - /* comment */ -}\`; -markdown\` -\${ - foo - /* comment */ -} -\`; - -// https://github.com/prettier/prettier/pull/9278#issuecomment-700589195 -expr1 = html\` - <div> - \${x( - foo, // fg - bar - )} - </div> -\`; - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -graphql.experimental\` - # required by createPaginationContainer - fragment MobileHomeDiffsSearchList_search on DifferentialRevisionSearch { - # required by createPaginationContainer - name - } -\`; - -=====================================output===================================== -graphql.experimental\` - # required by createPaginationContainer - fragment MobileHomeDiffsSearchList_search on DifferentialRevisionSearch { - # required by createPaginationContainer - name - } -\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-comments/format.test.js b/tests/format/js/multiparser-comments/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/multiparser-comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/multiparser-comments/jsfmt.spec.js b/tests/format/js/multiparser-comments/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/multiparser-comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/multiparser-comments/tagged.js b/tests/format/js/multiparser-comments/tagged.js new file mode 100644 index 000000000000..49673589bac1 --- /dev/null +++ b/tests/format/js/multiparser-comments/tagged.js @@ -0,0 +1,2 @@ +foo(html // oops +` <div><p>bar</p>foo</div> `); diff --git a/tests/format/js/multiparser-css/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2fdb0057b6bb --- /dev/null +++ b/tests/format/js/multiparser-css/__snapshots__/format.test.js.snap @@ -0,0 +1,1209 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`colons-after-substitutions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Icon = styled.div\` + flex: none; + transition: fill 0.25s; + width: 48px; + height: 48px; + + \${Link}:hover { + fill: rebeccapurple; + } + + \${Link} :hover { + fill: yellow; + } + + \${media.smallDown}::before {} +\` + +=====================================output===================================== +const Icon = styled.div\` + flex: none; + transition: fill 0.25s; + width: 48px; + height: 48px; + + \${Link}:hover { + fill: rebeccapurple; + } + + \${Link} :hover { + fill: yellow; + } + + \${media.smallDown}::before { + } +\`; + +================================================================================ +`; + +exports[`colons-after-substitutions2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Icon = styled.div\` + height: 48px; + + \${Link}:nth-child(2) { + fill: rebeccapurple; + } +\`; + +const Icon2 = styled.div\` + height: 48px; + + \${Link}:empty:before{ + fill: rebeccapurple; + } +\`; + +const Icon3 = styled.div\` + height: 48px; + + \${Link}:not(:first-child) { + fill: rebeccapurple; + } +\`; + +=====================================output===================================== +const Icon = styled.div\` + height: 48px; + + \${Link}:nth-child(2) { + fill: rebeccapurple; + } +\`; + +const Icon2 = styled.div\` + height: 48px; + + \${Link}:empty:before { + fill: rebeccapurple; + } +\`; + +const Icon3 = styled.div\` + height: 48px; + + \${Link}:not(:first-child) { + fill: rebeccapurple; + } +\`; + +================================================================================ +`; + +exports[`issue-2636.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const ButtonWrapper = styled.button\` + \${base} + \${hover} + \${opaque} + \${block} + \${active} + \${disabled} + \${outline} + \${dashed} + \${spacing} +\`; + +export const ButtonWrapper2 = styled.button\` + \${base} \${hover} \${opaque} \${block} \${active} \${disabled} \${outline} \${dashed} \${spacing} +\`; + +=====================================output===================================== +export const ButtonWrapper = styled.button\` + \${base} + \${hover} + \${opaque} + \${block} + \${active} + \${disabled} + \${outline} + \${dashed} + \${spacing} +\`; + +export const ButtonWrapper2 = styled.button\` + \${base} \${hover} \${opaque} \${block} \${active} \${disabled} \${outline} \${dashed} \${spacing} +\`; + +================================================================================ +`; + +exports[`issue-2883.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const foo = css\` +&.foo .\${bar}::before,&.foo[value="hello"] .\${bar}::before { + position: absolute; +} +\`; + +export const foo2 = css\` +a.\${bar}:focus,a.\${bar}:hover { + color: red; +} +\`; + +export const global = css\` +button.\${foo}.\${bar} { + color: #fff; +} +\`; + +=====================================output===================================== +export const foo = css\` + &.foo .\${bar}::before,&.foo[value="hello"] .\${bar}::before { + position: absolute; + } +\`; + +export const foo2 = css\` + a.\${bar}:focus,a.\${bar}:hover { + color: red; + } +\`; + +export const global = css\` + button.\${foo}.\${bar} { + color: #fff; + } +\`; + +================================================================================ +`; + +exports[`issue-5697.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const StyledH1 = styled.div\` + font-size: 2.5em; + font-weight: \${(props) => (props.strong ? 500 : 100)}; + font-family: \${constants.text.displayFont.fontFamily}; + letter-spacing: \${(props) => (props.light ? '0.04em' : 0)}; + color: \${(props) => props.textColor}; + \${(props) => + props.center + ? \` display: flex; + align-items: center; + justify-content: center; + text-align: center;\` + : ''} + @media (max-width: \${(props) => (props.noBreakPoint ? '0' : constants.layout.breakpoint.break1)}px) { + font-size: 2em; + } +\`; + +=====================================output===================================== +const StyledH1 = styled.div\` + font-size: 2.5em; + font-weight: \${(props) => (props.strong ? 500 : 100)}; + font-family: \${constants.text.displayFont.fontFamily}; + letter-spacing: \${(props) => (props.light ? "0.04em" : 0)}; + color: \${(props) => props.textColor}; + \${(props) => + props.center + ? \` display: flex; + align-items: center; + justify-content: center; + text-align: center;\` + : ""} + @media (max-width: \${(props) => + props.noBreakPoint ? "0" : constants.layout.breakpoint.break1}px) { + font-size: 2em; + } +\`; + +================================================================================ +`; + +exports[`issue-5961.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Steps = styled.div\` + @media (min-width: 1px) { + \${Step}:nth-child(odd) {} + } +\`; + +const Steps2 = styled.div\` + @media (min-width: \${breakpoints.lg}) { + \${Step} { + margin-bottom: 90px; + } + + \${Step}:nth-child(odd) { + \${StepItemDescription} { + grid-row: 1; + grid-column: 3 / span 3; + } + \${Image} { + grid-row: 1; + grid-column: 7 / span 6; + } + } + + \${Step}:nth-child(even) { + \${Image} { + grid-row: 1; + grid-column: 3 / span 6; + } + \${StepItemDescription} { + grid-row: 1; + grid-column: 10 / span 3; + } + } + } +\`; + +=====================================output===================================== +const Steps = styled.div\` + @media (min-width: 1px) { + \${Step}:nth-child(odd) { + } + } +\`; + +const Steps2 = styled.div\` + @media (min-width: \${breakpoints.lg}) { + \${Step} { + margin-bottom: 90px; + } + + \${Step}:nth-child(odd) { + \${StepItemDescription} { + grid-row: 1; + grid-column: 3 / span 3; + } + \${Image} { + grid-row: 1; + grid-column: 7 / span 6; + } + } + + \${Step}:nth-child(even) { + \${Image} { + grid-row: 1; + grid-column: 3 / span 6; + } + \${StepItemDescription} { + grid-row: 1; + grid-column: 10 / span 3; + } + } + } +\`; + +================================================================================ +`; + +exports[`issue-6259.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const Group = styled.div\` + margin: 0; + + .input { + margin: 0; + } + + \${StyledInput}:not(:first-child) { + margin: 0; + } + + & > :not(.\${inputWrap}):not(\${Button}) { + display: flex; + } +\` + +=====================================output===================================== +export const Group = styled.div\` + margin: 0; + + .input { + margin: 0; + } + + \${StyledInput}:not(:first-child) { + margin: 0; + } + + & > :not(.\${inputWrap}):not(\${Button}) { + display: flex; + } +\`; + +================================================================================ +`; + +exports[`issue-8352.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const StyledComponent = styled.div\` + margin-right: -4px; + + \${Container}.isExpanded & { + transform: rotate(-180deg); + } +\`; + +const StyledComponent2 = styled.div\` + margin-right: -4px; + + \${abc}.camelCase + \${def}.camelCase & { + transform: rotate(-180deg); + } +\`; + +=====================================output===================================== +const StyledComponent = styled.div\` + margin-right: -4px; + + \${Container}.isExpanded & { + transform: rotate(-180deg); + } +\`; + +const StyledComponent2 = styled.div\` + margin-right: -4px; + + \${abc}.camelCase + \${def}.camelCase & { + transform: rotate(-180deg); + } +\`; + +================================================================================ +`; + +exports[`issue-9072.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const style1 = css\` + width:\${size+10}\${sizeUnit}; + border:\${size/10} \${sizeUnit} solid \${color}; +\`; + +const style2 = css\` + width: \${size + 10}\${sizeUnit}; + border: \${size / 10} \${sizeUnit} solid \${color}; +\`; + +const style3 = css\` + foo: \${foo}\${bar} \${baz}; +\`; + +=====================================output===================================== +const style1 = css\` + width: \${size + 10}\${sizeUnit}; + border: \${size / 10} \${sizeUnit} solid \${color}; +\`; + +const style2 = css\` + width: \${size + 10}\${sizeUnit}; + border: \${size / 10} \${sizeUnit} solid \${color}; +\`; + +const style3 = css\` + foo: \${foo}\${bar} \${baz}; +\`; + +================================================================================ +`; + +exports[`issue-11797.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const paragraph1 = css\` + font-size: 12px; + transform: \${vert ? 'translateY' : 'translateX'}(\${translation + handleOffset}px); +\`; + +const paragraph2 = css\` + transform: \${expr}(30px); +\`; + +const paragraph3 = css\` + transform: \${expr} (30px); +\`; + +=====================================output===================================== +const paragraph1 = css\` + font-size: 12px; + transform: \${vert ? "translateY" : "translateX"} + (\${translation + handleOffset}px); +\`; + +const paragraph2 = css\` + transform: \${expr}(30px); +\`; + +const paragraph3 = css\` + transform: \${expr} (30px); +\`; + +================================================================================ +`; + +exports[`issue-16692.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const c1 = styled.div\` + border: 1px \${solid} red; +\`; + +const c2 = styled.div\` + font-size: var(--font-size-h\${level}); +\`; + +const c3 = styled.div\` + grid-area: area-\${area}; +\`; + +const c4 = styled.div\` + grid-area: var(--\${one}); +\`; + +const c5 = styled.div\` + font-size: var(--font-size-h \${level}); +\`; + +=====================================output===================================== +const c1 = styled.div\` + border: 1px \${solid} red; +\`; + +const c2 = styled.div\` + font-size: var(--font-size-h\${level}); +\`; + +const c3 = styled.div\` + grid-area: area-\${area}; +\`; + +const c4 = styled.div\` + grid-area: var(--\${one}); +\`; + +const c5 = styled.div\` + font-size: var(--font-size-h \${level}); +\`; + +================================================================================ +`; + +exports[`styled-components.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const ListItem1 = styled.li\`\`; + +const ListItem2 = styled.li\` \`; + +const Dropdown = styled.div\`position: relative;\` + +const Button = styled.button\` + color: palevioletred ; + + font-size : 1em ; +\`; + +const TomatoButton = Button.extend\` + color : tomato ; + +border-color : tomato + ; + +\`; + +Button.extend.attr({})\` +border-color : black; +\` + +styled(ExistingComponent)\` + color : papayawhip ; background-color: firebrick\`; + + +styled.button.attr({})\` +border : rebeccapurple\`; + +styled(ExistingComponent).attr({})\` +border : rebeccapurple\`; + +styled.div\` + color: \${props => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${props => props.small ? 'font-size: 0.8em;' : ''}; +\` + +styled.div\` + color: \${props => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${props => props.small ? 'font-size: 0.8em;' : ''} +\` + +styled.div\` + /* prettier-ignore */ + color: \${props => props.theme.colors.paragraph}; + \${props => props.small ? 'font-size: 0.8em;' : ''}; +\` + +styled.div\` + color: \${props => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${props => props.small ? 'font-size: 0.8em;' : ''}; + /* prettier-ignore */ + \${props => props.red ? 'color: red;' : ''}; +\` + +styled.div\` + /* prettier-ignore */ + color: \${props => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${props => props.small ? 'font-size: 0.8em;' : ''}; + /* prettier-ignore */ + \${props => props.red ? 'color: red;' : ''}; + /* prettier-ignore */ +\` + +styled.div\` + \${sanitize} \${fonts} + html { + margin: 0; + } +\` + +styled.div\` + \${bar} + baz +\` + +styled.span\` + foo + \${bar} + baz +\` + +styled.div\` + foo + \${bar} + \${baz} +\` + +styled.span\` + \${foo} + \${bar} +\` + +styled.div\` + \${foo} bar +\` + +styled.span\` + \${foo} \${bar} + baz: \${foo} +\` + +styled.span\` +\${foo}; +\${bar}; +\` + +styled.span\` +\${foo}: \${bar}; +\` + +styled.span\` +\${foo}: \${bar} +\` + +styled.span\` +\${foo}: +\${bar} +\` + +styled.span\` +\${foo}: +\${bar}; +\` + +styled.a\` + \${feedbackCountBlockCss} + text-decoration: none; + + \${FeedbackCount} { + margin: 0; + } +\` + +const StyledComponent1 = styled.div\` + \${anInterpolation} + /* a comment */ + + .aRule { + color: red + } +\`; + +const StyledComponent2 = styled.div\` + \${anInterpolation} + + /* a comment */ + + .aRule { + color: red + } +\`; + +const Direction = styled.span\` + \${({ up }) => up && \`color: \${color.positive};\`} + \${({ down }) => down && \`color: \${color.negative};\`} +\`; + +const Direction2 = styled.span\` + \${({ up }) => up && \`color: \${color.positive}\`}; + \${({ down }) => down && \`color: \${color.negative}\`}; +\`; + +const mixin = css\` + color: \${props => props.color}; + \${props => props.otherProperty}: \${props => props.otherValue}; +\`; + +const foo = styled.div\` + display: flex; + \${props => props.useMixin && mixin} +\`; + +const Single1 = styled.div\` + color: red +\`; + +const Single2 = styled.div\` + color: red; +\`; + +const Dropdown2 = styled.div\` + /* A comment to avoid the prettier issue: https://github.com/prettier/prettier/issues/2291 */ + position: relative; +\`; + +const bar = styled.div\` + border-radius: 50%; + border: 5px solid rgba(var(--green-rgb), 0); + display: inline-block; + height: 40px; + width: 40px; + + \${props => + (props.complete || props.inProgress) && + css\` + border-color: rgba(var(--green-rgb), 0.15); + \`} + + div { + background-color: var(--purpleTT); + border-radius: 50%; + border: 4px solid rgba(var(--purple-rgb), 0.2); + color: var(--purpleTT); + display: inline-flex; + + \${props => + props.complete && + css\` + background-color: var(--green); + border-width: 7px; + \`} + + \${props => + (props.complete || props.inProgress) && + css\` + border-color: var(--green); + \`} + } +\`; + +const A = styled.a\` + display: inline-block; + color: #fff; + \${props => props.a &&css\` + display: none; + \`} + height: 30px; +\`; + +const Foo = styled.p\` + max-width: 980px; + \${mediaBreakpointOnlyXs\` + && { + font-size: 0.8rem; + } + \`} + + &.bottom { + margin-top: 3rem; + } +\`; + +styled(A)\` + // prettier-ignore + @media (aaaaaaaaaaaaa) { + z-index: \${(props) => (props.isComplete ? '1' : '0')}; + } +\`; + +const StyledDiv = styled.div\` + \${props => getSize(props.$size.xs)} + \${props => getSize(props.$size.sm, 'sm')} + \${props => getSize(props.$size.md, 'md')} +\`; + +=====================================output===================================== +const ListItem1 = styled.li\`\`; + +const ListItem2 = styled.li\`\`; + +const Dropdown = styled.div\` + position: relative; +\`; + +const Button = styled.button\` + color: palevioletred; + + font-size: 1em; +\`; + +const TomatoButton = Button.extend\` + color: tomato; + + border-color: tomato; +\`; + +Button.extend.attr({})\` + border-color: black; +\`; + +styled(ExistingComponent)\` + color: papayawhip; + background-color: firebrick; +\`; + +styled.button.attr({})\` + border: rebeccapurple; +\`; + +styled(ExistingComponent).attr({})\` + border: rebeccapurple; +\`; + +styled.div\` + color: \${(props) => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${(props) => (props.small ? "font-size: 0.8em;" : "")}; +\`; + +styled.div\` + color: \${(props) => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${(props) => (props.small ? "font-size: 0.8em;" : "")} +\`; + +styled.div\` + /* prettier-ignore */ + color: \${(props) => props.theme.colors.paragraph}; + \${(props) => (props.small ? "font-size: 0.8em;" : "")}; +\`; + +styled.div\` + color: \${(props) => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${(props) => (props.small ? "font-size: 0.8em;" : "")}; + /* prettier-ignore */ + \${(props) => (props.red ? "color: red;" : "")}; +\`; + +styled.div\` + /* prettier-ignore */ + color: \${(props) => props.theme.colors.paragraph}; + /* prettier-ignore */ + \${(props) => (props.small ? "font-size: 0.8em;" : "")}; + /* prettier-ignore */ + \${(props) => (props.red ? "color: red;" : "")}; + /* prettier-ignore */ +\`; + +styled.div\` + \${sanitize} \${fonts} + html { + margin: 0; + } +\`; + +styled.div\` + \${bar} + baz +\`; + +styled.span\` + foo + \${bar} + baz +\`; + +styled.div\` + foo + \${bar} + \${baz} +\`; + +styled.span\` + \${foo} + \${bar} +\`; + +styled.div\` + \${foo} bar +\`; + +styled.span\` + \${foo} \${bar} + baz: \${foo} +\`; + +styled.span\` + \${foo}; + \${bar}; +\`; + +styled.span\` + \${foo}: \${bar}; +\`; + +styled.span\` + \${foo}: \${bar} +\`; + +styled.span\` + \${foo}: \${bar} +\`; + +styled.span\` + \${foo}: \${bar}; +\`; + +styled.a\` + \${feedbackCountBlockCss} + text-decoration: none; + + \${FeedbackCount} { + margin: 0; + } +\`; + +const StyledComponent1 = styled.div\` + \${anInterpolation} + /* a comment */ + + .aRule { + color: red; + } +\`; + +const StyledComponent2 = styled.div\` + \${anInterpolation} + + /* a comment */ + + .aRule { + color: red; + } +\`; + +const Direction = styled.span\` + \${({ up }) => up && \`color: \${color.positive};\`} + \${({ down }) => down && \`color: \${color.negative};\`} +\`; + +const Direction2 = styled.span\` + \${({ up }) => up && \`color: \${color.positive}\`}; + \${({ down }) => down && \`color: \${color.negative}\`}; +\`; + +const mixin = css\` + color: \${(props) => props.color}; + \${(props) => props.otherProperty}: \${(props) => props.otherValue}; +\`; + +const foo = styled.div\` + display: flex; + \${(props) => props.useMixin && mixin} +\`; + +const Single1 = styled.div\` + color: red; +\`; + +const Single2 = styled.div\` + color: red; +\`; + +const Dropdown2 = styled.div\` + /* A comment to avoid the prettier issue: https://github.com/prettier/prettier/issues/2291 */ + position: relative; +\`; + +const bar = styled.div\` + border-radius: 50%; + border: 5px solid rgba(var(--green-rgb), 0); + display: inline-block; + height: 40px; + width: 40px; + + \${(props) => + (props.complete || props.inProgress) && + css\` + border-color: rgba(var(--green-rgb), 0.15); + \`} + + div { + background-color: var(--purpleTT); + border-radius: 50%; + border: 4px solid rgba(var(--purple-rgb), 0.2); + color: var(--purpleTT); + display: inline-flex; + + \${(props) => + props.complete && + css\` + background-color: var(--green); + border-width: 7px; + \`} + + \${(props) => + (props.complete || props.inProgress) && + css\` + border-color: var(--green); + \`} + } +\`; + +const A = styled.a\` + display: inline-block; + color: #fff; + \${(props) => + props.a && + css\` + display: none; + \`} + height: 30px; +\`; + +const Foo = styled.p\` + max-width: 980px; + \${mediaBreakpointOnlyXs\` + && { + font-size: 0.8rem; + } + \`} + + &.bottom { + margin-top: 3rem; + } +\`; + +styled(A)\` + // prettier-ignore + @media (aaaaaaaaaaaaa) { + z-index: \${(props) => (props.isComplete ? "1" : "0")}; + } +\`; + +const StyledDiv = styled.div\` + \${(props) => getSize(props.$size.xs)} + \${(props) => getSize(props.$size.sm, "sm")} + \${(props) => getSize(props.$size.md, "md")} +\`; + +================================================================================ +`; + +exports[`styled-components-multiple-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Header = styled.div\` + \${something()} + & > \${Child}:not(:first-child) { +margin-left:5px; +} +\` + +const Header2 = styled.div\` + \${something()} + & > \${Child}\${Child2}:not(:first-child) { +margin-left:5px; +} +\` + +styled.div\`\${foo}-idle { }\` + +styled.div\`\${foo}-0-idle { }\` + +styled.div\` +font-family: "\${a}", "\${b}"; +\` + +=====================================output===================================== +const Header = styled.div\` + \${something()} + & > \${Child}:not(:first-child) { + margin-left: 5px; + } +\`; + +const Header2 = styled.div\` + \${something()} + & > \${Child}\${Child2}:not(:first-child) { + margin-left: 5px; + } +\`; + +styled.div\` + \${foo}-idle { + } +\`; + +styled.div\` + \${foo}-0-idle { + } +\`; + +styled.div\` + font-family: "\${a}", "\${b}"; +\`; + +================================================================================ +`; + +exports[`url.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +styled.div\`color:red;background: url(http://example.com?q=\${foo})\` + +=====================================output===================================== +styled.div\` + color: red; + background: url(http://example.com?q=\${foo}); +\`; + +================================================================================ +`; + +exports[`var.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Something = styled.div\` + background: var(--\${one}); /* ... */ + border: 1px solid var(--\${two}); /* ... */ +\`; + +const StyledPurchaseCard = styled(Card)\` + min-width: 200px; + background-color: var(--\${props => props.color}); + color: #fff; +\`; + +const v1 = css\` +prop: var(--global--color--\${props.variant}); +\`; + +const v2 = css\` + background-color: var(--global--color--\${props.variant}); + + &:hover { + background-color: var(--global--color--\${props.variant}__one); + } + \` + +export const StyledComponent = styled.div\` + grid-area: area-\${props => props.propName}; +\` + +=====================================output===================================== +const Something = styled.div\` + background: var(--\${one}); /* ... */ + border: 1px solid var(--\${two}); /* ... */ +\`; + +const StyledPurchaseCard = styled(Card)\` + min-width: 200px; + background-color: var(--\${(props) => props.color}); + color: #fff; +\`; + +const v1 = css\` + prop: var(--global--color--\${props.variant}); +\`; + +const v2 = css\` + background-color: var(--global--color--\${props.variant}); + + &:hover { + background-color: var(--global--color--\${props.variant}__one); + } +\`; + +export const StyledComponent = styled.div\` + grid-area: area-\${(props) => props.propName}; +\`; + +================================================================================ +`; diff --git a/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f3a9f82a2169..000000000000 --- a/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`colons-after-substitutions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Icon = styled.div\` - flex: none; - transition: fill 0.25s; - width: 48px; - height: 48px; - - \${Link}:hover { - fill: rebeccapurple; - } - - \${Link} :hover { - fill: yellow; - } - - \${media.smallDown}::before {} -\` - -=====================================output===================================== -const Icon = styled.div\` - flex: none; - transition: fill 0.25s; - width: 48px; - height: 48px; - - \${Link}:hover { - fill: rebeccapurple; - } - - \${Link} :hover { - fill: yellow; - } - - \${media.smallDown}::before { - } -\`; - -================================================================================ -`; - -exports[`colons-after-substitutions2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Icon = styled.div\` - height: 48px; - - \${Link}:nth-child(2) { - fill: rebeccapurple; - } -\`; - -const Icon2 = styled.div\` - height: 48px; - - \${Link}:empty:before{ - fill: rebeccapurple; - } -\`; - -const Icon3 = styled.div\` - height: 48px; - - \${Link}:not(:first-child) { - fill: rebeccapurple; - } -\`; - -=====================================output===================================== -const Icon = styled.div\` - height: 48px; - - \${Link}:nth-child(2) { - fill: rebeccapurple; - } -\`; - -const Icon2 = styled.div\` - height: 48px; - - \${Link}:empty:before { - fill: rebeccapurple; - } -\`; - -const Icon3 = styled.div\` - height: 48px; - - \${Link}:not(:first-child) { - fill: rebeccapurple; - } -\`; - -================================================================================ -`; - -exports[`issue-2636.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const ButtonWrapper = styled.button\` - \${base} - \${hover} - \${opaque} - \${block} - \${active} - \${disabled} - \${outline} - \${dashed} - \${spacing} -\`; - -export const ButtonWrapper2 = styled.button\` - \${base} \${hover} \${opaque} \${block} \${active} \${disabled} \${outline} \${dashed} \${spacing} -\`; - -=====================================output===================================== -export const ButtonWrapper = styled.button\` - \${base} - \${hover} - \${opaque} - \${block} - \${active} - \${disabled} - \${outline} - \${dashed} - \${spacing} -\`; - -export const ButtonWrapper2 = styled.button\` - \${base} \${hover} \${opaque} \${block} \${active} \${disabled} \${outline} \${dashed} \${spacing} -\`; - -================================================================================ -`; - -exports[`issue-2883.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const foo = css\` -&.foo .\${bar}::before,&.foo[value="hello"] .\${bar}::before { - position: absolute; -} -\`; - -export const foo2 = css\` -a.\${bar}:focus,a.\${bar}:hover { - color: red; -} -\`; - -export const global = css\` -button.\${foo}.\${bar} { - color: #fff; -} -\`; - -=====================================output===================================== -export const foo = css\` - &.foo .\${bar}::before,&.foo[value="hello"] .\${bar}::before { - position: absolute; - } -\`; - -export const foo2 = css\` - a.\${bar}:focus,a.\${bar}:hover { - color: red; - } -\`; - -export const global = css\` - button.\${foo}.\${bar} { - color: #fff; - } -\`; - -================================================================================ -`; - -exports[`issue-5697.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const StyledH1 = styled.div\` - font-size: 2.5em; - font-weight: \${(props) => (props.strong ? 500 : 100)}; - font-family: \${constants.text.displayFont.fontFamily}; - letter-spacing: \${(props) => (props.light ? '0.04em' : 0)}; - color: \${(props) => props.textColor}; - \${(props) => - props.center - ? \` display: flex; - align-items: center; - justify-content: center; - text-align: center;\` - : ''} - @media (max-width: \${(props) => (props.noBreakPoint ? '0' : constants.layout.breakpoint.break1)}px) { - font-size: 2em; - } -\`; - -=====================================output===================================== -const StyledH1 = styled.div\` - font-size: 2.5em; - font-weight: \${(props) => (props.strong ? 500 : 100)}; - font-family: \${constants.text.displayFont.fontFamily}; - letter-spacing: \${(props) => (props.light ? "0.04em" : 0)}; - color: \${(props) => props.textColor}; - \${(props) => - props.center - ? \` display: flex; - align-items: center; - justify-content: center; - text-align: center;\` - : ""} - @media (max-width: \${(props) => - props.noBreakPoint ? "0" : constants.layout.breakpoint.break1}px) { - font-size: 2em; - } -\`; - -================================================================================ -`; - -exports[`issue-5961.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Steps = styled.div\` - @media (min-width: 1px) { - \${Step}:nth-child(odd) {} - } -\`; - -const Steps2 = styled.div\` - @media (min-width: \${breakpoints.lg}) { - \${Step} { - margin-bottom: 90px; - } - - \${Step}:nth-child(odd) { - \${StepItemDescription} { - grid-row: 1; - grid-column: 3 / span 3; - } - \${Image} { - grid-row: 1; - grid-column: 7 / span 6; - } - } - - \${Step}:nth-child(even) { - \${Image} { - grid-row: 1; - grid-column: 3 / span 6; - } - \${StepItemDescription} { - grid-row: 1; - grid-column: 10 / span 3; - } - } - } -\`; - -=====================================output===================================== -const Steps = styled.div\` - @media (min-width: 1px) { - \${Step}:nth-child(odd) { - } - } -\`; - -const Steps2 = styled.div\` - @media (min-width: \${breakpoints.lg}) { - \${Step} { - margin-bottom: 90px; - } - - \${Step}:nth-child(odd) { - \${StepItemDescription} { - grid-row: 1; - grid-column: 3 / span 3; - } - \${Image} { - grid-row: 1; - grid-column: 7 / span 6; - } - } - - \${Step}:nth-child(even) { - \${Image} { - grid-row: 1; - grid-column: 3 / span 6; - } - \${StepItemDescription} { - grid-row: 1; - grid-column: 10 / span 3; - } - } - } -\`; - -================================================================================ -`; - -exports[`issue-6259.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const Group = styled.div\` - margin: 0; - - .input { - margin: 0; - } - - \${StyledInput}:not(:first-child) { - margin: 0; - } - - & > :not(.\${inputWrap}):not(\${Button}) { - display: flex; - } -\` - -=====================================output===================================== -export const Group = styled.div\` - margin: 0; - - .input { - margin: 0; - } - - \${StyledInput}:not(:first-child) { - margin: 0; - } - - & > :not(.\${inputWrap}):not(\${Button}) { - display: flex; - } -\`; - -================================================================================ -`; - -exports[`issue-9072.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const style1 = css\` - width:\${size+10}\${sizeUnit}; - border:\${size/10} \${sizeUnit} solid \${color}; -\`; - -const style2 = css\` - width: \${size + 10}\${sizeUnit}; - border: \${size / 10} \${sizeUnit} solid \${color}; -\`; - -const style3 = css\` - foo: \${foo}\${bar} \${baz}; -\`; - -=====================================output===================================== -const style1 = css\` - width: \${size + 10}\${sizeUnit}; - border: \${size / 10} \${sizeUnit} solid \${color}; -\`; - -const style2 = css\` - width: \${size + 10}\${sizeUnit}; - border: \${size / 10} \${sizeUnit} solid \${color}; -\`; - -const style3 = css\` - foo: \${foo}\${bar} \${baz}; -\`; - -================================================================================ -`; - -exports[`issue-11797.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const paragraph1 = css\` - font-size: 12px; - transform: \${vert ? 'translateY' : 'translateX'}(\${translation + handleOffset}px); -\`; - -const paragraph2 = css\` - transform: \${expr}(30px); -\`; - -const paragraph3 = css\` - transform: \${expr} (30px); -\`; - -=====================================output===================================== -const paragraph1 = css\` - font-size: 12px; - transform: \${vert ? "translateY" : "translateX"} - (\${translation + handleOffset}px); -\`; - -const paragraph2 = css\` - transform: \${expr}(30px); -\`; - -const paragraph3 = css\` - transform: \${expr} (30px); -\`; - -================================================================================ -`; - -exports[`styled-components.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const ListItem1 = styled.li\`\`; - -const ListItem2 = styled.li\` \`; - -const Dropdown = styled.div\`position: relative;\` - -const Button = styled.button\` - color: palevioletred ; - - font-size : 1em ; -\`; - -const TomatoButton = Button.extend\` - color : tomato ; - -border-color : tomato - ; - -\`; - -Button.extend.attr({})\` -border-color : black; -\` - -styled(ExistingComponent)\` - color : papayawhip ; background-color: firebrick\`; - - -styled.button.attr({})\` -border : rebeccapurple\`; - -styled(ExistingComponent).attr({})\` -border : rebeccapurple\`; - -styled.div\` - color: \${props => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${props => props.small ? 'font-size: 0.8em;' : ''}; -\` - -styled.div\` - color: \${props => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${props => props.small ? 'font-size: 0.8em;' : ''} -\` - -styled.div\` - /* prettier-ignore */ - color: \${props => props.theme.colors.paragraph}; - \${props => props.small ? 'font-size: 0.8em;' : ''}; -\` - -styled.div\` - color: \${props => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${props => props.small ? 'font-size: 0.8em;' : ''}; - /* prettier-ignore */ - \${props => props.red ? 'color: red;' : ''}; -\` - -styled.div\` - /* prettier-ignore */ - color: \${props => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${props => props.small ? 'font-size: 0.8em;' : ''}; - /* prettier-ignore */ - \${props => props.red ? 'color: red;' : ''}; - /* prettier-ignore */ -\` - -styled.div\` - \${sanitize} \${fonts} - html { - margin: 0; - } -\` - -styled.div\` - \${bar} - baz -\` - -styled.span\` - foo - \${bar} - baz -\` - -styled.div\` - foo - \${bar} - \${baz} -\` - -styled.span\` - \${foo} - \${bar} -\` - -styled.div\` - \${foo} bar -\` - -styled.span\` - \${foo} \${bar} - baz: \${foo} -\` - -styled.span\` -\${foo}; -\${bar}; -\` - -styled.span\` -\${foo}: \${bar}; -\` - -styled.span\` -\${foo}: \${bar} -\` - -styled.span\` -\${foo}: -\${bar} -\` - -styled.span\` -\${foo}: -\${bar}; -\` - -styled.a\` - \${feedbackCountBlockCss} - text-decoration: none; - - \${FeedbackCount} { - margin: 0; - } -\` - -const StyledComponent1 = styled.div\` - \${anInterpolation} - /* a comment */ - - .aRule { - color: red - } -\`; - -const StyledComponent2 = styled.div\` - \${anInterpolation} - - /* a comment */ - - .aRule { - color: red - } -\`; - -const Direction = styled.span\` - \${({ up }) => up && \`color: \${color.positive};\`} - \${({ down }) => down && \`color: \${color.negative};\`} -\`; - -const Direction2 = styled.span\` - \${({ up }) => up && \`color: \${color.positive}\`}; - \${({ down }) => down && \`color: \${color.negative}\`}; -\`; - -const mixin = css\` - color: \${props => props.color}; - \${props => props.otherProperty}: \${props => props.otherValue}; -\`; - -const foo = styled.div\` - display: flex; - \${props => props.useMixin && mixin} -\`; - -const Single1 = styled.div\` - color: red -\`; - -const Single2 = styled.div\` - color: red; -\`; - -const Dropdown2 = styled.div\` - /* A comment to avoid the prettier issue: https://github.com/prettier/prettier/issues/2291 */ - position: relative; -\`; - -const bar = styled.div\` - border-radius: 50%; - border: 5px solid rgba(var(--green-rgb), 0); - display: inline-block; - height: 40px; - width: 40px; - - \${props => - (props.complete || props.inProgress) && - css\` - border-color: rgba(var(--green-rgb), 0.15); - \`} - - div { - background-color: var(--purpleTT); - border-radius: 50%; - border: 4px solid rgba(var(--purple-rgb), 0.2); - color: var(--purpleTT); - display: inline-flex; - - \${props => - props.complete && - css\` - background-color: var(--green); - border-width: 7px; - \`} - - \${props => - (props.complete || props.inProgress) && - css\` - border-color: var(--green); - \`} - } -\`; - -const A = styled.a\` - display: inline-block; - color: #fff; - \${props => props.a &&css\` - display: none; - \`} - height: 30px; -\`; - -const Foo = styled.p\` - max-width: 980px; - \${mediaBreakpointOnlyXs\` - && { - font-size: 0.8rem; - } - \`} - - &.bottom { - margin-top: 3rem; - } -\`; - -styled(A)\` - // prettier-ignore - @media (aaaaaaaaaaaaa) { - z-index: \${(props) => (props.isComplete ? '1' : '0')}; - } -\`; - -const StyledDiv = styled.div\` - \${props => getSize(props.$size.xs)} - \${props => getSize(props.$size.sm, 'sm')} - \${props => getSize(props.$size.md, 'md')} -\`; - -=====================================output===================================== -const ListItem1 = styled.li\`\`; - -const ListItem2 = styled.li\`\`; - -const Dropdown = styled.div\` - position: relative; -\`; - -const Button = styled.button\` - color: palevioletred; - - font-size: 1em; -\`; - -const TomatoButton = Button.extend\` - color: tomato; - - border-color: tomato; -\`; - -Button.extend.attr({})\` - border-color: black; -\`; - -styled(ExistingComponent)\` - color: papayawhip; - background-color: firebrick; -\`; - -styled.button.attr({})\` - border: rebeccapurple; -\`; - -styled(ExistingComponent).attr({})\` - border: rebeccapurple; -\`; - -styled.div\` - color: \${(props) => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${(props) => (props.small ? "font-size: 0.8em;" : "")}; -\`; - -styled.div\` - color: \${(props) => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${(props) => (props.small ? "font-size: 0.8em;" : "")} -\`; - -styled.div\` - /* prettier-ignore */ - color: \${(props) => props.theme.colors.paragraph}; - \${(props) => (props.small ? "font-size: 0.8em;" : "")}; -\`; - -styled.div\` - color: \${(props) => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${(props) => (props.small ? "font-size: 0.8em;" : "")}; - /* prettier-ignore */ - \${(props) => (props.red ? "color: red;" : "")}; -\`; - -styled.div\` - /* prettier-ignore */ - color: \${(props) => props.theme.colors.paragraph}; - /* prettier-ignore */ - \${(props) => (props.small ? "font-size: 0.8em;" : "")}; - /* prettier-ignore */ - \${(props) => (props.red ? "color: red;" : "")}; - /* prettier-ignore */ -\`; - -styled.div\` - \${sanitize} \${fonts} - html { - margin: 0; - } -\`; - -styled.div\` - \${bar} - baz -\`; - -styled.span\` - foo - \${bar} - baz -\`; - -styled.div\` - foo - \${bar} - \${baz} -\`; - -styled.span\` - \${foo} - \${bar} -\`; - -styled.div\` - \${foo} bar -\`; - -styled.span\` - \${foo} \${bar} - baz: \${foo} -\`; - -styled.span\` - \${foo}; - \${bar}; -\`; - -styled.span\` - \${foo}: \${bar}; -\`; - -styled.span\` - \${foo}: \${bar} -\`; - -styled.span\` - \${foo}: \${bar} -\`; - -styled.span\` - \${foo}: \${bar}; -\`; - -styled.a\` - \${feedbackCountBlockCss} - text-decoration: none; - - \${FeedbackCount} { - margin: 0; - } -\`; - -const StyledComponent1 = styled.div\` - \${anInterpolation} - /* a comment */ - - .aRule { - color: red; - } -\`; - -const StyledComponent2 = styled.div\` - \${anInterpolation} - - /* a comment */ - - .aRule { - color: red; - } -\`; - -const Direction = styled.span\` - \${({ up }) => up && \`color: \${color.positive};\`} - \${({ down }) => down && \`color: \${color.negative};\`} -\`; - -const Direction2 = styled.span\` - \${({ up }) => up && \`color: \${color.positive}\`}; - \${({ down }) => down && \`color: \${color.negative}\`}; -\`; - -const mixin = css\` - color: \${(props) => props.color}; - \${(props) => props.otherProperty}: \${(props) => props.otherValue}; -\`; - -const foo = styled.div\` - display: flex; - \${(props) => props.useMixin && mixin} -\`; - -const Single1 = styled.div\` - color: red; -\`; - -const Single2 = styled.div\` - color: red; -\`; - -const Dropdown2 = styled.div\` - /* A comment to avoid the prettier issue: https://github.com/prettier/prettier/issues/2291 */ - position: relative; -\`; - -const bar = styled.div\` - border-radius: 50%; - border: 5px solid rgba(var(--green-rgb), 0); - display: inline-block; - height: 40px; - width: 40px; - - \${(props) => - (props.complete || props.inProgress) && - css\` - border-color: rgba(var(--green-rgb), 0.15); - \`} - - div { - background-color: var(--purpleTT); - border-radius: 50%; - border: 4px solid rgba(var(--purple-rgb), 0.2); - color: var(--purpleTT); - display: inline-flex; - - \${(props) => - props.complete && - css\` - background-color: var(--green); - border-width: 7px; - \`} - - \${(props) => - (props.complete || props.inProgress) && - css\` - border-color: var(--green); - \`} - } -\`; - -const A = styled.a\` - display: inline-block; - color: #fff; - \${(props) => - props.a && - css\` - display: none; - \`} - height: 30px; -\`; - -const Foo = styled.p\` - max-width: 980px; - \${mediaBreakpointOnlyXs\` - && { - font-size: 0.8rem; - } - \`} - - &.bottom { - margin-top: 3rem; - } -\`; - -styled(A)\` - // prettier-ignore - @media (aaaaaaaaaaaaa) { - z-index: \${(props) => (props.isComplete ? "1" : "0")}; - } -\`; - -const StyledDiv = styled.div\` - \${(props) => getSize(props.$size.xs)} - \${(props) => getSize(props.$size.sm, "sm")} - \${(props) => getSize(props.$size.md, "md")} -\`; - -================================================================================ -`; - -exports[`styled-components-multiple-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Header = styled.div\` - \${something()} - & > \${Child}:not(:first-child) { -margin-left:5px; -} -\` - -const Header2 = styled.div\` - \${something()} - & > \${Child}\${Child2}:not(:first-child) { -margin-left:5px; -} -\` - -styled.div\`\${foo}-idle { }\` - -styled.div\`\${foo}-0-idle { }\` - -styled.div\` -font-family: "\${a}", "\${b}"; -\` - -=====================================output===================================== -const Header = styled.div\` - \${something()} - & > \${Child}:not(:first-child) { - margin-left: 5px; - } -\`; - -const Header2 = styled.div\` - \${something()} - & > \${Child}\${Child2}:not(:first-child) { - margin-left: 5px; - } -\`; - -styled.div\` - \${foo}-idle { - } -\`; - -styled.div\` - \${foo}-0-idle { - } -\`; - -styled.div\` - font-family: "\${a}", "\${b}"; -\`; - -================================================================================ -`; - -exports[`url.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -styled.div\`color:red;background: url(http://example.com?q=\${foo})\` - -=====================================output===================================== -styled.div\` - color: red; - background: url(http://example.com?q=\${foo}); -\`; - -================================================================================ -`; - -exports[`var.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Something = styled.div\` - background: var(--\${one}); /* ... */ - border: 1px solid var(--\${two}); /* ... */ -\`; - -const StyledPurchaseCard = styled(Card)\` - min-width: 200px; - background-color: var(--\${props => props.color}); - color: #fff; -\`; - -const v1 = css\` -prop: var(--global--color--\${props.variant}); -\`; - -const v2 = css\` - background-color: var(--global--color--\${props.variant}); - - &:hover { - background-color: var(--global--color--\${props.variant}__one); - } - \` - -export const StyledComponent = styled.div\` - grid-area: area-\${props => props.propName}; -\` - -=====================================output===================================== -const Something = styled.div\` - background: var(--\${one}); /* ... */ - border: 1px solid var(--\${two}); /* ... */ -\`; - -const StyledPurchaseCard = styled(Card)\` - min-width: 200px; - background-color: var(--\${(props) => props.color}); - color: #fff; -\`; - -const v1 = css\` - prop: var(--global--color--\${props.variant}); -\`; - -const v2 = css\` - background-color: var(--global--color--\${props.variant}); - - &:hover { - background-color: var(--global--color--\${props.variant}__one); - } -\`; - -export const StyledComponent = styled.div\` - grid-area: area-\${(props) => props.propName}; -\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-css/format.test.js b/tests/format/js/multiparser-css/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/js/multiparser-css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/multiparser-css/issue-16692.js b/tests/format/js/multiparser-css/issue-16692.js new file mode 100644 index 000000000000..40febe8e1ce5 --- /dev/null +++ b/tests/format/js/multiparser-css/issue-16692.js @@ -0,0 +1,19 @@ +const c1 = styled.div` + border: 1px ${solid} red; +`; + +const c2 = styled.div` + font-size: var(--font-size-h${level}); +`; + +const c3 = styled.div` + grid-area: area-${area}; +`; + +const c4 = styled.div` + grid-area: var(--${one}); +`; + +const c5 = styled.div` + font-size: var(--font-size-h ${level}); +`; diff --git a/tests/format/js/multiparser-css/issue-8352.js b/tests/format/js/multiparser-css/issue-8352.js new file mode 100644 index 000000000000..8dfba6c102b5 --- /dev/null +++ b/tests/format/js/multiparser-css/issue-8352.js @@ -0,0 +1,15 @@ +const StyledComponent = styled.div` + margin-right: -4px; + + ${Container}.isExpanded & { + transform: rotate(-180deg); + } +`; + +const StyledComponent2 = styled.div` + margin-right: -4px; + + ${abc}.camelCase + ${def}.camelCase & { + transform: rotate(-180deg); + } +`; diff --git a/tests/format/js/multiparser-css/jsfmt.spec.js b/tests/format/js/multiparser-css/jsfmt.spec.js deleted file mode 100644 index 61966a7d00c3..000000000000 --- a/tests/format/js/multiparser-css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript", "flow"]); diff --git a/tests/format/js/multiparser-graphql/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-graphql/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8397b6fca62e --- /dev/null +++ b/tests/format/js/multiparser-graphql/__snapshots__/format.test.js.snap @@ -0,0 +1,695 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment-tag.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const query = /* GraphQL */\` + { + user( id : 5 ) { + firstName + + lastName + } + } +\`; + +/* GraphQL */\` + { + user( id : 5 , type: + "without variable assignment" ) { + firstName + + lastName + } + } +\`; + +=====================================output===================================== +const query = /* GraphQL */ \` + { + user(id: 5) { + firstName + + lastName + } + } +\`; + +/* GraphQL */ \` + { + user(id: 5, type: "without variable assignment") { + firstName + + lastName + } + } +\`; + +================================================================================ +`; + +exports[`definitions.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +graphql\` + fragment x on y { + z + } + + fragment a on b { + c + } +\`; + +=====================================output===================================== +graphql\` + fragment x on y { + z + } + + fragment a on b { + c + } +\`; + +================================================================================ +`; + +exports[`escape.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +gql\` + "\\\`foo\\\` mutation payload." + type FooPayload { + bar: String + } +\` + +gql\` +type Project { + "Pattern: \\\`\\\${project}\\\`" + pattern: String + """ + Pattern: \\\`\\\${project}\\\` + """ + pattern: String + + # Also: Escaping the first parentheses... + "Pattern: \\\`$\\{project}\\\`" + pattern: String + # Or escaping the first and second parentheses... + "Pattern: \\\`$\\{project\\}\\\`" + pattern: String +} +\` + +gql\` + """ + - \\\` + - \\\\\\\` + - \\\\ a + - \\\\\\\\ + - $ + - \\$ + - \\\${ + - \\\\\\\${ + - \\u1234 + """ + type A { + a + } +\` + +=====================================output===================================== +gql\` + "\\\`foo\\\` mutation payload." + type FooPayload { + bar: String + } +\`; + +gql\` + type Project { + "Pattern: \\\`\\\${project}\\\`" + pattern: String + """ + Pattern: \\\`\\\${project}\\\` + """ + pattern: String + + # Also: Escaping the first parentheses... + "Pattern: \\\`\\\${project}\\\`" + pattern: String + # Or escaping the first and second parentheses... + "Pattern: \\\`\\\${project}\\\`" + pattern: String + } +\`; + +gql\` + """ + - \\\` + - \\\\\\\` + - \\\\ a + - \\\\\\\\ + - $ + - \\$ + - \\\${ + - \\\\\\\${ + - \\u1234 + """ + type A { + a + } +\`; + +================================================================================ +`; + +exports[`expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +graphql(schema, \` +query allPartsByManufacturerName($name: String!) { + allParts(filter:{manufacturer: {name: $name}}) { +... PartAll +}} +\${fragments.all} +\`) + +const veryLongVariableNameToMakeTheLineBreak = graphql(schema, \` +query allPartsByManufacturerName($name: String!) { + allParts(filter:{manufacturer: {name: $name}}) { +... PartAll +}} +\${fragments.all} +\`) + +=====================================output===================================== +graphql( + schema, + \` + query allPartsByManufacturerName($name: String!) { + allParts(filter: { manufacturer: { name: $name } }) { + ...PartAll + } + } + \${fragments.all} + \`, +); + +const veryLongVariableNameToMakeTheLineBreak = graphql( + schema, + \` + query allPartsByManufacturerName($name: String!) { + allParts(filter: { manufacturer: { name: $name } }) { + ...PartAll + } + } + \${fragments.all} + \`, +); + +================================================================================ +`; + +exports[`graphql.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +graphql(schema, \` +mutation MarkReadNotificationMutation( + $input + : MarkReadNotificationData! + ) +{ markReadNotification(data: $input ) { notification {seenState} } }\`) + +=====================================output===================================== +graphql( + schema, + \` + mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { + markReadNotification(data: $input) { + notification { + seenState + } + } + } + \`, +); + +================================================================================ +`; + +exports[`graphql-tag.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import gql from "graphql-tag"; + +const query = gql\` + { + user( id : 5 ) { + firstName + + lastName + } + } +\`; + + +// With interpolations: + +gql\` +query User { + user(id:5){ + ...UserDetails + ...Friends + } +} + +\${USER_DETAILS_FRAGMENT}\${FRIENDS_FRAGMENT} +\` + + +// Skip if non-toplevel interpolation: + +gql\` +query User { + user(id:\${id}){ name } +} +\` + + +// Skip if top-level interpolation within comment: + +gql\` +query User { + user(id:5){ name } +} +#\${test} +\` + + +// Comment on last line: + +gql\` +query User { + user(id:5){ name } +} +# comment\` +// \` <-- editor syntax highlighting workaround + + +// Preserve up to one blank line between things and enforce linebreak between +// interpolations: + +gql\` +# comment +\${one}\${two} \${three} +\${four} + +\${five} +# comment +\${six} + +# comment +\${seven} +# comment + +\${eight} + + # comment with trailing whitespace + + +# blank line above this comment + + +\` + + +// Interpolation directly before and after query: + +gql\`\${one} query Test { test }\${two}\` + + +// Only interpolation: + +gql\`\${test}\` + + +// Only comment: + +gql\`# comment\` +// \` <-- editor syntax highlighting workaround + + +// Only whitespace: + +gql\` \` + + +// Empty: + +gql\`\` + + +// Comments after other things: +// Currently, comments after interpolations are moved to the next line. +// We might want to keep them on the next line in the future. + +gql\` + \${test} # comment + + query Test { # comment + test # comment + } # comment + \${test} # comment + \${test} # comment + + \${test} # comment + + # comment + \${test} # comment +\` + + +// Larger mixed test: + +gql\` + + + +query User { + test +} + + + +\${USER_DETAILS_FRAGMENT} + + # Comment + # that continues on a new line + + + # and has a blank line in the middle + + \${FRIENDS_FRAGMENT} + \${generateFragment({ + totally: "a good idea" + })} + +\${fragment}#comment + +fragment another on User { name +}\${ fragment }\` + +=====================================output===================================== +import gql from "graphql-tag"; + +const query = gql\` + { + user(id: 5) { + firstName + + lastName + } + } +\`; + +// With interpolations: + +gql\` + query User { + user(id: 5) { + ...UserDetails + ...Friends + } + } + + \${USER_DETAILS_FRAGMENT} + \${FRIENDS_FRAGMENT} +\`; + +// Skip if non-toplevel interpolation: + +gql\` +query User { + user(id:\${id}){ name } +} +\`; + +// Skip if top-level interpolation within comment: + +gql\` +query User { + user(id:5){ name } +} +#\${test} +\`; + +// Comment on last line: + +gql\` + query User { + user(id: 5) { + name + } + } + # comment +\`; +// \` <-- editor syntax highlighting workaround + +// Preserve up to one blank line between things and enforce linebreak between +// interpolations: + +gql\` + # comment + \${one} + \${two} + \${three} + \${four} + + \${five} + # comment + \${six} + + # comment + \${seven} + # comment + + \${eight} + + # comment with trailing whitespace + + # blank line above this comment +\`; + +// Interpolation directly before and after query: + +gql\` + \${one} + query Test { + test + } + \${two} +\`; + +// Only interpolation: + +gql\` + \${test} +\`; + +// Only comment: + +gql\` + # comment +\`; +// \` <-- editor syntax highlighting workaround + +// Only whitespace: + +gql\`\`; + +// Empty: + +gql\`\`; + +// Comments after other things: +// Currently, comments after interpolations are moved to the next line. +// We might want to keep them on the next line in the future. + +gql\` + \${test} + # comment + + query Test { + # comment + test # comment + } # comment + \${test} + # comment + \${test} + # comment + + \${test} + # comment + + # comment + \${test} + # comment +\`; + +// Larger mixed test: + +gql\` + query User { + test + } + + \${USER_DETAILS_FRAGMENT} + + # Comment + # that continues on a new line + + # and has a blank line in the middle + + \${FRIENDS_FRAGMENT} + \${generateFragment({ + totally: "a good idea", + })} + + \${fragment} + #comment + + fragment another on User { + name + } + \${fragment} +\`; + +================================================================================ +`; + +exports[`invalid.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +// none of the embedded GraphQL should be formatted +// for they have an invalid escape sequence + +gql\` + "\\x" + type Foo { + a: string + } +\`; + +gql\` + type Foo { + a: string + } + + \${stuff} + + "\\x" + type Bar { + b : string + } +\`; + +=====================================output===================================== +// none of the embedded GraphQL should be formatted +// for they have an invalid escape sequence + +gql\` + "\\x" + type Foo { + a: string + } +\`; + +gql\` + type Foo { + a: string + } + + \${stuff} + + "\\x" + type Bar { + b : string + } +\`; + +================================================================================ +`; + +exports[`react-relay.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { graphql } = require("react-relay"); + +graphql\` + mutation MarkReadNotificationMutation( + $input + : MarkReadNotificationData! + ) +{ markReadNotification(data: $input ) { notification {seenState} } } +\`; + +graphql.experimental\` + mutation MarkReadNotificationMutation( + $input + : MarkReadNotificationData! + ) +{ markReadNotification(data: $input ) { notification {seenState} } } +\`; + +=====================================output===================================== +const { graphql } = require("react-relay"); + +graphql\` + mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { + markReadNotification(data: $input) { + notification { + seenState + } + } + } +\`; + +graphql.experimental\` + mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { + markReadNotification(data: $input) { + notification { + seenState + } + } + } +\`; + +================================================================================ +`; diff --git a/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ebe2257399ff..000000000000 --- a/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,674 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment-tag.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const query = /* GraphQL */\` - { - user( id : 5 ) { - firstName - - lastName - } - } -\`; - -=====================================output===================================== -const query = /* GraphQL */ \` - { - user(id: 5) { - firstName - - lastName - } - } -\`; - -================================================================================ -`; - -exports[`definitions.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -graphql\` - fragment x on y { - z - } - - fragment a on b { - c - } -\`; - -=====================================output===================================== -graphql\` - fragment x on y { - z - } - - fragment a on b { - c - } -\`; - -================================================================================ -`; - -exports[`escape.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -gql\` - "\\\`foo\\\` mutation payload." - type FooPayload { - bar: String - } -\` - -gql\` -type Project { - "Pattern: \\\`\\\${project}\\\`" - pattern: String - """ - Pattern: \\\`\\\${project}\\\` - """ - pattern: String - - # Also: Escaping the first parentheses... - "Pattern: \\\`$\\{project}\\\`" - pattern: String - # Or escaping the first and second parentheses... - "Pattern: \\\`$\\{project\\}\\\`" - pattern: String -} -\` - -gql\` - """ - - \\\` - - \\\\\\\` - - \\\\ a - - \\\\\\\\ - - $ - - \\$ - - \\\${ - - \\\\\\\${ - - \\u1234 - """ - type A { - a - } -\` - -=====================================output===================================== -gql\` - "\\\`foo\\\` mutation payload." - type FooPayload { - bar: String - } -\`; - -gql\` - type Project { - "Pattern: \\\`\\\${project}\\\`" - pattern: String - """ - Pattern: \\\`\\\${project}\\\` - """ - pattern: String - - # Also: Escaping the first parentheses... - "Pattern: \\\`\\\${project}\\\`" - pattern: String - # Or escaping the first and second parentheses... - "Pattern: \\\`\\\${project}\\\`" - pattern: String - } -\`; - -gql\` - """ - - \\\` - - \\\\\\\` - - \\\\ a - - \\\\\\\\ - - $ - - \\$ - - \\\${ - - \\\\\\\${ - - \\u1234 - """ - type A { - a - } -\`; - -================================================================================ -`; - -exports[`expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -graphql(schema, \` -query allPartsByManufacturerName($name: String!) { - allParts(filter:{manufacturer: {name: $name}}) { -... PartAll -}} -\${fragments.all} -\`) - -const veryLongVariableNameToMakeTheLineBreak = graphql(schema, \` -query allPartsByManufacturerName($name: String!) { - allParts(filter:{manufacturer: {name: $name}}) { -... PartAll -}} -\${fragments.all} -\`) - -=====================================output===================================== -graphql( - schema, - \` - query allPartsByManufacturerName($name: String!) { - allParts(filter: { manufacturer: { name: $name } }) { - ...PartAll - } - } - \${fragments.all} - \` -); - -const veryLongVariableNameToMakeTheLineBreak = graphql( - schema, - \` - query allPartsByManufacturerName($name: String!) { - allParts(filter: { manufacturer: { name: $name } }) { - ...PartAll - } - } - \${fragments.all} - \` -); - -================================================================================ -`; - -exports[`graphql.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -graphql(schema, \` -mutation MarkReadNotificationMutation( - $input - : MarkReadNotificationData! - ) -{ markReadNotification(data: $input ) { notification {seenState} } }\`) - -=====================================output===================================== -graphql( - schema, - \` - mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { - markReadNotification(data: $input) { - notification { - seenState - } - } - } - \` -); - -================================================================================ -`; - -exports[`graphql-tag.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import gql from "graphql-tag"; - -const query = gql\` - { - user( id : 5 ) { - firstName - - lastName - } - } -\`; - - -// With interpolations: - -gql\` -query User { - user(id:5){ - ...UserDetails - ...Friends - } -} - -\${USER_DETAILS_FRAGMENT}\${FRIENDS_FRAGMENT} -\` - - -// Skip if non-toplevel interpolation: - -gql\` -query User { - user(id:\${id}){ name } -} -\` - - -// Skip if top-level interpolation within comment: - -gql\` -query User { - user(id:5){ name } -} -#\${test} -\` - - -// Comment on last line: - -gql\` -query User { - user(id:5){ name } -} -# comment\` -// \` <-- editor syntax highlighting workaround - - -// Preserve up to one blank line between things and enforce linebreak between -// interpolations: - -gql\` -# comment -\${one}\${two} \${three} -\${four} - -\${five} -# comment -\${six} - -# comment -\${seven} -# comment - -\${eight} - - # comment with trailing whitespace - - -# blank line above this comment - - -\` - - -// Interpolation directly before and after query: - -gql\`\${one} query Test { test }\${two}\` - - -// Only interpolation: - -gql\`\${test}\` - - -// Only comment: - -gql\`# comment\` -// \` <-- editor syntax highlighting workaround - - -// Only whitespace: - -gql\` \` - - -// Empty: - -gql\`\` - - -// Comments after other things: -// Currently, comments after interpolations are moved to the next line. -// We might want to keep them on the next line in the future. - -gql\` - \${test} # comment - - query Test { # comment - test # comment - } # comment - \${test} # comment - \${test} # comment - - \${test} # comment - - # comment - \${test} # comment -\` - - -// Larger mixed test: - -gql\` - - - -query User { - test -} - - - -\${USER_DETAILS_FRAGMENT} - - # Comment - # that continues on a new line - - - # and has a blank line in the middle - - \${FRIENDS_FRAGMENT} - \${generateFragment({ - totally: "a good idea" - })} - -\${fragment}#comment - -fragment another on User { name -}\${ fragment }\` - -=====================================output===================================== -import gql from "graphql-tag"; - -const query = gql\` - { - user(id: 5) { - firstName - - lastName - } - } -\`; - -// With interpolations: - -gql\` - query User { - user(id: 5) { - ...UserDetails - ...Friends - } - } - - \${USER_DETAILS_FRAGMENT} - \${FRIENDS_FRAGMENT} -\`; - -// Skip if non-toplevel interpolation: - -gql\` -query User { - user(id:\${id}){ name } -} -\`; - -// Skip if top-level interpolation within comment: - -gql\` -query User { - user(id:5){ name } -} -#\${test} -\`; - -// Comment on last line: - -gql\` - query User { - user(id: 5) { - name - } - } - # comment -\`; -// \` <-- editor syntax highlighting workaround - -// Preserve up to one blank line between things and enforce linebreak between -// interpolations: - -gql\` - # comment - \${one} - \${two} - \${three} - \${four} - - \${five} - # comment - \${six} - - # comment - \${seven} - # comment - - \${eight} - - # comment with trailing whitespace - - # blank line above this comment -\`; - -// Interpolation directly before and after query: - -gql\` - \${one} - query Test { - test - } - \${two} -\`; - -// Only interpolation: - -gql\` - \${test} -\`; - -// Only comment: - -gql\` - # comment -\`; -// \` <-- editor syntax highlighting workaround - -// Only whitespace: - -gql\`\`; - -// Empty: - -gql\`\`; - -// Comments after other things: -// Currently, comments after interpolations are moved to the next line. -// We might want to keep them on the next line in the future. - -gql\` - \${test} - # comment - - query Test { - # comment - test # comment - } # comment - \${test} - # comment - \${test} - # comment - - \${test} - # comment - - # comment - \${test} - # comment -\`; - -// Larger mixed test: - -gql\` - query User { - test - } - - \${USER_DETAILS_FRAGMENT} - - # Comment - # that continues on a new line - - # and has a blank line in the middle - - \${FRIENDS_FRAGMENT} - \${generateFragment({ - totally: "a good idea", - })} - - \${fragment} - #comment - - fragment another on User { - name - } - \${fragment} -\`; - -================================================================================ -`; - -exports[`invalid.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// none of the embedded GraphQL should be formatted -// for they have an invalid escape sequence - -gql\` - "\\x" - type Foo { - a: string - } -\`; - -gql\` - type Foo { - a: string - } - - \${stuff} - - "\\x" - type Bar { - b : string - } -\`; - -=====================================output===================================== -// none of the embedded GraphQL should be formatted -// for they have an invalid escape sequence - -gql\` - "\\x" - type Foo { - a: string - } -\`; - -gql\` - type Foo { - a: string - } - - \${stuff} - - "\\x" - type Bar { - b : string - } -\`; - -================================================================================ -`; - -exports[`react-relay.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { graphql } = require("react-relay"); - -graphql\` - mutation MarkReadNotificationMutation( - $input - : MarkReadNotificationData! - ) -{ markReadNotification(data: $input ) { notification {seenState} } } -\`; - -graphql.experimental\` - mutation MarkReadNotificationMutation( - $input - : MarkReadNotificationData! - ) -{ markReadNotification(data: $input ) { notification {seenState} } } -\`; - -=====================================output===================================== -const { graphql } = require("react-relay"); - -graphql\` - mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { - markReadNotification(data: $input) { - notification { - seenState - } - } - } -\`; - -graphql.experimental\` - mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) { - markReadNotification(data: $input) { - notification { - seenState - } - } - } -\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-graphql/comment-tag.js b/tests/format/js/multiparser-graphql/comment-tag.js index f8a0c18ee4cc..626ef3918d03 100644 --- a/tests/format/js/multiparser-graphql/comment-tag.js +++ b/tests/format/js/multiparser-graphql/comment-tag.js @@ -7,3 +7,14 @@ const query = /* GraphQL */` } } `; + +/* GraphQL */` + { + user( id : 5 , type: + "without variable assignment" ) { + firstName + + lastName + } + } +`; diff --git a/tests/format/js/multiparser-graphql/format.test.js b/tests/format/js/multiparser-graphql/format.test.js new file mode 100644 index 000000000000..f509b709ec61 --- /dev/null +++ b/tests/format/js/multiparser-graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/js/multiparser-graphql/jsfmt.spec.js b/tests/format/js/multiparser-graphql/jsfmt.spec.js deleted file mode 100644 index 8382eddeb1db..000000000000 --- a/tests/format/js/multiparser-graphql/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"]); diff --git a/tests/format/js/multiparser-html/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-html/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..35795533a4ef --- /dev/null +++ b/tests/format/js/multiparser-html/__snapshots__/format.test.js.snap @@ -0,0 +1,684 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-template-literals.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const nestedFun = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; + </script>\`; + +const nestedFun2 = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`\\\\n<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\\n\\\`; + </script>\`; + +setFoo( + html\`<div>one</div> + <div>two</div> + <div>three</div>\`, + secondArgument +); + +setFoo( + html\`<div> + <div>nested</div> + </div> + <div>two</div> + <div>three</div>\`, + secondArgument +); + +setFoo( + html\`<div> + <div>nested</div> + </div>\`, + secondArgument +); + +=====================================output===================================== +const nestedFun = /* HTML */ \` + \${outerExpr(1)} + <script> + const tpl = html\\\` + <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> + \\\`; + </script> +\`; + +const nestedFun2 = /* HTML */ \` + \${outerExpr(1)} + <script> + const tpl = html\\\` + <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> + \\\`; + </script> +\`; + +setFoo( + html\` + <div>one</div> + <div>two</div> + <div>three</div> + \`, + secondArgument, +); + +setFoo( + html\` + <div> + <div>nested</div> + </div> + <div>two</div> + <div>three</div> + \`, + secondArgument, +); + +setFoo( + html\` + <div> + <div>nested</div> + </div> + \`, + secondArgument, +); + +================================================================================ +`; + +exports[`html-template-literals.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const nestedFun = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; + </script>\`; + +const nestedFun2 = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`\\\\n<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\\n\\\`; + </script>\`; + +setFoo( + html\`<div>one</div> + <div>two</div> + <div>three</div>\`, + secondArgument +); + +setFoo( + html\`<div> + <div>nested</div> + </div> + <div>two</div> + <div>three</div>\`, + secondArgument +); + +setFoo( + html\`<div> + <div>nested</div> + </div>\`, + secondArgument +); + +=====================================output===================================== +const nestedFun = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; + </script>\`; + +const nestedFun2 = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\` <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> \\\`; + </script>\`; + +setFoo( + html\`<div>one</div> + <div>two</div> + <div>three</div>\`, + secondArgument, +); + +setFoo( + html\`<div> + <div>nested</div> + </div> + <div>two</div> + <div>three</div>\`, + secondArgument, +); + +setFoo( + html\`<div> + <div>nested</div> + </div>\`, + secondArgument, +); + +================================================================================ +`; + +exports[`issue-10691.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default function include_photoswipe( + gallery_selector = ".my-gallery" +) { + return /* HTML */ \` + <script> + window.addEventListener("load", () => + initPhotoSwipeFromDOM("\${gallery_selector}") + ); + </script>\`; +} + +=====================================output===================================== +export default function include_photoswipe(gallery_selector = ".my-gallery") { + return /* HTML */ \` + <script> + window.addEventListener("load", () => + initPhotoSwipeFromDOM("\${gallery_selector}"), + ); + </script> + \`; +} + +================================================================================ +`; + +exports[`issue-10691.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default function include_photoswipe( + gallery_selector = ".my-gallery" +) { + return /* HTML */ \` + <script> + window.addEventListener("load", () => + initPhotoSwipeFromDOM("\${gallery_selector}") + ); + </script>\`; +} + +=====================================output===================================== +export default function include_photoswipe(gallery_selector = ".my-gallery") { + return /* HTML */ \` <script> + window.addEventListener("load", () => + initPhotoSwipeFromDOM("\${gallery_selector}"), + ); + </script>\`; +} + +================================================================================ +`; + +exports[`lit-html.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { LitElement, html } from '@polymer/lit-element'; + +class MyElement extends LitElement { + static get properties() { + return { + mood: { type: String } + }; + } + + constructor() { + super(); + this.mood = 'happy'; + } + + render() { + return html\` + <style + + + > + .mood { color: green; } + </style + + + + > + + Web Components are <span + + + class="mood" >\${ + this.mood + + }</span + + >! + \`; + } +} + +customElements.define('my-element', MyElement); + +const someHtml1 = html\`<div > hello \${world} </div >\`; +const someHtml2 = /* HTML */ \`<div > hello \${world} </div >\`; + +html\`\` + +html\`<my-element obj=\${obj}></my-element>\`; + +html\` <\${Footer} >footer content<// > \` + +html\` <div /> \` + +html\` + <div /> +\` + +html\`<span>one</span><span>two</span><span>three</span>\`; + +function HelloWorld() { + return html\` + <h3>Bar List</h3> + \${bars.map(bar => html\` + <p>\${bar}</p> + \`)} + \`; +} + +const trickyParens = html\`<script> f((\${expr}) / 2); </script>\`; +const nestedFun = /* HTML */ \`\${outerExpr( 1 )} <script>const tpl = html\\\`<div>\\\${innerExpr( 1 )} \${outerExpr( 2 )}</div>\\\`</script>\`; + +const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` + <script> + const html = /* HTML */ \\\`<script><\\\\/script>\\\`; + </script> +\`; + +const closingScriptTag2 = /* HTML */ \`<script>const scriptTag='<\\\\/script>'; <\\/script>\`; + +html\` + <div style=" + \${ foo} +"></div> +\` +html\` + <div style=\${ + foo + }></div> +\` + +html\`<div style=" color : red; + display :inline "> + </div>\` + +html\`<div style=" color : red; +\${ foo} + display :inline "> + </div>\` +html\`<div style=" color : red; +\${ foo}:\${bar}; + display :inline "> + </div>\` + +=====================================output===================================== +import { LitElement, html } from "@polymer/lit-element"; + +class MyElement extends LitElement { + static get properties() { + return { + mood: { type: String }, + }; + } + + constructor() { + super(); + this.mood = "happy"; + } + + render() { + return html\` + <style> + .mood { + color: green; + } + </style> + + Web Components are + <span class="mood">\${this.mood}</span> + ! + \`; + } +} + +customElements.define("my-element", MyElement); + +const someHtml1 = html\` + <div>hello \${world}</div> +\`; +const someHtml2 = /* HTML */ \` + <div>hello \${world}</div> +\`; + +html\`\`; + +html\` + <my-element obj=\${obj}></my-element> +\`; + +html\` + <\${Footer}>footer content<//> +\`; + +html\` + <div /> +\`; + +html\` + <div /> +\`; + +html\` + <span>one</span> + <span>two</span> + <span>three</span> +\`; + +function HelloWorld() { + return html\` + <h3>Bar List</h3> + \${bars.map( + (bar) => html\` + <p>\${bar}</p> + \`, + )} + \`; +} + +const trickyParens = html\` + <script> + f((\${expr}) / 2); + </script> +\`; +const nestedFun = /* HTML */ \` + \${outerExpr(1)} + <script> + const tpl = html\\\` + <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> + \\\`; + </script> +\`; + +const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` + <script> + const html = /* HTML */ \\\` + <script><\\\\/script> + \\\`; + </script> +\`; + +const closingScriptTag2 = /* HTML */ \` + <script> + const scriptTag = "<\\\\/script>"; + </script> +\`; + +html\` + <div + style=" + \${foo} +" + ></div> +\`; +html\` + <div style=\${foo}></div> +\`; + +html\` + <div + style=" color : red; + display :inline " + ></div> +\`; + +html\` + <div + style=" color : red; +\${foo} + display :inline " + ></div> +\`; +html\` + <div + style=" color : red; +\${foo}:\${bar}; + display :inline " + ></div> +\`; + +================================================================================ +`; + +exports[`lit-html.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { LitElement, html } from '@polymer/lit-element'; + +class MyElement extends LitElement { + static get properties() { + return { + mood: { type: String } + }; + } + + constructor() { + super(); + this.mood = 'happy'; + } + + render() { + return html\` + <style + + + > + .mood { color: green; } + </style + + + + > + + Web Components are <span + + + class="mood" >\${ + this.mood + + }</span + + >! + \`; + } +} + +customElements.define('my-element', MyElement); + +const someHtml1 = html\`<div > hello \${world} </div >\`; +const someHtml2 = /* HTML */ \`<div > hello \${world} </div >\`; + +html\`\` + +html\`<my-element obj=\${obj}></my-element>\`; + +html\` <\${Footer} >footer content<// > \` + +html\` <div /> \` + +html\` + <div /> +\` + +html\`<span>one</span><span>two</span><span>three</span>\`; + +function HelloWorld() { + return html\` + <h3>Bar List</h3> + \${bars.map(bar => html\` + <p>\${bar}</p> + \`)} + \`; +} + +const trickyParens = html\`<script> f((\${expr}) / 2); </script>\`; +const nestedFun = /* HTML */ \`\${outerExpr( 1 )} <script>const tpl = html\\\`<div>\\\${innerExpr( 1 )} \${outerExpr( 2 )}</div>\\\`</script>\`; + +const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` + <script> + const html = /* HTML */ \\\`<script><\\\\/script>\\\`; + </script> +\`; + +const closingScriptTag2 = /* HTML */ \`<script>const scriptTag='<\\\\/script>'; <\\/script>\`; + +html\` + <div style=" + \${ foo} +"></div> +\` +html\` + <div style=\${ + foo + }></div> +\` + +html\`<div style=" color : red; + display :inline "> + </div>\` + +html\`<div style=" color : red; +\${ foo} + display :inline "> + </div>\` +html\`<div style=" color : red; +\${ foo}:\${bar}; + display :inline "> + </div>\` + +=====================================output===================================== +import { LitElement, html } from "@polymer/lit-element"; + +class MyElement extends LitElement { + static get properties() { + return { + mood: { type: String }, + }; + } + + constructor() { + super(); + this.mood = "happy"; + } + + render() { + return html\` + <style> + .mood { + color: green; + } + </style> + + Web Components are <span class="mood">\${this.mood}</span>! + \`; + } +} + +customElements.define("my-element", MyElement); + +const someHtml1 = html\`<div>hello \${world}</div>\`; +const someHtml2 = /* HTML */ \`<div>hello \${world}</div>\`; + +html\`\`; + +html\`<my-element obj=\${obj}></my-element>\`; + +html\` <\${Footer}>footer content<//> \`; + +html\` <div /> \`; + +html\` <div /> \`; + +html\`<span>one</span><span>two</span><span>three</span>\`; + +function HelloWorld() { + return html\` + <h3>Bar List</h3> + \${bars.map((bar) => html\` <p>\${bar}</p> \`)} + \`; +} + +const trickyParens = html\`<script> + f((\${expr}) / 2); +</script>\`; +const nestedFun = /* HTML */ \`\${outerExpr(1)} + <script> + const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; + </script>\`; + +const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` + <script> + const html = /* HTML */ \\\`<script><\\\\/script>\\\`; + </script> +\`; + +const closingScriptTag2 = /* HTML */ \`<script> + const scriptTag = "<\\\\/script>"; +</script>\`; + +html\` + <div + style=" + \${foo} +" + ></div> +\`; +html\` <div style=\${foo}></div> \`; + +html\`<div + style=" color : red; + display :inline " +></div>\`; + +html\`<div + style=" color : red; +\${foo} + display :inline " +></div>\`; +html\`<div + style=" color : red; +\${foo}:\${bar}; + display :inline " +></div>\`; + +================================================================================ +`; diff --git a/tests/format/js/multiparser-html/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-html/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ca455f105f2e..000000000000 --- a/tests/format/js/multiparser-html/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,684 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`html-template-literals.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const nestedFun = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; - </script>\`; - -const nestedFun2 = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`\\\\n<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\\n\\\`; - </script>\`; - -setFoo( - html\`<div>one</div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div>\`, - secondArgument -); - -=====================================output===================================== -const nestedFun = /* HTML */ \` - \${outerExpr(1)} - <script> - const tpl = html\\\` - <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> - \\\`; - </script> -\`; - -const nestedFun2 = /* HTML */ \` - \${outerExpr(1)} - <script> - const tpl = html\\\` - <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> - \\\`; - </script> -\`; - -setFoo( - html\` - <div>one</div> - <div>two</div> - <div>three</div> - \`, - secondArgument -); - -setFoo( - html\` - <div> - <div>nested</div> - </div> - <div>two</div> - <div>three</div> - \`, - secondArgument -); - -setFoo( - html\` - <div> - <div>nested</div> - </div> - \`, - secondArgument -); - -================================================================================ -`; - -exports[`html-template-literals.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const nestedFun = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; - </script>\`; - -const nestedFun2 = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`\\\\n<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\\n\\\`; - </script>\`; - -setFoo( - html\`<div>one</div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div>\`, - secondArgument -); - -=====================================output===================================== -const nestedFun = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; - </script>\`; - -const nestedFun2 = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\` <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> \\\`; - </script>\`; - -setFoo( - html\`<div>one</div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div> - <div>two</div> - <div>three</div>\`, - secondArgument -); - -setFoo( - html\`<div> - <div>nested</div> - </div>\`, - secondArgument -); - -================================================================================ -`; - -exports[`issue-10691.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default function include_photoswipe( - gallery_selector = ".my-gallery" -) { - return /* HTML */ \` - <script> - window.addEventListener("load", () => - initPhotoSwipeFromDOM("\${gallery_selector}") - ); - </script>\`; -} - -=====================================output===================================== -export default function include_photoswipe(gallery_selector = ".my-gallery") { - return /* HTML */ \` - <script> - window.addEventListener("load", () => - initPhotoSwipeFromDOM("\${gallery_selector}") - ); - </script> - \`; -} - -================================================================================ -`; - -exports[`issue-10691.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default function include_photoswipe( - gallery_selector = ".my-gallery" -) { - return /* HTML */ \` - <script> - window.addEventListener("load", () => - initPhotoSwipeFromDOM("\${gallery_selector}") - ); - </script>\`; -} - -=====================================output===================================== -export default function include_photoswipe(gallery_selector = ".my-gallery") { - return /* HTML */ \` <script> - window.addEventListener("load", () => - initPhotoSwipeFromDOM("\${gallery_selector}") - ); - </script>\`; -} - -================================================================================ -`; - -exports[`lit-html.js - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` -====================================options===================================== -htmlWhitespaceSensitivity: "ignore" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { LitElement, html } from '@polymer/lit-element'; - -class MyElement extends LitElement { - static get properties() { - return { - mood: { type: String } - }; - } - - constructor() { - super(); - this.mood = 'happy'; - } - - render() { - return html\` - <style - - - > - .mood { color: green; } - </style - - - - > - - Web Components are <span - - - class="mood" >\${ - this.mood - - }</span - - >! - \`; - } -} - -customElements.define('my-element', MyElement); - -const someHtml1 = html\`<div > hello \${world} </div >\`; -const someHtml2 = /* HTML */ \`<div > hello \${world} </div >\`; - -html\`\` - -html\`<my-element obj=\${obj}></my-element>\`; - -html\` <\${Footer} >footer content<// > \` - -html\` <div /> \` - -html\` - <div /> -\` - -html\`<span>one</span><span>two</span><span>three</span>\`; - -function HelloWorld() { - return html\` - <h3>Bar List</h3> - \${bars.map(bar => html\` - <p>\${bar}</p> - \`)} - \`; -} - -const trickyParens = html\`<script> f((\${expr}) / 2); </script>\`; -const nestedFun = /* HTML */ \`\${outerExpr( 1 )} <script>const tpl = html\\\`<div>\\\${innerExpr( 1 )} \${outerExpr( 2 )}</div>\\\`</script>\`; - -const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` - <script> - const html = /* HTML */ \\\`<script><\\\\/script>\\\`; - </script> -\`; - -const closingScriptTag2 = /* HTML */ \`<script>const scriptTag='<\\\\/script>'; <\\/script>\`; - -html\` - <div style=" - \${ foo} -"></div> -\` -html\` - <div style=\${ - foo - }></div> -\` - -html\`<div style=" color : red; - display :inline "> - </div>\` - -html\`<div style=" color : red; -\${ foo} - display :inline "> - </div>\` -html\`<div style=" color : red; -\${ foo}:\${bar}; - display :inline "> - </div>\` - -=====================================output===================================== -import { LitElement, html } from "@polymer/lit-element"; - -class MyElement extends LitElement { - static get properties() { - return { - mood: { type: String }, - }; - } - - constructor() { - super(); - this.mood = "happy"; - } - - render() { - return html\` - <style> - .mood { - color: green; - } - </style> - - Web Components are - <span class="mood">\${this.mood}</span> - ! - \`; - } -} - -customElements.define("my-element", MyElement); - -const someHtml1 = html\` - <div>hello \${world}</div> -\`; -const someHtml2 = /* HTML */ \` - <div>hello \${world}</div> -\`; - -html\`\`; - -html\` - <my-element obj=\${obj}></my-element> -\`; - -html\` - <\${Footer}>footer content<//> -\`; - -html\` - <div /> -\`; - -html\` - <div /> -\`; - -html\` - <span>one</span> - <span>two</span> - <span>three</span> -\`; - -function HelloWorld() { - return html\` - <h3>Bar List</h3> - \${bars.map( - (bar) => html\` - <p>\${bar}</p> - \` - )} - \`; -} - -const trickyParens = html\` - <script> - f((\${expr}) / 2); - </script> -\`; -const nestedFun = /* HTML */ \` - \${outerExpr(1)} - <script> - const tpl = html\\\` - <div>\\\${innerExpr(1)} \${outerExpr(2)}</div> - \\\`; - </script> -\`; - -const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` - <script> - const html = /* HTML */ \\\` - <script><\\\\/script> - \\\`; - </script> -\`; - -const closingScriptTag2 = /* HTML */ \` - <script> - const scriptTag = "<\\\\/script>"; - </script> -\`; - -html\` - <div - style=" - \${foo} -" - ></div> -\`; -html\` - <div style=\${foo}></div> -\`; - -html\` - <div - style=" color : red; - display :inline " - ></div> -\`; - -html\` - <div - style=" color : red; -\${foo} - display :inline " - ></div> -\`; -html\` - <div - style=" color : red; -\${foo}:\${bar}; - display :inline " - ></div> -\`; - -================================================================================ -`; - -exports[`lit-html.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { LitElement, html } from '@polymer/lit-element'; - -class MyElement extends LitElement { - static get properties() { - return { - mood: { type: String } - }; - } - - constructor() { - super(); - this.mood = 'happy'; - } - - render() { - return html\` - <style - - - > - .mood { color: green; } - </style - - - - > - - Web Components are <span - - - class="mood" >\${ - this.mood - - }</span - - >! - \`; - } -} - -customElements.define('my-element', MyElement); - -const someHtml1 = html\`<div > hello \${world} </div >\`; -const someHtml2 = /* HTML */ \`<div > hello \${world} </div >\`; - -html\`\` - -html\`<my-element obj=\${obj}></my-element>\`; - -html\` <\${Footer} >footer content<// > \` - -html\` <div /> \` - -html\` - <div /> -\` - -html\`<span>one</span><span>two</span><span>three</span>\`; - -function HelloWorld() { - return html\` - <h3>Bar List</h3> - \${bars.map(bar => html\` - <p>\${bar}</p> - \`)} - \`; -} - -const trickyParens = html\`<script> f((\${expr}) / 2); </script>\`; -const nestedFun = /* HTML */ \`\${outerExpr( 1 )} <script>const tpl = html\\\`<div>\\\${innerExpr( 1 )} \${outerExpr( 2 )}</div>\\\`</script>\`; - -const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` - <script> - const html = /* HTML */ \\\`<script><\\\\/script>\\\`; - </script> -\`; - -const closingScriptTag2 = /* HTML */ \`<script>const scriptTag='<\\\\/script>'; <\\/script>\`; - -html\` - <div style=" - \${ foo} -"></div> -\` -html\` - <div style=\${ - foo - }></div> -\` - -html\`<div style=" color : red; - display :inline "> - </div>\` - -html\`<div style=" color : red; -\${ foo} - display :inline "> - </div>\` -html\`<div style=" color : red; -\${ foo}:\${bar}; - display :inline "> - </div>\` - -=====================================output===================================== -import { LitElement, html } from "@polymer/lit-element"; - -class MyElement extends LitElement { - static get properties() { - return { - mood: { type: String }, - }; - } - - constructor() { - super(); - this.mood = "happy"; - } - - render() { - return html\` - <style> - .mood { - color: green; - } - </style> - - Web Components are <span class="mood">\${this.mood}</span>! - \`; - } -} - -customElements.define("my-element", MyElement); - -const someHtml1 = html\`<div>hello \${world}</div>\`; -const someHtml2 = /* HTML */ \`<div>hello \${world}</div>\`; - -html\`\`; - -html\`<my-element obj=\${obj}></my-element>\`; - -html\` <\${Footer}>footer content<//> \`; - -html\` <div /> \`; - -html\` <div /> \`; - -html\`<span>one</span><span>two</span><span>three</span>\`; - -function HelloWorld() { - return html\` - <h3>Bar List</h3> - \${bars.map((bar) => html\` <p>\${bar}</p> \`)} - \`; -} - -const trickyParens = html\`<script> - f((\${expr}) / 2); -</script>\`; -const nestedFun = /* HTML */ \`\${outerExpr(1)} - <script> - const tpl = html\\\`<div>\\\${innerExpr(1)} \${outerExpr(2)}</div>\\\`; - </script>\`; - -const closingScriptTagShouldBeEscapedProperly = /* HTML */ \` - <script> - const html = /* HTML */ \\\`<script><\\\\/script>\\\`; - </script> -\`; - -const closingScriptTag2 = /* HTML */ \`<script> - const scriptTag = "<\\\\/script>"; -</script>\`; - -html\` - <div - style=" - \${foo} -" - ></div> -\`; -html\` <div style=\${foo}></div> \`; - -html\`<div - style=" color : red; - display :inline " -></div>\`; - -html\`<div - style=" color : red; -\${foo} - display :inline " -></div>\`; -html\`<div - style=" color : red; -\${foo}:\${bar}; - display :inline " -></div>\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-html/format.test.js b/tests/format/js/multiparser-html/format.test.js new file mode 100644 index 000000000000..c948cc20a741 --- /dev/null +++ b/tests/format/js/multiparser-html/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + htmlWhitespaceSensitivity: "ignore", +}); diff --git a/tests/format/js/multiparser-html/jsfmt.spec.js b/tests/format/js/multiparser-html/jsfmt.spec.js deleted file mode 100644 index afb41c93b00d..000000000000 --- a/tests/format/js/multiparser-html/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { - htmlWhitespaceSensitivity: "ignore", -}); diff --git a/tests/format/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-html/language-comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/multiparser-html/language-comment/__snapshots__/format.test.js.snap diff --git a/tests/format/js/multiparser-html/language-comment/format.test.js b/tests/format/js/multiparser-html/language-comment/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/multiparser-html/language-comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/multiparser-html/language-comment/jsfmt.spec.js b/tests/format/js/multiparser-html/language-comment/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/multiparser-html/language-comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..eeb4cc3d96fe --- /dev/null +++ b/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap @@ -0,0 +1,168 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`text.js [acorn] format 1`] = ` +"Bad escape sequence in untagged template literal (6:18) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Bad escape sequence in untagged template literal (6:17)" +`; + +exports[`text.js [espree] format 1`] = ` +"Bad escape sequence in untagged template literal (6:18) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Bad escape sequence in untagged template literal" +`; + +exports[`text.js [flow] format 1`] = ` +"Unexpected token ILLEGAL (1:12) +> 1 | foo = foo\`\\u{prettier}\\u{0065}\`; + | ^ + 2 | foo = html\`\\u{prettier}\\u{0065}\`; + 3 | foo = graphql\`\\u{prettier}\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;" +`; + +exports[`text.js [hermes] format 1`] = ` +"untagged template literal contains invalid escape sequence (6:16) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: untagged template literal contains invalid escape sequence (6:16) +foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + ^~~~~~~~~~~~~~~~~~~~~~" +`; + +exports[`text.js [meriyah] format 1`] = ` +"Invalid hexadecimal escape sequence (6:17) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^^^^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: [6:16-6:20]: Invalid hexadecimal escape sequence" +`; + +exports[`text.js [oxc] format 1`] = ` +"Bad escape sequence in untagged template literal (6:18) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^^^^^^^^^^^^^^^^^^^^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" +`; + +exports[`text.js [oxc-ts] format 1`] = ` +"Bad escape sequence in untagged template literal (6:18) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^^^^^^^^^^^^^^^^^^^^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" +`; + +exports[`text.js [typescript] format 1`] = ` +"Hexadecimal digit expected. (6:21) + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; + | ^ + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + 8 | + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Hexadecimal digit expected." +`; + +exports[`text.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = foo\`\\u{prettier}\\u{0065}\`; +foo = html\`\\u{prettier}\\u{0065}\`; +foo = graphql\`\\u{prettier}\\u{0065}\`; +foo = markdown\`\\u{prettier}\\u{0065}\`; +foo = css\`\\u{prettier}\\u{0065}\`; +foo = /* HTML */\`\\u{prettier}\\u{0065}\`; +foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; + +foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = html\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = graphql\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = markdown\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = css\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = /* HTML */\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = /* GraphQL */\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; + +foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = /* HTML */\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = /* GraphQL */\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; + +foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = /* HTML */\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = /* GraphQL */\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; + +=====================================output===================================== +foo = foo\`\\u{prettier}\\u{0065}\`; +foo = html\`\\u{prettier}\\u{0065}\`; +foo = graphql\`\\u{prettier}\\u{0065}\`; +foo = markdown\`\\u{prettier}\\u{0065}\`; +foo = css\`\\u{prettier}\\u{0065}\`; +foo = /* HTML */ \`\\u{prettier}\\u{0065}\`; +foo = /* GraphQL */ \`\\u{prettier}\\u{0065}\`; + +foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = html\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = graphql\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = markdown\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = css\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = /* HTML */ \`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +foo = /* GraphQL */ \`\\u{prettier}\${foo}pr\\u{0065}ttier\`; + +foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = /* HTML */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\`; +foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\`; + +foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = /* HTML */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; +foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; + +================================================================================ +`; diff --git a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9d80b4ef627e..000000000000 --- a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,126 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`text.js [acorn] format 1`] = ` -"Bad escape sequence in untagged template literal (6:18) - 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; - 5 | foo = css\`\\u{prettier}\\u{0065}\`; -> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; - | ^ - 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; - 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" -`; - -exports[`text.js [espree] format 1`] = ` -"Bad escape sequence in untagged template literal (6:18) - 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; - 5 | foo = css\`\\u{prettier}\\u{0065}\`; -> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; - | ^ - 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; - 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" -`; - -exports[`text.js [flow] format 1`] = ` -"Unexpected token ILLEGAL (1:12) -> 1 | foo = foo\`\\u{prettier}\\u{0065}\`; - | ^ - 2 | foo = html\`\\u{prettier}\\u{0065}\`; - 3 | foo = graphql\`\\u{prettier}\\u{0065}\`; - 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;" -`; - -exports[`text.js [meriyah] format 1`] = ` -"Invalid hexadecimal escape sequence (6:20) - 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; - 5 | foo = css\`\\u{prettier}\\u{0065}\`; -> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; - | ^ - 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; - 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" -`; - -exports[`text.js [typescript] format 1`] = ` -"Hexadecimal digit expected. (1:14) -> 1 | foo = foo\`\\u{prettier}\\u{0065}\`; - | ^ - 2 | foo = html\`\\u{prettier}\\u{0065}\`; - 3 | foo = graphql\`\\u{prettier}\\u{0065}\`; - 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;" -`; - -exports[`text.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = foo\`\\u{prettier}\\u{0065}\`; -foo = html\`\\u{prettier}\\u{0065}\`; -foo = graphql\`\\u{prettier}\\u{0065}\`; -foo = markdown\`\\u{prettier}\\u{0065}\`; -foo = css\`\\u{prettier}\\u{0065}\`; -foo = /* HTML */\`\\u{prettier}\\u{0065}\`; -foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; - -foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = html\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = graphql\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = markdown\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = css\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = /* HTML */\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = /* GraphQL */\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; - -foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = /* HTML */\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = /* GraphQL */\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; - -foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = /* HTML */\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = /* GraphQL */\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; - -=====================================output===================================== -foo = foo\`\\u{prettier}\\u{0065}\`; -foo = html\`\\u{prettier}\\u{0065}\`; -foo = graphql\`\\u{prettier}\\u{0065}\`; -foo = markdown\`\\u{prettier}\\u{0065}\`; -foo = css\`\\u{prettier}\\u{0065}\`; -foo = /* HTML */ \`\\u{prettier}\\u{0065}\`; -foo = /* GraphQL */ \`\\u{prettier}\\u{0065}\`; - -foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = html\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = graphql\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = markdown\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = css\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = /* HTML */ \`\\u{prettier}\${foo}pr\\u{0065}ttier\`; -foo = /* GraphQL */ \`\\u{prettier}\${foo}pr\\u{0065}ttier\`; - -foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = /* HTML */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\`; -foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\`; - -foo = foo\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = html\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = graphql\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = markdown\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = css\`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = /* HTML */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; -foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttier\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-invalid/format.test.js b/tests/format/js/multiparser-invalid/format.test.js new file mode 100644 index 000000000000..952dda85bf0b --- /dev/null +++ b/tests/format/js/multiparser-invalid/format.test.js @@ -0,0 +1,12 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + acorn: true, + espree: true, + flow: true, + hermes: true, + typescript: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/multiparser-invalid/jsfmt.spec.js b/tests/format/js/multiparser-invalid/jsfmt.spec.js deleted file mode 100644 index 0f7c244be335..000000000000 --- a/tests/format/js/multiparser-invalid/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - acorn: true, - espree: true, - flow: true, - typescript: true, - meriyah: true, - }, -}); diff --git a/tests/format/js/multiparser-markdown/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..011a4b44ad19 --- /dev/null +++ b/tests/format/js/multiparser-markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,287 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`0-indent.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +md\` +This line shouldn't be indented at all in the resulting output. +\` + +if (true) { + md\` +text1 +- 123 + - 456 + +text2 +- 123 + - 456 + +text3 +- 123 + - 456 +\`; +} + +=====================================output===================================== +md\` +This line shouldn't be indented at all in the resulting output. +\`; + +if (true) { + md\` +text1 + +- 123 + - 456 + +text2 + +- 123 + - 456 + +text3 + +- 123 + - 456 + \`; +} + +================================================================================ +`; + +exports[`codeblock.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +md\` +\\\`\\\`\\\`js +markdown\\\` + \\\\\\\`\\\\\\\`\\\\\\\`js + console.log('hi'); + \\\\\\\`\\\\\\\`\\\\\\\` +\\\` +\\\`\\\`\\\` +\`; + +=====================================output===================================== +md\` +~~~js +markdown\\\` + ~~~js + console.log("hi"); + ~~~ +\\\`; +~~~ +\`; + +================================================================================ +`; + +exports[`escape.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +markdown\` + const cssString = css\\\` + background-color: \\$\\{color('base')\\} + \\\`; +\` + +markdown\` + - \\\` + - \\\\\\\` + - \\\\ a + - \\\\\\\\ + - \\$ + - \\u1234 +\` + +=====================================output===================================== +markdown\` + const cssString = css\\\` background-color: \\$\\{color('base')\\}\\\`; +\`; + +markdown\` + - \\\` + - \\\\\\\` + - \\\\ a + - \\\\\\\\ + - \\$ + - \\u1234 +\`; + +================================================================================ +`; + +exports[`issue-5021.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +if (true) { + md\` +text1 +- 123 + - 456 + +text2 +- 123 + - 456 + +text3 +- 123 + - 456 +\`; +} + +if (true) { + md\` +text1 + +- 123 + - 456 + +text2 + +- 123 + - 456 + +text3 + +- 123 + - 456 + \`; +} + +=====================================output===================================== +if (true) { + md\` +text1 + +- 123 + - 456 + +text2 + +- 123 + - 456 + +text3 + +- 123 + - 456 + \`; +} + +if (true) { + md\` +text1 + +- 123 + - 456 + +text2 + +- 123 + - 456 + +text3 + +- 123 + - 456 + \`; +} + +================================================================================ +`; + +exports[`markdown.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +export default function ReadMe() { + return md\` + ## Why Prettier? + + ### Building and enforcing a style guide + + By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. + - “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” + - “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” + - “Getting tired telling people how to style their product code.” + - “Our top reason was to stop wasting our time debating style nits.” + - “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” + - “I don't want anybody to nitpick any other person ever again.” + - “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” + \`; +} + +=====================================output===================================== +export default function ReadMe() { + return md\` + ## Why Prettier? + + ### Building and enforcing a style guide + + By far the biggest reason for adopting Prettier is to stop all the on-going + debates over styles. It is generally accepted that having a common style + guide is valuable for a project and team but getting there is a very painful + and unrewarding process. People get very emotional around particular ways of + writing code and nobody likes spending time writing and receiving nits. + + - “We want to free mental threads and end discussions around style. While + sometimes fruitful, these discussions are for the most part wasteful.” + - “Literally had an engineer go through a huge effort of cleaning up all of + our code because we were debating ternary style for the longest time and + were inconsistent about it. It was dumb, but it was a weird on-going + "great debate" that wasted lots of little back and forth bits. It's far + easier for us all to agree now: just run Prettier, and go with that + style.” + - “Getting tired telling people how to style their product code.” + - “Our top reason was to stop wasting our time debating style nits.” + - “Having a githook set up has reduced the amount of style issues in PRs + that result in broken builds due to ESLint rules or things I have to + nit-pick or clean up later.” + - “I don't want anybody to nitpick any other person ever again.” + - “It reminds me of how Steve Jobs used to wear the same clothes every day + because he has a million decisions to make and he didn't want to be + bothered to make trivial ones like picking out clothes. I think Prettier + is like that.” + \`; +} + +================================================================================ +`; + +exports[`single-line.js - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +markdown\`# hello\` + +=====================================output===================================== +markdown\` +# hello +\`; + +================================================================================ +`; diff --git a/tests/format/js/multiparser-markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-markdown/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7169bb181f2c..000000000000 --- a/tests/format/js/multiparser-markdown/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,287 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`0-indent.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -md\` -This line shouldn't be indented at all in the resulting output. -\` - -if (true) { - md\` -text1 -- 123 - - 456 - -text2 -- 123 - - 456 - -text3 -- 123 - - 456 -\`; -} - -=====================================output===================================== -md\` -This line shouldn't be indented at all in the resulting output. -\`; - -if (true) { - md\` -text1 - -- 123 - - 456 - -text2 - -- 123 - - 456 - -text3 - -- 123 - - 456 - \`; -} - -================================================================================ -`; - -exports[`codeblock.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -md\` -\\\`\\\`\\\`js -markdown\\\` - \\\\\\\`\\\\\\\`\\\\\\\`js - console.log('hi'); - \\\\\\\`\\\\\\\`\\\\\\\` -\\\` -\\\`\\\`\\\` -\`; - -=====================================output===================================== -md\` -~~~js -markdown\\\` - ~~~js - console.log("hi"); - ~~~ -\\\`; -~~~ -\`; - -================================================================================ -`; - -exports[`escape.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -markdown\` - const cssString = css\\\` - background-color: \\$\\{color('base')\\} - \\\`; -\` - -markdown\` - - \\\` - - \\\\\\\` - - \\\\ a - - \\\\\\\\ - - \\$ - - \\u1234 -\` - -=====================================output===================================== -markdown\` - const cssString = css\\\` background-color: \\$\\{color('base')\\}\\\`; -\`; - -markdown\` - - \\\` - - \\\\\\\` - - \\\\ a - - \\\\\\\\ - - \\$ - - \\u1234 -\`; - -================================================================================ -`; - -exports[`issue-5021.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -if (true) { - md\` -text1 -- 123 - - 456 - -text2 -- 123 - - 456 - -text3 -- 123 - - 456 -\`; -} - -if (true) { - md\` -text1 - -- 123 - - 456 - -text2 - -- 123 - - 456 - -text3 - -- 123 - - 456 - \`; -} - -=====================================output===================================== -if (true) { - md\` -text1 - -- 123 - - 456 - -text2 - -- 123 - - 456 - -text3 - -- 123 - - 456 - \`; -} - -if (true) { - md\` -text1 - -- 123 - - 456 - -text2 - -- 123 - - 456 - -text3 - -- 123 - - 456 - \`; -} - -================================================================================ -`; - -exports[`markdown.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -export default function ReadMe() { - return md\` - ## Why Prettier? - - ### Building and enforcing a style guide - - By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. - - “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” - - “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” - - “Getting tired telling people how to style their product code.” - - “Our top reason was to stop wasting our time debating style nits.” - - “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” - - “I don't want anybody to nitpick any other person ever again.” - - “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” - \`; -} - -=====================================output===================================== -export default function ReadMe() { - return md\` - ## Why Prettier? - - ### Building and enforcing a style guide - - By far the biggest reason for adopting Prettier is to stop all the on-going - debates over styles. It is generally accepted that having a common style - guide is valuable for a project and team but getting there is a very painful - and unrewarding process. People get very emotional around particular ways of - writing code and nobody likes spending time writing and receiving nits. - - - “We want to free mental threads and end discussions around style. While - sometimes fruitful, these discussions are for the most part wasteful.” - - “Literally had an engineer go through a huge effort of cleaning up all of - our code because we were debating ternary style for the longest time and - were inconsistent about it. It was dumb, but it was a weird on-going - "great debate" that wasted lots of little back and forth bits. It's far - easier for us all to agree now: just run Prettier, and go with that - style.” - - “Getting tired telling people how to style their product code.” - - “Our top reason was to stop wasting our time debating style nits.” - - “Having a githook set up has reduced the amount of style issues in PRs - that result in broken builds due to ESLint rules or things I have to - nit-pick or clean up later.” - - “I don't want anybody to nitpick any other person ever again.” - - “It reminds me of how Steve Jobs used to wear the same clothes every day - because he has a million decisions to make and he didn't want to be - bothered to make trivial ones like picking out clothes. I think Prettier - is like that.” - \`; -} - -================================================================================ -`; - -exports[`single-line.js - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -markdown\`# hello\` - -=====================================output===================================== -markdown\` -# hello -\`; - -================================================================================ -`; diff --git a/tests/format/js/multiparser-markdown/format.test.js b/tests/format/js/multiparser-markdown/format.test.js new file mode 100644 index 000000000000..6e2745d9e9f4 --- /dev/null +++ b/tests/format/js/multiparser-markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"], { proseWrap: "always" }); diff --git a/tests/format/js/multiparser-markdown/jsfmt.spec.js b/tests/format/js/multiparser-markdown/jsfmt.spec.js deleted file mode 100644 index 8d0573eaa0ac..000000000000 --- a/tests/format/js/multiparser-markdown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"], { proseWrap: "always" }); diff --git a/tests/format/js/multiparser-text/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-text/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/multiparser-text/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/multiparser-text/__snapshots__/format.test.js.snap diff --git a/tests/format/js/multiparser-text/format.test.js b/tests/format/js/multiparser-text/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/multiparser-text/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/multiparser-text/jsfmt.spec.js b/tests/format/js/multiparser-text/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/multiparser-text/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/new-expression/__snapshots__/format.test.js.snap b/tests/format/js/new-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d7bf0c8030a2 --- /dev/null +++ b/tests/format/js/new-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,83 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new (factory())() +new factory()() + +new (factory())(factory()) + +=====================================output===================================== +new (factory())(); +new factory()(); + +new (factory())(factory()); + +================================================================================ +`; + +exports[`new_expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new (memoize.Cache || MapCache) +new (typeof this == "function" ? this : Dict()) +new (createObj()).prop(a()); +new (x()\`\`.y)(); +new e[f().x].y(); +new e[f()].y(); +new (a().b)(); +new (a().b().c)(); +new (a\`\`()); + +=====================================output===================================== +new (memoize.Cache || MapCache)(); +new (typeof this == "function" ? this : Dict())(); +new (createObj().prop)(a()); +new (x()\`\`.y)(); +new e[f().x].y(); +new e[f()].y(); +new (a().b)(); +new (a().b().c)(); +new (a\`\`())(); + +================================================================================ +`; + +exports[`with-member-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function functionName() { + // indent to make the line break + if (true) { + this._aVeryLongVariableNameToForceLineBreak = new this.Promise( + (resolve, reject) => { + // do something + } + ); + } +} + +=====================================output===================================== +function functionName() { + // indent to make the line break + if (true) { + this._aVeryLongVariableNameToForceLineBreak = new this.Promise( + (resolve, reject) => { + // do something + }, + ); + } +} + +================================================================================ +`; diff --git a/tests/format/js/new-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/new-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 61ce2820f320..000000000000 --- a/tests/format/js/new-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,83 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new (factory())() -new factory()() - -new (factory())(factory()) - -=====================================output===================================== -new (factory())(); -new factory()(); - -new (factory())(factory()); - -================================================================================ -`; - -exports[`new_expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new (memoize.Cache || MapCache) -new (typeof this == "function" ? this : Dict()) -new (createObj()).prop(a()); -new (x()\`\`.y)(); -new e[f().x].y(); -new e[f()].y(); -new (a().b)(); -new (a().b().c)(); -new (a\`\`()); - -=====================================output===================================== -new (memoize.Cache || MapCache)(); -new (typeof this == "function" ? this : Dict())(); -new (createObj().prop)(a()); -new (x()\`\`.y)(); -new e[f().x].y(); -new e[f()].y(); -new (a().b)(); -new (a().b().c)(); -new (a\`\`())(); - -================================================================================ -`; - -exports[`with-member-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function functionName() { - // indent to make the line break - if (true) { - this._aVeryLongVariableNameToForceLineBreak = new this.Promise( - (resolve, reject) => { - // do something - } - ); - } -} - -=====================================output===================================== -function functionName() { - // indent to make the line break - if (true) { - this._aVeryLongVariableNameToForceLineBreak = new this.Promise( - (resolve, reject) => { - // do something - } - ); - } -} - -================================================================================ -`; diff --git a/tests/format/js/new-expression/format.test.js b/tests/format/js/new-expression/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/new-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/new-expression/jsfmt.spec.js b/tests/format/js/new-expression/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/new-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/new-target/__snapshots__/format.test.js.snap b/tests/format/js/new-target/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ef4378d4c66a --- /dev/null +++ b/tests/format/js/new-target/__snapshots__/format.test.js.snap @@ -0,0 +1,123 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`outside-functions.js [acorn] format 1`] = ` +"'new.target' can only be used in functions and class static block (1:11) +> 1 | const x = new.target; + | ^ + 2 | +Cause: 'new.target' can only be used in functions and class static block (1:10)" +`; + +exports[`outside-functions.js [espree] format 1`] = ` +"'new.target' can only be used in functions and class static block (1:11) +> 1 | const x = new.target; + | ^ + 2 | +Cause: 'new.target' can only be used in functions and class static block" +`; + +exports[`outside-functions.js [flow] format 1`] = ` +"Unexpected token \`.\` (1:14) +> 1 | const x = new.target; + | ^ + 2 |" +`; + +exports[`outside-functions.js [hermes] format 1`] = ` +"'new.target' not in a function (1:10) +> 1 | const x = new.target; + | ^ + 2 | +Cause: 'new.target' not in a function (1:10) +const x = new.target; + ^~~~~~~~~~" +`; + +exports[`outside-functions.js [meriyah] format 1`] = ` +"new.target only allowed within functions or static blocks (1:15) +> 1 | const x = new.target; + | ^^^^^^ + 2 | +Cause: [1:14-1:20]: new.target only allowed within functions or static blocks" +`; + +exports[`outside-functions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const x = new.target; + +=====================================output===================================== +const x = new.target; + +================================================================================ +`; + +exports[`range.js [acorn] format 1`] = ` +"'new.target' can only be used in functions and class static block (2:1) + 1 | const x = +> 2 | new.target; + | ^ +Cause: 'new.target' can only be used in functions and class static block (2:0)" +`; + +exports[`range.js [espree] format 1`] = ` +"'new.target' can only be used in functions and class static block (2:1) + 1 | const x = +> 2 | new.target; + | ^ +Cause: 'new.target' can only be used in functions and class static block" +`; + +exports[`range.js [flow] format 1`] = ` +"Unexpected token \`.\` (2:4) + 1 | const x = +> 2 | new.target; + | ^" +`; + +exports[`range.js [hermes] format 1`] = ` +"'new.target' not in a function (2:0) + 1 | const x = +> 2 | new.target; +Cause: 'new.target' not in a function (2:0) +new.target; +^~~~~~~~~~" +`; + +exports[`range.js [meriyah] format 1`] = ` +"new.target only allowed within functions or static blocks (2:5) + 1 | const x = +> 2 | new.target; + | ^^^^^^ +Cause: [2:4-2:10]: new.target only allowed within functions or static blocks" +`; + +exports[`range.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +rangeEnd: 52 +rangeStart: 38 + | | printWidth +=====================================input====================================== + 1 | class A { + 2 | constructor() { +> 3 | const x = + | ^^^ +> 4 | new.target; + | ^^^^^^^^^^ + 5 | } + 6 | } + 7 | +=====================================output===================================== +class A { + constructor() { + const x = new.target; + } +} + +================================================================================ +`; diff --git a/tests/format/js/new-target/format.test.js b/tests/format/js/new-target/format.test.js new file mode 100644 index 000000000000..e844ec5ae0f2 --- /dev/null +++ b/tests/format/js/new-target/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + flow: true, + hermes: true, + }, +}); diff --git a/tests/format/js/new-target/outside-functions.js b/tests/format/js/new-target/outside-functions.js new file mode 100644 index 000000000000..85f7e4833373 --- /dev/null +++ b/tests/format/js/new-target/outside-functions.js @@ -0,0 +1 @@ +const x = new.target; diff --git a/tests/format/js/new-target/range.js b/tests/format/js/new-target/range.js new file mode 100644 index 000000000000..57c38b877018 --- /dev/null +++ b/tests/format/js/new-target/range.js @@ -0,0 +1,6 @@ +class A { + constructor() { + const <<<PRETTIER_RANGE_START>>>x = +new.target<<<PRETTIER_RANGE_END>>>; + } +} diff --git a/tests/format/js/newline/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/newline/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/newline/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/newline/__snapshots__/format.test.js.snap diff --git a/tests/format/js/newline/format.test.js b/tests/format/js/newline/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/newline/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/newline/jsfmt.spec.js b/tests/format/js/newline/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/newline/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap b/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..697933a954b8 --- /dev/null +++ b/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap @@ -0,0 +1,156 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-semi.js [acorn] format 1`] = ` +"Unexpected token (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: Unexpected token (2:1)" +`; + +exports[`no-semi.js [espree] format 1`] = ` +"Unexpected token : (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: Unexpected token :" +`; + +exports[`no-semi.js [meriyah] format 1`] = ` +"Unexpected token: ':' (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: [2:1-2:2]: Unexpected token: ':'" +`; + +exports[`no-semi.js [oxc] format 1`] = ` +"Unexpected token (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b;" +`; + +exports[`no-semi.js - {"semi":false} [acorn] format 1`] = ` +"Unexpected token (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: Unexpected token (2:1)" +`; + +exports[`no-semi.js - {"semi":false} [espree] format 1`] = ` +"Unexpected token : (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: Unexpected token :" +`; + +exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = ` +"Unexpected token: ':' (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b; +Cause: [2:1-2:2]: Unexpected token: ':'" +`; + +exports[`no-semi.js - {"semi":false} [oxc] format 1`] = ` +"Unexpected token (2:2) + 1 | a +> 2 | ;::b.c + | ^ + 3 | + 4 | class A { + 5 | a = b;" +`; + +exports[`no-semi.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a +;::b.c + +class A { + a = b; + in + c + + a = b; + instanceof(){} +} + +=====================================output===================================== +a +;::b.c + +class A { + a = b; + in + c + + a = b; + instanceof() {} +} + +================================================================================ +`; + +exports[`no-semi.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a +;::b.c + +class A { + a = b; + in + c + + a = b; + instanceof(){} +} + +=====================================output===================================== +a; +::b.c; + +class A { + a = b; + in; + c; + + a = b; + instanceof() {} +} + +================================================================================ +`; diff --git a/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 62fddaed328d..000000000000 --- a/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,130 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`no-semi.js [acorn] format 1`] = ` -"Unexpected token (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js [espree] format 1`] = ` -"Unexpected token : (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js [meriyah] format 1`] = ` -"Unexpected token: ':' (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js - {"semi":false} [acorn] format 1`] = ` -"Unexpected token (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js - {"semi":false} [espree] format 1`] = ` -"Unexpected token : (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = ` -"Unexpected token: ':' (2:2) - 1 | a -> 2 | ;::b.c - | ^ - 3 | - 4 | class A { - 5 | a = b;" -`; - -exports[`no-semi.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -a -;::b.c - -class A { - a = b; - in - c - - a = b; - instanceof(){} -} - -=====================================output===================================== -a -;::b.c - -class A { - a = b; - in - c - - a = b; - instanceof() {} -} - -================================================================================ -`; - -exports[`no-semi.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a -;::b.c - -class A { - a = b; - in - c - - a = b; - instanceof(){} -} - -=====================================output===================================== -a; -::b.c; - -class A { - a = b; - in; - c; - - a = b; - instanceof() {} -} - -================================================================================ -`; diff --git a/tests/format/js/no-semi-babylon-extensions/format.test.js b/tests/format/js/no-semi-babylon-extensions/format.test.js new file mode 100644 index 000000000000..ad763c739f80 --- /dev/null +++ b/tests/format/js/no-semi-babylon-extensions/format.test.js @@ -0,0 +1,9 @@ +const errors = { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, +}; +runFormatTest(import.meta, ["babel"], { errors }); +runFormatTest(import.meta, ["babel"], { semi: false, errors }); diff --git a/tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js b/tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js deleted file mode 100644 index 7b852963ceb1..000000000000 --- a/tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); -run_spec(__dirname, ["babel"], { - semi: false, - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/no-semi/__snapshots__/format.test.js.snap b/tests/format/js/no-semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..87a0b3f2c0ec --- /dev/null +++ b/tests/format/js/no-semi/__snapshots__/format.test.js.snap @@ -0,0 +1,1028 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// TODO: upgrade parser +// class A { +// async; // The semicolon is *not* necessary +// x(){} +// } +// class B { +// static; // The semicolon *is* necessary +// x(){} +// } + +class C1 { + get; // The semicolon *is* necessary + x(){} +} +class C2 { + get = () => {}; // The semicolon is *not* necessary + x(){} +} +class C3 { + set; // The semicolon *is* necessary + x(){} +} +class C4 { + set = () => {}; // The semicolon is *not* necessary + x(){} +} + + + +class A1 { + a = 0; + [b](){} + + c = 0; + *d(){} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {}; + [h](){} + + p() {}; + *i(){} + + a = 1; + get ['y']() {} + + a = 1; + static ['y']() {} + + a = 1; + set ['z'](z) {} + + a = 1; + async ['a']() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +class A2 { + a = 0; + [b](){} + + c = 0; + *d(){} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {}; + [h](){} + + p() {}; + *i(){} + + a = 1; + get ['y']() {} + + a = 1; + static ['y']() {} + + a = 1; + set ['z'](z) {} + + a = 1; + async ['a']() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +// being first/last shouldn't break things +class G1 { + x = 1 +} +class G2 { + x() {} +} +class G3 { + *x() {} +} +class G4 { + [x] = 1 +} + +=====================================output===================================== +// TODO: upgrade parser +// class A { +// async; // The semicolon is *not* necessary +// x(){} +// } +// class B { +// static; // The semicolon *is* necessary +// x(){} +// } + +class C1 { + get; // The semicolon *is* necessary + x() {} +} +class C2 { + get = () => {} // The semicolon is *not* necessary + x() {} +} +class C3 { + set; // The semicolon *is* necessary + x() {} +} +class C4 { + set = () => {} // The semicolon is *not* necessary + x() {} +} + +class A1 { + a = 0; + [b]() {} + + c = 0; + *d() {} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {} + [h]() {} + + p() {} + *i() {} + + a = 1 + get ["y"]() {} + + a = 1 + static ["y"]() {} + + a = 1 + set ["z"](z) {} + + a = 1 + async ["a"]() {} + + a = 1 + async *g() {} + + a = 0 + b = 1 +} + +class A2 { + a = 0; + [b]() {} + + c = 0; + *d() {} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {} + [h]() {} + + p() {} + *i() {} + + a = 1 + get ["y"]() {} + + a = 1 + static ["y"]() {} + + a = 1 + set ["z"](z) {} + + a = 1 + async ["a"]() {} + + a = 1 + async *g() {} + + a = 0 + b = 1 +} + +// being first/last shouldn't break things +class G1 { + x = 1 +} +class G2 { + x() {} +} +class G3 { + *x() {} +} +class G4 { + [x] = 1 +} + +================================================================================ +`; + +exports[`class.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TODO: upgrade parser +// class A { +// async; // The semicolon is *not* necessary +// x(){} +// } +// class B { +// static; // The semicolon *is* necessary +// x(){} +// } + +class C1 { + get; // The semicolon *is* necessary + x(){} +} +class C2 { + get = () => {}; // The semicolon is *not* necessary + x(){} +} +class C3 { + set; // The semicolon *is* necessary + x(){} +} +class C4 { + set = () => {}; // The semicolon is *not* necessary + x(){} +} + + + +class A1 { + a = 0; + [b](){} + + c = 0; + *d(){} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {}; + [h](){} + + p() {}; + *i(){} + + a = 1; + get ['y']() {} + + a = 1; + static ['y']() {} + + a = 1; + set ['z'](z) {} + + a = 1; + async ['a']() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +class A2 { + a = 0; + [b](){} + + c = 0; + *d(){} + + e = 0; + [f] = 0 + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {}; + [h](){} + + p() {}; + *i(){} + + a = 1; + get ['y']() {} + + a = 1; + static ['y']() {} + + a = 1; + set ['z'](z) {} + + a = 1; + async ['a']() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +// being first/last shouldn't break things +class G1 { + x = 1 +} +class G2 { + x() {} +} +class G3 { + *x() {} +} +class G4 { + [x] = 1 +} + +=====================================output===================================== +// TODO: upgrade parser +// class A { +// async; // The semicolon is *not* necessary +// x(){} +// } +// class B { +// static; // The semicolon *is* necessary +// x(){} +// } + +class C1 { + get; // The semicolon *is* necessary + x() {} +} +class C2 { + get = () => {}; // The semicolon is *not* necessary + x() {} +} +class C3 { + set; // The semicolon *is* necessary + x() {} +} +class C4 { + set = () => {}; // The semicolon is *not* necessary + x() {} +} + +class A1 { + a = 0; + [b]() {} + + c = 0; + *d() {} + + e = 0; + [f] = 0; + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {} + [h]() {} + + p() {} + *i() {} + + a = 1; + get ["y"]() {} + + a = 1; + static ["y"]() {} + + a = 1; + set ["z"](z) {} + + a = 1; + async ["a"]() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +class A2 { + a = 0; + [b]() {} + + c = 0; + *d() {} + + e = 0; + [f] = 0; + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + q() {} + [h]() {} + + p() {} + *i() {} + + a = 1; + get ["y"]() {} + + a = 1; + static ["y"]() {} + + a = 1; + set ["z"](z) {} + + a = 1; + async ["a"]() {} + + a = 1; + async *g() {} + + a = 0; + b = 1; +} + +// being first/last shouldn't break things +class G1 { + x = 1; +} +class G2 { + x() {} +} +class G3 { + *x() {} +} +class G4 { + [x] = 1; +} + +================================================================================ +`; + +exports[`comments.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +let error = new Error(response.statusText); +// comment +[].response = response + +x; + +/* comment */ [].response = response + +x; + +[].response = response; /* comment */ + +=====================================output===================================== +let error = new Error(response.statusText) +// comment +;[].response = response + +x + +/* comment */ ;[].response = response + +x + +;[].response = response /* comment */ + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let error = new Error(response.statusText); +// comment +[].response = response + +x; + +/* comment */ [].response = response + +x; + +[].response = response; /* comment */ + +=====================================output===================================== +let error = new Error(response.statusText); +// comment +[].response = response; + +x; + +/* comment */ [].response = response; + +x; + +[].response = response; /* comment */ + +================================================================================ +`; + +exports[`issue2006.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +switch (n) { + case 11: + var c = a.e; + (i.a += Ga(c.e)), F(i, c.i, 0); +} + +var c = a.e; +(i.a += Ga(c.e)), F(i, c.i, 0); + +=====================================output===================================== +switch (n) { + case 11: + var c = a.e + ;((i.a += Ga(c.e)), F(i, c.i, 0)) +} + +var c = a.e +;((i.a += Ga(c.e)), F(i, c.i, 0)) + +================================================================================ +`; + +exports[`issue2006.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (n) { + case 11: + var c = a.e; + (i.a += Ga(c.e)), F(i, c.i, 0); +} + +var c = a.e; +(i.a += Ga(c.e)), F(i, c.i, 0); + +=====================================output===================================== +switch (n) { + case 11: + var c = a.e; + ((i.a += Ga(c.e)), F(i, c.i, 0)); +} + +var c = a.e; +((i.a += Ga(c.e)), F(i, c.i, 0)); + +================================================================================ +`; + +exports[`no-semi.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + +// with preexisting semi + +x; [1, 2, 3].forEach(fn) +x; [a, b, ...c] = [1, 2] +x; /r/i.test('r') +x; +1 +x; - 1 +x; ('h' + 'i').repeat(10) +x; (1, 2) +x; (() => {})() +x; ({ a: 1 }).entries() +x; ({ a: 1 }).entries() +x; <Hello /> +x; \`string\` +x; (x, y) => x + +// doesn't have to be preceded by a semicolon + +class X {} [1, 2, 3].forEach(fn) + + +// don't semicolon if it doesn't start statement + +if (true) (() => {})() + + +// check indentation + +if (true) { + x; (() => {})() +} + +// check statement clauses + +do break; while (false) +if (true) do break; while (false) + +if (true) 1; else 2 +for (;;) ; +for (x of y) ; + +debugger + +// check that it doesn't break non-ASI + +1 +- 1 + +1 ++ 1 + +1 +/ 1 + +arr +[0] + +fn +(x) + +!1 + +1 +< 1 + +tag +\`string\` + +x; x => x + +x; (a || b).c++ + +x; ++(a || b).c + +while (false) + (function(){}()) + +aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * + (b + c) + +=====================================output===================================== +// with preexisting semi + +x +;[1, 2, 3].forEach(fn) +x +;[a, b, ...c] = [1, 2] +x +;/r/i.test("r") +x +;+1 +x +;-1 +x +;("h" + "i").repeat(10) +x +;(1, 2) +x +;(() => {})() +x +;({ a: 1 }).entries() +x +;({ a: 1 }).entries() +x +;<Hello /> +x +;\`string\` +x +;(x, y) => x + +// doesn't have to be preceded by a semicolon + +class X {} +;[1, 2, 3].forEach(fn) + +// don't semicolon if it doesn't start statement + +if (true) (() => {})() + +// check indentation + +if (true) { + x + ;(() => {})() +} + +// check statement clauses + +do break +while (false) +if (true) + do break + while (false) + +if (true) 1 +else 2 +for (;;); +for (x of y); + +debugger + +// check that it doesn't break non-ASI + +1 - 1 + +1 + 1 + +1 / 1 + +arr[0] + +fn(x) + +!1 + +1 < 1 + +tag\`string\` + +x +;(x) => x + +x +;(a || b).c++ + +x +++(a || b).c + +while (false) (function () {})() + +aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * + (b + c) + +================================================================================ +`; + +exports[`no-semi.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +// with preexisting semi + +x; [1, 2, 3].forEach(fn) +x; [a, b, ...c] = [1, 2] +x; /r/i.test('r') +x; +1 +x; - 1 +x; ('h' + 'i').repeat(10) +x; (1, 2) +x; (() => {})() +x; ({ a: 1 }).entries() +x; ({ a: 1 }).entries() +x; <Hello /> +x; \`string\` +x; (x, y) => x + +// doesn't have to be preceded by a semicolon + +class X {} [1, 2, 3].forEach(fn) + + +// don't semicolon if it doesn't start statement + +if (true) (() => {})() + + +// check indentation + +if (true) { + x; (() => {})() +} + +// check statement clauses + +do break; while (false) +if (true) do break; while (false) + +if (true) 1; else 2 +for (;;) ; +for (x of y) ; + +debugger + +// check that it doesn't break non-ASI + +1 +- 1 + +1 ++ 1 + +1 +/ 1 + +arr +[0] + +fn +(x) + +!1 + +1 +< 1 + +tag +\`string\` + +x; x => x + +x; (a || b).c++ + +x; ++(a || b).c + +while (false) + (function(){}()) + +aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * + (b + c) + +=====================================output===================================== +// with preexisting semi + +x; +[1, 2, 3].forEach(fn); +x; +[a, b, ...c] = [1, 2]; +x; +/r/i.test("r"); +x; ++1; +x; +-1; +x; +("h" + "i").repeat(10); +x; +(1, 2); +x; +(() => {})(); +x; +({ a: 1 }).entries(); +x; +({ a: 1 }).entries(); +x; +<Hello />; +x; +\`string\`; +x; +(x, y) => x; + +// doesn't have to be preceded by a semicolon + +class X {} +[1, 2, 3].forEach(fn); + +// don't semicolon if it doesn't start statement + +if (true) (() => {})(); + +// check indentation + +if (true) { + x; + (() => {})(); +} + +// check statement clauses + +do break; +while (false); +if (true) + do break; + while (false); + +if (true) 1; +else 2; +for (;;); +for (x of y); + +debugger; + +// check that it doesn't break non-ASI + +1 - 1; + +1 + 1; + +1 / 1; + +arr[0]; + +fn(x); + +!1; + +1 < 1; + +tag\`string\`; + +x; +(x) => x; + +x; +(a || b).c++; + +x; +++(a || b).c; + +while (false) (function () {})(); + +aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * + (b + c); + +================================================================================ +`; + +exports[`private-field.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class C { + #field = 'value'; + ["method"]() {} +} + +=====================================output===================================== +class C { + #field = "value"; + ["method"]() {} +} + +================================================================================ +`; + +exports[`private-field.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + #field = 'value'; + ["method"]() {} +} + +=====================================output===================================== +class C { + #field = "value"; + ["method"]() {} +} + +================================================================================ +`; diff --git a/tests/format/js/no-semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/no-semi/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0029a99c7b8e..000000000000 --- a/tests/format/js/no-semi/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1028 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`class.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// TODO: upgrade parser -// class A { -// async; // The semicolon is *not* necessary -// x(){} -// } -// class B { -// static; // The semicolon *is* necessary -// x(){} -// } - -class C1 { - get; // The semicolon *is* necessary - x(){} -} -class C2 { - get = () => {}; // The semicolon is *not* necessary - x(){} -} -class C3 { - set; // The semicolon *is* necessary - x(){} -} -class C4 { - set = () => {}; // The semicolon is *not* necessary - x(){} -} - - - -class A1 { - a = 0; - [b](){} - - c = 0; - *d(){} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {}; - [h](){} - - p() {}; - *i(){} - - a = 1; - get ['y']() {} - - a = 1; - static ['y']() {} - - a = 1; - set ['z'](z) {} - - a = 1; - async ['a']() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -class A2 { - a = 0; - [b](){} - - c = 0; - *d(){} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {}; - [h](){} - - p() {}; - *i(){} - - a = 1; - get ['y']() {} - - a = 1; - static ['y']() {} - - a = 1; - set ['z'](z) {} - - a = 1; - async ['a']() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -// being first/last shouldn't break things -class G1 { - x = 1 -} -class G2 { - x() {} -} -class G3 { - *x() {} -} -class G4 { - [x] = 1 -} - -=====================================output===================================== -// TODO: upgrade parser -// class A { -// async; // The semicolon is *not* necessary -// x(){} -// } -// class B { -// static; // The semicolon *is* necessary -// x(){} -// } - -class C1 { - get; // The semicolon *is* necessary - x() {} -} -class C2 { - get = () => {} // The semicolon is *not* necessary - x() {} -} -class C3 { - set; // The semicolon *is* necessary - x() {} -} -class C4 { - set = () => {} // The semicolon is *not* necessary - x() {} -} - -class A1 { - a = 0; - [b]() {} - - c = 0; - *d() {} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {} - [h]() {} - - p() {} - *i() {} - - a = 1 - get ["y"]() {} - - a = 1 - static ["y"]() {} - - a = 1 - set ["z"](z) {} - - a = 1 - async ["a"]() {} - - a = 1 - async *g() {} - - a = 0 - b = 1 -} - -class A2 { - a = 0; - [b]() {} - - c = 0; - *d() {} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {} - [h]() {} - - p() {} - *i() {} - - a = 1 - get ["y"]() {} - - a = 1 - static ["y"]() {} - - a = 1 - set ["z"](z) {} - - a = 1 - async ["a"]() {} - - a = 1 - async *g() {} - - a = 0 - b = 1 -} - -// being first/last shouldn't break things -class G1 { - x = 1 -} -class G2 { - x() {} -} -class G3 { - *x() {} -} -class G4 { - [x] = 1 -} - -================================================================================ -`; - -exports[`class.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// TODO: upgrade parser -// class A { -// async; // The semicolon is *not* necessary -// x(){} -// } -// class B { -// static; // The semicolon *is* necessary -// x(){} -// } - -class C1 { - get; // The semicolon *is* necessary - x(){} -} -class C2 { - get = () => {}; // The semicolon is *not* necessary - x(){} -} -class C3 { - set; // The semicolon *is* necessary - x(){} -} -class C4 { - set = () => {}; // The semicolon is *not* necessary - x(){} -} - - - -class A1 { - a = 0; - [b](){} - - c = 0; - *d(){} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {}; - [h](){} - - p() {}; - *i(){} - - a = 1; - get ['y']() {} - - a = 1; - static ['y']() {} - - a = 1; - set ['z'](z) {} - - a = 1; - async ['a']() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -class A2 { - a = 0; - [b](){} - - c = 0; - *d(){} - - e = 0; - [f] = 0 - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {}; - [h](){} - - p() {}; - *i(){} - - a = 1; - get ['y']() {} - - a = 1; - static ['y']() {} - - a = 1; - set ['z'](z) {} - - a = 1; - async ['a']() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -// being first/last shouldn't break things -class G1 { - x = 1 -} -class G2 { - x() {} -} -class G3 { - *x() {} -} -class G4 { - [x] = 1 -} - -=====================================output===================================== -// TODO: upgrade parser -// class A { -// async; // The semicolon is *not* necessary -// x(){} -// } -// class B { -// static; // The semicolon *is* necessary -// x(){} -// } - -class C1 { - get; // The semicolon *is* necessary - x() {} -} -class C2 { - get = () => {}; // The semicolon is *not* necessary - x() {} -} -class C3 { - set; // The semicolon *is* necessary - x() {} -} -class C4 { - set = () => {}; // The semicolon is *not* necessary - x() {} -} - -class A1 { - a = 0; - [b]() {} - - c = 0; - *d() {} - - e = 0; - [f] = 0; - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {} - [h]() {} - - p() {} - *i() {} - - a = 1; - get ["y"]() {} - - a = 1; - static ["y"]() {} - - a = 1; - set ["z"](z) {} - - a = 1; - async ["a"]() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -class A2 { - a = 0; - [b]() {} - - c = 0; - *d() {} - - e = 0; - [f] = 0; - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - q() {} - [h]() {} - - p() {} - *i() {} - - a = 1; - get ["y"]() {} - - a = 1; - static ["y"]() {} - - a = 1; - set ["z"](z) {} - - a = 1; - async ["a"]() {} - - a = 1; - async *g() {} - - a = 0; - b = 1; -} - -// being first/last shouldn't break things -class G1 { - x = 1; -} -class G2 { - x() {} -} -class G3 { - *x() {} -} -class G4 { - [x] = 1; -} - -================================================================================ -`; - -exports[`comments.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -let error = new Error(response.statusText); -// comment -[].response = response - -x; - -/* comment */ [].response = response - -x; - -[].response = response; /* comment */ - -=====================================output===================================== -let error = new Error(response.statusText) -// comment -;[].response = response - -x - -/* comment */ ;[].response = response - -x - -;[].response = response /* comment */ - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -let error = new Error(response.statusText); -// comment -[].response = response - -x; - -/* comment */ [].response = response - -x; - -[].response = response; /* comment */ - -=====================================output===================================== -let error = new Error(response.statusText); -// comment -[].response = response; - -x; - -/* comment */ [].response = response; - -x; - -[].response = response; /* comment */ - -================================================================================ -`; - -exports[`issue2006.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -switch (n) { - case 11: - var c = a.e; - (i.a += Ga(c.e)), F(i, c.i, 0); -} - -var c = a.e; -(i.a += Ga(c.e)), F(i, c.i, 0); - -=====================================output===================================== -switch (n) { - case 11: - var c = a.e - ;(i.a += Ga(c.e)), F(i, c.i, 0) -} - -var c = a.e -;(i.a += Ga(c.e)), F(i, c.i, 0) - -================================================================================ -`; - -exports[`issue2006.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (n) { - case 11: - var c = a.e; - (i.a += Ga(c.e)), F(i, c.i, 0); -} - -var c = a.e; -(i.a += Ga(c.e)), F(i, c.i, 0); - -=====================================output===================================== -switch (n) { - case 11: - var c = a.e; - (i.a += Ga(c.e)), F(i, c.i, 0); -} - -var c = a.e; -(i.a += Ga(c.e)), F(i, c.i, 0); - -================================================================================ -`; - -exports[`no-semi.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== - -// with preexisting semi - -x; [1, 2, 3].forEach(fn) -x; [a, b, ...c] = [1, 2] -x; /r/i.test('r') -x; +1 -x; - 1 -x; ('h' + 'i').repeat(10) -x; (1, 2) -x; (() => {})() -x; ({ a: 1 }).entries() -x; ({ a: 1 }).entries() -x; <Hello /> -x; \`string\` -x; (x, y) => x - -// doesn't have to be preceded by a semicolon - -class X {} [1, 2, 3].forEach(fn) - - -// don't semicolon if it doesn't start statement - -if (true) (() => {})() - - -// check indentation - -if (true) { - x; (() => {})() -} - -// check statement clauses - -do break; while (false) -if (true) do break; while (false) - -if (true) 1; else 2 -for (;;) ; -for (x of y) ; - -debugger - -// check that it doesn't break non-ASI - -1 -- 1 - -1 -+ 1 - -1 -/ 1 - -arr -[0] - -fn -(x) - -!1 - -1 -< 1 - -tag -\`string\` - -x; x => x - -x; (a || b).c++ - -x; ++(a || b).c - -while (false) - (function(){}()) - -aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * - (b + c) - -=====================================output===================================== -// with preexisting semi - -x -;[1, 2, 3].forEach(fn) -x -;[a, b, ...c] = [1, 2] -x -;/r/i.test("r") -x -;+1 -x -;-1 -x -;("h" + "i").repeat(10) -x -1, 2 -x -;(() => {})() -x -;({ a: 1 }).entries() -x -;({ a: 1 }).entries() -x -;<Hello /> -x -;\`string\` -x -;(x, y) => x - -// doesn't have to be preceded by a semicolon - -class X {} -;[1, 2, 3].forEach(fn) - -// don't semicolon if it doesn't start statement - -if (true) (() => {})() - -// check indentation - -if (true) { - x - ;(() => {})() -} - -// check statement clauses - -do break -while (false) -if (true) - do break - while (false) - -if (true) 1 -else 2 -for (;;); -for (x of y); - -debugger - -// check that it doesn't break non-ASI - -1 - 1 - -1 + 1 - -1 / 1 - -arr[0] - -fn(x) - -!1 - -1 < 1 - -tag\`string\` - -x -;(x) => x - -x -;(a || b).c++ - -x -++(a || b).c - -while (false) (function () {})() - -aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * - (b + c) - -================================================================================ -`; - -exports[`no-semi.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - -// with preexisting semi - -x; [1, 2, 3].forEach(fn) -x; [a, b, ...c] = [1, 2] -x; /r/i.test('r') -x; +1 -x; - 1 -x; ('h' + 'i').repeat(10) -x; (1, 2) -x; (() => {})() -x; ({ a: 1 }).entries() -x; ({ a: 1 }).entries() -x; <Hello /> -x; \`string\` -x; (x, y) => x - -// doesn't have to be preceded by a semicolon - -class X {} [1, 2, 3].forEach(fn) - - -// don't semicolon if it doesn't start statement - -if (true) (() => {})() - - -// check indentation - -if (true) { - x; (() => {})() -} - -// check statement clauses - -do break; while (false) -if (true) do break; while (false) - -if (true) 1; else 2 -for (;;) ; -for (x of y) ; - -debugger - -// check that it doesn't break non-ASI - -1 -- 1 - -1 -+ 1 - -1 -/ 1 - -arr -[0] - -fn -(x) - -!1 - -1 -< 1 - -tag -\`string\` - -x; x => x - -x; (a || b).c++ - -x; ++(a || b).c - -while (false) - (function(){}()) - -aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * - (b + c) - -=====================================output===================================== -// with preexisting semi - -x; -[1, 2, 3].forEach(fn); -x; -[a, b, ...c] = [1, 2]; -x; -/r/i.test("r"); -x; -+1; -x; --1; -x; -("h" + "i").repeat(10); -x; -1, 2; -x; -(() => {})(); -x; -({ a: 1 }).entries(); -x; -({ a: 1 }).entries(); -x; -<Hello />; -x; -\`string\`; -x; -(x, y) => x; - -// doesn't have to be preceded by a semicolon - -class X {} -[1, 2, 3].forEach(fn); - -// don't semicolon if it doesn't start statement - -if (true) (() => {})(); - -// check indentation - -if (true) { - x; - (() => {})(); -} - -// check statement clauses - -do break; -while (false); -if (true) - do break; - while (false); - -if (true) 1; -else 2; -for (;;); -for (x of y); - -debugger; - -// check that it doesn't break non-ASI - -1 - 1; - -1 + 1; - -1 / 1; - -arr[0]; - -fn(x); - -!1; - -1 < 1; - -tag\`string\`; - -x; -(x) => x; - -x; -(a || b).c++; - -x; -++(a || b).c; - -while (false) (function () {})(); - -aReallyLongLine012345678901234567890123456789012345678901234567890123456789 * - (b + c); - -================================================================================ -`; - -exports[`private-field.js - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class C { - #field = 'value'; - ["method"]() {} -} - -=====================================output===================================== -class C { - #field = "value"; - ["method"]() {} -} - -================================================================================ -`; - -exports[`private-field.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - #field = 'value'; - ["method"]() {} -} - -=====================================output===================================== -class C { - #field = "value"; - ["method"]() {} -} - -================================================================================ -`; diff --git a/tests/format/js/no-semi/format.test.js b/tests/format/js/no-semi/format.test.js new file mode 100644 index 000000000000..1f6c4a35a283 --- /dev/null +++ b/tests/format/js/no-semi/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "flow"], {}); +runFormatTest(import.meta, ["babel", "flow"], { semi: false }); diff --git a/tests/format/js/no-semi/jsfmt.spec.js b/tests/format/js/no-semi/jsfmt.spec.js deleted file mode 100644 index 54459ab48d0e..000000000000 --- a/tests/format/js/no-semi/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow"], {}); -run_spec(__dirname, ["babel", "flow"], { semi: false }); diff --git a/tests/format/js/non-strict/__snapshots__/format.test.js.snap b/tests/format/js/non-strict/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..391c9d2917f1 --- /dev/null +++ b/tests/format/js/non-strict/__snapshots__/format.test.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`argument-name-clash.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f(a,a){return a} + +=====================================output===================================== +function f(a, a) { + return a; +} + +================================================================================ +`; + +exports[`keywords.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var package = require('../package'); + +/** + * My amazing comment + */ +function myFunction() { + return 'StringGainz'; +} + +=====================================output===================================== +var package = require("../package"); + +/** + * My amazing comment + */ +function myFunction() { + return "StringGainz"; +} + +================================================================================ +`; + +exports[`octal-number.js [typescript] format 1`] = ` +"Octal literals are not allowed. Use the syntax '0o777'. (1:1) +> 1 | 0777 + | ^ + 2 | +Cause: Octal literals are not allowed. Use the syntax '0o777'." +`; + +exports[`octal-number.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +0777 + +=====================================output===================================== +0777; + +================================================================================ +`; diff --git a/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d0bacef711f8..000000000000 --- a/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`argument-name-clash.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f(a,a){return a} - -=====================================output===================================== -function f(a, a) { - return a; -} - -================================================================================ -`; - -exports[`keywords.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var package = require('../package'); - -/** - * My amazing comment - */ -function myFunction() { - return 'StringGainz'; -} - -=====================================output===================================== -var package = require("../package"); - -/** - * My amazing comment - */ -function myFunction() { - return "StringGainz"; -} - -================================================================================ -`; - -exports[`octal-number.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -0777 - -=====================================output===================================== -0777; - -================================================================================ -`; diff --git a/tests/format/js/non-strict/format.test.js b/tests/format/js/non-strict/format.test.js new file mode 100644 index 000000000000..7a5eb3213dbb --- /dev/null +++ b/tests/format/js/non-strict/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "typescript"], { + errors: { typescript: ["octal-number.js"] }, +}); diff --git a/tests/format/js/non-strict/jsfmt.spec.js b/tests/format/js/non-strict/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/js/non-strict/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap b/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..cff90305955e --- /dev/null +++ b/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`nullish_coalesing_operator.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +obj.foo ?? "default"; + +const x = (foo, bar = foo ?? bar) => {}; + +foo ? bar ?? foo : baz; + +foo ?? (bar ?? baz); +(foo ?? bar) ?? baz; + +// Mixing ?? and (&& or ||) requires parens +// It's a syntax error without it. +(foo ?? baz) || baz; +foo ?? (baz || baz); + +(foo ?? baz) && baz; +foo ?? (baz && baz); + +(foo || baz) ?? baz; +foo || (baz ?? baz); + +(foo && baz) ?? baz; +foo && (baz ?? baz); + +foo ?? bar ? a : b; +a ? foo ?? bar : b; +a ? b : foo ?? bar; + +=====================================output===================================== +obj.foo ?? "default"; + +const x = (foo, bar = foo ?? bar) => {}; + +foo ? (bar ?? foo) : baz; + +foo ?? bar ?? baz; +foo ?? bar ?? baz; + +// Mixing ?? and (&& or ||) requires parens +// It's a syntax error without it. +(foo ?? baz) || baz; +foo ?? (baz || baz); + +(foo ?? baz) && baz; +foo ?? (baz && baz); + +(foo || baz) ?? baz; +foo || (baz ?? baz); + +(foo && baz) ?? baz; +foo && (baz ?? baz); + +(foo ?? bar) ? a : b; +a ? (foo ?? bar) : b; +a ? b : (foo ?? bar); + +================================================================================ +`; diff --git a/tests/format/js/nullish-coalescing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/nullish-coalescing/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1e1bdff6a5fb..000000000000 --- a/tests/format/js/nullish-coalescing/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,57 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`nullish_coalesing_operator.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -obj.foo ?? "default"; - -const x = (foo, bar = foo ?? bar) => {}; - -foo ? bar ?? foo : baz; - -foo ?? (bar ?? baz); -(foo ?? bar) ?? baz; - -// Mixing ?? and (&& or ||) requires parens -// It's a syntax error without it. -(foo ?? baz) || baz; -foo ?? (baz || baz); - -(foo ?? baz) && baz; -foo ?? (baz && baz); - -(foo || baz) ?? baz; -foo || (baz ?? baz); - -(foo && baz) ?? baz; -foo && (baz ?? baz); - -=====================================output===================================== -obj.foo ?? "default"; - -const x = (foo, bar = foo ?? bar) => {}; - -foo ? bar ?? foo : baz; - -foo ?? bar ?? baz; -foo ?? bar ?? baz; - -// Mixing ?? and (&& or ||) requires parens -// It's a syntax error without it. -(foo ?? baz) || baz; -foo ?? (baz || baz); - -(foo ?? baz) && baz; -foo ?? (baz && baz); - -(foo || baz) ?? baz; -foo || (baz ?? baz); - -(foo && baz) ?? baz; -foo && (baz ?? baz); - -================================================================================ -`; diff --git a/tests/format/js/nullish-coalescing/format.test.js b/tests/format/js/nullish-coalescing/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/nullish-coalescing/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/nullish-coalescing/jsfmt.spec.js b/tests/format/js/nullish-coalescing/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/nullish-coalescing/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/nullish-coalescing/nullish_coalesing_operator.js b/tests/format/js/nullish-coalescing/nullish_coalesing_operator.js index 327b348b5e19..4e466ce59916 100644 --- a/tests/format/js/nullish-coalescing/nullish_coalesing_operator.js +++ b/tests/format/js/nullish-coalescing/nullish_coalesing_operator.js @@ -20,3 +20,7 @@ foo || (baz ?? baz); (foo && baz) ?? baz; foo && (baz ?? baz); + +foo ?? bar ? a : b; +a ? foo ?? bar : b; +a ? b : foo ?? bar; diff --git a/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap b/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b4d516a8825c --- /dev/null +++ b/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`number.js [typescript] format 1`] = ` +"Decimals with leading zeros are not allowed. (3:5) + 1 | // https://github.com/babel/babel/pull/11854 + 2 | +> 3 | a = 09e1_1; + | ^ + 4 | a = 09.1_1; + 5 | +Cause: Decimals with leading zeros are not allowed." +`; + +exports[`number.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1; +a = 09.1_1; + +=====================================output===================================== +// https://github.com/babel/babel/pull/11854 + +a = 09e1_1; +a = 09.1_1; + +================================================================================ +`; diff --git a/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 76095c788dd9..000000000000 --- a/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`number.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11854 - -a = 09e1_1; -a = 09.1_1; - -=====================================output===================================== -// https://github.com/babel/babel/pull/11854 - -a = 09e1_1; -a = 09.1_1; - -================================================================================ -`; diff --git a/tests/format/js/numeric-separators/format.test.js b/tests/format/js/numeric-separators/format.test.js new file mode 100644 index 000000000000..e43c226ea8ed --- /dev/null +++ b/tests/format/js/numeric-separators/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "typescript"], { + errors: { typescript: ["number.js"] }, +}); diff --git a/tests/format/js/numeric-separators/jsfmt.spec.js b/tests/format/js/numeric-separators/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/js/numeric-separators/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/js/object-colon-bug/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/object-colon-bug/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/object-colon-bug/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/object-colon-bug/__snapshots__/format.test.js.snap diff --git a/tests/format/js/object-colon-bug/format.test.js b/tests/format/js/object-colon-bug/format.test.js new file mode 100644 index 000000000000..b7f8f9277506 --- /dev/null +++ b/tests/format/js/object-colon-bug/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { printWidth: 35 }); diff --git a/tests/format/js/object-colon-bug/jsfmt.spec.js b/tests/format/js/object-colon-bug/jsfmt.spec.js deleted file mode 100644 index 008da567b1a3..000000000000 --- a/tests/format/js/object-colon-bug/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { printWidth: 35 }); diff --git a/tests/format/js/object-multiline/__snapshots__/format.test.js.snap b/tests/format/js/object-multiline/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1464781c67a6 --- /dev/null +++ b/tests/format/js/object-multiline/__snapshots__/format.test.js.snap @@ -0,0 +1,87 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`multiline.js - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = { + name1: 'value1', + name2: 'value2', +}; + +const b = { name1: 'value1', + name2: 'value2', +}; + +const c = { + name1: 'value1', name2: 'value2', +}; + +const d = { + name1: 'value1', name2: 'value2', }; + +const e = { name1: 'value1', name2: 'value2', }; + +=====================================output===================================== +const a = { name1: "value1", name2: "value2" }; + +const b = { name1: "value1", name2: "value2" }; + +const c = { name1: "value1", name2: "value2" }; + +const d = { name1: "value1", name2: "value2" }; + +const e = { name1: "value1", name2: "value2" }; + +================================================================================ +`; + +exports[`multiline.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = { + name1: 'value1', + name2: 'value2', +}; + +const b = { name1: 'value1', + name2: 'value2', +}; + +const c = { + name1: 'value1', name2: 'value2', +}; + +const d = { + name1: 'value1', name2: 'value2', }; + +const e = { name1: 'value1', name2: 'value2', }; + +=====================================output===================================== +const a = { + name1: "value1", + name2: "value2", +}; + +const b = { name1: "value1", name2: "value2" }; + +const c = { + name1: "value1", + name2: "value2", +}; + +const d = { + name1: "value1", + name2: "value2", +}; + +const e = { name1: "value1", name2: "value2" }; + +================================================================================ +`; diff --git a/tests/format/js/object-multiline/format.test.js b/tests/format/js/object-multiline/format.test.js new file mode 100644 index 000000000000..cee83268f810 --- /dev/null +++ b/tests/format/js/object-multiline/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel"]); +runFormatTest(import.meta, ["babel"], { objectWrap: "collapse" }); diff --git a/tests/format/js/object-multiline/multiline.js b/tests/format/js/object-multiline/multiline.js new file mode 100644 index 000000000000..24c93257c45f --- /dev/null +++ b/tests/format/js/object-multiline/multiline.js @@ -0,0 +1,17 @@ +const a = { + name1: 'value1', + name2: 'value2', +}; + +const b = { name1: 'value1', + name2: 'value2', +}; + +const c = { + name1: 'value1', name2: 'value2', +}; + +const d = { + name1: 'value1', name2: 'value2', }; + +const e = { name1: 'value1', name2: 'value2', }; diff --git a/tests/format/js/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/object-prop-break-in/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/object-prop-break-in/__snapshots__/format.test.js.snap diff --git a/tests/format/js/object-prop-break-in/format.test.js b/tests/format/js/object-prop-break-in/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/object-prop-break-in/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/object-prop-break-in/jsfmt.spec.js b/tests/format/js/object-prop-break-in/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/object-prop-break-in/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/object-property-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/object-property-comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/object-property-comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/object-property-comment/__snapshots__/format.test.js.snap diff --git a/tests/format/js/object-property-comment/format.test.js b/tests/format/js/object-property-comment/format.test.js new file mode 100644 index 000000000000..3870299db86c --- /dev/null +++ b/tests/format/js/object-property-comment/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow"], { + errors: { acorn: ["comment.js"], espree: ["comment.js"] }, +}); diff --git a/tests/format/js/object-property-comment/jsfmt.spec.js b/tests/format/js/object-property-comment/jsfmt.spec.js deleted file mode 100644 index 127889b64918..000000000000 --- a/tests/format/js/object-property-comment/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "flow"], { - errors: { acorn: ["comment.js"], espree: ["comment.js"] }, -}); diff --git a/tests/format/js/object-property-ignore/__snapshots__/format.test.js.snap b/tests/format/js/object-property-ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..09d991a769ff --- /dev/null +++ b/tests/format/js/object-property-ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,667 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ignore.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +foo = { + // prettier-ignore + bar: 1, +} + +foo = { + _: '', + // prettier-ignore + bar: 1, +} + +/* comments */ +foo = { + _: '', + // prettier-ignore + bar: 1, // comment +} + +foo = { + _: '', + // prettier-ignore + bar: 1, /* comment */ +} + +foo = { + _: '', + // prettier-ignore + bar: /* comment */ 1, +} + +/* SpreadElement */ +foo = { + _: '', + // prettier-ignore + ...bar, +} + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3] +}, + // prettier-ignore + bar: 1, +} + +=====================================output===================================== +foo = { + // prettier-ignore + bar: 1, +}; + +foo = { + _: "", + // prettier-ignore + bar: 1, +}; + +/* comments */ +foo = { + _: "", + // prettier-ignore + bar: 1, // comment +}; + +foo = { + _: "", + // prettier-ignore + bar: 1 /* comment */, +}; + +foo = { + _: "", + // prettier-ignore + bar: /* comment */ 1, +}; + +/* SpreadElement */ +foo = { + _: "", + // prettier-ignore + ...bar, +}; + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3], + }, + // prettier-ignore + bar: 1, +}; + +================================================================================ +`; + +exports[`ignore.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +foo = { + // prettier-ignore + bar: 1, +} + +foo = { + _: '', + // prettier-ignore + bar: 1, +} + +/* comments */ +foo = { + _: '', + // prettier-ignore + bar: 1, // comment +} + +foo = { + _: '', + // prettier-ignore + bar: 1, /* comment */ +} + +foo = { + _: '', + // prettier-ignore + bar: /* comment */ 1, +} + +/* SpreadElement */ +foo = { + _: '', + // prettier-ignore + ...bar, +} + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3] +}, + // prettier-ignore + bar: 1, +} + +=====================================output===================================== +foo = { + // prettier-ignore + bar: 1, +}; + +foo = { + _: "", + // prettier-ignore + bar: 1, +}; + +/* comments */ +foo = { + _: "", + // prettier-ignore + bar: 1, // comment +}; + +foo = { + _: "", + // prettier-ignore + bar: 1 /* comment */, +}; + +foo = { + _: "", + // prettier-ignore + bar: /* comment */ 1, +}; + +/* SpreadElement */ +foo = { + _: "", + // prettier-ignore + ...bar, +}; + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3], + }, + // prettier-ignore + bar: 1, +}; + +================================================================================ +`; + +exports[`ignore.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +foo = { + // prettier-ignore + bar: 1, +} + +foo = { + _: '', + // prettier-ignore + bar: 1, +} + +/* comments */ +foo = { + _: '', + // prettier-ignore + bar: 1, // comment +} + +foo = { + _: '', + // prettier-ignore + bar: 1, /* comment */ +} + +foo = { + _: '', + // prettier-ignore + bar: /* comment */ 1, +} + +/* SpreadElement */ +foo = { + _: '', + // prettier-ignore + ...bar, +} + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3] +}, + // prettier-ignore + bar: 1, +} + +=====================================output===================================== +foo = { + // prettier-ignore + bar: 1 +}; + +foo = { + _: "", + // prettier-ignore + bar: 1 +}; + +/* comments */ +foo = { + _: "", + // prettier-ignore + bar: 1 // comment +}; + +foo = { + _: "", + // prettier-ignore + bar: 1 /* comment */ +}; + +foo = { + _: "", + // prettier-ignore + bar: /* comment */ 1 +}; + +/* SpreadElement */ +foo = { + _: "", + // prettier-ignore + ...bar +}; + +// Nested +foo = { + baz: { + // prettier-ignore + foo: [1, 2, 3] + }, + // prettier-ignore + bar: 1 +}; + +================================================================================ +`; + +exports[`issue-5678.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// #5678 +const refreshTokenPayload = { + type: 'refreshToken', + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90), // (90 days) + }; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 " +} + +=====================================output===================================== +// #5678 +const refreshTokenPayload = { + type: "refreshToken", + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90), // (90 days) +}; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 ", +}; + +================================================================================ +`; + +exports[`issue-5678.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// #5678 +const refreshTokenPayload = { + type: 'refreshToken', + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90), // (90 days) + }; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 " +} + +=====================================output===================================== +// #5678 +const refreshTokenPayload = { + type: "refreshToken", + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90), // (90 days) +}; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 ", +}; + +================================================================================ +`; + +exports[`issue-5678.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +// #5678 +const refreshTokenPayload = { + type: 'refreshToken', + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90), // (90 days) + }; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 " +} + +=====================================output===================================== +// #5678 +const refreshTokenPayload = { + type: "refreshToken", + sub: this._id, + role: this.role, + // prettier-ignore + exp: now + (60 * 60 * 24 * 90) // (90 days) +}; + +export default { + // prettier-ignore + protagonist: " 0\\r\\n" + + "0 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0", + + // prettier-ignore + wall: "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000\\r\\n" + + "00000", + + // prettier-ignore + cheese: "0\\r\\n" + + " 0\\r\\n" + + "000\\r\\n" + + "00 0\\r\\n" + + "00000", + + // prettier-ignore + enemy: "0 0\\r\\n" + + "00 00\\r\\n" + + "00000\\r\\n" + + "0 0 0\\r\\n" + + "00000", + + // prettier-ignore + home: "00000\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "0 0\\r\\n" + + "00000", + + // prettier-ignore + dog: "00 00\\r\\n" + + "00000\\r\\n" + + "0 0\\r\\n" + + "0 0 0\\r\\n" + + " 000 " +}; + +================================================================================ +`; diff --git a/tests/format/js/object-property-ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/object-property-ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 332bd561fa85..000000000000 --- a/tests/format/js/object-property-ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,665 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignore.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -foo = { - // prettier-ignore - bar: 1, -} - -foo = { - _: '', - // prettier-ignore - bar: 1, -} - -/* comments */ -foo = { - _: '', - // prettier-ignore - bar: 1, // comment -} - -foo = { - _: '', - // prettier-ignore - bar: 1, /* comment */ -} - -foo = { - _: '', - // prettier-ignore - bar: /* comment */ 1, -} - -/* SpreadElement */ -foo = { - _: '', - // prettier-ignore - ...bar, -} - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3] -}, - // prettier-ignore - bar: 1, -} - -=====================================output===================================== -foo = { - // prettier-ignore - bar: 1, -}; - -foo = { - _: "", - // prettier-ignore - bar: 1, -}; - -/* comments */ -foo = { - _: "", - // prettier-ignore - bar: 1, // comment -}; - -foo = { - _: "", - // prettier-ignore - bar: 1 /* comment */, -}; - -foo = { - _: "", - // prettier-ignore - bar: /* comment */ 1, -}; - -/* SpreadElement */ -foo = { - _: "", - // prettier-ignore - ...bar, -}; - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3], - }, - // prettier-ignore - bar: 1, -}; - -================================================================================ -`; - -exports[`ignore.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -foo = { - // prettier-ignore - bar: 1, -} - -foo = { - _: '', - // prettier-ignore - bar: 1, -} - -/* comments */ -foo = { - _: '', - // prettier-ignore - bar: 1, // comment -} - -foo = { - _: '', - // prettier-ignore - bar: 1, /* comment */ -} - -foo = { - _: '', - // prettier-ignore - bar: /* comment */ 1, -} - -/* SpreadElement */ -foo = { - _: '', - // prettier-ignore - ...bar, -} - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3] -}, - // prettier-ignore - bar: 1, -} - -=====================================output===================================== -foo = { - // prettier-ignore - bar: 1 -}; - -foo = { - _: "", - // prettier-ignore - bar: 1 -}; - -/* comments */ -foo = { - _: "", - // prettier-ignore - bar: 1 // comment -}; - -foo = { - _: "", - // prettier-ignore - bar: 1 /* comment */ -}; - -foo = { - _: "", - // prettier-ignore - bar: /* comment */ 1 -}; - -/* SpreadElement */ -foo = { - _: "", - // prettier-ignore - ...bar -}; - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3] - }, - // prettier-ignore - bar: 1 -}; - -================================================================================ -`; - -exports[`ignore.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = { - // prettier-ignore - bar: 1, -} - -foo = { - _: '', - // prettier-ignore - bar: 1, -} - -/* comments */ -foo = { - _: '', - // prettier-ignore - bar: 1, // comment -} - -foo = { - _: '', - // prettier-ignore - bar: 1, /* comment */ -} - -foo = { - _: '', - // prettier-ignore - bar: /* comment */ 1, -} - -/* SpreadElement */ -foo = { - _: '', - // prettier-ignore - ...bar, -} - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3] -}, - // prettier-ignore - bar: 1, -} - -=====================================output===================================== -foo = { - // prettier-ignore - bar: 1, -}; - -foo = { - _: "", - // prettier-ignore - bar: 1, -}; - -/* comments */ -foo = { - _: "", - // prettier-ignore - bar: 1, // comment -}; - -foo = { - _: "", - // prettier-ignore - bar: 1 /* comment */, -}; - -foo = { - _: "", - // prettier-ignore - bar: /* comment */ 1, -}; - -/* SpreadElement */ -foo = { - _: "", - // prettier-ignore - ...bar, -}; - -// Nested -foo = { - baz: { - // prettier-ignore - foo: [1, 2, 3], - }, - // prettier-ignore - bar: 1, -}; - -================================================================================ -`; - -exports[`issue-5678.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// #5678 -const refreshTokenPayload = { - type: 'refreshToken', - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90), // (90 days) - }; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 " -} - -=====================================output===================================== -// #5678 -const refreshTokenPayload = { - type: "refreshToken", - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90), // (90 days) -}; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 ", -}; - -================================================================================ -`; - -exports[`issue-5678.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -// #5678 -const refreshTokenPayload = { - type: 'refreshToken', - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90), // (90 days) - }; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 " -} - -=====================================output===================================== -// #5678 -const refreshTokenPayload = { - type: "refreshToken", - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90) // (90 days) -}; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 " -}; - -================================================================================ -`; - -exports[`issue-5678.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #5678 -const refreshTokenPayload = { - type: 'refreshToken', - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90), // (90 days) - }; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 " -} - -=====================================output===================================== -// #5678 -const refreshTokenPayload = { - type: "refreshToken", - sub: this._id, - role: this.role, - // prettier-ignore - exp: now + (60 * 60 * 24 * 90), // (90 days) -}; - -export default { - // prettier-ignore - protagonist: " 0\\r\\n" + - "0 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0", - - // prettier-ignore - wall: "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000\\r\\n" + - "00000", - - // prettier-ignore - cheese: "0\\r\\n" + - " 0\\r\\n" + - "000\\r\\n" + - "00 0\\r\\n" + - "00000", - - // prettier-ignore - enemy: "0 0\\r\\n" + - "00 00\\r\\n" + - "00000\\r\\n" + - "0 0 0\\r\\n" + - "00000", - - // prettier-ignore - home: "00000\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "0 0\\r\\n" + - "00000", - - // prettier-ignore - dog: "00 00\\r\\n" + - "00000\\r\\n" + - "0 0\\r\\n" + - "0 0 0\\r\\n" + - " 000 ", -}; - -================================================================================ -`; diff --git a/tests/format/js/object-property-ignore/format.test.js b/tests/format/js/object-property-ignore/format.test.js new file mode 100644 index 000000000000..cd8d8ff7c375 --- /dev/null +++ b/tests/format/js/object-property-ignore/format.test.js @@ -0,0 +1,5 @@ +const parser = ["babel", "flow", "typescript"]; + +runFormatTest(import.meta, parser, { trailingComma: "es5" }); +runFormatTest(import.meta, parser, { trailingComma: "none" }); +runFormatTest(import.meta, parser, { trailingComma: "all" }); diff --git a/tests/format/js/object-property-ignore/jsfmt.spec.js b/tests/format/js/object-property-ignore/jsfmt.spec.js deleted file mode 100644 index 67d7fda657b9..000000000000 --- a/tests/format/js/object-property-ignore/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -const parser = ["babel", "flow", "typescript"]; - -run_spec(__dirname, parser /*, { trailingComma: "es5" }*/); -run_spec(__dirname, parser, { trailingComma: "none" }); -run_spec(__dirname, parser, { trailingComma: "all" }); diff --git a/tests/format/js/objects/__snapshots__/format.test.js.snap b/tests/format/js/objects/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e04158e9d41f --- /dev/null +++ b/tests/format/js/objects/__snapshots__/format.test.js.snap @@ -0,0 +1,364 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`bigint-key.js [hermes] format 1`] = ` +"invalid property name - must be a string, number or identifier (1:5) +> 1 | a = {1n: ""} + | ^ + 2 | a = {1n() {}} + 3 | a = {get 1n() {}} + 4 | +Cause: invalid property name - must be a string, number or identifier (1:5) +a = {1n: ""} + ^~" +`; + +exports[`bigint-key.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = {1n: ""} +a = {1n() {}} +a = {get 1n() {}} + +=====================================output===================================== +a = { 1n: "" }; +a = { 1n() {} }; +a = { get 1n() {} }; + +================================================================================ +`; + +exports[`escape-sequence-key.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #6235 +const a = { + '\\u2139': 'why "\\\\u2139" is converted to "i"?', +}; + +const b = { + "\\x66\\x69\\x73\\x6b\\x65\\x72": "\\x66\\x69\\x73\\x6b\\x65\\x72", +}; + +=====================================output===================================== +// #6235 +const a = { + "\\u2139": 'why "\\\\u2139" is converted to "i"?', +}; + +const b = { + "\\x66\\x69\\x73\\x6b\\x65\\x72": "\\x66\\x69\\x73\\x6b\\x65\\x72", +}; + +================================================================================ +`; + +exports[`expand.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Component1 = ({ props }) => ( + <Text>Test</Text> +); + +const Component2 = ({ + props +}) => ( + <Text>Test</Text> +); + +=====================================output===================================== +const Component1 = ({ props }) => <Text>Test</Text>; + +const Component2 = ({ props }) => <Text>Test</Text>; + +================================================================================ +`; + +exports[`expression.js [acorn] format 1`] = ` +"Unexpected token (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0); +Cause: Unexpected token (5:3)" +`; + +exports[`expression.js [espree] format 1`] = ` +"Unexpected token : (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0); +Cause: Unexpected token :" +`; + +exports[`expression.js [flow] format 1`] = ` +"Unexpected token \`:\`, expected a type (5:5) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0);" +`; + +exports[`expression.js [hermes] format 1`] = ` +"unexpected token in type annotation (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0); +Cause: unexpected token in type annotation (5:4) +({}::b, 0); + ^" +`; + +exports[`expression.js [meriyah] format 1`] = ` +"Expected ')' (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0); +Cause: [5:3-5:4]: Expected ')'" +`; + +exports[`expression.js [oxc] format 1`] = ` +"Expected \`,\` but found \`:\` (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0);" +`; + +exports[`expression.js [oxc-ts] format 1`] = ` +"Expected \`,\` but found \`:\` (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0);" +`; + +exports[`expression.js [typescript] format 1`] = ` +"')' expected. (5:4) + 3 | a = () => ({}).x; + 4 | ({} && a, b); +> 5 | ({}::b, 0); + | ^ + 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); + 7 | ({}(), 0); + 8 | ({} = 0); +Cause: ')' expected." +`; + +exports[`expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +() => ({}\`\`); +({})\`\`; +a = () => ({}).x; +({} && a, b); +({}::b, 0); +({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); +({}(), 0); +({} = 0); +(({} = 0), 1); + +const a1 = { + someKey: + (shortName, shortName) +}; + +const a2 = { + someKey: + (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, shortName) +}; + +const a3 = { + someKey: + (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, longLongLongLongLongLongLongLongLongLongLongLongLongLongName, longLongLongLongLongLongLongLongLongLongLongLongLongLongName) +}; + +=====================================output===================================== +() => ({})\`\`; +({})\`\`; +a = () => ({}).x; +(({}) && a, b); +(({})::b, 0); +(({})::b()\`\`[""].c++ && 0 ? 0 : 0, 0); +(({})(), 0); +({} = 0); +(({} = 0), 1); + +const a1 = { + someKey: (shortName, shortName), +}; + +const a2 = { + someKey: + (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, shortName), +}; + +const a3 = { + someKey: + (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, + longLongLongLongLongLongLongLongLongLongLongLongLongLongName, + longLongLongLongLongLongLongLongLongLongLongLongLongLongName), +}; + +================================================================================ +`; + +exports[`getter-setter.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +({ set x(foo) {} }); +({ get x() { return 1 } }); +({ set x(a) {} }); +({ get x() {} }); + +=====================================output===================================== +({ set x(foo) {} }); +({ + get x() { + return 1; + }, +}); +({ set x(a) {} }); +({ get x() {} }); + +================================================================================ +`; + +exports[`method.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = { f() {} } + +=====================================output===================================== +a = { f() {} }; + +================================================================================ +`; + +exports[`range.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +group( + concat([ + "(", + indent( + options.tabWidth, + concat([line, join(concat([",", line]), printed)]) + ), + options.trailingComma ? "," : "", + line, + ")" + ]), + {shouldBreak: true} +) + +=====================================output===================================== +group( + concat([ + "(", + indent( + options.tabWidth, + concat([line, join(concat([",", line]), printed)]), + ), + options.trailingComma ? "," : "", + line, + ")", + ]), + { shouldBreak: true }, +); + +================================================================================ +`; + +exports[`right-break.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const blablah = + "aldkfkladfskladklsfkladklfkaldfadfkdaf" + + "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + + "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"; + +const k = { + blablah: "aldkfkladfskladklsfkladklfkaldfadfkdaf" + + "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + + "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf" +}; + +somethingThatsAReallyLongPropName = + this.props.cardType === AwesomizerCardEnum.SEEFIRST; + +const o = { + somethingThatsAReallyLongPropName: + this.props.cardType === AwesomizerCardEnum.SEEFIRST, +}; + +=====================================output===================================== +const blablah = + "aldkfkladfskladklsfkladklfkaldfadfkdaf" + + "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + + "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"; + +const k = { + blablah: + "aldkfkladfskladklsfkladklfkaldfadfkdaf" + + "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + + "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf", +}; + +somethingThatsAReallyLongPropName = + this.props.cardType === AwesomizerCardEnum.SEEFIRST; + +const o = { + somethingThatsAReallyLongPropName: + this.props.cardType === AwesomizerCardEnum.SEEFIRST, +}; + +================================================================================ +`; diff --git a/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0964f4242127..000000000000 --- a/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,283 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`escape-sequence-key.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #6235 -const a = { - '\\u2139': 'why "\\\\u2139" is converted to "i"?', -}; - -const b = { - "\\x66\\x69\\x73\\x6b\\x65\\x72": "\\x66\\x69\\x73\\x6b\\x65\\x72", -}; - -=====================================output===================================== -// #6235 -const a = { - "\\u2139": 'why "\\\\u2139" is converted to "i"?', -}; - -const b = { - "\\x66\\x69\\x73\\x6b\\x65\\x72": "\\x66\\x69\\x73\\x6b\\x65\\x72", -}; - -================================================================================ -`; - -exports[`expand.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Component1 = ({ props }) => ( - <Text>Test</Text> -); - -const Component2 = ({ - props -}) => ( - <Text>Test</Text> -); - -=====================================output===================================== -const Component1 = ({ props }) => <Text>Test</Text>; - -const Component2 = ({ props }) => <Text>Test</Text>; - -================================================================================ -`; - -exports[`expression.js [acorn] format 1`] = ` -"Unexpected token (5:4) - 3 | a = () => ({}).x; - 4 | ({} && a, b); -> 5 | ({}::b, 0); - | ^ - 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); - 7 | ({}(), 0); - 8 | ({} = 0);" -`; - -exports[`expression.js [espree] format 1`] = ` -"Unexpected token : (5:4) - 3 | a = () => ({}).x; - 4 | ({} && a, b); -> 5 | ({}::b, 0); - | ^ - 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); - 7 | ({}(), 0); - 8 | ({} = 0);" -`; - -exports[`expression.js [meriyah] format 1`] = ` -"Expected ')' (5:4) - 3 | a = () => ({}).x; - 4 | ({} && a, b); -> 5 | ({}::b, 0); - | ^ - 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); - 7 | ({}(), 0); - 8 | ({} = 0);" -`; - -exports[`expression.js [typescript] format 1`] = ` -"')' expected. (5:4) - 3 | a = () => ({}).x; - 4 | ({} && a, b); -> 5 | ({}::b, 0); - | ^ - 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); - 7 | ({}(), 0); - 8 | ({} = 0);" -`; - -exports[`expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -() => ({}\`\`); -({})\`\`; -a = () => ({}).x; -({} && a, b); -({}::b, 0); -({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); -({}(), 0); -({} = 0); -(({} = 0), 1); - -const a1 = { - someKey: - (shortName, shortName) -}; - -const a2 = { - someKey: - (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, shortName) -}; - -const a3 = { - someKey: - (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, longLongLongLongLongLongLongLongLongLongLongLongLongLongName, longLongLongLongLongLongLongLongLongLongLongLongLongLongName) -}; - -=====================================output===================================== -() => ({}\`\`); -({})\`\`; -a = () => ({}.x); -({}) && a, b; -({})::b, 0; -({})::b()\`\`[""].c++ && 0 ? 0 : 0, 0; -({})(), 0; -({} = 0); -({} = 0), 1; - -const a1 = { - someKey: (shortName, shortName), -}; - -const a2 = { - someKey: - (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, shortName), -}; - -const a3 = { - someKey: - (longLongLongLongLongLongLongLongLongLongLongLongLongLongName, - longLongLongLongLongLongLongLongLongLongLongLongLongLongName, - longLongLongLongLongLongLongLongLongLongLongLongLongLongName), -}; - -================================================================================ -`; - -exports[`getter-setter.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -({ set x(foo) {} }); -({ get x() { return 1 } }); -({ set x(a) {} }); -({ get x() {} }); - -=====================================output===================================== -({ set x(foo) {} }); -({ - get x() { - return 1; - }, -}); -({ set x(a) {} }); -({ get x() {} }); - -================================================================================ -`; - -exports[`method.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = { f() {} } - -=====================================output===================================== -a = { f() {} }; - -================================================================================ -`; - -exports[`range.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -group( - concat([ - "(", - indent( - options.tabWidth, - concat([line, join(concat([",", line]), printed)]) - ), - options.trailingComma ? "," : "", - line, - ")" - ]), - {shouldBreak: true} -) - -=====================================output===================================== -group( - concat([ - "(", - indent( - options.tabWidth, - concat([line, join(concat([",", line]), printed)]) - ), - options.trailingComma ? "," : "", - line, - ")", - ]), - { shouldBreak: true } -); - -================================================================================ -`; - -exports[`right-break.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const blablah = - "aldkfkladfskladklsfkladklfkaldfadfkdaf" + - "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + - "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"; - -const k = { - blablah: "aldkfkladfskladklsfkladklfkaldfadfkdaf" + - "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + - "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf" -}; - -somethingThatsAReallyLongPropName = - this.props.cardType === AwesomizerCardEnum.SEEFIRST; - -const o = { - somethingThatsAReallyLongPropName: - this.props.cardType === AwesomizerCardEnum.SEEFIRST, -}; - -=====================================output===================================== -const blablah = - "aldkfkladfskladklsfkladklfkaldfadfkdaf" + - "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + - "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf"; - -const k = { - blablah: - "aldkfkladfskladklsfkladklfkaldfadfkdaf" + - "adlfasdklfkldsklfakldsfkladsfkadsfladsfa" + - "dflkadfkladsfklkadlfkladlfkadklfjadlfdfdaf", -}; - -somethingThatsAReallyLongPropName = - this.props.cardType === AwesomizerCardEnum.SEEFIRST; - -const o = { - somethingThatsAReallyLongPropName: - this.props.cardType === AwesomizerCardEnum.SEEFIRST, -}; - -================================================================================ -`; diff --git a/tests/format/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8bd9f1527c0e..000000000000 --- a/tests/format/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,45 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`object-property.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = { - [this.resource = resource]: 1, -} - -=====================================output===================================== -a = { - [(this.resource = resource)]: 1, -}; - -================================================================================ -`; - -exports[`object-value.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = { - resource: (this.resource = resource), -} - -map(([resource]) => ({ - resource: (this.resource = resource), -})) - -=====================================output===================================== -a = { - resource: (this.resource = resource), -}; - -map(([resource]) => ({ - resource: (this.resource = resource), -})); - -================================================================================ -`; diff --git a/tests/format/js/objects/assignment-expression/jsfmt.spec.js b/tests/format/js/objects/assignment-expression/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/objects/assignment-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/objects/assignment-expression/object-property.js b/tests/format/js/objects/assignment-expression/object-property.js deleted file mode 100644 index 820ec4ada53f..000000000000 --- a/tests/format/js/objects/assignment-expression/object-property.js +++ /dev/null @@ -1,3 +0,0 @@ -a = { - [this.resource = resource]: 1, -} diff --git a/tests/format/js/objects/assignment-expression/object-value.js b/tests/format/js/objects/assignment-expression/object-value.js deleted file mode 100644 index 62a64c6c1c40..000000000000 --- a/tests/format/js/objects/assignment-expression/object-value.js +++ /dev/null @@ -1,7 +0,0 @@ -a = { - resource: (this.resource = resource), -} - -map(([resource]) => ({ - resource: (this.resource = resource), -})) diff --git a/tests/format/js/objects/bigint-key.js b/tests/format/js/objects/bigint-key.js new file mode 100644 index 000000000000..10ad3c5d10e5 --- /dev/null +++ b/tests/format/js/objects/bigint-key.js @@ -0,0 +1,3 @@ +a = {1n: ""} +a = {1n() {}} +a = {get 1n() {}} diff --git a/tests/format/js/objects/format.test.js b/tests/format/js/objects/format.test.js new file mode 100644 index 000000000000..d194f9b885ca --- /dev/null +++ b/tests/format/js/objects/format.test.js @@ -0,0 +1,12 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"], { + errors: { + acorn: ["expression.js"], + espree: ["expression.js"], + typescript: ["expression.js"], + meriyah: ["expression.js"], + oxc: ["expression.js"], + "oxc-ts": ["expression.js"], + flow: ["expression.js"], + hermes: ["expression.js", "bigint-key.js"], + }, +}); diff --git a/tests/format/js/objects/jsfmt.spec.js b/tests/format/js/objects/jsfmt.spec.js deleted file mode 100644 index a00d37304907..000000000000 --- a/tests/format/js/objects/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"], { - errors: { - acorn: ["expression.js"], - espree: ["expression.js"], - typescript: ["expression.js"], - meriyah: ["expression.js"], - }, -}); diff --git a/tests/format/js/optional-catch-binding/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/optional-catch-binding/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/optional-catch-binding/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/optional-catch-binding/__snapshots__/format.test.js.snap diff --git a/tests/format/js/optional-catch-binding/format.test.js b/tests/format/js/optional-catch-binding/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/optional-catch-binding/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/optional-catch-binding/jsfmt.spec.js b/tests/format/js/optional-catch-binding/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/optional-catch-binding/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap b/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c3682891dc79 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap @@ -0,0 +1,641 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2) +> 1 | [a?.b] = []; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)" +`; + +exports[`invalid-destructuring-arr.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | [a?.b] = []; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" +`; + +exports[`invalid-destructuring-arr.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2) +> 1 | [a?.b] = []; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)" +`; + +exports[`invalid-destructuring-arr.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | [a?.b] = []; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-destructuring-arr.js [meriyah] format 1`] = ` +"Invalid left-hand side in assignment (1:10) +> 1 | [a?.b] = []; + | ^ + 2 | +Cause: [1:9-1:10]: Invalid left-hand side in assignment" +`; + +exports[`invalid-destructuring-arr.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:2) +> 1 | [a?.b] = []; + | ^^^^ + 2 |" +`; + +exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10) +> 1 | ({ prop: a?.b } = {}); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)" +`; + +exports[`invalid-destructuring-obj.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:10) +> 1 | ({ prop: a?.b } = {}); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:9)" +`; + +exports[`invalid-destructuring-obj.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10) +> 1 | ({ prop: a?.b } = {}); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)" +`; + +exports[`invalid-destructuring-obj.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:10) +> 1 | ({ prop: a?.b } = {}); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-destructuring-obj.js [meriyah] format 1`] = ` +"Invalid left-hand side in assignment (1:19) +> 1 | ({ prop: a?.b } = {}); + | ^ + 2 | +Cause: [1:18-1:19]: Invalid left-hand side in assignment" +`; + +exports[`invalid-destructuring-obj.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:10) +> 1 | ({ prop: a?.b } = {}); + | ^^^^ + 2 |" +`; + +exports[`invalid-fn-param.js [__babel_estree] format 1`] = ` +"Unexpected token, expected "," (1:13) +> 1 | function f(a?.b) {} + | ^ + 2 | +Cause: Unexpected token, expected "," (1:12)" +`; + +exports[`invalid-fn-param.js [acorn] format 1`] = ` +"Unexpected token (1:13) +> 1 | function f(a?.b) {} + | ^ + 2 | +Cause: Unexpected token (1:12)" +`; + +exports[`invalid-fn-param.js [babel] format 1`] = ` +"Unexpected token, expected "," (1:13) +> 1 | function f(a?.b) {} + | ^ + 2 | +Cause: Unexpected token, expected "," (1:12)" +`; + +exports[`invalid-fn-param.js [espree] format 1`] = ` +"Unexpected token ?. (1:13) +> 1 | function f(a?.b) {} + | ^ + 2 | +Cause: Unexpected token ?." +`; + +exports[`invalid-fn-param.js [meriyah] format 1`] = ` +"Expected ')' (1:13) +> 1 | function f(a?.b) {} + | ^^ + 2 | +Cause: [1:12-1:14]: Expected ')'" +`; + +exports[`invalid-fn-param.js [oxc] format 1`] = ` +"Expected \`,\` but found \`?.\` (1:13) +> 1 | function f(a?.b) {} + | ^^ + 2 |" +`; + +exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of function parameter list. (1:2) +> 1 | (a?.b) => {} + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)" +`; + +exports[`invalid-fn-param-arrow.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | (a?.b) => {} + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" +`; + +exports[`invalid-fn-param-arrow.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of function parameter list. (1:2) +> 1 | (a?.b) => {} + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)" +`; + +exports[`invalid-fn-param-arrow.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | (a?.b) => {} + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = ` +"The left-hand side of the arrow can only be destructed through assignment (1:8) +> 1 | (a?.b) => {} + | ^^ + 2 | +Cause: [1:7-1:9]: The left-hand side of the arrow can only be destructed through assignment" +`; + +exports[`invalid-fn-param-arrow.js [oxc] format 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7) +> 1 | (a?.b) => {} + | ^ + 2 |" +`; + +exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = ` +"Unexpected token, expected "," (1:13) +> 1 | function f(a?.b = c) {} + | ^ + 2 | +Cause: Unexpected token, expected "," (1:12)" +`; + +exports[`invalid-fn-param-assign.js [acorn] format 1`] = ` +"Unexpected token (1:13) +> 1 | function f(a?.b = c) {} + | ^ + 2 | +Cause: Unexpected token (1:12)" +`; + +exports[`invalid-fn-param-assign.js [babel] format 1`] = ` +"Unexpected token, expected "," (1:13) +> 1 | function f(a?.b = c) {} + | ^ + 2 | +Cause: Unexpected token, expected "," (1:12)" +`; + +exports[`invalid-fn-param-assign.js [espree] format 1`] = ` +"Unexpected token ?. (1:13) +> 1 | function f(a?.b = c) {} + | ^ + 2 | +Cause: Unexpected token ?." +`; + +exports[`invalid-fn-param-assign.js [meriyah] format 1`] = ` +"Expected ')' (1:13) +> 1 | function f(a?.b = c) {} + | ^^ + 2 | +Cause: [1:12-1:14]: Expected ')'" +`; + +exports[`invalid-fn-param-assign.js [oxc] format 1`] = ` +"Expected \`,\` but found \`?.\` (1:13) +> 1 | function f(a?.b = c) {} + | ^^ + 2 |" +`; + +exports[`invalid-for-await-of.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-of statement. (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" +`; + +exports[`invalid-for-await-of.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" +`; + +exports[`invalid-for-await-of.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-of statement. (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" +`; + +exports[`invalid-for-await-of.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-for-await-of.js [meriyah] format 1`] = ` +"Invalid left-hand side in for-of (1:11) +> 1 | for (a?.b of x); + | ^^ + 2 | +Cause: [1:10-1:12]: Invalid left-hand side in for-of" +`; + +exports[`invalid-for-await-of.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:6) +> 1 | for (a?.b of x); + | ^^^^ + 2 |" +`; + +exports[`invalid-for-in.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-in statement. (1:6) +> 1 | for (a?.b in x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)" +`; + +exports[`invalid-for-in.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b in x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" +`; + +exports[`invalid-for-in.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-in statement. (1:6) +> 1 | for (a?.b in x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)" +`; + +exports[`invalid-for-in.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b in x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-for-in.js [meriyah] format 1`] = ` +"Invalid left-hand side in for-in (1:11) +> 1 | for (a?.b in x); + | ^^ + 2 | +Cause: [1:10-1:12]: Invalid left-hand side in for-in" +`; + +exports[`invalid-for-in.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:6) +> 1 | for (a?.b in x); + | ^^^^ + 2 |" +`; + +exports[`invalid-for-of.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-of statement. (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" +`; + +exports[`invalid-for-of.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" +`; + +exports[`invalid-for-of.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of for-of statement. (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" +`; + +exports[`invalid-for-of.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:6) +> 1 | for (a?.b of x); + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-for-of.js [meriyah] format 1`] = ` +"Invalid left-hand side in for-of (1:11) +> 1 | for (a?.b of x); + | ^^ + 2 | +Cause: [1:10-1:12]: Invalid left-hand side in for-of" +`; + +exports[`invalid-for-of.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:6) +> 1 | for (a?.b of x); + | ^^^^ + 2 |" +`; + +exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of postfix operation. (1:1) +> 1 | a?.b++; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" +`; + +exports[`invalid-inc-postfix.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b++; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" +`; + +exports[`invalid-inc-postfix.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of postfix operation. (1:1) +> 1 | a?.b++; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" +`; + +exports[`invalid-inc-postfix.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b++; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-inc-postfix.js [meriyah] format 1`] = ` +"Invalid increment/decrement operand (1:5) +> 1 | a?.b++; + | ^^ + 2 | +Cause: [1:4-1:6]: Invalid increment/decrement operand" +`; + +exports[`invalid-inc-postfix.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:1) +> 1 | a?.b++; + | ^^^^ + 2 |" +`; + +exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = ` +"Invalid optional chaining in the left-hand side of prefix operation. (1:3) +> 1 | ++a?.b; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)" +`; + +exports[`invalid-inc-prefix.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:3) +> 1 | ++a?.b; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:2)" +`; + +exports[`invalid-inc-prefix.js [babel] format 1`] = ` +"Invalid optional chaining in the left-hand side of prefix operation. (1:3) +> 1 | ++a?.b; + | ^ + 2 | +Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)" +`; + +exports[`invalid-inc-prefix.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:3) +> 1 | ++a?.b; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`invalid-inc-prefix.js [meriyah] format 1`] = ` +"Invalid increment/decrement operand (1:7) +> 1 | ++a?.b; + | ^ + 2 | +Cause: [1:6-1:7]: Invalid increment/decrement operand" +`; + +exports[`invalid-inc-prefix.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:3) +> 1 | ++a?.b; + | ^^^^ + 2 |" +`; + +exports[`valid-complex-case.js [acorn] format 1`] = ` +"The keyword 'let' is reserved (1:1) +> 1 | let?.()[a] =1; + | ^ + 2 | let?.[a] = 1; + 3 | +Cause: The keyword 'let' is reserved (1:0)" +`; + +exports[`valid-complex-case.js [espree] format 1`] = ` +"The keyword 'let' is reserved (1:1) +> 1 | let?.()[a] =1; + | ^ + 2 | let?.[a] = 1; + 3 | +Cause: The keyword 'let' is reserved" +`; + +exports[`valid-complex-case.js [meriyah] format 1`] = ` +"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:4) +> 1 | let?.()[a] =1; + | ^^ + 2 | let?.[a] = 1; + 3 | +Cause: [1:3-1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode" +`; + +exports[`valid-complex-case.js [oxc] format 1`] = ` +"Unexpected token (1:4) +> 1 | let?.()[a] =1; + | ^^ + 2 | let?.[a] = 1; + 3 |" +`; + +exports[`valid-complex-case.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +let?.()[a] =1; +let?.[a] = 1; + +=====================================output===================================== +let?.()[a] = 1; +let?.[a] = 1; + +================================================================================ +`; + +exports[`valid-lhs-eq.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b.c = d; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" +`; + +exports[`valid-lhs-eq.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b.c = d; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`valid-lhs-eq.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:1) +> 1 | a?.b.c = d; + | ^^^^^^ + 2 |" +`; + +exports[`valid-lhs-eq.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a?.b.c = d; + +=====================================output===================================== +a?.b.c = d; + +================================================================================ +`; + +exports[`valid-lhs-plus-eq.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b.c += d; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" +`; + +exports[`valid-lhs-plus-eq.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:1) +> 1 | a?.b.c += d; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`valid-lhs-plus-eq.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:1) +> 1 | a?.b.c += d; + | ^^^^^^ + 2 |" +`; + +exports[`valid-lhs-plus-eq.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a?.b.c += d; + +=====================================output===================================== +a?.b.c += d; + +================================================================================ +`; + +exports[`valid-parenthesized.js [acorn] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | (a?.b) = c; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" +`; + +exports[`valid-parenthesized.js [espree] format 1`] = ` +"Optional chaining cannot appear in left-hand side (1:2) +> 1 | (a?.b) = c; + | ^ + 2 | +Cause: Optional chaining cannot appear in left-hand side" +`; + +exports[`valid-parenthesized.js [meriyah] format 1`] = ` +"Invalid left-hand side in assignment (1:8) +> 1 | (a?.b) = c; + | ^ + 2 | +Cause: [1:7-1:8]: Invalid left-hand side in assignment" +`; + +exports[`valid-parenthesized.js [oxc] format 1`] = ` +"Cannot assign to this expression (1:2) +> 1 | (a?.b) = c; + | ^^^^ + 2 |" +`; + +exports[`valid-parenthesized.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a?.b) = c; + +=====================================output===================================== +a?.b = c; + +================================================================================ +`; diff --git a/tests/format/js/optional-chaining-assignment/format.test.js b/tests/format/js/optional-chaining-assignment/format.test.js new file mode 100644 index 000000000000..fd1452eb2ca7 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/format.test.js @@ -0,0 +1,39 @@ +const invalidSyntaxTests = [ + "invalid-destructuring-arr.js", + "invalid-destructuring-obj.js", + "invalid-fn-param-arrow.js", + "invalid-fn-param.js", + "invalid-fn-param-assign.js", + "invalid-for-await-of.js", + "invalid-for-in.js", + "invalid-for-of.js", + "invalid-inc-postfix.js", + "invalid-inc-prefix.js", +]; + +const optionalChainingAssignTests = [ + "valid-lhs-eq.js", + "valid-lhs-plus-eq.js", + "valid-parenthesized.js", + "valid-complex-case.js", +]; + +// meriyah can parse these files +const meriyahCanParse = new Set(["valid-lhs-eq.js", "valid-lhs-plus-eq.js"]); + +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: [...optionalChainingAssignTests, ...invalidSyntaxTests], + espree: [...optionalChainingAssignTests, ...invalidSyntaxTests], + meriyah: [ + ...optionalChainingAssignTests.filter( + (test) => !meriyahCanParse.has(test), + ), + ...invalidSyntaxTests, + ], + oxc: [...optionalChainingAssignTests, ...invalidSyntaxTests], + "oxc-ts": [...optionalChainingAssignTests, ...invalidSyntaxTests], + babel: invalidSyntaxTests, + __babel_estree: invalidSyntaxTests, + }, +}); diff --git a/tests/format/js/optional-chaining-assignment/invalid-destructuring-arr.js b/tests/format/js/optional-chaining-assignment/invalid-destructuring-arr.js new file mode 100644 index 000000000000..d2d56ccd9f79 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-destructuring-arr.js @@ -0,0 +1 @@ +[a?.b] = []; diff --git a/tests/format/js/optional-chaining-assignment/invalid-destructuring-obj.js b/tests/format/js/optional-chaining-assignment/invalid-destructuring-obj.js new file mode 100644 index 000000000000..818ba60fe742 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-destructuring-obj.js @@ -0,0 +1 @@ +({ prop: a?.b } = {}); diff --git a/tests/format/js/optional-chaining-assignment/invalid-fn-param-arrow.js b/tests/format/js/optional-chaining-assignment/invalid-fn-param-arrow.js new file mode 100644 index 000000000000..21cf5338f838 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-fn-param-arrow.js @@ -0,0 +1 @@ +(a?.b) => {} diff --git a/tests/format/js/optional-chaining-assignment/invalid-fn-param-assign.js b/tests/format/js/optional-chaining-assignment/invalid-fn-param-assign.js new file mode 100644 index 000000000000..c8085ff71aa3 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-fn-param-assign.js @@ -0,0 +1 @@ +function f(a?.b = c) {} diff --git a/tests/format/js/optional-chaining-assignment/invalid-fn-param.js b/tests/format/js/optional-chaining-assignment/invalid-fn-param.js new file mode 100644 index 000000000000..1db702ecf65a --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-fn-param.js @@ -0,0 +1 @@ +function f(a?.b) {} diff --git a/tests/format/js/optional-chaining-assignment/invalid-for-await-of.js b/tests/format/js/optional-chaining-assignment/invalid-for-await-of.js new file mode 100644 index 000000000000..ba964a0edb9f --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-for-await-of.js @@ -0,0 +1 @@ +for (a?.b of x); diff --git a/tests/format/js/optional-chaining-assignment/invalid-for-in.js b/tests/format/js/optional-chaining-assignment/invalid-for-in.js new file mode 100644 index 000000000000..57cc56518df0 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-for-in.js @@ -0,0 +1 @@ +for (a?.b in x); diff --git a/tests/format/js/optional-chaining-assignment/invalid-for-of.js b/tests/format/js/optional-chaining-assignment/invalid-for-of.js new file mode 100644 index 000000000000..ba964a0edb9f --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-for-of.js @@ -0,0 +1 @@ +for (a?.b of x); diff --git a/tests/format/js/optional-chaining-assignment/invalid-inc-postfix.js b/tests/format/js/optional-chaining-assignment/invalid-inc-postfix.js new file mode 100644 index 000000000000..9bbcb40bf476 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-inc-postfix.js @@ -0,0 +1 @@ +a?.b++; diff --git a/tests/format/js/optional-chaining-assignment/invalid-inc-prefix.js b/tests/format/js/optional-chaining-assignment/invalid-inc-prefix.js new file mode 100644 index 000000000000..72c17bb988f6 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/invalid-inc-prefix.js @@ -0,0 +1 @@ +++a?.b; diff --git a/tests/format/js/optional-chaining-assignment/valid-complex-case.js b/tests/format/js/optional-chaining-assignment/valid-complex-case.js new file mode 100644 index 000000000000..602f18c52739 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/valid-complex-case.js @@ -0,0 +1,2 @@ +let?.()[a] =1; +let?.[a] = 1; diff --git a/tests/format/js/optional-chaining-assignment/valid-lhs-eq.js b/tests/format/js/optional-chaining-assignment/valid-lhs-eq.js new file mode 100644 index 000000000000..b709b1cd657e --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/valid-lhs-eq.js @@ -0,0 +1 @@ +a?.b.c = d; diff --git a/tests/format/js/optional-chaining-assignment/valid-lhs-plus-eq.js b/tests/format/js/optional-chaining-assignment/valid-lhs-plus-eq.js new file mode 100644 index 000000000000..decb2e9d6fb0 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/valid-lhs-plus-eq.js @@ -0,0 +1 @@ +a?.b.c += d; diff --git a/tests/format/js/optional-chaining-assignment/valid-parenthesized.js b/tests/format/js/optional-chaining-assignment/valid-parenthesized.js new file mode 100644 index 000000000000..5d060e412e48 --- /dev/null +++ b/tests/format/js/optional-chaining-assignment/valid-parenthesized.js @@ -0,0 +1 @@ +(a?.b) = c; diff --git a/tests/format/js/optional-chaining/__snapshots__/format.test.js.snap b/tests/format/js/optional-chaining/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8a961c162ac0 --- /dev/null +++ b/tests/format/js/optional-chaining/__snapshots__/format.test.js.snap @@ -0,0 +1,455 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`as-key.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = { + [a?.b]: 1, + + [a?.b]() {}, + [a?.b]:function() {}, + + *[a?.b]() {}, + [a?.b]:function*() {}, + + async[a?.b]() {}, + [a?.b]:async function() {}, + + async*[a?.b]() {}, + [a?.b]:async function*() {}, +}; + +class A { + [a?.b]= 1; + + [a?.b]() {}; + [a?.b]=function() {}; + + *[a?.b]() {}; + [a?.b]=function*() {}; + + async[a?.b]() {}; + [a?.b]=async function() {}; + + async*[a?.b]() {}; + [a?.b]=async function*() {}; +} + +class B { + static [a?.b]= 1; + + static [a?.b]() {}; + static [a?.b]=function() {}; + + static *[a?.b]() {}; + static [a?.b]=function*() {}; + + static async[a?.b]() {}; + static [a?.b]=async function() {}; + + static async*[a?.b]() {}; + static [a?.b]=async function*() {}; +} + +=====================================output===================================== +const a = { + [a?.b]: 1, + + [a?.b]() {}, + [a?.b]: function () {}, + + *[a?.b]() {}, + [a?.b]: function* () {}, + + async [a?.b]() {}, + [a?.b]: async function () {}, + + async *[a?.b]() {}, + [a?.b]: async function* () {}, +}; + +class A { + [a?.b] = 1; + + [a?.b]() {} + [a?.b] = function () {}; + + *[a?.b]() {} + [a?.b] = function* () {}; + + async [a?.b]() {} + [a?.b] = async function () {}; + + async *[a?.b]() {} + [a?.b] = async function* () {}; +} + +class B { + static [a?.b] = 1; + + static [a?.b]() {} + static [a?.b] = function () {}; + + static *[a?.b]() {} + static [a?.b] = function* () {}; + + static async [a?.b]() {} + static [a?.b] = async function () {}; + + static async *[a?.b]() {} + static [a?.b] = async function* () {}; +} + +================================================================================ +`; + +exports[`chaining.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var street = user.address?.street +var fooValue = myForm.querySelector('input[name=foo]')?.value + +obj?.prop; +obj?.[expr]; +func?.(...args); + +a?.(); +a?.[++x]; +a?.b.c(++x).d; +a?.b[3].c?.(x).d; +a?.b.c; +(a?.b).c; +a?.b?.c; +delete a?.b; + +a?.b[3].c?.(x).d.e?.f[3].g?.(y).h; + +(a?.b).c(); +(a?.b[c]).c(); + +(a?.b)?.c.d?.e; +(a ? b : c)?.d; + +(list || list2)?.length; +(list || list2)?.[(list || list2)]; + +async function HelloWorld() { + var x = (await foo.bar.blah)?.hi; + a?.[await b]; + (await x)?.(); +} + +a[b?.c].d(); +a?.[b?.c].d(); +a[b?.c]?.d(); +a?.[b?.c]?.d(); + +(one?.fn()); +(one?.two).fn(); +(one?.two)(); +(one?.two())(); +(one.two?.fn()); +(one.two?.three).fn(); +(one.two?.three?.fn()); + +(one?.()); +(one?.())(); +(one?.())?.(); + +(one?.()).two; + +a?.[b ? c : d]; + +(-1)?.toFixed(); +(void fn)?.(); +(a && b)?.(); +(a ? b : c)?.(); +(function(){})?.(); +(() => f)?.(); +(()=>f)?.x; +(a?.(x)).x; +(aaaaaaaaaaaaaaaaaaaaaaaa&&aaaaaaaaaaaaaaaaaaaaaaaa&&aaaaaaaaaaaaaaaaaaaaaaaa)?.(); + +let f = () => ({}?.()); +let g = () => ({}?.b); +a = () => ({}?.() && a); +a = () => ({}?.()() && a); +a = () => ({}?.().b && a); +a = () => ({}?.b && a); +a = () => ({}?.b() && a); +(a) => ({}?.()?.b && 0); +(a) => ({}?.b?.b && 0); +(x) => ({}?.()()); +(x) => ({}?.().b); +(x) => ({}?.b()); +(x) => ({}?.b.b); +({}?.a().b()); +({ a: 1 }?.entries()); + +new (foo?.bar)(); +new (foo?.bar())(); +new (foo?.())(); + +=====================================output===================================== +var street = user.address?.street; +var fooValue = myForm.querySelector("input[name=foo]")?.value; + +obj?.prop; +obj?.[expr]; +func?.(...args); + +a?.(); +a?.[++x]; +a?.b.c(++x).d; +a?.b[3].c?.(x).d; +a?.b.c; +(a?.b).c; +a?.b?.c; +delete a?.b; + +a?.b[3].c?.(x).d.e?.f[3].g?.(y).h; + +(a?.b).c(); +(a?.b[c]).c(); + +a?.b?.c.d?.e; +(a ? b : c)?.d; + +(list || list2)?.length; +(list || list2)?.[list || list2]; + +async function HelloWorld() { + var x = (await foo.bar.blah)?.hi; + a?.[await b]; + (await x)?.(); +} + +a[b?.c].d(); +a?.[b?.c].d(); +a[b?.c]?.d(); +a?.[b?.c]?.d(); + +one?.fn(); +(one?.two).fn(); +(one?.two)(); +(one?.two())(); +one.two?.fn(); +(one.two?.three).fn(); +one.two?.three?.fn(); + +one?.(); +(one?.())(); +one?.()?.(); + +(one?.()).two; + +a?.[b ? c : d]; + +(-1)?.toFixed(); +(void fn)?.(); +(a && b)?.(); +(a ? b : c)?.(); +(function () {})?.(); +(() => f)?.(); +(() => f)?.x; +(a?.(x)).x; +( + aaaaaaaaaaaaaaaaaaaaaaaa && + aaaaaaaaaaaaaaaaaaaaaaaa && + aaaaaaaaaaaaaaaaaaaaaaaa +)?.(); + +let f = () => ({})?.(); +let g = () => ({})?.b; +a = () => ({})?.() && a; +a = () => ({})?.()() && a; +a = () => ({})?.().b && a; +a = () => ({})?.b && a; +a = () => ({})?.b() && a; +(a) => ({})?.()?.b && 0; +(a) => ({})?.b?.b && 0; +(x) => ({})?.()(); +(x) => ({})?.().b; +(x) => ({})?.b(); +(x) => ({})?.b.b; +({})?.a().b(); +({ a: 1 })?.entries(); + +new (foo?.bar)(); +new (foo?.bar())(); +new (foo?.())(); + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + return a + .b() + .c() + // Comment + ?.d() +} + +fooBar + .doSomething("Hello World") + .doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + ?.run(() => console.log("Bar")); + +bigDeal + + .doSomething("Hello World") + + // Hello world + ?.doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + ?.run(() => console.log("Bar")); + +foo.bar.baz + + ?.doSomething("Hello World") + + // Hello world + .foo.bar.doAnotherThing("Foo", { foo: bar }) + + .doOneMoreThing(config) + ?.bar.run(() => console.log("Bar")); + +(somethingGood ? thisIsIt : maybeNot) + +// Hello world +.doSomething("Hello World") + + ?.doAnotherThing("Foo", { foo: bar }) // Run this + .run(() => console.log("Bar")); // Do this + +=====================================output===================================== +function foo() { + return ( + a + .b() + .c() + // Comment + ?.d() + ); +} + +fooBar + .doSomething("Hello World") + .doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + ?.run(() => console.log("Bar")); + +bigDeal + + .doSomething("Hello World") + + // Hello world + ?.doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + ?.run(() => console.log("Bar")); + +foo.bar.baz + + ?.doSomething("Hello World") + + // Hello world + .foo.bar.doAnotherThing("Foo", { foo: bar }) + + .doOneMoreThing(config) + ?.bar.run(() => console.log("Bar")); + +(somethingGood ? thisIsIt : maybeNot) + + // Hello world + .doSomething("Hello World") + + ?.doAnotherThing("Foo", { foo: bar }) // Run this + .run(() => console.log("Bar")); // Do this + +================================================================================ +`; + +exports[`eval.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11850 + +let foo; + +/* indirect eval calls */ +eval?.(foo); + +(eval)?.(foo); + +eval?.()(); + +eval?.().foo; + +/* direct eval calls */ + +eval()?.(); + +eval()?.foo; + +/* plain function calls */ + +foo.eval?.(foo); + +eval.foo?.(foo); + +=====================================output===================================== +// https://github.com/babel/babel/pull/11850 + +let foo; + +/* indirect eval calls */ +eval?.(foo); + +eval?.(foo); + +eval?.()(); + +eval?.().foo; + +/* direct eval calls */ + +eval()?.(); + +eval()?.foo; + +/* plain function calls */ + +foo.eval?.(foo); + +eval.foo?.(foo); + +================================================================================ +`; diff --git a/tests/format/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c1c21992f5f0..000000000000 --- a/tests/format/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,349 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`chaining.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var street = user.address?.street -var fooValue = myForm.querySelector('input[name=foo]')?.value - -obj?.prop; -obj?.[expr]; -func?.(...args); - -a?.(); -a?.[++x]; -a?.b.c(++x).d; -a?.b[3].c?.(x).d; -a?.b.c; -(a?.b).c; -a?.b?.c; -delete a?.b; - -a?.b[3].c?.(x).d.e?.f[3].g?.(y).h; - -(a?.b).c(); -(a?.b[c]).c(); - -(a?.b)?.c.d?.e; -(a ? b : c)?.d; - -(list || list2)?.length; -(list || list2)?.[(list || list2)]; - -async function HelloWorld() { - var x = (await foo.bar.blah)?.hi; - a?.[await b]; - (await x)?.(); -} - -a[b?.c].d(); -a?.[b?.c].d(); -a[b?.c]?.d(); -a?.[b?.c]?.d(); - -(one?.fn()); -(one?.two).fn(); -(one?.two)(); -(one?.two())(); -(one.two?.fn()); -(one.two?.three).fn(); -(one.two?.three?.fn()); - -(one?.()); -(one?.())(); -(one?.())?.(); - -(one?.()).two; - -a?.[b ? c : d]; - -(-1)?.toFixed(); -(void fn)?.(); -(a && b)?.(); -(a ? b : c)?.(); -(function(){})?.(); -(() => f)?.(); -(()=>f)?.x; -(a?.(x)).x; -(aaaaaaaaaaaaaaaaaaaaaaaa&&aaaaaaaaaaaaaaaaaaaaaaaa&&aaaaaaaaaaaaaaaaaaaaaaaa)?.(); - -let f = () => ({}?.()); -let g = () => ({}?.b); -a = () => ({}?.() && a); -a = () => ({}?.()() && a); -a = () => ({}?.().b && a); -a = () => ({}?.b && a); -a = () => ({}?.b() && a); -(a) => ({}?.()?.b && 0); -(a) => ({}?.b?.b && 0); -(x) => ({}?.()()); -(x) => ({}?.().b); -(x) => ({}?.b()); -(x) => ({}?.b.b); -({}?.a().b()); -({ a: 1 }?.entries()); - -new (foo?.bar)(); -new (foo?.bar())(); -new (foo?.())(); - -=====================================output===================================== -var street = user.address?.street; -var fooValue = myForm.querySelector("input[name=foo]")?.value; - -obj?.prop; -obj?.[expr]; -func?.(...args); - -a?.(); -a?.[++x]; -a?.b.c(++x).d; -a?.b[3].c?.(x).d; -a?.b.c; -(a?.b).c; -a?.b?.c; -delete a?.b; - -a?.b[3].c?.(x).d.e?.f[3].g?.(y).h; - -(a?.b).c(); -(a?.b[c]).c(); - -a?.b?.c.d?.e; -(a ? b : c)?.d; - -(list || list2)?.length; -(list || list2)?.[list || list2]; - -async function HelloWorld() { - var x = (await foo.bar.blah)?.hi; - a?.[await b]; - (await x)?.(); -} - -a[b?.c].d(); -a?.[b?.c].d(); -a[b?.c]?.d(); -a?.[b?.c]?.d(); - -one?.fn(); -(one?.two).fn(); -(one?.two)(); -(one?.two())(); -one.two?.fn(); -(one.two?.three).fn(); -one.two?.three?.fn(); - -one?.(); -(one?.())(); -one?.()?.(); - -(one?.()).two; - -a?.[b ? c : d]; - -(-1)?.toFixed(); -(void fn)?.(); -(a && b)?.(); -(a ? b : c)?.(); -(function () {})?.(); -(() => f)?.(); -(() => f)?.x; -(a?.(x)).x; -( - aaaaaaaaaaaaaaaaaaaaaaaa && - aaaaaaaaaaaaaaaaaaaaaaaa && - aaaaaaaaaaaaaaaaaaaaaaaa -)?.(); - -let f = () => ({}?.()); -let g = () => ({}?.b); -a = () => ({}?.() && a); -a = () => ({}?.()() && a); -a = () => ({}?.().b && a); -a = () => ({}?.b && a); -a = () => ({}?.b() && a); -(a) => ({}?.()?.b && 0); -(a) => ({}?.b?.b && 0); -(x) => ({}?.()()); -(x) => ({}?.().b); -(x) => ({}?.b()); -(x) => ({}?.b.b); -({})?.a().b(); -({ a: 1 })?.entries(); - -new (foo?.bar)(); -new (foo?.bar())(); -new (foo?.())(); - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo() { - return a - .b() - .c() - // Comment - ?.d() -} - -fooBar - .doSomething("Hello World") - .doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - ?.run(() => console.log("Bar")); - -bigDeal - - .doSomething("Hello World") - - // Hello world - ?.doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - ?.run(() => console.log("Bar")); - -foo.bar.baz - - ?.doSomething("Hello World") - - // Hello world - .foo.bar.doAnotherThing("Foo", { foo: bar }) - - .doOneMoreThing(config) - ?.bar.run(() => console.log("Bar")); - -(somethingGood ? thisIsIt : maybeNot) - -// Hello world -.doSomething("Hello World") - - ?.doAnotherThing("Foo", { foo: bar }) // Run this - .run(() => console.log("Bar")); // Do this - -=====================================output===================================== -function foo() { - return ( - a - .b() - .c() - // Comment - ?.d() - ); -} - -fooBar - .doSomething("Hello World") - .doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - ?.run(() => console.log("Bar")); - -bigDeal - - .doSomething("Hello World") - - // Hello world - ?.doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - ?.run(() => console.log("Bar")); - -foo.bar.baz - - ?.doSomething("Hello World") - - // Hello world - .foo.bar.doAnotherThing("Foo", { foo: bar }) - - .doOneMoreThing(config) - ?.bar.run(() => console.log("Bar")); - -(somethingGood ? thisIsIt : maybeNot) - - // Hello world - .doSomething("Hello World") - - ?.doAnotherThing("Foo", { foo: bar }) // Run this - .run(() => console.log("Bar")); // Do this - -================================================================================ -`; - -exports[`eval.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11850 - -let foo; - -/* indirect eval calls */ -eval?.(foo); - -(eval)?.(foo); - -eval?.()(); - -eval?.().foo; - -/* direct eval calls */ - -eval()?.(); - -eval()?.foo; - -/* plain function calls */ - -foo.eval?.(foo); - -eval.foo?.(foo); - -=====================================output===================================== -// https://github.com/babel/babel/pull/11850 - -let foo; - -/* indirect eval calls */ -eval?.(foo); - -eval?.(foo); - -eval?.()(); - -eval?.().foo; - -/* direct eval calls */ - -eval()?.(); - -eval()?.foo; - -/* plain function calls */ - -foo.eval?.(foo); - -eval.foo?.(foo); - -================================================================================ -`; diff --git a/tests/format/js/optional-chaining/as-key.js b/tests/format/js/optional-chaining/as-key.js new file mode 100644 index 000000000000..f7b59bb9bae9 --- /dev/null +++ b/tests/format/js/optional-chaining/as-key.js @@ -0,0 +1,47 @@ +const a = { + [a?.b]: 1, + + [a?.b]() {}, + [a?.b]:function() {}, + + *[a?.b]() {}, + [a?.b]:function*() {}, + + async[a?.b]() {}, + [a?.b]:async function() {}, + + async*[a?.b]() {}, + [a?.b]:async function*() {}, +}; + +class A { + [a?.b]= 1; + + [a?.b]() {}; + [a?.b]=function() {}; + + *[a?.b]() {}; + [a?.b]=function*() {}; + + async[a?.b]() {}; + [a?.b]=async function() {}; + + async*[a?.b]() {}; + [a?.b]=async function*() {}; +} + +class B { + static [a?.b]= 1; + + static [a?.b]() {}; + static [a?.b]=function() {}; + + static *[a?.b]() {}; + static [a?.b]=function*() {}; + + static async[a?.b]() {}; + static [a?.b]=async function() {}; + + static async*[a?.b]() {}; + static [a?.b]=async function*() {}; +} diff --git a/tests/format/js/optional-chaining/format.test.js b/tests/format/js/optional-chaining/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/optional-chaining/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/optional-chaining/jsfmt.spec.js b/tests/format/js/optional-chaining/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/optional-chaining/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/partial-application/__snapshots__/format.test.js.snap b/tests/format/js/partial-application/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..45211b452c12 --- /dev/null +++ b/tests/format/js/partial-application/__snapshots__/format.test.js.snap @@ -0,0 +1,70 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.js [acorn] format 1`] = ` +"Unexpected token (1:23) +> 1 | const addOne = add(1, ?); // apply from the left + | ^ + 2 | addOne(2); // 3 + 3 | + 4 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token (1:22)" +`; + +exports[`test.js [espree] format 1`] = ` +"Unexpected token ? (1:23) +> 1 | const addOne = add(1, ?); // apply from the left + | ^ + 2 | addOne(2); // 3 + 3 | + 4 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token ?" +`; + +exports[`test.js [meriyah] format 1`] = ` +"Unexpected token: '?' (1:23) +> 1 | const addOne = add(1, ?); // apply from the left + | ^ + 2 | addOne(2); // 3 + 3 | + 4 | const addTen = add(?, 10); // apply from the right +Cause: [1:22-1:23]: Unexpected token: '?'" +`; + +exports[`test.js [oxc] format 1`] = ` +"Unexpected token (1:23) +> 1 | const addOne = add(1, ?); // apply from the left + | ^ + 2 | addOne(2); // 3 + 3 | + 4 | const addTen = add(?, 10); // apply from the right" +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +const addOne = add(1, ?); // apply from the left +addOne(2); // 3 + +const addTen = add(?, 10); // apply from the right +addTen(2); // 12 + +// with pipeline +let newScore = player.score + |> add(7, ?) + |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. + +=====================================output===================================== +const addOne = add(1, ?); // apply from the left +addOne(2); // 3 + +const addTen = add(?, 10); // apply from the right +addTen(2); // 12 + +// with pipeline +let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. + +================================================================================ +`; diff --git a/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index de5ca9608c3f..000000000000 --- a/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,58 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.js [acorn] format 1`] = ` -"Unexpected token (1:23) -> 1 | const addOne = add(1, ?); // apply from the left - | ^ - 2 | addOne(2); // 3 - 3 | - 4 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`test.js [espree] format 1`] = ` -"Unexpected token ? (1:23) -> 1 | const addOne = add(1, ?); // apply from the left - | ^ - 2 | addOne(2); // 3 - 3 | - 4 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`test.js [meriyah] format 1`] = ` -"Unexpected token: '?' (1:23) -> 1 | const addOne = add(1, ?); // apply from the left - | ^ - 2 | addOne(2); // 3 - 3 | - 4 | const addTen = add(?, 10); // apply from the right" -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const addOne = add(1, ?); // apply from the left -addOne(2); // 3 - -const addTen = add(?, 10); // apply from the right -addTen(2); // 12 - -// with pipeline -let newScore = player.score - |> add(7, ?) - |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. - -=====================================output===================================== -const addOne = add(1, ?); // apply from the left -addOne(2); // 3 - -const addTen = add(?, 10); // apply from the right -addTen(2); // 12 - -// with pipeline -let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack, the pipe to \`clamp\` is the same frame as the pipe to \`add\`. - -================================================================================ -`; diff --git a/tests/format/js/partial-application/format.test.js b/tests/format/js/partial-application/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/partial-application/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/partial-application/jsfmt.spec.js b/tests/format/js/partial-application/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/partial-application/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/performance/__snapshots__/format.test.js.snap b/tests/format/js/performance/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..09c9b341810b --- /dev/null +++ b/tests/format/js/performance/__snapshots__/format.test.js.snap @@ -0,0 +1,250 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`nested.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + return someObject.someFunction().then(function() { + anotherFunction(); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); +}); + +=====================================output===================================== +someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + return someObject.someFunction().then(function () { + anotherFunction(); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); + }); +}); + +================================================================================ +`; + +exports[`nested-real.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +tap.test("RecordImport.advance", (t) => { + const checkStates = (batches, states) => { + t.equal(batches.length, states.length); + for (const batch of batches) { + t.equal(batch.state, states.shift()); + t.ok(batch.getCurState().name(i18n)); + } + }; + + const batch = init.getRecordBatch(); + const dataFile = path.resolve(process.cwd(), "testData", "default.json"); + + const getBatches = (callback) => { + RecordImport.find({}, "", {}, (err, batches) => { + callback(null, batches.filter((batch) => (batch.state !== "error" && + batch.state !== "completed"))); + }); + }; + + mockFS((callback) => { + batch.setResults([fs.createReadStream(dataFile)], (err) => { + t.error(err, "Error should be empty."); + t.equal(batch.results.length, 6, "Check number of results"); + for (const result of batch.results) { + t.equal(result.result, "unknown"); + t.ok(result.data); + t.equal(result.data.lang, "en"); + } + + getBatches((err, batches) => { + checkStates(batches, ["started"]); + + RecordImport.advance((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, ["process.completed"]); + + // Need to manually move to the next step + batch.importRecords((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, ["import.completed"]); + + RecordImport.advance((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, + ["similarity.sync.completed"]); + + RecordImport.advance((err) => { + t.error(err, + "Error should be empty."); + + t.ok(batch.getCurState() + .name(i18n)); + + getBatches((err, batches) => { + checkStates(batches, []); + t.end(); + callback(); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + }); +}); + +=====================================output===================================== +tap.test("RecordImport.advance", (t) => { + const checkStates = (batches, states) => { + t.equal(batches.length, states.length); + for (const batch of batches) { + t.equal(batch.state, states.shift()); + t.ok(batch.getCurState().name(i18n)); + } + }; + + const batch = init.getRecordBatch(); + const dataFile = path.resolve(process.cwd(), "testData", "default.json"); + + const getBatches = (callback) => { + RecordImport.find({}, "", {}, (err, batches) => { + callback( + null, + batches.filter( + (batch) => batch.state !== "error" && batch.state !== "completed", + ), + ); + }); + }; + + mockFS((callback) => { + batch.setResults([fs.createReadStream(dataFile)], (err) => { + t.error(err, "Error should be empty."); + t.equal(batch.results.length, 6, "Check number of results"); + for (const result of batch.results) { + t.equal(result.result, "unknown"); + t.ok(result.data); + t.equal(result.data.lang, "en"); + } + + getBatches((err, batches) => { + checkStates(batches, ["started"]); + + RecordImport.advance((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, ["process.completed"]); + + // Need to manually move to the next step + batch.importRecords((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, ["import.completed"]); + + RecordImport.advance((err) => { + t.error(err, "Error should be empty."); + + getBatches((err, batches) => { + checkStates(batches, ["similarity.sync.completed"]); + + RecordImport.advance((err) => { + t.error(err, "Error should be empty."); + + t.ok(batch.getCurState().name(i18n)); + + getBatches((err, batches) => { + checkStates(batches, []); + t.end(); + callback(); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + + t.ok(batch.getCurState().name(i18n)); + }); + }); + }); +}); + +================================================================================ +`; diff --git a/tests/format/js/performance/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/performance/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d2bdee226e71..000000000000 --- a/tests/format/js/performance/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,250 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`nested.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - return someObject.someFunction().then(function() { - anotherFunction(); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); -}); - -=====================================output===================================== -someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - return someObject.someFunction().then(function () { - anotherFunction(); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); -}); - -================================================================================ -`; - -exports[`nested-real.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -tap.test("RecordImport.advance", (t) => { - const checkStates = (batches, states) => { - t.equal(batches.length, states.length); - for (const batch of batches) { - t.equal(batch.state, states.shift()); - t.ok(batch.getCurState().name(i18n)); - } - }; - - const batch = init.getRecordBatch(); - const dataFile = path.resolve(process.cwd(), "testData", "default.json"); - - const getBatches = (callback) => { - RecordImport.find({}, "", {}, (err, batches) => { - callback(null, batches.filter((batch) => (batch.state !== "error" && - batch.state !== "completed"))); - }); - }; - - mockFS((callback) => { - batch.setResults([fs.createReadStream(dataFile)], (err) => { - t.error(err, "Error should be empty."); - t.equal(batch.results.length, 6, "Check number of results"); - for (const result of batch.results) { - t.equal(result.result, "unknown"); - t.ok(result.data); - t.equal(result.data.lang, "en"); - } - - getBatches((err, batches) => { - checkStates(batches, ["started"]); - - RecordImport.advance((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, ["process.completed"]); - - // Need to manually move to the next step - batch.importRecords((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, ["import.completed"]); - - RecordImport.advance((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, - ["similarity.sync.completed"]); - - RecordImport.advance((err) => { - t.error(err, - "Error should be empty."); - - t.ok(batch.getCurState() - .name(i18n)); - - getBatches((err, batches) => { - checkStates(batches, []); - t.end(); - callback(); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - }); -}); - -=====================================output===================================== -tap.test("RecordImport.advance", (t) => { - const checkStates = (batches, states) => { - t.equal(batches.length, states.length); - for (const batch of batches) { - t.equal(batch.state, states.shift()); - t.ok(batch.getCurState().name(i18n)); - } - }; - - const batch = init.getRecordBatch(); - const dataFile = path.resolve(process.cwd(), "testData", "default.json"); - - const getBatches = (callback) => { - RecordImport.find({}, "", {}, (err, batches) => { - callback( - null, - batches.filter( - (batch) => batch.state !== "error" && batch.state !== "completed" - ) - ); - }); - }; - - mockFS((callback) => { - batch.setResults([fs.createReadStream(dataFile)], (err) => { - t.error(err, "Error should be empty."); - t.equal(batch.results.length, 6, "Check number of results"); - for (const result of batch.results) { - t.equal(result.result, "unknown"); - t.ok(result.data); - t.equal(result.data.lang, "en"); - } - - getBatches((err, batches) => { - checkStates(batches, ["started"]); - - RecordImport.advance((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, ["process.completed"]); - - // Need to manually move to the next step - batch.importRecords((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, ["import.completed"]); - - RecordImport.advance((err) => { - t.error(err, "Error should be empty."); - - getBatches((err, batches) => { - checkStates(batches, ["similarity.sync.completed"]); - - RecordImport.advance((err) => { - t.error(err, "Error should be empty."); - - t.ok(batch.getCurState().name(i18n)); - - getBatches((err, batches) => { - checkStates(batches, []); - t.end(); - callback(); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - - t.ok(batch.getCurState().name(i18n)); - }); - }); - }); -}); - -================================================================================ -`; diff --git a/tests/format/js/performance/format.test.js b/tests/format/js/performance/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/performance/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/performance/jsfmt.spec.js b/tests/format/js/performance/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/performance/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap b/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4f8240a37101 --- /dev/null +++ b/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap @@ -0,0 +1,509 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`block-comments.js [acorn] format 1`] = ` +"Unexpected token (2:2) + 1 | bifornCringerMoshedPerplexSawder +> 2 | |> foo1 + | ^ + 3 | |> foo2 /* comment1 */ + 4 | |> foo3 /* comment2 */ + 5 | |> kochabCooieGameOnOboleUnweave +Cause: Unexpected token (2:1)" +`; + +exports[`block-comments.js [espree] format 1`] = ` +"Unexpected token > (2:2) + 1 | bifornCringerMoshedPerplexSawder +> 2 | |> foo1 + | ^ + 3 | |> foo2 /* comment1 */ + 4 | |> foo3 /* comment2 */ + 5 | |> kochabCooieGameOnOboleUnweave +Cause: Unexpected token >" +`; + +exports[`block-comments.js [meriyah] format 1`] = ` +"Unexpected token: '>' (2:2) + 1 | bifornCringerMoshedPerplexSawder +> 2 | |> foo1 + | ^ + 3 | |> foo2 /* comment1 */ + 4 | |> foo3 /* comment2 */ + 5 | |> kochabCooieGameOnOboleUnweave +Cause: [2:1-2:2]: Unexpected token: '>'" +`; + +exports[`block-comments.js [oxc] format 1`] = ` +"Unexpected token (2:2) + 1 | bifornCringerMoshedPerplexSawder +> 2 | |> foo1 + | ^ + 3 | |> foo2 /* comment1 */ + 4 | |> foo3 /* comment2 */ + 5 | |> kochabCooieGameOnOboleUnweave" +`; + +exports[`block-comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +bifornCringerMoshedPerplexSawder +|> foo1 +|> foo2 /* comment1 */ +|> foo3 /* comment2 */ +|> kochabCooieGameOnOboleUnweave +|> glimseGlyphsHazardNoopsTieTie; + +=====================================output===================================== +bifornCringerMoshedPerplexSawder + |> foo1 + |> foo2 /* comment1 */ + |> foo3 /* comment2 */ + |> kochabCooieGameOnOboleUnweave + |> glimseGlyphsHazardNoopsTieTie; + +================================================================================ +`; + +exports[`fsharp_style_pipeline_operator.js [acorn] format 1`] = ` +"Unexpected token (2:4) + 1 | promise +> 2 | |> await + | ^ + 3 | |> x => doubleSay(x, ', ') + 4 | |> capitalize + 5 | |> x => x + '!' +Cause: Unexpected token (2:3)" +`; + +exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = ` +"Unexpected token > (2:4) + 1 | promise +> 2 | |> await + | ^ + 3 | |> x => doubleSay(x, ', ') + 4 | |> capitalize + 5 | |> x => x + '!' +Cause: Unexpected token >" +`; + +exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = ` +"Unexpected token: '>' (2:4) + 1 | promise +> 2 | |> await + | ^ + 3 | |> x => doubleSay(x, ', ') + 4 | |> capitalize + 5 | |> x => x + '!' +Cause: [2:3-2:4]: Unexpected token: '>'" +`; + +exports[`fsharp_style_pipeline_operator.js [oxc] format 1`] = ` +"Unexpected token (2:4) + 1 | promise +> 2 | |> await + | ^ + 3 | |> x => doubleSay(x, ', ') + 4 | |> capitalize + 5 | |> x => x + '!'" +`; + +exports[`fsharp_style_pipeline_operator.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +promise + |> await + |> x => doubleSay(x, ', ') + |> capitalize + |> x => x + '!' + |> x => new User.Message(x) + |> x => stream.write(x) + |> await + |> console.log; + +const result = "hello" + |> doubleSay + |> capitalize + |> exclaim; + +const newScore = person.score + |> double + |> n => add(7, n) + |> n => boundScore(0, 100, n); + +const user = url + |> api.get + |> await + |> r => r.json() + |> await + |> j => j.data.user; + +const f = (x) => (x |> (y) => y + 1) + |> (z) => z * y + +const _f = (x) => x + |> (y) => y + 1 + |> (z) => z * y + +const g = (x) => x + |> (y) => (y + 1 |> (z) => z * y) + +const _g = (x) => x + |> (y => (y + 1 |> (z) => z * y)) + +const __g = (x) => x + |> ( + y => { + return (y + 1 |> (z) => z * y); + } + ) + +const f = x + ((f) => (f |> f)); +const f = x |> (f) => f |> f; + +=====================================output===================================== +promise + |> await + |> (x) => doubleSay(x, ", ") + |> capitalize + |> (x) => x + "!" + |> (x) => new User.Message(x) + |> (x) => stream.write(x) + |> await + |> console.log; + +const result = "hello" |> doubleSay |> capitalize |> exclaim; + +const newScore = + person.score |> double |> (n) => add(7, n) |> (n) => boundScore(0, 100, n); + +const user = + url |> api.get |> await |> (r) => r.json() |> await |> (j) => j.data.user; + +const f = (x) => x |> (y) => y + 1 |> (z) => z * y; + +const _f = (x) => x |> (y) => y + 1 |> (z) => z * y; + +const g = (x) => x |> (y) => (y + 1 |> (z) => z * y); + +const _g = (x) => x |> ((y) => (y + 1 |> (z) => z * y)); + +const __g = (x) => + x + |> ((y) => { + return y + 1 |> (z) => z * y; + }); + +const f = x + ((f) => f |> f); +const f = x |> (f) => f |> f; + +================================================================================ +`; + +exports[`hack_pipeline_operator.js [acorn] format 1`] = ` +"Unexpected token (1:4) +> 1 | a |> await % |> % * 3; + | ^ + 2 | + 3 | foo + 4 | |> await % +Cause: Unexpected token (1:3)" +`; + +exports[`hack_pipeline_operator.js [espree] format 1`] = ` +"Unexpected token > (1:4) +> 1 | a |> await % |> % * 3; + | ^ + 2 | + 3 | foo + 4 | |> await % +Cause: Unexpected token >" +`; + +exports[`hack_pipeline_operator.js [meriyah] format 1`] = ` +"Unexpected token: '>' (1:4) +> 1 | a |> await % |> % * 3; + | ^ + 2 | + 3 | foo + 4 | |> await % +Cause: [1:3-1:4]: Unexpected token: '>'" +`; + +exports[`hack_pipeline_operator.js [oxc] format 1`] = ` +"Unexpected token (1:4) +> 1 | a |> await % |> % * 3; + | ^ + 2 | + 3 | foo + 4 | |> await %" +`; + +exports[`hack_pipeline_operator.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a |> await % |> % * 3; + +foo + |> await % + |> % || throw new Error(\`foo \${bar1}\`) + |> bar2(%, ", ") + |> bar3(%) + |> % + "!" + |> new Bar.Foo(%) + |> await bar.bar(%) + |> console.log(%); + +const result = "hello" + |> doubleSay(%) + |> capitalize(%, "foo") + |> exclaim(%); + +function createPerson (attrs) { + attrs + |> foo(%) + |> foo(%) + |> Person.insertIntoDatabase(%); +} + +const result = [1,2,3] + |> %.map(a => a * 2 ) + |> %.filter(a => a > 5) + |> %.reduce((sum, a) => a+sum, 0) + |> increment(%) + |> add(%, 3) + +const searchResults$ = fromEvent(document.querySelector('input'), 'input') + |> map(%, event => event.target.value) + |> filter(%, searchText => searchText.length > 2) + |> debounce(%, 300) + |> distinctUntilChanged(%) + |> switchMap(%, searchText => queryApi(searchText) |> retry(%, 3)) + |> share(%); + +v |> %.method() |> f(%); + +async function * f () { + return x + |> (yield %) + |> (await %) + |> y(%) + |> a.b(%) + |> (a.b(%)) + |> a.b(%) + |> (a.b?.(%)) + |> a.b?.(%); +} + +=====================================output===================================== +a |> (await %) |> % * 3; + +foo +|> (await %) +|> % || throw new Error(\`foo \${bar1}\`) +|> bar2(%, ", ") +|> bar3(%) +|> % + "!" +|> new Bar.Foo(%) +|> (await bar.bar(%)) +|> console.log(%); + +const result = "hello" |> doubleSay(%) |> capitalize(%, "foo") |> exclaim(%); + +function createPerson(attrs) { + attrs |> foo(%) |> foo(%) |> Person.insertIntoDatabase(%); +} + +const result = + [1, 2, 3] + |> %.map((a) => a * 2) + |> %.filter((a) => a > 5) + |> %.reduce((sum, a) => a + sum, 0) + |> increment(%) + |> add(%, 3); + +const searchResults$ = + fromEvent(document.querySelector("input"), "input") + |> map(%, (event) => event.target.value) + |> filter(%, (searchText) => searchText.length > 2) + |> debounce(%, 300) + |> distinctUntilChanged(%) + |> switchMap(%, (searchText) => queryApi(searchText) |> retry(%, 3)) + |> share(%); + +v |> %.method() |> f(%); + +async function* f() { + return ( + x + |> (yield %) + |> (await %) + |> y(%) + |> a.b(%) + |> a.b(%) + |> a.b(%) + |> a.b?.(%) + |> a.b?.(%) + ); +} + +================================================================================ +`; + +exports[`minimal_pipeline_operator.js [acorn] format 1`] = ` +"Unexpected token (1:4) +> 1 | a |> b |> c; + | ^ + 2 | + 3 | a |> (b |> c); + 4 | +Cause: Unexpected token (1:3)" +`; + +exports[`minimal_pipeline_operator.js [espree] format 1`] = ` +"Unexpected token > (1:4) +> 1 | a |> b |> c; + | ^ + 2 | + 3 | a |> (b |> c); + 4 | +Cause: Unexpected token >" +`; + +exports[`minimal_pipeline_operator.js [meriyah] format 1`] = ` +"Unexpected token: '>' (1:4) +> 1 | a |> b |> c; + | ^ + 2 | + 3 | a |> (b |> c); + 4 | +Cause: [1:3-1:4]: Unexpected token: '>'" +`; + +exports[`minimal_pipeline_operator.js [oxc] format 1`] = ` +"Unexpected token (1:4) +> 1 | a |> b |> c; + | ^ + 2 | + 3 | a |> (b |> c); + 4 |" +`; + +exports[`minimal_pipeline_operator.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +a |> b |> c; + +a |> (b |> c); + +(a |> b) || c; +a |> (b || c); + +let result = "hello" + |> doubleSay + |> capitalize + |> exclaim; + +let newScore = person.score + |> double + |> (_ => add(7, _)) + |> (_ => subtract(2, _)) + |> (_ => boundScore(0, 100, _)); + +function createPerson (attrs) { + attrs + |> bounded('age', 1, 100) + |> format('name', /^[a-z]$/i) + |> Person.insertIntoDatabase; +} + +foo |> (bar ?? baz); +(foo |> bar) ?? baz; + +const result = [1,2,3] + |> map(a => a * 2) + |> filter(a => a > 5) + |> reduce((sum, a) => a+sum, 0) + |> increment + |> add(3) + +const searchResults$ = fromEvent(document.querySelector('input'), 'input') + |> map(event => event.target.value) + |> filter(searchText => searchText.length > 2) + |> debounce(300) + |> distinctUntilChanged() + |> switchMap(searchText => queryApi(searchText) |> retry(3)) + |> share(); + +const result = [5,10] + |> (_ => _.map(x => x * 2)) + |> (_ => _.reduce( (a,b) => a + b )) + |> (sum => sum + 1) + +const result2 = [4, 9].map( x => x |> inc |> double ) + +=====================================output===================================== +a |> b |> c; + +a |> (b |> c); + +(a |> b) || c; +a |> b || c; + +let result = "hello" |> doubleSay |> capitalize |> exclaim; + +let newScore = + person.score + |> double + |> ((_) => add(7, _)) + |> ((_) => subtract(2, _)) + |> ((_) => boundScore(0, 100, _)); + +function createPerson(attrs) { + attrs + |> bounded("age", 1, 100) + |> format("name", /^[a-z]$/i) + |> Person.insertIntoDatabase; +} + +foo |> bar ?? baz; +(foo |> bar) ?? baz; + +const result = + [1, 2, 3] + |> map((a) => a * 2) + |> filter((a) => a > 5) + |> reduce((sum, a) => a + sum, 0) + |> increment + |> add(3); + +const searchResults$ = + fromEvent(document.querySelector("input"), "input") + |> map((event) => event.target.value) + |> filter((searchText) => searchText.length > 2) + |> debounce(300) + |> distinctUntilChanged() + |> switchMap((searchText) => queryApi(searchText) |> retry(3)) + |> share(); + +const result = + [5, 10] + |> ((_) => _.map((x) => x * 2)) + |> ((_) => _.reduce((a, b) => a + b)) + |> ((sum) => sum + 1); + +const result2 = [4, 9].map((x) => x |> inc |> double); + +================================================================================ +`; diff --git a/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c532009d4a59..000000000000 --- a/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,459 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`block-comments.js [acorn] format 1`] = ` -"Unexpected token (2:2) - 1 | bifornCringerMoshedPerplexSawder -> 2 | |> foo1 - | ^ - 3 | |> foo2 /* comment1 */ - 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" -`; - -exports[`block-comments.js [espree] format 1`] = ` -"Unexpected token > (2:2) - 1 | bifornCringerMoshedPerplexSawder -> 2 | |> foo1 - | ^ - 3 | |> foo2 /* comment1 */ - 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" -`; - -exports[`block-comments.js [meriyah] format 1`] = ` -"Unexpected token: '>' (2:2) - 1 | bifornCringerMoshedPerplexSawder -> 2 | |> foo1 - | ^ - 3 | |> foo2 /* comment1 */ - 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" -`; - -exports[`block-comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -bifornCringerMoshedPerplexSawder -|> foo1 -|> foo2 /* comment1 */ -|> foo3 /* comment2 */ -|> kochabCooieGameOnOboleUnweave -|> glimseGlyphsHazardNoopsTieTie; - -=====================================output===================================== -bifornCringerMoshedPerplexSawder - |> foo1 - |> foo2 /* comment1 */ - |> foo3 /* comment2 */ - |> kochabCooieGameOnOboleUnweave - |> glimseGlyphsHazardNoopsTieTie; - -================================================================================ -`; - -exports[`fsharp_style_pipeline_operator.js [acorn] format 1`] = ` -"Unexpected token (2:4) - 1 | promise -> 2 | |> await - | ^ - 3 | |> x => doubleSay(x, ', ') - 4 | |> capitalize - 5 | |> x => x + '!'" -`; - -exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = ` -"Unexpected token > (2:4) - 1 | promise -> 2 | |> await - | ^ - 3 | |> x => doubleSay(x, ', ') - 4 | |> capitalize - 5 | |> x => x + '!'" -`; - -exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = ` -"Unexpected token: '>' (2:4) - 1 | promise -> 2 | |> await - | ^ - 3 | |> x => doubleSay(x, ', ') - 4 | |> capitalize - 5 | |> x => x + '!'" -`; - -exports[`fsharp_style_pipeline_operator.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -promise - |> await - |> x => doubleSay(x, ', ') - |> capitalize - |> x => x + '!' - |> x => new User.Message(x) - |> x => stream.write(x) - |> await - |> console.log; - -const result = "hello" - |> doubleSay - |> capitalize - |> exclaim; - -const newScore = person.score - |> double - |> n => add(7, n) - |> n => boundScore(0, 100, n); - -const user = url - |> api.get - |> await - |> r => r.json() - |> await - |> j => j.data.user; - -const f = (x) => (x |> (y) => y + 1) - |> (z) => z * y - -const _f = (x) => x - |> (y) => y + 1 - |> (z) => z * y - -const g = (x) => x - |> (y) => (y + 1 |> (z) => z * y) - -const _g = (x) => x - |> (y => (y + 1 |> (z) => z * y)) - -const __g = (x) => x - |> ( - y => { - return (y + 1 |> (z) => z * y); - } - ) - -const f = x + ((f) => (f |> f)); -const f = x |> (f) => f |> f; - -=====================================output===================================== -promise - |> await - |> (x) => doubleSay(x, ", ") - |> capitalize - |> (x) => x + "!" - |> (x) => new User.Message(x) - |> (x) => stream.write(x) - |> await - |> console.log; - -const result = "hello" |> doubleSay |> capitalize |> exclaim; - -const newScore = - person.score |> double |> (n) => add(7, n) |> (n) => boundScore(0, 100, n); - -const user = - url |> api.get |> await |> (r) => r.json() |> await |> (j) => j.data.user; - -const f = (x) => x |> (y) => y + 1 |> (z) => z * y; - -const _f = (x) => x |> (y) => y + 1 |> (z) => z * y; - -const g = (x) => x |> (y) => (y + 1 |> (z) => z * y); - -const _g = (x) => x |> ((y) => (y + 1 |> (z) => z * y)); - -const __g = (x) => - x - |> ((y) => { - return y + 1 |> (z) => z * y; - }); - -const f = x + ((f) => f |> f); -const f = x |> (f) => f |> f; - -================================================================================ -`; - -exports[`hack_pipeline_operator.js [acorn] format 1`] = ` -"Unexpected token (1:4) -> 1 | a |> await % |> % * 3; - | ^ - 2 | - 3 | foo - 4 | |> await %" -`; - -exports[`hack_pipeline_operator.js [espree] format 1`] = ` -"Unexpected token > (1:4) -> 1 | a |> await % |> % * 3; - | ^ - 2 | - 3 | foo - 4 | |> await %" -`; - -exports[`hack_pipeline_operator.js [meriyah] format 1`] = ` -"Unexpected token: '>' (1:4) -> 1 | a |> await % |> % * 3; - | ^ - 2 | - 3 | foo - 4 | |> await %" -`; - -exports[`hack_pipeline_operator.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a |> await % |> % * 3; - -foo - |> await % - |> % || throw new Error(\`foo \${bar1}\`) - |> bar2(%, ", ") - |> bar3(%) - |> % + "!" - |> new Bar.Foo(%) - |> await bar.bar(%) - |> console.log(%); - -const result = "hello" - |> doubleSay(%) - |> capitalize(%, "foo") - |> exclaim(%); - -function createPerson (attrs) { - attrs - |> foo(%) - |> foo(%) - |> Person.insertIntoDatabase(%); -} - -const result = [1,2,3] - |> %.map(a => a * 2 ) - |> %.filter(a => a > 5) - |> %.reduce((sum, a) => a+sum, 0) - |> increment(%) - |> add(%, 3) - -const searchResults$ = fromEvent(document.querySelector('input'), 'input') - |> map(%, event => event.target.value) - |> filter(%, searchText => searchText.length > 2) - |> debounce(%, 300) - |> distinctUntilChanged(%) - |> switchMap(%, searchText => queryApi(searchText) |> retry(%, 3)) - |> share(%); - -v |> %.method() |> f(%); - -async function * f () { - return x - |> (yield %) - |> (await %) - |> y(%) - |> a.b(%) - |> (a.b(%)) - |> a.b(%) - |> (a.b?.(%)) - |> a.b?.(%); -} - -=====================================output===================================== -a |> (await %) |> % * 3; - -foo -|> (await %) -|> % || throw new Error(\`foo \${bar1}\`) -|> bar2(%, ", ") -|> bar3(%) -|> % + "!" -|> new Bar.Foo(%) -|> (await bar.bar(%)) -|> console.log(%); - -const result = "hello" |> doubleSay(%) |> capitalize(%, "foo") |> exclaim(%); - -function createPerson(attrs) { - attrs |> foo(%) |> foo(%) |> Person.insertIntoDatabase(%); -} - -const result = - [1, 2, 3] - |> %.map((a) => a * 2) - |> %.filter((a) => a > 5) - |> %.reduce((sum, a) => a + sum, 0) - |> increment(%) - |> add(%, 3); - -const searchResults$ = - fromEvent(document.querySelector("input"), "input") - |> map(%, (event) => event.target.value) - |> filter(%, (searchText) => searchText.length > 2) - |> debounce(%, 300) - |> distinctUntilChanged(%) - |> switchMap(%, (searchText) => queryApi(searchText) |> retry(%, 3)) - |> share(%); - -v |> %.method() |> f(%); - -async function* f() { - return ( - x - |> (yield %) - |> (await %) - |> y(%) - |> a.b(%) - |> a.b(%) - |> a.b(%) - |> a.b?.(%) - |> a.b?.(%) - ); -} - -================================================================================ -`; - -exports[`minimal_pipeline_operator.js [acorn] format 1`] = ` -"Unexpected token (1:4) -> 1 | a |> b |> c; - | ^ - 2 | - 3 | a |> (b |> c); - 4 |" -`; - -exports[`minimal_pipeline_operator.js [espree] format 1`] = ` -"Unexpected token > (1:4) -> 1 | a |> b |> c; - | ^ - 2 | - 3 | a |> (b |> c); - 4 |" -`; - -exports[`minimal_pipeline_operator.js [meriyah] format 1`] = ` -"Unexpected token: '>' (1:4) -> 1 | a |> b |> c; - | ^ - 2 | - 3 | a |> (b |> c); - 4 |" -`; - -exports[`minimal_pipeline_operator.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a |> b |> c; - -a |> (b |> c); - -(a |> b) || c; -a |> (b || c); - -let result = "hello" - |> doubleSay - |> capitalize - |> exclaim; - -let newScore = person.score - |> double - |> (_ => add(7, _)) - |> (_ => subtract(2, _)) - |> (_ => boundScore(0, 100, _)); - -function createPerson (attrs) { - attrs - |> bounded('age', 1, 100) - |> format('name', /^[a-z]$/i) - |> Person.insertIntoDatabase; -} - -foo |> (bar ?? baz); -(foo |> bar) ?? baz; - -const result = [1,2,3] - |> map(a => a * 2) - |> filter(a => a > 5) - |> reduce((sum, a) => a+sum, 0) - |> increment - |> add(3) - -const searchResults$ = fromEvent(document.querySelector('input'), 'input') - |> map(event => event.target.value) - |> filter(searchText => searchText.length > 2) - |> debounce(300) - |> distinctUntilChanged() - |> switchMap(searchText => queryApi(searchText) |> retry(3)) - |> share(); - -const result = [5,10] - |> (_ => _.map(x => x * 2)) - |> (_ => _.reduce( (a,b) => a + b )) - |> (sum => sum + 1) - -const result2 = [4, 9].map( x => x |> inc |> double ) - -=====================================output===================================== -a |> b |> c; - -a |> (b |> c); - -(a |> b) || c; -a |> b || c; - -let result = "hello" |> doubleSay |> capitalize |> exclaim; - -let newScore = - person.score - |> double - |> ((_) => add(7, _)) - |> ((_) => subtract(2, _)) - |> ((_) => boundScore(0, 100, _)); - -function createPerson(attrs) { - attrs - |> bounded("age", 1, 100) - |> format("name", /^[a-z]$/i) - |> Person.insertIntoDatabase; -} - -foo |> bar ?? baz; -(foo |> bar) ?? baz; - -const result = - [1, 2, 3] - |> map((a) => a * 2) - |> filter((a) => a > 5) - |> reduce((sum, a) => a + sum, 0) - |> increment - |> add(3); - -const searchResults$ = - fromEvent(document.querySelector("input"), "input") - |> map((event) => event.target.value) - |> filter((searchText) => searchText.length > 2) - |> debounce(300) - |> distinctUntilChanged() - |> switchMap((searchText) => queryApi(searchText) |> retry(3)) - |> share(); - -const result = - [5, 10] - |> ((_) => _.map((x) => x * 2)) - |> ((_) => _.reduce((a, b) => a + b)) - |> ((sum) => sum + 1); - -const result2 = [4, 9].map((x) => x |> inc |> double); - -================================================================================ -`; diff --git a/tests/format/js/pipeline-operator/format.test.js b/tests/format/js/pipeline-operator/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/pipeline-operator/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/pipeline-operator/jsfmt.spec.js b/tests/format/js/pipeline-operator/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/pipeline-operator/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/preserve-line/__snapshots__/format.test.js.snap b/tests/format/js/preserve-line/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f37329c628d6 --- /dev/null +++ b/tests/format/js/preserve-line/__snapshots__/format.test.js.snap @@ -0,0 +1,885 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`argument-list.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +longArgNamesWithComments( + + // Hello World + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong1, + + // Hello World + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong2, + + /* Hello World */ + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong3, + + +); + +shortArgNames( + + + short, + + short2, + short3, +); + +comments( + + // Comment + + /* Some comments */ + short, + /* Another comment */ + + + short2, // Even more comments + + + /* Another comment */ + + + // Long Long Long Long Long Comment + + + + /* Long Long Long Long Long Comment */ + // Long Long Long Long Long Comment + + short3, + // More comments + + +); + +differentArgTypes( + + () => { + return true + }, + + isTrue ? + doSomething() : 12, + +); + +moreArgTypes( + + [1, 2, + 3], + + { + name: 'Hello World', + age: 29 + }, + + doSomething( + + // Hello world + + + // Hello world again + { name: 'Hello World', age: 34 }, + + + oneThing + + anotherThing, + + // Comment + + ), + +); + +evenMoreArgTypes( + doSomething( + { name: 'Hello World', age: 34 }, + + + true + + ), + + 14, + + 1 + 2 + - 90/80, + + !98 * + 60 - + 90, + + + +) + +foo.apply(null, + +// Array here +[1, 2]); + + +bar.on("readable", + +() => { + doStuff() +}); + +foo(['A, B'], + +/* function here */ +function doSomething() { return true; }); + +doSomething.apply(null, + +// Comment + +[ + 'Hello world 1', + 'Hello world 2', + 'Hello world 3', +]); + + +doAnotherThing("node", + +{ + solution_type, + time_frame +}); + +stuff.doThing(someStuff, + + -1, { + accept: node => doSomething(node) +}); + +doThing( + + someOtherStuff, + + // This is important + true, { + decline: creditCard => takeMoney(creditCard) +} + +); + +func( + () => { + thing(); + }, + + { yes: true, no: 5 } +); + +doSomething( + + { tomorrow: maybe, today: never[always] }, + + 1337, + + /* Comment */ + + // This is important + { helloWorld, someImportantStuff } + + +); + +function foo( + one, + + two, + three, + four, + + + five, + six, + seven, + eight, + nine, + ten, + + eleven + +) {} + +=====================================output===================================== +longArgNamesWithComments( + // Hello World + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong1, + + // Hello World + + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong2, + + /* Hello World */ + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong3, +); + +shortArgNames( + short, + + short2, + short3, +); + +comments( + // Comment + + /* Some comments */ + short, + /* Another comment */ + + short2, // Even more comments + + /* Another comment */ + + // Long Long Long Long Long Comment + + /* Long Long Long Long Long Comment */ + // Long Long Long Long Long Comment + + short3, + // More comments +); + +differentArgTypes( + () => { + return true; + }, + + isTrue ? doSomething() : 12, +); + +moreArgTypes( + [1, 2, 3], + + { + name: "Hello World", + age: 29, + }, + + doSomething( + // Hello world + + // Hello world again + { name: "Hello World", age: 34 }, + + oneThing + anotherThing, + + // Comment + ), +); + +evenMoreArgTypes( + doSomething( + { name: "Hello World", age: 34 }, + + true, + ), + + 14, + + 1 + 2 - 90 / 80, + + !98 * 60 - 90, +); + +foo.apply( + null, + + // Array here + [1, 2], +); + +bar.on( + "readable", + + () => { + doStuff(); + }, +); + +foo( + ["A, B"], + + /* function here */ + function doSomething() { + return true; + }, +); + +doSomething.apply( + null, + + // Comment + + ["Hello world 1", "Hello world 2", "Hello world 3"], +); + +doAnotherThing( + "node", + + { + solution_type, + time_frame, + }, +); + +stuff.doThing( + someStuff, + + -1, + { + accept: (node) => doSomething(node), + }, +); + +doThing( + someOtherStuff, + + // This is important + true, + { + decline: (creditCard) => takeMoney(creditCard), + }, +); + +func( + () => { + thing(); + }, + + { yes: true, no: 5 }, +); + +doSomething( + { tomorrow: maybe, today: never[always] }, + + 1337, + + /* Comment */ + + // This is important + { helloWorld, someImportantStuff }, +); + +function foo( + one, + + two, + three, + four, + + five, + six, + seven, + eight, + nine, + ten, + + eleven, +) {} + +================================================================================ +`; + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a() { + const a = 5; // comment + + return a; +} + +function a() { + const a = 5; /* comment */ + + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ + + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ // comment + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ // comment + + return a; +} + +=====================================output===================================== +function a() { + const a = 5; // comment + + return a; +} + +function a() { + const a = 5; /* comment */ + + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ + + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ // comment + return a; +} + +function a() { + const a = 5; /* comment */ /* comment */ // comment + + return a; +} + +================================================================================ +`; + +exports[`member-chain.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +fooBar.doSomething('Hello World').doAnotherThing('Foo', { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + .run(() => console.log('Bar')); + +bigDeal + + .doSomething('Hello World') + + // Hello world + .doAnotherThing('Foo', { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + .run(() => console.log('Bar')); + + +foo.bar.baz + + .doSomething('Hello World') + + // Hello world + .foo.bar.doAnotherThing('Foo', { foo: bar }) + + .doOneMoreThing(config) + .bar.run(() => console.log('Bar')); + +( + somethingGood ? thisIsIt : maybeNot +) + + // Hello world + .doSomething('Hello World') + + .doAnotherThing('Foo', { foo: bar }) // Run this + .run(() => console.log('Bar')); // Do this + +helloWorld + + .text() + + .then(t => t); + +(veryLongVeryLongVeryLong || + anotherVeryLongVeryLongVeryLong || + veryVeryVeryLongError +) + + .map(tickets => TicketRecord.createFromSomeLongString()) + + .filter(obj => !!obj); + +const sel = this.connections + + .concat(this.activities.concat(this.operators)) + .filter(x => x.selected); + +Object.entries(obj) + +.forEach((e) => console.log(e)); + +this.fetch("/foo") + + .then(response => response.json()); + +=====================================output===================================== +fooBar + .doSomething("Hello World") + .doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + .run(() => console.log("Bar")); + +bigDeal + + .doSomething("Hello World") + + // Hello world + .doAnotherThing("Foo", { foo: bar }) + + // App configuration. + .doOneMoreThing(config) + + .run(() => console.log("Bar")); + +foo.bar.baz + + .doSomething("Hello World") + + // Hello world + .foo.bar.doAnotherThing("Foo", { foo: bar }) + + .doOneMoreThing(config) + .bar.run(() => console.log("Bar")); + +(somethingGood ? thisIsIt : maybeNot) + + // Hello world + .doSomething("Hello World") + + .doAnotherThing("Foo", { foo: bar }) // Run this + .run(() => console.log("Bar")); // Do this + +helloWorld + + .text() + + .then((t) => t); + +( + veryLongVeryLongVeryLong || + anotherVeryLongVeryLongVeryLong || + veryVeryVeryLongError +) + + .map((tickets) => TicketRecord.createFromSomeLongString()) + + .filter((obj) => !!obj); + +const sel = this.connections + + .concat(this.activities.concat(this.operators)) + .filter((x) => x.selected); + +Object.entries(obj) + + .forEach((e) => console.log(e)); + +this.fetch("/foo") + + .then((response) => response.json()); + +================================================================================ +`; + +exports[`parameter-list.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + constructor( + one, + + two, + three, + four, + + + five, + six, + seven, + eight, + nine, + ten, + + eleven + + ) {} +} + +function foo( + one, + + two, + three, + four, + + + five, + six, + seven, + eight, + nine, + ten, + + eleven + +) {} + +call((a, b) => {}); + +call(( + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ten, + eleven +) => {}); + +call(( + one, + + two, + three, + four, + + + five, + six, + seven, + eight, + nine, + ten, + + eleven + +) => {}); + +function test({ + one, + + two, + three, + four, + + + five, + six, + seven, + eight, + nine, + ten, + + eleven + +}) {} + +function test({ + one, + two, + three, + four, +}) {} + +function test({ + one, + + two, + three, + four, + +}) {} + +function test({ one, two, three, four }, $a) {} + + +function test( + { one, two, three, four }, + + $a +) {} + +function foo( + + ...rest + +) {} + +function foo( + one, + + ...rest +) {} + +function foo(one,...rest) {} + +f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong,...args +); + +it( + + "does something really long and complicated so I have to write a very long name for the test", + + function( + + done, + + foo + ) { + + console.log("hello!"); + } +); + +=====================================output===================================== +class Foo { + constructor( + one, + + two, + three, + four, + + five, + six, + seven, + eight, + nine, + ten, + + eleven, + ) {} +} + +function foo( + one, + + two, + three, + four, + + five, + six, + seven, + eight, + nine, + ten, + + eleven, +) {} + +call((a, b) => {}); + +call((one, two, three, four, five, six, seven, eight, nine, ten, eleven) => {}); + +call( + ( + one, + + two, + three, + four, + + five, + six, + seven, + eight, + nine, + ten, + + eleven, + ) => {}, +); + +function test({ + one, + + two, + three, + four, + + five, + six, + seven, + eight, + nine, + ten, + + eleven, +}) {} + +function test({ one, two, three, four }) {} + +function test({ + one, + + two, + three, + four, +}) {} + +function test({ one, two, three, four }, $a) {} + +function test( + { one, two, three, four }, + + $a, +) {} + +function foo(...rest) {} + +function foo( + one, + + ...rest +) {} + +function foo(one, ...rest) {} + +f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + ...args, +); + +it("does something really long and complicated so I have to write a very long name for the test", function (done, foo) { + console.log("hello!"); +}); + +================================================================================ +`; diff --git a/tests/format/js/preserve-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/preserve-line/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index cde94fcfcfd3..000000000000 --- a/tests/format/js/preserve-line/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,869 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`argument-list.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -longArgNamesWithComments( - - // Hello World - - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong1, - - // Hello World - - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong2, - - /* Hello World */ - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong3, - - -); - -shortArgNames( - - - short, - - short2, - short3, -); - -comments( - - // Comment - - /* Some comments */ - short, - /* Another comment */ - - - short2, // Even more comments - - - /* Another comment */ - - - // Long Long Long Long Long Comment - - - - /* Long Long Long Long Long Comment */ - // Long Long Long Long Long Comment - - short3, - // More comments - - -); - -differentArgTypes( - - () => { - return true - }, - - isTrue ? - doSomething() : 12, - -); - -moreArgTypes( - - [1, 2, - 3], - - { - name: 'Hello World', - age: 29 - }, - - doSomething( - - // Hello world - - - // Hello world again - { name: 'Hello World', age: 34 }, - - - oneThing - + anotherThing, - - // Comment - - ), - -); - -evenMoreArgTypes( - doSomething( - { name: 'Hello World', age: 34 }, - - - true - - ), - - 14, - - 1 + 2 - - 90/80, - - !98 * - 60 - - 90, - - - -) - -foo.apply(null, - -// Array here -[1, 2]); - - -bar.on("readable", - -() => { - doStuff() -}); - -foo(['A, B'], - -/* function here */ -function doSomething() { return true; }); - -doSomething.apply(null, - -// Comment - -[ - 'Hello world 1', - 'Hello world 2', - 'Hello world 3', -]); - - -doAnotherThing("node", - -{ - solution_type, - time_frame -}); - -stuff.doThing(someStuff, - - -1, { - accept: node => doSomething(node) -}); - -doThing( - - someOtherStuff, - - // This is important - true, { - decline: creditCard => takeMoney(creditCard) -} - -); - -func( - () => { - thing(); - }, - - { yes: true, no: 5 } -); - -doSomething( - - { tomorrow: maybe, today: never[always] }, - - 1337, - - /* Comment */ - - // This is important - { helloWorld, someImportantStuff } - - -); - -function foo( - one, - - two, - three, - four, - - - five, - six, - seven, - eight, - nine, - ten, - - eleven - -) {} - -=====================================output===================================== -longArgNamesWithComments( - // Hello World - - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong1, - - // Hello World - - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong2, - - /* Hello World */ - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong3 -); - -shortArgNames( - short, - - short2, - short3 -); - -comments( - // Comment - - /* Some comments */ - short, - /* Another comment */ - - short2, // Even more comments - - /* Another comment */ - - // Long Long Long Long Long Comment - - /* Long Long Long Long Long Comment */ - // Long Long Long Long Long Comment - - short3 - // More comments -); - -differentArgTypes( - () => { - return true; - }, - - isTrue ? doSomething() : 12 -); - -moreArgTypes( - [1, 2, 3], - - { - name: "Hello World", - age: 29, - }, - - doSomething( - // Hello world - - // Hello world again - { name: "Hello World", age: 34 }, - - oneThing + anotherThing - - // Comment - ) -); - -evenMoreArgTypes( - doSomething( - { name: "Hello World", age: 34 }, - - true - ), - - 14, - - 1 + 2 - 90 / 80, - - !98 * 60 - 90 -); - -foo.apply( - null, - - // Array here - [1, 2] -); - -bar.on( - "readable", - - () => { - doStuff(); - } -); - -foo( - ["A, B"], - - /* function here */ - function doSomething() { - return true; - } -); - -doSomething.apply( - null, - - // Comment - - ["Hello world 1", "Hello world 2", "Hello world 3"] -); - -doAnotherThing( - "node", - - { - solution_type, - time_frame, - } -); - -stuff.doThing( - someStuff, - - -1, - { - accept: (node) => doSomething(node), - } -); - -doThing( - someOtherStuff, - - // This is important - true, - { - decline: (creditCard) => takeMoney(creditCard), - } -); - -func( - () => { - thing(); - }, - - { yes: true, no: 5 } -); - -doSomething( - { tomorrow: maybe, today: never[always] }, - - 1337, - - /* Comment */ - - // This is important - { helloWorld, someImportantStuff } -); - -function foo( - one, - - two, - three, - four, - - five, - six, - seven, - eight, - nine, - ten, - - eleven -) {} - -================================================================================ -`; - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a() { - const a = 5; // comment - - return a; -} - -function a() { - const a = 5; /* comment */ - - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ - - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ // comment - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ // comment - - return a; -} - -=====================================output===================================== -function a() { - const a = 5; // comment - - return a; -} - -function a() { - const a = 5; /* comment */ - - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ - - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ // comment - return a; -} - -function a() { - const a = 5; /* comment */ /* comment */ // comment - - return a; -} - -================================================================================ -`; - -exports[`member-chain.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -fooBar.doSomething('Hello World').doAnotherThing('Foo', { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - .run(() => console.log('Bar')); - -bigDeal - - .doSomething('Hello World') - - // Hello world - .doAnotherThing('Foo', { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - .run(() => console.log('Bar')); - - -foo.bar.baz - - .doSomething('Hello World') - - // Hello world - .foo.bar.doAnotherThing('Foo', { foo: bar }) - - .doOneMoreThing(config) - .bar.run(() => console.log('Bar')); - -( - somethingGood ? thisIsIt : maybeNot -) - - // Hello world - .doSomething('Hello World') - - .doAnotherThing('Foo', { foo: bar }) // Run this - .run(() => console.log('Bar')); // Do this - -helloWorld - - .text() - - .then(t => t); - -(veryLongVeryLongVeryLong || - anotherVeryLongVeryLongVeryLong || - veryVeryVeryLongError -) - - .map(tickets => TicketRecord.createFromSomeLongString()) - - .filter(obj => !!obj); - -const sel = this.connections - - .concat(this.activities.concat(this.operators)) - .filter(x => x.selected); - -=====================================output===================================== -fooBar - .doSomething("Hello World") - .doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - .run(() => console.log("Bar")); - -bigDeal - - .doSomething("Hello World") - - // Hello world - .doAnotherThing("Foo", { foo: bar }) - - // App configuration. - .doOneMoreThing(config) - - .run(() => console.log("Bar")); - -foo.bar.baz - - .doSomething("Hello World") - - // Hello world - .foo.bar.doAnotherThing("Foo", { foo: bar }) - - .doOneMoreThing(config) - .bar.run(() => console.log("Bar")); - -(somethingGood ? thisIsIt : maybeNot) - - // Hello world - .doSomething("Hello World") - - .doAnotherThing("Foo", { foo: bar }) // Run this - .run(() => console.log("Bar")); // Do this - -helloWorld - - .text() - - .then((t) => t); - -( - veryLongVeryLongVeryLong || - anotherVeryLongVeryLongVeryLong || - veryVeryVeryLongError -) - - .map((tickets) => TicketRecord.createFromSomeLongString()) - - .filter((obj) => !!obj); - -const sel = this.connections - - .concat(this.activities.concat(this.operators)) - .filter((x) => x.selected); - -================================================================================ -`; - -exports[`parameter-list.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - constructor( - one, - - two, - three, - four, - - - five, - six, - seven, - eight, - nine, - ten, - - eleven - - ) {} -} - -function foo( - one, - - two, - three, - four, - - - five, - six, - seven, - eight, - nine, - ten, - - eleven - -) {} - -call((a, b) => {}); - -call(( - one, - two, - three, - four, - five, - six, - seven, - eight, - nine, - ten, - eleven -) => {}); - -call(( - one, - - two, - three, - four, - - - five, - six, - seven, - eight, - nine, - ten, - - eleven - -) => {}); - -function test({ - one, - - two, - three, - four, - - - five, - six, - seven, - eight, - nine, - ten, - - eleven - -}) {} - -function test({ - one, - two, - three, - four, -}) {} - -function test({ - one, - - two, - three, - four, - -}) {} - -function test({ one, two, three, four }, $a) {} - - -function test( - { one, two, three, four }, - - $a -) {} - -function foo( - - ...rest - -) {} - -function foo( - one, - - ...rest -) {} - -function foo(one,...rest) {} - -f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong,...args -); - -it( - - "does something really long and complicated so I have to write a very long name for the test", - - function( - - done, - - foo - ) { - - console.log("hello!"); - } -); - -=====================================output===================================== -class Foo { - constructor( - one, - - two, - three, - four, - - five, - six, - seven, - eight, - nine, - ten, - - eleven - ) {} -} - -function foo( - one, - - two, - three, - four, - - five, - six, - seven, - eight, - nine, - ten, - - eleven -) {} - -call((a, b) => {}); - -call((one, two, three, four, five, six, seven, eight, nine, ten, eleven) => {}); - -call( - ( - one, - - two, - three, - four, - - five, - six, - seven, - eight, - nine, - ten, - - eleven - ) => {} -); - -function test({ - one, - - two, - three, - four, - - five, - six, - seven, - eight, - nine, - ten, - - eleven, -}) {} - -function test({ one, two, three, four }) {} - -function test({ - one, - - two, - three, - four, -}) {} - -function test({ one, two, three, four }, $a) {} - -function test( - { one, two, three, four }, - - $a -) {} - -function foo(...rest) {} - -function foo( - one, - - ...rest -) {} - -function foo(one, ...rest) {} - -f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - ...args -); - -it("does something really long and complicated so I have to write a very long name for the test", function (done, foo) { - console.log("hello!"); -}); - -================================================================================ -`; diff --git a/tests/format/js/preserve-line/format.test.js b/tests/format/js/preserve-line/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/preserve-line/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/preserve-line/jsfmt.spec.js b/tests/format/js/preserve-line/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/preserve-line/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/preserve-line/member-chain.js b/tests/format/js/preserve-line/member-chain.js index 267f1ba82263..b63b284d647a 100644 --- a/tests/format/js/preserve-line/member-chain.js +++ b/tests/format/js/preserve-line/member-chain.js @@ -57,3 +57,11 @@ const sel = this.connections .concat(this.activities.concat(this.operators)) .filter(x => x.selected); + +Object.entries(obj) + +.forEach((e) => console.log(e)); + +this.fetch("/foo") + + .then(response => response.json()); diff --git a/tests/format/js/private-in/__snapshots__/format.test.js.snap b/tests/format/js/private-in/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7d52da1b5bee --- /dev/null +++ b/tests/format/js/private-in/__snapshots__/format.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`private-in.js [espree] format 1`] = ` +"Unexpected token #prop (1:5) +> 1 | if (#prop in obj) { + | ^ + 2 | } + 3 | + 4 | #prop in obj; +Cause: Unexpected token #prop" +`; + +exports[`private-in.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (#prop in obj) { +} + +#prop in obj; + +#prop in obj; + +#prop in +obj; + +#prop +in +obj; + +#prop +in obj; + +=====================================output===================================== +if (#prop in obj) { +} + +#prop in obj; + +#prop in obj; + +#prop in obj; + +#prop in obj; + +#prop in obj; + +================================================================================ +`; diff --git a/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7d384bd0d949..000000000000 --- a/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`private-in.js [acorn] format 1`] = ` -"Unexpected token (1:5) -> 1 | if (#prop in obj) { - | ^ - 2 | } - 3 | - 4 | #prop in obj;" -`; - -exports[`private-in.js [espree] format 1`] = ` -"Unexpected token #prop (1:5) -> 1 | if (#prop in obj) { - | ^ - 2 | } - 3 | - 4 | #prop in obj;" -`; - -exports[`private-in.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (#prop in obj) { -} - -#prop in obj; - -#prop in obj; - -#prop in -obj; - -#prop -in -obj; - -#prop -in obj; - -=====================================output===================================== -if (#prop in obj) { -} - -#prop in obj; - -#prop in obj; - -#prop in obj; - -#prop in obj; - -#prop in obj; - -================================================================================ -`; diff --git a/tests/format/js/private-in/format.test.js b/tests/format/js/private-in/format.test.js new file mode 100644 index 000000000000..0a93f8d29cc6 --- /dev/null +++ b/tests/format/js/private-in/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel"], { + errors: { espree: true }, +}); diff --git a/tests/format/js/private-in/jsfmt.spec.js b/tests/format/js/private-in/jsfmt.spec.js deleted file mode 100644 index 0e68cd0b8b5c..000000000000 --- a/tests/format/js/private-in/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"], { errors: { acorn: true, espree: true } }); diff --git a/tests/format/js/quote-props/__snapshots__/format.test.js.snap b/tests/format/js/quote-props/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41c1af74a572 --- /dev/null +++ b/tests/format/js/quote-props/__snapshots__/format.test.js.snap @@ -0,0 +1,1446 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`classes.js - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +class A { + a = "a" +}; + +class B { + 'b' = "b" +}; + +class C { + c1 = "c1" + 'c2' = "c2" +}; + +class D { + d1 = "d1" + 'd-2' = "d2" +}; + +=====================================output===================================== +class A { + a = "a"; +} + +class B { + b = "b"; +} + +class C { + c1 = "c1"; + c2 = "c2"; +} + +class D { + d1 = "d1"; + "d-2" = "d2"; +} + +================================================================================ +`; + +exports[`classes.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" +singleQuote: true + | printWidth +=====================================input====================================== +class A { + a = "a" +}; + +class B { + 'b' = "b" +}; + +class C { + c1 = "c1" + 'c2' = "c2" +}; + +class D { + d1 = "d1" + 'd-2' = "d2" +}; + +=====================================output===================================== +class A { + a = 'a'; +} + +class B { + b = 'b'; +} + +class C { + c1 = 'c1'; + c2 = 'c2'; +} + +class D { + 'd1' = 'd1'; + 'd-2' = 'd2'; +} + +================================================================================ +`; + +exports[`classes.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +class A { + a = "a" +}; + +class B { + 'b' = "b" +}; + +class C { + c1 = "c1" + 'c2' = "c2" +}; + +class D { + d1 = "d1" + 'd-2' = "d2" +}; + +=====================================output===================================== +class A { + a = "a"; +} + +class B { + b = "b"; +} + +class C { + c1 = "c1"; + c2 = "c2"; +} + +class D { + "d1" = "d1"; + "d-2" = "d2"; +} + +================================================================================ +`; + +exports[`classes.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +class A { + a = "a" +}; + +class B { + 'b' = "b" +}; + +class C { + c1 = "c1" + 'c2' = "c2" +}; + +class D { + d1 = "d1" + 'd-2' = "d2" +}; + +=====================================output===================================== +class A { + a = "a"; +} + +class B { + "b" = "b"; +} + +class C { + c1 = "c1"; + "c2" = "c2"; +} + +class D { + d1 = "d1"; + "d-2" = "d2"; +} + +================================================================================ +`; + +exports[`numeric-separator.js - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +a = { + + 0xb_b: '0xb_b', // 187 + 0xb_b_bn: '0xb_b_bn', // 3003 + 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 +} + +=====================================output===================================== +a = { + 0xb_b: "0xb_b", // 187 + 0xb_b_bn: "0xb_b_bn", // 3003 + 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 +}; + +================================================================================ +`; + +exports[`numeric-separator.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" +singleQuote: true + | printWidth +=====================================input====================================== +a = { + + 0xb_b: '0xb_b', // 187 + 0xb_b_bn: '0xb_b_bn', // 3003 + 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 +} + +=====================================output===================================== +a = { + 0xb_b: '0xb_b', // 187 + 0xb_b_bn: '0xb_b_bn', // 3003 + 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n', // 536870915 +}; + +================================================================================ +`; + +exports[`numeric-separator.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +a = { + + 0xb_b: '0xb_b', // 187 + 0xb_b_bn: '0xb_b_bn', // 3003 + 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 +} + +=====================================output===================================== +a = { + 0xb_b: "0xb_b", // 187 + 0xb_b_bn: "0xb_b_bn", // 3003 + 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 +}; + +================================================================================ +`; + +exports[`numeric-separator.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +a = { + + 0xb_b: '0xb_b', // 187 + 0xb_b_bn: '0xb_b_bn', // 3003 + 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 +} + +=====================================output===================================== +a = { + 0xb_b: "0xb_b", // 187 + 0xb_b_bn: "0xb_b_bn", // 3003 + 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 +}; + +================================================================================ +`; + +exports[`objects.js - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +a = { + a: "a" +}; + +a = { + 'b': "b" +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + '\\u0062': "b", + '\\u0031': "1" +}; + +a = { + c1: "c1", + 'c2': "c2" +}; + +a = { + d1: "d1", + 'd-2': "d2" +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + .1: null, + 1.: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1E2: null, + 1e+3: null, + 1e+100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +} + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +} + +Object.entries({ + // To force quotes for quoteProps=consistent. + 'a-': 'a-', + // These can be quoted: + NaN: 'NaN', + 1: '1', + 1.5: '1.5', + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + .1: '.1', + 1.: '1.', + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: '1.0', // 1 + 999999999999999999999: '999999999999999999999', // 1e+21 + 0.99999999999999999: '0.99999999999999999', // 1 + 1E2: '1E2', // 100 + 1e+3: '1e+3', // 1000 + 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: '0b10', // 2 + 0o10: '0o10', // 8 + 0xf: '0xf', // 15 + 2n: '2n', // 2 + 0xan: '0xan', // 10 +}) + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +} + +a = { + "\\a": 1, + "b": 2 +} + +=====================================output===================================== +a = { + a: "a", +}; + +a = { + b: "b", +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + "\\u0062": "b", + "\\u0031": "1", +}; + +a = { + c1: "c1", + c2: "c2", +}; + +a = { + d1: "d1", + "d-2": "d2", +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + 0.1: null, + 1: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1e2: null, + 1e3: null, + 1e100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +}; + +a = { + // These should be unquoted for quoteProps=as-needed. + NaN: null, + 1: null, + 1.5: null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +}; + +Object.entries({ + // To force quotes for quoteProps=consistent. + "a-": "a-", + // These can be quoted: + NaN: "NaN", + 1: "1", + 1.5: "1.5", + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + 0.1: ".1", + 1: "1.", + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: "1.0", // 1 + 999999999999999999999: "999999999999999999999", // 1e+21 + 0.99999999999999999: "0.99999999999999999", // 1 + 1e2: "1E2", // 100 + 1e3: "1e+3", // 1000 + 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: "0b10", // 2 + 0o10: "0o10", // 8 + 0xf: "0xf", // 15 + 2n: "2n", // 2 + 0xan: "0xan", // 10 +}); + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +}; + +a = { + "\\a": 1, + b: 2, +}; + +================================================================================ +`; + +exports[`objects.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" +singleQuote: true + | printWidth +=====================================input====================================== +a = { + a: "a" +}; + +a = { + 'b': "b" +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + '\\u0062': "b", + '\\u0031': "1" +}; + +a = { + c1: "c1", + 'c2': "c2" +}; + +a = { + d1: "d1", + 'd-2': "d2" +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + .1: null, + 1.: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1E2: null, + 1e+3: null, + 1e+100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +} + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +} + +Object.entries({ + // To force quotes for quoteProps=consistent. + 'a-': 'a-', + // These can be quoted: + NaN: 'NaN', + 1: '1', + 1.5: '1.5', + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + .1: '.1', + 1.: '1.', + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: '1.0', // 1 + 999999999999999999999: '999999999999999999999', // 1e+21 + 0.99999999999999999: '0.99999999999999999', // 1 + 1E2: '1E2', // 100 + 1e+3: '1e+3', // 1000 + 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: '0b10', // 2 + 0o10: '0o10', // 8 + 0xf: '0xf', // 15 + 2n: '2n', // 2 + 0xan: '0xan', // 10 +}) + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +} + +a = { + "\\a": 1, + "b": 2 +} + +=====================================output===================================== +a = { + a: 'a', +}; + +a = { + b: 'b', +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + '\\u0062': 'b', + '\\u0031': '1', +}; + +a = { + c1: 'c1', + c2: 'c2', +}; + +a = { + 'd1': 'd1', + 'd-2': 'd2', +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + 0.1: null, + 1: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1e2: null, + 1e3: null, + 1e100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +}; + +a = { + // These should be unquoted for quoteProps=as-needed. + 'NaN': null, + '1': null, + '1.5': null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + '.1': null, + '1.': null, + '1.0': null, + '999999999999999999999': null, + '0.99999999999999999': null, + '1E2': null, + '1e+3': null, + '1e+100': null, + '0b10': null, + '0o10': null, + '0xf': null, + '2n': null, +}; + +Object.entries({ + // To force quotes for quoteProps=consistent. + 'a-': 'a-', + // These can be quoted: + 'NaN': 'NaN', + '1': '1', + '1.5': '1.5', + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + '0.1': '.1', + '1': '1.', + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: '1.0', // 1 + 999999999999999999999: '999999999999999999999', // 1e+21 + 0.99999999999999999: '0.99999999999999999', // 1 + 1e2: '1E2', // 100 + 1e3: '1e+3', // 1000 + 1e100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: '0b10', // 2 + 0o10: '0o10', // 8 + 0xf: '0xf', // 15 + 2n: '2n', // 2 + 0xan: '0xan', // 10 +}); + +// Negative numbers cannot be unquoted. +!{ + '-1': null, + '-1.5': null, +}; + +a = { + '\\a': 1, + 'b': 2, +}; + +================================================================================ +`; + +exports[`objects.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +a = { + a: "a" +}; + +a = { + 'b': "b" +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + '\\u0062': "b", + '\\u0031': "1" +}; + +a = { + c1: "c1", + 'c2': "c2" +}; + +a = { + d1: "d1", + 'd-2': "d2" +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + .1: null, + 1.: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1E2: null, + 1e+3: null, + 1e+100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +} + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +} + +Object.entries({ + // To force quotes for quoteProps=consistent. + 'a-': 'a-', + // These can be quoted: + NaN: 'NaN', + 1: '1', + 1.5: '1.5', + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + .1: '.1', + 1.: '1.', + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: '1.0', // 1 + 999999999999999999999: '999999999999999999999', // 1e+21 + 0.99999999999999999: '0.99999999999999999', // 1 + 1E2: '1E2', // 100 + 1e+3: '1e+3', // 1000 + 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: '0b10', // 2 + 0o10: '0o10', // 8 + 0xf: '0xf', // 15 + 2n: '2n', // 2 + 0xan: '0xan', // 10 +}) + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +} + +a = { + "\\a": 1, + "b": 2 +} + +=====================================output===================================== +a = { + a: "a", +}; + +a = { + b: "b", +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + "\\u0062": "b", + "\\u0031": "1", +}; + +a = { + c1: "c1", + c2: "c2", +}; + +a = { + "d1": "d1", + "d-2": "d2", +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + 0.1: null, + 1: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1e2: null, + 1e3: null, + 1e100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +}; + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +}; + +Object.entries({ + // To force quotes for quoteProps=consistent. + "a-": "a-", + // These can be quoted: + "NaN": "NaN", + "1": "1", + "1.5": "1.5", + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + "0.1": ".1", + "1": "1.", + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: "1.0", // 1 + 999999999999999999999: "999999999999999999999", // 1e+21 + 0.99999999999999999: "0.99999999999999999", // 1 + 1e2: "1E2", // 100 + 1e3: "1e+3", // 1000 + 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: "0b10", // 2 + 0o10: "0o10", // 8 + 0xf: "0xf", // 15 + 2n: "2n", // 2 + 0xan: "0xan", // 10 +}); + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +}; + +a = { + "\\a": 1, + "b": 2, +}; + +================================================================================ +`; + +exports[`objects.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +a = { + a: "a" +}; + +a = { + 'b': "b" +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + '\\u0062': "b", + '\\u0031': "1" +}; + +a = { + c1: "c1", + 'c2': "c2" +}; + +a = { + d1: "d1", + 'd-2': "d2" +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + .1: null, + 1.: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1E2: null, + 1e+3: null, + 1e+100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +} + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +} + +Object.entries({ + // To force quotes for quoteProps=consistent. + 'a-': 'a-', + // These can be quoted: + NaN: 'NaN', + 1: '1', + 1.5: '1.5', + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + .1: '.1', + 1.: '1.', + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: '1.0', // 1 + 999999999999999999999: '999999999999999999999', // 1e+21 + 0.99999999999999999: '0.99999999999999999', // 1 + 1E2: '1E2', // 100 + 1e+3: '1e+3', // 1000 + 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: '0b10', // 2 + 0o10: '0o10', // 8 + 0xf: '0xf', // 15 + 2n: '2n', // 2 + 0xan: '0xan', // 10 +}) + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +} + +a = { + "\\a": 1, + "b": 2 +} + +=====================================output===================================== +a = { + a: "a", +}; + +a = { + "b": "b", +}; + +a = { + // Escapes should stay as escapes and not be unquoted. + "\\u0062": "b", + "\\u0031": "1", +}; + +a = { + c1: "c1", + "c2": "c2", +}; + +a = { + d1: "d1", + "d-2": "d2", +}; + +// None of these should become quoted, regardless of the quoteProps value. +a = { + NaN: null, + 1: null, + 1.5: null, + 0.1: null, + 1: null, + 1.0: null, + 999999999999999999999: null, + 0.99999999999999999: null, + 1e2: null, + 1e3: null, + 1e100: null, + 0b10: null, + 0o10: null, + 0xf: null, + 2n: null, +}; + +a = { + // These should be unquoted for quoteProps=as-needed. + "NaN": null, + "1": null, + "1.5": null, + // These should never be unquoted. \`1e+100\` technically could (it’s the only + // one where \`String(Number(key)) === key\`), but we came to the conclusion + // that it is unexpected. + ".1": null, + "1.": null, + "1.0": null, + "999999999999999999999": null, + "0.99999999999999999": null, + "1E2": null, + "1e+3": null, + "1e+100": null, + "0b10": null, + "0o10": null, + "0xf": null, + "2n": null, +}; + +Object.entries({ + // To force quotes for quoteProps=consistent. + "a-": "a-", + // These can be quoted: + NaN: "NaN", + 1: "1", + 1.5: "1.5", + // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. + 0.1: ".1", + 1: "1.", + // These should never be quoted. The _actual_ keys are shown as comments. + // Copy-paste this into the console to verify. If we were to convert these + // numbers into decimal (which completely valid), “information/intent” is + // lost. Either way, writing code like this is super confusing. + 1.0: "1.0", // 1 + 999999999999999999999: "999999999999999999999", // 1e+21 + 0.99999999999999999: "0.99999999999999999", // 1 + 1e2: "1E2", // 100 + 1e3: "1e+3", // 1000 + 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. + 0b10: "0b10", // 2 + 0o10: "0o10", // 8 + 0xf: "0xf", // 15 + 2n: "2n", // 2 + 0xan: "0xan", // 10 +}); + +// Negative numbers cannot be unquoted. +!{ + "-1": null, + "-1.5": null, +}; + +a = { + "\\a": 1, + "b": 2, +}; + +================================================================================ +`; + +exports[`with_member_expressions.js - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +const obj = { + foo: "", + [foo.bar]: "" +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +=====================================output===================================== +const obj = { + foo: "", + [foo.bar]: "", +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +================================================================================ +`; + +exports[`with_member_expressions.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" +singleQuote: true + | printWidth +=====================================input====================================== +const obj = { + foo: "", + [foo.bar]: "" +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +=====================================output===================================== +const obj = { + foo: '', + [foo.bar]: '', +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +================================================================================ +`; + +exports[`with_member_expressions.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +const obj = { + foo: "", + [foo.bar]: "" +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +=====================================output===================================== +const obj = { + foo: "", + [foo.bar]: "", +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +================================================================================ +`; + +exports[`with_member_expressions.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +const obj = { + foo: "", + [foo.bar]: "" +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +=====================================output===================================== +const obj = { + foo: "", + [foo.bar]: "", +}; + +class Foo { + foo() {} + [foo.bar]() {} +} + +================================================================================ +`; + +exports[`with_numbers.js - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +obj = { + foo: "", + 1: "" +}; + +obj = { + "bar": "", + 1: "" +}; + +obj = { + "foo-bar": "", + 1: "" +}; + +=====================================output===================================== +obj = { + foo: "", + 1: "", +}; + +obj = { + bar: "", + 1: "", +}; + +obj = { + "foo-bar": "", + 1: "", +}; + +================================================================================ +`; + +exports[`with_numbers.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" +singleQuote: true + | printWidth +=====================================input====================================== +obj = { + foo: "", + 1: "" +}; + +obj = { + "bar": "", + 1: "" +}; + +obj = { + "foo-bar": "", + 1: "" +}; + +=====================================output===================================== +obj = { + foo: '', + 1: '', +}; + +obj = { + bar: '', + 1: '', +}; + +obj = { + 'foo-bar': '', + '1': '', +}; + +================================================================================ +`; + +exports[`with_numbers.js - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +obj = { + foo: "", + 1: "" +}; + +obj = { + "bar": "", + 1: "" +}; + +obj = { + "foo-bar": "", + 1: "" +}; + +=====================================output===================================== +obj = { + foo: "", + 1: "", +}; + +obj = { + bar: "", + 1: "", +}; + +obj = { + "foo-bar": "", + "1": "", +}; + +================================================================================ +`; + +exports[`with_numbers.js - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +obj = { + foo: "", + 1: "" +}; + +obj = { + "bar": "", + 1: "" +}; + +obj = { + "foo-bar": "", + 1: "" +}; + +=====================================output===================================== +obj = { + foo: "", + 1: "", +}; + +obj = { + "bar": "", + 1: "", +}; + +obj = { + "foo-bar": "", + 1: "", +}; + +================================================================================ +`; diff --git a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 607faf8b47ce..000000000000 --- a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1406 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`classes.js - {"quoteProps":"as-needed"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "as-needed" - | printWidth -=====================================input====================================== -class A { - a = "a" -}; - -class B { - 'b' = "b" -}; - -class C { - c1 = "c1" - 'c2' = "c2" -}; - -class D { - d1 = "d1" - 'd-2' = "d2" -}; - -=====================================output===================================== -class A { - a = "a"; -} - -class B { - b = "b"; -} - -class C { - c1 = "c1"; - c2 = "c2"; -} - -class D { - d1 = "d1"; - "d-2" = "d2"; -} - -================================================================================ -`; - -exports[`classes.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" -singleQuote: true - | printWidth -=====================================input====================================== -class A { - a = "a" -}; - -class B { - 'b' = "b" -}; - -class C { - c1 = "c1" - 'c2' = "c2" -}; - -class D { - d1 = "d1" - 'd-2' = "d2" -}; - -=====================================output===================================== -class A { - a = 'a'; -} - -class B { - b = 'b'; -} - -class C { - c1 = 'c1'; - c2 = 'c2'; -} - -class D { - 'd1' = 'd1'; - 'd-2' = 'd2'; -} - -================================================================================ -`; - -exports[`classes.js - {"quoteProps":"consistent"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" - | printWidth -=====================================input====================================== -class A { - a = "a" -}; - -class B { - 'b' = "b" -}; - -class C { - c1 = "c1" - 'c2' = "c2" -}; - -class D { - d1 = "d1" - 'd-2' = "d2" -}; - -=====================================output===================================== -class A { - a = "a"; -} - -class B { - b = "b"; -} - -class C { - c1 = "c1"; - c2 = "c2"; -} - -class D { - "d1" = "d1"; - "d-2" = "d2"; -} - -================================================================================ -`; - -exports[`classes.js - {"quoteProps":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "preserve" - | printWidth -=====================================input====================================== -class A { - a = "a" -}; - -class B { - 'b' = "b" -}; - -class C { - c1 = "c1" - 'c2' = "c2" -}; - -class D { - d1 = "d1" - 'd-2' = "d2" -}; - -=====================================output===================================== -class A { - a = "a"; -} - -class B { - "b" = "b"; -} - -class C { - c1 = "c1"; - "c2" = "c2"; -} - -class D { - d1 = "d1"; - "d-2" = "d2"; -} - -================================================================================ -`; - -exports[`numeric-separator.js - {"quoteProps":"as-needed"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "as-needed" - | printWidth -=====================================input====================================== -a = { - - 0xb_b: '0xb_b', // 187 - 0xb_b_bn: '0xb_b_bn', // 3003 - 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 -} - -=====================================output===================================== -a = { - 0xb_b: "0xb_b", // 187 - 0xb_b_bn: "0xb_b_bn", // 3003 - 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 -}; - -================================================================================ -`; - -exports[`numeric-separator.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" -singleQuote: true - | printWidth -=====================================input====================================== -a = { - - 0xb_b: '0xb_b', // 187 - 0xb_b_bn: '0xb_b_bn', // 3003 - 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 -} - -=====================================output===================================== -a = { - 0xb_b: '0xb_b', // 187 - 0xb_b_bn: '0xb_b_bn', // 3003 - 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n', // 536870915 -}; - -================================================================================ -`; - -exports[`numeric-separator.js - {"quoteProps":"consistent"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" - | printWidth -=====================================input====================================== -a = { - - 0xb_b: '0xb_b', // 187 - 0xb_b_bn: '0xb_b_bn', // 3003 - 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 -} - -=====================================output===================================== -a = { - 0xb_b: "0xb_b", // 187 - 0xb_b_bn: "0xb_b_bn", // 3003 - 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 -}; - -================================================================================ -`; - -exports[`numeric-separator.js - {"quoteProps":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "preserve" - | printWidth -=====================================input====================================== -a = { - - 0xb_b: '0xb_b', // 187 - 0xb_b_bn: '0xb_b_bn', // 3003 - 0b100000000000_000000000000000011n: '0b100000000000_000000000000000011n' // 536870915 -} - -=====================================output===================================== -a = { - 0xb_b: "0xb_b", // 187 - 0xb_b_bn: "0xb_b_bn", // 3003 - 0b100000000000_000000000000000011n: "0b100000000000_000000000000000011n", // 536870915 -}; - -================================================================================ -`; - -exports[`objects.js - {"quoteProps":"as-needed"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "as-needed" - | printWidth -=====================================input====================================== -const a = { - a: "a" -}; - -const b = { - 'b': "b" -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - '\\u0062': "b", - '\\u0031': "1" -}; - -const c = { - c1: "c1", - 'c2': "c2" -}; - -const d = { - d1: "d1", - 'd-2': "d2" -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - .1: null, - 1.: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1E2: null, - 1e+3: null, - 1e+100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -} - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -} - -Object.entries({ - // To force quotes for quoteProps=consistent. - 'a-': 'a-', - // These can be quoted: - NaN: 'NaN', - 1: '1', - 1.5: '1.5', - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - .1: '.1', - 1.: '1.', - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: '1.0', // 1 - 999999999999999999999: '999999999999999999999', // 1e+21 - 0.99999999999999999: '0.99999999999999999', // 1 - 1E2: '1E2', // 100 - 1e+3: '1e+3', // 1000 - 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: '0b10', // 2 - 0o10: '0o10', // 8 - 0xf: '0xf', // 15 - 2n: '2n', // 2 - 0xan: '0xan', // 10 -}) - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -} - -=====================================output===================================== -const a = { - a: "a", -}; - -const b = { - b: "b", -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - "\\u0062": "b", - "\\u0031": "1", -}; - -const c = { - c1: "c1", - c2: "c2", -}; - -const d = { - d1: "d1", - "d-2": "d2", -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - 0.1: null, - 1: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1e2: null, - 1e3: null, - 1e100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -}; - -const f = { - // These should be unquoted for quoteProps=as-needed. - NaN: null, - 1: null, - 1.5: null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -}; - -Object.entries({ - // To force quotes for quoteProps=consistent. - "a-": "a-", - // These can be quoted: - NaN: "NaN", - 1: "1", - 1.5: "1.5", - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - 0.1: ".1", - 1: "1.", - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: "1.0", // 1 - 999999999999999999999: "999999999999999999999", // 1e+21 - 0.99999999999999999: "0.99999999999999999", // 1 - 1e2: "1E2", // 100 - 1e3: "1e+3", // 1000 - 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: "0b10", // 2 - 0o10: "0o10", // 8 - 0xf: "0xf", // 15 - 2n: "2n", // 2 - 0xan: "0xan", // 10 -}); - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -}; - -================================================================================ -`; - -exports[`objects.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" -singleQuote: true - | printWidth -=====================================input====================================== -const a = { - a: "a" -}; - -const b = { - 'b': "b" -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - '\\u0062': "b", - '\\u0031': "1" -}; - -const c = { - c1: "c1", - 'c2': "c2" -}; - -const d = { - d1: "d1", - 'd-2': "d2" -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - .1: null, - 1.: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1E2: null, - 1e+3: null, - 1e+100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -} - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -} - -Object.entries({ - // To force quotes for quoteProps=consistent. - 'a-': 'a-', - // These can be quoted: - NaN: 'NaN', - 1: '1', - 1.5: '1.5', - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - .1: '.1', - 1.: '1.', - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: '1.0', // 1 - 999999999999999999999: '999999999999999999999', // 1e+21 - 0.99999999999999999: '0.99999999999999999', // 1 - 1E2: '1E2', // 100 - 1e+3: '1e+3', // 1000 - 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: '0b10', // 2 - 0o10: '0o10', // 8 - 0xf: '0xf', // 15 - 2n: '2n', // 2 - 0xan: '0xan', // 10 -}) - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -} - -=====================================output===================================== -const a = { - a: 'a', -}; - -const b = { - b: 'b', -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - '\\u0062': 'b', - '\\u0031': '1', -}; - -const c = { - c1: 'c1', - c2: 'c2', -}; - -const d = { - 'd1': 'd1', - 'd-2': 'd2', -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - 0.1: null, - 1: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1e2: null, - 1e3: null, - 1e100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -}; - -const f = { - // These should be unquoted for quoteProps=as-needed. - 'NaN': null, - '1': null, - '1.5': null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - '.1': null, - '1.': null, - '1.0': null, - '999999999999999999999': null, - '0.99999999999999999': null, - '1E2': null, - '1e+3': null, - '1e+100': null, - '0b10': null, - '0o10': null, - '0xf': null, - '2n': null, -}; - -Object.entries({ - // To force quotes for quoteProps=consistent. - 'a-': 'a-', - // These can be quoted: - 'NaN': 'NaN', - '1': '1', - '1.5': '1.5', - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - '0.1': '.1', - '1': '1.', - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: '1.0', // 1 - 999999999999999999999: '999999999999999999999', // 1e+21 - 0.99999999999999999: '0.99999999999999999', // 1 - 1e2: '1E2', // 100 - 1e3: '1e+3', // 1000 - 1e100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: '0b10', // 2 - 0o10: '0o10', // 8 - 0xf: '0xf', // 15 - 2n: '2n', // 2 - 0xan: '0xan', // 10 -}); - -// Negative numbers cannot be unquoted. -!{ - '-1': null, - '-1.5': null, -}; - -================================================================================ -`; - -exports[`objects.js - {"quoteProps":"consistent"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" - | printWidth -=====================================input====================================== -const a = { - a: "a" -}; - -const b = { - 'b': "b" -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - '\\u0062': "b", - '\\u0031': "1" -}; - -const c = { - c1: "c1", - 'c2': "c2" -}; - -const d = { - d1: "d1", - 'd-2': "d2" -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - .1: null, - 1.: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1E2: null, - 1e+3: null, - 1e+100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -} - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -} - -Object.entries({ - // To force quotes for quoteProps=consistent. - 'a-': 'a-', - // These can be quoted: - NaN: 'NaN', - 1: '1', - 1.5: '1.5', - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - .1: '.1', - 1.: '1.', - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: '1.0', // 1 - 999999999999999999999: '999999999999999999999', // 1e+21 - 0.99999999999999999: '0.99999999999999999', // 1 - 1E2: '1E2', // 100 - 1e+3: '1e+3', // 1000 - 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: '0b10', // 2 - 0o10: '0o10', // 8 - 0xf: '0xf', // 15 - 2n: '2n', // 2 - 0xan: '0xan', // 10 -}) - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -} - -=====================================output===================================== -const a = { - a: "a", -}; - -const b = { - b: "b", -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - "\\u0062": "b", - "\\u0031": "1", -}; - -const c = { - c1: "c1", - c2: "c2", -}; - -const d = { - "d1": "d1", - "d-2": "d2", -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - 0.1: null, - 1: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1e2: null, - 1e3: null, - 1e100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -}; - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -}; - -Object.entries({ - // To force quotes for quoteProps=consistent. - "a-": "a-", - // These can be quoted: - "NaN": "NaN", - "1": "1", - "1.5": "1.5", - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - "0.1": ".1", - "1": "1.", - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: "1.0", // 1 - 999999999999999999999: "999999999999999999999", // 1e+21 - 0.99999999999999999: "0.99999999999999999", // 1 - 1e2: "1E2", // 100 - 1e3: "1e+3", // 1000 - 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: "0b10", // 2 - 0o10: "0o10", // 8 - 0xf: "0xf", // 15 - 2n: "2n", // 2 - 0xan: "0xan", // 10 -}); - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -}; - -================================================================================ -`; - -exports[`objects.js - {"quoteProps":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "preserve" - | printWidth -=====================================input====================================== -const a = { - a: "a" -}; - -const b = { - 'b': "b" -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - '\\u0062': "b", - '\\u0031': "1" -}; - -const c = { - c1: "c1", - 'c2': "c2" -}; - -const d = { - d1: "d1", - 'd-2': "d2" -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - .1: null, - 1.: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1E2: null, - 1e+3: null, - 1e+100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -} - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -} - -Object.entries({ - // To force quotes for quoteProps=consistent. - 'a-': 'a-', - // These can be quoted: - NaN: 'NaN', - 1: '1', - 1.5: '1.5', - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - .1: '.1', - 1.: '1.', - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: '1.0', // 1 - 999999999999999999999: '999999999999999999999', // 1e+21 - 0.99999999999999999: '0.99999999999999999', // 1 - 1E2: '1E2', // 100 - 1e+3: '1e+3', // 1000 - 1e+100: '1e+100', // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: '0b10', // 2 - 0o10: '0o10', // 8 - 0xf: '0xf', // 15 - 2n: '2n', // 2 - 0xan: '0xan', // 10 -}) - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -} - -=====================================output===================================== -const a = { - a: "a", -}; - -const b = { - "b": "b", -}; - -const b2 = { - // Escapes should stay as escapes and not be unquoted. - "\\u0062": "b", - "\\u0031": "1", -}; - -const c = { - c1: "c1", - "c2": "c2", -}; - -const d = { - d1: "d1", - "d-2": "d2", -}; - -// None of these should become quoted, regardless of the quoteProps value. -const e = { - NaN: null, - 1: null, - 1.5: null, - 0.1: null, - 1: null, - 1.0: null, - 999999999999999999999: null, - 0.99999999999999999: null, - 1e2: null, - 1e3: null, - 1e100: null, - 0b10: null, - 0o10: null, - 0xf: null, - 2n: null, -}; - -const f = { - // These should be unquoted for quoteProps=as-needed. - "NaN": null, - "1": null, - "1.5": null, - // These should never be unquoted. \`1e+100\` technically could (it’s the only - // one where \`String(Number(key)) === key\`), but we came to the conclusion - // that it is unexpected. - ".1": null, - "1.": null, - "1.0": null, - "999999999999999999999": null, - "0.99999999999999999": null, - "1E2": null, - "1e+3": null, - "1e+100": null, - "0b10": null, - "0o10": null, - "0xf": null, - "2n": null, -}; - -Object.entries({ - // To force quotes for quoteProps=consistent. - "a-": "a-", - // These can be quoted: - NaN: "NaN", - 1: "1", - 1.5: "1.5", - // Prettier will normalize these to \`0.1\` and \`1\` – then they can be quoted. - 0.1: ".1", - 1: "1.", - // These should never be quoted. The _actual_ keys are shown as comments. - // Copy-paste this into the console to verify. If we were to convert these - // numbers into decimal (which completely valid), “information/intent” is - // lost. Either way, writing code like this is super confusing. - 1.0: "1.0", // 1 - 999999999999999999999: "999999999999999999999", // 1e+21 - 0.99999999999999999: "0.99999999999999999", // 1 - 1e2: "1E2", // 100 - 1e3: "1e+3", // 1000 - 1e100: "1e+100", // 1e+100 – this one is identical, but would be inconsistent to quote. - 0b10: "0b10", // 2 - 0o10: "0o10", // 8 - 0xf: "0xf", // 15 - 2n: "2n", // 2 - 0xan: "0xan", // 10 -}); - -// Negative numbers cannot be unquoted. -!{ - "-1": null, - "-1.5": null, -}; - -================================================================================ -`; - -exports[`with_member_expressions.js - {"quoteProps":"as-needed"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "as-needed" - | printWidth -=====================================input====================================== -const obj = { - foo: "", - [foo.bar]: "" -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -=====================================output===================================== -const obj = { - foo: "", - [foo.bar]: "", -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -================================================================================ -`; - -exports[`with_member_expressions.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" -singleQuote: true - | printWidth -=====================================input====================================== -const obj = { - foo: "", - [foo.bar]: "" -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -=====================================output===================================== -const obj = { - foo: '', - [foo.bar]: '', -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -================================================================================ -`; - -exports[`with_member_expressions.js - {"quoteProps":"consistent"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" - | printWidth -=====================================input====================================== -const obj = { - foo: "", - [foo.bar]: "" -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -=====================================output===================================== -const obj = { - foo: "", - [foo.bar]: "", -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -================================================================================ -`; - -exports[`with_member_expressions.js - {"quoteProps":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "preserve" - | printWidth -=====================================input====================================== -const obj = { - foo: "", - [foo.bar]: "" -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -=====================================output===================================== -const obj = { - foo: "", - [foo.bar]: "", -}; - -class Foo { - foo() {} - [foo.bar]() {} -} - -================================================================================ -`; - -exports[`with_numbers.js - {"quoteProps":"as-needed"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "as-needed" - | printWidth -=====================================input====================================== -obj = { - foo: "", - 1: "" -}; - -obj = { - "bar": "", - 1: "" -}; - -obj = { - "foo-bar": "", - 1: "" -}; - -=====================================output===================================== -obj = { - foo: "", - 1: "", -}; - -obj = { - bar: "", - 1: "", -}; - -obj = { - "foo-bar": "", - 1: "", -}; - -================================================================================ -`; - -exports[`with_numbers.js - {"quoteProps":"consistent","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" -singleQuote: true - | printWidth -=====================================input====================================== -obj = { - foo: "", - 1: "" -}; - -obj = { - "bar": "", - 1: "" -}; - -obj = { - "foo-bar": "", - 1: "" -}; - -=====================================output===================================== -obj = { - foo: '', - 1: '', -}; - -obj = { - bar: '', - 1: '', -}; - -obj = { - 'foo-bar': '', - '1': '', -}; - -================================================================================ -`; - -exports[`with_numbers.js - {"quoteProps":"consistent"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "consistent" - | printWidth -=====================================input====================================== -obj = { - foo: "", - 1: "" -}; - -obj = { - "bar": "", - 1: "" -}; - -obj = { - "foo-bar": "", - 1: "" -}; - -=====================================output===================================== -obj = { - foo: "", - 1: "", -}; - -obj = { - bar: "", - 1: "", -}; - -obj = { - "foo-bar": "", - "1": "", -}; - -================================================================================ -`; - -exports[`with_numbers.js - {"quoteProps":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 -quoteProps: "preserve" - | printWidth -=====================================input====================================== -obj = { - foo: "", - 1: "" -}; - -obj = { - "bar": "", - 1: "" -}; - -obj = { - "foo-bar": "", - 1: "" -}; - -=====================================output===================================== -obj = { - foo: "", - 1: "", -}; - -obj = { - "bar": "", - 1: "", -}; - -obj = { - "foo-bar": "", - 1: "", -}; - -================================================================================ -`; diff --git a/tests/format/js/quote-props/format.test.js b/tests/format/js/quote-props/format.test.js new file mode 100644 index 000000000000..80d7cae87917 --- /dev/null +++ b/tests/format/js/quote-props/format.test.js @@ -0,0 +1,7 @@ +runFormatTest(import.meta, ["babel"], { quoteProps: "as-needed" }); +runFormatTest(import.meta, ["babel"], { quoteProps: "preserve" }); +runFormatTest(import.meta, ["babel"], { quoteProps: "consistent" }); +runFormatTest(import.meta, ["babel"], { + quoteProps: "consistent", + singleQuote: true, +}); diff --git a/tests/format/js/quote-props/jsfmt.spec.js b/tests/format/js/quote-props/jsfmt.spec.js deleted file mode 100644 index 3190476f2ae7..000000000000 --- a/tests/format/js/quote-props/jsfmt.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -const errors = {}; - -run_spec(__dirname, ["babel"], { - quoteProps: "as-needed", - errors, -}); - -run_spec(__dirname, ["babel"], { - quoteProps: "preserve", - errors, -}); - -run_spec(__dirname, ["babel"], { - quoteProps: "consistent", - errors, -}); - -run_spec(__dirname, ["babel"], { - quoteProps: "consistent", - singleQuote: true, - errors, -}); diff --git a/tests/format/js/quote-props/objects.js b/tests/format/js/quote-props/objects.js index 1320543c4bf9..40cdc863c228 100644 --- a/tests/format/js/quote-props/objects.js +++ b/tests/format/js/quote-props/objects.js @@ -1,29 +1,29 @@ -const a = { +a = { a: "a" }; -const b = { +a = { 'b': "b" }; -const b2 = { +a = { // Escapes should stay as escapes and not be unquoted. '\u0062': "b", '\u0031': "1" }; -const c = { +a = { c1: "c1", 'c2': "c2" }; -const d = { +a = { d1: "d1", 'd-2': "d2" }; // None of these should become quoted, regardless of the quoteProps value. -const e = { +a = { NaN: null, 1: null, 1.5: null, @@ -41,7 +41,7 @@ const e = { 2n: null, } -const f = { +a = { // These should be unquoted for quoteProps=as-needed. "NaN": null, "1": null, @@ -95,3 +95,8 @@ Object.entries({ "-1": null, "-1.5": null, } + +a = { + "\a": 1, + "b": 2 +} diff --git a/tests/format/js/quotes/__snapshots__/format.test.js.snap b/tests/format/js/quotes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b16a66fd84e5 --- /dev/null +++ b/tests/format/js/quotes/__snapshots__/format.test.js.snap @@ -0,0 +1,516 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`functions.js - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const a = () => "Foo bar"; + +function b(object, key) { + return object['key']; +} + +=====================================output===================================== +const a = () => 'Foo bar'; + +function b(object, key) { + return object['key']; +} + +================================================================================ +`; + +exports[`functions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = () => "Foo bar"; + +function b(object, key) { + return object['key']; +} + +=====================================output===================================== +const a = () => "Foo bar"; + +function b(object, key) { + return object["key"]; +} + +================================================================================ +`; + +exports[`objects.js - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const obj = { + 'a': true, + b: true, + "𐊧": true, +} + +=====================================output===================================== +const obj = { + a: true, + b: true, + '𐊧': true, +}; + +================================================================================ +`; + +exports[`objects.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const obj = { + 'a': true, + b: true, + "𐊧": true, +} + +=====================================output===================================== +const obj = { + a: true, + b: true, + "𐊧": true, +}; + +================================================================================ +`; + +exports[`strings.js - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +// Prevent strings from being parsed as directives +// See https://github.com/prettier/prettier/pull/1560#issue-227225960 +0; + +// Every string will be changed to double quotes, unless we end up with fewer +// escaped quotes by using single quotes. (Vice versa if the "singleQuote" +// option is true). +// +// Note that even if a string already has the correct enclosing quotes, it is +// still processed in order to remove unnecessarily escaped quotes within it, +// for consistency. + +// Simple strings. +"abc" +'abc' + +// Escape. +'\\0' + +// Emoji. +'🐶' + +// Empty string. +"" +'' + +// Single double quote. +"\\"" +'"' + +// Single single quote. +"'" +'\\'' + +// Unnecessary escapes. +"\\'" +'\\"' +"\\a" +'\\a' +"hol\\a" +'hol\\a' +"hol\\\\a (the a is not escaped)" +'hol\\\\a (the a is not escaped)' +"multiple \\a unnecessary \\a escapes" +'multiple \\a unnecessary \\a escapes' +"unnecessarily escaped character preceded by escaped backslash \\\\\\a" +'unnecessarily escaped character preceded by escaped backslash \\\\\\a' +"unescaped character preceded by two escaped backslashes \\\\\\\\a" +'unescaped character preceded by two escaped backslashes \\\\\\\\a' +"\\a\\a" // consecutive unnecessarily escaped characters +'\\a\\a' // consecutive unnecessarily escaped characters +'escaped \\u2030 \\‰ (should not stay escaped)' + +// Meaningful escapes +"octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7" +'octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7' +"meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61" +'meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61' +'escaped newline \\ +' +'escaped carriage return \\ +' +'escaped \\u2028 \\
' +'escaped \\u2029 \\
' + +// One of each. +"\\"'" +'"\\'' + +// One of each with unnecessary escapes. +"\\"\\'" +'\\"\\'' + +// More double quotes than single quotes. +"\\"'\\"" +'"\\'"' + +// More single quotes than double quotes. +"\\"''" +'"\\'\\'' + +// Two of each. +"\\"\\"''" +'""\\'\\'' + +// Single backslash. +'\\\\' +"\\\\" + +// Backslases. +"\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'" +'\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"' + +// Somewhat more real-word example. +"He's sayin': \\"How's it goin'?\\" Don't ask me why." +'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.' + +// Somewhat more real-word example 2. +"var backslash = \\"\\\\\\", doubleQuote = '\\"';" +'var backslash = "\\\\", doubleQuote = \\'"\\';' + +=====================================output===================================== +// Prevent strings from being parsed as directives +// See https://github.com/prettier/prettier/pull/1560#issue-227225960 +0; + +// Every string will be changed to double quotes, unless we end up with fewer +// escaped quotes by using single quotes. (Vice versa if the "singleQuote" +// option is true). +// +// Note that even if a string already has the correct enclosing quotes, it is +// still processed in order to remove unnecessarily escaped quotes within it, +// for consistency. + +// Simple strings. +('abc'); +('abc'); + +// Escape. +('\\0'); + +// Emoji. +('🐶'); + +// Empty string. +(''); +(''); + +// Single double quote. +('"'); +('"'); + +// Single single quote. +("'"); +("'"); + +// Unnecessary escapes. +("\\'"); +('\\"'); +('\\a'); +('\\a'); +('hol\\a'); +('hol\\a'); +('hol\\\\a (the a is not escaped)'); +('hol\\\\a (the a is not escaped)'); +('multiple \\a unnecessary \\a escapes'); +('multiple \\a unnecessary \\a escapes'); +('unnecessarily escaped character preceded by escaped backslash \\\\\\a'); +('unnecessarily escaped character preceded by escaped backslash \\\\\\a'); +('unescaped character preceded by two escaped backslashes \\\\\\\\a'); +('unescaped character preceded by two escaped backslashes \\\\\\\\a'); +('\\a\\a'); // consecutive unnecessarily escaped characters +('\\a\\a'); // consecutive unnecessarily escaped characters +('escaped \\u2030 \\‰ (should not stay escaped)'); + +// Meaningful escapes +('octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7'); +('octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7'); +('meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61'); +('meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61'); +('escaped newline \\ +'); +('escaped carriage return \\ +'); +('escaped \\u2028 \\
'); +('escaped \\u2029 \\
'); + +// One of each. +('"\\''); +('"\\''); + +// One of each with unnecessary escapes. +('"\\''); +('\\"\\''); + +// More double quotes than single quotes. +('"\\'"'); +('"\\'"'); + +// More single quotes than double quotes. +("\\"''"); +("\\"''"); + +// Two of each. +('""\\'\\''); +('""\\'\\''); + +// Single backslash. +('\\\\'); +('\\\\'); + +// Backslases. +("\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"); +('\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'); + +// Somewhat more real-word example. +("He's sayin': \\"How's it goin'?\\" Don't ask me why."); +("He's sayin': \\"How's it goin'?\\" Don't ask me why."); + +// Somewhat more real-word example 2. +('var backslash = "\\\\", doubleQuote = \\'"\\';'); +('var backslash = "\\\\", doubleQuote = \\'"\\';'); + +================================================================================ +`; + +exports[`strings.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Prevent strings from being parsed as directives +// See https://github.com/prettier/prettier/pull/1560#issue-227225960 +0; + +// Every string will be changed to double quotes, unless we end up with fewer +// escaped quotes by using single quotes. (Vice versa if the "singleQuote" +// option is true). +// +// Note that even if a string already has the correct enclosing quotes, it is +// still processed in order to remove unnecessarily escaped quotes within it, +// for consistency. + +// Simple strings. +"abc" +'abc' + +// Escape. +'\\0' + +// Emoji. +'🐶' + +// Empty string. +"" +'' + +// Single double quote. +"\\"" +'"' + +// Single single quote. +"'" +'\\'' + +// Unnecessary escapes. +"\\'" +'\\"' +"\\a" +'\\a' +"hol\\a" +'hol\\a' +"hol\\\\a (the a is not escaped)" +'hol\\\\a (the a is not escaped)' +"multiple \\a unnecessary \\a escapes" +'multiple \\a unnecessary \\a escapes' +"unnecessarily escaped character preceded by escaped backslash \\\\\\a" +'unnecessarily escaped character preceded by escaped backslash \\\\\\a' +"unescaped character preceded by two escaped backslashes \\\\\\\\a" +'unescaped character preceded by two escaped backslashes \\\\\\\\a' +"\\a\\a" // consecutive unnecessarily escaped characters +'\\a\\a' // consecutive unnecessarily escaped characters +'escaped \\u2030 \\‰ (should not stay escaped)' + +// Meaningful escapes +"octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7" +'octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7' +"meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61" +'meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61' +'escaped newline \\ +' +'escaped carriage return \\ +' +'escaped \\u2028 \\
' +'escaped \\u2029 \\
' + +// One of each. +"\\"'" +'"\\'' + +// One of each with unnecessary escapes. +"\\"\\'" +'\\"\\'' + +// More double quotes than single quotes. +"\\"'\\"" +'"\\'"' + +// More single quotes than double quotes. +"\\"''" +'"\\'\\'' + +// Two of each. +"\\"\\"''" +'""\\'\\'' + +// Single backslash. +'\\\\' +"\\\\" + +// Backslases. +"\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'" +'\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"' + +// Somewhat more real-word example. +"He's sayin': \\"How's it goin'?\\" Don't ask me why." +'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.' + +// Somewhat more real-word example 2. +"var backslash = \\"\\\\\\", doubleQuote = '\\"';" +'var backslash = "\\\\", doubleQuote = \\'"\\';' + +=====================================output===================================== +// Prevent strings from being parsed as directives +// See https://github.com/prettier/prettier/pull/1560#issue-227225960 +0; + +// Every string will be changed to double quotes, unless we end up with fewer +// escaped quotes by using single quotes. (Vice versa if the "singleQuote" +// option is true). +// +// Note that even if a string already has the correct enclosing quotes, it is +// still processed in order to remove unnecessarily escaped quotes within it, +// for consistency. + +// Simple strings. +("abc"); +("abc"); + +// Escape. +("\\0"); + +// Emoji. +("🐶"); + +// Empty string. +(""); +(""); + +// Single double quote. +('"'); +('"'); + +// Single single quote. +("'"); +("'"); + +// Unnecessary escapes. +("\\'"); +('\\"'); +("\\a"); +("\\a"); +("hol\\a"); +("hol\\a"); +("hol\\\\a (the a is not escaped)"); +("hol\\\\a (the a is not escaped)"); +("multiple \\a unnecessary \\a escapes"); +("multiple \\a unnecessary \\a escapes"); +("unnecessarily escaped character preceded by escaped backslash \\\\\\a"); +("unnecessarily escaped character preceded by escaped backslash \\\\\\a"); +("unescaped character preceded by two escaped backslashes \\\\\\\\a"); +("unescaped character preceded by two escaped backslashes \\\\\\\\a"); +("\\a\\a"); // consecutive unnecessarily escaped characters +("\\a\\a"); // consecutive unnecessarily escaped characters +("escaped \\u2030 \\‰ (should not stay escaped)"); + +// Meaningful escapes +("octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7"); +("octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7"); +("meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61"); +("meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61"); +("escaped newline \\ +"); +("escaped carriage return \\ +"); +("escaped \\u2028 \\
"); +("escaped \\u2029 \\
"); + +// One of each. +("\\"'"); +("\\"'"); + +// One of each with unnecessary escapes. +("\\"\\'"); +("\\"'"); + +// More double quotes than single quotes. +('"\\'"'); +('"\\'"'); + +// More single quotes than double quotes. +("\\"''"); +("\\"''"); + +// Two of each. +("\\"\\"''"); +("\\"\\"''"); + +// Single backslash. +("\\\\"); +("\\\\"); + +// Backslases. +("\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'"); +('\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"'); + +// Somewhat more real-word example. +("He's sayin': \\"How's it goin'?\\" Don't ask me why."); +("He's sayin': \\"How's it goin'?\\" Don't ask me why."); + +// Somewhat more real-word example 2. +('var backslash = "\\\\", doubleQuote = \\'"\\';'); +('var backslash = "\\\\", doubleQuote = \\'"\\';'); + +================================================================================ +`; diff --git a/tests/format/js/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/quotes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b09a54787797..000000000000 --- a/tests/format/js/quotes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,516 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`functions.js - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const a = () => "Foo bar"; - -function b(object, key) { - return object['key']; -} - -=====================================output===================================== -const a = () => 'Foo bar'; - -function b(object, key) { - return object['key']; -} - -================================================================================ -`; - -exports[`functions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = () => "Foo bar"; - -function b(object, key) { - return object['key']; -} - -=====================================output===================================== -const a = () => "Foo bar"; - -function b(object, key) { - return object["key"]; -} - -================================================================================ -`; - -exports[`objects.js - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const obj = { - 'a': true, - b: true, - "𐊧": true, -} - -=====================================output===================================== -const obj = { - a: true, - b: true, - '𐊧': true, -}; - -================================================================================ -`; - -exports[`objects.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const obj = { - 'a': true, - b: true, - "𐊧": true, -} - -=====================================output===================================== -const obj = { - a: true, - b: true, - "𐊧": true, -}; - -================================================================================ -`; - -exports[`strings.js - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -// Prevent strings from being parsed as directives -// See https://github.com/prettier/prettier/pull/1560#issue-227225960 -0; - -// Every string will be changed to double quotes, unless we end up with fewer -// escaped quotes by using single quotes. (Vice versa if the "singleQuote" -// option is true). -// -// Note that even if a string already has the correct enclosing quotes, it is -// still processed in order to remove unnecessarily escaped quotes within it, -// for consistency. - -// Simple strings. -"abc" -'abc' - -// Escape. -'\\0' - -// Emoji. -'🐶' - -// Empty string. -"" -'' - -// Single double quote. -"\\"" -'"' - -// Single single quote. -"'" -'\\'' - -// Unnecessary escapes. -"\\'" -'\\"' -"\\a" -'\\a' -"hol\\a" -'hol\\a' -"hol\\\\a (the a is not escaped)" -'hol\\\\a (the a is not escaped)' -"multiple \\a unnecessary \\a escapes" -'multiple \\a unnecessary \\a escapes' -"unnecessarily escaped character preceded by escaped backslash \\\\\\a" -'unnecessarily escaped character preceded by escaped backslash \\\\\\a' -"unescaped character preceded by two escaped backslashes \\\\\\\\a" -'unescaped character preceded by two escaped backslashes \\\\\\\\a' -"\\a\\a" // consecutive unnecessarily escaped characters -'\\a\\a' // consecutive unnecessarily escaped characters -'escaped \\u2030 \\‰ (should not stay escaped)' - -// Meaningful escapes -"octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7" -'octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7' -"meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61" -'meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61' -'escaped newline \\ -' -'escaped carriage return \\ -' -'escaped \\u2028 \\
' -'escaped \\u2029 \\
' - -// One of each. -"\\"'" -'"\\'' - -// One of each with unnecessary escapes. -"\\"\\'" -'\\"\\'' - -// More double quotes than single quotes. -"\\"'\\"" -'"\\'"' - -// More single quotes than double quotes. -"\\"''" -'"\\'\\'' - -// Two of each. -"\\"\\"''" -'""\\'\\'' - -// Single backslash. -'\\\\' -"\\\\" - -// Backslases. -"\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'" -'\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"' - -// Somewhat more real-word example. -"He's sayin': \\"How's it goin'?\\" Don't ask me why." -'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.' - -// Somewhat more real-word example 2. -"var backslash = \\"\\\\\\", doubleQuote = '\\"';" -'var backslash = "\\\\", doubleQuote = \\'"\\';' - -=====================================output===================================== -// Prevent strings from being parsed as directives -// See https://github.com/prettier/prettier/pull/1560#issue-227225960 -0; - -// Every string will be changed to double quotes, unless we end up with fewer -// escaped quotes by using single quotes. (Vice versa if the "singleQuote" -// option is true). -// -// Note that even if a string already has the correct enclosing quotes, it is -// still processed in order to remove unnecessarily escaped quotes within it, -// for consistency. - -// Simple strings. -('abc'); -('abc'); - -// Escape. -('\\0'); - -// Emoji. -('🐶'); - -// Empty string. -(''); -(''); - -// Single double quote. -('"'); -('"'); - -// Single single quote. -("'"); -("'"); - -// Unnecessary escapes. -("'"); -('"'); -('a'); -('a'); -('hola'); -('hola'); -('hol\\\\a (the a is not escaped)'); -('hol\\\\a (the a is not escaped)'); -('multiple a unnecessary a escapes'); -('multiple a unnecessary a escapes'); -('unnecessarily escaped character preceded by escaped backslash \\\\a'); -('unnecessarily escaped character preceded by escaped backslash \\\\a'); -('unescaped character preceded by two escaped backslashes \\\\\\\\a'); -('unescaped character preceded by two escaped backslashes \\\\\\\\a'); -('aa'); // consecutive unnecessarily escaped characters -('aa'); // consecutive unnecessarily escaped characters -('escaped \\u2030 ‰ (should not stay escaped)'); - -// Meaningful escapes -('octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7'); -('octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7'); -('meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61'); -('meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61'); -('escaped newline \\ -'); -('escaped carriage return \\ -'); -('escaped \\u2028 \\
'); -('escaped \\u2029 \\
'); - -// One of each. -('"\\''); -('"\\''); - -// One of each with unnecessary escapes. -('"\\''); -('"\\''); - -// More double quotes than single quotes. -('"\\'"'); -('"\\'"'); - -// More single quotes than double quotes. -("\\"''"); -("\\"''"); - -// Two of each. -('""\\'\\''); -('""\\'\\''); - -// Single backslash. -('\\\\'); -('\\\\'); - -// Backslases. -("\\"\\\\\\"\\\\\\\\\\" ''\\\\'\\\\'\\\\\\\\'"); -('\\'\\\\\\'\\\\\\\\\\' ""\\\\"\\\\"\\\\\\\\"'); - -// Somewhat more real-word example. -("He's sayin': \\"How's it goin'?\\" Don't ask me why."); -("He's sayin': \\"How's it goin'?\\" Don't ask me why."); - -// Somewhat more real-word example 2. -('var backslash = "\\\\", doubleQuote = \\'"\\';'); -('var backslash = "\\\\", doubleQuote = \\'"\\';'); - -================================================================================ -`; - -exports[`strings.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Prevent strings from being parsed as directives -// See https://github.com/prettier/prettier/pull/1560#issue-227225960 -0; - -// Every string will be changed to double quotes, unless we end up with fewer -// escaped quotes by using single quotes. (Vice versa if the "singleQuote" -// option is true). -// -// Note that even if a string already has the correct enclosing quotes, it is -// still processed in order to remove unnecessarily escaped quotes within it, -// for consistency. - -// Simple strings. -"abc" -'abc' - -// Escape. -'\\0' - -// Emoji. -'🐶' - -// Empty string. -"" -'' - -// Single double quote. -"\\"" -'"' - -// Single single quote. -"'" -'\\'' - -// Unnecessary escapes. -"\\'" -'\\"' -"\\a" -'\\a' -"hol\\a" -'hol\\a' -"hol\\\\a (the a is not escaped)" -'hol\\\\a (the a is not escaped)' -"multiple \\a unnecessary \\a escapes" -'multiple \\a unnecessary \\a escapes' -"unnecessarily escaped character preceded by escaped backslash \\\\\\a" -'unnecessarily escaped character preceded by escaped backslash \\\\\\a' -"unescaped character preceded by two escaped backslashes \\\\\\\\a" -'unescaped character preceded by two escaped backslashes \\\\\\\\a' -"\\a\\a" // consecutive unnecessarily escaped characters -'\\a\\a' // consecutive unnecessarily escaped characters -'escaped \\u2030 \\‰ (should not stay escaped)' - -// Meaningful escapes -"octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7" -'octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7' -"meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61" -'meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61' -'escaped newline \\ -' -'escaped carriage return \\ -' -'escaped \\u2028 \\
' -'escaped \\u2029 \\
' - -// One of each. -"\\"'" -'"\\'' - -// One of each with unnecessary escapes. -"\\"\\'" -'\\"\\'' - -// More double quotes than single quotes. -"\\"'\\"" -'"\\'"' - -// More single quotes than double quotes. -"\\"''" -'"\\'\\'' - -// Two of each. -"\\"\\"''" -'""\\'\\'' - -// Single backslash. -'\\\\' -"\\\\" - -// Backslases. -"\\"\\\\\\"\\\\\\\\\\" '\\'\\\\'\\\\\\'\\\\\\\\'" -'\\'\\\\\\'\\\\\\\\\\' "\\"\\\\"\\\\\\"\\\\\\\\"' - -// Somewhat more real-word example. -"He's sayin': \\"How's it goin'?\\" Don't ask me why." -'He\\'s sayin\\': "How\\'s it goin\\'?" Don\\'t ask me why.' - -// Somewhat more real-word example 2. -"var backslash = \\"\\\\\\", doubleQuote = '\\"';" -'var backslash = "\\\\", doubleQuote = \\'"\\';' - -=====================================output===================================== -// Prevent strings from being parsed as directives -// See https://github.com/prettier/prettier/pull/1560#issue-227225960 -0; - -// Every string will be changed to double quotes, unless we end up with fewer -// escaped quotes by using single quotes. (Vice versa if the "singleQuote" -// option is true). -// -// Note that even if a string already has the correct enclosing quotes, it is -// still processed in order to remove unnecessarily escaped quotes within it, -// for consistency. - -// Simple strings. -("abc"); -("abc"); - -// Escape. -("\\0"); - -// Emoji. -("🐶"); - -// Empty string. -(""); -(""); - -// Single double quote. -('"'); -('"'); - -// Single single quote. -("'"); -("'"); - -// Unnecessary escapes. -("'"); -('"'); -("a"); -("a"); -("hola"); -("hola"); -("hol\\\\a (the a is not escaped)"); -("hol\\\\a (the a is not escaped)"); -("multiple a unnecessary a escapes"); -("multiple a unnecessary a escapes"); -("unnecessarily escaped character preceded by escaped backslash \\\\a"); -("unnecessarily escaped character preceded by escaped backslash \\\\a"); -("unescaped character preceded by two escaped backslashes \\\\\\\\a"); -("unescaped character preceded by two escaped backslashes \\\\\\\\a"); -("aa"); // consecutive unnecessarily escaped characters -("aa"); // consecutive unnecessarily escaped characters -("escaped \\u2030 ‰ (should not stay escaped)"); - -// Meaningful escapes -("octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7"); -("octal escapes \\0 \\1 \\2 \\3 \\4 \\5 \\6 \\7"); -("meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61"); -("meaningfully escaped alphabetical characters \\n \\r \\v \\t \\b \\f \\u2713 \\x61"); -("escaped newline \\ -"); -("escaped carriage return \\ -"); -("escaped \\u2028 \\
"); -("escaped \\u2029 \\
"); - -// One of each. -("\\"'"); -("\\"'"); - -// One of each with unnecessary escapes. -("\\"'"); -("\\"'"); - -// More double quotes than single quotes. -('"\\'"'); -('"\\'"'); - -// More single quotes than double quotes. -("\\"''"); -("\\"''"); - -// Two of each. -("\\"\\"''"); -("\\"\\"''"); - -// Single backslash. -("\\\\"); -("\\\\"); - -// Backslases. -("\\"\\\\\\"\\\\\\\\\\" ''\\\\'\\\\'\\\\\\\\'"); -('\\'\\\\\\'\\\\\\\\\\' ""\\\\"\\\\"\\\\\\\\"'); - -// Somewhat more real-word example. -("He's sayin': \\"How's it goin'?\\" Don't ask me why."); -("He's sayin': \\"How's it goin'?\\" Don't ask me why."); - -// Somewhat more real-word example 2. -('var backslash = "\\\\", doubleQuote = \\'"\\';'); -('var backslash = "\\\\", doubleQuote = \\'"\\';'); - -================================================================================ -`; diff --git a/tests/format/js/quotes/format.test.js b/tests/format/js/quotes/format.test.js new file mode 100644 index 000000000000..912a408f408e --- /dev/null +++ b/tests/format/js/quotes/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "flow"]); +runFormatTest(import.meta, ["babel", "flow"], { singleQuote: true }); diff --git a/tests/format/js/quotes/jsfmt.spec.js b/tests/format/js/quotes/jsfmt.spec.js deleted file mode 100644 index 6568ad6f56f8..000000000000 --- a/tests/format/js/quotes/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); -run_spec(__dirname, ["babel", "flow"], { singleQuote: true }); diff --git a/tests/format/js/range/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/range/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/range/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/range/__snapshots__/format.test.js.snap diff --git a/tests/format/js/range/format.test.js b/tests/format/js/range/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/range/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/range/jsfmt.spec.js b/tests/format/js/range/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/range/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 066838221ac5..000000000000 --- a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,330 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`computed.js [acorn] format 1`] = ` -"Unexpected character '{' (2:9) - 1 | const key = "a"; -> 2 | assert(#{ [key]: 1 } === #{ a: 1 }) - | ^ - 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) - 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" -`; - -exports[`computed.js [espree] format 1`] = ` -"Unexpected character '{' (2:9) - 1 | const key = "a"; -> 2 | assert(#{ [key]: 1 } === #{ a: 1 }) - | ^ - 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) - 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" -`; - -exports[`computed.js [meriyah] format 1`] = ` -"'#' not followed by identifier (2:8) - 1 | const key = "a"; -> 2 | assert(#{ [key]: 1 } === #{ a: 1 }) - | ^ - 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) - 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" -`; - -exports[`computed.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const key = "a"; -assert(#{ [key]: 1 } === #{ a: 1 }) -assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) - -assert(#{ [true]: 1 } === #{ true: 1 }) -assert(#{ [true]: 1 } === #{ ["true"]: 1 }) - -assert(#{ [1 + 1]: "two" } === #{ 2: "two" }) -assert(#{ [9 + 1]: "ten" } === #{ ["10"]: "ten" }) - -=====================================output===================================== -const key = "a"; -assert(#{ [key]: 1 } === #{ a: 1 }); -assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }); - -assert(#{ [true]: 1 } === #{ true: 1 }); -assert(#{ [true]: 1 } === #{ ["true"]: 1 }); - -assert(#{ [1 + 1]: "two" } === #{ 2: "two" }); -assert(#{ [9 + 1]: "ten" } === #{ ["10"]: "ten" }); - -================================================================================ -`; - -exports[`destructuring.js [acorn] format 1`] = ` -"Unexpected character '{' (1:19) -> 1 | const { a, b } = #{ a: 1, b: 2 }; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js [espree] format 1`] = ` -"Unexpected character '{' (1:19) -> 1 | const { a, b } = #{ a: 1, b: 2 }; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:18) -> 1 | const { a, b } = #{ a: 1, b: 2 }; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { a, b } = #{ a: 1, b: 2 }; -assert(a === 1); -assert(b === 2); - -const { a, ...rest } = #{ a: 1, b: 2, c: 3 }; -assert(a === 1); -assert(typeof rest === "object"); -assert(rest.b === 2); -assert(rest.c === 3); - -=====================================output===================================== -const { a, b } = #{ a: 1, b: 2 }; -assert(a === 1); -assert(b === 2); - -const { a, ...rest } = #{ a: 1, b: 2, c: 3 }; -assert(a === 1); -assert(typeof rest === "object"); -assert(rest.b === 2); -assert(rest.c === 3); - -================================================================================ -`; - -exports[`record.js [acorn] format 1`] = ` -"Unexpected character '{' (1:18) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record.js [espree] format 1`] = ` -"Unexpected character '{' (1:18) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:17) -> 1 | const record1 = #{ - | ^ - 2 | a: 1, - 3 | b: 2, - 4 | c: 3," -`; - -exports[`record.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{...record1, b: 5}; - -assert(record1.a === 1); -assert(record1["a"] === 1); -assert(record1 !== record2); -assert(record2 === #{ a: 1, c: 3, b: 5 }); -assert(record1?.a === 1); -assert(record1?.d === undefined); -assert(record1?.d ?? 5 === 5); -assert(record1.d?.a === undefined); - -=====================================output===================================== -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{ ...record1, b: 5 }; - -assert(record1.a === 1); -assert(record1["a"] === 1); -assert(record1 !== record2); -assert(record2 === #{ a: 1, c: 3, b: 5 }); -assert(record1?.a === 1); -assert(record1?.d === undefined); -assert(record1?.d ?? 5 === 5); -assert(record1.d?.a === undefined); - -================================================================================ -`; - -exports[`shorthand.js [acorn] format 1`] = ` -"Unexpected character '{' (2:17) - 1 | const url = "https://github.com/tc39/proposal-record-tuple"; -> 2 | const record = #{ url } - | ^ - 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" -`; - -exports[`shorthand.js [espree] format 1`] = ` -"Unexpected character '{' (2:17) - 1 | const url = "https://github.com/tc39/proposal-record-tuple"; -> 2 | const record = #{ url } - | ^ - 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" -`; - -exports[`shorthand.js [meriyah] format 1`] = ` -"'#' not followed by identifier (2:16) - 1 | const url = "https://github.com/tc39/proposal-record-tuple"; -> 2 | const record = #{ url } - | ^ - 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" -`; - -exports[`shorthand.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const url = "https://github.com/tc39/proposal-record-tuple"; -const record = #{ url } -console.log(record.url) // https://github.com/tc39/proposal-record-tuple - -=====================================output===================================== -const url = "https://github.com/tc39/proposal-record-tuple"; -const record = #{ url }; -console.log(record.url); // https://github.com/tc39/proposal-record-tuple - -================================================================================ -`; - -exports[`spread.js [acorn] format 1`] = ` -"Unexpected character '{' (1:19) -> 1 | const formData = #{ title: "Implement all the things" } - | ^ - 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } - 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" -`; - -exports[`spread.js [espree] format 1`] = ` -"Unexpected character '{' (1:19) -> 1 | const formData = #{ title: "Implement all the things" } - | ^ - 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } - 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" -`; - -exports[`spread.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:18) -> 1 | const formData = #{ title: "Implement all the things" } - | ^ - 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } - 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" -`; - -exports[`spread.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const formData = #{ title: "Implement all the things" } -const taskNow = #{ id: 42, status: "WIP", ...formData } -const taskLater = #{ ...taskNow, status: "DONE" } - -// A reminder: The ordering of keys in record literals does not affect equality (and is not retained) -assert(taskLater === #{ status: "DONE", title: formData.title, id: 42 }) - -=====================================output===================================== -const formData = #{ title: "Implement all the things" }; -const taskNow = #{ id: 42, status: "WIP", ...formData }; -const taskLater = #{ ...taskNow, status: "DONE" }; - -// A reminder: The ordering of keys in record literals does not affect equality (and is not retained) -assert(taskLater === #{ status: "DONE", title: formData.title, id: 42 }); - -================================================================================ -`; - -exports[`syntax.js [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{} - | ^ - 2 | #{ a: 1, b: 2 } - 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" -`; - -exports[`syntax.js [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{} - | ^ - 2 | #{ a: 1, b: 2 } - 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" -`; - -exports[`syntax.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{} - | ^ - 2 | #{ a: 1, b: 2 } - 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" -`; - -exports[`syntax.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -#{} -#{ a: 1, b: 2 } -#{ a: 1, b: #[2, 3, #{ c: 4 }] } - -=====================================output===================================== -#{}; -#{ a: 1, b: 2 }; -#{ a: 1, b: #[2, 3, #{ c: 4 }] }; - -================================================================================ -`; diff --git a/tests/format/js/record/computed.js b/tests/format/js/record/computed.js deleted file mode 100644 index d5aed608a00e..000000000000 --- a/tests/format/js/record/computed.js +++ /dev/null @@ -1,9 +0,0 @@ -const key = "a"; -assert(#{ [key]: 1 } === #{ a: 1 }) -assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) - -assert(#{ [true]: 1 } === #{ true: 1 }) -assert(#{ [true]: 1 } === #{ ["true"]: 1 }) - -assert(#{ [1 + 1]: "two" } === #{ 2: "two" }) -assert(#{ [9 + 1]: "ten" } === #{ ["10"]: "ten" }) diff --git a/tests/format/js/record/destructuring.js b/tests/format/js/record/destructuring.js deleted file mode 100644 index 05acf3444aef..000000000000 --- a/tests/format/js/record/destructuring.js +++ /dev/null @@ -1,9 +0,0 @@ -const { a, b } = #{ a: 1, b: 2 }; -assert(a === 1); -assert(b === 2); - -const { a, ...rest } = #{ a: 1, b: 2, c: 3 }; -assert(a === 1); -assert(typeof rest === "object"); -assert(rest.b === 2); -assert(rest.c === 3); diff --git a/tests/format/js/record/jsfmt.spec.js b/tests/format/js/record/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/record/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/record/record.js b/tests/format/js/record/record.js deleted file mode 100644 index 256134e93b33..000000000000 --- a/tests/format/js/record/record.js +++ /dev/null @@ -1,16 +0,0 @@ -const record1 = #{ - a: 1, - b: 2, - c: 3, -}; - -const record2 = #{...record1, b: 5}; - -assert(record1.a === 1); -assert(record1["a"] === 1); -assert(record1 !== record2); -assert(record2 === #{ a: 1, c: 3, b: 5 }); -assert(record1?.a === 1); -assert(record1?.d === undefined); -assert(record1?.d ?? 5 === 5); -assert(record1.d?.a === undefined); diff --git a/tests/format/js/record/shorthand.js b/tests/format/js/record/shorthand.js deleted file mode 100644 index 29eee1361895..000000000000 --- a/tests/format/js/record/shorthand.js +++ /dev/null @@ -1,3 +0,0 @@ -const url = "https://github.com/tc39/proposal-record-tuple"; -const record = #{ url } -console.log(record.url) // https://github.com/tc39/proposal-record-tuple diff --git a/tests/format/js/record/spread.js b/tests/format/js/record/spread.js deleted file mode 100644 index 31bfe0c76672..000000000000 --- a/tests/format/js/record/spread.js +++ /dev/null @@ -1,6 +0,0 @@ -const formData = #{ title: "Implement all the things" } -const taskNow = #{ id: 42, status: "WIP", ...formData } -const taskLater = #{ ...taskNow, status: "DONE" } - -// A reminder: The ordering of keys in record literals does not affect equality (and is not retained) -assert(taskLater === #{ status: "DONE", title: formData.title, id: 42 }) diff --git a/tests/format/js/record/syntax.js b/tests/format/js/record/syntax.js deleted file mode 100644 index 14db6d07b86c..000000000000 --- a/tests/format/js/record/syntax.js +++ /dev/null @@ -1,3 +0,0 @@ -#{} -#{ a: 1, b: 2 } -#{ a: 1, b: #[2, 3, #{ c: 4 }] } diff --git a/tests/format/js/regex/__snapshots__/format.test.js.snap b/tests/format/js/regex/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41e990953b41 --- /dev/null +++ b/tests/format/js/regex/__snapshots__/format.test.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`d-flag.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/./d; + +=====================================output===================================== +/./d; + +================================================================================ +`; + +exports[`multiple-flags.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/.*/ms; +/.*/my; + +=====================================output===================================== +/.*/ms; +/.*/my; + +================================================================================ +`; + +exports[`regexp-modifiers.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/(?ims:^[a-z])/u; +/(?-ims:^[a-z].)(^[a-z].)/uims; +/(?ims:^[a-z].1$)/; + +=====================================output===================================== +/(?ims:^[a-z])/u; +/(?-ims:^[a-z].)(^[a-z].)/imsu; +/(?ims:^[a-z].1$)/; + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/[/]\\/\\u0aBc/mgi; + +=====================================output===================================== +/[/]\\/\\u0aBc/gim; + +================================================================================ +`; + +exports[`v-flag.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/a/v; + +=====================================output===================================== +/a/v; + +================================================================================ +`; diff --git a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 18d9ecdde540..000000000000 --- a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,94 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`d-flag.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:3) -> 1 | /./d; - | ^ - 2 |" -`; - -exports[`d-flag.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/./d; - -=====================================output===================================== -/./d; - -================================================================================ -`; - -exports[`multiple-flags.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/.*/ms; -/.*/my; - -=====================================output===================================== -/.*/ms; -/.*/my; - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/[/]\\/\\u0aBc/mgi; - -=====================================output===================================== -/[/]\\/\\u0aBc/gim; - -================================================================================ -`; - -exports[`v-flag.js [acorn] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`v-flag.js [espree] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`v-flag.js [flow] format 1`] = ` -"Invalid flags supplied to RegExp constructor 'v' (1:5) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`v-flag.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:3) -> 1 | /a/v; - | ^ - 2 |" -`; - -exports[`v-flag.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/a/v; - -=====================================output===================================== -/a/v; - -================================================================================ -`; diff --git a/tests/format/js/regex/format.test.js b/tests/format/js/regex/format.test.js new file mode 100644 index 000000000000..1005e8831380 --- /dev/null +++ b/tests/format/js/regex/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + meriyah: ["regexp-modifiers.js"], + }, +}); diff --git a/tests/format/js/regex/jsfmt.spec.js b/tests/format/js/regex/jsfmt.spec.js deleted file mode 100644 index 857c89598f23..000000000000 --- a/tests/format/js/regex/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - flow: ["v-flag.js"], - acorn: ["v-flag.js"], - espree: ["v-flag.js"], - meriyah: ["d-flag.js", "v-flag.js"], - }, -}); diff --git a/tests/format/js/regex/regexp-modifiers.js b/tests/format/js/regex/regexp-modifiers.js new file mode 100644 index 000000000000..6d1d5144bec7 --- /dev/null +++ b/tests/format/js/regex/regexp-modifiers.js @@ -0,0 +1,3 @@ +/(?ims:^[a-z])/u; +/(?-ims:^[a-z].)(^[a-z].)/uims; +/(?ims:^[a-z].1$)/; diff --git a/tests/format/js/require-amd/__snapshots__/format.test.js.snap b/tests/format/js/require-amd/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f05de41e757d --- /dev/null +++ b/tests/format/js/require-amd/__snapshots__/format.test.js.snap @@ -0,0 +1,132 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`named-amd-module.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +define("foo/title", + ["my/cart", "my/inventory"], + function(cart, inventory) { + //Define foo/title object in here. + } +) + +=====================================output===================================== +define("foo/title", ["my/cart", "my/inventory"], function (cart, inventory) { + //Define foo/title object in here. +}); + +================================================================================ +`; + +exports[`non-amd-define.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const someVariable = define( + "some string literal", + anotherVariable, + yetAnotherVariable +); + +=====================================output===================================== +const someVariable = define( + "some string literal", + anotherVariable, + yetAnotherVariable, +); + +================================================================================ +`; + +exports[`require.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +require( + [ + 'jquery', + 'common/global.context', + 'common/log.event', + 'some_project/square', + 'some_project/rectangle', + 'some_project/triangle', + 'some_project/circle', + 'some_project/star', + ], + function($, Context, EventLogger, Square, Rectangle, Triangle, Circle, Star) { + + console.log('some code') + } +); + +define( + [ + 'jquery', + 'common/global.context', + 'common/log.event', + 'some_project/square', + 'some_project/rectangle', + 'some_project/triangle', + 'some_project/circle', + 'some_project/star', + ], + function($, Context, EventLogger, Square, Rectangle, Triangle, Circle, Star) { + + console.log('some code') + } +); + +=====================================output===================================== +require([ + "jquery", + "common/global.context", + "common/log.event", + "some_project/square", + "some_project/rectangle", + "some_project/triangle", + "some_project/circle", + "some_project/star", +], function ( + $, + Context, + EventLogger, + Square, + Rectangle, + Triangle, + Circle, + Star, +) { + console.log("some code"); +}); + +define([ + "jquery", + "common/global.context", + "common/log.event", + "some_project/square", + "some_project/rectangle", + "some_project/triangle", + "some_project/circle", + "some_project/star", +], function ( + $, + Context, + EventLogger, + Square, + Rectangle, + Triangle, + Circle, + Star, +) { + console.log("some code"); +}); + +================================================================================ +`; diff --git a/tests/format/js/require-amd/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/require-amd/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5b2329192b77..000000000000 --- a/tests/format/js/require-amd/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,132 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`named-amd-module.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -define("foo/title", - ["my/cart", "my/inventory"], - function(cart, inventory) { - //Define foo/title object in here. - } -) - -=====================================output===================================== -define("foo/title", ["my/cart", "my/inventory"], function (cart, inventory) { - //Define foo/title object in here. -}); - -================================================================================ -`; - -exports[`non-amd-define.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const someVariable = define( - "some string literal", - anotherVariable, - yetAnotherVariable -); - -=====================================output===================================== -const someVariable = define( - "some string literal", - anotherVariable, - yetAnotherVariable -); - -================================================================================ -`; - -exports[`require.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -require( - [ - 'jquery', - 'common/global.context', - 'common/log.event', - 'some_project/square', - 'some_project/rectangle', - 'some_project/triangle', - 'some_project/circle', - 'some_project/star', - ], - function($, Context, EventLogger, Square, Rectangle, Triangle, Circle, Star) { - - console.log('some code') - } -); - -define( - [ - 'jquery', - 'common/global.context', - 'common/log.event', - 'some_project/square', - 'some_project/rectangle', - 'some_project/triangle', - 'some_project/circle', - 'some_project/star', - ], - function($, Context, EventLogger, Square, Rectangle, Triangle, Circle, Star) { - - console.log('some code') - } -); - -=====================================output===================================== -require([ - "jquery", - "common/global.context", - "common/log.event", - "some_project/square", - "some_project/rectangle", - "some_project/triangle", - "some_project/circle", - "some_project/star", -], function ( - $, - Context, - EventLogger, - Square, - Rectangle, - Triangle, - Circle, - Star -) { - console.log("some code"); -}); - -define([ - "jquery", - "common/global.context", - "common/log.event", - "some_project/square", - "some_project/rectangle", - "some_project/triangle", - "some_project/circle", - "some_project/star", -], function ( - $, - Context, - EventLogger, - Square, - Rectangle, - Triangle, - Circle, - Star -) { - console.log("some code"); -}); - -================================================================================ -`; diff --git a/tests/format/js/require-amd/format.test.js b/tests/format/js/require-amd/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/require-amd/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/require-amd/jsfmt.spec.js b/tests/format/js/require-amd/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/require-amd/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/require/__snapshots__/format.test.js.snap b/tests/format/js/require/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4fb6b5bf441e --- /dev/null +++ b/tests/format/js/require/__snapshots__/format.test.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`require.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { one, two, three, four, five, six, seven, eight, nine, ten } = require('./my-utils'); +const { one1, two1, three1, four1, five1, six1, seven1, eight1, nine1, ten1, eleven1 } = require('./my-utils'); + +const MyReallyExtrememlyLongModuleName = require('MyReallyExtrememlyLongModuleName'); + +const plugin = require( + global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, "..") +); + +const plugin2 = require( + path.join( + __dirname, + global.STANDALONE ? "../standalone.js" : '..' + ) +); + +=====================================output===================================== +const { + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ten, +} = require("./my-utils"); +const { + one1, + two1, + three1, + four1, + five1, + six1, + seven1, + eight1, + nine1, + ten1, + eleven1, +} = require("./my-utils"); + +const MyReallyExtrememlyLongModuleName = require("MyReallyExtrememlyLongModuleName"); + +const plugin = require( + global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, ".."), +); + +const plugin2 = require( + path.join(__dirname, global.STANDALONE ? "../standalone.js" : ".."), +); + +================================================================================ +`; diff --git a/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b7eb9a791f38..000000000000 --- a/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,44 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`require.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { one, two, three, four, five, six, seven, eight, nine, ten } = require('./my-utils'); -const { one1, two1, three1, four1, five1, six1, seven1, eight1, nine1, ten1, eleven1 } = require('./my-utils'); - -const MyReallyExtrememlyLongModuleName = require('MyReallyExtrememlyLongModuleName'); - -=====================================output===================================== -const { - one, - two, - three, - four, - five, - six, - seven, - eight, - nine, - ten, -} = require("./my-utils"); -const { - one1, - two1, - three1, - four1, - five1, - six1, - seven1, - eight1, - nine1, - ten1, - eleven1, -} = require("./my-utils"); - -const MyReallyExtrememlyLongModuleName = require("MyReallyExtrememlyLongModuleName"); - -================================================================================ -`; diff --git a/tests/format/js/require/format.test.js b/tests/format/js/require/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/require/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/require/jsfmt.spec.js b/tests/format/js/require/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/require/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/require/require.js b/tests/format/js/require/require.js index a990ca9f3ede..0ab375268a00 100644 --- a/tests/format/js/require/require.js +++ b/tests/format/js/require/require.js @@ -2,3 +2,16 @@ const { one, two, three, four, five, six, seven, eight, nine, ten } = require('. const { one1, two1, three1, four1, five1, six1, seven1, eight1, nine1, ten1, eleven1 } = require('./my-utils'); const MyReallyExtrememlyLongModuleName = require('MyReallyExtrememlyLongModuleName'); + +const plugin = require( + global.STANDALONE + ? path.join(__dirname, "../standalone.js") + : path.join(__dirname, "..") +); + +const plugin2 = require( + path.join( + __dirname, + global.STANDALONE ? "../standalone.js" : '..' + ) +); diff --git a/tests/format/js/reserved-word/__snapshots__/format.test.js.snap b/tests/format/js/reserved-word/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d5143e42ade5 --- /dev/null +++ b/tests/format/js/reserved-word/__snapshots__/format.test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`interfaces.js format 1`] = ` +====================================options===================================== +parsers: ["acorn", "espree", "meriyah", "babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo.interface; +interface.foo; +new interface(); +({ interface: "foo" }); +(interface, "foo"); +void interface; +var interface = "foo"; + +=====================================output===================================== +foo.interface; +interface.foo; +new interface(); +({ interface: "foo" }); +(interface, "foo"); +void interface; +var interface = "foo"; + +================================================================================ +`; + +exports[`let.js format 1`] = ` +====================================options===================================== +parsers: ["acorn", "espree", "meriyah", "babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo.let; +let.foo; +new let(); +({ let: "foo" }); +(let, "foo"); +void let; +var let = "foo"; + +=====================================output===================================== +foo.let; +let.foo; +new let(); +({ let: "foo" }); +(let, "foo"); +void let; +var let = "foo"; + +================================================================================ +`; + +exports[`yield.js format 1`] = ` +====================================options===================================== +parsers: ["acorn", "espree", "meriyah", "babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo.yield; +yield.foo; +new yield(); +({ yield: "foo" }); +(yield, "foo"); +void yield; +var yield = "foo"; + +=====================================output===================================== +foo.yield; +yield.foo; +new yield(); +({ yield: "foo" }); +(yield, "foo"); +void yield; +var yield = "foo"; + +================================================================================ +`; diff --git a/tests/format/js/reserved-word/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/reserved-word/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a89729cea006..000000000000 --- a/tests/format/js/reserved-word/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,27 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`interfaces.js format 1`] = ` -====================================options===================================== -parsers: ["acorn", "espree", "meriyah", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo.interface; -interface.foo; -new interface(); -({ interface: "foo" }); -(interface, "foo"); -void interface; -const interface = "foo"; - -=====================================output===================================== -foo.interface; -interface.foo; -new interface(); -({ interface: "foo" }); -interface, "foo"; -void interface; -const interface = "foo"; - -================================================================================ -`; diff --git a/tests/format/js/reserved-word/format.test.js b/tests/format/js/reserved-word/format.test.js new file mode 100644 index 000000000000..0592a869d8d6 --- /dev/null +++ b/tests/format/js/reserved-word/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["acorn", "espree", "meriyah", "babel"]); diff --git a/tests/format/js/reserved-word/interfaces.js b/tests/format/js/reserved-word/interfaces.js index afe6516590a8..ca032f07ef10 100644 --- a/tests/format/js/reserved-word/interfaces.js +++ b/tests/format/js/reserved-word/interfaces.js @@ -4,4 +4,4 @@ new interface(); ({ interface: "foo" }); (interface, "foo"); void interface; -const interface = "foo"; +var interface = "foo"; diff --git a/tests/format/js/reserved-word/jsfmt.spec.js b/tests/format/js/reserved-word/jsfmt.spec.js deleted file mode 100644 index 9128b0f44f64..000000000000 --- a/tests/format/js/reserved-word/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["acorn", "espree", "meriyah", "babel"]); diff --git a/tests/format/js/reserved-word/let.js b/tests/format/js/reserved-word/let.js new file mode 100644 index 000000000000..a1d12dc71b55 --- /dev/null +++ b/tests/format/js/reserved-word/let.js @@ -0,0 +1,7 @@ +foo.let; +let.foo; +new let(); +({ let: "foo" }); +(let, "foo"); +void let; +var let = "foo"; diff --git a/tests/format/js/reserved-word/yield.js b/tests/format/js/reserved-word/yield.js new file mode 100644 index 000000000000..40a039da1bf5 --- /dev/null +++ b/tests/format/js/reserved-word/yield.js @@ -0,0 +1,7 @@ +foo.yield; +yield.foo; +new yield(); +({ yield: "foo" }); +(yield, "foo"); +void yield; +var yield = "foo"; diff --git a/tests/format/js/rest/__snapshots__/format.test.js.snap b/tests/format/js/rest/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..56e461272901 --- /dev/null +++ b/tests/format/js/rest/__snapshots__/format.test.js.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`trailing-commas.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +class C { + f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + ...args + ) {} +} + +function f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + ...args +) {} + +class D { f(...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong) {}; } + +[superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong,,]; + +[veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, ...a] = []; +var {veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, ...a} = {}; + + +=====================================output===================================== +class C { + f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + ...args + ) {} +} + +function f( + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + ...args +) {} + +class D { + f( + ...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong + ) {} +} + +[ + superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, + , +]; + +[ + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, + ...a +] = []; +var { + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, + ...a +} = {}; + +================================================================================ +`; diff --git a/tests/format/js/rest/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/rest/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5b00a3583243..000000000000 --- a/tests/format/js/rest/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,91 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`trailing-commas.js - {"trailingComma":"all"} [acorn] format 1`] = ` -"Unexpected token (1:9) -> 1 | declare class C { - | ^ - 2 | f( - 3 | superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - 4 | ...args" -`; - -exports[`trailing-commas.js - {"trailingComma":"all"} [espree] format 1`] = ` -"Unexpected token class (1:9) -> 1 | declare class C { - | ^ - 2 | f( - 3 | superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - 4 | ...args" -`; - -exports[`trailing-commas.js - {"trailingComma":"all"} [meriyah] format 1`] = ` -"Unexpected token: 'class' (1:13) -> 1 | declare class C { - | ^ - 2 | f( - 3 | superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - 4 | ...args" -`; - -exports[`trailing-commas.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -declare class C { - f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - ...args - ): void, -} - -function f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - ...args -) {} - -declare class C { f(...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong): void; } - -[superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong,,]; - -[veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, ...a] = []; -var {veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, ...a} = {}; - - -=====================================output===================================== -declare class C { - f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - ...args - ): void; -} - -function f( - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - ...args -) {} - -declare class C { - f( - ...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong - ): void; -} - -[ - superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, - , -]; - -[ - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, - ...a -] = []; -var { - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong, - ...a -} = {}; - -================================================================================ -`; diff --git a/tests/format/js/rest/format.test.js b/tests/format/js/rest/format.test.js new file mode 100644 index 000000000000..067857e96adb --- /dev/null +++ b/tests/format/js/rest/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "all", +}); diff --git a/tests/format/js/rest/jsfmt.spec.js b/tests/format/js/rest/jsfmt.spec.js deleted file mode 100644 index e76b4614768b..000000000000 --- a/tests/format/js/rest/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["babel", "flow"], { - trailingComma: "all", - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/rest/trailing-commas.js b/tests/format/js/rest/trailing-commas.js index 594fa7e93764..c50492226b79 100644 --- a/tests/format/js/rest/trailing-commas.js +++ b/tests/format/js/rest/trailing-commas.js @@ -1,8 +1,8 @@ -declare class C { +class C { f( superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, ...args - ): void, + ) {} } function f( @@ -10,7 +10,7 @@ function f( ...args ) {} -declare class C { f(...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong): void; } +class D { f(...superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong) {}; } [superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong,,]; diff --git a/tests/format/js/return-outside-function/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/return-outside-function/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/return-outside-function/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/return-outside-function/__snapshots__/format.test.js.snap diff --git a/tests/format/js/return-outside-function/format.test.js b/tests/format/js/return-outside-function/format.test.js new file mode 100644 index 000000000000..98ba37cc2f18 --- /dev/null +++ b/tests/format/js/return-outside-function/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/js/return-outside-function/jsfmt.spec.js b/tests/format/js/return-outside-function/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/js/return-outside-function/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/js/return/__snapshots__/format.test.js.snap b/tests/format/js/return/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f838357852b1 --- /dev/null +++ b/tests/format/js/return/__snapshots__/format.test.js.snap @@ -0,0 +1,153 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`binaryish.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + return ( + property.isIdentifier() && + FUNCTIONS[property.node.name] && + (object.isIdentifier(JEST_GLOBAL) || + (callee.isMemberExpression() && shouldHoistExpression(object))) && + FUNCTIONS[property.node.name](expr.get('arguments')) + ); + + return ( + chalk.bold( + 'No tests found related to files changed since last commit.\\n', + ) + + chalk.dim( + patternInfo.watch ? + 'Press \`a\` to run all tests, or run Jest with \`--watchAll\`.' : + 'Run Jest without \`-o\` to run all tests.', + ) + ); + + return !filePath.includes(coverageDirectory) && + !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`); +} + +=====================================output===================================== +function f() { + return ( + property.isIdentifier() && + FUNCTIONS[property.node.name] && + (object.isIdentifier(JEST_GLOBAL) || + (callee.isMemberExpression() && shouldHoistExpression(object))) && + FUNCTIONS[property.node.name](expr.get("arguments")) + ); + + return ( + chalk.bold("No tests found related to files changed since last commit.\\n") + + chalk.dim( + patternInfo.watch + ? "Press \`a\` to run all tests, or run Jest with \`--watchAll\`." + : "Run Jest without \`-o\` to run all tests.", + ) + ); + + return ( + !filePath.includes(coverageDirectory) && + !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`) + ); +} + +================================================================================ +`; + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + return /* a */; +} + +function f() { + return // a + ; +} + +function f() { + return // a + /* b */; +} + +function f() { + return /* a */ + // b + ; +} + +function x() { + return func2 + //comment + .bar(); +} + +function f() { + return ( + foo + // comment + .bar() + ); +} + +fn(function f() { + return ( + foo + // comment + .bar() + ); +}); + +=====================================output===================================== +function f() { + return /* a */; +} + +function f() { + return; // a +} + +function f() { + return // a + /* b */; +} + +function f() { + return; /* a */ + // b +} + +function x() { + return ( + func2 + //comment + .bar() + ); +} + +function f() { + return ( + foo + // comment + .bar() + ); +} + +fn(function f() { + return ( + foo + // comment + .bar() + ); +}); + +================================================================================ +`; diff --git a/tests/format/js/return/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/return/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9d639b981f59..000000000000 --- a/tests/format/js/return/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,153 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binaryish.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - return ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expr.get('arguments')) - ); - - return ( - chalk.bold( - 'No tests found related to files changed since last commit.\\n', - ) + - chalk.dim( - patternInfo.watch ? - 'Press \`a\` to run all tests, or run Jest with \`--watchAll\`.' : - 'Run Jest without \`-o\` to run all tests.', - ) - ); - - return !filePath.includes(coverageDirectory) && - !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`); -} - -=====================================output===================================== -function f() { - return ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expr.get("arguments")) - ); - - return ( - chalk.bold("No tests found related to files changed since last commit.\\n") + - chalk.dim( - patternInfo.watch - ? "Press \`a\` to run all tests, or run Jest with \`--watchAll\`." - : "Run Jest without \`-o\` to run all tests." - ) - ); - - return ( - !filePath.includes(coverageDirectory) && - !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`) - ); -} - -================================================================================ -`; - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - return /* a */; -} - -function f() { - return // a - ; -} - -function f() { - return // a - /* b */; -} - -function f() { - return /* a */ - // b - ; -} - -function x() { - return func2 - //comment - .bar(); -} - -function f() { - return ( - foo - // comment - .bar() - ); -} - -fn(function f() { - return ( - foo - // comment - .bar() - ); -}); - -=====================================output===================================== -function f() { - return /* a */; -} - -function f() { - return; // a -} - -function f() { - return // a - /* b */; -} - -function f() { - return; /* a */ - // b -} - -function x() { - return ( - func2 - //comment - .bar() - ); -} - -function f() { - return ( - foo - // comment - .bar() - ); -} - -fn(function f() { - return ( - foo - // comment - .bar() - ); -}); - -================================================================================ -`; diff --git a/tests/format/js/return/format.test.js b/tests/format/js/return/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/return/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/return/jsfmt.spec.js b/tests/format/js/return/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/return/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/sequence-break/__snapshots__/format.test.js.snap b/tests/format/js/sequence-break/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c2bb5e0b6cb6 --- /dev/null +++ b/tests/format/js/sequence-break/__snapshots__/format.test.js.snap @@ -0,0 +1,95 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const f = (argument1, argument2, argument3) => + (doSomethingWithArgument(argument1), doSomethingWithArgument(argument2),argument1); +(function(){ + return aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; +}); +(function(){ + throw aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; +}); +aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; +a.then(() => (aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName)); +for (aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0; test; update) {} +(a = b ? c : function() { return 0; }), + (a = b ? c : function() { return 0; }), + (a = b ? c : function() { return 0; }), + (a = b ? c : function() { return 0; }), + (a = b ? c : function() { return 0; }); + +=====================================output===================================== +const f = (argument1, argument2, argument3) => ( + doSomethingWithArgument(argument1), + doSomethingWithArgument(argument2), + argument1 +); +(function () { + return ( + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName + ); +}); +(function () { + throw ( + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName + ); +}); +(aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName); +a.then( + () => ( + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName, + aLongIdentifierName + ), +); +for ( + aLongIdentifierName = 0, + aLongIdentifierName = 0, + aLongIdentifierName = 0, + aLongIdentifierName = 0; + test; + update +) {} +((a = b + ? c + : function () { + return 0; + }), + (a = b + ? c + : function () { + return 0; + }), + (a = b + ? c + : function () { + return 0; + }), + (a = b + ? c + : function () { + return 0; + }), + (a = b + ? c + : function () { + return 0; + })); + +================================================================================ +`; diff --git a/tests/format/js/sequence-break/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/sequence-break/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 483a5cad03b3..000000000000 --- a/tests/format/js/sequence-break/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,84 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const f = (argument1, argument2, argument3) => - (doSomethingWithArgument(argument1), doSomethingWithArgument(argument2),argument1); -(function(){ - return aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; -}); -aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; -a.then(() => (aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName)); -for (aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0; test; update) {} -(a = b ? c : function() { return 0; }), - (a = b ? c : function() { return 0; }), - (a = b ? c : function() { return 0; }), - (a = b ? c : function() { return 0; }), - (a = b ? c : function() { return 0; }); - -=====================================output===================================== -const f = (argument1, argument2, argument3) => ( - doSomethingWithArgument(argument1), - doSomethingWithArgument(argument2), - argument1 -); -(function () { - return ( - aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName - ); -}); -aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName; -a.then( - () => ( - aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName, - aLongIdentifierName - ) -); -for ( - aLongIdentifierName = 0, - aLongIdentifierName = 0, - aLongIdentifierName = 0, - aLongIdentifierName = 0; - test; - update -) {} -(a = b - ? c - : function () { - return 0; - }), - (a = b - ? c - : function () { - return 0; - }), - (a = b - ? c - : function () { - return 0; - }), - (a = b - ? c - : function () { - return 0; - }), - (a = b - ? c - : function () { - return 0; - }); - -================================================================================ -`; diff --git a/tests/format/js/sequence-break/break.js b/tests/format/js/sequence-break/break.js index 1fb380ed4b0f..2d01a1c0454a 100644 --- a/tests/format/js/sequence-break/break.js +++ b/tests/format/js/sequence-break/break.js @@ -3,6 +3,9 @@ const f = (argument1, argument2, argument3) => (function(){ return aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; }); +(function(){ + throw aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; +}); aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName; a.then(() => (aLongIdentifierName, aLongIdentifierName, aLongIdentifierName, aLongIdentifierName)); for (aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0, aLongIdentifierName = 0; test; update) {} diff --git a/tests/format/js/sequence-break/format.test.js b/tests/format/js/sequence-break/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/sequence-break/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/sequence-break/jsfmt.spec.js b/tests/format/js/sequence-break/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/sequence-break/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/sequence-expression/__snapshots__/format.test.js.snap b/tests/format/js/sequence-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..98d156d24e88 --- /dev/null +++ b/tests/format/js/sequence-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,153 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`export-default.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default (1, +2); + +=====================================output===================================== +export default (1, 2); + +================================================================================ +`; + +exports[`expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a, b); + +a, b + +=====================================output===================================== +(a, b); + +(a, b); + +================================================================================ +`; + +exports[`ignore.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== ++ + // prettier-ignore + ( + ( + first + ) + , + ( + last + ) + ) +; + +=====================================output===================================== ++( + // prettier-ignore + (( + first + ) + , + ( + last + )) +); + +================================================================================ +`; + +exports[`ignored.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = ()=>()=> +// prettier-ignore +(a,b) + +=====================================output===================================== +const a = () => () => + // prettier-ignore + (a,b); + +================================================================================ +`; + +exports[`parenthesized.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +console.log( + /* 1 */ + ( + /* 2 */ + ( + /* 3 */ + first + /* 4 */ + ) + /* 5 */ + , + /* 6 */ + ( + /* 7 */ + last + /* 8 */ + ) + /* 9 */ + ) + /* 10 */ +); + +=====================================output===================================== +console.log( + /* 1 */ + /* 2 */ + (/* 3 */ + first, + /* 4 */ + /* 5 */ + /* 6 */ + /* 7 */ + last), + /* 8 */ + /* 9 */ + /* 10 */ +); + +================================================================================ +`; + +exports[`return.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a() { + return (a, b); + return a, b; +} + +=====================================output===================================== +function a() { + return (a, b); + return (a, b); +} + +================================================================================ +`; diff --git a/tests/format/js/sequence-parentheses/export-default.js b/tests/format/js/sequence-expression/export-default.js similarity index 100% rename from tests/format/js/sequence-parentheses/export-default.js rename to tests/format/js/sequence-expression/export-default.js diff --git a/tests/format/js/sequence-expression/expression.js b/tests/format/js/sequence-expression/expression.js new file mode 100644 index 000000000000..20141a329107 --- /dev/null +++ b/tests/format/js/sequence-expression/expression.js @@ -0,0 +1,3 @@ +(a, b); + +a, b diff --git a/tests/format/js/sequence-expression/format.test.js b/tests/format/js/sequence-expression/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/sequence-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/sequence-expression/ignore.js b/tests/format/js/sequence-expression/ignore.js new file mode 100644 index 000000000000..585b2e5267c0 --- /dev/null +++ b/tests/format/js/sequence-expression/ignore.js @@ -0,0 +1,12 @@ ++ + // prettier-ignore + ( + ( + first + ) + , + ( + last + ) + ) +; diff --git a/tests/format/js/sequence-expression/ignored.js b/tests/format/js/sequence-expression/ignored.js new file mode 100644 index 000000000000..f48e01a2888d --- /dev/null +++ b/tests/format/js/sequence-expression/ignored.js @@ -0,0 +1,3 @@ +const a = ()=>()=> +// prettier-ignore +(a,b) diff --git a/tests/format/js/sequence-expression/no-semi/__snapshots__/format.test.js.snap b/tests/format/js/sequence-expression/no-semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6b96ed89b98c --- /dev/null +++ b/tests/format/js/sequence-expression/no-semi/__snapshots__/format.test.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`expression.js - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +a; ++1, b + +=====================================output===================================== +a +;(+1, b) + +================================================================================ +`; diff --git a/tests/format/js/sequence-expression/no-semi/expression.js b/tests/format/js/sequence-expression/no-semi/expression.js new file mode 100644 index 000000000000..024fb3a249d7 --- /dev/null +++ b/tests/format/js/sequence-expression/no-semi/expression.js @@ -0,0 +1,2 @@ +a; ++1, b diff --git a/tests/format/js/sequence-expression/no-semi/format.test.js b/tests/format/js/sequence-expression/no-semi/format.test.js new file mode 100644 index 000000000000..f2b4ee9db5d5 --- /dev/null +++ b/tests/format/js/sequence-expression/no-semi/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { semi: false }); diff --git a/tests/format/js/sequence-expression/parenthesized.js b/tests/format/js/sequence-expression/parenthesized.js new file mode 100644 index 000000000000..5fc2a7032625 --- /dev/null +++ b/tests/format/js/sequence-expression/parenthesized.js @@ -0,0 +1,21 @@ +console.log( + /* 1 */ + ( + /* 2 */ + ( + /* 3 */ + first + /* 4 */ + ) + /* 5 */ + , + /* 6 */ + ( + /* 7 */ + last + /* 8 */ + ) + /* 9 */ + ) + /* 10 */ +); diff --git a/tests/format/js/sequence-expression/return.js b/tests/format/js/sequence-expression/return.js new file mode 100644 index 000000000000..b817a0d6a8c1 --- /dev/null +++ b/tests/format/js/sequence-expression/return.js @@ -0,0 +1,4 @@ +function a() { + return (a, b); + return a, b; +} diff --git a/tests/format/js/sequence-parentheses/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/sequence-parentheses/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b42c3bcb16db..000000000000 --- a/tests/format/js/sequence-parentheses/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,16 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`export-default.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default (1, -2); - -=====================================output===================================== -export default (1, 2); - -================================================================================ -`; diff --git a/tests/format/js/sequence-parentheses/jsfmt.spec.js b/tests/format/js/sequence-parentheses/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/sequence-parentheses/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/shebang/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/shebang/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/shebang/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/shebang/__snapshots__/format.test.js.snap diff --git a/tests/format/js/shebang/format.test.js b/tests/format/js/shebang/format.test.js new file mode 100644 index 000000000000..214746bdc35a --- /dev/null +++ b/tests/format/js/shebang/format.test.js @@ -0,0 +1,16 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + name: "Empty file with shebang", + code: "#!/usr/bin/env node", + }, + { + name: "Empty file with shebang", + code: "#!/usr/bin/env node\n", + }, + ], + }, + ["babel", "flow", "typescript"], +); diff --git a/tests/format/js/shebang/jsfmt.spec.js b/tests/format/js/shebang/jsfmt.spec.js deleted file mode 100644 index 20d7a86e3b48..000000000000 --- a/tests/format/js/shebang/jsfmt.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - { - name: "Empty file with shebang", - code: "#!/usr/bin/env node", - }, - { - name: "Empty file with shebang", - code: "#!/usr/bin/env node\n", - }, - ], - }, - ["babel", "flow", "typescript"] -); diff --git a/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap b/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..df319e59a500 --- /dev/null +++ b/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap @@ -0,0 +1,166 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`delete-variable.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + var bar = 1; + delete bar;} + +=====================================output===================================== +function foo() { + var bar = 1; + delete bar; +} + +================================================================================ +`; + +exports[`eval-arguments.js [hermes] format 1`] = ` +"invalid assignment left-hand side (3:2) + 1 | function myfunc() { + 2 | eval = 1 +> 3 | arguments = arguments; + | ^ + 4 | } + 5 | +Cause: invalid assignment left-hand side (3:2) + arguments = arguments; + ^~~~~~~~~" +`; + +exports[`eval-arguments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function myfunc() { + eval = 1 + arguments = arguments; +} + +=====================================output===================================== +function myfunc() { + eval = 1; + arguments = arguments; +} + +================================================================================ +`; + +exports[`eval-arguments-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function myfunc() { + var eval + var arguments; +} + +=====================================output===================================== +function myfunc() { + var eval; + var arguments; +} + +================================================================================ +`; + +exports[`function-declaration-in-if.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (false) function foo(){} + +=====================================output===================================== +if (false) function foo() {} + +================================================================================ +`; + +exports[`function-declaration-in-while.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | while (false) function foo(){} + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`function-declaration-in-while.js [espree] format 1`] = ` +"Unexpected token function (1:15) +> 1 | while (false) function foo(){} + | ^ + 2 | +Cause: Unexpected token function" +`; + +exports[`function-declaration-in-while.js [flow] format 1`] = ` +"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15) +> 1 | while (false) function foo(){} + | ^^^^^^^^^^^^^^^^ + 2 |" +`; + +exports[`function-declaration-in-while.js [hermes] format 1`] = ` +"declaration not allowed as expression statement (1:14) +> 1 | while (false) function foo(){} + | ^ + 2 | +Cause: declaration not allowed as expression statement (1:14) +while (false) function foo(){} + ^~~~~~~~" +`; + +exports[`function-declaration-in-while.js [meriyah] format 1`] = ` +"In strict mode code, functions can only be declared at top level or inside a block (1:15) +> 1 | while (false) function foo(){} + | ^^^^^^^^ + 2 | +Cause: [1:14-1:22]: In strict mode code, functions can only be declared at top level or inside a block" +`; + +exports[`function-declaration-in-while.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +while (false) function foo(){} + +=====================================output===================================== +while (false) function foo() {} + +================================================================================ +`; + +exports[`labeled-function-declaration.js [hermes] format 1`] = ` +"Function declaration not allowed as body of labeled statement (1:5) +> 1 | foo: function bar() {} + | ^ + 2 | +Cause: Function declaration not allowed as body of labeled statement (1:5) +foo: function bar() {} + ^" +`; + +exports[`labeled-function-declaration.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo: function bar() {} + +=====================================output===================================== +foo: function bar() {} + +================================================================================ +`; diff --git a/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 78a0d596b77c..000000000000 --- a/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,130 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`delete-variable.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo() { - var bar = 1; - delete bar;} - -=====================================output===================================== -function foo() { - var bar = 1; - delete bar; -} - -================================================================================ -`; - -exports[`eval-arguments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function myfunc() { - eval = 1 - arguments = arguments; -} - -=====================================output===================================== -function myfunc() { - eval = 1; - arguments = arguments; -} - -================================================================================ -`; - -exports[`eval-arguments-binding.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function myfunc() { - var eval - var arguments; -} - -=====================================output===================================== -function myfunc() { - var eval; - var arguments; -} - -================================================================================ -`; - -exports[`function-declaration-in-if.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (false) function foo(){} - -=====================================output===================================== -if (false) function foo() {} - -================================================================================ -`; - -exports[`function-declaration-in-while.js [acorn] format 1`] = ` -"Unexpected token (1:15) -> 1 | while (false) function foo(){} - | ^ - 2 |" -`; - -exports[`function-declaration-in-while.js [espree] format 1`] = ` -"Unexpected token function (1:15) -> 1 | while (false) function foo(){} - | ^ - 2 |" -`; - -exports[`function-declaration-in-while.js [flow] format 1`] = ` -"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15) -> 1 | while (false) function foo(){} - | ^^^^^^^^^^^^^^^^ - 2 |" -`; - -exports[`function-declaration-in-while.js [meriyah] format 1`] = ` -"In strict mode code, functions can only be declared at top level or inside a block (1:22) -> 1 | while (false) function foo(){} - | ^ - 2 |" -`; - -exports[`function-declaration-in-while.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -while (false) function foo(){} - -=====================================output===================================== -while (false) function foo() {} - -================================================================================ -`; - -exports[`labeled-function-declaration.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo: function bar() {} - -=====================================output===================================== -foo: function bar() {} - -================================================================================ -`; diff --git a/tests/format/js/sloppy-mode/format.test.js b/tests/format/js/sloppy-mode/format.test.js new file mode 100644 index 000000000000..c2d1a55db46b --- /dev/null +++ b/tests/format/js/sloppy-mode/format.test.js @@ -0,0 +1,13 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + flow: ["function-declaration-in-while.js"], + hermes: [ + "eval-arguments.js", + "labeled-function-declaration.js", + "function-declaration-in-while.js", + ], + acorn: ["function-declaration-in-while.js"], + espree: ["function-declaration-in-while.js"], + meriyah: ["function-declaration-in-while.js"], + }, +}); diff --git a/tests/format/js/sloppy-mode/jsfmt.spec.js b/tests/format/js/sloppy-mode/jsfmt.spec.js deleted file mode 100644 index ef07b97b2960..000000000000 --- a/tests/format/js/sloppy-mode/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { - flow: ["function-declaration-in-while.js"], - acorn: ["function-declaration-in-while.js"], - espree: ["function-declaration-in-while.js"], - meriyah: ["function-declaration-in-while.js"], - }, -}); diff --git a/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap b/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..18b7ac2c40d9 --- /dev/null +++ b/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap @@ -0,0 +1,337 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`default-binding.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source from "x"; + +=====================================output===================================== +import source from "x"; + +================================================================================ +`; + +exports[`import-source.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source x from "x"; + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`import-source.js [espree] format 1`] = ` +"Unexpected token x (1:15) +> 1 | import source x from "x"; + | ^ + 2 | +Cause: Unexpected token x" +`; + +exports[`import-source.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source x from "x"; + | ^ + 2 | +Cause: [1:14-1:15]: Expected 'from'" +`; + +exports[`import-source.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source x from "x"; + +=====================================output===================================== +import source x from "x"; + +================================================================================ +`; + +exports[`import-source-attributes-declaration.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source s from "x" with { attr: "val" }; + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`import-source-attributes-declaration.js [espree] format 1`] = ` +"Unexpected token s (1:15) +> 1 | import source s from "x" with { attr: "val" }; + | ^ + 2 | +Cause: Unexpected token s" +`; + +exports[`import-source-attributes-declaration.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source s from "x" with { attr: "val" }; + | ^ + 2 | +Cause: [1:14-1:15]: Expected 'from'" +`; + +exports[`import-source-attributes-declaration.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source s from "x" with { attr: "val" }; + +=====================================output===================================== +import source s from "x" with { attr: "val" }; + +================================================================================ +`; + +exports[`import-source-attributes-expression.js [acorn] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("x", { with: { attr: "val" } }); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" +`; + +exports[`import-source-attributes-expression.js [espree] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("x", { with: { attr: "val" } }); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-source-attributes-expression.js [meriyah] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("x", { with: { attr: "val" } }); + | ^^^^^^ + 2 | +Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-source-attributes-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import.source("x", { with: { attr: "val" } }); + +=====================================output===================================== +import.source("x", { with: { attr: "val" } }); + +================================================================================ +`; + +exports[`import-source-binding-from.js [acorn] format 1`] = ` +"Unexpected token (1:20) +> 1 | import source from from "x"; + | ^ + 2 | +Cause: Unexpected token (1:19)" +`; + +exports[`import-source-binding-from.js [espree] format 1`] = ` +"Unexpected token from (1:20) +> 1 | import source from from "x"; + | ^ + 2 | +Cause: Unexpected token from" +`; + +exports[`import-source-binding-from.js [meriyah] format 1`] = ` +"Import source must be string (1:20) +> 1 | import source from from "x"; + | ^^^^ + 2 | +Cause: [1:19-1:23]: Import source must be string" +`; + +exports[`import-source-binding-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source from from "x"; + +=====================================output===================================== +import source from from "x"; + +================================================================================ +`; + +exports[`import-source-binding-source.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source source from "x"; + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`import-source-binding-source.js [espree] format 1`] = ` +"Unexpected token source (1:15) +> 1 | import source source from "x"; + | ^ + 2 | +Cause: Unexpected token source" +`; + +exports[`import-source-binding-source.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source source from "x"; + | ^^^^^^ + 2 | +Cause: [1:14-1:20]: Expected 'from'" +`; + +exports[`import-source-binding-source.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import source source from "x"; + +=====================================output===================================== +import source source from "x"; + +================================================================================ +`; + +exports[`import-source-dynamic-import.js [acorn] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("foo"); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" +`; + +exports[`import-source-dynamic-import.js [espree] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("foo"); + | ^ + 2 | +Cause: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-source-dynamic-import.js [meriyah] format 1`] = ` +"The only valid meta property for import is 'import.meta' (1:8) +> 1 | import.source("foo"); + | ^^^^^^ + 2 | +Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'" +`; + +exports[`import-source-dynamic-import.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import.source("foo"); + +=====================================output===================================== +import.source("foo"); + +================================================================================ +`; + +exports[`no-named.js [__babel_estree] format 1`] = ` +"Only \`import source x from "./module"\` is valid. (1:17) +> 1 | import source { x } from "x"; + | ^ + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:16)" +`; + +exports[`no-named.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source { x } from "x"; + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`no-named.js [babel] format 1`] = ` +"Only \`import source x from "./module"\` is valid. (1:17) +> 1 | import source { x } from "x"; + | ^ + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:16)" +`; + +exports[`no-named.js [espree] format 1`] = ` +"Unexpected token { (1:15) +> 1 | import source { x } from "x"; + | ^ + 2 | +Cause: Unexpected token {" +`; + +exports[`no-named.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source { x } from "x"; + | ^ + 2 | +Cause: [1:14-1:15]: Expected 'from'" +`; + +exports[`no-named.js [oxc] format 1`] = ` +"Expected \`from\` but found \`{\` (1:15) +> 1 | import source { x } from "x"; + | ^ + 2 |" +`; + +exports[`no-namespace.js [__babel_estree] format 1`] = ` +"Only \`import source x from "./module"\` is valid. (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:14)" +`; + +exports[`no-namespace.js [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`no-namespace.js [babel] format 1`] = ` +"Only \`import source x from "./module"\` is valid. (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:14)" +`; + +exports[`no-namespace.js [espree] format 1`] = ` +"Unexpected token * (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 | +Cause: Unexpected token *" +`; + +exports[`no-namespace.js [meriyah] format 1`] = ` +"Expected 'from' (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 | +Cause: [1:14-1:15]: Expected 'from'" +`; + +exports[`no-namespace.js [oxc] format 1`] = ` +"Expected \`from\` but found \`*\` (1:15) +> 1 | import source * as x from "x"; + | ^ + 2 |" +`; diff --git a/tests/format/js/source-phase-imports/default-binding.js b/tests/format/js/source-phase-imports/default-binding.js new file mode 100644 index 000000000000..a88842d5eaf7 --- /dev/null +++ b/tests/format/js/source-phase-imports/default-binding.js @@ -0,0 +1 @@ +import source from "x"; diff --git a/tests/format/js/source-phase-imports/format.test.js b/tests/format/js/source-phase-imports/format.test.js new file mode 100644 index 000000000000..a02532b70b66 --- /dev/null +++ b/tests/format/js/source-phase-imports/format.test.js @@ -0,0 +1,21 @@ +const importSourceTests = [ + "import-source-attributes-declaration.js", + "import-source-attributes-expression.js", + "import-source-binding-from.js", + "import-source-binding-source.js", + "import-source-dynamic-import.js", + "import-source.js", +]; +const invalidSyntaxTests = ["no-namespace.js", "no-named.js"]; + +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: [...importSourceTests, ...invalidSyntaxTests], + espree: [...importSourceTests, ...invalidSyntaxTests], + meriyah: [...importSourceTests, ...invalidSyntaxTests], + oxc: invalidSyntaxTests, + "oxc-ts": invalidSyntaxTests, + babel: invalidSyntaxTests, + __babel_estree: invalidSyntaxTests, + }, +}); diff --git a/tests/format/js/source-phase-imports/import-source-attributes-declaration.js b/tests/format/js/source-phase-imports/import-source-attributes-declaration.js new file mode 100644 index 000000000000..d2b020b592ef --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source-attributes-declaration.js @@ -0,0 +1 @@ +import source s from "x" with { attr: "val" }; diff --git a/tests/format/js/source-phase-imports/import-source-attributes-expression.js b/tests/format/js/source-phase-imports/import-source-attributes-expression.js new file mode 100644 index 000000000000..329aa1d6c1d9 --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source-attributes-expression.js @@ -0,0 +1 @@ +import.source("x", { with: { attr: "val" } }); diff --git a/tests/format/js/source-phase-imports/import-source-binding-from.js b/tests/format/js/source-phase-imports/import-source-binding-from.js new file mode 100644 index 000000000000..a5c6af299fd3 --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source-binding-from.js @@ -0,0 +1 @@ +import source from from "x"; diff --git a/tests/format/js/source-phase-imports/import-source-binding-source.js b/tests/format/js/source-phase-imports/import-source-binding-source.js new file mode 100644 index 000000000000..426fb0a9af3a --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source-binding-source.js @@ -0,0 +1 @@ +import source source from "x"; diff --git a/tests/format/js/source-phase-imports/import-source-dynamic-import.js b/tests/format/js/source-phase-imports/import-source-dynamic-import.js new file mode 100644 index 000000000000..05a55445808c --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source-dynamic-import.js @@ -0,0 +1 @@ +import.source("foo"); diff --git a/tests/format/js/source-phase-imports/import-source.js b/tests/format/js/source-phase-imports/import-source.js new file mode 100644 index 000000000000..6cfa837a5768 --- /dev/null +++ b/tests/format/js/source-phase-imports/import-source.js @@ -0,0 +1 @@ +import source x from "x"; diff --git a/tests/format/js/source-phase-imports/no-named.js b/tests/format/js/source-phase-imports/no-named.js new file mode 100644 index 000000000000..1cd5d593cf97 --- /dev/null +++ b/tests/format/js/source-phase-imports/no-named.js @@ -0,0 +1 @@ +import source { x } from "x"; diff --git a/tests/format/js/source-phase-imports/no-namespace.js b/tests/format/js/source-phase-imports/no-namespace.js new file mode 100644 index 000000000000..185a8b107161 --- /dev/null +++ b/tests/format/js/source-phase-imports/no-namespace.js @@ -0,0 +1 @@ +import source * as x from "x"; diff --git a/tests/format/js/spread/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/spread/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/spread/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/spread/__snapshots__/format.test.js.snap diff --git a/tests/format/js/spread/format.test.js b/tests/format/js/spread/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/spread/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/spread/jsfmt.spec.js b/tests/format/js/spread/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/spread/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/strings/__snapshots__/format.test.js.snap b/tests/format/js/strings/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..843046f41641 --- /dev/null +++ b/tests/format/js/strings/__snapshots__/format.test.js.snap @@ -0,0 +1,805 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`escaped.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg('That\\'s all we know'); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_3 = + goog.getMsg("That\\'s all we know"); + +=====================================output===================================== +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_3 = goog.getMsg( + "That\\'s all we know", +); + +================================================================================ +`; + +exports[`escaped.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg('That\\'s all we know'); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_3 = + goog.getMsg("That\\'s all we know"); + +=====================================output===================================== +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_3 = goog.getMsg( + "That\\'s all we know" +); + +================================================================================ +`; + +exports[`multiline-literal.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/pull/13274 + +const loremIpsumFooBazBar1 = 'Multiline string\\ + Multiline string\\ +' + +const loremIpsumFooBazBar2 = 'Multiline string\\ + Multiline string\\ + Multiline string' + +=====================================output===================================== +// https://github.com/prettier/prettier/pull/13274 + +const loremIpsumFooBazBar1 = + "Multiline string\\ + Multiline string\\ +"; + +const loremIpsumFooBazBar2 = + "Multiline string\\ + Multiline string\\ + Multiline string"; + +================================================================================ +`; + +exports[`multiline-literal.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/pull/13274 + +const loremIpsumFooBazBar1 = 'Multiline string\\ + Multiline string\\ +' + +const loremIpsumFooBazBar2 = 'Multiline string\\ + Multiline string\\ + Multiline string' + +=====================================output===================================== +// https://github.com/prettier/prettier/pull/13274 + +const loremIpsumFooBazBar1 = + "Multiline string\\ + Multiline string\\ +"; + +const loremIpsumFooBazBar2 = + "Multiline string\\ + Multiline string\\ + Multiline string"; + +================================================================================ +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = ` +"Invalid escape sequence (3:3) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence (3:2)" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = ` +"Invalid escape sequence (3:3) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [meriyah] format 1`] = ` +"Escapes \\8 or \\9 are not syntactically valid escapes (3:1) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11852 + +"\\8","\\9"; +() => { + "use strict"; + "\\8", "\\9"; +} + +=====================================output===================================== +// https://github.com/babel/babel/pull/11852 + +("\\8", "\\9"); +() => { + "use strict"; + ("\\8", "\\9"); +}; + +================================================================================ +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1`] = ` +"Invalid escape sequence (3:3) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence (3:2)" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1`] = ` +"Invalid escape sequence (3:3) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [meriyah] format 1`] = ` +"Escapes \\8 or \\9 are not syntactically valid escapes (3:1) + 1 | // https://github.com/babel/babel/pull/11852 + 2 | +> 3 | "\\8","\\9"; + | ^^ + 4 | () => { + 5 | "use strict"; + 6 | "\\8", "\\9"; +Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes" +`; + +exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11852 + +"\\8","\\9"; +() => { + "use strict"; + "\\8", "\\9"; +} + +=====================================output===================================== +// https://github.com/babel/babel/pull/11852 + +("\\8", "\\9"); +() => { + "use strict"; + ("\\8", "\\9"); +}; + +================================================================================ +`; + +exports[`strings.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + "abc", + 'abc', + + '\\'', + + '"', + '\\"', + '\\\\"', + + "'", + "\\'", + "\\\\'", + + "'\\"", + '\\'"', + + '\\\\', + "\\\\", + + '\\0', + '🐶', + + '\\uD801\\uDC28', +]; + +=====================================output===================================== +[ + "abc", + "abc", + + "'", + + '"', + '\\"', + '\\\\"', + + "'", + "\\'", + "\\\\'", + + "'\\"", + "'\\"", + + "\\\\", + "\\\\", + + "\\0", + "🐶", + + "\\uD801\\uDC28", +]; + +================================================================================ +`; + +exports[`strings.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + "abc", + 'abc', + + '\\'', + + '"', + '\\"', + '\\\\"', + + "'", + "\\'", + "\\\\'", + + "'\\"", + '\\'"', + + '\\\\', + "\\\\", + + '\\0', + '🐶', + + '\\uD801\\uDC28', +]; + +=====================================output===================================== +[ + "abc", + "abc", + + "'", + + '"', + '\\"', + '\\\\"', + + "'", + "\\'", + "\\\\'", + + "'\\"", + "'\\"", + + "\\\\", + "\\\\", + + "\\0", + "🐶", + + "\\uD801\\uDC28", +]; + +================================================================================ +`; + +exports[`template-literals.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); + +const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; + +foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() { + const x = 5; + + return x; + })() + 3 + 2 + 3 + 2 + 3 } with expr\`); + +pipe.write( + \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\`, +); + +// https://github.com/prettier/prettier/issues/1662#issue-230406820 +const content = \` +const env = \${ JSON.stringify({ + assetsRootUrl: env.assetsRootUrl, + env: env.env, + role: "client", + adsfafa: "sdfsdff", + asdfasff: "wefwefw", + fefef: "sf sdfs fdsfdsf s dfsfds" +}, null, "\\t") }); +\`; + +// https://github.com/prettier/prettier/issues/821#issue-210557749 +f(\`\${{ + a: 4, + b: 9, +}}\`); + +// https://github.com/prettier/prettier/issues/1183#issue-220863505 +const makeBody = (store, assets, html) => + \`<!doctype html>\${ + ReactDOMServer.renderToStaticMarkup( + <Html + headScripts={compact([ assets.javascript.head ])} + headStyles={compact([ assets.styles.body, assets.styles.head ])} + bodyScripts={compact([ assets.javascript.body ])} + bodyStyles={[]} + stringScripts={[ + \`window.__INITIAL_STATE__ = \${ + JSON.stringify(store.getState(), null, 2) + };\`, + ]} + content={[ + { id: 'app-container', dangerouslySetInnerHTML: { __html: html } }, + ]} + /> + ) + }\` + +// https://github.com/prettier/prettier/issues/1626#issue-229655106 +const Bar = styled.div\` + color: \${props => (props.highlight.length > 0 ? palette(['text', 'dark', 'tertiary'])(props) : palette(['text', 'dark', 'primary'])(props))} !important; +\` + +// https://github.com/prettier/prettier/issues/3368 +let message = \`this is a long message which contains an interpolation: \${format(data)} <- like this\`; + +let otherMessage = \`this template contains two interpolations: \${this(one)}, which should be kept on its line, +and this other one: \${ + this(long.placeholder.text.goes.here.so.we.get.a.linebreak) +} +which already had a linebreak so can be broken up +\`; + +// https://github.com/prettier/prettier/issues/16114 +message = \`this is a long messsage a simple interpolation without a linebreak \${foo} <- like this\`; + +message = \`whereas this messsage has a linebreak in the interpolation \${ + foo} <- like this\`; + +=====================================output===================================== +foo( + \`a long string \${1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3} with expr\`, +); + +const x = \`a long string \${ + 1 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + (function () { + return 3; + })() + + 3 + + 2 + + 3 + + 2 + + 3 +} with expr\`; + +foo( + \`a long string \${ + 1 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + (function () { + const x = 5; + + return x; + })() + + 3 + + 2 + + 3 + + 2 + + 3 + } with expr\`, +); + +pipe.write( + \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\`, +); + +// https://github.com/prettier/prettier/issues/1662#issue-230406820 +const content = \` +const env = \${JSON.stringify( + { + assetsRootUrl: env.assetsRootUrl, + env: env.env, + role: "client", + adsfafa: "sdfsdff", + asdfasff: "wefwefw", + fefef: "sf sdfs fdsfdsf s dfsfds", + }, + null, + "\\t", +)}); +\`; + +// https://github.com/prettier/prettier/issues/821#issue-210557749 +f( + \`\${{ + a: 4, + b: 9, + }}\`, +); + +// https://github.com/prettier/prettier/issues/1183#issue-220863505 +const makeBody = (store, assets, html) => + \`<!doctype html>\${ReactDOMServer.renderToStaticMarkup( + <Html + headScripts={compact([assets.javascript.head])} + headStyles={compact([assets.styles.body, assets.styles.head])} + bodyScripts={compact([assets.javascript.body])} + bodyStyles={[]} + stringScripts={[ + \`window.__INITIAL_STATE__ = \${JSON.stringify( + store.getState(), + null, + 2, + )};\`, + ]} + content={[ + { id: "app-container", dangerouslySetInnerHTML: { __html: html } }, + ]} + />, + )}\`; + +// https://github.com/prettier/prettier/issues/1626#issue-229655106 +const Bar = styled.div\` + color: \${(props) => + props.highlight.length > 0 + ? palette(["text", "dark", "tertiary"])(props) + : palette(["text", "dark", "primary"])(props)} !important; +\`; + +// https://github.com/prettier/prettier/issues/3368 +let message = \`this is a long message which contains an interpolation: \${format(data)} <- like this\`; + +let otherMessage = \`this template contains two interpolations: \${this(one)}, which should be kept on its line, +and this other one: \${this( + long.placeholder.text.goes.here.so.we.get.a.linebreak, +)} +which already had a linebreak so can be broken up +\`; + +// https://github.com/prettier/prettier/issues/16114 +message = \`this is a long messsage a simple interpolation without a linebreak \${foo} <- like this\`; + +message = \`whereas this messsage has a linebreak in the interpolation \${ + foo +} <- like this\`; + +================================================================================ +`; + +exports[`template-literals.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); + +const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; + +foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() { + const x = 5; + + return x; + })() + 3 + 2 + 3 + 2 + 3 } with expr\`); + +pipe.write( + \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\`, +); + +// https://github.com/prettier/prettier/issues/1662#issue-230406820 +const content = \` +const env = \${ JSON.stringify({ + assetsRootUrl: env.assetsRootUrl, + env: env.env, + role: "client", + adsfafa: "sdfsdff", + asdfasff: "wefwefw", + fefef: "sf sdfs fdsfdsf s dfsfds" +}, null, "\\t") }); +\`; + +// https://github.com/prettier/prettier/issues/821#issue-210557749 +f(\`\${{ + a: 4, + b: 9, +}}\`); + +// https://github.com/prettier/prettier/issues/1183#issue-220863505 +const makeBody = (store, assets, html) => + \`<!doctype html>\${ + ReactDOMServer.renderToStaticMarkup( + <Html + headScripts={compact([ assets.javascript.head ])} + headStyles={compact([ assets.styles.body, assets.styles.head ])} + bodyScripts={compact([ assets.javascript.body ])} + bodyStyles={[]} + stringScripts={[ + \`window.__INITIAL_STATE__ = \${ + JSON.stringify(store.getState(), null, 2) + };\`, + ]} + content={[ + { id: 'app-container', dangerouslySetInnerHTML: { __html: html } }, + ]} + /> + ) + }\` + +// https://github.com/prettier/prettier/issues/1626#issue-229655106 +const Bar = styled.div\` + color: \${props => (props.highlight.length > 0 ? palette(['text', 'dark', 'tertiary'])(props) : palette(['text', 'dark', 'primary'])(props))} !important; +\` + +// https://github.com/prettier/prettier/issues/3368 +let message = \`this is a long message which contains an interpolation: \${format(data)} <- like this\`; + +let otherMessage = \`this template contains two interpolations: \${this(one)}, which should be kept on its line, +and this other one: \${ + this(long.placeholder.text.goes.here.so.we.get.a.linebreak) +} +which already had a linebreak so can be broken up +\`; + +// https://github.com/prettier/prettier/issues/16114 +message = \`this is a long messsage a simple interpolation without a linebreak \${foo} <- like this\`; + +message = \`whereas this messsage has a linebreak in the interpolation \${ + foo} <- like this\`; + +=====================================output===================================== +foo( + \`a long string \${1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3} with expr\` +); + +const x = \`a long string \${ + 1 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + (function () { + return 3; + })() + + 3 + + 2 + + 3 + + 2 + + 3 +} with expr\`; + +foo( + \`a long string \${ + 1 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + 3 + + 2 + + (function () { + const x = 5; + + return x; + })() + + 3 + + 2 + + 3 + + 2 + + 3 + } with expr\` +); + +pipe.write( + \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\` +); + +// https://github.com/prettier/prettier/issues/1662#issue-230406820 +const content = \` +const env = \${JSON.stringify( + { + assetsRootUrl: env.assetsRootUrl, + env: env.env, + role: "client", + adsfafa: "sdfsdff", + asdfasff: "wefwefw", + fefef: "sf sdfs fdsfdsf s dfsfds", + }, + null, + "\\t" +)}); +\`; + +// https://github.com/prettier/prettier/issues/821#issue-210557749 +f( + \`\${{ + a: 4, + b: 9, + }}\` +); + +// https://github.com/prettier/prettier/issues/1183#issue-220863505 +const makeBody = (store, assets, html) => + \`<!doctype html>\${ReactDOMServer.renderToStaticMarkup( + <Html + headScripts={compact([assets.javascript.head])} + headStyles={compact([assets.styles.body, assets.styles.head])} + bodyScripts={compact([assets.javascript.body])} + bodyStyles={[]} + stringScripts={[ + \`window.__INITIAL_STATE__ = \${JSON.stringify( + store.getState(), + null, + 2 + )};\`, + ]} + content={[ + { id: "app-container", dangerouslySetInnerHTML: { __html: html } }, + ]} + /> + )}\`; + +// https://github.com/prettier/prettier/issues/1626#issue-229655106 +const Bar = styled.div\` + color: \${(props) => + props.highlight.length > 0 + ? palette(["text", "dark", "tertiary"])(props) + : palette(["text", "dark", "primary"])(props)} !important; +\`; + +// https://github.com/prettier/prettier/issues/3368 +let message = \`this is a long message which contains an interpolation: \${format(data)} <- like this\`; + +let otherMessage = \`this template contains two interpolations: \${this(one)}, which should be kept on its line, +and this other one: \${this( + long.placeholder.text.goes.here.so.we.get.a.linebreak +)} +which already had a linebreak so can be broken up +\`; + +// https://github.com/prettier/prettier/issues/16114 +message = \`this is a long messsage a simple interpolation without a linebreak \${foo} <- like this\`; + +message = \`whereas this messsage has a linebreak in the interpolation \${ + foo +} <- like this\`; + +================================================================================ +`; diff --git a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9dead44561d5..000000000000 --- a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,655 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`multiline-literal.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = 'Multiline string\\ - Multiline string\\ -' - -const loremIpsumFooBazBar2 = 'Multiline string\\ - Multiline string\\ - Multiline string' - -=====================================output===================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = - "Multiline string\\ - Multiline string\\ -"; - -const loremIpsumFooBazBar2 = - "Multiline string\\ - Multiline string\\ - Multiline string"; - -================================================================================ -`; - -exports[`multiline-literal.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = 'Multiline string\\ - Multiline string\\ -' - -const loremIpsumFooBazBar2 = 'Multiline string\\ - Multiline string\\ - Multiline string' - -=====================================output===================================== -// https://github.com/prettier/prettier/pull/13274 - -const loremIpsumFooBazBar1 = - "Multiline string\\ - Multiline string\\ -"; - -const loremIpsumFooBazBar2 = - "Multiline string\\ - Multiline string\\ - Multiline string"; - -================================================================================ -`; - -exports[`non-octal-eight-and-nine.js [acorn] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - -exports[`non-octal-eight-and-nine.js [espree] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - -exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - -exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = ` -"Invalid escape sequence (3:3) - 1 | // https://github.com/babel/babel/pull/11852 - 2 | -> 3 | "\\8","\\9"; - | ^ - 4 | () => { - 5 | "use strict"; - 6 | "\\8", "\\9";" -`; - -exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11852 - -"\\8","\\9"; -() => { - "use strict"; - "\\8", "\\9"; -} - -=====================================output===================================== -// https://github.com/babel/babel/pull/11852 - -"8", "9"; -() => { - "use strict"; - "8", "9"; -}; - -================================================================================ -`; - -exports[`non-octal-eight-and-nine.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11852 - -"\\8","\\9"; -() => { - "use strict"; - "\\8", "\\9"; -} - -=====================================output===================================== -// https://github.com/babel/babel/pull/11852 - -"8", "9"; -() => { - "use strict"; - "8", "9"; -}; - -================================================================================ -`; - -exports[`strings.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ - "abc", - 'abc', - - '\\'', - - '"', - '\\"', - '\\\\"', - - "'", - "\\'", - "\\\\'", - - "'\\"", - '\\'"', - - '\\\\', - "\\\\", - - '\\0', - '🐶', - - '\\uD801\\uDC28', -]; - -=====================================output===================================== -[ - "abc", - "abc", - - "'", - - '"', - '"', - '\\\\"', - - "'", - "'", - "\\\\'", - - "'\\"", - "'\\"", - - "\\\\", - "\\\\", - - "\\0", - "🐶", - - "\\uD801\\uDC28", -]; - -================================================================================ -`; - -exports[`strings.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - "abc", - 'abc', - - '\\'', - - '"', - '\\"', - '\\\\"', - - "'", - "\\'", - "\\\\'", - - "'\\"", - '\\'"', - - '\\\\', - "\\\\", - - '\\0', - '🐶', - - '\\uD801\\uDC28', -]; - -=====================================output===================================== -[ - "abc", - "abc", - - "'", - - '"', - '"', - '\\\\"', - - "'", - "'", - "\\\\'", - - "'\\"", - "'\\"", - - "\\\\", - "\\\\", - - "\\0", - "🐶", - - "\\uD801\\uDC28", -]; - -================================================================================ -`; - -exports[`template-literals.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); - -const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; - -foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() { - const x = 5; - - return x; - })() + 3 + 2 + 3 + 2 + 3 } with expr\`); - -pipe.write( - \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\`, -); - -// https://github.com/prettier/prettier/issues/1662#issue-230406820 -const content = \` -const env = \${ JSON.stringify({ - assetsRootUrl: env.assetsRootUrl, - env: env.env, - role: "client", - adsfafa: "sdfsdff", - asdfasff: "wefwefw", - fefef: "sf sdfs fdsfdsf s dfsfds" -}, null, "\\t") }); -\`; - -// https://github.com/prettier/prettier/issues/821#issue-210557749 -f(\`\${{ - a: 4, - b: 9, -}}\`); - -// https://github.com/prettier/prettier/issues/1183#issue-220863505 -const makeBody = (store, assets, html) => - \`<!doctype html>\${ - ReactDOMServer.renderToStaticMarkup( - <Html - headScripts={compact([ assets.javascript.head ])} - headStyles={compact([ assets.styles.body, assets.styles.head ])} - bodyScripts={compact([ assets.javascript.body ])} - bodyStyles={[]} - stringScripts={[ - \`window.__INITIAL_STATE__ = \${ - JSON.stringify(store.getState(), null, 2) - };\`, - ]} - content={[ - { id: 'app-container', dangerouslySetInnerHTML: { __html: html } }, - ]} - /> - ) - }\` - -// https://github.com/prettier/prettier/issues/1626#issue-229655106 -const Bar = styled.div\` - color: \${props => (props.highlight.length > 0 ? palette(['text', 'dark', 'tertiary'])(props) : palette(['text', 'dark', 'primary'])(props))} !important; -\` - -=====================================output===================================== -foo( - \`a long string \${ - 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 - } with expr\`, -); - -const x = \`a long string \${ - 1 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - (function () { - return 3; - })() + - 3 + - 2 + - 3 + - 2 + - 3 -} with expr\`; - -foo( - \`a long string \${ - 1 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - (function () { - const x = 5; - - return x; - })() + - 3 + - 2 + - 3 + - 2 + - 3 - } with expr\`, -); - -pipe.write( - \`\\n \${chalk.dim( - \`\\u203A and \${more} more \${more} more \${more} more \${more}\`, - )}\`, -); - -// https://github.com/prettier/prettier/issues/1662#issue-230406820 -const content = \` -const env = \${JSON.stringify( - { - assetsRootUrl: env.assetsRootUrl, - env: env.env, - role: "client", - adsfafa: "sdfsdff", - asdfasff: "wefwefw", - fefef: "sf sdfs fdsfdsf s dfsfds", - }, - null, - "\\t", -)}); -\`; - -// https://github.com/prettier/prettier/issues/821#issue-210557749 -f( - \`\${{ - a: 4, - b: 9, - }}\`, -); - -// https://github.com/prettier/prettier/issues/1183#issue-220863505 -const makeBody = (store, assets, html) => - \`<!doctype html>\${ReactDOMServer.renderToStaticMarkup( - <Html - headScripts={compact([assets.javascript.head])} - headStyles={compact([assets.styles.body, assets.styles.head])} - bodyScripts={compact([assets.javascript.body])} - bodyStyles={[]} - stringScripts={[ - \`window.__INITIAL_STATE__ = \${JSON.stringify( - store.getState(), - null, - 2, - )};\`, - ]} - content={[ - { id: "app-container", dangerouslySetInnerHTML: { __html: html } }, - ]} - />, - )}\`; - -// https://github.com/prettier/prettier/issues/1626#issue-229655106 -const Bar = styled.div\` - color: \${(props) => - props.highlight.length > 0 - ? palette(["text", "dark", "tertiary"])(props) - : palette(["text", "dark", "primary"])(props)} !important; -\`; - -================================================================================ -`; - -exports[`template-literals.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); - -const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; - -foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() { - const x = 5; - - return x; - })() + 3 + 2 + 3 + 2 + 3 } with expr\`); - -pipe.write( - \`\\n \${chalk.dim(\`\\u203A and \${more} more \${more} more \${more} more \${more}\`)}\`, -); - -// https://github.com/prettier/prettier/issues/1662#issue-230406820 -const content = \` -const env = \${ JSON.stringify({ - assetsRootUrl: env.assetsRootUrl, - env: env.env, - role: "client", - adsfafa: "sdfsdff", - asdfasff: "wefwefw", - fefef: "sf sdfs fdsfdsf s dfsfds" -}, null, "\\t") }); -\`; - -// https://github.com/prettier/prettier/issues/821#issue-210557749 -f(\`\${{ - a: 4, - b: 9, -}}\`); - -// https://github.com/prettier/prettier/issues/1183#issue-220863505 -const makeBody = (store, assets, html) => - \`<!doctype html>\${ - ReactDOMServer.renderToStaticMarkup( - <Html - headScripts={compact([ assets.javascript.head ])} - headStyles={compact([ assets.styles.body, assets.styles.head ])} - bodyScripts={compact([ assets.javascript.body ])} - bodyStyles={[]} - stringScripts={[ - \`window.__INITIAL_STATE__ = \${ - JSON.stringify(store.getState(), null, 2) - };\`, - ]} - content={[ - { id: 'app-container', dangerouslySetInnerHTML: { __html: html } }, - ]} - /> - ) - }\` - -// https://github.com/prettier/prettier/issues/1626#issue-229655106 -const Bar = styled.div\` - color: \${props => (props.highlight.length > 0 ? palette(['text', 'dark', 'tertiary'])(props) : palette(['text', 'dark', 'primary'])(props))} !important; -\` - -=====================================output===================================== -foo( - \`a long string \${ - 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 - } with expr\` -); - -const x = \`a long string \${ - 1 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - (function () { - return 3; - })() + - 3 + - 2 + - 3 + - 2 + - 3 -} with expr\`; - -foo( - \`a long string \${ - 1 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - 3 + - 2 + - (function () { - const x = 5; - - return x; - })() + - 3 + - 2 + - 3 + - 2 + - 3 - } with expr\` -); - -pipe.write( - \`\\n \${chalk.dim( - \`\\u203A and \${more} more \${more} more \${more} more \${more}\` - )}\` -); - -// https://github.com/prettier/prettier/issues/1662#issue-230406820 -const content = \` -const env = \${JSON.stringify( - { - assetsRootUrl: env.assetsRootUrl, - env: env.env, - role: "client", - adsfafa: "sdfsdff", - asdfasff: "wefwefw", - fefef: "sf sdfs fdsfdsf s dfsfds", - }, - null, - "\\t" -)}); -\`; - -// https://github.com/prettier/prettier/issues/821#issue-210557749 -f( - \`\${{ - a: 4, - b: 9, - }}\` -); - -// https://github.com/prettier/prettier/issues/1183#issue-220863505 -const makeBody = (store, assets, html) => - \`<!doctype html>\${ReactDOMServer.renderToStaticMarkup( - <Html - headScripts={compact([assets.javascript.head])} - headStyles={compact([assets.styles.body, assets.styles.head])} - bodyScripts={compact([assets.javascript.body])} - bodyStyles={[]} - stringScripts={[ - \`window.__INITIAL_STATE__ = \${JSON.stringify( - store.getState(), - null, - 2 - )};\`, - ]} - content={[ - { id: "app-container", dangerouslySetInnerHTML: { __html: html } }, - ]} - /> - )}\`; - -// https://github.com/prettier/prettier/issues/1626#issue-229655106 -const Bar = styled.div\` - color: \${(props) => - props.highlight.length > 0 - ? palette(["text", "dark", "tertiary"])(props) - : palette(["text", "dark", "primary"])(props)} !important; -\`; - -================================================================================ -`; diff --git a/tests/format/js/strings/escaped.js b/tests/format/js/strings/escaped.js new file mode 100644 index 000000000000..b2d2b1baf755 --- /dev/null +++ b/tests/format/js/strings/escaped.js @@ -0,0 +1,8 @@ +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg('That\'s all we know'); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_3 = + goog.getMsg("That\'s all we know"); diff --git a/tests/format/js/strings/format.test.js b/tests/format/js/strings/format.test.js new file mode 100644 index 000000000000..462c91638cd9 --- /dev/null +++ b/tests/format/js/strings/format.test.js @@ -0,0 +1,16 @@ +runFormatTest(import.meta, ["babel", "flow"], { + trailingComma: "es5", + errors: { + acorn: ["non-octal-eight-and-nine.js"], + espree: ["non-octal-eight-and-nine.js"], + meriyah: ["non-octal-eight-and-nine.js"], + }, +}); +runFormatTest(import.meta, ["babel", "flow"], { + trailingComma: "all", + errors: { + acorn: ["non-octal-eight-and-nine.js"], + espree: ["non-octal-eight-and-nine.js"], + meriyah: ["non-octal-eight-and-nine.js"], + }, +}); diff --git a/tests/format/js/strings/jsfmt.spec.js b/tests/format/js/strings/jsfmt.spec.js deleted file mode 100644 index d9119885f821..000000000000 --- a/tests/format/js/strings/jsfmt.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -run_spec(__dirname, ["babel", "flow"], { - errors: { - acorn: ["non-octal-eight-and-nine.js"], - espree: ["non-octal-eight-and-nine.js"], - }, -}); -run_spec(__dirname, ["babel", "flow"], { - trailingComma: "all", - errors: { - acorn: ["non-octal-eight-and-nine.js"], - espree: ["non-octal-eight-and-nine.js"], - }, -}); diff --git a/tests/format/js/strings/template-literals.js b/tests/format/js/strings/template-literals.js index 424ab7ac700e..d7c9e71eba7e 100644 --- a/tests/format/js/strings/template-literals.js +++ b/tests/format/js/strings/template-literals.js @@ -55,3 +55,19 @@ const makeBody = (store, assets, html) => const Bar = styled.div` color: ${props => (props.highlight.length > 0 ? palette(['text', 'dark', 'tertiary'])(props) : palette(['text', 'dark', 'primary'])(props))} !important; ` + +// https://github.com/prettier/prettier/issues/3368 +let message = `this is a long message which contains an interpolation: ${format(data)} <- like this`; + +let otherMessage = `this template contains two interpolations: ${this(one)}, which should be kept on its line, +and this other one: ${ + this(long.placeholder.text.goes.here.so.we.get.a.linebreak) +} +which already had a linebreak so can be broken up +`; + +// https://github.com/prettier/prettier/issues/16114 +message = `this is a long messsage a simple interpolation without a linebreak ${foo} <- like this`; + +message = `whereas this messsage has a linebreak in the interpolation ${ + foo} <- like this`; diff --git a/tests/format/js/switch/__snapshots__/format.test.js.snap b/tests/format/js/switch/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..db04e2432c11 --- /dev/null +++ b/tests/format/js/switch/__snapshots__/format.test.js.snap @@ -0,0 +1,484 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (true) { + case true: + // Good luck getting here + + case false: +} + +switch (true) { + case true: + + // Good luck getting here + case false: +} + +switch(x) { + case x: { + } + + // other + + case y: { + } +} + +switch(x) { + default: // comment + break; +} + +switch(x) { + default: // comment + {break;} +} + +switch(x) { + default: {// comment + break;} +} + +switch(x) { + default: /* comment */ + break; +} + +switch(x) { + default: /* comment */ + {break;} +} + +switch(x) { + default: {/* comment */ + break;} +} + +switch(x) { + default: /* comment */ { + break;} +} + +=====================================output===================================== +switch (true) { + case true: + // Good luck getting here + + case false: +} + +switch (true) { + case true: + + // Good luck getting here + case false: +} + +switch (x) { + case x: { + } + + // other + + case y: { + } +} + +switch (x) { + default: // comment + break; +} + +switch (x) { + default: { + // comment + break; + } +} + +switch (x) { + default: { + // comment + break; + } +} + +switch (x) { + default: /* comment */ + break; +} + +switch (x) { + default: /* comment */ { + break; + } +} + +switch (x) { + default: { + /* comment */ + break; + } +} + +switch (x) { + default: /* comment */ { + break; + } +} + +================================================================================ +`; + +exports[`comments2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch(1){default: // comment1 +} + +switch(2){default: // comment2 +//comment2a +} + +switch(3){default: // comment3 +break;// comment3a +} + +switch(4){default: // comment4 +// comment4a +break;// comment4b +} + +switch(5){default: // comment5 +// comment5a +foo();bar();//comment5b +break;// comment5c +} + +=====================================output===================================== +switch (1) { + default: // comment1 +} + +switch (2) { + default: // comment2 + //comment2a +} + +switch (3) { + default: // comment3 + break; // comment3a +} + +switch (4) { + default: // comment4 + // comment4a + break; // comment4b +} + +switch (5) { + default: // comment5 + // comment5a + foo(); + bar(); //comment5b + break; // comment5c +} + +================================================================================ +`; + +exports[`empty_lines.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (foo) { + + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); + +} + +switch (foo) { + case "bar": + doSomething(); + + + + case "baz": + doOtherThing(); +} + +switch (x) { + case y: + call(); + + break; + + case z: + call(); + + break; +} + +switch (a) { + case b: + if (1) {}; + c; +} + +switch (a) { + case x: + case y: + call(); + + case z: + call(); +} + +switch (a) { + case x: case y: + call(); + + case z: + call(); +} + +=====================================output===================================== +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (foo) { + case "bar": + doSomething(); + + case "baz": + doOtherThing(); +} + +switch (x) { + case y: + call(); + + break; + + case z: + call(); + + break; +} + +switch (a) { + case b: + if (1) { + } + c; +} + +switch (a) { + case x: + case y: + call(); + + case z: + call(); +} + +switch (a) { + case x: + case y: + call(); + + case z: + call(); +} + +================================================================================ +`; + +exports[`empty_statement.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (error.code) { + case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { + nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again."); + }; +} + +=====================================output===================================== +switch (error.code) { + case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { + nls.localize( + "errorInvalidConfiguration", + "Unable to write into settings. Correct errors/warnings in the file and try again.", + ); + } +} + +================================================================================ +`; + +exports[`empty_switch.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (1) { default:; } +switch (1) {} + +=====================================output===================================== +switch (1) { + default: +} +switch (1) { +} + +================================================================================ +`; + +exports[`switch.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +switch (a) { + case 3: + alert( '3' ); + break; + case 4: + alert( '4' ); + break; + case 5: + alert( '5' ); + break; + default: + alert( 'default' ); +} + +switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) { + case 3: + alert( '3' ); + break; + default: + alert( 'default' ); +} + +switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong > veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) { + case 3: + alert( '3' ); + break; + default: + alert( 'default' ); +} + +switch ($veryLongAndVeryVerboseVariableName && $anotherVeryLongAndVeryVerboseVariableName) { +} + +switch ($longButSlightlyShorterVariableName && $anotherSlightlyShorterVariableName) { +} + +=====================================output===================================== +switch (a) { + case 3: + alert("3"); + break; + case 4: + alert("4"); + break; + case 5: + alert("5"); + break; + default: + alert("default"); +} + +switch ( + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong +) { + case 3: + alert("3"); + break; + default: + alert("default"); +} + +switch ( + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong > + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong +) { + case 3: + alert("3"); + break; + default: + alert("default"); +} + +switch ( + $veryLongAndVeryVerboseVariableName && + $anotherVeryLongAndVeryVerboseVariableName +) { +} + +switch ( + $longButSlightlyShorterVariableName && + $anotherSlightlyShorterVariableName +) { +} + +================================================================================ +`; diff --git a/tests/format/js/switch/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/switch/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a2a13868661b..000000000000 --- a/tests/format/js/switch/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,484 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (true) { - case true: - // Good luck getting here - - case false: -} - -switch (true) { - case true: - - // Good luck getting here - case false: -} - -switch(x) { - case x: { - } - - // other - - case y: { - } -} - -switch(x) { - default: // comment - break; -} - -switch(x) { - default: // comment - {break;} -} - -switch(x) { - default: {// comment - break;} -} - -switch(x) { - default: /* comment */ - break; -} - -switch(x) { - default: /* comment */ - {break;} -} - -switch(x) { - default: {/* comment */ - break;} -} - -switch(x) { - default: /* comment */ { - break;} -} - -=====================================output===================================== -switch (true) { - case true: - // Good luck getting here - - case false: -} - -switch (true) { - case true: - - // Good luck getting here - case false: -} - -switch (x) { - case x: { - } - - // other - - case y: { - } -} - -switch (x) { - default: // comment - break; -} - -switch (x) { - default: { - // comment - break; - } -} - -switch (x) { - default: { - // comment - break; - } -} - -switch (x) { - default: /* comment */ - break; -} - -switch (x) { - default: /* comment */ { - break; - } -} - -switch (x) { - default: { - /* comment */ - break; - } -} - -switch (x) { - default: /* comment */ { - break; - } -} - -================================================================================ -`; - -exports[`comments2.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch(1){default: // comment1 -} - -switch(2){default: // comment2 -//comment2a -} - -switch(3){default: // comment3 -break;// comment3a -} - -switch(4){default: // comment4 -// comment4a -break;// comment4b -} - -switch(5){default: // comment5 -// comment5a -foo();bar();//comment5b -break;// comment5c -} - -=====================================output===================================== -switch (1) { - default: // comment1 -} - -switch (2) { - default: // comment2 - //comment2a -} - -switch (3) { - default: // comment3 - break; // comment3a -} - -switch (4) { - default: // comment4 - // comment4a - break; // comment4b -} - -switch (5) { - default: // comment5 - // comment5a - foo(); - bar(); //comment5b - break; // comment5c -} - -================================================================================ -`; - -exports[`empty_lines.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (foo) { - - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); - -} - -switch (foo) { - case "bar": - doSomething(); - - - - case "baz": - doOtherThing(); -} - -switch (x) { - case y: - call(); - - break; - - case z: - call(); - - break; -} - -switch (a) { - case b: - if (1) {}; - c; -} - -switch (a) { - case x: - case y: - call(); - - case z: - call(); -} - -switch (a) { - case x: case y: - call(); - - case z: - call(); -} - -=====================================output===================================== -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (foo) { - case "bar": - doSomething(); - - case "baz": - doOtherThing(); -} - -switch (x) { - case y: - call(); - - break; - - case z: - call(); - - break; -} - -switch (a) { - case b: - if (1) { - } - c; -} - -switch (a) { - case x: - case y: - call(); - - case z: - call(); -} - -switch (a) { - case x: - case y: - call(); - - case z: - call(); -} - -================================================================================ -`; - -exports[`empty_statement.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (error.code) { - case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { - nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again."); - }; -} - -=====================================output===================================== -switch (error.code) { - case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { - nls.localize( - "errorInvalidConfiguration", - "Unable to write into settings. Correct errors/warnings in the file and try again." - ); - } -} - -================================================================================ -`; - -exports[`empty_switch.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (1) { default:; } -switch (1) {} - -=====================================output===================================== -switch (1) { - default: -} -switch (1) { -} - -================================================================================ -`; - -exports[`switch.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -switch (a) { - case 3: - alert( '3' ); - break; - case 4: - alert( '4' ); - break; - case 5: - alert( '5' ); - break; - default: - alert( 'default' ); -} - -switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) { - case 3: - alert( '3' ); - break; - default: - alert( 'default' ); -} - -switch (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong > veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong) { - case 3: - alert( '3' ); - break; - default: - alert( 'default' ); -} - -switch ($veryLongAndVeryVerboseVariableName && $anotherVeryLongAndVeryVerboseVariableName) { -} - -switch ($longButSlightlyShorterVariableName && $anotherSlightlyShorterVariableName) { -} - -=====================================output===================================== -switch (a) { - case 3: - alert("3"); - break; - case 4: - alert("4"); - break; - case 5: - alert("5"); - break; - default: - alert("default"); -} - -switch ( - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong -) { - case 3: - alert("3"); - break; - default: - alert("default"); -} - -switch ( - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong > - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong -) { - case 3: - alert("3"); - break; - default: - alert("default"); -} - -switch ( - $veryLongAndVeryVerboseVariableName && - $anotherVeryLongAndVeryVerboseVariableName -) { -} - -switch ( - $longButSlightlyShorterVariableName && - $anotherSlightlyShorterVariableName -) { -} - -================================================================================ -`; diff --git a/tests/format/js/switch/format.test.js b/tests/format/js/switch/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/switch/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/switch/jsfmt.spec.js b/tests/format/js/switch/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/switch/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/tab-width/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/tab-width/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/tab-width/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/tab-width/__snapshots__/format.test.js.snap diff --git a/tests/format/js/tab-width/format.test.js b/tests/format/js/tab-width/format.test.js new file mode 100644 index 000000000000..62e20977131c --- /dev/null +++ b/tests/format/js/tab-width/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { tabWidth: 4 }); diff --git a/tests/format/js/tab-width/jsfmt.spec.js b/tests/format/js/tab-width/jsfmt.spec.js deleted file mode 100644 index 9a4418bad375..000000000000 --- a/tests/format/js/tab-width/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { tabWidth: 4 }); diff --git a/tests/format/js/template-align/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/template-align/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/template-align/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/template-align/__snapshots__/format.test.js.snap diff --git a/tests/format/js/template-align/format.test.js b/tests/format/js/template-align/format.test.js new file mode 100644 index 000000000000..41a9a005a63b --- /dev/null +++ b/tests/format/js/template-align/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + useTabs: true, + tabWidth: 8, +}); diff --git a/tests/format/js/template-align/jsfmt.spec.js b/tests/format/js/template-align/jsfmt.spec.js deleted file mode 100644 index 01caa019286a..000000000000 --- a/tests/format/js/template-align/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { - useTabs: true, - tabWidth: 8, -}); diff --git a/tests/format/js/template-literals/__snapshots__/format.test.js.snap b/tests/format/js/template-literals/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d4470d98754e --- /dev/null +++ b/tests/format/js/template-literals/__snapshots__/format.test.js.snap @@ -0,0 +1,838 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`binary-exporessions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 | +2}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 & +2}\`; + +=====================================output===================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 | 2 +}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 & 2 +}\`; + +================================================================================ +`; + +exports[`conditional-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 ? 1 : 2 +}\`; + +=====================================output===================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 ? 1 : 2 +}\`; + +================================================================================ +`; + +exports[`css-prop.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function SomeComponent (props) { + // Create styles as if you're calling css and the class will be applied to the component + return (<div css={\` + color: blue; + font-size: 17 px; + + &:hover { + color: green; + } + + & .some-class { + font-size: 20px; + } + \`}> + This will be blue until hovered. + <div className="some-class"> + This font size will be 20px + </div> + </div>) +} + +const TestComponent = ({ children, ...props }) => ( + <div css={\`color: white; background: black\`}> + {children} + </div> +); + +=====================================output===================================== +function SomeComponent(props) { + // Create styles as if you're calling css and the class will be applied to the component + return ( + <div + css={\` + color: blue; + font-size: 17 px; + + &:hover { + color: green; + } + + & .some-class { + font-size: 20px; + } + \`} + > + This will be blue until hovered. + <div className="some-class">This font size will be 20px</div> + </div> + ); +} + +const TestComponent = ({ children, ...props }) => ( + <div + css={\` + color: white; + background: black; + \`} + > + {children} + </div> +); + +================================================================================ +`; + +exports[`expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const long1 = \`long \${a//comment + .b} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long long\`; +const long2 = \`long \${a.b.c.d.e} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long long\`; + +const long3 = \`long long long long long long long long long long long \${a.b.c.d.e} long long long long long long long long long long long long long\`; + +const description = + \`The value of the \${cssName} css of the \${this._name} element\`; + +const foo = \`such a long template string \${foo.bar.baz} that prettier will want to wrap it\`; + +const shouldWrapForNow = \`such a long template string \${foo().bar.baz} that prettier will want to wrap it\`; + +const shouldNotWrap = \`simple expressions should not break \${this} \${variable} \${a.b.c} \${this.b.c} \${a[b].c} \${a.b[c]} \${a.b['c']} \${a?.b?.c}\`; + +console.log(chalk.white(\`Covered Lines below threshold: \${coverageSettings.lines}%. Actual: \${coverageSummary.total.lines.pct}%\`)) + +x = \`mdl-textfield mdl-js-textfield \${className} \${content.length > 0 + ? 'is-dirty' + : ''} combo-box__input\` + +function testing() { + const p = {}; + // faking some tabs since I can't paste my real code in + if(true) { + if(false) { + return \`\${process.env.OPENID_URL}/something/something/something?\${Object.keys(p) + .map(k => \`\${encodeURIComponent(k)}=\${encodeURIComponent(p[k])}\`) + .join("&")}\`; + } + } +} + +console.log( + \`Trying update appcast for \${app.name} (\${app.cask.appcast}) -> (\${app.cask.appcastGenerated})\` +) + +console.log(\`brew cask audit --download \${_.map(definitions, 'caskName').join(' ')}\`) + +console.log(\`\\nApparently jetbrains changed the release artifact for \${app.name}@\${app.jetbrains.version}.\\n\`); + +descirbe('something', () => { + test(\`{pass: false} expect(\${small}).toBeGreaterThanOrEqual(\${big})\`, () => {}); +}) + +throw new Error(\`pretty-format: Option "theme" has a key "\${key}" whose value "\${value}" is undefined in ansi-styles.\`,) + +a = \`\${[[1, 2, 3], [4, 5, 6]]}\` + +=====================================output===================================== +const long1 = \`long \${ + a.b //comment +} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long long\`; +const long2 = \`long \${a.b.c.d.e} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long long\`; + +const long3 = \`long long long long long long long long long long long \${a.b.c.d.e} long long long long long long long long long long long long long\`; + +const description = \`The value of the \${cssName} css of the \${this._name} element\`; + +const foo = \`such a long template string \${foo.bar.baz} that prettier will want to wrap it\`; + +const shouldWrapForNow = \`such a long template string \${foo().bar.baz} that prettier will want to wrap it\`; + +const shouldNotWrap = \`simple expressions should not break \${this} \${variable} \${a.b.c} \${this.b.c} \${a[b].c} \${a.b[c]} \${a.b["c"]} \${a?.b?.c}\`; + +console.log( + chalk.white( + \`Covered Lines below threshold: \${coverageSettings.lines}%. Actual: \${coverageSummary.total.lines.pct}%\`, + ), +); + +x = \`mdl-textfield mdl-js-textfield \${className} \${ + content.length > 0 ? "is-dirty" : "" +} combo-box__input\`; + +function testing() { + const p = {}; + // faking some tabs since I can't paste my real code in + if (true) { + if (false) { + return \`\${process.env.OPENID_URL}/something/something/something?\${Object.keys( + p, + ) + .map((k) => \`\${encodeURIComponent(k)}=\${encodeURIComponent(p[k])}\`) + .join("&")}\`; + } + } +} + +console.log( + \`Trying update appcast for \${app.name} (\${app.cask.appcast}) -> (\${app.cask.appcastGenerated})\`, +); + +console.log( + \`brew cask audit --download \${_.map(definitions, "caskName").join(" ")}\`, +); + +console.log( + \`\\nApparently jetbrains changed the release artifact for \${app.name}@\${app.jetbrains.version}.\\n\`, +); + +descirbe("something", () => { + test(\`{pass: false} expect(\${small}).toBeGreaterThanOrEqual(\${big})\`, () => {}); +}); + +throw new Error( + \`pretty-format: Option "theme" has a key "\${key}" whose value "\${value}" is undefined in ansi-styles.\`, +); + +a = \`\${[ + [1, 2, 3], + [4, 5, 6], +]}\`; + +================================================================================ +`; + +exports[`indention.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, + \` + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, + \` + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + \`, +\` +# blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + +# blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} +\`, + \` + # blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + + # blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + \`, +] + +=====================================output===================================== +[ + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" \${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )} + \`, + \` +# blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + +# blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} +\`, + \` + # blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "\${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + + # blabla \${a} \${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + \`, +]; + +================================================================================ +`; + +exports[`logical-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 ?? +2}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 && +2}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 || +2}\`; + +=====================================output===================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 ?? 2 +}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 && 2 +}\`; +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ + 1 || 2 +}\`; + +================================================================================ +`; + +exports[`sequence-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${(1, 2)}\`; + +=====================================output===================================== +\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${(1, 2)}\`; + +================================================================================ +`; + +exports[`styled-components-with-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Button = styled.a\` +/* Comment */ + display: \${props=>props.display}; +\`; + +styled.div\` + display: \${props=>props.display}; + border: \${props=>props.border}px; + margin: 10px \${props=>props.border}px ; +\`; + +const EqualDivider = styled.div\` +margin: 0.5rem; + padding: 1rem; + background: papayawhip ; + + > * { + flex: 1; + + &:not(:first-child) { + \${props => props.vertical ? 'margin-top' : 'margin-left'}: 1rem; + } + } +\`; + +const header = css\` +.top-bar {background:black; +margin: 0; + position: fixed; + top: 0;left:0; + width: 100%; + text-align: center ; + padding: 15px 0 0 1em; + z-index: 9999; +} + +.top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0;right: 0; +} +\`; + +=====================================output===================================== +const Button = styled.a\` + /* Comment */ + display: \${(props) => props.display}; +\`; + +styled.div\` + display: \${(props) => props.display}; + border: \${(props) => props.border}px; + margin: 10px \${(props) => props.border}px; +\`; + +const EqualDivider = styled.div\` + margin: 0.5rem; + padding: 1rem; + background: papayawhip; + + > * { + flex: 1; + + &:not(:first-child) { + \${(props) => (props.vertical ? "margin-top" : "margin-left")}: 1rem; + } + } +\`; + +const header = css\` + .top-bar { + background: black; + margin: 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + text-align: center; + padding: 15px 0 0 1em; + z-index: 9999; + } + + .top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0; + right: 0; + } +\`; + +================================================================================ +`; + +exports[`styled-jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style jsx>{\` + /* a comment */ + div :global(.react-select) { + color: red; display: none + } +\`}</style>; + +<div> +<style jsx>{\` + /* a comment */ +div :global(.react-select) { +color: red; display: none +}\`}</style> +</div>; + +<div> +<style jsx>{\`div{color:red}\`}</style> +</div>; + +<div> +<style jsx>{\`This is invalid css. + Shouldn't fail. + Shouldn't be formatted.\`}</style> +</div>; + +const header = css\` +.top-bar {background:black; +margin: 0; + position: fixed; + top: 0;left:0; + width: 100%; + text-align: center ; + padding: 15px 0 0 1em; + z-index: 9999; +} + +.top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0;right: 0; +} +\`; + +const headerResolve = css.resolve\` +.top-bar {background:black; +margin: 0; + position: fixed; + top: 0;left:0; + width: 100%; + text-align: center ; + padding: 15px 0 0 1em; + z-index: 9999; +} + +.top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0;right: 0; +} +\`; + +const headerGlobal = css.global\` +.top-bar {background:black; +margin: 0; + position: fixed; + top: 0;left:0; + width: 100%; + text-align: center ; + padding: 15px 0 0 1em; + z-index: 9999; +} + +.top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0;right: 0; +} +\`; + +=====================================output===================================== +<style jsx>{\` + /* a comment */ + div :global(.react-select) { + color: red; + display: none; + } +\`}</style>; + +<div> + <style jsx>{\` + /* a comment */ + div :global(.react-select) { + color: red; + display: none; + } + \`}</style> +</div>; + +<div> + <style jsx>{\` + div { + color: red; + } + \`}</style> +</div>; + +<div> + <style jsx>{\`This is invalid css. + Shouldn't fail. + Shouldn't be formatted.\`}</style> +</div>; + +const header = css\` + .top-bar { + background: black; + margin: 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + text-align: center; + padding: 15px 0 0 1em; + z-index: 9999; + } + + .top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0; + right: 0; + } +\`; + +const headerResolve = css.resolve\` + .top-bar { + background: black; + margin: 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + text-align: center; + padding: 15px 0 0 1em; + z-index: 9999; + } + + .top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0; + right: 0; + } +\`; + +const headerGlobal = css.global\` + .top-bar { + background: black; + margin: 0; + position: fixed; + top: 0; + left: 0; + width: 100%; + text-align: center; + padding: 15px 0 0 1em; + z-index: 9999; + } + + .top-bar .logo { + height: 30px; + margin: auto; + position: absolute; + left: 0; + right: 0; + } +\`; + +================================================================================ +`; + +exports[`styled-jsx-with-expressions.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style jsx>{\` + div { + display: \${expr}; + color: \${expr}; + \${expr}; + \${expr}; + background: red; + animation: \${expr} 10s ease-out; + } + @media (\${expr}) { + div.\${expr} { + color: red; + } + \${expr} { + color: red; + } + } + @media (min-width: \${expr}) { + div.\${expr} { + color: red; + } + all\${expr} { + color: red; + } + } + @font-face { + \${expr} + } +\`}</style>; + +<style jsx>{\` + div { + animation: linear \${seconds}s ease-out; + } +\`}</style>; + +<style jsx>{\` + div { + animation: 3s ease-in 1s \${foo => foo.getIterations()} reverse both paused slidein; + } +\`}</style>; + +=====================================output===================================== +<style jsx>{\` + div { + display: \${expr}; + color: \${expr}; + \${expr}; + \${expr}; + background: red; + animation: \${expr} 10s ease-out; + } + @media (\${expr}) { + div.\${expr} { + color: red; + } + \${expr} { + color: red; + } + } + @media (min-width: \${expr}) { + div.\${expr} { + color: red; + } + all\${expr} { + color: red; + } + } + @font-face { + \${expr} + } +\`}</style>; + +<style jsx>{\` + div { + animation: linear \${seconds}s ease-out; + } +\`}</style>; + +<style jsx>{\` + div { + animation: 3s ease-in 1s \${(foo) => foo.getIterations()} reverse both paused + slidein; + } +\`}</style>; + +================================================================================ +`; diff --git a/tests/format/js/template-literals/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/template-literals/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6b4d28f29383..000000000000 --- a/tests/format/js/template-literals/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,661 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binary-exporessions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 | -2}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 & -2}\`; - -=====================================output===================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 | 2 -}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 & 2 -}\`; - -================================================================================ -`; - -exports[`conditional-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 ? 1 : 2 -}\`; - -=====================================output===================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 ? 1 : 2 -}\`; - -================================================================================ -`; - -exports[`css-prop.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function SomeComponent (props) { - // Create styles as if you're calling css and the class will be applied to the component - return (<div css={\` - color: blue; - font-size: 17 px; - - &:hover { - color: green; - } - - & .some-class { - font-size: 20px; - } - \`}> - This will be blue until hovered. - <div className="some-class"> - This font size will be 20px - </div> - </div>) -} - -const TestComponent = ({ children, ...props }) => ( - <div css={\`color: white; background: black\`}> - {children} - </div> -); - -=====================================output===================================== -function SomeComponent(props) { - // Create styles as if you're calling css and the class will be applied to the component - return ( - <div - css={\` - color: blue; - font-size: 17 px; - - &:hover { - color: green; - } - - & .some-class { - font-size: 20px; - } - \`} - > - This will be blue until hovered. - <div className="some-class">This font size will be 20px</div> - </div> - ); -} - -const TestComponent = ({ children, ...props }) => ( - <div - css={\` - color: white; - background: black; - \`} - > - {children} - </div> -); - -================================================================================ -`; - -exports[`expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const long1 = \`long \${a//comment - .b} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long long\`; -const long2 = \`long \${a.b.c.d.e} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long long\`; - -const long3 = \`long long long long long long long long long long long \${a.b.c.d.e} long long long long long long long long long long long long long\`; - -const description = - \`The value of the \${cssName} css of the \${this._name} element\`; - -const foo = \`such a long template string \${foo.bar.baz} that prettier will want to wrap it\`; - -const shouldWrapForNow = \`such a long template string \${foo().bar.baz} that prettier will want to wrap it\`; - -const shouldNotWrap = \`simple expressions should not break \${this} \${variable} \${a.b.c} \${this.b.c} \${a[b].c} \${a.b[c]} \${a.b['c']} \${a?.b?.c}\`; - -console.log(chalk.white(\`Covered Lines below threshold: \${coverageSettings.lines}%. Actual: \${coverageSummary.total.lines.pct}%\`)) - -x = \`mdl-textfield mdl-js-textfield \${className} \${content.length > 0 - ? 'is-dirty' - : ''} combo-box__input\` - -function testing() { - const p = {}; - // faking some tabs since I can't paste my real code in - if(true) { - if(false) { - return \`\${process.env.OPENID_URL}/something/something/something?\${Object.keys(p) - .map(k => \`\${encodeURIComponent(k)}=\${encodeURIComponent(p[k])}\`) - .join("&")}\`; - } - } -} - -console.log( - \`Trying update appcast for \${app.name} (\${app.cask.appcast}) -> (\${app.cask.appcastGenerated})\` -) - -console.log(\`brew cask audit --download \${_.map(definitions, 'caskName').join(' ')}\`) - -console.log(\`\\nApparently jetbrains changed the release artifact for \${app.name}@\${app.jetbrains.version}.\\n\`); - -descirbe('something', () => { - test(\`{pass: false} expect(\${small}).toBeGreaterThanOrEqual(\${big})\`, () => {}); -}) - -throw new Error(\`pretty-format: Option "theme" has a key "\${key}" whose value "\${value}" is undefined in ansi-styles.\`,) - -=====================================output===================================== -const long1 = \`long \${ - a.b //comment -} long longlong \${a.b.c.d.e} long longlong \${a.b.c.d.e} long longlong \${ - a.b.c.d.e -} long long\`; -const long2 = \`long \${a.b.c.d.e} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long longlong \${loooooooooooooooooong} long long\`; - -const long3 = \`long long long long long long long long long long long \${a.b.c.d.e} long long long long long long long long long long long long long\`; - -const description = \`The value of the \${cssName} css of the \${this._name} element\`; - -const foo = \`such a long template string \${foo.bar.baz} that prettier will want to wrap it\`; - -const shouldWrapForNow = \`such a long template string \${ - foo().bar.baz -} that prettier will want to wrap it\`; - -const shouldNotWrap = \`simple expressions should not break \${this} \${variable} \${a.b.c} \${this.b.c} \${a[b].c} \${a.b[c]} \${a.b["c"]} \${a?.b?.c}\`; - -console.log( - chalk.white( - \`Covered Lines below threshold: \${coverageSettings.lines}%. Actual: \${coverageSummary.total.lines.pct}%\` - ) -); - -x = \`mdl-textfield mdl-js-textfield \${className} \${ - content.length > 0 ? "is-dirty" : "" -} combo-box__input\`; - -function testing() { - const p = {}; - // faking some tabs since I can't paste my real code in - if (true) { - if (false) { - return \`\${ - process.env.OPENID_URL - }/something/something/something?\${Object.keys(p) - .map((k) => \`\${encodeURIComponent(k)}=\${encodeURIComponent(p[k])}\`) - .join("&")}\`; - } - } -} - -console.log( - \`Trying update appcast for \${app.name} (\${app.cask.appcast}) -> (\${app.cask.appcastGenerated})\` -); - -console.log( - \`brew cask audit --download \${_.map(definitions, "caskName").join(" ")}\` -); - -console.log( - \`\\nApparently jetbrains changed the release artifact for \${app.name}@\${app.jetbrains.version}.\\n\` -); - -descirbe("something", () => { - test(\`{pass: false} expect(\${small}).toBeGreaterThanOrEqual(\${big})\`, () => {}); -}); - -throw new Error( - \`pretty-format: Option "theme" has a key "\${key}" whose value "\${value}" is undefined in ansi-styles.\` -); - -================================================================================ -`; - -exports[`logical-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 ?? -2}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 && -2}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${1 || -2}\`; - -=====================================output===================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 ?? 2 -}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 && 2 -}\`; -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - 1 || 2 -}\`; - -================================================================================ -`; - -exports[`sequence-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${(1, 2)}\`; - -=====================================output===================================== -\`111111111 222222222 333333333 444444444 555555555 666666666 777777777 \${ - (1, 2) -}\`; - -================================================================================ -`; - -exports[`styled-components-with-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const Button = styled.a\` -/* Comment */ - display: \${props=>props.display}; -\`; - -styled.div\` - display: \${props=>props.display}; - border: \${props=>props.border}px; - margin: 10px \${props=>props.border}px ; -\`; - -const EqualDivider = styled.div\` -margin: 0.5rem; - padding: 1rem; - background: papayawhip ; - - > * { - flex: 1; - - &:not(:first-child) { - \${props => props.vertical ? 'margin-top' : 'margin-left'}: 1rem; - } - } -\`; - -const header = css\` -.top-bar {background:black; -margin: 0; - position: fixed; - top: 0;left:0; - width: 100%; - text-align: center ; - padding: 15px 0 0 1em; - z-index: 9999; -} - -.top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0;right: 0; -} -\`; - -=====================================output===================================== -const Button = styled.a\` - /* Comment */ - display: \${(props) => props.display}; -\`; - -styled.div\` - display: \${(props) => props.display}; - border: \${(props) => props.border}px; - margin: 10px \${(props) => props.border}px; -\`; - -const EqualDivider = styled.div\` - margin: 0.5rem; - padding: 1rem; - background: papayawhip; - - > * { - flex: 1; - - &:not(:first-child) { - \${(props) => (props.vertical ? "margin-top" : "margin-left")}: 1rem; - } - } -\`; - -const header = css\` - .top-bar { - background: black; - margin: 0; - position: fixed; - top: 0; - left: 0; - width: 100%; - text-align: center; - padding: 15px 0 0 1em; - z-index: 9999; - } - - .top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0; - right: 0; - } -\`; - -================================================================================ -`; - -exports[`styled-jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<style jsx>{\` - /* a comment */ - div :global(.react-select) { - color: red; display: none - } -\`}</style>; - -<div> -<style jsx>{\` - /* a comment */ -div :global(.react-select) { -color: red; display: none -}\`}</style> -</div>; - -<div> -<style jsx>{\`div{color:red}\`}</style> -</div>; - -<div> -<style jsx>{\`This is invalid css. - Shouldn't fail. - Shouldn't be formatted.\`}</style> -</div>; - -const header = css\` -.top-bar {background:black; -margin: 0; - position: fixed; - top: 0;left:0; - width: 100%; - text-align: center ; - padding: 15px 0 0 1em; - z-index: 9999; -} - -.top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0;right: 0; -} -\`; - -const headerResolve = css.resolve\` -.top-bar {background:black; -margin: 0; - position: fixed; - top: 0;left:0; - width: 100%; - text-align: center ; - padding: 15px 0 0 1em; - z-index: 9999; -} - -.top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0;right: 0; -} -\`; - -const headerGlobal = css.global\` -.top-bar {background:black; -margin: 0; - position: fixed; - top: 0;left:0; - width: 100%; - text-align: center ; - padding: 15px 0 0 1em; - z-index: 9999; -} - -.top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0;right: 0; -} -\`; - -=====================================output===================================== -<style jsx>{\` - /* a comment */ - div :global(.react-select) { - color: red; - display: none; - } -\`}</style>; - -<div> - <style jsx>{\` - /* a comment */ - div :global(.react-select) { - color: red; - display: none; - } - \`}</style> -</div>; - -<div> - <style jsx>{\` - div { - color: red; - } - \`}</style> -</div>; - -<div> - <style jsx>{\`This is invalid css. - Shouldn't fail. - Shouldn't be formatted.\`}</style> -</div>; - -const header = css\` - .top-bar { - background: black; - margin: 0; - position: fixed; - top: 0; - left: 0; - width: 100%; - text-align: center; - padding: 15px 0 0 1em; - z-index: 9999; - } - - .top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0; - right: 0; - } -\`; - -const headerResolve = css.resolve\` - .top-bar { - background: black; - margin: 0; - position: fixed; - top: 0; - left: 0; - width: 100%; - text-align: center; - padding: 15px 0 0 1em; - z-index: 9999; - } - - .top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0; - right: 0; - } -\`; - -const headerGlobal = css.global\` - .top-bar { - background: black; - margin: 0; - position: fixed; - top: 0; - left: 0; - width: 100%; - text-align: center; - padding: 15px 0 0 1em; - z-index: 9999; - } - - .top-bar .logo { - height: 30px; - margin: auto; - position: absolute; - left: 0; - right: 0; - } -\`; - -================================================================================ -`; - -exports[`styled-jsx-with-expressions.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<style jsx>{\` - div { - display: \${expr}; - color: \${expr}; - \${expr}; - \${expr}; - background: red; - animation: \${expr} 10s ease-out; - } - @media (\${expr}) { - div.\${expr} { - color: red; - } - \${expr} { - color: red; - } - } - @media (min-width: \${expr}) { - div.\${expr} { - color: red; - } - all\${expr} { - color: red; - } - } - @font-face { - \${expr} - } -\`}</style>; - -<style jsx>{\` - div { - animation: linear \${seconds}s ease-out; - } -\`}</style>; - -<style jsx>{\` - div { - animation: 3s ease-in 1s \${foo => foo.getIterations()} reverse both paused slidein; - } -\`}</style>; - -=====================================output===================================== -<style jsx>{\` - div { - display: \${expr}; - color: \${expr}; - \${expr}; - \${expr}; - background: red; - animation: \${expr} 10s ease-out; - } - @media (\${expr}) { - div.\${expr} { - color: red; - } - \${expr} { - color: red; - } - } - @media (min-width: \${expr}) { - div.\${expr} { - color: red; - } - all\${expr} { - color: red; - } - } - @font-face { - \${expr} - } -\`}</style>; - -<style jsx>{\` - div { - animation: linear \${seconds}s ease-out; - } -\`}</style>; - -<style jsx>{\` - div { - animation: 3s ease-in 1s \${(foo) => foo.getIterations()} reverse both paused - slidein; - } -\`}</style>; - -================================================================================ -`; diff --git a/tests/format/js/template-literals/expressions.js b/tests/format/js/template-literals/expressions.js index c68f1176a1f3..c2f98b36b4cb 100644 --- a/tests/format/js/template-literals/expressions.js +++ b/tests/format/js/template-literals/expressions.js @@ -44,3 +44,5 @@ descirbe('something', () => { }) throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`,) + +a = `${[[1, 2, 3], [4, 5, 6]]}` diff --git a/tests/format/js/template-literals/format.test.js b/tests/format/js/template-literals/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/template-literals/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/template-literals/indention.js b/tests/format/js/template-literals/indention.js new file mode 100644 index 000000000000..62a146f828a1 --- /dev/null +++ b/tests/format/js/template-literals/indention.js @@ -0,0 +1,82 @@ +[ + ` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, + ` + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, + ` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, + ` + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, + ` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, + ` + 1. Go to "-{chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )}" ${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer" + )} + `, +` +# blabla ${a} ${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + +# blabla ${a} ${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} +`, + ` + # blabla ${a} ${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + + 2. Go to "${chalk.green.underline( + "https://www.example.com/drupedalKangarooTransformer", + )}" + + # blabla ${a} ${chalk.green.underline("https://www.example.com/drupedalKangarooTransformer")} + `, +] diff --git a/tests/format/js/template-literals/jsfmt.spec.js b/tests/format/js/template-literals/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/template-literals/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/template/__snapshots__/format.test.js.snap b/tests/format/js/template/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d10fcb02e305 --- /dev/null +++ b/tests/format/js/template/__snapshots__/format.test.js.snap @@ -0,0 +1,432 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +() => a\` + a +\`; + +() => \` + a +\`; + +=====================================output===================================== +() => a\` + a +\`; + +() => \` + a +\`; + +================================================================================ +`; + +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +insertRule(\`*, *:before, *:after { + box-sizing: inherit; +}\`); + +insertRule\`*, *:before, *:after { + box-sizing: inherit; +}\`; + +new Error(formatErrorMessage\` + This a really bad error. + Which has more than one line. +\`); + +=====================================output===================================== +insertRule(\`*, *:before, *:after { + box-sizing: inherit; +}\`); + +insertRule\`*, *:before, *:after { + box-sizing: inherit; +}\`; + +new Error(formatErrorMessage\` + This a really bad error. + Which has more than one line. +\`); + +================================================================================ +`; + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +\` +(?:\${escapeChar}[\\\\S\\\\s]|(?:(?!\${// Using \`XRegExp.union\` safely rewrites backreferences in \`left\` and \`right\`. +// Intentionally not passing \`basicFlags\` to \`XRegExp.union\` since any syntax +// transformation resulting from those flags was already applied to \`left\` and +// \`right\` when they were passed through the XRegExp constructor above. +XRegExp.union([left, right], '', {conjunction: 'or'}).source})[^\${escapeChar}])+)+ +\`; + +\`a\${/* b */c/* d */}e\${// f +g +// h +}\`; + +=====================================output===================================== +\` +(?:\${escapeChar}[\\\\S\\\\s]|(?:(?!\${ + // Using \`XRegExp.union\` safely rewrites backreferences in \`left\` and \`right\`. + // Intentionally not passing \`basicFlags\` to \`XRegExp.union\` since any syntax + // transformation resulting from those flags was already applied to \`left\` and + // \`right\` when they were passed through the XRegExp constructor above. + XRegExp.union([left, right], "", { conjunction: "or" }).source +})[^\${escapeChar}])+)+ +\`; + +\`a\${/* b */ c /* d */}e\${ + // f + g + // h +}\`; + +================================================================================ +`; + +exports[`faulty-locations.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +var o = { + [\`key\`]: () => { + // Comment + } +}; + +var x = { + y: () => Relay.QL\` + query { + \${foo}, + field, + } + \` +}; + +=====================================output===================================== +var o = { + [\`key\`]: () => { + // Comment + }, +}; + +var x = { + y: () => Relay.QL\` + query { + \${foo}, + field, + } + \`, +}; + +================================================================================ +`; + +exports[`graphql.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +module.exports = Relay.createContainer( + // ... + { + fragments: { + nodes: ({solution_type, time_frame}) => Relay.QL\` + fragment on RelatedNode @relay(plural: true) { + __typename + \${OptimalSolutionsSection + .getFragment( + 'node', + {solution_type, time_frame}, + ) + } + } + \`, + }, + }, +); + +=====================================output===================================== +module.exports = Relay.createContainer( + // ... + { + fragments: { + nodes: ({ solution_type, time_frame }) => Relay.QL\` + fragment on RelatedNode @relay(plural: true) { + __typename + \${OptimalSolutionsSection.getFragment("node", { + solution_type, + time_frame, + })} + } + \`, + }, + }, +); + +================================================================================ +`; + +exports[`indent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = () => { + { + { + { + return \` +line 1 +line 2 +... +line n +\${foo({ + many: keys, + many: keys +})} +line n + 1 +line n + 2 +line n + n +\`; + } + } + } +}; +=====================================output===================================== +const foo = () => { + { + { + { + return \` +line 1 +line 2 +... +line n +\${foo({ + many: keys, + many: keys, +})} +line n + 1 +line n + 2 +line n + n +\`; + } + } + } +}; + +================================================================================ +`; + +exports[`inline.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); +this._pipe.write( + \`\\n\\n Pattern matches \${total} \${pluralizeTest}\` +); +this._pipe + .write( + \`\\n\\n Pattern matches \${total} \${pluralizeTest}\` + ); + +this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\`); + +this._pipe.write( + \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\` +); + +this._pipe.write(\` + \\n\\n Pattern matches \${total} \${pluralizeTest} but that's long +\`); + + +() => \` + a +\`; + +() => + \` + a + \`; + + +// https://github.com/prettier/prettier/issues/5529 +editTitle += \`\${iconHTML({ class: "reply-to-glyph" })}\`; + +=====================================output===================================== +this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); +this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); +this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); + +this._pipe.write( + \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\`, +); + +this._pipe.write( + \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\`, +); + +this._pipe.write(\` + \\n\\n Pattern matches \${total} \${pluralizeTest} but that's long +\`); + +() => \` + a +\`; + +() => + \` + a + \`; + +// https://github.com/prettier/prettier/issues/5529 +editTitle += \`\${iconHTML({ class: "reply-to-glyph" })}\`; + +================================================================================ +`; + +exports[`parenthesis.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// "ArrowFunctionExpression" +(() => {})\`\`; + +// "AssignmentExpression" +(b = c)\`\`; + +// "AwaitExpression" +async function f() { + (await b)\`\`; +} + +// "BinaryExpression" +(b + c)\`\`; + +// "CallExpression" +b()\`\`; + +// "ClassExpression" +(class {})\`\`; + +// "ConditionalExpression" +(b ? c : d)\`\`; + +// "FunctionExpression" +(function() {})\`\`; + +// "LogicalExpression" +(b || c)\`\`; + +// "MemberExpression" +b.c\`\`; + +// "NewExpression" +(new B())\`\`; + +// "ObjectExpression" +({})\`\`; + +// "SequenceExpression" +(b, c)\`\`; + +// "TaggedTemplateExpression" +(\`\`)\`\`; + +// "UnaryExpression" +(void b)\`\`; + +// "UpdateExpression" +(++b)\`\`; + +// "YieldExpression" +function* d() { + (yield 1)\`\`; +} + +=====================================output===================================== +// "ArrowFunctionExpression" +(() => {})\`\`; + +// "AssignmentExpression" +(b = c)\`\`; + +// "AwaitExpression" +async function f() { + (await b)\`\`; +} + +// "BinaryExpression" +(b + c)\`\`; + +// "CallExpression" +b()\`\`; + +// "ClassExpression" +(class {})\`\`; + +// "ConditionalExpression" +(b ? c : d)\`\`; + +// "FunctionExpression" +(function () {})\`\`; + +// "LogicalExpression" +(b || c)\`\`; + +// "MemberExpression" +b.c\`\`; + +// "NewExpression" +new B()\`\`; + +// "ObjectExpression" +({})\`\`; + +// "SequenceExpression" +(b, c)\`\`; + +// "TaggedTemplateExpression" +\`\`\`\`; + +// "UnaryExpression" +(void b)\`\`; + +// "UpdateExpression" +(++b)\`\`; + +// "YieldExpression" +function* d() { + (yield 1)\`\`; +} + +================================================================================ +`; diff --git a/tests/format/js/template/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/template/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4837c1522f82..000000000000 --- a/tests/format/js/template/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,432 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -() => a\` - a -\`; - -() => \` - a -\`; - -=====================================output===================================== -() => a\` - a -\`; - -() => \` - a -\`; - -================================================================================ -`; - -exports[`call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -insertRule(\`*, *:before, *:after { - box-sizing: inherit; -}\`); - -insertRule\`*, *:before, *:after { - box-sizing: inherit; -}\`; - -new Error(formatErrorMessage\` - This a really bad error. - Which has more than one line. -\`); - -=====================================output===================================== -insertRule(\`*, *:before, *:after { - box-sizing: inherit; -}\`); - -insertRule\`*, *:before, *:after { - box-sizing: inherit; -}\`; - -new Error(formatErrorMessage\` - This a really bad error. - Which has more than one line. -\`); - -================================================================================ -`; - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -\` -(?:\${escapeChar}[\\\\S\\\\s]|(?:(?!\${// Using \`XRegExp.union\` safely rewrites backreferences in \`left\` and \`right\`. -// Intentionally not passing \`basicFlags\` to \`XRegExp.union\` since any syntax -// transformation resulting from those flags was already applied to \`left\` and -// \`right\` when they were passed through the XRegExp constructor above. -XRegExp.union([left, right], '', {conjunction: 'or'}).source})[^\${escapeChar}])+)+ -\`; - -\`a\${/* b */c/* d */}e\${// f -g -// h -}\`; - -=====================================output===================================== -\` -(?:\${escapeChar}[\\\\S\\\\s]|(?:(?!\${ - // Using \`XRegExp.union\` safely rewrites backreferences in \`left\` and \`right\`. - // Intentionally not passing \`basicFlags\` to \`XRegExp.union\` since any syntax - // transformation resulting from those flags was already applied to \`left\` and - // \`right\` when they were passed through the XRegExp constructor above. - XRegExp.union([left, right], "", { conjunction: "or" }).source -})[^\${escapeChar}])+)+ -\`; - -\`a\${/* b */ c /* d */}e\${ - // f - g - // h -}\`; - -================================================================================ -`; - -exports[`faulty-locations.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -var o = { - [\`key\`]: () => { - // Comment - } -}; - -var x = { - y: () => Relay.QL\` - query { - \${foo}, - field, - } - \` -}; - -=====================================output===================================== -var o = { - [\`key\`]: () => { - // Comment - }, -}; - -var x = { - y: () => Relay.QL\` - query { - \${foo}, - field, - } - \`, -}; - -================================================================================ -`; - -exports[`graphql.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -module.exports = Relay.createContainer( - // ... - { - fragments: { - nodes: ({solution_type, time_frame}) => Relay.QL\` - fragment on RelatedNode @relay(plural: true) { - __typename - \${OptimalSolutionsSection - .getFragment( - 'node', - {solution_type, time_frame}, - ) - } - } - \`, - }, - }, -); - -=====================================output===================================== -module.exports = Relay.createContainer( - // ... - { - fragments: { - nodes: ({ solution_type, time_frame }) => Relay.QL\` - fragment on RelatedNode @relay(plural: true) { - __typename - \${OptimalSolutionsSection.getFragment("node", { - solution_type, - time_frame, - })} - } - \`, - }, - } -); - -================================================================================ -`; - -exports[`indent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = () => { - { - { - { - return \` -line 1 -line 2 -... -line n -\${foo({ - many: keys, - many: keys -})} -line n + 1 -line n + 2 -line n + n -\`; - } - } - } -}; -=====================================output===================================== -const foo = () => { - { - { - { - return \` -line 1 -line 2 -... -line n -\${foo({ - many: keys, - many: keys, -})} -line n + 1 -line n + 2 -line n + n -\`; - } - } - } -}; - -================================================================================ -`; - -exports[`inline.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); -this._pipe.write( - \`\\n\\n Pattern matches \${total} \${pluralizeTest}\` -); -this._pipe - .write( - \`\\n\\n Pattern matches \${total} \${pluralizeTest}\` - ); - -this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\`); - -this._pipe.write( - \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\` -); - -this._pipe.write(\` - \\n\\n Pattern matches \${total} \${pluralizeTest} but that's long -\`); - - -() => \` - a -\`; - -() => - \` - a - \`; - - -// https://github.com/prettier/prettier/issues/5529 -editTitle += \`\${iconHTML({ class: "reply-to-glyph" })}\`; - -=====================================output===================================== -this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); -this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); -this._pipe.write(\`\\n\\n Pattern matches \${total} \${pluralizeTest}\`); - -this._pipe.write( - \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\` -); - -this._pipe.write( - \`\\n\\n Pattern matches \${total} \${pluralizeTest} but that's long\` -); - -this._pipe.write(\` - \\n\\n Pattern matches \${total} \${pluralizeTest} but that's long -\`); - -() => \` - a -\`; - -() => - \` - a - \`; - -// https://github.com/prettier/prettier/issues/5529 -editTitle += \`\${iconHTML({ class: "reply-to-glyph" })}\`; - -================================================================================ -`; - -exports[`parenthesis.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// "ArrowFunctionExpression" -(() => {})\`\`; - -// "AssignmentExpression" -(b = c)\`\`; - -// "AwaitExpression" -async function f() { - (await b)\`\`; -} - -// "BinaryExpression" -(b + c)\`\`; - -// "CallExpression" -b()\`\`; - -// "ClassExpression" -(class {})\`\`; - -// "ConditionalExpression" -(b ? c : d)\`\`; - -// "FunctionExpression" -(function() {})\`\`; - -// "LogicalExpression" -(b || c)\`\`; - -// "MemberExpression" -b.c\`\`; - -// "NewExpression" -(new B())\`\`; - -// "ObjectExpression" -({})\`\`; - -// "SequenceExpression" -(b, c)\`\`; - -// "TaggedTemplateExpression" -(\`\`)\`\`; - -// "UnaryExpression" -(void b)\`\`; - -// "UpdateExpression" -(++b)\`\`; - -// "YieldExpression" -function* d() { - (yield 1)\`\`; -} - -=====================================output===================================== -// "ArrowFunctionExpression" -(() => {})\`\`; - -// "AssignmentExpression" -(b = c)\`\`; - -// "AwaitExpression" -async function f() { - (await b)\`\`; -} - -// "BinaryExpression" -(b + c)\`\`; - -// "CallExpression" -b()\`\`; - -// "ClassExpression" -(class {})\`\`; - -// "ConditionalExpression" -(b ? c : d)\`\`; - -// "FunctionExpression" -(function () {})\`\`; - -// "LogicalExpression" -(b || c)\`\`; - -// "MemberExpression" -b.c\`\`; - -// "NewExpression" -new B()\`\`; - -// "ObjectExpression" -({})\`\`; - -// "SequenceExpression" -(b, c)\`\`; - -// "TaggedTemplateExpression" -\`\`\`\`; - -// "UnaryExpression" -(void b)\`\`; - -// "UpdateExpression" -(++b)\`\`; - -// "YieldExpression" -function* d() { - (yield 1)\`\`; -} - -================================================================================ -`; diff --git a/tests/format/js/template/format.test.js b/tests/format/js/template/format.test.js new file mode 100644 index 000000000000..784b99177a5f --- /dev/null +++ b/tests/format/js/template/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow"]); diff --git a/tests/format/js/template/jsfmt.spec.js b/tests/format/js/template/jsfmt.spec.js deleted file mode 100644 index e3b2b3021cd3..000000000000 --- a/tests/format/js/template/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow"]); diff --git a/tests/format/js/ternaries/__snapshots__/format.test.js.snap b/tests/format/js/ternaries/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9a21beeb2b00 --- /dev/null +++ b/tests/format/js/ternaries/__snapshots__/format.test.js.snap @@ -0,0 +1,12145 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`binary.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + ( + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ) ? + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + ( + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ) ? + 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + ( + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ) ? + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + ( + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ) ? + 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + ( + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ) ? + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + ( + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ) ? + 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + ( + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ) ? + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + ( + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ) ? + 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + ) : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ? 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + ) : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ? 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + ) : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ? 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`binary.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const funnelSnapshotCard = (report === MY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) + ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + : null; + +room = room.map((row, rowIndex) => ( + row.map((col, colIndex) => ( + (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 + )) +)) + +=====================================output===================================== +const funnelSnapshotCard = + (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || + (report === COMPANY_OVERVIEW && + !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( + <ReportMetricsFunnelSnapshotCard metrics={metrics} /> + ) : null; + +room = room.map((row, rowIndex) => + row.map((col, colIndex) => + rowIndex === 0 || + colIndex === 0 || + rowIndex === height || + colIndex === width + ? 1 + : 0, + ), +); + +================================================================================ +`; + +exports[`func-call.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + ( + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ) ? + annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + ( + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ) ? + annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + ( + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ) ? + annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + ( + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ) ? + annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`func-call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +=====================================output===================================== +fn( + bifornCringerMoshedPerplexSawder, + askTrovenaBeenaDependsRowans, + glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && + anodyneCondosMalateOverateRetinol + ? annularCooeedSplicesWalksWayWay + : kochabCooieGameOnOboleUnweave, +); +// TODO(rattrayalex): try to indent consequent/alternate here. + +================================================================================ +`; + +exports[`indent.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb +: ccccccccccccccc ? ddddddddddddddd +: eeeeeeeeeeeeeee ? fffffffffffffff +: gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a ? + { + a: 0, + } +: { + a: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + y: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a ? + { + a: function () { + return a ? + { + a: [ + a ? + { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a ? + { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a ? + function () { + a ? + a( + a ? + { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a ? a() : ( + a({ + a: 0, + }) + ), + ), + a() ? + { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() ? + { + a: 0, + } + : (function (a) { + return a() ? + [ + { + a: 0, + b: a(), + }, + ] + : a([ + a ? + { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a ? + function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } +: a; + +================================================================================ +`; + +exports[`indent.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb +: ccccccccccccccc ? ddddddddddddddd +: eeeeeeeeeeeeeee ? fffffffffffffff +: gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a ? + { + a: 0, + } +: { + a: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + y: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a ? + { + a: function () { + return a ? + { + a: [ + a ? + { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a ? + { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a ? + function () { + a ? + a( + a ? + { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a ? a() : ( + a({ + a: 0, + }) + ), + ), + a() ? + { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() ? + { + a: 0, + } + : (function (a) { + return a() ? + [ + { + a: 0, + b: a(), + }, + ] + : a([ + a ? + { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a ? + function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } +: a; + +================================================================================ +`; + +exports[`indent.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb +: ccccccccccccccc ? ddddddddddddddd +: eeeeeeeeeeeeeee ? fffffffffffffff +: gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a ? + { + a: 0, + } +: { + a: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + y: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a ? + { + a: function () { + return a ? + { + a: [ + a ? + { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a ? + { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a ? + function () { + a ? + a( + a ? + { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a ? a() : ( + a({ + a: 0, + }) + ), + ), + a() ? + { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() ? + { + a: 0, + } + : (function (a) { + return a() ? + [ + { + a: 0, + b: a(), + }, + ] + : a([ + a ? + { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a ? + function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } +: a; + +================================================================================ +`; + +exports[`indent.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb +: ccccccccccccccc ? ddddddddddddddd +: eeeeeeeeeeeeeee ? fffffffffffffff +: gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a ? + { + a: 0, + } +: { + a: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + y: + ( + { + a: 0, + } + ) ? + { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a ? + { + a: function () { + return a ? + { + a: [ + a ? + { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a ? + { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a ? + function () { + a ? + a( + a ? + { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a ? a() : ( + a({ + a: 0, + }) + ), + ), + a() ? + { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() ? + { + a: 0, + } + : (function (a) { + return a() ? + [ + { + a: 0, + b: a(), + }, + ] + : a([ + a ? + { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a ? + function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } +: a; + +================================================================================ +`; + +exports[`indent.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a + ? { + a: 0, + } + : { + a: { + a: 0, + } + ? { + a: 0, + } + : { + y: { + a: 0, + } + ? { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a + ? { + a: function () { + return a + ? { + a: [ + a + ? { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a + ? { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a + ? function () { + a + ? a( + a + ? { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a + ? a() + : a({ + a: 0, + }), + ), + a() + ? { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() + ? { + a: 0, + } + : (function (a) { + return a() + ? [ + { + a: 0, + b: a(), + }, + ] + : a([ + a + ? { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a + ? function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } + : a; + +================================================================================ +`; + +exports[`indent.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a + ? { + a: 0, + } + : { + a: { + a: 0, + } + ? { + a: 0, + } + : { + y: { + a: 0, + } + ? { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a + ? { + a: function () { + return a + ? { + a: [ + a + ? { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a + ? { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a + ? function () { + a + ? a( + a + ? { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a + ? a() + : a({ + a: 0, + }), + ), + a() + ? { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() + ? { + a: 0, + } + : (function (a) { + return a() + ? [ + { + a: 0, + b: a(), + }, + ] + : a([ + a + ? { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a + ? function ( + a, + ) { + return function () { + return 0; + }; + } + : function ( + a, + ) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } + : a; + +================================================================================ +`; + +exports[`indent.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a + ? { + a: 0, + } + : { + a: { + a: 0, + } + ? { + a: 0, + } + : { + y: { + a: 0, + } + ? { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a + ? { + a: function () { + return a + ? { + a: [ + a + ? { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a + ? { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a + ? function () { + a + ? a( + a + ? { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a + ? a() + : a({ + a: 0, + }), + ), + a() + ? { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() + ? { + a: 0, + } + : (function (a) { + return a() + ? [ + { + a: 0, + b: a(), + }, + ] + : a([ + a + ? { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a + ? function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } + : a; + +================================================================================ +`; + +exports[`indent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +? +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +: +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +a + ? { + a: 0 + } + : { + a: { + a: 0 + } + ? { + a: 0 + } + : { + y: { + a: 0 + } + ? { + a: 0 + } + : { + a: 0 + } + } + } + +a + ? { + a: function() { + return a + ? { + a: [ + a + ? { + a: 0, + b: [ + a + ? [ + 0, + 1 + ] + : [] + ] + } + : [ + [ + 0, + { + a: 0 + }, + a + ? 0 + : 1 + ], + function() { + return a + ? { + a: 0 + } + : [ + { + a: 0 + }, + {} + ]; + } + ] + ] + } + : [ + a + ? function() { + a + ? a( + a + ? { + a: a( + { + a: 0 + } + ) + } + : [ + 0, + a(), + a( + a(), + { + a: 0 + }, + a + ? a() + : a( + { + a: 0 + } + ) + ), + a() + ? { + a: a(), + b: [] + } + : {} + ] + ): + a( + a() + ? { + a: 0 + } + : (function(a) { + return a() + ? [ + { + a: 0, + b: a() + } + ] + : a( + [ + a + ? { + a: 0 + } + : {}, + { + a: 0 + } + ] + ); + })( + a + ? function(a) { + return function() { + return 0; + }; + } + : function(a) { + return function() { + return 1; + } + } + ) + ); + } + : function() { + + } + ]; + } + } + : a; + +=====================================output===================================== +aaaaaaaaaaaaaaa + ? bbbbbbbbbbbbbbbbbb + : ccccccccccccccc + ? ddddddddddddddd + : eeeeeeeeeeeeeee + ? fffffffffffffff + : gggggggggggggggg; + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +a + ? { + a: 0, + } + : { + a: { + a: 0, + } + ? { + a: 0, + } + : { + y: { + a: 0, + } + ? { + a: 0, + } + : { + a: 0, + }, + }, + }; + +a + ? { + a: function () { + return a + ? { + a: [ + a + ? { + a: 0, + b: [a ? [0, 1] : []], + } + : [ + [ + 0, + { + a: 0, + }, + a ? 0 : 1, + ], + function () { + return a + ? { + a: 0, + } + : [ + { + a: 0, + }, + {}, + ]; + }, + ], + ], + } + : [ + a + ? function () { + a + ? a( + a + ? { + a: a({ + a: 0, + }), + } + : [ + 0, + a(), + a( + a(), + { + a: 0, + }, + a + ? a() + : a({ + a: 0, + }), + ), + a() + ? { + a: a(), + b: [], + } + : {}, + ], + ) + : a( + a() + ? { + a: 0, + } + : (function (a) { + return a() + ? [ + { + a: 0, + b: a(), + }, + ] + : a([ + a + ? { + a: 0, + } + : {}, + { + a: 0, + }, + ]); + })( + a + ? function (a) { + return function () { + return 0; + }; + } + : function (a) { + return function () { + return 1; + }; + }, + ), + ); + } + : function () {}, + ]; + }, + } + : a; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ) ? + $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError)).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ) ? + $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError)).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ) ? + $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError)).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ) ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond ? + baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ) ? + $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError)).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 ? + averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol +).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol +).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol +).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`indent-after-paren.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; + +function foo10() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo11() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +function foo12() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; +} + +foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); +} + +foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; + yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); + +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +) + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +=====================================output===================================== +foo7 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +foo8 = (condition ? firstValue : secondValue)[SomeType]; + +const foo9 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)[Fooooooooooo]; + +function foo10() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo11() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +function foo12() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo]; +} + +foo13 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +foo14 = (condition ? firstValue : secondValue)[SomeType]; + +const foo15 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +).Fooooooooooo.Fooooooooooo; + +function foo16() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo17() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +function foo18() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; +} + +foo19 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +foo20 = (condition ? firstValue : secondValue)[SomeType]; + +const foo21 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo22() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo23() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo24() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo25 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +foo26 = (condition ? firstValue : secondValue)[SomeType]; + +const foo27 = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.(Fooooooooooo.Fooooooooooo); + +function foo28() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo29() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function foo30() { + void ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); +} + +function* foo31() { + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )?.(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ).Fooooooooooo.Fooooooooooo; + yield ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )[Fooooooooooo.Fooooooooooo]; +} + +const foo32 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +function foo33() { + return new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo34() { + throw new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +function foo35() { + void new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + )(Fooooooooooo.Fooooooooooo); +} + +foo36 = new ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).Fooooooooooo.Fooooooooooo; + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + (glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); +// TODO(rattrayalex): try to fix this case + +bifornCringerMoshedPerplexSawder = ( + glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol +).annularCooeedSplicesWalksWayWay + .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) + .annularCooeedSplicesWalksWayWay(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)?.()?.()?.(); + +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +)()()(); + +foo = + foo.bar.baz[ + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ]; + +const decorated = (arg, ignoreRequestError) => { + return ( + typeof arg === "string" || + (arg && arg.valueOf && typeof arg.valueOf() === "string") + ? $delegate(arg, ignoreRequestError) + : handleAsyncOperations(arg, ignoreRequestError) + ).foo(); +}; + +bifornCringerMoshedPerplexSawder = fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +fn?.( + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop, +); + +bifornCringerMoshedPerplexSawder = + fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +bifornCringerMoshedPerplexSawder = + fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop + ]; + +fn?.[ + (glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol + ).prop +]; + +================================================================================ +`; + +exports[`nested.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" ? + (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = + condition1 ? value1 + : condition2 ? value2 + : condition3 ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? <ButtonStorybook /> + : match.params.storyId === "color" ? <ColorBook /> + : match.params.storyId === "typography" ? <TypographyBook /> + : match.params.storyId === "loading" ? <LoaderStorybook /> + : match.params.storyId === "deal-list" ? <DealListStory /> + : <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message>; + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessage = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" ? + 1 //'Payment completed successfully' + : state == "processing" ? + 2 //'Payment processing' + : state == "invalid_cvc" ? + 3 //'There was an issue with your CVC number' + : ( + true //state == 'invalid_expiry' + ) ? + 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record ? "-record" + : medals[0].unique ? "-unique" + : medals[0].type) + } + > + {medals[0].record ? + i18n("Record") + : medals[0].unique ? + i18n("Unique") + : medals[0].type === 0 ? + i18n("Silver") + : medals[0].type === 1 ? + i18n("Gold") + : medals[0].type === 2 ? + i18n("Platinum") + : i18n("Theme")} + </div> +); + +a ? literalline +: ( + { + 123: 12, + } +) ? + line +: softline; + +const config = { + onFailure: + onFailure !== undefined ? onFailure : ( + (error) => { + notify( + typeof error === "string" ? error : ( + error.message || "ra.notification.http_error" + ), + "warning", + { + _: + typeof error === "string" ? error + : error && error.message ? error.message + : undefined, + }, + ); + refresh(); + } + ), +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" ? + (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = + condition1 ? value1 + : condition2 ? value2 + : condition3 ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? <ButtonStorybook /> + : match.params.storyId === "color" ? <ColorBook /> + : match.params.storyId === "typography" ? <TypographyBook /> + : match.params.storyId === "loading" ? <LoaderStorybook /> + : match.params.storyId === "deal-list" ? <DealListStory /> + : <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message>; + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessage = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" ? + 1 //'Payment completed successfully' + : state == "processing" ? + 2 //'Payment processing' + : state == "invalid_cvc" ? + 3 //'There was an issue with your CVC number' + : ( + true //state == 'invalid_expiry' + ) ? + 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record ? "-record" + : medals[0].unique ? "-unique" + : medals[0].type) + } + > + {medals[0].record ? + i18n("Record") + : medals[0].unique ? + i18n("Unique") + : medals[0].type === 0 ? + i18n("Silver") + : medals[0].type === 1 ? + i18n("Gold") + : medals[0].type === 2 ? + i18n("Platinum") + : i18n("Theme")} + </div> +); + +a ? literalline +: ( + { + 123: 12, + } +) ? + line +: softline; + +const config = { + onFailure: + onFailure !== undefined ? onFailure : ( + (error) => { + notify( + typeof error === "string" ? error : ( + error.message || "ra.notification.http_error" + ), + "warning", + { + _: + typeof error === "string" ? error + : error && error.message ? error.message + : undefined, + }, + ); + refresh(); + } + ), +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" ? + (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = + condition1 ? value1 + : condition2 ? value2 + : condition3 ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? <ButtonStorybook /> + : match.params.storyId === "color" ? <ColorBook /> + : match.params.storyId === "typography" ? <TypographyBook /> + : match.params.storyId === "loading" ? <LoaderStorybook /> + : match.params.storyId === "deal-list" ? <DealListStory /> + : <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message>; + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessage = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" ? + 1 //'Payment completed successfully' + : state == "processing" ? + 2 //'Payment processing' + : state == "invalid_cvc" ? + 3 //'There was an issue with your CVC number' + : ( + true //state == 'invalid_expiry' + ) ? + 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record ? "-record" + : medals[0].unique ? "-unique" + : medals[0].type) + } + > + {medals[0].record ? + i18n("Record") + : medals[0].unique ? + i18n("Unique") + : medals[0].type === 0 ? + i18n("Silver") + : medals[0].type === 1 ? + i18n("Gold") + : medals[0].type === 2 ? + i18n("Platinum") + : i18n("Theme")} + </div> +); + +a ? literalline +: ( + { + 123: 12, + } +) ? + line +: softline; + +const config = { + onFailure: + onFailure !== undefined ? onFailure : ( + (error) => { + notify( + typeof error === "string" ? error : ( + error.message || "ra.notification.http_error" + ), + "warning", + { + _: + typeof error === "string" ? error + : error && error.message ? error.message + : undefined, + }, + ); + refresh(); + } + ), +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" ? + (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = + condition1 ? value1 + : condition2 ? value2 + : condition3 ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? <ButtonStorybook /> + : match.params.storyId === "color" ? <ColorBook /> + : match.params.storyId === "typography" ? <TypographyBook /> + : match.params.storyId === "loading" ? <LoaderStorybook /> + : match.params.storyId === "deal-list" ? <DealListStory /> + : <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message>; + +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +const paymentMessage = + state == "success" ? "Payment completed successfully" + : state == "processing" ? "Payment processing" + : state == "invalid_cvc" ? "There was an issue with your CVC number" + : state == "invalid_expiry" ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" ? + 1 //'Payment completed successfully' + : state == "processing" ? + 2 //'Payment processing' + : state == "invalid_cvc" ? + 3 //'There was an issue with your CVC number' + : ( + true //state == 'invalid_expiry' + ) ? + 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record ? "-record" + : medals[0].unique ? "-unique" + : medals[0].type) + } + > + {medals[0].record ? + i18n("Record") + : medals[0].unique ? + i18n("Unique") + : medals[0].type === 0 ? + i18n("Silver") + : medals[0].type === 1 ? + i18n("Gold") + : medals[0].type === 2 ? + i18n("Platinum") + : i18n("Theme")} + </div> +); + +a ? literalline +: ( + { + 123: 12, + } +) ? + line +: softline; + +const config = { + onFailure: + onFailure !== undefined ? onFailure : ( + (error) => { + notify( + typeof error === "string" ? error : ( + error.message || "ra.notification.http_error" + ), + "warning", + { + _: + typeof error === "string" ? error + : error && error.message ? error.message + : undefined, + }, + ); + refresh(); + } + ), +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" + ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = condition1 + ? value1 + : condition2 + ? value2 + : condition3 + ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? ( + <ButtonStorybook /> + ) : match.params.storyId === "color" ? ( + <ColorBook /> + ) : match.params.storyId === "typography" ? ( + <TypographyBook /> + ) : match.params.storyId === "loading" ? ( + <LoaderStorybook /> + ) : match.params.storyId === "deal-list" ? ( + <DealListStory /> + ) : ( + <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message> + ); + +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +const paymentMessage = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number" + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" + ? 1 //'Payment completed successfully' + : state == "processing" + ? 2 //'Payment processing' + : state == "invalid_cvc" + ? 3 //'There was an issue with your CVC number' + : true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record + ? "-record" + : medals[0].unique + ? "-unique" + : medals[0].type) + } + > + {medals[0].record + ? i18n("Record") + : medals[0].unique + ? i18n("Unique") + : medals[0].type === 0 + ? i18n("Silver") + : medals[0].type === 1 + ? i18n("Gold") + : medals[0].type === 2 + ? i18n("Platinum") + : i18n("Theme")} + </div> +); + +a + ? literalline + : { + 123: 12, + } + ? line + : softline; + +const config = { + onFailure: + onFailure !== undefined + ? onFailure + : (error) => { + notify( + typeof error === "string" + ? error + : error.message || "ra.notification.http_error", + "warning", + { + _: + typeof error === "string" + ? error + : error && error.message + ? error.message + : undefined, + }, + ); + refresh(); + }, +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" + ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = condition1 + ? value1 + : condition2 + ? value2 + : condition3 + ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? ( + <ButtonStorybook /> + ) : match.params.storyId === "color" ? ( + <ColorBook /> + ) : match.params.storyId === "typography" ? ( + <TypographyBook /> + ) : match.params.storyId === "loading" ? ( + <LoaderStorybook /> + ) : match.params.storyId === "deal-list" ? ( + <DealListStory /> + ) : ( + <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message> + ); + +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +const paymentMessage = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number" + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" + ? 1 //'Payment completed successfully' + : state == "processing" + ? 2 //'Payment processing' + : state == "invalid_cvc" + ? 3 //'There was an issue with your CVC number' + : true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record + ? "-record" + : medals[0].unique + ? "-unique" + : medals[0].type) + } + > + {medals[0].record + ? i18n("Record") + : medals[0].unique + ? i18n("Unique") + : medals[0].type === 0 + ? i18n("Silver") + : medals[0].type === 1 + ? i18n("Gold") + : medals[0].type === 2 + ? i18n("Platinum") + : i18n("Theme")} + </div> +); + +a + ? literalline + : { + 123: 12, + } + ? line + : softline; + +const config = { + onFailure: + onFailure !== undefined + ? onFailure + : (error) => { + notify( + typeof error === "string" + ? error + : error.message || "ra.notification.http_error", + "warning", + { + _: + typeof error === "string" + ? error + : error && error.message + ? error.message + : undefined, + }, + ); + refresh(); + }, +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" + ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = condition1 + ? value1 + : condition2 + ? value2 + : condition3 + ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? ( + <ButtonStorybook /> + ) : match.params.storyId === "color" ? ( + <ColorBook /> + ) : match.params.storyId === "typography" ? ( + <TypographyBook /> + ) : match.params.storyId === "loading" ? ( + <LoaderStorybook /> + ) : match.params.storyId === "deal-list" ? ( + <DealListStory /> + ) : ( + <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message> + ); + +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +const paymentMessage = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number" + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" + ? 1 //'Payment completed successfully' + : state == "processing" + ? 2 //'Payment processing' + : state == "invalid_cvc" + ? 3 //'There was an issue with your CVC number' + : true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record + ? "-record" + : medals[0].unique + ? "-unique" + : medals[0].type) + } + > + {medals[0].record + ? i18n("Record") + : medals[0].unique + ? i18n("Unique") + : medals[0].type === 0 + ? i18n("Silver") + : medals[0].type === 1 + ? i18n("Gold") + : medals[0].type === 2 + ? i18n("Platinum") + : i18n("Theme")} + </div> +); + +a + ? literalline + : { + 123: 12, + } + ? line + : softline; + +const config = { + onFailure: + onFailure !== undefined + ? onFailure + : (error) => { + notify( + typeof error === "string" + ? error + : error.message || "ra.notification.http_error", + "warning", + { + _: + typeof error === "string" + ? error + : error && error.message + ? error.message + : undefined, + }, + ); + refresh(); + }, +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let icecream = what == "cone" + ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` + : p => \`here's your \${p} \${what}\`; + +const value = condition1 +? value1 +: condition2 + ? value2 + : condition3 + ? value3 + : value4; + + +const StorybookLoader = ({ match }) => ( + match.params.storyId === "button" + ? <ButtonStorybook /> + : match.params.storyId === "color" + ? <ColorBook /> + : match.params.storyId === "typography" + ? <TypographyBook /> + : match.params.storyId === "loading" + ? <LoaderStorybook /> + : match.params.storyId === "deal-list" + ? <DealListStory /> + : ( + <Message> + <Title>{'Missing story book'}</Title> + <Content> + <BackButton/> + </Content> + </Message> + ) +) + +const message = + i % 3 === 0 && i % 5 === 0 ? + 'fizzbuzz' + : i % 3 === 0 ? + 'fizz' + : i % 5 === 0 ? + 'buzz' + : + String(i) + +const paymentMessage = state == 'success' + ? 'Payment completed successfully' + +: state == 'processing' + ? 'Payment processing' + +: state == 'invalid_cvc' + ? 'There was an issue with your CVC number' + +: state == 'invalid_expiry' + ? 'Expiry must be sometime in the past.' + + : 'There was an issue with the payment. Please contact support.' + +const paymentMessage2 = state == 'success' + ? 1 //'Payment completed successfully' + +: state == 'processing' + ? 2 //'Payment processing' + +: state == 'invalid_cvc' + ? 3 //'There was an issue with your CVC number' + +: true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + + : 5 // 'There was an issue with the payment. Please contact support.' + +const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> + {medals[0].record ? ( + i18n('Record') + ) : medals[0].unique ? ( + i18n('Unique') + ) : medals[0].type === 0 ? ( + i18n('Silver') + ) : medals[0].type === 1 ? ( + i18n('Gold') + ) : medals[0].type === 2 ? ( + i18n('Platinum') + ) : ( + i18n('Theme') + )} +</div> + +a + ? literalline + : { + 123: 12 + } + ? line + : softline + +const config = { + onFailure: onFailure !== undefined ? onFailure : ( + error => { + notify( + typeof error === 'string' ? + error + : error.message || 'ra.notification.http_error', + 'warning', + { + _: + typeof error === 'string' ? error + : error && error.message ? error.message + : undefined, + } + ); + refresh(); + } + ) +} + +showNotification( + typeof error === 'string' ? error : error.message || body, + level || 'warning', + { + messageArgs, + undoable: false, + } +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +=====================================output===================================== +let icecream = + what == "cone" + ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) + : (p) => \`here's your \${p} \${what}\`; + +const value = condition1 + ? value1 + : condition2 + ? value2 + : condition3 + ? value3 + : value4; + +const StorybookLoader = ({ match }) => + match.params.storyId === "button" ? ( + <ButtonStorybook /> + ) : match.params.storyId === "color" ? ( + <ColorBook /> + ) : match.params.storyId === "typography" ? ( + <TypographyBook /> + ) : match.params.storyId === "loading" ? ( + <LoaderStorybook /> + ) : match.params.storyId === "deal-list" ? ( + <DealListStory /> + ) : ( + <Message> + <Title>{"Missing story book"}</Title> + <Content> + <BackButton /> + </Content> + </Message> + ); + +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +const paymentMessage = + state == "success" + ? "Payment completed successfully" + : state == "processing" + ? "Payment processing" + : state == "invalid_cvc" + ? "There was an issue with your CVC number" + : state == "invalid_expiry" + ? "Expiry must be sometime in the past." + : "There was an issue with the payment. Please contact support."; + +const paymentMessage2 = + state == "success" + ? 1 //'Payment completed successfully' + : state == "processing" + ? 2 //'Payment processing' + : state == "invalid_cvc" + ? 3 //'There was an issue with your CVC number' + : true //state == 'invalid_expiry' + ? 4 //'Expiry must be sometime in the past.' + : 5; // 'There was an issue with the payment. Please contact support.' + +const foo = ( + <div + className={ + "match-achievement-medal-type type" + + (medals[0].record + ? "-record" + : medals[0].unique + ? "-unique" + : medals[0].type) + } + > + {medals[0].record + ? i18n("Record") + : medals[0].unique + ? i18n("Unique") + : medals[0].type === 0 + ? i18n("Silver") + : medals[0].type === 1 + ? i18n("Gold") + : medals[0].type === 2 + ? i18n("Platinum") + : i18n("Theme")} + </div> +); + +a + ? literalline + : { + 123: 12, + } + ? line + : softline; + +const config = { + onFailure: + onFailure !== undefined + ? onFailure + : (error) => { + notify( + typeof error === "string" + ? error + : error.message || "ra.notification.http_error", + "warning", + { + _: + typeof error === "string" + ? error + : error && error.message + ? error.message + : undefined, + }, + ); + refresh(); + }, +}; + +showNotification( + typeof error === "string" ? error : error.message || body, + level || "warning", + { + messageArgs, + undoable: false, + }, +); + +const result = + children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; + +================================================================================ +`; + +exports[`nested-in-condition.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = + ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) ? + kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay + ) ? + anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = + ( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie + ) ? + true ? true + : false + : true ? true + : false; + +( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +: <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2>; + +================================================================================ +`; + +exports[`nested-in-condition.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = + ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) ? + kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay + ) ? + anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = + ( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie + ) ? + true ? true + : false + : true ? true + : false; + +( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +: <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2>; + +================================================================================ +`; + +exports[`nested-in-condition.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = + ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) ? + kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay + ) ? + anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = + ( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie + ) ? + true ? true + : false + : true ? true + : false; + +( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +: <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2>; + +================================================================================ +`; + +exports[`nested-in-condition.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = + ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) ? + kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay + ) ? + anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = + ( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie + ) ? + true ? true + : false + : true ? true + : false; + +( + bifornCringerMoshedPerplexSawder ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +: <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2>; + +================================================================================ +`; + +exports[`nested-in-condition.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) + ? kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay +) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = ( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) + ? true + ? true + : false + : true + ? true + : false; + +( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +================================================================================ +`; + +exports[`nested-in-condition.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) + ? kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay +) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = ( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) + ? true + ? true + : false + : true + ? true + : false; + +( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +================================================================================ +`; + +exports[`nested-in-condition.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) + ? kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay +) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = ( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) + ? true + ? true + : false + : true + ? true + : false; + +( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +================================================================================ +`; + +exports[`nested-in-condition.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) +? kochabCooieGameOnOboleUnweave +: annularCooeedSplicesWalksWayWay) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = (bifornCringerMoshedPerplexSawder +? askTrovenaBeenaDependsRowans +: glimseGlyphsHazardNoopsTieTie) + ? true + ? true + : false + : true + ? true + : false; + +(bifornCringerMoshedPerplexSawder ? ( + askTrovenaBeenaDependsRowans +) : ( + glimseGlyphsHazardNoopsTieTie +)) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +=====================================output===================================== +$var = ( + $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) + ? kochabCooieGameOnOboleUnweave + : annularCooeedSplicesWalksWayWay +) + ? anodyneCondosMalateOverateRetinol + : averredBathersBoxroomBuggyNurl; + +const value = ( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) + ? true + ? true + : false + : true + ? true + : false; + +( + bifornCringerMoshedPerplexSawder + ? askTrovenaBeenaDependsRowans + : glimseGlyphsHazardNoopsTieTie +) ? ( + <Element> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + <Sub /> + </Element> +) : ( + <Element2> + <Sub /> + <Sub /> + <Sub /> + </Element2> +); + +================================================================================ +`; + +exports[`parenthesis.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? + this.state.isVisible ? + "partially visible" + : "hidden" +: null; +debug ? + this.state.isVisible && somethingComplex ? + "partially visible" + : "hidden" +: null; + +(a) => + a ? + () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? + this.state.isVisible ? + "partially visible" + : "hidden" +: null; +debug ? + this.state.isVisible && somethingComplex ? + "partially visible" + : "hidden" +: null; + +(a) => + a ? + () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? + this.state.isVisible ? + "partially visible" + : "hidden" +: null; +debug ? + this.state.isVisible && somethingComplex ? + "partially visible" + : "hidden" +: null; + +(a) => + a ? + () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? + this.state.isVisible ? + "partially visible" + : "hidden" +: null; +debug ? + this.state.isVisible && somethingComplex ? + "partially visible" + : "hidden" +: null; + +(a) => + a ? + () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; +debug + ? this.state.isVisible && somethingComplex + ? "partially visible" + : "hidden" + : null; + +(a) => + a + ? () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; +debug + ? this.state.isVisible && somethingComplex + ? "partially visible" + : "hidden" + : null; + +(a) => + a + ? () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; +debug + ? this.state.isVisible && somethingComplex + ? "partially visible" + : "hidden" + : null; + +(a) => + a + ? () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`parenthesis.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +debug ? this.state.isVisible ? "partially visible" : "hidden" : null; +debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; + +a => a ? () => {a} : () => {a} +a => a ? a : a +a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a + +=====================================output===================================== +debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; +debug + ? this.state.isVisible && somethingComplex + ? "partially visible" + : "hidden" + : null; + +(a) => + a + ? () => { + a; + } + : () => { + a; + }; +(a) => (a ? a : a); +(a) => + a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; + +================================================================================ +`; + +exports[`test.js - {"experimentalTernaries":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = + conditionIsTruthy ? shortThing : ( + { some: "long", object: "with", lots: "of", stuff } + ); + +const obj3 = + conditionIsTruthy ? + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = + conditionIsTruthy ? shortThing : ( + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + ); + +const obj5 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"experimentalTernaries":true,"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = + conditionIsTruthy ? shortThing : ( + { some: "long", object: "with", lots: "of", stuff } + ); + +const obj3 = + conditionIsTruthy ? + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = + conditionIsTruthy ? shortThing : ( + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + ); + +const obj5 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"experimentalTernaries":true,"useTabs":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = + conditionIsTruthy ? shortThing : ( + { some: "long", object: "with", lots: "of", stuff } + ); + +const obj3 = + conditionIsTruthy ? + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = + conditionIsTruthy ? shortThing : ( + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + ); + +const obj5 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = + conditionIsTruthy ? shortThing : ( + { some: "long", object: "with", lots: "of", stuff } + ); + +const obj3 = + conditionIsTruthy ? + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = + conditionIsTruthy ? shortThing : ( + { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + ); + +const obj5 = + conditionIsTruthy ? + { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = conditionIsTruthy + ? shortThing + : { some: "long", object: "with", lots: "of", stuff }; + +const obj3 = conditionIsTruthy + ? { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = conditionIsTruthy + ? shortThing + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +const obj5 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"useTabs":true,"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +tabWidth: 4 +useTabs: true + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = conditionIsTruthy + ? shortThing + : { some: "long", object: "with", lots: "of", stuff }; + +const obj3 = conditionIsTruthy + ? { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = conditionIsTruthy + ? shortThing + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +const obj5 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js - {"useTabs":true} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +useTabs: true + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = conditionIsTruthy + ? shortThing + : { some: "long", object: "with", lots: "of", stuff }; + +const obj3 = conditionIsTruthy + ? { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = conditionIsTruthy + ? shortThing + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +const obj5 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing + +const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing + +const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } + +const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing + +const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } + +=====================================output===================================== +const obj0 = conditionIsTruthy ? shortThing : otherShortThing; + +const obj1 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : shortThing; + +const obj2 = conditionIsTruthy + ? shortThing + : { some: "long", object: "with", lots: "of", stuff }; + +const obj3 = conditionIsTruthy + ? { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + } + : shortThing; + +const obj4 = conditionIsTruthy + ? shortThing + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +const obj5 = conditionIsTruthy + ? { some: "long", object: "with", lots: "of", stuff } + : { + some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", + object: "with", + lots: "of", + stuff, + }; + +================================================================================ +`; diff --git a/tests/format/js/ternaries/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/ternaries/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3de99ae7ae77..000000000000 --- a/tests/format/js/ternaries/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,6029 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binary.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -const funnelSnapshotCard = (report === MY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) - ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - : null; - -room = room.map((row, rowIndex) => ( - row.map((col, colIndex) => ( - (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 - )) -)) - -=====================================output===================================== -const funnelSnapshotCard = - (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( - <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - ) : null; - -room = room.map((row, rowIndex) => - row.map((col, colIndex) => - rowIndex === 0 || - colIndex === 0 || - rowIndex === height || - colIndex === width - ? 1 - : 0 - ) -); - -================================================================================ -`; - -exports[`binary.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -const funnelSnapshotCard = (report === MY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) - ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - : null; - -room = room.map((row, rowIndex) => ( - row.map((col, colIndex) => ( - (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 - )) -)) - -=====================================output===================================== -const funnelSnapshotCard = - (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( - <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - ) : null; - -room = room.map((row, rowIndex) => - row.map((col, colIndex) => - rowIndex === 0 || - colIndex === 0 || - rowIndex === height || - colIndex === width - ? 1 - : 0 - ) -); - -================================================================================ -`; - -exports[`binary.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -const funnelSnapshotCard = (report === MY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) - ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - : null; - -room = room.map((row, rowIndex) => ( - row.map((col, colIndex) => ( - (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 - )) -)) - -=====================================output===================================== -const funnelSnapshotCard = - (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( - <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - ) : null; - -room = room.map((row, rowIndex) => - row.map((col, colIndex) => - rowIndex === 0 || - colIndex === 0 || - rowIndex === height || - colIndex === width - ? 1 - : 0 - ) -); - -================================================================================ -`; - -exports[`binary.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const funnelSnapshotCard = (report === MY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) - ? <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - : null; - -room = room.map((row, rowIndex) => ( - row.map((col, colIndex) => ( - (rowIndex === 0 || colIndex === 0 || rowIndex === height || colIndex === width) ? 1 : 0 - )) -)) - -=====================================output===================================== -const funnelSnapshotCard = - (report === MY_OVERVIEW && !ReportGK.xar_metrics_active_capitol_v2) || - (report === COMPANY_OVERVIEW && - !ReportGK.xar_metrics_active_capitol_v2_company_metrics) ? ( - <ReportMetricsFunnelSnapshotCard metrics={metrics} /> - ) : null; - -room = room.map((row, rowIndex) => - row.map((col, colIndex) => - rowIndex === 0 || - colIndex === 0 || - rowIndex === height || - colIndex === width - ? 1 - : 0 - ) -); - -================================================================================ -`; - -exports[`func-call.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -=====================================output===================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -================================================================================ -`; - -exports[`func-call.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -=====================================output===================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -================================================================================ -`; - -exports[`func-call.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -=====================================output===================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -================================================================================ -`; - -exports[`func-call.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -=====================================output===================================== -fn( - bifornCringerMoshedPerplexSawder, - askTrovenaBeenaDependsRowans, - glimseGlyphsHazardNoopsTieTie === averredBathersBoxroomBuggyNurl && - anodyneCondosMalateOverateRetinol - ? annularCooeedSplicesWalksWayWay - : kochabCooieGameOnOboleUnweave -); -// TODO(rattrayalex): try to indent consequent/alternate here. - -================================================================================ -`; - -exports[`indent.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -a - ? { - a: 0 - } - : { - a: { - a: 0 - } - ? { - a: 0 - } - : { - y: { - a: 0 - } - ? { - a: 0 - } - : { - a: 0 - } - } - } - -a - ? { - a: function() { - return a - ? { - a: [ - a - ? { - a: 0, - b: [ - a - ? [ - 0, - 1 - ] - : [] - ] - } - : [ - [ - 0, - { - a: 0 - }, - a - ? 0 - : 1 - ], - function() { - return a - ? { - a: 0 - } - : [ - { - a: 0 - }, - {} - ]; - } - ] - ] - } - : [ - a - ? function() { - a - ? a( - a - ? { - a: a( - { - a: 0 - } - ) - } - : [ - 0, - a(), - a( - a(), - { - a: 0 - }, - a - ? a() - : a( - { - a: 0 - } - ) - ), - a() - ? { - a: a(), - b: [] - } - : {} - ] - ): - a( - a() - ? { - a: 0 - } - : (function(a) { - return a() - ? [ - { - a: 0, - b: a() - } - ] - : a( - [ - a - ? { - a: 0 - } - : {}, - { - a: 0 - } - ] - ); - })( - a - ? function(a) { - return function() { - return 0; - }; - } - : function(a) { - return function() { - return 1; - } - } - ) - ); - } - : function() { - - } - ]; - } - } - : a; - -=====================================output===================================== -aaaaaaaaaaaaaaa - ? bbbbbbbbbbbbbbbbbb - : ccccccccccccccc - ? ddddddddddddddd - : eeeeeeeeeeeeeee - ? fffffffffffffff - : gggggggggggggggg; - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; - -a - ? { - a: 0, - } - : { - a: { - a: 0, - } - ? { - a: 0, - } - : { - y: { - a: 0, - } - ? { - a: 0, - } - : { - a: 0, - }, - }, - }; - -a - ? { - a: function () { - return a - ? { - a: [ - a - ? { - a: 0, - b: [a ? [0, 1] : []], - } - : [ - [ - 0, - { - a: 0, - }, - a ? 0 : 1, - ], - function () { - return a - ? { - a: 0, - } - : [ - { - a: 0, - }, - {}, - ]; - }, - ], - ], - } - : [ - a - ? function () { - a - ? a( - a - ? { - a: a({ - a: 0, - }), - } - : [ - 0, - a(), - a( - a(), - { - a: 0, - }, - a - ? a() - : a({ - a: 0, - }) - ), - a() - ? { - a: a(), - b: [], - } - : {}, - ] - ) - : a( - a() - ? { - a: 0, - } - : (function (a) { - return a() - ? [ - { - a: 0, - b: a(), - }, - ] - : a([ - a - ? { - a: 0, - } - : {}, - { - a: 0, - }, - ]); - })( - a - ? function (a) { - return function () { - return 0; - }; - } - : function (a) { - return function () { - return 1; - }; - } - ) - ); - } - : function () {}, - ]; - }, - } - : a; - -================================================================================ -`; - -exports[`indent.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -a - ? { - a: 0 - } - : { - a: { - a: 0 - } - ? { - a: 0 - } - : { - y: { - a: 0 - } - ? { - a: 0 - } - : { - a: 0 - } - } - } - -a - ? { - a: function() { - return a - ? { - a: [ - a - ? { - a: 0, - b: [ - a - ? [ - 0, - 1 - ] - : [] - ] - } - : [ - [ - 0, - { - a: 0 - }, - a - ? 0 - : 1 - ], - function() { - return a - ? { - a: 0 - } - : [ - { - a: 0 - }, - {} - ]; - } - ] - ] - } - : [ - a - ? function() { - a - ? a( - a - ? { - a: a( - { - a: 0 - } - ) - } - : [ - 0, - a(), - a( - a(), - { - a: 0 - }, - a - ? a() - : a( - { - a: 0 - } - ) - ), - a() - ? { - a: a(), - b: [] - } - : {} - ] - ): - a( - a() - ? { - a: 0 - } - : (function(a) { - return a() - ? [ - { - a: 0, - b: a() - } - ] - : a( - [ - a - ? { - a: 0 - } - : {}, - { - a: 0 - } - ] - ); - })( - a - ? function(a) { - return function() { - return 0; - }; - } - : function(a) { - return function() { - return 1; - } - } - ) - ); - } - : function() { - - } - ]; - } - } - : a; - -=====================================output===================================== -aaaaaaaaaaaaaaa - ? bbbbbbbbbbbbbbbbbb - : ccccccccccccccc - ? ddddddddddddddd - : eeeeeeeeeeeeeee - ? fffffffffffffff - : gggggggggggggggg; - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; - -a - ? { - a: 0, - } - : { - a: { - a: 0, - } - ? { - a: 0, - } - : { - y: { - a: 0, - } - ? { - a: 0, - } - : { - a: 0, - }, - }, - }; - -a - ? { - a: function () { - return a - ? { - a: [ - a - ? { - a: 0, - b: [a ? [0, 1] : []], - } - : [ - [ - 0, - { - a: 0, - }, - a ? 0 : 1, - ], - function () { - return a - ? { - a: 0, - } - : [ - { - a: 0, - }, - {}, - ]; - }, - ], - ], - } - : [ - a - ? function () { - a - ? a( - a - ? { - a: a({ - a: 0, - }), - } - : [ - 0, - a(), - a( - a(), - { - a: 0, - }, - a - ? a() - : a({ - a: 0, - }) - ), - a() - ? { - a: a(), - b: [], - } - : {}, - ] - ) - : a( - a() - ? { - a: 0, - } - : (function (a) { - return a() - ? [ - { - a: 0, - b: a(), - }, - ] - : a([ - a - ? { - a: 0, - } - : {}, - { - a: 0, - }, - ]); - })( - a - ? function ( - a - ) { - return function () { - return 0; - }; - } - : function ( - a - ) { - return function () { - return 1; - }; - } - ) - ); - } - : function () {}, - ]; - }, - } - : a; - -================================================================================ -`; - -exports[`indent.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -a - ? { - a: 0 - } - : { - a: { - a: 0 - } - ? { - a: 0 - } - : { - y: { - a: 0 - } - ? { - a: 0 - } - : { - a: 0 - } - } - } - -a - ? { - a: function() { - return a - ? { - a: [ - a - ? { - a: 0, - b: [ - a - ? [ - 0, - 1 - ] - : [] - ] - } - : [ - [ - 0, - { - a: 0 - }, - a - ? 0 - : 1 - ], - function() { - return a - ? { - a: 0 - } - : [ - { - a: 0 - }, - {} - ]; - } - ] - ] - } - : [ - a - ? function() { - a - ? a( - a - ? { - a: a( - { - a: 0 - } - ) - } - : [ - 0, - a(), - a( - a(), - { - a: 0 - }, - a - ? a() - : a( - { - a: 0 - } - ) - ), - a() - ? { - a: a(), - b: [] - } - : {} - ] - ): - a( - a() - ? { - a: 0 - } - : (function(a) { - return a() - ? [ - { - a: 0, - b: a() - } - ] - : a( - [ - a - ? { - a: 0 - } - : {}, - { - a: 0 - } - ] - ); - })( - a - ? function(a) { - return function() { - return 0; - }; - } - : function(a) { - return function() { - return 1; - } - } - ) - ); - } - : function() { - - } - ]; - } - } - : a; - -=====================================output===================================== -aaaaaaaaaaaaaaa - ? bbbbbbbbbbbbbbbbbb - : ccccccccccccccc - ? ddddddddddddddd - : eeeeeeeeeeeeeee - ? fffffffffffffff - : gggggggggggggggg; - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; - -a - ? { - a: 0, - } - : { - a: { - a: 0, - } - ? { - a: 0, - } - : { - y: { - a: 0, - } - ? { - a: 0, - } - : { - a: 0, - }, - }, - }; - -a - ? { - a: function () { - return a - ? { - a: [ - a - ? { - a: 0, - b: [a ? [0, 1] : []], - } - : [ - [ - 0, - { - a: 0, - }, - a ? 0 : 1, - ], - function () { - return a - ? { - a: 0, - } - : [ - { - a: 0, - }, - {}, - ]; - }, - ], - ], - } - : [ - a - ? function () { - a - ? a( - a - ? { - a: a({ - a: 0, - }), - } - : [ - 0, - a(), - a( - a(), - { - a: 0, - }, - a - ? a() - : a({ - a: 0, - }) - ), - a() - ? { - a: a(), - b: [], - } - : {}, - ] - ) - : a( - a() - ? { - a: 0, - } - : (function (a) { - return a() - ? [ - { - a: 0, - b: a(), - }, - ] - : a([ - a - ? { - a: 0, - } - : {}, - { - a: 0, - }, - ]); - })( - a - ? function (a) { - return function () { - return 0; - }; - } - : function (a) { - return function () { - return 1; - }; - } - ) - ); - } - : function () {}, - ]; - }, - } - : a; - -================================================================================ -`; - -exports[`indent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -aaaaaaaaaaaaaaa ? bbbbbbbbbbbbbbbbbb : ccccccccccccccc ? ddddddddddddddd : eeeeeeeeeeeeeee ? fffffffffffffff : gggggggggggggggg - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -? -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -: -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -a - ? { - a: 0 - } - : { - a: { - a: 0 - } - ? { - a: 0 - } - : { - y: { - a: 0 - } - ? { - a: 0 - } - : { - a: 0 - } - } - } - -a - ? { - a: function() { - return a - ? { - a: [ - a - ? { - a: 0, - b: [ - a - ? [ - 0, - 1 - ] - : [] - ] - } - : [ - [ - 0, - { - a: 0 - }, - a - ? 0 - : 1 - ], - function() { - return a - ? { - a: 0 - } - : [ - { - a: 0 - }, - {} - ]; - } - ] - ] - } - : [ - a - ? function() { - a - ? a( - a - ? { - a: a( - { - a: 0 - } - ) - } - : [ - 0, - a(), - a( - a(), - { - a: 0 - }, - a - ? a() - : a( - { - a: 0 - } - ) - ), - a() - ? { - a: a(), - b: [] - } - : {} - ] - ): - a( - a() - ? { - a: 0 - } - : (function(a) { - return a() - ? [ - { - a: 0, - b: a() - } - ] - : a( - [ - a - ? { - a: 0 - } - : {}, - { - a: 0 - } - ] - ); - })( - a - ? function(a) { - return function() { - return 0; - }; - } - : function(a) { - return function() { - return 1; - } - } - ) - ); - } - : function() { - - } - ]; - } - } - : a; - -=====================================output===================================== -aaaaaaaaaaaaaaa - ? bbbbbbbbbbbbbbbbbb - : ccccccccccccccc - ? ddddddddddddddd - : eeeeeeeeeeeeeee - ? fffffffffffffff - : gggggggggggggggg; - -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; - -a - ? { - a: 0, - } - : { - a: { - a: 0, - } - ? { - a: 0, - } - : { - y: { - a: 0, - } - ? { - a: 0, - } - : { - a: 0, - }, - }, - }; - -a - ? { - a: function () { - return a - ? { - a: [ - a - ? { - a: 0, - b: [a ? [0, 1] : []], - } - : [ - [ - 0, - { - a: 0, - }, - a ? 0 : 1, - ], - function () { - return a - ? { - a: 0, - } - : [ - { - a: 0, - }, - {}, - ]; - }, - ], - ], - } - : [ - a - ? function () { - a - ? a( - a - ? { - a: a({ - a: 0, - }), - } - : [ - 0, - a(), - a( - a(), - { - a: 0, - }, - a - ? a() - : a({ - a: 0, - }) - ), - a() - ? { - a: a(), - b: [], - } - : {}, - ] - ) - : a( - a() - ? { - a: 0, - } - : (function (a) { - return a() - ? [ - { - a: 0, - b: a(), - }, - ] - : a([ - a - ? { - a: 0, - } - : {}, - { - a: 0, - }, - ]); - })( - a - ? function (a) { - return function () { - return 0; - }; - } - : function (a) { - return function () { - return 1; - }; - } - ) - ); - } - : function () {}, - ]; - }, - } - : a; - -================================================================================ -`; - -exports[`indent-after-paren.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -function foo10() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo11() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo12() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -=====================================output===================================== -foo7 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -function foo10() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo11() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo12() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -foo13 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo25 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol -).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.()?.()?.(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -================================================================================ -`; - -exports[`indent-after-paren.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -function foo10() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo11() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo12() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -=====================================output===================================== -foo7 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -function foo10() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo11() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo12() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -foo13 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo25 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol -).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.()?.()?.(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -================================================================================ -`; - -exports[`indent-after-paren.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -function foo10() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo11() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo12() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -=====================================output===================================== -foo7 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -function foo10() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo11() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo12() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -foo13 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo25 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol -).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.()?.()?.(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -================================================================================ -`; - -exports[`indent-after-paren.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo7 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; - -function foo10() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo11() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -function foo12() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo]; -} - -foo13 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); -} - -foo25 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)(Fooooooooooo.Fooooooooooo); - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz).Fooooooooooo.Fooooooooooo; - yield (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol).Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo)); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)?.()?.()?.(); - -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -) - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -=====================================output===================================== -foo7 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -foo8 = (condition ? firstValue : secondValue)[SomeType]; - -const foo9 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)[Fooooooooooo]; - -function foo10() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo11() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -function foo12() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo]; -} - -foo13 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -foo14 = (condition ? firstValue : secondValue)[SomeType]; - -const foo15 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -).Fooooooooooo.Fooooooooooo; - -function foo16() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo17() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -function foo18() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; -} - -foo19 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -foo20 = (condition ? firstValue : secondValue)[SomeType]; - -const foo21 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo22() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo23() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo24() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo25 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -foo26 = (condition ? firstValue : secondValue)[SomeType]; - -const foo27 = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.(Fooooooooooo.Fooooooooooo); - -function foo28() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo29() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function foo30() { - void ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); -} - -function* foo31() { - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )?.(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ).Fooooooooooo.Fooooooooooo; - yield ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )[Fooooooooooo.Fooooooooooo]; -} - -const foo32 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -function foo33() { - return new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo34() { - throw new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -function foo35() { - void new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - )(Fooooooooooo.Fooooooooooo); -} - -foo36 = new ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)[AnnularCooeedSplicesWalksWayWay]; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).Fooooooooooo.Fooooooooooo; - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - (glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol)(Fooooooooooo.Fooooooooooo); -// TODO(rattrayalex): try to fix this case - -bifornCringerMoshedPerplexSawder = ( - glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol -).annularCooeedSplicesWalksWayWay - .annularCooeedSplicesWalksWayWay(annularCooeedSplicesWalksWayWay) - .annularCooeedSplicesWalksWayWay(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)?.()?.()?.(); - -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -)()()(); - -foo = - foo.bar.baz[ - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ]; - -const decorated = (arg, ignoreRequestError) => { - return ( - typeof arg === "string" || - (arg && arg.valueOf && typeof arg.valueOf() === "string") - ? $delegate(arg, ignoreRequestError) - : handleAsyncOperations(arg, ignoreRequestError) - ).foo(); -}; - -bifornCringerMoshedPerplexSawder = fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -fn?.( - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -); - -bifornCringerMoshedPerplexSawder = - fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -bifornCringerMoshedPerplexSawder = - fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop - ]; - -fn?.[ - (glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol - ).prop -]; - -================================================================================ -`; - -exports[`nested.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -let icecream = what == "cone" - ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` - : p => \`here's your \${p} \${what}\`; - -const value = condition1 -? value1 -: condition2 - ? value2 - : condition3 - ? value3 - : value4; - - -const StorybookLoader = ({ match }) => ( - match.params.storyId === "button" - ? <ButtonStorybook /> - : match.params.storyId === "color" - ? <ColorBook /> - : match.params.storyId === "typography" - ? <TypographyBook /> - : match.params.storyId === "loading" - ? <LoaderStorybook /> - : match.params.storyId === "deal-list" - ? <DealListStory /> - : ( - <Message> - <Title>{'Missing story book'}</Title> - <Content> - <BackButton/> - </Content> - </Message> - ) -) - -const message = - i % 3 === 0 && i % 5 === 0 ? - 'fizzbuzz' - : i % 3 === 0 ? - 'fizz' - : i % 5 === 0 ? - 'buzz' - : - String(i) - -const paymentMessage = state == 'success' - ? 'Payment completed successfully' - -: state == 'processing' - ? 'Payment processing' - -: state == 'invalid_cvc' - ? 'There was an issue with your CVC number' - -: state == 'invalid_expiry' - ? 'Expiry must be sometime in the past.' - - : 'There was an issue with the payment. Please contact support.' - -const paymentMessage2 = state == 'success' - ? 1 //'Payment completed successfully' - -: state == 'processing' - ? 2 //'Payment processing' - -: state == 'invalid_cvc' - ? 3 //'There was an issue with your CVC number' - -: true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - - : 5 // 'There was an issue with the payment. Please contact support.' - -const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> - {medals[0].record ? ( - i18n('Record') - ) : medals[0].unique ? ( - i18n('Unique') - ) : medals[0].type === 0 ? ( - i18n('Silver') - ) : medals[0].type === 1 ? ( - i18n('Gold') - ) : medals[0].type === 2 ? ( - i18n('Platinum') - ) : ( - i18n('Theme') - )} -</div> - -a - ? literalline - : { - 123: 12 - } - ? line - : softline - -const config = { - onFailure: onFailure !== undefined ? onFailure : ( - error => { - notify( - typeof error === 'string' ? - error - : error.message || 'ra.notification.http_error', - 'warning', - { - _: - typeof error === 'string' ? error - : error && error.message ? error.message - : undefined, - } - ); - refresh(); - } - ) -} - -showNotification( - typeof error === 'string' ? error : error.message || body, - level || 'warning', - { - messageArgs, - undoable: false, - } -) -=====================================output===================================== -let icecream = - what == "cone" - ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) - : (p) => \`here's your \${p} \${what}\`; - -const value = condition1 - ? value1 - : condition2 - ? value2 - : condition3 - ? value3 - : value4; - -const StorybookLoader = ({ match }) => - match.params.storyId === "button" ? ( - <ButtonStorybook /> - ) : match.params.storyId === "color" ? ( - <ColorBook /> - ) : match.params.storyId === "typography" ? ( - <TypographyBook /> - ) : match.params.storyId === "loading" ? ( - <LoaderStorybook /> - ) : match.params.storyId === "deal-list" ? ( - <DealListStory /> - ) : ( - <Message> - <Title>{"Missing story book"}</Title> - <Content> - <BackButton /> - </Content> - </Message> - ); - -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -const paymentMessage = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number" - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessage2 = - state == "success" - ? 1 //'Payment completed successfully' - : state == "processing" - ? 2 //'Payment processing' - : state == "invalid_cvc" - ? 3 //'There was an issue with your CVC number' - : true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - : 5; // 'There was an issue with the payment. Please contact support.' - -const foo = ( - <div - className={ - "match-achievement-medal-type type" + - (medals[0].record - ? "-record" - : medals[0].unique - ? "-unique" - : medals[0].type) - } - > - {medals[0].record - ? i18n("Record") - : medals[0].unique - ? i18n("Unique") - : medals[0].type === 0 - ? i18n("Silver") - : medals[0].type === 1 - ? i18n("Gold") - : medals[0].type === 2 - ? i18n("Platinum") - : i18n("Theme")} - </div> -); - -a - ? literalline - : { - 123: 12, - } - ? line - : softline; - -const config = { - onFailure: - onFailure !== undefined - ? onFailure - : (error) => { - notify( - typeof error === "string" - ? error - : error.message || "ra.notification.http_error", - "warning", - { - _: - typeof error === "string" - ? error - : error && error.message - ? error.message - : undefined, - } - ); - refresh(); - }, -}; - -showNotification( - typeof error === "string" ? error : error.message || body, - level || "warning", - { - messageArgs, - undoable: false, - } -); - -================================================================================ -`; - -exports[`nested.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -let icecream = what == "cone" - ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` - : p => \`here's your \${p} \${what}\`; - -const value = condition1 -? value1 -: condition2 - ? value2 - : condition3 - ? value3 - : value4; - - -const StorybookLoader = ({ match }) => ( - match.params.storyId === "button" - ? <ButtonStorybook /> - : match.params.storyId === "color" - ? <ColorBook /> - : match.params.storyId === "typography" - ? <TypographyBook /> - : match.params.storyId === "loading" - ? <LoaderStorybook /> - : match.params.storyId === "deal-list" - ? <DealListStory /> - : ( - <Message> - <Title>{'Missing story book'}</Title> - <Content> - <BackButton/> - </Content> - </Message> - ) -) - -const message = - i % 3 === 0 && i % 5 === 0 ? - 'fizzbuzz' - : i % 3 === 0 ? - 'fizz' - : i % 5 === 0 ? - 'buzz' - : - String(i) - -const paymentMessage = state == 'success' - ? 'Payment completed successfully' - -: state == 'processing' - ? 'Payment processing' - -: state == 'invalid_cvc' - ? 'There was an issue with your CVC number' - -: state == 'invalid_expiry' - ? 'Expiry must be sometime in the past.' - - : 'There was an issue with the payment. Please contact support.' - -const paymentMessage2 = state == 'success' - ? 1 //'Payment completed successfully' - -: state == 'processing' - ? 2 //'Payment processing' - -: state == 'invalid_cvc' - ? 3 //'There was an issue with your CVC number' - -: true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - - : 5 // 'There was an issue with the payment. Please contact support.' - -const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> - {medals[0].record ? ( - i18n('Record') - ) : medals[0].unique ? ( - i18n('Unique') - ) : medals[0].type === 0 ? ( - i18n('Silver') - ) : medals[0].type === 1 ? ( - i18n('Gold') - ) : medals[0].type === 2 ? ( - i18n('Platinum') - ) : ( - i18n('Theme') - )} -</div> - -a - ? literalline - : { - 123: 12 - } - ? line - : softline - -const config = { - onFailure: onFailure !== undefined ? onFailure : ( - error => { - notify( - typeof error === 'string' ? - error - : error.message || 'ra.notification.http_error', - 'warning', - { - _: - typeof error === 'string' ? error - : error && error.message ? error.message - : undefined, - } - ); - refresh(); - } - ) -} - -showNotification( - typeof error === 'string' ? error : error.message || body, - level || 'warning', - { - messageArgs, - undoable: false, - } -) -=====================================output===================================== -let icecream = - what == "cone" - ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) - : (p) => \`here's your \${p} \${what}\`; - -const value = condition1 - ? value1 - : condition2 - ? value2 - : condition3 - ? value3 - : value4; - -const StorybookLoader = ({ match }) => - match.params.storyId === "button" ? ( - <ButtonStorybook /> - ) : match.params.storyId === "color" ? ( - <ColorBook /> - ) : match.params.storyId === "typography" ? ( - <TypographyBook /> - ) : match.params.storyId === "loading" ? ( - <LoaderStorybook /> - ) : match.params.storyId === "deal-list" ? ( - <DealListStory /> - ) : ( - <Message> - <Title>{"Missing story book"}</Title> - <Content> - <BackButton /> - </Content> - </Message> - ); - -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -const paymentMessage = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number" - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessage2 = - state == "success" - ? 1 //'Payment completed successfully' - : state == "processing" - ? 2 //'Payment processing' - : state == "invalid_cvc" - ? 3 //'There was an issue with your CVC number' - : true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - : 5; // 'There was an issue with the payment. Please contact support.' - -const foo = ( - <div - className={ - "match-achievement-medal-type type" + - (medals[0].record - ? "-record" - : medals[0].unique - ? "-unique" - : medals[0].type) - } - > - {medals[0].record - ? i18n("Record") - : medals[0].unique - ? i18n("Unique") - : medals[0].type === 0 - ? i18n("Silver") - : medals[0].type === 1 - ? i18n("Gold") - : medals[0].type === 2 - ? i18n("Platinum") - : i18n("Theme")} - </div> -); - -a - ? literalline - : { - 123: 12, - } - ? line - : softline; - -const config = { - onFailure: - onFailure !== undefined - ? onFailure - : (error) => { - notify( - typeof error === "string" - ? error - : error.message || "ra.notification.http_error", - "warning", - { - _: - typeof error === "string" - ? error - : error && error.message - ? error.message - : undefined, - } - ); - refresh(); - }, -}; - -showNotification( - typeof error === "string" ? error : error.message || body, - level || "warning", - { - messageArgs, - undoable: false, - } -); - -================================================================================ -`; - -exports[`nested.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -let icecream = what == "cone" - ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` - : p => \`here's your \${p} \${what}\`; - -const value = condition1 -? value1 -: condition2 - ? value2 - : condition3 - ? value3 - : value4; - - -const StorybookLoader = ({ match }) => ( - match.params.storyId === "button" - ? <ButtonStorybook /> - : match.params.storyId === "color" - ? <ColorBook /> - : match.params.storyId === "typography" - ? <TypographyBook /> - : match.params.storyId === "loading" - ? <LoaderStorybook /> - : match.params.storyId === "deal-list" - ? <DealListStory /> - : ( - <Message> - <Title>{'Missing story book'}</Title> - <Content> - <BackButton/> - </Content> - </Message> - ) -) - -const message = - i % 3 === 0 && i % 5 === 0 ? - 'fizzbuzz' - : i % 3 === 0 ? - 'fizz' - : i % 5 === 0 ? - 'buzz' - : - String(i) - -const paymentMessage = state == 'success' - ? 'Payment completed successfully' - -: state == 'processing' - ? 'Payment processing' - -: state == 'invalid_cvc' - ? 'There was an issue with your CVC number' - -: state == 'invalid_expiry' - ? 'Expiry must be sometime in the past.' - - : 'There was an issue with the payment. Please contact support.' - -const paymentMessage2 = state == 'success' - ? 1 //'Payment completed successfully' - -: state == 'processing' - ? 2 //'Payment processing' - -: state == 'invalid_cvc' - ? 3 //'There was an issue with your CVC number' - -: true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - - : 5 // 'There was an issue with the payment. Please contact support.' - -const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> - {medals[0].record ? ( - i18n('Record') - ) : medals[0].unique ? ( - i18n('Unique') - ) : medals[0].type === 0 ? ( - i18n('Silver') - ) : medals[0].type === 1 ? ( - i18n('Gold') - ) : medals[0].type === 2 ? ( - i18n('Platinum') - ) : ( - i18n('Theme') - )} -</div> - -a - ? literalline - : { - 123: 12 - } - ? line - : softline - -const config = { - onFailure: onFailure !== undefined ? onFailure : ( - error => { - notify( - typeof error === 'string' ? - error - : error.message || 'ra.notification.http_error', - 'warning', - { - _: - typeof error === 'string' ? error - : error && error.message ? error.message - : undefined, - } - ); - refresh(); - } - ) -} - -showNotification( - typeof error === 'string' ? error : error.message || body, - level || 'warning', - { - messageArgs, - undoable: false, - } -) -=====================================output===================================== -let icecream = - what == "cone" - ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) - : (p) => \`here's your \${p} \${what}\`; - -const value = condition1 - ? value1 - : condition2 - ? value2 - : condition3 - ? value3 - : value4; - -const StorybookLoader = ({ match }) => - match.params.storyId === "button" ? ( - <ButtonStorybook /> - ) : match.params.storyId === "color" ? ( - <ColorBook /> - ) : match.params.storyId === "typography" ? ( - <TypographyBook /> - ) : match.params.storyId === "loading" ? ( - <LoaderStorybook /> - ) : match.params.storyId === "deal-list" ? ( - <DealListStory /> - ) : ( - <Message> - <Title>{"Missing story book"}</Title> - <Content> - <BackButton /> - </Content> - </Message> - ); - -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -const paymentMessage = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number" - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessage2 = - state == "success" - ? 1 //'Payment completed successfully' - : state == "processing" - ? 2 //'Payment processing' - : state == "invalid_cvc" - ? 3 //'There was an issue with your CVC number' - : true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - : 5; // 'There was an issue with the payment. Please contact support.' - -const foo = ( - <div - className={ - "match-achievement-medal-type type" + - (medals[0].record - ? "-record" - : medals[0].unique - ? "-unique" - : medals[0].type) - } - > - {medals[0].record - ? i18n("Record") - : medals[0].unique - ? i18n("Unique") - : medals[0].type === 0 - ? i18n("Silver") - : medals[0].type === 1 - ? i18n("Gold") - : medals[0].type === 2 - ? i18n("Platinum") - : i18n("Theme")} - </div> -); - -a - ? literalline - : { - 123: 12, - } - ? line - : softline; - -const config = { - onFailure: - onFailure !== undefined - ? onFailure - : (error) => { - notify( - typeof error === "string" - ? error - : error.message || "ra.notification.http_error", - "warning", - { - _: - typeof error === "string" - ? error - : error && error.message - ? error.message - : undefined, - } - ); - refresh(); - }, -}; - -showNotification( - typeof error === "string" ? error : error.message || body, - level || "warning", - { - messageArgs, - undoable: false, - } -); - -================================================================================ -`; - -exports[`nested.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let icecream = what == "cone" - ? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\` - : p => \`here's your \${p} \${what}\`; - -const value = condition1 -? value1 -: condition2 - ? value2 - : condition3 - ? value3 - : value4; - - -const StorybookLoader = ({ match }) => ( - match.params.storyId === "button" - ? <ButtonStorybook /> - : match.params.storyId === "color" - ? <ColorBook /> - : match.params.storyId === "typography" - ? <TypographyBook /> - : match.params.storyId === "loading" - ? <LoaderStorybook /> - : match.params.storyId === "deal-list" - ? <DealListStory /> - : ( - <Message> - <Title>{'Missing story book'}</Title> - <Content> - <BackButton/> - </Content> - </Message> - ) -) - -const message = - i % 3 === 0 && i % 5 === 0 ? - 'fizzbuzz' - : i % 3 === 0 ? - 'fizz' - : i % 5 === 0 ? - 'buzz' - : - String(i) - -const paymentMessage = state == 'success' - ? 'Payment completed successfully' - -: state == 'processing' - ? 'Payment processing' - -: state == 'invalid_cvc' - ? 'There was an issue with your CVC number' - -: state == 'invalid_expiry' - ? 'Expiry must be sometime in the past.' - - : 'There was an issue with the payment. Please contact support.' - -const paymentMessage2 = state == 'success' - ? 1 //'Payment completed successfully' - -: state == 'processing' - ? 2 //'Payment processing' - -: state == 'invalid_cvc' - ? 3 //'There was an issue with your CVC number' - -: true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - - : 5 // 'There was an issue with the payment. Please contact support.' - -const foo = <div className={'match-achievement-medal-type type' + (medals[0].record ? '-record' : (medals[0].unique ? '-unique' : medals[0].type))}> - {medals[0].record ? ( - i18n('Record') - ) : medals[0].unique ? ( - i18n('Unique') - ) : medals[0].type === 0 ? ( - i18n('Silver') - ) : medals[0].type === 1 ? ( - i18n('Gold') - ) : medals[0].type === 2 ? ( - i18n('Platinum') - ) : ( - i18n('Theme') - )} -</div> - -a - ? literalline - : { - 123: 12 - } - ? line - : softline - -const config = { - onFailure: onFailure !== undefined ? onFailure : ( - error => { - notify( - typeof error === 'string' ? - error - : error.message || 'ra.notification.http_error', - 'warning', - { - _: - typeof error === 'string' ? error - : error && error.message ? error.message - : undefined, - } - ); - refresh(); - } - ) -} - -showNotification( - typeof error === 'string' ? error : error.message || body, - level || 'warning', - { - messageArgs, - undoable: false, - } -) -=====================================output===================================== -let icecream = - what == "cone" - ? (p) => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`) - : (p) => \`here's your \${p} \${what}\`; - -const value = condition1 - ? value1 - : condition2 - ? value2 - : condition3 - ? value3 - : value4; - -const StorybookLoader = ({ match }) => - match.params.storyId === "button" ? ( - <ButtonStorybook /> - ) : match.params.storyId === "color" ? ( - <ColorBook /> - ) : match.params.storyId === "typography" ? ( - <TypographyBook /> - ) : match.params.storyId === "loading" ? ( - <LoaderStorybook /> - ) : match.params.storyId === "deal-list" ? ( - <DealListStory /> - ) : ( - <Message> - <Title>{"Missing story book"}</Title> - <Content> - <BackButton /> - </Content> - </Message> - ); - -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -const paymentMessage = - state == "success" - ? "Payment completed successfully" - : state == "processing" - ? "Payment processing" - : state == "invalid_cvc" - ? "There was an issue with your CVC number" - : state == "invalid_expiry" - ? "Expiry must be sometime in the past." - : "There was an issue with the payment. Please contact support."; - -const paymentMessage2 = - state == "success" - ? 1 //'Payment completed successfully' - : state == "processing" - ? 2 //'Payment processing' - : state == "invalid_cvc" - ? 3 //'There was an issue with your CVC number' - : true //state == 'invalid_expiry' - ? 4 //'Expiry must be sometime in the past.' - : 5; // 'There was an issue with the payment. Please contact support.' - -const foo = ( - <div - className={ - "match-achievement-medal-type type" + - (medals[0].record - ? "-record" - : medals[0].unique - ? "-unique" - : medals[0].type) - } - > - {medals[0].record - ? i18n("Record") - : medals[0].unique - ? i18n("Unique") - : medals[0].type === 0 - ? i18n("Silver") - : medals[0].type === 1 - ? i18n("Gold") - : medals[0].type === 2 - ? i18n("Platinum") - : i18n("Theme")} - </div> -); - -a - ? literalline - : { - 123: 12, - } - ? line - : softline; - -const config = { - onFailure: - onFailure !== undefined - ? onFailure - : (error) => { - notify( - typeof error === "string" - ? error - : error.message || "ra.notification.http_error", - "warning", - { - _: - typeof error === "string" - ? error - : error && error.message - ? error.message - : undefined, - } - ); - refresh(); - }, -}; - -showNotification( - typeof error === "string" ? error : error.message || body, - level || "warning", - { - messageArgs, - undoable: false, - } -); - -================================================================================ -`; - -exports[`nested-in-condition.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) -? kochabCooieGameOnOboleUnweave -: annularCooeedSplicesWalksWayWay) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = (bifornCringerMoshedPerplexSawder -? askTrovenaBeenaDependsRowans -: glimseGlyphsHazardNoopsTieTie) - ? true - ? true - : false - : true - ? true - : false; - -(bifornCringerMoshedPerplexSawder ? ( - askTrovenaBeenaDependsRowans -) : ( - glimseGlyphsHazardNoopsTieTie -)) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -=====================================output===================================== -$var = ( - $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) - ? kochabCooieGameOnOboleUnweave - : annularCooeedSplicesWalksWayWay -) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = ( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) - ? true - ? true - : false - : true - ? true - : false; - -( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -================================================================================ -`; - -exports[`nested-in-condition.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) -? kochabCooieGameOnOboleUnweave -: annularCooeedSplicesWalksWayWay) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = (bifornCringerMoshedPerplexSawder -? askTrovenaBeenaDependsRowans -: glimseGlyphsHazardNoopsTieTie) - ? true - ? true - : false - : true - ? true - : false; - -(bifornCringerMoshedPerplexSawder ? ( - askTrovenaBeenaDependsRowans -) : ( - glimseGlyphsHazardNoopsTieTie -)) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -=====================================output===================================== -$var = ( - $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) - ? kochabCooieGameOnOboleUnweave - : annularCooeedSplicesWalksWayWay -) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = ( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) - ? true - ? true - : false - : true - ? true - : false; - -( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -================================================================================ -`; - -exports[`nested-in-condition.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) -? kochabCooieGameOnOboleUnweave -: annularCooeedSplicesWalksWayWay) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = (bifornCringerMoshedPerplexSawder -? askTrovenaBeenaDependsRowans -: glimseGlyphsHazardNoopsTieTie) - ? true - ? true - : false - : true - ? true - : false; - -(bifornCringerMoshedPerplexSawder ? ( - askTrovenaBeenaDependsRowans -) : ( - glimseGlyphsHazardNoopsTieTie -)) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -=====================================output===================================== -$var = ( - $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) - ? kochabCooieGameOnOboleUnweave - : annularCooeedSplicesWalksWayWay -) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = ( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) - ? true - ? true - : false - : true - ? true - : false; - -( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -================================================================================ -`; - -exports[`nested-in-condition.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -$var = ($number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) -? kochabCooieGameOnOboleUnweave -: annularCooeedSplicesWalksWayWay) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = (bifornCringerMoshedPerplexSawder -? askTrovenaBeenaDependsRowans -: glimseGlyphsHazardNoopsTieTie) - ? true - ? true - : false - : true - ? true - : false; - -(bifornCringerMoshedPerplexSawder ? ( - askTrovenaBeenaDependsRowans -) : ( - glimseGlyphsHazardNoopsTieTie -)) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -=====================================output===================================== -$var = ( - $number % 10 >= 2 && ($number % 100 < 10 || $number % 100 >= 20) - ? kochabCooieGameOnOboleUnweave - : annularCooeedSplicesWalksWayWay -) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -const value = ( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) - ? true - ? true - : false - : true - ? true - : false; - -( - bifornCringerMoshedPerplexSawder - ? askTrovenaBeenaDependsRowans - : glimseGlyphsHazardNoopsTieTie -) ? ( - <Element> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - <Sub /> - </Element> -) : ( - <Element2> - <Sub /> - <Sub /> - <Sub /> - </Element2> -); - -================================================================================ -`; - -exports[`parenthesis.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -debug ? this.state.isVisible ? "partially visible" : "hidden" : null; -debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; - -a => a ? () => {a} : () => {a} -a => a ? a : a -a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a - -=====================================output===================================== -debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; -debug - ? this.state.isVisible && somethingComplex - ? "partially visible" - : "hidden" - : null; - -(a) => - a - ? () => { - a; - } - : () => { - a; - }; -(a) => (a ? a : a); -(a) => - a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; - -================================================================================ -`; - -exports[`parenthesis.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -debug ? this.state.isVisible ? "partially visible" : "hidden" : null; -debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; - -a => a ? () => {a} : () => {a} -a => a ? a : a -a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a - -=====================================output===================================== -debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; -debug - ? this.state.isVisible && somethingComplex - ? "partially visible" - : "hidden" - : null; - -(a) => - a - ? () => { - a; - } - : () => { - a; - }; -(a) => (a ? a : a); -(a) => - a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; - -================================================================================ -`; - -exports[`parenthesis.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -debug ? this.state.isVisible ? "partially visible" : "hidden" : null; -debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; - -a => a ? () => {a} : () => {a} -a => a ? a : a -a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a - -=====================================output===================================== -debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; -debug - ? this.state.isVisible && somethingComplex - ? "partially visible" - : "hidden" - : null; - -(a) => - a - ? () => { - a; - } - : () => { - a; - }; -(a) => (a ? a : a); -(a) => - a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; - -================================================================================ -`; - -exports[`parenthesis.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -debug ? this.state.isVisible ? "partially visible" : "hidden" : null; -debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null; - -a => a ? () => {a} : () => {a} -a => a ? a : a -a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a - -=====================================output===================================== -debug ? (this.state.isVisible ? "partially visible" : "hidden") : null; -debug - ? this.state.isVisible && somethingComplex - ? "partially visible" - : "hidden" - : null; - -(a) => - a - ? () => { - a; - } - : () => { - a; - }; -(a) => (a ? a : a); -(a) => - a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a; - -================================================================================ -`; - -exports[`test.js - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing - -const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing - -const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } - -const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing - -const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -=====================================output===================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing; - -const obj1 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : shortThing; - -const obj2 = conditionIsTruthy - ? shortThing - : { some: "long", object: "with", lots: "of", stuff }; - -const obj3 = conditionIsTruthy - ? { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - } - : shortThing; - -const obj4 = conditionIsTruthy - ? shortThing - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -const obj5 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -================================================================================ -`; - -exports[`test.js - {"useTabs":true,"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -tabWidth: 4 -useTabs: true - | printWidth -=====================================input====================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing - -const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing - -const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } - -const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing - -const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -=====================================output===================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing; - -const obj1 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : shortThing; - -const obj2 = conditionIsTruthy - ? shortThing - : { some: "long", object: "with", lots: "of", stuff }; - -const obj3 = conditionIsTruthy - ? { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - } - : shortThing; - -const obj4 = conditionIsTruthy - ? shortThing - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -const obj5 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -================================================================================ -`; - -exports[`test.js - {"useTabs":true} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -useTabs: true - | printWidth -=====================================input====================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing - -const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing - -const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } - -const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing - -const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -=====================================output===================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing; - -const obj1 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : shortThing; - -const obj2 = conditionIsTruthy - ? shortThing - : { some: "long", object: "with", lots: "of", stuff }; - -const obj3 = conditionIsTruthy - ? { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - } - : shortThing; - -const obj4 = conditionIsTruthy - ? shortThing - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -const obj5 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing - -const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing - -const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff } - -const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing - -const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } - -=====================================output===================================== -const obj0 = conditionIsTruthy ? shortThing : otherShortThing; - -const obj1 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : shortThing; - -const obj2 = conditionIsTruthy - ? shortThing - : { some: "long", object: "with", lots: "of", stuff }; - -const obj3 = conditionIsTruthy - ? { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - } - : shortThing; - -const obj4 = conditionIsTruthy - ? shortThing - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -const obj5 = conditionIsTruthy - ? { some: "long", object: "with", lots: "of", stuff } - : { - some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger", - object: "with", - lots: "of", - stuff, - }; - -================================================================================ -`; diff --git a/tests/format/js/ternaries/format.test.js b/tests/format/js/ternaries/format.test.js new file mode 100644 index 000000000000..9d4d470988f6 --- /dev/null +++ b/tests/format/js/ternaries/format.test.js @@ -0,0 +1,24 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { tabWidth: 4 }); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { useTabs: true }); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + useTabs: true, + tabWidth: 4, +}); + +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalTernaries: true, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalTernaries: true, + tabWidth: 4, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalTernaries: true, + useTabs: true, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + experimentalTernaries: true, + useTabs: true, + tabWidth: 4, +}); diff --git a/tests/format/js/ternaries/jsfmt.spec.js b/tests/format/js/ternaries/jsfmt.spec.js deleted file mode 100644 index 62bd4b50be17..000000000000 --- a/tests/format/js/ternaries/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { tabWidth: 4 }); -run_spec(__dirname, ["babel", "flow", "typescript"], { useTabs: true }); -run_spec(__dirname, ["babel", "flow", "typescript"], { - useTabs: true, - tabWidth: 4, -}); diff --git a/tests/format/js/ternaries/nested.js b/tests/format/js/ternaries/nested.js index ce77c67505c0..e3f2050cd800 100644 --- a/tests/format/js/ternaries/nested.js +++ b/tests/format/js/ternaries/nested.js @@ -121,4 +121,14 @@ showNotification( messageArgs, undoable: false, } -) \ No newline at end of file +) + +const result = children && !isEmptyChildren(children) + ? children + : props.match + ? component + ? React.createElement(component, props) + : render + ? render(props) + : null + : null; diff --git a/tests/format/js/ternaries/parenthesis/__snapshots__/format.test.js.snap b/tests/format/js/ternaries/parenthesis/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9786faeab077 --- /dev/null +++ b/tests/format/js/ternaries/parenthesis/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`await-expression.js - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +stopDirectory = await (useCache + ? memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); + +=====================================output===================================== +stopDirectory = await ( + useCache ? + memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); + +================================================================================ +`; + +exports[`await-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +stopDirectory = await (useCache + ? memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); + +=====================================output===================================== +stopDirectory = await ( + useCache ? memoizedFindProjectRoot : findProjectRootWithoutCache +)(path.dirname(path.resolve(filePath))); + +================================================================================ +`; diff --git a/tests/format/js/ternaries/parenthesis/await-expression.js b/tests/format/js/ternaries/parenthesis/await-expression.js new file mode 100644 index 000000000000..86b2ad16bbce --- /dev/null +++ b/tests/format/js/ternaries/parenthesis/await-expression.js @@ -0,0 +1,3 @@ +stopDirectory = await (useCache + ? memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); diff --git a/tests/format/js/ternaries/parenthesis/format.test.js b/tests/format/js/ternaries/parenthesis/format.test.js new file mode 100644 index 000000000000..ed1563068e18 --- /dev/null +++ b/tests/format/js/ternaries/parenthesis/format.test.js @@ -0,0 +1,7 @@ +const parsers = [ + // Didn't test flow and typescript since they can't parse `await (a ? b : c)` correctly + "babel", // "flow", "typescript" +]; + +runFormatTest(import.meta, parsers); +runFormatTest(import.meta, parsers, { experimentalTernaries: true }); diff --git a/tests/format/js/test-declarations/__snapshots__/format.test.js.snap b/tests/format/js/test-declarations/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1108e66c53b7 --- /dev/null +++ b/tests/format/js/test-declarations/__snapshots__/format.test.js.snap @@ -0,0 +1,1685 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`angular_async.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(async(() => { + // code +})); + +beforeEach(done => + foo() + .bar() + .bar(), +); + +afterAll(async(() => { + console.log('Hello'); +})); + +afterAll(done => + foo() + .bar() + .bar(), +); + +it('should create the app', async(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", async(() => { + // code +})); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { async(() => {}) } + +=====================================output===================================== +beforeEach(async(() => { + // code +})); + +beforeEach(done => foo().bar().bar()); + +afterAll(async(() => { + console.log("Hello"); +})); + +afterAll(done => foo().bar().bar()); + +it("should create the app", async(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", async(() => { + // code +})); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + async(() => {}); +} + +================================================================================ +`; + +exports[`angular_async.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(async(() => { + // code +})); + +beforeEach(done => + foo() + .bar() + .bar(), +); + +afterAll(async(() => { + console.log('Hello'); +})); + +afterAll(done => + foo() + .bar() + .bar(), +); + +it('should create the app', async(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", async(() => { + // code +})); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { async(() => {}) } + +=====================================output===================================== +beforeEach(async(() => { + // code +})); + +beforeEach((done) => foo().bar().bar()); + +afterAll(async(() => { + console.log("Hello"); +})); + +afterAll((done) => foo().bar().bar()); + +it("should create the app", async(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", async(() => { + // code +})); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + async(() => {}); +} + +================================================================================ +`; + +exports[`angular_fakeAsync.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(fakeAsync(() => { + // code +})); + +afterAll(fakeAsync(() => { + console.log('Hello'); +})); + +it('should create the app', fakeAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { fakeAsync(() => {}) } + +=====================================output===================================== +beforeEach(fakeAsync(() => { + // code +})); + +afterAll(fakeAsync(() => { + console.log("Hello"); +})); + +it("should create the app", fakeAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => + new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + fakeAsync(() => {}); +} + +================================================================================ +`; + +exports[`angular_fakeAsync.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(fakeAsync(() => { + // code +})); + +afterAll(fakeAsync(() => { + console.log('Hello'); +})); + +it('should create the app', fakeAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { fakeAsync(() => {}) } + +=====================================output===================================== +beforeEach(fakeAsync(() => { + // code +})); + +afterAll(fakeAsync(() => { + console.log("Hello"); +})); + +it("should create the app", fakeAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => + new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + fakeAsync(() => {}); +} + +================================================================================ +`; + +exports[`angular_waitForAsync.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(waitForAsync(() => { + // code +})); + +afterAll(waitForAsync(() => { + console.log('Hello'); +})); + +it('should create the app', waitForAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { waitForAsync(() => {}) } + +=====================================output===================================== +beforeEach(waitForAsync(() => { + // code +})); + +afterAll(waitForAsync(() => { + console.log("Hello"); +})); + +it("should create the app", waitForAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => + new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + waitForAsync(() => {}); +} + +================================================================================ +`; + +exports[`angular_waitForAsync.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(waitForAsync(() => { + // code +})); + +afterAll(waitForAsync(() => { + console.log('Hello'); +})); + +it('should create the app', waitForAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { waitForAsync(() => {}) } + +=====================================output===================================== +beforeEach(waitForAsync(() => { + // code +})); + +afterAll(waitForAsync(() => { + console.log("Hello"); +})); + +it("should create the app", waitForAsync(() => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => + new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + waitForAsync(() => {}); +} + +================================================================================ +`; + +exports[`angularjs_inject.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(inject(($fooService, $barService) => { + // code +})); + +afterAll(inject(($fooService, $barService) => { + console.log('Hello'); +})); + +it('should create the app', inject(($fooService, $barService) => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { + // code +})); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { inject(() => {}) } + +=====================================output===================================== +beforeEach(inject(($fooService, $barService) => { + // code +})); + +afterAll(inject(($fooService, $barService) => { + console.log("Hello"); +})); + +it("should create the app", inject(($fooService, $barService) => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(( + $fooServiceLongName, + $barServiceLongName, +) => { + // code +})); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + inject(() => {}); +} + +================================================================================ +`; + +exports[`angularjs_inject.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +beforeEach(inject(($fooService, $barService) => { + // code +})); + +afterAll(inject(($fooService, $barService) => { + console.log('Hello'); +})); + +it('should create the app', inject(($fooService, $barService) => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { + // code +})); + +/* +* isTestCall(parent) should only be called when parent exists +* and parent.type is CallExpression. This test makes sure that +* no errors are thrown when calling isTestCall(parent) +*/ +function x() { inject(() => {}) } + +=====================================output===================================== +beforeEach(inject(($fooService, $barService) => { + // code +})); + +afterAll(inject(($fooService, $barService) => { + console.log("Hello"); +})); + +it("should create the app", inject(($fooService, $barService) => { + //code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(() => { + // code +})); + +it("does something really long and complicated so I have to write a very long name for the test", inject(( + $fooServiceLongName, + $barServiceLongName, +) => { + // code +})); + +/* + * isTestCall(parent) should only be called when parent exists + * and parent.type is CallExpression. This test makes sure that + * no errors are thrown when calling isTestCall(parent) + */ +function x() { + inject(() => {}); +} + +================================================================================ +`; + +exports[`jest-each.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +describe.each\` +a|b|expected +\${11 } | \${ 1 }|\${222} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} +\`('$a + $b', ({a, b, expected}) => { + test(\`returns \${expected}\`, () => { + expect(a + b).toBe(expected); + }); + + test(\`returned value not be greater than \${expected}\`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(\`returned value not be less than \${expected}\`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); + +describe.only.each\` +a|b|expected +\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} +\` + +describe.only.each\` +|| +\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} +\` + +describe.each\`a | b | expected +\${1} | \${1} | \${2} +\${1} | \${2} | \${3} +\${2} | \${1} | \${3}\` + +// an example to demo multiline quasi +describe.each\`a | b | expected +\${11111111111} | \${a().b(x => x).c().d()} | \${2} +\${1} | \${2} | \${3} +\${2} | \${1} | \${3}\` + +describe.each([1, 2, 3])("test", a => { + expect(a).toBe(a); +}); + +test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( + ".add(%i, %i)", (a, b, expected) => { + expect(a + b).toBe(expected); + } +); + +test.each([ + { a: "1", b: 1 }, + { a: "2", b: 2 }, + { a: "3", b: 3 }, +])("test", ({ a, b }) => { + expect(Number(a)).toBe(b); + } +); + +=====================================output===================================== +describe.each\` + a | b | expected + \${11} | \${1} | \${222} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} +\`("$a + $b", ({ a, b, expected }) => { + test(\`returns \${expected}\`, () => { + expect(a + b).toBe(expected); + }); + + test(\`returned value not be greater than \${expected}\`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(\`returned value not be less than \${expected}\`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); + +describe.only.each\` + a | b | expected + \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} +\`; + +describe.only.each\` + | | + \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} +\`; + +describe.each\` + a | b | expected + \${1} | \${1} | \${2} + \${1} | \${2} | \${3} + \${2} | \${1} | \${3} +\`; + +// an example to demo multiline quasi +describe.each\` + a | b | expected + \${11111111111} | \${a() + .b(x => x) + .c() + .d()} | \${2} + \${1} | \${2} | \${3} + \${2} | \${1} | \${3} +\`; + +describe.each([1, 2, 3])("test", a => { + expect(a).toBe(a); +}); + +test.only.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])(".add(%i, %i)", (a, b, expected) => { + expect(a + b).toBe(expected); +}); + +test.each([ + { a: "1", b: 1 }, + { a: "2", b: 2 }, + { a: "3", b: 3 }, +])("test", ({ a, b }) => { + expect(Number(a)).toBe(b); +}); + +================================================================================ +`; + +exports[`jest-each.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +describe.each\` +a|b|expected +\${11 } | \${ 1 }|\${222} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} +\`('$a + $b', ({a, b, expected}) => { + test(\`returns \${expected}\`, () => { + expect(a + b).toBe(expected); + }); + + test(\`returned value not be greater than \${expected}\`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(\`returned value not be less than \${expected}\`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); + +describe.only.each\` +a|b|expected +\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} +\` + +describe.only.each\` +|| +\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} +\${1-1}|\${2+2}|\${ 3333} +\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} +\` + +describe.each\`a | b | expected +\${1} | \${1} | \${2} +\${1} | \${2} | \${3} +\${2} | \${1} | \${3}\` + +// an example to demo multiline quasi +describe.each\`a | b | expected +\${11111111111} | \${a().b(x => x).c().d()} | \${2} +\${1} | \${2} | \${3} +\${2} | \${1} | \${3}\` + +describe.each([1, 2, 3])("test", a => { + expect(a).toBe(a); +}); + +test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( + ".add(%i, %i)", (a, b, expected) => { + expect(a + b).toBe(expected); + } +); + +test.each([ + { a: "1", b: 1 }, + { a: "2", b: 2 }, + { a: "3", b: 3 }, +])("test", ({ a, b }) => { + expect(Number(a)).toBe(b); + } +); + +=====================================output===================================== +describe.each\` + a | b | expected + \${11} | \${1} | \${222} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} +\`("$a + $b", ({ a, b, expected }) => { + test(\`returns \${expected}\`, () => { + expect(a + b).toBe(expected); + }); + + test(\`returned value not be greater than \${expected}\`, () => { + expect(a + b).not.toBeGreaterThan(expected); + }); + + test(\`returned value not be less than \${expected}\`, () => { + expect(a + b).not.toBeLessThan(expected); + }); +}); + +describe.only.each\` + a | b | expected + \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} +\`; + +describe.only.each\` + | | + \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} + \${1 - 1} | \${2 + 2} | \${3333} + \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} +\`; + +describe.each\` + a | b | expected + \${1} | \${1} | \${2} + \${1} | \${2} | \${3} + \${2} | \${1} | \${3} +\`; + +// an example to demo multiline quasi +describe.each\` + a | b | expected + \${11111111111} | \${a() + .b((x) => x) + .c() + .d()} | \${2} + \${1} | \${2} | \${3} + \${2} | \${1} | \${3} +\`; + +describe.each([1, 2, 3])("test", (a) => { + expect(a).toBe(a); +}); + +test.only.each([ + [1, 1, 2], + [1, 2, 3], + [2, 1, 3], +])(".add(%i, %i)", (a, b, expected) => { + expect(a + b).toBe(expected); +}); + +test.each([ + { a: "1", b: 1 }, + { a: "2", b: 2 }, + { a: "3", b: 3 }, +])("test", ({ a, b }) => { + expect(Number(a)).toBe(b); +}); + +================================================================================ +`; + +exports[`jest-each-template-string.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +test.each\` +a | b | c +\${1} | \${[{ start: 5, end: 15 }]} | \${[1,2,3,4,5,6,7,8]} +\${1}| \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} +\${3} | \${[{ start: 5, end: 15 }]} | \${[]} +\${4} | \${[{ start: 1, end: 3 },{ start: 15, end: 20 },]} | \${[]} +\`("example test", ({a, b, c}) => {}) + + +test.each\` +a | +\${[{ a: 1, b: 3 },{ c: 15, d: 20 }]}| +\${[{ start: 1, end: 3 },{ start: 15, end: 20 }, { start: 15, end: 20 },]}| +\`("example test", ({a, b, c}) => {}) + +=====================================output===================================== +test.each\` + a | b | c + \${1} | \${[{ start: 5, end: 15 }]} | \${[1, 2, 3, 4, 5, 6, 7, 8]} + \${1} | \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} + \${3} | \${[{ start: 5, end: 15 }]} | \${[]} + \${4} | \${[{ start: 1, end: 3 }, { start: 15, end: 20 }]} | \${[]} +\`("example test", ({ a, b, c }) => {}); + +test.each\` + a | + \${[{ a: 1, b: 3 }, { c: 15, d: 20 }]} + \${[{ start: 1, end: 3 }, { start: 15, end: 20 }, { start: 15, end: 20 }]} +\`("example test", ({ a, b, c }) => {}); + +================================================================================ +`; + +exports[`jest-each-template-string.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +test.each\` +a | b | c +\${1} | \${[{ start: 5, end: 15 }]} | \${[1,2,3,4,5,6,7,8]} +\${1}| \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} +\${3} | \${[{ start: 5, end: 15 }]} | \${[]} +\${4} | \${[{ start: 1, end: 3 },{ start: 15, end: 20 },]} | \${[]} +\`("example test", ({a, b, c}) => {}) + + +test.each\` +a | +\${[{ a: 1, b: 3 },{ c: 15, d: 20 }]}| +\${[{ start: 1, end: 3 },{ start: 15, end: 20 }, { start: 15, end: 20 },]}| +\`("example test", ({a, b, c}) => {}) + +=====================================output===================================== +test.each\` + a | b | c + \${1} | \${[{ start: 5, end: 15 }]} | \${[1, 2, 3, 4, 5, 6, 7, 8]} + \${1} | \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} + \${3} | \${[{ start: 5, end: 15 }]} | \${[]} + \${4} | \${[{ start: 1, end: 3 }, { start: 15, end: 20 }]} | \${[]} +\`("example test", ({ a, b, c }) => {}); + +test.each\` + a | + \${[{ a: 1, b: 3 }, { c: 15, d: 20 }]} + \${[{ start: 1, end: 3 }, { start: 15, end: 20 }, { start: 15, end: 20 }]} +\`("example test", ({ a, b, c }) => {}); + +================================================================================ +`; + +exports[`optional.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +describe?.("some string some string some string some string some string some string some string some string", (done) => {}) + +=====================================output===================================== +describe?.( + "some string some string some string some string some string some string some string some string", + done => {}, +); + +================================================================================ +`; + +exports[`optional.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +describe?.("some string some string some string some string some string some string some string some string", (done) => {}) + +=====================================output===================================== +describe?.( + "some string some string some string some string some string some string some string some string", + (done) => {}, +); + +================================================================================ +`; + +exports[`test_declarations.js - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Shouldn't break + +it("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function() { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function(done) { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { + console.log("hello!"); +}); + +it(\`does something really long and complicated so I have to write a very long name for the test\`, function() { + console.log("hello!"); +}); + +it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() { + console.log("hello!"); +}); + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}) + +test("does something really long and complicated so I have to write a very long name for the test", (done) => { + console.log("hello!"); +}); + +test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { + console.log("hello!"); +}); + +describe("does something really long and complicated so I have to write a very long name for the describe block", () => { + it("an example test", (done) => { + console.log("hello!"); + }); +}); + +describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { + it(\`an example test\`, (done) => { + console.log("hello!"); + }); +}); + +xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +it.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +skip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.describe.parallel.only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); + +test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +// Should break + +it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => { + console.log("hello!"); +}); + +it.only.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { + console.log("hello!"); +}); + +xskip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.parallel.serial("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.dummy.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +// timeout + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}, 2500) + +it("does something quick", () => { + console.log("hello!") +}, 1000000000) + +it( + 'succeeds if the test finishes in time', + () => new Promise(resolve => setTimeout(resolve, 10)) +); + +it( + 'succeeds if the test finishes in time', + () => new Promise(resolve => setTimeout(resolve, 10)), + 250 +); + +=====================================output===================================== +// Shouldn't break + +it("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function () { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function (done) { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { + console.log("hello!"); +}); + +it(\`does something really long and complicated so I have to write a very long name for the test\`, function () { + console.log("hello!"); +}); + +it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function () { + console.log("hello!"); +}); + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +test("does something really long and complicated so I have to write a very long name for the test", done => { + console.log("hello!"); +}); + +test(\`does something really long and complicated so I have to write a very long name for the test\`, done => { + console.log("hello!"); +}); + +describe("does something really long and complicated so I have to write a very long name for the describe block", () => { + it("an example test", done => { + console.log("hello!"); + }); +}); + +describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { + it(\`an example test\`, done => { + console.log("hello!"); + }); +}); + +xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +it.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +skip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe + .only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe + .parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel + .only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.describe.parallel + .only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); + +test.describe + .serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.serial + .only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial + .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +// Should break + +it.only( + "does something really long and complicated so I have to write a very long name for the test", + 10, + () => { + console.log("hello!"); + }, +); + +it.only.only( + "does something really long and complicated so I have to write a very long name for the test", + () => { + console.log("hello!"); + }, +); + +it.only.only( + "does something really long and complicated so I have to write a very long name for the test", + (a, b, c) => { + console.log("hello!"); + }, +); + +xskip( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.only.parallel( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.parallel.serial( + "does something really long and complicated so I have to write a very long name for the testThis is a very", + () => {}, +); + +test.serial( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.dummy.serial( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +// timeout + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}, 2500); + +it("does something quick", () => { + console.log("hello!"); +}, 1000000000); + +it("succeeds if the test finishes in time", () => + new Promise(resolve => setTimeout(resolve, 10))); + +it( + "succeeds if the test finishes in time", + () => new Promise(resolve => setTimeout(resolve, 10)), + 250, +); + +================================================================================ +`; + +exports[`test_declarations.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Shouldn't break + +it("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function() { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function(done) { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { + console.log("hello!"); +}); + +it(\`does something really long and complicated so I have to write a very long name for the test\`, function() { + console.log("hello!"); +}); + +it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() { + console.log("hello!"); +}); + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}) + +test("does something really long and complicated so I have to write a very long name for the test", (done) => { + console.log("hello!"); +}); + +test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { + console.log("hello!"); +}); + +describe("does something really long and complicated so I have to write a very long name for the describe block", () => { + it("an example test", (done) => { + console.log("hello!"); + }); +}); + +describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { + it(\`an example test\`, (done) => { + console.log("hello!"); + }); +}); + +xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +it.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +skip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.describe.parallel.only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); + +test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +// Should break + +it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => { + console.log("hello!"); +}); + +it.only.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { + console.log("hello!"); +}); + +xskip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.parallel.serial("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.dummy.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +// timeout + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}, 2500) + +it("does something quick", () => { + console.log("hello!") +}, 1000000000) + +it( + 'succeeds if the test finishes in time', + () => new Promise(resolve => setTimeout(resolve, 10)) +); + +it( + 'succeeds if the test finishes in time', + () => new Promise(resolve => setTimeout(resolve, 10)), + 250 +); + +=====================================output===================================== +// Shouldn't break + +it("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function () { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function (done) { + console.log("hello!"); +}); + +it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { + console.log("hello!"); +}); + +it(\`does something really long and complicated so I have to write a very long name for the test\`, function () { + console.log("hello!"); +}); + +it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function () { + console.log("hello!"); +}); + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +test("does something really long and complicated so I have to write a very long name for the test", (done) => { + console.log("hello!"); +}); + +test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { + console.log("hello!"); +}); + +describe("does something really long and complicated so I have to write a very long name for the describe block", () => { + it("an example test", (done) => { + console.log("hello!"); + }); +}); + +describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { + it(\`an example test\`, (done) => { + console.log("hello!"); + }); +}); + +xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +it.only("does something really long and complicated so I have to write a very long name for the test", () => { + console.log("hello!"); +}); + +it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}); + +it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); + +skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +skip("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe + .only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe + .parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.parallel + .only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); + +test.describe.parallel + .only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); + +test.describe + .serial("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe + .serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +test.describe.serial + .only("does something really long and complicated so I have to write a very long name for the test", () => {}); + +test.describe.serial + .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); + +// Should break + +it.only( + "does something really long and complicated so I have to write a very long name for the test", + 10, + () => { + console.log("hello!"); + }, +); + +it.only.only( + "does something really long and complicated so I have to write a very long name for the test", + () => { + console.log("hello!"); + }, +); + +it.only.only( + "does something really long and complicated so I have to write a very long name for the test", + (a, b, c) => { + console.log("hello!"); + }, +); + +xskip( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.only.parallel( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.parallel.serial( + "does something really long and complicated so I have to write a very long name for the testThis is a very", + () => {}, +); + +test.serial( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +test.describe.dummy.serial( + "does something really long and complicated so I have to write a very long name for the test", + () => {}, +); + +// timeout + +it(\`handles + some + newlines + does something really long and complicated so I have to write a very long name for the test\`, () => { + console.log("hello!"); +}, 2500); + +it("does something quick", () => { + console.log("hello!"); +}, 1000000000); + +it("succeeds if the test finishes in time", () => + new Promise((resolve) => setTimeout(resolve, 10))); + +it( + "succeeds if the test finishes in time", + () => new Promise((resolve) => setTimeout(resolve, 10)), + 250, +); + +================================================================================ +`; diff --git a/tests/format/js/test-declarations/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/test-declarations/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6a58a5e0fa18..000000000000 --- a/tests/format/js/test-declarations/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1650 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`angular_async.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(async(() => { - // code -})); - -beforeEach(done => - foo() - .bar() - .bar(), -); - -afterAll(async(() => { - console.log('Hello'); -})); - -afterAll(done => - foo() - .bar() - .bar(), -); - -it('should create the app', async(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", async(() => { - // code -})); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { async(() => {}) } - -=====================================output===================================== -beforeEach(async(() => { - // code -})); - -beforeEach(done => foo().bar().bar()); - -afterAll(async(() => { - console.log("Hello"); -})); - -afterAll(done => foo().bar().bar()); - -it("should create the app", async(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", async(() => { - // code -})); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - async(() => {}); -} - -================================================================================ -`; - -exports[`angular_async.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(async(() => { - // code -})); - -beforeEach(done => - foo() - .bar() - .bar(), -); - -afterAll(async(() => { - console.log('Hello'); -})); - -afterAll(done => - foo() - .bar() - .bar(), -); - -it('should create the app', async(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", async(() => { - // code -})); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { async(() => {}) } - -=====================================output===================================== -beforeEach(async(() => { - // code -})); - -beforeEach((done) => foo().bar().bar()); - -afterAll(async(() => { - console.log("Hello"); -})); - -afterAll((done) => foo().bar().bar()); - -it("should create the app", async(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", async(() => { - // code -})); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - async(() => {}); -} - -================================================================================ -`; - -exports[`angular_fakeAsync.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(fakeAsync(() => { - // code -})); - -afterAll(fakeAsync(() => { - console.log('Hello'); -})); - -it('should create the app', fakeAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { fakeAsync(() => {}) } - -=====================================output===================================== -beforeEach(fakeAsync(() => { - // code -})); - -afterAll(fakeAsync(() => { - console.log("Hello"); -})); - -it("should create the app", fakeAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => - new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - fakeAsync(() => {}); -} - -================================================================================ -`; - -exports[`angular_fakeAsync.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(fakeAsync(() => { - // code -})); - -afterAll(fakeAsync(() => { - console.log('Hello'); -})); - -it('should create the app', fakeAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { fakeAsync(() => {}) } - -=====================================output===================================== -beforeEach(fakeAsync(() => { - // code -})); - -afterAll(fakeAsync(() => { - console.log("Hello"); -})); - -it("should create the app", fakeAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => - new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - fakeAsync(() => {}); -} - -================================================================================ -`; - -exports[`angular_waitForAsync.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(waitForAsync(() => { - // code -})); - -afterAll(waitForAsync(() => { - console.log('Hello'); -})); - -it('should create the app', waitForAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { waitForAsync(() => {}) } - -=====================================output===================================== -beforeEach(waitForAsync(() => { - // code -})); - -afterAll(waitForAsync(() => { - console.log("Hello"); -})); - -it("should create the app", waitForAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => - new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - waitForAsync(() => {}); -} - -================================================================================ -`; - -exports[`angular_waitForAsync.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(waitForAsync(() => { - // code -})); - -afterAll(waitForAsync(() => { - console.log('Hello'); -})); - -it('should create the app', waitForAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS)); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { waitForAsync(() => {}) } - -=====================================output===================================== -beforeEach(waitForAsync(() => { - // code -})); - -afterAll(waitForAsync(() => { - console.log("Hello"); -})); - -it("should create the app", waitForAsync(() => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => - new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS())); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - waitForAsync(() => {}); -} - -================================================================================ -`; - -exports[`angularjs_inject.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(inject(($fooService, $barService) => { - // code -})); - -afterAll(inject(($fooService, $barService) => { - console.log('Hello'); -})); - -it('should create the app', inject(($fooService, $barService) => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { - // code -})); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { inject(() => {}) } - -=====================================output===================================== -beforeEach(inject(($fooService, $barService) => { - // code -})); - -afterAll(inject(($fooService, $barService) => { - console.log("Hello"); -})); - -it("should create the app", inject(($fooService, $barService) => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(( - $fooServiceLongName, - $barServiceLongName -) => { - // code -})); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - inject(() => {}); -} - -================================================================================ -`; - -exports[`angularjs_inject.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -beforeEach(inject(($fooService, $barService) => { - // code -})); - -afterAll(inject(($fooService, $barService) => { - console.log('Hello'); -})); - -it('should create the app', inject(($fooService, $barService) => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => { - // code -})); - -/* -* isTestCall(parent) should only be called when parent exists -* and parent.type is CallExpression. This test makes sure that -* no errors are thrown when calling isTestCall(parent) -*/ -function x() { inject(() => {}) } - -=====================================output===================================== -beforeEach(inject(($fooService, $barService) => { - // code -})); - -afterAll(inject(($fooService, $barService) => { - console.log("Hello"); -})); - -it("should create the app", inject(($fooService, $barService) => { - //code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(() => { - // code -})); - -it("does something really long and complicated so I have to write a very long name for the test", inject(( - $fooServiceLongName, - $barServiceLongName -) => { - // code -})); - -/* - * isTestCall(parent) should only be called when parent exists - * and parent.type is CallExpression. This test makes sure that - * no errors are thrown when calling isTestCall(parent) - */ -function x() { - inject(() => {}); -} - -================================================================================ -`; - -exports[`jest-each.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -describe.each\` -a|b|expected -\${11 } | \${ 1 }|\${222} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} -\`('$a + $b', ({a, b, expected}) => { - test(\`returns \${expected}\`, () => { - expect(a + b).toBe(expected); - }); - - test(\`returned value not be greater than \${expected}\`, () => { - expect(a + b).not.toBeGreaterThan(expected); - }); - - test(\`returned value not be less than \${expected}\`, () => { - expect(a + b).not.toBeLessThan(expected); - }); -}); - -describe.only.each\` -a|b|expected -\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} -\` - -describe.only.each\` -|| -\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} -\` - -describe.each\`a | b | expected -\${1} | \${1} | \${2} -\${1} | \${2} | \${3} -\${2} | \${1} | \${3}\` - -// an example to demo multiline quasi -describe.each\`a | b | expected -\${11111111111} | \${a().b(x => x).c().d()} | \${2} -\${1} | \${2} | \${3} -\${2} | \${1} | \${3}\` - -describe.each([1, 2, 3])("test", a => { - expect(a).toBe(a); -}); - -test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( - ".add(%i, %i)", (a, b, expected) => { - expect(a + b).toBe(expected); - } -); - -test.each([ - { a: "1", b: 1 }, - { a: "2", b: 2 }, - { a: "3", b: 3 }, -])("test", ({ a, b }) => { - expect(Number(a)).toBe(b); - } -); - -=====================================output===================================== -describe.each\` - a | b | expected - \${11} | \${1} | \${222} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} -\`("$a + $b", ({ a, b, expected }) => { - test(\`returns \${expected}\`, () => { - expect(a + b).toBe(expected); - }); - - test(\`returned value not be greater than \${expected}\`, () => { - expect(a + b).not.toBeGreaterThan(expected); - }); - - test(\`returned value not be less than \${expected}\`, () => { - expect(a + b).not.toBeLessThan(expected); - }); -}); - -describe.only.each\` - a | b | expected - \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} -\`; - -describe.only.each\` - | | - \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} -\`; - -describe.each\` - a | b | expected - \${1} | \${1} | \${2} - \${1} | \${2} | \${3} - \${2} | \${1} | \${3} -\`; - -// an example to demo multiline quasi -describe.each\` - a | b | expected - \${11111111111} | \${a() - .b(x => x) - .c() - .d()} | \${2} - \${1} | \${2} | \${3} - \${2} | \${1} | \${3} -\`; - -describe.each([1, 2, 3])("test", a => { - expect(a).toBe(a); -}); - -test.only.each([ - [1, 1, 2], - [1, 2, 3], - [2, 1, 3], -])(".add(%i, %i)", (a, b, expected) => { - expect(a + b).toBe(expected); -}); - -test.each([ - { a: "1", b: 1 }, - { a: "2", b: 2 }, - { a: "3", b: 3 }, -])("test", ({ a, b }) => { - expect(Number(a)).toBe(b); -}); - -================================================================================ -`; - -exports[`jest-each.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -describe.each\` -a|b|expected -\${11 } | \${ 1 }|\${222} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} -\`('$a + $b', ({a, b, expected}) => { - test(\`returns \${expected}\`, () => { - expect(a + b).toBe(expected); - }); - - test(\`returned value not be greater than \${expected}\`, () => { - expect(a + b).not.toBeGreaterThan(expected); - }); - - test(\`returned value not be less than \${expected}\`, () => { - expect(a + b).not.toBeLessThan(expected); - }); -}); - -describe.only.each\` -a|b|expected -\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} -\` - -describe.only.each\` -|| -\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'} -\${1-1}|\${2+2}|\${ 3333} -\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'} -\` - -describe.each\`a | b | expected -\${1} | \${1} | \${2} -\${1} | \${2} | \${3} -\${2} | \${1} | \${3}\` - -// an example to demo multiline quasi -describe.each\`a | b | expected -\${11111111111} | \${a().b(x => x).c().d()} | \${2} -\${1} | \${2} | \${3} -\${2} | \${1} | \${3}\` - -describe.each([1, 2, 3])("test", a => { - expect(a).toBe(a); -}); - -test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( - ".add(%i, %i)", (a, b, expected) => { - expect(a + b).toBe(expected); - } -); - -test.each([ - { a: "1", b: 1 }, - { a: "2", b: 2 }, - { a: "3", b: 3 }, -])("test", ({ a, b }) => { - expect(Number(a)).toBe(b); - } -); - -=====================================output===================================== -describe.each\` - a | b | expected - \${11} | \${1} | \${222} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} -\`("$a + $b", ({ a, b, expected }) => { - test(\`returns \${expected}\`, () => { - expect(a + b).toBe(expected); - }); - - test(\`returned value not be greater than \${expected}\`, () => { - expect(a + b).not.toBeGreaterThan(expected); - }); - - test(\`returned value not be less than \${expected}\`, () => { - expect(a + b).not.toBeLessThan(expected); - }); -}); - -describe.only.each\` - a | b | expected - \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} -\`; - -describe.only.each\` - | | - \${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"} - \${1 - 1} | \${2 + 2} | \${3333} - \${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"} -\`; - -describe.each\` - a | b | expected - \${1} | \${1} | \${2} - \${1} | \${2} | \${3} - \${2} | \${1} | \${3} -\`; - -// an example to demo multiline quasi -describe.each\` - a | b | expected - \${11111111111} | \${a() - .b((x) => x) - .c() - .d()} | \${2} - \${1} | \${2} | \${3} - \${2} | \${1} | \${3} -\`; - -describe.each([1, 2, 3])("test", (a) => { - expect(a).toBe(a); -}); - -test.only.each([ - [1, 1, 2], - [1, 2, 3], - [2, 1, 3], -])(".add(%i, %i)", (a, b, expected) => { - expect(a + b).toBe(expected); -}); - -test.each([ - { a: "1", b: 1 }, - { a: "2", b: 2 }, - { a: "3", b: 3 }, -])("test", ({ a, b }) => { - expect(Number(a)).toBe(b); -}); - -================================================================================ -`; - -exports[`jest-each-template-string.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -test.each\` -a | b | c -\${1} | \${[{ start: 5, end: 15 }]} | \${[1,2,3,4,5,6,7,8]} -\${1}| \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} -\${3} | \${[{ start: 5, end: 15 }]} | \${[]} -\${4} | \${[{ start: 1, end: 3 },{ start: 15, end: 20 },]} | \${[]} -\`("example test", ({a, b, c}) => {}) - - -test.each\` -a | -\${[{ a: 1, b: 3 },{ c: 15, d: 20 }]}| -\${[{ start: 1, end: 3 },{ start: 15, end: 20 }, { start: 15, end: 20 },]}| -\`("example test", ({a, b, c}) => {}) - -=====================================output===================================== -test.each\` - a | b | c - \${1} | \${[{ start: 5, end: 15 }]} | \${[1, 2, 3, 4, 5, 6, 7, 8]} - \${1} | \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} - \${3} | \${[{ start: 5, end: 15 }]} | \${[]} - \${4} | \${[{ start: 1, end: 3 }, { start: 15, end: 20 }]} | \${[]} -\`("example test", ({ a, b, c }) => {}); - -test.each\` - a | - \${[{ a: 1, b: 3 }, { c: 15, d: 20 }]} - \${[{ start: 1, end: 3 }, { start: 15, end: 20 }, { start: 15, end: 20 }]} -\`("example test", ({ a, b, c }) => {}); - -================================================================================ -`; - -exports[`jest-each-template-string.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -test.each\` -a | b | c -\${1} | \${[{ start: 5, end: 15 }]} | \${[1,2,3,4,5,6,7,8]} -\${1}| \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} -\${3} | \${[{ start: 5, end: 15 }]} | \${[]} -\${4} | \${[{ start: 1, end: 3 },{ start: 15, end: 20 },]} | \${[]} -\`("example test", ({a, b, c}) => {}) - - -test.each\` -a | -\${[{ a: 1, b: 3 },{ c: 15, d: 20 }]}| -\${[{ start: 1, end: 3 },{ start: 15, end: 20 }, { start: 15, end: 20 },]}| -\`("example test", ({a, b, c}) => {}) - -=====================================output===================================== -test.each\` - a | b | c - \${1} | \${[{ start: 5, end: 15 }]} | \${[1, 2, 3, 4, 5, 6, 7, 8]} - \${1} | \${[{ start: 5, end: 15 }]} | \${["test", "string", "for", "prettier"]} - \${3} | \${[{ start: 5, end: 15 }]} | \${[]} - \${4} | \${[{ start: 1, end: 3 }, { start: 15, end: 20 }]} | \${[]} -\`("example test", ({ a, b, c }) => {}); - -test.each\` - a | - \${[{ a: 1, b: 3 }, { c: 15, d: 20 }]} - \${[{ start: 1, end: 3 }, { start: 15, end: 20 }, { start: 15, end: 20 }]} -\`("example test", ({ a, b, c }) => {}); - -================================================================================ -`; - -exports[`test_declarations.js - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Shouldn't break - -it("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function() { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function(done) { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { - console.log("hello!"); -}); - -it(\`does something really long and complicated so I have to write a very long name for the test\`, function() { - console.log("hello!"); -}); - -it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() { - console.log("hello!"); -}); - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}) - -test("does something really long and complicated so I have to write a very long name for the test", (done) => { - console.log("hello!"); -}); - -test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { - console.log("hello!"); -}); - -describe("does something really long and complicated so I have to write a very long name for the describe block", () => { - it("an example test", (done) => { - console.log("hello!"); - }); -}); - -describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { - it(\`an example test\`, (done) => { - console.log("hello!"); - }); -}); - -xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -it.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -skip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.describe.parallel.only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); - -test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -// Should break - -it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => { - console.log("hello!"); -}); - -it.only.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { - console.log("hello!"); -}); - -xskip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.parallel.serial("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.dummy.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -// timeout - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}, 2500) - -it("does something quick", () => { - console.log("hello!") -}, 1000000000) - -it( - 'succeeds if the test finishes in time', - () => new Promise(resolve => setTimeout(resolve, 10)) -); - -it( - 'succeeds if the test finishes in time', - () => new Promise(resolve => setTimeout(resolve, 10)), - 250 -); - -=====================================output===================================== -// Shouldn't break - -it("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function () { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function (done) { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { - console.log("hello!"); -}); - -it(\`does something really long and complicated so I have to write a very long name for the test\`, function () { - console.log("hello!"); -}); - -it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function () { - console.log("hello!"); -}); - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -test("does something really long and complicated so I have to write a very long name for the test", done => { - console.log("hello!"); -}); - -test(\`does something really long and complicated so I have to write a very long name for the test\`, done => { - console.log("hello!"); -}); - -describe("does something really long and complicated so I have to write a very long name for the describe block", () => { - it("an example test", done => { - console.log("hello!"); - }); -}); - -describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { - it(\`an example test\`, done => { - console.log("hello!"); - }); -}); - -xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -it.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -skip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe - .parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel - .only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.describe.parallel - .only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); - -test.describe - .serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.serial - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial - .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -// Should break - -it.only( - "does something really long and complicated so I have to write a very long name for the test", - 10, - () => { - console.log("hello!"); - } -); - -it.only.only( - "does something really long and complicated so I have to write a very long name for the test", - () => { - console.log("hello!"); - } -); - -it.only.only( - "does something really long and complicated so I have to write a very long name for the test", - (a, b, c) => { - console.log("hello!"); - } -); - -xskip( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.only.parallel( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.parallel.serial( - "does something really long and complicated so I have to write a very long name for the testThis is a very", - () => {} -); - -test.serial( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.dummy.serial( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -// timeout - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}, 2500); - -it("does something quick", () => { - console.log("hello!"); -}, 1000000000); - -it("succeeds if the test finishes in time", () => - new Promise(resolve => setTimeout(resolve, 10))); - -it( - "succeeds if the test finishes in time", - () => new Promise(resolve => setTimeout(resolve, 10)), - 250 -); - -================================================================================ -`; - -exports[`test_declarations.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Shouldn't break - -it("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function() { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function(done) { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { - console.log("hello!"); -}); - -it(\`does something really long and complicated so I have to write a very long name for the test\`, function() { - console.log("hello!"); -}); - -it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() { - console.log("hello!"); -}); - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}) - -test("does something really long and complicated so I have to write a very long name for the test", (done) => { - console.log("hello!"); -}); - -test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { - console.log("hello!"); -}); - -describe("does something really long and complicated so I have to write a very long name for the describe block", () => { - it("an example test", (done) => { - console.log("hello!"); - }); -}); - -describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { - it(\`an example test\`, (done) => { - console.log("hello!"); - }); -}); - -xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -it.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -skip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel.only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.describe.parallel.only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); - -test.describe.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.serial.only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -// Should break - -it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => { - console.log("hello!"); -}); - -it.only.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => { - console.log("hello!"); -}); - -xskip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.only.parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.parallel.serial("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.dummy.serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -// timeout - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}, 2500) - -it("does something quick", () => { - console.log("hello!") -}, 1000000000) - -it( - 'succeeds if the test finishes in time', - () => new Promise(resolve => setTimeout(resolve, 10)) -); - -it( - 'succeeds if the test finishes in time', - () => new Promise(resolve => setTimeout(resolve, 10)), - 250 -); - -=====================================output===================================== -// Shouldn't break - -it("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function () { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function (done) { - console.log("hello!"); -}); - -it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) { - console.log("hello!"); -}); - -it(\`does something really long and complicated so I have to write a very long name for the test\`, function () { - console.log("hello!"); -}); - -it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function () { - console.log("hello!"); -}); - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -test("does something really long and complicated so I have to write a very long name for the test", (done) => { - console.log("hello!"); -}); - -test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => { - console.log("hello!"); -}); - -describe("does something really long and complicated so I have to write a very long name for the describe block", () => { - it("an example test", (done) => { - console.log("hello!"); - }); -}); - -describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => { - it(\`an example test\`, (done) => { - console.log("hello!"); - }); -}); - -xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -fit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xit("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -it.only("does something really long and complicated so I have to write a very long name for the test", () => { - console.log("hello!"); -}); - -it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}); - -it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {}); - -skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -skip("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.step(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe - .parallel("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .parallel(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.parallel - .only("does something really long and complicated so I have to write a very long name for the testThis is a very", () => {}); - -test.describe.parallel - .only(\`does something really long and complicated so I have to write a very long name for the testThis is a very\`, () => {}); - -test.describe - .serial("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe - .serial(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -test.describe.serial - .only("does something really long and complicated so I have to write a very long name for the test", () => {}); - -test.describe.serial - .only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {}); - -// Should break - -it.only( - "does something really long and complicated so I have to write a very long name for the test", - 10, - () => { - console.log("hello!"); - } -); - -it.only.only( - "does something really long and complicated so I have to write a very long name for the test", - () => { - console.log("hello!"); - } -); - -it.only.only( - "does something really long and complicated so I have to write a very long name for the test", - (a, b, c) => { - console.log("hello!"); - } -); - -xskip( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.only.parallel( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.parallel.serial( - "does something really long and complicated so I have to write a very long name for the testThis is a very", - () => {} -); - -test.serial( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -test.describe.dummy.serial( - "does something really long and complicated so I have to write a very long name for the test", - () => {} -); - -// timeout - -it(\`handles - some - newlines - does something really long and complicated so I have to write a very long name for the test\`, () => { - console.log("hello!"); -}, 2500); - -it("does something quick", () => { - console.log("hello!"); -}, 1000000000); - -it("succeeds if the test finishes in time", () => - new Promise((resolve) => setTimeout(resolve, 10))); - -it( - "succeeds if the test finishes in time", - () => new Promise((resolve) => setTimeout(resolve, 10)), - 250 -); - -================================================================================ -`; diff --git a/tests/format/js/test-declarations/format.test.js b/tests/format/js/test-declarations/format.test.js new file mode 100644 index 000000000000..820a7cc49b9f --- /dev/null +++ b/tests/format/js/test-declarations/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + arrowParens: "avoid", +}); diff --git a/tests/format/js/test-declarations/jsfmt.spec.js b/tests/format/js/test-declarations/jsfmt.spec.js deleted file mode 100644 index 6298a1faed74..000000000000 --- a/tests/format/js/test-declarations/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); -run_spec(__dirname, ["babel", "flow", "typescript"], { - arrowParens: "avoid", -}); diff --git a/tests/format/js/test-declarations/optional.js b/tests/format/js/test-declarations/optional.js new file mode 100644 index 000000000000..bdaefe372ac0 --- /dev/null +++ b/tests/format/js/test-declarations/optional.js @@ -0,0 +1 @@ +describe?.("some string some string some string some string some string some string some string some string", (done) => {}) diff --git a/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap b/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5a488bf1f9ae --- /dev/null +++ b/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap @@ -0,0 +1,94 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`throw_expression.js [acorn] format 1`] = ` +"Unexpected token (1:26) +> 1 | function save(filename = throw new TypeError("Argument required")) {} + | ^ + 2 | + 3 | lint(ast, { + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: Unexpected token (1:25)" +`; + +exports[`throw_expression.js [espree] format 1`] = ` +"Unexpected token throw (1:26) +> 1 | function save(filename = throw new TypeError("Argument required")) {} + | ^ + 2 | + 3 | lint(ast, { + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: Unexpected token throw" +`; + +exports[`throw_expression.js [meriyah] format 1`] = ` +"Unexpected token: 'throw' (1:26) +> 1 | function save(filename = throw new TypeError("Argument required")) {} + | ^^^^^ + 2 | + 3 | lint(ast, { + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: [1:25-1:30]: Unexpected token: 'throw'" +`; + +exports[`throw_expression.js [oxc] format 1`] = ` +"Unexpected token (1:26) +> 1 | function save(filename = throw new TypeError("Argument required")) {} + | ^^^^^ + 2 | + 3 | lint(ast, { + 4 | with: () => throw new Error("avoid using 'with' statements.")" +`; + +exports[`throw_expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +function save(filename = throw new TypeError("Argument required")) {} + +lint(ast, { + with: () => throw new Error("avoid using 'with' statements.") +}); + +function getEncoder(encoding) { + const encoder = encoding === "utf8" ? new UTF8Encoder() + : encoding === "utf16le" ? new UTF16Encoder(false) + : encoding === "utf16be" ? new UTF16Encoder(true) + : throw new Error("Unsupported encoding"); +} + +class Product { + get id() { return this._id; } + set id(value) { this._id = value || throw new Error("Invalid value"); } +} + +=====================================output===================================== +function save(filename = throw new TypeError("Argument required")) {} + +lint(ast, { + with: () => throw new Error("avoid using 'with' statements."), +}); + +function getEncoder(encoding) { + const encoder = + encoding === "utf8" + ? new UTF8Encoder() + : encoding === "utf16le" + ? new UTF16Encoder(false) + : encoding === "utf16be" + ? new UTF16Encoder(true) + : throw new Error("Unsupported encoding"); +} + +class Product { + get id() { + return this._id; + } + set id(value) { + this._id = value || throw new Error("Invalid value"); + } +} + +================================================================================ +`; diff --git a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 301a291c6a70..000000000000 --- a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,82 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`throw_expression.js [acorn] format 1`] = ` -"Unexpected token (1:26) -> 1 | function save(filename = throw new TypeError("Argument required")) {} - | ^ - 2 | - 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" -`; - -exports[`throw_expression.js [espree] format 1`] = ` -"Unexpected token throw (1:26) -> 1 | function save(filename = throw new TypeError("Argument required")) {} - | ^ - 2 | - 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" -`; - -exports[`throw_expression.js [meriyah] format 1`] = ` -"Unexpected token: 'throw' (1:30) -> 1 | function save(filename = throw new TypeError("Argument required")) {} - | ^ - 2 | - 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" -`; - -exports[`throw_expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -function save(filename = throw new TypeError("Argument required")) {} - -lint(ast, { - with: () => throw new Error("avoid using 'with' statements.") -}); - -function getEncoder(encoding) { - const encoder = encoding === "utf8" ? new UTF8Encoder() - : encoding === "utf16le" ? new UTF16Encoder(false) - : encoding === "utf16be" ? new UTF16Encoder(true) - : throw new Error("Unsupported encoding"); -} - -class Product { - get id() { return this._id; } - set id(value) { this._id = value || throw new Error("Invalid value"); } -} - -=====================================output===================================== -function save(filename = throw new TypeError("Argument required")) {} - -lint(ast, { - with: () => throw new Error("avoid using 'with' statements."), -}); - -function getEncoder(encoding) { - const encoder = - encoding === "utf8" - ? new UTF8Encoder() - : encoding === "utf16le" - ? new UTF16Encoder(false) - : encoding === "utf16be" - ? new UTF16Encoder(true) - : throw new Error("Unsupported encoding"); -} - -class Product { - get id() { - return this._id; - } - set id(value) { - this._id = value || throw new Error("Invalid value"); - } -} - -================================================================================ -`; diff --git a/tests/format/js/throw_expressions/format.test.js b/tests/format/js/throw_expressions/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/throw_expressions/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/throw_expressions/jsfmt.spec.js b/tests/format/js/throw_expressions/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/throw_expressions/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/throw_statement/__snapshots__/format.test.js.snap b/tests/format/js/throw_statement/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..92bf39af1e85 --- /dev/null +++ b/tests/format/js/throw_statement/__snapshots__/format.test.js.snap @@ -0,0 +1,173 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`binaryish.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f() { + throw ( + property.isIdentifier() && + FUNCTIONS[property.node.name] && + (object.isIdentifier(JEST_GLOBAL) || + (callee.isMemberExpression() && shouldHoistExpression(object))) && + FUNCTIONS[property.node.name](expr.get('arguments')) + ); + + throw ( + chalk.bold( + 'No tests found related to files changed since last commit.\\n', + ) + + chalk.dim( + patternInfo.watch ? + 'Press \`a\` to run all tests, or run Jest with \`--watchAll\`.' : + 'Run Jest without \`-o\` to run all tests.', + ) + ); + + throw !filePath.includes(coverageDirectory) && + !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`); +} + +=====================================output===================================== +function f() { + throw ( + property.isIdentifier() && + FUNCTIONS[property.node.name] && + (object.isIdentifier(JEST_GLOBAL) || + (callee.isMemberExpression() && shouldHoistExpression(object))) && + FUNCTIONS[property.node.name](expr.get("arguments")) + ); + + throw ( + chalk.bold("No tests found related to files changed since last commit.\\n") + + chalk.dim( + patternInfo.watch + ? "Press \`a\` to run all tests, or run Jest with \`--watchAll\`." + : "Run Jest without \`-o\` to run all tests.", + ) + ); + + throw ( + !filePath.includes(coverageDirectory) && + !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`) + ); +} + +================================================================================ +`; + +exports[`comment.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function x() { + throw func2 + //comment + .bar(); +} + +function f() { + throw ( + foo + // comment + .bar() + ); +} + +fn(function f() { + throw ( + foo + // comment + .bar() + ); +}); + +=====================================output===================================== +function x() { + throw ( + func2 + //comment + .bar() + ); +} + +function f() { + throw ( + foo + // comment + .bar() + ); +} + +fn(function f() { + throw ( + foo + // comment + .bar() + ); +}); + +================================================================================ +`; + +exports[`jsx.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + throw <Bar />; +} + +function foo() { + throw <Bar>baz</Bar>; +} + +function foo() { + throw <Bar baz={baz} />; +} + +function foo() { + throw <Bar baz={baz}>foo</Bar>; +} + +function foo() { + throw <></>; +} + +function foo() { + throw <>foo</>; +} + +=====================================output===================================== +function foo() { + throw <Bar />; +} + +function foo() { + throw <Bar>baz</Bar>; +} + +function foo() { + throw <Bar baz={baz} />; +} + +function foo() { + throw <Bar baz={baz}>foo</Bar>; +} + +function foo() { + throw <></>; +} + +function foo() { + throw <>foo</>; +} + +================================================================================ +`; diff --git a/tests/format/js/throw_statement/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/throw_statement/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index aaf7efd967ce..000000000000 --- a/tests/format/js/throw_statement/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,173 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`binaryish.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f() { - throw ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expr.get('arguments')) - ); - - throw ( - chalk.bold( - 'No tests found related to files changed since last commit.\\n', - ) + - chalk.dim( - patternInfo.watch ? - 'Press \`a\` to run all tests, or run Jest with \`--watchAll\`.' : - 'Run Jest without \`-o\` to run all tests.', - ) - ); - - throw !filePath.includes(coverageDirectory) && - !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`); -} - -=====================================output===================================== -function f() { - throw ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expr.get("arguments")) - ); - - throw ( - chalk.bold("No tests found related to files changed since last commit.\\n") + - chalk.dim( - patternInfo.watch - ? "Press \`a\` to run all tests, or run Jest with \`--watchAll\`." - : "Run Jest without \`-o\` to run all tests." - ) - ); - - throw ( - !filePath.includes(coverageDirectory) && - !filePath.endsWith(\`.\${SNAPSHOT_EXTENSION}\`) - ); -} - -================================================================================ -`; - -exports[`comment.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function x() { - throw func2 - //comment - .bar(); -} - -function f() { - throw ( - foo - // comment - .bar() - ); -} - -fn(function f() { - throw ( - foo - // comment - .bar() - ); -}); - -=====================================output===================================== -function x() { - throw ( - func2 - //comment - .bar() - ); -} - -function f() { - throw ( - foo - // comment - .bar() - ); -} - -fn(function f() { - throw ( - foo - // comment - .bar() - ); -}); - -================================================================================ -`; - -exports[`jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo() { - throw <Bar />; -} - -function foo() { - throw <Bar>baz</Bar>; -} - -function foo() { - throw <Bar baz={baz} />; -} - -function foo() { - throw <Bar baz={baz}>foo</Bar>; -} - -function foo() { - throw <></>; -} - -function foo() { - throw <>foo</>; -} - -=====================================output===================================== -function foo() { - throw <Bar />; -} - -function foo() { - throw <Bar>baz</Bar>; -} - -function foo() { - throw <Bar baz={baz} />; -} - -function foo() { - throw <Bar baz={baz}>foo</Bar>; -} - -function foo() { - throw <></>; -} - -function foo() { - throw <>foo</>; -} - -================================================================================ -`; diff --git a/tests/format/js/throw_statement/format.test.js b/tests/format/js/throw_statement/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/throw_statement/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/throw_statement/jsfmt.spec.js b/tests/format/js/throw_statement/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/throw_statement/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/top-level-await/__snapshots__/format.test.js.snap b/tests/format/js/top-level-await/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..16fa177226e3 --- /dev/null +++ b/tests/format/js/top-level-await/__snapshots__/format.test.js.snap @@ -0,0 +1,73 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`example.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await something(); + +=====================================output===================================== +await something(); + +================================================================================ +`; + +exports[`in-expression.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +call( +await something() +) + +=====================================output===================================== +call(await something()); + +================================================================================ +`; + +exports[`test.cjs format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await(1); + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; + +exports[`test.mjs format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; diff --git a/tests/format/js/top-level-await/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/top-level-await/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 249b632a6672..000000000000 --- a/tests/format/js/top-level-await/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,31 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`example.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -await something(); - -=====================================output===================================== -await something(); - -================================================================================ -`; - -exports[`in-expression.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -call( -await something() -) - -=====================================output===================================== -call(await something()); - -================================================================================ -`; diff --git a/tests/format/js/top-level-await/format.test.js b/tests/format/js/top-level-await/format.test.js new file mode 100644 index 000000000000..98ba37cc2f18 --- /dev/null +++ b/tests/format/js/top-level-await/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/js/top-level-await/jsfmt.spec.js b/tests/format/js/top-level-await/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/js/top-level-await/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/js/top-level-await/test.cjs b/tests/format/js/top-level-await/test.cjs new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/js/top-level-await/test.cjs @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/js/top-level-await/test.js b/tests/format/js/top-level-await/test.js new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/js/top-level-await/test.js @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/js/top-level-await/test.mjs b/tests/format/js/top-level-await/test.mjs new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/js/top-level-await/test.mjs @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/js/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/js/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9a29c24b8a1a --- /dev/null +++ b/tests/format/js/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,901 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dynamic-import.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +import( + 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' +); + +=====================================output===================================== +import( + "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" +); + +================================================================================ +`; + +exports[`dynamic-import.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +import( + 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' +); + +=====================================output===================================== +import( + "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" +); + +================================================================================ +`; + +exports[`dynamic-import.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +import( + 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' +); + +=====================================output===================================== +import( + "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" +); + +================================================================================ +`; + +exports[`es5.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to +) { + send_single_email_implementation( app, + email_id, + email_address, + subject, + html, + reply_to); + return "nothing"; +} + +=====================================output===================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to, +) { + send_single_email_implementation( + app, + email_id, + email_address, + subject, + html, + reply_to, + ); + return "nothing"; +} + +================================================================================ +`; + +exports[`es5.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to +) { + send_single_email_implementation( app, + email_id, + email_address, + subject, + html, + reply_to); + return "nothing"; +} + +=====================================output===================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to +) { + send_single_email_implementation( + app, + email_id, + email_address, + subject, + html, + reply_to + ); + return "nothing"; +} + +================================================================================ +`; + +exports[`es5.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to +) { + send_single_email_implementation( app, + email_id, + email_address, + subject, + html, + reply_to); + return "nothing"; +} + +=====================================output===================================== +function send_single_email( + app, + email_id, + email_address, + subject, + html, + reply_to +) { + send_single_email_implementation( + app, + email_id, + email_address, + subject, + html, + reply_to + ); + return "nothing"; +} + +================================================================================ +`; + +exports[`function-calls.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const a = (param1, param2, param3) => {} + +a('value', 'value2', 'value3'); + +a( + 'a-long-value', + 'a-really-really-long-value', + 'a-really-really-really-long-value', +); + +a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); + +a.b().c( + { + d, + }, + () => {} +); + +=====================================output===================================== +const a = (param1, param2, param3) => {}; + +a("value", "value2", "value3"); + +a( + "a-long-value", + "a-really-really-long-value", + "a-really-really-really-long-value", +); + +a( + "value", + "value2", + a("long-nested-value", "long-nested-value2", "long-nested-value3"), +); + +a.b().c( + { + d, + }, + () => {}, +); + +================================================================================ +`; + +exports[`function-calls.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const a = (param1, param2, param3) => {} + +a('value', 'value2', 'value3'); + +a( + 'a-long-value', + 'a-really-really-long-value', + 'a-really-really-really-long-value', +); + +a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); + +a.b().c( + { + d, + }, + () => {} +); + +=====================================output===================================== +const a = (param1, param2, param3) => {}; + +a("value", "value2", "value3"); + +a( + "a-long-value", + "a-really-really-long-value", + "a-really-really-really-long-value" +); + +a( + "value", + "value2", + a("long-nested-value", "long-nested-value2", "long-nested-value3") +); + +a.b().c( + { + d, + }, + () => {} +); + +================================================================================ +`; + +exports[`function-calls.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +const a = (param1, param2, param3) => {} + +a('value', 'value2', 'value3'); + +a( + 'a-long-value', + 'a-really-really-long-value', + 'a-really-really-really-long-value', +); + +a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); + +a.b().c( + { + d, + }, + () => {} +); + +=====================================output===================================== +const a = (param1, param2, param3) => {}; + +a("value", "value2", "value3"); + +a( + "a-long-value", + "a-really-really-long-value", + "a-really-really-really-long-value" +); + +a( + "value", + "value2", + a("long-nested-value", "long-nested-value2", "long-nested-value3") +); + +a.b().c( + { + d + }, + () => {} +); + +================================================================================ +`; + +exports[`jsx.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +<div + onClick={() => + doSomething({ + foo: bar + }) + } +/>; + +=====================================output===================================== +<div + onClick={() => + doSomething({ + foo: bar, + }) + } +/>; + +================================================================================ +`; + +exports[`jsx.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<div + onClick={() => + doSomething({ + foo: bar + }) + } +/>; + +=====================================output===================================== +<div + onClick={() => + doSomething({ + foo: bar, + }) + } +/>; + +================================================================================ +`; + +exports[`jsx.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<div + onClick={() => + doSomething({ + foo: bar + }) + } +/>; + +=====================================output===================================== +<div + onClick={() => + doSomething({ + foo: bar + }) + } +/>; + +================================================================================ +`; + +exports[`object.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const a = { + b: true, + c: { + c1: 'hello' + }, + d: false +}; + +const aLong = { + bHasALongName: 'a-long-value', + cHasALongName: { + c1: 'a-really-long-value', + c2: 'a-really-really-long-value', + }, + dHasALongName: 'a-long-value-too' +}; + +const bLong = { + dHasALongName: 'a-long-value-too', + eHasABooleanExpression: a === a, +}; + +=====================================output===================================== +const a = { + b: true, + c: { + c1: "hello", + }, + d: false, +}; + +const aLong = { + bHasALongName: "a-long-value", + cHasALongName: { + c1: "a-really-long-value", + c2: "a-really-really-long-value", + }, + dHasALongName: "a-long-value-too", +}; + +const bLong = { + dHasALongName: "a-long-value-too", + eHasABooleanExpression: a === a, +}; + +================================================================================ +`; + +exports[`object.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const a = { + b: true, + c: { + c1: 'hello' + }, + d: false +}; + +const aLong = { + bHasALongName: 'a-long-value', + cHasALongName: { + c1: 'a-really-long-value', + c2: 'a-really-really-long-value', + }, + dHasALongName: 'a-long-value-too' +}; + +const bLong = { + dHasALongName: 'a-long-value-too', + eHasABooleanExpression: a === a, +}; + +=====================================output===================================== +const a = { + b: true, + c: { + c1: "hello", + }, + d: false, +}; + +const aLong = { + bHasALongName: "a-long-value", + cHasALongName: { + c1: "a-really-long-value", + c2: "a-really-really-long-value", + }, + dHasALongName: "a-long-value-too", +}; + +const bLong = { + dHasALongName: "a-long-value-too", + eHasABooleanExpression: a === a, +}; + +================================================================================ +`; + +exports[`object.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +const a = { + b: true, + c: { + c1: 'hello' + }, + d: false +}; + +const aLong = { + bHasALongName: 'a-long-value', + cHasALongName: { + c1: 'a-really-long-value', + c2: 'a-really-really-long-value', + }, + dHasALongName: 'a-long-value-too' +}; + +const bLong = { + dHasALongName: 'a-long-value-too', + eHasABooleanExpression: a === a, +}; + +=====================================output===================================== +const a = { + b: true, + c: { + c1: "hello" + }, + d: false +}; + +const aLong = { + bHasALongName: "a-long-value", + cHasALongName: { + c1: "a-really-long-value", + c2: "a-really-really-long-value" + }, + dHasALongName: "a-long-value-too" +}; + +const bLong = { + dHasALongName: "a-long-value-too", + eHasABooleanExpression: a === a +}; + +================================================================================ +`; + +exports[`trailing_whitespace.js - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +let example = [ + 'FOO', + 'BAR', + // Comment +]; + +foo({}, + // Comment +); + +o = { + state, + // Comment +}; + +o = { + state, + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB, + // Comment +) { + a +} + +this.getAttribute(function(s) + /*string*/ { + console.log() +}); +this.getAttribute(function(s) /*string*/ { + console.log() +}); + +=====================================output===================================== +let example = [ + "FOO", + "BAR", + // Comment +]; + +foo( + {}, + // Comment +); + +o = { + state, + // Comment +}; + +o = { + state, + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB, + // Comment +) { + a; +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB, + // Comment +) { + a; +} + +this.getAttribute(function (s) /*string*/ { + console.log(); +}); +this.getAttribute(function (s) /*string*/ { + console.log(); +}); + +================================================================================ +`; + +exports[`trailing_whitespace.js - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +let example = [ + 'FOO', + 'BAR', + // Comment +]; + +foo({}, + // Comment +); + +o = { + state, + // Comment +}; + +o = { + state, + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB, + // Comment +) { + a +} + +this.getAttribute(function(s) + /*string*/ { + console.log() +}); +this.getAttribute(function(s) /*string*/ { + console.log() +}); + +=====================================output===================================== +let example = [ + "FOO", + "BAR", + // Comment +]; + +foo( + {} + // Comment +); + +o = { + state, + // Comment +}; + +o = { + state, + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a; +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a; +} + +this.getAttribute(function (s) /*string*/ { + console.log(); +}); +this.getAttribute(function (s) /*string*/ { + console.log(); +}); + +================================================================================ +`; + +exports[`trailing_whitespace.js - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +let example = [ + 'FOO', + 'BAR', + // Comment +]; + +foo({}, + // Comment +); + +o = { + state, + // Comment +}; + +o = { + state, + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB, + // Comment +) { + a +} + +this.getAttribute(function(s) + /*string*/ { + console.log() +}); +this.getAttribute(function(s) /*string*/ { + console.log() +}); + +=====================================output===================================== +let example = [ + "FOO", + "BAR" + // Comment +]; + +foo( + {} + // Comment +); + +o = { + state + // Comment +}; + +o = { + state + + // Comment +}; + +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a; +} +function supersupersupersuperLongF( + supersupersupersuperLongA, + supersupersupersuperLongB + // Comment +) { + a; +} + +this.getAttribute(function (s) /*string*/ { + console.log(); +}); +this.getAttribute(function (s) /*string*/ { + console.log(); +}); + +================================================================================ +`; diff --git a/tests/format/js/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/trailing-comma/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 530ee12d75a1..000000000000 --- a/tests/format/js/trailing-comma/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,895 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`dynamic-import.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -import( - 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' -); - -=====================================output===================================== -import( - "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" -); - -================================================================================ -`; - -exports[`dynamic-import.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -import( - 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' -); - -=====================================output===================================== -import( - "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" -); - -================================================================================ -`; - -exports[`dynamic-import.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import( - 'myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename' -); - -=====================================output===================================== -import( - "myreallylongdynamicallyloadedmodulenamemyreallylongdynamicallyloadedmodulename" -); - -================================================================================ -`; - -exports[`es5.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to -) { - send_single_email_implementation( app, - email_id, - email_address, - subject, - html, - reply_to); - return "nothing"; -} - -=====================================output===================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to, -) { - send_single_email_implementation( - app, - email_id, - email_address, - subject, - html, - reply_to, - ); - return "nothing"; -} - -================================================================================ -`; - -exports[`es5.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to -) { - send_single_email_implementation( app, - email_id, - email_address, - subject, - html, - reply_to); - return "nothing"; -} - -=====================================output===================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to -) { - send_single_email_implementation( - app, - email_id, - email_address, - subject, - html, - reply_to - ); - return "nothing"; -} - -================================================================================ -`; - -exports[`es5.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to -) { - send_single_email_implementation( app, - email_id, - email_address, - subject, - html, - reply_to); - return "nothing"; -} - -=====================================output===================================== -function send_single_email( - app, - email_id, - email_address, - subject, - html, - reply_to -) { - send_single_email_implementation( - app, - email_id, - email_address, - subject, - html, - reply_to - ); - return "nothing"; -} - -================================================================================ -`; - -exports[`function-calls.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const a = (param1, param2, param3) => {} - -a('value', 'value2', 'value3'); - -a( - 'a-long-value', - 'a-really-really-long-value', - 'a-really-really-really-long-value', -); - -a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); - -a.b().c( - { - d, - }, - () => {} -); - -=====================================output===================================== -const a = (param1, param2, param3) => {}; - -a("value", "value2", "value3"); - -a( - "a-long-value", - "a-really-really-long-value", - "a-really-really-really-long-value", -); - -a( - "value", - "value2", - a("long-nested-value", "long-nested-value2", "long-nested-value3"), -); - -a.b().c( - { - d, - }, - () => {}, -); - -================================================================================ -`; - -exports[`function-calls.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -const a = (param1, param2, param3) => {} - -a('value', 'value2', 'value3'); - -a( - 'a-long-value', - 'a-really-really-long-value', - 'a-really-really-really-long-value', -); - -a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); - -a.b().c( - { - d, - }, - () => {} -); - -=====================================output===================================== -const a = (param1, param2, param3) => {}; - -a("value", "value2", "value3"); - -a( - "a-long-value", - "a-really-really-long-value", - "a-really-really-really-long-value" -); - -a( - "value", - "value2", - a("long-nested-value", "long-nested-value2", "long-nested-value3") -); - -a.b().c( - { - d - }, - () => {} -); - -================================================================================ -`; - -exports[`function-calls.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = (param1, param2, param3) => {} - -a('value', 'value2', 'value3'); - -a( - 'a-long-value', - 'a-really-really-long-value', - 'a-really-really-really-long-value', -); - -a('value', 'value2', a('long-nested-value', 'long-nested-value2', 'long-nested-value3')); - -a.b().c( - { - d, - }, - () => {} -); - -=====================================output===================================== -const a = (param1, param2, param3) => {}; - -a("value", "value2", "value3"); - -a( - "a-long-value", - "a-really-really-long-value", - "a-really-really-really-long-value" -); - -a( - "value", - "value2", - a("long-nested-value", "long-nested-value2", "long-nested-value3") -); - -a.b().c( - { - d, - }, - () => {} -); - -================================================================================ -`; - -exports[`jsx.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -<div - onClick={() => - doSomething({ - foo: bar - }) - } -/>; - -=====================================output===================================== -<div - onClick={() => - doSomething({ - foo: bar, - }) - } -/>; - -================================================================================ -`; - -exports[`jsx.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<div - onClick={() => - doSomething({ - foo: bar - }) - } -/>; - -=====================================output===================================== -<div - onClick={() => - doSomething({ - foo: bar - }) - } -/>; - -================================================================================ -`; - -exports[`jsx.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div - onClick={() => - doSomething({ - foo: bar - }) - } -/>; - -=====================================output===================================== -<div - onClick={() => - doSomething({ - foo: bar, - }) - } -/>; - -================================================================================ -`; - -exports[`object.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const a = { - b: true, - c: { - c1: 'hello' - }, - d: false -}; - -const aLong = { - bHasALongName: 'a-long-value', - cHasALongName: { - c1: 'a-really-long-value', - c2: 'a-really-really-long-value', - }, - dHasALongName: 'a-long-value-too' -}; - -const bLong = { - dHasALongName: 'a-long-value-too', - eHasABooleanExpression: a === a, -}; - -=====================================output===================================== -const a = { - b: true, - c: { - c1: "hello", - }, - d: false, -}; - -const aLong = { - bHasALongName: "a-long-value", - cHasALongName: { - c1: "a-really-long-value", - c2: "a-really-really-long-value", - }, - dHasALongName: "a-long-value-too", -}; - -const bLong = { - dHasALongName: "a-long-value-too", - eHasABooleanExpression: a === a, -}; - -================================================================================ -`; - -exports[`object.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -const a = { - b: true, - c: { - c1: 'hello' - }, - d: false -}; - -const aLong = { - bHasALongName: 'a-long-value', - cHasALongName: { - c1: 'a-really-long-value', - c2: 'a-really-really-long-value', - }, - dHasALongName: 'a-long-value-too' -}; - -const bLong = { - dHasALongName: 'a-long-value-too', - eHasABooleanExpression: a === a, -}; - -=====================================output===================================== -const a = { - b: true, - c: { - c1: "hello" - }, - d: false -}; - -const aLong = { - bHasALongName: "a-long-value", - cHasALongName: { - c1: "a-really-long-value", - c2: "a-really-really-long-value" - }, - dHasALongName: "a-long-value-too" -}; - -const bLong = { - dHasALongName: "a-long-value-too", - eHasABooleanExpression: a === a -}; - -================================================================================ -`; - -exports[`object.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = { - b: true, - c: { - c1: 'hello' - }, - d: false -}; - -const aLong = { - bHasALongName: 'a-long-value', - cHasALongName: { - c1: 'a-really-long-value', - c2: 'a-really-really-long-value', - }, - dHasALongName: 'a-long-value-too' -}; - -const bLong = { - dHasALongName: 'a-long-value-too', - eHasABooleanExpression: a === a, -}; - -=====================================output===================================== -const a = { - b: true, - c: { - c1: "hello", - }, - d: false, -}; - -const aLong = { - bHasALongName: "a-long-value", - cHasALongName: { - c1: "a-really-long-value", - c2: "a-really-really-long-value", - }, - dHasALongName: "a-long-value-too", -}; - -const bLong = { - dHasALongName: "a-long-value-too", - eHasABooleanExpression: a === a, -}; - -================================================================================ -`; - -exports[`trailing_whitespace.js - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -let example = [ - 'FOO', - 'BAR', - // Comment -]; - -foo({}, - // Comment -); - -o = { - state, - // Comment -}; - -o = { - state, - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB, - // Comment -) { - a -} - -this.getAttribute(function(s) - /*string*/ { - console.log() -}); -this.getAttribute(function(s) /*string*/ { - console.log() -}); - -=====================================output===================================== -let example = [ - "FOO", - "BAR", - // Comment -]; - -foo( - {}, - // Comment -); - -o = { - state, - // Comment -}; - -o = { - state, - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB, - // Comment -) { - a; -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB, - // Comment -) { - a; -} - -this.getAttribute(function (s) /*string*/ { - console.log(); -}); -this.getAttribute(function (s) /*string*/ { - console.log(); -}); - -================================================================================ -`; - -exports[`trailing_whitespace.js - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -let example = [ - 'FOO', - 'BAR', - // Comment -]; - -foo({}, - // Comment -); - -o = { - state, - // Comment -}; - -o = { - state, - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB, - // Comment -) { - a -} - -this.getAttribute(function(s) - /*string*/ { - console.log() -}); -this.getAttribute(function(s) /*string*/ { - console.log() -}); - -=====================================output===================================== -let example = [ - "FOO", - "BAR" - // Comment -]; - -foo( - {} - // Comment -); - -o = { - state - // Comment -}; - -o = { - state - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a; -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a; -} - -this.getAttribute(function (s) /*string*/ { - console.log(); -}); -this.getAttribute(function (s) /*string*/ { - console.log(); -}); - -================================================================================ -`; - -exports[`trailing_whitespace.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let example = [ - 'FOO', - 'BAR', - // Comment -]; - -foo({}, - // Comment -); - -o = { - state, - // Comment -}; - -o = { - state, - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB, - // Comment -) { - a -} - -this.getAttribute(function(s) - /*string*/ { - console.log() -}); -this.getAttribute(function(s) /*string*/ { - console.log() -}); - -=====================================output===================================== -let example = [ - "FOO", - "BAR", - // Comment -]; - -foo( - {} - // Comment -); - -o = { - state, - // Comment -}; - -o = { - state, - - // Comment -}; - -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a; -} -function supersupersupersuperLongF( - supersupersupersuperLongA, - supersupersupersuperLongB - // Comment -) { - a; -} - -this.getAttribute(function (s) /*string*/ { - console.log(); -}); -this.getAttribute(function (s) /*string*/ { - console.log(); -}); - -================================================================================ -`; diff --git a/tests/format/js/trailing-comma/format.test.js b/tests/format/js/trailing-comma/format.test.js new file mode 100644 index 000000000000..e4801039fa4d --- /dev/null +++ b/tests/format/js/trailing-comma/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "none", +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "all", +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + trailingComma: "es5", +}); diff --git a/tests/format/js/trailing-comma/jsfmt.spec.js b/tests/format/js/trailing-comma/jsfmt.spec.js deleted file mode 100644 index d6070f190a2f..000000000000 --- a/tests/format/js/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { trailingComma: "none" }); -run_spec(__dirname, ["babel", "flow", "typescript"], { trailingComma: "all" }); -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/trailing-whitespace/__snapshots__/format.test.js.snap b/tests/format/js/trailing-whitespace/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9d28f0f6a34a --- /dev/null +++ b/tests/format/js/trailing-whitespace/__snapshots__/format.test.js.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +\` + + +\` + \` + + +\`; +=====================================output===================================== +\` + + +\` + + \` + + +\`; + +================================================================================ +`; diff --git a/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f002c2f49ed6..000000000000 --- a/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,63 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`trailing.js [acorn] format 1`] = ` -"Unexpected token (1:8) -> 1 | export type Result<T, V> = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; - | ^ - 2 | - 3 | // Note: there are trailing whitespace in this file - 4 | \`" -`; - -exports[`trailing.js [espree] format 1`] = ` -"Unexpected token type (1:8) -> 1 | export type Result<T, V> = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; - | ^ - 2 | - 3 | // Note: there are trailing whitespace in this file - 4 | \`" -`; - -exports[`trailing.js [meriyah] format 1`] = ` -"Unexpected token: 'identifier' (1:11) -> 1 | export type Result<T, V> = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; - | ^ - 2 | - 3 | // Note: there are trailing whitespace in this file - 4 | \`" -`; - -exports[`trailing.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type Result<T, V> = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; - -// Note: there are trailing whitespace in this file -\` - - -\` + \` - - -\`; - -=====================================output===================================== -export type Result<T, V> = - | { kind: "not-test-editor1" } - | { kind: "not-test-editor2" }; - -// Note: there are trailing whitespace in this file -\` - - -\` + - \` - - -\`; - -================================================================================ -`; diff --git a/tests/format/js/trailing-whitespace/format.test.js b/tests/format/js/trailing-whitespace/format.test.js new file mode 100644 index 000000000000..2a22a5b60896 --- /dev/null +++ b/tests/format/js/trailing-whitespace/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["`\n \n \n` + `\n \n \n`;"], + }, + ["babel", "flow", "typescript"], +); diff --git a/tests/format/js/trailing-whitespace/jsfmt.spec.js b/tests/format/js/trailing-whitespace/jsfmt.spec.js deleted file mode 100644 index 0d5dea140882..000000000000 --- a/tests/format/js/trailing-whitespace/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/trailing-whitespace/trailing.js b/tests/format/js/trailing-whitespace/trailing.js deleted file mode 100644 index 2d23f824bef6..000000000000 --- a/tests/format/js/trailing-whitespace/trailing.js +++ /dev/null @@ -1,10 +0,0 @@ -export type Result<T, V> = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; - -// Note: there are trailing whitespace in this file -` - - -` + ` - - -`; diff --git a/tests/format/js/try/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/try/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/try/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/try/__snapshots__/format.test.js.snap diff --git a/tests/format/js/try/format.test.js b/tests/format/js/try/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/try/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/try/jsfmt.spec.js b/tests/format/js/try/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/try/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d1bcea4019de..000000000000 --- a/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,246 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`destructuring.js [acorn] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const [a, b] = #[1, 2]; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js [espree] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const [a, b] = #[1, 2]; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:16) -> 1 | const [a, b] = #[1, 2]; - | ^ - 2 | assert(a === 1); - 3 | assert(b === 2); - 4 |" -`; - -exports[`destructuring.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const [a, b] = #[1, 2]; -assert(a === 1); -assert(b === 2); - -const [a, ...rest] = #[1, 2, 3]; -assert(a === 1); -assert(Array.isArray(rest)); -assert(rest[0] === 2); -assert(rest[1] === 3); - -=====================================output===================================== -const [a, b] = #[1, 2]; -assert(a === 1); -assert(b === 2); - -const [a, ...rest] = #[1, 2, 3]; -assert(a === 1); -assert(Array.isArray(rest)); -assert(rest[0] === 2); -assert(rest[1] === 3); - -================================================================================ -`; - -exports[`invalid-tuple-holes.js [__babel_estree] format 1`] = ` -"Unexpected token ','. (1:4) -> 1 | #[,] - | ^ - 2 |" -`; - -exports[`invalid-tuple-holes.js [acorn] format 1`] = ` -"Unexpected character '[' (1:2) -> 1 | #[,] - | ^ - 2 |" -`; - -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:2) -> 1 | #[,] - | ^ - 2 |" -`; - -exports[`invalid-tuple-holes.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #[,] - | ^ - 2 |" -`; - -exports[`syntax.js [acorn] format 1`] = ` -"Unexpected character '[' (1:2) -> 1 | #[] - | ^ - 2 | #[1, 2] - 3 | #[1, 2, #{ a: 3 }] - 4 |" -`; - -exports[`syntax.js [espree] format 1`] = ` -"Unexpected character '[' (1:2) -> 1 | #[] - | ^ - 2 | #[1, 2] - 3 | #[1, 2, #{ a: 3 }] - 4 |" -`; - -exports[`syntax.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #[] - | ^ - 2 | #[1, 2] - 3 | #[1, 2, #{ a: 3 }] - 4 |" -`; - -exports[`syntax.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -#[] -#[1, 2] -#[1, 2, #{ a: 3 }] - -=====================================output===================================== -#[]; -#[1, 2]; -#[1, 2, #{ a: 3 }]; - -================================================================================ -`; - -exports[`tuple.js [acorn] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 | - 3 | assert(tuple1[0] === 1); - 4 |" -`; - -exports[`tuple.js [espree] format 1`] = ` -"Unexpected character '[' (1:17) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 | - 3 | assert(tuple1[0] === 1); - 4 |" -`; - -exports[`tuple.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:16) -> 1 | const tuple1 = #[1, 2, 3]; - | ^ - 2 | - 3 | assert(tuple1[0] === 1); - 4 |" -`; - -exports[`tuple.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const tuple1 = #[1, 2, 3]; - -assert(tuple1[0] === 1); - -const tuple2 = tuple1.with(0, 2); -assert(tuple1 !== tuple2); -assert(tuple2 === #[2, 2, 3]); - -const tuple3 = #[1, ...tuple2]; -assert(tuple3 === #[1, 2, 2, 3]); - -const tuple4 = tuple3.pushed(4); -assert(tuple4 === #[1, 2, 2, 3, 4]); - -assert(tuple4.first() === 1); -const tuple5 = tuple4.popped(); -assert(tuple5 === #[2, 2, 3, 4]); - -=====================================output===================================== -const tuple1 = #[1, 2, 3]; - -assert(tuple1[0] === 1); - -const tuple2 = tuple1.with(0, 2); -assert(tuple1 !== tuple2); -assert(tuple2 === #[2, 2, 3]); - -const tuple3 = #[1, ...tuple2]; -assert(tuple3 === #[1, 2, 2, 3]); - -const tuple4 = tuple3.pushed(4); -assert(tuple4 === #[1, 2, 2, 3, 4]); - -assert(tuple4.first() === 1); -const tuple5 = tuple4.popped(); -assert(tuple5 === #[2, 2, 3, 4]); - -================================================================================ -`; - -exports[`tuple-trailing-comma.js [acorn] format 1`] = ` -"Unexpected character '[' (1:2) -> 1 | #[1,] - | ^ - 2 |" -`; - -exports[`tuple-trailing-comma.js [espree] format 1`] = ` -"Unexpected character '[' (1:2) -> 1 | #[1,] - | ^ - 2 |" -`; - -exports[`tuple-trailing-comma.js [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #[1,] - | ^ - 2 |" -`; - -exports[`tuple-trailing-comma.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -#[1,] - -=====================================output===================================== -#[1]; - -================================================================================ -`; diff --git a/tests/format/js/tuple/destructuring.js b/tests/format/js/tuple/destructuring.js deleted file mode 100644 index 94404a53a173..000000000000 --- a/tests/format/js/tuple/destructuring.js +++ /dev/null @@ -1,9 +0,0 @@ -const [a, b] = #[1, 2]; -assert(a === 1); -assert(b === 2); - -const [a, ...rest] = #[1, 2, 3]; -assert(a === 1); -assert(Array.isArray(rest)); -assert(rest[0] === 2); -assert(rest[1] === 3); diff --git a/tests/format/js/tuple/invalid-tuple-holes.js b/tests/format/js/tuple/invalid-tuple-holes.js deleted file mode 100644 index 621be6b2e406..000000000000 --- a/tests/format/js/tuple/invalid-tuple-holes.js +++ /dev/null @@ -1 +0,0 @@ -#[,] diff --git a/tests/format/js/tuple/jsfmt.spec.js b/tests/format/js/tuple/jsfmt.spec.js deleted file mode 100644 index 1a5b8052402b..000000000000 --- a/tests/format/js/tuple/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { - babel: ["invalid-tuple-holes.js"], - __babel_estree: ["invalid-tuple-holes.js"], - acorn: true, - espree: true, - meriyah: true, - }, -}); diff --git a/tests/format/js/tuple/syntax.js b/tests/format/js/tuple/syntax.js deleted file mode 100644 index cb60aecbaf49..000000000000 --- a/tests/format/js/tuple/syntax.js +++ /dev/null @@ -1,3 +0,0 @@ -#[] -#[1, 2] -#[1, 2, #{ a: 3 }] diff --git a/tests/format/js/tuple/tuple-trailing-comma.js b/tests/format/js/tuple/tuple-trailing-comma.js deleted file mode 100644 index 3e938abafda2..000000000000 --- a/tests/format/js/tuple/tuple-trailing-comma.js +++ /dev/null @@ -1 +0,0 @@ -#[1,] diff --git a/tests/format/js/tuple/tuple.js b/tests/format/js/tuple/tuple.js deleted file mode 100644 index dcddf8b94360..000000000000 --- a/tests/format/js/tuple/tuple.js +++ /dev/null @@ -1,17 +0,0 @@ -const tuple1 = #[1, 2, 3]; - -assert(tuple1[0] === 1); - -const tuple2 = tuple1.with(0, 2); -assert(tuple1 !== tuple2); -assert(tuple2 === #[2, 2, 3]); - -const tuple3 = #[1, ...tuple2]; -assert(tuple3 === #[1, 2, 2, 3]); - -const tuple4 = tuple3.pushed(4); -assert(tuple4 === #[1, 2, 2, 3, 4]); - -assert(tuple4.first() === 1); -const tuple5 = tuple4.popped(); -assert(tuple5 === #[2, 2, 3, 4]); diff --git a/tests/format/js/unary-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/unary-expression/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/unary-expression/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/unary-expression/__snapshots__/format.test.js.snap diff --git a/tests/format/js/unary-expression/format.test.js b/tests/format/js/unary-expression/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/unary-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/unary-expression/jsfmt.spec.js b/tests/format/js/unary-expression/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/unary-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/unary/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/unary/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/unary/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/unary/__snapshots__/format.test.js.snap diff --git a/tests/format/js/unary/format.test.js b/tests/format/js/unary/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/unary/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/unary/jsfmt.spec.js b/tests/format/js/unary/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/unary/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/unicode/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/unicode/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/unicode/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/unicode/__snapshots__/format.test.js.snap diff --git a/tests/format/js/unicode/format.test.js b/tests/format/js/unicode/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/unicode/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/unicode/jsfmt.spec.js b/tests/format/js/unicode/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/unicode/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/update-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/update-expression/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/update-expression/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/update-expression/__snapshots__/format.test.js.snap diff --git a/tests/format/js/update-expression/format.test.js b/tests/format/js/update-expression/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/update-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/update-expression/jsfmt.spec.js b/tests/format/js/update-expression/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/update-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap b/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..715db4f4679d --- /dev/null +++ b/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap @@ -0,0 +1,141 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`avoid-conflicts-to-pipeline.js [acorn] format 1`] = ` +"Unexpected token (2:16) + 1 | // |> +> 2 | const status = %GetOptimizationStatus(fn); + | ^ + 3 | +Cause: Unexpected token (2:15)" +`; + +exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = ` +"Unexpected token % (2:16) + 1 | // |> +> 2 | const status = %GetOptimizationStatus(fn); + | ^ + 3 | +Cause: Unexpected token %" +`; + +exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = ` +"Unexpected token: '%' (2:16) + 1 | // |> +> 2 | const status = %GetOptimizationStatus(fn); + | ^ + 3 | +Cause: [2:15-2:16]: Unexpected token: '%'" +`; + +exports[`avoid-conflicts-to-pipeline.js [oxc] format 1`] = ` +"Unexpected token (2:16) + 1 | // |> +> 2 | const status = %GetOptimizationStatus(fn); + | ^ + 3 |" +`; + +exports[`avoid-conflicts-to-pipeline.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +// |> +const status = %GetOptimizationStatus(fn); + +=====================================output===================================== +// |> +const status = %GetOptimizationStatus(fn); + +================================================================================ +`; + +exports[`intrinsic_call.js [acorn] format 1`] = ` +"Unexpected token (2:13) + 1 | function doSmth() { +> 2 | %DebugPrint + | ^ + 3 | ( + 4 | foo ) + 5 | } +Cause: Unexpected token (2:12)" +`; + +exports[`intrinsic_call.js [espree] format 1`] = ` +"Unexpected token % (2:13) + 1 | function doSmth() { +> 2 | %DebugPrint + | ^ + 3 | ( + 4 | foo ) + 5 | } +Cause: Unexpected token %" +`; + +exports[`intrinsic_call.js [meriyah] format 1`] = ` +"Unexpected token: '%' (2:13) + 1 | function doSmth() { +> 2 | %DebugPrint + | ^ + 3 | ( + 4 | foo ) + 5 | } +Cause: [2:12-2:13]: Unexpected token: '%'" +`; + +exports[`intrinsic_call.js [oxc] format 1`] = ` +"Unexpected token (2:13) + 1 | function doSmth() { +> 2 | %DebugPrint + | ^ + 3 | ( + 4 | foo ) + 5 | }" +`; + +exports[`intrinsic_call.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +function doSmth() { + %DebugPrint + ( + foo ) + } + + function printFunc ( + f +) { + if(% + IsAsmWasmCode(f)) console.log("asm.js"); + if( + + % IsWasmCode( + f)) + console.log ( + "wasm" + ); + + console.log + (% + GetFunctioName(f) + ); +} + +=====================================output===================================== +function doSmth() { + %DebugPrint(foo); +} + +function printFunc(f) { + if (%IsAsmWasmCode(f)) console.log("asm.js"); + if (%IsWasmCode(f)) console.log("wasm"); + + console.log(%GetFunctioName(f)); +} + +================================================================================ +`; diff --git a/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index edd7e8084842..000000000000 --- a/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`avoid-conflicts-to-pipeline.js [acorn] format 1`] = ` -"Unexpected token (2:16) - 1 | // |> -> 2 | const status = %GetOptimizationStatus(fn); - | ^ - 3 |" -`; - -exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = ` -"Unexpected token % (2:16) - 1 | // |> -> 2 | const status = %GetOptimizationStatus(fn); - | ^ - 3 |" -`; - -exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = ` -"Unexpected token: '%' (2:16) - 1 | // |> -> 2 | const status = %GetOptimizationStatus(fn); - | ^ - 3 |" -`; - -exports[`avoid-conflicts-to-pipeline.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// |> -const status = %GetOptimizationStatus(fn); - -=====================================output===================================== -// |> -const status = %GetOptimizationStatus(fn); - -================================================================================ -`; - -exports[`intrinsic_call.js [acorn] format 1`] = ` -"Unexpected token (2:13) - 1 | function doSmth() { -> 2 | %DebugPrint - | ^ - 3 | ( - 4 | foo ) - 5 | }" -`; - -exports[`intrinsic_call.js [espree] format 1`] = ` -"Unexpected token % (2:13) - 1 | function doSmth() { -> 2 | %DebugPrint - | ^ - 3 | ( - 4 | foo ) - 5 | }" -`; - -exports[`intrinsic_call.js [meriyah] format 1`] = ` -"Unexpected token: '%' (2:13) - 1 | function doSmth() { -> 2 | %DebugPrint - | ^ - 3 | ( - 4 | foo ) - 5 | }" -`; - -exports[`intrinsic_call.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -function doSmth() { - %DebugPrint - ( - foo ) - } - - function printFunc ( - f -) { - if(% - IsAsmWasmCode(f)) console.log("asm.js"); - if( - - % IsWasmCode( - f)) - console.log ( - "wasm" - ); - - console.log - (% - GetFunctioName(f) - ); -} - -=====================================output===================================== -function doSmth() { - %DebugPrint(foo); -} - -function printFunc(f) { - if (%IsAsmWasmCode(f)) console.log("asm.js"); - if (%IsWasmCode(f)) console.log("wasm"); - - console.log(%GetFunctioName(f)); -} - -================================================================================ -`; diff --git a/tests/format/js/v8_intrinsic/format.test.js b/tests/format/js/v8_intrinsic/format.test.js new file mode 100644 index 000000000000..c0a7f019103b --- /dev/null +++ b/tests/format/js/v8_intrinsic/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: true, + espree: true, + meriyah: true, + oxc: true, + "oxc-ts": true, + }, +}); diff --git a/tests/format/js/v8_intrinsic/jsfmt.spec.js b/tests/format/js/v8_intrinsic/jsfmt.spec.js deleted file mode 100644 index 8ec1e5a27f4b..000000000000 --- a/tests/format/js/v8_intrinsic/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["babel"], { - errors: { acorn: true, espree: true, meriyah: true }, -}); diff --git a/tests/format/js/variable_declarator/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/variable_declarator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/variable_declarator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/variable_declarator/__snapshots__/format.test.js.snap diff --git a/tests/format/js/variable_declarator/format.test.js b/tests/format/js/variable_declarator/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/variable_declarator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/variable_declarator/jsfmt.spec.js b/tests/format/js/variable_declarator/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/variable_declarator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/while/__snapshots__/format.test.js.snap b/tests/format/js/while/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9b12052451ea --- /dev/null +++ b/tests/format/js/while/__snapshots__/format.test.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`indent.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} +while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} +do {} +while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD); + +if (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)) {} +while (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)) {} +do {} +while (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)); + +while (0) 1; + +do 1; +while (0); + +=====================================output===================================== +if ( + someVeryLongStringA && + someVeryLongStringB && + someVeryLongStringC && + someVeryLongStringD +) { +} +while ( + someVeryLongStringA && + someVeryLongStringB && + someVeryLongStringC && + someVeryLongStringD +) {} +do {} while ( + someVeryLongStringA && + someVeryLongStringB && + someVeryLongStringC && + someVeryLongStringD +); + +if ( + someVeryLongFunc( + someVeryLongArgA, + someVeryLongArgB, + someVeryLongArgC, + someVeryLongArgD, + ) +) { +} +while ( + someVeryLongFunc( + someVeryLongArgA, + someVeryLongArgB, + someVeryLongArgC, + someVeryLongArgD, + ) +) {} +do {} while ( + someVeryLongFunc( + someVeryLongArgA, + someVeryLongArgB, + someVeryLongArgC, + someVeryLongArgD, + ) +); + +while (0) 1; + +do 1; +while (0); + +================================================================================ +`; diff --git a/tests/format/js/while/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/while/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ac04933542a3..000000000000 --- a/tests/format/js/while/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,77 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`indent.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} -while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} -do {} -while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD); - -if (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)) {} -while (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)) {} -do {} -while (someVeryLongFunc(someVeryLongArgA, someVeryLongArgB, someVeryLongArgC, someVeryLongArgD)); - -while (0) 1; - -do 1; -while (0); - -=====================================output===================================== -if ( - someVeryLongStringA && - someVeryLongStringB && - someVeryLongStringC && - someVeryLongStringD -) { -} -while ( - someVeryLongStringA && - someVeryLongStringB && - someVeryLongStringC && - someVeryLongStringD -) {} -do {} while ( - someVeryLongStringA && - someVeryLongStringB && - someVeryLongStringC && - someVeryLongStringD -); - -if ( - someVeryLongFunc( - someVeryLongArgA, - someVeryLongArgB, - someVeryLongArgC, - someVeryLongArgD - ) -) { -} -while ( - someVeryLongFunc( - someVeryLongArgA, - someVeryLongArgB, - someVeryLongArgC, - someVeryLongArgD - ) -) {} -do {} while ( - someVeryLongFunc( - someVeryLongArgA, - someVeryLongArgB, - someVeryLongArgC, - someVeryLongArgD - ) -); - -while (0) 1; - -do 1; -while (0); - -================================================================================ -`; diff --git a/tests/format/js/while/format.test.js b/tests/format/js/while/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/while/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/while/jsfmt.spec.js b/tests/format/js/while/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/while/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/with/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/with/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/with/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/with/__snapshots__/format.test.js.snap diff --git a/tests/format/js/with/format.test.js b/tests/format/js/with/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/js/with/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/with/jsfmt.spec.js b/tests/format/js/with/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/js/with/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/js/yield/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/yield/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/js/yield/__snapshots__/jsfmt.spec.js.snap rename to tests/format/js/yield/__snapshots__/format.test.js.snap diff --git a/tests/format/js/yield/format.test.js b/tests/format/js/yield/format.test.js new file mode 100644 index 000000000000..98ba37cc2f18 --- /dev/null +++ b/tests/format/js/yield/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/js/yield/jsfmt.spec.js b/tests/format/js/yield/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/js/yield/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/json/json-superset/format.test.js b/tests/format/json/json-superset/format.test.js new file mode 100644 index 000000000000..d53638b23974 --- /dev/null +++ b/tests/format/json/json-superset/format.test.js @@ -0,0 +1,78 @@ +const LINE_SEPARATOR = "\u2028"; +const PARAGRAPH_SEPARATOR = "\u2029"; +const SPACE = " "; +const LINE_FEED = "\n"; +const UNDERSCORE = "_"; +const BACKSLASH = "\\"; +const SINGLE_QUOTE = "'"; +const DOUBLE_QUOTE = '"'; + +const characters = [LINE_SEPARATOR, PARAGRAPH_SEPARATOR, UNDERSCORE, SPACE]; +const characterCode = (character) => + `U+${character.charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}`; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + ...characters.map((character) => ({ + name: `json(${characterCode(character)})`, + code: SINGLE_QUOTE + character + SINGLE_QUOTE, + output: DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED, + })), + ...[...characters, LINE_FEED].map((character) => ({ + name: `json(\\${characterCode(character)})`, + code: SINGLE_QUOTE + BACKSLASH + character + SINGLE_QUOTE, + output: + character === UNDERSCORE || character === SPACE + ? DOUBLE_QUOTE + BACKSLASH + character + DOUBLE_QUOTE + LINE_FEED + : DOUBLE_QUOTE + BACKSLASH + character + DOUBLE_QUOTE + LINE_FEED, + })), + ...characters.map((character) => ({ + name: `json(\\\\${characterCode(character)})`, + code: SINGLE_QUOTE + BACKSLASH + BACKSLASH + character + SINGLE_QUOTE, + output: + DOUBLE_QUOTE + + BACKSLASH + + BACKSLASH + + character + + DOUBLE_QUOTE + + LINE_FEED, + })), + ], + }, + ["json", "json5"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + ...characters.map((character) => ({ + name: `json-stringify(${characterCode(character)})`, + code: SINGLE_QUOTE + character + SINGLE_QUOTE, + output: DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED, + })), + ...[...characters, LINE_FEED].map((character) => ({ + name: `json-stringify(\\${characterCode(character)})`, + code: SINGLE_QUOTE + BACKSLASH + character + SINGLE_QUOTE, + output: + character === UNDERSCORE || character === SPACE + ? DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED + : DOUBLE_QUOTE + DOUBLE_QUOTE + LINE_FEED, + })), + ...characters.map((character) => ({ + name: `json-stringify(\\\\${characterCode(character)})`, + code: SINGLE_QUOTE + BACKSLASH + BACKSLASH + character + SINGLE_QUOTE, + output: + DOUBLE_QUOTE + + BACKSLASH + + BACKSLASH + + character + + DOUBLE_QUOTE + + LINE_FEED, + })), + ], + }, + ["json-stringify"], +); diff --git a/tests/format/json/json-superset/jsfmt.spec.js b/tests/format/json/json-superset/jsfmt.spec.js deleted file mode 100644 index 4bc498ad700b..000000000000 --- a/tests/format/json/json-superset/jsfmt.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -const LINE_SEPARATOR = "\u2028"; -const PARAGRAPH_SEPARATOR = "\u2029"; -const SPACE = " "; -const LINE_FEED = "\n"; -const UNDERSCORE = "_"; -const BACKSLASH = "\\"; -const SINGLE_QUOTE = "'"; -const DOUBLE_QUOTE = '"'; - -const characters = [LINE_SEPARATOR, PARAGRAPH_SEPARATOR, UNDERSCORE, SPACE]; -const characterCode = (character) => - `U+${character.charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}`; - -run_spec( - { - dirname: __dirname, - snippets: [ - ...characters.map((character) => ({ - name: `json(${characterCode(character)})`, - code: SINGLE_QUOTE + character + SINGLE_QUOTE, - output: DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED, - })), - ...[...characters, LINE_FEED].map((character) => ({ - name: `json(\\${characterCode(character)})`, - code: SINGLE_QUOTE + BACKSLASH + character + SINGLE_QUOTE, - output: - character === UNDERSCORE || character === SPACE - ? DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED - : DOUBLE_QUOTE + BACKSLASH + character + DOUBLE_QUOTE + LINE_FEED, - })), - ...characters.map((character) => ({ - name: `json(\\\\${characterCode(character)})`, - code: SINGLE_QUOTE + BACKSLASH + BACKSLASH + character + SINGLE_QUOTE, - output: - DOUBLE_QUOTE + - BACKSLASH + - BACKSLASH + - character + - DOUBLE_QUOTE + - LINE_FEED, - })), - ], - }, - ["json", "json5"] -); - -run_spec( - { - dirname: __dirname, - snippets: [ - ...characters.map((character) => ({ - name: `json-stringify(${characterCode(character)})`, - code: SINGLE_QUOTE + character + SINGLE_QUOTE, - output: DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED, - })), - ...[...characters, LINE_FEED].map((character) => ({ - name: `json-stringify(\\${characterCode(character)})`, - code: SINGLE_QUOTE + BACKSLASH + character + SINGLE_QUOTE, - output: - character === UNDERSCORE || character === SPACE - ? DOUBLE_QUOTE + character + DOUBLE_QUOTE + LINE_FEED - : DOUBLE_QUOTE + DOUBLE_QUOTE + LINE_FEED, - })), - ...characters.map((character) => ({ - name: `json-stringify(\\\\${characterCode(character)})`, - code: SINGLE_QUOTE + BACKSLASH + BACKSLASH + character + SINGLE_QUOTE, - output: - DOUBLE_QUOTE + - BACKSLASH + - BACKSLASH + - character + - DOUBLE_QUOTE + - LINE_FEED, - })), - ], - }, - ["json-stringify"] -); diff --git a/tests/format/json/json/__snapshots__/format.test.js.snap b/tests/format/json/json/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e58f586df410 --- /dev/null +++ b/tests/format/json/json/__snapshots__/format.test.js.snap @@ -0,0 +1,3261 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[[1, null], [1, null], [null], [0], [false], [""]] + +================================================================================ +`; + +exports[`array.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[[1, null], [1, null], [null], [0], [false], [""]] + +================================================================================ +`; + +exports[`array.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[[1, null], [1, null], [null], [0], [false], [""]] + +================================================================================ +`; + +exports[`array.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[[1, null], [1, null], [null], [0], [false], [""]] + +================================================================================ +`; + +exports[`array.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[[1, null], [1, null], [null], [0], [false], [""]] + +================================================================================ +`; + +exports[`array.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + [ +1,null], + [1,null,], + [null,], + [0,], + [false,], + ['',] +] + +=====================================output===================================== +[ + [ + 1, + null + ], + [ + 1, + null + ], + [ + null + ], + [ + 0 + ], + [ + false + ], + [ + "" + ] +] + +================================================================================ +`; + +exports[`boolean.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`boolean.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`boolean.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`boolean.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`boolean.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`boolean.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +true + +=====================================output===================================== +true + +================================================================================ +`; + +exports[`json5.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + "numbers": [Infinity, -Infinity, NaN], + "Infinity": NaN, + "NaN": Infinity, + "NaN": -Infinity + }, + { + "//": "JSON5 numbers", + "hexadecimal": 0xdecaf, + "leadingDecimalPoint": 0.8675309, + "andTrailing": 8675309, + "positiveSign": +1 + }, + { + "//": "JSON5 strings", + "singleQuotes": "I can use \\"double quotes\\" here", + "lineBreaks": "Look, Mom! \\ +No \\\\n's!" + } +] + +================================================================================ +`; + +exports[`json5.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + "numbers": [Infinity, -Infinity, NaN], + "Infinity": NaN, + "NaN": Infinity, + "NaN": -Infinity + }, + { + "//": "JSON5 numbers", + "hexadecimal": 0xdecaf, + "leadingDecimalPoint": 0.8675309, + "andTrailing": 8675309, + "positiveSign": +1 + }, + { + "//": "JSON5 strings", + "singleQuotes": "I can use \\"double quotes\\" here", + "lineBreaks": "Look, Mom! \\ +No \\\\n's!" + } +] + +================================================================================ +`; + +exports[`json5.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + numbers: [Infinity, -Infinity, NaN], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, + }, + { + "//": "JSON5 numbers", + hexadecimal: 0xdecaf, + leadingDecimalPoint: 0.8675309, + andTrailing: 8675309, + positiveSign: +1, + }, + { + "//": "JSON5 strings", + singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", + }, +] + +================================================================================ +`; + +exports[`json5.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + "numbers": [Infinity, -Infinity, NaN], + "Infinity": NaN, + "NaN": Infinity, + "NaN": -Infinity + }, + { + "//": "JSON5 numbers", + "hexadecimal": 0xdecaf, + "leadingDecimalPoint": 0.8675309, + "andTrailing": 8675309, + "positiveSign": +1 + }, + { + "//": "JSON5 strings", + "singleQuotes": "I can use \\"double quotes\\" here", + "lineBreaks": "Look, Mom! \\ +No \\\\n's!" + } +] + +================================================================================ +`; + +exports[`json5.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + numbers: [Infinity, -Infinity, NaN], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, + }, + { + "//": "JSON5 numbers", + hexadecimal: 0xdecaf, + leadingDecimalPoint: 0.8675309, + andTrailing: 8675309, + positiveSign: +1, + }, + { + "//": "JSON5 strings", + singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", + }, +] + +================================================================================ +`; + +exports[`json5.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ +{ + '//': 'JSON5 allow \`Infinity\` and \`NaN\`', + numbers: [ + Infinity, + -Infinity, + NaN, + ], + Infinity: NaN, + NaN: Infinity, + NaN: -Infinity, +}, +{ + '//': 'JSON5 numbers', + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, +}, +{ + '//': 'JSON5 strings', +singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \\ +No \\\\n's!", +} +] + +=====================================output===================================== +[ + { + "//": "JSON5 allow \`Infinity\` and \`NaN\`", + "numbers": [ + Infinity, + -Infinity, + NaN + ], + "Infinity": NaN, + "NaN": Infinity, + "NaN": -Infinity + }, + { + "//": "JSON5 numbers", + "hexadecimal": 912559, + "leadingDecimalPoint": 0.8675309, + "andTrailing": 8675309, + "positiveSign": 1 + }, + { + "//": "JSON5 strings", + "singleQuotes": "I can use \\"double quotes\\" here", + "lineBreaks": "Look, Mom! No \\\\n's!" + } +] + +================================================================================ +`; + +exports[`json6.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + "data": [{ "undefined": undefined }, undefined, [undefined]] + }, + + { + "//": "back-tick quoted strings", + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + { "as-object-value": \`foo\` } + ] + }, + + { "//": "String escapes ", "data": ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, + + { + "//": "Numbers", + "data": [ + 0o123, + 0b101010, + 1e5, + 123_456, + 0xdeed_beef, + 0123, + -Infinity, + -NaN, + +1, + -1, + +0o123, + +0b101010, + +1e5, + +123_456, + +0xdeed_beef, + -0o123, + -0b101010, + -1e5, + -123_456, + -0xdeed_beef + ] + }, + + { "//": "empty members", "data": [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] } +] + +================================================================================ +`; + +exports[`json6.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + "data": [{ "undefined": undefined }, undefined, [undefined]] + }, + + { + "//": "back-tick quoted strings", + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + { "as-object-value": \`foo\` } + ] + }, + + { "//": "String escapes ", "data": ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, + + { + "//": "Numbers", + "data": [ + 0o123, + 0b101010, + 1e5, + 123_456, + 0xdeed_beef, + 0123, + -Infinity, + -NaN, + +1, + -1, + +0o123, + +0b101010, + +1e5, + +123_456, + +0xdeed_beef, + -0o123, + -0b101010, + -1e5, + -123_456, + -0xdeed_beef + ] + }, + + { "//": "empty members", "data": [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] } +] + +================================================================================ +`; + +exports[`json6.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + data: [{ undefined: undefined }, undefined, [undefined]], + }, + + { + "//": "back-tick quoted strings", + data: [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + { "as-object-value": \`foo\` }, + ], + }, + + { "//": "String escapes ", data: ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, + + { + "//": "Numbers", + data: [ + 0o123, + 0b101010, + 1e5, + 123_456, + 0xdeed_beef, + 0123, + -Infinity, + -NaN, + +1, + -1, + +0o123, + +0b101010, + +1e5, + +123_456, + +0xdeed_beef, + -0o123, + -0b101010, + -1e5, + -123_456, + -0xdeed_beef, + ], + }, + + { "//": "empty members", data: [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] }, +] + +================================================================================ +`; + +exports[`json6.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + "data": [{ "undefined": undefined }, undefined, [undefined]] + }, + + { + "//": "back-tick quoted strings", + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + { "as-object-value": \`foo\` } + ] + }, + + { "//": "String escapes ", "data": ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, + + { + "//": "Numbers", + "data": [ + 0o123, + 0b101010, + 1e5, + 123_456, + 0xdeed_beef, + 0123, + -Infinity, + -NaN, + +1, + -1, + +0o123, + +0b101010, + +1e5, + +123_456, + +0xdeed_beef, + -0o123, + -0b101010, + -1e5, + -123_456, + -0xdeed_beef + ] + }, + + { "//": "empty members", "data": [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] } +] + +================================================================================ +`; + +exports[`json6.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + data: [{ undefined: undefined }, undefined, [undefined]], + }, + + { + "//": "back-tick quoted strings", + data: [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + { "as-object-value": \`foo\` }, + ], + }, + + { "//": "String escapes ", data: ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, + + { + "//": "Numbers", + data: [ + 0o123, + 0b101010, + 1e5, + 123_456, + 0xdeed_beef, + 0123, + -Infinity, + -NaN, + +1, + -1, + +0o123, + +0b101010, + +1e5, + +123_456, + +0xdeed_beef, + -0o123, + -0b101010, + -1e5, + -123_456, + -0xdeed_beef, + ], + }, + + { "//": "empty members", data: [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] }, +] + +================================================================================ +`; + +exports[`json6.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ +{'//': 'Keyword \`undefined\`', + "data": [ + {undefined: undefined}, + undefined, + [undefined, ] + ] + }, + +{'//': 'back-tick quoted strings', + "data": [ + \`\`, + \`foo\`, + \` + multiple-line +\`, + \`\\u{1F409}\\\`'"\\\${}\`, + {'as-object-value': \`foo\`} + ] + }, + +{'//': 'String escapes ', + "data": [ + '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` + ] + }, + +{'//': 'Numbers', + "data": [ + 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, + 0123, + -Infinity, -NaN, + +1, -1, + +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, + -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, + ] + }, + +{'//': 'empty members', + data: [ + [,], + [1, , 2,,,,], + [1, , 2], + [1, , 2,] + ] + } +] + +=====================================output===================================== +[ + { + "//": "Keyword \`undefined\`", + "data": [ + { + "undefined": undefined + }, + undefined, + [ + undefined + ] + ] + }, + { + "//": "back-tick quoted strings", + "data": [ + "", + "foo", + "\\n multiple-line\\n", + "🐉\`'\\"\${}", + { + "as-object-value": "foo" + } + ] + }, + { + "//": "String escapes ", + "data": [ + "\\u0000", + "ÿ", + "ÿ", + "🐉" + ] + }, + { + "//": "Numbers", + "data": [ + 83, + 42, + 100000, + 123456, + 3740122863, + 83, + -Infinity, + -NaN, + 1, + -1, + 83, + 42, + 100000, + 123456, + 3740122863, + -83, + -42, + -100000, + -123456, + -3740122863 + ] + }, + { + "//": "empty members", + "data": [ + [ + null + ], + [ + 1, + null, + 2, + null, + null, + null + ], + [ + 1, + null, + 2 + ], + [ + 1, + null, + 2 + ] + ] + } +] + +================================================================================ +`; + +exports[`key-value.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +================================================================================ +`; + +exports[`key-value.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +================================================================================ +`; + +exports[`key-value.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + string: "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + stringstringstringstringstringstringstringstring: "stringstringstringstringstringstringstringstring", + stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring: "string", +} + +================================================================================ +`; + +exports[`key-value.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +================================================================================ +`; + +exports[`key-value.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + string: "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + stringstringstringstringstringstringstringstring: "stringstringstringstringstringstringstringstring", + stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring: "string", +} + +================================================================================ +`; + +exports[`key-value.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +=====================================output===================================== +{ + "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", + "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" +} + +================================================================================ +`; + +exports[`multi-line.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`multi-line.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`multi-line.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`multi-line.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`multi-line.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`multi-line.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3", +1e10,1e-3]}} + +=====================================output===================================== +{ + "key1": [ + true, + false, + null + ], + "key2": { + "key3": [ + 1, + 2, + "3", + 10000000000, + 0.001 + ] + } +} + +================================================================================ +`; + +exports[`null.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`null.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`null.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`null.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`null.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`null.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +null + +=====================================output===================================== +null + +================================================================================ +`; + +exports[`number.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`number.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`number.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`number.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`number.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`number.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +0 + +=====================================output===================================== +0 + +================================================================================ +`; + +exports[`pass1.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { "object with 1 member": ["array with 1 element"] }, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.54321, + "e": 0.123456789e-12, + "E": 1.23456789e34, + "": 23456789012e66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array": [], + "object": {}, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, 2, 3, + + 4, 5, 6, 7 + ], + "compact": [1, 2, 3, 4, 5, 6, 7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" + }, + 0.5, + 98.6, + 99.44, + + 1066, + 1e1, + 0.1e1, + 1e-1, + 1, + 2, + 2, + "rosebud" +] + +================================================================================ +`; + +exports[`pass1.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { "object with 1 member": ["array with 1 element"] }, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.54321, + "e": 0.123456789e-12, + "E": 1.23456789e34, + "": 23456789012e66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array": [], + "object": {}, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, 2, 3, + + 4, 5, 6, 7 + ], + "compact": [1, 2, 3, 4, 5, 6, 7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" + }, + 0.5, + 98.6, + 99.44, + + 1066, + 1e1, + 0.1e1, + 1e-1, + 1, + 2, + 2, + "rosebud" +] + +================================================================================ +`; + +exports[`pass1.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { "object with 1 member": ["array with 1 element"] }, + {}, + [], + -42, + true, + false, + null, + { + integer: 1234567890, + real: -9876.54321, + e: 0.123456789e-12, + E: 1.23456789e34, + "": 23456789012e66, + zero: 0, + one: 1, + space: " ", + quote: '"', + backslash: "\\\\", + controls: "\\b\\f\\n\\r\\t", + slash: "/ & \\/", + alpha: "abcdefghijklmnopqrstuvwyz", + ALPHA: "ABCDEFGHIJKLMNOPQRSTUVWYZ", + digit: "0123456789", + "0123456789": "digit", + special: "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + hex: "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + true: true, + false: false, + null: null, + array: [], + object: {}, + address: "50 St. James Street", + url: "http://www.JSON.org/", + comment: "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, 2, 3, + + 4, 5, 6, 7, + ], + compact: [1, 2, 3, 4, 5, 6, 7], + jsontext: '{"object with 1 member":["array with 1 element"]}', + quotes: "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string", + }, + 0.5, + 98.6, + 99.44, + + 1066, + 1e1, + 0.1e1, + 1e-1, + 1, + 2, + 2, + "rosebud", +] + +================================================================================ +`; + +exports[`pass1.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { "object with 1 member": ["array with 1 element"] }, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.54321, + "e": 0.123456789e-12, + "E": 1.23456789e34, + "": 23456789012e66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array": [], + "object": {}, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, 2, 3, + + 4, 5, 6, 7 + ], + "compact": [1, 2, 3, 4, 5, 6, 7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" + }, + 0.5, + 98.6, + 99.44, + + 1066, + 1e1, + 0.1e1, + 1e-1, + 1, + 2, + 2, + "rosebud" +] + +================================================================================ +`; + +exports[`pass1.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { "object with 1 member": ["array with 1 element"] }, + {}, + [], + -42, + true, + false, + null, + { + integer: 1234567890, + real: -9876.54321, + e: 0.123456789e-12, + E: 1.23456789e34, + "": 23456789012e66, + zero: 0, + one: 1, + space: " ", + quote: '"', + backslash: "\\\\", + controls: "\\b\\f\\n\\r\\t", + slash: "/ & \\/", + alpha: "abcdefghijklmnopqrstuvwyz", + ALPHA: "ABCDEFGHIJKLMNOPQRSTUVWYZ", + digit: "0123456789", + "0123456789": "digit", + special: "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + hex: "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + true: true, + false: false, + null: null, + array: [], + object: {}, + address: "50 St. James Street", + url: "http://www.JSON.org/", + comment: "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, 2, 3, + + 4, 5, 6, 7, + ], + compact: [1, 2, 3, 4, 5, 6, 7], + jsontext: '{"object with 1 member":["array with 1 element"]}', + quotes: "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string", + }, + 0.5, + 98.6, + 99.44, + + 1066, + 1e1, + 0.1e1, + 1e-1, + 1, + 2, + 2, + "rosebud", +] + +================================================================================ +`; + +exports[`pass1.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & \\/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", + "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] + +=====================================output===================================== +[ + "JSON Test Pattern pass1", + { + "object with 1 member": [ + "array with 1 element" + ] + }, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.54321, + "e": 1.23456789e-13, + "E": 1.23456789e+34, + "": 2.3456789012e+76, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\\"", + "backslash": "\\\\", + "controls": "\\b\\f\\n\\r\\t", + "slash": "/ & /", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", + "hex": "ģ䕧覫췯ꯍ", + "true": true, + "false": false, + "null": null, + "array": [], + "object": {}, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* <!-- --", + "# -- --> */": " ", + " s p a c e d ": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "compact": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", + "quotes": "&#34; \\" %22 0x22 034 &#x22;", + "/\\\\\\"쫾몾ꮘﳞ볚\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" + }, + 0.5, + 98.6, + 99.44, + 1066, + 10, + 1, + 0.1, + 1, + 2, + 2, + "rosebud" +] + +================================================================================ +`; + +exports[`positive-number.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== ++123 + +================================================================================ +`; + +exports[`positive-number.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== ++123 + +================================================================================ +`; + +exports[`positive-number.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== ++123 + +================================================================================ +`; + +exports[`positive-number.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== ++123 + +================================================================================ +`; + +exports[`positive-number.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== ++123 + +================================================================================ +`; + +exports[`positive-number.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== ++123 + +=====================================output===================================== +123 + +================================================================================ +`; + +exports[`propertyKey.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + "a": "", + "null": "", + "true": "", + "string": "", + "0": "", + 1e2: "", + 1.0e2: "", + 0.1e2: "", + 1e-2: "", + 0.1e-2: "", + 0.1e2: "", + 1.0: "", + 1.0: "", + "0.1": "", + "0.1": "", + "0.1": "", + "0.1": "", + 999999999999999999999999999999: "", + 0.000000000000000000000000000001: "", + 0.000000000000000000000000000001: "", + 1e999999999999999999999999999999: "", + 1_2_3: "" +} + +================================================================================ +`; + +exports[`propertyKey.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + "a": "", + "null": "", + "true": "", + "string": "", + "0": "", + 1e2: "", + 1.0e2: "", + 0.1e2: "", + 1e-2: "", + 0.1e-2: "", + 0.1e2: "", + 1.0: "", + 1.0: "", + "0.1": "", + "0.1": "", + "0.1": "", + "0.1": "", + 999999999999999999999999999999: "", + 0.000000000000000000000000000001: "", + 0.000000000000000000000000000001: "", + 1e999999999999999999999999999999: "", + 1_2_3: "" +} + +================================================================================ +`; + +exports[`propertyKey.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + a: "", + null: "", + true: "", + string: "", + 0: "", + 1e2: "", + 1.0e2: "", + 0.1e2: "", + 1e-2: "", + 0.1e-2: "", + 0.1e2: "", + 1.0: "", + 1.0: "", + 0.1: "", + 0.1: "", + 0.1: "", + 0.1: "", + 999999999999999999999999999999: "", + 0.000000000000000000000000000001: "", + 0.000000000000000000000000000001: "", + 1e999999999999999999999999999999: "", + 1_2_3: "", +} + +================================================================================ +`; + +exports[`propertyKey.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + "a": "", + "null": "", + "true": "", + "string": "", + "0": "", + 1e2: "", + 1.0e2: "", + 0.1e2: "", + 1e-2: "", + 0.1e-2: "", + 0.1e2: "", + 1.0: "", + 1.0: "", + "0.1": "", + "0.1": "", + "0.1": "", + "0.1": "", + 999999999999999999999999999999: "", + 0.000000000000000000000000000001: "", + 0.000000000000000000000000000001: "", + 1e999999999999999999999999999999: "", + 1_2_3: "" +} + +================================================================================ +`; + +exports[`propertyKey.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + a: "", + null: "", + true: "", + string: "", + 0: "", + 1e2: "", + 1.0e2: "", + 0.1e2: "", + 1e-2: "", + 0.1e-2: "", + 0.1e2: "", + 1.0: "", + 1.0: "", + 0.1: "", + 0.1: "", + 0.1: "", + 0.1: "", + 999999999999999999999999999999: "", + 0.000000000000000000000000000001: "", + 0.000000000000000000000000000001: "", + 1e999999999999999999999999999999: "", + 1_2_3: "", +} + +================================================================================ +`; + +exports[`propertyKey.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + a: '', + null: '', + true: '', + "string": "", + 0: '', + 1e2: '', + 1.0e+2: '', + .10e+2: '', + 1e-2: '', + .1e-2: '', + 0.1e+2: '', + 1.0: '', + 1.00000: '', + .1: '', + .100000: '', + 0.1: '', + 0.100000: '', + 999999999999999999999999999999: '', + .000000000000000000000000000001: '', + 0.000000000000000000000000000001: '', + 1e999999999999999999999999999999: '', + 1_2_3: '', +} + +=====================================output===================================== +{ + "a": "", + "null": "", + "true": "", + "string": "", + "0": "", + "100": "", + "100": "", + "10": "", + "0.01": "", + "0.001": "", + "10": "", + "1": "", + "1": "", + "0.1": "", + "0.1": "", + "0.1": "", + "0.1": "", + "1e+30": "", + "1e-30": "", + "1e-30": "", + "Infinity": "", + "123": "" +} + +================================================================================ +`; + +exports[`single-line.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`single-line.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`single-line.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`single-line.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`single-line.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } + +================================================================================ +`; + +exports[`single-line.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} + +=====================================output===================================== +{ + "key1": [ + true, + false, + null + ], + "key2": { + "key3": [ + 1, + 2, + "3", + 10000000000, + 0.001 + ] + } +} + +================================================================================ +`; + +exports[`single-quote.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`single-quote.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`single-quote.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`single-quote.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`single-quote.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`single-quote.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +'hello' + +=====================================output===================================== +"hello" + +================================================================================ +`; + +exports[`string.json - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; + +exports[`string.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; + +exports[`string.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; + +exports[`string.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; + +exports[`string.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; + +exports[`string.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +"string" + +=====================================output===================================== +"string" + +================================================================================ +`; diff --git a/tests/format/json/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/json/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 036112b18023..000000000000 --- a/tests/format/json/json/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,2701 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`array.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ - [ -1,null], - [1,null,], - [null,], - [0,], - [false,], - ['',] -] - -=====================================output===================================== -[[1, null], [1, null], [null], [0], [false], [""]] - -================================================================================ -`; - -exports[`array.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ - [ -1,null], - [1,null,], - [null,], - [0,], - [false,], - ['',] -] - -=====================================output===================================== -[[1, null], [1, null], [null], [0], [false], [""]] - -================================================================================ -`; - -exports[`array.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - [ -1,null], - [1,null,], - [null,], - [0,], - [false,], - ['',] -] - -=====================================output===================================== -[[1, null], [1, null], [null], [0], [false], [""]] - -================================================================================ -`; - -exports[`array.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - [ -1,null], - [1,null,], - [null,], - [0,], - [false,], - ['',] -] - -=====================================output===================================== -[[1, null], [1, null], [null], [0], [false], [""]] - -================================================================================ -`; - -exports[`array.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - [ -1,null], - [1,null,], - [null,], - [0,], - [false,], - ['',] -] - -=====================================output===================================== -[ - [ - 1, - null - ], - [ - 1, - null - ], - [ - null - ], - [ - 0 - ], - [ - false - ], - [ - "" - ] -] - -================================================================================ -`; - -exports[`boolean.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -true - -=====================================output===================================== -true - -================================================================================ -`; - -exports[`boolean.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -true - -=====================================output===================================== -true - -================================================================================ -`; - -exports[`boolean.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -true - -=====================================output===================================== -true - -================================================================================ -`; - -exports[`boolean.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -true - -=====================================output===================================== -true - -================================================================================ -`; - -exports[`boolean.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -true - -=====================================output===================================== -true - -================================================================================ -`; - -exports[`json5.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ -{ - '//': 'JSON5 allow \`Infinity\` and \`NaN\`', - numbers: [ - Infinity, - -Infinity, - NaN, - ], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, -}, -{ - '//': 'JSON5 numbers', - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, -}, -{ - '//': 'JSON5 strings', -singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", -} -] - -=====================================output===================================== -[ - { - "//": "JSON5 allow \`Infinity\` and \`NaN\`", - "numbers": [Infinity, -Infinity, NaN], - "Infinity": NaN, - "NaN": Infinity, - "NaN": -Infinity - }, - { - "//": "JSON5 numbers", - "hexadecimal": 0xdecaf, - "leadingDecimalPoint": 0.8675309, - "andTrailing": 8675309, - "positiveSign": +1 - }, - { - "//": "JSON5 strings", - "singleQuotes": "I can use \\"double quotes\\" here", - "lineBreaks": "Look, Mom! \\ -No \\\\n's!" - } -] - -================================================================================ -`; - -exports[`json5.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ -{ - '//': 'JSON5 allow \`Infinity\` and \`NaN\`', - numbers: [ - Infinity, - -Infinity, - NaN, - ], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, -}, -{ - '//': 'JSON5 numbers', - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, -}, -{ - '//': 'JSON5 strings', -singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", -} -] - -=====================================output===================================== -[ - { - "//": "JSON5 allow \`Infinity\` and \`NaN\`", - numbers: [Infinity, -Infinity, NaN], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, - }, - { - "//": "JSON5 numbers", - hexadecimal: 0xdecaf, - leadingDecimalPoint: 0.8675309, - andTrailing: 8675309, - positiveSign: +1, - }, - { - "//": "JSON5 strings", - singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", - }, -] - -================================================================================ -`; - -exports[`json5.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{ - '//': 'JSON5 allow \`Infinity\` and \`NaN\`', - numbers: [ - Infinity, - -Infinity, - NaN, - ], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, -}, -{ - '//': 'JSON5 numbers', - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, -}, -{ - '//': 'JSON5 strings', -singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", -} -] - -=====================================output===================================== -[ - { - "//": "JSON5 allow \`Infinity\` and \`NaN\`", - "numbers": [Infinity, -Infinity, NaN], - "Infinity": NaN, - "NaN": Infinity, - "NaN": -Infinity - }, - { - "//": "JSON5 numbers", - "hexadecimal": 0xdecaf, - "leadingDecimalPoint": 0.8675309, - "andTrailing": 8675309, - "positiveSign": +1 - }, - { - "//": "JSON5 strings", - "singleQuotes": "I can use \\"double quotes\\" here", - "lineBreaks": "Look, Mom! \\ -No \\\\n's!" - } -] - -================================================================================ -`; - -exports[`json5.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{ - '//': 'JSON5 allow \`Infinity\` and \`NaN\`', - numbers: [ - Infinity, - -Infinity, - NaN, - ], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, -}, -{ - '//': 'JSON5 numbers', - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, -}, -{ - '//': 'JSON5 strings', -singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", -} -] - -=====================================output===================================== -[ - { - "//": "JSON5 allow \`Infinity\` and \`NaN\`", - numbers: [Infinity, -Infinity, NaN], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, - }, - { - "//": "JSON5 numbers", - hexadecimal: 0xdecaf, - leadingDecimalPoint: 0.8675309, - andTrailing: 8675309, - positiveSign: +1, - }, - { - "//": "JSON5 strings", - singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", - }, -] - -================================================================================ -`; - -exports[`json5.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{ - '//': 'JSON5 allow \`Infinity\` and \`NaN\`', - numbers: [ - Infinity, - -Infinity, - NaN, - ], - Infinity: NaN, - NaN: Infinity, - NaN: -Infinity, -}, -{ - '//': 'JSON5 numbers', - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, -}, -{ - '//': 'JSON5 strings', -singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \\ -No \\\\n's!", -} -] - -=====================================output===================================== -[ - { - "//": "JSON5 allow \`Infinity\` and \`NaN\`", - "numbers": [ - Infinity, - -Infinity, - NaN - ], - "Infinity": NaN, - "NaN": Infinity, - "NaN": -Infinity - }, - { - "//": "JSON5 numbers", - "hexadecimal": 912559, - "leadingDecimalPoint": 0.8675309, - "andTrailing": 8675309, - "positiveSign": 1 - }, - { - "//": "JSON5 strings", - "singleQuotes": "I can use \\"double quotes\\" here", - "lineBreaks": "Look, Mom! No \\\\n's!" - } -] - -================================================================================ -`; - -exports[`json6.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ -{'//': 'Keyword \`undefined\`', - "data": [ - {undefined: undefined}, - undefined, - [undefined, ] - ] - }, - -{'//': 'back-tick quoted strings', - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - {'as-object-value': \`foo\`} - ] - }, - -{'//': 'String escapes ', - "data": [ - '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` - ] - }, - -{'//': 'Numbers', - "data": [ - 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, - 0123, - -Infinity, -NaN, - +1, -1, - +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, - -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, - ] - }, - -{'//': 'empty members', - data: [ - [,], - [1, , 2,,,,], - [1, , 2], - [1, , 2,] - ] - } -] - -=====================================output===================================== -[ - { - "//": "Keyword \`undefined\`", - "data": [{ "undefined": undefined }, undefined, [undefined]] - }, - - { - "//": "back-tick quoted strings", - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - { "as-object-value": \`foo\` } - ] - }, - - { "//": "String escapes ", "data": ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, - - { - "//": "Numbers", - "data": [ - 0o123, - 0b101010, - 1e5, - 123_456, - 0xdeed_beef, - 0123, - -Infinity, - -NaN, - +1, - -1, - +0o123, - +0b101010, - +1e5, - +123_456, - +0xdeed_beef, - -0o123, - -0b101010, - -1e5, - -123_456, - -0xdeed_beef - ] - }, - - { "//": "empty members", "data": [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] } -] - -================================================================================ -`; - -exports[`json6.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ -{'//': 'Keyword \`undefined\`', - "data": [ - {undefined: undefined}, - undefined, - [undefined, ] - ] - }, - -{'//': 'back-tick quoted strings', - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - {'as-object-value': \`foo\`} - ] - }, - -{'//': 'String escapes ', - "data": [ - '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` - ] - }, - -{'//': 'Numbers', - "data": [ - 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, - 0123, - -Infinity, -NaN, - +1, -1, - +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, - -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, - ] - }, - -{'//': 'empty members', - data: [ - [,], - [1, , 2,,,,], - [1, , 2], - [1, , 2,] - ] - } -] - -=====================================output===================================== -[ - { - "//": "Keyword \`undefined\`", - data: [{ undefined: undefined }, undefined, [undefined]], - }, - - { - "//": "back-tick quoted strings", - data: [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - { "as-object-value": \`foo\` }, - ], - }, - - { "//": "String escapes ", data: ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, - - { - "//": "Numbers", - data: [ - 0o123, - 0b101010, - 1e5, - 123_456, - 0xdeed_beef, - 0123, - -Infinity, - -NaN, - +1, - -1, - +0o123, - +0b101010, - +1e5, - +123_456, - +0xdeed_beef, - -0o123, - -0b101010, - -1e5, - -123_456, - -0xdeed_beef, - ], - }, - - { "//": "empty members", data: [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] }, -] - -================================================================================ -`; - -exports[`json6.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{'//': 'Keyword \`undefined\`', - "data": [ - {undefined: undefined}, - undefined, - [undefined, ] - ] - }, - -{'//': 'back-tick quoted strings', - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - {'as-object-value': \`foo\`} - ] - }, - -{'//': 'String escapes ', - "data": [ - '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` - ] - }, - -{'//': 'Numbers', - "data": [ - 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, - 0123, - -Infinity, -NaN, - +1, -1, - +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, - -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, - ] - }, - -{'//': 'empty members', - data: [ - [,], - [1, , 2,,,,], - [1, , 2], - [1, , 2,] - ] - } -] - -=====================================output===================================== -[ - { - "//": "Keyword \`undefined\`", - "data": [{ "undefined": undefined }, undefined, [undefined]] - }, - - { - "//": "back-tick quoted strings", - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - { "as-object-value": \`foo\` } - ] - }, - - { "//": "String escapes ", "data": ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, - - { - "//": "Numbers", - "data": [ - 0o123, - 0b101010, - 1e5, - 123_456, - 0xdeed_beef, - 0123, - -Infinity, - -NaN, - +1, - -1, - +0o123, - +0b101010, - +1e5, - +123_456, - +0xdeed_beef, - -0o123, - -0b101010, - -1e5, - -123_456, - -0xdeed_beef - ] - }, - - { "//": "empty members", "data": [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] } -] - -================================================================================ -`; - -exports[`json6.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{'//': 'Keyword \`undefined\`', - "data": [ - {undefined: undefined}, - undefined, - [undefined, ] - ] - }, - -{'//': 'back-tick quoted strings', - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - {'as-object-value': \`foo\`} - ] - }, - -{'//': 'String escapes ', - "data": [ - '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` - ] - }, - -{'//': 'Numbers', - "data": [ - 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, - 0123, - -Infinity, -NaN, - +1, -1, - +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, - -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, - ] - }, - -{'//': 'empty members', - data: [ - [,], - [1, , 2,,,,], - [1, , 2], - [1, , 2,] - ] - } -] - -=====================================output===================================== -[ - { - "//": "Keyword \`undefined\`", - data: [{ undefined: undefined }, undefined, [undefined]], - }, - - { - "//": "back-tick quoted strings", - data: [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - { "as-object-value": \`foo\` }, - ], - }, - - { "//": "String escapes ", data: ["\\0", "\\xFF", "\\u00FF", \`\\u{1F409}\`] }, - - { - "//": "Numbers", - data: [ - 0o123, - 0b101010, - 1e5, - 123_456, - 0xdeed_beef, - 0123, - -Infinity, - -NaN, - +1, - -1, - +0o123, - +0b101010, - +1e5, - +123_456, - +0xdeed_beef, - -0o123, - -0b101010, - -1e5, - -123_456, - -0xdeed_beef, - ], - }, - - { "//": "empty members", data: [[,], [1, , 2, , , ,], [1, , 2], [1, , 2]] }, -] - -================================================================================ -`; - -exports[`json6.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ -{'//': 'Keyword \`undefined\`', - "data": [ - {undefined: undefined}, - undefined, - [undefined, ] - ] - }, - -{'//': 'back-tick quoted strings', - "data": [ - \`\`, - \`foo\`, - \` - multiple-line -\`, - \`\\u{1F409}\\\`'"\\\${}\`, - {'as-object-value': \`foo\`} - ] - }, - -{'//': 'String escapes ', - "data": [ - '\\0', '\\xFF', '\\u00FF', \`\\u{1F409}\` - ] - }, - -{'//': 'Numbers', - "data": [ - 0o123, 0b101010, 1e5, 123_456, 0xDeeD_Beef, - 0123, - -Infinity, -NaN, - +1, -1, - +0o123, +0b101010, +1e5, +123_456, +0xDeeD_Beef, - -0o123, -0b101010, -1e5, -123_456, -0xDeeD_Beef, - ] - }, - -{'//': 'empty members', - data: [ - [,], - [1, , 2,,,,], - [1, , 2], - [1, , 2,] - ] - } -] - -=====================================output===================================== -[ - { - "//": "Keyword \`undefined\`", - "data": [ - { - "undefined": undefined - }, - undefined, - [ - undefined - ] - ] - }, - { - "//": "back-tick quoted strings", - "data": [ - "", - "foo", - "\\n multiple-line\\n", - "🐉\`'\\"\${}", - { - "as-object-value": "foo" - } - ] - }, - { - "//": "String escapes ", - "data": [ - "\\u0000", - "ÿ", - "ÿ", - "🐉" - ] - }, - { - "//": "Numbers", - "data": [ - 83, - 42, - 100000, - 123456, - 3740122863, - 83, - -Infinity, - -NaN, - 1, - -1, - 83, - 42, - 100000, - 123456, - 3740122863, - -83, - -42, - -100000, - -123456, - -3740122863 - ] - }, - { - "//": "empty members", - "data": [ - [ - null - ], - [ - 1, - null, - 2, - null, - null, - null - ], - [ - 1, - null, - 2 - ], - [ - 1, - null, - 2 - ] - ] - } -] - -================================================================================ -`; - -exports[`key-value.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -=====================================output===================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -================================================================================ -`; - -exports[`key-value.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -=====================================output===================================== -{ - string: "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - stringstringstringstringstringstringstringstring: "stringstringstringstringstringstringstringstring", - stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring: "string", -} - -================================================================================ -`; - -exports[`key-value.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -=====================================output===================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -================================================================================ -`; - -exports[`key-value.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -=====================================output===================================== -{ - string: "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - stringstringstringstringstringstringstringstring: "stringstringstringstringstringstringstringstring", - stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring: "string", -} - -================================================================================ -`; - -exports[`key-value.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -=====================================output===================================== -{ - "string": "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstring": "stringstringstringstringstringstringstringstring", - "stringstringstringstringstringstringstringstringstringstringstringstringstringstringstring": "string" -} - -================================================================================ -`; - -exports[`multi-line.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3", -1e10,1e-3]}} - -=====================================output===================================== -{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`multi-line.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3", -1e10,1e-3]}} - -=====================================output===================================== -{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`multi-line.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3", -1e10,1e-3]}} - -=====================================output===================================== -{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`multi-line.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3", -1e10,1e-3]}} - -=====================================output===================================== -{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`multi-line.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3", -1e10,1e-3]}} - -=====================================output===================================== -{ - "key1": [ - true, - false, - null - ], - "key2": { - "key3": [ - 1, - 2, - "3", - 10000000000, - 0.001 - ] - } -} - -================================================================================ -`; - -exports[`null.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -null - -=====================================output===================================== -null - -================================================================================ -`; - -exports[`null.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -null - -=====================================output===================================== -null - -================================================================================ -`; - -exports[`null.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -null - -=====================================output===================================== -null - -================================================================================ -`; - -exports[`null.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -null - -=====================================output===================================== -null - -================================================================================ -`; - -exports[`null.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -null - -=====================================output===================================== -null - -================================================================================ -`; - -exports[`number.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -0 - -=====================================output===================================== -0 - -================================================================================ -`; - -exports[`number.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -0 - -=====================================output===================================== -0 - -================================================================================ -`; - -exports[`number.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -0 - -=====================================output===================================== -0 - -================================================================================ -`; - -exports[`number.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -0 - -=====================================output===================================== -0 - -================================================================================ -`; - -exports[`number.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -0 - -=====================================output===================================== -0 - -================================================================================ -`; - -exports[`pass1.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & \\/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] - -=====================================output===================================== -[ - "JSON Test Pattern pass1", - { "object with 1 member": ["array with 1 element"] }, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.54321, - "e": 0.123456789e-12, - "E": 1.23456789e34, - "": 23456789012e66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & /", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array": [], - "object": {}, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d ": [ - 1, 2, 3, - - 4, 5, 6, 7 - ], - "compact": [1, 2, 3, 4, 5, 6, 7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" - }, - 0.5, - 98.6, - 99.44, - 1066, - 1e1, - 0.1e1, - 1e-1, - 1, - 2, - 2, - "rosebud" -] - -================================================================================ -`; - -exports[`pass1.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & \\/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] - -=====================================output===================================== -[ - "JSON Test Pattern pass1", - { "object with 1 member": ["array with 1 element"] }, - {}, - [], - -42, - true, - false, - null, - { - integer: 1234567890, - real: -9876.54321, - e: 0.123456789e-12, - E: 1.23456789e34, - "": 23456789012e66, - zero: 0, - one: 1, - space: " ", - quote: '"', - backslash: "\\\\", - controls: "\\b\\f\\n\\r\\t", - slash: "/ & /", - alpha: "abcdefghijklmnopqrstuvwyz", - ALPHA: "ABCDEFGHIJKLMNOPQRSTUVWYZ", - digit: "0123456789", - "0123456789": "digit", - special: "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - hex: "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - true: true, - false: false, - null: null, - array: [], - object: {}, - address: "50 St. James Street", - url: "http://www.JSON.org/", - comment: "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d ": [ - 1, 2, 3, - - 4, 5, 6, 7, - ], - compact: [1, 2, 3, 4, 5, 6, 7], - jsontext: '{"object with 1 member":["array with 1 element"]}', - quotes: "&#34; \\u0022 %22 0x22 034 &#x22;", - "/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string", - }, - 0.5, - 98.6, - 99.44, - 1066, - 1e1, - 0.1e1, - 1e-1, - 1, - 2, - 2, - "rosebud", -] - -================================================================================ -`; - -exports[`pass1.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & \\/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] - -=====================================output===================================== -[ - "JSON Test Pattern pass1", - { "object with 1 member": ["array with 1 element"] }, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.54321, - "e": 0.123456789e-12, - "E": 1.23456789e34, - "": 23456789012e66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & /", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array": [], - "object": {}, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d ": [ - 1, 2, 3, - - 4, 5, 6, 7 - ], - "compact": [1, 2, 3, 4, 5, 6, 7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" - }, - 0.5, - 98.6, - 99.44, - 1066, - 1e1, - 0.1e1, - 1e-1, - 1, - 2, - 2, - "rosebud" -] - -================================================================================ -`; - -exports[`pass1.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & \\/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] - -=====================================output===================================== -[ - "JSON Test Pattern pass1", - { "object with 1 member": ["array with 1 element"] }, - {}, - [], - -42, - true, - false, - null, - { - integer: 1234567890, - real: -9876.54321, - e: 0.123456789e-12, - E: 1.23456789e34, - "": 23456789012e66, - zero: 0, - one: 1, - space: " ", - quote: '"', - backslash: "\\\\", - controls: "\\b\\f\\n\\r\\t", - slash: "/ & /", - alpha: "abcdefghijklmnopqrstuvwyz", - ALPHA: "ABCDEFGHIJKLMNOPQRSTUVWYZ", - digit: "0123456789", - "0123456789": "digit", - special: "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - hex: "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - true: true, - false: false, - null: null, - array: [], - object: {}, - address: "50 St. James Street", - url: "http://www.JSON.org/", - comment: "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d ": [ - 1, 2, 3, - - 4, 5, 6, 7, - ], - compact: [1, 2, 3, 4, 5, 6, 7], - jsontext: '{"object with 1 member":["array with 1 element"]}', - quotes: "&#34; \\u0022 %22 0x22 034 &#x22;", - "/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string", - }, - 0.5, - 98.6, - 99.44, - 1066, - 1e1, - 0.1e1, - 1e-1, - 1, - 2, - 2, - "rosebud", -] - -================================================================================ -`; - -exports[`pass1.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - "JSON Test Pattern pass1", - {"object with 1 member":["array with 1 element"]}, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.543210, - "e": 0.123456789e-12, - "E": 1.234567890E+34, - "": 23456789012E66, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & \\/", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "\\u0123\\u4567\\u89AB\\uCDEF\\uabcd\\uef4A", - "true": true, - "false": false, - "null": null, - "array":[ ], - "object":{ }, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d " :[1,2 , 3 - -, - -4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\u0022 %22 0x22 034 &#x22;", - "\\/\\\\\\"\\uCAFE\\uBABE\\uAB98\\uFCDE\\ubcda\\uef4A\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?" -: "A key can be any string" - }, - 0.5 ,98.6 -, -99.44 -, - -1066, -1e1, -0.1e1, -1e-1, -1e00,2e+00,2e-00 -,"rosebud"] - -=====================================output===================================== -[ - "JSON Test Pattern pass1", - { - "object with 1 member": [ - "array with 1 element" - ] - }, - {}, - [], - -42, - true, - false, - null, - { - "integer": 1234567890, - "real": -9876.54321, - "e": 1.23456789e-13, - "E": 1.23456789e+34, - "": 2.3456789012e+76, - "zero": 0, - "one": 1, - "space": " ", - "quote": "\\"", - "backslash": "\\\\", - "controls": "\\b\\f\\n\\r\\t", - "slash": "/ & /", - "alpha": "abcdefghijklmnopqrstuvwyz", - "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", - "digit": "0123456789", - "0123456789": "digit", - "special": "\`1~!@#$%^&*()_+-={':[,]}|;.</>?", - "hex": "ģ䕧覫췯ꯍ", - "true": true, - "false": false, - "null": null, - "array": [], - "object": {}, - "address": "50 St. James Street", - "url": "http://www.JSON.org/", - "comment": "// /* <!-- --", - "# -- --> */": " ", - " s p a c e d ": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], - "compact": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], - "jsontext": "{\\"object with 1 member\\":[\\"array with 1 element\\"]}", - "quotes": "&#34; \\" %22 0x22 034 &#x22;", - "/\\\\\\"쫾몾ꮘﳞ볚\\b\\f\\n\\r\\t\`1~!@#$%^&*()_+-=[]{}|;:',./<>?": "A key can be any string" - }, - 0.5, - 98.6, - 99.44, - 1066, - 10, - 1, - 0.1, - 1, - 2, - 2, - "rosebud" -] - -================================================================================ -`; - -exports[`positive-number.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -+123 - -=====================================output===================================== -+123 - -================================================================================ -`; - -exports[`positive-number.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -+123 - -=====================================output===================================== -+123 - -================================================================================ -`; - -exports[`positive-number.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -+123 - -=====================================output===================================== -+123 - -================================================================================ -`; - -exports[`positive-number.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -+123 - -=====================================output===================================== -+123 - -================================================================================ -`; - -exports[`positive-number.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -+123 - -=====================================output===================================== -123 - -================================================================================ -`; - -exports[`propertyKey.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - a: '', - null: '', - true: '', - "string": "", - 0: '', - 1e2: '', - 1.0e+2: '', - .10e+2: '', - 1e-2: '', - .1e-2: '', - 0.1e+2: '', - 1.0: '', - 1.00000: '', - .1: '', - .100000: '', - 0.1: '', - 0.100000: '', - 999999999999999999999999999999: '', - .000000000000000000000000000001: '', - 0.000000000000000000000000000001: '', - 1e999999999999999999999999999999: '', - 1_2_3: '', -} - -=====================================output===================================== -{ - "a": "", - "null": "", - "true": "", - "string": "", - "0": "", - 1e2: "", - 1.0e2: "", - 0.1e2: "", - 1e-2: "", - 0.1e-2: "", - 0.1e2: "", - 1.0: "", - 1.0: "", - "0.1": "", - "0.1": "", - "0.1": "", - "0.1": "", - 999999999999999999999999999999: "", - 0.000000000000000000000000000001: "", - 0.000000000000000000000000000001: "", - 1e999999999999999999999999999999: "", - 1_2_3: "" -} - -================================================================================ -`; - -exports[`propertyKey.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - a: '', - null: '', - true: '', - "string": "", - 0: '', - 1e2: '', - 1.0e+2: '', - .10e+2: '', - 1e-2: '', - .1e-2: '', - 0.1e+2: '', - 1.0: '', - 1.00000: '', - .1: '', - .100000: '', - 0.1: '', - 0.100000: '', - 999999999999999999999999999999: '', - .000000000000000000000000000001: '', - 0.000000000000000000000000000001: '', - 1e999999999999999999999999999999: '', - 1_2_3: '', -} - -=====================================output===================================== -{ - a: "", - null: "", - true: "", - string: "", - 0: "", - 1e2: "", - 1.0e2: "", - 0.1e2: "", - 1e-2: "", - 0.1e-2: "", - 0.1e2: "", - 1.0: "", - 1.0: "", - 0.1: "", - 0.1: "", - 0.1: "", - 0.1: "", - 999999999999999999999999999999: "", - 0.000000000000000000000000000001: "", - 0.000000000000000000000000000001: "", - 1e999999999999999999999999999999: "", - 1_2_3: "", -} - -================================================================================ -`; - -exports[`propertyKey.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - a: '', - null: '', - true: '', - "string": "", - 0: '', - 1e2: '', - 1.0e+2: '', - .10e+2: '', - 1e-2: '', - .1e-2: '', - 0.1e+2: '', - 1.0: '', - 1.00000: '', - .1: '', - .100000: '', - 0.1: '', - 0.100000: '', - 999999999999999999999999999999: '', - .000000000000000000000000000001: '', - 0.000000000000000000000000000001: '', - 1e999999999999999999999999999999: '', - 1_2_3: '', -} - -=====================================output===================================== -{ - "a": "", - "null": "", - "true": "", - "string": "", - "0": "", - 1e2: "", - 1.0e2: "", - 0.1e2: "", - 1e-2: "", - 0.1e-2: "", - 0.1e2: "", - 1.0: "", - 1.0: "", - "0.1": "", - "0.1": "", - "0.1": "", - "0.1": "", - 999999999999999999999999999999: "", - 0.000000000000000000000000000001: "", - 0.000000000000000000000000000001: "", - 1e999999999999999999999999999999: "", - 1_2_3: "" -} - -================================================================================ -`; - -exports[`propertyKey.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - a: '', - null: '', - true: '', - "string": "", - 0: '', - 1e2: '', - 1.0e+2: '', - .10e+2: '', - 1e-2: '', - .1e-2: '', - 0.1e+2: '', - 1.0: '', - 1.00000: '', - .1: '', - .100000: '', - 0.1: '', - 0.100000: '', - 999999999999999999999999999999: '', - .000000000000000000000000000001: '', - 0.000000000000000000000000000001: '', - 1e999999999999999999999999999999: '', - 1_2_3: '', -} - -=====================================output===================================== -{ - a: "", - null: "", - true: "", - string: "", - 0: "", - 1e2: "", - 1.0e2: "", - 0.1e2: "", - 1e-2: "", - 0.1e-2: "", - 0.1e2: "", - 1.0: "", - 1.0: "", - 0.1: "", - 0.1: "", - 0.1: "", - 0.1: "", - 999999999999999999999999999999: "", - 0.000000000000000000000000000001: "", - 0.000000000000000000000000000001: "", - 1e999999999999999999999999999999: "", - 1_2_3: "", -} - -================================================================================ -`; - -exports[`propertyKey.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - a: '', - null: '', - true: '', - "string": "", - 0: '', - 1e2: '', - 1.0e+2: '', - .10e+2: '', - 1e-2: '', - .1e-2: '', - 0.1e+2: '', - 1.0: '', - 1.00000: '', - .1: '', - .100000: '', - 0.1: '', - 0.100000: '', - 999999999999999999999999999999: '', - .000000000000000000000000000001: '', - 0.000000000000000000000000000001: '', - 1e999999999999999999999999999999: '', - 1_2_3: '', -} - -=====================================output===================================== -{ - "a": "", - "null": "", - "true": "", - "string": "", - "0": "", - "100": "", - "100": "", - "10": "", - "0.01": "", - "0.001": "", - "10": "", - "1": "", - "1": "", - "0.1": "", - "0.1": "", - "0.1": "", - "0.1": "", - "1e+30": "", - "1e-30": "", - "1e-30": "", - "Infinity": "", - "123": "" -} - -================================================================================ -`; - -exports[`single-line.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} - -=====================================output===================================== -{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`single-line.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} - -=====================================output===================================== -{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`single-line.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} - -=====================================output===================================== -{ "key1": [true, false, null], "key2": { "key3": [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`single-line.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} - -=====================================output===================================== -{ key1: [true, false, null], key2: { key3: [1, 2, "3", 1e10, 1e-3] } } - -================================================================================ -`; - -exports[`single-line.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -{"key1":[true,false,null],"key2":{"key3":[1,2,"3",1e10,1e-3]}} - -=====================================output===================================== -{ - "key1": [ - true, - false, - null - ], - "key2": { - "key3": [ - 1, - 2, - "3", - 10000000000, - 0.001 - ] - } -} - -================================================================================ -`; - -exports[`single-quote.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -'hello' - -=====================================output===================================== -"hello" - -================================================================================ -`; - -exports[`single-quote.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -'hello' - -=====================================output===================================== -"hello" - -================================================================================ -`; - -exports[`single-quote.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -'hello' - -=====================================output===================================== -"hello" - -================================================================================ -`; - -exports[`single-quote.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -'hello' - -=====================================output===================================== -"hello" - -================================================================================ -`; - -exports[`single-quote.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -'hello' - -=====================================output===================================== -"hello" - -================================================================================ -`; - -exports[`string.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -"string" - -=====================================output===================================== -"string" - -================================================================================ -`; - -exports[`string.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -"string" - -=====================================output===================================== -"string" - -================================================================================ -`; - -exports[`string.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -"string" - -=====================================output===================================== -"string" - -================================================================================ -`; - -exports[`string.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -"string" - -=====================================output===================================== -"string" - -================================================================================ -`; - -exports[`string.json format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -"string" - -=====================================output===================================== -"string" - -================================================================================ -`; diff --git a/tests/format/json/json/format.test.js b/tests/format/json/json/format.test.js new file mode 100644 index 000000000000..b70891b68268 --- /dev/null +++ b/tests/format/json/json/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["json"], { objectWrap: "collapse" }); +runFormatTest(import.meta, ["json"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json"], { trailingComma: "all" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "all" }); +runFormatTest(import.meta, ["json-stringify"]); diff --git a/tests/format/json/json/jsfmt.spec.js b/tests/format/json/json/jsfmt.spec.js deleted file mode 100644 index 1c74f7e8a011..000000000000 --- a/tests/format/json/json/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["json"]); -run_spec(__dirname, ["json"], { trailingComma: "all" }); -run_spec(__dirname, ["json5"]); -run_spec(__dirname, ["json5"], { trailingComma: "all" }); -run_spec(__dirname, ["json-stringify"]); diff --git a/tests/format/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/json5-as-json-with-trailing-commas/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js.snap rename to tests/format/json/json5-as-json-with-trailing-commas/__snapshots__/format.test.js.snap diff --git a/tests/format/json/json5-as-json-with-trailing-commas/format.test.js b/tests/format/json/json5-as-json-with-trailing-commas/format.test.js new file mode 100644 index 000000000000..c5af62f84ab3 --- /dev/null +++ b/tests/format/json/json5-as-json-with-trailing-commas/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"], { quoteProps: "preserve" }); diff --git a/tests/format/json/json5-as-json-with-trailing-commas/jsfmt.spec.js b/tests/format/json/json5-as-json-with-trailing-commas/jsfmt.spec.js deleted file mode 100644 index 1b15bcf4373c..000000000000 --- a/tests/format/json/json5-as-json-with-trailing-commas/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json5"], { quoteProps: "preserve" }); diff --git a/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap b/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7f4a608ce232 --- /dev/null +++ b/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap @@ -0,0 +1,47 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`snippet: #0 [json] format 1`] = ` +"The input is empty or contains only comments. (4:29) + 2 | /** Block comment 1 */ + 3 | // Line comment 2 +> 4 | /** Block comment 3 */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)" +`; + +exports[`snippet: #0 [json-stringify] format 1`] = ` +"The input is empty or contains only comments. (4:29) + 2 | /** Block comment 1 */ + 3 | // Line comment 2 +> 4 | /** Block comment 3 */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)" +`; + +exports[`snippet: #0 [json5] format 1`] = ` +"The input is empty or contains only comments. (4:29) + 2 | /** Block comment 1 */ + 3 | // Line comment 2 +> 4 | /** Block comment 3 */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)" +`; + +exports[`snippet: #0 format 1`] = ` +====================================options===================================== +parsers: ["jsonc", "json", "json5", "json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Line comment 1 + /** Block comment 1 */ + // Line comment 2 + /** Block comment 3 */ +=====================================output===================================== +// Line comment 1 +/** Block comment 1 */ +// Line comment 2 +/** Block comment 3 */ + +================================================================================ +`; diff --git a/tests/format/json/jsonc/empty/format.test.js b/tests/format/json/jsonc/empty/format.test.js new file mode 100644 index 000000000000..555a03ceccde --- /dev/null +++ b/tests/format/json/jsonc/empty/format.test.js @@ -0,0 +1,25 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // "// Only line comment", + // "/* Only block comment */", + outdent` + // Line comment 1 + /** Block comment 1 */ + // Line comment 2 + /** Block comment 3 */ + `, + ], + }, + ["jsonc", "json", "json5", "json-stringify"], + { + errors: { + json: true, + json5: true, + "json-stringify": true, + }, + }, +); diff --git a/tests/format/json/jsonc/quote-props/__snapshots__/format.test.js.snap b/tests/format/json/jsonc/quote-props/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..13707c16f5c3 --- /dev/null +++ b/tests/format/json/jsonc/quote-props/__snapshots__/format.test.js.snap @@ -0,0 +1,76 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.jsonc - {"quoteProps":"as-needed"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +quoteProps: "as-needed" + | printWidth +=====================================input====================================== +[ + "Object keys should always quoted!", + {"key":""}, + {"key":"","key-can-not-unquote":""}, + {key:""}, +] + +=====================================output===================================== +[ + "Object keys should always quoted!", + { "key": "" }, + { "key": "", "key-can-not-unquote": "" }, + { "key": "" }, +] + +================================================================================ +`; + +exports[`test.jsonc - {"quoteProps":"consistent"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +quoteProps: "consistent" + | printWidth +=====================================input====================================== +[ + "Object keys should always quoted!", + {"key":""}, + {"key":"","key-can-not-unquote":""}, + {key:""}, +] + +=====================================output===================================== +[ + "Object keys should always quoted!", + { "key": "" }, + { "key": "", "key-can-not-unquote": "" }, + { "key": "" }, +] + +================================================================================ +`; + +exports[`test.jsonc - {"quoteProps":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +quoteProps: "preserve" + | printWidth +=====================================input====================================== +[ + "Object keys should always quoted!", + {"key":""}, + {"key":"","key-can-not-unquote":""}, + {key:""}, +] + +=====================================output===================================== +[ + "Object keys should always quoted!", + { "key": "" }, + { "key": "", "key-can-not-unquote": "" }, + { "key": "" }, +] + +================================================================================ +`; diff --git a/tests/format/json/jsonc/quote-props/format.test.js b/tests/format/json/jsonc/quote-props/format.test.js new file mode 100644 index 000000000000..63fc45787f18 --- /dev/null +++ b/tests/format/json/jsonc/quote-props/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["jsonc"], { quoteProps: "as-needed" }); +runFormatTest(import.meta, ["jsonc"], { quoteProps: "consistent" }); +runFormatTest(import.meta, ["jsonc"], { quoteProps: "preserve" }); diff --git a/tests/format/json/jsonc/quote-props/test.jsonc b/tests/format/json/jsonc/quote-props/test.jsonc new file mode 100644 index 000000000000..d295207ad380 --- /dev/null +++ b/tests/format/json/jsonc/quote-props/test.jsonc @@ -0,0 +1,6 @@ +[ + "Object keys should always quoted!", + {"key":""}, + {"key":"","key-can-not-unquote":""}, + {key:""}, +] diff --git a/tests/format/json/jsonc/single-quote/__snapshots__/format.test.js.snap b/tests/format/json/jsonc/single-quote/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f470d01240fe --- /dev/null +++ b/tests/format/json/jsonc/single-quote/__snapshots__/format.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.jsonc - {"singleQuote":false} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +[ + "Should always use double quote", + 'Even it is single quoted originally', + 'Or contains double quotes """""""""""', + {"object-key-should-also-double-quoted":""}, +] + +=====================================output===================================== +[ + "Should always use double quote", + "Even it is single quoted originally", + "Or contains double quotes \\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"", + { "object-key-should-also-double-quoted": "" }, +] + +================================================================================ +`; + +exports[`test.jsonc - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +[ + "Should always use double quote", + 'Even it is single quoted originally', + 'Or contains double quotes """""""""""', + {"object-key-should-also-double-quoted":""}, +] + +=====================================output===================================== +[ + "Should always use double quote", + "Even it is single quoted originally", + "Or contains double quotes \\"\\"\\"\\"\\"\\"\\"\\"\\"\\"\\"", + { "object-key-should-also-double-quoted": "" }, +] + +================================================================================ +`; diff --git a/tests/format/json/jsonc/single-quote/format.test.js b/tests/format/json/jsonc/single-quote/format.test.js new file mode 100644 index 000000000000..4d8fb1f482b4 --- /dev/null +++ b/tests/format/json/jsonc/single-quote/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["jsonc"], { singleQuote: true }); +runFormatTest(import.meta, ["jsonc"], { singleQuote: false }); diff --git a/tests/format/json/jsonc/single-quote/test.jsonc b/tests/format/json/jsonc/single-quote/test.jsonc new file mode 100644 index 000000000000..5a25b2d8a636 --- /dev/null +++ b/tests/format/json/jsonc/single-quote/test.jsonc @@ -0,0 +1,6 @@ +[ + "Should always use double quote", + 'Even it is single quoted originally', + 'Or contains double quotes """""""""""', + {"object-key-should-also-double-quoted":""}, +] diff --git a/tests/format/json/jsonc/trialing-comma/__snapshots__/format.test.js.snap b/tests/format/json/jsonc/trialing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..277e4b107144 --- /dev/null +++ b/tests/format/json/jsonc/trialing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,139 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.jsonc - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +[ + ["omit-if-short"], + ["long","long","long","long","long","long","enough","to","break","into","multiple","lines"], + {"short":"object"}, + {"long":"","enough":"","to":"","break":"","into":"","multiple":"","lines":""} +] + +=====================================output===================================== +[ + ["omit-if-short"], + [ + "long", + "long", + "long", + "long", + "long", + "long", + "enough", + "to", + "break", + "into", + "multiple", + "lines", + ], + { "short": "object" }, + { + "long": "", + "enough": "", + "to": "", + "break": "", + "into": "", + "multiple": "", + "lines": "", + }, +] + +================================================================================ +`; + +exports[`test.jsonc - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +[ + ["omit-if-short"], + ["long","long","long","long","long","long","enough","to","break","into","multiple","lines"], + {"short":"object"}, + {"long":"","enough":"","to":"","break":"","into":"","multiple":"","lines":""} +] + +=====================================output===================================== +[ + ["omit-if-short"], + [ + "long", + "long", + "long", + "long", + "long", + "long", + "enough", + "to", + "break", + "into", + "multiple", + "lines", + ], + { "short": "object" }, + { + "long": "", + "enough": "", + "to": "", + "break": "", + "into": "", + "multiple": "", + "lines": "", + }, +] + +================================================================================ +`; + +exports[`test.jsonc - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +[ + ["omit-if-short"], + ["long","long","long","long","long","long","enough","to","break","into","multiple","lines"], + {"short":"object"}, + {"long":"","enough":"","to":"","break":"","into":"","multiple":"","lines":""} +] + +=====================================output===================================== +[ + ["omit-if-short"], + [ + "long", + "long", + "long", + "long", + "long", + "long", + "enough", + "to", + "break", + "into", + "multiple", + "lines" + ], + { "short": "object" }, + { + "long": "", + "enough": "", + "to": "", + "break": "", + "into": "", + "multiple": "", + "lines": "" + } +] + +================================================================================ +`; diff --git a/tests/format/json/jsonc/trialing-comma/format.test.js b/tests/format/json/jsonc/trialing-comma/format.test.js new file mode 100644 index 000000000000..82f11fe40c48 --- /dev/null +++ b/tests/format/json/jsonc/trialing-comma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["jsonc"], { trailingComma: "none" }); +runFormatTest(import.meta, ["jsonc"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["jsonc"], { trailingComma: "all" }); diff --git a/tests/format/json/jsonc/trialing-comma/test.jsonc b/tests/format/json/jsonc/trialing-comma/test.jsonc new file mode 100644 index 000000000000..32c381f6213b --- /dev/null +++ b/tests/format/json/jsonc/trialing-comma/test.jsonc @@ -0,0 +1,6 @@ +[ + ["omit-if-short"], + ["long","long","long","long","long","long","enough","to","break","into","multiple","lines"], + {"short":"object"}, + {"long":"","enough":"","to":"","break":"","into":"","multiple":"","lines":""} +] diff --git a/tests/format/json/range/__snapshots__/format.test.js.snap b/tests/format/json/range/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5450099121fb --- /dev/null +++ b/tests/format/json/range/__snapshots__/format.test.js.snap @@ -0,0 +1,369 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cross-array.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 51 +rangeStart: 12 + | | printWidth +=====================================input====================================== + 1 | [{ + 2 | a: [ + 3 | 1, +> 4 | 2, 3,4,5,6, 7, + | ^^^^^^^^^^^^^^^^^^^^ +> 5 | 8 + | ^ +> 6 | ], + | ^ +> 7 | b: [1, 2, 3, 4], + | ^^^^^^^^^^^^^ + 8 | c: [1, 2] + 9 | } + 10 | ,{a: 2}] + 11 | +=====================================output===================================== +[{ + "a": [1, 2, 3, 4, 5, 6, 7, 8], + "b": [1, 2, 3, 4], + "c": [1, 2] +} +,{a: 2}] + +================================================================================ +`; + +exports[`cross-array2.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 36 +rangeStart: 11 + | | printWidth +=====================================input====================================== + 1 | { + 2 | a: [ + 3 | 1, +> 4 | 2, 3,4,5,6, [1, 2, 3, 4], 7, + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + 5 | 8 + 6 | ], + 7 | c: [1, 2] + 8 | } + 9 | +=====================================output===================================== +{ +a: [1, 2, 3, 4, 5, 6, [1, 2, 3, 4], 7, 8], +c: [1, 2] +} + +================================================================================ +`; + +exports[`cross-object.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 31 +rangeStart: 12 + | | printWidth +=====================================input====================================== + 1 | [{a: +> 2 | { "b": 2, "c": 3 }, + | ^^^^^^^^^^^^ +> 3 | b: {d:4}, + | ^^^^^^ + 4 | c: {d: 6} + 5 | }, + 6 | {a: 1}] + 7 | +=====================================output===================================== +[{ "a": { "b": 2, "c": 3 }, "b": { "d": 4 }, "c": { "d": 6 } }, +{a: 1}] + +================================================================================ +`; + +exports[`cross-object-2.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 28 +rangeStart: 11 + | | printWidth +=====================================input====================================== + 1 | {a: +> 2 | { "b": 2, "c": 3, + | ^^^^^^^^^^ +> 3 | d: {d:4}, }, + | ^^^^^^ + 4 | c: {d: 6} + 5 | } + 6 | +=====================================output===================================== +{a: +{ "b": 2, "c": 3, "d": { "d": 4 } }, +c: {d: 6} +} + +================================================================================ +`; + +exports[`identifier.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 4 +rangeStart: 1 + | | printWidth +=====================================input====================================== +> 1 | {"a":1, "b":2} + | ^^^ + 2 | +=====================================output===================================== +{"a":1, "b":2} + +================================================================================ +`; + +exports[`identifier-2.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 3 +rangeStart: 2 + | | printWidth +=====================================input====================================== +> 1 | Infinity + | ^ + 2 | +=====================================output===================================== +Infinity +================================================================================ +`; + +exports[`inside-array.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 30 +rangeStart: 11 + | | printWidth +=====================================input====================================== + 1 | { + 2 | a: [ + 3 | 1, +> 4 | 2, 3,4,5,6, 7, + | ^^^^^^^^^^^^^^^^^^^ + 5 | 8 + 6 | ], + 7 | b: [1, 2, 3, 4] + 8 | } + 9 | +=====================================output===================================== +{ +a: [1, 2, 3, 4, 5, 6, 7, 8], +b: [1, 2, 3, 4] +} + +================================================================================ +`; + +exports[`inside-object.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 20 +rangeStart: 11 + | | printWidth +=====================================input====================================== + 1 | {a: +> 2 | { "b": 2, "c": 3 }, + | ^^^^^^^^^ + 3 | b: {d:4} + 4 | } + 5 | +=====================================output===================================== +{a: +{ "b": 2, "c": 3 }, +b: {d:4} +} + +================================================================================ +`; + +exports[`issue-4009.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 19 +rangeStart: 1 + | | printWidth +=====================================input====================================== +> 1 | { + | ^ +> 2 | "foo": "bar" + | ^^^^^^^^^^^^^^^^ +> 3 | } + | ^ + 4 | +=====================================output===================================== +{ + "foo": "bar" +} + +================================================================================ +`; + +exports[`issue-7116.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 7 +rangeStart: 4 + | | printWidth +=====================================input====================================== +> 1 | {"b": 2} + | ^^^ + 2 | +=====================================output===================================== +{ "b": 2 } + +================================================================================ +`; + +exports[`issue2297.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 6 +rangeStart: 5 + | | printWidth +=====================================input====================================== +> 1 | {"a":1, "b":2} + | ^ + 2 | +=====================================output===================================== +{"a":1, "b":2} + +================================================================================ +`; + +exports[`number.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 16 +rangeStart: 7 + | | printWidth +=====================================input====================================== +> 1 | { "b": 2, "c": 3 } + | ^^^^^^^^^ + 2 | +=====================================output===================================== +{ "b": 2, "c": 3 } + +================================================================================ +`; + +exports[`template-literal.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 7 +rangeStart: 6 + | | printWidth +=====================================input====================================== + 1 | [ +> 2 | {a:\`a\`,n: + | ^ + 3 | ''}, + 4 | {a:\`a\`,n: + 5 | ''} + 6 | ] + 7 | +=====================================output===================================== +[ +{a:\`a\`,n: +''}, +{a:\`a\`,n: +''} +] + +================================================================================ +`; + +exports[`template-literal-2.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 7 +rangeStart: 4 + | | printWidth +=====================================input====================================== + 1 | [ +> 2 | {a:\`a\`,n: + | ^^^ + 3 | ''}, + 4 | {a:\`a\`,n: + 5 | ''} + 6 | ] + 7 | +=====================================output===================================== +[ +{ "a": \`a\`, "n": "" }, +{a:\`a\`,n: +''} +] + +================================================================================ +`; + +exports[`unary-expression.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 15 +rangeStart: 9 + | | printWidth +=====================================input====================================== + 1 | {a: + 2 | [ + 3 | 1, +> 4 | -2, + | ^^^ +> 5 | -3 + | ^^ + 6 | + 7 | ], + 8 | b: [1, 2] + 9 | } + 10 | +=====================================output===================================== +{a: +[1, -2, -3], +b: [1, 2] +} + +================================================================================ +`; + +exports[`unary-expression-2.json format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +rangeEnd: 9 +rangeStart: 2 + | | printWidth +=====================================input====================================== + 1 | - +> 2 | 2.00000 + | ^^^^^^^ + 3 | +=====================================output===================================== +- +2.0 + +================================================================================ +`; diff --git a/tests/format/json/range/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/range/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 53213d9c2049..000000000000 --- a/tests/format/json/range/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,370 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cross-array.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 51 -rangeStart: 12 - | | printWidth -=====================================input====================================== - 1 | [{ - 2 | a: [ - 3 | 1, -> 4 | 2, 3,4,5,6, 7, - | ^^^^^^^^^^^^^^^^^^^^ -> 5 | 8 - | ^ -> 6 | ], - | ^ -> 7 | b: [1, 2, 3, 4], - | ^^^^^^^^^^^^^ - 8 | c: [1, 2] - 9 | } - 10 | ,{a: 2}] - 11 | -=====================================output===================================== -[{ - "a": [1, 2, 3, 4, 5, 6, 7, 8], - "b": [1, 2, 3, 4], - "c": [1, 2] -} -,{a: 2}] - -================================================================================ -`; - -exports[`cross-array2.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 36 -rangeStart: 11 - | | printWidth -=====================================input====================================== - 1 | { - 2 | a: [ - 3 | 1, -> 4 | 2, 3,4,5,6, [1, 2, 3, 4], 7, - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - 5 | 8 - 6 | ], - 7 | c: [1, 2] - 8 | } - 9 | -=====================================output===================================== -{ -a: [1, 2, 3, 4, 5, 6, [1, 2, 3, 4], 7, 8], -c: [1, 2] -} - -================================================================================ -`; - -exports[`cross-object.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 31 -rangeStart: 12 - | | printWidth -=====================================input====================================== - 1 | [{a: -> 2 | { "b": 2, "c": 3 }, - | ^^^^^^^^^^^^ -> 3 | b: {d:4}, - | ^^^^^^ - 4 | c: {d: 6} - 5 | }, - 6 | {a: 1}] - 7 | -=====================================output===================================== -[{ "a": { "b": 2, "c": 3 }, "b": { "d": 4 }, "c": { "d": 6 } }, -{a: 1}] - -================================================================================ -`; - -exports[`cross-object-2.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 28 -rangeStart: 11 - | | printWidth -=====================================input====================================== - 1 | {a: -> 2 | { "b": 2, "c": 3, - | ^^^^^^^^^^ -> 3 | d: {d:4}, }, - | ^^^^^^ - 4 | c: {d: 6} - 5 | } - 6 | -=====================================output===================================== -{a: -{ "b": 2, "c": 3, "d": { "d": 4 } }, -c: {d: 6} -} - -================================================================================ -`; - -exports[`identifier.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 4 -rangeStart: 1 - | | printWidth -=====================================input====================================== -> 1 | {"a":1, "b":2} - | ^^^ - 2 | -=====================================output===================================== -{"a":1, "b":2} - -================================================================================ -`; - -exports[`identifier-2.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 3 -rangeStart: 2 - | | printWidth -=====================================input====================================== -> 1 | Infinity - | ^ - 2 | -=====================================output===================================== -Infinity - -================================================================================ -`; - -exports[`inside-array.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 30 -rangeStart: 11 - | | printWidth -=====================================input====================================== - 1 | { - 2 | a: [ - 3 | 1, -> 4 | 2, 3,4,5,6, 7, - | ^^^^^^^^^^^^^^^^^^^ - 5 | 8 - 6 | ], - 7 | b: [1, 2, 3, 4] - 8 | } - 9 | -=====================================output===================================== -{ -a: [1, 2, 3, 4, 5, 6, 7, 8], -b: [1, 2, 3, 4] -} - -================================================================================ -`; - -exports[`inside-object.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 20 -rangeStart: 11 - | | printWidth -=====================================input====================================== - 1 | {a: -> 2 | { "b": 2, "c": 3 }, - | ^^^^^^^^^ - 3 | b: {d:4} - 4 | } - 5 | -=====================================output===================================== -{a: -{ "b": 2, "c": 3 }, -b: {d:4} -} - -================================================================================ -`; - -exports[`issue-4009.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 19 -rangeStart: 1 - | | printWidth -=====================================input====================================== -> 1 | { - | ^ -> 2 | "foo": "bar" - | ^^^^^^^^^^^^^^^^ -> 3 | } - | ^ - 4 | -=====================================output===================================== -{ - "foo": "bar" -} - -================================================================================ -`; - -exports[`issue-7116.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 7 -rangeStart: 4 - | | printWidth -=====================================input====================================== -> 1 | {"b": 2} - | ^^^ - 2 | -=====================================output===================================== -{ "b": 2 } - -================================================================================ -`; - -exports[`issue2297.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 6 -rangeStart: 5 - | | printWidth -=====================================input====================================== -> 1 | {"a":1, "b":2} - | ^ - 2 | -=====================================output===================================== -{"a":1, "b":2} - -================================================================================ -`; - -exports[`number.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 16 -rangeStart: 7 - | | printWidth -=====================================input====================================== -> 1 | { "b": 2, "c": 3 } - | ^^^^^^^^^ - 2 | -=====================================output===================================== -{ "b": 2, "c": 3 } - -================================================================================ -`; - -exports[`template-literal.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 7 -rangeStart: 6 - | | printWidth -=====================================input====================================== - 1 | [ -> 2 | {a:\`a\`,n: - | ^ - 3 | ''}, - 4 | {a:\`a\`,n: - 5 | ''} - 6 | ] - 7 | -=====================================output===================================== -[ -{a:\`a\`,n: -''}, -{a:\`a\`,n: -''} -] - -================================================================================ -`; - -exports[`template-literal-2.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 7 -rangeStart: 4 - | | printWidth -=====================================input====================================== - 1 | [ -> 2 | {a:\`a\`,n: - | ^^^ - 3 | ''}, - 4 | {a:\`a\`,n: - 5 | ''} - 6 | ] - 7 | -=====================================output===================================== -[ -{ "a": \`a\`, "n": "" }, -{a:\`a\`,n: -''} -] - -================================================================================ -`; - -exports[`unary-expression.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 15 -rangeStart: 9 - | | printWidth -=====================================input====================================== - 1 | {a: - 2 | [ - 3 | 1, -> 4 | -2, - | ^^^ -> 5 | -3 - | ^^ - 6 | - 7 | ], - 8 | b: [1, 2] - 9 | } - 10 | -=====================================output===================================== -{a: -[1, -2, -3], -b: [1, 2] -} - -================================================================================ -`; - -exports[`unary-expression-2.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -rangeEnd: 9 -rangeStart: 2 - | | printWidth -=====================================input====================================== - 1 | - -> 2 | 2.00000 - | ^^^^^^^ - 3 | -=====================================output===================================== -- -2.0 - -================================================================================ -`; diff --git a/tests/format/json/range/format.test.js b/tests/format/json/range/format.test.js new file mode 100644 index 000000000000..708349908c6e --- /dev/null +++ b/tests/format/json/range/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json"]); diff --git a/tests/format/json/range/jsfmt.spec.js b/tests/format/json/range/jsfmt.spec.js deleted file mode 100644 index 333e2414f847..000000000000 --- a/tests/format/json/range/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json"]); diff --git a/tests/format/json/range/json-stringify/__snapshots__/format.test.js.snap b/tests/format/json/range/json-stringify/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b752a1fe360d --- /dev/null +++ b/tests/format/json/range/json-stringify/__snapshots__/format.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`template-literal.json format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 +rangeEnd: 8 +rangeStart: 7 + | | printWidth +=====================================input====================================== + 1 | [ +> 2 | {a:\`aaa\`,n: + | ^ + 3 | ''}, + 4 | {a:\`a\`,n: + 5 | ''} + 6 | ] + 7 | +=====================================output===================================== +[ + { + "a": "aaa", + "n": "" + }, + { + "a": "a", + "n": "" + } +] +================================================================================ +`; diff --git a/tests/format/json/range/json-stringify/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/range/json-stringify/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7e343effcf12..000000000000 --- a/tests/format/json/range/json-stringify/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,32 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`template-literal.json format 1`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 -rangeEnd: 8 -rangeStart: 7 - | | printWidth -=====================================input====================================== - 1 | [ -> 2 | {a:\`aaa\`,n: - | ^ - 3 | ''}, - 4 | {a:\`a\`,n: - 5 | ''} - 6 | ] - 7 | -=====================================output===================================== -[ - { - "a": "aaa", - "n": "" - }, - { - "a": "a", - "n": "" - } -] - -================================================================================ -`; diff --git a/tests/format/json/range/json-stringify/format.test.js b/tests/format/json/range/json-stringify/format.test.js new file mode 100644 index 000000000000..3dbaa08567be --- /dev/null +++ b/tests/format/json/range/json-stringify/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json-stringify"]); diff --git a/tests/format/json/range/json-stringify/jsfmt.spec.js b/tests/format/json/range/json-stringify/jsfmt.spec.js deleted file mode 100644 index 22498fda370b..000000000000 --- a/tests/format/json/range/json-stringify/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json-stringify"]); diff --git a/tests/format/json/range/json5/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/range/json5/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/json/range/json5/__snapshots__/jsfmt.spec.js.snap rename to tests/format/json/range/json5/__snapshots__/format.test.js.snap diff --git a/tests/format/json/range/json5/format.test.js b/tests/format/json/range/json5/format.test.js new file mode 100644 index 000000000000..5b4393c18530 --- /dev/null +++ b/tests/format/json/range/json5/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"]); diff --git a/tests/format/json/range/json5/jsfmt.spec.js b/tests/format/json/range/json5/jsfmt.spec.js deleted file mode 100644 index a4031df291ee..000000000000 --- a/tests/format/json/range/json5/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json5"]); diff --git a/tests/format/json/range/jsonc/__snapshots__/format.test.js.snap b/tests/format/json/range/jsonc/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..14b8fb57162f --- /dev/null +++ b/tests/format/json/range/jsonc/__snapshots__/format.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inside-array.jsonc format 1`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +rangeEnd: 30 +rangeStart: 11 + | | printWidth +=====================================input====================================== + 1 | { + 2 | a: [ + 3 | 1, +> 4 | 2, 3,4,5,6, 7, + | ^^^^^^^^^^^^^^^^^^^ + 5 | 8 + 6 | ], + 7 | b: [1, 2, 3, 4] + 8 | } + 9 | +=====================================output===================================== +{ +a: [1, 2, 3, 4, 5, 6, 7, 8], +b: [1, 2, 3, 4] +} + +================================================================================ +`; diff --git a/tests/format/json/range/jsonc/format.test.js b/tests/format/json/range/jsonc/format.test.js new file mode 100644 index 000000000000..e3b3b912fe19 --- /dev/null +++ b/tests/format/json/range/jsonc/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["jsonc"]); diff --git a/tests/format/json/range/jsonc/inside-array.jsonc b/tests/format/json/range/jsonc/inside-array.jsonc new file mode 100644 index 000000000000..2f740ea154b6 --- /dev/null +++ b/tests/format/json/range/jsonc/inside-array.jsonc @@ -0,0 +1,8 @@ +{ +a: [ +1, + <<<PRETTIER_RANGE_START>>>2, 3,4,5,6, 7<<<PRETTIER_RANGE_END>>>, +8 +], +b: [1, 2, 3, 4] +} diff --git a/tests/format/json/with-comment/__snapshots__/format.test.js.snap b/tests/format/json/with-comment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6904af079c52 --- /dev/null +++ b/tests/format/json/with-comment/__snapshots__/format.test.js.snap @@ -0,0 +1,649 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`block-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ "K": "V" } + +================================================================================ +`; + +exports[`block-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ K: "V" } + +================================================================================ +`; + +exports[`block-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ "K": "V" } + +================================================================================ +`; + +exports[`block-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ "K": "V" } + +================================================================================ +`; + +exports[`block-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ K: "V" } + +================================================================================ +`; + +exports[`block-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{/*comment*/"K":"V"} + +=====================================output===================================== +{ /*comment*/ "K": "V" } + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-block-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 /* block-comment */ + +=====================================output===================================== +1 /* block-comment */ + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`bottom-line-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +1 // line-comment + +=====================================output===================================== +1 // line-comment + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + "K": "V" +} + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + K: "V", +} + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + "K": "V", +} + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + "K": "V" +} + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + K: "V", +} + +================================================================================ +`; + +exports[`line-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + //comment + "K":"V" +} + +=====================================output===================================== +{ + //comment + "K": "V", +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + "foo": "bar" +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + foo: "bar", +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + "foo": "bar", +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + "foo": "bar" +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + foo: "bar", +} + +================================================================================ +`; + +exports[`top-block-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +/* comment */{ + "foo": "bar" +} + +=====================================output===================================== +/* comment */ { + "foo": "bar", +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + foo: "bar", +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"all"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + "foo": "bar", +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + foo: "bar", +} + +================================================================================ +`; + +exports[`top-line-comment.json - {"trailingComma":"es5"} format 3`] = ` +====================================options===================================== +parsers: ["jsonc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// comment 1 +// comment 2 +{ + "foo": "bar" +} + +=====================================output===================================== +// comment 1 +// comment 2 +{ + "foo": "bar", +} + +================================================================================ +`; diff --git a/tests/format/json/with-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/json/with-comment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 13b7332d8ee0..000000000000 --- a/tests/format/json/with-comment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,421 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`block-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{/*comment*/"K":"V"} - -=====================================output===================================== -{ /*comment*/ "K": "V" } - -================================================================================ -`; - -exports[`block-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{/*comment*/"K":"V"} - -=====================================output===================================== -{ /*comment*/ K: "V" } - -================================================================================ -`; - -exports[`block-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{/*comment*/"K":"V"} - -=====================================output===================================== -{ /*comment*/ "K": "V" } - -================================================================================ -`; - -exports[`block-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{/*comment*/"K":"V"} - -=====================================output===================================== -{ /*comment*/ K: "V" } - -================================================================================ -`; - -exports[`bottom-block-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -1 /* block-comment */ - -=====================================output===================================== -1 /* block-comment */ - -================================================================================ -`; - -exports[`bottom-block-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -1 /* block-comment */ - -=====================================output===================================== -1 /* block-comment */ - -================================================================================ -`; - -exports[`bottom-block-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -1 /* block-comment */ - -=====================================output===================================== -1 /* block-comment */ - -================================================================================ -`; - -exports[`bottom-block-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -1 /* block-comment */ - -=====================================output===================================== -1 /* block-comment */ - -================================================================================ -`; - -exports[`bottom-line-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -1 // line-comment - -=====================================output===================================== -1 // line-comment - -================================================================================ -`; - -exports[`bottom-line-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -1 // line-comment - -=====================================output===================================== -1 // line-comment - -================================================================================ -`; - -exports[`bottom-line-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -1 // line-comment - -=====================================output===================================== -1 // line-comment - -================================================================================ -`; - -exports[`bottom-line-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -1 // line-comment - -=====================================output===================================== -1 // line-comment - -================================================================================ -`; - -exports[`line-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - //comment - "K":"V" -} - -=====================================output===================================== -{ - //comment - "K": "V" -} - -================================================================================ -`; - -exports[`line-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - //comment - "K":"V" -} - -=====================================output===================================== -{ - //comment - K: "V", -} - -================================================================================ -`; - -exports[`line-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - //comment - "K":"V" -} - -=====================================output===================================== -{ - //comment - "K": "V" -} - -================================================================================ -`; - -exports[`line-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - //comment - "K":"V" -} - -=====================================output===================================== -{ - //comment - K: "V", -} - -================================================================================ -`; - -exports[`top-block-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -/* comment */{ - "foo": "bar" -} - -=====================================output===================================== -/* comment */ { - "foo": "bar" -} - -================================================================================ -`; - -exports[`top-block-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -/* comment */{ - "foo": "bar" -} - -=====================================output===================================== -/* comment */ { - foo: "bar", -} - -================================================================================ -`; - -exports[`top-block-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* comment */{ - "foo": "bar" -} - -=====================================output===================================== -/* comment */ { - "foo": "bar" -} - -================================================================================ -`; - -exports[`top-block-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* comment */{ - "foo": "bar" -} - -=====================================output===================================== -/* comment */ { - foo: "bar", -} - -================================================================================ -`; - -exports[`top-line-comment.json - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -=====================================output===================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -================================================================================ -`; - -exports[`top-line-comment.json - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -=====================================output===================================== -// comment 1 -// comment 2 -{ - foo: "bar", -} - -================================================================================ -`; - -exports[`top-line-comment.json format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -=====================================output===================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -================================================================================ -`; - -exports[`top-line-comment.json format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -// comment 1 -// comment 2 -{ - "foo": "bar" -} - -=====================================output===================================== -// comment 1 -// comment 2 -{ - foo: "bar", -} - -================================================================================ -`; diff --git a/tests/format/json/with-comment/format.test.js b/tests/format/json/with-comment/format.test.js new file mode 100644 index 000000000000..96d642ec55f9 --- /dev/null +++ b/tests/format/json/with-comment/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["json"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json"], { trailingComma: "all" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "all" }); +runFormatTest(import.meta, ["jsonc"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["jsonc"], { trailingComma: "all" }); diff --git a/tests/format/json/with-comment/jsfmt.spec.js b/tests/format/json/with-comment/jsfmt.spec.js deleted file mode 100644 index 2bd71ed85e85..000000000000 --- a/tests/format/json/with-comment/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["json"]); -run_spec(__dirname, ["json"], { trailingComma: "all" }); -run_spec(__dirname, ["json5"]); -run_spec(__dirname, ["json5"], { trailingComma: "all" }); diff --git a/tests/format/jsx/attr-element/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/attr-element/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/attr-element/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/attr-element/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/attr-element/format.test.js b/tests/format/jsx/attr-element/format.test.js new file mode 100644 index 000000000000..3f21ea261f88 --- /dev/null +++ b/tests/format/jsx/attr-element/format.test.js @@ -0,0 +1,2 @@ +// Flow and TypeScript don't support JSX elements as attribute values +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/jsx/attr-element/jsfmt.spec.js b/tests/format/jsx/attr-element/jsfmt.spec.js deleted file mode 100644 index 6de1218a7505..000000000000 --- a/tests/format/jsx/attr-element/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -// Flow and TypeScript don't support JSX elements as attribute values -run_spec(__dirname, ["babel"]); diff --git a/tests/format/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/binary-expressions/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/binary-expressions/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/binary-expressions/format.test.js b/tests/format/jsx/binary-expressions/format.test.js new file mode 100644 index 000000000000..98ba37cc2f18 --- /dev/null +++ b/tests/format/jsx/binary-expressions/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/jsx/binary-expressions/jsfmt.spec.js b/tests/format/jsx/binary-expressions/jsfmt.spec.js deleted file mode 100644 index 858ac91aadcc..000000000000 --- a/tests/format/jsx/binary-expressions/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/format/jsx/comments/__snapshots__/format.test.js.snap b/tests/format/jsx/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b976d5c36d4c --- /dev/null +++ b/tests/format/jsx/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,336 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`eslint-disable.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const render = items => ( + <div>{ /* eslint-disable */ + items.map(item => null) + /* eslint-enable */ }</div> +) + +=====================================output===================================== +const render = (items) => ( + <div> + { + /* eslint-disable */ + items.map((item) => null) + /* eslint-enable */ + } + </div> +); + +================================================================================ +`; + +exports[`in-attributes.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div + attr=/* comment */"foo" +></div>; + +<div + attr= + /* comment */ + "foo" +></div>; + +<div + attr= /* comment */ + "foo" +></div>; + +<div + attr= + /* comment */ "foo" +></div>; + +<div + attr= + // comment + "foo" +></div>; + +<div + attr= // comment + "foo" +></div>; + +=====================================output===================================== +<div attr=/* comment */ "foo"></div>; + +<div attr=/* comment */ +"foo"></div>; + +<div attr /* comment */="foo"></div>; + +<div attr=/* comment */ "foo"></div>; + +<div attr=// comment +"foo"></div>; + +<div attr="foo"></div>; // comment + +================================================================================ +`; + +exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = ` +"Identifier expected. (2:6) + 1 | /* =========== before slash =========== */ +> 2 | <a><// line + | ^ + 3 | /a>; + 4 | <a></* block */ + 5 | /a>; +Cause: Identifier expected." +`; + +exports[`in-end-tag.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* =========== before slash =========== */ +<a><// line +/a>; +<a></* block */ +/a>; + +<><// line +/>; +<></* block */ +/>; + +/* =========== after slash =========== */ +<a></ // line +a>; +<a></ /* block */ +a>; + +<></ // line +>; +<></ /* block */ +>; + +/* =========== after name =========== */ +<a></a // line +>; +<a></a /* block */ +>; + + +/* =========== block =========== */ +<a></a /* block */>; +<></ /* block */>; + +/* =========== multiple =========== */ +<a><// line 1 +// line 2 +/a>; +<a></* block1 */ /* block2 */ +/a>; +<a></* block */ // line +/a>; + +<><// line 1 +// line 2 +/>; +<></* block1 */ /* block2 */ +/>; +<></* block */ // line +/>; +=====================================output===================================== +/* =========== before slash =========== */ +<a></ + // line + a +>; +<a></ /* block */ +a>; + +<></ + // line +>; +<></ /* block */>; + +/* =========== after slash =========== */ +<a></ + // line + a +>; +<a></ /* block */ +a>; + +<></ + // line +>; +<></ /* block */>; + +/* =========== after name =========== */ +<a></a>; // line +<a></a /* block */>; + +/* =========== block =========== */ +<a></a /* block */>; +<></ /* block */>; + +/* =========== multiple =========== */ +<a></ + // line 1 + // line 2 + a +>; +<a></ /* block1 */ /* block2 */ +a>; +<a></ + /* block */ // line + a +>; + +<></ + // line 1 + // line 2 +>; +<></ /* block1 */ + /* block2 */>; +<></ + /* block */ + // line +>; + +================================================================================ +`; + +exports[`in-tags.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div + // comment +> + {foo} +</div>; + +<div + // comment + attr="foo" +> + {foo} +</div>; + +<div + attr="foo" // comment +> + {foo} +</div>; + +<div + attr="foo" + // comment +> + {foo} +</div>; + +<br // comment +/>; + +=====================================output===================================== +<div +// comment +> + {foo} +</div>; + +<div + // comment + attr="foo"> + {foo} +</div>; + +<div + attr="foo" // comment +> + {foo} +</div>; + +<div + attr="foo" + // comment +> + {foo} +</div>; + +<br // comment +/>; + +================================================================================ +`; + +exports[`jsx-tag-comment-after-prop.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/typescript-eslint/typescript-eslint/pull/703 + +const pure = () => { + return ( + <Foo + // one + foo={123} + // two + bar="woof" + /> + ); +} +=====================================output===================================== +// https://github.com/typescript-eslint/typescript-eslint/pull/703 + +const pure = () => { + return ( + <Foo + // one + foo={123} + // two + bar="woof" + /> + ); +}; + +================================================================================ +`; + +exports[`like-a-comment-in-jsx-text.js - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<Foo +> + text + // comment + text +</Foo> +=====================================output===================================== +<Foo>text // comment text</Foo>; + +================================================================================ +`; diff --git a/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6a7ba0281317..000000000000 --- a/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,335 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`eslint-disable.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const render = items => ( - <div>{ /* eslint-disable */ - items.map(item => null) - /* eslint-enable */ }</div> -) - -=====================================output===================================== -const render = (items) => ( - <div> - { - /* eslint-disable */ - items.map((item) => null) - /* eslint-enable */ - } - </div> -); - -================================================================================ -`; - -exports[`in-attributes.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div - attr=/* comment */"foo" -></div>; - -<div - attr= - /* comment */ - "foo" -></div>; - -<div - attr= /* comment */ - "foo" -></div>; - -<div - attr= - /* comment */ "foo" -></div>; - -<div - attr= - // comment - "foo" -></div>; - -<div - attr= // comment - "foo" -></div>; - -=====================================output===================================== -<div attr=/* comment */ "foo"></div>; - -<div attr=/* comment */ -"foo"></div>; - -<div attr /* comment */="foo"></div>; - -<div attr=/* comment */ "foo"></div>; - -<div attr=// comment -"foo"></div>; - -<div attr="foo"></div>; // comment - -================================================================================ -`; - -exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = ` -"Identifier expected. (2:6) - 1 | /* =========== before slash =========== */ -> 2 | <a><// line - | ^ - 3 | /a>; - 4 | <a></* block */ - 5 | /a>;" -`; - -exports[`in-end-tag.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* =========== before slash =========== */ -<a><// line -/a>; -<a></* block */ -/a>; - -<><// line -/>; -<></* block */ -/>; - -/* =========== after slash =========== */ -<a></ // line -a>; -<a></ /* block */ -a>; - -<></ // line ->; -<></ /* block */ ->; - -/* =========== after name =========== */ -<a></a // line ->; -<a></a /* block */ ->; - - -/* =========== block =========== */ -<a></a /* block */>; -<></ /* block */>; - -/* =========== multiple =========== */ -<a><// line 1 -// line 2 -/a>; -<a></* block1 */ /* block2 */ -/a>; -<a></* block */ // line -/a>; - -<><// line 1 -// line 2 -/>; -<></* block1 */ /* block2 */ -/>; -<></* block */ // line -/>; -=====================================output===================================== -/* =========== before slash =========== */ -<a></ - // line - a ->; -<a></ /* block */ -a>; - -<></ - // line ->; -<></ /* block */>; - -/* =========== after slash =========== */ -<a></ - // line - a ->; -<a></ /* block */ -a>; - -<></ - // line ->; -<></ /* block */>; - -/* =========== after name =========== */ -<a></a>; // line -<a></a /* block */>; - -/* =========== block =========== */ -<a></a /* block */>; -<></ /* block */>; - -/* =========== multiple =========== */ -<a></ - // line 1 - // line 2 - a ->; -<a></ /* block1 */ /* block2 */ -a>; -<a></ - /* block */ // line - a ->; - -<></ - // line 1 - // line 2 ->; -<></ /* block1 */ - /* block2 */>; -<></ - /* block */ - // line ->; - -================================================================================ -`; - -exports[`in-tags.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div - // comment -> - {foo} -</div>; - -<div - // comment - attr="foo" -> - {foo} -</div>; - -<div - attr="foo" // comment -> - {foo} -</div>; - -<div - attr="foo" - // comment -> - {foo} -</div>; - -<br // comment -/>; - -=====================================output===================================== -<div -// comment -> - {foo} -</div>; - -<div - // comment - attr="foo"> - {foo} -</div>; - -<div - attr="foo" // comment -> - {foo} -</div>; - -<div - attr="foo" - // comment -> - {foo} -</div>; - -<br // comment -/>; - -================================================================================ -`; - -exports[`jsx-tag-comment-after-prop.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/typescript-eslint/typescript-eslint/pull/703 - -const pure = () => { - return ( - <Foo - // one - foo={123} - // two - bar="woof" - /> - ); -} -=====================================output===================================== -// https://github.com/typescript-eslint/typescript-eslint/pull/703 - -const pure = () => { - return ( - <Foo - // one - foo={123} - // two - bar="woof" - /> - ); -}; - -================================================================================ -`; - -exports[`like-a-comment-in-jsx-text.js - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<Foo -> - text - // comment - text -</Foo> -=====================================output===================================== -<Foo>text // comment text</Foo>; - -================================================================================ -`; diff --git a/tests/format/jsx/comments/format.test.js b/tests/format/jsx/comments/format.test.js new file mode 100644 index 000000000000..e1f7c3545b84 --- /dev/null +++ b/tests/format/jsx/comments/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + bracketSameLine: true, + errors: { + typescript: ["in-end-tag.js"], + }, +}); diff --git a/tests/format/jsx/comments/jsfmt.spec.js b/tests/format/jsx/comments/jsfmt.spec.js deleted file mode 100644 index 6e860881f39c..000000000000 --- a/tests/format/jsx/comments/jsfmt.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"], { - bracketSameLine: true, - errors: { - typescript: ["in-end-tag.js"], - }, -}); diff --git a/tests/format/jsx/cursor/__snapshots__/format.test.js.snap b/tests/format/jsx/cursor/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..de7674eb5103 --- /dev/null +++ b/tests/format/jsx/cursor/__snapshots__/format.test.js.snap @@ -0,0 +1,135 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`after-last-jsx-text.js format 1`] = ` +====================================options===================================== +cursorOffset: 32 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<>a + <div> + hi + </div> + b +<|></> + + +=====================================output===================================== +<> + a<div>hi</div>b +<|></>; + +================================================================================ +`; + +exports[`after-tag.js format 1`] = ` +====================================options===================================== +cursorOffset: 11 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<>a + <div><|> + hi + </div> +</> + +=====================================output===================================== +<> + a<div><|>hi</div> +</>; + +================================================================================ +`; + +exports[`before-first-jsx-text.js format 1`] = ` +====================================options===================================== +cursorOffset: 2 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<><|>a + <div> + hi + </div> +</> + +=====================================output===================================== +<> + <|>a<div>hi</div> +</>; + +================================================================================ +`; + +exports[`before-tag.js format 1`] = ` +====================================options===================================== +cursorOffset: 222 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// The cursor position we end up with in this test case is perverse. I think +// the cause is the one described in https://github.com/prettier/prettier/issues/15793. +// Remove this comment once the behavior is fixed. +<>a + <|><div> + hi + </div> +</> + +=====================================output===================================== +// The cursor position we end up with in this test case is perverse. I think +// the cause is the one described in https://github.com/prettier/prettier/issues/15793. +// Remove this comment once the behavior is fixed. +<> + <|>a<div>hi</div> +</>; + +================================================================================ +`; + +exports[`in-jsx-text.js format 1`] = ` +====================================options===================================== +cursorOffset: 17 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<>a + <div> + h<|>i + </div> +</> + +=====================================output===================================== +<> + a<div>h<|>i</div> +</>; + +================================================================================ +`; + +exports[`in-tag.js format 1`] = ` +====================================options===================================== +cursorOffset: 9 +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<>a + <di<|>v> + hi + </div> +</> + +=====================================output===================================== +<> + a<di<|>v>hi</div> +</>; + +================================================================================ +`; diff --git a/tests/format/jsx/cursor/after-last-jsx-text.js b/tests/format/jsx/cursor/after-last-jsx-text.js new file mode 100644 index 000000000000..e1fe4c4f7ac2 --- /dev/null +++ b/tests/format/jsx/cursor/after-last-jsx-text.js @@ -0,0 +1,7 @@ +<>a + <div> + hi + </div> + b +<|></> + diff --git a/tests/format/jsx/cursor/after-tag.js b/tests/format/jsx/cursor/after-tag.js new file mode 100644 index 000000000000..cf75775ee012 --- /dev/null +++ b/tests/format/jsx/cursor/after-tag.js @@ -0,0 +1,5 @@ +<>a + <div><|> + hi + </div> +</> diff --git a/tests/format/jsx/cursor/before-first-jsx-text.js b/tests/format/jsx/cursor/before-first-jsx-text.js new file mode 100644 index 000000000000..a6fa51e4e1b0 --- /dev/null +++ b/tests/format/jsx/cursor/before-first-jsx-text.js @@ -0,0 +1,5 @@ +<><|>a + <div> + hi + </div> +</> diff --git a/tests/format/jsx/cursor/before-tag.js b/tests/format/jsx/cursor/before-tag.js new file mode 100644 index 000000000000..f97009727fb3 --- /dev/null +++ b/tests/format/jsx/cursor/before-tag.js @@ -0,0 +1,8 @@ +// The cursor position we end up with in this test case is perverse. I think +// the cause is the one described in https://github.com/prettier/prettier/issues/15793. +// Remove this comment once the behavior is fixed. +<>a + <|><div> + hi + </div> +</> diff --git a/tests/format/jsx/cursor/format.test.js b/tests/format/jsx/cursor/format.test.js new file mode 100644 index 000000000000..8adc66f6016a --- /dev/null +++ b/tests/format/jsx/cursor/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript", "flow"]); diff --git a/tests/format/jsx/cursor/in-jsx-text.js b/tests/format/jsx/cursor/in-jsx-text.js new file mode 100644 index 000000000000..109baa7dabef --- /dev/null +++ b/tests/format/jsx/cursor/in-jsx-text.js @@ -0,0 +1,5 @@ +<>a + <div> + h<|>i + </div> +</> diff --git a/tests/format/jsx/cursor/in-tag.js b/tests/format/jsx/cursor/in-tag.js new file mode 100644 index 000000000000..abaa2be0a0b0 --- /dev/null +++ b/tests/format/jsx/cursor/in-tag.js @@ -0,0 +1,5 @@ +<>a + <di<|>v> + hi + </div> +</> diff --git a/tests/format/jsx/deprecated-jsx-bracket-same-line-option/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/deprecated-jsx-bracket-same-line-option/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/deprecated-jsx-bracket-same-line-option/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/deprecated-jsx-bracket-same-line-option/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/deprecated-jsx-bracket-same-line-option/format.test.js b/tests/format/jsx/deprecated-jsx-bracket-same-line-option/format.test.js new file mode 100644 index 000000000000..757acf135c9b --- /dev/null +++ b/tests/format/jsx/deprecated-jsx-bracket-same-line-option/format.test.js @@ -0,0 +1,14 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + jsxBracketSameLine: true, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + jsxBracketSameLine: false, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + jsxBracketSameLine: false, + bracketSameLine: true, +}); +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + jsxBracketSameLine: true, + bracketSameLine: false, +}); diff --git a/tests/format/jsx/deprecated-jsx-bracket-same-line-option/jsfmt.spec.js b/tests/format/jsx/deprecated-jsx-bracket-same-line-option/jsfmt.spec.js deleted file mode 100644 index 83b7f2546876..000000000000 --- a/tests/format/jsx/deprecated-jsx-bracket-same-line-option/jsfmt.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"], { - jsxBracketSameLine: true, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - jsxBracketSameLine: false, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - jsxBracketSameLine: false, - bracketSameLine: true, -}); -run_spec(__dirname, ["babel", "flow", "typescript"], { - jsxBracketSameLine: true, - bracketSameLine: false, -}); diff --git a/tests/format/jsx/do/__snapshots__/format.test.js.snap b/tests/format/jsx/do/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f8df2a2aae10 --- /dev/null +++ b/tests/format/jsx/do/__snapshots__/format.test.js.snap @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`do.js [acorn] format 1`] = ` +"Unexpected token (2:4) + 1 | <div> +> 2 | {do { + | ^ + 3 | 1 + 4 | }} + 5 | </div> +Cause: Unexpected token (2:3)" +`; + +exports[`do.js [espree] format 1`] = ` +"Unexpected token do (2:4) + 1 | <div> +> 2 | {do { + | ^ + 3 | 1 + 4 | }} + 5 | </div> +Cause: Unexpected token do" +`; + +exports[`do.js [meriyah] format 1`] = ` +"Unexpected token: 'do' (2:4) + 1 | <div> +> 2 | {do { + | ^^ + 3 | 1 + 4 | }} + 5 | </div> +Cause: [2:3-2:5]: Unexpected token: 'do'" +`; + +exports[`do.js [oxc] format 1`] = ` +"Unexpected token (2:4) + 1 | <div> +> 2 | {do { + | ^^ + 3 | 1 + 4 | }} + 5 | </div>" +`; + +exports[`do.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div> + {do { + 1 + }} +</div> + +=====================================output===================================== +<div> + {do { + 1; + }} +</div>; + +================================================================================ +`; diff --git a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4e00195c9491..000000000000 --- a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,23 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`do.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div> - {do { - 1 - }} -</div> - -=====================================output===================================== -<div> - {do { - 1; - }} -</div>; - -================================================================================ -`; diff --git a/tests/format/jsx/do/format.test.js b/tests/format/jsx/do/format.test.js new file mode 100644 index 000000000000..ef7bd370251e --- /dev/null +++ b/tests/format/jsx/do/format.test.js @@ -0,0 +1,9 @@ +runFormatTest(import.meta, ["babel"], { + errors: { + acorn: ["do.js"], + espree: ["do.js"], + meriyah: ["do.js"], + oxc: ["do.js"], + "oxc-ts": ["do.js"], + }, +}); diff --git a/tests/format/jsx/do/jsfmt.spec.js b/tests/format/jsx/do/jsfmt.spec.js deleted file mode 100644 index 8382eddeb1db..000000000000 --- a/tests/format/jsx/do/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"]); diff --git a/tests/format/jsx/embed/__snapshots__/format.test.js.snap b/tests/format/jsx/embed/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e096fd364add --- /dev/null +++ b/tests/format/jsx/embed/__snapshots__/format.test.js.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`css-embed.js format 1`] = ` +====================================options===================================== +parsers: ["flow", "babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style {...spread}>{\`.{}\`}</style>; + +=====================================output===================================== +<style {...spread}>{\`.{}\`}</style>; + +================================================================================ +`; diff --git a/tests/format/jsx/embed/css-embed.js b/tests/format/jsx/embed/css-embed.js new file mode 100644 index 000000000000..95ac143ca126 --- /dev/null +++ b/tests/format/jsx/embed/css-embed.js @@ -0,0 +1 @@ +<style {...spread}>{`.{}`}</style>; diff --git a/tests/format/jsx/embed/format.test.js b/tests/format/jsx/embed/format.test.js new file mode 100644 index 000000000000..8af8c3b6195e --- /dev/null +++ b/tests/format/jsx/embed/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel"]); diff --git a/tests/format/jsx/escape/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/escape/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/escape/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/escape/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/escape/format.test.js b/tests/format/jsx/escape/format.test.js new file mode 100644 index 000000000000..67c251cced19 --- /dev/null +++ b/tests/format/jsx/escape/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"]); diff --git a/tests/format/jsx/escape/jsfmt.spec.js b/tests/format/jsx/escape/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/jsx/escape/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/jsx/expression-with-types/__snapshots__/format.test.js.snap b/tests/format/jsx/expression-with-types/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ff33463cddfd --- /dev/null +++ b/tests/format/jsx/expression-with-types/__snapshots__/format.test.js.snap @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +</Component>; + +=====================================output===================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +</Component>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +</Component>; + +=====================================output===================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +</Component>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +</Component>; + +=====================================output===================================== +<Component + onChange={( + key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +/>; + +<Component> + {( + key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +</Component>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +</Component>; + +=====================================output===================================== +<Component + onChange={( + key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +/>; + +<Component> + {( + key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value), + }); + }} +</Component>; + +================================================================================ +`; diff --git a/tests/format/jsx/expression-with-types/expression.js b/tests/format/jsx/expression-with-types/expression.js new file mode 100644 index 000000000000..cb267df2cb77 --- /dev/null +++ b/tests/format/jsx/expression-with-types/expression.js @@ -0,0 +1,21 @@ +<Component + onChange={( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +/>; + +<Component> + {( + key: "possible_key_1" | "possible_key_2" | "possible_key_3", + value: string | Immutable.List<string>, + ) => { + this.setState({ + updatedTask: this.state.updatedTask.set(key, value) + }); + }} +</Component>; diff --git a/tests/format/jsx/expression-with-types/format.test.js b/tests/format/jsx/expression-with-types/format.test.js new file mode 100644 index 000000000000..850aeb549525 --- /dev/null +++ b/tests/format/jsx/expression-with-types/format.test.js @@ -0,0 +1,16 @@ +runFormatTest(import.meta, ["flow", "typescript"], { + singleQuote: false, + jsxSingleQuote: false, +}); +runFormatTest(import.meta, ["flow", "typescript"], { + singleQuote: false, + jsxSingleQuote: true, +}); +runFormatTest(import.meta, ["flow", "typescript"], { + singleQuote: true, + jsxSingleQuote: false, +}); +runFormatTest(import.meta, ["flow", "typescript"], { + singleQuote: true, + jsxSingleQuote: true, +}); diff --git a/tests/format/jsx/fbt/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/fbt/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/fbt/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/fbt/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/fbt/format.test.js b/tests/format/jsx/fbt/format.test.js new file mode 100644 index 000000000000..55c339883dce --- /dev/null +++ b/tests/format/jsx/fbt/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow"]); diff --git a/tests/format/jsx/fbt/jsfmt.spec.js b/tests/format/jsx/fbt/jsfmt.spec.js deleted file mode 100644 index b9a908981a50..000000000000 --- a/tests/format/jsx/fbt/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow"]); diff --git a/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/fragment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/fragment/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/fragment/format.test.js b/tests/format/jsx/fragment/format.test.js new file mode 100644 index 000000000000..f80c543f92ec --- /dev/null +++ b/tests/format/jsx/fragment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/fragment/jsfmt.spec.js b/tests/format/jsx/fragment/jsfmt.spec.js deleted file mode 100644 index 71f32a0eabe8..000000000000 --- a/tests/format/jsx/fragment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/ignore/__snapshots__/format.test.js.snap b/tests/format/jsx/ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..363f05a993e2 --- /dev/null +++ b/tests/format/jsx/ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,123 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`jsx_ignore.js format 1`] = ` +====================================options===================================== +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// this should remain as-is +<div> + {/* prettier-ignore */} + <style jsx global>{ComponentStyles}</style> +</div>; + +// this should remain as-is +<div> + {/* prettier-ignore */} + <span ugly format='' /> +</div>; + +// this should remain as-is +f( + <Component> + {/*prettier-ignore*/} + <span ugly format='' /> + </Component> +); + +// this be formatted +<div> + {/* prettier-ignore */} foo + <Bar excessive spaces /> +</div>; + +// this should remain as-is +<div> +{ + /* prettier-ignore */ + foo ( ) +} +</div>; + +// this should remain as-is +<div> +{ + /* prettier-ignore */ + x ? <Y/> : <Z/> +} +</div>; + +push( + // prettier-ignore + <td> :) + </td>, +); + +function f() { + return ( + // prettier-ignore + /* $FlowFixMe(>=0.53.0) */ + <JSX /> + ); +} + +=====================================output===================================== +// this should remain as-is +<div> + {/* prettier-ignore */} + <style jsx global>{ComponentStyles}</style> +</div>; + +// this should remain as-is +<div> + {/* prettier-ignore */} + <span ugly format='' /> +</div>; + +// this should remain as-is +f( + <Component> + {/*prettier-ignore*/} + <span ugly format='' /> + </Component>, +); + +// this be formatted +<div> + {/* prettier-ignore */} foo + <Bar excessive spaces /> +</div>; + +// this should remain as-is +<div> + { + /* prettier-ignore */ + foo ( ) + } +</div>; + +// this should remain as-is +<div> + { + /* prettier-ignore */ + x ? <Y/> : <Z/> + } +</div>; + +push( + // prettier-ignore + <td> :) + </td>, +); + +function f() { + return ( + // prettier-ignore + /* $FlowFixMe(>=0.53.0) */ + <JSX /> + ); +} + +================================================================================ +`; diff --git a/tests/format/jsx/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c21095fab205..000000000000 --- a/tests/format/jsx/ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,123 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`jsx_ignore.js format 1`] = ` -====================================options===================================== -parsers: ["flow", "babel", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// this should remain as-is -<div> - {/* prettier-ignore */} - <style jsx global>{ComponentStyles}</style> -</div>; - -// this should remain as-is -<div> - {/* prettier-ignore */} - <span ugly format='' /> -</div>; - -// this should remain as-is -f( - <Component> - {/*prettier-ignore*/} - <span ugly format='' /> - </Component> -); - -// this be formatted -<div> - {/* prettier-ignore */} foo - <Bar excessive spaces /> -</div>; - -// this should remain as-is -<div> -{ - /* prettier-ignore */ - foo ( ) -} -</div>; - -// this should remain as-is -<div> -{ - /* prettier-ignore */ - x ? <Y/> : <Z/> -} -</div>; - -push( - // prettier-ignore - <td> :) - </td>, -); - -function f() { - return ( - // prettier-ignore - /* $FlowFixMe(>=0.53.0) */ - <JSX /> - ); -} - -=====================================output===================================== -// this should remain as-is -<div> - {/* prettier-ignore */} - <style jsx global>{ComponentStyles}</style> -</div>; - -// this should remain as-is -<div> - {/* prettier-ignore */} - <span ugly format='' /> -</div>; - -// this should remain as-is -f( - <Component> - {/*prettier-ignore*/} - <span ugly format='' /> - </Component> -); - -// this be formatted -<div> - {/* prettier-ignore */} foo - <Bar excessive spaces /> -</div>; - -// this should remain as-is -<div> - { - /* prettier-ignore */ - foo ( ) - } -</div>; - -// this should remain as-is -<div> - { - /* prettier-ignore */ - x ? <Y/> : <Z/> - } -</div>; - -push( - // prettier-ignore - <td> :) - </td> -); - -function f() { - return ( - // prettier-ignore - /* $FlowFixMe(>=0.53.0) */ - <JSX /> - ); -} - -================================================================================ -`; diff --git a/tests/format/jsx/ignore/format.test.js b/tests/format/jsx/ignore/format.test.js new file mode 100644 index 000000000000..f80c543f92ec --- /dev/null +++ b/tests/format/jsx/ignore/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/ignore/jsfmt.spec.js b/tests/format/jsx/ignore/jsfmt.spec.js deleted file mode 100644 index 71f32a0eabe8..000000000000 --- a/tests/format/jsx/ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/jsx/__snapshots__/format.test.js.snap b/tests/format/jsx/jsx/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..078968238e1c --- /dev/null +++ b/tests/format/jsx/jsx/__snapshots__/format.test.js.snap @@ -0,0 +1,6309 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-iter.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map(user => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +) + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter(scope => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div> + +=====================================output===================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map((user) => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +); + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul> + {_.map(todos, (todo, i) => ( + <TodoItem key={i} {...todo} /> + ))} + </ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter((scope) => scope.value !== "") + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div>; + +================================================================================ +`; + +exports[`array-iter.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map(user => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +) + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter(scope => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div> + +=====================================output===================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map((user) => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +); + +const TodoList = ({ todos }) => ( + <div className='TodoList'> + <ul> + {_.map(todos, (todo, i) => ( + <TodoItem key={i} {...todo} /> + ))} + </ul> + </div> +); + +<div className='search-filter-chips'> + {scopes + .filter((scope) => scope.value !== "") + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div>; + +================================================================================ +`; + +exports[`array-iter.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map(user => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +) + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter(scope => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div> + +=====================================output===================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map((user) => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +); + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul> + {_.map(todos, (todo, i) => ( + <TodoItem key={i} {...todo} /> + ))} + </ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter((scope) => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div>; + +================================================================================ +`; + +exports[`array-iter.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map(user => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +) + +const TodoList = ({ todos }) => ( + <div className="TodoList"> + <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> + </div> +); + +<div className="search-filter-chips"> + {scopes + .filter(scope => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div> + +=====================================output===================================== +const UsersList = ({ users }) => ( + <section> + <h2>Users list</h2> + <ul> + {users.map((user) => ( + <li key={user.id}>{user.name}</li> + ))} + </ul> + </section> +); + +const TodoList = ({ todos }) => ( + <div className='TodoList'> + <ul> + {_.map(todos, (todo, i) => ( + <TodoItem key={i} {...todo} /> + ))} + </ul> + </div> +); + +<div className='search-filter-chips'> + {scopes + .filter((scope) => scope.value !== '') + .map((scope, i) => ( + <FilterChip + query={this.props.query} + onFilterChosen={this.onSearchScopeClicked} + key={i} + value={scope.value} + name={scope.name} + /> + ))} +</div>; + +================================================================================ +`; + +exports[`arrow.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +() => <Component><Children/></Component>; +() => () => <Component><Children/></Component>; +() => () => () => <Component><Children/></Component>; + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; + +<Prettier> + {We => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => currying => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; + +=====================================output===================================== +() => ( + <Component> + <Children /> + </Component> +); +() => () => ( + <Component> + <Children /> + </Component> +); +() => () => () => ( + <Component> + <Children /> + </Component> +); + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); + +<Prettier> + {(We) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; +<Prettier> + {(We) => (love) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; +<Prettier> + {(We) => (love) => (currying) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; + +================================================================================ +`; + +exports[`arrow.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +() => <Component><Children/></Component>; +() => () => <Component><Children/></Component>; +() => () => () => <Component><Children/></Component>; + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; + +<Prettier> + {We => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => currying => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; + +=====================================output===================================== +() => ( + <Component> + <Children /> + </Component> +); +() => () => ( + <Component> + <Children /> + </Component> +); +() => () => () => ( + <Component> + <Children /> + </Component> +); + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); + +<Prettier> + {(We) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; +<Prettier> + {(We) => (love) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; +<Prettier> + {(We) => (love) => (currying) => + "The purple monkey danced with a tambourine made of cheese." + + "The robot chef cooked a cake that tasted like rainbows." + + "The talking pineapple sang a lullaby to the sleepy giraffe." + } +</Prettier>; + +================================================================================ +`; + +exports[`arrow.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +() => <Component><Children/></Component>; +() => () => <Component><Children/></Component>; +() => () => () => <Component><Children/></Component>; + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; + +<Prettier> + {We => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => currying => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; + +=====================================output===================================== +() => ( + <Component> + <Children /> + </Component> +); +() => () => ( + <Component> + <Children /> + </Component> +); +() => () => () => ( + <Component> + <Children /> + </Component> +); + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); + +<Prettier> + {(We) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; +<Prettier> + {(We) => (love) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; +<Prettier> + {(We) => (love) => (currying) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; + +================================================================================ +`; + +exports[`arrow.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +() => <Component><Children/></Component>; +() => () => <Component><Children/></Component>; +() => () => () => <Component><Children/></Component>; + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; + +<Prettier> + {We => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => currying => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; + +=====================================output===================================== +() => ( + <Component> + <Children /> + </Component> +); +() => () => ( + <Component> + <Children /> + </Component> +); +() => () => () => ( + <Component> + <Children /> + </Component> +); + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); +() => () => () => ( + <div> + Long long long long long, very very long text. And more text. Another text. + </div> +); + +<Prettier> + {(We) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; +<Prettier> + {(We) => (love) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; +<Prettier> + {(We) => (love) => (currying) => + 'The purple monkey danced with a tambourine made of cheese.' + + 'The robot chef cooked a cake that tasted like rainbows.' + + 'The talking pineapple sang a lullaby to the sleepy giraffe.' + } +</Prettier>; + +================================================================================ +`; + +exports[`attr-comments.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Component + propFn={ + // comment + function(arg) { + fn(arg); + } + } + propArrowFn={ + // comment + arg => fn(arg) + } + propArrowWithBreak={ + // comment + arg => + fn({ + makeItBreak + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +=====================================output===================================== +<Component + propFn={ + // comment + function (arg) { + fn(arg); + } + } + propArrowFn={ + // comment + (arg) => fn(arg) + } + propArrowWithBreak={ + // comment + (arg) => + fn({ + makeItBreak, + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +================================================================================ +`; + +exports[`attr-comments.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Component + propFn={ + // comment + function(arg) { + fn(arg); + } + } + propArrowFn={ + // comment + arg => fn(arg) + } + propArrowWithBreak={ + // comment + arg => + fn({ + makeItBreak + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +=====================================output===================================== +<Component + propFn={ + // comment + function (arg) { + fn(arg); + } + } + propArrowFn={ + // comment + (arg) => fn(arg) + } + propArrowWithBreak={ + // comment + (arg) => + fn({ + makeItBreak, + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +================================================================================ +`; + +exports[`attr-comments.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Component + propFn={ + // comment + function(arg) { + fn(arg); + } + } + propArrowFn={ + // comment + arg => fn(arg) + } + propArrowWithBreak={ + // comment + arg => + fn({ + makeItBreak + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +=====================================output===================================== +<Component + propFn={ + // comment + function (arg) { + fn(arg); + } + } + propArrowFn={ + // comment + (arg) => fn(arg) + } + propArrowWithBreak={ + // comment + (arg) => + fn({ + makeItBreak, + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +================================================================================ +`; + +exports[`attr-comments.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Component + propFn={ + // comment + function(arg) { + fn(arg); + } + } + propArrowFn={ + // comment + arg => fn(arg) + } + propArrowWithBreak={ + // comment + arg => + fn({ + makeItBreak + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +=====================================output===================================== +<Component + propFn={ + // comment + function (arg) { + fn(arg); + } + } + propArrowFn={ + // comment + (arg) => fn(arg) + } + propArrowWithBreak={ + // comment + (arg) => + fn({ + makeItBreak, + }) + } + propArray={ + // comment + [el1, el2] + } + propObj={ + // comment + { key: val } + } + propTemplate={ + // comment + \`text\` + } +/>; + +================================================================================ +`; + +exports[`await.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +async function testFunction() { + const short = <> + {await Promise.all( + hierarchyCriticism + )} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all( + hierarchyCriticism + )} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + + const long = <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + </> + + const jsx = <> + {await (<IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate>)} + </> +} + +=====================================output===================================== +async function testFunction() { + const short = ( + <> + {await Promise.all(hierarchyCriticism)} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all(hierarchyCriticism)} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + ); + + const long = ( + <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + await hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + </> + ); + + const jsx = ( + <> + {await ( + <IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate> + )} + </> + ); +} + +================================================================================ +`; + +exports[`await.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +async function testFunction() { + const short = <> + {await Promise.all( + hierarchyCriticism + )} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all( + hierarchyCriticism + )} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + + const long = <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + </> + + const jsx = <> + {await (<IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate>)} + </> +} + +=====================================output===================================== +async function testFunction() { + const short = ( + <> + {await Promise.all(hierarchyCriticism)} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all(hierarchyCriticism)} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + ); + + const long = ( + <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + await hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + </> + ); + + const jsx = ( + <> + {await ( + <IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate> + )} + </> + ); +} + +================================================================================ +`; + +exports[`await.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +async function testFunction() { + const short = <> + {await Promise.all( + hierarchyCriticism + )} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all( + hierarchyCriticism + )} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + + const long = <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + </> + + const jsx = <> + {await (<IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate>)} + </> +} + +=====================================output===================================== +async function testFunction() { + const short = ( + <> + {await Promise.all(hierarchyCriticism)} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all(hierarchyCriticism)} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + ); + + const long = ( + <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + await hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + </> + ); + + const jsx = ( + <> + {await ( + <IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate> + )} + </> + ); +} + +================================================================================ +`; + +exports[`await.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +async function testFunction() { + const short = <> + {await Promise.all( + hierarchyCriticism + )} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all( + hierarchyCriticism + )} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + + const long = <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + )} + {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} + {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} + </> + + const jsx = <> + {await (<IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate>)} + </> +} + +=====================================output===================================== +async function testFunction() { + const short = ( + <> + {await Promise.all(hierarchyCriticism)} + {await hierarchyCriticism.ic.me.oa.p} + {await hierarchyCriticism} + + {Promise.all(hierarchyCriticism)} + {hierarchyCriticism.ic.me.oa.p} + {hierarchyCriticism} + </> + ); + + const long = ( + <> + {await Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + await hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + + {Promise.all( + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter, + )} + { + hierarchyCriticism.IncongruousCooperate.MaterialEducation + .OriginalArticulate.Parameter + } + { + hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter + } + </> + ); + + const jsx = ( + <> + {await ( + <IncongruousCooperate> + material education original articulate parameter + </IncongruousCooperate> + )} + </> + ); +} + +================================================================================ +`; + +exports[`conditional-expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div> + {a ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : +undefined + +=====================================output===================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div>{a ? "a" : b ? "b" : "c"}</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + ? "a" + : b + ? "b" + : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + "dunno" +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : ( + "dunno" +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? ( + <span> + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx + </span> +) : undefined; + +================================================================================ +`; + +exports[`conditional-expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div> + {a ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : +undefined + +=====================================output===================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div>{a ? "a" : b ? "b" : "c"}</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + ? "a" + : b + ? "b" + : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id='c' /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + "dunno" +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : ( + "dunno" +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? ( + <span> + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx + </span> +) : undefined; + +================================================================================ +`; + +exports[`conditional-expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div> + {a ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : +undefined + +=====================================output===================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? 'a' : 'b'; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : 'c'; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : 'a'; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : 'a'; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? 'a' : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> +</div> ? ( + 'jsx mode from element breaking' +) : ( + 'a' +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + 'a' +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + 'a' +) : ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div>{a ? 'a' : b ? 'b' : 'c'}</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + ? 'a' + : b + ? 'b' + : 'c'} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? 'satellite' : isPublic ? 'affairs' : network ? <span id="c" /> : 'dun'; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + 'satellite' +) : isPublic ? ( + 'affairs' +) : network ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + 'dunno' +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : sateline ? ( + 'public' +) : affairs ? ( + 'network' +) : ( + 'dunno' +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? ( + <span> + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx + </span> +) : undefined; + +================================================================================ +`; + +exports[`conditional-expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? "a" : "b"; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : "c"; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : "a"; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : "a"; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? "a" : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> +</div> ? ( + "jsx mode from element breaking" +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : ( + "a" +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + "a" +) : ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div> + {a ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + "satellite" +) : isPublic ? ( + "affairs" +) : network ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> + </div> +) : sateline ? ( + "public" +) : affairs ? ( + "network" +) : "dunno"; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : +undefined + +=====================================output===================================== +// There are two ways to print ConditionalExpressions: "normal mode" and +// "JSX mode". This is normal mode (when breaking): +// +// test +// ? consequent +// : alternate; +// +// And this is JSX mode (when breaking): +// +// test ? ( +// consequent +// ) : ( +// alternate +// ); +// +// When non-breaking, they look the same: +// +// test ? consequent : alternate; +// +// We only print a conditional expression in JSX mode if its test, +// consequent, or alternate are JSXElements. +// Otherwise, we print in normal mode. + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// The line does not break. +normalModeNonBreaking ? 'a' : 'b'; + +// This ConditionalExpression has no JSXElements so it prints in normal mode. +// Its consequent is very long, so it breaks out to multiple lines. +normalModeBreaking + ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa + : 'c'; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is non-breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div /> ? jsxModeFromElementNonBreaking : 'a'; + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? <div /> : 'a'; + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is non-breaking. +jsxModeFromElementNonBreaking ? 'a' : <div />; + +// This ConditionalExpression prints in JSX mode because its test is a +// JSXElement. It is breaking. +// Note: I have never, ever seen someone use a JSXElement as the test in a +// ConditionalExpression. But this test is included for completeness. +<div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> +</div> ? ( + 'jsx mode from element breaking' +) : ( + 'a' +); + +// This ConditionalExpression prints in JSX mode because its consequent is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + 'a' +); + +// This ConditionalExpression prints in JSX mode because its alternate is a +// JSXElement. It is breaking. +jsxModeFromElementBreaking ? ( + 'a' +) : ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +); + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// non-breaking. +<div>{a ? 'a' : b ? 'b' : 'c'}</div>; + +// This chain of ConditionalExpressions prints in JSX mode because the parent of +// the outermost ConditionalExpression is a JSXExpressionContainer. It is +// breaking. +<div> + {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + ? 'a' + : b + ? 'b' + : 'c'} +</div>; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is non-breaking. +cable ? 'satellite' : isPublic ? 'affairs' : network ? <span id='c' /> : 'dun'; + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the end). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + 'satellite' +) : isPublic ? ( + 'affairs' +) : network ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : ( + 'dunno' +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain (in this case, at the beginning). It is +// breaking; notice the consequents and alternates in the entire chain get +// wrapped in parens. +cable ? ( + <div> + <span> + thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo + </span> + </div> +) : sateline ? ( + 'public' +) : affairs ? ( + 'network' +) : ( + 'dunno' +); + +// This chain of ConditionalExpressions prints in JSX mode because there is a +// JSX element somewhere in the chain. It is breaking; notice the consequents +// and alternates in the entire chain get wrapped in parens. +<div> + {properties.length > 1 || + (properties.length === 1 && properties[0].apps.size > 1) ? ( + draggingApp == null || newPropertyName == null ? ( + <MigrationPropertyListItem /> + ) : ( + <MigrationPropertyListItem apps={Immutable.List()} /> + ) + ) : null} +</div>; + +// #3552 +foo ? ( + <span> + loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx + </span> +) : undefined; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<View + style={ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + } +/>; + +<View + style={ + [ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + ] + } +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map(item => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function() { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option)} + imageSize={this.props.veryBigItemImageSize} + imageView={this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option)} + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={ + <Child> + test + </Child> +}/>; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={data => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +/>; + +<BookingIntroPanel + logClick={data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +/>; + +<BookingIntroPanel> + {data => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +=====================================output===================================== +<View + style={{ + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true", + }} +/>; + +<View + style={[ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true", + }, + ]} +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map((item) => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function () { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={ + this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option) + } + imageSize={this.props.veryBigItemImageSize} + imageView={ + this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option) + } + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={<Child>test</Child>} />; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={(data) => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={(data) => + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ) + } +/>; + +<BookingIntroPanel + logClick={(data) => { + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ); + }} +/>; + +<BookingIntroPanel> + {(data) => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => { + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ); + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<View + style={ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + } +/>; + +<View + style={ + [ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + ] + } +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map(item => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function() { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option)} + imageSize={this.props.veryBigItemImageSize} + imageView={this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option)} + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={ + <Child> + test + </Child> +}/>; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={data => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +/>; + +<BookingIntroPanel + logClick={data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +/>; + +<BookingIntroPanel> + {data => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +=====================================output===================================== +<View + style={{ + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true", + }} +/>; + +<View + style={[ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true", + }, + ]} +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map((item) => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function () { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={ + this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option) + } + imageSize={this.props.veryBigItemImageSize} + imageView={ + this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option) + } + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={<Child>test</Child>} />; + +<BookingIntroPanel + prop='long_string_make_to_force_break' + logClick={(data) => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={(data) => + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ) + } +/>; + +<BookingIntroPanel + logClick={(data) => { + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ); + }} +/>; + +<BookingIntroPanel> + {(data) => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => { + doLogClick( + "long_name_long_name_long_name", + "long_name_long_name_long_name", + data, + ); + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<View + style={ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + } +/>; + +<View + style={ + [ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + ] + } +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map(item => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function() { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option)} + imageSize={this.props.veryBigItemImageSize} + imageView={this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option)} + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={ + <Child> + test + </Child> +}/>; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={data => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +/>; + +<BookingIntroPanel + logClick={data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +/>; + +<BookingIntroPanel> + {data => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +=====================================output===================================== +<View + style={{ + someVeryLongStyle1: 'true', + someVeryLongStyle2: 'true', + someVeryLongStyle3: 'true', + someVeryLongStyle4: 'true', + }} +/>; + +<View + style={[ + { + someVeryLongStyle1: 'true', + someVeryLongStyle2: 'true', + someVeryLongStyle3: 'true', + someVeryLongStyle4: 'true', + }, + ]} +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map((item) => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function () { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={ + this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option) + } + imageSize={this.props.veryBigItemImageSize} + imageView={ + this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option) + } + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={<Child>test</Child>} />; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={(data) => doLogClick('short', 'short', data)} +/>; + +<BookingIntroPanel + logClick={(data) => + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ) + } +/>; + +<BookingIntroPanel + logClick={(data) => { + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ); + }} +/>; + +<BookingIntroPanel> + {(data) => doLogClick('short', 'short', data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => { + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ); + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: 'scroll' }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +================================================================================ +`; + +exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<View + style={ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + } +/>; + +<View + style={ + [ + { + someVeryLongStyle1: "true", + someVeryLongStyle2: "true", + someVeryLongStyle3: "true", + someVeryLongStyle4: "true" + } + ] + } +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map(item => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function() { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option)} + imageSize={this.props.veryBigItemImageSize} + imageView={this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option)} + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={ + <Child> + test + </Child> +}/>; + +<BookingIntroPanel + prop="long_string_make_to_force_break" + logClick={data => doLogClick("short", "short", data)} +/>; + +<BookingIntroPanel + logClick={data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +/>; + +<BookingIntroPanel + logClick={data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +/>; + +<BookingIntroPanel> + {data => doLogClick("short", "short", data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {data => { + doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +=====================================output===================================== +<View + style={{ + someVeryLongStyle1: 'true', + someVeryLongStyle2: 'true', + someVeryLongStyle3: 'true', + someVeryLongStyle4: 'true', + }} +/>; + +<View + style={[ + { + someVeryLongStyle1: 'true', + someVeryLongStyle2: 'true', + someVeryLongStyle3: 'true', + someVeryLongStyle4: 'true', + }, + ]} +/>; + +<Something> + {() => ( + <SomethingElse> + <span /> + </SomethingElse> + )} +</Something>; + +<Something> + {items.map((item) => ( + <SomethingElse> + <span /> + </SomethingElse> + ))} +</Something>; + +<Something> + {function () { + return ( + <SomethingElse> + <span /> + </SomethingElse> + ); + }} +</Something>; + +<RadioListItem + key={option} + imageSource={ + this.props.veryBigItemImageSourceFunc && + this.props.veryBigItemImageSourceFunc(option) + } + imageSize={this.props.veryBigItemImageSize} + imageView={ + this.props.veryBigItemImageViewFunc && + this.props.veryBigItemImageViewFunc(option) + } + heading={this.props.displayTextFunc(option)} + value={option} +/>; + +<ParentComponent prop={<Child>test</Child>} />; + +<BookingIntroPanel + prop='long_string_make_to_force_break' + logClick={(data) => doLogClick('short', 'short', data)} +/>; + +<BookingIntroPanel + logClick={(data) => + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ) + } +/>; + +<BookingIntroPanel + logClick={(data) => { + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ); + }} +/>; + +<BookingIntroPanel> + {(data) => doLogClick('short', 'short', data)} +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ) + } +</BookingIntroPanel>; + +<BookingIntroPanel> + {(data) => { + doLogClick( + 'long_name_long_name_long_name', + 'long_name_long_name_long_name', + data, + ); + }} +</BookingIntroPanel>; + +<SuspendyTree> + <div style={{ height: 200, overflow: 'scroll' }}> + {Array(20) + .fill() + .map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +================================================================================ +`; + +exports[`flow_fix_me.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo"> + Foo bar + </div> +); + +=====================================output===================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo">Foo bar</div> +); + +================================================================================ +`; + +exports[`flow_fix_me.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo"> + Foo bar + </div> +); + +=====================================output===================================== +const aDiv = ( + /* $FlowFixMe */ + <div className='foo'>Foo bar</div> +); + +================================================================================ +`; + +exports[`flow_fix_me.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo"> + Foo bar + </div> +); + +=====================================output===================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo">Foo bar</div> +); + +================================================================================ +`; + +exports[`flow_fix_me.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const aDiv = ( + /* $FlowFixMe */ + <div className="foo"> + Foo bar + </div> +); + +=====================================output===================================== +const aDiv = ( + /* $FlowFixMe */ + <div className='foo'>Foo bar</div> +); + +================================================================================ +`; + +exports[`html_escape.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +=====================================output===================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +================================================================================ +`; + +exports[`html_escape.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +=====================================output===================================== +export default () => <a href='https://foo.bar?q1=foo&q2=bar' />; + +() => <img src='https://bar.foo?param1=1&param2=2' />; + +================================================================================ +`; + +exports[`html_escape.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +=====================================output===================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +================================================================================ +`; + +exports[`html_escape.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; + +() => <img src="https://bar.foo?param1=1&param2=2" />; + +=====================================output===================================== +export default () => <a href='https://foo.bar?q1=foo&q2=bar' />; + +() => <img src='https://bar.foo?param1=1&param2=2' />; + +================================================================================ +`; + +exports[`hug.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div> + {__DEV__ + ? this.renderDevApp() + : <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {__DEV__ && <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div> + +=====================================output===================================== +<div> + {__DEV__ ? ( + this.renderDevApp() + ) : ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {__DEV__ && ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? "()" : "")} +</div>; + +================================================================================ +`; + +exports[`hug.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div> + {__DEV__ + ? this.renderDevApp() + : <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {__DEV__ && <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div> + +=====================================output===================================== +<div> + {__DEV__ ? ( + this.renderDevApp() + ) : ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {__DEV__ && ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? "()" : "")} +</div>; + +================================================================================ +`; + +exports[`hug.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div> + {__DEV__ + ? this.renderDevApp() + : <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {__DEV__ && <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div> + +=====================================output===================================== +<div> + {__DEV__ ? ( + this.renderDevApp() + ) : ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === '/'} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {__DEV__ && ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === '/'} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div>; + +================================================================================ +`; + +exports[`hug.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div> + {__DEV__ + ? this.renderDevApp() + : <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {__DEV__ && <div> + {routes.map(route => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === "/"} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div>} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div> + +=====================================output===================================== +<div> + {__DEV__ ? ( + this.renderDevApp() + ) : ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === '/'} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {__DEV__ && ( + <div> + {routes.map((route) => ( + <MatchAsync + key={\`\${route.to}-async\`} + pattern={route.to} + exactly={route.to === '/'} + getComponent={routeES6Modules[route.value]} + /> + ))} + </div> + )} +</div>; + +<div> + {member.memberName.memberSomething + + (member.memberDef.memberSomething.signatures ? '()' : '')} +</div>; + +================================================================================ +`; + +exports[`logical-expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div> + {a || "b"} +</div>; + +<div> + {a && "b"} +</div>; + +<div> + {a || <span></span>} +</div>; + +<div> + {a && <span></span>} +</div>; + +<div> + {a && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && b && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && <span> + <div> + <div></div> + </div> + </span>} +</div>; + +=====================================output===================================== +<div>{a || "b"}</div>; + +<div>{a && "b"}</div>; + +<div>{a || <span></span>}</div>; + +<div>{a && <span></span>}</div>; + +<div> + {a && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && b && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && ( + <span> + <div> + <div></div> + </div> + </span> + )} +</div>; + +================================================================================ +`; + +exports[`logical-expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div> + {a || "b"} +</div>; + +<div> + {a && "b"} +</div>; + +<div> + {a || <span></span>} +</div>; + +<div> + {a && <span></span>} +</div>; + +<div> + {a && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && b && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && <span> + <div> + <div></div> + </div> + </span>} +</div>; + +=====================================output===================================== +<div>{a || "b"}</div>; + +<div>{a && "b"}</div>; + +<div>{a || <span></span>}</div>; + +<div>{a && <span></span>}</div>; + +<div> + {a && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && b && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && ( + <span> + <div> + <div></div> + </div> + </span> + )} +</div>; + +================================================================================ +`; + +exports[`logical-expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div> + {a || "b"} +</div>; + +<div> + {a && "b"} +</div>; + +<div> + {a || <span></span>} +</div>; + +<div> + {a && <span></span>} +</div>; + +<div> + {a && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && b && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && <span> + <div> + <div></div> + </div> + </span>} +</div>; + +=====================================output===================================== +<div>{a || 'b'}</div>; + +<div>{a && 'b'}</div>; + +<div>{a || <span></span>}</div>; + +<div>{a && <span></span>}</div>; + +<div> + {a && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && b && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && ( + <span> + <div> + <div></div> + </div> + </span> + )} +</div>; + +================================================================================ +`; + +exports[`logical-expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div> + {a || "b"} +</div>; + +<div> + {a && "b"} +</div>; + +<div> + {a || <span></span>} +</div>; + +<div> + {a && <span></span>} +</div>; + +<div> + {a && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && b && <span>make this text just so long enough to break this to the next line</span>} +</div>; + +<div> + {a && <span> + <div> + <div></div> + </div> + </span>} +</div>; + +=====================================output===================================== +<div>{a || 'b'}</div>; + +<div>{a && 'b'}</div>; + +<div>{a || <span></span>}</div>; + +<div>{a && <span></span>}</div>; + +<div> + {a && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && b && ( + <span> + make this text just so long enough to break this to the next line + </span> + )} +</div>; + +<div> + {a && ( + <span> + <div> + <div></div> + </div> + </span> + )} +</div>; + +================================================================================ +`; + +exports[`object-property.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={ onSave } + onCancel={ onCancel } + countries={ countries } + /> + ) + } +]; + +=====================================output===================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={onSave} + onCancel={onCancel} + countries={countries} + /> + ), + }, +]; + +================================================================================ +`; + +exports[`object-property.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={ onSave } + onCancel={ onCancel } + countries={ countries } + /> + ) + } +]; + +=====================================output===================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute='i-need-long-value-here' + onSave={onSave} + onCancel={onCancel} + countries={countries} + /> + ), + }, +]; + +================================================================================ +`; + +exports[`object-property.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={ onSave } + onCancel={ onCancel } + countries={ countries } + /> + ) + } +]; + +=====================================output===================================== +const tabs = [ + { + title: 'General Info', + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={onSave} + onCancel={onCancel} + countries={countries} + /> + ), + }, +]; + +================================================================================ +`; + +exports[`object-property.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const tabs = [ + { + title: "General Info", + content: ( + <GeneralForm + long-attribute="i-need-long-value-here" + onSave={ onSave } + onCancel={ onCancel } + countries={ countries } + /> + ) + } +]; + +=====================================output===================================== +const tabs = [ + { + title: 'General Info', + content: ( + <GeneralForm + long-attribute='i-need-long-value-here' + onSave={onSave} + onCancel={onCancel} + countries={countries} + /> + ), + }, +]; + +================================================================================ +`; + +exports[`open-break.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<td +onClick={() => { + a +}}>{header}{showSort}</td>; + +<td +onClick={() => { + a +}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +=====================================output===================================== +<td + onClick={() => { + a; + }} +> + {header} + {showSort} +</td>; + +<td + onClick={() => { + a; + }} +> + {header} + <showSort attr="long long long long long long long long long long long" /> +</td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +================================================================================ +`; + +exports[`open-break.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<td +onClick={() => { + a +}}>{header}{showSort}</td>; + +<td +onClick={() => { + a +}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +=====================================output===================================== +<td + onClick={() => { + a; + }} +> + {header} + {showSort} +</td>; + +<td + onClick={() => { + a; + }} +> + {header} + <showSort attr='long long long long long long long long long long long' /> +</td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +================================================================================ +`; + +exports[`open-break.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<td +onClick={() => { + a +}}>{header}{showSort}</td>; + +<td +onClick={() => { + a +}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +=====================================output===================================== +<td + onClick={() => { + a; + }} +> + {header} + {showSort} +</td>; + +<td + onClick={() => { + a; + }} +> + {header} + <showSort attr="long long long long long long long long long long long" /> +</td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +================================================================================ +`; + +exports[`open-break.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<td +onClick={() => { + a +}}>{header}{showSort}</td>; + +<td +onClick={() => { + a +}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +=====================================output===================================== +<td + onClick={() => { + a; + }} +> + {header} + {showSort} +</td>; + +<td + onClick={() => { + a; + }} +> + {header} + <showSort attr='long long long long long long long long long long long' /> +</td>; + +<Foo>{\` a very long text that does not break \`}</Foo>; + +================================================================================ +`; + +exports[`parens.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...((foo || foo === null) ? {foo} : null)} /> + +f?.(<div/>); +(<div/>)(); +(<div/>)?.(); + +new Foo(<Component/>); +new Foo((<Component/>)) + +=====================================output===================================== +a = [ + <path + key="0" + d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," + />, + <path + key="1" + d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," + />, +]; + +<div {...(foo || foo === null ? { foo } : null)} />; + +f?.(<div />); +(<div />)(); +(<div />)?.(); + +new Foo(<Component />); +new Foo(<Component />); + +================================================================================ +`; + +exports[`parens.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...((foo || foo === null) ? {foo} : null)} /> + +f?.(<div/>); +(<div/>)(); +(<div/>)?.(); + +new Foo(<Component/>); +new Foo((<Component/>)) + +=====================================output===================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...(foo || foo === null ? { foo } : null)} />; + +f?.(<div />); +(<div />)(); +(<div />)?.(); + +new Foo(<Component />); +new Foo(<Component />); + +================================================================================ +`; + +exports[`parens.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...((foo || foo === null) ? {foo} : null)} /> + +f?.(<div/>); +(<div/>)(); +(<div/>)?.(); + +new Foo(<Component/>); +new Foo((<Component/>)) + +=====================================output===================================== +a = [ + <path + key="0" + d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," + />, + <path + key="1" + d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," + />, +]; + +<div {...(foo || foo === null ? { foo } : null)} />; + +f?.(<div />); +(<div />)(); +(<div />)?.(); + +new Foo(<Component />); +new Foo(<Component />); + +================================================================================ +`; + +exports[`parens.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...((foo || foo === null) ? {foo} : null)} /> + +f?.(<div/>); +(<div/>)(); +(<div/>)?.(); + +new Foo(<Component/>); +new Foo((<Component/>)) + +=====================================output===================================== +a = [ + <path + key='0' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, + <path + key='1' + d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' + />, +]; + +<div {...(foo || foo === null ? { foo } : null)} />; + +f?.(<div />); +(<div />)(); +(<div />)?.(); + +new Foo(<Component />); +new Foo(<Component />); + +================================================================================ +`; + +exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id='123' />; +<div id='&#39;&quot;' />; +<div id={'\\'\\"\\\\\\''} />; +<div + single='foo' + single2={'foo'} + + double="bar" + double2={"bar"} + + singleDouble='"' + singleDouble2={'"'} + + doubleSingle="'" + doubleSingle2={"'"} + + singleEscaped={'\\''} + singleEscaped2='&apos;' + + doubleEscaped={"\\""} + doubleEscaped2="&quot;" + + singleBothEscaped={'\\'"'} + singleBothEscaped2='&apos;"' + + singleBoth='&apos; "' + singleBoth2={'\\' "'} + singleBoth3='&apos; &apos; "' + + doubleBoth="&quot; '" + doubleBoth2={"\\" '"} + doubleBoth3="&quot; &apos; '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p> + +=====================================output===================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={"'\\"&quot;<>&amp;quot;"} />; +<div id="123" />; +<div id='&#39;"' />; +<div id={"'\\"\\\\'"} />; +<div + single="foo" + single2={"foo"} + double="bar" + double2={"bar"} + singleDouble='"' + singleDouble2={'"'} + doubleSingle="'" + doubleSingle2={"'"} + singleEscaped={"'"} + singleEscaped2="'" + doubleEscaped={'"'} + doubleEscaped2='"' + singleBothEscaped={"'\\""} + singleBothEscaped2="'&quot;" + singleBoth="' &quot;" + singleBoth2={"' \\""} + singleBoth3="' ' &quot;" + doubleBoth="&quot; '" + doubleBoth2={"\\" '"} + doubleBoth3="&quot; ' '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "} +</p>; + +================================================================================ +`; + +exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id='123' />; +<div id='&#39;&quot;' />; +<div id={'\\'\\"\\\\\\''} />; +<div + single='foo' + single2={'foo'} + + double="bar" + double2={"bar"} + + singleDouble='"' + singleDouble2={'"'} + + doubleSingle="'" + doubleSingle2={"'"} + + singleEscaped={'\\''} + singleEscaped2='&apos;' + + doubleEscaped={"\\""} + doubleEscaped2="&quot;" + + singleBothEscaped={'\\'"'} + singleBothEscaped2='&apos;"' + + singleBoth='&apos; "' + singleBoth2={'\\' "'} + singleBoth3='&apos; &apos; "' + + doubleBoth="&quot; '" + doubleBoth2={"\\" '"} + doubleBoth3="&quot; &apos; '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p> + +=====================================output===================================== +<div id='"&apos;<>&amp;quot;' />; +<div id='"&#39;<>&amp;quot;' />; +<div id={"'\\"&quot;<>&amp;quot;"} />; +<div id='123' />; +<div id='&#39;"' />; +<div id={"'\\"\\\\'"} />; +<div + single='foo' + single2={"foo"} + double='bar' + double2={"bar"} + singleDouble='"' + singleDouble2={'"'} + doubleSingle="'" + doubleSingle2={"'"} + singleEscaped={"'"} + singleEscaped2="'" + doubleEscaped={'"'} + doubleEscaped2='"' + singleBothEscaped={"'\\""} + singleBothEscaped2='&apos;"' + singleBoth='&apos; "' + singleBoth2={"' \\""} + singleBoth3="' ' &quot;" + doubleBoth='" &apos;' + doubleBoth2={"\\" '"} + doubleBoth3="&quot; ' '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "} +</p>; + +================================================================================ +`; + +exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id='123' />; +<div id='&#39;&quot;' />; +<div id={'\\'\\"\\\\\\''} />; +<div + single='foo' + single2={'foo'} + + double="bar" + double2={"bar"} + + singleDouble='"' + singleDouble2={'"'} + + doubleSingle="'" + doubleSingle2={"'"} + + singleEscaped={'\\''} + singleEscaped2='&apos;' + + doubleEscaped={"\\""} + doubleEscaped2="&quot;" + + singleBothEscaped={'\\'"'} + singleBothEscaped2='&apos;"' + + singleBoth='&apos; "' + singleBoth2={'\\' "'} + singleBoth3='&apos; &apos; "' + + doubleBoth="&quot; '" + doubleBoth2={"\\" '"} + doubleBoth3="&quot; &apos; '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p> + +=====================================output===================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id="123" />; +<div id='&#39;"' />; +<div id={"'\\"\\\\'"} />; +<div + single="foo" + single2={'foo'} + double="bar" + double2={'bar'} + singleDouble='"' + singleDouble2={'"'} + doubleSingle="'" + doubleSingle2={"'"} + singleEscaped={"'"} + singleEscaped2="'" + doubleEscaped={'"'} + doubleEscaped2='"' + singleBothEscaped={'\\'"'} + singleBothEscaped2="'&quot;" + singleBoth="' &quot;" + singleBoth2={'\\' "'} + singleBoth3="' ' &quot;" + doubleBoth="&quot; '" + doubleBoth2={'" \\''} + doubleBoth3="&quot; ' '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p>; + +================================================================================ +`; + +exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<div id="&quot;'<>&amp;quot;" />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id='123' />; +<div id='&#39;&quot;' />; +<div id={'\\'\\"\\\\\\''} />; +<div + single='foo' + single2={'foo'} + + double="bar" + double2={"bar"} + + singleDouble='"' + singleDouble2={'"'} + + doubleSingle="'" + doubleSingle2={"'"} + + singleEscaped={'\\''} + singleEscaped2='&apos;' + + doubleEscaped={"\\""} + doubleEscaped2="&quot;" + + singleBothEscaped={'\\'"'} + singleBothEscaped2='&apos;"' + + singleBoth='&apos; "' + singleBoth2={'\\' "'} + singleBoth3='&apos; &apos; "' + + doubleBoth="&quot; '" + doubleBoth2={"\\" '"} + doubleBoth3="&quot; &apos; '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p> + +=====================================output===================================== +<div id='"&apos;<>&amp;quot;' />; +<div id='"&#39;<>&amp;quot;' />; +<div id={'\\'"&quot;<>&amp;quot;'} />; +<div id='123' />; +<div id='&#39;"' />; +<div id={"'\\"\\\\'"} />; +<div + single='foo' + single2={'foo'} + double='bar' + double2={'bar'} + singleDouble='"' + singleDouble2={'"'} + doubleSingle="'" + doubleSingle2={"'"} + singleEscaped={"'"} + singleEscaped2="'" + doubleEscaped={'"'} + doubleEscaped2='"' + singleBothEscaped={'\\'"'} + singleBothEscaped2='&apos;"' + singleBoth='&apos; "' + singleBoth2={'\\' "'} + singleBoth3="' ' &quot;" + doubleBoth='" &apos;' + doubleBoth2={'" \\''} + doubleBoth3="&quot; ' '" +/>; + +<p> + GitHub Desktop has encountered an unrecoverable error and will need to 1231231 + restart. This has been reported to the team, but if youencounter this121312331 + repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} +</p>; + +================================================================================ +`; + +exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +x = <div>one</div>, <div>two</div>; +x = <a>{}</a> +x = <a>{1/2}</a> +x = <a>{/w/.test(s)}</a> + +=====================================output===================================== +((x = <div>one</div>), (<div>two</div>)); +x = <a>{}</a>; +x = <a>{1 / 2}</a>; +x = <a>{/w/.test(s)}</a>; + +================================================================================ +`; + +exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +x = <div>one</div>, <div>two</div>; +x = <a>{}</a> +x = <a>{1/2}</a> +x = <a>{/w/.test(s)}</a> + +=====================================output===================================== +((x = <div>one</div>), (<div>two</div>)); +x = <a>{}</a>; +x = <a>{1 / 2}</a>; +x = <a>{/w/.test(s)}</a>; + +================================================================================ +`; + +exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +x = <div>one</div>, <div>two</div>; +x = <a>{}</a> +x = <a>{1/2}</a> +x = <a>{/w/.test(s)}</a> + +=====================================output===================================== +((x = <div>one</div>), (<div>two</div>)); +x = <a>{}</a>; +x = <a>{1 / 2}</a>; +x = <a>{/w/.test(s)}</a>; + +================================================================================ +`; + +exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +x = <div>one</div>, <div>two</div>; +x = <a>{}</a> +x = <a>{1/2}</a> +x = <a>{/w/.test(s)}</a> + +=====================================output===================================== +((x = <div>one</div>), (<div>two</div>)); +x = <a>{}</a>; +x = <a>{1 / 2}</a>; +x = <a>{/w/.test(s)}</a>; + +================================================================================ +`; + +exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => <div> + <div> + bla bla bla + </div> +</div>; + +const NonBreakingArrowExpressionWBody = () => { + return ( + <div /> + ); +}; + +const BreakingArrowExpressionWBody = () => { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +const NonBreakingFunction = function() { + return ( + <div /> + ); +}; + +const BreakingFunction = function() { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +class NonBreakingClass extends React.component { + render() { + return ( + <div /> + ); + } +} + +class BreakingClass extends React.component { + render() { + return <div> + <div> + bla bla bla + </div> + </div>; + } +} + +=====================================output===================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => ( + <div> + <div>bla bla bla</div> + </div> +); + +const NonBreakingArrowExpressionWBody = () => { + return <div />; +}; + +const BreakingArrowExpressionWBody = () => { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +const NonBreakingFunction = function () { + return <div />; +}; + +const BreakingFunction = function () { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +class NonBreakingClass extends React.component { + render() { + return <div />; + } +} + +class BreakingClass extends React.component { + render() { + return ( + <div> + <div>bla bla bla</div> + </div> + ); + } +} + +================================================================================ +`; + +exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => <div> + <div> + bla bla bla + </div> +</div>; + +const NonBreakingArrowExpressionWBody = () => { + return ( + <div /> + ); +}; + +const BreakingArrowExpressionWBody = () => { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +const NonBreakingFunction = function() { + return ( + <div /> + ); +}; + +const BreakingFunction = function() { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +class NonBreakingClass extends React.component { + render() { + return ( + <div /> + ); + } +} + +class BreakingClass extends React.component { + render() { + return <div> + <div> + bla bla bla + </div> + </div>; + } +} + +=====================================output===================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => ( + <div> + <div>bla bla bla</div> + </div> +); + +const NonBreakingArrowExpressionWBody = () => { + return <div />; +}; + +const BreakingArrowExpressionWBody = () => { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +const NonBreakingFunction = function () { + return <div />; +}; + +const BreakingFunction = function () { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +class NonBreakingClass extends React.component { + render() { + return <div />; + } +} + +class BreakingClass extends React.component { + render() { + return ( + <div> + <div>bla bla bla</div> + </div> + ); + } +} + +================================================================================ +`; + +exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => <div> + <div> + bla bla bla + </div> +</div>; + +const NonBreakingArrowExpressionWBody = () => { + return ( + <div /> + ); +}; + +const BreakingArrowExpressionWBody = () => { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +const NonBreakingFunction = function() { + return ( + <div /> + ); +}; + +const BreakingFunction = function() { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +class NonBreakingClass extends React.component { + render() { + return ( + <div /> + ); + } +} + +class BreakingClass extends React.component { + render() { + return <div> + <div> + bla bla bla + </div> + </div>; + } +} + +=====================================output===================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => ( + <div> + <div>bla bla bla</div> + </div> +); + +const NonBreakingArrowExpressionWBody = () => { + return <div />; +}; + +const BreakingArrowExpressionWBody = () => { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +const NonBreakingFunction = function () { + return <div />; +}; + +const BreakingFunction = function () { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +class NonBreakingClass extends React.component { + render() { + return <div />; + } +} + +class BreakingClass extends React.component { + render() { + return ( + <div> + <div>bla bla bla</div> + </div> + ); + } +} + +================================================================================ +`; + +exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => <div> + <div> + bla bla bla + </div> +</div>; + +const NonBreakingArrowExpressionWBody = () => { + return ( + <div /> + ); +}; + +const BreakingArrowExpressionWBody = () => { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +const NonBreakingFunction = function() { + return ( + <div /> + ); +}; + +const BreakingFunction = function() { + return <div> + <div> + bla bla bla + </div> + </div> +}; + +class NonBreakingClass extends React.component { + render() { + return ( + <div /> + ); + } +} + +class BreakingClass extends React.component { + render() { + return <div> + <div> + bla bla bla + </div> + </div>; + } +} + +=====================================output===================================== +const NonBreakingArrowExpression = () => <div />; + +const BreakingArrowExpression = () => ( + <div> + <div>bla bla bla</div> + </div> +); + +const NonBreakingArrowExpressionWBody = () => { + return <div />; +}; + +const BreakingArrowExpressionWBody = () => { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +const NonBreakingFunction = function () { + return <div />; +}; + +const BreakingFunction = function () { + return ( + <div> + <div>bla bla bla</div> + </div> + ); +}; + +class NonBreakingClass extends React.component { + render() { + return <div />; + } +} + +class BreakingClass extends React.component { + render() { + return ( + <div> + <div>bla bla bla</div> + </div> + ); + } +} + +================================================================================ +`; + +exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Foo></Foo>; +<Bar />; + +=====================================output===================================== +<Foo></Foo>; +<Bar />; + +================================================================================ +`; + +exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +<Foo></Foo>; +<Bar />; + +=====================================output===================================== +<Foo></Foo>; +<Bar />; + +================================================================================ +`; + +exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Foo></Foo>; +<Bar />; + +=====================================output===================================== +<Foo></Foo>; +<Bar />; + +================================================================================ +`; + +exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +<Foo></Foo>; +<Bar />; + +=====================================output===================================== +<Foo></Foo>; +<Bar />; + +================================================================================ +`; + +exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const Labels = { + label1: ( + <fbt> + Label 1 + </fbt> + ), + + label2: ( + <fbt> + Label 2 + </fbt> + ), + + label3: ( + <fbt> + Label 3 + </fbt> + ), +}; + +=====================================output===================================== +const Labels = { + label1: <fbt>Label 1</fbt>, + + label2: <fbt>Label 2</fbt>, + + label3: <fbt>Label 3</fbt>, +}; + +================================================================================ +`; + +exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +const Labels = { + label1: ( + <fbt> + Label 1 + </fbt> + ), + + label2: ( + <fbt> + Label 2 + </fbt> + ), + + label3: ( + <fbt> + Label 3 + </fbt> + ), +}; + +=====================================output===================================== +const Labels = { + label1: <fbt>Label 1</fbt>, + + label2: <fbt>Label 2</fbt>, + + label3: <fbt>Label 3</fbt>, +}; + +================================================================================ +`; + +exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const Labels = { + label1: ( + <fbt> + Label 1 + </fbt> + ), + + label2: ( + <fbt> + Label 2 + </fbt> + ), + + label3: ( + <fbt> + Label 3 + </fbt> + ), +}; + +=====================================output===================================== +const Labels = { + label1: <fbt>Label 1</fbt>, + + label2: <fbt>Label 2</fbt>, + + label3: <fbt>Label 3</fbt>, +}; + +================================================================================ +`; + +exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +const Labels = { + label1: ( + <fbt> + Label 1 + </fbt> + ), + + label2: ( + <fbt> + Label 2 + </fbt> + ), + + label3: ( + <fbt> + Label 3 + </fbt> + ), +}; + +=====================================output===================================== +const Labels = { + label1: <fbt>Label 1</fbt>, + + label2: <fbt>Label 2</fbt>, + + label3: <fbt>Label 3</fbt>, +}; + +================================================================================ +`; + +exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== + <div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + >foo</div> +</div> +</div> + +=====================================output===================================== +<div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + > + foo + </div> + </div> +</div>; + +================================================================================ +`; + +exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== + <div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + >foo</div> +</div> +</div> + +=====================================output===================================== +<div> + <div> + <div + className='js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button' + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + > + foo + </div> + </div> +</div>; + +================================================================================ +`; + +exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== + <div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + >foo</div> +</div> +</div> + +=====================================output===================================== +<div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + > + foo + </div> + </div> +</div>; + +================================================================================ +`; + +exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== + <div> + <div> + <div + className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + >foo</div> +</div> +</div> + +=====================================output===================================== +<div> + <div> + <div + className='js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button' + data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} + > + foo + </div> + </div> +</div>; + +================================================================================ +`; + +exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +=====================================output===================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +================================================================================ +`; + +exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: false + | printWidth +=====================================input====================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +=====================================output===================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +================================================================================ +`; + +exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` +====================================options===================================== +jsxSingleQuote: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +=====================================output===================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +================================================================================ +`; + +exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` +====================================options===================================== +jsxSingleQuote: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +=====================================output===================================== +a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); + +================================================================================ +`; diff --git a/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a1dd16f69066..000000000000 --- a/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,6117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`array-iter.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map(user => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -) - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter(scope => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div> - -=====================================output===================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map((user) => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -); - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul> - {_.map(todos, (todo, i) => ( - <TodoItem key={i} {...todo} /> - ))} - </ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter((scope) => scope.value !== "") - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div>; - -================================================================================ -`; - -exports[`array-iter.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map(user => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -) - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter(scope => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div> - -=====================================output===================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map((user) => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -); - -const TodoList = ({ todos }) => ( - <div className='TodoList'> - <ul> - {_.map(todos, (todo, i) => ( - <TodoItem key={i} {...todo} /> - ))} - </ul> - </div> -); - -<div className='search-filter-chips'> - {scopes - .filter((scope) => scope.value !== "") - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div>; - -================================================================================ -`; - -exports[`array-iter.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map(user => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -) - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter(scope => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div> - -=====================================output===================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map((user) => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -); - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul> - {_.map(todos, (todo, i) => ( - <TodoItem key={i} {...todo} /> - ))} - </ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter((scope) => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div>; - -================================================================================ -`; - -exports[`array-iter.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map(user => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -) - -const TodoList = ({ todos }) => ( - <div className="TodoList"> - <ul>{_.map(todos, (todo, i) => <TodoItem key={i} {...todo} />)}</ul> - </div> -); - -<div className="search-filter-chips"> - {scopes - .filter(scope => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div> - -=====================================output===================================== -const UsersList = ({ users }) => ( - <section> - <h2>Users list</h2> - <ul> - {users.map((user) => ( - <li key={user.id}>{user.name}</li> - ))} - </ul> - </section> -); - -const TodoList = ({ todos }) => ( - <div className='TodoList'> - <ul> - {_.map(todos, (todo, i) => ( - <TodoItem key={i} {...todo} /> - ))} - </ul> - </div> -); - -<div className='search-filter-chips'> - {scopes - .filter((scope) => scope.value !== '') - .map((scope, i) => ( - <FilterChip - query={this.props.query} - onFilterChosen={this.onSearchScopeClicked} - key={i} - value={scope.value} - name={scope.name} - /> - ))} -</div>; - -================================================================================ -`; - -exports[`attr-comments.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<Component - propFn={ - // comment - function(arg) { - fn(arg); - } - } - propArrowFn={ - // comment - arg => fn(arg) - } - propArrowWithBreak={ - // comment - arg => - fn({ - makeItBreak - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -=====================================output===================================== -<Component - propFn={ - // comment - function (arg) { - fn(arg); - } - } - propArrowFn={ - // comment - (arg) => fn(arg) - } - propArrowWithBreak={ - // comment - (arg) => - fn({ - makeItBreak, - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -================================================================================ -`; - -exports[`attr-comments.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<Component - propFn={ - // comment - function(arg) { - fn(arg); - } - } - propArrowFn={ - // comment - arg => fn(arg) - } - propArrowWithBreak={ - // comment - arg => - fn({ - makeItBreak - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -=====================================output===================================== -<Component - propFn={ - // comment - function (arg) { - fn(arg); - } - } - propArrowFn={ - // comment - (arg) => fn(arg) - } - propArrowWithBreak={ - // comment - (arg) => - fn({ - makeItBreak, - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -================================================================================ -`; - -exports[`attr-comments.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<Component - propFn={ - // comment - function(arg) { - fn(arg); - } - } - propArrowFn={ - // comment - arg => fn(arg) - } - propArrowWithBreak={ - // comment - arg => - fn({ - makeItBreak - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -=====================================output===================================== -<Component - propFn={ - // comment - function (arg) { - fn(arg); - } - } - propArrowFn={ - // comment - (arg) => fn(arg) - } - propArrowWithBreak={ - // comment - (arg) => - fn({ - makeItBreak, - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -================================================================================ -`; - -exports[`attr-comments.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<Component - propFn={ - // comment - function(arg) { - fn(arg); - } - } - propArrowFn={ - // comment - arg => fn(arg) - } - propArrowWithBreak={ - // comment - arg => - fn({ - makeItBreak - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -=====================================output===================================== -<Component - propFn={ - // comment - function (arg) { - fn(arg); - } - } - propArrowFn={ - // comment - (arg) => fn(arg) - } - propArrowWithBreak={ - // comment - (arg) => - fn({ - makeItBreak, - }) - } - propArray={ - // comment - [el1, el2] - } - propObj={ - // comment - { key: val } - } - propTemplate={ - // comment - \`text\` - } -/>; - -================================================================================ -`; - -exports[`await.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -async function testFunction() { - const short = <> - {await Promise.all( - hierarchyCriticism - )} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all( - hierarchyCriticism - )} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - - const long = <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - </> - - const jsx = <> - {await (<IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate>)} - </> -} - -=====================================output===================================== -async function testFunction() { - const short = ( - <> - {await Promise.all(hierarchyCriticism)} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all(hierarchyCriticism)} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - ); - - const long = ( - <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - await hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - </> - ); - - const jsx = ( - <> - {await ( - <IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate> - )} - </> - ); -} - -================================================================================ -`; - -exports[`await.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -async function testFunction() { - const short = <> - {await Promise.all( - hierarchyCriticism - )} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all( - hierarchyCriticism - )} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - - const long = <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - </> - - const jsx = <> - {await (<IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate>)} - </> -} - -=====================================output===================================== -async function testFunction() { - const short = ( - <> - {await Promise.all(hierarchyCriticism)} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all(hierarchyCriticism)} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - ); - - const long = ( - <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - await hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - </> - ); - - const jsx = ( - <> - {await ( - <IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate> - )} - </> - ); -} - -================================================================================ -`; - -exports[`await.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -async function testFunction() { - const short = <> - {await Promise.all( - hierarchyCriticism - )} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all( - hierarchyCriticism - )} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - - const long = <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - </> - - const jsx = <> - {await (<IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate>)} - </> -} - -=====================================output===================================== -async function testFunction() { - const short = ( - <> - {await Promise.all(hierarchyCriticism)} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all(hierarchyCriticism)} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - ); - - const long = ( - <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - await hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - </> - ); - - const jsx = ( - <> - {await ( - <IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate> - )} - </> - ); -} - -================================================================================ -`; - -exports[`await.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -async function testFunction() { - const short = <> - {await Promise.all( - hierarchyCriticism - )} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all( - hierarchyCriticism - )} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - - const long = <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {await hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - {hierarchyCriticism.IncongruousCooperate.MaterialEducation.OriginalArticulate.Parameter} - {hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter} - </> - - const jsx = <> - {await (<IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate>)} - </> -} - -=====================================output===================================== -async function testFunction() { - const short = ( - <> - {await Promise.all(hierarchyCriticism)} - {await hierarchyCriticism.ic.me.oa.p} - {await hierarchyCriticism} - - {Promise.all(hierarchyCriticism)} - {hierarchyCriticism.ic.me.oa.p} - {hierarchyCriticism} - </> - ); - - const long = ( - <> - {await Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - await hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - await hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - - {Promise.all( - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - )} - { - hierarchyCriticism.IncongruousCooperate.MaterialEducation - .OriginalArticulate.Parameter - } - { - hierarchyCriticismIncongruousCooperateMaterialEducationOriginalArticulateParameter - } - </> - ); - - const jsx = ( - <> - {await ( - <IncongruousCooperate> - material education original articulate parameter - </IncongruousCooperate> - )} - </> - ); -} - -================================================================================ -`; - -exports[`conditional-expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div> - {a ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : -undefined - -=====================================output===================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div>{a ? "a" : b ? "b" : "c"}</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - ? "a" - : b - ? "b" - : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - "dunno" -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : ( - "dunno" -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? ( - <span> - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - </span> -) : undefined; - -================================================================================ -`; - -exports[`conditional-expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div> - {a ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : -undefined - -=====================================output===================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div>{a ? "a" : b ? "b" : "c"}</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - ? "a" - : b - ? "b" - : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id='c' /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - "dunno" -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : ( - "dunno" -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? ( - <span> - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - </span> -) : undefined; - -================================================================================ -`; - -exports[`conditional-expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div> - {a ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : -undefined - -=====================================output===================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? 'a' : 'b'; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : 'c'; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : 'a'; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : 'a'; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? 'a' : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> -</div> ? ( - 'jsx mode from element breaking' -) : ( - 'a' -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - 'a' -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - 'a' -) : ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div>{a ? 'a' : b ? 'b' : 'c'}</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - ? 'a' - : b - ? 'b' - : 'c'} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? 'satellite' : isPublic ? 'affairs' : network ? <span id="c" /> : 'dun'; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - 'satellite' -) : isPublic ? ( - 'affairs' -) : network ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - 'dunno' -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : sateline ? ( - 'public' -) : affairs ? ( - 'network' -) : ( - 'dunno' -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? ( - <span> - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - </span> -) : undefined; - -================================================================================ -`; - -exports[`conditional-expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? "a" : "b"; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : "a"; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : "a"; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? "a" : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> -</div> ? ( - "jsx mode from element breaking" -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : ( - "a" -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - "a" -) : ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div> - {a ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo ? "a" : b ? "b" : "c"} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? "satellite" : isPublic ? "affairs" : network ? <span id="c" /> : "dun"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - "satellite" -) : isPublic ? ( - "affairs" -) : network ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span>thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo</span> - </div> -) : sateline ? ( - "public" -) : affairs ? ( - "network" -) : "dunno"; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? <span>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx</span> : -undefined - -=====================================output===================================== -// There are two ways to print ConditionalExpressions: "normal mode" and -// "JSX mode". This is normal mode (when breaking): -// -// test -// ? consequent -// : alternate; -// -// And this is JSX mode (when breaking): -// -// test ? ( -// consequent -// ) : ( -// alternate -// ); -// -// When non-breaking, they look the same: -// -// test ? consequent : alternate; -// -// We only print a conditional expression in JSX mode if its test, -// consequent, or alternate are JSXElements. -// Otherwise, we print in normal mode. - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// The line does not break. -normalModeNonBreaking ? 'a' : 'b'; - -// This ConditionalExpression has no JSXElements so it prints in normal mode. -// Its consequent is very long, so it breaks out to multiple lines. -normalModeBreaking - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : 'c'; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is non-breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div /> ? jsxModeFromElementNonBreaking : 'a'; - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? <div /> : 'a'; - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is non-breaking. -jsxModeFromElementNonBreaking ? 'a' : <div />; - -// This ConditionalExpression prints in JSX mode because its test is a -// JSXElement. It is breaking. -// Note: I have never, ever seen someone use a JSXElement as the test in a -// ConditionalExpression. But this test is included for completeness. -<div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> -</div> ? ( - 'jsx mode from element breaking' -) : ( - 'a' -); - -// This ConditionalExpression prints in JSX mode because its consequent is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - 'a' -); - -// This ConditionalExpression prints in JSX mode because its alternate is a -// JSXElement. It is breaking. -jsxModeFromElementBreaking ? ( - 'a' -) : ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -); - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// non-breaking. -<div>{a ? 'a' : b ? 'b' : 'c'}</div>; - -// This chain of ConditionalExpressions prints in JSX mode because the parent of -// the outermost ConditionalExpression is a JSXExpressionContainer. It is -// breaking. -<div> - {thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - ? 'a' - : b - ? 'b' - : 'c'} -</div>; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is non-breaking. -cable ? 'satellite' : isPublic ? 'affairs' : network ? <span id='c' /> : 'dun'; - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the end). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - 'satellite' -) : isPublic ? ( - 'affairs' -) : network ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : ( - 'dunno' -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain (in this case, at the beginning). It is -// breaking; notice the consequents and alternates in the entire chain get -// wrapped in parens. -cable ? ( - <div> - <span> - thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo - </span> - </div> -) : sateline ? ( - 'public' -) : affairs ? ( - 'network' -) : ( - 'dunno' -); - -// This chain of ConditionalExpressions prints in JSX mode because there is a -// JSX element somewhere in the chain. It is breaking; notice the consequents -// and alternates in the entire chain get wrapped in parens. -<div> - {properties.length > 1 || - (properties.length === 1 && properties[0].apps.size > 1) ? ( - draggingApp == null || newPropertyName == null ? ( - <MigrationPropertyListItem /> - ) : ( - <MigrationPropertyListItem apps={Immutable.List()} /> - ) - ) : null} -</div>; - -// #3552 -foo ? ( - <span> - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - </span> -) : undefined; - -================================================================================ -`; - -exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<View - style={ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - } -/>; - -<View - style={ - [ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - ] - } -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map(item => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function() { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option)} - imageSize={this.props.veryBigItemImageSize} - imageView={this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option)} - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={ - <Child> - test - </Child> -}/>; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={data => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -/>; - -<BookingIntroPanel - logClick={data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -/>; - -<BookingIntroPanel> - {data => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -=====================================output===================================== -<View - style={{ - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true", - }} -/>; - -<View - style={[ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true", - }, - ]} -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map((item) => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function () { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={ - this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option) - } - imageSize={this.props.veryBigItemImageSize} - imageView={ - this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option) - } - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={<Child>test</Child>} />; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={(data) => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={(data) => - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ) - } -/>; - -<BookingIntroPanel - logClick={(data) => { - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ); - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -/>; - -<BookingIntroPanel> - {(data) => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => { - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ); - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -================================================================================ -`; - -exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<View - style={ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - } -/>; - -<View - style={ - [ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - ] - } -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map(item => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function() { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option)} - imageSize={this.props.veryBigItemImageSize} - imageView={this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option)} - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={ - <Child> - test - </Child> -}/>; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={data => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -/>; - -<BookingIntroPanel - logClick={data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -/>; - -<BookingIntroPanel> - {data => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -=====================================output===================================== -<View - style={{ - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true", - }} -/>; - -<View - style={[ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true", - }, - ]} -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map((item) => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function () { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={ - this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option) - } - imageSize={this.props.veryBigItemImageSize} - imageView={ - this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option) - } - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={<Child>test</Child>} />; - -<BookingIntroPanel - prop='long_string_make_to_force_break' - logClick={(data) => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={(data) => - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ) - } -/>; - -<BookingIntroPanel - logClick={(data) => { - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ); - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -/>; - -<BookingIntroPanel> - {(data) => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => { - doLogClick( - "long_name_long_name_long_name", - "long_name_long_name_long_name", - data - ); - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -================================================================================ -`; - -exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<View - style={ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - } -/>; - -<View - style={ - [ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - ] - } -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map(item => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function() { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option)} - imageSize={this.props.veryBigItemImageSize} - imageView={this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option)} - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={ - <Child> - test - </Child> -}/>; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={data => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -/>; - -<BookingIntroPanel - logClick={data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -/>; - -<BookingIntroPanel> - {data => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -=====================================output===================================== -<View - style={{ - someVeryLongStyle1: 'true', - someVeryLongStyle2: 'true', - someVeryLongStyle3: 'true', - someVeryLongStyle4: 'true', - }} -/>; - -<View - style={[ - { - someVeryLongStyle1: 'true', - someVeryLongStyle2: 'true', - someVeryLongStyle3: 'true', - someVeryLongStyle4: 'true', - }, - ]} -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map((item) => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function () { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={ - this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option) - } - imageSize={this.props.veryBigItemImageSize} - imageView={ - this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option) - } - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={<Child>test</Child>} />; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={(data) => doLogClick('short', 'short', data)} -/>; - -<BookingIntroPanel - logClick={(data) => - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ) - } -/>; - -<BookingIntroPanel - logClick={(data) => { - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ); - }} -/>; - -<Component - onChange={( - key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -/>; - -<BookingIntroPanel> - {(data) => doLogClick('short', 'short', data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => { - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ); - }} -</BookingIntroPanel>; - -<Component> - {( - key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: 'scroll' }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -================================================================================ -`; - -exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<View - style={ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - } -/>; - -<View - style={ - [ - { - someVeryLongStyle1: "true", - someVeryLongStyle2: "true", - someVeryLongStyle3: "true", - someVeryLongStyle4: "true" - } - ] - } -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map(item => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function() { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option)} - imageSize={this.props.veryBigItemImageSize} - imageView={this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option)} - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={ - <Child> - test - </Child> -}/>; - -<BookingIntroPanel - prop="long_string_make_to_force_break" - logClick={data => doLogClick("short", "short", data)} -/>; - -<BookingIntroPanel - logClick={data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -/>; - -<BookingIntroPanel - logClick={data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -/>; - -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -/>; - -<BookingIntroPanel> - {data => doLogClick("short", "short", data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {data => { - doLogClick("long_name_long_name_long_name", "long_name_long_name_long_name", data) - }} -</BookingIntroPanel>; - -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: "scroll" }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -=====================================output===================================== -<View - style={{ - someVeryLongStyle1: 'true', - someVeryLongStyle2: 'true', - someVeryLongStyle3: 'true', - someVeryLongStyle4: 'true', - }} -/>; - -<View - style={[ - { - someVeryLongStyle1: 'true', - someVeryLongStyle2: 'true', - someVeryLongStyle3: 'true', - someVeryLongStyle4: 'true', - }, - ]} -/>; - -<Something> - {() => ( - <SomethingElse> - <span /> - </SomethingElse> - )} -</Something>; - -<Something> - {items.map((item) => ( - <SomethingElse> - <span /> - </SomethingElse> - ))} -</Something>; - -<Something> - {function () { - return ( - <SomethingElse> - <span /> - </SomethingElse> - ); - }} -</Something>; - -<RadioListItem - key={option} - imageSource={ - this.props.veryBigItemImageSourceFunc && - this.props.veryBigItemImageSourceFunc(option) - } - imageSize={this.props.veryBigItemImageSize} - imageView={ - this.props.veryBigItemImageViewFunc && - this.props.veryBigItemImageViewFunc(option) - } - heading={this.props.displayTextFunc(option)} - value={option} -/>; - -<ParentComponent prop={<Child>test</Child>} />; - -<BookingIntroPanel - prop='long_string_make_to_force_break' - logClick={(data) => doLogClick('short', 'short', data)} -/>; - -<BookingIntroPanel - logClick={(data) => - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ) - } -/>; - -<BookingIntroPanel - logClick={(data) => { - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ); - }} -/>; - -<Component - onChange={( - key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -/>; - -<BookingIntroPanel> - {(data) => doLogClick('short', 'short', data)} -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ) - } -</BookingIntroPanel>; - -<BookingIntroPanel> - {(data) => { - doLogClick( - 'long_name_long_name_long_name', - 'long_name_long_name_long_name', - data - ); - }} -</BookingIntroPanel>; - -<Component> - {( - key: 'possible_key_1' | 'possible_key_2' | 'possible_key_3', - value: string | Immutable.List<string> - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value), - }); - }} -</Component>; - -<SuspendyTree> - <div style={{ height: 200, overflow: 'scroll' }}> - {Array(20) - .fill() - .map((_, i) => ( - <h2 key={i}>{i + 1}</h2> - ))} - </div> -</SuspendyTree>; - -================================================================================ -`; - -exports[`flow_fix_me.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo"> - Foo bar - </div> -); - -=====================================output===================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo">Foo bar</div> -); - -================================================================================ -`; - -exports[`flow_fix_me.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo"> - Foo bar - </div> -); - -=====================================output===================================== -const aDiv = ( - /* $FlowFixMe */ - <div className='foo'>Foo bar</div> -); - -================================================================================ -`; - -exports[`flow_fix_me.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo"> - Foo bar - </div> -); - -=====================================output===================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo">Foo bar</div> -); - -================================================================================ -`; - -exports[`flow_fix_me.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const aDiv = ( - /* $FlowFixMe */ - <div className="foo"> - Foo bar - </div> -); - -=====================================output===================================== -const aDiv = ( - /* $FlowFixMe */ - <div className='foo'>Foo bar</div> -); - -================================================================================ -`; - -exports[`html_escape.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -=====================================output===================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -================================================================================ -`; - -exports[`html_escape.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -=====================================output===================================== -export default () => <a href='https://foo.bar?q1=foo&q2=bar' />; - -() => <img src='https://bar.foo?param1=1&param2=2' />; - -================================================================================ -`; - -exports[`html_escape.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -=====================================output===================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -================================================================================ -`; - -exports[`html_escape.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -export default () => <a href="https://foo.bar?q1=foo&q2=bar" />; - -() => <img src="https://bar.foo?param1=1&param2=2" />; - -=====================================output===================================== -export default () => <a href='https://foo.bar?q1=foo&q2=bar' />; - -() => <img src='https://bar.foo?param1=1&param2=2' />; - -================================================================================ -`; - -exports[`hug.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div> - {__DEV__ - ? this.renderDevApp() - : <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {__DEV__ && <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div> - -=====================================output===================================== -<div> - {__DEV__ ? ( - this.renderDevApp() - ) : ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {__DEV__ && ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? "()" : "")} -</div>; - -================================================================================ -`; - -exports[`hug.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div> - {__DEV__ - ? this.renderDevApp() - : <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {__DEV__ && <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div> - -=====================================output===================================== -<div> - {__DEV__ ? ( - this.renderDevApp() - ) : ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {__DEV__ && ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? "()" : "")} -</div>; - -================================================================================ -`; - -exports[`hug.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div> - {__DEV__ - ? this.renderDevApp() - : <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {__DEV__ && <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div> - -=====================================output===================================== -<div> - {__DEV__ ? ( - this.renderDevApp() - ) : ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === '/'} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {__DEV__ && ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === '/'} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div>; - -================================================================================ -`; - -exports[`hug.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div> - {__DEV__ - ? this.renderDevApp() - : <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {__DEV__ && <div> - {routes.map(route => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === "/"} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div>} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div> - -=====================================output===================================== -<div> - {__DEV__ ? ( - this.renderDevApp() - ) : ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === '/'} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {__DEV__ && ( - <div> - {routes.map((route) => ( - <MatchAsync - key={\`\${route.to}-async\`} - pattern={route.to} - exactly={route.to === '/'} - getComponent={routeES6Modules[route.value]} - /> - ))} - </div> - )} -</div>; - -<div> - {member.memberName.memberSomething + - (member.memberDef.memberSomething.signatures ? '()' : '')} -</div>; - -================================================================================ -`; - -exports[`logical-expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div> - {a || "b"} -</div>; - -<div> - {a && "b"} -</div>; - -<div> - {a || <span></span>} -</div>; - -<div> - {a && <span></span>} -</div>; - -<div> - {a && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && b && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && <span> - <div> - <div></div> - </div> - </span>} -</div>; - -=====================================output===================================== -<div>{a || "b"}</div>; - -<div>{a && "b"}</div>; - -<div>{a || <span></span>}</div>; - -<div>{a && <span></span>}</div>; - -<div> - {a && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && b && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && ( - <span> - <div> - <div></div> - </div> - </span> - )} -</div>; - -================================================================================ -`; - -exports[`logical-expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div> - {a || "b"} -</div>; - -<div> - {a && "b"} -</div>; - -<div> - {a || <span></span>} -</div>; - -<div> - {a && <span></span>} -</div>; - -<div> - {a && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && b && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && <span> - <div> - <div></div> - </div> - </span>} -</div>; - -=====================================output===================================== -<div>{a || "b"}</div>; - -<div>{a && "b"}</div>; - -<div>{a || <span></span>}</div>; - -<div>{a && <span></span>}</div>; - -<div> - {a && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && b && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && ( - <span> - <div> - <div></div> - </div> - </span> - )} -</div>; - -================================================================================ -`; - -exports[`logical-expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div> - {a || "b"} -</div>; - -<div> - {a && "b"} -</div>; - -<div> - {a || <span></span>} -</div>; - -<div> - {a && <span></span>} -</div>; - -<div> - {a && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && b && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && <span> - <div> - <div></div> - </div> - </span>} -</div>; - -=====================================output===================================== -<div>{a || 'b'}</div>; - -<div>{a && 'b'}</div>; - -<div>{a || <span></span>}</div>; - -<div>{a && <span></span>}</div>; - -<div> - {a && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && b && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && ( - <span> - <div> - <div></div> - </div> - </span> - )} -</div>; - -================================================================================ -`; - -exports[`logical-expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div> - {a || "b"} -</div>; - -<div> - {a && "b"} -</div>; - -<div> - {a || <span></span>} -</div>; - -<div> - {a && <span></span>} -</div>; - -<div> - {a && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && b && <span>make this text just so long enough to break this to the next line</span>} -</div>; - -<div> - {a && <span> - <div> - <div></div> - </div> - </span>} -</div>; - -=====================================output===================================== -<div>{a || 'b'}</div>; - -<div>{a && 'b'}</div>; - -<div>{a || <span></span>}</div>; - -<div>{a && <span></span>}</div>; - -<div> - {a && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && b && ( - <span> - make this text just so long enough to break this to the next line - </span> - )} -</div>; - -<div> - {a && ( - <span> - <div> - <div></div> - </div> - </span> - )} -</div>; - -================================================================================ -`; - -exports[`object-property.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={ onSave } - onCancel={ onCancel } - countries={ countries } - /> - ) - } -]; - -=====================================output===================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={onSave} - onCancel={onCancel} - countries={countries} - /> - ), - }, -]; - -================================================================================ -`; - -exports[`object-property.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={ onSave } - onCancel={ onCancel } - countries={ countries } - /> - ) - } -]; - -=====================================output===================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute='i-need-long-value-here' - onSave={onSave} - onCancel={onCancel} - countries={countries} - /> - ), - }, -]; - -================================================================================ -`; - -exports[`object-property.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={ onSave } - onCancel={ onCancel } - countries={ countries } - /> - ) - } -]; - -=====================================output===================================== -const tabs = [ - { - title: 'General Info', - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={onSave} - onCancel={onCancel} - countries={countries} - /> - ), - }, -]; - -================================================================================ -`; - -exports[`object-property.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const tabs = [ - { - title: "General Info", - content: ( - <GeneralForm - long-attribute="i-need-long-value-here" - onSave={ onSave } - onCancel={ onCancel } - countries={ countries } - /> - ) - } -]; - -=====================================output===================================== -const tabs = [ - { - title: 'General Info', - content: ( - <GeneralForm - long-attribute='i-need-long-value-here' - onSave={onSave} - onCancel={onCancel} - countries={countries} - /> - ), - }, -]; - -================================================================================ -`; - -exports[`open-break.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<td -onClick={() => { - a -}}>{header}{showSort}</td>; - -<td -onClick={() => { - a -}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -=====================================output===================================== -<td - onClick={() => { - a; - }} -> - {header} - {showSort} -</td>; - -<td - onClick={() => { - a; - }} -> - {header} - <showSort attr="long long long long long long long long long long long" /> -</td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -================================================================================ -`; - -exports[`open-break.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<td -onClick={() => { - a -}}>{header}{showSort}</td>; - -<td -onClick={() => { - a -}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -=====================================output===================================== -<td - onClick={() => { - a; - }} -> - {header} - {showSort} -</td>; - -<td - onClick={() => { - a; - }} -> - {header} - <showSort attr='long long long long long long long long long long long' /> -</td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -================================================================================ -`; - -exports[`open-break.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<td -onClick={() => { - a -}}>{header}{showSort}</td>; - -<td -onClick={() => { - a -}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -=====================================output===================================== -<td - onClick={() => { - a; - }} -> - {header} - {showSort} -</td>; - -<td - onClick={() => { - a; - }} -> - {header} - <showSort attr="long long long long long long long long long long long" /> -</td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -================================================================================ -`; - -exports[`open-break.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<td -onClick={() => { - a -}}>{header}{showSort}</td>; - -<td -onClick={() => { - a -}}>{header}<showSort attr="long long long long long long long long long long long"/></td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -=====================================output===================================== -<td - onClick={() => { - a; - }} -> - {header} - {showSort} -</td>; - -<td - onClick={() => { - a; - }} -> - {header} - <showSort attr='long long long long long long long long long long long' /> -</td>; - -<Foo>{\` a very long text that does not break \`}</Foo>; - -================================================================================ -`; - -exports[`parens.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...((foo || foo === null) ? {foo} : null)} /> - -f?.(<div/>); -(<div/>)(); -(<div/>)?.(); - -new Foo(<Component/>); -new Foo((<Component/>)) - -=====================================output===================================== -a = [ - <path - key="0" - d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," - />, - <path - key="1" - d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," - />, -]; - -<div {...(foo || foo === null ? { foo } : null)} />; - -f?.(<div />); -(<div />)(); -(<div />)?.(); - -new Foo(<Component />); -new Foo(<Component />); - -================================================================================ -`; - -exports[`parens.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...((foo || foo === null) ? {foo} : null)} /> - -f?.(<div/>); -(<div/>)(); -(<div/>)?.(); - -new Foo(<Component/>); -new Foo((<Component/>)) - -=====================================output===================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...(foo || foo === null ? { foo } : null)} />; - -f?.(<div />); -(<div />)(); -(<div />)?.(); - -new Foo(<Component />); -new Foo(<Component />); - -================================================================================ -`; - -exports[`parens.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...((foo || foo === null) ? {foo} : null)} /> - -f?.(<div/>); -(<div/>)(); -(<div/>)?.(); - -new Foo(<Component/>); -new Foo((<Component/>)) - -=====================================output===================================== -a = [ - <path - key="0" - d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," - />, - <path - key="1" - d="M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5," - />, -]; - -<div {...(foo || foo === null ? { foo } : null)} />; - -f?.(<div />); -(<div />)(); -(<div />)?.(); - -new Foo(<Component />); -new Foo(<Component />); - -================================================================================ -`; - -exports[`parens.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...((foo || foo === null) ? {foo} : null)} /> - -f?.(<div/>); -(<div/>)(); -(<div/>)?.(); - -new Foo(<Component/>); -new Foo((<Component/>)) - -=====================================output===================================== -a = [ - <path - key='0' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, - <path - key='1' - d='M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,M13.6,10.6l,4-2.8L9.5,' - />, -]; - -<div {...(foo || foo === null ? { foo } : null)} />; - -f?.(<div />); -(<div />)(); -(<div />)?.(); - -new Foo(<Component />); -new Foo(<Component />); - -================================================================================ -`; - -exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id='123' />; -<div id='&#39;&quot;' />; -<div id={'\\'\\"\\\\\\''} />; -<div - single='foo' - single2={'foo'} - - double="bar" - double2={"bar"} - - singleDouble='"' - singleDouble2={'"'} - - doubleSingle="'" - doubleSingle2={"'"} - - singleEscaped={'\\''} - singleEscaped2='&apos;' - - doubleEscaped={"\\""} - doubleEscaped2="&quot;" - - singleBothEscaped={'\\'"'} - singleBothEscaped2='&apos;"' - - singleBoth='&apos; "' - singleBoth2={'\\' "'} - singleBoth3='&apos; &apos; "' - - doubleBoth="&quot; '" - doubleBoth2={"\\" '"} - doubleBoth3="&quot; &apos; '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p> - -=====================================output===================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={"'\\"&quot;<>&amp;quot;"} />; -<div id="123" />; -<div id='&#39;"' />; -<div id={"'\\"\\\\'"} />; -<div - single="foo" - single2={"foo"} - double="bar" - double2={"bar"} - singleDouble='"' - singleDouble2={'"'} - doubleSingle="'" - doubleSingle2={"'"} - singleEscaped={"'"} - singleEscaped2="'" - doubleEscaped={'"'} - doubleEscaped2='"' - singleBothEscaped={"'\\""} - singleBothEscaped2="'&quot;" - singleBoth="' &quot;" - singleBoth2={"' \\""} - singleBoth3="' ' &quot;" - doubleBoth="&quot; '" - doubleBoth2={"\\" '"} - doubleBoth3="&quot; ' '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "} -</p>; - -================================================================================ -`; - -exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id='123' />; -<div id='&#39;&quot;' />; -<div id={'\\'\\"\\\\\\''} />; -<div - single='foo' - single2={'foo'} - - double="bar" - double2={"bar"} - - singleDouble='"' - singleDouble2={'"'} - - doubleSingle="'" - doubleSingle2={"'"} - - singleEscaped={'\\''} - singleEscaped2='&apos;' - - doubleEscaped={"\\""} - doubleEscaped2="&quot;" - - singleBothEscaped={'\\'"'} - singleBothEscaped2='&apos;"' - - singleBoth='&apos; "' - singleBoth2={'\\' "'} - singleBoth3='&apos; &apos; "' - - doubleBoth="&quot; '" - doubleBoth2={"\\" '"} - doubleBoth3="&quot; &apos; '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p> - -=====================================output===================================== -<div id='"&apos;<>&amp;quot;' />; -<div id='"&#39;<>&amp;quot;' />; -<div id={"'\\"&quot;<>&amp;quot;"} />; -<div id='123' />; -<div id='&#39;"' />; -<div id={"'\\"\\\\'"} />; -<div - single='foo' - single2={"foo"} - double='bar' - double2={"bar"} - singleDouble='"' - singleDouble2={'"'} - doubleSingle="'" - doubleSingle2={"'"} - singleEscaped={"'"} - singleEscaped2="'" - doubleEscaped={'"'} - doubleEscaped2='"' - singleBothEscaped={"'\\""} - singleBothEscaped2='&apos;"' - singleBoth='&apos; "' - singleBoth2={"' \\""} - singleBoth3="' ' &quot;" - doubleBoth='" &apos;' - doubleBoth2={"\\" '"} - doubleBoth3="&quot; ' '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "} -</p>; - -================================================================================ -`; - -exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id='123' />; -<div id='&#39;&quot;' />; -<div id={'\\'\\"\\\\\\''} />; -<div - single='foo' - single2={'foo'} - - double="bar" - double2={"bar"} - - singleDouble='"' - singleDouble2={'"'} - - doubleSingle="'" - doubleSingle2={"'"} - - singleEscaped={'\\''} - singleEscaped2='&apos;' - - doubleEscaped={"\\""} - doubleEscaped2="&quot;" - - singleBothEscaped={'\\'"'} - singleBothEscaped2='&apos;"' - - singleBoth='&apos; "' - singleBoth2={'\\' "'} - singleBoth3='&apos; &apos; "' - - doubleBoth="&quot; '" - doubleBoth2={"\\" '"} - doubleBoth3="&quot; &apos; '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p> - -=====================================output===================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id="123" />; -<div id='&#39;"' />; -<div id={"'\\"\\\\'"} />; -<div - single="foo" - single2={'foo'} - double="bar" - double2={'bar'} - singleDouble='"' - singleDouble2={'"'} - doubleSingle="'" - doubleSingle2={"'"} - singleEscaped={"'"} - singleEscaped2="'" - doubleEscaped={'"'} - doubleEscaped2='"' - singleBothEscaped={'\\'"'} - singleBothEscaped2="'&quot;" - singleBoth="' &quot;" - singleBoth2={'\\' "'} - singleBoth3="' ' &quot;" - doubleBoth="&quot; '" - doubleBoth2={'" \\''} - doubleBoth3="&quot; ' '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p>; - -================================================================================ -`; - -exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<div id="&quot;'<>&amp;quot;" />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id='123' />; -<div id='&#39;&quot;' />; -<div id={'\\'\\"\\\\\\''} />; -<div - single='foo' - single2={'foo'} - - double="bar" - double2={"bar"} - - singleDouble='"' - singleDouble2={'"'} - - doubleSingle="'" - doubleSingle2={"'"} - - singleEscaped={'\\''} - singleEscaped2='&apos;' - - doubleEscaped={"\\""} - doubleEscaped2="&quot;" - - singleBothEscaped={'\\'"'} - singleBothEscaped2='&apos;"' - - singleBoth='&apos; "' - singleBoth2={'\\' "'} - singleBoth3='&apos; &apos; "' - - doubleBoth="&quot; '" - doubleBoth2={"\\" '"} - doubleBoth3="&quot; &apos; '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p> - -=====================================output===================================== -<div id='"&apos;<>&amp;quot;' />; -<div id='"&#39;<>&amp;quot;' />; -<div id={'\\'"&quot;<>&amp;quot;'} />; -<div id='123' />; -<div id='&#39;"' />; -<div id={"'\\"\\\\'"} />; -<div - single='foo' - single2={'foo'} - double='bar' - double2={'bar'} - singleDouble='"' - singleDouble2={'"'} - doubleSingle="'" - doubleSingle2={"'"} - singleEscaped={"'"} - singleEscaped2="'" - doubleEscaped={'"'} - doubleEscaped2='"' - singleBothEscaped={'\\'"'} - singleBothEscaped2='&apos;"' - singleBoth='&apos; "' - singleBoth2={'\\' "'} - singleBoth3="' ' &quot;" - doubleBoth='" &apos;' - doubleBoth2={'" \\''} - doubleBoth3="&quot; ' '" -/>; - -<p> - GitHub Desktop has encountered an unrecoverable error and will need to 1231231 - restart. This has been reported to the team, but if youencounter this121312331 - repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '} -</p>; - -================================================================================ -`; - -exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -x = <div>one</div>, <div>two</div>; -x = <a>{}</a> -x = <a>{1/2}</a> -x = <a>{/w/.test(s)}</a> - -=====================================output===================================== -(x = <div>one</div>), (<div>two</div>); -x = <a>{}</a>; -x = <a>{1 / 2}</a>; -x = <a>{/w/.test(s)}</a>; - -================================================================================ -`; - -exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -x = <div>one</div>, <div>two</div>; -x = <a>{}</a> -x = <a>{1/2}</a> -x = <a>{/w/.test(s)}</a> - -=====================================output===================================== -(x = <div>one</div>), (<div>two</div>); -x = <a>{}</a>; -x = <a>{1 / 2}</a>; -x = <a>{/w/.test(s)}</a>; - -================================================================================ -`; - -exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -x = <div>one</div>, <div>two</div>; -x = <a>{}</a> -x = <a>{1/2}</a> -x = <a>{/w/.test(s)}</a> - -=====================================output===================================== -(x = <div>one</div>), (<div>two</div>); -x = <a>{}</a>; -x = <a>{1 / 2}</a>; -x = <a>{/w/.test(s)}</a>; - -================================================================================ -`; - -exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -x = <div>one</div>, <div>two</div>; -x = <a>{}</a> -x = <a>{1/2}</a> -x = <a>{/w/.test(s)}</a> - -=====================================output===================================== -(x = <div>one</div>), (<div>two</div>); -x = <a>{}</a>; -x = <a>{1 / 2}</a>; -x = <a>{/w/.test(s)}</a>; - -================================================================================ -`; - -exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => <div> - <div> - bla bla bla - </div> -</div>; - -const NonBreakingArrowExpressionWBody = () => { - return ( - <div /> - ); -}; - -const BreakingArrowExpressionWBody = () => { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -const NonBreakingFunction = function() { - return ( - <div /> - ); -}; - -const BreakingFunction = function() { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -class NonBreakingClass extends React.component { - render() { - return ( - <div /> - ); - } -} - -class BreakingClass extends React.component { - render() { - return <div> - <div> - bla bla bla - </div> - </div>; - } -} - -=====================================output===================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => ( - <div> - <div>bla bla bla</div> - </div> -); - -const NonBreakingArrowExpressionWBody = () => { - return <div />; -}; - -const BreakingArrowExpressionWBody = () => { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -const NonBreakingFunction = function () { - return <div />; -}; - -const BreakingFunction = function () { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -class NonBreakingClass extends React.component { - render() { - return <div />; - } -} - -class BreakingClass extends React.component { - render() { - return ( - <div> - <div>bla bla bla</div> - </div> - ); - } -} - -================================================================================ -`; - -exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => <div> - <div> - bla bla bla - </div> -</div>; - -const NonBreakingArrowExpressionWBody = () => { - return ( - <div /> - ); -}; - -const BreakingArrowExpressionWBody = () => { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -const NonBreakingFunction = function() { - return ( - <div /> - ); -}; - -const BreakingFunction = function() { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -class NonBreakingClass extends React.component { - render() { - return ( - <div /> - ); - } -} - -class BreakingClass extends React.component { - render() { - return <div> - <div> - bla bla bla - </div> - </div>; - } -} - -=====================================output===================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => ( - <div> - <div>bla bla bla</div> - </div> -); - -const NonBreakingArrowExpressionWBody = () => { - return <div />; -}; - -const BreakingArrowExpressionWBody = () => { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -const NonBreakingFunction = function () { - return <div />; -}; - -const BreakingFunction = function () { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -class NonBreakingClass extends React.component { - render() { - return <div />; - } -} - -class BreakingClass extends React.component { - render() { - return ( - <div> - <div>bla bla bla</div> - </div> - ); - } -} - -================================================================================ -`; - -exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => <div> - <div> - bla bla bla - </div> -</div>; - -const NonBreakingArrowExpressionWBody = () => { - return ( - <div /> - ); -}; - -const BreakingArrowExpressionWBody = () => { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -const NonBreakingFunction = function() { - return ( - <div /> - ); -}; - -const BreakingFunction = function() { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -class NonBreakingClass extends React.component { - render() { - return ( - <div /> - ); - } -} - -class BreakingClass extends React.component { - render() { - return <div> - <div> - bla bla bla - </div> - </div>; - } -} - -=====================================output===================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => ( - <div> - <div>bla bla bla</div> - </div> -); - -const NonBreakingArrowExpressionWBody = () => { - return <div />; -}; - -const BreakingArrowExpressionWBody = () => { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -const NonBreakingFunction = function () { - return <div />; -}; - -const BreakingFunction = function () { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -class NonBreakingClass extends React.component { - render() { - return <div />; - } -} - -class BreakingClass extends React.component { - render() { - return ( - <div> - <div>bla bla bla</div> - </div> - ); - } -} - -================================================================================ -`; - -exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => <div> - <div> - bla bla bla - </div> -</div>; - -const NonBreakingArrowExpressionWBody = () => { - return ( - <div /> - ); -}; - -const BreakingArrowExpressionWBody = () => { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -const NonBreakingFunction = function() { - return ( - <div /> - ); -}; - -const BreakingFunction = function() { - return <div> - <div> - bla bla bla - </div> - </div> -}; - -class NonBreakingClass extends React.component { - render() { - return ( - <div /> - ); - } -} - -class BreakingClass extends React.component { - render() { - return <div> - <div> - bla bla bla - </div> - </div>; - } -} - -=====================================output===================================== -const NonBreakingArrowExpression = () => <div />; - -const BreakingArrowExpression = () => ( - <div> - <div>bla bla bla</div> - </div> -); - -const NonBreakingArrowExpressionWBody = () => { - return <div />; -}; - -const BreakingArrowExpressionWBody = () => { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -const NonBreakingFunction = function () { - return <div />; -}; - -const BreakingFunction = function () { - return ( - <div> - <div>bla bla bla</div> - </div> - ); -}; - -class NonBreakingClass extends React.component { - render() { - return <div />; - } -} - -class BreakingClass extends React.component { - render() { - return ( - <div> - <div>bla bla bla</div> - </div> - ); - } -} - -================================================================================ -`; - -exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<Foo></Foo>; -<Bar />; - -=====================================output===================================== -<Foo></Foo>; -<Bar />; - -================================================================================ -`; - -exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -<Foo></Foo>; -<Bar />; - -=====================================output===================================== -<Foo></Foo>; -<Bar />; - -================================================================================ -`; - -exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<Foo></Foo>; -<Bar />; - -=====================================output===================================== -<Foo></Foo>; -<Bar />; - -================================================================================ -`; - -exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -<Foo></Foo>; -<Bar />; - -=====================================output===================================== -<Foo></Foo>; -<Bar />; - -================================================================================ -`; - -exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const Labels = { - label1: ( - <fbt> - Label 1 - </fbt> - ), - - label2: ( - <fbt> - Label 2 - </fbt> - ), - - label3: ( - <fbt> - Label 3 - </fbt> - ), -}; - -=====================================output===================================== -const Labels = { - label1: <fbt>Label 1</fbt>, - - label2: <fbt>Label 2</fbt>, - - label3: <fbt>Label 3</fbt>, -}; - -================================================================================ -`; - -exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -const Labels = { - label1: ( - <fbt> - Label 1 - </fbt> - ), - - label2: ( - <fbt> - Label 2 - </fbt> - ), - - label3: ( - <fbt> - Label 3 - </fbt> - ), -}; - -=====================================output===================================== -const Labels = { - label1: <fbt>Label 1</fbt>, - - label2: <fbt>Label 2</fbt>, - - label3: <fbt>Label 3</fbt>, -}; - -================================================================================ -`; - -exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const Labels = { - label1: ( - <fbt> - Label 1 - </fbt> - ), - - label2: ( - <fbt> - Label 2 - </fbt> - ), - - label3: ( - <fbt> - Label 3 - </fbt> - ), -}; - -=====================================output===================================== -const Labels = { - label1: <fbt>Label 1</fbt>, - - label2: <fbt>Label 2</fbt>, - - label3: <fbt>Label 3</fbt>, -}; - -================================================================================ -`; - -exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -const Labels = { - label1: ( - <fbt> - Label 1 - </fbt> - ), - - label2: ( - <fbt> - Label 2 - </fbt> - ), - - label3: ( - <fbt> - Label 3 - </fbt> - ), -}; - -=====================================output===================================== -const Labels = { - label1: <fbt>Label 1</fbt>, - - label2: <fbt>Label 2</fbt>, - - label3: <fbt>Label 3</fbt>, -}; - -================================================================================ -`; - -exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== - <div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - >foo</div> -</div> -</div> - -=====================================output===================================== -<div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - > - foo - </div> - </div> -</div>; - -================================================================================ -`; - -exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== - <div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - >foo</div> -</div> -</div> - -=====================================output===================================== -<div> - <div> - <div - className='js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button' - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - > - foo - </div> - </div> -</div>; - -================================================================================ -`; - -exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== - <div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - >foo</div> -</div> -</div> - -=====================================output===================================== -<div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - > - foo - </div> - </div> -</div>; - -================================================================================ -`; - -exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== - <div> - <div> - <div - className="js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button" - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - >foo</div> -</div> -</div> - -=====================================output===================================== -<div> - <div> - <div - className='js-structured-feedback js-trigger-feedback-negative-reasons item-feedback-button' - data-feedback-tags-url={\`/xhr/negative-feedback-tags/\${this.props.item.id}\`} - > - foo - </div> - </div> -</div>; - -================================================================================ -`; - -exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -=====================================output===================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -================================================================================ -`; - -exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: false - | printWidth -=====================================input====================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -=====================================output===================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -================================================================================ -`; - -exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = ` -====================================options===================================== -jsxSingleQuote: false -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -=====================================output===================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -================================================================================ -`; - -exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = ` -====================================options===================================== -jsxSingleQuote: true -parsers: ["flow", "babel", "typescript"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -=====================================output===================================== -a == 3 ? (a = <h1>123</h1>) : (a = <h1>abc</h1>); - -================================================================================ -`; diff --git a/tests/format/jsx/jsx/arrow.js b/tests/format/jsx/jsx/arrow.js new file mode 100644 index 000000000000..25d771dec9c0 --- /dev/null +++ b/tests/format/jsx/jsx/arrow.js @@ -0,0 +1,21 @@ +() => <Component><Children/></Component>; +() => () => <Component><Children/></Component>; +() => () => () => <Component><Children/></Component>; + +() => <div>Some text here</div>; +() => () => <div>Some text here</div>; +() => () => () => <div>Some text here</div>; + +() => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; +() => () => () => <div>Long long long long long, very very long text. And more text. Another text.</div>; + +<Prettier> + {We => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; +<Prettier> + {We => love => currying => 'The purple monkey danced with a tambourine made of cheese.' + 'The robot chef cooked a cake that tasted like rainbows.' + 'The talking pineapple sang a lullaby to the sleepy giraffe.'} +</Prettier>; diff --git a/tests/format/jsx/jsx/expression.js b/tests/format/jsx/jsx/expression.js index 0232f42fd99e..55ef3acafb0a 100644 --- a/tests/format/jsx/jsx/expression.js +++ b/tests/format/jsx/jsx/expression.js @@ -82,17 +82,6 @@ }} />; -<Component - onChange={( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -/>; - <BookingIntroPanel> {data => doLogClick("short", "short", data)} </BookingIntroPanel>; @@ -109,17 +98,6 @@ }} </BookingIntroPanel>; -<Component> - {( - key: "possible_key_1" | "possible_key_2" | "possible_key_3", - value: string | Immutable.List<string>, - ) => { - this.setState({ - updatedTask: this.state.updatedTask.set(key, value) - }); - }} -</Component>; - <SuspendyTree> <div style={{ height: 200, overflow: "scroll" }}> {Array(20) diff --git a/tests/format/jsx/jsx/format.test.js b/tests/format/jsx/jsx/format.test.js new file mode 100644 index 000000000000..9076b1007e47 --- /dev/null +++ b/tests/format/jsx/jsx/format.test.js @@ -0,0 +1,16 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + singleQuote: false, + jsxSingleQuote: false, +}); +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + singleQuote: false, + jsxSingleQuote: true, +}); +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + singleQuote: true, + jsxSingleQuote: false, +}); +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + singleQuote: true, + jsxSingleQuote: true, +}); diff --git a/tests/format/jsx/jsx/jsfmt.spec.js b/tests/format/jsx/jsx/jsfmt.spec.js deleted file mode 100644 index f864fc536725..000000000000 --- a/tests/format/jsx/jsx/jsfmt.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"], { - singleQuote: false, - jsxSingleQuote: false, -}); -run_spec(__dirname, ["flow", "babel", "typescript"], { - singleQuote: false, - jsxSingleQuote: true, -}); -run_spec(__dirname, ["flow", "babel", "typescript"], { - singleQuote: true, - jsxSingleQuote: false, -}); -run_spec(__dirname, ["flow", "babel", "typescript"], { - singleQuote: true, - jsxSingleQuote: true, -}); diff --git a/tests/format/jsx/last-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/last-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/last-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/last-line/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/last-line/format.test.js b/tests/format/jsx/last-line/format.test.js new file mode 100644 index 000000000000..733ae2222b1b --- /dev/null +++ b/tests/format/jsx/last-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["flow", "typescript"], { bracketSameLine: true }); +runFormatTest(import.meta, ["flow", "typescript"], { bracketSameLine: false }); diff --git a/tests/format/jsx/last-line/jsfmt.spec.js b/tests/format/jsx/last-line/jsfmt.spec.js deleted file mode 100644 index dc0c7e6d78b0..000000000000 --- a/tests/format/jsx/last-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["flow", "typescript"], { bracketSameLine: true }); -run_spec(__dirname, ["flow", "typescript"], { bracketSameLine: false }); diff --git a/tests/format/jsx/multiline-assign/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/multiline-assign/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/multiline-assign/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/multiline-assign/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/multiline-assign/format.test.js b/tests/format/jsx/multiline-assign/format.test.js new file mode 100644 index 000000000000..fa7a31c030ec --- /dev/null +++ b/tests/format/jsx/multiline-assign/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "typescript"]); diff --git a/tests/format/jsx/multiline-assign/jsfmt.spec.js b/tests/format/jsx/multiline-assign/jsfmt.spec.js deleted file mode 100644 index a842e1348721..000000000000 --- a/tests/format/jsx/multiline-assign/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "typescript"]); diff --git a/tests/format/jsx/namespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/namespace/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/namespace/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/namespace/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/namespace/format.test.js b/tests/format/jsx/namespace/format.test.js new file mode 100644 index 000000000000..8af8c3b6195e --- /dev/null +++ b/tests/format/jsx/namespace/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel"]); diff --git a/tests/format/jsx/namespace/jsfmt.spec.js b/tests/format/jsx/namespace/jsfmt.spec.js deleted file mode 100644 index fbfa6501a049..000000000000 --- a/tests/format/jsx/namespace/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel"]); diff --git a/tests/format/jsx/newlines/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/newlines/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/newlines/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/newlines/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/newlines/format.test.js b/tests/format/jsx/newlines/format.test.js new file mode 100644 index 000000000000..f80c543f92ec --- /dev/null +++ b/tests/format/jsx/newlines/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/newlines/jsfmt.spec.js b/tests/format/jsx/newlines/jsfmt.spec.js deleted file mode 100644 index 71f32a0eabe8..000000000000 --- a/tests/format/jsx/newlines/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/optional-chaining/__snapshots__/format.test.js.snap b/tests/format/jsx/optional-chaining/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..770ab4b71e18 --- /dev/null +++ b/tests/format/jsx/optional-chaining/__snapshots__/format.test.js.snap @@ -0,0 +1,125 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`optional-chaining.jsx format 1`] = ` +====================================options===================================== +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + // https://github.com/marmelab/react-admin/blob/5ae855aa958ba54438b144bf0907b1437c5a5d77/examples/demo/src/orders/Totals.tsx#L38-L43 + return ( + <TableCell className={classes.rightAlignedCell}> + {record?.delivery_fees.toLocaleString(undefined, { + style: 'currency', + currency: 'USD', + })} + </TableCell> + ) +} + +function Component( ) { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?.bbbbbbbbbbbbbbbbbbbbbbbbb.map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?.bbbbbbbbbbbbbbbbbbbbbbbbb().map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa?.aaa()?.aaa()?.map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa?.aaa?.()?.aaa?.()?.map?.( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +=====================================output===================================== +function foo() { + // https://github.com/marmelab/react-admin/blob/5ae855aa958ba54438b144bf0907b1437c5a5d77/examples/demo/src/orders/Totals.tsx#L38-L43 + return ( + <TableCell className={classes.rightAlignedCell}> + {record?.delivery_fees.toLocaleString(undefined, { + style: "currency", + currency: "USD", + })} + </TableCell> + ); +} + +function Component() { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?.bbbbbbbbbbbbbbbbbbbbbbbbb.map( + (p, i) => ( + <p key={i}>{p}</p> + ), + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ?.bbbbbbbbbbbbbbbbbbbbbbbbb() + .map((p, i) => ( + <p key={i}>{p}</p> + ))} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa + ?.aaa() + ?.aaa() + ?.map((p, i) => ( + <p key={i}>{p}</p> + ))} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa + ?.aaa?.() + ?.aaa?.() + ?.map?.((p, i) => ( + <p key={i}>{p}</p> + ))} + </div> + ); +} + +================================================================================ +`; diff --git a/tests/format/jsx/optional-chaining/format.test.js b/tests/format/jsx/optional-chaining/format.test.js new file mode 100644 index 000000000000..f80c543f92ec --- /dev/null +++ b/tests/format/jsx/optional-chaining/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/optional-chaining/optional-chaining.jsx b/tests/format/jsx/optional-chaining/optional-chaining.jsx new file mode 100644 index 000000000000..6b59a8bc1bf8 --- /dev/null +++ b/tests/format/jsx/optional-chaining/optional-chaining.jsx @@ -0,0 +1,51 @@ +function foo() { + // https://github.com/marmelab/react-admin/blob/5ae855aa958ba54438b144bf0907b1437c5a5d77/examples/demo/src/orders/Totals.tsx#L38-L43 + return ( + <TableCell className={classes.rightAlignedCell}> + {record?.delivery_fees.toLocaleString(undefined, { + style: 'currency', + currency: 'USD', + })} + </TableCell> + ) +} + +function Component( ) { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?.bbbbbbbbbbbbbbbbbbbbbbbbb.map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?.bbbbbbbbbbbbbbbbbbbbbbbbb().map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa?.aaa()?.aaa()?.map( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} + +function Component() { + return ( + <div> + {aaa?.aaa?.()?.aaa?.()?.map?.( + (p, i) => <p key={i}>{p}</p> + )} + </div> + ); +} diff --git a/tests/format/jsx/significant-space/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/significant-space/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/significant-space/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/significant-space/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/significant-space/format.test.js b/tests/format/jsx/significant-space/format.test.js new file mode 100644 index 000000000000..fa7a31c030ec --- /dev/null +++ b/tests/format/jsx/significant-space/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "typescript"]); diff --git a/tests/format/jsx/significant-space/jsfmt.spec.js b/tests/format/jsx/significant-space/jsfmt.spec.js deleted file mode 100644 index a842e1348721..000000000000 --- a/tests/format/jsx/significant-space/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "typescript"]); diff --git a/tests/format/jsx/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/single-attribute-per-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/single-attribute-per-line/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/single-attribute-per-line/format.test.js b/tests/format/jsx/single-attribute-per-line/format.test.js new file mode 100644 index 000000000000..fcc17a3a2eac --- /dev/null +++ b/tests/format/jsx/single-attribute-per-line/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + singleAttributePerLine: true, +}); diff --git a/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js b/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js deleted file mode 100644 index 3e9547859d72..000000000000 --- a/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"]); -run_spec(__dirname, ["flow", "babel", "typescript"], { - singleAttributePerLine: true, -}); diff --git a/tests/format/jsx/split-attrs/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/split-attrs/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/split-attrs/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/split-attrs/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/split-attrs/format.test.js b/tests/format/jsx/split-attrs/format.test.js new file mode 100644 index 000000000000..f80c543f92ec --- /dev/null +++ b/tests/format/jsx/split-attrs/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/split-attrs/jsfmt.spec.js b/tests/format/jsx/split-attrs/jsfmt.spec.js deleted file mode 100644 index 71f32a0eabe8..000000000000 --- a/tests/format/jsx/split-attrs/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"]); diff --git a/tests/format/jsx/spread/__snapshots__/format.test.js.snap b/tests/format/jsx/spread/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6aaa9bb12717 --- /dev/null +++ b/tests/format/jsx/spread/__snapshots__/format.test.js.snap @@ -0,0 +1,159 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`attribute.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div {...a}/>; + +<div {...(a || {})} />; + +<div {...(cond ? foo : bar)} />; + +<div {...a /* comment */}/>; + +<div {/* comment */...a}/>; + +<div {...a //comment +}/>; + +<div {...a + //comment +}/>; + +<div { + //comment + ...a +}/>; + +<div {//comment + ...a // comment +}/>; + +=====================================output===================================== +<div {...a} />; + +<div {...(a || {})} />; + +<div {...(cond ? foo : bar)} />; + +<div {...a /* comment */} />; + +<div {/* comment */ ...a} />; + +<div + { + ...a //comment + } +/>; + +<div + { + ...a + //comment + } +/>; + +<div + { + //comment + ...a + } +/>; + +<div + { + //comment + ...a // comment + } +/>; + +================================================================================ +`; + +exports[`child.js [acorn] format 1`] = ` +"Unexpected token (1:7) +> 1 | <div>{...a}</div>; + | ^ + 2 | + 3 | <div>{...a /* comment */}</div>; + 4 | +Cause: Unexpected token (1:6)" +`; + +exports[`child.js [espree] format 1`] = ` +"Unexpected token ... (1:7) +> 1 | <div>{...a}</div>; + | ^ + 2 | + 3 | <div>{...a /* comment */}</div>; + 4 | +Cause: Unexpected token ..." +`; + +exports[`child.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div>{...a}</div>; + +<div>{...a /* comment */}</div>; + +<div>{/* comment */...a}</div>; + +<div>{...a //comment +}</div>; + +<div>{...a + //comment +}</div>; + +<div>{ + //comment + ...a +}</div>; + +<div>{//comment + ...a // comment +}</div>; + +=====================================output===================================== +<div>{...a}</div>; + +<div>{...a /* comment */}</div>; + +<div>{/* comment */ ...a}</div>; + +<div> + { + ...a //comment + } +</div>; + +<div> + { + ...a + //comment + } +</div>; + +<div> + { + //comment + ...a + } +</div>; + +<div> + { + //comment + ...a // comment + } +</div>; + +================================================================================ +`; diff --git a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 081bcf92c487..000000000000 --- a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,139 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`attribute.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div {...a}/>; - -<div {...(a || {})} />; - -<div {...(cond ? foo : bar)} />; - -<div {...a /* comment */}/>; - -<div {/* comment */...a}/>; - -<div {...a //comment -}/>; - -<div {...a - //comment -}/>; - -<div { - //comment - ...a -}/>; - -<div {//comment - ...a // comment -}/>; - -=====================================output===================================== -<div {...a} />; - -<div {...(a || {})} />; - -<div {...(cond ? foo : bar)} />; - -<div {...a /* comment */} />; - -<div {/* comment */ ...a} />; - -<div - { - ...a //comment - } -/>; - -<div - { - ...a - //comment - } -/>; - -<div - { - //comment - ...a - } -/>; - -<div - { - //comment - ...a // comment - } -/>; - -================================================================================ -`; - -exports[`child.js format 1`] = ` -====================================options===================================== -parsers: ["babel", "flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<div>{...a}</div>; - -<div>{...a /* comment */}</div>; - -<div>{/* comment */...a}</div>; - -<div>{...a //comment -}</div>; - -<div>{...a - //comment -}</div>; - -<div>{ - //comment - ...a -}</div>; - -<div>{//comment - ...a // comment -}</div>; - -=====================================output===================================== -<div>{...a}</div>; - -<div>{...a /* comment */}</div>; - -<div>{/* comment */ ...a}</div>; - -<div> - { - ...a //comment - } -</div>; - -<div> - { - ...a - //comment - } -</div>; - -<div> - { - //comment - ...a - } -</div>; - -<div> - { - //comment - ...a // comment - } -</div>; - -================================================================================ -`; diff --git a/tests/format/jsx/spread/format.test.js b/tests/format/jsx/spread/format.test.js new file mode 100644 index 000000000000..4d0ed6e4a886 --- /dev/null +++ b/tests/format/jsx/spread/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["babel", "flow", "typescript"], { + errors: { + acorn: ["child.js"], + espree: ["child.js"], + }, +}); diff --git a/tests/format/jsx/spread/jsfmt.spec.js b/tests/format/jsx/spread/jsfmt.spec.js deleted file mode 100644 index eb85eda6bd02..000000000000 --- a/tests/format/jsx/spread/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "flow", "typescript"]); diff --git a/tests/format/jsx/stateless-arrow-fn/__snapshots__/format.test.js.snap b/tests/format/jsx/stateless-arrow-fn/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a2790ae56ec3 --- /dev/null +++ b/tests/format/jsx/stateless-arrow-fn/__snapshots__/format.test.js.snap @@ -0,0 +1,256 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const render1 = ({ styles }) => ( + <div style={styles} key="something"> + Keep the wrapping parens. Put each key on its own line. + </div> +); + +const render2 = ({ styles }) => <div style={styles} key="something"> + Create wrapping parens. +</div>; + +const render3 = ({ styles }) => <div style={styles} key="something">Create wrapping parens.</div>; + +const render4 = ({ styles }) => <div style={styles} key="something">Create wrapping parens and indent <strong>all the things</strong>.</div>; + +const render5 = ({ styles }) => <div>Keep it on one line.</div>; + +const render6 = ({ styles }) => ( + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc"> + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4> + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> <strong>hello</strong></div> + </div> +) + +const render7 = () => + <div> + <span /><span>Dont break each elem onto its own line.</span> <span /> + <div /> <div /> + </div> + +const render7A = () => ( + <div> + <div /><div /><div /> + </div> +) + +const render7B = () => ( + <div> + <span> <span/> Dont break plz</span> + <span><span/>Dont break plz</span> + <span>Dont break plz<span/></span> + </div> +) + +const render8 = (props) => <div>{props.text}</div> +const render9 = (props) => <div>{props.looooooooooooooooooooooooooooooong_text}</div> +const render10 = (props) => <div>{props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents}</div> + +const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams(cccccccccccc, dddddddddddddddddddddd) + +React.render( + <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google" /> + , document.querySelector('#react-root') +) + + +const renderTernary = (props) => + <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google"> + {props.showTheThing ? + <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> + : "hello " + "howdy! "} + {props.showTheThing ? + <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> + : + null + } + {props.showTheThing ? null : + <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> + } + {props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />} + {props.showTheOtherThing ? <div>I am here!!</div> : null} + </BaseForm> + +=====================================output===================================== +const render1 = ({ styles }) => ( + <div style={styles} key="something"> + Keep the wrapping parens. Put each key on its own line. + </div> +); + +const render2 = ({ styles }) => ( + <div style={styles} key="something"> + Create wrapping parens. + </div> +); + +const render3 = ({ styles }) => ( + <div style={styles} key="something"> + Create wrapping parens. + </div> +); + +const render4 = ({ styles }) => ( + <div style={styles} key="something"> + Create wrapping parens and indent <strong>all the things</strong>. + </div> +); + +const render5 = ({ styles }) => <div>Keep it on one line.</div>; + +const render6 = ({ styles }) => ( + <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc"> + <div + attr1="aaaaaaaaaaaaaaaaa" + attr2="bbbbbbbbbbb" + attr3="cccccccccccc" + attr4 + > + ddd d dd d d dddd dddd <strong>hello</strong> + </div> + <div + attr1="aaaaaaaaaaaaaaaaa" + attr2="bbbbbbbbbbb" + attr3="cccccccccccc" + attr4 + > + ddd d dd d d dddd dddd <strong>hello</strong> + </div> + <div + attr1="aaaaaaaaaaaaaaaaa" + attr2="bbbbbbbbbbb" + attr3="cccccccccccc" + attr4 + > + <div + attr1="aaaaaaaaaaaaaaaaa" + attr2="bbbbbbbbbbb" + attr3="cccccccccccc" + attr4 + > + ddd d dd d d dddd dddd <strong>hello</strong> + </div>{" "} + <strong>hello</strong> + </div> + </div> +); + +const render7 = () => ( + <div> + <span /> + <span>Dont break each elem onto its own line.</span> <span /> + <div /> <div /> + </div> +); + +const render7A = () => ( + <div> + <div /> + <div /> + <div /> + </div> +); + +const render7B = () => ( + <div> + <span> + {" "} + <span /> Dont break plz + </span> + <span> + <span /> + Dont break plz + </span> + <span> + Dont break plz + <span /> + </span> + </div> +); + +const render8 = (props) => <div>{props.text}</div>; +const render9 = (props) => ( + <div>{props.looooooooooooooooooooooooooooooong_text}</div> +); +const render10 = (props) => ( + <div> + {props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents} + </div> +); + +const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => + this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams( + cccccccccccc, + dddddddddddddddddddddd, + ); + +React.render( + <BaseForm + url="/auth/google" + method="GET" + colour="blue" + size="large" + submitLabel="Sign in with Google" + />, + document.querySelector("#react-root"), +); + +const renderTernary = (props) => ( + <BaseForm + url="/auth/google" + method="GET" + colour="blue" + size="large" + submitLabel="Sign in with Google" + > + {props.showTheThing ? ( + <BaseForm + url="/auth/google" + method="GET" + colour="blue" + size="large" + submitLabel="Sign in with Google" + > + Hello world + </BaseForm> + ) : ( + "hello " + "howdy! " + )} + {props.showTheThing ? ( + <BaseForm + url="/auth/google" + method="GET" + colour="blue" + size="large" + submitLabel="Sign in with Google" + > + Hello world + </BaseForm> + ) : null} + {props.showTheThing ? null : ( + <BaseForm + url="/auth/google" + method="GET" + colour="blue" + size="large" + submitLabel="Sign in with Google" + > + Hello world + </BaseForm> + )} + {props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />} + {props.showTheOtherThing ? <div>I am here!!</div> : null} + </BaseForm> +); + +================================================================================ +`; diff --git a/tests/format/jsx/stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 89c32bc94c94..000000000000 --- a/tests/format/jsx/stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,256 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const render1 = ({ styles }) => ( - <div style={styles} key="something"> - Keep the wrapping parens. Put each key on its own line. - </div> -); - -const render2 = ({ styles }) => <div style={styles} key="something"> - Create wrapping parens. -</div>; - -const render3 = ({ styles }) => <div style={styles} key="something">Create wrapping parens.</div>; - -const render4 = ({ styles }) => <div style={styles} key="something">Create wrapping parens and indent <strong>all the things</strong>.</div>; - -const render5 = ({ styles }) => <div>Keep it on one line.</div>; - -const render6 = ({ styles }) => ( - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc"> - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4> - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc" attr4>ddd d dd d d dddd dddd <strong>hello</strong></div> <strong>hello</strong></div> - </div> -) - -const render7 = () => - <div> - <span /><span>Dont break each elem onto its own line.</span> <span /> - <div /> <div /> - </div> - -const render7A = () => ( - <div> - <div /><div /><div /> - </div> -) - -const render7B = () => ( - <div> - <span> <span/> Dont break plz</span> - <span><span/>Dont break plz</span> - <span>Dont break plz<span/></span> - </div> -) - -const render8 = (props) => <div>{props.text}</div> -const render9 = (props) => <div>{props.looooooooooooooooooooooooooooooong_text}</div> -const render10 = (props) => <div>{props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents}</div> - -const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams(cccccccccccc, dddddddddddddddddddddd) - -React.render( - <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google" /> - , document.querySelector('#react-root') -) - - -const renderTernary = (props) => - <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google"> - {props.showTheThing ? - <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> - : "hello " + "howdy! "} - {props.showTheThing ? - <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> - : - null - } - {props.showTheThing ? null : - <BaseForm url="/auth/google" method="GET" colour="blue" size="large" submitLabel="Sign in with Google">Hello world</BaseForm> - } - {props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />} - {props.showTheOtherThing ? <div>I am here!!</div> : null} - </BaseForm> - -=====================================output===================================== -const render1 = ({ styles }) => ( - <div style={styles} key="something"> - Keep the wrapping parens. Put each key on its own line. - </div> -); - -const render2 = ({ styles }) => ( - <div style={styles} key="something"> - Create wrapping parens. - </div> -); - -const render3 = ({ styles }) => ( - <div style={styles} key="something"> - Create wrapping parens. - </div> -); - -const render4 = ({ styles }) => ( - <div style={styles} key="something"> - Create wrapping parens and indent <strong>all the things</strong>. - </div> -); - -const render5 = ({ styles }) => <div>Keep it on one line.</div>; - -const render6 = ({ styles }) => ( - <div attr1="aaaaaaaaaaaaaaaaa" attr2="bbbbbbbbbbb" attr3="cccccccccccc"> - <div - attr1="aaaaaaaaaaaaaaaaa" - attr2="bbbbbbbbbbb" - attr3="cccccccccccc" - attr4 - > - ddd d dd d d dddd dddd <strong>hello</strong> - </div> - <div - attr1="aaaaaaaaaaaaaaaaa" - attr2="bbbbbbbbbbb" - attr3="cccccccccccc" - attr4 - > - ddd d dd d d dddd dddd <strong>hello</strong> - </div> - <div - attr1="aaaaaaaaaaaaaaaaa" - attr2="bbbbbbbbbbb" - attr3="cccccccccccc" - attr4 - > - <div - attr1="aaaaaaaaaaaaaaaaa" - attr2="bbbbbbbbbbb" - attr3="cccccccccccc" - attr4 - > - ddd d dd d d dddd dddd <strong>hello</strong> - </div>{" "} - <strong>hello</strong> - </div> - </div> -); - -const render7 = () => ( - <div> - <span /> - <span>Dont break each elem onto its own line.</span> <span /> - <div /> <div /> - </div> -); - -const render7A = () => ( - <div> - <div /> - <div /> - <div /> - </div> -); - -const render7B = () => ( - <div> - <span> - {" "} - <span /> Dont break plz - </span> - <span> - <span /> - Dont break plz - </span> - <span> - Dont break plz - <span /> - </span> - </div> -); - -const render8 = (props) => <div>{props.text}</div>; -const render9 = (props) => ( - <div>{props.looooooooooooooooooooooooooooooong_text}</div> -); -const render10 = (props) => ( - <div> - {props.even_looooooooooooooooooooooooooooooooooooooooooonger_contents} - </div> -); - -const notJSX = (aaaaaaaaaaaaaaaaa, bbbbbbbbbbb) => - this.someLongCallWithParams(aaaaaa, bbbbbbb).anotherLongCallWithParams( - cccccccccccc, - dddddddddddddddddddddd - ); - -React.render( - <BaseForm - url="/auth/google" - method="GET" - colour="blue" - size="large" - submitLabel="Sign in with Google" - />, - document.querySelector("#react-root") -); - -const renderTernary = (props) => ( - <BaseForm - url="/auth/google" - method="GET" - colour="blue" - size="large" - submitLabel="Sign in with Google" - > - {props.showTheThing ? ( - <BaseForm - url="/auth/google" - method="GET" - colour="blue" - size="large" - submitLabel="Sign in with Google" - > - Hello world - </BaseForm> - ) : ( - "hello " + "howdy! " - )} - {props.showTheThing ? ( - <BaseForm - url="/auth/google" - method="GET" - colour="blue" - size="large" - submitLabel="Sign in with Google" - > - Hello world - </BaseForm> - ) : null} - {props.showTheThing ? null : ( - <BaseForm - url="/auth/google" - method="GET" - colour="blue" - size="large" - submitLabel="Sign in with Google" - > - Hello world - </BaseForm> - )} - {props.showTheOtherThing ? <div>I am here</div> : <div attr="blah" />} - {props.showTheOtherThing ? <div>I am here!!</div> : null} - </BaseForm> -); - -================================================================================ -`; diff --git a/tests/format/jsx/stateless-arrow-fn/format.test.js b/tests/format/jsx/stateless-arrow-fn/format.test.js new file mode 100644 index 000000000000..fa7a31c030ec --- /dev/null +++ b/tests/format/jsx/stateless-arrow-fn/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "typescript"]); diff --git a/tests/format/jsx/stateless-arrow-fn/jsfmt.spec.js b/tests/format/jsx/stateless-arrow-fn/jsfmt.spec.js deleted file mode 100644 index a842e1348721..000000000000 --- a/tests/format/jsx/stateless-arrow-fn/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "typescript"]); diff --git a/tests/format/jsx/template/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/template/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/jsx/template/__snapshots__/jsfmt.spec.js.snap rename to tests/format/jsx/template/__snapshots__/format.test.js.snap diff --git a/tests/format/jsx/template/format.test.js b/tests/format/jsx/template/format.test.js new file mode 100644 index 000000000000..55c339883dce --- /dev/null +++ b/tests/format/jsx/template/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow"]); diff --git a/tests/format/jsx/template/jsfmt.spec.js b/tests/format/jsx/template/jsfmt.spec.js deleted file mode 100644 index b9a908981a50..000000000000 --- a/tests/format/jsx/template/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow"]); diff --git a/tests/format/jsx/text-wrap/__snapshots__/format.test.js.snap b/tests/format/jsx/text-wrap/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..778c12f9677c --- /dev/null +++ b/tests/format/jsx/text-wrap/__snapshots__/format.test.js.snap @@ -0,0 +1,1075 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-16897.js format 1`] = ` +====================================options===================================== +parsers: ["flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function HelloWorld( ) { + return ( + <div> + <div> + foo + <br /> + bar{' '} + <span className="font-semibold"> + foobar foobar foobar foobar 12345 + </span>, foobar foobar foobar + </div> + </div> + ) +} + +=====================================output===================================== +function HelloWorld() { + return ( + <div> + <div> + foo + <br /> + bar{" "} + <span className="font-semibold">foobar foobar foobar foobar 12345</span> + , foobar foobar foobar + </div> + </div> + ); +} + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Wrapping text +x = + <div> + Some text that would need to wrap on to a new line in order to display correctly and nicely + </div> + +// Wrapping tags +x = + <div> + <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> + </div> + +// Wrapping tags +x = + <div> + <first>f</first><first>f</first><first>f</first><first>f</first><first>f</first><first>f</first> + </div> + +// Wrapping tags +x = + <div> + <a /><b /><c /> + <first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first> <first>f</first> + </div> + +// Wrapping tags +x = + <div> + <sadashdkjahsdkjhaskjdhaksjdhkashdkashdkasjhdkajshdkashdkashd /> <first>f</first> + </div> + +x = + <div> + before<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.</div>after + </div> + +x = + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after + </div> + +x = + <div> + before {stuff} after {stuff} after {stuff} after {stuff} after {stuff} after {stuff} {stuff} {stuff} after {stuff} after + </div> + +x = + <div> + Please state your <b>name</b> and <b>occupation</b> for the board of <b>school</b> directors. + </div> + +function DiffOverview(props) { + const { source, target, since } = props; + return ( + <div> + <div className="alert alert-info"> + <p> + This diff overview is computed against the current list of records in + this collection and the list it contained on <b>{humanDate(since)}</b>. + </p> + <p> + <b>Note:</b> <code>last_modified</code> and <code>schema</code> record metadata + are omitted for easier review. + </p> + </div> + <Diff source={source} target={target} /> + </div> + ); +} + +x = <font size={-3}><i>Starting at minute {graphActivity.startTime}, running for {graphActivity.length} to minute {graphActivity.startTime + graphActivity.length}</i></font> + +x = + <div> + First second third + <div attr="a very long string attribute that will overflow because it is very long">Something</div> + </div> + +x = + <div> + <div> + First + </div> + Second + <div> + Third + </div> + </div> + +x = + <div> + First <div> + Second + </div> Third + </div> + +leading_whitespace = + <div> First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div> + +trailing_whitespace = + <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth </div> + +no_leading_or_trailing_whitespace = + <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div> + +facebook_translation_leave_text_around_tag = + <div> + <span> + First + </span>, + (<span> + Second + </span>) + </div> + +x = + <div> + <span> + First second third fourth fifth sixth seventh + </span>, + (<span> + Second + </span>) + </div> + +this_really_should_split_across_lines = + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after + </div> + +unstable_before = + <div className="yourScore"> + Your score: <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${mini.crosstable.users[user.id]}\`}</span> + </div> + +unstable_after_first_run = ( + <div className="yourScore"> + Your score:{" "} + <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${mini + .crosstable.users[user.id]}\`}</span> + </div> +); + +solitary_whitespace = + <div first="first" second="second" third="third" fourth="fourth" fifth="fifth" sixth="sixth"> </div> + +jsx_whitespace_on_newline = + <div> + <div> + First + </div> <div> + Second + </div> <div> + Third + </div> + </div> + +jsx_around_multiline_element = + <div>Before <div>{"Enough text to make this element wrap on to multiple lines when formatting"}</div> After</div> + +jsx_around_multiline_element_second_pass = ( + <div> + Before{" "} + <div> + { + "Enough text to make this element wrap on to multiple lines when formatting" + } + </div>{" "} + After + </div> +); + +convert_space_expressions = + <div>{" "}</div> + +x = + <div> + <first /> + <second /> + <third /> + <fourth /> + <fifth /> + <sixth /> + </div> + +const Abc = () => { + return ( + <div> + Please state your + {" "} + <b>name</b> + {" "} + and + {" "} + <b>occupation</b> + {" "} + for the board of directors. + </div> + ); +}; + +x = <div id="moo">Some stuff here</div> + +headers_and_paragraphs = ( + <div> + <h2>First</h2> + <p>The first paragraph.</p> + + <h2>Second</h2> + <p>The second paragraph.</p> + </div> +); + +no_text_one_tag_per_line = + <div> + <first /><second /> + </div> + +with_text_fill_line = + <div> + Text <first /><second /> + </div> + +line_after_br = + <div> + Text<br /> + More text<br /> + And more<br /> + </div> + +line_after_br = + <div> + Text<br />More text<br />And more<br /> + </div> + +line_after_br = + <div> + Text + <br /> + More text + <br /> + And more + <br /> + </div> + +line_after_br_2 = <div>A<br />B<br />C</div> + +br_followed_by_whitespace = <div><br /> text</div> + +dont_preserve_blank_lines_when_jsx_contains_text = + <div> + + <div>Zeroth</div> + + <div>First</div> + + Second + + </div> + +multiple_expressions = + <div> + {header} + {body} + {footer} + </div> + +single_expression_child_tags = + <div> + You currently have <strong>{dashboardStr}</strong> and <strong>{userStr}</strong> + </div> + +expression_does_not_break = + <div>texty text text text text text text text text text text text {this.props.type} </div> + +br_triggers_expression_break = + <div><br /> + text text text text text text text text text text text {this.props.type} </div> + +jsx_whitespace_after_tag = + <div> + <span a="a" b="b"> + {variable} + </span> + {" "} + ({variable}) + </div> + +x = + <div> + ENDS IN <div> + text text text text text text text text text text text + </div>{" "} + HRS + </div> + +x = + <div> + <h2>Message</h2> + Hello, I'm a simple message. + </div> + +x = + <div> + Hello, I'm a simple message. + <h2>Message</h2> + </div> + +x = + <div> + <div> + <div> + <div> + <div> + Line {startRange.row + 1}:{startRange.column + 1} - {endRange.row + 1}:{endRange.column + 1}{caller} + </div> + </div> + </div> + </div> + </div> + +x = + <div> + {" "} <div>text</div> + </div> + +// NOTE: Multiple JSX whitespaces are collapsed into a single space. +x = + <div> + {" "}{" "}{" "} + </div> + +// Don't break a self-closing element without attributes +// ---------- +x = + <p> + text text text text text text text text text text text text text text text<br />text text text text text text + </p>; + +x = + <div> + <div> + First + </div>- + <div> + Second + </div> + </div> + +x = + <div> + <div> + First + </div> + - + <div> + Second + </div> + </div> + +x = + <div> + <div>First</div>-<div>Second</div> + </div> + +x = + <div> + <div className="first" tabIndex="1"> + First + </div>- + <div className="second" tabIndex="2"> + Second + </div> + </div> + +x = + <div> + <div className="first" tabIndex="1"> + First + </div> + - + <div className="second" tabIndex="2"> + Second + </div> + </div> + +x = + <div> + <div className="first" tabIndex="1">First</div>-<div className="second" tabIndex="2">Second</div> + </div> + +x = + <div> + {hour}:{minute}:{second} + </div> + +x = + <div> + {hour} + : + {minute} + : + {second} + </div> + +x = + <div> + {hour}: + {minute}: + {second} + </div> + +x = <div><strong>text here</strong>.<br /></div> + +x = <div>Sales tax estimated using a rate of {salesTax * 100}%.</div> + +x = <div> + {title}&nbsp; +</div> + +x = <div><span/>bar</div> + +x = <div> + <span> + <strong>{name}</strong>’s{' '} + </span> + Hello <strong>world</strong>.<br /> + <Text>You {type}ed this shipment to</Text> +</div> + +x = <HelpBlock> + {parameter.Description}: {errorMsg} +</HelpBlock> + +x = <label> + {value} solution{plural} +</label> + +x = <span>Copy &quot;{name}&quot;</span> + +x = <BasicText light>(avg. {value}/5)</BasicText> + +x = <p> + Use the <code>Button</code>'s +</p>; + +this_really_should_split_across_lines = + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after + </div> + +let myDiv = ReactTestUtils.renderIntoDocument( + <div> + <div key="theDog" className="dog" />, + <div key="theBird" className="bird" /> + </div> +); + +=====================================output===================================== +// Wrapping text +x = ( + <div> + Some text that would need to wrap on to a new line in order to display + correctly and nicely + </div> +); + +// Wrapping tags +x = ( + <div> + <first>f</first> <first>f</first> <first>f</first> <first>f</first>{" "} + <first>f</first> <first>f</first> + </div> +); + +// Wrapping tags +x = ( + <div> + <first>f</first> + <first>f</first> + <first>f</first> + <first>f</first> + <first>f</first> + <first>f</first> + </div> +); + +// Wrapping tags +x = ( + <div> + <a /> + <b /> + <c /> + <first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first>{" "} + <first>f</first> + </div> +); + +// Wrapping tags +x = ( + <div> + <sadashdkjahsdkjhaskjdhaksjdhkashdkashdkasjhdkajshdkashdkashd />{" "} + <first>f</first> + </div> +); + +x = ( + <div> + before + <div> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at + mollis lorem. + </div> + after + </div> +); + +x = ( + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} + {stuff} + {stuff}after{stuff}after + </div> +); + +x = ( + <div> + before {stuff} after {stuff} after {stuff} after {stuff} after {stuff} after{" "} + {stuff} {stuff} {stuff} after {stuff} after + </div> +); + +x = ( + <div> + Please state your <b>name</b> and <b>occupation</b> for the board of{" "} + <b>school</b> directors. + </div> +); + +function DiffOverview(props) { + const { source, target, since } = props; + return ( + <div> + <div className="alert alert-info"> + <p> + This diff overview is computed against the current list of records in + this collection and the list it contained on <b>{humanDate(since)}</b> + . + </p> + <p> + <b>Note:</b> <code>last_modified</code> and <code>schema</code> record + metadata are omitted for easier review. + </p> + </div> + <Diff source={source} target={target} /> + </div> + ); +} + +x = ( + <font size={-3}> + <i> + Starting at minute {graphActivity.startTime}, running for{" "} + {graphActivity.length} to minute{" "} + {graphActivity.startTime + graphActivity.length} + </i> + </font> +); + +x = ( + <div> + First second third + <div attr="a very long string attribute that will overflow because it is very long"> + Something + </div> + </div> +); + +x = ( + <div> + <div>First</div> + Second + <div>Third</div> + </div> +); + +x = ( + <div> + First <div>Second</div> Third + </div> +); + +leading_whitespace = ( + <div> + {" "} + First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh + Twelfth Thirteenth Fourteenth + </div> +); + +trailing_whitespace = ( + <div> + First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh + Twelfth Thirteenth Fourteenth{" "} + </div> +); + +no_leading_or_trailing_whitespace = ( + <div> + First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh + Twelfth Thirteenth Fourteenth + </div> +); + +facebook_translation_leave_text_around_tag = ( + <div> + <span>First</span>, (<span>Second</span>) + </div> +); + +x = ( + <div> + <span>First second third fourth fifth sixth seventh</span>, ( + <span>Second</span>) + </div> +); + +this_really_should_split_across_lines = ( + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} + after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} + after{stuff}after{stuff}after + </div> +); + +unstable_before = ( + <div className="yourScore"> + Your score:{" "} + <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${mini.crosstable.users[user.id]}\`}</span> + </div> +); + +unstable_after_first_run = ( + <div className="yourScore"> + Your score:{" "} + <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${ + mini.crosstable.users[user.id] + }\`}</span> + </div> +); + +solitary_whitespace = ( + <div + first="first" + second="second" + third="third" + fourth="fourth" + fifth="fifth" + sixth="sixth" + > + {" "} + </div> +); + +jsx_whitespace_on_newline = ( + <div> + <div>First</div> <div>Second</div> <div>Third</div> + </div> +); + +jsx_around_multiline_element = ( + <div> + Before{" "} + <div> + { + "Enough text to make this element wrap on to multiple lines when formatting" + } + </div>{" "} + After + </div> +); + +jsx_around_multiline_element_second_pass = ( + <div> + Before{" "} + <div> + { + "Enough text to make this element wrap on to multiple lines when formatting" + } + </div>{" "} + After + </div> +); + +convert_space_expressions = <div> </div>; + +x = ( + <div> + <first /> + <second /> + <third /> + <fourth /> + <fifth /> + <sixth /> + </div> +); + +const Abc = () => { + return ( + <div> + Please state your <b>name</b> and <b>occupation</b> for the board of + directors. + </div> + ); +}; + +x = <div id="moo">Some stuff here</div>; + +headers_and_paragraphs = ( + <div> + <h2>First</h2> + <p>The first paragraph.</p> + + <h2>Second</h2> + <p>The second paragraph.</p> + </div> +); + +no_text_one_tag_per_line = ( + <div> + <first /> + <second /> + </div> +); + +with_text_fill_line = ( + <div> + Text <first /> + <second /> + </div> +); + +line_after_br = ( + <div> + Text + <br /> + More text + <br /> + And more + <br /> + </div> +); + +line_after_br = ( + <div> + Text + <br /> + More text + <br /> + And more + <br /> + </div> +); + +line_after_br = ( + <div> + Text + <br /> + More text + <br /> + And more + <br /> + </div> +); + +line_after_br_2 = ( + <div> + A<br />B<br />C + </div> +); + +br_followed_by_whitespace = ( + <div> + <br /> text + </div> +); + +dont_preserve_blank_lines_when_jsx_contains_text = ( + <div> + <div>Zeroth</div> + <div>First</div> + Second + </div> +); + +multiple_expressions = ( + <div> + {header} + {body} + {footer} + </div> +); + +single_expression_child_tags = ( + <div> + You currently have <strong>{dashboardStr}</strong> and{" "} + <strong>{userStr}</strong> + </div> +); + +expression_does_not_break = ( + <div> + texty text text text text text text text text text text text{" "} + {this.props.type}{" "} + </div> +); + +br_triggers_expression_break = ( + <div> + <br /> + text text text text text text text text text text text{" "} + {this.props.type}{" "} + </div> +); + +jsx_whitespace_after_tag = ( + <div> + <span a="a" b="b"> + {variable} + </span>{" "} + ({variable}) + </div> +); + +x = ( + <div> + ENDS IN <div>text text text text text text text text text text text</div>{" "} + HRS + </div> +); + +x = ( + <div> + <h2>Message</h2> + Hello, I'm a simple message. + </div> +); + +x = ( + <div> + Hello, I'm a simple message. + <h2>Message</h2> + </div> +); + +x = ( + <div> + <div> + <div> + <div> + <div> + Line {startRange.row + 1}:{startRange.column + 1} -{" "} + {endRange.row + 1}:{endRange.column + 1} + {caller} + </div> + </div> + </div> + </div> + </div> +); + +x = ( + <div> + {" "} + <div>text</div> + </div> +); + +// NOTE: Multiple JSX whitespaces are collapsed into a single space. +x = <div> </div>; + +// Don't break a self-closing element without attributes +// ---------- +x = ( + <p> + text text text text text text text text text text text text text text text + <br /> + text text text text text text + </p> +); + +x = ( + <div> + <div>First</div>-<div>Second</div> + </div> +); + +x = ( + <div> + <div>First</div>-<div>Second</div> + </div> +); + +x = ( + <div> + <div>First</div>-<div>Second</div> + </div> +); + +x = ( + <div> + <div className="first" tabIndex="1"> + First + </div> + - + <div className="second" tabIndex="2"> + Second + </div> + </div> +); + +x = ( + <div> + <div className="first" tabIndex="1"> + First + </div> + - + <div className="second" tabIndex="2"> + Second + </div> + </div> +); + +x = ( + <div> + <div className="first" tabIndex="1"> + First + </div> + - + <div className="second" tabIndex="2"> + Second + </div> + </div> +); + +x = ( + <div> + {hour}:{minute}:{second} + </div> +); + +x = ( + <div> + {hour}:{minute}:{second} + </div> +); + +x = ( + <div> + {hour}:{minute}:{second} + </div> +); + +x = ( + <div> + <strong>text here</strong>.<br /> + </div> +); + +x = <div>Sales tax estimated using a rate of {salesTax * 100}%.</div>; + +x = <div>{title}&nbsp;</div>; + +x = ( + <div> + <span /> + bar + </div> +); + +x = ( + <div> + <span> + <strong>{name}</strong>’s{" "} + </span> + Hello <strong>world</strong>.<br /> + <Text>You {type}ed this shipment to</Text> + </div> +); + +x = ( + <HelpBlock> + {parameter.Description}: {errorMsg} + </HelpBlock> +); + +x = ( + <label> + {value} solution{plural} + </label> +); + +x = <span>Copy &quot;{name}&quot;</span>; + +x = <BasicText light>(avg. {value}/5)</BasicText>; + +x = ( + <p> + Use the <code>Button</code>'s + </p> +); + +this_really_should_split_across_lines = ( + <div> + before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} + after{stuff}after + </div> +); + +let myDiv = ReactTestUtils.renderIntoDocument( + <div> + <div key="theDog" className="dog" />, + <div key="theBird" className="bird" /> + </div>, +); + +================================================================================ +`; diff --git a/tests/format/jsx/text-wrap/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/text-wrap/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 731bd0e3794f..000000000000 --- a/tests/format/jsx/text-wrap/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1041 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["flow", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Wrapping text -x = - <div> - Some text that would need to wrap on to a new line in order to display correctly and nicely - </div> - -// Wrapping tags -x = - <div> - <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> <first>f</first> - </div> - -// Wrapping tags -x = - <div> - <first>f</first><first>f</first><first>f</first><first>f</first><first>f</first><first>f</first> - </div> - -// Wrapping tags -x = - <div> - <a /><b /><c /> - <first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first> <first>f</first> - </div> - -// Wrapping tags -x = - <div> - <sadashdkjahsdkjhaskjdhaksjdhkashdkashdkasjhdkajshdkashdkashd /> <first>f</first> - </div> - -x = - <div> - before<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at mollis lorem.</div>after - </div> - -x = - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}{stuff}{stuff}after{stuff}after - </div> - -x = - <div> - before {stuff} after {stuff} after {stuff} after {stuff} after {stuff} after {stuff} {stuff} {stuff} after {stuff} after - </div> - -x = - <div> - Please state your <b>name</b> and <b>occupation</b> for the board of <b>school</b> directors. - </div> - -function DiffOverview(props) { - const { source, target, since } = props; - return ( - <div> - <div className="alert alert-info"> - <p> - This diff overview is computed against the current list of records in - this collection and the list it contained on <b>{humanDate(since)}</b>. - </p> - <p> - <b>Note:</b> <code>last_modified</code> and <code>schema</code> record metadata - are omitted for easier review. - </p> - </div> - <Diff source={source} target={target} /> - </div> - ); -} - -x = <font size={-3}><i>Starting at minute {graphActivity.startTime}, running for {graphActivity.length} to minute {graphActivity.startTime + graphActivity.length}</i></font> - -x = - <div> - First second third - <div attr="a very long string attribute that will overflow because it is very long">Something</div> - </div> - -x = - <div> - <div> - First - </div> - Second - <div> - Third - </div> - </div> - -x = - <div> - First <div> - Second - </div> Third - </div> - -leading_whitespace = - <div> First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div> - -trailing_whitespace = - <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth </div> - -no_leading_or_trailing_whitespace = - <div>First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh Twelfth Thirteenth Fourteenth</div> - -facebook_translation_leave_text_around_tag = - <div> - <span> - First - </span>, - (<span> - Second - </span>) - </div> - -x = - <div> - <span> - First second third fourth fifth sixth seventh - </span>, - (<span> - Second - </span>) - </div> - -this_really_should_split_across_lines = - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after - </div> - -unstable_before = - <div className="yourScore"> - Your score: <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${mini.crosstable.users[user.id]}\`}</span> - </div> - -unstable_after_first_run = ( - <div className="yourScore"> - Your score:{" "} - <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${mini - .crosstable.users[user.id]}\`}</span> - </div> -); - -solitary_whitespace = - <div first="first" second="second" third="third" fourth="fourth" fifth="fifth" sixth="sixth"> </div> - -jsx_whitespace_on_newline = - <div> - <div> - First - </div> <div> - Second - </div> <div> - Third - </div> - </div> - -jsx_around_multiline_element = - <div>Before <div>{"Enough text to make this element wrap on to multiple lines when formatting"}</div> After</div> - -jsx_around_multiline_element_second_pass = ( - <div> - Before{" "} - <div> - { - "Enough text to make this element wrap on to multiple lines when formatting" - } - </div>{" "} - After - </div> -); - -convert_space_expressions = - <div>{" "}</div> - -x = - <div> - <first /> - <second /> - <third /> - <fourth /> - <fifth /> - <sixth /> - </div> - -const Abc = () => { - return ( - <div> - Please state your - {" "} - <b>name</b> - {" "} - and - {" "} - <b>occupation</b> - {" "} - for the board of directors. - </div> - ); -}; - -x = <div id="moo">Some stuff here</div> - -headers_and_paragraphs = ( - <div> - <h2>First</h2> - <p>The first paragraph.</p> - - <h2>Second</h2> - <p>The second paragraph.</p> - </div> -); - -no_text_one_tag_per_line = - <div> - <first /><second /> - </div> - -with_text_fill_line = - <div> - Text <first /><second /> - </div> - -line_after_br = - <div> - Text<br /> - More text<br /> - And more<br /> - </div> - -line_after_br = - <div> - Text<br />More text<br />And more<br /> - </div> - -line_after_br = - <div> - Text - <br /> - More text - <br /> - And more - <br /> - </div> - -line_after_br_2 = <div>A<br />B<br />C</div> - -br_followed_by_whitespace = <div><br /> text</div> - -dont_preserve_blank_lines_when_jsx_contains_text = - <div> - - <div>Zeroth</div> - - <div>First</div> - - Second - - </div> - -multiple_expressions = - <div> - {header} - {body} - {footer} - </div> - -single_expression_child_tags = - <div> - You currently have <strong>{dashboardStr}</strong> and <strong>{userStr}</strong> - </div> - -expression_does_not_break = - <div>texty text text text text text text text text text text text {this.props.type} </div> - -// FIXME -br_triggers_expression_break = - <div><br /> - text text text text text text text text text text text {this.props.type} </div> - -jsx_whitespace_after_tag = - <div> - <span a="a" b="b"> - {variable} - </span> - {" "} - ({variable}) - </div> - -x = - <div> - ENDS IN <div> - text text text text text text text text text text text - </div>{" "} - HRS - </div> - -x = - <div> - <h2>Message</h2> - Hello, I'm a simple message. - </div> - -x = - <div> - Hello, I'm a simple message. - <h2>Message</h2> - </div> - -x = - <div> - <div> - <div> - <div> - <div> - Line {startRange.row + 1}:{startRange.column + 1} - {endRange.row + 1}:{endRange.column + 1}{caller} - </div> - </div> - </div> - </div> - </div> - -x = - <div> - {" "} <div>text</div> - </div> - -// NOTE: Multiple JSX whitespaces are collapsed into a single space. -x = - <div> - {" "}{" "}{" "} - </div> - -// Don't break a self-closing element without attributes -// ---------- -x = - <p> - text text text text text text text text text text text text text text text<br />text text text text text text - </p>; - -x = - <div> - <div> - First - </div>- - <div> - Second - </div> - </div> - -x = - <div> - <div> - First - </div> - - - <div> - Second - </div> - </div> - -x = - <div> - <div>First</div>-<div>Second</div> - </div> - -x = - <div> - <div className="first" tabIndex="1"> - First - </div>- - <div className="second" tabIndex="2"> - Second - </div> - </div> - -x = - <div> - <div className="first" tabIndex="1"> - First - </div> - - - <div className="second" tabIndex="2"> - Second - </div> - </div> - -x = - <div> - <div className="first" tabIndex="1">First</div>-<div className="second" tabIndex="2">Second</div> - </div> - -x = - <div> - {hour}:{minute}:{second} - </div> - -x = - <div> - {hour} - : - {minute} - : - {second} - </div> - -x = - <div> - {hour}: - {minute}: - {second} - </div> - -x = <div><strong>text here</strong>.<br /></div> - -x = <div>Sales tax estimated using a rate of {salesTax * 100}%.</div> - -x = <div> - {title}&nbsp; -</div> - -x = <div><span/>bar</div> - -x = <div> - <span> - <strong>{name}</strong>’s{' '} - </span> - Hello <strong>world</strong>.<br /> - <Text>You {type}ed this shipment to</Text> -</div> - -x = <HelpBlock> - {parameter.Description}: {errorMsg} -</HelpBlock> - -x = <label> - {value} solution{plural} -</label> - -x = <span>Copy &quot;{name}&quot;</span> - -x = <BasicText light>(avg. {value}/5)</BasicText> - -x = <p> - Use the <code>Button</code>'s -</p>; - -this_really_should_split_across_lines = - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after - </div> - -let myDiv = ReactTestUtils.renderIntoDocument( - <div> - <div key="theDog" className="dog" />, - <div key="theBird" className="bird" /> - </div> -); - -=====================================output===================================== -// Wrapping text -x = ( - <div> - Some text that would need to wrap on to a new line in order to display - correctly and nicely - </div> -); - -// Wrapping tags -x = ( - <div> - <first>f</first> <first>f</first> <first>f</first> <first>f</first>{" "} - <first>f</first> <first>f</first> - </div> -); - -// Wrapping tags -x = ( - <div> - <first>f</first> - <first>f</first> - <first>f</first> - <first>f</first> - <first>f</first> - <first>f</first> - </div> -); - -// Wrapping tags -x = ( - <div> - <a /> - <b /> - <c /> - <first>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</first>{" "} - <first>f</first> - </div> -); - -// Wrapping tags -x = ( - <div> - <sadashdkjahsdkjhaskjdhaksjdhkashdkashdkasjhdkajshdkashdkashd />{" "} - <first>f</first> - </div> -); - -x = ( - <div> - before - <div> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at - mollis lorem. - </div> - after - </div> -); - -x = ( - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} - {stuff} - {stuff}after{stuff}after - </div> -); - -x = ( - <div> - before {stuff} after {stuff} after {stuff} after {stuff} after {stuff} after{" "} - {stuff} {stuff} {stuff} after {stuff} after - </div> -); - -x = ( - <div> - Please state your <b>name</b> and <b>occupation</b> for the board of{" "} - <b>school</b> directors. - </div> -); - -function DiffOverview(props) { - const { source, target, since } = props; - return ( - <div> - <div className="alert alert-info"> - <p> - This diff overview is computed against the current list of records in - this collection and the list it contained on <b>{humanDate(since)}</b> - . - </p> - <p> - <b>Note:</b> <code>last_modified</code> and <code>schema</code> record - metadata are omitted for easier review. - </p> - </div> - <Diff source={source} target={target} /> - </div> - ); -} - -x = ( - <font size={-3}> - <i> - Starting at minute {graphActivity.startTime}, running for{" "} - {graphActivity.length} to minute{" "} - {graphActivity.startTime + graphActivity.length} - </i> - </font> -); - -x = ( - <div> - First second third - <div attr="a very long string attribute that will overflow because it is very long"> - Something - </div> - </div> -); - -x = ( - <div> - <div>First</div> - Second - <div>Third</div> - </div> -); - -x = ( - <div> - First <div>Second</div> Third - </div> -); - -leading_whitespace = ( - <div> - {" "} - First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh - Twelfth Thirteenth Fourteenth - </div> -); - -trailing_whitespace = ( - <div> - First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh - Twelfth Thirteenth Fourteenth{" "} - </div> -); - -no_leading_or_trailing_whitespace = ( - <div> - First Second Third Fourth Fifth Sixth Seventh Eighth Ninth Tenth Eleventh - Twelfth Thirteenth Fourteenth - </div> -); - -facebook_translation_leave_text_around_tag = ( - <div> - <span>First</span>, (<span>Second</span>) - </div> -); - -x = ( - <div> - <span>First second third fourth fifth sixth seventh</span>, ( - <span>Second</span>) - </div> -); - -this_really_should_split_across_lines = ( - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} - after{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} - after{stuff}after{stuff}after - </div> -); - -unstable_before = ( - <div className="yourScore"> - Your score:{" "} - <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${ - mini.crosstable.users[user.id] - }\`}</span> - </div> -); - -unstable_after_first_run = ( - <div className="yourScore"> - Your score:{" "} - <span className="score">{\`\${mini.crosstable.users[sessionUserId]} - \${ - mini.crosstable.users[user.id] - }\`}</span> - </div> -); - -solitary_whitespace = ( - <div - first="first" - second="second" - third="third" - fourth="fourth" - fifth="fifth" - sixth="sixth" - > - {" "} - </div> -); - -jsx_whitespace_on_newline = ( - <div> - <div>First</div> <div>Second</div> <div>Third</div> - </div> -); - -jsx_around_multiline_element = ( - <div> - Before{" "} - <div> - { - "Enough text to make this element wrap on to multiple lines when formatting" - } - </div>{" "} - After - </div> -); - -jsx_around_multiline_element_second_pass = ( - <div> - Before{" "} - <div> - { - "Enough text to make this element wrap on to multiple lines when formatting" - } - </div>{" "} - After - </div> -); - -convert_space_expressions = <div> </div>; - -x = ( - <div> - <first /> - <second /> - <third /> - <fourth /> - <fifth /> - <sixth /> - </div> -); - -const Abc = () => { - return ( - <div> - Please state your <b>name</b> and <b>occupation</b> for the board of - directors. - </div> - ); -}; - -x = <div id="moo">Some stuff here</div>; - -headers_and_paragraphs = ( - <div> - <h2>First</h2> - <p>The first paragraph.</p> - - <h2>Second</h2> - <p>The second paragraph.</p> - </div> -); - -no_text_one_tag_per_line = ( - <div> - <first /> - <second /> - </div> -); - -with_text_fill_line = ( - <div> - Text <first /> - <second /> - </div> -); - -line_after_br = ( - <div> - Text - <br /> - More text - <br /> - And more - <br /> - </div> -); - -line_after_br = ( - <div> - Text - <br /> - More text - <br /> - And more - <br /> - </div> -); - -line_after_br = ( - <div> - Text - <br /> - More text - <br /> - And more - <br /> - </div> -); - -line_after_br_2 = ( - <div> - A<br />B<br />C - </div> -); - -br_followed_by_whitespace = ( - <div> - <br /> text - </div> -); - -dont_preserve_blank_lines_when_jsx_contains_text = ( - <div> - <div>Zeroth</div> - <div>First</div> - Second - </div> -); - -multiple_expressions = ( - <div> - {header} - {body} - {footer} - </div> -); - -single_expression_child_tags = ( - <div> - You currently have <strong>{dashboardStr}</strong> and{" "} - <strong>{userStr}</strong> - </div> -); - -expression_does_not_break = ( - <div> - texty text text text text text text text text text text text{" "} - {this.props.type}{" "} - </div> -); - -// FIXME -br_triggers_expression_break = ( - <div> - <br /> - text text text text text text text text text text text { - this.props.type - }{" "} - </div> -); - -jsx_whitespace_after_tag = ( - <div> - <span a="a" b="b"> - {variable} - </span>{" "} - ({variable}) - </div> -); - -x = ( - <div> - ENDS IN <div>text text text text text text text text text text text</div>{" "} - HRS - </div> -); - -x = ( - <div> - <h2>Message</h2> - Hello, I'm a simple message. - </div> -); - -x = ( - <div> - Hello, I'm a simple message. - <h2>Message</h2> - </div> -); - -x = ( - <div> - <div> - <div> - <div> - <div> - Line {startRange.row + 1}:{startRange.column + 1} -{" "} - {endRange.row + 1}:{endRange.column + 1} - {caller} - </div> - </div> - </div> - </div> - </div> -); - -x = ( - <div> - {" "} - <div>text</div> - </div> -); - -// NOTE: Multiple JSX whitespaces are collapsed into a single space. -x = <div> </div>; - -// Don't break a self-closing element without attributes -// ---------- -x = ( - <p> - text text text text text text text text text text text text text text text - <br /> - text text text text text text - </p> -); - -x = ( - <div> - <div>First</div>-<div>Second</div> - </div> -); - -x = ( - <div> - <div>First</div>-<div>Second</div> - </div> -); - -x = ( - <div> - <div>First</div>-<div>Second</div> - </div> -); - -x = ( - <div> - <div className="first" tabIndex="1"> - First - </div> - - - <div className="second" tabIndex="2"> - Second - </div> - </div> -); - -x = ( - <div> - <div className="first" tabIndex="1"> - First - </div> - - - <div className="second" tabIndex="2"> - Second - </div> - </div> -); - -x = ( - <div> - <div className="first" tabIndex="1"> - First - </div> - - - <div className="second" tabIndex="2"> - Second - </div> - </div> -); - -x = ( - <div> - {hour}:{minute}:{second} - </div> -); - -x = ( - <div> - {hour}:{minute}:{second} - </div> -); - -x = ( - <div> - {hour}:{minute}:{second} - </div> -); - -x = ( - <div> - <strong>text here</strong>.<br /> - </div> -); - -x = <div>Sales tax estimated using a rate of {salesTax * 100}%.</div>; - -x = <div>{title}&nbsp;</div>; - -x = ( - <div> - <span /> - bar - </div> -); - -x = ( - <div> - <span> - <strong>{name}</strong>’s{" "} - </span> - Hello <strong>world</strong>.<br /> - <Text>You {type}ed this shipment to</Text> - </div> -); - -x = ( - <HelpBlock> - {parameter.Description}: {errorMsg} - </HelpBlock> -); - -x = ( - <label> - {value} solution{plural} - </label> -); - -x = <span>Copy &quot;{name}&quot;</span>; - -x = <BasicText light>(avg. {value}/5)</BasicText>; - -x = ( - <p> - Use the <code>Button</code>'s - </p> -); - -this_really_should_split_across_lines = ( - <div> - before{stuff}after{stuff}after{stuff}after{stuff}after{stuff}after{stuff} - after{stuff}after - </div> -); - -let myDiv = ReactTestUtils.renderIntoDocument( - <div> - <div key="theDog" className="dog" />, - <div key="theBird" className="bird" /> - </div> -); - -================================================================================ -`; diff --git a/tests/format/jsx/text-wrap/format.test.js b/tests/format/jsx/text-wrap/format.test.js new file mode 100644 index 000000000000..fa7a31c030ec --- /dev/null +++ b/tests/format/jsx/text-wrap/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow", "typescript"]); diff --git a/tests/format/jsx/text-wrap/issue-16897.js b/tests/format/jsx/text-wrap/issue-16897.js new file mode 100644 index 000000000000..8410de1d17fd --- /dev/null +++ b/tests/format/jsx/text-wrap/issue-16897.js @@ -0,0 +1,14 @@ +function HelloWorld( ) { + return ( + <div> + <div> + foo + <br /> + bar{' '} + <span className="font-semibold"> + foobar foobar foobar foobar 12345 + </span>, foobar foobar foobar + </div> + </div> + ) +} diff --git a/tests/format/jsx/text-wrap/jsfmt.spec.js b/tests/format/jsx/text-wrap/jsfmt.spec.js deleted file mode 100644 index a842e1348721..000000000000 --- a/tests/format/jsx/text-wrap/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "typescript"]); diff --git a/tests/format/jsx/text-wrap/test.js b/tests/format/jsx/text-wrap/test.js index f8cb62554435..80d2ac97b80b 100644 --- a/tests/format/jsx/text-wrap/test.js +++ b/tests/format/jsx/text-wrap/test.js @@ -273,7 +273,6 @@ single_expression_child_tags = expression_does_not_break = <div>texty text text text text text text text text text text text {this.props.type} </div> -// FIXME br_triggers_expression_break = <div><br /> text text text text text text text text text text text {this.props.type} </div> diff --git a/tests/format/jsx/top-level-await/__snapshots__/format.test.js.snap b/tests/format/jsx/top-level-await/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0c2b4cbb7813 --- /dev/null +++ b/tests/format/jsx/top-level-await/__snapshots__/format.test.js.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.jsx format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; diff --git a/tests/format/jsx/top-level-await/format.test.js b/tests/format/jsx/top-level-await/format.test.js new file mode 100644 index 000000000000..98ba37cc2f18 --- /dev/null +++ b/tests/format/jsx/top-level-await/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "typescript"]); diff --git a/tests/format/jsx/top-level-await/test.jsx b/tests/format/jsx/top-level-await/test.jsx new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/jsx/top-level-await/test.jsx @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/jsx/whitespace/format.test.js b/tests/format/jsx/whitespace/format.test.js new file mode 100644 index 000000000000..52e43f610259 --- /dev/null +++ b/tests/format/jsx/whitespace/format.test.js @@ -0,0 +1,88 @@ +/* eslint-disable no-irregular-whitespace */ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + code: "spaces = <div>] [</div>", + output: "spaces = <div>] [</div>;", + }, + { + code: "tabs = <div>] \t [</div>", + output: "tabs = <div>] [</div>;", + }, + { + code: "slash_n = <div>]\n\n[</div>", + output: "slash_n = <div>] [</div>;", + }, + { + code: "slash_r = <div>]\r\r[</div>", + output: "slash_r = <div>] [</div>;", + }, + { + code: "slash_f = <div>]\f\f[</div>", + output: "slash_f = <div>]\f\f[</div>;", + }, + { + code: "slash_v = <div>]\v\v[</div>", + output: "slash_v = <div>]\v\v[</div>;", + }, + { + code: "non_breaking_spaces = <div>]\u00A0\u00A0[</div>", + output: "non_breaking_spaces = <div>]\u00A0\u00A0[</div>;", + }, + { + code: "em_space = <div>]\u2003\u2003[</div>", + output: "em_space = <div>]\u2003\u2003[</div>;", + }, + { + code: "hair_space = <div>]\u200a\u200a[</div>", + output: "hair_space = <div>]\u200a\u200a[</div>;", + }, + { + code: "zero_width_space = <div>]\u200b\u200b[</div>", + output: "zero_width_space = <div>]\u200b\u200b[</div>;", + }, + { + code: outdent` + real_world_non_breaking_spaces = <p> + Supprimer l’objectif «\u00A0{goal.name}\u00A0» ? + </p> + `, + output: outdent` + real_world_non_breaking_spaces = <p>Supprimer l’objectif «\u00A0{goal.name}\u00A0» ?</p>; + `, + }, + { + code: outdent` + real_world_non_breaking_spaces2 = <p> + Supprimer l’objectif padding padding padding padding padding padding «\u00A0{goal.name}\u00A0» ? + </p> + `, + output: outdent` + real_world_non_breaking_spaces2 = ( + <p> + Supprimer l’objectif padding padding padding padding padding padding «\u00A0 + {goal.name}\u00A0» ? + </p> + ); + `, + }, + { + code: outdent` + <p> + <span />\u3000{this.props.data.title}\u3000<span /> + </p> + `, + output: outdent` + <p> + <span />\u3000{this.props.data.title}\u3000<span /> + </p>; + `, + }, + ].map((test) => ({ ...test, output: test.output + "\n" })), + }, + ["flow", "typescript"], +); diff --git a/tests/format/jsx/whitespace/jsfmt.spec.js b/tests/format/jsx/whitespace/jsfmt.spec.js deleted file mode 100644 index e3e838ef6a4e..000000000000 --- a/tests/format/jsx/whitespace/jsfmt.spec.js +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint-disable no-irregular-whitespace */ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - { - code: "spaces = <div>] [</div>", - output: "spaces = <div>] [</div>;", - }, - { - code: "tabs = <div>] \t [</div>", - output: "tabs = <div>] [</div>;", - }, - { - code: "slash_n = <div>]\n\n[</div>", - output: "slash_n = <div>] [</div>;", - }, - { - code: "slash_r = <div>]\r\r[</div>", - output: "slash_r = <div>] [</div>;", - }, - { - code: "slash_f = <div>]\f\f[</div>", - output: "slash_f = <div>]\f\f[</div>;", - }, - { - code: "slash_v = <div>]\v\v[</div>", - output: "slash_v = <div>]\v\v[</div>;", - }, - { - code: "non_breaking_spaces = <div>]\u00A0\u00A0[</div>", - output: "non_breaking_spaces = <div>]\u00A0\u00A0[</div>;", - }, - { - code: "em_space = <div>]\u2003\u2003[</div>", - output: "em_space = <div>]\u2003\u2003[</div>;", - }, - { - code: "hair_space = <div>]\u200a\u200a[</div>", - output: "hair_space = <div>]\u200a\u200a[</div>;", - }, - { - code: "zero_width_space = <div>]\u200b\u200b[</div>", - output: "zero_width_space = <div>]\u200b\u200b[</div>;", - }, - { - code: outdent` - real_world_non_breaking_spaces = <p> - Supprimer l’objectif «\u00A0{goal.name}\u00A0» ? - </p> - `, - output: outdent` - real_world_non_breaking_spaces = <p>Supprimer l’objectif «\u00A0{goal.name}\u00A0» ?</p>; - `, - }, - { - code: outdent` - real_world_non_breaking_spaces2 = <p> - Supprimer l’objectif padding padding padding padding padding padding «\u00A0{goal.name}\u00A0» ? - </p> - `, - output: outdent` - real_world_non_breaking_spaces2 = ( - <p> - Supprimer l’objectif padding padding padding padding padding padding «\u00A0 - {goal.name}\u00A0» ? - </p> - ); - `, - }, - { - code: outdent` - <p> - <span />\u3000{this.props.data.title}\u3000<span /> - </p> - `, - output: outdent` - <p> - <span />\u3000{this.props.data.title}\u3000<span /> - </p>; - `, - }, - ].map((test) => ({ ...test, output: test.output + "\n" })), - }, - ["flow", "typescript"] -); diff --git a/tests/format/less/case/15460.less b/tests/format/less/case/15460.less new file mode 100644 index 000000000000..e2eb9c12340b --- /dev/null +++ b/tests/format/less/case/15460.less @@ -0,0 +1,13 @@ +.what { + .make-modifier(@name, @filename) { + &--@{name} { + --bg: url("@{filename}"); + } + } + + .make-modifier(1A, "1a.png"); + .make-modifier(AA, "1a.png"); + + // Still wrongly lowercased, because `x` is an unit + .make-modifier(1X, "1x.png"); +} diff --git a/tests/format/less/case/__snapshots__/format.test.js.snap b/tests/format/less/case/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c0fbde990b2e --- /dev/null +++ b/tests/format/less/case/__snapshots__/format.test.js.snap @@ -0,0 +1,515 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`15460.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +.what { + .make-modifier(@name, @filename) { + &--@{name} { + --bg: url("@{filename}"); + } + } + + .make-modifier(1A, "1a.png"); + .make-modifier(AA, "1a.png"); + + // Still wrongly lowercased, because \`x\` is an unit + .make-modifier(1X, "1x.png"); +} + +=====================================output===================================== +.what { + .make-modifier(@name, @filename) { + &--@{name} { + --bg: url("@{filename}"); + } + } + + .make-modifier(1A, "1a.png"); + .make-modifier(AA, "1a.png"); + + // Still wrongly lowercased, because \`x\` is an unit + .make-modifier(1x, "1x.png"); +} + +================================================================================ +`; + +exports[`case.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Convention in this test file: +// - The case should be preserved for things prefixed with "Keep". +// - The case should always be preserved for element names and attribute names +// in selectors, as well as function names and property keywords. +// - Other things should mostly be lowercase. +// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check. + +@IMPORT Keep; + +HTML#KeepId.KeepClass, +a[HREF=KeepAttrValue]:HOVER::FIRST-letter, +svg[viewBox] linearGradient, +:Not(:NTH-child(2N+1)) { + COLOR: #AAbbCC; + BACKGROUND-image: URL("KeepString"); + Margin: 5PX .2E10Em; + --Keep-custom-Prop: red; + background: Var(--Keep-custom-Prop); + animation-name: KeepAnimationName; + important: something !IMPORTANT; + font-family: INITIAL; + padding: UNSET; + border: INHERIT; + all: REVERT; + -WEBKIT-USER-SELECT: none; + -MOZ-USER-SELECT: none; + -MS-USER-SELECT: none; + USER-SELECT: none; +} + +@keyframes KeepAnimationName { + FROM { + prop: val; + } + + @{KeepInterpolationVar} { + prop: val; + } + + TO { + prop: val; + } +} + +@custom-media --KeepCustomMedia screen and (width >= 768px); +@media (--KeepCustomMedia) {} + +@KeepDetachedRuleset: /*:*/ { + BACKGROUND: RED; +} + +%KeepScssPlaceholderSelector { + prop: val; +} + +@KeepTopLevelVar: val; +$KeepScssVar: val; + +.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ { + @KeepVar: KeepName; /*:*/ + @{KeepInterpolationVar}: val; + $KeepScssVar: val; + @extend %KeepScssPlaceholderSelector; + + @{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} { + prop: val; + } + + &Keep & Element { + prop: val; + } + + @KeepDetachedRuleset(); + + &:extend(.Keep ALL); + &:EXTEND(.Keep ALL); + + .Keep; + .Keep(); + .Keep(4PX)!IMPORTANT; + .Keep() when (@Keep=Keep); + .Keep() when (@Keep=12PX); + .Keep() when (@Keep="12px"); + .Keep() when (@Keep="12PX"); + .Keep() when (@Keep=Keep12PX); +} + +.Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {} +.Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {} +.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {} + +.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {} +.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {} + +@MEDIA (MIN-WIDTH: 700PX) /*:*/ {} + +@MEDIA (@{Keep}: @{Keep}) {} + +@KEYFRAMES identifier { + FROM { + margin-top: 50px; + } + 50% { + margin-top: 150px; + } + TO { + margin-top: 100px; + } +} + +@-WEBKIT-KEYFRAMES float-up { + FROM { + margin-top: 50px; + } + 50% { + margin-top: 150px; + } + TO { + margin-top: 100px; + } +} + +.foo { + color: hsl(0.75TURN, 60%, 70%); +} + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} + +TABLE {} + +.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} } + +=====================================output===================================== +// Convention in this test file: +// - The case should be preserved for things prefixed with "Keep". +// - The case should always be preserved for element names and attribute names +// in selectors, as well as function names and property keywords. +// - Other things should mostly be lowercase. +// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check. + +@import Keep; + +HTML#KeepId.KeepClass, +a[HREF="KeepAttrValue"]:hover::first-letter, +svg[viewBox] linearGradient, +:not(:nth-child(2n + 1)) { + color: #aabbcc; + background-image: URL("KeepString"); + margin: 5px 0.2e10em; + --Keep-custom-Prop: red; + background: Var(--Keep-custom-Prop); + animation-name: KeepAnimationName; + important: something !important; + font-family: initial; + padding: unset; + border: inherit; + all: revert; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +@keyframes KeepAnimationName { + from { + prop: val; + } + + @{KeepInterpolationVar} { + prop: val; + } + + to { + prop: val; + } +} + +@custom-media --KeepCustomMedia screen and (width >= 768px); +@media (--KeepCustomMedia) { +} + +@KeepDetachedRuleset: /*:*/ { + BACKGROUND: RED; +}; + +%KeepScssPlaceholderSelector { + prop: val; +} + +@KeepTopLevelVar: val; +$KeepScssVar: val; + +.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ { + @KeepVar: KeepName; /*:*/ + @{KeepInterpolationVar}: val; + $KeepScssVar: val; + @extend %KeepScssPlaceholderSelector; + + @{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} { + prop: val; + }; + + &Keep & Element { + prop: val; + } + + @KeepDetachedRuleset(); + + &:extend(.Keep ALL); + &:EXTEND(.Keep ALL); + + .Keep; + .Keep(); + .Keep(4px) !important; + .Keep() when (@Keep=Keep); + .Keep() when (@Keep=12px); + .Keep() when (@Keep="12px"); + .Keep() when (@Keep="12PX"); + .Keep() when (@Keep=Keep12PX); +} + +.Keep (@Keep) when (lightness(@Keep) >= 12px) and (@Keep > 0) { +} +.Keep (@Keep) when (lightness(@Keep) != "12PX") and (@Keep != "12PX") { +} +.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) { +} + +.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ { +} +.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ { +} + +@media (min-width: 700px) /*:*/ { +} + +@media (@{Keep}: @{Keep}) { +} + +@keyframes identifier { + from { + margin-top: 50px; + } + 50% { + margin-top: 150px; + } + to { + margin-top: 100px; + } +} + +@-webkit-keyframes float-up { + from { + margin-top: 50px; + } + 50% { + margin-top: 150px; + } + to { + margin-top: 100px; + } +} + +.foo { + color: hsl(0.75turn, 60%, 70%); +} + +p:first-child { + color: lime; + background-color: black; + padding: 5px; +} + +a::after { + content: "→"; +} + +a:after { + content: "→"; +} + +::-webkit-progress-bar { + background-color: orange; +} + +TABLE { +} + +.foo { + &-KeepSelector { + } + &-KeepSelector & .KeepClassSelector { + } + &-100\\.200 { + } +} + +================================================================================ +`; + +exports[`variable.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Do not change case of property name if inside a variable declaration + +@var: { + notVar: 0; + @notVarNested: { + notVar: 1; + notVar2: 2; + }; +}; + +@var : { + preserveCase: 5; +}; + +@var: { + preserveCase: 5; +}; + +@var :{ + preserveCase: 5; +}; + +@var /* comment */ : /* comment */ { + preserveCase: 5; +}; + +@var: /* comment */ { + preserveCase: 5; +}; + +@var /* comment */ :{ + preserveCase: 5; +}; + +@var // comment +: // comment +{ + /* FIXME: should not change case */ + preserveCase: 5; +}; + +@var: // comment +{ + preserveCase: 5; +}; + +@var // comment +:{ + /* FIXME: should not change case */ + preserveCase: 5; +}; + +// Known css properties +@var: { + COLoR: RED; +}; + +@not-var { + canChangeCase: @var[@notVarNested][notVar]; + canChangeCase: @var[ @notVarNested][notVar]; + canChangeCase: @var[@notVarNested ][notVar]; + canChangeCase: @var[ @notVarNested ][notVar]; + canChangeCase: @var[@notVarNested][notVar]; + canChangeCase: @var[@notVarNested][ notVar]; + canChangeCase: @var[@notVarNested][notVar ]; + canChangeCase: @var[@notVarNested][ notVar ]; + canChangeCase: @var[notVar]; + canChangeCase: @var[ notVar]; + canChangeCase: @var[notVar ]; + canChangeCase: @var[ notVar ]; +} + +=====================================output===================================== +// Do not change case of property name if inside a variable declaration + +@var: { + notVar: 0; + @notVarNested: { + notVar: 1; + notVar2: 2; + }; +}; + +@var: { + preserveCase: 5; +}; + +@var: { + preserveCase: 5; +}; + +@var: { + preserveCase: 5; +}; + +@var: /* comment */ { + preserveCase: 5; +}; + +@var: /* comment */ { + preserveCase: 5; +}; + +@var: { + preserveCase: 5; +}; + +@var // comment +: // comment +{ + /* FIXME: should not change case */ + preservecase: 5; +} + +@var: // comment +{ + preserveCase: 5; +}; + +@var // comment +: { + /* FIXME: should not change case */ + preservecase: 5; +} + +// Known css properties +@var: { + COLoR: RED; +}; + +@not-var { + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[@notVarNested][notVar]; + canchangecase: @var[notVar]; + canchangecase: @var[notVar]; + canchangecase: @var[notVar]; + canchangecase: @var[notVar]; +} + +================================================================================ +`; diff --git a/tests/format/less/case/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/case/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f67031abd06b..000000000000 --- a/tests/format/less/case/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,477 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`case.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Convention in this test file: -// - The case should be preserved for things prefixed with "Keep". -// - The case should always be preserved for element names and attribute names -// in selectors, as well as function names and property keywords. -// - Other things should mostly be lowercase. -// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check. - -@IMPORT Keep; - -HTML#KeepId.KeepClass, -a[HREF=KeepAttrValue]:HOVER::FIRST-letter, -svg[viewBox] linearGradient, -:Not(:NTH-child(2N+1)) { - COLOR: #AAbbCC; - BACKGROUND-image: URL("KeepString"); - Margin: 5PX .2E10Em; - --Keep-custom-Prop: red; - background: Var(--Keep-custom-Prop); - animation-name: KeepAnimationName; - important: something !IMPORTANT; - font-family: INITIAL; - padding: UNSET; - border: INHERIT; - all: REVERT; - -WEBKIT-USER-SELECT: none; - -MOZ-USER-SELECT: none; - -MS-USER-SELECT: none; - USER-SELECT: none; -} - -@keyframes KeepAnimationName { - FROM { - prop: val; - } - - @{KeepInterpolationVar} { - prop: val; - } - - TO { - prop: val; - } -} - -@custom-media --KeepCustomMedia screen and (width >= 768px); -@media (--KeepCustomMedia) {} - -@KeepDetachedRuleset: /*:*/ { - BACKGROUND: RED; -} - -%KeepScssPlaceholderSelector { - prop: val; -} - -@KeepTopLevelVar: val; -$KeepScssVar: val; - -.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ { - @KeepVar: KeepName; /*:*/ - @{KeepInterpolationVar}: val; - $KeepScssVar: val; - @extend %KeepScssPlaceholderSelector; - - @{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} { - prop: val; - } - - &Keep & Element { - prop: val; - } - - @KeepDetachedRuleset(); - - &:extend(.Keep ALL); - &:EXTEND(.Keep ALL); - - .Keep; - .Keep(); - .Keep(4PX)!IMPORTANT; - .Keep() when (@Keep=Keep); - .Keep() when (@Keep=12PX); - .Keep() when (@Keep="12px"); - .Keep() when (@Keep="12PX"); - .Keep() when (@Keep=Keep12PX); -} - -.Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {} -.Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {} -.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {} - -.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {} -.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {} - -@MEDIA (MIN-WIDTH: 700PX) /*:*/ {} - -@MEDIA (@{Keep}: @{Keep}) {} - -@KEYFRAMES identifier { - FROM { - margin-top: 50px; - } - 50% { - margin-top: 150px; - } - TO { - margin-top: 100px; - } -} - -@-WEBKIT-KEYFRAMES float-up { - FROM { - margin-top: 50px; - } - 50% { - margin-top: 150px; - } - TO { - margin-top: 100px; - } -} - -.foo { - color: hsl(0.75TURN, 60%, 70%); -} - -p:FIRST-CHILD { - color: lime; - background-color: black; - padding: 5px; -} - -a::AFTER { - content: "→"; -} - -a:AFTER { - content: "→"; -} - -::-WEBKIT-PROGRESS-BAR { - background-color: orange; -} - -TABLE {} - -.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} } - -=====================================output===================================== -// Convention in this test file: -// - The case should be preserved for things prefixed with "Keep". -// - The case should always be preserved for element names and attribute names -// in selectors, as well as function names and property keywords. -// - Other things should mostly be lowercase. -// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check. - -@import Keep; - -HTML#KeepId.KeepClass, -a[HREF="KeepAttrValue"]:hover::first-letter, -svg[viewBox] linearGradient, -:not(:nth-child(2n + 1)) { - color: #aabbcc; - background-image: URL("KeepString"); - margin: 5px 0.2e10em; - --Keep-custom-Prop: red; - background: Var(--Keep-custom-Prop); - animation-name: KeepAnimationName; - important: something !important; - font-family: initial; - padding: unset; - border: inherit; - all: revert; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -@keyframes KeepAnimationName { - from { - prop: val; - } - - @{KeepInterpolationVar} { - prop: val; - } - - to { - prop: val; - } -} - -@custom-media --KeepCustomMedia screen and (width >= 768px); -@media (--KeepCustomMedia) { -} - -@KeepDetachedRuleset: /*:*/ { - BACKGROUND: RED; -}; - -%KeepScssPlaceholderSelector { - prop: val; -} - -@KeepTopLevelVar: val; -$KeepScssVar: val; - -.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ { - @KeepVar: KeepName; /*:*/ - @{KeepInterpolationVar}: val; - $KeepScssVar: val; - @extend %KeepScssPlaceholderSelector; - - @{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} { - prop: val; - }; - - &Keep & Element { - prop: val; - } - - @KeepDetachedRuleset(); - - &:extend(.Keep ALL); - &:EXTEND(.Keep ALL); - - .Keep; - .Keep(); - .Keep(4px) !important; - .Keep() when (@Keep=Keep); - .Keep() when (@Keep=12px); - .Keep() when (@Keep="12px"); - .Keep() when (@Keep="12PX"); - .Keep() when (@Keep=Keep12PX); -} - -.Keep (@Keep) when (lightness(@Keep) >= 12px) and (@Keep > 0) { -} -.Keep (@Keep) when (lightness(@Keep) != "12PX") and (@Keep != "12PX") { -} -.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) { -} - -.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ { -} -.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ { -} - -@media (min-width: 700px) /*:*/ { -} - -@media (@{Keep}: @{Keep}) { -} - -@keyframes identifier { - from { - margin-top: 50px; - } - 50% { - margin-top: 150px; - } - to { - margin-top: 100px; - } -} - -@-webkit-keyframes float-up { - from { - margin-top: 50px; - } - 50% { - margin-top: 150px; - } - to { - margin-top: 100px; - } -} - -.foo { - color: hsl(0.75turn, 60%, 70%); -} - -p:first-child { - color: lime; - background-color: black; - padding: 5px; -} - -a::after { - content: "→"; -} - -a:after { - content: "→"; -} - -::-webkit-progress-bar { - background-color: orange; -} - -TABLE { -} - -.foo { - &-KeepSelector { - } - &-KeepSelector & .KeepClassSelector { - } - &-100\\.200 { - } -} - -================================================================================ -`; - -exports[`variable.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Do not change case of property name if inside a variable declaration - -@var: { - notVar: 0; - @notVarNested: { - notVar: 1; - notVar2: 2; - }; -}; - -@var : { - preserveCase: 5; -}; - -@var: { - preserveCase: 5; -}; - -@var :{ - preserveCase: 5; -}; - -@var /* comment */ : /* comment */ { - preserveCase: 5; -}; - -@var: /* comment */ { - preserveCase: 5; -}; - -@var /* comment */ :{ - preserveCase: 5; -}; - -@var // comment -: // comment -{ - /* FIXME: should not change case */ - preserveCase: 5; -}; - -@var: // comment -{ - preserveCase: 5; -}; - -@var // comment -:{ - /* FIXME: should not change case */ - preserveCase: 5; -}; - -// Known css properties -@var: { - COLoR: RED; -}; - -@not-var { - canChangeCase: @var[@notVarNested][notVar]; - canChangeCase: @var[ @notVarNested][notVar]; - canChangeCase: @var[@notVarNested ][notVar]; - canChangeCase: @var[ @notVarNested ][notVar]; - canChangeCase: @var[@notVarNested][notVar]; - canChangeCase: @var[@notVarNested][ notVar]; - canChangeCase: @var[@notVarNested][notVar ]; - canChangeCase: @var[@notVarNested][ notVar ]; - canChangeCase: @var[notVar]; - canChangeCase: @var[ notVar]; - canChangeCase: @var[notVar ]; - canChangeCase: @var[ notVar ]; -} - -=====================================output===================================== -// Do not change case of property name if inside a variable declaration - -@var: { - notVar: 0; - @notVarNested: { - notVar: 1; - notVar2: 2; - }; -}; - -@var: { - preserveCase: 5; -}; - -@var: { - preserveCase: 5; -}; - -@var: { - preserveCase: 5; -}; - -@var: /* comment */ { - preserveCase: 5; -}; - -@var: /* comment */ { - preserveCase: 5; -}; - -@var: { - preserveCase: 5; -}; - -@var // comment -: // comment -{ - /* FIXME: should not change case */ - preservecase: 5; -} - -@var: // comment -{ - preserveCase: 5; -}; - -@var // comment -: { - /* FIXME: should not change case */ - preservecase: 5; -} - -// Known css properties -@var: { - COLoR: RED; -}; - -@not-var { - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[@notVarNested][notVar]; - canchangecase: @var[notVar]; - canchangecase: @var[notVar]; - canchangecase: @var[notVar]; - canchangecase: @var[notVar]; -} - -================================================================================ -`; diff --git a/tests/format/less/case/format.test.js b/tests/format/less/case/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/case/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/case/jsfmt.spec.js b/tests/format/less/case/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/case/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/comments/__snapshots__/format.test.js.snap b/tests/format/less/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8d7a24138a4b --- /dev/null +++ b/tests/format/less/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,495 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`CRLF.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@nice-blue: #5B83AD; +@light-blue: @nice-blue + #111; + +// Comment 1 +/* + * Comment 2 + */ +#header { + // Comment 3 + /* + * Comment 4 + */ + color: @light-blue; +} + +@media only screen and (max-width: 600px) { + // Comment 1 + /* + * Comment 5 + */ + body { + background-color: lightblue; // Comment 6 + color: red; /* Comment 7 */ + } +} + +=====================================output===================================== +@nice-blue: #5b83ad; +@light-blue: @nice-blue + #111; + +// Comment 1 +/* + * Comment 2 + */ +#header { + // Comment 3 + /* + * Comment 4 + */ + color: @light-blue; +} + +@media only screen and (max-width: 600px) { + // Comment 1 + /* + * Comment 5 + */ + body { + background-color: lightblue; // Comment 6 + color: red; /* Comment 7 */ + } +} + +================================================================================ +`; + +exports[`between-decl.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +selector { +prop: // comment +value; + +prop: /* block */ value; + +prop +: value; +} + +// #5603 +.grid { + grid-template-areas: // + "header header header" // + "sidebar content content" // + "footer footer footer"; + + grid-template-areas: + "header header header" // + "sidebar content content" // + "footer footer footer"; + } + +// TODO: make these pretty +selector { +prop: +/* block */ +value; + +prop/* block */: +value; + +prop +/* block */ +: +value; + +prop/* before */: // after +value; + + +prop/* before */: /* after*/ +value; +} + +=====================================output===================================== +selector { + prop: // comment + value; + + prop: /* block */ value; + + prop: value; +} + +// #5603 +.grid { + grid-template-areas: // + "header header header" // + "sidebar content content" // + "footer footer footer"; + + grid-template-areas: "header header header" // + "sidebar content content" // + "footer footer footer"; +} + +// TODO: make these pretty +selector { + prop: +/* block */ value; + + prop/* block */: value; + + prop/* block */ +: value; + + prop/* before */: // after + value; + + prop/* before */: /* after*/ value; +} + +================================================================================ +`; + +exports[`block.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Animation definitions cannot cross the shadow boundary, +// and thus need to be loaded directly into the atom-text-editor scope. +/* Kikoo */ +/** + * Kikoo + */ + +=====================================output===================================== +// Animation definitions cannot cross the shadow boundary, +// and thus need to be loaded directly into the atom-text-editor scope. +/* Kikoo */ +/** + * Kikoo + */ + +================================================================================ +`; + +exports[`block-2.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* Kikoo */ +/** + * Kikoo + */ + +=====================================output===================================== +/* Kikoo */ +/** + * Kikoo + */ + +================================================================================ +`; + +exports[`in-value.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +.real-world-example { + background: radial-gradient( + circle at left 0% bottom $position, + transparent, + transparent $diameter, + #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. + ); +} + +.simplification { + foo: ( + calc() // not a comment anymore + ); +} + +=====================================output===================================== +.real-world-example { + background: radial-gradient( + circle at left 0% bottom $position, + transparent, + transparent $diameter, + #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. + ); +} + +.simplification { + foo: ( + calc() // not a comment anymore + ); +} + +================================================================================ +`; + +exports[`issue-8130.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@import "../node_modules/foo/bar.less"; + +// @index(['./components/**/*.less', '!./**/_demo/**'], f => \`@import '\${f.path}\${f.ext}';\`) +@import './components/Button/Button.less'; +@import './components/Form/Form.less'; +@import './components/Input/Input.less'; +// @endindex + +=====================================output===================================== +@import "../node_modules/foo/bar.less"; + +// @index(['./components/**/*.less', '!./**/_demo/**'], f => \`@import '\${f.path}\${f.ext}';\`) +@import "./components/Button/Button.less"; +@import "./components/Form/Form.less"; +@import "./components/Input/Input.less"; +// @endindex + +================================================================================ +`; + +exports[`mixed.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import 'b'; +// another comment +//no-space before + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import "b"; +// another comment +//no-space before + +================================================================================ +`; + +exports[`mixed-2.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ +@import "a"; +//* +@import 'b'; +/* block */ +/*no-space block*/ + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ +@import "a"; +//* +@import "b"; +/* block */ +/*no-space block*/ + +================================================================================ +`; + +exports[`mixed-block.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import 'b'; +/* block */ +/*no-space block*/ + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import "b"; +/* block */ +/*no-space block*/ + +================================================================================ +`; + +exports[`places.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +div { + // a + + margin-left: -@leftMargin; // b +} // c + +// d +div {} + +=====================================output===================================== +div { + // a + + margin-left: -@leftMargin; // b +} // c + +// d +div { +} + +================================================================================ +`; + +exports[`prettier-ignore.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// prettier-ignore +@blue: blue; +@black: darkgray; + +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +=====================================output===================================== +// prettier-ignore +@blue: blue; +@black: darkgray; + +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +================================================================================ +`; + +exports[`selectors.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +=====================================output===================================== +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ + --centered/* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +================================================================================ +`; + +exports[`trailing_star_slash.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@media (max-width: 1) {} +a { + // element.style */ +} + +=====================================output===================================== +@media (max-width: 1) { +} +a { + // element.style */ +} + +================================================================================ +`; + +exports[`value-lists.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@test-space-separated: #aaaaaa // Start with A + #bbbbbb // then some B + #cccccc; // and round it out with C + +@test-space-separated : #aaaaaa // Start with A + #bbbbbb // then some B + #cccccc; // and round it out with C + +@test-comma-separated: #aaaaaa, // Start with A + #bbbbbb, // then some B + #cccccc; // and round it out with C + +=====================================output===================================== +@test-space-separated: #aaaaaa // Start with A + #bbbbbb // then some B + #cccccc; // and round it out with C + +@test-space-separated: #aaaaaa // Start with A + #bbbbbb // then some B + #cccccc; // and round it out with C + +@test-comma-separated: + #aaaaaa, + // Start with A + #bbbbbb, + // then some B + #cccccc; // and round it out with C + +================================================================================ +`; diff --git a/tests/format/less/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d34539e2bca9..000000000000 --- a/tests/format/less/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,465 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CRLF.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@nice-blue: #5B83AD; -@light-blue: @nice-blue + #111; - -// Comment 1 -/* - * Comment 2 - */ -#header { - // Comment 3 - /* - * Comment 4 - */ - color: @light-blue; -} - -@media only screen and (max-width: 600px) { - // Comment 1 - /* - * Comment 5 - */ - body { - background-color: lightblue; // Comment 6 - color: red; /* Comment 7 */ - } -} - -=====================================output===================================== -@nice-blue: #5b83ad; -@light-blue: @nice-blue + #111; - -// Comment 1 -/* - * Comment 2 - */ -#header { - // Comment 3 - /* - * Comment 4 - */ - color: @light-blue; -} - -@media only screen and (max-width: 600px) { - // Comment 1 - /* - * Comment 5 - */ - body { - background-color: lightblue; // Comment 6 - color: red; /* Comment 7 */ - } -} - -================================================================================ -`; - -exports[`between-decl.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -selector { -prop: // comment -value; - -prop: /* block */ value; - -prop -: value; -} - -// #5603 -.grid { - grid-template-areas: // - "header header header" // - "sidebar content content" // - "footer footer footer"; - - grid-template-areas: - "header header header" // - "sidebar content content" // - "footer footer footer"; - } - -// TODO: make these pretty -selector { -prop: -/* block */ -value; - -prop/* block */: -value; - -prop -/* block */ -: -value; - -prop/* before */: // after -value; - - -prop/* before */: /* after*/ -value; -} - -=====================================output===================================== -selector { - prop: // comment - value; - - prop: /* block */ value; - - prop: value; -} - -// #5603 -.grid { - grid-template-areas: // - "header header header" // - "sidebar content content" // - "footer footer footer"; - - grid-template-areas: "header header header" // - "sidebar content content" // - "footer footer footer"; -} - -// TODO: make these pretty -selector { - prop: -/* block */ value; - - prop/* block */: value; - - prop/* block */ -: value; - - prop/* before */: // after - value; - - prop/* before */: /* after*/ value; -} - -================================================================================ -`; - -exports[`block.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Animation definitions cannot cross the shadow boundary, -// and thus need to be loaded directly into the atom-text-editor scope. -/* Kikoo */ -/** - * Kikoo - */ - -=====================================output===================================== -// Animation definitions cannot cross the shadow boundary, -// and thus need to be loaded directly into the atom-text-editor scope. -/* Kikoo */ -/** - * Kikoo - */ - -================================================================================ -`; - -exports[`block-2.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* Kikoo */ -/** - * Kikoo - */ - -=====================================output===================================== -/* Kikoo */ -/** - * Kikoo - */ - -================================================================================ -`; - -exports[`in-value.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -.real-world-example { - background: radial-gradient( - circle at left 0% bottom $position, - transparent, - transparent $diameter, - #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. - ); -} - -.simplification { - foo: ( - calc() // not a comment anymore - ); -} - -=====================================output===================================== -.real-world-example { - background: radial-gradient( - circle at left 0% bottom $position, - transparent, - transparent $diameter, - #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. - ); -} - -.simplification { - foo: ( - calc() // not a comment anymore - ); -} - -================================================================================ -`; - -exports[`issue-8130.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@import "../node_modules/foo/bar.less"; - -// @index(['./components/**/*.less', '!./**/_demo/**'], f => \`@import '\${f.path}\${f.ext}';\`) -@import './components/Button/Button.less'; -@import './components/Form/Form.less'; -@import './components/Input/Input.less'; -// @endindex - -=====================================output===================================== -@import "../node_modules/foo/bar.less"; - -// @index(['./components/**/*.less', '!./**/_demo/**'], f => \`@import '\${f.path}\${f.ext}';\`) -@import "./components/Button/Button.less"; -@import "./components/Form/Form.less"; -@import "./components/Input/Input.less"; -// @endindex - -================================================================================ -`; - -exports[`mixed.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import 'b'; -// another comment -//no-space before - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import "b"; -// another comment -//no-space before - -================================================================================ -`; - -exports[`mixed-2.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ -@import "a"; -//* -@import 'b'; -/* block */ -/*no-space block*/ - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ -@import "a"; -//* -@import "b"; -/* block */ -/*no-space block*/ - -================================================================================ -`; - -exports[`mixed-block.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import 'b'; -/* block */ -/*no-space block*/ - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import "b"; -/* block */ -/*no-space block*/ - -================================================================================ -`; - -exports[`places.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -div { - // a - - margin-left: -@leftMargin; // b -} // c - -// d -div {} - -=====================================output===================================== -div { - // a - - margin-left: -@leftMargin; // b -} // c - -// d -div { -} - -================================================================================ -`; - -exports[`prettier-ignore.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// prettier-ignore -@blue: blue; -@black: darkgray; - -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -=====================================output===================================== -// prettier-ignore -@blue: blue; -@black: darkgray; - -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -================================================================================ -`; - -exports[`trailing_star_slash.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@media (max-width: 1) {} -a { - // element.style */ -} - -=====================================output===================================== -@media (max-width: 1) { -} -a { - // element.style */ -} - -================================================================================ -`; - -exports[`value-lists.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@test-space-separated: #aaaaaa // Start with A - #bbbbbb // then some B - #cccccc; // and round it out with C - -@test-space-separated : #aaaaaa // Start with A - #bbbbbb // then some B - #cccccc; // and round it out with C - -@test-comma-separated: #aaaaaa, // Start with A - #bbbbbb, // then some B - #cccccc; // and round it out with C - -=====================================output===================================== -@test-space-separated: #aaaaaa // Start with A - #bbbbbb // then some B - #cccccc; // and round it out with C - -@test-space-separated: #aaaaaa // Start with A - #bbbbbb // then some B - #cccccc; // and round it out with C - -@test-comma-separated: #aaaaaa, - // Start with A - #bbbbbb, - // then some B - #cccccc; // and round it out with C - -================================================================================ -`; diff --git a/tests/format/less/comments/format.test.js b/tests/format/less/comments/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/comments/jsfmt.spec.js b/tests/format/less/comments/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/comments/selectors.less b/tests/format/less/comments/selectors.less new file mode 100644 index 000000000000..3817d248dab3 --- /dev/null +++ b/tests/format/less/comments/selectors.less @@ -0,0 +1,8 @@ +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} diff --git a/tests/format/less/custom-properties/__snapshots__/format.test.js.snap b/tests/format/less/custom-properties/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0060b9c672f1 --- /dev/null +++ b/tests/format/less/custom-properties/__snapshots__/format.test.js.snap @@ -0,0 +1,75 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`apply-rule.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +=====================================output===================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: { + color: red; + }; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +================================================================================ +`; diff --git a/tests/format/less/custom-properties/apply-rule.less b/tests/format/less/custom-properties/apply-rule.less new file mode 100644 index 000000000000..56c04e2c251a --- /dev/null +++ b/tests/format/less/custom-properties/apply-rule.less @@ -0,0 +1,30 @@ +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} diff --git a/tests/format/less/custom-properties/format.test.js b/tests/format/less/custom-properties/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/custom-properties/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/empty/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/empty/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/empty/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/empty/__snapshots__/format.test.js.snap diff --git a/tests/format/less/empty/format.test.js b/tests/format/less/empty/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/empty/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/empty/jsfmt.spec.js b/tests/format/less/empty/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/empty/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/function-selector/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/function-selector/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/function-selector/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/function-selector/__snapshots__/format.test.js.snap diff --git a/tests/format/less/function-selector/format.test.js b/tests/format/less/function-selector/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/function-selector/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/function-selector/jsfmt.spec.js b/tests/format/less/function-selector/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/function-selector/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/important/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/important/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/important/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/important/__snapshots__/format.test.js.snap diff --git a/tests/format/less/important/format.test.js b/tests/format/less/important/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/important/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/important/jsfmt.spec.js b/tests/format/less/important/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/important/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/inline-javascript/__snapshots__/format.test.js.snap b/tests/format/less/inline-javascript/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1c360caf2768 --- /dev/null +++ b/tests/format/less/inline-javascript/__snapshots__/format.test.js.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inline-javascript.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Deprecated feature https://lesscss.org/usage/#less-options-enable-inline-javascript-deprecated- + +.calcPxMixin() { + @functions: ~\`(function() { + const designWidth = 3840 + const actualWidth = 5760 + this.calcPx = function(_) { + return _ * actualWidth / designWidth + 'px' + } + })()\` +} + +=====================================output===================================== +// Deprecated feature https://lesscss.org/usage/#less-options-enable-inline-javascript-deprecated- + +.calcPxMixin() { + @functions: ~\`(function() { + const designWidth = 3840 + const actualWidth = 5760 + this.calcPx = function(_) { + return _ * actualWidth / designWidth + 'px' + } + })()\`; +} + +================================================================================ +`; diff --git a/tests/format/less/inline-javascript/format.test.js b/tests/format/less/inline-javascript/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/inline-javascript/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/inline-javascript/inline-javascript.less b/tests/format/less/inline-javascript/inline-javascript.less new file mode 100644 index 000000000000..c057e4980035 --- /dev/null +++ b/tests/format/less/inline-javascript/inline-javascript.less @@ -0,0 +1,11 @@ +// Deprecated feature https://lesscss.org/usage/#less-options-enable-inline-javascript-deprecated- + +.calcPxMixin() { + @functions: ~`(function() { + const designWidth = 3840 + const actualWidth = 5760 + this.calcPx = function(_) { + return _ * actualWidth / designWidth + 'px' + } + })()` +} diff --git a/tests/format/less/interpolation/__snapshots__/format.test.js.snap b/tests/format/less/interpolation/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ccf8d3e608fd --- /dev/null +++ b/tests/format/less/interpolation/__snapshots__/format.test.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`interpolation.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/shellscape/postcss-less/pull/159 +@{selector}-title{ @{prop}-size: @{color} } + +=====================================output===================================== +// https://github.com/shellscape/postcss-less/pull/159 +@{selector}-title { + @{prop}-size: @{color}; +} + +================================================================================ +`; + +exports[`selector.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@prefix: foo; + +@{prefix}-title{ + color: red; +} + +=====================================output===================================== +@prefix: foo; + +@{prefix}-title { + color: red; +} + +================================================================================ +`; diff --git a/tests/format/less/interpolation/format.test.js b/tests/format/less/interpolation/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/interpolation/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/interpolation/interpolation.less b/tests/format/less/interpolation/interpolation.less new file mode 100644 index 000000000000..dd514fa1c46b --- /dev/null +++ b/tests/format/less/interpolation/interpolation.less @@ -0,0 +1,2 @@ +// https://github.com/shellscape/postcss-less/pull/159 +@{selector}-title{ @{prop}-size: @{color} } diff --git a/tests/format/less/interpolation/selector.less b/tests/format/less/interpolation/selector.less new file mode 100644 index 000000000000..c34eee0c363b --- /dev/null +++ b/tests/format/less/interpolation/selector.less @@ -0,0 +1,5 @@ +@prefix: foo; + +@{prefix}-title{ + color: red; +} diff --git a/tests/format/less/less/__snapshots__/format.test.js.snap b/tests/format/less/less/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0730bbe0e987 --- /dev/null +++ b/tests/format/less/less/__snapshots__/format.test.js.snap @@ -0,0 +1,3534 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// This comment won't be included in the CSS. +//This comment won't be included in the CSS. +// This comment won't be included in the CSS. + +/* But this comment will, except in compressed mode. */ +/* But this comment will, except in compressed mode. */ +/*But this comment will, except in compressed mode.*/ + +/*! This comment will be included even in compressed mode. */ + +/// Computes an exponent. +///// Computes an exponent. + +=====================================output===================================== +// This comment won't be included in the CSS. +//This comment won't be included in the CSS. +// This comment won't be included in the CSS. + +/* But this comment will, except in compressed mode. */ +/* But this comment will, except in compressed mode. */ +/*But this comment will, except in compressed mode.*/ + +/*! This comment will be included even in compressed mode. */ + +/// Computes an exponent. +///// Computes an exponent. + +================================================================================ +`; + +exports[`function-each.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// http://lesscss.org/functions/#list-functions-each + +@selectors: blue, green, red; + +each(@selectors, { + .sel-@{value} { + a: b; + } +}); + + +// TODO: fix this +each(@selectors, +{ + .sel-@{value} { +a: b; + } +}); + +=====================================output===================================== +// http://lesscss.org/functions/#list-functions-each + +@selectors: blue, green, red; + +each(@selectors, { + .sel-@{value} { + a: b; + } +}); + +// TODO: fix this +each(@selectors, +{ + .sel-@{value} { +a: b; + } +}); + +================================================================================ +`; + +exports[`issue-11483--never-append-anything.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@variable: { + field: something; +}; + +=====================================output===================================== +@variable: { + field: something; +}; + +================================================================================ +`; + +exports[`less.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@nice-blue: #5B83AD; +@light-blue: @nice-blue + #111; + +#header { + color: @light-blue; +} + + +#header { + color: #6c94be; +} + + +.bordered { + border-top: dotted 1px black; + border-bottom: solid 2px black; +} + + +#menu a { + color: #111; + .bordered; +} + +.post a { + color: red; + .bordered; +} + + +#header { + color: black; +} +#header .navigation { + font-size: 12px; +} +#header .logo { + width: 300px; +} + + +#header { + color: black; + .navigation { + font-size: 12px; + } + .logo { + width: 300px; + } +} + + +.clearfix { + display: block; + zoom: 1; + + &:after { + content: " "; + display: block; + font-size: 0; + height: 0; + clear: both; + visibility: hidden; + } +} + + +.screen-color { + @media screen { + color: green; + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} + + +@media screen { + .screen-color { + color: green; + } +} +@media screen and (min-width: 768px) { + .screen-color { + color: red; + } +} +@media tv { + .screen-color { + color: black; + } +} + + +#a { + color: blue; + @font-face { + src: made-up-url; + } + padding: 2 2 2 2; +} + + +#a { + color: blue; +} +@font-face { + src: made-up-url; +} +#a { + padding: 2 2 2 2; +} + + +// numbers are converted into the same units +@conversion-1: 5cm + 10mm; // result is 6cm +@conversion-2: 2 - 3cm - 5mm; // result is -1.5cm + +// conversion is impossible +@incompatible-units: 2 + 5px - 3cm; // result is 4px + +// example with variables +@base: 5%; +@filler: @base * 2; // result is 10% +@other: @base + @filler; // result is 15% + + +@base: 2cm * 3mm; // result is 6cm + + +@color: #224488 / 2; //results in #112244 +background-color: #112244 + #111; // result is #223355 + + +.weird-element { + content: ~"^//* some horrible but needed css hack"; +} + + +@base: #f04615; +@width: 0.5; + +.class { + width: percentage(@width); // returns \`50%\` + color: saturate(@base, 5%); + background-color: spin(lighten(@base, 25%), 8); +} + + +#bundle { + .button { + display: block; + border: 1px solid black; + background-color: grey; + &:hover { + background-color: white + } + } + .tab { /* ... */ } + .citation { /* ... */ } +} + + +#header a { + color: orange; + #bundle > .button; +} + + +@var: red; + +#page { + @var: white; + #header { + color: @var; // white + } +} + + +@var: red; + +#page { + #header { + color: @var; // white + } + @var: white; +} + + +/* One hell of a block +style comment! */ +@var: red; + +// Get in line! +@var: white; + + +@import "library"; // library.less +@import "typo.css"; + + +a, +.link { + color: #428bca; +} +.widget { + color: #fff; + background: #428bca; +} + + +// Variables +@link-color: #428bca; // sea blue +@link-color-hover: darken(@link-color, 10%); + +// Usage +a, +.link { + color: @link-color; +} +a:hover { + color: @link-color-hover; +} +.widget { + color: #fff; + background: @link-color; +} + + +// Variables +@my-selector: banner; + +// Usage +.@{my-selector} { + font-weight: bold; + line-height: 40px; + margin: 0 auto; +} + + +.banner { + font-weight: bold; + line-height: 40px; + margin: 0 auto; +} + + +// Variables +@images: "../img"; + +// Usage +body { + color: #444; + width: 100px; + background: url('/foo/@{images}/bar'); + background: url("@{images}/white-sand.\${width}.png"); + background: url(@images); +} + + +// Variables +@themes: "../../src/themes"; + +// Usage +@import "@{themes}/tidal-wave.less"; + + +@property: color; + +.widget { + @{property}: #0ee; + background-@{property}: #999; +} + + +.widget { + color: #0ee; + background-color: #999; +} + + +@fnord: "I am fnord."; +@var: "fnord"; +content: @@var; + + +content: "I am fnord."; + + +.lazy-eval { + width: @var; +} + +@var: @a; +@a: 9%; + + +.lazy-eval-scope { + width: @var; + @a: 9%; +} + +@var: @a; +@a: 100%; + + +.lazy-eval-scope { + width: 9%; +} + + +@var: 0; +.class { + @var: 1; + .brass { + @var: 2; + three: @var; + @var: 3; + } + one: @var; +} + + +.class { + one: 1; +} +.class .brass { + three: 3; +} + + +// library +@base-color: green; +@dark-color: darken(@base-color, 10%); + +// use of library +@import "library.less"; +@base-color: red; + + +nav ul { + &:extend(.inline); + background: blue; +} + + +nav ul { + &:extend(.inline); + background: blue; +} +.inline { + color: red; +} + + +nav ul { + background: blue; +} +.inline, +nav ul { + color: red; +} + + +.a:extend(.b) {} + +// the above block does the same thing as the below block +.a { + &:extend(.b); +} + + +.c:extend(.d all) { + // extends all instances of ".d" e.g. ".x.d" or ".d.x" +} +.c:extend(.d) { + // extends only instances where the selector will be output as just ".d" +} + + +.e:extend(.f) {} +.e:extend(.g) {} + +// the above an the below do the same thing +.e:extend(.f, .g) {} + + +.big-division, +.big-bag:extend(.bag), +.big-bucket:extend(.bucket) { + // body +} + + +pre:hover, +.some-class { + &:extend(div pre); +} + + +pre:hover:extend(div pre), +.some-class:extend(div pre) {} + + +.bucket { + tr { // nested ruleset with target selector + color: blue; + } +} +.some-class:extend(.bucket tr) {} // nested ruleset is recognized + + +.bucket tr, +.some-class { + color: blue; +} + + +.bucket { + tr & { // nested ruleset with target selector + color: blue; + } +} +.some-class:extend(tr .bucket) {} // nested ruleset is recognized + + +tr .bucket, +.some-class { + color: blue; +} + + +.a.class, +.class.a, +.class > .a { + color: blue; +} +.test:extend(.class) {} // this will NOT match the any selectors above + + +*.class { + color: blue; +} +.noStar:extend(.class) {} // this will NOT match the *.class selector + + +*.class { + color: blue; +} + + +link:hover:visited { + color: blue; +} +.selector:extend(link:visited:hover) {} + + +link:hover:visited { + color: blue; +} + + +:nth-child(1n+3) { + color: blue; +} +.child:extend(:nth-child(n+3)) {} + + +:nth-child(1n+3) { + color: blue; +} + + +[title=identifier] { + color: blue; +} +[title='identifier'] { + color: blue; +} +[title="identifier"] { + color: blue; +} + +.noQuote:extend([title=identifier]) {} +.singleQuote:extend([title='identifier']) {} +.doubleQuote:extend([title="identifier"]) {} + + +[title=identifier], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + +[title='identifier'], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + +[title="identifier"], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + + +.a.b.test, +.test.c { + color: orange; +} +.test { + &:hover { + color: green; + } +} + +.replacement:extend(.test all) {} + + +.a.b.test, +.test.c, +.a.b.replacement, +.replacement.c { + color: orange; +} +.test:hover, +.replacement:hover { + color: green; +} + + +@variable: .bucket; +@{variable} { // interpolated selector + color: blue; +} +.some-class:extend(.bucket) {} // does nothing, no match is found + + +.bucket { + color: blue; +} +.some-class:extend(@{variable}) {} // interpolated selector matches nothing +@variable: .bucket; + + +.bucket { + color: blue; +} + + +.bucket { + color: blue; +} +@{variable}:extend(.bucket) {} +@variable: .selector; + + +.bucket, .selector { + color: blue; +} + + +@media print { + .screenClass:extend(.selector) {} // extend inside media + .selector { // this will be matched - it is in the same media + color: black; + } +} +.selector { // ruleset on top of style sheet - extend ignores it + color: red; +} +@media screen { + .selector { // ruleset inside another media - extend ignores it + color: blue; + } +} + + +@media print { + .selector, + .screenClass { /* ruleset inside the same media was extended */ + color: black; + } +} +.selector { /* ruleset on top of style sheet was ignored */ + color: red; +} +@media screen { + .selector { /* ruleset inside another media was ignored */ + color: blue; + } +} + + +@media screen { + .screenClass:extend(.selector) {} // extend inside media + @media (min-width: 1023px) { + .selector { // ruleset inside nested media - extend ignores it + color: blue; + } + } +} + + +@media screen and (min-width: 1023px) { + .selector { /* ruleset inside another nested media was ignored */ + color: blue; + } +} + + +@media screen { + .selector { /* ruleset inside nested media - top level extend works */ + color: blue; + } + @media (min-width: 1023px) { + .selector { /* ruleset inside nested media - top level extend works */ + color: blue; + } + } +} + +.topLevel:extend(.selector) {} /* top level extend matches everything */ + + +@media screen { + .selector, + .topLevel { /* ruleset inside media was extended */ + color: blue; + } +} +@media screen and (min-width: 1023px) { + .selector, + .topLevel { /* ruleset inside nested media was extended */ + color: blue; + } +} + + +.alert-info, +.widget { + /* declarations */ +} + +.alert:extend(.alert-info, .widget) {} + + +.alert-info, +.widget, +.alert, +.alert { + /* declarations */ +} + + +.animal { + background-color: black; + color: white; +} + + +.animal { + background-color: black; + color: white; +} +.bear { + background-color: brown; +} + +.animal { + background-color: black; + color: white; +} +.bear { + &:extend(.animal); + background-color: brown; +} + + +.my-inline-block() { + display: inline-block; + font-size: 0; +} +.thing1 { + .my-inline-block; +} +.thing2 { + .my-inline-block; +} + + +.thing1 { + display: inline-block; + font-size: 0; +} +.thing2 { + display: inline-block; + font-size: 0; +} + + +.my-inline-block { + display: inline-block; + font-size: 0; +} +.thing1 { + &:extend(.my-inline-block); +} +.thing2 { + &:extend(.my-inline-block); +} + + +.my-inline-block, +.thing1, +.thing2 { + display: inline-block; + font-size: 0; +} + + +li.list > a { + // list styles +} +button.list-style { + &:extend(li.list > a); // use the same list styles +} + + +.a, #b { + color: red; +} +.mixin-class { + .a(); +} +.mixin-id { + #b(); +} + + +.a, #b { + color: red; +} +.mixin-class { + color: red; +} +.mixin-id { + color: red; +} + + +// these two statements do the same thing: +.a(); +.a; + + +.my-mixin { + color: black; +} +.my-other-mixin() { + background: white; +} +.class { + .my-mixin; + .my-other-mixin; +} + + +.my-mixin { + color: black; +} +.class { + color: black; + background: white; +} + + +.my-hover-mixin() { + &:hover { + border: 1px solid red; + } +} +button { + .my-hover-mixin(); +} + + +button:hover { + border: 1px solid red; +} + + +#outer { + .inner { + color: red; + } +} + +.c { + #outer > .inner; +} + + +// all do the same thing +#outer > .inner; +#outer > .inner(); +#outer .inner; +#outer .inner(); +#outer.inner; +#outer.inner(); + + +#my-library { + .my-mixin() { + color: black; + } +} +// which can be used like this +.class { + #my-library > .my-mixin(); +} + + +#namespace when (@mode=huge) { + .mixin() { /* */ } +} + +#namespace { + .mixin() when (@mode=huge) { /* */ } +} + + +#sp_1 when (default()) { + #sp_2 when (default()) { + .mixin() when not(default()) { /* */ } + } +} + + +.foo (@bg: #f5f5f5, @color: #900) { + background: @bg; + color: @color; +} +.unimportant { + .foo(); +} +.important { + .foo() !important; +} + + +.unimportant { + background: #f5f5f5; + color: #900; +} +.important { + background: #f5f5f5 !important; + color: #900 !important; +} + + +.border-radius(@radius) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + + +#header { + .border-radius(4px); +} +.button { + .border-radius(6px); +} + + +.border-radius(@radius: 5px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + + +#header { + .border-radius; +} + + +.wrap() { + text-wrap: wrap; + white-space: -moz-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} + +pre { .wrap } + + +pre { + text-wrap: wrap; + white-space: -moz-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} + + +.mixin(@color) { + color-1: @color; +} +.mixin(@color; @padding: 2) { + color-2: @color; + padding-2: @padding; +} +.mixin(@color; @padding; @margin: 2) { + color-3: @color; + padding-3: @padding; + margin: @margin @margin @margin @margin; +} +.some .selector div { + .mixin(#008000); +} + + +.some .selector div { + color-1: #008000; + color-2: #008000; + padding-2: 2; +} + + +.mixin(@color: black; @margin: 10px; @padding: 20px) { + color: @color; + margin: @margin; + padding: @padding; +} +.class1 { + .mixin(@margin: 20px; @color: #33acfe); +} +.class2 { + .mixin(#efca44; @padding: 40px); +} + + +.class1 { + color: #33acfe; + margin: 20px; + padding: 20px; +} +.class2 { + color: #efca44; + margin: 10px; + padding: 40px; +} + + +.box-shadow(@x: 0; @y: 0; @blur: 1px; @color: #000) { + -webkit-box-shadow: @arguments; + -moz-box-shadow: @arguments; + box-shadow: @arguments; +} +.big-block { + .box-shadow(2px; 5px); +} + + +.big-block { + -webkit-box-shadow: 2px 5px 1px #000; + -moz-box-shadow: 2px 5px 1px #000; + box-shadow: 2px 5px 1px #000; +} + + +.mixin(/* ... */) {} // matches 0-N arguments +.mixin() {} // matches exactly 0 arguments +.mixin(@a: 1) {} // matches 0-1 arguments +.mixin(@a: 1; /* ... */) {} // matches 0-N arguments +.mixin(@a; /* ... */) {} // matches 1-N arguments + + +.mixin(@a; @rest...) { + // @rest is bound to arguments after @a + // @arguments is bound to all arguments +} + + +.mixin(@s; @color) { /* ... */ } + +.class { + .mixin(@switch; #888); +} + + +.mixin(dark; @color) { + color: darken(@color, 10%); +} +.mixin(light; @color) { + color: lighten(@color, 10%); +} +.mixin(@_; @color) { + display: block; +} + + +@switch: light; + +.class { + .mixin(@switch; #888); +} + + +.class { + color: #a2a2a2; + display: block; +} + + +.mixin(@a) { + color: @a; +} +.mixin(@a; @b) { + color: fade(@a; @b); +} + + +.mixin() { + @width: 100%; + @height: 200px; +} + +.caller { + .mixin(); + width: @width; + height: @height; +} + + +.caller { + width: 100%; + height: 200px; +} + + +.average(@x, @y) { + @average: ((@x + @y) / 2); +} + +div { + .average(16px, 50px); // "call" the mixin + padding: @average; // use its "return" value +} + + +div { + padding: 33px; +} + + +.mixin() { + @size: in-mixin; + @definedOnlyInMixin: in-mixin; +} + +.class { + margin: @size @definedOnlyInMixin; + .mixin(); +} + +@size: globally-defined-value; // callers parent scope - no protection + + +.class { + margin: in-mixin in-mixin; +} + + +.unlock(@value) { // outer mixin + .doSomething() { // nested mixin + declaration: @value; + } +} + +#namespace { + .unlock(5); // unlock doSomething mixin + .doSomething(); //nested mixin was copied here and is usable +} + + +#namespace { + declaration: 5; +} + + +// declare detached ruleset +@detached-ruleset: { background: red; }; + +// use detached ruleset +.top { + @detached-ruleset(); +} + + +.top { + background: red; +} + + +.desktop-and-old-ie(@rules) { + @media screen and (min-width: 1200px) { @rules(); } + html.lt-ie9 & { @rules(); } +} + +header { + background-color: blue; + + .desktop-and-old-ie({ + background-color: red; + }); +} + + +header { + background-color: blue; +} +@media screen and (min-width: 1200px) { + header { + background-color: red; + } +} +html.lt-ie9 header { + background-color: red; +} + + +@my-ruleset: { + .my-selector { + background-color: black; + } + }; + + +@my-ruleset: { + .my-selector { + @media tv { + background-color: black; + } + } + }; +@media (orientation:portrait) { + @my-ruleset(); +} + + +@media (orientation: portrait) and tv { + .my-selector { + background-color: black; + } +} + + +// detached ruleset with a mixin +@detached-ruleset: { + .mixin() { + color:blue; + } +}; +// call detached ruleset +.caller { + @detached-ruleset(); + .mixin(); +} + + +.caller { + color: blue; +} + + +@detached-ruleset: { + @color:blue; // this variable is private +}; +.caller { + color: @color; // syntax error +} + + +@detached-ruleset: { + caller-variable: @caller-variable; // variable is undefined here + .caller-mixin(); // mixin is undefined here +}; + +selector { + // use detached ruleset + @detached-ruleset(); + + // define variable and mixin needed inside the detached ruleset + @caller-variable: value; + .caller-mixin() { + variable: declaration; + } +} + + +selector { + caller-variable: value; + variable: declaration; +} + + +@variable: global; +@detached-ruleset: { + // will use global variable, because it is accessible + // from detached-ruleset definition + variable: @variable; +}; + +selector { + @detached-ruleset(); + @variable: value; // variable defined in caller - will be ignored +} + + +selector { + variable: global; +} + + +@detached-1: { scope-detached: @one @two; }; +.one { + @one: visible; + .two { + @detached-2: @detached-1; // copying/renaming ruleset + @two: visible; // ruleset can not see this variable + } +} + +.use-place { + .one > .two(); + @detached-2(); +} + + +#space { + .importer-1() { + @detached: { scope-detached: @variable; }; // define detached ruleset + } +} + +.importer-2() { + @variable: value; // unlocked detached ruleset CAN see this variable + #space > .importer-1(); // unlock/import detached ruleset +} + +.use-place { + .importer-2(); // unlock/import detached ruleset second time + @detached(); +} + + +.use-place { + scope-detached: value; +} + +@my-ruleset:{.my-selector{@media tv{background-color:black;}}}; + +.foo { + background: #900; +} +@import "this-is-valid.less"; + + +@import "foo"; // foo.less is imported +@import "foo.less"; // foo.less is imported +@import "foo.php"; // foo.php imported as a less file +@import "foo.css"; // statement left in place, as-is + + +.navbar:extend(.navbar all) {} + + +@import (less) "foo.css"; + + +@import (css) "foo.less"; + + +@import "foo.less"; + + +@import (once) "foo.less"; +@import (once) "foo.less"; // this statement will be ignored + + +// file: foo.less +.a { + color: green; +} +// file: main.less +@import (multiple) "foo.less"; +@import (multiple) "foo.less"; + + +.a { + color: green; +} +.a { + color: green; +} + + +.mixin (@a) when (lightness(@a) >= 50%) { + background-color: black; +} +.mixin (@a) when (lightness(@a) < 50%) { + background-color: white; +} +.mixin (@a) { + color: @a; +} + + +.class1 { .mixin(#ddd) } +.class2 { .mixin(#555) } + + +.class1 { + background-color: black; + color: #ddd; +} +.class2 { + background-color: white; + color: #555; +} + + +.truth (@a) when (@a) { /* ... */ } +.truth (@a) when (@a = true) { /* ... */ } + + +.class { + .truth(40); // Will not match any of the above definitions. +} + + +@media: mobile; + +.mixin (@a) when (@media = mobile) { /* ... */ } +.mixin (@a) when (@media = desktop) { /* ... */ } + +.max (@a; @b) when (@a > @b) { width: @a } +.max (@a; @b) when (@a < @b) { width: @b } + + +.mixin (@a) when (isnumber(@a)) and (@a > 0) { /* ... */ } + + +.mixin (@a) when (@a > 10), (@a < -10) { /* ... */ } + + +.mixin (@b) when not (@b > 0) { /* ... */ } + + +.mixin (@a; @b: 0) when (isnumber(@b)) { /* ... */ } +.mixin (@a; @b: black) when (iscolor(@b)) { /* ... */ } + + +.mixin (@a) when (@a > 0) { /* ... */ } +.mixin (@a) when (default()) { /* ... */ } // matches only if first mixin does not, i.e. when @a <= 0 + + +.my-optional-style() when (@my-option = true) { + button { + color: white; + } +} +.my-optional-style(); + + +button when (@my-option = true) { + color: white; +} + + +& when (@my-option = true) { + button { + color: white; + } + a { + color: blue; + } +} + + +.loop(@counter) when (@counter > 0) { + .loop((@counter - 1)); // next iteration + width: (10px * @counter); // code for each iteration +} + +div { + .loop(5); // launch the loop +} + + +div { + width: 10px; + width: 20px; + width: 30px; + width: 40px; + width: 50px; +} + + +.generate-columns(4); + +.generate-columns(@n, @i: 1) when (@i =< @n) { + .column-@{i} { + width: (@i * 100% / @n); + } + .generate-columns(@n, (@i + 1)); +} + + +.column-1 { + width: 25%; +} +.column-2 { + width: 50%; +} +.column-3 { + width: 75%; +} +.column-4 { + width: 100%; +} + + +.mixin() { + box-shadow+: inset 0 0 10px #555; +} +.myclass { + .mixin(); + box-shadow+: 0 0 20px black; +} + + +.myclass { + box-shadow: inset 0 0 10px #555, 0 0 20px black; +} + + +.mixin() { + transform+_: scale(2); +} +.myclass { + .mixin(); + transform+_: rotate(15deg); +} + + +.myclass { + transform: scale(2) rotate(15deg); +} + + +a { + color: blue; + &:hover { + color: green; + } +} + + +a { + color: blue; +} + +a:hover { + color: green; +} + + +.button { + &-ok { + background-image: url("ok.png"); + } + &-cancel { + background-image: url("cancel.png"); + } + + &-custom { + background-image: url("custom.png"); + } +} + + +.button-ok { + background-image: url("ok.png"); +} +.button-cancel { + background-image: url("cancel.png"); +} +.button-custom { + background-image: url("custom.png"); +} + + +.link { + & + & { + color: red; + } + + & & { + color: green; + } + + && { + color: blue; + } + + &, &ish { + color: cyan; + } +} + + +.link + .link { + color: red; +} +.link .link { + color: green; +} +.link.link { + color: blue; +} +.link, .linkish { + color: cyan; +} + + +.grand { + .parent { + & > & { + color: red; + } + + & & { + color: green; + } + + && { + color: blue; + } + + &, &ish { + color: cyan; + } + } +} + + +.grand .parent > .grand .parent { + color: red; +} +.grand .parent .grand .parent { + color: green; +} +.grand .parent.grand .parent { + color: blue; +} +.grand .parent, +.grand .parentish { + color: cyan; +} + + +.header { + .menu { + border-radius: 5px; + .no-borderradius & { + background-image: url('images/button-background.png'); + } + } +} + + +.header .menu { + border-radius: 5px; +} +.no-borderradius .header .menu { + background-image: url('images/button-background.png'); +} + + +p, a, ul, li { + border-top: 2px dotted #366; + & + & { + border-top: 0; + } +} + + +p, +a, +ul, +li { + border-top: 2px dotted #366; +} +p + p, +p + a, +p + ul, +p + li, +a + p, +a + a, +a + ul, +a + li, +ul + p, +ul + a, +ul + ul, +ul + li, +li + p, +li + a, +li + ul, +li + li { + border-top: 0; +} + +.foobar { + &:extend(.foo); +} + +.thing { + &:hover { + background-color: blue; + .thing-child {} + } +} + +.foo, + // Comment +.bar { + // Comment + color: red; // Comment +} + +// Variables +@link-color: #428bca; // Comment + +[href]:hover &, // Comment' +[href]:focus &, // Comment" +[href]:active & { + .tooltip { + opacity: 1; + } +} + +// Usage +@import // Comment + "@{themes}/tidal-wave.less"; + +// Mixin with escaped / +.margin-bottom-1\\/3() { + margin-bottom: 0.8rem; +} + +label { + .margin-bottom-1\\/3; +} + +// whitespace between variable and colon, #2925 #4090 +@FoO : bar; + +// should not parse as custom-selector +@custom-selector :--icon #id; + +// extend #7977 +.class { + &:extend(.some-class .some-other-class .some-very-loooooooooooooong-class all); +} +.class { + &:extend( + .some-class .some-other-class .some-very-loooooooooooooong-class all + ); +} +.class { + &:extend(.some-class .some-other-class .some-very-loooooooooooooong-class .some-very-loooooooooooooong-class all); +} + +// #8177 +.hello { + &:extend(.input:disabled)} + +=====================================output===================================== +@nice-blue: #5b83ad; +@light-blue: @nice-blue + #111; + +#header { + color: @light-blue; +} + +#header { + color: #6c94be; +} + +.bordered { + border-top: dotted 1px black; + border-bottom: solid 2px black; +} + +#menu a { + color: #111; + .bordered; +} + +.post a { + color: red; + .bordered; +} + +#header { + color: black; +} +#header .navigation { + font-size: 12px; +} +#header .logo { + width: 300px; +} + +#header { + color: black; + .navigation { + font-size: 12px; + } + .logo { + width: 300px; + } +} + +.clearfix { + display: block; + zoom: 1; + + &:after { + content: " "; + display: block; + font-size: 0; + height: 0; + clear: both; + visibility: hidden; + } +} + +.screen-color { + @media screen { + color: green; + @media (min-width: 768px) { + color: red; + } + } + @media tv { + color: black; + } +} + +@media screen { + .screen-color { + color: green; + } +} +@media screen and (min-width: 768px) { + .screen-color { + color: red; + } +} +@media tv { + .screen-color { + color: black; + } +} + +#a { + color: blue; + @font-face { + src: made-up-url; + } + padding: 2 2 2 2; +} + +#a { + color: blue; +} +@font-face { + src: made-up-url; +} +#a { + padding: 2 2 2 2; +} + +// numbers are converted into the same units +@conversion-1: 5cm + 10mm; // result is 6cm +@conversion-2: 2 - 3cm - 5mm; // result is -1.5cm + +// conversion is impossible +@incompatible-units: 2 + 5px - 3cm; // result is 4px + +// example with variables +@base: 5%; +@filler: @base * 2; // result is 10% +@other: @base + @filler; // result is 15% + +@base: 2cm * 3mm; // result is 6cm + +@color: #224488 / 2; //results in #112244 +background-color: #112244 + #111; // result is #223355 + +.weird-element { + content: ~"^//* some horrible but needed css hack"; +} + +@base: #f04615; +@width: 0.5; + +.class { + width: percentage(@width); // returns \`50%\` + color: saturate(@base, 5%); + background-color: spin(lighten(@base, 25%), 8); +} + +#bundle { + .button { + display: block; + border: 1px solid black; + background-color: grey; + &:hover { + background-color: white; + } + } + .tab { + /* ... */ + } + .citation { + /* ... */ + } +} + +#header a { + color: orange; + #bundle > .button; +} + +@var: red; + +#page { + @var: white; + #header { + color: @var; // white + } +} + +@var: red; + +#page { + #header { + color: @var; // white + } + @var: white; +} + +/* One hell of a block +style comment! */ +@var: red; + +// Get in line! +@var: white; + +@import "library"; // library.less +@import "typo.css"; + +a, +.link { + color: #428bca; +} +.widget { + color: #fff; + background: #428bca; +} + +// Variables +@link-color: #428bca; // sea blue +@link-color-hover: darken(@link-color, 10%); + +// Usage +a, +.link { + color: @link-color; +} +a:hover { + color: @link-color-hover; +} +.widget { + color: #fff; + background: @link-color; +} + +// Variables +@my-selector: banner; + +// Usage +.@{my-selector} { + font-weight: bold; + line-height: 40px; + margin: 0 auto; +} + +.banner { + font-weight: bold; + line-height: 40px; + margin: 0 auto; +} + +// Variables +@images: "../img"; + +// Usage +body { + color: #444; + width: 100px; + background: url("/foo/@{images}/bar"); + background: url("@{images}/white-sand.\${width}.png"); + background: url(@images); +} + +// Variables +@themes: "../../src/themes"; + +// Usage +@import "@{themes}/tidal-wave.less"; + +@property: color; + +.widget { + @{property}: #0ee; + background-@{property}: #999; +} + +.widget { + color: #0ee; + background-color: #999; +} + +@fnord: "I am fnord."; +@var: "fnord"; +content: @@var; + +content: "I am fnord."; + +.lazy-eval { + width: @var; +} + +@var: @a; +@a: 9%; + +.lazy-eval-scope { + width: @var; + @a: 9%; +} + +@var: @a; +@a: 100%; + +.lazy-eval-scope { + width: 9%; +} + +@var: 0; +.class { + @var: 1; + .brass { + @var: 2; + three: @var; + @var: 3; + } + one: @var; +} + +.class { + one: 1; +} +.class .brass { + three: 3; +} + +// library +@base-color: green; +@dark-color: darken(@base-color, 10%); + +// use of library +@import "library.less"; +@base-color: red; + +nav ul { + &:extend(.inline); + background: blue; +} + +nav ul { + &:extend(.inline); + background: blue; +} +.inline { + color: red; +} + +nav ul { + background: blue; +} +.inline, +nav ul { + color: red; +} + +.a:extend(.b) { +} + +// the above block does the same thing as the below block +.a { + &:extend(.b); +} + +.c:extend(.d all) { + // extends all instances of ".d" e.g. ".x.d" or ".d.x" +} +.c:extend(.d) { + // extends only instances where the selector will be output as just ".d" +} + +.e:extend(.f) { +} +.e:extend(.g) { +} + +// the above an the below do the same thing +.e:extend(.f, .g) { +} + +.big-division, +.big-bag:extend(.bag), +.big-bucket:extend(.bucket) { + // body +} + +pre:hover, +.some-class { + &:extend(div pre); +} + +pre:hover:extend(div pre), +.some-class:extend(div pre) { +} + +.bucket { + tr { + // nested ruleset with target selector + color: blue; + } +} +.some-class:extend(.bucket tr) { +} // nested ruleset is recognized + +.bucket tr, +.some-class { + color: blue; +} + +.bucket { + tr & { + // nested ruleset with target selector + color: blue; + } +} +.some-class:extend(tr .bucket) { +} // nested ruleset is recognized + +tr .bucket, +.some-class { + color: blue; +} + +.a.class, +.class.a, +.class > .a { + color: blue; +} +.test:extend(.class) { +} // this will NOT match the any selectors above + +*.class { + color: blue; +} +.noStar:extend(.class) { +} // this will NOT match the *.class selector + +*.class { + color: blue; +} + +link:hover:visited { + color: blue; +} +.selector:extend(link:visited:hover) { +} + +link:hover:visited { + color: blue; +} + +:nth-child(1n + 3) { + color: blue; +} +.child:extend(:nth-child(n + 3)) { +} + +:nth-child(1n + 3) { + color: blue; +} + +[title="identifier"] { + color: blue; +} +[title="identifier"] { + color: blue; +} +[title="identifier"] { + color: blue; +} + +.noQuote:extend([title="identifier"]) { +} +.singleQuote:extend([title="identifier"]) { +} +.doubleQuote:extend([title="identifier"]) { +} + +[title="identifier"], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + +[title="identifier"], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + +[title="identifier"], +.noQuote, +.singleQuote, +.doubleQuote { + color: blue; +} + +.a.b.test, +.test.c { + color: orange; +} +.test { + &:hover { + color: green; + } +} + +.replacement:extend(.test all) { +} + +.a.b.test, +.test.c, +.a.b.replacement, +.replacement.c { + color: orange; +} +.test:hover, +.replacement:hover { + color: green; +} + +@variable: .bucket; +@{variable} { + // interpolated selector + color: blue; +} +.some-class:extend(.bucket) { +} // does nothing, no match is found + +.bucket { + color: blue; +} +.some-class:extend(@{variable}) { +} // interpolated selector matches nothing +@variable: .bucket; + +.bucket { + color: blue; +} + +.bucket { + color: blue; +} +@{variable}:extend(.bucket) { +} +@variable: .selector; + +.bucket, +.selector { + color: blue; +} + +@media print { + .screenClass:extend(.selector) { + } // extend inside media + .selector { + // this will be matched - it is in the same media + color: black; + } +} +.selector { + // ruleset on top of style sheet - extend ignores it + color: red; +} +@media screen { + .selector { + // ruleset inside another media - extend ignores it + color: blue; + } +} + +@media print { + .selector, + .screenClass { + /* ruleset inside the same media was extended */ + color: black; + } +} +.selector { + /* ruleset on top of style sheet was ignored */ + color: red; +} +@media screen { + .selector { + /* ruleset inside another media was ignored */ + color: blue; + } +} + +@media screen { + .screenClass:extend(.selector) { + } // extend inside media + @media (min-width: 1023px) { + .selector { + // ruleset inside nested media - extend ignores it + color: blue; + } + } +} + +@media screen and (min-width: 1023px) { + .selector { + /* ruleset inside another nested media was ignored */ + color: blue; + } +} + +@media screen { + .selector { + /* ruleset inside nested media - top level extend works */ + color: blue; + } + @media (min-width: 1023px) { + .selector { + /* ruleset inside nested media - top level extend works */ + color: blue; + } + } +} + +.topLevel:extend(.selector) { +} /* top level extend matches everything */ + +@media screen { + .selector, + .topLevel { + /* ruleset inside media was extended */ + color: blue; + } +} +@media screen and (min-width: 1023px) { + .selector, + .topLevel { + /* ruleset inside nested media was extended */ + color: blue; + } +} + +.alert-info, +.widget { + /* declarations */ +} + +.alert:extend(.alert-info, .widget) { +} + +.alert-info, +.widget, +.alert, +.alert { + /* declarations */ +} + +.animal { + background-color: black; + color: white; +} + +.animal { + background-color: black; + color: white; +} +.bear { + background-color: brown; +} + +.animal { + background-color: black; + color: white; +} +.bear { + &:extend(.animal); + background-color: brown; +} + +.my-inline-block() { + display: inline-block; + font-size: 0; +} +.thing1 { + .my-inline-block; +} +.thing2 { + .my-inline-block; +} + +.thing1 { + display: inline-block; + font-size: 0; +} +.thing2 { + display: inline-block; + font-size: 0; +} + +.my-inline-block { + display: inline-block; + font-size: 0; +} +.thing1 { + &:extend(.my-inline-block); +} +.thing2 { + &:extend(.my-inline-block); +} + +.my-inline-block, +.thing1, +.thing2 { + display: inline-block; + font-size: 0; +} + +li.list > a { + // list styles +} +button.list-style { + &:extend(li.list > a); // use the same list styles +} + +.a, +#b { + color: red; +} +.mixin-class { + .a(); +} +.mixin-id { + #b(); +} + +.a, +#b { + color: red; +} +.mixin-class { + color: red; +} +.mixin-id { + color: red; +} + +// these two statements do the same thing: +.a(); +.a; + +.my-mixin { + color: black; +} +.my-other-mixin() { + background: white; +} +.class { + .my-mixin; + .my-other-mixin; +} + +.my-mixin { + color: black; +} +.class { + color: black; + background: white; +} + +.my-hover-mixin() { + &:hover { + border: 1px solid red; + } +} +button { + .my-hover-mixin(); +} + +button:hover { + border: 1px solid red; +} + +#outer { + .inner { + color: red; + } +} + +.c { + #outer > .inner; +} + +// all do the same thing +#outer > .inner; +#outer > .inner(); +#outer .inner; +#outer .inner(); +#outer.inner; +#outer.inner(); + +#my-library { + .my-mixin() { + color: black; + } +} +// which can be used like this +.class { + #my-library > .my-mixin(); +} + +#namespace when (@mode=huge) { + .mixin() { + /* */ + } +} + +#namespace { + .mixin() when (@mode=huge) { + /* */ + } +} + +#sp_1 when (default()) { + #sp_2 when (default()) { + .mixin() when not(default()) { + /* */ + } + } +} + +.foo (@bg: #f5f5f5, @color: #900) { + background: @bg; + color: @color; +} +.unimportant { + .foo(); +} +.important { + .foo() !important; +} + +.unimportant { + background: #f5f5f5; + color: #900; +} +.important { + background: #f5f5f5 !important; + color: #900 !important; +} + +.border-radius(@radius) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +#header { + .border-radius(4px); +} +.button { + .border-radius(6px); +} + +.border-radius(@radius: 5px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +#header { + .border-radius; +} + +.wrap() { + text-wrap: wrap; + white-space: -moz-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} + +pre { + .wrap; +} + +pre { + text-wrap: wrap; + white-space: -moz-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; +} + +.mixin(@color) { + color-1: @color; +} +.mixin(@color; @padding: 2) { + color-2: @color; + padding-2: @padding; +} +.mixin(@color; @padding; @margin: 2) { + color-3: @color; + padding-3: @padding; + margin: @margin @margin @margin @margin; +} +.some .selector div { + .mixin(#008000); +} + +.some .selector div { + color-1: #008000; + color-2: #008000; + padding-2: 2; +} + +.mixin(@color: black; @margin: 10px; @padding: 20px) { + color: @color; + margin: @margin; + padding: @padding; +} +.class1 { + .mixin(@margin: 20px; @color: #33acfe); +} +.class2 { + .mixin(#efca44; @padding: 40px); +} + +.class1 { + color: #33acfe; + margin: 20px; + padding: 20px; +} +.class2 { + color: #efca44; + margin: 10px; + padding: 40px; +} + +.box-shadow(@x: 0; @y: 0; @blur: 1px; @color: #000) { + -webkit-box-shadow: @arguments; + -moz-box-shadow: @arguments; + box-shadow: @arguments; +} +.big-block { + .box-shadow(2px; 5px); +} + +.big-block { + -webkit-box-shadow: 2px 5px 1px #000; + -moz-box-shadow: 2px 5px 1px #000; + box-shadow: 2px 5px 1px #000; +} + +.mixin(/* ... */) { +} // matches 0-N arguments +.mixin() { +} // matches exactly 0 arguments +.mixin(@a: 1) { +} // matches 0-1 arguments +.mixin(@a: 1; /* ... */) { +} // matches 0-N arguments +.mixin(@a; /* ... */) { +} // matches 1-N arguments + +.mixin(@a; @rest...) { + // @rest is bound to arguments after @a + // @arguments is bound to all arguments +} + +.mixin(@s; @color) { + /* ... */ +} + +.class { + .mixin(@switch; #888); +} + +.mixin(dark; @color) { + color: darken(@color, 10%); +} +.mixin(light; @color) { + color: lighten(@color, 10%); +} +.mixin(@_; @color) { + display: block; +} + +@switch: light; + +.class { + .mixin(@switch; #888); +} + +.class { + color: #a2a2a2; + display: block; +} + +.mixin(@a) { + color: @a; +} +.mixin(@a; @b) { + color: fade(@a; @b); +} + +.mixin() { + @width: 100%; + @height: 200px; +} + +.caller { + .mixin(); + width: @width; + height: @height; +} + +.caller { + width: 100%; + height: 200px; +} + +.average(@x, @y) { + @average: ((@x + @y) / 2); +} + +div { + .average(16px, 50px); // "call" the mixin + padding: @average; // use its "return" value +} + +div { + padding: 33px; +} + +.mixin() { + @size: in-mixin; + @definedOnlyInMixin: in-mixin; +} + +.class { + margin: @size @definedOnlyInMixin; + .mixin(); +} + +@size: globally-defined-value; // callers parent scope - no protection + +.class { + margin: in-mixin in-mixin; +} + +.unlock(@value) { + // outer mixin + .doSomething() { + // nested mixin + declaration: @value; + } +} + +#namespace { + .unlock(5); // unlock doSomething mixin + .doSomething(); //nested mixin was copied here and is usable +} + +#namespace { + declaration: 5; +} + +// declare detached ruleset +@detached-ruleset: { + background: red; +}; + +// use detached ruleset +.top { + @detached-ruleset(); +} + +.top { + background: red; +} + +.desktop-and-old-ie(@rules) { + @media screen and (min-width: 1200px) { + @rules(); + } + html.lt-ie9 & { + @rules(); + } +} + +header { + background-color: blue; + + .desktop-and-old-ie({ + background-color: red; + }); +} + +header { + background-color: blue; +} +@media screen and (min-width: 1200px) { + header { + background-color: red; + } +} +html.lt-ie9 header { + background-color: red; +} + +@my-ruleset: { + .my-selector { + background-color: black; + } +}; + +@my-ruleset: { + .my-selector { + @media tv { + background-color: black; + } + } +}; +@media (orientation: portrait) { + @my-ruleset(); +} + +@media (orientation: portrait) and tv { + .my-selector { + background-color: black; + } +} + +// detached ruleset with a mixin +@detached-ruleset: { + .mixin() { + color: blue; + } +}; +// call detached ruleset +.caller { + @detached-ruleset(); + .mixin(); +} + +.caller { + color: blue; +} + +@detached-ruleset: { + @color: blue; // this variable is private +}; +.caller { + color: @color; // syntax error +} + +@detached-ruleset: { + caller-variable: @caller-variable; // variable is undefined here + .caller-mixin(); // mixin is undefined here +}; + +selector { + // use detached ruleset + @detached-ruleset(); + + // define variable and mixin needed inside the detached ruleset + @caller-variable: value; + .caller-mixin() { + variable: declaration; + } +} + +selector { + caller-variable: value; + variable: declaration; +} + +@variable: global; +@detached-ruleset: { + // will use global variable, because it is accessible + // from detached-ruleset definition + variable: @variable; +}; + +selector { + @detached-ruleset(); + @variable: value; // variable defined in caller - will be ignored +} + +selector { + variable: global; +} + +@detached-1: { + scope-detached: @one @two; +}; +.one { + @one: visible; + .two { + @detached-2: @detached-1; // copying/renaming ruleset + @two: visible; // ruleset can not see this variable + } +} + +.use-place { + .one > .two(); + @detached-2(); +} + +#space { + .importer-1() { + @detached: { + scope-detached: @variable; + }; // define detached ruleset + } +} + +.importer-2() { + @variable: value; // unlocked detached ruleset CAN see this variable + #space > .importer-1(); // unlock/import detached ruleset +} + +.use-place { + .importer-2(); // unlock/import detached ruleset second time + @detached(); +} + +.use-place { + scope-detached: value; +} + +@my-ruleset: { + .my-selector { + @media tv { + background-color: black; + } + } +}; + +.foo { + background: #900; +} +@import "this-is-valid.less"; + +@import "foo"; // foo.less is imported +@import "foo.less"; // foo.less is imported +@import "foo.php"; // foo.php imported as a less file +@import "foo.css"; // statement left in place, as-is + +.navbar:extend(.navbar all) { +} + +@import (less) "foo.css"; + +@import (css) "foo.less"; + +@import "foo.less"; + +@import (once) "foo.less"; +@import (once) "foo.less"; // this statement will be ignored + +// file: foo.less +.a { + color: green; +} +// file: main.less +@import (multiple) "foo.less"; +@import (multiple) "foo.less"; + +.a { + color: green; +} +.a { + color: green; +} + +.mixin (@a) when (lightness(@a) >= 50%) { + background-color: black; +} +.mixin (@a) when (lightness(@a) < 50%) { + background-color: white; +} +.mixin (@a) { + color: @a; +} + +.class1 { + .mixin(#ddd); +} +.class2 { + .mixin(#555); +} + +.class1 { + background-color: black; + color: #ddd; +} +.class2 { + background-color: white; + color: #555; +} + +.truth (@a) when (@a) { + /* ... */ +} +.truth (@a) when (@a = true) { + /* ... */ +} + +.class { + .truth(40); // Will not match any of the above definitions. +} + +@media: mobile; + +.mixin (@a) when (@media = mobile) { + /* ... */ +} +.mixin (@a) when (@media = desktop) { + /* ... */ +} + +.max (@a; @b) when (@a > @b) { + width: @a; +} +.max (@a; @b) when (@a < @b) { + width: @b; +} + +.mixin (@a) when (isnumber(@a)) and (@a > 0) { + /* ... */ +} + +.mixin (@a) when (@a > 10), (@a < -10) { + /* ... */ +} + +.mixin (@b) when not (@b > 0) { + /* ... */ +} + +.mixin (@a; @b: 0) when (isnumber(@b)) { + /* ... */ +} +.mixin (@a; @b: black) when (iscolor(@b)) { + /* ... */ +} + +.mixin (@a) when (@a > 0) { + /* ... */ +} +.mixin (@a) when (default()) { + /* ... */ +} // matches only if first mixin does not, i.e. when @a <= 0 + +.my-optional-style() when (@my-option = true) { + button { + color: white; + } +} +.my-optional-style(); + +button when (@my-option = true) { + color: white; +} + +& when (@my-option = true) { + button { + color: white; + } + a { + color: blue; + } +} + +.loop(@counter) when (@counter > 0) { + .loop((@counter - 1)); // next iteration + width: (10px * @counter); // code for each iteration +} + +div { + .loop(5); // launch the loop +} + +div { + width: 10px; + width: 20px; + width: 30px; + width: 40px; + width: 50px; +} + +.generate-columns(4); + +.generate-columns(@n, @i: 1) when (@i =< @n) { + .column-@{i} { + width: (@i * 100% / @n); + } + .generate-columns(@n, (@i + 1)); +} + +.column-1 { + width: 25%; +} +.column-2 { + width: 50%; +} +.column-3 { + width: 75%; +} +.column-4 { + width: 100%; +} + +.mixin() { + box-shadow+: inset 0 0 10px #555; +} +.myclass { + .mixin(); + box-shadow+: 0 0 20px black; +} + +.myclass { + box-shadow: + inset 0 0 10px #555, + 0 0 20px black; +} + +.mixin() { + transform+_: scale(2); +} +.myclass { + .mixin(); + transform+_: rotate(15deg); +} + +.myclass { + transform: scale(2) rotate(15deg); +} + +a { + color: blue; + &:hover { + color: green; + } +} + +a { + color: blue; +} + +a:hover { + color: green; +} + +.button { + &-ok { + background-image: url("ok.png"); + } + &-cancel { + background-image: url("cancel.png"); + } + + &-custom { + background-image: url("custom.png"); + } +} + +.button-ok { + background-image: url("ok.png"); +} +.button-cancel { + background-image: url("cancel.png"); +} +.button-custom { + background-image: url("custom.png"); +} + +.link { + & + & { + color: red; + } + + & & { + color: green; + } + + && { + color: blue; + } + + &, + &ish { + color: cyan; + } +} + +.link + .link { + color: red; +} +.link .link { + color: green; +} +.link.link { + color: blue; +} +.link, +.linkish { + color: cyan; +} + +.grand { + .parent { + & > & { + color: red; + } + + & & { + color: green; + } + + && { + color: blue; + } + + &, + &ish { + color: cyan; + } + } +} + +.grand .parent > .grand .parent { + color: red; +} +.grand .parent .grand .parent { + color: green; +} +.grand .parent.grand .parent { + color: blue; +} +.grand .parent, +.grand .parentish { + color: cyan; +} + +.header { + .menu { + border-radius: 5px; + .no-borderradius & { + background-image: url("images/button-background.png"); + } + } +} + +.header .menu { + border-radius: 5px; +} +.no-borderradius .header .menu { + background-image: url("images/button-background.png"); +} + +p, +a, +ul, +li { + border-top: 2px dotted #366; + & + & { + border-top: 0; + } +} + +p, +a, +ul, +li { + border-top: 2px dotted #366; +} +p + p, +p + a, +p + ul, +p + li, +a + p, +a + a, +a + ul, +a + li, +ul + p, +ul + a, +ul + ul, +ul + li, +li + p, +li + a, +li + ul, +li + li { + border-top: 0; +} + +.foobar { + &:extend(.foo); +} + +.thing { + &:hover { + background-color: blue; + .thing-child { + } + } +} + +.foo, + // Comment +.bar { + // Comment + color: red; // Comment +} + +// Variables +@link-color: #428bca; // Comment + +[href]:hover &, // Comment' +[href]:focus &, // Comment" +[href]:active & { + .tooltip { + opacity: 1; + } +} + +// Usage +@import // Comment + "@{themes}/tidal-wave.less"; + +// Mixin with escaped / +.margin-bottom-1\\/3() { + margin-bottom: 0.8rem; +} + +label { + .margin-bottom-1\\/3; +} + +// whitespace between variable and colon, #2925 #4090 +@FoO: bar; + +// should not parse as custom-selector +@custom-selector: --icon #id; + +// extend #7977 +.class { + &:extend(.some-class + .some-other-class + .some-very-loooooooooooooong-class + all); +} +.class { + &:extend(.some-class + .some-other-class + .some-very-loooooooooooooong-class + all); +} +.class { + &:extend(.some-class + .some-other-class + .some-very-loooooooooooooong-class + .some-very-loooooooooooooong-class + all); +} + +// #8177 +.hello { + &:extend(.input:disabled); +} + +================================================================================ +`; + +exports[`quotes-in-comments.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Animation +// ' +.a { color: red } + +.aa:hover::after { content: "\\""; } // " + + +.b { background:url(http://example.com); } .b::after { content: "a"; } + +.bb { background:url('http://example.com/(foo)bar'); } .bb::after { content: "'a"; } // """ + +// Animation ! +.c { color:red } + +.d { color: red /* // */ } .d::after { content: "'"; } + +/* fff + // */ .d:hover::after { + // qw'erty + content: "'''"; } + +[href]:active { + opacity: // '!' "?" + 1; +} +=====================================output===================================== +// Animation +// ' +.a { + color: red; +} + +.aa:hover::after { + content: '"'; +} // " + +.b { + background: url(http://example.com); +} +.b::after { + content: "a"; +} + +.bb { + background: url("http://example.com/(foo)bar"); +} +.bb::after { + content: "'a"; +} // """ + +// Animation ! +.c { + color: red; +} + +.d { + color: red; /* // */ +} +.d::after { + content: "'"; +} + +/* fff + // */ +.d:hover::after { + // qw'erty + content: "'''"; +} + +[href]:active { + opacity: // '!' "?" + 1; +} + +================================================================================ +`; diff --git a/tests/format/less/less/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/less/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1541bb0496db..000000000000 --- a/tests/format/less/less/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,3532 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -=====================================output===================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -================================================================================ -`; - -exports[`function-each.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// http://lesscss.org/functions/#list-functions-each - -@selectors: blue, green, red; - -each(@selectors, { - .sel-@{value} { - a: b; - } -}); - - -// TODO: fix this -each(@selectors, -{ - .sel-@{value} { -a: b; - } -}); - -=====================================output===================================== -// http://lesscss.org/functions/#list-functions-each - -@selectors: blue, green, red; - -each(@selectors, { - .sel-@{value} { - a: b; - } -}); - -// TODO: fix this -each(@selectors, -{ - .sel-@{value} { -a: b; - } -}); - -================================================================================ -`; - -exports[`issue-11483--never-append-anything.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@variable: { - field: something; -}; - -=====================================output===================================== -@variable: { - field: something; -}; - -================================================================================ -`; - -exports[`less.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -@nice-blue: #5B83AD; -@light-blue: @nice-blue + #111; - -#header { - color: @light-blue; -} - - -#header { - color: #6c94be; -} - - -.bordered { - border-top: dotted 1px black; - border-bottom: solid 2px black; -} - - -#menu a { - color: #111; - .bordered; -} - -.post a { - color: red; - .bordered; -} - - -#header { - color: black; -} -#header .navigation { - font-size: 12px; -} -#header .logo { - width: 300px; -} - - -#header { - color: black; - .navigation { - font-size: 12px; - } - .logo { - width: 300px; - } -} - - -.clearfix { - display: block; - zoom: 1; - - &:after { - content: " "; - display: block; - font-size: 0; - height: 0; - clear: both; - visibility: hidden; - } -} - - -.screen-color { - @media screen { - color: green; - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} - - -@media screen { - .screen-color { - color: green; - } -} -@media screen and (min-width: 768px) { - .screen-color { - color: red; - } -} -@media tv { - .screen-color { - color: black; - } -} - - -#a { - color: blue; - @font-face { - src: made-up-url; - } - padding: 2 2 2 2; -} - - -#a { - color: blue; -} -@font-face { - src: made-up-url; -} -#a { - padding: 2 2 2 2; -} - - -// numbers are converted into the same units -@conversion-1: 5cm + 10mm; // result is 6cm -@conversion-2: 2 - 3cm - 5mm; // result is -1.5cm - -// conversion is impossible -@incompatible-units: 2 + 5px - 3cm; // result is 4px - -// example with variables -@base: 5%; -@filler: @base * 2; // result is 10% -@other: @base + @filler; // result is 15% - - -@base: 2cm * 3mm; // result is 6cm - - -@color: #224488 / 2; //results in #112244 -background-color: #112244 + #111; // result is #223355 - - -.weird-element { - content: ~"^//* some horrible but needed css hack"; -} - - -@base: #f04615; -@width: 0.5; - -.class { - width: percentage(@width); // returns \`50%\` - color: saturate(@base, 5%); - background-color: spin(lighten(@base, 25%), 8); -} - - -#bundle { - .button { - display: block; - border: 1px solid black; - background-color: grey; - &:hover { - background-color: white - } - } - .tab { /* ... */ } - .citation { /* ... */ } -} - - -#header a { - color: orange; - #bundle > .button; -} - - -@var: red; - -#page { - @var: white; - #header { - color: @var; // white - } -} - - -@var: red; - -#page { - #header { - color: @var; // white - } - @var: white; -} - - -/* One hell of a block -style comment! */ -@var: red; - -// Get in line! -@var: white; - - -@import "library"; // library.less -@import "typo.css"; - - -a, -.link { - color: #428bca; -} -.widget { - color: #fff; - background: #428bca; -} - - -// Variables -@link-color: #428bca; // sea blue -@link-color-hover: darken(@link-color, 10%); - -// Usage -a, -.link { - color: @link-color; -} -a:hover { - color: @link-color-hover; -} -.widget { - color: #fff; - background: @link-color; -} - - -// Variables -@my-selector: banner; - -// Usage -.@{my-selector} { - font-weight: bold; - line-height: 40px; - margin: 0 auto; -} - - -.banner { - font-weight: bold; - line-height: 40px; - margin: 0 auto; -} - - -// Variables -@images: "../img"; - -// Usage -body { - color: #444; - width: 100px; - background: url('/foo/@{images}/bar'); - background: url("@{images}/white-sand.\${width}.png"); - background: url(@images); -} - - -// Variables -@themes: "../../src/themes"; - -// Usage -@import "@{themes}/tidal-wave.less"; - - -@property: color; - -.widget { - @{property}: #0ee; - background-@{property}: #999; -} - - -.widget { - color: #0ee; - background-color: #999; -} - - -@fnord: "I am fnord."; -@var: "fnord"; -content: @@var; - - -content: "I am fnord."; - - -.lazy-eval { - width: @var; -} - -@var: @a; -@a: 9%; - - -.lazy-eval-scope { - width: @var; - @a: 9%; -} - -@var: @a; -@a: 100%; - - -.lazy-eval-scope { - width: 9%; -} - - -@var: 0; -.class { - @var: 1; - .brass { - @var: 2; - three: @var; - @var: 3; - } - one: @var; -} - - -.class { - one: 1; -} -.class .brass { - three: 3; -} - - -// library -@base-color: green; -@dark-color: darken(@base-color, 10%); - -// use of library -@import "library.less"; -@base-color: red; - - -nav ul { - &:extend(.inline); - background: blue; -} - - -nav ul { - &:extend(.inline); - background: blue; -} -.inline { - color: red; -} - - -nav ul { - background: blue; -} -.inline, -nav ul { - color: red; -} - - -.a:extend(.b) {} - -// the above block does the same thing as the below block -.a { - &:extend(.b); -} - - -.c:extend(.d all) { - // extends all instances of ".d" e.g. ".x.d" or ".d.x" -} -.c:extend(.d) { - // extends only instances where the selector will be output as just ".d" -} - - -.e:extend(.f) {} -.e:extend(.g) {} - -// the above an the below do the same thing -.e:extend(.f, .g) {} - - -.big-division, -.big-bag:extend(.bag), -.big-bucket:extend(.bucket) { - // body -} - - -pre:hover, -.some-class { - &:extend(div pre); -} - - -pre:hover:extend(div pre), -.some-class:extend(div pre) {} - - -.bucket { - tr { // nested ruleset with target selector - color: blue; - } -} -.some-class:extend(.bucket tr) {} // nested ruleset is recognized - - -.bucket tr, -.some-class { - color: blue; -} - - -.bucket { - tr & { // nested ruleset with target selector - color: blue; - } -} -.some-class:extend(tr .bucket) {} // nested ruleset is recognized - - -tr .bucket, -.some-class { - color: blue; -} - - -.a.class, -.class.a, -.class > .a { - color: blue; -} -.test:extend(.class) {} // this will NOT match the any selectors above - - -*.class { - color: blue; -} -.noStar:extend(.class) {} // this will NOT match the *.class selector - - -*.class { - color: blue; -} - - -link:hover:visited { - color: blue; -} -.selector:extend(link:visited:hover) {} - - -link:hover:visited { - color: blue; -} - - -:nth-child(1n+3) { - color: blue; -} -.child:extend(:nth-child(n+3)) {} - - -:nth-child(1n+3) { - color: blue; -} - - -[title=identifier] { - color: blue; -} -[title='identifier'] { - color: blue; -} -[title="identifier"] { - color: blue; -} - -.noQuote:extend([title=identifier]) {} -.singleQuote:extend([title='identifier']) {} -.doubleQuote:extend([title="identifier"]) {} - - -[title=identifier], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - -[title='identifier'], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - -[title="identifier"], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - - -.a.b.test, -.test.c { - color: orange; -} -.test { - &:hover { - color: green; - } -} - -.replacement:extend(.test all) {} - - -.a.b.test, -.test.c, -.a.b.replacement, -.replacement.c { - color: orange; -} -.test:hover, -.replacement:hover { - color: green; -} - - -@variable: .bucket; -@{variable} { // interpolated selector - color: blue; -} -.some-class:extend(.bucket) {} // does nothing, no match is found - - -.bucket { - color: blue; -} -.some-class:extend(@{variable}) {} // interpolated selector matches nothing -@variable: .bucket; - - -.bucket { - color: blue; -} - - -.bucket { - color: blue; -} -@{variable}:extend(.bucket) {} -@variable: .selector; - - -.bucket, .selector { - color: blue; -} - - -@media print { - .screenClass:extend(.selector) {} // extend inside media - .selector { // this will be matched - it is in the same media - color: black; - } -} -.selector { // ruleset on top of style sheet - extend ignores it - color: red; -} -@media screen { - .selector { // ruleset inside another media - extend ignores it - color: blue; - } -} - - -@media print { - .selector, - .screenClass { /* ruleset inside the same media was extended */ - color: black; - } -} -.selector { /* ruleset on top of style sheet was ignored */ - color: red; -} -@media screen { - .selector { /* ruleset inside another media was ignored */ - color: blue; - } -} - - -@media screen { - .screenClass:extend(.selector) {} // extend inside media - @media (min-width: 1023px) { - .selector { // ruleset inside nested media - extend ignores it - color: blue; - } - } -} - - -@media screen and (min-width: 1023px) { - .selector { /* ruleset inside another nested media was ignored */ - color: blue; - } -} - - -@media screen { - .selector { /* ruleset inside nested media - top level extend works */ - color: blue; - } - @media (min-width: 1023px) { - .selector { /* ruleset inside nested media - top level extend works */ - color: blue; - } - } -} - -.topLevel:extend(.selector) {} /* top level extend matches everything */ - - -@media screen { - .selector, - .topLevel { /* ruleset inside media was extended */ - color: blue; - } -} -@media screen and (min-width: 1023px) { - .selector, - .topLevel { /* ruleset inside nested media was extended */ - color: blue; - } -} - - -.alert-info, -.widget { - /* declarations */ -} - -.alert:extend(.alert-info, .widget) {} - - -.alert-info, -.widget, -.alert, -.alert { - /* declarations */ -} - - -.animal { - background-color: black; - color: white; -} - - -.animal { - background-color: black; - color: white; -} -.bear { - background-color: brown; -} - -.animal { - background-color: black; - color: white; -} -.bear { - &:extend(.animal); - background-color: brown; -} - - -.my-inline-block() { - display: inline-block; - font-size: 0; -} -.thing1 { - .my-inline-block; -} -.thing2 { - .my-inline-block; -} - - -.thing1 { - display: inline-block; - font-size: 0; -} -.thing2 { - display: inline-block; - font-size: 0; -} - - -.my-inline-block { - display: inline-block; - font-size: 0; -} -.thing1 { - &:extend(.my-inline-block); -} -.thing2 { - &:extend(.my-inline-block); -} - - -.my-inline-block, -.thing1, -.thing2 { - display: inline-block; - font-size: 0; -} - - -li.list > a { - // list styles -} -button.list-style { - &:extend(li.list > a); // use the same list styles -} - - -.a, #b { - color: red; -} -.mixin-class { - .a(); -} -.mixin-id { - #b(); -} - - -.a, #b { - color: red; -} -.mixin-class { - color: red; -} -.mixin-id { - color: red; -} - - -// these two statements do the same thing: -.a(); -.a; - - -.my-mixin { - color: black; -} -.my-other-mixin() { - background: white; -} -.class { - .my-mixin; - .my-other-mixin; -} - - -.my-mixin { - color: black; -} -.class { - color: black; - background: white; -} - - -.my-hover-mixin() { - &:hover { - border: 1px solid red; - } -} -button { - .my-hover-mixin(); -} - - -button:hover { - border: 1px solid red; -} - - -#outer { - .inner { - color: red; - } -} - -.c { - #outer > .inner; -} - - -// all do the same thing -#outer > .inner; -#outer > .inner(); -#outer .inner; -#outer .inner(); -#outer.inner; -#outer.inner(); - - -#my-library { - .my-mixin() { - color: black; - } -} -// which can be used like this -.class { - #my-library > .my-mixin(); -} - - -#namespace when (@mode=huge) { - .mixin() { /* */ } -} - -#namespace { - .mixin() when (@mode=huge) { /* */ } -} - - -#sp_1 when (default()) { - #sp_2 when (default()) { - .mixin() when not(default()) { /* */ } - } -} - - -.foo (@bg: #f5f5f5, @color: #900) { - background: @bg; - color: @color; -} -.unimportant { - .foo(); -} -.important { - .foo() !important; -} - - -.unimportant { - background: #f5f5f5; - color: #900; -} -.important { - background: #f5f5f5 !important; - color: #900 !important; -} - - -.border-radius(@radius) { - -webkit-border-radius: @radius; - -moz-border-radius: @radius; - border-radius: @radius; -} - - -#header { - .border-radius(4px); -} -.button { - .border-radius(6px); -} - - -.border-radius(@radius: 5px) { - -webkit-border-radius: @radius; - -moz-border-radius: @radius; - border-radius: @radius; -} - - -#header { - .border-radius; -} - - -.wrap() { - text-wrap: wrap; - white-space: -moz-pre-wrap; - white-space: pre-wrap; - word-wrap: break-word; -} - -pre { .wrap } - - -pre { - text-wrap: wrap; - white-space: -moz-pre-wrap; - white-space: pre-wrap; - word-wrap: break-word; -} - - -.mixin(@color) { - color-1: @color; -} -.mixin(@color; @padding: 2) { - color-2: @color; - padding-2: @padding; -} -.mixin(@color; @padding; @margin: 2) { - color-3: @color; - padding-3: @padding; - margin: @margin @margin @margin @margin; -} -.some .selector div { - .mixin(#008000); -} - - -.some .selector div { - color-1: #008000; - color-2: #008000; - padding-2: 2; -} - - -.mixin(@color: black; @margin: 10px; @padding: 20px) { - color: @color; - margin: @margin; - padding: @padding; -} -.class1 { - .mixin(@margin: 20px; @color: #33acfe); -} -.class2 { - .mixin(#efca44; @padding: 40px); -} - - -.class1 { - color: #33acfe; - margin: 20px; - padding: 20px; -} -.class2 { - color: #efca44; - margin: 10px; - padding: 40px; -} - - -.box-shadow(@x: 0; @y: 0; @blur: 1px; @color: #000) { - -webkit-box-shadow: @arguments; - -moz-box-shadow: @arguments; - box-shadow: @arguments; -} -.big-block { - .box-shadow(2px; 5px); -} - - -.big-block { - -webkit-box-shadow: 2px 5px 1px #000; - -moz-box-shadow: 2px 5px 1px #000; - box-shadow: 2px 5px 1px #000; -} - - -.mixin(/* ... */) {} // matches 0-N arguments -.mixin() {} // matches exactly 0 arguments -.mixin(@a: 1) {} // matches 0-1 arguments -.mixin(@a: 1; /* ... */) {} // matches 0-N arguments -.mixin(@a; /* ... */) {} // matches 1-N arguments - - -.mixin(@a; @rest...) { - // @rest is bound to arguments after @a - // @arguments is bound to all arguments -} - - -.mixin(@s; @color) { /* ... */ } - -.class { - .mixin(@switch; #888); -} - - -.mixin(dark; @color) { - color: darken(@color, 10%); -} -.mixin(light; @color) { - color: lighten(@color, 10%); -} -.mixin(@_; @color) { - display: block; -} - - -@switch: light; - -.class { - .mixin(@switch; #888); -} - - -.class { - color: #a2a2a2; - display: block; -} - - -.mixin(@a) { - color: @a; -} -.mixin(@a; @b) { - color: fade(@a; @b); -} - - -.mixin() { - @width: 100%; - @height: 200px; -} - -.caller { - .mixin(); - width: @width; - height: @height; -} - - -.caller { - width: 100%; - height: 200px; -} - - -.average(@x, @y) { - @average: ((@x + @y) / 2); -} - -div { - .average(16px, 50px); // "call" the mixin - padding: @average; // use its "return" value -} - - -div { - padding: 33px; -} - - -.mixin() { - @size: in-mixin; - @definedOnlyInMixin: in-mixin; -} - -.class { - margin: @size @definedOnlyInMixin; - .mixin(); -} - -@size: globally-defined-value; // callers parent scope - no protection - - -.class { - margin: in-mixin in-mixin; -} - - -.unlock(@value) { // outer mixin - .doSomething() { // nested mixin - declaration: @value; - } -} - -#namespace { - .unlock(5); // unlock doSomething mixin - .doSomething(); //nested mixin was copied here and is usable -} - - -#namespace { - declaration: 5; -} - - -// declare detached ruleset -@detached-ruleset: { background: red; }; - -// use detached ruleset -.top { - @detached-ruleset(); -} - - -.top { - background: red; -} - - -.desktop-and-old-ie(@rules) { - @media screen and (min-width: 1200px) { @rules(); } - html.lt-ie9 & { @rules(); } -} - -header { - background-color: blue; - - .desktop-and-old-ie({ - background-color: red; - }); -} - - -header { - background-color: blue; -} -@media screen and (min-width: 1200px) { - header { - background-color: red; - } -} -html.lt-ie9 header { - background-color: red; -} - - -@my-ruleset: { - .my-selector { - background-color: black; - } - }; - - -@my-ruleset: { - .my-selector { - @media tv { - background-color: black; - } - } - }; -@media (orientation:portrait) { - @my-ruleset(); -} - - -@media (orientation: portrait) and tv { - .my-selector { - background-color: black; - } -} - - -// detached ruleset with a mixin -@detached-ruleset: { - .mixin() { - color:blue; - } -}; -// call detached ruleset -.caller { - @detached-ruleset(); - .mixin(); -} - - -.caller { - color: blue; -} - - -@detached-ruleset: { - @color:blue; // this variable is private -}; -.caller { - color: @color; // syntax error -} - - -@detached-ruleset: { - caller-variable: @caller-variable; // variable is undefined here - .caller-mixin(); // mixin is undefined here -}; - -selector { - // use detached ruleset - @detached-ruleset(); - - // define variable and mixin needed inside the detached ruleset - @caller-variable: value; - .caller-mixin() { - variable: declaration; - } -} - - -selector { - caller-variable: value; - variable: declaration; -} - - -@variable: global; -@detached-ruleset: { - // will use global variable, because it is accessible - // from detached-ruleset definition - variable: @variable; -}; - -selector { - @detached-ruleset(); - @variable: value; // variable defined in caller - will be ignored -} - - -selector { - variable: global; -} - - -@detached-1: { scope-detached: @one @two; }; -.one { - @one: visible; - .two { - @detached-2: @detached-1; // copying/renaming ruleset - @two: visible; // ruleset can not see this variable - } -} - -.use-place { - .one > .two(); - @detached-2(); -} - - -#space { - .importer-1() { - @detached: { scope-detached: @variable; }; // define detached ruleset - } -} - -.importer-2() { - @variable: value; // unlocked detached ruleset CAN see this variable - #space > .importer-1(); // unlock/import detached ruleset -} - -.use-place { - .importer-2(); // unlock/import detached ruleset second time - @detached(); -} - - -.use-place { - scope-detached: value; -} - -@my-ruleset:{.my-selector{@media tv{background-color:black;}}}; - -.foo { - background: #900; -} -@import "this-is-valid.less"; - - -@import "foo"; // foo.less is imported -@import "foo.less"; // foo.less is imported -@import "foo.php"; // foo.php imported as a less file -@import "foo.css"; // statement left in place, as-is - - -.navbar:extend(.navbar all) {} - - -@import (less) "foo.css"; - - -@import (css) "foo.less"; - - -@import "foo.less"; - - -@import (once) "foo.less"; -@import (once) "foo.less"; // this statement will be ignored - - -// file: foo.less -.a { - color: green; -} -// file: main.less -@import (multiple) "foo.less"; -@import (multiple) "foo.less"; - - -.a { - color: green; -} -.a { - color: green; -} - - -.mixin (@a) when (lightness(@a) >= 50%) { - background-color: black; -} -.mixin (@a) when (lightness(@a) < 50%) { - background-color: white; -} -.mixin (@a) { - color: @a; -} - - -.class1 { .mixin(#ddd) } -.class2 { .mixin(#555) } - - -.class1 { - background-color: black; - color: #ddd; -} -.class2 { - background-color: white; - color: #555; -} - - -.truth (@a) when (@a) { /* ... */ } -.truth (@a) when (@a = true) { /* ... */ } - - -.class { - .truth(40); // Will not match any of the above definitions. -} - - -@media: mobile; - -.mixin (@a) when (@media = mobile) { /* ... */ } -.mixin (@a) when (@media = desktop) { /* ... */ } - -.max (@a; @b) when (@a > @b) { width: @a } -.max (@a; @b) when (@a < @b) { width: @b } - - -.mixin (@a) when (isnumber(@a)) and (@a > 0) { /* ... */ } - - -.mixin (@a) when (@a > 10), (@a < -10) { /* ... */ } - - -.mixin (@b) when not (@b > 0) { /* ... */ } - - -.mixin (@a; @b: 0) when (isnumber(@b)) { /* ... */ } -.mixin (@a; @b: black) when (iscolor(@b)) { /* ... */ } - - -.mixin (@a) when (@a > 0) { /* ... */ } -.mixin (@a) when (default()) { /* ... */ } // matches only if first mixin does not, i.e. when @a <= 0 - - -.my-optional-style() when (@my-option = true) { - button { - color: white; - } -} -.my-optional-style(); - - -button when (@my-option = true) { - color: white; -} - - -& when (@my-option = true) { - button { - color: white; - } - a { - color: blue; - } -} - - -.loop(@counter) when (@counter > 0) { - .loop((@counter - 1)); // next iteration - width: (10px * @counter); // code for each iteration -} - -div { - .loop(5); // launch the loop -} - - -div { - width: 10px; - width: 20px; - width: 30px; - width: 40px; - width: 50px; -} - - -.generate-columns(4); - -.generate-columns(@n, @i: 1) when (@i =< @n) { - .column-@{i} { - width: (@i * 100% / @n); - } - .generate-columns(@n, (@i + 1)); -} - - -.column-1 { - width: 25%; -} -.column-2 { - width: 50%; -} -.column-3 { - width: 75%; -} -.column-4 { - width: 100%; -} - - -.mixin() { - box-shadow+: inset 0 0 10px #555; -} -.myclass { - .mixin(); - box-shadow+: 0 0 20px black; -} - - -.myclass { - box-shadow: inset 0 0 10px #555, 0 0 20px black; -} - - -.mixin() { - transform+_: scale(2); -} -.myclass { - .mixin(); - transform+_: rotate(15deg); -} - - -.myclass { - transform: scale(2) rotate(15deg); -} - - -a { - color: blue; - &:hover { - color: green; - } -} - - -a { - color: blue; -} - -a:hover { - color: green; -} - - -.button { - &-ok { - background-image: url("ok.png"); - } - &-cancel { - background-image: url("cancel.png"); - } - - &-custom { - background-image: url("custom.png"); - } -} - - -.button-ok { - background-image: url("ok.png"); -} -.button-cancel { - background-image: url("cancel.png"); -} -.button-custom { - background-image: url("custom.png"); -} - - -.link { - & + & { - color: red; - } - - & & { - color: green; - } - - && { - color: blue; - } - - &, &ish { - color: cyan; - } -} - - -.link + .link { - color: red; -} -.link .link { - color: green; -} -.link.link { - color: blue; -} -.link, .linkish { - color: cyan; -} - - -.grand { - .parent { - & > & { - color: red; - } - - & & { - color: green; - } - - && { - color: blue; - } - - &, &ish { - color: cyan; - } - } -} - - -.grand .parent > .grand .parent { - color: red; -} -.grand .parent .grand .parent { - color: green; -} -.grand .parent.grand .parent { - color: blue; -} -.grand .parent, -.grand .parentish { - color: cyan; -} - - -.header { - .menu { - border-radius: 5px; - .no-borderradius & { - background-image: url('images/button-background.png'); - } - } -} - - -.header .menu { - border-radius: 5px; -} -.no-borderradius .header .menu { - background-image: url('images/button-background.png'); -} - - -p, a, ul, li { - border-top: 2px dotted #366; - & + & { - border-top: 0; - } -} - - -p, -a, -ul, -li { - border-top: 2px dotted #366; -} -p + p, -p + a, -p + ul, -p + li, -a + p, -a + a, -a + ul, -a + li, -ul + p, -ul + a, -ul + ul, -ul + li, -li + p, -li + a, -li + ul, -li + li { - border-top: 0; -} - -.foobar { - &:extend(.foo); -} - -.thing { - &:hover { - background-color: blue; - .thing-child {} - } -} - -.foo, - // Comment -.bar { - // Comment - color: red; // Comment -} - -// Variables -@link-color: #428bca; // Comment - -[href]:hover &, // Comment' -[href]:focus &, // Comment" -[href]:active & { - .tooltip { - opacity: 1; - } -} - -// Usage -@import // Comment - "@{themes}/tidal-wave.less"; - -// Mixin with escaped / -.margin-bottom-1\\/3() { - margin-bottom: 0.8rem; -} - -label { - .margin-bottom-1\\/3; -} - -// whitespace between variable and colon, #2925 #4090 -@FoO : bar; - -// should not parse as custom-selector -@custom-selector :--icon #id; - -// extend #7977 -.class { - &:extend(.some-class .some-other-class .some-very-loooooooooooooong-class all); -} -.class { - &:extend( - .some-class .some-other-class .some-very-loooooooooooooong-class all - ); -} -.class { - &:extend(.some-class .some-other-class .some-very-loooooooooooooong-class .some-very-loooooooooooooong-class all); -} - -// #8177 -.hello { - &:extend(.input:disabled)} - -=====================================output===================================== -@nice-blue: #5b83ad; -@light-blue: @nice-blue + #111; - -#header { - color: @light-blue; -} - -#header { - color: #6c94be; -} - -.bordered { - border-top: dotted 1px black; - border-bottom: solid 2px black; -} - -#menu a { - color: #111; - .bordered; -} - -.post a { - color: red; - .bordered; -} - -#header { - color: black; -} -#header .navigation { - font-size: 12px; -} -#header .logo { - width: 300px; -} - -#header { - color: black; - .navigation { - font-size: 12px; - } - .logo { - width: 300px; - } -} - -.clearfix { - display: block; - zoom: 1; - - &:after { - content: " "; - display: block; - font-size: 0; - height: 0; - clear: both; - visibility: hidden; - } -} - -.screen-color { - @media screen { - color: green; - @media (min-width: 768px) { - color: red; - } - } - @media tv { - color: black; - } -} - -@media screen { - .screen-color { - color: green; - } -} -@media screen and (min-width: 768px) { - .screen-color { - color: red; - } -} -@media tv { - .screen-color { - color: black; - } -} - -#a { - color: blue; - @font-face { - src: made-up-url; - } - padding: 2 2 2 2; -} - -#a { - color: blue; -} -@font-face { - src: made-up-url; -} -#a { - padding: 2 2 2 2; -} - -// numbers are converted into the same units -@conversion-1: 5cm + 10mm; // result is 6cm -@conversion-2: 2 - 3cm - 5mm; // result is -1.5cm - -// conversion is impossible -@incompatible-units: 2 + 5px - 3cm; // result is 4px - -// example with variables -@base: 5%; -@filler: @base * 2; // result is 10% -@other: @base + @filler; // result is 15% - -@base: 2cm * 3mm; // result is 6cm - -@color: #224488 / 2; //results in #112244 -background-color: #112244 + #111; // result is #223355 - -.weird-element { - content: ~"^//* some horrible but needed css hack"; -} - -@base: #f04615; -@width: 0.5; - -.class { - width: percentage(@width); // returns \`50%\` - color: saturate(@base, 5%); - background-color: spin(lighten(@base, 25%), 8); -} - -#bundle { - .button { - display: block; - border: 1px solid black; - background-color: grey; - &:hover { - background-color: white; - } - } - .tab { - /* ... */ - } - .citation { - /* ... */ - } -} - -#header a { - color: orange; - #bundle > .button; -} - -@var: red; - -#page { - @var: white; - #header { - color: @var; // white - } -} - -@var: red; - -#page { - #header { - color: @var; // white - } - @var: white; -} - -/* One hell of a block -style comment! */ -@var: red; - -// Get in line! -@var: white; - -@import "library"; // library.less -@import "typo.css"; - -a, -.link { - color: #428bca; -} -.widget { - color: #fff; - background: #428bca; -} - -// Variables -@link-color: #428bca; // sea blue -@link-color-hover: darken(@link-color, 10%); - -// Usage -a, -.link { - color: @link-color; -} -a:hover { - color: @link-color-hover; -} -.widget { - color: #fff; - background: @link-color; -} - -// Variables -@my-selector: banner; - -// Usage -.@{my-selector} { - font-weight: bold; - line-height: 40px; - margin: 0 auto; -} - -.banner { - font-weight: bold; - line-height: 40px; - margin: 0 auto; -} - -// Variables -@images: "../img"; - -// Usage -body { - color: #444; - width: 100px; - background: url("/foo/@{images}/bar"); - background: url("@{images}/white-sand.\${width}.png"); - background: url(@images); -} - -// Variables -@themes: "../../src/themes"; - -// Usage -@import "@{themes}/tidal-wave.less"; - -@property: color; - -.widget { - @{property}: #0ee; - background-@{property}: #999; -} - -.widget { - color: #0ee; - background-color: #999; -} - -@fnord: "I am fnord."; -@var: "fnord"; -content: @@var; - -content: "I am fnord."; - -.lazy-eval { - width: @var; -} - -@var: @a; -@a: 9%; - -.lazy-eval-scope { - width: @var; - @a: 9%; -} - -@var: @a; -@a: 100%; - -.lazy-eval-scope { - width: 9%; -} - -@var: 0; -.class { - @var: 1; - .brass { - @var: 2; - three: @var; - @var: 3; - } - one: @var; -} - -.class { - one: 1; -} -.class .brass { - three: 3; -} - -// library -@base-color: green; -@dark-color: darken(@base-color, 10%); - -// use of library -@import "library.less"; -@base-color: red; - -nav ul { - &:extend(.inline); - background: blue; -} - -nav ul { - &:extend(.inline); - background: blue; -} -.inline { - color: red; -} - -nav ul { - background: blue; -} -.inline, -nav ul { - color: red; -} - -.a:extend(.b) { -} - -// the above block does the same thing as the below block -.a { - &:extend(.b); -} - -.c:extend(.d all) { - // extends all instances of ".d" e.g. ".x.d" or ".d.x" -} -.c:extend(.d) { - // extends only instances where the selector will be output as just ".d" -} - -.e:extend(.f) { -} -.e:extend(.g) { -} - -// the above an the below do the same thing -.e:extend(.f, .g) { -} - -.big-division, -.big-bag:extend(.bag), -.big-bucket:extend(.bucket) { - // body -} - -pre:hover, -.some-class { - &:extend(div pre); -} - -pre:hover:extend(div pre), -.some-class:extend(div pre) { -} - -.bucket { - tr { - // nested ruleset with target selector - color: blue; - } -} -.some-class:extend(.bucket tr) { -} // nested ruleset is recognized - -.bucket tr, -.some-class { - color: blue; -} - -.bucket { - tr & { - // nested ruleset with target selector - color: blue; - } -} -.some-class:extend(tr .bucket) { -} // nested ruleset is recognized - -tr .bucket, -.some-class { - color: blue; -} - -.a.class, -.class.a, -.class > .a { - color: blue; -} -.test:extend(.class) { -} // this will NOT match the any selectors above - -*.class { - color: blue; -} -.noStar:extend(.class) { -} // this will NOT match the *.class selector - -*.class { - color: blue; -} - -link:hover:visited { - color: blue; -} -.selector:extend(link:visited:hover) { -} - -link:hover:visited { - color: blue; -} - -:nth-child(1n + 3) { - color: blue; -} -.child:extend(:nth-child(n + 3)) { -} - -:nth-child(1n + 3) { - color: blue; -} - -[title="identifier"] { - color: blue; -} -[title="identifier"] { - color: blue; -} -[title="identifier"] { - color: blue; -} - -.noQuote:extend([title="identifier"]) { -} -.singleQuote:extend([title="identifier"]) { -} -.doubleQuote:extend([title="identifier"]) { -} - -[title="identifier"], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - -[title="identifier"], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - -[title="identifier"], -.noQuote, -.singleQuote, -.doubleQuote { - color: blue; -} - -.a.b.test, -.test.c { - color: orange; -} -.test { - &:hover { - color: green; - } -} - -.replacement:extend(.test all) { -} - -.a.b.test, -.test.c, -.a.b.replacement, -.replacement.c { - color: orange; -} -.test:hover, -.replacement:hover { - color: green; -} - -@variable: .bucket; -@{variable} { - // interpolated selector - color: blue; -} -.some-class:extend(.bucket) { -} // does nothing, no match is found - -.bucket { - color: blue; -} -.some-class:extend(@{variable}) { -} // interpolated selector matches nothing -@variable: .bucket; - -.bucket { - color: blue; -} - -.bucket { - color: blue; -} -@{variable}:extend(.bucket) { -} -@variable: .selector; - -.bucket, -.selector { - color: blue; -} - -@media print { - .screenClass:extend(.selector) { - } // extend inside media - .selector { - // this will be matched - it is in the same media - color: black; - } -} -.selector { - // ruleset on top of style sheet - extend ignores it - color: red; -} -@media screen { - .selector { - // ruleset inside another media - extend ignores it - color: blue; - } -} - -@media print { - .selector, - .screenClass { - /* ruleset inside the same media was extended */ - color: black; - } -} -.selector { - /* ruleset on top of style sheet was ignored */ - color: red; -} -@media screen { - .selector { - /* ruleset inside another media was ignored */ - color: blue; - } -} - -@media screen { - .screenClass:extend(.selector) { - } // extend inside media - @media (min-width: 1023px) { - .selector { - // ruleset inside nested media - extend ignores it - color: blue; - } - } -} - -@media screen and (min-width: 1023px) { - .selector { - /* ruleset inside another nested media was ignored */ - color: blue; - } -} - -@media screen { - .selector { - /* ruleset inside nested media - top level extend works */ - color: blue; - } - @media (min-width: 1023px) { - .selector { - /* ruleset inside nested media - top level extend works */ - color: blue; - } - } -} - -.topLevel:extend(.selector) { -} /* top level extend matches everything */ - -@media screen { - .selector, - .topLevel { - /* ruleset inside media was extended */ - color: blue; - } -} -@media screen and (min-width: 1023px) { - .selector, - .topLevel { - /* ruleset inside nested media was extended */ - color: blue; - } -} - -.alert-info, -.widget { - /* declarations */ -} - -.alert:extend(.alert-info, .widget) { -} - -.alert-info, -.widget, -.alert, -.alert { - /* declarations */ -} - -.animal { - background-color: black; - color: white; -} - -.animal { - background-color: black; - color: white; -} -.bear { - background-color: brown; -} - -.animal { - background-color: black; - color: white; -} -.bear { - &:extend(.animal); - background-color: brown; -} - -.my-inline-block() { - display: inline-block; - font-size: 0; -} -.thing1 { - .my-inline-block; -} -.thing2 { - .my-inline-block; -} - -.thing1 { - display: inline-block; - font-size: 0; -} -.thing2 { - display: inline-block; - font-size: 0; -} - -.my-inline-block { - display: inline-block; - font-size: 0; -} -.thing1 { - &:extend(.my-inline-block); -} -.thing2 { - &:extend(.my-inline-block); -} - -.my-inline-block, -.thing1, -.thing2 { - display: inline-block; - font-size: 0; -} - -li.list > a { - // list styles -} -button.list-style { - &:extend(li.list > a); // use the same list styles -} - -.a, -#b { - color: red; -} -.mixin-class { - .a(); -} -.mixin-id { - #b(); -} - -.a, -#b { - color: red; -} -.mixin-class { - color: red; -} -.mixin-id { - color: red; -} - -// these two statements do the same thing: -.a(); -.a; - -.my-mixin { - color: black; -} -.my-other-mixin() { - background: white; -} -.class { - .my-mixin; - .my-other-mixin; -} - -.my-mixin { - color: black; -} -.class { - color: black; - background: white; -} - -.my-hover-mixin() { - &:hover { - border: 1px solid red; - } -} -button { - .my-hover-mixin(); -} - -button:hover { - border: 1px solid red; -} - -#outer { - .inner { - color: red; - } -} - -.c { - #outer > .inner; -} - -// all do the same thing -#outer > .inner; -#outer > .inner(); -#outer .inner; -#outer .inner(); -#outer.inner; -#outer.inner(); - -#my-library { - .my-mixin() { - color: black; - } -} -// which can be used like this -.class { - #my-library > .my-mixin(); -} - -#namespace when (@mode=huge) { - .mixin() { - /* */ - } -} - -#namespace { - .mixin() when (@mode=huge) { - /* */ - } -} - -#sp_1 when (default()) { - #sp_2 when (default()) { - .mixin() when not(default()) { - /* */ - } - } -} - -.foo (@bg: #f5f5f5, @color: #900) { - background: @bg; - color: @color; -} -.unimportant { - .foo(); -} -.important { - .foo() !important; -} - -.unimportant { - background: #f5f5f5; - color: #900; -} -.important { - background: #f5f5f5 !important; - color: #900 !important; -} - -.border-radius(@radius) { - -webkit-border-radius: @radius; - -moz-border-radius: @radius; - border-radius: @radius; -} - -#header { - .border-radius(4px); -} -.button { - .border-radius(6px); -} - -.border-radius(@radius: 5px) { - -webkit-border-radius: @radius; - -moz-border-radius: @radius; - border-radius: @radius; -} - -#header { - .border-radius; -} - -.wrap() { - text-wrap: wrap; - white-space: -moz-pre-wrap; - white-space: pre-wrap; - word-wrap: break-word; -} - -pre { - .wrap; -} - -pre { - text-wrap: wrap; - white-space: -moz-pre-wrap; - white-space: pre-wrap; - word-wrap: break-word; -} - -.mixin(@color) { - color-1: @color; -} -.mixin(@color; @padding: 2) { - color-2: @color; - padding-2: @padding; -} -.mixin(@color; @padding; @margin: 2) { - color-3: @color; - padding-3: @padding; - margin: @margin @margin @margin @margin; -} -.some .selector div { - .mixin(#008000); -} - -.some .selector div { - color-1: #008000; - color-2: #008000; - padding-2: 2; -} - -.mixin(@color: black; @margin: 10px; @padding: 20px) { - color: @color; - margin: @margin; - padding: @padding; -} -.class1 { - .mixin(@margin: 20px; @color: #33acfe); -} -.class2 { - .mixin(#efca44; @padding: 40px); -} - -.class1 { - color: #33acfe; - margin: 20px; - padding: 20px; -} -.class2 { - color: #efca44; - margin: 10px; - padding: 40px; -} - -.box-shadow(@x: 0; @y: 0; @blur: 1px; @color: #000) { - -webkit-box-shadow: @arguments; - -moz-box-shadow: @arguments; - box-shadow: @arguments; -} -.big-block { - .box-shadow(2px; 5px); -} - -.big-block { - -webkit-box-shadow: 2px 5px 1px #000; - -moz-box-shadow: 2px 5px 1px #000; - box-shadow: 2px 5px 1px #000; -} - -.mixin(/* ... */) { -} // matches 0-N arguments -.mixin() { -} // matches exactly 0 arguments -.mixin(@a: 1) { -} // matches 0-1 arguments -.mixin(@a: 1; /* ... */) { -} // matches 0-N arguments -.mixin(@a; /* ... */) { -} // matches 1-N arguments - -.mixin(@a; @rest...) { - // @rest is bound to arguments after @a - // @arguments is bound to all arguments -} - -.mixin(@s; @color) { - /* ... */ -} - -.class { - .mixin(@switch; #888); -} - -.mixin(dark; @color) { - color: darken(@color, 10%); -} -.mixin(light; @color) { - color: lighten(@color, 10%); -} -.mixin(@_; @color) { - display: block; -} - -@switch: light; - -.class { - .mixin(@switch; #888); -} - -.class { - color: #a2a2a2; - display: block; -} - -.mixin(@a) { - color: @a; -} -.mixin(@a; @b) { - color: fade(@a; @b); -} - -.mixin() { - @width: 100%; - @height: 200px; -} - -.caller { - .mixin(); - width: @width; - height: @height; -} - -.caller { - width: 100%; - height: 200px; -} - -.average(@x, @y) { - @average: ((@x + @y) / 2); -} - -div { - .average(16px, 50px); // "call" the mixin - padding: @average; // use its "return" value -} - -div { - padding: 33px; -} - -.mixin() { - @size: in-mixin; - @definedOnlyInMixin: in-mixin; -} - -.class { - margin: @size @definedOnlyInMixin; - .mixin(); -} - -@size: globally-defined-value; // callers parent scope - no protection - -.class { - margin: in-mixin in-mixin; -} - -.unlock(@value) { - // outer mixin - .doSomething() { - // nested mixin - declaration: @value; - } -} - -#namespace { - .unlock(5); // unlock doSomething mixin - .doSomething(); //nested mixin was copied here and is usable -} - -#namespace { - declaration: 5; -} - -// declare detached ruleset -@detached-ruleset: { - background: red; -}; - -// use detached ruleset -.top { - @detached-ruleset(); -} - -.top { - background: red; -} - -.desktop-and-old-ie(@rules) { - @media screen and (min-width: 1200px) { - @rules(); - } - html.lt-ie9 & { - @rules(); - } -} - -header { - background-color: blue; - - .desktop-and-old-ie({ - background-color: red; - }); -} - -header { - background-color: blue; -} -@media screen and (min-width: 1200px) { - header { - background-color: red; - } -} -html.lt-ie9 header { - background-color: red; -} - -@my-ruleset: { - .my-selector { - background-color: black; - } -}; - -@my-ruleset: { - .my-selector { - @media tv { - background-color: black; - } - } -}; -@media (orientation: portrait) { - @my-ruleset(); -} - -@media (orientation: portrait) and tv { - .my-selector { - background-color: black; - } -} - -// detached ruleset with a mixin -@detached-ruleset: { - .mixin() { - color: blue; - } -}; -// call detached ruleset -.caller { - @detached-ruleset(); - .mixin(); -} - -.caller { - color: blue; -} - -@detached-ruleset: { - @color: blue; // this variable is private -}; -.caller { - color: @color; // syntax error -} - -@detached-ruleset: { - caller-variable: @caller-variable; // variable is undefined here - .caller-mixin(); // mixin is undefined here -}; - -selector { - // use detached ruleset - @detached-ruleset(); - - // define variable and mixin needed inside the detached ruleset - @caller-variable: value; - .caller-mixin() { - variable: declaration; - } -} - -selector { - caller-variable: value; - variable: declaration; -} - -@variable: global; -@detached-ruleset: { - // will use global variable, because it is accessible - // from detached-ruleset definition - variable: @variable; -}; - -selector { - @detached-ruleset(); - @variable: value; // variable defined in caller - will be ignored -} - -selector { - variable: global; -} - -@detached-1: { - scope-detached: @one @two; -}; -.one { - @one: visible; - .two { - @detached-2: @detached-1; // copying/renaming ruleset - @two: visible; // ruleset can not see this variable - } -} - -.use-place { - .one > .two(); - @detached-2(); -} - -#space { - .importer-1() { - @detached: { - scope-detached: @variable; - }; // define detached ruleset - } -} - -.importer-2() { - @variable: value; // unlocked detached ruleset CAN see this variable - #space > .importer-1(); // unlock/import detached ruleset -} - -.use-place { - .importer-2(); // unlock/import detached ruleset second time - @detached(); -} - -.use-place { - scope-detached: value; -} - -@my-ruleset: { - .my-selector { - @media tv { - background-color: black; - } - } -}; - -.foo { - background: #900; -} -@import "this-is-valid.less"; - -@import "foo"; // foo.less is imported -@import "foo.less"; // foo.less is imported -@import "foo.php"; // foo.php imported as a less file -@import "foo.css"; // statement left in place, as-is - -.navbar:extend(.navbar all) { -} - -@import (less) "foo.css"; - -@import (css) "foo.less"; - -@import "foo.less"; - -@import (once) "foo.less"; -@import (once) "foo.less"; // this statement will be ignored - -// file: foo.less -.a { - color: green; -} -// file: main.less -@import (multiple) "foo.less"; -@import (multiple) "foo.less"; - -.a { - color: green; -} -.a { - color: green; -} - -.mixin (@a) when (lightness(@a) >= 50%) { - background-color: black; -} -.mixin (@a) when (lightness(@a) < 50%) { - background-color: white; -} -.mixin (@a) { - color: @a; -} - -.class1 { - .mixin(#ddd); -} -.class2 { - .mixin(#555); -} - -.class1 { - background-color: black; - color: #ddd; -} -.class2 { - background-color: white; - color: #555; -} - -.truth (@a) when (@a) { - /* ... */ -} -.truth (@a) when (@a = true) { - /* ... */ -} - -.class { - .truth(40); // Will not match any of the above definitions. -} - -@media: mobile; - -.mixin (@a) when (@media = mobile) { - /* ... */ -} -.mixin (@a) when (@media = desktop) { - /* ... */ -} - -.max (@a; @b) when (@a > @b) { - width: @a; -} -.max (@a; @b) when (@a < @b) { - width: @b; -} - -.mixin (@a) when (isnumber(@a)) and (@a > 0) { - /* ... */ -} - -.mixin (@a) when (@a > 10), (@a < -10) { - /* ... */ -} - -.mixin (@b) when not (@b > 0) { - /* ... */ -} - -.mixin (@a; @b: 0) when (isnumber(@b)) { - /* ... */ -} -.mixin (@a; @b: black) when (iscolor(@b)) { - /* ... */ -} - -.mixin (@a) when (@a > 0) { - /* ... */ -} -.mixin (@a) when (default()) { - /* ... */ -} // matches only if first mixin does not, i.e. when @a <= 0 - -.my-optional-style() when (@my-option = true) { - button { - color: white; - } -} -.my-optional-style(); - -button when (@my-option = true) { - color: white; -} - -& when (@my-option = true) { - button { - color: white; - } - a { - color: blue; - } -} - -.loop(@counter) when (@counter > 0) { - .loop((@counter - 1)); // next iteration - width: (10px * @counter); // code for each iteration -} - -div { - .loop(5); // launch the loop -} - -div { - width: 10px; - width: 20px; - width: 30px; - width: 40px; - width: 50px; -} - -.generate-columns(4); - -.generate-columns(@n, @i: 1) when (@i =< @n) { - .column-@{i} { - width: (@i * 100% / @n); - } - .generate-columns(@n, (@i + 1)); -} - -.column-1 { - width: 25%; -} -.column-2 { - width: 50%; -} -.column-3 { - width: 75%; -} -.column-4 { - width: 100%; -} - -.mixin() { - box-shadow+: inset 0 0 10px #555; -} -.myclass { - .mixin(); - box-shadow+: 0 0 20px black; -} - -.myclass { - box-shadow: inset 0 0 10px #555, 0 0 20px black; -} - -.mixin() { - transform+_: scale(2); -} -.myclass { - .mixin(); - transform+_: rotate(15deg); -} - -.myclass { - transform: scale(2) rotate(15deg); -} - -a { - color: blue; - &:hover { - color: green; - } -} - -a { - color: blue; -} - -a:hover { - color: green; -} - -.button { - &-ok { - background-image: url("ok.png"); - } - &-cancel { - background-image: url("cancel.png"); - } - - &-custom { - background-image: url("custom.png"); - } -} - -.button-ok { - background-image: url("ok.png"); -} -.button-cancel { - background-image: url("cancel.png"); -} -.button-custom { - background-image: url("custom.png"); -} - -.link { - & + & { - color: red; - } - - & & { - color: green; - } - - && { - color: blue; - } - - &, - &ish { - color: cyan; - } -} - -.link + .link { - color: red; -} -.link .link { - color: green; -} -.link.link { - color: blue; -} -.link, -.linkish { - color: cyan; -} - -.grand { - .parent { - & > & { - color: red; - } - - & & { - color: green; - } - - && { - color: blue; - } - - &, - &ish { - color: cyan; - } - } -} - -.grand .parent > .grand .parent { - color: red; -} -.grand .parent .grand .parent { - color: green; -} -.grand .parent.grand .parent { - color: blue; -} -.grand .parent, -.grand .parentish { - color: cyan; -} - -.header { - .menu { - border-radius: 5px; - .no-borderradius & { - background-image: url("images/button-background.png"); - } - } -} - -.header .menu { - border-radius: 5px; -} -.no-borderradius .header .menu { - background-image: url("images/button-background.png"); -} - -p, -a, -ul, -li { - border-top: 2px dotted #366; - & + & { - border-top: 0; - } -} - -p, -a, -ul, -li { - border-top: 2px dotted #366; -} -p + p, -p + a, -p + ul, -p + li, -a + p, -a + a, -a + ul, -a + li, -ul + p, -ul + a, -ul + ul, -ul + li, -li + p, -li + a, -li + ul, -li + li { - border-top: 0; -} - -.foobar { - &:extend(.foo); -} - -.thing { - &:hover { - background-color: blue; - .thing-child { - } - } -} - -.foo, - // Comment -.bar { - // Comment - color: red; // Comment -} - -// Variables -@link-color: #428bca; // Comment - -[href]:hover &, // Comment' -[href]:focus &, // Comment" -[href]:active & { - .tooltip { - opacity: 1; - } -} - -// Usage -@import // Comment - "@{themes}/tidal-wave.less"; - -// Mixin with escaped / -.margin-bottom-1\\/3() { - margin-bottom: 0.8rem; -} - -label { - .margin-bottom-1\\/3; -} - -// whitespace between variable and colon, #2925 #4090 -@FoO: bar; - -// should not parse as custom-selector -@custom-selector: --icon #id; - -// extend #7977 -.class { - &:extend(.some-class - .some-other-class - .some-very-loooooooooooooong-class - all); -} -.class { - &:extend(.some-class - .some-other-class - .some-very-loooooooooooooong-class - all); -} -.class { - &:extend(.some-class - .some-other-class - .some-very-loooooooooooooong-class - .some-very-loooooooooooooong-class - all); -} - -// #8177 -.hello { - &:extend(.input:disabled); -} - -================================================================================ -`; - -exports[`quotes-in-comments.less format 1`] = ` -====================================options===================================== -parsers: ["less"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Animation -// ' -.a { color: red } - -.aa:hover::after { content: "\\""; } // " - - -.b { background:url(http://example.com); } .b::after { content: "a"; } - -.bb { background:url('http://example.com/(foo)bar'); } .bb::after { content: "'a"; } // """ - -// Animation ! -.c { color:red } - -.d { color: red /* // */ } .d::after { content: "'"; } - -/* fff - // */ .d:hover::after { - // qw'erty - content: "'''"; } - -[href]:active { - opacity: // '!' "?" - 1; -} -=====================================output===================================== -// Animation -// ' -.a { - color: red; -} - -.aa:hover::after { - content: '"'; -} // " - -.b { - background: url(http://example.com); -} -.b::after { - content: "a"; -} - -.bb { - background: url("http://example.com/(foo)bar"); -} -.bb::after { - content: "'a"; -} // """ - -// Animation ! -.c { - color: red; -} - -.d { - color: red; /* // */ -} -.d::after { - content: "'"; -} - -/* fff - // */ -.d:hover::after { - // qw'erty - content: "'''"; -} - -[href]:active { - opacity: // '!' "?" - 1; -} - -================================================================================ -`; diff --git a/tests/format/less/less/format.test.js b/tests/format/less/less/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/less/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/less/jsfmt.spec.js b/tests/format/less/less/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/less/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/no-semicolon/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/no-semicolon/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/no-semicolon/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/no-semicolon/__snapshots__/format.test.js.snap diff --git a/tests/format/less/no-semicolon/format.test.js b/tests/format/less/no-semicolon/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/no-semicolon/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/no-semicolon/jsfmt.spec.js b/tests/format/less/no-semicolon/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/no-semicolon/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/parens/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/parens/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/parens/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/parens/__snapshots__/format.test.js.snap diff --git a/tests/format/less/parens/format.test.js b/tests/format/less/parens/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/parens/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/parens/jsfmt.spec.js b/tests/format/less/parens/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/parens/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/less/postcss-8-improment/__snapshots__/format.test.js.snap b/tests/format/less/postcss-8-improment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..075f3bd93ece --- /dev/null +++ b/tests/format/less/postcss-8-improment/__snapshots__/format.test.js.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty-props.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +:root { + --empty:; + --one-space: ; + --two-space: ; +--many-space: ; +} + +=====================================output===================================== +:root { + --empty:; + --one-space: ; + --two-space: ; + --many-space: ; +} + +================================================================================ +`; + +exports[`test.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} + +=====================================output===================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a": 1}}, [4]]; + --javascript: function(rule) {console.log(rule)}; +} + +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} + +================================================================================ +`; diff --git a/tests/format/less/postcss-8-improment/empty-props.less b/tests/format/less/postcss-8-improment/empty-props.less new file mode 100644 index 000000000000..172a41d5f6ba --- /dev/null +++ b/tests/format/less/postcss-8-improment/empty-props.less @@ -0,0 +1,6 @@ +:root { + --empty:; + --one-space: ; + --two-space: ; +--many-space: ; +} diff --git a/tests/format/less/postcss-8-improment/format.test.js b/tests/format/less/postcss-8-improment/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/postcss-8-improment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/postcss-8-improment/test.less b/tests/format/less/postcss-8-improment/test.less new file mode 100644 index 000000000000..d269083a9d4c --- /dev/null +++ b/tests/format/less/postcss-8-improment/test.less @@ -0,0 +1,17 @@ +/* +This test is copied from `postcss@8` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} diff --git a/tests/format/less/variable-selector/__snapshots__/format.test.js.snap b/tests/format/less/variable-selector/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2fe63ad095eb --- /dev/null +++ b/tests/format/less/variable-selector/__snapshots__/format.test.js.snap @@ -0,0 +1,16 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`variable-selector.less format 1`] = ` +====================================options===================================== +parsers: ["less"] +printWidth: 80 + | printWidth +=====================================input====================================== +@{selector}{} + +=====================================output===================================== +@{selector} { +} + +================================================================================ +`; diff --git a/tests/format/less/variable-selector/format.test.js b/tests/format/less/variable-selector/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/variable-selector/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/variable-selector/variable-selector.less b/tests/format/less/variable-selector/variable-selector.less new file mode 100644 index 000000000000..0536fbe04d29 --- /dev/null +++ b/tests/format/less/variable-selector/variable-selector.less @@ -0,0 +1 @@ +@{selector}{} diff --git a/tests/format/less/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/yaml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/less/yaml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/less/yaml/__snapshots__/format.test.js.snap diff --git a/tests/format/less/yaml/format.test.js b/tests/format/less/yaml/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/less/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/less/yaml/jsfmt.spec.js b/tests/format/less/yaml/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/less/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/lwc/lwc/__snapshots__/format.test.js.snap b/tests/format/lwc/lwc/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..861550b65c53 --- /dev/null +++ b/tests/format/lwc/lwc/__snapshots__/format.test.js.snap @@ -0,0 +1,115 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`attributes.html - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["lwc"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> + </template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}> +=====================================output===================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> +</template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}></a> + +================================================================================ +`; + +exports[`attributes.html - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["lwc"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> + </template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}> +=====================================output===================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> +</template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}></a> + +================================================================================ +`; + +exports[`attributes.html - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["lwc"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> + </template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}> +=====================================output===================================== +<template> + <div + data-for={value} + data-for={value[0]} + data-for={value.toString()} + data-for={value()} + class="test" + ></div> +</template> +<template if:true={value.error}> + <c-error-panel errors={value.error}></c-error-panel> +</template> +<a href="#" onclick={aFunction}></a> + +================================================================================ +`; diff --git a/tests/format/lwc/lwc/__snapshots__/jsfmt.spec.js.snap b/tests/format/lwc/lwc/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3e72a3138787..000000000000 --- a/tests/format/lwc/lwc/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,114 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`attributes.html - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["lwc"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> - </template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}> -=====================================output===================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> -</template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}></a> - -================================================================================ -`; - -exports[`attributes.html - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["lwc"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> - </template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}> -=====================================output===================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> -</template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}></a> - -================================================================================ -`; - -exports[`attributes.html format 1`] = ` -====================================options===================================== -parsers: ["lwc"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> - </template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}> -=====================================output===================================== -<template> - <div - data-for={value} - data-for={value[0]} - data-for={value.toString()} - data-for={value()} - class="test" - ></div> -</template> -<template if:true={value.error}> - <c-error-panel errors={value.error}></c-error-panel> -</template> -<a href="#" onclick={aFunction}></a> - -================================================================================ -`; diff --git a/tests/format/lwc/lwc/format.test.js b/tests/format/lwc/lwc/format.test.js new file mode 100644 index 000000000000..c30eae1afcd0 --- /dev/null +++ b/tests/format/lwc/lwc/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["lwc"], { trailingComma: "none" }); +runFormatTest(import.meta, ["lwc"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["lwc"], { semi: false }); diff --git a/tests/format/lwc/lwc/jsfmt.spec.js b/tests/format/lwc/lwc/jsfmt.spec.js deleted file mode 100644 index 5637f1b27d5e..000000000000 --- a/tests/format/lwc/lwc/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["lwc"], { trailingComma: "none" }); -run_spec(__dirname, ["lwc"], {}); -run_spec(__dirname, ["lwc"], { semi: false }); diff --git a/tests/format/markdown/auto-link/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/auto-link/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/auto-link/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/auto-link/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/auto-link/format.test.js b/tests/format/markdown/auto-link/format.test.js new file mode 100644 index 000000000000..dbbc9cf6abdb --- /dev/null +++ b/tests/format/markdown/auto-link/format.test.js @@ -0,0 +1,77 @@ +const urls = [ + "http://www.example.com:80/_a", + "http://www.example.com:80/_a_", + "http://www.example.com:80/_a__", + "http://www.example.com:80/_a_b", + "http://www.example.com:80/_a_/", + "http://www.example.com:80/_a_/_", + "http://www.example.com:80/*a", + "http://www.example.com:80/*a*", + "http://www.example.com:80/*a**", + "http://www.example.com:80/*a*b", + "http://www.example.com:80/*a*/", + "http://www.example.com:80/*a*/*", + "http://www.example.com:80/_a*", + "http://www.example.com:80/_a_*", + "http://www.example.com:80/_a*b", + "http://www.example.com:80/_a*/", + "http://www.example.com:80/_a_/*", +]; + +const wrappers = [ + (url) => url, + + (url) => `_${url}_`, + (url) => `*${url}*`, + (url) => `_${url}*`, + (url) => `*${url}_`, + // (url) => `__${url}__`, + // (url) => `**${url}**`, + // (url) => `*_${url}_*`, + // (url) => `_*${url}*_`, + // (url) => `*_${url}*_`, + // (url) => `_*${url}_*`, + + (url) => `_ ${url}_`, + (url) => `* ${url}*`, + (url) => `_ ${url}*`, + (url) => `* ${url}_`, + // (url) => `__ ${url}__`, + // (url) => `** ${url}**`, + // (url) => `*_ ${url}_*`, + // (url) => `_* ${url}*_`, + // (url) => `*_ ${url}*_`, + // (url) => `_* ${url}_*`, + + (url) => `_${url} _`, + (url) => `*${url} *`, + (url) => `_${url} *`, + (url) => `*${url} _`, + // (url) => `__${url} __`, + // (url) => `**${url} **`, + // (url) => `*_${url} _*`, + // (url) => `_*${url} *_`, + // (url) => `*_${url} *_`, + // (url) => `_*${url} _*`, + + (url) => `_ ${url} _`, + (url) => `* ${url} *`, + (url) => `_ ${url} *`, + (url) => `* ${url} _`, + // (url) => `__ ${url} __`, + // (url) => `** ${url} **`, + // (url) => `*_ ${url} _*`, + // (url) => `_* ${url} *_`, + // (url) => `*_ ${url} *_`, + // (url) => `_* ${url} _*`, +]; + +const cases = urls.flatMap((url) => wrappers.map((fn) => fn(url))); + +runFormatTest( + { + importMeta: import.meta, + snippets: cases.map((code) => ({ code, name: code })), + }, + ["markdown"], +); diff --git a/tests/format/markdown/auto-link/jsfmt.spec.js b/tests/format/markdown/auto-link/jsfmt.spec.js deleted file mode 100644 index 8f65afa30464..000000000000 --- a/tests/format/markdown/auto-link/jsfmt.spec.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @template T - * @param {Array<Array<T>>} array - * @returns {Array<T>} - */ -// TODO: Remove this when we drop support for Node.js v10 -// eslint-disable-next-line unicorn/prefer-spread -const flat = (array) => [].concat(...array); - -const urls = [ - "http://www.example.com:80/_a", - "http://www.example.com:80/_a_", - "http://www.example.com:80/_a__", - "http://www.example.com:80/_a_b", - "http://www.example.com:80/_a_/", - "http://www.example.com:80/_a_/_", - "http://www.example.com:80/*a", - "http://www.example.com:80/*a*", - "http://www.example.com:80/*a**", - "http://www.example.com:80/*a*b", - "http://www.example.com:80/*a*/", - "http://www.example.com:80/*a*/*", - "http://www.example.com:80/_a*", - "http://www.example.com:80/_a_*", - "http://www.example.com:80/_a*b", - "http://www.example.com:80/_a*/", - "http://www.example.com:80/_a_/*", -]; - -const wrappers = [ - (url) => url, - - (url) => `_${url}_`, - (url) => `*${url}*`, - (url) => `_${url}*`, - (url) => `*${url}_`, - // (url) => `__${url}__`, - // (url) => `**${url}**`, - // (url) => `*_${url}_*`, - // (url) => `_*${url}*_`, - // (url) => `*_${url}*_`, - // (url) => `_*${url}_*`, - - (url) => `_ ${url}_`, - (url) => `* ${url}*`, - (url) => `_ ${url}*`, - (url) => `* ${url}_`, - // (url) => `__ ${url}__`, - // (url) => `** ${url}**`, - // (url) => `*_ ${url}_*`, - // (url) => `_* ${url}*_`, - // (url) => `*_ ${url}*_`, - // (url) => `_* ${url}_*`, - - (url) => `_${url} _`, - (url) => `*${url} *`, - (url) => `_${url} *`, - (url) => `*${url} _`, - // (url) => `__${url} __`, - // (url) => `**${url} **`, - // (url) => `*_${url} _*`, - // (url) => `_*${url} *_`, - // (url) => `*_${url} *_`, - // (url) => `_*${url} _*`, - - (url) => `_ ${url} _`, - (url) => `* ${url} *`, - (url) => `_ ${url} *`, - (url) => `* ${url} _`, - // (url) => `__ ${url} __`, - // (url) => `** ${url} **`, - // (url) => `*_ ${url} _*`, - // (url) => `_* ${url} *_`, - // (url) => `*_ ${url} *_`, - // (url) => `_* ${url} _*`, -]; - -const cases = flat(urls.map((url) => wrappers.map((fn) => fn(url)))); - -run_spec( - { - dirname: __dirname, - snippets: cases.map((code) => ({ code, name: code })), - }, - ["markdown"] -); diff --git a/tests/format/markdown/blockquote/__snapshots__/format.test.js.snap b/tests/format/markdown/blockquote/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7827f76f62f7 --- /dev/null +++ b/tests/format/markdown/blockquote/__snapshots__/format.test.js.snap @@ -0,0 +1,763 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`code.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: +>\`\`\`json +>{ +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +>} +>\`\`\` + +=====================================output===================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and +> \`unobtrusive/flowtype\` together, your eslint config would look like this: +> +> \`\`\`json +> { +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +> } +> \`\`\` + +================================================================================ +`; + +exports[`code.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: +>\`\`\`json +>{ +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +>} +>\`\`\` + +=====================================output===================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: +> +> \`\`\`json +> { +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +> } +> \`\`\` + +================================================================================ +`; + +exports[`code.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: +>\`\`\`json +>{ +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +>} +>\`\`\` + +=====================================output===================================== +> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: +> +> \`\`\`json +> { +> "extends": [ +> "unobtrusive", +> "unobtrusive/import", +> "unobtrusive/react", +> "unobtrusive/flowtype" +> ], +> "env": { +> "browser": true +> } +> } +> \`\`\` + +================================================================================ +`; + +exports[`ignore-code.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> + +> \`\`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\`\` + +=====================================output===================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. + +> \`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\` + +================================================================================ +`; + +exports[`ignore-code.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> + +> \`\`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\`\` + +=====================================output===================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. + +> \`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\` + +================================================================================ +`; + +exports[`ignore-code.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> + +> \`\`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\`\` + +=====================================output===================================== +> \`\`\`\`md +> <!-- prettier-ignore --> +> \`\`\`js +> ugly ( code ) ; +> \`\`\` +> \`\`\`\` + +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +> - test +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` + +\`\`\`\`md +> \`\`\`md +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. +> \`\`\` +\`\`\`\` + +> \`\`\`\`md +> > \`\`\`md +> > <!-- prettier-ignore --> +> > - This is a long long +> > long long long long +> > long long paragraph. +> > \`\`\` +> \`\`\`\` + +> <!-- prettier-ignore --> +> - This is a long long +> long long long long +> long long paragraph. + +> \`\`\`js +> // prettier-ignore +> const x = 1, +> b = 2 +> \`\`\` + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +>>> 123 + +=====================================output===================================== +> > > 123 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +>>> 123 + +=====================================output===================================== +> > > 123 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +>>> 123 + +=====================================output===================================== +> > > 123 + +================================================================================ +`; + +exports[`notext-end.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> [!NOTE] +> \`DOOM\` + +> _b_ +>> \`A\` +>> \`B\` + +> *a* +>> # foo +>> \`a\` > \`b\` + + +> This is a quote with an italic _across multuple lines +> which should just work_. So make sure there is no > if we set +> proseWrap to \`never\` + +> This is a quote with a link [across multuple lines +> which should just work](). So make sure there is no > if we set +> proseWrap to \`never\` + +=====================================output===================================== +> [!NOTE] \`DOOM\` + +> _b_ +> +> > \`A\` \`B\` + +> _a_ +> +> > # foo +> > +> > \`a\` > \`b\` + +> This is a quote with an italic _across multuple lines which should just work_. +> So make sure there is no > if we set proseWrap to \`never\` + +> This is a quote with a link [across multuple lines which should just work](). +> So make sure there is no > if we set proseWrap to \`never\` + +================================================================================ +`; + +exports[`notext-end.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +> [!NOTE] +> \`DOOM\` + +> _b_ +>> \`A\` +>> \`B\` + +> *a* +>> # foo +>> \`a\` > \`b\` + + +> This is a quote with an italic _across multuple lines +> which should just work_. So make sure there is no > if we set +> proseWrap to \`never\` + +> This is a quote with a link [across multuple lines +> which should just work](). So make sure there is no > if we set +> proseWrap to \`never\` + +=====================================output===================================== +> [!NOTE] \`DOOM\` + +> _b_ +> +> > \`A\` \`B\` + +> _a_ +> +> > # foo +> > +> > \`a\` > \`b\` + +> This is a quote with an italic _across multuple lines which should just work_. So make sure there is no > if we set proseWrap to \`never\` + +> This is a quote with a link [across multuple lines which should just work](). So make sure there is no > if we set proseWrap to \`never\` + +================================================================================ +`; + +exports[`notext-end.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +> [!NOTE] +> \`DOOM\` + +> _b_ +>> \`A\` +>> \`B\` + +> *a* +>> # foo +>> \`a\` > \`b\` + + +> This is a quote with an italic _across multuple lines +> which should just work_. So make sure there is no > if we set +> proseWrap to \`never\` + +> This is a quote with a link [across multuple lines +> which should just work](). So make sure there is no > if we set +> proseWrap to \`never\` + +=====================================output===================================== +> [!NOTE] +> \`DOOM\` + +> _b_ +> +> > \`A\` +> > \`B\` + +> _a_ +> +> > # foo +> > +> > \`a\` > \`b\` + +> This is a quote with an italic _across multuple lines +> which should just work_. So make sure there is no > if we set +> proseWrap to \`never\` + +> This is a quote with a link [across multuple lines +> which should just work](). So make sure there is no > if we set +> proseWrap to \`never\` + +================================================================================ +`; + +exports[`paragraph.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> This is a long long long long long long long long long long long long long long long paragraph. +> This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +> This is a long long long long long long long long long long long long long +> long long paragraph. This is a long long long long long long long long long +> long long long long long long paragraph. + +================================================================================ +`; + +exports[`paragraph.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +> This is a long long long long long long long long long long long long long long long paragraph. +> This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +> This is a long long long long long long long long long long long long long long long paragraph. This is a long long long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`paragraph.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +> This is a long long long long long long long long long long long long long long long paragraph. +> This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +> This is a long long long long long long long long long long long long long long long paragraph. +> This is a long long long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> 123 + +=====================================output===================================== +> 123 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +> 123 + +=====================================output===================================== +> 123 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +> 123 + +=====================================output===================================== +> 123 + +================================================================================ +`; diff --git a/tests/format/markdown/blockquote/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/blockquote/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4ea266234260..000000000000 --- a/tests/format/markdown/blockquote/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,207 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`code.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and \`unobtrusive/flowtype\` together, your eslint config would look like this: ->\`\`\`json ->{ -> "extends": [ -> "unobtrusive", -> "unobtrusive/import", -> "unobtrusive/react", -> "unobtrusive/flowtype" -> ], -> "env": { -> "browser": true -> } ->} ->\`\`\` - -=====================================output===================================== -> NOTE: To use \`unobtrusive\`, \`unobtrusive/import\`, \`unobtrusive/react\`, and -> \`unobtrusive/flowtype\` together, your eslint config would look like this: -> -> \`\`\`json -> { -> "extends": [ -> "unobtrusive", -> "unobtrusive/import", -> "unobtrusive/react", -> "unobtrusive/flowtype" -> ], -> "env": { -> "browser": true -> } -> } -> \`\`\` - -================================================================================ -`; - -exports[`ignore-code.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> \`\`\`\`md -> <!-- prettier-ignore --> -> \`\`\`js -> ugly ( code ) ; -> \`\`\` -> \`\`\`\` - -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` - -> - test -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` - -\`\`\`\`md -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` -\`\`\`\` - -> \`\`\`\`md -> > \`\`\`md -> > <!-- prettier-ignore --> -> > - This is a long long -> > long long long long -> > long long paragraph. -> > \`\`\` -> \`\`\`\` - -> -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> - -> \`\`\`\`js -> // prettier-ignore -> const x = 1, -> b = 2 -> \`\`\`\` - -=====================================output===================================== -> \`\`\`\`md -> <!-- prettier-ignore --> -> \`\`\`js -> ugly ( code ) ; -> \`\`\` -> \`\`\`\` - -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` - -> - test -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` - -\`\`\`\`md -> \`\`\`md -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. -> \`\`\` -\`\`\`\` - -> \`\`\`\`md -> > \`\`\`md -> > <!-- prettier-ignore --> -> > - This is a long long -> > long long long long -> > long long paragraph. -> > \`\`\` -> \`\`\`\` - -> <!-- prettier-ignore --> -> - This is a long long -> long long long long -> long long paragraph. - -> \`\`\`js -> // prettier-ignore -> const x = 1, -> b = 2 -> \`\`\` - -================================================================================ -`; - -exports[`nested.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== ->>> 123 - -=====================================output===================================== -> > > 123 - -================================================================================ -`; - -exports[`paragraph.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> This is a long long long long long long long long long long long long long long long paragraph. -> This is a long long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -> This is a long long long long long long long long long long long long long -> long long paragraph. This is a long long long long long long long long long -> long long long long long long paragraph. - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> 123 - -=====================================output===================================== -> 123 - -================================================================================ -`; diff --git a/tests/format/markdown/blockquote/format.test.js b/tests/format/markdown/blockquote/format.test.js new file mode 100644 index 000000000000..02d9abea4cbd --- /dev/null +++ b/tests/format/markdown/blockquote/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "preserve" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); diff --git a/tests/format/markdown/blockquote/jsfmt.spec.js b/tests/format/markdown/blockquote/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/blockquote/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/blockquote/notext-end.md b/tests/format/markdown/blockquote/notext-end.md new file mode 100644 index 000000000000..97435445a35a --- /dev/null +++ b/tests/format/markdown/blockquote/notext-end.md @@ -0,0 +1,19 @@ +> [!NOTE] +> `DOOM` + +> _b_ +>> `A` +>> `B` + +> *a* +>> # foo +>> `a` > `b` + + +> This is a quote with an italic _across multuple lines +> which should just work_. So make sure there is no > if we set +> proseWrap to `never` + +> This is a quote with a link [across multuple lines +> which should just work](). So make sure there is no > if we set +> proseWrap to `never` diff --git a/tests/format/markdown/break/__snapshots__/format.test.js.snap b/tests/format/markdown/break/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d5bd783e1644 --- /dev/null +++ b/tests/format/markdown/break/__snapshots__/format.test.js.snap @@ -0,0 +1,56 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +123 +456 + +123\\ +456 + +- 123 + 123 + +=====================================output===================================== +123 +456 + +123\\ +456 + +- 123 + 123 + +================================================================================ +`; + +exports[`wrap.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a + very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word + +\\ +word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word + +=====================================output===================================== +a + very-very-very-very-very-very-very-very-very-very-long-word +very-very-very-very-very-very-very-very-very-very-long-word +very-very-very-very-very-very-very-very-very-very-long-word + +\\ +word very-very-very-very-very-very-very-very-very-very-long-word +very-very-very-very-very-very-very-very-very-very-long-word + +================================================================================ +`; diff --git a/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 018ce01b8da7..000000000000 --- a/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -123 -456 - -123\\ -456 - -- 123 - 123 - -=====================================output===================================== -123 -456 - -123\\ -456 - -- 123 - 123 - -================================================================================ -`; diff --git a/tests/format/markdown/break/format.test.js b/tests/format/markdown/break/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/break/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/break/jsfmt.spec.js b/tests/format/markdown/break/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/break/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/break/wrap.md b/tests/format/markdown/break/wrap.md new file mode 100644 index 000000000000..cfcc88d8aedb --- /dev/null +++ b/tests/format/markdown/break/wrap.md @@ -0,0 +1,5 @@ +a + very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word + +\ +word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word diff --git a/tests/format/markdown/broken-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/broken-plugins/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/broken-plugins/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/broken-plugins/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/broken-plugins/format.test.js b/tests/format/markdown/broken-plugins/format.test.js new file mode 100644 index 000000000000..aa1a7961bb3e --- /dev/null +++ b/tests/format/markdown/broken-plugins/format.test.js @@ -0,0 +1,9 @@ +import createEsmUtils from "esm-utils"; + +const { require } = createEsmUtils(import.meta); + +const plugins = [ + require("../../../config/prettier-plugins/prettier-plugin-missing-comments/index.cjs"), +]; + +runFormatTest(import.meta, ["markdown"], { plugins }); diff --git a/tests/format/markdown/broken-plugins/jsfmt.spec.js b/tests/format/markdown/broken-plugins/jsfmt.spec.js deleted file mode 100644 index f798cb1ffcf3..000000000000 --- a/tests/format/markdown/broken-plugins/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -const plugins = [ - require("../../../config/prettier-plugins/prettier-plugin-missing-comments/index.js"), -]; - -run_spec(__dirname, ["markdown"], { plugins }); diff --git a/tests/format/markdown/code/__snapshots__/format.test.js.snap b/tests/format/markdown/code/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..128e80876b73 --- /dev/null +++ b/tests/format/markdown/code/__snapshots__/format.test.js.snap @@ -0,0 +1,1343 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`0-indent-js.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- 1 + - 2 + - 3 + \`\`\`js + md\` + # this is the root indent + + # this is the root indent + + # this is the root indent + \` + + something\` + asd + + asd + + asd + \` + \`\`\` + +=====================================output===================================== +- 1 + - 2 + - 3 + + \`\`\`js + md\` + # this is the root indent + + # this is the root indent + + # this is the root indent + \`; + + something\` + asd + + asd + + asd + \`; + \`\`\` + +================================================================================ +`; + +exports[`additional-space.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. Fork the repo and create your branch from \`master\`. + + Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: + \`\`\`sh + git clone https://github.com/<your_username>/jest + cd jest + git checkout -b my_branch + \`\`\` + Note: + Replace \`<your_username>\` with your GitHub username + +3. Run \`yarn install\`. + On Windows: + To install [Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may need to download either node.js or Chocolatey<br /> + + \`\`\`sh + yarn install + \`\`\` + To check your version of Yarn and ensure it's installed you can type: + \`\`\`sh + yarn --version + \`\`\` +=====================================output===================================== +1. Fork the repo and create your branch from \`master\`. + + Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: + + \`\`\`sh + git clone https://github.com/<your_username>/jest + cd jest + git checkout -b my_branch + \`\`\` + + Note: Replace \`<your_username>\` with your GitHub username + +2. Run \`yarn install\`. On Windows: To install + [Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may + need to download either node.js or Chocolatey<br /> + + \`\`\`sh + yarn install + \`\`\` + + To check your version of Yarn and ensure it's installed you can type: + + \`\`\`sh + yarn --version + \`\`\` + +================================================================================ +`; + +exports[`backtick.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`\`\`\`\`\`\`\` + +\`\`\`js +console.log("hello world!"); +\`\`\` + +\`\`\`\`\`\`\`\`\`\` + +=====================================output===================================== +\`\`\`\` + +\`\`\`js +console.log("hello world!"); +\`\`\` + +\`\`\`\` + +================================================================================ +`; + +exports[`format.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`js +const foo = 'bar' + + + + console .log( 213 ) +\`\`\` + +=====================================output===================================== +\`\`\`js +const foo = "bar"; + +console.log(213); +\`\`\` + +================================================================================ +`; + +exports[`indent.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + Indented Code Block + Indented Code Block + Indented Code Block + Indented Code Block + Indented Code Block + +- \`\`\` + Fenced Code Block + Fenced Code Block + Fenced Code Block + Fenced Code Block + Fenced Code Block + \`\`\` + +<!-- prettier/prettier#3459 --> + +1. Change to your home directory: + + cd + +2. List the contents: + + ls -l + +=====================================output===================================== + Indented Code Block + Indented Code Block + Indented Code Block + Indented Code Block + Indented Code Block + +- \`\`\` + Fenced Code Block + Fenced Code Block + Fenced Code Block + Fenced Code Block + Fenced Code Block + \`\`\` + +<!-- prettier/prettier#3459 --> + +1. Change to your home directory: + + cd + +2. List the contents: + + ls -l + +================================================================================ +`; + +exports[`lang.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`js +console.log("hello world"); +\`\`\` + +=====================================output===================================== +\`\`\`js +console.log("hello world"); +\`\`\` + +================================================================================ +`; + +exports[`leading-trailing-newlines.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` + + +123 + + +\`\`\` + +=====================================output===================================== +\`\`\` + + +123 + + +\`\`\` + +================================================================================ +`; + +exports[`mdn-auth-api.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + + +\`\`\`javascript + + +// sample arguments for registration +const createCredentialDefaultArgs = { + publicKey: { + // Relying Party (a.k.a. - Service): + rp: { + name: "Acme", }, + // User: + user: { + id: new Uint8Array(16), + name: "carina.p.anand@example.com", displayName: "Carina P. Anand", + }, + pubKeyCredParams: [ + { + type: "public-key", + alg: -7, + }, + ], + attestation: "direct", + timeout: 60000, + challenge: new Uint8Array( +[ + // must be a cryptographically random number sent from a server + 0x8c, 0x0a, 0x26, 0xff, 0x22, 0x91, 0xc1, 0xe9, 0xb9, 0x4e, 0x2e, 0x17, 0x1a, 0x98, 0x6a, 0x73, 0x71, 0x9d, 0x43, 0x48, 0xd5, 0xa7, 0x6a, 0x15, 0x7e, 0x38, + 0x94, 0x52, 0x77, 0x97, 0x0f, 0xef, + ]).buffer, + }, +}; +\`\`\` + +=====================================output===================================== +\`\`\`javascript +// sample arguments for registration +const createCredentialDefaultArgs = { + publicKey: { + // Relying Party (a.k.a. - Service): + rp: { + name: "Acme", + }, + // User: + user: { + id: new Uint8Array(16), + name: "carina.p.anand@example.com", + displayName: "Carina P. Anand", + }, + pubKeyCredParams: [ + { + type: "public-key", + alg: -7, + }, + ], + attestation: "direct", + timeout: 60000, + challenge: new Uint8Array([ + // must be a cryptographically random number sent from a server + 0x8c, 0x0a, 0x26, 0xff, 0x22, 0x91, 0xc1, 0xe9, 0xb9, 0x4e, 0x2e, 0x17, + 0x1a, 0x98, 0x6a, 0x73, 0x71, 0x9d, 0x43, 0x48, 0xd5, 0xa7, 0x6a, 0x15, + 0x7e, 0x38, 0x94, 0x52, 0x77, 0x97, 0x0f, 0xef, + ]).buffer, + }, +}; +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + + +\`\`\`css + +.box { + background: + linear-gradient( + 105deg, + rgb(255 255 255 / 20%) 39%, + rgb(51 56 57 / 100%) 96% + ) center center / 400px 200px no-repeat, url(big-star.png) center no-repeat, + rebeccapurple; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.box { + background: + linear-gradient( + 105deg, + rgb(255 255 255 / 20%) 39%, + rgb(51 56 57 / 100%) 96% + ) + center center / 400px 200px no-repeat, + url(big-star.png) center no-repeat, + rebeccapurple; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-2.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + + + +background-image: linear-gradient( + to bottom, + rgb(255 255 0 / 50%), + rgb(0 0 255 / 50%) + ), url("catfront.png"); +\`\`\` + +=====================================output===================================== +\`\`\`css +background-image: + linear-gradient(to bottom, rgb(255 255 0 / 50%), rgb(0 0 255 / 50%)), + url("catfront.png"); +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-3.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + +.box { + margin: 10px 0; + color: #fff; + background: linear-gradient(90deg, + rgb(131 58 180 / 100%) 0%, + rgb(253 29 29 / 60%) 60%, rgb(252 176 69 / 100%) 100%), radial-gradient(circle, rgb(255 255 255 / 100%) 0%, rgb(0 0 0 / 100%) 28%); + border: 20px dashed black; + padding: 20px; +width: 400px; + background-origin: padding-box, content-box; + background-repeat: no-repeat; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.box { + margin: 10px 0; + color: #fff; + background: + linear-gradient( + 90deg, + rgb(131 58 180 / 100%) 0%, + rgb(253 29 29 / 60%) 60%, + rgb(252 176 69 / 100%) 100% + ), + radial-gradient(circle, rgb(255 255 255 / 100%) 0%, rgb(0 0 0 / 100%) 28%); + border: 20px dashed black; + padding: 20px; + width: 400px; + background-origin: padding-box, content-box; + background-repeat: no-repeat; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-4.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + + +.multi-bg-example { + width: 100%; height: 400px; + background-image: url(firefox.png), url(bubbles.png), linear-gradient(to right, rgb(30 + 75 115 / 100%), rgb(255 255 255 / 0%)); + background-repeat: no-repeat, no-repeat, no-repeat; +background-position: + bottom right, + left, + right; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.multi-bg-example { + width: 100%; + height: 400px; + background-image: + url(firefox.png), url(bubbles.png), + linear-gradient(to right, rgb(30 75 115 / 100%), rgb(255 255 255 / 0%)); + background-repeat: no-repeat, no-repeat, no-repeat; + background-position: + bottom right, + left, + right; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-5.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + +.stacked-linear { + background: linear-gradient( + 217deg, + rgb(255 0 0 / 80%), + rgb(255 0 0 / 0%) 70.71% + ), linear-gradient(127deg, rgb(0 255 0 / 80%), rgb(0 255 0 / 0%) 70.71%), + linear-gradient(336deg, rgb(0 0 255 / 80%), rgb(0 0 255 / 0%) 70.71%); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.stacked-linear { + background: + linear-gradient(217deg, rgb(255 0 0 / 80%), rgb(255 0 0 / 0%) 70.71%), + linear-gradient(127deg, rgb(0 255 0 / 80%), rgb(0 255 0 / 0%) 70.71%), + linear-gradient(336deg, rgb(0 0 255 / 80%), rgb(0 0 255 / 0%) 70.71%); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-6.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + + + +.stacked-radial { + background: + radial-gradient( + circle at 50% 0, + rgb(255 0 0 / 50%), + rgb(255 0 0 / 0%) 70.71% + ), + radial-gradient( + circle at 6.7% 75%, + rgb(0 0 255 / 50%), + rgb(0 0 255 / 0%) 70.71% + ), + radial-gradient( + circle at 93.3% 75%, + rgb(0 255 0 / 50%), + rgb(0 255 0 / 0%) 70.71% + ) beige; + border-radius: 50%; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.stacked-radial { + background: + radial-gradient( + circle at 50% 0, + rgb(255 0 0 / 50%), + rgb(255 0 0 / 0%) 70.71% + ), + radial-gradient( + circle at 6.7% 75%, + rgb(0 0 255 / 50%), + rgb(0 0 255 / 0%) 70.71% + ), + radial-gradient( + circle at 93.3% 75%, + rgb(0 255 0 / 50%), + rgb(0 255 0 / 0%) 70.71% + ) + beige; + border-radius: 50%; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-7.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + +.multi-repeating-linear { + background: repeating-linear-gradient( + 190deg, + rgb(255 0 0 / 50%) 40px, + rgb(255 153 0 / 50%) 80px, +rgb(255 255 0 / 50%) 120px, + rgb(0 255 0 / 50%) 160px, + rgb(0 0 255 / 50%) 200px, + rgb(75 0 130 / 50%) 240px, + rgb(238 130 238 / 50%) 280px, + rgb(255 0 0 / 50%) 300px + ), repeating-linear-gradient( + -190deg, + rgb(255 0 0 / 50%) 30px, + rgb(255 153 0 / 50%) 60px, + rgb(255 255 0 / 50%) 90px, + rgb(0 255 0 / 50%) 120px, + rgb(0 0 255 / 50%) 150px, + rgb(75 0 130 / 50%) 180px, + rgb(238 130 238 / 50%) 210px, + rgb(255 0 0 / 50%) 230px + ), repeating-linear-gradient(23deg, red 50px, orange 100px, yellow 150px, green + 200px, blue 250px, indigo 300px, violet 350px, red 370px); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.multi-repeating-linear { + background: + repeating-linear-gradient( + 190deg, + rgb(255 0 0 / 50%) 40px, + rgb(255 153 0 / 50%) 80px, + rgb(255 255 0 / 50%) 120px, + rgb(0 255 0 / 50%) 160px, + rgb(0 0 255 / 50%) 200px, + rgb(75 0 130 / 50%) 240px, + rgb(238 130 238 / 50%) 280px, + rgb(255 0 0 / 50%) 300px + ), + repeating-linear-gradient( + -190deg, + rgb(255 0 0 / 50%) 30px, + rgb(255 153 0 / 50%) 60px, + rgb(255 255 0 / 50%) 90px, + rgb(0 255 0 / 50%) 120px, + rgb(0 0 255 / 50%) 150px, + rgb(75 0 130 / 50%) 180px, + rgb(238 130 238 / 50%) 210px, + rgb(255 0 0 / 50%) 230px + ), + repeating-linear-gradient( + 23deg, + red 50px, + orange 100px, + yellow 150px, + green 200px, + blue 250px, + indigo 300px, + violet 350px, + red 370px + ); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-8.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + +.plaid-gradient { + background: repeating-linear-gradient( + 90deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, +transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), repeating-linear-gradient( + 0deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, + transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), repeating-linear-gradient( + -45deg, + transparent, + transparent 5px, + rgb(143 77 63 / 25%) 5px, + rgb(143 77 63 / 25%) 10px + ), repeating-linear-gradient(45deg, transparent, transparent 5px, rgb( + 143 77 63 / 25% + ) 5px, rgb(143 77 63 / 25%) 10px); + + background: repeating-linear-gradient( + 90deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), repeating-linear-gradient( + 0deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), repeating-linear-gradient( + -45deg, + transparent 0 5px, + rgb(143 77 63 / 25%) 5px 10px + ), repeating-linear-gradient(45deg, transparent 0 5px, rgb(143 77 63 / 25%) 5px + 10px); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +.plaid-gradient { + background: + repeating-linear-gradient( + 90deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, + transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), + repeating-linear-gradient( + 0deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, + transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), + repeating-linear-gradient( + -45deg, + transparent, + transparent 5px, + rgb(143 77 63 / 25%) 5px, + rgb(143 77 63 / 25%) 10px + ), + repeating-linear-gradient( + 45deg, + transparent, + transparent 5px, + rgb(143 77 63 / 25%) 5px, + rgb(143 77 63 / 25%) 10px + ); + + background: + repeating-linear-gradient( + 90deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), + repeating-linear-gradient( + 0deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), + repeating-linear-gradient( + -45deg, + transparent 0 5px, + rgb(143 77 63 / 25%) 5px 10px + ), + repeating-linear-gradient( + 45deg, + transparent 0 5px, + rgb(143 77 63 / 25%) 5px 10px + ); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-background-9.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + + +div { + background: conic-gradient( + #fff 0.25turn, + #000 0.25turn 0.5turn, + #fff 0.5turn 0.75turn, + #000 0.75turn + ) top left / 25% 25% repeat; + border: 1px solid; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +div { + background: conic-gradient( + #fff 0.25turn, + #000 0.25turn 0.5turn, + #fff 0.5turn 0.75turn, + #000 0.75turn + ) + top left / 25% 25% repeat; + border: 1px solid; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-filter-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(210deg 100% 50%) ) drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(30deg 100% 50%) + ); +} +img + img { +filter: none; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) + drop-shadow(-2px -2px 0 hsl(210deg 100% 50%)) + drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) + drop-shadow(-2px -2px 0 hsl(30deg 100% 50%)); +} +img + img { + filter: none; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-filter-2.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + + + +#MDN-logo { +border: 1px solid blue; + filter: drop-shadow(5px 5px 0 red) hue-rotate(180deg) drop-shadow(5px 5px 0 + red); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +#MDN-logo { + border: 1px solid blue; + filter: drop-shadow(5px 5px 0 red) hue-rotate(180deg) + drop-shadow(5px 5px 0 red); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-font-face-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + + +\`\`\`css + +@font-face { + font-family: "HeydingsControlsRegular"; + src: url("fonts/heydings_controls-webfont.eot"); + src: + url("fonts/heydings_controls-webfont.eot?#iefix") format("embedded-opentype"), +url("fonts/heydings_controls-webfont.woff") format("woff"), + url("fonts/heydings_controls-webfont.ttf") format("truetype"); + font-weight: normal; +font-style: normal; +} +\`\`\` + +=====================================output===================================== +\`\`\`css +@font-face { + font-family: "HeydingsControlsRegular"; + src: url("fonts/heydings_controls-webfont.eot"); + src: + url("fonts/heydings_controls-webfont.eot?#iefix") + format("embedded-opentype"), + url("fonts/heydings_controls-webfont.woff") format("woff"), + url("fonts/heydings_controls-webfont.ttf") format("truetype"); + font-weight: normal; + font-style: normal; +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-font-face-2.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + + + + + +@font-face { + font-family: "Bungee Spice"; + src: + url("https://fonts.googleapis.com/css2?family=Bungee+Spice") tech(color-COLRv1), url("Bungee-fallback.otf") format("opentype"); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +@font-face { + font-family: "Bungee Spice"; + src: + url("https://fonts.googleapis.com/css2?family=Bungee+Spice") + tech(color-COLRv1), + url("Bungee-fallback.otf") format("opentype"); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-grid-auto-columns.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + +/* multiple track-size values */ +grid-auto-columns: min-content max-content auto; +grid-auto-columns: 100px 150px 390px; +grid-auto-columns: 10% 33.3%; +grid-auto-columns: 0.5fr 3fr 1fr; +grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); +grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); +\`\`\` + +=====================================output===================================== +\`\`\`css +/* multiple track-size values */ +grid-auto-columns: min-content max-content auto; +grid-auto-columns: 100px 150px 390px; +grid-auto-columns: 10% 33.3%; +grid-auto-columns: 0.5fr 3fr 1fr; +grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) + minmax(20%, 80vmax); +grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); +\`\`\` + +================================================================================ +`; + +exports[`mdn-import.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + + +@import url("gridy.css") supports( display: grid) screen and (max-width: 400px); +@import url("flexy.css") supports(not (display: grid ) and (display: flex)) screen and (max-width: 400px); +@import url( +"whatever.css") supports((selector(h2 > p)) and (font-tech(color-COLRv1))); +\`\`\` + +=====================================output===================================== +\`\`\`css +@import url("gridy.css") supports(display: grid) screen and (max-width: 400px); +@import url("flexy.css") supports(not (display: grid) and (display: flex)) + screen and (max-width: 400px); +@import url("whatever.css") +supports((selector(h2 > p)) and (font-tech(color-COLRv1))); +\`\`\` + +================================================================================ +`; + +exports[`mdn-mask-image.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + +/* Multiple values */ +mask-image: image(url(mask.png), skyblue), linear-gradient(rgb(0 0 0 / 100%), transparent); +\`\`\` + +=====================================output===================================== +\`\`\`css +/* Multiple values */ +mask-image: + image(url(mask.png), skyblue), linear-gradient(rgb(0 0 0 / 100%), transparent); +\`\`\` + +================================================================================ +`; + +exports[`mdn-padding-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + +body { +padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env( + safe-area-inset-bottom, + 20px + ) env(safe-area-inset-left, 20px); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +body { + padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) + env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-padding-2.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + +p { + width: 300px; + border: 2px solid red; + padding: env(safe-area-inset-top, 50px) env(safe-area-inset-right, 50px) env( + safe-area-inset-bottom, + 50px + ) env(SAFE-AREA-INSET-LEFT, 50px); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +p { + width: 300px; + border: 2px solid red; + padding: env(safe-area-inset-top, 50px) env(safe-area-inset-right, 50px) + env(safe-area-inset-bottom, 50px) env(SAFE-AREA-INSET-LEFT, 50px); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-transform.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +\`\`\`css + +#example-element:focus { + transform: rotate3d(1, 1, 1, 30deg) matrix3d( + 1, + 0, + 0, + 0, + 0, + 1, + 6, + 0, + 0, + 0, + 1, + 0, + 50, + 100, + 0, + 1.1 + ); +} +\`\`\` + +=====================================output===================================== +\`\`\`css +#example-element:focus { + transform: rotate3d(1, 1, 1, 30deg) + matrix3d(1, 0, 0, 0, 0, 1, 6, 0, 0, 0, 1, 0, 50, 100, 0, 1.1); +} +\`\`\` + +================================================================================ +`; + +exports[`mdn-unicode-range.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +\`\`\`css + + + +@media (prefers-reduced-data: no-preference) { + @font-face { + font-family: Montserrat; + font-style: normal; + font-weight: 400; + font-display: swap; + /* latin */ + src: + local("Montserrat Regular"), + local("Montserrat-Regular"), + url("fonts/montserrat-regular.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, +U+0152-0153, U+02BB-02BC, U+02C6, + U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, + U+2212, U+2215, U+FEFF, U+FFFD; + } +} +\`\`\` + +=====================================output===================================== +\`\`\`css +@media (prefers-reduced-data: no-preference) { + @font-face { + font-family: Montserrat; + font-style: normal; + font-weight: 400; + font-display: swap; + /* latin */ + src: + local("Montserrat Regular"), + local("Montserrat-Regular"), + url("fonts/montserrat-regular.woff2") format("woff2"); + unicode-range: + U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, + U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, + U+FEFF, U+FFFD; + } +} +\`\`\` + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +hello world +\`\`\` + +=====================================output===================================== +\`\`\` +hello world +\`\`\` + +================================================================================ +`; + +exports[`ts-trailing-comma.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`ts +const test = <T,>(value: T) => {}; +\`\`\` + +\`\`\`typescript +const test = <T,>(value: T) => {}; +\`\`\` + +=====================================output===================================== +\`\`\`ts +const test = <T>(value: T) => {}; +\`\`\` + +\`\`\`typescript +const test = <T>(value: T) => {}; +\`\`\` + +================================================================================ +`; + +exports[`tsx-trailing-comma.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`tsx +const test = <T,>(value: T) => {}; +\`\`\` + +=====================================output===================================== +\`\`\`tsx +const test = <T,>(value: T) => {}; +\`\`\` + +================================================================================ +`; diff --git a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 74bd745914dd..000000000000 --- a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,311 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`0-indent-js.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- 1 - - 2 - - 3 - \`\`\`js - md\` - # this is the root indent - - # this is the root indent - - # this is the root indent - \` - - something\` - asd - - asd - - asd - \` - \`\`\` - -=====================================output===================================== -- 1 - - - 2 - - - 3 - - \`\`\`js - md\` - # this is the root indent - - # this is the root indent - - # this is the root indent - \`; - - something\` - asd - - asd - - asd - \`; - \`\`\` - -================================================================================ -`; - -exports[`additional-space.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. Fork the repo and create your branch from \`master\`. - - Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: - \`\`\`sh - git clone https://github.com/<your_username>/jest - cd jest - git checkout -b my_branch - \`\`\` - Note: - Replace \`<your_username>\` with your GitHub username - -3. Run \`yarn install\`. - On Windows: - To install [Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may need to download either node.js or Chocolatey<br /> - - \`\`\`sh - yarn install - \`\`\` - To check your version of Yarn and ensure it's installed you can type: - \`\`\`sh - yarn --version - \`\`\` -=====================================output===================================== -1. Fork the repo and create your branch from \`master\`. - - Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: - - \`\`\`sh - git clone https://github.com/<your_username>/jest - cd jest - git checkout -b my_branch - \`\`\` - - Note: Replace \`<your_username>\` with your GitHub username - -2. Run \`yarn install\`. On Windows: To install - [Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may - need to download either node.js or Chocolatey<br /> - - \`\`\`sh - yarn install - \`\`\` - - To check your version of Yarn and ensure it's installed you can type: - - \`\`\`sh - yarn --version - \`\`\` - -================================================================================ -`; - -exports[`backtick.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`\`\`\`\`\`\`\` - -\`\`\`js -console.log("hello world!"); -\`\`\` - -\`\`\`\`\`\`\`\`\`\` - -=====================================output===================================== -\`\`\`\` - -\`\`\`js -console.log("hello world!"); -\`\`\` - -\`\`\`\` - -================================================================================ -`; - -exports[`format.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`js -const foo = 'bar' - - - - console .log( 213 ) -\`\`\` - -=====================================output===================================== -\`\`\`js -const foo = "bar"; - -console.log(213); -\`\`\` - -================================================================================ -`; - -exports[`indent.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - Indented Code Block - Indented Code Block - Indented Code Block - Indented Code Block - Indented Code Block - -- \`\`\` - Fenced Code Block - Fenced Code Block - Fenced Code Block - Fenced Code Block - Fenced Code Block - \`\`\` - -<!-- prettier/prettier#3459 --> - -1. Change to your home directory: - - cd - -2. List the contents: - - ls -l - -=====================================output===================================== - Indented Code Block - Indented Code Block - Indented Code Block - Indented Code Block - Indented Code Block - -- \`\`\` - Fenced Code Block - Fenced Code Block - Fenced Code Block - Fenced Code Block - Fenced Code Block - \`\`\` - -<!-- prettier/prettier#3459 --> - -1. Change to your home directory: - - cd - -2. List the contents: - - ls -l - -================================================================================ -`; - -exports[`lang.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`js -console.log("hello world"); -\`\`\` - -=====================================output===================================== -\`\`\`js -console.log("hello world"); -\`\`\` - -================================================================================ -`; - -exports[`leading-trailing-newlines.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` - - -123 - - -\`\`\` - -=====================================output===================================== -\`\`\` - - -123 - - -\`\`\` - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -hello world -\`\`\` - -=====================================output===================================== -\`\`\` -hello world -\`\`\` - -================================================================================ -`; - -exports[`tsx-trailing-comma.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`tsx -const test = <T,>(value: T) => {}; -\`\`\` - -=====================================output===================================== -\`\`\`tsx -const test = <T,>(value: T) => {}; -\`\`\` - -================================================================================ -`; diff --git a/tests/format/markdown/code/format.test.js b/tests/format/markdown/code/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/code/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/code/jsfmt.spec.js b/tests/format/markdown/code/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/code/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/code/mdn-auth-api.md b/tests/format/markdown/code/mdn-auth-api.md new file mode 100644 index 000000000000..035c60d71898 --- /dev/null +++ b/tests/format/markdown/code/mdn-auth-api.md @@ -0,0 +1,34 @@ + + + +```javascript + + +// sample arguments for registration +const createCredentialDefaultArgs = { + publicKey: { + // Relying Party (a.k.a. - Service): + rp: { + name: "Acme", }, + // User: + user: { + id: new Uint8Array(16), + name: "carina.p.anand@example.com", displayName: "Carina P. Anand", + }, + pubKeyCredParams: [ + { + type: "public-key", + alg: -7, + }, + ], + attestation: "direct", + timeout: 60000, + challenge: new Uint8Array( +[ + // must be a cryptographically random number sent from a server + 0x8c, 0x0a, 0x26, 0xff, 0x22, 0x91, 0xc1, 0xe9, 0xb9, 0x4e, 0x2e, 0x17, 0x1a, 0x98, 0x6a, 0x73, 0x71, 0x9d, 0x43, 0x48, 0xd5, 0xa7, 0x6a, 0x15, 0x7e, 0x38, + 0x94, 0x52, 0x77, 0x97, 0x0f, 0xef, + ]).buffer, + }, +}; +``` diff --git a/tests/format/markdown/code/mdn-background-1.md b/tests/format/markdown/code/mdn-background-1.md new file mode 100644 index 000000000000..b8880ddcfb1d --- /dev/null +++ b/tests/format/markdown/code/mdn-background-1.md @@ -0,0 +1,15 @@ + + + +```css + +.box { + background: + linear-gradient( + 105deg, + rgb(255 255 255 / 20%) 39%, + rgb(51 56 57 / 100%) 96% + ) center center / 400px 200px no-repeat, url(big-star.png) center no-repeat, + rebeccapurple; +} +``` diff --git a/tests/format/markdown/code/mdn-background-2.md b/tests/format/markdown/code/mdn-background-2.md new file mode 100644 index 000000000000..10a2f82f5ae0 --- /dev/null +++ b/tests/format/markdown/code/mdn-background-2.md @@ -0,0 +1,11 @@ + +```css + + + +background-image: linear-gradient( + to bottom, + rgb(255 255 0 / 50%), + rgb(0 0 255 / 50%) + ), url("catfront.png"); +``` diff --git a/tests/format/markdown/code/mdn-background-3.md b/tests/format/markdown/code/mdn-background-3.md new file mode 100644 index 000000000000..3e572bfb3bfe --- /dev/null +++ b/tests/format/markdown/code/mdn-background-3.md @@ -0,0 +1,16 @@ + +```css + +.box { + margin: 10px 0; + color: #fff; + background: linear-gradient(90deg, + rgb(131 58 180 / 100%) 0%, + rgb(253 29 29 / 60%) 60%, rgb(252 176 69 / 100%) 100%), radial-gradient(circle, rgb(255 255 255 / 100%) 0%, rgb(0 0 0 / 100%) 28%); + border: 20px dashed black; + padding: 20px; +width: 400px; + background-origin: padding-box, content-box; + background-repeat: no-repeat; +} +``` diff --git a/tests/format/markdown/code/mdn-background-4.md b/tests/format/markdown/code/mdn-background-4.md new file mode 100644 index 000000000000..32002f27eaa6 --- /dev/null +++ b/tests/format/markdown/code/mdn-background-4.md @@ -0,0 +1,15 @@ + +```css + + +.multi-bg-example { + width: 100%; height: 400px; + background-image: url(firefox.png), url(bubbles.png), linear-gradient(to right, rgb(30 + 75 115 / 100%), rgb(255 255 255 / 0%)); + background-repeat: no-repeat, no-repeat, no-repeat; +background-position: + bottom right, + left, + right; +} +``` diff --git a/tests/format/markdown/code/mdn-background-5.md b/tests/format/markdown/code/mdn-background-5.md new file mode 100644 index 000000000000..08ad80996709 --- /dev/null +++ b/tests/format/markdown/code/mdn-background-5.md @@ -0,0 +1,13 @@ + + +```css + +.stacked-linear { + background: linear-gradient( + 217deg, + rgb(255 0 0 / 80%), + rgb(255 0 0 / 0%) 70.71% + ), linear-gradient(127deg, rgb(0 255 0 / 80%), rgb(0 255 0 / 0%) 70.71%), + linear-gradient(336deg, rgb(0 0 255 / 80%), rgb(0 0 255 / 0%) 70.71%); +} +``` diff --git a/tests/format/markdown/code/mdn-background-6.md b/tests/format/markdown/code/mdn-background-6.md new file mode 100644 index 000000000000..e1d361555360 --- /dev/null +++ b/tests/format/markdown/code/mdn-background-6.md @@ -0,0 +1,25 @@ + +```css + + + +.stacked-radial { + background: + radial-gradient( + circle at 50% 0, + rgb(255 0 0 / 50%), + rgb(255 0 0 / 0%) 70.71% + ), + radial-gradient( + circle at 6.7% 75%, + rgb(0 0 255 / 50%), + rgb(0 0 255 / 0%) 70.71% + ), + radial-gradient( + circle at 93.3% 75%, + rgb(0 255 0 / 50%), + rgb(0 255 0 / 0%) 70.71% + ) beige; + border-radius: 50%; +} +``` diff --git a/tests/format/markdown/code/mdn-background-7.md b/tests/format/markdown/code/mdn-background-7.md new file mode 100644 index 000000000000..7b094435a335 --- /dev/null +++ b/tests/format/markdown/code/mdn-background-7.md @@ -0,0 +1,29 @@ + + +```css + +.multi-repeating-linear { + background: repeating-linear-gradient( + 190deg, + rgb(255 0 0 / 50%) 40px, + rgb(255 153 0 / 50%) 80px, +rgb(255 255 0 / 50%) 120px, + rgb(0 255 0 / 50%) 160px, + rgb(0 0 255 / 50%) 200px, + rgb(75 0 130 / 50%) 240px, + rgb(238 130 238 / 50%) 280px, + rgb(255 0 0 / 50%) 300px + ), repeating-linear-gradient( + -190deg, + rgb(255 0 0 / 50%) 30px, + rgb(255 153 0 / 50%) 60px, + rgb(255 255 0 / 50%) 90px, + rgb(0 255 0 / 50%) 120px, + rgb(0 0 255 / 50%) 150px, + rgb(75 0 130 / 50%) 180px, + rgb(238 130 238 / 50%) 210px, + rgb(255 0 0 / 50%) 230px + ), repeating-linear-gradient(23deg, red 50px, orange 100px, yellow 150px, green + 200px, blue 250px, indigo 300px, violet 350px, red 370px); +} +``` diff --git a/tests/format/markdown/code/mdn-background-8.md b/tests/format/markdown/code/mdn-background-8.md new file mode 100644 index 000000000000..ff9885b3337f --- /dev/null +++ b/tests/format/markdown/code/mdn-background-8.md @@ -0,0 +1,67 @@ + + +```css + +.plaid-gradient { + background: repeating-linear-gradient( + 90deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, +transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), repeating-linear-gradient( + 0deg, + transparent, + transparent 50px, + rgb(255 127 0 / 25%) 50px, + rgb(255 127 0 / 25%) 56px, + transparent 56px, + transparent 63px, + rgb(255 127 0 / 25%) 63px, + rgb(255 127 0 / 25%) 69px, + transparent 69px, + transparent 116px, + rgb(255 206 0 / 25%) 116px, + rgb(255 206 0 / 25%) 166px + ), repeating-linear-gradient( + -45deg, + transparent, + transparent 5px, + rgb(143 77 63 / 25%) 5px, + rgb(143 77 63 / 25%) 10px + ), repeating-linear-gradient(45deg, transparent, transparent 5px, rgb( + 143 77 63 / 25% + ) 5px, rgb(143 77 63 / 25%) 10px); + + background: repeating-linear-gradient( + 90deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), repeating-linear-gradient( + 0deg, + transparent 0 50px, + rgb(255 127 0 / 25%) 50px 56px, + transparent 56px 63px, + rgb(255 127 0 / 25%) 63px 69px, + transparent 69px 116px, + rgb(255 206 0 / 25%) 116px 166px + ), repeating-linear-gradient( + -45deg, + transparent 0 5px, + rgb(143 77 63 / 25%) 5px 10px + ), repeating-linear-gradient(45deg, transparent 0 5px, rgb(143 77 63 / 25%) 5px + 10px); +} +``` diff --git a/tests/format/markdown/code/mdn-background-9.md b/tests/format/markdown/code/mdn-background-9.md new file mode 100644 index 000000000000..77096314fd3d --- /dev/null +++ b/tests/format/markdown/code/mdn-background-9.md @@ -0,0 +1,14 @@ + +```css + + +div { + background: conic-gradient( + #fff 0.25turn, + #000 0.25turn 0.5turn, + #fff 0.5turn 0.75turn, + #000 0.75turn + ) top left / 25% 25% repeat; + border: 1px solid; +} +``` diff --git a/tests/format/markdown/code/mdn-filter-1.md b/tests/format/markdown/code/mdn-filter-1.md new file mode 100644 index 000000000000..91b686831dcf --- /dev/null +++ b/tests/format/markdown/code/mdn-filter-1.md @@ -0,0 +1,13 @@ + +```css + +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(210deg 100% 50%) ) drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(30deg 100% 50%) + ); +} +img + img { +filter: none; +} +``` diff --git a/tests/format/markdown/code/mdn-filter-2.md b/tests/format/markdown/code/mdn-filter-2.md new file mode 100644 index 000000000000..8e36072e8d0f --- /dev/null +++ b/tests/format/markdown/code/mdn-filter-2.md @@ -0,0 +1,11 @@ + +```css + + + +#MDN-logo { +border: 1px solid blue; + filter: drop-shadow(5px 5px 0 red) hue-rotate(180deg) drop-shadow(5px 5px 0 + red); +} +``` diff --git a/tests/format/markdown/code/mdn-font-face-1.md b/tests/format/markdown/code/mdn-font-face-1.md new file mode 100644 index 000000000000..967eb979fb28 --- /dev/null +++ b/tests/format/markdown/code/mdn-font-face-1.md @@ -0,0 +1,16 @@ + + + +```css + +@font-face { + font-family: "HeydingsControlsRegular"; + src: url("fonts/heydings_controls-webfont.eot"); + src: + url("fonts/heydings_controls-webfont.eot?#iefix") format("embedded-opentype"), +url("fonts/heydings_controls-webfont.woff") format("woff"), + url("fonts/heydings_controls-webfont.ttf") format("truetype"); + font-weight: normal; +font-style: normal; +} +``` diff --git a/tests/format/markdown/code/mdn-font-face-2.md b/tests/format/markdown/code/mdn-font-face-2.md new file mode 100644 index 000000000000..7dfa9a6cf0a7 --- /dev/null +++ b/tests/format/markdown/code/mdn-font-face-2.md @@ -0,0 +1,14 @@ + + +```css + + + + + +@font-face { + font-family: "Bungee Spice"; + src: + url("https://fonts.googleapis.com/css2?family=Bungee+Spice") tech(color-COLRv1), url("Bungee-fallback.otf") format("opentype"); +} +``` diff --git a/tests/format/markdown/code/mdn-grid-auto-columns.md b/tests/format/markdown/code/mdn-grid-auto-columns.md new file mode 100644 index 000000000000..38b0ce96134c --- /dev/null +++ b/tests/format/markdown/code/mdn-grid-auto-columns.md @@ -0,0 +1,11 @@ + +```css + +/* multiple track-size values */ +grid-auto-columns: min-content max-content auto; +grid-auto-columns: 100px 150px 390px; +grid-auto-columns: 10% 33.3%; +grid-auto-columns: 0.5fr 3fr 1fr; +grid-auto-columns: minmax(100px, auto) minmax(max-content, 2fr) minmax(20%, 80vmax); +grid-auto-columns: 100px minmax(100px, auto) 10% 0.5fr fit-content(400px); +``` diff --git a/tests/format/markdown/code/mdn-import.md b/tests/format/markdown/code/mdn-import.md new file mode 100644 index 000000000000..68d8369250b4 --- /dev/null +++ b/tests/format/markdown/code/mdn-import.md @@ -0,0 +1,10 @@ + + +```css + + +@import url("gridy.css") supports( display: grid) screen and (max-width: 400px); +@import url("flexy.css") supports(not (display: grid ) and (display: flex)) screen and (max-width: 400px); +@import url( +"whatever.css") supports((selector(h2 > p)) and (font-tech(color-COLRv1))); +``` diff --git a/tests/format/markdown/code/mdn-mask-image.md b/tests/format/markdown/code/mdn-mask-image.md new file mode 100644 index 000000000000..ef98dbb60e5a --- /dev/null +++ b/tests/format/markdown/code/mdn-mask-image.md @@ -0,0 +1,6 @@ + +```css + +/* Multiple values */ +mask-image: image(url(mask.png), skyblue), linear-gradient(rgb(0 0 0 / 100%), transparent); +``` diff --git a/tests/format/markdown/code/mdn-padding-1.md b/tests/format/markdown/code/mdn-padding-1.md new file mode 100644 index 000000000000..6473054a9d64 --- /dev/null +++ b/tests/format/markdown/code/mdn-padding-1.md @@ -0,0 +1,11 @@ + + +```css + +body { +padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env( + safe-area-inset-bottom, + 20px + ) env(safe-area-inset-left, 20px); +} +``` diff --git a/tests/format/markdown/code/mdn-padding-2.md b/tests/format/markdown/code/mdn-padding-2.md new file mode 100644 index 000000000000..2931a329e0d4 --- /dev/null +++ b/tests/format/markdown/code/mdn-padding-2.md @@ -0,0 +1,13 @@ + + +```css + +p { + width: 300px; + border: 2px solid red; + padding: env(safe-area-inset-top, 50px) env(safe-area-inset-right, 50px) env( + safe-area-inset-bottom, + 50px + ) env(SAFE-AREA-INSET-LEFT, 50px); +} +``` diff --git a/tests/format/markdown/code/mdn-transform.md b/tests/format/markdown/code/mdn-transform.md new file mode 100644 index 000000000000..ad1f7b054773 --- /dev/null +++ b/tests/format/markdown/code/mdn-transform.md @@ -0,0 +1,24 @@ + +```css + +#example-element:focus { + transform: rotate3d(1, 1, 1, 30deg) matrix3d( + 1, + 0, + 0, + 0, + 0, + 1, + 6, + 0, + 0, + 0, + 1, + 0, + 50, + 100, + 0, + 1.1 + ); +} +``` diff --git a/tests/format/markdown/code/mdn-unicode-range.md b/tests/format/markdown/code/mdn-unicode-range.md new file mode 100644 index 000000000000..b2d5d6b82e83 --- /dev/null +++ b/tests/format/markdown/code/mdn-unicode-range.md @@ -0,0 +1,24 @@ + + +```css + + + +@media (prefers-reduced-data: no-preference) { + @font-face { + font-family: Montserrat; + font-style: normal; + font-weight: 400; + font-display: swap; + /* latin */ + src: + local("Montserrat Regular"), + local("Montserrat-Regular"), + url("fonts/montserrat-regular.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, +U+0152-0153, U+02BB-02BC, U+02C6, + U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, + U+2212, U+2215, U+FEFF, U+FFFD; + } +} +``` diff --git a/tests/format/markdown/code/ts-trailing-comma.md b/tests/format/markdown/code/ts-trailing-comma.md new file mode 100644 index 000000000000..26d19559799a --- /dev/null +++ b/tests/format/markdown/code/ts-trailing-comma.md @@ -0,0 +1,7 @@ +```ts +const test = <T,>(value: T) => {}; +``` + +```typescript +const test = <T,>(value: T) => {}; +``` diff --git a/tests/format/markdown/cursor/17227.md b/tests/format/markdown/cursor/17227.md new file mode 100644 index 000000000000..0318005cb133 --- /dev/null +++ b/tests/format/markdown/cursor/17227.md @@ -0,0 +1,20 @@ +#<|> Angular note + +```typescript + import {Component} from '@angular/core'; + + @Component({ + selector: 'app-root', + standalone: true, + imports: [], + template: ` + <h1> + + {{ title }}</h1> + `, + styleUrls: ['./app.component.css'], + }) + export class AppComponent { + title = 'default'; + } +``` diff --git a/tests/format/markdown/cursor/__snapshots__/format.test.js.snap b/tests/format/markdown/cursor/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..62269d89eb18 --- /dev/null +++ b/tests/format/markdown/cursor/__snapshots__/format.test.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`17227.md format 1`] = ` +====================================options===================================== +cursorOffset: 1 +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +#<|> Angular note + +\`\`\`typescript + import {Component} from '@angular/core'; + + @Component({ + selector: 'app-root', + standalone: true, + imports: [], + template: \` + <h1> + + {{ title }}</h1> + \`, + styleUrls: ['./app.component.css'], + }) + export class AppComponent { + title = 'default'; + } +\`\`\` + +=====================================output===================================== +#<|> Angular note + +\`\`\`typescript +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + standalone: true, + imports: [], + template: \` + <h1> + {{ title }} + </h1> + \`, + styleUrls: ["./app.component.css"], +}) +export class AppComponent { + title = "default"; +} +\`\`\` + +================================================================================ +`; diff --git a/tests/format/markdown/cursor/format.test.js b/tests/format/markdown/cursor/format.test.js new file mode 100644 index 000000000000..7df6c9eaad2d --- /dev/null +++ b/tests/format/markdown/cursor/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"]); diff --git a/tests/format/markdown/definition/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/definition/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/definition/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/definition/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/definition/format.test.js b/tests/format/markdown/definition/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/definition/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/definition/jsfmt.spec.js b/tests/format/markdown/definition/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/definition/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/delete/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/delete/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/delete/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/delete/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/delete/format.test.js b/tests/format/markdown/delete/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/delete/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/delete/jsfmt.spec.js b/tests/format/markdown/delete/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/delete/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/emphasis/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/emphasis/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/emphasis/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/emphasis/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/emphasis/format.test.js b/tests/format/markdown/emphasis/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/emphasis/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/emphasis/jsfmt.spec.js b/tests/format/markdown/emphasis/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/emphasis/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/fenced-code-block/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/fenced-code-block/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/fenced-code-block/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/fenced-code-block/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/fenced-code-block/format.test.js b/tests/format/markdown/fenced-code-block/format.test.js new file mode 100644 index 000000000000..28f202987dd2 --- /dev/null +++ b/tests/format/markdown/fenced-code-block/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["```\na", "```\na\n", "```\na\n\n", "```\na" + "\n".repeat(10)], + }, + ["markdown"], +); diff --git a/tests/format/markdown/fenced-code-block/jsfmt.spec.js b/tests/format/markdown/fenced-code-block/jsfmt.spec.js deleted file mode 100644 index 6e3be3f8b8ce..000000000000 --- a/tests/format/markdown/fenced-code-block/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: ["```\na", "```\na\n", "```\na\n\n", "```\na" + "\n".repeat(10)], - }, - ["markdown"] -); diff --git a/tests/format/markdown/footnote/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/footnote/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/footnote/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/footnote/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/footnote/format.test.js b/tests/format/markdown/footnote/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/footnote/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/footnote/jsfmt.spec.js b/tests/format/markdown/footnote/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/footnote/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap b/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..90d25d8d3a7a --- /dev/null +++ b/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap @@ -0,0 +1,691 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`long.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. +[^world]: this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +[^hello]: + this is a long long long long long long long long long long long long long + paragraph. + +[^world]: + this is a long long long long long long long long long long long long long + paragraph. this is a long long long long long long long long long long long + long long paragraph. + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. +[^world]: this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. + +[^world]: this is a long long long long long long long long long long long long long paragraph. this is a long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. +[^world]: this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. + +[^world]: + this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`long.md - {"tabWidth":3} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +tabWidth: 3 + | printWidth +=====================================input====================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. +[^world]: this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +[^hello]: this is a long long long long long long long long long long long long long paragraph. + +[^world]: + this is a long long long long long long long long long long long long long paragraph. + this is a long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[^fn1]: + + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +=====================================output===================================== +[^fn1]: + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: + Here is a footnote which includes code. Here is a footnote which includes + code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[^fn1]: + + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +=====================================output===================================== +[^fn1]: + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: + Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +[^fn1]: + + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +=====================================output===================================== +[^fn1]: + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: + Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +================================================================================ +`; + +exports[`multiline.md - {"tabWidth":3} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +tabWidth: 3 + | printWidth +=====================================input====================================== +[^fn1]: + + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +=====================================output===================================== +[^fn1]: + > \`\`\`rs + > fn main() { + > println!("this is some Rust!"); + > } + > \`\`\` + +[^fn2]: Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +[^fn2]: + Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. + + \`\`\`rs + fn main() { + println!("this is some Rust!"); + } + \`\`\` + +================================================================================ +`; + +exports[`sibling.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: a +[^a]: a + +--- + +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: a +[^a]: a + +=====================================output===================================== +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: a + +[^a]: a + +--- + +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: a + +[^a]: a + +================================================================================ +`; + +exports[`sibling.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: a +[^a]: a + +--- + +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: a +[^a]: a + +=====================================output===================================== +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: a + +[^a]: a + +--- + +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: a + +[^a]: a + +================================================================================ +`; + +exports[`sibling.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: a +[^a]: a + +--- + +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: a +[^a]: a + +=====================================output===================================== +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: a + +[^a]: a + +--- + +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: a + +[^a]: a + +================================================================================ +`; + +exports[`sibling.md - {"tabWidth":3} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +tabWidth: 3 + | printWidth +=====================================input====================================== +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: > 123 +[^a]: a +[^a]: a +[^a]: a + +--- + +[^a]: a +[^a]: a +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: > 123\\ + > 456 +[^a]: a +[^a]: a +[^a]: a + +=====================================output===================================== +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: > 123 + +[^a]: a + +[^a]: a + +[^a]: a + +--- + +[^a]: a + +[^a]: a + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: + > 123\\ + > 456 + +[^a]: a + +[^a]: a + +[^a]: a + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[^hello]: world + +=====================================output===================================== +[^hello]: world + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[^hello]: world + +=====================================output===================================== +[^hello]: world + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +[^hello]: world + +=====================================output===================================== +[^hello]: world + +================================================================================ +`; + +exports[`simple.md - {"tabWidth":3} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +tabWidth: 3 + | printWidth +=====================================input====================================== +[^hello]: world + +=====================================output===================================== +[^hello]: world + +================================================================================ +`; diff --git a/tests/format/markdown/footnoteDefinition/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/footnoteDefinition/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 35bded7b694d..000000000000 --- a/tests/format/markdown/footnoteDefinition/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,632 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`long.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -[^hello]: - this is a long long long long long long long long long long long long long - paragraph. - -[^world]: - this is a long long long long long long long long long long long long long - paragraph. this is a long long long long long long long long long long long - long long paragraph. - -================================================================================ -`; - -exports[`long.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: this is a long long long long long long long long long long long long long paragraph. this is a long long long long long long long long long long long long long paragraph. - -================================================================================ -`; - -exports[`long.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: - this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -================================================================================ -`; - -exports[`long.md - {"tabWidth":3} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -tabWidth: 3 - | printWidth -=====================================input====================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -[^hello]: this is a long long long long long long long long long long long long long paragraph. -[^world]: - this is a long long long long long long long long long long long long long paragraph. - this is a long long long long long long long long long long long long long paragraph. - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[^fn1]: - - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -=====================================output===================================== -[^fn1]: - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: - Here is a footnote which includes code. Here is a footnote which includes - code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[^fn1]: - - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -=====================================output===================================== -[^fn1]: - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: - Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -[^fn1]: - - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -=====================================output===================================== -[^fn1]: - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: - Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -================================================================================ -`; - -exports[`multiline.md - {"tabWidth":3} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -tabWidth: 3 - | printWidth -=====================================input====================================== -[^fn1]: - - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -=====================================output===================================== -[^fn1]: - > \`\`\`rs - > fn main() { - > println!("this is some Rust!"); - > } - > \`\`\` - -[^fn2]: Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -[^fn2]: - Here is a footnote which includes code. Here is a footnote which includes code. Here is a footnote which includes code. - - \`\`\`rs - fn main() { - println!("this is some Rust!"); - } - \`\`\` - -================================================================================ -`; - -exports[`sibling.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: a -[^a]: a - -=====================================output===================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: a -[^a]: a - -================================================================================ -`; - -exports[`sibling.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: a -[^a]: a - -=====================================output===================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: a -[^a]: a - -================================================================================ -`; - -exports[`sibling.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: a -[^a]: a - -=====================================output===================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: a -[^a]: a - -================================================================================ -`; - -exports[`sibling.md - {"tabWidth":3} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -tabWidth: 3 - | printWidth -=====================================input====================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: > 123\\ - > 456 -[^a]: a -[^a]: a -[^a]: a - -=====================================output===================================== -[^a]: a -[^a]: a -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: > 123 -[^a]: a -[^a]: a -[^a]: a - ---- - -[^a]: a -[^a]: a -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: - > 123\\ - > 456 - -[^a]: a -[^a]: a -[^a]: a - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[^hello]: world - -=====================================output===================================== -[^hello]: world - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[^hello]: world - -=====================================output===================================== -[^hello]: world - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -[^hello]: world - -=====================================output===================================== -[^hello]: world - -================================================================================ -`; - -exports[`simple.md - {"tabWidth":3} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -tabWidth: 3 - | printWidth -=====================================input====================================== -[^hello]: world - -=====================================output===================================== -[^hello]: world - -================================================================================ -`; diff --git a/tests/format/markdown/footnoteDefinition/format.test.js b/tests/format/markdown/footnoteDefinition/format.test.js new file mode 100644 index 000000000000..2bed17ece187 --- /dev/null +++ b/tests/format/markdown/footnoteDefinition/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "preserve" }); +runFormatTest(import.meta, ["markdown"], { tabWidth: 3 }); diff --git a/tests/format/markdown/footnoteDefinition/jsfmt.spec.js b/tests/format/markdown/footnoteDefinition/jsfmt.spec.js deleted file mode 100644 index d704d74cf086..000000000000 --- a/tests/format/markdown/footnoteDefinition/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); -run_spec(__dirname, ["markdown"], { proseWrap: "preserve" }); -run_spec(__dirname, ["markdown"], { tabWidth: 3 }); diff --git a/tests/format/markdown/footnoteReference/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/footnoteReference/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/footnoteReference/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/footnoteReference/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/footnoteReference/format.test.js b/tests/format/markdown/footnoteReference/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/footnoteReference/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/footnoteReference/jsfmt.spec.js b/tests/format/markdown/footnoteReference/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/footnoteReference/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/front-matter/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/front-matter/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/front-matter/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/front-matter/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/front-matter/format.test.js b/tests/format/markdown/front-matter/format.test.js new file mode 100644 index 000000000000..7df6c9eaad2d --- /dev/null +++ b/tests/format/markdown/front-matter/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"]); diff --git a/tests/format/markdown/front-matter/jsfmt.spec.js b/tests/format/markdown/front-matter/jsfmt.spec.js deleted file mode 100644 index ff3b58b03c88..000000000000 --- a/tests/format/markdown/front-matter/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"]); diff --git a/tests/format/markdown/heading/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/heading/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/heading/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/heading/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/heading/format.test.js b/tests/format/markdown/heading/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/heading/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/heading/jsfmt.spec.js b/tests/format/markdown/heading/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/heading/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/html/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/html/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/html/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/html/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/html/format.test.js b/tests/format/markdown/html/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/html/jsfmt.spec.js b/tests/format/markdown/html/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/html/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/ignore/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/ignore/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/ignore/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/ignore/format.test.js b/tests/format/markdown/ignore/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/ignore/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/ignore/jsfmt.spec.js b/tests/format/markdown/ignore/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/image/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/image/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/image/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/image/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/image/format.test.js b/tests/format/markdown/image/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/image/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/image/jsfmt.spec.js b/tests/format/markdown/image/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/image/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/imageReference/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/imageReference/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/imageReference/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/imageReference/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/imageReference/format.test.js b/tests/format/markdown/imageReference/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/imageReference/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/imageReference/jsfmt.spec.js b/tests/format/markdown/imageReference/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/imageReference/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/indentation/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/indentation/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/indentation/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/indentation/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/indentation/format.test.js b/tests/format/markdown/indentation/format.test.js new file mode 100644 index 000000000000..c299ab801f02 --- /dev/null +++ b/tests/format/markdown/indentation/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["markdown"], { + proseWrap: "always", + useTabs: true, +}); diff --git a/tests/format/markdown/indentation/jsfmt.spec.js b/tests/format/markdown/indentation/jsfmt.spec.js deleted file mode 100644 index 8183e3720f3e..000000000000 --- a/tests/format/markdown/indentation/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always", useTabs: true }); diff --git a/tests/format/markdown/inlineCode/__snapshots__/format.test.js.snap b/tests/format/markdown/inlineCode/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..df6032e80d69 --- /dev/null +++ b/tests/format/markdown/inlineCode/__snapshots__/format.test.js.snap @@ -0,0 +1,371 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`backtick.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` \`123\` \`\` + +\`\`12\`34\`\` + +\`\` \`12\`\` + +\`\`34\` \`\` + +\`\` \`\`\`123\`\`\` \`\` + +\`\`\` 3 \`\`22\`\` \`1\` \`\`\` + +\`\` 2 \`\`\`123\`\`\` \`1\` \`\` + +\`\` CODE\` \`\` + +=====================================output===================================== +\`\` \`123\` \`\` + +\`\`12\`34\`\` + +\`\` \`12\`\` + +\`\`34\` \`\` + +\` \`\`\`123\`\`\` \` + +\`\`\` 3 \`\`22\`\` \`1\` \`\`\` + +\`\` 2 \`\`\`123\`\`\` \`1\` \`\` + +\`\` CODE\` \`\` + +================================================================================ +`; + +exports[`backtick.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\`\` \`123\` \`\` + +\`\`12\`34\`\` + +\`\` \`12\`\` + +\`\`34\` \`\` + +\`\` \`\`\`123\`\`\` \`\` + +\`\`\` 3 \`\`22\`\` \`1\` \`\`\` + +\`\` 2 \`\`\`123\`\`\` \`1\` \`\` + +\`\` CODE\` \`\` + +=====================================output===================================== +\`\` \`123\` \`\` + +\`\`12\`34\`\` + +\`\` \`12\`\` + +\`\`34\` \`\` + +\` \`\`\`123\`\`\` \` + +\`\`\` 3 \`\`22\`\` \`1\` \`\`\` + +\`\` 2 \`\`\`123\`\`\` \`1\` \`\` + +\`\` CODE\` \`\` + +================================================================================ +`; + +exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`const x = "中文123"\` + +=====================================output===================================== +\`const x = "中文123"\` + +================================================================================ +`; + +exports[`cjk.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\`const x = "中文123"\` + +=====================================output===================================== +\`const x = "中文123"\` + +================================================================================ +`; + +exports[`escape.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`1*2*3\` + +=====================================output===================================== +\`1*2*3\` + +================================================================================ +`; + +exports[`escape.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\`1*2*3\` + +=====================================output===================================== +\`1*2*3\` + +================================================================================ +`; + +exports[`inline-code-multiple-spaces.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` three spaces everywhere \` + +\` three spaces + everywhere \` + +\` three spaces + everywhere \` + +=====================================output===================================== +\` three spaces everywhere \` + +\` three spaces everywhere \` + +\` three spaces everywhere \` + +================================================================================ +`; + +exports[`inline-code-multiple-spaces.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\` three spaces everywhere \` + +\` three spaces + everywhere \` + +\` three spaces + everywhere \` + +=====================================output===================================== +\` three spaces everywhere \` + +\` three spaces + everywhere \` + +\` three spaces + everywhere \` + +================================================================================ +`; + +exports[`inline-code-newline.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \`tempor +incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, \`quis +nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo \`consequat. +Duis\` aute irure dolor in reprehenderit in voluptate velit esse cillum dolore \`eu +fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. + +=====================================output===================================== +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +\`tempor incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, +\`quis nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo +\`consequat. Duis\` aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore \`eu fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +================================================================================ +`; + +exports[`inline-code-newline.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \`tempor +incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, \`quis +nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo \`consequat. +Duis\` aute irure dolor in reprehenderit in voluptate velit esse cillum dolore \`eu +fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. + +=====================================output===================================== +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \`tempor +incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, \`quis +nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo \`consequat. +Duis\` aute irure dolor in reprehenderit in voluptate velit esse cillum dolore \`eu +fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`this is a long long long long long long long long long long long long long long long inline code\` + +=====================================output===================================== +\`this is a long long long long long long long long long long long long long long long inline code\` + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\`this is a long long long long long long long long long long long long long long long inline code\` + +=====================================output===================================== +\`this is a long long long long long long long long long long long long long long long inline code\` + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`123\` + +=====================================output===================================== +\`123\` + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\`123\` + +=====================================output===================================== +\`123\` + +================================================================================ +`; + +exports[`snippet: #0 - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` + \` +=====================================output===================================== +\` \` + +================================================================================ +`; + +exports[`snippet: #0 - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\` + \` +=====================================output===================================== +\` + \` + +================================================================================ +`; + +exports[`snippet: #1 - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` +a \` +=====================================output===================================== +\` a \` + +================================================================================ +`; + +exports[`snippet: #1 - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +\` +a \` +=====================================output===================================== +\` +a \` + +================================================================================ +`; diff --git a/tests/format/markdown/inlineCode/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/inlineCode/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4e90af6e5aed..000000000000 --- a/tests/format/markdown/inlineCode/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`backtick.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\` \`123\` \`\` - -\`\`12\`34\`\` - -\`\` \`12\`\` - -\`\`34\` \`\` - -\`\` \`\`\`123\`\`\` \`\` - -\`\`\` 3 \`\`22\`\` \`1\` \`\`\` - -\`\` 2 \`\`\`123\`\`\` \`1\` \`\` - -=====================================output===================================== -\`\` \`123\` \`\` - -\`\` 12\`34 \`\` - -\`\` \`12\`\` - -\`\` 34\` \`\` - -\` \`\`\`123\`\`\` \` - -\`\`\` 3 \`\`22\`\` \`1\` \`\`\` - -\`\` 2 \`\`\`123\`\`\` \`1\` \`\` - -================================================================================ -`; - -exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`const x = "中文123"\` - -=====================================output===================================== -\`const x = "中文123"\` - -================================================================================ -`; - -exports[`escape.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`1*2*3\` - -=====================================output===================================== -\`1*2*3\` - -================================================================================ -`; - -exports[`long.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`this is a long long long long long long long long long long long long long long long inline code\` - -=====================================output===================================== -\`this is a long long long long long long long long long long long long long long long inline code\` - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`123\` - -=====================================output===================================== -\`123\` - -================================================================================ -`; diff --git a/tests/format/markdown/inlineCode/backtick.md b/tests/format/markdown/inlineCode/backtick.md index 7af55fca06cf..df3942a0b0d7 100644 --- a/tests/format/markdown/inlineCode/backtick.md +++ b/tests/format/markdown/inlineCode/backtick.md @@ -11,3 +11,5 @@ ``` 3 ``22`` `1` ``` `` 2 ```123``` `1` `` + +`` CODE` `` diff --git a/tests/format/markdown/inlineCode/format.test.js b/tests/format/markdown/inlineCode/format.test.js new file mode 100644 index 000000000000..a803cfd51701 --- /dev/null +++ b/tests/format/markdown/inlineCode/format.test.js @@ -0,0 +1,7 @@ +const fixtures = { + importMeta: import.meta, + snippets: ["` \n `", "` \na `"], +}; + +runFormatTest(fixtures, ["markdown"], { proseWrap: "preserve" }); +runFormatTest(fixtures, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/inlineCode/inline-code-multiple-spaces.md b/tests/format/markdown/inlineCode/inline-code-multiple-spaces.md new file mode 100644 index 000000000000..841616b9eceb --- /dev/null +++ b/tests/format/markdown/inlineCode/inline-code-multiple-spaces.md @@ -0,0 +1,7 @@ +` three spaces everywhere ` + +` three spaces + everywhere ` + +` three spaces + everywhere ` diff --git a/tests/format/markdown/prose-wrap-preserve/inline-code-newline.md b/tests/format/markdown/inlineCode/inline-code-newline.md similarity index 100% rename from tests/format/markdown/prose-wrap-preserve/inline-code-newline.md rename to tests/format/markdown/inlineCode/inline-code-newline.md diff --git a/tests/format/markdown/inlineCode/jsfmt.spec.js b/tests/format/markdown/inlineCode/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/inlineCode/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/jsx-semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/jsx-semi/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/jsx-semi/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/jsx-semi/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/jsx-semi/format.test.js b/tests/format/markdown/jsx-semi/format.test.js new file mode 100644 index 000000000000..7c9f4ee9ceff --- /dev/null +++ b/tests/format/markdown/jsx-semi/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["markdown"], { semi: true, proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { semi: false, proseWrap: "always" }); diff --git a/tests/format/markdown/jsx-semi/jsfmt.spec.js b/tests/format/markdown/jsx-semi/jsfmt.spec.js deleted file mode 100644 index d3fad07052d2..000000000000 --- a/tests/format/markdown/jsx-semi/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"], { semi: true, proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { semi: false, proseWrap: "always" }); diff --git a/tests/format/markdown/link/__snapshots__/format.test.js.snap b/tests/format/markdown/link/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d9f00f4cb688 --- /dev/null +++ b/tests/format/markdown/link/__snapshots__/format.test.js.snap @@ -0,0 +1,376 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`autolink.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +<https://www.example.com> + +<hello@example.com> + +<mailto:hello@example.com> + +=====================================output===================================== +<https://www.example.com> + +<hello@example.com> + +<mailto:hello@example.com> + +================================================================================ +`; + +exports[`autolink.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<https://www.example.com> + +<hello@example.com> + +<mailto:hello@example.com> + +=====================================output===================================== +<https://www.example.com> + +<hello@example.com> + +<mailto:hello@example.com> + +================================================================================ +`; + +exports[`encodedLink.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[link](https://www.google.fr/()foo->bar) +[link](https://www.google.fr/foo->bar) +[link](https://www.google.fr/foo-%3Ebar) +[link](https://www.google.fr/foo-<bar) +[link](https://www.google.fr/foo-%3Cbar) +![link](https://www.google.fr/()foo->bar) +![link](https://www.google.fr/foo->bar) +![link](https://www.google.fr/foo-%3Ebar) +![link](https://www.google.fr/foo-<bar) +![link](https://www.google.fr/foo-%3Cbar) +[link]: https://www.google.fr/()foo->bar +[link]: https://www.google.fr/foo->bar +[link]: https://www.google.fr/foo-%3Ebar +[link]: https://www.google.fr/foo-<bar +[link]: https://www.google.fr/foo-%3Cbar +=====================================output===================================== +[link](<https://www.google.fr/()foo-%3Ebar>) +[link](https://www.google.fr/foo->bar) [link](https://www.google.fr/foo-%3Ebar) +[link](https://www.google.fr/foo-<bar) [link](https://www.google.fr/foo-%3Cbar) +![link](<https://www.google.fr/()foo-%3Ebar>) +![link](https://www.google.fr/foo->bar) +![link](https://www.google.fr/foo-%3Ebar) +![link](https://www.google.fr/foo-<bar) +![link](https://www.google.fr/foo-%3Cbar) [link]: +https://www.google.fr/()foo->bar [link]: https://www.google.fr/foo->bar [link]: +https://www.google.fr/foo-%3Ebar [link]: https://www.google.fr/foo-<bar [link]: +https://www.google.fr/foo-%3Cbar + +================================================================================ +`; + +exports[`encodedLink.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](https://www.google.fr/()foo->bar) +[link](https://www.google.fr/foo->bar) +[link](https://www.google.fr/foo-%3Ebar) +[link](https://www.google.fr/foo-<bar) +[link](https://www.google.fr/foo-%3Cbar) +![link](https://www.google.fr/()foo->bar) +![link](https://www.google.fr/foo->bar) +![link](https://www.google.fr/foo-%3Ebar) +![link](https://www.google.fr/foo-<bar) +![link](https://www.google.fr/foo-%3Cbar) +[link]: https://www.google.fr/()foo->bar +[link]: https://www.google.fr/foo->bar +[link]: https://www.google.fr/foo-%3Ebar +[link]: https://www.google.fr/foo-<bar +[link]: https://www.google.fr/foo-%3Cbar +=====================================output===================================== +[link](<https://www.google.fr/()foo-%3Ebar>) +[link](https://www.google.fr/foo->bar) [link](https://www.google.fr/foo-%3Ebar) +[link](https://www.google.fr/foo-<bar) [link](https://www.google.fr/foo-%3Cbar) +![link](<https://www.google.fr/()foo-%3Ebar>) +![link](https://www.google.fr/foo->bar) +![link](https://www.google.fr/foo-%3Ebar) +![link](https://www.google.fr/foo-<bar) +![link](https://www.google.fr/foo-%3Cbar) [link]: +https://www.google.fr/()foo->bar [link]: https://www.google.fr/foo->bar [link]: +https://www.google.fr/foo-%3Ebar [link]: https://www.google.fr/foo-<bar [link]: +https://www.google.fr/foo-%3Cbar + +================================================================================ +`; + +exports[`entity.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[Test](http://localhost:8080/test?language=DE&currency=EUR) + +=====================================output===================================== +[Test](http://localhost:8080/test?language=DE&currency=EUR) + +================================================================================ +`; + +exports[`entity.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Test](http://localhost:8080/test?language=DE&currency=EUR) + +=====================================output===================================== +[Test](http://localhost:8080/test?language=DE&currency=EUR) + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) + +=====================================output===================================== +[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) + +================================================================================ +`; + +exports[`long.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) + +=====================================output===================================== +[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[hello](#world) + +=====================================output===================================== +[hello](#world) + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[hello](#world) + +=====================================output===================================== +[hello](#world) + +================================================================================ +`; + +exports[`title.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[hello](#world "title") +[hello](#world 'title') +[hello](#world (title)) + +[a](https://example.com "\\"") +[a](https://example.com '\\"') +[a](https://example.com (\\")) + +[a](https://example.com "\\'") +[a](https://example.com '\\'') +[a](https://example.com (\\')) + +[a](https://example.com "\\'") +[a](https://example.com '\\)') +[a](https://example.com (\\))) + +[a](https://example.com "\\\\\\"") +[a](https://example.com '\\\\\\'') +[a](https://example.com (\\\\\\))) + +[a](https://example.com "\\\\'") +[a](https://example.com '\\\\"') +[a](https://example.com (\\\\")) + +<!-- magical incantations --> + +[a](https://example.com "\\"')") +[a](https://example.com '"\\')') +[a](https://example.com ("'\\))) + +=====================================output===================================== +[hello](#world 'title') [hello](#world 'title') [hello](#world 'title') + +[a](https://example.com '"') [a](https://example.com '"') +[a](https://example.com '"') + +[a](https://example.com "'") [a](https://example.com "'") +[a](https://example.com "'") + +[a](https://example.com "'") [a](https://example.com ')') +[a](https://example.com ')') + +[a](https://example.com '"') [a](https://example.com "'") +[a](https://example.com ')') + +[a](https://example.com "'") [a](https://example.com '"') +[a](https://example.com '"') + +<!-- magical incantations --> + +[a](https://example.com '"\\')') [a](https://example.com '"\\')') +[a](https://example.com '"\\')') + +================================================================================ +`; + +exports[`title.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[hello](#world "title") +[hello](#world 'title') +[hello](#world (title)) + +[a](https://example.com "\\"") +[a](https://example.com '\\"') +[a](https://example.com (\\")) + +[a](https://example.com "\\'") +[a](https://example.com '\\'') +[a](https://example.com (\\')) + +[a](https://example.com "\\'") +[a](https://example.com '\\)') +[a](https://example.com (\\))) + +[a](https://example.com "\\\\\\"") +[a](https://example.com '\\\\\\'') +[a](https://example.com (\\\\\\))) + +[a](https://example.com "\\\\'") +[a](https://example.com '\\\\"') +[a](https://example.com (\\\\")) + +<!-- magical incantations --> + +[a](https://example.com "\\"')") +[a](https://example.com '"\\')') +[a](https://example.com ("'\\))) + +=====================================output===================================== +[hello](#world "title") [hello](#world "title") [hello](#world "title") + +[a](https://example.com '"') [a](https://example.com '"') +[a](https://example.com '"') + +[a](https://example.com "'") [a](https://example.com "'") +[a](https://example.com "'") + +[a](https://example.com "'") [a](https://example.com ")") +[a](https://example.com ")") + +[a](https://example.com '"') [a](https://example.com "'") +[a](https://example.com ")") + +[a](https://example.com "'") [a](https://example.com '"') +[a](https://example.com '"') + +<!-- magical incantations --> + +[a](https://example.com "\\"')") [a](https://example.com "\\"')") +[a](https://example.com "\\"')") + +================================================================================ +`; + +exports[`url.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +https://www.example.com/ + +=====================================output===================================== +https://www.example.com/ + +================================================================================ +`; + +exports[`url.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +https://www.example.com/ + +=====================================output===================================== +https://www.example.com/ + +================================================================================ +`; diff --git a/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0b6f604e2362..000000000000 --- a/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`autolink.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -<https://www.example.com> - -<hello@example.com> - -<mailto:hello@example.com> - -=====================================output===================================== -<https://www.example.com> - -<hello@example.com> - -<mailto:hello@example.com> - -================================================================================ -`; - -exports[`autolink.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<https://www.example.com> - -<hello@example.com> - -<mailto:hello@example.com> - -=====================================output===================================== -<https://www.example.com> - -<hello@example.com> - -<mailto:hello@example.com> - -================================================================================ -`; - -exports[`entity.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -[Test](http://localhost:8080/test?language=DE&currency=EUR) - -=====================================output===================================== -[Test](http://localhost:8080/test?language=DE&currency=EUR) - -================================================================================ -`; - -exports[`entity.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Test](http://localhost:8080/test?language=DE&currency=EUR) - -=====================================output===================================== -[Test](http://localhost:8080/test?language=DE&currency=EUR) - -================================================================================ -`; - -exports[`long.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) - -=====================================output===================================== -[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) - -================================================================================ -`; - -exports[`long.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) - -=====================================output===================================== -[podium context](https://github.schibsted.io/finn/podium/tree/master/packages/podium-context) - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -[hello](#world) - -=====================================output===================================== -[hello](#world) - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[hello](#world) - -=====================================output===================================== -[hello](#world) - -================================================================================ -`; - -exports[`title.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -[hello](#world "title") -[hello](#world 'title') -[hello](#world (title)) - -[a](https://example.com "\\"") -[a](https://example.com '\\"') -[a](https://example.com (\\")) - -[a](https://example.com "\\'") -[a](https://example.com '\\'') -[a](https://example.com (\\')) - -[a](https://example.com "\\'") -[a](https://example.com '\\)') -[a](https://example.com (\\))) - -[a](https://example.com "\\\\\\"") -[a](https://example.com '\\\\\\'') -[a](https://example.com (\\\\\\))) - -[a](https://example.com "\\\\'") -[a](https://example.com '\\\\"') -[a](https://example.com (\\\\")) - -<!-- magical incantations --> - -[a](https://example.com "\\"')") -[a](https://example.com '"\\')') -[a](https://example.com ("'\\))) - -=====================================output===================================== -[hello](#world 'title') [hello](#world 'title') [hello](#world 'title') - -[a](https://example.com '"') [a](https://example.com '"') -[a](https://example.com '"') - -[a](https://example.com "'") [a](https://example.com "'") -[a](https://example.com "'") - -[a](https://example.com "'") [a](https://example.com ')') -[a](https://example.com ')') - -[a](https://example.com '"') [a](https://example.com "'") -[a](https://example.com ')') - -[a](https://example.com "'") [a](https://example.com '"') -[a](https://example.com '"') - -<!-- magical incantations --> - -[a](https://example.com '"\\')') [a](https://example.com '"\\')') -[a](https://example.com '"\\')') - -================================================================================ -`; - -exports[`title.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[hello](#world "title") -[hello](#world 'title') -[hello](#world (title)) - -[a](https://example.com "\\"") -[a](https://example.com '\\"') -[a](https://example.com (\\")) - -[a](https://example.com "\\'") -[a](https://example.com '\\'') -[a](https://example.com (\\')) - -[a](https://example.com "\\'") -[a](https://example.com '\\)') -[a](https://example.com (\\))) - -[a](https://example.com "\\\\\\"") -[a](https://example.com '\\\\\\'') -[a](https://example.com (\\\\\\))) - -[a](https://example.com "\\\\'") -[a](https://example.com '\\\\"') -[a](https://example.com (\\\\")) - -<!-- magical incantations --> - -[a](https://example.com "\\"')") -[a](https://example.com '"\\')') -[a](https://example.com ("'\\))) - -=====================================output===================================== -[hello](#world "title") [hello](#world "title") [hello](#world "title") - -[a](https://example.com '"') [a](https://example.com '"') -[a](https://example.com '"') - -[a](https://example.com "'") [a](https://example.com "'") -[a](https://example.com "'") - -[a](https://example.com "'") [a](https://example.com ")") -[a](https://example.com ")") - -[a](https://example.com '"') [a](https://example.com "'") -[a](https://example.com ")") - -[a](https://example.com "'") [a](https://example.com '"') -[a](https://example.com '"') - -<!-- magical incantations --> - -[a](https://example.com "\\"')") [a](https://example.com "\\"')") -[a](https://example.com "\\"')") - -================================================================================ -`; - -exports[`url.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -https://www.example.com/ - -=====================================output===================================== -https://www.example.com/ - -================================================================================ -`; - -exports[`url.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -https://www.example.com/ - -=====================================output===================================== -https://www.example.com/ - -================================================================================ -`; diff --git a/tests/format/markdown/link/encodedLink.md b/tests/format/markdown/link/encodedLink.md new file mode 100644 index 000000000000..151023cad541 --- /dev/null +++ b/tests/format/markdown/link/encodedLink.md @@ -0,0 +1,15 @@ +[link](https://www.google.fr/()foo->bar) +[link](https://www.google.fr/foo->bar) +[link](https://www.google.fr/foo-%3Ebar) +[link](https://www.google.fr/foo-<bar) +[link](https://www.google.fr/foo-%3Cbar) +![link](https://www.google.fr/()foo->bar) +![link](https://www.google.fr/foo->bar) +![link](https://www.google.fr/foo-%3Ebar) +![link](https://www.google.fr/foo-<bar) +![link](https://www.google.fr/foo-%3Cbar) +[link]: https://www.google.fr/()foo->bar +[link]: https://www.google.fr/foo->bar +[link]: https://www.google.fr/foo-%3Ebar +[link]: https://www.google.fr/foo-<bar +[link]: https://www.google.fr/foo-%3Cbar \ No newline at end of file diff --git a/tests/format/markdown/link/format.test.js b/tests/format/markdown/link/format.test.js new file mode 100644 index 000000000000..fa6013f9d3fd --- /dev/null +++ b/tests/format/markdown/link/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { + proseWrap: "always", + singleQuote: true, +}); diff --git a/tests/format/markdown/link/jsfmt.spec.js b/tests/format/markdown/link/jsfmt.spec.js deleted file mode 100644 index f78d08241b51..000000000000 --- a/tests/format/markdown/link/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "always", singleQuote: true }); diff --git a/tests/format/markdown/linkReference/__snapshots__/format.test.js.snap b/tests/format/markdown/linkReference/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bb0820aed923 --- /dev/null +++ b/tests/format/markdown/linkReference/__snapshots__/format.test.js.snap @@ -0,0 +1,383 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +=====================================output===================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +================================================================================ +`; + +exports[`cjk.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +=====================================output===================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +================================================================================ +`; + +exports[`collapsed.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[hello][] + +=====================================output===================================== +[hello][] + +================================================================================ +`; + +exports[`collapsed.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[hello][] + +=====================================output===================================== +[hello][] + +================================================================================ +`; + +exports[`definition.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[just-url]: https://example.com +[url-with-short-title]: https://example.com "title" +[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." +[empty-title]: https://example.com "" + +[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx +[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" +[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "" + +=====================================output===================================== +[just-url]: https://example.com +[url-with-short-title]: https://example.com "title" +[url-with-long-title]: + https://example.com + "a long, long title. It's really really long. Here have words." +[empty-title]: https://example.com +[long]: + https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx +[long-with-title]: + https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx + "look a title!" +[long-with-empty-title]: + https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx + +================================================================================ +`; + +exports[`definition.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[just-url]: https://example.com +[url-with-short-title]: https://example.com "title" +[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." +[empty-title]: https://example.com "" + +[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx +[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" +[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "" + +=====================================output===================================== +[just-url]: https://example.com +[url-with-short-title]: https://example.com "title" +[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." +[empty-title]: https://example.com +[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx +[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" +[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx + +================================================================================ +`; + +exports[`full.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[hello][world] + +=====================================output===================================== +[hello][world] + +================================================================================ +`; + +exports[`full.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[hello][world] + +=====================================output===================================== +[hello][world] + +================================================================================ +`; + +exports[`shortcut.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[hello] + +=====================================output===================================== +[hello] + +================================================================================ +`; + +exports[`shortcut.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[hello] + +=====================================output===================================== +[hello] + +================================================================================ +`; + +exports[`title.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[ref]: https://example.com (bar) +[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) + +[a]: https://example.com "\\"" +[a]: https://example.com '\\"' +[a]: https://example.com (\\") + +[a]: https://example.com "\\'" +[a]: https://example.com '\\'' +[a]: https://example.com (\\') + +[a]: https://example.com "\\'" +[a]: https://example.com '\\)' +[a]: https://example.com (\\)) + +[a]: https://example.com "\\\\\\"" +[a]: https://example.com '\\\\\\'' +[a]: https://example.com (\\\\\\)) + +[a]: https://example.com "\\\\'" +[a]: https://example.com '\\\\"' +[a]: https://example.com (\\\\") + +[a]: https://example.com "\\a\\a" +[a]: https://example.com '\\a\\a' +[a]: https://example.com (\\a\\a) + +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com '\\\\a\\\\a' +[a]: https://example.com (\\\\a\\\\a) + +[a]: https://example.com "\\\\\\a\\\\\\a" +[a]: https://example.com '\\\\\\a\\\\\\a' +[a]: https://example.com (\\\\\\a\\\\\\a) + +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com '\\\\\\\\a\\\\\\\\a' +[a]: https://example.com (\\\\\\\\a\\\\\\\\a) + +=====================================output===================================== +[ref]: https://example.com "bar" +[other-ref]: + https://example.com + (Shakespeare's "Romeo and Juliet" is a famous play) + +[a]: https://example.com "\\"" [a]: https://example.com '\\"' [a]: +https://example.com (\\") + +[a]: https://example.com "'" + +[a]: https://example.com '\\'' [a]: https://example.com (\\') + +[a]: https://example.com "'" +[a]: https://example.com ")" + +[a]: https://example.com (\\)) + +[a]: https://example.com "\\\\\\"" [a]: https://example.com '\\\\\\'' [a]: +https://example.com (\\\\\\)) + +[a]: https://example.com "'" +[a]: https://example.com '"' +[a]: https://example.com '"' +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" + +================================================================================ +`; + +exports[`title.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +[ref]: https://example.com (bar) +[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) + +[a]: https://example.com "\\"" +[a]: https://example.com '\\"' +[a]: https://example.com (\\") + +[a]: https://example.com "\\'" +[a]: https://example.com '\\'' +[a]: https://example.com (\\') + +[a]: https://example.com "\\'" +[a]: https://example.com '\\)' +[a]: https://example.com (\\)) + +[a]: https://example.com "\\\\\\"" +[a]: https://example.com '\\\\\\'' +[a]: https://example.com (\\\\\\)) + +[a]: https://example.com "\\\\'" +[a]: https://example.com '\\\\"' +[a]: https://example.com (\\\\") + +[a]: https://example.com "\\a\\a" +[a]: https://example.com '\\a\\a' +[a]: https://example.com (\\a\\a) + +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com '\\\\a\\\\a' +[a]: https://example.com (\\\\a\\\\a) + +[a]: https://example.com "\\\\\\a\\\\\\a" +[a]: https://example.com '\\\\\\a\\\\\\a' +[a]: https://example.com (\\\\\\a\\\\\\a) + +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com '\\\\\\\\a\\\\\\\\a' +[a]: https://example.com (\\\\\\\\a\\\\\\\\a) + +=====================================output===================================== +[ref]: https://example.com "bar" +[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) + +[a]: https://example.com "\\"" [a]: https://example.com '\\"' [a]: https://example.com (\\") + +[a]: https://example.com "'" + +[a]: https://example.com '\\'' [a]: https://example.com (\\') + +[a]: https://example.com "'" +[a]: https://example.com ")" + +[a]: https://example.com (\\)) + +[a]: https://example.com "\\\\\\"" [a]: https://example.com '\\\\\\'' [a]: https://example.com (\\\\\\)) + +[a]: https://example.com "'" +[a]: https://example.com '"' +[a]: https://example.com '"' +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" +[a]: https://example.com "\\\\\\\\a\\\\\\\\a" + +================================================================================ +`; + +exports[`wrap.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). + +=====================================output===================================== +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To +run them, install VHS from main (the theme and screenshot commands are not yet +released). + +================================================================================ +`; + +exports[`wrap.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). + +=====================================output===================================== +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). + +================================================================================ +`; diff --git a/tests/format/markdown/linkReference/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/linkReference/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b1f0178b8087..000000000000 --- a/tests/format/markdown/linkReference/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,297 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -=====================================output===================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -================================================================================ -`; - -exports[`cjk.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -=====================================output===================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -================================================================================ -`; - -exports[`collapsed.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[hello][] - -=====================================output===================================== -[hello][] - -================================================================================ -`; - -exports[`collapsed.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[hello][] - -=====================================output===================================== -[hello][] - -================================================================================ -`; - -exports[`definition.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[just-url]: https://example.com -[url-with-short-title]: https://example.com "title" -[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." -[empty-title]: https://example.com "" - -[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx -[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" -[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "" - -=====================================output===================================== -[just-url]: https://example.com -[url-with-short-title]: https://example.com "title" -[url-with-long-title]: - https://example.com - "a long, long title. It's really really long. Here have words." -[empty-title]: https://example.com -[long]: - https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx -[long-with-title]: - https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx - "look a title!" -[long-with-empty-title]: - https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx - -================================================================================ -`; - -exports[`definition.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[just-url]: https://example.com -[url-with-short-title]: https://example.com "title" -[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." -[empty-title]: https://example.com "" - -[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx -[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" -[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "" - -=====================================output===================================== -[just-url]: https://example.com -[url-with-short-title]: https://example.com "title" -[url-with-long-title]: https://example.com "a long, long title. It's really really long. Here have words." -[empty-title]: https://example.com -[long]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx -[long-with-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx "look a title!" -[long-with-empty-title]: https://example.com/a-long-url/another-segment/yet-another-segment/a-really-long-file-name.php.aspx - -================================================================================ -`; - -exports[`full.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[hello][world] - -=====================================output===================================== -[hello][world] - -================================================================================ -`; - -exports[`full.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[hello][world] - -=====================================output===================================== -[hello][world] - -================================================================================ -`; - -exports[`shortcut.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[hello] - -=====================================output===================================== -[hello] - -================================================================================ -`; - -exports[`shortcut.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[hello] - -=====================================output===================================== -[hello] - -================================================================================ -`; - -exports[`title.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[ref]: https://example.com (bar) -[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) - -[a]: https://example.com "\\"" -[a]: https://example.com '\\"' -[a]: https://example.com (\\") - -[a]: https://example.com "\\'" -[a]: https://example.com '\\'' -[a]: https://example.com (\\') - -[a]: https://example.com "\\'" -[a]: https://example.com '\\)' -[a]: https://example.com (\\)) - -[a]: https://example.com "\\\\\\"" -[a]: https://example.com '\\\\\\'' -[a] https://example.com (\\\\\\)) - -[a]: https://example.com "\\\\'" -[a]: https://example.com '\\\\"' -[a]: https://example.com (\\\\") - - -=====================================output===================================== -[ref]: https://example.com "bar" -[other-ref]: - https://example.com - (Shakespeare's "Romeo and Juliet" is a famous play) - -[a]: https://example.com "\\"" [a]: https://example.com '\\"' [a]: -https://example.com (\\") - -[a]: https://example.com "'" - -[a]: https://example.com '\\'' [a]: https://example.com (\\') - -[a]: https://example.com "'" -[a]: https://example.com ")" - -[a]: https://example.com (\\)) - -[a]: https://example.com "\\\\\\"" [a]: https://example.com '\\\\\\'' [a] -https://example.com (\\\\\\)) - -[a]: https://example.com "'" -[a]: https://example.com '"' -[a]: https://example.com '"' - -================================================================================ -`; - -exports[`title.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -[ref]: https://example.com (bar) -[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) - -[a]: https://example.com "\\"" -[a]: https://example.com '\\"' -[a]: https://example.com (\\") - -[a]: https://example.com "\\'" -[a]: https://example.com '\\'' -[a]: https://example.com (\\') - -[a]: https://example.com "\\'" -[a]: https://example.com '\\)' -[a]: https://example.com (\\)) - -[a]: https://example.com "\\\\\\"" -[a]: https://example.com '\\\\\\'' -[a] https://example.com (\\\\\\)) - -[a]: https://example.com "\\\\'" -[a]: https://example.com '\\\\"' -[a]: https://example.com (\\\\") - - -=====================================output===================================== -[ref]: https://example.com "bar" -[other-ref]: https://example.com (Shakespeare's "Romeo and Juliet" is a famous play) - -[a]: https://example.com "\\"" [a]: https://example.com '\\"' [a]: https://example.com (\\") - -[a]: https://example.com "'" - -[a]: https://example.com '\\'' [a]: https://example.com (\\') - -[a]: https://example.com "'" -[a]: https://example.com ")" - -[a]: https://example.com (\\)) - -[a]: https://example.com "\\\\\\"" [a]: https://example.com '\\\\\\'' [a] https://example.com (\\\\\\)) - -[a]: https://example.com "'" -[a]: https://example.com '"' -[a]: https://example.com '"' - -================================================================================ -`; diff --git a/tests/format/markdown/linkReference/case-and-space/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/linkReference/case-and-space/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/linkReference/case-and-space/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/linkReference/case-and-space/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/linkReference/case-and-space/format.test.js b/tests/format/markdown/linkReference/case-and-space/format.test.js new file mode 100644 index 000000000000..7df6c9eaad2d --- /dev/null +++ b/tests/format/markdown/linkReference/case-and-space/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"]); diff --git a/tests/format/markdown/linkReference/case-and-space/jsfmt.spec.js b/tests/format/markdown/linkReference/case-and-space/jsfmt.spec.js deleted file mode 100644 index ff3b58b03c88..000000000000 --- a/tests/format/markdown/linkReference/case-and-space/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"]); diff --git a/tests/format/markdown/linkReference/format.test.js b/tests/format/markdown/linkReference/format.test.js new file mode 100644 index 000000000000..537080b142fe --- /dev/null +++ b/tests/format/markdown/linkReference/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); diff --git a/tests/format/markdown/linkReference/jsfmt.spec.js b/tests/format/markdown/linkReference/jsfmt.spec.js deleted file mode 100644 index d693a26d1d84..000000000000 --- a/tests/format/markdown/linkReference/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); diff --git a/tests/format/markdown/linkReference/title.md b/tests/format/markdown/linkReference/title.md index b8c739849fa4..00267b20e4f2 100644 --- a/tests/format/markdown/linkReference/title.md +++ b/tests/format/markdown/linkReference/title.md @@ -15,9 +15,24 @@ [a]: https://example.com "\\\"" [a]: https://example.com '\\\'' -[a] https://example.com (\\\)) +[a]: https://example.com (\\\)) [a]: https://example.com "\\'" [a]: https://example.com '\\"' [a]: https://example.com (\\") +[a]: https://example.com "\a\a" +[a]: https://example.com '\a\a' +[a]: https://example.com (\a\a) + +[a]: https://example.com "\\a\\a" +[a]: https://example.com '\\a\\a' +[a]: https://example.com (\\a\\a) + +[a]: https://example.com "\\\a\\\a" +[a]: https://example.com '\\\a\\\a' +[a]: https://example.com (\\\a\\\a) + +[a]: https://example.com "\\\\a\\\\a" +[a]: https://example.com '\\\\a\\\\a' +[a]: https://example.com (\\\\a\\\\a) diff --git a/tests/format/markdown/linkReference/wrap.md b/tests/format/markdown/linkReference/wrap.md new file mode 100644 index 000000000000..ed6c3e7891d7 --- /dev/null +++ b/tests/format/markdown/linkReference/wrap.md @@ -0,0 +1 @@ +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). diff --git a/tests/format/markdown/liquid/__snapshots__/format.test.js.snap b/tests/format/markdown/liquid/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b14887680ec4 --- /dev/null +++ b/tests/format/markdown/liquid/__snapshots__/format.test.js.snap @@ -0,0 +1,241 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`example-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +{% include_relative _installations/tarball.md %} + +{% cloudinary nice_prefix_-_for_the_filename.jpg %} + +# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> + +{% css userscripts %} +{% js userscripts %} + +{{ foo +multiline +where does it end }} + +=====================================output===================================== +{% include_relative _installations/tarball.md %} + +{% cloudinary nice_prefix_-_for_the_filename.jpg %} + +# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> + +{% css userscripts %} {% js userscripts %} + +{{ foo +multiline +where does it end }} + +================================================================================ +`; + +exports[`example-1.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +{% include_relative _installations/tarball.md %} + +{% cloudinary nice_prefix_-_for_the_filename.jpg %} + +# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> + +{% css userscripts %} +{% js userscripts %} + +{{ foo +multiline +where does it end }} + +=====================================output===================================== +{% include_relative _installations/tarball.md %} + +{% cloudinary nice_prefix_-_for_the_filename.jpg %} + +# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> + +{% css userscripts %} +{% js userscripts %} + +{{ foo +multiline +where does it end }} + +================================================================================ +`; + +exports[`unbalanced-mismatched-braces.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +Braces {% doesn't match so these words should not be considered as *liquid node* }} + +=====================================output===================================== +Braces {% doesn't match so these words should not be considered as _liquid node_ +}} + +================================================================================ +`; + +exports[`unbalanced-mismatched-braces.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== + +Braces {% doesn't match so these words should not be considered as *liquid node* }} + +=====================================output===================================== +Braces {% doesn't match so these words should not be considered as _liquid node_ }} + +================================================================================ +`; + +exports[`unbalanced-object-close-only.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +Following brace doesn't open so these words should not be considered as *liquid node* }} + +=====================================output===================================== +Following brace doesn't open so these words should not be considered as _liquid +node_ }} + +================================================================================ +`; + +exports[`unbalanced-object-close-only.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +Following brace doesn't open so these words should not be considered as *liquid node* }} + +=====================================output===================================== +Following brace doesn't open so these words should not be considered as _liquid node_ }} + +================================================================================ +`; + +exports[`unbalanced-object-open-only.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +This brace {{ doesn't close so these words should not be considered as *liquid node* + +=====================================output===================================== +This brace {{ doesn't close so these words should not be considered as _liquid +node_ + +================================================================================ +`; + +exports[`unbalanced-object-open-only.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +This brace {{ doesn't close so these words should not be considered as *liquid node* + +=====================================output===================================== +This brace {{ doesn't close so these words should not be considered as _liquid node_ + +================================================================================ +`; + +exports[`unbalanced-template-close-only.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +Following brace doesn't open so these words should not be considered as *liquid node* %} + +=====================================output===================================== +Following brace doesn't open so these words should not be considered as _liquid +node_ %} + +================================================================================ +`; + +exports[`unbalanced-template-close-only.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +Following brace doesn't open so these words should not be considered as *liquid node* %} + +=====================================output===================================== +Following brace doesn't open so these words should not be considered as _liquid node_ %} + +================================================================================ +`; + +exports[`unbalanced-template-open-only.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +This brace {% doesn't close so these words should not be considered as *liquid node* + +=====================================output===================================== +This brace {% doesn't close so these words should not be considered as _liquid +node_ + +================================================================================ +`; + +exports[`unbalanced-template-open-only.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +This brace {% doesn't close so these words should not be considered as *liquid node* + +=====================================output===================================== +This brace {% doesn't close so these words should not be considered as _liquid node_ + +================================================================================ +`; diff --git a/tests/format/markdown/liquid/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/liquid/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5f0c73fba18e..000000000000 --- a/tests/format/markdown/liquid/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,73 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`example-1.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -{% include_relative _installations/tarball.md %} - -{% cloudinary nice_prefix_-_for_the_filename.jpg %} - -# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> - -{% css userscripts %} -{% js userscripts %} - -{{ foo -multiline -where does it end }} - -=====================================output===================================== -{% include_relative _installations/tarball.md %} - -{% cloudinary nice_prefix_-_for_the_filename.jpg %} - -# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> - -{% css userscripts %} {% js userscripts %} - -{{ foo -multiline -where does it end }} - -================================================================================ -`; - -exports[`example-1.md format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== -{% include_relative _installations/tarball.md %} - -{% cloudinary nice_prefix_-_for_the_filename.jpg %} - -# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> - -{% css userscripts %} -{% js userscripts %} - -{{ foo -multiline -where does it end }} - -=====================================output===================================== -{% include_relative _installations/tarball.md %} - -{% cloudinary nice_prefix_-_for_the_filename.jpg %} - -# Userscripts <span>[{% img github.svg alt:"View on GitHub" title:"View on GitHub" %}](https://github.com/Charcoal-SE/Userscripts) [Build <span>status loading…</span>](//travis-ci.org/Charcoal-SE/userscripts){: .build}</span> - -{% css userscripts %} -{% js userscripts %} - -{{ foo -multiline -where does it end }} - -================================================================================ -`; diff --git a/tests/format/markdown/liquid/format.test.js b/tests/format/markdown/liquid/format.test.js new file mode 100644 index 000000000000..55fbeb39f71e --- /dev/null +++ b/tests/format/markdown/liquid/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["markdown"]); +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/liquid/jsfmt.spec.js b/tests/format/markdown/liquid/jsfmt.spec.js deleted file mode 100644 index 2b81354ae376..000000000000 --- a/tests/format/markdown/liquid/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"]); -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/liquid/unbalanced-mismatched-braces.md b/tests/format/markdown/liquid/unbalanced-mismatched-braces.md new file mode 100644 index 000000000000..ba708f248c1a --- /dev/null +++ b/tests/format/markdown/liquid/unbalanced-mismatched-braces.md @@ -0,0 +1,2 @@ + +Braces {% doesn't match so these words should not be considered as *liquid node* }} diff --git a/tests/format/markdown/liquid/unbalanced-object-close-only.md b/tests/format/markdown/liquid/unbalanced-object-close-only.md new file mode 100644 index 000000000000..ed72b4894889 --- /dev/null +++ b/tests/format/markdown/liquid/unbalanced-object-close-only.md @@ -0,0 +1,3 @@ + + +Following brace doesn't open so these words should not be considered as *liquid node* }} diff --git a/tests/format/markdown/liquid/unbalanced-object-open-only.md b/tests/format/markdown/liquid/unbalanced-object-open-only.md new file mode 100644 index 000000000000..d59a7abae9e8 --- /dev/null +++ b/tests/format/markdown/liquid/unbalanced-object-open-only.md @@ -0,0 +1,3 @@ + + +This brace {{ doesn't close so these words should not be considered as *liquid node* diff --git a/tests/format/markdown/liquid/unbalanced-template-close-only.md b/tests/format/markdown/liquid/unbalanced-template-close-only.md new file mode 100644 index 000000000000..ecf41a5db151 --- /dev/null +++ b/tests/format/markdown/liquid/unbalanced-template-close-only.md @@ -0,0 +1,3 @@ + + +Following brace doesn't open so these words should not be considered as *liquid node* %} diff --git a/tests/format/markdown/liquid/unbalanced-template-open-only.md b/tests/format/markdown/liquid/unbalanced-template-open-only.md new file mode 100644 index 000000000000..f49bcc5e1250 --- /dev/null +++ b/tests/format/markdown/liquid/unbalanced-template-open-only.md @@ -0,0 +1,3 @@ + + +This brace {% doesn't close so these words should not be considered as *liquid node* diff --git a/tests/format/markdown/list/__snapshots__/format.test.js.snap b/tests/format/markdown/list/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..777295a4ef19 --- /dev/null +++ b/tests/format/markdown/list/__snapshots__/format.test.js.snap @@ -0,0 +1,4683 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`align.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +=====================================output===================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +================================================================================ +`; + +exports[`align.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +=====================================output===================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +================================================================================ +`; + +exports[`align.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +=====================================output===================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +================================================================================ +`; + +exports[`align.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +=====================================output===================================== +1. 123 + +--- + +11. 123 + +--- + +111. 123 + +--- + +1111. 123 + +--- + +11111. 123 + +--- + +1. 123 + +--- + +1. 123 +2. 123 + +--- + +11. 123 +1. 123 + +--- + +11. 123 +1. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +1. 123 +2. 123 + 1. 123 + 2. 123 + +--- + +- 123 +- 123 + 1. 123 + 2. 123 + +================================================================================ +`; + +exports[`checkbox.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- [ ] this is a long long long long long long long long long long long long long long paragraph. +- [x] this is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- [ ] this is a long long long long long long long long long long long long long + long paragraph. +- [x] this is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`checkbox.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- [ ] this is a long long long long long long long long long long long long long long paragraph. +- [x] this is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- [ ] this is a long long long long long long long long long long long long long + long paragraph. +- [x] this is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`checkbox.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- [ ] this is a long long long long long long long long long long long long long long paragraph. +- [x] this is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- [ ] this is a long long long long long long long long long long long long long + long paragraph. +- [x] this is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`checkbox.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- [ ] this is a long long long long long long long long long long long long long long paragraph. +- [x] this is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- [ ] this is a long long long long long long long long long long long long long + long paragraph. +- [x] this is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`codeblock.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +1. ol01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +=====================================output===================================== +1. ol01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +================================================================================ +`; + +exports[`codeblock.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +1. ol01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +=====================================output===================================== +1. ol01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +================================================================================ +`; + +exports[`codeblock.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +1. ol01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +=====================================output===================================== +1. ol01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +================================================================================ +`; + +exports[`codeblock.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. ol01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + + const b = 2; + \`\`\` + +=====================================output===================================== +1. ol01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +2. ol02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul01 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +- ul02 + + \`\`\`js + const a = 1; + + const b = 2; + \`\`\` + +================================================================================ +`; + +exports[`combined-lists.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +* hello1 + +* hello2 + + +* hello3 + +* hello4 + + +* hello5 + +* hello6 +=====================================output===================================== +- hello1 + +- hello2 + +- hello3 + +- hello4 + +- hello5 + +- hello6 + +================================================================================ +`; + +exports[`combined-lists.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +* hello1 + +* hello2 + + +* hello3 + +* hello4 + + +* hello5 + +* hello6 +=====================================output===================================== +- hello1 + +- hello2 + +- hello3 + +- hello4 + +- hello5 + +- hello6 + +================================================================================ +`; + +exports[`combined-lists.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +* hello1 + +* hello2 + + +* hello3 + +* hello4 + + +* hello5 + +* hello6 +=====================================output===================================== +- hello1 + +- hello2 + +- hello3 + +- hello4 + +- hello5 + +- hello6 + +================================================================================ +`; + +exports[`combined-lists.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* hello1 + +* hello2 + + +* hello3 + +* hello4 + + +* hello5 + +* hello6 +=====================================output===================================== +- hello1 + +- hello2 + +- hello3 + +- hello4 + +- hello5 + +- hello6 + +================================================================================ +`; + +exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +5. abc +1. def +999. ghi + +=====================================output===================================== +5. abc +1. def +1. ghi + +================================================================================ +`; + +exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +5. abc +1. def +999. ghi + +=====================================output===================================== +5. abc +1. def +1. ghi + +================================================================================ +`; + +exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +5. abc +1. def +999. ghi + +=====================================output===================================== +5. abc +1. def +1. ghi + +================================================================================ +`; + +exports[`git-diff-friendly.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +5. abc +1. def +999. ghi + +=====================================output===================================== +5. abc +1. def +1. ghi + +================================================================================ +`; + +exports[`indent.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +=====================================output===================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +================================================================================ +`; + +exports[`indent.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +=====================================output===================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +================================================================================ +`; + +exports[`indent.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +=====================================output===================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a a + +================================================================================ +`; + +exports[`indent.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + +=====================================output===================================== +- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + +1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a + +12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + + 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b + 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + + b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b + b b b b b b b b b b b b b b b b + + a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a + a a a a a a a a a a a a a a a + +================================================================================ +`; + +exports[`interrupt.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +* Something +### Some heading + +=====================================output===================================== +- Something + +### Some heading + +================================================================================ +`; + +exports[`interrupt.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +* Something +### Some heading + +=====================================output===================================== +- Something + +### Some heading + +================================================================================ +`; + +exports[`interrupt.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +* Something +### Some heading + +=====================================output===================================== +- Something + +### Some heading + +================================================================================ +`; + +exports[`interrupt.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* Something +### Some heading + +=====================================output===================================== +- Something + +### Some heading + +================================================================================ +`; + +exports[`issue-7846.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e +=====================================output===================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e + +================================================================================ +`; + +exports[`issue-7846.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e +=====================================output===================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e + +================================================================================ +`; + +exports[`issue-7846.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e +=====================================output===================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e + +================================================================================ +`; + +exports[`issue-7846.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e +=====================================output===================================== +- a a + b b + c c + d d + e e + +1. a a a + b b b + c c c + d d d + e e e + +================================================================================ +`; + +exports[`issue-8004.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- Level 1 + - Level 1-1 + +- Level 2 + +=====================================output===================================== +- Level 1 + - Level 1-1 + +- Level 2 + +================================================================================ +`; + +exports[`issue-8004.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- Level 1 + - Level 1-1 + +- Level 2 + +=====================================output===================================== +- Level 1 + - Level 1-1 + +- Level 2 + +================================================================================ +`; + +exports[`issue-8004.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- Level 1 + - Level 1-1 + +- Level 2 + +=====================================output===================================== +- Level 1 + - Level 1-1 + +- Level 2 + +================================================================================ +`; + +exports[`issue-8004.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Level 1 + - Level 1-1 + +- Level 2 + +=====================================output===================================== +- Level 1 + - Level 1-1 + +- Level 2 + +================================================================================ +`; + +exports[`issue-17652.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + + 1. Another + 2. List + + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +=====================================output===================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + 1. Another + 2. List + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +================================================================================ +`; + +exports[`issue-17652.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + + 1. Another + 2. List + + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +=====================================output===================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + 1. Another + 2. List + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +================================================================================ +`; + +exports[`issue-17652.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + + 1. Another + 2. List + + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +=====================================output===================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + 1. Another + 2. List + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +================================================================================ +`; + +exports[`issue-17652.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + + 1. Another + 2. List + + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +=====================================output===================================== +1. Some text, and code block below, with newline after code block + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + 1. Another + 2. List + + \`\`\`yaml + --- + foo: bar + \`\`\` + + 1. Another + 2. List + +================================================================================ +`; + +exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- This is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- This is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- This is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- This is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- This is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- This is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`long-paragraph.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- This is a long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +- This is a long long long long long long long long long long long long long + long paragraph. + +================================================================================ +`; + +exports[`loose.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- 123 + + - abc + +- 456 + + - def + +- 789 + + - ghi + +=====================================output===================================== +- 123 + - abc + +- 456 + - def + +- 789 + - ghi + +================================================================================ +`; + +exports[`loose.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- 123 + + - abc + +- 456 + + - def + +- 789 + + - ghi + +=====================================output===================================== +- 123 + - abc + +- 456 + - def + +- 789 + - ghi + +================================================================================ +`; + +exports[`loose.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- 123 + + - abc + +- 456 + + - def + +- 789 + + - ghi + +=====================================output===================================== +- 123 + - abc + +- 456 + - def + +- 789 + - ghi + +================================================================================ +`; + +exports[`loose.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- 123 + + - abc + +- 456 + + - def + +- 789 + + - ghi + +=====================================output===================================== +- 123 + - abc + +- 456 + - def + +- 789 + - ghi + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- 123 + 456 + 789 + +=====================================output===================================== +- 123 456 789 + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- 123 + 456 + 789 + +=====================================output===================================== +- 123 456 789 + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- 123 + 456 + 789 + +=====================================output===================================== +- 123 456 789 + +================================================================================ +`; + +exports[`multiline.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- 123 + 456 + 789 + +=====================================output===================================== +- 123 456 789 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- Level 1 + - Level 2 + - Level 3 + +=====================================output===================================== +- Level 1 + - Level 2 + - Level 3 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- Level 1 + - Level 2 + - Level 3 + +=====================================output===================================== +- Level 1 + - Level 2 + - Level 3 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- Level 1 + - Level 2 + - Level 3 + +=====================================output===================================== +- Level 1 + - Level 2 + - Level 3 + +================================================================================ +`; + +exports[`nested.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Level 1 + - Level 2 + - Level 3 + +=====================================output===================================== +- Level 1 + - Level 2 + - Level 3 + +================================================================================ +`; + +exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +* parent list item parent list item parent list item parent list item parent list item parent list item + + * child list item child list item child list item child list item child list item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +* [x] parent task list item parent task list item parent task list item parent task list item + + * [x] child task list item child task list item child task list item child task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +=====================================output===================================== +- parent list item parent list item parent list item parent list item parent + list item parent list item + - child list item child list item child list item child list item child list + item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +- [x] parent task list item parent task list item parent task list item parent + task list item + - [x] child task list item child task list item child task list item child + task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +================================================================================ +`; + +exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +* parent list item parent list item parent list item parent list item parent list item parent list item + + * child list item child list item child list item child list item child list item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +* [x] parent task list item parent task list item parent task list item parent task list item + + * [x] child task list item child task list item child task list item child task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +=====================================output===================================== +- parent list item parent list item parent list item parent list item parent + list item parent list item + - child list item child list item child list item child list item child list + item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +- [x] parent task list item parent task list item parent task list item parent + task list item + - [x] child task list item child task list item child task list item child + task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +================================================================================ +`; + +exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +* parent list item parent list item parent list item parent list item parent list item parent list item + + * child list item child list item child list item child list item child list item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +* [x] parent task list item parent task list item parent task list item parent task list item + + * [x] child task list item child task list item child task list item child task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +=====================================output===================================== +- parent list item parent list item parent list item parent list item parent + list item parent list item + - child list item child list item child list item child list item child + list item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +- [x] parent task list item parent task list item parent task list item parent + task list item + - [x] child task list item child task list item child task list item child + task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +================================================================================ +`; + +exports[`nested-checkbox.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* parent list item parent list item parent list item parent list item parent list item parent list item + + * child list item child list item child list item child list item child list item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +* [x] parent task list item parent task list item parent task list item parent task list item + + * [x] child task list item child task list item child task list item child task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph + +=====================================output===================================== +- parent list item parent list item parent list item parent list item parent + list item parent list item + - child list item child list item child list item child list item child list + item child list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +- [x] parent task list item parent task list item parent task list item parent + task list item + - [x] child task list item child task list item child task list item child + task list item + + paragraph paragraph paragraph paragraph paragraph paragraph paragraph + paragraph paragraph + +================================================================================ +`; + +exports[`nested-tab.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +# List with 1 tab indentation and \`-\` +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` +* Top level list item 1 +* Top level list item 2 + * Nested List item 1 + * Nested List item 2 + * Sub-Nested List item 1 + * Sub-Nested List item 2 + +=====================================output===================================== +# List with 1 tab indentation and \`-\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 + +================================================================================ +`; + +exports[`nested-tab.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +# List with 1 tab indentation and \`-\` +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` +* Top level list item 1 +* Top level list item 2 + * Nested List item 1 + * Nested List item 2 + * Sub-Nested List item 1 + * Sub-Nested List item 2 + +=====================================output===================================== +# List with 1 tab indentation and \`-\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 + +================================================================================ +`; + +exports[`nested-tab.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +# List with 1 tab indentation and \`-\` +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` +* Top level list item 1 +* Top level list item 2 + * Nested List item 1 + * Nested List item 2 + * Sub-Nested List item 1 + * Sub-Nested List item 2 + +=====================================output===================================== +# List with 1 tab indentation and \`-\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 + +================================================================================ +`; + +exports[`nested-tab.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# List with 1 tab indentation and \`-\` +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` +* Top level list item 1 +* Top level list item 2 + * Nested List item 1 + * Nested List item 2 + * Sub-Nested List item 1 + * Sub-Nested List item 2 + +=====================================output===================================== +# List with 1 tab indentation and \`-\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 + - Sub-Nested List item 1 + - Sub-Nested List item 2 + +# List with 1 tab indentation and \`*\` + +- Top level list item 1 +- Top level list item 2 + - Nested List item 1 + - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 + +================================================================================ +`; + +exports[`ordered.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +1. 123 +1. 456 +1. 789 + +=====================================output===================================== +1. 123 +1. 456 +1. 789 + +================================================================================ +`; + +exports[`ordered.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +1. 123 +1. 456 +1. 789 + +=====================================output===================================== +1. 123 +1. 456 +1. 789 + +================================================================================ +`; + +exports[`ordered.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +1. 123 +1. 456 +1. 789 + +=====================================output===================================== +1. 123 +1. 456 +1. 789 + +================================================================================ +`; + +exports[`ordered.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. 123 +1. 456 +1. 789 + +=====================================output===================================== +1. 123 +1. 456 +1. 789 + +================================================================================ +`; + +exports[`separate.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +=====================================output===================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +================================================================================ +`; + +exports[`separate.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +=====================================output===================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +================================================================================ +`; + +exports[`separate.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +=====================================output===================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +================================================================================ +`; + +exports[`separate.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +=====================================output===================================== +- 123 +- 123 +- 123 + +* 123 +* 123 +* 123 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- 123 +- 456 +- 789 + +=====================================output===================================== +- 123 +- 456 +- 789 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- 123 +- 456 +- 789 + +=====================================output===================================== +- 123 +- 456 +- 789 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- 123 +- 456 +- 789 + +=====================================output===================================== +- 123 +- 456 +- 789 + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- 123 +- 456 +- 789 + +=====================================output===================================== +- 123 +- 456 +- 789 + +================================================================================ +`; + +exports[`snippet: empty list items (issue 4122) - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. +2. +3. +4. +=====================================output===================================== +1. +2. +3. +4. + +================================================================================ +`; + +exports[`snippet: empty list items with spaces (issue 4122) - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. +2. +3. +4. +=====================================output===================================== +1. +2. +3. +4. + +================================================================================ +`; + +exports[`start.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +5. abc +6. def +7. ghi + +--- + +0. abc +0. def +0. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +2. def +2. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +145. def +69. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +2. def + +=====================================output===================================== +5. abc +6. def +7. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +1000. def +1001. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +1000. def + +================================================================================ +`; + +exports[`start.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +5. abc +6. def +7. ghi + +--- + +0. abc +0. def +0. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +2. def +2. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +145. def +69. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +2. def + +=====================================output===================================== +5. abc +6. def +7. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +1000. def +1001. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +1000. def + +================================================================================ +`; + +exports[`start.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +5. abc +6. def +7. ghi + +--- + +0. abc +0. def +0. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +2. def +2. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +145. def +69. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +2. def + +=====================================output===================================== +5. abc +6. def +7. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +1000. def +1001. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +1000. def + +================================================================================ +`; + +exports[`start.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +5. abc +6. def +7. ghi + +--- + +0. abc +0. def +0. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +2. def +2. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +145. def +69. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +2. def + +=====================================output===================================== +5. abc +6. def +7. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +1. abc +1. def +1. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +0. abc +1. def +2. ghi + +--- + +0. abc +1. def +1. ghi + +--- + +1. abc +2. def +3. ghi + +--- + +2. abc +3. def +4. ghi + +--- + +999. abc +1000. def +1001. ghi + +--- + +0. abc + +--- + +1. abc + +--- + +2. abc + +--- + +999. abc + +--- + +0. abc +1. def + +--- + +1. abc +2. def + +--- + +1. abc +1. def + +--- + +2. abc +3. def + +--- + +999. abc +1. def + +--- + +999. abc +1000. def + +================================================================================ +`; + +exports[`tab.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +* Text + + [title](link) + +* Text + + - foo + - foo + - bar + +* Text + + # foo + +* Text + + \`\`\` + foo + \`\`\` + +* Text + + \`foo\` + +=====================================output===================================== +- Text + + [title](link) + +- Text + - foo + - foo + - bar + +- Text + + # foo + +- Text + + \`\`\` + foo + \`\`\` + +- Text + + \`foo\` + +================================================================================ +`; + +exports[`tab.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +* Text + + [title](link) + +* Text + + - foo + - foo + - bar + +* Text + + # foo + +* Text + + \`\`\` + foo + \`\`\` + +* Text + + \`foo\` + +=====================================output===================================== +- Text + + [title](link) + +- Text + - foo + - foo + - bar + +- Text + + # foo + +- Text + + \`\`\` + foo + \`\`\` + +- Text + + \`foo\` + +================================================================================ +`; + +exports[`tab.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +* Text + + [title](link) + +* Text + + - foo + - foo + - bar + +* Text + + # foo + +* Text + + \`\`\` + foo + \`\`\` + +* Text + + \`foo\` + +=====================================output===================================== +- Text + + [title](link) + +- Text + - foo + - foo + - bar + +- Text + + # foo + +- Text + + \`\`\` + foo + \`\`\` + +- Text + + \`foo\` + +================================================================================ +`; + +exports[`tab.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* Text + + [title](link) + +* Text + + - foo + - foo + - bar + +* Text + + # foo + +* Text + + \`\`\` + foo + \`\`\` + +* Text + + \`foo\` + +=====================================output===================================== +- Text + + [title](link) + +- Text + - foo + - foo + - bar + +- Text + + # foo + +- Text + + \`\`\` + foo + \`\`\` + +- Text + + \`foo\` + +================================================================================ +`; + +exports[`unordered.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 0 + | printWidth +=====================================input====================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +=====================================output===================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +================================================================================ +`; + +exports[`unordered.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 4 + | printWidth +=====================================input====================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +=====================================output===================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +================================================================================ +`; + +exports[`unordered.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +tabWidth: 999 + | printWidth +=====================================input====================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +=====================================output===================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +================================================================================ +`; + +exports[`unordered.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +=====================================output===================================== +- first line + - second line indented +- third line + - fourth line + - fifth line + +================================================================================ +`; diff --git a/tests/format/markdown/list/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/list/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6a635af8c4b3..000000000000 --- a/tests/format/markdown/list/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4342 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`align.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -=====================================output===================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -================================================================================ -`; - -exports[`align.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -=====================================output===================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -================================================================================ -`; - -exports[`align.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -=====================================output===================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -================================================================================ -`; - -exports[`align.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -=====================================output===================================== -1. 123 - ---- - -11. 123 - ---- - -111. 123 - ---- - -1111. 123 - ---- - -11111. 123 - ---- - -1. 123 - ---- - -1. 123 -2. 123 - ---- - -11. 123 -1. 123 - ---- - -11. 123 -1. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -1. 123 -2. 123 - 1. 123 - 2. 123 - ---- - -- 123 -- 123 - 1. 123 - 2. 123 - -================================================================================ -`; - -exports[`checkbox.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- [ ] this is a long long long long long long long long long long long long long long paragraph. -- [x] this is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- [ ] this is a long long long long long long long long long long long long long - long paragraph. -- [x] this is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`checkbox.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- [ ] this is a long long long long long long long long long long long long long long paragraph. -- [x] this is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- [ ] this is a long long long long long long long long long long long long - long long paragraph. -- [x] this is a long long long long long long long long long long long long - long long paragraph. - -================================================================================ -`; - -exports[`checkbox.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- [ ] this is a long long long long long long long long long long long long long long paragraph. -- [x] this is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- [ ] this is a long long long long long long long long long long long long long - long paragraph. -- [x] this is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`checkbox.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- [ ] this is a long long long long long long long long long long long long long long paragraph. -- [x] this is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- [ ] this is a long long long long long long long long long long long long long - long paragraph. -- [x] this is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`codeblock.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -1. ol01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -=====================================output===================================== -1. ol01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -================================================================================ -`; - -exports[`codeblock.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -1. ol01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -=====================================output===================================== -1. ol01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -================================================================================ -`; - -exports[`codeblock.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -1. ol01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -=====================================output===================================== -1. ol01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -================================================================================ -`; - -exports[`codeblock.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. ol01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - - const b = 2; - \`\`\` - -=====================================output===================================== -1. ol01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -2. ol02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul01 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -- ul02 - - \`\`\`js - const a = 1; - - const b = 2; - \`\`\` - -================================================================================ -`; - -exports[`combined-lists.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -* hello1 - -* hello2 - - -* hello3 - -* hello4 - - -* hello5 - -* hello6 -=====================================output===================================== -- hello1 - -- hello2 - -- hello3 - -- hello4 - -- hello5 - -- hello6 - -================================================================================ -`; - -exports[`combined-lists.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -* hello1 - -* hello2 - - -* hello3 - -* hello4 - - -* hello5 - -* hello6 -=====================================output===================================== -- hello1 - -- hello2 - -- hello3 - -- hello4 - -- hello5 - -- hello6 - -================================================================================ -`; - -exports[`combined-lists.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -* hello1 - -* hello2 - - -* hello3 - -* hello4 - - -* hello5 - -* hello6 -=====================================output===================================== -- hello1 - -- hello2 - -- hello3 - -- hello4 - -- hello5 - -- hello6 - -================================================================================ -`; - -exports[`combined-lists.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* hello1 - -* hello2 - - -* hello3 - -* hello4 - - -* hello5 - -* hello6 -=====================================output===================================== -- hello1 - -- hello2 - -- hello3 - -- hello4 - -- hello5 - -- hello6 - -================================================================================ -`; - -exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -5. abc -1. def -999. ghi - -=====================================output===================================== -5. abc -1. def -1. ghi - -================================================================================ -`; - -exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -5. abc -1. def -999. ghi - -=====================================output===================================== -5. abc -1. def -1. ghi - -================================================================================ -`; - -exports[`git-diff-friendly.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -5. abc -1. def -999. ghi - -=====================================output===================================== -5. abc -1. def -1. ghi - -================================================================================ -`; - -exports[`git-diff-friendly.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -5. abc -1. def -999. ghi - -=====================================output===================================== -5. abc -1. def -1. ghi - -================================================================================ -`; - -exports[`indent.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -=====================================output===================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -================================================================================ -`; - -exports[`indent.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -=====================================output===================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -================================================================================ -`; - -exports[`indent.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -=====================================output===================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a a - -================================================================================ -`; - -exports[`indent.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - -=====================================output===================================== -- [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - -1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a - -12345678) [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - - [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 1. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b - - 12345678) a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - 12345678. [ ] a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - - b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b - b b b b b b b b b b b b b b b b - - a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a - a a a a a a a a a a a a a a a - -================================================================================ -`; - -exports[`interrupt.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -* Something -### Some heading - -=====================================output===================================== -- Something - -### Some heading - -================================================================================ -`; - -exports[`interrupt.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -* Something -### Some heading - -=====================================output===================================== -- Something - -### Some heading - -================================================================================ -`; - -exports[`interrupt.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -* Something -### Some heading - -=====================================output===================================== -- Something - -### Some heading - -================================================================================ -`; - -exports[`interrupt.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* Something -### Some heading - -=====================================output===================================== -- Something - -### Some heading - -================================================================================ -`; - -exports[`issue-7846.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e -=====================================output===================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e - -================================================================================ -`; - -exports[`issue-7846.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e -=====================================output===================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e - -================================================================================ -`; - -exports[`issue-7846.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e -=====================================output===================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e - -================================================================================ -`; - -exports[`issue-7846.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e -=====================================output===================================== -- a a - b b - c c - d d - e e - -1. a a a - b b b - c c c - d d d - e e e - -================================================================================ -`; - -exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- This is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- This is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- This is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- This is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`long-paragraph.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- This is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- This is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`long-paragraph.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- This is a long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -- This is a long long long long long long long long long long long long long - long paragraph. - -================================================================================ -`; - -exports[`loose.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -=====================================output===================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -================================================================================ -`; - -exports[`loose.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -=====================================output===================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -================================================================================ -`; - -exports[`loose.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -=====================================output===================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -================================================================================ -`; - -exports[`loose.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -=====================================output===================================== -- 123 - - - abc - -- 456 - - - def - -- 789 - - - ghi - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- 123 - 456 - 789 - -=====================================output===================================== -- 123 456 789 - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- 123 - 456 - 789 - -=====================================output===================================== -- 123 456 789 - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- 123 - 456 - 789 - -=====================================output===================================== -- 123 456 789 - -================================================================================ -`; - -exports[`multiline.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- 123 - 456 - 789 - -=====================================output===================================== -- 123 456 789 - -================================================================================ -`; - -exports[`nested.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- Level 1 - - Level 2 - - Level 3 - -=====================================output===================================== -- Level 1 - - Level 2 - - Level 3 - -================================================================================ -`; - -exports[`nested.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- Level 1 - - Level 2 - - Level 3 - -=====================================output===================================== -- Level 1 - - Level 2 - - Level 3 - -================================================================================ -`; - -exports[`nested.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- Level 1 - - Level 2 - - Level 3 - -=====================================output===================================== -- Level 1 - - Level 2 - - Level 3 - -================================================================================ -`; - -exports[`nested.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- Level 1 - - Level 2 - - Level 3 - -=====================================output===================================== -- Level 1 - - Level 2 - - Level 3 - -================================================================================ -`; - -exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -* parent list item parent list item parent list item parent list item parent list item parent list item - - * child list item child list item child list item child list item child list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -* [x] parent task list item parent task list item parent task list item parent task list item - - * [x] child task list item child task list item child task list item child task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -=====================================output===================================== -- parent list item parent list item parent list item parent list item parent - list item parent list item - - - child list item child list item child list item child list item child list - item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -- [x] parent task list item parent task list item parent task list item parent - task list item - - - [x] child task list item child task list item child task list item child - task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -================================================================================ -`; - -exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -* parent list item parent list item parent list item parent list item parent list item parent list item - - * child list item child list item child list item child list item child list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -* [x] parent task list item parent task list item parent task list item parent task list item - - * [x] child task list item child task list item child task list item child task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -=====================================output===================================== -- parent list item parent list item parent list item parent list item parent - list item parent list item - - - child list item child list item child list item child list item child - list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -- [x] parent task list item parent task list item parent task list item parent - task list item - - - [x] child task list item child task list item child task list item child - task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -================================================================================ -`; - -exports[`nested-checkbox.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -* parent list item parent list item parent list item parent list item parent list item parent list item - - * child list item child list item child list item child list item child list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -* [x] parent task list item parent task list item parent task list item parent task list item - - * [x] child task list item child task list item child task list item child task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -=====================================output===================================== -- parent list item parent list item parent list item parent list item parent - list item parent list item - - - child list item child list item child list item child list item child - list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -- [x] parent task list item parent task list item parent task list item parent - task list item - - - [x] child task list item child task list item child task list item child - task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -================================================================================ -`; - -exports[`nested-checkbox.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* parent list item parent list item parent list item parent list item parent list item parent list item - - * child list item child list item child list item child list item child list item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -* [x] parent task list item parent task list item parent task list item parent task list item - - * [x] child task list item child task list item child task list item child task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph - -=====================================output===================================== -- parent list item parent list item parent list item parent list item parent - list item parent list item - - - child list item child list item child list item child list item child list - item child list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -- [x] parent task list item parent task list item parent task list item parent - task list item - - - [x] child task list item child task list item child task list item child - task list item - - paragraph paragraph paragraph paragraph paragraph paragraph paragraph - paragraph paragraph - -================================================================================ -`; - -exports[`nested-tab.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -# List with 1 tab indentation and \`-\` -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` -* Top level list item 1 -* Top level list item 2 - * Nested List item 1 - * Nested List item 2 - * Sub-Nested List item 1 - * Sub-Nested List item 2 - -=====================================output===================================== -# List with 1 tab indentation and \`-\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 - -================================================================================ -`; - -exports[`nested-tab.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -# List with 1 tab indentation and \`-\` -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` -* Top level list item 1 -* Top level list item 2 - * Nested List item 1 - * Nested List item 2 - * Sub-Nested List item 1 - * Sub-Nested List item 2 - -=====================================output===================================== -# List with 1 tab indentation and \`-\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 - -================================================================================ -`; - -exports[`nested-tab.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -# List with 1 tab indentation and \`-\` -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` -* Top level list item 1 -* Top level list item 2 - * Nested List item 1 - * Nested List item 2 - * Sub-Nested List item 1 - * Sub-Nested List item 2 - -=====================================output===================================== -# List with 1 tab indentation and \`-\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 - -================================================================================ -`; - -exports[`nested-tab.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# List with 1 tab indentation and \`-\` -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` -* Top level list item 1 -* Top level list item 2 - * Nested List item 1 - * Nested List item 2 - * Sub-Nested List item 1 - * Sub-Nested List item 2 - -=====================================output===================================== -# List with 1 tab indentation and \`-\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 - - Sub-Nested List item 1 - - Sub-Nested List item 2 - -# List with 1 tab indentation and \`*\` - -- Top level list item 1 -- Top level list item 2 - - Nested List item 1 - - Nested List item 2 _ Sub-Nested List item 1 _ Sub-Nested List item 2 - -================================================================================ -`; - -exports[`ordered.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -1. 123 -1. 456 -1. 789 - -=====================================output===================================== -1. 123 -1. 456 -1. 789 - -================================================================================ -`; - -exports[`ordered.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -1. 123 -1. 456 -1. 789 - -=====================================output===================================== -1. 123 -1. 456 -1. 789 - -================================================================================ -`; - -exports[`ordered.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -1. 123 -1. 456 -1. 789 - -=====================================output===================================== -1. 123 -1. 456 -1. 789 - -================================================================================ -`; - -exports[`ordered.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. 123 -1. 456 -1. 789 - -=====================================output===================================== -1. 123 -1. 456 -1. 789 - -================================================================================ -`; - -exports[`separate.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -=====================================output===================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -================================================================================ -`; - -exports[`separate.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -=====================================output===================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -================================================================================ -`; - -exports[`separate.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -=====================================output===================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -================================================================================ -`; - -exports[`separate.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -=====================================output===================================== -- 123 -- 123 -- 123 - -* 123 -* 123 -* 123 - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -- 123 -- 456 -- 789 - -=====================================output===================================== -- 123 -- 456 -- 789 - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -- 123 -- 456 -- 789 - -=====================================output===================================== -- 123 -- 456 -- 789 - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -- 123 -- 456 -- 789 - -=====================================output===================================== -- 123 -- 456 -- 789 - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- 123 -- 456 -- 789 - -=====================================output===================================== -- 123 -- 456 -- 789 - -================================================================================ -`; - -exports[`snippet: empty list items (issue 4122) - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. -2. -3. -4. -=====================================output===================================== -1. -2. -3. -4. - -================================================================================ -`; - -exports[`snippet: empty list items with spaces (issue 4122) - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. -2. -3. -4. -=====================================output===================================== -1. -2. -3. -4. - -================================================================================ -`; - -exports[`start.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -5. abc -6. def -7. ghi - ---- - -0. abc -0. def -0. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -2. def -2. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -145. def -69. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -2. def - -=====================================output===================================== -5. abc -6. def -7. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -1000. def -1001. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -1000. def - -================================================================================ -`; - -exports[`start.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -5. abc -6. def -7. ghi - ---- - -0. abc -0. def -0. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -2. def -2. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -145. def -69. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -2. def - -=====================================output===================================== -5. abc -6. def -7. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -1000. def -1001. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -1000. def - -================================================================================ -`; - -exports[`start.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -5. abc -6. def -7. ghi - ---- - -0. abc -0. def -0. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -2. def -2. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -145. def -69. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -2. def - -=====================================output===================================== -5. abc -6. def -7. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -1000. def -1001. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -1000. def - -================================================================================ -`; - -exports[`start.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -5. abc -6. def -7. ghi - ---- - -0. abc -0. def -0. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -2. def -2. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -145. def -69. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -2. def - -=====================================output===================================== -5. abc -6. def -7. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -1. abc -1. def -1. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -0. abc -1. def -2. ghi - ---- - -0. abc -1. def -1. ghi - ---- - -1. abc -2. def -3. ghi - ---- - -2. abc -3. def -4. ghi - ---- - -999. abc -1000. def -1001. ghi - ---- - -0. abc - ---- - -1. abc - ---- - -2. abc - ---- - -999. abc - ---- - -0. abc -1. def - ---- - -1. abc -2. def - ---- - -1. abc -1. def - ---- - -2. abc -3. def - ---- - -999. abc -1. def - ---- - -999. abc -1000. def - -================================================================================ -`; - -exports[`tab.md - {"proseWrap":"always","tabWidth":0} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 0 - | printWidth -=====================================input====================================== -* Text - - [title](link) - -* Text - - - foo - - foo - - bar - -* Text - - # foo - -* Text - - \`\`\` - foo - \`\`\` - -* Text - - \`foo\` - -=====================================output===================================== -- Text - - [title](link) - -- Text - - - foo - - foo - - bar - -- Text - - # foo - -- Text - - \`\`\` - foo - \`\`\` - -- Text - - \`foo\` - -================================================================================ -`; - -exports[`tab.md - {"proseWrap":"always","tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 4 - | printWidth -=====================================input====================================== -* Text - - [title](link) - -* Text - - - foo - - foo - - bar - -* Text - - # foo - -* Text - - \`\`\` - foo - \`\`\` - -* Text - - \`foo\` - -=====================================output===================================== -- Text - - [title](link) - -- Text - - - foo - - foo - - bar - -- Text - - # foo - -- Text - - \`\`\` - foo - \`\`\` - -- Text - - \`foo\` - -================================================================================ -`; - -exports[`tab.md - {"proseWrap":"always","tabWidth":999} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -tabWidth: 999 - | printWidth -=====================================input====================================== -* Text - - [title](link) - -* Text - - - foo - - foo - - bar - -* Text - - # foo - -* Text - - \`\`\` - foo - \`\`\` - -* Text - - \`foo\` - -=====================================output===================================== -- Text - - [title](link) - -- Text - - - foo - - foo - - bar - -- Text - - # foo - -- Text - - \`\`\` - foo - \`\`\` - -- Text - - \`foo\` - -================================================================================ -`; - -exports[`tab.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* Text - - [title](link) - -* Text - - - foo - - foo - - bar - -* Text - - # foo - -* Text - - \`\`\` - foo - \`\`\` - -* Text - - \`foo\` - -=====================================output===================================== -- Text - - [title](link) - -- Text - - - foo - - foo - - bar - -- Text - - # foo - -- Text - - \`\`\` - foo - \`\`\` - -- Text - - \`foo\` - -================================================================================ -`; diff --git a/tests/format/markdown/list/format.test.js b/tests/format/markdown/list/format.test.js new file mode 100644 index 000000000000..9a11a8aceb8d --- /dev/null +++ b/tests/format/markdown/list/format.test.js @@ -0,0 +1,19 @@ +const emptyListItemSnippets = [ + { name: "empty list items (issue 4122)", code: "1.\n2.\n3.\n4." }, + { + name: "empty list items with spaces (issue 4122)", + code: "1. \n2. \n3. \n4. ", + }, +]; + +runFormatTest( + { importMeta: import.meta, snippets: emptyListItemSnippets }, + ["markdown"], + { proseWrap: "always" }, +); +runFormatTest(import.meta, ["markdown"], { proseWrap: "always", tabWidth: 4 }); +runFormatTest(import.meta, ["markdown"], { + proseWrap: "always", + tabWidth: 999, +}); +runFormatTest(import.meta, ["markdown"], { proseWrap: "always", tabWidth: 0 }); diff --git a/tests/format/markdown/list/issue-17652.md b/tests/format/markdown/list/issue-17652.md new file mode 100644 index 000000000000..52f8bf552f82 --- /dev/null +++ b/tests/format/markdown/list/issue-17652.md @@ -0,0 +1,23 @@ +1. Some text, and code block below, with newline after code block + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List + +1. Some text, and code block below, with newline after code block + + 1. Another + 2. List + + + ```yaml + --- + foo: bar + ``` + + 1. Another + 2. List diff --git a/tests/format/markdown/list/issue-8004.md b/tests/format/markdown/list/issue-8004.md new file mode 100644 index 000000000000..ba7536e03f78 --- /dev/null +++ b/tests/format/markdown/list/issue-8004.md @@ -0,0 +1,4 @@ +- Level 1 + - Level 1-1 + +- Level 2 diff --git a/tests/format/markdown/list/jsfmt.spec.js b/tests/format/markdown/list/jsfmt.spec.js deleted file mode 100644 index 6ac9293a56a3..000000000000 --- a/tests/format/markdown/list/jsfmt.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -const emptyListItemSnippets = [ - { name: "empty list items (issue 4122)", code: "1.\n2.\n3.\n4." }, - { - name: "empty list items with spaces (issue 4122)", - code: "1. \n2. \n3. \n4. ", - }, -]; - -run_spec( - { dirname: __dirname, snippets: emptyListItemSnippets }, - ["markdown"], - { proseWrap: "always" } -); -run_spec(__dirname, ["markdown"], { proseWrap: "always", tabWidth: 4 }); -run_spec(__dirname, ["markdown"], { proseWrap: "always", tabWidth: 999 }); -run_spec(__dirname, ["markdown"], { proseWrap: "always", tabWidth: 0 }); diff --git a/tests/format/markdown/list/unordered.md b/tests/format/markdown/list/unordered.md new file mode 100644 index 000000000000..df254df52df9 --- /dev/null +++ b/tests/format/markdown/list/unordered.md @@ -0,0 +1,5 @@ +- first line + - second line indented +- third line + - fourth line + - fifth line diff --git a/tests/format/markdown/long-table/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/long-table/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/long-table/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/long-table/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/long-table/format.test.js b/tests/format/markdown/long-table/format.test.js new file mode 100644 index 000000000000..a01ff9ed31b9 --- /dev/null +++ b/tests/format/markdown/long-table/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["markdown"]); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); diff --git a/tests/format/markdown/long-table/jsfmt.spec.js b/tests/format/markdown/long-table/jsfmt.spec.js deleted file mode 100644 index e1c94789f9d1..000000000000 --- a/tests/format/markdown/long-table/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"]); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); diff --git a/tests/format/markdown/markdown/__snapshots__/format.test.js.snap b/tests/format/markdown/markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..86e3747c1e6d --- /dev/null +++ b/tests/format/markdown/markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,4755 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`real-world-case.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +# Prettier + +[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) +[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) +[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) + +Prettier is an opinionated code formatter with support for: +* JavaScript, including [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) +* [JSX](https://facebook.github.io/jsx/) +* [Flow](https://flow.org/) +* [TypeScript](https://www.typescriptlang.org/) +* CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) +* [JSON](http://json.org/) +* [GraphQL](http://graphql.org/) + +It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code +conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +<details> +<summary><strong>Table of Contents</strong></summary> + +<!-- Do not edit TOC, regenerate with \`yarn toc\` --> + +<!-- toc --> + +* [What does Prettier do?](#what-does-prettier-do) +* [Why Prettier?](#why-prettier) + + [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) + + [Helping Newcomers](#helping-newcomers) + + [Writing code](#writing-code) + + [Easy to adopt](#easy-to-adopt) + + [Clean up an existing codebase](#clean-up-an-existing-codebase) + + [Ride the hype train](#ride-the-hype-train) +* [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) +* [Usage](#usage) + + [CLI](#cli) + + [ESLint](#eslint) + + [Pre-commit Hook](#pre-commit-hook) + + [API](#api) + + [Excluding code from formatting](#excluding-code-from-formatting) +* [Options](#options) + + [Print Width](#print-width) + + [Tab Width](#tab-width) + + [Tabs](#tabs) + + [Semicolons](#semicolons) + + [Quotes](#quotes) + + [Trailing Commas](#trailing-commas) + + [Bracket Spacing](#bracket-spacing) + + [JSX Brackets](#jsx-brackets) + + [Range](#range) + + [Parser](#parser) + + [Filepath](#filepath) +* [Configuration File](#configuration-file) + + [Basic Configuration](#basic-configuration) + + [Configuration Overrides](#configuration-overrides) + + [Configuration Schema](#configuration-schema) +* [Editor Integration](#editor-integration) + + [Atom](#atom) + + [Emacs](#emacs) + + [Vim](#vim) + + [Visual Studio Code](#visual-studio-code) + + [Visual Studio](#visual-studio) + + [Sublime Text](#sublime-text) + + [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) +* [Language Support](#language-support) +* [Related Projects](#related-projects) +* [Technical Details](#technical-details) +* [Badge](#badge) +* [Contributing](#contributing) + +<!-- tocstop --> + +</details> + +-------------------------------------------------------------------------------- + +## What does Prettier do? + +Prettier takes your code and reprints it from scratch by taking the line length into account. + +For example, take the following code: + +\`\`\`js +foo(arg1, arg2, arg3, arg4); +\`\`\` + +It fits in a single line so it's going to stay as is. However, we've all run into this situation: + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +Suddenly our previous format for calling function breaks down because this is too long. Prettier is going to do the painstaking work of reprinting it like that for you: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne() +); +\`\`\` + +Prettier enforces a consistent code **style** (i.e. code formatting that won't affect the AST) across your entire codebase because it disregards the original styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length +into account, wrapping code when necessary. + +<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some +original styling is preserved when practical—see [empty lines] and [multi-line +objects]._ + +[empty lines]:Rationale.md#empty-lines +[multi-line objects]:Rationale.md#multi-line-objects + +If you want to learn more, these two conference talks are great introductions: + +<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> <a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> + + +## Why Prettier? + +### Building and enforcing a style guide + +By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. +- “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” +- “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” +- “Getting tired telling people how to style their product code.” +- “Our top reason was to stop wasting our time debating style nits.” +- “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” +- “I don't want anybody to nitpick any other person ever again.” +- “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” + +### Helping Newcomers + +Prettier is usually introduced by people with experience in the current codebase and JavaScript but the people that disproportionally benefit from it are newcomers to the codebase. One may think that it's only useful for people with very limited programming experience, but we've seen it quicken the ramp up time from experienced engineers joining the company, as they likely used a different coding style before, and developers coming from a different programming language. +- “My motivations for using Prettier are: appearing that I know how to write JavaScript well.” +- “I always put spaces in the wrong place, now I don't have to worry about it anymore.” +- “When you're a beginner you're making a lot of mistakes caused by the syntax. Thanks to Prettier, you can reduce these mistakes and save a lot of time to focus on what really matters.” +- “As a teacher, I will also tell to my students to install Prettier to help them to learn the JS syntax and have readable files.” + +### Writing code + +What usually happens once people are using Prettier is that they realize that they actually spend a lot of time and mental energy formatting their code. With Prettier editor integration, you can just press that magic key binding and poof, the code is formatted. This is an eye opening experience if anything else. +- “I want to write code. Not spend cycles on formatting.” +- “It removed 5% that sucks in our daily life - aka formatting” +- “We're in 2017 and it's still painful to break a call into multiple lines when you happen to add an argument that makes it go over the 80 columns limit :(“ + +### Easy to adopt + +We've worked very hard to use the least controversial coding styles, went through many rounds of fixing all the edge cases and polished the getting started experience. When you're ready to push Prettier into your codebase, not only should it be painless for you to do it technically but the newly formatted codebase should not generate major controversy and be accepted painlessly by your co-workers. +- “It's low overhead. We were able to throw Prettier at very different kinds of repos without much work.” +- “It's been mostly bug free. Had there been major styling issues during the course of implementation we would have been wary about throwing this at our JS codebase. I'm happy to say that's not the case.” +- “Everyone runs it as part of their pre commit scripts, a couple of us use the editor on save extensions as well.” +- “It's fast, against one of our larger JS codebases we were able to run Prettier in under 13 seconds.” +- “The biggest benefit for Prettier for us was being able to format the entire code base at once.” + +### Clean up an existing codebase + +Since coming up with a coding style and enforcing it is a big undertaking, it often slips through the cracks and you are left working on inconsistent codebases. Running Prettier in this case is a quick win, the codebase is now uniform and easier to read without spending hardly any time. +- “Take a look at the code :) I just need to restore sanity.” +- “We inherited a ~2000 module ES6 code base, developed by 20 different developers over 18 months, in a global team. Felt like such a win without much research.” + +### Ride the hype train + +Purely technical aspects of the projects aren't the only thing people look into when choosing to adopt Prettier. Who built and uses it and how quickly it spreads through the community has a non-trivial impact. +- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” +- “Was built by the same people as React & React Native.” +- “I like to be part of the hot new things.” +- “Because soon enough people are gonna ask for it.” + +A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) using Prettier: + +<table> +<tr> +<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> +<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> +<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> +</tr> +<tr> +<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> +<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> +<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> +</tr> +</table> + + +## How does it compare to ESLint (or TSLint, stylelint...)? + +Linters have two categories of rules: + +**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)... + +Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :) + +**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... + +Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code! + + +## Usage + +Install: + +\`\`\` +yarn add prettier --dev --exact +\`\`\` + +You can install it globally if you like: + +\`\`\` +yarn global add prettier +\`\`\` + +*We're using \`yarn\` but you can use \`npm\` if you like:* + +\`\`\` +npm install --save-dev --save-exact prettier +# or globally +npm install --global prettier +\`\`\` + +> We recommend pinning an exact version of prettier in your \`package.json\` +> as we introduce stylistic changes in patch releases. + +### CLI + +Run Prettier through the CLI with this script. Run it without any +arguments to see the [options](#options). + +To format a file in-place, use \`--write\`. You may want to consider +committing your code before doing that, just in case. + +\`\`\`bash +prettier [opts] [filename ...] +\`\`\` + +In practice, this may look something like: + +\`\`\`bash +prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" +\`\`\` + +Don't forget the quotes around the globs! The quotes make sure that Prettier +expands the globs rather than your shell, for cross-platform usage. +The [glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) +is used. + +#### \`--debug-check\` + +If you're worried that Prettier will change the correctness of your code, add \`--debug-check\` to the command. +This will cause Prettier to print an error message if it detects that code correctness might have changed. +Note that \`--write\` cannot be used with \`--debug-check\`. + +#### \`--find-config-path\` and \`--config\` + +If you are repeatedly formatting individual files with \`prettier\`, you will incur a small performance cost +when prettier attempts to look up a [configuration file](#configuration-file). In order to skip this, you may +ask prettier to find the config file once, and re-use it later on. + +\`\`\`bash +prettier --find-config-path ./my/file.js +./my/.prettierrc +\`\`\` + +This will provide you with a path to the configuration file, which you can pass to \`--config\`: + +\`\`\`bash +prettier --config ./my/.prettierrc --write ./my/file.js +\`\`\` + +You can also use \`--config\` if your configuration file lives somewhere where prettier cannot find it, +such as a \`config/\` directory. + +If you don't have a configuration file, or want to ignore it if it does exist, +you can pass \`--no-config\` instead. + +#### \`--ignore-path\` + +Path to a file containing patterns that describe files to ignore. By default, prettier looks for \`./.prettierignore\`. + +#### \`--require-pragma\` + +Require a special comment, called a pragma, to be present in the file's first docblock comment in order for prettier to format it. +\`\`\`js +/** + * @prettier + */ +\`\`\` + +Valid pragmas are \`@prettier\` and \`@format\`. + +#### \`--list-different\` + +Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. + +\`\`\`bash +prettier --single-quote --list-different "src/**/*.js" +\`\`\` + +#### \`--no-config\` + +Do not look for a configuration file. The default settings will be used. + +#### \`--config-precedence\` + +Defines how config file should be evaluated in combination of CLI options. + +**cli-override (default)** + +CLI options take precedence over config file + +**file-override** + +Config file take precedence over CLI options + +**prefer-file** + +If a config file is found will evaluate it and ignore other CLI options. If no config file is found CLI options will evaluate as normal. + +This option adds support to editor integrations where users define their default configuration but want to respect project specific configuration. + +#### \`--with-node-modules\` + +Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out from this behavior use \`--with-node-modules\` flag. + +#### \`--write\` + +This rewrites all processed files in place. This is comparable to the \`eslint --fix\` workflow. + +### ESLint + +If you are using ESLint, integrating Prettier to your workflow is straightforward: + +Just add Prettier as an ESLint rule using [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). + +\`\`\`js +yarn add --dev prettier eslint-plugin-prettier + +// .eslintrc.json +{ + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": "error" + } +} +\`\`\` + +We also recommend that you use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to disable all the existing formatting rules. It's a one liner that can be added on-top of any existing ESLint configuration. + +\`\`\` +$ yarn add --dev eslint-config-prettier +\`\`\` + +.eslintrc.json: + +\`\`\`json +{ + "extends": [ + "prettier" + ] +} +\`\`\` + + +### Pre-commit Hook + +You can use Prettier with a pre-commit tool. This can re-format your files that are marked as "staged" via \`git add\` before you commit. + +##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) + +Install it along with [husky](https://github.com/typicode/husky): + +\`\`\`bash +yarn add lint-staged husky --dev +\`\`\` + +and add this config to your \`package.json\`: + +\`\`\`json +{ + "scripts": { + "precommit": "lint-staged" + }, + "lint-staged": { + "*.{js,json,css}": [ + "prettier --write", + "git add" + ] + } +} +\`\`\` +There is a limitation where if you stage specific lines this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62) for more info. + +See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged. + + +##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) + +Copy the following config into your \`.pre-commit-config.yaml\` file: + +\`\`\`yaml + + - repo: https://github.com/prettier/prettier + sha: '' # Use the sha or tag you want to point at + hooks: + - id: prettier + +\`\`\` + +Find more info from [here](https://pre-commit.com). + +##### Option 3. bash script + +Alternately you can save this script as \`.git/hooks/pre-commit\` and give it execute permission: + +\`\`\`bash +#!/bin/sh +jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') +[ -z "$jsfiles" ] && exit 0 + +# Prettify all staged .js files +echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write + +# Add back the modified/prettified files to staging +echo "$jsfiles" | xargs git add + +exit 0 +\`\`\` + +### API + +\`\`\`js +const prettier = require("prettier"); +\`\`\` + +#### \`prettier.format(source [, options])\` + +\`format\` is used to format text using Prettier. [Options](#options) may be provided to override the defaults. + +\`\`\`js +prettier.format("foo ( );", { semi: false }); +// -> "foo()" +\`\`\` + +#### \`prettier.check(source [, options])\` + +\`check\` checks to see if the file has been formatted with Prettier given those options and returns a \`Boolean\`. +This is similar to the \`--list-different\` parameter in the CLI and is useful for running Prettier in CI scenarios. + +#### \`prettier.formatWithCursor(source [, options])\` + +\`formatWithCursor\` both formats the code, and translates a cursor position from unformatted code to formatted code. +This is useful for editor integrations, to prevent the cursor from moving when code is formatted. + +The \`cursorOffset\` option should be provided, to specify where the cursor is. + +\`\`\`js +prettier.formatWithCursor(" 1", { cursorOffset: 2 }); +// -> { formatted: '1;\\n', cursorOffset: 1 } +\`\`\` + +#### \`prettier.resolveConfig([filePath [, options]])\` + +\`resolveConfig\` can be used to resolve configuration for a given source file. +The function optionally accepts an input file path as an argument, which defaults to the current working directory. +A promise is returned which will resolve to: +* An options object, providing a [config file](#configuration-file) was found. +* \`null\`, if no file was found. + +The promise will be rejected if there was an error parsing the configuration file. + +If \`options.useCache\` is \`false\`, all caching will be bypassed. + +\`\`\`js +const text = fs.readFileSync(filePath, "utf8"); +prettier.resolveConfig(filePath).then(options => { + const formatted = prettier.format(text, options); +}) +\`\`\` + +Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use sync version. + +#### \`prettier.clearConfigCache()\` + +As you repeatedly call \`resolveConfig\`, the file system structure will be cached for performance. +This function will clear the cache. Generally this is only needed for editor integrations that +know that the file system has changed since the last format took place. + +#### Custom Parser API + +If you need to make modifications to the AST (such as codemods), or you want to provide an alternate parser, you can do so by setting the \`parser\` option to a function. The function signature of the parser function is: +\`\`\`js +(text: string, parsers: object, options: object) => AST; +\`\`\` + +Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. + +\`\`\`js +prettier.format("lodash ( )", { + parser(text, { babylon }) { + const ast = babylon(text); + ast.program.body[0].expression.callee.name = "_"; + return ast; + } +}); +// -> "_();\\n" +\`\`\` + +The \`--parser\` CLI option may be a path to a node.js module exporting a parse function. + +### Excluding code from formatting + +A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the abstract syntax tree from formatting. + +For example: + +\`\`\`js +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +will be transformed to: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +## Options +Prettier ships with a handful of customizable format options, usable in both the CLI and API. + +### Print Width +Specify the line length that the printer will wrap on. + +> **For readability we recommend against using more than 80 characters:** +> +>In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don't strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. +> +> Prettier, on the other hand, strives to fit the most code into every line. With the print width set to 120, prettier may produce overly compact, or otherwise undesirable code. + +Default | CLI Override | API Override +--------|--------------|------------- +\`80\` | \`--print-width <int>\` | \`printWidth: <int>\` + +### Tab Width +Specify the number of spaces per indentation-level. + +Default | CLI Override | API Override +--------|--------------|------------- + \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` + +### Tabs +Indent lines with tabs instead of spaces + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--use-tabs\` | \`useTabs: <bool>\` + +### Semicolons +Print semicolons at the ends of statements. + +Valid options: + + * \`true\` - Add a semicolon at the end of every statement. + * \`false\` - Only add semicolons at the beginning of lines that may introduce ASI failures. + +Default | CLI Override | API Override +--------|--------------|------------- +\`true\` | \`--no-semi\` | \`semi: <bool>\` + +### Quotes +Use single quotes instead of double quotes. + +Notes: +* Quotes in JSX will always be double and ignore this setting. +* If the number of quotes outweighs the other quote, the quote which is less used will be used to format the string - Example: \`"I'm double quoted"\` results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` results in \`'This "example" is single quoted'\`. + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--single-quote\` | \`singleQuote: <bool>\` + +### Trailing Commas +Print trailing commas wherever possible when multi-line. (A single-line array, +for example, never gets trailing commas.) + +Valid options: + * \`"none"\` - No trailing commas. + * \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) + * \`"all"\` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). + +Default | CLI Override | API Override +--------|--------------|------------- +\`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> + +### Bracket Spacing +Print spaces between brackets in object literals. + +Valid options: + * \`true\` - Example: \`{ foo: bar }\`. + * \`false\` - Example: \`{foo: bar}\`. + +Default | CLI Override | API Override +--------|--------------|------------- +\`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` + +### JSX Brackets +Put the \`>\` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` + +### Range +Format only a segment of a file. + +These two options can be used to format code starting and ending at a given character offset (inclusive and exclusive, respectively). The range will extend: +* Backwards to the start of the first line containing the selected statement. +* Forwards to the end of the selected statement. + +Default | CLI Override | API Override +--------|--------------|------------- +\`0\` | \`--range-start <int>\`| \`rangeStart: <int>\` +\`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` + +### Parser +Specify which parser to use. + +Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript features (including Flow). Prettier automatically infers the parser from the input file path, so you shouldn't have to change this setting. + +Built-in parsers: + * [\`babylon\`](https://github.com/babel/babylon/) + * [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) + * [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since v1.4.0_ + * [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ + * [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) _Since v1.5.0_ + * [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ + +[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ + +Default | CLI Override | API Override +--------|--------------|------------- +\`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` + +### Filepath +Specify the input filepath. This will be used to do parser inference. + +For example, the following will use \`postcss\` parser: + +\`\`\`bash +cat foo | prettier --stdin-filepath foo.css +\`\`\` + +Default | CLI Override | API Override +--------|--------------|------------- +None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` + +### Require pragma +Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful +when gradually transitioning large, unformatted codebases to prettier. + +For example, a file with the following as its first comment will be formatted when \`--require-pragma\` is supplied: + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +or + +\`\`\`js +/** + * @format + */ +\`\`\` + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` + +## Configuration File + +Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. +This means you can configure prettier via: + +* A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: \`.yaml/.yml/.json/.js\`. +* A \`prettier.config.js\` file that exports an object. +* A \`"prettier"\` key in your \`package.json\` file. + +The configuration file will be resolved starting from the location of the file being formatted, +and searching up the file tree until a config file is (or isn't) found. + +The options to the configuration file are the same the [API options](#options). + +### Basic Configuration + +JSON: + +\`\`\`json +// .prettierrc +{ + "printWidth": 100, + "parser": "flow" +} +\`\`\` + +YAML: + +\`\`\`yaml +# .prettierrc +printWidth: 100 +parser: flow +\`\`\` + +### Configuration Overrides + +Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). +This allows you to apply configuration to specific files. + +JSON: + +\`\`\`json +{ + "semi": false, + "overrides": [{ + "files": "*.test.js", + "options": { + "semi": true + } + }] +} +\`\`\` + +YAML: + +\`\`\`yaml +semi: false +overrides: +- files: "*.test.js" + options: + semi: true +\`\`\` + +\`files\` is required for each override, and may be a string or array of strings. +\`excludeFiles\` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. + +To get prettier to format its own \`.prettierrc\` file, you can do: + +\`\`\`json +{ + "overrides": [{ + "files": ".prettierrc", + "options": { "parser": "json" } + }] +} +\`\`\` + +For more information on how to use the CLI to locate a file, see the [CLI](#cli) section. + +### Configuration Schema + +If you'd like a JSON schema to validate your configuration, one is available here: https://json.schemastore.org/prettierrc. + +## Editor Integration + +### Atom + +Atom users can simply install the [prettier-atom](https://github.com/prettier/prettier-atom) package and use +\`Ctrl+Alt+F\` to format a file (or format on save if enabled). + +### Emacs + +Emacs users should see [this repository](https://github.com/prettier/prettier-emacs) +for on-demand formatting. + +### Vim + +Vim users can simply install either [sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), [w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or [prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), for more details see [this directory](https://github.com/prettier/prettier/tree/master/editors/vim). + +### Visual Studio Code + +Can be installed using the extension sidebar. Search for \`Prettier - JavaScript formatter\`. + +Can also be installed using \`ext install prettier-vscode\`. + +[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) + +### Visual Studio + +Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). + +### Sublime Text + +Sublime Text support is available through Package Control and +the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. + +### JetBrains WebStorm, PHPStorm, PyCharm... + +See the [WebStorm +guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). + +## Language Support + +Prettier attempts to support all JavaScript language features, +including non-standardized ones. By default it uses the +[Babylon](https://github.com/babel/babylon) parser with all language +features enabled, but you can also use the +[Flow](https://github.com/facebook/flow) parser with the +\`parser\` API or \`--parser\` CLI [option](#options). + +All of JSX and Flow syntax is supported. In fact, the test suite in +\`tests/flow\` *is* the entire Flow test suite and they all pass. + +Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), [JSON](http://json.org/), and [GraphQL](http://graphql.org/). + +The minimum version of TypeScript supported is 2.1.3 as it introduces the ability to have leading \`|\` for type definitions which prettier outputs. + +## Related Projects + +- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) plugs Prettier into your ESLint workflow +- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) turns off all ESLint rules that are unnecessary or might conflict with Prettier +- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) +passes \`prettier\` output to \`eslint --fix\` +- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) +passes \`prettier\` output to \`stylelint --fix\` +- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) +uses \`prettier\` and \`prettier-eslint\` to format code with standard rules +- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) +passes \`prettier\` output to \`standard --fix\` +- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) +\`prettier\` with a few minor extra options +- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) allows you to use Prettier as a Neutrino preset +- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier as a server to avoid Node.js startup delay. It also supports configuration via \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. +- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet and exposes a REST API for Prettier that allows to format CodeMirror editor in your browser +- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code in GitHub comments +- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) allows you to use Prettier with Rollup +- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) allows you to use Prettier to format JS [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) in Markdown files via [Markdown Magic](https://github.com/DavidWells/markdown-magic) +- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) runs Prettier as a TSLint rule and reports differences as individual TSLint issues +- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) use TSLint with Prettier without any conflict + +## Technical Details + +This printer is a fork of +[recast](https://github.com/benjamn/recast)'s printer with its +algorithm replaced by the one described by Wadler in "[A prettier +printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". +There still may be leftover code from recast that needs to be cleaned +up. + +The basic idea is that the printer takes an AST and returns an +intermediate representation of the output, and the printer uses that +to generate a string. The advantage is that the printer can "measure" +the IR and see if the output is going to fit on a line, and break if +not. + +This means that most of the logic of printing an AST involves +generating an abstract representation of the output involving certain +commands. For example, \`concat(["(", line, arg, line ")"])\` would +represent a concatenation of opening parens, an argument, and closing +parens. But if that doesn't fit on one line, the printer can break +where \`line\` is specified. + +More (rough) details can be found in [commands.md](commands.md). + +## Badge + +Show the world you're using *Prettier* → [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) + +\`\`\`md +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) +\`\`\` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). + +=====================================output===================================== +# Prettier + +[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) +[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) +[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) + +Prettier is an opinionated code formatter with support for: + +- JavaScript, including + [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) +- [JSX](https://facebook.github.io/jsx/) +- [Flow](https://flow.org/) +- [TypeScript](https://www.typescriptlang.org/) +- CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) +- [JSON](http://json.org/) +- [GraphQL](http://graphql.org/) + +It removes all original styling[\\*](#styling-footnote) and ensures that all +outputted code conforms to a consistent style. (See this +[blog post](http://jlongster.com/A-Prettier-Formatter)) + +<details> +<summary><strong>Table of Contents</strong></summary> + +<!-- Do not edit TOC, regenerate with \`yarn toc\` --> + +<!-- toc --> + +- [What does Prettier do?](#what-does-prettier-do) +- [Why Prettier?](#why-prettier) + - [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) + - [Helping Newcomers](#helping-newcomers) + - [Writing code](#writing-code) + - [Easy to adopt](#easy-to-adopt) + - [Clean up an existing codebase](#clean-up-an-existing-codebase) + - [Ride the hype train](#ride-the-hype-train) +- [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) +- [Usage](#usage) + - [CLI](#cli) + - [ESLint](#eslint) + - [Pre-commit Hook](#pre-commit-hook) + - [API](#api) + - [Excluding code from formatting](#excluding-code-from-formatting) +- [Options](#options) + - [Print Width](#print-width) + - [Tab Width](#tab-width) + - [Tabs](#tabs) + - [Semicolons](#semicolons) + - [Quotes](#quotes) + - [Trailing Commas](#trailing-commas) + - [Bracket Spacing](#bracket-spacing) + - [JSX Brackets](#jsx-brackets) + - [Range](#range) + - [Parser](#parser) + - [Filepath](#filepath) +- [Configuration File](#configuration-file) + - [Basic Configuration](#basic-configuration) + - [Configuration Overrides](#configuration-overrides) + - [Configuration Schema](#configuration-schema) +- [Editor Integration](#editor-integration) + - [Atom](#atom) + - [Emacs](#emacs) + - [Vim](#vim) + - [Visual Studio Code](#visual-studio-code) + - [Visual Studio](#visual-studio) + - [Sublime Text](#sublime-text) + - [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) +- [Language Support](#language-support) +- [Related Projects](#related-projects) +- [Technical Details](#technical-details) +- [Badge](#badge) +- [Contributing](#contributing) + +<!-- tocstop --> + +</details> + +--- + +## What does Prettier do? + +Prettier takes your code and reprints it from scratch by taking the line length +into account. + +For example, take the following code: + +\`\`\`js +foo(arg1, arg2, arg3, arg4); +\`\`\` + +It fits in a single line so it's going to stay as is. However, we've all run +into this situation: + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +Suddenly our previous format for calling function breaks down because this is +too long. Prettier is going to do the painstaking work of reprinting it like +that for you: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne(), +); +\`\`\` + +Prettier enforces a consistent code **style** (i.e. code formatting that won't +affect the AST) across your entire codebase because it disregards the original +styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST +with its own rules that take the maximum line length into account, wrapping code +when necessary. + +<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some +original styling is preserved when practical—see [empty lines] and [multi-line +objects]._ + +[empty lines]: Rationale.md#empty-lines +[multi-line objects]: Rationale.md#multi-line-objects + +If you want to learn more, these two conference talks are great introductions: + +<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> +<a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> + +## Why Prettier? + +### Building and enforcing a style guide + +By far the biggest reason for adopting Prettier is to stop all the on-going +debates over styles. It is generally accepted that having a common style guide +is valuable for a project and team but getting there is a very painful and +unrewarding process. People get very emotional around particular ways of writing +code and nobody likes spending time writing and receiving nits. + +- “We want to free mental threads and end discussions around style. While + sometimes fruitful, these discussions are for the most part wasteful.” +- “Literally had an engineer go through a huge effort of cleaning up all of our + code because we were debating ternary style for the longest time and were + inconsistent about it. It was dumb, but it was a weird on-going "great debate" + that wasted lots of little back and forth bits. It's far easier for us all to + agree now: just run Prettier, and go with that style.” +- “Getting tired telling people how to style their product code.” +- “Our top reason was to stop wasting our time debating style nits.” +- “Having a githook set up has reduced the amount of style issues in PRs that + result in broken builds due to ESLint rules or things I have to nit-pick or + clean up later.” +- “I don't want anybody to nitpick any other person ever again.” +- “It reminds me of how Steve Jobs used to wear the same clothes every day + because he has a million decisions to make and he didn't want to be bothered + to make trivial ones like picking out clothes. I think Prettier is like that.” + +### Helping Newcomers + +Prettier is usually introduced by people with experience in the current codebase +and JavaScript but the people that disproportionally benefit from it are +newcomers to the codebase. One may think that it's only useful for people with +very limited programming experience, but we've seen it quicken the ramp up time +from experienced engineers joining the company, as they likely used a different +coding style before, and developers coming from a different programming +language. + +- “My motivations for using Prettier are: appearing that I know how to write + JavaScript well.” +- “I always put spaces in the wrong place, now I don't have to worry about it + anymore.” +- “When you're a beginner you're making a lot of mistakes caused by the syntax. + Thanks to Prettier, you can reduce these mistakes and save a lot of time to + focus on what really matters.” +- “As a teacher, I will also tell to my students to install Prettier to help + them to learn the JS syntax and have readable files.” + +### Writing code + +What usually happens once people are using Prettier is that they realize that +they actually spend a lot of time and mental energy formatting their code. With +Prettier editor integration, you can just press that magic key binding and poof, +the code is formatted. This is an eye opening experience if anything else. + +- “I want to write code. Not spend cycles on formatting.” +- “It removed 5% that sucks in our daily life - aka formatting” +- “We're in 2017 and it's still painful to break a call into multiple lines when + you happen to add an argument that makes it go over the 80 columns limit :(“ + +### Easy to adopt + +We've worked very hard to use the least controversial coding styles, went +through many rounds of fixing all the edge cases and polished the getting +started experience. When you're ready to push Prettier into your codebase, not +only should it be painless for you to do it technically but the newly formatted +codebase should not generate major controversy and be accepted painlessly by +your co-workers. + +- “It's low overhead. We were able to throw Prettier at very different kinds of + repos without much work.” +- “It's been mostly bug free. Had there been major styling issues during the + course of implementation we would have been wary about throwing this at our JS + codebase. I'm happy to say that's not the case.” +- “Everyone runs it as part of their pre commit scripts, a couple of us use the + editor on save extensions as well.” +- “It's fast, against one of our larger JS codebases we were able to run + Prettier in under 13 seconds.” +- “The biggest benefit for Prettier for us was being able to format the entire + code base at once.” + +### Clean up an existing codebase + +Since coming up with a coding style and enforcing it is a big undertaking, it +often slips through the cracks and you are left working on inconsistent +codebases. Running Prettier in this case is a quick win, the codebase is now +uniform and easier to read without spending hardly any time. + +- “Take a look at the code :) I just need to restore sanity.” +- “We inherited a ~2000 module ES6 code base, developed by 20 different + developers over 18 months, in a global team. Felt like such a win without much + research.” + +### Ride the hype train + +Purely technical aspects of the projects aren't the only thing people look into +when choosing to adopt Prettier. Who built and uses it and how quickly it +spreads through the community has a non-trivial impact. + +- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted + by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” +- “Was built by the same people as React & React Native.” +- “I like to be part of the hot new things.” +- “Because soon enough people are gonna ask for it.” + +A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) +using Prettier: + +<table> +<tr> +<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> +<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> +<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> +</tr> +<tr> +<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> +<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> +<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> +</tr> +</table> + +## How does it compare to ESLint (or TSLint, stylelint...)? + +Linters have two categories of rules: + +**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), +[no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), +[keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), +[comma-style](http://eslint.org/docs/rules/comma-style)... + +Prettier alleviates the need for this whole category of rules! Prettier is going +to reprint the entire program from scratch in a consistent way, so it's not +possible for the programmer to make a mistake there anymore :) + +**Code-quality rules**: eg +[no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), +[no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), +[no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), +[prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... + +Prettier does nothing to help with those kind of rules. They are also the most +important ones provided by linters as they are likely to catch real bugs with +your code! + +## Usage + +Install: + +\`\`\` +yarn add prettier --dev --exact +\`\`\` + +You can install it globally if you like: + +\`\`\` +yarn global add prettier +\`\`\` + +_We're using \`yarn\` but you can use \`npm\` if you like:_ + +\`\`\` +npm install --save-dev --save-exact prettier +# or globally +npm install --global prettier +\`\`\` + +> We recommend pinning an exact version of prettier in your \`package.json\` as we +> introduce stylistic changes in patch releases. + +### CLI + +Run Prettier through the CLI with this script. Run it without any arguments to +see the [options](#options). + +To format a file in-place, use \`--write\`. You may want to consider committing +your code before doing that, just in case. + +\`\`\`bash +prettier [opts] [filename ...] +\`\`\` + +In practice, this may look something like: + +\`\`\`bash +prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" +\`\`\` + +Don't forget the quotes around the globs! The quotes make sure that Prettier +expands the globs rather than your shell, for cross-platform usage. The +[glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) +is used. + +#### \`--debug-check\` + +If you're worried that Prettier will change the correctness of your code, add +\`--debug-check\` to the command. This will cause Prettier to print an error +message if it detects that code correctness might have changed. Note that +\`--write\` cannot be used with \`--debug-check\`. + +#### \`--find-config-path\` and \`--config\` + +If you are repeatedly formatting individual files with \`prettier\`, you will +incur a small performance cost when prettier attempts to look up a +[configuration file](#configuration-file). In order to skip this, you may ask +prettier to find the config file once, and re-use it later on. + +\`\`\`bash +prettier --find-config-path ./my/file.js +./my/.prettierrc +\`\`\` + +This will provide you with a path to the configuration file, which you can pass +to \`--config\`: + +\`\`\`bash +prettier --config ./my/.prettierrc --write ./my/file.js +\`\`\` + +You can also use \`--config\` if your configuration file lives somewhere where +prettier cannot find it, such as a \`config/\` directory. + +If you don't have a configuration file, or want to ignore it if it does exist, +you can pass \`--no-config\` instead. + +#### \`--ignore-path\` + +Path to a file containing patterns that describe files to ignore. By default, +prettier looks for \`./.prettierignore\`. + +#### \`--require-pragma\` + +Require a special comment, called a pragma, to be present in the file's first +docblock comment in order for prettier to format it. + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +Valid pragmas are \`@prettier\` and \`@format\`. + +#### \`--list-different\` + +Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames +of files that are different from Prettier formatting. If there are differences +the script errors out, which is useful in a CI scenario. + +\`\`\`bash +prettier --single-quote --list-different "src/**/*.js" +\`\`\` + +#### \`--no-config\` + +Do not look for a configuration file. The default settings will be used. + +#### \`--config-precedence\` + +Defines how config file should be evaluated in combination of CLI options. + +**cli-override (default)** + +CLI options take precedence over config file + +**file-override** + +Config file take precedence over CLI options + +**prefer-file** + +If a config file is found will evaluate it and ignore other CLI options. If no +config file is found CLI options will evaluate as normal. + +This option adds support to editor integrations where users define their default +configuration but want to respect project specific configuration. + +#### \`--with-node-modules\` + +Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out +from this behavior use \`--with-node-modules\` flag. + +#### \`--write\` + +This rewrites all processed files in place. This is comparable to the +\`eslint --fix\` workflow. + +### ESLint + +If you are using ESLint, integrating Prettier to your workflow is +straightforward: + +Just add Prettier as an ESLint rule using +[eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). + +\`\`\`js +yarn add --dev prettier eslint-plugin-prettier + +// .eslintrc.json +{ + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": "error" + } +} +\`\`\` + +We also recommend that you use +[eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to +disable all the existing formatting rules. It's a one liner that can be added +on-top of any existing ESLint configuration. + +\`\`\` +$ yarn add --dev eslint-config-prettier +\`\`\` + +.eslintrc.json: + +\`\`\`json +{ + "extends": ["prettier"] +} +\`\`\` + +### Pre-commit Hook + +You can use Prettier with a pre-commit tool. This can re-format your files that +are marked as "staged" via \`git add\` before you commit. + +##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) + +Install it along with [husky](https://github.com/typicode/husky): + +\`\`\`bash +yarn add lint-staged husky --dev +\`\`\` + +and add this config to your \`package.json\`: + +\`\`\`json +{ + "scripts": { + "precommit": "lint-staged" + }, + "lint-staged": { + "*.{js,json,css}": ["prettier --write", "git add"] + } +} +\`\`\` + +There is a limitation where if you stage specific lines this approach will stage +the whole file after regardless. See this +[issue](https://github.com/okonet/lint-staged/issues/62) for more info. + +See https://github.com/okonet/lint-staged#configuration for more details about +how you can configure lint-staged. + +##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) + +Copy the following config into your \`.pre-commit-config.yaml\` file: + +\`\`\`yaml +- repo: https://github.com/prettier/prettier + sha: '' # Use the sha or tag you want to point at + hooks: + - id: prettier +\`\`\` + +Find more info from [here](https://pre-commit.com). + +##### Option 3. bash script + +Alternately you can save this script as \`.git/hooks/pre-commit\` and give it +execute permission: + +\`\`\`bash +#!/bin/sh +jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') +[ -z "$jsfiles" ] && exit 0 + +# Prettify all staged .js files +echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write + +# Add back the modified/prettified files to staging +echo "$jsfiles" | xargs git add + +exit 0 +\`\`\` + +### API + +\`\`\`js +const prettier = require('prettier'); +\`\`\` + +#### \`prettier.format(source [, options])\` + +\`format\` is used to format text using Prettier. [Options](#options) may be +provided to override the defaults. + +\`\`\`js +prettier.format('foo ( );', { semi: false }); +// -> "foo()" +\`\`\` + +#### \`prettier.check(source [, options])\` + +\`check\` checks to see if the file has been formatted with Prettier given those +options and returns a \`Boolean\`. This is similar to the \`--list-different\` +parameter in the CLI and is useful for running Prettier in CI scenarios. + +#### \`prettier.formatWithCursor(source [, options])\` + +\`formatWithCursor\` both formats the code, and translates a cursor position from +unformatted code to formatted code. This is useful for editor integrations, to +prevent the cursor from moving when code is formatted. + +The \`cursorOffset\` option should be provided, to specify where the cursor is. + +\`\`\`js +prettier.formatWithCursor(' 1', { cursorOffset: 2 }); +// -> { formatted: '1;\\n', cursorOffset: 1 } +\`\`\` + +#### \`prettier.resolveConfig([filePath [, options]])\` + +\`resolveConfig\` can be used to resolve configuration for a given source file. +The function optionally accepts an input file path as an argument, which +defaults to the current working directory. A promise is returned which will +resolve to: + +- An options object, providing a [config file](#configuration-file) was found. +- \`null\`, if no file was found. + +The promise will be rejected if there was an error parsing the configuration +file. + +If \`options.useCache\` is \`false\`, all caching will be bypassed. + +\`\`\`js +const text = fs.readFileSync(filePath, 'utf8'); +prettier.resolveConfig(filePath).then((options) => { + const formatted = prettier.format(text, options); +}); +\`\`\` + +Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use +sync version. + +#### \`prettier.clearConfigCache()\` + +As you repeatedly call \`resolveConfig\`, the file system structure will be cached +for performance. This function will clear the cache. Generally this is only +needed for editor integrations that know that the file system has changed since +the last format took place. + +#### Custom Parser API + +If you need to make modifications to the AST (such as codemods), or you want to +provide an alternate parser, you can do so by setting the \`parser\` option to a +function. The function signature of the parser function is: + +\`\`\`js +(text: string, parsers: object, options: object) => AST; +\`\`\` + +Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. + +\`\`\`js +prettier.format('lodash ( )', { + parser(text, { babylon }) { + const ast = babylon(text); + ast.program.body[0].expression.callee.name = '_'; + return ast; + }, +}); +// -> "_();\\n" +\`\`\` + +The \`--parser\` CLI option may be a path to a node.js module exporting a parse +function. + +### Excluding code from formatting + +A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the +abstract syntax tree from formatting. + +For example: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +will be transformed to: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +## Options + +Prettier ships with a handful of customizable format options, usable in both the +CLI and API. + +### Print Width + +Specify the line length that the printer will wrap on. + +> **For readability we recommend against using more than 80 characters:** +> +> In code styleguides, maximum line length rules are often set to 100 or 120. +> However, when humans write code, they don't strive to reach the maximum number +> of columns on every line. Developers often use whitespace to break up long +> lines for readability. In practice, the average line length often ends up well +> below the maximum. +> +> Prettier, on the other hand, strives to fit the most code into every line. +> With the print width set to 120, prettier may produce overly compact, or +> otherwise undesirable code. + +| Default | CLI Override | API Override | +| ------- | --------------------- | ------------------- | +| \`80\` | \`--print-width <int>\` | \`printWidth: <int>\` | + +### Tab Width + +Specify the number of spaces per indentation-level. + +| Default | CLI Override | API Override | +| ------- | ------------------- | ----------------- | +| \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` | + +### Tabs + +Indent lines with tabs instead of spaces + +| Default | CLI Override | API Override | +| ------- | ------------ | ----------------- | +| \`false\` | \`--use-tabs\` | \`useTabs: <bool>\` | + +### Semicolons + +Print semicolons at the ends of statements. + +Valid options: + +- \`true\` - Add a semicolon at the end of every statement. +- \`false\` - Only add semicolons at the beginning of lines that may introduce ASI + failures. + +| Default | CLI Override | API Override | +| ------- | ------------ | -------------- | +| \`true\` | \`--no-semi\` | \`semi: <bool>\` | + +### Quotes + +Use single quotes instead of double quotes. + +Notes: + +- Quotes in JSX will always be double and ignore this setting. +- If the number of quotes outweighs the other quote, the quote which is less + used will be used to format the string - Example: \`"I'm double quoted"\` + results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` + results in \`'This "example" is single quoted'\`. + +| Default | CLI Override | API Override | +| ------- | ---------------- | --------------------- | +| \`false\` | \`--single-quote\` | \`singleQuote: <bool>\` | + +### Trailing Commas + +Print trailing commas wherever possible when multi-line. (A single-line array, +for example, never gets trailing commas.) + +Valid options: + +- \`"none"\` - No trailing commas. +- \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) +- \`"all"\` - Trailing commas wherever possible (including function arguments). + This requires node 8 or a + [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). + +| Default | CLI Override | API Override | +| -------- | ------------------------------------------------------ | ------------------------------------------------------ | +| \`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> | + +### Bracket Spacing + +Print spaces between brackets in object literals. + +Valid options: + +- \`true\` - Example: \`{ foo: bar }\`. +- \`false\` - Example: \`{foo: bar}\`. + +| Default | CLI Override | API Override | +| ------- | ---------------------- | ------------------------ | +| \`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` | + +### JSX Brackets + +Put the \`>\` of a multi-line JSX element at the end of the last line instead of +being alone on the next line (does not apply to self closing elements). + +| Default | CLI Override | API Override | +| ------- | ------------------------- | ---------------------------- | +| \`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` | + +### Range + +Format only a segment of a file. + +These two options can be used to format code starting and ending at a given +character offset (inclusive and exclusive, respectively). The range will extend: + +- Backwards to the start of the first line containing the selected statement. +- Forwards to the end of the selected statement. + +| Default | CLI Override | API Override | +| ---------- | --------------------- | ------------------- | +| \`0\` | \`--range-start <int>\` | \`rangeStart: <int>\` | +| \`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` | + +### Parser + +Specify which parser to use. + +Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript +features (including Flow). Prettier automatically infers the parser from the +input file path, so you shouldn't have to change this setting. + +Built-in parsers: + +- [\`babylon\`](https://github.com/babel/babylon/) +- [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) +- [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since + v1.4.0_ +- [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ +- [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) + _Since v1.5.0_ +- [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) + _Since v1.5.0_ + +[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ + +| Default | CLI Override | API Override | +| --------- | ----------------------------------------------- | ---------------------------------------------------------- | +| \`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` | + +### Filepath + +Specify the input filepath. This will be used to do parser inference. + +For example, the following will use \`postcss\` parser: + +\`\`\`bash +cat foo | prettier --stdin-filepath foo.css +\`\`\` + +| Default | CLI Override | API Override | +| ------- | --------------------------- | ---------------------- | +| None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` | + +### Require pragma + +Prettier can restrict itself to only format files that contain a special +comment, called a pragma, at the top of the file. This is very useful when +gradually transitioning large, unformatted codebases to prettier. + +For example, a file with the following as its first comment will be formatted +when \`--require-pragma\` is supplied: + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +or + +\`\`\`js +/** + * @format + */ +\`\`\` + +| Default | CLI Override | API Override | +| ------- | ------------------ | ----------------------- | +| \`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` | + +## Configuration File + +Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for +configuration file support. This means you can configure prettier via: + +- A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: + \`.yaml/.yml/.json/.js\`. +- A \`prettier.config.js\` file that exports an object. +- A \`"prettier"\` key in your \`package.json\` file. + +The configuration file will be resolved starting from the location of the file +being formatted, and searching up the file tree until a config file is (or +isn't) found. + +The options to the configuration file are the same the [API options](#options). + +### Basic Configuration + +JSON: + +\`\`\`json +// .prettierrc +{ + "printWidth": 100, + "parser": "flow" +} +\`\`\` + +YAML: + +\`\`\`yaml +# .prettierrc +printWidth: 100 +parser: flow +\`\`\` + +### Configuration Overrides + +Prettier borrows eslint's +[override format](http://eslint.org/docs/user-guide/configuring#example-configuration). +This allows you to apply configuration to specific files. + +JSON: + +\`\`\`json +{ + "semi": false, + "overrides": [ + { + "files": "*.test.js", + "options": { + "semi": true + } + } + ] +} +\`\`\` + +YAML: + +\`\`\`yaml +semi: false +overrides: + - files: '*.test.js' + options: + semi: true +\`\`\` + +\`files\` is required for each override, and may be a string or array of strings. +\`excludeFiles\` may be optionally provided to exclude files for a given rule, and +may also be a string or array of strings. + +To get prettier to format its own \`.prettierrc\` file, you can do: + +\`\`\`json +{ + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] +} +\`\`\` + +For more information on how to use the CLI to locate a file, see the [CLI](#cli) +section. + +### Configuration Schema + +If you'd like a JSON schema to validate your configuration, one is available +here: https://json.schemastore.org/prettierrc. + +## Editor Integration + +### Atom + +Atom users can simply install the +[prettier-atom](https://github.com/prettier/prettier-atom) package and use +\`Ctrl+Alt+F\` to format a file (or format on save if enabled). + +### Emacs + +Emacs users should see +[this repository](https://github.com/prettier/prettier-emacs) for on-demand +formatting. + +### Vim + +Vim users can simply install either +[sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), +[w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or +[prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), +for more details see +[this directory](https://github.com/prettier/prettier/tree/master/editors/vim). + +### Visual Studio Code + +Can be installed using the extension sidebar. Search for +\`Prettier - JavaScript formatter\`. + +Can also be installed using \`ext install prettier-vscode\`. + +[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) + +### Visual Studio + +Install the +[JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). + +### Sublime Text + +Sublime Text support is available through Package Control and the +[JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. + +### JetBrains WebStorm, PHPStorm, PyCharm... + +See the +[WebStorm guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). + +## Language Support + +Prettier attempts to support all JavaScript language features, including +non-standardized ones. By default it uses the +[Babylon](https://github.com/babel/babylon) parser with all language features +enabled, but you can also use the [Flow](https://github.com/facebook/flow) +parser with the \`parser\` API or \`--parser\` CLI [option](#options). + +All of JSX and Flow syntax is supported. In fact, the test suite in \`tests/flow\` +_is_ the entire Flow test suite and they all pass. + +Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, +[Less](http://lesscss.org/), [SCSS](http://sass-lang.com), +[JSON](http://json.org/), and [GraphQL](http://graphql.org/). + +The minimum version of TypeScript supported is 2.1.3 as it introduces the +ability to have leading \`|\` for type definitions which prettier outputs. + +## Related Projects + +- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) + plugs Prettier into your ESLint workflow +- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) + turns off all ESLint rules that are unnecessary or might conflict with + Prettier +- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes + \`prettier\` output to \`eslint --fix\` +- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) + passes \`prettier\` output to \`stylelint --fix\` +- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses + \`prettier\` and \`prettier-eslint\` to format code with standard rules +- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) + passes \`prettier\` output to \`standard --fix\` +- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) + \`prettier\` with a few minor extra options +- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) + allows you to use Prettier as a Neutrino preset +- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier + as a server to avoid Node.js startup delay. It also supports configuration via + \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. +- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet + and exposes a REST API for Prettier that allows to format CodeMirror editor in + your browser +- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code + in GitHub comments +- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) + allows you to use Prettier with Rollup +- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) + allows you to use Prettier to format JS + [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) + in Markdown files via + [Markdown Magic](https://github.com/DavidWells/markdown-magic) +- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) + runs Prettier as a TSLint rule and reports differences as individual TSLint + issues +- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) + use TSLint with Prettier without any conflict + +## Technical Details + +This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer +with its algorithm replaced by the one described by Wadler in +"[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". +There still may be leftover code from recast that needs to be cleaned up. + +The basic idea is that the printer takes an AST and returns an intermediate +representation of the output, and the printer uses that to generate a string. +The advantage is that the printer can "measure" the IR and see if the output is +going to fit on a line, and break if not. + +This means that most of the logic of printing an AST involves generating an +abstract representation of the output involving certain commands. For example, +\`concat(["(", line, arg, line ")"])\` would represent a concatenation of opening +parens, an argument, and closing parens. But if that doesn't fit on one line, +the printer can break where \`line\` is specified. + +More (rough) details can be found in [commands.md](commands.md). + +## Badge + +Show the world you're using _Prettier_ → +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) + +\`\`\`md +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) +\`\`\` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). + +================================================================================ +`; + +exports[`real-world-case.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# Prettier + +[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) +[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) +[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) + +Prettier is an opinionated code formatter with support for: +* JavaScript, including [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) +* [JSX](https://facebook.github.io/jsx/) +* [Flow](https://flow.org/) +* [TypeScript](https://www.typescriptlang.org/) +* CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) +* [JSON](http://json.org/) +* [GraphQL](http://graphql.org/) + +It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code +conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +<details> +<summary><strong>Table of Contents</strong></summary> + +<!-- Do not edit TOC, regenerate with \`yarn toc\` --> + +<!-- toc --> + +* [What does Prettier do?](#what-does-prettier-do) +* [Why Prettier?](#why-prettier) + + [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) + + [Helping Newcomers](#helping-newcomers) + + [Writing code](#writing-code) + + [Easy to adopt](#easy-to-adopt) + + [Clean up an existing codebase](#clean-up-an-existing-codebase) + + [Ride the hype train](#ride-the-hype-train) +* [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) +* [Usage](#usage) + + [CLI](#cli) + + [ESLint](#eslint) + + [Pre-commit Hook](#pre-commit-hook) + + [API](#api) + + [Excluding code from formatting](#excluding-code-from-formatting) +* [Options](#options) + + [Print Width](#print-width) + + [Tab Width](#tab-width) + + [Tabs](#tabs) + + [Semicolons](#semicolons) + + [Quotes](#quotes) + + [Trailing Commas](#trailing-commas) + + [Bracket Spacing](#bracket-spacing) + + [JSX Brackets](#jsx-brackets) + + [Range](#range) + + [Parser](#parser) + + [Filepath](#filepath) +* [Configuration File](#configuration-file) + + [Basic Configuration](#basic-configuration) + + [Configuration Overrides](#configuration-overrides) + + [Configuration Schema](#configuration-schema) +* [Editor Integration](#editor-integration) + + [Atom](#atom) + + [Emacs](#emacs) + + [Vim](#vim) + + [Visual Studio Code](#visual-studio-code) + + [Visual Studio](#visual-studio) + + [Sublime Text](#sublime-text) + + [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) +* [Language Support](#language-support) +* [Related Projects](#related-projects) +* [Technical Details](#technical-details) +* [Badge](#badge) +* [Contributing](#contributing) + +<!-- tocstop --> + +</details> + +-------------------------------------------------------------------------------- + +## What does Prettier do? + +Prettier takes your code and reprints it from scratch by taking the line length into account. + +For example, take the following code: + +\`\`\`js +foo(arg1, arg2, arg3, arg4); +\`\`\` + +It fits in a single line so it's going to stay as is. However, we've all run into this situation: + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +Suddenly our previous format for calling function breaks down because this is too long. Prettier is going to do the painstaking work of reprinting it like that for you: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne() +); +\`\`\` + +Prettier enforces a consistent code **style** (i.e. code formatting that won't affect the AST) across your entire codebase because it disregards the original styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length +into account, wrapping code when necessary. + +<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some +original styling is preserved when practical—see [empty lines] and [multi-line +objects]._ + +[empty lines]:Rationale.md#empty-lines +[multi-line objects]:Rationale.md#multi-line-objects + +If you want to learn more, these two conference talks are great introductions: + +<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> <a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> + + +## Why Prettier? + +### Building and enforcing a style guide + +By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. +- “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” +- “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” +- “Getting tired telling people how to style their product code.” +- “Our top reason was to stop wasting our time debating style nits.” +- “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” +- “I don't want anybody to nitpick any other person ever again.” +- “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” + +### Helping Newcomers + +Prettier is usually introduced by people with experience in the current codebase and JavaScript but the people that disproportionally benefit from it are newcomers to the codebase. One may think that it's only useful for people with very limited programming experience, but we've seen it quicken the ramp up time from experienced engineers joining the company, as they likely used a different coding style before, and developers coming from a different programming language. +- “My motivations for using Prettier are: appearing that I know how to write JavaScript well.” +- “I always put spaces in the wrong place, now I don't have to worry about it anymore.” +- “When you're a beginner you're making a lot of mistakes caused by the syntax. Thanks to Prettier, you can reduce these mistakes and save a lot of time to focus on what really matters.” +- “As a teacher, I will also tell to my students to install Prettier to help them to learn the JS syntax and have readable files.” + +### Writing code + +What usually happens once people are using Prettier is that they realize that they actually spend a lot of time and mental energy formatting their code. With Prettier editor integration, you can just press that magic key binding and poof, the code is formatted. This is an eye opening experience if anything else. +- “I want to write code. Not spend cycles on formatting.” +- “It removed 5% that sucks in our daily life - aka formatting” +- “We're in 2017 and it's still painful to break a call into multiple lines when you happen to add an argument that makes it go over the 80 columns limit :(“ + +### Easy to adopt + +We've worked very hard to use the least controversial coding styles, went through many rounds of fixing all the edge cases and polished the getting started experience. When you're ready to push Prettier into your codebase, not only should it be painless for you to do it technically but the newly formatted codebase should not generate major controversy and be accepted painlessly by your co-workers. +- “It's low overhead. We were able to throw Prettier at very different kinds of repos without much work.” +- “It's been mostly bug free. Had there been major styling issues during the course of implementation we would have been wary about throwing this at our JS codebase. I'm happy to say that's not the case.” +- “Everyone runs it as part of their pre commit scripts, a couple of us use the editor on save extensions as well.” +- “It's fast, against one of our larger JS codebases we were able to run Prettier in under 13 seconds.” +- “The biggest benefit for Prettier for us was being able to format the entire code base at once.” + +### Clean up an existing codebase + +Since coming up with a coding style and enforcing it is a big undertaking, it often slips through the cracks and you are left working on inconsistent codebases. Running Prettier in this case is a quick win, the codebase is now uniform and easier to read without spending hardly any time. +- “Take a look at the code :) I just need to restore sanity.” +- “We inherited a ~2000 module ES6 code base, developed by 20 different developers over 18 months, in a global team. Felt like such a win without much research.” + +### Ride the hype train + +Purely technical aspects of the projects aren't the only thing people look into when choosing to adopt Prettier. Who built and uses it and how quickly it spreads through the community has a non-trivial impact. +- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” +- “Was built by the same people as React & React Native.” +- “I like to be part of the hot new things.” +- “Because soon enough people are gonna ask for it.” + +A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) using Prettier: + +<table> +<tr> +<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> +<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> +<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> +</tr> +<tr> +<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> +<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> +<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> +</tr> +</table> + + +## How does it compare to ESLint (or TSLint, stylelint...)? + +Linters have two categories of rules: + +**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)... + +Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :) + +**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... + +Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code! + + +## Usage + +Install: + +\`\`\` +yarn add prettier --dev --exact +\`\`\` + +You can install it globally if you like: + +\`\`\` +yarn global add prettier +\`\`\` + +*We're using \`yarn\` but you can use \`npm\` if you like:* + +\`\`\` +npm install --save-dev --save-exact prettier +# or globally +npm install --global prettier +\`\`\` + +> We recommend pinning an exact version of prettier in your \`package.json\` +> as we introduce stylistic changes in patch releases. + +### CLI + +Run Prettier through the CLI with this script. Run it without any +arguments to see the [options](#options). + +To format a file in-place, use \`--write\`. You may want to consider +committing your code before doing that, just in case. + +\`\`\`bash +prettier [opts] [filename ...] +\`\`\` + +In practice, this may look something like: + +\`\`\`bash +prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" +\`\`\` + +Don't forget the quotes around the globs! The quotes make sure that Prettier +expands the globs rather than your shell, for cross-platform usage. +The [glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) +is used. + +#### \`--debug-check\` + +If you're worried that Prettier will change the correctness of your code, add \`--debug-check\` to the command. +This will cause Prettier to print an error message if it detects that code correctness might have changed. +Note that \`--write\` cannot be used with \`--debug-check\`. + +#### \`--find-config-path\` and \`--config\` + +If you are repeatedly formatting individual files with \`prettier\`, you will incur a small performance cost +when prettier attempts to look up a [configuration file](#configuration-file). In order to skip this, you may +ask prettier to find the config file once, and re-use it later on. + +\`\`\`bash +prettier --find-config-path ./my/file.js +./my/.prettierrc +\`\`\` + +This will provide you with a path to the configuration file, which you can pass to \`--config\`: + +\`\`\`bash +prettier --config ./my/.prettierrc --write ./my/file.js +\`\`\` + +You can also use \`--config\` if your configuration file lives somewhere where prettier cannot find it, +such as a \`config/\` directory. + +If you don't have a configuration file, or want to ignore it if it does exist, +you can pass \`--no-config\` instead. + +#### \`--ignore-path\` + +Path to a file containing patterns that describe files to ignore. By default, prettier looks for \`./.prettierignore\`. + +#### \`--require-pragma\` + +Require a special comment, called a pragma, to be present in the file's first docblock comment in order for prettier to format it. +\`\`\`js +/** + * @prettier + */ +\`\`\` + +Valid pragmas are \`@prettier\` and \`@format\`. + +#### \`--list-different\` + +Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. + +\`\`\`bash +prettier --single-quote --list-different "src/**/*.js" +\`\`\` + +#### \`--no-config\` + +Do not look for a configuration file. The default settings will be used. + +#### \`--config-precedence\` + +Defines how config file should be evaluated in combination of CLI options. + +**cli-override (default)** + +CLI options take precedence over config file + +**file-override** + +Config file take precedence over CLI options + +**prefer-file** + +If a config file is found will evaluate it and ignore other CLI options. If no config file is found CLI options will evaluate as normal. + +This option adds support to editor integrations where users define their default configuration but want to respect project specific configuration. + +#### \`--with-node-modules\` + +Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out from this behavior use \`--with-node-modules\` flag. + +#### \`--write\` + +This rewrites all processed files in place. This is comparable to the \`eslint --fix\` workflow. + +### ESLint + +If you are using ESLint, integrating Prettier to your workflow is straightforward: + +Just add Prettier as an ESLint rule using [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). + +\`\`\`js +yarn add --dev prettier eslint-plugin-prettier + +// .eslintrc.json +{ + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": "error" + } +} +\`\`\` + +We also recommend that you use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to disable all the existing formatting rules. It's a one liner that can be added on-top of any existing ESLint configuration. + +\`\`\` +$ yarn add --dev eslint-config-prettier +\`\`\` + +.eslintrc.json: + +\`\`\`json +{ + "extends": [ + "prettier" + ] +} +\`\`\` + + +### Pre-commit Hook + +You can use Prettier with a pre-commit tool. This can re-format your files that are marked as "staged" via \`git add\` before you commit. + +##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) + +Install it along with [husky](https://github.com/typicode/husky): + +\`\`\`bash +yarn add lint-staged husky --dev +\`\`\` + +and add this config to your \`package.json\`: + +\`\`\`json +{ + "scripts": { + "precommit": "lint-staged" + }, + "lint-staged": { + "*.{js,json,css}": [ + "prettier --write", + "git add" + ] + } +} +\`\`\` +There is a limitation where if you stage specific lines this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62) for more info. + +See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged. + + +##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) + +Copy the following config into your \`.pre-commit-config.yaml\` file: + +\`\`\`yaml + + - repo: https://github.com/prettier/prettier + sha: '' # Use the sha or tag you want to point at + hooks: + - id: prettier + +\`\`\` + +Find more info from [here](https://pre-commit.com). + +##### Option 3. bash script + +Alternately you can save this script as \`.git/hooks/pre-commit\` and give it execute permission: + +\`\`\`bash +#!/bin/sh +jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') +[ -z "$jsfiles" ] && exit 0 + +# Prettify all staged .js files +echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write + +# Add back the modified/prettified files to staging +echo "$jsfiles" | xargs git add + +exit 0 +\`\`\` + +### API + +\`\`\`js +const prettier = require("prettier"); +\`\`\` + +#### \`prettier.format(source [, options])\` + +\`format\` is used to format text using Prettier. [Options](#options) may be provided to override the defaults. + +\`\`\`js +prettier.format("foo ( );", { semi: false }); +// -> "foo()" +\`\`\` + +#### \`prettier.check(source [, options])\` + +\`check\` checks to see if the file has been formatted with Prettier given those options and returns a \`Boolean\`. +This is similar to the \`--list-different\` parameter in the CLI and is useful for running Prettier in CI scenarios. + +#### \`prettier.formatWithCursor(source [, options])\` + +\`formatWithCursor\` both formats the code, and translates a cursor position from unformatted code to formatted code. +This is useful for editor integrations, to prevent the cursor from moving when code is formatted. + +The \`cursorOffset\` option should be provided, to specify where the cursor is. + +\`\`\`js +prettier.formatWithCursor(" 1", { cursorOffset: 2 }); +// -> { formatted: '1;\\n', cursorOffset: 1 } +\`\`\` + +#### \`prettier.resolveConfig([filePath [, options]])\` + +\`resolveConfig\` can be used to resolve configuration for a given source file. +The function optionally accepts an input file path as an argument, which defaults to the current working directory. +A promise is returned which will resolve to: +* An options object, providing a [config file](#configuration-file) was found. +* \`null\`, if no file was found. + +The promise will be rejected if there was an error parsing the configuration file. + +If \`options.useCache\` is \`false\`, all caching will be bypassed. + +\`\`\`js +const text = fs.readFileSync(filePath, "utf8"); +prettier.resolveConfig(filePath).then(options => { + const formatted = prettier.format(text, options); +}) +\`\`\` + +Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use sync version. + +#### \`prettier.clearConfigCache()\` + +As you repeatedly call \`resolveConfig\`, the file system structure will be cached for performance. +This function will clear the cache. Generally this is only needed for editor integrations that +know that the file system has changed since the last format took place. + +#### Custom Parser API + +If you need to make modifications to the AST (such as codemods), or you want to provide an alternate parser, you can do so by setting the \`parser\` option to a function. The function signature of the parser function is: +\`\`\`js +(text: string, parsers: object, options: object) => AST; +\`\`\` + +Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. + +\`\`\`js +prettier.format("lodash ( )", { + parser(text, { babylon }) { + const ast = babylon(text); + ast.program.body[0].expression.callee.name = "_"; + return ast; + } +}); +// -> "_();\\n" +\`\`\` + +The \`--parser\` CLI option may be a path to a node.js module exporting a parse function. + +### Excluding code from formatting + +A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the abstract syntax tree from formatting. + +For example: + +\`\`\`js +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +will be transformed to: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +## Options +Prettier ships with a handful of customizable format options, usable in both the CLI and API. + +### Print Width +Specify the line length that the printer will wrap on. + +> **For readability we recommend against using more than 80 characters:** +> +>In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don't strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. +> +> Prettier, on the other hand, strives to fit the most code into every line. With the print width set to 120, prettier may produce overly compact, or otherwise undesirable code. + +Default | CLI Override | API Override +--------|--------------|------------- +\`80\` | \`--print-width <int>\` | \`printWidth: <int>\` + +### Tab Width +Specify the number of spaces per indentation-level. + +Default | CLI Override | API Override +--------|--------------|------------- + \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` + +### Tabs +Indent lines with tabs instead of spaces + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--use-tabs\` | \`useTabs: <bool>\` + +### Semicolons +Print semicolons at the ends of statements. + +Valid options: + + * \`true\` - Add a semicolon at the end of every statement. + * \`false\` - Only add semicolons at the beginning of lines that may introduce ASI failures. + +Default | CLI Override | API Override +--------|--------------|------------- +\`true\` | \`--no-semi\` | \`semi: <bool>\` + +### Quotes +Use single quotes instead of double quotes. + +Notes: +* Quotes in JSX will always be double and ignore this setting. +* If the number of quotes outweighs the other quote, the quote which is less used will be used to format the string - Example: \`"I'm double quoted"\` results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` results in \`'This "example" is single quoted'\`. + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--single-quote\` | \`singleQuote: <bool>\` + +### Trailing Commas +Print trailing commas wherever possible when multi-line. (A single-line array, +for example, never gets trailing commas.) + +Valid options: + * \`"none"\` - No trailing commas. + * \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) + * \`"all"\` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). + +Default | CLI Override | API Override +--------|--------------|------------- +\`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> + +### Bracket Spacing +Print spaces between brackets in object literals. + +Valid options: + * \`true\` - Example: \`{ foo: bar }\`. + * \`false\` - Example: \`{foo: bar}\`. + +Default | CLI Override | API Override +--------|--------------|------------- +\`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` + +### JSX Brackets +Put the \`>\` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` + +### Range +Format only a segment of a file. + +These two options can be used to format code starting and ending at a given character offset (inclusive and exclusive, respectively). The range will extend: +* Backwards to the start of the first line containing the selected statement. +* Forwards to the end of the selected statement. + +Default | CLI Override | API Override +--------|--------------|------------- +\`0\` | \`--range-start <int>\`| \`rangeStart: <int>\` +\`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` + +### Parser +Specify which parser to use. + +Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript features (including Flow). Prettier automatically infers the parser from the input file path, so you shouldn't have to change this setting. + +Built-in parsers: + * [\`babylon\`](https://github.com/babel/babylon/) + * [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) + * [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since v1.4.0_ + * [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ + * [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) _Since v1.5.0_ + * [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ + +[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ + +Default | CLI Override | API Override +--------|--------------|------------- +\`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` + +### Filepath +Specify the input filepath. This will be used to do parser inference. + +For example, the following will use \`postcss\` parser: + +\`\`\`bash +cat foo | prettier --stdin-filepath foo.css +\`\`\` + +Default | CLI Override | API Override +--------|--------------|------------- +None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` + +### Require pragma +Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful +when gradually transitioning large, unformatted codebases to prettier. + +For example, a file with the following as its first comment will be formatted when \`--require-pragma\` is supplied: + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +or + +\`\`\`js +/** + * @format + */ +\`\`\` + +Default | CLI Override | API Override +--------|--------------|------------- +\`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` + +## Configuration File + +Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. +This means you can configure prettier via: + +* A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: \`.yaml/.yml/.json/.js\`. +* A \`prettier.config.js\` file that exports an object. +* A \`"prettier"\` key in your \`package.json\` file. + +The configuration file will be resolved starting from the location of the file being formatted, +and searching up the file tree until a config file is (or isn't) found. + +The options to the configuration file are the same the [API options](#options). + +### Basic Configuration + +JSON: + +\`\`\`json +// .prettierrc +{ + "printWidth": 100, + "parser": "flow" +} +\`\`\` + +YAML: + +\`\`\`yaml +# .prettierrc +printWidth: 100 +parser: flow +\`\`\` + +### Configuration Overrides + +Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). +This allows you to apply configuration to specific files. + +JSON: + +\`\`\`json +{ + "semi": false, + "overrides": [{ + "files": "*.test.js", + "options": { + "semi": true + } + }] +} +\`\`\` + +YAML: + +\`\`\`yaml +semi: false +overrides: +- files: "*.test.js" + options: + semi: true +\`\`\` + +\`files\` is required for each override, and may be a string or array of strings. +\`excludeFiles\` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. + +To get prettier to format its own \`.prettierrc\` file, you can do: + +\`\`\`json +{ + "overrides": [{ + "files": ".prettierrc", + "options": { "parser": "json" } + }] +} +\`\`\` + +For more information on how to use the CLI to locate a file, see the [CLI](#cli) section. + +### Configuration Schema + +If you'd like a JSON schema to validate your configuration, one is available here: https://json.schemastore.org/prettierrc. + +## Editor Integration + +### Atom + +Atom users can simply install the [prettier-atom](https://github.com/prettier/prettier-atom) package and use +\`Ctrl+Alt+F\` to format a file (or format on save if enabled). + +### Emacs + +Emacs users should see [this repository](https://github.com/prettier/prettier-emacs) +for on-demand formatting. + +### Vim + +Vim users can simply install either [sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), [w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or [prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), for more details see [this directory](https://github.com/prettier/prettier/tree/master/editors/vim). + +### Visual Studio Code + +Can be installed using the extension sidebar. Search for \`Prettier - JavaScript formatter\`. + +Can also be installed using \`ext install prettier-vscode\`. + +[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) + +### Visual Studio + +Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). + +### Sublime Text + +Sublime Text support is available through Package Control and +the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. + +### JetBrains WebStorm, PHPStorm, PyCharm... + +See the [WebStorm +guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). + +## Language Support + +Prettier attempts to support all JavaScript language features, +including non-standardized ones. By default it uses the +[Babylon](https://github.com/babel/babylon) parser with all language +features enabled, but you can also use the +[Flow](https://github.com/facebook/flow) parser with the +\`parser\` API or \`--parser\` CLI [option](#options). + +All of JSX and Flow syntax is supported. In fact, the test suite in +\`tests/flow\` *is* the entire Flow test suite and they all pass. + +Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), [JSON](http://json.org/), and [GraphQL](http://graphql.org/). + +The minimum version of TypeScript supported is 2.1.3 as it introduces the ability to have leading \`|\` for type definitions which prettier outputs. + +## Related Projects + +- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) plugs Prettier into your ESLint workflow +- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) turns off all ESLint rules that are unnecessary or might conflict with Prettier +- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) +passes \`prettier\` output to \`eslint --fix\` +- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) +passes \`prettier\` output to \`stylelint --fix\` +- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) +uses \`prettier\` and \`prettier-eslint\` to format code with standard rules +- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) +passes \`prettier\` output to \`standard --fix\` +- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) +\`prettier\` with a few minor extra options +- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) allows you to use Prettier as a Neutrino preset +- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier as a server to avoid Node.js startup delay. It also supports configuration via \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. +- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet and exposes a REST API for Prettier that allows to format CodeMirror editor in your browser +- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code in GitHub comments +- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) allows you to use Prettier with Rollup +- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) allows you to use Prettier to format JS [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) in Markdown files via [Markdown Magic](https://github.com/DavidWells/markdown-magic) +- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) runs Prettier as a TSLint rule and reports differences as individual TSLint issues +- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) use TSLint with Prettier without any conflict + +## Technical Details + +This printer is a fork of +[recast](https://github.com/benjamn/recast)'s printer with its +algorithm replaced by the one described by Wadler in "[A prettier +printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". +There still may be leftover code from recast that needs to be cleaned +up. + +The basic idea is that the printer takes an AST and returns an +intermediate representation of the output, and the printer uses that +to generate a string. The advantage is that the printer can "measure" +the IR and see if the output is going to fit on a line, and break if +not. + +This means that most of the logic of printing an AST involves +generating an abstract representation of the output involving certain +commands. For example, \`concat(["(", line, arg, line ")"])\` would +represent a concatenation of opening parens, an argument, and closing +parens. But if that doesn't fit on one line, the printer can break +where \`line\` is specified. + +More (rough) details can be found in [commands.md](commands.md). + +## Badge + +Show the world you're using *Prettier* → [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) + +\`\`\`md +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) +\`\`\` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). + +=====================================output===================================== +# Prettier + +[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) +[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) +[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) + +Prettier is an opinionated code formatter with support for: + +- JavaScript, including + [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) +- [JSX](https://facebook.github.io/jsx/) +- [Flow](https://flow.org/) +- [TypeScript](https://www.typescriptlang.org/) +- CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) +- [JSON](http://json.org/) +- [GraphQL](http://graphql.org/) + +It removes all original styling[\\*](#styling-footnote) and ensures that all +outputted code conforms to a consistent style. (See this +[blog post](http://jlongster.com/A-Prettier-Formatter)) + +<details> +<summary><strong>Table of Contents</strong></summary> + +<!-- Do not edit TOC, regenerate with \`yarn toc\` --> + +<!-- toc --> + +- [What does Prettier do?](#what-does-prettier-do) +- [Why Prettier?](#why-prettier) + - [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) + - [Helping Newcomers](#helping-newcomers) + - [Writing code](#writing-code) + - [Easy to adopt](#easy-to-adopt) + - [Clean up an existing codebase](#clean-up-an-existing-codebase) + - [Ride the hype train](#ride-the-hype-train) +- [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) +- [Usage](#usage) + - [CLI](#cli) + - [ESLint](#eslint) + - [Pre-commit Hook](#pre-commit-hook) + - [API](#api) + - [Excluding code from formatting](#excluding-code-from-formatting) +- [Options](#options) + - [Print Width](#print-width) + - [Tab Width](#tab-width) + - [Tabs](#tabs) + - [Semicolons](#semicolons) + - [Quotes](#quotes) + - [Trailing Commas](#trailing-commas) + - [Bracket Spacing](#bracket-spacing) + - [JSX Brackets](#jsx-brackets) + - [Range](#range) + - [Parser](#parser) + - [Filepath](#filepath) +- [Configuration File](#configuration-file) + - [Basic Configuration](#basic-configuration) + - [Configuration Overrides](#configuration-overrides) + - [Configuration Schema](#configuration-schema) +- [Editor Integration](#editor-integration) + - [Atom](#atom) + - [Emacs](#emacs) + - [Vim](#vim) + - [Visual Studio Code](#visual-studio-code) + - [Visual Studio](#visual-studio) + - [Sublime Text](#sublime-text) + - [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) +- [Language Support](#language-support) +- [Related Projects](#related-projects) +- [Technical Details](#technical-details) +- [Badge](#badge) +- [Contributing](#contributing) + +<!-- tocstop --> + +</details> + +--- + +## What does Prettier do? + +Prettier takes your code and reprints it from scratch by taking the line length +into account. + +For example, take the following code: + +\`\`\`js +foo(arg1, arg2, arg3, arg4); +\`\`\` + +It fits in a single line so it's going to stay as is. However, we've all run +into this situation: + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +Suddenly our previous format for calling function breaks down because this is +too long. Prettier is going to do the painstaking work of reprinting it like +that for you: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne(), +); +\`\`\` + +Prettier enforces a consistent code **style** (i.e. code formatting that won't +affect the AST) across your entire codebase because it disregards the original +styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST +with its own rules that take the maximum line length into account, wrapping code +when necessary. + +<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some +original styling is preserved when practical—see [empty lines] and [multi-line +objects]._ + +[empty lines]: Rationale.md#empty-lines +[multi-line objects]: Rationale.md#multi-line-objects + +If you want to learn more, these two conference talks are great introductions: + +<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> +<a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> + +## Why Prettier? + +### Building and enforcing a style guide + +By far the biggest reason for adopting Prettier is to stop all the on-going +debates over styles. It is generally accepted that having a common style guide +is valuable for a project and team but getting there is a very painful and +unrewarding process. People get very emotional around particular ways of writing +code and nobody likes spending time writing and receiving nits. + +- “We want to free mental threads and end discussions around style. While + sometimes fruitful, these discussions are for the most part wasteful.” +- “Literally had an engineer go through a huge effort of cleaning up all of our + code because we were debating ternary style for the longest time and were + inconsistent about it. It was dumb, but it was a weird on-going "great debate" + that wasted lots of little back and forth bits. It's far easier for us all to + agree now: just run Prettier, and go with that style.” +- “Getting tired telling people how to style their product code.” +- “Our top reason was to stop wasting our time debating style nits.” +- “Having a githook set up has reduced the amount of style issues in PRs that + result in broken builds due to ESLint rules or things I have to nit-pick or + clean up later.” +- “I don't want anybody to nitpick any other person ever again.” +- “It reminds me of how Steve Jobs used to wear the same clothes every day + because he has a million decisions to make and he didn't want to be bothered + to make trivial ones like picking out clothes. I think Prettier is like that.” + +### Helping Newcomers + +Prettier is usually introduced by people with experience in the current codebase +and JavaScript but the people that disproportionally benefit from it are +newcomers to the codebase. One may think that it's only useful for people with +very limited programming experience, but we've seen it quicken the ramp up time +from experienced engineers joining the company, as they likely used a different +coding style before, and developers coming from a different programming +language. + +- “My motivations for using Prettier are: appearing that I know how to write + JavaScript well.” +- “I always put spaces in the wrong place, now I don't have to worry about it + anymore.” +- “When you're a beginner you're making a lot of mistakes caused by the syntax. + Thanks to Prettier, you can reduce these mistakes and save a lot of time to + focus on what really matters.” +- “As a teacher, I will also tell to my students to install Prettier to help + them to learn the JS syntax and have readable files.” + +### Writing code + +What usually happens once people are using Prettier is that they realize that +they actually spend a lot of time and mental energy formatting their code. With +Prettier editor integration, you can just press that magic key binding and poof, +the code is formatted. This is an eye opening experience if anything else. + +- “I want to write code. Not spend cycles on formatting.” +- “It removed 5% that sucks in our daily life - aka formatting” +- “We're in 2017 and it's still painful to break a call into multiple lines when + you happen to add an argument that makes it go over the 80 columns limit :(“ + +### Easy to adopt + +We've worked very hard to use the least controversial coding styles, went +through many rounds of fixing all the edge cases and polished the getting +started experience. When you're ready to push Prettier into your codebase, not +only should it be painless for you to do it technically but the newly formatted +codebase should not generate major controversy and be accepted painlessly by +your co-workers. + +- “It's low overhead. We were able to throw Prettier at very different kinds of + repos without much work.” +- “It's been mostly bug free. Had there been major styling issues during the + course of implementation we would have been wary about throwing this at our JS + codebase. I'm happy to say that's not the case.” +- “Everyone runs it as part of their pre commit scripts, a couple of us use the + editor on save extensions as well.” +- “It's fast, against one of our larger JS codebases we were able to run + Prettier in under 13 seconds.” +- “The biggest benefit for Prettier for us was being able to format the entire + code base at once.” + +### Clean up an existing codebase + +Since coming up with a coding style and enforcing it is a big undertaking, it +often slips through the cracks and you are left working on inconsistent +codebases. Running Prettier in this case is a quick win, the codebase is now +uniform and easier to read without spending hardly any time. + +- “Take a look at the code :) I just need to restore sanity.” +- “We inherited a ~2000 module ES6 code base, developed by 20 different + developers over 18 months, in a global team. Felt like such a win without much + research.” + +### Ride the hype train + +Purely technical aspects of the projects aren't the only thing people look into +when choosing to adopt Prettier. Who built and uses it and how quickly it +spreads through the community has a non-trivial impact. + +- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted + by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” +- “Was built by the same people as React & React Native.” +- “I like to be part of the hot new things.” +- “Because soon enough people are gonna ask for it.” + +A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) +using Prettier: + +<table> +<tr> +<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> +<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> +<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> +</tr> +<tr> +<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> +<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> +<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> +</tr> +</table> + +## How does it compare to ESLint (or TSLint, stylelint...)? + +Linters have two categories of rules: + +**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), +[no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), +[keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), +[comma-style](http://eslint.org/docs/rules/comma-style)... + +Prettier alleviates the need for this whole category of rules! Prettier is going +to reprint the entire program from scratch in a consistent way, so it's not +possible for the programmer to make a mistake there anymore :) + +**Code-quality rules**: eg +[no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), +[no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), +[no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), +[prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... + +Prettier does nothing to help with those kind of rules. They are also the most +important ones provided by linters as they are likely to catch real bugs with +your code! + +## Usage + +Install: + +\`\`\` +yarn add prettier --dev --exact +\`\`\` + +You can install it globally if you like: + +\`\`\` +yarn global add prettier +\`\`\` + +_We're using \`yarn\` but you can use \`npm\` if you like:_ + +\`\`\` +npm install --save-dev --save-exact prettier +# or globally +npm install --global prettier +\`\`\` + +> We recommend pinning an exact version of prettier in your \`package.json\` as we +> introduce stylistic changes in patch releases. + +### CLI + +Run Prettier through the CLI with this script. Run it without any arguments to +see the [options](#options). + +To format a file in-place, use \`--write\`. You may want to consider committing +your code before doing that, just in case. + +\`\`\`bash +prettier [opts] [filename ...] +\`\`\` + +In practice, this may look something like: + +\`\`\`bash +prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" +\`\`\` + +Don't forget the quotes around the globs! The quotes make sure that Prettier +expands the globs rather than your shell, for cross-platform usage. The +[glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) +is used. + +#### \`--debug-check\` + +If you're worried that Prettier will change the correctness of your code, add +\`--debug-check\` to the command. This will cause Prettier to print an error +message if it detects that code correctness might have changed. Note that +\`--write\` cannot be used with \`--debug-check\`. + +#### \`--find-config-path\` and \`--config\` + +If you are repeatedly formatting individual files with \`prettier\`, you will +incur a small performance cost when prettier attempts to look up a +[configuration file](#configuration-file). In order to skip this, you may ask +prettier to find the config file once, and re-use it later on. + +\`\`\`bash +prettier --find-config-path ./my/file.js +./my/.prettierrc +\`\`\` + +This will provide you with a path to the configuration file, which you can pass +to \`--config\`: + +\`\`\`bash +prettier --config ./my/.prettierrc --write ./my/file.js +\`\`\` + +You can also use \`--config\` if your configuration file lives somewhere where +prettier cannot find it, such as a \`config/\` directory. + +If you don't have a configuration file, or want to ignore it if it does exist, +you can pass \`--no-config\` instead. + +#### \`--ignore-path\` + +Path to a file containing patterns that describe files to ignore. By default, +prettier looks for \`./.prettierignore\`. + +#### \`--require-pragma\` + +Require a special comment, called a pragma, to be present in the file's first +docblock comment in order for prettier to format it. + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +Valid pragmas are \`@prettier\` and \`@format\`. + +#### \`--list-different\` + +Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames +of files that are different from Prettier formatting. If there are differences +the script errors out, which is useful in a CI scenario. + +\`\`\`bash +prettier --single-quote --list-different "src/**/*.js" +\`\`\` + +#### \`--no-config\` + +Do not look for a configuration file. The default settings will be used. + +#### \`--config-precedence\` + +Defines how config file should be evaluated in combination of CLI options. + +**cli-override (default)** + +CLI options take precedence over config file + +**file-override** + +Config file take precedence over CLI options + +**prefer-file** + +If a config file is found will evaluate it and ignore other CLI options. If no +config file is found CLI options will evaluate as normal. + +This option adds support to editor integrations where users define their default +configuration but want to respect project specific configuration. + +#### \`--with-node-modules\` + +Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out +from this behavior use \`--with-node-modules\` flag. + +#### \`--write\` + +This rewrites all processed files in place. This is comparable to the +\`eslint --fix\` workflow. + +### ESLint + +If you are using ESLint, integrating Prettier to your workflow is +straightforward: + +Just add Prettier as an ESLint rule using +[eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). + +\`\`\`js +yarn add --dev prettier eslint-plugin-prettier + +// .eslintrc.json +{ + "plugins": [ + "prettier" + ], + "rules": { + "prettier/prettier": "error" + } +} +\`\`\` + +We also recommend that you use +[eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to +disable all the existing formatting rules. It's a one liner that can be added +on-top of any existing ESLint configuration. + +\`\`\` +$ yarn add --dev eslint-config-prettier +\`\`\` + +.eslintrc.json: + +\`\`\`json +{ + "extends": ["prettier"] +} +\`\`\` + +### Pre-commit Hook + +You can use Prettier with a pre-commit tool. This can re-format your files that +are marked as "staged" via \`git add\` before you commit. + +##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) + +Install it along with [husky](https://github.com/typicode/husky): + +\`\`\`bash +yarn add lint-staged husky --dev +\`\`\` + +and add this config to your \`package.json\`: + +\`\`\`json +{ + "scripts": { + "precommit": "lint-staged" + }, + "lint-staged": { + "*.{js,json,css}": ["prettier --write", "git add"] + } +} +\`\`\` + +There is a limitation where if you stage specific lines this approach will stage +the whole file after regardless. See this +[issue](https://github.com/okonet/lint-staged/issues/62) for more info. + +See https://github.com/okonet/lint-staged#configuration for more details about +how you can configure lint-staged. + +##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) + +Copy the following config into your \`.pre-commit-config.yaml\` file: + +\`\`\`yaml +- repo: https://github.com/prettier/prettier + sha: "" # Use the sha or tag you want to point at + hooks: + - id: prettier +\`\`\` + +Find more info from [here](https://pre-commit.com). + +##### Option 3. bash script + +Alternately you can save this script as \`.git/hooks/pre-commit\` and give it +execute permission: + +\`\`\`bash +#!/bin/sh +jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') +[ -z "$jsfiles" ] && exit 0 + +# Prettify all staged .js files +echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write + +# Add back the modified/prettified files to staging +echo "$jsfiles" | xargs git add + +exit 0 +\`\`\` + +### API + +\`\`\`js +const prettier = require("prettier"); +\`\`\` + +#### \`prettier.format(source [, options])\` + +\`format\` is used to format text using Prettier. [Options](#options) may be +provided to override the defaults. + +\`\`\`js +prettier.format("foo ( );", { semi: false }); +// -> "foo()" +\`\`\` + +#### \`prettier.check(source [, options])\` + +\`check\` checks to see if the file has been formatted with Prettier given those +options and returns a \`Boolean\`. This is similar to the \`--list-different\` +parameter in the CLI and is useful for running Prettier in CI scenarios. + +#### \`prettier.formatWithCursor(source [, options])\` + +\`formatWithCursor\` both formats the code, and translates a cursor position from +unformatted code to formatted code. This is useful for editor integrations, to +prevent the cursor from moving when code is formatted. + +The \`cursorOffset\` option should be provided, to specify where the cursor is. + +\`\`\`js +prettier.formatWithCursor(" 1", { cursorOffset: 2 }); +// -> { formatted: '1;\\n', cursorOffset: 1 } +\`\`\` + +#### \`prettier.resolveConfig([filePath [, options]])\` + +\`resolveConfig\` can be used to resolve configuration for a given source file. +The function optionally accepts an input file path as an argument, which +defaults to the current working directory. A promise is returned which will +resolve to: + +- An options object, providing a [config file](#configuration-file) was found. +- \`null\`, if no file was found. + +The promise will be rejected if there was an error parsing the configuration +file. + +If \`options.useCache\` is \`false\`, all caching will be bypassed. + +\`\`\`js +const text = fs.readFileSync(filePath, "utf8"); +prettier.resolveConfig(filePath).then((options) => { + const formatted = prettier.format(text, options); +}); +\`\`\` + +Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use +sync version. + +#### \`prettier.clearConfigCache()\` + +As you repeatedly call \`resolveConfig\`, the file system structure will be cached +for performance. This function will clear the cache. Generally this is only +needed for editor integrations that know that the file system has changed since +the last format took place. + +#### Custom Parser API + +If you need to make modifications to the AST (such as codemods), or you want to +provide an alternate parser, you can do so by setting the \`parser\` option to a +function. The function signature of the parser function is: + +\`\`\`js +(text: string, parsers: object, options: object) => AST; +\`\`\` + +Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. + +\`\`\`js +prettier.format("lodash ( )", { + parser(text, { babylon }) { + const ast = babylon(text); + ast.program.body[0].expression.callee.name = "_"; + return ast; + }, +}); +// -> "_();\\n" +\`\`\` + +The \`--parser\` CLI option may be a path to a node.js module exporting a parse +function. + +### Excluding code from formatting + +A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the +abstract syntax tree from formatting. + +For example: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +will be transformed to: + +\`\`\`js +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); + +// prettier-ignore +matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +) +\`\`\` + +## Options + +Prettier ships with a handful of customizable format options, usable in both the +CLI and API. + +### Print Width + +Specify the line length that the printer will wrap on. + +> **For readability we recommend against using more than 80 characters:** +> +> In code styleguides, maximum line length rules are often set to 100 or 120. +> However, when humans write code, they don't strive to reach the maximum number +> of columns on every line. Developers often use whitespace to break up long +> lines for readability. In practice, the average line length often ends up well +> below the maximum. +> +> Prettier, on the other hand, strives to fit the most code into every line. +> With the print width set to 120, prettier may produce overly compact, or +> otherwise undesirable code. + +| Default | CLI Override | API Override | +| ------- | --------------------- | ------------------- | +| \`80\` | \`--print-width <int>\` | \`printWidth: <int>\` | + +### Tab Width + +Specify the number of spaces per indentation-level. + +| Default | CLI Override | API Override | +| ------- | ------------------- | ----------------- | +| \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` | + +### Tabs + +Indent lines with tabs instead of spaces + +| Default | CLI Override | API Override | +| ------- | ------------ | ----------------- | +| \`false\` | \`--use-tabs\` | \`useTabs: <bool>\` | + +### Semicolons + +Print semicolons at the ends of statements. + +Valid options: + +- \`true\` - Add a semicolon at the end of every statement. +- \`false\` - Only add semicolons at the beginning of lines that may introduce ASI + failures. + +| Default | CLI Override | API Override | +| ------- | ------------ | -------------- | +| \`true\` | \`--no-semi\` | \`semi: <bool>\` | + +### Quotes + +Use single quotes instead of double quotes. + +Notes: + +- Quotes in JSX will always be double and ignore this setting. +- If the number of quotes outweighs the other quote, the quote which is less + used will be used to format the string - Example: \`"I'm double quoted"\` + results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` + results in \`'This "example" is single quoted'\`. + +| Default | CLI Override | API Override | +| ------- | ---------------- | --------------------- | +| \`false\` | \`--single-quote\` | \`singleQuote: <bool>\` | + +### Trailing Commas + +Print trailing commas wherever possible when multi-line. (A single-line array, +for example, never gets trailing commas.) + +Valid options: + +- \`"none"\` - No trailing commas. +- \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) +- \`"all"\` - Trailing commas wherever possible (including function arguments). + This requires node 8 or a + [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). + +| Default | CLI Override | API Override | +| -------- | ------------------------------------------------------ | ------------------------------------------------------ | +| \`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> | + +### Bracket Spacing + +Print spaces between brackets in object literals. + +Valid options: + +- \`true\` - Example: \`{ foo: bar }\`. +- \`false\` - Example: \`{foo: bar}\`. + +| Default | CLI Override | API Override | +| ------- | ---------------------- | ------------------------ | +| \`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` | + +### JSX Brackets + +Put the \`>\` of a multi-line JSX element at the end of the last line instead of +being alone on the next line (does not apply to self closing elements). + +| Default | CLI Override | API Override | +| ------- | ------------------------- | ---------------------------- | +| \`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` | + +### Range + +Format only a segment of a file. + +These two options can be used to format code starting and ending at a given +character offset (inclusive and exclusive, respectively). The range will extend: + +- Backwards to the start of the first line containing the selected statement. +- Forwards to the end of the selected statement. + +| Default | CLI Override | API Override | +| ---------- | --------------------- | ------------------- | +| \`0\` | \`--range-start <int>\` | \`rangeStart: <int>\` | +| \`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` | + +### Parser + +Specify which parser to use. + +Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript +features (including Flow). Prettier automatically infers the parser from the +input file path, so you shouldn't have to change this setting. + +Built-in parsers: + +- [\`babylon\`](https://github.com/babel/babylon/) +- [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) +- [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since + v1.4.0_ +- [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ +- [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) + _Since v1.5.0_ +- [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) + _Since v1.5.0_ + +[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ + +| Default | CLI Override | API Override | +| --------- | ----------------------------------------------- | ---------------------------------------------------------- | +| \`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` | + +### Filepath + +Specify the input filepath. This will be used to do parser inference. + +For example, the following will use \`postcss\` parser: + +\`\`\`bash +cat foo | prettier --stdin-filepath foo.css +\`\`\` + +| Default | CLI Override | API Override | +| ------- | --------------------------- | ---------------------- | +| None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` | + +### Require pragma + +Prettier can restrict itself to only format files that contain a special +comment, called a pragma, at the top of the file. This is very useful when +gradually transitioning large, unformatted codebases to prettier. + +For example, a file with the following as its first comment will be formatted +when \`--require-pragma\` is supplied: + +\`\`\`js +/** + * @prettier + */ +\`\`\` + +or + +\`\`\`js +/** + * @format + */ +\`\`\` + +| Default | CLI Override | API Override | +| ------- | ------------------ | ----------------------- | +| \`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` | + +## Configuration File + +Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for +configuration file support. This means you can configure prettier via: + +- A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: + \`.yaml/.yml/.json/.js\`. +- A \`prettier.config.js\` file that exports an object. +- A \`"prettier"\` key in your \`package.json\` file. + +The configuration file will be resolved starting from the location of the file +being formatted, and searching up the file tree until a config file is (or +isn't) found. + +The options to the configuration file are the same the [API options](#options). + +### Basic Configuration + +JSON: + +\`\`\`json +// .prettierrc +{ + "printWidth": 100, + "parser": "flow" +} +\`\`\` + +YAML: + +\`\`\`yaml +# .prettierrc +printWidth: 100 +parser: flow +\`\`\` + +### Configuration Overrides + +Prettier borrows eslint's +[override format](http://eslint.org/docs/user-guide/configuring#example-configuration). +This allows you to apply configuration to specific files. + +JSON: + +\`\`\`json +{ + "semi": false, + "overrides": [ + { + "files": "*.test.js", + "options": { + "semi": true + } + } + ] +} +\`\`\` + +YAML: + +\`\`\`yaml +semi: false +overrides: + - files: "*.test.js" + options: + semi: true +\`\`\` + +\`files\` is required for each override, and may be a string or array of strings. +\`excludeFiles\` may be optionally provided to exclude files for a given rule, and +may also be a string or array of strings. + +To get prettier to format its own \`.prettierrc\` file, you can do: + +\`\`\`json +{ + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] +} +\`\`\` + +For more information on how to use the CLI to locate a file, see the [CLI](#cli) +section. + +### Configuration Schema + +If you'd like a JSON schema to validate your configuration, one is available +here: https://json.schemastore.org/prettierrc. + +## Editor Integration + +### Atom + +Atom users can simply install the +[prettier-atom](https://github.com/prettier/prettier-atom) package and use +\`Ctrl+Alt+F\` to format a file (or format on save if enabled). + +### Emacs + +Emacs users should see +[this repository](https://github.com/prettier/prettier-emacs) for on-demand +formatting. + +### Vim + +Vim users can simply install either +[sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), +[w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or +[prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), +for more details see +[this directory](https://github.com/prettier/prettier/tree/master/editors/vim). + +### Visual Studio Code + +Can be installed using the extension sidebar. Search for +\`Prettier - JavaScript formatter\`. + +Can also be installed using \`ext install prettier-vscode\`. + +[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) + +### Visual Studio + +Install the +[JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). + +### Sublime Text + +Sublime Text support is available through Package Control and the +[JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. + +### JetBrains WebStorm, PHPStorm, PyCharm... + +See the +[WebStorm guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). + +## Language Support + +Prettier attempts to support all JavaScript language features, including +non-standardized ones. By default it uses the +[Babylon](https://github.com/babel/babylon) parser with all language features +enabled, but you can also use the [Flow](https://github.com/facebook/flow) +parser with the \`parser\` API or \`--parser\` CLI [option](#options). + +All of JSX and Flow syntax is supported. In fact, the test suite in \`tests/flow\` +_is_ the entire Flow test suite and they all pass. + +Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, +[Less](http://lesscss.org/), [SCSS](http://sass-lang.com), +[JSON](http://json.org/), and [GraphQL](http://graphql.org/). + +The minimum version of TypeScript supported is 2.1.3 as it introduces the +ability to have leading \`|\` for type definitions which prettier outputs. + +## Related Projects + +- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) + plugs Prettier into your ESLint workflow +- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) + turns off all ESLint rules that are unnecessary or might conflict with + Prettier +- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes + \`prettier\` output to \`eslint --fix\` +- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) + passes \`prettier\` output to \`stylelint --fix\` +- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses + \`prettier\` and \`prettier-eslint\` to format code with standard rules +- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) + passes \`prettier\` output to \`standard --fix\` +- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) + \`prettier\` with a few minor extra options +- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) + allows you to use Prettier as a Neutrino preset +- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier + as a server to avoid Node.js startup delay. It also supports configuration via + \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. +- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet + and exposes a REST API for Prettier that allows to format CodeMirror editor in + your browser +- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code + in GitHub comments +- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) + allows you to use Prettier with Rollup +- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) + allows you to use Prettier to format JS + [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) + in Markdown files via + [Markdown Magic](https://github.com/DavidWells/markdown-magic) +- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) + runs Prettier as a TSLint rule and reports differences as individual TSLint + issues +- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) + use TSLint with Prettier without any conflict + +## Technical Details + +This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer +with its algorithm replaced by the one described by Wadler in +"[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". +There still may be leftover code from recast that needs to be cleaned up. + +The basic idea is that the printer takes an AST and returns an intermediate +representation of the output, and the printer uses that to generate a string. +The advantage is that the printer can "measure" the IR and see if the output is +going to fit on a line, and break if not. + +This means that most of the logic of printing an AST involves generating an +abstract representation of the output involving certain commands. For example, +\`concat(["(", line, arg, line ")"])\` would represent a concatenation of opening +parens, an argument, and closing parens. But if that doesn't fit on one line, +the printer can break where \`line\` is specified. + +More (rough) details can be found in [commands.md](commands.md). + +## Badge + +Show the world you're using _Prettier_ → +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) + +\`\`\`md +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) +\`\`\` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md). + +================================================================================ +`; + +exports[`test-case.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" +singleQuote: true + | printWidth +=====================================input====================================== +[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) + +This is a paragraph. + + This is a paragraph. + + + +Header 1 +======== + +Header 2 +-------- + + Header 1 + ======== + + Header 2 + -------- + + + +# Header 1 +## Header 2 +### Header 3 +#### Header 4 +##### Header 5 +###### Header 6 + + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + + + +# Header 1 # +## Header 2 ## +### Header 3 ### +#### Header 4 #### +##### Header 5 ##### +###### Header 6 ###### + + # Header 1 # + ## Header 2 ## + ### Header 3 ### + #### Header 4 #### + ##### Header 5 ##### + ###### Header 6 ###### + + + +> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + + > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + + + +> ## This is a header. +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> Markdown.generate(); + + > ## This is a header. + > 1. This is the first list item. + > 2. This is the second list item. + > + > Here's some example code: + > + > Markdown.generate(); + + + + +- Red +- Green +- Blue + + ++ Red ++ Green ++ Blue + + +* Red +* Green +* Blue + + +\`\`\`markdown +- Red +- Green +- Blue + ++ Red ++ Green ++ Blue + +* Red +* Green +* Blue +\`\`\` + + + +1. Buy flour and salt +1. Mix together with water +1. Bake + +\`\`\`markdown +1. Buy flour and salt +1. Mix together with water +1. Bake +\`\`\` + + + +Paragraph: + + Code + +<!-- --> + + Paragraph: + + Code + + + +* * * + +*** + +***** + +- - - + +--------------------------------------- + + * * * + + *** + + ***** + + - - - + + --------------------------------------- + + + +This is [an example](http://example.com "Example") link. + +[This link](http://example.com) has no title attr. + +These is [an] [example] of two shortcut reference-style links. + +This is [an example][id] reference-style link. + +[id]: http://example.com "Optional Title" + + This is [an example](http://example.com "Example") link. + + [This link](http://example.com) has no title attr. + + These is [an] [example] of two shortcut reference-style links. + + This is [an example][id] reference-style link. + + [id]: http://example.com "Optional Title" + + + +*single asterisks* + +_single underscores_ + +**double asterisks** + +__double underscores__ + + *single asterisks* + + _single underscores_ + + **double asterisks** + + __double underscores__ + + + +This paragraph has some \`code\` in it. + + This paragraph has some \`code\` in it. + + + +![Alt Text](http://placehold.it/200x50 "Image Title") + + ![Alt Text](http://placehold.it/200x50 "Image Title") + +=====================================output===================================== +[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) + +This is a paragraph. + + This is a paragraph. + +# Header 1 + +## Header 2 + + Header 1 + ======== + + Header 2 + -------- + +# Header 1 + +## Header 2 + +### Header 3 + +#### Header 4 + +##### Header 5 + +###### Header 6 + + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + +# Header 1 + +## Header 2 + +### Header 3 + +#### Header 4 + +##### Header 5 + +###### Header 6 + + # Header 1 # + ## Header 2 ## + ### Header 3 ### + #### Header 4 #### + ##### Header 5 ##### + ###### Header 6 ###### + +> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi +> posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet +> vitae, risus. + + > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> Markdown.generate(); + + > ## This is a header. + > 1. This is the first list item. + > 2. This is the second list item. + > + > Here's some example code: + > + > Markdown.generate(); + +- Red +- Green +- Blue + +* Red +* Green +* Blue + +- Red +- Green +- Blue + +\`\`\`markdown +- Red +- Green +- Blue + +* Red +* Green +* Blue + +- Red +- Green +- Blue +\`\`\` + +1. Buy flour and salt +1. Mix together with water +1. Bake + +\`\`\`markdown +1. Buy flour and salt +1. Mix together with water +1. Bake +\`\`\` + +Paragraph: + + Code + +<!-- --> + + Paragraph: + + Code + +--- + +--- + +--- + +--- + +--- + + * * * + + *** + + ***** + + - - - + + --------------------------------------- + +This is [an example](http://example.com 'Example') link. + +[This link](http://example.com) has no title attr. + +These is [an] [example] of two shortcut reference-style links. + +This is [an example][id] reference-style link. + +[id]: http://example.com 'Optional Title' + + This is [an example](http://example.com "Example") link. + + [This link](http://example.com) has no title attr. + + These is [an] [example] of two shortcut reference-style links. + + This is [an example][id] reference-style link. + + [id]: http://example.com "Optional Title" + +_single asterisks_ + +_single underscores_ + +**double asterisks** + +**double underscores** + + *single asterisks* + + _single underscores_ + + **double asterisks** + + __double underscores__ + +This paragraph has some \`code\` in it. + + This paragraph has some \`code\` in it. + +![Alt Text](http://placehold.it/200x50 'Image Title') + + ![Alt Text](http://placehold.it/200x50 "Image Title") + +================================================================================ +`; + +exports[`test-case.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) + +This is a paragraph. + + This is a paragraph. + + + +Header 1 +======== + +Header 2 +-------- + + Header 1 + ======== + + Header 2 + -------- + + + +# Header 1 +## Header 2 +### Header 3 +#### Header 4 +##### Header 5 +###### Header 6 + + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + + + +# Header 1 # +## Header 2 ## +### Header 3 ### +#### Header 4 #### +##### Header 5 ##### +###### Header 6 ###### + + # Header 1 # + ## Header 2 ## + ### Header 3 ### + #### Header 4 #### + ##### Header 5 ##### + ###### Header 6 ###### + + + +> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + + > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + + + +> ## This is a header. +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> Markdown.generate(); + + > ## This is a header. + > 1. This is the first list item. + > 2. This is the second list item. + > + > Here's some example code: + > + > Markdown.generate(); + + + + +- Red +- Green +- Blue + + ++ Red ++ Green ++ Blue + + +* Red +* Green +* Blue + + +\`\`\`markdown +- Red +- Green +- Blue + ++ Red ++ Green ++ Blue + +* Red +* Green +* Blue +\`\`\` + + + +1. Buy flour and salt +1. Mix together with water +1. Bake + +\`\`\`markdown +1. Buy flour and salt +1. Mix together with water +1. Bake +\`\`\` + + + +Paragraph: + + Code + +<!-- --> + + Paragraph: + + Code + + + +* * * + +*** + +***** + +- - - + +--------------------------------------- + + * * * + + *** + + ***** + + - - - + + --------------------------------------- + + + +This is [an example](http://example.com "Example") link. + +[This link](http://example.com) has no title attr. + +These is [an] [example] of two shortcut reference-style links. + +This is [an example][id] reference-style link. + +[id]: http://example.com "Optional Title" + + This is [an example](http://example.com "Example") link. + + [This link](http://example.com) has no title attr. + + These is [an] [example] of two shortcut reference-style links. + + This is [an example][id] reference-style link. + + [id]: http://example.com "Optional Title" + + + +*single asterisks* + +_single underscores_ + +**double asterisks** + +__double underscores__ + + *single asterisks* + + _single underscores_ + + **double asterisks** + + __double underscores__ + + + +This paragraph has some \`code\` in it. + + This paragraph has some \`code\` in it. + + + +![Alt Text](http://placehold.it/200x50 "Image Title") + + ![Alt Text](http://placehold.it/200x50 "Image Title") + +=====================================output===================================== +[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) + +This is a paragraph. + + This is a paragraph. + +# Header 1 + +## Header 2 + + Header 1 + ======== + + Header 2 + -------- + +# Header 1 + +## Header 2 + +### Header 3 + +#### Header 4 + +##### Header 5 + +###### Header 6 + + # Header 1 + ## Header 2 + ### Header 3 + #### Header 4 + ##### Header 5 + ###### Header 6 + +# Header 1 + +## Header 2 + +### Header 3 + +#### Header 4 + +##### Header 5 + +###### Header 6 + + # Header 1 # + ## Header 2 ## + ### Header 3 ### + #### Header 4 #### + ##### Header 5 ##### + ###### Header 6 ###### + +> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi +> posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet +> vitae, risus. + + > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> Markdown.generate(); + + > ## This is a header. + > 1. This is the first list item. + > 2. This is the second list item. + > + > Here's some example code: + > + > Markdown.generate(); + +- Red +- Green +- Blue + +* Red +* Green +* Blue + +- Red +- Green +- Blue + +\`\`\`markdown +- Red +- Green +- Blue + +* Red +* Green +* Blue + +- Red +- Green +- Blue +\`\`\` + +1. Buy flour and salt +1. Mix together with water +1. Bake + +\`\`\`markdown +1. Buy flour and salt +1. Mix together with water +1. Bake +\`\`\` + +Paragraph: + + Code + +<!-- --> + + Paragraph: + + Code + +--- + +--- + +--- + +--- + +--- + + * * * + + *** + + ***** + + - - - + + --------------------------------------- + +This is [an example](http://example.com "Example") link. + +[This link](http://example.com) has no title attr. + +These is [an] [example] of two shortcut reference-style links. + +This is [an example][id] reference-style link. + +[id]: http://example.com "Optional Title" + + This is [an example](http://example.com "Example") link. + + [This link](http://example.com) has no title attr. + + These is [an] [example] of two shortcut reference-style links. + + This is [an example][id] reference-style link. + + [id]: http://example.com "Optional Title" + +_single asterisks_ + +_single underscores_ + +**double asterisks** + +**double underscores** + + *single asterisks* + + _single underscores_ + + **double asterisks** + + __double underscores__ + +This paragraph has some \`code\` in it. + + This paragraph has some \`code\` in it. + +![Alt Text](http://placehold.it/200x50 "Image Title") + + ![Alt Text](http://placehold.it/200x50 "Image Title") + +================================================================================ +`; diff --git a/tests/format/markdown/markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/markdown/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 14acdc5b7cfd..000000000000 --- a/tests/format/markdown/markdown/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4765 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`real-world-case.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -# Prettier - -[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) -[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) -[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) - -Prettier is an opinionated code formatter with support for: -* JavaScript, including [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) -* [JSX](https://facebook.github.io/jsx/) -* [Flow](https://flow.org/) -* [TypeScript](https://www.typescriptlang.org/) -* CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) -* [JSON](http://json.org/) -* [GraphQL](http://graphql.org/) - -It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code -conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -<details> -<summary><strong>Table of Contents</strong></summary> - -<!-- Do not edit TOC, regenerate with \`yarn toc\` --> - -<!-- toc --> - -* [What does Prettier do?](#what-does-prettier-do) -* [Why Prettier?](#why-prettier) - + [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) - + [Helping Newcomers](#helping-newcomers) - + [Writing code](#writing-code) - + [Easy to adopt](#easy-to-adopt) - + [Clean up an existing codebase](#clean-up-an-existing-codebase) - + [Ride the hype train](#ride-the-hype-train) -* [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) -* [Usage](#usage) - + [CLI](#cli) - + [ESLint](#eslint) - + [Pre-commit Hook](#pre-commit-hook) - + [API](#api) - + [Excluding code from formatting](#excluding-code-from-formatting) -* [Options](#options) - + [Print Width](#print-width) - + [Tab Width](#tab-width) - + [Tabs](#tabs) - + [Semicolons](#semicolons) - + [Quotes](#quotes) - + [Trailing Commas](#trailing-commas) - + [Bracket Spacing](#bracket-spacing) - + [JSX Brackets](#jsx-brackets) - + [Range](#range) - + [Parser](#parser) - + [Filepath](#filepath) -* [Configuration File](#configuration-file) - + [Basic Configuration](#basic-configuration) - + [Configuration Overrides](#configuration-overrides) - + [Configuration Schema](#configuration-schema) -* [Editor Integration](#editor-integration) - + [Atom](#atom) - + [Emacs](#emacs) - + [Vim](#vim) - + [Visual Studio Code](#visual-studio-code) - + [Visual Studio](#visual-studio) - + [Sublime Text](#sublime-text) - + [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) -* [Language Support](#language-support) -* [Related Projects](#related-projects) -* [Technical Details](#technical-details) -* [Badge](#badge) -* [Contributing](#contributing) - -<!-- tocstop --> - -</details> - --------------------------------------------------------------------------------- - -## What does Prettier do? - -Prettier takes your code and reprints it from scratch by taking the line length into account. - -For example, take the following code: - -\`\`\`js -foo(arg1, arg2, arg3, arg4); -\`\`\` - -It fits in a single line so it's going to stay as is. However, we've all run into this situation: - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -Suddenly our previous format for calling function breaks down because this is too long. Prettier is going to do the painstaking work of reprinting it like that for you: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -); -\`\`\` - -Prettier enforces a consistent code **style** (i.e. code formatting that won't affect the AST) across your entire codebase because it disregards the original styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length -into account, wrapping code when necessary. - -<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some -original styling is preserved when practical—see [empty lines] and [multi-line -objects]._ - -[empty lines]:Rationale.md#empty-lines -[multi-line objects]:Rationale.md#multi-line-objects - -If you want to learn more, these two conference talks are great introductions: - -<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> <a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> - - -## Why Prettier? - -### Building and enforcing a style guide - -By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. -- “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” -- “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” -- “Getting tired telling people how to style their product code.” -- “Our top reason was to stop wasting our time debating style nits.” -- “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” -- “I don't want anybody to nitpick any other person ever again.” -- “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” - -### Helping Newcomers - -Prettier is usually introduced by people with experience in the current codebase and JavaScript but the people that disproportionally benefit from it are newcomers to the codebase. One may think that it's only useful for people with very limited programming experience, but we've seen it quicken the ramp up time from experienced engineers joining the company, as they likely used a different coding style before, and developers coming from a different programming language. -- “My motivations for using Prettier are: appearing that I know how to write JavaScript well.” -- “I always put spaces in the wrong place, now I don't have to worry about it anymore.” -- “When you're a beginner you're making a lot of mistakes caused by the syntax. Thanks to Prettier, you can reduce these mistakes and save a lot of time to focus on what really matters.” -- “As a teacher, I will also tell to my students to install Prettier to help them to learn the JS syntax and have readable files.” - -### Writing code - -What usually happens once people are using Prettier is that they realize that they actually spend a lot of time and mental energy formatting their code. With Prettier editor integration, you can just press that magic key binding and poof, the code is formatted. This is an eye opening experience if anything else. -- “I want to write code. Not spend cycles on formatting.” -- “It removed 5% that sucks in our daily life - aka formatting” -- “We're in 2017 and it's still painful to break a call into multiple lines when you happen to add an argument that makes it go over the 80 columns limit :(“ - -### Easy to adopt - -We've worked very hard to use the least controversial coding styles, went through many rounds of fixing all the edge cases and polished the getting started experience. When you're ready to push Prettier into your codebase, not only should it be painless for you to do it technically but the newly formatted codebase should not generate major controversy and be accepted painlessly by your co-workers. -- “It's low overhead. We were able to throw Prettier at very different kinds of repos without much work.” -- “It's been mostly bug free. Had there been major styling issues during the course of implementation we would have been wary about throwing this at our JS codebase. I'm happy to say that's not the case.” -- “Everyone runs it as part of their pre commit scripts, a couple of us use the editor on save extensions as well.” -- “It's fast, against one of our larger JS codebases we were able to run Prettier in under 13 seconds.” -- “The biggest benefit for Prettier for us was being able to format the entire code base at once.” - -### Clean up an existing codebase - -Since coming up with a coding style and enforcing it is a big undertaking, it often slips through the cracks and you are left working on inconsistent codebases. Running Prettier in this case is a quick win, the codebase is now uniform and easier to read without spending hardly any time. -- “Take a look at the code :) I just need to restore sanity.” -- “We inherited a ~2000 module ES6 code base, developed by 20 different developers over 18 months, in a global team. Felt like such a win without much research.” - -### Ride the hype train - -Purely technical aspects of the projects aren't the only thing people look into when choosing to adopt Prettier. Who built and uses it and how quickly it spreads through the community has a non-trivial impact. -- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” -- “Was built by the same people as React & React Native.” -- “I like to be part of the hot new things.” -- “Because soon enough people are gonna ask for it.” - -A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) using Prettier: - -<table> -<tr> -<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> -<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> -<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> -</tr> -<tr> -<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> -<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> -<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> -</tr> -</table> - - -## How does it compare to ESLint (or TSLint, stylelint...)? - -Linters have two categories of rules: - -**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)... - -Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :) - -**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... - -Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code! - - -## Usage - -Install: - -\`\`\` -yarn add prettier --dev --exact -\`\`\` - -You can install it globally if you like: - -\`\`\` -yarn global add prettier -\`\`\` - -*We're using \`yarn\` but you can use \`npm\` if you like:* - -\`\`\` -npm install --save-dev --save-exact prettier -# or globally -npm install --global prettier -\`\`\` - -> We recommend pinning an exact version of prettier in your \`package.json\` -> as we introduce stylistic changes in patch releases. - -### CLI - -Run Prettier through the CLI with this script. Run it without any -arguments to see the [options](#options). - -To format a file in-place, use \`--write\`. You may want to consider -committing your code before doing that, just in case. - -\`\`\`bash -prettier [opts] [filename ...] -\`\`\` - -In practice, this may look something like: - -\`\`\`bash -prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" -\`\`\` - -Don't forget the quotes around the globs! The quotes make sure that Prettier -expands the globs rather than your shell, for cross-platform usage. -The [glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) -is used. - -#### \`--debug-check\` - -If you're worried that Prettier will change the correctness of your code, add \`--debug-check\` to the command. -This will cause Prettier to print an error message if it detects that code correctness might have changed. -Note that \`--write\` cannot be used with \`--debug-check\`. - -#### \`--find-config-path\` and \`--config\` - -If you are repeatedly formatting individual files with \`prettier\`, you will incur a small performance cost -when prettier attempts to look up a [configuration file](#configuration-file). In order to skip this, you may -ask prettier to find the config file once, and re-use it later on. - -\`\`\`bash -prettier --find-config-path ./my/file.js -./my/.prettierrc -\`\`\` - -This will provide you with a path to the configuration file, which you can pass to \`--config\`: - -\`\`\`bash -prettier --config ./my/.prettierrc --write ./my/file.js -\`\`\` - -You can also use \`--config\` if your configuration file lives somewhere where prettier cannot find it, -such as a \`config/\` directory. - -If you don't have a configuration file, or want to ignore it if it does exist, -you can pass \`--no-config\` instead. - -#### \`--ignore-path\` - -Path to a file containing patterns that describe files to ignore. By default, prettier looks for \`./.prettierignore\`. - -#### \`--require-pragma\` - -Require a special comment, called a pragma, to be present in the file's first docblock comment in order for prettier to format it. -\`\`\`js -/** - * @prettier - */ -\`\`\` - -Valid pragmas are \`@prettier\` and \`@format\`. - -#### \`--list-different\` - -Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. - -\`\`\`bash -prettier --single-quote --list-different "src/**/*.js" -\`\`\` - -#### \`--no-config\` - -Do not look for a configuration file. The default settings will be used. - -#### \`--config-precedence\` - -Defines how config file should be evaluated in combination of CLI options. - -**cli-override (default)** - -CLI options take precedence over config file - -**file-override** - -Config file take precedence over CLI options - -**prefer-file** - -If a config file is found will evaluate it and ignore other CLI options. If no config file is found CLI options will evaluate as normal. - -This option adds support to editor integrations where users define their default configuration but want to respect project specific configuration. - -#### \`--with-node-modules\` - -Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out from this behavior use \`--with-node-modules\` flag. - -#### \`--write\` - -This rewrites all processed files in place. This is comparable to the \`eslint --fix\` workflow. - -### ESLint - -If you are using ESLint, integrating Prettier to your workflow is straightforward: - -Just add Prettier as an ESLint rule using [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). - -\`\`\`js -yarn add --dev prettier eslint-plugin-prettier - -// .eslintrc.json -{ - "plugins": [ - "prettier" - ], - "rules": { - "prettier/prettier": "error" - } -} -\`\`\` - -We also recommend that you use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to disable all the existing formatting rules. It's a one liner that can be added on-top of any existing ESLint configuration. - -\`\`\` -$ yarn add --dev eslint-config-prettier -\`\`\` - -.eslintrc.json: - -\`\`\`json -{ - "extends": [ - "prettier" - ] -} -\`\`\` - - -### Pre-commit Hook - -You can use Prettier with a pre-commit tool. This can re-format your files that are marked as "staged" via \`git add\` before you commit. - -##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) - -Install it along with [husky](https://github.com/typicode/husky): - -\`\`\`bash -yarn add lint-staged husky --dev -\`\`\` - -and add this config to your \`package.json\`: - -\`\`\`json -{ - "scripts": { - "precommit": "lint-staged" - }, - "lint-staged": { - "*.{js,json,css}": [ - "prettier --write", - "git add" - ] - } -} -\`\`\` -There is a limitation where if you stage specific lines this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62) for more info. - -See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged. - - -##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) - -Copy the following config into your \`.pre-commit-config.yaml\` file: - -\`\`\`yaml - - - repo: https://github.com/prettier/prettier - sha: '' # Use the sha or tag you want to point at - hooks: - - id: prettier - -\`\`\` - -Find more info from [here](https://pre-commit.com). - -##### Option 3. bash script - -Alternately you can save this script as \`.git/hooks/pre-commit\` and give it execute permission: - -\`\`\`bash -#!/bin/sh -jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') -[ -z "$jsfiles" ] && exit 0 - -# Prettify all staged .js files -echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write - -# Add back the modified/prettified files to staging -echo "$jsfiles" | xargs git add - -exit 0 -\`\`\` - -### API - -\`\`\`js -const prettier = require("prettier"); -\`\`\` - -#### \`prettier.format(source [, options])\` - -\`format\` is used to format text using Prettier. [Options](#options) may be provided to override the defaults. - -\`\`\`js -prettier.format("foo ( );", { semi: false }); -// -> "foo()" -\`\`\` - -#### \`prettier.check(source [, options])\` - -\`check\` checks to see if the file has been formatted with Prettier given those options and returns a \`Boolean\`. -This is similar to the \`--list-different\` parameter in the CLI and is useful for running Prettier in CI scenarios. - -#### \`prettier.formatWithCursor(source [, options])\` - -\`formatWithCursor\` both formats the code, and translates a cursor position from unformatted code to formatted code. -This is useful for editor integrations, to prevent the cursor from moving when code is formatted. - -The \`cursorOffset\` option should be provided, to specify where the cursor is. This option cannot be used with \`rangeStart\` and \`rangeEnd\`. - -\`\`\`js -prettier.formatWithCursor(" 1", { cursorOffset: 2 }); -// -> { formatted: '1;\\n', cursorOffset: 1 } -\`\`\` - -#### \`prettier.resolveConfig([filePath [, options]])\` - -\`resolveConfig\` can be used to resolve configuration for a given source file. -The function optionally accepts an input file path as an argument, which defaults to the current working directory. -A promise is returned which will resolve to: -* An options object, providing a [config file](#configuration-file) was found. -* \`null\`, if no file was found. - -The promise will be rejected if there was an error parsing the configuration file. - -If \`options.useCache\` is \`false\`, all caching will be bypassed. - -\`\`\`js -const text = fs.readFileSync(filePath, "utf8"); -prettier.resolveConfig(filePath).then(options => { - const formatted = prettier.format(text, options); -}) -\`\`\` - -Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use sync version. - -#### \`prettier.clearConfigCache()\` - -As you repeatedly call \`resolveConfig\`, the file system structure will be cached for performance. -This function will clear the cache. Generally this is only needed for editor integrations that -know that the file system has changed since the last format took place. - -#### Custom Parser API - -If you need to make modifications to the AST (such as codemods), or you want to provide an alternate parser, you can do so by setting the \`parser\` option to a function. The function signature of the parser function is: -\`\`\`js -(text: string, parsers: object, options: object) => AST; -\`\`\` - -Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. - -\`\`\`js -prettier.format("lodash ( )", { - parser(text, { babylon }) { - const ast = babylon(text); - ast.program.body[0].expression.callee.name = "_"; - return ast; - } -}); -// -> "_();\\n" -\`\`\` - -The \`--parser\` CLI option may be a path to a node.js module exporting a parse function. - -### Excluding code from formatting - -A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the abstract syntax tree from formatting. - -For example: - -\`\`\`js -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -will be transformed to: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -## Options -Prettier ships with a handful of customizable format options, usable in both the CLI and API. - -### Print Width -Specify the line length that the printer will wrap on. - -> **For readability we recommend against using more than 80 characters:** -> ->In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don't strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. -> -> Prettier, on the other hand, strives to fit the most code into every line. With the print width set to 120, prettier may produce overly compact, or otherwise undesirable code. - -Default | CLI Override | API Override ---------|--------------|------------- -\`80\` | \`--print-width <int>\` | \`printWidth: <int>\` - -### Tab Width -Specify the number of spaces per indentation-level. - -Default | CLI Override | API Override ---------|--------------|------------- - \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` - -### Tabs -Indent lines with tabs instead of spaces - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--use-tabs\` | \`useTabs: <bool>\` - -### Semicolons -Print semicolons at the ends of statements. - -Valid options: - - * \`true\` - Add a semicolon at the end of every statement. - * \`false\` - Only add semicolons at the beginning of lines that may introduce ASI failures. - -Default | CLI Override | API Override ---------|--------------|------------- -\`true\` | \`--no-semi\` | \`semi: <bool>\` - -### Quotes -Use single quotes instead of double quotes. - -Notes: -* Quotes in JSX will always be double and ignore this setting. -* If the number of quotes outweighs the other quote, the quote which is less used will be used to format the string - Example: \`"I'm double quoted"\` results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` results in \`'This "example" is single quoted'\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--single-quote\` | \`singleQuote: <bool>\` - -### Trailing Commas -Print trailing commas wherever possible when multi-line. (A single-line array, -for example, never gets trailing commas.) - -Valid options: - * \`"none"\` - No trailing commas. - * \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) - * \`"all"\` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). - -Default | CLI Override | API Override ---------|--------------|------------- -\`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> - -### Bracket Spacing -Print spaces between brackets in object literals. - -Valid options: - * \`true\` - Example: \`{ foo: bar }\`. - * \`false\` - Example: \`{foo: bar}\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` - -### JSX Brackets -Put the \`>\` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` - -### Range -Format only a segment of a file. - -These two options can be used to format code starting and ending at a given character offset (inclusive and exclusive, respectively). The range will extend: -* Backwards to the start of the first line containing the selected statement. -* Forwards to the end of the selected statement. - -These options cannot be used with \`cursorOffset\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`0\` | \`--range-start <int>\`| \`rangeStart: <int>\` -\`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` - -### Parser -Specify which parser to use. - -Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript features (including Flow). Prettier automatically infers the parser from the input file path, so you shouldn't have to change this setting. - -Built-in parsers: - * [\`babylon\`](https://github.com/babel/babylon/) - * [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) - * [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since v1.4.0_ - * [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ - * [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) _Since v1.5.0_ - * [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ - -[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ - -Default | CLI Override | API Override ---------|--------------|------------- -\`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` - -### Filepath -Specify the input filepath. This will be used to do parser inference. - -For example, the following will use \`postcss\` parser: - -\`\`\`bash -cat foo | prettier --stdin-filepath foo.css -\`\`\` - -Default | CLI Override | API Override ---------|--------------|------------- -None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` - -### Require pragma -Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful -when gradually transitioning large, unformatted codebases to prettier. - -For example, a file with the following as its first comment will be formatted when \`--require-pragma\` is supplied: - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -or - -\`\`\`js -/** - * @format - */ -\`\`\` - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` - -## Configuration File - -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. -This means you can configure prettier via: - -* A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: \`.yaml/.yml/.json/.js\`. -* A \`prettier.config.js\` file that exports an object. -* A \`"prettier"\` key in your \`package.json\` file. - -The configuration file will be resolved starting from the location of the file being formatted, -and searching up the file tree until a config file is (or isn't) found. - -The options to the configuration file are the same the [API options](#options). - -### Basic Configuration - -JSON: - -\`\`\`json -// .prettierrc -{ - "printWidth": 100, - "parser": "flow" -} -\`\`\` - -YAML: - -\`\`\`yaml -# .prettierrc -printWidth: 100 -parser: flow -\`\`\` - -### Configuration Overrides - -Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). -This allows you to apply configuration to specific files. - -JSON: - -\`\`\`json -{ - "semi": false, - "overrides": [{ - "files": "*.test.js", - "options": { - "semi": true - } - }] -} -\`\`\` - -YAML: - -\`\`\`yaml -semi: false -overrides: -- files: "*.test.js" - options: - semi: true -\`\`\` - -\`files\` is required for each override, and may be a string or array of strings. -\`excludeFiles\` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. - -To get prettier to format its own \`.prettierrc\` file, you can do: - -\`\`\`json -{ - "overrides": [{ - "files": ".prettierrc", - "options": { "parser": "json" } - }] -} -\`\`\` - -For more information on how to use the CLI to locate a file, see the [CLI](#cli) section. - -### Configuration Schema - -If you'd like a JSON schema to validate your configuration, one is available here: http://json.schemastore.org/prettierrc. - -## Editor Integration - -### Atom - -Atom users can simply install the [prettier-atom](https://github.com/prettier/prettier-atom) package and use -\`Ctrl+Alt+F\` to format a file (or format on save if enabled). - -### Emacs - -Emacs users should see [this repository](https://github.com/prettier/prettier-emacs) -for on-demand formatting. - -### Vim - -Vim users can simply install either [sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), [w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or [prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), for more details see [this directory](https://github.com/prettier/prettier/tree/master/editors/vim). - -### Visual Studio Code - -Can be installed using the extension sidebar. Search for \`Prettier - JavaScript formatter\`. - -Can also be installed using \`ext install prettier-vscode\`. - -[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) - -### Visual Studio - -Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). - -### Sublime Text - -Sublime Text support is available through Package Control and -the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. - -### JetBrains WebStorm, PHPStorm, PyCharm... - -See the [WebStorm -guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). - -## Language Support - -Prettier attempts to support all JavaScript language features, -including non-standardized ones. By default it uses the -[Babylon](https://github.com/babel/babylon) parser with all language -features enabled, but you can also use the -[Flow](https://github.com/facebook/flow) parser with the -\`parser\` API or \`--parser\` CLI [option](#options). - -All of JSX and Flow syntax is supported. In fact, the test suite in -\`tests/flow\` *is* the entire Flow test suite and they all pass. - -Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), [JSON](http://json.org/), and [GraphQL](http://graphql.org/). - -The minimum version of TypeScript supported is 2.1.3 as it introduces the ability to have leading \`|\` for type definitions which prettier outputs. - -## Related Projects - -- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) plugs Prettier into your ESLint workflow -- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) turns off all ESLint rules that are unnecessary or might conflict with Prettier -- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) -passes \`prettier\` output to \`eslint --fix\` -- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) -passes \`prettier\` output to \`stylelint --fix\` -- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) -uses \`prettier\` and \`prettier-eslint\` to format code with standard rules -- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) -passes \`prettier\` output to \`standard --fix\` -- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) -\`prettier\` with a few minor extra options -- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) allows you to use Prettier as a Neutrino preset -- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier as a server to avoid Node.js startup delay. It also supports configuration via \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. -- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet and exposes a REST API for Prettier that allows to format CodeMirror editor in your browser -- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code in GitHub comments -- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) allows you to use Prettier with Rollup -- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) allows you to use Prettier to format JS [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) in Markdown files via [Markdown Magic](https://github.com/DavidWells/markdown-magic) -- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) runs Prettier as a TSLint rule and reports differences as individual TSLint issues -- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) use TSLint with Prettier without any conflict - -## Technical Details - -This printer is a fork of -[recast](https://github.com/benjamn/recast)'s printer with its -algorithm replaced by the one described by Wadler in "[A prettier -printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". -There still may be leftover code from recast that needs to be cleaned -up. - -The basic idea is that the printer takes an AST and returns an -intermediate representation of the output, and the printer uses that -to generate a string. The advantage is that the printer can "measure" -the IR and see if the output is going to fit on a line, and break if -not. - -This means that most of the logic of printing an AST involves -generating an abstract representation of the output involving certain -commands. For example, \`concat(["(", line, arg, line ")"])\` would -represent a concatenation of opening parens, an argument, and closing -parens. But if that doesn't fit on one line, the printer can break -where \`line\` is specified. - -More (rough) details can be found in [commands.md](commands.md). - -## Badge - -Show the world you're using *Prettier* → [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) - -\`\`\`md -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -\`\`\` - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md). - -=====================================output===================================== -# Prettier - -[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) -[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) -[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) - -Prettier is an opinionated code formatter with support for: - -- JavaScript, including - [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) -- [JSX](https://facebook.github.io/jsx/) -- [Flow](https://flow.org/) -- [TypeScript](https://www.typescriptlang.org/) -- CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) -- [JSON](http://json.org/) -- [GraphQL](http://graphql.org/) - -It removes all original styling[\\*](#styling-footnote) and ensures that all -outputted code conforms to a consistent style. (See this -[blog post](http://jlongster.com/A-Prettier-Formatter)) - -<details> -<summary><strong>Table of Contents</strong></summary> - -<!-- Do not edit TOC, regenerate with \`yarn toc\` --> - -<!-- toc --> - -- [What does Prettier do?](#what-does-prettier-do) -- [Why Prettier?](#why-prettier) - - [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) - - [Helping Newcomers](#helping-newcomers) - - [Writing code](#writing-code) - - [Easy to adopt](#easy-to-adopt) - - [Clean up an existing codebase](#clean-up-an-existing-codebase) - - [Ride the hype train](#ride-the-hype-train) -- [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) -- [Usage](#usage) - - [CLI](#cli) - - [ESLint](#eslint) - - [Pre-commit Hook](#pre-commit-hook) - - [API](#api) - - [Excluding code from formatting](#excluding-code-from-formatting) -- [Options](#options) - - [Print Width](#print-width) - - [Tab Width](#tab-width) - - [Tabs](#tabs) - - [Semicolons](#semicolons) - - [Quotes](#quotes) - - [Trailing Commas](#trailing-commas) - - [Bracket Spacing](#bracket-spacing) - - [JSX Brackets](#jsx-brackets) - - [Range](#range) - - [Parser](#parser) - - [Filepath](#filepath) -- [Configuration File](#configuration-file) - - [Basic Configuration](#basic-configuration) - - [Configuration Overrides](#configuration-overrides) - - [Configuration Schema](#configuration-schema) -- [Editor Integration](#editor-integration) - - [Atom](#atom) - - [Emacs](#emacs) - - [Vim](#vim) - - [Visual Studio Code](#visual-studio-code) - - [Visual Studio](#visual-studio) - - [Sublime Text](#sublime-text) - - [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) -- [Language Support](#language-support) -- [Related Projects](#related-projects) -- [Technical Details](#technical-details) -- [Badge](#badge) -- [Contributing](#contributing) - -<!-- tocstop --> - -</details> - ---- - -## What does Prettier do? - -Prettier takes your code and reprints it from scratch by taking the line length -into account. - -For example, take the following code: - -\`\`\`js -foo(arg1, arg2, arg3, arg4); -\`\`\` - -It fits in a single line so it's going to stay as is. However, we've all run -into this situation: - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -Suddenly our previous format for calling function breaks down because this is -too long. Prettier is going to do the painstaking work of reprinting it like -that for you: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -); -\`\`\` - -Prettier enforces a consistent code **style** (i.e. code formatting that won't -affect the AST) across your entire codebase because it disregards the original -styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST -with its own rules that take the maximum line length into account, wrapping code -when necessary. - -<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some -original styling is preserved when practical—see [empty lines] and [multi-line -objects]._ - -[empty lines]: Rationale.md#empty-lines -[multi-line objects]: Rationale.md#multi-line-objects - -If you want to learn more, these two conference talks are great introductions: - -<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> -<a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> - -## Why Prettier? - -### Building and enforcing a style guide - -By far the biggest reason for adopting Prettier is to stop all the on-going -debates over styles. It is generally accepted that having a common style guide -is valuable for a project and team but getting there is a very painful and -unrewarding process. People get very emotional around particular ways of writing -code and nobody likes spending time writing and receiving nits. - -- “We want to free mental threads and end discussions around style. While - sometimes fruitful, these discussions are for the most part wasteful.” -- “Literally had an engineer go through a huge effort of cleaning up all of our - code because we were debating ternary style for the longest time and were - inconsistent about it. It was dumb, but it was a weird on-going "great debate" - that wasted lots of little back and forth bits. It's far easier for us all to - agree now: just run Prettier, and go with that style.” -- “Getting tired telling people how to style their product code.” -- “Our top reason was to stop wasting our time debating style nits.” -- “Having a githook set up has reduced the amount of style issues in PRs that - result in broken builds due to ESLint rules or things I have to nit-pick or - clean up later.” -- “I don't want anybody to nitpick any other person ever again.” -- “It reminds me of how Steve Jobs used to wear the same clothes every day - because he has a million decisions to make and he didn't want to be bothered - to make trivial ones like picking out clothes. I think Prettier is like that.” - -### Helping Newcomers - -Prettier is usually introduced by people with experience in the current codebase -and JavaScript but the people that disproportionally benefit from it are -newcomers to the codebase. One may think that it's only useful for people with -very limited programming experience, but we've seen it quicken the ramp up time -from experienced engineers joining the company, as they likely used a different -coding style before, and developers coming from a different programming -language. - -- “My motivations for using Prettier are: appearing that I know how to write - JavaScript well.” -- “I always put spaces in the wrong place, now I don't have to worry about it - anymore.” -- “When you're a beginner you're making a lot of mistakes caused by the syntax. - Thanks to Prettier, you can reduce these mistakes and save a lot of time to - focus on what really matters.” -- “As a teacher, I will also tell to my students to install Prettier to help - them to learn the JS syntax and have readable files.” - -### Writing code - -What usually happens once people are using Prettier is that they realize that -they actually spend a lot of time and mental energy formatting their code. With -Prettier editor integration, you can just press that magic key binding and poof, -the code is formatted. This is an eye opening experience if anything else. - -- “I want to write code. Not spend cycles on formatting.” -- “It removed 5% that sucks in our daily life - aka formatting” -- “We're in 2017 and it's still painful to break a call into multiple lines when - you happen to add an argument that makes it go over the 80 columns limit :(“ - -### Easy to adopt - -We've worked very hard to use the least controversial coding styles, went -through many rounds of fixing all the edge cases and polished the getting -started experience. When you're ready to push Prettier into your codebase, not -only should it be painless for you to do it technically but the newly formatted -codebase should not generate major controversy and be accepted painlessly by -your co-workers. - -- “It's low overhead. We were able to throw Prettier at very different kinds of - repos without much work.” -- “It's been mostly bug free. Had there been major styling issues during the - course of implementation we would have been wary about throwing this at our JS - codebase. I'm happy to say that's not the case.” -- “Everyone runs it as part of their pre commit scripts, a couple of us use the - editor on save extensions as well.” -- “It's fast, against one of our larger JS codebases we were able to run - Prettier in under 13 seconds.” -- “The biggest benefit for Prettier for us was being able to format the entire - code base at once.” - -### Clean up an existing codebase - -Since coming up with a coding style and enforcing it is a big undertaking, it -often slips through the cracks and you are left working on inconsistent -codebases. Running Prettier in this case is a quick win, the codebase is now -uniform and easier to read without spending hardly any time. - -- “Take a look at the code :) I just need to restore sanity.” -- “We inherited a ~2000 module ES6 code base, developed by 20 different - developers over 18 months, in a global team. Felt like such a win without much - research.” - -### Ride the hype train - -Purely technical aspects of the projects aren't the only thing people look into -when choosing to adopt Prettier. Who built and uses it and how quickly it -spreads through the community has a non-trivial impact. - -- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted - by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” -- “Was built by the same people as React & React Native.” -- “I like to be part of the hot new things.” -- “Because soon enough people are gonna ask for it.” - -A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) -using Prettier: - -<table> -<tr> -<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> -<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> -<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> -</tr> -<tr> -<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> -<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> -<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> -</tr> -</table> - -## How does it compare to ESLint (or TSLint, stylelint...)? - -Linters have two categories of rules: - -**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), -[no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), -[keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), -[comma-style](http://eslint.org/docs/rules/comma-style)... - -Prettier alleviates the need for this whole category of rules! Prettier is going -to reprint the entire program from scratch in a consistent way, so it's not -possible for the programmer to make a mistake there anymore :) - -**Code-quality rules**: eg -[no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), -[no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), -[no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), -[prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... - -Prettier does nothing to help with those kind of rules. They are also the most -important ones provided by linters as they are likely to catch real bugs with -your code! - -## Usage - -Install: - -\`\`\` -yarn add prettier --dev --exact -\`\`\` - -You can install it globally if you like: - -\`\`\` -yarn global add prettier -\`\`\` - -_We're using \`yarn\` but you can use \`npm\` if you like:_ - -\`\`\` -npm install --save-dev --save-exact prettier -# or globally -npm install --global prettier -\`\`\` - -> We recommend pinning an exact version of prettier in your \`package.json\` as we -> introduce stylistic changes in patch releases. - -### CLI - -Run Prettier through the CLI with this script. Run it without any arguments to -see the [options](#options). - -To format a file in-place, use \`--write\`. You may want to consider committing -your code before doing that, just in case. - -\`\`\`bash -prettier [opts] [filename ...] -\`\`\` - -In practice, this may look something like: - -\`\`\`bash -prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" -\`\`\` - -Don't forget the quotes around the globs! The quotes make sure that Prettier -expands the globs rather than your shell, for cross-platform usage. The -[glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) -is used. - -#### \`--debug-check\` - -If you're worried that Prettier will change the correctness of your code, add -\`--debug-check\` to the command. This will cause Prettier to print an error -message if it detects that code correctness might have changed. Note that -\`--write\` cannot be used with \`--debug-check\`. - -#### \`--find-config-path\` and \`--config\` - -If you are repeatedly formatting individual files with \`prettier\`, you will -incur a small performance cost when prettier attempts to look up a -[configuration file](#configuration-file). In order to skip this, you may ask -prettier to find the config file once, and re-use it later on. - -\`\`\`bash -prettier --find-config-path ./my/file.js -./my/.prettierrc -\`\`\` - -This will provide you with a path to the configuration file, which you can pass -to \`--config\`: - -\`\`\`bash -prettier --config ./my/.prettierrc --write ./my/file.js -\`\`\` - -You can also use \`--config\` if your configuration file lives somewhere where -prettier cannot find it, such as a \`config/\` directory. - -If you don't have a configuration file, or want to ignore it if it does exist, -you can pass \`--no-config\` instead. - -#### \`--ignore-path\` - -Path to a file containing patterns that describe files to ignore. By default, -prettier looks for \`./.prettierignore\`. - -#### \`--require-pragma\` - -Require a special comment, called a pragma, to be present in the file's first -docblock comment in order for prettier to format it. - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -Valid pragmas are \`@prettier\` and \`@format\`. - -#### \`--list-different\` - -Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames -of files that are different from Prettier formatting. If there are differences -the script errors out, which is useful in a CI scenario. - -\`\`\`bash -prettier --single-quote --list-different "src/**/*.js" -\`\`\` - -#### \`--no-config\` - -Do not look for a configuration file. The default settings will be used. - -#### \`--config-precedence\` - -Defines how config file should be evaluated in combination of CLI options. - -**cli-override (default)** - -CLI options take precedence over config file - -**file-override** - -Config file take precedence over CLI options - -**prefer-file** - -If a config file is found will evaluate it and ignore other CLI options. If no -config file is found CLI options will evaluate as normal. - -This option adds support to editor integrations where users define their default -configuration but want to respect project specific configuration. - -#### \`--with-node-modules\` - -Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out -from this behavior use \`--with-node-modules\` flag. - -#### \`--write\` - -This rewrites all processed files in place. This is comparable to the -\`eslint --fix\` workflow. - -### ESLint - -If you are using ESLint, integrating Prettier to your workflow is -straightforward: - -Just add Prettier as an ESLint rule using -[eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). - -\`\`\`js -yarn add --dev prettier eslint-plugin-prettier - -// .eslintrc.json -{ - "plugins": [ - "prettier" - ], - "rules": { - "prettier/prettier": "error" - } -} -\`\`\` - -We also recommend that you use -[eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to -disable all the existing formatting rules. It's a one liner that can be added -on-top of any existing ESLint configuration. - -\`\`\` -$ yarn add --dev eslint-config-prettier -\`\`\` - -.eslintrc.json: - -\`\`\`json -{ - "extends": ["prettier"] -} -\`\`\` - -### Pre-commit Hook - -You can use Prettier with a pre-commit tool. This can re-format your files that -are marked as "staged" via \`git add\` before you commit. - -##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) - -Install it along with [husky](https://github.com/typicode/husky): - -\`\`\`bash -yarn add lint-staged husky --dev -\`\`\` - -and add this config to your \`package.json\`: - -\`\`\`json -{ - "scripts": { - "precommit": "lint-staged" - }, - "lint-staged": { - "*.{js,json,css}": ["prettier --write", "git add"] - } -} -\`\`\` - -There is a limitation where if you stage specific lines this approach will stage -the whole file after regardless. See this -[issue](https://github.com/okonet/lint-staged/issues/62) for more info. - -See https://github.com/okonet/lint-staged#configuration for more details about -how you can configure lint-staged. - -##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) - -Copy the following config into your \`.pre-commit-config.yaml\` file: - -\`\`\`yaml -- repo: https://github.com/prettier/prettier - sha: '' # Use the sha or tag you want to point at - hooks: - - id: prettier -\`\`\` - -Find more info from [here](https://pre-commit.com). - -##### Option 3. bash script - -Alternately you can save this script as \`.git/hooks/pre-commit\` and give it -execute permission: - -\`\`\`bash -#!/bin/sh -jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') -[ -z "$jsfiles" ] && exit 0 - -# Prettify all staged .js files -echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write - -# Add back the modified/prettified files to staging -echo "$jsfiles" | xargs git add - -exit 0 -\`\`\` - -### API - -\`\`\`js -const prettier = require('prettier'); -\`\`\` - -#### \`prettier.format(source [, options])\` - -\`format\` is used to format text using Prettier. [Options](#options) may be -provided to override the defaults. - -\`\`\`js -prettier.format('foo ( );', { semi: false }); -// -> "foo()" -\`\`\` - -#### \`prettier.check(source [, options])\` - -\`check\` checks to see if the file has been formatted with Prettier given those -options and returns a \`Boolean\`. This is similar to the \`--list-different\` -parameter in the CLI and is useful for running Prettier in CI scenarios. - -#### \`prettier.formatWithCursor(source [, options])\` - -\`formatWithCursor\` both formats the code, and translates a cursor position from -unformatted code to formatted code. This is useful for editor integrations, to -prevent the cursor from moving when code is formatted. - -The \`cursorOffset\` option should be provided, to specify where the cursor is. -This option cannot be used with \`rangeStart\` and \`rangeEnd\`. - -\`\`\`js -prettier.formatWithCursor(' 1', { cursorOffset: 2 }); -// -> { formatted: '1;\\n', cursorOffset: 1 } -\`\`\` - -#### \`prettier.resolveConfig([filePath [, options]])\` - -\`resolveConfig\` can be used to resolve configuration for a given source file. -The function optionally accepts an input file path as an argument, which -defaults to the current working directory. A promise is returned which will -resolve to: - -- An options object, providing a [config file](#configuration-file) was found. -- \`null\`, if no file was found. - -The promise will be rejected if there was an error parsing the configuration -file. - -If \`options.useCache\` is \`false\`, all caching will be bypassed. - -\`\`\`js -const text = fs.readFileSync(filePath, 'utf8'); -prettier.resolveConfig(filePath).then((options) => { - const formatted = prettier.format(text, options); -}); -\`\`\` - -Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use -sync version. - -#### \`prettier.clearConfigCache()\` - -As you repeatedly call \`resolveConfig\`, the file system structure will be cached -for performance. This function will clear the cache. Generally this is only -needed for editor integrations that know that the file system has changed since -the last format took place. - -#### Custom Parser API - -If you need to make modifications to the AST (such as codemods), or you want to -provide an alternate parser, you can do so by setting the \`parser\` option to a -function. The function signature of the parser function is: - -\`\`\`js -(text: string, parsers: object, options: object) => AST; -\`\`\` - -Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. - -\`\`\`js -prettier.format('lodash ( )', { - parser(text, { babylon }) { - const ast = babylon(text); - ast.program.body[0].expression.callee.name = '_'; - return ast; - }, -}); -// -> "_();\\n" -\`\`\` - -The \`--parser\` CLI option may be a path to a node.js module exporting a parse -function. - -### Excluding code from formatting - -A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the -abstract syntax tree from formatting. - -For example: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -will be transformed to: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -## Options - -Prettier ships with a handful of customizable format options, usable in both the -CLI and API. - -### Print Width - -Specify the line length that the printer will wrap on. - -> **For readability we recommend against using more than 80 characters:** -> -> In code styleguides, maximum line length rules are often set to 100 or 120. -> However, when humans write code, they don't strive to reach the maximum number -> of columns on every line. Developers often use whitespace to break up long -> lines for readability. In practice, the average line length often ends up well -> below the maximum. -> -> Prettier, on the other hand, strives to fit the most code into every line. -> With the print width set to 120, prettier may produce overly compact, or -> otherwise undesirable code. - -| Default | CLI Override | API Override | -| ------- | --------------------- | ------------------- | -| \`80\` | \`--print-width <int>\` | \`printWidth: <int>\` | - -### Tab Width - -Specify the number of spaces per indentation-level. - -| Default | CLI Override | API Override | -| ------- | ------------------- | ----------------- | -| \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` | - -### Tabs - -Indent lines with tabs instead of spaces - -| Default | CLI Override | API Override | -| ------- | ------------ | ----------------- | -| \`false\` | \`--use-tabs\` | \`useTabs: <bool>\` | - -### Semicolons - -Print semicolons at the ends of statements. - -Valid options: - -- \`true\` - Add a semicolon at the end of every statement. -- \`false\` - Only add semicolons at the beginning of lines that may introduce ASI - failures. - -| Default | CLI Override | API Override | -| ------- | ------------ | -------------- | -| \`true\` | \`--no-semi\` | \`semi: <bool>\` | - -### Quotes - -Use single quotes instead of double quotes. - -Notes: - -- Quotes in JSX will always be double and ignore this setting. -- If the number of quotes outweighs the other quote, the quote which is less - used will be used to format the string - Example: \`"I'm double quoted"\` - results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` - results in \`'This "example" is single quoted'\`. - -| Default | CLI Override | API Override | -| ------- | ---------------- | --------------------- | -| \`false\` | \`--single-quote\` | \`singleQuote: <bool>\` | - -### Trailing Commas - -Print trailing commas wherever possible when multi-line. (A single-line array, -for example, never gets trailing commas.) - -Valid options: - -- \`"none"\` - No trailing commas. -- \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) -- \`"all"\` - Trailing commas wherever possible (including function arguments). - This requires node 8 or a - [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). - -| Default | CLI Override | API Override | -| -------- | ------------------------------------------------------ | ------------------------------------------------------ | -| \`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> | - -### Bracket Spacing - -Print spaces between brackets in object literals. - -Valid options: - -- \`true\` - Example: \`{ foo: bar }\`. -- \`false\` - Example: \`{foo: bar}\`. - -| Default | CLI Override | API Override | -| ------- | ---------------------- | ------------------------ | -| \`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` | - -### JSX Brackets - -Put the \`>\` of a multi-line JSX element at the end of the last line instead of -being alone on the next line (does not apply to self closing elements). - -| Default | CLI Override | API Override | -| ------- | ------------------------- | ---------------------------- | -| \`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` | - -### Range - -Format only a segment of a file. - -These two options can be used to format code starting and ending at a given -character offset (inclusive and exclusive, respectively). The range will extend: - -- Backwards to the start of the first line containing the selected statement. -- Forwards to the end of the selected statement. - -These options cannot be used with \`cursorOffset\`. - -| Default | CLI Override | API Override | -| ---------- | --------------------- | ------------------- | -| \`0\` | \`--range-start <int>\` | \`rangeStart: <int>\` | -| \`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` | - -### Parser - -Specify which parser to use. - -Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript -features (including Flow). Prettier automatically infers the parser from the -input file path, so you shouldn't have to change this setting. - -Built-in parsers: - -- [\`babylon\`](https://github.com/babel/babylon/) -- [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) -- [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since - v1.4.0_ -- [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ -- [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) - _Since v1.5.0_ -- [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) - _Since v1.5.0_ - -[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ - -| Default | CLI Override | API Override | -| --------- | ----------------------------------------------- | ---------------------------------------------------------- | -| \`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` | - -### Filepath - -Specify the input filepath. This will be used to do parser inference. - -For example, the following will use \`postcss\` parser: - -\`\`\`bash -cat foo | prettier --stdin-filepath foo.css -\`\`\` - -| Default | CLI Override | API Override | -| ------- | --------------------------- | ---------------------- | -| None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` | - -### Require pragma - -Prettier can restrict itself to only format files that contain a special -comment, called a pragma, at the top of the file. This is very useful when -gradually transitioning large, unformatted codebases to prettier. - -For example, a file with the following as its first comment will be formatted -when \`--require-pragma\` is supplied: - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -or - -\`\`\`js -/** - * @format - */ -\`\`\` - -| Default | CLI Override | API Override | -| ------- | ------------------ | ----------------------- | -| \`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` | - -## Configuration File - -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for -configuration file support. This means you can configure prettier via: - -- A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: - \`.yaml/.yml/.json/.js\`. -- A \`prettier.config.js\` file that exports an object. -- A \`"prettier"\` key in your \`package.json\` file. - -The configuration file will be resolved starting from the location of the file -being formatted, and searching up the file tree until a config file is (or -isn't) found. - -The options to the configuration file are the same the [API options](#options). - -### Basic Configuration - -JSON: - -\`\`\`json -// .prettierrc -{ - "printWidth": 100, - "parser": "flow" -} -\`\`\` - -YAML: - -\`\`\`yaml -# .prettierrc -printWidth: 100 -parser: flow -\`\`\` - -### Configuration Overrides - -Prettier borrows eslint's -[override format](http://eslint.org/docs/user-guide/configuring#example-configuration). -This allows you to apply configuration to specific files. - -JSON: - -\`\`\`json -{ - "semi": false, - "overrides": [ - { - "files": "*.test.js", - "options": { - "semi": true - } - } - ] -} -\`\`\` - -YAML: - -\`\`\`yaml -semi: false -overrides: - - files: '*.test.js' - options: - semi: true -\`\`\` - -\`files\` is required for each override, and may be a string or array of strings. -\`excludeFiles\` may be optionally provided to exclude files for a given rule, and -may also be a string or array of strings. - -To get prettier to format its own \`.prettierrc\` file, you can do: - -\`\`\`json -{ - "overrides": [ - { - "files": ".prettierrc", - "options": { "parser": "json" } - } - ] -} -\`\`\` - -For more information on how to use the CLI to locate a file, see the [CLI](#cli) -section. - -### Configuration Schema - -If you'd like a JSON schema to validate your configuration, one is available -here: http://json.schemastore.org/prettierrc. - -## Editor Integration - -### Atom - -Atom users can simply install the -[prettier-atom](https://github.com/prettier/prettier-atom) package and use -\`Ctrl+Alt+F\` to format a file (or format on save if enabled). - -### Emacs - -Emacs users should see -[this repository](https://github.com/prettier/prettier-emacs) for on-demand -formatting. - -### Vim - -Vim users can simply install either -[sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), -[w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or -[prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), -for more details see -[this directory](https://github.com/prettier/prettier/tree/master/editors/vim). - -### Visual Studio Code - -Can be installed using the extension sidebar. Search for -\`Prettier - JavaScript formatter\`. - -Can also be installed using \`ext install prettier-vscode\`. - -[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) - -### Visual Studio - -Install the -[JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). - -### Sublime Text - -Sublime Text support is available through Package Control and the -[JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. - -### JetBrains WebStorm, PHPStorm, PyCharm... - -See the -[WebStorm guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). - -## Language Support - -Prettier attempts to support all JavaScript language features, including -non-standardized ones. By default it uses the -[Babylon](https://github.com/babel/babylon) parser with all language features -enabled, but you can also use the [Flow](https://github.com/facebook/flow) -parser with the \`parser\` API or \`--parser\` CLI [option](#options). - -All of JSX and Flow syntax is supported. In fact, the test suite in \`tests/flow\` -_is_ the entire Flow test suite and they all pass. - -Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, -[Less](http://lesscss.org/), [SCSS](http://sass-lang.com), -[JSON](http://json.org/), and [GraphQL](http://graphql.org/). - -The minimum version of TypeScript supported is 2.1.3 as it introduces the -ability to have leading \`|\` for type definitions which prettier outputs. - -## Related Projects - -- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) - plugs Prettier into your ESLint workflow -- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) - turns off all ESLint rules that are unnecessary or might conflict with - Prettier -- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes - \`prettier\` output to \`eslint --fix\` -- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) - passes \`prettier\` output to \`stylelint --fix\` -- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses - \`prettier\` and \`prettier-eslint\` to format code with standard rules -- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) - passes \`prettier\` output to \`standard --fix\` -- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) - \`prettier\` with a few minor extra options -- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) - allows you to use Prettier as a Neutrino preset -- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier - as a server to avoid Node.js startup delay. It also supports configuration via - \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. -- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet - and exposes a REST API for Prettier that allows to format CodeMirror editor in - your browser -- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code - in GitHub comments -- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) - allows you to use Prettier with Rollup -- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) - allows you to use Prettier to format JS - [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) - in Markdown files via - [Markdown Magic](https://github.com/DavidWells/markdown-magic) -- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) - runs Prettier as a TSLint rule and reports differences as individual TSLint - issues -- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) - use TSLint with Prettier without any conflict - -## Technical Details - -This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer -with its algorithm replaced by the one described by Wadler in -"[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". -There still may be leftover code from recast that needs to be cleaned up. - -The basic idea is that the printer takes an AST and returns an intermediate -representation of the output, and the printer uses that to generate a string. -The advantage is that the printer can "measure" the IR and see if the output is -going to fit on a line, and break if not. - -This means that most of the logic of printing an AST involves generating an -abstract representation of the output involving certain commands. For example, -\`concat(["(", line, arg, line ")"])\` would represent a concatenation of opening -parens, an argument, and closing parens. But if that doesn't fit on one line, -the printer can break where \`line\` is specified. - -More (rough) details can be found in [commands.md](commands.md). - -## Badge - -Show the world you're using _Prettier_ → -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) - -\`\`\`md -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -\`\`\` - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md). - -================================================================================ -`; - -exports[`real-world-case.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# Prettier - -[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) -[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) -[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) - -Prettier is an opinionated code formatter with support for: -* JavaScript, including [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) -* [JSX](https://facebook.github.io/jsx/) -* [Flow](https://flow.org/) -* [TypeScript](https://www.typescriptlang.org/) -* CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) -* [JSON](http://json.org/) -* [GraphQL](http://graphql.org/) - -It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code -conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -<details> -<summary><strong>Table of Contents</strong></summary> - -<!-- Do not edit TOC, regenerate with \`yarn toc\` --> - -<!-- toc --> - -* [What does Prettier do?](#what-does-prettier-do) -* [Why Prettier?](#why-prettier) - + [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) - + [Helping Newcomers](#helping-newcomers) - + [Writing code](#writing-code) - + [Easy to adopt](#easy-to-adopt) - + [Clean up an existing codebase](#clean-up-an-existing-codebase) - + [Ride the hype train](#ride-the-hype-train) -* [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) -* [Usage](#usage) - + [CLI](#cli) - + [ESLint](#eslint) - + [Pre-commit Hook](#pre-commit-hook) - + [API](#api) - + [Excluding code from formatting](#excluding-code-from-formatting) -* [Options](#options) - + [Print Width](#print-width) - + [Tab Width](#tab-width) - + [Tabs](#tabs) - + [Semicolons](#semicolons) - + [Quotes](#quotes) - + [Trailing Commas](#trailing-commas) - + [Bracket Spacing](#bracket-spacing) - + [JSX Brackets](#jsx-brackets) - + [Range](#range) - + [Parser](#parser) - + [Filepath](#filepath) -* [Configuration File](#configuration-file) - + [Basic Configuration](#basic-configuration) - + [Configuration Overrides](#configuration-overrides) - + [Configuration Schema](#configuration-schema) -* [Editor Integration](#editor-integration) - + [Atom](#atom) - + [Emacs](#emacs) - + [Vim](#vim) - + [Visual Studio Code](#visual-studio-code) - + [Visual Studio](#visual-studio) - + [Sublime Text](#sublime-text) - + [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) -* [Language Support](#language-support) -* [Related Projects](#related-projects) -* [Technical Details](#technical-details) -* [Badge](#badge) -* [Contributing](#contributing) - -<!-- tocstop --> - -</details> - --------------------------------------------------------------------------------- - -## What does Prettier do? - -Prettier takes your code and reprints it from scratch by taking the line length into account. - -For example, take the following code: - -\`\`\`js -foo(arg1, arg2, arg3, arg4); -\`\`\` - -It fits in a single line so it's going to stay as is. However, we've all run into this situation: - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -Suddenly our previous format for calling function breaks down because this is too long. Prettier is going to do the painstaking work of reprinting it like that for you: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -); -\`\`\` - -Prettier enforces a consistent code **style** (i.e. code formatting that won't affect the AST) across your entire codebase because it disregards the original styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length -into account, wrapping code when necessary. - -<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some -original styling is preserved when practical—see [empty lines] and [multi-line -objects]._ - -[empty lines]:Rationale.md#empty-lines -[multi-line objects]:Rationale.md#multi-line-objects - -If you want to learn more, these two conference talks are great introductions: - -<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> <a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> - - -## Why Prettier? - -### Building and enforcing a style guide - -By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. -- “We want to free mental threads and end discussions around style. While sometimes fruitful, these discussions are for the most part wasteful.” -- “Literally had an engineer go through a huge effort of cleaning up all of our code because we were debating ternary style for the longest time and were inconsistent about it. It was dumb, but it was a weird on-going "great debate" that wasted lots of little back and forth bits. It's far easier for us all to agree now: just run Prettier, and go with that style.” -- “Getting tired telling people how to style their product code.” -- “Our top reason was to stop wasting our time debating style nits.” -- “Having a githook set up has reduced the amount of style issues in PRs that result in broken builds due to ESLint rules or things I have to nit-pick or clean up later.” -- “I don't want anybody to nitpick any other person ever again.” -- “It reminds me of how Steve Jobs used to wear the same clothes every day because he has a million decisions to make and he didn't want to be bothered to make trivial ones like picking out clothes. I think Prettier is like that.” - -### Helping Newcomers - -Prettier is usually introduced by people with experience in the current codebase and JavaScript but the people that disproportionally benefit from it are newcomers to the codebase. One may think that it's only useful for people with very limited programming experience, but we've seen it quicken the ramp up time from experienced engineers joining the company, as they likely used a different coding style before, and developers coming from a different programming language. -- “My motivations for using Prettier are: appearing that I know how to write JavaScript well.” -- “I always put spaces in the wrong place, now I don't have to worry about it anymore.” -- “When you're a beginner you're making a lot of mistakes caused by the syntax. Thanks to Prettier, you can reduce these mistakes and save a lot of time to focus on what really matters.” -- “As a teacher, I will also tell to my students to install Prettier to help them to learn the JS syntax and have readable files.” - -### Writing code - -What usually happens once people are using Prettier is that they realize that they actually spend a lot of time and mental energy formatting their code. With Prettier editor integration, you can just press that magic key binding and poof, the code is formatted. This is an eye opening experience if anything else. -- “I want to write code. Not spend cycles on formatting.” -- “It removed 5% that sucks in our daily life - aka formatting” -- “We're in 2017 and it's still painful to break a call into multiple lines when you happen to add an argument that makes it go over the 80 columns limit :(“ - -### Easy to adopt - -We've worked very hard to use the least controversial coding styles, went through many rounds of fixing all the edge cases and polished the getting started experience. When you're ready to push Prettier into your codebase, not only should it be painless for you to do it technically but the newly formatted codebase should not generate major controversy and be accepted painlessly by your co-workers. -- “It's low overhead. We were able to throw Prettier at very different kinds of repos without much work.” -- “It's been mostly bug free. Had there been major styling issues during the course of implementation we would have been wary about throwing this at our JS codebase. I'm happy to say that's not the case.” -- “Everyone runs it as part of their pre commit scripts, a couple of us use the editor on save extensions as well.” -- “It's fast, against one of our larger JS codebases we were able to run Prettier in under 13 seconds.” -- “The biggest benefit for Prettier for us was being able to format the entire code base at once.” - -### Clean up an existing codebase - -Since coming up with a coding style and enforcing it is a big undertaking, it often slips through the cracks and you are left working on inconsistent codebases. Running Prettier in this case is a quick win, the codebase is now uniform and easier to read without spending hardly any time. -- “Take a look at the code :) I just need to restore sanity.” -- “We inherited a ~2000 module ES6 code base, developed by 20 different developers over 18 months, in a global team. Felt like such a win without much research.” - -### Ride the hype train - -Purely technical aspects of the projects aren't the only thing people look into when choosing to adopt Prettier. Who built and uses it and how quickly it spreads through the community has a non-trivial impact. -- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” -- “Was built by the same people as React & React Native.” -- “I like to be part of the hot new things.” -- “Because soon enough people are gonna ask for it.” - -A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) using Prettier: - -<table> -<tr> -<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> -<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> -<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> -</tr> -<tr> -<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> -<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> -<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> -</tr> -</table> - - -## How does it compare to ESLint (or TSLint, stylelint...)? - -Linters have two categories of rules: - -**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)... - -Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :) - -**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... - -Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code! - - -## Usage - -Install: - -\`\`\` -yarn add prettier --dev --exact -\`\`\` - -You can install it globally if you like: - -\`\`\` -yarn global add prettier -\`\`\` - -*We're using \`yarn\` but you can use \`npm\` if you like:* - -\`\`\` -npm install --save-dev --save-exact prettier -# or globally -npm install --global prettier -\`\`\` - -> We recommend pinning an exact version of prettier in your \`package.json\` -> as we introduce stylistic changes in patch releases. - -### CLI - -Run Prettier through the CLI with this script. Run it without any -arguments to see the [options](#options). - -To format a file in-place, use \`--write\`. You may want to consider -committing your code before doing that, just in case. - -\`\`\`bash -prettier [opts] [filename ...] -\`\`\` - -In practice, this may look something like: - -\`\`\`bash -prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" -\`\`\` - -Don't forget the quotes around the globs! The quotes make sure that Prettier -expands the globs rather than your shell, for cross-platform usage. -The [glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) -is used. - -#### \`--debug-check\` - -If you're worried that Prettier will change the correctness of your code, add \`--debug-check\` to the command. -This will cause Prettier to print an error message if it detects that code correctness might have changed. -Note that \`--write\` cannot be used with \`--debug-check\`. - -#### \`--find-config-path\` and \`--config\` - -If you are repeatedly formatting individual files with \`prettier\`, you will incur a small performance cost -when prettier attempts to look up a [configuration file](#configuration-file). In order to skip this, you may -ask prettier to find the config file once, and re-use it later on. - -\`\`\`bash -prettier --find-config-path ./my/file.js -./my/.prettierrc -\`\`\` - -This will provide you with a path to the configuration file, which you can pass to \`--config\`: - -\`\`\`bash -prettier --config ./my/.prettierrc --write ./my/file.js -\`\`\` - -You can also use \`--config\` if your configuration file lives somewhere where prettier cannot find it, -such as a \`config/\` directory. - -If you don't have a configuration file, or want to ignore it if it does exist, -you can pass \`--no-config\` instead. - -#### \`--ignore-path\` - -Path to a file containing patterns that describe files to ignore. By default, prettier looks for \`./.prettierignore\`. - -#### \`--require-pragma\` - -Require a special comment, called a pragma, to be present in the file's first docblock comment in order for prettier to format it. -\`\`\`js -/** - * @prettier - */ -\`\`\` - -Valid pragmas are \`@prettier\` and \`@format\`. - -#### \`--list-different\` - -Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. - -\`\`\`bash -prettier --single-quote --list-different "src/**/*.js" -\`\`\` - -#### \`--no-config\` - -Do not look for a configuration file. The default settings will be used. - -#### \`--config-precedence\` - -Defines how config file should be evaluated in combination of CLI options. - -**cli-override (default)** - -CLI options take precedence over config file - -**file-override** - -Config file take precedence over CLI options - -**prefer-file** - -If a config file is found will evaluate it and ignore other CLI options. If no config file is found CLI options will evaluate as normal. - -This option adds support to editor integrations where users define their default configuration but want to respect project specific configuration. - -#### \`--with-node-modules\` - -Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out from this behavior use \`--with-node-modules\` flag. - -#### \`--write\` - -This rewrites all processed files in place. This is comparable to the \`eslint --fix\` workflow. - -### ESLint - -If you are using ESLint, integrating Prettier to your workflow is straightforward: - -Just add Prettier as an ESLint rule using [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). - -\`\`\`js -yarn add --dev prettier eslint-plugin-prettier - -// .eslintrc.json -{ - "plugins": [ - "prettier" - ], - "rules": { - "prettier/prettier": "error" - } -} -\`\`\` - -We also recommend that you use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to disable all the existing formatting rules. It's a one liner that can be added on-top of any existing ESLint configuration. - -\`\`\` -$ yarn add --dev eslint-config-prettier -\`\`\` - -.eslintrc.json: - -\`\`\`json -{ - "extends": [ - "prettier" - ] -} -\`\`\` - - -### Pre-commit Hook - -You can use Prettier with a pre-commit tool. This can re-format your files that are marked as "staged" via \`git add\` before you commit. - -##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) - -Install it along with [husky](https://github.com/typicode/husky): - -\`\`\`bash -yarn add lint-staged husky --dev -\`\`\` - -and add this config to your \`package.json\`: - -\`\`\`json -{ - "scripts": { - "precommit": "lint-staged" - }, - "lint-staged": { - "*.{js,json,css}": [ - "prettier --write", - "git add" - ] - } -} -\`\`\` -There is a limitation where if you stage specific lines this approach will stage the whole file after regardless. See this [issue](https://github.com/okonet/lint-staged/issues/62) for more info. - -See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged. - - -##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) - -Copy the following config into your \`.pre-commit-config.yaml\` file: - -\`\`\`yaml - - - repo: https://github.com/prettier/prettier - sha: '' # Use the sha or tag you want to point at - hooks: - - id: prettier - -\`\`\` - -Find more info from [here](https://pre-commit.com). - -##### Option 3. bash script - -Alternately you can save this script as \`.git/hooks/pre-commit\` and give it execute permission: - -\`\`\`bash -#!/bin/sh -jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') -[ -z "$jsfiles" ] && exit 0 - -# Prettify all staged .js files -echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write - -# Add back the modified/prettified files to staging -echo "$jsfiles" | xargs git add - -exit 0 -\`\`\` - -### API - -\`\`\`js -const prettier = require("prettier"); -\`\`\` - -#### \`prettier.format(source [, options])\` - -\`format\` is used to format text using Prettier. [Options](#options) may be provided to override the defaults. - -\`\`\`js -prettier.format("foo ( );", { semi: false }); -// -> "foo()" -\`\`\` - -#### \`prettier.check(source [, options])\` - -\`check\` checks to see if the file has been formatted with Prettier given those options and returns a \`Boolean\`. -This is similar to the \`--list-different\` parameter in the CLI and is useful for running Prettier in CI scenarios. - -#### \`prettier.formatWithCursor(source [, options])\` - -\`formatWithCursor\` both formats the code, and translates a cursor position from unformatted code to formatted code. -This is useful for editor integrations, to prevent the cursor from moving when code is formatted. - -The \`cursorOffset\` option should be provided, to specify where the cursor is. This option cannot be used with \`rangeStart\` and \`rangeEnd\`. - -\`\`\`js -prettier.formatWithCursor(" 1", { cursorOffset: 2 }); -// -> { formatted: '1;\\n', cursorOffset: 1 } -\`\`\` - -#### \`prettier.resolveConfig([filePath [, options]])\` - -\`resolveConfig\` can be used to resolve configuration for a given source file. -The function optionally accepts an input file path as an argument, which defaults to the current working directory. -A promise is returned which will resolve to: -* An options object, providing a [config file](#configuration-file) was found. -* \`null\`, if no file was found. - -The promise will be rejected if there was an error parsing the configuration file. - -If \`options.useCache\` is \`false\`, all caching will be bypassed. - -\`\`\`js -const text = fs.readFileSync(filePath, "utf8"); -prettier.resolveConfig(filePath).then(options => { - const formatted = prettier.format(text, options); -}) -\`\`\` - -Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use sync version. - -#### \`prettier.clearConfigCache()\` - -As you repeatedly call \`resolveConfig\`, the file system structure will be cached for performance. -This function will clear the cache. Generally this is only needed for editor integrations that -know that the file system has changed since the last format took place. - -#### Custom Parser API - -If you need to make modifications to the AST (such as codemods), or you want to provide an alternate parser, you can do so by setting the \`parser\` option to a function. The function signature of the parser function is: -\`\`\`js -(text: string, parsers: object, options: object) => AST; -\`\`\` - -Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. - -\`\`\`js -prettier.format("lodash ( )", { - parser(text, { babylon }) { - const ast = babylon(text); - ast.program.body[0].expression.callee.name = "_"; - return ast; - } -}); -// -> "_();\\n" -\`\`\` - -The \`--parser\` CLI option may be a path to a node.js module exporting a parse function. - -### Excluding code from formatting - -A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the abstract syntax tree from formatting. - -For example: - -\`\`\`js -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -will be transformed to: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -## Options -Prettier ships with a handful of customizable format options, usable in both the CLI and API. - -### Print Width -Specify the line length that the printer will wrap on. - -> **For readability we recommend against using more than 80 characters:** -> ->In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don't strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. -> -> Prettier, on the other hand, strives to fit the most code into every line. With the print width set to 120, prettier may produce overly compact, or otherwise undesirable code. - -Default | CLI Override | API Override ---------|--------------|------------- -\`80\` | \`--print-width <int>\` | \`printWidth: <int>\` - -### Tab Width -Specify the number of spaces per indentation-level. - -Default | CLI Override | API Override ---------|--------------|------------- - \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` - -### Tabs -Indent lines with tabs instead of spaces - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--use-tabs\` | \`useTabs: <bool>\` - -### Semicolons -Print semicolons at the ends of statements. - -Valid options: - - * \`true\` - Add a semicolon at the end of every statement. - * \`false\` - Only add semicolons at the beginning of lines that may introduce ASI failures. - -Default | CLI Override | API Override ---------|--------------|------------- -\`true\` | \`--no-semi\` | \`semi: <bool>\` - -### Quotes -Use single quotes instead of double quotes. - -Notes: -* Quotes in JSX will always be double and ignore this setting. -* If the number of quotes outweighs the other quote, the quote which is less used will be used to format the string - Example: \`"I'm double quoted"\` results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` results in \`'This "example" is single quoted'\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--single-quote\` | \`singleQuote: <bool>\` - -### Trailing Commas -Print trailing commas wherever possible when multi-line. (A single-line array, -for example, never gets trailing commas.) - -Valid options: - * \`"none"\` - No trailing commas. - * \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) - * \`"all"\` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). - -Default | CLI Override | API Override ---------|--------------|------------- -\`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> - -### Bracket Spacing -Print spaces between brackets in object literals. - -Valid options: - * \`true\` - Example: \`{ foo: bar }\`. - * \`false\` - Example: \`{foo: bar}\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` - -### JSX Brackets -Put the \`>\` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` - -### Range -Format only a segment of a file. - -These two options can be used to format code starting and ending at a given character offset (inclusive and exclusive, respectively). The range will extend: -* Backwards to the start of the first line containing the selected statement. -* Forwards to the end of the selected statement. - -These options cannot be used with \`cursorOffset\`. - -Default | CLI Override | API Override ---------|--------------|------------- -\`0\` | \`--range-start <int>\`| \`rangeStart: <int>\` -\`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` - -### Parser -Specify which parser to use. - -Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript features (including Flow). Prettier automatically infers the parser from the input file path, so you shouldn't have to change this setting. - -Built-in parsers: - * [\`babylon\`](https://github.com/babel/babylon/) - * [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) - * [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since v1.4.0_ - * [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ - * [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) _Since v1.5.0_ - * [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ - -[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ - -Default | CLI Override | API Override ---------|--------------|------------- -\`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` - -### Filepath -Specify the input filepath. This will be used to do parser inference. - -For example, the following will use \`postcss\` parser: - -\`\`\`bash -cat foo | prettier --stdin-filepath foo.css -\`\`\` - -Default | CLI Override | API Override ---------|--------------|------------- -None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` - -### Require pragma -Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful -when gradually transitioning large, unformatted codebases to prettier. - -For example, a file with the following as its first comment will be formatted when \`--require-pragma\` is supplied: - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -or - -\`\`\`js -/** - * @format - */ -\`\`\` - -Default | CLI Override | API Override ---------|--------------|------------- -\`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` - -## Configuration File - -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. -This means you can configure prettier via: - -* A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: \`.yaml/.yml/.json/.js\`. -* A \`prettier.config.js\` file that exports an object. -* A \`"prettier"\` key in your \`package.json\` file. - -The configuration file will be resolved starting from the location of the file being formatted, -and searching up the file tree until a config file is (or isn't) found. - -The options to the configuration file are the same the [API options](#options). - -### Basic Configuration - -JSON: - -\`\`\`json -// .prettierrc -{ - "printWidth": 100, - "parser": "flow" -} -\`\`\` - -YAML: - -\`\`\`yaml -# .prettierrc -printWidth: 100 -parser: flow -\`\`\` - -### Configuration Overrides - -Prettier borrows eslint's [override format](http://eslint.org/docs/user-guide/configuring#example-configuration). -This allows you to apply configuration to specific files. - -JSON: - -\`\`\`json -{ - "semi": false, - "overrides": [{ - "files": "*.test.js", - "options": { - "semi": true - } - }] -} -\`\`\` - -YAML: - -\`\`\`yaml -semi: false -overrides: -- files: "*.test.js" - options: - semi: true -\`\`\` - -\`files\` is required for each override, and may be a string or array of strings. -\`excludeFiles\` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. - -To get prettier to format its own \`.prettierrc\` file, you can do: - -\`\`\`json -{ - "overrides": [{ - "files": ".prettierrc", - "options": { "parser": "json" } - }] -} -\`\`\` - -For more information on how to use the CLI to locate a file, see the [CLI](#cli) section. - -### Configuration Schema - -If you'd like a JSON schema to validate your configuration, one is available here: http://json.schemastore.org/prettierrc. - -## Editor Integration - -### Atom - -Atom users can simply install the [prettier-atom](https://github.com/prettier/prettier-atom) package and use -\`Ctrl+Alt+F\` to format a file (or format on save if enabled). - -### Emacs - -Emacs users should see [this repository](https://github.com/prettier/prettier-emacs) -for on-demand formatting. - -### Vim - -Vim users can simply install either [sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), [w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or [prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), for more details see [this directory](https://github.com/prettier/prettier/tree/master/editors/vim). - -### Visual Studio Code - -Can be installed using the extension sidebar. Search for \`Prettier - JavaScript formatter\`. - -Can also be installed using \`ext install prettier-vscode\`. - -[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) - -### Visual Studio - -Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). - -### Sublime Text - -Sublime Text support is available through Package Control and -the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. - -### JetBrains WebStorm, PHPStorm, PyCharm... - -See the [WebStorm -guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). - -## Language Support - -Prettier attempts to support all JavaScript language features, -including non-standardized ones. By default it uses the -[Babylon](https://github.com/babel/babylon) parser with all language -features enabled, but you can also use the -[Flow](https://github.com/facebook/flow) parser with the -\`parser\` API or \`--parser\` CLI [option](#options). - -All of JSX and Flow syntax is supported. In fact, the test suite in -\`tests/flow\` *is* the entire Flow test suite and they all pass. - -Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), [JSON](http://json.org/), and [GraphQL](http://graphql.org/). - -The minimum version of TypeScript supported is 2.1.3 as it introduces the ability to have leading \`|\` for type definitions which prettier outputs. - -## Related Projects - -- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) plugs Prettier into your ESLint workflow -- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) turns off all ESLint rules that are unnecessary or might conflict with Prettier -- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) -passes \`prettier\` output to \`eslint --fix\` -- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) -passes \`prettier\` output to \`stylelint --fix\` -- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) -uses \`prettier\` and \`prettier-eslint\` to format code with standard rules -- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) -passes \`prettier\` output to \`standard --fix\` -- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) -\`prettier\` with a few minor extra options -- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) allows you to use Prettier as a Neutrino preset -- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier as a server to avoid Node.js startup delay. It also supports configuration via \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. -- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet and exposes a REST API for Prettier that allows to format CodeMirror editor in your browser -- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code in GitHub comments -- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) allows you to use Prettier with Rollup -- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) allows you to use Prettier to format JS [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) in Markdown files via [Markdown Magic](https://github.com/DavidWells/markdown-magic) -- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) runs Prettier as a TSLint rule and reports differences as individual TSLint issues -- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) use TSLint with Prettier without any conflict - -## Technical Details - -This printer is a fork of -[recast](https://github.com/benjamn/recast)'s printer with its -algorithm replaced by the one described by Wadler in "[A prettier -printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". -There still may be leftover code from recast that needs to be cleaned -up. - -The basic idea is that the printer takes an AST and returns an -intermediate representation of the output, and the printer uses that -to generate a string. The advantage is that the printer can "measure" -the IR and see if the output is going to fit on a line, and break if -not. - -This means that most of the logic of printing an AST involves -generating an abstract representation of the output involving certain -commands. For example, \`concat(["(", line, arg, line ")"])\` would -represent a concatenation of opening parens, an argument, and closing -parens. But if that doesn't fit on one line, the printer can break -where \`line\` is specified. - -More (rough) details can be found in [commands.md](commands.md). - -## Badge - -Show the world you're using *Prettier* → [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) - -\`\`\`md -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -\`\`\` - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md). - -=====================================output===================================== -# Prettier - -[![Build Status](https://travis-ci.org/prettier/prettier.svg?branch=master)](https://travis-ci.org/prettier/prettier) -[![Codecov](https://img.shields.io/codecov/c/github/prettier/prettier.svg)](https://codecov.io/gh/prettier/prettier) -[![NPM version](https://img.shields.io/npm/v/prettier.svg)](https://www.npmjs.com/package/prettier) -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge) - -Prettier is an opinionated code formatter with support for: - -- JavaScript, including - [ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md) -- [JSX](https://facebook.github.io/jsx/) -- [Flow](https://flow.org/) -- [TypeScript](https://www.typescriptlang.org/) -- CSS, [Less](http://lesscss.org/), and [SCSS](http://sass-lang.com) -- [JSON](http://json.org/) -- [GraphQL](http://graphql.org/) - -It removes all original styling[\\*](#styling-footnote) and ensures that all -outputted code conforms to a consistent style. (See this -[blog post](http://jlongster.com/A-Prettier-Formatter)) - -<details> -<summary><strong>Table of Contents</strong></summary> - -<!-- Do not edit TOC, regenerate with \`yarn toc\` --> - -<!-- toc --> - -- [What does Prettier do?](#what-does-prettier-do) -- [Why Prettier?](#why-prettier) - - [Building and enforcing a style guide](#building-and-enforcing-a-style-guide) - - [Helping Newcomers](#helping-newcomers) - - [Writing code](#writing-code) - - [Easy to adopt](#easy-to-adopt) - - [Clean up an existing codebase](#clean-up-an-existing-codebase) - - [Ride the hype train](#ride-the-hype-train) -- [How does it compare to ESLint (or TSLint, stylelint...)?](#how-does-it-compare-to-eslint-or-tslint-stylelint) -- [Usage](#usage) - - [CLI](#cli) - - [ESLint](#eslint) - - [Pre-commit Hook](#pre-commit-hook) - - [API](#api) - - [Excluding code from formatting](#excluding-code-from-formatting) -- [Options](#options) - - [Print Width](#print-width) - - [Tab Width](#tab-width) - - [Tabs](#tabs) - - [Semicolons](#semicolons) - - [Quotes](#quotes) - - [Trailing Commas](#trailing-commas) - - [Bracket Spacing](#bracket-spacing) - - [JSX Brackets](#jsx-brackets) - - [Range](#range) - - [Parser](#parser) - - [Filepath](#filepath) -- [Configuration File](#configuration-file) - - [Basic Configuration](#basic-configuration) - - [Configuration Overrides](#configuration-overrides) - - [Configuration Schema](#configuration-schema) -- [Editor Integration](#editor-integration) - - [Atom](#atom) - - [Emacs](#emacs) - - [Vim](#vim) - - [Visual Studio Code](#visual-studio-code) - - [Visual Studio](#visual-studio) - - [Sublime Text](#sublime-text) - - [JetBrains WebStorm, PHPStorm, PyCharm...](#jetbrains-webstorm-phpstorm-pycharm) -- [Language Support](#language-support) -- [Related Projects](#related-projects) -- [Technical Details](#technical-details) -- [Badge](#badge) -- [Contributing](#contributing) - -<!-- tocstop --> - -</details> - ---- - -## What does Prettier do? - -Prettier takes your code and reprints it from scratch by taking the line length -into account. - -For example, take the following code: - -\`\`\`js -foo(arg1, arg2, arg3, arg4); -\`\`\` - -It fits in a single line so it's going to stay as is. However, we've all run -into this situation: - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -Suddenly our previous format for calling function breaks down because this is -too long. Prettier is going to do the painstaking work of reprinting it like -that for you: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -); -\`\`\` - -Prettier enforces a consistent code **style** (i.e. code formatting that won't -affect the AST) across your entire codebase because it disregards the original -styling[\\*](#styling-footnote) by parsing it away and re-printing the parsed AST -with its own rules that take the maximum line length into account, wrapping code -when necessary. - -<a href="#styling-footnote" name="styling-footnote">\\*</a>_Well actually, some -original styling is preserved when practical—see [empty lines] and [multi-line -objects]._ - -[empty lines]: Rationale.md#empty-lines -[multi-line objects]: Rationale.md#multi-line-objects - -If you want to learn more, these two conference talks are great introductions: - -<a href="https://www.youtube.com/watch?v=hkfBvpEfWdA"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886367/dda8a6f0-1e08-11e7-865b-22492450f10f.png"></a> -<a href="https://www.youtube.com/watch?v=0Q4kUNx85_4"><img width="298" src="https://cloud.githubusercontent.com/assets/197597/24886368/ddacd6f8-1e08-11e7-806a-9febd23cbf47.png"></a> - -## Why Prettier? - -### Building and enforcing a style guide - -By far the biggest reason for adopting Prettier is to stop all the on-going -debates over styles. It is generally accepted that having a common style guide -is valuable for a project and team but getting there is a very painful and -unrewarding process. People get very emotional around particular ways of writing -code and nobody likes spending time writing and receiving nits. - -- “We want to free mental threads and end discussions around style. While - sometimes fruitful, these discussions are for the most part wasteful.” -- “Literally had an engineer go through a huge effort of cleaning up all of our - code because we were debating ternary style for the longest time and were - inconsistent about it. It was dumb, but it was a weird on-going "great debate" - that wasted lots of little back and forth bits. It's far easier for us all to - agree now: just run Prettier, and go with that style.” -- “Getting tired telling people how to style their product code.” -- “Our top reason was to stop wasting our time debating style nits.” -- “Having a githook set up has reduced the amount of style issues in PRs that - result in broken builds due to ESLint rules or things I have to nit-pick or - clean up later.” -- “I don't want anybody to nitpick any other person ever again.” -- “It reminds me of how Steve Jobs used to wear the same clothes every day - because he has a million decisions to make and he didn't want to be bothered - to make trivial ones like picking out clothes. I think Prettier is like that.” - -### Helping Newcomers - -Prettier is usually introduced by people with experience in the current codebase -and JavaScript but the people that disproportionally benefit from it are -newcomers to the codebase. One may think that it's only useful for people with -very limited programming experience, but we've seen it quicken the ramp up time -from experienced engineers joining the company, as they likely used a different -coding style before, and developers coming from a different programming -language. - -- “My motivations for using Prettier are: appearing that I know how to write - JavaScript well.” -- “I always put spaces in the wrong place, now I don't have to worry about it - anymore.” -- “When you're a beginner you're making a lot of mistakes caused by the syntax. - Thanks to Prettier, you can reduce these mistakes and save a lot of time to - focus on what really matters.” -- “As a teacher, I will also tell to my students to install Prettier to help - them to learn the JS syntax and have readable files.” - -### Writing code - -What usually happens once people are using Prettier is that they realize that -they actually spend a lot of time and mental energy formatting their code. With -Prettier editor integration, you can just press that magic key binding and poof, -the code is formatted. This is an eye opening experience if anything else. - -- “I want to write code. Not spend cycles on formatting.” -- “It removed 5% that sucks in our daily life - aka formatting” -- “We're in 2017 and it's still painful to break a call into multiple lines when - you happen to add an argument that makes it go over the 80 columns limit :(“ - -### Easy to adopt - -We've worked very hard to use the least controversial coding styles, went -through many rounds of fixing all the edge cases and polished the getting -started experience. When you're ready to push Prettier into your codebase, not -only should it be painless for you to do it technically but the newly formatted -codebase should not generate major controversy and be accepted painlessly by -your co-workers. - -- “It's low overhead. We were able to throw Prettier at very different kinds of - repos without much work.” -- “It's been mostly bug free. Had there been major styling issues during the - course of implementation we would have been wary about throwing this at our JS - codebase. I'm happy to say that's not the case.” -- “Everyone runs it as part of their pre commit scripts, a couple of us use the - editor on save extensions as well.” -- “It's fast, against one of our larger JS codebases we were able to run - Prettier in under 13 seconds.” -- “The biggest benefit for Prettier for us was being able to format the entire - code base at once.” - -### Clean up an existing codebase - -Since coming up with a coding style and enforcing it is a big undertaking, it -often slips through the cracks and you are left working on inconsistent -codebases. Running Prettier in this case is a quick win, the codebase is now -uniform and easier to read without spending hardly any time. - -- “Take a look at the code :) I just need to restore sanity.” -- “We inherited a ~2000 module ES6 code base, developed by 20 different - developers over 18 months, in a global team. Felt like such a win without much - research.” - -### Ride the hype train - -Purely technical aspects of the projects aren't the only thing people look into -when choosing to adopt Prettier. Who built and uses it and how quickly it -spreads through the community has a non-trivial impact. - -- “The amazing thing, for me, is: 1) Announced 2 months ago. 2) Already adopted - by, it seems, every major JS project. 3) 7000 stars, 100,000 npm downloads/mo” -- “Was built by the same people as React & React Native.” -- “I like to be part of the hot new things.” -- “Because soon enough people are gonna ask for it.” - -A few of the [many projects](https://www.npmjs.com/browse/depended/prettier) -using Prettier: - -<table> -<tr> -<td><p align="center"><a href="https://facebook.github.io/react/"><img src="website/static/images/react-200x100.png" alt="React" width="200" height="100"><br>React</a></p></td> -<td><p align="center"><a href="https://facebook.github.io/jest/"><img src="website/static/images/jest-200x100.png" alt="Jest" width="200" height="100"><br>Jest</a></p></td> -<td><p align="center"><a href="https://yarnpkg.com"><img src="website/static/images/yarn-200x100.png" alt="Yarn" width="200" height="100"><br>Yarn</a></p></td> -</tr> -<tr> -<td><p align="center"><a href="https://babeljs.io/"><img src="website/static/images/babel-200x100.png" alt="Babel" width="200" height="100"><br>Babel</a></p></td> -<td><p align="center"><a href="https://zeit.co/"><img src="website/static/images/zeit-200x100.png" alt="Zeit" width="200" height="100"><br>Zeit</a></p></td> -<td><p align="center"><a href="https://webpack.js.org/api/cli/"><img src="website/static/images/webpack-200x100.png" alt="Webpack-cli" width="200" height="100"><br>Webpack-cli</a></p></td> -</tr> -</table> - -## How does it compare to ESLint (or TSLint, stylelint...)? - -Linters have two categories of rules: - -**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), -[no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), -[keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), -[comma-style](http://eslint.org/docs/rules/comma-style)... - -Prettier alleviates the need for this whole category of rules! Prettier is going -to reprint the entire program from scratch in a consistent way, so it's not -possible for the programmer to make a mistake there anymore :) - -**Code-quality rules**: eg -[no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), -[no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), -[no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), -[prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)... - -Prettier does nothing to help with those kind of rules. They are also the most -important ones provided by linters as they are likely to catch real bugs with -your code! - -## Usage - -Install: - -\`\`\` -yarn add prettier --dev --exact -\`\`\` - -You can install it globally if you like: - -\`\`\` -yarn global add prettier -\`\`\` - -_We're using \`yarn\` but you can use \`npm\` if you like:_ - -\`\`\` -npm install --save-dev --save-exact prettier -# or globally -npm install --global prettier -\`\`\` - -> We recommend pinning an exact version of prettier in your \`package.json\` as we -> introduce stylistic changes in patch releases. - -### CLI - -Run Prettier through the CLI with this script. Run it without any arguments to -see the [options](#options). - -To format a file in-place, use \`--write\`. You may want to consider committing -your code before doing that, just in case. - -\`\`\`bash -prettier [opts] [filename ...] -\`\`\` - -In practice, this may look something like: - -\`\`\`bash -prettier --single-quote --trailing-comma es5 --write "{app,__{tests,mocks}__}/**/*.js" -\`\`\` - -Don't forget the quotes around the globs! The quotes make sure that Prettier -expands the globs rather than your shell, for cross-platform usage. The -[glob syntax from the glob module](https://github.com/isaacs/node-glob/blob/master/README.md#glob-primer) -is used. - -#### \`--debug-check\` - -If you're worried that Prettier will change the correctness of your code, add -\`--debug-check\` to the command. This will cause Prettier to print an error -message if it detects that code correctness might have changed. Note that -\`--write\` cannot be used with \`--debug-check\`. - -#### \`--find-config-path\` and \`--config\` - -If you are repeatedly formatting individual files with \`prettier\`, you will -incur a small performance cost when prettier attempts to look up a -[configuration file](#configuration-file). In order to skip this, you may ask -prettier to find the config file once, and re-use it later on. - -\`\`\`bash -prettier --find-config-path ./my/file.js -./my/.prettierrc -\`\`\` - -This will provide you with a path to the configuration file, which you can pass -to \`--config\`: - -\`\`\`bash -prettier --config ./my/.prettierrc --write ./my/file.js -\`\`\` - -You can also use \`--config\` if your configuration file lives somewhere where -prettier cannot find it, such as a \`config/\` directory. - -If you don't have a configuration file, or want to ignore it if it does exist, -you can pass \`--no-config\` instead. - -#### \`--ignore-path\` - -Path to a file containing patterns that describe files to ignore. By default, -prettier looks for \`./.prettierignore\`. - -#### \`--require-pragma\` - -Require a special comment, called a pragma, to be present in the file's first -docblock comment in order for prettier to format it. - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -Valid pragmas are \`@prettier\` and \`@format\`. - -#### \`--list-different\` - -Another useful flag is \`--list-different\` (or \`-l\`) which prints the filenames -of files that are different from Prettier formatting. If there are differences -the script errors out, which is useful in a CI scenario. - -\`\`\`bash -prettier --single-quote --list-different "src/**/*.js" -\`\`\` - -#### \`--no-config\` - -Do not look for a configuration file. The default settings will be used. - -#### \`--config-precedence\` - -Defines how config file should be evaluated in combination of CLI options. - -**cli-override (default)** - -CLI options take precedence over config file - -**file-override** - -Config file take precedence over CLI options - -**prefer-file** - -If a config file is found will evaluate it and ignore other CLI options. If no -config file is found CLI options will evaluate as normal. - -This option adds support to editor integrations where users define their default -configuration but want to respect project specific configuration. - -#### \`--with-node-modules\` - -Prettier CLI will ignore files located in \`node_modules\` directory. To opt-out -from this behavior use \`--with-node-modules\` flag. - -#### \`--write\` - -This rewrites all processed files in place. This is comparable to the -\`eslint --fix\` workflow. - -### ESLint - -If you are using ESLint, integrating Prettier to your workflow is -straightforward: - -Just add Prettier as an ESLint rule using -[eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier). - -\`\`\`js -yarn add --dev prettier eslint-plugin-prettier - -// .eslintrc.json -{ - "plugins": [ - "prettier" - ], - "rules": { - "prettier/prettier": "error" - } -} -\`\`\` - -We also recommend that you use -[eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to -disable all the existing formatting rules. It's a one liner that can be added -on-top of any existing ESLint configuration. - -\`\`\` -$ yarn add --dev eslint-config-prettier -\`\`\` - -.eslintrc.json: - -\`\`\`json -{ - "extends": ["prettier"] -} -\`\`\` - -### Pre-commit Hook - -You can use Prettier with a pre-commit tool. This can re-format your files that -are marked as "staged" via \`git add\` before you commit. - -##### Option 1. [lint-staged](https://github.com/okonet/lint-staged) - -Install it along with [husky](https://github.com/typicode/husky): - -\`\`\`bash -yarn add lint-staged husky --dev -\`\`\` - -and add this config to your \`package.json\`: - -\`\`\`json -{ - "scripts": { - "precommit": "lint-staged" - }, - "lint-staged": { - "*.{js,json,css}": ["prettier --write", "git add"] - } -} -\`\`\` - -There is a limitation where if you stage specific lines this approach will stage -the whole file after regardless. See this -[issue](https://github.com/okonet/lint-staged/issues/62) for more info. - -See https://github.com/okonet/lint-staged#configuration for more details about -how you can configure lint-staged. - -##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) - -Copy the following config into your \`.pre-commit-config.yaml\` file: - -\`\`\`yaml -- repo: https://github.com/prettier/prettier - sha: "" # Use the sha or tag you want to point at - hooks: - - id: prettier -\`\`\` - -Find more info from [here](https://pre-commit.com). - -##### Option 3. bash script - -Alternately you can save this script as \`.git/hooks/pre-commit\` and give it -execute permission: - -\`\`\`bash -#!/bin/sh -jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.jsx\\?$' | tr '\\n' ' ') -[ -z "$jsfiles" ] && exit 0 - -# Prettify all staged .js files -echo "$jsfiles" | xargs ./node_modules/.bin/prettier --write - -# Add back the modified/prettified files to staging -echo "$jsfiles" | xargs git add - -exit 0 -\`\`\` - -### API - -\`\`\`js -const prettier = require("prettier"); -\`\`\` - -#### \`prettier.format(source [, options])\` - -\`format\` is used to format text using Prettier. [Options](#options) may be -provided to override the defaults. - -\`\`\`js -prettier.format("foo ( );", { semi: false }); -// -> "foo()" -\`\`\` - -#### \`prettier.check(source [, options])\` - -\`check\` checks to see if the file has been formatted with Prettier given those -options and returns a \`Boolean\`. This is similar to the \`--list-different\` -parameter in the CLI and is useful for running Prettier in CI scenarios. - -#### \`prettier.formatWithCursor(source [, options])\` - -\`formatWithCursor\` both formats the code, and translates a cursor position from -unformatted code to formatted code. This is useful for editor integrations, to -prevent the cursor from moving when code is formatted. - -The \`cursorOffset\` option should be provided, to specify where the cursor is. -This option cannot be used with \`rangeStart\` and \`rangeEnd\`. - -\`\`\`js -prettier.formatWithCursor(" 1", { cursorOffset: 2 }); -// -> { formatted: '1;\\n', cursorOffset: 1 } -\`\`\` - -#### \`prettier.resolveConfig([filePath [, options]])\` - -\`resolveConfig\` can be used to resolve configuration for a given source file. -The function optionally accepts an input file path as an argument, which -defaults to the current working directory. A promise is returned which will -resolve to: - -- An options object, providing a [config file](#configuration-file) was found. -- \`null\`, if no file was found. - -The promise will be rejected if there was an error parsing the configuration -file. - -If \`options.useCache\` is \`false\`, all caching will be bypassed. - -\`\`\`js -const text = fs.readFileSync(filePath, "utf8"); -prettier.resolveConfig(filePath).then((options) => { - const formatted = prettier.format(text, options); -}); -\`\`\` - -Use \`prettier.resolveConfig.sync([filePath [, options]])\` if you'd like to use -sync version. - -#### \`prettier.clearConfigCache()\` - -As you repeatedly call \`resolveConfig\`, the file system structure will be cached -for performance. This function will clear the cache. Generally this is only -needed for editor integrations that know that the file system has changed since -the last format took place. - -#### Custom Parser API - -If you need to make modifications to the AST (such as codemods), or you want to -provide an alternate parser, you can do so by setting the \`parser\` option to a -function. The function signature of the parser function is: - -\`\`\`js -(text: string, parsers: object, options: object) => AST; -\`\`\` - -Prettier's built-in parsers are exposed as properties on the \`parsers\` argument. - -\`\`\`js -prettier.format("lodash ( )", { - parser(text, { babylon }) { - const ast = babylon(text); - ast.program.body[0].expression.callee.name = "_"; - return ast; - }, -}); -// -> "_();\\n" -\`\`\` - -The \`--parser\` CLI option may be a path to a node.js module exporting a parse -function. - -### Excluding code from formatting - -A JavaScript comment of \`// prettier-ignore\` will exclude the next node in the -abstract syntax tree from formatting. - -For example: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -will be transformed to: - -\`\`\`js -matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); - -// prettier-ignore -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) -\`\`\` - -## Options - -Prettier ships with a handful of customizable format options, usable in both the -CLI and API. - -### Print Width - -Specify the line length that the printer will wrap on. - -> **For readability we recommend against using more than 80 characters:** -> -> In code styleguides, maximum line length rules are often set to 100 or 120. -> However, when humans write code, they don't strive to reach the maximum number -> of columns on every line. Developers often use whitespace to break up long -> lines for readability. In practice, the average line length often ends up well -> below the maximum. -> -> Prettier, on the other hand, strives to fit the most code into every line. -> With the print width set to 120, prettier may produce overly compact, or -> otherwise undesirable code. - -| Default | CLI Override | API Override | -| ------- | --------------------- | ------------------- | -| \`80\` | \`--print-width <int>\` | \`printWidth: <int>\` | - -### Tab Width - -Specify the number of spaces per indentation-level. - -| Default | CLI Override | API Override | -| ------- | ------------------- | ----------------- | -| \`2\` | \`--tab-width <int>\` | \`tabWidth: <int>\` | - -### Tabs - -Indent lines with tabs instead of spaces - -| Default | CLI Override | API Override | -| ------- | ------------ | ----------------- | -| \`false\` | \`--use-tabs\` | \`useTabs: <bool>\` | - -### Semicolons - -Print semicolons at the ends of statements. - -Valid options: - -- \`true\` - Add a semicolon at the end of every statement. -- \`false\` - Only add semicolons at the beginning of lines that may introduce ASI - failures. - -| Default | CLI Override | API Override | -| ------- | ------------ | -------------- | -| \`true\` | \`--no-semi\` | \`semi: <bool>\` | - -### Quotes - -Use single quotes instead of double quotes. - -Notes: - -- Quotes in JSX will always be double and ignore this setting. -- If the number of quotes outweighs the other quote, the quote which is less - used will be used to format the string - Example: \`"I'm double quoted"\` - results in \`"I'm double quoted"\` and \`"This \\"example\\" is single quoted"\` - results in \`'This "example" is single quoted'\`. - -| Default | CLI Override | API Override | -| ------- | ---------------- | --------------------- | -| \`false\` | \`--single-quote\` | \`singleQuote: <bool>\` | - -### Trailing Commas - -Print trailing commas wherever possible when multi-line. (A single-line array, -for example, never gets trailing commas.) - -Valid options: - -- \`"none"\` - No trailing commas. -- \`"es5"\` - Trailing commas where valid in ES5 (objects, arrays, etc.) -- \`"all"\` - Trailing commas wherever possible (including function arguments). - This requires node 8 or a - [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/). - -| Default | CLI Override | API Override | -| -------- | ------------------------------------------------------ | ------------------------------------------------------ | -| \`"none"\` | <code>--trailing-comma <none&#124;es5&#124;all></code> | <code>trailingComma: "<none&#124;es5&#124;all>"</code> | - -### Bracket Spacing - -Print spaces between brackets in object literals. - -Valid options: - -- \`true\` - Example: \`{ foo: bar }\`. -- \`false\` - Example: \`{foo: bar}\`. - -| Default | CLI Override | API Override | -| ------- | ---------------------- | ------------------------ | -| \`true\` | \`--no-bracket-spacing\` | \`bracketSpacing: <bool>\` | - -### JSX Brackets - -Put the \`>\` of a multi-line JSX element at the end of the last line instead of -being alone on the next line (does not apply to self closing elements). - -| Default | CLI Override | API Override | -| ------- | ------------------------- | ---------------------------- | -| \`false\` | \`--jsx-bracket-same-line\` | \`jsxBracketSameLine: <bool>\` | - -### Range - -Format only a segment of a file. - -These two options can be used to format code starting and ending at a given -character offset (inclusive and exclusive, respectively). The range will extend: - -- Backwards to the start of the first line containing the selected statement. -- Forwards to the end of the selected statement. - -These options cannot be used with \`cursorOffset\`. - -| Default | CLI Override | API Override | -| ---------- | --------------------- | ------------------- | -| \`0\` | \`--range-start <int>\` | \`rangeStart: <int>\` | -| \`Infinity\` | \`--range-end <int>\` | \`rangeEnd: <int>\` | - -### Parser - -Specify which parser to use. - -Both the \`babylon\` and \`flow\` parsers support the same set of JavaScript -features (including Flow). Prettier automatically infers the parser from the -input file path, so you shouldn't have to change this setting. - -Built-in parsers: - -- [\`babylon\`](https://github.com/babel/babylon/) -- [\`flow\`](https://github.com/facebook/flow/tree/master/src/parser) -- [\`typescript\`](https://github.com/eslint/typescript-eslint-parser) _Since - v1.4.0_ -- [\`postcss\`](https://github.com/postcss/postcss) _Since v1.4.0_ -- [\`json\`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) - _Since v1.5.0_ -- [\`graphql\`](https://github.com/graphql/graphql-js/tree/master/src/language) - _Since v1.5.0_ - -[Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ - -| Default | CLI Override | API Override | -| --------- | ----------------------------------------------- | ---------------------------------------------------------- | -| \`babylon\` | \`--parser <string>\`<br />\`--parser ./my-parser\` | \`parser: "<string>"\`<br />\`parser: require("./my-parser")\` | - -### Filepath - -Specify the input filepath. This will be used to do parser inference. - -For example, the following will use \`postcss\` parser: - -\`\`\`bash -cat foo | prettier --stdin-filepath foo.css -\`\`\` - -| Default | CLI Override | API Override | -| ------- | --------------------------- | ---------------------- | -| None | \`--stdin-filepath <string>\` | \`filepath: "<string>"\` | - -### Require pragma - -Prettier can restrict itself to only format files that contain a special -comment, called a pragma, at the top of the file. This is very useful when -gradually transitioning large, unformatted codebases to prettier. - -For example, a file with the following as its first comment will be formatted -when \`--require-pragma\` is supplied: - -\`\`\`js -/** - * @prettier - */ -\`\`\` - -or - -\`\`\`js -/** - * @format - */ -\`\`\` - -| Default | CLI Override | API Override | -| ------- | ------------------ | ----------------------- | -| \`false\` | \`--require-pragma\` | \`requirePragma: <bool>\` | - -## Configuration File - -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for -configuration file support. This means you can configure prettier via: - -- A \`.prettierrc\` file, written in YAML or JSON, with optional extensions: - \`.yaml/.yml/.json/.js\`. -- A \`prettier.config.js\` file that exports an object. -- A \`"prettier"\` key in your \`package.json\` file. - -The configuration file will be resolved starting from the location of the file -being formatted, and searching up the file tree until a config file is (or -isn't) found. - -The options to the configuration file are the same the [API options](#options). - -### Basic Configuration - -JSON: - -\`\`\`json -// .prettierrc -{ - "printWidth": 100, - "parser": "flow" -} -\`\`\` - -YAML: - -\`\`\`yaml -# .prettierrc -printWidth: 100 -parser: flow -\`\`\` - -### Configuration Overrides - -Prettier borrows eslint's -[override format](http://eslint.org/docs/user-guide/configuring#example-configuration). -This allows you to apply configuration to specific files. - -JSON: - -\`\`\`json -{ - "semi": false, - "overrides": [ - { - "files": "*.test.js", - "options": { - "semi": true - } - } - ] -} -\`\`\` - -YAML: - -\`\`\`yaml -semi: false -overrides: - - files: "*.test.js" - options: - semi: true -\`\`\` - -\`files\` is required for each override, and may be a string or array of strings. -\`excludeFiles\` may be optionally provided to exclude files for a given rule, and -may also be a string or array of strings. - -To get prettier to format its own \`.prettierrc\` file, you can do: - -\`\`\`json -{ - "overrides": [ - { - "files": ".prettierrc", - "options": { "parser": "json" } - } - ] -} -\`\`\` - -For more information on how to use the CLI to locate a file, see the [CLI](#cli) -section. - -### Configuration Schema - -If you'd like a JSON schema to validate your configuration, one is available -here: http://json.schemastore.org/prettierrc. - -## Editor Integration - -### Atom - -Atom users can simply install the -[prettier-atom](https://github.com/prettier/prettier-atom) package and use -\`Ctrl+Alt+F\` to format a file (or format on save if enabled). - -### Emacs - -Emacs users should see -[this repository](https://github.com/prettier/prettier-emacs) for on-demand -formatting. - -### Vim - -Vim users can simply install either -[sbdchd](https://github.com/sbdchd)/[neoformat](https://github.com/sbdchd/neoformat), -[w0rp](https://github.com/w0rp)/[ale](https://github.com/w0rp/ale), or -[prettier](https://github.com/prettier)/[vim-prettier](https://github.com/prettier/vim-prettier), -for more details see -[this directory](https://github.com/prettier/prettier/tree/master/editors/vim). - -### Visual Studio Code - -Can be installed using the extension sidebar. Search for -\`Prettier - JavaScript formatter\`. - -Can also be installed using \`ext install prettier-vscode\`. - -[Check its repository for configuration and shortcuts](https://github.com/prettier/prettier-vscode) - -### Visual Studio - -Install the -[JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). - -### Sublime Text - -Sublime Text support is available through Package Control and the -[JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. - -### JetBrains WebStorm, PHPStorm, PyCharm... - -See the -[WebStorm guide](https://github.com/jlongster/prettier/tree/master/editors/webstorm/README.md). - -## Language Support - -Prettier attempts to support all JavaScript language features, including -non-standardized ones. By default it uses the -[Babylon](https://github.com/babel/babylon) parser with all language features -enabled, but you can also use the [Flow](https://github.com/facebook/flow) -parser with the \`parser\` API or \`--parser\` CLI [option](#options). - -All of JSX and Flow syntax is supported. In fact, the test suite in \`tests/flow\` -_is_ the entire Flow test suite and they all pass. - -Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, -[Less](http://lesscss.org/), [SCSS](http://sass-lang.com), -[JSON](http://json.org/), and [GraphQL](http://graphql.org/). - -The minimum version of TypeScript supported is 2.1.3 as it introduces the -ability to have leading \`|\` for type definitions which prettier outputs. - -## Related Projects - -- [\`eslint-plugin-prettier\`](https://github.com/prettier/eslint-plugin-prettier) - plugs Prettier into your ESLint workflow -- [\`eslint-config-prettier\`](https://github.com/prettier/eslint-config-prettier) - turns off all ESLint rules that are unnecessary or might conflict with - Prettier -- [\`prettier-eslint\`](https://github.com/prettier/prettier-eslint) passes - \`prettier\` output to \`eslint --fix\` -- [\`prettier-stylelint\`](https://github.com/hugomrdias/prettier-stylelint) - passes \`prettier\` output to \`stylelint --fix\` -- [\`prettier-standard\`](https://github.com/sheerun/prettier-standard) uses - \`prettier\` and \`prettier-eslint\` to format code with standard rules -- [\`prettier-standard-formatter\`](https://github.com/dtinth/prettier-standard-formatter) - passes \`prettier\` output to \`standard --fix\` -- [\`prettier-miscellaneous\`](https://github.com/arijs/prettier-miscellaneous) - \`prettier\` with a few minor extra options -- [\`neutrino-preset-prettier\`](https://github.com/SpencerCDixon/neutrino-preset-prettier) - allows you to use Prettier as a Neutrino preset -- [\`prettier_d\`](https://github.com/josephfrazier/prettier_d.js) runs Prettier - as a server to avoid Node.js startup delay. It also supports configuration via - \`.prettierrc\`, \`package.json\`, and \`.editorconfig\`. -- [\`Prettier Bookmarklet\`](https://prettier.glitch.me/) provides a bookmarklet - and exposes a REST API for Prettier that allows to format CodeMirror editor in - your browser -- [\`prettier-github\`](https://github.com/jgierer12/prettier-github) formats code - in GitHub comments -- [\`rollup-plugin-prettier\`](https://github.com/mjeanroy/rollup-plugin-prettier) - allows you to use Prettier with Rollup -- [\`markdown-magic-prettier\`](https://github.com/camacho/markdown-magic-prettier) - allows you to use Prettier to format JS - [codeblocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) - in Markdown files via - [Markdown Magic](https://github.com/DavidWells/markdown-magic) -- [\`tslint-plugin-prettier\`](https://github.com/ikatyang/tslint-plugin-prettier) - runs Prettier as a TSLint rule and reports differences as individual TSLint - issues -- [\`tslint-config-prettier\`](https://github.com/alexjoverm/tslint-config-prettier) - use TSLint with Prettier without any conflict - -## Technical Details - -This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer -with its algorithm replaced by the one described by Wadler in -"[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". -There still may be leftover code from recast that needs to be cleaned up. - -The basic idea is that the printer takes an AST and returns an intermediate -representation of the output, and the printer uses that to generate a string. -The advantage is that the printer can "measure" the IR and see if the output is -going to fit on a line, and break if not. - -This means that most of the logic of printing an AST involves generating an -abstract representation of the output involving certain commands. For example, -\`concat(["(", line, arg, line ")"])\` would represent a concatenation of opening -parens, an argument, and closing parens. But if that doesn't fit on one line, -the printer can break where \`line\` is specified. - -More (rough) details can be found in [commands.md](commands.md). - -## Badge - -Show the world you're using _Prettier_ → -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) - -\`\`\`md -[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -\`\`\` - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md). - -================================================================================ -`; - -exports[`test-case.md - {"proseWrap":"always","singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" -singleQuote: true - | printWidth -=====================================input====================================== -[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) - -This is a paragraph. - - This is a paragraph. - - - -Header 1 -======== - -Header 2 --------- - - Header 1 - ======== - - Header 2 - -------- - - - -# Header 1 -## Header 2 -### Header 3 -#### Header 4 -##### Header 5 -###### Header 6 - - # Header 1 - ## Header 2 - ### Header 3 - #### Header 4 - ##### Header 5 - ###### Header 6 - - - -# Header 1 # -## Header 2 ## -### Header 3 ### -#### Header 4 #### -##### Header 5 ##### -###### Header 6 ###### - - # Header 1 # - ## Header 2 ## - ### Header 3 ### - #### Header 4 #### - ##### Header 5 ##### - ###### Header 6 ###### - - - -> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - - > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - - - -> ## This is a header. -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> Markdown.generate(); - - > ## This is a header. - > 1. This is the first list item. - > 2. This is the second list item. - > - > Here's some example code: - > - > Markdown.generate(); - - - - -- Red -- Green -- Blue - - -+ Red -+ Green -+ Blue - - -* Red -* Green -* Blue - - -\`\`\`markdown -- Red -- Green -- Blue - -+ Red -+ Green -+ Blue - -* Red -* Green -* Blue -\`\`\` - - - -1. Buy flour and salt -1. Mix together with water -1. Bake - -\`\`\`markdown -1. Buy flour and salt -1. Mix together with water -1. Bake -\`\`\` - - - -Paragraph: - - Code - -<!-- --> - - Paragraph: - - Code - - - -* * * - -*** - -***** - -- - - - ---------------------------------------- - - * * * - - *** - - ***** - - - - - - - --------------------------------------- - - - -This is [an example](http://example.com "Example") link. - -[This link](http://example.com) has no title attr. - -These is [an] [example] of two shortcut reference-style links. - -This is [an example][id] reference-style link. - -[id]: http://example.com "Optional Title" - - This is [an example](http://example.com "Example") link. - - [This link](http://example.com) has no title attr. - - These is [an] [example] of two shortcut reference-style links. - - This is [an example][id] reference-style link. - - [id]: http://example.com "Optional Title" - - - -*single asterisks* - -_single underscores_ - -**double asterisks** - -__double underscores__ - - *single asterisks* - - _single underscores_ - - **double asterisks** - - __double underscores__ - - - -This paragraph has some \`code\` in it. - - This paragraph has some \`code\` in it. - - - -![Alt Text](http://placehold.it/200x50 "Image Title") - - ![Alt Text](http://placehold.it/200x50 "Image Title") - -=====================================output===================================== -[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) - -This is a paragraph. - - This is a paragraph. - -# Header 1 - -## Header 2 - - Header 1 - ======== - - Header 2 - -------- - -# Header 1 - -## Header 2 - -### Header 3 - -#### Header 4 - -##### Header 5 - -###### Header 6 - - # Header 1 - ## Header 2 - ### Header 3 - #### Header 4 - ##### Header 5 - ###### Header 6 - -# Header 1 - -## Header 2 - -### Header 3 - -#### Header 4 - -##### Header 5 - -###### Header 6 - - # Header 1 # - ## Header 2 ## - ### Header 3 ### - #### Header 4 #### - ##### Header 5 ##### - ###### Header 6 ###### - -> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi -> posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet -> vitae, risus. - - > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - -> ## This is a header. -> -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> Markdown.generate(); - - > ## This is a header. - > 1. This is the first list item. - > 2. This is the second list item. - > - > Here's some example code: - > - > Markdown.generate(); - -- Red -- Green -- Blue - -* Red -* Green -* Blue - -- Red -- Green -- Blue - -\`\`\`markdown -- Red -- Green -- Blue - -* Red -* Green -* Blue - -- Red -- Green -- Blue -\`\`\` - -1. Buy flour and salt -1. Mix together with water -1. Bake - -\`\`\`markdown -1. Buy flour and salt -1. Mix together with water -1. Bake -\`\`\` - -Paragraph: - - Code - -<!-- --> - - Paragraph: - - Code - ---- - ---- - ---- - ---- - ---- - - * * * - - *** - - ***** - - - - - - - --------------------------------------- - -This is [an example](http://example.com 'Example') link. - -[This link](http://example.com) has no title attr. - -These is [an] [example] of two shortcut reference-style links. - -This is [an example][id] reference-style link. - -[id]: http://example.com 'Optional Title' - - This is [an example](http://example.com "Example") link. - - [This link](http://example.com) has no title attr. - - These is [an] [example] of two shortcut reference-style links. - - This is [an example][id] reference-style link. - - [id]: http://example.com "Optional Title" - -_single asterisks_ - -_single underscores_ - -**double asterisks** - -**double underscores** - - *single asterisks* - - _single underscores_ - - **double asterisks** - - __double underscores__ - -This paragraph has some \`code\` in it. - - This paragraph has some \`code\` in it. - -![Alt Text](http://placehold.it/200x50 'Image Title') - - ![Alt Text](http://placehold.it/200x50 "Image Title") - -================================================================================ -`; - -exports[`test-case.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) - -This is a paragraph. - - This is a paragraph. - - - -Header 1 -======== - -Header 2 --------- - - Header 1 - ======== - - Header 2 - -------- - - - -# Header 1 -## Header 2 -### Header 3 -#### Header 4 -##### Header 5 -###### Header 6 - - # Header 1 - ## Header 2 - ### Header 3 - #### Header 4 - ##### Header 5 - ###### Header 6 - - - -# Header 1 # -## Header 2 ## -### Header 3 ### -#### Header 4 #### -##### Header 5 ##### -###### Header 6 ###### - - # Header 1 # - ## Header 2 ## - ### Header 3 ### - #### Header 4 #### - ##### Header 5 ##### - ###### Header 6 ###### - - - -> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - - > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - - - -> ## This is a header. -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> Markdown.generate(); - - > ## This is a header. - > 1. This is the first list item. - > 2. This is the second list item. - > - > Here's some example code: - > - > Markdown.generate(); - - - - -- Red -- Green -- Blue - - -+ Red -+ Green -+ Blue - - -* Red -* Green -* Blue - - -\`\`\`markdown -- Red -- Green -- Blue - -+ Red -+ Green -+ Blue - -* Red -* Green -* Blue -\`\`\` - - - -1. Buy flour and salt -1. Mix together with water -1. Bake - -\`\`\`markdown -1. Buy flour and salt -1. Mix together with water -1. Bake -\`\`\` - - - -Paragraph: - - Code - -<!-- --> - - Paragraph: - - Code - - - -* * * - -*** - -***** - -- - - - ---------------------------------------- - - * * * - - *** - - ***** - - - - - - - --------------------------------------- - - - -This is [an example](http://example.com "Example") link. - -[This link](http://example.com) has no title attr. - -These is [an] [example] of two shortcut reference-style links. - -This is [an example][id] reference-style link. - -[id]: http://example.com "Optional Title" - - This is [an example](http://example.com "Example") link. - - [This link](http://example.com) has no title attr. - - These is [an] [example] of two shortcut reference-style links. - - This is [an example][id] reference-style link. - - [id]: http://example.com "Optional Title" - - - -*single asterisks* - -_single underscores_ - -**double asterisks** - -__double underscores__ - - *single asterisks* - - _single underscores_ - - **double asterisks** - - __double underscores__ - - - -This paragraph has some \`code\` in it. - - This paragraph has some \`code\` in it. - - - -![Alt Text](http://placehold.it/200x50 "Image Title") - - ![Alt Text](http://placehold.it/200x50 "Image Title") - -=====================================output===================================== -[View raw (TEST.md)](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md) - -This is a paragraph. - - This is a paragraph. - -# Header 1 - -## Header 2 - - Header 1 - ======== - - Header 2 - -------- - -# Header 1 - -## Header 2 - -### Header 3 - -#### Header 4 - -##### Header 5 - -###### Header 6 - - # Header 1 - ## Header 2 - ### Header 3 - #### Header 4 - ##### Header 5 - ###### Header 6 - -# Header 1 - -## Header 2 - -### Header 3 - -#### Header 4 - -##### Header 5 - -###### Header 6 - - # Header 1 # - ## Header 2 ## - ### Header 3 ### - #### Header 4 #### - ##### Header 5 ##### - ###### Header 6 ###### - -> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi -> posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet -> vitae, risus. - - > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - -> ## This is a header. -> -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> Markdown.generate(); - - > ## This is a header. - > 1. This is the first list item. - > 2. This is the second list item. - > - > Here's some example code: - > - > Markdown.generate(); - -- Red -- Green -- Blue - -* Red -* Green -* Blue - -- Red -- Green -- Blue - -\`\`\`markdown -- Red -- Green -- Blue - -* Red -* Green -* Blue - -- Red -- Green -- Blue -\`\`\` - -1. Buy flour and salt -1. Mix together with water -1. Bake - -\`\`\`markdown -1. Buy flour and salt -1. Mix together with water -1. Bake -\`\`\` - -Paragraph: - - Code - -<!-- --> - - Paragraph: - - Code - ---- - ---- - ---- - ---- - ---- - - * * * - - *** - - ***** - - - - - - - --------------------------------------- - -This is [an example](http://example.com "Example") link. - -[This link](http://example.com) has no title attr. - -These is [an] [example] of two shortcut reference-style links. - -This is [an example][id] reference-style link. - -[id]: http://example.com "Optional Title" - - This is [an example](http://example.com "Example") link. - - [This link](http://example.com) has no title attr. - - These is [an] [example] of two shortcut reference-style links. - - This is [an example][id] reference-style link. - - [id]: http://example.com "Optional Title" - -_single asterisks_ - -_single underscores_ - -**double asterisks** - -**double underscores** - - *single asterisks* - - _single underscores_ - - **double asterisks** - - __double underscores__ - -This paragraph has some \`code\` in it. - - This paragraph has some \`code\` in it. - -![Alt Text](http://placehold.it/200x50 "Image Title") - - ![Alt Text](http://placehold.it/200x50 "Image Title") - -================================================================================ -`; diff --git a/tests/format/markdown/markdown/format.test.js b/tests/format/markdown/markdown/format.test.js new file mode 100644 index 000000000000..fa6013f9d3fd --- /dev/null +++ b/tests/format/markdown/markdown/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { + proseWrap: "always", + singleQuote: true, +}); diff --git a/tests/format/markdown/markdown/jsfmt.spec.js b/tests/format/markdown/markdown/jsfmt.spec.js deleted file mode 100644 index f78d08241b51..000000000000 --- a/tests/format/markdown/markdown/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "always", singleQuote: true }); diff --git a/tests/format/markdown/markdown/real-world-case.md b/tests/format/markdown/markdown/real-world-case.md index 7abad7896889..1f6ff7ab7e51 100644 --- a/tests/format/markdown/markdown/real-world-case.md +++ b/tests/format/markdown/markdown/real-world-case.md @@ -455,7 +455,7 @@ This is similar to the `--list-different` parameter in the CLI and is useful for `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code. This is useful for editor integrations, to prevent the cursor from moving when code is formatted. -The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`. +The `cursorOffset` option should be provided, to specify where the cursor is. ```js prettier.formatWithCursor(" 1", { cursorOffset: 2 }); @@ -636,8 +636,6 @@ These two options can be used to format code starting and ending at a given char * Backwards to the start of the first line containing the selected statement. * Forwards to the end of the selected statement. -These options cannot be used with `cursorOffset`. - Default | CLI Override | API Override --------|--------------|------------- `0` | `--range-start <int>`| `rangeStart: <int>` @@ -780,7 +778,7 @@ For more information on how to use the CLI to locate a file, see the [CLI](#cli) ### Configuration Schema -If you'd like a JSON schema to validate your configuration, one is available here: http://json.schemastore.org/prettierrc. +If you'd like a JSON schema to validate your configuration, one is available here: https://json.schemastore.org/prettierrc. ## Editor Integration diff --git a/tests/format/markdown/math/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/math/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/math/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/math/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/math/format.test.js b/tests/format/markdown/math/format.test.js new file mode 100644 index 000000000000..7df6c9eaad2d --- /dev/null +++ b/tests/format/markdown/math/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"]); diff --git a/tests/format/markdown/math/jsfmt.spec.js b/tests/format/markdown/math/jsfmt.spec.js deleted file mode 100644 index ff3b58b03c88..000000000000 --- a/tests/format/markdown/math/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"]); diff --git a/tests/format/markdown/multiparser-css/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/multiparser-css/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/multiparser-css/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/multiparser-css/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/multiparser-css/format.test.js b/tests/format/markdown/multiparser-css/format.test.js new file mode 100644 index 000000000000..7df6c9eaad2d --- /dev/null +++ b/tests/format/markdown/multiparser-css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"]); diff --git a/tests/format/markdown/multiparser-css/jsfmt.spec.js b/tests/format/markdown/multiparser-css/jsfmt.spec.js deleted file mode 100644 index ff3b58b03c88..000000000000 --- a/tests/format/markdown/multiparser-css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"]); diff --git a/tests/format/markdown/multiparser-js/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/multiparser-js/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/multiparser-js/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/multiparser-js/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/multiparser-js/format.test.js b/tests/format/markdown/multiparser-js/format.test.js new file mode 100644 index 000000000000..32d2fbf6ae93 --- /dev/null +++ b/tests/format/markdown/multiparser-js/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { trailingComma: "all" }); diff --git a/tests/format/markdown/multiparser-js/jsfmt.spec.js b/tests/format/markdown/multiparser-js/jsfmt.spec.js deleted file mode 100644 index 6fafe58eacd6..000000000000 --- a/tests/format/markdown/multiparser-js/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { trailingComma: "all" }); diff --git a/tests/format/markdown/multiparser-json/__snapshots__/format.test.js.snap b/tests/format/markdown/multiparser-json/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4943e1b4c85d --- /dev/null +++ b/tests/format/markdown/multiparser-json/__snapshots__/format.test.js.snap @@ -0,0 +1,70 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-json.md - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +<!-- #10333 --> +\`\`\`json +packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json +\`\`\` +=====================================output===================================== +<!-- #10333 --> + +\`\`\`json +packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json +\`\`\` + +================================================================================ +`; + +exports[`jsonc.md - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +\`\`\`jsonc + // comment +{ + "foo" : "bar" +} +\`\`\` + +=====================================output===================================== +\`\`\`jsonc +// comment +{ + "foo": "bar", +} +\`\`\` + +================================================================================ +`; + +exports[`trailing_comma.md - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +\`\`\`json +{ + "foo": "bar" +} +\`\`\` + +=====================================output===================================== +\`\`\`json +{ + "foo": "bar" +} +\`\`\` + +================================================================================ +`; diff --git a/tests/format/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c6ab38824553..000000000000 --- a/tests/format/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,70 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid-json.md - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -<!-- #10333 --> -\`\`\`json -packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json -\`\`\` -=====================================output===================================== -<!-- #10333 --> - -\`\`\`json -packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json -\`\`\` - -================================================================================ -`; - -exports[`jsonc.md - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -\`\`\`jsonc - // comment -{ - "foo" : "bar" -} -\`\`\` - -=====================================output===================================== -\`\`\`jsonc -// comment -{ - "foo": "bar" -} -\`\`\` - -================================================================================ -`; - -exports[`trailing_comma.md - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -\`\`\`json -{ - "foo": "bar" -} -\`\`\` - -=====================================output===================================== -\`\`\`json -{ - "foo": "bar" -} -\`\`\` - -================================================================================ -`; diff --git a/tests/format/markdown/multiparser-json/format.test.js b/tests/format/markdown/multiparser-json/format.test.js new file mode 100644 index 000000000000..32d2fbf6ae93 --- /dev/null +++ b/tests/format/markdown/multiparser-json/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { trailingComma: "all" }); diff --git a/tests/format/markdown/multiparser-json/jsfmt.spec.js b/tests/format/markdown/multiparser-json/jsfmt.spec.js deleted file mode 100644 index 6fafe58eacd6..000000000000 --- a/tests/format/markdown/multiparser-json/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { trailingComma: "all" }); diff --git a/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap b/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..df219d78e104 --- /dev/null +++ b/tests/format/markdown/paragraph/__snapshots__/format.test.js.snap @@ -0,0 +1,590 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意 +该网站在国外无法访问,故以下演示无效 +::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +=====================================output===================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意该网站在国外无法访问,故以下演示无效 ::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +================================================================================ +`; + +exports[`cjk.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意 +该网站在国外无法访问,故以下演示无效 +::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +=====================================output===================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意该网站在国外无法访问,故以下演示无效 ::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +================================================================================ +`; + +exports[`cjk.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意 +该网站在国外无法访问,故以下演示无效 +::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +=====================================output===================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +This ia an english paragraph with a CJK quote "中文". + +This ia an english paragraph with a CJK quote “中文“. + +扩展运算符(spread)是三个点(\`...\`)。 + +::: warning 注意 +该网站在国外无法访问,故以下演示无效 +::: + +IVS 麻󠄁羽󠄀‼️ + +⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ + +================================================================================ +`; + +exports[`inline-nodes.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +=====================================output===================================== +It removes all original styling[\\*](#styling-footnote) and ensures that all +outputted code conforms to a consistent style. (See this +[blog post](http://jlongster.com/A-Prettier-Formatter)) + +================================================================================ +`; + +exports[`inline-nodes.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +=====================================output===================================== +It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +================================================================================ +`; + +exports[`inline-nodes.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +=====================================output===================================== +It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) + +================================================================================ +`; + +exports[`lorem.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. +Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. +Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. +Eum possimus optio distinctio incidunt quasi optio culpa accusamus. +Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. +Hic dignissimos eos et. Eos eos consequatur. + +=====================================output===================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. +Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. Dolores tempora +reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur +quo sed excepturi soluta repudiandae commodi id. Eum possimus optio distinctio +incidunt quasi optio culpa accusamus. Architecto esse ut aut autem ullam +consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. Hic dignissimos eos et. +Eos eos consequatur. + +================================================================================ +`; + +exports[`lorem.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. +Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. +Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. +Eum possimus optio distinctio incidunt quasi optio culpa accusamus. +Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. +Hic dignissimos eos et. Eos eos consequatur. + +=====================================output===================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. Eum possimus optio distinctio incidunt quasi optio culpa accusamus. Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. Hic dignissimos eos et. Eos eos consequatur. + +================================================================================ +`; + +exports[`lorem.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. +Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. +Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. +Eum possimus optio distinctio incidunt quasi optio culpa accusamus. +Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. +Hic dignissimos eos et. Eos eos consequatur. + +=====================================output===================================== +Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. +Iusto sapiente impedit. Laudantium ut id non et aperiam ab. + +Sit minus architecto quas quibusdam sed ipsam aut eum. +Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. +Eum possimus optio distinctio incidunt quasi optio culpa accusamus. +Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. + +Et quam mollitia velit iste enim exercitationem nemo. +Hic dignissimos eos et. Eos eos consequatur. + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +This is a long long long long long long long long long long long long long long +long paragraph. + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +This is a long long long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +This is a long long long long long long long long long long long long long long long paragraph. + +=====================================output===================================== +This is a long long long long long long long long long long long long long long long paragraph. + +================================================================================ +`; + +exports[`special-prefix.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +## Supported Rules + +* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? + +=====================================output===================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc +abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - + disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - + disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - + disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father +aged 29. Oh no, why are we in a numbered list now? + +================================================================================ +`; + +exports[`special-prefix.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +## Supported Rules + +* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? + +=====================================output===================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? + +================================================================================ +`; + +exports[`special-prefix.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +## Supported Rules + +* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? + +=====================================output===================================== +abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. + +## Supported Rules + +- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) + - disallow disabled tests. +- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) + - disallow focused tests. +- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) + - disallow identical titles. +- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - + ensure expect is called correctly. + +She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? + +================================================================================ +`; + +exports[`whitespace.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +=====================================output===================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together +keep these words together + +================================================================================ +`; + +exports[`whitespace.md - {"proseWrap":"never"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "never" + | printWidth +=====================================input====================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +=====================================output===================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +================================================================================ +`; + +exports[`whitespace.md - {"proseWrap":"preserve"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "preserve" + | printWidth +=====================================input====================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +=====================================output===================================== +<!-- 0xA0 non-breaking whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +<!-- 0x20 standard whitespace --> + +keep these words together keep these words together keep these words together keep these words together + +================================================================================ +`; diff --git a/tests/format/markdown/paragraph/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/paragraph/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6bb45612bc67..000000000000 --- a/tests/format/markdown/paragraph/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,601 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cjk.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意 -该网站在国外无法访问,故以下演示无效 -::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -=====================================output===================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長 -很長的段落 - -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 -全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意该网站在国外无法访问,故以下演示无效 ::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -================================================================================ -`; - -exports[`cjk.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意 -该网站在国外无法访问,故以下演示无效 -::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -=====================================output===================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意该网站在国外无法访问,故以下演示无效 ::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -================================================================================ -`; - -exports[`cjk.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意 -该网站在国外无法访问,故以下演示无效 -::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -=====================================output===================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph! - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -This ia an english paragraph with a CJK quote "中文". - -This ia an english paragraph with a CJK quote “中文“. - -扩展运算符(spread)是三个点(\`...\`)。 - -::: warning 注意 -该网站在国外无法访问,故以下演示无效 -::: - -IVS 麻󠄁羽󠄀‼️ - -⿰あ⿱あ⿲あ⿳あ⿴あ⿵あ⿶あ⿷あ⿸あ⿹あ⿺あ⿻あ - -================================================================================ -`; - -exports[`inline-nodes.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -=====================================output===================================== -It removes all original styling[\\*](#styling-footnote) and ensures that all -outputted code conforms to a consistent style. (See this -[blog post](http://jlongster.com/A-Prettier-Formatter)) - -================================================================================ -`; - -exports[`inline-nodes.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -=====================================output===================================== -It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -================================================================================ -`; - -exports[`inline-nodes.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -It removes all original styling[*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -=====================================output===================================== -It removes all original styling[\\*](#styling-footnote) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter)) - -================================================================================ -`; - -exports[`lorem.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. -Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. -Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. -Eum possimus optio distinctio incidunt quasi optio culpa accusamus. -Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. -Hic dignissimos eos et. Eos eos consequatur. - -=====================================output===================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. -Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. Dolores tempora -reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur -quo sed excepturi soluta repudiandae commodi id. Eum possimus optio distinctio -incidunt quasi optio culpa accusamus. Architecto esse ut aut autem ullam -consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. Hic dignissimos eos et. -Eos eos consequatur. - -================================================================================ -`; - -exports[`lorem.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. -Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. -Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. -Eum possimus optio distinctio incidunt quasi optio culpa accusamus. -Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. -Hic dignissimos eos et. Eos eos consequatur. - -=====================================output===================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. Eum possimus optio distinctio incidunt quasi optio culpa accusamus. Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. Hic dignissimos eos et. Eos eos consequatur. - -================================================================================ -`; - -exports[`lorem.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. -Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. -Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. -Eum possimus optio distinctio incidunt quasi optio culpa accusamus. -Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. -Hic dignissimos eos et. Eos eos consequatur. - -=====================================output===================================== -Hic dicta et recusandae incidunt. Reiciendis saepe voluptatem tempore rem aut. -Iusto sapiente impedit. Laudantium ut id non et aperiam ab. - -Sit minus architecto quas quibusdam sed ipsam aut eum. -Dolores tempora reiciendis magni blanditiis laborum aliquid rem corporis enim. Et consectetur quo sed excepturi soluta repudiandae commodi id. -Eum possimus optio distinctio incidunt quasi optio culpa accusamus. -Architecto esse ut aut autem ullam consequatur reiciendis aliquid dolorum. - -Et quam mollitia velit iste enim exercitationem nemo. -Hic dignissimos eos et. Eos eos consequatur. - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -This is a long long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -This is a long long long long long long long long long long long long long long -long paragraph. - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -This is a long long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -This is a long long long long long long long long long long long long long long long paragraph. - -================================================================================ -`; - -exports[`simple.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -This is a long long long long long long long long long long long long long long long paragraph. - -=====================================output===================================== -This is a long long long long long long long long long long long long long long long paragraph. - -================================================================================ -`; - -exports[`special-prefix.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -## Supported Rules - -* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? - -=====================================output===================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc -abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father -aged 29. Oh no, why are we in a numbered list now? - -================================================================================ -`; - -exports[`special-prefix.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -## Supported Rules - -* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? - -=====================================output===================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? - -================================================================================ -`; - -exports[`special-prefix.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -## Supported Rules - -* [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -* [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -* [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -* [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? - -=====================================output===================================== -abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc - abc abc abc - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - ensure expect is called correctly. - -## Supported Rules - -- [no-disabled-tests](/packages/eslint-plugin-jest/docs/rules/no-disabled-tests.md) - - disallow disabled tests. -- [no-focused-tests](/packages/eslint-plugin-jest/docs/rules/no-focused-tests.md) - - disallow focused tests. -- [no-identical-title](/packages/eslint-plugin-jest/docs/rules/no-identical-title.md) - - disallow identical titles. -- [valid-expect](/packages/eslint-plugin-jest/docs/rules/valid-expect.md) - - ensure expect is called correctly. - -She grew up in an isolated village in the 19th century and met her father aged 29. Oh no, why are we in a numbered list now? - -================================================================================ -`; - -exports[`whitespace.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -=====================================output===================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together -keep these words together - -================================================================================ -`; - -exports[`whitespace.md - {"proseWrap":"never"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "never" - | printWidth -=====================================input====================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -=====================================output===================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -================================================================================ -`; - -exports[`whitespace.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -=====================================output===================================== -<!-- 0xA0 non-breaking whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -<!-- 0x20 standard whitespace --> - -keep these words together keep these words together keep these words together keep these words together - -================================================================================ -`; diff --git a/tests/format/markdown/paragraph/format.test.js b/tests/format/markdown/paragraph/format.test.js new file mode 100644 index 000000000000..e672fe578e16 --- /dev/null +++ b/tests/format/markdown/paragraph/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/paragraph/jsfmt.spec.js b/tests/format/markdown/paragraph/jsfmt.spec.js deleted file mode 100644 index d15893e61101..000000000000 --- a/tests/format/markdown/paragraph/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); -run_spec(__dirname, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3e177ccb63b7..000000000000 --- a/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,26 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`inline-code-newline.md - {"proseWrap":"preserve"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "preserve" - | printWidth -=====================================input====================================== -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \`tempor -incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, \`quis -nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo \`consequat. -Duis\` aute irure dolor in reprehenderit in voluptate velit esse cillum dolore \`eu -fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - -=====================================output===================================== -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \`tempor -incididunt\` ut labore et dolore magna aliqua. Ut enim ad minim veniam, \`quis -nostrud\` exercitation ullamco laboris nisi ut aliquip ex ea commodo \`consequat. -Duis\` aute irure dolor in reprehenderit in voluptate velit esse cillum dolore \`eu -fugiat\` nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - -================================================================================ -`; diff --git a/tests/format/markdown/prose-wrap-preserve/jsfmt.spec.js b/tests/format/markdown/prose-wrap-preserve/jsfmt.spec.js deleted file mode 100644 index 9080881c6d92..000000000000 --- a/tests/format/markdown/prose-wrap-preserve/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/spec/__snapshots__/format.test.js.snap b/tests/format/markdown/spec/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..01c4b395c1a4 --- /dev/null +++ b/tests/format/markdown/spec/__snapshots__/format.test.js.snap @@ -0,0 +1,10936 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`commonmark-0.30-example-328.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo\` + +=====================================output===================================== +\`foo\` + +================================================================================ +`; + +exports[`commonmark-0.30-example-329.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` foo \` bar \`\` + +=====================================output===================================== +\`\`foo \` bar\`\` + +================================================================================ +`; + +exports[`commonmark-0.30-example-330.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` \`\` \` + +=====================================output===================================== +\` \`\` \` + +================================================================================ +`; + +exports[`commonmark-0.30-example-331.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` \`\` \` + +=====================================output===================================== +\` \`\` \` + +================================================================================ +`; + +exports[`commonmark-0.30-example-332.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` a\` + +=====================================output===================================== +\` a\` + +================================================================================ +`; + +exports[`commonmark-0.30-example-333.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` b \` + +=====================================output===================================== +\` b \` + +================================================================================ +`; + +exports[`commonmark-0.30-example-334.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` \` +\` \` + +=====================================output===================================== +\` \` \` \` + +================================================================================ +`; + +exports[`commonmark-0.30-example-335.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` +foo +bar +baz +\`\` + +=====================================output===================================== +\`foo bar baz\` + +================================================================================ +`; + +exports[`commonmark-0.30-example-336.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` +foo +\`\` + +=====================================output===================================== +\`foo \` + +================================================================================ +`; + +exports[`commonmark-0.30-example-337.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo bar +baz\` +=====================================output===================================== +\`foo bar baz\` + +================================================================================ +`; + +exports[`example-1.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo baz bim + +=====================================output===================================== + foo baz bim + +================================================================================ +`; + +exports[`example-2.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo baz bim + +=====================================output===================================== +foo baz bim + +================================================================================ +`; + +exports[`example-3.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + a a + ὐ a + +=====================================output===================================== + a a + ὐ a + +================================================================================ +`; + +exports[`example-4.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - foo + + bar + +=====================================output===================================== +- foo + + bar + +================================================================================ +`; + +exports[`example-5.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + bar + +=====================================output===================================== +- foo + + bar + +================================================================================ +`; + +exports[`example-6.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo + +=====================================output===================================== +> foo + +================================================================================ +`; + +exports[`example-7.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + +=====================================output===================================== +- foo + +================================================================================ +`; + +exports[`example-8.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo + bar + +=====================================output===================================== + foo + bar + +================================================================================ +`; + +exports[`example-9.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - foo + - bar + - baz + +=====================================output===================================== +- foo + - bar + - baz + +================================================================================ +`; + +exports[`example-10.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- \`one +- two\` + +=====================================output===================================== +- \`one +- two\` + +================================================================================ +`; + +exports[`example-11.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + +*** +--- +___ + +=====================================output===================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + +--- + +--- + +--- + +================================================================================ +`; + +exports[`example-12.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== ++++ + +=====================================output===================================== ++++ + +================================================================================ +`; + +exports[`example-13.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +=== + +=====================================output===================================== +=== + +================================================================================ +`; + +exports[`example-14.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +-- +** +__ + +=====================================output===================================== +-- \\*\\* \\_\\_ + +================================================================================ +`; + +exports[`example-15.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + + *** + *** + *** + +=====================================output===================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + +--- + +--- + +--- + +================================================================================ +`; + +exports[`example-16.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + *** + +=====================================output===================================== + *** + +================================================================================ +`; + +exports[`example-17.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo + *** + +=====================================output===================================== +Foo \\*\\*\\* + +================================================================================ +`; + +exports[`example-18.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_____________________________________ + +=====================================output===================================== +--- + +================================================================================ +`; + +exports[`example-19.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - - - + +=====================================output===================================== +--- + +================================================================================ +`; + +exports[`example-20.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + ** * ** * ** * ** + +=====================================output===================================== +--- + +================================================================================ +`; + +exports[`example-21.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- - - - + +=====================================output===================================== +--- + +================================================================================ +`; + +exports[`example-22.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- - - - + +=====================================output===================================== +--- + +================================================================================ +`; + +exports[`example-23.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_ _ _ _ a + +a------ + +---a--- + +=====================================output===================================== +\\_ \\_ \\_ \\_ a + +a------ + +---a--- + +================================================================================ +`; + +exports[`example-25.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +*** +- bar + +=====================================output===================================== +- foo + +--- + +- bar + +================================================================================ +`; + +exports[`example-26.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +*** +bar + +=====================================output===================================== +Foo + +--- + +bar + +================================================================================ +`; + +exports[`example-27.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +--- +bar + +=====================================output===================================== +## Foo + +bar + +================================================================================ +`; + +exports[`example-28.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* Foo +* * * +* Bar + +=====================================output===================================== +- Foo + +--- + +- Bar + +================================================================================ +`; + +exports[`example-29.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Foo +- * * * + +=====================================output===================================== +- Foo +- *** + +================================================================================ +`; + +exports[`example-30.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo +## foo +### foo +#### foo +##### foo +###### foo + +=====================================output===================================== +# foo + +## foo + +### foo + +#### foo + +##### foo + +###### foo + +================================================================================ +`; + +exports[`example-31.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +####### foo + +=====================================output===================================== +####### foo + +================================================================================ +`; + +exports[`example-32.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +#5 bolt + +#hashtag + +=====================================output===================================== +#5 bolt + +#hashtag + +================================================================================ +`; + +exports[`example-33.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo + +=====================================output===================================== +# foo + +================================================================================ +`; + +exports[`example-34.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\## foo + +=====================================output===================================== +\\## foo + +================================================================================ +`; + +exports[`example-35.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo *bar* \\*baz\\* + +=====================================output===================================== +# foo _bar_ \\*baz\\* + +================================================================================ +`; + +exports[`example-36.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo + +=====================================output===================================== +# foo + +================================================================================ +`; + +exports[`example-37.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + ### foo + ## foo + # foo + +=====================================output===================================== +### foo + +## foo + +# foo + +================================================================================ +`; + +exports[`example-38.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + # foo + +=====================================output===================================== + # foo + +================================================================================ +`; + +exports[`example-39.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo + # bar + +=====================================output===================================== +foo # bar + +================================================================================ +`; + +exports[`example-40.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +## foo ## + ### bar ### + +=====================================output===================================== +## foo + +### bar + +================================================================================ +`; + +exports[`example-41.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo ################################## +##### foo ## + +=====================================output===================================== +# foo + +##### foo + +================================================================================ +`; + +exports[`example-42.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +### foo ### + +=====================================output===================================== +### foo + +================================================================================ +`; + +exports[`example-43.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +### foo ### b + +=====================================output===================================== +### foo ### b + +================================================================================ +`; + +exports[`example-44.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# foo# + +=====================================output===================================== +# foo# + +================================================================================ +`; + +exports[`example-45.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +### foo \\### +## foo #\\## +# foo \\# + +=====================================output===================================== +### foo \\### + +## foo #\\## + +# foo \\# + +================================================================================ +`; + +exports[`example-46.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + +**** +## foo +**** + +=====================================output===================================== +<!-- placeholder for continuous thematic breaks not being treated as yaml --> + +--- + +## foo + +--- + +================================================================================ +`; + +exports[`example-47.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo bar +# baz +Bar foo + +=====================================output===================================== +Foo bar + +# baz + +Bar foo + +================================================================================ +`; + +exports[`example-48.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +## +# +### ### + +=====================================output===================================== +## + +# + +### + +================================================================================ +`; + +exports[`example-49.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo *bar* +========= + +Foo *bar* +--------- + +=====================================output===================================== +# Foo _bar_ + +## Foo _bar_ + +================================================================================ +`; + +exports[`example-50.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo *bar +baz* +==== + +=====================================output===================================== +Foo _bar baz_ ==== + +================================================================================ +`; + +exports[`example-51.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +------------------------- + +Foo += + +=====================================output===================================== +## Foo + +# Foo + +================================================================================ +`; + +exports[`example-52.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + Foo +--- + + Foo +----- + + Foo + === + +=====================================output===================================== +## Foo + +## Foo + +Foo === + +================================================================================ +`; + +exports[`example-53.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + Foo + --- + + Foo +--- + +=====================================output===================================== + Foo + --- + + Foo + +--- + +================================================================================ +`; + +exports[`example-54.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo + ---- + +=====================================output===================================== +Foo + +--- + +================================================================================ +`; + +exports[`example-55.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo + --- + +=====================================output===================================== +Foo --- + +================================================================================ +`; + +exports[`example-56.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo += = + +Foo +--- - + +=====================================output===================================== +Foo = = + +Foo + +--- + +================================================================================ +`; + +exports[`example-57.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +----- + +=====================================output===================================== +## Foo + +================================================================================ +`; + +exports[`example-58.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo\\ +---- + +=====================================output===================================== +## Foo\\ + +================================================================================ +`; + +exports[`example-59.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`Foo +---- +\` + +<a title="a lot +--- +of dashes"/> + +=====================================output===================================== +## \`Foo + +\` + +## <a title="a lot + +of dashes"/> + +================================================================================ +`; + +exports[`example-60.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> Foo +--- + +=====================================output===================================== +> Foo + +--- + +================================================================================ +`; + +exports[`example-61.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo +bar +=== + +=====================================output===================================== +> foo + +# bar + +================================================================================ +`; + +exports[`example-62.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Foo +--- + +=====================================output===================================== +- Foo + +--- + +================================================================================ +`; + +exports[`example-63.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +Bar +--- + +=====================================output===================================== +Foo Bar + +--- + +================================================================================ +`; + +exports[`example-64.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +--- +Foo +--- +Bar +--- +Baz + +=====================================output===================================== +--- +Foo +--- + +## Bar + +Baz + +================================================================================ +`; + +exports[`example-65.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + +==== + +=====================================output===================================== +==== + +================================================================================ +`; + +exports[`example-66.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +--- +--- + +=====================================output===================================== +--- +--- + +================================================================================ +`; + +exports[`example-67.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +----- + +=====================================output===================================== +- foo + +--- + +================================================================================ +`; + +exports[`example-68.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo +--- + +=====================================output===================================== + foo + +--- + +================================================================================ +`; + +exports[`example-69.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo +----- + +=====================================output===================================== +> foo + +--- + +================================================================================ +`; + +exports[`example-70.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\> foo +------ + +=====================================output===================================== +## \\> foo + +================================================================================ +`; + +exports[`example-71.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo + +bar +--- +baz + +=====================================output===================================== +Foo + +## bar + +baz + +================================================================================ +`; + +exports[`example-72.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +bar + +--- + +baz + +=====================================output===================================== +Foo bar + +--- + +baz + +================================================================================ +`; + +exports[`example-73.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +bar +* * * +baz + +=====================================output===================================== +Foo bar + +--- + +baz + +================================================================================ +`; + +exports[`example-74.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +bar +\\--- +baz + +=====================================output===================================== +Foo bar \\--- baz + +================================================================================ +`; + +exports[`example-75.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + a simple + indented code block + +=====================================output===================================== + a simple + indented code block + +================================================================================ +`; + +exports[`example-76.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - foo + + bar + +=====================================output===================================== +- foo + + bar + +================================================================================ +`; + +exports[`example-77.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. foo + + - bar + +=====================================output===================================== +1. foo + - bar + +================================================================================ +`; + +exports[`example-78.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + <a/> + *hi* + + - one + +=====================================output===================================== + <a/> + *hi* + + - one + +================================================================================ +`; + +exports[`example-79.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + chunk1 + + chunk2 + + + + chunk3 + +=====================================output===================================== + chunk1 + + chunk2 + + + + chunk3 + +================================================================================ +`; + +exports[`example-80.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + chunk1 + + chunk2 + +=====================================output===================================== + chunk1 + + chunk2 + +================================================================================ +`; + +exports[`example-81.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo + bar + +=====================================output===================================== +Foo bar + +================================================================================ +`; + +exports[`example-82.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo +bar + +=====================================output===================================== + foo + +bar + +================================================================================ +`; + +exports[`example-83.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# Heading + foo +Heading +------ + foo +---- + +=====================================output===================================== +# Heading + + foo + +## Heading + + foo + +--- + +================================================================================ +`; + +exports[`example-84.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo + bar + +=====================================output===================================== + foo + bar + +================================================================================ +`; + +exports[`example-85.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + + foo + + +=====================================output===================================== + foo + +================================================================================ +`; + +exports[`example-86.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo + +=====================================output===================================== + foo + +================================================================================ +`; + +exports[`example-87.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +< + > +\`\`\` + +=====================================output===================================== +\`\`\` +< + > +\`\`\` + +================================================================================ +`; + +exports[`example-88.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~ +< + > +~~~ + +=====================================output===================================== +\`\`\` +< + > +\`\`\` + +================================================================================ +`; + +exports[`example-89.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +aaa +~~~ +\`\`\` + +=====================================output===================================== +\`\`\` +aaa +~~~ +\`\`\` + +================================================================================ +`; + +exports[`example-90.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~ +aaa +\`\`\` +~~~ + +=====================================output===================================== +\`\`\`\` +aaa +\`\`\` +\`\`\`\` + +================================================================================ +`; + +exports[`example-91.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`\` +aaa +\`\`\` +\`\`\`\`\`\` + +=====================================output===================================== +\`\`\`\` +aaa +\`\`\` +\`\`\`\` + +================================================================================ +`; + +exports[`example-92.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~~ +aaa +~~~ +~~~~ + +=====================================output===================================== +\`\`\` +aaa +~~~ +\`\`\` + +================================================================================ +`; + +exports[`example-93.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` + +=====================================output===================================== +\`\`\` + +\`\`\` + +================================================================================ +`; + +exports[`example-94.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`\`\` + +\`\`\` +aaa + +=====================================output===================================== +\`\`\`\` + +\`\`\` +aaa +\`\`\`\` + +================================================================================ +`; + +exports[`example-95.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> \`\`\` +> aaa + +bbb + +=====================================output===================================== +> \`\`\` +> aaa +> \`\`\` + +bbb + +================================================================================ +`; + +exports[`example-96.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` + + +\`\`\` + +=====================================output===================================== +\`\`\` + + +\`\`\` + +================================================================================ +`; + +exports[`example-97.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +\`\`\` + +=====================================output===================================== +\`\`\` + +\`\`\` + +================================================================================ +`; + +exports[`example-98.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \`\`\` + aaa +aaa +\`\`\` + +=====================================output===================================== +\`\`\` +aaa +aaa +\`\`\` + +================================================================================ +`; + +exports[`example-99.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \`\`\` +aaa + aaa +aaa + \`\`\` + +=====================================output===================================== +\`\`\` +aaa +aaa +aaa +\`\`\` + +================================================================================ +`; + +exports[`example-100.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \`\`\` + aaa + aaa + aaa + \`\`\` + +=====================================output===================================== +\`\`\` +aaa + aaa +aaa +\`\`\` + +================================================================================ +`; + +exports[`example-101.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \`\`\` + aaa + \`\`\` + +=====================================output===================================== + \`\`\` + aaa + \`\`\` + +================================================================================ +`; + +exports[`example-102.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +aaa + \`\`\` + +=====================================output===================================== +\`\`\` +aaa +\`\`\` + +================================================================================ +`; + +exports[`example-103.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \`\`\` +aaa + \`\`\` + +=====================================output===================================== +\`\`\` +aaa +\`\`\` + +================================================================================ +`; + +exports[`example-104.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +aaa + \`\`\` + +=====================================output===================================== +\`\`\`\` +aaa + \`\`\` +\`\`\`\` + +================================================================================ +`; + +exports[`example-105.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` \`\`\` +aaa + +=====================================output===================================== +\` \` aaa + +================================================================================ +`; + +exports[`example-106.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~~~~ +aaa +~~~ ~~ + +=====================================output===================================== +\`\`\` +aaa +~~~ ~~ +\`\`\` + +================================================================================ +`; + +exports[`example-107.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +\`\`\` +bar +\`\`\` +baz + +=====================================output===================================== +foo + +\`\`\` +bar +\`\`\` + +baz + +================================================================================ +`; + +exports[`example-108.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +--- +~~~ +bar +~~~ +# baz + +=====================================output===================================== +## foo + +\`\`\` +bar +\`\`\` + +# baz + +================================================================================ +`; + +exports[`example-109.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`ruby +def foo(x) + return 3 +end +\`\`\` + +=====================================output===================================== +\`\`\`ruby +def foo(x) + return 3 +end +\`\`\` + +================================================================================ +`; + +exports[`example-110.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~ + +=====================================output===================================== +\`\`\`ruby startline=3 $%@#$ +def foo(x) + return 3 +end +\`\`\` + +================================================================================ +`; + +exports[`example-111.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\`\`; +\`\`\`\` + +=====================================output===================================== +\`\`\`; + +\`\`\` + +================================================================================ +`; + +exports[`example-112.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` aa \`\`\` +foo + +=====================================output===================================== +\`aa\` foo + +================================================================================ +`; + +exports[`example-113.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +\`\`\` aaa +\`\`\` + +=====================================output===================================== +\`\`\`\` +\`\`\` aaa +\`\`\`\` + +================================================================================ +`; + +exports[`example-114.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<table> + <tr> + <td> + hi + </td> + </tr> +</table> + +okay. + +=====================================output===================================== +<table> + <tr> + <td> + hi + </td> + </tr> +</table> + +okay. + +================================================================================ +`; + +exports[`example-115.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + <div> + *hello* + <foo><a> + +=====================================output===================================== + <div> + *hello* + <foo><a> + +================================================================================ +`; + +exports[`example-116.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +</div> +*foo* + +=====================================output===================================== +</div> +*foo* + +================================================================================ +`; + +exports[`example-117.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<DIV CLASS="foo"> + +*Markdown* + +</DIV> + +=====================================output===================================== +<DIV CLASS="foo"> + +_Markdown_ + +</DIV> + +================================================================================ +`; + +exports[`example-118.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div id="foo" + class="bar"> +</div> + +=====================================output===================================== +<div id="foo" + class="bar"> +</div> + +================================================================================ +`; + +exports[`example-119.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div id="foo" class="bar + baz"> +</div> + +=====================================output===================================== +<div id="foo" class="bar + baz"> +</div> + +================================================================================ +`; + +exports[`example-120.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div> +*foo* + +*bar* + +=====================================output===================================== +<div> +*foo* + +_bar_ + +================================================================================ +`; + +exports[`example-121.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div id="foo" +*hi* + +=====================================output===================================== +<div id="foo" +*hi* + +================================================================================ +`; + +exports[`example-122.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div class +foo + +=====================================output===================================== +<div class +foo + +================================================================================ +`; + +exports[`example-123.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div *???-&&&-<--- +*foo* + +=====================================output===================================== +<div *???-&&&-<--- +*foo* + +================================================================================ +`; + +exports[`example-124.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div><a href="bar">*foo*</a></div> + +=====================================output===================================== +<div><a href="bar">*foo*</a></div> + +================================================================================ +`; + +exports[`example-125.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<table><tr><td> +foo +</td></tr></table> + +=====================================output===================================== +<table><tr><td> +foo +</td></tr></table> + +================================================================================ +`; + +exports[`example-126.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div></div> +\`\`\` c +int x = 33; +\`\`\` + +=====================================output===================================== +<div></div> +\`\`\` c +int x = 33; +\`\`\` + +================================================================================ +`; + +exports[`example-127.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="foo"> +*bar* +</a> + +=====================================output===================================== +<a href="foo"> +*bar* +</a> + +================================================================================ +`; + +exports[`example-128.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<Warning> +*bar* +</Warning> + +=====================================output===================================== +<Warning> +*bar* +</Warning> + +================================================================================ +`; + +exports[`example-129.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<i class="foo"> +*bar* +</i> + +=====================================output===================================== +<i class="foo"> +*bar* +</i> + +================================================================================ +`; + +exports[`example-130.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +</ins> +*bar* + +=====================================output===================================== +</ins> +*bar* + +================================================================================ +`; + +exports[`example-131.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<del> +*foo* +</del> + +=====================================output===================================== +<del> +*foo* +</del> + +================================================================================ +`; + +exports[`example-132.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<del> + +*foo* + +</del> + +=====================================output===================================== +<del> + +_foo_ + +</del> + +================================================================================ +`; + +exports[`example-133.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<del>*foo*</del> + +=====================================output===================================== +<del>_foo_</del> + +================================================================================ +`; + +exports[`example-134.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<pre language="haskell"><code> +import Text.HTML.TagSoup + +main :: IO () +main = print $ parseTags tags +</code></pre> + +=====================================output===================================== +<pre language="haskell"><code> +import Text.HTML.TagSoup + +main :: IO () +main = print $ parseTags tags +</code></pre> + +================================================================================ +`; + +exports[`example-135.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<script type="text/javascript"> +// JavaScript example + +document.getElementById("demo").innerHTML = "Hello JavaScript!"; +</script> + +=====================================output===================================== +<script type="text/javascript"> +// JavaScript example + +document.getElementById("demo").innerHTML = "Hello JavaScript!"; +</script> + +================================================================================ +`; + +exports[`example-136.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<style + type="text/css"> +h1 {color:red;} + +p {color:blue;} +</style> + +=====================================output===================================== +<style + type="text/css"> +h1 {color:red;} + +p {color:blue;} +</style> + +================================================================================ +`; + +exports[`example-137.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<style + type="text/css"> + +foo + +=====================================output===================================== +<style + type="text/css"> + +foo + +================================================================================ +`; + +exports[`example-138.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> <div> +> foo + +bar + +=====================================output===================================== +> <div> +> foo + +bar + +================================================================================ +`; + +exports[`example-139.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- <div> +- foo + +=====================================output===================================== +- <div> +- foo + +================================================================================ +`; + +exports[`example-140.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<style>p{color:red;}</style> +*foo* + +=====================================output===================================== +<style>p{color:red;}</style> + +_foo_ + +================================================================================ +`; + +exports[`example-141.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- foo -->*bar* +*baz* + +=====================================output===================================== +<!-- foo -->*bar* + +_baz_ + +================================================================================ +`; + +exports[`example-142.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<script> +foo +</script>1. *bar* + +=====================================output===================================== +<script> +foo +</script>1. *bar* + +================================================================================ +`; + +exports[`example-143.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!-- Foo + +bar + baz --> + +=====================================output===================================== +<!-- Foo + +bar + baz --> + +================================================================================ +`; + +exports[`example-144.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<?php + + echo '>'; + +?> + +=====================================output===================================== +<?php + + echo '>'; + +?> + +================================================================================ +`; + +exports[`example-145.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<!DOCTYPE html> + +=====================================output===================================== +<!DOCTYPE html> + +================================================================================ +`; + +exports[`example-146.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<![CDATA[ +function matchwo(a,b) +{ + if (a < b && a < 0) then { + return 1; + + } else { + + return 0; + } +} +]]> + +=====================================output===================================== +<![CDATA[ +function matchwo(a,b) +{ + if (a < b && a < 0) then { + return 1; + + } else { + + return 0; + } +} +]]> + +================================================================================ +`; + +exports[`example-147.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + <!-- foo --> + + <!-- foo --> + +=====================================output===================================== + <!-- foo --> + + <!-- foo --> + +================================================================================ +`; + +exports[`example-148.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + <div> + + <div> + +=====================================output===================================== + <div> + + <div> + +================================================================================ +`; + +exports[`example-149.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +<div> +bar +</div> + +=====================================output===================================== +Foo + +<div> +bar +</div> + +================================================================================ +`; + +exports[`example-150.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div> +bar +</div> +*foo* + +=====================================output===================================== +<div> +bar +</div> +*foo* + +================================================================================ +`; + +exports[`example-151.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +<a href="bar"> +baz + +=====================================output===================================== +Foo <a href="bar"> baz + +================================================================================ +`; + +exports[`example-152.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div> + +*Emphasized* text. + +</div> + +=====================================output===================================== +<div> + +_Emphasized_ text. + +</div> + +================================================================================ +`; + +exports[`example-153.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<div> +*Emphasized* text. +</div> + +=====================================output===================================== +<div> +*Emphasized* text. +</div> + +================================================================================ +`; + +exports[`example-154.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<table> + +<tr> + +<td> +Hi +</td> + +</tr> + +</table> + +=====================================output===================================== +<table> + +<tr> + +<td> +Hi +</td> + +</tr> + +</table> + +================================================================================ +`; + +exports[`example-155.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<table> + + <tr> + + <td> + Hi + </td> + + </tr> + +</table> + +=====================================output===================================== +<table> + + <tr> + + <td> + Hi + </td> + + </tr> + +</table> + +================================================================================ +`; + +exports[`example-156.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url "title" + +[foo] + +=====================================output===================================== +[foo]: /url "title" + +[foo] + +================================================================================ +`; + +exports[`example-157.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + [foo]: + /url + 'the title' + +[foo] + +=====================================output===================================== +[foo]: /url "the title" + +[foo] + +================================================================================ +`; + +exports[`example-158.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Foo*bar\\]]:my_(url) 'title (with parens)' + +[Foo*bar\\]] + +=====================================output===================================== +[Foo*bar\\]]: my_(url) "title (with parens)" + +[Foo*bar\\]] + +================================================================================ +`; + +exports[`example-159.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Foo bar]: +<my%20url> +'title' + +[Foo bar] + +=====================================output===================================== +[Foo bar]: my%20url "title" + +[Foo bar] + +================================================================================ +`; + +exports[`example-161.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url 'title + +with blank line' + +[foo] + +=====================================output===================================== +[foo]: /url 'title + +with blank line' + +[foo] + +================================================================================ +`; + +exports[`example-162.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: +/url + +[foo] + +=====================================output===================================== +[foo]: /url + +[foo] + +================================================================================ +`; + +exports[`example-163.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: + +[foo] + +=====================================output===================================== +[foo]: + +[foo] + +================================================================================ +`; + +exports[`example-164.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url\\bar\\*baz "foo\\"bar\\baz" + +[foo] + +=====================================output===================================== +[foo]: /url\\bar\\*baz "foo\\"bar\\baz" + +[foo] + +================================================================================ +`; + +exports[`example-165.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +[foo]: url + +=====================================output===================================== +[foo] + +[foo]: url + +================================================================================ +`; + +exports[`example-166.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +[foo]: first +[foo]: second + +=====================================output===================================== +[foo] + +[foo]: first +[foo]: second + +================================================================================ +`; + +exports[`example-167.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[FOO]: /url + +[Foo] + +=====================================output===================================== +[FOO]: /url + +[Foo] + +================================================================================ +`; + +exports[`example-168.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[ΑΓΩ]: /φου + +[αγω] + +=====================================output===================================== +[ΑΓΩ]: /φου + +[αγω] + +================================================================================ +`; + +exports[`example-169.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url + +=====================================output===================================== +[foo]: /url + +================================================================================ +`; + +exports[`example-170.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[ +foo +]: /url +bar + +=====================================output===================================== +[ foo ]: /url + +bar + +================================================================================ +`; + +exports[`example-171.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url "title" ok + +=====================================output===================================== +[foo]: /url "title" ok + +================================================================================ +`; + +exports[`example-172.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url +"title" ok + +=====================================output===================================== +[foo]: /url "title" ok + +================================================================================ +`; + +exports[`example-173.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + [foo]: /url "title" + +[foo] + +=====================================output===================================== + [foo]: /url "title" + +[foo] + +================================================================================ +`; + +exports[`example-174.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` +[foo]: /url +\`\`\` + +[foo] + +=====================================output===================================== +\`\`\` +[foo]: /url +\`\`\` + +[foo] + +================================================================================ +`; + +exports[`example-175.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +[bar]: /baz + +[bar] + +=====================================output===================================== +Foo [bar]: /baz + +[bar] + +================================================================================ +`; + +exports[`example-176.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +# [Foo] +[foo]: /url +> bar + +=====================================output===================================== +# [Foo] + +[foo]: /url + +> bar + +================================================================================ +`; + +exports[`example-177.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz] + +=====================================output===================================== +[foo]: /foo-url "foo" +[bar]: /bar-url "bar" +[baz]: /baz-url + +[foo], [bar], [baz] + +================================================================================ +`; + +exports[`example-178.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +> [foo]: /url + +=====================================output===================================== +[foo] + +> [foo]: /url + +================================================================================ +`; + +exports[`example-179.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aaa + +bbb + +=====================================output===================================== +aaa + +bbb + +================================================================================ +`; + +exports[`example-180.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aaa +bbb + +ccc +ddd + +=====================================output===================================== +aaa bbb + +ccc ddd + +================================================================================ +`; + +exports[`example-181.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aaa + + +bbb + +=====================================output===================================== +aaa + +bbb + +================================================================================ +`; + +exports[`example-182.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + aaa + bbb + +=====================================output===================================== +aaa bbb + +================================================================================ +`; + +exports[`example-183.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aaa + bbb + ccc + +=====================================output===================================== +aaa bbb ccc + +================================================================================ +`; + +exports[`example-184.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + aaa +bbb + +=====================================output===================================== +aaa bbb + +================================================================================ +`; + +exports[`example-185.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + aaa +bbb + +=====================================output===================================== + aaa + +bbb + +================================================================================ +`; + +exports[`example-186.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aaa +bbb + +=====================================output===================================== +aaa +bbb + +================================================================================ +`; + +exports[`example-187.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + + +aaa + + +# aaa + + + +=====================================output===================================== +aaa + +# aaa + +================================================================================ +`; + +exports[`example-188.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> # Foo +> bar +> baz + +=====================================output===================================== +> # Foo +> +> bar baz + +================================================================================ +`; + +exports[`example-189.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +># Foo +>bar +> baz + +=====================================output===================================== +> # Foo +> +> bar baz + +================================================================================ +`; + +exports[`example-190.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + > # Foo + > bar + > baz + +=====================================output===================================== +> # Foo +> +> bar baz + +================================================================================ +`; + +exports[`example-191.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + > # Foo + > bar + > baz + +=====================================output===================================== + > # Foo + > bar + > baz + +================================================================================ +`; + +exports[`example-192.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> # Foo +> bar +baz + +=====================================output===================================== +> # Foo +> +> bar baz + +================================================================================ +`; + +exports[`example-193.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> bar +baz +> foo + +=====================================output===================================== +> bar baz foo + +================================================================================ +`; + +exports[`example-194.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo +--- + +=====================================output===================================== +> foo + +--- + +================================================================================ +`; + +exports[`example-195.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> - foo +- bar + +=====================================output===================================== +> - foo + +- bar + +================================================================================ +`; + +exports[`example-196.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo + bar + +=====================================output===================================== +> foo + + bar + +================================================================================ +`; + +exports[`example-197.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> \`\`\` +foo +\`\`\` + +=====================================output===================================== +> \`\`\` +> foo +> \`\`\` + +\`\`\` + +\`\`\` + +================================================================================ +`; + +exports[`example-198.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo + - bar + +=====================================output===================================== +> foo + + - bar + +================================================================================ +`; + +exports[`example-199.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> + +=====================================output===================================== +> + +================================================================================ +`; + +exports[`example-200.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> +> +> + +=====================================output===================================== +> + +================================================================================ +`; + +exports[`example-201.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> +> foo +> + +=====================================output===================================== +> foo + +================================================================================ +`; + +exports[`example-202.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo + +> bar + +=====================================output===================================== +> foo + +> bar + +================================================================================ +`; + +exports[`example-203.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo +> bar + +=====================================output===================================== +> foo bar + +================================================================================ +`; + +exports[`example-204.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> foo +> +> bar + +=====================================output===================================== +> foo +> +> bar + +================================================================================ +`; + +exports[`example-205.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +> bar + +=====================================output===================================== +foo + +> bar + +================================================================================ +`; + +exports[`example-206.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> aaa +*** +> bbb + +=====================================output===================================== +> aaa + +--- + +> bbb + +================================================================================ +`; + +exports[`example-207.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> bar +baz + +=====================================output===================================== +> bar baz + +================================================================================ +`; + +exports[`example-208.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> bar + +baz + +=====================================output===================================== +> bar + +baz + +================================================================================ +`; + +exports[`example-209.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> bar +> +baz + +=====================================output===================================== +> bar +> +> baz + +================================================================================ +`; + +exports[`example-210.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> > > foo +bar + +=====================================output===================================== +> > > foo bar + +================================================================================ +`; + +exports[`example-211.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +>>> foo +> bar +>>baz + +=====================================output===================================== +> > > foo bar baz + +================================================================================ +`; + +exports[`example-212.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> code + +> not code + +=====================================output===================================== +> code + +> not code + +================================================================================ +`; + +exports[`example-213.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +A paragraph +with two lines. + + indented code + +> A block quote. + +=====================================output===================================== +A paragraph with two lines. + + indented code + +> A block quote. + +================================================================================ +`; + +exports[`example-214.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. A paragraph + with two lines. + + indented code + + > A block quote. + +=====================================output===================================== +1. A paragraph with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-215.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- one + +two + +=====================================output===================================== +- one + +two + +================================================================================ +`; + +exports[`example-216.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- one + + two + +=====================================output===================================== +- one + + two + +================================================================================ +`; + +exports[`example-217.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - one + + two + +=====================================output===================================== +- one + + two + +================================================================================ +`; + +exports[`example-218.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + - one + + two + +=====================================output===================================== +- one + + two + +================================================================================ +`; + +exports[`example-219.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + > > 1. one +>> +>> two + +=====================================output===================================== +> > 1. one +> > +> > two + +================================================================================ +`; + +exports[`example-220.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +>>- one +>> + > > two + +=====================================output===================================== +> > - one +> > +> > two + +================================================================================ +`; + +exports[`example-221.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +-one + +2.two + +=====================================output===================================== +-one + +2.two + +================================================================================ +`; + +exports[`example-222.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + bar + +- foo + + + bar + +- \`\`\` + foo + + + bar + \`\`\` + +- baz + + + \`\`\` + foo + + + bar + \`\`\` + +=====================================output===================================== +- foo + + bar + +- foo + + bar + +- \`\`\` + foo + + + bar + \`\`\` + +- baz + - \`\`\` + foo + + + bar + \`\`\` + +================================================================================ +`; + +exports[`example-223.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. foo + + \`\`\` + bar + \`\`\` + + baz + + > bam + +=====================================output===================================== +1. foo + + \`\`\` + bar + \`\`\` + + baz + + > bam + +================================================================================ +`; + +exports[`example-224.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Foo + + bar + + baz + +=====================================output===================================== +- Foo + + bar + + baz + +================================================================================ +`; + +exports[`example-225.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- Foo + + bar + + + baz + +=====================================output===================================== +- Foo + + bar + + + baz + +================================================================================ +`; + +exports[`example-226.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +123456789. ok + +=====================================output===================================== +123456789. ok + +================================================================================ +`; + +exports[`example-227.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1234567890. not ok + +=====================================output===================================== +1234567890. not ok + +================================================================================ +`; + +exports[`example-228.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +0. ok + +=====================================output===================================== +0. ok + +================================================================================ +`; + +exports[`example-229.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +003. ok + +=====================================output===================================== +3. ok + +================================================================================ +`; + +exports[`example-230.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +-1. not ok + +=====================================output===================================== +-1. not ok + +================================================================================ +`; + +exports[`example-231.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + bar + +=====================================output===================================== +- foo + + bar + +================================================================================ +`; + +exports[`example-232.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 10. foo + + bar + +=====================================output===================================== +10. foo + + bar + +================================================================================ +`; + +exports[`example-233.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + indented code + +paragraph + + more code + +=====================================output===================================== + indented code + +paragraph + + more code + +================================================================================ +`; + +exports[`example-234.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. indented code + + paragraph + + more code + +=====================================output===================================== +1. indented code + + paragraph + + more code + +================================================================================ +`; + +exports[`example-235.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. indented code + + paragraph + + more code + +=====================================output===================================== +1. indented code + + paragraph + + more code + +================================================================================ +`; + +exports[`example-236.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + foo + +bar + +=====================================output===================================== +foo + +bar + +================================================================================ +`; + +exports[`example-237.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + bar + +=====================================output===================================== +- foo + +bar + +================================================================================ +`; + +exports[`example-238.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + bar + +=====================================output===================================== +- foo + + bar + +================================================================================ +`; + +exports[`example-240.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- + + foo + +=====================================output===================================== +- foo + +================================================================================ +`; + +exports[`example-241.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +- +- bar + +=====================================output===================================== +- foo +- +- bar + +================================================================================ +`; + +exports[`example-242.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +- +- bar + +=====================================output===================================== +- foo +- +- bar + +================================================================================ +`; + +exports[`example-243.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. foo +2. +3. bar + +=====================================output===================================== +1. foo +2. +3. bar + +================================================================================ +`; + +exports[`example-244.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* + +=====================================output===================================== +- + +================================================================================ +`; + +exports[`example-245.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph + with two lines. + + indented code + + > A block quote. + +=====================================output===================================== +1. A paragraph with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-246.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph + with two lines. + + indented code + + > A block quote. + +=====================================output===================================== +1. A paragraph with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-247.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph + with two lines. + + indented code + + > A block quote. + +=====================================output===================================== +1. A paragraph with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-248.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph + with two lines. + + indented code + + > A block quote. + +=====================================output===================================== + 1. A paragraph + with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-249.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph +with two lines. + + indented code + + > A block quote. + +=====================================output===================================== +1. A paragraph with two lines. + + indented code + + > A block quote. + +================================================================================ +`; + +exports[`example-250.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + 1. A paragraph + with two lines. + +=====================================output===================================== +1. A paragraph with two lines. + +================================================================================ +`; + +exports[`example-251.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> 1. > Blockquote +continued here. + +=====================================output===================================== +> 1. > Blockquote continued here. + +================================================================================ +`; + +exports[`example-252.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +> 1. > Blockquote +> continued here. + +=====================================output===================================== +> 1. > Blockquote continued here. + +================================================================================ +`; + +exports[`example-253.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + - bar + - baz + +=====================================output===================================== +- foo + - bar + - baz + +================================================================================ +`; + +exports[`example-254.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + - bar + - baz + +=====================================output===================================== +- foo +- bar +- baz + +================================================================================ +`; + +exports[`example-255.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +10) foo + - bar + +=====================================output===================================== +10. foo + - bar + +================================================================================ +`; + +exports[`example-256.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +10) foo + - bar + +=====================================output===================================== +10. foo + +- bar + +================================================================================ +`; + +exports[`example-257.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- - foo + +=====================================output===================================== +- - foo + +================================================================================ +`; + +exports[`example-258.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. - 2. foo + +=====================================output===================================== +1. - 2. foo + +================================================================================ +`; + +exports[`example-259.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- # Foo +- Bar + --- + baz + +=====================================output===================================== +- # Foo +- ## Bar + baz + +================================================================================ +`; + +exports[`example-260.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +- bar ++ baz + +=====================================output===================================== +- foo +- bar + +* baz + +================================================================================ +`; + +exports[`example-261.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. foo +2. bar +3) baz + +=====================================output===================================== +1. foo +2. bar + +3) baz + +================================================================================ +`; + +exports[`example-262.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo +- bar +- baz + +=====================================output===================================== +Foo + +- bar +- baz + +================================================================================ +`; + +exports[`example-263.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +The number of windows in my house is +14. The number of doors is 6. + +=====================================output===================================== +The number of windows in my house is 14. The number of doors is 6. + +================================================================================ +`; + +exports[`example-264.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + +- bar + + +- baz + +=====================================output===================================== +- foo + +- bar + +- baz + +================================================================================ +`; + +exports[`example-265.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + + bar +- baz + +=====================================output===================================== +- foo + + bar + +- baz + +================================================================================ +`; + +exports[`example-266.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + - bar + - baz + + + bim + +=====================================output===================================== +- foo + - bar + - baz + + bim + +================================================================================ +`; + +exports[`example-267.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo +- bar + + +- baz +- bim + +=====================================output===================================== +- foo +- bar + +- baz +- bim + +================================================================================ +`; + +exports[`example-268.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- foo + + notcode + +- foo + + + code + +=====================================output===================================== +- foo + + notcode + +- foo + + code + +================================================================================ +`; + +exports[`example-269.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + - b + - c + - d + - e + - f + - g + - h +- i + +=====================================output===================================== +- a +- b +- c +- d +- e +- f +- g +- h +- i + +================================================================================ +`; + +exports[`example-271.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a +- b + +- c + +=====================================output===================================== +- a +- b + +- c + +================================================================================ +`; + +exports[`example-272.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* a +* + +* c + +=====================================output===================================== +- a +- + +- c + +================================================================================ +`; + +exports[`example-273.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a +- b + + c +- d + +=====================================output===================================== +- a +- b + + c + +- d + +================================================================================ +`; + +exports[`example-274.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a +- b + + [ref]: /url +- d + +=====================================output===================================== +- a +- b + + [ref]: /url + +- d + +================================================================================ +`; + +exports[`example-276.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + - b + + c +- d + +=====================================output===================================== +- a + - b + + c + +- d + +================================================================================ +`; + +exports[`example-277.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* a + > b + > +* c + +=====================================output===================================== +- a + > b +- c + +================================================================================ +`; + +exports[`example-278.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + > b + \`\`\` + c + \`\`\` +- d + +=====================================output===================================== +- a + > b + \`\`\` + c + \`\`\` +- d + +================================================================================ +`; + +exports[`example-279.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + +=====================================output===================================== +- a + +================================================================================ +`; + +exports[`example-280.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + - b + +=====================================output===================================== +- a + - b + +================================================================================ +`; + +exports[`example-281.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +1. \`\`\` + foo + \`\`\` + + bar + +=====================================output===================================== +1. \`\`\` + foo + \`\`\` + + bar + +================================================================================ +`; + +exports[`example-282.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* foo + * bar + + baz + +=====================================output===================================== +- foo + - bar + + baz + +================================================================================ +`; + +exports[`example-283.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +- a + - b + - c + +- d + - e + - f + +=====================================output===================================== +- a + - b + - c + +- d + - e + - f + +================================================================================ +`; + +exports[`example-284.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`hi\`lo\` + +=====================================output===================================== +\`hi\`lo\` + +================================================================================ +`; + +exports[`example-285.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\\`\\{\\|\\}\\~ + +=====================================output===================================== +\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\\`\\{\\|\\}\\~ + +================================================================================ +`; + +exports[`example-286.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\ \\A\\a\\ \\3\\φ\\« + +=====================================output===================================== +\\ \\A\\a\\ \\3\\φ\\« + +================================================================================ +`; + +exports[`example-287.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\*not emphasized* +\\<br/> not a tag +\\[not a link](/foo) +\\\`not code\` +1\\. not a list +\\* not a list +\\# not a heading +\\[foo]: /url "not a reference" + +=====================================output===================================== +\\*not emphasized\\* \\<br/> not a tag \\[not a link](/foo) \\\`not code\` 1\\. not a +list \\* not a list \\# not a heading \\[foo]: /url "not a reference" + +================================================================================ +`; + +exports[`example-288.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\\\*emphasis* + +=====================================output===================================== +\\\\_emphasis_ + +================================================================================ +`; + +exports[`example-289.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo\\ +bar + +=====================================output===================================== +foo\\ +bar + +================================================================================ +`; + +exports[`example-290.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` \\[\\\` \`\` + +=====================================output===================================== +\`\` \\[\\\` \`\` + +================================================================================ +`; + +exports[`example-291.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + \\[\\] + +=====================================output===================================== + \\[\\] + +================================================================================ +`; + +exports[`example-292.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +~~~ +\\[\\] +~~~ + +=====================================output===================================== +\`\`\` +\\[\\] +\`\`\` + +================================================================================ +`; + +exports[`example-293.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://example.com?find=\\*> + +=====================================output===================================== +<http://example.com?find=\\*> + +================================================================================ +`; + +exports[`example-294.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="/bar\\/)"> + +=====================================output===================================== +<a href="/bar\\/)"> + +================================================================================ +`; + +exports[`example-295.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo](/bar\\* "ti\\*tle") + +=====================================output===================================== +[foo](/bar* "ti*tle") + +================================================================================ +`; + +exports[`example-296.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +[foo]: /bar\\* "ti\\*tle" + +=====================================output===================================== +[foo] + +[foo]: /bar* "ti*tle" + +================================================================================ +`; + +exports[`example-297.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` foo\\+bar +foo +\`\`\` + +=====================================output===================================== +\`\`\`foo+bar +foo +\`\`\` + +================================================================================ +`; + +exports[`example-298.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&nbsp; &amp; &copy; &AElig; &Dcaron; +&frac34; &HilbertSpace; &DifferentialD; +&ClockwiseContourIntegral; &ngE; + +=====================================output===================================== +&nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; +&ClockwiseContourIntegral; ≧̸ + +================================================================================ +`; + +exports[`example-299.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&#35; &#1234; &#992; &#98765432; &#0; + +=====================================output===================================== +&#35; &#1234; &#992; &#98765432; &#0; + +================================================================================ +`; + +exports[`example-300.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&#X22; &#XD06; &#xcab; + +=====================================output===================================== +&#X22; &#XD06; &#xcab; + +================================================================================ +`; + +exports[`example-301.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&nbsp &x; &#; &#x; +&ThisIsNotDefined; &hi?; + +=====================================output===================================== +&nbsp &x; &#; &#x; &ThisIsNotDefined; &hi?; + +================================================================================ +`; + +exports[`example-302.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&copy + +=====================================output===================================== +&copy + +================================================================================ +`; + +exports[`example-303.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +&MadeUpEntity; + +=====================================output===================================== +&MadeUpEntity; + +================================================================================ +`; + +exports[`example-304.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="&ouml;&ouml;.html"> + +=====================================output===================================== +<a href="&ouml;&ouml;.html"> + +================================================================================ +`; + +exports[`example-305.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo](/f&ouml;&ouml; "f&ouml;&ouml;") + +=====================================output===================================== +[foo](/föö "föö") + +================================================================================ +`; + +exports[`example-306.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +[foo]: /f&ouml;&ouml; "f&ouml;&ouml;" + +=====================================output===================================== +[foo] + +[foo]: /föö "föö" + +================================================================================ +`; + +exports[`example-307.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\`\` f&ouml;&ouml; +foo +\`\`\` + +=====================================output===================================== +\`\`\`föö +foo +\`\`\` + +================================================================================ +`; + +exports[`example-308.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`f&ouml;&ouml;\` + +=====================================output===================================== +\`f&ouml;&ouml;\` + +================================================================================ +`; + +exports[`example-309.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== + f&ouml;f&ouml; + +=====================================output===================================== + f&ouml;f&ouml; + +================================================================================ +`; + +exports[`example-310.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo\` + +=====================================output===================================== +\`foo\` + +================================================================================ +`; + +exports[`example-311.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` foo \` bar \`\` + +=====================================output===================================== +\`\`foo \` bar \`\` + +================================================================================ +`; + +exports[`example-312.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\` \`\` \` + +=====================================output===================================== +\` \`\` \` + +================================================================================ +`; + +exports[`example-313.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`\` +foo +\`\` + +=====================================output===================================== +\`foo\` + +================================================================================ +`; + +exports[`example-314.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo bar + baz\` + +=====================================output===================================== +\`foo bar baz\` + +================================================================================ +`; + +exports[`example-315.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo \`\` bar\` + +=====================================output===================================== +\`foo \`\` bar\` + +================================================================================ +`; + +exports[`example-316.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo\\\`bar\` + +=====================================output===================================== +\`foo\\\`bar\` + +================================================================================ +`; + +exports[`example-317.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo\`*\` + +=====================================output===================================== +_foo\`_\` + +================================================================================ +`; + +exports[`example-318.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[not a \`link](/foo\`) + +=====================================output===================================== +[not a \`link](/foo\`) + +================================================================================ +`; + +exports[`example-319.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`<a href="\`">\` + +=====================================output===================================== +\`<a href="\`">\` + +================================================================================ +`; + +exports[`example-320.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="\`">\` + +=====================================output===================================== +<a href="\`">\` + +================================================================================ +`; + +exports[`example-321.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`<http://foo.bar.\`baz>\` + +=====================================output===================================== +\`<http://foo.bar.\`baz>\` + +================================================================================ +`; + +exports[`example-322.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://foo.bar.\`baz>\` + +=====================================output===================================== +<http://foo.bar.\`baz>\` + +================================================================================ +`; + +exports[`example-324.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`foo + +=====================================output===================================== +\`foo + +================================================================================ +`; + +exports[`example-325.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo bar* + +=====================================output===================================== +_foo bar_ + +================================================================================ +`; + +exports[`example-326.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a * foo bar* + +=====================================output===================================== +a _ foo bar_ + +================================================================================ +`; + +exports[`example-327.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a*"foo"* + +=====================================output===================================== +a*"foo"* + +================================================================================ +`; + +exports[`example-328.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +* a * + +=====================================output===================================== +_ a _ + +================================================================================ +`; + +exports[`example-329.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo*bar* + +=====================================output===================================== +foo*bar* + +================================================================================ +`; + +exports[`example-330.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +5*6*78 + +=====================================output===================================== +5*6*78 + +================================================================================ +`; + +exports[`example-331.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo bar_ + +=====================================output===================================== +_foo bar_ + +================================================================================ +`; + +exports[`example-332.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_ foo bar_ + +=====================================output===================================== +_ foo bar_ + +================================================================================ +`; + +exports[`example-333.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a_"foo"_ + +=====================================output===================================== +a*"foo"* + +================================================================================ +`; + +exports[`example-334.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo_bar_ + +=====================================output===================================== +foo*bar* + +================================================================================ +`; + +exports[`example-335.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +5_6_78 + +=====================================output===================================== +5_6_78 + +================================================================================ +`; + +exports[`example-336.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +пристаням_стремятся_ + +=====================================output===================================== +пристаням*стремятся* + +================================================================================ +`; + +exports[`example-337.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +aa_"bb"_cc + +=====================================output===================================== +aa\\_"bb"\\_cc + +================================================================================ +`; + +exports[`example-338.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo-_(bar)_ + +=====================================output===================================== +foo-_(bar)_ + +================================================================================ +`; + +exports[`example-339.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo* + +=====================================output===================================== +\\_foo\\* + +================================================================================ +`; + +exports[`example-340.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo bar * + +=====================================output===================================== +_foo bar _ + +================================================================================ +`; + +exports[`example-341.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo bar +* + +=====================================output===================================== +\\*foo bar + +- + +================================================================================ +`; + +exports[`example-342.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*(*foo) + +=====================================output===================================== +*(*foo) + +================================================================================ +`; + +exports[`example-343.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*(*foo*)* + +=====================================output===================================== +*(*foo*)* + +================================================================================ +`; + +exports[`example-344.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo*bar + +=====================================output===================================== +*foo*bar + +================================================================================ +`; + +exports[`example-345.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo bar _ + +=====================================output===================================== +_foo bar _ + +================================================================================ +`; + +exports[`example-346.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_(_foo) + +=====================================output===================================== +\\_(\\_foo) + +================================================================================ +`; + +exports[`example-347.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_(_foo_)_ + +=====================================output===================================== +_(\\_foo_)\\_ + +================================================================================ +`; + +exports[`example-348.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo_bar + +=====================================output===================================== +\\_foo_bar + +================================================================================ +`; + +exports[`example-349.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_пристаням_стремятся + +=====================================output===================================== +*пристаням*стремятся + +================================================================================ +`; + +exports[`example-350.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo_bar_baz_ + +=====================================output===================================== +_foo_bar_baz_ + +================================================================================ +`; + +exports[`example-351.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_(bar)_. + +=====================================output===================================== +_(bar)_. + +================================================================================ +`; + +exports[`example-352.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo bar** + +=====================================output===================================== +**foo bar** + +================================================================================ +`; + +exports[`example-353.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +** foo bar** + +=====================================output===================================== +** foo bar** + +================================================================================ +`; + +exports[`example-354.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a**"foo"** + +=====================================output===================================== +a**"foo"** + +================================================================================ +`; + +exports[`example-355.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo**bar** + +=====================================output===================================== +foo**bar** + +================================================================================ +`; + +exports[`example-356.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo bar__ + +=====================================output===================================== +**foo bar** + +================================================================================ +`; + +exports[`example-357.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__ foo bar__ + +=====================================output===================================== +** foo bar** + +================================================================================ +`; + +exports[`example-358.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__ +foo bar__ + +=====================================output===================================== +** foo bar** + +================================================================================ +`; + +exports[`example-359.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +a__"foo"__ + +=====================================output===================================== +a**"foo"** + +================================================================================ +`; + +exports[`example-360.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo__bar__ + +=====================================output===================================== +foo**bar** + +================================================================================ +`; + +exports[`example-361.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +5__6__78 + +=====================================output===================================== +5**6**78 + +================================================================================ +`; + +exports[`example-362.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +пристаням__стремятся__ + +=====================================output===================================== +пристаням**стремятся** + +================================================================================ +`; + +exports[`example-363.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo, __bar__, baz__ + +=====================================output===================================== +**foo, **bar**, baz** + +================================================================================ +`; + +exports[`example-364.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo-__(bar)__ + +=====================================output===================================== +foo-**(bar)** + +================================================================================ +`; + +exports[`example-365.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo bar ** + +=====================================output===================================== +**foo bar ** + +================================================================================ +`; + +exports[`example-366.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**(**foo) + +=====================================output===================================== +**(**foo) + +================================================================================ +`; + +exports[`example-367.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*(**foo**)* + +=====================================output===================================== +_(**foo**)_ + +================================================================================ +`; + +exports[`example-368.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)** + +=====================================output===================================== +**Gomphocarpus (_Gomphocarpus physocarpus_, syn. _Asclepias physocarpa_)** + +================================================================================ +`; + +exports[`example-369.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo "*bar*" foo** + +=====================================output===================================== +**foo "_bar_" foo** + +================================================================================ +`; + +exports[`example-370.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo**bar + +=====================================output===================================== +**foo**bar + +================================================================================ +`; + +exports[`example-371.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo bar __ + +=====================================output===================================== +**foo bar ** + +================================================================================ +`; + +exports[`example-372.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__(__foo) + +=====================================output===================================== +**(**foo) + +================================================================================ +`; + +exports[`example-373.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_(__foo__)_ + +=====================================output===================================== +_(**foo**)_ + +================================================================================ +`; + +exports[`example-374.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo__bar + +=====================================output===================================== +**foo**bar + +================================================================================ +`; + +exports[`example-375.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__пристаням__стремятся + +=====================================output===================================== +**пристаням**стремятся + +================================================================================ +`; + +exports[`example-376.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo__bar__baz__ + +=====================================output===================================== +**foo**bar**baz** + +================================================================================ +`; + +exports[`example-377.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__(bar)__. + +=====================================output===================================== +**(bar)**. + +================================================================================ +`; + +exports[`example-378.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo [bar](/url)* + +=====================================output===================================== +_foo [bar](/url)_ + +================================================================================ +`; + +exports[`example-379.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo +bar* + +=====================================output===================================== +_foo bar_ + +================================================================================ +`; + +exports[`example-380.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo __bar__ baz_ + +=====================================output===================================== +_foo **bar** baz_ + +================================================================================ +`; + +exports[`example-381.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo _bar_ baz_ + +=====================================output===================================== +_foo \\_bar_ baz\\_ + +================================================================================ +`; + +exports[`example-382.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo_ bar_ + +=====================================output===================================== +\\__foo_ bar\\_ + +================================================================================ +`; + +exports[`example-383.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo *bar** + +=====================================output===================================== +*foo *bar\\*\\* + +================================================================================ +`; + +exports[`example-384.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo **bar** baz* + +=====================================output===================================== +_foo **bar** baz_ + +================================================================================ +`; + +exports[`example-385.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo**bar**baz* + +=====================================output===================================== +_foo**bar**baz_ + +================================================================================ +`; + +exports[`example-386.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +***foo** bar* + +=====================================output===================================== +**\\*foo** bar\\* + +================================================================================ +`; + +exports[`example-387.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo **bar*** + +=====================================output===================================== +\\*foo **bar\\*** + +================================================================================ +`; + +exports[`example-388.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo**bar*** + +=====================================output===================================== +\\*foo**bar\\*** + +================================================================================ +`; + +exports[`example-390.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo [*bar*](/url)* + +=====================================output===================================== +*foo [*bar*](/url)* + +================================================================================ +`; + +exports[`example-391.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +** is not an empty emphasis + +=====================================output===================================== +\\*\\* is not an empty emphasis + +================================================================================ +`; + +exports[`example-392.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**** is not an empty strong emphasis + +=====================================output===================================== +\\*\\*\\*\\* is not an empty strong emphasis + +================================================================================ +`; + +exports[`example-393.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo [bar](/url)** + +=====================================output===================================== +**foo [bar](/url)** + +================================================================================ +`; + +exports[`example-394.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo +bar** + +=====================================output===================================== +**foo bar** + +================================================================================ +`; + +exports[`example-395.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo _bar_ baz__ + +=====================================output===================================== +**foo _bar_ baz** + +================================================================================ +`; + +exports[`example-396.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo __bar__ baz__ + +=====================================output===================================== +**foo **bar** baz** + +================================================================================ +`; + +exports[`example-397.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +____foo__ bar__ + +=====================================output===================================== +\\_**\\_foo** bar\\_\\_ + +================================================================================ +`; + +exports[`example-398.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo **bar**** + +=====================================output===================================== +**foo **bar\\*\\*\\*\\* + +================================================================================ +`; + +exports[`example-399.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo *bar* baz** + +=====================================output===================================== +**foo _bar_ baz** + +================================================================================ +`; + +exports[`example-400.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo*bar*baz** + +=====================================output===================================== +**foo*bar*baz** + +================================================================================ +`; + +exports[`example-401.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +***foo* bar** + +=====================================output===================================== +**_foo_ bar** + +================================================================================ +`; + +exports[`example-402.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo *bar*** + +=====================================output===================================== +**foo _bar_** + +================================================================================ +`; + +exports[`example-403.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo *bar **baz** +bim* bop** + +=====================================output===================================== +**foo \\*bar **baz** bim\\* bop** + +================================================================================ +`; + +exports[`example-404.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo [*bar*](/url)** + +=====================================output===================================== +**foo [_bar_](/url)** + +================================================================================ +`; + +exports[`example-405.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__ is not an empty emphasis + +=====================================output===================================== +\\_\\_ is not an empty emphasis + +================================================================================ +`; + +exports[`example-406.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +____ is not an empty strong emphasis + +=====================================output===================================== +\\_\\_\\_\\_ is not an empty strong emphasis + +================================================================================ +`; + +exports[`example-407.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo *** + +=====================================output===================================== +foo \\*\\*\\* + +================================================================================ +`; + +exports[`example-408.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo *\\** + +=====================================output===================================== +foo \\*\\*\\* + +================================================================================ +`; + +exports[`example-410.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo ***** + +=====================================output===================================== +foo **\\*** + +================================================================================ +`; + +exports[`example-411.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo **\\*** + +=====================================output===================================== +foo **\\*** + +================================================================================ +`; + +exports[`example-412.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo **_** + +=====================================output===================================== +foo **\\_** + +================================================================================ +`; + +exports[`example-413.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo* + +=====================================output===================================== +\\*_foo_ + +================================================================================ +`; + +exports[`example-414.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo** + +=====================================output===================================== +\\*foo\\*\\* + +================================================================================ +`; + +exports[`example-415.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +***foo** + +=====================================output===================================== +**\\*foo** + +================================================================================ +`; + +exports[`example-417.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo*** + +=====================================output===================================== +**foo\\*** + +================================================================================ +`; + +exports[`example-418.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo**** + +=====================================output===================================== +\\*foo\\*\\*\\*\\* + +================================================================================ +`; + +exports[`example-419.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo ___ + +=====================================output===================================== +foo \\_\\_\\_ + +================================================================================ +`; + +exports[`example-420.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo _\\__ + +=====================================output===================================== +foo \\_\\_\\_ + +================================================================================ +`; + +exports[`example-421.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo _*_ + +=====================================output===================================== +foo _\\*_ + +================================================================================ +`; + +exports[`example-422.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo _____ + +=====================================output===================================== +foo **\\_** + +================================================================================ +`; + +exports[`example-423.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo __\\___ + +=====================================output===================================== +foo **\\_** + +================================================================================ +`; + +exports[`example-424.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo __*__ + +=====================================output===================================== +foo **\\*** + +================================================================================ +`; + +exports[`example-425.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo_ + +=====================================output===================================== +\\__foo_ + +================================================================================ +`; + +exports[`example-426.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo__ + +=====================================output===================================== +\\_foo\\_\\_ + +================================================================================ +`; + +exports[`example-427.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +___foo__ + +=====================================output===================================== +**\\_foo** + +================================================================================ +`; + +exports[`example-428.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +____foo_ + +=====================================output===================================== +\\__\\_\\_foo_ + +================================================================================ +`; + +exports[`example-429.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo___ + +=====================================output===================================== +**foo\\_** + +================================================================================ +`; + +exports[`example-430.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo____ + +=====================================output===================================== +\\_foo\\_\\_\\_\\_ + +================================================================================ +`; + +exports[`example-431.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo** + +=====================================output===================================== +**foo** + +================================================================================ +`; + +exports[`example-432.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*_foo_* + +=====================================output===================================== +_*foo*_ + +================================================================================ +`; + +exports[`example-433.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__foo__ + +=====================================output===================================== +**foo** + +================================================================================ +`; + +exports[`example-434.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_*foo*_ + +=====================================output===================================== +_*foo*_ + +================================================================================ +`; + +exports[`example-435.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +****foo**** + +=====================================output===================================== +\\***\\*foo\\*\\*** + +================================================================================ +`; + +exports[`example-436.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +____foo____ + +=====================================output===================================== +\\_**\\_foo\\_\\_** + +================================================================================ +`; + +exports[`example-437.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +******foo****** + +=====================================output===================================== +**\\*\\***foo**\\*\\*** + +================================================================================ +`; + +exports[`example-438.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +***foo*** + +=====================================output===================================== +**_foo_** + +================================================================================ +`; + +exports[`example-439.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_____foo_____ + +=====================================output===================================== +**\\_**foo**\\_** + +================================================================================ +`; + +exports[`example-440.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo _bar* baz_ + +=====================================output===================================== +_foo \\_bar_ baz\\_ + +================================================================================ +`; + +exports[`example-441.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo*bar** + +=====================================output===================================== +**foo\\*bar** + +================================================================================ +`; + +exports[`example-442.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo __bar *baz bim__ bam* + +=====================================output===================================== +*foo \\_\\_bar *baz bim\\_\\_ bam\\* + +================================================================================ +`; + +exports[`example-443.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**foo **bar baz** + +=====================================output===================================== +**foo **bar baz\\*\\* + +================================================================================ +`; + +exports[`example-444.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo *bar baz* + +=====================================output===================================== +*foo *bar baz\\* + +================================================================================ +`; + +exports[`example-445.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*[bar*](/url) + +=====================================output===================================== +_[bar_](/url) + +================================================================================ +`; + +exports[`example-446.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_foo [bar_](/url) + +=====================================output===================================== +_foo [bar_](/url) + +================================================================================ +`; + +exports[`example-447.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*<img src="foo" title="*"/> + +=====================================output===================================== +_<img src="foo" title="_"/> + +================================================================================ +`; + +exports[`example-448.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**<a href="**"> + +=====================================output===================================== +**<a href="**"> + +================================================================================ +`; + +exports[`example-449.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__<a href="__"> + +=====================================output===================================== +**<a href="**"> + +================================================================================ +`; + +exports[`example-450.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*a \`*\`* + +=====================================output===================================== +_a \`_\`\\* + +================================================================================ +`; + +exports[`example-451.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +_a \`_\`_ + +=====================================output===================================== +_a \`_\`\\_ + +================================================================================ +`; + +exports[`example-452.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +**a<http://foo.bar/?q=**> + +=====================================output===================================== +**a<http://foo.bar/?q=**> + +================================================================================ +`; + +exports[`example-453.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +__a<http://foo.bar/?q=__> + +=====================================output===================================== +**a<http://foo.bar/?q=**> + +================================================================================ +`; + +exports[`example-454.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/uri "title") + +=====================================output===================================== +[link](/uri "title") + +================================================================================ +`; + +exports[`example-455.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/uri) + +=====================================output===================================== +[link](/uri) + +================================================================================ +`; + +exports[`example-456.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link]() + +=====================================output===================================== +[link]() + +================================================================================ +`; + +exports[`example-457.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](<>) + +=====================================output===================================== +[link]() + +================================================================================ +`; + +exports[`example-458.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/my uri) + +=====================================output===================================== +[link](/my uri) + +================================================================================ +`; + +exports[`example-459.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](</my uri>) + +=====================================output===================================== +[link](</my uri>) + +================================================================================ +`; + +exports[`example-460.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo +bar) + +=====================================output===================================== +[link](foo bar) + +================================================================================ +`; + +exports[`example-461.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](<foo +bar>) + +=====================================output===================================== +[link](<foo +bar>) + +================================================================================ +`; + +exports[`example-462.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](\\(foo\\)) + +=====================================output===================================== +[link](<(foo)>) + +================================================================================ +`; + +exports[`example-463.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link]((foo)and(bar)) + +=====================================output===================================== +[link](<(foo)and(bar)>) + +================================================================================ +`; + +exports[`example-464.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo(and(bar))) + +=====================================output===================================== +[link](<foo(and(bar))>) + +================================================================================ +`; + +exports[`example-465.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo(and\\(bar\\))) + +=====================================output===================================== +[link](<foo(and(bar))>) + +================================================================================ +`; + +exports[`example-466.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](<foo(and(bar))>) + +=====================================output===================================== +[link](<foo(and(bar))>) + +================================================================================ +`; + +exports[`example-467.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo\\)\\:) + +=====================================output===================================== +[link](<foo):>) + +================================================================================ +`; + +exports[`example-468.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) + +=====================================output===================================== +[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag) + +================================================================================ +`; + +exports[`example-469.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo\\bar) + +=====================================output===================================== +[link](foo\\bar) + +================================================================================ +`; + +exports[`example-470.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](foo%20b&auml;) + +=====================================output===================================== +[link](foo%20bä) + +================================================================================ +`; + +exports[`example-471.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link]("title") + +=====================================output===================================== +[link]("title") + +================================================================================ +`; + +exports[`example-472.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/url "title") +[link](/url 'title') +[link](/url (title)) + +=====================================output===================================== +[link](/url "title") [link](/url "title") [link](/url "title") + +================================================================================ +`; + +exports[`example-473.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/url "title \\"&quot;") + +=====================================output===================================== +[link](/url 'title ""') + +================================================================================ +`; + +exports[`example-474.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/url "title "and" title") + +=====================================output===================================== +[link](/url "title "and" title") + +================================================================================ +`; + +exports[`example-475.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link](/url 'title "and" title') + +=====================================output===================================== +[link](/url 'title "and" title') + +================================================================================ +`; + +exports[`example-476.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link]( /uri + "title" ) + +=====================================output===================================== +[link](/uri "title") + +================================================================================ +`; + +exports[`example-477.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link] (/uri) + +=====================================output===================================== +[link] (/uri) + +================================================================================ +`; + +exports[`example-478.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link [foo [bar]]](/uri) + +=====================================output===================================== +[link [foo [bar]]](/uri) + +================================================================================ +`; + +exports[`example-479.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link] bar](/uri) + +=====================================output===================================== +[link] bar](/uri) + +================================================================================ +`; + +exports[`example-480.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link [bar](/uri) + +=====================================output===================================== +[link [bar](/uri) + +================================================================================ +`; + +exports[`example-481.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link \\[bar](/uri) + +=====================================output===================================== +[link \\[bar](/uri) + +================================================================================ +`; + +exports[`example-482.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link *foo **bar** \`#\`*](/uri) + +=====================================output===================================== +[link _foo **bar** \`#\`_](/uri) + +================================================================================ +`; + +exports[`example-483.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[![moon](moon.jpg)](/uri) + +=====================================output===================================== +[![moon](moon.jpg)](/uri) + +================================================================================ +`; + +exports[`example-484.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo [bar](/uri)](/uri) + +=====================================output===================================== +[foo [bar](/uri)](/uri) + +================================================================================ +`; + +exports[`example-485.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo *[bar [baz](/uri)](/uri)*](/uri) + +=====================================output===================================== +[foo _[bar [baz](/uri)](/uri)_](/uri) + +================================================================================ +`; + +exports[`example-486.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![[[foo](uri1)](uri2)](uri3) + +=====================================output===================================== +![[[foo](uri1)](uri2)](uri3) + +================================================================================ +`; + +exports[`example-487.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*[foo*](/uri) + +=====================================output===================================== +_[foo_](/uri) + +================================================================================ +`; + +exports[`example-488.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo *bar](baz*) + +=====================================output===================================== +[foo \\*bar](baz*) + +================================================================================ +`; + +exports[`example-489.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo [bar* baz] + +=====================================output===================================== +_foo [bar_ baz] + +================================================================================ +`; + +exports[`example-490.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo <bar attr="](baz)"> + +=====================================output===================================== +[foo <bar attr="](baz)"> + +================================================================================ +`; + +exports[`example-491.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo\`](/uri)\` + +=====================================output===================================== +[foo\`](/uri)\` + +================================================================================ +`; + +exports[`example-492.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo<http://example.com/?search=](uri)> + +=====================================output===================================== +[foo<http://example.com/?search=](uri)> + +================================================================================ +`; + +exports[`example-493.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][bar] + +[bar]: /url "title" + +=====================================output===================================== +[foo][bar] + +[bar]: /url "title" + +================================================================================ +`; + +exports[`example-494.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link [foo [bar]]][ref] + +[ref]: /uri + +=====================================output===================================== +[link [foo [bar]]][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-495.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link \\[bar][ref] + +[ref]: /uri + +=====================================output===================================== +[link \\[bar][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-496.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[link *foo **bar** \`#\`*][ref] + +[ref]: /uri + +=====================================output===================================== +[link _foo **bar** \`#\`_][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-497.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[![moon](moon.jpg)][ref] + +[ref]: /uri + +=====================================output===================================== +[![moon](moon.jpg)][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-498.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo [bar](/uri)][ref] + +[ref]: /uri + +=====================================output===================================== +[foo [bar](/uri)][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-499.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo *bar [baz][ref]*][ref] + +[ref]: /uri + +=====================================output===================================== +[foo _bar [baz][ref]_][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-500.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*[foo*][ref] + +[ref]: /uri + +=====================================output===================================== +_[foo_][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-501.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo *bar][ref] + +[ref]: /uri + +=====================================output===================================== +[foo \\*bar][ref] + +[ref]: /uri + +================================================================================ +`; + +exports[`example-502.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo <bar attr="][ref]"> + +[ref]: /uri + +=====================================output===================================== +[foo <bar attr="][ref]"> + +[ref]: /uri + +================================================================================ +`; + +exports[`example-503.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo\`][ref]\` + +[ref]: /uri + +=====================================output===================================== +[foo\`][ref]\` + +[ref]: /uri + +================================================================================ +`; + +exports[`example-504.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo<http://example.com/?search=][ref]> + +[ref]: /uri + +=====================================output===================================== +[foo<http://example.com/?search=][ref]> + +[ref]: /uri + +================================================================================ +`; + +exports[`example-505.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][BaR] + +[bar]: /url "title" + +=====================================output===================================== +[foo][BaR] + +[bar]: /url "title" + +================================================================================ +`; + +exports[`example-506.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url + +=====================================output===================================== +[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url + +================================================================================ +`; + +exports[`example-507.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Foo + bar]: /url + +[Baz][Foo bar] + +=====================================output===================================== +[Foo bar]: /url + +[Baz][Foo bar] + +================================================================================ +`; + +exports[`example-508.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] [bar] + +[bar]: /url "title" + +=====================================output===================================== +[foo] [bar] + +[bar]: /url "title" + +================================================================================ +`; + +exports[`example-509.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] +[bar] + +[bar]: /url "title" + +=====================================output===================================== +[foo] [bar] + +[bar]: /url "title" + +================================================================================ +`; + +exports[`example-510.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo]: /url1 + +[foo]: /url2 + +[bar][foo] + +=====================================output===================================== +[foo]: /url1 +[foo]: /url2 + +[bar][foo] + +================================================================================ +`; + +exports[`example-511.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[bar][foo\\!] + +[foo!]: /url + +=====================================output===================================== +[bar][foo\\!] + +[foo!]: /url + +================================================================================ +`; + +exports[`example-512.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][ref[] + +[ref[]: /uri + +=====================================output===================================== +[foo]ref[] + +[ref[]: /uri + +================================================================================ +`; + +exports[`example-513.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][ref[bar]] + +[ref[bar]]: /uri + +=====================================output===================================== +[foo]ref[bar]] + +[ref[bar]]: /uri + +================================================================================ +`; + +exports[`example-514.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[[[foo]]] + +[[[foo]]]: /url + +=====================================output===================================== +[[[foo]]] + +[[[foo]]]: /url + +================================================================================ +`; + +exports[`example-515.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][ref\\[] + +[ref\\[]: /uri + +=====================================output===================================== +[foo][ref\\[] + +[ref\\[]: /uri + +================================================================================ +`; + +exports[`example-516.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[bar\\\\]: /uri + +[bar\\\\] + +=====================================output===================================== +[bar\\\\]: /uri + +[bar\\\\] + +================================================================================ +`; + +exports[`example-517.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[] + +[]: /uri + +=====================================output===================================== +[] + +[]: /uri + +================================================================================ +`; + +exports[`example-518.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[ + ] + +[ + ]: /uri + +=====================================output===================================== +[ ] + +[ ]: /uri + +================================================================================ +`; + +exports[`example-519.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][] + +[foo]: /url "title" + +=====================================output===================================== +[foo][] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-520.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[*foo* bar][] + +[*foo* bar]: /url "title" + +=====================================output===================================== +[*foo* bar][] + +[*foo* bar]: /url "title" + +================================================================================ +`; + +exports[`example-521.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Foo][] + +[foo]: /url "title" + +=====================================output===================================== +[Foo][] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-522.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] +[] + +[foo]: /url "title" + +=====================================output===================================== +[foo] [] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-523.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] + +[foo]: /url "title" + +=====================================output===================================== +[foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-524.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[*foo* bar] + +[*foo* bar]: /url "title" + +=====================================output===================================== +[*foo* bar] + +[*foo* bar]: /url "title" + +================================================================================ +`; + +exports[`example-525.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[[*foo* bar]] + +[*foo* bar]: /url "title" + +=====================================output===================================== +[[*foo* bar]] + +[*foo* bar]: /url "title" + +================================================================================ +`; + +exports[`example-526.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[[bar [foo] + +[foo]: /url + +=====================================output===================================== +[[bar [foo] + +[foo]: /url + +================================================================================ +`; + +exports[`example-527.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[Foo] + +[foo]: /url "title" + +=====================================output===================================== +[Foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-528.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo] bar + +[foo]: /url + +=====================================output===================================== +[foo] bar + +[foo]: /url + +================================================================================ +`; + +exports[`example-529.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\[foo] + +[foo]: /url "title" + +=====================================output===================================== +\\[foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-530.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo*]: /url + +*[foo*] + +=====================================output===================================== +[foo*]: /url + +_[foo_] + +================================================================================ +`; + +exports[`example-531.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][bar] + +[foo]: /url1 +[bar]: /url2 + +=====================================output===================================== +[foo][bar] + +[foo]: /url1 +[bar]: /url2 + +================================================================================ +`; + +exports[`example-532.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][bar][baz] + +[baz]: /url + +=====================================output===================================== +[foo][bar][baz] + +[baz]: /url + +================================================================================ +`; + +exports[`example-533.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 + +=====================================output===================================== +[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2 + +================================================================================ +`; + +exports[`example-534.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 + +=====================================output===================================== +[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2 + +================================================================================ +`; + +exports[`example-535.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo](/url "title") + +=====================================output===================================== +![foo](/url "title") + +================================================================================ +`; + +exports[`example-536.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" + +=====================================output===================================== +![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks" + +================================================================================ +`; + +exports[`example-537.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo ![bar](/url)](/url2) + +=====================================output===================================== +![foo ![bar](/url)](/url2) + +================================================================================ +`; + +exports[`example-538.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo [bar](/url)](/url2) + +=====================================output===================================== +![foo [bar](/url)](/url2) + +================================================================================ +`; + +exports[`example-539.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" + +=====================================output===================================== +![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks" + +================================================================================ +`; + +exports[`example-540.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" + +=====================================output===================================== +![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks" + +================================================================================ +`; + +exports[`example-541.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo](train.jpg) + +=====================================output===================================== +![foo](train.jpg) + +================================================================================ +`; + +exports[`example-542.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +My ![foo bar](/path/to/train.jpg "title" ) + +=====================================output===================================== +My ![foo bar](/path/to/train.jpg "title") + +================================================================================ +`; + +exports[`example-543.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo](<url>) + +=====================================output===================================== +![foo](url) + +================================================================================ +`; + +exports[`example-544.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![](/url) + +=====================================output===================================== +![](/url) + +================================================================================ +`; + +exports[`example-545.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo][bar] + +[bar]: /url + +=====================================output===================================== +![foo][bar] + +[bar]: /url + +================================================================================ +`; + +exports[`example-546.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo][bar] + +[BAR]: /url + +=====================================output===================================== +![foo][bar] + +[BAR]: /url + +================================================================================ +`; + +exports[`example-547.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo][] + +[foo]: /url "title" + +=====================================output===================================== +![foo][] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-548.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![*foo* bar][] + +[*foo* bar]: /url "title" + +=====================================output===================================== +![*foo* bar][] + +[*foo* bar]: /url "title" + +================================================================================ +`; + +exports[`example-549.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![Foo][] + +[foo]: /url "title" + +=====================================output===================================== +![Foo][] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-550.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo] +[] + +[foo]: /url "title" + +=====================================output===================================== +![foo] [] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-551.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![foo] + +[foo]: /url "title" + +=====================================output===================================== +![foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-552.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![*foo* bar] + +[*foo* bar]: /url "title" + +=====================================output===================================== +![*foo* bar] + +[*foo* bar]: /url "title" + +================================================================================ +`; + +exports[`example-553.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![[foo]] + +[[foo]]: /url "title" + +=====================================output===================================== +![[foo]] + +[[foo]]: /url "title" + +================================================================================ +`; + +exports[`example-554.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +![Foo] + +[foo]: /url "title" + +=====================================output===================================== +![Foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-555.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\!\\[foo] + +[foo]: /url "title" + +=====================================output===================================== +\\!\\[foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-556.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\\![foo] + +[foo]: /url "title" + +=====================================output===================================== +\\![foo] + +[foo]: /url "title" + +================================================================================ +`; + +exports[`example-557.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://foo.bar.baz> + +=====================================output===================================== +<http://foo.bar.baz> + +================================================================================ +`; + +exports[`example-558.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://foo.bar.baz/test?q=hello&id=22&boolean> + +=====================================output===================================== +<http://foo.bar.baz/test?q=hello&id=22&boolean> + +================================================================================ +`; + +exports[`example-559.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<irc://foo.bar:2233/baz> + +=====================================output===================================== +<irc://foo.bar:2233/baz> + +================================================================================ +`; + +exports[`example-560.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<MAILTO:FOO@BAR.BAZ> + +=====================================output===================================== +<MAILTO:FOO@BAR.BAZ> + +================================================================================ +`; + +exports[`example-561.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a+b+c:d> + +=====================================output===================================== +<a+b+c:d> + +================================================================================ +`; + +exports[`example-562.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<made-up-scheme://foo,bar> + +=====================================output===================================== +<made-up-scheme://foo,bar> + +================================================================================ +`; + +exports[`example-563.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://../> + +=====================================output===================================== +<http://../> + +================================================================================ +`; + +exports[`example-564.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<localhost:5001/foo> + +=====================================output===================================== +<localhost:5001/foo> + +================================================================================ +`; + +exports[`example-565.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://foo.bar/baz bim> + +=====================================output===================================== +<http://foo.bar/baz bim> + +================================================================================ +`; + +exports[`example-566.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<http://example.com/\\[\\> + +=====================================output===================================== +<http://example.com/\\[\\> + +================================================================================ +`; + +exports[`example-567.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<foo@bar.example.com> + +=====================================output===================================== +<foo@bar.example.com> + +================================================================================ +`; + +exports[`example-568.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<foo+special@Bar.baz-bar0.com> + +=====================================output===================================== +<foo+special@Bar.baz-bar0.com> + +================================================================================ +`; + +exports[`example-569.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<foo\\+@bar.example.com> + +=====================================output===================================== +<foo\\+@bar.example.com> + +================================================================================ +`; + +exports[`example-570.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<> + +=====================================output===================================== +<> + +================================================================================ +`; + +exports[`example-571.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +< http://foo.bar > + +=====================================output===================================== +< http://foo.bar > + +================================================================================ +`; + +exports[`example-572.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<m:abc> + +=====================================output===================================== +<m:abc> + +================================================================================ +`; + +exports[`example-573.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<foo.bar.baz> + +=====================================output===================================== +<foo.bar.baz> + +================================================================================ +`; + +exports[`example-574.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +http://example.com + +=====================================output===================================== +http://example.com + +================================================================================ +`; + +exports[`example-575.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo@bar.example.com + +=====================================output===================================== +foo@bar.example.com + +================================================================================ +`; + +exports[`example-576.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a><bab><c2c> + +=====================================output===================================== +<a><bab><c2c> + +================================================================================ +`; + +exports[`example-577.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a/><b2/> + +=====================================output===================================== +<a/><b2/> + +================================================================================ +`; + +exports[`example-578.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a /><b2 +data="foo" > + +=====================================output===================================== +<a /><b2 +data="foo" > + +================================================================================ +`; + +exports[`example-579.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a foo="bar" bam = 'baz <em>"</em>' +_boolean zoop:33=zoop:33 /> + +=====================================output===================================== +<a foo="bar" bam = 'baz <em>"</em>' +_boolean zoop:33=zoop:33 /> + +================================================================================ +`; + +exports[`example-580.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo <responsive-image src="foo.jpg" /> + +=====================================output===================================== +Foo <responsive-image src="foo.jpg" /> + +================================================================================ +`; + +exports[`example-581.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<33> <__> + +=====================================output===================================== +<33> <\\_\\_> + +================================================================================ +`; + +exports[`example-582.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a h*#ref="hi"> + +=====================================output===================================== +<a h\\*#ref="hi"> + +================================================================================ +`; + +exports[`example-583.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="hi'> <a href=hi'> + +=====================================output===================================== +<a href="hi'> <a href=hi'> + +================================================================================ +`; + +exports[`example-584.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +< a>< +foo><bar/ > + +=====================================output===================================== +< a>< foo><bar/ > + +================================================================================ +`; + +exports[`example-585.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href='bar'title=title> + +=====================================output===================================== +<a href='bar'title=title> + +================================================================================ +`; + +exports[`example-586.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +</a></foo > + +=====================================output===================================== +</a></foo > + +================================================================================ +`; + +exports[`example-587.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +</a href="foo"> + +=====================================output===================================== +</a href="foo"> + +================================================================================ +`; + +exports[`example-588.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <!-- this is a +comment - with hyphen --> + +=====================================output===================================== +foo <!-- this is a +comment - with hyphen --> + +================================================================================ +`; + +exports[`example-589.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <!-- not a comment -- two hyphens --> + +=====================================output===================================== +foo <!-- not a comment -- two hyphens --> + +================================================================================ +`; + +exports[`example-590.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <!--> foo --> + +foo <!-- foo---> + +=====================================output===================================== +foo <!--> foo --> + +foo <!-- foo---> + +================================================================================ +`; + +exports[`example-591.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <?php echo $a; ?> + +=====================================output===================================== +foo <?php echo $a; ?> + +================================================================================ +`; + +exports[`example-592.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <!ELEMENT br EMPTY> + +=====================================output===================================== +foo <!ELEMENT br EMPTY> + +================================================================================ +`; + +exports[`example-593.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <![CDATA[>&<]]> + +=====================================output===================================== +foo <![CDATA[>&<]]> + +================================================================================ +`; + +exports[`example-594.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <a href="&ouml;"> + +=====================================output===================================== +foo <a href="&ouml;"> + +================================================================================ +`; + +exports[`example-595.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo <a href="\\*"> + +=====================================output===================================== +foo <a href="\\*"> + +================================================================================ +`; + +exports[`example-596.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="\\""> + +=====================================output===================================== +<a href="\\""> + +================================================================================ +`; + +exports[`example-597.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +baz + +=====================================output===================================== +foo +baz + +================================================================================ +`; + +exports[`example-598.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo\\ +baz + +=====================================output===================================== +foo\\ +baz + +================================================================================ +`; + +exports[`example-599.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +baz + +=====================================output===================================== +foo +baz + +================================================================================ +`; + +exports[`example-600.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo + bar + +=====================================output===================================== +foo + bar + +================================================================================ +`; + +exports[`example-601.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo\\ + bar + +=====================================output===================================== +foo\\ + bar + +================================================================================ +`; + +exports[`example-602.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo +bar* + +=====================================output===================================== +_foo +bar_ + +================================================================================ +`; + +exports[`example-603.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +*foo\\ +bar* + +=====================================output===================================== +_foo\\ +bar_ + +================================================================================ +`; + +exports[`example-604.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`code +span\` + +=====================================output===================================== +\`code span\` + +================================================================================ +`; + +exports[`example-605.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +\`code\\ +span\` + +=====================================output===================================== +\`code\\ span\` + +================================================================================ +`; + +exports[`example-606.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="foo +bar"> + +=====================================output===================================== +<a href="foo +bar"> + +================================================================================ +`; + +exports[`example-607.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +<a href="foo\\ +bar"> + +=====================================output===================================== +<a href="foo\\ +bar"> + +================================================================================ +`; + +exports[`example-608.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo\\ + +=====================================output===================================== +foo\\ + +================================================================================ +`; + +exports[`example-609.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo + +=====================================output===================================== +foo + +================================================================================ +`; + +exports[`example-610.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +### foo\\ + +=====================================output===================================== +### foo\\ + +================================================================================ +`; + +exports[`example-611.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +### foo + +=====================================output===================================== +### foo + +================================================================================ +`; + +exports[`example-612.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo +baz + +=====================================output===================================== +foo baz + +================================================================================ +`; + +exports[`example-613.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +foo + baz + +=====================================output===================================== +foo baz + +================================================================================ +`; + +exports[`example-614.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +hello $.;'there + +=====================================output===================================== +hello $.;'there + +================================================================================ +`; + +exports[`example-615.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Foo χρῆν + +=====================================output===================================== +Foo χρῆν + +================================================================================ +`; + +exports[`example-616.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +Multiple spaces + +=====================================output===================================== +Multiple spaces + +================================================================================ +`; diff --git a/tests/format/markdown/spec/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/spec/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index cb8e1af7eb71..000000000000 --- a/tests/format/markdown/spec/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,10786 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`example-1.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo baz bim - -=====================================output===================================== - foo baz bim - -================================================================================ -`; - -exports[`example-2.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo baz bim - -=====================================output===================================== -foo baz bim - -================================================================================ -`; - -exports[`example-3.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - a a - ὐ a - -=====================================output===================================== - a a - ὐ a - -================================================================================ -`; - -exports[`example-4.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - foo - - bar - -=====================================output===================================== -- foo - - bar - -================================================================================ -`; - -exports[`example-5.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - -=====================================output===================================== -- foo - - bar - -================================================================================ -`; - -exports[`example-6.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo - -=====================================output===================================== -> foo - -================================================================================ -`; - -exports[`example-7.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - -=====================================output===================================== -- foo - -================================================================================ -`; - -exports[`example-8.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo - bar - -=====================================output===================================== - foo - bar - -================================================================================ -`; - -exports[`example-9.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - foo - - bar - - baz - -=====================================output===================================== -- foo - - bar - - baz - -================================================================================ -`; - -exports[`example-10.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- \`one -- two\` - -=====================================output===================================== -- \`one -- two\` - -================================================================================ -`; - -exports[`example-11.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - -*** ---- -___ - -=====================================output===================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - ---- - ---- - ---- - -================================================================================ -`; - -exports[`example-12.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -+++ - -=====================================output===================================== -+++ - -================================================================================ -`; - -exports[`example-13.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -=== - -=====================================output===================================== -=== - -================================================================================ -`; - -exports[`example-14.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== --- -** -__ - -=====================================output===================================== --- \\*\\* \\_\\_ - -================================================================================ -`; - -exports[`example-15.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - - *** - *** - *** - -=====================================output===================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - ---- - ---- - ---- - -================================================================================ -`; - -exports[`example-16.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - *** - -=====================================output===================================== - *** - -================================================================================ -`; - -exports[`example-17.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo - *** - -=====================================output===================================== -Foo \\*\\*\\* - -================================================================================ -`; - -exports[`example-18.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_____________________________________ - -=====================================output===================================== ---- - -================================================================================ -`; - -exports[`example-19.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - - - - -=====================================output===================================== ---- - -================================================================================ -`; - -exports[`example-20.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - ** * ** * ** * ** - -=====================================output===================================== ---- - -================================================================================ -`; - -exports[`example-21.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- - - - - -=====================================output===================================== ---- - -================================================================================ -`; - -exports[`example-22.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- - - - - -=====================================output===================================== ---- - -================================================================================ -`; - -exports[`example-23.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_ _ _ _ a - -a------ - ----a--- - -=====================================output===================================== -\\_ \\_ \\_ \\_ a - -a------ - ----a--- - -================================================================================ -`; - -exports[`example-25.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo -*** -- bar - -=====================================output===================================== -- foo - ---- - -- bar - -================================================================================ -`; - -exports[`example-26.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -*** -bar - -=====================================output===================================== -Foo - ---- - -bar - -================================================================================ -`; - -exports[`example-27.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo ---- -bar - -=====================================output===================================== -## Foo - -bar - -================================================================================ -`; - -exports[`example-28.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* Foo -* * * -* Bar - -=====================================output===================================== -- Foo - ---- - -- Bar - -================================================================================ -`; - -exports[`example-29.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- Foo -- * * * - -=====================================output===================================== -- Foo -- *** - -================================================================================ -`; - -exports[`example-30.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo -## foo -### foo -#### foo -##### foo -###### foo - -=====================================output===================================== -# foo - -## foo - -### foo - -#### foo - -##### foo - -###### foo - -================================================================================ -`; - -exports[`example-31.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -####### foo - -=====================================output===================================== -####### foo - -================================================================================ -`; - -exports[`example-32.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -#5 bolt - -#hashtag - -=====================================output===================================== -#5 bolt - -#hashtag - -================================================================================ -`; - -exports[`example-33.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo - -=====================================output===================================== -# foo - -================================================================================ -`; - -exports[`example-34.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\## foo - -=====================================output===================================== -\\## foo - -================================================================================ -`; - -exports[`example-35.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo *bar* \\*baz\\* - -=====================================output===================================== -# foo _bar_ \\*baz\\* - -================================================================================ -`; - -exports[`example-36.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo - -=====================================output===================================== -# foo - -================================================================================ -`; - -exports[`example-37.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - ### foo - ## foo - # foo - -=====================================output===================================== -### foo - -## foo - -# foo - -================================================================================ -`; - -exports[`example-38.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - # foo - -=====================================output===================================== - # foo - -================================================================================ -`; - -exports[`example-39.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo - # bar - -=====================================output===================================== -foo # bar - -================================================================================ -`; - -exports[`example-40.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -## foo ## - ### bar ### - -=====================================output===================================== -## foo - -### bar - -================================================================================ -`; - -exports[`example-41.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo ################################## -##### foo ## - -=====================================output===================================== -# foo - -##### foo - -================================================================================ -`; - -exports[`example-42.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -### foo ### - -=====================================output===================================== -### foo - -================================================================================ -`; - -exports[`example-43.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -### foo ### b - -=====================================output===================================== -### foo ### b - -================================================================================ -`; - -exports[`example-44.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# foo# - -=====================================output===================================== -# foo# - -================================================================================ -`; - -exports[`example-45.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -### foo \\### -## foo #\\## -# foo \\# - -=====================================output===================================== -### foo \\### - -## foo #\\## - -# foo \\# - -================================================================================ -`; - -exports[`example-46.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - -**** -## foo -**** - -=====================================output===================================== -<!-- placeholder for continuous thematic breaks not being treated as yaml --> - ---- - -## foo - ---- - -================================================================================ -`; - -exports[`example-47.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo bar -# baz -Bar foo - -=====================================output===================================== -Foo bar - -# baz - -Bar foo - -================================================================================ -`; - -exports[`example-48.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -## -# -### ### - -=====================================output===================================== -## - -# - -### - -================================================================================ -`; - -exports[`example-49.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo *bar* -========= - -Foo *bar* ---------- - -=====================================output===================================== -# Foo _bar_ - -## Foo _bar_ - -================================================================================ -`; - -exports[`example-50.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo *bar -baz* -==== - -=====================================output===================================== -Foo _bar baz_ ==== - -================================================================================ -`; - -exports[`example-51.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -------------------------- - -Foo -= - -=====================================output===================================== -## Foo - -# Foo - -================================================================================ -`; - -exports[`example-52.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - Foo ---- - - Foo ------ - - Foo - === - -=====================================output===================================== -## Foo - -## Foo - -Foo === - -================================================================================ -`; - -exports[`example-53.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - Foo - --- - - Foo ---- - -=====================================output===================================== - Foo - --- - - Foo - ---- - -================================================================================ -`; - -exports[`example-54.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo - ---- - -=====================================output===================================== -Foo - ---- - -================================================================================ -`; - -exports[`example-55.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo - --- - -=====================================output===================================== -Foo --- - -================================================================================ -`; - -exports[`example-56.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -= = - -Foo ---- - - -=====================================output===================================== -Foo = = - -Foo - ---- - -================================================================================ -`; - -exports[`example-57.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo ------ - -=====================================output===================================== -## Foo - -================================================================================ -`; - -exports[`example-58.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo\\ ----- - -=====================================output===================================== -## Foo\\ - -================================================================================ -`; - -exports[`example-59.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`Foo ----- -\` - -<a title="a lot ---- -of dashes"/> - -=====================================output===================================== -## \`Foo - -\` - -## <a title="a lot - -of dashes"/> - -================================================================================ -`; - -exports[`example-60.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> Foo ---- - -=====================================output===================================== -> Foo - ---- - -================================================================================ -`; - -exports[`example-61.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo -bar -=== - -=====================================output===================================== -> foo - -# bar - -================================================================================ -`; - -exports[`example-62.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- Foo ---- - -=====================================output===================================== -- Foo - ---- - -================================================================================ -`; - -exports[`example-63.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -Bar ---- - -=====================================output===================================== -Foo Bar - ---- - -================================================================================ -`; - -exports[`example-64.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== ---- -Foo ---- -Bar ---- -Baz - -=====================================output===================================== ---- -Foo ---- - -## Bar - -Baz - -================================================================================ -`; - -exports[`example-65.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - -==== - -=====================================output===================================== -==== - -================================================================================ -`; - -exports[`example-66.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== ---- ---- - -=====================================output===================================== ---- ---- - -================================================================================ -`; - -exports[`example-67.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo ------ - -=====================================output===================================== -- foo - ---- - -================================================================================ -`; - -exports[`example-68.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo ---- - -=====================================output===================================== - foo - ---- - -================================================================================ -`; - -exports[`example-69.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo ------ - -=====================================output===================================== -> foo - ---- - -================================================================================ -`; - -exports[`example-70.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\> foo ------- - -=====================================output===================================== -## \\> foo - -================================================================================ -`; - -exports[`example-71.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo - -bar ---- -baz - -=====================================output===================================== -Foo - -## bar - -baz - -================================================================================ -`; - -exports[`example-72.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -bar - ---- - -baz - -=====================================output===================================== -Foo bar - ---- - -baz - -================================================================================ -`; - -exports[`example-73.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -bar -* * * -baz - -=====================================output===================================== -Foo bar - ---- - -baz - -================================================================================ -`; - -exports[`example-74.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -bar -\\--- -baz - -=====================================output===================================== -Foo bar \\--- baz - -================================================================================ -`; - -exports[`example-75.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - a simple - indented code block - -=====================================output===================================== - a simple - indented code block - -================================================================================ -`; - -exports[`example-76.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - foo - - bar - -=====================================output===================================== -- foo - - bar - -================================================================================ -`; - -exports[`example-77.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. foo - - - bar - -=====================================output===================================== -1. foo - - - bar - -================================================================================ -`; - -exports[`example-78.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - <a/> - *hi* - - - one - -=====================================output===================================== - <a/> - *hi* - - - one - -================================================================================ -`; - -exports[`example-79.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - chunk1 - - chunk2 - - - - chunk3 - -=====================================output===================================== - chunk1 - - chunk2 - - - - chunk3 - -================================================================================ -`; - -exports[`example-80.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - chunk1 - - chunk2 - -=====================================output===================================== - chunk1 - - chunk2 - -================================================================================ -`; - -exports[`example-81.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo - bar - -=====================================output===================================== -Foo bar - -================================================================================ -`; - -exports[`example-82.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo -bar - -=====================================output===================================== - foo - -bar - -================================================================================ -`; - -exports[`example-83.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# Heading - foo -Heading ------- - foo ----- - -=====================================output===================================== -# Heading - - foo - -## Heading - - foo - ---- - -================================================================================ -`; - -exports[`example-84.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo - bar - -=====================================output===================================== - foo - bar - -================================================================================ -`; - -exports[`example-85.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - - foo - - -=====================================output===================================== - foo - -================================================================================ -`; - -exports[`example-86.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo - -=====================================output===================================== - foo - -================================================================================ -`; - -exports[`example-87.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -< - > -\`\`\` - -=====================================output===================================== -\`\`\` -< - > -\`\`\` - -================================================================================ -`; - -exports[`example-88.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~ -< - > -~~~ - -=====================================output===================================== -\`\`\` -< - > -\`\`\` - -================================================================================ -`; - -exports[`example-89.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -aaa -~~~ -\`\`\` - -=====================================output===================================== -\`\`\` -aaa -~~~ -\`\`\` - -================================================================================ -`; - -exports[`example-90.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~ -aaa -\`\`\` -~~~ - -=====================================output===================================== -\`\`\`\` -aaa -\`\`\` -\`\`\`\` - -================================================================================ -`; - -exports[`example-91.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`\` -aaa -\`\`\` -\`\`\`\`\`\` - -=====================================output===================================== -\`\`\`\` -aaa -\`\`\` -\`\`\`\` - -================================================================================ -`; - -exports[`example-92.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~~ -aaa -~~~ -~~~~ - -=====================================output===================================== -\`\`\` -aaa -~~~ -\`\`\` - -================================================================================ -`; - -exports[`example-93.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` - -=====================================output===================================== -\`\`\` - -\`\`\` - -================================================================================ -`; - -exports[`example-94.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`\`\` - -\`\`\` -aaa - -=====================================output===================================== -\`\`\`\` - -\`\`\` -aaa -\`\`\`\` - -================================================================================ -`; - -exports[`example-95.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> \`\`\` -> aaa - -bbb - -=====================================output===================================== -> \`\`\` -> aaa -> \`\`\` - -bbb - -================================================================================ -`; - -exports[`example-96.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` - - -\`\`\` - -=====================================output===================================== -\`\`\` - - -\`\`\` - -================================================================================ -`; - -exports[`example-97.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -\`\`\` - -=====================================output===================================== -\`\`\` - -\`\`\` - -================================================================================ -`; - -exports[`example-98.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \`\`\` - aaa -aaa -\`\`\` - -=====================================output===================================== -\`\`\` -aaa -aaa -\`\`\` - -================================================================================ -`; - -exports[`example-99.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \`\`\` -aaa - aaa -aaa - \`\`\` - -=====================================output===================================== -\`\`\` -aaa -aaa -aaa -\`\`\` - -================================================================================ -`; - -exports[`example-100.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \`\`\` - aaa - aaa - aaa - \`\`\` - -=====================================output===================================== -\`\`\` -aaa - aaa -aaa -\`\`\` - -================================================================================ -`; - -exports[`example-101.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \`\`\` - aaa - \`\`\` - -=====================================output===================================== - \`\`\` - aaa - \`\`\` - -================================================================================ -`; - -exports[`example-102.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -aaa - \`\`\` - -=====================================output===================================== -\`\`\` -aaa -\`\`\` - -================================================================================ -`; - -exports[`example-103.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \`\`\` -aaa - \`\`\` - -=====================================output===================================== -\`\`\` -aaa -\`\`\` - -================================================================================ -`; - -exports[`example-104.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -aaa - \`\`\` - -=====================================output===================================== -\`\`\`\` -aaa - \`\`\` -\`\`\`\` - -================================================================================ -`; - -exports[`example-105.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` \`\`\` -aaa - -=====================================output===================================== -\` \` aaa - -================================================================================ -`; - -exports[`example-106.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~~~~ -aaa -~~~ ~~ - -=====================================output===================================== -\`\`\` -aaa -~~~ ~~ -\`\`\` - -================================================================================ -`; - -exports[`example-107.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo -\`\`\` -bar -\`\`\` -baz - -=====================================output===================================== -foo - -\`\`\` -bar -\`\`\` - -baz - -================================================================================ -`; - -exports[`example-108.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo ---- -~~~ -bar -~~~ -# baz - -=====================================output===================================== -## foo - -\`\`\` -bar -\`\`\` - -# baz - -================================================================================ -`; - -exports[`example-109.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`ruby -def foo(x) - return 3 -end -\`\`\` - -=====================================output===================================== -\`\`\`ruby -def foo(x) - return 3 -end -\`\`\` - -================================================================================ -`; - -exports[`example-110.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~~ ruby startline=3 $%@#$ -def foo(x) - return 3 -end -~~~~~~~ - -=====================================output===================================== -\`\`\`ruby startline=3 $%@#$ -def foo(x) - return 3 -end -\`\`\` - -================================================================================ -`; - -exports[`example-111.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\`\`; -\`\`\`\` - -=====================================output===================================== -\`\`\`; - -\`\`\` - -================================================================================ -`; - -exports[`example-112.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` aa \`\`\` -foo - -=====================================output===================================== -\`aa\` foo - -================================================================================ -`; - -exports[`example-113.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -\`\`\` aaa -\`\`\` - -=====================================output===================================== -\`\`\`\` -\`\`\` aaa -\`\`\`\` - -================================================================================ -`; - -exports[`example-114.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<table> - <tr> - <td> - hi - </td> - </tr> -</table> - -okay. - -=====================================output===================================== -<table> - <tr> - <td> - hi - </td> - </tr> -</table> - -okay. - -================================================================================ -`; - -exports[`example-115.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - <div> - *hello* - <foo><a> - -=====================================output===================================== - <div> - *hello* - <foo><a> - -================================================================================ -`; - -exports[`example-116.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -</div> -*foo* - -=====================================output===================================== -</div> -*foo* - -================================================================================ -`; - -exports[`example-117.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<DIV CLASS="foo"> - -*Markdown* - -</DIV> - -=====================================output===================================== -<DIV CLASS="foo"> - -_Markdown_ - -</DIV> - -================================================================================ -`; - -exports[`example-118.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div id="foo" - class="bar"> -</div> - -=====================================output===================================== -<div id="foo" - class="bar"> -</div> - -================================================================================ -`; - -exports[`example-119.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div id="foo" class="bar - baz"> -</div> - -=====================================output===================================== -<div id="foo" class="bar - baz"> -</div> - -================================================================================ -`; - -exports[`example-120.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div> -*foo* - -*bar* - -=====================================output===================================== -<div> -*foo* - -_bar_ - -================================================================================ -`; - -exports[`example-121.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div id="foo" -*hi* - -=====================================output===================================== -<div id="foo" -*hi* - -================================================================================ -`; - -exports[`example-122.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div class -foo - -=====================================output===================================== -<div class -foo - -================================================================================ -`; - -exports[`example-123.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div *???-&&&-<--- -*foo* - -=====================================output===================================== -<div *???-&&&-<--- -*foo* - -================================================================================ -`; - -exports[`example-124.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div><a href="bar">*foo*</a></div> - -=====================================output===================================== -<div><a href="bar">*foo*</a></div> - -================================================================================ -`; - -exports[`example-125.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<table><tr><td> -foo -</td></tr></table> - -=====================================output===================================== -<table><tr><td> -foo -</td></tr></table> - -================================================================================ -`; - -exports[`example-126.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div></div> -\`\`\` c -int x = 33; -\`\`\` - -=====================================output===================================== -<div></div> -\`\`\` c -int x = 33; -\`\`\` - -================================================================================ -`; - -exports[`example-127.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="foo"> -*bar* -</a> - -=====================================output===================================== -<a href="foo"> -*bar* -</a> - -================================================================================ -`; - -exports[`example-128.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<Warning> -*bar* -</Warning> - -=====================================output===================================== -<Warning> -*bar* -</Warning> - -================================================================================ -`; - -exports[`example-129.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<i class="foo"> -*bar* -</i> - -=====================================output===================================== -<i class="foo"> -*bar* -</i> - -================================================================================ -`; - -exports[`example-130.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -</ins> -*bar* - -=====================================output===================================== -</ins> -*bar* - -================================================================================ -`; - -exports[`example-131.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<del> -*foo* -</del> - -=====================================output===================================== -<del> -*foo* -</del> - -================================================================================ -`; - -exports[`example-132.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<del> - -*foo* - -</del> - -=====================================output===================================== -<del> - -_foo_ - -</del> - -================================================================================ -`; - -exports[`example-133.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<del>*foo*</del> - -=====================================output===================================== -<del>_foo_</del> - -================================================================================ -`; - -exports[`example-134.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<pre language="haskell"><code> -import Text.HTML.TagSoup - -main :: IO () -main = print $ parseTags tags -</code></pre> - -=====================================output===================================== -<pre language="haskell"><code> -import Text.HTML.TagSoup - -main :: IO () -main = print $ parseTags tags -</code></pre> - -================================================================================ -`; - -exports[`example-135.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<script type="text/javascript"> -// JavaScript example - -document.getElementById("demo").innerHTML = "Hello JavaScript!"; -</script> - -=====================================output===================================== -<script type="text/javascript"> -// JavaScript example - -document.getElementById("demo").innerHTML = "Hello JavaScript!"; -</script> - -================================================================================ -`; - -exports[`example-136.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<style - type="text/css"> -h1 {color:red;} - -p {color:blue;} -</style> - -=====================================output===================================== -<style - type="text/css"> -h1 {color:red;} - -p {color:blue;} -</style> - -================================================================================ -`; - -exports[`example-137.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<style - type="text/css"> - -foo - -=====================================output===================================== -<style - type="text/css"> - -foo - -================================================================================ -`; - -exports[`example-138.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> <div> -> foo - -bar - -=====================================output===================================== -> <div> -> foo - -bar - -================================================================================ -`; - -exports[`example-139.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- <div> -- foo - -=====================================output===================================== -- <div> -- foo - -================================================================================ -`; - -exports[`example-140.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<style>p{color:red;}</style> -*foo* - -=====================================output===================================== -<style>p{color:red;}</style> - -_foo_ - -================================================================================ -`; - -exports[`example-141.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- foo -->*bar* -*baz* - -=====================================output===================================== -<!-- foo -->*bar* - -_baz_ - -================================================================================ -`; - -exports[`example-142.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<script> -foo -</script>1. *bar* - -=====================================output===================================== -<script> -foo -</script>1. *bar* - -================================================================================ -`; - -exports[`example-143.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!-- Foo - -bar - baz --> - -=====================================output===================================== -<!-- Foo - -bar - baz --> - -================================================================================ -`; - -exports[`example-144.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<?php - - echo '>'; - -?> - -=====================================output===================================== -<?php - - echo '>'; - -?> - -================================================================================ -`; - -exports[`example-145.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<!DOCTYPE html> - -=====================================output===================================== -<!DOCTYPE html> - -================================================================================ -`; - -exports[`example-146.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<![CDATA[ -function matchwo(a,b) -{ - if (a < b && a < 0) then { - return 1; - - } else { - - return 0; - } -} -]]> - -=====================================output===================================== -<![CDATA[ -function matchwo(a,b) -{ - if (a < b && a < 0) then { - return 1; - - } else { - - return 0; - } -} -]]> - -================================================================================ -`; - -exports[`example-147.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - <!-- foo --> - - <!-- foo --> - -=====================================output===================================== - <!-- foo --> - - <!-- foo --> - -================================================================================ -`; - -exports[`example-148.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - <div> - - <div> - -=====================================output===================================== - <div> - - <div> - -================================================================================ -`; - -exports[`example-149.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -<div> -bar -</div> - -=====================================output===================================== -Foo - -<div> -bar -</div> - -================================================================================ -`; - -exports[`example-150.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div> -bar -</div> -*foo* - -=====================================output===================================== -<div> -bar -</div> -*foo* - -================================================================================ -`; - -exports[`example-151.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -<a href="bar"> -baz - -=====================================output===================================== -Foo <a href="bar"> baz - -================================================================================ -`; - -exports[`example-152.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div> - -*Emphasized* text. - -</div> - -=====================================output===================================== -<div> - -_Emphasized_ text. - -</div> - -================================================================================ -`; - -exports[`example-153.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<div> -*Emphasized* text. -</div> - -=====================================output===================================== -<div> -*Emphasized* text. -</div> - -================================================================================ -`; - -exports[`example-154.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<table> - -<tr> - -<td> -Hi -</td> - -</tr> - -</table> - -=====================================output===================================== -<table> - -<tr> - -<td> -Hi -</td> - -</tr> - -</table> - -================================================================================ -`; - -exports[`example-155.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<table> - - <tr> - - <td> - Hi - </td> - - </tr> - -</table> - -=====================================output===================================== -<table> - - <tr> - - <td> - Hi - </td> - - </tr> - -</table> - -================================================================================ -`; - -exports[`example-156.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url "title" - -[foo] - -=====================================output===================================== -[foo]: /url "title" - -[foo] - -================================================================================ -`; - -exports[`example-157.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - [foo]: - /url - 'the title' - -[foo] - -=====================================output===================================== -[foo]: /url "the title" - -[foo] - -================================================================================ -`; - -exports[`example-158.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Foo*bar\\]]:my_(url) 'title (with parens)' - -[Foo*bar\\]] - -=====================================output===================================== -[Foo*bar\\]]: my_(url) "title (with parens)" - -[Foo*bar\\]] - -================================================================================ -`; - -exports[`example-159.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Foo bar]: -<my%20url> -'title' - -[Foo bar] - -=====================================output===================================== -[Foo bar]: my%20url "title" - -[Foo bar] - -================================================================================ -`; - -exports[`example-161.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url 'title - -with blank line' - -[foo] - -=====================================output===================================== -[foo]: /url 'title - -with blank line' - -[foo] - -================================================================================ -`; - -exports[`example-162.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: -/url - -[foo] - -=====================================output===================================== -[foo]: /url - -[foo] - -================================================================================ -`; - -exports[`example-163.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: - -[foo] - -=====================================output===================================== -[foo]: - -[foo] - -================================================================================ -`; - -exports[`example-164.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url\\bar\\*baz "foo\\"bar\\baz" - -[foo] - -=====================================output===================================== -[foo]: /url\\bar\\*baz "foo\\"bar\\baz" - -[foo] - -================================================================================ -`; - -exports[`example-165.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -[foo]: url - -=====================================output===================================== -[foo] - -[foo]: url - -================================================================================ -`; - -exports[`example-166.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -[foo]: first -[foo]: second - -=====================================output===================================== -[foo] - -[foo]: first -[foo]: second - -================================================================================ -`; - -exports[`example-167.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[FOO]: /url - -[Foo] - -=====================================output===================================== -[FOO]: /url - -[Foo] - -================================================================================ -`; - -exports[`example-168.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[ΑΓΩ]: /φου - -[αγω] - -=====================================output===================================== -[ΑΓΩ]: /φου - -[αγω] - -================================================================================ -`; - -exports[`example-169.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url - -=====================================output===================================== -[foo]: /url - -================================================================================ -`; - -exports[`example-170.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[ -foo -]: /url -bar - -=====================================output===================================== -[ foo ]: /url - -bar - -================================================================================ -`; - -exports[`example-171.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url "title" ok - -=====================================output===================================== -[foo]: /url "title" ok - -================================================================================ -`; - -exports[`example-172.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url -"title" ok - -=====================================output===================================== -[foo]: /url "title" ok - -================================================================================ -`; - -exports[`example-173.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - [foo]: /url "title" - -[foo] - -=====================================output===================================== - [foo]: /url "title" - -[foo] - -================================================================================ -`; - -exports[`example-174.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` -[foo]: /url -\`\`\` - -[foo] - -=====================================output===================================== -\`\`\` -[foo]: /url -\`\`\` - -[foo] - -================================================================================ -`; - -exports[`example-175.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -[bar]: /baz - -[bar] - -=====================================output===================================== -Foo [bar]: /baz - -[bar] - -================================================================================ -`; - -exports[`example-176.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -# [Foo] -[foo]: /url -> bar - -=====================================output===================================== -# [Foo] - -[foo]: /url - -> bar - -================================================================================ -`; - -exports[`example-177.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /foo-url "foo" -[bar]: /bar-url - "bar" -[baz]: /baz-url - -[foo], -[bar], -[baz] - -=====================================output===================================== -[foo]: /foo-url "foo" -[bar]: /bar-url "bar" -[baz]: /baz-url - -[foo], [bar], [baz] - -================================================================================ -`; - -exports[`example-178.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -> [foo]: /url - -=====================================output===================================== -[foo] - -> [foo]: /url - -================================================================================ -`; - -exports[`example-179.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aaa - -bbb - -=====================================output===================================== -aaa - -bbb - -================================================================================ -`; - -exports[`example-180.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aaa -bbb - -ccc -ddd - -=====================================output===================================== -aaa bbb - -ccc ddd - -================================================================================ -`; - -exports[`example-181.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aaa - - -bbb - -=====================================output===================================== -aaa - -bbb - -================================================================================ -`; - -exports[`example-182.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - aaa - bbb - -=====================================output===================================== -aaa bbb - -================================================================================ -`; - -exports[`example-183.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aaa - bbb - ccc - -=====================================output===================================== -aaa bbb ccc - -================================================================================ -`; - -exports[`example-184.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - aaa -bbb - -=====================================output===================================== -aaa bbb - -================================================================================ -`; - -exports[`example-185.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - aaa -bbb - -=====================================output===================================== - aaa - -bbb - -================================================================================ -`; - -exports[`example-186.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aaa -bbb - -=====================================output===================================== -aaa -bbb - -================================================================================ -`; - -exports[`example-187.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - -aaa - - -# aaa - - - -=====================================output===================================== -aaa - -# aaa - -================================================================================ -`; - -exports[`example-188.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> # Foo -> bar -> baz - -=====================================output===================================== -> # Foo -> -> bar baz - -================================================================================ -`; - -exports[`example-189.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -># Foo ->bar -> baz - -=====================================output===================================== -> # Foo -> -> bar baz - -================================================================================ -`; - -exports[`example-190.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - > # Foo - > bar - > baz - -=====================================output===================================== -> # Foo -> -> bar baz - -================================================================================ -`; - -exports[`example-191.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - > # Foo - > bar - > baz - -=====================================output===================================== - > # Foo - > bar - > baz - -================================================================================ -`; - -exports[`example-192.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> # Foo -> bar -baz - -=====================================output===================================== -> # Foo -> -> bar baz - -================================================================================ -`; - -exports[`example-193.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> bar -baz -> foo - -=====================================output===================================== -> bar baz foo - -================================================================================ -`; - -exports[`example-194.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo ---- - -=====================================output===================================== -> foo - ---- - -================================================================================ -`; - -exports[`example-195.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> - foo -- bar - -=====================================output===================================== -> - foo - -- bar - -================================================================================ -`; - -exports[`example-196.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo - bar - -=====================================output===================================== -> foo - - bar - -================================================================================ -`; - -exports[`example-197.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> \`\`\` -foo -\`\`\` - -=====================================output===================================== -> \`\`\` -> foo -> \`\`\` - -\`\`\` - -\`\`\` - -================================================================================ -`; - -exports[`example-198.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo - - bar - -=====================================output===================================== -> foo - - - bar - -================================================================================ -`; - -exports[`example-199.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> - -=====================================output===================================== -> - -================================================================================ -`; - -exports[`example-200.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> -> -> - -=====================================output===================================== -> - -================================================================================ -`; - -exports[`example-201.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> -> foo -> - -=====================================output===================================== -> foo - -================================================================================ -`; - -exports[`example-202.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo - -> bar - -=====================================output===================================== -> foo - -> bar - -================================================================================ -`; - -exports[`example-203.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo -> bar - -=====================================output===================================== -> foo bar - -================================================================================ -`; - -exports[`example-204.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> foo -> -> bar - -=====================================output===================================== -> foo -> -> bar - -================================================================================ -`; - -exports[`example-205.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo -> bar - -=====================================output===================================== -foo - -> bar - -================================================================================ -`; - -exports[`example-206.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> aaa -*** -> bbb - -=====================================output===================================== -> aaa - ---- - -> bbb - -================================================================================ -`; - -exports[`example-207.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> bar -baz - -=====================================output===================================== -> bar baz - -================================================================================ -`; - -exports[`example-208.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> bar - -baz - -=====================================output===================================== -> bar - -baz - -================================================================================ -`; - -exports[`example-209.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> bar -> -baz - -=====================================output===================================== -> bar -> -> baz - -================================================================================ -`; - -exports[`example-210.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> > > foo -bar - -=====================================output===================================== -> > > foo bar - -================================================================================ -`; - -exports[`example-211.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== ->>> foo -> bar ->>baz - -=====================================output===================================== -> > > foo bar baz - -================================================================================ -`; - -exports[`example-212.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> code - -> not code - -=====================================output===================================== -> code - -> not code - -================================================================================ -`; - -exports[`example-213.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -A paragraph -with two lines. - - indented code - -> A block quote. - -=====================================output===================================== -A paragraph with two lines. - - indented code - -> A block quote. - -================================================================================ -`; - -exports[`example-214.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. A paragraph - with two lines. - - indented code - - > A block quote. - -=====================================output===================================== -1. A paragraph with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-215.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- one - -two - -=====================================output===================================== -- one - -two - -================================================================================ -`; - -exports[`example-216.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- one - - two - -=====================================output===================================== -- one - - two - -================================================================================ -`; - -exports[`example-217.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - one - - two - -=====================================output===================================== -- one - - two - -================================================================================ -`; - -exports[`example-218.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - - one - - two - -=====================================output===================================== -- one - - two - -================================================================================ -`; - -exports[`example-219.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - > > 1. one ->> ->> two - -=====================================output===================================== -> > 1. one -> > -> > two - -================================================================================ -`; - -exports[`example-220.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== ->>- one ->> - > > two - -=====================================output===================================== -> > - one -> > -> > two - -================================================================================ -`; - -exports[`example-221.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== --one - -2.two - -=====================================output===================================== --one - -2.two - -================================================================================ -`; - -exports[`example-222.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - -- foo - - - bar - -- \`\`\` - foo - - - bar - \`\`\` - -- baz - - + \`\`\` - foo - - - bar - \`\`\` - -=====================================output===================================== -- foo - - bar - -- foo - - bar - -- \`\`\` - foo - - - bar - \`\`\` - -- baz - - - \`\`\` - foo - - - bar - \`\`\` - -================================================================================ -`; - -exports[`example-223.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. foo - - \`\`\` - bar - \`\`\` - - baz - - > bam - -=====================================output===================================== -1. foo - - \`\`\` - bar - \`\`\` - - baz - - > bam - -================================================================================ -`; - -exports[`example-224.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- Foo - - bar - - baz - -=====================================output===================================== -- Foo - - bar - - baz - -================================================================================ -`; - -exports[`example-225.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- Foo - - bar - - - baz - -=====================================output===================================== -- Foo - - bar - - - baz - -================================================================================ -`; - -exports[`example-226.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -123456789. ok - -=====================================output===================================== -123456789. ok - -================================================================================ -`; - -exports[`example-227.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1234567890. not ok - -=====================================output===================================== -1234567890. not ok - -================================================================================ -`; - -exports[`example-228.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -0. ok - -=====================================output===================================== -0. ok - -================================================================================ -`; - -exports[`example-229.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -003. ok - -=====================================output===================================== -3. ok - -================================================================================ -`; - -exports[`example-230.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== --1. not ok - -=====================================output===================================== --1. not ok - -================================================================================ -`; - -exports[`example-231.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - -=====================================output===================================== -- foo - - bar - -================================================================================ -`; - -exports[`example-232.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 10. foo - - bar - -=====================================output===================================== -10. foo - - bar - -================================================================================ -`; - -exports[`example-233.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - indented code - -paragraph - - more code - -=====================================output===================================== - indented code - -paragraph - - more code - -================================================================================ -`; - -exports[`example-234.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. indented code - - paragraph - - more code - -=====================================output===================================== -1. indented code - - paragraph - - more code - -================================================================================ -`; - -exports[`example-235.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. indented code - - paragraph - - more code - -=====================================output===================================== -1. indented code - - paragraph - - more code - -================================================================================ -`; - -exports[`example-236.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - foo - -bar - -=====================================output===================================== -foo - -bar - -================================================================================ -`; - -exports[`example-237.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - -=====================================output===================================== -- foo - -bar - -================================================================================ -`; - -exports[`example-238.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - -=====================================output===================================== -- foo - - bar - -================================================================================ -`; - -exports[`example-240.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- - - foo - -=====================================output===================================== -- foo - -================================================================================ -`; - -exports[`example-241.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo -- -- bar - -=====================================output===================================== -- foo -- -- bar - -================================================================================ -`; - -exports[`example-242.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo -- -- bar - -=====================================output===================================== -- foo -- -- bar - -================================================================================ -`; - -exports[`example-243.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. foo -2. -3. bar - -=====================================output===================================== -1. foo -2. -3. bar - -================================================================================ -`; - -exports[`example-244.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* - -=====================================output===================================== -- - -================================================================================ -`; - -exports[`example-245.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph - with two lines. - - indented code - - > A block quote. - -=====================================output===================================== -1. A paragraph with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-246.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph - with two lines. - - indented code - - > A block quote. - -=====================================output===================================== -1. A paragraph with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-247.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph - with two lines. - - indented code - - > A block quote. - -=====================================output===================================== -1. A paragraph with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-248.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph - with two lines. - - indented code - - > A block quote. - -=====================================output===================================== - 1. A paragraph - with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-249.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph -with two lines. - - indented code - - > A block quote. - -=====================================output===================================== -1. A paragraph with two lines. - - indented code - - > A block quote. - -================================================================================ -`; - -exports[`example-250.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - 1. A paragraph - with two lines. - -=====================================output===================================== -1. A paragraph with two lines. - -================================================================================ -`; - -exports[`example-251.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> 1. > Blockquote -continued here. - -=====================================output===================================== -> 1. > Blockquote continued here. - -================================================================================ -`; - -exports[`example-252.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -> 1. > Blockquote -> continued here. - -=====================================output===================================== -> 1. > Blockquote continued here. - -================================================================================ -`; - -exports[`example-253.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - - baz - -=====================================output===================================== -- foo - - bar - - baz - -================================================================================ -`; - -exports[`example-254.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - - baz - -=====================================output===================================== -- foo -- bar -- baz - -================================================================================ -`; - -exports[`example-255.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -10) foo - - bar - -=====================================output===================================== -10. foo - - bar - -================================================================================ -`; - -exports[`example-256.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -10) foo - - bar - -=====================================output===================================== -10. foo - -- bar - -================================================================================ -`; - -exports[`example-257.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- - foo - -=====================================output===================================== -- - foo - -================================================================================ -`; - -exports[`example-258.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. - 2. foo - -=====================================output===================================== -1. - 2. foo - -================================================================================ -`; - -exports[`example-259.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- # Foo -- Bar - --- - baz - -=====================================output===================================== -- # Foo -- ## Bar - baz - -================================================================================ -`; - -exports[`example-260.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo -- bar -+ baz - -=====================================output===================================== -- foo -- bar - -* baz - -================================================================================ -`; - -exports[`example-261.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. foo -2. bar -3) baz - -=====================================output===================================== -1. foo -2. bar - -3) baz - -================================================================================ -`; - -exports[`example-262.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo -- bar -- baz - -=====================================output===================================== -Foo - -- bar -- baz - -================================================================================ -`; - -exports[`example-263.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -The number of windows in my house is -14. The number of doors is 6. - -=====================================output===================================== -The number of windows in my house is 14. The number of doors is 6. - -================================================================================ -`; - -exports[`example-264.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - -- bar - - -- baz - -=====================================output===================================== -- foo - -- bar - -- baz - -================================================================================ -`; - -exports[`example-265.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - - bar -- baz - -=====================================output===================================== -- foo - - bar - -- baz - -================================================================================ -`; - -exports[`example-266.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - bar - - baz - - - bim - -=====================================output===================================== -- foo - - - bar - - - baz - - bim - -================================================================================ -`; - -exports[`example-267.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo -- bar - - -- baz -- bim - -=====================================output===================================== -- foo -- bar - -- baz -- bim - -================================================================================ -`; - -exports[`example-268.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- foo - - notcode - -- foo - - - code - -=====================================output===================================== -- foo - - notcode - -- foo - - code - -================================================================================ -`; - -exports[`example-269.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - - b - - c - - d - - e - - f - - g - - h -- i - -=====================================output===================================== -- a -- b -- c -- d -- e -- f -- g -- h -- i - -================================================================================ -`; - -exports[`example-271.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a -- b - -- c - -=====================================output===================================== -- a -- b - -- c - -================================================================================ -`; - -exports[`example-272.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* a -* - -* c - -=====================================output===================================== -- a -- - -- c - -================================================================================ -`; - -exports[`example-273.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a -- b - - c -- d - -=====================================output===================================== -- a -- b - - c - -- d - -================================================================================ -`; - -exports[`example-274.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a -- b - - [ref]: /url -- d - -=====================================output===================================== -- a -- b - - [ref]: /url - -- d - -================================================================================ -`; - -exports[`example-276.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - - b - - c -- d - -=====================================output===================================== -- a - - - b - - c - -- d - -================================================================================ -`; - -exports[`example-277.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* a - > b - > -* c - -=====================================output===================================== -- a - > b -- c - -================================================================================ -`; - -exports[`example-278.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - > b - \`\`\` - c - \`\`\` -- d - -=====================================output===================================== -- a - > b - \`\`\` - c - \`\`\` -- d - -================================================================================ -`; - -exports[`example-279.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - -=====================================output===================================== -- a - -================================================================================ -`; - -exports[`example-280.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - - b - -=====================================output===================================== -- a - - b - -================================================================================ -`; - -exports[`example-281.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -1. \`\`\` - foo - \`\`\` - - bar - -=====================================output===================================== -1. \`\`\` - foo - \`\`\` - - bar - -================================================================================ -`; - -exports[`example-282.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* foo - * bar - - baz - -=====================================output===================================== -- foo - - - bar - - baz - -================================================================================ -`; - -exports[`example-283.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -- a - - b - - c - -- d - - e - - f - -=====================================output===================================== -- a - - - b - - c - -- d - - e - - f - -================================================================================ -`; - -exports[`example-284.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`hi\`lo\` - -=====================================output===================================== -\`hi\`lo\` - -================================================================================ -`; - -exports[`example-285.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\\`\\{\\|\\}\\~ - -=====================================output===================================== -\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\\`\\{\\|\\}\\~ - -================================================================================ -`; - -exports[`example-286.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\ \\A\\a\\ \\3\\φ\\« - -=====================================output===================================== -\\ \\A\\a\\ \\3\\φ\\« - -================================================================================ -`; - -exports[`example-287.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\*not emphasized* -\\<br/> not a tag -\\[not a link](/foo) -\\\`not code\` -1\\. not a list -\\* not a list -\\# not a heading -\\[foo]: /url "not a reference" - -=====================================output===================================== -\\*not emphasized\\* \\<br/> not a tag \\[not a link](/foo) \\\`not code\` 1\\. not a -list \\* not a list \\# not a heading \\[foo]: /url "not a reference" - -================================================================================ -`; - -exports[`example-288.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\\\*emphasis* - -=====================================output===================================== -\\\\_emphasis_ - -================================================================================ -`; - -exports[`example-289.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo\\ -bar - -=====================================output===================================== -foo\\ -bar - -================================================================================ -`; - -exports[`example-290.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\` \\[\\\` \`\` - -=====================================output===================================== -\`\` \\[\\\` \`\` - -================================================================================ -`; - -exports[`example-291.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - \\[\\] - -=====================================output===================================== - \\[\\] - -================================================================================ -`; - -exports[`example-292.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -~~~ -\\[\\] -~~~ - -=====================================output===================================== -\`\`\` -\\[\\] -\`\`\` - -================================================================================ -`; - -exports[`example-293.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://example.com?find=\\*> - -=====================================output===================================== -<http://example.com?find=\\*> - -================================================================================ -`; - -exports[`example-294.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="/bar\\/)"> - -=====================================output===================================== -<a href="/bar\\/)"> - -================================================================================ -`; - -exports[`example-295.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo](/bar\\* "ti\\*tle") - -=====================================output===================================== -[foo](/bar* "ti*tle") - -================================================================================ -`; - -exports[`example-296.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -[foo]: /bar\\* "ti\\*tle" - -=====================================output===================================== -[foo] - -[foo]: /bar* "ti*tle" - -================================================================================ -`; - -exports[`example-297.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` foo\\+bar -foo -\`\`\` - -=====================================output===================================== -\`\`\`foo+bar -foo -\`\`\` - -================================================================================ -`; - -exports[`example-298.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&nbsp; &amp; &copy; &AElig; &Dcaron; -&frac34; &HilbertSpace; &DifferentialD; -&ClockwiseContourIntegral; &ngE; - -=====================================output===================================== -&nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; -&ClockwiseContourIntegral; ≧̸ - -================================================================================ -`; - -exports[`example-299.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&#35; &#1234; &#992; &#98765432; &#0; - -=====================================output===================================== -&#35; &#1234; &#992; &#98765432; &#0; - -================================================================================ -`; - -exports[`example-300.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&#X22; &#XD06; &#xcab; - -=====================================output===================================== -&#X22; &#XD06; &#xcab; - -================================================================================ -`; - -exports[`example-301.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&nbsp &x; &#; &#x; -&ThisIsNotDefined; &hi?; - -=====================================output===================================== -&nbsp &x; &#; &#x; &ThisIsNotDefined; &hi?; - -================================================================================ -`; - -exports[`example-302.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&copy - -=====================================output===================================== -&copy - -================================================================================ -`; - -exports[`example-303.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -&MadeUpEntity; - -=====================================output===================================== -&MadeUpEntity; - -================================================================================ -`; - -exports[`example-304.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="&ouml;&ouml;.html"> - -=====================================output===================================== -<a href="&ouml;&ouml;.html"> - -================================================================================ -`; - -exports[`example-305.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo](/f&ouml;&ouml; "f&ouml;&ouml;") - -=====================================output===================================== -[foo](/föö "föö") - -================================================================================ -`; - -exports[`example-306.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -[foo]: /f&ouml;&ouml; "f&ouml;&ouml;" - -=====================================output===================================== -[foo] - -[foo]: /föö "föö" - -================================================================================ -`; - -exports[`example-307.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\`\` f&ouml;&ouml; -foo -\`\`\` - -=====================================output===================================== -\`\`\`föö -foo -\`\`\` - -================================================================================ -`; - -exports[`example-308.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`f&ouml;&ouml;\` - -=====================================output===================================== -\`f&ouml;&ouml;\` - -================================================================================ -`; - -exports[`example-309.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== - f&ouml;f&ouml; - -=====================================output===================================== - f&ouml;f&ouml; - -================================================================================ -`; - -exports[`example-310.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`foo\` - -=====================================output===================================== -\`foo\` - -================================================================================ -`; - -exports[`example-311.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\` foo \` bar \`\` - -=====================================output===================================== -\`\` foo \` bar \`\` - -================================================================================ -`; - -exports[`example-312.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\` \`\` \` - -=====================================output===================================== -\` \`\` \` - -================================================================================ -`; - -exports[`example-313.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`\` -foo -\`\` - -=====================================output===================================== -\`foo\` - -================================================================================ -`; - -exports[`example-314.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`foo bar - baz\` - -=====================================output===================================== -\`foo bar baz\` - -================================================================================ -`; - -exports[`example-315.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`foo \`\` bar\` - -=====================================output===================================== -\` foo \`\` bar \` - -================================================================================ -`; - -exports[`example-316.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`foo\\\`bar\` - -=====================================output===================================== -\`foo\\\`bar\` - -================================================================================ -`; - -exports[`example-317.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo\`*\` - -=====================================output===================================== -_foo\`_\` - -================================================================================ -`; - -exports[`example-318.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[not a \`link](/foo\`) - -=====================================output===================================== -[not a \`link](/foo\`) - -================================================================================ -`; - -exports[`example-319.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`<a href="\`">\` - -=====================================output===================================== -\`<a href="\`">\` - -================================================================================ -`; - -exports[`example-320.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="\`">\` - -=====================================output===================================== -<a href="\`">\` - -================================================================================ -`; - -exports[`example-321.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`<http://foo.bar.\`baz>\` - -=====================================output===================================== -\`<http://foo.bar.\`baz>\` - -================================================================================ -`; - -exports[`example-322.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://foo.bar.\`baz>\` - -=====================================output===================================== -<http://foo.bar.\`baz>\` - -================================================================================ -`; - -exports[`example-324.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`foo - -=====================================output===================================== -\`foo - -================================================================================ -`; - -exports[`example-325.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo bar* - -=====================================output===================================== -_foo bar_ - -================================================================================ -`; - -exports[`example-326.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -a * foo bar* - -=====================================output===================================== -a _ foo bar_ - -================================================================================ -`; - -exports[`example-327.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -a*"foo"* - -=====================================output===================================== -a*"foo"* - -================================================================================ -`; - -exports[`example-328.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -* a * - -=====================================output===================================== -_ a _ - -================================================================================ -`; - -exports[`example-329.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo*bar* - -=====================================output===================================== -foo*bar* - -================================================================================ -`; - -exports[`example-330.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -5*6*78 - -=====================================output===================================== -5*6*78 - -================================================================================ -`; - -exports[`example-331.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo bar_ - -=====================================output===================================== -_foo bar_ - -================================================================================ -`; - -exports[`example-332.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_ foo bar_ - -=====================================output===================================== -_ foo bar_ - -================================================================================ -`; - -exports[`example-333.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -a_"foo"_ - -=====================================output===================================== -a*"foo"* - -================================================================================ -`; - -exports[`example-334.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo_bar_ - -=====================================output===================================== -foo*bar* - -================================================================================ -`; - -exports[`example-335.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -5_6_78 - -=====================================output===================================== -5_6_78 - -================================================================================ -`; - -exports[`example-336.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -пристаням_стремятся_ - -=====================================output===================================== -пристаням*стремятся* - -================================================================================ -`; - -exports[`example-337.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -aa_"bb"_cc - -=====================================output===================================== -aa\\_"bb"\\_cc - -================================================================================ -`; - -exports[`example-338.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo-_(bar)_ - -=====================================output===================================== -foo-_(bar)_ - -================================================================================ -`; - -exports[`example-339.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo* - -=====================================output===================================== -\\_foo\\* - -================================================================================ -`; - -exports[`example-340.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo bar * - -=====================================output===================================== -_foo bar _ - -================================================================================ -`; - -exports[`example-341.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo bar -* - -=====================================output===================================== -\\*foo bar - -- - -================================================================================ -`; - -exports[`example-342.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*(*foo) - -=====================================output===================================== -*(*foo) - -================================================================================ -`; - -exports[`example-343.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*(*foo*)* - -=====================================output===================================== -*(*foo*)* - -================================================================================ -`; - -exports[`example-344.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo*bar - -=====================================output===================================== -*foo*bar - -================================================================================ -`; - -exports[`example-345.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo bar _ - -=====================================output===================================== -_foo bar _ - -================================================================================ -`; - -exports[`example-346.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_(_foo) - -=====================================output===================================== -\\_(\\_foo) - -================================================================================ -`; - -exports[`example-347.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_(_foo_)_ - -=====================================output===================================== -_(\\_foo_)\\_ - -================================================================================ -`; - -exports[`example-348.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo_bar - -=====================================output===================================== -\\_foo_bar - -================================================================================ -`; - -exports[`example-349.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_пристаням_стремятся - -=====================================output===================================== -*пристаням*стремятся - -================================================================================ -`; - -exports[`example-350.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo_bar_baz_ - -=====================================output===================================== -_foo_bar_baz_ - -================================================================================ -`; - -exports[`example-351.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_(bar)_. - -=====================================output===================================== -_(bar)_. - -================================================================================ -`; - -exports[`example-352.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo bar** - -=====================================output===================================== -**foo bar** - -================================================================================ -`; - -exports[`example-353.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -** foo bar** - -=====================================output===================================== -** foo bar** - -================================================================================ -`; - -exports[`example-354.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -a**"foo"** - -=====================================output===================================== -a**"foo"** - -================================================================================ -`; - -exports[`example-355.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo**bar** - -=====================================output===================================== -foo**bar** - -================================================================================ -`; - -exports[`example-356.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo bar__ - -=====================================output===================================== -**foo bar** - -================================================================================ -`; - -exports[`example-357.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__ foo bar__ - -=====================================output===================================== -** foo bar** - -================================================================================ -`; - -exports[`example-358.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__ -foo bar__ - -=====================================output===================================== -** foo bar** - -================================================================================ -`; - -exports[`example-359.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -a__"foo"__ - -=====================================output===================================== -a**"foo"** - -================================================================================ -`; - -exports[`example-360.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo__bar__ - -=====================================output===================================== -foo**bar** - -================================================================================ -`; - -exports[`example-361.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -5__6__78 - -=====================================output===================================== -5**6**78 - -================================================================================ -`; - -exports[`example-362.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -пристаням__стремятся__ - -=====================================output===================================== -пристаням**стремятся** - -================================================================================ -`; - -exports[`example-363.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo, __bar__, baz__ - -=====================================output===================================== -**foo, **bar**, baz** - -================================================================================ -`; - -exports[`example-364.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo-__(bar)__ - -=====================================output===================================== -foo-**(bar)** - -================================================================================ -`; - -exports[`example-365.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo bar ** - -=====================================output===================================== -**foo bar ** - -================================================================================ -`; - -exports[`example-366.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**(**foo) - -=====================================output===================================== -**(**foo) - -================================================================================ -`; - -exports[`example-367.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*(**foo**)* - -=====================================output===================================== -_(**foo**)_ - -================================================================================ -`; - -exports[`example-368.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**Gomphocarpus (*Gomphocarpus physocarpus*, syn. -*Asclepias physocarpa*)** - -=====================================output===================================== -**Gomphocarpus (_Gomphocarpus physocarpus_, syn. _Asclepias physocarpa_)** - -================================================================================ -`; - -exports[`example-369.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo "*bar*" foo** - -=====================================output===================================== -**foo "_bar_" foo** - -================================================================================ -`; - -exports[`example-370.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo**bar - -=====================================output===================================== -**foo**bar - -================================================================================ -`; - -exports[`example-371.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo bar __ - -=====================================output===================================== -**foo bar ** - -================================================================================ -`; - -exports[`example-372.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__(__foo) - -=====================================output===================================== -**(**foo) - -================================================================================ -`; - -exports[`example-373.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_(__foo__)_ - -=====================================output===================================== -_(**foo**)_ - -================================================================================ -`; - -exports[`example-374.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo__bar - -=====================================output===================================== -**foo**bar - -================================================================================ -`; - -exports[`example-375.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__пристаням__стремятся - -=====================================output===================================== -**пристаням**стремятся - -================================================================================ -`; - -exports[`example-376.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo__bar__baz__ - -=====================================output===================================== -**foo**bar**baz** - -================================================================================ -`; - -exports[`example-377.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__(bar)__. - -=====================================output===================================== -**(bar)**. - -================================================================================ -`; - -exports[`example-378.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo [bar](/url)* - -=====================================output===================================== -_foo [bar](/url)_ - -================================================================================ -`; - -exports[`example-379.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo -bar* - -=====================================output===================================== -_foo bar_ - -================================================================================ -`; - -exports[`example-380.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo __bar__ baz_ - -=====================================output===================================== -_foo **bar** baz_ - -================================================================================ -`; - -exports[`example-381.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo _bar_ baz_ - -=====================================output===================================== -_foo \\_bar_ baz\\_ - -================================================================================ -`; - -exports[`example-382.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo_ bar_ - -=====================================output===================================== -\\__foo_ bar\\_ - -================================================================================ -`; - -exports[`example-383.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo *bar** - -=====================================output===================================== -*foo *bar\\*\\* - -================================================================================ -`; - -exports[`example-384.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo **bar** baz* - -=====================================output===================================== -_foo **bar** baz_ - -================================================================================ -`; - -exports[`example-385.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo**bar**baz* - -=====================================output===================================== -_foo**bar**baz_ - -================================================================================ -`; - -exports[`example-386.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -***foo** bar* - -=====================================output===================================== -**\\*foo** bar\\* - -================================================================================ -`; - -exports[`example-387.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo **bar*** - -=====================================output===================================== -\\*foo **bar\\*** - -================================================================================ -`; - -exports[`example-388.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo**bar*** - -=====================================output===================================== -\\*foo**bar\\*** - -================================================================================ -`; - -exports[`example-390.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo [*bar*](/url)* - -=====================================output===================================== -*foo [*bar*](/url)* - -================================================================================ -`; - -exports[`example-391.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -** is not an empty emphasis - -=====================================output===================================== -\\*\\* is not an empty emphasis - -================================================================================ -`; - -exports[`example-392.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**** is not an empty strong emphasis - -=====================================output===================================== -\\*\\*\\*\\* is not an empty strong emphasis - -================================================================================ -`; - -exports[`example-393.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo [bar](/url)** - -=====================================output===================================== -**foo [bar](/url)** - -================================================================================ -`; - -exports[`example-394.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo -bar** - -=====================================output===================================== -**foo bar** - -================================================================================ -`; - -exports[`example-395.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo _bar_ baz__ - -=====================================output===================================== -**foo _bar_ baz** - -================================================================================ -`; - -exports[`example-396.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo __bar__ baz__ - -=====================================output===================================== -**foo **bar** baz** - -================================================================================ -`; - -exports[`example-397.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -____foo__ bar__ - -=====================================output===================================== -\\_**\\_foo** bar\\_\\_ - -================================================================================ -`; - -exports[`example-398.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo **bar**** - -=====================================output===================================== -**foo **bar\\*\\*\\*\\* - -================================================================================ -`; - -exports[`example-399.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo *bar* baz** - -=====================================output===================================== -**foo _bar_ baz** - -================================================================================ -`; - -exports[`example-400.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo*bar*baz** - -=====================================output===================================== -**foo*bar*baz** - -================================================================================ -`; - -exports[`example-401.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -***foo* bar** - -=====================================output===================================== -**_foo_ bar** - -================================================================================ -`; - -exports[`example-402.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo *bar*** - -=====================================output===================================== -**foo _bar_** - -================================================================================ -`; - -exports[`example-403.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo *bar **baz** -bim* bop** - -=====================================output===================================== -**foo \\*bar **baz** bim\\* bop** - -================================================================================ -`; - -exports[`example-404.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo [*bar*](/url)** - -=====================================output===================================== -**foo [_bar_](/url)** - -================================================================================ -`; - -exports[`example-405.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__ is not an empty emphasis - -=====================================output===================================== -\\_\\_ is not an empty emphasis - -================================================================================ -`; - -exports[`example-406.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -____ is not an empty strong emphasis - -=====================================output===================================== -\\_\\_\\_\\_ is not an empty strong emphasis - -================================================================================ -`; - -exports[`example-407.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo *** - -=====================================output===================================== -foo \\*\\*\\* - -================================================================================ -`; - -exports[`example-408.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo *\\** - -=====================================output===================================== -foo \\*\\*\\* - -================================================================================ -`; - -exports[`example-410.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo ***** - -=====================================output===================================== -foo **\\*** - -================================================================================ -`; - -exports[`example-411.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo **\\*** - -=====================================output===================================== -foo **\\*** - -================================================================================ -`; - -exports[`example-412.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo **_** - -=====================================output===================================== -foo **\\_** - -================================================================================ -`; - -exports[`example-413.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo* - -=====================================output===================================== -\\*_foo_ - -================================================================================ -`; - -exports[`example-414.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo** - -=====================================output===================================== -\\*foo\\*\\* - -================================================================================ -`; - -exports[`example-415.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -***foo** - -=====================================output===================================== -**\\*foo** - -================================================================================ -`; - -exports[`example-417.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo*** - -=====================================output===================================== -**foo\\*** - -================================================================================ -`; - -exports[`example-418.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo**** - -=====================================output===================================== -\\*foo\\*\\*\\*\\* - -================================================================================ -`; - -exports[`example-419.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo ___ - -=====================================output===================================== -foo \\_\\_\\_ - -================================================================================ -`; - -exports[`example-420.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo _\\__ - -=====================================output===================================== -foo \\_\\_\\_ - -================================================================================ -`; - -exports[`example-421.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo _*_ - -=====================================output===================================== -foo _\\*_ - -================================================================================ -`; - -exports[`example-422.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo _____ - -=====================================output===================================== -foo **\\_** - -================================================================================ -`; - -exports[`example-423.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo __\\___ - -=====================================output===================================== -foo **\\_** - -================================================================================ -`; - -exports[`example-424.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo __*__ - -=====================================output===================================== -foo **\\*** - -================================================================================ -`; - -exports[`example-425.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo_ - -=====================================output===================================== -\\__foo_ - -================================================================================ -`; - -exports[`example-426.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo__ - -=====================================output===================================== -\\_foo\\_\\_ - -================================================================================ -`; - -exports[`example-427.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -___foo__ - -=====================================output===================================== -**\\_foo** - -================================================================================ -`; - -exports[`example-428.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -____foo_ - -=====================================output===================================== -\\__\\_\\_foo_ - -================================================================================ -`; - -exports[`example-429.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo___ - -=====================================output===================================== -**foo\\_** - -================================================================================ -`; - -exports[`example-430.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo____ - -=====================================output===================================== -\\_foo\\_\\_\\_\\_ - -================================================================================ -`; - -exports[`example-431.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo** - -=====================================output===================================== -**foo** - -================================================================================ -`; - -exports[`example-432.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*_foo_* - -=====================================output===================================== -_*foo*_ - -================================================================================ -`; - -exports[`example-433.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__foo__ - -=====================================output===================================== -**foo** - -================================================================================ -`; - -exports[`example-434.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_*foo*_ - -=====================================output===================================== -_*foo*_ - -================================================================================ -`; - -exports[`example-435.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -****foo**** - -=====================================output===================================== -\\***\\*foo\\*\\*** - -================================================================================ -`; - -exports[`example-436.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -____foo____ - -=====================================output===================================== -\\_**\\_foo\\_\\_** - -================================================================================ -`; - -exports[`example-437.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -******foo****** - -=====================================output===================================== -**\\*\\***foo**\\*\\*** - -================================================================================ -`; - -exports[`example-438.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -***foo*** - -=====================================output===================================== -**_foo_** - -================================================================================ -`; - -exports[`example-439.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_____foo_____ - -=====================================output===================================== -**\\_**foo**\\_** - -================================================================================ -`; - -exports[`example-440.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo _bar* baz_ - -=====================================output===================================== -_foo \\_bar_ baz\\_ - -================================================================================ -`; - -exports[`example-441.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo*bar** - -=====================================output===================================== -**foo\\*bar** - -================================================================================ -`; - -exports[`example-442.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo __bar *baz bim__ bam* - -=====================================output===================================== -*foo \\_\\_bar *baz bim\\_\\_ bam\\* - -================================================================================ -`; - -exports[`example-443.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**foo **bar baz** - -=====================================output===================================== -**foo **bar baz\\*\\* - -================================================================================ -`; - -exports[`example-444.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo *bar baz* - -=====================================output===================================== -*foo *bar baz\\* - -================================================================================ -`; - -exports[`example-445.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*[bar*](/url) - -=====================================output===================================== -_[bar_](/url) - -================================================================================ -`; - -exports[`example-446.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_foo [bar_](/url) - -=====================================output===================================== -_foo [bar_](/url) - -================================================================================ -`; - -exports[`example-447.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*<img src="foo" title="*"/> - -=====================================output===================================== -_<img src="foo" title="_"/> - -================================================================================ -`; - -exports[`example-448.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**<a href="**"> - -=====================================output===================================== -**<a href="**"> - -================================================================================ -`; - -exports[`example-449.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__<a href="__"> - -=====================================output===================================== -**<a href="**"> - -================================================================================ -`; - -exports[`example-450.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*a \`*\`* - -=====================================output===================================== -_a \`_\`\\* - -================================================================================ -`; - -exports[`example-451.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -_a \`_\`_ - -=====================================output===================================== -_a \`_\`\\_ - -================================================================================ -`; - -exports[`example-452.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -**a<http://foo.bar/?q=**> - -=====================================output===================================== -**a<http://foo.bar/?q=**> - -================================================================================ -`; - -exports[`example-453.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -__a<http://foo.bar/?q=__> - -=====================================output===================================== -**a<http://foo.bar/?q=**> - -================================================================================ -`; - -exports[`example-454.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/uri "title") - -=====================================output===================================== -[link](/uri "title") - -================================================================================ -`; - -exports[`example-455.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/uri) - -=====================================output===================================== -[link](/uri) - -================================================================================ -`; - -exports[`example-456.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link]() - -=====================================output===================================== -[link]() - -================================================================================ -`; - -exports[`example-457.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](<>) - -=====================================output===================================== -[link]() - -================================================================================ -`; - -exports[`example-458.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/my uri) - -=====================================output===================================== -[link](/my uri) - -================================================================================ -`; - -exports[`example-459.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](</my uri>) - -=====================================output===================================== -[link](</my uri>) - -================================================================================ -`; - -exports[`example-460.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo -bar) - -=====================================output===================================== -[link](foo bar) - -================================================================================ -`; - -exports[`example-461.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](<foo -bar>) - -=====================================output===================================== -[link](<foo -bar>) - -================================================================================ -`; - -exports[`example-462.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](\\(foo\\)) - -=====================================output===================================== -[link](<(foo)>) - -================================================================================ -`; - -exports[`example-463.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link]((foo)and(bar)) - -=====================================output===================================== -[link](<(foo)and(bar)>) - -================================================================================ -`; - -exports[`example-464.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo(and(bar))) - -=====================================output===================================== -[link](<foo(and(bar))>) - -================================================================================ -`; - -exports[`example-465.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo(and\\(bar\\))) - -=====================================output===================================== -[link](<foo(and(bar))>) - -================================================================================ -`; - -exports[`example-466.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](<foo(and(bar))>) - -=====================================output===================================== -[link](<foo(and(bar))>) - -================================================================================ -`; - -exports[`example-467.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo\\)\\:) - -=====================================output===================================== -[link](<foo):>) - -================================================================================ -`; - -exports[`example-468.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](#fragment) - -[link](http://example.com#fragment) - -[link](http://example.com?foo=3#frag) - -=====================================output===================================== -[link](#fragment) - -[link](http://example.com#fragment) - -[link](http://example.com?foo=3#frag) - -================================================================================ -`; - -exports[`example-469.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo\\bar) - -=====================================output===================================== -[link](foo\\bar) - -================================================================================ -`; - -exports[`example-470.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](foo%20b&auml;) - -=====================================output===================================== -[link](foo%20bä) - -================================================================================ -`; - -exports[`example-471.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link]("title") - -=====================================output===================================== -[link]("title") - -================================================================================ -`; - -exports[`example-472.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/url "title") -[link](/url 'title') -[link](/url (title)) - -=====================================output===================================== -[link](/url "title") [link](/url "title") [link](/url "title") - -================================================================================ -`; - -exports[`example-473.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/url "title \\"&quot;") - -=====================================output===================================== -[link](/url 'title ""') - -================================================================================ -`; - -exports[`example-474.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/url "title "and" title") - -=====================================output===================================== -[link](/url "title "and" title") - -================================================================================ -`; - -exports[`example-475.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link](/url 'title "and" title') - -=====================================output===================================== -[link](/url 'title "and" title') - -================================================================================ -`; - -exports[`example-476.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link]( /uri - "title" ) - -=====================================output===================================== -[link](/uri "title") - -================================================================================ -`; - -exports[`example-477.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link] (/uri) - -=====================================output===================================== -[link] (/uri) - -================================================================================ -`; - -exports[`example-478.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link [foo [bar]]](/uri) - -=====================================output===================================== -[link [foo [bar]]](/uri) - -================================================================================ -`; - -exports[`example-479.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link] bar](/uri) - -=====================================output===================================== -[link] bar](/uri) - -================================================================================ -`; - -exports[`example-480.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link [bar](/uri) - -=====================================output===================================== -[link [bar](/uri) - -================================================================================ -`; - -exports[`example-481.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link \\[bar](/uri) - -=====================================output===================================== -[link \\[bar](/uri) - -================================================================================ -`; - -exports[`example-482.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link *foo **bar** \`#\`*](/uri) - -=====================================output===================================== -[link _foo **bar** \`#\`_](/uri) - -================================================================================ -`; - -exports[`example-483.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[![moon](moon.jpg)](/uri) - -=====================================output===================================== -[![moon](moon.jpg)](/uri) - -================================================================================ -`; - -exports[`example-484.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo [bar](/uri)](/uri) - -=====================================output===================================== -[foo [bar](/uri)](/uri) - -================================================================================ -`; - -exports[`example-485.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo *[bar [baz](/uri)](/uri)*](/uri) - -=====================================output===================================== -[foo _[bar [baz](/uri)](/uri)_](/uri) - -================================================================================ -`; - -exports[`example-486.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![[[foo](uri1)](uri2)](uri3) - -=====================================output===================================== -![[[foo](uri1)](uri2)](uri3) - -================================================================================ -`; - -exports[`example-487.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*[foo*](/uri) - -=====================================output===================================== -_[foo_](/uri) - -================================================================================ -`; - -exports[`example-488.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo *bar](baz*) - -=====================================output===================================== -[foo \\*bar](baz*) - -================================================================================ -`; - -exports[`example-489.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo [bar* baz] - -=====================================output===================================== -_foo [bar_ baz] - -================================================================================ -`; - -exports[`example-490.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo <bar attr="](baz)"> - -=====================================output===================================== -[foo <bar attr="](baz)"> - -================================================================================ -`; - -exports[`example-491.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo\`](/uri)\` - -=====================================output===================================== -[foo\`](/uri)\` - -================================================================================ -`; - -exports[`example-492.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo<http://example.com/?search=](uri)> - -=====================================output===================================== -[foo<http://example.com/?search=](uri)> - -================================================================================ -`; - -exports[`example-493.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][bar] - -[bar]: /url "title" - -=====================================output===================================== -[foo][bar] - -[bar]: /url "title" - -================================================================================ -`; - -exports[`example-494.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link [foo [bar]]][ref] - -[ref]: /uri - -=====================================output===================================== -[link [foo [bar]]][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-495.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link \\[bar][ref] - -[ref]: /uri - -=====================================output===================================== -[link \\[bar][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-496.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[link *foo **bar** \`#\`*][ref] - -[ref]: /uri - -=====================================output===================================== -[link _foo **bar** \`#\`_][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-497.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[![moon](moon.jpg)][ref] - -[ref]: /uri - -=====================================output===================================== -[![moon](moon.jpg)][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-498.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo [bar](/uri)][ref] - -[ref]: /uri - -=====================================output===================================== -[foo [bar](/uri)][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-499.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo *bar [baz][ref]*][ref] - -[ref]: /uri - -=====================================output===================================== -[foo _bar [baz][ref]_][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-500.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*[foo*][ref] - -[ref]: /uri - -=====================================output===================================== -_[foo_][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-501.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo *bar][ref] - -[ref]: /uri - -=====================================output===================================== -[foo \\*bar][ref] - -[ref]: /uri - -================================================================================ -`; - -exports[`example-502.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo <bar attr="][ref]"> - -[ref]: /uri - -=====================================output===================================== -[foo <bar attr="][ref]"> - -[ref]: /uri - -================================================================================ -`; - -exports[`example-503.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo\`][ref]\` - -[ref]: /uri - -=====================================output===================================== -[foo\`][ref]\` - -[ref]: /uri - -================================================================================ -`; - -exports[`example-504.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo<http://example.com/?search=][ref]> - -[ref]: /uri - -=====================================output===================================== -[foo<http://example.com/?search=][ref]> - -[ref]: /uri - -================================================================================ -`; - -exports[`example-505.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][BaR] - -[bar]: /url "title" - -=====================================output===================================== -[foo][BaR] - -[bar]: /url "title" - -================================================================================ -`; - -exports[`example-506.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Толпой][Толпой] is a Russian word. - -[ТОЛПОЙ]: /url - -=====================================output===================================== -[Толпой][Толпой] is a Russian word. - -[ТОЛПОЙ]: /url - -================================================================================ -`; - -exports[`example-507.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Foo - bar]: /url - -[Baz][Foo bar] - -=====================================output===================================== -[Foo bar]: /url - -[Baz][Foo bar] - -================================================================================ -`; - -exports[`example-508.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] [bar] - -[bar]: /url "title" - -=====================================output===================================== -[foo] [bar] - -[bar]: /url "title" - -================================================================================ -`; - -exports[`example-509.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] -[bar] - -[bar]: /url "title" - -=====================================output===================================== -[foo] [bar] - -[bar]: /url "title" - -================================================================================ -`; - -exports[`example-510.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo]: /url1 - -[foo]: /url2 - -[bar][foo] - -=====================================output===================================== -[foo]: /url1 -[foo]: /url2 - -[bar][foo] - -================================================================================ -`; - -exports[`example-511.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[bar][foo\\!] - -[foo!]: /url - -=====================================output===================================== -[bar][foo\\!] - -[foo!]: /url - -================================================================================ -`; - -exports[`example-512.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][ref[] - -[ref[]: /uri - -=====================================output===================================== -[foo]ref[] - -[ref[]: /uri - -================================================================================ -`; - -exports[`example-513.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][ref[bar]] - -[ref[bar]]: /uri - -=====================================output===================================== -[foo]ref[bar]] - -[ref[bar]]: /uri - -================================================================================ -`; - -exports[`example-514.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[[[foo]]] - -[[[foo]]]: /url - -=====================================output===================================== -[[[foo]]] - -[[[foo]]]: /url - -================================================================================ -`; - -exports[`example-515.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][ref\\[] - -[ref\\[]: /uri - -=====================================output===================================== -[foo][ref\\[] - -[ref\\[]: /uri - -================================================================================ -`; - -exports[`example-516.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[bar\\\\]: /uri - -[bar\\\\] - -=====================================output===================================== -[bar\\\\]: /uri - -[bar\\\\] - -================================================================================ -`; - -exports[`example-517.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[] - -[]: /uri - -=====================================output===================================== -[] - -[]: /uri - -================================================================================ -`; - -exports[`example-518.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[ - ] - -[ - ]: /uri - -=====================================output===================================== -[ ] - -[ ]: /uri - -================================================================================ -`; - -exports[`example-519.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][] - -[foo]: /url "title" - -=====================================output===================================== -[foo][] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-520.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[*foo* bar][] - -[*foo* bar]: /url "title" - -=====================================output===================================== -[*foo* bar][] - -[*foo* bar]: /url "title" - -================================================================================ -`; - -exports[`example-521.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Foo][] - -[foo]: /url "title" - -=====================================output===================================== -[Foo][] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-522.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] -[] - -[foo]: /url "title" - -=====================================output===================================== -[foo] [] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-523.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] - -[foo]: /url "title" - -=====================================output===================================== -[foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-524.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[*foo* bar] - -[*foo* bar]: /url "title" - -=====================================output===================================== -[*foo* bar] - -[*foo* bar]: /url "title" - -================================================================================ -`; - -exports[`example-525.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[[*foo* bar]] - -[*foo* bar]: /url "title" - -=====================================output===================================== -[[*foo* bar]] - -[*foo* bar]: /url "title" - -================================================================================ -`; - -exports[`example-526.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[[bar [foo] - -[foo]: /url - -=====================================output===================================== -[[bar [foo] - -[foo]: /url - -================================================================================ -`; - -exports[`example-527.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[Foo] - -[foo]: /url "title" - -=====================================output===================================== -[Foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-528.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo] bar - -[foo]: /url - -=====================================output===================================== -[foo] bar - -[foo]: /url - -================================================================================ -`; - -exports[`example-529.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\[foo] - -[foo]: /url "title" - -=====================================output===================================== -\\[foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-530.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo*]: /url - -*[foo*] - -=====================================output===================================== -[foo*]: /url - -_[foo_] - -================================================================================ -`; - -exports[`example-531.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][bar] - -[foo]: /url1 -[bar]: /url2 - -=====================================output===================================== -[foo][bar] - -[foo]: /url1 -[bar]: /url2 - -================================================================================ -`; - -exports[`example-532.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][bar][baz] - -[baz]: /url - -=====================================output===================================== -[foo][bar][baz] - -[baz]: /url - -================================================================================ -`; - -exports[`example-533.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][bar][baz] - -[baz]: /url1 -[bar]: /url2 - -=====================================output===================================== -[foo][bar][baz] - -[baz]: /url1 -[bar]: /url2 - -================================================================================ -`; - -exports[`example-534.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[foo][bar][baz] - -[baz]: /url1 -[foo]: /url2 - -=====================================output===================================== -[foo][bar][baz] - -[baz]: /url1 -[foo]: /url2 - -================================================================================ -`; - -exports[`example-535.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo](/url "title") - -=====================================output===================================== -![foo](/url "title") - -================================================================================ -`; - -exports[`example-536.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo *bar*] - -[foo *bar*]: train.jpg "train & tracks" - -=====================================output===================================== -![foo *bar*] - -[foo *bar*]: train.jpg "train & tracks" - -================================================================================ -`; - -exports[`example-537.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo ![bar](/url)](/url2) - -=====================================output===================================== -![foo ![bar](/url)](/url2) - -================================================================================ -`; - -exports[`example-538.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo [bar](/url)](/url2) - -=====================================output===================================== -![foo [bar](/url)](/url2) - -================================================================================ -`; - -exports[`example-539.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo *bar*][] - -[foo *bar*]: train.jpg "train & tracks" - -=====================================output===================================== -![foo *bar*][] - -[foo *bar*]: train.jpg "train & tracks" - -================================================================================ -`; - -exports[`example-540.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo *bar*][foobar] - -[FOOBAR]: train.jpg "train & tracks" - -=====================================output===================================== -![foo *bar*][foobar] - -[FOOBAR]: train.jpg "train & tracks" - -================================================================================ -`; - -exports[`example-541.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo](train.jpg) - -=====================================output===================================== -![foo](train.jpg) - -================================================================================ -`; - -exports[`example-542.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -My ![foo bar](/path/to/train.jpg "title" ) - -=====================================output===================================== -My ![foo bar](/path/to/train.jpg "title") - -================================================================================ -`; - -exports[`example-543.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo](<url>) - -=====================================output===================================== -![foo](url) - -================================================================================ -`; - -exports[`example-544.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![](/url) - -=====================================output===================================== -![](/url) - -================================================================================ -`; - -exports[`example-545.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo][bar] - -[bar]: /url - -=====================================output===================================== -![foo][bar] - -[bar]: /url - -================================================================================ -`; - -exports[`example-546.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo][bar] - -[BAR]: /url - -=====================================output===================================== -![foo][bar] - -[BAR]: /url - -================================================================================ -`; - -exports[`example-547.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo][] - -[foo]: /url "title" - -=====================================output===================================== -![foo][] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-548.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![*foo* bar][] - -[*foo* bar]: /url "title" - -=====================================output===================================== -![*foo* bar][] - -[*foo* bar]: /url "title" - -================================================================================ -`; - -exports[`example-549.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![Foo][] - -[foo]: /url "title" - -=====================================output===================================== -![Foo][] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-550.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo] -[] - -[foo]: /url "title" - -=====================================output===================================== -![foo] [] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-551.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![foo] - -[foo]: /url "title" - -=====================================output===================================== -![foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-552.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![*foo* bar] - -[*foo* bar]: /url "title" - -=====================================output===================================== -![*foo* bar] - -[*foo* bar]: /url "title" - -================================================================================ -`; - -exports[`example-553.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![[foo]] - -[[foo]]: /url "title" - -=====================================output===================================== -![[foo]] - -[[foo]]: /url "title" - -================================================================================ -`; - -exports[`example-554.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -![Foo] - -[foo]: /url "title" - -=====================================output===================================== -![Foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-555.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\!\\[foo] - -[foo]: /url "title" - -=====================================output===================================== -\\!\\[foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-556.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\\![foo] - -[foo]: /url "title" - -=====================================output===================================== -\\![foo] - -[foo]: /url "title" - -================================================================================ -`; - -exports[`example-557.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://foo.bar.baz> - -=====================================output===================================== -<http://foo.bar.baz> - -================================================================================ -`; - -exports[`example-558.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://foo.bar.baz/test?q=hello&id=22&boolean> - -=====================================output===================================== -<http://foo.bar.baz/test?q=hello&id=22&boolean> - -================================================================================ -`; - -exports[`example-559.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<irc://foo.bar:2233/baz> - -=====================================output===================================== -<irc://foo.bar:2233/baz> - -================================================================================ -`; - -exports[`example-560.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<MAILTO:FOO@BAR.BAZ> - -=====================================output===================================== -<MAILTO:FOO@BAR.BAZ> - -================================================================================ -`; - -exports[`example-561.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a+b+c:d> - -=====================================output===================================== -<a+b+c:d> - -================================================================================ -`; - -exports[`example-562.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<made-up-scheme://foo,bar> - -=====================================output===================================== -<made-up-scheme://foo,bar> - -================================================================================ -`; - -exports[`example-563.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://../> - -=====================================output===================================== -<http://../> - -================================================================================ -`; - -exports[`example-564.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<localhost:5001/foo> - -=====================================output===================================== -<localhost:5001/foo> - -================================================================================ -`; - -exports[`example-565.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://foo.bar/baz bim> - -=====================================output===================================== -<http://foo.bar/baz bim> - -================================================================================ -`; - -exports[`example-566.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<http://example.com/\\[\\> - -=====================================output===================================== -<http://example.com/\\[\\> - -================================================================================ -`; - -exports[`example-567.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<foo@bar.example.com> - -=====================================output===================================== -<foo@bar.example.com> - -================================================================================ -`; - -exports[`example-568.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<foo+special@Bar.baz-bar0.com> - -=====================================output===================================== -<foo+special@Bar.baz-bar0.com> - -================================================================================ -`; - -exports[`example-569.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<foo\\+@bar.example.com> - -=====================================output===================================== -<foo\\+@bar.example.com> - -================================================================================ -`; - -exports[`example-570.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<> - -=====================================output===================================== -<> - -================================================================================ -`; - -exports[`example-571.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -< http://foo.bar > - -=====================================output===================================== -< http://foo.bar > - -================================================================================ -`; - -exports[`example-572.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<m:abc> - -=====================================output===================================== -<m:abc> - -================================================================================ -`; - -exports[`example-573.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<foo.bar.baz> - -=====================================output===================================== -<foo.bar.baz> - -================================================================================ -`; - -exports[`example-574.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -http://example.com - -=====================================output===================================== -http://example.com - -================================================================================ -`; - -exports[`example-575.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo@bar.example.com - -=====================================output===================================== -foo@bar.example.com - -================================================================================ -`; - -exports[`example-576.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a><bab><c2c> - -=====================================output===================================== -<a><bab><c2c> - -================================================================================ -`; - -exports[`example-577.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a/><b2/> - -=====================================output===================================== -<a/><b2/> - -================================================================================ -`; - -exports[`example-578.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a /><b2 -data="foo" > - -=====================================output===================================== -<a /><b2 -data="foo" > - -================================================================================ -`; - -exports[`example-579.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a foo="bar" bam = 'baz <em>"</em>' -_boolean zoop:33=zoop:33 /> - -=====================================output===================================== -<a foo="bar" bam = 'baz <em>"</em>' -_boolean zoop:33=zoop:33 /> - -================================================================================ -`; - -exports[`example-580.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo <responsive-image src="foo.jpg" /> - -=====================================output===================================== -Foo <responsive-image src="foo.jpg" /> - -================================================================================ -`; - -exports[`example-581.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<33> <__> - -=====================================output===================================== -<33> <\\_\\_> - -================================================================================ -`; - -exports[`example-582.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a h*#ref="hi"> - -=====================================output===================================== -<a h\\*#ref="hi"> - -================================================================================ -`; - -exports[`example-583.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="hi'> <a href=hi'> - -=====================================output===================================== -<a href="hi'> <a href=hi'> - -================================================================================ -`; - -exports[`example-584.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -< a>< -foo><bar/ > - -=====================================output===================================== -< a>< foo><bar/ > - -================================================================================ -`; - -exports[`example-585.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href='bar'title=title> - -=====================================output===================================== -<a href='bar'title=title> - -================================================================================ -`; - -exports[`example-586.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -</a></foo > - -=====================================output===================================== -</a></foo > - -================================================================================ -`; - -exports[`example-587.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -</a href="foo"> - -=====================================output===================================== -</a href="foo"> - -================================================================================ -`; - -exports[`example-588.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <!-- this is a -comment - with hyphen --> - -=====================================output===================================== -foo <!-- this is a -comment - with hyphen --> - -================================================================================ -`; - -exports[`example-589.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <!-- not a comment -- two hyphens --> - -=====================================output===================================== -foo <!-- not a comment -- two hyphens --> - -================================================================================ -`; - -exports[`example-590.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <!--> foo --> - -foo <!-- foo---> - -=====================================output===================================== -foo <!--> foo --> - -foo <!-- foo---> - -================================================================================ -`; - -exports[`example-591.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <?php echo $a; ?> - -=====================================output===================================== -foo <?php echo $a; ?> - -================================================================================ -`; - -exports[`example-592.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <!ELEMENT br EMPTY> - -=====================================output===================================== -foo <!ELEMENT br EMPTY> - -================================================================================ -`; - -exports[`example-593.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <![CDATA[>&<]]> - -=====================================output===================================== -foo <![CDATA[>&<]]> - -================================================================================ -`; - -exports[`example-594.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <a href="&ouml;"> - -=====================================output===================================== -foo <a href="&ouml;"> - -================================================================================ -`; - -exports[`example-595.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo <a href="\\*"> - -=====================================output===================================== -foo <a href="\\*"> - -================================================================================ -`; - -exports[`example-596.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="\\""> - -=====================================output===================================== -<a href="\\""> - -================================================================================ -`; - -exports[`example-597.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo -baz - -=====================================output===================================== -foo -baz - -================================================================================ -`; - -exports[`example-598.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo\\ -baz - -=====================================output===================================== -foo\\ -baz - -================================================================================ -`; - -exports[`example-599.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo -baz - -=====================================output===================================== -foo -baz - -================================================================================ -`; - -exports[`example-600.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo - bar - -=====================================output===================================== -foo - bar - -================================================================================ -`; - -exports[`example-601.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo\\ - bar - -=====================================output===================================== -foo\\ - bar - -================================================================================ -`; - -exports[`example-602.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo -bar* - -=====================================output===================================== -_foo -bar_ - -================================================================================ -`; - -exports[`example-603.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -*foo\\ -bar* - -=====================================output===================================== -_foo\\ -bar_ - -================================================================================ -`; - -exports[`example-604.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`code -span\` - -=====================================output===================================== -\`code span\` - -================================================================================ -`; - -exports[`example-605.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -\`code\\ -span\` - -=====================================output===================================== -\`code\\ span\` - -================================================================================ -`; - -exports[`example-606.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="foo -bar"> - -=====================================output===================================== -<a href="foo -bar"> - -================================================================================ -`; - -exports[`example-607.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -<a href="foo\\ -bar"> - -=====================================output===================================== -<a href="foo\\ -bar"> - -================================================================================ -`; - -exports[`example-608.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo\\ - -=====================================output===================================== -foo\\ - -================================================================================ -`; - -exports[`example-609.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo - -=====================================output===================================== -foo - -================================================================================ -`; - -exports[`example-610.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -### foo\\ - -=====================================output===================================== -### foo\\ - -================================================================================ -`; - -exports[`example-611.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -### foo - -=====================================output===================================== -### foo - -================================================================================ -`; - -exports[`example-612.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo -baz - -=====================================output===================================== -foo baz - -================================================================================ -`; - -exports[`example-613.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -foo - baz - -=====================================output===================================== -foo baz - -================================================================================ -`; - -exports[`example-614.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -hello $.;'there - -=====================================output===================================== -hello $.;'there - -================================================================================ -`; - -exports[`example-615.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Foo χρῆν - -=====================================output===================================== -Foo χρῆν - -================================================================================ -`; - -exports[`example-616.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -Multiple spaces - -=====================================output===================================== -Multiple spaces - -================================================================================ -`; diff --git a/tests/format/markdown/spec/commonmark-0.30-example-328.md b/tests/format/markdown/spec/commonmark-0.30-example-328.md new file mode 100644 index 000000000000..347253a07996 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-328.md @@ -0,0 +1 @@ +`foo` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-329.md b/tests/format/markdown/spec/commonmark-0.30-example-329.md new file mode 100644 index 000000000000..e3e641bdfe7d --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-329.md @@ -0,0 +1 @@ +`` foo ` bar `` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-330.md b/tests/format/markdown/spec/commonmark-0.30-example-330.md new file mode 100644 index 000000000000..ee4b7cc34e57 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-330.md @@ -0,0 +1 @@ +` `` ` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-331.md b/tests/format/markdown/spec/commonmark-0.30-example-331.md new file mode 100644 index 000000000000..6c9de46347a2 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-331.md @@ -0,0 +1 @@ +` `` ` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-332.md b/tests/format/markdown/spec/commonmark-0.30-example-332.md new file mode 100644 index 000000000000..909d79a6b866 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-332.md @@ -0,0 +1 @@ +` a` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-333.md b/tests/format/markdown/spec/commonmark-0.30-example-333.md new file mode 100644 index 000000000000..b426fea8b3b1 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-333.md @@ -0,0 +1 @@ +` b ` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-334.md b/tests/format/markdown/spec/commonmark-0.30-example-334.md new file mode 100644 index 000000000000..d13e0862fe6b --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-334.md @@ -0,0 +1,2 @@ +` ` +` ` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-335.md b/tests/format/markdown/spec/commonmark-0.30-example-335.md new file mode 100644 index 000000000000..40e518a3a115 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-335.md @@ -0,0 +1,5 @@ +`` +foo +bar +baz +`` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-336.md b/tests/format/markdown/spec/commonmark-0.30-example-336.md new file mode 100644 index 000000000000..acb9529d5eb2 --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-336.md @@ -0,0 +1,3 @@ +`` +foo +`` diff --git a/tests/format/markdown/spec/commonmark-0.30-example-337.md b/tests/format/markdown/spec/commonmark-0.30-example-337.md new file mode 100644 index 000000000000..86cb9f0f146b --- /dev/null +++ b/tests/format/markdown/spec/commonmark-0.30-example-337.md @@ -0,0 +1,2 @@ +`foo bar +baz` \ No newline at end of file diff --git a/tests/format/markdown/spec/format.test.js b/tests/format/markdown/spec/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/spec/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/spec/jsfmt.spec.js b/tests/format/markdown/spec/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/spec/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/splitCjkText/__snapshots__/format.test.js.snap b/tests/format/markdown/splitCjkText/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f7b3d631afc6 --- /dev/null +++ b/tests/format/markdown/splitCjkText/__snapshots__/format.test.js.snap @@ -0,0 +1,318 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`chinese-japanese.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 + +何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。 + +カ゚キ゚ク゚ケ゚コ゚でガギグゴ + +nasalカ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚ + +かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] 音を表現すること(ワ゛、ヰ゛、ヱ゛、ヲ゛)も行われたが、一般的にはならなかった。 + +=====================================output===================================== +這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 + +全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 + +空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 + +何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。 + +カ゚キ゚ク゚ケ゚コ゚でガギグゴ + +nasalカ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚ + +かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] +音を表現すること(ワ゛、ヰ゛、ヱ゛、ヲ゛)も行われたが、一般的にはならなかった。 + +================================================================================ +`; + +exports[`han-kana-alnum.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする? + +MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー! + +Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。 + +=====================================output===================================== +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする? + +MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー! + +Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。 + +================================================================================ +`; + +exports[`korean.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +예문Latin예문Latin 예문Latin예문 Latin예문Latin 예문 Latin 예문 + +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. + +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 +RTX3000 +시리즈는 +삼성전자와 +TSMC에 +의해 +제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. + +대한민국(듣기 (도움말·정보), 大韓民國, 영어: Republic of Korea; ROK[3])은 동아시아의 한반도 중남부에 있는 공화국이다. + +서쪽으로는 서해를 사이에 두고 중화인민공화국이, 동쪽으로는 동해를 사이에 두고 일본이 있으며 +북쪽으로는 조선민주주의인민공화국과 맞닿아 있다. + +역대 대통령은 李承晩 과 許政 과 尹潽善 과 朴正熙 과 崔圭夏 과 朴忠勳 과 全斗煥 과 盧泰愚 과 金泳三 과 金大中 과 盧武鉉 과 李明博 과 朴槿惠 과 文在寅 과 尹錫悅 과 음... +역대 대통령은 +李承晩 +과 +許政 +과 +尹潽善 +과 +朴正熙 과 +崔圭夏 과 +朴忠勳 과 +全斗煥 과 +盧泰愚 과 +金泳三 +과 金大中 +과 盧武鉉 +과 李明博 +과 朴槿惠 +과 文在寅 +과 尹錫悅 과 +음... + +역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... 역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... + +=====================================output===================================== +예문Latin예문Latin 예문Latin예문 Latin예문Latin 예문 Latin 예문 + +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. 한국어와 +English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. 한국어와 +English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. 한국어와 +English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. 한국어와 +English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. + +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. NVIDIA의 RTX3000 +시리즈는 삼성전자와 TSMC에 의해 제조된다. NVIDIA의 RTX3000 시리즈는 삼성전자와 +TSMC에 의해 제조된다. NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. + +대한민국(듣기 (도움말·정보), 大韓民國, 영어: Republic of Korea; ROK[3])은 +동아시아의 한반도 중남부에 있는 공화국이다. + +서쪽으로는 서해를 사이에 두고 중화인민공화국이, 동쪽으로는 동해를 사이에 두고 +일본이 있으며 북쪽으로는 조선민주주의인민공화국과 맞닿아 있다. + +역대 대통령은 李承晩 과 許政 과 尹潽善 과 朴正熙 과 崔圭夏 과 朴忠勳 과 全斗煥 +과 盧泰愚 과 金泳三 과 金大中 과 盧武鉉 과 李明博 과 朴槿惠 과 文在寅 과 尹錫悅 +과 음... 역대 대통령은 李承晩 과 許政 과 尹潽善 과 朴正熙 과 崔圭夏 과 朴忠勳 과 +全斗煥 과 盧泰愚 과 金泳三 과 金大中 과 盧武鉉 과 李明博 과 朴槿惠 과 文在寅 과 +尹錫悅 과 음... + +역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 +盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... +역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 +盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... + +================================================================================ +`; + +exports[`link.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +=====================================output===================================== +[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] + +================================================================================ +`; + +exports[`mixed.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +=====================================output===================================== +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +================================================================================ +`; + +exports[`space.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph! + +=====================================output===================================== +這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph! + +================================================================================ +`; + +exports[`symbolSpaceNewLine.md - {"proseWrap":"always"} format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 +proseWrap: "always" + | printWidth +=====================================input====================================== +日本語 +、 +にほんご +。 +汉语, +中文. +日 +本 +語 +, +に +ほ +ん +ご +. +English +words!? +漢字 +! +汉字 +? +「セリフ」 +(括弧) +文字 +(括弧) +文字 +【括弧】 +日本語 +English + +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)!!!!」 +「禁則(きんそく)処理(しょり)!!!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 + +中点 +・ +中点 + +禁則処理にわざと違反した文章のテストを今から行います。準備はいいでしょうか?レデ +ィ、ゴー! + +[ウ +ィキペディア] + +[ウ +ィキペディア]: https://ja.wikipedia.org/ + +C言 +語 +・ +C++ +・ +Go +・ +Rust + +U+301C〜 +U+FF5E~ +U+1F221🈡 + +=====================================output===================================== +日本語、にほんご。汉语, 中文. 日本語,にほんご.English +words!? 漢字!汉字?「セリフ」(括弧) 文字(括弧)文字【括弧】日本語English + +「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)」「禁則(きんそく)処理(しょり)」「禁則(きんそく)処理(しょり)!!!!」「禁則(きんそく)処理(しょり)!!!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」「禁則(きんそく)処理(しょり)!」 + +中点・中点 + +禁則処理にわざと違反した文章のテストを今から行います。準備はいいでしょうか?レディ、ゴー! + +[ウ ィキペディア] + +[ウ ィキペディア]: https://ja.wikipedia.org/ + +C言語・C++・Go・Rust + +U+301C〜U+FF5E~U+1F221🈡 + +================================================================================ +`; diff --git a/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a2568471fa0e..000000000000 --- a/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,117 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`chinese-japanese.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落 - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 - -空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 - -何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。 - -カ゚キ゚ク゚ケ゚コ゚でガギグゴ - -かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] 音を表現すること(ワ゛、ヰ゛、ヱ゛、ヲ゛)も行われたが、一般的にはならなかった。 -=====================================output===================================== -這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長 -很長的段落 - -全  形 空白全  形 空白全  形 空白全  形 空白全  形 空白 -全  形 空白全  形 空白 - -空白全形空白全形空白全形空白 空白全形空白全形空白全形空白 空白全形空白全形空白 -全形空白 空白全形空白全形空白全形空白 - -何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。 - -カ゚キ゚ク゚ケ゚コ゚でガギグゴ - -かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] 音を表現すること(ワ゛、ヰ゛、ヱ -゛、ヲ゛)も行われたが、一般的にはならなかった。 - -================================================================================ -`; - -exports[`korean.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -예문Latin예문Latin 예문Latin예문 Latin예문Latin 예문 Latin 예문 - -=====================================output===================================== -예문Latin예문Latin 예문Latin예문 Latin예문Latin 예문 Latin 예문 - -================================================================================ -`; - -exports[`link.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -=====================================output===================================== -[這是一段很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長很長的段落][] - -================================================================================ -`; - -exports[`mixed.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! - -=====================================output===================================== -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph! - -================================================================================ -`; - -exports[`space.md - {"proseWrap":"always"} format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 -proseWrap: "always" - | printWidth -=====================================input====================================== -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph! - -=====================================output===================================== -這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph!這是一個 English 混合著中文的一段 -Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 English 混合著 -中文的一段 Paragraph!這是一個 English 混合著中文的一段 Paragraph!這是一個 -English 混合著中文的一段 Paragraph! - -================================================================================ -`; diff --git a/tests/format/markdown/splitCjkText/chinese-japanese.md b/tests/format/markdown/splitCjkText/chinese-japanese.md index 3170bb7c7d4b..503efb63095c 100644 --- a/tests/format/markdown/splitCjkText/chinese-japanese.md +++ b/tests/format/markdown/splitCjkText/chinese-japanese.md @@ -8,4 +8,6 @@ カ゚キ゚ク゚ケ゚コ゚でガギグゴ -かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] 音を表現すること(ワ゛、ヰ゛、ヱ゛、ヲ゛)も行われたが、一般的にはならなかった。 \ No newline at end of file +nasalカ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚カ゚キ゚ク゚ケ゚コ゚ + +かつてはワ行のワ、ヰ、ヱ、ヲに濁点を付して [v] 音を表現すること(ワ゛、ヰ゛、ヱ゛、ヲ゛)も行われたが、一般的にはならなかった。 diff --git a/tests/format/markdown/splitCjkText/format.test.js b/tests/format/markdown/splitCjkText/format.test.js new file mode 100644 index 000000000000..3e9f1215ba19 --- /dev/null +++ b/tests/format/markdown/splitCjkText/format.test.js @@ -0,0 +1,31 @@ +const code = Array.from({ length: 6 }) + // less "文" <= [..., "文...文 ", "文...文", ...] => more "文" + .map((_, i) => ["文".repeat(39 + (i >> 1)), i & 1 ? "" : " "]) + // ["<Line #1>", "<L2>", ...] + .reduce( + (previousInputLines, [base, space]) => [ + ...previousInputLines, + `${base}${space}\n`, + ], + [], + ) + .join(""); +// (39 + 40 + 41) * 2 === 40 * 3 * 2 === 40 * 6 +// lineWidth is 80 and "文" is double-width +// This is being saved for after Chrome and Safari bug is fixed. +const output = /* `${"文".repeat(40)}\n`.repeat(6) */ `${"文".repeat(40 * 6)}\n`; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + code, + name: "Should ignore single trailing space after han before New Line before han", + output, + }, + ], + }, + ["markdown"], + { proseWrap: "always" }, +); diff --git a/tests/format/markdown/splitCjkText/han-kana-alnum.md b/tests/format/markdown/splitCjkText/han-kana-alnum.md new file mode 100644 index 000000000000..55e90bc7237e --- /dev/null +++ b/tests/format/markdown/splitCjkText/han-kana-alnum.md @@ -0,0 +1,7 @@ +這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph!這是一個English混合著中文的一段Paragraph! + +Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする?Englishと日本語が混ざったParagraphが現れた!Prettierはどうする? + +MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー!MarkdownフォーマッターPrettierはサイコー! + +Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。Prettierの最初のCommitは2016年11月29日に行われました。Prettier的第一次Commit是在2016年11月29日。 diff --git a/tests/format/markdown/splitCjkText/jsfmt.spec.js b/tests/format/markdown/splitCjkText/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/splitCjkText/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/splitCjkText/korean.md b/tests/format/markdown/splitCjkText/korean.md index 2bd2c9797af0..ba7608861d30 100644 --- a/tests/format/markdown/splitCjkText/korean.md +++ b/tests/format/markdown/splitCjkText/korean.md @@ -1 +1,62 @@ 예문Latin예문Latin 예문Latin예문 Latin예문Latin 예문 Latin 예문 + +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 +English를 +섞어 +보았습니다. +한국어와 English를 섞어 보았습니다. 한국어와 English를 섞어 보았습니다. + +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 +RTX3000 +시리즈는 +삼성전자와 +TSMC에 +의해 +제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. +NVIDIA의 RTX3000 시리즈는 삼성전자와 TSMC에 의해 제조된다. + +대한민국(듣기 (도움말·정보), 大韓民國, 영어: Republic of Korea; ROK[3])은 동아시아의 한반도 중남부에 있는 공화국이다. + +서쪽으로는 서해를 사이에 두고 중화인민공화국이, 동쪽으로는 동해를 사이에 두고 일본이 있으며 +북쪽으로는 조선민주주의인민공화국과 맞닿아 있다. + +역대 대통령은 李承晩 과 許政 과 尹潽善 과 朴正熙 과 崔圭夏 과 朴忠勳 과 全斗煥 과 盧泰愚 과 金泳三 과 金大中 과 盧武鉉 과 李明博 과 朴槿惠 과 文在寅 과 尹錫悅 과 음... +역대 대통령은 +李承晩 +과 +許政 +과 +尹潽善 +과 +朴正熙 과 +崔圭夏 과 +朴忠勳 과 +全斗煥 과 +盧泰愚 과 +金泳三 +과 金大中 +과 盧武鉉 +과 李明博 +과 朴槿惠 +과 文在寅 +과 尹錫悅 과 +음... + +역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... 역대 대통령은 李承晩과 許政과 尹潽善과 朴正熙과 崔圭夏과 朴忠勳과 全斗煥과 盧泰愚과 金泳三과 金大中과 盧武鉉과 李明博과 朴槿惠과 文在寅과 尹錫悅과 음... diff --git a/tests/format/markdown/splitCjkText/non-bmp/format.test.js b/tests/format/markdown/splitCjkText/non-bmp/format.test.js new file mode 100644 index 000000000000..eb4d00ae16bc --- /dev/null +++ b/tests/format/markdown/splitCjkText/non-bmp/format.test.js @@ -0,0 +1,19 @@ +// This preamble is unnecessary after #16805 +const preamble = "a 字 a 字 a 字"; +const code = `${preamble}\n${"葛\u{e0100}\n".repeat(3)}${"𠮷\n".repeat(2)}終\n`; +const output = `${preamble}${"葛\u{e0100}".repeat(3)}${"𠮷".repeat(2)}終\n`; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + code, + name: "Make sure non-BMP CJK characters are treated as CJK", + output, + }, + ], + }, + ["markdown"], + { proseWrap: "never" }, +); diff --git a/tests/format/markdown/splitCjkText/symbolSpaceNewLine.md b/tests/format/markdown/splitCjkText/symbolSpaceNewLine.md new file mode 100644 index 000000000000..bceb8cb66d51 --- /dev/null +++ b/tests/format/markdown/splitCjkText/symbolSpaceNewLine.md @@ -0,0 +1,72 @@ +日本語 +、 +にほんご +。 +汉语, +中文. +日 +本 +語 +, +に +ほ +ん +ご +. +English +words!? +漢字 +! +汉字 +? +「セリフ」 +(括弧) +文字 +(括弧) +文字 +【括弧】 +日本語 +English + +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)」 +「禁則(きんそく)処理(しょり)!!!!」 +「禁則(きんそく)処理(しょり)!!!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 +「禁則(きんそく)処理(しょり)!」 + +中点 +・ +中点 + +禁則処理にわざと違反した文章のテストを今から行います。準備はいいでしょうか?レデ +ィ、ゴー! + +[ウ +ィキペディア] + +[ウ +ィキペディア]: https://ja.wikipedia.org/ + +C言 +語 +・ +C++ +・ +Go +・ +Rust + +U+301C〜 +U+FF5E~ +U+1F221🈡 diff --git a/tests/format/markdown/strong/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/strong/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/strong/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/strong/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/strong/format.test.js b/tests/format/markdown/strong/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/strong/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/strong/jsfmt.spec.js b/tests/format/markdown/strong/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/strong/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/table/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/table/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/table/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/table/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/table/empty-table/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/table/empty-table/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/table/empty-table/format.test.js b/tests/format/markdown/table/empty-table/format.test.js new file mode 100644 index 000000000000..6d5c29ef171e --- /dev/null +++ b/tests/format/markdown/table/empty-table/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["markdown"]); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/table/empty-table/jsfmt.spec.js b/tests/format/markdown/table/empty-table/jsfmt.spec.js deleted file mode 100644 index 54dea461f5bd..000000000000 --- a/tests/format/markdown/table/empty-table/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["markdown"]); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/table/format.test.js b/tests/format/markdown/table/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/table/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/table/jsfmt.spec.js b/tests/format/markdown/table/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/table/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/thematicBreak/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/thematicBreak/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/thematicBreak/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/thematicBreak/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/thematicBreak/format.test.js b/tests/format/markdown/thematicBreak/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/thematicBreak/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/thematicBreak/jsfmt.spec.js b/tests/format/markdown/thematicBreak/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/thematicBreak/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/toml/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/toml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/toml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/toml/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/toml/format.test.js b/tests/format/markdown/toml/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/toml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/toml/jsfmt.spec.js b/tests/format/markdown/toml/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/toml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/trim-space/format.test.js b/tests/format/markdown/trim-space/format.test.js new file mode 100644 index 000000000000..95bcec5e2c60 --- /dev/null +++ b/tests/format/markdown/trim-space/format.test.js @@ -0,0 +1,67 @@ +function leadingTestCase() { + const paragraphs = Array.from( + { length: 3 }, + (_, i) => " ".repeat(i + 1) + "This is not a code block.\n", + ); + return { + name: "Trim leading U+0020 less than 4", + code: paragraphs.join("\n"), + output: paragraphs.map((p) => p.replace(/^ +/u, "")).join("\n"), + }; +} + +function trailingTestCase() { + const line = "The trailing space not producing hard break should be removed."; + // trailing tab is not treated as 4 spaces because trailing spaces don't + // define block structure. (https://spec.commonmark.org/0.30/#tabs) + // 2 or more spaces are treated as hard line break. + const spaces = [" ", "\t", "\t\t", "\t \t "]; + return { + name: "Trim trailing U+0020 or tab that don't produce hard break", + code: spaces.map((sp) => line + sp + "\n").join("\n"), + output: spaces.map(() => line + "\n").join("\n"), + }; +} + +function preserveVariantSpacesTestCase() { + const variantSpaces = `\v\vvertical tab\v\v + +\u{a0}\u{a0}NBSP\u{a0}\u{a0} + +\u{2002}\u{2002}en space\u{2002}\u{2002} + +\u{2003}\u{2003}em space\u{2003}\u{2003} + +\u{2004}\u{2004}1/3em\u{2004}\u{2004} + +\u{2005}\u{2005}1/4em\u{2005}\u{2005} + +\u{2028}\u{2028}line separator\u{2028}\u{2028} + +\u{2029}\u{2029}paragraph separator\u{2029}\u{2029} + +\u{3000}\u{3000}全角空白\u{3000}\u{3000} + +\u{feff}\u{feff}zero width NBSP\u{feff}\u{feff} +`; + return { + name: "Preserve non-ASCII Unicode spaces / line terminators, and vertical tab", + code: variantSpaces, + output: variantSpaces, + }; +} + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + leadingTestCase(), + trailingTestCase(), + preserveVariantSpacesTestCase(), + ], + }, + ["markdown"], + { + proseWrap: "always", + }, +); diff --git a/tests/format/markdown/wiki-link/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/wiki-link/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/wiki-link/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/wiki-link/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/wiki-link/format.test.js b/tests/format/markdown/wiki-link/format.test.js new file mode 100644 index 000000000000..c955e70bb933 --- /dev/null +++ b/tests/format/markdown/wiki-link/format.test.js @@ -0,0 +1,7 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); +runFormatTest(import.meta, ["markdown"], { + proseWrap: "always", + singleQuote: true, +}); +runFormatTest(import.meta, ["markdown"], { proseWrap: "never" }); +runFormatTest(import.meta, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/wiki-link/jsfmt.spec.js b/tests/format/markdown/wiki-link/jsfmt.spec.js deleted file mode 100644 index 6bf2457cb6f8..000000000000 --- a/tests/format/markdown/wiki-link/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); -run_spec(__dirname, ["markdown"], { proseWrap: "always", singleQuote: true }); -run_spec(__dirname, ["markdown"], { proseWrap: "never" }); -run_spec(__dirname, ["markdown"], { proseWrap: "preserve" }); diff --git a/tests/format/markdown/word/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/word/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/word/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/word/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/word/format.test.js b/tests/format/markdown/word/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/word/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/word/jsfmt.spec.js b/tests/format/markdown/word/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/word/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/yaml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/markdown/yaml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/markdown/yaml/__snapshots__/format.test.js.snap diff --git a/tests/format/markdown/yaml/format.test.js b/tests/format/markdown/yaml/format.test.js new file mode 100644 index 000000000000..6ecc0af19f82 --- /dev/null +++ b/tests/format/markdown/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/markdown/yaml/jsfmt.spec.js b/tests/format/markdown/yaml/jsfmt.spec.js deleted file mode 100644 index b62fc5842eec..000000000000 --- a/tests/format/markdown/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { proseWrap: "always" }); diff --git a/tests/format/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap b/tests/format/mdx/embedded-language-formatting/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap rename to tests/format/mdx/embedded-language-formatting/__snapshots__/format.test.js.snap diff --git a/tests/format/mdx/embedded-language-formatting/format.test.js b/tests/format/mdx/embedded-language-formatting/format.test.js new file mode 100644 index 000000000000..659ce904a2a6 --- /dev/null +++ b/tests/format/mdx/embedded-language-formatting/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mdx"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/mdx/embedded-language-formatting/jsfmt.spec.js b/tests/format/mdx/embedded-language-formatting/jsfmt.spec.js deleted file mode 100644 index 42d458897728..000000000000 --- a/tests/format/mdx/embedded-language-formatting/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["mdx"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/mdx/mdx/__snapshots__/format.test.js.snap b/tests/format/mdx/mdx/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ab5e0316a0e8 --- /dev/null +++ b/tests/format/mdx/mdx/__snapshots__/format.test.js.snap @@ -0,0 +1,939 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ignore.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +An ignore comment (HTML): + +<!-- prettier-ignore --> + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +An ignore comment (ES): + +{/* prettier-ignore */} + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +No comment: + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +=====================================output===================================== +An ignore comment (HTML): + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +An ignore comment (ES): + +{/* prettier-ignore */} +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +No comment: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne(), +) +\`\`\` + +================================================================================ +`; + +exports[`ignore.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +An ignore comment (HTML): + +<!-- prettier-ignore --> + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +An ignore comment (ES): + +{/* prettier-ignore */} + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +No comment: + +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +=====================================output===================================== +An ignore comment (HTML): + +<!-- prettier-ignore --> +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +An ignore comment (ES): + +{/* prettier-ignore */} +\`\`\`js +foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); +\`\`\` + +No comment: + +\`\`\`js +foo( + reallyLongArg(), + omgSoManyParameters(), + IShouldRefactorThis(), + isThereSeriouslyAnotherOne(), +); +\`\`\` + +================================================================================ +`; + +exports[`import-export.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import D from 'd' +import {A,B,C} from "hello-world" +import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; + +--- + +import D from 'd' + + +import {A,B,C} from "hello-world" + + +import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; + +--- + +export const meta = { +authors: [fred, sue], +layout: Layout +} + +export default () => + <Doc components={{ + h1: ui.Heading, + p: ui.Text, + code: ui.Code + }} + /> + +--- + +export const a = 1; +export const b = 1; + +=====================================output===================================== +import D from "d" +import { A, B, C } from "hello-world" +import { + AAAAAAAAAAAAAAAAAAAAAAAA, + BBBBBBBBBBBBBBBBBBBBBB, + CCCCCCCCCCCCCCCCCCCCCCC, +} from "xyz" + +--- + +import D from "d" + +import { A, B, C } from "hello-world" + +import { + AAAAAAAAAAAAAAAAAAAAAAAA, + BBBBBBBBBBBBBBBBBBBBBB, + CCCCCCCCCCCCCCCCCCCCCCC, +} from "xyz" + +--- + +export const meta = { + authors: [fred, sue], + layout: Layout, +} + +export default () => ( + <Doc + components={{ + h1: ui.Heading, + p: ui.Text, + code: ui.Code, + }} + /> +) + +--- + +export const a = 1 +export const b = 1 + +================================================================================ +`; + +exports[`import-export.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +import D from 'd' +import {A,B,C} from "hello-world" +import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; + +--- + +import D from 'd' + + +import {A,B,C} from "hello-world" + + +import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; + +--- + +export const meta = { +authors: [fred, sue], +layout: Layout +} + +export default () => + <Doc components={{ + h1: ui.Heading, + p: ui.Text, + code: ui.Code + }} + /> + +--- + +export const a = 1; +export const b = 1; + +=====================================output===================================== +import D from "d"; +import { A, B, C } from "hello-world"; +import { + AAAAAAAAAAAAAAAAAAAAAAAA, + BBBBBBBBBBBBBBBBBBBBBB, + CCCCCCCCCCCCCCCCCCCCCCC, +} from "xyz"; + +--- + +import D from "d"; + +import { A, B, C } from "hello-world"; + +import { + AAAAAAAAAAAAAAAAAAAAAAAA, + BBBBBBBBBBBBBBBBBBBBBB, + CCCCCCCCCCCCCCCCCCCCCCC, +} from "xyz"; + +--- + +export const meta = { + authors: [fred, sue], + layout: Layout, +}; + +export default () => ( + <Doc + components={{ + h1: ui.Heading, + p: ui.Text, + code: ui.Code, + }} + /> +); + +--- + +export const a = 1; +export const b = 1; + +================================================================================ +`; + +exports[`inline-html.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +This is an example of a component _being used in some italic markdown with some <Bolded />, +and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. + +| Column 1 | Column 2 | +| -- | -- | +| **\`Row 1 Code\`** | Some text. | +| **<code>Row 2 Code</code>** | Some text. | +| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | + +=====================================output===================================== +This is an example of a component _being used in some italic markdown with some <Bolded />, +and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. + +| Column 1 | Column 2 | +| --------------------------------------- | ---------- | +| **\`Row 1 Code\`** | Some text. | +| **<code>Row 2 Code</code>** | Some text. | +| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | + +================================================================================ +`; + +exports[`inline-html.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +This is an example of a component _being used in some italic markdown with some <Bolded />, +and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. + +| Column 1 | Column 2 | +| -- | -- | +| **\`Row 1 Code\`** | Some text. | +| **<code>Row 2 Code</code>** | Some text. | +| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | + +=====================================output===================================== +This is an example of a component _being used in some italic markdown with some <Bolded />, +and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. + +| Column 1 | Column 2 | +| --------------------------------------- | ---------- | +| **\`Row 1 Code\`** | Some text. | +| **<code>Row 2 Code</code>** | Some text. | +| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | + +================================================================================ +`; + +exports[`issue-9503.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +=====================================output===================================== +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an +opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +================================================================================ +`; + +exports[`issue-9503.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +=====================================output===================================== +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an +opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +================================================================================ +`; + +exports[`jsx.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<Heading hi='there'>Hello, world! +</Heading> + +--- + +<Hello> + test <World /> test +</Hello>123 + +--- + +<Hello> + test <World /> test +</Hello> +<Hello> + test <World /> test +</Hello>123 + +--- + +<Hello> + test <World /> test +</Hello> 123 +<Hello> + test <World /> test +</Hello> 234 + +--- + +<> + test <World /> test +</> 123 + +--- + +| Column 1 | Column 2 | +|---|---| +| Text | <Hello>Text</Hello> | + +--- + +A {/* JS-style comment */} comment. + +{ + /* Another JS-style comment */ +} + +=====================================output===================================== +<Heading hi="there">Hello, world!</Heading> + +--- + +<Hello> + test <World /> test +</Hello> +123 + +--- + +<Hello> + test <World /> test +</Hello> +<Hello> + test <World /> test +</Hello> +123 + +--- + +<Hello> + test <World /> test +</Hello> +123 +<Hello> + test <World /> test +</Hello> +234 + +--- + +<> + test <World /> test +</> +123 + +--- + +| Column 1 | Column 2 | +| -------- | ------------------- | +| Text | <Hello>Text</Hello> | + +--- + +A {/* JS-style comment */} comment. + +{/* Another JS-style comment */} + +================================================================================ +`; + +exports[`jsx.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +<Heading hi='there'>Hello, world! +</Heading> + +--- + +<Hello> + test <World /> test +</Hello>123 + +--- + +<Hello> + test <World /> test +</Hello> +<Hello> + test <World /> test +</Hello>123 + +--- + +<Hello> + test <World /> test +</Hello> 123 +<Hello> + test <World /> test +</Hello> 234 + +--- + +<> + test <World /> test +</> 123 + +--- + +| Column 1 | Column 2 | +|---|---| +| Text | <Hello>Text</Hello> | + +--- + +A {/* JS-style comment */} comment. + +{ + /* Another JS-style comment */ +} + +=====================================output===================================== +<Heading hi="there">Hello, world!</Heading> + +--- + +<Hello> + test <World /> test +</Hello> +123 + +--- + +<Hello> + test <World /> test +</Hello> +<Hello> + test <World /> test +</Hello> +123 + +--- + +<Hello> + test <World /> test +</Hello> +123 +<Hello> + test <World /> test +</Hello> +234 + +--- + +<> + test <World /> test +</> +123 + +--- + +| Column 1 | Column 2 | +| -------- | ------------------- | +| Text | <Hello>Text</Hello> | + +--- + +A {/* JS-style comment */} comment. + +{/* Another JS-style comment */} + +================================================================================ +`; + +exports[`jsx-codeblock.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +\`\`\`jsx +<div>foo</div> +\`\`\` + +\`\`\`jsx +const a = 1; +<div>foo</div>; +\`\`\` + +=====================================output===================================== +\`\`\`jsx +<div>foo</div> +\`\`\` + +\`\`\`jsx +const a = 1 +;<div>foo</div> +\`\`\` + +================================================================================ +`; + +exports[`jsx-codeblock.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`\`\`jsx +<div>foo</div> +\`\`\` + +\`\`\`jsx +const a = 1; +<div>foo</div>; +\`\`\` + +=====================================output===================================== +\`\`\`jsx +<div>foo</div> +\`\`\` + +\`\`\`jsx +const a = 1; +<div>foo</div>; +\`\`\` + +================================================================================ +`; + +exports[`levels.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import { Foo, Bar } from './Fixture' + +# Hello, world! + +<Foo bg='red'> + <div style={{ display: 'block'} }> + <Bar >hi </Bar> + { hello } + { /* another comment */} + </div> +</Foo> + +asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> + +<Foo/> +test + +<ul> + <li >item {' '} </li> + <li/> + </ul > + + +=====================================output===================================== +import { Foo, Bar } from "./Fixture" + +# Hello, world! + +<Foo bg="red"> + <div style={{ display: "block" }}> + <Bar>hi </Bar> + {hello} + {/* another comment */} + </div> +</Foo> + +asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> + +<Foo /> +test + +<ul> + <li>item </li> + <li /> +</ul> + +================================================================================ +`; + +exports[`levels.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { Foo, Bar } from './Fixture' + +# Hello, world! + +<Foo bg='red'> + <div style={{ display: 'block'} }> + <Bar >hi </Bar> + { hello } + { /* another comment */} + </div> +</Foo> + +asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> + +<Foo/> +test + +<ul> + <li >item {' '} </li> + <li/> + </ul > + + +=====================================output===================================== +import { Foo, Bar } from "./Fixture"; + +# Hello, world! + +<Foo bg="red"> + <div style={{ display: "block" }}> + <Bar>hi </Bar> + {hello} + {/* another comment */} + </div> +</Foo> + +asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> + +<Foo /> +test + +<ul> + <li>item </li> + <li /> +</ul> + +================================================================================ +`; + +exports[`mixed.mdx - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +import { Baz } from './Fixture' +import { Buz } from './Fixture' + +export const foo = { + hi: \`Fudge \${Baz.displayName || 'Baz'}\`, + authors: [ + 'fred', + 'sally' + ] +} + +# Hello, world! + + + I'm an awesome paragraph. + +<!-- I'm a comment --> + +<Foo bg='red'> + <Bar >hi </Bar> + { hello } + { /* another comment */} +</Foo> + +\`\`\` +test codeblock +\`\`\` + +\`\`\`js +module.exports = 'test' +\`\`\` + +\`\`\`sh +npm i -g foo +\`\`\` + +| Test | Table | +| :--- | :---- | +| Col1 | Col2 | + +export default ({children }) => < div>{ children}</div> + +=====================================output===================================== +import { Baz } from "./Fixture" +import { Buz } from "./Fixture" + +export const foo = { + hi: \`Fudge \${Baz.displayName || "Baz"}\`, + authors: ["fred", "sally"], +} + +# Hello, world! + +I'm an awesome paragraph. + +<!-- I'm a comment --> + +<Foo bg="red"> + <Bar>hi </Bar> + {hello} + {/* another comment */} +</Foo> + +\`\`\` +test codeblock +\`\`\` + +\`\`\`js +module.exports = "test" +\`\`\` + +\`\`\`sh +npm i -g foo +\`\`\` + +| Test | Table | +| :--- | :---- | +| Col1 | Col2 | + +export default ({ children }) => <div>{children}</div> + +================================================================================ +`; + +exports[`mixed.mdx format 1`] = ` +====================================options===================================== +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +import { Baz } from './Fixture' +import { Buz } from './Fixture' + +export const foo = { + hi: \`Fudge \${Baz.displayName || 'Baz'}\`, + authors: [ + 'fred', + 'sally' + ] +} + +# Hello, world! + + + I'm an awesome paragraph. + +<!-- I'm a comment --> + +<Foo bg='red'> + <Bar >hi </Bar> + { hello } + { /* another comment */} +</Foo> + +\`\`\` +test codeblock +\`\`\` + +\`\`\`js +module.exports = 'test' +\`\`\` + +\`\`\`sh +npm i -g foo +\`\`\` + +| Test | Table | +| :--- | :---- | +| Col1 | Col2 | + +export default ({children }) => < div>{ children}</div> + +=====================================output===================================== +import { Baz } from "./Fixture"; +import { Buz } from "./Fixture"; + +export const foo = { + hi: \`Fudge \${Baz.displayName || "Baz"}\`, + authors: ["fred", "sally"], +}; + +# Hello, world! + +I'm an awesome paragraph. + +<!-- I'm a comment --> + +<Foo bg="red"> + <Bar>hi </Bar> + {hello} + {/* another comment */} +</Foo> + +\`\`\` +test codeblock +\`\`\` + +\`\`\`js +module.exports = "test"; +\`\`\` + +\`\`\`sh +npm i -g foo +\`\`\` + +| Test | Table | +| :--- | :---- | +| Col1 | Col2 | + +export default ({ children }) => <div>{children}</div>; + +================================================================================ +`; diff --git a/tests/format/mdx/mdx/__snapshots__/jsfmt.spec.js.snap b/tests/format/mdx/mdx/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7eea6b30cbef..000000000000 --- a/tests/format/mdx/mdx/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,900 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignore.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -An ignore comment (HTML): - -<!-- prettier-ignore --> - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -An ignore comment (ES): - -{/* prettier-ignore */} - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -No comment: - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -=====================================output===================================== -An ignore comment (HTML): - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -An ignore comment (ES): - -{/* prettier-ignore */} -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -No comment: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -) -\`\`\` - -================================================================================ -`; - -exports[`ignore.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -An ignore comment (HTML): - -<!-- prettier-ignore --> - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -An ignore comment (ES): - -{/* prettier-ignore */} - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -No comment: - -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -=====================================output===================================== -An ignore comment (HTML): - -<!-- prettier-ignore --> -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -An ignore comment (ES): - -{/* prettier-ignore */} -\`\`\`js -foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); -\`\`\` - -No comment: - -\`\`\`js -foo( - reallyLongArg(), - omgSoManyParameters(), - IShouldRefactorThis(), - isThereSeriouslyAnotherOne() -); -\`\`\` - -================================================================================ -`; - -exports[`import-export.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import D from 'd' -import {A,B,C} from "hello-world" -import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; - ---- - -import D from 'd' - - -import {A,B,C} from "hello-world" - - -import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; - ---- - -export const meta = { -authors: [fred, sue], -layout: Layout -} - -export default () => - <Doc components={{ - h1: ui.Heading, - p: ui.Text, - code: ui.Code - }} - /> - ---- - -export const a = 1; -export const b = 1; - -=====================================output===================================== -import D from "d" -import { A, B, C } from "hello-world" -import { - AAAAAAAAAAAAAAAAAAAAAAAA, - BBBBBBBBBBBBBBBBBBBBBB, - CCCCCCCCCCCCCCCCCCCCCCC, -} from "xyz" - ---- - -import D from "d" - -import { A, B, C } from "hello-world" - -import { - AAAAAAAAAAAAAAAAAAAAAAAA, - BBBBBBBBBBBBBBBBBBBBBB, - CCCCCCCCCCCCCCCCCCCCCCC, -} from "xyz" - ---- - -export const meta = { - authors: [fred, sue], - layout: Layout, -} - -export default () => ( - <Doc - components={{ - h1: ui.Heading, - p: ui.Text, - code: ui.Code, - }} - /> -) - ---- - -export const a = 1 -export const b = 1 - -================================================================================ -`; - -exports[`import-export.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -import D from 'd' -import {A,B,C} from "hello-world" -import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; - ---- - -import D from 'd' - - -import {A,B,C} from "hello-world" - - -import {AAAAAAAAAAAAAAAAAAAAAAAA, BBBBBBBBBBBBBBBBBBBBBB, CCCCCCCCCCCCCCCCCCCCCCC} from 'xyz'; - ---- - -export const meta = { -authors: [fred, sue], -layout: Layout -} - -export default () => - <Doc components={{ - h1: ui.Heading, - p: ui.Text, - code: ui.Code - }} - /> - ---- - -export const a = 1; -export const b = 1; - -=====================================output===================================== -import D from "d"; -import { A, B, C } from "hello-world"; -import { - AAAAAAAAAAAAAAAAAAAAAAAA, - BBBBBBBBBBBBBBBBBBBBBB, - CCCCCCCCCCCCCCCCCCCCCCC, -} from "xyz"; - ---- - -import D from "d"; - -import { A, B, C } from "hello-world"; - -import { - AAAAAAAAAAAAAAAAAAAAAAAA, - BBBBBBBBBBBBBBBBBBBBBB, - CCCCCCCCCCCCCCCCCCCCCCC, -} from "xyz"; - ---- - -export const meta = { - authors: [fred, sue], - layout: Layout, -}; - -export default () => ( - <Doc - components={{ - h1: ui.Heading, - p: ui.Text, - code: ui.Code, - }} - /> -); - ---- - -export const a = 1; -export const b = 1; - -================================================================================ -`; - -exports[`inline-html.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -This is an example of a component _being used in some italic markdown with some <Bolded />, -and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. - -| Column 1 | Column 2 | -| -- | -- | -| **\`Row 1 Code\`** | Some text. | -| **<code>Row 2 Code</code>** | Some text. | -| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | - -=====================================output===================================== -This is an example of a component _being used in some italic markdown with some <Bolded />, -and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. - -| Column 1 | Column 2 | -| --------------------------------------- | ---------- | -| **\`Row 1 Code\`** | Some text. | -| **<code>Row 2 Code</code>** | Some text. | -| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | - -================================================================================ -`; - -exports[`inline-html.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -This is an example of a component _being used in some italic markdown with some <Bolded />, -and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. - -| Column 1 | Column 2 | -| -- | -- | -| **\`Row 1 Code\`** | Some text. | -| **<code>Row 2 Code</code>** | Some text. | -| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | - -=====================================output===================================== -This is an example of a component _being used in some italic markdown with some <Bolded />, -and as you can see_ once you close the italics, it will break incorrectly when prettier formats it. - -| Column 1 | Column 2 | -| --------------------------------------- | ---------- | -| **\`Row 1 Code\`** | Some text. | -| **<code>Row 2 Code</code>** | Some text. | -| **<InlineCode>Row 2 Code</InlineCode>** | Some text. | - -================================================================================ -`; - -exports[`jsx.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<Heading hi='there'>Hello, world! -</Heading> - ---- - -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> 123 -<Hello> - test <World /> test -</Hello> 234 - ---- - -<> - test <World /> test -</> 123 - ---- - -| Column 1 | Column 2 | -|---|---| -| Text | <Hello>Text</Hello> | - ---- - -A {/* JS-style comment */} comment. - -{ - /* Another JS-style comment */ -} - -=====================================output===================================== -<Heading hi="there">Hello, world!</Heading> - ---- - -<Hello> - test <World /> test -</Hello> -123 - ---- - -<Hello> - test <World /> test -</Hello> -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> 123 -<Hello> - test <World /> test -</Hello> 234 - ---- - -<> - test <World /> test -</> 123 - ---- - -| Column 1 | Column 2 | -| -------- | ------------------- | -| Text | <Hello>Text</Hello> | - ---- - -A {/* JS-style comment */} comment. - -{/* Another JS-style comment */} - -================================================================================ -`; - -exports[`jsx.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -<Heading hi='there'>Hello, world! -</Heading> - ---- - -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> 123 -<Hello> - test <World /> test -</Hello> 234 - ---- - -<> - test <World /> test -</> 123 - ---- - -| Column 1 | Column 2 | -|---|---| -| Text | <Hello>Text</Hello> | - ---- - -A {/* JS-style comment */} comment. - -{ - /* Another JS-style comment */ -} - -=====================================output===================================== -<Heading hi="there">Hello, world!</Heading> - ---- - -<Hello> - test <World /> test -</Hello> -123 - ---- - -<Hello> - test <World /> test -</Hello> -<Hello> - test <World /> test -</Hello>123 - ---- - -<Hello> - test <World /> test -</Hello> 123 -<Hello> - test <World /> test -</Hello> 234 - ---- - -<> - test <World /> test -</> 123 - ---- - -| Column 1 | Column 2 | -| -------- | ------------------- | -| Text | <Hello>Text</Hello> | - ---- - -A {/* JS-style comment */} comment. - -{/* Another JS-style comment */} - -================================================================================ -`; - -exports[`jsx-codeblock.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -\`\`\`jsx -<div>foo</div> -\`\`\` - -\`\`\`jsx -const a = 1; -<div>foo</div>; -\`\`\` - -=====================================output===================================== -\`\`\`jsx -<div>foo</div> -\`\`\` - -\`\`\`jsx -const a = 1 -;<div>foo</div> -\`\`\` - -================================================================================ -`; - -exports[`jsx-codeblock.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`\`\`jsx -<div>foo</div> -\`\`\` - -\`\`\`jsx -const a = 1; -<div>foo</div>; -\`\`\` - -=====================================output===================================== -\`\`\`jsx -<div>foo</div> -\`\`\` - -\`\`\`jsx -const a = 1; -<div>foo</div>; -\`\`\` - -================================================================================ -`; - -exports[`levels.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import { Foo, Bar } from './Fixture' - -# Hello, world! - -<Foo bg='red'> - <div style={{ display: 'block'} }> - <Bar >hi </Bar> - { hello } - { /* another comment */} - </div> -</Foo> - -asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> - -<Foo/> -test - -<ul> - <li >item {' '} </li> - <li/> - </ul > - - -=====================================output===================================== -import { Foo, Bar } from "./Fixture" - -# Hello, world! - -<Foo bg="red"> - <div style={{ display: "block" }}> - <Bar>hi </Bar> - {hello} - {/* another comment */} - </div> -</Foo> - -asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> - -<Foo /> -test - -<ul> - <li>item </li> - <li /> -</ul> - -================================================================================ -`; - -exports[`levels.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { Foo, Bar } from './Fixture' - -# Hello, world! - -<Foo bg='red'> - <div style={{ display: 'block'} }> - <Bar >hi </Bar> - { hello } - { /* another comment */} - </div> -</Foo> - -asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> - -<Foo/> -test - -<ul> - <li >item {' '} </li> - <li/> - </ul > - - -=====================================output===================================== -import { Foo, Bar } from "./Fixture"; - -# Hello, world! - -<Foo bg="red"> - <div style={{ display: "block" }}> - <Bar>hi </Bar> - {hello} - {/* another comment */} - </div> -</Foo> - -asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong> - -<Foo /> -test - -<ul> - <li>item </li> - <li /> -</ul> - -================================================================================ -`; - -exports[`mixed.mdx - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -import { Baz } from './Fixture' -import { Buz } from './Fixture' - -export const foo = { - hi: \`Fudge \${Baz.displayName || 'Baz'}\`, - authors: [ - 'fred', - 'sally' - ] -} - -# Hello, world! - - - I'm an awesome paragraph. - -<!-- I'm a comment --> - -<Foo bg='red'> - <Bar >hi </Bar> - { hello } - { /* another comment */} -</Foo> - -\`\`\` -test codeblock -\`\`\` - -\`\`\`js -module.exports = 'test' -\`\`\` - -\`\`\`sh -npm i -g foo -\`\`\` - -| Test | Table | -| :--- | :---- | -| Col1 | Col2 | - -export default ({children }) => < div>{ children}</div> - -=====================================output===================================== -import { Baz } from "./Fixture" -import { Buz } from "./Fixture" - -export const foo = { - hi: \`Fudge \${Baz.displayName || "Baz"}\`, - authors: ["fred", "sally"], -} - -# Hello, world! - -I'm an awesome paragraph. - -<!-- I'm a comment --> - -<Foo bg="red"> - <Bar>hi </Bar> - {hello} - {/* another comment */} -</Foo> - -\`\`\` -test codeblock -\`\`\` - -\`\`\`js -module.exports = "test" -\`\`\` - -\`\`\`sh -npm i -g foo -\`\`\` - -| Test | Table | -| :--- | :---- | -| Col1 | Col2 | - -export default ({ children }) => <div>{children}</div> - -================================================================================ -`; - -exports[`mixed.mdx format 1`] = ` -====================================options===================================== -parsers: ["mdx"] -printWidth: 80 - | printWidth -=====================================input====================================== -import { Baz } from './Fixture' -import { Buz } from './Fixture' - -export const foo = { - hi: \`Fudge \${Baz.displayName || 'Baz'}\`, - authors: [ - 'fred', - 'sally' - ] -} - -# Hello, world! - - - I'm an awesome paragraph. - -<!-- I'm a comment --> - -<Foo bg='red'> - <Bar >hi </Bar> - { hello } - { /* another comment */} -</Foo> - -\`\`\` -test codeblock -\`\`\` - -\`\`\`js -module.exports = 'test' -\`\`\` - -\`\`\`sh -npm i -g foo -\`\`\` - -| Test | Table | -| :--- | :---- | -| Col1 | Col2 | - -export default ({children }) => < div>{ children}</div> - -=====================================output===================================== -import { Baz } from "./Fixture"; -import { Buz } from "./Fixture"; - -export const foo = { - hi: \`Fudge \${Baz.displayName || "Baz"}\`, - authors: ["fred", "sally"], -}; - -# Hello, world! - -I'm an awesome paragraph. - -<!-- I'm a comment --> - -<Foo bg="red"> - <Bar>hi </Bar> - {hello} - {/* another comment */} -</Foo> - -\`\`\` -test codeblock -\`\`\` - -\`\`\`js -module.exports = "test"; -\`\`\` - -\`\`\`sh -npm i -g foo -\`\`\` - -| Test | Table | -| :--- | :---- | -| Col1 | Col2 | - -export default ({ children }) => <div>{children}</div>; - -================================================================================ -`; diff --git a/tests/format/mdx/mdx/format.test.js b/tests/format/mdx/mdx/format.test.js new file mode 100644 index 000000000000..c31f21578c0a --- /dev/null +++ b/tests/format/mdx/mdx/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["mdx"]); +runFormatTest(import.meta, ["mdx"], { semi: false }); diff --git a/tests/format/mdx/mdx/issue-9503.mdx b/tests/format/mdx/mdx/issue-9503.mdx new file mode 100644 index 000000000000..a88ef9c59748 --- /dev/null +++ b/tests/format/mdx/mdx/issue-9503.mdx @@ -0,0 +1 @@ +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors diff --git a/tests/format/mdx/mdx/jsfmt.spec.js b/tests/format/mdx/mdx/jsfmt.spec.js deleted file mode 100644 index 2b230e141a13..000000000000 --- a/tests/format/mdx/mdx/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["mdx"]); -run_spec(__dirname, ["mdx"], { semi: false }); diff --git a/tests/format/misc/babel-redirect-to-babel-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/babel-redirect-to-babel-flow/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/babel-redirect-to-babel-flow/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/babel-redirect-to-babel-flow/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/babel-redirect-to-babel-flow/format.test.js b/tests/format/misc/babel-redirect-to-babel-flow/format.test.js new file mode 100644 index 000000000000..f509b709ec61 --- /dev/null +++ b/tests/format/misc/babel-redirect-to-babel-flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel"]); diff --git a/tests/format/misc/babel-redirect-to-babel-flow/jsfmt.spec.js b/tests/format/misc/babel-redirect-to-babel-flow/jsfmt.spec.js deleted file mode 100644 index 8382eddeb1db..000000000000 --- a/tests/format/misc/babel-redirect-to-babel-flow/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"]); diff --git a/tests/format/misc/check-ignore-pragma/css/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..be079ffaccb1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/__snapshots__/format.test.js.snap @@ -0,0 +1,75 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.css - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noformat */ + +.class { display: none; } + +=====================================output===================================== +/** @noformat */ + +.class { display: none; } + +================================================================================ +`; + +exports[`with-noprettier-pragma.css - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noprettier */ + +.class { display: none; } + +=====================================output===================================== +/** @noprettier */ + +.class { display: none; } + +================================================================================ +`; + +exports[`with-noprettier-pragma-comments.css - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noprettier -- reason to not format */ + +.class { display: none; } + +=====================================output===================================== +/** @noprettier -- reason to not format */ + +.class { display: none; } + +================================================================================ +`; + +exports[`without-pragma.css - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.class { display: none; } + +=====================================output===================================== +.class { + display: none; +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/css/format.test.js b/tests/format/misc/check-ignore-pragma/css/format.test.js new file mode 100644 index 000000000000..3797def2f2b4 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/css/with-noformat-pragma.css b/tests/format/misc/check-ignore-pragma/css/with-noformat-pragma.css new file mode 100644 index 000000000000..2cf90c4d43f0 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/with-noformat-pragma.css @@ -0,0 +1,3 @@ +/** @noformat */ + +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma-comments.css b/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma-comments.css new file mode 100644 index 000000000000..a9692cb8b428 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma-comments.css @@ -0,0 +1,3 @@ +/** @noprettier -- reason to not format */ + +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma.css b/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma.css new file mode 100644 index 000000000000..18173fd32efb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/with-noprettier-pragma.css @@ -0,0 +1,3 @@ +/** @noprettier */ + +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/css/without-pragma.css b/tests/format/misc/check-ignore-pragma/css/without-pragma.css new file mode 100644 index 000000000000..7bac0655ffe9 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/css/without-pragma.css @@ -0,0 +1 @@ +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/disabled/css/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..aa9d9166578b --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/css/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.css - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noformat */ + +.class { display: none; } + +=====================================output===================================== +/** @noformat */ + +.class { + display: none; +} + +================================================================================ +`; + +exports[`with-noprettier-pragma.css - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noprettier */ + +.class { display: none; } + +=====================================output===================================== +/** @noprettier */ + +.class { + display: none; +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/css/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/css/format.test.js new file mode 100644 index 000000000000..b5ff1599d543 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/css/with-noformat-pragma.css b/tests/format/misc/check-ignore-pragma/disabled/css/with-noformat-pragma.css new file mode 100644 index 000000000000..2cf90c4d43f0 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/css/with-noformat-pragma.css @@ -0,0 +1,3 @@ +/** @noformat */ + +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/disabled/css/with-noprettier-pragma.css b/tests/format/misc/check-ignore-pragma/disabled/css/with-noprettier-pragma.css new file mode 100644 index 000000000000..18173fd32efb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/css/with-noprettier-pragma.css @@ -0,0 +1,3 @@ +/** @noprettier */ + +.class { display: none; } diff --git a/tests/format/misc/check-ignore-pragma/disabled/graphql/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/graphql/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2a90b5bb8ee7 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/graphql/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.graphql - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noformat + +query Browse($offset:Int){browse(offset:$offset)} + +=====================================output===================================== +# @noformat + +query Browse($offset: Int) { + browse(offset: $offset) +} + +================================================================================ +`; + +exports[`with-noprettier-pragma.graphql - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noprettier + +query Browse($offset:Int){browse(offset:$offset)} + +=====================================output===================================== +# @noprettier + +query Browse($offset: Int) { + browse(offset: $offset) +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/graphql/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/graphql/format.test.js new file mode 100644 index 000000000000..88c15fdaaeeb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["graphql"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noformat-pragma.graphql b/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noformat-pragma.graphql new file mode 100644 index 000000000000..dcf9427af1b1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noformat-pragma.graphql @@ -0,0 +1,3 @@ +# @noformat + +query Browse($offset:Int){browse(offset:$offset)} diff --git a/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noprettier-pragma.graphql b/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noprettier-pragma.graphql new file mode 100644 index 000000000000..2d588e33c8db --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/graphql/with-noprettier-pragma.graphql @@ -0,0 +1,3 @@ +# @noprettier + +query Browse($offset:Int){browse(offset:$offset)} diff --git a/tests/format/misc/check-ignore-pragma/disabled/html/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/html/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..512af313e8e7 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/html/__snapshots__/format.test.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.html - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> + +<div + > ABC </div> + +=====================================output===================================== +<!-- @noformat --> + +<div>ABC</div> + +================================================================================ +`; + +exports[`with-noprettier-pragma.html - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> + +<div + > ABC </div> + +=====================================output===================================== +<!-- @noprettier --> + +<div>ABC</div> + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/html/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/html/format.test.js new file mode 100644 index 000000000000..019d2f3f7597 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/html/with-noformat-pragma.html b/tests/format/misc/check-ignore-pragma/disabled/html/with-noformat-pragma.html new file mode 100644 index 000000000000..ad1120cc98c2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/html/with-noformat-pragma.html @@ -0,0 +1,4 @@ +<!-- @noformat --> + +<div + > ABC </div> diff --git a/tests/format/misc/check-ignore-pragma/disabled/html/with-noprettier-pragma.html b/tests/format/misc/check-ignore-pragma/disabled/html/with-noprettier-pragma.html new file mode 100644 index 000000000000..62e483bf9315 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/html/with-noprettier-pragma.html @@ -0,0 +1,4 @@ +<!-- @noprettier --> + +<div + > ABC </div> diff --git a/tests/format/misc/check-ignore-pragma/disabled/js/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/js/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3620328a455d --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/js/__snapshots__/format.test.js.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`module-with-noformat-pragma.js - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + * @noformat + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + * @noformat + */ + +function foo(bar) { + return bar + 3 + 4; +} + +================================================================================ +`; + +exports[`module-with-noprettier-pragma.js - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + * @noprettier + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + * @noprettier + */ + +function foo(bar) { + return bar + 3 + 4; +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/js/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/js/format.test.js new file mode 100644 index 000000000000..ed39b1b12adc --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/js/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + checkIgnorePragma: false, +}); diff --git a/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noformat-pragma.js b/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noformat-pragma.js new file mode 100644 index 000000000000..936ea7c49103 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noformat-pragma.js @@ -0,0 +1,14 @@ +/** + * @flow + * @noformat + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noprettier-pragma.js b/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noprettier-pragma.js new file mode 100644 index 000000000000..d7c25b2eaa35 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/js/module-with-noprettier-pragma.js @@ -0,0 +1,14 @@ +/** + * @flow + * @noprettier + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/disabled/json5/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/json5/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..15b12085751e --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/json5/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.json5 - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["json5"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noformat */ + +{hello: "world"} + +=====================================output===================================== +/** @noformat */ + +{ hello: "world" } + +================================================================================ +`; + +exports[`with-noprettier-pragma.json5 - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["json5"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noprettier */ + +{hello: "world"} + +=====================================output===================================== +/** @noprettier */ + +{ hello: "world" } + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/json5/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/json5/format.test.js new file mode 100644 index 000000000000..f18aecc81287 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/json5/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/json5/with-noformat-pragma.json5 b/tests/format/misc/check-ignore-pragma/disabled/json5/with-noformat-pragma.json5 new file mode 100644 index 000000000000..37e934665704 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/json5/with-noformat-pragma.json5 @@ -0,0 +1,3 @@ +/** @noformat */ + +{hello: "world"} diff --git a/tests/format/misc/check-ignore-pragma/disabled/json5/with-noprettier-pragma.json5 b/tests/format/misc/check-ignore-pragma/disabled/json5/with-noprettier-pragma.json5 new file mode 100644 index 000000000000..8cb5196a043a --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/json5/with-noprettier-pragma.json5 @@ -0,0 +1,3 @@ +/** @noprettier */ + +{hello: "world"} diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b0f75946a435 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,93 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`front-matter-with-noformat-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +something +--- + +<!-- @noformat --> + +I should be formatted !! + +=====================================output===================================== +--- +something +--- + +<!-- @noformat --> + +I should be formatted !! + +================================================================================ +`; + +exports[`front-matter-with-noprettier-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +something +--- + +<!-- @noprettier --> + +I should be formatted !! + +=====================================output===================================== +--- +something +--- + +<!-- @noprettier --> + +I should be formatted !! + +================================================================================ +`; + +exports[`with-noformat-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> + +I should be formatted !! + +=====================================output===================================== +<!-- @noformat --> + +I should be formatted !! + +================================================================================ +`; + +exports[`with-noprettier-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> + +I should be formatted !! + +=====================================output===================================== +<!-- @noprettier --> + +I should be formatted !! + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/markdown/format.test.js new file mode 100644 index 000000000000..78fb8e32ada1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noformat-pragma.md new file mode 100644 index 000000000000..8f6ef34dd6d1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noformat-pragma.md @@ -0,0 +1,7 @@ +--- +something +--- + +<!-- @noformat --> + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noprettier-pragma.md new file mode 100644 index 000000000000..cf707722244b --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/front-matter-with-noprettier-pragma.md @@ -0,0 +1,7 @@ +--- +something +--- + +<!-- @noprettier --> + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noformat-pragma.md new file mode 100644 index 000000000000..262b32de0cbe --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noformat-pragma.md @@ -0,0 +1,3 @@ +<!-- @noformat --> + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noprettier-pragma.md new file mode 100644 index 000000000000..956dff08d56e --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/markdown/with-noprettier-pragma.md @@ -0,0 +1,3 @@ +<!-- @noprettier --> + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/mdx/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/mdx/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..80e248825c23 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/mdx/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +{/* @noformat */} + +I should be formatted !! + +=====================================output===================================== +{/* @noformat */} + +I should be formatted !! + +================================================================================ +`; + +exports[`with-noprettier-pragma.md - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +{/* @noprettier */} + +I should be formatted !! + +=====================================output===================================== +{/* @noprettier */} + +I should be formatted !! + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/mdx/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/mdx/format.test.js new file mode 100644 index 000000000000..4e09d6ff8bcf --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/mdx/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mdx"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noformat-pragma.md new file mode 100644 index 000000000000..585e73ffce5c --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noformat-pragma.md @@ -0,0 +1,3 @@ +{/* @noformat */} + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noprettier-pragma.md new file mode 100644 index 000000000000..7f53055cd7f3 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/mdx/with-noprettier-pragma.md @@ -0,0 +1,3 @@ +{/* @noprettier */} + +I should be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/disabled/vue/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/vue/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..902d00bc01f6 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/vue/__snapshots__/format.test.js.snap @@ -0,0 +1,59 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.vue - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +=====================================output===================================== +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +================================================================================ +`; + +exports[`with-noprettier-pragma.vue - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +=====================================output===================================== +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/vue/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/vue/format.test.js new file mode 100644 index 000000000000..a2de0ceb8db3 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/vue/with-noformat-pragma.vue b/tests/format/misc/check-ignore-pragma/disabled/vue/with-noformat-pragma.vue new file mode 100644 index 000000000000..5d3d18610122 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/vue/with-noformat-pragma.vue @@ -0,0 +1,8 @@ +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> diff --git a/tests/format/misc/check-ignore-pragma/disabled/vue/with-noprettier-pragma.vue b/tests/format/misc/check-ignore-pragma/disabled/vue/with-noprettier-pragma.vue new file mode 100644 index 000000000000..0150e6dcfbf1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/vue/with-noprettier-pragma.vue @@ -0,0 +1,8 @@ +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> diff --git a/tests/format/misc/check-ignore-pragma/disabled/yaml/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/disabled/yaml/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..051da3791359 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/yaml/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.yml - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noformat + + 123 + +=====================================output===================================== +# @noformat + +123 + +================================================================================ +`; + +exports[`with-noprettier-pragma.yml - {"checkIgnorePragma":false} format 1`] = ` +====================================options===================================== +checkIgnorePragma: false +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noprettier + + 123 + +=====================================output===================================== +# @noprettier + +123 + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/disabled/yaml/format.test.js b/tests/format/misc/check-ignore-pragma/disabled/yaml/format.test.js new file mode 100644 index 000000000000..fcd34bcc0afb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"], { checkIgnorePragma: false }); diff --git a/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noformat-pragma.yml b/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noformat-pragma.yml new file mode 100644 index 000000000000..af6095ae4cf7 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noformat-pragma.yml @@ -0,0 +1,3 @@ +# @noformat + + 123 diff --git a/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noprettier-pragma.yml b/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noprettier-pragma.yml new file mode 100644 index 000000000000..ccc87f99d7a2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/disabled/yaml/with-noprettier-pragma.yml @@ -0,0 +1,3 @@ +# @noprettier + + 123 diff --git a/tests/format/misc/check-ignore-pragma/graphql/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/graphql/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..20b7eae1906c --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/graphql/__snapshots__/format.test.js.snap @@ -0,0 +1,56 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.graphql - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noformat + +query Browse($offset:Int){browse(offset:$offset)} + +=====================================output===================================== +# @noformat + +query Browse($offset:Int){browse(offset:$offset)} + +================================================================================ +`; + +exports[`with-noprettier-pragma.graphql - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noprettier + +query Browse($offset:Int){browse(offset:$offset)} + +=====================================output===================================== +# @noprettier + +query Browse($offset:Int){browse(offset:$offset)} + +================================================================================ +`; + +exports[`without-pragma.graphql - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +query Browse($offset:Int){browse(offset:$offset)} + +=====================================output===================================== +query Browse($offset: Int) { + browse(offset: $offset) +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/graphql/format.test.js b/tests/format/misc/check-ignore-pragma/graphql/format.test.js new file mode 100644 index 000000000000..e734e87e61dc --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["graphql"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/graphql/with-noformat-pragma.graphql b/tests/format/misc/check-ignore-pragma/graphql/with-noformat-pragma.graphql new file mode 100644 index 000000000000..dcf9427af1b1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/graphql/with-noformat-pragma.graphql @@ -0,0 +1,3 @@ +# @noformat + +query Browse($offset:Int){browse(offset:$offset)} diff --git a/tests/format/misc/check-ignore-pragma/graphql/with-noprettier-pragma.graphql b/tests/format/misc/check-ignore-pragma/graphql/with-noprettier-pragma.graphql new file mode 100644 index 000000000000..2d588e33c8db --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/graphql/with-noprettier-pragma.graphql @@ -0,0 +1,3 @@ +# @noprettier + +query Browse($offset:Int){browse(offset:$offset)} diff --git a/tests/format/misc/check-ignore-pragma/graphql/without-pragma.graphql b/tests/format/misc/check-ignore-pragma/graphql/without-pragma.graphql new file mode 100644 index 000000000000..5d2d387a2db2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/graphql/without-pragma.graphql @@ -0,0 +1 @@ +query Browse($offset:Int){browse(offset:$offset)} diff --git a/tests/format/misc/check-ignore-pragma/html/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/html/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7bb850c55417 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/html/__snapshots__/format.test.js.snap @@ -0,0 +1,59 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.html - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> + +<div + > ABC </div> + +=====================================output===================================== +<!-- @noformat --> + +<div + > ABC </div> + +================================================================================ +`; + +exports[`with-noprettier-pragma.html - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> + +<div + > ABC </div> + +=====================================output===================================== +<!-- @noprettier --> + +<div + > ABC </div> + +================================================================================ +`; + +exports[`without-pragma.html - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<div + > ABC </div> + +=====================================output===================================== +<div>ABC</div> + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/html/format.test.js b/tests/format/misc/check-ignore-pragma/html/format.test.js new file mode 100644 index 000000000000..87db68c17d73 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/html/with-noformat-pragma.html b/tests/format/misc/check-ignore-pragma/html/with-noformat-pragma.html new file mode 100644 index 000000000000..ad1120cc98c2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/html/with-noformat-pragma.html @@ -0,0 +1,4 @@ +<!-- @noformat --> + +<div + > ABC </div> diff --git a/tests/format/misc/check-ignore-pragma/html/with-noprettier-pragma.html b/tests/format/misc/check-ignore-pragma/html/with-noprettier-pragma.html new file mode 100644 index 000000000000..62e483bf9315 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/html/with-noprettier-pragma.html @@ -0,0 +1,4 @@ +<!-- @noprettier --> + +<div + > ABC </div> diff --git a/tests/format/misc/check-ignore-pragma/html/without-pragma.html b/tests/format/misc/check-ignore-pragma/html/without-pragma.html new file mode 100644 index 000000000000..139db13e977f --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/html/without-pragma.html @@ -0,0 +1,2 @@ +<div + > ABC </div> diff --git a/tests/format/misc/check-ignore-pragma/js/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/js/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d0302ddda9ba --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/__snapshots__/format.test.js.snap @@ -0,0 +1,157 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`module-with-noformat-pragma.js - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + * @noformat + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + * @noformat + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +================================================================================ +`; + +exports[`module-with-noprettier-pragma.js - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + * @noprettier + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + * @noprettier + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +================================================================================ +`; + +exports[`module-with-noprettier-pragma-comments.js - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + * @noprettier -- reason to not format + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + * @noprettier -- reason to not format + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +================================================================================ +`; + +exports[`module-without-pragma.js - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["flow", "babel", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** + * @flow + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} + +=====================================output===================================== +/** + * @flow + */ + +function foo(bar) { + return bar + 3 + 4; +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/js/format.test.js b/tests/format/misc/check-ignore-pragma/js/format.test.js new file mode 100644 index 000000000000..6bb5567e54c7 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + checkIgnorePragma: true, +}); diff --git a/tests/format/misc/check-ignore-pragma/js/module-with-noformat-pragma.js b/tests/format/misc/check-ignore-pragma/js/module-with-noformat-pragma.js new file mode 100644 index 000000000000..936ea7c49103 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/module-with-noformat-pragma.js @@ -0,0 +1,14 @@ +/** + * @flow + * @noformat + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma-comments.js b/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma-comments.js new file mode 100644 index 000000000000..63efe4c9f6e0 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma-comments.js @@ -0,0 +1,14 @@ +/** + * @flow + * @noprettier -- reason to not format + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma.js b/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma.js new file mode 100644 index 000000000000..d7c25b2eaa35 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/module-with-noprettier-pragma.js @@ -0,0 +1,14 @@ +/** + * @flow + * @noprettier + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/js/module-without-pragma.js b/tests/format/misc/check-ignore-pragma/js/module-without-pragma.js new file mode 100644 index 000000000000..8ece37915eb4 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/js/module-without-pragma.js @@ -0,0 +1,13 @@ +/** + * @flow + */ + +function foo(bar) + + +{ + + return bar + + 3 + + 4; +} diff --git a/tests/format/misc/check-ignore-pragma/json/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/json/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..736e7028ccc8 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json/__snapshots__/format.test.js.snap @@ -0,0 +1,30 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`format-anyway.json - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["json"] +printWidth: 80 + | printWidth +=====================================input====================================== +{"allOn": "Single", "Line": "example", +"noSpace":true, + "quote": { + "singleQuote": "example", + "indented": true, + } +} + +=====================================output===================================== +{ + "allOn": "Single", + "Line": "example", + "noSpace": true, + "quote": { + "singleQuote": "example", + "indented": true + } +} + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/json/format-anyway.json b/tests/format/misc/check-ignore-pragma/json/format-anyway.json new file mode 100644 index 000000000000..f0bda3e608cb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json/format-anyway.json @@ -0,0 +1,7 @@ +{"allOn": "Single", "Line": "example", +"noSpace":true, + "quote": { + "singleQuote": "example", + "indented": true, + } +} diff --git a/tests/format/misc/check-ignore-pragma/json/format.test.js b/tests/format/misc/check-ignore-pragma/json/format.test.js new file mode 100644 index 000000000000..bc67147d3a6c --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/json5/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/json5/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8b8d6aca3c08 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json5/__snapshots__/format.test.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.json5 - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["json5"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noformat */ + +{hello: "world"} + +=====================================output===================================== +/** @noformat */ + +{hello: "world"} + +================================================================================ +`; + +exports[`with-noprettier-pragma.json5 - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["json5"] +printWidth: 80 + | printWidth +=====================================input====================================== +/** @noprettier */ + +{hello: "world"} + +=====================================output===================================== +/** @noprettier */ + +{hello: "world"} + +================================================================================ +`; + +exports[`without-pragma.json5 - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["json5"] +printWidth: 80 + | printWidth +=====================================input====================================== +{hello: "world"} + +=====================================output===================================== +{ hello: "world" } + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/json5/format.test.js b/tests/format/misc/check-ignore-pragma/json5/format.test.js new file mode 100644 index 000000000000..1742c639e34d --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json5/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/json5/with-noformat-pragma.json5 b/tests/format/misc/check-ignore-pragma/json5/with-noformat-pragma.json5 new file mode 100644 index 000000000000..37e934665704 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json5/with-noformat-pragma.json5 @@ -0,0 +1,3 @@ +/** @noformat */ + +{hello: "world"} diff --git a/tests/format/misc/check-ignore-pragma/json5/with-noprettier-pragma.json5 b/tests/format/misc/check-ignore-pragma/json5/with-noprettier-pragma.json5 new file mode 100644 index 000000000000..8cb5196a043a --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json5/with-noprettier-pragma.json5 @@ -0,0 +1,3 @@ +/** @noprettier */ + +{hello: "world"} diff --git a/tests/format/misc/check-ignore-pragma/json5/without-pragma.json5 b/tests/format/misc/check-ignore-pragma/json5/without-pragma.json5 new file mode 100644 index 000000000000..3a91923f23a2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/json5/without-pragma.json5 @@ -0,0 +1 @@ +{hello: "world"} diff --git a/tests/format/misc/check-ignore-pragma/markdown/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..77ac86457de5 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,114 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`front-matter-with-noformat-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +something +--- + +<!-- @noformat --> + +I won't format !! + +=====================================output===================================== +--- +something +--- + +<!-- @noformat --> + +I won't format !! + +================================================================================ +`; + +exports[`front-matter-with-noprettier-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +something +--- + +<!-- @noprettier --> + +I won't format !! + + +=====================================output===================================== +--- +something +--- + +<!-- @noprettier --> + +I won't format !! + + +================================================================================ +`; + +exports[`with-noformat-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> + +I won't format !! + + +=====================================output===================================== +<!-- @noformat --> + +I won't format !! + + +================================================================================ +`; + +exports[`with-noprettier-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> + +I won't format !! + + +=====================================output===================================== +<!-- @noprettier --> + +I won't format !! + + +================================================================================ +`; + +exports[`without-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +I will format !! + +=====================================output===================================== +I will format !! + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/markdown/format.test.js b/tests/format/misc/check-ignore-pragma/markdown/format.test.js new file mode 100644 index 000000000000..a22cf38ecbd0 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noformat-pragma.md new file mode 100644 index 000000000000..ec03c9150770 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noformat-pragma.md @@ -0,0 +1,7 @@ +--- +something +--- + +<!-- @noformat --> + +I won't format !! diff --git a/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noprettier-pragma.md new file mode 100644 index 000000000000..aabe5a93ae2f --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/front-matter-with-noprettier-pragma.md @@ -0,0 +1,8 @@ +--- +something +--- + +<!-- @noprettier --> + +I won't format !! + diff --git a/tests/format/misc/check-ignore-pragma/markdown/with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/markdown/with-noformat-pragma.md new file mode 100644 index 000000000000..fd6c6a5bdfcb --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/with-noformat-pragma.md @@ -0,0 +1,4 @@ +<!-- @noformat --> + +I won't format !! + diff --git a/tests/format/misc/check-ignore-pragma/markdown/with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/markdown/with-noprettier-pragma.md new file mode 100644 index 000000000000..ef0590b9dfb2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/with-noprettier-pragma.md @@ -0,0 +1,4 @@ +<!-- @noprettier --> + +I won't format !! + diff --git a/tests/format/misc/check-ignore-pragma/markdown/without-pragma.md b/tests/format/misc/check-ignore-pragma/markdown/without-pragma.md new file mode 100644 index 000000000000..7aac3389503f --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/markdown/without-pragma.md @@ -0,0 +1 @@ +I will format !! diff --git a/tests/format/misc/check-ignore-pragma/mdx/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/mdx/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bd95e8eeafbc --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/mdx/__snapshots__/format.test.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +{/* @noformat */} + +I should NOT be formatted !! + +=====================================output===================================== +{/* @noformat */} + +I should NOT be formatted !! + +================================================================================ +`; + +exports[`with-noprettier-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +{/* @noprettier */} + +I should NOT be formatted !! + +=====================================output===================================== +{/* @noprettier */} + +I should NOT be formatted !! + +================================================================================ +`; + +exports[`without-pragma.md - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["mdx"] +printWidth: 80 + | printWidth +=====================================input====================================== +I should format !! + +=====================================output===================================== +I should format !! + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/mdx/format.test.js b/tests/format/misc/check-ignore-pragma/mdx/format.test.js new file mode 100644 index 000000000000..e478b0c438ef --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/mdx/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mdx"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/mdx/with-noformat-pragma.md b/tests/format/misc/check-ignore-pragma/mdx/with-noformat-pragma.md new file mode 100644 index 000000000000..55fe2cbf3da2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/mdx/with-noformat-pragma.md @@ -0,0 +1,3 @@ +{/* @noformat */} + +I should NOT be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/mdx/with-noprettier-pragma.md b/tests/format/misc/check-ignore-pragma/mdx/with-noprettier-pragma.md new file mode 100644 index 000000000000..ca173a475069 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/mdx/with-noprettier-pragma.md @@ -0,0 +1,3 @@ +{/* @noprettier */} + +I should NOT be formatted !! diff --git a/tests/format/misc/check-ignore-pragma/mdx/without-pragma.md b/tests/format/misc/check-ignore-pragma/mdx/without-pragma.md new file mode 100644 index 000000000000..1a17925e4d88 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/mdx/without-pragma.md @@ -0,0 +1 @@ +I should format !! diff --git a/tests/format/misc/check-ignore-pragma/vue/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/vue/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bcefddd8e587 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/vue/__snapshots__/format.test.js.snap @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.vue - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +=====================================output===================================== +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +================================================================================ +`; + +exports[`with-noprettier-pragma.vue - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +=====================================output===================================== +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +================================================================================ +`; + +exports[`without-pragma.vue - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +=====================================output===================================== +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/vue/format.test.js b/tests/format/misc/check-ignore-pragma/vue/format.test.js new file mode 100644 index 000000000000..0513f628cad0 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/vue/with-noformat-pragma.vue b/tests/format/misc/check-ignore-pragma/vue/with-noformat-pragma.vue new file mode 100644 index 000000000000..5d3d18610122 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/vue/with-noformat-pragma.vue @@ -0,0 +1,8 @@ +<!-- @noformat --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> diff --git a/tests/format/misc/check-ignore-pragma/vue/with-noprettier-pragma.vue b/tests/format/misc/check-ignore-pragma/vue/with-noprettier-pragma.vue new file mode 100644 index 000000000000..0150e6dcfbf1 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/vue/with-noprettier-pragma.vue @@ -0,0 +1,8 @@ +<!-- @noprettier --> +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> diff --git a/tests/format/misc/check-ignore-pragma/vue/without-pragma.vue b/tests/format/misc/check-ignore-pragma/vue/without-pragma.vue new file mode 100644 index 000000000000..a7810952cef5 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/vue/without-pragma.vue @@ -0,0 +1,7 @@ +<template> + <div>This will be pre-compiled</div> +</template> +<script> +const x = 1; +</script> +<style src="./my-component.css"></style> diff --git a/tests/format/misc/check-ignore-pragma/yaml/__snapshots__/format.test.js.snap b/tests/format/misc/check-ignore-pragma/yaml/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d17897f09b9f --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/yaml/__snapshots__/format.test.js.snap @@ -0,0 +1,56 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-noformat-pragma.yml - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noformat + + 123 + +=====================================output===================================== +# @noformat + + 123 + +================================================================================ +`; + +exports[`with-noprettier-pragma.yml - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +# @noprettier + + 123 + +=====================================output===================================== +# @noprettier + + 123 + +================================================================================ +`; + +exports[`without-pragma.yml - {"checkIgnorePragma":true} format 1`] = ` +====================================options===================================== +checkIgnorePragma: true +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + 123 + +=====================================output===================================== +123 + +================================================================================ +`; diff --git a/tests/format/misc/check-ignore-pragma/yaml/format.test.js b/tests/format/misc/check-ignore-pragma/yaml/format.test.js new file mode 100644 index 000000000000..3c3bcc7a7406 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"], { checkIgnorePragma: true }); diff --git a/tests/format/misc/check-ignore-pragma/yaml/with-noformat-pragma.yml b/tests/format/misc/check-ignore-pragma/yaml/with-noformat-pragma.yml new file mode 100644 index 000000000000..af6095ae4cf7 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/yaml/with-noformat-pragma.yml @@ -0,0 +1,3 @@ +# @noformat + + 123 diff --git a/tests/format/misc/check-ignore-pragma/yaml/with-noprettier-pragma.yml b/tests/format/misc/check-ignore-pragma/yaml/with-noprettier-pragma.yml new file mode 100644 index 000000000000..ccc87f99d7a2 --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/yaml/with-noprettier-pragma.yml @@ -0,0 +1,3 @@ +# @noprettier + + 123 diff --git a/tests/format/misc/check-ignore-pragma/yaml/without-pragma.yml b/tests/format/misc/check-ignore-pragma/yaml/without-pragma.yml new file mode 100644 index 000000000000..c4a580e436af --- /dev/null +++ b/tests/format/misc/check-ignore-pragma/yaml/without-pragma.yml @@ -0,0 +1,3 @@ + + + 123 diff --git a/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/format.test.js.snap b/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e70cf5844e13 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/format.test.js.snap @@ -0,0 +1,171 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`front-matter-toml.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== ++++ + +title: Hello +slug: home + ++++ + +<h1> + Hello world!</h1> + +=====================================output===================================== ++++ + +title: Hello +slug: home + ++++ + +<h1>Hello world!</h1> + +================================================================================ +`; + +exports[`front-matter-toml.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== ++++ + +title: Hello +slug: home + ++++ + +<h1> + Hello world!</h1> + +=====================================output===================================== ++++ + +title: Hello +slug: home + ++++ + +<h1>Hello world!</h1> + +================================================================================ +`; + +exports[`front-matter-yaml.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +---yaml + +title: Hello +slug: home + +--- + +<h1> + Hello world!</h1> + +=====================================output===================================== +---yaml + +title: Hello +slug: home + +--- + +<h1>Hello world!</h1> + +================================================================================ +`; + +exports[`front-matter-yaml.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +---yaml + +title: Hello +slug: home + +--- + +<h1> + Hello world!</h1> + +=====================================output===================================== +---yaml +title: Hello +slug: home +--- + +<h1>Hello world!</h1> + +================================================================================ +`; + +exports[`test.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!doctype html> +<head> + <style>a {}</style> + <script>1 + 2</script> +</head> + +=====================================output===================================== +<!doctype html> +<head> + <style> + a {} + </style> + <script> + 1 + 2 + </script> +</head> + +================================================================================ +`; + +exports[`test.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!doctype html> +<head> + <style>a {}</style> + <script>1 + 2</script> +</head> + +=====================================output===================================== +<!doctype html> +<head> + <style> + a { + } + </style> + <script> + 1 + 2; + </script> +</head> + +================================================================================ +`; diff --git a/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9c2ce13978a4..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-html/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,171 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`front-matter-toml.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -+++ - -title: Hello -slug: home - -+++ - -<h1> - Hello world!</h1> - -=====================================output===================================== -+++ - -title: Hello -slug: home - -+++ - -<h1>Hello world!</h1> - -================================================================================ -`; - -exports[`front-matter-toml.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -+++ - -title: Hello -slug: home - -+++ - -<h1> - Hello world!</h1> - -=====================================output===================================== -+++ - -title: Hello -slug: home - -+++ - -<h1>Hello world!</h1> - -================================================================================ -`; - -exports[`front-matter-yaml.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== ----yaml - -title: Hello -slug: home - ---- - -<h1> - Hello world!</h1> - -=====================================output===================================== ----yaml - -title: Hello -slug: home - ---- - -<h1>Hello world!</h1> - -================================================================================ -`; - -exports[`front-matter-yaml.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== ----yaml - -title: Hello -slug: home - ---- - -<h1> - Hello world!</h1> - -=====================================output===================================== ---- -title: Hello -slug: home ---- - -<h1>Hello world!</h1> - -================================================================================ -`; - -exports[`test.html - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!doctype html> -<head> - <style>a {}</style> - <script>1 + 2</script> -</head> - -=====================================output===================================== -<!DOCTYPE html> -<head> - <style> - a {} - </style> - <script> - 1 + 2 - </script> -</head> - -================================================================================ -`; - -exports[`test.html format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!doctype html> -<head> - <style>a {}</style> - <script>1 + 2</script> -</head> - -=====================================output===================================== -<!DOCTYPE html> -<head> - <style> - a { - } - </style> - <script> - 1 + 2; - </script> -</head> - -================================================================================ -`; diff --git a/tests/format/misc/embedded_language_formatting/in-html/format.test.js b/tests/format/misc/embedded_language_formatting/in-html/format.test.js new file mode 100644 index 000000000000..2eba9a1fc5fe --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-html/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["html"]); +runFormatTest(import.meta, ["html"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-html/jsfmt.spec.js b/tests/format/misc/embedded_language_formatting/in-html/jsfmt.spec.js deleted file mode 100644 index e625c05f789f..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-html/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["html"]); -run_spec(__dirname, ["html"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/format.test.js.snap b/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b8d0a9eaf8b4 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/format.test.js.snap @@ -0,0 +1,90 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.js - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +css\`a { }\` + +md\`\` + +graphql(\`{id}\`) + +html\`<a>\` + +@Component({ + template: \`<a>\`, + styles: [\`a { }\`] +}) +class TestComponent {} + +=====================================output===================================== +css\`a { }\`; + +md\`\`; + +graphql(\`{id}\`); + +html\`<a>\`; + +@Component({ + template: \`<a>\`, + styles: [\`a { }\`], +}) +class TestComponent {} + +================================================================================ +`; + +exports[`test.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +css\`a { }\` + +md\`\` + +graphql(\`{id}\`) + +html\`<a>\` + +@Component({ + template: \`<a>\`, + styles: [\`a { }\`] +}) +class TestComponent {} + +=====================================output===================================== +css\` + a { + } +\`; + +md\`\`; + +graphql(\` + { + id + } +\`); + +html\`<a></a>\`; + +@Component({ + template: \`<a></a>\`, + styles: [ + \` + a { + } + \`, + ], +}) +class TestComponent {} + +================================================================================ +`; diff --git a/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c86299d39b46..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-javascript/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,94 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.js - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -css\`a { }\` - -md\`\` - -graphql(\`{id}\`) - -html\`<a>\` - -@Component({ - template: \`<a>\`, - styles: [\`a { }\`] -}) -class TestComponent {} - -=====================================output===================================== -css\`a { }\`; - -md\`\`; - -graphql(\`{id}\`); - -html\`<a>\`; - -@Component({ - template: \`<a>\`, - styles: [\`a { }\`], -}) -class TestComponent {} - -================================================================================ -`; - -exports[`test.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -css\`a { }\` - -md\`\` - -graphql(\`{id}\`) - -html\`<a>\` - -@Component({ - template: \`<a>\`, - styles: [\`a { }\`] -}) -class TestComponent {} - -=====================================output===================================== -css\` - a { - } -\`; - -md\` - -\`; - -graphql( - \` - { - id - } - \` -); - -html\`<a></a>\`; - -@Component({ - template: \`<a></a>\`, - styles: [ - \` - a { - } - \`, - ], -}) -class TestComponent {} - -================================================================================ -`; diff --git a/tests/format/misc/embedded_language_formatting/in-javascript/format.test.js b/tests/format/misc/embedded_language_formatting/in-javascript/format.test.js new file mode 100644 index 000000000000..58d50755a039 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-javascript/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["babel"]); +runFormatTest(import.meta, ["babel"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-javascript/jsfmt.spec.js b/tests/format/misc/embedded_language_formatting/in-javascript/jsfmt.spec.js deleted file mode 100644 index aac1ee77e612..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-javascript/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["babel"]); -run_spec(__dirname, ["babel"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap b/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4818f8e4140f --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap @@ -0,0 +1,209 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`front-matter-json.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +---json +{ + "a": 1 } +... + +The above should be reformatted because it isn't parsed as json front matter. + +=====================================output===================================== +---json +{ +"a": 1 } +... + +The above should be reformatted because it isn't parsed as json front matter. + +================================================================================ +`; + +exports[`front-matter-json.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +---json +{ + "a": 1 } +... + +The above should be reformatted because it isn't parsed as json front matter. + +=====================================output===================================== +---json +{ +"a": 1 } +... + +The above should be reformatted because it isn't parsed as json front matter. + +================================================================================ +`; + +exports[`front-matter-pandoc.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +---yaml + +title: Hello +slug: home + +... + +Hello world! + + +=====================================output===================================== +---yaml + +title: Hello +slug: home + +... + +Hello world! + +================================================================================ +`; + +exports[`front-matter-pandoc.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +---yaml + +title: Hello +slug: home + +... + +Hello world! + + +=====================================output===================================== +---yaml +title: Hello +slug: home +... + +Hello world! + +================================================================================ +`; + +exports[`issue-16342.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown + +=====================================output===================================== +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown + +================================================================================ +`; + +exports[`issue-16342.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown + +=====================================output===================================== +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown + +================================================================================ +`; + +exports[`test.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`\`\`js +1 + 2 +\`\`\` + +=====================================output===================================== +\`\`\`js +1 + 2 +\`\`\` + +================================================================================ +`; + +exports[`test.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`\`\`js +1 + 2 +\`\`\` + +=====================================output===================================== +\`\`\`js +1 + 2; +\`\`\` + +================================================================================ +`; diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7809e8056f07..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,144 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`front-matter-json.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== ----json -{ - "a": 1 } -... - -The above should be reformatted because it isn't parsed as json front matter. - -=====================================output===================================== ----json -{ -"a": 1 } -... - -The above should be reformatted because it isn't parsed as json front matter. - -================================================================================ -`; - -exports[`front-matter-json.md format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== ----json -{ - "a": 1 } -... - -The above should be reformatted because it isn't parsed as json front matter. - -=====================================output===================================== ----json -{ -"a": 1 } -... - -The above should be reformatted because it isn't parsed as json front matter. - -================================================================================ -`; - -exports[`front-matter-pandoc.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== ----yaml - -title: Hello -slug: home - -... - -Hello world! - - -=====================================output===================================== ----yaml - -title: Hello -slug: home - -... - -Hello world! - -================================================================================ -`; - -exports[`front-matter-pandoc.md format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== ----yaml - -title: Hello -slug: home - -... - -Hello world! - - -=====================================output===================================== ---- -title: Hello -slug: home -... - -Hello world! - -================================================================================ -`; - -exports[`test.md - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`\`\`js -1 + 2 -\`\`\` - -=====================================output===================================== -\`\`\`js -1 + 2 -\`\`\` - -================================================================================ -`; - -exports[`test.md format 1`] = ` -====================================options===================================== -parsers: ["markdown"] -printWidth: 80 - | printWidth -=====================================input====================================== -\`\`\`js -1 + 2 -\`\`\` - -=====================================output===================================== -\`\`\`js -1 + 2; -\`\`\` - -================================================================================ -`; diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/format.test.js b/tests/format/misc/embedded_language_formatting/in-markdown/format.test.js new file mode 100644 index 000000000000..cbca7e1b9b36 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-markdown/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["markdown"]); +runFormatTest(import.meta, ["markdown"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/issue-16342.md b/tests/format/misc/embedded_language_formatting/in-markdown/issue-16342.md new file mode 100644 index 000000000000..bfad81ff8974 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-markdown/issue-16342.md @@ -0,0 +1,10 @@ +--- +foo: + - bar1 + + - bar2 + + - bar3 +--- + +Markdown diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/jsfmt.spec.js b/tests/format/misc/embedded_language_formatting/in-markdown/jsfmt.spec.js deleted file mode 100644 index 9e28612c98db..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-markdown/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["markdown"]); -run_spec(__dirname, ["markdown"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/embedded_language_formatting/in-vue/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/embedded_language_formatting/in-vue/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/embedded_language_formatting/in-vue/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/embedded_language_formatting/in-vue/format.test.js b/tests/format/misc/embedded_language_formatting/in-vue/format.test.js new file mode 100644 index 000000000000..dac6e38ec528 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/in-vue/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["vue"]); +runFormatTest(import.meta, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/in-vue/jsfmt.spec.js b/tests/format/misc/embedded_language_formatting/in-vue/jsfmt.spec.js deleted file mode 100644 index a553d17cb01f..000000000000 --- a/tests/format/misc/embedded_language_formatting/in-vue/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["vue"]); -run_spec(__dirname, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/embedded_language_formatting/mdx/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/embedded_language_formatting/mdx/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/embedded_language_formatting/mdx/format.test.js b/tests/format/misc/embedded_language_formatting/mdx/format.test.js new file mode 100644 index 000000000000..659ce904a2a6 --- /dev/null +++ b/tests/format/misc/embedded_language_formatting/mdx/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mdx"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/embedded_language_formatting/mdx/jsfmt.spec.js b/tests/format/misc/embedded_language_formatting/mdx/jsfmt.spec.js deleted file mode 100644 index 42d458897728..000000000000 --- a/tests/format/misc/embedded_language_formatting/mdx/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["mdx"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/misc/empty/format.test.js b/tests/format/misc/empty/format.test.js new file mode 100644 index 000000000000..877be3dcf6c4 --- /dev/null +++ b/tests/format/misc/empty/format.test.js @@ -0,0 +1,43 @@ +import prettier from "../../../config/prettier-entry.js"; + +const parsers = (await prettier.getSupportInfo()).options + .find((option) => option.name === "parser") + .choices.filter((choice) => !choice.deprecated) + .map((choice) => choice.value); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // empty + "", + // space + " ", + " ", + // `\n` + "\n", + " \n", + " \n ", + "\n\n\n\n", + " \n \n \n\n", + " \n \n \n\n ", + // `\r` + "\r", + " \r", + " \r ", + "\r\r\r\r", + " \r \r \r\r", + " \r \r \r\r ", + // `\r\n` + "\r\n", + " \r\n", + " \r\n ", + "\r\n\r\n\r\n\r\n", + " \r\n \r\n \r\n\r\n", + " \r\n \r\n \r\n\r\n ", + // mixed `\r` `\r\n` '\n' + " \r \r\n \n ", + ].map((code) => ({ code, output: "" })), + }, + parsers, +); diff --git a/tests/format/misc/empty/jsfmt.spec.js b/tests/format/misc/empty/jsfmt.spec.js deleted file mode 100644 index 349f87d3607c..000000000000 --- a/tests/format/misc/empty/jsfmt.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -const parsers = require("prettier-local") - .getSupportInfo() - .options.find((option) => option.name === "parser") - .choices.filter((choice) => !choice.deprecated) - .map((choice) => choice.value); - -run_spec( - { - dirname: __dirname, - snippets: [ - // empty - "", - // space - " ", - " ", - // `\n` - "\n", - " \n", - " \n ", - "\n\n\n\n", - " \n \n \n\n", - " \n \n \n\n ", - // `\r` - "\r", - " \r", - " \r ", - "\r\r\r\r", - " \r \r \r\r", - " \r \r \r\r ", - // `\r\n` - "\r\n", - " \r\n", - " \r\n ", - "\r\n\r\n\r\n\r\n", - " \r\n \r\n \r\n\r\n", - " \r\n \r\n \r\n\r\n ", - // mixed `\r` `\r\n` '\n' - " \r \r\n \n ", - ].map((code) => ({ code, output: "" })), - }, - parsers -); diff --git a/tests/format/misc/errors/babel-flow/__snapshots__/format.test.js.snap b/tests/format/misc/errors/babel-flow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..215fe64fa292 --- /dev/null +++ b/tests/format/misc/errors/babel-flow/__snapshots__/format.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async-arrow-invalid.js [babel] format 1`] = ` +"Unterminated JSX contents. (3:19) + 1 | // https://github.com/babel/babel/pull/11979 + 2 | +> 3 | <T> async () => {} + | ^ + 4 | +Cause: Unterminated JSX contents. (3:18)" +`; + +exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` +"Type parameters must come after the async keyword, e.g. instead of \`<T> async () => {}\`, use \`async <T>() => {}\`. (3:1) + 1 | // https://github.com/babel/babel/pull/11979 + 2 | +> 3 | <T> async () => {} + | ^ + 4 | +Cause: Type parameters must come after the async keyword, e.g. instead of \`<T> async () => {}\`, use \`async <T>() => {}\`. (3:0)" +`; + +exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = ` +"Unterminated JSX contents. (1:4) +> 1 | <T>(a => b); + | ^ + 2 | +Cause: Unterminated JSX contents. (1:3)" +`; + +exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = ` +"Unterminated JSX contents. (1:4) +> 1 | <T>(a => b); + | ^ + 2 | +Cause: Unterminated JSX contents. (1:3)" +`; diff --git a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f3a74f0d3dd0..000000000000 --- a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,33 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-arrow-invalid.js [babel] format 1`] = ` -"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1) - 1 | // https://github.com/babel/babel/pull/11979 - 2 | -> 3 | <T> async () => {} - | ^ - 4 |" -`; - -exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` -"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1) - 1 | // https://github.com/babel/babel/pull/11979 - 2 | -> 3 | <T> async () => {} - | ^ - 4 |" -`; - -exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = ` -"Unterminated JSX contents. (1:4) -> 1 | <T>(a => b); - | ^ - 2 |" -`; - -exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = ` -"Unterminated JSX contents. (1:4) -> 1 | <T>(a => b); - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/babel-flow/format.test.js b/tests/format/misc/errors/babel-flow/format.test.js new file mode 100644 index 000000000000..de7cefccdb9b --- /dev/null +++ b/tests/format/misc/errors/babel-flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-flow", "babel"]); diff --git a/tests/format/misc/errors/babel-flow/jsfmt.spec.js b/tests/format/misc/errors/babel-flow/jsfmt.spec.js deleted file mode 100644 index 30c9667cc0b4..000000000000 --- a/tests/format/misc/errors/babel-flow/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel-flow", "babel"]); diff --git a/tests/format/misc/errors/babel-missing-plugins/__snapshots__/format.test.js.snap b/tests/format/misc/errors/babel-missing-plugins/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..fdbc42ca929f --- /dev/null +++ b/tests/format/misc/errors/babel-missing-plugins/__snapshots__/format.test.js.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel] format 1`] = ` +"Unexpected token. (1:8) +> 1 | export type Foo = number; + | ^" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Unexpected token. (1:4) +> 1 | 100m; + | ^" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token. (1:8) +> 1 | import module foo from "./module.wasm"; + | ^" +`; diff --git a/tests/format/misc/errors/babel-missing-plugins/format.test.js b/tests/format/misc/errors/babel-missing-plugins/format.test.js new file mode 100644 index 000000000000..48c5a09226bf --- /dev/null +++ b/tests/format/misc/errors/babel-missing-plugins/format.test.js @@ -0,0 +1,14 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // https://github.com/babel/babel/commit/a466f9c310ace91484d4087f077ee6d6c8cd8789 + "export type Foo = number;", + // Removed + "100m;", + // Removed https://github.com/babel/babel/pull/16808 + 'import module foo from "./module.wasm";', + ], + }, + ["babel"], +); diff --git a/tests/format/misc/errors/babel-ts/__snapshots__/format.test.js.snap b/tests/format/misc/errors/babel-ts/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1898909ae2cc --- /dev/null +++ b/tests/format/misc/errors/babel-ts/__snapshots__/format.test.js.snap @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`export-declare.ts [babel-ts] format 1`] = ` +"'export declare' must be followed by an ambient declaration. (1:16) +> 1 | export declare foo; + | ^ + 2 | +Cause: 'export declare' must be followed by an ambient declaration. (1:15)" +`; + +exports[`multiline-declaration-abstract-class.ts [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | declare abstract + | ^ + 2 | class A {} + 3 | +Cause: Missing semicolon. (1:7)" +`; + +exports[`multiline-declaration-interface.ts [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | declare interface + | ^ + 2 | I + 3 | {} + 4 | +Cause: Missing semicolon. (1:7)" +`; + +exports[`multiline-declaration-module.ts [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | declare module + | ^ + 2 | 'bar' + 3 | {} + 4 | +Cause: Missing semicolon. (1:7)" +`; + +exports[`multiline-declaration-type.ts [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | declare type + | ^ + 2 | T = number + 3 | +Cause: Missing semicolon. (1:7)" +`; + +exports[`parenthesized-decorators-tagged-template.ts [babel-ts] format 1`] = ` +"Unexpected token (2:7) + 1 | class Test { +> 2 | @foo\`bar\` + | ^ + 3 | text: string = "text" + 4 | } + 5 | +Cause: Unexpected token (2:6)" +`; + +exports[`type-annotation-expr-statement.ts [babel-ts] format 1`] = ` +"Did not expect a type annotation here. (1:3) +> 1 | (a: T); + | ^ + 2 | +Cause: Did not expect a type annotation here. (1:2)" +`; + +exports[`type-annotation-func.ts [babel-ts] format 1`] = ` +"Did not expect a type annotation here. (1:10) +> 1 | func<T>(a: T); + | ^ + 2 | +Cause: Did not expect a type annotation here. (1:9)" +`; + +exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = ` +"Did not expect a type annotation here. (3:22) + 1 | function Foo() { + 2 | return ( +> 3 | <div propA={[ key: value ]} propsB={(a: b)} /> + | ^ + 4 | ); + 5 | } + 6 | +Cause: Did not expect a type annotation here. (3:21)" +`; diff --git a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index db1946abe47f..000000000000 --- a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,77 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`export-declare.ts [babel-ts] format 1`] = ` -"'export declare' must be followed by an ambient declaration. (1:16) -> 1 | export declare foo; - | ^ - 2 |" -`; - -exports[`multiline-declaration-abstract-class.ts [babel-ts] format 1`] = ` -"Missing semicolon. (1:8) -> 1 | declare abstract - | ^ - 2 | class A {} - 3 |" -`; - -exports[`multiline-declaration-interface.ts [babel-ts] format 1`] = ` -"Missing semicolon. (1:8) -> 1 | declare interface - | ^ - 2 | I - 3 | {} - 4 |" -`; - -exports[`multiline-declaration-module.ts [babel-ts] format 1`] = ` -"Missing semicolon. (1:8) -> 1 | declare module - | ^ - 2 | 'bar' - 3 | {} - 4 |" -`; - -exports[`multiline-declaration-type.ts [babel-ts] format 1`] = ` -"Missing semicolon. (1:8) -> 1 | declare type - | ^ - 2 | T = number - 3 |" -`; - -exports[`parenthesized-decorators-tagged-template.ts [babel-ts] format 1`] = ` -"Unexpected token (2:7) - 1 | class Test { -> 2 | @foo\`bar\` - | ^ - 3 | text: string = "text" - 4 | } - 5 |" -`; - -exports[`type-annotation-expr-statement.ts [babel-ts] format 1`] = ` -"Did not expect a type annotation here. (1:3) -> 1 | (a: T); - | ^ - 2 |" -`; - -exports[`type-annotation-func.ts [babel-ts] format 1`] = ` -"Did not expect a type annotation here. (1:10) -> 1 | func<T>(a: T); - | ^ - 2 |" -`; - -exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = ` -"Did not expect a type annotation here. (3:22) - 1 | function Foo() { - 2 | return ( -> 3 | <div propA={[ key: value ]} propsB={(a: b)} /> - | ^ - 4 | ); - 5 | } - 6 |" -`; diff --git a/tests/format/misc/errors/babel-ts/format.test.js b/tests/format/misc/errors/babel-ts/format.test.js new file mode 100644 index 000000000000..4d5894a24a52 --- /dev/null +++ b/tests/format/misc/errors/babel-ts/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts"]); diff --git a/tests/format/misc/errors/babel-ts/jsfmt.spec.js b/tests/format/misc/errors/babel-ts/jsfmt.spec.js deleted file mode 100644 index a969baea5c62..000000000000 --- a/tests/format/misc/errors/babel-ts/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel-ts"]); diff --git a/tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/broken-plugin/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/errors/broken-plugin/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/errors/broken-plugin/format.test.js b/tests/format/misc/errors/broken-plugin/format.test.js new file mode 100644 index 000000000000..8de4f72db33c --- /dev/null +++ b/tests/format/misc/errors/broken-plugin/format.test.js @@ -0,0 +1,15 @@ +import createEsmUtils from "esm-utils"; + +const { require } = createEsmUtils(import.meta); + +const plugins = [ + require("../../../../config/prettier-plugins/prettier-plugin-missing-comments/index.cjs"), +]; + +runFormatTest( + { importMeta: import.meta, snippets: ["text"] }, + ["missing-comments"], + { + plugins, + }, +); diff --git a/tests/format/misc/errors/broken-plugin/jsfmt.spec.js b/tests/format/misc/errors/broken-plugin/jsfmt.spec.js deleted file mode 100644 index 826d73513e1f..000000000000 --- a/tests/format/misc/errors/broken-plugin/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -const plugins = [ - require("../../../../config/prettier-plugins/prettier-plugin-missing-comments/index.js"), -]; - -run_spec({ dirname: __dirname, snippets: ["text"] }, ["missing-comments"], { - plugins, -}); diff --git a/tests/format/misc/errors/css/__snapshots__/format.test.js.snap b/tests/format/misc/errors/css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6ea460f788d1 --- /dev/null +++ b/tests/format/misc/errors/css/__snapshots__/format.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`less-syntax.css [css] format 1`] = ` +"CssSyntaxError: Unknown word .bordered (1:4) +> 1 | a {.bordered();} + | ^ + 2 | +Cause: <css input>:1:4: Unknown word .bordered" +`; + +exports[`scss-syntax.css [css] format 1`] = ` +"CssSyntaxError: Unknown word $foo (1:15) +> 1 | a {content: #{$foo}} + | ^ + 2 | +Cause: <css input>:1:15: Unknown word $foo" +`; diff --git a/tests/format/misc/errors/css/format.test.js b/tests/format/misc/errors/css/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/misc/errors/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/misc/errors/css/less-syntax.css b/tests/format/misc/errors/css/less-syntax.css new file mode 100644 index 000000000000..c093b5027076 --- /dev/null +++ b/tests/format/misc/errors/css/less-syntax.css @@ -0,0 +1 @@ +a {.bordered();} diff --git a/tests/format/misc/errors/css/scss-syntax.css b/tests/format/misc/errors/css/scss-syntax.css new file mode 100644 index 000000000000..b3d023332364 --- /dev/null +++ b/tests/format/misc/errors/css/scss-syntax.css @@ -0,0 +1 @@ +a {content: #{$foo}} diff --git a/tests/format/misc/errors/flow/__snapshots__/format.test.js.snap b/tests/format/misc/errors/flow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..07bde9a5518b --- /dev/null +++ b/tests/format/misc/errors/flow/__snapshots__/format.test.js.snap @@ -0,0 +1,68 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async-arrow-invalid.js [flow] format 1`] = ` +"Unexpected token ILLEGAL (4:1) + 2 | + 3 | <T> async () => {} +> 4 | + | ^" +`; + +exports[`dynamic-import.js [flow] format 1`] = ` +"Unexpected token \`,\`, expected the token \`)\` (1:24) +> 1 | import('./prettier.mjs', {}) + | ^ + 2 |" +`; + +exports[`function-async.js [flow] format 1`] = ` +"Unexpected token \`;\`, expected the token \`=>\` (2:11) + 1 | // Flow can't parse this since \`v0.128.0\`, #8661 +> 2 | async<T>(); + | ^" +`; + +exports[`invalid_keyword_symbol.js [flow] format 1`] = ` +"Unexpected reserved type (1:6) +> 1 | type symbol = number; + | ^^^^^^ + 2 |" +`; + +exports[`module-attributes-dynamic.js [flow] format 1`] = ` +"Unexpected token \`,\`, expected the token \`)\` (1:18) +> 1 | import("foo.json", { with: { type: "json" } }) + | ^ + 2 |" +`; + +exports[`module-attributes-static.js [flow] format 1`] = ` +"Unexpected token \`with\`, expected the token \`;\` (1:28) +> 1 | import foo from "foo.json" with type: "json"; + | ^^^^ + 2 |" +`; + +exports[`newline-before-arrow.js [flow] format 1`] = ` +"Illegal newline before arrow (2:1) + 1 | async x +> 2 | => x + | ^^ + 3 |" +`; + +exports[`number.js [flow] format 1`] = ` +"Unexpected token ILLEGAL (3:5) + 1 | // https://github.com/babel/babel/pull/11854 + 2 | +> 3 | a = 09e1_1; + | ^^^^ + 4 |" +`; + +exports[`spread-with-optional.js [flow] format 1`] = ` +"Tuple spread elements cannot be optional. (1:17) +> 1 | type T = [...foo?: S]; // ERROR + | ^ + 2 |" +`; diff --git a/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d968f3b335e2..000000000000 --- a/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,61 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`async-arrow-invalid.js [flow] format 1`] = ` -"Unexpected token ILLEGAL (4:1) - 2 | - 3 | <T> async () => {} -> 4 | - | ^" -`; - -exports[`default-escaped.js [flow] format 1`] = ` -"Unexpected token \`async\`, expected a declaration, statement or export specifiers (1:8) -> 1 | export asyn\\u{63} from "async"; - | ^^^^^^^^^^ - 2 |" -`; - -exports[`dynamic-import.js [flow] format 1`] = ` -"Unexpected token \`,\`, expected the token \`)\` (1:24) -> 1 | import('./prettier.mjs', {}) - | ^ - 2 |" -`; - -exports[`function-async.js [flow] format 1`] = ` -"Unexpected token \`;\`, expected the token \`=>\` (2:11) - 1 | // Flow can't parse this since \`v0.128.0\`, #8661 -> 2 | async<T>(); - | ^" -`; - -exports[`module-attributes-dynamic.js [flow] format 1`] = ` -"Unexpected token \`,\`, expected the token \`)\` (1:18) -> 1 | import("foo.json", { with: { type: "json" } }) - | ^ - 2 |" -`; - -exports[`module-attributes-static.js [flow] format 1`] = ` -"Unexpected token \`with\`, expected the token \`;\` (1:28) -> 1 | import foo from "foo.json" with type: "json"; - | ^^^^ - 2 |" -`; - -exports[`newline-before-arrow.js [flow] format 1`] = ` -"Illegal newline before arrow (2:1) - 1 | async x -> 2 | => x - | ^^ - 3 |" -`; - -exports[`number.js [flow] format 1`] = ` -"Unexpected token ILLEGAL (3:5) - 1 | // https://github.com/babel/babel/pull/11854 - 2 | -> 3 | a = 09e1_1; - | ^^^^ - 4 |" -`; diff --git a/tests/format/misc/errors/flow/default-escaped.js b/tests/format/misc/errors/flow/default-escaped.js deleted file mode 100644 index 1b9fbd91fe7c..000000000000 --- a/tests/format/misc/errors/flow/default-escaped.js +++ /dev/null @@ -1 +0,0 @@ -export asyn\u{63} from "async"; diff --git a/tests/format/misc/errors/flow/format.test.js b/tests/format/misc/errors/flow/format.test.js new file mode 100644 index 000000000000..55c339883dce --- /dev/null +++ b/tests/format/misc/errors/flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow"]); diff --git a/tests/format/misc/errors/flow/import-reflection/__snapshots__/format.test.js.snap b/tests/format/misc/errors/flow/import-reflection/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e10d4348e5b1 --- /dev/null +++ b/tests/format/misc/errors/flow/import-reflection/__snapshots__/format.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`valid-flow-default-import.js [flow] format 1`] = ` +"Unexpected identifier, expected the keyword \`from\` (1:15) +> 1 | import module foo from "./module.wasm"; + | ^^^ + 2 | import bar from "./module.wasm"; + 3 |" +`; + +exports[`valid-ts-default-import.js [flow] format 1`] = ` +"Unexpected identifier, expected the keyword \`from\` (1:15) +> 1 | import module foo from "./module.wasm"; + | ^^^ + 2 | import bar from "./module.wasm"; + 3 |" +`; diff --git a/tests/format/misc/errors/flow/import-reflection/format.test.js b/tests/format/misc/errors/flow/import-reflection/format.test.js new file mode 100644 index 000000000000..55c339883dce --- /dev/null +++ b/tests/format/misc/errors/flow/import-reflection/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["flow"]); diff --git a/tests/format/misc/errors/flow/import-reflection/valid-flow-default-import.js b/tests/format/misc/errors/flow/import-reflection/valid-flow-default-import.js new file mode 100644 index 000000000000..b0f11212d097 --- /dev/null +++ b/tests/format/misc/errors/flow/import-reflection/valid-flow-default-import.js @@ -0,0 +1,2 @@ +import module foo from "./module.wasm"; +import bar from "./module.wasm"; diff --git a/tests/format/misc/errors/flow/import-reflection/valid-ts-default-import.js b/tests/format/misc/errors/flow/import-reflection/valid-ts-default-import.js new file mode 100644 index 000000000000..b0f11212d097 --- /dev/null +++ b/tests/format/misc/errors/flow/import-reflection/valid-ts-default-import.js @@ -0,0 +1,2 @@ +import module foo from "./module.wasm"; +import bar from "./module.wasm"; diff --git a/tests/format/misc/errors/flow/interface/__snapshots__/format.test.js.snap b/tests/format/misc/errors/flow/interface/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ffa7c6bedffb --- /dev/null +++ b/tests/format/misc/errors/flow/interface/__snapshots__/format.test.js.snap @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | interface A mixins B {} + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #0 [flow] format 1`] = ` +"Unexpected identifier, expected the token \`{\` (1:13) +> 1 | interface A mixins B {} + | ^^^^^^" +`; + +exports[`snippet: #1 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | interface A implements B {} + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #1 [flow] format 1`] = ` +"Unexpected identifier, expected the token \`{\` (1:13) +> 1 | interface A implements B {} + | ^^^^^^^^^^" +`; + +exports[`snippet: #2 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:21) +> 1 | declare interface A mixins B {} + | ^ +Cause: Unexpected token, expected "{" (1:20)" +`; + +exports[`snippet: #2 [flow] format 1`] = ` +"Unexpected identifier, expected the token \`{\` (1:21) +> 1 | declare interface A mixins B {} + | ^^^^^^" +`; + +exports[`snippet: #3 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:21) +> 1 | declare interface A implements B {} + | ^ +Cause: Unexpected token, expected "{" (1:20)" +`; + +exports[`snippet: #3 [flow] format 1`] = ` +"Unexpected identifier, expected the token \`{\` (1:21) +> 1 | declare interface A implements B {} + | ^^^^^^^^^^" +`; diff --git a/tests/format/misc/errors/flow/interface/format.test.js b/tests/format/misc/errors/flow/interface/format.test.js new file mode 100644 index 000000000000..07596af73e10 --- /dev/null +++ b/tests/format/misc/errors/flow/interface/format.test.js @@ -0,0 +1,13 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // Can't have mixins nor implements + "interface A mixins B {}", + "interface A implements B {}", + "declare interface A mixins B {}", + "declare interface A implements B {}", + ], + }, + ["flow", "babel-flow"], +); diff --git a/tests/format/misc/errors/flow/invalid_keyword_symbol.js b/tests/format/misc/errors/flow/invalid_keyword_symbol.js new file mode 100644 index 000000000000..149ddac7b527 --- /dev/null +++ b/tests/format/misc/errors/flow/invalid_keyword_symbol.js @@ -0,0 +1 @@ +type symbol = number; diff --git a/tests/format/misc/errors/flow/jsfmt.spec.js b/tests/format/misc/errors/flow/jsfmt.spec.js deleted file mode 100644 index b9a908981a50..000000000000 --- a/tests/format/misc/errors/flow/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow"]); diff --git a/tests/format/misc/errors/flow/spread-with-optional.js b/tests/format/misc/errors/flow/spread-with-optional.js new file mode 100644 index 000000000000..cd09ddec5995 --- /dev/null +++ b/tests/format/misc/errors/flow/spread-with-optional.js @@ -0,0 +1 @@ +type T = [...foo?: S]; // ERROR diff --git a/tests/format/misc/errors/graphql/__snapshots__/format.test.js.snap b/tests/format/misc/errors/graphql/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6e47153f7851 --- /dev/null +++ b/tests/format/misc/errors/graphql/__snapshots__/format.test.js.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`type-interfaces.graphql [graphql] format 1`] = ` +"Syntax Error: Unexpected "|". (5:21) + 3 | # which will break seperator detection added in #7305 + 4 | +> 5 | type A implements A | B { + | ^ + 6 | a: a + 7 | } + 8 | +Cause: Syntax Error: Unexpected "|"." +`; diff --git a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 063d8426765c..000000000000 --- a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,12 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`type-interfaces.graphql [graphql] format 1`] = ` -"Syntax Error: Unexpected "|". (5:21) - 3 | # which will break seperator detection added in #7305 - 4 | -> 5 | type A implements A | B { - | ^ - 6 | a: a - 7 | } - 8 |" -`; diff --git a/tests/format/misc/errors/graphql/format.test.js b/tests/format/misc/errors/graphql/format.test.js new file mode 100644 index 000000000000..415281ec8a59 --- /dev/null +++ b/tests/format/misc/errors/graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["graphql"]); diff --git a/tests/format/misc/errors/graphql/jsfmt.spec.js b/tests/format/misc/errors/graphql/jsfmt.spec.js deleted file mode 100644 index 4612e6ac5020..000000000000 --- a/tests/format/misc/errors/graphql/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["graphql"]); diff --git a/tests/format/misc/errors/handlebars/__snapshots__/format.test.js.snap b/tests/format/misc/errors/handlebars/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8eb48d537d45 --- /dev/null +++ b/tests/format/misc/errors/handlebars/__snapshots__/format.test.js.snap @@ -0,0 +1,428 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid.hbs [glimmer] format 1`] = ` +"Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID' (2:11) + 1 | <A > +> 2 | x, {{@name} + | ^ + 3 | +Cause: Parse error on line 2: +<A >x, {{@name} +--------------^ +Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID'" +`; + +exports[`invalid-2.hbs [glimmer] format 1`] = ` +"Unclosed element \`@name\` (3:0) + 1 | <a> + 2 | +> 3 | <{@name> + | ^^^^^^^^ + 4 | +Cause: Unclosed element \`@name\`: + +| +| <{@name> +| + +(error occurred in 'an unknown module' @ line 3 : column 0)" +`; + +exports[`invalid-3.hbs [glimmer] format 1`] = ` +"Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (3:3) + 1 | <a> + 2 | +> 3 | {{}} + | ^ + 4 | +Cause: Parse error on line 3: +<a>{{}} +-----^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" +`; + +exports[`snippet: IMG [glimmer] format 1`] = ` +"Unclosed element \`IMG\` (1:0) +> 1 | <IMG> + | ^^^^^ +Cause: Unclosed element \`IMG\`: + +| +| <IMG> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: INPUT [glimmer] format 1`] = ` +"Unclosed element \`INPUT\` (1:0) +> 1 | <INPUT> + | ^^^^^^^ +Cause: Unclosed element \`INPUT\`: + +| +| <INPUT> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: area [glimmer] format 1`] = ` +"<area> elements do not need end tags. You should remove it (1:6) +> 1 | <area></area> + | ^^^^^^^ +Cause: <area> elements do not need end tags. You should remove it: + +| +| </area> +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" +`; + +exports[`snippet: base [glimmer] format 1`] = ` +"<base> elements do not need end tags. You should remove it (1:6) +> 1 | <base></base> + | ^^^^^^^ +Cause: <base> elements do not need end tags. You should remove it: + +| +| </base> +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" +`; + +exports[`snippet: basefont [glimmer] format 1`] = ` +"Unclosed element \`basefont\` (1:0) +> 1 | <basefont> + | ^^^^^^^^^^ +Cause: Unclosed element \`basefont\`: + +| +| <basefont> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: bgsound [glimmer] format 1`] = ` +"Unclosed element \`bgsound\` (1:0) +> 1 | <bgsound> + | ^^^^^^^^^ +Cause: Unclosed element \`bgsound\`: + +| +| <bgsound> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: br [glimmer] format 1`] = ` +"<br> elements do not need end tags. You should remove it (1:4) +> 1 | <br></br> + | ^^^^^ +Cause: <br> elements do not need end tags. You should remove it: + +| +| </br> +| + +(error occurred in 'an unknown module' @ line 1 : column 4)" +`; + +exports[`snippet: col [glimmer] format 1`] = ` +"<col> elements do not need end tags. You should remove it (1:5) +> 1 | <col></col> + | ^^^^^^ +Cause: <col> elements do not need end tags. You should remove it: + +| +| </col> +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" +`; + +exports[`snippet: command [glimmer] format 1`] = ` +"<command> elements do not need end tags. You should remove it (1:9) +> 1 | <command></command> + | ^^^^^^^^^^ +Cause: <command> elements do not need end tags. You should remove it: + +| +| </command> +| + +(error occurred in 'an unknown module' @ line 1 : column 9)" +`; + +exports[`snippet: div [glimmer] format 1`] = ` +"Unclosed element \`div\` (1:0) +> 1 | <div> + | ^^^^^ +Cause: Unclosed element \`div\`: + +| +| <div> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: embed [glimmer] format 1`] = ` +"<embed> elements do not need end tags. You should remove it (1:7) +> 1 | <embed></embed> + | ^^^^^^^^ +Cause: <embed> elements do not need end tags. You should remove it: + +| +| </embed> +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" +`; + +exports[`snippet: frame [glimmer] format 1`] = ` +"Unclosed element \`frame\` (1:0) +> 1 | <frame> + | ^^^^^^^ +Cause: Unclosed element \`frame\`: + +| +| <frame> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: hr [glimmer] format 1`] = ` +"<hr> elements do not need end tags. You should remove it (1:4) +> 1 | <hr></hr> + | ^^^^^ +Cause: <hr> elements do not need end tags. You should remove it: + +| +| </hr> +| + +(error occurred in 'an unknown module' @ line 1 : column 4)" +`; + +exports[`snippet: imG [glimmer] format 1`] = ` +"Unclosed element \`imG\` (1:0) +> 1 | <imG> + | ^^^^^ +Cause: Unclosed element \`imG\`: + +| +| <imG> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: image [glimmer] format 1`] = ` +"Unclosed element \`image\` (1:0) +> 1 | <image> + | ^^^^^^^ +Cause: Unclosed element \`image\`: + +| +| <image> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: img [glimmer] format 1`] = ` +"<img> elements do not need end tags. You should remove it (1:5) +> 1 | <img></img> + | ^^^^^^ +Cause: <img> elements do not need end tags. You should remove it: + +| +| </img> +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" +`; + +exports[`snippet: input [glimmer] format 1`] = ` +"<input> elements do not need end tags. You should remove it (1:7) +> 1 | <input></input> + | ^^^^^^^^ +Cause: <input> elements do not need end tags. You should remove it: + +| +| </input> +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" +`; + +exports[`snippet: isindex [glimmer] format 1`] = ` +"Unclosed element \`isindex\` (1:0) +> 1 | <isindex> + | ^^^^^^^^^ +Cause: Unclosed element \`isindex\`: + +| +| <isindex> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: keygen [glimmer] format 1`] = ` +"<keygen> elements do not need end tags. You should remove it (1:8) +> 1 | <keygen></keygen> + | ^^^^^^^^^ +Cause: <keygen> elements do not need end tags. You should remove it: + +| +| </keygen> +| + +(error occurred in 'an unknown module' @ line 1 : column 8)" +`; + +exports[`snippet: lINk [glimmer] format 1`] = ` +"Unclosed element \`lINk\` (1:0) +> 1 | <lINk> + | ^^^^^^ +Cause: Unclosed element \`lINk\`: + +| +| <lINk> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: link [glimmer] format 1`] = ` +"<link> elements do not need end tags. You should remove it (1:6) +> 1 | <link></link> + | ^^^^^^^ +Cause: <link> elements do not need end tags. You should remove it: + +| +| </link> +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" +`; + +exports[`snippet: menuitem [glimmer] format 1`] = ` +"Unclosed element \`menuitem\` (1:0) +> 1 | <menuitem> + | ^^^^^^^^^^ +Cause: Unclosed element \`menuitem\`: + +| +| <menuitem> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: meta [glimmer] format 1`] = ` +"<meta> elements do not need end tags. You should remove it (1:6) +> 1 | <meta></meta> + | ^^^^^^^ +Cause: <meta> elements do not need end tags. You should remove it: + +| +| </meta> +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" +`; + +exports[`snippet: nextid [glimmer] format 1`] = ` +"Unclosed element \`nextid\` (1:0) +> 1 | <nextid> + | ^^^^^^^^ +Cause: Unclosed element \`nextid\`: + +| +| <nextid> +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" +`; + +exports[`snippet: param [glimmer] format 1`] = ` +"<param> elements do not need end tags. You should remove it (1:7) +> 1 | <param></param> + | ^^^^^^^^ +Cause: <param> elements do not need end tags. You should remove it: + +| +| </param> +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" +`; + +exports[`snippet: source [glimmer] format 1`] = ` +"<source> elements do not need end tags. You should remove it (1:8) +> 1 | <source></source> + | ^^^^^^^^^ +Cause: <source> elements do not need end tags. You should remove it: + +| +| </source> +| + +(error occurred in 'an unknown module' @ line 1 : column 8)" +`; + +exports[`snippet: track [glimmer] format 1`] = ` +"<track> elements do not need end tags. You should remove it (1:7) +> 1 | <track></track> + | ^^^^^^^^ +Cause: <track> elements do not need end tags. You should remove it: + +| +| </track> +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" +`; + +exports[`snippet: wbr [glimmer] format 1`] = ` +"<wbr> elements do not need end tags. You should remove it (1:5) +> 1 | <wbr></wbr> + | ^^^^^^ +Cause: <wbr> elements do not need end tags. You should remove it: + +| +| </wbr> +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" +`; + +exports[`tilde-comments-1.hbs [glimmer] format 1`] = ` +"Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) +> 1 | {{~}} + | ^ + 2 | +Cause: Parse error on line 1: +{{~}} +---^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" +`; + +exports[`tilde-comments-2.hbs [glimmer] format 1`] = ` +"Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) +> 1 | {{~~}} + | ^ + 2 | +Cause: Parse error on line 1: +{{~~}} +---^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" +`; diff --git a/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d712ff17901b..000000000000 --- a/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,395 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid.hbs [glimmer] format 1`] = ` -"Parse error on line 2: -<A >x, {{@name} ---------------^ -Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID' (2:11) - 1 | <A > -> 2 | x, {{@name} - | ^ - 3 |" -`; - -exports[`invalid-2.hbs [glimmer] format 1`] = ` -"Unclosed element \`@name\`: - -| -| <{@name> -| - -(error occurred in 'an unknown module' @ line 3 : column 0) (3:0) - 1 | <a> - 2 | -> 3 | <{@name> - | ^^^^^^^^ - 4 |" -`; - -exports[`invalid-3.hbs [glimmer] format 1`] = ` -"Parse error on line 3: -<a>{{}} ------^ -Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (3:3) - 1 | <a> - 2 | -> 3 | {{}} - | ^ - 4 |" -`; - -exports[`snippet: IMG [glimmer] format 1`] = ` -"Unclosed element \`IMG\`: - -| -| <IMG> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <IMG> - | ^^^^^" -`; - -exports[`snippet: INPUT [glimmer] format 1`] = ` -"Unclosed element \`INPUT\`: - -| -| <INPUT> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <INPUT> - | ^^^^^^^" -`; - -exports[`snippet: area [glimmer] format 1`] = ` -"<area> elements do not need end tags. You should remove it: - -| -| </area> -| - -(error occurred in 'an unknown module' @ line 1 : column 6) (1:6) -> 1 | <area></area> - | ^^^^^^^" -`; - -exports[`snippet: base [glimmer] format 1`] = ` -"<base> elements do not need end tags. You should remove it: - -| -| </base> -| - -(error occurred in 'an unknown module' @ line 1 : column 6) (1:6) -> 1 | <base></base> - | ^^^^^^^" -`; - -exports[`snippet: basefont [glimmer] format 1`] = ` -"Unclosed element \`basefont\`: - -| -| <basefont> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <basefont> - | ^^^^^^^^^^" -`; - -exports[`snippet: bgsound [glimmer] format 1`] = ` -"Unclosed element \`bgsound\`: - -| -| <bgsound> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <bgsound> - | ^^^^^^^^^" -`; - -exports[`snippet: br [glimmer] format 1`] = ` -"<br> elements do not need end tags. You should remove it: - -| -| </br> -| - -(error occurred in 'an unknown module' @ line 1 : column 4) (1:4) -> 1 | <br></br> - | ^^^^^" -`; - -exports[`snippet: col [glimmer] format 1`] = ` -"<col> elements do not need end tags. You should remove it: - -| -| </col> -| - -(error occurred in 'an unknown module' @ line 1 : column 5) (1:5) -> 1 | <col></col> - | ^^^^^^" -`; - -exports[`snippet: command [glimmer] format 1`] = ` -"<command> elements do not need end tags. You should remove it: - -| -| </command> -| - -(error occurred in 'an unknown module' @ line 1 : column 9) (1:9) -> 1 | <command></command> - | ^^^^^^^^^^" -`; - -exports[`snippet: div [glimmer] format 1`] = ` -"Unclosed element \`div\`: - -| -| <div> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <div> - | ^^^^^" -`; - -exports[`snippet: embed [glimmer] format 1`] = ` -"<embed> elements do not need end tags. You should remove it: - -| -| </embed> -| - -(error occurred in 'an unknown module' @ line 1 : column 7) (1:7) -> 1 | <embed></embed> - | ^^^^^^^^" -`; - -exports[`snippet: frame [glimmer] format 1`] = ` -"Unclosed element \`frame\`: - -| -| <frame> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <frame> - | ^^^^^^^" -`; - -exports[`snippet: hr [glimmer] format 1`] = ` -"<hr> elements do not need end tags. You should remove it: - -| -| </hr> -| - -(error occurred in 'an unknown module' @ line 1 : column 4) (1:4) -> 1 | <hr></hr> - | ^^^^^" -`; - -exports[`snippet: imG [glimmer] format 1`] = ` -"Unclosed element \`imG\`: - -| -| <imG> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <imG> - | ^^^^^" -`; - -exports[`snippet: image [glimmer] format 1`] = ` -"Unclosed element \`image\`: - -| -| <image> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <image> - | ^^^^^^^" -`; - -exports[`snippet: img [glimmer] format 1`] = ` -"<img> elements do not need end tags. You should remove it: - -| -| </img> -| - -(error occurred in 'an unknown module' @ line 1 : column 5) (1:5) -> 1 | <img></img> - | ^^^^^^" -`; - -exports[`snippet: input [glimmer] format 1`] = ` -"<input> elements do not need end tags. You should remove it: - -| -| </input> -| - -(error occurred in 'an unknown module' @ line 1 : column 7) (1:7) -> 1 | <input></input> - | ^^^^^^^^" -`; - -exports[`snippet: isindex [glimmer] format 1`] = ` -"Unclosed element \`isindex\`: - -| -| <isindex> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <isindex> - | ^^^^^^^^^" -`; - -exports[`snippet: keygen [glimmer] format 1`] = ` -"<keygen> elements do not need end tags. You should remove it: - -| -| </keygen> -| - -(error occurred in 'an unknown module' @ line 1 : column 8) (1:8) -> 1 | <keygen></keygen> - | ^^^^^^^^^" -`; - -exports[`snippet: lINk [glimmer] format 1`] = ` -"Unclosed element \`lINk\`: - -| -| <lINk> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <lINk> - | ^^^^^^" -`; - -exports[`snippet: link [glimmer] format 1`] = ` -"<link> elements do not need end tags. You should remove it: - -| -| </link> -| - -(error occurred in 'an unknown module' @ line 1 : column 6) (1:6) -> 1 | <link></link> - | ^^^^^^^" -`; - -exports[`snippet: menuitem [glimmer] format 1`] = ` -"Unclosed element \`menuitem\`: - -| -| <menuitem> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <menuitem> - | ^^^^^^^^^^" -`; - -exports[`snippet: meta [glimmer] format 1`] = ` -"<meta> elements do not need end tags. You should remove it: - -| -| </meta> -| - -(error occurred in 'an unknown module' @ line 1 : column 6) (1:6) -> 1 | <meta></meta> - | ^^^^^^^" -`; - -exports[`snippet: nextid [glimmer] format 1`] = ` -"Unclosed element \`nextid\`: - -| -| <nextid> -| - -(error occurred in 'an unknown module' @ line 1 : column 0) (1:0) -> 1 | <nextid> - | ^^^^^^^^" -`; - -exports[`snippet: param [glimmer] format 1`] = ` -"<param> elements do not need end tags. You should remove it: - -| -| </param> -| - -(error occurred in 'an unknown module' @ line 1 : column 7) (1:7) -> 1 | <param></param> - | ^^^^^^^^" -`; - -exports[`snippet: source [glimmer] format 1`] = ` -"<source> elements do not need end tags. You should remove it: - -| -| </source> -| - -(error occurred in 'an unknown module' @ line 1 : column 8) (1:8) -> 1 | <source></source> - | ^^^^^^^^^" -`; - -exports[`snippet: track [glimmer] format 1`] = ` -"<track> elements do not need end tags. You should remove it: - -| -| </track> -| - -(error occurred in 'an unknown module' @ line 1 : column 7) (1:7) -> 1 | <track></track> - | ^^^^^^^^" -`; - -exports[`snippet: wbr [glimmer] format 1`] = ` -"<wbr> elements do not need end tags. You should remove it: - -| -| </wbr> -| - -(error occurred in 'an unknown module' @ line 1 : column 5) (1:5) -> 1 | <wbr></wbr> - | ^^^^^^" -`; - -exports[`tilde-comments-1.hbs [glimmer] format 1`] = ` -"Parse error on line 1: -{{~}} ----^ -Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) -> 1 | {{~}} - | ^ - 2 |" -`; - -exports[`tilde-comments-2.hbs [glimmer] format 1`] = ` -"Parse error on line 1: -{{~~}} ----^ -Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) -> 1 | {{~~}} - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/handlebars/format.test.js b/tests/format/misc/errors/handlebars/format.test.js new file mode 100644 index 000000000000..0aaf054cb05c --- /dev/null +++ b/tests/format/misc/errors/handlebars/format.test.js @@ -0,0 +1,49 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + ...[ + "area", + "base", + // "basefont", + // "bgsound", + "br", + "col", + "command", + "embed", + // "frame", + "hr", + // "image", + "img", + "input", + // "isindex", + "keygen", + "link", + // "menuitem", + "meta", + // "nextid", + "param", + "source", + "track", + "wbr", + ].map((tag) => ({ name: tag, code: `<${tag}></${tag}>` })), + ...[ + "div", + // Missed HTML void tags + "basefont", + "bgsound", + "frame", + "image", + "isindex", + "menuitem", + "nextid", + // Upper case + "IMG", + "INPUT", + "imG", + "lINk", + ].map((tag) => ({ name: tag, code: `<${tag}>` })), + ], + }, + ["glimmer"], +); diff --git a/tests/format/misc/errors/handlebars/jsfmt.spec.js b/tests/format/misc/errors/handlebars/jsfmt.spec.js deleted file mode 100644 index 96e9fba026d7..000000000000 --- a/tests/format/misc/errors/handlebars/jsfmt.spec.js +++ /dev/null @@ -1,49 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - ...[ - "area", - "base", - // "basefont", - // "bgsound", - "br", - "col", - "command", - "embed", - // "frame", - "hr", - // "image", - "img", - "input", - // "isindex", - "keygen", - "link", - // "menuitem", - "meta", - // "nextid", - "param", - "source", - "track", - "wbr", - ].map((tag) => ({ name: tag, code: `<${tag}></${tag}>` })), - ...[ - "div", - // Missed HTML void tags - "basefont", - "bgsound", - "frame", - "image", - "isindex", - "menuitem", - "nextid", - // Upper case - "IMG", - "INPUT", - "imG", - "lINk", - ].map((tag) => ({ name: tag, code: `<${tag}>` })), - ], - }, - ["glimmer"] -); diff --git a/tests/format/misc/errors/invalid-interface-extends/__snapshots__/format.test.js.snap b/tests/format/misc/errors/invalid-interface-extends/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..07af0134c8bb --- /dev/null +++ b/tests/format/misc/errors/invalid-interface-extends/__snapshots__/format.test.js.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Unexpected token (1:21) +> 1 | interface A extends (typeof fs) { } + | ^ +Cause: Unexpected token (1:20)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) +> 1 | interface A extends (typeof fs) { } + | ^^^^^^^^^^^ +Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | interface B extends C['D'] { } + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) +> 1 | interface B extends C['D'] { } + | ^^^^^^ +Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | interface E extends F?.G { } + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) +> 1 | interface E extends F?.G { } + | ^^^^ +Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:23) +> 1 | interface H extends I extends J { } + | ^ +Cause: Unexpected token, expected "," (1:22)" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"'extends' clause already seen. (1:23) +> 1 | interface H extends I extends J { } + | ^^^^^^^^^ +Cause: 'extends' clause already seen." +`; + +exports[`snippet: #4 [babel-ts] format 1`] = ` +"Unexpected token (1:21) +> 1 | interface K extends 2 { } + | ^ +Cause: Unexpected token (1:20)" +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) +> 1 | interface K extends 2 { } + | ^ +Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." +`; + +exports[`snippet: #5 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | interface L extends M().N { } + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #5 [typescript] format 1`] = ` +"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) +> 1 | interface L extends M().N { } + | ^^^^^ +Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." +`; diff --git a/tests/format/misc/errors/invalid-interface-extends/format.test.js b/tests/format/misc/errors/invalid-interface-extends/format.test.js new file mode 100644 index 000000000000..a5d3a3ad7edd --- /dev/null +++ b/tests/format/misc/errors/invalid-interface-extends/format.test.js @@ -0,0 +1,22 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // https://github.com/typescript-eslint/typescript-eslint/pull/11271 + // https://github.com/prettier/prettier/issues/17376 + // ParenthesizedExpression + "interface A extends (typeof fs) { }", + // ElementAccessExpression + "interface B extends C['D'] { }", + // OptionalChain + "interface E extends F?.G { }", + // multiple extends + "interface H extends I extends J { }", + // NumericLiteral + "interface K extends 2 { }", + // nested CallExpression + "interface L extends M().N { }", + ], + }, + ["typescript", "babel-ts"], +); diff --git a/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/format.test.js.snap b/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ec4da1188d5b --- /dev/null +++ b/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/format.test.js.snap @@ -0,0 +1,110 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`decorator.ts [babel-ts] format 1`] = ` +"Leading decorators must be attached to a class declaration. (4:1) + 2 | + 3 | @dec +> 4 | enum E {} + | ^ + 5 | +Cause: Leading decorators must be attached to a class declaration. (4:0)" +`; + +exports[`decorator.ts [typescript] format 1`] = ` +"Decorators are not valid here. (3:1) + 1 | declare function dec<T>(target: T): T; + 2 | +> 3 | @dec + | ^^^^ + 4 | enum E {} + 5 | +Cause: Decorators are not valid here." +`; + +exports[`enums.ts [babel-ts] format 1`] = ` +"Leading decorators must be attached to a class declaration. (4:1) + 2 | + 3 | @decorator() +> 4 | enum Direction { + | ^ + 5 | Up = 1, + 6 | Down, + 7 | Left, +Cause: Leading decorators must be attached to a class declaration. (4:0)" +`; + +exports[`enums.ts [typescript] format 1`] = ` +"Decorators are not valid here. (3:1) + 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 + 2 | +> 3 | @decorator() + | ^^^^^^^^^^^^ + 4 | enum Direction { + 5 | Up = 1, + 6 | Down, +Cause: Decorators are not valid here." +`; + +exports[`function.ts [babel-ts] format 1`] = ` +"Leading decorators must be attached to a class declaration. (4:1) + 2 | + 3 | @decorator() +> 4 | function foo( ){} + | ^ + 5 | +Cause: Leading decorators must be attached to a class declaration. (4:0)" +`; + +exports[`function.ts [typescript] format 1`] = ` +"Decorators are not valid here. (3:1) + 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 + 2 | +> 3 | @decorator() + | ^^^^^^^^^^^^ + 4 | function foo( ){} + 5 | +Cause: Decorators are not valid here." +`; + +exports[`interface.ts [babel-ts] format 1`] = ` +"Leading decorators must be attached to a class declaration. (5:1) + 3 | + 4 | @hello() +> 5 | interface MyInterface {id: string; + | ^ + 6 | } + 7 | +Cause: Leading decorators must be attached to a class declaration. (5:0)" +`; + +exports[`interface.ts [typescript] format 1`] = ` +"Decorators are not valid here. (4:1) + 2 | // #4632 + 3 | +> 4 | @hello() + | ^^^^^^^^ + 5 | interface MyInterface {id: string; + 6 | } + 7 | +Cause: Decorators are not valid here." +`; + +exports[`issue-9102.ts [babel-ts] format 1`] = ` +"Leading decorators must be attached to a class declaration. (2:1) + 1 | @Decorator() +> 2 | type T = 1; + | ^ + 3 | class C {} + 4 | +Cause: Leading decorators must be attached to a class declaration. (2:0)" +`; + +exports[`issue-9102.ts [typescript] format 1`] = ` +"Decorators are not valid here. (1:1) +> 1 | @Decorator() + | ^^^^^^^^^^^^ + 2 | type T = 1; + 3 | class C {} + 4 | +Cause: Decorators are not valid here." +`; diff --git a/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1c59eee4d330..000000000000 --- a/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`decorator.ts [babel-ts] format 1`] = ` -"Leading decorators must be attached to a class declaration. (4:1) - 2 | - 3 | @dec -> 4 | enum E {} - | ^ - 5 |" -`; - -exports[`decorator.ts [typescript] format 1`] = ` -"Decorators are not valid here. (3:1) - 1 | declare function dec<T>(target: T): T; - 2 | -> 3 | @dec - | ^^^^ - 4 | enum E {} - 5 |" -`; - -exports[`enums.ts [babel-ts] format 1`] = ` -"Leading decorators must be attached to a class declaration. (4:1) - 2 | - 3 | @decorator() -> 4 | enum Direction { - | ^ - 5 | Up = 1, - 6 | Down, - 7 | Left," -`; - -exports[`enums.ts [typescript] format 1`] = ` -"Decorators are not valid here. (3:1) - 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 - 2 | -> 3 | @decorator() - | ^^^^^^^^^^^^ - 4 | enum Direction { - 5 | Up = 1, - 6 | Down," -`; - -exports[`function.ts [babel-ts] format 1`] = ` -"Leading decorators must be attached to a class declaration. (4:1) - 2 | - 3 | @decorator() -> 4 | function foo( ){} - | ^ - 5 |" -`; - -exports[`function.ts [typescript] format 1`] = ` -"Decorators are not valid here. (3:1) - 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 - 2 | -> 3 | @decorator() - | ^^^^^^^^^^^^ - 4 | function foo( ){} - 5 |" -`; - -exports[`interface.ts [babel-ts] format 1`] = ` -"Leading decorators must be attached to a class declaration. (5:1) - 3 | - 4 | @hello() -> 5 | interface MyInterface {id: string; - | ^ - 6 | } - 7 |" -`; - -exports[`interface.ts [typescript] format 1`] = ` -"Decorators are not valid here. (4:1) - 2 | // #4632 - 3 | -> 4 | @hello() - | ^^^^^^^^ - 5 | interface MyInterface {id: string; - 6 | } - 7 |" -`; - -exports[`issue-9102.ts [babel-ts] format 1`] = ` -"Leading decorators must be attached to a class declaration. (2:1) - 1 | @Decorator() -> 2 | type T = 1; - | ^ - 3 | class C {} - 4 |" -`; - -exports[`issue-9102.ts [typescript] format 1`] = ` -"Decorators are not valid here. (1:1) -> 1 | @Decorator() - | ^^^^^^^^^^^^ - 2 | type T = 1; - 3 | class C {} - 4 |" -`; diff --git a/tests/format/misc/errors/invalid-typescript-decorators/format.test.js b/tests/format/misc/errors/invalid-typescript-decorators/format.test.js new file mode 100644 index 000000000000..d9c10157d5dc --- /dev/null +++ b/tests/format/misc/errors/invalid-typescript-decorators/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "babel-ts"]); diff --git a/tests/format/misc/errors/invalid-typescript-decorators/jsfmt.spec.js b/tests/format/misc/errors/invalid-typescript-decorators/jsfmt.spec.js deleted file mode 100644 index aff59cd2fbce..000000000000 --- a/tests/format/misc/errors/invalid-typescript-decorators/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel-ts"]); diff --git a/tests/format/misc/errors/invalid/__snapshots__/format.test.js.snap b/tests/format/misc/errors/invalid/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..93074096dae0 --- /dev/null +++ b/tests/format/misc/errors/invalid/__snapshots__/format.test.js.snap @@ -0,0 +1,446 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"Unexpected token (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: Unexpected token (1:4)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"Unexpected token, expected "(" (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: Unexpected token, expected "(" (1:4)" +`; + +exports[`snippet: #0 [babel] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #0 [babel-flow] format 1`] = ` +"Unexpected token, expected "(" (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: Unexpected token, expected "(" (1:4)" +`; + +exports[`snippet: #0 [babel-flow] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Unexpected token, expected "(" (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: Unexpected token, expected "(" (1:4)" +`; + +exports[`snippet: #0 [babel-ts] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"Unexpected token each (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: Unexpected token each" +`; + +exports[`snippet: #0 [flow] format 1`] = ` +"Unexpected identifier, expected the token \`(\` (1:5) +> 1 | for each (a in b) {} + | ^^^^" +`; + +exports[`snippet: #0 [flow] format 2`] = ` +"Invalid left-hand side in assignment (1:2) +> 1 | (a = b) = 1 + | ^^^^^" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Expected '(' (1:5) +> 1 | for each (a in b) {} + | ^^^^ +Cause: [1:4-1:8]: Expected '('" +`; + +exports[`snippet: #0 [meriyah] format 2`] = ` +"Invalid left-hand side in assignment (1:9) +> 1 | (a = b) = 1 + | ^ +Cause: [1:8-1:9]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"'(' expected. (1:5) +> 1 | for each (a in b) {} + | ^ +Cause: '(' expected." +`; + +exports[`snippet: #1 [acorn] format 1`] = ` +"Unexpected token (1:7) +> 1 | class switch() {} + | ^ +Cause: Unexpected token (1:6)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"A class name is required. (1:7) +> 1 | class switch() {} + | ^ +Cause: A class name is required. (1:6)" +`; + +exports[`snippet: #1 [babel] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:5) +> 1 | a = 1 = 2 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" +`; + +exports[`snippet: #1 [babel-flow] format 1`] = ` +"A class name is required. (1:7) +> 1 | class switch() {} + | ^ +Cause: A class name is required. (1:6)" +`; + +exports[`snippet: #1 [babel-flow] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:5) +> 1 | a = 1 = 2 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"A class name is required. (1:7) +> 1 | class switch() {} + | ^ +Cause: A class name is required. (1:6)" +`; + +exports[`snippet: #1 [babel-ts] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:5) +> 1 | a = 1 = 2 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"Unexpected token switch (1:7) +> 1 | class switch() {} + | ^ +Cause: Unexpected token switch" +`; + +exports[`snippet: #1 [flow] format 1`] = ` +"Unexpected token \`switch\`, expected an identifier (1:7) +> 1 | class switch() {} + | ^^^^^^" +`; + +exports[`snippet: #1 [flow] format 2`] = ` +"Invalid left-hand side in assignment (1:5) +> 1 | a = 1 = 2 + | ^" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Unexpected strict mode reserved word (1:7) +> 1 | class switch() {} + | ^^^^^^ +Cause: [1:6-1:12]: Unexpected strict mode reserved word" +`; + +exports[`snippet: #1 [meriyah] format 2`] = ` +"Invalid left-hand side in assignment (1:7) +> 1 | a = 1 = 2 + | ^ +Cause: [1:6-1:7]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"'{' expected. (1:7) +> 1 | class switch() {} + | ^ +Cause: '{' expected." +`; + +exports[`snippet: #2 [acorn] format 1`] = ` +"Unexpected token (1:13) +> 1 | ({ method() }) + | ^ +Cause: Unexpected token (1:12)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | ({ method() }) + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #2 [babel] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = 1) = 2 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #2 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | ({ method() }) + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #2 [babel-flow] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = 1) = 2 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | ({ method() }) + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #2 [babel-ts] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a = 1) = 2 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"Unexpected token } (1:13) +> 1 | ({ method() }) + | ^ +Cause: Unexpected token }" +`; + +exports[`snippet: #2 [flow] format 1`] = ` +"Unexpected token \`}\`, expected the token \`{\` (1:13) +> 1 | ({ method() }) + | ^" +`; + +exports[`snippet: #2 [flow] format 2`] = ` +"Invalid left-hand side in assignment (1:2) +> 1 | (a = 1) = 2 + | ^^^^^" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Expected '{' (1:13) +> 1 | ({ method() }) + | ^ +Cause: [1:12-1:13]: Expected '{'" +`; + +exports[`snippet: #2 [meriyah] format 2`] = ` +"Invalid left-hand side in assignment (1:9) +> 1 | (a = 1) = 2 + | ^ +Cause: [1:8-1:9]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"'{' expected. (1:11) +> 1 | ({ method() }) + | ^ +Cause: '{' expected." +`; + +exports[`snippet: #3 [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token, expected "{" (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: Unexpected token, expected "{" (1:14)" +`; + +exports[`snippet: #3 [babel] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a += b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #3 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: Unexpected token, expected "{" (1:14)" +`; + +exports[`snippet: #3 [babel-flow] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a += b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: Unexpected token, expected "{" (1:14)" +`; + +exports[`snippet: #3 [babel-ts] format 2`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | (a += b) = 1 + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #3 [espree] format 1`] = ` +"Unexpected token } (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: Unexpected token }" +`; + +exports[`snippet: #3 [flow] format 1`] = ` +"Unexpected token \`}\`, expected the token \`{\` (1:15) +> 1 | ({ method({}) }) + | ^" +`; + +exports[`snippet: #3 [flow] format 2`] = ` +"Invalid left-hand side in assignment (1:2) +> 1 | (a += b) = 1 + | ^^^^^^" +`; + +exports[`snippet: #3 [meriyah] format 1`] = ` +"Expected '{' (1:15) +> 1 | ({ method({}) }) + | ^ +Cause: [1:14-1:15]: Expected '{'" +`; + +exports[`snippet: #3 [meriyah] format 2`] = ` +"Invalid left-hand side in assignment (1:10) +> 1 | (a += b) = 1 + | ^ +Cause: [1:9-1:10]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"'{' expected. (1:13) +> 1 | ({ method({}) }) + | ^ +Cause: '{' expected." +`; + +exports[`snippet: #4 [acorn] format 1`] = ` +"Unexpected token (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: Unexpected token (1:22)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Unexpected token, expected "{" (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: Unexpected token, expected "{" (1:22)" +`; + +exports[`snippet: #4 [babel] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:2) +> 1 | (a = b) += 1 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" +`; + +exports[`snippet: #4 [babel-flow] format 1`] = ` +"Unexpected token, expected "{" (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: Unexpected token, expected "{" (1:22)" +`; + +exports[`snippet: #4 [babel-flow] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:2) +> 1 | (a = b) += 1 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" +`; + +exports[`snippet: #4 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: Unexpected token, expected "{" (1:22)" +`; + +exports[`snippet: #4 [babel-ts] format 2`] = ` +"Invalid left-hand side in assignment expression. (1:2) +> 1 | (a = b) += 1 + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" +`; + +exports[`snippet: #4 [espree] format 1`] = ` +"Unexpected token } (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: Unexpected token }" +`; + +exports[`snippet: #4 [flow] format 1`] = ` +"Unexpected token \`}\`, expected the token \`{\` (1:23) +> 1 | ({ method(parameter,) }) + | ^" +`; + +exports[`snippet: #4 [flow] format 2`] = ` +"Invalid left-hand side in assignment (1:2) +> 1 | (a = b) += 1 + | ^^^^^" +`; + +exports[`snippet: #4 [meriyah] format 1`] = ` +"Expected '{' (1:23) +> 1 | ({ method(parameter,) }) + | ^ +Cause: [1:22-1:23]: Expected '{'" +`; + +exports[`snippet: #4 [meriyah] format 2`] = ` +"Invalid left-hand side in assignment (1:9) +> 1 | (a = b) += 1 + | ^^ +Cause: [1:8-1:10]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"'{' expected. (1:21) +> 1 | ({ method(parameter,) }) + | ^ +Cause: '{' expected." +`; diff --git a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 851e810b27d3..000000000000 --- a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,391 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Unexpected token (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"Unexpected token, expected "(" (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [babel] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = b) = 1 - | ^" -`; - -exports[`snippet: #0 [babel-flow] format 1`] = ` -"Unexpected token, expected "(" (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [babel-flow] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = b) = 1 - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 1`] = ` -"Unexpected token, expected "(" (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = b) = 1 - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Unexpected token each (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [flow] format 1`] = ` -"Unexpected identifier, expected the token \`(\` (1:5) -> 1 | for each (a in b) {} - | ^^^^" -`; - -exports[`snippet: #0 [flow] format 2`] = ` -"Invalid left-hand side in assignment (1:2) -> 1 | (a = b) = 1 - | ^^^^^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Expected '(' (1:8) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #0 [meriyah] format 2`] = ` -"Invalid left-hand side in assignment (1:9) -> 1 | (a = b) = 1 - | ^" -`; - -exports[`snippet: #0 [typescript] format 1`] = ` -"'(' expected. (1:5) -> 1 | for each (a in b) {} - | ^" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"Unexpected token (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"A class name is required. (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [babel] format 2`] = ` -"Invalid left-hand side in assignment expression. (1:5) -> 1 | a = 1 = 2 - | ^" -`; - -exports[`snippet: #1 [babel-flow] format 1`] = ` -"A class name is required. (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [babel-flow] format 2`] = ` -"Invalid left-hand side in assignment expression. (1:5) -> 1 | a = 1 = 2 - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 1`] = ` -"A class name is required. (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 2`] = ` -"Invalid left-hand side in assignment expression. (1:5) -> 1 | a = 1 = 2 - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"Unexpected token switch (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [flow] format 1`] = ` -"Unexpected token \`switch\`, expected an identifier (1:7) -> 1 | class switch() {} - | ^^^^^^" -`; - -exports[`snippet: #1 [flow] format 2`] = ` -"Invalid left-hand side in assignment (1:5) -> 1 | a = 1 = 2 - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Unexpected strict mode reserved word (1:12) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #1 [meriyah] format 2`] = ` -"Invalid left-hand side in assignment (1:7) -> 1 | a = 1 = 2 - | ^" -`; - -exports[`snippet: #1 [typescript] format 1`] = ` -"'{' expected. (1:7) -> 1 | class switch() {} - | ^" -`; - -exports[`snippet: #2 [acorn] format 1`] = ` -"Unexpected token (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Unexpected token, expected "{" (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [babel] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = 1) = 2 - | ^" -`; - -exports[`snippet: #2 [babel-flow] format 1`] = ` -"Unexpected token, expected "{" (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [babel-flow] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = 1) = 2 - | ^" -`; - -exports[`snippet: #2 [babel-ts] format 1`] = ` -"Unexpected token, expected "{" (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [babel-ts] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a = 1) = 2 - | ^" -`; - -exports[`snippet: #2 [espree] format 1`] = ` -"Unexpected token } (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [flow] format 1`] = ` -"Unexpected token \`}\`, expected the token \`{\` (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [flow] format 2`] = ` -"Invalid left-hand side in assignment (1:2) -> 1 | (a = 1) = 2 - | ^^^^^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"Expected '{' (1:13) -> 1 | ({ method() }) - | ^" -`; - -exports[`snippet: #2 [meriyah] format 2`] = ` -"Invalid left-hand side in assignment (1:9) -> 1 | (a = 1) = 2 - | ^" -`; - -exports[`snippet: #2 [typescript] format 1`] = ` -"Unexpected token. (1:10) -> 1 | ({ method() }) - | ^^" -`; - -exports[`snippet: #3 [acorn] format 1`] = ` -"Unexpected token (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Unexpected token, expected "{" (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [babel] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a += b) = 1 - | ^" -`; - -exports[`snippet: #3 [babel-flow] format 1`] = ` -"Unexpected token, expected "{" (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [babel-flow] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a += b) = 1 - | ^" -`; - -exports[`snippet: #3 [babel-ts] format 1`] = ` -"Unexpected token, expected "{" (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [babel-ts] format 2`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | (a += b) = 1 - | ^" -`; - -exports[`snippet: #3 [espree] format 1`] = ` -"Unexpected token } (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [flow] format 1`] = ` -"Unexpected token \`}\`, expected the token \`{\` (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [flow] format 2`] = ` -"Invalid left-hand side in assignment (1:2) -> 1 | (a += b) = 1 - | ^^^^^^" -`; - -exports[`snippet: #3 [meriyah] format 1`] = ` -"Expected '{' (1:15) -> 1 | ({ method({}) }) - | ^" -`; - -exports[`snippet: #3 [meriyah] format 2`] = ` -"Invalid left-hand side in assignment (1:10) -> 1 | (a += b) = 1 - | ^" -`; - -exports[`snippet: #3 [typescript] format 1`] = ` -"Unexpected token. (1:10) -> 1 | ({ method({}) }) - | ^^^^" -`; - -exports[`snippet: #4 [acorn] format 1`] = ` -"Unexpected token (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Unexpected token, expected "{" (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [babel] format 2`] = ` -"Invalid left-hand side in parenthesized expression. (1:2) -> 1 | (a = b) += 1 - | ^" -`; - -exports[`snippet: #4 [babel-flow] format 1`] = ` -"Unexpected token, expected "{" (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [babel-flow] format 2`] = ` -"Invalid left-hand side in parenthesized expression. (1:2) -> 1 | (a = b) += 1 - | ^" -`; - -exports[`snippet: #4 [babel-ts] format 1`] = ` -"Unexpected token, expected "{" (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [babel-ts] format 2`] = ` -"Invalid left-hand side in parenthesized expression. (1:2) -> 1 | (a = b) += 1 - | ^" -`; - -exports[`snippet: #4 [espree] format 1`] = ` -"Unexpected token } (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [flow] format 1`] = ` -"Unexpected token \`}\`, expected the token \`{\` (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [flow] format 2`] = ` -"Invalid left-hand side in assignment (1:2) -> 1 | (a = b) += 1 - | ^^^^^" -`; - -exports[`snippet: #4 [meriyah] format 1`] = ` -"Expected '{' (1:23) -> 1 | ({ method(parameter,) }) - | ^" -`; - -exports[`snippet: #4 [meriyah] format 2`] = ` -"Invalid left-hand side in assignment (1:10) -> 1 | (a = b) += 1 - | ^" -`; - -exports[`snippet: #4 [typescript] format 1`] = ` -"Unexpected token. (1:10) -> 1 | ({ method(parameter,) }) - | ^^^^^^^^^^^^" -`; diff --git a/tests/format/misc/errors/invalid/format.test.js b/tests/format/misc/errors/invalid/format.test.js new file mode 100644 index 000000000000..c3888e71aa47 --- /dev/null +++ b/tests/format/misc/errors/invalid/format.test.js @@ -0,0 +1,45 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "for each (a in b) {}", + "class switch() {}", + "({ method() })", + "({ method({}) })", + "({ method(parameter,) })", + ], + }, + [ + "babel", + "flow", + "typescript", + "babel-flow", + "babel-ts", + "acorn", + "espree", + "meriyah", + ], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "(a = b) = 1", + "a = 1 = 2", + "(a = 1) = 2", + "(a += b) = 1", + "(a = b) += 1", + ], + }, + [ + "babel", + "flow", + // "typescript", + "babel-flow", + "babel-ts", + // https://github.com/eslint/espree/issues/470 + // "espree", + "meriyah", + ], +); diff --git a/tests/format/misc/errors/invalid/jsfmt.spec.js b/tests/format/misc/errors/invalid/jsfmt.spec.js deleted file mode 100644 index fa83db0112cb..000000000000 --- a/tests/format/misc/errors/invalid/jsfmt.spec.js +++ /dev/null @@ -1,45 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "for each (a in b) {}", - "class switch() {}", - "({ method() })", - "({ method({}) })", - "({ method(parameter,) })", - ], - }, - [ - "babel", - "flow", - "typescript", - "babel-flow", - "babel-ts", - "acorn", - "espree", - "meriyah", - ] -); - -run_spec( - { - dirname: __dirname, - snippets: [ - "(a = b) = 1", - "a = 1 = 2", - "(a = 1) = 2", - "(a += b) = 1", - "(a = b) += 1", - ], - }, - [ - "babel", - "flow", - // "typescript", - "babel-flow", - "babel-ts", - // https://github.com/eslint/espree/issues/470 - // "espree", - "meriyah", - ] -); diff --git a/tests/format/misc/errors/js/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6b9096a8737f --- /dev/null +++ b/tests/format/misc/errors/js/__snapshots__/format.test.js.snap @@ -0,0 +1,196 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-like-comments.js [babel] format 1`] = ` +"Unexpected token (3:1) + 1 | // Only support HTML-like comment in HTML + 2 | alert( +> 3 | <!-- comment + | ^ + 4 | 'hello world' + 5 | ) + 6 | +Cause: Unexpected token (3:0)" +`; + +exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` +"Missing semicolon. (1:26) +> 1 | export { default as foo } assert { type: "json" }; + | ^ + 2 | +Cause: Missing semicolon. (1:25)" +`; + +exports[`import-assertions-with-parens.js [babel] format 1`] = ` +"Unexpected token, expected "{" (1:19) +> 1 | import "x" assert ({type: 'json'}); + | ^ + 2 | +Cause: Unexpected token, expected "{" (1:18)" +`; + +exports[`import-attributes-for-export-without-from.js [babel] format 1`] = ` +"Unexpected token, expected "(" (1:32) +> 1 | export { default as foo } with { type: "json" }; + | ^ + 2 | +Cause: Unexpected token, expected "(" (1:31)" +`; + +exports[`import-attributes-with-parens.js [babel] format 1`] = ` +"Unexpected token, expected "{" (1:17) +> 1 | import "x" with ({type: 'json'}); + | ^ + 2 | +Cause: Unexpected token, expected "{" (1:16)" +`; + +exports[`invalid-escape-in-identifier.js [babel] format 1`] = ` +"Invalid Unicode escape. (1:7) +> 1 | const \\u{20} = 1 + | ^ + 2 | const \\u{3000} = 1 + 3 | +Cause: Invalid Unicode escape. (1:6)" +`; + +exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = ` +"Expecting Unicode escape sequence \\uXXXX. (1:3) +> 1 | a\\ = a + | ^ + 2 | +Cause: Expecting Unicode escape sequence \\uXXXX. (1:2)" +`; + +exports[`module-attributes.js [babel] format 1`] = ` +"Unexpected token, expected "{" (1:33) +> 1 | import foo from "foo.json" with type: "json"; + | ^ + 2 | +Cause: Unexpected token, expected "{" (1:32)" +`; + +exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` +"Unexpected token, expected ")" (3:18) + 1 | // https://github.com/babel/babel/pull/11931 + 2 | +> 3 | for (() => x in y;;); + | ^ + 4 | +Cause: Unexpected token, expected ")" (3:17)" +`; + +exports[`partial-template-strings.js [babel] format 1`] = ` +"Unexpected token (6:42) + 4 | + 5 | const Diagnostics = { +> 6 | unexpected_token: \`Unexpected token: \${?}\`, + | ^ + 7 | name_not_found: \`'\${?}' not found.\` + 8 | }; + 9 | Diagnostics.name_not_found("foo"); // "'foo' not found." +Cause: Unexpected token (6:41)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"Binding should be performed on object property. (1:3) +> 1 | ::%DebugPrint(null) + | ^ +Cause: Binding should be performed on object property. (1:2)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Unexpected token (1:3) +> 1 | a.%DebugPrint(); + | ^ +Cause: Unexpected token (1:2)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token (1:11) +> 1 | const i = %DebugPrint; + | ^ +Cause: Unexpected token (1:10)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token (1:7) +> 1 | f(x + ?) + | ^ +Cause: Unexpected token (1:6)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Unexpected token (1:5) +> 1 | x + ? + | ^ +Cause: Unexpected token (1:4)" +`; + +exports[`snippet: #5 [babel] format 1`] = ` +"Unexpected token (1:1) +> 1 | ?.f() + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #6 [babel] format 1`] = ` +"Unexpected token (5:12) + 3 | + 4 | static isC(obj) { +> 5 | return try obj.#brand; + | ^ + 6 | } + 7 | } +Cause: Unexpected token (5:11)" +`; + +exports[`snippet: #7 [babel] format 1`] = ` +"Unexpected token. (1:7) +> 1 | const #{ a, b } = #{ a: 1, b: 2 }; + | ^" +`; + +exports[`snippet: #8 [babel] format 1`] = ` +"Unexpected token (1:7) +> 1 | const #[a, b] = #[1, 2]; + | ^ +Cause: Unexpected token (1:6)" +`; + +exports[`snippet: #9 [babel] format 1`] = ` +"Unexpected token (1:2) +> 1 | [| 1 |] + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #10 [babel] format 1`] = ` +"Invalid decimal. (1:1) +> 1 | 0b101011101m; + | ^ +Cause: Invalid decimal. (1:0)" +`; + +exports[`snippet: #11 [babel] format 1`] = ` +"Invalid decimal. (1:1) +> 1 | 0x16432m; + | ^ +Cause: Invalid decimal. (1:0)" +`; + +exports[`snippet: #12 [babel] format 1`] = ` +"Invalid decimal. (1:1) +> 1 | 0o16432m; + | ^ +Cause: Invalid decimal. (1:0)" +`; + +exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = ` +"Unexpected token (4:16) + 2 | // be parenthesized, that accidentally break #8016 + 3 | +> 4 | import {} from (('a')); + | ^ + 5 | +Cause: Unexpected token (4:15)" +`; diff --git a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9b8d3c1a8f60..000000000000 --- a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,159 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`html-like-comments.js [babel] format 1`] = ` -"Unexpected token (3:1) - 1 | // Only support HTML-like comment in HTML - 2 | alert( -> 3 | <!-- comment - | ^ - 4 | 'hello world' - 5 | ) - 6 |" -`; - -exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` -"Missing semicolon. (1:26) -> 1 | export { default as foo } assert { type: "json" }; - | ^ - 2 |" -`; - -exports[`import-assertions-with-parens.js [babel] format 1`] = ` -"Unexpected token (1:19) -> 1 | import "x" assert ({type: 'json'}); - | ^ - 2 |" -`; - -exports[`invalid-escape-in-identifier.js [babel] format 1`] = ` -"Invalid Unicode escape. (1:7) -> 1 | const \\u{20} = 1 - | ^ - 2 | const \\u{3000} = 1 - 3 |" -`; - -exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = ` -"Expecting Unicode escape sequence \\uXXXX. (1:3) -> 1 | a\\ = a - | ^ - 2 |" -`; - -exports[`module-attributes.js [babel] format 1`] = ` -"Unexpected token, expected "(" (1:33) -> 1 | import foo from "foo.json" with type: "json"; - | ^ - 2 |" -`; - -exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` -"Unexpected token, expected ")" (3:18) - 1 | // https://github.com/babel/babel/pull/11931 - 2 | -> 3 | for (() => x in y;;); - | ^ - 4 |" -`; - -exports[`partial-template-strings.js [babel] format 1`] = ` -"Unexpected token (6:42) - 4 | - 5 | const Diagnostics = { -> 6 | unexpected_token: \`Unexpected token: \${?}\`, - | ^ - 7 | name_not_found: \`'\${?}' not found.\` - 8 | }; - 9 | Diagnostics.name_not_found("foo"); // "'foo' not found."" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"Binding should be performed on object property. (1:3) -> 1 | ::%DebugPrint(null) - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"Unexpected token (1:3) -> 1 | a.%DebugPrint(); - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Unexpected token (1:11) -> 1 | const i = %DebugPrint; - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Unexpected token (1:7) -> 1 | f(x + ?) - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Unexpected token (1:5) -> 1 | x + ? - | ^" -`; - -exports[`snippet: #5 [babel] format 1`] = ` -"Unexpected token (1:1) -> 1 | ?.f() - | ^" -`; - -exports[`snippet: #6 [babel] format 1`] = ` -"Unexpected token (5:12) - 3 | - 4 | static isC(obj) { -> 5 | return try obj.#brand; - | ^ - 6 | } - 7 | }" -`; - -exports[`snippet: #7 [babel] format 1`] = ` -"Unexpected token (1:7) -> 1 | const #{ a, b } = #{ a: 1, b: 2 }; - | ^" -`; - -exports[`snippet: #8 [babel] format 1`] = ` -"Unexpected token (1:7) -> 1 | const #[a, b] = #[1, 2]; - | ^" -`; - -exports[`snippet: #9 [babel] format 1`] = ` -"Unexpected token (1:2) -> 1 | [| 1 |] - | ^" -`; - -exports[`snippet: #10 [babel] format 1`] = ` -"Invalid decimal. (1:1) -> 1 | 0b101011101m; - | ^" -`; - -exports[`snippet: #11 [babel] format 1`] = ` -"Invalid decimal. (1:1) -> 1 | 0x16432m; - | ^" -`; - -exports[`snippet: #12 [babel] format 1`] = ` -"Invalid decimal. (1:1) -> 1 | 0o16432m; - | ^" -`; - -exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = ` -"Unexpected token (4:16) - 2 | // be parenthesized, that accidentally break #8016 - 3 | -> 4 | import {} from (('a')); - | ^ - 5 |" -`; diff --git a/tests/format/misc/errors/js/assignment/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/assignment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..74fc3cb61407 --- /dev/null +++ b/tests/format/misc/errors/js/assignment/__snapshots__/format.test.js.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"Assigning to rvalue (1:1) +> 1 | ({}) = x; + | ^ +Cause: Assigning to rvalue (1:0)" +`; + +exports[`snippet: #0 [acorn] format 2`] = ` +"The keyword 'let' is reserved (1:21) +> 1 | class Foo extends ((let)[0] = 1) {} + | ^ +Cause: The keyword 'let' is reserved (1:20)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | ({}) = x; + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Invalid parenthesized assignment pattern. (1:1) +> 1 | ({}) = x; + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"Assigning to rvalue (1:1) +> 1 | ({}) = x; + | ^ +Cause: Assigning to rvalue" +`; + +exports[`snippet: #0 [espree] format 2`] = ` +"The keyword 'let' is reserved (1:21) +> 1 | class Foo extends ((let)[0] = 1) {} + | ^ +Cause: The keyword 'let' is reserved" +`; + +exports[`snippet: #0 [espree] format 3`] = ` +"The keyword 'let' is reserved (1:18) +> 1 | export default ((let)[0] = 1); + | ^ +Cause: The keyword 'let' is reserved" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Invalid left-hand side in assignment (1:6) +> 1 | ({}) = x; + | ^ +Cause: [1:5-1:6]: Invalid left-hand side in assignment" +`; + +exports[`snippet: #0 [meriyah] format 2`] = ` +"The identifier 'let' must not be in expression position in strict mode (1:24) +> 1 | class Foo extends ((let)[0] = 1) {} + | ^ +Cause: [1:23-1:24]: The identifier 'let' must not be in expression position in strict mode" +`; + +exports[`snippet: #0 [meriyah] format 3`] = ` +"The identifier 'let' must not be in expression position in strict mode (1:21) +> 1 | export default ((let)[0] = 1); + | ^ +Cause: [1:20-1:21]: The identifier 'let' must not be in expression position in strict mode" +`; diff --git a/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f4b45b707e0f..000000000000 --- a/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,115 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Assigning to rvalue (1:1) -> 1 | ({}) = x; - | ^" -`; - -exports[`snippet: #0 [acorn] format 2`] = ` -"The keyword 'let' is reserved (1:1) -> 1 | let?.()[a] =1 - | ^" -`; - -exports[`snippet: #0 [acorn] format 3`] = ` -"The keyword 'let' is reserved (1:21) -> 1 | class Foo extends ((let)[0] = 1) {} - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | ({}) = x; - | ^" -`; - -exports[`snippet: #0 [babel] format 2`] = ` -"Invalid left-hand side in assignment expression. (1:1) -> 1 | let?.()[a] =1 - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 1`] = ` -"Invalid parenthesized assignment pattern. (1:1) -> 1 | ({}) = x; - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 2`] = ` -"Invalid left-hand side in assignment expression. (1:1) -> 1 | let?.()[a] =1 - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Assigning to rvalue (1:1) -> 1 | ({}) = x; - | ^" -`; - -exports[`snippet: #0 [espree] format 2`] = ` -"The keyword 'let' is reserved (1:1) -> 1 | let?.()[a] =1 - | ^" -`; - -exports[`snippet: #0 [espree] format 3`] = ` -"The keyword 'let' is reserved (1:21) -> 1 | class Foo extends ((let)[0] = 1) {} - | ^" -`; - -exports[`snippet: #0 [espree] format 4`] = ` -"The keyword 'let' is reserved (1:18) -> 1 | export default ((let)[0] = 1); - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Invalid left-hand side in assignment (1:6) -> 1 | ({}) = x; - | ^" -`; - -exports[`snippet: #0 [meriyah] format 2`] = ` -"The identifier 'let' must not be in expression position in strict mode (1:24) -> 1 | class Foo extends ((let)[0] = 1) {} - | ^" -`; - -exports[`snippet: #0 [meriyah] format 3`] = ` -"The identifier 'let' must not be in expression position in strict mode (1:21) -> 1 | export default ((let)[0] = 1); - | ^" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"The keyword 'let' is reserved (1:1) -> 1 | let?.[a] = 1 - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"Invalid left-hand side in assignment expression. (1:1) -> 1 | let?.[a] = 1 - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 1`] = ` -"Invalid left-hand side in assignment expression. (1:1) -> 1 | let?.[a] = 1 - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"The keyword 'let' is reserved (1:1) -> 1 | let?.[a] = 1 - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:5) -> 1 | let?.[a] = 1 - | ^" -`; diff --git a/tests/format/misc/errors/js/assignment/format.test.js b/tests/format/misc/errors/js/assignment/format.test.js new file mode 100644 index 000000000000..597cf00369d7 --- /dev/null +++ b/tests/format/misc/errors/js/assignment/format.test.js @@ -0,0 +1,23 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["({}) = x;"], + }, + ["babel", "babel-ts", "acorn", "espree", "meriyah"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: ["class Foo extends ((let)[0] = 1) {}"], + }, + ["acorn", "espree", "meriyah"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: ["export default ((let)[0] = 1);"], + }, + ["espree", "meriyah"], +); diff --git a/tests/format/misc/errors/js/assignment/jsfmt.spec.js b/tests/format/misc/errors/js/assignment/jsfmt.spec.js deleted file mode 100644 index 29f1195c4852..000000000000 --- a/tests/format/misc/errors/js/assignment/jsfmt.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: ["({}) = x;", "let?.[a] = 1"], - }, - ["babel", "babel-ts", "acorn", "espree", "meriyah"] -); - -run_spec( - { - dirname: __dirname, - snippets: ["let?.()[a] =1"], - }, - ["babel", "babel-ts", "acorn", "espree"] -); - -run_spec( - { - dirname: __dirname, - snippets: ["class Foo extends ((let)[0] = 1) {}"], - }, - ["acorn", "espree", "meriyah"] -); - -run_spec( - { - dirname: __dirname, - snippets: ["export default ((let)[0] = 1);"], - }, - ["espree", "meriyah"] -); diff --git a/tests/format/misc/errors/js/async-await/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/async-await/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..442081ec47c5 --- /dev/null +++ b/tests/format/misc/errors/js/async-await/__snapshots__/format.test.js.snap @@ -0,0 +1,344 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`snippet: #0 [acorn] format 1`] = ` +"Unexpected token (2:26) + 1 | async function foo() { +> 2 | function bar(x = await 2) {} + | ^ + 3 | } +Cause: Unexpected token (2:25)" +`; + +exports[`snippet: #0 [acorn] format 2`] = ` +"Await expression cannot be a default value (1:12) +> 1 | async (x = await (2)) => {}; + | ^ +Cause: Await expression cannot be a default value (1:11)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"'await' is only allowed within async functions and at the top levels of modules. (2:20) + 1 | async function foo() { +> 2 | function bar(x = await 2) {} + | ^ + 3 | } +Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:19)" +`; + +exports[`snippet: #0 [babel] format 2`] = ` +"'await' is not allowed in async function parameters. (1:12) +> 1 | async (x = await (2)) => {}; + | ^ +Cause: 'await' is not allowed in async function parameters. (1:11)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"Cannot use keyword 'await' outside an async function (2:20) + 1 | async function foo() { +> 2 | function bar(x = await 2) {} + | ^ + 3 | } +Cause: Cannot use keyword 'await' outside an async function" +`; + +exports[`snippet: #0 [espree] format 2`] = ` +"Await expression cannot be a default value (1:12) +> 1 | async (x = await (2)) => {}; + | ^ +Cause: Await expression cannot be a default value" +`; + +exports[`snippet: #0 [flow] format 1`] = ` +"Unexpected number, expected the token \`,\` (2:26) + 1 | async function foo() { +> 2 | function bar(x = await 2) {} + | ^ + 3 | }" +`; + +exports[`snippet: #0 [flow] format 2`] = ` +"\`await\` is not allowed in async function parameters. (1:12) +> 1 | async (x = await (2)) => {}; + | ^^^^^" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Await expression not allowed in formal parameter (2:20) + 1 | async function foo() { +> 2 | function bar(x = await 2) {} + | ^^^^^ + 3 | } +Cause: [2:19-2:24]: Await expression not allowed in formal parameter" +`; + +exports[`snippet: #1 [acorn] format 1`] = ` +"Await expression cannot be a default value (1:12) +> 1 | async (x = await 2) => {}; + | ^ +Cause: Await expression cannot be a default value (1:11)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"'await' is not allowed in async function parameters. (1:12) +> 1 | async (x = await 2) => {}; + | ^ +Cause: 'await' is not allowed in async function parameters. (1:11)" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"Await expression cannot be a default value (1:12) +> 1 | async (x = await 2) => {}; + | ^ +Cause: Await expression cannot be a default value" +`; + +exports[`snippet: #1 [flow] format 1`] = ` +"\`await\` is not allowed in async function parameters. (1:12) +> 1 | async (x = await 2) => {}; + | ^^^^^" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Await expression not allowed in formal parameter (1:21) +> 1 | async (x = await 2) => {}; + | ^^ +Cause: [1:20-1:22]: Await expression not allowed in formal parameter" +`; + +exports[`snippet: #2 [acorn] format 1`] = ` +"Unexpected token (1:25) +> 1 | f = async (a) => await a! ** 6; + | ^ +Cause: Unexpected token (1:24)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token (1:27) +> 1 | f = async (a) => await a! ** 6; + | ^ +Cause: Unexpected token (1:26)" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"Unexpected token ! (1:25) +> 1 | f = async (a) => await a! ** 6; + | ^ +Cause: Unexpected token !" +`; + +exports[`snippet: #2 [flow] format 1`] = ` +"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:25) +> 1 | f = async (a) => await a! ** 6; + | ^" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Unexpected token: '!' (1:25) +> 1 | f = async (a) => await a! ** 6; + | ^ +Cause: [1:24-1:25]: Unexpected token: '!'" +`; + +exports[`snippet: #3 [acorn] format 1`] = ` +"Unexpected token (1:14) +> 1 | f = (a) => +a! ** 6; + | ^ +Cause: Unexpected token (1:13)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token (1:16) +> 1 | f = (a) => +a! ** 6; + | ^ +Cause: Unexpected token (1:15)" +`; + +exports[`snippet: #3 [espree] format 1`] = ` +"Unexpected token ! (1:14) +> 1 | f = (a) => +a! ** 6; + | ^ +Cause: Unexpected token !" +`; + +exports[`snippet: #3 [flow] format 1`] = ` +"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:14) +> 1 | f = (a) => +a! ** 6; + | ^" +`; + +exports[`snippet: #3 [meriyah] format 1`] = ` +"Unexpected token: '!' (1:14) +> 1 | f = (a) => +a! ** 6; + | ^ +Cause: [1:13-1:14]: Unexpected token: '!'" +`; + +exports[`snippet: #4 [acorn] format 1`] = ` +"Unexpected token (1:22) +> 1 | async (a) => (await a!) ** 6; + | ^ +Cause: Unexpected token (1:21)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | async (a) => (await a!) ** 6; + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #4 [espree] format 1`] = ` +"Unexpected token ! (1:22) +> 1 | async (a) => (await a!) ** 6; + | ^ +Cause: Unexpected token !" +`; + +exports[`snippet: #4 [flow] format 1`] = ` +"Unexpected token \`!\`, expected the token \`)\` (1:22) +> 1 | async (a) => (await a!) ** 6; + | ^" +`; + +exports[`snippet: #4 [meriyah] format 1`] = ` +"Expected ')' (1:22) +> 1 | async (a) => (await a!) ** 6; + | ^ +Cause: [1:21-1:22]: Expected ')'" +`; + +exports[`snippet: #5 [acorn] format 1`] = ` +"Unexpected token (1:6) +> 1 | (-+5 ** 6); + | ^ +Cause: Unexpected token (1:5)" +`; + +exports[`snippet: #5 [babel] format 1`] = ` +"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:3) +> 1 | (-+5 ** 6); + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" +`; + +exports[`snippet: #5 [espree] format 1`] = ` +"Unexpected token ** (1:6) +> 1 | (-+5 ** 6); + | ^ +Cause: Unexpected token **" +`; + +exports[`snippet: #5 [flow] format 1`] = ` +"Invalid left-hand side in exponentiation expression (1:2) +> 1 | (-+5 ** 6); + | ^^^" +`; + +exports[`snippet: #5 [meriyah] format 1`] = ` +"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:6) +> 1 | (-+5 ** 6); + | ^^ +Cause: [1:5-1:7]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" +`; + +exports[`snippet: #6 [acorn] format 1`] = ` +"Unexpected token (1:25) +> 1 | f = async () => await 5 ** 6; + | ^ +Cause: Unexpected token (1:24)" +`; + +exports[`snippet: #6 [babel] format 1`] = ` +"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) +> 1 | f = async () => await 5 ** 6; + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)" +`; + +exports[`snippet: #6 [espree] format 1`] = ` +"Unexpected token ** (1:25) +> 1 | f = async () => await 5 ** 6; + | ^ +Cause: Unexpected token **" +`; + +exports[`snippet: #6 [flow] format 1`] = ` +"Invalid left-hand side in exponentiation expression (1:17) +> 1 | f = async () => await 5 ** 6; + | ^^^^^^^" +`; + +exports[`snippet: #6 [meriyah] format 1`] = ` +"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:25) +> 1 | f = async () => await 5 ** 6; + | ^^ +Cause: [1:24-1:26]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" +`; + +exports[`snippet: #7 [acorn] format 1`] = ` +"Unexpected token (1:26) +> 1 | f = async () => await -5 ** 6; + | ^ +Cause: Unexpected token (1:25)" +`; + +exports[`snippet: #7 [babel] format 1`] = ` +"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) +> 1 | f = async () => await -5 ** 6; + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)" +`; + +exports[`snippet: #7 [espree] format 1`] = ` +"Unexpected token ** (1:26) +> 1 | f = async () => await -5 ** 6; + | ^ +Cause: Unexpected token **" +`; + +exports[`snippet: #7 [flow] format 1`] = ` +"Invalid left-hand side in exponentiation expression (1:17) +> 1 | f = async () => await -5 ** 6; + | ^^^^^^^^" +`; + +exports[`snippet: #7 [meriyah] format 1`] = ` +"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:26) +> 1 | f = async () => await -5 ** 6; + | ^^ +Cause: [1:25-1:27]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" +`; + +exports[`snippet: #8 [acorn] format 1`] = ` +"Shorthand property assignments are valid only in destructuring patterns (1:15) +> 1 | async({ foo33 = 1 }); + | ^ +Cause: Shorthand property assignments are valid only in destructuring patterns (1:14)" +`; + +exports[`snippet: #8 [babel] format 1`] = ` +"Invalid shorthand property initializer. (1:15) +> 1 | async({ foo33 = 1 }); + | ^ +Cause: Invalid shorthand property initializer. (1:14)" +`; + +exports[`snippet: #8 [espree] format 1`] = ` +"Shorthand property assignments are valid only in destructuring patterns (1:15) +> 1 | async({ foo33 = 1 }); + | ^ +Cause: Shorthand property assignments are valid only in destructuring patterns" +`; + +exports[`snippet: #8 [flow] format 1`] = ` +"Unexpected token \`=\` (1:15) +> 1 | async({ foo33 = 1 }); + | ^" +`; + +exports[`snippet: #8 [meriyah] format 1`] = ` +"Invalid shorthand property initializer (1:21) +> 1 | async({ foo33 = 1 }); + | ^ +Cause: [1:20-1:21]: Invalid shorthand property initializer" +`; diff --git a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0d7e1c3bbf88..000000000000 --- a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Unexpected token (2:26) - 1 | async function foo() { -> 2 | function bar(x = await 2) {} - | ^ - 3 | }" -`; - -exports[`snippet: #0 [acorn] format 2`] = ` -"Await expression cannot be a default value (1:12) -> 1 | async (x = await (2)) => {}; - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"'await' is only allowed within async functions and at the top levels of modules. (2:20) - 1 | async function foo() { -> 2 | function bar(x = await 2) {} - | ^ - 3 | }" -`; - -exports[`snippet: #0 [babel] format 2`] = ` -"'await' is not allowed in async function parameters. (1:12) -> 1 | async (x = await (2)) => {}; - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Cannot use keyword 'await' outside an async function (2:20) - 1 | async function foo() { -> 2 | function bar(x = await 2) {} - | ^ - 3 | }" -`; - -exports[`snippet: #0 [espree] format 2`] = ` -"Await expression cannot be a default value (1:12) -> 1 | async (x = await (2)) => {}; - | ^" -`; - -exports[`snippet: #0 [flow] format 1`] = ` -"Unexpected number, expected the token \`,\` (2:26) - 1 | async function foo() { -> 2 | function bar(x = await 2) {} - | ^ - 3 | }" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Await is only valid in async functions (2:24) - 1 | async function foo() { -> 2 | function bar(x = await 2) {} - | ^ - 3 | }" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"Await expression cannot be a default value (1:12) -> 1 | async (x = await 2) => {}; - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"'await' is not allowed in async function parameters. (1:12) -> 1 | async (x = await 2) => {}; - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"Await expression cannot be a default value (1:12) -> 1 | async (x = await 2) => {}; - | ^" -`; - -exports[`snippet: #1 [flow] format 1`] = ` -"Unexpected number, expected the token \`,\` (1:18) -> 1 | async (x = await 2) => {}; - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Await expression not allowed in formal parameter (1:22) -> 1 | async (x = await 2) => {}; - | ^" -`; - -exports[`snippet: #2 [acorn] format 1`] = ` -"Unexpected token (1:25) -> 1 | f = async (a) => await a! ** 6; - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Unexpected token (1:27) -> 1 | f = async (a) => await a! ** 6; - | ^" -`; - -exports[`snippet: #2 [espree] format 1`] = ` -"Unexpected token ! (1:25) -> 1 | f = async (a) => await a! ** 6; - | ^" -`; - -exports[`snippet: #2 [flow] format 1`] = ` -"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:25) -> 1 | f = async (a) => await a! ** 6; - | ^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"Unexpected token: '!' (1:25) -> 1 | f = async (a) => await a! ** 6; - | ^" -`; - -exports[`snippet: #3 [acorn] format 1`] = ` -"Unexpected token (1:14) -> 1 | f = (a) => +a! ** 6; - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Unexpected token (1:16) -> 1 | f = (a) => +a! ** 6; - | ^" -`; - -exports[`snippet: #3 [espree] format 1`] = ` -"Unexpected token ! (1:14) -> 1 | f = (a) => +a! ** 6; - | ^" -`; - -exports[`snippet: #3 [flow] format 1`] = ` -"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:14) -> 1 | f = (a) => +a! ** 6; - | ^" -`; - -exports[`snippet: #3 [meriyah] format 1`] = ` -"Unexpected token: '!' (1:14) -> 1 | f = (a) => +a! ** 6; - | ^" -`; - -exports[`snippet: #4 [acorn] format 1`] = ` -"Unexpected token (1:22) -> 1 | async (a) => (await a!) ** 6; - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Unexpected token, expected "," (1:22) -> 1 | async (a) => (await a!) ** 6; - | ^" -`; - -exports[`snippet: #4 [espree] format 1`] = ` -"Unexpected token ! (1:22) -> 1 | async (a) => (await a!) ** 6; - | ^" -`; - -exports[`snippet: #4 [flow] format 1`] = ` -"Unexpected token \`!\`, expected the token \`)\` (1:22) -> 1 | async (a) => (await a!) ** 6; - | ^" -`; - -exports[`snippet: #4 [meriyah] format 1`] = ` -"Expected ')' (1:22) -> 1 | async (a) => (await a!) ** 6; - | ^" -`; - -exports[`snippet: #5 [acorn] format 1`] = ` -"Unexpected token (1:6) -> 1 | (-+5 ** 6); - | ^" -`; - -exports[`snippet: #5 [babel] format 1`] = ` -"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:3) -> 1 | (-+5 ** 6); - | ^" -`; - -exports[`snippet: #5 [espree] format 1`] = ` -"Unexpected token ** (1:6) -> 1 | (-+5 ** 6); - | ^" -`; - -exports[`snippet: #5 [flow] format 1`] = ` -"Invalid left-hand side in exponentiation expression (1:2) -> 1 | (-+5 ** 6); - | ^^^" -`; - -exports[`snippet: #5 [meriyah] format 1`] = ` -"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:7) -> 1 | (-+5 ** 6); - | ^" -`; - -exports[`snippet: #6 [acorn] format 1`] = ` -"Unexpected token (1:25) -> 1 | f = async () => await 5 ** 6; - | ^" -`; - -exports[`snippet: #6 [babel] format 1`] = ` -"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) -> 1 | f = async () => await 5 ** 6; - | ^" -`; - -exports[`snippet: #6 [espree] format 1`] = ` -"Unexpected token ** (1:25) -> 1 | f = async () => await 5 ** 6; - | ^" -`; - -exports[`snippet: #6 [flow] format 1`] = ` -"Invalid left-hand side in exponentiation expression (1:17) -> 1 | f = async () => await 5 ** 6; - | ^^^^^^^" -`; - -exports[`snippet: #6 [meriyah] format 1`] = ` -"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:26) -> 1 | f = async () => await 5 ** 6; - | ^" -`; - -exports[`snippet: #7 [acorn] format 1`] = ` -"Unexpected token (1:26) -> 1 | f = async () => await -5 ** 6; - | ^" -`; - -exports[`snippet: #7 [babel] format 1`] = ` -"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) -> 1 | f = async () => await -5 ** 6; - | ^" -`; - -exports[`snippet: #7 [espree] format 1`] = ` -"Unexpected token ** (1:26) -> 1 | f = async () => await -5 ** 6; - | ^" -`; - -exports[`snippet: #7 [flow] format 1`] = ` -"Invalid left-hand side in exponentiation expression (1:17) -> 1 | f = async () => await -5 ** 6; - | ^^^^^^^^" -`; - -exports[`snippet: #7 [meriyah] format 1`] = ` -"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:27) -> 1 | f = async () => await -5 ** 6; - | ^" -`; - -exports[`snippet: #8 [acorn] format 1`] = ` -"Shorthand property assignments are valid only in destructuring patterns (1:15) -> 1 | async({ foo33 = 1 }); - | ^" -`; - -exports[`snippet: #8 [babel] format 1`] = ` -"Invalid shorthand property initializer. (1:15) -> 1 | async({ foo33 = 1 }); - | ^" -`; - -exports[`snippet: #8 [espree] format 1`] = ` -"Shorthand property assignments are valid only in destructuring patterns (1:15) -> 1 | async({ foo33 = 1 }); - | ^" -`; - -exports[`snippet: #8 [flow] format 1`] = ` -"Unexpected token \`=\` (1:15) -> 1 | async({ foo33 = 1 }); - | ^" -`; - -exports[`snippet: #8 [meriyah] format 1`] = ` -"Invalid shorthand property initializer (1:21) -> 1 | async({ foo33 = 1 }); - | ^" -`; diff --git a/tests/format/misc/errors/js/async-await/format.test.js b/tests/format/misc/errors/js/async-await/format.test.js new file mode 100644 index 000000000000..36a6f674b5cf --- /dev/null +++ b/tests/format/misc/errors/js/async-await/format.test.js @@ -0,0 +1,34 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + outdent` + async function foo() { + function bar(x = await 2) {} + } + `, + "async (x = await 2) => {};", + "f = async (a) => await a! ** 6;", + "f = (a) => +a! ** 6;", + "async (a) => (await a!) ** 6;", + "(-+5 ** 6);", + "f = async () => await 5 ** 6;", + "f = async () => await -5 ** 6;", + "async({ foo33 = 1 });", + ], + }, + ["babel", "acorn", "espree", "meriyah", "flow"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // `meriyah` didn't throw + "async (x = await (2)) => {};", + ], + }, + ["babel", "acorn", "espree", "flow"], +); diff --git a/tests/format/misc/errors/js/async-await/jsfmt.spec.js b/tests/format/misc/errors/js/async-await/jsfmt.spec.js deleted file mode 100644 index 7436277ad860..000000000000 --- a/tests/format/misc/errors/js/async-await/jsfmt.spec.js +++ /dev/null @@ -1,34 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - outdent` - async function foo() { - function bar(x = await 2) {} - } - `, - "async (x = await 2) => {};", - "f = async (a) => await a! ** 6;", - "f = (a) => +a! ** 6;", - "async (a) => (await a!) ** 6;", - "(-+5 ** 6);", - "f = async () => await 5 ** 6;", - "f = async () => await -5 ** 6;", - "async({ foo33 = 1 });", - ], - }, - ["babel", "acorn", "espree", "meriyah", "flow"] -); - -run_spec( - { - dirname: __dirname, - snippets: [ - // `flow` and `meriyah` didn't throw - "async (x = await (2)) => {};", - ], - }, - ["babel", "acorn", "espree"] -); diff --git a/tests/format/misc/errors/js/decorators/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/decorators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..00d8b7ce4ce8 --- /dev/null +++ b/tests/format/misc/errors/js/decorators/__snapshots__/format.test.js.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel] format 1`] = ` +"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:8) + 1 | @decorator1 +> 2 | export @decorator2 class A{} + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:7)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:16) + 1 | @decorator1 +> 2 | export default @decorator2 class A{} + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:15)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:20) +> 1 | @decorator1 export @decorator2 class A {} + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:19)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:28) +> 1 | @decorator1 export default @decorator2 class A {} + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:27)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Leading decorators must be attached to a class declaration. (1:20) +> 1 | export @decorator2 default class A {} + | ^ +Cause: Leading decorators must be attached to a class declaration. (1:19)" +`; diff --git a/tests/format/misc/errors/js/decorators/format.test.js b/tests/format/misc/errors/js/decorators/format.test.js new file mode 100644 index 000000000000..c4e5be63af2e --- /dev/null +++ b/tests/format/misc/errors/js/decorators/format.test.js @@ -0,0 +1,21 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + outdent` + @decorator1 + export @decorator2 class A{} + `, + outdent` + @decorator1 + export default @decorator2 class A{} + `, + "@decorator1 export @decorator2 class A {}", + "@decorator1 export default @decorator2 class A {}", + "export @decorator2 default class A {}", + ], + }, + ["babel"], +); diff --git a/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..962fe84dbab5 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/format.test.js.snap @@ -0,0 +1,102 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = ` +"Unexpected token, expected ")" (1:24) +> 1 | for await (using of of of); + | ^ + 2 | +Cause: Unexpected token, expected ")" (1:23)" +`; + +exports[`invalid-for-await-using-binding-of-of.js [flow] format 1`] = ` +"Unexpected token \`await\`, expected the token \`(\` (1:5) +> 1 | for await (using of of of); + | ^^^^^ + 2 |" +`; + +exports[`invalid-for-using-binding-in.js [babel] format 1`] = ` +"For-in loop may not start with 'using' declaration. (1:6) +> 1 | for (using foo in {}); + | ^ + 2 | +Cause: For-in loop may not start with 'using' declaration. (1:5)" +`; + +exports[`invalid-for-using-binding-in.js [flow] format 1`] = ` +"Unexpected identifier, expected the token \`;\` (1:12) +> 1 | for (using foo in {}); + | ^^^ + 2 |" +`; + +exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = ` +"Unexpected token (1:15) +> 1 | for (using of in []); + | ^ + 2 | +Cause: Unexpected token (1:14)" +`; + +exports[`invalid-for-using-binding-of-in.js [flow] format 1`] = ` +"Unexpected token \`in\` (1:15) +> 1 | for (using of in []); + | ^^ + 2 |" +`; + +exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = ` +"Unexpected token, expected ")" (1:18) +> 1 | for (using of of of); + | ^ + 2 | +Cause: Unexpected token, expected ")" (1:17)" +`; + +exports[`invalid-for-using-binding-of-of.js [flow] format 1`] = ` +"Unexpected token \`of\`, expected the token \`)\` (1:18) +> 1 | for (using of of of); + | ^^ + 2 |" +`; + +exports[`invalid-using-binding-let.js [babel] format 1`] = ` +"'let' is disallowed as a lexically bound name. (2:9) + 1 | { +> 2 | using let = h(); + | ^ + 3 | } + 4 | +Cause: 'let' is disallowed as a lexically bound name. (2:8)" +`; + +exports[`invalid-using-binding-let.js [flow] format 1`] = ` +"Unexpected token \`let\`, expected the end of an expression statement (\`;\`) (2:9) + 1 | { +> 2 | using let = h(); + | ^^^ + 3 | } + 4 |" +`; + +exports[`invalid-using-binding-pattern.js [babel] format 1`] = ` +"Unexpected token, expected ")" (4:25) + 2 | using { foo } = f(); + 3 | using [ bar ] = g(); +> 4 | for (using { qux } of h()); + | ^ + 5 | for (using [ quux ] of i()); + 6 | } + 7 | +Cause: Unexpected token, expected ")" (4:24)" +`; + +exports[`invalid-using-binding-pattern.js [flow] format 1`] = ` +"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (2:9) + 1 | { +> 2 | using { foo } = f(); + | ^ + 3 | using [ bar ] = g(); + 4 | for (using { qux } of h()); + 5 | for (using [ quux ] of i());" +`; diff --git a/tests/format/misc/errors/js/explicit-resource-management/format.test.js b/tests/format/misc/errors/js/explicit-resource-management/format.test.js new file mode 100644 index 000000000000..cc9aa321310a --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, [ + "babel", + "flow", + // Waiting https://github.com/typescript-eslint/typescript-eslint/issues/7555 and https://github.com/typescript-eslint/typescript-eslint/issues/7554 + // "typescript" +]); diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-for-await-using-binding-of-of.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-await-using-binding-of-of.js new file mode 100644 index 000000000000..215d13819232 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-await-using-binding-of-of.js @@ -0,0 +1 @@ +for await (using of of of); diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-in.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-in.js new file mode 100644 index 000000000000..0676e7bf0436 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-in.js @@ -0,0 +1 @@ +for (using foo in {}); diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-in.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-in.js new file mode 100644 index 000000000000..28f239c385de --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-in.js @@ -0,0 +1 @@ +for (using of in []); diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-of.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-of.js new file mode 100644 index 000000000000..4795b33654a1 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-of-of.js @@ -0,0 +1 @@ +for (using of of of); diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-let.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-let.js new file mode 100644 index 000000000000..c0d1a8f2d474 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-let.js @@ -0,0 +1,3 @@ +{ + using let = h(); +} diff --git a/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-pattern.js b/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-pattern.js new file mode 100644 index 000000000000..2a0678a9ce82 --- /dev/null +++ b/tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-pattern.js @@ -0,0 +1,6 @@ +{ + using { foo } = f(); + using [ bar ] = g(); + for (using { qux } of h()); + for (using [ quux ] of i()); +} diff --git a/tests/format/misc/errors/js/export-default-from/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/export-default-from/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b698282721ea --- /dev/null +++ b/tests/format/misc/errors/js/export-default-from/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel] format 1`] = ` +"Unexpected token (1:9) +> 1 | export *, {} from "foo"; + | ^ +Cause: Unexpected token (1:8)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Unexpected token, expected "from" (1:21) +> 1 | export * as foo, {} from "foo"; + | ^ +Cause: Unexpected token, expected "from" (1:20)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token (1:9) +> 1 | export *, {bar} from "foo"; + | ^ +Cause: Unexpected token (1:8)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token, expected "from" (1:24) +> 1 | export * as foo, {bar} from "foo"; + | ^ +Cause: Unexpected token, expected "from" (1:23)" +`; diff --git a/tests/format/misc/errors/js/export-default-from/format.test.js b/tests/format/misc/errors/js/export-default-from/format.test.js new file mode 100644 index 000000000000..df42f97bfbbf --- /dev/null +++ b/tests/format/misc/errors/js/export-default-from/format.test.js @@ -0,0 +1,12 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + 'export *, {} from "foo";', + 'export * as foo, {} from "foo";', + 'export *, {bar} from "foo";', + 'export * as foo, {bar} from "foo";', + ], + }, + ["babel"], +); diff --git a/tests/format/misc/errors/js/for-of/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/for-of/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..edcd74c7feec --- /dev/null +++ b/tests/format/misc/errors/js/for-of/__snapshots__/format.test.js.snap @@ -0,0 +1,186 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"Unexpected token (1:15) +> 1 | for (async of []); + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let.foo of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #0 [babel] format 2`] = ` +"The left-hand side of a for-of loop may not be 'async'. (1:6) +> 1 | for (async of []); + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" +`; + +exports[`snippet: #0 [babel-flow] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let.foo of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #0 [babel-flow] format 2`] = ` +"The left-hand side of a for-of loop may not be 'async'. (1:6) +> 1 | for (async of []); + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" +`; + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let.foo of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #0 [babel-ts] format 2`] = ` +"The left-hand side of a for-of loop may not be 'async'. (1:6) +> 1 | for (async of []); + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"The keyword 'let' is reserved (1:6) +> 1 | for (let.foo of []); + | ^ +Cause: The keyword 'let' is reserved" +`; + +exports[`snippet: #0 [espree] format 2`] = ` +"Unexpected token [ (1:15) +> 1 | for (async of []); + | ^ +Cause: Unexpected token [" +`; + +exports[`snippet: #0 [flow] format 1`] = ` +"Unexpected token \`.\`, expected an identifier (1:9) +> 1 | for (let.foo of []); + | ^" +`; + +exports[`snippet: #0 [flow] format 2`] = ` +"Invalid left-hand side in for-of (1:6) +> 1 | for (async of []); + | ^^^^^" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) +> 1 | for (let.foo of []); + | ^ +Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Variable declaration expected. (1:9) +> 1 | for (let.foo of []); + | ^ +Cause: Variable declaration expected." +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let().bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #1 [babel-flow] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let().bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let().bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"The keyword 'let' is reserved (1:6) +> 1 | for (let().bar of []); + | ^ +Cause: The keyword 'let' is reserved" +`; + +exports[`snippet: #1 [flow] format 1`] = ` +"Unexpected token \`(\`, expected an identifier (1:9) +> 1 | for (let().bar of []); + | ^" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) +> 1 | for (let().bar of []); + | ^ +Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Variable declaration expected. (1:9) +> 1 | for (let().bar of []); + | ^ +Cause: Variable declaration expected." +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let\`\`.bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #2 [babel-flow] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let\`\`.bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"The left-hand side of a for-of loop may not start with 'let'. (1:6) +> 1 | for (let\`\`.bar of []); + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"The keyword 'let' is reserved (1:6) +> 1 | for (let\`\`.bar of []); + | ^ +Cause: The keyword 'let' is reserved" +`; + +exports[`snippet: #2 [flow] format 1`] = ` +"Unexpected template literal part, expected an identifier (1:9) +> 1 | for (let\`\`.bar of []); + | ^^" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) +> 1 | for (let\`\`.bar of []); + | ^^ +Cause: [1:8-1:10]: Identifier "let" disallowed as left-hand side expression in strict mode" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Variable declaration expected. (1:9) +> 1 | for (let\`\`.bar of []); + | ^ +Cause: Variable declaration expected." +`; diff --git a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3f0e1d752122..000000000000 --- a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,139 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Unexpected token (1:15) -> 1 | for (async of []); - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #0 [babel] format 2`] = ` -"The left-hand side of a for-of loop may not be 'async'. (1:6) -> 1 | for (async of []); - | ^" -`; - -exports[`snippet: #0 [babel-flow] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #0 [babel-flow] format 2`] = ` -"The left-hand side of a for-of loop may not be 'async'. (1:6) -> 1 | for (async of []); - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 2`] = ` -"The left-hand side of a for-of loop may not be 'async'. (1:6) -> 1 | for (async of []); - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Unexpected token [ (1:15) -> 1 | for (async of []); - | ^" -`; - -exports[`snippet: #0 [flow] format 1`] = ` -"Unexpected token \`.\`, expected an identifier (1:9) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #0 [typescript] format 1`] = ` -"Variable declaration expected. (1:9) -> 1 | for (let.foo of []); - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #1 [babel-flow] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #1 [flow] format 1`] = ` -"Unexpected token \`(\`, expected an identifier (1:9) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #1 [typescript] format 1`] = ` -"Variable declaration expected. (1:9) -> 1 | for (let().bar of []); - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let\`\`.bar of []); - | ^" -`; - -exports[`snippet: #2 [babel-flow] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let\`\`.bar of []); - | ^" -`; - -exports[`snippet: #2 [babel-ts] format 1`] = ` -"The left-hand side of a for-of loop may not start with 'let'. (1:6) -> 1 | for (let\`\`.bar of []); - | ^" -`; - -exports[`snippet: #2 [flow] format 1`] = ` -"Unexpected template literal part, expected an identifier (1:9) -> 1 | for (let\`\`.bar of []); - | ^^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"Identifier "let" disallowed as left-hand side expression in strict mode (1:10) -> 1 | for (let\`\`.bar of []); - | ^" -`; - -exports[`snippet: #2 [typescript] format 1`] = ` -"Variable declaration expected. (1:9) -> 1 | for (let\`\`.bar of []); - | ^" -`; diff --git a/tests/format/misc/errors/js/for-of/format.test.js b/tests/format/misc/errors/js/for-of/format.test.js new file mode 100644 index 000000000000..e7bef7dfdb4f --- /dev/null +++ b/tests/format/misc/errors/js/for-of/format.test.js @@ -0,0 +1,38 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "for (let.foo of []);", + "for (let().bar of []);", + "for (let``.bar of []);", + ], + }, + [ + "babel", + "espree", + "meriyah", + "flow", + "typescript", + "babel-flow", + "babel-ts", + ], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: ["for (async of []);"], + }, + [ + "babel", + "acorn", + "espree", + // `meriyah` didn't throw https://github.com/meriyah/meriyah/issues/190 + // "meriyah", + "flow", + // `typescript` didn't throw + // "typescript", + "babel-flow", + "babel-ts", + ], +); diff --git a/tests/format/misc/errors/js/for-of/jsfmt.spec.js b/tests/format/misc/errors/js/for-of/jsfmt.spec.js deleted file mode 100644 index 5e2e814a40ea..000000000000 --- a/tests/format/misc/errors/js/for-of/jsfmt.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "for (let.foo of []);", - "for (let().bar of []);", - "for (let``.bar of []);", - ], - }, - [ - "babel", - // `espree` didn't throw https://github.com/acornjs/acorn/issues/1009 - // "espree", - "meriyah", - "flow", - "typescript", - "babel-flow", - "babel-ts", - ] -); - -run_spec( - { - dirname: __dirname, - snippets: ["for (async of []);"], - }, - [ - "babel", - "acorn", - "espree", - // `meriyah` didn't throw https://github.com/meriyah/meriyah/issues/190 - // "meriyah", - // `flow` didn't throw https://github.com/facebook/flow/issues/8651 - // "flow", - // `typescript` didn't throw - // "typescript", - "babel-flow", - "babel-ts", - ] -); diff --git a/tests/format/misc/errors/js/format.test.js b/tests/format/misc/errors/js/format.test.js new file mode 100644 index 000000000000..37c98fd8f0de --- /dev/null +++ b/tests/format/misc/errors/js/format.test.js @@ -0,0 +1,50 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // v8intrinsic + "::%DebugPrint(null)", + "a.%DebugPrint();", + "const i = %DebugPrint;", + + // partialApplication + // https://babeljs.io/docs/babel-plugin-proposal-partial-application#invalid-usage + "f(x + ?)", // `?` not in top-level Arguments of call + "x + ?", // `?` not in top-level Arguments of call + "?.f()", // `?` not in top-level Arguments of call + // "new f(?)", // `?` not supported in `new` + // "super(?)", // `?` not supported in |SuperCall| + + // https://github.com/tc39/proposal-private-fields-in-in#try-statement + outdent` + class C { + #brand; + + static isC(obj) { + return try obj.#brand; + } + } + `, + + // Using a record or tuple literal on the `lhs` is a `SyntaxError` + "const #{ a, b } = #{ a: 1, b: 2 };", + "const #[a, b] = #[1, 2];", + // holes + // "const x = #[,];", // Should be error, babel didn't throw + // __proto__ + // "const x = #{ __proto__: foo };", // Should be error, babel didn't throw + + // Don't support `syntaxType: "bar"` + "[| 1 |]", + // "{| a: 1 |}", // babel didn't throw on this + + // Invalid decimal + "0b101011101m;", + "0x16432m;", + "0o16432m;", + ], + }, + ["babel"], +); diff --git a/tests/format/misc/errors/js/hack-pipeline/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/hack-pipeline/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a31d0464647a --- /dev/null +++ b/tests/format/misc/errors/js/hack-pipeline/__snapshots__/format.test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (yield y)} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (yield)} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (await y)} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (a?.b)} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> a?.b} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #5 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (a.b())} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #6 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> a.b()} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #7 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> (a.b?.())} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #8 [babel] format 1`] = ` +"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) +> 1 | async function * a() { a |> foo(%) |> a.b?.()} + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" +`; + +exports[`snippet: #9 [babel] format 1`] = ` +"Hack-style pipe body cannot be an unparenthesized yield expression; please wrap it in parentheses. (1:39) +> 1 | async function * a() { a |> foo(%) |> yield} + | ^ +Cause: Hack-style pipe body cannot be an unparenthesized yield expression; please wrap it in parentheses. (1:38)" +`; + +exports[`v8intrinsic.js [babel] format 1`] = ` +"Topic reference is unbound; it must be inside a pipe body. (1:16) +> 1 | const status = %GetOptimizationStatus(fn) |> console.log(%); + | ^ + 2 | +Cause: Topic reference is unbound; it must be inside a pipe body. (1:15)" +`; diff --git a/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 37a19667f880..000000000000 --- a/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,68 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (yield y)} - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (yield)} - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (await y)} - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (a?.b)} - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> a?.b} - | ^" -`; - -exports[`snippet: #5 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (a.b())} - | ^" -`; - -exports[`snippet: #6 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> a.b()} - | ^" -`; - -exports[`snippet: #7 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> (a.b?.())} - | ^" -`; - -exports[`snippet: #8 [babel] format 1`] = ` -"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) -> 1 | async function * a() { a |> foo(%) |> a.b?.()} - | ^" -`; - -exports[`snippet: #9 [babel] format 1`] = ` -"Hack-style pipe body cannot be an unparenthesized yield expression; please wrap it in parentheses. (1:39) -> 1 | async function * a() { a |> foo(%) |> yield} - | ^" -`; - -exports[`v8intrinsic.js [babel] format 1`] = ` -"Topic reference is unbound; it must be inside a pipe body. (1:16) -> 1 | const status = %GetOptimizationStatus(fn) |> console.log(%); - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/js/hack-pipeline/format.test.js b/tests/format/misc/errors/js/hack-pipeline/format.test.js new file mode 100644 index 000000000000..048505cb47d2 --- /dev/null +++ b/tests/format/misc/errors/js/hack-pipeline/format.test.js @@ -0,0 +1,18 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "(yield y)", + "(yield)", + "(await y)", + "(a?.b)", + "a?.b", + "(a.b())", + "a.b()", + "(a.b?.())", + "a.b?.()", + "yield", + ].map((code) => `async function * a() { a |> foo(%) |> ${code}}`), + }, + ["babel"], +); diff --git a/tests/format/misc/errors/js/hack-pipeline/jsfmt.spec.js b/tests/format/misc/errors/js/hack-pipeline/jsfmt.spec.js deleted file mode 100644 index 2f512c8f28be..000000000000 --- a/tests/format/misc/errors/js/hack-pipeline/jsfmt.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "(yield y)", - "(yield)", - "(await y)", - "(a?.b)", - "a?.b", - "(a.b())", - "a.b()", - "(a.b?.())", - "a.b?.()", - "yield", - ].map((code) => `async function * a() { a |> foo(%) |> ${code}}`), - }, - ["babel"] -); diff --git a/tests/format/misc/errors/js/import-attributes-for-export-without-from.js b/tests/format/misc/errors/js/import-attributes-for-export-without-from.js new file mode 100644 index 000000000000..460c24e86414 --- /dev/null +++ b/tests/format/misc/errors/js/import-attributes-for-export-without-from.js @@ -0,0 +1 @@ +export { default as foo } with { type: "json" }; diff --git a/tests/format/misc/errors/js/import-attributes-with-parens.js b/tests/format/misc/errors/js/import-attributes-with-parens.js new file mode 100644 index 000000000000..74567fa36137 --- /dev/null +++ b/tests/format/misc/errors/js/import-attributes-with-parens.js @@ -0,0 +1 @@ +import "x" with ({type: 'json'}); diff --git a/tests/format/misc/errors/js/import/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/import/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3d9711e513b0 --- /dev/null +++ b/tests/format/misc/errors/js/import/__snapshots__/format.test.js.snap @@ -0,0 +1,165 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel] format 1`] = ` +"Unexpected token (1:8) +> 1 | import(); + | ^ +Cause: Unexpected token (1:7)" +`; + +exports[`snippet: #0 [babel-flow] format 1`] = ` +"Unexpected token (1:8) +> 1 | import(); + | ^ +Cause: Unexpected token (1:7)" +`; + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | import(); + | ^ +Cause: Unexpected token (1:7)" +`; + +exports[`snippet: #0 [flow] format 1`] = ` +"Unexpected token \`)\` (1:8) +> 1 | import(); + | ^" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Unexpected token: ')' (1:8) +> 1 | import(); + | ^ +Cause: [1:7-1:8]: Unexpected token: ')'" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Dynamic import requires exactly one or two arguments. (1:1) +> 1 | import(); + | ^^^^^^^^ +Cause: Dynamic import requires exactly one or two arguments." +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Unexpected token (1:21) +> 1 | import(/* comment */); + | ^ +Cause: Unexpected token (1:20)" +`; + +exports[`snippet: #1 [babel-flow] format 1`] = ` +"Unexpected token (1:21) +> 1 | import(/* comment */); + | ^ +Cause: Unexpected token (1:20)" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Unexpected token (1:21) +> 1 | import(/* comment */); + | ^ +Cause: Unexpected token (1:20)" +`; + +exports[`snippet: #1 [flow] format 1`] = ` +"Unexpected token \`)\` (1:21) +> 1 | import(/* comment */); + | ^" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Unexpected token: ')' (1:21) +> 1 | import(/* comment */); + | ^ +Cause: [1:20-1:21]: Unexpected token: ')'" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Dynamic import requires exactly one or two arguments. (1:1) +> 1 | import(/* comment */); + | ^^^^^^^^^^^^^^^^^^^^^ +Cause: Dynamic import requires exactly one or two arguments." +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Cannot use new with import(...). (1:5) +> 1 | new import('./a.mjs'); + | ^ +Cause: Cannot use new with import(...). (1:4)" +`; + +exports[`snippet: #2 [babel-flow] format 1`] = ` +"Cannot use new with import(...). (1:5) +> 1 | new import('./a.mjs'); + | ^ +Cause: Cannot use new with import(...). (1:4)" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Cannot use new with import(...). (1:5) +> 1 | new import('./a.mjs'); + | ^ +Cause: Cannot use new with import(...). (1:4)" +`; + +exports[`snippet: #2 [flow] format 1`] = ` +"Unexpected token \`import\` (1:5) +> 1 | new import('./a.mjs'); + | ^^^^^^" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Cannot use new with import(...) (1:11) +> 1 | new import('./a.mjs'); + | ^ +Cause: [1:10-1:11]: Cannot use new with import(...)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Expression expected. (1:5) +> 1 | new import('./a.mjs'); + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token (1:12) +> 1 | new import(); + | ^ +Cause: Unexpected token (1:11)" +`; + +exports[`snippet: #3 [babel-flow] format 1`] = ` +"Unexpected token (1:12) +> 1 | new import(); + | ^ +Cause: Unexpected token (1:11)" +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"Unexpected token (1:12) +> 1 | new import(); + | ^ +Cause: Unexpected token (1:11)" +`; + +exports[`snippet: #3 [flow] format 1`] = ` +"Unexpected token \`import\` (1:5) +> 1 | new import(); + | ^^^^^^" +`; + +exports[`snippet: #3 [meriyah] format 1`] = ` +"Cannot use new with import(...) (1:11) +> 1 | new import(); + | ^ +Cause: [1:10-1:11]: Cannot use new with import(...)" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"Expression expected. (1:5) +> 1 | new import(); + | ^ +Cause: Expression expected." +`; diff --git a/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 47b9eeece921..000000000000 --- a/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,193 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Unexpected token (1:8) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [babel-flow] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [babel-ts] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Unexpected token ) (1:8) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [flow] format 1`] = ` -"Unexpected token \`)\` (1:8) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Unexpected token: ')' (1:8) -> 1 | import(); - | ^" -`; - -exports[`snippet: #0 [typescript] format 1`] = ` -"Dynamic import requires exactly one or two arguments. (1:8) -> 1 | import(); - | ^" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"Unexpected token (1:21) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [babel-flow] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 1`] = ` -"\`import()\` requires exactly one or two arguments. (1:1) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"Unexpected token ) (1:21) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [flow] format 1`] = ` -"Unexpected token \`)\` (1:21) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Unexpected token: ')' (1:21) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #1 [typescript] format 1`] = ` -"Dynamic import requires exactly one or two arguments. (1:8) -> 1 | import(/* comment */); - | ^" -`; - -exports[`snippet: #2 [acorn] format 1`] = ` -"Cannot use new with import() (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [babel-flow] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [babel-ts] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [espree] format 1`] = ` -"Cannot use new with import() (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [flow] format 1`] = ` -"Unexpected token \`import\` (1:5) -> 1 | new import('./a.mjs'); - | ^^^^^^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"Cannot use new with import(...) (1:11) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #2 [typescript] format 1`] = ` -"Expression expected. (1:5) -> 1 | new import('./a.mjs'); - | ^" -`; - -exports[`snippet: #3 [acorn] format 1`] = ` -"Unexpected token (1:12) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [babel-flow] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [babel-ts] format 1`] = ` -"Cannot use new with import(...). (1:5) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [espree] format 1`] = ` -"Unexpected token ) (1:12) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [flow] format 1`] = ` -"Unexpected token \`import\` (1:5) -> 1 | new import(); - | ^^^^^^" -`; - -exports[`snippet: #3 [meriyah] format 1`] = ` -"Cannot use new with import(...) (1:11) -> 1 | new import(); - | ^" -`; - -exports[`snippet: #3 [typescript] format 1`] = ` -"Expression expected. (1:5) -> 1 | new import(); - | ^" -`; diff --git a/tests/format/misc/errors/js/import/format.test.js b/tests/format/misc/errors/js/import/format.test.js new file mode 100644 index 000000000000..b74f3610f62b --- /dev/null +++ b/tests/format/misc/errors/js/import/format.test.js @@ -0,0 +1,12 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "import();", + "import(/* comment */);", + "new import('./a.mjs');", + "new import();", + ], + }, + ["babel", "meriyah", "flow", "typescript", "babel-flow", "babel-ts"], +); diff --git a/tests/format/misc/errors/js/import/jsfmt.spec.js b/tests/format/misc/errors/js/import/jsfmt.spec.js deleted file mode 100644 index ffed8e468972..000000000000 --- a/tests/format/misc/errors/js/import/jsfmt.spec.js +++ /dev/null @@ -1,21 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "import();", - "import(/* comment */);", - "new import('./a.mjs');", - "new import();", - ], - }, - [ - "babel", - "acorn", - "espree", - "meriyah", - "flow", - "typescript", - "babel-flow", - "babel-ts", - ] -); diff --git a/tests/format/misc/errors/js/jsfmt.spec.js b/tests/format/misc/errors/js/jsfmt.spec.js deleted file mode 100644 index 043451a7f403..000000000000 --- a/tests/format/misc/errors/js/jsfmt.spec.js +++ /dev/null @@ -1,50 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - // v8intrinsic - "::%DebugPrint(null)", - "a.%DebugPrint();", - "const i = %DebugPrint;", - - // partialApplication - // https://babeljs.io/docs/en/babel-plugin-proposal-partial-application#invalid-usage - "f(x + ?)", // `?` not in top-level Arguments of call - "x + ?", // `?` not in top-level Arguments of call - "?.f()", // `?` not in top-level Arguments of call - // "new f(?)", // `?` not supported in `new` - // "super(?)", // `?` not supported in |SuperCall| - - // https://github.com/tc39/proposal-private-fields-in-in#try-statement - outdent` - class C { - #brand; - - static isC(obj) { - return try obj.#brand; - } - } - `, - - // Using a record or tuple literal on the `lhs` is a `SyntaxError` - "const #{ a, b } = #{ a: 1, b: 2 };", - "const #[a, b] = #[1, 2];", - // holes - // "const x = #[,];", // Should be error, babel didn't throw - // __proto__ - // "const x = #{ __proto__: foo };", // Should be error, babel didn't throw - - // Don't support `syntaxType: "bar"` - "[| 1 |]", - // "{| a: 1 |}", // babel didn't throw on this - - // Invalid decimal - "0b101011101m;", - "0x16432m;", - "0o16432m;", - ], - }, - ["babel"] -); diff --git a/tests/format/misc/errors/js/known-source-type/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/known-source-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..cbe475ecde36 --- /dev/null +++ b/tests/format/misc/errors/js/known-source-type/__snapshots__/format.test.js.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"'import' and 'export' may appear only with 'sourceType: module' (1:1) +> 1 | import "foo" + | ^ +Cause: 'import' and 'export' may appear only with 'sourceType: module' (1:0)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"'import' and 'export' may appear only with 'sourceType: module' (1:1) +> 1 | import "foo" + | ^ +Cause: 'import' and 'export' may appear only with 'sourceType: module'" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"The import keyword can only be used with the module goal (1:8) +> 1 | import "foo" + | ^^^^^ +Cause: [1:7-1:12]: The import keyword can only be used with the module goal" +`; + +exports[`snippet: #1 [acorn] format 1`] = ` +"'with' in strict mode (1:1) +> 1 | with(foo) {} + | ^ +Cause: 'with' in strict mode (1:0)" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"'with' in strict mode (1:1) +> 1 | with(foo) {} + | ^ +Cause: 'with' in strict mode" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Strict mode code may not include a with statement (1:5) +> 1 | with(foo) {} + | ^ +Cause: [1:4-1:5]: Strict mode code may not include a with statement" +`; + +exports[`snippet: #2 [acorn] format 1`] = ` +"Deleting local variable in strict mode (1:1) +> 1 | delete foo + | ^ +Cause: Deleting local variable in strict mode (1:0)" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"Deleting local variable in strict mode (1:1) +> 1 | delete foo + | ^ +Cause: Deleting local variable in strict mode" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Calling delete on expression not allowed in strict mode (1:8) +> 1 | delete foo + | ^^^ +Cause: [1:7-1:10]: Calling delete on expression not allowed in strict mode" +`; diff --git a/tests/format/misc/errors/js/known-source-type/format.test.js b/tests/format/misc/errors/js/known-source-type/format.test.js new file mode 100644 index 000000000000..39f668317546 --- /dev/null +++ b/tests/format/misc/errors/js/known-source-type/format.test.js @@ -0,0 +1,20 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + code: 'import "foo"', + filename: "script.cjs", + }, + { + code: "with(foo) {}", + filename: "module.mjs", + }, + { + code: "delete foo", + filename: "module.mJs", + }, + ], + }, + ["acorn", "espree", "meriyah"], +); diff --git a/tests/format/misc/errors/js/literal/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/literal/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0f1dedd190bb --- /dev/null +++ b/tests/format/misc/errors/js/literal/__snapshots__/format.test.js.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-exponent.js [acorn] format 1`] = ` +"Invalid number (1:1) +> 1 | 12.3e + | ^ + 2 | +Cause: Invalid number (1:0)" +`; + +exports[`invalid-exponent.js [babel] format 1`] = ` +"Floating-point numbers require a valid exponent after the 'e'. (1:1) +> 1 | 12.3e + | ^ + 2 | +Cause: Floating-point numbers require a valid exponent after the 'e'. (1:0)" +`; + +exports[`invalid-exponent.js [espree] format 1`] = ` +"Invalid number (1:1) +> 1 | 12.3e + | ^ + 2 | +Cause: Invalid number" +`; + +exports[`invalid-exponent.js [meriyah] format 1`] = ` +"Non-number found after exponent indicator (1:1) +> 1 | 12.3e + | ^^^^^ + 2 | +Cause: [1:0-1:5]: Non-number found after exponent indicator" +`; diff --git a/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5f07adeb066c..000000000000 --- a/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,29 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid-exponent.js [acorn] format 1`] = ` -"Invalid number (1:1) -> 1 | 12.3e - | ^ - 2 |" -`; - -exports[`invalid-exponent.js [babel] format 1`] = ` -"Floating-point numbers require a valid exponent after the 'e'. (1:1) -> 1 | 12.3e - | ^ - 2 |" -`; - -exports[`invalid-exponent.js [espree] format 1`] = ` -"Invalid number (1:1) -> 1 | 12.3e - | ^ - 2 |" -`; - -exports[`invalid-exponent.js [meriyah] format 1`] = ` -"Non-number found after exponent indicator (1:5) -> 1 | 12.3e - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/js/literal/format.test.js b/tests/format/misc/errors/js/literal/format.test.js new file mode 100644 index 000000000000..2ca3ea963079 --- /dev/null +++ b/tests/format/misc/errors/js/literal/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/literal/jsfmt.spec.js b/tests/format/misc/errors/js/literal/jsfmt.spec.js deleted file mode 100644 index 0b4e24dc0d44..000000000000 --- a/tests/format/misc/errors/js/literal/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/newline-before-arrow/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/newline-before-arrow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41c61f39c563 --- /dev/null +++ b/tests/format/misc/errors/js/newline-before-arrow/__snapshots__/format.test.js.snap @@ -0,0 +1,80 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`newline-before-arrow.js [acorn] format 1`] = ` +"Unexpected token (2:1) + 1 | async x +> 2 | => x + | ^ + 3 | +Cause: Unexpected token (2:0)" +`; + +exports[`newline-before-arrow.js [babel] format 1`] = ` +"No line break is allowed before '=>'. (2:3) + 1 | async x +> 2 | => x + | ^ + 3 | +Cause: No line break is allowed before '=>'. (2:2)" +`; + +exports[`newline-before-arrow.js [babel-ts] format 1`] = ` +"No line break is allowed before '=>'. (2:3) + 1 | async x +> 2 | => x + | ^ + 3 | +Cause: No line break is allowed before '=>'. (2:2)" +`; + +exports[`newline-before-arrow.js [babel-ts] format 2`] = ` +"No line break is allowed before '=>'. (2:3) + 1 | async x +> 2 | => x + | ^ + 3 | +Cause: No line break is allowed before '=>'. (2:2)" +`; + +exports[`newline-before-arrow.js [espree] format 1`] = ` +"Unexpected token => (2:1) + 1 | async x +> 2 | => x + | ^ + 3 | +Cause: Unexpected token =>" +`; + +exports[`newline-before-arrow.js [flow] format 1`] = ` +"Illegal newline before arrow (2:1) + 1 | async x +> 2 | => x + | ^^ + 3 |" +`; + +exports[`newline-before-arrow.js [meriyah] format 1`] = ` +"No line break is allowed after '=>' (2:1) + 1 | async x +> 2 | => x + | ^^ + 3 | +Cause: [2:0-2:2]: No line break is allowed after '=>'" +`; + +exports[`newline-before-arrow.js [oxc] format 1`] = ` +"Line terminator not permitted before arrow (2:1) + 1 | async x +> 2 | => x + | ^^ + 3 |" +`; + +exports[`newline-before-arrow.js [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | async x + | ^ + 2 | => x + 3 | +Cause: Unexpected keyword or identifier." +`; diff --git a/tests/format/misc/errors/js/newline-before-arrow/format.test.js b/tests/format/misc/errors/js/newline-before-arrow/format.test.js new file mode 100644 index 000000000000..c72ea76ae985 --- /dev/null +++ b/tests/format/misc/errors/js/newline-before-arrow/format.test.js @@ -0,0 +1,11 @@ +runFormatTest(import.meta, [ + "babel", + "typescript", + "flow", + "babel-ts", + "acorn", + "espree", + "meriyah", + "babel-ts", + "oxc", +]); diff --git a/tests/format/js/arrows/newline-before-arrow/newline-before-arrow.js b/tests/format/misc/errors/js/newline-before-arrow/newline-before-arrow.js similarity index 100% rename from tests/format/js/arrows/newline-before-arrow/newline-before-arrow.js rename to tests/format/misc/errors/js/newline-before-arrow/newline-before-arrow.js diff --git a/tests/format/misc/errors/js/object/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/object/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c02501ff49e4 --- /dev/null +++ b/tests/format/misc/errors/js/object/__snapshots__/format.test.js.snap @@ -0,0 +1,145 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`getter-generator.js [acorn] format 1`] = ` +"Unexpected token (2:9) + 1 | ({ +> 2 | get *iterator() { }, + | ^ + 3 | }); + 4 | +Cause: Unexpected token (2:8)" +`; + +exports[`getter-generator.js [babel] format 1`] = ` +"A getter cannot be a generator. (2:10) + 1 | ({ +> 2 | get *iterator() { }, + | ^ + 3 | }); + 4 | +Cause: A getter cannot be a generator. (2:9)" +`; + +exports[`getter-generator.js [espree] format 1`] = ` +"Unexpected token * (2:9) + 1 | ({ +> 2 | get *iterator() { }, + | ^ + 3 | }); + 4 | +Cause: Unexpected token *" +`; + +exports[`getter-generator.js [meriyah] format 1`] = ` +"A getter cannot be a generator (2:9) + 1 | ({ +> 2 | get *iterator() { }, + | ^ + 3 | }); + 4 | +Cause: [2:8-2:9]: A getter cannot be a generator" +`; + +exports[`getter-with-parameter.js [acorn] format 1`] = ` +"getter should have no params (1:9) +> 1 | ({ get x(a){} }); + | ^ + 2 | +Cause: getter should have no params (1:8)" +`; + +exports[`getter-with-parameter.js [babel] format 1`] = ` +"A 'get' accessor must not have any formal parameters. (1:4) +> 1 | ({ get x(a){} }); + | ^ + 2 | +Cause: A 'get' accessor must not have any formal parameters. (1:3)" +`; + +exports[`getter-with-parameter.js [espree] format 1`] = ` +"getter should have no params (1:9) +> 1 | ({ get x(a){} }); + | ^ + 2 | +Cause: getter should have no params" +`; + +exports[`getter-with-parameter.js [meriyah] format 1`] = ` +"Getter functions must have exactly no arguments (1:10) +> 1 | ({ get x(a){} }); + | ^ + 2 | +Cause: [1:9-1:10]: Getter functions must have exactly no arguments" +`; + +exports[`setter-generator.js [acorn] format 1`] = ` +"Unexpected token (2:9) + 1 | ({ +> 2 | set *iterator(iter) { }, + | ^ + 3 | }); + 4 | +Cause: Unexpected token (2:8)" +`; + +exports[`setter-generator.js [babel] format 1`] = ` +"A setter cannot be a generator. (2:10) + 1 | ({ +> 2 | set *iterator(iter) { }, + | ^ + 3 | }); + 4 | +Cause: A setter cannot be a generator. (2:9)" +`; + +exports[`setter-generator.js [espree] format 1`] = ` +"Unexpected token * (2:9) + 1 | ({ +> 2 | set *iterator(iter) { }, + | ^ + 3 | }); + 4 | +Cause: Unexpected token *" +`; + +exports[`setter-generator.js [meriyah] format 1`] = ` +"A setter cannot be a generator (2:9) + 1 | ({ +> 2 | set *iterator(iter) { }, + | ^ + 3 | }); + 4 | +Cause: [2:8-2:9]: A setter cannot be a generator" +`; + +exports[`setter-without-parameter.js [acorn] format 1`] = ` +"setter should have exactly one param (1:9) +> 1 | ({ set x(){} }); + | ^ + 2 | +Cause: setter should have exactly one param (1:8)" +`; + +exports[`setter-without-parameter.js [babel] format 1`] = ` +"A 'set' accessor must have exactly one formal parameter. (1:4) +> 1 | ({ set x(){} }); + | ^ + 2 | +Cause: A 'set' accessor must have exactly one formal parameter. (1:3)" +`; + +exports[`setter-without-parameter.js [espree] format 1`] = ` +"setter should have exactly one param (1:9) +> 1 | ({ set x(){} }); + | ^ + 2 | +Cause: setter should have exactly one param" +`; + +exports[`setter-without-parameter.js [meriyah] format 1`] = ` +"Setter functions must have exactly one argument (1:10) +> 1 | ({ set x(){} }); + | ^ + 2 | +Cause: [1:9-1:10]: Setter functions must have exactly one argument" +`; diff --git a/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fcb08c9b9d6d..000000000000 --- a/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,129 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`getter-generator.js [acorn] format 1`] = ` -"Unexpected token (2:9) - 1 | ({ -> 2 | get *iterator() { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`getter-generator.js [babel] format 1`] = ` -"A getter cannot be a generator. (2:10) - 1 | ({ -> 2 | get *iterator() { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`getter-generator.js [espree] format 1`] = ` -"Unexpected token * (2:9) - 1 | ({ -> 2 | get *iterator() { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`getter-generator.js [meriyah] format 1`] = ` -"A getter cannot be a generator (2:9) - 1 | ({ -> 2 | get *iterator() { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`getter-with-parameter.js [acorn] format 1`] = ` -"getter should have no params (1:9) -> 1 | ({ get x(a){} }); - | ^ - 2 |" -`; - -exports[`getter-with-parameter.js [babel] format 1`] = ` -"A 'get' accessor must not have any formal parameters. (1:4) -> 1 | ({ get x(a){} }); - | ^ - 2 |" -`; - -exports[`getter-with-parameter.js [espree] format 1`] = ` -"getter should have no params (1:9) -> 1 | ({ get x(a){} }); - | ^ - 2 |" -`; - -exports[`getter-with-parameter.js [meriyah] format 1`] = ` -"Getter functions must have exactly no arguments (1:10) -> 1 | ({ get x(a){} }); - | ^ - 2 |" -`; - -exports[`setter-generator.js [acorn] format 1`] = ` -"Unexpected token (2:9) - 1 | ({ -> 2 | set *iterator(iter) { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`setter-generator.js [babel] format 1`] = ` -"A setter cannot be a generator. (2:10) - 1 | ({ -> 2 | set *iterator(iter) { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`setter-generator.js [espree] format 1`] = ` -"Unexpected token * (2:9) - 1 | ({ -> 2 | set *iterator(iter) { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`setter-generator.js [meriyah] format 1`] = ` -"A getter cannot be a generator (2:9) - 1 | ({ -> 2 | set *iterator(iter) { }, - | ^ - 3 | }); - 4 |" -`; - -exports[`setter-without-parameter.js [acorn] format 1`] = ` -"setter should have exactly one param (1:9) -> 1 | ({ set x(){} }); - | ^ - 2 |" -`; - -exports[`setter-without-parameter.js [babel] format 1`] = ` -"A 'set' accessor must have exactly one formal parameter. (1:4) -> 1 | ({ set x(){} }); - | ^ - 2 |" -`; - -exports[`setter-without-parameter.js [espree] format 1`] = ` -"setter should have exactly one param (1:9) -> 1 | ({ set x(){} }); - | ^ - 2 |" -`; - -exports[`setter-without-parameter.js [meriyah] format 1`] = ` -"Setter functions must have exactly one argument (1:10) -> 1 | ({ set x(){} }); - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/js/object/format.test.js b/tests/format/misc/errors/js/object/format.test.js new file mode 100644 index 000000000000..2ca3ea963079 --- /dev/null +++ b/tests/format/misc/errors/js/object/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/object/jsfmt.spec.js b/tests/format/misc/errors/js/object/jsfmt.spec.js deleted file mode 100644 index 0b4e24dc0d44..000000000000 --- a/tests/format/misc/errors/js/object/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/optional-chaining/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/optional-chaining/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b5925071d234 --- /dev/null +++ b/tests/format/misc/errors/js/optional-chaining/__snapshots__/format.test.js.snap @@ -0,0 +1,177 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:21) +> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:20)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (1:21) +> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:20)" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:21) +> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (1:21) +> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance + | ^^ +Cause: [1:20-1:22]: Invalid optional chain from new expression" +`; + +exports[`snippet: #1 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:22) +> 1 | const safe5 = new obj?.qux?.baz(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:21)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (1:22) +> 1 | const safe5 = new obj?.qux?.baz(); // undefined + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:21)" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:22) +> 1 | const safe5 = new obj?.qux?.baz(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (1:22) +> 1 | const safe5 = new obj?.qux?.baz(); // undefined + | ^^ +Cause: [1:21-1:23]: Invalid optional chain from new expression" +`; + +exports[`snippet: #2 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:22) +> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:21)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (1:22) +> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:21)" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:22) +> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (1:22) +> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined + | ^^ +Cause: [1:21-1:23]: Invalid optional chain from new expression" +`; + +exports[`snippet: #3 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:26) +> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:25)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (1:26) +> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:25)" +`; + +exports[`snippet: #3 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:26) +> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #3 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (1:26) +> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor + | ^^ +Cause: [1:25-1:27]: Invalid optional chain from new expression" +`; + +exports[`snippet: #4 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (4:9) + 2 | class Test { + 3 | } +> 4 | new Test?.(); // test instance + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (4:8)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (4:9) + 2 | class Test { + 3 | } +> 4 | new Test?.(); // test instance + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (4:8)" +`; + +exports[`snippet: #4 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (4:9) + 2 | class Test { + 3 | } +> 4 | new Test?.(); // test instance + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #4 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (4:9) + 2 | class Test { + 3 | } +> 4 | new Test?.(); // test instance + | ^^ +Cause: [4:8-4:10]: Invalid optional chain from new expression" +`; + +exports[`snippet: #5 [acorn] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:11) +> 1 | new exists?.(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:10)" +`; + +exports[`snippet: #5 [babel] format 1`] = ` +"Constructors in/after an Optional Chain are not allowed. (1:11) +> 1 | new exists?.(); // undefined + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:10)" +`; + +exports[`snippet: #5 [espree] format 1`] = ` +"Optional chaining cannot appear in the callee of new expressions (1:11) +> 1 | new exists?.(); // undefined + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" +`; + +exports[`snippet: #5 [meriyah] format 1`] = ` +"Invalid optional chain from new expression (1:11) +> 1 | new exists?.(); // undefined + | ^^ +Cause: [1:10-1:12]: Invalid optional chain from new expression" +`; diff --git a/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ed0341343adb..000000000000 --- a/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,153 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:21) -> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (1:21) -> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:21) -> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (1:22) -> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:22) -> 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (1:22) -> 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:22) -> 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (1:23) -> 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" -`; - -exports[`snippet: #2 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:22) -> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (1:22) -> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" -`; - -exports[`snippet: #2 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:22) -> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (1:23) -> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" -`; - -exports[`snippet: #3 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:26) -> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (1:26) -> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" -`; - -exports[`snippet: #3 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:26) -> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" -`; - -exports[`snippet: #3 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (1:27) -> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" -`; - -exports[`snippet: #4 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (4:9) - 2 | class Test { - 3 | } -> 4 | new Test?.(); // test instance - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (4:9) - 2 | class Test { - 3 | } -> 4 | new Test?.(); // test instance - | ^" -`; - -exports[`snippet: #4 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (4:9) - 2 | class Test { - 3 | } -> 4 | new Test?.(); // test instance - | ^" -`; - -exports[`snippet: #4 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (4:10) - 2 | class Test { - 3 | } -> 4 | new Test?.(); // test instance - | ^" -`; - -exports[`snippet: #5 [acorn] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:11) -> 1 | new exists?.(); // undefined - | ^" -`; - -exports[`snippet: #5 [babel] format 1`] = ` -"Constructors in/after an Optional Chain are not allowed. (1:11) -> 1 | new exists?.(); // undefined - | ^" -`; - -exports[`snippet: #5 [espree] format 1`] = ` -"Optional chaining cannot appear in the callee of new expressions (1:11) -> 1 | new exists?.(); // undefined - | ^" -`; - -exports[`snippet: #5 [meriyah] format 1`] = ` -"Invalid optional chain from new expression (1:12) -> 1 | new exists?.(); // undefined - | ^" -`; diff --git a/tests/format/misc/errors/js/optional-chaining/format.test.js b/tests/format/misc/errors/js/optional-chaining/format.test.js new file mode 100644 index 000000000000..008b3c82c595 --- /dev/null +++ b/tests/format/misc/errors/js/optional-chaining/format.test.js @@ -0,0 +1,21 @@ +import { outdent } from "outdent"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "const baz3 = new obj?.foo?.bar?.baz(); // baz instance", + "const safe5 = new obj?.qux?.baz(); // undefined", + "const safe6 = new obj?.foo.bar.qux?.(); // undefined", + "const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor", + outdent` + // Top classes can be called directly, too. + class Test { + } + new Test?.(); // test instance + `, + "new exists?.(); // undefined", + ], + }, + ["babel", "acorn", "espree", "meriyah"], +); diff --git a/tests/format/misc/errors/js/optional-chaining/jsfmt.spec.js b/tests/format/misc/errors/js/optional-chaining/jsfmt.spec.js deleted file mode 100644 index b3db74c43370..000000000000 --- a/tests/format/misc/errors/js/optional-chaining/jsfmt.spec.js +++ /dev/null @@ -1,21 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec( - { - dirname: __dirname, - snippets: [ - "const baz3 = new obj?.foo?.bar?.baz(); // baz instance", - "const safe5 = new obj?.qux?.baz(); // undefined", - "const safe6 = new obj?.foo.bar.qux?.(); // undefined", - "const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor", - outdent` - // Top classes can be called directly, too. - class Test { - } - new Test?.(); // test instance - `, - "new exists?.(); // undefined", - ], - }, - ["babel", "acorn", "espree", "meriyah"] -); diff --git a/tests/format/misc/errors/js/record/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/record/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d05c147d566f --- /dev/null +++ b/tests/format/misc/errors/js/record/__snapshots__/format.test.js.snap @@ -0,0 +1,136 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [acorn] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{a() {}} + | ^ +Cause: Unexpected character '{' (1:1)" +`; + +exports[`snippet: #0 [babel] format 1`] = ` +"Unexpected token. (1:1) +> 1 | #{a() {}} + | ^" +`; + +exports[`snippet: #0 [espree] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{a() {}} + | ^ +Cause: Unexpected character '{'" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"'#' not followed by identifier (1:1) +> 1 | #{a() {}} + | ^ +Cause: [1:0-1:1]: '#' not followed by identifier" +`; + +exports[`snippet: #1 [acorn] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{async b() {}} + | ^ +Cause: Unexpected character '{' (1:1)" +`; + +exports[`snippet: #1 [babel] format 1`] = ` +"Unexpected token. (1:1) +> 1 | #{async b() {}} + | ^" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{async b() {}} + | ^ +Cause: Unexpected character '{'" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"'#' not followed by identifier (1:1) +> 1 | #{async b() {}} + | ^ +Cause: [1:0-1:1]: '#' not followed by identifier" +`; + +exports[`snippet: #2 [acorn] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{get c() {}} + | ^ +Cause: Unexpected character '{' (1:1)" +`; + +exports[`snippet: #2 [babel] format 1`] = ` +"Unexpected token. (1:1) +> 1 | #{get c() {}} + | ^" +`; + +exports[`snippet: #2 [espree] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{get c() {}} + | ^ +Cause: Unexpected character '{'" +`; + +exports[`snippet: #2 [meriyah] format 1`] = ` +"'#' not followed by identifier (1:1) +> 1 | #{get c() {}} + | ^ +Cause: [1:0-1:1]: '#' not followed by identifier" +`; + +exports[`snippet: #3 [acorn] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{set d(_) {}} + | ^ +Cause: Unexpected character '{' (1:1)" +`; + +exports[`snippet: #3 [babel] format 1`] = ` +"Unexpected token. (1:1) +> 1 | #{set d(_) {}} + | ^" +`; + +exports[`snippet: #3 [espree] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{set d(_) {}} + | ^ +Cause: Unexpected character '{'" +`; + +exports[`snippet: #3 [meriyah] format 1`] = ` +"'#' not followed by identifier (1:1) +> 1 | #{set d(_) {}} + | ^ +Cause: [1:0-1:1]: '#' not followed by identifier" +`; + +exports[`snippet: #4 [acorn] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{*e() {}} + | ^ +Cause: Unexpected character '{' (1:1)" +`; + +exports[`snippet: #4 [babel] format 1`] = ` +"Unexpected token. (1:1) +> 1 | #{*e() {}} + | ^" +`; + +exports[`snippet: #4 [espree] format 1`] = ` +"Unexpected character '{' (1:2) +> 1 | #{*e() {}} + | ^ +Cause: Unexpected character '{'" +`; + +exports[`snippet: #4 [meriyah] format 1`] = ` +"'#' not followed by identifier (1:1) +> 1 | #{*e() {}} + | ^ +Cause: [1:0-1:1]: '#' not followed by identifier" +`; diff --git a/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5d84c2f2aa15..000000000000 --- a/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{a() {}} - | ^" -`; - -exports[`snippet: #0 [babel] format 1`] = ` -"Only properties and spread elements are allowed in record definitions. (1:3) -> 1 | #{a() {}} - | ^" -`; - -exports[`snippet: #0 [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{a() {}} - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{a() {}} - | ^" -`; - -exports[`snippet: #1 [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{async b() {}} - | ^" -`; - -exports[`snippet: #1 [babel] format 1`] = ` -"Only properties and spread elements are allowed in record definitions. (1:3) -> 1 | #{async b() {}} - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{async b() {}} - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{async b() {}} - | ^" -`; - -exports[`snippet: #2 [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{get c() {}} - | ^" -`; - -exports[`snippet: #2 [babel] format 1`] = ` -"Only properties and spread elements are allowed in record definitions. (1:3) -> 1 | #{get c() {}} - | ^" -`; - -exports[`snippet: #2 [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{get c() {}} - | ^" -`; - -exports[`snippet: #2 [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{get c() {}} - | ^" -`; - -exports[`snippet: #3 [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{set d(_) {}} - | ^" -`; - -exports[`snippet: #3 [babel] format 1`] = ` -"Only properties and spread elements are allowed in record definitions. (1:3) -> 1 | #{set d(_) {}} - | ^" -`; - -exports[`snippet: #3 [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{set d(_) {}} - | ^" -`; - -exports[`snippet: #3 [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{set d(_) {}} - | ^" -`; - -exports[`snippet: #4 [acorn] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{*e() {}} - | ^" -`; - -exports[`snippet: #4 [babel] format 1`] = ` -"Only properties and spread elements are allowed in record definitions. (1:3) -> 1 | #{*e() {}} - | ^" -`; - -exports[`snippet: #4 [espree] format 1`] = ` -"Unexpected character '{' (1:2) -> 1 | #{*e() {}} - | ^" -`; - -exports[`snippet: #4 [meriyah] format 1`] = ` -"'#' not followed by identifier (1:1) -> 1 | #{*e() {}} - | ^" -`; diff --git a/tests/format/misc/errors/js/record/format.test.js b/tests/format/misc/errors/js/record/format.test.js new file mode 100644 index 000000000000..8f2e5c981011 --- /dev/null +++ b/tests/format/misc/errors/js/record/format.test.js @@ -0,0 +1,13 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "#{a() {}}", + "#{async b() {}}", + "#{get c() {}}", + "#{set d(_) {}}", + "#{*e() {}}", + ], + }, + ["babel", "acorn", "espree", "meriyah"], +); diff --git a/tests/format/misc/errors/js/record/jsfmt.spec.js b/tests/format/misc/errors/js/record/jsfmt.spec.js deleted file mode 100644 index 27d2bfc795b8..000000000000 --- a/tests/format/misc/errors/js/record/jsfmt.spec.js +++ /dev/null @@ -1,13 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "#{a() {}}", - "#{async b() {}}", - "#{get c() {}}", - "#{set d(_) {}}", - "#{*e() {}}", - ], - }, - ["babel", "acorn", "espree", "meriyah"] -); diff --git a/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1c3147b1a8a3 --- /dev/null +++ b/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/format.test.js.snap @@ -0,0 +1,65 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-flags.js [acorn] format 1`] = ` +"Invalid regular expression flag (1:2) +> 1 | /a/ugv; + | ^ + 2 | +Cause: Invalid regular expression flag (1:1)" +`; + +exports[`invalid-flags.js [babel] format 1`] = ` +"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:7) +> 1 | /a/ugv; + | ^ + 2 | +Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)" +`; + +exports[`invalid-flags.js [espree] format 1`] = ` +"Invalid regular expression flag (1:2) +> 1 | /a/ugv; + | ^ + 2 | +Cause: Invalid regular expression flag" +`; + +exports[`invalid-flags.js [meriyah] format 1`] = ` +"Duplicate regular expression flag 'uv' (1:1) +> 1 | /a/ugv; + | ^^^^^ + 2 | +Cause: [1:0-1:5]: Duplicate regular expression flag 'uv'" +`; + +exports[`invalid-flags2.js [acorn] format 1`] = ` +"Invalid regular expression flag (1:2) +> 1 | /a/vu; + | ^ + 2 | +Cause: Invalid regular expression flag (1:1)" +`; + +exports[`invalid-flags2.js [babel] format 1`] = ` +"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6) +> 1 | /a/vu; + | ^ + 2 | +Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:5)" +`; + +exports[`invalid-flags2.js [espree] format 1`] = ` +"Invalid regular expression flag (1:2) +> 1 | /a/vu; + | ^ + 2 | +Cause: Invalid regular expression flag" +`; + +exports[`invalid-flags2.js [meriyah] format 1`] = ` +"Duplicate regular expression flag 'vu' (1:1) +> 1 | /a/vu; + | ^^^^ + 2 | +Cause: [1:0-1:4]: Duplicate regular expression flag 'vu'" +`; diff --git a/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5253852080c7..000000000000 --- a/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,57 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid-flags.js [acorn] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/ugv; - | ^ - 2 |" -`; - -exports[`invalid-flags.js [babel] format 1`] = ` -"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:7) -> 1 | /a/ugv; - | ^ - 2 |" -`; - -exports[`invalid-flags.js [espree] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/ugv; - | ^ - 2 |" -`; - -exports[`invalid-flags.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:5) -> 1 | /a/ugv; - | ^ - 2 |" -`; - -exports[`invalid-flags2.js [acorn] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/vu; - | ^ - 2 |" -`; - -exports[`invalid-flags2.js [babel] format 1`] = ` -"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6) -> 1 | /a/vu; - | ^ - 2 |" -`; - -exports[`invalid-flags2.js [espree] format 1`] = ` -"Invalid regular expression flag (1:2) -> 1 | /a/vu; - | ^ - 2 |" -`; - -exports[`invalid-flags2.js [meriyah] format 1`] = ` -"Unexpected regular expression flag (1:3) -> 1 | /a/vu; - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/js/regex-v-u-flags/format.test.js b/tests/format/misc/errors/js/regex-v-u-flags/format.test.js new file mode 100644 index 000000000000..2ca3ea963079 --- /dev/null +++ b/tests/format/misc/errors/js/regex-v-u-flags/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/regex-v-u-flags/jsfmt.spec.js b/tests/format/misc/errors/js/regex-v-u-flags/jsfmt.spec.js deleted file mode 100644 index 0b4e24dc0d44..000000000000 --- a/tests/format/misc/errors/js/regex-v-u-flags/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/reserved-word/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/reserved-word/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4f892bc0f646 --- /dev/null +++ b/tests/format/misc/errors/js/reserved-word/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [espree] format 1`] = ` +"The keyword 'interface' is reserved (1:7) +> 1 | class interface {} + | ^ +Cause: The keyword 'interface' is reserved" +`; + +exports[`snippet: #0 [meriyah] format 1`] = ` +"Unexpected strict mode reserved word (1:7) +> 1 | class interface {} + | ^^^^^^^^^ +Cause: [1:6-1:15]: Unexpected strict mode reserved word" +`; + +exports[`snippet: #1 [espree] format 1`] = ` +"The keyword 'interface' is reserved (1:8) +> 1 | import interface from "foo"; + | ^ +Cause: The keyword 'interface' is reserved" +`; + +exports[`snippet: #1 [meriyah] format 1`] = ` +"Unexpected strict mode reserved word (1:8) +> 1 | import interface from "foo"; + | ^^^^^^^^^ +Cause: [1:7-1:16]: Unexpected strict mode reserved word" +`; diff --git a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7ff9239cdc30..000000000000 --- a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [espree] format 1`] = ` -"The keyword 'interface' is reserved (1:7) -> 1 | class interface {} - | ^" -`; - -exports[`snippet: #0 [meriyah] format 1`] = ` -"Unexpected strict mode reserved word (1:15) -> 1 | class interface {} - | ^" -`; - -exports[`snippet: #1 [espree] format 1`] = ` -"The keyword 'interface' is reserved (1:8) -> 1 | import interface from "foo"; - | ^" -`; - -exports[`snippet: #1 [meriyah] format 1`] = ` -"Unexpected strict mode reserved word (1:16) -> 1 | import interface from "foo"; - | ^" -`; diff --git a/tests/format/misc/errors/js/reserved-word/format.test.js b/tests/format/misc/errors/js/reserved-word/format.test.js new file mode 100644 index 000000000000..b668c9913aea --- /dev/null +++ b/tests/format/misc/errors/js/reserved-word/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["class interface {}", 'import interface from "foo";'], + }, + ["espree", "meriyah"], +); diff --git a/tests/format/misc/errors/js/reserved-word/jsfmt.spec.js b/tests/format/misc/errors/js/reserved-word/jsfmt.spec.js deleted file mode 100644 index 6f3610aa3102..000000000000 --- a/tests/format/misc/errors/js/reserved-word/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: ["class interface {}", 'import interface from "foo";'], - }, - ["espree", "meriyah"] -); diff --git a/tests/format/misc/errors/js/variable-declarator/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/variable-declarator/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0ca39c40813e --- /dev/null +++ b/tests/format/misc/errors/js/variable-declarator/__snapshots__/format.test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`invalid-const.js [acorn] format 1`] = ` +"Unexpected token (1:10) +> 1 | const foo; + | ^ + 2 | +Cause: Unexpected token (1:9)" +`; + +exports[`invalid-const.js [espree] format 1`] = ` +"Unexpected token ; (1:10) +> 1 | const foo; + | ^ + 2 | +Cause: Unexpected token ;" +`; + +exports[`invalid-const.js [meriyah] format 1`] = ` +"Missing initializer in const declaration (1:10) +> 1 | const foo; + | ^ + 2 | +Cause: [1:9-1:10]: Missing initializer in const declaration" +`; diff --git a/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8f52a13b423e..000000000000 --- a/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,29 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid-const.js [acorn] format 1`] = ` -"Unexpected token (1:10) -> 1 | const foo; - | ^ - 2 |" -`; - -exports[`invalid-const.js [babel] format 1`] = ` -"Missing initializer in const declaration. (1:10) -> 1 | const foo; - | ^ - 2 |" -`; - -exports[`invalid-const.js [espree] format 1`] = ` -"Unexpected token ; (1:10) -> 1 | const foo; - | ^ - 2 |" -`; - -exports[`invalid-const.js [meriyah] format 1`] = ` -"Missing initializer in const declaration (1:10) -> 1 | const foo; - | ^ - 2 |" -`; diff --git a/tests/format/misc/errors/js/variable-declarator/format.test.js b/tests/format/misc/errors/js/variable-declarator/format.test.js new file mode 100644 index 000000000000..49cefd5cdcae --- /dev/null +++ b/tests/format/misc/errors/js/variable-declarator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js b/tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js deleted file mode 100644 index 0b4e24dc0d44..000000000000 --- a/tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel", "acorn", "espree", "meriyah"]); diff --git a/tests/format/misc/errors/json/__snapshots__/format.test.js.snap b/tests/format/misc/errors/json/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..fdcd58acc876 --- /dev/null +++ b/tests/format/misc/errors/json/__snapshots__/format.test.js.snap @@ -0,0 +1,1196 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`snippet: #0 [json] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {foo} + | ^^^" +`; + +exports[`snippet: #0 [json] format 2`] = ` +"A 'set' accessor must have exactly one formal parameter. (1:9) +> 1 | [class {set foo() {}}] + | ^ +Cause: A 'set' accessor must have exactly one formal parameter. (1:8)" +`; + +exports[`snippet: #0 [json] format 3`] = ` +"Unexpected token (1:2) +> 1 | [ + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #0 [json-stringify] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {foo} + | ^^^" +`; + +exports[`snippet: #0 [json-stringify] format 2`] = ` +"Unexpected token (1:2) +> 1 | [ + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #0 [json5] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {foo} + | ^^^" +`; + +exports[`snippet: #0 [json5] format 2`] = ` +"Unexpected token (1:2) +> 1 | [ + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #0 [jsonc] format 1`] = ` +"Unexpected token (1:2) +> 1 | [ + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #1 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {["foo"]:"bar"} + | ^^^^^" +`; + +exports[`snippet: #1 [json] format 2`] = ` +"Private name #bar is not defined. (1:21) +> 1 | [class {foo() {this.#bar}}] + | ^ +Cause: Private name #bar is not defined. (1:20)" +`; + +exports[`snippet: #1 [json] format 3`] = ` +"Unexpected token (1:1) +> 1 | ; + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #1 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {["foo"]:"bar"} + | ^^^^^" +`; + +exports[`snippet: #1 [json-stringify] format 2`] = ` +"Unexpected token (1:1) +> 1 | ; + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #1 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {["foo"]:"bar"} + | ^^^^^" +`; + +exports[`snippet: #1 [json5] format 2`] = ` +"Unexpected token (1:1) +> 1 | ; + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #1 [jsonc] format 1`] = ` +"Unexpected token (1:1) +> 1 | ; + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #2 [json] format 1`] = ` +"Operator '~' is not allowed in JSON. (1:9) +> 1 | {"foo": ~1} + | ^^" +`; + +exports[`snippet: #2 [json] format 2`] = ` +"'await' is only allowed within async functions and at the top levels of modules. (1:14) +> 1 | [function(){ await 1 }] + | ^ +Cause: 'await' is only allowed within async functions and at the top levels of modules. (1:13)" +`; + +exports[`snippet: #2 [json] format 3`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9) +> 1 | "string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)" +`; + +exports[`snippet: #2 [json-stringify] format 1`] = ` +"Operator '~' is not allowed in JSON. (1:9) +> 1 | {"foo": ~1} + | ^^" +`; + +exports[`snippet: #2 [json-stringify] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9) +> 1 | "string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)" +`; + +exports[`snippet: #2 [json5] format 1`] = ` +"Operator '~' is not allowed in JSON. (1:9) +> 1 | {"foo": ~1} + | ^^" +`; + +exports[`snippet: #2 [json5] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9) +> 1 | "string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)" +`; + +exports[`snippet: #2 [jsonc] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9) +> 1 | "string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)" +`; + +exports[`snippet: #3 [json] format 1`] = ` +"'LogicalExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": false || "bar"} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #3 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [do {}] + | ^" +`; + +exports[`snippet: #3 [json] format 3`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | "string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #3 [json-stringify] format 1`] = ` +"'LogicalExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": false || "bar"} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #3 [json-stringify] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | "string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #3 [json5] format 1`] = ` +"'LogicalExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": false || "bar"} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #3 [json5] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | "string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #3 [jsonc] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | "string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #4 [json] format 1`] = ` +"'ArrowFunctionExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": () => {}} + | ^^^^^^^^" +`; + +exports[`snippet: #4 [json] format 2`] = ` +"'import' and 'export' may only appear at the top level. (1:14) +> 1 | [function() {export a from 'a'}] + | ^ +Cause: 'import' and 'export' may only appear at the top level. (1:13)" +`; + +exports[`snippet: #4 [json] format 3`] = ` +"Unexpected token (1:15) +> 1 | /* comment */[ + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #4 [json-stringify] format 1`] = ` +"'ArrowFunctionExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": () => {}} + | ^^^^^^^^" +`; + +exports[`snippet: #4 [json-stringify] format 2`] = ` +"Unexpected token (1:15) +> 1 | /* comment */[ + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #4 [json5] format 1`] = ` +"'ArrowFunctionExpression' is not allowed in JSON. (1:9) +> 1 | {"foo": () => {}} + | ^^^^^^^^" +`; + +exports[`snippet: #4 [json5] format 2`] = ` +"Unexpected token (1:15) +> 1 | /* comment */[ + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #4 [jsonc] format 1`] = ` +"Unexpected token (1:15) +> 1 | /* comment */[ + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #5 [json] format 1`] = ` +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" +`; + +exports[`snippet: #5 [json] format 2`] = ` +"Unexpected token (1:1) +> 1 | export a from 'a' + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #5 [json] format 3`] = ` +"Unexpected token (1:14) +> 1 | /* comment */; + | ^ +Cause: Unexpected token (1:13)" +`; + +exports[`snippet: #5 [json-stringify] format 1`] = ` +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" +`; + +exports[`snippet: #5 [json-stringify] format 2`] = ` +"Unexpected token (1:14) +> 1 | /* comment */; + | ^ +Cause: Unexpected token (1:13)" +`; + +exports[`snippet: #5 [json5] format 1`] = ` +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" +`; + +exports[`snippet: #5 [json5] format 2`] = ` +"Unexpected token (1:14) +> 1 | /* comment */; + | ^ +Cause: Unexpected token (1:13)" +`; + +exports[`snippet: #5 [jsonc] format 1`] = ` +"Unexpected token (1:14) +> 1 | /* comment */; + | ^ +Cause: Unexpected token (1:13)" +`; + +exports[`snippet: #6 [json] format 1`] = ` +"'BinaryExpression' is not allowed in JSON. (1:1) +> 1 | 1+2 + | ^^^" +`; + +exports[`snippet: #6 [json] format 2`] = ` +"Unexpected token, expected "," (1:3) +> 1 | [a::b] + | ^ +Cause: Unexpected token, expected "," (1:2)" +`; + +exports[`snippet: #6 [json] format 3`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22) +> 1 | /* comment */"string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)" +`; + +exports[`snippet: #6 [json-stringify] format 1`] = ` +"'BinaryExpression' is not allowed in JSON. (1:1) +> 1 | 1+2 + | ^^^" +`; + +exports[`snippet: #6 [json-stringify] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22) +> 1 | /* comment */"string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)" +`; + +exports[`snippet: #6 [json5] format 1`] = ` +"'BinaryExpression' is not allowed in JSON. (1:1) +> 1 | 1+2 + | ^^^" +`; + +exports[`snippet: #6 [json5] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22) +> 1 | /* comment */"string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)" +`; + +exports[`snippet: #6 [jsonc] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22) +> 1 | /* comment */"string"; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)" +`; + +exports[`snippet: #7 [json] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {Infinity} + | ^^^^^^^^" +`; + +exports[`snippet: #7 [json] format 2`] = ` +"Unexpected token. (1:24) +> 1 | [function*() {function.sent}] + | ^" +`; + +exports[`snippet: #7 [json] format 3`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | /* comment */"string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #7 [json-stringify] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {Infinity} + | ^^^^^^^^" +`; + +exports[`snippet: #7 [json-stringify] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | /* comment */"string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #7 [json5] format 1`] = ` +"Shorthand property is not allowed in JSON. (1:2) +> 1 | {Infinity} + | ^^^^^^^^" +`; + +exports[`snippet: #7 [json5] format 2`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | /* comment */"string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #7 [jsonc] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1) + 1 | /* comment */"string" +> 2 | ; + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)" +`; + +exports[`snippet: #8 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key]: 1} + | ^^^" +`; + +exports[`snippet: #8 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [throw {}] + | ^" +`; + +exports[`snippet: #8 [json] format 3`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #8 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key]: 1} + | ^^^" +`; + +exports[`snippet: #8 [json-stringify] format 2`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #8 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key]: 1} + | ^^^" +`; + +exports[`snippet: #8 [json5] format 2`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #8 [jsonc] format 1`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #9 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key()]: 1} + | ^^^^^" +`; + +exports[`snippet: #9 [json] format 2`] = ` +"Unexpected token. (1:6) +> 1 | [foo(?)] + | ^" +`; + +exports[`snippet: #9 [json] format 3`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | [] +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #9 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key()]: 1} + | ^^^^^" +`; + +exports[`snippet: #9 [json-stringify] format 2`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | [] +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #9 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[key()]: 1} + | ^^^^^" +`; + +exports[`snippet: #9 [json5] format 2`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | [] +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #9 [jsonc] format 1`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | [] +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #10 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['CallExpression']: 1} + | ^^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #10 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [@decorator class {}] + | ^" +`; + +exports[`snippet: #10 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['CallExpression']: 1} + | ^^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #10 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['CallExpression']: 1} + | ^^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #11 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['StringLiteral']: 1} + | ^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #11 [json] format 2`] = ` +"'CallExpression' is not allowed in JSON. (1:2) +> 1 | [import('a', {type:'json'})] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #11 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['StringLiteral']: 1} + | ^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #11 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['StringLiteral']: 1} + | ^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #12 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['string']: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #12 [json] format 2`] = ` +"Unexpected token. (1:3) +> 1 | [1m] + | ^" +`; + +exports[`snippet: #12 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['string']: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #12 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {['string']: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #13 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[1]: 1} + | ^" +`; + +exports[`snippet: #13 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [module {}] + | ^" +`; + +exports[`snippet: #13 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[1]: 1} + | ^" +`; + +exports[`snippet: #13 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[1]: 1} + | ^" +`; + +exports[`snippet: #14 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[Infinity]: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #14 [json] format 2`] = ` +"Unexpected token. (1:8) +> 1 | [async do {}] + | ^" +`; + +exports[`snippet: #14 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[Infinity]: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #14 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[Infinity]: 1} + | ^^^^^^^^" +`; + +exports[`snippet: #15 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[-Infinity]: 1} + | ^^^^^^^^^" +`; + +exports[`snippet: #15 [json] format 2`] = ` +"'RegExpLiteral' is not allowed in JSON. (1:2) +> 1 | [/a/v] + | ^^^^" +`; + +exports[`snippet: #15 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[-Infinity]: 1} + | ^^^^^^^^^" +`; + +exports[`snippet: #15 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[-Infinity]: 1} + | ^^^^^^^^^" +`; + +exports[`snippet: #16 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[{key: 'value'}]: 1} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #16 [json] format 2`] = ` +"Unexpected token. (1:28) +> 1 | [class {#foo;bar() {const {#foo: foo} = this;}}] + | ^" +`; + +exports[`snippet: #16 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[{key: 'value'}]: 1} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #16 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[{key: 'value'}]: 1} + | ^^^^^^^^^^^^^^" +`; + +exports[`snippet: #17 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[[]]: 1} + | ^^" +`; + +exports[`snippet: #17 [json] format 2`] = ` +"Unexpected token. (1:18) +> 1 | [class {accessor foo = 1}] + | ^" +`; + +exports[`snippet: #17 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[[]]: 1} + | ^^" +`; + +exports[`snippet: #17 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[[]]: 1} + | ^^" +`; + +exports[`snippet: #18 [json] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[null]: 1} + | ^^^^" +`; + +exports[`snippet: #18 [json] format 2`] = ` +"'CallExpression' is not allowed in JSON. (1:2) +> 1 | [import('a', {reflect: 'module'})] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" +`; + +exports[`snippet: #18 [json-stringify] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[null]: 1} + | ^^^^" +`; + +exports[`snippet: #18 [json5] format 1`] = ` +"Computed key is not allowed in JSON. (1:3) +> 1 | {[null]: 1} + | ^^^^" +`; + +exports[`snippet: #19 [json] format 1`] = ` +"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) +> 1 | {key: +foo()} + | ^^^^^" +`; + +exports[`snippet: #19 [json] format 2`] = ` +"\`import\` can only be used in \`import()\` or \`import.meta\`. (1:1) +> 1 | import module a from 'a' + | ^ +Cause: \`import\` can only be used in \`import()\` or \`import.meta\`. (1:0)" +`; + +exports[`snippet: #19 [json-stringify] format 1`] = ` +"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) +> 1 | {key: +foo()} + | ^^^^^" +`; + +exports[`snippet: #19 [json5] format 1`] = ` +"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) +> 1 | {key: +foo()} + | ^^^^^" +`; + +exports[`snippet: #20 [json] format 1`] = ` +"Operator 'void' is not allowed in JSON. (1:7) +> 1 | {key: void foo()} + | ^^^^^^^^^^" +`; + +exports[`snippet: #20 [json] format 2`] = ` +"Unexpected token. (1:16) +> 1 | [function() { {using a = b} }] + | ^" +`; + +exports[`snippet: #20 [json-stringify] format 1`] = ` +"Operator 'void' is not allowed in JSON. (1:7) +> 1 | {key: void foo()} + | ^^^^^^^^^^" +`; + +exports[`snippet: #20 [json5] format 1`] = ` +"Operator 'void' is not allowed in JSON. (1:7) +> 1 | {key: void foo()} + | ^^^^^^^^^^" +`; + +exports[`snippet: #21 [json] format 1`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | {} +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #21 [json] format 2`] = ` +"Unexpected token, expected "," (1:8) +> 1 | {using a = b} + | ^ +Cause: Unexpected token, expected "," (1:7)" +`; + +exports[`snippet: #21 [json-stringify] format 1`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | {} +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #21 [json5] format 1`] = ` +"Unexpected token (1:1) +> 1 | #!/usr/bin/env node + | ^ + 2 | {} +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #22 [json] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1) + 1 | "use strict" +> 2 | {} + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)" +`; + +exports[`snippet: #22 [json] format 2`] = ` +"Unexpected token (1:2) +> 1 | [#[]] + | ^ +Cause: Unexpected token (1:1)" +`; + +exports[`snippet: #22 [json-stringify] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1) + 1 | "use strict" +> 2 | {} + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)" +`; + +exports[`snippet: #22 [json5] format 1`] = ` +"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1) + 1 | "use strict" +> 2 | {} + | ^ +Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)" +`; + +exports[`snippet: #23 [json] format 1`] = ` +"The input is empty or contains only comments. (1:14) +> 1 | /* comment */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)" +`; + +exports[`snippet: #23 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [#{}] + | ^" +`; + +exports[`snippet: #23 [json-stringify] format 1`] = ` +"The input is empty or contains only comments. (1:14) +> 1 | /* comment */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)" +`; + +exports[`snippet: #23 [json5] format 1`] = ` +"The input is empty or contains only comments. (1:14) +> 1 | /* comment */ + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)" +`; + +exports[`snippet: #24 [json] format 1`] = ` +"The input is empty or contains only comments. (1:11) +> 1 | // comment + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)" +`; + +exports[`snippet: #24 [json] format 2`] = ` +"'BinaryExpression' is not allowed in JSON. (1:2) +> 1 | [foo%bar()] + | ^^^^^^^^^" +`; + +exports[`snippet: #24 [json-stringify] format 1`] = ` +"The input is empty or contains only comments. (1:11) +> 1 | // comment + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)" +`; + +exports[`snippet: #24 [json5] format 1`] = ` +"The input is empty or contains only comments. (1:11) +> 1 | // comment + | ^ +Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)" +`; + +exports[`snippet: #25 [json] format 1`] = ` +"'TemplateLiteral' with expression is not allowed in JSON. (1:7) +> 1 | \`foo\${1}bar\` + | ^" +`; + +exports[`snippet: #25 [json] format 2`] = ` +"Unexpected token. (1:8) +> 1 | ['foo' |> bar] + | ^" +`; + +exports[`snippet: #25 [json-stringify] format 1`] = ` +"'TemplateLiteral' with expression is not allowed in JSON. (1:7) +> 1 | \`foo\${1}bar\` + | ^" +`; + +exports[`snippet: #25 [json5] format 1`] = ` +"'TemplateLiteral' with expression is not allowed in JSON. (1:7) +> 1 | \`foo\${1}bar\` + | ^" +`; + +exports[`snippet: #26 [json] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+1 + | ^^" +`; + +exports[`snippet: #26 [json] format 2`] = ` +"Unexpected token. (1:8) +> 1 | ['foo' |> bar(%)] + | ^" +`; + +exports[`snippet: #26 [json-stringify] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+1 + | ^^" +`; + +exports[`snippet: #26 [json5] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+1 + | ^^" +`; + +exports[`snippet: #27 [json] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+Infinity + | ^^^^^^^^^" +`; + +exports[`snippet: #27 [json] format 2`] = ` +"Unexpected token. (1:2) +> 1 | [<foo></foo>] + | ^" +`; + +exports[`snippet: #27 [json-stringify] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+Infinity + | ^^^^^^^^^" +`; + +exports[`snippet: #27 [json5] format 1`] = ` +"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) +> 1 | -+Infinity + | ^^^^^^^^^" +`; + +exports[`snippet: #28 [json] format 1`] = ` +"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) +> 1 | -undefined + | ^^^^^^^^^" +`; + +exports[`snippet: #28 [json-stringify] format 1`] = ` +"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) +> 1 | -undefined + | ^^^^^^^^^" +`; + +exports[`snippet: #28 [json5] format 1`] = ` +"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) +> 1 | -undefined + | ^^^^^^^^^" +`; + +exports[`snippet: #29 [json] format 1`] = ` +"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) +> 1 | -null + | ^^^^" +`; + +exports[`snippet: #29 [json-stringify] format 1`] = ` +"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) +> 1 | -null + | ^^^^" +`; + +exports[`snippet: #29 [json5] format 1`] = ` +"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) +> 1 | -null + | ^^^^" +`; + +exports[`snippet: #30 [json] format 1`] = ` +"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) +> 1 | -false + | ^^^^^" +`; + +exports[`snippet: #30 [json-stringify] format 1`] = ` +"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) +> 1 | -false + | ^^^^^" +`; + +exports[`snippet: #30 [json5] format 1`] = ` +"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) +> 1 | -false + | ^^^^^" +`; + +exports[`snippet: #31 [json] format 1`] = ` +"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) +> 1 | +'string' + | ^^^^^^^^" +`; + +exports[`snippet: #31 [json-stringify] format 1`] = ` +"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) +> 1 | +'string' + | ^^^^^^^^" +`; + +exports[`snippet: #31 [json5] format 1`] = ` +"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) +> 1 | +'string' + | ^^^^^^^^" +`; + +exports[`snippet: #32 [json] format 1`] = ` +"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) +> 1 | {key: +{}} + | ^^" +`; + +exports[`snippet: #32 [json-stringify] format 1`] = ` +"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) +> 1 | {key: +{}} + | ^^" +`; + +exports[`snippet: #32 [json5] format 1`] = ` +"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) +> 1 | {key: +{}} + | ^^" +`; + +exports[`snippet: #33 [json] format 1`] = ` +"Identifier 'identifier' is not allowed in JSON. (1:16) +> 1 | {"identifier": identifier} + | ^^^^^^^^^^" +`; + +exports[`snippet: #33 [json-stringify] format 1`] = ` +"Identifier 'identifier' is not allowed in JSON. (1:16) +> 1 | {"identifier": identifier} + | ^^^^^^^^^^" +`; + +exports[`snippet: #33 [json5] format 1`] = ` +"Identifier 'identifier' is not allowed in JSON. (1:16) +> 1 | {"identifier": identifier} + | ^^^^^^^^^^" +`; + +exports[`snippet: #34 [json] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | (1) + | ^^^" +`; + +exports[`snippet: #34 [json-stringify] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | (1) + | ^^^" +`; + +exports[`snippet: #34 [json5] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | (1) + | ^^^" +`; + +exports[`snippet: #35 [json] format 1`] = ` +"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2) +> 1 | +(1) + | ^^^" +`; + +exports[`snippet: #35 [json-stringify] format 1`] = ` +"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2) +> 1 | +(1) + | ^^^" +`; + +exports[`snippet: #35 [json5] format 1`] = ` +"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2) +> 1 | +(1) + | ^^^" +`; + +exports[`snippet: #36 [json] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | ([1,]) + | ^^^^^^" +`; + +exports[`snippet: #36 [json-stringify] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | ([1,]) + | ^^^^^^" +`; + +exports[`snippet: #36 [json5] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:1) +> 1 | ([1,]) + | ^^^^^^" +`; + +exports[`snippet: #37 [json] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:5) +> 1 | [1, (2)] + | ^^^" +`; + +exports[`snippet: #37 [json-stringify] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:5) +> 1 | [1, (2)] + | ^^^" +`; + +exports[`snippet: #37 [json5] format 1`] = ` +"'ParenthesizedExpression' is not allowed in JSON. (1:5) +> 1 | [1, (2)] + | ^^^" +`; + +exports[`snippet: #38 [json] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:5) +> 1 | ----123 + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" +`; + +exports[`snippet: #38 [json-stringify] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:5) +> 1 | ----123 + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" +`; + +exports[`snippet: #38 [json5] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:5) +> 1 | ----123 + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" +`; diff --git a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8976835c938c..000000000000 --- a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,619 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`snippet: #0 [json] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {foo} - | ^^^" -`; - -exports[`snippet: #0 [json-stringify] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {foo} - | ^^^" -`; - -exports[`snippet: #0 [json5] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {foo} - | ^^^" -`; - -exports[`snippet: #1 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {["foo"]:"bar"} - | ^^^^^" -`; - -exports[`snippet: #1 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {["foo"]:"bar"} - | ^^^^^" -`; - -exports[`snippet: #1 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {["foo"]:"bar"} - | ^^^^^" -`; - -exports[`snippet: #2 [json] format 1`] = ` -"Operator '~' is not allowed in JSON. (1:9) -> 1 | {"foo": ~1} - | ^^" -`; - -exports[`snippet: #2 [json-stringify] format 1`] = ` -"Operator '~' is not allowed in JSON. (1:9) -> 1 | {"foo": ~1} - | ^^" -`; - -exports[`snippet: #2 [json5] format 1`] = ` -"Operator '~' is not allowed in JSON. (1:9) -> 1 | {"foo": ~1} - | ^^" -`; - -exports[`snippet: #3 [json] format 1`] = ` -"'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": false || "bar"} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #3 [json-stringify] format 1`] = ` -"'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": false || "bar"} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #3 [json5] format 1`] = ` -"'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": false || "bar"} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #4 [json] format 1`] = ` -"'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": () => {}} - | ^^^^^^^^" -`; - -exports[`snippet: #4 [json-stringify] format 1`] = ` -"'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": () => {}} - | ^^^^^^^^" -`; - -exports[`snippet: #4 [json5] format 1`] = ` -"'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {"foo": () => {}} - | ^^^^^^^^" -`; - -exports[`snippet: #5 [json] format 1`] = ` -"Expecting Unicode escape sequence \\uXXXX. (1:10) -> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" -`; - -exports[`snippet: #5 [json-stringify] format 1`] = ` -"Expecting Unicode escape sequence \\uXXXX. (1:10) -> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" -`; - -exports[`snippet: #5 [json5] format 1`] = ` -"Expecting Unicode escape sequence \\uXXXX. (1:10) -> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" -`; - -exports[`snippet: #6 [json] format 1`] = ` -"'BinaryExpression' is not allowed in JSON. (1:1) -> 1 | 1+2 - | ^^^" -`; - -exports[`snippet: #6 [json-stringify] format 1`] = ` -"'BinaryExpression' is not allowed in JSON. (1:1) -> 1 | 1+2 - | ^^^" -`; - -exports[`snippet: #6 [json5] format 1`] = ` -"'BinaryExpression' is not allowed in JSON. (1:1) -> 1 | 1+2 - | ^^^" -`; - -exports[`snippet: #7 [json] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {Infinity} - | ^^^^^^^^" -`; - -exports[`snippet: #7 [json-stringify] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {Infinity} - | ^^^^^^^^" -`; - -exports[`snippet: #7 [json5] format 1`] = ` -"Shorthand property is not allowed in JSON. (1:2) -> 1 | {Infinity} - | ^^^^^^^^" -`; - -exports[`snippet: #8 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key]: 1} - | ^^^" -`; - -exports[`snippet: #8 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key]: 1} - | ^^^" -`; - -exports[`snippet: #8 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key]: 1} - | ^^^" -`; - -exports[`snippet: #9 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key()]: 1} - | ^^^^^" -`; - -exports[`snippet: #9 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key()]: 1} - | ^^^^^" -`; - -exports[`snippet: #9 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[key()]: 1} - | ^^^^^" -`; - -exports[`snippet: #10 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['CallExpression']: 1} - | ^^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #10 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['CallExpression']: 1} - | ^^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #10 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['CallExpression']: 1} - | ^^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #11 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['StringLiteral']: 1} - | ^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #11 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['StringLiteral']: 1} - | ^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #11 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['StringLiteral']: 1} - | ^^^^^^^^^^^^^^^" -`; - -exports[`snippet: #12 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['string']: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #12 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['string']: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #12 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {['string']: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #13 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[1]: 1} - | ^" -`; - -exports[`snippet: #13 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[1]: 1} - | ^" -`; - -exports[`snippet: #13 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[1]: 1} - | ^" -`; - -exports[`snippet: #14 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[Infinity]: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #14 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[Infinity]: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #14 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[Infinity]: 1} - | ^^^^^^^^" -`; - -exports[`snippet: #15 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[-Infinity]: 1} - | ^^^^^^^^^" -`; - -exports[`snippet: #15 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[-Infinity]: 1} - | ^^^^^^^^^" -`; - -exports[`snippet: #15 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[-Infinity]: 1} - | ^^^^^^^^^" -`; - -exports[`snippet: #16 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[{key: 'value'}]: 1} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #16 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[{key: 'value'}]: 1} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #16 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[{key: 'value'}]: 1} - | ^^^^^^^^^^^^^^" -`; - -exports[`snippet: #17 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[[]]: 1} - | ^^" -`; - -exports[`snippet: #17 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[[]]: 1} - | ^^" -`; - -exports[`snippet: #17 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[[]]: 1} - | ^^" -`; - -exports[`snippet: #18 [json] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[null]: 1} - | ^^^^" -`; - -exports[`snippet: #18 [json-stringify] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[null]: 1} - | ^^^^" -`; - -exports[`snippet: #18 [json5] format 1`] = ` -"Computed key is not allowed in JSON. (1:3) -> 1 | {[null]: 1} - | ^^^^" -`; - -exports[`snippet: #19 [json] format 1`] = ` -"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) -> 1 | {key: +foo()} - | ^^^^^" -`; - -exports[`snippet: #19 [json-stringify] format 1`] = ` -"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) -> 1 | {key: +foo()} - | ^^^^^" -`; - -exports[`snippet: #19 [json5] format 1`] = ` -"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8) -> 1 | {key: +foo()} - | ^^^^^" -`; - -exports[`snippet: #20 [json] format 1`] = ` -"Operator 'void' is not allowed in JSON. (1:7) -> 1 | {key: void foo()} - | ^^^^^^^^^^" -`; - -exports[`snippet: #20 [json-stringify] format 1`] = ` -"Operator 'void' is not allowed in JSON. (1:7) -> 1 | {key: void foo()} - | ^^^^^^^^^^" -`; - -exports[`snippet: #20 [json5] format 1`] = ` -"Operator 'void' is not allowed in JSON. (1:7) -> 1 | {key: void foo()} - | ^^^^^^^^^^" -`; - -exports[`snippet: #21 [json] format 1`] = ` -"Unexpected token (1:1) -> 1 | #!/usr/bin/env node - | ^ - 2 | {}" -`; - -exports[`snippet: #21 [json-stringify] format 1`] = ` -"Unexpected token (1:1) -> 1 | #!/usr/bin/env node - | ^ - 2 | {}" -`; - -exports[`snippet: #21 [json5] format 1`] = ` -"Unexpected token (1:1) -> 1 | #!/usr/bin/env node - | ^ - 2 | {}" -`; - -exports[`snippet: #22 [json] format 1`] = ` -"Unexpected token (2:1) - 1 | "use strict" -> 2 | {} - | ^" -`; - -exports[`snippet: #22 [json-stringify] format 1`] = ` -"Unexpected token (2:1) - 1 | "use strict" -> 2 | {} - | ^" -`; - -exports[`snippet: #22 [json5] format 1`] = ` -"Unexpected token (2:1) - 1 | "use strict" -> 2 | {} - | ^" -`; - -exports[`snippet: #23 [json] format 1`] = ` -"Unexpected token (1:14) -> 1 | /* comment */ - | ^" -`; - -exports[`snippet: #23 [json-stringify] format 1`] = ` -"Unexpected token (1:14) -> 1 | /* comment */ - | ^" -`; - -exports[`snippet: #23 [json5] format 1`] = ` -"Unexpected token (1:14) -> 1 | /* comment */ - | ^" -`; - -exports[`snippet: #24 [json] format 1`] = ` -"Unexpected token (1:11) -> 1 | // comment - | ^" -`; - -exports[`snippet: #24 [json-stringify] format 1`] = ` -"Unexpected token (1:11) -> 1 | // comment - | ^" -`; - -exports[`snippet: #24 [json5] format 1`] = ` -"Unexpected token (1:11) -> 1 | // comment - | ^" -`; - -exports[`snippet: #25 [json] format 1`] = ` -"'TemplateLiteral' with expression is not allowed in JSON. (1:7) -> 1 | \`foo\${1}bar\` - | ^" -`; - -exports[`snippet: #25 [json-stringify] format 1`] = ` -"'TemplateLiteral' with expression is not allowed in JSON. (1:7) -> 1 | \`foo\${1}bar\` - | ^" -`; - -exports[`snippet: #25 [json5] format 1`] = ` -"'TemplateLiteral' with expression is not allowed in JSON. (1:7) -> 1 | \`foo\${1}bar\` - | ^" -`; - -exports[`snippet: #26 [json] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+1 - | ^^" -`; - -exports[`snippet: #26 [json-stringify] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+1 - | ^^" -`; - -exports[`snippet: #26 [json5] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+1 - | ^^" -`; - -exports[`snippet: #27 [json] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+Infinity - | ^^^^^^^^^" -`; - -exports[`snippet: #27 [json-stringify] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+Infinity - | ^^^^^^^^^" -`; - -exports[`snippet: #27 [json5] format 1`] = ` -"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2) -> 1 | -+Infinity - | ^^^^^^^^^" -`; - -exports[`snippet: #28 [json] format 1`] = ` -"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) -> 1 | -undefined - | ^^^^^^^^^" -`; - -exports[`snippet: #28 [json-stringify] format 1`] = ` -"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) -> 1 | -undefined - | ^^^^^^^^^" -`; - -exports[`snippet: #28 [json5] format 1`] = ` -"Operator '-' before 'Identifier' is not allowed in JSON. (1:2) -> 1 | -undefined - | ^^^^^^^^^" -`; - -exports[`snippet: #29 [json] format 1`] = ` -"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) -> 1 | -null - | ^^^^" -`; - -exports[`snippet: #29 [json-stringify] format 1`] = ` -"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) -> 1 | -null - | ^^^^" -`; - -exports[`snippet: #29 [json5] format 1`] = ` -"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2) -> 1 | -null - | ^^^^" -`; - -exports[`snippet: #30 [json] format 1`] = ` -"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) -> 1 | -false - | ^^^^^" -`; - -exports[`snippet: #30 [json-stringify] format 1`] = ` -"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) -> 1 | -false - | ^^^^^" -`; - -exports[`snippet: #30 [json5] format 1`] = ` -"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2) -> 1 | -false - | ^^^^^" -`; - -exports[`snippet: #31 [json] format 1`] = ` -"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) -> 1 | +'string' - | ^^^^^^^^" -`; - -exports[`snippet: #31 [json-stringify] format 1`] = ` -"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) -> 1 | +'string' - | ^^^^^^^^" -`; - -exports[`snippet: #31 [json5] format 1`] = ` -"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2) -> 1 | +'string' - | ^^^^^^^^" -`; - -exports[`snippet: #32 [json] format 1`] = ` -"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) -> 1 | {key: +{}} - | ^^" -`; - -exports[`snippet: #32 [json-stringify] format 1`] = ` -"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) -> 1 | {key: +{}} - | ^^" -`; - -exports[`snippet: #32 [json5] format 1`] = ` -"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8) -> 1 | {key: +{}} - | ^^" -`; - -exports[`snippet: #33 [json] format 1`] = ` -"Invalid left-hand side in prefix operation. (1:5) -> 1 | ----123 - | ^" -`; - -exports[`snippet: #33 [json-stringify] format 1`] = ` -"Invalid left-hand side in prefix operation. (1:5) -> 1 | ----123 - | ^" -`; - -exports[`snippet: #33 [json5] format 1`] = ` -"Invalid left-hand side in prefix operation. (1:5) -> 1 | ----123 - | ^" -`; diff --git a/tests/format/misc/errors/json/format.test.js b/tests/format/misc/errors/json/format.test.js new file mode 100644 index 000000000000..bb048b1fe7e8 --- /dev/null +++ b/tests/format/misc/errors/json/format.test.js @@ -0,0 +1,126 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "{foo}", + '{["foo"]:"bar"}', + '{"foo": ~1}', + '{"foo": false || "bar"}', + '{"foo": () => {}}', + String.raw`packages\the-hub\cypress\fixtures\gridConfiguration.json`, + "1+2", + "{Infinity}", + "{[key]: 1}", + "{[key()]: 1}", + "{['CallExpression']: 1}", + "{['StringLiteral']: 1}", + "{['string']: 1}", + "{[1]: 1}", + "{[Infinity]: 1}", + "{[-Infinity]: 1}", + "{[{key: 'value'}]: 1}", + "{[[]]: 1}", + "{[null]: 1}", + "{key: +foo()}", + "{key: void foo()}", + "#!/usr/bin/env node\n{}", + '"use strict"\n{}', + "/* comment */", + "// comment", + "`foo${1}bar`", + "-+1", + "-+Infinity", + "-undefined", + "-null", + "-false", + "+'string'", + "{key: +{}}", + '{"identifier": identifier}', + "(1)", + "+(1)", + "([1,])", + "[1, (2)]", + // JSON6 allow this, but babel can't parse + "----123", + ], + }, + ["json", "json5", "json-stringify"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // Invalid JS expressions + "[class {set foo() {}}]", + "[class {foo() {this.#bar}}]", + "[function(){ await 1 }]", + // Should not mention babel plugin in error message + // plugin `doExpressions` + "[do {}]", + // plugin `exportDefaultFrom` + "[function() {export a from 'a'}]", + "export a from 'a'", + // plugin `functionBind` + "[a::b]", + // plugin `functionSent` + "[function*() {function.sent}]", + // plugin `throwExpressions` + "[throw {}]", + // plugin `partialApplication` + "[foo(?)]", + // plugin `decorators` + "[@decorator class {}]", + // plugin `importAssertions` + "[import('a', {type:'json'})]", + // plugin `decimal` + "[1m]", + // plugin `moduleBlocks` + "[module {}]", + // plugin `asyncDoExpressions` + "[async do {}]", + // plugin `regexpUnicodeSets` + "[/a/v]", + // plugin `destructuringPrivate` + "[class {#foo;bar() {const {#foo: foo} = this;}}]", + // plugin `decoratorAutoAccessors` + "[class {accessor foo = 1}]", + // plugin `importReflection` + "[import('a', {reflect: 'module'})]", + "import module a from 'a'", + // plugin `explicitResourceManagement` + "[function() { {using a = b} }]", + "{using a = b}", + // plugin `recordAndTuple` + "[#[]]", + "[#{}]", + // plugin `v8intrinsic` + "[foo%bar()]", + // plugin `pipelineOperator` + "['foo' |> bar]", + "['foo' |> bar(%)]", + // plugin `jsx` + "[<foo></foo>]", + ], + }, + ["json"], +); + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "[", + ";", + '"string";', + '"string"\n;', + "/* comment */[", + "/* comment */;", + '/* comment */"string";', + '/* comment */"string"\n;', + "#!/usr/bin/env node", + "#!/usr/bin/env node\n[]", + ], + }, + ["json", "json5", "jsonc", "json-stringify"], +); diff --git a/tests/format/misc/errors/json/jsfmt.spec.js b/tests/format/misc/errors/json/jsfmt.spec.js deleted file mode 100644 index 0b413f082389..000000000000 --- a/tests/format/misc/errors/json/jsfmt.spec.js +++ /dev/null @@ -1,43 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "{foo}", - '{["foo"]:"bar"}', - '{"foo": ~1}', - '{"foo": false || "bar"}', - '{"foo": () => {}}', - "packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json", - "1+2", - "{Infinity}", - "{[key]: 1}", - "{[key()]: 1}", - "{['CallExpression']: 1}", - "{['StringLiteral']: 1}", - "{['string']: 1}", - "{[1]: 1}", - "{[Infinity]: 1}", - "{[-Infinity]: 1}", - "{[{key: 'value'}]: 1}", - "{[[]]: 1}", - "{[null]: 1}", - "{key: +foo()}", - "{key: void foo()}", - "#!/usr/bin/env node\n{}", - '"use strict"\n{}', - "/* comment */", - "// comment", - "`foo${1}bar`", - "-+1", - "-+Infinity", - "-undefined", - "-null", - "-false", - "+'string'", - "{key: +{}}", - // JSON6 allow this, but babel can't parse - "----123", - ], - }, - ["json", "json5", "json-stringify"] -); diff --git a/tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/json/json-stringify/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/errors/json/json-stringify/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/errors/json/json-stringify/format.test.js b/tests/format/misc/errors/json/json-stringify/format.test.js new file mode 100644 index 000000000000..f7959cd9f4c4 --- /dev/null +++ b/tests/format/misc/errors/json/json-stringify/format.test.js @@ -0,0 +1,11 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + '/* comment */{"foo": 1}', + '// comment\n{"foo": 1}', + '{"foo": /* comment */ 1}', + ], + }, + ["json-stringify"], +); diff --git a/tests/format/misc/errors/json/json-stringify/jsfmt.spec.js b/tests/format/misc/errors/json/json-stringify/jsfmt.spec.js deleted file mode 100644 index 0ecb266a2842..000000000000 --- a/tests/format/misc/errors/json/json-stringify/jsfmt.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - '/* comment */{"foo": 1}', - '// comment\n{"foo": 1}', - '{"foo": /* comment */ 1}', - ], - }, - ["json-stringify"] -); diff --git a/tests/format/misc/errors/less/__snapshots__/format.test.js.snap b/tests/format/misc/errors/less/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..876471ee459c --- /dev/null +++ b/tests/format/misc/errors/less/__snapshots__/format.test.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inline-comment.less [less] format 1`] = ` +"CssSyntaxError: Unknown word inline (5:4) + 3 | a{ + 4 | prop +> 5 | // inline + | ^ + 6 | : + 7 | value; + 8 | } +Cause: <css input>:5:4: Unknown word inline" +`; + +exports[`open-double-quote.less [less] format 1`] = ` +"CssSyntaxError: Unclosed string (2:17) + 1 | a { +> 2 | background: url(" + | ^ + 3 | } + 4 | +Cause: <css input>:2:17: Unclosed string" +`; + +exports[`open-sigle-quote.less [less] format 1`] = ` +"CssSyntaxError: Unclosed string (2:17) + 1 | a { +> 2 | background: url(' + | ^ + 3 | } + 4 | +Cause: <css input>:2:17: Unclosed string" +`; + +exports[`scss-syntax.scss [less] format 1`] = ` +"CssSyntaxError: Unknown word $foo (1:15) +> 1 | a {content: #{$foo}} + | ^ + 2 | +Cause: <css input>:1:15: Unknown word $foo" +`; diff --git a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3e407275f81c..000000000000 --- a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`inline-comment.less [less] format 1`] = ` -"CssSyntaxError: Unknown word (5:4) - 3 | a{ - 4 | prop -> 5 | // inline - | ^ - 6 | : - 7 | value; - 8 | }" -`; - -exports[`open-double-quote.less [less] format 1`] = ` -"CssSyntaxError: Unclosed string (2:17) - 1 | a { -> 2 | background: url(" - | ^ - 3 | } - 4 |" -`; - -exports[`open-sigle-quote.less [less] format 1`] = ` -"CssSyntaxError: Unclosed string (2:17) - 1 | a { -> 2 | background: url(' - | ^ - 3 | } - 4 |" -`; diff --git a/tests/format/misc/errors/less/format.test.js b/tests/format/misc/errors/less/format.test.js new file mode 100644 index 000000000000..82c70eb1bedf --- /dev/null +++ b/tests/format/misc/errors/less/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["less"]); diff --git a/tests/format/misc/errors/less/jsfmt.spec.js b/tests/format/misc/errors/less/jsfmt.spec.js deleted file mode 100644 index 73b809901fce..000000000000 --- a/tests/format/misc/errors/less/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["less"]); diff --git a/tests/format/misc/errors/less/scss-syntax.scss b/tests/format/misc/errors/less/scss-syntax.scss new file mode 100644 index 000000000000..b3d023332364 --- /dev/null +++ b/tests/format/misc/errors/less/scss-syntax.scss @@ -0,0 +1 @@ +a {content: #{$foo}} diff --git a/tests/format/misc/errors/scss/__snapshots__/format.test.js.snap b/tests/format/misc/errors/scss/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..18d591f404ac --- /dev/null +++ b/tests/format/misc/errors/scss/__snapshots__/format.test.js.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`less-syntax.less [scss] format 1`] = ` +"CssSyntaxError: Unknown word .bordered (1:4) +> 1 | a {.bordered();} + | ^ + 2 | +Cause: <css input>:1:4: Unknown word .bordered" +`; diff --git a/tests/format/misc/errors/scss/format.test.js b/tests/format/misc/errors/scss/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/misc/errors/scss/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/misc/errors/scss/less-syntax.less b/tests/format/misc/errors/scss/less-syntax.less new file mode 100644 index 000000000000..c093b5027076 --- /dev/null +++ b/tests/format/misc/errors/scss/less-syntax.less @@ -0,0 +1 @@ +a {.bordered();} diff --git a/tests/format/misc/errors/typescript/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8bbbfec421f8 --- /dev/null +++ b/tests/format/misc/errors/typescript/__snapshots__/format.test.js.snap @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declare-getter.ts [typescript] format 1`] = ` +"'declare' modifier cannot appear on class elements of this kind. (2:3) + 1 | class Foo { +> 2 | declare get foo() + | ^^^^^^^ + 3 | } + 4 | +Cause: 'declare' modifier cannot appear on class elements of this kind." +`; + +exports[`declare-setter.ts [typescript] format 1`] = ` +"'declare' modifier cannot appear on class elements of this kind. (2:3) + 1 | class Foo { +> 2 | declare set foo(v) + | ^^^^^^^ + 3 | } + 4 | +Cause: 'declare' modifier cannot appear on class elements of this kind." +`; + +exports[`default-escaped.ts [typescript] format 1`] = ` +"Declaration or statement expected. (1:1) +> 1 | export asyn\\u{63} from "async"; + | ^ + 2 | +Cause: Declaration or statement expected." +`; + +exports[`export-declare.ts [typescript] format 1`] = ` +"Declaration or statement expected. (1:1) +> 1 | export declare foo; + | ^ + 2 | +Cause: Declaration or statement expected." +`; + +exports[`invalid-jsx-1.tsx [typescript] format 1`] = ` +"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (3:45) + 1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters + 2 | +> 3 | let directions = <div>Navigate to: Menu Bar > Tools > Options</div> + | ^ + 4 | +Cause: Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`?" +`; + +exports[`module-attributes-static.ts [typescript] format 1`] = ` +"'{' expected. (1:33) +> 1 | import foo from "foo.json" with type: "json"; + | ^ + 2 | +Cause: '{' expected." +`; + +exports[`newline-before-arrow.ts [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | async x + | ^ + 2 | => x + 3 | +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`? (1:15) +> 1 | let x1 = <div>}</div>; + | ^ +Cause: Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`?" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (1:15) +> 1 | let x2 = <div>></div>; + | ^ +Cause: Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`?" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"':' expected. (1:21) +> 1 | let x3 = <div>{"foo"}}</div>; + | ^ +Cause: ':' expected." +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"':' expected. (1:21) +> 1 | let x4 = <div>{"foo"}></div>; + | ^ +Cause: ':' expected." +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"Expression expected. (1:15) +> 1 | let x5 = <div>}{"foo"}</div>; + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #5 [typescript] format 1`] = ` +"Expression expected. (1:15) +> 1 | let x6 = <div>>{"foo"}</div>; + | ^ +Cause: Expression expected." +`; + +exports[`value-of-abstract-property.ts [typescript] format 1`] = ` +"Abstract property cannot have an initializer. (2:19) + 1 | abstract class Foo { +> 2 | abstract prop = 3; + | ^ + 3 | } + 4 | +Cause: Abstract property cannot have an initializer." +`; diff --git a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e5586b5f98da..000000000000 --- a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,84 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`default-escaped.ts [typescript] format 1`] = ` -"Declaration or statement expected. (1:1) -> 1 | export asyn\\u{63} from "async"; - | ^ - 2 |" -`; - -exports[`export-declare.ts [typescript] format 1`] = ` -"Declaration or statement expected. (1:1) -> 1 | export declare foo; - | ^ - 2 |" -`; - -exports[`invalid-jsx-1.ts [typescript] format 1`] = ` -"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (3:45) - 1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters - 2 | -> 3 | let directions = <div>Navigate to: Menu Bar > Tools > Options</div> - | ^ - 4 |" -`; - -exports[`module-attributes-static.ts [typescript] format 1`] = ` -"';' expected. (1:28) -> 1 | import foo from "foo.json" with type: "json"; - | ^ - 2 |" -`; - -exports[`newline-before-arrow.ts [typescript] format 1`] = ` -"Unexpected keyword or identifier. (1:1) -> 1 | async x - | ^ - 2 | => x - 3 |" -`; - -exports[`snippet: #0 [typescript] format 1`] = ` -"Unexpected token. Did you mean \`{'}'}\` or \`&rbrace;\`? (1:15) -> 1 | let x1 = <div>}</div>; - | ^" -`; - -exports[`snippet: #1 [typescript] format 1`] = ` -"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (1:15) -> 1 | let x2 = <div>></div>; - | ^" -`; - -exports[`snippet: #2 [typescript] format 1`] = ` -"':' expected. (1:21) -> 1 | let x3 = <div>{"foo"}}</div>; - | ^" -`; - -exports[`snippet: #3 [typescript] format 1`] = ` -"':' expected. (1:21) -> 1 | let x4 = <div>{"foo"}></div>; - | ^" -`; - -exports[`snippet: #4 [typescript] format 1`] = ` -"Expression expected. (1:15) -> 1 | let x5 = <div>}{"foo"}</div>; - | ^" -`; - -exports[`snippet: #5 [typescript] format 1`] = ` -"Expression expected. (1:15) -> 1 | let x6 = <div>>{"foo"}</div>; - | ^" -`; - -exports[`value-of-abstract-property.ts [typescript] format 1`] = ` -"Abstract property cannot have an initializer (2:3) - 1 | abstract class Foo { -> 2 | abstract prop = 3; - | ^^^^^^^^^^^^^^^^^^ - 3 | } - 4 |" -`; diff --git a/tests/format/misc/errors/typescript/babel-ts/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/babel-ts/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d1bc9fc986f4 --- /dev/null +++ b/tests/format/misc/errors/typescript/babel-ts/__snapshots__/format.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`abstract.ts [babel-ts] format 1`] = ` +"Method 'foo' cannot have an implementation because it is marked abstract. (2:5) + 1 | class A { +> 2 | abstract foo() {} + | ^ + 3 | } +Cause: Method 'foo' cannot have an implementation because it is marked abstract. (2:4)" +`; + +exports[`classAbstractMethodWithImplementation.ts [babel-ts] format 1`] = ` +"Method 'foo' cannot have an implementation because it is marked abstract. (2:5) + 1 | abstract class A { +> 2 | abstract foo() {} + | ^ + 3 | } +Cause: Method 'foo' cannot have an implementation because it is marked abstract. (2:4)" +`; + +exports[`declare-accessor.ts [babel-ts] format 1`] = ` +"'declare' is not allowed in getters. (2:3) + 1 | class Foo { +> 2 | declare get foo() + | ^ + 3 | declare set foo(v) + 4 | } + 5 | +Cause: 'declare' is not allowed in getters. (2:2)" +`; + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Invalid left-hand side in assignment expression. (1:1) +> 1 | foo as any = 10; + | ^ +Cause: Invalid left-hand side in assignment expression. (1:0)" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Invalid left-hand side in assignment expression. (1:7) +> 1 | ({ a: b as any = 2000 } = x); + | ^ +Cause: Invalid left-hand side in assignment expression. (1:6)" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unterminated JSX contents. (1:9) +> 1 | <string>foo = '100'; + | ^ +Cause: Unterminated JSX contents. (1:8)" +`; diff --git a/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c0cb2df8ca2e..000000000000 --- a/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,45 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract.ts [babel-ts] format 1`] = ` -"Method 'foo' cannot have an implementation because it is marked abstract. (2:5) - 1 | class A { -> 2 | abstract foo() {} - | ^ - 3 | }" -`; - -exports[`classAbstractMethodWithImplementation.ts [babel-ts] format 1`] = ` -"Method 'foo' cannot have an implementation because it is marked abstract. (2:5) - 1 | abstract class A { -> 2 | abstract foo() {} - | ^ - 3 | }" -`; - -exports[`declare-accessor.ts [babel-ts] format 1`] = ` -"'declare' is not allowed in getters. (2:3) - 1 | class Foo { -> 2 | declare get foo() - | ^ - 3 | declare set foo(v) - 4 | } - 5 |" -`; - -exports[`snippet: #0 [babel-ts] format 1`] = ` -"Invalid left-hand side in assignment expression. (1:1) -> 1 | foo as any = 10; - | ^" -`; - -exports[`snippet: #1 [babel-ts] format 1`] = ` -"Invalid left-hand side in assignment expression. (1:7) -> 1 | ({ a: b as any = 2000 } = x); - | ^" -`; - -exports[`snippet: #2 [babel-ts] format 1`] = ` -"Unterminated JSX contents. (1:9) -> 1 | <string>foo = '100'; - | ^" -`; diff --git a/tests/format/misc/errors/typescript/babel-ts/format.test.js b/tests/format/misc/errors/typescript/babel-ts/format.test.js new file mode 100644 index 000000000000..f1587bd174bd --- /dev/null +++ b/tests/format/misc/errors/typescript/babel-ts/format.test.js @@ -0,0 +1,11 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "foo as any = 10;", + "({ a: b as any = 2000 } = x);", + "<string>foo = '100';", + ], + }, + ["babel-ts"], +); diff --git a/tests/format/misc/errors/typescript/babel-ts/jsfmt.spec.js b/tests/format/misc/errors/typescript/babel-ts/jsfmt.spec.js deleted file mode 100644 index fc9e2ba086e8..000000000000 --- a/tests/format/misc/errors/typescript/babel-ts/jsfmt.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "foo as any = 10;", - "({ a: b as any = 2000 } = x);", - "<string>foo = '100';", - ], - }, - ["babel-ts"] -); diff --git a/tests/format/misc/errors/typescript/catch-clause-with-initializer/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/catch-clause-with-initializer/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..238793edec40 --- /dev/null +++ b/tests/format/misc/errors/typescript/catch-clause-with-initializer/__snapshots__/format.test.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`catch-clause-with-initializer.ts [babel-ts] format 1`] = ` +"Unexpected token, expected ")" (3:10) + 1 | try { + 2 | } +> 3 | catch (e = 1) { + | ^ + 4 | } + 5 | +Cause: Unexpected token, expected ")" (3:9)" +`; + +exports[`catch-clause-with-initializer.ts [typescript] format 1`] = ` +"Catch clause variable cannot have an initializer. (3:12) + 1 | try { + 2 | } +> 3 | catch (e = 1) { + | ^ + 4 | } + 5 | +Cause: Catch clause variable cannot have an initializer." +`; diff --git a/tests/format/misc/errors/typescript/catch-clause-with-initializer/catch-clause-with-initializer.ts b/tests/format/misc/errors/typescript/catch-clause-with-initializer/catch-clause-with-initializer.ts new file mode 100644 index 000000000000..c323632adfe1 --- /dev/null +++ b/tests/format/misc/errors/typescript/catch-clause-with-initializer/catch-clause-with-initializer.ts @@ -0,0 +1,4 @@ +try { +} +catch (e = 1) { +} diff --git a/tests/format/misc/errors/typescript/catch-clause-with-initializer/format.test.js b/tests/format/misc/errors/typescript/catch-clause-with-initializer/format.test.js new file mode 100644 index 000000000000..083abcf04619 --- /dev/null +++ b/tests/format/misc/errors/typescript/catch-clause-with-initializer/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts", "typescript"]); diff --git a/tests/format/misc/errors/typescript/declare-function-with-body/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/declare-function-with-body/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f463e1c22430 --- /dev/null +++ b/tests/format/misc/errors/typescript/declare-function-with-body/__snapshots__/format.test.js.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"An implementation cannot be declared in ambient contexts. (1:1) +> 1 | declare function foo() {} + | ^ +Cause: An implementation cannot be declared in ambient contexts. (1:0)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"An implementation cannot be declared in ambient contexts. (1:1) +> 1 | declare function foo() {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +Cause: An implementation cannot be declared in ambient contexts." +`; diff --git a/tests/format/misc/errors/typescript/declare-function-with-body/format.test.js b/tests/format/misc/errors/typescript/declare-function-with-body/format.test.js new file mode 100644 index 000000000000..1562b91216fd --- /dev/null +++ b/tests/format/misc/errors/typescript/declare-function-with-body/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["declare function foo() {}"], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/declare-getter.ts b/tests/format/misc/errors/typescript/declare-getter.ts new file mode 100644 index 000000000000..4f346f4033b9 --- /dev/null +++ b/tests/format/misc/errors/typescript/declare-getter.ts @@ -0,0 +1,3 @@ +class Foo { + declare get foo() +} diff --git a/tests/format/misc/errors/typescript/declare-setter.ts b/tests/format/misc/errors/typescript/declare-setter.ts new file mode 100644 index 000000000000..8ff17fdc73db --- /dev/null +++ b/tests/format/misc/errors/typescript/declare-setter.ts @@ -0,0 +1,3 @@ +class Foo { + declare set foo(v) +} diff --git a/tests/format/misc/errors/typescript/decrement-and-increment-operators/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/decrement-and-increment-operators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3490a208132a --- /dev/null +++ b/tests/format/misc/errors/typescript/decrement-and-increment-operators/__snapshots__/format.test.js.snap @@ -0,0 +1,253 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:1) +> 1 | 1 ++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:0)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | 1 ++ + | ^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (1)++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (1)++ + | ^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (1)-- + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (1)-- + | ^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | ++(1) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | ++(1) + | ^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #4 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | --(1) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | --(1) + | ^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #5 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (1 + 2)++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #5 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (1 + 2)++ + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #6 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (1 + 2)-- + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #6 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (1 + 2)-- + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #7 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | ++(1 + 2) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #7 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | ++(1 + 2) + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #8 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | --(1 + 2) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #8 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | --(1 + 2) + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #9 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (x + x)++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #9 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (x + x)++ + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #10 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (x + x)-- + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #10 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (x + x)-- + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #11 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | ++(x + x) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #11 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | ++(x + x) + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #12 [babel-ts] format 1`] = ` +"Invalid left-hand side in prefix operation. (1:4) +> 1 | --(x + x) + | ^ +Cause: Invalid left-hand side in prefix operation. (1:3)" +`; + +exports[`snippet: #12 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:3) +> 1 | --(x + x) + | ^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #13 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:1) +> 1 | a()++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:0)" +`; + +exports[`snippet: #13 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | a()++ + | ^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #14 [babel-ts] format 1`] = ` +"Invalid optional chaining in the left-hand side of postfix operation. (1:1) +> 1 | x?.y++ + | ^ +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" +`; + +exports[`snippet: #14 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | x?.y++ + | ^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #15 [babel-ts] format 1`] = ` +"Invalid optional chaining in the left-hand side of postfix operation. (1:1) +> 1 | x?.y.z++ + | ^ +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" +`; + +exports[`snippet: #15 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | x?.y.z++ + | ^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #16 [babel-ts] format 1`] = ` +"Invalid optional chaining in the left-hand side of postfix operation. (1:1) +> 1 | x?.y().z++ + | ^ +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" +`; + +exports[`snippet: #16 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | x?.y().z++ + | ^^^^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; + +exports[`snippet: #17 [babel-ts] format 1`] = ` +"Invalid left-hand side in postfix operation. (1:2) +> 1 | (a())++ + | ^ +Cause: Invalid left-hand side in postfix operation. (1:1)" +`; + +exports[`snippet: #17 [typescript] format 1`] = ` +"Invalid left-hand side expression in unary operation (1:1) +> 1 | (a())++ + | ^^^^^ +Cause: Invalid left-hand side expression in unary operation" +`; diff --git a/tests/format/misc/errors/typescript/decrement-and-increment-operators/format.test.js b/tests/format/misc/errors/typescript/decrement-and-increment-operators/format.test.js new file mode 100644 index 000000000000..583f60954fca --- /dev/null +++ b/tests/format/misc/errors/typescript/decrement-and-increment-operators/format.test.js @@ -0,0 +1,33 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "1 ++", + + "(1)++", + "(1)--", + + "++(1)", + "--(1)", + + "(1 + 2)++", + "(1 + 2)--", + + "++(1 + 2)", + "--(1 + 2)", + + "(x + x)++", + "(x + x)--", + + "++(x + x)", + "--(x + x)", + + "a()++", + "x?.y++", + "x?.y.z++", + "x?.y().z++", + "(a())++", + ], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..fd0113c5da3d --- /dev/null +++ b/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'protected'. (1:18) +> 1 | class A {private protected method(){}} + | ^ +Cause: Accessibility modifier already seen: 'protected'. (1:17)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:18) +> 1 | class A {private protected method(){}} + | ^^^^^^^^^ +Cause: Accessibility modifier already seen." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'public'. (1:20) +> 1 | class A {protected public method(){}} + | ^ +Cause: Accessibility modifier already seen: 'public'. (1:19)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:20) +> 1 | class A {protected public method(){}} + | ^^^^^^ +Cause: Accessibility modifier already seen." +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'private'. (1:18) +> 1 | class A {private private method(){}} + | ^ +Cause: Accessibility modifier already seen: 'private'. (1:17)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:18) +> 1 | class A {private private method(){}} + | ^^^^^^^ +Cause: Accessibility modifier already seen." +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'protected'. (1:18) +> 1 | class A {private protected property} + | ^ +Cause: Accessibility modifier already seen: 'protected'. (1:17)" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:18) +> 1 | class A {private protected property} + | ^^^^^^^^^ +Cause: Accessibility modifier already seen." +`; + +exports[`snippet: #4 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'public'. (1:20) +> 1 | class A {protected public property} + | ^ +Cause: Accessibility modifier already seen: 'public'. (1:19)" +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:20) +> 1 | class A {protected public property} + | ^^^^^^ +Cause: Accessibility modifier already seen." +`; + +exports[`snippet: #5 [babel-ts] format 1`] = ` +"Accessibility modifier already seen: 'private'. (1:18) +> 1 | class A {private private property} + | ^ +Cause: Accessibility modifier already seen: 'private'. (1:17)" +`; + +exports[`snippet: #5 [typescript] format 1`] = ` +"Accessibility modifier already seen. (1:18) +> 1 | class A {private private property} + | ^^^^^^^ +Cause: Accessibility modifier already seen." +`; diff --git a/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/format.test.js b/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/format.test.js new file mode 100644 index 000000000000..9b0cf7e93a7b --- /dev/null +++ b/tests/format/misc/errors/typescript/duplicated-accessibility-modifiers/format.test.js @@ -0,0 +1,14 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "class A {private protected method(){}}", + "class A {protected public method(){}}", + "class A {private private method(){}}", + "class A {private protected property}", + "class A {protected public property}", + "class A {private private property}", + ], + }, + ["typescript", "babel-ts"], +); diff --git a/tests/format/misc/errors/typescript/format.test.js b/tests/format/misc/errors/typescript/format.test.js new file mode 100644 index 000000000000..0df1d92c733f --- /dev/null +++ b/tests/format/misc/errors/typescript/format.test.js @@ -0,0 +1,14 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "let x1 = <div>}</div>;", + "let x2 = <div>></div>;", + 'let x3 = <div>{"foo"}}</div>;', + 'let x4 = <div>{"foo"}></div>;', + 'let x5 = <div>}{"foo"}</div>;', + 'let x6 = <div>>{"foo"}</div>;', + ], + }, + ["typescript"], +); diff --git a/tests/format/misc/errors/typescript/import-reflection/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/import-reflection/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..131c8b8306a7 --- /dev/null +++ b/tests/format/misc/errors/typescript/import-reflection/__snapshots__/format.test.js.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`valid-flow-default-import.mts [typescript] format 1`] = ` +"'=' expected. (1:15) +> 1 | import module foo from "./module.wasm"; + | ^ + 2 | import bar from "./module.wasm"; + 3 | +Cause: '=' expected." +`; + +exports[`valid-ts-default-import.mts [typescript] format 1`] = ` +"'=' expected. (1:15) +> 1 | import module foo from "./module.wasm"; + | ^ + 2 | import bar from "./module.wasm"; + 3 | +Cause: '=' expected." +`; diff --git a/tests/format/misc/errors/typescript/import-reflection/format.test.js b/tests/format/misc/errors/typescript/import-reflection/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/misc/errors/typescript/import-reflection/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/misc/errors/typescript/import-reflection/valid-flow-default-import.mts b/tests/format/misc/errors/typescript/import-reflection/valid-flow-default-import.mts new file mode 100644 index 000000000000..b0f11212d097 --- /dev/null +++ b/tests/format/misc/errors/typescript/import-reflection/valid-flow-default-import.mts @@ -0,0 +1,2 @@ +import module foo from "./module.wasm"; +import bar from "./module.wasm"; diff --git a/tests/format/misc/errors/typescript/import-reflection/valid-ts-default-import.mts b/tests/format/misc/errors/typescript/import-reflection/valid-ts-default-import.mts new file mode 100644 index 000000000000..b0f11212d097 --- /dev/null +++ b/tests/format/misc/errors/typescript/import-reflection/valid-ts-default-import.mts @@ -0,0 +1,2 @@ +import module foo from "./module.wasm"; +import bar from "./module.wasm"; diff --git a/tests/format/misc/errors/typescript/interface/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/interface/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..57f691b72179 --- /dev/null +++ b/tests/format/misc/errors/typescript/interface/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:25) +> 1 | interface I { x: number = 1;} + | ^ +Cause: Unexpected token, expected ";" (1:24)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"A property signature cannot have an initializer. (1:27) +> 1 | interface I { x: number = 1;} + | ^ +Cause: A property signature cannot have an initializer." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | interface A mixins B {} + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"'{' expected. (1:13) +> 1 | interface A mixins B {} + | ^ +Cause: '{' expected." +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:13) +> 1 | interface A implements B {} + | ^ +Cause: Unexpected token, expected "{" (1:12)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Interface declaration cannot have 'implements' clause. (1:13) +> 1 | interface A implements B {} + | ^^^^^^^^^^^^ +Cause: Interface declaration cannot have 'implements' clause." +`; diff --git a/tests/format/misc/errors/typescript/interface/format.test.js b/tests/format/misc/errors/typescript/interface/format.test.js new file mode 100644 index 000000000000..a259328401f3 --- /dev/null +++ b/tests/format/misc/errors/typescript/interface/format.test.js @@ -0,0 +1,13 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // Invalid initializer + "interface I { x: number = 1;}", + // Can't have mixins nor implements + "interface A mixins B {}", + "interface A implements B {}", + ], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/invalid-jsx-1.ts b/tests/format/misc/errors/typescript/invalid-jsx-1.tsx similarity index 100% rename from tests/format/misc/errors/typescript/invalid-jsx-1.ts rename to tests/format/misc/errors/typescript/invalid-jsx-1.tsx diff --git a/tests/format/misc/errors/typescript/jsfmt.spec.js b/tests/format/misc/errors/typescript/jsfmt.spec.js deleted file mode 100644 index 0f311b90f123..000000000000 --- a/tests/format/misc/errors/typescript/jsfmt.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - "let x1 = <div>}</div>;", - "let x2 = <div>></div>;", - 'let x3 = <div>{"foo"}}</div>;', - 'let x4 = <div>{"foo"}></div>;', - 'let x5 = <div>}{"foo"}</div>;', - 'let x6 = <div>>{"foo"}</div>;', - ], - }, - ["typescript"] -); diff --git a/tests/format/misc/errors/typescript/loop/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/loop/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3f8688587d18 --- /dev/null +++ b/tests/format/misc/errors/typescript/loop/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Missing semicolon. (1:12) +> 1 | for (var of X); + | ^ +Cause: Missing semicolon. (1:11)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Only a single variable declaration is allowed in a 'for...of' statement. (1:6) +> 1 | for (var of X); + | ^^^ +Cause: Only a single variable declaration is allowed in a 'for...of' statement." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Unexpected token (1:15) +> 1 | for (var of of); + | ^ +Cause: Unexpected token (1:14)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Only a single variable declaration is allowed in a 'for...of' statement. (1:6) +> 1 | for (var of of); + | ^^^ +Cause: Only a single variable declaration is allowed in a 'for...of' statement." +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unexpected keyword 'in'. (1:10) +> 1 | for (var in X); + | ^ +Cause: Unexpected keyword 'in'. (1:9)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"Only a single variable declaration is allowed in a 'for...in' statement. (1:6) +> 1 | for (var in X); + | ^^^ +Cause: Only a single variable declaration is allowed in a 'for...in' statement." +`; diff --git a/tests/format/misc/errors/typescript/loop/format.test.js b/tests/format/misc/errors/typescript/loop/format.test.js new file mode 100644 index 000000000000..dbbf77ad45b2 --- /dev/null +++ b/tests/format/misc/errors/typescript/loop/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["for (var of X);", "for (var of of);", "for (var in X);"], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/mapped-type/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/mapped-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..062d335b61c1 --- /dev/null +++ b/tests/format/misc/errors/typescript/mapped-type/__snapshots__/format.test.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`mapped-type.ts [babel-ts] format 1`] = ` +"Unexpected token, expected "}" (3:3) + 1 | type Mapped = { + 2 | [key in keyof O]: number; +> 3 | extra_member: should_not_allowed + | ^ + 4 | }; + 5 | +Cause: Unexpected token, expected "}" (3:2)" +`; + +exports[`mapped-type.ts [typescript] format 1`] = ` +"A mapped type may not declare properties or methods. (3:3) + 1 | type Mapped = { + 2 | [key in keyof O]: number; +> 3 | extra_member: should_not_allowed + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + 4 | }; + 5 | +Cause: A mapped type may not declare properties or methods." +`; diff --git a/tests/format/misc/errors/typescript/mapped-type/format.test.js b/tests/format/misc/errors/typescript/mapped-type/format.test.js new file mode 100644 index 000000000000..083abcf04619 --- /dev/null +++ b/tests/format/misc/errors/typescript/mapped-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts", "typescript"]); diff --git a/tests/format/misc/errors/typescript/mapped-type/mapped-type.ts b/tests/format/misc/errors/typescript/mapped-type/mapped-type.ts new file mode 100644 index 000000000000..6e560a0bc6bd --- /dev/null +++ b/tests/format/misc/errors/typescript/mapped-type/mapped-type.ts @@ -0,0 +1,4 @@ +type Mapped = { + [key in keyof O]: number; + extra_member: should_not_allowed +}; diff --git a/tests/format/misc/errors/typescript/modifiers/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/modifiers/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a0b03a9b13cb --- /dev/null +++ b/tests/format/misc/errors/typescript/modifiers/__snapshots__/format.test.js.snap @@ -0,0 +1,2811 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | abstract method(); + | ^ + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | abstract method(); + | ^^^^^^^^ + 3 | } +Cause: 'abstract' modifier cannot appear on a type member" +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | abstract property; + | ^ + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | abstract property; + | ^^^^^^^^ + 3 | } +Cause: 'abstract' modifier cannot appear on a type member" +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | abstract [index: string]: number + | ^ + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | abstract [index: string]: number + | ^^^^^^^^ + 3 | } +Cause: 'abstract' modifier cannot appear on an index signature" +`; + +exports[`snippet: #3 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | abstract [index: string] : string + | ^ + 3 | } = {}; +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #3 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | abstract [index: string] : string + | ^^^^^^^^ + 3 | } = {}; +Cause: 'abstract' modifier cannot appear on an index signature" +`; + +exports[`snippet: #4 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:12) + 1 | interface Foo { +> 2 | accessor method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:11)" +`; + +exports[`snippet: #4 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | accessor method(); + | ^^^^^^^^ + 3 | } +Cause: 'accessor' modifier cannot appear on a type member" +`; + +exports[`snippet: #5 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:12) + 1 | interface Foo { +> 2 | accessor property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:11)" +`; + +exports[`snippet: #5 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | accessor property; + | ^^^^^^^^ + 3 | } +Cause: 'accessor' modifier cannot appear on a type member" +`; + +exports[`snippet: #6 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:12) + 1 | interface Foo { +> 2 | accessor [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:11)" +`; + +exports[`snippet: #6 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | accessor [index: string]: number + | ^^^^^^^^ + 3 | } +Cause: 'accessor' modifier cannot appear on an index signature" +`; + +exports[`snippet: #7 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:12) + 1 | const foo: { +> 2 | accessor [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:11)" +`; + +exports[`snippet: #7 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | accessor [index: string] : string + | ^^^^^^^^ + 3 | } = {}; +Cause: 'accessor' modifier cannot appear on an index signature" +`; + +exports[`snippet: #8 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | async method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #8 [typescript] format 1`] = ` +"'async' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | async method(); + | ^^^^^ + 3 | } +Cause: 'async' modifier cannot appear on a type member" +`; + +exports[`snippet: #9 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | async property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #9 [typescript] format 1`] = ` +"'async' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | async property; + | ^^^^^ + 3 | } +Cause: 'async' modifier cannot appear on a type member" +`; + +exports[`snippet: #10 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | async [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #10 [typescript] format 1`] = ` +"'async' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | async [index: string]: number + | ^^^^^ + 3 | } +Cause: 'async' modifier cannot appear on an index signature" +`; + +exports[`snippet: #11 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | const foo: { +> 2 | async [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #11 [typescript] format 1`] = ` +"'async' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | async [index: string] : string + | ^^^^^ + 3 | } = {}; +Cause: 'async' modifier cannot appear on an index signature" +`; + +exports[`snippet: #12 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | const method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #12 [typescript] format 1`] = ` +"';' expected. (2:9) + 1 | interface Foo { +> 2 | const method(); + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #13 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | const property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #13 [typescript] format 1`] = ` +"';' expected. (2:9) + 1 | interface Foo { +> 2 | const property; + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #14 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | interface Foo { +> 2 | const [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #14 [typescript] format 1`] = ` +"';' expected. (2:9) + 1 | interface Foo { +> 2 | const [index: string]: number + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #15 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:9) + 1 | const foo: { +> 2 | const [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:8)" +`; + +exports[`snippet: #15 [typescript] format 1`] = ` +"';' expected. (2:9) + 1 | const foo: { +> 2 | const [index: string] : string + | ^ + 3 | } = {}; +Cause: ';' expected." +`; + +exports[`snippet: #16 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | declare method(); + | ^ + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #16 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | declare method(); + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on a type member" +`; + +exports[`snippet: #17 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | declare property; + | ^ + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #17 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | declare property; + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on a type member" +`; + +exports[`snippet: #18 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | declare [index: string]: number + | ^ + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #18 [typescript] format 1`] = ` +"'declare' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | declare [index: string]: number + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on an index signature" +`; + +exports[`snippet: #19 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | declare [index: string] : string + | ^ + 3 | } = {}; +Cause: 'declare' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #19 [typescript] format 1`] = ` +"'declare' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | declare [index: string] : string + | ^^^^^^^ + 3 | } = {}; +Cause: 'declare' modifier cannot appear on an index signature" +`; + +exports[`snippet: #20 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:11) + 1 | interface Foo { +> 2 | default method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:10)" +`; + +exports[`snippet: #20 [typescript] format 1`] = ` +"';' expected. (2:11) + 1 | interface Foo { +> 2 | default method(); + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #21 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:11) + 1 | interface Foo { +> 2 | default property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:10)" +`; + +exports[`snippet: #21 [typescript] format 1`] = ` +"';' expected. (2:11) + 1 | interface Foo { +> 2 | default property; + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #22 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:11) + 1 | interface Foo { +> 2 | default [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:10)" +`; + +exports[`snippet: #22 [typescript] format 1`] = ` +"';' expected. (2:11) + 1 | interface Foo { +> 2 | default [index: string]: number + | ^ + 3 | } +Cause: ';' expected." +`; + +exports[`snippet: #23 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:11) + 1 | const foo: { +> 2 | default [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:10)" +`; + +exports[`snippet: #23 [typescript] format 1`] = ` +"';' expected. (2:11) + 1 | const foo: { +> 2 | default [index: string] : string + | ^ + 3 | } = {}; +Cause: ';' expected." +`; + +exports[`snippet: #24 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:10) + 1 | interface Foo { +> 2 | export method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:9)" +`; + +exports[`snippet: #24 [typescript] format 1`] = ` +"'export' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | export method(); + | ^^^^^^ + 3 | } +Cause: 'export' modifier cannot appear on a type member" +`; + +exports[`snippet: #25 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:10) + 1 | interface Foo { +> 2 | export property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:9)" +`; + +exports[`snippet: #25 [typescript] format 1`] = ` +"'export' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | export property; + | ^^^^^^ + 3 | } +Cause: 'export' modifier cannot appear on a type member" +`; + +exports[`snippet: #26 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:10) + 1 | interface Foo { +> 2 | export [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:9)" +`; + +exports[`snippet: #26 [typescript] format 1`] = ` +"'export' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | export [index: string]: number + | ^^^^^^ + 3 | } +Cause: 'export' modifier cannot appear on an index signature" +`; + +exports[`snippet: #27 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:10) + 1 | const foo: { +> 2 | export [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:9)" +`; + +exports[`snippet: #27 [typescript] format 1`] = ` +"'export' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | export [index: string] : string + | ^^^^^^ + 3 | } = {}; +Cause: 'export' modifier cannot appear on an index signature" +`; + +exports[`snippet: #28 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:6) + 1 | interface Foo { +> 2 | in method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:5)" +`; + +exports[`snippet: #28 [typescript] format 1`] = ` +"'in' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | in method(); + | ^^ + 3 | } +Cause: 'in' modifier cannot appear on a type member" +`; + +exports[`snippet: #29 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:6) + 1 | interface Foo { +> 2 | in property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:5)" +`; + +exports[`snippet: #29 [typescript] format 1`] = ` +"'in' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | in property; + | ^^ + 3 | } +Cause: 'in' modifier cannot appear on a type member" +`; + +exports[`snippet: #30 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:6) + 1 | interface Foo { +> 2 | in [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:5)" +`; + +exports[`snippet: #30 [typescript] format 1`] = ` +"'in' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | in [index: string]: number + | ^^ + 3 | } +Cause: 'in' modifier cannot appear on an index signature" +`; + +exports[`snippet: #31 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:6) + 1 | const foo: { +> 2 | in [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:5)" +`; + +exports[`snippet: #31 [typescript] format 1`] = ` +"'in' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | in [index: string] : string + | ^^ + 3 | } = {}; +Cause: 'in' modifier cannot appear on an index signature" +`; + +exports[`snippet: #32 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:7) + 1 | interface Foo { +> 2 | out method(); + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:6)" +`; + +exports[`snippet: #32 [typescript] format 1`] = ` +"'out' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | out method(); + | ^^^ + 3 | } +Cause: 'out' modifier cannot appear on a type member" +`; + +exports[`snippet: #33 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:7) + 1 | interface Foo { +> 2 | out property; + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:6)" +`; + +exports[`snippet: #33 [typescript] format 1`] = ` +"'out' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | out property; + | ^^^ + 3 | } +Cause: 'out' modifier cannot appear on a type member" +`; + +exports[`snippet: #34 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:7) + 1 | interface Foo { +> 2 | out [index: string]: number + | ^ + 3 | } +Cause: Unexpected token, expected ";" (2:6)" +`; + +exports[`snippet: #34 [typescript] format 1`] = ` +"'out' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | out [index: string]: number + | ^^^ + 3 | } +Cause: 'out' modifier cannot appear on an index signature" +`; + +exports[`snippet: #35 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (2:7) + 1 | const foo: { +> 2 | out [index: string] : string + | ^ + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:6)" +`; + +exports[`snippet: #35 [typescript] format 1`] = ` +"'out' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | out [index: string] : string + | ^^^ + 3 | } = {}; +Cause: 'out' modifier cannot appear on an index signature" +`; + +exports[`snippet: #36 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | override method(); + | ^ + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #36 [typescript] format 1`] = ` +"'override' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | override method(); + | ^^^^^^^^ + 3 | } +Cause: 'override' modifier cannot appear on a type member" +`; + +exports[`snippet: #37 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | override property; + | ^ + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #37 [typescript] format 1`] = ` +"'override' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | override property; + | ^^^^^^^^ + 3 | } +Cause: 'override' modifier cannot appear on a type member" +`; + +exports[`snippet: #38 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | override [index: string]: number + | ^ + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #38 [typescript] format 1`] = ` +"'override' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | override [index: string]: number + | ^^^^^^^^ + 3 | } +Cause: 'override' modifier cannot appear on an index signature" +`; + +exports[`snippet: #39 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | override [index: string] : string + | ^ + 3 | } = {}; +Cause: 'override' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #39 [typescript] format 1`] = ` +"'override' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | override [index: string] : string + | ^^^^^^^^ + 3 | } = {}; +Cause: 'override' modifier cannot appear on an index signature" +`; + +exports[`snippet: #40 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | private method(); + | ^ + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #40 [typescript] format 1`] = ` +"'private' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | private method(); + | ^^^^^^^ + 3 | } +Cause: 'private' modifier cannot appear on a type member" +`; + +exports[`snippet: #41 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | private property; + | ^ + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #41 [typescript] format 1`] = ` +"'private' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | private property; + | ^^^^^^^ + 3 | } +Cause: 'private' modifier cannot appear on a type member" +`; + +exports[`snippet: #42 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | private [index: string]: number + | ^ + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #42 [typescript] format 1`] = ` +"'private' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | private [index: string]: number + | ^^^^^^^ + 3 | } +Cause: 'private' modifier cannot appear on an index signature" +`; + +exports[`snippet: #43 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | private [index: string] : string + | ^ + 3 | } = {}; +Cause: 'private' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #43 [typescript] format 1`] = ` +"'private' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | private [index: string] : string + | ^^^^^^^ + 3 | } = {}; +Cause: 'private' modifier cannot appear on an index signature" +`; + +exports[`snippet: #44 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | protected method(); + | ^ + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #44 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | protected method(); + | ^^^^^^^^^ + 3 | } +Cause: 'protected' modifier cannot appear on a type member" +`; + +exports[`snippet: #45 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | protected property; + | ^ + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #45 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | protected property; + | ^^^^^^^^^ + 3 | } +Cause: 'protected' modifier cannot appear on a type member" +`; + +exports[`snippet: #46 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | protected [index: string]: number + | ^ + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #46 [typescript] format 1`] = ` +"'protected' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | protected [index: string]: number + | ^^^^^^^^^ + 3 | } +Cause: 'protected' modifier cannot appear on an index signature" +`; + +exports[`snippet: #47 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | protected [index: string] : string + | ^ + 3 | } = {}; +Cause: 'protected' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #47 [typescript] format 1`] = ` +"'protected' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | protected [index: string] : string + | ^^^^^^^^^ + 3 | } = {}; +Cause: 'protected' modifier cannot appear on an index signature" +`; + +exports[`snippet: #48 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | public method(); + | ^ + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #48 [typescript] format 1`] = ` +"'public' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | public method(); + | ^^^^^^ + 3 | } +Cause: 'public' modifier cannot appear on a type member" +`; + +exports[`snippet: #49 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | public property; + | ^ + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #49 [typescript] format 1`] = ` +"'public' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | public property; + | ^^^^^^ + 3 | } +Cause: 'public' modifier cannot appear on a type member" +`; + +exports[`snippet: #50 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | public [index: string]: number + | ^ + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #50 [typescript] format 1`] = ` +"'public' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | public [index: string]: number + | ^^^^^^ + 3 | } +Cause: 'public' modifier cannot appear on an index signature" +`; + +exports[`snippet: #51 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | public [index: string] : string + | ^ + 3 | } = {}; +Cause: 'public' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #51 [typescript] format 1`] = ` +"'public' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | public [index: string] : string + | ^^^^^^ + 3 | } = {}; +Cause: 'public' modifier cannot appear on an index signature" +`; + +exports[`snippet: #52 [babel-ts] format 1`] = ` +"'static' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | static method(); + | ^ + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #52 [typescript] format 1`] = ` +"'static' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | static method(); + | ^^^^^^ + 3 | } +Cause: 'static' modifier cannot appear on a type member" +`; + +exports[`snippet: #53 [babel-ts] format 1`] = ` +"'static' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | static property; + | ^ + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #53 [typescript] format 1`] = ` +"'static' modifier cannot appear on a type member (2:3) + 1 | interface Foo { +> 2 | static property; + | ^^^^^^ + 3 | } +Cause: 'static' modifier cannot appear on a type member" +`; + +exports[`snippet: #54 [babel-ts] format 1`] = ` +"'static' modifier cannot appear on a type member. (2:3) + 1 | interface Foo { +> 2 | static [index: string]: number + | ^ + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #54 [typescript] format 1`] = ` +"'static' modifier cannot appear on an index signature (2:3) + 1 | interface Foo { +> 2 | static [index: string]: number + | ^^^^^^ + 3 | } +Cause: 'static' modifier cannot appear on an index signature" +`; + +exports[`snippet: #55 [babel-ts] format 1`] = ` +"'static' modifier cannot appear on a type member. (2:3) + 1 | const foo: { +> 2 | static [index: string] : string + | ^ + 3 | } = {}; +Cause: 'static' modifier cannot appear on a type member. (2:2)" +`; + +exports[`snippet: #55 [typescript] format 1`] = ` +"'static' modifier cannot appear on an index signature (2:3) + 1 | const foo: { +> 2 | static [index: string] : string + | ^^^^^^ + 3 | } = {}; +Cause: 'static' modifier cannot appear on an index signature" +`; + +exports[`snippet: #56 [babel-ts] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (2:3) + 1 | interface Foo { +> 2 | readonly method(); + | ^ + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature. (2:2)" +`; + +exports[`snippet: #56 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (2:3) + 1 | interface Foo { +> 2 | readonly method(); + | ^^^^^^^^ + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #57 [babel-ts] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:1) +> 1 | abstract interface Foo {} + | ^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration. (1:0)" +`; + +exports[`snippet: #57 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:1) +> 1 | abstract interface Foo {} + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #58 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | accessor interface Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #58 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:1) +> 1 | accessor interface Foo {} + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #59 [babel-ts] format 1`] = ` +"Missing semicolon. (1:6) +> 1 | async interface Foo {} + | ^ +Cause: Missing semicolon. (1:5)" +`; + +exports[`snippet: #59 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:1) +> 1 | async interface Foo {} + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #60 [babel-ts] format 1`] = ` +"Missing semicolon. (1:16) +> 1 | const interface Foo {} + | ^ +Cause: Missing semicolon. (1:15)" +`; + +exports[`snippet: #60 [typescript] format 1`] = ` +"',' expected. (1:17) +> 1 | const interface Foo {} + | ^ +Cause: ',' expected." +`; + +exports[`snippet: #61 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | default interface Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #61 [typescript] format 1`] = ` +"'export' expected. (1:1) +> 1 | default interface Foo {} + | ^ +Cause: 'export' expected." +`; + +exports[`snippet: #62 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | in interface Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #62 [typescript] format 1`] = ` +"Expression expected. (1:1) +> 1 | in interface Foo {} + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #63 [babel-ts] format 1`] = ` +"Missing semicolon. (1:4) +> 1 | out interface Foo {} + | ^ +Cause: Missing semicolon. (1:3)" +`; + +exports[`snippet: #63 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | out interface Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #64 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | override interface Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #64 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | override interface Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #65 [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | private interface Foo {} + | ^ +Cause: Missing semicolon. (1:7)" +`; + +exports[`snippet: #65 [typescript] format 1`] = ` +"'private' modifier cannot appear on a module or namespace element. (1:1) +> 1 | private interface Foo {} + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #66 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | protected interface Foo {} + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #66 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a module or namespace element. (1:1) +> 1 | protected interface Foo {} + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #67 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | public interface Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #67 [typescript] format 1`] = ` +"'public' modifier cannot appear on a module or namespace element. (1:1) +> 1 | public interface Foo {} + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #68 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | readonly interface Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #68 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (1:1) +> 1 | readonly interface Foo {} + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #69 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | static interface Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #69 [typescript] format 1`] = ` +"'static' modifier cannot appear on a module or namespace element. (1:1) +> 1 | static interface Foo {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #70 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<abstract T> {} + | ^ +Cause: 'abstract' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #70 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<abstract T> {} + | ^^^^^^^^ +Cause: 'abstract' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #71 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:24) +> 1 | interface Foo<accessor T> {} + | ^ +Cause: Unexpected token, expected "," (1:23)" +`; + +exports[`snippet: #71 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<accessor T> {} + | ^^^^^^^^ +Cause: 'accessor' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #72 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:21) +> 1 | interface Foo<async T> {} + | ^ +Cause: Unexpected token, expected "," (1:20)" +`; + +exports[`snippet: #72 [typescript] format 1`] = ` +"'async' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<async T> {} + | ^^^^^ +Cause: 'async' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #73 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<declare T> {} + | ^ +Cause: 'declare' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #73 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<declare T> {} + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #74 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:23) +> 1 | interface Foo<default T> {} + | ^ +Cause: Unexpected token, expected "," (1:22)" +`; + +exports[`snippet: #74 [typescript] format 1`] = ` +"Type parameter declaration expected. (1:15) +> 1 | interface Foo<default T> {} + | ^ +Cause: Type parameter declaration expected." +`; + +exports[`snippet: #75 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | interface Foo<export T> {} + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #75 [typescript] format 1`] = ` +"Type parameter declaration expected. (1:15) +> 1 | interface Foo<export T> {} + | ^ +Cause: Type parameter declaration expected." +`; + +exports[`snippet: #76 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<override T> {} + | ^ +Cause: 'override' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #76 [typescript] format 1`] = ` +"'override' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<override T> {} + | ^^^^^^^^ +Cause: 'override' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #77 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<private T> {} + | ^ +Cause: 'private' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #77 [typescript] format 1`] = ` +"'private' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<private T> {} + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #78 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<protected T> {} + | ^ +Cause: 'protected' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #78 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<protected T> {} + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #79 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<public T> {} + | ^ +Cause: 'public' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #79 [typescript] format 1`] = ` +"'public' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<public T> {} + | ^^^^^^ +Cause: 'public' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #80 [babel-ts] format 1`] = ` +"'readonly' modifier cannot appear on a type parameter. (1:15) +> 1 | interface Foo<readonly T> {} + | ^ +Cause: 'readonly' modifier cannot appear on a type parameter. (1:14)" +`; + +exports[`snippet: #80 [typescript] format 1`] = ` +"'readonly' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<readonly T> {} + | ^^^^^^^^ +Cause: 'readonly' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #81 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | interface Foo<static T> {} + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #81 [typescript] format 1`] = ` +"'static' modifier cannot appear on a type parameter (1:15) +> 1 | interface Foo<static T> {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a type parameter" +`; + +exports[`snippet: #82 [babel-ts] format 1`] = ` +"Class methods cannot have the 'declare' modifier. (2:3) + 1 | class Foo { +> 2 | declare method() {} + | ^ + 3 | } +Cause: Class methods cannot have the 'declare' modifier. (2:2)" +`; + +exports[`snippet: #82 [typescript] format 1`] = ` +"'declare' modifier cannot appear on class elements of this kind. (2:3) + 1 | class Foo { +> 2 | declare method() {} + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." +`; + +exports[`snippet: #83 [babel-ts] format 1`] = ` +"Class methods cannot have the 'readonly' modifier. (2:3) + 1 | class Foo { +> 2 | readonly method() {} + | ^ + 3 | } +Cause: Class methods cannot have the 'readonly' modifier. (2:2)" +`; + +exports[`snippet: #83 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (2:3) + 1 | class Foo { +> 2 | readonly method() {} + | ^^^^^^^^ + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #84 [babel-ts] format 1`] = ` +"'declare' is not allowed in getters. (2:3) + 1 | class Foo { +> 2 | declare get getter() {} + | ^ + 3 | } +Cause: 'declare' is not allowed in getters. (2:2)" +`; + +exports[`snippet: #84 [typescript] format 1`] = ` +"'declare' modifier cannot appear on class elements of this kind. (2:3) + 1 | class Foo { +> 2 | declare get getter() {} + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." +`; + +exports[`snippet: #85 [babel-ts] format 1`] = ` +"'declare' is not allowed in setters. (2:3) + 1 | class Foo { +> 2 | declare set setter(v) {} + | ^ + 3 | } +Cause: 'declare' is not allowed in setters. (2:2)" +`; + +exports[`snippet: #85 [typescript] format 1`] = ` +"'declare' modifier cannot appear on class elements of this kind. (2:3) + 1 | class Foo { +> 2 | declare set setter(v) {} + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." +`; + +exports[`snippet: #86 [babel-ts] format 1`] = ` +"Unexpected token, expected "class" (1:10) +> 1 | abstract module Foo {} + | ^ +Cause: Unexpected token, expected "class" (1:9)" +`; + +exports[`snippet: #86 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:1) +> 1 | abstract module Foo {} + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #87 [babel-ts] format 1`] = ` +"Unexpected token, expected "class" (1:10) +> 1 | abstract namespace Foo {} + | ^ +Cause: Unexpected token, expected "class" (1:9)" +`; + +exports[`snippet: #87 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:1) +> 1 | abstract namespace Foo {} + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #88 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | accessor module Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #88 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:1) +> 1 | accessor module Foo {} + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #89 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | accessor namespace Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #89 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:1) +> 1 | accessor namespace Foo {} + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #90 [babel-ts] format 1`] = ` +"Missing semicolon. (1:6) +> 1 | async module Foo {} + | ^ +Cause: Missing semicolon. (1:5)" +`; + +exports[`snippet: #90 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:1) +> 1 | async module Foo {} + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #91 [babel-ts] format 1`] = ` +"Missing semicolon. (1:6) +> 1 | async namespace Foo {} + | ^ +Cause: Missing semicolon. (1:5)" +`; + +exports[`snippet: #91 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:1) +> 1 | async namespace Foo {} + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #92 [babel-ts] format 1`] = ` +"Missing semicolon. (1:13) +> 1 | const module Foo {} + | ^ +Cause: Missing semicolon. (1:12)" +`; + +exports[`snippet: #92 [typescript] format 1`] = ` +"',' expected. (1:14) +> 1 | const module Foo {} + | ^ +Cause: ',' expected." +`; + +exports[`snippet: #93 [babel-ts] format 1`] = ` +"Missing semicolon. (1:16) +> 1 | const namespace Foo {} + | ^ +Cause: Missing semicolon. (1:15)" +`; + +exports[`snippet: #93 [typescript] format 1`] = ` +"',' expected. (1:17) +> 1 | const namespace Foo {} + | ^ +Cause: ',' expected." +`; + +exports[`snippet: #94 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | default module Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #94 [typescript] format 1`] = ` +"'export' expected. (1:1) +> 1 | default module Foo {} + | ^ +Cause: 'export' expected." +`; + +exports[`snippet: #95 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | default namespace Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #95 [typescript] format 1`] = ` +"'export' expected. (1:1) +> 1 | default namespace Foo {} + | ^ +Cause: 'export' expected." +`; + +exports[`snippet: #96 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | in module Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #96 [typescript] format 1`] = ` +"Expression expected. (1:1) +> 1 | in module Foo {} + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #97 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | in namespace Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #97 [typescript] format 1`] = ` +"Expression expected. (1:1) +> 1 | in namespace Foo {} + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #98 [babel-ts] format 1`] = ` +"Missing semicolon. (1:4) +> 1 | out module Foo {} + | ^ +Cause: Missing semicolon. (1:3)" +`; + +exports[`snippet: #98 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | out module Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #99 [babel-ts] format 1`] = ` +"Missing semicolon. (1:4) +> 1 | out namespace Foo {} + | ^ +Cause: Missing semicolon. (1:3)" +`; + +exports[`snippet: #99 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | out namespace Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #100 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | override module Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #100 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | override module Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #101 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | override namespace Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #101 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | override namespace Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #102 [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | private module Foo {} + | ^ +Cause: Missing semicolon. (1:7)" +`; + +exports[`snippet: #102 [typescript] format 1`] = ` +"'private' modifier cannot appear on a module or namespace element. (1:1) +> 1 | private module Foo {} + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #103 [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | private namespace Foo {} + | ^ +Cause: Missing semicolon. (1:7)" +`; + +exports[`snippet: #103 [typescript] format 1`] = ` +"'private' modifier cannot appear on a module or namespace element. (1:1) +> 1 | private namespace Foo {} + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #104 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | protected module Foo {} + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #104 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a module or namespace element. (1:1) +> 1 | protected module Foo {} + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #105 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | protected namespace Foo {} + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #105 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a module or namespace element. (1:1) +> 1 | protected namespace Foo {} + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #106 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | public module Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #106 [typescript] format 1`] = ` +"'public' modifier cannot appear on a module or namespace element. (1:1) +> 1 | public module Foo {} + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #107 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | public namespace Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #107 [typescript] format 1`] = ` +"'public' modifier cannot appear on a module or namespace element. (1:1) +> 1 | public namespace Foo {} + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #108 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | readonly module Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #108 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (1:1) +> 1 | readonly module Foo {} + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #109 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | readonly namespace Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #109 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (1:1) +> 1 | readonly namespace Foo {} + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #110 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | static module Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #110 [typescript] format 1`] = ` +"'static' modifier cannot appear on a module or namespace element. (1:1) +> 1 | static module Foo {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #111 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | static namespace Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #111 [typescript] format 1`] = ` +"'static' modifier cannot appear on a module or namespace element. (1:1) +> 1 | static namespace Foo {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #112 [babel-ts] format 1`] = ` +"Unexpected token, expected "class" (1:10) +> 1 | abstract enum Foo {} + | ^ +Cause: Unexpected token, expected "class" (1:9)" +`; + +exports[`snippet: #112 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:1) +> 1 | abstract enum Foo {} + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #113 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | accessor enum Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #113 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:1) +> 1 | accessor enum Foo {} + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #114 [babel-ts] format 1`] = ` +"Missing semicolon. (1:6) +> 1 | async enum Foo {} + | ^ +Cause: Missing semicolon. (1:5)" +`; + +exports[`snippet: #114 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:1) +> 1 | async enum Foo {} + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #115 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | default enum Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #115 [typescript] format 1`] = ` +"'export' expected. (1:1) +> 1 | default enum Foo {} + | ^ +Cause: 'export' expected." +`; + +exports[`snippet: #116 [babel-ts] format 1`] = ` +"Unexpected token (1:1) +> 1 | in enum Foo {} + | ^ +Cause: Unexpected token (1:0)" +`; + +exports[`snippet: #116 [typescript] format 1`] = ` +"Expression expected. (1:1) +> 1 | in enum Foo {} + | ^ +Cause: Expression expected." +`; + +exports[`snippet: #117 [babel-ts] format 1`] = ` +"Missing semicolon. (1:4) +> 1 | out enum Foo {} + | ^ +Cause: Missing semicolon. (1:3)" +`; + +exports[`snippet: #117 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | out enum Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #118 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | override enum Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #118 [typescript] format 1`] = ` +"Unexpected keyword or identifier. (1:1) +> 1 | override enum Foo {} + | ^ +Cause: Unexpected keyword or identifier." +`; + +exports[`snippet: #119 [babel-ts] format 1`] = ` +"Missing semicolon. (1:8) +> 1 | private enum Foo {} + | ^ +Cause: Missing semicolon. (1:7)" +`; + +exports[`snippet: #119 [typescript] format 1`] = ` +"'private' modifier cannot appear on a module or namespace element. (1:1) +> 1 | private enum Foo {} + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #120 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | protected enum Foo {} + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #120 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a module or namespace element. (1:1) +> 1 | protected enum Foo {} + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #121 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | public enum Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #121 [typescript] format 1`] = ` +"'public' modifier cannot appear on a module or namespace element. (1:1) +> 1 | public enum Foo {} + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #122 [babel-ts] format 1`] = ` +"Missing semicolon. (1:9) +> 1 | readonly enum Foo {} + | ^ +Cause: Missing semicolon. (1:8)" +`; + +exports[`snippet: #122 [typescript] format 1`] = ` +"'readonly' modifier can only appear on a property declaration or index signature. (1:1) +> 1 | readonly enum Foo {} + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." +`; + +exports[`snippet: #123 [babel-ts] format 1`] = ` +"Missing semicolon. (1:7) +> 1 | static enum Foo {} + | ^ +Cause: Missing semicolon. (1:6)" +`; + +exports[`snippet: #123 [typescript] format 1`] = ` +"'static' modifier cannot appear on a module or namespace element. (1:1) +> 1 | static enum Foo {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." +`; + +exports[`snippet: #124 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:23) +> 1 | function foo(abstract parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:22)" +`; + +exports[`snippet: #124 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:14) +> 1 | function foo(abstract parameter) {} + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #125 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:29) +> 1 | class Foo { method(abstract parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:28)" +`; + +exports[`snippet: #125 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:20) +> 1 | class Foo { method(abstract parameter) {} } + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #126 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:23) +> 1 | function foo(accessor parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:22)" +`; + +exports[`snippet: #126 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:14) +> 1 | function foo(accessor parameter) {} + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #127 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:29) +> 1 | class Foo { method(accessor parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:28)" +`; + +exports[`snippet: #127 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:20) +> 1 | class Foo { method(accessor parameter) {} } + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #128 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:20) +> 1 | function foo(async parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:19)" +`; + +exports[`snippet: #128 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:14) +> 1 | function foo(async parameter) {} + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #129 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:26) +> 1 | class Foo { method(async parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:25)" +`; + +exports[`snippet: #129 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:20) +> 1 | class Foo { method(async parameter) {} } + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #130 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:20) +> 1 | function foo(const parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:19)" +`; + +exports[`snippet: #130 [typescript] format 1`] = ` +"Identifier expected. 'const' is a reserved word that cannot be used here. (1:14) +> 1 | function foo(const parameter) {} + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." +`; + +exports[`snippet: #131 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:26) +> 1 | class Foo { method(const parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:25)" +`; + +exports[`snippet: #131 [typescript] format 1`] = ` +"Identifier expected. 'const' is a reserved word that cannot be used here. (1:20) +> 1 | class Foo { method(const parameter) {} } + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." +`; + +exports[`snippet: #132 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | function foo(declare parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #132 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a parameter. (1:14) +> 1 | function foo(declare parameter) {} + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." +`; + +exports[`snippet: #133 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:28) +> 1 | class Foo { method(declare parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:27)" +`; + +exports[`snippet: #133 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a parameter. (1:20) +> 1 | class Foo { method(declare parameter) {} } + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." +`; + +exports[`snippet: #134 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:22) +> 1 | function foo(default parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:21)" +`; + +exports[`snippet: #134 [typescript] format 1`] = ` +"Identifier expected. 'default' is a reserved word that cannot be used here. (1:14) +> 1 | function foo(default parameter) {} + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." +`; + +exports[`snippet: #135 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:28) +> 1 | class Foo { method(default parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:27)" +`; + +exports[`snippet: #135 [typescript] format 1`] = ` +"Identifier expected. 'default' is a reserved word that cannot be used here. (1:20) +> 1 | class Foo { method(default parameter) {} } + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." +`; + +exports[`snippet: #136 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:21) +> 1 | function foo(export parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:20)" +`; + +exports[`snippet: #136 [typescript] format 1`] = ` +"'export' modifier cannot appear on a parameter. (1:14) +> 1 | function foo(export parameter) {} + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." +`; + +exports[`snippet: #137 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:27) +> 1 | class Foo { method(export parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:26)" +`; + +exports[`snippet: #137 [typescript] format 1`] = ` +"'export' modifier cannot appear on a parameter. (1:20) +> 1 | class Foo { method(export parameter) {} } + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." +`; + +exports[`snippet: #138 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:17) +> 1 | function foo(in parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:16)" +`; + +exports[`snippet: #138 [typescript] format 1`] = ` +"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:14) +> 1 | function foo(in parameter) {} + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #139 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:23) +> 1 | class Foo { method(in parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:22)" +`; + +exports[`snippet: #139 [typescript] format 1`] = ` +"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:20) +> 1 | class Foo { method(in parameter) {} } + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #140 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:18) +> 1 | function foo(out parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:17)" +`; + +exports[`snippet: #140 [typescript] format 1`] = ` +"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:14) +> 1 | function foo(out parameter) {} + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #141 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:24) +> 1 | class Foo { method(out parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:23)" +`; + +exports[`snippet: #141 [typescript] format 1`] = ` +"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:20) +> 1 | class Foo { method(out parameter) {} } + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #142 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(override parameter) {} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" +`; + +exports[`snippet: #142 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(override parameter) {} + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #143 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(override parameter) {} } + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" +`; + +exports[`snippet: #143 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(override parameter) {} } + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #144 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(private parameter) {} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" +`; + +exports[`snippet: #144 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(private parameter) {} + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #145 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(private parameter) {} } + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" +`; + +exports[`snippet: #145 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(private parameter) {} } + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #146 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(protected parameter) {} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" +`; + +exports[`snippet: #146 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(protected parameter) {} + | ^^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #147 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(protected parameter) {} } + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" +`; + +exports[`snippet: #147 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(protected parameter) {} } + | ^^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #148 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(public parameter) {} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" +`; + +exports[`snippet: #148 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(public parameter) {} + | ^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #149 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(public parameter) {} } + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" +`; + +exports[`snippet: #149 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(public parameter) {} } + | ^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #150 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(readonly parameter) {} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" +`; + +exports[`snippet: #150 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:14) +> 1 | function foo(readonly parameter) {} + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #151 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(readonly parameter) {} } + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" +`; + +exports[`snippet: #151 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:20) +> 1 | class Foo { method(readonly parameter) {} } + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #152 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:21) +> 1 | function foo(static parameter) {} + | ^ +Cause: Unexpected token, expected "," (1:20)" +`; + +exports[`snippet: #152 [typescript] format 1`] = ` +"'static' modifier cannot appear on a parameter. (1:14) +> 1 | function foo(static parameter) {} + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." +`; + +exports[`snippet: #153 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:27) +> 1 | class Foo { method(static parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:26)" +`; + +exports[`snippet: #153 [typescript] format 1`] = ` +"'static' modifier cannot appear on a parameter. (1:20) +> 1 | class Foo { method(static parameter) {} } + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." +`; + +exports[`snippet: #154 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:34) +> 1 | class Foo { constructor(abstract parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:33)" +`; + +exports[`snippet: #154 [typescript] format 1`] = ` +"'abstract' modifier can only appear on a class, method, or property declaration. (1:25) +> 1 | class Foo { constructor(abstract parameter) {} } + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." +`; + +exports[`snippet: #155 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:34) +> 1 | class Foo { constructor(accessor parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:33)" +`; + +exports[`snippet: #155 [typescript] format 1`] = ` +"'accessor' modifier can only appear on a property declaration. (1:25) +> 1 | class Foo { constructor(accessor parameter) {} } + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." +`; + +exports[`snippet: #156 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:31) +> 1 | class Foo { constructor(async parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:30)" +`; + +exports[`snippet: #156 [typescript] format 1`] = ` +"'async' modifier cannot be used here. (1:25) +> 1 | class Foo { constructor(async parameter) {} } + | ^^^^^ +Cause: 'async' modifier cannot be used here." +`; + +exports[`snippet: #157 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:31) +> 1 | class Foo { constructor(const parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:30)" +`; + +exports[`snippet: #157 [typescript] format 1`] = ` +"Identifier expected. 'const' is a reserved word that cannot be used here. (1:25) +> 1 | class Foo { constructor(const parameter) {} } + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." +`; + +exports[`snippet: #158 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:33) +> 1 | class Foo { constructor(declare parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:32)" +`; + +exports[`snippet: #158 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a parameter. (1:25) +> 1 | class Foo { constructor(declare parameter) {} } + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." +`; + +exports[`snippet: #159 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:33) +> 1 | class Foo { constructor(default parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:32)" +`; + +exports[`snippet: #159 [typescript] format 1`] = ` +"Identifier expected. 'default' is a reserved word that cannot be used here. (1:25) +> 1 | class Foo { constructor(default parameter) {} } + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." +`; + +exports[`snippet: #160 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:32) +> 1 | class Foo { constructor(export parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:31)" +`; + +exports[`snippet: #160 [typescript] format 1`] = ` +"'export' modifier cannot appear on a parameter. (1:25) +> 1 | class Foo { constructor(export parameter) {} } + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." +`; + +exports[`snippet: #161 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:28) +> 1 | class Foo { constructor(in parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:27)" +`; + +exports[`snippet: #161 [typescript] format 1`] = ` +"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:25) +> 1 | class Foo { constructor(in parameter) {} } + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #162 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:29) +> 1 | class Foo { constructor(out parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:28)" +`; + +exports[`snippet: #162 [typescript] format 1`] = ` +"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:25) +> 1 | class Foo { constructor(out parameter) {} } + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" +`; + +exports[`snippet: #163 [babel-ts] format 1`] = ` +"Unexpected token, expected "," (1:32) +> 1 | class Foo { constructor(static parameter) {} } + | ^ +Cause: Unexpected token, expected "," (1:31)" +`; + +exports[`snippet: #163 [typescript] format 1`] = ` +"'static' modifier cannot appear on a parameter. (1:25) +> 1 | class Foo { constructor(static parameter) {} } + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." +`; + +exports[`snippet: #164 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {["constructor"](private parameter) {}} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" +`; + +exports[`snippet: #164 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {["constructor"](private parameter) {}} + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #165 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {['constructor'](private parameter) {}} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" +`; + +exports[`snippet: #165 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {['constructor'](private parameter) {}} + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #166 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {[\`constructor\`](private parameter) {}} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" +`; + +exports[`snippet: #166 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:28) +> 1 | class Foo {[\`constructor\`](private parameter) {}} + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #167 [babel-ts] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:33) +> 1 | class Foo {['const' + 'ructor'](private parameter) {}} + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:32)" +`; + +exports[`snippet: #167 [typescript] format 1`] = ` +"A parameter property is only allowed in a constructor implementation. (1:33) +> 1 | class Foo {['const' + 'ructor'](private parameter) {}} + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." +`; + +exports[`snippet: #168 [babel-ts] format 1`] = ` +"'abstract' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {abstract bar}; + | ^ +Cause: 'abstract' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #168 [typescript] format 1`] = ` +"'abstract' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {abstract bar}; + | ^^^^^^^^ +Cause: 'abstract' modifier cannot appear on a type member" +`; + +exports[`snippet: #169 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:22) +> 1 | type Foo = {accessor bar}; + | ^ +Cause: Unexpected token, expected ";" (1:21)" +`; + +exports[`snippet: #169 [typescript] format 1`] = ` +"'accessor' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {accessor bar}; + | ^^^^^^^^ +Cause: 'accessor' modifier cannot appear on a type member" +`; + +exports[`snippet: #170 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:19) +> 1 | type Foo = {async bar}; + | ^ +Cause: Unexpected token, expected ";" (1:18)" +`; + +exports[`snippet: #170 [typescript] format 1`] = ` +"'async' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {async bar}; + | ^^^^^ +Cause: 'async' modifier cannot appear on a type member" +`; + +exports[`snippet: #171 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:19) +> 1 | type Foo = {const bar}; + | ^ +Cause: Unexpected token, expected ";" (1:18)" +`; + +exports[`snippet: #171 [typescript] format 1`] = ` +"';' expected. (1:19) +> 1 | type Foo = {const bar}; + | ^ +Cause: ';' expected." +`; + +exports[`snippet: #172 [babel-ts] format 1`] = ` +"'declare' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {declare bar}; + | ^ +Cause: 'declare' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #172 [typescript] format 1`] = ` +"'declare' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {declare bar}; + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a type member" +`; + +exports[`snippet: #173 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:21) +> 1 | type Foo = {default bar}; + | ^ +Cause: Unexpected token, expected ";" (1:20)" +`; + +exports[`snippet: #173 [typescript] format 1`] = ` +"';' expected. (1:21) +> 1 | type Foo = {default bar}; + | ^ +Cause: ';' expected." +`; + +exports[`snippet: #174 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:20) +> 1 | type Foo = {export bar}; + | ^ +Cause: Unexpected token, expected ";" (1:19)" +`; + +exports[`snippet: #174 [typescript] format 1`] = ` +"'export' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {export bar}; + | ^^^^^^ +Cause: 'export' modifier cannot appear on a type member" +`; + +exports[`snippet: #175 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:16) +> 1 | type Foo = {in bar}; + | ^ +Cause: Unexpected token, expected ";" (1:15)" +`; + +exports[`snippet: #175 [typescript] format 1`] = ` +"'in' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {in bar}; + | ^^ +Cause: 'in' modifier cannot appear on a type member" +`; + +exports[`snippet: #176 [babel-ts] format 1`] = ` +"Unexpected token, expected ";" (1:17) +> 1 | type Foo = {out bar}; + | ^ +Cause: Unexpected token, expected ";" (1:16)" +`; + +exports[`snippet: #176 [typescript] format 1`] = ` +"'out' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {out bar}; + | ^^^ +Cause: 'out' modifier cannot appear on a type member" +`; + +exports[`snippet: #177 [babel-ts] format 1`] = ` +"'override' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {override bar}; + | ^ +Cause: 'override' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #177 [typescript] format 1`] = ` +"'override' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {override bar}; + | ^^^^^^^^ +Cause: 'override' modifier cannot appear on a type member" +`; + +exports[`snippet: #178 [babel-ts] format 1`] = ` +"'private' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {private bar}; + | ^ +Cause: 'private' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #178 [typescript] format 1`] = ` +"'private' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {private bar}; + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a type member" +`; + +exports[`snippet: #179 [babel-ts] format 1`] = ` +"'protected' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {protected bar}; + | ^ +Cause: 'protected' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #179 [typescript] format 1`] = ` +"'protected' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {protected bar}; + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a type member" +`; + +exports[`snippet: #180 [babel-ts] format 1`] = ` +"'public' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {public bar}; + | ^ +Cause: 'public' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #180 [typescript] format 1`] = ` +"'public' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {public bar}; + | ^^^^^^ +Cause: 'public' modifier cannot appear on a type member" +`; + +exports[`snippet: #181 [babel-ts] format 1`] = ` +"'static' modifier cannot appear on a type member. (1:13) +> 1 | type Foo = {static bar}; + | ^ +Cause: 'static' modifier cannot appear on a type member. (1:12)" +`; + +exports[`snippet: #181 [typescript] format 1`] = ` +"'static' modifier cannot appear on a type member (1:13) +> 1 | type Foo = {static bar}; + | ^^^^^^ +Cause: 'static' modifier cannot appear on a type member" +`; + +exports[`snippet: #182 [babel-ts] format 1`] = ` +"Index signatures cannot have the 'declare' modifier. (2:3) + 1 | class Foo { +> 2 | declare [index: string]: number + | ^ + 3 | } +Cause: Index signatures cannot have the 'declare' modifier. (2:2)" +`; + +exports[`snippet: #182 [typescript] format 1`] = ` +"'declare' modifier cannot appear on an index signature (2:3) + 1 | class Foo { +> 2 | declare [index: string]: number + | ^^^^^^^ + 3 | } +Cause: 'declare' modifier cannot appear on an index signature" +`; diff --git a/tests/format/misc/errors/typescript/modifiers/format.test.js b/tests/format/misc/errors/typescript/modifiers/format.test.js new file mode 100644 index 000000000000..bed049729765 --- /dev/null +++ b/tests/format/misc/errors/typescript/modifiers/format.test.js @@ -0,0 +1,144 @@ +import { outdent } from "outdent"; + +// `isModifierKind` in `typescript` +const POSSIBLE_MODIFIERS = [ + "abstract", + "accessor", + "async", + "const", + "declare", + "default", + "export", + "in", + "out", + "override", + "private", + "protected", + "public", + "readonly", + "static", +]; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // Only `readonly` allowed in some places + ...POSSIBLE_MODIFIERS.filter( + (modifier) => modifier !== "readonly", + ).flatMap((modifier) => [ + outdent` + interface Foo { + ${modifier} method(); + } + `, + outdent` + interface Foo { + ${modifier} property; + } + `, + // index signature + outdent` + interface Foo { + ${modifier} [index: string]: number + } + `, + outdent` + const foo: { + ${modifier} [index: string] : string + } = {}; + `, + ]), + outdent` + interface Foo { + readonly method(); + } + `, + + // `TSInterfaceDeclaration`, only `declare` and `export` allowed + ...POSSIBLE_MODIFIERS.filter( + (modifier) => modifier !== "declare" && modifier !== "export", + ).map( + (modifier) => + outdent` + ${modifier} interface Foo {} + `, + ), + + // `TSTypeParameter`, only `in`, `out`, and `const` allowed in type parameter + ...POSSIBLE_MODIFIERS.filter( + (modifier) => + modifier !== "in" && modifier !== "out" && modifier !== "const", + ).map((modifier) => `interface Foo<${modifier} T> {}`), + + ...["declare", "readonly"].map( + (modifier) => + outdent` + class Foo { + ${modifier} method() {} + } + `, + ), + outdent` + class Foo { + declare get getter() {} + } + `, + outdent` + class Foo { + declare set setter(v) {} + } + `, + + // `TSModuleDeclaration` + ...POSSIBLE_MODIFIERS.filter( + (modifier) => modifier !== "declare" && modifier !== "export", + ).flatMap((modifier) => [ + `${modifier} module Foo {}`, + `${modifier} namespace Foo {}`, + ]), + + // `TSEnumDeclaration` + ...POSSIBLE_MODIFIERS.filter( + (modifier) => + modifier !== "declare" && + modifier !== "const" && + modifier !== "export", + ).map((modifier) => `${modifier} enum Foo {}`), + + // `TSParameterProperty` + ...POSSIBLE_MODIFIERS.flatMap((modifier) => [ + `function foo(${modifier} parameter) {}`, + `class Foo { method(${modifier} parameter) {} }`, + ]), + ...POSSIBLE_MODIFIERS.filter( + (modifier) => + modifier !== "override" && + modifier !== "private" && + modifier !== "protected" && + modifier !== "public" && + modifier !== "readonly", + ).map( + (modifier) => `class Foo { constructor(${modifier} parameter) {} }`, + ), + 'class Foo {["constructor"](private parameter) {}}', + "class Foo {['constructor'](private parameter) {}}", + "class Foo {[`constructor`](private parameter) {}}", + // cspell:disable-next-line + "class Foo {['const' + 'ructor'](private parameter) {}}", + + // `TSPropertySignature` + ...POSSIBLE_MODIFIERS.filter((modifier) => modifier !== "readonly").map( + (modifier) => `type Foo = {${modifier} bar};`, + ), + + // `TSIndexSignature` + outdent` + class Foo { + declare [index: string]: number + } + `, + ], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/module-declaration/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/module-declaration/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e142ec42fb1d --- /dev/null +++ b/tests/format/misc/errors/typescript/module-declaration/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | namespace "a" {} + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"Identifier expected. (1:11) +> 1 | namespace "a" {} + | ^ +Cause: Identifier expected." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Missing semicolon. (1:10) +> 1 | namespace "a"; + | ^ +Cause: Missing semicolon. (1:9)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"Identifier expected. (1:11) +> 1 | namespace "a"; + | ^ +Cause: Identifier expected." +`; + +exports[`snippet: #2 [babel-ts] format 1`] = ` +"Unexpected token, expected "{" (1:12) +> 1 | namespace a; + | ^ +Cause: Unexpected token, expected "{" (1:11)" +`; + +exports[`snippet: #2 [typescript] format 1`] = ` +"'{' expected. (1:12) +> 1 | namespace a; + | ^ +Cause: '{' expected." +`; diff --git a/tests/format/misc/errors/typescript/module-declaration/format.test.js b/tests/format/misc/errors/typescript/module-declaration/format.test.js new file mode 100644 index 000000000000..7d8342d1a4f4 --- /dev/null +++ b/tests/format/misc/errors/typescript/module-declaration/format.test.js @@ -0,0 +1,7 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ['namespace "a" {}', 'namespace "a";', "namespace a;"], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7afdb82c2b2a --- /dev/null +++ b/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: #0 [babel-ts] format 1`] = ` +"Tuple members must be labeled with a simple identifier. (1:11) +> 1 | type T = [x.y: A]; + | ^ +Cause: Tuple members must be labeled with a simple identifier. (1:10)" +`; + +exports[`snippet: #0 [typescript] format 1`] = ` +"',' expected. (1:14) +> 1 | type T = [x.y: A]; + | ^ +Cause: ',' expected." +`; + +exports[`snippet: #1 [babel-ts] format 1`] = ` +"Tuple members must be labeled with a simple identifier. (1:11) +> 1 | type T = [x<y>: A]; + | ^ +Cause: Tuple members must be labeled with a simple identifier. (1:10)" +`; + +exports[`snippet: #1 [typescript] format 1`] = ` +"',' expected. (1:15) +> 1 | type T = [x<y>: A]; + | ^ +Cause: ',' expected." +`; diff --git a/tests/format/misc/errors/typescript/tuple/format.test.js b/tests/format/misc/errors/typescript/tuple/format.test.js new file mode 100644 index 000000000000..a4e9f8819170 --- /dev/null +++ b/tests/format/misc/errors/typescript/tuple/format.test.js @@ -0,0 +1,12 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + // Invalid label 1 + "type T = [x.y: A];", + // Invalid label 2 + "type T = [x<y>: A];", + ], + }, + ["babel-ts", "typescript"], +); diff --git a/tests/format/misc/errors/vue/__snapshots__/format.test.js.snap b/tests/format/misc/errors/vue/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..13ecf8428ac1 --- /dev/null +++ b/tests/format/misc/errors/vue/__snapshots__/format.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`unclosed_tag.vue [vue] format 1`] = ` +"Opening tag "div" not terminated. (1:1) +> 1 | <div + | ^^^^ +> 2 | + | ^" +`; + +exports[`unclosed_tag_in_template.vue [vue] format 1`] = ` +"Unexpected character "<" (4:1) + 2 | <p>Templates are formatted as well... + 3 | </ +> 4 | </template> + | ^ + 5 |" +`; + +exports[`upper-case.html [vue] format 1`] = ` +"Void elements do not have end tags "Input" (8:21) + 6 | <div id="app"> + 7 | <!-- when vue parse use for html, Input should not treat as component --> +> 8 | <Input>{{value}}</Input> + | ^^^^^^^^ + 9 | </div> + 10 | </body> + 11 | <script src="https://unpkg.com/vue/dist/vue.js"></script>" +`; diff --git a/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 11aef9f65fd8..000000000000 --- a/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,28 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`unclosed_tag.vue [vue] format 1`] = ` -"Unexpected character "EOF" (2:1) - 1 | <div -> 2 | - | ^" -`; - -exports[`unclosed_tag_in_template.vue [vue] format 1`] = ` -"Unexpected character "/" (4:2) - 2 | <p>Templates are formatted as well... - 3 | </ -> 4 | </template> - | ^ - 5 |" -`; - -exports[`upper-case.html [vue] format 1`] = ` -"Void elements do not have end tags "Input" (8:21) - 6 | <div id="app"> - 7 | <!-- when vue parse use for html, Input should not treat as component --> -> 8 | <Input>{{value}}</Input> - | ^^^^^^^^ - 9 | </div> - 10 | </body> - 11 | <script src="https://unpkg.com/vue/dist/vue.js"></script>" -`; diff --git a/tests/format/misc/errors/vue/format.test.js b/tests/format/misc/errors/vue/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/misc/errors/vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/misc/errors/vue/jsfmt.spec.js b/tests/format/misc/errors/vue/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/misc/errors/vue/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/misc/errors/yaml/__snapshots__/format.test.js.snap b/tests/format/misc/errors/yaml/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8466b92a6dcd --- /dev/null +++ b/tests/format/misc/errors/yaml/__snapshots__/format.test.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`block-scalar-with-spaces-only.yml [yaml] format 1`] = ` +"Block scalars with more-indented leading empty lines must use an explicit indentation indicator (1:21) +> 1 | empty block scalar: > + | ^ +> 2 | + | ^ +> 3 | + | ^ +> 4 | + | ^ +> 5 | # comment + | ^ +> 6 | + | ^ +Cause: Block scalars with more-indented leading empty lines must use an explicit indentation indicator" +`; diff --git a/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 12fcb7cae677..000000000000 --- a/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,17 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`block-scalar-with-spaces-only.yml [yaml] format 1`] = ` -"Block scalars with more-indented leading empty lines must use an explicit indentation indicator (1:21) -> 1 | empty block scalar: > - | ^ -> 2 | - | ^ -> 3 | - | ^ -> 4 | - | ^ -> 5 | # comment - | ^ -> 6 | - | ^" -`; diff --git a/tests/format/misc/errors/yaml/format.test.js b/tests/format/misc/errors/yaml/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/misc/errors/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/misc/errors/yaml/jsfmt.spec.js b/tests/format/misc/errors/yaml/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/misc/errors/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/misc/flow-babel-only/__snapshots__/format.test.js.snap b/tests/format/misc/flow-babel-only/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0e00e0ae1c3a --- /dev/null +++ b/tests/format/misc/flow-babel-only/__snapshots__/format.test.js.snap @@ -0,0 +1,73 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class_with_generics.js format 1`] = ` +====================================options===================================== +parsers: ["babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +import React from 'react'; + +/*:: type Props = { + foo?: ?string, + bar: number, +}; */ + +/*:: type State = { baz: number }; */ + +class Component extends React.Component/*:: <Props, State> */ { +} + +=====================================output===================================== +import React from "react"; + +type Props = { + foo?: ?string, + bar: number, +}; +type State = { baz: number }; +class Component extends React.Component<Props, State> {} + +================================================================================ +`; + +exports[`constructor-field-override.js format 1`] = ` +====================================options===================================== +parsers: ["babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/issues/1481 +class Foo { + constructor: () => this; +} + +=====================================output===================================== +// https://github.com/prettier/prettier/issues/1481 +class Foo { + constructor: () => this; +} + +================================================================================ +`; + +exports[`functions.js format 1`] = ` +====================================options===================================== +parsers: ["babel-flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export function updateStoreFromURL( + store /*: Store*/, + {search, hash} /*: {search: string, hash: string}*/ +) {} + +=====================================output===================================== +export function updateStoreFromURL( + store: Store, + { search, hash }: { search: string, hash: string }, +) {} + +================================================================================ +`; diff --git a/tests/format/misc/flow-babel-only/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/flow-babel-only/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ac765ce2e08e..000000000000 --- a/tests/format/misc/flow-babel-only/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,75 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`class_with_generics.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -import React from 'react'; - -/*:: type Props = { - foo?: ?string, - bar: number, -}; */ - -/*:: type State = { baz: number }; */ - -class Component extends React.Component/*:: <Props, State> */ { -} - -=====================================output===================================== -import React from "react"; - -/*:: type Props = { - foo?: ?string, - bar: number, -}; */ - -/*:: type State = { baz: number }; */ - -class Component extends React.Component /*:: <Props, State> */ {} - -================================================================================ -`; - -exports[`constructor-field-override.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/issues/1481 -class Foo { - constructor: () => this; -} - -=====================================output===================================== -// https://github.com/prettier/prettier/issues/1481 -class Foo { - constructor: () => this; -} - -================================================================================ -`; - -exports[`functions.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== - -export function updateStoreFromURL( - store /*: Store*/, - {search, hash} /*: {search: string, hash: string}*/ -) {} - -=====================================output===================================== -export function updateStoreFromURL( - store /*: Store*/, - { search, hash } /*: {search: string, hash: string}*/ -) {} - -================================================================================ -`; diff --git a/tests/format/misc/flow-babel-only/format.test.js b/tests/format/misc/flow-babel-only/format.test.js new file mode 100644 index 000000000000..63a3c4879b0b --- /dev/null +++ b/tests/format/misc/flow-babel-only/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-flow"]); diff --git a/tests/format/misc/flow-babel-only/jsfmt.spec.js b/tests/format/misc/flow-babel-only/jsfmt.spec.js deleted file mode 100644 index 8382eddeb1db..000000000000 --- a/tests/format/misc/flow-babel-only/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel"]); diff --git a/tests/format/misc/insert-pragma/css/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/css/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/css/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/css/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/css/format.test.js b/tests/format/misc/insert-pragma/css/format.test.js new file mode 100644 index 000000000000..57b0fd9e44e3 --- /dev/null +++ b/tests/format/misc/insert-pragma/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/css/jsfmt.spec.js b/tests/format/misc/insert-pragma/css/jsfmt.spec.js deleted file mode 100644 index 2e12b8a1d53f..000000000000 --- a/tests/format/misc/insert-pragma/css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/graphql/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/graphql/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/graphql/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/graphql/format.test.js b/tests/format/misc/insert-pragma/graphql/format.test.js new file mode 100644 index 000000000000..11bbbd4f4b66 --- /dev/null +++ b/tests/format/misc/insert-pragma/graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["graphql"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/graphql/jsfmt.spec.js b/tests/format/misc/insert-pragma/graphql/jsfmt.spec.js deleted file mode 100644 index 4a57b4536b80..000000000000 --- a/tests/format/misc/insert-pragma/graphql/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["graphql"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/html/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/html/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/html/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/html/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/html/format.test.js b/tests/format/misc/insert-pragma/html/format.test.js new file mode 100644 index 000000000000..0f951109608c --- /dev/null +++ b/tests/format/misc/insert-pragma/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/html/jsfmt.spec.js b/tests/format/misc/insert-pragma/html/jsfmt.spec.js deleted file mode 100644 index d7461ff2d287..000000000000 --- a/tests/format/misc/insert-pragma/html/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/js/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/js/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/js/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/js/format.test.js b/tests/format/misc/insert-pragma/js/format.test.js new file mode 100644 index 000000000000..ccf08a80d63a --- /dev/null +++ b/tests/format/misc/insert-pragma/js/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["flow", "babel", "typescript"], { + insertPragma: true, +}); diff --git a/tests/format/misc/insert-pragma/js/jsfmt.spec.js b/tests/format/misc/insert-pragma/js/jsfmt.spec.js deleted file mode 100644 index d1ed3d6a0107..000000000000 --- a/tests/format/misc/insert-pragma/js/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["flow", "babel", "typescript"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/json/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/json/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/json/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/json/format.test.js b/tests/format/misc/insert-pragma/json/format.test.js new file mode 100644 index 000000000000..874e88a4407c --- /dev/null +++ b/tests/format/misc/insert-pragma/json/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/json/jsfmt.spec.js b/tests/format/misc/insert-pragma/json/jsfmt.spec.js deleted file mode 100644 index b008c3e5724e..000000000000 --- a/tests/format/misc/insert-pragma/json/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/json5/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/json5/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/json5/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/json5/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/json5/format.test.js b/tests/format/misc/insert-pragma/json5/format.test.js new file mode 100644 index 000000000000..bf666f126bb4 --- /dev/null +++ b/tests/format/misc/insert-pragma/json5/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/json5/jsfmt.spec.js b/tests/format/misc/insert-pragma/json5/jsfmt.spec.js deleted file mode 100644 index fae953579f4f..000000000000 --- a/tests/format/misc/insert-pragma/json5/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json5"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/markdown/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/markdown/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/markdown/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/markdown/format.test.js b/tests/format/misc/insert-pragma/markdown/format.test.js new file mode 100644 index 000000000000..57969e4e131d --- /dev/null +++ b/tests/format/misc/insert-pragma/markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/markdown/jsfmt.spec.js b/tests/format/misc/insert-pragma/markdown/jsfmt.spec.js deleted file mode 100644 index a1f27d6d279a..000000000000 --- a/tests/format/misc/insert-pragma/markdown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/insert-pragma/vue/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/insert-pragma/vue/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/insert-pragma/vue/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/insert-pragma/vue/format.test.js b/tests/format/misc/insert-pragma/vue/format.test.js new file mode 100644 index 000000000000..c0801caeab3a --- /dev/null +++ b/tests/format/misc/insert-pragma/vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"], { insertPragma: true }); diff --git a/tests/format/misc/insert-pragma/vue/jsfmt.spec.js b/tests/format/misc/insert-pragma/vue/jsfmt.spec.js deleted file mode 100644 index a64ae4494cde..000000000000 --- a/tests/format/misc/insert-pragma/vue/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"], { insertPragma: true }); diff --git a/tests/format/misc/json-unknown-extension/__snapshots__/format.test.js.snap b/tests/format/misc/json-unknown-extension/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a842e7f8b7db --- /dev/null +++ b/tests/format/misc/json-unknown-extension/__snapshots__/format.test.js.snap @@ -0,0 +1,115 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`trailingComma.notjson - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +=====================================output===================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +================================================================================ +`; + +exports[`trailingComma.notjson - {"trailingComma":"all"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +=====================================output===================================== +{ + k1: "v1", + k2: "v2", + k3: "v3", +} + +================================================================================ +`; + +exports[`trailingComma.notjson - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["json"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +=====================================output===================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +================================================================================ +`; + +exports[`trailingComma.notjson - {"trailingComma":"es5"} format 2`] = ` +====================================options===================================== +parsers: ["json5"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +=====================================output===================================== +{ + k1: "v1", + k2: "v2", + k3: "v3", +} + +================================================================================ +`; + +exports[`trailingComma.notjson format 1`] = ` +====================================options===================================== +parsers: ["json-stringify"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +=====================================output===================================== +{ + "k1": "v1", + "k2": "v2", + "k3": "v3" +} + +================================================================================ +`; diff --git a/tests/format/misc/json-unknown-extension/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/json-unknown-extension/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index bddf0dff76ae..000000000000 --- a/tests/format/misc/json-unknown-extension/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,113 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`trailingComma.notjson - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -=====================================output===================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -================================================================================ -`; - -exports[`trailingComma.notjson - {"trailingComma":"all"} format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -=====================================output===================================== -{ - k1: "v1", - k2: "v2", - k3: "v3", -} - -================================================================================ -`; - -exports[`trailingComma.notjson format 1`] = ` -====================================options===================================== -parsers: ["json"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -=====================================output===================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -================================================================================ -`; - -exports[`trailingComma.notjson format 2`] = ` -====================================options===================================== -parsers: ["json5"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -=====================================output===================================== -{ - k1: "v1", - k2: "v2", - k3: "v3", -} - -================================================================================ -`; - -exports[`trailingComma.notjson format 3`] = ` -====================================options===================================== -parsers: ["json-stringify"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -=====================================output===================================== -{ - "k1": "v1", - "k2": "v2", - "k3": "v3" -} - -================================================================================ -`; diff --git a/tests/format/misc/json-unknown-extension/format.test.js b/tests/format/misc/json-unknown-extension/format.test.js new file mode 100644 index 000000000000..36ffcece6980 --- /dev/null +++ b/tests/format/misc/json-unknown-extension/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["json"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json"], { trailingComma: "all" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["json5"], { trailingComma: "all" }); +runFormatTest(import.meta, ["json-stringify"]); diff --git a/tests/format/misc/json-unknown-extension/jsfmt.spec.js b/tests/format/misc/json-unknown-extension/jsfmt.spec.js deleted file mode 100644 index 1c74f7e8a011..000000000000 --- a/tests/format/misc/json-unknown-extension/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["json"]); -run_spec(__dirname, ["json"], { trailingComma: "all" }); -run_spec(__dirname, ["json5"]); -run_spec(__dirname, ["json5"], { trailingComma: "all" }); -run_spec(__dirname, ["json-stringify"]); diff --git a/tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/parser-inference/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/parser-inference/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/parser-inference/format.test.js b/tests/format/misc/parser-inference/format.test.js new file mode 100644 index 000000000000..f773cc0d8c67 --- /dev/null +++ b/tests/format/misc/parser-inference/format.test.js @@ -0,0 +1,54 @@ +import { outdent } from "outdent"; + +runFormatTest({ + importMeta: import.meta, + snippets: [ + { + name: ".prettierrc in json(empty)", + filename: ".prettierrc", + code: "{}", + }, + { + name: ".prettierrc in json", + filename: "path/to/.prettierrc", + code: outdent` + {"printWidth": 100, + "overrides": [ + {"files": ".prettierrc", + "options": {"parser": "json" + }}, + {"files": "*.js", + "options": {"parser": "babel", + "singleQuote": true,"printWidth": 80,"semi": + false, + "quoteProps": "as-needed" + }} + ]} + `, + }, + { + name: ".prettierrc in yaml", + filename: ".prettierrc", + code: outdent` + # comment + printWidth: 100 + overrides: + - files: '.prettierrc' + options: + parser: "json" + `, + }, + { + name: ".prettierrc in yaml (with flowMapping)", + filename: ".prettierrc", + code: outdent` + # comment + printWidth: 100 + overrides: { + "files": [".prettierrc", "prettierrc.json"], + "options": { "parser": "json"} + } + `, + }, + ], +}); diff --git a/tests/format/misc/parser-inference/jsfmt.spec.js b/tests/format/misc/parser-inference/jsfmt.spec.js deleted file mode 100644 index 19c43204179a..000000000000 --- a/tests/format/misc/parser-inference/jsfmt.spec.js +++ /dev/null @@ -1,54 +0,0 @@ -const { outdent } = require("outdent"); - -run_spec({ - dirname: __dirname, - snippets: [ - { - name: ".prettierrc in json(empty)", - filename: ".prettierrc", - code: "{}", - }, - { - name: ".prettierrc in json", - filename: "path/to/.prettierrc", - code: outdent` - {"printWidth": 100, - "overrides": [ - {"files": ".prettierrc", - "options": {"parser": "json" - }}, - {"files": "*.js", - "options": {"parser": "babel", - "singleQuote": true,"printWidth": 80,"semi": - false, - "quoteProps": "as-needed" - }} - ]} - `, - }, - { - name: ".prettierrc in yaml", - filename: ".prettierrc", - code: outdent` - # comment - printWidth: 100 - overrides: - - files: '.prettierrc' - options: - parser: "json" - `, - }, - { - name: ".prettierrc in yaml (with flowMapping)", - filename: ".prettierrc", - code: outdent` - # comment - printWidth: 100 - overrides: { - "files": [".prettierrc", "prettierrc.json"], - "options": { "parser": "json"} - } - `, - }, - ], -}); diff --git a/tests/format/misc/plugins/async-printer/__snapshots__/format.test.js.snap b/tests/format/misc/plugins/async-printer/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..757f0655e0b1 --- /dev/null +++ b/tests/format/misc/plugins/async-printer/__snapshots__/format.test.js.snap @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`async-printer.txt format 1`] = ` +====================================options===================================== +parsers: ["async-printer"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ "preprocess": "Lorem Ipsum", "print": "Lorem Ipsum" } + +=====================================output===================================== +{"preprocess":"lorem ipsum","print":"Lorem Ipsum"} +================================================================================ +`; diff --git a/tests/format/misc/plugins/async-printer/async-printer.txt b/tests/format/misc/plugins/async-printer/async-printer.txt new file mode 100644 index 000000000000..493f5ee42a13 --- /dev/null +++ b/tests/format/misc/plugins/async-printer/async-printer.txt @@ -0,0 +1 @@ +{ "preprocess": "Lorem Ipsum", "print": "Lorem Ipsum" } diff --git a/tests/format/misc/plugins/async-printer/format.test.js b/tests/format/misc/plugins/async-printer/format.test.js new file mode 100644 index 000000000000..96040786d050 --- /dev/null +++ b/tests/format/misc/plugins/async-printer/format.test.js @@ -0,0 +1,9 @@ +import createEsmUtils from "esm-utils"; + +const { require } = createEsmUtils(import.meta); + +const plugins = [ + require("../../../../config/prettier-plugins/prettier-plugin-async-printer/index.cjs"), +]; + +runFormatTest(import.meta, ["async-printer"], { plugins }); diff --git a/tests/format/misc/plugins/embed-async-printer/__snapshots__/format.test.js.snap b/tests/format/misc/plugins/embed-async-printer/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..74a27f62ce2e --- /dev/null +++ b/tests/format/misc/plugins/embed-async-printer/__snapshots__/format.test.js.snap @@ -0,0 +1,30 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`with-aync-printer-code-block.md format 1`] = ` +====================================options===================================== +parsers: ["markdown"] +printWidth: 80 + | printWidth +=====================================input====================================== +\`\`\`async-printer +{ + "preprocess": "This text will be lowercased.", + "print": "This text will be whitespace-normalized." +} +\`\`\` + +\`\`\`uppercase-rocks +This text should be uppercased. +\`\`\` + +=====================================output===================================== +\`\`\`async-printer +{"preprocess":"this text will be lowercased.","print":"This text will be whitespace-normalized."} +\`\`\` + +\`\`\`uppercase-rocks +THIS TEXT SHOULD BE UPPERCASED. +\`\`\` + +================================================================================ +`; diff --git a/tests/format/misc/plugins/embed-async-printer/format.test.js b/tests/format/misc/plugins/embed-async-printer/format.test.js new file mode 100644 index 000000000000..c89da3075c9f --- /dev/null +++ b/tests/format/misc/plugins/embed-async-printer/format.test.js @@ -0,0 +1,8 @@ +const plugins = await Promise.all( + [ + "../../../../config/prettier-plugins/prettier-plugin-async-printer/index.cjs", + "../../../../config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js", + ].map(async (plugin) => (await import(plugin)).default), +); + +runFormatTest(import.meta, ["markdown"], { plugins }); diff --git a/tests/format/misc/plugins/embed-async-printer/with-aync-printer-code-block.md b/tests/format/misc/plugins/embed-async-printer/with-aync-printer-code-block.md new file mode 100644 index 000000000000..70a26480d2aa --- /dev/null +++ b/tests/format/misc/plugins/embed-async-printer/with-aync-printer-code-block.md @@ -0,0 +1,10 @@ +```async-printer +{ + "preprocess": "This text will be lowercased.", + "print": "This text will be whitespace-normalized." +} +``` + +```uppercase-rocks +This text should be uppercased. +``` diff --git a/tests/format/misc/require-pragma/css/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/css/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/css/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/css/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/css/format.test.js b/tests/format/misc/require-pragma/css/format.test.js new file mode 100644 index 000000000000..dc27d8439ef7 --- /dev/null +++ b/tests/format/misc/require-pragma/css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/css/jsfmt.spec.js b/tests/format/misc/require-pragma/css/jsfmt.spec.js deleted file mode 100644 index 10a500899559..000000000000 --- a/tests/format/misc/require-pragma/css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/graphql/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/graphql/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/graphql/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/graphql/format.test.js b/tests/format/misc/require-pragma/graphql/format.test.js new file mode 100644 index 000000000000..69e6a01f111e --- /dev/null +++ b/tests/format/misc/require-pragma/graphql/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["graphql"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/graphql/jsfmt.spec.js b/tests/format/misc/require-pragma/graphql/jsfmt.spec.js deleted file mode 100644 index 52976324f95b..000000000000 --- a/tests/format/misc/require-pragma/graphql/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["graphql"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/html/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/html/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/html/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/html/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/html/format.test.js b/tests/format/misc/require-pragma/html/format.test.js new file mode 100644 index 000000000000..bb15a7026733 --- /dev/null +++ b/tests/format/misc/require-pragma/html/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["html"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/html/jsfmt.spec.js b/tests/format/misc/require-pragma/html/jsfmt.spec.js deleted file mode 100644 index 356f6e9167f4..000000000000 --- a/tests/format/misc/require-pragma/html/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/js/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/js/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/js/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/js/format.test.js b/tests/format/misc/require-pragma/js/format.test.js new file mode 100644 index 000000000000..c3cc91ca7048 --- /dev/null +++ b/tests/format/misc/require-pragma/js/format.test.js @@ -0,0 +1,8 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: ["\uFEFF#!/usr/bin/env node\n/** @format */\nprettier"], + }, + ["flow", "babel", "typescript"], + { requirePragma: true }, +); diff --git a/tests/format/misc/require-pragma/js/jsfmt.spec.js b/tests/format/misc/require-pragma/js/jsfmt.spec.js deleted file mode 100644 index 4008d7d89dc3..000000000000 --- a/tests/format/misc/require-pragma/js/jsfmt.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: ["\uFEFF#!/usr/bin/env node\n/** @format */\nprettier"], - }, - ["flow", "babel", "typescript"], - { requirePragma: true } -); diff --git a/tests/format/misc/require-pragma/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/json/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/json/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/json/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/json/format.test.js b/tests/format/misc/require-pragma/json/format.test.js new file mode 100644 index 000000000000..1460ab066001 --- /dev/null +++ b/tests/format/misc/require-pragma/json/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/json/jsfmt.spec.js b/tests/format/misc/require-pragma/json/jsfmt.spec.js deleted file mode 100644 index c725321b60fc..000000000000 --- a/tests/format/misc/require-pragma/json/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/json5/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/json5/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/json5/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/json5/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/json5/format.test.js b/tests/format/misc/require-pragma/json5/format.test.js new file mode 100644 index 000000000000..a1c1d52ed0b4 --- /dev/null +++ b/tests/format/misc/require-pragma/json5/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["json5"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/json5/jsfmt.spec.js b/tests/format/misc/require-pragma/json5/jsfmt.spec.js deleted file mode 100644 index e7f02cda37a3..000000000000 --- a/tests/format/misc/require-pragma/json5/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["json5"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/markdown/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/markdown/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/markdown/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/markdown/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/markdown/format.test.js b/tests/format/misc/require-pragma/markdown/format.test.js new file mode 100644 index 000000000000..9210ac9112fc --- /dev/null +++ b/tests/format/misc/require-pragma/markdown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["markdown"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/markdown/jsfmt.spec.js b/tests/format/misc/require-pragma/markdown/jsfmt.spec.js deleted file mode 100644 index 8e45ea7253ed..000000000000 --- a/tests/format/misc/require-pragma/markdown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["markdown"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/mdx/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/mdx/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/mdx/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/mdx/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/mdx/format.test.js b/tests/format/misc/require-pragma/mdx/format.test.js new file mode 100644 index 000000000000..e3f2ffcde969 --- /dev/null +++ b/tests/format/misc/require-pragma/mdx/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mdx"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/mdx/jsfmt.spec.js b/tests/format/misc/require-pragma/mdx/jsfmt.spec.js deleted file mode 100644 index 2b5334229ace..000000000000 --- a/tests/format/misc/require-pragma/mdx/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["mdx"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/require-pragma/vue/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/misc/require-pragma/vue/__snapshots__/jsfmt.spec.js.snap rename to tests/format/misc/require-pragma/vue/__snapshots__/format.test.js.snap diff --git a/tests/format/misc/require-pragma/vue/format.test.js b/tests/format/misc/require-pragma/vue/format.test.js new file mode 100644 index 000000000000..9a31b6b96e00 --- /dev/null +++ b/tests/format/misc/require-pragma/vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"], { requirePragma: true }); diff --git a/tests/format/misc/require-pragma/vue/jsfmt.spec.js b/tests/format/misc/require-pragma/vue/jsfmt.spec.js deleted file mode 100644 index 372b48688789..000000000000 --- a/tests/format/misc/require-pragma/vue/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"], { requirePragma: true }); diff --git a/tests/format/misc/typescript-babel-only/__snapshots__/format.test.js.snap b/tests/format/misc/typescript-babel-only/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..80c2c2eb58f3 --- /dev/null +++ b/tests/format/misc/typescript-babel-only/__snapshots__/format.test.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`decorator-auto-accessors-new-line.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor + ["bar"]; +} + +class Foo { + static accessor + bar; +} + +class Foo { + accessor + bar; +} + +=====================================output===================================== +class Foo { + accessor; + ["bar"]; +} + +class Foo { + static accessor; + bar; +} + +class Foo { + accessor; + bar; +} + +================================================================================ +`; + +exports[`parenthesized-decorators-call-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +@(test().x("global").y()) +class X {} + +=====================================output===================================== +@(test().x("global").y()) +class X {} + +================================================================================ +`; + +exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Test { + @(foo\`bar\`) + text: string = "text" +} + +=====================================output===================================== +class Test { + @(foo\`bar\`) + text: string = "text"; +} + +================================================================================ +`; diff --git a/tests/format/misc/typescript-babel-only/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/typescript-babel-only/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 67aac31adb32..000000000000 --- a/tests/format/misc/typescript-babel-only/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,247 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`declare-index-signature.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Invalid, but recoverable -class C { - declare [key: string]: string; -} - -=====================================output===================================== -// Invalid, but recoverable -class C { - declare [key: string]: string; -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-new-line.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor - ["bar"]; -} - -class Foo { - static accessor - bar; -} - -class Foo { - accessor - bar; -} - -=====================================output===================================== -class Foo { - accessor; - ["bar"]; -} - -class Foo { - static accessor; - bar; -} - -class Foo { - accessor; - bar; -} - -================================================================================ -`; - -exports[`invalid-modifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {}; - readonly g() {}; -} - -=====================================output===================================== -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {} - readonly g() {} -} - -================================================================================ -`; - -exports[`parenthesized-decorators-call-expression.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -@(test().x("global").y()) -class X {} - -=====================================output===================================== -@(test().x("global").y()) -class X {} - -================================================================================ -`; - -exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Test { - @(foo\`bar\`) - text: string = "text" -} - -=====================================output===================================== -class Test { - @(foo\`bar\`) - text: string = "text"; -} - -================================================================================ -`; - -exports[`prettier-ignore-nested-unions.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type a = - // foo - | foo1&foo2 - // bar - | bar1&bar2 - // prettier-ignore - | ( - | aaaaaaaaaaaaa&1 - // b - | bbbbbbbbbbbbb&2 - ) - // baz - | baz1&baz2; - -export type b = - // foo - | foo1&foo2 - // bar - | bar1&bar2 - | ( - // prettier-ignore - | aaaaaaaaaaaaa&1 - // b - | bbbbbbbbbbbbb&2 - ) - // baz - | baz1&baz2; - -=====================================output===================================== -export type a = - // foo - | (foo1 & foo2) - // bar - | (bar1 & bar2) - // prettier-ignore - | ( - | aaaaaaaaaaaaa&1 - // b - | bbbbbbbbbbbbb&2 - ) - // baz - | (baz1 & baz2); - -export type b = - // foo - | (foo1 & foo2) - // bar - | (bar1 & bar2) - | ( - | // prettier-ignore - aaaaaaaaaaaaa&1 - // b - | (bbbbbbbbbbbbb & 2) - ) - // baz - | (baz1 & baz2); - -================================================================================ -`; - -exports[`prettier-ignore-parenthesized-type.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Foo = - // prettier-ignore - ( - aa - ); - -=====================================output===================================== -type Foo = - // prettier-ignore - ( - aa - ); - -================================================================================ -`; - -exports[`tuple-labeled-ts.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Invalid label 1 -type T = [x.y: A]; - -// Invalid label 2 -type T = [x<y>: A]; - -=====================================output===================================== -// Invalid label 1 -type T = [x.y: A]; - -// Invalid label 2 -type T = [x<y>: A]; - -================================================================================ -`; diff --git a/tests/format/misc/typescript-babel-only/declare-index-signature.ts b/tests/format/misc/typescript-babel-only/declare-index-signature.ts deleted file mode 100644 index 2ba1b7e1c876..000000000000 --- a/tests/format/misc/typescript-babel-only/declare-index-signature.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Invalid, but recoverable -class C { - declare [key: string]: string; -} diff --git a/tests/format/misc/typescript-babel-only/format.test.js b/tests/format/misc/typescript-babel-only/format.test.js new file mode 100644 index 000000000000..4d5894a24a52 --- /dev/null +++ b/tests/format/misc/typescript-babel-only/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts"]); diff --git a/tests/format/misc/typescript-babel-only/invalid-modifiers.ts b/tests/format/misc/typescript-babel-only/invalid-modifiers.ts deleted file mode 100644 index 97fbbb1e8bb4..000000000000 --- a/tests/format/misc/typescript-babel-only/invalid-modifiers.ts +++ /dev/null @@ -1,14 +0,0 @@ -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {}; - readonly g() {}; -} diff --git a/tests/format/misc/typescript-babel-only/jsfmt.spec.js b/tests/format/misc/typescript-babel-only/jsfmt.spec.js deleted file mode 100644 index a969baea5c62..000000000000 --- a/tests/format/misc/typescript-babel-only/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel-ts"]); diff --git a/tests/format/misc/typescript-babel-only/tuple-labeled-ts.ts b/tests/format/misc/typescript-babel-only/tuple-labeled-ts.ts deleted file mode 100644 index 42eb03cb2ab1..000000000000 --- a/tests/format/misc/typescript-babel-only/tuple-labeled-ts.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Invalid label 1 -type T = [x.y: A]; - -// Invalid label 2 -type T = [x<y>: A]; diff --git a/tests/format/misc/typescript-only/__snapshots__/format.test.js.snap b/tests/format/misc/typescript-only/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3759f3e304c2 --- /dev/null +++ b/tests/format/misc/typescript-only/__snapshots__/format.test.js.snap @@ -0,0 +1,406 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`await-with-parens.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function foo(promise) { await (promise); } + +function a() { + return await (1) +} + +() => { await (x) }; + +function foo() { + await + (foo); +} + +export class C { + p = await (0); +} + +await (0); + +=====================================output===================================== +function foo(promise) { + await(promise) +} + +function a() { + return await(1) +} + +;() => { + await(x) +} + +function foo() { + await(foo) +} + +export class C { + p = await(0) +} + +await 0 + +================================================================================ +`; + +exports[`await-with-parens.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo(promise) { await (promise); } + +function a() { + return await (1) +} + +() => { await (x) }; + +function foo() { + await + (foo); +} + +export class C { + p = await (0); +} + +await (0); + +=====================================output===================================== +function foo(promise) { + await(promise); +} + +function a() { + return await(1); +} + +() => { + await(x); +}; + +function foo() { + await(foo); +} + +export class C { + p = await(0); +} + +await 0; + +================================================================================ +`; + +exports[`decorator-auto-accessors-abstract-class.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +abstract class Foo { + declare accessor prop7: number; + private accessor #p: any; + + accessor a!; + abstract accessor #s; + accessor #d?; + abstract accessor f; + readonly accessor g; +} + +=====================================output===================================== +abstract class Foo { + declare accessor prop7: number + private accessor #p: any + + accessor a! + abstract accessor #s + accessor #d? + abstract accessor f + readonly accessor g +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-abstract-class.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class Foo { + declare accessor prop7: number; + private accessor #p: any; + + accessor a!; + abstract accessor #s; + accessor #d?; + abstract accessor f; + readonly accessor g; +} + +=====================================output===================================== +abstract class Foo { + declare accessor prop7: number; + private accessor #p: any; + + accessor a!; + abstract accessor #s; + accessor #d?; + abstract accessor f; + readonly accessor g; +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-declara-class.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +declare class C { + accessor x = 1; + #y = 1; +} + +=====================================output===================================== +declare class C { + accessor x = 1 + #y = 1 +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-declara-class.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare class C { + accessor x = 1; + #y = 1; +} + +=====================================output===================================== +declare class C { + accessor x = 1; + #y = 1; +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-mixed-modifiers.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +abstract class Foo { + accessor prop: number = 1; + static accessor prop2: number = 1; + accessor #prop3: number = 1; + accessor [prop4]: number = 1; + private accessor prop5: number = 1; + abstract accessor prop6: number; + private accessor #p: any; + + accessor a!: any; + accessor aa!: any; + abstract accessor #s; + readonly accessor g; +} + +=====================================output===================================== +abstract class Foo { + accessor prop: number = 1 + static accessor prop2: number = 1 + accessor #prop3: number = 1 + accessor [prop4]: number = 1 + private accessor prop5: number = 1 + abstract accessor prop6: number + private accessor #p: any + + accessor a!: any + accessor aa!: any + abstract accessor #s + readonly accessor g +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-mixed-modifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class Foo { + accessor prop: number = 1; + static accessor prop2: number = 1; + accessor #prop3: number = 1; + accessor [prop4]: number = 1; + private accessor prop5: number = 1; + abstract accessor prop6: number; + private accessor #p: any; + + accessor a!: any; + accessor aa!: any; + abstract accessor #s; + readonly accessor g; +} + +=====================================output===================================== +abstract class Foo { + accessor prop: number = 1; + static accessor prop2: number = 1; + accessor #prop3: number = 1; + accessor [prop4]: number = 1; + private accessor prop5: number = 1; + abstract accessor prop6: number; + private accessor #p: any; + + accessor a!: any; + accessor aa!: any; + abstract accessor #s; + readonly accessor g; +} + +================================================================================ +`; + +exports[`parenthesized-decorators-call-expression.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +@(test().x("global").y()) +class X {} + +=====================================output===================================== +@(test().x("global").y()) +class X {} + +================================================================================ +`; + +exports[`parenthesized-decorators-call-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +@(test().x("global").y()) +class X {} + +=====================================output===================================== +@(test().x("global").y()) +class X {} + +================================================================================ +`; + +exports[`parenthesized-decorators-tagged-template.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class Test { + @foo\`bar\` + text: string = "text" +} + +=====================================output===================================== +class Test { + @(foo\`bar\`) + text: string = "text" +} + +================================================================================ +`; + +exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Test { + @foo\`bar\` + text: string = "text" +} + +=====================================output===================================== +class Test { + @(foo\`bar\`) + text: string = "text"; +} + +================================================================================ +`; + +exports[`prettier-ignore-parenthesized-type.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +type Foo = + // prettier-ignore + ( + aa + ); + +=====================================output===================================== +type Foo = + // prettier-ignore + aa + +================================================================================ +`; + +exports[`prettier-ignore-parenthesized-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = + // prettier-ignore + ( + aa + ); + +=====================================output===================================== +type Foo = + // prettier-ignore + aa; + +================================================================================ +`; diff --git a/tests/format/misc/typescript-only/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/typescript-only/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 39543b69da08..000000000000 --- a/tests/format/misc/typescript-only/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,613 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`await-with-parens.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function foo(promise) { await (promise); } - -function a() { - return await (1) -} - -() => { await (x) }; - -function foo() { - await - (foo); -} - -export class C { - p = await (0); -} - -await (0); - -=====================================output===================================== -function foo(promise) { - await(promise) -} - -function a() { - return await(1) -} - -;() => { - await(x) -} - -function foo() { - await(foo) -} - -export class C { - p = await(0) -} - -await 0 - -================================================================================ -`; - -exports[`await-with-parens.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo(promise) { await (promise); } - -function a() { - return await (1) -} - -() => { await (x) }; - -function foo() { - await - (foo); -} - -export class C { - p = await (0); -} - -await (0); - -=====================================output===================================== -function foo(promise) { - await(promise); -} - -function a() { - return await(1); -} - -() => { - await(x); -}; - -function foo() { - await(foo); -} - -export class C { - p = await(0); -} - -await 0; - -================================================================================ -`; - -exports[`decorator-auto-accessor-like-property-name.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class C { - accessor; - bar; -} - -=====================================output===================================== -class C { - accessor; - bar -} - -================================================================================ -`; - -exports[`decorator-auto-accessor-like-property-name.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - accessor; - bar; -} - -=====================================output===================================== -class C { - accessor; - bar; -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-abstract-class.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -abstract class Foo { - declare accessor prop7: number; - private accessor #p: any; - - accessor a!; - abstract accessor #s; - accessor #d?; - abstract accessor f; - readonly accessor g; -} - -=====================================output===================================== -abstract class Foo { - declare accessor prop7: number - private accessor #p: any - - accessor a! - abstract accessor #s - accessor #d? - abstract accessor f - readonly accessor g -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-abstract-class.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class Foo { - declare accessor prop7: number; - private accessor #p: any; - - accessor a!; - abstract accessor #s; - accessor #d?; - abstract accessor f; - readonly accessor g; -} - -=====================================output===================================== -abstract class Foo { - declare accessor prop7: number; - private accessor #p: any; - - accessor a!; - abstract accessor #s; - accessor #d?; - abstract accessor f; - readonly accessor g; -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-declara-class.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -declare class C { - accessor x = 1; - #y = 1; -} - -=====================================output===================================== -declare class C { - accessor x = 1 - #y = 1 -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-declara-class.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare class C { - accessor x = 1; - #y = 1; -} - -=====================================output===================================== -declare class C { - accessor x = 1; - #y = 1; -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-mixed-modifiers.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -abstract class Foo { - accessor prop: number = 1; - static accessor prop2: number = 1; - accessor #prop3: number = 1; - accessor [prop4]: number = 1; - private accessor prop5: number = 1; - abstract accessor prop6: number; - private accessor #p: any; - - accessor a!: any; - accessor aa!: any; - abstract accessor #s; - readonly accessor g; -} - -=====================================output===================================== -abstract class Foo { - accessor prop: number = 1 - static accessor prop2: number = 1 - accessor #prop3: number = 1 - accessor [prop4]: number = 1 - private accessor prop5: number = 1 - abstract accessor prop6: number - private accessor #p: any - - accessor a!: any - accessor aa!: any - abstract accessor #s - readonly accessor g -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-mixed-modifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class Foo { - accessor prop: number = 1; - static accessor prop2: number = 1; - accessor #prop3: number = 1; - accessor [prop4]: number = 1; - private accessor prop5: number = 1; - abstract accessor prop6: number; - private accessor #p: any; - - accessor a!: any; - accessor aa!: any; - abstract accessor #s; - readonly accessor g; -} - -=====================================output===================================== -abstract class Foo { - accessor prop: number = 1; - static accessor prop2: number = 1; - accessor #prop3: number = 1; - accessor [prop4]: number = 1; - private accessor prop5: number = 1; - abstract accessor prop6: number; - private accessor #p: any; - - accessor a!: any; - accessor aa!: any; - abstract accessor #s; - readonly accessor g; -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-new-line.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Foo { - accessor - ["bar"]; -} - -class Foo { - static accessor - bar; -} - -class Foo { - accessor - bar; -} - -=====================================output===================================== -class Foo { - accessor; - ["bar"] -} - -class Foo { - static accessor; - bar -} - -class Foo { - accessor; - bar -} - -================================================================================ -`; - -exports[`decorator-auto-accessors-new-line.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - accessor - ["bar"]; -} - -class Foo { - static accessor - bar; -} - -class Foo { - accessor - bar; -} - -=====================================output===================================== -class Foo { - accessor; - ["bar"]; -} - -class Foo { - static accessor; - bar; -} - -class Foo { - accessor; - bar; -} - -================================================================================ -`; - -exports[`invalid-modifiers.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {}; - abstract f() {}; - readonly g() {}; -} - -=====================================output===================================== -interface Foo { - private a() - public b() - protected c() - static d() - e() - f() - readonly g() -} - -class Bar { - e() {} - abstract f() {} - g() {} -} - -================================================================================ -`; - -exports[`invalid-modifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {}; - abstract f() {}; - readonly g() {}; -} - -=====================================output===================================== -interface Foo { - private a(); - public b(); - protected c(); - static d(); - e(); - f(); - readonly g(); -} - -class Bar { - e() {} - abstract f() {} - g() {} -} - -================================================================================ -`; - -exports[`parenthesized-decorators-call-expression.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -@(test().x("global").y()) -class X {} - -=====================================output===================================== -@test().x("global").y() -class X {} - -================================================================================ -`; - -exports[`parenthesized-decorators-call-expression.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -@(test().x("global").y()) -class X {} - -=====================================output===================================== -@test().x("global").y() -class X {} - -================================================================================ -`; - -exports[`parenthesized-decorators-tagged-template.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class Test { - @foo\`bar\` - text: string = "text" -} - -=====================================output===================================== -class Test { - @foo\`bar\` - text: string = "text" -} - -================================================================================ -`; - -exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Test { - @foo\`bar\` - text: string = "text" -} - -=====================================output===================================== -class Test { - @foo\`bar\` - text: string = "text"; -} - -================================================================================ -`; - -exports[`prettier-ignore-parenthesized-type.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -type Foo = - // prettier-ignore - ( - aa - ); - -=====================================output===================================== -type Foo = - // prettier-ignore - aa - -================================================================================ -`; - -exports[`prettier-ignore-parenthesized-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Foo = - // prettier-ignore - ( - aa - ); - -=====================================output===================================== -type Foo = - // prettier-ignore - aa; - -================================================================================ -`; diff --git a/tests/format/misc/typescript-only/format.test.js b/tests/format/misc/typescript-only/format.test.js new file mode 100644 index 000000000000..ca21c10853c1 --- /dev/null +++ b/tests/format/misc/typescript-only/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/misc/typescript-only/invalid-modifiers.ts b/tests/format/misc/typescript-only/invalid-modifiers.ts deleted file mode 100644 index 440e6268d1e3..000000000000 --- a/tests/format/misc/typescript-only/invalid-modifiers.ts +++ /dev/null @@ -1,15 +0,0 @@ -interface Foo { - private a(); - public b(); - protected c(); - static d(); - declare e(); - abstract f(); - readonly g(); -} - -class Bar { - declare e() {}; - abstract f() {}; - readonly g() {}; -} diff --git a/tests/format/misc/typescript-only/jsfmt.spec.js b/tests/format/misc/typescript-only/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/misc/typescript-only/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/mjml/mj-style/__snapshots__/format.test.js.snap b/tests/format/mjml/mj-style/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..dd27891bdf08 --- /dev/null +++ b/tests/format/mjml/mj-style/__snapshots__/format.test.js.snap @@ -0,0 +1,125 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`mj-style.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml> + <mj-style> +.some-class { + color: red; + background-color: blue; +padding:10px; +} + </mj-style> + </mjml> + +=====================================output===================================== +<mjml> + <mj-style> + .some-class { + color: red; + background-color: blue; + padding: 10px; + } + </mj-style> +</mjml> + +================================================================================ +`; + +exports[`mj-style-complex.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml> + <mj-style> + @media only screen and (max-width: 480px) { + .mobile-full-width { + width: 100% !important; + } + .mobile-center { + text-align:center!important; + } +} + + .custom-btn { + background-color: #FF5733; + border-radius: 5px; + padding: 10px 20px; +margin:0px; +transform: translateY(0); + } + </mj-style> +</mjml> + +=====================================output===================================== +<mjml> + <mj-style> + @media only screen and (max-width: 480px) { + .mobile-full-width { + width: 100% !important; + } + .mobile-center { + text-align: center !important; + } + } + + .custom-btn { + background-color: #ff5733; + border-radius: 5px; + padding: 10px 20px; + margin: 0px; + transform: translateY(0); + } + </mj-style> +</mjml> + +================================================================================ +`; + +exports[`namespace.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml> + +<mj-style> .should-format{ + as: 'css' +}</mj-style> + +<unknown:mj-style> .should-not-format{ + as: 'css' +}</unknown:mj-style> + + <unknown:mj-section> +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + </unknown:mj-section> + +</mjml> + +=====================================output===================================== +<mjml> + <mj-style> + .should-format { + as: "css"; + } + </mj-style> + + <unknown:mj-style> .should-not-format{ as: 'css' }</unknown:mj-style> + + <unknown:mj-section> + <mj-style> .should-not-format{ as: 'css' }</mj-style> + </unknown:mj-section> +</mjml> + +================================================================================ +`; diff --git a/tests/format/mjml/mj-style/embedded-language-formatting-off/__snapshots__/format.test.js.snap b/tests/format/mjml/mj-style/embedded-language-formatting-off/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f93e36a92b13 --- /dev/null +++ b/tests/format/mjml/mj-style/embedded-language-formatting-off/__snapshots__/format.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`mj-style.mjml - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml> + +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + +</mjml> + +=====================================output===================================== +<mjml> + <mj-style> + .should-not-format{ + as: 'css' + } + </mj-style> +</mjml> + +================================================================================ +`; diff --git a/tests/format/mjml/mj-style/embedded-language-formatting-off/format.test.js b/tests/format/mjml/mj-style/embedded-language-formatting-off/format.test.js new file mode 100644 index 000000000000..aad41c8dab04 --- /dev/null +++ b/tests/format/mjml/mj-style/embedded-language-formatting-off/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["mjml"], { + embeddedLanguageFormatting: "off", +}); diff --git a/tests/format/mjml/mj-style/embedded-language-formatting-off/mj-style.mjml b/tests/format/mjml/mj-style/embedded-language-formatting-off/mj-style.mjml new file mode 100644 index 000000000000..0efa7a6a9719 --- /dev/null +++ b/tests/format/mjml/mj-style/embedded-language-formatting-off/mj-style.mjml @@ -0,0 +1,7 @@ +<mjml> + +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + +</mjml> diff --git a/tests/format/mjml/mj-style/format.test.js b/tests/format/mjml/mj-style/format.test.js new file mode 100644 index 000000000000..5af041ec4149 --- /dev/null +++ b/tests/format/mjml/mj-style/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mjml"]); diff --git a/tests/format/mjml/mj-style/mj-style-complex.mjml b/tests/format/mjml/mj-style/mj-style-complex.mjml new file mode 100644 index 000000000000..f861af2a6cb7 --- /dev/null +++ b/tests/format/mjml/mj-style/mj-style-complex.mjml @@ -0,0 +1,20 @@ +<mjml> + <mj-style> + @media only screen and (max-width: 480px) { + .mobile-full-width { + width: 100% !important; + } + .mobile-center { + text-align:center!important; + } +} + + .custom-btn { + background-color: #FF5733; + border-radius: 5px; + padding: 10px 20px; +margin:0px; +transform: translateY(0); + } + </mj-style> +</mjml> diff --git a/tests/format/mjml/mj-style/mj-style.mjml b/tests/format/mjml/mj-style/mj-style.mjml new file mode 100644 index 000000000000..cfcb6f2d5242 --- /dev/null +++ b/tests/format/mjml/mj-style/mj-style.mjml @@ -0,0 +1,9 @@ +<mjml> + <mj-style> +.some-class { + color: red; + background-color: blue; +padding:10px; +} + </mj-style> + </mjml> diff --git a/tests/format/mjml/mj-style/namespace.mjml b/tests/format/mjml/mj-style/namespace.mjml new file mode 100644 index 000000000000..c35893bfc36e --- /dev/null +++ b/tests/format/mjml/mj-style/namespace.mjml @@ -0,0 +1,17 @@ +<mjml> + +<mj-style> .should-format{ + as: 'css' +}</mj-style> + +<unknown:mj-style> .should-not-format{ + as: 'css' +}</unknown:mj-style> + + <unknown:mj-section> +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + </unknown:mj-section> + +</mjml> diff --git a/tests/format/mjml/mjml/__snapshots__/format.test.js.snap b/tests/format/mjml/mjml/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..03b6b1e5f90a --- /dev/null +++ b/tests/format/mjml/mjml/__snapshots__/format.test.js.snap @@ -0,0 +1,115 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml></mjml> +=====================================output===================================== +<mjml></mjml> + +================================================================================ +`; + +exports[`example.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- https://github.com/prettier/prettier/pull/17400#issuecomment-2829653054 --> + +<mjml> + <mj-boDy> + <mj-seCTion> + <mj-column> + + <!-- both are equivalent --> + <mj-iMage width="100px" src="/assets/img/logo-small.png"></mj-iMage> + <mj-image width="100px" src="/assets/img/logo-small.png" /> + + <mj-divider border-color="#F45E43"></mj-divider> + + <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Hello World</mj-text> + + </mj-column> + </mj-seCTion> + </mj-boDy> +</mjml> + +=====================================output===================================== +<!-- https://github.com/prettier/prettier/pull/17400#issuecomment-2829653054 --> + +<mjml> + <mj-boDy> + <mj-seCTion> + <mj-column> + <!-- both are equivalent --> + <mj-iMage width="100px" src="/assets/img/logo-small.png"></mj-iMage> + <mj-image width="100px" src="/assets/img/logo-small.png" /> + + <mj-divider border-color="#F45E43"></mj-divider> + + <mj-text font-size="20px" color="#F45E43" font-family="helvetica" + >Hello World</mj-text + > + </mj-column> + </mj-seCTion> + </mj-boDy> +</mjml> + +================================================================================ +`; + +exports[`head.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mjml> + <mj-head> + <mj-title> + + + The green fix eats mango. + + + </mj-title> + <mj-breakpoint width="600px" /> + <mj-preview>Do + + you like cheese? We do!</mj-preview> + <mj-attributes> + <mj-text + + + + align="left" color="#000" + + + font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" /> + </mj-attributes> + </mj-head> +</mjml> + +=====================================output===================================== +<mjml> + <mj-head> + <mj-title> The green fix eats mango. </mj-title> + <mj-breakpoint width="600px" /> + <mj-preview>Do you like cheese? We do!</mj-preview> + <mj-attributes> + <mj-text + align="left" + color="#000" + font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" + /> + </mj-attributes> + </mj-head> +</mjml> + +================================================================================ +`; diff --git a/tests/format/mjml/mjml/__snapshots__/jsfmt.spec.js.snap b/tests/format/mjml/mjml/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 297ff67b0e76..000000000000 --- a/tests/format/mjml/mjml/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,65 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.mjml format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<mjml></mjml> -=====================================output===================================== -<mjml></mjml> - -================================================================================ -`; - -exports[`head.mjml format 1`] = ` -====================================options===================================== -parsers: ["html"] -printWidth: 80 - | printWidth -=====================================input====================================== -<mjml> - <mj-head> - <mj-title> - - - The green fix eats mango. - - - </mj-title> - <mj-breakpoint width="600px" /> - <mj-preview>Do - - you like cheese? We do!</mj-preview> - <mj-attributes> - <mj-text - - - - align="left" color="#000" - - - font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" /> - </mj-attributes> - </mj-head> -</mjml> - -=====================================output===================================== -<mjml> - <mj-head> - <mj-title> The green fix eats mango. </mj-title> - <mj-breakpoint width="600px" /> - <mj-preview>Do you like cheese? We do!</mj-preview> - <mj-attributes> - <mj-text - align="left" - color="#000" - font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" - /> - </mj-attributes> - </mj-head> -</mjml> - -================================================================================ -`; diff --git a/tests/format/mjml/mjml/example.mjml b/tests/format/mjml/mjml/example.mjml new file mode 100644 index 000000000000..2c0dc58bd378 --- /dev/null +++ b/tests/format/mjml/mjml/example.mjml @@ -0,0 +1,19 @@ +<!-- https://github.com/prettier/prettier/pull/17400#issuecomment-2829653054 --> + +<mjml> + <mj-boDy> + <mj-seCTion> + <mj-column> + + <!-- both are equivalent --> + <mj-iMage width="100px" src="/assets/img/logo-small.png"></mj-iMage> + <mj-image width="100px" src="/assets/img/logo-small.png" /> + + <mj-divider border-color="#F45E43"></mj-divider> + + <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Hello World</mj-text> + + </mj-column> + </mj-seCTion> + </mj-boDy> +</mjml> diff --git a/tests/format/mjml/mjml/format.test.js b/tests/format/mjml/mjml/format.test.js new file mode 100644 index 000000000000..5af041ec4149 --- /dev/null +++ b/tests/format/mjml/mjml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["mjml"]); diff --git a/tests/format/mjml/mjml/jsfmt.spec.js b/tests/format/mjml/mjml/jsfmt.spec.js deleted file mode 100644 index 53763df9b20b..000000000000 --- a/tests/format/mjml/mjml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["html"]); diff --git a/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap b/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1856c08a6919 --- /dev/null +++ b/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-in-html.mjml [html] format 1`] = ` +"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (3:9) + 1 | <mj-raw><p></mj-raw> + 2 | <mj-text>Wrapped</mj-text> +> 3 | <mj-raw></p></mj-raw> + | ^^^^ + 4 | + 5 | <MJ-RAW><P></MJ-RAW> + 6 | <MJ-TEXT>WRAPPED</MJ-TEXT>" +`; + +exports[`invalid-in-html.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml", "html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mj-raw><p></mj-raw> +<mj-text>Wrapped</mj-text> +<mj-raw></p></mj-raw> + +<MJ-RAW><P></MJ-RAW> +<MJ-TEXT>WRAPPED</MJ-TEXT> +<MJ-RAW></P></MJ-RAW> + +=====================================output===================================== +<mj-raw><p></mj-raw> +<mj-text>Wrapped</mj-text> +<mj-raw></p></mj-raw> + +<MJ-RAW><P></MJ-RAW> +<MJ-TEXT>WRAPPED</MJ-TEXT> +<MJ-RAW></P></MJ-RAW> + +================================================================================ +`; diff --git a/tests/format/mjml/parse/mj-raw/format.test.js b/tests/format/mjml/parse/mj-raw/format.test.js new file mode 100644 index 000000000000..e10c3bafd2e4 --- /dev/null +++ b/tests/format/mjml/parse/mj-raw/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["mjml", "html"], { + errors: { html: ["invalid-in-html.mjml"] }, +}); diff --git a/tests/format/mjml/parse/mj-raw/invalid-in-html.mjml b/tests/format/mjml/parse/mj-raw/invalid-in-html.mjml new file mode 100644 index 000000000000..e5a22ece360f --- /dev/null +++ b/tests/format/mjml/parse/mj-raw/invalid-in-html.mjml @@ -0,0 +1,7 @@ +<mj-raw><p></mj-raw> +<mj-text>Wrapped</mj-text> +<mj-raw></p></mj-raw> + +<MJ-RAW><P></MJ-RAW> +<MJ-TEXT>WRAPPED</MJ-TEXT> +<MJ-RAW></P></MJ-RAW> diff --git a/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap b/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b13d71ac8b3b --- /dev/null +++ b/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-in-html.mjml [html] format 1`] = ` +"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (2:25) + 1 | <mj-style> +> 2 | a::before { content: "</p>"; + | ^^^^ + 3 | } + 4 | </mj-style> + 5 |" +`; + +exports[`invalid-in-html.mjml format 1`] = ` +====================================options===================================== +parsers: ["mjml", "html"] +printWidth: 80 + | printWidth +=====================================input====================================== +<mj-style> + a::before { content: "</p>"; + } +</mj-style> + +<MJ-STYLE> + a::before { content: "</p>"; + } +</MJ-STYLE> + +=====================================output===================================== +<mj-style> + a::before { + content: "</p>"; + } +</mj-style> + +<MJ-STYLE> a::before { content: "</p>"; } </MJ-STYLE> + +================================================================================ +`; diff --git a/tests/format/mjml/parse/mj-style/format.test.js b/tests/format/mjml/parse/mj-style/format.test.js new file mode 100644 index 000000000000..e10c3bafd2e4 --- /dev/null +++ b/tests/format/mjml/parse/mj-style/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["mjml", "html"], { + errors: { html: ["invalid-in-html.mjml"] }, +}); diff --git a/tests/format/mjml/parse/mj-style/invalid-in-html.mjml b/tests/format/mjml/parse/mj-style/invalid-in-html.mjml new file mode 100644 index 000000000000..d83271a3c5a9 --- /dev/null +++ b/tests/format/mjml/parse/mj-style/invalid-in-html.mjml @@ -0,0 +1,9 @@ +<mj-style> + a::before { content: "</p>"; + } +</mj-style> + +<MJ-STYLE> + a::before { content: "</p>"; + } +</MJ-STYLE> diff --git a/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/at-rule/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap rename to tests/format/scss/at-rule/__snapshots__/format.test.js.snap diff --git a/tests/format/scss/at-rule/format.test.js b/tests/format/scss/at-rule/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/at-rule/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/at-rule/jsfmt.spec.js b/tests/format/scss/at-rule/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/at-rule/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/atrule/__snapshots__/format.test.js.snap b/tests/format/scss/atrule/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..212d0909c059 --- /dev/null +++ b/tests/format/scss/atrule/__snapshots__/format.test.js.snap @@ -0,0 +1,1125 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`each.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@each $animal in puma, sea-slug, egret, salamander {} +@each $animal in puma,sea-slug,egret,salamander{} +@each $animal in puma , sea-slug , egret , salamander {} +@each $animal in + puma, sea-slug, egret, salamander {} +@each + $animal + in + puma + , + sea-slug + , + egret + , + salamander + { + } +@each +$animal +in +puma +, +sea-slug +, +egret +, +salamander +{ +} +@each + +$animal + +in + +puma + +, + +sea-slug + +, + +egret + +, + +salamander + +{ + +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) {} +@each $animal in((puma),(sea-slug),(egret),(salamander)){} +@each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) {} +@each $animal + in ((puma), (sea-slug), (egret), (salamander)) {} +@each + $animal + in ( + (puma), + (sea-slug), + (egret), + (salamander) + ) { } +@each + $animal + in + ( + ( + puma + ) + , + ( + sea-slug + ) + , + ( + egret + ) + , + ( + salamander + ) + ) + { + } +@each + + $animal + + in + + ( + + ( + + puma + + ) + + , + + ( + + sea-slug + + ) + + , + + ( + + egret + + ) + + , + + ( + + salamander + + ) + + ) + + { + + } +@each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $animal,$color,$cursor in (puma,black,default),(sea-slug,blue,pointer),(egret,white,move){} +@each $animal, $color, $cursor in + (puma, black, default), + (sea-slug, blue, pointer), + (egret, white, move) {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var in puma, sea-slug, egret, salamander {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each $element,$size in(h1:20px,h2:16px,h3:14px){} +@each $element , $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) {} +@each $element, + $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each + $element, + $size + in + ( + h1 + : + 20px + , + h2 + : + 16px + , + h3 + : + 14px + ) + { + } +@each +$element, +$size +in +( +h1 +: +20px +, +h2 +: +16px +, +h3 +: +14px +) +{ +} +@each +$element, + +$size + +in + +( + +h1 + +: + +20px + +, + +h2 + +: + +16px + +, + +h3 + +: + +14px + +) + +{ + +} + +=====================================output===================================== +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in puma, sea-slug, egret, salamander { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) { +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) +{ +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) +{ +} +@each $animal, $color, $cursor in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) +{ +} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + in puma, + sea-slug, egret, salamander +{ +} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + in (puma, black, default), + (sea-slug, blue, pointer), (egret, white, move) +{ +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in(h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) { +} +@each $element, + $size + in ( + h1: 20px, + + h2: 16px, + + h3: 14px + ) +{ +} + +================================================================================ +`; + +exports[`for.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@for $i from 1 through 8 {} +@for $i from 1 through 8{} +@for $i from 1 through 8 {} +@for $i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for + +$i + +from + +1 + +through + +8 + +{} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from 1 through 5 {} +@for $i from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through 5 {} +@for $i from 1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($var1 + $var1) through ($var-2 + $var-2) {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1) through ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2) {} + +=====================================output===================================== +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $i from 1 through 8 { +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from 1 + through 5 +{ +} +@for $i + from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + through 5 +{ +} +@for $i + from 1 + through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 +{ +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 +{ +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 +{ +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from ($var1 + $var1) + through ($var-2 + $var-2) +{ +} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + from ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + ) + through ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + ) +{ +} + +================================================================================ +`; + +exports[`if-else.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@if $media == phonePortrait { + $k: .15625; +} @else if $media == phoneLandscape { + $k: .08803; +} @else if $media == tabletPortrait { + $k: .065106; +} +p { + @if $type == ocean {} + @if $type==ocean{} + @if $type == ocean {} + @if $type + == ocean {} + @if + $type + == + ocean + { + } + @if + + $type + + == + + ocean + + { + + } + @if (($type) == (ocean)) {} + @if (($type)==(ocean)){} + @if ( ( $type ) == ( ocean ) ) {} + @if (($type) + == (ocean)) {} + @if + ( + ( + $type + ) + == + ( + ocean + ) + ) + { + } + @if + + ( + + ( + + $type + + ) + + == + + ( + + ocean + + ) + + ) + + { + + } + @if $type == ocean { + color: blue; + } @else if $type == matador { + color: red; + } @else if $type == monster { + color: green; + } @else { + color: black; + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type==ocean{}@else if $type==matador{} + @if $type == ocean { } @else if $type == matador { } + @if $type == ocean {} + @else if $type == matador {} + @if + $type == ocean {} + @else if + $type == matador {} + @if + $type + == + ocean + { + } + @else + if + $type + == + matador + { + } + @if + + $type + + == + + ocean + + { + + } + + @else + + if + + $type + + == + + matador + + { + + } + @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: blue; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: red; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: green; + } @else { + color: black; + } + @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 and $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 {} + @if $base-font-size != 16px or $base-line-height != 24px or $base-unit != 'em' or $h1-font-size != 2 * $base-font-size or $h2-font-size != 1.5 * $base-font-size or $h3-font-size != 1.17 * $base-font-size or $h4-font-size != 1 * $base-font-size or $h5-font-size != 0.83 * $base-font-size or $h6-font-size != 0.67 * $base-font-size or $indent-amount != 40px {} + @if (str-slice($item, 0, 1) == ":") {} + @if (str-slice($item, 0, 3) == " : ") {} + @if ($type == ocean) {} @else if ($type == matador) {} @else {} +} + +=====================================output===================================== +@if $media == phonePortrait { + $k: 0.15625; +} @else if $media == phoneLandscape { + $k: 0.08803; +} @else if $media == tabletPortrait { + $k: 0.065106; +} +p { + @if $type == ocean { + } + @if $type==ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if $type == ocean { + } + @if (($type) == (ocean)) { + } + @if (($type) ==(ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if (($type) == (ocean)) { + } + @if $type == ocean { + color: blue; + } @else if $type == matador { + color: red; + } @else if $type == monster { + color: green; + } @else { + color: black; + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type==ocean { + } @else if $type==matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type == ocean { + } @else if $type == matador { + } + @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + { + color: blue; + } @else if + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + { + color: red; + } @else if + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables + { + color: green; + } @else { + color: black; + } + @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 { + } + @if $very-very-very-very-very-very-long-var == + 0 and + $very-very-very-long-var == + 0 + { + } + @if $very-very-very-very-very-very-very-very-very-very-very-long-var == + 0 and + $very-very-very-very-very-very-very-very-very-very-very-long-var == + 0 + { + } + @if $base-font-size != + 16px or + $base-line-height != + 24px or + $base-unit != + "em" or + $h1-font-size != + 2 * + $base-font-size or + $h2-font-size != + 1.5 * + $base-font-size or + $h3-font-size != + 1.17 * + $base-font-size or + $h4-font-size != + 1 * + $base-font-size or + $h5-font-size != + 0.83 * + $base-font-size or + $h6-font-size != + 0.67 * + $base-font-size or + $indent-amount != + 40px + { + } + @if (str-slice($item, 0, 1) == ":") { + } + @if (str-slice($item, 0, 3) == " : ") { + } + @if ($type == ocean) { + } @else if ($type == matador) { + } @else { + } +} + +================================================================================ +`; + +exports[`include.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px,2px,$arg2:10,2px 4px 6px); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix +( +1px +, +2px +, +$arg2 +: +10 +, +2px +4px +6px +) +; +@include + +mix + +( + +1px + +, + +2px + +, + +$arg2 + +: + +10 + +, + +2px + +4px + +6px + +) + +; +@include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); +a { + @include global-variable-overriding; + @include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); + @include apply-to-ie6-only {} + @include apply-to-ie6-only{} + @include apply-to-ie6-only + {} + @include + apply-to-ie6-only + { + } + @include + + apply-to-ie6-only + + { + + } +} + +a { +@include section-type-1( +$header: (margin: 0 0 $margin-base, text-align: left), +$decoration: (type: base, margin: 0 auto -1px 0, primary-color: $brand-primary, secondary-color: $gray-light), +$title: (margin: 0 0 $margin-small, color: false, font-size: $font-size-h3, font-weight: false, line-height: $line-height-h3) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +(box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15)) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $brand-primary +) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) +); +} + +=====================================output===================================== +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix( + 1px, + 2px, + $arg2: 10, + + 2px 4px 6px +); +@include mix( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: + 1px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: + 2px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + 2px 4px 6px +); +a { + @include global-variable-overriding; + @include mix( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: + 1px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: + 2px, + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: + 10, + 2px 4px 6px + ); + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } + @include apply-to-ie6-only { + } +} + +a { + @include section-type-1( + $header: ( + margin: 0 0 $margin-base, + text-align: left, + ), + $decoration: ( + type: base, + margin: 0 auto -1px 0, + primary-color: $brand-primary, + secondary-color: $gray-light, + ), + $title: ( + margin: 0 0 $margin-small, + color: false, + font-size: $font-size-h3, + font-weight: false, + line-height: $line-height-h3, + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + border-color: $brand-primary, + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + border-color: + $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value, + ) + ); +} + +================================================================================ +`; + +exports[`while.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@while $i > 0 {} +@while $i>0{} +@while $i > 0 {} +@while $i + > + 0 + {} +@while + $i + > + 0 + {} +@while +$i +> +0 +{ +} +@while + +$i + +> + +0 + +{ + +} +@while ($i > 0) {} +@while ($i>0){} +@while ( $i > 0 ) {} +@while ( $i > 0 ) {} +@while ( + $i > 0 +) {} +@while + ($i > 0) {} +@while +( +$i +> +0 +) +{ +} +@while + +( + +$i + +> + +0 + +) + +{ + +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 {} +@while 1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while (($i) > (0)) {} +@while (($i)>(0)){} +@while ( ( $i ) > ( 0 ) ) {} +@while (($i) + > + (0) +) {} +@while +( +( +$i +) +> +( +0 +) +) +{ +} +@while + +( + +( + +$i + +) + +> + +( + +0 + +) + +) + +{ + +} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while (1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} + +=====================================output===================================== +@while $i > 0 { +} +@while $i>0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while $i > 0 { +} +@while ($i > 0) { +} +@while ($i>0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while ($i > 0) { +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > + 1 +{ +} +@while 1 > + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +{ +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > + $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +{ +} +@while (($i) > (0)) { +} +@while (($i) >(0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while (($i) > (0)) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 +) { +} +@while ( + 1 > + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > + 1 +) { +} +@while ( + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > + $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +) { +} + +================================================================================ +`; diff --git a/tests/format/scss/atrule/each.scss b/tests/format/scss/atrule/each.scss new file mode 100644 index 000000000000..132f81afbdbe --- /dev/null +++ b/tests/format/scss/atrule/each.scss @@ -0,0 +1,217 @@ +@each $animal in puma, sea-slug, egret, salamander {} +@each $animal in puma,sea-slug,egret,salamander{} +@each $animal in puma , sea-slug , egret , salamander {} +@each $animal in + puma, sea-slug, egret, salamander {} +@each + $animal + in + puma + , + sea-slug + , + egret + , + salamander + { + } +@each +$animal +in +puma +, +sea-slug +, +egret +, +salamander +{ +} +@each + +$animal + +in + +puma + +, + +sea-slug + +, + +egret + +, + +salamander + +{ + +} +@each $animal in ((puma), (sea-slug), (egret), (salamander)) {} +@each $animal in((puma),(sea-slug),(egret),(salamander)){} +@each $animal in ( ( puma ) , ( sea-slug ) , ( egret ) , ( salamander ) ) {} +@each $animal + in ((puma), (sea-slug), (egret), (salamander)) {} +@each + $animal + in ( + (puma), + (sea-slug), + (egret), + (salamander) + ) { } +@each + $animal + in + ( + ( + puma + ) + , + ( + sea-slug + ) + , + ( + egret + ) + , + ( + salamander + ) + ) + { + } +@each + + $animal + + in + + ( + + ( + + puma + + ) + + , + + ( + + sea-slug + + ) + + , + + ( + + egret + + ) + + , + + ( + + salamander + + ) + + ) + + { + + } +@each $animal, $color, $cursor in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $animal,$color,$cursor in (puma,black,default),(sea-slug,blue,pointer),(egret,white,move){} +@each $animal, $color, $cursor in + (puma, black, default), + (sea-slug, blue, pointer), + (egret, white, move) {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var in puma, sea-slug, egret, salamander {} +@each $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 in (puma, black, default), (sea-slug, blue, pointer), (egret, white, move) {} +@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each $element,$size in(h1:20px,h2:16px,h3:14px){} +@each $element , $size in ( h1 : 20px , h2 : 16px , h3 : 14px ) {} +@each $element, + $size in (h1: 20px, h2: 16px, h3: 14px) {} +@each + $element, + $size + in + ( + h1 + : + 20px + , + h2 + : + 16px + , + h3 + : + 14px + ) + { + } +@each +$element, +$size +in +( +h1 +: +20px +, +h2 +: +16px +, +h3 +: +14px +) +{ +} +@each +$element, + +$size + +in + +( + +h1 + +: + +20px + +, + +h2 + +: + +16px + +, + +h3 + +: + +14px + +) + +{ + +} diff --git a/tests/format/scss/atrule/for.scss b/tests/format/scss/atrule/for.scss new file mode 100644 index 000000000000..265c87f703ee --- /dev/null +++ b/tests/format/scss/atrule/for.scss @@ -0,0 +1,43 @@ +@for $i from 1 through 8 {} +@for $i from 1 through 8{} +@for $i from 1 through 8 {} +@for $i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for +$i +from +1 +through +8 +{} +@for + +$i + +from + +1 + +through + +8 + +{} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from 1 through 5 {} +@for $i from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through 5 {} +@for $i from 1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 through $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($var1 + $var1) through ($var-2 + $var-2) {} +@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1) through ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2) {} diff --git a/tests/format/scss/atrule/format.test.js b/tests/format/scss/atrule/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/atrule/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/atrule/if-else.scss b/tests/format/scss/atrule/if-else.scss new file mode 100644 index 000000000000..df7c6e6a3973 --- /dev/null +++ b/tests/format/scss/atrule/if-else.scss @@ -0,0 +1,145 @@ +@if $media == phonePortrait { + $k: .15625; +} @else if $media == phoneLandscape { + $k: .08803; +} @else if $media == tabletPortrait { + $k: .065106; +} +p { + @if $type == ocean {} + @if $type==ocean{} + @if $type == ocean {} + @if $type + == ocean {} + @if + $type + == + ocean + { + } + @if + + $type + + == + + ocean + + { + + } + @if (($type) == (ocean)) {} + @if (($type)==(ocean)){} + @if ( ( $type ) == ( ocean ) ) {} + @if (($type) + == (ocean)) {} + @if + ( + ( + $type + ) + == + ( + ocean + ) + ) + { + } + @if + + ( + + ( + + $type + + ) + + == + + ( + + ocean + + ) + + ) + + { + + } + @if $type == ocean { + color: blue; + } @else if $type == matador { + color: red; + } @else if $type == monster { + color: green; + } @else { + color: black; + } + @if $type == ocean { + } @else if $type == matador { + } + @if $type==ocean{}@else if $type==matador{} + @if $type == ocean { } @else if $type == matador { } + @if $type == ocean {} + @else if $type == matador {} + @if + $type == ocean {} + @else if + $type == matador {} + @if + $type + == + ocean + { + } + @else + if + $type + == + matador + { + } + @if + + $type + + == + + ocean + + { + + } + + @else + + if + + $type + + == + + matador + + { + + } + @if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: blue; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: red; + } @else if $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables == $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-variables { + color: green; + } @else { + color: black; + } + @if $very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-long-var == 0 and $very-very-very-long-var == 0 {} + @if $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 and $very-very-very-very-very-very-very-very-very-very-very-long-var == 0 {} + @if $base-font-size != 16px or $base-line-height != 24px or $base-unit != 'em' or $h1-font-size != 2 * $base-font-size or $h2-font-size != 1.5 * $base-font-size or $h3-font-size != 1.17 * $base-font-size or $h4-font-size != 1 * $base-font-size or $h5-font-size != 0.83 * $base-font-size or $h6-font-size != 0.67 * $base-font-size or $indent-amount != 40px {} + @if (str-slice($item, 0, 1) == ":") {} + @if (str-slice($item, 0, 3) == " : ") {} + @if ($type == ocean) {} @else if ($type == matador) {} @else {} +} diff --git a/tests/format/scss/atrule/include.scss b/tests/format/scss/atrule/include.scss new file mode 100644 index 000000000000..458d637b52f0 --- /dev/null +++ b/tests/format/scss/atrule/include.scss @@ -0,0 +1,119 @@ +@include mix(1px, 2px, $arg2: 10, 2px 4px 6px); +@include mix(1px,2px,$arg2:10,2px 4px 6px); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px ); +@include mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix( + 1px, + 2px, + $arg2: 10, + 2px 4px 6px +); +@include +mix +( +1px +, +2px +, +$arg2 +: +10 +, +2px +4px +6px +) +; +@include + +mix + +( + +1px + +, + +2px + +, + +$arg2 + +: + +10 + +, + +2px + +4px + +6px + +) + +; +@include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); +a { + @include global-variable-overriding; + @include mix($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg: 1px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1: 2px, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, 2px 4px 6px); + @include apply-to-ie6-only {} + @include apply-to-ie6-only{} + @include apply-to-ie6-only + {} + @include + apply-to-ie6-only + { + } + @include + + apply-to-ie6-only + + { + + } +} + +a { +@include section-type-1( +$header: (margin: 0 0 $margin-base, text-align: left), +$decoration: (type: base, margin: 0 auto -1px 0, primary-color: $brand-primary, secondary-color: $gray-light), +$title: (margin: 0 0 $margin-small, color: false, font-size: $font-size-h3, font-weight: false, line-height: $line-height-h3) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +(box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15)) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $brand-primary +) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +border-color: $very-very-very-very-very-very-very-very-very-very-very-very-very-long-value +) +); +} diff --git a/tests/format/scss/atrule/while.scss b/tests/format/scss/atrule/while.scss new file mode 100644 index 000000000000..e63a1380d7d2 --- /dev/null +++ b/tests/format/scss/atrule/while.scss @@ -0,0 +1,110 @@ +@while $i > 0 {} +@while $i>0{} +@while $i > 0 {} +@while $i + > + 0 + {} +@while + $i + > + 0 + {} +@while +$i +> +0 +{ +} +@while + +$i + +> + +0 + +{ + +} +@while ($i > 0) {} +@while ($i>0){} +@while ( $i > 0 ) {} +@while ( $i > 0 ) {} +@while ( + $i > 0 +) {} +@while + ($i > 0) {} +@while +( +$i +> +0 +) +{ +} +@while + +( + +$i + +> + +0 + +) + +{ + +} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1 {} +@while 1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var {} +@while (($i) > (0)) {} +@while (($i)>(0)){} +@while ( ( $i ) > ( 0 ) ) {} +@while (($i) + > + (0) +) {} +@while +( +( +$i +) +> +( +0 +) +) +{ +} +@while + +( + +( + +$i + +) + +> + +( + +0 + +) + +) + +{ + +} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while (1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {} +@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {} diff --git a/tests/format/scss/case/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/case/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/scss/case/__snapshots__/jsfmt.spec.js.snap rename to tests/format/scss/case/__snapshots__/format.test.js.snap diff --git a/tests/format/scss/case/format.test.js b/tests/format/scss/case/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/case/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/case/jsfmt.spec.js b/tests/format/scss/case/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/case/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/comments/4594.scss b/tests/format/scss/comments/4594.scss new file mode 100644 index 000000000000..c7e7a1af6c23 --- /dev/null +++ b/tests/format/scss/comments/4594.scss @@ -0,0 +1,37 @@ +.foo, +// Comment +.bar { + // Comment + color: red; // Comment +} + +$my-list: + 'foo', // Comment + 'bar'; // Comment + +$my-map: ( + 'foo': 1, // Comment + 'bar': 2, // Comment + 'buz': calc(1 + 2), // Buz + 'baz': 4, // Baz +); + +[href]:hover &, // Comment +[href]:focus &, // Comment +[href]:active & { + .tooltip { + opacity: 1; + } +} + +@import + // Comment + 'mixins', + 'variables', + // Comment + 'reset', + 'scaffolding', + 'type', + // Comment + 'bar', + 'tabs'; diff --git a/tests/format/scss/comments/4878.scss b/tests/format/scss/comments/4878.scss new file mode 100644 index 000000000000..6f23f5ba7e49 --- /dev/null +++ b/tests/format/scss/comments/4878.scss @@ -0,0 +1,23 @@ +@function someVeryLongFunctionNameForJustAPow($base, $exponent) { + $result: 1; + @for $_ from 1 through $exponent { + $result: $result * $base; + } + @return $result; +} + +@function pow($base, $exponent){ + @return someVeryLongFunctionNameForJustAPow($base,$exponent); +} + +.foo{ + width: someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, + // This next pow is really powerful + someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, 2)))))))))))) +} + +.bar{ + width: pow(2, pow(2, pow(2, + // This next pow is really powerful + pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))))))) +} diff --git a/tests/format/scss/comments/__snapshots__/format.test.js.snap b/tests/format/scss/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..eeda393719af --- /dev/null +++ b/tests/format/scss/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,996 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`4594.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +.foo, +// Comment +.bar { + // Comment + color: red; // Comment +} + +$my-list: + 'foo', // Comment + 'bar'; // Comment + +$my-map: ( + 'foo': 1, // Comment + 'bar': 2, // Comment + 'buz': calc(1 + 2), // Buz + 'baz': 4, // Baz +); + +[href]:hover &, // Comment +[href]:focus &, // Comment +[href]:active & { + .tooltip { + opacity: 1; + } +} + +@import + // Comment + 'mixins', + 'variables', + // Comment + 'reset', + 'scaffolding', + 'type', + // Comment + 'bar', + 'tabs'; + +=====================================output===================================== +.foo, +// Comment +.bar { + // Comment + color: red; // Comment +} + +$my-list: + "foo", + // Comment + "bar"; // Comment + +$my-map: ( + "foo": 1, + // Comment + "bar": 2, + // Comment + "buz": calc(1 + 2), + // Buz + "baz": 4, // Baz +); + +[href]:hover &, // Comment +[href]:focus &, // Comment +[href]:active & { + .tooltip { + opacity: 1; + } +} + +@import // Comment + "mixins", + "variables", + // Comment + "reset", + "scaffolding", "type", + // Comment + "bar", + "tabs"; + +================================================================================ +`; + +exports[`4878.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@function someVeryLongFunctionNameForJustAPow($base, $exponent) { + $result: 1; + @for $_ from 1 through $exponent { + $result: $result * $base; + } + @return $result; +} + +@function pow($base, $exponent){ + @return someVeryLongFunctionNameForJustAPow($base,$exponent); +} + +.foo{ + width: someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, + // This next pow is really powerful + someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, 2)))))))))))) +} + +.bar{ + width: pow(2, pow(2, pow(2, + // This next pow is really powerful + pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))))))) +} + +=====================================output===================================== +@function someVeryLongFunctionNameForJustAPow($base, $exponent) { + $result: 1; + @for $_ from 1 through $exponent { + $result: $result * $base; + } + @return $result; +} + +@function pow($base, $exponent) { + @return someVeryLongFunctionNameForJustAPow($base, $exponent); +} + +.foo { + width: someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + // This next pow is really powerful + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow( + 2, + someVeryLongFunctionNameForJustAPow(2, 2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ); +} + +.bar { + width: pow( + 2, + pow( + 2, + pow( + 2, + // This next pow is really powerful + pow( + 2, + pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))) + ) + ) + ) + ); +} + +================================================================================ +`; + +exports[`CRLF.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$nice-blue: #5B83AD; +$light-blue: $nice-blue + #111; + +// Comment 1 +/* + * Comment 2 + */ +#header { + // Comment 3 + /* + * Comment 4 + */ + color: @light-blue; +} + +@media only screen and (max-width: 600px) { + // Comment 1 + /* + * Comment 5 + */ + body { + background-color: lightblue; // Comment 6 + color: red; /* Comment 7 */ + } +} + +@mixin create-rules($padding) { + // + // Comment 8 + // + .abc { + padding: $padding; + } + /** + * Comment 9 + */ + .def { + padding: $padding; + } +} + +=====================================output===================================== +$nice-blue: #5b83ad; +$light-blue: $nice-blue + #111; + +// Comment 1 +/* + * Comment 2 + */ +#header { + // Comment 3 + /* + * Comment 4 + */ + color: @light-blue; +} + +@media only screen and (max-width: 600px) { + // Comment 1 + /* + * Comment 5 + */ + body { + background-color: lightblue; // Comment 6 + color: red; /* Comment 7 */ + } +} + +@mixin create-rules($padding) { + // + // Comment 8 + // + .abc { + padding: $padding; + } + /** + * Comment 9 + */ + .def { + padding: $padding; + } +} + +================================================================================ +`; + +exports[`at-rule.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@at-root .foo +// .bar +{ + +} + +@at-root +// .bar +.foo +{ + +} +=====================================output===================================== +@at-root .foo +// .bar +{ +} + +@at-root // .bar +.foo { +} + +================================================================================ +`; + +exports[`between-decl.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +selector { +prop: // comment +value; + +prop: /* block */ value; + +prop +: value; +} + +// #5603 +.grid { + grid-template-areas: // + "header header header" // + "sidebar content content" // + "footer footer footer"; + + grid-template-areas: + "header header header" // + "sidebar content content" // + "footer footer footer"; + } + +// #8052 +$font-family-rich: + // custom + 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', + // Safari for OS X and iOS (San Francisco) + -apple-system, BlinkMacSystemFont, + // fallback + Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif, + // emoji + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' !default; + +// #7109 +.test { + background: + /////// foo + // bar + + radial-gradient(circle farthest-corner at 5% 10%, #000000, transparent 50%); +} + +// TODO: make these pretty +selector { +prop: +/* block */ +value; + +prop +// inline +: +value; + +prop/* block */: +value; + +prop +/* block */ +: +value; + +prop/* before */: // after +value; + + +prop/* before */: /* after*/ +value; +} + +=====================================output===================================== +selector { + prop: // comment + value; + + prop: /* block */ value; + + prop: value; +} + +// #5603 +.grid { + grid-template-areas: // + "header header header" // + "sidebar content content" // + "footer footer footer"; + + grid-template-areas: "header header header" // + "sidebar content content" // + "footer footer footer"; +} + +// #8052 +$font-family-rich: + // custom + "Noto Sans TC", + "Noto Sans SC", + "Noto Sans JP", + // Safari for OS X and iOS (San Francisco) + -apple-system, + BlinkMacSystemFont, + // fallback + Roboto, + "Helvetica Neue", + Helvetica, + Arial, + sans-serif, + // emoji + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol" !default; + +// #7109 +.test { + background: + /////// foo + // bar + radial-gradient(circle farthest-corner at 5% 10%, #000000, transparent 50%); +} + +// TODO: make these pretty +selector { + prop: +/* block */ value; + + prop // inline +: value; + + prop/* block */: value; + + prop/* block */ +: value; + + prop/* before */: // after + value; + + prop/* before */: /* after*/ value; +} + +================================================================================ +`; + +exports[`bug.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@font-face { + src: url(if( + $bootstrap-sass-asset-helper, + twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), + '#{$icon-font-path}#{$icon-font-name}.eot' + )); +} + +// Catchall baseclass +/* Catchall baseclass */ +.glyphicon { +} + +=====================================output===================================== +@font-face { + src: url(if( + $bootstrap-sass-asset-helper, + twbs-font-path("#{$icon-font-path}#{$icon-font-name}.eot"), + "#{$icon-font-path}#{$icon-font-name}.eot" + )); +} + +// Catchall baseclass +/* Catchall baseclass */ +.glyphicon { +} + +================================================================================ +`; + +exports[`comments.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +// This comment won't be included in the CSS. +//This comment won't be included in the CSS. +// This comment won't be included in the CSS. + +/* But this comment will, except in compressed mode. */ +/* But this comment will, except in compressed mode. */ +/*But this comment will, except in compressed mode.*/ + +/*! This comment will be included even in compressed mode. */ + +/// Computes an exponent. +///// Computes an exponent. + +=====================================output===================================== +// This comment won't be included in the CSS. +//This comment won't be included in the CSS. +// This comment won't be included in the CSS. + +/* But this comment will, except in compressed mode. */ +/* But this comment will, except in compressed mode. */ +/*But this comment will, except in compressed mode.*/ + +/*! This comment will be included even in compressed mode. */ + +/// Computes an exponent. +///// Computes an exponent. + +================================================================================ +`; + +exports[`custom-properties.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +=====================================output===================================== +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ + --centered/* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} + +================================================================================ +`; + +exports[`if-eslit-at-rule-decloration.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@function _normalize-include($section) { +// Check if $section is in the $include list. + @if index($_normalize-include, $section) { + @return true; + } +// If $include is set to (all), make sure $section is not in $exclude. + @else if not index($_normalize-exclude, $section) and index($_normalize-include, all) { + @return true; + } + @return false; +} + +=====================================output===================================== +@function _normalize-include($section) { + // Check if $section is in the $include list. + @if index($_normalize-include, $section) { + @return true; + } + // If $include is set to (all), make sure $section is not in $exclude. + @else if not + index($_normalize-exclude, $section) and + index($_normalize-include, all) + { + @return true; + } + @return false; +} + +================================================================================ +`; + +exports[`in-value.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +.real-world-example { + background: radial-gradient( + circle at left 0% bottom $position, + transparent, + transparent $diameter, + #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. + ); +} + +.simplification { + foo: ( + calc() // not a comment anymore + ); +} + +=====================================output===================================== +.real-world-example { + background: radial-gradient( + circle at left 0% bottom $position, + transparent, + transparent $diameter, + #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. + ); +} + +.simplification { + foo: ( + calc() // not a comment anymore + ); +} + +================================================================================ +`; + +exports[`lists.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$my-list: + 'foo', // Foo + 'bar'; // Bar + +$my-list2: + a // a + b + c; + +=====================================output===================================== +$my-list: + "foo", + // Foo + "bar"; // Bar + +$my-list2: a // a + b c; + +================================================================================ +`; + +exports[`maps.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$my-map: ( + 'foo': 1, // Foo + 'bar': 2, // Bar +); + +=====================================output===================================== +$my-map: ( + "foo": 1, + // Foo + "bar": 2, // Bar +); + +================================================================================ +`; + +exports[`mixed.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import 'b'; +// another comment +//no-space before + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import "b"; +// another comment +//no-space before + +================================================================================ +`; + +exports[`mixed-2.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ +@import "a"; +//* +@import 'b'; +/* block */ +/*no-space block*/ + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ +@import "a"; +//* +@import "b"; +/* block */ +/*no-space block*/ + +================================================================================ +`; + +exports[`mixed-block.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import 'b'; +/* block */ +/*no-space block*/ + +=====================================output===================================== +/* DO NOT ADD EXTRA CODE TO THIS FILE */ + +@import "a"; + +// '/*' <-- this breaks formatting + +@import "b"; +/* block */ +/*no-space block*/ + +================================================================================ +`; + +exports[`prettier-ignore.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== + +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +=====================================output===================================== +foo { + /* prettier-ignore */ + thing: foo; + -ms-thing: foo; +} + +================================================================================ +`; + +exports[`selectors.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +.powerPathNavigator .helm button.pressedButton, // comment 1 +.powerPathNavigator .helm button:active:not(.disabledButton), +.powerPathNavigator table.powerPathInfo th:active, +.powerPathNavigator table.powerPathInfo th:active + th:last-child { +} + +// comment 2 +.powerPathNavigator .helm button.pressedButton, +.powerPathNavigator .helm button:active:not(.disabledButton) { +} + +.foo, +// comment 3 +.bar { + display: block; +} + +.field + { + &[data-field-id="1"], // comment 4 + &[data-field-id="2"], // comment 5 + &[data-field-id="3"], // comment 6 + { + background: green; + } +} + +// comment 7 +.field +// comment 8 +{ // comment 9 + // comment 10 + &[data-field-id="1"], // comment 11 + // comment 12 + &[data-field-id="2"] // comment 13 + // comment 14 + , // comment 15 + // comment 16 + &[data-field-id="3"], // comment 17 + // comment 18 + { // comment 19 + // comment 20 + background: green; + // comment 21 + } // comment 22 + // comment 23 +} +// comment 24 + +.foo +// comment 25 +.bar +// comment 26 +{} + +.foo +// comment 27 ++ +// comment 28 +.bar +// comment 29 +{} + +=====================================output===================================== +.powerPathNavigator .helm button.pressedButton, // comment 1 +.powerPathNavigator .helm button:active:not(.disabledButton), +.powerPathNavigator table.powerPathInfo th:active, +.powerPathNavigator table.powerPathInfo th:active + th:last-child { +} + +// comment 2 +.powerPathNavigator .helm button.pressedButton, +.powerPathNavigator .helm button:active:not(.disabledButton) { +} + +.foo, +// comment 3 +.bar { + display: block; +} + +.field { + &[data-field-id="1"], // comment 4 + &[data-field-id="2"], // comment 5 + &[data-field-id="3"], // comment 6 + { + background: green; + } +} + +// comment 7 +.field +// comment 8 +{ + // comment 9 + // comment 10 + &[data-field-id="1"], // comment 11 + // comment 12 + &[data-field-id="2"] // comment 13 + // comment 14 + , // comment 15 + // comment 16 + &[data-field-id="3"], // comment 17 + // comment 18 + { + // comment 19 + // comment 20 + background: green; + // comment 21 + } // comment 22 + // comment 23 +} +// comment 24 + +.foo +// comment 25 +.bar +// comment 26 +{ +} + +.foo +// comment 27 ++ +// comment 28 +.bar +// comment 29 +{ +} + +================================================================================ +`; + +exports[`trailing_star_slash.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@media (max-width: 1) {} +a { + // element.style */ +} + +=====================================output===================================== +@media (max-width: 1) { +} +a { + // element.style */ +} + +================================================================================ +`; + +exports[`variable-declaration.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */ + +@mixin text-color { + /* comment 5 */ + /* comment 6 */ $text-color /* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */ ; /* comment 11 */ + /* comment 12 */ + color: $text-color; +} + +.error { + /* comment 13 */ + /* comment 14 */ $text-color /* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */ + /* comment 20 */ +} + +=====================================output===================================== +$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */ + +@mixin text-color { + /* comment 5 */ + /* comment 6 */ + $text-color/* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */ ; /* comment 11 */ + /* comment 12 */ + color: $text-color; +} + +.error { + /* comment 13 */ + /* comment 14 */ + $text-color/* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */ + /* comment 20 */ +} + +================================================================================ +`; diff --git a/tests/format/scss/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 45cf082b42c7..000000000000 --- a/tests/format/scss/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,736 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CRLF.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$nice-blue: #5B83AD; -$light-blue: $nice-blue + #111; - -// Comment 1 -/* - * Comment 2 - */ -#header { - // Comment 3 - /* - * Comment 4 - */ - color: @light-blue; -} - -@media only screen and (max-width: 600px) { - // Comment 1 - /* - * Comment 5 - */ - body { - background-color: lightblue; // Comment 6 - color: red; /* Comment 7 */ - } -} - -@mixin create-rules($padding) { - // - // Comment 8 - // - .abc { - padding: $padding; - } - /** - * Comment 9 - */ - .def { - padding: $padding; - } -} - -=====================================output===================================== -$nice-blue: #5b83ad; -$light-blue: $nice-blue + #111; - -// Comment 1 -/* - * Comment 2 - */ -#header { - // Comment 3 - /* - * Comment 4 - */ - color: @light-blue; -} - -@media only screen and (max-width: 600px) { - // Comment 1 - /* - * Comment 5 - */ - body { - background-color: lightblue; // Comment 6 - color: red; /* Comment 7 */ - } -} - -@mixin create-rules($padding) { - // - // Comment 8 - // - .abc { - padding: $padding; - } - /** - * Comment 9 - */ - .def { - padding: $padding; - } -} - -================================================================================ -`; - -exports[`at-rule.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@at-root .foo -// .bar -{ - -} - -@at-root -// .bar -.foo -{ - -} -=====================================output===================================== -@at-root .foo -// .bar -{ -} - -@at-root // .bar -.foo { -} - -================================================================================ -`; - -exports[`between-decl.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -selector { -prop: // comment -value; - -prop: /* block */ value; - -prop -: value; -} - -// #5603 -.grid { - grid-template-areas: // - "header header header" // - "sidebar content content" // - "footer footer footer"; - - grid-template-areas: - "header header header" // - "sidebar content content" // - "footer footer footer"; - } - -// #8052 -$font-family-rich: - // custom - 'Noto Sans TC', 'Noto Sans SC', 'Noto Sans JP', - // Safari for OS X and iOS (San Francisco) - -apple-system, BlinkMacSystemFont, - // fallback - Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif, - // emoji - 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' !default; - -// #7109 -.test { - background: - /////// foo - // bar - - radial-gradient(circle farthest-corner at 5% 10%, #000000, transparent 50%); -} - -// TODO: make these pretty -selector { -prop: -/* block */ -value; - -prop -// inline -: -value; - -prop/* block */: -value; - -prop -/* block */ -: -value; - -prop/* before */: // after -value; - - -prop/* before */: /* after*/ -value; -} - -=====================================output===================================== -selector { - prop: // comment - value; - - prop: /* block */ value; - - prop: value; -} - -// #5603 -.grid { - grid-template-areas: // - "header header header" // - "sidebar content content" // - "footer footer footer"; - - grid-template-areas: "header header header" // - "sidebar content content" // - "footer footer footer"; -} - -// #8052 -$font-family-rich: - // custom - "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", - // Safari for OS X and iOS (San Francisco) - -apple-system, - BlinkMacSystemFont, - // fallback - Roboto, - "Helvetica Neue", Helvetica, Arial, sans-serif, - // emoji - "Apple Color Emoji", - "Segoe UI Emoji", "Segoe UI Symbol" !default; - -// #7109 -.test { - background: - /////// foo - // bar - radial-gradient(circle farthest-corner at 5% 10%, #000000, transparent 50%); -} - -// TODO: make these pretty -selector { - prop: -/* block */ value; - - prop // inline -: value; - - prop/* block */: value; - - prop/* block */ -: value; - - prop/* before */: // after - value; - - prop/* before */: /* after*/ value; -} - -================================================================================ -`; - -exports[`bug.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@font-face { - src: url(if( - $bootstrap-sass-asset-helper, - twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), - '#{$icon-font-path}#{$icon-font-name}.eot' - )); -} - -// Catchall baseclass -/* Catchall baseclass */ -.glyphicon { -} - -=====================================output===================================== -@font-face { - src: url(if( - $bootstrap-sass-asset-helper, - twbs-font-path("#{$icon-font-path}#{$icon-font-name}.eot"), - "#{$icon-font-path}#{$icon-font-name}.eot" - )); -} - -// Catchall baseclass -/* Catchall baseclass */ -.glyphicon { -} - -================================================================================ -`; - -exports[`if-eslit-at-rule-decloration.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@function _normalize-include($section) { -// Check if $section is in the $include list. - @if index($_normalize-include, $section) { - @return true; - } -// If $include is set to (all), make sure $section is not in $exclude. - @else if not index($_normalize-exclude, $section) and index($_normalize-include, all) { - @return true; - } - @return false; -} - -=====================================output===================================== -@function _normalize-include($section) { - // Check if $section is in the $include list. - @if index($_normalize-include, $section) { - @return true; - } - // If $include is set to (all), make sure $section is not in $exclude. - @else if not - index($_normalize-exclude, $section) and - index($_normalize-include, all) - { - @return true; - } - @return false; -} - -================================================================================ -`; - -exports[`in-value.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -.real-world-example { - background: radial-gradient( - circle at left 0% bottom $position, - transparent, - transparent $diameter, - #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. - ); -} - -.simplification { - foo: ( - calc() // not a comment anymore - ); -} - -=====================================output===================================== -.real-world-example { - background: radial-gradient( - circle at left 0% bottom $position, - transparent, - transparent $diameter, - #fbfbfb calc(#{$diameter} + 1px) // Add 1px for edge-smoothing. - ); -} - -.simplification { - foo: ( - calc() // not a comment anymore - ); -} - -================================================================================ -`; - -exports[`lists.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$my-list: - 'foo', // Foo - 'bar'; // Bar - -$my-list2: - a // a - b - c; - -=====================================output===================================== -$my-list: "foo", - // Foo - "bar"; // Bar - -$my-list2: a // a - b c; - -================================================================================ -`; - -exports[`maps.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$my-map: ( - 'foo': 1, // Foo - 'bar': 2, // Bar -); - -=====================================output===================================== -$my-map: ( - "foo": 1, - // Foo - "bar": 2, - // Bar -); - -================================================================================ -`; - -exports[`mixed.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import 'b'; -// another comment -//no-space before - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import "b"; -// another comment -//no-space before - -================================================================================ -`; - -exports[`mixed-2.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ -@import "a"; -//* -@import 'b'; -/* block */ -/*no-space block*/ - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ -@import "a"; -//* -@import "b"; -/* block */ -/*no-space block*/ - -================================================================================ -`; - -exports[`mixed-block.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import 'b'; -/* block */ -/*no-space block*/ - -=====================================output===================================== -/* DO NOT ADD EXTRA CODE TO THIS FILE */ - -@import "a"; - -// '/*' <-- this breaks formatting - -@import "b"; -/* block */ -/*no-space block*/ - -================================================================================ -`; - -exports[`prettier-ignore.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== - -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -=====================================output===================================== -foo { - /* prettier-ignore */ - thing: foo; - -ms-thing: foo; -} - -================================================================================ -`; - -exports[`selectors.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -.powerPathNavigator .helm button.pressedButton, // comment 1 -.powerPathNavigator .helm button:active:not(.disabledButton), -.powerPathNavigator table.powerPathInfo th:active, -.powerPathNavigator table.powerPathInfo th:active + th:last-child { -} - -// comment 2 -.powerPathNavigator .helm button.pressedButton, -.powerPathNavigator .helm button:active:not(.disabledButton) { -} - -.foo, -// comment 3 -.bar { - display: block; -} - -.field - { - &[data-field-id="1"], // comment 4 - &[data-field-id="2"], // comment 5 - &[data-field-id="3"], // comment 6 - { - background: green; - } -} - -// comment 7 -.field -// comment 8 -{ // comment 9 - // comment 10 - &[data-field-id="1"], // comment 11 - // comment 12 - &[data-field-id="2"] // comment 13 - // comment 14 - , // comment 15 - // comment 16 - &[data-field-id="3"], // comment 17 - // comment 18 - { // comment 19 - // comment 20 - background: green; - // comment 21 - } // comment 22 - // comment 23 -} -// comment 24 - -.foo -// comment 25 -.bar -// comment 26 -{} - -.foo -// comment 27 -+ -// comment 28 -.bar -// comment 29 -{} - -=====================================output===================================== -.powerPathNavigator .helm button.pressedButton, // comment 1 -.powerPathNavigator .helm button:active:not(.disabledButton), -.powerPathNavigator table.powerPathInfo th:active, -.powerPathNavigator table.powerPathInfo th:active + th:last-child { -} - -// comment 2 -.powerPathNavigator .helm button.pressedButton, -.powerPathNavigator .helm button:active:not(.disabledButton) { -} - -.foo, -// comment 3 -.bar { - display: block; -} - -.field { - &[data-field-id="1"], // comment 4 - &[data-field-id="2"], // comment 5 - &[data-field-id="3"], // comment 6 - { - background: green; - } -} - -// comment 7 -.field -// comment 8 -{ - // comment 9 - // comment 10 - &[data-field-id="1"], // comment 11 - // comment 12 - &[data-field-id="2"] // comment 13 - // comment 14 - , // comment 15 - // comment 16 - &[data-field-id="3"], // comment 17 - // comment 18 - { - // comment 19 - // comment 20 - background: green; - // comment 21 - } // comment 22 - // comment 23 -} -// comment 24 - -.foo -// comment 25 -.bar -// comment 26 -{ -} - -.foo -// comment 27 -+ -// comment 28 -.bar -// comment 29 -{ -} - -================================================================================ -`; - -exports[`trailing_star_slash.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@media (max-width: 1) {} -a { - // element.style */ -} - -=====================================output===================================== -@media (max-width: 1) { -} -a { - // element.style */ -} - -================================================================================ -`; - -exports[`variable-declaration.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */ - -@mixin text-color { - /* comment 5 */ - /* comment 6 */ $text-color /* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */ ; /* comment 11 */ - /* comment 12 */ - color: $text-color; -} - -.error { - /* comment 13 */ - /* comment 14 */ $text-color /* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */ - /* comment 20 */ -} - -=====================================output===================================== -$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */; /* comment 4 */ - -@mixin text-color { - /* comment 5 */ - /* comment 6 */ - $text-color/* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */; /* comment 11 */ - /* comment 12 */ - color: $text-color; -} - -.error { - /* comment 13 */ - /* comment 14 */ - $text-color/* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */; /* comment 19 */ - /* comment 20 */ -} - -================================================================================ -`; diff --git a/tests/format/scss/scss/comments.scss b/tests/format/scss/comments/comments.scss similarity index 100% rename from tests/format/scss/scss/comments.scss rename to tests/format/scss/comments/comments.scss diff --git a/tests/format/scss/comments/custom-properties.scss b/tests/format/scss/comments/custom-properties.scss new file mode 100644 index 000000000000..3817d248dab3 --- /dev/null +++ b/tests/format/scss/comments/custom-properties.scss @@ -0,0 +1,8 @@ +/* custom properties set & @apply rule */ +:root { + /* comments 192 */ --centered /* comments 193 */ : /* comments 194 */ { + display: flex; + align-items: center; + justify-content: center; + }; +} diff --git a/tests/format/scss/comments/format.test.js b/tests/format/scss/comments/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/comments/jsfmt.spec.js b/tests/format/scss/comments/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/configuration/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap rename to tests/format/scss/configuration/__snapshots__/format.test.js.snap diff --git a/tests/format/scss/configuration/format.test.js b/tests/format/scss/configuration/format.test.js new file mode 100644 index 000000000000..53976b390a3b --- /dev/null +++ b/tests/format/scss/configuration/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/configuration/jsfmt.spec.js b/tests/format/scss/configuration/jsfmt.spec.js deleted file mode 100644 index f2558a4a9996..000000000000 --- a/tests/format/scss/configuration/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["scss"], { trailingComma: "none" }); -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/directives/3021.scss b/tests/format/scss/directives/3021.scss new file mode 100644 index 000000000000..497b638c44b6 --- /dev/null +++ b/tests/format/scss/directives/3021.scss @@ -0,0 +1,15 @@ +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn #{$message}; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@warn + "Very long long long long long long long long long long long long long line (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error #{$message}; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; +@error + "Very long long long long long long long long long long long long long line Error (#{$message})."; + diff --git a/tests/format/scss/directives/__snapshots__/format.test.js.snap b/tests/format/scss/directives/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ff45e87b01db --- /dev/null +++ b/tests/format/scss/directives/__snapshots__/format.test.js.snap @@ -0,0 +1,123 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3021.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn #{$message}; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@warn + "Very long long long long long long long long long long long long long line (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error #{$message}; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; +@error + "Very long long long long long long long long long long long long long line Error (#{$message})."; + + +=====================================output===================================== +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn #{$message}; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error #{$message}; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; + +================================================================================ +`; + +exports[`3021.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn #{$message}; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@warn + "Very long long long long long long long long long long long long long line (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error #{$message}; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; +@error + "Very long long long long long long long long long long long long long line Error (#{$message})."; + + +=====================================output===================================== +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn "Warn (#{$message})."; +@warn #{$message}; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@warn "Very long long long long long long long long long long long long long line (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error "Error (#{$message})."; +@error #{$message}; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; +@error "Very long long long long long long long long long long long long long line Error (#{$message})."; + +================================================================================ +`; + +exports[`directives.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@qux .foo +// .bar + +{} + +=====================================output===================================== +@qux .foo +// .bar +{ +} + +================================================================================ +`; + +exports[`directives.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@qux .foo +// .bar + +{} + +=====================================output===================================== +@qux .foo +// .bar +{ +} + +================================================================================ +`; diff --git a/tests/format/scss/scss/directives.scss b/tests/format/scss/directives/directives.scss similarity index 100% rename from tests/format/scss/scss/directives.scss rename to tests/format/scss/directives/directives.scss diff --git a/tests/format/scss/directives/format.test.js b/tests/format/scss/directives/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/directives/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/escape/4149.scss b/tests/format/scss/escape/4149.scss new file mode 100644 index 000000000000..f8ae352b0979 --- /dev/null +++ b/tests/format/scss/escape/4149.scss @@ -0,0 +1,5 @@ +@media only screen and (max-width: 767px) { + @include widths(2 3 4, \@small); +} + +$widths-breakpoint-separator: \@small; diff --git a/tests/format/scss/escape/__snapshots__/format.test.js.snap b/tests/format/scss/escape/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c1a35af40469 --- /dev/null +++ b/tests/format/scss/escape/__snapshots__/format.test.js.snap @@ -0,0 +1,47 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`4149.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@media only screen and (max-width: 767px) { + @include widths(2 3 4, \\@small); +} + +$widths-breakpoint-separator: \\@small; + +=====================================output===================================== +@media only screen and (max-width: 767px) { + @include widths(2 3 4, \\@small); +} + +$widths-breakpoint-separator: \\@small; + +================================================================================ +`; + +exports[`4149.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@media only screen and (max-width: 767px) { + @include widths(2 3 4, \\@small); +} + +$widths-breakpoint-separator: \\@small; + +=====================================output===================================== +@media only screen and (max-width: 767px) { + @include widths(2 3 4, \\@small); +} + +$widths-breakpoint-separator: \\@small; + +================================================================================ +`; diff --git a/tests/format/scss/escape/format.test.js b/tests/format/scss/escape/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/escape/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/flag/2799.scss b/tests/format/scss/flag/2799.scss new file mode 100644 index 000000000000..de4326c87c90 --- /dev/null +++ b/tests/format/scss/flag/2799.scss @@ -0,0 +1,17 @@ +$default: #111111 !default; +$default: #111111 !default; +$default: #111111 +!default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!default; + +$global: #111111 !global; +$global: #111111 !global; +$global: #111111 +!global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!global; diff --git a/tests/format/scss/flag/__snapshots__/format.test.js.snap b/tests/format/scss/flag/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41508496db41 --- /dev/null +++ b/tests/format/scss/flag/__snapshots__/format.test.js.snap @@ -0,0 +1,87 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`2799.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$default: #111111 !default; +$default: #111111 !default; +$default: #111111 +!default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!default; + +$global: #111111 !global; +$global: #111111 !global; +$global: #111111 +!global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!global; + +=====================================output===================================== +$default: #111111 !default; +$default: #111111 !default; +$default: #111111 !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; + +$global: #111111 !global; +$global: #111111 !global; +$global: #111111 !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; + +================================================================================ +`; + +exports[`2799.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$default: #111111 !default; +$default: #111111 !default; +$default: #111111 +!default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!default; + +$global: #111111 !global; +$global: #111111 !global; +$global: #111111 +!global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" +!global; + +=====================================output===================================== +$default: #111111 !default; +$default: #111111 !default; +$default: #111111 !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; +$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; + +$global: #111111 !global; +$global: #111111 !global; +$global: #111111 !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; +$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; + +================================================================================ +`; diff --git a/tests/format/scss/flag/format.test.js b/tests/format/scss/flag/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/flag/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/function/15369.scss b/tests/format/scss/function/15369.scss new file mode 100644 index 000000000000..03a861e17a2e --- /dev/null +++ b/tests/format/scss/function/15369.scss @@ -0,0 +1,9 @@ +div { + margin: -double(-double(1em)); + margin: -double(- double(1em)); + margin: - double(-double(1em)); +} + +@function -double($value) { + @return $value * 2; +} diff --git a/tests/format/scss/function/3748.scss b/tests/format/scss/function/3748.scss new file mode 100644 index 000000000000..a9c99ca82fa8 --- /dev/null +++ b/tests/format/scss/function/3748.scss @@ -0,0 +1,20 @@ +.card-column-simple { + @include breakpoint( getBp( md ) ) { + padding: $spacing_content-sm $spacing_content-md; + } + + @include breakpoint (getBp(md)) { + &:nth-child(2n + 3) { + clear: both; + } + } + + @include breakpoint (getBp(xl)) { + &:nth-child(2n + 3) { + clear: none; + } + &:nth-child(3n + 4) { + clear: both; + } + } +} diff --git a/tests/format/scss/function/5636.scss b/tests/format/scss/function/5636.scss new file mode 100644 index 000000000000..2137409af969 --- /dev/null +++ b/tests/format/scss/function/5636.scss @@ -0,0 +1,4 @@ +// #5636 +div { + margin: - pow(2, 2) * 100px; +} diff --git a/tests/format/scss/function/__snapshots__/format.test.js.snap b/tests/format/scss/function/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..36d6c349073c --- /dev/null +++ b/tests/format/scss/function/__snapshots__/format.test.js.snap @@ -0,0 +1,525 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3748.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +.card-column-simple { + @include breakpoint( getBp( md ) ) { + padding: $spacing_content-sm $spacing_content-md; + } + + @include breakpoint (getBp(md)) { + &:nth-child(2n + 3) { + clear: both; + } + } + + @include breakpoint (getBp(xl)) { + &:nth-child(2n + 3) { + clear: none; + } + &:nth-child(3n + 4) { + clear: both; + } + } +} + +=====================================output===================================== +.card-column-simple { + @include breakpoint(getBp(md)) { + padding: $spacing_content-sm $spacing_content-md; + } + + @include breakpoint(getBp(md)) { + &:nth-child(2n + 3) { + clear: both; + } + } + + @include breakpoint(getBp(xl)) { + &:nth-child(2n + 3) { + clear: none; + } + &:nth-child(3n + 4) { + clear: both; + } + } +} + +================================================================================ +`; + +exports[`3748.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +.card-column-simple { + @include breakpoint( getBp( md ) ) { + padding: $spacing_content-sm $spacing_content-md; + } + + @include breakpoint (getBp(md)) { + &:nth-child(2n + 3) { + clear: both; + } + } + + @include breakpoint (getBp(xl)) { + &:nth-child(2n + 3) { + clear: none; + } + &:nth-child(3n + 4) { + clear: both; + } + } +} + +=====================================output===================================== +.card-column-simple { + @include breakpoint(getBp(md)) { + padding: $spacing_content-sm $spacing_content-md; + } + + @include breakpoint(getBp(md)) { + &:nth-child(2n + 3) { + clear: both; + } + } + + @include breakpoint(getBp(xl)) { + &:nth-child(2n + 3) { + clear: none; + } + &:nth-child(3n + 4) { + clear: both; + } + } +} + +================================================================================ +`; + +exports[`5636.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// #5636 +div { + margin: - pow(2, 2) * 100px; +} + +=====================================output===================================== +// #5636 +div { + margin: - pow(2, 2) * 100px; +} + +================================================================================ +`; + +exports[`5636.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +// #5636 +div { + margin: - pow(2, 2) * 100px; +} + +=====================================output===================================== +// #5636 +div { + margin: - pow(2, 2) * 100px; +} + +================================================================================ +`; + +exports[`15369.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +div { + margin: -double(-double(1em)); + margin: -double(- double(1em)); + margin: - double(-double(1em)); +} + +@function -double($value) { + @return $value * 2; +} + +=====================================output===================================== +div { + margin: -double(-double(1em)); + margin: -double(- double(1em)); + margin: - double(-double(1em)); +} + +@function -double($value) { + @return $value * 2; +} + +================================================================================ +`; + +exports[`15369.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +div { + margin: -double(-double(1em)); + margin: -double(- double(1em)); + margin: - double(-double(1em)); +} + +@function -double($value) { + @return $value * 2; +} + +=====================================output===================================== +div { + margin: -double(-double(1em)); + margin: -double(- double(1em)); + margin: - double(-double(1em)); +} + +@function -double($value) { + @return $value * 2; +} + +================================================================================ +`; + +exports[`arbitrary-arguments.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +body { + test: foo(return-list($list)...); +} +body { + test: foo(bar($list)...); +} +body { + test: foo($list...); +} +@mixin syntax-colors($args...) { + @debug meta.keywords($args); + // (string: #080, comment: #800, variable: $60b) + + @each $name, $color in meta.keywords($args) { + pre span.stx-#{$name} { + color: $color; + } + } +} +$form-selectors: "input.name", "input.address", "input.zip" !default; +@include order(150px, $form-selectors...); +@mixin linear-gradient($direction, $gradients...) { + background-color: nth($gradients, 1); + background-image: linear-gradient($direction, $gradients...); +} +$parameters: ( + 'c': 'kittens', + 'a': true, + 'b': 42 +); +$value: dummy($parameters...); + +body { + background-color: rgba(50, 50, 50, 50); + background-color: rgba(50 50 50 50...); + background-color: rgba(50 50 .50 50...); + background-color: rgba(50 50 50. .50...); + // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` + background-color: rgba(50 50 50 50....); + width: min(50px 20px 30px...); +} + +=====================================output===================================== +body { + test: foo(return-list($list)...); +} +body { + test: foo(bar($list)...); +} +body { + test: foo($list...); +} +@mixin syntax-colors($args...) { + @debug meta.keywords($args); + // (string: #080, comment: #800, variable: $60b) + + @each $name, $color in meta.keywords($args) { + pre span.stx-#{$name} { + color: $color; + } + } +} +$form-selectors: "input.name", "input.address", "input.zip" !default; +@include order(150px, $form-selectors...); +@mixin linear-gradient($direction, $gradients...) { + background-color: nth($gradients, 1); + background-image: linear-gradient($direction, $gradients...); +} +$parameters: ( + "c": "kittens", + "a": true, + "b": 42, +); +$value: dummy($parameters...); + +body { + background-color: rgba(50, 50, 50, 50); + background-color: rgba(50 50 50 50...); + background-color: rgba(50 50 0.5 50...); + background-color: rgba(50 50 50 0.5...); + // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` + background-color: rgba(50 50 50 50...); + width: min(50px 20px 30px...); +} + +================================================================================ +`; + +exports[`arbitrary-arguments.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +body { + test: foo(return-list($list)...); +} +body { + test: foo(bar($list)...); +} +body { + test: foo($list...); +} +@mixin syntax-colors($args...) { + @debug meta.keywords($args); + // (string: #080, comment: #800, variable: $60b) + + @each $name, $color in meta.keywords($args) { + pre span.stx-#{$name} { + color: $color; + } + } +} +$form-selectors: "input.name", "input.address", "input.zip" !default; +@include order(150px, $form-selectors...); +@mixin linear-gradient($direction, $gradients...) { + background-color: nth($gradients, 1); + background-image: linear-gradient($direction, $gradients...); +} +$parameters: ( + 'c': 'kittens', + 'a': true, + 'b': 42 +); +$value: dummy($parameters...); + +body { + background-color: rgba(50, 50, 50, 50); + background-color: rgba(50 50 50 50...); + background-color: rgba(50 50 .50 50...); + background-color: rgba(50 50 50. .50...); + // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` + background-color: rgba(50 50 50 50....); + width: min(50px 20px 30px...); +} + +=====================================output===================================== +body { + test: foo(return-list($list)...); +} +body { + test: foo(bar($list)...); +} +body { + test: foo($list...); +} +@mixin syntax-colors($args...) { + @debug meta.keywords($args); + // (string: #080, comment: #800, variable: $60b) + + @each $name, $color in meta.keywords($args) { + pre span.stx-#{$name} { + color: $color; + } + } +} +$form-selectors: "input.name", "input.address", "input.zip" !default; +@include order(150px, $form-selectors...); +@mixin linear-gradient($direction, $gradients...) { + background-color: nth($gradients, 1); + background-image: linear-gradient($direction, $gradients...); +} +$parameters: ( + "c": "kittens", + "a": true, + "b": 42 +); +$value: dummy($parameters...); + +body { + background-color: rgba(50, 50, 50, 50); + background-color: rgba(50 50 50 50...); + background-color: rgba(50 50 0.5 50...); + background-color: rgba(50 50 50 0.5...); + // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` + background-color: rgba(50 50 50 50...); + width: min(50px 20px 30px...); +} + +================================================================================ +`; + +exports[`arbitrary-arguments-comment.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@include bar ( + rgba( + 50 + 50 + .50 + 50 ... + // comment + ) +) + +=====================================output===================================== +@include bar( + rgba( + 50 50 0.5 50... // comment + ) +); + +================================================================================ +`; + +exports[`arbitrary-arguments-comment.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@include bar ( + rgba( + 50 + 50 + .50 + 50 ... + // comment + ) +) + +=====================================output===================================== +@include bar( + rgba( + 50 50 0.5 50... // comment + ) +); + +================================================================================ +`; + +exports[`function-in-url.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@function concat($strings...) { + $result: ''; + @each $string in $strings { + $sum: $result + $string; + } + @return $result; +} + +a { + backround: url(concat('http://', 'example.com', '/image.png')); +} + +=====================================output===================================== +@function concat($strings...) { + $result: ""; + @each $string in $strings { + $sum: $result + $string; + } + @return $result; +} + +a { + backround: url(concat("http://", "example.com", "/image.png")); +} + +================================================================================ +`; + +exports[`function-in-url.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@function concat($strings...) { + $result: ''; + @each $string in $strings { + $sum: $result + $string; + } + @return $result; +} + +a { + backround: url(concat('http://', 'example.com', '/image.png')); +} + +=====================================output===================================== +@function concat($strings...) { + $result: ""; + @each $string in $strings { + $sum: $result + $string; + } + @return $result; +} + +a { + backround: url(concat("http://", "example.com", "/image.png")); +} + +================================================================================ +`; diff --git a/tests/format/scss/scss/arbitrary-arguments-comment.scss b/tests/format/scss/function/arbitrary-arguments-comment.scss similarity index 100% rename from tests/format/scss/scss/arbitrary-arguments-comment.scss rename to tests/format/scss/function/arbitrary-arguments-comment.scss diff --git a/tests/format/scss/scss/arbitrary-arguments.scss b/tests/format/scss/function/arbitrary-arguments.scss similarity index 100% rename from tests/format/scss/scss/arbitrary-arguments.scss rename to tests/format/scss/function/arbitrary-arguments.scss diff --git a/tests/format/scss/function/format.test.js b/tests/format/scss/function/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/function/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/scss/function-in-url.scss b/tests/format/scss/function/function-in-url.scss similarity index 100% rename from tests/format/scss/scss/function-in-url.scss rename to tests/format/scss/function/function-in-url.scss diff --git a/tests/format/scss/import/__snapshots__/format.test.js.snap b/tests/format/scss/import/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5941b82edcf2 --- /dev/null +++ b/tests/format/scss/import/__snapshots__/format.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`import_comma.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@import "rounded-corners", "text-shadow"; + +=====================================output===================================== +@import "rounded-corners", "text-shadow"; + +================================================================================ +`; + +exports[`import_comma.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@import "rounded-corners", "text-shadow"; + +=====================================output===================================== +@import "rounded-corners", "text-shadow"; + +================================================================================ +`; diff --git a/tests/format/scss/import/format.test.js b/tests/format/scss/import/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/import/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/scss/import_comma.scss b/tests/format/scss/import/import_comma.scss similarity index 100% rename from tests/format/scss/scss/import_comma.scss rename to tests/format/scss/import/import_comma.scss diff --git a/tests/format/scss/inline-url/__snapshots__/format.test.js.snap b/tests/format/scss/inline-url/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f42d0688d02e --- /dev/null +++ b/tests/format/scss/inline-url/__snapshots__/format.test.js.snap @@ -0,0 +1,112 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inline_url.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +.stringContentIsNotModifiedEvenIfInvalid { + background: url('@images'); + background: url("$images"); + background: url('/+0PX!/"\\a?~^[]{} $%#'); + background: url("/+0PX!/'\\a?~^[]{} $%#"); + background: url( + "whitespace-around-string" + ); +} + +.validUnquotedUrls { + background: url( + whitespace-around-string + ); + background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); + background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) center center no-repeat; + background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); + offset-path: url(#path); + background: url(data/+0ThisShouldNotBeLowerCased); + background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); + background: url(https://example.com/some/quite,long,url,with,commas.jpg); + background: url(http://123.example.com); +} +@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); + +.validUnqotedUrlsThatAreParsedByLess { + background: url(@foo); +} + +.validUnquotedUrlsThatAreParsedBySass { + background: url($foo); + background: url($foo+$bar); + background: url($foo*3); + background: url($foo/$bar); +} + +.invalidUnquotedUrlsButWeParseThemAnyway { + background: url(--var(foo-bar,#dadce0)); + -fb-sprite: url(fbglyph:cross-outline, fig-white); +} + +.number { + background-image: url(http://123.com); + background: url(path/to/123.jpg); + background: url(#123.foo); + background: no-repeat center/80% url(http://123.com); + background: no-repeat center/80% url(path/to/123.jpg); + background: no-repeat center/80% url(#123.foo); +} + +=====================================output===================================== +.stringContentIsNotModifiedEvenIfInvalid { + background: url("@images"); + background: url("$images"); + background: url('/+0PX!/"\\a?~^[]{} $%#'); + background: url("/+0PX!/'\\a?~^[]{} $%#"); + background: url("whitespace-around-string"); +} + +.validUnquotedUrls { + background: url(whitespace-around-string); + background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); + background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) + center center no-repeat; + background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); + offset-path: url(#path); + background: url(data/+0ThisShouldNotBeLowerCased); + background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); + background: url(https://example.com/some/quite,long,url,with,commas.jpg); + background: url(http://123.example.com); +} +@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); + +.validUnqotedUrlsThatAreParsedByLess { + background: url(@foo); +} + +.validUnquotedUrlsThatAreParsedBySass { + background: url($foo); + background: url($foo + $bar); + background: url($foo*3); + background: url($foo/$bar); +} + +.invalidUnquotedUrlsButWeParseThemAnyway { + background: url(--var(foo-bar, #dadce0)); + -fb-sprite: url(fbglyph:cross-outline, fig-white); +} + +.number { + background-image: url(http://123.com); + background: url(path/to/123.jpg); + background: url(#123.foo); + background: no-repeat center/80% url(http://123.com); + background: no-repeat center/80% url(path/to/123.jpg); + background: no-repeat center/80% url(#123.foo); +} + +================================================================================ +`; diff --git a/tests/format/scss/inline-url/format.test.js b/tests/format/scss/inline-url/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/inline-url/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/inline-url/inline_url.scss b/tests/format/scss/inline-url/inline_url.scss new file mode 100644 index 000000000000..4cd15e621028 --- /dev/null +++ b/tests/format/scss/inline-url/inline_url.scss @@ -0,0 +1,51 @@ +.stringContentIsNotModifiedEvenIfInvalid { + background: url('@images'); + background: url("$images"); + background: url('/+0PX!/"\a?~^[]{} $%#'); + background: url("/+0PX!/'\a?~^[]{} $%#"); + background: url( + "whitespace-around-string" + ); +} + +.validUnquotedUrls { + background: url( + whitespace-around-string + ); + background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=); + background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased); + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) center center no-repeat; + background: url(data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%229%22%20height=%229%22%3E%3Cpath%20d=%22M0%203h3%22%20stroke=%22red%22/%3E%3C/svg%3E); + offset-path: url(#path); + background: url(data/+0ThisShouldNotBeLowerCased); + background: url(https://foo/A*3I8oSY6AKRMAAAAAAAAAAABkARQnAQ); + background: url(https://example.com/some/quite,long,url,with,commas.jpg); + background: url(http://123.example.com); +} +@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap); + +.validUnqotedUrlsThatAreParsedByLess { + background: url(@foo); +} + +.validUnquotedUrlsThatAreParsedBySass { + background: url($foo); + background: url($foo+$bar); + background: url($foo*3); + background: url($foo/$bar); +} + +.invalidUnquotedUrlsButWeParseThemAnyway { + background: url(--var(foo-bar,#dadce0)); + -fb-sprite: url(fbglyph:cross-outline, fig-white); +} + +.number { + background-image: url(http://123.com); + background: url(path/to/123.jpg); + background: url(#123.foo); + background: no-repeat center/80% url(http://123.com); + background: no-repeat center/80% url(path/to/123.jpg); + background: no-repeat center/80% url(#123.foo); +} diff --git a/tests/format/scss/interpolation/3719.scss b/tests/format/scss/interpolation/3719.scss new file mode 100644 index 000000000000..aaf56a29f1d6 --- /dev/null +++ b/tests/format/scss/interpolation/3719.scss @@ -0,0 +1,6 @@ +$sm-only: '(min-width: 768px) and (max-width: 991px)'; +$lg-and-up: '(min-width: 1200px)'; + +@media screen and #{$sm-only, $lg-and-up} { + color: #000; +} diff --git a/tests/format/scss/interpolation/3943.scss b/tests/format/scss/interpolation/3943.scss new file mode 100644 index 000000000000..71192dab8ce0 --- /dev/null +++ b/tests/format/scss/interpolation/3943.scss @@ -0,0 +1,119 @@ +.class-#{$var} { + #{$var}: #7b3d66; + #{$attr}-color: blue; + #{$prop}-#{$side}: $value; + background-#{$var}: #7b3d66; + animation-name: #{var}; + line-height: #{strip-unit($line-height)}em; + height: 1#{$var}; + width: calc(100% - #{$sidebar-width}); + max-width: calc(#{$m*100}vw #{$sign} #{$b}); + font: #{$font-size}/#{$line-height}; + content: "I have #{8 + 2} books on SASS!"; + border: #{$var} #{$var} #{$var}; + filter: #{$var}#{$var}#{$var}; + prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; + prop2: + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + ; + prop3: + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + ; + prop4: -#{$loader-icon-duration}; + prop5: +#{$loader-icon-duration}; + prop6: calc(-#{$loader-icon-duration} + 10); + prop7: calc(10 + -#{$loader-icon-duration}); +} + +/* Framework version for the generated CSS is #{$version}. */ + +.selector { + foo: bar; + #{$active} { + baz: qux; + } +} + +.el:nth-of-type(#{$i}) {} + +@media #{$value} {} + +$foundation-dir: 'foundation'; +@import url('#{$foundation-dir}/components/grid'); +@import url(#{$foundation-dir}/components/grid); +@import url($foundation-dir/components/grid); +@import url($foundation-dir+"/components/grid"); + +@function get-font-family($family) { + @return $family; +} +@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); +@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); + + +@keyframes loader { + 0% { + transform: translate3d(0, 0, 0); + } + + #{50% - $loader-icon-duration} { + transform: translate3d(0, $bounce-height, 0); + } + + 50% { + transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); + } +} + +$icons: wifi "\600", wifi-hotspot "\601", weather "\602"; + +@each $icon in $icons { + .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { + content: "#{nth($icon, 2)}"; + } +} diff --git a/tests/format/scss/interpolation/4294.scss b/tests/format/scss/interpolation/4294.scss new file mode 100644 index 000000000000..da5a298aa630 --- /dev/null +++ b/tests/format/scss/interpolation/4294.scss @@ -0,0 +1,46 @@ + +a { + content: "#{".5"}"; + content: my-fn("_"); + content: "#{my-fn("_")}"; + content: my-fn("-"); + content: "#{my-fn("-")}"; + content: my-fn("-a"); + content: "#{my-fn("-a")}"; + content: my-fn("a-"); + content: "#{my-fn("a-")}"; + content: my-fn("foo"); + content: "#{my-fn("foo")}"; + content: 1 "#{my-fn("foo")}" 2; + content: foo "#{my-fn("foo")}" bar; + content: "foo #{$description} bar"; + + content: "#{my-fn("foo","bar")}"; + content: "#{my-fn( "foo" , "bar" )}"; + content: "#{my-fn( "foo" , "bar" )}"; + + content: '#{my-fn("foo")}'; + content: '#{my-fn('foo')}'; + content: "#{my-fn('foo')}"; + content: "#{my-fn("foo")}"; +} + +@mixin theme($css-property, $css-value, $theme-classes: t) { + @each $selector in & { + @each $class in $theme-classes { + @each $theme, $theme-properties in c(themes) { + $value: $css-value; + + @each $theme-name, $theme-value in $theme-properties { + $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; + $value: str-replace($value, "rgba(${#{$theme-name}}", $rgba-value); + $value: str-replace($value, "${#{$theme-name}}", $theme-value); + } + + @at-root .#{$class}-#{join($theme, $selector)} { + #{$css-property}: unquote($value); + } + } + } + } +} diff --git a/tests/format/scss/interpolation/__snapshots__/format.test.js.snap b/tests/format/scss/interpolation/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a3cdde977e66 --- /dev/null +++ b/tests/format/scss/interpolation/__snapshots__/format.test.js.snap @@ -0,0 +1,681 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3719.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$sm-only: '(min-width: 768px) and (max-width: 991px)'; +$lg-and-up: '(min-width: 1200px)'; + +@media screen and #{$sm-only, $lg-and-up} { + color: #000; +} + +=====================================output===================================== +$sm-only: "(min-width: 768px) and (max-width: 991px)"; +$lg-and-up: "(min-width: 1200px)"; + +@media screen and #{$sm-only, $lg-and-up} { + color: #000; +} + +================================================================================ +`; + +exports[`3719.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$sm-only: '(min-width: 768px) and (max-width: 991px)'; +$lg-and-up: '(min-width: 1200px)'; + +@media screen and #{$sm-only, $lg-and-up} { + color: #000; +} + +=====================================output===================================== +$sm-only: "(min-width: 768px) and (max-width: 991px)"; +$lg-and-up: "(min-width: 1200px)"; + +@media screen and #{$sm-only, $lg-and-up} { + color: #000; +} + +================================================================================ +`; + +exports[`3943.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +.class-#{$var} { + #{$var}: #7b3d66; + #{$attr}-color: blue; + #{$prop}-#{$side}: $value; + background-#{$var}: #7b3d66; + animation-name: #{var}; + line-height: #{strip-unit($line-height)}em; + height: 1#{$var}; + width: calc(100% - #{$sidebar-width}); + max-width: calc(#{$m*100}vw #{$sign} #{$b}); + font: #{$font-size}/#{$line-height}; + content: "I have #{8 + 2} books on SASS!"; + border: #{$var} #{$var} #{$var}; + filter: #{$var}#{$var}#{$var}; + prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; + prop2: + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + ; + prop3: + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + ; + prop4: -#{$loader-icon-duration}; + prop5: +#{$loader-icon-duration}; + prop6: calc(-#{$loader-icon-duration} + 10); + prop7: calc(10 + -#{$loader-icon-duration}); +} + +/* Framework version for the generated CSS is #{$version}. */ + +.selector { + foo: bar; + #{$active} { + baz: qux; + } +} + +.el:nth-of-type(#{$i}) {} + +@media #{$value} {} + +$foundation-dir: 'foundation'; +@import url('#{$foundation-dir}/components/grid'); +@import url(#{$foundation-dir}/components/grid); +@import url($foundation-dir/components/grid); +@import url($foundation-dir+"/components/grid"); + +@function get-font-family($family) { + @return $family; +} +@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); +@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); + + +@keyframes loader { + 0% { + transform: translate3d(0, 0, 0); + } + + #{50% - $loader-icon-duration} { + transform: translate3d(0, $bounce-height, 0); + } + + 50% { + transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); + } +} + +$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; + +@each $icon in $icons { + .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { + content: "#{nth($icon, 2)}"; + } +} + +=====================================output===================================== +.class-#{$var} { + #{$var}: #7b3d66; + #{$attr}-color: blue; + #{$prop}-#{$side}: $value; + background-#{$var}: #7b3d66; + animation-name: #{var}; + line-height: #{strip-unit($line-height)}em; + height: 1#{$var}; + width: calc(100% - #{$sidebar-width}); + max-width: calc(#{$m * 100}vw #{$sign} #{$b}); + font: #{$font-size}/#{$line-height}; + content: "I have #{8 + 2} books on SASS!"; + border: #{$var} #{$var} #{$var}; + filter: #{$var}#{$var}#{$var}; + prop: #{$var + $var} #{$var + $var} #{$var + $var}; + prop2: #{$var + $var} #{$var + $var} #{$var + $var}; + prop3: #{$var + $var} #{$var + $var} #{$var + $var}; + prop4: -#{$loader-icon-duration}; + prop5: +#{$loader-icon-duration}; + prop6: calc(-#{$loader-icon-duration} + 10); + prop7: calc(10 + -#{$loader-icon-duration}); +} + +/* Framework version for the generated CSS is #{$version}. */ + +.selector { + foo: bar; + #{$active} { + baz: qux; + } +} + +.el:nth-of-type(#{$i}) { +} + +@media #{$value} { +} + +$foundation-dir: "foundation"; +@import url("#{$foundation-dir}/components/grid"); +@import url(#{$foundation-dir}/components/grid); +@import url($foundation-dir/components/grid); +@import url($foundation-dir + "/components/grid"); + +@function get-font-family($family) { + @return $family; +} +@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); +@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); + +@keyframes loader { + 0% { + transform: translate3d(0, 0, 0); + } + + #{50% - $loader-icon-duration} { + transform: translate3d(0, $bounce-height, 0); + } + + 50% { + transform: translate3d(0, $bounce-height, 0) + scale( + $loader-bounce-horizontal-expansion, + $loader-bounce-vertical-compression + ); + } +} + +$icons: + wifi "\\600", + wifi-hotspot "\\601", + weather "\\602"; + +@each $icon in $icons { + .icon-#{nth($icon, 1)}, + %icon-#{nth($icon, 1)} { + content: "#{nth($icon, 2)}"; + } +} + +================================================================================ +`; + +exports[`3943.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +.class-#{$var} { + #{$var}: #7b3d66; + #{$attr}-color: blue; + #{$prop}-#{$side}: $value; + background-#{$var}: #7b3d66; + animation-name: #{var}; + line-height: #{strip-unit($line-height)}em; + height: 1#{$var}; + width: calc(100% - #{$sidebar-width}); + max-width: calc(#{$m*100}vw #{$sign} #{$b}); + font: #{$font-size}/#{$line-height}; + content: "I have #{8 + 2} books on SASS!"; + border: #{$var} #{$var} #{$var}; + filter: #{$var}#{$var}#{$var}; + prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; + prop2: + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + + #{ + $var + + + $var + } + ; + prop3: + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + + #{ + + $var + + + + + $var + + } + ; + prop4: -#{$loader-icon-duration}; + prop5: +#{$loader-icon-duration}; + prop6: calc(-#{$loader-icon-duration} + 10); + prop7: calc(10 + -#{$loader-icon-duration}); +} + +/* Framework version for the generated CSS is #{$version}. */ + +.selector { + foo: bar; + #{$active} { + baz: qux; + } +} + +.el:nth-of-type(#{$i}) {} + +@media #{$value} {} + +$foundation-dir: 'foundation'; +@import url('#{$foundation-dir}/components/grid'); +@import url(#{$foundation-dir}/components/grid); +@import url($foundation-dir/components/grid); +@import url($foundation-dir+"/components/grid"); + +@function get-font-family($family) { + @return $family; +} +@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); +@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); + + +@keyframes loader { + 0% { + transform: translate3d(0, 0, 0); + } + + #{50% - $loader-icon-duration} { + transform: translate3d(0, $bounce-height, 0); + } + + 50% { + transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); + } +} + +$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; + +@each $icon in $icons { + .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { + content: "#{nth($icon, 2)}"; + } +} + +=====================================output===================================== +.class-#{$var} { + #{$var}: #7b3d66; + #{$attr}-color: blue; + #{$prop}-#{$side}: $value; + background-#{$var}: #7b3d66; + animation-name: #{var}; + line-height: #{strip-unit($line-height)}em; + height: 1#{$var}; + width: calc(100% - #{$sidebar-width}); + max-width: calc(#{$m * 100}vw #{$sign} #{$b}); + font: #{$font-size}/#{$line-height}; + content: "I have #{8 + 2} books on SASS!"; + border: #{$var} #{$var} #{$var}; + filter: #{$var}#{$var}#{$var}; + prop: #{$var + $var} #{$var + $var} #{$var + $var}; + prop2: #{$var + $var} #{$var + $var} #{$var + $var}; + prop3: #{$var + $var} #{$var + $var} #{$var + $var}; + prop4: -#{$loader-icon-duration}; + prop5: +#{$loader-icon-duration}; + prop6: calc(-#{$loader-icon-duration} + 10); + prop7: calc(10 + -#{$loader-icon-duration}); +} + +/* Framework version for the generated CSS is #{$version}. */ + +.selector { + foo: bar; + #{$active} { + baz: qux; + } +} + +.el:nth-of-type(#{$i}) { +} + +@media #{$value} { +} + +$foundation-dir: "foundation"; +@import url("#{$foundation-dir}/components/grid"); +@import url(#{$foundation-dir}/components/grid); +@import url($foundation-dir/components/grid); +@import url($foundation-dir + "/components/grid"); + +@function get-font-family($family) { + @return $family; +} +@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); +@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); + +@keyframes loader { + 0% { + transform: translate3d(0, 0, 0); + } + + #{50% - $loader-icon-duration} { + transform: translate3d(0, $bounce-height, 0); + } + + 50% { + transform: translate3d(0, $bounce-height, 0) + scale( + $loader-bounce-horizontal-expansion, + $loader-bounce-vertical-compression + ); + } +} + +$icons: + wifi "\\600", + wifi-hotspot "\\601", + weather "\\602"; + +@each $icon in $icons { + .icon-#{nth($icon, 1)}, + %icon-#{nth($icon, 1)} { + content: "#{nth($icon, 2)}"; + } +} + +================================================================================ +`; + +exports[`4294.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== + +a { + content: "#{".5"}"; + content: my-fn("_"); + content: "#{my-fn("_")}"; + content: my-fn("-"); + content: "#{my-fn("-")}"; + content: my-fn("-a"); + content: "#{my-fn("-a")}"; + content: my-fn("a-"); + content: "#{my-fn("a-")}"; + content: my-fn("foo"); + content: "#{my-fn("foo")}"; + content: 1 "#{my-fn("foo")}" 2; + content: foo "#{my-fn("foo")}" bar; + content: "foo #{$description} bar"; + + content: "#{my-fn("foo","bar")}"; + content: "#{my-fn( "foo" , "bar" )}"; + content: "#{my-fn( "foo" , "bar" )}"; + + content: '#{my-fn("foo")}'; + content: '#{my-fn('foo')}'; + content: "#{my-fn('foo')}"; + content: "#{my-fn("foo")}"; +} + +@mixin theme($css-property, $css-value, $theme-classes: t) { + @each $selector in & { + @each $class in $theme-classes { + @each $theme, $theme-properties in c(themes) { + $value: $css-value; + + @each $theme-name, $theme-value in $theme-properties { + $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; + $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); + $value: str-replace($value, "\${#{$theme-name}}", $theme-value); + } + + @at-root .#{$class}-#{join($theme, $selector)} { + #{$css-property}: unquote($value); + } + } + } + } +} + +=====================================output===================================== +a { + content: "#{"0.5"}"; + content: my-fn("_"); + content: "#{my-fn("_")}"; + content: my-fn("-"); + content: "#{my-fn("-")}"; + content: my-fn("-a"); + content: "#{my-fn("-a")}"; + content: my-fn("a-"); + content: "#{my-fn("a-")}"; + content: my-fn("foo"); + content: "#{my-fn("foo")}"; + content: 1 "#{my-fn("foo")}" 2; + content: foo "#{my-fn("foo")}" bar; + content: "foo #{$description} bar"; + + content: "#{my-fn("foo","bar")}"; + content: "#{my-fn( "foo" , "bar" )}"; + content: "#{my-fn( "foo" , "bar" )}"; + + content: '#{my-fn("foo")}'; + content: "#{my-fn("foo")}"; + content: "#{my-fn('foo')}"; + content: "#{my-fn("foo")}"; +} + +@mixin theme($css-property, $css-value, $theme-classes: t) { + @each $selector in & { + @each $class in $theme-classes { + @each $theme, $theme-properties in c(themes) { + $value: $css-value; + + @each $theme-name, $theme-value in $theme-properties { + $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; + $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); + $value: str-replace($value, "\${#{$theme-name}}", $theme-value); + } + + @at-root .#{$class}-#{join($theme, $selector)} { + #{$css-property}: unquote($value); + } + } + } + } +} + +================================================================================ +`; + +exports[`4294.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== + +a { + content: "#{".5"}"; + content: my-fn("_"); + content: "#{my-fn("_")}"; + content: my-fn("-"); + content: "#{my-fn("-")}"; + content: my-fn("-a"); + content: "#{my-fn("-a")}"; + content: my-fn("a-"); + content: "#{my-fn("a-")}"; + content: my-fn("foo"); + content: "#{my-fn("foo")}"; + content: 1 "#{my-fn("foo")}" 2; + content: foo "#{my-fn("foo")}" bar; + content: "foo #{$description} bar"; + + content: "#{my-fn("foo","bar")}"; + content: "#{my-fn( "foo" , "bar" )}"; + content: "#{my-fn( "foo" , "bar" )}"; + + content: '#{my-fn("foo")}'; + content: '#{my-fn('foo')}'; + content: "#{my-fn('foo')}"; + content: "#{my-fn("foo")}"; +} + +@mixin theme($css-property, $css-value, $theme-classes: t) { + @each $selector in & { + @each $class in $theme-classes { + @each $theme, $theme-properties in c(themes) { + $value: $css-value; + + @each $theme-name, $theme-value in $theme-properties { + $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; + $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); + $value: str-replace($value, "\${#{$theme-name}}", $theme-value); + } + + @at-root .#{$class}-#{join($theme, $selector)} { + #{$css-property}: unquote($value); + } + } + } + } +} + +=====================================output===================================== +a { + content: "#{"0.5"}"; + content: my-fn("_"); + content: "#{my-fn("_")}"; + content: my-fn("-"); + content: "#{my-fn("-")}"; + content: my-fn("-a"); + content: "#{my-fn("-a")}"; + content: my-fn("a-"); + content: "#{my-fn("a-")}"; + content: my-fn("foo"); + content: "#{my-fn("foo")}"; + content: 1 "#{my-fn("foo")}" 2; + content: foo "#{my-fn("foo")}" bar; + content: "foo #{$description} bar"; + + content: "#{my-fn("foo","bar")}"; + content: "#{my-fn( "foo" , "bar" )}"; + content: "#{my-fn( "foo" , "bar" )}"; + + content: '#{my-fn("foo")}'; + content: "#{my-fn("foo")}"; + content: "#{my-fn('foo')}"; + content: "#{my-fn("foo")}"; +} + +@mixin theme($css-property, $css-value, $theme-classes: t) { + @each $selector in & { + @each $class in $theme-classes { + @each $theme, $theme-properties in c(themes) { + $value: $css-value; + + @each $theme-name, $theme-value in $theme-properties { + $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; + $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); + $value: str-replace($value, "\${#{$theme-name}}", $theme-value); + } + + @at-root .#{$class}-#{join($theme, $selector)} { + #{$css-property}: unquote($value); + } + } + } + } +} + +================================================================================ +`; diff --git a/tests/format/scss/interpolation/format.test.js b/tests/format/scss/interpolation/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/interpolation/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/map/15193.scss b/tests/format/scss/map/15193.scss new file mode 100644 index 000000000000..a5d2bcab99c3 --- /dev/null +++ b/tests/format/scss/map/15193.scss @@ -0,0 +1,9 @@ +$foo: ( + 'property1': (), + // comment 1 + // comment 2 + + 'property2': 1, + /** comment 1 */ + /* comment 2 */ +); diff --git a/tests/format/scss/map/2554.scss b/tests/format/scss/map/2554.scss new file mode 100644 index 000000000000..1b51e5b813ff --- /dev/null +++ b/tests/format/scss/map/2554.scss @@ -0,0 +1,120 @@ +$map: (key: value, other-key: other-value); +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) +!default; +$map: +(key: value, other-key: other-value) +!default; +$map: ( key : value , other-key : other-value); +$map: ( key : value , other-key : other-value ); +$map: ( + key: value, + other-key: other-value +); +$map: ( +key: value, +other-key: other-value +); +$map: ( +key +: +value, +other-key +: +other-value +); +$map: ( +key +: +value +, +other-key +: +other-value +); +$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: +( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value +, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + key: (#d82d2d, #666), + other-key: (#52bf4a, #fff), + other-other-key: (#c23435, #fff) +); +$map: ( +key: (#d82d2d, #666), +other-key: (#52bf4a, #fff), +other-other-key: (#c23435, #fff) +); +$map: ( + key : ( #d82d2d , #666 ), + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( + key : ( #d82d2d , #666 ) , + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( +key +: +( +#d82d2d, +#666 +) +, +other-key +: +( +#52bf4a, +#fff +) +, +other-other-key +: +( +#c23435 +, +#fff +) +); +$map: map-merge($map, ($key: $value)); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( + $map, + ($key: $value) +); +$map: map-merge( +$map, +($key: $value) +); +$map: +map-merge( +$map +, +( +$key +: +$value +) +); diff --git a/tests/format/scss/map/3235.scss b/tests/format/scss/map/3235.scss new file mode 100644 index 000000000000..cf8d8e141f4c --- /dev/null +++ b/tests/format/scss/map/3235.scss @@ -0,0 +1,61 @@ +a { + transition-timing-function: func1( + func2( + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ) + ); +} + +$empty-map: (); +$empty-nested-map: ( +nested-key: (empty-key: (color: red)), +empty-key: (), +empty-key: (), +empty-key: () +); + +$o-grid-default-config: ( +columns: 12, +gutter: 10px, +min-width: 240px, +max-width: 1330px, +layouts: ( +S: 370px, +M: 610px, +L: 850px, +XL: 1090px +), +fluid: true, +debug: false, +fixed-layout: M, +enhanced-experience: true +); + +$a: (); +$b: unquote(''); +$c: null; +$d: (null); + +$threads-properties: map-merge($threads-properties, ($border-label: ())); +$o-grid-default-config: (layouts: (S: 370px)); + +$map: ( +key: (value), +other-key: (key: other-other-value) +); diff --git a/tests/format/scss/map/__snapshots__/format.test.js.snap b/tests/format/scss/map/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c3a8936bc271 --- /dev/null +++ b/tests/format/scss/map/__snapshots__/format.test.js.snap @@ -0,0 +1,1347 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`2554.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$map: (key: value, other-key: other-value); +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) +!default; +$map: +(key: value, other-key: other-value) +!default; +$map: ( key : value , other-key : other-value); +$map: ( key : value , other-key : other-value ); +$map: ( + key: value, + other-key: other-value +); +$map: ( +key: value, +other-key: other-value +); +$map: ( +key +: +value, +other-key +: +other-value +); +$map: ( +key +: +value +, +other-key +: +other-value +); +$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: +( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value +, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + key: (#d82d2d, #666), + other-key: (#52bf4a, #fff), + other-other-key: (#c23435, #fff) +); +$map: ( +key: (#d82d2d, #666), +other-key: (#52bf4a, #fff), +other-other-key: (#c23435, #fff) +); +$map: ( + key : ( #d82d2d , #666 ), + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( + key : ( #d82d2d , #666 ) , + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( +key +: +( +#d82d2d, +#666 +) +, +other-key +: +( +#52bf4a, +#fff +) +, +other-other-key +: +( +#c23435 +, +#fff +) +); +$map: map-merge($map, ($key: $value)); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( + $map, + ($key: $value) +); +$map: map-merge( +$map, +($key: $value) +); +$map: +map-merge( +$map +, +( +$key +: +$value +) +); + +=====================================output===================================== +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +) !default; +$map: ( + key: value, + other-key: other-value, +) !default; +$map: ( + key: value, + other-key: other-value, +) !default; +$map: ( + key: value, + other-key: other-value, +) !default; +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +); +$map: ( + key: value, + other-key: other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, +); +$map: ( + key: ( + #d82d2d, + #666, + ), + other-key: ( + #52bf4a, + #fff, + ), + other-other-key: ( + #c23435, + #fff, + ), +); +$map: ( + key: ( + #d82d2d, + #666, + ), + other-key: ( + #52bf4a, + #fff, + ), + other-other-key: ( + #c23435, + #fff, + ), +); +$map: ( + key: ( + #d82d2d, + #666, + ), + other-key: ( + #52bf4a, + #fff, + ), + other-other-key: ( + #c23435, + #fff, + ), +); +$map: ( + key: ( + #d82d2d, + #666, + ), + other-key: ( + #52bf4a, + #fff, + ), + other-other-key: ( + #c23435, + #fff, + ), +); +$map: ( + key: ( + #d82d2d, + #666, + ), + other-key: ( + #52bf4a, + #fff, + ), + other-other-key: ( + #c23435, + #fff, + ), +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); +$map: map-merge( + $map, + ( + $key: $value, + ) +); + +================================================================================ +`; + +exports[`2554.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$map: (key: value, other-key: other-value); +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) !default; +$map: (key: value, other-key: other-value) +!default; +$map: +(key: value, other-key: other-value) +!default; +$map: ( key : value , other-key : other-value); +$map: ( key : value , other-key : other-value ); +$map: ( + key: value, + other-key: other-value +); +$map: ( +key: value, +other-key: other-value +); +$map: ( +key +: +value, +other-key +: +other-value +); +$map: ( +key +: +value +, +other-key +: +other-value +); +$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: +( +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value +, +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key +: +very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + key: (#d82d2d, #666), + other-key: (#52bf4a, #fff), + other-other-key: (#c23435, #fff) +); +$map: ( +key: (#d82d2d, #666), +other-key: (#52bf4a, #fff), +other-other-key: (#c23435, #fff) +); +$map: ( + key : ( #d82d2d , #666 ), + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( + key : ( #d82d2d , #666 ) , + other-key : ( #52bf4a , #fff ), + other-other-key : ( #c23435 , #fff ) +); +$map: ( +key +: +( +#d82d2d, +#666 +) +, +other-key +: +( +#52bf4a, +#fff +) +, +other-other-key +: +( +#c23435 +, +#fff +) +); +$map: map-merge($map, ($key: $value)); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( $map , ( $key : $value ) ); +$map: map-merge( + $map, + ($key: $value) +); +$map: map-merge( +$map, +($key: $value) +); +$map: +map-merge( +$map +, +( +$key +: +$value +) +); + +=====================================output===================================== +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +) !default; +$map: ( + key: value, + other-key: other-value +) !default; +$map: ( + key: value, + other-key: other-value +) !default; +$map: ( + key: value, + other-key: other-value +) !default; +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +); +$map: ( + key: value, + other-key: other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: + very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value +); +$map: ( + key: ( + #d82d2d, + #666 + ), + other-key: ( + #52bf4a, + #fff + ), + other-other-key: ( + #c23435, + #fff + ) +); +$map: ( + key: ( + #d82d2d, + #666 + ), + other-key: ( + #52bf4a, + #fff + ), + other-other-key: ( + #c23435, + #fff + ) +); +$map: ( + key: ( + #d82d2d, + #666 + ), + other-key: ( + #52bf4a, + #fff + ), + other-other-key: ( + #c23435, + #fff + ) +); +$map: ( + key: ( + #d82d2d, + #666 + ), + other-key: ( + #52bf4a, + #fff + ), + other-other-key: ( + #c23435, + #fff + ) +); +$map: ( + key: ( + #d82d2d, + #666 + ), + other-key: ( + #52bf4a, + #fff + ), + other-other-key: ( + #c23435, + #fff + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); +$map: map-merge( + $map, + ( + $key: $value + ) +); + +================================================================================ +`; + +exports[`3235.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +a { + transition-timing-function: func1( + func2( + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ) + ); +} + +$empty-map: (); +$empty-nested-map: ( +nested-key: (empty-key: (color: red)), +empty-key: (), +empty-key: (), +empty-key: () +); + +$o-grid-default-config: ( +columns: 12, +gutter: 10px, +min-width: 240px, +max-width: 1330px, +layouts: ( +S: 370px, +M: 610px, +L: 850px, +XL: 1090px +), +fluid: true, +debug: false, +fixed-layout: M, +enhanced-experience: true +); + +$a: (); +$b: unquote(''); +$c: null; +$d: (null); + +$threads-properties: map-merge($threads-properties, ($border-label: ())); +$o-grid-default-config: (layouts: (S: 370px)); + +$map: ( +key: (value), +other-key: (key: other-other-value) +); + +=====================================output===================================== +a { + transition-timing-function: func1( + func2( + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ) + ); +} + +$empty-map: (); +$empty-nested-map: ( + nested-key: ( + empty-key: ( + color: red, + ), + ), + empty-key: (), + empty-key: (), + empty-key: (), +); + +$o-grid-default-config: ( + columns: 12, + gutter: 10px, + min-width: 240px, + max-width: 1330px, + layouts: ( + S: 370px, + M: 610px, + L: 850px, + XL: 1090px, + ), + fluid: true, + debug: false, + fixed-layout: M, + enhanced-experience: true, +); + +$a: (); +$b: unquote(""); +$c: null; +$d: (null); + +$threads-properties: map-merge( + $threads-properties, + ( + $border-label: (), + ) +); +$o-grid-default-config: ( + layouts: ( + S: 370px, + ), +); + +$map: ( + key: ( + value, + ), + other-key: ( + key: other-other-value, + ), +); + +================================================================================ +`; + +exports[`3235.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +a { + transition-timing-function: func1( + func2( + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ) + ); +} + +$empty-map: (); +$empty-nested-map: ( +nested-key: (empty-key: (color: red)), +empty-key: (), +empty-key: (), +empty-key: () +); + +$o-grid-default-config: ( +columns: 12, +gutter: 10px, +min-width: 240px, +max-width: 1330px, +layouts: ( +S: 370px, +M: 610px, +L: 850px, +XL: 1090px +), +fluid: true, +debug: false, +fixed-layout: M, +enhanced-experience: true +); + +$a: (); +$b: unquote(''); +$c: null; +$d: (null); + +$threads-properties: map-merge($threads-properties, ($border-label: ())); +$o-grid-default-config: (layouts: (S: 370px)); + +$map: ( +key: (value), +other-key: (key: other-other-value) +); + +=====================================output===================================== +a { + transition-timing-function: func1( + func2( + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ), + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + func3( + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue", + "veryVeryVeryVeryVeryLongValue" + ) + ); +} + +$empty-map: (); +$empty-nested-map: ( + nested-key: ( + empty-key: ( + color: red + ) + ), + empty-key: (), + empty-key: (), + empty-key: () +); + +$o-grid-default-config: ( + columns: 12, + gutter: 10px, + min-width: 240px, + max-width: 1330px, + layouts: ( + S: 370px, + M: 610px, + L: 850px, + XL: 1090px + ), + fluid: true, + debug: false, + fixed-layout: M, + enhanced-experience: true +); + +$a: (); +$b: unquote(""); +$c: null; +$d: (null); + +$threads-properties: map-merge( + $threads-properties, + ( + $border-label: () + ) +); +$o-grid-default-config: ( + layouts: ( + S: 370px + ) +); + +$map: ( + key: ( + value + ), + other-key: ( + key: other-other-value + ) +); + +================================================================================ +`; + +exports[`15193.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$foo: ( + 'property1': (), + // comment 1 + // comment 2 + + 'property2': 1, + /** comment 1 */ + /* comment 2 */ +); + +=====================================output===================================== +$foo: ( + "property1": (), + // comment 1 + // comment 2 + "property2": 1, + /** comment 1 */ /* comment 2 */ +); + +================================================================================ +`; + +exports[`15193.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$foo: ( + 'property1': (), + // comment 1 + // comment 2 + + 'property2': 1, + /** comment 1 */ + /* comment 2 */ +); + +=====================================output===================================== +$foo: ( + "property1": (), + // comment 1 + // comment 2 + "property2": 1, + /** comment 1 */ /* comment 2 */ +); + +================================================================================ +`; + +exports[`comment.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$map: ( + /* comment */ + key1: value, + + // comment + key2: value, + + /* comment */ /* comment */ + key3: value, + + /* comment */ + key4: ( + key: value, + key: value, + key: value, + key: value, + key: value, + ), +); + +=====================================output===================================== +$map: ( + /* comment */ key1: value, + + // comment + key2: value, + + /* comment */ /* comment */ key3: value, + + /* comment */ + key4: ( + key: value, + key: value, + key: value, + key: value, + key: value, + ) +); + +================================================================================ +`; + +exports[`comment.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$map: ( + /* comment */ + key1: value, + + // comment + key2: value, + + /* comment */ /* comment */ + key3: value, + + /* comment */ + key4: ( + key: value, + key: value, + key: value, + key: value, + key: value, + ), +); + +=====================================output===================================== +$map: ( + /* comment */ key1: value, + + // comment + key2: value, + + /* comment */ /* comment */ key3: value, + + /* comment */ + key4: ( + key: value, + key: value, + key: value, + key: value, + key: value + ) +); + +================================================================================ +`; + +exports[`key-values.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$map: ( + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + ('key': 'value',), + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + ('list'), + ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): + ('list'), + ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): + ('key': 'value',), + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + 1, +); + +=====================================output===================================== +$map: ( + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value", + ): ( + "key": "value", + ), + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value", + ): ( + "list", + ), + ( + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + ): ( + "list", + ), + ( + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + ): ( + "key": "value", + ), + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value", + ): 1, +); + +================================================================================ +`; + +exports[`key-values.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$map: ( + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + ('key': 'value',), + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + ('list'), + ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): + ('list'), + ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): + ('key': 'value',), + ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): + 1, +); + +=====================================output===================================== +$map: ( + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value" + ): ( + "key": "value" + ), + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value" + ): ( + "list" + ), + ( + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list" + ): ( + "list" + ), + ( + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list", + "list" + ): ( + "key": "value" + ), + ( + "key": "value", + "key": "value", + "key": "value", + "key": "value", + "key": "value" + ): 1 +); + +================================================================================ +`; + +exports[`keys.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$map: ( + 'string': 'hello world', + ('list'): 'hello world', + ('key': 'value'): 'hello world', + ('list', 'long long long long long long long long long long long long long list'): 'hello world', + ('key': 'value','long long long long long long long long long long long long long map': 'value',): 'hello world', +); + +// #10000 +$map: ( + ('my list'): 'hello world', +); + +=====================================output===================================== +$map: ( + "string": "hello world", + ("list"): "hello world", + ("key": "value"): "hello world", + ( + "list", + "long long long long long long long long long long long long long list", + ): "hello world", + ( + "key": "value", + "long long long long long long long long long long long long long map": + "value", + ): "hello world", +); + +// #10000 +$map: ( + ("my list"): "hello world", +); + +================================================================================ +`; + +exports[`keys.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$map: ( + 'string': 'hello world', + ('list'): 'hello world', + ('key': 'value'): 'hello world', + ('list', 'long long long long long long long long long long long long long list'): 'hello world', + ('key': 'value','long long long long long long long long long long long long long map': 'value',): 'hello world', +); + +// #10000 +$map: ( + ('my list'): 'hello world', +); + +=====================================output===================================== +$map: ( + "string": "hello world", + ("list"): "hello world", + ("key": "value"): "hello world", + ( + "list", + "long long long long long long long long long long long long long list" + ): "hello world", + ( + "key": "value", + "long long long long long long long long long long long long long map": + "value" + ): "hello world" +); + +// #10000 +$map: ( + ("my list"): "hello world" +); + +================================================================================ +`; diff --git a/tests/format/scss/map/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/map/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 729e8d5a780a..000000000000 --- a/tests/format/scss/map/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,261 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`key-values.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -$map: ( - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - ('key': 'value',), - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - ('list'), - ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): - ('list'), - ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): - ('key': 'value',), - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - 1, -); - -=====================================output===================================== -$map: ( - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value" - ): - ( - "key": "value" - ), - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value" - ): - ( - "list" - ), - ( - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list" - ): - ( - "list" - ), - ( - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list" - ): - ( - "key": "value" - ), - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value" - ): - 1 -); - -================================================================================ -`; - -exports[`key-values.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$map: ( - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - ('key': 'value',), - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - ('list'), - ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): - ('list'), - ('list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list', 'list'): - ('key': 'value',), - ('key': 'value', 'key': 'value','key': 'value','key': 'value','key': 'value',): - 1, -); - -=====================================output===================================== -$map: ( - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value", - ): - ( - "key": "value", - ), - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value", - ): - ( - "list", - ), - ( - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - ): - ( - "list", - ), - ( - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - "list", - ): - ( - "key": "value", - ), - ( - "key": "value", - "key": "value", - "key": "value", - "key": "value", - "key": "value", - ): - 1, -); - -================================================================================ -`; - -exports[`keys.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -$map: ( - 'string': 'hello world', - ('list'): 'hello world', - ('key': 'value'): 'hello world', - ('list', 'long long long long long long long long long long long long long list'): 'hello world', - ('key': 'value','long long long long long long long long long long long long long map': 'value',): 'hello world', -); - -// #10000 -$map: ( - ('my list'): 'hello world', -); - -=====================================output===================================== -$map: ( - "string": "hello world", - ("list"): "hello world", - ("key": "value"): "hello world", - ( - "list", - "long long long long long long long long long long long long long list" - ): - "hello world", - ( - "key": "value", - "long long long long long long long long long long long long long map": - "value" - ): - "hello world" -); - -// #10000 -$map: ( - ("my list"): "hello world" -); - -================================================================================ -`; - -exports[`keys.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$map: ( - 'string': 'hello world', - ('list'): 'hello world', - ('key': 'value'): 'hello world', - ('list', 'long long long long long long long long long long long long long list'): 'hello world', - ('key': 'value','long long long long long long long long long long long long long map': 'value',): 'hello world', -); - -// #10000 -$map: ( - ('my list'): 'hello world', -); - -=====================================output===================================== -$map: ( - "string": "hello world", - ("list"): "hello world", - ("key": "value"): "hello world", - ( - "list", - "long long long long long long long long long long long long long list", - ): - "hello world", - ( - "key": "value", - "long long long long long long long long long long long long long map": - "value", - ): - "hello world", -); - -// #10000 -$map: ( - ("my list"): "hello world", -); - -================================================================================ -`; diff --git a/tests/format/scss/map/comment.scss b/tests/format/scss/map/comment.scss new file mode 100644 index 000000000000..c301ba8b8fb5 --- /dev/null +++ b/tests/format/scss/map/comment.scss @@ -0,0 +1,19 @@ +$map: ( + /* comment */ + key1: value, + + // comment + key2: value, + + /* comment */ /* comment */ + key3: value, + + /* comment */ + key4: ( + key: value, + key: value, + key: value, + key: value, + key: value, + ), +); diff --git a/tests/format/scss/map/format.test.js b/tests/format/scss/map/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/map/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/map/function-argument/__snapshots__/format.test.js.snap b/tests/format/scss/map/function-argument/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5c997532b887 --- /dev/null +++ b/tests/format/scss/map/function-argument/__snapshots__/format.test.js.snap @@ -0,0 +1,200 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`function-argument-2.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$display-breakpoints: map-deep-merge( + ( + "sm-only": "only screen and (min-width: #{$map-get + $grid-breakpoints + "hogehoge"}) and (max-width: #{$a})", + "sm-only": "inside a long long long long long long long long long long long long long long string #{call("")}", + "sm-only": "inside a long long long long long long long long long long long long long long string #{$foo} and #{call("")}", + "sm-only": "inside a long long long long long long long long long long long long long long string #{call($a)}", + ), + $display-breakpoints +); + +@each $name, $hue in $hues { + $map: map.merge( + $map, + ( + '#{$prefix}-#{$name}': blend.set($base, $hue: $hue), + ) + ); +} + +=====================================output===================================== +$display-breakpoints: map-deep-merge( + ( + "sm-only": + "only screen and (min-width: #{$map-get + $grid-breakpoints + "hogehoge"}) and (max-width: #{$a})", + "sm-only": + "inside a long long long long long long long long long long long long long long string #{call("")}", + "sm-only": + "inside a long long long long long long long long long long long long long long string #{$foo} and #{call("")}", + "sm-only": + "inside a long long long long long long long long long long long long long long string #{call($a)}", + ), + $display-breakpoints +); + +@each $name, $hue in $hues { + $map: map.merge( + $map, + ( + "#{$prefix}-#{$name}": blend.set($base, $hue: $hue), + ) + ); +} + +================================================================================ +`; + +exports[`functional-argument.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +//simple test +$display-breakpoints: map-deep-merge( + ( + "print-only": "only print", + "screen-only": "only screen", + "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm") - 1})", + "sm-only": "only screen and (min-width: #{map-get($grid-breakpoints, "sm")}) and (max-width: #{map-get($grid-breakpoints, "md") - 1})", + ), + $display-breakpoints +); + + +//list test +@each +$size +in +$sizes { +.icon +#{$size} +{ +border +: +"#{$size + "px"}" +solid +red; +} +} + +@each +$size +in +$sizes { +.icon-#{$size} +{ +border +: +"#{$size + "px"}" +solid +red; +} +} + +//map test +$font-weights +: +("regular": 400 +, +"medium": 500, +"bold": +700); +@each +$name, +$boldness +in +$icons { +.text +#{ +$name +} { +color: red; +font-weight: +"#{$boldness}" +} +} + +$font-weights +: +("regular": 400 +, +"medium": 500, +"bold": +700); +@each +$name, +$boldness +in +$icons { +.text-#{ +$name +} { +color: red; +font-weight: +"#{$boldness}" +} +} + +=====================================output===================================== +//simple test +$display-breakpoints: map-deep-merge( + ( + "print-only": "only print", + "screen-only": "only screen", + "xs-only": + "only screen and (max-width: #{map-get($grid-breakpoints, "sm") - 1})", + "sm-only": + "only screen and (min-width: #{map-get($grid-breakpoints, "sm")}) and (max-width: #{map-get($grid-breakpoints, "md") - 1})", + ), + $display-breakpoints +); + +//list test +@each $size in $sizes { + .icon #{$size} { + border: "#{$size + "px"}" solid red; + } +} + +@each $size in $sizes { + .icon-#{$size} { + border: "#{$size + "px"}" solid red; + } +} + +//map test +$font-weights: ( + "regular": 400, + "medium": 500, + "bold": 700, +); +@each $name, $boldness in $icons { + .text #{ $name } { + color: red; + font-weight: "#{$boldness}"; + } +} + +$font-weights: ( + "regular": 400, + "medium": 500, + "bold": 700, +); +@each $name, $boldness in $icons { + .text-#{ $name } { + color: red; + font-weight: "#{$boldness}"; + } +} + +================================================================================ +`; diff --git a/tests/format/scss/map/function-argument/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/map/function-argument/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e74fed620aa7..000000000000 --- a/tests/format/scss/map/function-argument/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,197 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`function-argument-2.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$display-breakpoints: map-deep-merge( - ( - "sm-only": "only screen and (min-width: #{$map-get + $grid-breakpoints + "hogehoge"}) and (max-width: #{$a})", - "sm-only": "inside a long long long long long long long long long long long long long long string #{call("")}", - "sm-only": "inside a long long long long long long long long long long long long long long string #{$foo} and #{call("")}", - "sm-only": "inside a long long long long long long long long long long long long long long string #{call($a)}", - ), - $display-breakpoints -); - -@each $name, $hue in $hues { - $map: map.merge( - $map, - ( - '#{$prefix}-#{$name}': blend.set($base, $hue: $hue), - ) - ); -} - -=====================================output===================================== -$display-breakpoints: map-deep-merge( - ( - "sm-only": "only screen and (min-width: #{$map-get + $grid-breakpoints + "hogehoge"}) and (max-width: #{$a})", - "sm-only": - "inside a long long long long long long long long long long long long long long string #{call("")}", - "sm-only": - "inside a long long long long long long long long long long long long long long string #{$foo} and #{call("")}", - "sm-only": - "inside a long long long long long long long long long long long long long long string #{call($a)}", - ), - $display-breakpoints -); - -@each $name, $hue in $hues { - $map: map.merge( - $map, - ( - "#{$prefix}-#{$name}": blend.set($base, $hue: $hue), - ) - ); -} - -================================================================================ -`; - -exports[`functional-argument.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -//simple test -$display-breakpoints: map-deep-merge( - ( - "print-only": "only print", - "screen-only": "only screen", - "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm") - 1})", - "sm-only": "only screen and (min-width: #{map-get($grid-breakpoints, "sm")}) and (max-width: #{map-get($grid-breakpoints, "md") - 1})", - ), - $display-breakpoints -); - - -//list test -@each -$size -in -$sizes { -.icon -#{$size} -{ -border -: -"#{$size + "px"}" -solid -red; -} -} - -@each -$size -in -$sizes { -.icon-#{$size} -{ -border -: -"#{$size + "px"}" -solid -red; -} -} - -//map test -$font-weights -: -("regular": 400 -, -"medium": 500, -"bold": -700); -@each -$name, -$boldness -in -$icons { -.text -#{ -$name -} { -color: red; -font-weight: -"#{$boldness}" -} -} - -$font-weights -: -("regular": 400 -, -"medium": 500, -"bold": -700); -@each -$name, -$boldness -in -$icons { -.text-#{ -$name -} { -color: red; -font-weight: -"#{$boldness}" -} -} - -=====================================output===================================== -//simple test -$display-breakpoints: map-deep-merge( - ( - "print-only": "only print", - "screen-only": "only screen", - "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm") - 1})", - "sm-only": "only screen and (min-width: #{map-get($grid-breakpoints, "sm")}) and (max-width: #{map-get($grid-breakpoints, "md") - 1})", - ), - $display-breakpoints -); - -//list test -@each $size in $sizes { - .icon #{$size} { - border: "#{$size + "px"}" solid red; - } -} - -@each $size in $sizes { - .icon-#{$size} { - border: "#{$size + "px"}" solid red; - } -} - -//map test -$font-weights: ( - "regular": 400, - "medium": 500, - "bold": 700, -); -@each $name, $boldness in $icons { - .text #{ $name } { - color: red; - font-weight: "#{$boldness}"; - } -} - -$font-weights: ( - "regular": 400, - "medium": 500, - "bold": 700, -); -@each $name, $boldness in $icons { - .text-#{ $name } { - color: red; - font-weight: "#{$boldness}"; - } -} - -================================================================================ -`; diff --git a/tests/format/scss/map/function-argument/format.test.js b/tests/format/scss/map/function-argument/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/map/function-argument/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/map/function-argument/jsfmt.spec.js b/tests/format/scss/map/function-argument/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/map/function-argument/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/map/jsfmt.spec.js b/tests/format/scss/map/jsfmt.spec.js deleted file mode 100644 index f2558a4a9996..000000000000 --- a/tests/format/scss/map/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["scss"], { trailingComma: "none" }); -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/math/3945.scss b/tests/format/scss/math/3945.scss new file mode 100644 index 000000000000..4b0f9aa681d1 --- /dev/null +++ b/tests/format/scss/math/3945.scss @@ -0,0 +1,129 @@ + +.foo { + prop: -($grid-gutter-width / 2); + prop1: -( $grid-gutter-width / 2 ); + prop2: -$grid-gutter-width / 2; + prop3: +($grid-gutter-width / 2); + prop4: 10px/8px; /* Plain CSS, no division */ + prop5: $width / 2; /* Uses a variable, does division */ + prop6: round(1.5) / 2; /* Uses a function, does division */ + prop7: (500px / 2); /* Uses parentheses, does division */ + prop8: 5px + 8px / 2px; //* Uses +, does division */ + prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ + prop10: #010203 + #040506; + prop11: #010203 * 2; + prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); + prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); + prop14: e + -resize; + prop15: sans- + "serif"; + prop16: 1em + (2em * 3); + prop17: rotate(-2deg); + prop18: rotate( -2deg ) ; + _:_; + prop19: 10 - ($grid-gutter-width / 2); + prop20: 10 + -($grid-gutter-width / 2); + prop21: 10 + - ( $grid-gutter-width / 2 ) ; + prop22: - ( $grid-gutter-width / 2 ) ; + prop23: - ( $grid-gutter-width / 2 ) ; + prop24: -$grid-gutter-width; + prop25: + ( $grid-gutter-width / 2 ) ; + prop26: + ( $grid-gutter-width / 2 ) ; + prop27: +$grid-gutter-width; + prop28: --($grid-gutter-width / 2); + prop28: ++($grid-gutter-width / 2); + prop29: rotate( - 2deg ) ; +} + +$last:nth($juggler,length($juggler)); +$x:if($last%2==0,1/2,3/2); +$new:pow($last,$x); +$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; +$new-entry:(); +$new-entry : ( ) ; +$new-entry : ( ) ; +$new-entry +: +( +) +; + +body:before { + content: quote(to-string(fibonacci(100), ' \A ')); + white-space: pre-wrap; +} + +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); +width +: +( +( +100% +- +( +( +$numPerRow +- +1 +) +* +$margin +) +) +/ +$numPerRow +) +; + +a:nth-child(#{$numPerRow}n) { + margin-right: 0; + margin-bottom: 0; +} + +@function em($pixels, $context: $browser-context) { + @return #{ $pixels / $context }em +} + +.navigation { + @extend %updated-#{$flag}; + @extend .selected-#{$flag}; + @extend %#{$item}; +} + +.icon-#{$icon-name} { + background-image: '/images/#{$icon-name}.svg'; +} + +$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); + +@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} + +@function gcd($a,$b){ + // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript + @if ($b != 0) { + @return gcd($b,$a % $b); + }@else{ + @return abs($a); + } +} + +$colors: ( +primary: ( +base: #00abc9, +light: #daf1f6, +dark: #12799a +), +secondary: ( +base: #424d55, +light: #ccc, +lightest: #efefef, +dark: #404247 +), +success: ( +base: #bbd33e, +light: #eaf0c6 +) +); + +@function color($color, $tone: "base") { +@return map-get(map-get($colors, $color), $tone); +} diff --git a/tests/format/scss/math/__snapshots__/format.test.js.snap b/tests/format/scss/math/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bf330989aaa7 --- /dev/null +++ b/tests/format/scss/math/__snapshots__/format.test.js.snap @@ -0,0 +1,525 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3945.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== + +.foo { + prop: -($grid-gutter-width / 2); + prop1: -( $grid-gutter-width / 2 ); + prop2: -$grid-gutter-width / 2; + prop3: +($grid-gutter-width / 2); + prop4: 10px/8px; /* Plain CSS, no division */ + prop5: $width / 2; /* Uses a variable, does division */ + prop6: round(1.5) / 2; /* Uses a function, does division */ + prop7: (500px / 2); /* Uses parentheses, does division */ + prop8: 5px + 8px / 2px; //* Uses +, does division */ + prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ + prop10: #010203 + #040506; + prop11: #010203 * 2; + prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); + prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); + prop14: e + -resize; + prop15: sans- + "serif"; + prop16: 1em + (2em * 3); + prop17: rotate(-2deg); + prop18: rotate( -2deg ) ; + _:_; + prop19: 10 - ($grid-gutter-width / 2); + prop20: 10 + -($grid-gutter-width / 2); + prop21: 10 + - ( $grid-gutter-width / 2 ) ; + prop22: - ( $grid-gutter-width / 2 ) ; + prop23: - ( $grid-gutter-width / 2 ) ; + prop24: -$grid-gutter-width; + prop25: + ( $grid-gutter-width / 2 ) ; + prop26: + ( $grid-gutter-width / 2 ) ; + prop27: +$grid-gutter-width; + prop28: --($grid-gutter-width / 2); + prop28: ++($grid-gutter-width / 2); + prop29: rotate( - 2deg ) ; +} + +$last:nth($juggler,length($juggler)); +$x:if($last%2==0,1/2,3/2); +$new:pow($last,$x); +$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; +$new-entry:(); +$new-entry : ( ) ; +$new-entry : ( ) ; +$new-entry +: +( +) +; + +body:before { + content: quote(to-string(fibonacci(100), ' \\A ')); + white-space: pre-wrap; +} + +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); +width +: +( +( +100% +- +( +( +$numPerRow +- +1 +) +* +$margin +) +) +/ +$numPerRow +) +; + +a:nth-child(#{$numPerRow}n) { + margin-right: 0; + margin-bottom: 0; +} + +@function em($pixels, $context: $browser-context) { + @return #{ $pixels / $context }em +} + +.navigation { + @extend %updated-#{$flag}; + @extend .selected-#{$flag}; + @extend %#{$item}; +} + +.icon-#{$icon-name} { + background-image: '/images/#{$icon-name}.svg'; +} + +$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); + +@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} + +@function gcd($a,$b){ + // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript + @if ($b != 0) { + @return gcd($b,$a % $b); + }@else{ + @return abs($a); + } +} + +$colors: ( +primary: ( +base: #00abc9, +light: #daf1f6, +dark: #12799a +), +secondary: ( +base: #424d55, +light: #ccc, +lightest: #efefef, +dark: #404247 +), +success: ( +base: #bbd33e, +light: #eaf0c6 +) +); + +@function color($color, $tone: "base") { +@return map-get(map-get($colors, $color), $tone); +} + +=====================================output===================================== +.foo { + prop: -($grid-gutter-width / 2); + prop1: -($grid-gutter-width / 2); + prop2: -$grid-gutter-width / 2; + prop3: +($grid-gutter-width / 2); + prop4: 10px/8px; /* Plain CSS, no division */ + prop5: $width / 2; /* Uses a variable, does division */ + prop6: round(1.5) / 2; /* Uses a function, does division */ + prop7: (500px / 2); /* Uses parentheses, does division */ + prop8: 5px + 8px / 2px; //* Uses +, does division */ + prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ + prop10: #010203 + #040506; + prop11: #010203 * 2; + prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); + prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); + prop14: e + -resize; + prop15: sans- + "serif"; + prop16: 1em + (2em * 3); + prop17: rotate(-2deg); + prop18: rotate(-2deg); + _: _; + prop19: 10 - ($grid-gutter-width / 2); + prop20: 10 + -($grid-gutter-width / 2); + prop21: 10 + -($grid-gutter-width / 2); + prop22: -($grid-gutter-width / 2); + prop23: -($grid-gutter-width / 2); + prop24: -$grid-gutter-width; + prop25: +($grid-gutter-width / 2); + prop26: +($grid-gutter-width / 2); + prop27: +$grid-gutter-width; + prop28: --($grid-gutter-width / 2); + prop28: ++($grid-gutter-width / 2); + prop29: rotate(-2deg); +} + +$last: nth($juggler, length($juggler)); +$x: if($last%2==0, 1/2, 3/2); +$new: pow($last, $x); +$sequence: + 1, + 1 1, + 2 1, + 1 2 1 1, + 1 1 1 2 2 1; +$new-entry: (); +$new-entry: (); +$new-entry: (); +$new-entry: (); + +body:before { + content: quote(to-string(fibonacci(100), " \\A ")); + white-space: pre-wrap; +} + +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); + +a:nth-child(#{$numPerRow}n) { + margin-right: 0; + margin-bottom: 0; +} + +@function em($pixels, $context: $browser-context) { + @return #{$pixels / $context}em; +} + +.navigation { + @extend %updated-#{$flag}; + @extend .selected-#{$flag}; + @extend %#{$item}; +} + +.icon-#{$icon-name} { + background-image: "/images/#{$icon-name}.svg"; +} + +$extmods: ( + eot: "?", + svg: "#" + str-replace($name, " ", "_"), +); + +@mixin keyframes { + @-moz-keyframes { + @content; + } + @-webkit-keyframes { + @content; + } +} + +@function gcd($a, $b) { + // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript + @if ($b != 0) { + @return gcd($b, $a % $b); + } @else { + @return abs($a); + } +} + +$colors: ( + primary: ( + base: #00abc9, + light: #daf1f6, + dark: #12799a, + ), + secondary: ( + base: #424d55, + light: #ccc, + lightest: #efefef, + dark: #404247, + ), + success: ( + base: #bbd33e, + light: #eaf0c6, + ), +); + +@function color($color, $tone: "base") { + @return map-get(map-get($colors, $color), $tone); +} + +================================================================================ +`; + +exports[`3945.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== + +.foo { + prop: -($grid-gutter-width / 2); + prop1: -( $grid-gutter-width / 2 ); + prop2: -$grid-gutter-width / 2; + prop3: +($grid-gutter-width / 2); + prop4: 10px/8px; /* Plain CSS, no division */ + prop5: $width / 2; /* Uses a variable, does division */ + prop6: round(1.5) / 2; /* Uses a function, does division */ + prop7: (500px / 2); /* Uses parentheses, does division */ + prop8: 5px + 8px / 2px; //* Uses +, does division */ + prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ + prop10: #010203 + #040506; + prop11: #010203 * 2; + prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); + prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); + prop14: e + -resize; + prop15: sans- + "serif"; + prop16: 1em + (2em * 3); + prop17: rotate(-2deg); + prop18: rotate( -2deg ) ; + _:_; + prop19: 10 - ($grid-gutter-width / 2); + prop20: 10 + -($grid-gutter-width / 2); + prop21: 10 + - ( $grid-gutter-width / 2 ) ; + prop22: - ( $grid-gutter-width / 2 ) ; + prop23: - ( $grid-gutter-width / 2 ) ; + prop24: -$grid-gutter-width; + prop25: + ( $grid-gutter-width / 2 ) ; + prop26: + ( $grid-gutter-width / 2 ) ; + prop27: +$grid-gutter-width; + prop28: --($grid-gutter-width / 2); + prop28: ++($grid-gutter-width / 2); + prop29: rotate( - 2deg ) ; +} + +$last:nth($juggler,length($juggler)); +$x:if($last%2==0,1/2,3/2); +$new:pow($last,$x); +$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; +$new-entry:(); +$new-entry : ( ) ; +$new-entry : ( ) ; +$new-entry +: +( +) +; + +body:before { + content: quote(to-string(fibonacci(100), ' \\A ')); + white-space: pre-wrap; +} + +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); +width +: +( +( +100% +- +( +( +$numPerRow +- +1 +) +* +$margin +) +) +/ +$numPerRow +) +; + +a:nth-child(#{$numPerRow}n) { + margin-right: 0; + margin-bottom: 0; +} + +@function em($pixels, $context: $browser-context) { + @return #{ $pixels / $context }em +} + +.navigation { + @extend %updated-#{$flag}; + @extend .selected-#{$flag}; + @extend %#{$item}; +} + +.icon-#{$icon-name} { + background-image: '/images/#{$icon-name}.svg'; +} + +$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); + +@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} + +@function gcd($a,$b){ + // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript + @if ($b != 0) { + @return gcd($b,$a % $b); + }@else{ + @return abs($a); + } +} + +$colors: ( +primary: ( +base: #00abc9, +light: #daf1f6, +dark: #12799a +), +secondary: ( +base: #424d55, +light: #ccc, +lightest: #efefef, +dark: #404247 +), +success: ( +base: #bbd33e, +light: #eaf0c6 +) +); + +@function color($color, $tone: "base") { +@return map-get(map-get($colors, $color), $tone); +} + +=====================================output===================================== +.foo { + prop: -($grid-gutter-width / 2); + prop1: -($grid-gutter-width / 2); + prop2: -$grid-gutter-width / 2; + prop3: +($grid-gutter-width / 2); + prop4: 10px/8px; /* Plain CSS, no division */ + prop5: $width / 2; /* Uses a variable, does division */ + prop6: round(1.5) / 2; /* Uses a function, does division */ + prop7: (500px / 2); /* Uses parentheses, does division */ + prop8: 5px + 8px / 2px; //* Uses +, does division */ + prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ + prop10: #010203 + #040506; + prop11: #010203 * 2; + prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); + prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); + prop14: e + -resize; + prop15: sans- + "serif"; + prop16: 1em + (2em * 3); + prop17: rotate(-2deg); + prop18: rotate(-2deg); + _: _; + prop19: 10 - ($grid-gutter-width / 2); + prop20: 10 + -($grid-gutter-width / 2); + prop21: 10 + -($grid-gutter-width / 2); + prop22: -($grid-gutter-width / 2); + prop23: -($grid-gutter-width / 2); + prop24: -$grid-gutter-width; + prop25: +($grid-gutter-width / 2); + prop26: +($grid-gutter-width / 2); + prop27: +$grid-gutter-width; + prop28: --($grid-gutter-width / 2); + prop28: ++($grid-gutter-width / 2); + prop29: rotate(-2deg); +} + +$last: nth($juggler, length($juggler)); +$x: if($last%2==0, 1/2, 3/2); +$new: pow($last, $x); +$sequence: + 1, + 1 1, + 2 1, + 1 2 1 1, + 1 1 1 2 2 1; +$new-entry: (); +$new-entry: (); +$new-entry: (); +$new-entry: (); + +body:before { + content: quote(to-string(fibonacci(100), " \\A ")); + white-space: pre-wrap; +} + +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); +width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); + +a:nth-child(#{$numPerRow}n) { + margin-right: 0; + margin-bottom: 0; +} + +@function em($pixels, $context: $browser-context) { + @return #{$pixels / $context}em; +} + +.navigation { + @extend %updated-#{$flag}; + @extend .selected-#{$flag}; + @extend %#{$item}; +} + +.icon-#{$icon-name} { + background-image: "/images/#{$icon-name}.svg"; +} + +$extmods: ( + eot: "?", + svg: "#" + str-replace($name, " ", "_") +); + +@mixin keyframes { + @-moz-keyframes { + @content; + } + @-webkit-keyframes { + @content; + } +} + +@function gcd($a, $b) { + // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript + @if ($b != 0) { + @return gcd($b, $a % $b); + } @else { + @return abs($a); + } +} + +$colors: ( + primary: ( + base: #00abc9, + light: #daf1f6, + dark: #12799a + ), + secondary: ( + base: #424d55, + light: #ccc, + lightest: #efefef, + dark: #404247 + ), + success: ( + base: #bbd33e, + light: #eaf0c6 + ) +); + +@function color($color, $tone: "base") { + @return map-get(map-get($colors, $color), $tone); +} + +================================================================================ +`; diff --git a/tests/format/scss/math/format.test.js b/tests/format/scss/math/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/math/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/mixin/4635.scss b/tests/format/scss/mixin/4635.scss new file mode 100644 index 000000000000..b36c697ce4c3 --- /dev/null +++ b/tests/format/scss/mixin/4635.scss @@ -0,0 +1,10 @@ + +@mixin placeholder { + &::placeholder {@content} +} + +.container { + @include placeholder { + color: $color-silver; + } +} diff --git a/tests/format/scss/mixin/5208.scss b/tests/format/scss/mixin/5208.scss new file mode 100644 index 000000000000..5f8aa0d4ad47 --- /dev/null +++ b/tests/format/scss/mixin/5208.scss @@ -0,0 +1,8 @@ +// Ignore escape "\" in SCSS mixins +@mixin margin-bottom-1\/3 { + margin-bottom: 0.8rem; +} + +label { + @include margin-bottom-1\/3; +} diff --git a/tests/format/scss/mixin/__snapshots__/format.test.js.snap b/tests/format/scss/mixin/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..fd04e3de10aa --- /dev/null +++ b/tests/format/scss/mixin/__snapshots__/format.test.js.snap @@ -0,0 +1,127 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`4635.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== + +@mixin placeholder { + &::placeholder {@content} +} + +.container { + @include placeholder { + color: $color-silver; + } +} + +=====================================output===================================== +@mixin placeholder { + &::placeholder { + @content; + } +} + +.container { + @include placeholder { + color: $color-silver; + } +} + +================================================================================ +`; + +exports[`4635.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== + +@mixin placeholder { + &::placeholder {@content} +} + +.container { + @include placeholder { + color: $color-silver; + } +} + +=====================================output===================================== +@mixin placeholder { + &::placeholder { + @content; + } +} + +.container { + @include placeholder { + color: $color-silver; + } +} + +================================================================================ +`; + +exports[`5208.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// Ignore escape "\\" in SCSS mixins +@mixin margin-bottom-1\\/3 { + margin-bottom: 0.8rem; +} + +label { + @include margin-bottom-1\\/3; +} + +=====================================output===================================== +// Ignore escape "\\" in SCSS mixins +@mixin margin-bottom-1\\/3 { + margin-bottom: 0.8rem; +} + +label { + @include margin-bottom-1\\/3; +} + +================================================================================ +`; + +exports[`5208.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +// Ignore escape "\\" in SCSS mixins +@mixin margin-bottom-1\\/3 { + margin-bottom: 0.8rem; +} + +label { + @include margin-bottom-1\\/3; +} + +=====================================output===================================== +// Ignore escape "\\" in SCSS mixins +@mixin margin-bottom-1\\/3 { + margin-bottom: 0.8rem; +} + +label { + @include margin-bottom-1\\/3; +} + +================================================================================ +`; diff --git a/tests/format/scss/mixin/format.test.js b/tests/format/scss/mixin/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/mixin/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/no-semicolon/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/no-semicolon/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/scss/no-semicolon/__snapshots__/jsfmt.spec.js.snap rename to tests/format/scss/no-semicolon/__snapshots__/format.test.js.snap diff --git a/tests/format/scss/no-semicolon/format.test.js b/tests/format/scss/no-semicolon/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/no-semicolon/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/no-semicolon/jsfmt.spec.js b/tests/format/scss/no-semicolon/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/no-semicolon/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/parens/__snapshots__/format.test.js.snap b/tests/format/scss/parens/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..78538de5fd1d --- /dev/null +++ b/tests/format/scss/parens/__snapshots__/format.test.js.snap @@ -0,0 +1,571 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`2.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$icons: ( + cal-day-group: + ( + left: 253, + top: 73, + ), + + + /* Should preserve empty lines */ + cal-week-group: + ( + left: 1, + top: 169, + ) +); + +=====================================output===================================== +$icons: ( + cal-day-group: ( + left: 253, + top: 73, + ), + + /* Should preserve empty lines */ + cal-week-group: ( + left: 1, + top: 169, + ), +); + +================================================================================ +`; + +exports[`issue-16594.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== + @if true { + $newKey: ($key: ( $theme-name: $value )) + } + +=====================================output===================================== +@if true { + $newKey: ( + $key: ( + $theme-name: $value, + ), + ); +} + +================================================================================ +`; + +exports[`parens.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +a { + prop1: func(1px,1px,1px,func(1px,1px,1px,func(1px,1px,1px))); + prop2: func( 1px ,1px ,1px ,func( 1px ,1px ,1px ,func( 1px ,1px ,1px ) ) ); + prop3: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop4: func( 1px , 1px , 1px , func( 1px , 1px , 1px , func( 1px , 1px , 1px ) ) ); + prop5: func( 1px , 1px , 1px , func( 1px , 1px , 1px , func( 1px , 1px , 1px ) ) ); + prop6: func( + 1px + , + 1px + , + 1px + , + func( + 1px + , + 1px + , + 1px + , + func( + 1px + , + 1px + , + 1px + ) + ) + ); + prop7: + func( + 1px + , + 1px + , + 1px + , + func( + 1px + , + 1px + , + 1px + , + func( + 1px + , + 1px + , + 1px + ) + ) + ); + prop8: very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px,very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px,very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px))); + prop9: very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px , very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px , very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px ) ) ); + prop10: + very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px + , + very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px + ) + ) + ); + prop11: very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px + , + very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px + , + 1px + , + 1px + ) + ) + ); +} + +a { + box-shadow: inset 0 $size $size (-$size) black; + width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); + padding-right: (100% * $info-width / (1 - $image-width)); + padding-bottom: + ( + 100% * + $image-height / ($image-width-responsive + $image-margin-responsive * 2) + ); +} + +.foo { + --paddingC: calc( var( --widthB ) / 2 ); + content: attr( data-title ); + color: var( --main-bg-color ); + background-color: rgb( 255, 0, 0 ); + background: element( #css-source ); + width: calc( 100% - ( #{var(--g-spacing)} - #{$iframe-x-padding} ) * 2 ); + padding-bottom: + ( + 100% * + $image-height / ( $image-width-responsive + $image-margin-responsive * 2 ) + ); + padding-top: var( --paddingC ); + margin: 1*1 (1)*1 1*(1) (1)*(1); + prop: -1*-1 -(-1)*-1 -1*-(-1) -(-1)*-(-1); + prop1: #{($m)*(10)}; + prop2: #{$m * 10}; + prop3: #{-(-$m)*-(-10)}; + prop4: +1; + prop5: -1; + prop6: word + 1; /* word1 */ + prop7: word - 1; /* word-1 */ + prop8: +1 +1 +1 +1; /* +1 +1 +1 +1 */ + prop9: -1 -1 -1 -1; /* -1 -1 -1 -1 */ + prop10: (-1); + prop11: (+1); + prop12: 10px/8px; + prop13: round(1.5)/2 round(1.5) /2 round(1.5)/ 2 round(1.5) / 2; + prop14: 2/round(1.5) 2 /round(1.5) 2/ round(1.5) 2 / round(1.5); + prop15: (round(1.5)/2) (round(1.5) /2) (round(1.5)/ 2) (round(1.5) / 2); + prop16: (2/round(1.5)) (2 /round(1.5)) (2/ round(1.5)) (2 / round(1.5)); + prop17: $width/2 $width /2 $width/ 2 $width / 2; + prop18: 2/$width 2 /$width 2/ $width 2 / $width; + prop19: ($width/2) ($width /2) ($width/ 2) ($width / 2); + prop20: (2/$width) (2 /$width) (2/ $width) (2 / $width); + prop21: @width/2 @width /2 @width/ 2 @width / 2; + prop22: 2/@width 2 /@width 2/ @width 2 / @width; + prop23: (@width/2) (@width /2) (@width/ 2) (@width / 2); + prop24: (2/@width) (2 /@width) (2/ @width) (2 / @width); + prop25-1: #{$width}/#{$width} #{$width} /#{$width} #{$width}/ #{$width} #{$width} / #{$width}; + prop25-2: #{$width}*#{$width} #{$width} *#{$width} #{$width}* #{$width} #{$width} * #{$width}; + prop25-3: #{$width}+#{$width} #{$width} +#{$width} #{$width}+ #{$width} #{$width} + #{$width}; + prop25-4: #{$width}-#{$width} #{$width} -#{$width} #{$width}- #{$width} #{$width} - #{$width}; + prop26: 8px/2px 8px /1 1/ 2px 1 / 2; + prop27: 8px/2px 8px/1 1/2px 1/2; + prop28: 8px / 2px 8px / 1 1 / 2px 1 / 2; + prop29: (8px/2px) (8px/1) (1/2px) (1/2); + prop30: (8px / 2px) (8px / 1) (1 / 2px) (1 / 2); + prop31: (#{$width}/2px) (8px/#{$width}) (#{$width} / 2px) (8px / #{$width}); + prop32: func(8px/2); + prop33: 5px + 8px/2px; + prop34: func(+20px, + 20px); + prop35: 1+1+1+1; + prop36: 1 + 1 + 1 + 1; + prop37: 1 +1 1 +1; + prop38: ++1; + prop39: ++(1); + prop40: --1; + prop41: --(1); + prop42: 1px+1px+1px+1px; + prop43: 1px + 1px + 1px + 1px; + prop44: -1+-1 -(-1)+-1 -1+-(-1) -(-1)+-(-1); + prop45: round(1.5)*2 round(1.5) *2 round(1.5)* 2 round(1.5) * 2; + prop46: 2*round(1.5) 2 *round(1.5) 2* round(1.5) 2 * round(1.5); + prop47: (round(1.5)*2) (round(1.5) *2) (round(1.5)* 2) (round(1.5) * 2); + prop48: (2*round(1.5)) (2 *round(1.5)) (2* round(1.5)) (2 * round(1.5)); + prop49: $width*2 $width *2 $width* 2 $width * 2; + prop50: 2*$width 2 *$width 2* $width 2 * $width; + prop51: ($width*2) ($width *2) ($width* 2) ($width * 2); + prop52: (2*$width) (2 *$width) (2* $width) (2 * $width); + prop57: round(1.5)+2 round(1.5) +2 round(1.5)+ 2 round(1.5) + 2; + prop58: 2+round(1.5) 2 +round(1.5) 2+ round(1.5) 2 + round(1.5); + prop59: (round(1.5)+2) (round(1.5) +2) (round(1.5)+ 2) (round(1.5) + 2); + prop60: (2+round(1.5)) (2 +round(1.5)) (2+ round(1.5)) (2 + round(1.5)); + prop61: $width+2 $width +2 $width+ 2 $width + 2; + prop62: 2+$width 2 +$width 2+ $width 2 + $width; + prop63: ($width+2) ($width +2) ($width+ 2) ($width + 2); + prop64: (2+$width) (2 +$width) (2+ $width) (2 + $width); + prop69: "test"+1 "test" +1 "test"+ 1 "test" + 1; + prop70: 1+"test" 1 +"test" 1+ "test" 1 + "test"; + prop71: "test"-1 "test" -1 "test"- 1 "test" - 1; + prop72: 1-"test" 1 -"test" 1- "test" 1 - "test"; + prop73: calc(100%*2px) calc(100% *2px) calc(100%* 2px) calc(100% * 2px); + prop74: calc(100%/2px) calc(100% /2px) calc(100%/ 2px) calc(100% / 2px); + prop75: calc(100%+2px) calc(100% +2px) calc(100%+ 2px) calc(100% + 2px); + prop76: calc(100%-2px) calc(100% -2px) calc(100%- 2px) calc(100% - 2px); + prop77: calc(-5px); + prop78: calc(+5px); + prop79: calc(-100px + 100px); + prop80: calc(+100px + 100px); + prop81: calc(100px - 100px); + prop82: calc(100px + 100px); +} + +.bar { + prop1: attr(data-foo); + prop2: attr( data-foo ); + prop3: attr( data-foo ); + prop4: attr( + data-foo + ); + prop5: attr( + data-foo + ); + prop6: + attr(data-foo); + prop7: + attr( + data-foo + ); + prop8: + attr( + data-foo + ) + ; + prop9:"("attr(title)")"; + prop10: "(" attr( title ) ")"; + prop11: "(" attr( title ) ")"; + prop12: "(" + attr(title) + ")"; + prop13: + "(" + attr(title) + ")"; + prop14: + "(" + attr( + title + ) + ")"; + prop15: + "(" + attr( + title + ) + ")" + ; + prop16: attr(length em); + prop17: attr(length em); + prop18: attr(length em); + prop19: attr( + length + em + ); + prop20:attr(data-size em,20); + prop21: attr( data-size em , 20 ); + prop22: attr( data-size em , 20 ); + prop23: attr( + data-size em, + 20 + ); + prop24: + attr( + data-size em, + 20 + ); + prop25: + attr( + data-size + em, + 20 + ) + ; +} + +.bar { + filter: progid:DXImageTransform.Microsoft.gradient(enabled='false',startColorstr='#fff',endColorstr='#000'); + filter: progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=45, Strength=6) progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=135, Strength=6); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907)"; +} + +.unicode-ranges +{ + /* <unicode-range> values */ + unicode-range: U+26; /* single codepoint */ + unicode-range: U+0-7F; + unicode-range: U+0025-00FF; /* codepoint range */ + unicode-range: U+4??; /* wildcard range */ + unicode-range: U+0025-00FF, U+4??; /* multiple values */ +} + +=====================================output===================================== +a { + prop1: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop2: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop3: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop4: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop5: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop6: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop7: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); + prop8: very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) + ) + ); + prop9: very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) + ) + ); + prop10: very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) + ) + ); + prop11: very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func( + 1px, + 1px, + 1px, + very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) + ) + ); +} + +a { + box-shadow: inset 0 $size $size (-$size) black; + width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); + padding-right: (100% * $info-width / (1 - $image-width)); + padding-bottom: ( + 100% * $image-height / + ($image-width-responsive + $image-margin-responsive * 2) + ); +} + +.foo { + --paddingC: calc(var(--widthB) / 2); + content: attr(data-title); + color: var(--main-bg-color); + background-color: rgb(255, 0, 0); + background: element(#css-source); + width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); + padding-bottom: ( + 100% * $image-height / + ($image-width-responsive + $image-margin-responsive * 2) + ); + padding-top: var(--paddingC); + margin: 1 * 1 (1) * 1 1 * (1) (1) * (1); + prop: -1 * -1 -(-1) * -1 -1 * -(-1) -(-1) * -(-1); + prop1: #{($m) * (10)}; + prop2: #{$m * 10}; + prop3: #{-(-$m) * -(-10)}; + prop4: +1; + prop5: -1; + prop6: word + 1; /* word1 */ + prop7: word - 1; /* word-1 */ + prop8: +1 +1 +1 +1; /* +1 +1 +1 +1 */ + prop9: -1 -1 -1 -1; /* -1 -1 -1 -1 */ + prop10: (-1); + prop11: (+1); + prop12: 10px/8px; + prop13: round(1.5) / 2 round(1.5) / 2 round(1.5) / 2 round(1.5) / 2; + prop14: 2 / round(1.5) 2 / round(1.5) 2 / round(1.5) 2 / round(1.5); + prop15: (round(1.5) / 2) (round(1.5) / 2) (round(1.5) / 2) (round(1.5) / 2); + prop16: (2 / round(1.5)) (2 / round(1.5)) (2 / round(1.5)) (2 / round(1.5)); + prop17: $width/2 $width / 2 $width/ 2 $width / 2; + prop18: 2 / $width 2 / $width 2 / $width 2 / $width; + prop19: ($width/2) ($width / 2) ($width/ 2) ($width / 2); + prop20: (2 / $width) (2 / $width) (2 / $width) (2 / $width); + prop21: @width / 2 @width / 2 @width / 2 @width / 2; + prop22: 2 / @width 2 / @width 2 / @width 2 / @width; + prop23: (@width / 2) (@width / 2) (@width / 2) (@width / 2); + prop24: (2 / @width) (2 / @width) (2 / @width) (2 / @width); + prop25-1: #{$width}/#{$width} #{$width} /#{$width} #{$width}/ #{$width} + #{$width} / #{$width}; + prop25-2: #{$width}*#{$width} #{$width} *#{$width} #{$width}* #{$width} + #{$width} * #{$width}; + prop25-3: #{$width}+#{$width} #{$width} +#{$width} #{$width}+ #{$width} + #{$width} + #{$width}; + prop25-4: #{$width}-#{$width} #{$width} -#{$width} #{$width}- #{$width} + #{$width} - #{$width}; + prop26: 8px/2px 8px /1 1/ 2px 1 / 2; + prop27: 8px/2px 8px/1 1/2px 1/2; + prop28: 8px / 2px 8px / 1 1 / 2px 1 / 2; + prop29: (8px/2px) (8px/1) (1/2px) (1/2); + prop30: (8px / 2px) (8px / 1) (1 / 2px) (1 / 2); + prop31: (#{$width}/ 2px) (8px /#{$width}) (#{$width} / 2px) (8px / #{$width}); + prop32: func(8px/2); + prop33: 5px + 8px/2px; + prop34: func(+20px, +20px); + prop35: 1+1+1+1; + prop36: 1 + 1 + 1 + 1; + prop37: 1 +1 1 +1; + prop38: ++1; + prop39: ++(1); + prop40: --1; + prop41: --(1); + prop42: 1px+1px+1px+1px; + prop43: 1px + 1px + 1px + 1px; + prop44: -1+-1 -(-1)+-1 -1+-(-1) -(-1)+-(-1); + prop45: round(1.5) * 2 round(1.5) * 2 round(1.5) * 2 round(1.5) * 2; + prop46: 2 * round(1.5) 2 * round(1.5) 2 * round(1.5) 2 * round(1.5); + prop47: (round(1.5) * 2) (round(1.5) * 2) (round(1.5) * 2) (round(1.5) * 2); + prop48: (2 * round(1.5)) (2 * round(1.5)) (2 * round(1.5)) (2 * round(1.5)); + prop49: $width * 2 $width * 2 $width * 2 $width * 2; + prop50: 2 * $width 2 * $width 2 * $width 2 * $width; + prop51: ($width * 2) ($width * 2) ($width * 2) ($width * 2); + prop52: (2 * $width) (2 * $width) (2 * $width) (2 * $width); + prop57: round(1.5) + 2 round(1.5) + 2 round(1.5) + 2 round(1.5) + 2; + prop58: 2 + round(1.5) 2 + round(1.5) 2 + round(1.5) 2 + round(1.5); + prop59: (round(1.5) + 2) (round(1.5) + 2) (round(1.5) + 2) (round(1.5) + 2); + prop60: (2 + round(1.5)) (2 + round(1.5)) (2 + round(1.5)) (2 + round(1.5)); + prop61: $width + 2 $width + 2 $width + 2 $width + 2; + prop62: 2 + $width 2 + $width 2 + $width 2 + $width; + prop63: ($width + 2) ($width + 2) ($width + 2) ($width + 2); + prop64: (2 + $width) (2 + $width) (2 + $width) (2 + $width); + prop69: "test"+1 "test" +1 "test"+ 1 "test" + 1; + prop70: 1+"test" 1 +"test" 1+ "test" 1 + "test"; + prop71: "test"-1 "test" -1 "test"- 1 "test" - 1; + prop72: 1-"test" 1 -"test" 1- "test" 1 - "test"; + prop73: calc(100% * 2px) calc(100% * 2px) calc(100% * 2px) calc(100% * 2px); + prop74: calc(100% / 2px) calc(100% / 2px) calc(100% / 2px) calc(100% / 2px); + prop75: calc(100%+2px) calc(100% +2px) calc(100%+ 2px) calc(100% + 2px); + prop76: calc(100%-2px) calc(100% -2px) calc(100%- 2px) calc(100% - 2px); + prop77: calc(-5px); + prop78: calc(+5px); + prop79: calc(-100px + 100px); + prop80: calc(+100px + 100px); + prop81: calc(100px - 100px); + prop82: calc(100px + 100px); +} + +.bar { + prop1: attr(data-foo); + prop2: attr(data-foo); + prop3: attr(data-foo); + prop4: attr(data-foo); + prop5: attr(data-foo); + prop6: attr(data-foo); + prop7: attr(data-foo); + prop8: attr(data-foo); + prop9: "(" attr(title) ")"; + prop10: "(" attr(title) ")"; + prop11: "(" attr(title) ")"; + prop12: "(" attr(title) ")"; + prop13: "(" attr(title) ")"; + prop14: "(" attr(title) ")"; + prop15: "(" attr(title) ")"; + prop16: attr(length em); + prop17: attr(length em); + prop18: attr(length em); + prop19: attr(length em); + prop20: attr(data-size em, 20); + prop21: attr(data-size em, 20); + prop22: attr(data-size em, 20); + prop23: attr(data-size em, 20); + prop24: attr(data-size em, 20); + prop25: attr(data-size em, 20); +} + +.bar { + filter: progid:DXImageTransform.Microsoft.gradient(enabled='false',startColorstr='#fff',endColorstr='#000'); + filter: progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=45, Strength=6) progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=135, Strength=6); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907)"; +} + +.unicode-ranges { + /* <unicode-range> values */ + unicode-range: U+26; /* single codepoint */ + unicode-range: U+0-7F; + unicode-range: U+0025-00FF; /* codepoint range */ + unicode-range: U+4??; /* wildcard range */ + unicode-range: U+0025-00FF, U+4??; /* multiple values */ +} + +================================================================================ +`; diff --git a/tests/format/scss/parens/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/parens/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e920d1c99aa8..000000000000 --- a/tests/format/scss/parens/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,549 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`2.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$icons: ( - cal-day-group: - ( - left: 253, - top: 73, - ), - - - /* Should preserve empty lines */ - cal-week-group: - ( - left: 1, - top: 169, - ) -); - -=====================================output===================================== -$icons: ( - cal-day-group: ( - left: 253, - top: 73, - ), - - /* Should preserve empty lines */ cal-week-group: - ( - left: 1, - top: 169, - ), -); - -================================================================================ -`; - -exports[`parens.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { - prop1: func(1px,1px,1px,func(1px,1px,1px,func(1px,1px,1px))); - prop2: func( 1px ,1px ,1px ,func( 1px ,1px ,1px ,func( 1px ,1px ,1px ) ) ); - prop3: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop4: func( 1px , 1px , 1px , func( 1px , 1px , 1px , func( 1px , 1px , 1px ) ) ); - prop5: func( 1px , 1px , 1px , func( 1px , 1px , 1px , func( 1px , 1px , 1px ) ) ); - prop6: func( - 1px - , - 1px - , - 1px - , - func( - 1px - , - 1px - , - 1px - , - func( - 1px - , - 1px - , - 1px - ) - ) - ); - prop7: - func( - 1px - , - 1px - , - 1px - , - func( - 1px - , - 1px - , - 1px - , - func( - 1px - , - 1px - , - 1px - ) - ) - ); - prop8: very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px,very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px,very-very-very-very-very-very-vey-very-very-long-func(1px,1px,1px))); - prop9: very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px , very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px , very-very-very-very-very-very-vey-very-very-long-func( 1px , 1px , 1px ) ) ); - prop10: - very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px - , - very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px - ) - ) - ); - prop11: very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px - , - very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px - , - 1px - , - 1px - ) - ) - ); -} - -a { - box-shadow: inset 0 $size $size (-$size) black; - width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); - padding-right: (100% * $info-width / (1 - $image-width)); - padding-bottom: - ( - 100% * - $image-height / ($image-width-responsive + $image-margin-responsive * 2) - ); -} - -.foo { - --paddingC: calc( var( --widthB ) / 2 ); - content: attr( data-title ); - color: var( --main-bg-color ); - background-color: rgb( 255, 0, 0 ); - background: element( #css-source ); - width: calc( 100% - ( #{var(--g-spacing)} - #{$iframe-x-padding} ) * 2 ); - padding-bottom: - ( - 100% * - $image-height / ( $image-width-responsive + $image-margin-responsive * 2 ) - ); - padding-top: var( --paddingC ); - margin: 1*1 (1)*1 1*(1) (1)*(1); - prop: -1*-1 -(-1)*-1 -1*-(-1) -(-1)*-(-1); - prop1: #{($m)*(10)}; - prop2: #{$m * 10}; - prop3: #{-(-$m)*-(-10)}; - prop4: +1; - prop5: -1; - prop6: word + 1; /* word1 */ - prop7: word - 1; /* word-1 */ - prop8: +1 +1 +1 +1; /* +1 +1 +1 +1 */ - prop9: -1 -1 -1 -1; /* -1 -1 -1 -1 */ - prop10: (-1); - prop11: (+1); - prop12: 10px/8px; - prop13: round(1.5)/2 round(1.5) /2 round(1.5)/ 2 round(1.5) / 2; - prop14: 2/round(1.5) 2 /round(1.5) 2/ round(1.5) 2 / round(1.5); - prop15: (round(1.5)/2) (round(1.5) /2) (round(1.5)/ 2) (round(1.5) / 2); - prop16: (2/round(1.5)) (2 /round(1.5)) (2/ round(1.5)) (2 / round(1.5)); - prop17: $width/2 $width /2 $width/ 2 $width / 2; - prop18: 2/$width 2 /$width 2/ $width 2 / $width; - prop19: ($width/2) ($width /2) ($width/ 2) ($width / 2); - prop20: (2/$width) (2 /$width) (2/ $width) (2 / $width); - prop21: @width/2 @width /2 @width/ 2 @width / 2; - prop22: 2/@width 2 /@width 2/ @width 2 / @width; - prop23: (@width/2) (@width /2) (@width/ 2) (@width / 2); - prop24: (2/@width) (2 /@width) (2/ @width) (2 / @width); - prop25-1: #{$width}/#{$width} #{$width} /#{$width} #{$width}/ #{$width} #{$width} / #{$width}; - prop25-2: #{$width}*#{$width} #{$width} *#{$width} #{$width}* #{$width} #{$width} * #{$width}; - prop25-3: #{$width}+#{$width} #{$width} +#{$width} #{$width}+ #{$width} #{$width} + #{$width}; - prop25-4: #{$width}-#{$width} #{$width} -#{$width} #{$width}- #{$width} #{$width} - #{$width}; - prop26: 8px/2px 8px /1 1/ 2px 1 / 2; - prop27: 8px/2px 8px/1 1/2px 1/2; - prop28: 8px / 2px 8px / 1 1 / 2px 1 / 2; - prop29: (8px/2px) (8px/1) (1/2px) (1/2); - prop30: (8px / 2px) (8px / 1) (1 / 2px) (1 / 2); - prop31: (#{$width}/2px) (8px/#{$width}) (#{$width} / 2px) (8px / #{$width}); - prop32: func(8px/2); - prop33: 5px + 8px/2px; - prop34: func(+20px, + 20px); - prop35: 1+1+1+1; - prop36: 1 + 1 + 1 + 1; - prop37: 1 +1 1 +1; - prop38: ++1; - prop39: ++(1); - prop40: --1; - prop41: --(1); - prop42: 1px+1px+1px+1px; - prop43: 1px + 1px + 1px + 1px; - prop44: -1+-1 -(-1)+-1 -1+-(-1) -(-1)+-(-1); - prop45: round(1.5)*2 round(1.5) *2 round(1.5)* 2 round(1.5) * 2; - prop46: 2*round(1.5) 2 *round(1.5) 2* round(1.5) 2 * round(1.5); - prop47: (round(1.5)*2) (round(1.5) *2) (round(1.5)* 2) (round(1.5) * 2); - prop48: (2*round(1.5)) (2 *round(1.5)) (2* round(1.5)) (2 * round(1.5)); - prop49: $width*2 $width *2 $width* 2 $width * 2; - prop50: 2*$width 2 *$width 2* $width 2 * $width; - prop51: ($width*2) ($width *2) ($width* 2) ($width * 2); - prop52: (2*$width) (2 *$width) (2* $width) (2 * $width); - prop57: round(1.5)+2 round(1.5) +2 round(1.5)+ 2 round(1.5) + 2; - prop58: 2+round(1.5) 2 +round(1.5) 2+ round(1.5) 2 + round(1.5); - prop59: (round(1.5)+2) (round(1.5) +2) (round(1.5)+ 2) (round(1.5) + 2); - prop60: (2+round(1.5)) (2 +round(1.5)) (2+ round(1.5)) (2 + round(1.5)); - prop61: $width+2 $width +2 $width+ 2 $width + 2; - prop62: 2+$width 2 +$width 2+ $width 2 + $width; - prop63: ($width+2) ($width +2) ($width+ 2) ($width + 2); - prop64: (2+$width) (2 +$width) (2+ $width) (2 + $width); - prop69: "test"+1 "test" +1 "test"+ 1 "test" + 1; - prop70: 1+"test" 1 +"test" 1+ "test" 1 + "test"; - prop71: "test"-1 "test" -1 "test"- 1 "test" - 1; - prop72: 1-"test" 1 -"test" 1- "test" 1 - "test"; - prop73: calc(100%*2px) calc(100% *2px) calc(100%* 2px) calc(100% * 2px); - prop74: calc(100%/2px) calc(100% /2px) calc(100%/ 2px) calc(100% / 2px); - prop75: calc(100%+2px) calc(100% +2px) calc(100%+ 2px) calc(100% + 2px); - prop76: calc(100%-2px) calc(100% -2px) calc(100%- 2px) calc(100% - 2px); - prop77: calc(-5px); - prop78: calc(+5px); - prop79: calc(-100px + 100px); - prop80: calc(+100px + 100px); - prop81: calc(100px - 100px); - prop82: calc(100px + 100px); -} - -.bar { - prop1: attr(data-foo); - prop2: attr( data-foo ); - prop3: attr( data-foo ); - prop4: attr( - data-foo - ); - prop5: attr( - data-foo - ); - prop6: - attr(data-foo); - prop7: - attr( - data-foo - ); - prop8: - attr( - data-foo - ) - ; - prop9:"("attr(title)")"; - prop10: "(" attr( title ) ")"; - prop11: "(" attr( title ) ")"; - prop12: "(" - attr(title) - ")"; - prop13: - "(" - attr(title) - ")"; - prop14: - "(" - attr( - title - ) - ")"; - prop15: - "(" - attr( - title - ) - ")" - ; - prop16: attr(length em); - prop17: attr(length em); - prop18: attr(length em); - prop19: attr( - length - em - ); - prop20:attr(data-size em,20); - prop21: attr( data-size em , 20 ); - prop22: attr( data-size em , 20 ); - prop23: attr( - data-size em, - 20 - ); - prop24: - attr( - data-size em, - 20 - ); - prop25: - attr( - data-size - em, - 20 - ) - ; -} - -.bar { - filter: progid:DXImageTransform.Microsoft.gradient(enabled='false',startColorstr='#fff',endColorstr='#000'); - filter: progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=45, Strength=6) progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=135, Strength=6); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907)"; -} - -.unicode-ranges -{ - /* <unicode-range> values */ - unicode-range: U+26; /* single codepoint */ - unicode-range: U+0-7F; - unicode-range: U+0025-00FF; /* codepoint range */ - unicode-range: U+4??; /* wildcard range */ - unicode-range: U+0025-00FF, U+4??; /* multiple values */ -} - -=====================================output===================================== -a { - prop1: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop2: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop3: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop4: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop5: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop6: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop7: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px))); - prop8: very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) - ) - ); - prop9: very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) - ) - ); - prop10: very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) - ) - ); - prop11: very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func( - 1px, - 1px, - 1px, - very-very-very-very-very-very-vey-very-very-long-func(1px, 1px, 1px) - ) - ); -} - -a { - box-shadow: inset 0 $size $size (-$size) black; - width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); - padding-right: (100% * $info-width / (1 - $image-width)); - padding-bottom: ( - 100% * $image-height / - ($image-width-responsive + $image-margin-responsive * 2) - ); -} - -.foo { - --paddingC: calc(var(--widthB) / 2); - content: attr(data-title); - color: var(--main-bg-color); - background-color: rgb(255, 0, 0); - background: element(#css-source); - width: calc(100% - (#{var(--g-spacing)} - #{$iframe-x-padding}) * 2); - padding-bottom: ( - 100% * $image-height / - ($image-width-responsive + $image-margin-responsive * 2) - ); - padding-top: var(--paddingC); - margin: 1 * 1 (1) * 1 1 * (1) (1) * (1); - prop: -1 * -1 -(-1) * -1 -1 * -(-1) -(-1) * -(-1); - prop1: #{($m) * (10)}; - prop2: #{$m * 10}; - prop3: #{-(-$m) * -(-10)}; - prop4: +1; - prop5: -1; - prop6: word + 1; /* word1 */ - prop7: word - 1; /* word-1 */ - prop8: +1 +1 +1 +1; /* +1 +1 +1 +1 */ - prop9: -1 -1 -1 -1; /* -1 -1 -1 -1 */ - prop10: (-1); - prop11: (+1); - prop12: 10px/8px; - prop13: round(1.5) / 2 round(1.5) / 2 round(1.5) / 2 round(1.5) / 2; - prop14: 2 / round(1.5) 2 / round(1.5) 2 / round(1.5) 2 / round(1.5); - prop15: (round(1.5) / 2) (round(1.5) / 2) (round(1.5) / 2) (round(1.5) / 2); - prop16: (2 / round(1.5)) (2 / round(1.5)) (2 / round(1.5)) (2 / round(1.5)); - prop17: $width/2 $width / 2 $width/ 2 $width / 2; - prop18: 2 / $width 2 / $width 2 / $width 2 / $width; - prop19: ($width/2) ($width / 2) ($width/ 2) ($width / 2); - prop20: (2 / $width) (2 / $width) (2 / $width) (2 / $width); - prop21: @width / 2 @width / 2 @width / 2 @width / 2; - prop22: 2 / @width 2 / @width 2 / @width 2 / @width; - prop23: (@width / 2) (@width / 2) (@width / 2) (@width / 2); - prop24: (2 / @width) (2 / @width) (2 / @width) (2 / @width); - prop25-1: #{$width}/#{$width} #{$width} /#{$width} #{$width}/ #{$width} #{$width} / - #{$width}; - prop25-2: #{$width}*#{$width} #{$width} *#{$width} #{$width}* #{$width} #{$width} * - #{$width}; - prop25-3: #{$width}+#{$width} #{$width} +#{$width} #{$width}+ #{$width} #{$width} + - #{$width}; - prop25-4: #{$width}-#{$width} #{$width} -#{$width} #{$width}- #{$width} #{$width} - - #{$width}; - prop26: 8px/2px 8px /1 1/ 2px 1 / 2; - prop27: 8px/2px 8px/1 1/2px 1/2; - prop28: 8px / 2px 8px / 1 1 / 2px 1 / 2; - prop29: (8px/2px) (8px/1) (1/2px) (1/2); - prop30: (8px / 2px) (8px / 1) (1 / 2px) (1 / 2); - prop31: (#{$width}/ 2px) (8px /#{$width}) (#{$width} / 2px) (8px / #{$width}); - prop32: func(8px/2); - prop33: 5px + 8px/2px; - prop34: func(+20px, +20px); - prop35: 1+1+1+1; - prop36: 1 + 1 + 1 + 1; - prop37: 1 +1 1 +1; - prop38: ++1; - prop39: ++(1); - prop40: --1; - prop41: --(1); - prop42: 1px+1px+1px+1px; - prop43: 1px + 1px + 1px + 1px; - prop44: -1+-1 -(-1)+-1 -1+-(-1) -(-1)+-(-1); - prop45: round(1.5) * 2 round(1.5) * 2 round(1.5) * 2 round(1.5) * 2; - prop46: 2 * round(1.5) 2 * round(1.5) 2 * round(1.5) 2 * round(1.5); - prop47: (round(1.5) * 2) (round(1.5) * 2) (round(1.5) * 2) (round(1.5) * 2); - prop48: (2 * round(1.5)) (2 * round(1.5)) (2 * round(1.5)) (2 * round(1.5)); - prop49: $width * 2 $width * 2 $width * 2 $width * 2; - prop50: 2 * $width 2 * $width 2 * $width 2 * $width; - prop51: ($width * 2) ($width * 2) ($width * 2) ($width * 2); - prop52: (2 * $width) (2 * $width) (2 * $width) (2 * $width); - prop57: round(1.5) + 2 round(1.5) + 2 round(1.5) + 2 round(1.5) + 2; - prop58: 2 + round(1.5) 2 + round(1.5) 2 + round(1.5) 2 + round(1.5); - prop59: (round(1.5) + 2) (round(1.5) + 2) (round(1.5) + 2) (round(1.5) + 2); - prop60: (2 + round(1.5)) (2 + round(1.5)) (2 + round(1.5)) (2 + round(1.5)); - prop61: $width + 2 $width + 2 $width + 2 $width + 2; - prop62: 2 + $width 2 + $width 2 + $width 2 + $width; - prop63: ($width + 2) ($width + 2) ($width + 2) ($width + 2); - prop64: (2 + $width) (2 + $width) (2 + $width) (2 + $width); - prop69: "test"+1 "test" +1 "test"+ 1 "test" + 1; - prop70: 1+"test" 1 +"test" 1+ "test" 1 + "test"; - prop71: "test"-1 "test" -1 "test"- 1 "test" - 1; - prop72: 1-"test" 1 -"test" 1- "test" 1 - "test"; - prop73: calc(100% * 2px) calc(100% * 2px) calc(100% * 2px) calc(100% * 2px); - prop74: calc(100% / 2px) calc(100% / 2px) calc(100% / 2px) calc(100% / 2px); - prop75: calc(100%+2px) calc(100% +2px) calc(100%+ 2px) calc(100% + 2px); - prop76: calc(100%-2px) calc(100% -2px) calc(100%- 2px) calc(100% - 2px); - prop77: calc(-5px); - prop78: calc(+5px); - prop79: calc(-100px + 100px); - prop80: calc(+100px + 100px); - prop81: calc(100px - 100px); - prop82: calc(100px + 100px); -} - -.bar { - prop1: attr(data-foo); - prop2: attr(data-foo); - prop3: attr(data-foo); - prop4: attr(data-foo); - prop5: attr(data-foo); - prop6: attr(data-foo); - prop7: attr(data-foo); - prop8: attr(data-foo); - prop9: "(" attr(title) ")"; - prop10: "(" attr(title) ")"; - prop11: "(" attr(title) ")"; - prop12: "(" attr(title) ")"; - prop13: "(" attr(title) ")"; - prop14: "(" attr(title) ")"; - prop15: "(" attr(title) ")"; - prop16: attr(length em); - prop17: attr(length em); - prop18: attr(length em); - prop19: attr(length em); - prop20: attr(data-size em, 20); - prop21: attr(data-size em, 20); - prop22: attr(data-size em, 20); - prop23: attr(data-size em, 20); - prop24: attr(data-size em, 20); - prop25: attr(data-size em, 20); -} - -.bar { - filter: progid:DXImageTransform.Microsoft.gradient(enabled='false',startColorstr='#fff',endColorstr='#000'); - filter: progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=45, Strength=6) progid:DXImageTransform.Microsoft.Shadow(color='#042b47', Direction=135, Strength=6); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907)"; -} - -.unicode-ranges { - /* <unicode-range> values */ - unicode-range: U+26; /* single codepoint */ - unicode-range: U+0-7F; - unicode-range: U+0025-00FF; /* codepoint range */ - unicode-range: U+4??; /* wildcard range */ - unicode-range: U+0025-00FF, U+4??; /* multiple values */ -} - -================================================================================ -`; diff --git a/tests/format/scss/parens/format.test.js b/tests/format/scss/parens/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/parens/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/parens/issue-16594.scss b/tests/format/scss/parens/issue-16594.scss new file mode 100644 index 000000000000..03e821e872ba --- /dev/null +++ b/tests/format/scss/parens/issue-16594.scss @@ -0,0 +1,3 @@ + @if true { + $newKey: ($key: ( $theme-name: $value )) + } diff --git a/tests/format/scss/parens/jsfmt.spec.js b/tests/format/scss/parens/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/parens/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/quotes/__snapshots__/format.test.js.snap b/tests/format/scss/quotes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..819a51b7ea1f --- /dev/null +++ b/tests/format/scss/quotes/__snapshots__/format.test.js.snap @@ -0,0 +1,184 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`escape-in-string.scss - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +$description: "Lorem ipsum dolor sit \\"amet\\", consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +=====================================output===================================== +$description: 'Lorem ipsum dolor sit "amet", consectetur adipiscing elit, ' + + 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'; + +================================================================================ +`; + +exports[`escape-in-string.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +$description: "Lorem ipsum dolor sit \\"amet\\", consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +=====================================output===================================== +$description: 'Lorem ipsum dolor sit "amet", consectetur adipiscing elit, ' + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +================================================================================ +`; + +exports[`forward-with.scss - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +@forward 'foo.scss' with ($components: red); + +=====================================output===================================== +@forward 'foo.scss' with ( + $components: red +); + +================================================================================ +`; + +exports[`forward-with.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@forward 'foo.scss' with ($components: red); + +=====================================output===================================== +@forward "foo.scss" with ( + $components: red +); + +================================================================================ +`; + +exports[`quotes.scss - {"singleQuote":true} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +singleQuote: true + | printWidth +=====================================input====================================== +@use "library"; + +@use "library" with ( + $black: #222, + $border-radius: 0.1rem, + $font-family: "Helvetica, sans-serif" +); + +@use "library" as *; + +@use "library" as f; + +@use "sass:map"; + +@forward "library"; + +@forward "library" show border, $border-color; + +@forward "library" hide gradient; + +@forward "library" as btn-*; + +@forward "library" as btn*; + +=====================================output===================================== +@use 'library'; + +@use 'library' with ( + $black: #222, + $border-radius: 0.1rem, + $font-family: 'Helvetica, sans-serif' +); + +@use 'library' as *; + +@use 'library' as f; + +@use 'sass:map'; + +@forward 'library'; + +@forward 'library' show border, $border-color; + +@forward 'library' hide gradient; + +@forward 'library' as btn-*; + +@forward 'library' as btn*; + +================================================================================ +`; + +exports[`quotes.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +@use "library"; + +@use "library" with ( + $black: #222, + $border-radius: 0.1rem, + $font-family: "Helvetica, sans-serif" +); + +@use "library" as *; + +@use "library" as f; + +@use "sass:map"; + +@forward "library"; + +@forward "library" show border, $border-color; + +@forward "library" hide gradient; + +@forward "library" as btn-*; + +@forward "library" as btn*; + +=====================================output===================================== +@use "library"; + +@use "library" with ( + $black: #222, + $border-radius: 0.1rem, + $font-family: "Helvetica, sans-serif" +); + +@use "library" as *; + +@use "library" as f; + +@use "sass:map"; + +@forward "library"; + +@forward "library" show border, $border-color; + +@forward "library" hide gradient; + +@forward "library" as btn-*; + +@forward "library" as btn*; + +================================================================================ +`; diff --git a/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 863d8c607680..000000000000 --- a/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,149 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`forward-with.scss - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -@forward 'foo.scss' with ($components: red); - -=====================================output===================================== -@forward 'foo.scss' with ( - $components: red -); - -================================================================================ -`; - -exports[`forward-with.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@forward 'foo.scss' with ($components: red); - -=====================================output===================================== -@forward "foo.scss" with ( - $components: red -); - -================================================================================ -`; - -exports[`quotes.scss - {"singleQuote":true} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -singleQuote: true - | printWidth -=====================================input====================================== -@use "library"; - -@use "library" with ( - $black: #222, - $border-radius: 0.1rem - $font-family: "Helvetica, sans-serif" -); - -@use "library" as *; - -@use "library" as f; - -@use "sass:map"; - -@forward "library"; - -@forward "library" show border, $border-color; - -@forward "library" hide gradient; - -@forward "library" as btn-*; - -@forward "library" as btn*; - -=====================================output===================================== -@use 'library'; - -@use 'library' with ( - $black: #222, - $border-radius: 0.1rem $font-family: 'Helvetica, sans-serif' -); - -@use 'library' as *; - -@use 'library' as f; - -@use 'sass:map'; - -@forward 'library'; - -@forward 'library' show border, $border-color; - -@forward 'library' hide gradient; - -@forward 'library' as btn-*; - -@forward 'library' as btn*; - -================================================================================ -`; - -exports[`quotes.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@use "library"; - -@use "library" with ( - $black: #222, - $border-radius: 0.1rem - $font-family: "Helvetica, sans-serif" -); - -@use "library" as *; - -@use "library" as f; - -@use "sass:map"; - -@forward "library"; - -@forward "library" show border, $border-color; - -@forward "library" hide gradient; - -@forward "library" as btn-*; - -@forward "library" as btn*; - -=====================================output===================================== -@use "library"; - -@use "library" with ( - $black: #222, - $border-radius: 0.1rem $font-family: "Helvetica, sans-serif" -); - -@use "library" as *; - -@use "library" as f; - -@use "sass:map"; - -@forward "library"; - -@forward "library" show border, $border-color; - -@forward "library" hide gradient; - -@forward "library" as btn-*; - -@forward "library" as btn*; - -================================================================================ -`; diff --git a/tests/format/scss/quotes/escape-in-string.scss b/tests/format/scss/quotes/escape-in-string.scss new file mode 100644 index 000000000000..dbd96647663c --- /dev/null +++ b/tests/format/scss/quotes/escape-in-string.scss @@ -0,0 +1,2 @@ +$description: "Lorem ipsum dolor sit \"amet\", consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; diff --git a/tests/format/scss/quotes/format.test.js b/tests/format/scss/quotes/format.test.js new file mode 100644 index 000000000000..6520c1c95ad2 --- /dev/null +++ b/tests/format/scss/quotes/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"]); +runFormatTest(import.meta, ["scss"], { singleQuote: true }); diff --git a/tests/format/scss/quotes/jsfmt.spec.js b/tests/format/scss/quotes/jsfmt.spec.js deleted file mode 100644 index 0c94ceec9417..000000000000 --- a/tests/format/scss/quotes/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["scss"]); -run_spec(__dirname, ["scss"], { singleQuote: true }); diff --git a/tests/format/scss/quotes/quotes.scss b/tests/format/scss/quotes/quotes.scss index 20607380fbad..10735064c0d4 100644 --- a/tests/format/scss/quotes/quotes.scss +++ b/tests/format/scss/quotes/quotes.scss @@ -2,7 +2,7 @@ @use "library" with ( $black: #222, - $border-radius: 0.1rem + $border-radius: 0.1rem, $font-family: "Helvetica, sans-serif" ); diff --git a/tests/format/scss/scss/3757.scss b/tests/format/scss/scss/3757.scss new file mode 100644 index 000000000000..d60f74e0ad01 --- /dev/null +++ b/tests/format/scss/scss/3757.scss @@ -0,0 +1,247 @@ +$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; + +$locale: "en_us"; +html[lang=#{$locale}] { + font-size: 10px; +} +$alertClass: "error"; +p.message-#{$alertClass} { + color: red; +} +$mediumBreakpoint: 768px; +@media (max-width: #{$mediumBreakpoint}) { + a { + font-size: 18px; + } +} + +p { + @media (max-width: 768px) { + font-size: 150%; + + @media (orientation: landscape) { + line-height: 75%; + } + } +} + +.popularAnimal { + background: gray; +} +.GoodBoy { + color: green; +} +.dog { + @extend .popularAnimal; + @extend .GoodBoy; + color: white; +} + +%animal { + background: gray; +} +.cat { + @extend %animal; + color: white; +} +.dog { + @extend %animal; + color: black; +} + +%mfw-standing-out { + font-size: 150%; + font-style: italic; + padding: 25px; +} +%mfwSlightlyShadowed { + @include box-shadow(black 2px 2px 10px); // from Compass +} +%MFWRounded { + @include border-radius(25px); // from Compass +} +#join-button { + @extend %mfw-standing-out; + @extend %mfwSlightlyShadowed; + @extend %MFWRounded; + background: green; + color: white; +} + +a { + &:hover { + color: red; + } +} +p { + body.no-touch & { + display: none; + } +} +.foo.bar .baz.bang, .bip.qux { + $selector: &; +} +@mixin does-parent-exist { + @if & { + &:hover { + color: red; + } + } @else { + a { + color: red; + } + } +} + +p { + @if 1 + 1 == 2 { + border: 1px solid; + } + @if 5 < 3 { + border: 2px dotted; + } + @if null { + border: 3px double; + } +} + +$mosterType: monster; +p { + @if $mosterType == ocean { + color: blue; + } @else if $mosterType == matador { + color: red; + } @else if $mosterType == monster { + color: green; + } @else if $mosterType == nightKing { + color: green; + } @else if $mosterType == VeryWickedWolf { + color: green; + } @else { + color: black; + } +} + +@for $i from 1 through 3 { + .item-#{$i} { + width: 2em * $i; + } +} + +@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { + .#{$animal}-icon { + background-image: url('/images/#{$animal}.png'); + } +} + +$i: 6; +@while $i > 0 { + .item-#{$i} { + width: 2em * $i; + } + $i: $i - 2; +} + +@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { + border: $width $coolStyle $AwesomeColor; +} + +p { + @include cool-border(1px, "solid", $fff); +} +p { + @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); +} +p { + @include coolBorder(); +} + +@mixin coolBorder() { + border: 10px solid #fff; +} +p { + @include coolBorder(1px, "solid", $fff); +} + +@mixin CoolBorder() { + border: 10px solid #fff; +} +p { + @include CoolBorder(1px, "solid", $fff); +} + +@mixin box-shadow($shadows...) { + -moz-box-shadow: $shadows; + -webkit-box-shadow: $shadows; + box-shadow: $shadows; +} +.shadows { + @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin applyToIe6Only { + * html { + @content; + } +} +@include applyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin ApplyToIe6Only { + * html { + @content; + } +} +@include ApplyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin config-icon-colors($prefix, $colors...) { + @each $i in $colors { + .#{$prefix}#{nth($i, 1)} { + color: nth($i, 2); + } + } +} +@include config-icon-colors( + "icon-", + "save" green, + "cancel" gray, + "delete" red, + 'wait' blue +); + +@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function border($borders...) { + @return $borders; +} +.foo { + padding: my-calculation-function(10px, 5px, 100px); + margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); + width: AnotherMyCalculationFunction(10px, 5px); + border: border(25px, 35px); +} diff --git a/tests/format/scss/scss/3930.scss b/tests/format/scss/scss/3930.scss new file mode 100644 index 000000000000..577a0404054d --- /dev/null +++ b/tests/format/scss/scss/3930.scss @@ -0,0 +1,199 @@ +$longVariable: ( +(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) +); + +$list-space: "item-1" "item-2" "item-3"; +$list-space:"item-1""item-2""item-3"; +$list-space: "item-1" "item-2" "item-3" ; +$list-space: "item-1" + "item-2" + "item-3"; +$list-space +: +"item-1" +"item-2" +"item-3" +; +$list-space + +: + +"item-1" + +"item-2" + +"item-3" + +; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma:"item-1","item-2","item-3"; +$list-comma: "item-1" , "item-2" , "item-3" ; +$list-comma: "item-1", + "item-2", + "item-3"; +$list-comma +: +"item-1" +, +"item-2" +, +"item-3" +; +$list-comma + +: + +"item-1" + +, + +"item-2" + +, + +"item-3" + +; +$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; +$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; +$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; +$list: "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list +: +"item-1.1" +"item-1.2" +"item-1.3" +, +"item-2.1" +"item-2.2" +"item-2.3" +, +"item-3.1" +"item-3.2" +"item-3.3" +; +$list + +: + +"item-1.1" + +"item-1.2" + +"item-1.3" + +, + +"item-2.1" + +"item-2.2" + +"item-2.3" + +, + +"item-3.1" + +"item-3.2" + +"item-3.3" + +; +$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); +$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); +$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list +: +( +( +"item-1.1" +, +"item-1.2" +, +"item-1.3" +) +, +( +"item-2.1" +, +"item-2.2" +, +"item-2.3" +) +, +( +"item-3.1" +, +"item-3.2" +, +"item-3.3" +) +) +; +$list + +: + +( + +( + +"item-1.1" + +, + +"item-1.2" + +, + +"item-1.3" + +) + +, + +( + +"item-2.1" + +, + +"item-2.2" + +, + +"item-2.3" + +) + +, + +( + +"item-3.1" + +, + +"item-3.2" + +, + +"item-3.3" + +) + +) + +; + +$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); +$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); + + diff --git a/tests/format/scss/scss/5375.scss b/tests/format/scss/scss/5375.scss new file mode 100644 index 000000000000..8ba506692d55 --- /dev/null +++ b/tests/format/scss/scss/5375.scss @@ -0,0 +1,3 @@ +.something { + grid-template-columns: 1 2fr (3 + 4); +} diff --git a/tests/format/scss/scss/__snapshots__/format.test.js.snap b/tests/format/scss/scss/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..07a1a18481d0 --- /dev/null +++ b/tests/format/scss/scss/__snapshots__/format.test.js.snap @@ -0,0 +1,1743 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3757.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; + +$locale: "en_us"; +html[lang=#{$locale}] { + font-size: 10px; +} +$alertClass: "error"; +p.message-#{$alertClass} { + color: red; +} +$mediumBreakpoint: 768px; +@media (max-width: #{$mediumBreakpoint}) { + a { + font-size: 18px; + } +} + +p { + @media (max-width: 768px) { + font-size: 150%; + + @media (orientation: landscape) { + line-height: 75%; + } + } +} + +.popularAnimal { + background: gray; +} +.GoodBoy { + color: green; +} +.dog { + @extend .popularAnimal; + @extend .GoodBoy; + color: white; +} + +%animal { + background: gray; +} +.cat { + @extend %animal; + color: white; +} +.dog { + @extend %animal; + color: black; +} + +%mfw-standing-out { + font-size: 150%; + font-style: italic; + padding: 25px; +} +%mfwSlightlyShadowed { + @include box-shadow(black 2px 2px 10px); // from Compass +} +%MFWRounded { + @include border-radius(25px); // from Compass +} +#join-button { + @extend %mfw-standing-out; + @extend %mfwSlightlyShadowed; + @extend %MFWRounded; + background: green; + color: white; +} + +a { + &:hover { + color: red; + } +} +p { + body.no-touch & { + display: none; + } +} +.foo.bar .baz.bang, .bip.qux { + $selector: &; +} +@mixin does-parent-exist { + @if & { + &:hover { + color: red; + } + } @else { + a { + color: red; + } + } +} + +p { + @if 1 + 1 == 2 { + border: 1px solid; + } + @if 5 < 3 { + border: 2px dotted; + } + @if null { + border: 3px double; + } +} + +$mosterType: monster; +p { + @if $mosterType == ocean { + color: blue; + } @else if $mosterType == matador { + color: red; + } @else if $mosterType == monster { + color: green; + } @else if $mosterType == nightKing { + color: green; + } @else if $mosterType == VeryWickedWolf { + color: green; + } @else { + color: black; + } +} + +@for $i from 1 through 3 { + .item-#{$i} { + width: 2em * $i; + } +} + +@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { + .#{$animal}-icon { + background-image: url('/images/#{$animal}.png'); + } +} + +$i: 6; +@while $i > 0 { + .item-#{$i} { + width: 2em * $i; + } + $i: $i - 2; +} + +@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { + border: $width $coolStyle $AwesomeColor; +} + +p { + @include cool-border(1px, "solid", $fff); +} +p { + @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); +} +p { + @include coolBorder(); +} + +@mixin coolBorder() { + border: 10px solid #fff; +} +p { + @include coolBorder(1px, "solid", $fff); +} + +@mixin CoolBorder() { + border: 10px solid #fff; +} +p { + @include CoolBorder(1px, "solid", $fff); +} + +@mixin box-shadow($shadows...) { + -moz-box-shadow: $shadows; + -webkit-box-shadow: $shadows; + box-shadow: $shadows; +} +.shadows { + @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin applyToIe6Only { + * html { + @content; + } +} +@include applyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin ApplyToIe6Only { + * html { + @content; + } +} +@include ApplyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin config-icon-colors($prefix, $colors...) { + @each $i in $colors { + .#{$prefix}#{nth($i, 1)} { + color: nth($i, 2); + } + } +} +@include config-icon-colors( + "icon-", + "save" green, + "cancel" gray, + "delete" red, + 'wait' blue +); + +@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function border($borders...) { + @return $borders; +} +.foo { + padding: my-calculation-function(10px, 5px, 100px); + margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); + width: AnotherMyCalculationFunction(10px, 5px); + border: border(25px, 35px); +} + +=====================================output===================================== +$buttonConfig: + "save" 50px, + "cancel" 50px, + "help" 100px; + +$locale: "en_us"; +html[lang="#{$locale}"] { + font-size: 10px; +} +$alertClass: "error"; +p.message-#{$alertClass} { + color: red; +} +$mediumBreakpoint: 768px; +@media (max-width: #{$mediumBreakpoint}) { + a { + font-size: 18px; + } +} + +p { + @media (max-width: 768px) { + font-size: 150%; + + @media (orientation: landscape) { + line-height: 75%; + } + } +} + +.popularAnimal { + background: gray; +} +.GoodBoy { + color: green; +} +.dog { + @extend .popularAnimal; + @extend .GoodBoy; + color: white; +} + +%animal { + background: gray; +} +.cat { + @extend %animal; + color: white; +} +.dog { + @extend %animal; + color: black; +} + +%mfw-standing-out { + font-size: 150%; + font-style: italic; + padding: 25px; +} +%mfwSlightlyShadowed { + @include box-shadow(black 2px 2px 10px); // from Compass +} +%MFWRounded { + @include border-radius(25px); // from Compass +} +#join-button { + @extend %mfw-standing-out; + @extend %mfwSlightlyShadowed; + @extend %MFWRounded; + background: green; + color: white; +} + +a { + &:hover { + color: red; + } +} +p { + body.no-touch & { + display: none; + } +} +.foo.bar .baz.bang, +.bip.qux { + $selector: &; +} +@mixin does-parent-exist { + @if & { + &:hover { + color: red; + } + } @else { + a { + color: red; + } + } +} + +p { + @if 1 + 1 == 2 { + border: 1px solid; + } + @if 5 < 3 { + border: 2px dotted; + } + @if null { + border: 3px double; + } +} + +$mosterType: monster; +p { + @if $mosterType == ocean { + color: blue; + } @else if $mosterType == matador { + color: red; + } @else if $mosterType == monster { + color: green; + } @else if $mosterType == nightKing { + color: green; + } @else if $mosterType == VeryWickedWolf { + color: green; + } @else { + color: black; + } +} + +@for $i from 1 through 3 { + .item-#{$i} { + width: 2em * $i; + } +} + +@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", + "another-string", "camelCaseString", "PascalCaseString" +{ + .#{$animal}-icon { + background-image: url("/images/#{$animal}.png"); + } +} + +$i: 6; +@while $i > 0 { + .item-#{$i} { + width: 2em * $i; + } + $i: $i - 2; +} + +@mixin cool-border($width: 10px, $coolStyle: "solid", $AwesomeColor: "black") { + border: $width $coolStyle $AwesomeColor; +} + +p { + @include cool-border(1px, "solid", $fff); +} +p { + @include cool-border($width: 1px, $coolStyle: "solid", $AwesomeColor: #fff); +} +p { + @include coolBorder(); +} + +@mixin coolBorder() { + border: 10px solid #fff; +} +p { + @include coolBorder(1px, "solid", $fff); +} + +@mixin CoolBorder() { + border: 10px solid #fff; +} +p { + @include CoolBorder(1px, "solid", $fff); +} + +@mixin box-shadow($shadows...) { + -moz-box-shadow: $shadows; + -webkit-box-shadow: $shadows; + box-shadow: $shadows; +} +.shadows { + @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin applyToIe6Only { + * html { + @content; + } +} +@include applyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin ApplyToIe6Only { + * html { + @content; + } +} +@include ApplyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin config-icon-colors($prefix, $colors...) { + @each $i in $colors { + .#{$prefix}#{nth($i, 1)} { + color: nth($i, 2); + } + } +} +@include config-icon-colors( + "icon-", + "save" green, + "cancel" gray, + "delete" red, + "wait" blue +); + +@function my-calculation-function($some-number, $anotherNumber, $BigNumber) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function myCalculationFunction($some-number, $anotherNumber, $BigNumber) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function AnotherMyCalculationFunction( + $some-number, + $anotherNumber, + $BigNumber: 100px +) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function border($borders...) { + @return $borders; +} +.foo { + padding: my-calculation-function(10px, 5px, 100px); + margin: myCalculationFunction( + $some-number: 10px, + $anotherNumber: 5px, + $BigNumber: 100px + ); + width: AnotherMyCalculationFunction(10px, 5px); + border: border(25px, 35px); +} + +================================================================================ +`; + +exports[`3757.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; + +$locale: "en_us"; +html[lang=#{$locale}] { + font-size: 10px; +} +$alertClass: "error"; +p.message-#{$alertClass} { + color: red; +} +$mediumBreakpoint: 768px; +@media (max-width: #{$mediumBreakpoint}) { + a { + font-size: 18px; + } +} + +p { + @media (max-width: 768px) { + font-size: 150%; + + @media (orientation: landscape) { + line-height: 75%; + } + } +} + +.popularAnimal { + background: gray; +} +.GoodBoy { + color: green; +} +.dog { + @extend .popularAnimal; + @extend .GoodBoy; + color: white; +} + +%animal { + background: gray; +} +.cat { + @extend %animal; + color: white; +} +.dog { + @extend %animal; + color: black; +} + +%mfw-standing-out { + font-size: 150%; + font-style: italic; + padding: 25px; +} +%mfwSlightlyShadowed { + @include box-shadow(black 2px 2px 10px); // from Compass +} +%MFWRounded { + @include border-radius(25px); // from Compass +} +#join-button { + @extend %mfw-standing-out; + @extend %mfwSlightlyShadowed; + @extend %MFWRounded; + background: green; + color: white; +} + +a { + &:hover { + color: red; + } +} +p { + body.no-touch & { + display: none; + } +} +.foo.bar .baz.bang, .bip.qux { + $selector: &; +} +@mixin does-parent-exist { + @if & { + &:hover { + color: red; + } + } @else { + a { + color: red; + } + } +} + +p { + @if 1 + 1 == 2 { + border: 1px solid; + } + @if 5 < 3 { + border: 2px dotted; + } + @if null { + border: 3px double; + } +} + +$mosterType: monster; +p { + @if $mosterType == ocean { + color: blue; + } @else if $mosterType == matador { + color: red; + } @else if $mosterType == monster { + color: green; + } @else if $mosterType == nightKing { + color: green; + } @else if $mosterType == VeryWickedWolf { + color: green; + } @else { + color: black; + } +} + +@for $i from 1 through 3 { + .item-#{$i} { + width: 2em * $i; + } +} + +@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { + .#{$animal}-icon { + background-image: url('/images/#{$animal}.png'); + } +} + +$i: 6; +@while $i > 0 { + .item-#{$i} { + width: 2em * $i; + } + $i: $i - 2; +} + +@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { + border: $width $coolStyle $AwesomeColor; +} + +p { + @include cool-border(1px, "solid", $fff); +} +p { + @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); +} +p { + @include coolBorder(); +} + +@mixin coolBorder() { + border: 10px solid #fff; +} +p { + @include coolBorder(1px, "solid", $fff); +} + +@mixin CoolBorder() { + border: 10px solid #fff; +} +p { + @include CoolBorder(1px, "solid", $fff); +} + +@mixin box-shadow($shadows...) { + -moz-box-shadow: $shadows; + -webkit-box-shadow: $shadows; + box-shadow: $shadows; +} +.shadows { + @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin applyToIe6Only { + * html { + @content; + } +} +@include applyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin ApplyToIe6Only { + * html { + @content; + } +} +@include ApplyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin config-icon-colors($prefix, $colors...) { + @each $i in $colors { + .#{$prefix}#{nth($i, 1)} { + color: nth($i, 2); + } + } +} +@include config-icon-colors( + "icon-", + "save" green, + "cancel" gray, + "delete" red, + 'wait' blue +); + +@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ + @return $some-number + $anotherNumber + $BigNumber; +} +@function border($borders...) { + @return $borders; +} +.foo { + padding: my-calculation-function(10px, 5px, 100px); + margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); + width: AnotherMyCalculationFunction(10px, 5px); + border: border(25px, 35px); +} + +=====================================output===================================== +$buttonConfig: + "save" 50px, + "cancel" 50px, + "help" 100px; + +$locale: "en_us"; +html[lang="#{$locale}"] { + font-size: 10px; +} +$alertClass: "error"; +p.message-#{$alertClass} { + color: red; +} +$mediumBreakpoint: 768px; +@media (max-width: #{$mediumBreakpoint}) { + a { + font-size: 18px; + } +} + +p { + @media (max-width: 768px) { + font-size: 150%; + + @media (orientation: landscape) { + line-height: 75%; + } + } +} + +.popularAnimal { + background: gray; +} +.GoodBoy { + color: green; +} +.dog { + @extend .popularAnimal; + @extend .GoodBoy; + color: white; +} + +%animal { + background: gray; +} +.cat { + @extend %animal; + color: white; +} +.dog { + @extend %animal; + color: black; +} + +%mfw-standing-out { + font-size: 150%; + font-style: italic; + padding: 25px; +} +%mfwSlightlyShadowed { + @include box-shadow(black 2px 2px 10px); // from Compass +} +%MFWRounded { + @include border-radius(25px); // from Compass +} +#join-button { + @extend %mfw-standing-out; + @extend %mfwSlightlyShadowed; + @extend %MFWRounded; + background: green; + color: white; +} + +a { + &:hover { + color: red; + } +} +p { + body.no-touch & { + display: none; + } +} +.foo.bar .baz.bang, +.bip.qux { + $selector: &; +} +@mixin does-parent-exist { + @if & { + &:hover { + color: red; + } + } @else { + a { + color: red; + } + } +} + +p { + @if 1 + 1 == 2 { + border: 1px solid; + } + @if 5 < 3 { + border: 2px dotted; + } + @if null { + border: 3px double; + } +} + +$mosterType: monster; +p { + @if $mosterType == ocean { + color: blue; + } @else if $mosterType == matador { + color: red; + } @else if $mosterType == monster { + color: green; + } @else if $mosterType == nightKing { + color: green; + } @else if $mosterType == VeryWickedWolf { + color: green; + } @else { + color: black; + } +} + +@for $i from 1 through 3 { + .item-#{$i} { + width: 2em * $i; + } +} + +@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", + "another-string", "camelCaseString", "PascalCaseString" +{ + .#{$animal}-icon { + background-image: url("/images/#{$animal}.png"); + } +} + +$i: 6; +@while $i > 0 { + .item-#{$i} { + width: 2em * $i; + } + $i: $i - 2; +} + +@mixin cool-border($width: 10px, $coolStyle: "solid", $AwesomeColor: "black") { + border: $width $coolStyle $AwesomeColor; +} + +p { + @include cool-border(1px, "solid", $fff); +} +p { + @include cool-border($width: 1px, $coolStyle: "solid", $AwesomeColor: #fff); +} +p { + @include coolBorder(); +} + +@mixin coolBorder() { + border: 10px solid #fff; +} +p { + @include coolBorder(1px, "solid", $fff); +} + +@mixin CoolBorder() { + border: 10px solid #fff; +} +p { + @include CoolBorder(1px, "solid", $fff); +} + +@mixin box-shadow($shadows...) { + -moz-box-shadow: $shadows; + -webkit-box-shadow: $shadows; + box-shadow: $shadows; +} +.shadows { + @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin applyToIe6Only { + * html { + @content; + } +} +@include applyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin ApplyToIe6Only { + * html { + @content; + } +} +@include ApplyToIe6Only { + #logo { + background-image: url(/logo.gif); + } +} + +@mixin config-icon-colors($prefix, $colors...) { + @each $i in $colors { + .#{$prefix}#{nth($i, 1)} { + color: nth($i, 2); + } + } +} +@include config-icon-colors( + "icon-", + "save" green, + "cancel" gray, + "delete" red, + "wait" blue +); + +@function my-calculation-function($some-number, $anotherNumber, $BigNumber) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function myCalculationFunction($some-number, $anotherNumber, $BigNumber) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function AnotherMyCalculationFunction( + $some-number, + $anotherNumber, + $BigNumber: 100px +) { + @return $some-number + $anotherNumber + $BigNumber; +} +@function border($borders...) { + @return $borders; +} +.foo { + padding: my-calculation-function(10px, 5px, 100px); + margin: myCalculationFunction( + $some-number: 10px, + $anotherNumber: 5px, + $BigNumber: 100px + ); + width: AnotherMyCalculationFunction(10px, 5px); + border: border(25px, 35px); +} + +================================================================================ +`; + +exports[`3930.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$longVariable: ( +(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) +); + +$list-space: "item-1" "item-2" "item-3"; +$list-space:"item-1""item-2""item-3"; +$list-space: "item-1" "item-2" "item-3" ; +$list-space: "item-1" + "item-2" + "item-3"; +$list-space +: +"item-1" +"item-2" +"item-3" +; +$list-space + +: + +"item-1" + +"item-2" + +"item-3" + +; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma:"item-1","item-2","item-3"; +$list-comma: "item-1" , "item-2" , "item-3" ; +$list-comma: "item-1", + "item-2", + "item-3"; +$list-comma +: +"item-1" +, +"item-2" +, +"item-3" +; +$list-comma + +: + +"item-1" + +, + +"item-2" + +, + +"item-3" + +; +$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; +$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; +$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; +$list: "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list +: +"item-1.1" +"item-1.2" +"item-1.3" +, +"item-2.1" +"item-2.2" +"item-2.3" +, +"item-3.1" +"item-3.2" +"item-3.3" +; +$list + +: + +"item-1.1" + +"item-1.2" + +"item-1.3" + +, + +"item-2.1" + +"item-2.2" + +"item-2.3" + +, + +"item-3.1" + +"item-3.2" + +"item-3.3" + +; +$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); +$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); +$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list +: +( +( +"item-1.1" +, +"item-1.2" +, +"item-1.3" +) +, +( +"item-2.1" +, +"item-2.2" +, +"item-2.3" +) +, +( +"item-3.1" +, +"item-3.2" +, +"item-3.3" +) +) +; +$list + +: + +( + +( + +"item-1.1" + +, + +"item-1.2" + +, + +"item-1.3" + +) + +, + +( + +"item-2.1" + +, + +"item-2.2" + +, + +"item-2.3" + +) + +, + +( + +"item-3.1" + +, + +"item-3.2" + +, + +"item-3.3" + +) + +) + +; + +$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); +$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); + + + +=====================================output===================================== +$longVariable: ( + (mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) +); + +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); + +$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) + (0 0) (0 0); +$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") + (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") + (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") + (3.75, "3-75") (4, "4"); + +================================================================================ +`; + +exports[`3930.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$longVariable: ( +(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) +); + +$list-space: "item-1" "item-2" "item-3"; +$list-space:"item-1""item-2""item-3"; +$list-space: "item-1" "item-2" "item-3" ; +$list-space: "item-1" + "item-2" + "item-3"; +$list-space +: +"item-1" +"item-2" +"item-3" +; +$list-space + +: + +"item-1" + +"item-2" + +"item-3" + +; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma:"item-1","item-2","item-3"; +$list-comma: "item-1" , "item-2" , "item-3" ; +$list-comma: "item-1", + "item-2", + "item-3"; +$list-comma +: +"item-1" +, +"item-2" +, +"item-3" +; +$list-comma + +: + +"item-1" + +, + +"item-2" + +, + +"item-3" + +; +$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; +$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; +$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; +$list: "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list +: +"item-1.1" +"item-1.2" +"item-1.3" +, +"item-2.1" +"item-2.2" +"item-2.3" +, +"item-3.1" +"item-3.2" +"item-3.3" +; +$list + +: + +"item-1.1" + +"item-1.2" + +"item-1.3" + +, + +"item-2.1" + +"item-2.2" + +"item-2.3" + +, + +"item-3.1" + +"item-3.2" + +"item-3.3" + +; +$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); +$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); +$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list +: +( +( +"item-1.1" +, +"item-1.2" +, +"item-1.3" +) +, +( +"item-2.1" +, +"item-2.2" +, +"item-2.3" +) +, +( +"item-3.1" +, +"item-3.2" +, +"item-3.3" +) +) +; +$list + +: + +( + +( + +"item-1.1" + +, + +"item-1.2" + +, + +"item-1.3" + +) + +, + +( + +"item-2.1" + +, + +"item-2.2" + +, + +"item-2.3" + +) + +, + +( + +"item-3.1" + +, + +"item-3.2" + +, + +"item-3.3" + +) + +) + +; + +$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); +$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); + + + +=====================================output===================================== +$longVariable: ( + (mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) +); + +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-space: "item-1" "item-2" "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list-comma: "item-1", "item-2", "item-3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: + "item-1.1" "item-1.2" "item-1.3", + "item-2.1" "item-2.2" "item-2.3", + "item-3.1" "item-3.2" "item-3.3"; +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); +$list: ( + ("item-1.1", "item-1.2", "item-1.3"), + ("item-2.1", "item-2.2", "item-2.3"), + ("item-3.1", "item-3.2", "item-3.3") +); + +$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) + (0 0) (0 0); +$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") + (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") + (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") + (3.75, "3-75") (4, "4"); + +================================================================================ +`; + +exports[`5375.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +.something { + grid-template-columns: 1 2fr (3 + 4); +} + +=====================================output===================================== +.something { + grid-template-columns: 1 2fr (3 + 4); +} + +================================================================================ +`; + +exports[`5375.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +.something { + grid-template-columns: 1 2fr (3 + 4); +} + +=====================================output===================================== +.something { + grid-template-columns: 1 2fr (3 + 4); +} + +================================================================================ +`; + +exports[`scss.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@media #{$g-breakpoint-tiny} {} +.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } +a {height: calc(#{$foo} + 1);} +div { + background: { + size: auto 60%; + position: bottom 2px left; + } +} +a { margin: 0 { left: 10px; } } + +=====================================output===================================== +@media #{$g-breakpoint-tiny} { +} +.#{$fa-css-prefix}-glass:before { + content: $fa-var-glass; +} +a { + height: calc(#{$foo} + 1); +} +div { + background: { + size: auto 60%; + position: bottom 2px left; + } +} +a { + margin: 0 { + left: 10px; + } +} + +================================================================================ +`; + +exports[`scss.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@media #{$g-breakpoint-tiny} {} +.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } +a {height: calc(#{$foo} + 1);} +div { + background: { + size: auto 60%; + position: bottom 2px left; + } +} +a { margin: 0 { left: 10px; } } + +=====================================output===================================== +@media #{$g-breakpoint-tiny} { +} +.#{$fa-css-prefix}-glass:before { + content: $fa-var-glass; +} +a { + height: calc(#{$foo} + 1); +} +div { + background: { + size: auto 60%; + position: bottom 2px left; + } +} +a { + margin: 0 { + left: 10px; + } +} + +================================================================================ +`; diff --git a/tests/format/scss/scss/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/scss/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e7fd701f3094..000000000000 --- a/tests/format/scss/scss/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4789 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arbitrary-arguments.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -body { - test: foo(return-list($list)...); -} -body { - test: foo(bar($list)...); -} -body { - test: foo($list...); -} -@mixin syntax-colors($args...) { - @debug meta.keywords($args); - // (string: #080, comment: #800, variable: $60b) - - @each $name, $color in meta.keywords($args) { - pre span.stx-#{$name} { - color: $color; - } - } -} -$form-selectors: "input.name", "input.address", "input.zip" !default; -@include order(150px, $form-selectors...); -@mixin linear-gradient($direction, $gradients...) { - background-color: nth($gradients, 1); - background-image: linear-gradient($direction, $gradients...); -} -$parameters: ( - 'c': 'kittens', - 'a': true, - 'b': 42 -); -$value: dummy($parameters...); - -body { - background-color: rgba(50, 50, 50, 50); - background-color: rgba(50 50 50 50...); - background-color: rgba(50 50 .50 50...); - background-color: rgba(50 50 50. .50...); - // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` - background-color: rgba(50 50 50 50....); - width: min(50px 20px 30px...); -} - -=====================================output===================================== -body { - test: foo(return-list($list)...); -} -body { - test: foo(bar($list)...); -} -body { - test: foo($list...); -} -@mixin syntax-colors($args...) { - @debug meta.keywords($args); - // (string: #080, comment: #800, variable: $60b) - - @each $name, $color in meta.keywords($args) { - pre span.stx-#{$name} { - color: $color; - } - } -} -$form-selectors: "input.name", "input.address", "input.zip" !default; -@include order(150px, $form-selectors...); -@mixin linear-gradient($direction, $gradients...) { - background-color: nth($gradients, 1); - background-image: linear-gradient($direction, $gradients...); -} -$parameters: ( - "c": "kittens", - "a": true, - "b": 42 -); -$value: dummy($parameters...); - -body { - background-color: rgba(50, 50, 50, 50); - background-color: rgba(50 50 50 50...); - background-color: rgba(50 50 0.5 50...); - background-color: rgba(50 50 50 0.5...); - // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` - background-color: rgba(50 50 50 50...); - width: min(50px 20px 30px...); -} - -================================================================================ -`; - -exports[`arbitrary-arguments.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -body { - test: foo(return-list($list)...); -} -body { - test: foo(bar($list)...); -} -body { - test: foo($list...); -} -@mixin syntax-colors($args...) { - @debug meta.keywords($args); - // (string: #080, comment: #800, variable: $60b) - - @each $name, $color in meta.keywords($args) { - pre span.stx-#{$name} { - color: $color; - } - } -} -$form-selectors: "input.name", "input.address", "input.zip" !default; -@include order(150px, $form-selectors...); -@mixin linear-gradient($direction, $gradients...) { - background-color: nth($gradients, 1); - background-image: linear-gradient($direction, $gradients...); -} -$parameters: ( - 'c': 'kittens', - 'a': true, - 'b': 42 -); -$value: dummy($parameters...); - -body { - background-color: rgba(50, 50, 50, 50); - background-color: rgba(50 50 50 50...); - background-color: rgba(50 50 .50 50...); - background-color: rgba(50 50 50. .50...); - // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` - background-color: rgba(50 50 50 50....); - width: min(50px 20px 30px...); -} - -=====================================output===================================== -body { - test: foo(return-list($list)...); -} -body { - test: foo(bar($list)...); -} -body { - test: foo($list...); -} -@mixin syntax-colors($args...) { - @debug meta.keywords($args); - // (string: #080, comment: #800, variable: $60b) - - @each $name, $color in meta.keywords($args) { - pre span.stx-#{$name} { - color: $color; - } - } -} -$form-selectors: "input.name", "input.address", "input.zip" !default; -@include order(150px, $form-selectors...); -@mixin linear-gradient($direction, $gradients...) { - background-color: nth($gradients, 1); - background-image: linear-gradient($direction, $gradients...); -} -$parameters: ( - "c": "kittens", - "a": true, - "b": 42, -); -$value: dummy($parameters...); - -body { - background-color: rgba(50, 50, 50, 50); - background-color: rgba(50 50 50 50...); - background-color: rgba(50 50 0.5 50...); - background-color: rgba(50 50 50 0.5...); - // Input is not technically valid ( output is ), but still nice to know that the \`.\` gets dropped as it would for \`50.\` - background-color: rgba(50 50 50 50...); - width: min(50px 20px 30px...); -} - -================================================================================ -`; - -exports[`arbitrary-arguments-comment.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@include bar ( - rgba( - 50 - 50 - .50 - 50 ... - // comment - ) -) - -=====================================output===================================== -@include bar( - rgba( - 50 50 0.5 50... // comment - ) -); - -================================================================================ -`; - -exports[`arbitrary-arguments-comment.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@include bar ( - rgba( - 50 - 50 - .50 - 50 ... - // comment - ) -) - -=====================================output===================================== -@include bar( - rgba( - 50 50 0.5 50... // comment - ) -); - -================================================================================ -`; - -exports[`comments.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -=====================================output===================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -================================================================================ -`; - -exports[`comments.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -=====================================output===================================== -// This comment won't be included in the CSS. -//This comment won't be included in the CSS. -// This comment won't be included in the CSS. - -/* But this comment will, except in compressed mode. */ -/* But this comment will, except in compressed mode. */ -/*But this comment will, except in compressed mode.*/ - -/*! This comment will be included even in compressed mode. */ - -/// Computes an exponent. -///// Computes an exponent. - -================================================================================ -`; - -exports[`directives.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@qux .foo -// .bar - -{} - -=====================================output===================================== -@qux .foo -// .bar -{ -} - -================================================================================ -`; - -exports[`directives.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@qux .foo -// .bar - -{} - -=====================================output===================================== -@qux .foo -// .bar -{ -} - -================================================================================ -`; - -exports[`function-in-url.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@function concat($strings...) { - $result: ''; - @each $string in $strings { - $sum: $result + $string; - } - @return $result; -} - -a { - backround: url(concat('http://', 'example.com', '/image.png')); -} - -=====================================output===================================== -@function concat($strings...) { - $result: ""; - @each $string in $strings { - $sum: $result + $string; - } - @return $result; -} - -a { - backround: url(concat("http://", "example.com", "/image.png")); -} - -================================================================================ -`; - -exports[`function-in-url.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@function concat($strings...) { - $result: ''; - @each $string in $strings { - $sum: $result + $string; - } - @return $result; -} - -a { - backround: url(concat('http://', 'example.com', '/image.png')); -} - -=====================================output===================================== -@function concat($strings...) { - $result: ""; - @each $string in $strings { - $sum: $result + $string; - } - @return $result; -} - -a { - backround: url(concat("http://", "example.com", "/image.png")); -} - -================================================================================ -`; - -exports[`import_comma.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@import "rounded-corners", "text-shadow"; - -=====================================output===================================== -@import "rounded-corners", "text-shadow"; - -================================================================================ -`; - -exports[`import_comma.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@import "rounded-corners", "text-shadow"; - -=====================================output===================================== -@import "rounded-corners", "text-shadow"; - -================================================================================ -`; - -exports[`scss.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@media #{$g-breakpoint-tiny} {} -.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } -a {height: calc(#{$foo} + 1);} -div { - background: { - size: auto 60%; - position: bottom 2px left; - } -} -a { margin: 0 { left: 10px; } } - -$default: #111111 !default; -$default: #111111 !default; -$default: #111111 -!default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!default; - -$global: #111111 !global; -$global: #111111 !global; -$global: #111111 -!global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!global; - -$map: (key: value, other-key: other-value); -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) -!default; -$map: -(key: value, other-key: other-value) -!default; -$map: ( key : value , other-key : other-value); -$map: ( key : value , other-key : other-value ); -$map: ( - key: value, - other-key: other-value -); -$map: ( -key: value, -other-key: other-value -); -$map: ( -key -: -value, -other-key -: -other-value -); -$map: ( -key -: -value -, -other-key -: -other-value -); -$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: -( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value -, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - key: (#d82d2d, #666), - other-key: (#52bf4a, #fff), - other-other-key: (#c23435, #fff) -); -$map: ( -key: (#d82d2d, #666), -other-key: (#52bf4a, #fff), -other-other-key: (#c23435, #fff) -); -$map: ( - key : ( #d82d2d , #666 ), - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( - key : ( #d82d2d , #666 ) , - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( -key -: -( -#d82d2d, -#666 -) -, -other-key -: -( -#52bf4a, -#fff -) -, -other-other-key -: -( -#c23435 -, -#fff -) -); -$map: map-merge($map, ($key: $value)); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( - $map, - ($key: $value) -); -$map: map-merge( -$map, -($key: $value) -); -$map: -map-merge( -$map -, -( -$key -: -$value -) -); - -$longVariable: ( -(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) -); - -$list-space: "item-1" "item-2" "item-3"; -$list-space:"item-1""item-2""item-3"; -$list-space: "item-1" "item-2" "item-3" ; -$list-space: "item-1" - "item-2" - "item-3"; -$list-space -: -"item-1" -"item-2" -"item-3" -; -$list-space - -: - -"item-1" - -"item-2" - -"item-3" - -; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma:"item-1","item-2","item-3"; -$list-comma: "item-1" , "item-2" , "item-3" ; -$list-comma: "item-1", - "item-2", - "item-3"; -$list-comma -: -"item-1" -, -"item-2" -, -"item-3" -; -$list-comma - -: - -"item-1" - -, - -"item-2" - -, - -"item-3" - -; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; -$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; -$list: "item-1.1" "item-1.2" "item-1.3", - "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list -: -"item-1.1" -"item-1.2" -"item-1.3" -, -"item-2.1" -"item-2.2" -"item-2.3" -, -"item-3.1" -"item-3.2" -"item-3.3" -; -$list - -: - -"item-1.1" - -"item-1.2" - -"item-1.3" - -, - -"item-2.1" - -"item-2.2" - -"item-2.3" - -, - -"item-3.1" - -"item-3.2" - -"item-3.3" - -; -$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); -$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); -$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list -: -( -( -"item-1.1" -, -"item-1.2" -, -"item-1.3" -) -, -( -"item-2.1" -, -"item-2.2" -, -"item-2.3" -) -, -( -"item-3.1" -, -"item-3.2" -, -"item-3.3" -) -) -; -$list - -: - -( - -( - -"item-1.1" - -, - -"item-1.2" - -, - -"item-1.3" - -) - -, - -( - -"item-2.1" - -, - -"item-2.2" - -, - -"item-2.3" - -) - -, - -( - -"item-3.1" - -, - -"item-3.2" - -, - -"item-3.3" - -) - -) - -; - -$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); -$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); - -.card-column-simple { - @include breakpoint( getBp( md ) ) { - padding: $spacing_content-sm $spacing_content-md; - } - - @include breakpoint (getBp(md)) { - &:nth-child(2n + 3) { - clear: both; - } - } - - @include breakpoint (getBp(xl)) { - &:nth-child(2n + 3) { - clear: none; - } - &:nth-child(3n + 4) { - clear: both; - } - } -} - -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn #{$message}; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@warn - "Very long long long long long long long long long long long long long line (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error #{$message}; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; -@error - "Very long long long long long long long long long long long long long line Error (#{$message})."; - -$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; - -$locale: "en_us"; -html[lang=#{$locale}] { - font-size: 10px; -} -$alertClass: "error"; -p.message-#{$alertClass} { - color: red; -} -$mediumBreakpoint: 768px; -@media (max-width: #{$mediumBreakpoint}) { - a { - font-size: 18px; - } -} - -p { - @media (max-width: 768px) { - font-size: 150%; - - @media (orientation: landscape) { - line-height: 75%; - } - } -} - -.popularAnimal { - background: gray; -} -.GoodBoy { - color: green; -} -.dog { - @extend .popularAnimal; - @extend .GoodBoy; - color: white; -} - -%animal { - background: gray; -} -.cat { - @extend %animal; - color: white; -} -.dog { - @extend %animal; - color: black; -} - -%mfw-standing-out { - font-size: 150%; - font-style: italic; - padding: 25px; -} -%mfwSlightlyShadowed { - @include box-shadow(black 2px 2px 10px); // from Compass -} -%MFWRounded { - @include border-radius(25px); // from Compass -} -#join-button { - @extend %mfw-standing-out; - @extend %mfwSlightlyShadowed; - @extend %MFWRounded; - background: green; - color: white; -} - -a { - &:hover { - color: red; - } -} -p { - body.no-touch & { - display: none; - } -} -.foo.bar .baz.bang, .bip.qux { - $selector: &; -} -@mixin does-parent-exist { - @if & { - &:hover { - color: red; - } - } @else { - a { - color: red; - } - } -} - -p { - @if 1 + 1 == 2 { - border: 1px solid; - } - @if 5 < 3 { - border: 2px dotted; - } - @if null { - border: 3px double; - } -} - -$mosterType: monster; -p { - @if $mosterType == ocean { - color: blue; - } @else if $mosterType == matador { - color: red; - } @else if $mosterType == monster { - color: green; - } @else if $mosterType == nightKing { - color: green; - } @else if $mosterType == VeryWickedWolf { - color: green; - } @else { - color: black; - } -} - -@for $i from 1 through 3 { - .item-#{$i} { - width: 2em * $i; - } -} - -@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { - .#{$animal}-icon { - background-image: url('/images/#{$animal}.png'); - } -} - -$i: 6; -@while $i > 0 { - .item-#{$i} { - width: 2em * $i; - } - $i: $i - 2; -} - -@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { - border: $width $coolStyle $AwesomeColor; -} - -p { - @include cool-border(1px, "solid", $fff); -} -p { - @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); -} -p { - @include coolBorder(); -} - -@mixin coolBorder() { - border: 10px solid #fff; -} -p { - @include coolBorder(1px, "solid", $fff); -} - -@mixin CoolBorder() { - border: 10px solid #fff; -} -p { - @include CoolBorder(1px, "solid", $fff); -} - -@mixin box-shadow($shadows...) { - -moz-box-shadow: $shadows; - -webkit-box-shadow: $shadows; - box-shadow: $shadows; -} -.shadows { - @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); -} - -@mixin apply-to-ie6-only { - * html { - @content; - } -} -@include apply-to-ie6-only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin applyToIe6Only { - * html { - @content; - } -} -@include applyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin ApplyToIe6Only { - * html { - @content; - } -} -@include ApplyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin config-icon-colors($prefix, $colors...) { - @each $i in $colors { - .#{$prefix}#{nth($i, 1)} { - color: nth($i, 2); - } - } -} -@include config-icon-colors( - "icon-", - "save" green, - "cancel" gray, - "delete" red, - 'wait' blue -); - -@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function border($borders...) { - @return $borders; -} -.foo { - padding: my-calculation-function(10px, 5px, 100px); - margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); - width: AnotherMyCalculationFunction(10px, 5px); - border: border(25px, 35px); -} - -$sm-only: '(min-width: 768px) and (max-width: 991px)'; -$lg-and-up: '(min-width: 1200px)'; - -@media screen and #{$sm-only, $lg-and-up} { - color: #000; -} - -.class-#{$var} { - #{$var}: #7b3d66; - #{$attr}-color: blue; - #{$prop}-#{$side}: $value; - background-#{$var}: #7b3d66; - animation-name: #{var}; - line-height: #{strip-unit($line-height)}em; - height: 1#{$var}; - width: calc(100% - #{$sidebar-width}); - max-width: calc(#{$m*100}vw #{$sign} #{$b}); - font: #{$font-size}/#{$line-height}; - content: "I have #{8 + 2} books on SASS!"; - border: #{$var} #{$var} #{$var}; - filter: #{$var}#{$var}#{$var}; - prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; - prop2: - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - ; - prop3: - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - ; - prop4: -#{$loader-icon-duration}; - prop5: +#{$loader-icon-duration}; - prop6: calc(-#{$loader-icon-duration} + 10); - prop7: calc(10 + -#{$loader-icon-duration}); -} - -/* Framework version for the generated CSS is #{$version}. */ - -.selector { - foo: bar; - #{$active} { - baz: qux; - } -} - -.el:nth-of-type(#{$i}) {} - -@media #{$value} {} - -$foundation-dir: 'foundation'; -@import url('#{$foundation-dir}/components/grid'); -@import url(#{$foundation-dir}/components/grid); -@import url($foundation-dir/components/grid); -@import url($foundation-dir+"/components/grid"); - -@function get-font-family($family) { - @return $family; -} -@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); -@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); - - -@keyframes loader { - 0% { - transform: translate3d(0, 0, 0); - } - - #{50% - $loader-icon-duration} { - transform: translate3d(0, $bounce-height, 0); - } - - 50% { - transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); - } -} - -$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; - -@each $icon in $icons { - .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { - content: "#{nth($icon, 2)}"; - } -} - -.foo { - prop: -($grid-gutter-width / 2); - prop1: -( $grid-gutter-width / 2 ); - prop2: -$grid-gutter-width / 2; - prop3: +($grid-gutter-width / 2); - prop4: 10px/8px; /* Plain CSS, no division */ - prop5: $width / 2; /* Uses a variable, does division */ - prop6: round(1.5) / 2; /* Uses a function, does division */ - prop7: (500px / 2); /* Uses parentheses, does division */ - prop8: 5px + 8px / 2px; //* Uses +, does division */ - prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ - prop10: #010203 + #040506; - prop11: #010203 * 2; - prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); - prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); - prop14: e + -resize; - prop15: sans- + "serif"; - prop16: 1em + (2em * 3); - prop17: rotate(-2deg); - prop18: rotate( -2deg ) ; - _:_; - prop19: 10 - ($grid-gutter-width / 2); - prop20: 10 + -($grid-gutter-width / 2); - prop21: 10 + - ( $grid-gutter-width / 2 ) ; - prop22: - ( $grid-gutter-width / 2 ) ; - prop23: - ( $grid-gutter-width / 2 ) ; - prop24: -$grid-gutter-width; - prop25: + ( $grid-gutter-width / 2 ) ; - prop26: + ( $grid-gutter-width / 2 ) ; - prop27: +$grid-gutter-width; - prop28: --($grid-gutter-width / 2); - prop28: ++($grid-gutter-width / 2); - prop29: rotate( - 2deg ) ; -} - -$last:nth($juggler,length($juggler)); -$x:if($last%2==0,1/2,3/2); -$new:pow($last,$x); -$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; -$new-entry:(); -$new-entry : ( ) ; -$new-entry : ( ) ; -$new-entry -: -( -) -; - -body:before { - content: quote(to-string(fibonacci(100), ' \\A ')); - white-space: pre-wrap; -} - -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); -width -: -( -( -100% -- -( -( -$numPerRow -- -1 -) -* -$margin -) -) -/ -$numPerRow -) -; - -a:nth-child(#{$numPerRow}n) { - margin-right: 0; - margin-bottom: 0; -} - -@function em($pixels, $context: $browser-context) { - @return #{ $pixels / $context }em -} - -.navigation { - @extend %updated-#{$flag}; - @extend .selected-#{$flag}; - @extend %#{$item}; -} - -.icon-#{$icon-name} { - background-image: '/images/#{$icon-name}.svg'; -} - -$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); - -@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} - -@function gcd($a,$b){ - // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript - @if ($b != 0) { - @return gcd($b,$a % $b); - }@else{ - @return abs($a); - } -} - -$colors: ( -primary: ( -base: #00abc9, -light: #daf1f6, -dark: #12799a -), -secondary: ( -base: #424d55, -light: #ccc, -lightest: #efefef, -dark: #404247 -), -success: ( -base: #bbd33e, -light: #eaf0c6 -) -); - -@function color($color, $tone: "base") { -@return map-get(map-get($colors, $color), $tone); -} - -@media only screen and (max-width: 767px) { - @include widths(2 3 4, \\@small); -} - -$widths-breakpoint-separator: \\@small; - -a { - transition-timing-function: func1( - func2( - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ) - ); -} - -$empty-map: (); -$empty-nested-map: ( -nested-key: (empty-key: (color: red)), -empty-key: (), -empty-key: (), -empty-key: () -); - -$o-grid-default-config: ( -columns: 12, -gutter: 10px, -min-width: 240px, -max-width: 1330px, -layouts: ( -S: 370px, -M: 610px, -L: 850px, -XL: 1090px -), -fluid: true, -debug: false, -fixed-layout: M, -enhanced-experience: true -); - -$a: (); -$b: unquote(''); -$c: null; -$d: (null); - -$threads-properties: map-merge($threads-properties, ($border-label: ())); -$o-grid-default-config: (layouts: (S: 370px)); - -$map: ( -key: (value), -other-key: (key: other-other-value) -); - -a { - content: "#{".5"}"; - content: my-fn("_"); - content: "#{my-fn("_")}"; - content: my-fn("-"); - content: "#{my-fn("-")}"; - content: my-fn("-a"); - content: "#{my-fn("-a")}"; - content: my-fn("a-"); - content: "#{my-fn("a-")}"; - content: my-fn("foo"); - content: "#{my-fn("foo")}"; - content: 1 "#{my-fn("foo")}" 2; - content: foo "#{my-fn("foo")}" bar; - content: "foo #{$description} bar"; - - content: "#{my-fn("foo","bar")}"; - content: "#{my-fn( "foo" , "bar" )}"; - content: "#{my-fn( "foo" , "bar" )}"; - - content: '#{my-fn("foo")}'; - content: '#{my-fn('foo')}'; - content: "#{my-fn('foo')}"; - content: "#{my-fn("foo")}"; -} - -@mixin theme($css-property, $css-value, $theme-classes: t) { - @each $selector in & { - @each $class in $theme-classes { - @each $theme, $theme-properties in c(themes) { - $value: $css-value; - - @each $theme-name, $theme-value in $theme-properties { - $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; - $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); - $value: str-replace($value, "\${#{$theme-name}}", $theme-value); - } - - @at-root .#{$class}-#{join($theme, $selector)} { - #{$css-property}: unquote($value); - } - } - } - } -} - -.foo, -// Comment -.bar { - // Comment - color: red; // Comment -} - -$my-list: - 'foo', // Comment - 'bar'; // Comment - -$my-map: ( - 'foo': 1, // Comment - 'bar': 2, // Comment - 'buz': calc(1 + 2), // Buz - 'baz': 4, // Baz -); - -[href]:hover &, // Comment -[href]:focus &, // Comment -[href]:active & { - .tooltip { - opacity: 1; - } -} - -@import - // Comment - 'mixins', - 'variables', - // Comment - 'reset', - 'scaffolding', - 'type', - // Comment - 'bar', - 'tabs'; - -@mixin placeholder { - &::placeholder {@content} -} - -.container { - @include placeholder { - color: $color-silver; - } -} - -.something { - grid-template-columns: 1 2fr (3 + 4); -} - -// Ignore escape "\\" in SCSS mixins -@mixin margin-bottom-1\\/3 { - margin-bottom: 0.8rem; -} - -label { - @include margin-bottom-1\\/3; -} - -@function someVeryLongFunctionNameForJustAPow($base, $exponent) { - $result: 1; - @for $_ from 1 through $exponent { - $result: $result * $base; - } - @return $result; -} - -@function pow($base, $exponent){ - @return someVeryLongFunctionNameForJustAPow($base,$exponent); -} - -.foo{ - width: someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, - // This next pow is really powerful - someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, 2)))))))))))) -} - -.bar{ - width: pow(2, pow(2, pow(2, - // This next pow is really powerful - pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))))))) -} - -=====================================output===================================== -@media #{$g-breakpoint-tiny} { -} -.#{$fa-css-prefix}-glass:before { - content: $fa-var-glass; -} -a { - height: calc(#{$foo} + 1); -} -div { - background: { - size: auto 60%; - position: bottom 2px left; - } -} -a { - margin: 0 { - left: 10px; - } -} - -$default: #111111 !default; -$default: #111111 !default; -$default: #111111 !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; - -$global: #111111 !global; -$global: #111111 !global; -$global: #111111 !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; - -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -) !default; -$map: ( - key: value, - other-key: other-value -) !default; -$map: ( - key: value, - other-key: other-value -) !default; -$map: ( - key: value, - other-key: other-value -) !default; -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -); -$map: ( - key: value, - other-key: other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - key: ( - #d82d2d, - #666 - ), - other-key: ( - #52bf4a, - #fff - ), - other-other-key: ( - #c23435, - #fff - ) -); -$map: ( - key: ( - #d82d2d, - #666 - ), - other-key: ( - #52bf4a, - #fff - ), - other-other-key: ( - #c23435, - #fff - ) -); -$map: ( - key: ( - #d82d2d, - #666 - ), - other-key: ( - #52bf4a, - #fff - ), - other-other-key: ( - #c23435, - #fff - ) -); -$map: ( - key: ( - #d82d2d, - #666 - ), - other-key: ( - #52bf4a, - #fff - ), - other-other-key: ( - #c23435, - #fff - ) -); -$map: ( - key: ( - #d82d2d, - #666 - ), - other-key: ( - #52bf4a, - #fff - ), - other-other-key: ( - #c23435, - #fff - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); -$map: map-merge( - $map, - ( - $key: $value - ) -); - -$longVariable: ( - (mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) -); - -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); - -$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) - (0 0) (0 0); -$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") - (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") - (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") - (3.75, "3-75") (4, "4"); - -.card-column-simple { - @include breakpoint(getBp(md)) { - padding: $spacing_content-sm $spacing_content-md; - } - - @include breakpoint(getBp(md)) { - &:nth-child(2n + 3) { - clear: both; - } - } - - @include breakpoint(getBp(xl)) { - &:nth-child(2n + 3) { - clear: none; - } - &:nth-child(3n + 4) { - clear: both; - } - } -} - -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn #{$message}; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error #{$message}; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; - -$buttonConfig: "save" 50px, "cancel" 50px, "help" 100px; - -$locale: "en_us"; -html[lang="#{$locale}"] { - font-size: 10px; -} -$alertClass: "error"; -p.message-#{$alertClass} { - color: red; -} -$mediumBreakpoint: 768px; -@media (max-width: #{$mediumBreakpoint}) { - a { - font-size: 18px; - } -} - -p { - @media (max-width: 768px) { - font-size: 150%; - - @media (orientation: landscape) { - line-height: 75%; - } - } -} - -.popularAnimal { - background: gray; -} -.GoodBoy { - color: green; -} -.dog { - @extend .popularAnimal; - @extend .GoodBoy; - color: white; -} - -%animal { - background: gray; -} -.cat { - @extend %animal; - color: white; -} -.dog { - @extend %animal; - color: black; -} - -%mfw-standing-out { - font-size: 150%; - font-style: italic; - padding: 25px; -} -%mfwSlightlyShadowed { - @include box-shadow(black 2px 2px 10px); // from Compass -} -%MFWRounded { - @include border-radius(25px); // from Compass -} -#join-button { - @extend %mfw-standing-out; - @extend %mfwSlightlyShadowed; - @extend %MFWRounded; - background: green; - color: white; -} - -a { - &:hover { - color: red; - } -} -p { - body.no-touch & { - display: none; - } -} -.foo.bar .baz.bang, -.bip.qux { - $selector: &; -} -@mixin does-parent-exist { - @if & { - &:hover { - color: red; - } - } @else { - a { - color: red; - } - } -} - -p { - @if 1 + 1 == 2 { - border: 1px solid; - } - @if 5 < 3 { - border: 2px dotted; - } - @if null { - border: 3px double; - } -} - -$mosterType: monster; -p { - @if $mosterType == ocean { - color: blue; - } @else if $mosterType == matador { - color: red; - } @else if $mosterType == monster { - color: green; - } @else if $mosterType == nightKing { - color: green; - } @else if $mosterType == VeryWickedWolf { - color: green; - } @else { - color: black; - } -} - -@for $i from 1 through 3 { - .item-#{$i} { - width: 2em * $i; - } -} - -@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", - "another-string", "camelCaseString", "PascalCaseString" -{ - .#{$animal}-icon { - background-image: url("/images/#{$animal}.png"); - } -} - -$i: 6; -@while $i > 0 { - .item-#{$i} { - width: 2em * $i; - } - $i: $i - 2; -} - -@mixin cool-border($width: 10px, $coolStyle: "solid", $AwesomeColor: "black") { - border: $width $coolStyle $AwesomeColor; -} - -p { - @include cool-border(1px, "solid", $fff); -} -p { - @include cool-border($width: 1px, $coolStyle: "solid", $AwesomeColor: #fff); -} -p { - @include coolBorder(); -} - -@mixin coolBorder() { - border: 10px solid #fff; -} -p { - @include coolBorder(1px, "solid", $fff); -} - -@mixin CoolBorder() { - border: 10px solid #fff; -} -p { - @include CoolBorder(1px, "solid", $fff); -} - -@mixin box-shadow($shadows...) { - -moz-box-shadow: $shadows; - -webkit-box-shadow: $shadows; - box-shadow: $shadows; -} -.shadows { - @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); -} - -@mixin apply-to-ie6-only { - * html { - @content; - } -} -@include apply-to-ie6-only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin applyToIe6Only { - * html { - @content; - } -} -@include applyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin ApplyToIe6Only { - * html { - @content; - } -} -@include ApplyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin config-icon-colors($prefix, $colors...) { - @each $i in $colors { - .#{$prefix}#{nth($i, 1)} { - color: nth($i, 2); - } - } -} -@include config-icon-colors( - "icon-", - "save" green, - "cancel" gray, - "delete" red, - "wait" blue -); - -@function my-calculation-function($some-number, $anotherNumber, $BigNumber) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function myCalculationFunction($some-number, $anotherNumber, $BigNumber) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function AnotherMyCalculationFunction( - $some-number, - $anotherNumber, - $BigNumber: 100px -) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function border($borders...) { - @return $borders; -} -.foo { - padding: my-calculation-function(10px, 5px, 100px); - margin: myCalculationFunction( - $some-number: 10px, - $anotherNumber: 5px, - $BigNumber: 100px - ); - width: AnotherMyCalculationFunction(10px, 5px); - border: border(25px, 35px); -} - -$sm-only: "(min-width: 768px) and (max-width: 991px)"; -$lg-and-up: "(min-width: 1200px)"; - -@media screen and #{$sm-only, $lg-and-up} { - color: #000; -} - -.class-#{$var} { - #{$var}: #7b3d66; - #{$attr}-color: blue; - #{$prop}-#{$side}: $value; - background-#{$var}: #7b3d66; - animation-name: #{var}; - line-height: #{strip-unit($line-height)}em; - height: 1#{$var}; - width: calc(100% - #{$sidebar-width}); - max-width: calc(#{$m * 100}vw #{$sign} #{$b}); - font: #{$font-size}/#{$line-height}; - content: "I have #{8 + 2} books on SASS!"; - border: #{$var} #{$var} #{$var}; - filter: #{$var}#{$var}#{$var}; - prop: #{$var + $var} #{$var + $var} #{$var + $var}; - prop2: #{$var + $var} #{$var + $var} #{$var + $var}; - prop3: #{$var + $var} #{$var + $var} #{$var + $var}; - prop4: -#{$loader-icon-duration}; - prop5: +#{$loader-icon-duration}; - prop6: calc(-#{$loader-icon-duration} + 10); - prop7: calc(10 + -#{$loader-icon-duration}); -} - -/* Framework version for the generated CSS is #{$version}. */ - -.selector { - foo: bar; - #{$active} { - baz: qux; - } -} - -.el:nth-of-type(#{$i}) { -} - -@media #{$value} { -} - -$foundation-dir: "foundation"; -@import url("#{$foundation-dir}/components/grid"); -@import url(#{$foundation-dir}/components/grid); -@import url($foundation-dir/components/grid); -@import url($foundation-dir + "/components/grid"); - -@function get-font-family($family) { - @return $family; -} -@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); -@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); - -@keyframes loader { - 0% { - transform: translate3d(0, 0, 0); - } - - #{50% - $loader-icon-duration} { - transform: translate3d(0, $bounce-height, 0); - } - - 50% { - transform: translate3d(0, $bounce-height, 0) - scale( - $loader-bounce-horizontal-expansion, - $loader-bounce-vertical-compression - ); - } -} - -$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; - -@each $icon in $icons { - .icon-#{nth($icon, 1)}, - %icon-#{nth($icon, 1)} { - content: "#{nth($icon, 2)}"; - } -} - -.foo { - prop: -($grid-gutter-width / 2); - prop1: -($grid-gutter-width / 2); - prop2: -$grid-gutter-width / 2; - prop3: +($grid-gutter-width / 2); - prop4: 10px/8px; /* Plain CSS, no division */ - prop5: $width / 2; /* Uses a variable, does division */ - prop6: round(1.5) / 2; /* Uses a function, does division */ - prop7: (500px / 2); /* Uses parentheses, does division */ - prop8: 5px + 8px / 2px; //* Uses +, does division */ - prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ - prop10: #010203 + #040506; - prop11: #010203 * 2; - prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); - prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); - prop14: e + -resize; - prop15: sans- + "serif"; - prop16: 1em + (2em * 3); - prop17: rotate(-2deg); - prop18: rotate(-2deg); - _: _; - prop19: 10 - ($grid-gutter-width / 2); - prop20: 10 + -($grid-gutter-width / 2); - prop21: 10 + -($grid-gutter-width / 2); - prop22: -($grid-gutter-width / 2); - prop23: -($grid-gutter-width / 2); - prop24: -$grid-gutter-width; - prop25: +($grid-gutter-width / 2); - prop26: +($grid-gutter-width / 2); - prop27: +$grid-gutter-width; - prop28: --($grid-gutter-width / 2); - prop28: ++($grid-gutter-width / 2); - prop29: rotate(-2deg); -} - -$last: nth($juggler, length($juggler)); -$x: if($last%2==0, 1/2, 3/2); -$new: pow($last, $x); -$sequence: 1, 1 1, 2 1, 1 2 1 1, 1 1 1 2 2 1; -$new-entry: (); -$new-entry: (); -$new-entry: (); -$new-entry: (); - -body:before { - content: quote(to-string(fibonacci(100), " \\A ")); - white-space: pre-wrap; -} - -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); - -a:nth-child(#{$numPerRow}n) { - margin-right: 0; - margin-bottom: 0; -} - -@function em($pixels, $context: $browser-context) { - @return #{$pixels / $context}em; -} - -.navigation { - @extend %updated-#{$flag}; - @extend .selected-#{$flag}; - @extend %#{$item}; -} - -.icon-#{$icon-name} { - background-image: "/images/#{$icon-name}.svg"; -} - -$extmods: ( - eot: "?", - svg: "#" + str-replace($name, " ", "_") -); - -@mixin keyframes { - @-moz-keyframes { - @content; - } - @-webkit-keyframes { - @content; - } -} - -@function gcd($a, $b) { - // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript - @if ($b != 0) { - @return gcd($b, $a % $b); - } @else { - @return abs($a); - } -} - -$colors: ( - primary: ( - base: #00abc9, - light: #daf1f6, - dark: #12799a - ), - secondary: ( - base: #424d55, - light: #ccc, - lightest: #efefef, - dark: #404247 - ), - success: ( - base: #bbd33e, - light: #eaf0c6 - ) -); - -@function color($color, $tone: "base") { - @return map-get(map-get($colors, $color), $tone); -} - -@media only screen and (max-width: 767px) { - @include widths(2 3 4, \\@small); -} - -$widths-breakpoint-separator: \\@small; - -a { - transition-timing-function: func1( - func2( - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ) - ); -} - -$empty-map: (); -$empty-nested-map: ( - nested-key: ( - empty-key: ( - color: red - ) - ), - empty-key: (), - empty-key: (), - empty-key: () -); - -$o-grid-default-config: ( - columns: 12, - gutter: 10px, - min-width: 240px, - max-width: 1330px, - layouts: ( - S: 370px, - M: 610px, - L: 850px, - XL: 1090px - ), - fluid: true, - debug: false, - fixed-layout: M, - enhanced-experience: true -); - -$a: (); -$b: unquote(""); -$c: null; -$d: (null); - -$threads-properties: map-merge( - $threads-properties, - ( - $border-label: () - ) -); -$o-grid-default-config: ( - layouts: ( - S: 370px - ) -); - -$map: ( - key: ( - value - ), - other-key: ( - key: other-other-value - ) -); - -a { - content: "#{"0.5"}"; - content: my-fn("_"); - content: "#{my-fn("_")}"; - content: my-fn("-"); - content: "#{my-fn("-")}"; - content: my-fn("-a"); - content: "#{my-fn("-a")}"; - content: my-fn("a-"); - content: "#{my-fn("a-")}"; - content: my-fn("foo"); - content: "#{my-fn("foo")}"; - content: 1 "#{my-fn("foo")}" 2; - content: foo "#{my-fn("foo")}" bar; - content: "foo #{$description} bar"; - - content: "#{my-fn("foo","bar")}"; - content: "#{my-fn( "foo" , "bar" )}"; - content: "#{my-fn( "foo" , "bar" )}"; - - content: '#{my-fn("foo")}'; - content: "#{my-fn("foo")}"; - content: "#{my-fn('foo')}"; - content: "#{my-fn("foo")}"; -} - -@mixin theme($css-property, $css-value, $theme-classes: t) { - @each $selector in & { - @each $class in $theme-classes { - @each $theme, $theme-properties in c(themes) { - $value: $css-value; - - @each $theme-name, $theme-value in $theme-properties { - $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; - $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); - $value: str-replace($value, "\${#{$theme-name}}", $theme-value); - } - - @at-root .#{$class}-#{join($theme, $selector)} { - #{$css-property}: unquote($value); - } - } - } - } -} - -.foo, -// Comment -.bar { - // Comment - color: red; // Comment -} - -$my-list: "foo", - // Comment - "bar"; // Comment - -$my-map: ( - "foo": 1, - // Comment - "bar": 2, - // Comment - "buz": calc(1 + 2), - // Buz - "baz": 4, - // Baz -); - -[href]:hover &, // Comment -[href]:focus &, // Comment -[href]:active & { - .tooltip { - opacity: 1; - } -} - -@import // Comment - "mixins", - "variables", - // Comment - "reset", - "scaffolding", "type", - // Comment - "bar", - "tabs"; - -@mixin placeholder { - &::placeholder { - @content; - } -} - -.container { - @include placeholder { - color: $color-silver; - } -} - -.something { - grid-template-columns: 1 2fr (3 + 4); -} - -// Ignore escape "\\" in SCSS mixins -@mixin margin-bottom-1\\/3 { - margin-bottom: 0.8rem; -} - -label { - @include margin-bottom-1\\/3; -} - -@function someVeryLongFunctionNameForJustAPow($base, $exponent) { - $result: 1; - @for $_ from 1 through $exponent { - $result: $result * $base; - } - @return $result; -} - -@function pow($base, $exponent) { - @return someVeryLongFunctionNameForJustAPow($base, $exponent); -} - -.foo { - width: someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - // This next pow is really powerful - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow(2, 2) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ); -} - -.bar { - width: pow( - 2, - pow( - 2, - pow( - 2, - // This next pow is really powerful - pow( - 2, - pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))) - ) - ) - ) - ); -} - -================================================================================ -`; - -exports[`scss.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -@media #{$g-breakpoint-tiny} {} -.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; } -a {height: calc(#{$foo} + 1);} -div { - background: { - size: auto 60%; - position: bottom 2px left; - } -} -a { margin: 0 { left: 10px; } } - -$default: #111111 !default; -$default: #111111 !default; -$default: #111111 -!default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!default; - -$global: #111111 !global; -$global: #111111 !global; -$global: #111111 -!global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!global; - -$map: (key: value, other-key: other-value); -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) -!default; -$map: -(key: value, other-key: other-value) -!default; -$map: ( key : value , other-key : other-value); -$map: ( key : value , other-key : other-value ); -$map: ( - key: value, - other-key: other-value -); -$map: ( -key: value, -other-key: other-value -); -$map: ( -key -: -value, -other-key -: -other-value -); -$map: ( -key -: -value -, -other-key -: -other-value -); -$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: -( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value -, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - key: (#d82d2d, #666), - other-key: (#52bf4a, #fff), - other-other-key: (#c23435, #fff) -); -$map: ( -key: (#d82d2d, #666), -other-key: (#52bf4a, #fff), -other-other-key: (#c23435, #fff) -); -$map: ( - key : ( #d82d2d , #666 ), - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( - key : ( #d82d2d , #666 ) , - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( -key -: -( -#d82d2d, -#666 -) -, -other-key -: -( -#52bf4a, -#fff -) -, -other-other-key -: -( -#c23435 -, -#fff -) -); -$map: map-merge($map, ($key: $value)); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( - $map, - ($key: $value) -); -$map: map-merge( -$map, -($key: $value) -); -$map: -map-merge( -$map -, -( -$key -: -$value -) -); - -$longVariable: ( -(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) -); - -$list-space: "item-1" "item-2" "item-3"; -$list-space:"item-1""item-2""item-3"; -$list-space: "item-1" "item-2" "item-3" ; -$list-space: "item-1" - "item-2" - "item-3"; -$list-space -: -"item-1" -"item-2" -"item-3" -; -$list-space - -: - -"item-1" - -"item-2" - -"item-3" - -; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma:"item-1","item-2","item-3"; -$list-comma: "item-1" , "item-2" , "item-3" ; -$list-comma: "item-1", - "item-2", - "item-3"; -$list-comma -: -"item-1" -, -"item-2" -, -"item-3" -; -$list-comma - -: - -"item-1" - -, - -"item-2" - -, - -"item-3" - -; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; -$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; -$list: "item-1.1" "item-1.2" "item-1.3", - "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list -: -"item-1.1" -"item-1.2" -"item-1.3" -, -"item-2.1" -"item-2.2" -"item-2.3" -, -"item-3.1" -"item-3.2" -"item-3.3" -; -$list - -: - -"item-1.1" - -"item-1.2" - -"item-1.3" - -, - -"item-2.1" - -"item-2.2" - -"item-2.3" - -, - -"item-3.1" - -"item-3.2" - -"item-3.3" - -; -$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); -$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); -$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list -: -( -( -"item-1.1" -, -"item-1.2" -, -"item-1.3" -) -, -( -"item-2.1" -, -"item-2.2" -, -"item-2.3" -) -, -( -"item-3.1" -, -"item-3.2" -, -"item-3.3" -) -) -; -$list - -: - -( - -( - -"item-1.1" - -, - -"item-1.2" - -, - -"item-1.3" - -) - -, - -( - -"item-2.1" - -, - -"item-2.2" - -, - -"item-2.3" - -) - -, - -( - -"item-3.1" - -, - -"item-3.2" - -, - -"item-3.3" - -) - -) - -; - -$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); -$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); - -.card-column-simple { - @include breakpoint( getBp( md ) ) { - padding: $spacing_content-sm $spacing_content-md; - } - - @include breakpoint (getBp(md)) { - &:nth-child(2n + 3) { - clear: both; - } - } - - @include breakpoint (getBp(xl)) { - &:nth-child(2n + 3) { - clear: none; - } - &:nth-child(3n + 4) { - clear: both; - } - } -} - -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn #{$message}; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@warn - "Very long long long long long long long long long long long long long line (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error #{$message}; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; -@error - "Very long long long long long long long long long long long long long line Error (#{$message})."; - -$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; - -$locale: "en_us"; -html[lang=#{$locale}] { - font-size: 10px; -} -$alertClass: "error"; -p.message-#{$alertClass} { - color: red; -} -$mediumBreakpoint: 768px; -@media (max-width: #{$mediumBreakpoint}) { - a { - font-size: 18px; - } -} - -p { - @media (max-width: 768px) { - font-size: 150%; - - @media (orientation: landscape) { - line-height: 75%; - } - } -} - -.popularAnimal { - background: gray; -} -.GoodBoy { - color: green; -} -.dog { - @extend .popularAnimal; - @extend .GoodBoy; - color: white; -} - -%animal { - background: gray; -} -.cat { - @extend %animal; - color: white; -} -.dog { - @extend %animal; - color: black; -} - -%mfw-standing-out { - font-size: 150%; - font-style: italic; - padding: 25px; -} -%mfwSlightlyShadowed { - @include box-shadow(black 2px 2px 10px); // from Compass -} -%MFWRounded { - @include border-radius(25px); // from Compass -} -#join-button { - @extend %mfw-standing-out; - @extend %mfwSlightlyShadowed; - @extend %MFWRounded; - background: green; - color: white; -} - -a { - &:hover { - color: red; - } -} -p { - body.no-touch & { - display: none; - } -} -.foo.bar .baz.bang, .bip.qux { - $selector: &; -} -@mixin does-parent-exist { - @if & { - &:hover { - color: red; - } - } @else { - a { - color: red; - } - } -} - -p { - @if 1 + 1 == 2 { - border: 1px solid; - } - @if 5 < 3 { - border: 2px dotted; - } - @if null { - border: 3px double; - } -} - -$mosterType: monster; -p { - @if $mosterType == ocean { - color: blue; - } @else if $mosterType == matador { - color: red; - } @else if $mosterType == monster { - color: green; - } @else if $mosterType == nightKing { - color: green; - } @else if $mosterType == VeryWickedWolf { - color: green; - } @else { - color: black; - } -} - -@for $i from 1 through 3 { - .item-#{$i} { - width: 2em * $i; - } -} - -@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { - .#{$animal}-icon { - background-image: url('/images/#{$animal}.png'); - } -} - -$i: 6; -@while $i > 0 { - .item-#{$i} { - width: 2em * $i; - } - $i: $i - 2; -} - -@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { - border: $width $coolStyle $AwesomeColor; -} - -p { - @include cool-border(1px, "solid", $fff); -} -p { - @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); -} -p { - @include coolBorder(); -} - -@mixin coolBorder() { - border: 10px solid #fff; -} -p { - @include coolBorder(1px, "solid", $fff); -} - -@mixin CoolBorder() { - border: 10px solid #fff; -} -p { - @include CoolBorder(1px, "solid", $fff); -} - -@mixin box-shadow($shadows...) { - -moz-box-shadow: $shadows; - -webkit-box-shadow: $shadows; - box-shadow: $shadows; -} -.shadows { - @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); -} - -@mixin apply-to-ie6-only { - * html { - @content; - } -} -@include apply-to-ie6-only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin applyToIe6Only { - * html { - @content; - } -} -@include applyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin ApplyToIe6Only { - * html { - @content; - } -} -@include ApplyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin config-icon-colors($prefix, $colors...) { - @each $i in $colors { - .#{$prefix}#{nth($i, 1)} { - color: nth($i, 2); - } - } -} -@include config-icon-colors( - "icon-", - "save" green, - "cancel" gray, - "delete" red, - 'wait' blue -); - -@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function border($borders...) { - @return $borders; -} -.foo { - padding: my-calculation-function(10px, 5px, 100px); - margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); - width: AnotherMyCalculationFunction(10px, 5px); - border: border(25px, 35px); -} - -$sm-only: '(min-width: 768px) and (max-width: 991px)'; -$lg-and-up: '(min-width: 1200px)'; - -@media screen and #{$sm-only, $lg-and-up} { - color: #000; -} - -.class-#{$var} { - #{$var}: #7b3d66; - #{$attr}-color: blue; - #{$prop}-#{$side}: $value; - background-#{$var}: #7b3d66; - animation-name: #{var}; - line-height: #{strip-unit($line-height)}em; - height: 1#{$var}; - width: calc(100% - #{$sidebar-width}); - max-width: calc(#{$m*100}vw #{$sign} #{$b}); - font: #{$font-size}/#{$line-height}; - content: "I have #{8 + 2} books on SASS!"; - border: #{$var} #{$var} #{$var}; - filter: #{$var}#{$var}#{$var}; - prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; - prop2: - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - ; - prop3: - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - ; - prop4: -#{$loader-icon-duration}; - prop5: +#{$loader-icon-duration}; - prop6: calc(-#{$loader-icon-duration} + 10); - prop7: calc(10 + -#{$loader-icon-duration}); -} - -/* Framework version for the generated CSS is #{$version}. */ - -.selector { - foo: bar; - #{$active} { - baz: qux; - } -} - -.el:nth-of-type(#{$i}) {} - -@media #{$value} {} - -$foundation-dir: 'foundation'; -@import url('#{$foundation-dir}/components/grid'); -@import url(#{$foundation-dir}/components/grid); -@import url($foundation-dir/components/grid); -@import url($foundation-dir+"/components/grid"); - -@function get-font-family($family) { - @return $family; -} -@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); -@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); - - -@keyframes loader { - 0% { - transform: translate3d(0, 0, 0); - } - - #{50% - $loader-icon-duration} { - transform: translate3d(0, $bounce-height, 0); - } - - 50% { - transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); - } -} - -$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; - -@each $icon in $icons { - .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { - content: "#{nth($icon, 2)}"; - } -} - -.foo { - prop: -($grid-gutter-width / 2); - prop1: -( $grid-gutter-width / 2 ); - prop2: -$grid-gutter-width / 2; - prop3: +($grid-gutter-width / 2); - prop4: 10px/8px; /* Plain CSS, no division */ - prop5: $width / 2; /* Uses a variable, does division */ - prop6: round(1.5) / 2; /* Uses a function, does division */ - prop7: (500px / 2); /* Uses parentheses, does division */ - prop8: 5px + 8px / 2px; //* Uses +, does division */ - prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ - prop10: #010203 + #040506; - prop11: #010203 * 2; - prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); - prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); - prop14: e + -resize; - prop15: sans- + "serif"; - prop16: 1em + (2em * 3); - prop17: rotate(-2deg); - prop18: rotate( -2deg ) ; - _:_; - prop19: 10 - ($grid-gutter-width / 2); - prop20: 10 + -($grid-gutter-width / 2); - prop21: 10 + - ( $grid-gutter-width / 2 ) ; - prop22: - ( $grid-gutter-width / 2 ) ; - prop23: - ( $grid-gutter-width / 2 ) ; - prop24: -$grid-gutter-width; - prop25: + ( $grid-gutter-width / 2 ) ; - prop26: + ( $grid-gutter-width / 2 ) ; - prop27: +$grid-gutter-width; - prop28: --($grid-gutter-width / 2); - prop28: ++($grid-gutter-width / 2); - prop29: rotate( - 2deg ) ; -} - -$last:nth($juggler,length($juggler)); -$x:if($last%2==0,1/2,3/2); -$new:pow($last,$x); -$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; -$new-entry:(); -$new-entry : ( ) ; -$new-entry : ( ) ; -$new-entry -: -( -) -; - -body:before { - content: quote(to-string(fibonacci(100), ' \\A ')); - white-space: pre-wrap; -} - -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); -width -: -( -( -100% -- -( -( -$numPerRow -- -1 -) -* -$margin -) -) -/ -$numPerRow -) -; - -a:nth-child(#{$numPerRow}n) { - margin-right: 0; - margin-bottom: 0; -} - -@function em($pixels, $context: $browser-context) { - @return #{ $pixels / $context }em -} - -.navigation { - @extend %updated-#{$flag}; - @extend .selected-#{$flag}; - @extend %#{$item}; -} - -.icon-#{$icon-name} { - background-image: '/images/#{$icon-name}.svg'; -} - -$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); - -@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} - -@function gcd($a,$b){ - // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript - @if ($b != 0) { - @return gcd($b,$a % $b); - }@else{ - @return abs($a); - } -} - -$colors: ( -primary: ( -base: #00abc9, -light: #daf1f6, -dark: #12799a -), -secondary: ( -base: #424d55, -light: #ccc, -lightest: #efefef, -dark: #404247 -), -success: ( -base: #bbd33e, -light: #eaf0c6 -) -); - -@function color($color, $tone: "base") { -@return map-get(map-get($colors, $color), $tone); -} - -@media only screen and (max-width: 767px) { - @include widths(2 3 4, \\@small); -} - -$widths-breakpoint-separator: \\@small; - -a { - transition-timing-function: func1( - func2( - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ) - ); -} - -$empty-map: (); -$empty-nested-map: ( -nested-key: (empty-key: (color: red)), -empty-key: (), -empty-key: (), -empty-key: () -); - -$o-grid-default-config: ( -columns: 12, -gutter: 10px, -min-width: 240px, -max-width: 1330px, -layouts: ( -S: 370px, -M: 610px, -L: 850px, -XL: 1090px -), -fluid: true, -debug: false, -fixed-layout: M, -enhanced-experience: true -); - -$a: (); -$b: unquote(''); -$c: null; -$d: (null); - -$threads-properties: map-merge($threads-properties, ($border-label: ())); -$o-grid-default-config: (layouts: (S: 370px)); - -$map: ( -key: (value), -other-key: (key: other-other-value) -); - -a { - content: "#{".5"}"; - content: my-fn("_"); - content: "#{my-fn("_")}"; - content: my-fn("-"); - content: "#{my-fn("-")}"; - content: my-fn("-a"); - content: "#{my-fn("-a")}"; - content: my-fn("a-"); - content: "#{my-fn("a-")}"; - content: my-fn("foo"); - content: "#{my-fn("foo")}"; - content: 1 "#{my-fn("foo")}" 2; - content: foo "#{my-fn("foo")}" bar; - content: "foo #{$description} bar"; - - content: "#{my-fn("foo","bar")}"; - content: "#{my-fn( "foo" , "bar" )}"; - content: "#{my-fn( "foo" , "bar" )}"; - - content: '#{my-fn("foo")}'; - content: '#{my-fn('foo')}'; - content: "#{my-fn('foo')}"; - content: "#{my-fn("foo")}"; -} - -@mixin theme($css-property, $css-value, $theme-classes: t) { - @each $selector in & { - @each $class in $theme-classes { - @each $theme, $theme-properties in c(themes) { - $value: $css-value; - - @each $theme-name, $theme-value in $theme-properties { - $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; - $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); - $value: str-replace($value, "\${#{$theme-name}}", $theme-value); - } - - @at-root .#{$class}-#{join($theme, $selector)} { - #{$css-property}: unquote($value); - } - } - } - } -} - -.foo, -// Comment -.bar { - // Comment - color: red; // Comment -} - -$my-list: - 'foo', // Comment - 'bar'; // Comment - -$my-map: ( - 'foo': 1, // Comment - 'bar': 2, // Comment - 'buz': calc(1 + 2), // Buz - 'baz': 4, // Baz -); - -[href]:hover &, // Comment -[href]:focus &, // Comment -[href]:active & { - .tooltip { - opacity: 1; - } -} - -@import - // Comment - 'mixins', - 'variables', - // Comment - 'reset', - 'scaffolding', - 'type', - // Comment - 'bar', - 'tabs'; - -@mixin placeholder { - &::placeholder {@content} -} - -.container { - @include placeholder { - color: $color-silver; - } -} - -.something { - grid-template-columns: 1 2fr (3 + 4); -} - -// Ignore escape "\\" in SCSS mixins -@mixin margin-bottom-1\\/3 { - margin-bottom: 0.8rem; -} - -label { - @include margin-bottom-1\\/3; -} - -@function someVeryLongFunctionNameForJustAPow($base, $exponent) { - $result: 1; - @for $_ from 1 through $exponent { - $result: $result * $base; - } - @return $result; -} - -@function pow($base, $exponent){ - @return someVeryLongFunctionNameForJustAPow($base,$exponent); -} - -.foo{ - width: someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, - // This next pow is really powerful - someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, 2)))))))))))) -} - -.bar{ - width: pow(2, pow(2, pow(2, - // This next pow is really powerful - pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))))))) -} - -=====================================output===================================== -@media #{$g-breakpoint-tiny} { -} -.#{$fa-css-prefix}-glass:before { - content: $fa-var-glass; -} -a { - height: calc(#{$foo} + 1); -} -div { - background: { - size: auto 60%; - position: bottom 2px left; - } -} -a { - margin: 0 { - left: 10px; - } -} - -$default: #111111 !default; -$default: #111111 !default; -$default: #111111 !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; - -$global: #111111 !global; -$global: #111111 !global; -$global: #111111 !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; - -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -) !default; -$map: ( - key: value, - other-key: other-value, -) !default; -$map: ( - key: value, - other-key: other-value, -) !default; -$map: ( - key: value, - other-key: other-value, -) !default; -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -); -$map: ( - key: value, - other-key: other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value, -); -$map: ( - key: ( - #d82d2d, - #666, - ), - other-key: ( - #52bf4a, - #fff, - ), - other-other-key: ( - #c23435, - #fff, - ), -); -$map: ( - key: ( - #d82d2d, - #666, - ), - other-key: ( - #52bf4a, - #fff, - ), - other-other-key: ( - #c23435, - #fff, - ), -); -$map: ( - key: ( - #d82d2d, - #666, - ), - other-key: ( - #52bf4a, - #fff, - ), - other-other-key: ( - #c23435, - #fff, - ), -); -$map: ( - key: ( - #d82d2d, - #666, - ), - other-key: ( - #52bf4a, - #fff, - ), - other-other-key: ( - #c23435, - #fff, - ), -); -$map: ( - key: ( - #d82d2d, - #666, - ), - other-key: ( - #52bf4a, - #fff, - ), - other-other-key: ( - #c23435, - #fff, - ), -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); -$map: map-merge( - $map, - ( - $key: $value, - ) -); - -$longVariable: ( - (mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) -); - -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-space: "item-1" "item-2" "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma: "item-1", "item-2", "item-3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); - -$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) - (0 0) (0 0); -$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") - (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") - (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") - (3.75, "3-75") (4, "4"); - -.card-column-simple { - @include breakpoint(getBp(md)) { - padding: $spacing_content-sm $spacing_content-md; - } - - @include breakpoint(getBp(md)) { - &:nth-child(2n + 3) { - clear: both; - } - } - - @include breakpoint(getBp(xl)) { - &:nth-child(2n + 3) { - clear: none; - } - &:nth-child(3n + 4) { - clear: both; - } - } -} - -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn #{$message}; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error #{$message}; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; - -$buttonConfig: "save" 50px, "cancel" 50px, "help" 100px; - -$locale: "en_us"; -html[lang="#{$locale}"] { - font-size: 10px; -} -$alertClass: "error"; -p.message-#{$alertClass} { - color: red; -} -$mediumBreakpoint: 768px; -@media (max-width: #{$mediumBreakpoint}) { - a { - font-size: 18px; - } -} - -p { - @media (max-width: 768px) { - font-size: 150%; - - @media (orientation: landscape) { - line-height: 75%; - } - } -} - -.popularAnimal { - background: gray; -} -.GoodBoy { - color: green; -} -.dog { - @extend .popularAnimal; - @extend .GoodBoy; - color: white; -} - -%animal { - background: gray; -} -.cat { - @extend %animal; - color: white; -} -.dog { - @extend %animal; - color: black; -} - -%mfw-standing-out { - font-size: 150%; - font-style: italic; - padding: 25px; -} -%mfwSlightlyShadowed { - @include box-shadow(black 2px 2px 10px); // from Compass -} -%MFWRounded { - @include border-radius(25px); // from Compass -} -#join-button { - @extend %mfw-standing-out; - @extend %mfwSlightlyShadowed; - @extend %MFWRounded; - background: green; - color: white; -} - -a { - &:hover { - color: red; - } -} -p { - body.no-touch & { - display: none; - } -} -.foo.bar .baz.bang, -.bip.qux { - $selector: &; -} -@mixin does-parent-exist { - @if & { - &:hover { - color: red; - } - } @else { - a { - color: red; - } - } -} - -p { - @if 1 + 1 == 2 { - border: 1px solid; - } - @if 5 < 3 { - border: 2px dotted; - } - @if null { - border: 3px double; - } -} - -$mosterType: monster; -p { - @if $mosterType == ocean { - color: blue; - } @else if $mosterType == matador { - color: red; - } @else if $mosterType == monster { - color: green; - } @else if $mosterType == nightKing { - color: green; - } @else if $mosterType == VeryWickedWolf { - color: green; - } @else { - color: black; - } -} - -@for $i from 1 through 3 { - .item-#{$i} { - width: 2em * $i; - } -} - -@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", - "another-string", "camelCaseString", "PascalCaseString" -{ - .#{$animal}-icon { - background-image: url("/images/#{$animal}.png"); - } -} - -$i: 6; -@while $i > 0 { - .item-#{$i} { - width: 2em * $i; - } - $i: $i - 2; -} - -@mixin cool-border($width: 10px, $coolStyle: "solid", $AwesomeColor: "black") { - border: $width $coolStyle $AwesomeColor; -} - -p { - @include cool-border(1px, "solid", $fff); -} -p { - @include cool-border($width: 1px, $coolStyle: "solid", $AwesomeColor: #fff); -} -p { - @include coolBorder(); -} - -@mixin coolBorder() { - border: 10px solid #fff; -} -p { - @include coolBorder(1px, "solid", $fff); -} - -@mixin CoolBorder() { - border: 10px solid #fff; -} -p { - @include CoolBorder(1px, "solid", $fff); -} - -@mixin box-shadow($shadows...) { - -moz-box-shadow: $shadows; - -webkit-box-shadow: $shadows; - box-shadow: $shadows; -} -.shadows { - @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); -} - -@mixin apply-to-ie6-only { - * html { - @content; - } -} -@include apply-to-ie6-only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin applyToIe6Only { - * html { - @content; - } -} -@include applyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin ApplyToIe6Only { - * html { - @content; - } -} -@include ApplyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin config-icon-colors($prefix, $colors...) { - @each $i in $colors { - .#{$prefix}#{nth($i, 1)} { - color: nth($i, 2); - } - } -} -@include config-icon-colors( - "icon-", - "save" green, - "cancel" gray, - "delete" red, - "wait" blue -); - -@function my-calculation-function($some-number, $anotherNumber, $BigNumber) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function myCalculationFunction($some-number, $anotherNumber, $BigNumber) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function AnotherMyCalculationFunction( - $some-number, - $anotherNumber, - $BigNumber: 100px -) { - @return $some-number + $anotherNumber + $BigNumber; -} -@function border($borders...) { - @return $borders; -} -.foo { - padding: my-calculation-function(10px, 5px, 100px); - margin: myCalculationFunction( - $some-number: 10px, - $anotherNumber: 5px, - $BigNumber: 100px - ); - width: AnotherMyCalculationFunction(10px, 5px); - border: border(25px, 35px); -} - -$sm-only: "(min-width: 768px) and (max-width: 991px)"; -$lg-and-up: "(min-width: 1200px)"; - -@media screen and #{$sm-only, $lg-and-up} { - color: #000; -} - -.class-#{$var} { - #{$var}: #7b3d66; - #{$attr}-color: blue; - #{$prop}-#{$side}: $value; - background-#{$var}: #7b3d66; - animation-name: #{var}; - line-height: #{strip-unit($line-height)}em; - height: 1#{$var}; - width: calc(100% - #{$sidebar-width}); - max-width: calc(#{$m * 100}vw #{$sign} #{$b}); - font: #{$font-size}/#{$line-height}; - content: "I have #{8 + 2} books on SASS!"; - border: #{$var} #{$var} #{$var}; - filter: #{$var}#{$var}#{$var}; - prop: #{$var + $var} #{$var + $var} #{$var + $var}; - prop2: #{$var + $var} #{$var + $var} #{$var + $var}; - prop3: #{$var + $var} #{$var + $var} #{$var + $var}; - prop4: -#{$loader-icon-duration}; - prop5: +#{$loader-icon-duration}; - prop6: calc(-#{$loader-icon-duration} + 10); - prop7: calc(10 + -#{$loader-icon-duration}); -} - -/* Framework version for the generated CSS is #{$version}. */ - -.selector { - foo: bar; - #{$active} { - baz: qux; - } -} - -.el:nth-of-type(#{$i}) { -} - -@media #{$value} { -} - -$foundation-dir: "foundation"; -@import url("#{$foundation-dir}/components/grid"); -@import url(#{$foundation-dir}/components/grid); -@import url($foundation-dir/components/grid); -@import url($foundation-dir + "/components/grid"); - -@function get-font-family($family) { - @return $family; -} -@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); -@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); - -@keyframes loader { - 0% { - transform: translate3d(0, 0, 0); - } - - #{50% - $loader-icon-duration} { - transform: translate3d(0, $bounce-height, 0); - } - - 50% { - transform: translate3d(0, $bounce-height, 0) - scale( - $loader-bounce-horizontal-expansion, - $loader-bounce-vertical-compression - ); - } -} - -$icons: wifi "\\600", wifi-hotspot "\\601", weather "\\602"; - -@each $icon in $icons { - .icon-#{nth($icon, 1)}, - %icon-#{nth($icon, 1)} { - content: "#{nth($icon, 2)}"; - } -} - -.foo { - prop: -($grid-gutter-width / 2); - prop1: -($grid-gutter-width / 2); - prop2: -$grid-gutter-width / 2; - prop3: +($grid-gutter-width / 2); - prop4: 10px/8px; /* Plain CSS, no division */ - prop5: $width / 2; /* Uses a variable, does division */ - prop6: round(1.5) / 2; /* Uses a function, does division */ - prop7: (500px / 2); /* Uses parentheses, does division */ - prop8: 5px + 8px / 2px; //* Uses +, does division */ - prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ - prop10: #010203 + #040506; - prop11: #010203 * 2; - prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); - prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); - prop14: e + -resize; - prop15: sans- + "serif"; - prop16: 1em + (2em * 3); - prop17: rotate(-2deg); - prop18: rotate(-2deg); - _: _; - prop19: 10 - ($grid-gutter-width / 2); - prop20: 10 + -($grid-gutter-width / 2); - prop21: 10 + -($grid-gutter-width / 2); - prop22: -($grid-gutter-width / 2); - prop23: -($grid-gutter-width / 2); - prop24: -$grid-gutter-width; - prop25: +($grid-gutter-width / 2); - prop26: +($grid-gutter-width / 2); - prop27: +$grid-gutter-width; - prop28: --($grid-gutter-width / 2); - prop28: ++($grid-gutter-width / 2); - prop29: rotate(-2deg); -} - -$last: nth($juggler, length($juggler)); -$x: if($last%2==0, 1/2, 3/2); -$new: pow($last, $x); -$sequence: 1, 1 1, 2 1, 1 2 1 1, 1 1 1 2 2 1; -$new-entry: (); -$new-entry: (); -$new-entry: (); -$new-entry: (); - -body:before { - content: quote(to-string(fibonacci(100), " \\A ")); - white-space: pre-wrap; -} - -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); - -a:nth-child(#{$numPerRow}n) { - margin-right: 0; - margin-bottom: 0; -} - -@function em($pixels, $context: $browser-context) { - @return #{$pixels / $context}em; -} - -.navigation { - @extend %updated-#{$flag}; - @extend .selected-#{$flag}; - @extend %#{$item}; -} - -.icon-#{$icon-name} { - background-image: "/images/#{$icon-name}.svg"; -} - -$extmods: ( - eot: "?", - svg: "#" + str-replace($name, " ", "_"), -); - -@mixin keyframes { - @-moz-keyframes { - @content; - } - @-webkit-keyframes { - @content; - } -} - -@function gcd($a, $b) { - // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript - @if ($b != 0) { - @return gcd($b, $a % $b); - } @else { - @return abs($a); - } -} - -$colors: ( - primary: ( - base: #00abc9, - light: #daf1f6, - dark: #12799a, - ), - secondary: ( - base: #424d55, - light: #ccc, - lightest: #efefef, - dark: #404247, - ), - success: ( - base: #bbd33e, - light: #eaf0c6, - ), -); - -@function color($color, $tone: "base") { - @return map-get(map-get($colors, $color), $tone); -} - -@media only screen and (max-width: 767px) { - @include widths(2 3 4, \\@small); -} - -$widths-breakpoint-separator: \\@small; - -a { - transition-timing-function: func1( - func2( - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ) - ); -} - -$empty-map: (); -$empty-nested-map: ( - nested-key: ( - empty-key: ( - color: red, - ), - ), - empty-key: (), - empty-key: (), - empty-key: (), -); - -$o-grid-default-config: ( - columns: 12, - gutter: 10px, - min-width: 240px, - max-width: 1330px, - layouts: ( - S: 370px, - M: 610px, - L: 850px, - XL: 1090px, - ), - fluid: true, - debug: false, - fixed-layout: M, - enhanced-experience: true, -); - -$a: (); -$b: unquote(""); -$c: null; -$d: (null); - -$threads-properties: map-merge( - $threads-properties, - ( - $border-label: (), - ) -); -$o-grid-default-config: ( - layouts: ( - S: 370px, - ), -); - -$map: ( - key: ( - value, - ), - other-key: ( - key: other-other-value, - ), -); - -a { - content: "#{"0.5"}"; - content: my-fn("_"); - content: "#{my-fn("_")}"; - content: my-fn("-"); - content: "#{my-fn("-")}"; - content: my-fn("-a"); - content: "#{my-fn("-a")}"; - content: my-fn("a-"); - content: "#{my-fn("a-")}"; - content: my-fn("foo"); - content: "#{my-fn("foo")}"; - content: 1 "#{my-fn("foo")}" 2; - content: foo "#{my-fn("foo")}" bar; - content: "foo #{$description} bar"; - - content: "#{my-fn("foo","bar")}"; - content: "#{my-fn( "foo" , "bar" )}"; - content: "#{my-fn( "foo" , "bar" )}"; - - content: '#{my-fn("foo")}'; - content: "#{my-fn("foo")}"; - content: "#{my-fn('foo')}"; - content: "#{my-fn("foo")}"; -} - -@mixin theme($css-property, $css-value, $theme-classes: t) { - @each $selector in & { - @each $class in $theme-classes { - @each $theme, $theme-properties in c(themes) { - $value: $css-value; - - @each $theme-name, $theme-value in $theme-properties { - $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; - $value: str-replace($value, "rgba(\${#{$theme-name}}", $rgba-value); - $value: str-replace($value, "\${#{$theme-name}}", $theme-value); - } - - @at-root .#{$class}-#{join($theme, $selector)} { - #{$css-property}: unquote($value); - } - } - } - } -} - -.foo, -// Comment -.bar { - // Comment - color: red; // Comment -} - -$my-list: "foo", - // Comment - "bar"; // Comment - -$my-map: ( - "foo": 1, - // Comment - "bar": 2, - // Comment - "buz": calc(1 + 2), - // Buz - "baz": 4, - // Baz -); - -[href]:hover &, // Comment -[href]:focus &, // Comment -[href]:active & { - .tooltip { - opacity: 1; - } -} - -@import // Comment - "mixins", - "variables", - // Comment - "reset", - "scaffolding", "type", - // Comment - "bar", - "tabs"; - -@mixin placeholder { - &::placeholder { - @content; - } -} - -.container { - @include placeholder { - color: $color-silver; - } -} - -.something { - grid-template-columns: 1 2fr (3 + 4); -} - -// Ignore escape "\\" in SCSS mixins -@mixin margin-bottom-1\\/3 { - margin-bottom: 0.8rem; -} - -label { - @include margin-bottom-1\\/3; -} - -@function someVeryLongFunctionNameForJustAPow($base, $exponent) { - $result: 1; - @for $_ from 1 through $exponent { - $result: $result * $base; - } - @return $result; -} - -@function pow($base, $exponent) { - @return someVeryLongFunctionNameForJustAPow($base, $exponent); -} - -.foo { - width: someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - // This next pow is really powerful - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow( - 2, - someVeryLongFunctionNameForJustAPow(2, 2) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ); -} - -.bar { - width: pow( - 2, - pow( - 2, - pow( - 2, - // This next pow is really powerful - pow( - 2, - pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))) - ) - ) - ) - ); -} - -================================================================================ -`; - -exports[`string-concatanation.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -a { - background-image: url($test-path + $test-path); - background-image: url($test-path + 'static/test.jpg'); - background-image: url('../test/' + $test-path); - background-image: url('../test/' + 'static/test.jpg'); - background-image: url($test-path+$test-path); -} - -=====================================output===================================== -a { - background-image: url($test-path + $test-path); - background-image: url($test-path + "static/test.jpg"); - background-image: url("../test/" + $test-path); - background-image: url("../test/" + "static/test.jpg"); - background-image: url($test-path + $test-path); -} - -================================================================================ -`; - -exports[`string-concatanation.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { - background-image: url($test-path + $test-path); - background-image: url($test-path + 'static/test.jpg'); - background-image: url('../test/' + $test-path); - background-image: url('../test/' + 'static/test.jpg'); - background-image: url($test-path+$test-path); -} - -=====================================output===================================== -a { - background-image: url($test-path + $test-path); - background-image: url($test-path + "static/test.jpg"); - background-image: url("../test/" + $test-path); - background-image: url("../test/" + "static/test.jpg"); - background-image: url($test-path + $test-path); -} - -================================================================================ -`; diff --git a/tests/format/scss/scss/format.test.js b/tests/format/scss/scss/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/scss/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/scss/jsfmt.spec.js b/tests/format/scss/scss/jsfmt.spec.js deleted file mode 100644 index f2558a4a9996..000000000000 --- a/tests/format/scss/scss/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["scss"], { trailingComma: "none" }); -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/scss/scss.scss b/tests/format/scss/scss/scss.scss index b5b0bdae8af1..c1bfa7f332f5 100644 --- a/tests/format/scss/scss/scss.scss +++ b/tests/format/scss/scss/scss.scss @@ -8,1079 +8,3 @@ div { } } a { margin: 0 { left: 10px; } } - -$default: #111111 !default; -$default: #111111 !default; -$default: #111111 -!default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" !default; -$default: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!default; - -$global: #111111 !global; -$global: #111111 !global; -$global: #111111 -!global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" !global; -$global: "very-long-long-long-long-long-long-long-long-long-long-long-value" -!global; - -$map: (key: value, other-key: other-value); -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) !default; -$map: (key: value, other-key: other-value) -!default; -$map: -(key: value, other-key: other-value) -!default; -$map: ( key : value , other-key : other-value); -$map: ( key : value , other-key : other-value ); -$map: ( - key: value, - other-key: other-value -); -$map: ( -key: value, -other-key: other-value -); -$map: ( -key -: -value, -other-key -: -other-value -); -$map: ( -key -: -value -, -other-key -: -other-value -); -$map: (very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key : very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value , very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value ); -$map: ( - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, - very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key: very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: -( -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-value -, -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-key -: -very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-verylong-other-value -); -$map: ( - key: (#d82d2d, #666), - other-key: (#52bf4a, #fff), - other-other-key: (#c23435, #fff) -); -$map: ( -key: (#d82d2d, #666), -other-key: (#52bf4a, #fff), -other-other-key: (#c23435, #fff) -); -$map: ( - key : ( #d82d2d , #666 ), - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( - key : ( #d82d2d , #666 ) , - other-key : ( #52bf4a , #fff ), - other-other-key : ( #c23435 , #fff ) -); -$map: ( -key -: -( -#d82d2d, -#666 -) -, -other-key -: -( -#52bf4a, -#fff -) -, -other-other-key -: -( -#c23435 -, -#fff -) -); -$map: map-merge($map, ($key: $value)); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( $map , ( $key : $value ) ); -$map: map-merge( - $map, - ($key: $value) -); -$map: map-merge( -$map, -($key: $value) -); -$map: -map-merge( -$map -, -( -$key -: -$value -) -); - -$longVariable: ( -(mobile $mobile) (tablet $tablet) (desktop $desktop) (wide $wide) -); - -$list-space: "item-1" "item-2" "item-3"; -$list-space:"item-1""item-2""item-3"; -$list-space: "item-1" "item-2" "item-3" ; -$list-space: "item-1" - "item-2" - "item-3"; -$list-space -: -"item-1" -"item-2" -"item-3" -; -$list-space - -: - -"item-1" - -"item-2" - -"item-3" - -; -$list-comma: "item-1", "item-2", "item-3"; -$list-comma:"item-1","item-2","item-3"; -$list-comma: "item-1" , "item-2" , "item-3" ; -$list-comma: "item-1", - "item-2", - "item-3"; -$list-comma -: -"item-1" -, -"item-2" -, -"item-3" -; -$list-comma - -: - -"item-1" - -, - -"item-2" - -, - -"item-3" - -; -$list: "item-1.1" "item-1.2" "item-1.3", "item-2.1" "item-2.2" "item-2.3", "item-3.1" "item-3.2" "item-3.3"; -$list:"item-1.1""item-1.2""item-1.3","item-2.1""item-2.2""item-2.3","item-3.1""item-3.2""item-3.3"; -$list: "item-1.1" "item-1.2" "item-1.3" , "item-2.1" "item-2.2" "item-2.3" , "item-3.1" "item-3.2" "item-3.3" ; -$list: "item-1.1" "item-1.2" "item-1.3", - "item-2.1" "item-2.2" "item-2.3", - "item-3.1" "item-3.2" "item-3.3"; -$list -: -"item-1.1" -"item-1.2" -"item-1.3" -, -"item-2.1" -"item-2.2" -"item-2.3" -, -"item-3.1" -"item-3.2" -"item-3.3" -; -$list - -: - -"item-1.1" - -"item-1.2" - -"item-1.3" - -, - -"item-2.1" - -"item-2.2" - -"item-2.3" - -, - -"item-3.1" - -"item-3.2" - -"item-3.3" - -; -$list: (("item-1.1", "item-1.2", "item-1.3"), ("item-2.1", "item-2.2", "item-2.3"), ("item-3.1", "item-3.2", "item-3.3")); -$list:(("item-1.1","item-1.2","item-1.3"),("item-2.1","item-2.2","item-2.3"),("item-3.1","item-3.2","item-3.3")); -$list: ( ( "item-1.1" , "item-1.2" , "item-1.3" ) , ( "item-2.1" , "item-2.2" , "item-2.3" ) , ( "item-3.1" , "item-3.2" , "item-3.3" ) ) ; -$list: ( - ("item-1.1", "item-1.2", "item-1.3"), - ("item-2.1", "item-2.2", "item-2.3"), - ("item-3.1", "item-3.2", "item-3.3") -); -$list -: -( -( -"item-1.1" -, -"item-1.2" -, -"item-1.3" -) -, -( -"item-2.1" -, -"item-2.2" -, -"item-2.3" -) -, -( -"item-3.1" -, -"item-3.2" -, -"item-3.3" -) -) -; -$list - -: - -( - -( - -"item-1.1" - -, - -"item-1.2" - -, - -"item-1.3" - -) - -, - -( - -"item-2.1" - -, - -"item-2.2" - -, - -"item-2.3" - -) - -, - -( - -"item-3.1" - -, - -"item-3.2" - -, - -"item-3.3" - -) - -) - -; - -$var: (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0) (0 0); -$space-scale: (0, "0") (0.25, "0-25") (0.5, "0-5") (0.75, "0-75") (1, "1") (1.25, "1-25") (1.5, "1-5") (1.75, "1-75") (2, "2") (2.25, "2-25") (2.5, "2-5") (2.75, "2-75") (3, "3") (3.25, "3-25") (3.5, "3-5") (3.75, "3-75") (4, "4"); - -.card-column-simple { - @include breakpoint( getBp( md ) ) { - padding: $spacing_content-sm $spacing_content-md; - } - - @include breakpoint (getBp(md)) { - &:nth-child(2n + 3) { - clear: both; - } - } - - @include breakpoint (getBp(xl)) { - &:nth-child(2n + 3) { - clear: none; - } - &:nth-child(3n + 4) { - clear: both; - } - } -} - -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn "Warn (#{$message})."; -@warn #{$message}; -@warn "Very long long long long long long long long long long long long long line (#{$message})."; -@warn - "Very long long long long long long long long long long long long long line (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error "Error (#{$message})."; -@error #{$message}; -@error "Very long long long long long long long long long long long long long line Error (#{$message})."; -@error - "Very long long long long long long long long long long long long long line Error (#{$message})."; - -$buttonConfig: "save" 50px, 'cancel' 50px, "help" 100PX; - -$locale: "en_us"; -html[lang=#{$locale}] { - font-size: 10px; -} -$alertClass: "error"; -p.message-#{$alertClass} { - color: red; -} -$mediumBreakpoint: 768px; -@media (max-width: #{$mediumBreakpoint}) { - a { - font-size: 18px; - } -} - -p { - @media (max-width: 768px) { - font-size: 150%; - - @media (orientation: landscape) { - line-height: 75%; - } - } -} - -.popularAnimal { - background: gray; -} -.GoodBoy { - color: green; -} -.dog { - @extend .popularAnimal; - @extend .GoodBoy; - color: white; -} - -%animal { - background: gray; -} -.cat { - @extend %animal; - color: white; -} -.dog { - @extend %animal; - color: black; -} - -%mfw-standing-out { - font-size: 150%; - font-style: italic; - padding: 25px; -} -%mfwSlightlyShadowed { - @include box-shadow(black 2px 2px 10px); // from Compass -} -%MFWRounded { - @include border-radius(25px); // from Compass -} -#join-button { - @extend %mfw-standing-out; - @extend %mfwSlightlyShadowed; - @extend %MFWRounded; - background: green; - color: white; -} - -a { - &:hover { - color: red; - } -} -p { - body.no-touch & { - display: none; - } -} -.foo.bar .baz.bang, .bip.qux { - $selector: &; -} -@mixin does-parent-exist { - @if & { - &:hover { - color: red; - } - } @else { - a { - color: red; - } - } -} - -p { - @if 1 + 1 == 2 { - border: 1px solid; - } - @if 5 < 3 { - border: 2px dotted; - } - @if null { - border: 3px double; - } -} - -$mosterType: monster; -p { - @if $mosterType == ocean { - color: blue; - } @else if $mosterType == matador { - color: red; - } @else if $mosterType == monster { - color: green; - } @else if $mosterType == nightKing { - color: green; - } @else if $mosterType == VeryWickedWolf { - color: green; - } @else { - color: black; - } -} - -@for $i from 1 through 3 { - .item-#{$i} { - width: 2em * $i; - } -} - -@each $animal in puma, sea-slug, cheerfulDog, BigSalamander, "string", 'another-string', "camelCaseString", "PascalCaseString" { - .#{$animal}-icon { - background-image: url('/images/#{$animal}.png'); - } -} - -$i: 6; -@while $i > 0 { - .item-#{$i} { - width: 2em * $i; - } - $i: $i - 2; -} - -@mixin cool-border($width: 10px, $coolStyle: 'solid', $AwesomeColor: "black") { - border: $width $coolStyle $AwesomeColor; -} - -p { - @include cool-border(1px, "solid", $fff); -} -p { - @include cool-border($width: 1px, $coolStyle: 'solid', $AwesomeColor: #fff); -} -p { - @include coolBorder(); -} - -@mixin coolBorder() { - border: 10px solid #fff; -} -p { - @include coolBorder(1px, "solid", $fff); -} - -@mixin CoolBorder() { - border: 10px solid #fff; -} -p { - @include CoolBorder(1px, "solid", $fff); -} - -@mixin box-shadow($shadows...) { - -moz-box-shadow: $shadows; - -webkit-box-shadow: $shadows; - box-shadow: $shadows; -} -.shadows { - @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999); -} - -@mixin apply-to-ie6-only { - * html { - @content; - } -} -@include apply-to-ie6-only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin applyToIe6Only { - * html { - @content; - } -} -@include applyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin ApplyToIe6Only { - * html { - @content; - } -} -@include ApplyToIe6Only { - #logo { - background-image: url(/logo.gif); - } -} - -@mixin config-icon-colors($prefix, $colors...) { - @each $i in $colors { - .#{$prefix}#{nth($i, 1)} { - color: nth($i, 2); - } - } -} -@include config-icon-colors( - "icon-", - "save" green, - "cancel" gray, - "delete" red, - 'wait' blue -); - -@function my-calculation-function($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function myCalculationFunction($some-number, $anotherNumber, $BigNumber){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function AnotherMyCalculationFunction($some-number, $anotherNumber, $BigNumber: 100px){ - @return $some-number + $anotherNumber + $BigNumber; -} -@function border($borders...) { - @return $borders; -} -.foo { - padding: my-calculation-function(10px, 5px, 100px); - margin: myCalculationFunction($some-number: 10px, $anotherNumber: 5px, $BigNumber: 100px); - width: AnotherMyCalculationFunction(10px, 5px); - border: border(25px, 35px); -} - -$sm-only: '(min-width: 768px) and (max-width: 991px)'; -$lg-and-up: '(min-width: 1200px)'; - -@media screen and #{$sm-only, $lg-and-up} { - color: #000; -} - -.class-#{$var} { - #{$var}: #7b3d66; - #{$attr}-color: blue; - #{$prop}-#{$side}: $value; - background-#{$var}: #7b3d66; - animation-name: #{var}; - line-height: #{strip-unit($line-height)}em; - height: 1#{$var}; - width: calc(100% - #{$sidebar-width}); - max-width: calc(#{$m*100}vw #{$sign} #{$b}); - font: #{$font-size}/#{$line-height}; - content: "I have #{8 + 2} books on SASS!"; - border: #{$var} #{$var} #{$var}; - filter: #{$var}#{$var}#{$var}; - prop: #{ $var + $var } #{ $var + $var } #{ $var + $var }; - prop2: - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - - #{ - $var - + - $var - } - ; - prop3: - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - - #{ - - $var - - + - - $var - - } - ; - prop4: -#{$loader-icon-duration}; - prop5: +#{$loader-icon-duration}; - prop6: calc(-#{$loader-icon-duration} + 10); - prop7: calc(10 + -#{$loader-icon-duration}); -} - -/* Framework version for the generated CSS is #{$version}. */ - -.selector { - foo: bar; - #{$active} { - baz: qux; - } -} - -.el:nth-of-type(#{$i}) {} - -@media #{$value} {} - -$foundation-dir: 'foundation'; -@import url('#{$foundation-dir}/components/grid'); -@import url(#{$foundation-dir}/components/grid); -@import url($foundation-dir/components/grid); -@import url($foundation-dir+"/components/grid"); - -@function get-font-family($family) { - @return $family; -} -@import url("//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap"); -@import url(//fonts.googleapis.com/css?family=#{ get-font-family('Roboto') }:100,300,500,700,900&display=swap); - - -@keyframes loader { - 0% { - transform: translate3d(0, 0, 0); - } - - #{50% - $loader-icon-duration} { - transform: translate3d(0, $bounce-height, 0); - } - - 50% { - transform: translate3d(0, $bounce-height, 0) scale($loader-bounce-horizontal-expansion, $loader-bounce-vertical-compression); - } -} - -$icons: wifi "\600", wifi-hotspot "\601", weather "\602"; - -@each $icon in $icons { - .icon-#{nth($icon, 1)}, %icon-#{nth($icon, 1)} { - content: "#{nth($icon, 2)}"; - } -} - -.foo { - prop: -($grid-gutter-width / 2); - prop1: -( $grid-gutter-width / 2 ); - prop2: -$grid-gutter-width / 2; - prop3: +($grid-gutter-width / 2); - prop4: 10px/8px; /* Plain CSS, no division */ - prop5: $width / 2; /* Uses a variable, does division */ - prop6: round(1.5) / 2; /* Uses a function, does division */ - prop7: (500px / 2); /* Uses parentheses, does division */ - prop8: 5px + 8px / 2px; //* Uses +, does division */ - prop9: (italic bold 10px/8px); /* In a list, parentheses don't count */ - prop10: #010203 + #040506; - prop11: #010203 * 2; - prop12: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75); - prop13: progid:DXImageTransform.Microsoft.gradient(enabled='false', startColorstr='#{ie-hex-str($green)}', endColorstr='#{ie-hex-str($translucent-red)}'); - prop14: e + -resize; - prop15: sans- + "serif"; - prop16: 1em + (2em * 3); - prop17: rotate(-2deg); - prop18: rotate( -2deg ) ; - _:_; - prop19: 10 - ($grid-gutter-width / 2); - prop20: 10 + -($grid-gutter-width / 2); - prop21: 10 + - ( $grid-gutter-width / 2 ) ; - prop22: - ( $grid-gutter-width / 2 ) ; - prop23: - ( $grid-gutter-width / 2 ) ; - prop24: -$grid-gutter-width; - prop25: + ( $grid-gutter-width / 2 ) ; - prop26: + ( $grid-gutter-width / 2 ) ; - prop27: +$grid-gutter-width; - prop28: --($grid-gutter-width / 2); - prop28: ++($grid-gutter-width / 2); - prop29: rotate( - 2deg ) ; -} - -$last:nth($juggler,length($juggler)); -$x:if($last%2==0,1/2,3/2); -$new:pow($last,$x); -$sequence:1,1 1,2 1,1 2 1 1, 1 1 1 2 2 1; -$new-entry:(); -$new-entry : ( ) ; -$new-entry : ( ) ; -$new-entry -: -( -) -; - -body:before { - content: quote(to-string(fibonacci(100), ' \A ')); - white-space: pre-wrap; -} - -width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); -width -: -( -( -100% -- -( -( -$numPerRow -- -1 -) -* -$margin -) -) -/ -$numPerRow -) -; - -a:nth-child(#{$numPerRow}n) { - margin-right: 0; - margin-bottom: 0; -} - -@function em($pixels, $context: $browser-context) { - @return #{ $pixels / $context }em -} - -.navigation { - @extend %updated-#{$flag}; - @extend .selected-#{$flag}; - @extend %#{$item}; -} - -.icon-#{$icon-name} { - background-image: '/images/#{$icon-name}.svg'; -} - -$extmods:(eot:"?",svg:"#" + str-replace($name," ","_")); - -@mixin keyframes {@-moz-keyframes{@content;}@-webkit-keyframes{@content;}} - -@function gcd($a,$b){ - // From: http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript - @if ($b != 0) { - @return gcd($b,$a % $b); - }@else{ - @return abs($a); - } -} - -$colors: ( -primary: ( -base: #00abc9, -light: #daf1f6, -dark: #12799a -), -secondary: ( -base: #424d55, -light: #ccc, -lightest: #efefef, -dark: #404247 -), -success: ( -base: #bbd33e, -light: #eaf0c6 -) -); - -@function color($color, $tone: "base") { -@return map-get(map-get($colors, $color), $tone); -} - -@media only screen and (max-width: 767px) { - @include widths(2 3 4, \@small); -} - -$widths-breakpoint-separator: \@small; - -a { - transition-timing-function: func1( - func2( - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - ), - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - func3( - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue", - "veryVeryVeryVeryVeryLongValue" - ) - ); -} - -$empty-map: (); -$empty-nested-map: ( -nested-key: (empty-key: (color: red)), -empty-key: (), -empty-key: (), -empty-key: () -); - -$o-grid-default-config: ( -columns: 12, -gutter: 10px, -min-width: 240px, -max-width: 1330px, -layouts: ( -S: 370px, -M: 610px, -L: 850px, -XL: 1090px -), -fluid: true, -debug: false, -fixed-layout: M, -enhanced-experience: true -); - -$a: (); -$b: unquote(''); -$c: null; -$d: (null); - -$threads-properties: map-merge($threads-properties, ($border-label: ())); -$o-grid-default-config: (layouts: (S: 370px)); - -$map: ( -key: (value), -other-key: (key: other-other-value) -); - -a { - content: "#{".5"}"; - content: my-fn("_"); - content: "#{my-fn("_")}"; - content: my-fn("-"); - content: "#{my-fn("-")}"; - content: my-fn("-a"); - content: "#{my-fn("-a")}"; - content: my-fn("a-"); - content: "#{my-fn("a-")}"; - content: my-fn("foo"); - content: "#{my-fn("foo")}"; - content: 1 "#{my-fn("foo")}" 2; - content: foo "#{my-fn("foo")}" bar; - content: "foo #{$description} bar"; - - content: "#{my-fn("foo","bar")}"; - content: "#{my-fn( "foo" , "bar" )}"; - content: "#{my-fn( "foo" , "bar" )}"; - - content: '#{my-fn("foo")}'; - content: '#{my-fn('foo')}'; - content: "#{my-fn('foo')}"; - content: "#{my-fn("foo")}"; -} - -@mixin theme($css-property, $css-value, $theme-classes: t) { - @each $selector in & { - @each $class in $theme-classes { - @each $theme, $theme-properties in c(themes) { - $value: $css-value; - - @each $theme-name, $theme-value in $theme-properties { - $rgba-value: "rgba(#{red($theme-value)}, #{green($theme-value)}, #{blue($theme-value)}"; - $value: str-replace($value, "rgba(${#{$theme-name}}", $rgba-value); - $value: str-replace($value, "${#{$theme-name}}", $theme-value); - } - - @at-root .#{$class}-#{join($theme, $selector)} { - #{$css-property}: unquote($value); - } - } - } - } -} - -.foo, -// Comment -.bar { - // Comment - color: red; // Comment -} - -$my-list: - 'foo', // Comment - 'bar'; // Comment - -$my-map: ( - 'foo': 1, // Comment - 'bar': 2, // Comment - 'buz': calc(1 + 2), // Buz - 'baz': 4, // Baz -); - -[href]:hover &, // Comment -[href]:focus &, // Comment -[href]:active & { - .tooltip { - opacity: 1; - } -} - -@import - // Comment - 'mixins', - 'variables', - // Comment - 'reset', - 'scaffolding', - 'type', - // Comment - 'bar', - 'tabs'; - -@mixin placeholder { - &::placeholder {@content} -} - -.container { - @include placeholder { - color: $color-silver; - } -} - -.something { - grid-template-columns: 1 2fr (3 + 4); -} - -// Ignore escape "\" in SCSS mixins -@mixin margin-bottom-1\/3 { - margin-bottom: 0.8rem; -} - -label { - @include margin-bottom-1\/3; -} - -@function someVeryLongFunctionNameForJustAPow($base, $exponent) { - $result: 1; - @for $_ from 1 through $exponent { - $result: $result * $base; - } - @return $result; -} - -@function pow($base, $exponent){ - @return someVeryLongFunctionNameForJustAPow($base,$exponent); -} - -.foo{ - width: someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, - // This next pow is really powerful - someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, someVeryLongFunctionNameForJustAPow(2, 2)))))))))))) -} - -.bar{ - width: pow(2, pow(2, pow(2, - // This next pow is really powerful - pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, pow(2, 2)))))))))))) -} diff --git a/tests/format/scss/string/__snapshots__/format.test.js.snap b/tests/format/scss/string/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..59b5822b1a29 --- /dev/null +++ b/tests/format/scss/string/__snapshots__/format.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`string-concatanation.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +a { + background-image: url($test-path + $test-path); + background-image: url($test-path + 'static/test.jpg'); + background-image: url('../test/' + $test-path); + background-image: url('../test/' + 'static/test.jpg'); + background-image: url($test-path+$test-path); +} + +=====================================output===================================== +a { + background-image: url($test-path + $test-path); + background-image: url($test-path + "static/test.jpg"); + background-image: url("../test/" + $test-path); + background-image: url("../test/" + "static/test.jpg"); + background-image: url($test-path + $test-path); +} + +================================================================================ +`; + +exports[`string-concatanation.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +a { + background-image: url($test-path + $test-path); + background-image: url($test-path + 'static/test.jpg'); + background-image: url('../test/' + $test-path); + background-image: url('../test/' + 'static/test.jpg'); + background-image: url($test-path+$test-path); +} + +=====================================output===================================== +a { + background-image: url($test-path + $test-path); + background-image: url($test-path + "static/test.jpg"); + background-image: url("../test/" + $test-path); + background-image: url("../test/" + "static/test.jpg"); + background-image: url($test-path + $test-path); +} + +================================================================================ +`; diff --git a/tests/format/scss/string/format.test.js b/tests/format/scss/string/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/string/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/scss/string-concatanation.scss b/tests/format/scss/string/string-concatanation.scss similarity index 100% rename from tests/format/scss/scss/string-concatanation.scss rename to tests/format/scss/string/string-concatanation.scss diff --git a/tests/format/scss/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/scss/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..752dc874d712 --- /dev/null +++ b/tests/format/scss/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,783 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`at-rules.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +a { +@include section-type-1( +$header: +( +margin: 0 0 $margin-base, +text-align: left, +), +$decoration: +( +type: base, +margin: 0 auto -1px 0, +primary-color: $brand-primary, +secondary-color: $gray-light, +), +$title: +( +margin: 0 0 $margin-small, +color: false, +font-size: $font-size-h3, +font-weight: false, +line-height: $line-height-h3, +) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +) +); +} + +=====================================output===================================== +a { + @include section-type-1( + $header: ( + margin: 0 0 $margin-base, + text-align: left, + ), + $decoration: ( + type: base, + margin: 0 auto -1px 0, + primary-color: $brand-primary, + secondary-color: $gray-light, + ), + $title: ( + margin: 0 0 $margin-small, + color: false, + font-size: $font-size-h3, + font-weight: false, + line-height: $line-height-h3, + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), + ) + ); +} + +================================================================================ +`; + +exports[`at-rules.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +a { +@include section-type-1( +$header: +( +margin: 0 0 $margin-base, +text-align: left, +), +$decoration: +( +type: base, +margin: 0 auto -1px 0, +primary-color: $brand-primary, +secondary-color: $gray-light, +), +$title: +( +margin: 0 0 $margin-small, +color: false, +font-size: $font-size-h3, +font-weight: false, +line-height: $line-height-h3, +) +); +} + +a { +@include item-spotlight-properties-transition( +"-title", +( +box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), +) +); +} + +=====================================output===================================== +a { + @include section-type-1( + $header: ( + margin: 0 0 $margin-base, + text-align: left + ), + $decoration: ( + type: base, + margin: 0 auto -1px 0, + primary-color: $brand-primary, + secondary-color: $gray-light + ), + $title: ( + margin: 0 0 $margin-small, + color: false, + font-size: $font-size-h3, + font-weight: false, + line-height: $line-height-h3 + ) + ); +} + +a { + @include item-spotlight-properties-transition( + "-title", + ( + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) + ) + ); +} + +================================================================================ +`; + +exports[`comments.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +.simplification { + foo: ( + calc(), // It is a comment + ); +} + +.simplification { + foo: ( + calc() // It is a comment + ); +} + +$z-indexes: ( + header: 1035, + header: 1035, + overlay: 1202, // TODO + header: 1035, + header: 1035, +); + +=====================================output===================================== +.simplification { + foo: ( + calc() // It is a comment + ); +} + +.simplification { + foo: ( + calc() // It is a comment + ); +} + +$z-indexes: ( + header: 1035, + header: 1035, + overlay: 1202, + // TODO + header: 1035, + header: 1035, +); + +================================================================================ +`; + +exports[`comments.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +.simplification { + foo: ( + calc(), // It is a comment + ); +} + +.simplification { + foo: ( + calc() // It is a comment + ); +} + +$z-indexes: ( + header: 1035, + header: 1035, + overlay: 1202, // TODO + header: 1035, + header: 1035, +); + +=====================================output===================================== +.simplification { + foo: ( + calc() // It is a comment + ); +} + +.simplification { + foo: ( + calc() // It is a comment + ); +} + +$z-indexes: ( + header: 1035, + header: 1035, + overlay: 1202, + // TODO + header: 1035, + header: 1035 +); + +================================================================================ +`; + +exports[`declaration.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +a { + margin: $bar,; +} + +=====================================output===================================== +a { + margin: $bar; +} + +================================================================================ +`; + +exports[`declaration.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +a { + margin: $bar,; +} + +=====================================output===================================== +a { + margin: $bar; +} + +================================================================================ +`; + +exports[`issue-6920.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$my-map: ( + 'foo': 1, // Comment + 'bar': 2, // Comment +); + +=====================================output===================================== +$my-map: ( + "foo": 1, + // Comment + "bar": 2, // Comment +); + +================================================================================ +`; + +exports[`issue-6920.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$my-map: ( + 'foo': 1, // Comment + 'bar': 2, // Comment +); + +=====================================output===================================== +$my-map: ( + "foo": 1, + // Comment + "bar": 2 // Comment +); + +================================================================================ +`; + +exports[`list.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$colors: hotpink deepskyblue firebrick,; +$list: (a,); +$list: ('Helvetica', 'Arial', sans-serif,); +$colors: ( + "red", + "blue" +); +$config: ( + themes: ( + mist: ( + header: #dcfac0, + content: #00968b, + footer: #85c79c + ), + $spring: ( + header: #f4fac7, + content: #c2454e, + footer: #ffb158 + ) + ) +); + +$breakpoint-map: ( + small: ( + min-width: null, + max-width: 479px, + base-font: 16px, + vertical-rhythm: 1.3 + ), + medium: ( + min-width: 480px, + max-width: 959px, + base-font: 18px, + vertical-rhythm: 1.414 + ), + large: ( + min-width: 960px, + max-width: 1099px, + base-font: 18px, + vertical-rhythm: 1.5 + ), + xlarge: ( + min-width: 1100px, + max-width: null, + base-font: 21px, + vertical-rhythm: 1.618 + ) +); + +=====================================output===================================== +$colors: hotpink deepskyblue firebrick; +$list: (a); +$list: ("Helvetica", "Arial", sans-serif); +$colors: ("red", "blue"); +$config: ( + themes: ( + mist: ( + header: #dcfac0, + content: #00968b, + footer: #85c79c, + ), + $spring: ( + header: #f4fac7, + content: #c2454e, + footer: #ffb158, + ), + ), +); + +$breakpoint-map: ( + small: ( + min-width: null, + max-width: 479px, + base-font: 16px, + vertical-rhythm: 1.3, + ), + medium: ( + min-width: 480px, + max-width: 959px, + base-font: 18px, + vertical-rhythm: 1.414, + ), + large: ( + min-width: 960px, + max-width: 1099px, + base-font: 18px, + vertical-rhythm: 1.5, + ), + xlarge: ( + min-width: 1100px, + max-width: null, + base-font: 21px, + vertical-rhythm: 1.618, + ), +); + +================================================================================ +`; + +exports[`list.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$colors: hotpink deepskyblue firebrick,; +$list: (a,); +$list: ('Helvetica', 'Arial', sans-serif,); +$colors: ( + "red", + "blue" +); +$config: ( + themes: ( + mist: ( + header: #dcfac0, + content: #00968b, + footer: #85c79c + ), + $spring: ( + header: #f4fac7, + content: #c2454e, + footer: #ffb158 + ) + ) +); + +$breakpoint-map: ( + small: ( + min-width: null, + max-width: 479px, + base-font: 16px, + vertical-rhythm: 1.3 + ), + medium: ( + min-width: 480px, + max-width: 959px, + base-font: 18px, + vertical-rhythm: 1.414 + ), + large: ( + min-width: 960px, + max-width: 1099px, + base-font: 18px, + vertical-rhythm: 1.5 + ), + xlarge: ( + min-width: 1100px, + max-width: null, + base-font: 21px, + vertical-rhythm: 1.618 + ) +); + +=====================================output===================================== +$colors: hotpink deepskyblue firebrick; +$list: (a); +$list: ("Helvetica", "Arial", sans-serif); +$colors: ("red", "blue"); +$config: ( + themes: ( + mist: ( + header: #dcfac0, + content: #00968b, + footer: #85c79c + ), + $spring: ( + header: #f4fac7, + content: #c2454e, + footer: #ffb158 + ) + ) +); + +$breakpoint-map: ( + small: ( + min-width: null, + max-width: 479px, + base-font: 16px, + vertical-rhythm: 1.3 + ), + medium: ( + min-width: 480px, + max-width: 959px, + base-font: 18px, + vertical-rhythm: 1.414 + ), + large: ( + min-width: 960px, + max-width: 1099px, + base-font: 18px, + vertical-rhythm: 1.5 + ), + xlarge: ( + min-width: 1100px, + max-width: null, + base-font: 21px, + vertical-rhythm: 1.618 + ) +); + +================================================================================ +`; + +exports[`map.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$map: ( + small: 767px, + medium: 992px, + large: 1200px, +); +$map: ( + 'medium': (min-width: 800px), + 'large': (min-width: 1000px), + 'huge': (min-width: 1200px), +); +$map: ( small: 767px, medium: 992px, large: 1200px ); + +=====================================output===================================== +$map: ( + small: 767px, + medium: 992px, + large: 1200px, +); +$map: ( + "medium": ( + min-width: 800px, + ), + "large": ( + min-width: 1000px, + ), + "huge": ( + min-width: 1200px, + ), +); +$map: ( + small: 767px, + medium: 992px, + large: 1200px, +); + +================================================================================ +`; + +exports[`map.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$map: ( + small: 767px, + medium: 992px, + large: 1200px, +); +$map: ( + 'medium': (min-width: 800px), + 'large': (min-width: 1000px), + 'huge': (min-width: 1200px), +); +$map: ( small: 767px, medium: 992px, large: 1200px ); + +=====================================output===================================== +$map: ( + small: 767px, + medium: 992px, + large: 1200px +); +$map: ( + "medium": ( + min-width: 800px + ), + "large": ( + min-width: 1000px + ), + "huge": ( + min-width: 1200px + ) +); +$map: ( + small: 767px, + medium: 992px, + large: 1200px +); + +================================================================================ +`; + +exports[`selector_list.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, { + +} + +.some-class, { +&.another-class, { + color: red; + } +} + +=====================================output===================================== +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm { +} + +.some-class { + &.another-class { + color: red; + } +} + +================================================================================ +`; + +exports[`selector_list.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, { + +} + +.some-class, { +&.another-class, { + color: red; + } +} + +=====================================output===================================== +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, +asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm { +} + +.some-class { + &.another-class { + color: red; + } +} + +================================================================================ +`; + +exports[`trailing-comma.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$z-indexes: ( + header: 1035, + overlay: 1202 // The comma shoud be printed before the comment when trailing-comma = es5 +); + +=====================================output===================================== +$z-indexes: ( + header: 1035, + overlay: 1202, // The comma shoud be printed before the comment when trailing-comma = es5 +); + +================================================================================ +`; + +exports[`trailing-comma.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$z-indexes: ( + header: 1035, + overlay: 1202 // The comma shoud be printed before the comment when trailing-comma = es5 +); + +=====================================output===================================== +$z-indexes: ( + header: 1035, + overlay: 1202 // The comma shoud be printed before the comment when trailing-comma = es5 +); + +================================================================================ +`; + +exports[`variable.scss - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +$test: 1,; +$margin: 0, 2em, 0, 1.5em,; + + +=====================================output===================================== +$test: 1; +$margin: 0, 2em, 0, 1.5em; + +================================================================================ +`; + +exports[`variable.scss - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +$test: 1,; +$margin: 0, 2em, 0, 1.5em,; + + +=====================================output===================================== +$test: 1; +$margin: 0, 2em, 0, 1.5em; + +================================================================================ +`; diff --git a/tests/format/scss/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/trailing-comma/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d18d42780ce3..000000000000 --- a/tests/format/scss/trailing-comma/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,587 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`at-rules.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -a { -@include section-type-1( -$header: -( -margin: 0 0 $margin-base, -text-align: left, -), -$decoration: -( -type: base, -margin: 0 auto -1px 0, -primary-color: $brand-primary, -secondary-color: $gray-light, -), -$title: -( -margin: 0 0 $margin-small, -color: false, -font-size: $font-size-h3, -font-weight: false, -line-height: $line-height-h3, -) -); -} - -a { -@include item-spotlight-properties-transition( -"-title", -( -box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), -) -); -} - -=====================================output===================================== -a { - @include section-type-1( - $header: ( - margin: 0 0 $margin-base, - text-align: left - ), - $decoration: ( - type: base, - margin: 0 auto -1px 0, - primary-color: $brand-primary, - secondary-color: $gray-light - ), - $title: ( - margin: 0 0 $margin-small, - color: false, - font-size: $font-size-h3, - font-weight: false, - line-height: $line-height-h3 - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) - ) - ); -} - -================================================================================ -`; - -exports[`at-rules.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { -@include section-type-1( -$header: -( -margin: 0 0 $margin-base, -text-align: left, -), -$decoration: -( -type: base, -margin: 0 auto -1px 0, -primary-color: $brand-primary, -secondary-color: $gray-light, -), -$title: -( -margin: 0 0 $margin-small, -color: false, -font-size: $font-size-h3, -font-weight: false, -line-height: $line-height-h3, -) -); -} - -a { -@include item-spotlight-properties-transition( -"-title", -( -box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), -) -); -} - -=====================================output===================================== -a { - @include section-type-1( - $header: ( - margin: 0 0 $margin-base, - text-align: left, - ), - $decoration: ( - type: base, - margin: 0 auto -1px 0, - primary-color: $brand-primary, - secondary-color: $gray-light, - ), - $title: ( - margin: 0 0 $margin-small, - color: false, - font-size: $font-size-h3, - font-weight: false, - line-height: $line-height-h3, - ) - ); -} - -a { - @include item-spotlight-properties-transition( - "-title", - ( - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), - ) - ); -} - -================================================================================ -`; - -exports[`declaration.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -a { - margin: $bar,; -} - -=====================================output===================================== -a { - margin: $bar; -} - -================================================================================ -`; - -exports[`declaration.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -a { - margin: $bar,; -} - -=====================================output===================================== -a { - margin: $bar; -} - -================================================================================ -`; - -exports[`list.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -$colors: hotpink deepskyblue firebrick,; -$list: (a,); -$list: ('Helvetica', 'Arial', sans-serif,); -$colors: ( - "red", - "blue" -); -$config: ( - themes: ( - mist: ( - header: #dcfac0, - content: #00968b, - footer: #85c79c - ), - $spring: ( - header: #f4fac7, - content: #c2454e, - footer: #ffb158 - ) - ) -); - -$breakpoint-map: ( - small: ( - min-width: null, - max-width: 479px, - base-font: 16px, - vertical-rhythm: 1.3 - ), - medium: ( - min-width: 480px, - max-width: 959px, - base-font: 18px, - vertical-rhythm: 1.414 - ), - large: ( - min-width: 960px, - max-width: 1099px, - base-font: 18px, - vertical-rhythm: 1.5 - ), - xlarge: ( - min-width: 1100px, - max-width: null, - base-font: 21px, - vertical-rhythm: 1.618 - ) -); - -=====================================output===================================== -$colors: hotpink deepskyblue firebrick; -$list: (a); -$list: ("Helvetica", "Arial", sans-serif); -$colors: ("red", "blue"); -$config: ( - themes: ( - mist: ( - header: #dcfac0, - content: #00968b, - footer: #85c79c - ), - $spring: ( - header: #f4fac7, - content: #c2454e, - footer: #ffb158 - ) - ) -); - -$breakpoint-map: ( - small: ( - min-width: null, - max-width: 479px, - base-font: 16px, - vertical-rhythm: 1.3 - ), - medium: ( - min-width: 480px, - max-width: 959px, - base-font: 18px, - vertical-rhythm: 1.414 - ), - large: ( - min-width: 960px, - max-width: 1099px, - base-font: 18px, - vertical-rhythm: 1.5 - ), - xlarge: ( - min-width: 1100px, - max-width: null, - base-font: 21px, - vertical-rhythm: 1.618 - ) -); - -================================================================================ -`; - -exports[`list.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$colors: hotpink deepskyblue firebrick,; -$list: (a,); -$list: ('Helvetica', 'Arial', sans-serif,); -$colors: ( - "red", - "blue" -); -$config: ( - themes: ( - mist: ( - header: #dcfac0, - content: #00968b, - footer: #85c79c - ), - $spring: ( - header: #f4fac7, - content: #c2454e, - footer: #ffb158 - ) - ) -); - -$breakpoint-map: ( - small: ( - min-width: null, - max-width: 479px, - base-font: 16px, - vertical-rhythm: 1.3 - ), - medium: ( - min-width: 480px, - max-width: 959px, - base-font: 18px, - vertical-rhythm: 1.414 - ), - large: ( - min-width: 960px, - max-width: 1099px, - base-font: 18px, - vertical-rhythm: 1.5 - ), - xlarge: ( - min-width: 1100px, - max-width: null, - base-font: 21px, - vertical-rhythm: 1.618 - ) -); - -=====================================output===================================== -$colors: hotpink deepskyblue firebrick; -$list: (a); -$list: ("Helvetica", "Arial", sans-serif); -$colors: ("red", "blue"); -$config: ( - themes: ( - mist: ( - header: #dcfac0, - content: #00968b, - footer: #85c79c, - ), - $spring: ( - header: #f4fac7, - content: #c2454e, - footer: #ffb158, - ), - ), -); - -$breakpoint-map: ( - small: ( - min-width: null, - max-width: 479px, - base-font: 16px, - vertical-rhythm: 1.3, - ), - medium: ( - min-width: 480px, - max-width: 959px, - base-font: 18px, - vertical-rhythm: 1.414, - ), - large: ( - min-width: 960px, - max-width: 1099px, - base-font: 18px, - vertical-rhythm: 1.5, - ), - xlarge: ( - min-width: 1100px, - max-width: null, - base-font: 21px, - vertical-rhythm: 1.618, - ), -); - -================================================================================ -`; - -exports[`map.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -$map: ( - small: 767px, - medium: 992px, - large: 1200px, -); -$map: ( - 'medium': (min-width: 800px), - 'large': (min-width: 1000px), - 'huge': (min-width: 1200px), -); -$map: ( small: 767px, medium: 992px, large: 1200px ); - -=====================================output===================================== -$map: ( - small: 767px, - medium: 992px, - large: 1200px -); -$map: ( - "medium": ( - min-width: 800px - ), - "large": ( - min-width: 1000px - ), - "huge": ( - min-width: 1200px - ) -); -$map: ( - small: 767px, - medium: 992px, - large: 1200px -); - -================================================================================ -`; - -exports[`map.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$map: ( - small: 767px, - medium: 992px, - large: 1200px, -); -$map: ( - 'medium': (min-width: 800px), - 'large': (min-width: 1000px), - 'huge': (min-width: 1200px), -); -$map: ( small: 767px, medium: 992px, large: 1200px ); - -=====================================output===================================== -$map: ( - small: 767px, - medium: 992px, - large: 1200px, -); -$map: ( - "medium": ( - min-width: 800px, - ), - "large": ( - min-width: 1000px, - ), - "huge": ( - min-width: 1200px, - ), -); -$map: ( - small: 767px, - medium: 992px, - large: 1200px, -); - -================================================================================ -`; - -exports[`selector_list.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, { - -} - -.some-class, { -&.another-class, { - color: red; - } -} - -=====================================output===================================== -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm { -} - -.some-class { - &.another-class { - color: red; - } -} - -================================================================================ -`; - -exports[`selector_list.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, { - -} - -.some-class, { -&.another-class, { - color: red; - } -} - -=====================================output===================================== -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, -asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm { -} - -.some-class { - &.another-class { - color: red; - } -} - -================================================================================ -`; - -exports[`variable.scss - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -$test: 1,; -$margin: 0, 2em, 0, 1.5em,; - - -=====================================output===================================== -$test: 1; -$margin: 0, 2em, 0, 1.5em; - -================================================================================ -`; - -exports[`variable.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -$test: 1,; -$margin: 0, 2em, 0, 1.5em,; - - -=====================================output===================================== -$test: 1; -$margin: 0, 2em, 0, 1.5em; - -================================================================================ -`; diff --git a/tests/format/scss/trailing-comma/comments.scss b/tests/format/scss/trailing-comma/comments.scss new file mode 100644 index 000000000000..0cfab28de792 --- /dev/null +++ b/tests/format/scss/trailing-comma/comments.scss @@ -0,0 +1,19 @@ +.simplification { + foo: ( + calc(), // It is a comment + ); +} + +.simplification { + foo: ( + calc() // It is a comment + ); +} + +$z-indexes: ( + header: 1035, + header: 1035, + overlay: 1202, // TODO + header: 1035, + header: 1035, +); diff --git a/tests/format/scss/trailing-comma/format.test.js b/tests/format/scss/trailing-comma/format.test.js new file mode 100644 index 000000000000..9fd95c4c1774 --- /dev/null +++ b/tests/format/scss/trailing-comma/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["scss"], { trailingComma: "none" }); +runFormatTest(import.meta, ["scss"], { trailingComma: "es5" }); diff --git a/tests/format/scss/trailing-comma/issue-6920.scss b/tests/format/scss/trailing-comma/issue-6920.scss new file mode 100644 index 000000000000..7d3af3333aba --- /dev/null +++ b/tests/format/scss/trailing-comma/issue-6920.scss @@ -0,0 +1,4 @@ +$my-map: ( + 'foo': 1, // Comment + 'bar': 2, // Comment +); diff --git a/tests/format/scss/trailing-comma/jsfmt.spec.js b/tests/format/scss/trailing-comma/jsfmt.spec.js deleted file mode 100644 index f2558a4a9996..000000000000 --- a/tests/format/scss/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["scss"], { trailingComma: "none" }); -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/trailing-comma/trailing-comma.scss b/tests/format/scss/trailing-comma/trailing-comma.scss new file mode 100644 index 000000000000..1378331009d6 --- /dev/null +++ b/tests/format/scss/trailing-comma/trailing-comma.scss @@ -0,0 +1,4 @@ +$z-indexes: ( + header: 1035, + overlay: 1202 // The comma shoud be printed before the comment when trailing-comma = es5 +); diff --git a/tests/format/scss/variables/__snapshots__/format.test.js.snap b/tests/format/scss/variables/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..07e8aa4d6c27 --- /dev/null +++ b/tests/format/scss/variables/__snapshots__/format.test.js.snap @@ -0,0 +1,161 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`apply-rule.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +=====================================output===================================== +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: { + color: red; + }; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} + +================================================================================ +`; + +exports[`postcss-8-improment.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} + +=====================================output===================================== +/* +This test is copied from \`postcss@8\` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a": 1}}, [4]]; + --javascript: function(rule) {console.log(rule)}; +} + +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} + +================================================================================ +`; + +exports[`variables.scss format 1`] = ` +====================================options===================================== +parsers: ["scss"] +printWidth: 80 + | printWidth +=====================================input====================================== +.foo { + --#{$prop}: 10px; + #{$prop}: 10px; + prop1: var(--#{$var}); + prop2: var(#{$var}, --my-#{$var}, pink); + prop3: calc(var(--#{$var}) * 1px); + prop4: var(--spacer#{(1) + 2}); +} + +@supports (--#{$prop}: green) { + body { + color: var(--#{$var}); + } +} + +=====================================output===================================== +.foo { + --#{$prop}: 10px; + #{$prop}: 10px; + prop1: var(--#{$var}); + prop2: var(#{$var}, --my-#{$var}, pink); + prop3: calc(var(--#{$var}) * 1px); + prop4: var(--spacer#{(1) + 2}); +} + +@supports (--#{$prop}: green) { + body { + color: var(--#{$var}); + } +} + +================================================================================ +`; diff --git a/tests/format/scss/variables/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/variables/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4312c1b47702..000000000000 --- a/tests/format/scss/variables/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,41 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`variables.scss format 1`] = ` -====================================options===================================== -parsers: ["scss"] -printWidth: 80 - | printWidth -=====================================input====================================== -.foo { - --#{$prop}: 10px; - #{$prop}: 10px; - prop1: var(--#{$var}); - prop2: var(#{$var}, --my-#{$var}, pink); - prop3: calc(var(--#{$var}) * 1px); - prop4: var(--spacer#{(1) + 2}); -} - -@supports (--#{$prop}: green) { - body { - color: var(--#{$var}); - } -} - -=====================================output===================================== -.foo { - --#{$prop}: 10px; - #{$prop}: 10px; - prop1: var(--#{$var}); - prop2: var(#{$var}, --my-#{$var}, pink); - prop3: calc(var(--#{$var}) * 1px); - prop4: var(--spacer#{(1) + 2}); -} - -@supports (--#{$prop}: green) { - body { - color: var(--#{$var}); - } -} - -================================================================================ -`; diff --git a/tests/format/scss/variables/apply-rule.scss b/tests/format/scss/variables/apply-rule.scss new file mode 100644 index 000000000000..56c04e2c251a --- /dev/null +++ b/tests/format/scss/variables/apply-rule.scss @@ -0,0 +1,30 @@ +/* http://tabatkins.github.io/specs/css-apply-rule/#defining */ + +:root { + --toolbar-theme: { + background-color: hsl(120, 70%, 95%); + border-radius: 4px; + border: 1px solid var(--theme-color late); + }; + --toolbar-title-theme: { + color: green; + }; +} + +:root { + --without-semi: {color:red;} +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-prop: blue; +} + +:root { + --like-a-apply-rule: { + color:red;} /* no semi here*/ + --another-one-like-a-apply-rule: { + color:red; + }; +} diff --git a/tests/format/scss/variables/format.test.js b/tests/format/scss/variables/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/variables/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/variables/jsfmt.spec.js b/tests/format/scss/variables/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/variables/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/scss/variables/postcss-8-improment.scss b/tests/format/scss/variables/postcss-8-improment.scss new file mode 100644 index 000000000000..d269083a9d4c --- /dev/null +++ b/tests/format/scss/variables/postcss-8-improment.scss @@ -0,0 +1,17 @@ +/* +This test is copied from `postcss@8` release note + +https://github.com/postcss/postcss/releases/tag/8.0.0 +*/ + +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} diff --git a/tests/format/scss/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/yaml/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/scss/yaml/__snapshots__/jsfmt.spec.js.snap rename to tests/format/scss/yaml/__snapshots__/format.test.js.snap diff --git a/tests/format/scss/yaml/format.test.js b/tests/format/scss/yaml/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/scss/yaml/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/scss/yaml/jsfmt.spec.js b/tests/format/scss/yaml/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/scss/yaml/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/stylefmt-repo/at-apply/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/at-apply/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/at-apply/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/at-apply/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/at-apply/format.test.js b/tests/format/stylefmt-repo/at-apply/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/at-apply/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/at-apply/jsfmt.spec.js b/tests/format/stylefmt-repo/at-apply/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/at-apply/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/at-media/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/at-media/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/at-media/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/at-media/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/at-media/format.test.js b/tests/format/stylefmt-repo/at-media/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/at-media/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/at-media/jsfmt.spec.js b/tests/format/stylefmt-repo/at-media/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/at-media/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/attr-selector/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/attr-selector/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/attr-selector/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/attr-selector/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/attr-selector/format.test.js b/tests/format/stylefmt-repo/attr-selector/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/attr-selector/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/attr-selector/jsfmt.spec.js b/tests/format/stylefmt-repo/attr-selector/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/attr-selector/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/charset-2/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/charset-2/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/charset-2/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/charset-2/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/charset-2/format.test.js b/tests/format/stylefmt-repo/charset-2/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/charset-2/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/charset-2/jsfmt.spec.js b/tests/format/stylefmt-repo/charset-2/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/charset-2/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/charset/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/charset/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/charset/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/charset/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/charset/format.test.js b/tests/format/stylefmt-repo/charset/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/charset/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/charset/jsfmt.spec.js b/tests/format/stylefmt-repo/charset/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/charset/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/color-hex-lowercase/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/color-hex-lowercase/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/color-hex-lowercase/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/color-hex-lowercase/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/color-hex-lowercase/format.test.js b/tests/format/stylefmt-repo/color-hex-lowercase/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/color-hex-lowercase/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/color-hex-lowercase/jsfmt.spec.js b/tests/format/stylefmt-repo/color-hex-lowercase/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/color-hex-lowercase/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/comment-in-rules/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/comment-in-rules/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/comment-in-rules/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/comment-in-rules/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/comment-in-rules/format.test.js b/tests/format/stylefmt-repo/comment-in-rules/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/comment-in-rules/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/comment-in-rules/jsfmt.spec.js b/tests/format/stylefmt-repo/comment-in-rules/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/comment-in-rules/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/comment/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/comment/format.test.js b/tests/format/stylefmt-repo/comment/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/comment/jsfmt.spec.js b/tests/format/stylefmt-repo/comment/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/content/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/content/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/content/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/content/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/content/format.test.js b/tests/format/stylefmt-repo/content/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/content/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/content/jsfmt.spec.js b/tests/format/stylefmt-repo/content/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/content/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/cssnext-example/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/cssnext-example/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/cssnext-example/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/cssnext-example/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/cssnext-example/format.test.js b/tests/format/stylefmt-repo/cssnext-example/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/cssnext-example/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/cssnext-example/jsfmt.spec.js b/tests/format/stylefmt-repo/cssnext-example/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/cssnext-example/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-media-queries/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/custom-media-queries/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/custom-media-queries/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/custom-media-queries/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/custom-media-queries/format.test.js b/tests/format/stylefmt-repo/custom-media-queries/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/custom-media-queries/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-media-queries/jsfmt.spec.js b/tests/format/stylefmt-repo/custom-media-queries/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/custom-media-queries/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-properties/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/custom-properties/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/custom-properties/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/custom-properties/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/custom-properties/format.test.js b/tests/format/stylefmt-repo/custom-properties/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/custom-properties/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-properties/jsfmt.spec.js b/tests/format/stylefmt-repo/custom-properties/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/custom-properties/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-selectors/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/custom-selectors/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/custom-selectors/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/custom-selectors/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/custom-selectors/format.test.js b/tests/format/stylefmt-repo/custom-selectors/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/custom-selectors/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/custom-selectors/jsfmt.spec.js b/tests/format/stylefmt-repo/custom-selectors/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/custom-selectors/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/data-url/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/data-url/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/data-url/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/data-url/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/data-url/format.test.js b/tests/format/stylefmt-repo/data-url/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/data-url/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/data-url/jsfmt.spec.js b/tests/format/stylefmt-repo/data-url/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/data-url/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/font-face/__snapshots__/format.test.js.snap b/tests/format/stylefmt-repo/font-face/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..72c76cb0e219 --- /dev/null +++ b/tests/format/stylefmt-repo/font-face/__snapshots__/format.test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`font-face.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== + @font-face {font-family:'HelveticaNeueW02-45Ligh';src:url("/fonts/pictos-web.eot");src:local("☺"),url("/fonts/pictos-web.woff") format("woff"),url("/fonts/pictos-web.ttf") format("truetype"),url("/fonts/pictos-web.svg#webfontIyfZbseF") format("svg");font-weight:normal;font-style:normal;} + +=====================================output===================================== +@font-face { + font-family: "HelveticaNeueW02-45Ligh"; + src: url("/fonts/pictos-web.eot"); + src: + local("☺"), + url("/fonts/pictos-web.woff") format("woff"), + url("/fonts/pictos-web.ttf") format("truetype"), + url("/fonts/pictos-web.svg#webfontIyfZbseF") format("svg"); + font-weight: normal; + font-style: normal; +} + +================================================================================ +`; diff --git a/tests/format/stylefmt-repo/font-face/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/font-face/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e55743ae2d67..000000000000 --- a/tests/format/stylefmt-repo/font-face/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,23 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`font-face.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== - @font-face {font-family:'HelveticaNeueW02-45Ligh';src:url("/fonts/pictos-web.eot");src:local("☺"),url("/fonts/pictos-web.woff") format("woff"),url("/fonts/pictos-web.ttf") format("truetype"),url("/fonts/pictos-web.svg#webfontIyfZbseF") format("svg");font-weight:normal;font-style:normal;} - -=====================================output===================================== -@font-face { - font-family: "HelveticaNeueW02-45Ligh"; - src: url("/fonts/pictos-web.eot"); - src: local("☺"), url("/fonts/pictos-web.woff") format("woff"), - url("/fonts/pictos-web.ttf") format("truetype"), - url("/fonts/pictos-web.svg#webfontIyfZbseF") format("svg"); - font-weight: normal; - font-style: normal; -} - -================================================================================ -`; diff --git a/tests/format/stylefmt-repo/font-face/format.test.js b/tests/format/stylefmt-repo/font-face/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/font-face/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/font-face/jsfmt.spec.js b/tests/format/stylefmt-repo/font-face/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/font-face/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/font-shorthand/__snapshots__/format.test.js.snap b/tests/format/stylefmt-repo/font-shorthand/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7b60c6ed0cb0 --- /dev/null +++ b/tests/format/stylefmt-repo/font-shorthand/__snapshots__/format.test.js.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`font-shorthand.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +.class { + font: normal normal 24px/1 "myfont";font: normal normal normal 12px/20px myfont; + font:normal 300 0.875em/1.3 "myfont", sans-serif; +} + +=====================================output===================================== +.class { + font: normal normal 24px/1 "myfont"; + font: normal normal normal 12px/20px myfont; + font: + normal 300 0.875em/1.3 "myfont", + sans-serif; +} + +================================================================================ +`; diff --git a/tests/format/stylefmt-repo/font-shorthand/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/font-shorthand/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ddda6c0b048d..000000000000 --- a/tests/format/stylefmt-repo/font-shorthand/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,22 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`font-shorthand.css format 1`] = ` -====================================options===================================== -parsers: ["css"] -printWidth: 80 - | printWidth -=====================================input====================================== -.class { - font: normal normal 24px/1 "myfont";font: normal normal normal 12px/20px myfont; - font:normal 300 0.875em/1.3 "myfont", sans-serif; -} - -=====================================output===================================== -.class { - font: normal normal 24px/1 "myfont"; - font: normal normal normal 12px/20px myfont; - font: normal 300 0.875em/1.3 "myfont", sans-serif; -} - -================================================================================ -`; diff --git a/tests/format/stylefmt-repo/font-shorthand/format.test.js b/tests/format/stylefmt-repo/font-shorthand/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/font-shorthand/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/font-shorthand/jsfmt.spec.js b/tests/format/stylefmt-repo/font-shorthand/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/font-shorthand/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/ie-hacks/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/ie-hacks/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/ie-hacks/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/ie-hacks/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/ie-hacks/format.test.js b/tests/format/stylefmt-repo/ie-hacks/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/ie-hacks/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/ie-hacks/jsfmt.spec.js b/tests/format/stylefmt-repo/ie-hacks/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/ie-hacks/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/import/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/import/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/import/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/import/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/import/format.test.js b/tests/format/stylefmt-repo/import/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/import/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/import/jsfmt.spec.js b/tests/format/stylefmt-repo/import/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/import/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/important/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/important/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/important/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/important/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/important/format.test.js b/tests/format/stylefmt-repo/important/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/important/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/important/jsfmt.spec.js b/tests/format/stylefmt-repo/important/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/important/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/inline-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/inline-comment/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/inline-comment/format.test.js b/tests/format/stylefmt-repo/inline-comment/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/stylefmt-repo/inline-comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/stylefmt-repo/inline-comment/jsfmt.spec.js b/tests/format/stylefmt-repo/inline-comment/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/stylefmt-repo/inline-comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/stylefmt-repo/lowercase/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/lowercase/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/lowercase/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/lowercase/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/lowercase/format.test.js b/tests/format/stylefmt-repo/lowercase/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/lowercase/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/lowercase/jsfmt.spec.js b/tests/format/stylefmt-repo/lowercase/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/lowercase/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/media-indent-with-import/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/media-indent-with-import/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/media-indent-with-import/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/media-indent-with-import/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/media-indent-with-import/format.test.js b/tests/format/stylefmt-repo/media-indent-with-import/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/media-indent-with-import/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/media-indent-with-import/jsfmt.spec.js b/tests/format/stylefmt-repo/media-indent-with-import/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/media-indent-with-import/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/media-indent/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/media-indent/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/media-indent/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/media-indent/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/media-indent/format.test.js b/tests/format/stylefmt-repo/media-indent/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/media-indent/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/media-indent/jsfmt.spec.js b/tests/format/stylefmt-repo/media-indent/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/media-indent/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/media-queries-ranges/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/media-queries-ranges/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/media-queries-ranges/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/media-queries-ranges/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/media-queries-ranges/format.test.js b/tests/format/stylefmt-repo/media-queries-ranges/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/media-queries-ranges/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/media-queries-ranges/jsfmt.spec.js b/tests/format/stylefmt-repo/media-queries-ranges/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/media-queries-ranges/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-2/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-2/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-2/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-2/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-2/format.test.js b/tests/format/stylefmt-repo/nested-2/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-2/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-2/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-2/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-2/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-atrule/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-atrule/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-atrule/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-atrule/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-atrule/format.test.js b/tests/format/stylefmt-repo/nested-atrule/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-atrule/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-atrule/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-atrule/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-atrule/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-indention-2/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-indention-2/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-indention-2/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-indention-2/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-indention-2/format.test.js b/tests/format/stylefmt-repo/nested-indention-2/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-indention-2/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-indention-2/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-indention-2/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-indention-2/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-indention/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-indention/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-indention/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-indention/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-indention/format.test.js b/tests/format/stylefmt-repo/nested-indention/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-indention/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-indention/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-indention/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-indention/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-mixin-2/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-mixin-2/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-mixin-2/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-mixin-2/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-mixin-2/format.test.js b/tests/format/stylefmt-repo/nested-mixin-2/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-mixin-2/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-mixin-2/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-mixin-2/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-mixin-2/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-mixin/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested-mixin/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested-mixin/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested-mixin/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested-mixin/format.test.js b/tests/format/stylefmt-repo/nested-mixin/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested-mixin/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested-mixin/jsfmt.spec.js b/tests/format/stylefmt-repo/nested-mixin/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested-mixin/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/nested/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/nested/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/nested/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/nested/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/nested/format.test.js b/tests/format/stylefmt-repo/nested/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/nested/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/nested/jsfmt.spec.js b/tests/format/stylefmt-repo/nested/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/nested/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/non-nested-combinator/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/non-nested-combinator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/non-nested-combinator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/non-nested-combinator/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/non-nested-combinator/format.test.js b/tests/format/stylefmt-repo/non-nested-combinator/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/non-nested-combinator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/non-nested-combinator/jsfmt.spec.js b/tests/format/stylefmt-repo/non-nested-combinator/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/non-nested-combinator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/pseudo-element/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/pseudo-element/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/pseudo-element/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/pseudo-element/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/pseudo-element/format.test.js b/tests/format/stylefmt-repo/pseudo-element/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/pseudo-element/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/pseudo-element/jsfmt.spec.js b/tests/format/stylefmt-repo/pseudo-element/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/pseudo-element/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/readme/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/readme/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/readme/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/readme/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/readme/format.test.js b/tests/format/stylefmt-repo/readme/format.test.js new file mode 100644 index 000000000000..88aa93e6a77c --- /dev/null +++ b/tests/format/stylefmt-repo/readme/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["scss"]); diff --git a/tests/format/stylefmt-repo/readme/jsfmt.spec.js b/tests/format/stylefmt-repo/readme/jsfmt.spec.js deleted file mode 100644 index 539bde0869da..000000000000 --- a/tests/format/stylefmt-repo/readme/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["scss"]); diff --git a/tests/format/stylefmt-repo/shorthand-with-sass-variables/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/shorthand-with-sass-variables/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/shorthand-with-sass-variables/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/shorthand-with-sass-variables/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/shorthand-with-sass-variables/format.test.js b/tests/format/stylefmt-repo/shorthand-with-sass-variables/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/shorthand-with-sass-variables/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/shorthand-with-sass-variables/jsfmt.spec.js b/tests/format/stylefmt-repo/shorthand-with-sass-variables/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/shorthand-with-sass-variables/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/values/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/values/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/values/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/values/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/values/format.test.js b/tests/format/stylefmt-repo/values/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/values/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/values/jsfmt.spec.js b/tests/format/stylefmt-repo/values/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/values/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/var-notation/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/var-notation/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/var-notation/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/var-notation/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/var-notation/format.test.js b/tests/format/stylefmt-repo/var-notation/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/var-notation/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/var-notation/jsfmt.spec.js b/tests/format/stylefmt-repo/var-notation/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/var-notation/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/stylefmt-repo/vendor-prefix/__snapshots__/jsfmt.spec.js.snap b/tests/format/stylefmt-repo/vendor-prefix/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/stylefmt-repo/vendor-prefix/__snapshots__/jsfmt.spec.js.snap rename to tests/format/stylefmt-repo/vendor-prefix/__snapshots__/format.test.js.snap diff --git a/tests/format/stylefmt-repo/vendor-prefix/format.test.js b/tests/format/stylefmt-repo/vendor-prefix/format.test.js new file mode 100644 index 000000000000..96617399ecbb --- /dev/null +++ b/tests/format/stylefmt-repo/vendor-prefix/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["css"]); diff --git a/tests/format/stylefmt-repo/vendor-prefix/jsfmt.spec.js b/tests/format/stylefmt-repo/vendor-prefix/jsfmt.spec.js deleted file mode 100644 index 7d3726c81147..000000000000 --- a/tests/format/stylefmt-repo/vendor-prefix/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["css"]); diff --git a/tests/format/typescript/abstract-class/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/abstract-class/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/abstract-class/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/abstract-class/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/abstract-class/format.test.js b/tests/format/typescript/abstract-class/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/abstract-class/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/abstract-class/jsfmt.spec.js b/tests/format/typescript/abstract-class/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/abstract-class/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/abstract-construct-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/abstract-construct-types/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/abstract-construct-types/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/abstract-construct-types/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/abstract-construct-types/format.test.js b/tests/format/typescript/abstract-construct-types/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/abstract-construct-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/abstract-construct-types/jsfmt.spec.js b/tests/format/typescript/abstract-construct-types/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/abstract-construct-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/abstract-property/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/abstract-property/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/abstract-property/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/abstract-property/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/abstract-property/format.test.js b/tests/format/typescript/abstract-property/format.test.js new file mode 100644 index 000000000000..ca21c10853c1 --- /dev/null +++ b/tests/format/typescript/abstract-property/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/abstract-property/jsfmt.spec.js b/tests/format/typescript/abstract-property/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/typescript/abstract-property/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/ambient/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/ambient/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/ambient/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/ambient/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/ambient/format.test.js b/tests/format/typescript/ambient/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/ambient/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/ambient/jsfmt.spec.js b/tests/format/typescript/ambient/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/ambient/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/angular-component-examples/15934-computed.component.ts b/tests/format/typescript/angular-component-examples/15934-computed.component.ts new file mode 100644 index 000000000000..653f497f396e --- /dev/null +++ b/tests/format/typescript/angular-component-examples/15934-computed.component.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; + +const styles = "foobar"; + +@Component({ + selector: 'app-root', + template: ` + <h1>My App</h1> + <app-todo-list></app-todo-list> + `, + [styles]: `h1 { color: blue }` +}) +export class AppComponent {} diff --git a/tests/format/typescript/angular-component-examples/15934.component.ts b/tests/format/typescript/angular-component-examples/15934.component.ts new file mode 100644 index 000000000000..c6c4d66dc560 --- /dev/null +++ b/tests/format/typescript/angular-component-examples/15934.component.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + template: ` + <h1>My App</h1> + <app-todo-list></app-todo-list> + `, + styles: `h1 { color: blue }` +}) +export class AppComponent {} diff --git a/tests/format/typescript/angular-component-examples/15969-computed.component.ts b/tests/format/typescript/angular-component-examples/15969-computed.component.ts new file mode 100644 index 000000000000..72b37c781930 --- /dev/null +++ b/tests/format/typescript/angular-component-examples/15969-computed.component.ts @@ -0,0 +1,8 @@ +import { Component } from '@angular/core'; + +const template = "foobar"; + +@Component({ + [template]: `<h1>{{ hello }}</h1>`, +}) +export class AppComponent {} diff --git a/tests/format/typescript/angular-component-examples/__snapshots__/format.test.js.snap b/tests/format/typescript/angular-component-examples/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c81691af241f --- /dev/null +++ b/tests/format/typescript/angular-component-examples/__snapshots__/format.test.js.snap @@ -0,0 +1,309 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`15934.component.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + styles: \`h1 { color: blue }\` +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + styles: \` + h1 { + color: blue; + } + \`, +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`15934.component.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + styles: \`h1 { color: blue }\` +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + styles: \` + h1 { + color: blue; + } + \` +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`15934-computed.component.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +const styles = "foobar"; + +@Component({ + selector: 'app-root', + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + [styles]: \`h1 { color: blue }\` +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +const styles = "foobar"; + +@Component({ + selector: "app-root", + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + [styles]: \`h1 { color: blue }\`, +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`15934-computed.component.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +const styles = "foobar"; + +@Component({ + selector: 'app-root', + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + [styles]: \`h1 { color: blue }\` +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +const styles = "foobar"; + +@Component({ + selector: "app-root", + template: \` + <h1>My App</h1> + <app-todo-list></app-todo-list> + \`, + [styles]: \`h1 { color: blue }\` +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`15969-computed.component.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +const template = "foobar"; + +@Component({ + [template]: \`<h1>{{ hello }}</h1>\`, +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +const template = "foobar"; + +@Component({ + [template]: \`<h1>{{ hello }}</h1>\`, +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`15969-computed.component.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +import { Component } from '@angular/core'; + +const template = "foobar"; + +@Component({ + [template]: \`<h1>{{ hello }}</h1>\`, +}) +export class AppComponent {} + +=====================================output===================================== +import { Component } from "@angular/core"; + +const template = "foobar"; + +@Component({ + [template]: \`<h1>{{ hello }}</h1>\` +}) +export class AppComponent {} + +================================================================================ +`; + +exports[`test.component.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +@Component({ + selector: 'app-test', + template: \`<ul> <li>test</li> + </ul> + \`, + styles: [ \` + + :host { + color: red; + } + div { background: blue + } +\` + +] +}) +class TestComponent {} + +=====================================output===================================== +@Component({ + selector: "app-test", + template: \`<ul> + <li>test</li> + </ul> \`, + styles: [ + \` + :host { + color: red; + } + div { + background: blue; + } + \`, + ], +}) +class TestComponent {} + +================================================================================ +`; + +exports[`test.component.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +@Component({ + selector: 'app-test', + template: \`<ul> <li>test</li> + </ul> + \`, + styles: [ \` + + :host { + color: red; + } + div { background: blue + } +\` + +] +}) +class TestComponent {} + +=====================================output===================================== +@Component({ + selector: "app-test", + template: \`<ul> + <li>test</li> + </ul> \`, + styles: [ + \` + :host { + color: red; + } + div { + background: blue; + } + \` + ] +}) +class TestComponent {} + +================================================================================ +`; diff --git a/tests/format/typescript/angular-component-examples/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/angular-component-examples/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f30ff2d70869..000000000000 --- a/tests/format/typescript/angular-component-examples/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,94 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test.component.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -@Component({ - selector: 'app-test', - template: \`<ul> <li>test</li> - </ul> - \`, - styles: [ \` - - :host { - color: red; - } - div { background: blue - } -\` - -] -}) -class TestComponent {} - -=====================================output===================================== -@Component({ - selector: "app-test", - template: \`<ul> - <li>test</li> - </ul> \`, - styles: [ - \` - :host { - color: red; - } - div { - background: blue; - } - \` - ] -}) -class TestComponent {} - -================================================================================ -`; - -exports[`test.component.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -@Component({ - selector: 'app-test', - template: \`<ul> <li>test</li> - </ul> - \`, - styles: [ \` - - :host { - color: red; - } - div { background: blue - } -\` - -] -}) -class TestComponent {} - -=====================================output===================================== -@Component({ - selector: "app-test", - template: \`<ul> - <li>test</li> - </ul> \`, - styles: [ - \` - :host { - color: red; - } - div { - background: blue; - } - \`, - ], -}) -class TestComponent {} - -================================================================================ -`; diff --git a/tests/format/typescript/angular-component-examples/format.test.js b/tests/format/typescript/angular-component-examples/format.test.js new file mode 100644 index 000000000000..79e9c825ddf3 --- /dev/null +++ b/tests/format/typescript/angular-component-examples/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); diff --git a/tests/format/typescript/angular-component-examples/jsfmt.spec.js b/tests/format/typescript/angular-component-examples/jsfmt.spec.js deleted file mode 100644 index 69598203bdbc..000000000000 --- a/tests/format/typescript/angular-component-examples/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"], { trailingComma: "none" }); -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/argument-expansion/__snapshots__/format.test.js.snap b/tests/format/typescript/argument-expansion/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8a462ba4840a --- /dev/null +++ b/tests/format/typescript/argument-expansion/__snapshots__/format.test.js.snap @@ -0,0 +1,179 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`argument_expansion.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const bar1 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([] as unknown) as number[]); + +const bar2 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, <Array<number>>[]); + +const bar3 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([1, 2, 3] as unknown) as number[]); + +const bar4 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, <Array<number>>[1, 2, 3]); + +const bar5 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({} as unknown) as {[key: number]: boolean}); + +const bar6 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, <{[key: number]: boolean}>{}); + +const bar7 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({1: true} as unknown) as {[key: number]: boolean}); + +const bar8 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, <{[key: number]: boolean}>{1: true}); + +const bar9 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, [] as foo); + +=====================================output===================================== +const bar1 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + [] as unknown as number[], +); + +const bar2 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + <Array<number>>[], +); + +const bar3 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + [1, 2, 3] as unknown as number[], +); + +const bar4 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + <Array<number>>[1, 2, 3], +); + +const bar5 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + {} as unknown as { [key: number]: boolean }, +); + +const bar6 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + <{ [key: number]: boolean }>{}, +); + +const bar7 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + { 1: true } as unknown as { [key: number]: boolean }, +); + +const bar8 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + <{ [key: number]: boolean }>{ 1: true }, +); + +const bar9 = [1, 2, 3].reduce((carry, value) => { + return [...carry, value]; +}, [] as foo); + +================================================================================ +`; + +exports[`arrow-with-return-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +longfunctionWithCall1("bla", foo, (thing: string): complex<type<something>> => { + code(); +}); + +longfunctionWithCall12("bla", foo, (thing: string): complex<type<something>> => { + code(); +}); + +longfunctionWithCallBack("blabla", foobarbazblablablablabla, (thing: string): complex<type<something>> => { + code(); +}); + +longfunctionWithCallBack("blabla", foobarbazblablabla, (thing: string): complex<type<something>> => { + code(); +}); + +longfunctionWithCall1("bla", foo, (thing: string): complex<type<\` +\`>> => { + code(); +}); + +=====================================output===================================== +longfunctionWithCall1("bla", foo, (thing: string): complex<type<something>> => { + code(); +}); + +longfunctionWithCall12( + "bla", + foo, + (thing: string): complex<type<something>> => { + code(); + }, +); + +longfunctionWithCallBack( + "blabla", + foobarbazblablablablabla, + (thing: string): complex<type<something>> => { + code(); + }, +); + +longfunctionWithCallBack( + "blabla", + foobarbazblablabla, + (thing: string): complex<type<something>> => { + code(); + }, +); + +longfunctionWithCall1( + "bla", + foo, + ( + thing: string, + ): complex< + type<\` +\`> + > => { + code(); + }, +); + +================================================================================ +`; diff --git a/tests/format/typescript/argument-expansion/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/argument-expansion/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d916b2e86503..000000000000 --- a/tests/format/typescript/argument-expansion/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,159 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`argument_expansion.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const bar1 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([] as unknown) as number[]); - -const bar2 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, <Array<number>>[]); - -const bar3 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([1, 2, 3] as unknown) as number[]); - -const bar4 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, <Array<number>>[1, 2, 3]); - -const bar5 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({} as unknown) as {[key: number]: boolean}); - -const bar6 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, <{[key: number]: boolean}>{}); - -const bar7 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({1: true} as unknown) as {[key: number]: boolean}); - -const bar8 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, <{[key: number]: boolean}>{1: true}); - -=====================================output===================================== -const bar1 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value]; -}, [] as unknown as number[]); - -const bar2 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value]; -}, <Array<number>>[]); - -const bar3 = [1, 2, 3].reduce( - (carry, value) => { - return [...carry, value]; - }, - [1, 2, 3] as unknown as number[] -); - -const bar4 = [1, 2, 3].reduce( - (carry, value) => { - return [...carry, value]; - }, - <Array<number>>[1, 2, 3] -); - -const bar5 = [1, 2, 3].reduce((carry, value) => { - return { ...carry, [value]: true }; -}, {} as unknown as { [key: number]: boolean }); - -const bar6 = [1, 2, 3].reduce((carry, value) => { - return { ...carry, [value]: true }; -}, <{ [key: number]: boolean }>{}); - -const bar7 = [1, 2, 3].reduce( - (carry, value) => { - return { ...carry, [value]: true }; - }, - { 1: true } as unknown as { [key: number]: boolean } -); - -const bar8 = [1, 2, 3].reduce( - (carry, value) => { - return { ...carry, [value]: true }; - }, - <{ [key: number]: boolean }>{ 1: true } -); - -================================================================================ -`; - -exports[`arrow-with-return-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -longfunctionWithCall1("bla", foo, (thing: string): complex<type<something>> => { - code(); -}); - -longfunctionWithCall12("bla", foo, (thing: string): complex<type<something>> => { - code(); -}); - -longfunctionWithCallBack("blabla", foobarbazblablablablabla, (thing: string): complex<type<something>> => { - code(); -}); - -longfunctionWithCallBack("blabla", foobarbazblablabla, (thing: string): complex<type<something>> => { - code(); -}); - -longfunctionWithCall1("bla", foo, (thing: string): complex<type<\` -\`>> => { - code(); -}); - -=====================================output===================================== -longfunctionWithCall1("bla", foo, (thing: string): complex<type<something>> => { - code(); -}); - -longfunctionWithCall12( - "bla", - foo, - (thing: string): complex<type<something>> => { - code(); - } -); - -longfunctionWithCallBack( - "blabla", - foobarbazblablablablabla, - (thing: string): complex<type<something>> => { - code(); - } -); - -longfunctionWithCallBack( - "blabla", - foobarbazblablabla, - (thing: string): complex<type<something>> => { - code(); - } -); - -longfunctionWithCall1( - "bla", - foo, - ( - thing: string - ): complex< - type<\` -\`> - > => { - code(); - } -); - -================================================================================ -`; diff --git a/tests/format/typescript/argument-expansion/argument_expansion.ts b/tests/format/typescript/argument-expansion/argument_expansion.ts index 37f77d346e1b..9230cac27569 100644 --- a/tests/format/typescript/argument-expansion/argument_expansion.ts +++ b/tests/format/typescript/argument-expansion/argument_expansion.ts @@ -29,3 +29,7 @@ const bar7 = [1,2,3].reduce((carry, value) => { const bar8 = [1,2,3].reduce((carry, value) => { return {...carry, [value]: true}; }, <{[key: number]: boolean}>{1: true}); + +const bar9 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, [] as foo); diff --git a/tests/format/typescript/argument-expansion/format.test.js b/tests/format/typescript/argument-expansion/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/argument-expansion/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/argument-expansion/jsfmt.spec.js b/tests/format/typescript/argument-expansion/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/argument-expansion/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/array/__snapshots__/format.test.js.snap b/tests/format/typescript/array/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..703a9ec4b612 --- /dev/null +++ b/tests/format/typescript/array/__snapshots__/format.test.js.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class ViewTokensChangedEvent { + public readonly ranges: { + /** + * Start line number of range + */ + readonly fromLineNumber: number; + }[]; +} + +=====================================output===================================== +export class ViewTokensChangedEvent { + public readonly ranges: { + /** + * Start line number of range + */ + readonly fromLineNumber: number; + }[]; +} + +================================================================================ +`; + +exports[`key.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const subtractDuration = moment.duration( + subtractMap[interval][0], + subtractMap[interval][1] as unitOfTime.DurationConstructor +); + +=====================================output===================================== +const subtractDuration = moment.duration( + subtractMap[interval][0], + subtractMap[interval][1] as unitOfTime.DurationConstructor, +); + +================================================================================ +`; diff --git a/tests/format/typescript/array/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/array/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1e70f55d1e67..000000000000 --- a/tests/format/typescript/array/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,49 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class ViewTokensChangedEvent { - public readonly ranges: { - /** - * Start line number of range - */ - readonly fromLineNumber: number; - }[]; -} - -=====================================output===================================== -export class ViewTokensChangedEvent { - public readonly ranges: { - /** - * Start line number of range - */ - readonly fromLineNumber: number; - }[]; -} - -================================================================================ -`; - -exports[`key.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const subtractDuration = moment.duration( - subtractMap[interval][0], - subtractMap[interval][1] as unitOfTime.DurationConstructor -); - -=====================================output===================================== -const subtractDuration = moment.duration( - subtractMap[interval][0], - subtractMap[interval][1] as unitOfTime.DurationConstructor -); - -================================================================================ -`; diff --git a/tests/format/typescript/array/format.test.js b/tests/format/typescript/array/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/array/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/array/jsfmt.spec.js b/tests/format/typescript/array/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/array/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/arrow/16067.ts b/tests/format/typescript/arrow/16067.ts new file mode 100644 index 000000000000..e8e76dfa5c51 --- /dev/null +++ b/tests/format/typescript/arrow/16067.ts @@ -0,0 +1,35 @@ +const foo1 = + // comment + <T>() => () => 1; + +const foo2 = + // comment + () => () => 1; + +const foo3 = + // comment + <T>() => 1; + +foo( + // comment + <T>() => () => 1, +); + +a || + // comment + (<T>() => () => 1); + +void + // comment + (<T>() => () => 1); + +cond ? + // comment + <T>() => () => 1 + : + // comment + <T>() => () => 1; + +foo4 = + // comment + <T>() => () => 1; diff --git a/tests/format/typescript/arrow/__snapshots__/format.test.js.snap b/tests/format/typescript/arrow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4a40262483db --- /dev/null +++ b/tests/format/typescript/arrow/__snapshots__/format.test.js.snap @@ -0,0 +1,437 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`16067.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const foo1 = + // comment + <T>() => () => 1; + +const foo2 = + // comment + () => () => 1; + +const foo3 = + // comment + <T>() => 1; + +foo( + // comment + <T>() => () => 1, +); + +a || + // comment + (<T>() => () => 1); + +void + // comment + (<T>() => () => 1); + +cond ? + // comment + <T>() => () => 1 + : + // comment + <T>() => () => 1; + +foo4 = + // comment + <T>() => () => 1; + +=====================================output===================================== +const foo1 = + // comment + <T>() => + () => + 1 + +const foo2 = + // comment + () => () => 1 + +const foo3 = + // comment + <T>() => 1 + +foo( + // comment + <T>() => + () => + 1, +) + +a || + // comment + (<T>() => + () => + 1) + +void ( + // comment + (<T>() => + () => + 1) +) + +cond + ? // comment + <T>() => + () => + 1 + : // comment + <T>() => + () => + 1 + +foo4 = + // comment + <T>() => + () => + 1 + +================================================================================ +`; + +exports[`16067.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1 = + // comment + <T>() => () => 1; + +const foo2 = + // comment + () => () => 1; + +const foo3 = + // comment + <T>() => 1; + +foo( + // comment + <T>() => () => 1, +); + +a || + // comment + (<T>() => () => 1); + +void + // comment + (<T>() => () => 1); + +cond ? + // comment + <T>() => () => 1 + : + // comment + <T>() => () => 1; + +foo4 = + // comment + <T>() => () => 1; + +=====================================output===================================== +const foo1 = + // comment + <T>() => + () => + 1; + +const foo2 = + // comment + () => () => 1; + +const foo3 = + // comment + <T>() => 1; + +foo( + // comment + <T>() => + () => + 1, +); + +a || + // comment + (<T>() => + () => + 1); + +void ( + // comment + (<T>() => + () => + 1) +); + +cond + ? // comment + <T>() => + () => + 1 + : // comment + <T>() => + () => + 1; + +foo4 = + // comment + <T>() => + () => + 1; + +================================================================================ +`; + +exports[`arrow_regression.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const bar = (...varargs:any[]) => { + console.log(varargs); +}; + +const foo = (x:string):void => ( + bar( + x, + () => {}, + () => {} + ) +); + +app.get("/", (req, res): void => { + res.send("Hello world"); +}); + +=====================================output===================================== +const bar = (...varargs: any[]) => { + console.log(varargs) +} + +const foo = (x: string): void => + bar( + x, + () => {}, + () => {}, + ) + +app.get("/", (req, res): void => { + res.send("Hello world") +}) + +================================================================================ +`; + +exports[`arrow_regression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const bar = (...varargs:any[]) => { + console.log(varargs); +}; + +const foo = (x:string):void => ( + bar( + x, + () => {}, + () => {} + ) +); + +app.get("/", (req, res): void => { + res.send("Hello world"); +}); + +=====================================output===================================== +const bar = (...varargs: any[]) => { + console.log(varargs); +}; + +const foo = (x: string): void => + bar( + x, + () => {}, + () => {}, + ); + +app.get("/", (req, res): void => { + res.send("Hello world"); +}); + +================================================================================ +`; + +exports[`comments.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const fn1 = () => { + return; +} /* foo */; + +const fn2 = () => { + return; +} + +// foo +; + +=====================================output===================================== +const fn1 = () => { + return +} /* foo */ + +const fn2 = () => { + return +} + +// foo + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const fn1 = () => { + return; +} /* foo */; + +const fn2 = () => { + return; +} + +// foo +; + +=====================================output===================================== +const fn1 = () => { + return; +}; /* foo */ + +const fn2 = () => { + return; +}; + +// foo + +================================================================================ +`; + +exports[`issue-6107-curry.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const getIconEngagementTypeFrom = (engagementTypes: Array<EngagementType>) => + iconEngagementType => engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something + ) => + iconEngagementType => + engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something, + thirArg: SomethingElse + ) => + iconEngagementType => + engagementTypes.includes(iconEngagementType); + +=====================================output===================================== +const getIconEngagementTypeFrom = + (engagementTypes: Array<EngagementType>) => (iconEngagementType) => + engagementTypes.includes(iconEngagementType) + +const getIconEngagementTypeFrom2 = + (engagementTypes: Array<EngagementType>, secondArg: Something) => + (iconEngagementType) => + engagementTypes.includes(iconEngagementType) + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something, + thirArg: SomethingElse, + ) => + (iconEngagementType) => + engagementTypes.includes(iconEngagementType) + +================================================================================ +`; + +exports[`issue-6107-curry.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const getIconEngagementTypeFrom = (engagementTypes: Array<EngagementType>) => + iconEngagementType => engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something + ) => + iconEngagementType => + engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something, + thirArg: SomethingElse + ) => + iconEngagementType => + engagementTypes.includes(iconEngagementType); + +=====================================output===================================== +const getIconEngagementTypeFrom = + (engagementTypes: Array<EngagementType>) => (iconEngagementType) => + engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + (engagementTypes: Array<EngagementType>, secondArg: Something) => + (iconEngagementType) => + engagementTypes.includes(iconEngagementType); + +const getIconEngagementTypeFrom2 = + ( + engagementTypes: Array<EngagementType>, + secondArg: Something, + thirArg: SomethingElse, + ) => + (iconEngagementType) => + engagementTypes.includes(iconEngagementType); + +================================================================================ +`; diff --git a/tests/format/typescript/arrow/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/arrow/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 38e5dfce10ef..000000000000 --- a/tests/format/typescript/arrow/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,244 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow_regression.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const bar = (...varargs:any[]) => { - console.log(varargs); -}; - -const foo = (x:string):void => ( - bar( - x, - () => {}, - () => {} - ) -); - -app.get("/", (req, res): void => { - res.send("Hello world"); -}); - -=====================================output===================================== -const bar = (...varargs: any[]) => { - console.log(varargs) -} - -const foo = (x: string): void => - bar( - x, - () => {}, - () => {} - ) - -app.get("/", (req, res): void => { - res.send("Hello world") -}) - -================================================================================ -`; - -exports[`arrow_regression.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const bar = (...varargs:any[]) => { - console.log(varargs); -}; - -const foo = (x:string):void => ( - bar( - x, - () => {}, - () => {} - ) -); - -app.get("/", (req, res): void => { - res.send("Hello world"); -}); - -=====================================output===================================== -const bar = (...varargs: any[]) => { - console.log(varargs); -}; - -const foo = (x: string): void => - bar( - x, - () => {}, - () => {} - ); - -app.get("/", (req, res): void => { - res.send("Hello world"); -}); - -================================================================================ -`; - -exports[`comments.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const fn1 = () => { - return; -} /* foo */; - -const fn2 = () => { - return; -} - -// foo -; - -=====================================output===================================== -const fn1 = () => { - return -} /* foo */ - -const fn2 = () => { - return -} - -// foo - -================================================================================ -`; - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const fn1 = () => { - return; -} /* foo */; - -const fn2 = () => { - return; -} - -// foo -; - -=====================================output===================================== -const fn1 = () => { - return; -}; /* foo */ - -const fn2 = () => { - return; -}; - -// foo - -================================================================================ -`; - -exports[`issue-6107-curry.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const getIconEngagementTypeFrom = (engagementTypes: Array<EngagementType>) => - iconEngagementType => engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something - ) => - iconEngagementType => - engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something, - thirArg: SomethingElse - ) => - iconEngagementType => - engagementTypes.includes(iconEngagementType); - -=====================================output===================================== -const getIconEngagementTypeFrom = - (engagementTypes: Array<EngagementType>) => (iconEngagementType) => - engagementTypes.includes(iconEngagementType) - -const getIconEngagementTypeFrom2 = - (engagementTypes: Array<EngagementType>, secondArg: Something) => - (iconEngagementType) => - engagementTypes.includes(iconEngagementType) - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something, - thirArg: SomethingElse - ) => - (iconEngagementType) => - engagementTypes.includes(iconEngagementType) - -================================================================================ -`; - -exports[`issue-6107-curry.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const getIconEngagementTypeFrom = (engagementTypes: Array<EngagementType>) => - iconEngagementType => engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something - ) => - iconEngagementType => - engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something, - thirArg: SomethingElse - ) => - iconEngagementType => - engagementTypes.includes(iconEngagementType); - -=====================================output===================================== -const getIconEngagementTypeFrom = - (engagementTypes: Array<EngagementType>) => (iconEngagementType) => - engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - (engagementTypes: Array<EngagementType>, secondArg: Something) => - (iconEngagementType) => - engagementTypes.includes(iconEngagementType); - -const getIconEngagementTypeFrom2 = - ( - engagementTypes: Array<EngagementType>, - secondArg: Something, - thirArg: SomethingElse - ) => - (iconEngagementType) => - engagementTypes.includes(iconEngagementType); - -================================================================================ -`; diff --git a/tests/format/typescript/arrow/format.test.js b/tests/format/typescript/arrow/format.test.js new file mode 100644 index 000000000000..ca21c10853c1 --- /dev/null +++ b/tests/format/typescript/arrow/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/arrow/jsfmt.spec.js b/tests/format/typescript/arrow/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/typescript/arrow/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/arrows/__snapshots__/format.test.js.snap b/tests/format/typescript/arrows/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..69ed0d1e1c8c --- /dev/null +++ b/tests/format/typescript/arrows/__snapshots__/format.test.js.snap @@ -0,0 +1,111 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow_function_expression.ts - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = (b?) => c; + +=====================================output===================================== +a = (b?) => c; + +================================================================================ +`; + +exports[`arrow_function_expression.ts - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = (b?) => c; + +=====================================output===================================== +a = (b?) => c; + +================================================================================ +`; + +exports[`short_body.ts - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const initializeSnapshotState = ( + testFile: Path, + update: boolean, + testPath: string, + expand: boolean, +) => new SnapshotState(testFile, update, testPath, expand); + +=====================================output===================================== +const initializeSnapshotState = ( + testFile: Path, + update: boolean, + testPath: string, + expand: boolean, +) => new SnapshotState(testFile, update, testPath, expand); + +================================================================================ +`; + +exports[`short_body.ts - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const initializeSnapshotState = ( + testFile: Path, + update: boolean, + testPath: string, + expand: boolean, +) => new SnapshotState(testFile, update, testPath, expand); + +=====================================output===================================== +const initializeSnapshotState = ( + testFile: Path, + update: boolean, + testPath: string, + expand: boolean, +) => new SnapshotState(testFile, update, testPath, expand); + +================================================================================ +`; + +exports[`type_params.ts - {"arrowParens":"always"} format 1`] = ` +====================================options===================================== +arrowParens: "always" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<T>(a) => { } + +=====================================output===================================== +<T>(a) => {}; + +================================================================================ +`; + +exports[`type_params.ts - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +<T>(a) => { } + +=====================================output===================================== +<T>(a) => {}; + +================================================================================ +`; diff --git a/tests/format/typescript/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/arrows/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3731dea63a8a..000000000000 --- a/tests/format/typescript/arrows/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,111 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow_function_expression.ts - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = (b?) => c; - -=====================================output===================================== -a = (b?) => c; - -================================================================================ -`; - -exports[`arrow_function_expression.ts - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -a = (b?) => c; - -=====================================output===================================== -a = (b?) => c; - -================================================================================ -`; - -exports[`short_body.ts - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const initializeSnapshotState = ( - testFile: Path, - update: boolean, - testPath: string, - expand: boolean, -) => new SnapshotState(testFile, update, testPath, expand); - -=====================================output===================================== -const initializeSnapshotState = ( - testFile: Path, - update: boolean, - testPath: string, - expand: boolean -) => new SnapshotState(testFile, update, testPath, expand); - -================================================================================ -`; - -exports[`short_body.ts - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -const initializeSnapshotState = ( - testFile: Path, - update: boolean, - testPath: string, - expand: boolean, -) => new SnapshotState(testFile, update, testPath, expand); - -=====================================output===================================== -const initializeSnapshotState = ( - testFile: Path, - update: boolean, - testPath: string, - expand: boolean -) => new SnapshotState(testFile, update, testPath, expand); - -================================================================================ -`; - -exports[`type_params.ts - {"arrowParens":"always"} format 1`] = ` -====================================options===================================== -arrowParens: "always" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -<T>(a) => { } - -=====================================output===================================== -<T>(a) => {}; - -================================================================================ -`; - -exports[`type_params.ts - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -<T>(a) => { } - -=====================================output===================================== -<T>(a) => {}; - -================================================================================ -`; diff --git a/tests/format/typescript/arrows/format.test.js b/tests/format/typescript/arrows/format.test.js new file mode 100644 index 000000000000..c397d41f7ae3 --- /dev/null +++ b/tests/format/typescript/arrows/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript", "flow"], { arrowParens: "always" }); +runFormatTest(import.meta, ["typescript", "flow"], { arrowParens: "avoid" }); diff --git a/tests/format/typescript/arrows/jsfmt.spec.js b/tests/format/typescript/arrows/jsfmt.spec.js deleted file mode 100644 index 7274564b6974..000000000000 --- a/tests/format/typescript/arrows/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript", "babel"], { arrowParens: "always" }); -run_spec(__dirname, ["typescript", "babel"], { arrowParens: "avoid" }); diff --git a/tests/format/typescript/as/__snapshots__/format.test.js.snap b/tests/format/typescript/as/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..eec50753b499 --- /dev/null +++ b/tests/format/typescript/as/__snapshots__/format.test.js.snap @@ -0,0 +1,542 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-pattern.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[x as any] = x; + +=====================================output===================================== +[x as any] = x; + +================================================================================ +`; + +exports[`as.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const name = (description as DescriptionObject).name || (description as string); +this.isTabActionBar((e.target || e.srcElement) as HTMLElement); +(originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError; +'current' in (props.pagination as Object); +('current' in props.pagination) as Object; +start + (yearSelectTotal as number); +(start + yearSelectTotal) as number; +scrollTop > (visibilityHeight as number); +(scrollTop > visibilityHeight) as number; +export default class Column<T> extends (RcTable.Column as React.ComponentClass<ColumnProps<T>,ColumnProps<T>,ColumnProps<T>,ColumnProps<T>>) {} +export const MobxTypedForm = class extends (Form as { new (): any }) {} +export abstract class MobxTypedForm1 extends (Form as { new (): any }) {} +({}) as {}; +function*g() { + const test = (yield 'foo') as number; +} +async function g1() { + const test = (await 'foo') as number; +} +({}) as X; +() => ({}) as X; +const state = JSON.stringify({ + next: window.location.href, + nonce, +} as State); + +(foo.bar as Baz) = [bar]; +(foo.bar as any)++; + +(bValue as boolean) ? 0 : -1; +<boolean>bValue ? 0 : -1; + +const value1 = thisIsAReallyReallyReallyReallyReallyLongIdentifier as SomeInterface; +const value2 = thisIsAnIdentifier as thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface; +const value3 = thisIsAReallyLongIdentifier as (SomeInterface | SomeOtherInterface); +const value4 = thisIsAReallyLongIdentifier as { prop1: string, prop2: number, prop3: number }[]; +const value5 = thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyLongIdentifier as [string, number]; + +const iter1 = createIterator(this.controller, child, this.tag as SyncFunctionComponent); +const iter2 = createIterator(self.controller, child, self.tag as SyncFunctionComponent); + +=====================================output===================================== +const name = (description as DescriptionObject).name || (description as string); +this.isTabActionBar((e.target || e.srcElement) as HTMLElement); +(originalError + ? wrappedError(errMsg, originalError) + : Error(errMsg)) as InjectionError; +"current" in (props.pagination as Object); +("current" in props.pagination) as Object; +start + (yearSelectTotal as number); +(start + yearSelectTotal) as number; +scrollTop > (visibilityHeight as number); +(scrollTop > visibilityHeight) as number; +export default class Column<T> extends (RcTable.Column as React.ComponentClass< + ColumnProps<T>, + ColumnProps<T>, + ColumnProps<T>, + ColumnProps<T> +>) {} +export const MobxTypedForm = class extends (Form as { new (): any }) {}; +export abstract class MobxTypedForm1 extends (Form as { new (): any }) {} +({}) as {}; +function* g() { + const test = (yield "foo") as number; +} +async function g1() { + const test = (await "foo") as number; +} +({}) as X; +() => ({}) as X; +const state = JSON.stringify({ + next: window.location.href, + nonce, +} as State); + +(foo.bar as Baz) = [bar]; +(foo.bar as any)++; + +(bValue as boolean) ? 0 : -1; +<boolean>bValue ? 0 : -1; + +const value1 = + thisIsAReallyReallyReallyReallyReallyLongIdentifier as SomeInterface; +const value2 = + thisIsAnIdentifier as thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface; +const value3 = thisIsAReallyLongIdentifier as + | SomeInterface + | SomeOtherInterface; +const value4 = thisIsAReallyLongIdentifier as { + prop1: string; + prop2: number; + prop3: number; +}[]; +const value5 = + thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyLongIdentifier as [ + string, + number, + ]; + +const iter1 = createIterator( + this.controller, + child, + this.tag as SyncFunctionComponent, +); +const iter2 = createIterator( + self.controller, + child, + self.tag as SyncFunctionComponent, +); + +================================================================================ +`; + +exports[`as-const-embedded.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const GQL_QUERY_WITH_CONST = /* GraphQL */ \` + query S { shop } +\` as const; + +const HTML_WITH_CONST = /* HTML */ \` +<div> +<h1>foo</h1> + <p>foo</p> +</div> +\` as const; + +=====================================output===================================== +const GQL_QUERY_WITH_CONST = /* GraphQL */ \` + query S { + shop + } +\` as const; + +const HTML_WITH_CONST = /* HTML */ \` + <div> + <h1>foo</h1> + <p>foo</p> + </div> +\` as const; + +================================================================================ +`; + +exports[`assignment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const LOG_LEVEL = { + EMERGENCY: 0, + ALERT: 1, + CRITICAL: 2, + ERROR: 3, + WARNING: 4, + NOTICE: 5, + INFO: 6, + DEBUG: 7, +} as const; + +const TYPE_MAP = { + 'character device': 'special', + 'character special file': 'special', + directory: 'directory', + 'regular file': 'file', + socket: 'socket', + 'symbolic link': 'link', +} as Foo; + +this.previewPlayerHandle = (setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews(); + this.currentPreviewIndex++; + } +}, this.refreshDelay) as unknown) as number; + +this.intervalID = (setInterval(() => { + self.step(); +}, 30) as unknown) as number; + +=====================================output===================================== +export const LOG_LEVEL = { + EMERGENCY: 0, + ALERT: 1, + CRITICAL: 2, + ERROR: 3, + WARNING: 4, + NOTICE: 5, + INFO: 6, + DEBUG: 7, +} as const; + +const TYPE_MAP = { + "character device": "special", + "character special file": "special", + directory: "directory", + "regular file": "file", + socket: "socket", + "symbolic link": "link", +} as Foo; + +this.previewPlayerHandle = setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews(); + this.currentPreviewIndex++; + } +}, this.refreshDelay) as unknown as number; + +this.intervalID = setInterval(() => { + self.step(); +}, 30) as unknown as number; + +================================================================================ +`; + +exports[`assignment2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const defaultMaskGetter = $parse(attrs[directiveName]) as ( + scope: ng.IScope +) => Mask; + +(this.configuration as any) = (this.editor as any) = (this + .editorBody as any) = undefined; + +angular.module("foo").directive("formIsolator", () => { + return { + name: "form", + controller: class FormIsolatorController { + $addControl = angular.noop; + } as ng.IControllerConstructor, + }; +}); + +(this.selectorElem as any) = this.multiselectWidget = this.initialValues = undefined; + +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) as FieldService.RendererAttributes; + +const annotate = (angular.injector as any).$$annotate as ( + fn: Function +) => string[]; + +const originalPrototype = originalConstructor.prototype as TComponent & InjectionTarget, + propertyToServiceName = originalPrototype._inject; + +=====================================output===================================== +const defaultMaskGetter = $parse(attrs[directiveName]) as ( + scope: ng.IScope, +) => Mask; + +(this.configuration as any) = + (this.editor as any) = + (this.editorBody as any) = + undefined; + +angular.module("foo").directive("formIsolator", () => { + return { + name: "form", + controller: class FormIsolatorController { + $addControl = angular.noop; + } as ng.IControllerConstructor, + }; +}); + +(this.selectorElem as any) = + this.multiselectWidget = + this.initialValues = + undefined; + +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) as FieldService.RendererAttributes; + +const annotate = (angular.injector as any).$$annotate as ( + fn: Function, +) => string[]; + +const originalPrototype = originalConstructor.prototype as TComponent & + InjectionTarget, + propertyToServiceName = originalPrototype._inject; + +================================================================================ +`; + +exports[`export_default_as.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default (function log() {} as typeof console.log) + +=====================================output===================================== +export default (function log() {} as typeof console.log); + +================================================================================ +`; + +exports[`expression-statement.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// expression statemnt of "as" expression hardly ever makes sense, but it's still valid. +const [type, x] = [0, 0]; +(type) as unknown; +x as unknown; + +=====================================output===================================== +// expression statemnt of "as" expression hardly ever makes sense, but it's still valid. +const [type, x] = [0, 0]; +(type) as unknown; +x as unknown; + +================================================================================ +`; + +exports[`long-identifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie; + +averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol = + annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave; + +averredBathersBoxroomBuggyNurl = { + anodyneCondosMalateOverateRetinol: + annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave +}; + +averredBathersBoxroomBuggyNurl( + anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as + kochabCooieGameOnOboleUnweave +); + +=====================================output===================================== +const bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie; + +averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol = + annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave; + +averredBathersBoxroomBuggyNurl = { + anodyneCondosMalateOverateRetinol: + annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave, +}; + +averredBathersBoxroomBuggyNurl( + anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave, +); + +================================================================================ +`; + +exports[`nested-await-and-as.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const getAccountCount = async () => + (await + ((await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) as TreeItem + ).getChildren() + ).length + +=====================================output===================================== +const getAccountCount = async () => + ( + await ( + (await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) as TreeItem + ).getChildren() + ).length; + +================================================================================ +`; + +exports[`return.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + return { + foo: 1, + bar: 2, + } as Foo; +} + +=====================================output===================================== +function foo() { + return { + foo: 1, + bar: 2, + } as Foo; +} + +================================================================================ +`; + +exports[`ternary.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; + +foo = (condition ? firstValue : secondValue) as SomeType; + +const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; + +function foo() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; +} + +function foo() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; +} + +function foo() { + void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo); +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); + +=====================================output===================================== +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) as Fooooooooooo; + +foo = (condition ? firstValue : secondValue) as SomeType; + +const foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) as Fooooooooooo; + +function foo() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) as Fooooooooooo; +} + +function foo() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) as Fooooooooooo; +} + +function foo() { + void (( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) as Fooooooooooo); +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); + +================================================================================ +`; diff --git a/tests/format/typescript/as/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/as/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 116898b60be7..000000000000 --- a/tests/format/typescript/as/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,488 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`array-pattern.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -[x as any] = x; - -=====================================output===================================== -[x as any] = x; - -================================================================================ -`; - -exports[`as.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const name = (description as DescriptionObject).name || (description as string); -this.isTabActionBar((e.target || e.srcElement) as HTMLElement); -(originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError; -'current' in (props.pagination as Object); -('current' in props.pagination) as Object; -start + (yearSelectTotal as number); -(start + yearSelectTotal) as number; -scrollTop > (visibilityHeight as number); -(scrollTop > visibilityHeight) as number; -export default class Column<T> extends (RcTable.Column as React.ComponentClass<ColumnProps<T>,ColumnProps<T>,ColumnProps<T>,ColumnProps<T>>) {} -export const MobxTypedForm = class extends (Form as { new (): any }) {} -export abstract class MobxTypedForm1 extends (Form as { new (): any }) {} -({}) as {}; -function*g() { - const test = (yield 'foo') as number; -} -async function g1() { - const test = (await 'foo') as number; -} -({}) as X; -() => ({}) as X; -const state = JSON.stringify({ - next: window.location.href, - nonce, -} as State); - -(foo.bar as Baz) = [bar]; -(foo.bar as any)++; - -(bValue as boolean) ? 0 : -1; -<boolean>bValue ? 0 : -1; - -const value1 = thisIsAReallyReallyReallyReallyReallyLongIdentifier as SomeInterface; -const value2 = thisIsAnIdentifier as thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface; -const value3 = thisIsAReallyLongIdentifier as (SomeInterface | SomeOtherInterface); -const value4 = thisIsAReallyLongIdentifier as { prop1: string, prop2: number, prop3: number }[]; -const value5 = thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyLongIdentifier as [string, number]; - -const iter1 = createIterator(this.controller, child, this.tag as SyncFunctionComponent); -const iter2 = createIterator(self.controller, child, self.tag as SyncFunctionComponent); - -=====================================output===================================== -const name = (description as DescriptionObject).name || (description as string); -this.isTabActionBar((e.target || e.srcElement) as HTMLElement); -(originalError - ? wrappedError(errMsg, originalError) - : Error(errMsg)) as InjectionError; -"current" in (props.pagination as Object); -("current" in props.pagination) as Object; -start + (yearSelectTotal as number); -(start + yearSelectTotal) as number; -scrollTop > (visibilityHeight as number); -(scrollTop > visibilityHeight) as number; -export default class Column<T> extends (RcTable.Column as React.ComponentClass< - ColumnProps<T>, - ColumnProps<T>, - ColumnProps<T>, - ColumnProps<T> ->) {} -export const MobxTypedForm = class extends (Form as { new (): any }) {}; -export abstract class MobxTypedForm1 extends (Form as { new (): any }) {} -({}) as {}; -function* g() { - const test = (yield "foo") as number; -} -async function g1() { - const test = (await "foo") as number; -} -({}) as X; -() => ({} as X); -const state = JSON.stringify({ - next: window.location.href, - nonce, -} as State); - -(foo.bar as Baz) = [bar]; -(foo.bar as any)++; - -(bValue as boolean) ? 0 : -1; -<boolean>bValue ? 0 : -1; - -const value1 = - thisIsAReallyReallyReallyReallyReallyLongIdentifier as SomeInterface; -const value2 = - thisIsAnIdentifier as thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface; -const value3 = thisIsAReallyLongIdentifier as - | SomeInterface - | SomeOtherInterface; -const value4 = thisIsAReallyLongIdentifier as { - prop1: string; - prop2: number; - prop3: number; -}[]; -const value5 = - thisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyLongIdentifier as [ - string, - number - ]; - -const iter1 = createIterator( - this.controller, - child, - this.tag as SyncFunctionComponent -); -const iter2 = createIterator( - self.controller, - child, - self.tag as SyncFunctionComponent -); - -================================================================================ -`; - -exports[`assignment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const LOG_LEVEL = { - EMERGENCY: 0, - ALERT: 1, - CRITICAL: 2, - ERROR: 3, - WARNING: 4, - NOTICE: 5, - INFO: 6, - DEBUG: 7, -} as const; - -const TYPE_MAP = { - 'character device': 'special', - 'character special file': 'special', - directory: 'directory', - 'regular file': 'file', - socket: 'socket', - 'symbolic link': 'link', -} as Foo; - -this.previewPlayerHandle = (setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews(); - this.currentPreviewIndex++; - } -}, this.refreshDelay) as unknown) as number; - -this.intervalID = (setInterval(() => { - self.step(); -}, 30) as unknown) as number; - -=====================================output===================================== -export const LOG_LEVEL = { - EMERGENCY: 0, - ALERT: 1, - CRITICAL: 2, - ERROR: 3, - WARNING: 4, - NOTICE: 5, - INFO: 6, - DEBUG: 7, -} as const; - -const TYPE_MAP = { - "character device": "special", - "character special file": "special", - directory: "directory", - "regular file": "file", - socket: "socket", - "symbolic link": "link", -} as Foo; - -this.previewPlayerHandle = setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews(); - this.currentPreviewIndex++; - } -}, this.refreshDelay) as unknown as number; - -this.intervalID = setInterval(() => { - self.step(); -}, 30) as unknown as number; - -================================================================================ -`; - -exports[`assignment2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const defaultMaskGetter = $parse(attrs[directiveName]) as ( - scope: ng.IScope -) => Mask; - -(this.configuration as any) = (this.editor as any) = (this - .editorBody as any) = undefined; - -angular.module("foo").directive("formIsolator", () => { - return { - name: "form", - controller: class FormIsolatorController { - $addControl = angular.noop; - } as ng.IControllerConstructor, - }; -}); - -(this.selectorElem as any) = this.multiselectWidget = this.initialValues = undefined; - -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) as FieldService.RendererAttributes; - -const annotate = (angular.injector as any).$$annotate as ( - fn: Function -) => string[]; - -const originalPrototype = originalConstructor.prototype as TComponent & InjectionTarget, - propertyToServiceName = originalPrototype._inject; - -=====================================output===================================== -const defaultMaskGetter = $parse(attrs[directiveName]) as ( - scope: ng.IScope -) => Mask; - -(this.configuration as any) = - (this.editor as any) = - (this.editorBody as any) = - undefined; - -angular.module("foo").directive("formIsolator", () => { - return { - name: "form", - controller: class FormIsolatorController { - $addControl = angular.noop; - } as ng.IControllerConstructor, - }; -}); - -(this.selectorElem as any) = - this.multiselectWidget = - this.initialValues = - undefined; - -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) as FieldService.RendererAttributes; - -const annotate = (angular.injector as any).$$annotate as ( - fn: Function -) => string[]; - -const originalPrototype = originalConstructor.prototype as TComponent & - InjectionTarget, - propertyToServiceName = originalPrototype._inject; - -================================================================================ -`; - -exports[`export_default_as.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default (function log() {} as typeof console.log) - -=====================================output===================================== -export default (function log() {} as typeof console.log); - -================================================================================ -`; - -exports[`long-identifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie; - -averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol = - annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave; - -averredBathersBoxroomBuggyNurl = { - anodyneCondosMalateOverateRetinol: - annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave -}; - -averredBathersBoxroomBuggyNurl( - anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as - kochabCooieGameOnOboleUnweave -); - -=====================================output===================================== -const bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie; - -averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol = - annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave; - -averredBathersBoxroomBuggyNurl = { - anodyneCondosMalateOverateRetinol: - annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave, -}; - -averredBathersBoxroomBuggyNurl( - anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave -); - -================================================================================ -`; - -exports[`nested-await-and-as.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const getAccountCount = async () => - (await - ((await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) as TreeItem - ).getChildren() - ).length - -=====================================output===================================== -const getAccountCount = async () => - ( - await ( - (await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) as TreeItem - ).getChildren() - ).length; - -================================================================================ -`; - -exports[`return.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function foo() { - return { - foo: 1, - bar: 2, - } as Foo; -} - -=====================================output===================================== -function foo() { - return { - foo: 1, - bar: 2, - } as Foo; -} - -================================================================================ -`; - -exports[`ternary.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; - -foo = (condition ? firstValue : secondValue) as SomeType; - -const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; - -function foo() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; -} - -function foo() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo; -} - -function foo() { - void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo); -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); - -=====================================output===================================== -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) as Fooooooooooo; - -foo = (condition ? firstValue : secondValue) as SomeType; - -const foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) as Fooooooooooo; - -function foo() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) as Fooooooooooo; -} - -function foo() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) as Fooooooooooo; -} - -function foo() { - void (( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) as Fooooooooooo); -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) as AnnularCooeedSplicesWalksWayWay); - -================================================================================ -`; diff --git a/tests/format/typescript/as/as-const-embedded.ts b/tests/format/typescript/as/as-const-embedded.ts new file mode 100644 index 000000000000..b33624693bf4 --- /dev/null +++ b/tests/format/typescript/as/as-const-embedded.ts @@ -0,0 +1,10 @@ +const GQL_QUERY_WITH_CONST = /* GraphQL */ ` + query S { shop } +` as const; + +const HTML_WITH_CONST = /* HTML */ ` +<div> +<h1>foo</h1> + <p>foo</p> +</div> +` as const; diff --git a/tests/format/typescript/as/expression-statement.ts b/tests/format/typescript/as/expression-statement.ts new file mode 100644 index 000000000000..abdb2ed74da4 --- /dev/null +++ b/tests/format/typescript/as/expression-statement.ts @@ -0,0 +1,4 @@ +// expression statemnt of "as" expression hardly ever makes sense, but it's still valid. +const [type, x] = [0, 0]; +(type) as unknown; +x as unknown; diff --git a/tests/format/typescript/as/format.test.js b/tests/format/typescript/as/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/as/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/as/jsfmt.spec.js b/tests/format/typescript/as/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/as/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/assert/__snapshots__/format.test.js.snap b/tests/format/typescript/assert/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..68cb52e60f82 --- /dev/null +++ b/tests/format/typescript/assert/__snapshots__/format.test.js.snap @@ -0,0 +1,96 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = (x: any): asserts x is string/* comment */ => {} +a = (x: any): asserts x is /* comment */string => {} +a = (x: any): asserts x is/* comment */ string => {} +a = (x: any): asserts x /* comment */is string => {} +a = (x: any): asserts x/* comment */ is string => {} +a = (x: any): asserts /* comment */x is string => {} +a = (x: any): asserts/* comment */ x is string => {} +a = (x: any): /* comment */asserts x is string => {} + +=====================================output===================================== +a = (x: any): asserts x is string /* comment */ => {}; +a = (x: any): asserts x is /* comment */ string => {}; +a = (x: any): asserts x is /* comment */ string => {}; +a = (x: any): asserts x /* comment */ is string => {}; +a = (x: any): asserts x /* comment */ is string => {}; +a = (x: any): asserts /* comment */ x is string => {}; +a = (x: any): asserts /* comment */ x is string => {}; +a = (x: any): /* comment */ asserts x is string => {}; + +================================================================================ +`; + +exports[`index.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const assertString = (x: any): asserts x => { + console.assert(typeof x === 'string'); +} + +function assertsString(x: any): asserts x { + console.assert(typeof x === 'string'); +} + +const assertStringWithGuard = (x: any): asserts x is string => { + console.assert(typeof x === 'string'); +} + +function assertsStringWithGuard(x: any): asserts x is string { + console.assert(typeof x === 'string'); +} + +interface AssertFoo { + isString(node: any): asserts node; +} + +class AssertsFoo { + isBar(): asserts this { + return; + } + isBaz = (): asserts this => { + return; + } +} +=====================================output===================================== +const assertString = (x: any): asserts x => { + console.assert(typeof x === "string"); +}; + +function assertsString(x: any): asserts x { + console.assert(typeof x === "string"); +} + +const assertStringWithGuard = (x: any): asserts x is string => { + console.assert(typeof x === "string"); +}; + +function assertsStringWithGuard(x: any): asserts x is string { + console.assert(typeof x === "string"); +} + +interface AssertFoo { + isString(node: any): asserts node; +} + +class AssertsFoo { + isBar(): asserts this { + return; + } + isBaz = (): asserts this => { + return; + }; +} + +================================================================================ +`; diff --git a/tests/format/typescript/assert/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/assert/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9705b15b89cc..000000000000 --- a/tests/format/typescript/assert/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,68 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`index.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const assertString = (x: any): asserts x => { - console.assert(typeof x === 'string'); -} - -function assertsString(x: any): asserts x { - console.assert(typeof x === 'string'); -} - -const assertStringWithGuard = (x: any): asserts x is string => { - console.assert(typeof x === 'string'); -} - -function assertsStringWithGuard(x: any): asserts x is string { - console.assert(typeof x === 'string'); -} - -interface AssertFoo { - isString(node: any): asserts node; -} - -class AssertsFoo { - isBar(): asserts this { - return; - } - isBaz = (): asserts this => { - return; - } -} -=====================================output===================================== -const assertString = (x: any): asserts x => { - console.assert(typeof x === "string"); -}; - -function assertsString(x: any): asserts x { - console.assert(typeof x === "string"); -} - -const assertStringWithGuard = (x: any): asserts x is string => { - console.assert(typeof x === "string"); -}; - -function assertsStringWithGuard(x: any): asserts x is string { - console.assert(typeof x === "string"); -} - -interface AssertFoo { - isString(node: any): asserts node; -} - -class AssertsFoo { - isBar(): asserts this { - return; - } - isBaz = (): asserts this => { - return; - }; -} - -================================================================================ -`; diff --git a/tests/format/typescript/assert/comment.ts b/tests/format/typescript/assert/comment.ts new file mode 100644 index 000000000000..553d9a5dbdf5 --- /dev/null +++ b/tests/format/typescript/assert/comment.ts @@ -0,0 +1,8 @@ +a = (x: any): asserts x is string/* comment */ => {} +a = (x: any): asserts x is /* comment */string => {} +a = (x: any): asserts x is/* comment */ string => {} +a = (x: any): asserts x /* comment */is string => {} +a = (x: any): asserts x/* comment */ is string => {} +a = (x: any): asserts /* comment */x is string => {} +a = (x: any): asserts/* comment */ x is string => {} +a = (x: any): /* comment */asserts x is string => {} diff --git a/tests/format/typescript/assert/format.test.js b/tests/format/typescript/assert/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/assert/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/assert/jsfmt.spec.js b/tests/format/typescript/assert/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/assert/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/assignment/__snapshots__/format.test.js.snap b/tests/format/typescript/assignment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d58801bc858b --- /dev/null +++ b/tests/format/typescript/assignment/__snapshots__/format.test.js.snap @@ -0,0 +1,542 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-2322.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const listAuthorizedSitesForDefaultHandler: ListAuthorizedSitesForHandler = aListAuthorizedSitesForResponse; + +=====================================output===================================== +export const listAuthorizedSitesForDefaultHandler: ListAuthorizedSitesForHandler = + aListAuthorizedSitesForResponse; + +================================================================================ +`; + +exports[`issue-2482.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export function countriesReceived(countries: Array<Country>): CountryActionType { + return { + type: ActionTypes.COUNTRIES_RECEIVED, + countries: countries, + }; +} + +=====================================output===================================== +export function countriesReceived( + countries: Array<Country>, +): CountryActionType { + return { + type: ActionTypes.COUNTRIES_RECEIVED, + countries: countries, + }; +} + +================================================================================ +`; + +exports[`issue-2485.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class x { + private readonly rawConfigFromFile$: BehaviorSubject< + any + > = new BehaviorSubject(notRead); +} + +=====================================output===================================== +class x { + private readonly rawConfigFromFile$: BehaviorSubject<any> = + new BehaviorSubject(notRead); +} + +================================================================================ +`; + +exports[`issue-3122.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const findByDate: Resolver<void, Recipe[], { date: Date }> = + (_, { date }, { req } ) => { + const repo = req.getRepository(Recipe); + return repo.find({ createDate: date }); + } + +export const findByDate: Resolver<void, Recipe[], { date: Date }> = + (_, { date }, { req } ) => Recipe.find({ createDate: date }); + +=====================================output===================================== +export const findByDate: Resolver<void, Recipe[], { date: Date }> = ( + _, + { date }, + { req }, +) => { + const repo = req.getRepository(Recipe); + return repo.find({ createDate: date }); +}; + +export const findByDate: Resolver<void, Recipe[], { date: Date }> = ( + _, + { date }, + { req }, +) => Recipe.find({ createDate: date }); + +================================================================================ +`; + +exports[`issue-5370.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const durabilityMetricsSelectable: Immutable.OrderedSet< + SomeReportingMetric, +> = myExperienceSelectable.concat(otherDurabilityMetricsSelectable); + +=====================================output===================================== +const durabilityMetricsSelectable: Immutable.OrderedSet<SomeReportingMetric> = + myExperienceSelectable.concat(otherDurabilityMetricsSelectable); + +================================================================================ +`; + +exports[`issue-6783.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const enviromentProdValues: EnvironmentValues = assign<EnvironmentValues>( + { + apiURL: '/api', + }, + enviromentBaseValues +); + +=====================================output===================================== +export const enviromentProdValues: EnvironmentValues = + assign<EnvironmentValues>( + { + apiURL: "/api", + }, + enviromentBaseValues, + ); + +================================================================================ +`; + +exports[`issue-8619.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + { + { + const myLongVariableName: MyLongTypeName | null = myLongFunctionCallHere(); + } + } +} + +=====================================output===================================== +{ + { + { + const myLongVariableName: MyLongTypeName | null = + myLongFunctionCallHere(); + } + } +} + +================================================================================ +`; + +exports[`issue-9172.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const firestorePersonallyIdentifiablePaths: Array<Collections.Users.Entity> = somefunc(); + +=====================================output===================================== +const firestorePersonallyIdentifiablePaths: Array<Collections.Users.Entity> = + somefunc(); + +================================================================================ +`; + +exports[`issue-10846.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = call<{ + prop1: string; + prop2: string; + prop3: string; +}>(); + +export const CallRecorderContext = + createContext<{ + deleteRecording: (id: string) => void; + deleteAll: () => void; + } | null>(null); + +export const CallRecorderContext = + createContext<{ + deleteRecording: (id: string) => void; + deleteAll: () => void; + } | null>(null, "useless"); + +const foo = + call<Foooooo, Foooooo, Foooooo, Foooooo, Foooooo, Foooooo, Foooooo>(); + +const foo = + call< + | Foooooooooooo + | Foooooooooooo + | Foooooooooooo + | Foooooooooooo + | Foooooooooooo + >(); + +const foo = + call< + Foooooooooooo & + Foooooooooooo & + Foooooooooooo & + Foooooooooooo & + Foooooooooooo + >(); + +=====================================output===================================== +const foo = call<{ + prop1: string; + prop2: string; + prop3: string; +}>(); + +export const CallRecorderContext = createContext<{ + deleteRecording: (id: string) => void; + deleteAll: () => void; +} | null>(null); + +export const CallRecorderContext = createContext<{ + deleteRecording: (id: string) => void; + deleteAll: () => void; +} | null>(null, "useless"); + +const foo = call< + Foooooo, + Foooooo, + Foooooo, + Foooooo, + Foooooo, + Foooooo, + Foooooo +>(); + +const foo = call< + Foooooooooooo | Foooooooooooo | Foooooooooooo | Foooooooooooo | Foooooooooooo +>(); + +const foo = call< + Foooooooooooo & Foooooooooooo & Foooooooooooo & Foooooooooooo & Foooooooooooo +>(); + +================================================================================ +`; + +exports[`issue-10848.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const MyComponent: React.VoidFunctionComponent<MyComponentProps> = ({ x }) => { + const a = useA() + return <div>x = {x}; a = {a}</div> +} + +const MyComponent2: React.VoidFunctionComponent<MyComponent2Props> = ({ x, y }) => { + const a = useA() + return <div>x = {x}; y = {y}; a = {a}</div> +} + +const MyComponentWithLongName1: React.VoidFunctionComponent<MyComponentWithLongNameProps> = ({ x, y }) => { + const a = useA() + return <div>x = {x}; y = {y}; a = {a}</div> +} + +const MyComponentWithLongName2: React.VoidFunctionComponent<MyComponentWithLongNameProps> = ({ x, y, anotherPropWithLongName1, anotherPropWithLongName2, anotherPropWithLongName3, anotherPropWithLongName4 }) => { + const a = useA() + return <div>x = {x}; y = {y}; a = {a}</div> +} + +const MyGenericComponent: React.VoidFunctionComponent<MyGenericComponentProps<number>> = ({ x, y }) => { + const a = useA() + return <div>x = {x}; y = {y}; a = {a}</div> +} + +export const ExportToExcalidrawPlus: React.FC<{ + elements: readonly NonDeletedExcalidrawElement[]; + appState: AppState; + onError: (error: Error) => void; +}> = ({ elements, appState, onError }) => { + return null; +} + +const Query: FunctionComponent<QueryProps> = ({ + children, + type, + resource, + payload, + // Provides an undefined onSuccess just so the key \`onSuccess\` is defined + // This is used to detect options in useDataProvider + options = { onSuccess: undefined }, +}) => + children( + useQuery( + { type, resource, payload }, + { ...options, withDeclarativeSideEffectsSupport: true } + ) + ); + +=====================================output===================================== +const MyComponent: React.VoidFunctionComponent<MyComponentProps> = ({ x }) => { + const a = useA(); + return ( + <div> + x = {x}; a = {a} + </div> + ); +}; + +const MyComponent2: React.VoidFunctionComponent<MyComponent2Props> = ({ + x, + y, +}) => { + const a = useA(); + return ( + <div> + x = {x}; y = {y}; a = {a} + </div> + ); +}; + +const MyComponentWithLongName1: React.VoidFunctionComponent< + MyComponentWithLongNameProps +> = ({ x, y }) => { + const a = useA(); + return ( + <div> + x = {x}; y = {y}; a = {a} + </div> + ); +}; + +const MyComponentWithLongName2: React.VoidFunctionComponent< + MyComponentWithLongNameProps +> = ({ + x, + y, + anotherPropWithLongName1, + anotherPropWithLongName2, + anotherPropWithLongName3, + anotherPropWithLongName4, +}) => { + const a = useA(); + return ( + <div> + x = {x}; y = {y}; a = {a} + </div> + ); +}; + +const MyGenericComponent: React.VoidFunctionComponent< + MyGenericComponentProps<number> +> = ({ x, y }) => { + const a = useA(); + return ( + <div> + x = {x}; y = {y}; a = {a} + </div> + ); +}; + +export const ExportToExcalidrawPlus: React.FC<{ + elements: readonly NonDeletedExcalidrawElement[]; + appState: AppState; + onError: (error: Error) => void; +}> = ({ elements, appState, onError }) => { + return null; +}; + +const Query: FunctionComponent<QueryProps> = ({ + children, + type, + resource, + payload, + // Provides an undefined onSuccess just so the key \`onSuccess\` is defined + // This is used to detect options in useDataProvider + options = { onSuccess: undefined }, +}) => + children( + useQuery( + { type, resource, payload }, + { ...options, withDeclarativeSideEffectsSupport: true }, + ), + ); + +================================================================================ +`; + +exports[`issue-10850.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const map: Map<Function, Map<string | void, { value: UnloadedDescriptor }>> = + new Map(); + +const map: Map<Function, Condition extends Foo ? FooFooFoo : BarBarBar> = + new Map(); + +const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> = + new Map(); + +const map: Map<Function, Foo<S>> = new Map(); + +=====================================output===================================== +const map: Map< + Function, + Map<string | void, { value: UnloadedDescriptor }> +> = new Map(); + +const map: Map< + Function, + Condition extends Foo ? FooFooFoo : BarBarBar +> = new Map(); + +const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> = + new Map(); + +const map: Map<Function, Foo<S>> = new Map(); + +================================================================================ +`; + +exports[`issue-12413.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let emit = + defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>(); + +let abc = + func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>(); + +=====================================output===================================== +let emit = defineEmits<{ + (event: "ready", canvas: HTMLCanvasElement): void; + (event: "resize", canvas: HTMLCanvasElement): void; +}>(); + +let abc = func<{ + a: 2; + b: 3; + d: 78; + e: 9; + f: 8; + g: 7; + h: 6; + i: 5; + j: 4; + k: 3; + l: 2; + m: 1; + n: 0; + o: 9; + p: 8; + q: 7; + r: 6; + s: 5; + t: 4; + u: 3; + v: 2; + w: 1; + x: 0; + y: 9; + z: 8; +}>(); + +================================================================================ +`; + +exports[`lone-arg.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (true) { + if (condition) { + const secondType = sourceCode.getNodeByRangeIndex1234(second.range[0])! + .type; + } +} + +=====================================output===================================== +if (true) { + if (condition) { + const secondType = sourceCode.getNodeByRangeIndex1234( + second.range[0], + )!.type; + } +} + +================================================================================ +`; + +exports[`parenthesized.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/12933/files +(<number>x) = null; +(x!) = null; +(a as any) = null; +(a as number) = 42; +((a as any) as string) = null; + +=====================================output===================================== +// https://github.com/babel/babel/pull/12933/files +(<number>x) = null; +x! = null; +(a as any) = null; +(a as number) = 42; +(a as any as string) = null; + +================================================================================ +`; diff --git a/tests/format/typescript/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/assignment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index be749c189365..000000000000 --- a/tests/format/typescript/assignment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,542 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-2322.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const listAuthorizedSitesForDefaultHandler: ListAuthorizedSitesForHandler = aListAuthorizedSitesForResponse; - -=====================================output===================================== -export const listAuthorizedSitesForDefaultHandler: ListAuthorizedSitesForHandler = - aListAuthorizedSitesForResponse; - -================================================================================ -`; - -exports[`issue-2482.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export function countriesReceived(countries: Array<Country>): CountryActionType { - return { - type: ActionTypes.COUNTRIES_RECEIVED, - countries: countries, - }; -} - -=====================================output===================================== -export function countriesReceived( - countries: Array<Country> -): CountryActionType { - return { - type: ActionTypes.COUNTRIES_RECEIVED, - countries: countries, - }; -} - -================================================================================ -`; - -exports[`issue-2485.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class x { - private readonly rawConfigFromFile$: BehaviorSubject< - any - > = new BehaviorSubject(notRead); -} - -=====================================output===================================== -class x { - private readonly rawConfigFromFile$: BehaviorSubject<any> = - new BehaviorSubject(notRead); -} - -================================================================================ -`; - -exports[`issue-3122.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const findByDate: Resolver<void, Recipe[], { date: Date }> = - (_, { date }, { req } ) => { - const repo = req.getRepository(Recipe); - return repo.find({ createDate: date }); - } - -export const findByDate: Resolver<void, Recipe[], { date: Date }> = - (_, { date }, { req } ) => Recipe.find({ createDate: date }); - -=====================================output===================================== -export const findByDate: Resolver<void, Recipe[], { date: Date }> = ( - _, - { date }, - { req } -) => { - const repo = req.getRepository(Recipe); - return repo.find({ createDate: date }); -}; - -export const findByDate: Resolver<void, Recipe[], { date: Date }> = ( - _, - { date }, - { req } -) => Recipe.find({ createDate: date }); - -================================================================================ -`; - -exports[`issue-5370.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const durabilityMetricsSelectable: Immutable.OrderedSet< - SomeReportingMetric, -> = myExperienceSelectable.concat(otherDurabilityMetricsSelectable); - -=====================================output===================================== -const durabilityMetricsSelectable: Immutable.OrderedSet<SomeReportingMetric> = - myExperienceSelectable.concat(otherDurabilityMetricsSelectable); - -================================================================================ -`; - -exports[`issue-6783.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const enviromentProdValues: EnvironmentValues = assign<EnvironmentValues>( - { - apiURL: '/api', - }, - enviromentBaseValues -); - -=====================================output===================================== -export const enviromentProdValues: EnvironmentValues = - assign<EnvironmentValues>( - { - apiURL: "/api", - }, - enviromentBaseValues - ); - -================================================================================ -`; - -exports[`issue-8619.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -{ - { - { - const myLongVariableName: MyLongTypeName | null = myLongFunctionCallHere(); - } - } -} - -=====================================output===================================== -{ - { - { - const myLongVariableName: MyLongTypeName | null = - myLongFunctionCallHere(); - } - } -} - -================================================================================ -`; - -exports[`issue-9172.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const firestorePersonallyIdentifiablePaths: Array<Collections.Users.Entity> = somefunc(); - -=====================================output===================================== -const firestorePersonallyIdentifiablePaths: Array<Collections.Users.Entity> = - somefunc(); - -================================================================================ -`; - -exports[`issue-10846.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = call<{ - prop1: string; - prop2: string; - prop3: string; -}>(); - -export const CallRecorderContext = - createContext<{ - deleteRecording: (id: string) => void; - deleteAll: () => void; - } | null>(null); - -export const CallRecorderContext = - createContext<{ - deleteRecording: (id: string) => void; - deleteAll: () => void; - } | null>(null, "useless"); - -const foo = - call<Foooooo, Foooooo, Foooooo, Foooooo, Foooooo, Foooooo, Foooooo>(); - -const foo = - call< - | Foooooooooooo - | Foooooooooooo - | Foooooooooooo - | Foooooooooooo - | Foooooooooooo - >(); - -const foo = - call< - Foooooooooooo & - Foooooooooooo & - Foooooooooooo & - Foooooooooooo & - Foooooooooooo - >(); - -=====================================output===================================== -const foo = call<{ - prop1: string; - prop2: string; - prop3: string; -}>(); - -export const CallRecorderContext = createContext<{ - deleteRecording: (id: string) => void; - deleteAll: () => void; -} | null>(null); - -export const CallRecorderContext = createContext<{ - deleteRecording: (id: string) => void; - deleteAll: () => void; -} | null>(null, "useless"); - -const foo = call< - Foooooo, - Foooooo, - Foooooo, - Foooooo, - Foooooo, - Foooooo, - Foooooo ->(); - -const foo = call< - Foooooooooooo | Foooooooooooo | Foooooooooooo | Foooooooooooo | Foooooooooooo ->(); - -const foo = call< - Foooooooooooo & Foooooooooooo & Foooooooooooo & Foooooooooooo & Foooooooooooo ->(); - -================================================================================ -`; - -exports[`issue-10848.tsx format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const MyComponent: React.VoidFunctionComponent<MyComponentProps> = ({ x }) => { - const a = useA() - return <div>x = {x}; a = {a}</div> -} - -const MyComponent2: React.VoidFunctionComponent<MyComponent2Props> = ({ x, y }) => { - const a = useA() - return <div>x = {x}; y = {y}; a = {a}</div> -} - -const MyComponentWithLongName1: React.VoidFunctionComponent<MyComponentWithLongNameProps> = ({ x, y }) => { - const a = useA() - return <div>x = {x}; y = {y}; a = {a}</div> -} - -const MyComponentWithLongName2: React.VoidFunctionComponent<MyComponentWithLongNameProps> = ({ x, y, anotherPropWithLongName1, anotherPropWithLongName2, anotherPropWithLongName3, anotherPropWithLongName4 }) => { - const a = useA() - return <div>x = {x}; y = {y}; a = {a}</div> -} - -const MyGenericComponent: React.VoidFunctionComponent<MyGenericComponentProps<number>> = ({ x, y }) => { - const a = useA() - return <div>x = {x}; y = {y}; a = {a}</div> -} - -export const ExportToExcalidrawPlus: React.FC<{ - elements: readonly NonDeletedExcalidrawElement[]; - appState: AppState; - onError: (error: Error) => void; -}> = ({ elements, appState, onError }) => { - return null; -} - -const Query: FunctionComponent<QueryProps> = ({ - children, - type, - resource, - payload, - // Provides an undefined onSuccess just so the key \`onSuccess\` is defined - // This is used to detect options in useDataProvider - options = { onSuccess: undefined }, -}) => - children( - useQuery( - { type, resource, payload }, - { ...options, withDeclarativeSideEffectsSupport: true } - ) - ); - -=====================================output===================================== -const MyComponent: React.VoidFunctionComponent<MyComponentProps> = ({ x }) => { - const a = useA(); - return ( - <div> - x = {x}; a = {a} - </div> - ); -}; - -const MyComponent2: React.VoidFunctionComponent<MyComponent2Props> = ({ - x, - y, -}) => { - const a = useA(); - return ( - <div> - x = {x}; y = {y}; a = {a} - </div> - ); -}; - -const MyComponentWithLongName1: React.VoidFunctionComponent< - MyComponentWithLongNameProps -> = ({ x, y }) => { - const a = useA(); - return ( - <div> - x = {x}; y = {y}; a = {a} - </div> - ); -}; - -const MyComponentWithLongName2: React.VoidFunctionComponent< - MyComponentWithLongNameProps -> = ({ - x, - y, - anotherPropWithLongName1, - anotherPropWithLongName2, - anotherPropWithLongName3, - anotherPropWithLongName4, -}) => { - const a = useA(); - return ( - <div> - x = {x}; y = {y}; a = {a} - </div> - ); -}; - -const MyGenericComponent: React.VoidFunctionComponent< - MyGenericComponentProps<number> -> = ({ x, y }) => { - const a = useA(); - return ( - <div> - x = {x}; y = {y}; a = {a} - </div> - ); -}; - -export const ExportToExcalidrawPlus: React.FC<{ - elements: readonly NonDeletedExcalidrawElement[]; - appState: AppState; - onError: (error: Error) => void; -}> = ({ elements, appState, onError }) => { - return null; -}; - -const Query: FunctionComponent<QueryProps> = ({ - children, - type, - resource, - payload, - // Provides an undefined onSuccess just so the key \`onSuccess\` is defined - // This is used to detect options in useDataProvider - options = { onSuccess: undefined }, -}) => - children( - useQuery( - { type, resource, payload }, - { ...options, withDeclarativeSideEffectsSupport: true } - ) - ); - -================================================================================ -`; - -exports[`issue-10850.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const map: Map<Function, Map<string | void, { value: UnloadedDescriptor }>> = - new Map(); - -const map: Map<Function, Condition extends Foo ? FooFooFoo : BarBarBar> = - new Map(); - -const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> = - new Map(); - -const map: Map<Function, Foo<S>> = new Map(); - -=====================================output===================================== -const map: Map< - Function, - Map<string | void, { value: UnloadedDescriptor }> -> = new Map(); - -const map: Map< - Function, - Condition extends Foo ? FooFooFoo : BarBarBar -> = new Map(); - -const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> = - new Map(); - -const map: Map<Function, Foo<S>> = new Map(); - -================================================================================ -`; - -exports[`issue-12413.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let emit = - defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>(); - -let abc = - func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>(); - -=====================================output===================================== -let emit = defineEmits<{ - (event: "ready", canvas: HTMLCanvasElement): void; - (event: "resize", canvas: HTMLCanvasElement): void; -}>(); - -let abc = func<{ - a: 2; - b: 3; - d: 78; - e: 9; - f: 8; - g: 7; - h: 6; - i: 5; - j: 4; - k: 3; - l: 2; - m: 1; - n: 0; - o: 9; - p: 8; - q: 7; - r: 6; - s: 5; - t: 4; - u: 3; - v: 2; - w: 1; - x: 0; - y: 9; - z: 8; -}>(); - -================================================================================ -`; - -exports[`lone-arg.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -if (true) { - if (condition) { - const secondType = sourceCode.getNodeByRangeIndex1234(second.range[0])! - .type; - } -} - -=====================================output===================================== -if (true) { - if (condition) { - const secondType = sourceCode.getNodeByRangeIndex1234( - second.range[0] - )!.type; - } -} - -================================================================================ -`; - -exports[`parenthesized.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/12933/files -(<number>x) = null; -(x!) = null; -(a as any) = null; -(a as number) = 42; -((a as any) as string) = null; - -=====================================output===================================== -// https://github.com/babel/babel/pull/12933/files -(<number>x) = null; -x! = null; -(a as any) = null; -(a as number) = 42; -(a as any as string) = null; - -================================================================================ -`; diff --git a/tests/format/typescript/assignment/format.test.js b/tests/format/typescript/assignment/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/assignment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/assignment/jsfmt.spec.js b/tests/format/typescript/assignment/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/assignment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/bigint/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/bigint/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/bigint/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/bigint/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/bigint/format.test.js b/tests/format/typescript/bigint/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/bigint/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/bigint/jsfmt.spec.js b/tests/format/typescript/bigint/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/bigint/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/break-calls/__snapshots__/format.test.js.snap b/tests/format/typescript/break-calls/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3a6ffefa86e2 --- /dev/null +++ b/tests/format/typescript/break-calls/__snapshots__/format.test.js.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`type_args.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const response = something.$http.get<ThingamabobService.DetailsData>( + \`api/foo.ashx/foo-details/\${myId}\`, + { cache: quux.httpCache, timeout } +); + +=====================================output===================================== +const response = something.$http.get<ThingamabobService.DetailsData>( + \`api/foo.ashx/foo-details/\${myId}\`, + { cache: quux.httpCache, timeout }, +); + +================================================================================ +`; diff --git a/tests/format/typescript/break-calls/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/break-calls/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7be5cc496181..000000000000 --- a/tests/format/typescript/break-calls/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`type_args.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const response = something.$http.get<ThingamabobService.DetailsData>( - \`api/foo.ashx/foo-details/\${myId}\`, - { cache: quux.httpCache, timeout } -); - -=====================================output===================================== -const response = something.$http.get<ThingamabobService.DetailsData>( - \`api/foo.ashx/foo-details/\${myId}\`, - { cache: quux.httpCache, timeout } -); - -================================================================================ -`; diff --git a/tests/format/typescript/break-calls/format.test.js b/tests/format/typescript/break-calls/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/break-calls/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/break-calls/jsfmt.spec.js b/tests/format/typescript/break-calls/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/break-calls/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/call-signature/__snapshots__/format.test.js.snap b/tests/format/typescript/call-signature/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4dacb6c0f423 --- /dev/null +++ b/tests/format/typescript/call-signature/__snapshots__/format.test.js.snap @@ -0,0 +1,131 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call-signature.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type T = { + (): void; + second: string; +}; + +type T = { + (): void; // prettier-ignore + second: string; +}; + +type T = { + (): void; // comment + second: string; +}; + +type T = { + first: string; + (): void; +}; + +type T = { + first: string; + (): void; // prettier-ignore +}; + +type T = { + first: string; + (): void; // comment +}; + +interface I { + (): void; + second: string; +} + +interface I { + (): void; // prettier-ignore + second: string; +} + +interface I { + (): void; // comment + second: string; +} + +interface I { + first: string; + (): void; +} + +interface I { + first: string; + (): void; // prettier-ignore +} + +interface I { + first: string; + (): void; // comment +} + +=====================================output===================================== +type T = { + (): void; + second: string; +}; + +type T = { + (): void; // prettier-ignore + second: string; +}; + +type T = { + (): void; // comment + second: string; +}; + +type T = { + first: string; + (): void; +}; + +type T = { + first: string; + (): void; // prettier-ignore +}; + +type T = { + first: string; + (): void; // comment +}; + +interface I { + (): void; + second: string; +} + +interface I { + (): void; // prettier-ignore + second: string; +} + +interface I { + (): void; // comment + second: string; +} + +interface I { + first: string; + (): void; +} + +interface I { + first: string; + (): void; // prettier-ignore +} + +interface I { + first: string; + (): void; // comment +} + +================================================================================ +`; diff --git a/tests/format/typescript/call-signature/call-signature.ts b/tests/format/typescript/call-signature/call-signature.ts new file mode 100644 index 000000000000..26a328f2fcb4 --- /dev/null +++ b/tests/format/typescript/call-signature/call-signature.ts @@ -0,0 +1,59 @@ +type T = { + (): void; + second: string; +}; + +type T = { + (): void; // prettier-ignore + second: string; +}; + +type T = { + (): void; // comment + second: string; +}; + +type T = { + first: string; + (): void; +}; + +type T = { + first: string; + (): void; // prettier-ignore +}; + +type T = { + first: string; + (): void; // comment +}; + +interface I { + (): void; + second: string; +} + +interface I { + (): void; // prettier-ignore + second: string; +} + +interface I { + (): void; // comment + second: string; +} + +interface I { + first: string; + (): void; +} + +interface I { + first: string; + (): void; // prettier-ignore +} + +interface I { + first: string; + (): void; // comment +} diff --git a/tests/format/typescript/call-signature/format.test.js b/tests/format/typescript/call-signature/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/call-signature/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/cast/__snapshots__/format.test.js.snap b/tests/format/typescript/cast/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..29bdf2ec3a38 --- /dev/null +++ b/tests/format/typescript/cast/__snapshots__/format.test.js.snap @@ -0,0 +1,397 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-and-object.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +breakAfterCast = <PermissionsChecker<any> | undefined>(<any>permissions)[receiverType]; + +testObjLiteral = <PermissionsChecker<any> | undefined>{ prop1: "myPropVal" }; + +=====================================output===================================== +breakAfterCast = <PermissionsChecker<any> | undefined>( + (<any>permissions)[receiverType] +); + +testObjLiteral = <PermissionsChecker<any> | undefined>{ prop1: "myPropVal" }; + +================================================================================ +`; + +exports[`as-const.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let x = '123' as const; + +// https://github.com/babel/babel/pull/11912 +x as boolean <= y; // (x as boolean) <= y; +x as boolean ?? y; // (x as boolean) ?? y; + +=====================================output===================================== +let x = "123" as const; + +// https://github.com/babel/babel/pull/11912 +(x as boolean) <= y; // (x as boolean) <= y; +(x as boolean) ?? y; // (x as boolean) ?? y; + +================================================================================ +`; + +exports[`assert-and-assign.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a as number) = 42; +({ a: (b as any) = 2000 } = x); +=====================================output===================================== +(a as number) = 42; +({ a: (b as any) = 2000 } = x); + +================================================================================ +`; + +exports[`generic-cast.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/issues/4171 +function y() { + + const fits = <Immutable.Map<string, any>>fits(); + const fitsObjLiteral = <Immutable.Map<string, any>>{ a: "test" }; + const fitsArrayLiteral = <Immutable.Map<string, any>>["test", "test2"] + + const breakAfterCast = <Immutable.Map<string, any>>someExistingConfigMap.mergeDeep(fallbackOpts); + + const stillTooLong = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never>>someExistingConfigMap.mergeDeep(fallbackOptions); + + const stillTooLong2 = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never> | undefined>someExistingConfigMap.mergeDeep(fallbackOptions); + + const stillTooLong3 = <Immutable.Map<string>>someExistingConfigMap.mergeDeep(fallbackOptions.someMethodWithLongName(param1, param2)); + + const stillTooLong4 = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never> | undefined>someExistingConfigMap.mergeDeep(fallbackOptions.someMethodWithLongName(param1, param2)); + + const testObjLiteral = <Immutable.Map<string, any>>{ property1: "myPropertyVal" }; + + const testObjLiteral2 = <Immutable.Map<string, any, number, boolean, object, null, undefined, never, "extra long">>{ property1: "myPropertyVal" }; + + const testArrayLiteral = <Immutable.Map<string, any>>["first", "second", "third"]; + + const testArrayLiteral2 = <Immutable.Map<string, any, number, boolean, object, null, undefined, never, "extra long">>["first", "second", "third"]; + + const insideFuncCall = myFunc(param1, <Immutable.Map<string, any>>param2, param3) +} + +// https://github.com/prettier/prettier/issues/4168 +function x() { + const fits = <PermissionsChecker<any> | undefined>(<any>permissions)[type]; + const fitsObjLiteral = <PermissionsChecker<any> | undefined>{ a: "test" }; + const fitsArrayLiteral = <PermissionsChecker<any> | undefined>["t1", "t2"]; + + const breakAfterCast = <PermissionsChecker<any> | undefined>(<any>permissions)[receiverType]; + + const stillTooLong = <PermissionsChecker<object> | undefined | number | string | boolean>(<any>permissions)[receiverType]; + + const stillTooLong2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never>(<any>permissions)[receiverType]; + + const stillTooLong3 = <PermissionsChecker<object> | undefined>(<any>permissions.someMethodWithLongName(parameter1, parameter2))[receiverTypeLongName]; + + const stillTooLong4 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never>(<any>permissions.someMethodWithLongName(parameter1, parameter2))[receiverTypeLongName]; + + const testObjLiteral = <PermissionsChecker<any> | undefined>{ prop1: "myPropVal" }; + + const testObjLiteral2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never | object>{ prop1: "myPropVal" }; + + const testArrayLiteral = <PermissionsChecker<any> | undefined>["first", "second", "third"]; + + const testArrayLiteral2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never | object>["first", "second", "third"]; + + const insideFuncCall = myFunc(param1, <PermissionsChecker<any> | undefined>param2, param3) +} + +=====================================output===================================== +// https://github.com/prettier/prettier/issues/4171 +function y() { + const fits = <Immutable.Map<string, any>>fits(); + const fitsObjLiteral = <Immutable.Map<string, any>>{ a: "test" }; + const fitsArrayLiteral = <Immutable.Map<string, any>>["test", "test2"]; + + const breakAfterCast = <Immutable.Map<string, any>>( + someExistingConfigMap.mergeDeep(fallbackOpts) + ); + + const stillTooLong = < + Immutable.Map< + string, + boolean, + number, + object, + null, + undefined, + any, + void, + never + > + >someExistingConfigMap.mergeDeep(fallbackOptions); + + const stillTooLong2 = < + | Immutable.Map< + string, + boolean, + number, + object, + null, + undefined, + any, + void, + never + > + | undefined + >someExistingConfigMap.mergeDeep(fallbackOptions); + + const stillTooLong3 = <Immutable.Map<string>>( + someExistingConfigMap.mergeDeep( + fallbackOptions.someMethodWithLongName(param1, param2), + ) + ); + + const stillTooLong4 = < + | Immutable.Map< + string, + boolean, + number, + object, + null, + undefined, + any, + void, + never + > + | undefined + >someExistingConfigMap.mergeDeep( + fallbackOptions.someMethodWithLongName(param1, param2), + ); + + const testObjLiteral = <Immutable.Map<string, any>>{ + property1: "myPropertyVal", + }; + + const testObjLiteral2 = < + Immutable.Map< + string, + any, + number, + boolean, + object, + null, + undefined, + never, + "extra long" + > + >{ property1: "myPropertyVal" }; + + const testArrayLiteral = <Immutable.Map<string, any>>[ + "first", + "second", + "third", + ]; + + const testArrayLiteral2 = < + Immutable.Map< + string, + any, + number, + boolean, + object, + null, + undefined, + never, + "extra long" + > + >["first", "second", "third"]; + + const insideFuncCall = myFunc( + param1, + <Immutable.Map<string, any>>param2, + param3, + ); +} + +// https://github.com/prettier/prettier/issues/4168 +function x() { + const fits = <PermissionsChecker<any> | undefined>(<any>permissions)[type]; + const fitsObjLiteral = <PermissionsChecker<any> | undefined>{ a: "test" }; + const fitsArrayLiteral = <PermissionsChecker<any> | undefined>["t1", "t2"]; + + const breakAfterCast = <PermissionsChecker<any> | undefined>( + (<any>permissions)[receiverType] + ); + + const stillTooLong = < + PermissionsChecker<object> | undefined | number | string | boolean + >(<any>permissions)[receiverType]; + + const stillTooLong2 = < + | PermissionsChecker<object> + | undefined + | number + | string + | boolean + | null + | never + >(<any>permissions)[receiverType]; + + const stillTooLong3 = <PermissionsChecker<object> | undefined>( + (<any>permissions.someMethodWithLongName(parameter1, parameter2))[ + receiverTypeLongName + ] + ); + + const stillTooLong4 = < + | PermissionsChecker<object> + | undefined + | number + | string + | boolean + | null + | never + >(<any>permissions.someMethodWithLongName(parameter1, parameter2))[ + receiverTypeLongName + ]; + + const testObjLiteral = <PermissionsChecker<any> | undefined>{ + prop1: "myPropVal", + }; + + const testObjLiteral2 = < + | PermissionsChecker<object> + | undefined + | number + | string + | boolean + | null + | never + | object + >{ prop1: "myPropVal" }; + + const testArrayLiteral = <PermissionsChecker<any> | undefined>[ + "first", + "second", + "third", + ]; + + const testArrayLiteral2 = < + | PermissionsChecker<object> + | undefined + | number + | string + | boolean + | null + | never + | object + >["first", "second", "third"]; + + const insideFuncCall = myFunc( + param1, + <PermissionsChecker<any> | undefined>param2, + param3, + ); +} + +================================================================================ +`; + +exports[`hug-args.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +postMessage( + <IActionMessage>{ + context: item.context, + topic: item.topic + } +); + +window.postMessage( + { + context: item.context, + topic: item.topic + } as IActionMessage +); + +postMessages( + <IActionMessage[]>[ + { + context: item.context, + topic: item.topic + } + ] +); + +=====================================output===================================== +postMessage(<IActionMessage>{ + context: item.context, + topic: item.topic, +}); + +window.postMessage({ + context: item.context, + topic: item.topic, +} as IActionMessage); + +postMessages(<IActionMessage[]>[ + { + context: item.context, + topic: item.topic, + }, +]); + +================================================================================ +`; + +exports[`parenthesis.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<DocumentHighlightKind>(a ? b : c); +<any>(() => {}); + +<x>a || {}; +<x>a && []; +true || <x>a; +<x>a + <x>b; +(<x>a) = 1; + +function * g() { + const a = <T>(yield b); +} + +=====================================output===================================== +<DocumentHighlightKind>(a ? b : c); +<any>(() => {}); + +<x>a || {}; +<x>a && []; +true || <x>a; +<x>a + <x>b; +(<x>a) = 1; + +function* g() { + const a = <T>(yield b); +} + +================================================================================ +`; diff --git a/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3f07ba993054..000000000000 --- a/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,369 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`as-const.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let x = '123' as const; - -// https://github.com/babel/babel/pull/11912 -x as boolean <= y; // (x as boolean) <= y; -x as boolean ?? y; // (x as boolean) ?? y; - -=====================================output===================================== -let x = "123" as const; - -// https://github.com/babel/babel/pull/11912 -(x as boolean) <= y; // (x as boolean) <= y; -(x as boolean) ?? y; // (x as boolean) ?? y; - -================================================================================ -`; - -exports[`assert-and-assign.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a as number) = 42; -({ a: (b as any) = 2000 } = x); -=====================================output===================================== -(a as number) = 42; -({ a: (b as any) = 2000 } = x); - -================================================================================ -`; - -exports[`generic-cast.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/issues/4171 -function y() { - - const fits = <Immutable.Map<string, any>>fits(); - const fitsObjLiteral = <Immutable.Map<string, any>>{ a: "test" }; - const fitsArrayLiteral = <Immutable.Map<string, any>>["test", "test2"] - - const breakAfterCast = <Immutable.Map<string, any>>someExistingConfigMap.mergeDeep(fallbackOpts); - - const stillTooLong = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never>>someExistingConfigMap.mergeDeep(fallbackOptions); - - const stillTooLong2 = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never> | undefined>someExistingConfigMap.mergeDeep(fallbackOptions); - - const stillTooLong3 = <Immutable.Map<string>>someExistingConfigMap.mergeDeep(fallbackOptions.someMethodWithLongName(param1, param2)); - - const stillTooLong4 = <Immutable.Map<string, boolean, number, object, null, undefined, any, void, never> | undefined>someExistingConfigMap.mergeDeep(fallbackOptions.someMethodWithLongName(param1, param2)); - - const testObjLiteral = <Immutable.Map<string, any>>{ property1: "myPropertyVal" }; - - const testObjLiteral2 = <Immutable.Map<string, any, number, boolean, object, null, undefined, never, "extra long">>{ property1: "myPropertyVal" }; - - const testArrayLiteral = <Immutable.Map<string, any>>["first", "second", "third"]; - - const testArrayLiteral2 = <Immutable.Map<string, any, number, boolean, object, null, undefined, never, "extra long">>["first", "second", "third"]; - - const insideFuncCall = myFunc(param1, <Immutable.Map<string, any>>param2, param3) -} - -// https://github.com/prettier/prettier/issues/4168 -function x() { - const fits = <PermissionsChecker<any> | undefined>(<any>permissions)[type]; - const fitsObjLiteral = <PermissionsChecker<any> | undefined>{ a: "test" }; - const fitsArrayLiteral = <PermissionsChecker<any> | undefined>["t1", "t2"]; - - const breakAfterCast = <PermissionsChecker<any> | undefined>(<any>permissions)[receiverType]; - - const stillTooLong = <PermissionsChecker<object> | undefined | number | string | boolean>(<any>permissions)[receiverType]; - - const stillTooLong2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never>(<any>permissions)[receiverType]; - - const stillTooLong3 = <PermissionsChecker<object> | undefined>(<any>permissions.someMethodWithLongName(parameter1, parameter2))[receiverTypeLongName]; - - const stillTooLong4 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never>(<any>permissions.someMethodWithLongName(parameter1, parameter2))[receiverTypeLongName]; - - const testObjLiteral = <PermissionsChecker<any> | undefined>{ prop1: "myPropVal" }; - - const testObjLiteral2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never | object>{ prop1: "myPropVal" }; - - const testArrayLiteral = <PermissionsChecker<any> | undefined>["first", "second", "third"]; - - const testArrayLiteral2 = <PermissionsChecker<object> | undefined | number | string | boolean | null | never | object>["first", "second", "third"]; - - const insideFuncCall = myFunc(param1, <PermissionsChecker<any> | undefined>param2, param3) -} - -=====================================output===================================== -// https://github.com/prettier/prettier/issues/4171 -function y() { - const fits = <Immutable.Map<string, any>>fits(); - const fitsObjLiteral = <Immutable.Map<string, any>>{ a: "test" }; - const fitsArrayLiteral = <Immutable.Map<string, any>>["test", "test2"]; - - const breakAfterCast = <Immutable.Map<string, any>>( - someExistingConfigMap.mergeDeep(fallbackOpts) - ); - - const stillTooLong = < - Immutable.Map< - string, - boolean, - number, - object, - null, - undefined, - any, - void, - never - > - >someExistingConfigMap.mergeDeep(fallbackOptions); - - const stillTooLong2 = < - | Immutable.Map< - string, - boolean, - number, - object, - null, - undefined, - any, - void, - never - > - | undefined - >someExistingConfigMap.mergeDeep(fallbackOptions); - - const stillTooLong3 = <Immutable.Map<string>>( - someExistingConfigMap.mergeDeep( - fallbackOptions.someMethodWithLongName(param1, param2) - ) - ); - - const stillTooLong4 = < - | Immutable.Map< - string, - boolean, - number, - object, - null, - undefined, - any, - void, - never - > - | undefined - >someExistingConfigMap.mergeDeep( - fallbackOptions.someMethodWithLongName(param1, param2) - ); - - const testObjLiteral = <Immutable.Map<string, any>>{ - property1: "myPropertyVal", - }; - - const testObjLiteral2 = < - Immutable.Map< - string, - any, - number, - boolean, - object, - null, - undefined, - never, - "extra long" - > - >{ property1: "myPropertyVal" }; - - const testArrayLiteral = <Immutable.Map<string, any>>[ - "first", - "second", - "third", - ]; - - const testArrayLiteral2 = < - Immutable.Map< - string, - any, - number, - boolean, - object, - null, - undefined, - never, - "extra long" - > - >["first", "second", "third"]; - - const insideFuncCall = myFunc( - param1, - <Immutable.Map<string, any>>param2, - param3 - ); -} - -// https://github.com/prettier/prettier/issues/4168 -function x() { - const fits = <PermissionsChecker<any> | undefined>(<any>permissions)[type]; - const fitsObjLiteral = <PermissionsChecker<any> | undefined>{ a: "test" }; - const fitsArrayLiteral = <PermissionsChecker<any> | undefined>["t1", "t2"]; - - const breakAfterCast = <PermissionsChecker<any> | undefined>( - (<any>permissions)[receiverType] - ); - - const stillTooLong = < - PermissionsChecker<object> | undefined | number | string | boolean - >(<any>permissions)[receiverType]; - - const stillTooLong2 = < - | PermissionsChecker<object> - | undefined - | number - | string - | boolean - | null - | never - >(<any>permissions)[receiverType]; - - const stillTooLong3 = <PermissionsChecker<object> | undefined>( - (<any>permissions.someMethodWithLongName(parameter1, parameter2))[ - receiverTypeLongName - ] - ); - - const stillTooLong4 = < - | PermissionsChecker<object> - | undefined - | number - | string - | boolean - | null - | never - >(<any>permissions.someMethodWithLongName(parameter1, parameter2))[ - receiverTypeLongName - ]; - - const testObjLiteral = <PermissionsChecker<any> | undefined>{ - prop1: "myPropVal", - }; - - const testObjLiteral2 = < - | PermissionsChecker<object> - | undefined - | number - | string - | boolean - | null - | never - | object - >{ prop1: "myPropVal" }; - - const testArrayLiteral = <PermissionsChecker<any> | undefined>[ - "first", - "second", - "third", - ]; - - const testArrayLiteral2 = < - | PermissionsChecker<object> - | undefined - | number - | string - | boolean - | null - | never - | object - >["first", "second", "third"]; - - const insideFuncCall = myFunc( - param1, - <PermissionsChecker<any> | undefined>param2, - param3 - ); -} - -================================================================================ -`; - -exports[`hug-args.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -postMessage( - <IActionMessage>{ - context: item.context, - topic: item.topic - } -); - -window.postMessage( - { - context: item.context, - topic: item.topic - } as IActionMessage -); - -postMessages( - <IActionMessage[]>[ - { - context: item.context, - topic: item.topic - } - ] -); - -=====================================output===================================== -postMessage(<IActionMessage>{ - context: item.context, - topic: item.topic, -}); - -window.postMessage({ - context: item.context, - topic: item.topic, -} as IActionMessage); - -postMessages(<IActionMessage[]>[ - { - context: item.context, - topic: item.topic, - }, -]); - -================================================================================ -`; - -exports[`parenthesis.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<DocumentHighlightKind>(a ? b : c); -<any>(() => {}); - -<x>a || {}; -<x>a && []; -true || <x>a; -<x>a + <x>b; -(<x>a) = 1; - -=====================================output===================================== -<DocumentHighlightKind>(a ? b : c); -<any>(() => {}); - -<x>a || {}; -<x>a && []; -true || <x>a; -<x>a + <x>b; -(<x>a) = 1; - -================================================================================ -`; diff --git a/tests/format/typescript/cast/array-and-object.ts b/tests/format/typescript/cast/array-and-object.ts new file mode 100644 index 000000000000..28d508a57d17 --- /dev/null +++ b/tests/format/typescript/cast/array-and-object.ts @@ -0,0 +1,3 @@ +breakAfterCast = <PermissionsChecker<any> | undefined>(<any>permissions)[receiverType]; + +testObjLiteral = <PermissionsChecker<any> | undefined>{ prop1: "myPropVal" }; diff --git a/tests/format/typescript/cast/format.test.js b/tests/format/typescript/cast/format.test.js new file mode 100644 index 000000000000..083abcf04619 --- /dev/null +++ b/tests/format/typescript/cast/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts", "typescript"]); diff --git a/tests/format/typescript/cast/jsfmt.spec.js b/tests/format/typescript/cast/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/cast/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/cast/parenthesis.ts b/tests/format/typescript/cast/parenthesis.ts index edada7854483..db00a98beef3 100644 --- a/tests/format/typescript/cast/parenthesis.ts +++ b/tests/format/typescript/cast/parenthesis.ts @@ -6,3 +6,7 @@ true || <x>a; <x>a + <x>b; (<x>a) = 1; + +function * g() { + const a = <T>(yield b); +} diff --git a/tests/format/typescript/catch-clause/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/catch-clause/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/catch-clause/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/catch-clause/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/catch-clause/format.test.js b/tests/format/typescript/catch-clause/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/catch-clause/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/catch-clause/jsfmt.spec.js b/tests/format/typescript/catch-clause/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/catch-clause/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/chain-expression/__snapshots__/format.test.js.snap b/tests/format/typescript/chain-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9d71d3fe5a3b --- /dev/null +++ b/tests/format/typescript/chain-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,621 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`call-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b)! (); +(a?.b!) (); +(a!?.b) (); +(a.b?.c)! (); +(a.b?.c!) (); +(a.b!?.c) (); +(a!.b?.c) (); +(a?.b.c)! (); +(a?.b.c!) (); +(a?.b!.c) (); +(a!?.b.c) (); +(a[b?.c])! (); +(a[b?.c]!) (); +(a[b?.c!]) (); +(a[b!?.c]) (); +((a?.b).c)! (); +((a?.b).c!) (); +// FIXME: ((a?.b!).c) (); +((a!?.b).c) (); +(a[b?.()])! (); +(a[b?.()]!) (); +(a[b?.()!]) (); +(a[b!?.()]) (); +(a![b?.()]) (); +((a?.b).c)! (); +((a?.b).c!) (); +// FIXME: ((a?.b)!.c) (); +// FIXME: ((a?.b!).c) (); +((a!?.b).c) (); +((a?.()).b)! (); +((a?.()).b!) (); +((a?.())!.b) (); +((a?.()!).b) (); +((a!?.()).b) (); + +// Call expressions +(a?.())! (); +(a?.()!) (); +(a!?.()) (); +(a.b.c?.())! (); +(a.b.c?.()!) (); +(a.b.c!?.()) (); +(a.b?.c())! (); +(a.b?.c()!) (); +(a.b!?.c()) (); +(a?.b.c())! (); +(a?.b.c()!) (); +(a?.b!.c()) (); +(a(b?.c))! (); +(a(b?.c)!) (); +(a(b?.c!)) (); +((a?.b)())! (); +((a?.b)()!) (); +((a?.b)!()) (); +((a?.b!)()) (); +((a?.())())! (); +((a?.())()!) (); +((a?.())!()) (); +((a?.()!)()) (); +((a!?.())()) (); + +// Not \`.callee\` +foo((a?.b)!) + +=====================================output===================================== +// Member expressions +(a?.b)!(); +(a?.b)!(); +(a!?.b)(); +(a.b?.c)!(); +(a.b?.c)!(); +(a.b!?.c)(); +(a!.b?.c)(); +(a?.b.c)!(); +(a?.b.c)!(); +(a?.b!.c)(); +(a!?.b.c)(); +a[b?.c]!(); +a[b?.c]!(); +a[b?.c!](); +a[b!?.c](); +(a?.b).c!(); +(a?.b).c!(); +// FIXME: ((a?.b!).c) (); +(a!?.b).c(); +a[b?.()]!(); +a[b?.()]!(); +a[b?.()!](); +a[b!?.()](); +a![b?.()](); +(a?.b).c!(); +(a?.b).c!(); +// FIXME: ((a?.b)!.c) (); +// FIXME: ((a?.b!).c) (); +(a!?.b).c(); +(a?.()).b!(); +(a?.()).b!(); +(a?.())!.b(); +(a?.())!.b(); +(a!?.()).b(); + +// Call expressions +(a?.())!(); +(a?.())!(); +(a!?.())(); +(a.b.c?.())!(); +(a.b.c?.())!(); +(a.b.c!?.())(); +(a.b?.c())!(); +(a.b?.c())!(); +(a.b!?.c())(); +(a?.b.c())!(); +(a?.b.c())!(); +(a?.b!.c())(); +a(b?.c)!(); +a(b?.c)!(); +a(b?.c!)(); +(a?.b)()!(); +(a?.b)()!(); +(a?.b)!()(); +(a?.b)!()(); +(a?.())()!(); +(a?.())()!(); +(a?.())!()(); +(a?.())!()(); +(a!?.())()(); + +// Not \`.callee\` +foo(a?.b!); + +================================================================================ +`; + +exports[`member-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b)! .foo; +(a?.b!) .foo; +(a!?.b) .foo; +(a.b?.c)! .foo; +(a.b?.c!) .foo; +(a.b!?.c) .foo; +(a!.b?.c) .foo; +(a?.b.c)! .foo; +(a?.b.c!) .foo; +(a?.b!.c) .foo; +(a!?.b.c) .foo; +(a[b?.c])! .foo; +(a[b?.c]!) .foo; +(a[b?.c!]) .foo; +(a[b!?.c]) .foo; +((a?.b).c)! .foo; +((a?.b).c!) .foo; +((a?.b!).c) .foo; +((a!?.b).c) .foo; +(a[b?.()])! .foo; +(a[b?.()]!) .foo; +(a[b?.()!]) .foo; +(a[b!?.()]) .foo; +(a![b?.()]) .foo; +((a?.b).c)! .foo; +((a?.b).c!) .foo; +((a?.b)!.c) .foo; +((a?.b!).c) .foo; +((a!?.b).c) .foo; +((a?.()).b)! .foo; +((a?.()).b!) .foo; +((a?.())!.b) .foo; +((a?.()!).b) .foo; +((a!?.()).b) .foo; + +// Call expressions +(a?.())! .foo; +(a?.()!) .foo; +(a!?.()) .foo; +(a.b.c?.())! .foo; +(a.b.c?.()!) .foo; +(a.b.c!?.()) .foo; +(a.b?.c())! .foo; +(a.b?.c()!) .foo; +(a.b!?.c()) .foo; +(a?.b.c())! .foo; +(a?.b.c()!) .foo; +(a?.b!.c()) .foo; +(a(b?.c))! .foo; +(a(b?.c)!) .foo; +(a(b?.c!)) .foo; +((a?.b)())! .foo; +((a?.b)()!) .foo; +((a?.b)!()) .foo; +((a?.b!)()) .foo; +((a?.())())! .foo; +((a?.())()!) .foo; +((a?.())!()) .foo; +((a?.()!)()) .foo; +((a!?.())()) .foo; + + +// Not \`.object\` +_[a?.b!] + +// Computed +(a?.b!) [foo] + +=====================================output===================================== +// Member expressions +(a?.b)!.foo; +(a?.b)!.foo; +(a!?.b).foo; +(a.b?.c)!.foo; +(a.b?.c)!.foo; +(a.b!?.c).foo; +(a!.b?.c).foo; +(a?.b.c)!.foo; +(a?.b.c)!.foo; +(a?.b!.c).foo; +(a!?.b.c).foo; +a[b?.c]!.foo; +a[b?.c]!.foo; +a[b?.c!].foo; +a[b!?.c].foo; +(a?.b).c!.foo; +(a?.b).c!.foo; +(a?.b)!.c.foo; +(a!?.b).c.foo; +a[b?.()]!.foo; +a[b?.()]!.foo; +a[b?.()!].foo; +a[b!?.()].foo; +a![b?.()].foo; +(a?.b).c!.foo; +(a?.b).c!.foo; +(a?.b)!.c.foo; +(a?.b)!.c.foo; +(a!?.b).c.foo; +(a?.()).b!.foo; +(a?.()).b!.foo; +(a?.())!.b.foo; +(a?.())!.b.foo; +(a!?.()).b.foo; + +// Call expressions +(a?.())!.foo; +(a?.())!.foo; +(a!?.()).foo; +(a.b.c?.())!.foo; +(a.b.c?.())!.foo; +(a.b.c!?.()).foo; +(a.b?.c())!.foo; +(a.b?.c())!.foo; +(a.b!?.c()).foo; +(a?.b.c())!.foo; +(a?.b.c())!.foo; +(a?.b!.c()).foo; +a(b?.c)!.foo; +a(b?.c)!.foo; +a(b?.c!).foo; +(a?.b)()!.foo; +(a?.b)()!.foo; +(a?.b)!().foo; +(a?.b)!().foo; +(a?.())()!.foo; +(a?.())()!.foo; +(a?.())!().foo; +(a?.())!().foo; +(a!?.())().foo; + +// Not \`.object\` +_[a?.b!]( + // Computed + a?.b!, +)[foo]; + +================================================================================ +`; + +exports[`new-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +// FIXME: new (a?.b)! (); +// FIXME: new (a?.b!) (); +new (a!?.b) (); +// FIXME: new (a.b?.c)! (); +// FIXME: new (a.b?.c!) (); +new (a.b!?.c) (); +new (a!.b?.c) (); +// FIXME: new (a?.b.c)! (); +// FIXME: new (a?.b.c!) (); +new (a?.b!.c) (); +new (a!?.b.c) (); +new (a[b?.c])! (); +new (a[b?.c]!) (); +new (a[b?.c!]) (); +new (a[b!?.c]) (); +new ((a?.b).c)! (); +new ((a?.b).c!) (); +new ((a?.b!).c) (); +new ((a!?.b).c) (); +new (a[b?.()])! (); +new (a[b?.()]!) (); +new (a[b?.()!]) (); +new (a[b!?.()]) (); +new (a![b?.()]) (); +new ((a?.b).c)! (); +new ((a?.b).c!) (); +new ((a?.b)!.c) (); +new ((a?.b!).c) (); +new ((a!?.b).c) (); +// FIXME: new ((a?.()).b)! (); +// FIXME: new ((a?.()).b!) (); +// FIXME: new ((a?.())!.b) (); +// FIXME: new ((a?.()!).b) (); +// FIXME: new ((a!?.()).b) (); + +// Call expressions +// FIXME: new (a?.())! (); +// FIXME: new (a?.()!) (); +new (a!?.()) (); +// FIXME: new (a.b.c?.())! (); +// FIXME: new (a.b.c?.()!) (); +new (a.b.c!?.()) (); +// FIXME: new (a.b?.c())! (); +// FIXME: new (a.b?.c()!) (); +new (a.b!?.c()) (); +// FIXME: new (a?.b.c())! (); +// FIXME: new (a?.b.c()!) (); +new (a?.b!.c()) (); +new (a(b?.c))! (); +new (a(b?.c)!) (); +new (a(b?.c!)) (); +new ((a?.b)())! (); +new ((a?.b)()!) (); +new ((a?.b)!()) (); +new ((a?.b!)()) (); +new ((a?.())())! (); +new ((a?.())()!) (); +new ((a?.())!()) (); +new ((a?.()!)()) (); +new ((a!?.())()) (); + +// Not \`.callee\` +new Foo(a?.b!) + +=====================================output===================================== +// Member expressions +// FIXME: new (a?.b)! (); +// FIXME: new (a?.b!) (); +new (a!?.b)(); +// FIXME: new (a.b?.c)! (); +// FIXME: new (a.b?.c!) (); +new (a.b!?.c)(); +new (a!.b?.c)(); +// FIXME: new (a?.b.c)! (); +// FIXME: new (a?.b.c!) (); +new (a?.b!.c)(); +new (a!?.b.c)(); +new a[b?.c]!(); +new a[b?.c]!(); +new a[b?.c!](); +new a[b!?.c](); +new (a?.b).c!(); +new (a?.b).c!(); +new (a?.b)!.c(); +new (a!?.b).c(); +new a[b?.()]!(); +new a[b?.()]!(); +new a[b?.()!](); +new a[b!?.()](); +new a![b?.()](); +new (a?.b).c!(); +new (a?.b).c!(); +new (a?.b)!.c(); +new (a?.b)!.c(); +new (a!?.b).c(); +// FIXME: new ((a?.()).b)! (); +// FIXME: new ((a?.()).b!) (); +// FIXME: new ((a?.())!.b) (); +// FIXME: new ((a?.()!).b) (); +// FIXME: new ((a!?.()).b) (); + +// Call expressions +// FIXME: new (a?.())! (); +// FIXME: new (a?.()!) (); +new (a!?.())(); +// FIXME: new (a.b.c?.())! (); +// FIXME: new (a.b.c?.()!) (); +new (a.b.c!?.())(); +// FIXME: new (a.b?.c())! (); +// FIXME: new (a.b?.c()!) (); +new (a.b!?.c())(); +// FIXME: new (a?.b.c())! (); +// FIXME: new (a?.b.c()!) (); +new (a?.b!.c())(); +new (a(b?.c)!)(); +new (a(b?.c)!)(); +new (a(b?.c!))(); +new ((a?.b)()!)(); +new ((a?.b)()!)(); +new ((a?.b)!())(); +new ((a?.b)!())(); +new ((a?.())()!)(); +new ((a?.())()!)(); +new ((a?.())!())(); +new ((a?.())!())(); +new ((a!?.())())(); + +// Not \`.callee\` +new Foo(a?.b!); + +================================================================================ +`; + +exports[`tagged-template-literals.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Member expressions +(a?.b)! \`\`; +(a?.b!) \`\`; +(a!?.b) \`\`; +(a.b?.c)! \`\`; +(a.b?.c!) \`\`; +(a.b!?.c) \`\`; +(a!.b?.c) \`\`; +(a?.b.c)! \`\`; +(a?.b.c!) \`\`; +(a?.b!.c) \`\`; +(a!?.b.c) \`\`; +(a[b?.c])! \`\`; +(a[b?.c]!) \`\`; +(a[b?.c!]) \`\`; +(a[b!?.c]) \`\`; +((a?.b).c)! \`\`; +((a?.b).c!) \`\`; +((a?.b!).c) \`\`; +((a!?.b).c) \`\`; +(a[b?.()])! \`\`; +(a[b?.()]!) \`\`; +(a[b?.()!]) \`\`; +(a[b!?.()]) \`\`; +(a![b?.()]) \`\`; +((a?.b).c)! \`\`; +((a?.b).c!) \`\`; +((a?.b)!.c) \`\`; +((a?.b!).c) \`\`; +((a!?.b).c) \`\`; +((a?.()).b)! \`\`; +((a?.()).b!) \`\`; +((a?.())!.b) \`\`; +((a?.()!).b) \`\`; +((a!?.()).b) \`\`; + +// Call expressions +(a?.())! \`\`; +(a?.()!) \`\`; +(a!?.()) \`\`; +(a.b.c?.())! \`\`; +(a.b.c?.()!) \`\`; +(a.b.c!?.()) \`\`; +(a.b?.c())! \`\`; +(a.b?.c()!) \`\`; +(a.b!?.c()) \`\`; +(a?.b.c())! \`\`; +(a?.b.c()!) \`\`; +(a?.b!.c()) \`\`; +(a(b?.c))! \`\`; +(a(b?.c)!) \`\`; +(a(b?.c!)) \`\`; +((a?.b)())! \`\`; +((a?.b)()!) \`\`; +((a?.b)!()) \`\`; +((a?.b!)()) \`\`; +((a?.())())! \`\`; +((a?.())()!) \`\`; +((a?.())!()) \`\`; +((a?.()!)()) \`\`; +((a!?.())()) \`\`; + +=====================================output===================================== +// Member expressions +(a?.b)!\`\`; +(a?.b)!\`\`; +(a!?.b)\`\`; +(a.b?.c)!\`\`; +(a.b?.c)!\`\`; +(a.b!?.c)\`\`; +(a!.b?.c)\`\`; +(a?.b.c)!\`\`; +(a?.b.c)!\`\`; +(a?.b!.c)\`\`; +(a!?.b.c)\`\`; +a[b?.c]!\`\`; +a[b?.c]!\`\`; +a[b?.c!]\`\`; +a[b!?.c]\`\`; +(a?.b).c!\`\`; +(a?.b).c!\`\`; +(a?.b)!.c\`\`; +(a!?.b).c\`\`; +a[b?.()]!\`\`; +a[b?.()]!\`\`; +a[b?.()!]\`\`; +a[b!?.()]\`\`; +a![b?.()]\`\`; +(a?.b).c!\`\`; +(a?.b).c!\`\`; +(a?.b)!.c\`\`; +(a?.b)!.c\`\`; +(a!?.b).c\`\`; +(a?.()).b!\`\`; +(a?.()).b!\`\`; +(a?.())!.b\`\`; +(a?.())!.b\`\`; +(a!?.()).b\`\`; + +// Call expressions +(a?.())!\`\`; +(a?.())!\`\`; +(a!?.())\`\`; +(a.b.c?.())!\`\`; +(a.b.c?.())!\`\`; +(a.b.c!?.())\`\`; +(a.b?.c())!\`\`; +(a.b?.c())!\`\`; +(a.b!?.c())\`\`; +(a?.b.c())!\`\`; +(a?.b.c())!\`\`; +(a?.b!.c())\`\`; +a(b?.c)!\`\`; +a(b?.c)!\`\`; +a(b?.c!)\`\`; +(a?.b)()!\`\`; +(a?.b)()!\`\`; +(a?.b)!()\`\`; +(a?.b)!()\`\`; +(a?.())()!\`\`; +(a?.())()!\`\`; +(a?.())!()\`\`; +(a?.())!()\`\`; +(a!?.())()\`\`; + +================================================================================ +`; + +exports[`test.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a?.b!).c; +(a?.()!).b; +(a?.b)!.c; +(a?.())!.b; + +=====================================output===================================== +(a?.b)!.c; +(a?.())!.b; +(a?.b)!.c; +(a?.())!.b; + +================================================================================ +`; + +exports[`test2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{{ + const rotation1 = getTransformHandles(arrow, h.state.zoom, 'mouse') + .rotation!; + const rotation2 = getTransformHandles(arrow, h.state.zoom, 'mouse') + .rotation; + const rotation3 = getTransformHandles(arrow, h.state.zoom, 'mouse') + ?.rotation; +}} + +=====================================output===================================== +{ + { + const rotation1 = getTransformHandles( + arrow, + h.state.zoom, + "mouse", + ).rotation!; + const rotation2 = getTransformHandles( + arrow, + h.state.zoom, + "mouse", + ).rotation; + const rotation3 = getTransformHandles( + arrow, + h.state.zoom, + "mouse", + )?.rotation; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/chain-expression/call-expression.ts b/tests/format/typescript/chain-expression/call-expression.ts new file mode 100644 index 000000000000..19011bc0759e --- /dev/null +++ b/tests/format/typescript/chain-expression/call-expression.ts @@ -0,0 +1,64 @@ +// Member expressions +(a?.b)! (); +(a?.b!) (); +(a!?.b) (); +(a.b?.c)! (); +(a.b?.c!) (); +(a.b!?.c) (); +(a!.b?.c) (); +(a?.b.c)! (); +(a?.b.c!) (); +(a?.b!.c) (); +(a!?.b.c) (); +(a[b?.c])! (); +(a[b?.c]!) (); +(a[b?.c!]) (); +(a[b!?.c]) (); +((a?.b).c)! (); +((a?.b).c!) (); +// FIXME: ((a?.b!).c) (); +((a!?.b).c) (); +(a[b?.()])! (); +(a[b?.()]!) (); +(a[b?.()!]) (); +(a[b!?.()]) (); +(a![b?.()]) (); +((a?.b).c)! (); +((a?.b).c!) (); +// FIXME: ((a?.b)!.c) (); +// FIXME: ((a?.b!).c) (); +((a!?.b).c) (); +((a?.()).b)! (); +((a?.()).b!) (); +((a?.())!.b) (); +((a?.()!).b) (); +((a!?.()).b) (); + +// Call expressions +(a?.())! (); +(a?.()!) (); +(a!?.()) (); +(a.b.c?.())! (); +(a.b.c?.()!) (); +(a.b.c!?.()) (); +(a.b?.c())! (); +(a.b?.c()!) (); +(a.b!?.c()) (); +(a?.b.c())! (); +(a?.b.c()!) (); +(a?.b!.c()) (); +(a(b?.c))! (); +(a(b?.c)!) (); +(a(b?.c!)) (); +((a?.b)())! (); +((a?.b)()!) (); +((a?.b)!()) (); +((a?.b!)()) (); +((a?.())())! (); +((a?.())()!) (); +((a?.())!()) (); +((a?.()!)()) (); +((a!?.())()) (); + +// Not `.callee` +foo((a?.b)!) diff --git a/tests/format/typescript/chain-expression/format.test.js b/tests/format/typescript/chain-expression/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/chain-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/chain-expression/member-expression.ts b/tests/format/typescript/chain-expression/member-expression.ts new file mode 100644 index 000000000000..a91d3d52bcab --- /dev/null +++ b/tests/format/typescript/chain-expression/member-expression.ts @@ -0,0 +1,68 @@ +// Member expressions +(a?.b)! .foo; +(a?.b!) .foo; +(a!?.b) .foo; +(a.b?.c)! .foo; +(a.b?.c!) .foo; +(a.b!?.c) .foo; +(a!.b?.c) .foo; +(a?.b.c)! .foo; +(a?.b.c!) .foo; +(a?.b!.c) .foo; +(a!?.b.c) .foo; +(a[b?.c])! .foo; +(a[b?.c]!) .foo; +(a[b?.c!]) .foo; +(a[b!?.c]) .foo; +((a?.b).c)! .foo; +((a?.b).c!) .foo; +((a?.b!).c) .foo; +((a!?.b).c) .foo; +(a[b?.()])! .foo; +(a[b?.()]!) .foo; +(a[b?.()!]) .foo; +(a[b!?.()]) .foo; +(a![b?.()]) .foo; +((a?.b).c)! .foo; +((a?.b).c!) .foo; +((a?.b)!.c) .foo; +((a?.b!).c) .foo; +((a!?.b).c) .foo; +((a?.()).b)! .foo; +((a?.()).b!) .foo; +((a?.())!.b) .foo; +((a?.()!).b) .foo; +((a!?.()).b) .foo; + +// Call expressions +(a?.())! .foo; +(a?.()!) .foo; +(a!?.()) .foo; +(a.b.c?.())! .foo; +(a.b.c?.()!) .foo; +(a.b.c!?.()) .foo; +(a.b?.c())! .foo; +(a.b?.c()!) .foo; +(a.b!?.c()) .foo; +(a?.b.c())! .foo; +(a?.b.c()!) .foo; +(a?.b!.c()) .foo; +(a(b?.c))! .foo; +(a(b?.c)!) .foo; +(a(b?.c!)) .foo; +((a?.b)())! .foo; +((a?.b)()!) .foo; +((a?.b)!()) .foo; +((a?.b!)()) .foo; +((a?.())())! .foo; +((a?.())()!) .foo; +((a?.())!()) .foo; +((a?.()!)()) .foo; +((a!?.())()) .foo; + + +// Not `.object` +_[a?.b!] + +// Computed +(a?.b!) [foo] diff --git a/tests/format/typescript/chain-expression/new-expression.ts b/tests/format/typescript/chain-expression/new-expression.ts new file mode 100644 index 000000000000..98e2263ea79d --- /dev/null +++ b/tests/format/typescript/chain-expression/new-expression.ts @@ -0,0 +1,64 @@ +// Member expressions +// FIXME: new (a?.b)! (); +// FIXME: new (a?.b!) (); +new (a!?.b) (); +// FIXME: new (a.b?.c)! (); +// FIXME: new (a.b?.c!) (); +new (a.b!?.c) (); +new (a!.b?.c) (); +// FIXME: new (a?.b.c)! (); +// FIXME: new (a?.b.c!) (); +new (a?.b!.c) (); +new (a!?.b.c) (); +new (a[b?.c])! (); +new (a[b?.c]!) (); +new (a[b?.c!]) (); +new (a[b!?.c]) (); +new ((a?.b).c)! (); +new ((a?.b).c!) (); +new ((a?.b!).c) (); +new ((a!?.b).c) (); +new (a[b?.()])! (); +new (a[b?.()]!) (); +new (a[b?.()!]) (); +new (a[b!?.()]) (); +new (a![b?.()]) (); +new ((a?.b).c)! (); +new ((a?.b).c!) (); +new ((a?.b)!.c) (); +new ((a?.b!).c) (); +new ((a!?.b).c) (); +// FIXME: new ((a?.()).b)! (); +// FIXME: new ((a?.()).b!) (); +// FIXME: new ((a?.())!.b) (); +// FIXME: new ((a?.()!).b) (); +// FIXME: new ((a!?.()).b) (); + +// Call expressions +// FIXME: new (a?.())! (); +// FIXME: new (a?.()!) (); +new (a!?.()) (); +// FIXME: new (a.b.c?.())! (); +// FIXME: new (a.b.c?.()!) (); +new (a.b.c!?.()) (); +// FIXME: new (a.b?.c())! (); +// FIXME: new (a.b?.c()!) (); +new (a.b!?.c()) (); +// FIXME: new (a?.b.c())! (); +// FIXME: new (a?.b.c()!) (); +new (a?.b!.c()) (); +new (a(b?.c))! (); +new (a(b?.c)!) (); +new (a(b?.c!)) (); +new ((a?.b)())! (); +new ((a?.b)()!) (); +new ((a?.b)!()) (); +new ((a?.b!)()) (); +new ((a?.())())! (); +new ((a?.())()!) (); +new ((a?.())!()) (); +new ((a?.()!)()) (); +new ((a!?.())()) (); + +// Not `.callee` +new Foo(a?.b!) diff --git a/tests/format/typescript/chain-expression/tagged-template-literals.ts b/tests/format/typescript/chain-expression/tagged-template-literals.ts new file mode 100644 index 000000000000..37f9c22a70c8 --- /dev/null +++ b/tests/format/typescript/chain-expression/tagged-template-literals.ts @@ -0,0 +1,61 @@ +// Member expressions +(a?.b)! ``; +(a?.b!) ``; +(a!?.b) ``; +(a.b?.c)! ``; +(a.b?.c!) ``; +(a.b!?.c) ``; +(a!.b?.c) ``; +(a?.b.c)! ``; +(a?.b.c!) ``; +(a?.b!.c) ``; +(a!?.b.c) ``; +(a[b?.c])! ``; +(a[b?.c]!) ``; +(a[b?.c!]) ``; +(a[b!?.c]) ``; +((a?.b).c)! ``; +((a?.b).c!) ``; +((a?.b!).c) ``; +((a!?.b).c) ``; +(a[b?.()])! ``; +(a[b?.()]!) ``; +(a[b?.()!]) ``; +(a[b!?.()]) ``; +(a![b?.()]) ``; +((a?.b).c)! ``; +((a?.b).c!) ``; +((a?.b)!.c) ``; +((a?.b!).c) ``; +((a!?.b).c) ``; +((a?.()).b)! ``; +((a?.()).b!) ``; +((a?.())!.b) ``; +((a?.()!).b) ``; +((a!?.()).b) ``; + +// Call expressions +(a?.())! ``; +(a?.()!) ``; +(a!?.()) ``; +(a.b.c?.())! ``; +(a.b.c?.()!) ``; +(a.b.c!?.()) ``; +(a.b?.c())! ``; +(a.b?.c()!) ``; +(a.b!?.c()) ``; +(a?.b.c())! ``; +(a?.b.c()!) ``; +(a?.b!.c()) ``; +(a(b?.c))! ``; +(a(b?.c)!) ``; +(a(b?.c!)) ``; +((a?.b)())! ``; +((a?.b)()!) ``; +((a?.b)!()) ``; +((a?.b!)()) ``; +((a?.())())! ``; +((a?.())()!) ``; +((a?.())!()) ``; +((a?.()!)()) ``; +((a!?.())()) ``; diff --git a/tests/format/typescript/chain-expression/test.ts b/tests/format/typescript/chain-expression/test.ts new file mode 100644 index 000000000000..e12dd65ee269 --- /dev/null +++ b/tests/format/typescript/chain-expression/test.ts @@ -0,0 +1,4 @@ +(a?.b!).c; +(a?.()!).b; +(a?.b)!.c; +(a?.())!.b; diff --git a/tests/format/typescript/chain-expression/test2.ts b/tests/format/typescript/chain-expression/test2.ts new file mode 100644 index 000000000000..8adf4de8d433 --- /dev/null +++ b/tests/format/typescript/chain-expression/test2.ts @@ -0,0 +1,8 @@ +{{ + const rotation1 = getTransformHandles(arrow, h.state.zoom, 'mouse') + .rotation!; + const rotation2 = getTransformHandles(arrow, h.state.zoom, 'mouse') + .rotation; + const rotation3 = getTransformHandles(arrow, h.state.zoom, 'mouse') + ?.rotation; +}} diff --git a/tests/format/typescript/class-comment/__snapshots__/format.test.js.snap b/tests/format/typescript/class-comment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b8da52114f58 --- /dev/null +++ b/tests/format/typescript/class-comment/__snapshots__/format.test.js.snap @@ -0,0 +1,292 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class-implements.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class a1 extends b // comment +implements z +{ + constructor() {} +} + +class a2 extends b implements z { // comment + constructor() {} +} + +class a3 extends b +implements +// comment +z, +y { + constructor() {} +} + +class a4 extends b +implements z, // comment +y { + constructor() {} +} + +class a5 extends b implements + z, // comment-z + y // comment-y + { + constructor() {} +} + +class a6 extends b implements +// comment-z1 + z, // comment-z2 + // comment-y1 + y // comment-y2 + { + constructor() {} +} + +class a7 extends b implements +// comment-z1 + z, // comment-z2 + // comment-y1 + y // comment-y2 + // comment-y3 + { + //comment-body + constructor() {} +} + +class a8 extends b // comment-b + implements +// comment-z1 + z, // comment-z2 + // comment-y1 + y // comment-y2 + { + constructor() {} +} + +class a9 extends +// comment-b1 +b // comment-b2 +// comment-b3 + implements +// comment-z1 + z, // comment-z2 + // comment-y1 + y // comment-y2 + { + constructor() {} +} + +=====================================output===================================== +class a1 + extends b // comment + implements z +{ + constructor() {} +} + +class a2 extends b implements z { + // comment + constructor() {} +} + +class a3 + extends b + // comment + implements z, y +{ + constructor() {} +} + +class a4 + extends b + implements + z, // comment + y +{ + constructor() {} +} + +class a5 + extends b + implements + z, // comment-z + y +{ + // comment-y + constructor() {} +} + +class a6 + extends b + // comment-z1 + implements + z, // comment-z2 + // comment-y1 + y +{ + // comment-y2 + constructor() {} +} + +class a7 + extends b + // comment-z1 + implements + z, // comment-z2 + // comment-y1 + y +{ + // comment-y2 + // comment-y3 + //comment-body + constructor() {} +} + +class a8 + extends b // comment-b + // comment-z1 + implements + z, // comment-z2 + // comment-y1 + y +{ + // comment-y2 + constructor() {} +} + +class a9 + // comment-b1 + extends b // comment-b2 + // comment-b3 + // comment-z1 + implements + z, // comment-z2 + // comment-y1 + y +{ + // comment-y2 + constructor() {} +} + +================================================================================ +`; + +exports[`declare.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare class a // 1 + // extends b // 2 + implements z,x // 3 +{ + doo:boolean +} + +declare class A1<T> // 1 +// 2 +extends B<T> // 3 +{} + +=====================================output===================================== +declare class a // 1 + // extends b // 2 + implements z, x +{ + // 3 + doo: boolean; +} + +declare class A1<T> // 1 + // 2 + extends B<T> { + // 3 +} + +================================================================================ +`; + +exports[`generic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class G1<T> implements IPoly<T> { + x: T; +} + +class G2 // g2 +<T> implements IPoly<T> { + x: T; +} + +class G3 // g3 +<T> extends U implements IPoly<T> { + x: T; +} + +class G4<T // g4 +> extends U implements IPoly<T> { + x: T; +} + +=====================================output===================================== +class G1<T> implements IPoly<T> { + x: T; +} + +class G2<T> // g2 + implements IPoly<T> +{ + x: T; +} + +class G3<T> // g3 + extends U + implements IPoly<T> +{ + x: T; +} + +class G4< + T, // g4 + > + extends U + implements IPoly<T> +{ + x: T; +} + +================================================================================ +`; + +exports[`misc.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class SnapshotLogger { + constructor( + retentionPeriod: number = 5 * 60 * 1000, // retain past five minutes + snapshotInterval: number = 30 * 1000, // snapshot no more than every 30s + ) { + } +} + +=====================================output===================================== +export class SnapshotLogger { + constructor( + retentionPeriod: number = 5 * 60 * 1000, // retain past five minutes + snapshotInterval: number = 30 * 1000, // snapshot no more than every 30s + ) {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b235d98a5dfb..000000000000 --- a/tests/format/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,292 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`class-implements.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class a1 extends b // comment -implements z -{ - constructor() {} -} - -class a2 extends b implements z { // comment - constructor() {} -} - -class a3 extends b -implements -// comment -z, -y { - constructor() {} -} - -class a4 extends b -implements z, // comment -y { - constructor() {} -} - -class a5 extends b implements - z, // comment-z - y // comment-y - { - constructor() {} -} - -class a6 extends b implements -// comment-z1 - z, // comment-z2 - // comment-y1 - y // comment-y2 - { - constructor() {} -} - -class a7 extends b implements -// comment-z1 - z, // comment-z2 - // comment-y1 - y // comment-y2 - // comment-y3 - { - //comment-body - constructor() {} -} - -class a8 extends b // comment-b - implements -// comment-z1 - z, // comment-z2 - // comment-y1 - y // comment-y2 - { - constructor() {} -} - -class a9 extends -// comment-b1 -b // comment-b2 -// comment-b3 - implements -// comment-z1 - z, // comment-z2 - // comment-y1 - y // comment-y2 - { - constructor() {} -} - -=====================================output===================================== -class a1 - extends b // comment - implements z -{ - constructor() {} -} - -class a2 extends b implements z { - // comment - constructor() {} -} - -class a3 - extends b - // comment - implements z, y -{ - constructor() {} -} - -class a4 - extends b - implements - z, // comment - y -{ - constructor() {} -} - -class a5 - extends b - implements - z, // comment-z - y -{ - // comment-y - constructor() {} -} - -class a6 - extends b - // comment-z1 - implements - z, // comment-z2 - // comment-y1 - y -{ - // comment-y2 - constructor() {} -} - -class a7 - extends b - // comment-z1 - implements - z, // comment-z2 - // comment-y1 - y -{ - // comment-y2 - // comment-y3 - //comment-body - constructor() {} -} - -class a8 - extends b // comment-b - // comment-z1 - implements - z, // comment-z2 - // comment-y1 - y -{ - // comment-y2 - constructor() {} -} - -class a9 - // comment-b1 - extends b // comment-b2 - // comment-b3 - // comment-z1 - implements - z, // comment-z2 - // comment-y1 - y -{ - // comment-y2 - constructor() {} -} - -================================================================================ -`; - -exports[`declare.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare class a // 1 - // extends b // 2 - implements z,x // 3 -{ - doo:boolean -} - -declare class A1<T> // 1 -// 2 -extends B<T> // 3 -{} - -=====================================output===================================== -declare class a // 1 - // extends b // 2 - implements z, x -{ - // 3 - doo: boolean; -} - -declare class A1<T> // 1 - // 2 - extends B<T> { - // 3 -} - -================================================================================ -`; - -exports[`generic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class G1<T> implements IPoly<T> { - x: T; -} - -class G2 // g2 -<T> implements IPoly<T> { - x: T; -} - -class G3 // g3 -<T> extends U implements IPoly<T> { - x: T; -} - -class G4<T // g4 -> extends U implements IPoly<T> { - x: T; -} - -=====================================output===================================== -class G1<T> implements IPoly<T> { - x: T; -} - -class G2<T> // g2 - implements IPoly<T> -{ - x: T; -} - -class G3<T> // g3 - extends U - implements IPoly<T> -{ - x: T; -} - -class G4< - T // g4 - > - extends U - implements IPoly<T> -{ - x: T; -} - -================================================================================ -`; - -exports[`misc.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class SnapshotLogger { - constructor( - retentionPeriod: number = 5 * 60 * 1000, // retain past five minutes - snapshotInterval: number = 30 * 1000, // snapshot no more than every 30s - ) { - } -} - -=====================================output===================================== -export class SnapshotLogger { - constructor( - retentionPeriod: number = 5 * 60 * 1000, // retain past five minutes - snapshotInterval: number = 30 * 1000 // snapshot no more than every 30s - ) {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/class-comment/format.test.js b/tests/format/typescript/class-comment/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/class-comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/class-comment/jsfmt.spec.js b/tests/format/typescript/class-comment/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/class-comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/class/__snapshots__/format.test.js.snap b/tests/format/typescript/class/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a9676514cc22 --- /dev/null +++ b/tests/format/typescript/class/__snapshots__/format.test.js.snap @@ -0,0 +1,608 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`abstract-method.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + abstract foo(); +} + +abstract class Bar { + method() { + return class { + abstract m(); + } + } +} + +=====================================output===================================== +class Foo { + abstract foo(); +} + +abstract class Bar { + method() { + return class { + abstract m(); + }; + } +} + +================================================================================ +`; + +exports[`constructor.ts [oxc-ts] format 1`] = ` +"Classes can't have a field named 'constructor' (8:5) + 6 | + 7 | class A { +> 8 | 'constructor': typeof A + | ^^^^^^^^^^^^^ + 9 | static Foo() { + 10 | return new A() + 11 | }" +`; + +exports[`constructor.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C {constructor(override a: number) {}} +class D {constructor(private a: number) {}} +class E {constructor(protected a: number) {}} +class F {constructor(public a: number) {}} +class G {constructor(readonly a: number) {}} + +class A { + 'constructor': typeof A + static Foo() { + return new A() + } +} + +class B { + constructor<>() {} +} + +=====================================output===================================== +class C { + constructor(override a: number) {} +} +class D { + constructor(private a: number) {} +} +class E { + constructor(protected a: number) {} +} +class F { + constructor(public a: number) {} +} +class G { + constructor(readonly a: number) {} +} + +class A { + "constructor": typeof A; + static Foo() { + return new A(); + } +} + +class B { + constructor<>() {} +} + +================================================================================ +`; + +exports[`declare-field.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + declare private readonly name: string; + private declare readonly name2: string; +} + +=====================================output===================================== +class A { + declare private readonly name: string; + declare private readonly name2: string; +} + +================================================================================ +`; + +exports[`declare-readonly-field-initializer.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + declare readonly bar = "test"; + declare readonly foo = 1; + declare readonly baz = a.b; +} + +=====================================output===================================== +class A { + declare readonly bar = "test"; + declare readonly foo = 1; + declare readonly baz = a.b; +} + +================================================================================ +`; + +exports[`declare-readonly-field-initializer-w-annotation.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + declare readonly bar: string = "test"; + declare baz: string = "test"; +} + +=====================================output===================================== +class A { + declare readonly bar: string = "test"; + declare baz: string = "test"; +} + +================================================================================ +`; + +exports[`dunder.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class F<__T> {} + +=====================================output===================================== +class F<__T> {} + +================================================================================ +`; + +exports[`empty-method-body.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #9324 + +class foo1 { + bar() /* bat */; +} + +// #9367 +class Test { + foo (/* 2 */) /* 3 */; +} + +=====================================output===================================== +// #9324 + +class foo1 { + bar /* bat */(); +} + +// #9367 +class Test { + foo /* 3 */(/* 2 */); +} + +================================================================================ +`; + +exports[`extends_implements.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Class extends AbstractClass implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces1 extends AbstractClass + implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces2 + extends AAAAAAAAAAAAAAbstractClass + implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces3 + extends AAAAAAAAAAAAAAbstractClass + implements + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7, + Interface8 {} + +class ExtendsAbstractClassAndImplementsInterfaces4 + extends AAAAAAAAAAAAAAbstractClass<Type1, Type2, Type3, Type4, Type5, Type6, Type7> {} + +class ExtendsAbstractClassAndImplementsInterfaces5 + extends AAAAAAAAAAAAAAbstractClass<Type1, Type2, Type3, Type4, Type5, Type6, Type7> + implements + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7, + Interface8 {} + +class ImplementsInterfaceAndExtendsAbstractClass1<Foo> + extends FOOOOOOOOOOOOOOOOO + implements FOOOOOOOOOOOOOOOOO, BARRRRRRRRRR {} + +class Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOOOOOO> implements Foo {} + +class ImplementsInterfaceAndExtendsAbstractClass2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree + > + extends FOOOOOOOOOOOOOOOOOO implements BaseInterface {} + +class ImplementsInterfaceClass1< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree + > + implements BaseInterface {} + +class ImplementsInterfaceClassWithComments1< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree + > // comments + implements BaseInterface {} + +=====================================output===================================== +class Class + extends AbstractClass + implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces1 + extends AbstractClass + implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces2 + extends AAAAAAAAAAAAAAbstractClass + implements Interface1, Interface2, Interface3, Interface4 {} + +class ExtendsAbstractClassAndImplementsInterfaces3 + extends AAAAAAAAAAAAAAbstractClass + implements + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7, + Interface8 {} + +class ExtendsAbstractClassAndImplementsInterfaces4 extends AAAAAAAAAAAAAAbstractClass< + Type1, + Type2, + Type3, + Type4, + Type5, + Type6, + Type7 +> {} + +class ExtendsAbstractClassAndImplementsInterfaces5 + extends AAAAAAAAAAAAAAbstractClass< + Type1, + Type2, + Type3, + Type4, + Type5, + Type6, + Type7 + > + implements + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7, + Interface8 {} + +class ImplementsInterfaceAndExtendsAbstractClass1<Foo> + extends FOOOOOOOOOOOOOOOOO + implements FOOOOOOOOOOOOOOOOO, BARRRRRRRRRR {} + +class Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOOOOOO> + implements Foo {} + +class ImplementsInterfaceAndExtendsAbstractClass2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > + extends FOOOOOOOOOOOOOOOOOO + implements BaseInterface {} + +class ImplementsInterfaceClass1< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, +> implements BaseInterface {} + +class ImplementsInterfaceClassWithComments1< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // comments + implements BaseInterface {} + +================================================================================ +`; + +exports[`generics.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A<T> implements Map<T> {} + +interface AudioBufferList { + mBuffers: interop.Reference<any /*AudioBuffer*/>; +} + +=====================================output===================================== +class A<T> implements Map<T> {} + +interface AudioBufferList { + mBuffers: interop.Reference<any /*AudioBuffer*/>; +} + +================================================================================ +`; + +exports[`issue-16723.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class JiraCreatePixFraudDetectionGateway + implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} + +=====================================output===================================== +export class JiraCreatePixFraudDetectionGateway + implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} + +================================================================================ +`; + +exports[`methods.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class X { + optionalMethod?() {} +} + +interface Iterable<T> { + [Symbol.iterator](): Iterator<T>; +} + +export class Check { + private static property = 'test'; +} + +=====================================output===================================== +class X { + optionalMethod?() {} +} + +interface Iterable<T> { + [Symbol.iterator](): Iterator<T>; +} + +export class Check { + private static property = "test"; +} + +================================================================================ +`; + +exports[`optional.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class X { + private foo? = undefined; + "a-prop"?: boolean; +} + +class A { + protected [s]?() {} +} + +=====================================output===================================== +class X { + private foo? = undefined; + "a-prop"?: boolean; +} + +class A { + protected [s]?() {} +} + +================================================================================ +`; + +exports[`parameter-properties.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class MyClass { + constructor(protected x: number, private y: string) { + } +} + +[ + class { + "constructor"(protected x: number, private y: string) { + } + }, +] + +class Mixed { + constructor(public a: number, b: unknown) { + } +} + +class OneParameterProperty { + constructor(public foobar: boolean) { + } +} + +=====================================output===================================== +class MyClass { + constructor( + protected x: number, + private y: string, + ) {} +} + +[ + class { + constructor( + protected x: number, + private y: string, + ) {} + }, +]; + +class Mixed { + constructor( + public a: number, + b: unknown, + ) {} +} + +class OneParameterProperty { + constructor(public foobar: boolean) {} +} + +================================================================================ +`; + +exports[`quoted-property.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class User { + "username": string; +} + +=====================================output===================================== +class User { + "username": string; +} + +================================================================================ +`; + +exports[`standard_private_fields.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Square { + #sideLength: number; + readonly #area: number; + #unit?: string; + + constructor(sideLength: number, unit?: string) { + this.#sideLength = sideLength; + this.#area = this.#sideLength ** 2; + if (unit) { + this.#unit = unit; + } + } + + equals(other: any) { + return this.#sideLength === other.#sideLength; + } + + getArea() { + return this.#area + (this.#unit ?? 'px') + '²'; + } +} + +=====================================output===================================== +class Square { + #sideLength: number; + readonly #area: number; + #unit?: string; + + constructor(sideLength: number, unit?: string) { + this.#sideLength = sideLength; + this.#area = this.#sideLength ** 2; + if (unit) { + this.#unit = unit; + } + } + + equals(other: any) { + return this.#sideLength === other.#sideLength; + } + + getArea() { + return this.#area + (this.#unit ?? "px") + "²"; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1c468fe7f163..000000000000 --- a/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,496 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract-method.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - abstract foo(); -} - -abstract class Bar { - method() { - return class { - abstract m(); - } - } -} - -=====================================output===================================== -class Foo { - abstract foo(); -} - -abstract class Bar { - method() { - return class { - abstract m(); - }; - } -} - -================================================================================ -`; - -exports[`constructor.ts [babel-ts] format 1`] = ` -"Unexpected token, expected "," (2:22) - 1 | class foo { -> 2 | constructor(static a: number) {} - | ^ - 3 | } - 4 | - 5 | class foo {" -`; - -exports[`constructor.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class foo { - constructor(static a: number) {} -} - -class foo { - constructor(export a: number) {} -} - -class A { - 'constructor': typeof A - static Foo() { - return new A() - } -} - -class B { - constructor<>() {} -} - -=====================================output===================================== -class foo { - constructor(static a: number) {} -} - -class foo { - constructor(export a: number) {} -} - -class A { - "constructor": typeof A; - static Foo() { - return new A(); - } -} - -class B { - constructor<>() {} -} - -================================================================================ -`; - -exports[`dunder.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class F<__T> {} - -=====================================output===================================== -class F<__T> {} - -================================================================================ -`; - -exports[`duplicates-access-modifier.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - public public a; - private public b; - protected private c; - public protected d; - public protected private e; -} - -=====================================output===================================== -class Foo { - public a; - private b; - protected c; - public d; - public e; -} - -================================================================================ -`; - -exports[`empty-method-body.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #9324 - -class foo1 { - bar() /* bat */; -} - -// #9367 -class Test { - foo (/* 2 */) /* 3 */; -} - -=====================================output===================================== -// #9324 - -class foo1 { - bar /* bat */(); -} - -// #9367 -class Test { - foo /* 3 */(/* 2 */); -} - -================================================================================ -`; - -exports[`extends_implements.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Class extends AbstractClass implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces1 extends AbstractClass - implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces2 - extends AAAAAAAAAAAAAAbstractClass - implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces3 - extends AAAAAAAAAAAAAAbstractClass - implements - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7, - Interface8 {} - -class ExtendsAbstractClassAndImplementsInterfaces4 - extends AAAAAAAAAAAAAAbstractClass<Type1, Type2, Type3, Type4, Type5, Type6, Type7> {} - -class ExtendsAbstractClassAndImplementsInterfaces5 - extends AAAAAAAAAAAAAAbstractClass<Type1, Type2, Type3, Type4, Type5, Type6, Type7> - implements - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7, - Interface8 {} - -class ImplementsInterfaceAndExtendsAbstractClass1<Foo> - extends FOOOOOOOOOOOOOOOOO - implements FOOOOOOOOOOOOOOOOO, BARRRRRRRRRR {} - -class Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOOOOOO> implements Foo {} - -class ImplementsInterfaceAndExtendsAbstractClass2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > - extends FOOOOOOOOOOOOOOOOOO implements BaseInterface {} - -class ImplementsInterfaceClass1< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > - implements BaseInterface {} - -class ImplementsInterfaceClassWithComments1< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // comments - implements BaseInterface {} - -=====================================output===================================== -class Class - extends AbstractClass - implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces1 - extends AbstractClass - implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces2 - extends AAAAAAAAAAAAAAbstractClass - implements Interface1, Interface2, Interface3, Interface4 {} - -class ExtendsAbstractClassAndImplementsInterfaces3 - extends AAAAAAAAAAAAAAbstractClass - implements - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7, - Interface8 {} - -class ExtendsAbstractClassAndImplementsInterfaces4 extends AAAAAAAAAAAAAAbstractClass< - Type1, - Type2, - Type3, - Type4, - Type5, - Type6, - Type7 -> {} - -class ExtendsAbstractClassAndImplementsInterfaces5 - extends AAAAAAAAAAAAAAbstractClass< - Type1, - Type2, - Type3, - Type4, - Type5, - Type6, - Type7 - > - implements - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7, - Interface8 {} - -class ImplementsInterfaceAndExtendsAbstractClass1<Foo> - extends FOOOOOOOOOOOOOOOOO - implements FOOOOOOOOOOOOOOOOO, BARRRRRRRRRR {} - -class Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOOOOOO> - implements Foo {} - -class ImplementsInterfaceAndExtendsAbstractClass2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > - extends FOOOOOOOOOOOOOOOOOO - implements BaseInterface {} - -class ImplementsInterfaceClass1< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> implements BaseInterface {} - -class ImplementsInterfaceClassWithComments1< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // comments - implements BaseInterface {} - -================================================================================ -`; - -exports[`generics.ts [babel-ts] format 1`] = ` -"A class name is required. (1:6) -> 1 | class<T> implements Map<T> {} - | ^ - 2 | - 3 | interface AudioBufferList { - 4 | mBuffers: interop.Reference<any /*AudioBuffer*/>;" -`; - -exports[`generics.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class<T> implements Map<T> {} - -interface AudioBufferList { - mBuffers: interop.Reference<any /*AudioBuffer*/>; -} - -=====================================output===================================== -class<T> implements Map<T> {} - -interface AudioBufferList { - mBuffers: interop.Reference<any /*AudioBuffer*/>; -} - -================================================================================ -`; - -exports[`methods.ts [babel-ts] format 1`] = ` -"Unexpected token, expected ";" (6:10) - 4 | - 5 | interface Iterable<T> { -> 6 | export [Symbol.iterator](): Iterator<T>; - | ^ - 7 | } - 8 | - 9 | export class Check {" -`; - -exports[`methods.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class X { - optionalMethod?() {} -} - -interface Iterable<T> { - export [Symbol.iterator](): Iterator<T>; -} - -export class Check { - private static property = 'test'; -} - -=====================================output===================================== -class X { - optionalMethod?() {} -} - -interface Iterable<T> { - export [Symbol.iterator](): Iterator<T>; -} - -export class Check { - private static property = "test"; -} - -================================================================================ -`; - -exports[`optional.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class X { - private foo? = undefined; - "a-prop"?: boolean; -} - -class A { - protected [s]?() {} -} - -=====================================output===================================== -class X { - private foo? = undefined; - "a-prop"?: boolean; -} - -class A { - protected [s]?() {} -} - -================================================================================ -`; - -exports[`quoted-property.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class User { - "username": string; -} - -=====================================output===================================== -class User { - "username": string; -} - -================================================================================ -`; - -exports[`standard_private_fields.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Square { - #sideLength: number; - readonly #area: number; - #unit?: string; - - constructor(sideLength: number, unit?: string) { - this.#sideLength = sideLength; - this.#area = this.#sideLength ** 2; - if (unit) { - this.#unit = unit; - } - } - - equals(other: any) { - return this.#sideLength === other.#sideLength; - } - - getArea() { - return this.#area + (this.#unit ?? 'px') + '²'; - } -} - -=====================================output===================================== -class Square { - #sideLength: number; - readonly #area: number; - #unit?: string; - - constructor(sideLength: number, unit?: string) { - this.#sideLength = sideLength; - this.#area = this.#sideLength ** 2; - if (unit) { - this.#unit = unit; - } - } - - equals(other: any) { - return this.#sideLength === other.#sideLength; - } - - getArea() { - return this.#area + (this.#unit ?? "px") + "²"; - } -} - -================================================================================ -`; diff --git a/tests/format/typescript/class/constructor.ts b/tests/format/typescript/class/constructor.ts index 9934c471ab5a..3cb7582e2fbe 100644 --- a/tests/format/typescript/class/constructor.ts +++ b/tests/format/typescript/class/constructor.ts @@ -1,10 +1,8 @@ -class foo { - constructor(static a: number) {} -} - -class foo { - constructor(export a: number) {} -} +class C {constructor(override a: number) {}} +class D {constructor(private a: number) {}} +class E {constructor(protected a: number) {}} +class F {constructor(public a: number) {}} +class G {constructor(readonly a: number) {}} class A { 'constructor': typeof A diff --git a/tests/format/typescript/class/declare-field.ts b/tests/format/typescript/class/declare-field.ts new file mode 100644 index 000000000000..ba0d2a2d487d --- /dev/null +++ b/tests/format/typescript/class/declare-field.ts @@ -0,0 +1,4 @@ +class A { + declare private readonly name: string; + private declare readonly name2: string; +} diff --git a/tests/format/typescript/class/declare-readonly-field-initializer-w-annotation.ts b/tests/format/typescript/class/declare-readonly-field-initializer-w-annotation.ts new file mode 100644 index 000000000000..67ea8ae3d296 --- /dev/null +++ b/tests/format/typescript/class/declare-readonly-field-initializer-w-annotation.ts @@ -0,0 +1,4 @@ +class A { + declare readonly bar: string = "test"; + declare baz: string = "test"; +} diff --git a/tests/format/typescript/class/declare-readonly-field-initializer.ts b/tests/format/typescript/class/declare-readonly-field-initializer.ts new file mode 100644 index 000000000000..aabe88960394 --- /dev/null +++ b/tests/format/typescript/class/declare-readonly-field-initializer.ts @@ -0,0 +1,5 @@ +class A { + declare readonly bar = "test"; + declare readonly foo = 1; + declare readonly baz = a.b; +} diff --git a/tests/format/typescript/class/duplicates-access-modifier.ts b/tests/format/typescript/class/duplicates-access-modifier.ts deleted file mode 100644 index fa01be69f2c4..000000000000 --- a/tests/format/typescript/class/duplicates-access-modifier.ts +++ /dev/null @@ -1,7 +0,0 @@ -class Foo { - public public a; - private public b; - protected private c; - public protected d; - public protected private e; -} diff --git a/tests/format/typescript/class/format.test.js b/tests/format/typescript/class/format.test.js new file mode 100644 index 000000000000..3ed84d3b741d --- /dev/null +++ b/tests/format/typescript/class/format.test.js @@ -0,0 +1,8 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "oxc-ts": [ + // TODO: Ask typescript-eslint to throw + "constructor.ts", + ], + }, +}); diff --git a/tests/format/typescript/class/generics.ts b/tests/format/typescript/class/generics.ts index c6b43d5c3a0d..3c521a92f923 100644 --- a/tests/format/typescript/class/generics.ts +++ b/tests/format/typescript/class/generics.ts @@ -1,4 +1,4 @@ -class<T> implements Map<T> {} +class A<T> implements Map<T> {} interface AudioBufferList { mBuffers: interop.Reference<any /*AudioBuffer*/>; diff --git a/tests/format/typescript/class/issue-16723.ts b/tests/format/typescript/class/issue-16723.ts new file mode 100644 index 000000000000..d55802052f5d --- /dev/null +++ b/tests/format/typescript/class/issue-16723.ts @@ -0,0 +1,9 @@ +export class JiraCreatePixFraudDetectionGateway + implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} diff --git a/tests/format/typescript/class/jsfmt.spec.js b/tests/format/typescript/class/jsfmt.spec.js deleted file mode 100644 index 76572080cf65..000000000000 --- a/tests/format/typescript/class/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { "babel-ts": ["constructor.ts", "generics.ts", "methods.ts"] }, -}); diff --git a/tests/format/typescript/class/methods.ts b/tests/format/typescript/class/methods.ts index 799573c9c625..3b81dbedb7e4 100644 --- a/tests/format/typescript/class/methods.ts +++ b/tests/format/typescript/class/methods.ts @@ -3,7 +3,7 @@ class X { } interface Iterable<T> { - export [Symbol.iterator](): Iterator<T>; + [Symbol.iterator](): Iterator<T>; } export class Check { diff --git a/tests/format/typescript/class/parameter-properties.ts b/tests/format/typescript/class/parameter-properties.ts new file mode 100644 index 000000000000..a488a14e2099 --- /dev/null +++ b/tests/format/typescript/class/parameter-properties.ts @@ -0,0 +1,21 @@ +class MyClass { + constructor(protected x: number, private y: string) { + } +} + +[ + class { + "constructor"(protected x: number, private y: string) { + } + }, +] + +class Mixed { + constructor(public a: number, b: unknown) { + } +} + +class OneParameterProperty { + constructor(public foobar: boolean) { + } +} diff --git a/tests/format/typescript/classes/__snapshots__/format.test.js.snap b/tests/format/typescript/classes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..974d7e40d38e --- /dev/null +++ b/tests/format/typescript/classes/__snapshots__/format.test.js.snap @@ -0,0 +1,152 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class MyContractSelectionWidget extends React.Component<void, MyContractSelectionWidgetPropsType, void> implements SomethingLarge { + method() {} +} + +class DisplayObject1 + extends utils.EventEmitter + implements interaction_InteractiveTarget { +} + +class DisplayObject2 extends utils.EventEmitter + implements interaction_InteractiveTarget { +} + +class DisplayObject3 extends utils.EventEmitter + implements interaction_InteractiveTarget, + somethingElse_SomeOtherThing, + somethingElseAgain_RunningOutOfNames { +} + +class DisplayObject4 extends utils.EventEmitter implements interaction_InteractiveTarget {} +class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} +class InMemoryAppender extends log4javascript.Appender implements ICachedLogMessageProvider {} + +class Foo extends Immutable.Record({ + ipaddress: '', +}) { + ipaddress: string; +} + +export class VisTimelineComponent + implements AfterViewInit, OnChanges, OnDestroy { +} +export class VisTimelineComponent2 + implements AfterViewInit, OnChanges, OnDestroy, AndSomethingReallyReallyLong { +} + +=====================================output===================================== +class MyContractSelectionWidget + extends React.Component<void, MyContractSelectionWidgetPropsType, void> + implements SomethingLarge +{ + method() {} +} + +class DisplayObject1 + extends utils.EventEmitter + implements interaction_InteractiveTarget {} + +class DisplayObject2 + extends utils.EventEmitter + implements interaction_InteractiveTarget {} + +class DisplayObject3 + extends utils.EventEmitter + implements + interaction_InteractiveTarget, + somethingElse_SomeOtherThing, + somethingElseAgain_RunningOutOfNames {} + +class DisplayObject4 + extends utils.EventEmitter + implements interaction_InteractiveTarget {} +class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} +class InMemoryAppender + extends log4javascript.Appender + implements ICachedLogMessageProvider {} + +class Foo extends Immutable.Record({ + ipaddress: "", +}) { + ipaddress: string; +} + +export class VisTimelineComponent + implements AfterViewInit, OnChanges, OnDestroy {} +export class VisTimelineComponent2 + implements + AfterViewInit, + OnChanges, + OnDestroy, + AndSomethingReallyReallyLong {} + +================================================================================ +`; + +exports[`break-heritage.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class looooooooooooooooooong1 extends looooooooooooooooooong implements loooooooooooooooooooong { + // leading comment + property: string; +} + +class looooooooooooooooooong2 extends looooooooooooooooooong implements loooooooooooooooooooong { + property: string; +} + +class looooooooooooooooooong3 extends looooooooooooooooooong implements loooooooooooooooooooong { + + property: string; +} + +class looooooooooooooooooong4 extends looooooooooooooooooong implements loooooooooooooooooooong, loooooooooooooooooooong, loooooooooooooooooooong { + property: string; +} + +=====================================output===================================== +class looooooooooooooooooong1 + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + // leading comment + property: string; +} + +class looooooooooooooooooong2 + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +class looooooooooooooooooong3 + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +class looooooooooooooooooong4 + extends looooooooooooooooooong + implements + loooooooooooooooooooong, + loooooooooooooooooooong, + loooooooooooooooooooong +{ + property: string; +} + +================================================================================ +`; diff --git a/tests/format/typescript/classes/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/classes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 348f13462b7a..000000000000 --- a/tests/format/typescript/classes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,152 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -class MyContractSelectionWidget extends React.Component<void, MyContractSelectionWidgetPropsType, void> implements SomethingLarge { - method() {} -} - -class DisplayObject1 - extends utils.EventEmitter - implements interaction_InteractiveTarget { -} - -class DisplayObject2 extends utils.EventEmitter - implements interaction_InteractiveTarget { -} - -class DisplayObject3 extends utils.EventEmitter - implements interaction_InteractiveTarget, - somethingElse_SomeOtherThing, - somethingElseAgain_RunningOutOfNames { -} - -class DisplayObject4 extends utils.EventEmitter implements interaction_InteractiveTarget {} -class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} -class InMemoryAppender extends log4javascript.Appender implements ICachedLogMessageProvider {} - -class Foo extends Immutable.Record({ - ipaddress: '', -}) { - ipaddress: string; -} - -export class VisTimelineComponent - implements AfterViewInit, OnChanges, OnDestroy { -} -export class VisTimelineComponent2 - implements AfterViewInit, OnChanges, OnDestroy, AndSomethingReallyReallyLong { -} - -=====================================output===================================== -class MyContractSelectionWidget - extends React.Component<void, MyContractSelectionWidgetPropsType, void> - implements SomethingLarge -{ - method() {} -} - -class DisplayObject1 - extends utils.EventEmitter - implements interaction_InteractiveTarget {} - -class DisplayObject2 - extends utils.EventEmitter - implements interaction_InteractiveTarget {} - -class DisplayObject3 - extends utils.EventEmitter - implements - interaction_InteractiveTarget, - somethingElse_SomeOtherThing, - somethingElseAgain_RunningOutOfNames {} - -class DisplayObject4 - extends utils.EventEmitter - implements interaction_InteractiveTarget {} -class Readable extends events.EventEmitter implements NodeJS_ReadableStream {} -class InMemoryAppender - extends log4javascript.Appender - implements ICachedLogMessageProvider {} - -class Foo extends Immutable.Record({ - ipaddress: "", -}) { - ipaddress: string; -} - -export class VisTimelineComponent - implements AfterViewInit, OnChanges, OnDestroy {} -export class VisTimelineComponent2 - implements - AfterViewInit, - OnChanges, - OnDestroy, - AndSomethingReallyReallyLong {} - -================================================================================ -`; - -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/format/typescript/classes/break-heritage.ts b/tests/format/typescript/classes/break-heritage.ts index e442f75175b0..bd9de53aa9c6 100644 --- a/tests/format/typescript/classes/break-heritage.ts +++ b/tests/format/typescript/classes/break-heritage.ts @@ -1,17 +1,17 @@ -class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { +class looooooooooooooooooong1 extends looooooooooooooooooong implements loooooooooooooooooooong { // leading comment property: string; } -class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { +class looooooooooooooooooong2 extends looooooooooooooooooong implements loooooooooooooooooooong { property: string; } -class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { +class looooooooooooooooooong3 extends looooooooooooooooooong implements loooooooooooooooooooong { property: string; } -class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong, loooooooooooooooooooong, loooooooooooooooooooong { +class looooooooooooooooooong4 extends looooooooooooooooooong implements loooooooooooooooooooong, loooooooooooooooooooong, loooooooooooooooooooong { property: string; } diff --git a/tests/format/typescript/classes/format.test.js b/tests/format/typescript/classes/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/classes/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/classes/jsfmt.spec.js b/tests/format/typescript/classes/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/classes/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/comments-2/__snapshots__/format.test.js.snap b/tests/format/typescript/comments-2/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1f11ccc1488a --- /dev/null +++ b/tests/format/typescript/comments-2/__snapshots__/format.test.js.snap @@ -0,0 +1,320 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dangling.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + +Thing?.(/* dangling */); +declare class Foo extends Qux<string> {/* dangling */} + +=====================================output===================================== +Thing?.(/* dangling */) +declare class Foo extends Qux<string> { + /* dangling */ +} + +================================================================================ +`; + +exports[`dangling.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +Thing?.(/* dangling */); +declare class Foo extends Qux<string> {/* dangling */} + +=====================================output===================================== +Thing?.(/* dangling */); +declare class Foo extends Qux<string> { + /* dangling */ +} + +================================================================================ +`; + +exports[`issues.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +function f( + someReallyLongArgument: WithSomeLongType, + someReallyLongArgument2: WithSomeLongType, + // Trailing comment should stay after +) {} + + +=====================================output===================================== +function f( + someReallyLongArgument: WithSomeLongType, + someReallyLongArgument2: WithSomeLongType, + // Trailing comment should stay after +) {} + +================================================================================ +`; + +exports[`issues.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f( + someReallyLongArgument: WithSomeLongType, + someReallyLongArgument2: WithSomeLongType, + // Trailing comment should stay after +) {} + + +=====================================output===================================== +function f( + someReallyLongArgument: WithSomeLongType, + someReallyLongArgument2: WithSomeLongType, + // Trailing comment should stay after +) {} + +================================================================================ +`; + +exports[`last-arg.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +type f1 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => number; + +f2 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number => {}; + +f3 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => {}; + +f4 = function( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) {}; + +class X { + f( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) {} +} + +function f5( + a: number +// some comment here +): number { + return a + 1; +} + +var x = { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> { + } +} + +class X2 { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData = ['unknown'] + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> { + } +} + +=====================================output===================================== +type f1 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => number + +f2 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number => {} + +f3 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => {} + +f4 = function ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) {} + +class X { + f( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) {} +} + +function f5( + a: number, + // some comment here +): number { + return a + 1 +} + +var x = { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData, + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> {}, +} + +class X2 { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData = ["unknown"], + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> {} +} + +================================================================================ +`; + +exports[`last-arg.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type f1 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => number; + +f2 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number => {}; + +f3 = ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => {}; + +f4 = function( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +) {}; + +class X { + f( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) {} +} + +function f5( + a: number +// some comment here +): number { + return a + 1; +} + +var x = { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> { + } +} + +class X2 { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData = ['unknown'] + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> { + } +} + +=====================================output===================================== +type f1 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => number; + +f2 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number => {}; + +f3 = ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) => {}; + +f4 = function ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +) {}; + +class X { + f( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) {} +} + +function f5( + a: number, + // some comment here +): number { + return a + 1; +} + +var x = { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData, + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> {}, +}; + +class X2 { + getSectionMode( + pageMetaData: PageMetaData, + sectionMetaData: SectionMetaData = ["unknown"], + /* $FlowFixMe This error was exposed while converting keyMirror + * to keyMirrorRecursive */ + ): $Enum<SectionMode> {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/comments-2/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/comments-2/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6a966bbc7f64..000000000000 --- a/tests/format/typescript/comments-2/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,320 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`dangling.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== - -Thing?.(/* dangling */); -declare class Foo extends Qux<string> {/* dangling */} - -=====================================output===================================== -Thing?.(/* dangling */) -declare class Foo extends Qux<string> { - /* dangling */ -} - -================================================================================ -`; - -exports[`dangling.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - -Thing?.(/* dangling */); -declare class Foo extends Qux<string> {/* dangling */} - -=====================================output===================================== -Thing?.(/* dangling */); -declare class Foo extends Qux<string> { - /* dangling */ -} - -================================================================================ -`; - -exports[`issues.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -function f( - someReallyLongArgument: WithSomeLongType, - someReallyLongArgument2: WithSomeLongType, - // Trailing comment should stay after -) {} - - -=====================================output===================================== -function f( - someReallyLongArgument: WithSomeLongType, - someReallyLongArgument2: WithSomeLongType - // Trailing comment should stay after -) {} - -================================================================================ -`; - -exports[`issues.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f( - someReallyLongArgument: WithSomeLongType, - someReallyLongArgument2: WithSomeLongType, - // Trailing comment should stay after -) {} - - -=====================================output===================================== -function f( - someReallyLongArgument: WithSomeLongType, - someReallyLongArgument2: WithSomeLongType - // Trailing comment should stay after -) {} - -================================================================================ -`; - -exports[`last-arg.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -type f1 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number; - -f2 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -): number => {}; - -f3 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) => {}; - -f4 = function( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) {}; - -class X { - f( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ) {} -} - -function f5( - a: number -// some comment here -): number { - return a + 1; -} - -var x = { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> { - } -} - -class X2 { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData = ['unknown'] - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> { - } -} - -=====================================output===================================== -type f1 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number - -f2 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -): number => {} - -f3 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) => {} - -f4 = function ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) {} - -class X { - f( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ) {} -} - -function f5( - a: number - // some comment here -): number { - return a + 1 -} - -var x = { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> {}, -} - -class X2 { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData = ["unknown"] - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> {} -} - -================================================================================ -`; - -exports[`last-arg.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -type f1 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number; - -f2 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -): number => {}; - -f3 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) => {}; - -f4 = function( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) {}; - -class X { - f( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ) {} -} - -function f5( - a: number -// some comment here -): number { - return a + 1; -} - -var x = { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> { - } -} - -class X2 { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData = ['unknown'] - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> { - } -} - -=====================================output===================================== -type f1 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number; - -f2 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -): number => {}; - -f3 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) => {}; - -f4 = function ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) {}; - -class X { - f( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ) {} -} - -function f5( - a: number - // some comment here -): number { - return a + 1; -} - -var x = { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> {}, -}; - -class X2 { - getSectionMode( - pageMetaData: PageMetaData, - sectionMetaData: SectionMetaData = ["unknown"] - /* $FlowFixMe This error was exposed while converting keyMirror - * to keyMirrorRecursive */ - ): $Enum<SectionMode> {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/comments-2/format.test.js b/tests/format/typescript/comments-2/format.test.js new file mode 100644 index 000000000000..87642b7af13d --- /dev/null +++ b/tests/format/typescript/comments-2/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript", "flow"]); +runFormatTest(import.meta, ["typescript", "flow"], { semi: false }); diff --git a/tests/format/typescript/comments-2/jsfmt.spec.js b/tests/format/typescript/comments-2/jsfmt.spec.js deleted file mode 100644 index ef508a5ba453..000000000000 --- a/tests/format/typescript/comments-2/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); -run_spec(__dirname, ["typescript", "babel", "flow"], { semi: false }); diff --git a/tests/format/typescript/comments/11662.ts b/tests/format/typescript/comments/11662.ts new file mode 100644 index 000000000000..fa08ca257873 --- /dev/null +++ b/tests/format/typescript/comments/11662.ts @@ -0,0 +1,8 @@ +foo<a> + // TEST + // 1 + // 2 + // 3 + // 4 + // 5 + `x` diff --git a/tests/format/typescript/comments/15707.ts b/tests/format/typescript/comments/15707.ts new file mode 100644 index 000000000000..98f7001f11c7 --- /dev/null +++ b/tests/format/typescript/comments/15707.ts @@ -0,0 +1,55 @@ +const { + foo, + // bar + // baz +}: Foo = expr; + +const { + foo1, + // bar + foo2, + // baz +}: Foo = expr; + +const [ + foo, + // bar + // baz +]: Foo = expr; + +const [ + foo1, + // bar + foo2, + // baz +]: Foo = expr; + +function method({ + foo, + // bar = "bar", + // bazz = "bazz", +}: Foo) {} + +function method({ + foo1, + // bar = "bar", + foo2 + // bazz = "bazz", +}: Foo) {} + +function method([ + foo, + // bar = "bar", + foo2 + // bazz = "bazz", +]: Foo) {} + +const { + // bar + // baz +}: Foo = expr; + +const [ + // bar + // baz +]: Foo = expr; diff --git a/tests/format/typescript/comments/16065-2.ts b/tests/format/typescript/comments/16065-2.ts new file mode 100644 index 000000000000..f63e84107122 --- /dev/null +++ b/tests/format/typescript/comments/16065-2.ts @@ -0,0 +1,27 @@ +class Foo { + // PropertyDefinition + @decorator + readonly /* comment */ propertyDefinition; + + // TSAbstractPropertyDefinition + @decorator + abstract /* comment */ abstractPropertyDefinition; + + // TSAbstractMethodDefinition + @decorator + abstract /* comment */ abstractMethodDefinition; + + // MethodDefinition + @decorator + private /* comment */ methodDefinition() {} + + // AccessorProperty + @decorator + accessor /* comment */ accessorProperty = 3; + + constructor( + // TSParameterProperty + @decorator + readonly /* comment */ parameterProperty, + ) {} +} diff --git a/tests/format/typescript/comments/16065.ts b/tests/format/typescript/comments/16065.ts new file mode 100644 index 000000000000..101c1278bce0 --- /dev/null +++ b/tests/format/typescript/comments/16065.ts @@ -0,0 +1,11 @@ +class Foo { + constructor( + @decorator1 + // comment1 + readonly baz1: string, + + @decorator2 + // comment2 + private baz2: string, + ) {} +} diff --git a/tests/format/typescript/comments/16207.ts b/tests/format/typescript/comments/16207.ts new file mode 100644 index 000000000000..6f9cf060a570 --- /dev/null +++ b/tests/format/typescript/comments/16207.ts @@ -0,0 +1,7 @@ +class Foo { + constructor( + @required + // comment + protected readonly myParam: string, + ) {} +} diff --git a/tests/format/typescript/comments/16889.ts b/tests/format/typescript/comments/16889.ts new file mode 100644 index 000000000000..4c166597966b --- /dev/null +++ b/tests/format/typescript/comments/16889.ts @@ -0,0 +1,71 @@ +class A { + @decorator + /** + * The method description + * + */ + async method() { + } + + @decorator/** + * The method description + * + */ + async method() { + } + + @decorator/** + * The method description + * + */ async method() { + } + + @decorator + async /* comment */ method() { + } + + @decorator /* comment */ async method() { + } + + @decorator + // line comment + async method() { + } + + @decorator // line comment + async method() { + } + + + @decorator + /* comment */ + public async method() { + } + + @decorator + /* comment */ + static async method() { + } + + @decorator + /* comment */ + protected async method() { + } + + @decorator + /* comment */ + protected async method() { + } + + @decorator + /* comment */ + * method() {} + + @decorator + * /* comment */ method() {} + + /* comment */ + abstract method():void; + +} + diff --git a/tests/format/typescript/comments/__snapshots__/format.test.js.snap b/tests/format/typescript/comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a34f2bd10f9f --- /dev/null +++ b/tests/format/typescript/comments/__snapshots__/format.test.js.snap @@ -0,0 +1,1341 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`11662.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo<a> + // TEST + // 1 + // 2 + // 3 + // 4 + // 5 + \`x\` + +=====================================output===================================== +foo<a> +// TEST +// 1 +// 2 +// 3 +// 4 +// 5 +\`x\`; + +================================================================================ +`; + +exports[`15707.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { + foo, + // bar + // baz +}: Foo = expr; + +const { + foo1, + // bar + foo2, + // baz +}: Foo = expr; + +const [ + foo, + // bar + // baz +]: Foo = expr; + +const [ + foo1, + // bar + foo2, + // baz +]: Foo = expr; + +function method({ + foo, + // bar = "bar", + // bazz = "bazz", +}: Foo) {} + +function method({ + foo1, + // bar = "bar", + foo2 + // bazz = "bazz", +}: Foo) {} + +function method([ + foo, + // bar = "bar", + foo2 + // bazz = "bazz", +]: Foo) {} + +const { + // bar + // baz +}: Foo = expr; + +const [ + // bar + // baz +]: Foo = expr; + +=====================================output===================================== +const { + foo, + // bar + // baz +}: Foo = expr; + +const { + foo1, + // bar + foo2, + // baz +}: Foo = expr; + +const [ + foo, + // bar + // baz +]: Foo = expr; + +const [ + foo1, + // bar + foo2, + // baz +]: Foo = expr; + +function method({ + foo, + // bar = "bar", + // bazz = "bazz", +}: Foo) {} + +function method({ + foo1, + // bar = "bar", + foo2, + // bazz = "bazz", +}: Foo) {} + +function method([ + foo, + // bar = "bar", + foo2, + // bazz = "bazz", +]: Foo) {} + +const { + // bar + // baz +}: Foo = expr; + +const [ + // bar + // baz +]: Foo = expr; + +================================================================================ +`; + +exports[`16065.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + constructor( + @decorator1 + // comment1 + readonly baz1: string, + + @decorator2 + // comment2 + private baz2: string, + ) {} +} + +=====================================output===================================== +class Foo { + constructor( + @decorator1 + // comment1 + readonly baz1: string, + + @decorator2 + // comment2 + private baz2: string, + ) {} +} + +================================================================================ +`; + +exports[`16065-2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + // PropertyDefinition + @decorator + readonly /* comment */ propertyDefinition; + + // TSAbstractPropertyDefinition + @decorator + abstract /* comment */ abstractPropertyDefinition; + + // TSAbstractMethodDefinition + @decorator + abstract /* comment */ abstractMethodDefinition; + + // MethodDefinition + @decorator + private /* comment */ methodDefinition() {} + + // AccessorProperty + @decorator + accessor /* comment */ accessorProperty = 3; + + constructor( + // TSParameterProperty + @decorator + readonly /* comment */ parameterProperty, + ) {} +} + +=====================================output===================================== +class Foo { + // PropertyDefinition + @decorator + readonly /* comment */ propertyDefinition; + + // TSAbstractPropertyDefinition + @decorator + abstract /* comment */ abstractPropertyDefinition; + + // TSAbstractMethodDefinition + @decorator + abstract /* comment */ abstractMethodDefinition; + + // MethodDefinition + @decorator + private /* comment */ methodDefinition() {} + + // AccessorProperty + @decorator + accessor /* comment */ accessorProperty = 3; + + constructor( + // TSParameterProperty + @decorator + readonly /* comment */ parameterProperty, + ) {} +} + +================================================================================ +`; + +exports[`16207.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + constructor( + @required + // comment + protected readonly myParam: string, + ) {} +} + +=====================================output===================================== +class Foo { + constructor( + @required + // comment + protected readonly myParam: string, + ) {} +} + +================================================================================ +`; + +exports[`16889.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + @decorator + /** + * The method description + * + */ + async method() { + } + + @decorator/** + * The method description + * + */ + async method() { + } + + @decorator/** + * The method description + * + */ async method() { + } + + @decorator + async /* comment */ method() { + } + + @decorator /* comment */ async method() { + } + + @decorator + // line comment + async method() { + } + + @decorator // line comment + async method() { + } + + + @decorator + /* comment */ + public async method() { + } + + @decorator + /* comment */ + static async method() { + } + + @decorator + /* comment */ + protected async method() { + } + + @decorator + /* comment */ + protected async method() { + } + + @decorator + /* comment */ + * method() {} + + @decorator + * /* comment */ method() {} + + /* comment */ + abstract method():void; + +} + + +=====================================output===================================== +class A { + @decorator + /** + * The method description + * + */ + async method() {} + + @decorator /** + * The method description + * + */ + async method() {} + + @decorator /** + * The method description + * + */ + async method() {} + + @decorator + async /* comment */ method() {} + + @decorator /* comment */ async method() {} + + @decorator + // line comment + async method() {} + + @decorator // line comment + async method() {} + + @decorator + /* comment */ + public async method() {} + + @decorator + /* comment */ + static async method() {} + + @decorator + /* comment */ + protected async method() {} + + @decorator + /* comment */ + protected async method() {} + + @decorator + /* comment */ + *method() {} + + @decorator + */* comment */ method() {} + + /* comment */ + abstract method(): void; +} + +================================================================================ +`; + +exports[`abstract_class.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class AbstractRule { + /** + * @deprecated + * Failures will be filtered based on \`tslint:disable\` comments by tslint. + * This method now does nothing. + */ + filterFailures() {} +} + +=====================================output===================================== +abstract class AbstractRule { + /** + * @deprecated + * Failures will be filtered based on \`tslint:disable\` comments by tslint. + * This method now does nothing. + */ + filterFailures() {} +} + +================================================================================ +`; + +exports[`abstract_methods.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class AbstractFoo { + abstract method1(/* comment */ arg: string); + abstract method2( + /* comment */ + arg: string + ); + abstract method3( + // comment + arg: string + ); +} + +=====================================output===================================== +abstract class AbstractFoo { + abstract method1(/* comment */ arg: string); + abstract method2( + /* comment */ + arg: string, + ); + abstract method3( + // comment + arg: string, + ); +} + +================================================================================ +`; + +exports[`after_jsx_generic.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let comp = ( + <> + <Component<number> /* comment1 */></Component> + <Component<number> foo /* comment2 */></Component> + <Component<number> /* comment3 */ bar></Component> + <Component<number> foo /* comment4 */ bar></Component> + + <Component<number> + // comment5 + ></Component> + <Component<number> + foo + // comment6 + ></Component> + <Component<number> + // comment7 + foo + ></Component> + <Component<number> + foo + // comment8 + bar + ></Component> + </> +); + +=====================================output===================================== +let comp = ( + <> + <Component<number> /* comment1 */></Component> + <Component<number> foo /* comment2 */></Component> + <Component<number> /* comment3 */ bar></Component> + <Component<number> foo /* comment4 */ bar></Component> + + <Component<number> + // comment5 + ></Component> + <Component<number> + foo + // comment6 + ></Component> + <Component<number> + // comment7 + foo + ></Component> + <Component<number> + foo + // comment8 + bar + ></Component> + </> +); + +================================================================================ +`; + +exports[`declare_function.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare function fn( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number; + +declare function /* foo */ f( /* baz */ a /* taz */) /* bar */; +=====================================output===================================== +declare function fn( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns +): number; + +declare function /* foo */ f(/* baz */ a /* taz */); /* bar */ + +================================================================================ +`; + +exports[`interface.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface Foo { + bar( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + new ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + foo: { + x( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + y: ( + currentRequest: {a: number}, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) => number; + } +} + +=====================================output===================================== +interface Foo { + bar( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + new ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + foo: { + x( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ): number; + + y: ( + currentRequest: { a: number }, + // TODO this is a very very very very long comment that makes it go > 80 columns + ) => number; + }; +} + +================================================================================ +`; + +exports[`issues.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Adding a comment stops the pretty printing process and everything is +// squished in a single line afterward +export type BuckWebSocketMessage = { + // Not actually from Buck - this is to let the receiver know that the socket is connected. + type: 'SocketConnected', +} | { + type: 'BuildProgressUpdated', + progressValue: number, +} | { + type: 'BuildFinished', + exitCode: number, +} | { + type: 'BuildStarted', +} | { + type: 'ParseStarted', +} | { + type: 'ParseFinished', +} | { + type: 'RunStarted', +} | { + type: 'RunComplete', +}; + +// Two extra levels of indentation because of the comment +export type AsyncExecuteOptions = child_process$execFileOpts & { + // The contents to write to stdin. + stdin?: string, + dontLogInNuclide?: boolean, +}; + +=====================================output===================================== +// Adding a comment stops the pretty printing process and everything is +// squished in a single line afterward +export type BuckWebSocketMessage = + | { + // Not actually from Buck - this is to let the receiver know that the socket is connected. + type: "SocketConnected"; + } + | { + type: "BuildProgressUpdated"; + progressValue: number; + } + | { + type: "BuildFinished"; + exitCode: number; + } + | { + type: "BuildStarted"; + } + | { + type: "ParseStarted"; + } + | { + type: "ParseFinished"; + } + | { + type: "RunStarted"; + } + | { + type: "RunComplete"; + }; + +// Two extra levels of indentation because of the comment +export type AsyncExecuteOptions = child_process$execFileOpts & { + // The contents to write to stdin. + stdin?: string; + dontLogInNuclide?: boolean; +}; + +================================================================================ +`; + +exports[`jsx.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var example1 = <div> + https://test +</div>; + +var example2 = <div> + /*test*/ +</div>; + +=====================================output===================================== +var example1 = <div>https://test</div>; + +var example2 = <div>/*test*/</div>; + +================================================================================ +`; + +exports[`location.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function x({ + x, + y, +}: { + // Hello world. + x: string, + // Yoyo. + y: string, +}) {} + +export interface ApplicationEventData { + registerBroadcastReceiver(onReceiveCallback: ( + context: any /* android.content.Context */, + intent: any /* android.content.Intent */ + ) => void): void; +} + +export type WrappedFormUtils = { + getFieldDecorator(id: string, options?: { + /** 子节点的值的属性,如 Checkbox 的是 'checked' */ + valuePropName?: string; + /** 子节点的初始值,类型、可选值均由子节点决定 */ + initialValue?: any; + /** 收集子节点的值的时机 */ + trigger?: string; + /** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */ + getValueFromEvent?: (...args: any[]) => any; + /** 校验子节点值的时机 */ + validateTrigger?: string | string[]; + /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ + rules?: ValidationRule[]; + /** 是否和其他控件互斥,特别用于 Radio 单选控件 */ + exclusive?: boolean; + }): (node: React.ReactNode) => React.ReactNode; +}; + +=====================================output===================================== +function x({ + x, + y, +}: { + // Hello world. + x: string; + // Yoyo. + y: string; +}) {} + +export interface ApplicationEventData { + registerBroadcastReceiver( + onReceiveCallback: ( + context: any /* android.content.Context */, + intent: any /* android.content.Intent */, + ) => void, + ): void; +} + +export type WrappedFormUtils = { + getFieldDecorator( + id: string, + options?: { + /** 子节点的值的属性,如 Checkbox 的是 'checked' */ + valuePropName?: string; + /** 子节点的初始值,类型、可选值均由子节点决定 */ + initialValue?: any; + /** 收集子节点的值的时机 */ + trigger?: string; + /** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */ + getValueFromEvent?: (...args: any[]) => any; + /** 校验子节点值的时机 */ + validateTrigger?: string | string[]; + /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ + rules?: ValidationRule[]; + /** 是否和其他控件互斥,特别用于 Radio 单选控件 */ + exclusive?: boolean; + }, + ): (node: React.ReactNode) => React.ReactNode; +}; + +================================================================================ +`; + +exports[`mapped_types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = { + // commentA + [a in A]: string; +} + +type B = { + /* commentB */ [b in B]: string +} + +type C = { + [/* commentC */ c in C]: string +} + +type D = { + [d /* commentD */ in D]: string +} + +type E = { + [e in /* commentE */ E]: string +} + +type F = { + [f in F /* commentF */]: string +} + +type G = { + [g in G] /* commentG */: string +} + +type H = { /* commentH */ [h in H]: string } + +type I = { [/* commentI */ i in I]: string } + +type J = { [j /* commentJ */ in J]: string } + +type K = { [k in /* commentK */ K]: string } + +type L = { [l in L /* commentL */]: string } + +type M = { [m in M] /* commentG */: string } + +// https://github.com/excalidraw/excalidraw/blob/712f2675195ace8d507f563ec4306efe319b3c84/packages/common/src/utility-types.ts#L61-L64 +type MakeBrand<T extends string> = { + /** @private using ~ to sort last in intellisense */ + [K in \`~brand~\${T}\`]: T; +}; + +=====================================output===================================== +type A = { + // commentA + [a in A]: string; +}; + +type B = { + /* commentB */ + [b in B]: string; +}; + +type C = { + [/* commentC */ c in C]: string; +}; + +type D = { + [d /* commentD */ in D]: string; +}; + +type E = { + [e in /* commentE */ E]: string; +}; + +type F = { + [f in F /* commentF */]: string; +}; + +type G = { + [g in G /* commentG */]: string; +}; + +type H = { [/* commentH */ h in H]: string }; + +type I = { [/* commentI */ i in I]: string }; + +type J = { [j /* commentJ */ in J]: string }; + +type K = { [k in /* commentK */ K]: string }; + +type L = { [l in L /* commentL */]: string }; + +type M = { [m in M /* commentG */]: string }; + +// https://github.com/excalidraw/excalidraw/blob/712f2675195ace8d507f563ec4306efe319b3c84/packages/common/src/utility-types.ts#L61-L64 +type MakeBrand<T extends string> = { + /** @private using ~ to sort last in intellisense */ + [K in \`~brand~\${T}\`]: T; +}; + +================================================================================ +`; + +exports[`method_types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface foo1 { + bar3/* foo */ (/* baz */) // bat + bar/* foo */ ? /* bar */ (/* baz */) /* bat */; + bar2/* foo */ (/* baz */) /* bat */ +} + +interface foo2 { + bar/* foo */ ? /* bar */ (bar: /* baz */ string): /* bat */ string; +} + +interface foo3 { + /* foo */ (/* bar */): /* baz */ string; +} + +interface foo4 { + /* foo */ (bar: /* bar */ string): /* baz */ string; +} + +interface foo5 { + /* foo */ new /* bar */ (a: /* baz */ string): /* bat */ string +} + +interface foo6 { + /* foo */ new /* bar */ (/* baz */): /* bat */ string +} + +type foo7 = /* foo */ (/* bar */) /* baz */ => void + +type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void + +let foo9: new /* foo */ (/* bar */) /* baz */ => string; + +let foo10: new /* foo */ (a: /* bar */ string) /* baz */ => string; + +abstract class Test { + abstract foo12 /* foo */ (a: /* bar */ string): /* baz */ void + + abstract foo13 /* foo */ (/* bar */) /* baz */ +} + +=====================================output===================================== +interface foo1 { + bar3 /* foo */(/* baz */); // bat + bar /* foo */ /* bar */?(/* baz */) /* bat */; + bar2 /* foo */(/* baz */) /* bat */; +} + +interface foo2 { + bar /* foo */?(/* bar */ bar: /* baz */ string): /* bat */ string; +} + +interface foo3 { + /* foo */ (/* bar */): /* baz */ string; +} + +interface foo4 { + /* foo */ (bar: /* bar */ string): /* baz */ string; +} + +interface foo5 { + /* foo */ new (/* bar */ a: /* baz */ string): /* bat */ string; +} + +interface foo6 { + /* foo */ new (/* baz */) /* bar */ : /* bat */ string; +} + +type foo7 = /* foo */ (/* bar */) /* baz */ => void; + +type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void; + +let foo9: new (/* bar */) /* foo */ /* baz */ => string; + +let foo10: new (/* foo */ a: /* bar */ string) /* baz */ => string; + +abstract class Test { + abstract foo12 /* foo */(a: /* bar */ string): /* baz */ void; + + abstract foo13 /* foo */(/* bar */); /* baz */ +} + +================================================================================ +`; + +exports[`methods.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class Point { +/** + * Does something. + */ + foo() {} + + /** + * Does something else. + */ + bar() {} + + /** + * Does + * something + * much + * better + * than + * the + * rest. + */ + baz() {} + + /** + * Buzz-Fizz. + * Note: This is indented too far. + */ + fizzBuzz() {} + + /** + * Turns the given string into pig-latin. + */ + pigLatinize(value: string) { +/** + * This is a block comment inside of a method. + */ + } + + /** + * One + * Two + * Three +* Four + */ + mismatchedIndentation() {} + + inline /* foo*/ (/* bar */) /* baz */ {} + + noBody(/* comment */ arg); +} + +=====================================output===================================== +export class Point { + /** + * Does something. + */ + foo() {} + + /** + * Does something else. + */ + bar() {} + + /** + * Does + * something + * much + * better + * than + * the + * rest. + */ + baz() {} + + /** + * Buzz-Fizz. + * Note: This is indented too far. + */ + fizzBuzz() {} + + /** + * Turns the given string into pig-latin. + */ + pigLatinize(value: string) { + /** + * This is a block comment inside of a method. + */ + } + + /** + * One + * Two + * Three + * Four + */ + mismatchedIndentation() {} + + inline /* foo*/(/* bar */) /* baz */ {} + + noBody(/* comment */ arg); +} + +================================================================================ +`; + +exports[`ts-parameter-proerty.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + constructor( + private readonly paramProp: Type, + // comment + ) { + } +} + +=====================================output===================================== +class A { + constructor( + private readonly paramProp: Type, + // comment + ) {} +} + +================================================================================ +`; + +exports[`type_literals.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Props1 = // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! +{ + isPlaying: boolean, +}; + +type Props2 = { // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! + isPlaying: boolean +}; + +type Props3 = { + // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! + isPlaying: boolean +}; + +=====================================output===================================== +type Props1 = + // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! + { + isPlaying: boolean; + }; + +type Props2 = { + // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! + isPlaying: boolean; +}; + +type Props3 = { + // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! + isPlaying: boolean; +}; + +================================================================================ +`; + +exports[`type-parameters.ts [oxc-ts] format 1`] = ` +"Type parameter list cannot be empty. (4:13) + 2 | const a: T</* comment */> = 1; + 3 | functionName</* comment */>(); +> 4 | function foo</* comment */>() {} + | ^^^^^^^^^^^^^^^ + 5 | interface Foo { + 6 | </* comment */>(arg): any; + 7 | }" +`; + +exports[`type-parameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +functionName<A /* A comment */>(); +const a: T</* comment */> = 1; +functionName</* comment */>(); +function foo</* comment */>() {} +interface Foo { + </* comment */>(arg): any; +} +type T = </* comment */>(arg) => any; + +functionName< + A // comment +>(); +const a: T< + // comment +> = 1; +functionName< + // comment +>(); +function foo< + // comment +>() {} +interface Foo { + < + A// comment + >(arg): any; +} +type T = < + // comment +>(arg) => any; + +=====================================output===================================== +functionName<A /* A comment */>(); +const a: T</* comment */> = 1; +functionName</* comment */>(); +function foo</* comment */>() {} +interface Foo { + </* comment */>(arg): any; +} +type T = </* comment */>(arg) => any; + +functionName<A>(); // comment +const a: T< + // comment +> = 1; +functionName< + // comment +>(); +function foo< + // comment +>() {} +interface Foo { + < + A, // comment + >( + arg, + ): any; +} +type T = < + // comment +>( + arg, +) => any; + +================================================================================ +`; + +exports[`types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(() => { + // swallow error and fallback to using directory as path +}) as string[]; + +=====================================output===================================== +(() => { + // swallow error and fallback to using directory as path +}) as string[]; + +================================================================================ +`; + +exports[`union.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type UploadState<E, EM, D> + // The upload hasnt begun yet + = {type: "Not_begun"} + // The upload timed out + | {type: "Timed_out"} + // Failed somewhere on the line + | {type: "Failed", error: E, errorMsg: EM} + // Uploading to aws3 and CreatePostMutation succeeded + | {type: "Success", data: D}; + +type UploadState2<E, EM, D> + // The upload hasnt begun yet + = A + // The upload timed out + | B + // Failed somewhere on the line + | C + // Uploading to aws3 and CreatePostMutation succeeded + | D; + +=====================================output===================================== +type UploadState<E, EM, D> = + // The upload hasnt begun yet + | { type: "Not_begun" } + // The upload timed out + | { type: "Timed_out" } + // Failed somewhere on the line + | { type: "Failed"; error: E; errorMsg: EM } + // Uploading to aws3 and CreatePostMutation succeeded + | { type: "Success"; data: D }; + +type UploadState2<E, EM, D> = + // The upload hasnt begun yet + | A + // The upload timed out + | B + // Failed somewhere on the line + | C + // Uploading to aws3 and CreatePostMutation succeeded + | D; + +================================================================================ +`; diff --git a/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index c253fd68732b..000000000000 --- a/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,875 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract_class.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class AbstractRule { - /** - * @deprecated - * Failures will be filtered based on \`tslint:disable\` comments by tslint. - * This method now does nothing. - */ - filterFailures() {} -} - -=====================================output===================================== -abstract class AbstractRule { - /** - * @deprecated - * Failures will be filtered based on \`tslint:disable\` comments by tslint. - * This method now does nothing. - */ - filterFailures() {} -} - -================================================================================ -`; - -exports[`abstract_methods.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class AbstractFoo { - abstract method1(/* comment */ arg: string); - abstract method2( - /* comment */ - arg: string - ); - abstract method3( - // comment - arg: string - ); -} - -=====================================output===================================== -abstract class AbstractFoo { - abstract method1(/* comment */ arg: string); - abstract method2( - /* comment */ - arg: string - ); - abstract method3( - // comment - arg: string - ); -} - -================================================================================ -`; - -exports[`after_jsx_generic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let comp = ( - <> - <Component<number> /* comment1 */></Component> - <Component<number> foo /* comment2 */></Component> - <Component<number> /* comment3 */ bar></Component> - <Component<number> foo /* comment4 */ bar></Component> - - <Component<number> - // comment5 - ></Component> - <Component<number> - foo - // comment6 - ></Component> - <Component<number> - // comment7 - foo - ></Component> - <Component<number> - foo - // comment8 - bar - ></Component> - </> -); - -=====================================output===================================== -let comp = ( - <> - <Component<number> /* comment1 */></Component> - <Component<number> foo /* comment2 */></Component> - <Component<number> /* comment3 */ bar></Component> - <Component<number> foo /* comment4 */ bar></Component> - - <Component<number> - // comment5 - ></Component> - <Component<number> - foo - // comment6 - ></Component> - <Component<number> - // comment7 - foo - ></Component> - <Component<number> - foo - // comment8 - bar - ></Component> - </> -); - -================================================================================ -`; - -exports[`declare_function.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare function fn( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -): number; - -declare function /* foo */ f( /* baz */ a /* taz */) /* bar */; -=====================================output===================================== -declare function fn( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -): number; - -declare function /* foo */ f(/* baz */ a /* taz */); /* bar */ - -================================================================================ -`; - -exports[`interface.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Foo { - bar( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - new ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - foo: { - x( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - y: ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns - ) => number; - } -} - -=====================================output===================================== -interface Foo { - bar( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - new ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - foo: { - x( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ): number; - - y: ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns - ) => number; - }; -} - -================================================================================ -`; - -exports[`issues.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Adding a comment stops the pretty printing process and everything is -// squished in a single line afterward -export type BuckWebSocketMessage = { - // Not actually from Buck - this is to let the receiver know that the socket is connected. - type: 'SocketConnected', -} | { - type: 'BuildProgressUpdated', - progressValue: number, -} | { - type: 'BuildFinished', - exitCode: number, -} | { - type: 'BuildStarted', -} | { - type: 'ParseStarted', -} | { - type: 'ParseFinished', -} | { - type: 'RunStarted', -} | { - type: 'RunComplete', -}; - -// Two extra levels of indentation because of the comment -export type AsyncExecuteOptions = child_process$execFileOpts & { - // The contents to write to stdin. - stdin?: string, - dontLogInNuclide?: boolean, -}; - -=====================================output===================================== -// Adding a comment stops the pretty printing process and everything is -// squished in a single line afterward -export type BuckWebSocketMessage = - | { - // Not actually from Buck - this is to let the receiver know that the socket is connected. - type: "SocketConnected"; - } - | { - type: "BuildProgressUpdated"; - progressValue: number; - } - | { - type: "BuildFinished"; - exitCode: number; - } - | { - type: "BuildStarted"; - } - | { - type: "ParseStarted"; - } - | { - type: "ParseFinished"; - } - | { - type: "RunStarted"; - } - | { - type: "RunComplete"; - }; - -// Two extra levels of indentation because of the comment -export type AsyncExecuteOptions = child_process$execFileOpts & { - // The contents to write to stdin. - stdin?: string; - dontLogInNuclide?: boolean; -}; - -================================================================================ -`; - -exports[`jsx.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var example1 = <div> - https://test -</div>; - -var example2 = <div> - /*test*/ -</div>; - -=====================================output===================================== -var example1 = <div>https://test</div>; - -var example2 = <div>/*test*/</div>; - -================================================================================ -`; - -exports[`location.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function x({ - x, - y, -}: { - // Hello world. - x: string, - // Yoyo. - y: string, -}) {} - -export interface ApplicationEventData { - registerBroadcastReceiver(onReceiveCallback: ( - context: any /* android.content.Context */, - intent: any /* android.content.Intent */ - ) => void): void; -} - -export type WrappedFormUtils = { - getFieldDecorator(id: string, options?: { - /** 子节点的值的属性,如 Checkbox 的是 'checked' */ - valuePropName?: string; - /** 子节点的初始值,类型、可选值均由子节点决定 */ - initialValue?: any; - /** 收集子节点的值的时机 */ - trigger?: string; - /** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */ - getValueFromEvent?: (...args: any[]) => any; - /** 校验子节点值的时机 */ - validateTrigger?: string | string[]; - /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ - rules?: ValidationRule[]; - /** 是否和其他控件互斥,特别用于 Radio 单选控件 */ - exclusive?: boolean; - }): (node: React.ReactNode) => React.ReactNode; -}; - -=====================================output===================================== -function x({ - x, - y, -}: { - // Hello world. - x: string; - // Yoyo. - y: string; -}) {} - -export interface ApplicationEventData { - registerBroadcastReceiver( - onReceiveCallback: ( - context: any /* android.content.Context */, - intent: any /* android.content.Intent */ - ) => void - ): void; -} - -export type WrappedFormUtils = { - getFieldDecorator( - id: string, - options?: { - /** 子节点的值的属性,如 Checkbox 的是 'checked' */ - valuePropName?: string; - /** 子节点的初始值,类型、可选值均由子节点决定 */ - initialValue?: any; - /** 收集子节点的值的时机 */ - trigger?: string; - /** 可以把 onChange 的参数转化为控件的值,例如 DatePicker 可设为:(date, dateString) => dateString */ - getValueFromEvent?: (...args: any[]) => any; - /** 校验子节点值的时机 */ - validateTrigger?: string | string[]; - /** 校验规则,参见 [async-validator](https://github.com/yiminghe/async-validator) */ - rules?: ValidationRule[]; - /** 是否和其他控件互斥,特别用于 Radio 单选控件 */ - exclusive?: boolean; - } - ): (node: React.ReactNode) => React.ReactNode; -}; - -================================================================================ -`; - -exports[`mapped_types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A = { - // commentA - [a in A]: string; -} - -type B = { - /* commentB */ [b in B]: string -} - -type C = { - [/* commentC */ c in C]: string -} - -type D = { - [d /* commentD */ in D]: string -} - -type E = { - [e in /* commentE */ E]: string -} - -type F = { - [f in F /* commentF */]: string -} - -type G = { - [g in G] /* commentG */: string -} - -type H = { /* commentH */ [h in H]: string } - -type I = { [/* commentI */ i in I]: string } - -type J = { [j /* commentJ */ in J]: string } - -type K = { [k in /* commentK */ K]: string } - -type L = { [l in L /* commentL */]: string } - -type M = { [m in M] /* commentG */: string } - -=====================================output===================================== -type A = { - // commentA - [a in A]: string; -}; - -type B = { - /* commentB */ [b in B]: string; -}; - -type C = { - [/* commentC */ c in C]: string; -}; - -type D = { - [d /* commentD */ in D]: string; -}; - -type E = { - [e in /* commentE */ E]: string; -}; - -type F = { - [f in F /* commentF */]: string; -}; - -type G = { - [g in G /* commentG */]: string; -}; - -type H = { [/* commentH */ h in H]: string }; - -type I = { [/* commentI */ i in I]: string }; - -type J = { [j /* commentJ */ in J]: string }; - -type K = { [k in /* commentK */ K]: string }; - -type L = { [l in L /* commentL */]: string }; - -type M = { [m in M /* commentG */]: string }; - -================================================================================ -`; - -exports[`method_types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface foo1 { - bar3/* foo */ (/* baz */) // bat - bar/* foo */ ? /* bar */ (/* baz */) /* bat */; - bar2/* foo */ (/* baz */) /* bat */ -} - -interface foo2 { - bar/* foo */ ? /* bar */ (bar: /* baz */ string): /* bat */ string; -} - -interface foo3 { - /* foo */ (/* bar */): /* baz */ string; -} - -interface foo4 { - /* foo */ (bar: /* bar */ string): /* baz */ string; -} - -interface foo5 { - /* foo */ new /* bar */ (a: /* baz */ string): /* bat */ string -} - -interface foo6 { - /* foo */ new /* bar */ (/* baz */): /* bat */ string -} - -type foo7 = /* foo */ (/* bar */) /* baz */ => void - -type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void - -let foo9: new /* foo */ (/* bar */) /* baz */ => string; - -let foo10: new /* foo */ (a: /* bar */ string) /* baz */ => string; - -abstract class Test { - abstract foo12 /* foo */ (a: /* bar */ string): /* baz */ void - - abstract foo13 /* foo */ (/* bar */) /* baz */ -} - -=====================================output===================================== -interface foo1 { - bar3 /* foo */(/* baz */); // bat - bar /* foo */ /* bar */?(/* baz */) /* bat */; - bar2 /* foo */(/* baz */) /* bat */; -} - -interface foo2 { - bar /* foo */?(/* bar */ bar: /* baz */ string): /* bat */ string; -} - -interface foo3 { - /* foo */ (/* bar */): /* baz */ string; -} - -interface foo4 { - /* foo */ (bar: /* bar */ string): /* baz */ string; -} - -interface foo5 { - /* foo */ new (/* bar */ a: /* baz */ string): /* bat */ string; -} - -interface foo6 { - /* foo */ new (/* baz */): /* bar */ /* bat */ string; -} - -type foo7 = /* foo */ (/* bar */) => /* baz */ void; - -type foo8 = /* foo */ (a: /* bar */ string) => /* baz */ void; - -let foo9: new (/* bar */) => /* foo */ /* baz */ string; - -let foo10: new (/* foo */ a: /* bar */ string) => /* baz */ string; - -abstract class Test { - abstract foo12 /* foo */(a: /* bar */ string): /* baz */ void; - - abstract foo13 /* foo */(/* bar */); /* baz */ -} - -================================================================================ -`; - -exports[`methods.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class Point { -/** - * Does something. - */ - foo() {} - - /** - * Does something else. - */ - bar() {} - - /** - * Does - * something - * much - * better - * than - * the - * rest. - */ - baz() {} - - /** - * Buzz-Fizz. - * Note: This is indented too far. - */ - fizzBuzz() {} - - /** - * Turns the given string into pig-latin. - */ - pigLatinize(value: string) { -/** - * This is a block comment inside of a method. - */ - } - - /** - * One - * Two - * Three -* Four - */ - mismatchedIndentation() {} - - inline /* foo*/ (/* bar */) /* baz */ {} - - noBody(/* comment */ arg); -} - -=====================================output===================================== -export class Point { - /** - * Does something. - */ - foo() {} - - /** - * Does something else. - */ - bar() {} - - /** - * Does - * something - * much - * better - * than - * the - * rest. - */ - baz() {} - - /** - * Buzz-Fizz. - * Note: This is indented too far. - */ - fizzBuzz() {} - - /** - * Turns the given string into pig-latin. - */ - pigLatinize(value: string) { - /** - * This is a block comment inside of a method. - */ - } - - /** - * One - * Two - * Three - * Four - */ - mismatchedIndentation() {} - - inline /* foo*/(/* bar */) /* baz */ {} - - noBody(/* comment */ arg); -} - -================================================================================ -`; - -exports[`type_literals.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Props1 = // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! -{ - isPlaying: boolean, -}; - -type Props2 = { // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean -}; - -type Props3 = { - // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean -}; - -=====================================output===================================== -type Props1 = - // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - { - isPlaying: boolean; - }; - -type Props2 = { - // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean; -}; - -type Props3 = { - // (DispatchProps & StateProps); WHY DON'T YOU WORK FLOW!!!!!!!!! - isPlaying: boolean; -}; - -================================================================================ -`; - -exports[`type-parameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -functionName<A /* A comment */>(); -const a: T</* comment */> = 1; -functionName</* comment */>(); -function foo</* comment */>() {} -interface Foo { - </* comment */>(arg): any; -} -type T = </* comment */>(arg) => any; - -functionName< - A // comment ->(); -const a: T< - // comment -> = 1; -functionName< - // comment ->(); -function foo< - // comment ->() {} -interface Foo { - < - A// comment - >(arg): any; -} -type T = < - // comment ->(arg) => any; - -=====================================output===================================== -functionName<A /* A comment */>(); -const a: T</* comment */> = 1; -functionName</* comment */>(); -function foo</* comment */>() {} -interface Foo { - </* comment */>(arg): any; -} -type T = </* comment */>(arg) => any; - -functionName<A>(); // comment -const a: T< - // comment -> = 1; -functionName< - // comment ->(); -function foo< - // comment ->() {} -interface Foo { - < - A // comment - >( - arg - ): any; -} -type T = < - // comment ->( - arg -) => any; - -================================================================================ -`; - -exports[`types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(() => { - // swallow error and fallback to using directory as path -}) as string[]; - -=====================================output===================================== -(() => { - // swallow error and fallback to using directory as path -}) as string[]; - -================================================================================ -`; - -exports[`union.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type UploadState<E, EM, D> - // The upload hasnt begun yet - = {type: "Not_begun"} - // The upload timed out - | {type: "Timed_out"} - // Failed somewhere on the line - | {type: "Failed", error: E, errorMsg: EM} - // Uploading to aws3 and CreatePostMutation succeeded - | {type: "Success", data: D}; - -type UploadState2<E, EM, D> - // The upload hasnt begun yet - = A - // The upload timed out - | B - // Failed somewhere on the line - | C - // Uploading to aws3 and CreatePostMutation succeeded - | D; - -=====================================output===================================== -type UploadState<E, EM, D> = - // The upload hasnt begun yet - | { type: "Not_begun" } - // The upload timed out - | { type: "Timed_out" } - // Failed somewhere on the line - | { type: "Failed"; error: E; errorMsg: EM } - // Uploading to aws3 and CreatePostMutation succeeded - | { type: "Success"; data: D }; - -type UploadState2<E, EM, D> = - // The upload hasnt begun yet - | A - // The upload timed out - | B - // Failed somewhere on the line - | C - // Uploading to aws3 and CreatePostMutation succeeded - | D; - -================================================================================ -`; diff --git a/tests/format/typescript/comments/after_jsx_generic.ts b/tests/format/typescript/comments/after_jsx_generic.tsx similarity index 100% rename from tests/format/typescript/comments/after_jsx_generic.ts rename to tests/format/typescript/comments/after_jsx_generic.tsx diff --git a/tests/format/typescript/comments/format.test.js b/tests/format/typescript/comments/format.test.js new file mode 100644 index 000000000000..f9781cc8be13 --- /dev/null +++ b/tests/format/typescript/comments/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { "oxc-ts": ["type-parameters.ts"] }, +}); diff --git a/tests/format/typescript/comments/jsfmt.spec.js b/tests/format/typescript/comments/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/comments/jsx.ts b/tests/format/typescript/comments/jsx.tsx similarity index 100% rename from tests/format/typescript/comments/jsx.ts rename to tests/format/typescript/comments/jsx.tsx diff --git a/tests/format/typescript/comments/mapped_types.ts b/tests/format/typescript/comments/mapped_types.ts index e9839c50d535..6d058cf0fdf8 100644 --- a/tests/format/typescript/comments/mapped_types.ts +++ b/tests/format/typescript/comments/mapped_types.ts @@ -38,3 +38,9 @@ type K = { [k in /* commentK */ K]: string } type L = { [l in L /* commentL */]: string } type M = { [m in M] /* commentG */: string } + +// https://github.com/excalidraw/excalidraw/blob/712f2675195ace8d507f563ec4306efe319b3c84/packages/common/src/utility-types.ts#L61-L64 +type MakeBrand<T extends string> = { + /** @private using ~ to sort last in intellisense */ + [K in `~brand~${T}`]: T; +}; diff --git a/tests/format/typescript/comments/ts-parameter-proerty.ts b/tests/format/typescript/comments/ts-parameter-proerty.ts new file mode 100644 index 000000000000..84cf85cc8d6c --- /dev/null +++ b/tests/format/typescript/comments/ts-parameter-proerty.ts @@ -0,0 +1,7 @@ +class A { + constructor( + private readonly paramProp: Type, + // comment + ) { + } +} diff --git a/tests/format/typescript/compiler/__snapshots__/format.test.js.snap b/tests/format/typescript/compiler/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c8d98915fcea --- /dev/null +++ b/tests/format/typescript/compiler/__snapshots__/format.test.js.snap @@ -0,0 +1,890 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ClassDeclaration22.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + "foo"(); + "bar"() { } +} + +=====================================output===================================== +class C { + foo(); + bar() {} +} + +================================================================================ +`; + +exports[`anyIsAssignableToObject.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface P { + p: {}; +} + +interface Q extends P { // Check assignability here. Any is assignable to {} + p: any; +} + +=====================================output===================================== +interface P { + p: {}; +} + +interface Q extends P { + // Check assignability here. Any is assignable to {} + p: any; +} + +================================================================================ +`; + +exports[`castOfAwait.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @target: es6 +async function f() { + <number> await 0; + typeof await 0; + void await 0; + await void <string> typeof <number> void await 0; + await await 0; +} + +=====================================output===================================== +// @target: es6 +async function f() { + <number>await 0; + typeof (await 0); + void (await 0); + await void (<string>typeof (<number>void (await 0))); + await await 0; +} + +================================================================================ +`; + +exports[`castParentheses.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class a { + static b: any; +} + +var b = (<any>a); +var b = (<any>a).b; +var b = (<any>a.b).c; +var b = (<any>a.b()).c; +var b = (<any>new a); +var b = (<any>new a.b); +var b = (<any>new a).b + +=====================================output===================================== +class a { + static b: any; +} + +var b = <any>a; +var b = (<any>a).b; +var b = (<any>a.b).c; +var b = (<any>a.b()).c; +var b = <any>new a(); +var b = <any>new a.b(); +var b = (<any>new a()).b; + +================================================================================ +`; + +exports[`castTest.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +var x : any = 0; +var z = <number> x; +var y = x + z; + +var a = <any>0; +var b = <boolean>true; +var s = <string>""; + +var ar = <any[]>null; + +var f = <(res : number) => void>null; + +declare class Point +{ + x: number; + y: number; + add(dx: number, dy: number): Point; + mult(p: Point): Point; + constructor(x: number, y: number); +} + +var p_cast = <Point> ({ + x: 0, + y: 0, + add: function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + }, + mult: function(p) { return p; } +}) + +=====================================output===================================== +var x: any = 0; +var z = <number>x; +var y = x + z; + +var a = <any>0; +var b = <boolean>true; +var s = <string>""; + +var ar = <any[]>null; + +var f = <(res: number) => void>null; + +declare class Point { + x: number; + y: number; + add(dx: number, dy: number): Point; + mult(p: Point): Point; + constructor(x: number, y: number); +} + +var p_cast = <Point>{ + x: 0, + y: 0, + add: function (dx, dy) { + return new Point(this.x + dx, this.y + dy); + }, + mult: function (p) { + return p; + }, +}; + +================================================================================ +`; + +exports[`checkInfiniteExpansionTermination.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Regression test for #1002 +// Before fix this code would cause infinite loop + +interface IObservable<T> { + n: IObservable<T[]>; // Needed, must be T[] +} + +// Needed +interface ISubject<T> extends IObservable<T> { } + +interface Foo { x } +interface Bar { y } + +var values: IObservable<Foo>; +var values2: ISubject<Bar>; +values = values2; + +=====================================output===================================== +// Regression test for #1002 +// Before fix this code would cause infinite loop + +interface IObservable<T> { + n: IObservable<T[]>; // Needed, must be T[] +} + +// Needed +interface ISubject<T> extends IObservable<T> {} + +interface Foo { + x; +} +interface Bar { + y; +} + +var values: IObservable<Foo>; +var values2: ISubject<Bar>; +values = values2; + +================================================================================ +`; + +exports[`commentInNamespaceDeclarationWithIdentifierPathName.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +namespace hello.hi.world +{ + function foo() {} +} + +=====================================output===================================== +namespace hello.hi.world { + function foo() {} +} + +================================================================================ +`; + +exports[`commentsInterface.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface i2 { + foo: (/**param help*/b: number) => string; +} + +=====================================output===================================== +interface i2 { + foo: (/**param help*/ b: number) => string; +} + +================================================================================ +`; + +exports[`contextualSignatureInstantiation2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// dot f g x = f(g(x)) +var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S; +dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)); +var id: <T>(x:T) => T; +var r23 = dot(id)(id); +=====================================output===================================== +// dot f g x = f(g(x)) +var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S; +dot = + <T, S>(f: (_: T) => S) => + <U>(g: (_: U) => T): ((r: U) => S) => + (x) => + f(g(x)); +var id: <T>(x: T) => T; +var r23 = dot(id)(id); + +================================================================================ +`; + +exports[`declareDottedModuleName.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @declaration: true +module M { + module P.Q { } // This shouldnt be emitted +} + +module M { + export module R.S { } //This should be emitted +} + +module T.U { // This needs to be emitted +} +=====================================output===================================== +// @declaration: true +module M { + module P.Q {} // This shouldnt be emitted +} + +module M { + export module R.S {} //This should be emitted +} + +module T.U { + // This needs to be emitted +} + +================================================================================ +`; + +exports[`decrementAndIncrementOperators.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var x = 0; + +x++; +x--; + +++x; +--x; + +(x)++; +--(x); + +((x))++; +((x))--; + +x[x++]++; + +=====================================output===================================== +var x = 0; + +x++; +x--; + +++x; +--x; + +x++; +--x; + +x++; +x--; + +x[x++]++; + +================================================================================ +`; + +exports[`es5ExportDefaultClassDeclaration4.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @target: es5 +// @module: commonjs +// @declaration: true + +declare module "foo" { + export var before: C; + + export default class C { + method(): C; + } + + export var after: C; + + export var t: typeof C; +} + + +=====================================output===================================== +// @target: es5 +// @module: commonjs +// @declaration: true + +declare module "foo" { + export var before: C; + + export default class C { + method(): C; + } + + export var after: C; + + export var t: typeof C; +} + +================================================================================ +`; + +exports[`functionOverloadsOnGenericArity1.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// overloading on arity not allowed +interface C { + f<T>(): string; + f<T, U>(): string; + + <T>(): string; + <T, U>(): string; + + new <T>(): string; + new <T, U>(): string; +} + +=====================================output===================================== +// overloading on arity not allowed +interface C { + f<T>(): string; + f<T, U>(): string; + + <T>(): string; + <T, U>(): string; + + new <T>(): string; + new <T, U>(): string; +} + +================================================================================ +`; + +exports[`globalIsContextualKeyword.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a() { + let global = 1; +} +function b() { + class global {} +} + +namespace global { +} + +function foo(global: number) { +} + +let obj = { + global: "123" +} +=====================================output===================================== +function a() { + let global = 1; +} +function b() { + class global {} +} + +namespace global {} + +function foo(global: number) {} + +let obj = { + global: "123", +}; + +================================================================================ +`; + +exports[`indexSignatureWithInitializer.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// These used to be indexers, now they are computed properties +interface I { + [x = '']: string; +} + +class C { + [x = 0]: string +} +=====================================output===================================== +// These used to be indexers, now they are computed properties +interface I { + [x = ""]: string; +} + +class C { + [(x = 0)]: string; +} + +================================================================================ +`; + +exports[`mappedTypeWithCombinedTypeMappers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Repro from #13351 + +type Meta<T, A> = { + [P in keyof T]: { + value: T[P]; + also: A; + readonly children: Meta<T[P], A>; + }; +} + +interface Input { + x: string; + y: number; +} + +declare const output: Meta<Input, boolean>; + +const shouldFail: { important: boolean } = output.x.children; + +=====================================output===================================== +// Repro from #13351 + +type Meta<T, A> = { + [P in keyof T]: { + value: T[P]; + also: A; + readonly children: Meta<T[P], A>; + }; +}; + +interface Input { + x: string; + y: number; +} + +declare const output: Meta<Input, boolean>; + +const shouldFail: { important: boolean } = output.x.children; + +================================================================================ +`; + +exports[`modifiersOnInterfaceIndexSignature1.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface I { + [a: string]: number; +} + +=====================================output===================================== +interface I { + [a: string]: number; +} + +================================================================================ +`; + +exports[`privacyGloImport.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +//@declaration: true +module m1 { + export module m1_M1_public { + export class c1 { + } + export function f1() { + return new c1; + } + export var v1 = c1; + export var v2: c1; + } + + module m1_M2_private { + export class c1 { + } + export function f1() { + return new c1; + } + export var v1 = c1; + export var v2: c1; + } + + //export declare module "m1_M3_public" { + // export function f1(); + // export class c1 { + // } + // export var v1: { new (): c1; }; + // export var v2: c1; + //} + + //declare module "m1_M4_private" { + // export function f1(); + // export class c1 { + // } + // export var v1: { new (): c1; }; + // export var v2: c1; + //} + + import m1_im1_private = m1_M1_public; + export var m1_im1_private_v1_public = m1_im1_private.c1; + export var m1_im1_private_v2_public = new m1_im1_private.c1(); + export var m1_im1_private_v3_public = m1_im1_private.f1; + export var m1_im1_private_v4_public = m1_im1_private.f1(); + var m1_im1_private_v1_private = m1_im1_private.c1; + var m1_im1_private_v2_private = new m1_im1_private.c1(); + var m1_im1_private_v3_private = m1_im1_private.f1; + var m1_im1_private_v4_private = m1_im1_private.f1(); + + + import m1_im2_private = m1_M2_private; + export var m1_im2_private_v1_public = m1_im2_private.c1; + export var m1_im2_private_v2_public = new m1_im2_private.c1(); + export var m1_im2_private_v3_public = m1_im2_private.f1; + export var m1_im2_private_v4_public = m1_im2_private.f1(); + var m1_im2_private_v1_private = m1_im2_private.c1; + var m1_im2_private_v2_private = new m1_im2_private.c1(); + var m1_im2_private_v3_private = m1_im2_private.f1; + var m1_im2_private_v4_private = m1_im2_private.f1(); + + //import m1_im3_private = require("m1_M3_public"); + //export var m1_im3_private_v1_public = m1_im3_private.c1; + //export var m1_im3_private_v2_public = new m1_im3_private.c1(); + //export var m1_im3_private_v3_public = m1_im3_private.f1; + //export var m1_im3_private_v4_public = m1_im3_private.f1(); + //var m1_im3_private_v1_private = m1_im3_private.c1; + //var m1_im3_private_v2_private = new m1_im3_private.c1(); + //var m1_im3_private_v3_private = m1_im3_private.f1; + //var m1_im3_private_v4_private = m1_im3_private.f1(); + + //import m1_im4_private = require("m1_M4_private"); + //export var m1_im4_private_v1_public = m1_im4_private.c1; + //export var m1_im4_private_v2_public = new m1_im4_private.c1(); + //export var m1_im4_private_v3_public = m1_im4_private.f1; + //export var m1_im4_private_v4_public = m1_im4_private.f1(); + //var m1_im4_private_v1_private = m1_im4_private.c1; + //var m1_im4_private_v2_private = new m1_im4_private.c1(); + //var m1_im4_private_v3_private = m1_im4_private.f1; + //var m1_im4_private_v4_private = m1_im4_private.f1(); + + export import m1_im1_public = m1_M1_public; + export import m1_im2_public = m1_M2_private; + //export import m1_im3_public = require("m1_M3_public"); + //export import m1_im4_public = require("m1_M4_private"); +} + +module glo_M1_public { + export class c1 { + } + export function f1() { + return new c1; + } + export var v1 = c1; + export var v2: c1; +} + +declare module "glo_M2_public" { + export function f1(); + export class c1 { + } + export var v1: { new (): c1; }; + export var v2: c1; +} + +declare module "use_glo_M1_public" { + import use_glo_M1_public = glo_M1_public; + export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1; }; + export var use_glo_M1_public_v2_public: typeof use_glo_M1_public; + export var use_glo_M1_public_v3_public: ()=> use_glo_M1_public.c1; + var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1; }; + var use_glo_M1_public_v2_private: typeof use_glo_M1_public; + var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1; + + import use_glo_M2_public = require("glo_M2_public"); + export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; }; + export var use_glo_M2_public_v2_public: typeof use_glo_M2_public; + export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; + var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1; }; + var use_glo_M2_public_v2_private: typeof use_glo_M2_public; + var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1; + + module m2 { + //import errorImport = require("glo_M2_public"); + import nonerrorImport = glo_M1_public; + + module m5 { + //import m5_errorImport = require("glo_M2_public"); + import m5_nonerrorImport = glo_M1_public; + } + } +} + +declare module "anotherParseError" { + module m2 { + //declare module "abc" { + //} + } + + module m2 { + //module "abc2" { + //} + } + //module "abc3" { + //} +} + +module m2 { + //import m3 = require("use_glo_M1_public"); + module m4 { + var a = 10; + //import m2 = require("use_glo_M1_public"); + } + +} +=====================================output===================================== +//@declaration: true +module m1 { + export module m1_M1_public { + export class c1 {} + export function f1() { + return new c1(); + } + export var v1 = c1; + export var v2: c1; + } + + module m1_M2_private { + export class c1 {} + export function f1() { + return new c1(); + } + export var v1 = c1; + export var v2: c1; + } + + //export declare module "m1_M3_public" { + // export function f1(); + // export class c1 { + // } + // export var v1: { new (): c1; }; + // export var v2: c1; + //} + + //declare module "m1_M4_private" { + // export function f1(); + // export class c1 { + // } + // export var v1: { new (): c1; }; + // export var v2: c1; + //} + + import m1_im1_private = m1_M1_public; + export var m1_im1_private_v1_public = m1_im1_private.c1; + export var m1_im1_private_v2_public = new m1_im1_private.c1(); + export var m1_im1_private_v3_public = m1_im1_private.f1; + export var m1_im1_private_v4_public = m1_im1_private.f1(); + var m1_im1_private_v1_private = m1_im1_private.c1; + var m1_im1_private_v2_private = new m1_im1_private.c1(); + var m1_im1_private_v3_private = m1_im1_private.f1; + var m1_im1_private_v4_private = m1_im1_private.f1(); + + import m1_im2_private = m1_M2_private; + export var m1_im2_private_v1_public = m1_im2_private.c1; + export var m1_im2_private_v2_public = new m1_im2_private.c1(); + export var m1_im2_private_v3_public = m1_im2_private.f1; + export var m1_im2_private_v4_public = m1_im2_private.f1(); + var m1_im2_private_v1_private = m1_im2_private.c1; + var m1_im2_private_v2_private = new m1_im2_private.c1(); + var m1_im2_private_v3_private = m1_im2_private.f1; + var m1_im2_private_v4_private = m1_im2_private.f1(); + + //import m1_im3_private = require("m1_M3_public"); + //export var m1_im3_private_v1_public = m1_im3_private.c1; + //export var m1_im3_private_v2_public = new m1_im3_private.c1(); + //export var m1_im3_private_v3_public = m1_im3_private.f1; + //export var m1_im3_private_v4_public = m1_im3_private.f1(); + //var m1_im3_private_v1_private = m1_im3_private.c1; + //var m1_im3_private_v2_private = new m1_im3_private.c1(); + //var m1_im3_private_v3_private = m1_im3_private.f1; + //var m1_im3_private_v4_private = m1_im3_private.f1(); + + //import m1_im4_private = require("m1_M4_private"); + //export var m1_im4_private_v1_public = m1_im4_private.c1; + //export var m1_im4_private_v2_public = new m1_im4_private.c1(); + //export var m1_im4_private_v3_public = m1_im4_private.f1; + //export var m1_im4_private_v4_public = m1_im4_private.f1(); + //var m1_im4_private_v1_private = m1_im4_private.c1; + //var m1_im4_private_v2_private = new m1_im4_private.c1(); + //var m1_im4_private_v3_private = m1_im4_private.f1; + //var m1_im4_private_v4_private = m1_im4_private.f1(); + + export import m1_im1_public = m1_M1_public; + export import m1_im2_public = m1_M2_private; + //export import m1_im3_public = require("m1_M3_public"); + //export import m1_im4_public = require("m1_M4_private"); +} + +module glo_M1_public { + export class c1 {} + export function f1() { + return new c1(); + } + export var v1 = c1; + export var v2: c1; +} + +declare module "glo_M2_public" { + export function f1(); + export class c1 {} + export var v1: { new (): c1 }; + export var v2: c1; +} + +declare module "use_glo_M1_public" { + import use_glo_M1_public = glo_M1_public; + export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1 }; + export var use_glo_M1_public_v2_public: typeof use_glo_M1_public; + export var use_glo_M1_public_v3_public: () => use_glo_M1_public.c1; + var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1 }; + var use_glo_M1_public_v2_private: typeof use_glo_M1_public; + var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1; + + import use_glo_M2_public = require("glo_M2_public"); + export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1 }; + export var use_glo_M2_public_v2_public: typeof use_glo_M2_public; + export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; + var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1 }; + var use_glo_M2_public_v2_private: typeof use_glo_M2_public; + var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1; + + module m2 { + //import errorImport = require("glo_M2_public"); + import nonerrorImport = glo_M1_public; + + module m5 { + //import m5_errorImport = require("glo_M2_public"); + import m5_nonerrorImport = glo_M1_public; + } + } +} + +declare module "anotherParseError" { + module m2 { + //declare module "abc" { + //} + } + + module m2 { + //module "abc2" { + //} + } + //module "abc3" { + //} +} + +module m2 { + //import m3 = require("use_glo_M1_public"); + module m4 { + var a = 10; + //import m2 = require("use_glo_M1_public"); + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 93d1d0e4d882..000000000000 --- a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,990 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ClassDeclaration22.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - "foo"(); - "bar"() { } -} - -=====================================output===================================== -class C { - foo(); - bar() {} -} - -================================================================================ -`; - -exports[`anyIsAssignableToObject.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface P { - p: {}; -} - -interface Q extends P { // Check assignability here. Any is assignable to {} - p: any; -} - -=====================================output===================================== -interface P { - p: {}; -} - -interface Q extends P { - // Check assignability here. Any is assignable to {} - p: any; -} - -================================================================================ -`; - -exports[`castOfAwait.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @target: es6 -async function f() { - <number> await 0; - typeof await 0; - void await 0; - await void <string> typeof <number> void await 0; - await await 0; -} - -=====================================output===================================== -// @target: es6 -async function f() { - <number>await 0; - typeof (await 0); - void (await 0); - await void (<string>typeof (<number>void (await 0))); - await await 0; -} - -================================================================================ -`; - -exports[`castParentheses.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class a { - static b: any; -} - -var b = (<any>a); -var b = (<any>a).b; -var b = (<any>a.b).c; -var b = (<any>a.b()).c; -var b = (<any>new a); -var b = (<any>new a.b); -var b = (<any>new a).b - -=====================================output===================================== -class a { - static b: any; -} - -var b = <any>a; -var b = (<any>a).b; -var b = (<any>a.b).c; -var b = (<any>a.b()).c; -var b = <any>new a(); -var b = <any>new a.b(); -var b = (<any>new a()).b; - -================================================================================ -`; - -exports[`castTest.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -var x : any = 0; -var z = <number> x; -var y = x + z; - -var a = <any>0; -var b = <boolean>true; -var s = <string>""; - -var ar = <any[]>null; - -var f = <(res : number) => void>null; - -declare class Point -{ - x: number; - y: number; - add(dx: number, dy: number): Point; - mult(p: Point): Point; - constructor(x: number, y: number); -} - -var p_cast = <Point> ({ - x: 0, - y: 0, - add: function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - }, - mult: function(p) { return p; } -}) - -=====================================output===================================== -var x: any = 0; -var z = <number>x; -var y = x + z; - -var a = <any>0; -var b = <boolean>true; -var s = <string>""; - -var ar = <any[]>null; - -var f = <(res: number) => void>null; - -declare class Point { - x: number; - y: number; - add(dx: number, dy: number): Point; - mult(p: Point): Point; - constructor(x: number, y: number); -} - -var p_cast = <Point>{ - x: 0, - y: 0, - add: function (dx, dy) { - return new Point(this.x + dx, this.y + dy); - }, - mult: function (p) { - return p; - }, -}; - -================================================================================ -`; - -exports[`checkInfiniteExpansionTermination.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Regression test for #1002 -// Before fix this code would cause infinite loop - -interface IObservable<T> { - n: IObservable<T[]>; // Needed, must be T[] -} - -// Needed -interface ISubject<T> extends IObservable<T> { } - -interface Foo { x } -interface Bar { y } - -var values: IObservable<Foo>; -var values2: ISubject<Bar>; -values = values2; - -=====================================output===================================== -// Regression test for #1002 -// Before fix this code would cause infinite loop - -interface IObservable<T> { - n: IObservable<T[]>; // Needed, must be T[] -} - -// Needed -interface ISubject<T> extends IObservable<T> {} - -interface Foo { - x; -} -interface Bar { - y; -} - -var values: IObservable<Foo>; -var values2: ISubject<Bar>; -values = values2; - -================================================================================ -`; - -exports[`commentInNamespaceDeclarationWithIdentifierPathName.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -namespace hello.hi.world -{ - function foo() {} -} - -=====================================output===================================== -namespace hello.hi.world { - function foo() {} -} - -================================================================================ -`; - -exports[`commentsInterface.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface i2 { - foo: (/**param help*/b: number) => string; -} - -=====================================output===================================== -interface i2 { - foo: (/**param help*/ b: number) => string; -} - -================================================================================ -`; - -exports[`contextualSignatureInstantiation2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// dot f g x = f(g(x)) -var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S; -dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)); -var id: <T>(x:T) => T; -var r23 = dot(id)(id); -=====================================output===================================== -// dot f g x = f(g(x)) -var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S; -dot = - <T, S>(f: (_: T) => S) => - <U>(g: (_: U) => T): ((r: U) => S) => - (x) => - f(g(x)); -var id: <T>(x: T) => T; -var r23 = dot(id)(id); - -================================================================================ -`; - -exports[`declareDottedModuleName.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @declaration: true -module M { - module P.Q { } // This shouldnt be emitted -} - -module M { - export module R.S { } //This should be emitted -} - -module T.U { // This needs to be emitted -} -=====================================output===================================== -// @declaration: true -module M { - module P.Q {} // This shouldnt be emitted -} - -module M { - export module R.S {} //This should be emitted -} - -module T.U { - // This needs to be emitted -} - -================================================================================ -`; - -exports[`decrementAndIncrementOperators.ts [babel-ts] format 1`] = ` -"Invalid left-hand side in postfix operation. (4:1) - 2 | - 3 | // errors -> 4 | 1 ++; - | ^ - 5 | - 6 | (1)++; - 7 | (1)--;" -`; - -exports[`decrementAndIncrementOperators.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var x = 0; - -// errors -1 ++; - -(1)++; -(1)--; - -++(1); ---(1); - -(1 + 2)++; -(1 + 2)--; - -++(1 + 2); ---(1 + 2); - -(x + x)++; -(x + x)--; - -++(x + x); ---(x + x); - -//OK -x++; -x--; - -++x; ---x; - -(x)++; ---(x); - -((x))++; -((x))--; - -x[x++]++; - -=====================================output===================================== -var x = 0; - -// errors -1++; - -1++; -1--; - -++1; ---1; - -(1 + 2)++; -(1 + 2)--; - -++(1 + 2); ---(1 + 2); - -(x + x)++; -(x + x)--; - -++(x + x); ---(x + x); - -//OK -x++; -x--; - -++x; ---x; - -x++; ---x; - -x++; -x--; - -x[x++]++; - -================================================================================ -`; - -exports[`downlevelLetConst1.ts [babel-ts] format 1`] = ` -"Unexpected token (1:6) -> 1 | const - | ^" -`; - -exports[`downlevelLetConst1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const -=====================================output===================================== -const; - -================================================================================ -`; - -exports[`errorOnInitializerInInterfaceProperty.ts [babel-ts] format 1`] = ` -"Unexpected token, expected ";" (2:17) - 1 | interface Foo { -> 2 | bar: number = 5; - | ^ - 3 | } - 4 |" -`; - -exports[`errorOnInitializerInInterfaceProperty.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Foo { - bar: number = 5; -} - -=====================================output===================================== -interface Foo { - bar: number = 5; -} - -================================================================================ -`; - -exports[`es5ExportDefaultClassDeclaration4.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @target: es5 -// @module: commonjs -// @declaration: true - -declare module "foo" { - export var before: C; - - export default class C { - method(): C; - } - - export var after: C; - - export var t: typeof C; -} - - -=====================================output===================================== -// @target: es5 -// @module: commonjs -// @declaration: true - -declare module "foo" { - export var before: C; - - export default class C { - method(): C; - } - - export var after: C; - - export var t: typeof C; -} - -================================================================================ -`; - -exports[`functionOverloadsOnGenericArity1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// overloading on arity not allowed -interface C { - f<T>(): string; - f<T, U>(): string; - - <T>(): string; - <T, U>(): string; - - new <T>(): string; - new <T, U>(): string; -} - -=====================================output===================================== -// overloading on arity not allowed -interface C { - f<T>(): string; - f<T, U>(): string; - - <T>(): string; - <T, U>(): string; - - new <T>(): string; - new <T, U>(): string; -} - -================================================================================ -`; - -exports[`globalIsContextualKeyword.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a() { - let global = 1; -} -function b() { - class global {} -} - -namespace global { -} - -function foo(global: number) { -} - -let obj = { - global: "123" -} -=====================================output===================================== -function a() { - let global = 1; -} -function b() { - class global {} -} - -namespace global {} - -function foo(global: number) {} - -let obj = { - global: "123", -}; - -================================================================================ -`; - -exports[`indexSignatureWithInitializer.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// These used to be indexers, now they are computed properties -interface I { - [x = '']: string; -} - -class C { - [x = 0]: string -} -=====================================output===================================== -// These used to be indexers, now they are computed properties -interface I { - [x = ""]: string; -} - -class C { - [x = 0]: string; -} - -================================================================================ -`; - -exports[`mappedTypeWithCombinedTypeMappers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Repro from #13351 - -type Meta<T, A> = { - [P in keyof T]: { - value: T[P]; - also: A; - readonly children: Meta<T[P], A>; - }; -} - -interface Input { - x: string; - y: number; -} - -declare const output: Meta<Input, boolean>; - -const shouldFail: { important: boolean } = output.x.children; - -=====================================output===================================== -// Repro from #13351 - -type Meta<T, A> = { - [P in keyof T]: { - value: T[P]; - also: A; - readonly children: Meta<T[P], A>; - }; -}; - -interface Input { - x: string; - y: number; -} - -declare const output: Meta<Input, boolean>; - -const shouldFail: { important: boolean } = output.x.children; - -================================================================================ -`; - -exports[`modifiersOnInterfaceIndexSignature1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface I { - public [a: string]: number; -} -=====================================output===================================== -interface I { - public [a: string]: number; -} - -================================================================================ -`; - -exports[`privacyGloImport.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -//@declaration: true -module m1 { - export module m1_M1_public { - export class c1 { - } - export function f1() { - return new c1; - } - export var v1 = c1; - export var v2: c1; - } - - module m1_M2_private { - export class c1 { - } - export function f1() { - return new c1; - } - export var v1 = c1; - export var v2: c1; - } - - //export declare module "m1_M3_public" { - // export function f1(); - // export class c1 { - // } - // export var v1: { new (): c1; }; - // export var v2: c1; - //} - - //declare module "m1_M4_private" { - // export function f1(); - // export class c1 { - // } - // export var v1: { new (): c1; }; - // export var v2: c1; - //} - - import m1_im1_private = m1_M1_public; - export var m1_im1_private_v1_public = m1_im1_private.c1; - export var m1_im1_private_v2_public = new m1_im1_private.c1(); - export var m1_im1_private_v3_public = m1_im1_private.f1; - export var m1_im1_private_v4_public = m1_im1_private.f1(); - var m1_im1_private_v1_private = m1_im1_private.c1; - var m1_im1_private_v2_private = new m1_im1_private.c1(); - var m1_im1_private_v3_private = m1_im1_private.f1; - var m1_im1_private_v4_private = m1_im1_private.f1(); - - - import m1_im2_private = m1_M2_private; - export var m1_im2_private_v1_public = m1_im2_private.c1; - export var m1_im2_private_v2_public = new m1_im2_private.c1(); - export var m1_im2_private_v3_public = m1_im2_private.f1; - export var m1_im2_private_v4_public = m1_im2_private.f1(); - var m1_im2_private_v1_private = m1_im2_private.c1; - var m1_im2_private_v2_private = new m1_im2_private.c1(); - var m1_im2_private_v3_private = m1_im2_private.f1; - var m1_im2_private_v4_private = m1_im2_private.f1(); - - //import m1_im3_private = require("m1_M3_public"); - //export var m1_im3_private_v1_public = m1_im3_private.c1; - //export var m1_im3_private_v2_public = new m1_im3_private.c1(); - //export var m1_im3_private_v3_public = m1_im3_private.f1; - //export var m1_im3_private_v4_public = m1_im3_private.f1(); - //var m1_im3_private_v1_private = m1_im3_private.c1; - //var m1_im3_private_v2_private = new m1_im3_private.c1(); - //var m1_im3_private_v3_private = m1_im3_private.f1; - //var m1_im3_private_v4_private = m1_im3_private.f1(); - - //import m1_im4_private = require("m1_M4_private"); - //export var m1_im4_private_v1_public = m1_im4_private.c1; - //export var m1_im4_private_v2_public = new m1_im4_private.c1(); - //export var m1_im4_private_v3_public = m1_im4_private.f1; - //export var m1_im4_private_v4_public = m1_im4_private.f1(); - //var m1_im4_private_v1_private = m1_im4_private.c1; - //var m1_im4_private_v2_private = new m1_im4_private.c1(); - //var m1_im4_private_v3_private = m1_im4_private.f1; - //var m1_im4_private_v4_private = m1_im4_private.f1(); - - export import m1_im1_public = m1_M1_public; - export import m1_im2_public = m1_M2_private; - //export import m1_im3_public = require("m1_M3_public"); - //export import m1_im4_public = require("m1_M4_private"); -} - -module glo_M1_public { - export class c1 { - } - export function f1() { - return new c1; - } - export var v1 = c1; - export var v2: c1; -} - -declare module "glo_M2_public" { - export function f1(); - export class c1 { - } - export var v1: { new (): c1; }; - export var v2: c1; -} - -declare module "use_glo_M1_public" { - import use_glo_M1_public = glo_M1_public; - export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1; }; - export var use_glo_M1_public_v2_public: typeof use_glo_M1_public; - export var use_glo_M1_public_v3_public: ()=> use_glo_M1_public.c1; - var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1; }; - var use_glo_M1_public_v2_private: typeof use_glo_M1_public; - var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1; - - import use_glo_M2_public = require("glo_M2_public"); - export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; }; - export var use_glo_M2_public_v2_public: typeof use_glo_M2_public; - export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; - var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1; }; - var use_glo_M2_public_v2_private: typeof use_glo_M2_public; - var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1; - - module m2 { - //import errorImport = require("glo_M2_public"); - import nonerrorImport = glo_M1_public; - - module m5 { - //import m5_errorImport = require("glo_M2_public"); - import m5_nonerrorImport = glo_M1_public; - } - } -} - -declare module "anotherParseError" { - module m2 { - //declare module "abc" { - //} - } - - module m2 { - //module "abc2" { - //} - } - //module "abc3" { - //} -} - -module m2 { - //import m3 = require("use_glo_M1_public"); - module m4 { - var a = 10; - //import m2 = require("use_glo_M1_public"); - } - -} -=====================================output===================================== -//@declaration: true -module m1 { - export module m1_M1_public { - export class c1 {} - export function f1() { - return new c1(); - } - export var v1 = c1; - export var v2: c1; - } - - module m1_M2_private { - export class c1 {} - export function f1() { - return new c1(); - } - export var v1 = c1; - export var v2: c1; - } - - //export declare module "m1_M3_public" { - // export function f1(); - // export class c1 { - // } - // export var v1: { new (): c1; }; - // export var v2: c1; - //} - - //declare module "m1_M4_private" { - // export function f1(); - // export class c1 { - // } - // export var v1: { new (): c1; }; - // export var v2: c1; - //} - - import m1_im1_private = m1_M1_public; - export var m1_im1_private_v1_public = m1_im1_private.c1; - export var m1_im1_private_v2_public = new m1_im1_private.c1(); - export var m1_im1_private_v3_public = m1_im1_private.f1; - export var m1_im1_private_v4_public = m1_im1_private.f1(); - var m1_im1_private_v1_private = m1_im1_private.c1; - var m1_im1_private_v2_private = new m1_im1_private.c1(); - var m1_im1_private_v3_private = m1_im1_private.f1; - var m1_im1_private_v4_private = m1_im1_private.f1(); - - import m1_im2_private = m1_M2_private; - export var m1_im2_private_v1_public = m1_im2_private.c1; - export var m1_im2_private_v2_public = new m1_im2_private.c1(); - export var m1_im2_private_v3_public = m1_im2_private.f1; - export var m1_im2_private_v4_public = m1_im2_private.f1(); - var m1_im2_private_v1_private = m1_im2_private.c1; - var m1_im2_private_v2_private = new m1_im2_private.c1(); - var m1_im2_private_v3_private = m1_im2_private.f1; - var m1_im2_private_v4_private = m1_im2_private.f1(); - - //import m1_im3_private = require("m1_M3_public"); - //export var m1_im3_private_v1_public = m1_im3_private.c1; - //export var m1_im3_private_v2_public = new m1_im3_private.c1(); - //export var m1_im3_private_v3_public = m1_im3_private.f1; - //export var m1_im3_private_v4_public = m1_im3_private.f1(); - //var m1_im3_private_v1_private = m1_im3_private.c1; - //var m1_im3_private_v2_private = new m1_im3_private.c1(); - //var m1_im3_private_v3_private = m1_im3_private.f1; - //var m1_im3_private_v4_private = m1_im3_private.f1(); - - //import m1_im4_private = require("m1_M4_private"); - //export var m1_im4_private_v1_public = m1_im4_private.c1; - //export var m1_im4_private_v2_public = new m1_im4_private.c1(); - //export var m1_im4_private_v3_public = m1_im4_private.f1; - //export var m1_im4_private_v4_public = m1_im4_private.f1(); - //var m1_im4_private_v1_private = m1_im4_private.c1; - //var m1_im4_private_v2_private = new m1_im4_private.c1(); - //var m1_im4_private_v3_private = m1_im4_private.f1; - //var m1_im4_private_v4_private = m1_im4_private.f1(); - - export import m1_im1_public = m1_M1_public; - export import m1_im2_public = m1_M2_private; - //export import m1_im3_public = require("m1_M3_public"); - //export import m1_im4_public = require("m1_M4_private"); -} - -module glo_M1_public { - export class c1 {} - export function f1() { - return new c1(); - } - export var v1 = c1; - export var v2: c1; -} - -declare module "glo_M2_public" { - export function f1(); - export class c1 {} - export var v1: { new (): c1 }; - export var v2: c1; -} - -declare module "use_glo_M1_public" { - import use_glo_M1_public = glo_M1_public; - export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1 }; - export var use_glo_M1_public_v2_public: typeof use_glo_M1_public; - export var use_glo_M1_public_v3_public: () => use_glo_M1_public.c1; - var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1 }; - var use_glo_M1_public_v2_private: typeof use_glo_M1_public; - var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1; - - import use_glo_M2_public = require("glo_M2_public"); - export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1 }; - export var use_glo_M2_public_v2_public: typeof use_glo_M2_public; - export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1; - var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1 }; - var use_glo_M2_public_v2_private: typeof use_glo_M2_public; - var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1; - - module m2 { - //import errorImport = require("glo_M2_public"); - import nonerrorImport = glo_M1_public; - - module m5 { - //import m5_errorImport = require("glo_M2_public"); - import m5_nonerrorImport = glo_M1_public; - } - } -} - -declare module "anotherParseError" { - module m2 { - //declare module "abc" { - //} - } - - module m2 { - //module "abc2" { - //} - } - //module "abc3" { - //} -} - -module m2 { - //import m3 = require("use_glo_M1_public"); - module m4 { - var a = 10; - //import m2 = require("use_glo_M1_public"); - } -} - -================================================================================ -`; diff --git a/tests/format/typescript/compiler/decrementAndIncrementOperators.ts b/tests/format/typescript/compiler/decrementAndIncrementOperators.ts index c8b34b361081..5441d4822e47 100644 --- a/tests/format/typescript/compiler/decrementAndIncrementOperators.ts +++ b/tests/format/typescript/compiler/decrementAndIncrementOperators.ts @@ -1,27 +1,5 @@ var x = 0; -// errors -1 ++; - -(1)++; -(1)--; - -++(1); ---(1); - -(1 + 2)++; -(1 + 2)--; - -++(1 + 2); ---(1 + 2); - -(x + x)++; -(x + x)--; - -++(x + x); ---(x + x); - -//OK x++; x--; diff --git a/tests/format/typescript/compiler/downlevelLetConst1.ts b/tests/format/typescript/compiler/downlevelLetConst1.ts deleted file mode 100644 index 8baacf4ea544..000000000000 --- a/tests/format/typescript/compiler/downlevelLetConst1.ts +++ /dev/null @@ -1 +0,0 @@ -const \ No newline at end of file diff --git a/tests/format/typescript/compiler/errorOnInitializerInInterfaceProperty.ts b/tests/format/typescript/compiler/errorOnInitializerInInterfaceProperty.ts deleted file mode 100644 index 85413b73366a..000000000000 --- a/tests/format/typescript/compiler/errorOnInitializerInInterfaceProperty.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface Foo { - bar: number = 5; -} diff --git a/tests/format/typescript/compiler/format.test.js b/tests/format/typescript/compiler/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/compiler/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/compiler/jsfmt.spec.js b/tests/format/typescript/compiler/jsfmt.spec.js deleted file mode 100644 index 5e276b1c256a..000000000000 --- a/tests/format/typescript/compiler/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { - "babel-ts": [ - "downlevelLetConst1.ts", - "errorOnInitializerInInterfaceProperty.ts", - "decrementAndIncrementOperators.ts", - ], - }, -}); diff --git a/tests/format/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts b/tests/format/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts index 212f82bca141..d6dc6783f92c 100644 --- a/tests/format/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts +++ b/tests/format/typescript/compiler/modifiersOnInterfaceIndexSignature1.ts @@ -1,3 +1,3 @@ interface I { - public [a: string]: number; -} \ No newline at end of file + [a: string]: number; +} diff --git a/tests/format/typescript/conditional-types/__snapshots__/format.test.js.snap b/tests/format/typescript/conditional-types/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ce1972490bf6 --- /dev/null +++ b/tests/format/typescript/conditional-types/__snapshots__/format.test.js.snap @@ -0,0 +1,955 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = B extends T + ? // comment + foo + : bar; + +type A = B extends test /* comment + comment + comment +*/ + ? foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : test extends B + ? /* comment + comment + comment */ + foo + : bar; + +type T = test extends B + ? /* comment */ + foo + : bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + test extends B + ? foo + : /* comment + comment + comment + */ + bar; + +type T = test extends B + ? foo + : /* comment */ + bar; + +type T = test extends B ? test extends B /* c +c */? foo : bar : bar; + +=====================================output===================================== +type A = + B extends T ? + // comment + foo + : bar; + +type A = + B extends ( + test /* comment + comment + comment +*/ + ) ? + foo + : bar; + +type T = + test extends B ? + /* comment + comment + comment + comment + */ + foo + : bar; + +type T = + test extends B ? + /* comment + comment + comment + comment + */ + foo + : test extends B ? + /* comment + comment + comment */ + foo + : bar; + +type T = test extends B ? /* comment */ foo : bar; + +type T = + test extends B ? foo + : /* comment + comment + comment + comment + */ + bar; + +type T = + test extends B ? foo + : /* comment + comment + comment + comment + */ + test extends B ? foo + : /* comment + comment + comment + */ + bar; + +type T = test extends B ? foo : /* comment */ bar; + +type T = + test extends B ? + test extends ( + B /* c +c */ + ) ? + foo + : bar + : bar; + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = B extends T + ? // comment + foo + : bar; + +type A = B extends test /* comment + comment + comment +*/ + ? foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : test extends B + ? /* comment + comment + comment */ + foo + : bar; + +type T = test extends B + ? /* comment */ + foo + : bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + test extends B + ? foo + : /* comment + comment + comment + */ + bar; + +type T = test extends B + ? foo + : /* comment */ + bar; + +type T = test extends B ? test extends B /* c +c */? foo : bar : bar; + +=====================================output===================================== +type A = B extends T + ? // comment + foo + : bar; + +type A = B extends test /* comment + comment + comment +*/ + ? foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : bar; + +type T = test extends B + ? /* comment + comment + comment + comment + */ + foo + : test extends B + ? /* comment + comment + comment */ + foo + : bar; + +type T = test extends B ? /* comment */ foo : bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + bar; + +type T = test extends B + ? foo + : /* comment + comment + comment + comment + */ + test extends B + ? foo + : /* comment + comment + comment + */ + bar; + +type T = test extends B ? foo : /* comment */ bar; + +type T = test extends B + ? test extends B /* c +c */ + ? foo + : bar + : bar; + +================================================================================ +`; + +exports[`conditional-types.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type DeepReadonly<T> = T extends any[] ? DeepReadonlyArray<T[number]> : T extends object ? DeepReadonlyObject<T> : T; + +type NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; + +interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} + +type DeepReadonlyObject<T> = { + readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; +}; + +type TypeName<T> = + T extends string ? "string" : + T extends number ? "number" : + T extends boolean ? "boolean" : + T extends undefined ? "undefined" : + T extends Function ? "function" : + "object"; + +type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type02 = 0 extends ((1 extends 2 ? 3 : 4)) ? 5 : 6; +type Type03 = 0 extends (((1 extends 2 ? 3 : 4))) ? 5 : 6; +type Type04 = 0 extends ((((1 extends 2 ? 3 : 4)))) ? 5 : 6; +type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type06 = ((0 extends 1 ? 2 : 3)) extends 4 ? 5 : 6; +type Type07 = (((0 extends 1 ? 2 : 3))) extends 4 ? 5 : 6; +type Type08 = ((((0 extends 1 ? 2 : 3)))) extends 4 ? 5 : 6; + +type T1 = () => void extends T ? U : V; +type T1a = () => (void extends T ? U : V); +type T1b = () => (void) extends T ? U : V; +type T2 = (() => void) extends T ? U : V; + +type U1 = new () => X extends T ? U : V; +type U1a = new () => (X extends T ? U : V); +type U1b = new () => (X) extends T ? U : V; +type U2 = (new () => X) extends T ? U : V; + +=====================================output===================================== +export type DeepReadonly<T> = + T extends any[] ? DeepReadonlyArray<T[number]> + : T extends object ? DeepReadonlyObject<T> + : T; + +type NonFunctionPropertyNames<T> = { + [K in keyof T]: T[K] extends Function ? never : K; +}[keyof T]; + +interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} + +type DeepReadonlyObject<T> = { + readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; +}; + +type TypeName<T> = + T extends string ? "string" + : T extends number ? "number" + : T extends boolean ? "boolean" + : T extends undefined ? "undefined" + : T extends Function ? "function" + : "object"; + +type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type02 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type03 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type04 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type06 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type07 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type08 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; + +type T1 = () => void extends T ? U : V; +type T1a = () => void extends T ? U : V; +type T1b = () => void extends T ? U : V; +type T2 = (() => void) extends T ? U : V; + +type U1 = new () => X extends T ? U : V; +type U1a = new () => X extends T ? U : V; +type U1b = new () => X extends T ? U : V; +type U2 = (new () => X) extends T ? U : V; + +================================================================================ +`; + +exports[`conditional-types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type DeepReadonly<T> = T extends any[] ? DeepReadonlyArray<T[number]> : T extends object ? DeepReadonlyObject<T> : T; + +type NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; + +interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} + +type DeepReadonlyObject<T> = { + readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; +}; + +type TypeName<T> = + T extends string ? "string" : + T extends number ? "number" : + T extends boolean ? "boolean" : + T extends undefined ? "undefined" : + T extends Function ? "function" : + "object"; + +type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type02 = 0 extends ((1 extends 2 ? 3 : 4)) ? 5 : 6; +type Type03 = 0 extends (((1 extends 2 ? 3 : 4))) ? 5 : 6; +type Type04 = 0 extends ((((1 extends 2 ? 3 : 4)))) ? 5 : 6; +type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type06 = ((0 extends 1 ? 2 : 3)) extends 4 ? 5 : 6; +type Type07 = (((0 extends 1 ? 2 : 3))) extends 4 ? 5 : 6; +type Type08 = ((((0 extends 1 ? 2 : 3)))) extends 4 ? 5 : 6; + +type T1 = () => void extends T ? U : V; +type T1a = () => (void extends T ? U : V); +type T1b = () => (void) extends T ? U : V; +type T2 = (() => void) extends T ? U : V; + +type U1 = new () => X extends T ? U : V; +type U1a = new () => (X extends T ? U : V); +type U1b = new () => (X) extends T ? U : V; +type U2 = (new () => X) extends T ? U : V; + +=====================================output===================================== +export type DeepReadonly<T> = T extends any[] + ? DeepReadonlyArray<T[number]> + : T extends object + ? DeepReadonlyObject<T> + : T; + +type NonFunctionPropertyNames<T> = { + [K in keyof T]: T[K] extends Function ? never : K; +}[keyof T]; + +interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} + +type DeepReadonlyObject<T> = { + readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; +}; + +type TypeName<T> = T extends string + ? "string" + : T extends number + ? "number" + : T extends boolean + ? "boolean" + : T extends undefined + ? "undefined" + : T extends Function + ? "function" + : "object"; + +type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type02 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type03 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type04 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; +type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type06 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type07 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; +type Type08 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; + +type T1 = () => void extends T ? U : V; +type T1a = () => void extends T ? U : V; +type T1b = () => void extends T ? U : V; +type T2 = (() => void) extends T ? U : V; + +type U1 = new () => X extends T ? U : V; +type U1a = new () => X extends T ? U : V; +type U1b = new () => X extends T ? U : V; +type U2 = (new () => X) extends T ? U : V; + +================================================================================ +`; + +exports[`infer-type.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type TestReturnType<T extends (...args: any[]) => any> = T extends (...args: any[]) => infer R ? R : any; + +type Unpacked<T> = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise<infer U> ? U : + T; + +=====================================output===================================== +type TestReturnType<T extends (...args: any[]) => any> = + T extends (...args: any[]) => infer R ? R : any; + +type Unpacked<T> = + T extends (infer U)[] ? U + : T extends (...args: any[]) => infer U ? U + : T extends Promise<infer U> ? U + : T; + +================================================================================ +`; + +exports[`infer-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type TestReturnType<T extends (...args: any[]) => any> = T extends (...args: any[]) => infer R ? R : any; + +type Unpacked<T> = + T extends (infer U)[] ? U : + T extends (...args: any[]) => infer U ? U : + T extends Promise<infer U> ? U : + T; + +=====================================output===================================== +type TestReturnType<T extends (...args: any[]) => any> = T extends ( + ...args: any[] +) => infer R + ? R + : any; + +type Unpacked<T> = T extends (infer U)[] + ? U + : T extends (...args: any[]) => infer U + ? U + : T extends Promise<infer U> + ? U + : T; + +================================================================================ +`; + +exports[`nested-in-condition.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends + DoubleGobbledygookProvider + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo2 = + DoubleGobbledygookProvider extends + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo3 = + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends + (DoubleGobbledygookProvider extends MockGobbledygookProvider ? MockThingamabobberFactory : ThingamabobberFactory) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +=====================================output===================================== +type Foo = + ( + ThingamabobberFactory extends AbstractThingamabobberFactory ? + GobbledygookProvider + : CompositeGobbledygookProvider + ) extends DoubleGobbledygookProvider ? + UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo2 = + DoubleGobbledygookProvider extends ( + ThingamabobberFactory extends AbstractThingamabobberFactory ? + GobbledygookProvider + : CompositeGobbledygookProvider + ) ? + UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo3 = + ( + ThingamabobberFactory extends AbstractThingamabobberFactory ? + GobbledygookProvider + : CompositeGobbledygookProvider + ) extends ( + DoubleGobbledygookProvider extends MockGobbledygookProvider ? + MockThingamabobberFactory + : ThingamabobberFactory + ) ? + UniqueDalgametreService + : CompositeZamazingoResolver; + +================================================================================ +`; + +exports[`nested-in-condition.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends + DoubleGobbledygookProvider + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo2 = + DoubleGobbledygookProvider extends + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo3 = + (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends + (DoubleGobbledygookProvider extends MockGobbledygookProvider ? MockThingamabobberFactory : ThingamabobberFactory) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +=====================================output===================================== +type Foo = ( + ThingamabobberFactory extends AbstractThingamabobberFactory + ? GobbledygookProvider + : CompositeGobbledygookProvider +) extends DoubleGobbledygookProvider + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo2 = DoubleGobbledygookProvider extends ( + ThingamabobberFactory extends AbstractThingamabobberFactory + ? GobbledygookProvider + : CompositeGobbledygookProvider +) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +type Foo3 = ( + ThingamabobberFactory extends AbstractThingamabobberFactory + ? GobbledygookProvider + : CompositeGobbledygookProvider +) extends ( + DoubleGobbledygookProvider extends MockGobbledygookProvider + ? MockThingamabobberFactory + : ThingamabobberFactory +) + ? UniqueDalgametreService + : CompositeZamazingoResolver; + +================================================================================ +`; + +exports[`new-ternary-spec.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": +type KnownKeys<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { [_ in keyof T]: infer U } ? + {} extends U ? never + : U + : never; + +type KnownKeysWithLongExtends<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { + [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U> + } ? U + : never; + +// TypeScript examples: +type TypeName<T> = + T extends string ? "string" + : T extends number ? "number" + : T extends boolean ? "boolean" + : T extends undefined ? "undefined" + : T extends Function ? "function" + : "object"; + +type Unpacked<T> = + T extends (infer U)[] ? U + : T extends (...args: any[]) => infer U ? + SomeReallyLongThingThatBreaksTheLine<U> + : T extends Promise<infer U> ? U + : T; +=====================================output===================================== +// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": +type KnownKeys<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { [_ in keyof T]: infer U } ? + {} extends U ? + never + : U + : never; + +type KnownKeysWithLongExtends<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { + [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U>; + } ? + U + : never; + +// TypeScript examples: +type TypeName<T> = + T extends string ? "string" + : T extends number ? "number" + : T extends boolean ? "boolean" + : T extends undefined ? "undefined" + : T extends Function ? "function" + : "object"; + +type Unpacked<T> = + T extends (infer U)[] ? U + : T extends (...args: any[]) => infer U ? + SomeReallyLongThingThatBreaksTheLine<U> + : T extends Promise<infer U> ? U + : T; + +================================================================================ +`; + +exports[`new-ternary-spec.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": +type KnownKeys<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { [_ in keyof T]: infer U } ? + {} extends U ? never + : U + : never; + +type KnownKeysWithLongExtends<T> = + { + [K in keyof T]: string extends K ? never + : number extends K ? never + : K; + } extends { + [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U> + } ? U + : never; + +// TypeScript examples: +type TypeName<T> = + T extends string ? "string" + : T extends number ? "number" + : T extends boolean ? "boolean" + : T extends undefined ? "undefined" + : T extends Function ? "function" + : "object"; + +type Unpacked<T> = + T extends (infer U)[] ? U + : T extends (...args: any[]) => infer U ? + SomeReallyLongThingThatBreaksTheLine<U> + : T extends Promise<infer U> ? U + : T; +=====================================output===================================== +// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": +type KnownKeys<T> = { + [K in keyof T]: string extends K ? never : number extends K ? never : K; +} extends { [_ in keyof T]: infer U } + ? {} extends U + ? never + : U + : never; + +type KnownKeysWithLongExtends<T> = { + [K in keyof T]: string extends K ? never : number extends K ? never : K; +} extends { + [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U>; +} + ? U + : never; + +// TypeScript examples: +type TypeName<T> = T extends string + ? "string" + : T extends number + ? "number" + : T extends boolean + ? "boolean" + : T extends undefined + ? "undefined" + : T extends Function + ? "function" + : "object"; + +type Unpacked<T> = T extends (infer U)[] + ? U + : T extends (...args: any[]) => infer U + ? SomeReallyLongThingThatBreaksTheLine<U> + : T extends Promise<infer U> + ? U + : T; + +================================================================================ +`; + +exports[`parentheses.ts - {"experimentalTernaries":true} format 1`] = ` +====================================options===================================== +experimentalTernaries: true +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #13275 +type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; +type Foo<T> = T extends (new (...a: any[]) => infer R extends string) ? R : never; + +// #14275 +type Test<T> = T extends (( + token: TSESTree.Token +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (( + token: TSESTree.Token +) => asserts token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (new ( + token: TSESTree.Token +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; + +=====================================output===================================== +// #13275 +type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; +type Foo<T> = + T extends (new (...a: any[]) => infer R extends string) ? R : never; + +// #14275 +type Test<T> = + T extends ( + ((token: TSESTree.Token) => token is infer U extends TSESTree.Token) + ) ? + U + : TSESTree.Token; +type Test<T> = + T extends ( + ((token: TSESTree.Token) => asserts token is infer U extends TSESTree.Token) + ) ? + U + : TSESTree.Token; +type Test<T> = + T extends ( + (new (token: TSESTree.Token) => token is infer U extends TSESTree.Token) + ) ? + U + : TSESTree.Token; + +================================================================================ +`; + +exports[`parentheses.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #13275 +type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; +type Foo<T> = T extends (new (...a: any[]) => infer R extends string) ? R : never; + +// #14275 +type Test<T> = T extends (( + token: TSESTree.Token +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (( + token: TSESTree.Token +) => asserts token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (new ( + token: TSESTree.Token +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; + +=====================================output===================================== +// #13275 +type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; +type Foo<T> = T extends (new (...a: any[]) => infer R extends string) + ? R + : never; + +// #14275 +type Test<T> = T extends (( + token: TSESTree.Token, +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (( + token: TSESTree.Token, +) => asserts token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; +type Test<T> = T extends (new ( + token: TSESTree.Token, +) => token is infer U extends TSESTree.Token) + ? U + : TSESTree.Token; + +================================================================================ +`; diff --git a/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 14c69d952f8f..000000000000 --- a/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,473 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A = B extends T - ? // comment - foo - : bar; - -type A = B extends test /* comment - comment - comment -*/ - ? foo - : bar; - -type T = test extends B - ? /* comment - comment - comment - comment - */ - foo - : bar; - -type T = test extends B - ? /* comment - comment - comment - comment - */ - foo - : test extends B - ? /* comment - comment - comment */ - foo - : bar; - -type T = test extends B - ? /* comment */ - foo - : bar; - -type T = test extends B - ? foo - : /* comment - comment - comment - comment - */ - bar; - -type T = test extends B - ? foo - : /* comment - comment - comment - comment - */ - test extends B - ? foo - : /* comment - comment - comment - */ - bar; - -type T = test extends B - ? foo - : /* comment */ - bar; - -type T = test extends B ? test extends B /* c -c */? foo : bar : bar; - -=====================================output===================================== -type A = B extends T - ? // comment - foo - : bar; - -type A = B extends test /* comment - comment - comment -*/ - ? foo - : bar; - -type T = test extends B - ? /* comment - comment - comment - comment - */ - foo - : bar; - -type T = test extends B - ? /* comment - comment - comment - comment - */ - foo - : test extends B - ? /* comment - comment - comment */ - foo - : bar; - -type T = test extends B ? /* comment */ foo : bar; - -type T = test extends B - ? foo - : /* comment - comment - comment - comment - */ - bar; - -type T = test extends B - ? foo - : /* comment - comment - comment - comment - */ - test extends B - ? foo - : /* comment - comment - comment - */ - bar; - -type T = test extends B ? foo : /* comment */ bar; - -type T = test extends B - ? test extends B /* c -c */ - ? foo - : bar - : bar; - -================================================================================ -`; - -exports[`conditonal-types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type DeepReadonly<T> = T extends any[] ? DeepReadonlyArray<T[number]> : T extends object ? DeepReadonlyObject<T> : T; - -type NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; - -interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} - -type DeepReadonlyObject<T> = { - readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; -}; - -type TypeName<T> = - T extends string ? "string" : - T extends number ? "number" : - T extends boolean ? "boolean" : - T extends undefined ? "undefined" : - T extends Function ? "function" : - "object"; - -type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; -type Type02 = 0 extends ((1 extends 2 ? 3 : 4)) ? 5 : 6; -type Type03 = 0 extends (((1 extends 2 ? 3 : 4))) ? 5 : 6; -type Type04 = 0 extends ((((1 extends 2 ? 3 : 4)))) ? 5 : 6; -type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; -type Type06 = ((0 extends 1 ? 2 : 3)) extends 4 ? 5 : 6; -type Type07 = (((0 extends 1 ? 2 : 3))) extends 4 ? 5 : 6; -type Type08 = ((((0 extends 1 ? 2 : 3)))) extends 4 ? 5 : 6; - -type T1 = () => void extends T ? U : V; -type T1a = () => (void extends T ? U : V); -type T1b = () => (void) extends T ? U : V; -type T2 = (() => void) extends T ? U : V; - -type U1 = new () => X extends T ? U : V; -type U1a = new () => (X extends T ? U : V); -type U1b = new () => (X) extends T ? U : V; -type U2 = (new () => X) extends T ? U : V; - -=====================================output===================================== -export type DeepReadonly<T> = T extends any[] - ? DeepReadonlyArray<T[number]> - : T extends object - ? DeepReadonlyObject<T> - : T; - -type NonFunctionPropertyNames<T> = { - [K in keyof T]: T[K] extends Function ? never : K; -}[keyof T]; - -interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {} - -type DeepReadonlyObject<T> = { - readonly [P in NonFunctionPropertyNames<T>]: DeepReadonly<T[P]>; -}; - -type TypeName<T> = T extends string - ? "string" - : T extends number - ? "number" - : T extends boolean - ? "boolean" - : T extends undefined - ? "undefined" - : T extends Function - ? "function" - : "object"; - -type Type01 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; -type Type02 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; -type Type03 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; -type Type04 = 0 extends (1 extends 2 ? 3 : 4) ? 5 : 6; -type Type05 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; -type Type06 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; -type Type07 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; -type Type08 = (0 extends 1 ? 2 : 3) extends 4 ? 5 : 6; - -type T1 = () => void extends T ? U : V; -type T1a = () => void extends T ? U : V; -type T1b = () => void extends T ? U : V; -type T2 = (() => void) extends T ? U : V; - -type U1 = new () => X extends T ? U : V; -type U1a = new () => X extends T ? U : V; -type U1b = new () => X extends T ? U : V; -type U2 = (new () => X) extends T ? U : V; - -================================================================================ -`; - -exports[`infer-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type TestReturnType<T extends (...args: any[]) => any> = T extends (...args: any[]) => infer R ? R : any; - -type Unpacked<T> = - T extends (infer U)[] ? U : - T extends (...args: any[]) => infer U ? U : - T extends Promise<infer U> ? U : - T; - -=====================================output===================================== -type TestReturnType<T extends (...args: any[]) => any> = T extends ( - ...args: any[] -) => infer R - ? R - : any; - -type Unpacked<T> = T extends (infer U)[] - ? U - : T extends (...args: any[]) => infer U - ? U - : T extends Promise<infer U> - ? U - : T; - -================================================================================ -`; - -exports[`nested-in-condition.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Foo = - (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends - DoubleGobbledygookProvider - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -type Foo2 = - DoubleGobbledygookProvider extends - (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -type Foo3 = - (ThingamabobberFactory extends AbstractThingamabobberFactory ? GobbledygookProvider : CompositeGobbledygookProvider) extends - (DoubleGobbledygookProvider extends MockGobbledygookProvider ? MockThingamabobberFactory : ThingamabobberFactory) - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -=====================================output===================================== -type Foo = ( - ThingamabobberFactory extends AbstractThingamabobberFactory - ? GobbledygookProvider - : CompositeGobbledygookProvider -) extends DoubleGobbledygookProvider - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -type Foo2 = DoubleGobbledygookProvider extends ( - ThingamabobberFactory extends AbstractThingamabobberFactory - ? GobbledygookProvider - : CompositeGobbledygookProvider -) - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -type Foo3 = ( - ThingamabobberFactory extends AbstractThingamabobberFactory - ? GobbledygookProvider - : CompositeGobbledygookProvider -) extends ( - DoubleGobbledygookProvider extends MockGobbledygookProvider - ? MockThingamabobberFactory - : ThingamabobberFactory -) - ? UniqueDalgametreService - : CompositeZamazingoResolver; - -================================================================================ -`; - -exports[`new-ternary-spec.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": -type KnownKeys<T> = - { - [K in keyof T]: string extends K ? never - : number extends K ? never - : K; - } extends { [_ in keyof T]: infer U } ? - {} extends U ? never - : U - : never; - -type KnownKeysWithLongExtends<T> = - { - [K in keyof T]: string extends K ? never - : number extends K ? never - : K; - } extends { - [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U> - } ? U - : never; - -// TypeScript examples: -type TypeName<T> = - T extends string ? "string" - : T extends number ? "number" - : T extends boolean ? "boolean" - : T extends undefined ? "undefined" - : T extends Function ? "function" - : "object"; - -type Unpacked<T> = - T extends (infer U)[] ? U - : T extends (...args: any[]) => infer U ? - SomeReallyLongThingThatBreaksTheLine<U> - : T extends Promise<infer U> ? U - : T; -=====================================output===================================== -// TypeScript has the same behavior, including a line break after =, but no parens around "conditional": -type KnownKeys<T> = { - [K in keyof T]: string extends K ? never : number extends K ? never : K; -} extends { [_ in keyof T]: infer U } - ? {} extends U - ? never - : U - : never; - -type KnownKeysWithLongExtends<T> = { - [K in keyof T]: string extends K ? never : number extends K ? never : K; -} extends { - [_ in keyof T]: SomeReallyLongThingThatBreaksTheLine<infer U>; -} - ? U - : never; - -// TypeScript examples: -type TypeName<T> = T extends string - ? "string" - : T extends number - ? "number" - : T extends boolean - ? "boolean" - : T extends undefined - ? "undefined" - : T extends Function - ? "function" - : "object"; - -type Unpacked<T> = T extends (infer U)[] - ? U - : T extends (...args: any[]) => infer U - ? SomeReallyLongThingThatBreaksTheLine<U> - : T extends Promise<infer U> - ? U - : T; - -================================================================================ -`; - -exports[`parentheses.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #13275 -type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; -type Foo<T> = T extends (new (...a: any[]) => infer R extends string) ? R : never; - -// #14275 -type Test<T> = T extends (( - token: TSESTree.Token -) => token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; -type Test<T> = T extends (( - token: TSESTree.Token -) => asserts token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; -type Test<T> = T extends (new ( - token: TSESTree.Token -) => token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; - -=====================================output===================================== -// #13275 -type Foo<T> = T extends ((...a: any[]) => infer R extends string) ? R : never; -type Foo<T> = T extends (new (...a: any[]) => infer R extends string) - ? R - : never; - -// #14275 -type Test<T> = T extends (( - token: TSESTree.Token -) => token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; -type Test<T> = T extends (( - token: TSESTree.Token -) => asserts token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; -type Test<T> = T extends (new ( - token: TSESTree.Token -) => token is infer U extends TSESTree.Token) - ? U - : TSESTree.Token; - -================================================================================ -`; diff --git a/tests/format/typescript/conditional-types/conditonal-types.ts b/tests/format/typescript/conditional-types/conditional-types.ts similarity index 100% rename from tests/format/typescript/conditional-types/conditonal-types.ts rename to tests/format/typescript/conditional-types/conditional-types.ts diff --git a/tests/format/typescript/conditional-types/format.test.js b/tests/format/typescript/conditional-types/format.test.js new file mode 100644 index 000000000000..c91d836641c1 --- /dev/null +++ b/tests/format/typescript/conditional-types/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { experimentalTernaries: true }); diff --git a/tests/format/typescript/conditional-types/jsfmt.spec.js b/tests/format/typescript/conditional-types/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conditional-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/ambient/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/ambient/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/ambient/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/ambient/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/ambient/format.test.js b/tests/format/typescript/conformance/ambient/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/ambient/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/ambient/jsfmt.spec.js b/tests/format/typescript/conformance/ambient/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/ambient/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/classes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b3cd4265dbd3 --- /dev/null +++ b/tests/format/typescript/conformance/classes/__snapshots__/format.test.js.snap @@ -0,0 +1,809 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`abstract.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class AbstractSocket { + createSocket?(): Promise<string> +} + +=====================================output===================================== +abstract class AbstractSocket { + createSocket?(): Promise<string>; +} + +================================================================================ +`; + +exports[`classExpression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var x = class C { +} + +var y = { + foo: class C2 { + } +} + +var z = class C4 { +} + +=====================================output===================================== +var x = class C {}; + +var y = { + foo: class C2 {}, +}; + +var z = class C4 {}; + +================================================================================ +`; + +exports[`mixinAccessModifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @declaration: true + +type Constructable = new (...args: any[]) => object; + +class Private { + constructor (...args: any[]) {} + private p: string; +} + +class Private2 { + constructor (...args: any[]) {} + private p: string; +} + +class Protected { + constructor (...args: any[]) {} + protected p: string; + protected static s: string; +} + +class Protected2 { + constructor (...args: any[]) {} + protected p: string; + protected static s: string; +} + +class Public { + constructor (...args: any[]) {} + public p: string; + public static s: string; +} + +class Public2 { + constructor (...args: any[]) {} + public p: string; + public static s: string; +} + +function f1(x: Private & Private2) { + x.p; // Error, private constituent makes property inaccessible +} + +function f2(x: Private & Protected) { + x.p; // Error, private constituent makes property inaccessible +} + +function f3(x: Private & Public) { + x.p; // Error, private constituent makes property inaccessible +} + +function f4(x: Protected & Protected2) { + x.p; // Error, protected when all constituents are protected +} + +function f5(x: Protected & Public) { + x.p; // Ok, public if any constituent is public +} + +function f6(x: Public & Public2) { + x.p; // Ok, public if any constituent is public +} + +declare function Mix<T, U>(c1: T, c2: U): T & U; + +// Can't derive from type with inaccessible properties + +class C1 extends Mix(Private, Private2) {} +class C2 extends Mix(Private, Protected) {} +class C3 extends Mix(Private, Public) {} + +class C4 extends Mix(Protected, Protected2) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; + c5.p; + c6.p; + } + static g() { + C4.s; + C5.s; + C6.s + } +} + +class C5 extends Mix(Protected, Public) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; // Error, not in class deriving from Protected2 + c5.p; + c6.p; + } + static g() { + C4.s; // Error, not in class deriving from Protected2 + C5.s; + C6.s + } +} + +class C6 extends Mix(Public, Public2) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; // Error, not in class deriving from Protected2 + c5.p; + c6.p; + } + static g() { + C4.s; // Error, not in class deriving from Protected2 + C5.s; + C6.s + } +} + +=====================================output===================================== +// @declaration: true + +type Constructable = new (...args: any[]) => object; + +class Private { + constructor(...args: any[]) {} + private p: string; +} + +class Private2 { + constructor(...args: any[]) {} + private p: string; +} + +class Protected { + constructor(...args: any[]) {} + protected p: string; + protected static s: string; +} + +class Protected2 { + constructor(...args: any[]) {} + protected p: string; + protected static s: string; +} + +class Public { + constructor(...args: any[]) {} + public p: string; + public static s: string; +} + +class Public2 { + constructor(...args: any[]) {} + public p: string; + public static s: string; +} + +function f1(x: Private & Private2) { + x.p; // Error, private constituent makes property inaccessible +} + +function f2(x: Private & Protected) { + x.p; // Error, private constituent makes property inaccessible +} + +function f3(x: Private & Public) { + x.p; // Error, private constituent makes property inaccessible +} + +function f4(x: Protected & Protected2) { + x.p; // Error, protected when all constituents are protected +} + +function f5(x: Protected & Public) { + x.p; // Ok, public if any constituent is public +} + +function f6(x: Public & Public2) { + x.p; // Ok, public if any constituent is public +} + +declare function Mix<T, U>(c1: T, c2: U): T & U; + +// Can't derive from type with inaccessible properties + +class C1 extends Mix(Private, Private2) {} +class C2 extends Mix(Private, Protected) {} +class C3 extends Mix(Private, Public) {} + +class C4 extends Mix(Protected, Protected2) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; + c5.p; + c6.p; + } + static g() { + C4.s; + C5.s; + C6.s; + } +} + +class C5 extends Mix(Protected, Public) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; // Error, not in class deriving from Protected2 + c5.p; + c6.p; + } + static g() { + C4.s; // Error, not in class deriving from Protected2 + C5.s; + C6.s; + } +} + +class C6 extends Mix(Public, Public2) { + f(c4: C4, c5: C5, c6: C6) { + c4.p; // Error, not in class deriving from Protected2 + c5.p; + c6.p; + } + static g() { + C4.s; // Error, not in class deriving from Protected2 + C5.s; + C6.s; + } +} + +================================================================================ +`; + +exports[`mixinClassesAnnotated.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @declaration: true + +type Constructor<T> = new(...args: any[]) => T; + +class Base { + constructor(public x: number, public y: number) {} +} + +class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + } +} + +const Printable = <T extends Constructor<Base>>(superClass: T): Constructor<Printable> & { message: string } & T => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + } + + +function Tagged<T extends Constructor<{}>>(superClass: T): Constructor<Tagged> & T { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1 = Tagged(Derived); +const Thing2 = Tagged(Printable(Derived)); +Thing2.message; + +function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test() { + this.print(); + } +} + +=====================================output===================================== +// @declaration: true + +type Constructor<T> = new (...args: any[]) => T; + +class Base { + constructor( + public x: number, + public y: number, + ) {} +} + +class Derived extends Base { + constructor( + x: number, + y: number, + public z: number, + ) { + super(x, y); + } +} + +const Printable = <T extends Constructor<Base>>( + superClass: T, +): Constructor<Printable> & { message: string } & T => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + }; + +function Tagged<T extends Constructor<{}>>( + superClass: T, +): Constructor<Tagged> & T { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1 = Tagged(Derived); +const Thing2 = Tagged(Printable(Derived)); +Thing2.message; + +function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test() { + this.print(); + } +} + +================================================================================ +`; + +exports[`mixinClassesAnonymous.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Constructor<T> = new(...args: any[]) => T; + +class Base { + constructor(public x: number, public y: number) {} +} + +class Derived extends Base { + constructor(x: number, y: number, public z: number) { + super(x, y); + } +} + +const Printable = <T extends Constructor<Base>>(superClass: T) => class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } +} + +function Tagged<T extends Constructor<{}>>(superClass: T) { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1 = Tagged(Derived); +const Thing2 = Tagged(Printable(Derived)); +Thing2.message; + +function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test() { + this.print(); + } +} + +// Repro from #13805 + +const Timestamped = <CT extends Constructor<object>>(Base: CT) => { + return class extends Base { + timestamp = new Date(); + }; +} + +=====================================output===================================== +type Constructor<T> = new (...args: any[]) => T; + +class Base { + constructor( + public x: number, + public y: number, + ) {} +} + +class Derived extends Base { + constructor( + x: number, + y: number, + public z: number, + ) { + super(x, y); + } +} + +const Printable = <T extends Constructor<Base>>(superClass: T) => + class extends superClass { + static message = "hello"; + print() { + const output = this.x + "," + this.y; + } + }; + +function Tagged<T extends Constructor<{}>>(superClass: T) { + class C extends superClass { + _tag: string; + constructor(...args: any[]) { + super(...args); + this._tag = "hello"; + } + } + return C; +} + +const Thing1 = Tagged(Derived); +const Thing2 = Tagged(Printable(Derived)); +Thing2.message; + +function f1() { + const thing = new Thing1(1, 2, 3); + thing.x; + thing._tag; +} + +function f2() { + const thing = new Thing2(1, 2, 3); + thing.x; + thing._tag; + thing.print(); +} + +class Thing3 extends Thing2 { + constructor(tag: string) { + super(10, 20, 30); + this._tag = tag; + } + test() { + this.print(); + } +} + +// Repro from #13805 + +const Timestamped = <CT extends Constructor<object>>(Base: CT) => { + return class extends Base { + timestamp = new Date(); + }; +}; + +================================================================================ +`; + +exports[`mixinClassesMembers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @declaration: true + +declare class C1 { + public a: number; + protected b: number; + private c: number; + constructor(s: string); + constructor(n: number); +} + +declare class M1 { + constructor(...args: any[]); + p: number; + static p: number; +} + +declare class M2 { + constructor(...args: any[]); + f(): number; + static f(): number; +} + +declare const Mixed1: typeof M1 & typeof C1; +declare const Mixed2: typeof C1 & typeof M1; +declare const Mixed3: typeof M2 & typeof M1 & typeof C1; +declare const Mixed4: typeof C1 & typeof M1 & typeof M2; +declare const Mixed5: typeof M1 & typeof M2; + +function f1() { + let x1 = new Mixed1("hello"); + let x2 = new Mixed1(42); + let x3 = new Mixed2("hello"); + let x4 = new Mixed2(42); + let x5 = new Mixed3("hello"); + let x6 = new Mixed3(42); + let x7 = new Mixed4("hello"); + let x8 = new Mixed4(42); + let x9 = new Mixed5(); +} + +function f2() { + let x = new Mixed1("hello"); + x.a; + x.p; + Mixed1.p; +} + +function f3() { + let x = new Mixed2("hello"); + x.a; + x.p; + Mixed2.p; +} + +function f4() { + let x = new Mixed3("hello"); + x.a; + x.p; + x.f(); + Mixed3.p; + Mixed3.f(); +} + +function f5() { + let x = new Mixed4("hello"); + x.a; + x.p; + x.f(); + Mixed4.p; + Mixed4.f(); +} + +function f6() { + let x = new Mixed5(); + x.p; + x.f(); + Mixed5.p; + Mixed5.f(); +} + +class C2 extends Mixed1 { + constructor() { + super("hello"); + this.a; + this.b; + this.p; + } +} + +class C3 extends Mixed3 { + constructor() { + super(42); + this.a; + this.b; + this.p; + this.f(); + } + f() { return super.f(); } +} + +=====================================output===================================== +// @declaration: true + +declare class C1 { + public a: number; + protected b: number; + private c: number; + constructor(s: string); + constructor(n: number); +} + +declare class M1 { + constructor(...args: any[]); + p: number; + static p: number; +} + +declare class M2 { + constructor(...args: any[]); + f(): number; + static f(): number; +} + +declare const Mixed1: typeof M1 & typeof C1; +declare const Mixed2: typeof C1 & typeof M1; +declare const Mixed3: typeof M2 & typeof M1 & typeof C1; +declare const Mixed4: typeof C1 & typeof M1 & typeof M2; +declare const Mixed5: typeof M1 & typeof M2; + +function f1() { + let x1 = new Mixed1("hello"); + let x2 = new Mixed1(42); + let x3 = new Mixed2("hello"); + let x4 = new Mixed2(42); + let x5 = new Mixed3("hello"); + let x6 = new Mixed3(42); + let x7 = new Mixed4("hello"); + let x8 = new Mixed4(42); + let x9 = new Mixed5(); +} + +function f2() { + let x = new Mixed1("hello"); + x.a; + x.p; + Mixed1.p; +} + +function f3() { + let x = new Mixed2("hello"); + x.a; + x.p; + Mixed2.p; +} + +function f4() { + let x = new Mixed3("hello"); + x.a; + x.p; + x.f(); + Mixed3.p; + Mixed3.f(); +} + +function f5() { + let x = new Mixed4("hello"); + x.a; + x.p; + x.f(); + Mixed4.p; + Mixed4.f(); +} + +function f6() { + let x = new Mixed5(); + x.p; + x.f(); + Mixed5.p; + Mixed5.f(); +} + +class C2 extends Mixed1 { + constructor() { + super("hello"); + this.a; + this.b; + this.p; + } +} + +class C3 extends Mixed3 { + constructor() { + super(42); + this.a; + this.b; + this.p; + this.f(); + } + f() { + return super.f(); + } +} + +================================================================================ +`; + +exports[`nestedClassDeclaration.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// nested classes are not allowed + +class C { + x: string; +} + +function foo() { + class C3 { + } +} + +=====================================output===================================== +// nested classes are not allowed + +class C { + x: string; +} + +function foo() { + class C3 {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/classes/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a492500f1c6b..000000000000 --- a/tests/format/typescript/conformance/classes/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,795 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class AbstractSocket { - createSocket?(): Promise<string> -} - -=====================================output===================================== -abstract class AbstractSocket { - createSocket?(): Promise<string>; -} - -================================================================================ -`; - -exports[`classExpression.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var x = class C { -} - -var y = { - foo: class C2 { - } -} - -var z = class C4 { -} - -=====================================output===================================== -var x = class C {}; - -var y = { - foo: class C2 {}, -}; - -var z = class C4 {}; - -================================================================================ -`; - -exports[`mixinAccessModifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @declaration: true - -type Constructable = new (...args: any[]) => object; - -class Private { - constructor (...args: any[]) {} - private p: string; -} - -class Private2 { - constructor (...args: any[]) {} - private p: string; -} - -class Protected { - constructor (...args: any[]) {} - protected p: string; - protected static s: string; -} - -class Protected2 { - constructor (...args: any[]) {} - protected p: string; - protected static s: string; -} - -class Public { - constructor (...args: any[]) {} - public p: string; - public static s: string; -} - -class Public2 { - constructor (...args: any[]) {} - public p: string; - public static s: string; -} - -function f1(x: Private & Private2) { - x.p; // Error, private constituent makes property inaccessible -} - -function f2(x: Private & Protected) { - x.p; // Error, private constituent makes property inaccessible -} - -function f3(x: Private & Public) { - x.p; // Error, private constituent makes property inaccessible -} - -function f4(x: Protected & Protected2) { - x.p; // Error, protected when all constituents are protected -} - -function f5(x: Protected & Public) { - x.p; // Ok, public if any constituent is public -} - -function f6(x: Public & Public2) { - x.p; // Ok, public if any constituent is public -} - -declare function Mix<T, U>(c1: T, c2: U): T & U; - -// Can't derive from type with inaccessible properties - -class C1 extends Mix(Private, Private2) {} -class C2 extends Mix(Private, Protected) {} -class C3 extends Mix(Private, Public) {} - -class C4 extends Mix(Protected, Protected2) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; - c5.p; - c6.p; - } - static g() { - C4.s; - C5.s; - C6.s - } -} - -class C5 extends Mix(Protected, Public) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; // Error, not in class deriving from Protected2 - c5.p; - c6.p; - } - static g() { - C4.s; // Error, not in class deriving from Protected2 - C5.s; - C6.s - } -} - -class C6 extends Mix(Public, Public2) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; // Error, not in class deriving from Protected2 - c5.p; - c6.p; - } - static g() { - C4.s; // Error, not in class deriving from Protected2 - C5.s; - C6.s - } -} - -=====================================output===================================== -// @declaration: true - -type Constructable = new (...args: any[]) => object; - -class Private { - constructor(...args: any[]) {} - private p: string; -} - -class Private2 { - constructor(...args: any[]) {} - private p: string; -} - -class Protected { - constructor(...args: any[]) {} - protected p: string; - protected static s: string; -} - -class Protected2 { - constructor(...args: any[]) {} - protected p: string; - protected static s: string; -} - -class Public { - constructor(...args: any[]) {} - public p: string; - public static s: string; -} - -class Public2 { - constructor(...args: any[]) {} - public p: string; - public static s: string; -} - -function f1(x: Private & Private2) { - x.p; // Error, private constituent makes property inaccessible -} - -function f2(x: Private & Protected) { - x.p; // Error, private constituent makes property inaccessible -} - -function f3(x: Private & Public) { - x.p; // Error, private constituent makes property inaccessible -} - -function f4(x: Protected & Protected2) { - x.p; // Error, protected when all constituents are protected -} - -function f5(x: Protected & Public) { - x.p; // Ok, public if any constituent is public -} - -function f6(x: Public & Public2) { - x.p; // Ok, public if any constituent is public -} - -declare function Mix<T, U>(c1: T, c2: U): T & U; - -// Can't derive from type with inaccessible properties - -class C1 extends Mix(Private, Private2) {} -class C2 extends Mix(Private, Protected) {} -class C3 extends Mix(Private, Public) {} - -class C4 extends Mix(Protected, Protected2) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; - c5.p; - c6.p; - } - static g() { - C4.s; - C5.s; - C6.s; - } -} - -class C5 extends Mix(Protected, Public) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; // Error, not in class deriving from Protected2 - c5.p; - c6.p; - } - static g() { - C4.s; // Error, not in class deriving from Protected2 - C5.s; - C6.s; - } -} - -class C6 extends Mix(Public, Public2) { - f(c4: C4, c5: C5, c6: C6) { - c4.p; // Error, not in class deriving from Protected2 - c5.p; - c6.p; - } - static g() { - C4.s; // Error, not in class deriving from Protected2 - C5.s; - C6.s; - } -} - -================================================================================ -`; - -exports[`mixinClassesAnnotated.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @declaration: true - -type Constructor<T> = new(...args: any[]) => T; - -class Base { - constructor(public x: number, public y: number) {} -} - -class Derived extends Base { - constructor(x: number, y: number, public z: number) { - super(x, y); - } -} - -const Printable = <T extends Constructor<Base>>(superClass: T): Constructor<Printable> & { message: string } & T => - class extends superClass { - static message = "hello"; - print() { - const output = this.x + "," + this.y; - } - } - - -function Tagged<T extends Constructor<{}>>(superClass: T): Constructor<Tagged> & T { - class C extends superClass { - _tag: string; - constructor(...args: any[]) { - super(...args); - this._tag = "hello"; - } - } - return C; -} - -const Thing1 = Tagged(Derived); -const Thing2 = Tagged(Printable(Derived)); -Thing2.message; - -function f1() { - const thing = new Thing1(1, 2, 3); - thing.x; - thing._tag; -} - -function f2() { - const thing = new Thing2(1, 2, 3); - thing.x; - thing._tag; - thing.print(); -} - -class Thing3 extends Thing2 { - constructor(tag: string) { - super(10, 20, 30); - this._tag = tag; - } - test() { - this.print(); - } -} - -=====================================output===================================== -// @declaration: true - -type Constructor<T> = new (...args: any[]) => T; - -class Base { - constructor(public x: number, public y: number) {} -} - -class Derived extends Base { - constructor(x: number, y: number, public z: number) { - super(x, y); - } -} - -const Printable = <T extends Constructor<Base>>( - superClass: T -): Constructor<Printable> & { message: string } & T => - class extends superClass { - static message = "hello"; - print() { - const output = this.x + "," + this.y; - } - }; - -function Tagged<T extends Constructor<{}>>( - superClass: T -): Constructor<Tagged> & T { - class C extends superClass { - _tag: string; - constructor(...args: any[]) { - super(...args); - this._tag = "hello"; - } - } - return C; -} - -const Thing1 = Tagged(Derived); -const Thing2 = Tagged(Printable(Derived)); -Thing2.message; - -function f1() { - const thing = new Thing1(1, 2, 3); - thing.x; - thing._tag; -} - -function f2() { - const thing = new Thing2(1, 2, 3); - thing.x; - thing._tag; - thing.print(); -} - -class Thing3 extends Thing2 { - constructor(tag: string) { - super(10, 20, 30); - this._tag = tag; - } - test() { - this.print(); - } -} - -================================================================================ -`; - -exports[`mixinClassesAnonymous.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Constructor<T> = new(...args: any[]) => T; - -class Base { - constructor(public x: number, public y: number) {} -} - -class Derived extends Base { - constructor(x: number, y: number, public z: number) { - super(x, y); - } -} - -const Printable = <T extends Constructor<Base>>(superClass: T) => class extends superClass { - static message = "hello"; - print() { - const output = this.x + "," + this.y; - } -} - -function Tagged<T extends Constructor<{}>>(superClass: T) { - class C extends superClass { - _tag: string; - constructor(...args: any[]) { - super(...args); - this._tag = "hello"; - } - } - return C; -} - -const Thing1 = Tagged(Derived); -const Thing2 = Tagged(Printable(Derived)); -Thing2.message; - -function f1() { - const thing = new Thing1(1, 2, 3); - thing.x; - thing._tag; -} - -function f2() { - const thing = new Thing2(1, 2, 3); - thing.x; - thing._tag; - thing.print(); -} - -class Thing3 extends Thing2 { - constructor(tag: string) { - super(10, 20, 30); - this._tag = tag; - } - test() { - this.print(); - } -} - -// Repro from #13805 - -const Timestamped = <CT extends Constructor<object>>(Base: CT) => { - return class extends Base { - timestamp = new Date(); - }; -} - -=====================================output===================================== -type Constructor<T> = new (...args: any[]) => T; - -class Base { - constructor(public x: number, public y: number) {} -} - -class Derived extends Base { - constructor(x: number, y: number, public z: number) { - super(x, y); - } -} - -const Printable = <T extends Constructor<Base>>(superClass: T) => - class extends superClass { - static message = "hello"; - print() { - const output = this.x + "," + this.y; - } - }; - -function Tagged<T extends Constructor<{}>>(superClass: T) { - class C extends superClass { - _tag: string; - constructor(...args: any[]) { - super(...args); - this._tag = "hello"; - } - } - return C; -} - -const Thing1 = Tagged(Derived); -const Thing2 = Tagged(Printable(Derived)); -Thing2.message; - -function f1() { - const thing = new Thing1(1, 2, 3); - thing.x; - thing._tag; -} - -function f2() { - const thing = new Thing2(1, 2, 3); - thing.x; - thing._tag; - thing.print(); -} - -class Thing3 extends Thing2 { - constructor(tag: string) { - super(10, 20, 30); - this._tag = tag; - } - test() { - this.print(); - } -} - -// Repro from #13805 - -const Timestamped = <CT extends Constructor<object>>(Base: CT) => { - return class extends Base { - timestamp = new Date(); - }; -}; - -================================================================================ -`; - -exports[`mixinClassesMembers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @declaration: true - -declare class C1 { - public a: number; - protected b: number; - private c: number; - constructor(s: string); - constructor(n: number); -} - -declare class M1 { - constructor(...args: any[]); - p: number; - static p: number; -} - -declare class M2 { - constructor(...args: any[]); - f(): number; - static f(): number; -} - -declare const Mixed1: typeof M1 & typeof C1; -declare const Mixed2: typeof C1 & typeof M1; -declare const Mixed3: typeof M2 & typeof M1 & typeof C1; -declare const Mixed4: typeof C1 & typeof M1 & typeof M2; -declare const Mixed5: typeof M1 & typeof M2; - -function f1() { - let x1 = new Mixed1("hello"); - let x2 = new Mixed1(42); - let x3 = new Mixed2("hello"); - let x4 = new Mixed2(42); - let x5 = new Mixed3("hello"); - let x6 = new Mixed3(42); - let x7 = new Mixed4("hello"); - let x8 = new Mixed4(42); - let x9 = new Mixed5(); -} - -function f2() { - let x = new Mixed1("hello"); - x.a; - x.p; - Mixed1.p; -} - -function f3() { - let x = new Mixed2("hello"); - x.a; - x.p; - Mixed2.p; -} - -function f4() { - let x = new Mixed3("hello"); - x.a; - x.p; - x.f(); - Mixed3.p; - Mixed3.f(); -} - -function f5() { - let x = new Mixed4("hello"); - x.a; - x.p; - x.f(); - Mixed4.p; - Mixed4.f(); -} - -function f6() { - let x = new Mixed5(); - x.p; - x.f(); - Mixed5.p; - Mixed5.f(); -} - -class C2 extends Mixed1 { - constructor() { - super("hello"); - this.a; - this.b; - this.p; - } -} - -class C3 extends Mixed3 { - constructor() { - super(42); - this.a; - this.b; - this.p; - this.f(); - } - f() { return super.f(); } -} - -=====================================output===================================== -// @declaration: true - -declare class C1 { - public a: number; - protected b: number; - private c: number; - constructor(s: string); - constructor(n: number); -} - -declare class M1 { - constructor(...args: any[]); - p: number; - static p: number; -} - -declare class M2 { - constructor(...args: any[]); - f(): number; - static f(): number; -} - -declare const Mixed1: typeof M1 & typeof C1; -declare const Mixed2: typeof C1 & typeof M1; -declare const Mixed3: typeof M2 & typeof M1 & typeof C1; -declare const Mixed4: typeof C1 & typeof M1 & typeof M2; -declare const Mixed5: typeof M1 & typeof M2; - -function f1() { - let x1 = new Mixed1("hello"); - let x2 = new Mixed1(42); - let x3 = new Mixed2("hello"); - let x4 = new Mixed2(42); - let x5 = new Mixed3("hello"); - let x6 = new Mixed3(42); - let x7 = new Mixed4("hello"); - let x8 = new Mixed4(42); - let x9 = new Mixed5(); -} - -function f2() { - let x = new Mixed1("hello"); - x.a; - x.p; - Mixed1.p; -} - -function f3() { - let x = new Mixed2("hello"); - x.a; - x.p; - Mixed2.p; -} - -function f4() { - let x = new Mixed3("hello"); - x.a; - x.p; - x.f(); - Mixed3.p; - Mixed3.f(); -} - -function f5() { - let x = new Mixed4("hello"); - x.a; - x.p; - x.f(); - Mixed4.p; - Mixed4.f(); -} - -function f6() { - let x = new Mixed5(); - x.p; - x.f(); - Mixed5.p; - Mixed5.f(); -} - -class C2 extends Mixed1 { - constructor() { - super("hello"); - this.a; - this.b; - this.p; - } -} - -class C3 extends Mixed3 { - constructor() { - super(42); - this.a; - this.b; - this.p; - this.f(); - } - f() { - return super.f(); - } -} - -================================================================================ -`; - -exports[`nestedClassDeclaration.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// nested classes are not allowed - -class C { - x: string; -} - -function foo() { - class C3 { - } -} - -=====================================output===================================== -// nested classes are not allowed - -class C { - x: string; -} - -function foo() { - class C3 {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/classes/classDeclarations/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/classes/classDeclarations/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/classes/classDeclarations/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..aab570f769dd --- /dev/null +++ b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap @@ -0,0 +1,1045 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`classAbstractAccessor.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +abstract class A { + abstract get a(); + abstract set b(x: string); +} + +=====================================output===================================== +abstract class A { + abstract get a(); + abstract set b(x: string); +} + +================================================================================ +`; + +exports[`classAbstractAsIdentifier.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class abstract { + foo() { return 1; } +} + +new abstract; +=====================================output===================================== +class abstract { + foo() { + return 1; + } +} + +new abstract(); + +================================================================================ +`; + +exports[`classAbstractAssignabilityConstructorFunction.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A { } + +var AAA: new() => A; + +AAA = A; +AAA = "asdf"; +=====================================output===================================== +abstract class A {} + +var AAA: new () => A; + +AAA = A; +AAA = "asdf"; + +================================================================================ +`; + +exports[`classAbstractClinterfaceAssignability.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +var I: IConstructor; + +abstract class A { + x: number; + static y: number; +} + +var AA: typeof A; +AA = I; + +var AAA: typeof I; +AAA = A; +=====================================output===================================== +var I: IConstructor; + +abstract class A { + x: number; + static y: number; +} + +var AA: typeof A; +AA = I; + +var AAA: typeof I; +AAA = A; + +================================================================================ +`; + +exports[`classAbstractConstructorAssignability.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class A {} + +abstract class B extends A {} + +class C extends B {} + +var AA : typeof A = B; +var BB : typeof B = A; +var CC : typeof C = B; + +new AA; +new BB; +new CC; +=====================================output===================================== +class A {} + +abstract class B extends A {} + +class C extends B {} + +var AA: typeof A = B; +var BB: typeof B = A; +var CC: typeof C = B; + +new AA(); +new BB(); +new CC(); + +================================================================================ +`; + +exports[`classAbstractCrashedOnce.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class foo { + protected abstract test(); +} + +class bar extends foo { + test() { + } +} +var x = new bar(); +=====================================output===================================== +abstract class foo { + protected abstract test(); +} + +class bar extends foo { + test() {} +} +var x = new bar(); + +================================================================================ +`; + +exports[`classAbstractExtends.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class A { + foo() {} +} + +abstract class B extends A { + abstract bar(); +} + +class C extends B { } + +abstract class D extends B {} + +class E extends B { + bar() {} +} +=====================================output===================================== +class A { + foo() {} +} + +abstract class B extends A { + abstract bar(); +} + +class C extends B {} + +abstract class D extends B {} + +class E extends B { + bar() {} +} + +================================================================================ +`; + +exports[`classAbstractFactoryFunction.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class A {} +abstract class B extends A {} + +function NewA(Factory: typeof A) { + return new A; +} + +function NewB(Factory: typeof B) { + return new B; +} + +NewA(A); +NewA(B); + +NewB(A); +NewB(B); +=====================================output===================================== +class A {} +abstract class B extends A {} + +function NewA(Factory: typeof A) { + return new A(); +} + +function NewB(Factory: typeof B) { + return new B(); +} + +NewA(A); +NewA(B); + +NewB(A); +NewB(B); + +================================================================================ +`; + +exports[`classAbstractGeneric.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A<T> { + t: T; + + abstract foo(): T; + abstract bar(t: T); +} + +abstract class B<T> extends A {} + +class C<T> extends A {} + +class D extends A {} + +class E<T> extends A { + foo() { return this.t; } +} + +class F<T> extends A { + bar(t : T) {} +} + +class G<T> extends A { + foo() { return this.t; } + bar(t: T) { } +} +=====================================output===================================== +abstract class A<T> { + t: T; + + abstract foo(): T; + abstract bar(t: T); +} + +abstract class B<T> extends A {} + +class C<T> extends A {} + +class D extends A {} + +class E<T> extends A { + foo() { + return this.t; + } +} + +class F<T> extends A { + bar(t: T) {} +} + +class G<T> extends A { + foo() { + return this.t; + } + bar(t: T) {} +} + +================================================================================ +`; + +exports[`classAbstractImportInstantiation.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export abstract class A {} + +new A; + + +new myA; + +=====================================output===================================== +export abstract class A {} + +new A(); + +new myA(); + +================================================================================ +`; + +exports[`classAbstractInAModule.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export abstract class A {} +export class B extends A {} + + +new M.A; +new M.B; +=====================================output===================================== +export abstract class A {} +export class B extends A {} + +new M.A(); +new M.B(); + +================================================================================ +`; + +exports[`classAbstractInheritance.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A {} + +abstract class B extends A {} + +class C extends A {} + +abstract class AA { + abstract foo(); +} + +abstract class BB extends AA {} + +class CC extends AA {} + +class DD extends BB {} + +abstract class EE extends BB {} + +class FF extends CC {} + +abstract class GG extends CC {} +=====================================output===================================== +abstract class A {} + +abstract class B extends A {} + +class C extends A {} + +abstract class AA { + abstract foo(); +} + +abstract class BB extends AA {} + +class CC extends AA {} + +class DD extends BB {} + +abstract class EE extends BB {} + +class FF extends CC {} + +abstract class GG extends CC {} + +================================================================================ +`; + +exports[`classAbstractInstantiations1.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +abstract class A {} + +class B extends A {} + +abstract class C extends B {} + +new A; +new A(1); +new B; +new C; + +var a : A; +var b : B; +var c : C; + +a = new B; +b = new B; +c = new B; + +=====================================output===================================== +abstract class A {} + +class B extends A {} + +abstract class C extends B {} + +new A(); +new A(1); +new B(); +new C(); + +var a: A; +var b: B; +var c: C; + +a = new B(); +b = new B(); +c = new B(); + +================================================================================ +`; + +exports[`classAbstractInstantiations2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { +} + +abstract class B { + foo(): number { return this.bar(); } + abstract bar() : number; +} + +new B; + +var BB: typeof B = B; +var AA: typeof A = BB; +new AA; + +function constructB(Factory : typeof B) { + new Factory; +} + +var BB = B; +new BB; + +var x : any = C; +new x; + +class C extends B { } + +abstract class D extends B { } + +class E extends B { + bar() { return 1; } +} + +abstract class F extends B { + abstract foo() : number; + bar() { return 2; } +} + +abstract class G { + abstract qux(x : number) : string; + abstract qux() : number; + y : number; + abstract quz(x : number, y : string) : boolean; + + abstract nom(): boolean; + nom(x : number): boolean; +} + +class H { + abstract baz() : number; +} +=====================================output===================================== +class A {} + +abstract class B { + foo(): number { + return this.bar(); + } + abstract bar(): number; +} + +new B(); + +var BB: typeof B = B; +var AA: typeof A = BB; +new AA(); + +function constructB(Factory: typeof B) { + new Factory(); +} + +var BB = B; +new BB(); + +var x: any = C; +new x(); + +class C extends B {} + +abstract class D extends B {} + +class E extends B { + bar() { + return 1; + } +} + +abstract class F extends B { + abstract foo(): number; + bar() { + return 2; + } +} + +abstract class G { + abstract qux(x: number): string; + abstract qux(): number; + y: number; + abstract quz(x: number, y: string): boolean; + + abstract nom(): boolean; + nom(x: number): boolean; +} + +class H { + abstract baz(): number; +} + +================================================================================ +`; + +exports[`classAbstractMethodInNonAbstractClass.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + abstract foo(); +} +=====================================output===================================== +class A { + abstract foo(); +} + +================================================================================ +`; + +exports[`classAbstractMixedWithModifiers.ts [babel-ts] format 1`] = ` +"'static' modifier cannot be used with 'abstract' modifier. (12:14) + 10 | abstract private foo_dd(); + 11 | +> 12 | abstract static foo_d(); + | ^ + 13 | + 14 | static abstract foo_e(); + 15 | } +Cause: 'static' modifier cannot be used with 'abstract' modifier. (12:13)" +`; + +exports[`classAbstractMixedWithModifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A { + abstract foo_a(); + + public abstract foo_b(); + protected abstract foo_c(); + private abstract foo_d(); + + abstract public foo_bb(); + abstract protected foo_cc(); + abstract private foo_dd(); + + abstract static foo_d(); + + static abstract foo_e(); +} +=====================================output===================================== +abstract class A { + abstract foo_a(); + + public abstract foo_b(); + protected abstract foo_c(); + private abstract foo_d(); + + public abstract foo_bb(); + protected abstract foo_cc(); + private abstract foo_dd(); + + static abstract foo_d(); + + static abstract foo_e(); +} + +================================================================================ +`; + +exports[`classAbstractOverloads.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A { + abstract foo(); + abstract foo() : number; + abstract foo(); + + abstract bar(); + bar(); + abstract bar(); + + abstract baz(); + baz(); + abstract baz(); + baz() {} + + qux(); +} + +abstract class B { + abstract foo() : number; + abstract foo(); + x : number; + abstract foo(); + abstract foo(); +} +=====================================output===================================== +abstract class A { + abstract foo(); + abstract foo(): number; + abstract foo(); + + abstract bar(); + bar(); + abstract bar(); + + abstract baz(); + baz(); + abstract baz(); + baz() {} + + qux(); +} + +abstract class B { + abstract foo(): number; + abstract foo(); + x: number; + abstract foo(); + abstract foo(); +} + +================================================================================ +`; + +exports[`classAbstractOverrideWithAbstract.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + foo() {} +} + +abstract class B extends A { + abstract foo(); +} + +abstract class AA { + foo() {} + abstract bar(); +} + +abstract class BB extends AA { + abstract foo(); + bar () {} +} + +class CC extends BB {} + +class DD extends BB { + foo() {} +} +=====================================output===================================== +class A { + foo() {} +} + +abstract class B extends A { + abstract foo(); +} + +abstract class AA { + foo() {} + abstract bar(); +} + +abstract class BB extends AA { + abstract foo(); + bar() {} +} + +class CC extends BB {} + +class DD extends BB { + foo() {} +} + +================================================================================ +`; + +exports[`classAbstractProperties.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A { + abstract x : number; + public abstract y : number; + protected abstract z : number; + private abstract w : number; + + abstract m: () => void; + + abstract foo_x() : number; + public abstract foo_y() : number; + protected abstract foo_z() : number; + private abstract foo_w() : number; +} +=====================================output===================================== +abstract class A { + abstract x: number; + public abstract y: number; + protected abstract z: number; + private abstract w: number; + + abstract m: () => void; + + abstract foo_x(): number; + public abstract foo_y(): number; + protected abstract foo_z(): number; + private abstract foo_w(): number; +} + +================================================================================ +`; + +exports[`classAbstractSingleLineDecl.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A {} + +abstract +class B {} + +abstract + +class C {} + +new A; +new B; +new C; +=====================================output===================================== +abstract class A {} + +abstract; +class B {} + +abstract; + +class C {} + +new A(); +new B(); +new C(); + +================================================================================ +`; + +exports[`classAbstractSuperCalls.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class A { + foo() { return 1; } +} + +abstract class B extends A { + abstract foo(); + bar() { super.foo(); } + baz() { return this.foo; } +} + +class C extends B { + foo() { return 2; } + qux() { return super.foo() || super.foo; } + norf() { return super.bar(); } +} + +class AA { + foo() { return 1; } + bar() { return this.foo(); } +} + +abstract class BB extends AA { + abstract foo(); +} + +=====================================output===================================== +class A { + foo() { + return 1; + } +} + +abstract class B extends A { + abstract foo(); + bar() { + super.foo(); + } + baz() { + return this.foo; + } +} + +class C extends B { + foo() { + return 2; + } + qux() { + return super.foo() || super.foo; + } + norf() { + return super.bar(); + } +} + +class AA { + foo() { + return 1; + } + bar() { + return this.foo(); + } +} + +abstract class BB extends AA { + abstract foo(); +} + +================================================================================ +`; + +exports[`classAbstractUsingAbstractMethod1.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class A { + abstract foo() : number; +} + +class B extends A { + foo() { return 1; } +} + +abstract class C extends A { + abstract foo() : number; +} + +var a = new B; +a.foo(); + +a = new C; +a.foo(); +=====================================output===================================== +abstract class A { + abstract foo(): number; +} + +class B extends A { + foo() { + return 1; + } +} + +abstract class C extends A { + abstract foo(): number; +} + +var a = new B(); +a.foo(); + +a = new C(); +a.foo(); + +================================================================================ +`; + +exports[`classAbstractUsingAbstractMethods2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + abstract foo(); +} + +class B extends A {} + +abstract class C extends A {} + +class D extends A { + foo() {} +} + +abstract class E extends A { + foo() {} +} + +abstract class AA { + abstract foo(); +} + +class BB extends AA {} + +abstract class CC extends AA {} + +class DD extends AA { + foo() {} +} +=====================================output===================================== +class A { + abstract foo(); +} + +class B extends A {} + +abstract class C extends A {} + +class D extends A { + foo() {} +} + +abstract class E extends A { + foo() {} +} + +abstract class AA { + abstract foo(); +} + +class BB extends AA {} + +abstract class CC extends AA {} + +class DD extends AA { + foo() {} +} + +================================================================================ +`; + +exports[`classAbstractWithInterface.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +=====================================output===================================== + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2f9df8adccfe..000000000000 --- a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1044 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`classAbstractAccessor.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -abstract class A { - abstract get a(); - abstract set b(x: string); -} - -=====================================output===================================== -abstract class A { - abstract get a(); - abstract set b(x: string); -} - -================================================================================ -`; - -exports[`classAbstractAsIdentifier.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class abstract { - foo() { return 1; } -} - -new abstract; -=====================================output===================================== -class abstract { - foo() { - return 1; - } -} - -new abstract(); - -================================================================================ -`; - -exports[`classAbstractAssignabilityConstructorFunction.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A { } - -var AAA: new() => A; - -AAA = A; -AAA = "asdf"; -=====================================output===================================== -abstract class A {} - -var AAA: new () => A; - -AAA = A; -AAA = "asdf"; - -================================================================================ -`; - -exports[`classAbstractClinterfaceAssignability.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -var I: IConstructor; - -abstract class A { - x: number; - static y: number; -} - -var AA: typeof A; -AA = I; - -var AAA: typeof I; -AAA = A; -=====================================output===================================== -var I: IConstructor; - -abstract class A { - x: number; - static y: number; -} - -var AA: typeof A; -AA = I; - -var AAA: typeof I; -AAA = A; - -================================================================================ -`; - -exports[`classAbstractConstructorAssignability.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class A {} - -abstract class B extends A {} - -class C extends B {} - -var AA : typeof A = B; -var BB : typeof B = A; -var CC : typeof C = B; - -new AA; -new BB; -new CC; -=====================================output===================================== -class A {} - -abstract class B extends A {} - -class C extends B {} - -var AA: typeof A = B; -var BB: typeof B = A; -var CC: typeof C = B; - -new AA(); -new BB(); -new CC(); - -================================================================================ -`; - -exports[`classAbstractCrashedOnce.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class foo { - protected abstract test(); -} - -class bar extends foo { - test() { - } -} -var x = new bar(); -=====================================output===================================== -abstract class foo { - protected abstract test(); -} - -class bar extends foo { - test() {} -} -var x = new bar(); - -================================================================================ -`; - -exports[`classAbstractExtends.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class A { - foo() {} -} - -abstract class B extends A { - abstract bar(); -} - -class C extends B { } - -abstract class D extends B {} - -class E extends B { - bar() {} -} -=====================================output===================================== -class A { - foo() {} -} - -abstract class B extends A { - abstract bar(); -} - -class C extends B {} - -abstract class D extends B {} - -class E extends B { - bar() {} -} - -================================================================================ -`; - -exports[`classAbstractFactoryFunction.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class A {} -abstract class B extends A {} - -function NewA(Factory: typeof A) { - return new A; -} - -function NewB(Factory: typeof B) { - return new B; -} - -NewA(A); -NewA(B); - -NewB(A); -NewB(B); -=====================================output===================================== -class A {} -abstract class B extends A {} - -function NewA(Factory: typeof A) { - return new A(); -} - -function NewB(Factory: typeof B) { - return new B(); -} - -NewA(A); -NewA(B); - -NewB(A); -NewB(B); - -================================================================================ -`; - -exports[`classAbstractGeneric.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A<T> { - t: T; - - abstract foo(): T; - abstract bar(t: T); -} - -abstract class B<T> extends A {} - -class C<T> extends A {} - -class D extends A {} - -class E<T> extends A { - foo() { return this.t; } -} - -class F<T> extends A { - bar(t : T) {} -} - -class G<T> extends A { - foo() { return this.t; } - bar(t: T) { } -} -=====================================output===================================== -abstract class A<T> { - t: T; - - abstract foo(): T; - abstract bar(t: T); -} - -abstract class B<T> extends A {} - -class C<T> extends A {} - -class D extends A {} - -class E<T> extends A { - foo() { - return this.t; - } -} - -class F<T> extends A { - bar(t: T) {} -} - -class G<T> extends A { - foo() { - return this.t; - } - bar(t: T) {} -} - -================================================================================ -`; - -exports[`classAbstractImportInstantiation.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -export abstract class A {} - -new A; - - -new myA; - -=====================================output===================================== -export abstract class A {} - -new A(); - -new myA(); - -================================================================================ -`; - -exports[`classAbstractInAModule.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -export abstract class A {} -export class B extends A {} - - -new M.A; -new M.B; -=====================================output===================================== -export abstract class A {} -export class B extends A {} - -new M.A(); -new M.B(); - -================================================================================ -`; - -exports[`classAbstractInheritance.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A {} - -abstract class B extends A {} - -class C extends A {} - -abstract class AA { - abstract foo(); -} - -abstract class BB extends AA {} - -class CC extends AA {} - -class DD extends BB {} - -abstract class EE extends BB {} - -class FF extends CC {} - -abstract class GG extends CC {} -=====================================output===================================== -abstract class A {} - -abstract class B extends A {} - -class C extends A {} - -abstract class AA { - abstract foo(); -} - -abstract class BB extends AA {} - -class CC extends AA {} - -class DD extends BB {} - -abstract class EE extends BB {} - -class FF extends CC {} - -abstract class GG extends CC {} - -================================================================================ -`; - -exports[`classAbstractInstantiations1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -abstract class A {} - -class B extends A {} - -abstract class C extends B {} - -new A; -new A(1); -new B; -new C; - -var a : A; -var b : B; -var c : C; - -a = new B; -b = new B; -c = new B; - -=====================================output===================================== -abstract class A {} - -class B extends A {} - -abstract class C extends B {} - -new A(); -new A(1); -new B(); -new C(); - -var a: A; -var b: B; -var c: C; - -a = new B(); -b = new B(); -c = new B(); - -================================================================================ -`; - -exports[`classAbstractInstantiations2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { -} - -abstract class B { - foo(): number { return this.bar(); } - abstract bar() : number; -} - -new B; - -var BB: typeof B = B; -var AA: typeof A = BB; -new AA; - -function constructB(Factory : typeof B) { - new Factory; -} - -var BB = B; -new BB; - -var x : any = C; -new x; - -class C extends B { } - -abstract class D extends B { } - -class E extends B { - bar() { return 1; } -} - -abstract class F extends B { - abstract foo() : number; - bar() { return 2; } -} - -abstract class G { - abstract qux(x : number) : string; - abstract qux() : number; - y : number; - abstract quz(x : number, y : string) : boolean; - - abstract nom(): boolean; - nom(x : number): boolean; -} - -class H { - abstract baz() : number; -} -=====================================output===================================== -class A {} - -abstract class B { - foo(): number { - return this.bar(); - } - abstract bar(): number; -} - -new B(); - -var BB: typeof B = B; -var AA: typeof A = BB; -new AA(); - -function constructB(Factory: typeof B) { - new Factory(); -} - -var BB = B; -new BB(); - -var x: any = C; -new x(); - -class C extends B {} - -abstract class D extends B {} - -class E extends B { - bar() { - return 1; - } -} - -abstract class F extends B { - abstract foo(): number; - bar() { - return 2; - } -} - -abstract class G { - abstract qux(x: number): string; - abstract qux(): number; - y: number; - abstract quz(x: number, y: string): boolean; - - abstract nom(): boolean; - nom(x: number): boolean; -} - -class H { - abstract baz(): number; -} - -================================================================================ -`; - -exports[`classAbstractMethodInNonAbstractClass.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - abstract foo(); -} -=====================================output===================================== -class A { - abstract foo(); -} - -================================================================================ -`; - -exports[`classAbstractMixedWithModifiers.ts [babel-ts] format 1`] = ` -"'static' modifier cannot be used with 'abstract' modifier. (12:14) - 10 | abstract private foo_dd(); - 11 | -> 12 | abstract static foo_d(); - | ^ - 13 | - 14 | static abstract foo_e(); - 15 | }" -`; - -exports[`classAbstractMixedWithModifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A { - abstract foo_a(); - - public abstract foo_b(); - protected abstract foo_c(); - private abstract foo_d(); - - abstract public foo_bb(); - abstract protected foo_cc(); - abstract private foo_dd(); - - abstract static foo_d(); - - static abstract foo_e(); -} -=====================================output===================================== -abstract class A { - abstract foo_a(); - - public abstract foo_b(); - protected abstract foo_c(); - private abstract foo_d(); - - public abstract foo_bb(); - protected abstract foo_cc(); - private abstract foo_dd(); - - static abstract foo_d(); - - static abstract foo_e(); -} - -================================================================================ -`; - -exports[`classAbstractOverloads.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A { - abstract foo(); - abstract foo() : number; - abstract foo(); - - abstract bar(); - bar(); - abstract bar(); - - abstract baz(); - baz(); - abstract baz(); - baz() {} - - qux(); -} - -abstract class B { - abstract foo() : number; - abstract foo(); - x : number; - abstract foo(); - abstract foo(); -} -=====================================output===================================== -abstract class A { - abstract foo(); - abstract foo(): number; - abstract foo(); - - abstract bar(); - bar(); - abstract bar(); - - abstract baz(); - baz(); - abstract baz(); - baz() {} - - qux(); -} - -abstract class B { - abstract foo(): number; - abstract foo(); - x: number; - abstract foo(); - abstract foo(); -} - -================================================================================ -`; - -exports[`classAbstractOverrideWithAbstract.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - foo() {} -} - -abstract class B extends A { - abstract foo(); -} - -abstract class AA { - foo() {} - abstract bar(); -} - -abstract class BB extends AA { - abstract foo(); - bar () {} -} - -class CC extends BB {} - -class DD extends BB { - foo() {} -} -=====================================output===================================== -class A { - foo() {} -} - -abstract class B extends A { - abstract foo(); -} - -abstract class AA { - foo() {} - abstract bar(); -} - -abstract class BB extends AA { - abstract foo(); - bar() {} -} - -class CC extends BB {} - -class DD extends BB { - foo() {} -} - -================================================================================ -`; - -exports[`classAbstractProperties.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A { - abstract x : number; - public abstract y : number; - protected abstract z : number; - private abstract w : number; - - abstract m: () => void; - - abstract foo_x() : number; - public abstract foo_y() : number; - protected abstract foo_z() : number; - private abstract foo_w() : number; -} -=====================================output===================================== -abstract class A { - abstract x: number; - public abstract y: number; - protected abstract z: number; - private abstract w: number; - - abstract m: () => void; - - abstract foo_x(): number; - public abstract foo_y(): number; - protected abstract foo_z(): number; - private abstract foo_w(): number; -} - -================================================================================ -`; - -exports[`classAbstractSingleLineDecl.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A {} - -abstract -class B {} - -abstract - -class C {} - -new A; -new B; -new C; -=====================================output===================================== -abstract class A {} - -abstract; -class B {} - -abstract; - -class C {} - -new A(); -new B(); -new C(); - -================================================================================ -`; - -exports[`classAbstractSuperCalls.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class A { - foo() { return 1; } -} - -abstract class B extends A { - abstract foo(); - bar() { super.foo(); } - baz() { return this.foo; } -} - -class C extends B { - foo() { return 2; } - qux() { return super.foo() || super.foo; } - norf() { return super.bar(); } -} - -class AA { - foo() { return 1; } - bar() { return this.foo(); } -} - -abstract class BB extends AA { - abstract foo(); -} - -=====================================output===================================== -class A { - foo() { - return 1; - } -} - -abstract class B extends A { - abstract foo(); - bar() { - super.foo(); - } - baz() { - return this.foo; - } -} - -class C extends B { - foo() { - return 2; - } - qux() { - return super.foo() || super.foo; - } - norf() { - return super.bar(); - } -} - -class AA { - foo() { - return 1; - } - bar() { - return this.foo(); - } -} - -abstract class BB extends AA { - abstract foo(); -} - -================================================================================ -`; - -exports[`classAbstractUsingAbstractMethod1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class A { - abstract foo() : number; -} - -class B extends A { - foo() { return 1; } -} - -abstract class C extends A { - abstract foo() : number; -} - -var a = new B; -a.foo(); - -a = new C; -a.foo(); -=====================================output===================================== -abstract class A { - abstract foo(): number; -} - -class B extends A { - foo() { - return 1; - } -} - -abstract class C extends A { - abstract foo(): number; -} - -var a = new B(); -a.foo(); - -a = new C(); -a.foo(); - -================================================================================ -`; - -exports[`classAbstractUsingAbstractMethods2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - abstract foo(); -} - -class B extends A {} - -abstract class C extends A {} - -class D extends A { - foo() {} -} - -abstract class E extends A { - foo() {} -} - -abstract class AA { - abstract foo(); -} - -class BB extends AA {} - -abstract class CC extends AA {} - -class DD extends AA { - foo() {} -} -=====================================output===================================== -class A { - abstract foo(); -} - -class B extends A {} - -abstract class C extends A {} - -class D extends A { - foo() {} -} - -abstract class E extends A { - foo() {} -} - -abstract class AA { - abstract foo(); -} - -class BB extends AA {} - -abstract class CC extends AA {} - -class DD extends AA { - foo() {} -} - -================================================================================ -`; - -exports[`classAbstractWithInterface.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -=====================================output===================================== - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/format.test.js b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/format.test.js new file mode 100644 index 000000000000..070e81f140ec --- /dev/null +++ b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "babel-ts": ["classAbstractMixedWithModifiers.ts"], + }, +}); diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js deleted file mode 100644 index 68b5e790a13c..000000000000 --- a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { - "babel-ts": ["classAbstractMixedWithModifiers.ts"], - }, -}); diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/format.test.js b/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/jsfmt.spec.js b/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/classes/classDeclarations/classHeritageSpecification/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/classDeclarations/format.test.js b/tests/format/typescript/conformance/classes/classDeclarations/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/classes/classDeclarations/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/classDeclarations/jsfmt.spec.js b/tests/format/typescript/conformance/classes/classDeclarations/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/classes/classDeclarations/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f41b75f6e8dc --- /dev/null +++ b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap @@ -0,0 +1,538 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`constructorDefaultValuesReferencingThis.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + constructor(x = this) { } +} + +class D<T> { + constructor(x = this) { } +} + +class E<T> { + constructor(public x = this) { } +} +=====================================output===================================== +class C { + constructor(x = this) {} +} + +class D<T> { + constructor(x = this) {} +} + +class E<T> { + constructor(public x = this) {} +} + +================================================================================ +`; + +exports[`constructorImplementationWithDefaultValues.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + constructor(x); + constructor(x = 1) { + var y = x; + } +} + +class D<T> { + constructor(x); + constructor(x:T = null) { + var y = x; + } +} + +class E<T extends Date> { + constructor(x); + constructor(x: T = null) { + var y = x; + } +} +=====================================output===================================== +class C { + constructor(x); + constructor(x = 1) { + var y = x; + } +} + +class D<T> { + constructor(x); + constructor(x: T = null) { + var y = x; + } +} + +class E<T extends Date> { + constructor(x); + constructor(x: T = null) { + var y = x; + } +} + +================================================================================ +`; + +exports[`constructorImplementationWithDefaultValues2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + constructor(x); + constructor(public x: string = 1) { + var y = x; + } +} + +class D<T, U> { + constructor(x: T, y: U); + constructor(x: T = 1, public y: U = x) { + var z = x; + } +} + +class E<T extends Date> { + constructor(x); + constructor(x: T = new Date()) { + var y = x; + } +} +=====================================output===================================== +class C { + constructor(x); + constructor(public x: string = 1) { + var y = x; + } +} + +class D<T, U> { + constructor(x: T, y: U); + constructor( + x: T = 1, + public y: U = x, + ) { + var z = x; + } +} + +class E<T extends Date> { + constructor(x); + constructor(x: T = new Date()) { + var y = x; + } +} + +================================================================================ +`; + +exports[`constructorOverloadsWithDefaultValues.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + foo: string; + constructor(x = 1); + constructor() { + } +} + +class D<T> { + foo: string; + constructor(x = 1); + constructor() { + } +} +=====================================output===================================== +class C { + foo: string; + constructor(x = 1); + constructor() {} +} + +class D<T> { + foo: string; + constructor(x = 1); + constructor() {} +} + +================================================================================ +`; + +exports[`constructorOverloadsWithOptionalParameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + foo: string; + constructor(x?, y?: any[]); + constructor() { + } +} + +class D<T> { + foo: string; + constructor(x?, y?: any[]); + constructor() { + } +} +=====================================output===================================== +class C { + foo: string; + constructor(x?, y?: any[]); + constructor() {} +} + +class D<T> { + foo: string; + constructor(x?, y?: any[]); + constructor() {} +} + +================================================================================ +`; + +exports[`constructorParameterProperties.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + y: string; + constructor(private x: string, protected z: string) { } +} + +var c: C; +var r = c.y; +var r2 = c.x; // error +var r3 = c.z; // error + +class D<T> { + y: T; + constructor(a: T, private x: T, protected z: T) { } +} + +var d: D<string>; +var r = d.y; +var r2 = d.x; // error +var r3 = d.a; // error +var r4 = d.z; // error + +=====================================output===================================== +class C { + y: string; + constructor( + private x: string, + protected z: string, + ) {} +} + +var c: C; +var r = c.y; +var r2 = c.x; // error +var r3 = c.z; // error + +class D<T> { + y: T; + constructor( + a: T, + private x: T, + protected z: T, + ) {} +} + +var d: D<string>; +var r = d.y; +var r2 = d.x; // error +var r3 = d.a; // error +var r4 = d.z; // error + +================================================================================ +`; + +exports[`constructorParameterProperties2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + y: number; + constructor(y: number) { } // ok +} + +var c: C; +var r = c.y; + +class D { + y: number; + constructor(public y: number) { } +} + +var d: D; +var r2 = d.y; + +class E { + y: number; + constructor(private y: number) { } +} + +var e: E; +var r3 = e.y; // error + +class F { + y: number; + constructor(protected y: number) { } +} + +var f: F; +var r4 = f.y; // error + +=====================================output===================================== +class C { + y: number; + constructor(y: number) {} // ok +} + +var c: C; +var r = c.y; + +class D { + y: number; + constructor(public y: number) {} +} + +var d: D; +var r2 = d.y; + +class E { + y: number; + constructor(private y: number) {} +} + +var e: E; +var r3 = e.y; // error + +class F { + y: number; + constructor(protected y: number) {} +} + +var f: F; +var r4 = f.y; // error + +================================================================================ +`; + +exports[`declarationEmitReadonly.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @declaration: true + +class C { + constructor(readonly x: number) {} +} +=====================================output===================================== +// @declaration: true + +class C { + constructor(readonly x: number) {} +} + +================================================================================ +`; + +exports[`readonlyConstructorAssignment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Tests that readonly parameter properties behave like regular readonly properties + +class A { + constructor(readonly x: number) { + this.x = 0; + } +} + +class B extends A { + constructor(x: number) { + super(x); + // Fails, x is readonly + this.x = 1; + } +} + +class C extends A { + // This is the usual behavior of readonly properties: + // if one is redeclared in a base class, then it can be assigned to. + constructor(readonly x: number) { + super(x); + this.x = 1; + } +} + +class D { + constructor(private readonly x: number) { + this.x = 0; + } +} + +// Fails, can't redeclare readonly property +class E extends D { + constructor(readonly x: number) { + super(x); + this.x = 1; + } +} + +=====================================output===================================== +// Tests that readonly parameter properties behave like regular readonly properties + +class A { + constructor(readonly x: number) { + this.x = 0; + } +} + +class B extends A { + constructor(x: number) { + super(x); + // Fails, x is readonly + this.x = 1; + } +} + +class C extends A { + // This is the usual behavior of readonly properties: + // if one is redeclared in a base class, then it can be assigned to. + constructor(readonly x: number) { + super(x); + this.x = 1; + } +} + +class D { + constructor(private readonly x: number) { + this.x = 0; + } +} + +// Fails, can't redeclare readonly property +class E extends D { + constructor(readonly x: number) { + super(x); + this.x = 1; + } +} + +================================================================================ +`; + +exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = ` +"'public' modifier must precede 'readonly' modifier. (7:26) + 5 | + 6 | class E { +> 7 | constructor(readonly public x: number) {} + | ^ + 8 | } + 9 | + 10 | class F { +Cause: 'public' modifier must precede 'readonly' modifier. (7:25)" +`; + +exports[`readonlyInConstructorParameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + constructor(readonly x: number) {} +} +new C(1).x = 2; + +class E { + constructor(readonly public x: number) {} +} + +class F { + constructor(private readonly x: number) {} +} +new F(1).x; +=====================================output===================================== +class C { + constructor(readonly x: number) {} +} +new C(1).x = 2; + +class E { + constructor(public readonly x: number) {} +} + +class F { + constructor(private readonly x: number) {} +} +new F(1).x; + +================================================================================ +`; + +exports[`readonlyReadonly.ts [babel-ts] format 1`] = ` +"Duplicate modifier: 'readonly'. (2:14) + 1 | class C { +> 2 | readonly readonly x: number; + | ^ + 3 | constructor(readonly readonly y: number) {} + 4 | } +Cause: Duplicate modifier: 'readonly'. (2:13)" +`; + +exports[`readonlyReadonly.ts [oxc-ts] format 1`] = ` +"'readonly' modifier already seen. (2:14) + 1 | class C { +> 2 | readonly readonly x: number; + | ^^^^^^^^ + 3 | constructor(readonly readonly y: number) {} + 4 | }" +`; + +exports[`readonlyReadonly.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + readonly readonly x: number; + constructor(readonly readonly y: number) {} +} +=====================================output===================================== +class C { + readonly x: number; + constructor(readonly y: number) {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9af9892ee8e0..000000000000 --- a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,517 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`constructorDefaultValuesReferencingThis.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - constructor(x = this) { } -} - -class D<T> { - constructor(x = this) { } -} - -class E<T> { - constructor(public x = this) { } -} -=====================================output===================================== -class C { - constructor(x = this) {} -} - -class D<T> { - constructor(x = this) {} -} - -class E<T> { - constructor(public x = this) {} -} - -================================================================================ -`; - -exports[`constructorImplementationWithDefaultValues.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - constructor(x); - constructor(x = 1) { - var y = x; - } -} - -class D<T> { - constructor(x); - constructor(x:T = null) { - var y = x; - } -} - -class E<T extends Date> { - constructor(x); - constructor(x: T = null) { - var y = x; - } -} -=====================================output===================================== -class C { - constructor(x); - constructor(x = 1) { - var y = x; - } -} - -class D<T> { - constructor(x); - constructor(x: T = null) { - var y = x; - } -} - -class E<T extends Date> { - constructor(x); - constructor(x: T = null) { - var y = x; - } -} - -================================================================================ -`; - -exports[`constructorImplementationWithDefaultValues2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - constructor(x); - constructor(public x: string = 1) { - var y = x; - } -} - -class D<T, U> { - constructor(x: T, y: U); - constructor(x: T = 1, public y: U = x) { - var z = x; - } -} - -class E<T extends Date> { - constructor(x); - constructor(x: T = new Date()) { - var y = x; - } -} -=====================================output===================================== -class C { - constructor(x); - constructor(public x: string = 1) { - var y = x; - } -} - -class D<T, U> { - constructor(x: T, y: U); - constructor(x: T = 1, public y: U = x) { - var z = x; - } -} - -class E<T extends Date> { - constructor(x); - constructor(x: T = new Date()) { - var y = x; - } -} - -================================================================================ -`; - -exports[`constructorOverloadsWithDefaultValues.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - foo: string; - constructor(x = 1); - constructor() { - } -} - -class D<T> { - foo: string; - constructor(x = 1); - constructor() { - } -} -=====================================output===================================== -class C { - foo: string; - constructor(x = 1); - constructor() {} -} - -class D<T> { - foo: string; - constructor(x = 1); - constructor() {} -} - -================================================================================ -`; - -exports[`constructorOverloadsWithOptionalParameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - foo: string; - constructor(x?, y?: any[]); - constructor() { - } -} - -class D<T> { - foo: string; - constructor(x?, y?: any[]); - constructor() { - } -} -=====================================output===================================== -class C { - foo: string; - constructor(x?, y?: any[]); - constructor() {} -} - -class D<T> { - foo: string; - constructor(x?, y?: any[]); - constructor() {} -} - -================================================================================ -`; - -exports[`constructorParameterProperties.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - y: string; - constructor(private x: string, protected z: string) { } -} - -var c: C; -var r = c.y; -var r2 = c.x; // error -var r3 = c.z; // error - -class D<T> { - y: T; - constructor(a: T, private x: T, protected z: T) { } -} - -var d: D<string>; -var r = d.y; -var r2 = d.x; // error -var r3 = d.a; // error -var r4 = d.z; // error - -=====================================output===================================== -class C { - y: string; - constructor(private x: string, protected z: string) {} -} - -var c: C; -var r = c.y; -var r2 = c.x; // error -var r3 = c.z; // error - -class D<T> { - y: T; - constructor(a: T, private x: T, protected z: T) {} -} - -var d: D<string>; -var r = d.y; -var r2 = d.x; // error -var r3 = d.a; // error -var r4 = d.z; // error - -================================================================================ -`; - -exports[`constructorParameterProperties2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - y: number; - constructor(y: number) { } // ok -} - -var c: C; -var r = c.y; - -class D { - y: number; - constructor(public y: number) { } -} - -var d: D; -var r2 = d.y; - -class E { - y: number; - constructor(private y: number) { } -} - -var e: E; -var r3 = e.y; // error - -class F { - y: number; - constructor(protected y: number) { } -} - -var f: F; -var r4 = f.y; // error - -=====================================output===================================== -class C { - y: number; - constructor(y: number) {} // ok -} - -var c: C; -var r = c.y; - -class D { - y: number; - constructor(public y: number) {} -} - -var d: D; -var r2 = d.y; - -class E { - y: number; - constructor(private y: number) {} -} - -var e: E; -var r3 = e.y; // error - -class F { - y: number; - constructor(protected y: number) {} -} - -var f: F; -var r4 = f.y; // error - -================================================================================ -`; - -exports[`declarationEmitReadonly.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @declaration: true - -class C { - constructor(readonly x: number) {} -} -=====================================output===================================== -// @declaration: true - -class C { - constructor(readonly x: number) {} -} - -================================================================================ -`; - -exports[`readonlyConstructorAssignment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Tests that readonly parameter properties behave like regular readonly properties - -class A { - constructor(readonly x: number) { - this.x = 0; - } -} - -class B extends A { - constructor(x: number) { - super(x); - // Fails, x is readonly - this.x = 1; - } -} - -class C extends A { - // This is the usual behavior of readonly properties: - // if one is redeclared in a base class, then it can be assigned to. - constructor(readonly x: number) { - super(x); - this.x = 1; - } -} - -class D { - constructor(private readonly x: number) { - this.x = 0; - } -} - -// Fails, can't redeclare readonly property -class E extends D { - constructor(readonly x: number) { - super(x); - this.x = 1; - } -} - -=====================================output===================================== -// Tests that readonly parameter properties behave like regular readonly properties - -class A { - constructor(readonly x: number) { - this.x = 0; - } -} - -class B extends A { - constructor(x: number) { - super(x); - // Fails, x is readonly - this.x = 1; - } -} - -class C extends A { - // This is the usual behavior of readonly properties: - // if one is redeclared in a base class, then it can be assigned to. - constructor(readonly x: number) { - super(x); - this.x = 1; - } -} - -class D { - constructor(private readonly x: number) { - this.x = 0; - } -} - -// Fails, can't redeclare readonly property -class E extends D { - constructor(readonly x: number) { - super(x); - this.x = 1; - } -} - -================================================================================ -`; - -exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = ` -"'public' modifier must precede 'readonly' modifier. (7:26) - 5 | - 6 | class E { -> 7 | constructor(readonly public x: number) {} - | ^ - 8 | } - 9 | - 10 | class F {" -`; - -exports[`readonlyInConstructorParameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - constructor(readonly x: number) {} -} -new C(1).x = 2; - -class E { - constructor(readonly public x: number) {} -} - -class F { - constructor(private readonly x: number) {} -} -new F(1).x; -=====================================output===================================== -class C { - constructor(readonly x: number) {} -} -new C(1).x = 2; - -class E { - constructor(public readonly x: number) {} -} - -class F { - constructor(private readonly x: number) {} -} -new F(1).x; - -================================================================================ -`; - -exports[`readonlyReadonly.ts [babel-ts] format 1`] = ` -"Duplicate modifier: 'readonly'. (2:14) - 1 | class C { -> 2 | readonly readonly x: number; - | ^ - 3 | constructor(readonly readonly y: number) {} - 4 | }" -`; - -exports[`readonlyReadonly.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - readonly readonly x: number; - constructor(readonly readonly y: number) {} -} -=====================================output===================================== -class C { - readonly x: number; - constructor(readonly y: number) {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/format.test.js b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/format.test.js new file mode 100644 index 000000000000..da58106e0b1c --- /dev/null +++ b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "babel-ts": ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"], + "oxc-ts": ["readonlyReadonly.ts"], + }, +}); diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js deleted file mode 100644 index 69ab761dc407..000000000000 --- a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { - "babel-ts": ["readonlyInConstructorParameters.ts", "readonlyReadonly.ts"], - }, -}); diff --git a/tests/format/typescript/conformance/classes/format.test.js b/tests/format/typescript/conformance/classes/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/classes/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/classes/jsfmt.spec.js b/tests/format/typescript/conformance/classes/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/classes/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/comments/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/comments/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/comments/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/comments/format.test.js b/tests/format/typescript/conformance/comments/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/comments/jsfmt.spec.js b/tests/format/typescript/conformance/comments/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/comments/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/declarationEmit/typePredicates/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/declarationEmit/typePredicates/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/declarationEmit/typePredicates/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/declarationEmit/typePredicates/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/declarationEmit/typePredicates/format.test.js b/tests/format/typescript/conformance/declarationEmit/typePredicates/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/declarationEmit/typePredicates/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/declarationEmit/typePredicates/jsfmt.spec.js b/tests/format/typescript/conformance/declarationEmit/typePredicates/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/declarationEmit/typePredicates/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/es6/Symbols/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/es6/Symbols/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/es6/Symbols/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/es6/Symbols/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/es6/Symbols/format.test.js b/tests/format/typescript/conformance/es6/Symbols/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/es6/Symbols/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/es6/Symbols/jsfmt.spec.js b/tests/format/typescript/conformance/es6/Symbols/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/es6/Symbols/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/es6/templates/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/es6/templates/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/es6/templates/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/es6/templates/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/es6/templates/format.test.js b/tests/format/typescript/conformance/es6/templates/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/es6/templates/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/es6/templates/jsfmt.spec.js b/tests/format/typescript/conformance/es6/templates/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/es6/templates/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/expressions/asOperator/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/expressions/asOperator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/expressions/asOperator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/expressions/asOperator/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/expressions/asOperator/format.test.js b/tests/format/typescript/conformance/expressions/asOperator/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/expressions/asOperator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/expressions/asOperator/jsfmt.spec.js b/tests/format/typescript/conformance/expressions/asOperator/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/expressions/asOperator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/expressions/functionCalls/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/expressions/functionCalls/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/expressions/functionCalls/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/expressions/functionCalls/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/expressions/functionCalls/format.test.js b/tests/format/typescript/conformance/expressions/functionCalls/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/expressions/functionCalls/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/expressions/functionCalls/jsfmt.spec.js b/tests/format/typescript/conformance/expressions/functionCalls/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/expressions/functionCalls/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/interfaces/interfaceDeclarations/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/interfaces/interfaceDeclarations/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/interfaces/interfaceDeclarations/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/interfaces/interfaceDeclarations/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/interfaces/interfaceDeclarations/format.test.js b/tests/format/typescript/conformance/interfaces/interfaceDeclarations/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/interfaces/interfaceDeclarations/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/interfaces/interfaceDeclarations/jsfmt.spec.js b/tests/format/typescript/conformance/interfaces/interfaceDeclarations/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/interfaces/interfaceDeclarations/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c2011e6d3e98 --- /dev/null +++ b/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/format.test.js.snap @@ -0,0 +1,456 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`circularImportAlias.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// expected no error + +module B { + export import a = A; + export class D extends a.C { + id: number; + } +} + +module A { + export class C { name: string } + export import b = B; +} + +var c: { name: string }; +var c = new B.a.C(); + + + +=====================================output===================================== +// expected no error + +module B { + export import a = A; + export class D extends a.C { + id: number; + } +} + +module A { + export class C { + name: string; + } + export import b = B; +} + +var c: { name: string }; +var c = new B.a.C(); + +================================================================================ +`; + +exports[`exportImportAlias.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// expect no errors here + +module A { + + export var x = 'hello world' + export class Point { + constructor(public x: number, public y: number) { } + } + export module B { + export interface Id { + name: string; + } + } +} + +module C { + export import a = A; +} + +var a: string = C.a.x; +var b: { x: number; y: number; } = new C.a.Point(0, 0); +var c: { name: string }; +var c: C.a.B.Id; + +module X { + export function Y() { + return 42; + } + + export module Y { + export class Point { + constructor(public x: number, public y: number) { } + } + } +} + +module Z { + + // 'y' should be a fundule here + export import y = X.Y; +} + +var m: number = Z.y(); +var n: { x: number; y: number; } = new Z.y.Point(0, 0); + +module K { + export class L { + constructor(public name: string) { } + } + + export module L { + export var y = 12; + export interface Point { + x: number; + y: number; + } + } +} + +module M { + export import D = K.L; +} + +var o: { name: string }; +var o = new M.D('Hello'); + +var p: { x: number; y: number; } +var p: M.D.Point; +=====================================output===================================== +// expect no errors here + +module A { + export var x = "hello world"; + export class Point { + constructor( + public x: number, + public y: number, + ) {} + } + export module B { + export interface Id { + name: string; + } + } +} + +module C { + export import a = A; +} + +var a: string = C.a.x; +var b: { x: number; y: number } = new C.a.Point(0, 0); +var c: { name: string }; +var c: C.a.B.Id; + +module X { + export function Y() { + return 42; + } + + export module Y { + export class Point { + constructor( + public x: number, + public y: number, + ) {} + } + } +} + +module Z { + // 'y' should be a fundule here + export import y = X.Y; +} + +var m: number = Z.y(); +var n: { x: number; y: number } = new Z.y.Point(0, 0); + +module K { + export class L { + constructor(public name: string) {} + } + + export module L { + export var y = 12; + export interface Point { + x: number; + y: number; + } + } +} + +module M { + export import D = K.L; +} + +var o: { name: string }; +var o = new M.D("Hello"); + +var p: { x: number; y: number }; +var p: M.D.Point; + +================================================================================ +`; + +exports[`exportInterface.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export interface I {} +=====================================output===================================== +export interface I {} + +================================================================================ +`; + +exports[`importAliasIdentifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module moduleA { + export class Point { + constructor(public x: number, public y: number) { } + } +} + +import alias = moduleA; + +var p: alias.Point; +var p: moduleA.Point; +var p: { x: number; y: number; }; + +class clodule { + name: string; +} + +module clodule { + export interface Point { + x: number; y: number; + } + var Point: Point = { x: 0, y: 0 }; +} + +import clolias = clodule; + +var p: clolias.Point; +var p: clodule.Point; +var p: { x: number; y: number; }; + + +function fundule() { + return { x: 0, y: 0 }; +} + +module fundule { + export interface Point { + x: number; y: number; + } + var Point: Point = { x: 0, y: 0 }; +} + +import funlias = fundule; + +var p: funlias.Point; +var p: fundule.Point; +var p: { x: number; y: number; }; +=====================================output===================================== +module moduleA { + export class Point { + constructor( + public x: number, + public y: number, + ) {} + } +} + +import alias = moduleA; + +var p: alias.Point; +var p: moduleA.Point; +var p: { x: number; y: number }; + +class clodule { + name: string; +} + +module clodule { + export interface Point { + x: number; + y: number; + } + var Point: Point = { x: 0, y: 0 }; +} + +import clolias = clodule; + +var p: clolias.Point; +var p: clodule.Point; +var p: { x: number; y: number }; + +function fundule() { + return { x: 0, y: 0 }; +} + +module fundule { + export interface Point { + x: number; + y: number; + } + var Point: Point = { x: 0, y: 0 }; +} + +import funlias = fundule; + +var p: funlias.Point; +var p: fundule.Point; +var p: { x: number; y: number }; + +================================================================================ +`; + +exports[`invalidImportAliasIdentifiers.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// none of these should work, since non are actually modules + +var V = 12; + +import v = V; + +class C { + name: string; +} + +import c = C; + +enum E { + Red, Blue +} + +import e = E; + +interface I { + id: number; +} + +import i = I; + +=====================================output===================================== +// none of these should work, since non are actually modules + +var V = 12; + +import v = V; + +class C { + name: string; +} + +import c = C; + +enum E { + Red, + Blue, +} + +import e = E; + +interface I { + id: number; +} + +import i = I; + +================================================================================ +`; + +exports[`shadowedInternalModule.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// all errors imported modules conflict with local variables + +module A { + export var Point = { x: 0, y: 0 } + export interface Point { + x: number; + y: number; + } +} + +module B { + var A = { x: 0, y: 0 }; + import Point = A; +} + +module X { + export module Y { + export interface Point{ + x: number; + y: number + } + } + + export class Y { + name: string; + } +} + +module Z { + import Y = X.Y; + + var Y = 12; +} +=====================================output===================================== +// all errors imported modules conflict with local variables + +module A { + export var Point = { x: 0, y: 0 }; + export interface Point { + x: number; + y: number; + } +} + +module B { + var A = { x: 0, y: 0 }; + import Point = A; +} + +module X { + export module Y { + export interface Point { + x: number; + y: number; + } + } + + export class Y { + name: string; + } +} + +module Z { + import Y = X.Y; + + var Y = 12; +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9a81e7dabada..000000000000 --- a/tests/format/typescript/conformance/internalModules/importDeclarations/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,447 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`circularImportAlias.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// expected no error - -module B { - export import a = A; - export class D extends a.C { - id: number; - } -} - -module A { - export class C { name: string } - export import b = B; -} - -var c: { name: string }; -var c = new B.a.C(); - - - -=====================================output===================================== -// expected no error - -module B { - export import a = A; - export class D extends a.C { - id: number; - } -} - -module A { - export class C { - name: string; - } - export import b = B; -} - -var c: { name: string }; -var c = new B.a.C(); - -================================================================================ -`; - -exports[`exportImportAlias.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// expect no errors here - -module A { - - export var x = 'hello world' - export class Point { - constructor(public x: number, public y: number) { } - } - export module B { - export interface Id { - name: string; - } - } -} - -module C { - export import a = A; -} - -var a: string = C.a.x; -var b: { x: number; y: number; } = new C.a.Point(0, 0); -var c: { name: string }; -var c: C.a.B.Id; - -module X { - export function Y() { - return 42; - } - - export module Y { - export class Point { - constructor(public x: number, public y: number) { } - } - } -} - -module Z { - - // 'y' should be a fundule here - export import y = X.Y; -} - -var m: number = Z.y(); -var n: { x: number; y: number; } = new Z.y.Point(0, 0); - -module K { - export class L { - constructor(public name: string) { } - } - - export module L { - export var y = 12; - export interface Point { - x: number; - y: number; - } - } -} - -module M { - export import D = K.L; -} - -var o: { name: string }; -var o = new M.D('Hello'); - -var p: { x: number; y: number; } -var p: M.D.Point; -=====================================output===================================== -// expect no errors here - -module A { - export var x = "hello world"; - export class Point { - constructor(public x: number, public y: number) {} - } - export module B { - export interface Id { - name: string; - } - } -} - -module C { - export import a = A; -} - -var a: string = C.a.x; -var b: { x: number; y: number } = new C.a.Point(0, 0); -var c: { name: string }; -var c: C.a.B.Id; - -module X { - export function Y() { - return 42; - } - - export module Y { - export class Point { - constructor(public x: number, public y: number) {} - } - } -} - -module Z { - // 'y' should be a fundule here - export import y = X.Y; -} - -var m: number = Z.y(); -var n: { x: number; y: number } = new Z.y.Point(0, 0); - -module K { - export class L { - constructor(public name: string) {} - } - - export module L { - export var y = 12; - export interface Point { - x: number; - y: number; - } - } -} - -module M { - export import D = K.L; -} - -var o: { name: string }; -var o = new M.D("Hello"); - -var p: { x: number; y: number }; -var p: M.D.Point; - -================================================================================ -`; - -exports[`exportInterface.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export interface I {} -=====================================output===================================== -export interface I {} - -================================================================================ -`; - -exports[`importAliasIdentifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -module moduleA { - export class Point { - constructor(public x: number, public y: number) { } - } -} - -import alias = moduleA; - -var p: alias.Point; -var p: moduleA.Point; -var p: { x: number; y: number; }; - -class clodule { - name: string; -} - -module clodule { - export interface Point { - x: number; y: number; - } - var Point: Point = { x: 0, y: 0 }; -} - -import clolias = clodule; - -var p: clolias.Point; -var p: clodule.Point; -var p: { x: number; y: number; }; - - -function fundule() { - return { x: 0, y: 0 }; -} - -module fundule { - export interface Point { - x: number; y: number; - } - var Point: Point = { x: 0, y: 0 }; -} - -import funlias = fundule; - -var p: funlias.Point; -var p: fundule.Point; -var p: { x: number; y: number; }; -=====================================output===================================== -module moduleA { - export class Point { - constructor(public x: number, public y: number) {} - } -} - -import alias = moduleA; - -var p: alias.Point; -var p: moduleA.Point; -var p: { x: number; y: number }; - -class clodule { - name: string; -} - -module clodule { - export interface Point { - x: number; - y: number; - } - var Point: Point = { x: 0, y: 0 }; -} - -import clolias = clodule; - -var p: clolias.Point; -var p: clodule.Point; -var p: { x: number; y: number }; - -function fundule() { - return { x: 0, y: 0 }; -} - -module fundule { - export interface Point { - x: number; - y: number; - } - var Point: Point = { x: 0, y: 0 }; -} - -import funlias = fundule; - -var p: funlias.Point; -var p: fundule.Point; -var p: { x: number; y: number }; - -================================================================================ -`; - -exports[`invalidImportAliasIdentifiers.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// none of these should work, since non are actually modules - -var V = 12; - -import v = V; - -class C { - name: string; -} - -import c = C; - -enum E { - Red, Blue -} - -import e = E; - -interface I { - id: number; -} - -import i = I; - -=====================================output===================================== -// none of these should work, since non are actually modules - -var V = 12; - -import v = V; - -class C { - name: string; -} - -import c = C; - -enum E { - Red, - Blue, -} - -import e = E; - -interface I { - id: number; -} - -import i = I; - -================================================================================ -`; - -exports[`shadowedInternalModule.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// all errors imported modules conflict with local variables - -module A { - export var Point = { x: 0, y: 0 } - export interface Point { - x: number; - y: number; - } -} - -module B { - var A = { x: 0, y: 0 }; - import Point = A; -} - -module X { - export module Y { - export interface Point{ - x: number; - y: number - } - } - - export class Y { - name: string; - } -} - -module Z { - import Y = X.Y; - - var Y = 12; -} -=====================================output===================================== -// all errors imported modules conflict with local variables - -module A { - export var Point = { x: 0, y: 0 }; - export interface Point { - x: number; - y: number; - } -} - -module B { - var A = { x: 0, y: 0 }; - import Point = A; -} - -module X { - export module Y { - export interface Point { - x: number; - y: number; - } - } - - export class Y { - name: string; - } -} - -module Z { - import Y = X.Y; - - var Y = 12; -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/internalModules/importDeclarations/format.test.js b/tests/format/typescript/conformance/internalModules/importDeclarations/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/internalModules/importDeclarations/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/internalModules/importDeclarations/jsfmt.spec.js b/tests/format/typescript/conformance/internalModules/importDeclarations/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/internalModules/importDeclarations/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5109b5905c42..000000000000 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,77 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`parserES5ForOfStatement2.ts [babel-ts] format 1`] = ` -"Missing semicolon. (2:12) - 1 | //@target: ES5 -> 2 | for (var of X) { - | ^ - 3 | } - 4 |" -`; - -exports[`parserES5ForOfStatement2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -//@target: ES5 -for (var of X) { -} - -=====================================output===================================== -//@target: ES5 -for (var of X) { -} - -================================================================================ -`; - -exports[`parserES5ForOfStatement21.ts [babel-ts] format 1`] = ` -"Unexpected token (2:15) - 1 | //@target: ES5 -> 2 | for (var of of) { } - | ^ - 3 |" -`; - -exports[`parserES5ForOfStatement21.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -//@target: ES5 -for (var of of) { } - -=====================================output===================================== -//@target: ES5 -for (var of of) { -} - -================================================================================ -`; - -exports[`parserForInStatement2.ts [babel-ts] format 1`] = ` -"Unexpected keyword 'in'. (1:10) -> 1 | for (var in X) { - | ^ - 2 | } - 3 |" -`; - -exports[`parserForInStatement2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -for (var in X) { -} - -=====================================output===================================== -for (var in X) { -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/jsfmt.spec.js b/tests/format/typescript/conformance/parser/ecmascript5/Statements/jsfmt.spec.js deleted file mode 100644 index 4c48f7a811fd..000000000000 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"], { errors: { "babel-ts": true } }); diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts b/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts deleted file mode 100644 index 3c2941e34605..000000000000 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement2.ts +++ /dev/null @@ -1,3 +0,0 @@ -//@target: ES5 -for (var of X) { -} diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts b/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts deleted file mode 100644 index 4ea9e3261075..000000000000 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts +++ /dev/null @@ -1,2 +0,0 @@ -//@target: ES5 -for (var of of) { } diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts b/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts deleted file mode 100644 index e6cf42d7a24d..000000000000 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts +++ /dev/null @@ -1,2 +0,0 @@ -for (var in X) { -} diff --git a/tests/format/typescript/conformance/types/abstractKeyword/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/abstractKeyword/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5d8631a61c01..000000000000 --- a/tests/format/typescript/conformance/types/abstractKeyword/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,15 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstractKeyword.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract interface I {} - -=====================================output===================================== -abstract interface I {} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/types/abstractKeyword/abstractKeyword.ts b/tests/format/typescript/conformance/types/abstractKeyword/abstractKeyword.ts deleted file mode 100644 index 45aeaa9cb9ca..000000000000 --- a/tests/format/typescript/conformance/types/abstractKeyword/abstractKeyword.ts +++ /dev/null @@ -1 +0,0 @@ -abstract interface I {} diff --git a/tests/format/typescript/conformance/types/abstractKeyword/jsfmt.spec.js b/tests/format/typescript/conformance/types/abstractKeyword/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/abstractKeyword/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/ambient/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/ambient/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/ambient/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/ambient/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/ambient/format.test.js b/tests/format/typescript/conformance/types/ambient/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/ambient/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/ambient/jsfmt.spec.js b/tests/format/typescript/conformance/types/ambient/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/ambient/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/any/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/any/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/any/format.test.js b/tests/format/typescript/conformance/types/any/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/any/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/any/jsfmt.spec.js b/tests/format/typescript/conformance/types/any/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/any/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/constKeyword/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/constKeyword/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/constKeyword/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/constKeyword/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/constKeyword/format.test.js b/tests/format/typescript/conformance/types/constKeyword/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/constKeyword/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/constKeyword/jsfmt.spec.js b/tests/format/typescript/conformance/types/constKeyword/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/constKeyword/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/constructorType/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/constructorType/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/constructorType/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/constructorType/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/constructorType/format.test.js b/tests/format/typescript/conformance/types/constructorType/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/constructorType/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/constructorType/jsfmt.spec.js b/tests/format/typescript/conformance/types/constructorType/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/constructorType/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/enumDeclaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/enumDeclaration/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/enumDeclaration/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/enumDeclaration/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/enumDeclaration/format.test.js b/tests/format/typescript/conformance/types/enumDeclaration/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/enumDeclaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/enumDeclaration/jsfmt.spec.js b/tests/format/typescript/conformance/types/enumDeclaration/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/enumDeclaration/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..12b989d03251 --- /dev/null +++ b/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/format.test.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`firstTypeNode.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export function fooWithTypePredicate(a: any): a is number { + return true; +} +export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a is number { + return true; +} +export function fooWithTypeTypePredicateAndGeneric<T>(a: any): a is T { + return true; +} +export function fooWithTypeTypePredicateAndRestParam(a: any, ...rest): a is number { + return true; +} + +=====================================output===================================== +export function fooWithTypePredicate(a: any): a is number { + return true; +} +export function fooWithTypePredicateAndMulitpleParams( + a: any, + b: any, + c: any, +): a is number { + return true; +} +export function fooWithTypeTypePredicateAndGeneric<T>(a: any): a is T { + return true; +} +export function fooWithTypeTypePredicateAndRestParam( + a: any, + ...rest +): a is number { + return true; +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 13b9950bec00..000000000000 --- a/tests/format/typescript/conformance/types/firstTypeNode/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,44 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`firstTypeNode.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export function fooWithTypePredicate(a: any): a is number { - return true; -} -export function fooWithTypePredicateAndMulitpleParams(a: any, b: any, c: any): a is number { - return true; -} -export function fooWithTypeTypePredicateAndGeneric<T>(a: any): a is T { - return true; -} -export function fooWithTypeTypePredicateAndRestParam(a: any, ...rest): a is number { - return true; -} - -=====================================output===================================== -export function fooWithTypePredicate(a: any): a is number { - return true; -} -export function fooWithTypePredicateAndMulitpleParams( - a: any, - b: any, - c: any -): a is number { - return true; -} -export function fooWithTypeTypePredicateAndGeneric<T>(a: any): a is T { - return true; -} -export function fooWithTypeTypePredicateAndRestParam( - a: any, - ...rest -): a is number { - return true; -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/types/firstTypeNode/format.test.js b/tests/format/typescript/conformance/types/firstTypeNode/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/firstTypeNode/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/firstTypeNode/jsfmt.spec.js b/tests/format/typescript/conformance/types/firstTypeNode/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/firstTypeNode/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..758584ffb542 --- /dev/null +++ b/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap @@ -0,0 +1,767 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`TSFunctionTypeNoUnnecessaryParentheses.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + bar: (() => boolean); +} +=====================================output===================================== +class Foo { + bar: () => boolean; +} + +================================================================================ +`; + +exports[`functionImplementationErrors.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @allowUnreachableCode: true + +// FunctionExpression with no return type annotation with multiple return statements with unrelated types +var f1 = function () { + return ''; + return 3; +}; +var f2 = function x() { + return ''; + return 3; +}; +var f3 = () => { + return ''; + return 3; +}; + +// FunctionExpression with no return type annotation with return branch of number[] and other of string[] +var f4 = function () { + if (true) { + return ['']; + } else { + return [1]; + } +} + +// Function implementation with non -void return type annotation with no return +function f5(): number { +} + +var m; +// Function signature with parameter initializer referencing in scope local variable +function f6(n = m) { + var m = 4; +} + +// Function signature with initializer referencing other parameter to the right +function f7(n = m, m?) { +} + +// FunctionExpression with non -void return type annotation with a throw, no return, and other code +// Should be error but isn't +undefined === function (): number { + throw undefined; + var x = 4; +}; + +class Base { private x; } +class AnotherClass { private y; } +class Derived1 extends Base { private m; } +class Derived2 extends Base { private n; } +function f8() { + return new Derived1(); + return new Derived2(); +} +var f9 = function () { + return new Derived1(); + return new Derived2(); +}; +var f10 = () => { + return new Derived1(); + return new Derived2(); +}; +function f11() { + return new Base(); + return new AnotherClass(); +} +var f12 = function () { + return new Base(); + return new AnotherClass(); +}; +var f13 = () => { + return new Base(); + return new AnotherClass(); +}; + +=====================================output===================================== +// @allowUnreachableCode: true + +// FunctionExpression with no return type annotation with multiple return statements with unrelated types +var f1 = function () { + return ""; + return 3; +}; +var f2 = function x() { + return ""; + return 3; +}; +var f3 = () => { + return ""; + return 3; +}; + +// FunctionExpression with no return type annotation with return branch of number[] and other of string[] +var f4 = function () { + if (true) { + return [""]; + } else { + return [1]; + } +}; + +// Function implementation with non -void return type annotation with no return +function f5(): number {} + +var m; +// Function signature with parameter initializer referencing in scope local variable +function f6(n = m) { + var m = 4; +} + +// Function signature with initializer referencing other parameter to the right +function f7(n = m, m?) {} + +// FunctionExpression with non -void return type annotation with a throw, no return, and other code +// Should be error but isn't +undefined === + function (): number { + throw undefined; + var x = 4; + }; + +class Base { + private x; +} +class AnotherClass { + private y; +} +class Derived1 extends Base { + private m; +} +class Derived2 extends Base { + private n; +} +function f8() { + return new Derived1(); + return new Derived2(); +} +var f9 = function () { + return new Derived1(); + return new Derived2(); +}; +var f10 = () => { + return new Derived1(); + return new Derived2(); +}; +function f11() { + return new Base(); + return new AnotherClass(); +} +var f12 = function () { + return new Base(); + return new AnotherClass(); +}; +var f13 = () => { + return new Base(); + return new AnotherClass(); +}; + +================================================================================ +`; + +exports[`functionImplementations.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// @allowUnreachableCode: true + +// FunctionExpression with no return type annotation and no return statement returns void +var v: void = function () { } (); + +// FunctionExpression f with no return type annotation and directly references f in its body returns any +var a: any = function f() { + return f; +}; +var a: any = function f() { + return f(); +}; + +// FunctionExpression f with no return type annotation and indirectly references f in its body returns any +var a: any = function f() { + var x = f; + return x; +}; + +// Two mutually recursive function implementations with no return type annotations +function rec1() { + return rec2(); +} +function rec2() { + return rec1(); +} +var a = rec1(); +var a = rec2(); + +// Two mutually recursive function implementations with return type annotation in one +function rec3(): number { + return rec4(); +} +function rec4() { + return rec3(); +} +var n: number; +var n = rec3(); +var n = rec4(); + +// FunctionExpression with no return type annotation and returns a number +var n = function () { + return 3; +} (); + +// FunctionExpression with no return type annotation and returns null +var nu = null; +var nu = function () { + return null; +} (); + +// FunctionExpression with no return type annotation and returns undefined +var un = undefined; +var un = function () { + return undefined; +} (); + +// FunctionExpression with no return type annotation and returns a type parameter type +var n = function <T>(x: T) { + return x; +} (4); + +// FunctionExpression with no return type annotation and returns a constrained type parameter type +var n = function <T extends {}>(x: T) { + return x; +} (4); + +// FunctionExpression with no return type annotation with multiple return statements with identical types +var n = function () { + return 3; + return 5; +}(); + +// Otherwise, the inferred return type is the first of the types of the return statement expressions +// in the function body that is a supertype of each of the others, +// ignoring return statements with no expressions. +// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. +// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns +class Base { private m; } +class Derived extends Base { private q; } +var b: Base; +var b = function () { + return new Base(); return new Derived(); +} (); + +// FunctionExpression with no return type annotation with multiple return statements with one a recursive call +var a = function f() { + return new Base(); return new Derived(); return f(); // ? +} (); + +// FunctionExpression with non -void return type annotation with a single throw statement +undefined === function (): number { + throw undefined; +}; + +// Type of 'this' in function implementation is 'any' +function thisFunc() { + var x = this; + var x: any; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's type +function opt1(n = 4) { + var m = n; + var m: number; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's widened type +function opt2(n = { x: null, y: undefined }) { + var m = n; + var m: { x: any; y: any }; +} + +// Function signature with initializer referencing other parameter to the left +function opt3(n: number, m = n) { + var y = m; + var y: number; +} + +// Function signature with optional parameter has correct codegen +// (tested above) + +// FunctionExpression with non -void return type annotation return with no expression +function f6(): number { + return; +} + +class Derived2 extends Base { private r: string; } +class AnotherClass { private x } +// if f is a contextually typed function expression, the inferred return type is the union type +// of the types of the return statement expressions in the function body, +// ignoring return statements with no expressions. +var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); +} +var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); +} +var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); +} +var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); +} +var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); +} +var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); +} + +=====================================output===================================== +// @allowUnreachableCode: true + +// FunctionExpression with no return type annotation and no return statement returns void +var v: void = (function () {})(); + +// FunctionExpression f with no return type annotation and directly references f in its body returns any +var a: any = function f() { + return f; +}; +var a: any = function f() { + return f(); +}; + +// FunctionExpression f with no return type annotation and indirectly references f in its body returns any +var a: any = function f() { + var x = f; + return x; +}; + +// Two mutually recursive function implementations with no return type annotations +function rec1() { + return rec2(); +} +function rec2() { + return rec1(); +} +var a = rec1(); +var a = rec2(); + +// Two mutually recursive function implementations with return type annotation in one +function rec3(): number { + return rec4(); +} +function rec4() { + return rec3(); +} +var n: number; +var n = rec3(); +var n = rec4(); + +// FunctionExpression with no return type annotation and returns a number +var n = (function () { + return 3; +})(); + +// FunctionExpression with no return type annotation and returns null +var nu = null; +var nu = (function () { + return null; +})(); + +// FunctionExpression with no return type annotation and returns undefined +var un = undefined; +var un = (function () { + return undefined; +})(); + +// FunctionExpression with no return type annotation and returns a type parameter type +var n = (function <T>(x: T) { + return x; +})(4); + +// FunctionExpression with no return type annotation and returns a constrained type parameter type +var n = (function <T extends {}>(x: T) { + return x; +})(4); + +// FunctionExpression with no return type annotation with multiple return statements with identical types +var n = (function () { + return 3; + return 5; +})(); + +// Otherwise, the inferred return type is the first of the types of the return statement expressions +// in the function body that is a supertype of each of the others, +// ignoring return statements with no expressions. +// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. +// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns +class Base { + private m; +} +class Derived extends Base { + private q; +} +var b: Base; +var b = (function () { + return new Base(); + return new Derived(); +})(); + +// FunctionExpression with no return type annotation with multiple return statements with one a recursive call +var a = (function f() { + return new Base(); + return new Derived(); + return f(); // ? +})(); + +// FunctionExpression with non -void return type annotation with a single throw statement +undefined === + function (): number { + throw undefined; + }; + +// Type of 'this' in function implementation is 'any' +function thisFunc() { + var x = this; + var x: any; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's type +function opt1(n = 4) { + var m = n; + var m: number; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's widened type +function opt2(n = { x: null, y: undefined }) { + var m = n; + var m: { x: any; y: any }; +} + +// Function signature with initializer referencing other parameter to the left +function opt3(n: number, m = n) { + var y = m; + var y: number; +} + +// Function signature with optional parameter has correct codegen +// (tested above) + +// FunctionExpression with non -void return type annotation return with no expression +function f6(): number { + return; +} + +class Derived2 extends Base { + private r: string; +} +class AnotherClass { + private x; +} +// if f is a contextually typed function expression, the inferred return type is the union type +// of the types of the return statement expressions in the function body, +// ignoring return statements with no expressions. +var f7: (x: number) => string | number = (x) => { + // should be (x: number) => number | string + if (x < 0) { + return x; + } + return x.toString(); +}; +var f8: (x: number) => any = (x) => { + // should be (x: number) => Base + return new Base(); + return new Derived2(); +}; +var f9: (x: number) => any = (x) => { + // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); +}; +var f10: (x: number) => any = (x) => { + // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); +}; +var f11: (x: number) => any = (x) => { + // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); +}; +var f12: (x: number) => any = (x) => { + // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); +}; + +================================================================================ +`; + +exports[`functionOverloadCompatibilityWithVoid01.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f(x: string): number; +function f(x: string): void { + return; +} + +=====================================output===================================== +function f(x: string): number; +function f(x: string): void { + return; +} + +================================================================================ +`; + +exports[`functionOverloadCompatibilityWithVoid02.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f(x: string): void; +function f(x: string): number { + return 0; +} + +=====================================output===================================== +function f(x: string): void; +function f(x: string): number { + return 0; +} + +================================================================================ +`; + +exports[`functionOverloadCompatibilityWithVoid03.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function f(x: string): void; +function f(x: string): void { + return; +} + +=====================================output===================================== +function f(x: string): void; +function f(x: string): void { + return; +} + +================================================================================ +`; + +exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = ` +"Rest element must be last element. (9:36) + 7 | + 8 | //Function overload signature with rest param followed by non-optional parameter +> 9 | function fn5(x: string, ...y: any[], z: string); + | ^ + 10 | function fn5() { } + 11 | +Cause: Rest element must be last element. (9:35)" +`; + +exports[`functionOverloadErrorsSyntax.ts [oxc-ts] format 1`] = ` +"A rest parameter must be last in a parameter list (9:25) + 7 | + 8 | //Function overload signature with rest param followed by non-optional parameter +> 9 | function fn5(x: string, ...y: any[], z: string); + | ^^^^^^^^^^^ + 10 | function fn5() { } + 11 |" +`; + +exports[`functionOverloadErrorsSyntax.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +//Function overload signature with optional parameter followed by non-optional parameter +function fn4a(x?: number, y: string); +function fn4a() { } + +function fn4b(n: string, x?: number, y: string); +function fn4b() { } + +//Function overload signature with rest param followed by non-optional parameter +function fn5(x: string, ...y: any[], z: string); +function fn5() { } + +=====================================output===================================== +//Function overload signature with optional parameter followed by non-optional parameter +function fn4a(x?: number, y: string); +function fn4a() {} + +function fn4b(n: string, x?: number, y: string); +function fn4b() {} + +//Function overload signature with rest param followed by non-optional parameter +function fn5(x: string, ...y: any[], z: string); +function fn5() {} + +================================================================================ +`; + +exports[`functionTypeTypeParameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type FuncWithTypeParameter = <T, P>() => {}; + +=====================================output===================================== +type FuncWithTypeParameter = <T, P>() => {}; + +================================================================================ +`; + +exports[`parameterInitializersForwardReferencing.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function left(a, b = a, c = b) { + a; + b; +} + +function right(a = b, b = a) { + a; + b; +} + +function right2(a = b, b = c, c = a) { + a; + b; + c; +} + +function inside(a = b) { + var b; +} + +function outside() { + var b; + function inside(a = b) { // Still an error because b is declared inside the function + var b; + } +} + +function defaultArgFunction(a = function () { return b; }, b = 1) { } +function defaultArgArrow(a = () => () => b, b = 3) { } + +class C { + constructor(a = b, b = 1) { } + method(a = b, b = 1) { } +} + +// Function expressions +var x = (a = b, b = c, c = d) => { var d; }; + +// Should not produce errors - can reference later parameters if they occur within a function expression initializer. +function f(a, b = function () { return c; }, c = b()) { +} + +=====================================output===================================== +function left(a, b = a, c = b) { + a; + b; +} + +function right(a = b, b = a) { + a; + b; +} + +function right2(a = b, b = c, c = a) { + a; + b; + c; +} + +function inside(a = b) { + var b; +} + +function outside() { + var b; + function inside(a = b) { + // Still an error because b is declared inside the function + var b; + } +} + +function defaultArgFunction( + a = function () { + return b; + }, + b = 1, +) {} +function defaultArgArrow(a = () => () => b, b = 3) {} + +class C { + constructor(a = b, b = 1) {} + method(a = b, b = 1) {} +} + +// Function expressions +var x = (a = b, b = c, c = d) => { + var d; +}; + +// Should not produce errors - can reference later parameters if they occur within a function expression initializer. +function f( + a, + b = function () { + return c; + }, + c = b(), +) {} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 800c00537545..000000000000 --- a/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,756 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TSFunctionTypeNoUnnecessaryParentheses.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - bar: (() => boolean); -} -=====================================output===================================== -class Foo { - bar: () => boolean; -} - -================================================================================ -`; - -exports[`functionImplementationErrors.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @allowUnreachableCode: true - -// FunctionExpression with no return type annotation with multiple return statements with unrelated types -var f1 = function () { - return ''; - return 3; -}; -var f2 = function x() { - return ''; - return 3; -}; -var f3 = () => { - return ''; - return 3; -}; - -// FunctionExpression with no return type annotation with return branch of number[] and other of string[] -var f4 = function () { - if (true) { - return ['']; - } else { - return [1]; - } -} - -// Function implementation with non -void return type annotation with no return -function f5(): number { -} - -var m; -// Function signature with parameter initializer referencing in scope local variable -function f6(n = m) { - var m = 4; -} - -// Function signature with initializer referencing other parameter to the right -function f7(n = m, m?) { -} - -// FunctionExpression with non -void return type annotation with a throw, no return, and other code -// Should be error but isn't -undefined === function (): number { - throw undefined; - var x = 4; -}; - -class Base { private x; } -class AnotherClass { private y; } -class Derived1 extends Base { private m; } -class Derived2 extends Base { private n; } -function f8() { - return new Derived1(); - return new Derived2(); -} -var f9 = function () { - return new Derived1(); - return new Derived2(); -}; -var f10 = () => { - return new Derived1(); - return new Derived2(); -}; -function f11() { - return new Base(); - return new AnotherClass(); -} -var f12 = function () { - return new Base(); - return new AnotherClass(); -}; -var f13 = () => { - return new Base(); - return new AnotherClass(); -}; - -=====================================output===================================== -// @allowUnreachableCode: true - -// FunctionExpression with no return type annotation with multiple return statements with unrelated types -var f1 = function () { - return ""; - return 3; -}; -var f2 = function x() { - return ""; - return 3; -}; -var f3 = () => { - return ""; - return 3; -}; - -// FunctionExpression with no return type annotation with return branch of number[] and other of string[] -var f4 = function () { - if (true) { - return [""]; - } else { - return [1]; - } -}; - -// Function implementation with non -void return type annotation with no return -function f5(): number {} - -var m; -// Function signature with parameter initializer referencing in scope local variable -function f6(n = m) { - var m = 4; -} - -// Function signature with initializer referencing other parameter to the right -function f7(n = m, m?) {} - -// FunctionExpression with non -void return type annotation with a throw, no return, and other code -// Should be error but isn't -undefined === - function (): number { - throw undefined; - var x = 4; - }; - -class Base { - private x; -} -class AnotherClass { - private y; -} -class Derived1 extends Base { - private m; -} -class Derived2 extends Base { - private n; -} -function f8() { - return new Derived1(); - return new Derived2(); -} -var f9 = function () { - return new Derived1(); - return new Derived2(); -}; -var f10 = () => { - return new Derived1(); - return new Derived2(); -}; -function f11() { - return new Base(); - return new AnotherClass(); -} -var f12 = function () { - return new Base(); - return new AnotherClass(); -}; -var f13 = () => { - return new Base(); - return new AnotherClass(); -}; - -================================================================================ -`; - -exports[`functionImplementations.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// @allowUnreachableCode: true - -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = function () { } (); - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { - return f; -}; -var a: any = function f() { - return f(); -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { - var x = f; - return x; -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1() { - return rec2(); -} -function rec2() { - return rec1(); -} -var a = rec1(); -var a = rec2(); - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { - return rec4(); -} -function rec4() { - return rec3(); -} -var n: number; -var n = rec3(); -var n = rec4(); - -// FunctionExpression with no return type annotation and returns a number -var n = function () { - return 3; -} (); - -// FunctionExpression with no return type annotation and returns null -var nu = null; -var nu = function () { - return null; -} (); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; -var un = function () { - return undefined; -} (); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = function <T>(x: T) { - return x; -} (4); - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = function <T extends {}>(x: T) { - return x; -} (4); - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = function () { - return 3; - return 5; -}(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { private m; } -class Derived extends Base { private q; } -var b: Base; -var b = function () { - return new Base(); return new Derived(); -} (); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = function f() { - return new Base(); return new Derived(); return f(); // ? -} (); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === function (): number { - throw undefined; -}; - -// Type of 'this' in function implementation is 'any' -function thisFunc() { - var x = this; - var x: any; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n = 4) { - var m = n; - var m: number; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n = { x: null, y: undefined }) { - var m = n; - var m: { x: any; y: any }; -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m = n) { - var y = m; - var y: number; -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { - return; -} - -class Derived2 extends Base { private r: string; } -class AnotherClass { private x } -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = x => { // should be (x: number) => number | string - if (x < 0) { return x; } - return x.toString(); -} -var f8: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived2(); -} -var f9: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); -} -var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); -} -var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); -} -var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); -} - -=====================================output===================================== -// @allowUnreachableCode: true - -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = (function () {})(); - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { - return f; -}; -var a: any = function f() { - return f(); -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { - var x = f; - return x; -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1() { - return rec2(); -} -function rec2() { - return rec1(); -} -var a = rec1(); -var a = rec2(); - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { - return rec4(); -} -function rec4() { - return rec3(); -} -var n: number; -var n = rec3(); -var n = rec4(); - -// FunctionExpression with no return type annotation and returns a number -var n = (function () { - return 3; -})(); - -// FunctionExpression with no return type annotation and returns null -var nu = null; -var nu = (function () { - return null; -})(); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; -var un = (function () { - return undefined; -})(); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = (function <T>(x: T) { - return x; -})(4); - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = (function <T extends {}>(x: T) { - return x; -})(4); - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = (function () { - return 3; - return 5; -})(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { - private m; -} -class Derived extends Base { - private q; -} -var b: Base; -var b = (function () { - return new Base(); - return new Derived(); -})(); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = (function f() { - return new Base(); - return new Derived(); - return f(); // ? -})(); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === - function (): number { - throw undefined; - }; - -// Type of 'this' in function implementation is 'any' -function thisFunc() { - var x = this; - var x: any; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n = 4) { - var m = n; - var m: number; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n = { x: null, y: undefined }) { - var m = n; - var m: { x: any; y: any }; -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m = n) { - var y = m; - var y: number; -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { - return; -} - -class Derived2 extends Base { - private r: string; -} -class AnotherClass { - private x; -} -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = (x) => { - // should be (x: number) => number | string - if (x < 0) { - return x; - } - return x.toString(); -}; -var f8: (x: number) => any = (x) => { - // should be (x: number) => Base - return new Base(); - return new Derived2(); -}; -var f9: (x: number) => any = (x) => { - // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); -}; -var f10: (x: number) => any = (x) => { - // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); -}; -var f11: (x: number) => any = (x) => { - // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); -}; -var f12: (x: number) => any = (x) => { - // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); -}; - -================================================================================ -`; - -exports[`functionOverloadCompatibilityWithVoid01.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f(x: string): number; -function f(x: string): void { - return; -} - -=====================================output===================================== -function f(x: string): number; -function f(x: string): void { - return; -} - -================================================================================ -`; - -exports[`functionOverloadCompatibilityWithVoid02.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f(x: string): void; -function f(x: string): number { - return 0; -} - -=====================================output===================================== -function f(x: string): void; -function f(x: string): number { - return 0; -} - -================================================================================ -`; - -exports[`functionOverloadCompatibilityWithVoid03.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function f(x: string): void; -function f(x: string): void { - return; -} - -=====================================output===================================== -function f(x: string): void; -function f(x: string): void { - return; -} - -================================================================================ -`; - -exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = ` -"Rest element must be last element. (9:36) - 7 | - 8 | //Function overload signature with rest param followed by non-optional parameter -> 9 | function fn5(x: string, ...y: any[], z: string); - | ^ - 10 | function fn5() { } - 11 |" -`; - -exports[`functionOverloadErrorsSyntax.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -//Function overload signature with optional parameter followed by non-optional parameter -function fn4a(x?: number, y: string); -function fn4a() { } - -function fn4b(n: string, x?: number, y: string); -function fn4b() { } - -//Function overload signature with rest param followed by non-optional parameter -function fn5(x: string, ...y: any[], z: string); -function fn5() { } - -=====================================output===================================== -//Function overload signature with optional parameter followed by non-optional parameter -function fn4a(x?: number, y: string); -function fn4a() {} - -function fn4b(n: string, x?: number, y: string); -function fn4b() {} - -//Function overload signature with rest param followed by non-optional parameter -function fn5(x: string, ...y: any[], z: string); -function fn5() {} - -================================================================================ -`; - -exports[`functionTypeTypeParameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type FuncWithTypeParameter = <T, P>() => {}; - -=====================================output===================================== -type FuncWithTypeParameter = <T, P>() => {}; - -================================================================================ -`; - -exports[`parameterInitializersForwardReferencing.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function left(a, b = a, c = b) { - a; - b; -} - -function right(a = b, b = a) { - a; - b; -} - -function right2(a = b, b = c, c = a) { - a; - b; - c; -} - -function inside(a = b) { - var b; -} - -function outside() { - var b; - function inside(a = b) { // Still an error because b is declared inside the function - var b; - } -} - -function defaultArgFunction(a = function () { return b; }, b = 1) { } -function defaultArgArrow(a = () => () => b, b = 3) { } - -class C { - constructor(a = b, b = 1) { } - method(a = b, b = 1) { } -} - -// Function expressions -var x = (a = b, b = c, c = d) => { var d; }; - -// Should not produce errors - can reference later parameters if they occur within a function expression initializer. -function f(a, b = function () { return c; }, c = b()) { -} - -=====================================output===================================== -function left(a, b = a, c = b) { - a; - b; -} - -function right(a = b, b = a) { - a; - b; -} - -function right2(a = b, b = c, c = a) { - a; - b; - c; -} - -function inside(a = b) { - var b; -} - -function outside() { - var b; - function inside(a = b) { - // Still an error because b is declared inside the function - var b; - } -} - -function defaultArgFunction( - a = function () { - return b; - }, - b = 1 -) {} -function defaultArgArrow(a = () => () => b, b = 3) {} - -class C { - constructor(a = b, b = 1) {} - method(a = b, b = 1) {} -} - -// Function expressions -var x = (a = b, b = c, c = d) => { - var d; -}; - -// Should not produce errors - can reference later parameters if they occur within a function expression initializer. -function f( - a, - b = function () { - return c; - }, - c = b() -) {} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/types/functions/format.test.js b/tests/format/typescript/conformance/types/functions/format.test.js new file mode 100644 index 000000000000..3d703a1405f8 --- /dev/null +++ b/tests/format/typescript/conformance/types/functions/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "babel-ts": ["functionOverloadErrorsSyntax.ts"], + "oxc-ts": ["functionOverloadErrorsSyntax.ts"], + }, +}); diff --git a/tests/format/typescript/conformance/types/functions/jsfmt.spec.js b/tests/format/typescript/conformance/types/functions/jsfmt.spec.js deleted file mode 100644 index 6bdcb1477c32..000000000000 --- a/tests/format/typescript/conformance/types/functions/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { "babel-ts": ["functionOverloadErrorsSyntax.ts"] }, -}); diff --git a/tests/format/typescript/conformance/types/importEqualsDeclaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/importEqualsDeclaration/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/importEqualsDeclaration/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/importEqualsDeclaration/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/importEqualsDeclaration/format.test.js b/tests/format/typescript/conformance/types/importEqualsDeclaration/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/importEqualsDeclaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/importEqualsDeclaration/jsfmt.spec.js b/tests/format/typescript/conformance/types/importEqualsDeclaration/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/importEqualsDeclaration/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/indexedAccesType/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/indexedAccesType/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/indexedAccesType/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/indexedAccesType/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/indexedAccesType/format.test.js b/tests/format/typescript/conformance/types/indexedAccesType/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/indexedAccesType/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/indexedAccesType/jsfmt.spec.js b/tests/format/typescript/conformance/types/indexedAccesType/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/indexedAccesType/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/interfaceDeclaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/interfaceDeclaration/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/interfaceDeclaration/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/interfaceDeclaration/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/interfaceDeclaration/format.test.js b/tests/format/typescript/conformance/types/interfaceDeclaration/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/interfaceDeclaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/interfaceDeclaration/jsfmt.spec.js b/tests/format/typescript/conformance/types/interfaceDeclaration/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/interfaceDeclaration/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/intersectionType/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/intersectionType/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/intersectionType/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/intersectionType/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/intersectionType/format.test.js b/tests/format/typescript/conformance/types/intersectionType/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/intersectionType/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/intersectionType/jsfmt.spec.js b/tests/format/typescript/conformance/types/intersectionType/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/intersectionType/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/lastTypeNode/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/lastTypeNode/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/lastTypeNode/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/lastTypeNode/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/lastTypeNode/format.test.js b/tests/format/typescript/conformance/types/lastTypeNode/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/lastTypeNode/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/lastTypeNode/jsfmt.spec.js b/tests/format/typescript/conformance/types/lastTypeNode/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/lastTypeNode/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/mappedType/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/mappedType/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/mappedType/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/mappedType/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/mappedType/format.test.js b/tests/format/typescript/conformance/types/mappedType/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/mappedType/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/mappedType/jsfmt.spec.js b/tests/format/typescript/conformance/types/mappedType/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/mappedType/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/methodSignature/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/methodSignature/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/methodSignature/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/methodSignature/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/methodSignature/format.test.js b/tests/format/typescript/conformance/types/methodSignature/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/methodSignature/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/methodSignature/jsfmt.spec.js b/tests/format/typescript/conformance/types/methodSignature/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/methodSignature/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2e0a30dff7c8 --- /dev/null +++ b/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`kind-detection.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare /* module */ namespace A {} + +=====================================output===================================== +declare namespace /* module */ A {} + +================================================================================ +`; + +exports[`moduleDeclaration.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module A { + export class A { + } +} + +declare module "B" { + export class B { + } +} + +=====================================output===================================== +module A { + export class A {} +} + +declare module "B" { + export class B {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2582451e85eb..000000000000 --- a/tests/format/typescript/conformance/types/moduleDeclaration/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,29 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`moduleDeclaration.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -module A { - export class A { - } -} - -declare module "B" { - export class B { - } -} - -=====================================output===================================== -module A { - export class A {} -} - -declare module "B" { - export class B {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/types/moduleDeclaration/format.test.js b/tests/format/typescript/conformance/types/moduleDeclaration/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/moduleDeclaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/moduleDeclaration/jsfmt.spec.js b/tests/format/typescript/conformance/types/moduleDeclaration/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/moduleDeclaration/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/moduleDeclaration/kind-detection.ts b/tests/format/typescript/conformance/types/moduleDeclaration/kind-detection.ts new file mode 100644 index 000000000000..4796ce701ee6 --- /dev/null +++ b/tests/format/typescript/conformance/types/moduleDeclaration/kind-detection.ts @@ -0,0 +1 @@ +declare /* module */ namespace A {} diff --git a/tests/format/typescript/conformance/types/namespaceExportDeclaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/namespaceExportDeclaration/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/namespaceExportDeclaration/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/namespaceExportDeclaration/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/namespaceExportDeclaration/format.test.js b/tests/format/typescript/conformance/types/namespaceExportDeclaration/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/namespaceExportDeclaration/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/namespaceExportDeclaration/jsfmt.spec.js b/tests/format/typescript/conformance/types/namespaceExportDeclaration/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/namespaceExportDeclaration/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/never/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/never/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/never/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/never/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/never/format.test.js b/tests/format/typescript/conformance/types/never/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/never/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/never/jsfmt.spec.js b/tests/format/typescript/conformance/types/never/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/never/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/nonNullExpression/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/nonNullExpression/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/nonNullExpression/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/nonNullExpression/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/nonNullExpression/format.test.js b/tests/format/typescript/conformance/types/nonNullExpression/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/nonNullExpression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/nonNullExpression/jsfmt.spec.js b/tests/format/typescript/conformance/types/nonNullExpression/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/nonNullExpression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41638817c57c --- /dev/null +++ b/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/format.test.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`parameterProperty.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + constructor(public arg: number = 10) { + // fails because of comment + } +} + +=====================================output===================================== +class A { + constructor(public arg: number = 10) { + // fails because of comment + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1fc8509a406f..000000000000 --- a/tests/format/typescript/conformance/types/parameterProperty/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,26 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`parameterProperty.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class c3 { - constructor(public arg: number = 10) { - // fails because of comment - } - not_constructor(public arg: number = 10) { - } -} - -=====================================output===================================== -class c3 { - constructor(public arg: number = 10) { - // fails because of comment - } - not_constructor(public arg: number = 10) {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/conformance/types/parameterProperty/format.test.js b/tests/format/typescript/conformance/types/parameterProperty/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/parameterProperty/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/parameterProperty/jsfmt.spec.js b/tests/format/typescript/conformance/types/parameterProperty/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/parameterProperty/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/parameterProperty/parameterProperty.ts b/tests/format/typescript/conformance/types/parameterProperty/parameterProperty.ts index 56527665c176..da1dfa65f593 100644 --- a/tests/format/typescript/conformance/types/parameterProperty/parameterProperty.ts +++ b/tests/format/typescript/conformance/types/parameterProperty/parameterProperty.ts @@ -1,7 +1,5 @@ -class c3 { +class A { constructor(public arg: number = 10) { // fails because of comment } - not_constructor(public arg: number = 10) { - } } diff --git a/tests/format/typescript/conformance/types/symbol/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/symbol/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/symbol/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/symbol/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/symbol/format.test.js b/tests/format/typescript/conformance/types/symbol/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/symbol/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/symbol/jsfmt.spec.js b/tests/format/typescript/conformance/types/symbol/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/symbol/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/thisType/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/thisType/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/thisType/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/thisType/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/thisType/format.test.js b/tests/format/typescript/conformance/types/thisType/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/thisType/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/thisType/jsfmt.spec.js b/tests/format/typescript/conformance/types/thisType/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/thisType/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/tuple/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/tuple/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/tuple/emptyTuples/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/tuple/emptyTuples/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/tuple/emptyTuples/format.test.js b/tests/format/typescript/conformance/types/tuple/emptyTuples/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/tuple/emptyTuples/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/tuple/emptyTuples/jsfmt.spec.js b/tests/format/typescript/conformance/types/tuple/emptyTuples/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/tuple/emptyTuples/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/tuple/format.test.js b/tests/format/typescript/conformance/types/tuple/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/tuple/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/tuple/jsfmt.spec.js b/tests/format/typescript/conformance/types/tuple/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/tuple/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeOperator/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/typeOperator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/typeOperator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/typeOperator/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/typeOperator/format.test.js b/tests/format/typescript/conformance/types/typeOperator/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/typeOperator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeOperator/jsfmt.spec.js b/tests/format/typescript/conformance/types/typeOperator/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/typeOperator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeParameter/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/typeParameter/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/typeParameter/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/typeParameter/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/typeParameter/format.test.js b/tests/format/typescript/conformance/types/typeParameter/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/typeParameter/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeParameter/jsfmt.spec.js b/tests/format/typescript/conformance/types/typeParameter/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/typeParameter/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/format.test.js b/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/jsfmt.spec.js b/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/typeParameters/typeParameterLists/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeReference/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/typeReference/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/typeReference/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/typeReference/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/typeReference/format.test.js b/tests/format/typescript/conformance/types/typeReference/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/typeReference/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/typeReference/jsfmt.spec.js b/tests/format/typescript/conformance/types/typeReference/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/typeReference/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/undefined/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/undefined/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/undefined/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/undefined/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/undefined/format.test.js b/tests/format/typescript/conformance/types/undefined/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/undefined/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/undefined/jsfmt.spec.js b/tests/format/typescript/conformance/types/undefined/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/undefined/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/union/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/union/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/union/format.test.js b/tests/format/typescript/conformance/types/union/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/union/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/union/jsfmt.spec.js b/tests/format/typescript/conformance/types/union/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/union/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/variableDeclarator/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/variableDeclarator/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/conformance/types/variableDeclarator/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/conformance/types/variableDeclarator/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/conformance/types/variableDeclarator/format.test.js b/tests/format/typescript/conformance/types/variableDeclarator/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/conformance/types/variableDeclarator/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/conformance/types/variableDeclarator/jsfmt.spec.js b/tests/format/typescript/conformance/types/variableDeclarator/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/conformance/types/variableDeclarator/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/const/__snapshots__/format.test.js.snap b/tests/format/typescript/const/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5037245d4cd3 --- /dev/null +++ b/tests/format/typescript/const/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`initializer-ambient-context.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module N { + enum E { + ok = 0 + } + + export const string = "2"; + export const number = 1.; + export const bigint = 0n; + export const negative_bigint = -0n; + export const negative_number = -1; + export const template = \`-2\`; + export const False = false; + export const True = true; + export const E_ok = E.ok; +} + +=====================================output===================================== +declare module N { + enum E { + ok = 0, + } + + export const string = "2"; + export const number = 1; + export const bigint = 0n; + export const negative_bigint = -0n; + export const negative_number = -1; + export const template = \`-2\`; + export const False = false; + export const True = true; + export const E_ok = E.ok; +} + +================================================================================ +`; diff --git a/tests/format/typescript/const/format.test.js b/tests/format/typescript/const/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/const/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/const/initializer-ambient-context.ts b/tests/format/typescript/const/initializer-ambient-context.ts new file mode 100644 index 000000000000..4571e8b96f07 --- /dev/null +++ b/tests/format/typescript/const/initializer-ambient-context.ts @@ -0,0 +1,15 @@ +declare module N { + enum E { + ok = 0 + } + + export const string = "2"; + export const number = 1.; + export const bigint = 0n; + export const negative_bigint = -0n; + export const negative_number = -1; + export const template = `-2`; + export const False = false; + export const True = true; + export const E_ok = E.ok; +} diff --git a/tests/format/typescript/cursor/__snapshots__/format.test.js.snap b/tests/format/typescript/cursor/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b9b4f6429831 --- /dev/null +++ b/tests/format/typescript/cursor/__snapshots__/format.test.js.snap @@ -0,0 +1,163 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`array-pattern.ts format 1`] = ` +====================================options===================================== +cursorOffset: 6 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let []<|>: T = []; + +=====================================output===================================== +let []<|>: T = []; + +================================================================================ +`; + +exports[`arrow-function-type.ts format 1`] = ` +====================================options===================================== +cursorOffset: 14 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type foo = () <|>=> boolean; + +=====================================output===================================== +type foo = () <|>=> boolean; + +================================================================================ +`; + +exports[`class-property.ts format 1`] = ` +====================================options===================================== +cursorOffset: 15 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + foo<|>: A +} + +=====================================output===================================== +class A { + foo<|>: A; +} + +================================================================================ +`; + +exports[`function-return-type.ts format 1`] = ` +====================================options===================================== +cursorOffset: 12 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a()<|>: boolean {} + +=====================================output===================================== +function a()<|>: boolean {} + +================================================================================ +`; + +exports[`identifier-1.ts format 1`] = ` +====================================options===================================== +cursorOffset: 5 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let i<|>: T; + +=====================================output===================================== +let i<|>: T; + +================================================================================ +`; + +exports[`identifier-2.ts format 1`] = ` +====================================options===================================== +cursorOffset: 6 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let i:<|> T; + +=====================================output===================================== +let i:<|> T; + +================================================================================ +`; + +exports[`identifier-3.ts format 1`] = ` +====================================options===================================== +cursorOffset: 5 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +let i<|> : T; + +=====================================output===================================== +let i<|>: T; + +================================================================================ +`; + +exports[`method-signature.ts format 1`] = ` +====================================options===================================== +cursorOffset: 21 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface A { + foo()<|>: T; +} + +=====================================output===================================== +interface A { + foo()<|>: T; +} + +================================================================================ +`; + +exports[`property-signature.ts format 1`] = ` +====================================options===================================== +cursorOffset: 19 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface A { + foo<|>: T; +} + +=====================================output===================================== +interface A { + foo<|>: T; +} + +================================================================================ +`; + +exports[`rest.ts format 1`] = ` +====================================options===================================== +cursorOffset: 20 +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo(...args<|>: any) { } + +=====================================output===================================== +function foo(...args<|>: any) {} + +================================================================================ +`; diff --git a/tests/format/typescript/cursor/array-pattern.ts b/tests/format/typescript/cursor/array-pattern.ts new file mode 100644 index 000000000000..66a13057742b --- /dev/null +++ b/tests/format/typescript/cursor/array-pattern.ts @@ -0,0 +1 @@ +let []<|>: T = []; diff --git a/tests/format/typescript/cursor/arrow-function-type.ts b/tests/format/typescript/cursor/arrow-function-type.ts new file mode 100644 index 000000000000..f01f75102b77 --- /dev/null +++ b/tests/format/typescript/cursor/arrow-function-type.ts @@ -0,0 +1 @@ +type foo = () <|>=> boolean; diff --git a/tests/format/typescript/cursor/class-property.ts b/tests/format/typescript/cursor/class-property.ts new file mode 100644 index 000000000000..a635c6b282e7 --- /dev/null +++ b/tests/format/typescript/cursor/class-property.ts @@ -0,0 +1,3 @@ +class A { + foo<|>: A +} diff --git a/tests/format/typescript/cursor/format.test.js b/tests/format/typescript/cursor/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/cursor/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/cursor/function-return-type.ts b/tests/format/typescript/cursor/function-return-type.ts new file mode 100644 index 000000000000..0681246bf6a1 --- /dev/null +++ b/tests/format/typescript/cursor/function-return-type.ts @@ -0,0 +1 @@ +function a()<|>: boolean {} diff --git a/tests/format/typescript/cursor/identifier-1.ts b/tests/format/typescript/cursor/identifier-1.ts new file mode 100644 index 000000000000..0304fd3c7e3b --- /dev/null +++ b/tests/format/typescript/cursor/identifier-1.ts @@ -0,0 +1 @@ +let i<|>: T; diff --git a/tests/format/typescript/cursor/identifier-2.ts b/tests/format/typescript/cursor/identifier-2.ts new file mode 100644 index 000000000000..21f30ea35d2b --- /dev/null +++ b/tests/format/typescript/cursor/identifier-2.ts @@ -0,0 +1 @@ +let i:<|> T; diff --git a/tests/format/typescript/cursor/identifier-3.ts b/tests/format/typescript/cursor/identifier-3.ts new file mode 100644 index 000000000000..5c58b23f452a --- /dev/null +++ b/tests/format/typescript/cursor/identifier-3.ts @@ -0,0 +1 @@ +let i<|> : T; diff --git a/tests/format/typescript/cursor/method-signature.ts b/tests/format/typescript/cursor/method-signature.ts new file mode 100644 index 000000000000..06c2aa95e0a6 --- /dev/null +++ b/tests/format/typescript/cursor/method-signature.ts @@ -0,0 +1,3 @@ +interface A { + foo()<|>: T; +} diff --git a/tests/format/typescript/cursor/property-signature.ts b/tests/format/typescript/cursor/property-signature.ts new file mode 100644 index 000000000000..4c9b7f8ed935 --- /dev/null +++ b/tests/format/typescript/cursor/property-signature.ts @@ -0,0 +1,3 @@ +interface A { + foo<|>: T; +} diff --git a/tests/format/typescript/cursor/rest.ts b/tests/format/typescript/cursor/rest.ts new file mode 100644 index 000000000000..3e48a8041b4a --- /dev/null +++ b/tests/format/typescript/cursor/rest.ts @@ -0,0 +1 @@ +function foo(...args<|>: any) { } diff --git a/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap b/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..db1c5f28adff --- /dev/null +++ b/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`abstractNewlineHandling.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var +abstract +class X {} + +const +abstract = 1; +class Y {} + +export let +abstract +class Y {} + +let +abstract +export class Y {} + +=====================================output===================================== +var abstract; +class X {} + +const abstract = 1; +class Y {} + +export let abstract; +class Y {} + +let abstract; +export class Y {} + +================================================================================ +`; + +exports[`abstractProperties.ts [babel-ts] format 1`] = ` +"'static' modifier cannot be used with 'abstract' modifier. (4:12) + 2 | abstract private a: 1; + 3 | private abstract b: 2; +> 4 | static abstract c: 3; + | ^ + 5 | abstract private ['g']; + 6 | private abstract ['h']; + 7 | static abstract ['i']; +Cause: 'static' modifier cannot be used with 'abstract' modifier. (4:11)" +`; + +exports[`abstractProperties.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class Foo { + abstract private a: 1; + private abstract b: 2; + static abstract c: 3; + abstract private ['g']; + private abstract ['h']; + static abstract ['i']; +} + +=====================================output===================================== +abstract class Foo { + private abstract a: 1; + private abstract b: 2; + static abstract c: 3; + private abstract ["g"]; + private abstract ["h"]; + static abstract ["i"]; +} + +================================================================================ +`; diff --git a/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9fdf6fd070a3..000000000000 --- a/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,78 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstractNewlineHandling.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var -abstract -class X {} - -const -abstract = 1; -class Y {} - -export let -abstract -class Y {} - -let -abstract -export class Y {} - -=====================================output===================================== -var abstract; -class X {} - -const abstract = 1; -class Y {} - -export let abstract; -class Y {} - -let abstract; -export class Y {} - -================================================================================ -`; - -exports[`abstractProperties.ts [babel-ts] format 1`] = ` -"'static' modifier cannot be used with 'abstract' modifier. (4:12) - 2 | abstract private a: 1; - 3 | private abstract b: 2; -> 4 | static abstract c: 3; - | ^ - 5 | abstract private ['g']; - 6 | private abstract ['h']; - 7 | static abstract ['i'];" -`; - -exports[`abstractProperties.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class Foo { - abstract private a: 1; - private abstract b: 2; - static abstract c: 3; - abstract private ['g']; - private abstract ['h']; - static abstract ['i']; -} - -=====================================output===================================== -abstract class Foo { - private abstract a: 1; - private abstract b: 2; - static abstract c: 3; - private abstract ["g"]; - private abstract ["h"]; - static abstract ["i"]; -} - -================================================================================ -`; diff --git a/tests/format/typescript/custom/abstract/format.test.js b/tests/format/typescript/custom/abstract/format.test.js new file mode 100644 index 000000000000..8c11920cc3f9 --- /dev/null +++ b/tests/format/typescript/custom/abstract/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "babel-ts": ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"], + }, +}); diff --git a/tests/format/typescript/custom/abstract/jsfmt.spec.js b/tests/format/typescript/custom/abstract/jsfmt.spec.js deleted file mode 100644 index 76de64b5b156..000000000000 --- a/tests/format/typescript/custom/abstract/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { - "babel-ts": ["abstractProperties.ts", "abstractPropertiesWithBreaks.ts"], - }, -}); diff --git a/tests/format/typescript/custom/call/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/call/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/call/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/call/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/call/format.test.js b/tests/format/typescript/custom/call/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/call/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/call/jsfmt.spec.js b/tests/format/typescript/custom/call/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/call/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/computedProperties/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/computedProperties/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/computedProperties/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/computedProperties/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/computedProperties/format.test.js b/tests/format/typescript/custom/computedProperties/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/computedProperties/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/computedProperties/jsfmt.spec.js b/tests/format/typescript/custom/computedProperties/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/computedProperties/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/declare/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/declare/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/declare/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/declare/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/declare/format.test.js b/tests/format/typescript/custom/declare/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/declare/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/declare/jsfmt.spec.js b/tests/format/typescript/custom/declare/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/declare/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/modifiers/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/modifiers/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/modifiers/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/modifiers/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/modifiers/format.test.js b/tests/format/typescript/custom/modifiers/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/modifiers/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/modifiers/jsfmt.spec.js b/tests/format/typescript/custom/modifiers/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/modifiers/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/module/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/module/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/module/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/module/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/module/format.test.js b/tests/format/typescript/custom/module/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/module/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/module/jsfmt.spec.js b/tests/format/typescript/custom/module/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/module/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/new/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/new/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/new/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/new/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/new/format.test.js b/tests/format/typescript/custom/new/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/new/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/new/jsfmt.spec.js b/tests/format/typescript/custom/new/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/new/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/stability/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/stability/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/custom/stability/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/custom/stability/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/custom/stability/format.test.js b/tests/format/typescript/custom/stability/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/stability/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/stability/jsfmt.spec.js b/tests/format/typescript/custom/stability/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/stability/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/custom/typeParameters/__snapshots__/format.test.js.snap b/tests/format/typescript/custom/typeParameters/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b681375615de --- /dev/null +++ b/tests/format/typescript/custom/typeParameters/__snapshots__/format.test.js.snap @@ -0,0 +1,172 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`callAndConstructSignatureLong.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface Interface { + < + Voila, + InViewHumbleVaudevillianVeteran, + CastVicariouslyAsBothVictimAndVillainByTheVicissitudesOfFate + >(): V; + new < + ThisVisage, + NoMereVeneerOfVanity, + IsAVestigeOfTheVoxPopuliNowVacant, + Vanished + >(): V; +} + +=====================================output===================================== +interface Interface { + < + Voila, + InViewHumbleVaudevillianVeteran, + CastVicariouslyAsBothVictimAndVillainByTheVicissitudesOfFate, + >(): V; + new < + ThisVisage, + NoMereVeneerOfVanity, + IsAVestigeOfTheVoxPopuliNowVacant, + Vanished, + >(): V; +} + +================================================================================ +`; + +exports[`functionTypeLong.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type AwkwardlyLongFunctionTypeDefinition = < + GenericTypeNumberOne, + GenericTypeNumberTwo, + GenericTypeNumberThree +>( + arg1: GenericTypeNumberOne, + arg2: GenericTypeNumberTwo, + arg3: GenericTypeNumberThree +) => (GenericTypeNumberOne | GenericTypeNumberTwo | GenericTypeNumberThree); + +=====================================output===================================== +type AwkwardlyLongFunctionTypeDefinition = < + GenericTypeNumberOne, + GenericTypeNumberTwo, + GenericTypeNumberThree, +>( + arg1: GenericTypeNumberOne, + arg2: GenericTypeNumberTwo, + arg3: GenericTypeNumberThree, +) => GenericTypeNumberOne | GenericTypeNumberTwo | GenericTypeNumberThree; + +================================================================================ +`; + +exports[`interfaceParamsLong.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> {} + +=====================================output===================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, +> {} + +================================================================================ +`; + +exports[`typeParametersLong.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type ReallyReallyReallyLongName< + ReallyReallyReallyLongName1, ReallyReallyReallyLongName2 +> = any; + +=====================================output===================================== +type ReallyReallyReallyLongName< + ReallyReallyReallyLongName1, + ReallyReallyReallyLongName2, +> = any; + +================================================================================ +`; + +exports[`variables.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo: SomeThing<boolean> = func(); +const bar: SomeThing<boolean, boolean> = func(); +const fooo: SomeThing<{ [P in "x" | "y"]: number }> = func(); +const baar: SomeThing<K extends T ? G : S> = func(); +const fooooooooooooooo: SomeThing<boolean> = looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaaaaaaaar: SomeThing<boolean, boolean> = looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaar: SomeThing<{ [P in "x" | "y"]: number }> = looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaaar: SomeThing<K extends T ? G : S> = looooooooooooooooooooooooooooooongNameFunc(); +const isAnySuccessfulAttempt$: Observable<boolean> = this._quizService.isAnySuccessfulAttempt$().pipe( + tap((isAnySuccessfulAttempt: boolean) => { + this.isAnySuccessfulAttempt = isAnySuccessfulAttempt; + }), +); +const isAnySuccessfulAttempt2$: Observable<boolean> = this._someMethodWithLongName(); +const fooooooooooooooo: SomeThing<boolean | string> = looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<boolean & string> = looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<keyof string> = looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<string[]> = looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<string["anchor"]> = looooooooooooooooooooooooooooooongNameFunc(); + +=====================================output===================================== +const foo: SomeThing<boolean> = func(); +const bar: SomeThing<boolean, boolean> = func(); +const fooo: SomeThing<{ [P in "x" | "y"]: number }> = func(); +const baar: SomeThing<K extends T ? G : S> = func(); +const fooooooooooooooo: SomeThing<boolean> = + looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaaaaaaaar: SomeThing<boolean, boolean> = + looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaar: SomeThing<{ [P in "x" | "y"]: number }> = + looooooooooooooooooooooooooooooongNameFunc(); +const baaaaaaaaaaaaaaaar: SomeThing<K extends T ? G : S> = + looooooooooooooooooooooooooooooongNameFunc(); +const isAnySuccessfulAttempt$: Observable<boolean> = this._quizService + .isAnySuccessfulAttempt$() + .pipe( + tap((isAnySuccessfulAttempt: boolean) => { + this.isAnySuccessfulAttempt = isAnySuccessfulAttempt; + }), + ); +const isAnySuccessfulAttempt2$: Observable<boolean> = + this._someMethodWithLongName(); +const fooooooooooooooo: SomeThing<boolean | string> = + looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<boolean & string> = + looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<keyof string> = + looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<string[]> = + looooooooooooooooooooooooooooooongNameFunc(); +const fooooooooooooooo: SomeThing<string["anchor"]> = + looooooooooooooooooooooooooooooongNameFunc(); + +================================================================================ +`; diff --git a/tests/format/typescript/custom/typeParameters/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/typeParameters/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 17cbc76b9a0c..000000000000 --- a/tests/format/typescript/custom/typeParameters/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,172 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`callAndConstructSignatureLong.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Interface { - < - Voila, - InViewHumbleVaudevillianVeteran, - CastVicariouslyAsBothVictimAndVillainByTheVicissitudesOfFate - >(): V; - new < - ThisVisage, - NoMereVeneerOfVanity, - IsAVestigeOfTheVoxPopuliNowVacant, - Vanished - >(): V; -} - -=====================================output===================================== -interface Interface { - < - Voila, - InViewHumbleVaudevillianVeteran, - CastVicariouslyAsBothVictimAndVillainByTheVicissitudesOfFate - >(): V; - new < - ThisVisage, - NoMereVeneerOfVanity, - IsAVestigeOfTheVoxPopuliNowVacant, - Vanished - >(): V; -} - -================================================================================ -`; - -exports[`functionTypeLong.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type AwkwardlyLongFunctionTypeDefinition = < - GenericTypeNumberOne, - GenericTypeNumberTwo, - GenericTypeNumberThree ->( - arg1: GenericTypeNumberOne, - arg2: GenericTypeNumberTwo, - arg3: GenericTypeNumberThree -) => (GenericTypeNumberOne | GenericTypeNumberTwo | GenericTypeNumberThree); - -=====================================output===================================== -type AwkwardlyLongFunctionTypeDefinition = < - GenericTypeNumberOne, - GenericTypeNumberTwo, - GenericTypeNumberThree ->( - arg1: GenericTypeNumberOne, - arg2: GenericTypeNumberTwo, - arg3: GenericTypeNumberThree -) => GenericTypeNumberOne | GenericTypeNumberTwo | GenericTypeNumberThree; - -================================================================================ -`; - -exports[`interfaceParamsLong.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> {} - -=====================================output===================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> {} - -================================================================================ -`; - -exports[`typeParametersLong.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type ReallyReallyReallyLongName< - ReallyReallyReallyLongName1, ReallyReallyReallyLongName2 -> = any; - -=====================================output===================================== -type ReallyReallyReallyLongName< - ReallyReallyReallyLongName1, - ReallyReallyReallyLongName2 -> = any; - -================================================================================ -`; - -exports[`variables.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo: SomeThing<boolean> = func(); -const bar: SomeThing<boolean, boolean> = func(); -const fooo: SomeThing<{ [P in "x" | "y"]: number }> = func(); -const baar: SomeThing<K extends T ? G : S> = func(); -const fooooooooooooooo: SomeThing<boolean> = looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaaaaaaaar: SomeThing<boolean, boolean> = looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaar: SomeThing<{ [P in "x" | "y"]: number }> = looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaaar: SomeThing<K extends T ? G : S> = looooooooooooooooooooooooooooooongNameFunc(); -const isAnySuccessfulAttempt$: Observable<boolean> = this._quizService.isAnySuccessfulAttempt$().pipe( - tap((isAnySuccessfulAttempt: boolean) => { - this.isAnySuccessfulAttempt = isAnySuccessfulAttempt; - }), -); -const isAnySuccessfulAttempt2$: Observable<boolean> = this._someMethodWithLongName(); -const fooooooooooooooo: SomeThing<boolean | string> = looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<boolean & string> = looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<keyof string> = looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<string[]> = looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<string["anchor"]> = looooooooooooooooooooooooooooooongNameFunc(); - -=====================================output===================================== -const foo: SomeThing<boolean> = func(); -const bar: SomeThing<boolean, boolean> = func(); -const fooo: SomeThing<{ [P in "x" | "y"]: number }> = func(); -const baar: SomeThing<K extends T ? G : S> = func(); -const fooooooooooooooo: SomeThing<boolean> = - looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaaaaaaaar: SomeThing<boolean, boolean> = - looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaar: SomeThing<{ [P in "x" | "y"]: number }> = - looooooooooooooooooooooooooooooongNameFunc(); -const baaaaaaaaaaaaaaaar: SomeThing<K extends T ? G : S> = - looooooooooooooooooooooooooooooongNameFunc(); -const isAnySuccessfulAttempt$: Observable<boolean> = this._quizService - .isAnySuccessfulAttempt$() - .pipe( - tap((isAnySuccessfulAttempt: boolean) => { - this.isAnySuccessfulAttempt = isAnySuccessfulAttempt; - }) - ); -const isAnySuccessfulAttempt2$: Observable<boolean> = - this._someMethodWithLongName(); -const fooooooooooooooo: SomeThing<boolean | string> = - looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<boolean & string> = - looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<keyof string> = - looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<string[]> = - looooooooooooooooooooooooooooooongNameFunc(); -const fooooooooooooooo: SomeThing<string["anchor"]> = - looooooooooooooooooooooooooooooongNameFunc(); - -================================================================================ -`; diff --git a/tests/format/typescript/custom/typeParameters/format.test.js b/tests/format/typescript/custom/typeParameters/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/custom/typeParameters/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/custom/typeParameters/jsfmt.spec.js b/tests/format/typescript/custom/typeParameters/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/custom/typeParameters/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/d-ts-files/__snapshots__/format.test.js.snap b/tests/format/typescript/d-ts-files/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..32ad22b79e25 --- /dev/null +++ b/tests/format/typescript/d-ts-files/__snapshots__/format.test.js.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`const-without-initializer.d.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const version: string; + +=====================================output===================================== +export const version: string; + +================================================================================ +`; + +exports[`const-without-initializer-in-namespace.d.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export namespace builders { + const breakParent: string; +} + +=====================================output===================================== +export namespace builders { + const breakParent: string; +} + +================================================================================ +`; diff --git a/tests/format/typescript/d-ts-files/const-without-initializer-in-namespace.d.ts b/tests/format/typescript/d-ts-files/const-without-initializer-in-namespace.d.ts new file mode 100644 index 000000000000..6a3a1f34af31 --- /dev/null +++ b/tests/format/typescript/d-ts-files/const-without-initializer-in-namespace.d.ts @@ -0,0 +1,3 @@ +export namespace builders { + const breakParent: string; +} diff --git a/tests/format/typescript/d-ts-files/const-without-initializer.d.ts b/tests/format/typescript/d-ts-files/const-without-initializer.d.ts new file mode 100644 index 000000000000..56ebe816e6ac --- /dev/null +++ b/tests/format/typescript/d-ts-files/const-without-initializer.d.ts @@ -0,0 +1 @@ +export const version: string; diff --git a/tests/format/typescript/d-ts-files/format.test.js b/tests/format/typescript/d-ts-files/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/d-ts-files/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/declare/__snapshots__/format.test.js.snap b/tests/format/typescript/declare/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1c683eabfc54 --- /dev/null +++ b/tests/format/typescript/declare/__snapshots__/format.test.js.snap @@ -0,0 +1,237 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`declare_class_fields.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class B {p: number;} +class C extends B {declare p: 256 | 1000;} +class D { + declare field = "field"; +} +declare class D { + field = "field"; +} + +=====================================output===================================== +class B { + p: number; +} +class C extends B { + declare p: 256 | 1000; +} +class D { + declare field = "field"; +} +declare class D { + field = "field"; +} + +================================================================================ +`; + +exports[`declare_enum.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare const enum Foo {} +declare enum Bar {} + +=====================================output===================================== +declare const enum Foo {} +declare enum Bar {} + +================================================================================ +`; + +exports[`declare_function.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare function x(); +declare function y(): void; + +declare namespace A { + function x(); + function y(): void; +} + +declare function f([]?) + +=====================================output===================================== +declare function x(); +declare function y(): void; + +declare namespace A { + function x(); + function y(): void; +} + +declare function f([]?); + +================================================================================ +`; + +exports[`declare_interface.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare interface Dictionary<T> { + [index: string]: T +} + +declare interface B { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +} + +=====================================output===================================== +declare interface Dictionary<T> { + [index: string]: T; +} + +declare interface B { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +} + +================================================================================ +`; + +exports[`declare_module.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module m { + class C { + field = "field"; + } +} + +=====================================output===================================== +declare module m { + class C { + field = "field"; + } +} + +================================================================================ +`; + +exports[`declare_namespace.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare namespace m { + class C { + field = "field"; + } +} + +=====================================output===================================== +declare namespace m { + class C { + field = "field"; + } +} + +================================================================================ +`; + +exports[`declare_var.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// tslint:disable-next-line:no-use-before-declare +const hello = 5; + +// tslint:disable-next-line:no-use-before-declare +declare const hello2 = 5; + +=====================================output===================================== +// tslint:disable-next-line:no-use-before-declare +const hello = 5; + +// tslint:disable-next-line:no-use-before-declare +declare const hello2 = 5; + +================================================================================ +`; + +exports[`declare-get-set-field.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class C { + declare get: string + declare set: string; +} + +=====================================output===================================== +class C { + declare get: string; + declare set: string; +} + +================================================================================ +`; + +exports[`object-type-in-declare-function.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare function foo(this: { a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bazFlip({ a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bar(...{ a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bar(...x: { a: boolean, b: string, c: number }): + Promise<Array<foo>> + +=====================================output===================================== +declare function foo(this: { + a: boolean; + b: string; + c: number; +}): Promise<Array<foo>>; + +declare function bazFlip({ + a: boolean, + b: string, + c: number, +}): Promise<Array<foo>>; + +declare function bar( + ...{ a: boolean, b: string, c: number } +): Promise<Array<foo>>; + +declare function bar( + ...x: { a: boolean; b: string; c: number } +): Promise<Array<foo>>; + +================================================================================ +`; diff --git a/tests/format/typescript/declare/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/declare/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d6699d8ac817..000000000000 --- a/tests/format/typescript/declare/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,217 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`declare_class_fields.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class B {p: number;} -class C extends B {declare p: 256 | 1000;} -class D { - declare field = "field"; -} -declare class D { - field = "field"; -} - -=====================================output===================================== -class B { - p: number; -} -class C extends B { - declare p: 256 | 1000; -} -class D { - declare field = "field"; -} -declare class D { - field = "field"; -} - -================================================================================ -`; - -exports[`declare_enum.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare const enum Foo {} -declare enum Bar {} - -=====================================output===================================== -declare const enum Foo {} -declare enum Bar {} - -================================================================================ -`; - -exports[`declare_function.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare function x(); -declare function y(): void; - -declare namespace A { - function x(); - function y(): void; -} - -declare function f([]?) - -=====================================output===================================== -declare function x(); -declare function y(): void; - -declare namespace A { - function x(); - function y(): void; -} - -declare function f([]?); - -================================================================================ -`; - -exports[`declare_function_with_body.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Invalid, but recoverable -declare function foo() {} -declare function bar() { - // comment -} - -=====================================output===================================== -// Invalid, but recoverable -declare function foo() {}; -declare function bar() { - // comment -}; - -================================================================================ -`; - -exports[`declare_interface.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare interface Dictionary<T> { - [index: string]: T -} - -declare interface B { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -} - -=====================================output===================================== -declare interface Dictionary<T> { - [index: string]: T; -} - -declare interface B { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -} - -================================================================================ -`; - -exports[`declare_module.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module m { - class C { - field = "field"; - } -} - -=====================================output===================================== -declare module m { - class C { - field = "field"; - } -} - -================================================================================ -`; - -exports[`declare_namespace.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare namespace m { - class C { - field = "field"; - } -} - -=====================================output===================================== -declare namespace m { - class C { - field = "field"; - } -} - -================================================================================ -`; - -exports[`declare_var.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// tslint:disable-next-line:no-use-before-declare -const hello = 5; - -// tslint:disable-next-line:no-use-before-declare -declare const hello2 = 5; - -=====================================output===================================== -// tslint:disable-next-line:no-use-before-declare -const hello = 5; - -// tslint:disable-next-line:no-use-before-declare -declare const hello2 = 5; - -================================================================================ -`; - -exports[`declare-get-set-field.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class C { - declare get: string - declare set: string; -} - -=====================================output===================================== -class C { - declare get: string; - declare set: string; -} - -================================================================================ -`; diff --git a/tests/format/typescript/declare/declare_function_with_body.ts b/tests/format/typescript/declare/declare_function_with_body.ts deleted file mode 100644 index 34c28e8fc893..000000000000 --- a/tests/format/typescript/declare/declare_function_with_body.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Invalid, but recoverable -declare function foo() {} -declare function bar() { - // comment -} diff --git a/tests/format/typescript/declare/format.test.js b/tests/format/typescript/declare/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/declare/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/declare/jsfmt.spec.js b/tests/format/typescript/declare/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/declare/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/declare/object-type-in-declare-function.ts b/tests/format/typescript/declare/object-type-in-declare-function.ts new file mode 100644 index 000000000000..b9c8b00db77a --- /dev/null +++ b/tests/format/typescript/declare/object-type-in-declare-function.ts @@ -0,0 +1,11 @@ +declare function foo(this: { a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bazFlip({ a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bar(...{ a: boolean, b: string, c: number }): + Promise<Array<foo>> + +declare function bar(...x: { a: boolean, b: string, c: number }): + Promise<Array<foo>> diff --git a/tests/format/typescript/declare/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/declare/trailing-comma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/declare/trailing-comma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/declare/trailing-comma/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/declare/trailing-comma/format.test.js b/tests/format/typescript/declare/trailing-comma/format.test.js new file mode 100644 index 000000000000..ecc1922a02e3 --- /dev/null +++ b/tests/format/typescript/declare/trailing-comma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/declare/trailing-comma/jsfmt.spec.js b/tests/format/typescript/declare/trailing-comma/jsfmt.spec.js deleted file mode 100644 index e6b9b2af964a..000000000000 --- a/tests/format/typescript/declare/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { trailingComma: "es5" }); -run_spec(__dirname, ["typescript"], { trailingComma: "none" }); -run_spec(__dirname, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/decorator-auto-accessors/__snapshots__/format.test.js.snap b/tests/format/typescript/decorator-auto-accessors/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b87c7158c5f7 --- /dev/null +++ b/tests/format/typescript/decorator-auto-accessors/__snapshots__/format.test.js.snap @@ -0,0 +1,69 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`decorator-auto-accessors-new-line.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + accessor + ["bar"]; +} + +class Foo { + static accessor + bar; +} + +class Foo { + accessor + bar; +} + +=====================================output===================================== +class Foo { + accessor; + ["bar"]; +} + +class Foo { + static accessor; + bar; +} + +class Foo { + accessor; + bar; +} + +================================================================================ +`; + +exports[`decorator-auto-accessors-type-annotations.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +abstract class Foo { + accessor prop: number = 1; + static accessor prop2: number = 1; + accessor #prop3: number = 1; + accessor [prop4]: number = 1; + private accessor prop5: number = 1; + abstract accessor prop6: number; +} + +=====================================output===================================== +abstract class Foo { + accessor prop: number = 1; + static accessor prop2: number = 1; + accessor #prop3: number = 1; + accessor [prop4]: number = 1; + private accessor prop5: number = 1; + abstract accessor prop6: number; +} + +================================================================================ +`; diff --git a/tests/format/typescript/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 2b9e43887b0c..000000000000 --- a/tests/format/typescript/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,29 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`decorator-auto-accessors-type-annotations.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract class Foo { - accessor prop: number = 1; - static accessor prop2: number = 1; - accessor #prop3: number = 1; - accessor [prop4]: number = 1; - private accessor prop5: number = 1; - abstract accessor prop6: number; -} - -=====================================output===================================== -abstract class Foo { - accessor prop: number = 1; - static accessor prop2: number = 1; - accessor #prop3: number = 1; - accessor [prop4]: number = 1; - private accessor prop5: number = 1; - abstract accessor prop6: number; -} - -================================================================================ -`; diff --git a/tests/format/misc/typescript-only/decorator-auto-accessors-new-line.ts b/tests/format/typescript/decorator-auto-accessors/decorator-auto-accessors-new-line.ts similarity index 100% rename from tests/format/misc/typescript-only/decorator-auto-accessors-new-line.ts rename to tests/format/typescript/decorator-auto-accessors/decorator-auto-accessors-new-line.ts diff --git a/tests/format/typescript/decorator-auto-accessors/format.test.js b/tests/format/typescript/decorator-auto-accessors/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/decorator-auto-accessors/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/decorator-auto-accessors/jsfmt.spec.js b/tests/format/typescript/decorator-auto-accessors/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/decorator-auto-accessors/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/decorator-auto-accessors/no-semi/__snapshots__/format.test.js.snap b/tests/format/typescript/decorator-auto-accessors/no-semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e9d138cea519 --- /dev/null +++ b/tests/format/typescript/decorator-auto-accessors/no-semi/__snapshots__/format.test.js.snap @@ -0,0 +1,22 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`decorator-auto-accessor-like-property-name.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class C { + accessor; + bar; +} + +=====================================output===================================== +class C { + accessor + bar +} + +================================================================================ +`; diff --git a/tests/format/misc/typescript-only/decorator-auto-accessor-like-property-name.ts b/tests/format/typescript/decorator-auto-accessors/no-semi/decorator-auto-accessor-like-property-name.ts similarity index 100% rename from tests/format/misc/typescript-only/decorator-auto-accessor-like-property-name.ts rename to tests/format/typescript/decorator-auto-accessors/no-semi/decorator-auto-accessor-like-property-name.ts diff --git a/tests/format/typescript/decorator-auto-accessors/no-semi/format.test.js b/tests/format/typescript/decorator-auto-accessors/no-semi/format.test.js new file mode 100644 index 000000000000..f0c848e5a9fe --- /dev/null +++ b/tests/format/typescript/decorator-auto-accessors/no-semi/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/decorators-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/decorators-ts/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/decorators-ts/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/decorators-ts/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/decorators-ts/format.test.js b/tests/format/typescript/decorators-ts/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/decorators-ts/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/decorators-ts/jsfmt.spec.js b/tests/format/typescript/decorators-ts/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/decorators-ts/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/decorators/__snapshots__/format.test.js.snap b/tests/format/typescript/decorators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..05bbdb97296b --- /dev/null +++ b/tests/format/typescript/decorators/__snapshots__/format.test.js.snap @@ -0,0 +1,630 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`abstract-method.ts [babel-ts] format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + @decorator() + abstract method(): Array<string> +} + +=====================================output===================================== +class A { + @decorator() + abstract method(): Array<string>; +} + +================================================================================ +`; + +exports[`abstract-method.ts [oxc-ts] format 1`] = ` +"A decorator can only decorate a method implementation, not an overload. (2:5) + 1 | class A { +> 2 | @decorator() + | ^^^^^^^^^^^^ + 3 | abstract method(): Array<string> + 4 | } + 5 |" +`; + +exports[`abstract-method.ts [typescript] format 1`] = ` +"A decorator can only decorate a method implementation, not an overload. (2:5) + 1 | class A { +> 2 | @decorator() + | ^^^^^^^^^^^^ + 3 | abstract method(): Array<string> + 4 | } + 5 | +Cause: A decorator can only decorate a method implementation, not an overload." +`; + +exports[`accessor.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + @foo() + get a() {return 1} + @bar() + set a(v) {} +} + +=====================================output===================================== +class A { + @foo() + get a() { + return 1; + } + @bar() + set a(v) {} +} + +================================================================================ +`; + +exports[`argument-list-preserve-line.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + constructor( + @inject(Bar) + private readonly bar: IBar, + + @inject(MyProcessor) + private readonly myProcessor: IMyProcessor, + + @inject(InjectionTypes.AnotherThing) + + private readonly anotherThing: IAnotherThing | undefined, + ) { } +} + +=====================================output===================================== +class Foo { + constructor( + @inject(Bar) + private readonly bar: IBar, + + @inject(MyProcessor) + private readonly myProcessor: IMyProcessor, + + @inject(InjectionTypes.AnotherThing) + private readonly anotherThing: IAnotherThing | undefined, + ) {} +} + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Something { + @Annotateme() + // comment + static property: Array<string>; +} + +=====================================output===================================== +class Something { + @Annotateme() + // comment + static property: Array<string>; +} + +================================================================================ +`; + +exports[`decorator-type-assertion.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +@(bind as ClassDecorator) +class Decorated { + +} + +@(<ClassDecorator>bind) +class Decorated { + +} + +=====================================output===================================== +@(bind as ClassDecorator) +class Decorated {} + +@(<ClassDecorator>bind) +class Decorated {} + +================================================================================ +`; + +exports[`decorators.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class TestTextFileService { + constructor( + @ILifecycleService lifecycleService, + ) { + } +} + +@commonEditorContribution +export class TabCompletionController { +} + +@Component({ + selector: 'angular-component', +}) +class AngularComponent { + @Input() myInput: string; +} + +class Class { + method( + @Decorator + { prop1, prop2 }: Type + ) { + doSomething(); + } +} + +class Class2 { + method( + @Decorator1 + @Decorator2 + { prop1, prop2 }: Type + ) { + doSomething(); + } +} + +class Class3 { + method( + @Decorator + { prop1_1, prop1_2 }: Type, + { prop2_1, prop2_2 }: Type + ) { + doSomething(); + } +} + +class Class4 { + method( + param1, + @Decorator + { prop1, prop2 }: Type + ) {} +} + +class Class5 { + method( + @Decorator { prop1 }: Type + ) {} +} + +class Class6 { + method( + @Decorator({}) { prop1 }: Type + ) {} + method( + @Decorator( + {}) { prop1 }: Type + ) {} + method( + @Decorator([]) { prop1 }: Type + ) {} + method( + @Decorator( + []) { prop1 }: Type + ) {} +} + +=====================================output===================================== +export class TestTextFileService { + constructor(@ILifecycleService lifecycleService) {} +} + +@commonEditorContribution +export class TabCompletionController {} + +@Component({ + selector: "angular-component", +}) +class AngularComponent { + @Input() myInput: string; +} + +class Class { + method( + @Decorator + { prop1, prop2 }: Type, + ) { + doSomething(); + } +} + +class Class2 { + method( + @Decorator1 + @Decorator2 + { prop1, prop2 }: Type, + ) { + doSomething(); + } +} + +class Class3 { + method( + @Decorator + { prop1_1, prop1_2 }: Type, + { prop2_1, prop2_2 }: Type, + ) { + doSomething(); + } +} + +class Class4 { + method( + param1, + @Decorator + { prop1, prop2 }: Type, + ) {} +} + +class Class5 { + method(@Decorator { prop1 }: Type) {} +} + +class Class6 { + method(@Decorator({}) { prop1 }: Type) {} + method(@Decorator({}) { prop1 }: Type) {} + method(@Decorator([]) { prop1 }: Type) {} + method(@Decorator([]) { prop1 }: Type) {} +} + +================================================================================ +`; + +exports[`decorators-comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +class Foo1 { + @foo + // comment + async method() {} +} + +class Foo2 { + @foo + // comment + private method() {} +} + +class Foo3 { + @foo + // comment + *method() {} +} + +class Foo4 { + @foo + // comment + async *method() {} +} + +class Something { + @foo() + // comment + readonly property: Array<string> +} + +class Something2 { + @foo() + // comment + abstract property: Array<string> +} + +=====================================output===================================== +class Foo1 { + @foo + // comment + async method() {} +} + +class Foo2 { + @foo + // comment + private method() {} +} + +class Foo3 { + @foo + // comment + *method() {} +} + +class Foo4 { + @foo + // comment + async *method() {} +} + +class Something { + @foo() + // comment + readonly property: Array<string>; +} + +class Something2 { + @foo() + // comment + abstract property: Array<string>; +} + +================================================================================ +`; + +exports[`inline-decorators.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +@d1 +@d2(foo) +@d3.bar +@d4.baz() +class Class1 {} + +class Class2 { + @d1 + @d2(foo) + @d3.bar + @d4.baz() + method1() {} + + @d1 + method2() {} + + @d2(foo) + method3() {} + + @d3.bar + method4() {} +} + +class Class3 { + @d1 fieldA; + @d2(foo) fieldB; + @d3.bar fieldC; + @d4.baz() fieldD; + + constructor ( + @d1 private x: number, + @d2(foo) private y: number, + @d3('foo') private z: number, + @d4({ + x: string + }) private a: string, + ) {} +} + +@decorated class Foo {} + +class Bar { + @decorated method() {} +} + +class MyContainerComponent { + @ContentChildren(MyComponent) components: QueryListSomeBigName<MyComponentThat>; +} + +=====================================output===================================== +@d1 +@d2(foo) +@d3.bar +@d4.baz() +class Class1 {} + +class Class2 { + @d1 + @d2(foo) + @d3.bar + @d4.baz() + method1() {} + + @d1 + method2() {} + + @d2(foo) + method3() {} + + @d3.bar + method4() {} +} + +class Class3 { + @d1 fieldA; + @d2(foo) fieldB; + @d3.bar fieldC; + @d4.baz() fieldD; + + constructor( + @d1 private x: number, + @d2(foo) private y: number, + @d3("foo") private z: number, + @d4({ + x: string, + }) + private a: string, + ) {} +} + +@decorated +class Foo {} + +class Bar { + @decorated method() {} +} + +class MyContainerComponent { + @ContentChildren(MyComponent) + components: QueryListSomeBigName<MyComponentThat>; +} + +================================================================================ +`; + +exports[`legacy.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +[ + @decorator() class {}, + @decorator() class A {}, +]; + +class A { + @decorator() accessor #field; +} + +class B { + @decorator() #field () {} +} + +=====================================output===================================== +[ + @decorator() + class {}, + @decorator() + class A {}, +]; + +class A { + @decorator() accessor #field; +} + +class B { + @decorator() #field() {} +} + +================================================================================ +`; + +exports[`mobx.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import {observable} from "mobx"; + +@observer class OrderLine { + @observable price:number = 0; + @observable amount:number = 1; + + constructor(price) { + this.price = price; + } + + @computed get total() { + return this.price * this.amount; + } + + @action.bound setPrice(price) { + this.price = price; + } + + @computed + get total2() { + return this.price * this.amount; + } + + @action.bound + setPrice(price) { + this.price = price; + } + + @computed @computed @computed @computed @computed @computed @computed get total3() { + return this.price * this.amount; + } + + @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; + + @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); +} + +=====================================output===================================== +import { observable } from "mobx"; + +@observer +class OrderLine { + @observable price: number = 0; + @observable amount: number = 1; + + constructor(price) { + this.price = price; + } + + @computed get total() { + return this.price * this.amount; + } + + @action.bound setPrice(price) { + this.price = price; + } + + @computed + get total2() { + return this.price * this.amount; + } + + @action.bound + setPrice(price) { + this.price = price; + } + + @computed + @computed + @computed + @computed + @computed + @computed + @computed + get total3() { + return this.price * this.amount; + } + + @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => + this.count--; + + @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => + doSomething(); +} + +================================================================================ +`; diff --git a/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d501273a7b5b..000000000000 --- a/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,623 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract-method.ts [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - @decorator() - abstract method(): Array<string> -} - -=====================================output===================================== -class A { - @decorator() - abstract method(): Array<string>; -} - -================================================================================ -`; - -exports[`abstract-method.ts [typescript] format 1`] = ` -"A decorator can only decorate a method implementation, not an overload. (2:5) - 1 | class A { -> 2 | @decorator() - | ^^^^^^^^^^^^ - 3 | abstract method(): Array<string> - 4 | } - 5 |" -`; - -exports[`accessor.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - @foo() - get a() {return 1} - @bar() - set a(v) {} -} - -=====================================output===================================== -class A { - @foo() - get a() { - return 1; - } - @bar() - set a(v) {} -} - -================================================================================ -`; - -exports[`argument-list-preserve-line.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - constructor( - @inject(Bar) - private readonly bar: IBar, - - @inject(MyProcessor) - private readonly myProcessor: IMyProcessor, - - @inject(InjectionTypes.AnotherThing) - - private readonly anotherThing: IAnotherThing | undefined, - ) { } -} - -=====================================output===================================== -class Foo { - constructor( - @inject(Bar) - private readonly bar: IBar, - - @inject(MyProcessor) - private readonly myProcessor: IMyProcessor, - - @inject(InjectionTypes.AnotherThing) - private readonly anotherThing: IAnotherThing | undefined - ) {} -} - -================================================================================ -`; - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Something { - @Annotateme() - // comment - static property: Array<string>; -} - -=====================================output===================================== -class Something { - @Annotateme() - // comment - static property: Array<string>; -} - -================================================================================ -`; - -exports[`decorator-type-assertion.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -@(bind as ClassDecorator) -class Decorated { - -} - -@(<ClassDecorator>bind) -class Decorated { - -} - -=====================================output===================================== -@(bind as ClassDecorator) -class Decorated {} - -@(<ClassDecorator>bind) -class Decorated {} - -================================================================================ -`; - -exports[`decorators.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class TestTextFileService { - constructor( - @ILifecycleService lifecycleService, - ) { - } -} - -@commonEditorContribution -export class TabCompletionController { -} - -@Component({ - selector: 'angular-component', -}) -class AngularComponent { - @Input() myInput: string; -} - -class Class { - method( - @Decorator - { prop1, prop2 }: Type - ) { - doSomething(); - } -} - -class Class2 { - method( - @Decorator1 - @Decorator2 - { prop1, prop2 }: Type - ) { - doSomething(); - } -} - -class Class3 { - method( - @Decorator - { prop1_1, prop1_2 }: Type, - { prop2_1, prop2_2 }: Type - ) { - doSomething(); - } -} - -class Class4 { - method( - param1, - @Decorator - { prop1, prop2 }: Type - ) {} -} - -class Class5 { - method( - @Decorator { prop1 }: Type - ) {} -} - -class Class6 { - method( - @Decorator({}) { prop1 }: Type - ) {} - method( - @Decorator( - {}) { prop1 }: Type - ) {} - method( - @Decorator([]) { prop1 }: Type - ) {} - method( - @Decorator( - []) { prop1 }: Type - ) {} -} - -=====================================output===================================== -export class TestTextFileService { - constructor(@ILifecycleService lifecycleService) {} -} - -@commonEditorContribution -export class TabCompletionController {} - -@Component({ - selector: "angular-component", -}) -class AngularComponent { - @Input() myInput: string; -} - -class Class { - method( - @Decorator - { prop1, prop2 }: Type - ) { - doSomething(); - } -} - -class Class2 { - method( - @Decorator1 - @Decorator2 - { prop1, prop2 }: Type - ) { - doSomething(); - } -} - -class Class3 { - method( - @Decorator - { prop1_1, prop1_2 }: Type, - { prop2_1, prop2_2 }: Type - ) { - doSomething(); - } -} - -class Class4 { - method( - param1, - @Decorator - { prop1, prop2 }: Type - ) {} -} - -class Class5 { - method(@Decorator { prop1 }: Type) {} -} - -class Class6 { - method(@Decorator({}) { prop1 }: Type) {} - method(@Decorator({}) { prop1 }: Type) {} - method(@Decorator([]) { prop1 }: Type) {} - method(@Decorator([]) { prop1 }: Type) {} -} - -================================================================================ -`; - -exports[`decorators-comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -class Foo1 { - @foo - // comment - async method() {} -} - -class Foo2 { - @foo - // comment - private method() {} -} - -class Foo3 { - @foo - // comment - *method() {} -} - -class Foo4 { - @foo - // comment - async *method() {} -} - -class Something { - @foo() - // comment - readonly property: Array<string> -} - -class Something2 { - @foo() - // comment - abstract property: Array<string> -} - -=====================================output===================================== -class Foo1 { - @foo - // comment - async method() {} -} - -class Foo2 { - @foo - // comment - private method() {} -} - -class Foo3 { - @foo - // comment - *method() {} -} - -class Foo4 { - @foo - // comment - async *method() {} -} - -class Something { - @foo() - // comment - readonly property: Array<string>; -} - -class Something2 { - @foo() - // comment - abstract property: Array<string>; -} - -================================================================================ -`; - -exports[`inline-decorators.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -@d1 -@d2(foo) -@d3.bar -@d4.baz() -class Class1 {} - -class Class2 { - @d1 - @d2(foo) - @d3.bar - @d4.baz() - method1() {} - - @d1 - method2() {} - - @d2(foo) - method3() {} - - @d3.bar - method4() {} -} - -class Class3 { - @d1 fieldA; - @d2(foo) fieldB; - @d3.bar fieldC; - @d4.baz() fieldD; - - constructor ( - @d1 private x: number, - @d2(foo) private y: number, - @d3('foo') private z: number, - @d4({ - x: string - }) private a: string, - ) {} -} - -@decorated class Foo {} - -class Bar { - @decorated method() {} -} - -class MyContainerComponent { - @ContentChildren(MyComponent) components: QueryListSomeBigName<MyComponentThat>; -} - -=====================================output===================================== -@d1 -@d2(foo) -@d3.bar -@d4.baz() -class Class1 {} - -class Class2 { - @d1 - @d2(foo) - @d3.bar - @d4.baz() - method1() {} - - @d1 - method2() {} - - @d2(foo) - method3() {} - - @d3.bar - method4() {} -} - -class Class3 { - @d1 fieldA; - @d2(foo) fieldB; - @d3.bar fieldC; - @d4.baz() fieldD; - - constructor( - @d1 private x: number, - @d2(foo) private y: number, - @d3("foo") private z: number, - @d4({ - x: string, - }) - private a: string - ) {} -} - -@decorated -class Foo {} - -class Bar { - @decorated method() {} -} - -class MyContainerComponent { - @ContentChildren(MyComponent) - components: QueryListSomeBigName<MyComponentThat>; -} - -================================================================================ -`; - -exports[`legacy.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -[ - @decorator() class {}, - @decorator() class A {}, -]; - -class A { - @decorator() accessor #field; -} - -class B { - @decorator() #field () {} -} - -=====================================output===================================== -[ - ( - @decorator() - class {} - ), - ( - @decorator() - class A {} - ), -]; - -class A { - @decorator() accessor #field; -} - -class B { - @decorator() #field() {} -} - -================================================================================ -`; - -exports[`mobx.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -import {observable} from "mobx"; - -@observer class OrderLine { - @observable price:number = 0; - @observable amount:number = 1; - - constructor(price) { - this.price = price; - } - - @computed get total() { - return this.price * this.amount; - } - - @action.bound setPrice(price) { - this.price = price; - } - - @computed - get total2() { - return this.price * this.amount; - } - - @action.bound - setPrice(price) { - this.price = price; - } - - @computed @computed @computed @computed @computed @computed @computed get total3() { - return this.price * this.amount; - } - - @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; - - @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); -} - -=====================================output===================================== -import { observable } from "mobx"; - -@observer -class OrderLine { - @observable price: number = 0; - @observable amount: number = 1; - - constructor(price) { - this.price = price; - } - - @computed get total() { - return this.price * this.amount; - } - - @action.bound setPrice(price) { - this.price = price; - } - - @computed - get total2() { - return this.price * this.amount; - } - - @action.bound - setPrice(price) { - this.price = price; - } - - @computed - @computed - @computed - @computed - @computed - @computed - @computed - get total3() { - return this.price * this.amount; - } - - @action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => - this.count--; - - @action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => - doSomething(); -} - -================================================================================ -`; diff --git a/tests/format/typescript/decorators/format.test.js b/tests/format/typescript/decorators/format.test.js new file mode 100644 index 000000000000..91c4c595aa07 --- /dev/null +++ b/tests/format/typescript/decorators/format.test.js @@ -0,0 +1,7 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + typescript: ["abstract-method.ts"], + "oxc-ts": ["abstract-method.ts"], + "babel-ts": ["issue-9102.ts"], + }, +}); diff --git a/tests/format/typescript/decorators/jsfmt.spec.js b/tests/format/typescript/decorators/jsfmt.spec.js deleted file mode 100644 index 78dd2704f5ec..000000000000 --- a/tests/format/typescript/decorators/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { typescript: ["abstract-method.ts"] }, -}); diff --git a/tests/format/typescript/definite/__snapshots__/format.test.js.snap b/tests/format/typescript/definite/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..26cd5174361b --- /dev/null +++ b/tests/format/typescript/definite/__snapshots__/format.test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`asi.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +let x +!function() {}; + +=====================================output===================================== +let x; +!function () {}; + +================================================================================ +`; + +exports[`definite.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class MyComponent { +ngModel!: ng.INgModelController; +} + +const x!: string = ''; + +var y!: MyComponent + +=====================================output===================================== +class MyComponent { + ngModel!: ng.INgModelController; +} + +const x!: string = ""; + +var y!: MyComponent; + +================================================================================ +`; + +exports[`without-annotation.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts"] +printWidth: 80 + | printWidth +=====================================input====================================== +class Foo { + a! + #b! + static c! + [d]! = 1 + 'e'! +} + +let a! = x +const b! = x +var c/* */! = x +export const d! = x + +=====================================output===================================== +class Foo { + a!; + #b!; + static c!; + [d]! = 1; + "e"!; +} + +let a! = x; +const b! = x; +var c! /* */ = x; +export const d! = x; + +================================================================================ +`; diff --git a/tests/format/typescript/definite/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/definite/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f8b8429b1a03..000000000000 --- a/tests/format/typescript/definite/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,79 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`asi.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let x -!function() {}; - -=====================================output===================================== -let x; -!function () {}; - -================================================================================ -`; - -exports[`definite.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class MyComponent { -ngModel!: ng.INgModelController; -} - -const x!: string = ''; - -var y!: MyComponent - -=====================================output===================================== -class MyComponent { - ngModel!: ng.INgModelController; -} - -const x!: string = ""; - -var y!: MyComponent; - -================================================================================ -`; - -exports[`without-annotation.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class Foo { - a! - #b! - static c! - [d]! = 1 - 'e'! -} - -let a! = x -const b! = x -var c/* */! = x -export const d! = x - -=====================================output===================================== -class Foo { - a!; - #b!; - static c!; - [d]! = 1; - "e"!; -} - -let a! = x; -const b! = x; -var c! /* */ = x; -export const d! = x; - -================================================================================ -`; diff --git a/tests/format/typescript/definite/format.test.js b/tests/format/typescript/definite/format.test.js new file mode 100644 index 000000000000..e9fafe62339b --- /dev/null +++ b/tests/format/typescript/definite/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["babel-ts"], { + errors: { typescript: ["asi.ts", "definite.ts", "without-annotation.ts"] }, +}); diff --git a/tests/format/typescript/definite/jsfmt.spec.js b/tests/format/typescript/definite/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/definite/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/destructuring/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/destructuring/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/destructuring/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/destructuring/format.test.js b/tests/format/typescript/destructuring/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/destructuring/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/destructuring/jsfmt.spec.js b/tests/format/typescript/destructuring/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/destructuring/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/edge-cases/15463.ts b/tests/format/typescript/edge-cases/15463.ts new file mode 100644 index 000000000000..18243737f896 --- /dev/null +++ b/tests/format/typescript/edge-cases/15463.ts @@ -0,0 +1,8 @@ +type RepeatedTuple<T extends readonly any[]> = + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, readonly []>>>>> + >>>>>>>>>>>>>>>>>>> + >>>>>>>>>>>>> + >>>; diff --git a/tests/format/typescript/edge-cases/__snapshots__/format.test.js.snap b/tests/format/typescript/edge-cases/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..d8aaf2444c94 --- /dev/null +++ b/tests/format/typescript/edge-cases/__snapshots__/format.test.js.snap @@ -0,0 +1,142 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`15463.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type RepeatedTuple<T extends readonly any[]> = + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, _R<T, + _R<T, _R<T, _R<T, _R<T, readonly []>>>>> + >>>>>>>>>>>>>>>>>>> + >>>>>>>>>>>>> + >>>; + +=====================================output===================================== +type RepeatedTuple<T extends readonly any[]> = _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + _R< + T, + readonly [] + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > +>; + +================================================================================ +`; diff --git a/tests/format/typescript/edge-cases/format.test.js b/tests/format/typescript/edge-cases/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/edge-cases/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/end-of-line/__snapshots__/format.test.js.snap b/tests/format/typescript/end-of-line/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3adfe3352646 --- /dev/null +++ b/tests/format/typescript/end-of-line/__snapshots__/format.test.js.snap @@ -0,0 +1,178 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`multiline.ts - {"endOfLine":"cr"} format 1`] = ` +====================================options===================================== +endOfLine: "cr" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type IAmIncredibleLongParameterType = {};<LF> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> + (_0: IAmIncredibleLongParameterType) => {<LF> + setTimeout(() => {<LF> + /*<LF> + Multiline comment<LF> + Multiline comment<LF> + Multiline comment<LF> + */<LF> + console.log(<LF> + 'Multiline string\\<LF> + Multiline string\\<LF> + Multiline string'<LF> + );<LF> + console.log(<LF> + \`Multiline \\n string\\<LF> + Multiline string\\<LF> + Multiline string\`<LF> + );<LF> + });<LF> + }<LF> +);<LF> + +=====================================output===================================== +type IAmIncredibleLongParameterType = {};<CR> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<CR> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CR> + (_0: IAmIncredibleLongParameterType) => {<CR> + setTimeout(() => {<CR> + /*<CR> + Multiline comment<CR> + Multiline comment<CR> + Multiline comment<CR> + */<CR> + console.log(<CR> + "Multiline string\\<CR> + Multiline string\\<CR> + Multiline string",<CR> + );<CR> + console.log(<CR> + \`Multiline \\n string\\<CR> + Multiline string\\<CR> + Multiline string\`,<CR> + );<CR> + });<CR> + },<CR> +);<CR> + +================================================================================ +`; + +exports[`multiline.ts - {"endOfLine":"crlf"} format 1`] = ` +====================================options===================================== +endOfLine: "crlf" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type IAmIncredibleLongParameterType = {};<LF> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> + (_0: IAmIncredibleLongParameterType) => {<LF> + setTimeout(() => {<LF> + /*<LF> + Multiline comment<LF> + Multiline comment<LF> + Multiline comment<LF> + */<LF> + console.log(<LF> + 'Multiline string\\<LF> + Multiline string\\<LF> + Multiline string'<LF> + );<LF> + console.log(<LF> + \`Multiline \\n string\\<LF> + Multiline string\\<LF> + Multiline string\`<LF> + );<LF> + });<LF> + }<LF> +);<LF> + +=====================================output===================================== +type IAmIncredibleLongParameterType = {};<CRLF> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<CRLF> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CRLF> + (_0: IAmIncredibleLongParameterType) => {<CRLF> + setTimeout(() => {<CRLF> + /*<CRLF> + Multiline comment<CRLF> + Multiline comment<CRLF> + Multiline comment<CRLF> + */<CRLF> + console.log(<CRLF> + "Multiline string\\<CRLF> + Multiline string\\<CRLF> + Multiline string",<CRLF> + );<CRLF> + console.log(<CRLF> + \`Multiline \\n string\\<CRLF> + Multiline string\\<CRLF> + Multiline string\`,<CRLF> + );<CRLF> + });<CRLF> + },<CRLF> +);<CRLF> + +================================================================================ +`; + +exports[`multiline.ts - {"endOfLine":"lf"} format 1`] = ` +====================================options===================================== +endOfLine: "lf" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type IAmIncredibleLongParameterType = {};<LF> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> + (_0: IAmIncredibleLongParameterType) => {<LF> + setTimeout(() => {<LF> + /*<LF> + Multiline comment<LF> + Multiline comment<LF> + Multiline comment<LF> + */<LF> + console.log(<LF> + 'Multiline string\\<LF> + Multiline string\\<LF> + Multiline string'<LF> + );<LF> + console.log(<LF> + \`Multiline \\n string\\<LF> + Multiline string\\<LF> + Multiline string\`<LF> + );<LF> + });<LF> + }<LF> +);<LF> + +=====================================output===================================== +type IAmIncredibleLongParameterType = {};<LF> +const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> +export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> + (_0: IAmIncredibleLongParameterType) => {<LF> + setTimeout(() => {<LF> + /*<LF> + Multiline comment<LF> + Multiline comment<LF> + Multiline comment<LF> + */<LF> + console.log(<LF> + "Multiline string\\<LF> + Multiline string\\<LF> + Multiline string",<LF> + );<LF> + console.log(<LF> + \`Multiline \\n string\\<LF> + Multiline string\\<LF> + Multiline string\`,<LF> + );<LF> + });<LF> + },<LF> +);<LF> + +================================================================================ +`; diff --git a/tests/format/typescript/end-of-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/end-of-line/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1da4dc639d0e..000000000000 --- a/tests/format/typescript/end-of-line/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,178 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`multiline.ts - {"endOfLine":"cr"} format 1`] = ` -====================================options===================================== -endOfLine: "cr" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -type IAmIncredibleLongParameterType = {};<LF> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> - (_0: IAmIncredibleLongParameterType) => {<LF> - setTimeout(() => {<LF> - /*<LF> - Multiline comment<LF> - Multiline comment<LF> - Multiline comment<LF> - */<LF> - console.log(<LF> - 'Multiline string\\<LF> - Multiline string\\<LF> - Multiline string'<LF> - );<LF> - console.log(<LF> - \`Multiline \\n string\\<LF> - Multiline string\\<LF> - Multiline string\`<LF> - );<LF> - });<LF> - }<LF> -);<LF> - -=====================================output===================================== -type IAmIncredibleLongParameterType = {};<CR> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<CR> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CR> - (_0: IAmIncredibleLongParameterType) => {<CR> - setTimeout(() => {<CR> - /*<CR> - Multiline comment<CR> - Multiline comment<CR> - Multiline comment<CR> - */<CR> - console.log(<CR> - "Multiline string\\<CR> - Multiline string\\<CR> - Multiline string"<CR> - );<CR> - console.log(<CR> - \`Multiline \\n string\\<CR> - Multiline string\\<CR> - Multiline string\`<CR> - );<CR> - });<CR> - }<CR> -);<CR> - -================================================================================ -`; - -exports[`multiline.ts - {"endOfLine":"crlf"} format 1`] = ` -====================================options===================================== -endOfLine: "crlf" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -type IAmIncredibleLongParameterType = {};<LF> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> - (_0: IAmIncredibleLongParameterType) => {<LF> - setTimeout(() => {<LF> - /*<LF> - Multiline comment<LF> - Multiline comment<LF> - Multiline comment<LF> - */<LF> - console.log(<LF> - 'Multiline string\\<LF> - Multiline string\\<LF> - Multiline string'<LF> - );<LF> - console.log(<LF> - \`Multiline \\n string\\<LF> - Multiline string\\<LF> - Multiline string\`<LF> - );<LF> - });<LF> - }<LF> -);<LF> - -=====================================output===================================== -type IAmIncredibleLongParameterType = {};<CRLF> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<CRLF> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CRLF> - (_0: IAmIncredibleLongParameterType) => {<CRLF> - setTimeout(() => {<CRLF> - /*<CRLF> - Multiline comment<CRLF> - Multiline comment<CRLF> - Multiline comment<CRLF> - */<CRLF> - console.log(<CRLF> - "Multiline string\\<CRLF> - Multiline string\\<CRLF> - Multiline string"<CRLF> - );<CRLF> - console.log(<CRLF> - \`Multiline \\n string\\<CRLF> - Multiline string\\<CRLF> - Multiline string\`<CRLF> - );<CRLF> - });<CRLF> - }<CRLF> -);<CRLF> - -================================================================================ -`; - -exports[`multiline.ts - {"endOfLine":"lf"} format 1`] = ` -====================================options===================================== -endOfLine: "lf" -parsers: ["typescript", "babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -type IAmIncredibleLongParameterType = {};<LF> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> - (_0: IAmIncredibleLongParameterType) => {<LF> - setTimeout(() => {<LF> - /*<LF> - Multiline comment<LF> - Multiline comment<LF> - Multiline comment<LF> - */<LF> - console.log(<LF> - 'Multiline string\\<LF> - Multiline string\\<LF> - Multiline string'<LF> - );<LF> - console.log(<LF> - \`Multiline \\n string\\<LF> - Multiline string\\<LF> - Multiline string\`<LF> - );<LF> - });<LF> - }<LF> -);<LF> - -=====================================output===================================== -type IAmIncredibleLongParameterType = {};<LF> -const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};<LF> -export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<LF> - (_0: IAmIncredibleLongParameterType) => {<LF> - setTimeout(() => {<LF> - /*<LF> - Multiline comment<LF> - Multiline comment<LF> - Multiline comment<LF> - */<LF> - console.log(<LF> - "Multiline string\\<LF> - Multiline string\\<LF> - Multiline string"<LF> - );<LF> - console.log(<LF> - \`Multiline \\n string\\<LF> - Multiline string\\<LF> - Multiline string\`<LF> - );<LF> - });<LF> - }<LF> -);<LF> - -================================================================================ -`; diff --git a/tests/format/typescript/end-of-line/format.test.js b/tests/format/typescript/end-of-line/format.test.js new file mode 100644 index 000000000000..1646da0840db --- /dev/null +++ b/tests/format/typescript/end-of-line/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript", "flow"], { endOfLine: "lf" }); +runFormatTest(import.meta, ["typescript", "flow"], { endOfLine: "cr" }); +runFormatTest(import.meta, ["typescript", "flow"], { endOfLine: "crlf" }); diff --git a/tests/format/typescript/end-of-line/jsfmt.spec.js b/tests/format/typescript/end-of-line/jsfmt.spec.js deleted file mode 100644 index 6060c46232a8..000000000000 --- a/tests/format/typescript/end-of-line/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript", "babel"], { endOfLine: "lf" }); -run_spec(__dirname, ["typescript", "babel"], { endOfLine: "cr" }); -run_spec(__dirname, ["typescript", "babel"], { endOfLine: "crlf" }); diff --git a/tests/format/typescript/enum/__snapshots__/format.test.js.snap b/tests/format/typescript/enum/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..73b3fafb376f --- /dev/null +++ b/tests/format/typescript/enum/__snapshots__/format.test.js.snap @@ -0,0 +1,135 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`computed-members.ts [babel-ts] format 1`] = ` +"Unexpected token (2:3) + 1 | enum A { +> 2 | [i++], + | ^ + 3 | } + 4 | + 5 | const bar = "bar" +Cause: Unexpected token (2:2)" +`; + +exports[`computed-members.ts [oxc-ts] format 1`] = ` +"Computed property names are not allowed in enums. (2:4) + 1 | enum A { +> 2 | [i++], + | ^^^ + 3 | } + 4 | + 5 | const bar = "bar"" +`; + +exports[`computed-members.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +enum A { + [i++], +} + +const bar = "bar" +enum B { + [bar] = 2, +} + +const foo = () => "foo"; +enum C { + [foo()] = 2, +} + +=====================================output===================================== +enum A { + [i++], +} + +const bar = "bar"; +enum B { + [bar] = 2, +} + +const foo = () => "foo"; +enum C { + [foo()] = 2, +} + +================================================================================ +`; + +exports[`enum.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +enum Direction { + Up = 1, + Down, + Left, + Right +} + +enum FileAccess { + // constant members + None, + Read = 1 << 1, + Write = 1 << 2, + ReadWrite = Read | Write, + // computed member + G = "123".length +} + +enum Empty { +} + +const enum Enum { + A = 1, + B = A * 2 +} + +=====================================output===================================== +enum Direction { + Up = 1, + Down, + Left, + Right, +} + +enum FileAccess { + // constant members + None, + Read = 1 << 1, + Write = 1 << 2, + ReadWrite = Read | Write, + // computed member + G = "123".length, +} + +enum Empty {} + +const enum Enum { + A = 1, + B = A * 2, +} + +================================================================================ +`; + +exports[`multiline.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare enum +E +{} + +=====================================output===================================== +declare enum E {} + +================================================================================ +`; diff --git a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 0a37faedb892..000000000000 --- a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,124 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`computed-members.ts [babel-ts] format 1`] = ` -"Unexpected token (2:3) - 1 | enum A { -> 2 | [i++], - | ^ - 3 | } - 4 | - 5 | const bar = "bar"" -`; - -exports[`computed-members.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -enum A { - [i++], -} - -const bar = "bar" -enum B { - [bar] = 2, -} - -const foo = () => "foo"; -enum C { - [foo()] = 2, -} - -=====================================output===================================== -enum A { - [i++], -} - -const bar = "bar"; -enum B { - [bar] = 2, -} - -const foo = () => "foo"; -enum C { - [foo()] = 2, -} - -================================================================================ -`; - -exports[`enum.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -enum Direction { - Up = 1, - Down, - Left, - Right -} - -enum FileAccess { - // constant members - None, - Read = 1 << 1, - Write = 1 << 2, - ReadWrite = Read | Write, - // computed member - G = "123".length -} - -enum Empty { -} - -const enum Enum { - A = 1, - B = A * 2 -} - -=====================================output===================================== -enum Direction { - Up = 1, - Down, - Left, - Right, -} - -enum FileAccess { - // constant members - None, - Read = 1 << 1, - Write = 1 << 2, - ReadWrite = Read | Write, - // computed member - G = "123".length, -} - -enum Empty {} - -const enum Enum { - A = 1, - B = A * 2, -} - -================================================================================ -`; - -exports[`multiline.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare enum -E -{} - -=====================================output===================================== -declare enum E {} - -================================================================================ -`; diff --git a/tests/format/typescript/enum/format.test.js b/tests/format/typescript/enum/format.test.js new file mode 100644 index 000000000000..d5137df63381 --- /dev/null +++ b/tests/format/typescript/enum/format.test.js @@ -0,0 +1,6 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { + "babel-ts": ["computed-members.ts"], + "oxc-ts": ["computed-members.ts"], + }, +}); diff --git a/tests/format/typescript/enum/jsfmt.spec.js b/tests/format/typescript/enum/jsfmt.spec.js deleted file mode 100644 index 808fc6828fe8..000000000000 --- a/tests/format/typescript/enum/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { - "babel-ts": ["computed-members.ts"], - }, -}); diff --git a/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap b/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4483c487557f --- /dev/null +++ b/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap @@ -0,0 +1,580 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`generic.ts [oxc-ts] format 1`] = ` +"Type parameter list cannot be empty. (5:12) + 3 | new f2<>(); + 4 | +> 5 | function f3<>() {} + | ^^ + 6 | + 7 | class f4 { + 8 | constructor<>() {}" +`; + +exports[`generic.ts - {"trailingComma":"all"} [oxc-ts] format 1`] = ` +"Type parameter list cannot be empty. (5:12) + 3 | new f2<>(); + 4 | +> 5 | function f3<>() {} + | ^^ + 6 | + 7 | class f4 { + 8 | constructor<>() {}" +`; + +exports[`generic.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {} + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +=====================================output===================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function <>() {}; + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +================================================================================ +`; + +exports[`generic.ts - {"trailingComma":"es5"} [oxc-ts] format 1`] = ` +"Type parameter list cannot be empty. (5:12) + 3 | new f2<>(); + 4 | +> 5 | function f3<>() {} + | ^^ + 6 | + 7 | class f4 { + 8 | constructor<>() {}" +`; + +exports[`generic.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {} + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +=====================================output===================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function <>() {}; + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +================================================================================ +`; + +exports[`generic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function<>() {} + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +=====================================output===================================== +f1<>(); + +new f2<>(); + +function f3<>() {} + +class f4 { + constructor<>() {} +} + +const f5 = function <>() {}; + +interface f6<> { + test<>(); +} + +class f7<> { + test<>() {} +} + +================================================================================ +`; + +exports[`index-signature.ts [babel-ts] format 1`] = ` +"Unexpected token, expected "]" (4:13) + 2 | + 3 | type TwoParams = { +> 4 | [a: string, b: string]: string; + | ^ + 5 | }; + 6 | type ThreeParams = { + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" +`; + +exports[`index-signature.ts [oxc-ts] format 1`] = ` +"An index signature must have a type annotation. (1:12) +> 1 | type A = { [key: string] }; + | ^^^^^^^^^^^^^ + 2 | + 3 | type TwoParams = { + 4 | [a: string, b: string]: string;" +`; + +exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` +"Unexpected token, expected "]" (4:13) + 2 | + 3 | type TwoParams = { +> 4 | [a: string, b: string]: string; + | ^ + 5 | }; + 6 | type ThreeParams = { + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" +`; + +exports[`index-signature.ts - {"trailingComma":"all"} [oxc-ts] format 1`] = ` +"An index signature must have a type annotation. (1:12) +> 1 | type A = { [key: string] }; + | ^^^^^^^^^^^^^ + 2 | + 3 | type TwoParams = { + 4 | [a: string, b: string]: string;" +`; + +exports[`index-signature.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; +} +type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } +type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; +} + +=====================================output===================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [ + loooooooooooooooooooooooooong: string, + looooooooooooooooooooooooooooooooooooooong: string, + ]: string; +}; +type TooLong81 = { + [ + loooooooooooooooooooooooooong: string, + loooooooooooooooooong: string, + ]: string; +}; +type TooLong80 = { + [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; +}; + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [ + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string + ]: string; +}; + +================================================================================ +`; + +exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` +"Unexpected token, expected "]" (4:13) + 2 | + 3 | type TwoParams = { +> 4 | [a: string, b: string]: string; + | ^ + 5 | }; + 6 | type ThreeParams = { + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" +`; + +exports[`index-signature.ts - {"trailingComma":"es5"} [oxc-ts] format 1`] = ` +"An index signature must have a type annotation. (1:12) +> 1 | type A = { [key: string] }; + | ^^^^^^^^^^^^^ + 2 | + 3 | type TwoParams = { + 4 | [a: string, b: string]: string;" +`; + +exports[`index-signature.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; +} +type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } +type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; +} + +=====================================output===================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [ + loooooooooooooooooooooooooong: string, + looooooooooooooooooooooooooooooooooooooong: string, + ]: string; +}; +type TooLong81 = { + [ + loooooooooooooooooooooooooong: string, + loooooooooooooooooong: string, + ]: string; +}; +type TooLong80 = { + [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; +}; + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [ + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string + ]: string; +}; + +================================================================================ +`; + +exports[`index-signature.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; +} +type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } +type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; +} + +=====================================output===================================== +type A = { [key: string] }; + +type TwoParams = { + [a: string, b: string]: string; +}; +type ThreeParams = { + [a: string, b: string, c: string]: string; +}; + +type TooLong = { + [ + loooooooooooooooooooooooooong: string, + looooooooooooooooooooooooooooooooooooooong: string, + ]: string; +}; +type TooLong81 = { + [ + loooooooooooooooooooooooooong: string, + loooooooooooooooooong: string, + ]: string; +}; +type TooLong80 = { + [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; +}; + +// note lack of trailing comma in the index signature +type TooLongSingleParam = { + [ + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string + ]: string; +}; + +================================================================================ +`; + +exports[`jsdoc_only_types.ts [babel-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?; +Cause: Unexpected token (1:7)" +`; + +exports[`jsdoc_only_types.ts [oxc-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?;" +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?; +Cause: Unexpected token (1:7)" +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [oxc-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?;" +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +=====================================output===================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +================================================================================ +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?; +Cause: Unexpected token (1:7)" +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [oxc-ts] format 1`] = ` +"Unexpected token (1:8) +> 1 | let a: *; + | ^ + 2 | function b(x: ?) {} + 3 | let c: ?string; + 4 | let d: string?;" +`; + +exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +=====================================output===================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +================================================================================ +`; + +exports[`jsdoc_only_types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +=====================================output===================================== +let a: *; +function b(x: ?) {} +let c: ?string; +let d: string?; +let e: ?(string | number); +let f: !string; +let g: string!; +let h: !(string | number); + +================================================================================ +`; diff --git a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b6d8a92f9841..000000000000 --- a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,487 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`generic.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function<>() {} - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -=====================================output===================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function <>() {}; - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -================================================================================ -`; - -exports[`generic.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function<>() {} - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -=====================================output===================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function <>() {}; - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -================================================================================ -`; - -exports[`generic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function<>() {} - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -=====================================output===================================== -f1<>(); - -new f2<>(); - -function f3<>() {} - -class f4 { - constructor<>() {} -} - -const f5 = function <>() {}; - -interface f6<> { - test<>(); -} - -class f7<> { - test<>() {} -} - -================================================================================ -`; - -exports[`index-signature.ts [babel-ts] format 1`] = ` -"Unexpected token, expected "]" (4:13) - 2 | - 3 | type TwoParams = { -> 4 | [a: string, b: string]: string; - | ^ - 5 | }; - 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" -`; - -exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` -"Unexpected token, expected "]" (4:13) - 2 | - 3 | type TwoParams = { -> 4 | [a: string, b: string]: string; - | ^ - 5 | }; - 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" -`; - -exports[`index-signature.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; -} -type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } -type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; -} - -=====================================output===================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [ - loooooooooooooooooooooooooong: string, - looooooooooooooooooooooooooooooooooooooong: string, - ]: string; -}; -type TooLong81 = { - [ - loooooooooooooooooooooooooong: string, - loooooooooooooooooong: string, - ]: string; -}; -type TooLong80 = { - [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; -}; - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [ - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string - ]: string; -}; - -================================================================================ -`; - -exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` -"Unexpected token, expected "]" (4:13) - 2 | - 3 | type TwoParams = { -> 4 | [a: string, b: string]: string; - | ^ - 5 | }; - 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" -`; - -exports[`index-signature.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; -} -type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } -type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; -} - -=====================================output===================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [ - loooooooooooooooooooooooooong: string, - looooooooooooooooooooooooooooooooooooooong: string, - ]: string; -}; -type TooLong81 = { - [ - loooooooooooooooooooooooooong: string, - loooooooooooooooooong: string, - ]: string; -}; -type TooLong80 = { - [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; -}; - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [ - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string - ]: string; -}; - -================================================================================ -`; - -exports[`index-signature.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [loooooooooooooooooooooooooong: string, looooooooooooooooooooooooooooooooooooooong: string]: string; -} -type TooLong81 = { [loooooooooooooooooooooooooong: string, loooooooooooooooooong: string]: string; } -type TooLong80 = { [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; } - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string]: string; -} - -=====================================output===================================== -type A = { [key: string] }; - -type TwoParams = { - [a: string, b: string]: string; -}; -type ThreeParams = { - [a: string, b: string, c: string]: string; -}; - -type TooLong = { - [ - loooooooooooooooooooooooooong: string, - looooooooooooooooooooooooooooooooooooooong: string, - ]: string; -}; -type TooLong81 = { - [ - loooooooooooooooooooooooooong: string, - loooooooooooooooooong: string, - ]: string; -}; -type TooLong80 = { - [loooooooooooooooooooooooooong: string, looooooooooooooooong: string]: string; -}; - -// note lack of trailing comma in the index signature -type TooLongSingleParam = { - [ - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong: string - ]: string; -}; - -================================================================================ -`; - -exports[`jsdoc_only_types.ts [babel-ts] format 1`] = ` -"Unexpected token (1:8) -> 1 | let a: *; - | ^ - 2 | function b(x: ?) {} - 3 | let c: ?string; - 4 | let d: string?;" -`; - -exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` -"Unexpected token (1:8) -> 1 | let a: *; - | ^ - 2 | function b(x: ?) {} - 3 | let c: ?string; - 4 | let d: string?;" -`; - -exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -=====================================output===================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -================================================================================ -`; - -exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` -"Unexpected token (1:8) -> 1 | let a: *; - | ^ - 2 | function b(x: ?) {} - 3 | let c: ?string; - 4 | let d: string?;" -`; - -exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -=====================================output===================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -================================================================================ -`; - -exports[`jsdoc_only_types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -=====================================output===================================== -let a: *; -function b(x: ?) {} -let c: ?string; -let d: string?; -let e: ?(string | number); -let f: !string; -let g: string!; -let h: !(string | number); - -================================================================================ -`; diff --git a/tests/format/typescript/error-recovery/format.test.js b/tests/format/typescript/error-recovery/format.test.js new file mode 100644 index 000000000000..65ae7f88e73e --- /dev/null +++ b/tests/format/typescript/error-recovery/format.test.js @@ -0,0 +1,12 @@ +const errors = { + "babel-ts": ["jsdoc_only_types.ts", "index-signature.ts"], + "oxc-ts": [ + "jsdoc_only_types.ts", + "index-signature.ts", + // TODO: Ask typescript-eslint to throw + "generic.ts", + ], +}; +runFormatTest(import.meta, ["typescript"], { errors }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5", errors }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "all", errors }); diff --git a/tests/format/typescript/error-recovery/jsfmt.spec.js b/tests/format/typescript/error-recovery/jsfmt.spec.js deleted file mode 100644 index 183fa7c36c72..000000000000 --- a/tests/format/typescript/error-recovery/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -const errors = { "babel-ts": ["jsdoc_only_types.ts", "index-signature.ts"] }; -run_spec(__dirname, ["typescript"], { errors }); -run_spec(__dirname, ["typescript"], { trailingComma: "es5", errors }); -run_spec(__dirname, ["typescript"], { trailingComma: "all", errors }); diff --git a/tests/format/typescript/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/typescript/explicit-resource-management/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f7438122e20b --- /dev/null +++ b/tests/format/typescript/explicit-resource-management/__snapshots__/format.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`await-using-with-type-declaration.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + await using foo: Foo = new Foo(); +} + +=====================================output===================================== +{ + await using foo: Foo = new Foo(); +} + +================================================================================ +`; + +exports[`using-with-type-declaration.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +{ + using foo: Foo = new Foo(); +} + +=====================================output===================================== +{ + using foo: Foo = new Foo(); +} + +================================================================================ +`; diff --git a/tests/format/typescript/explicit-resource-management/await-using-with-type-declaration.ts b/tests/format/typescript/explicit-resource-management/await-using-with-type-declaration.ts new file mode 100644 index 000000000000..1b8b0c6323d8 --- /dev/null +++ b/tests/format/typescript/explicit-resource-management/await-using-with-type-declaration.ts @@ -0,0 +1,3 @@ +{ + await using foo: Foo = new Foo(); +} diff --git a/tests/format/typescript/explicit-resource-management/format.test.js b/tests/format/typescript/explicit-resource-management/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/explicit-resource-management/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/explicit-resource-management/using-with-type-declaration.ts b/tests/format/typescript/explicit-resource-management/using-with-type-declaration.ts new file mode 100644 index 000000000000..6873b4048c34 --- /dev/null +++ b/tests/format/typescript/explicit-resource-management/using-with-type-declaration.ts @@ -0,0 +1,3 @@ +{ + using foo: Foo = new Foo(); +} diff --git a/tests/format/typescript/export-default/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/export-default/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/export-default/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/export-default/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/export-default/format.test.js b/tests/format/typescript/export-default/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/export-default/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/export-default/jsfmt.spec.js b/tests/format/typescript/export-default/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/export-default/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/export/__snapshots__/format.test.js.snap b/tests/format/typescript/export/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0af227165b9c --- /dev/null +++ b/tests/format/typescript/export/__snapshots__/format.test.js.snap @@ -0,0 +1,129 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export function match(): string /* the matching pattern */ +a + +=====================================output===================================== +export function match(): string; /* the matching pattern */ +a; + +================================================================================ +`; + +exports[`default.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default interface Foo { + readonly bar?: string; +} + +=====================================output===================================== +export default interface Foo { + readonly bar?: string; +} + +================================================================================ +`; + +exports[`export.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module "hello" { + export default Hello; +} + +declare module "hello" { + export = Hello; +} + +=====================================output===================================== +declare module "hello" { + export default Hello; +} + +declare module "hello" { + export = Hello; +} + +================================================================================ +`; + +exports[`export-as-ns.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export * as utilities from "./utilities.js"; + +=====================================output===================================== +export * as utilities from "./utilities.js"; + +================================================================================ +`; + +exports[`export-class.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class A {} +export default class B {} +export abstract class C {} +export default abstract class D {} + +=====================================output===================================== +export class A {} +export default class B {} +export abstract class C {} +export default abstract class D {} + +================================================================================ +`; + +exports[`export-type-star-from.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type * from './mod'; +export type * as ns from './mod'; + +=====================================output===================================== +export type * from "./mod"; +export type * as ns from "./mod"; + +================================================================================ +`; + +exports[`export-type-star-from-2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// Note: TSC doesn't support string module specifiers yet, +// but it's easier for us to support them than not. +export type * as "ns2" from './mod'; + +=====================================output===================================== +// Note: TSC doesn't support string module specifiers yet, +// but it's easier for us to support them than not. +export type * as "ns2" from "./mod"; + +================================================================================ +`; diff --git a/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f71a5c3bccfb..000000000000 --- a/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export function match(): string /* the matching pattern */ -a - -=====================================output===================================== -export function match(): string; /* the matching pattern */ -a; - -================================================================================ -`; - -exports[`default.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default interface Foo { - readonly bar?: string; -} - -=====================================output===================================== -export default interface Foo { - readonly bar?: string; -} - -================================================================================ -`; - -exports[`export.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module "hello" { - export default Hello; -} - -declare module "hello" { - export = Hello; -} - -=====================================output===================================== -declare module "hello" { - export default Hello; -} - -declare module "hello" { - export = Hello; -} - -================================================================================ -`; - -exports[`export-as-ns.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export * as utilities from "./utilities.js"; - -=====================================output===================================== -export * as utilities from "./utilities.js"; - -================================================================================ -`; - -exports[`export-class.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class A {} -export default class B {} -export abstract class C {} -export default abstract class D {} - -=====================================output===================================== -export class A {} -export default class B {} -export abstract class C {} -export default abstract class D {} - -================================================================================ -`; - -exports[`export-type-star-from.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type * from './mod'; -export type * as ns from './mod'; - -=====================================output===================================== -export type * from "./mod"; -export type * as ns from "./mod"; - -================================================================================ -`; - -exports[`export-type-star-from-2.ts [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// Note: TSC doesn't support string module specifiers yet, -// but it's easier for us to support them than not. -export type * as "ns2" from './mod'; - -=====================================output===================================== -// Note: TSC doesn't support string module specifiers yet, -// but it's easier for us to support them than not. -export type * as "ns2" from "./mod"; - -================================================================================ -`; - -exports[`export-type-star-from-2.ts [typescript] format 1`] = ` -"Identifier expected. (3:18) - 1 | // Note: TSC doesn't support string module specifiers yet, - 2 | // but it's easier for us to support them than not. -> 3 | export type * as "ns2" from './mod'; - | ^ - 4 |" -`; diff --git a/tests/format/typescript/export/format.test.js b/tests/format/typescript/export/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/export/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/export/jsfmt.spec.js b/tests/format/typescript/export/jsfmt.spec.js deleted file mode 100644 index 6c585bb260e6..000000000000 --- a/tests/format/typescript/export/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { typescript: ["export-type-star-from-2.ts"] }, -}); diff --git a/tests/format/typescript/function-type/__snapshots__/format.test.js.snap b/tests/format/typescript/function-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4a49f8f498c8 --- /dev/null +++ b/tests/format/typescript/function-type/__snapshots__/format.test.js.snap @@ -0,0 +1,102 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`consistent.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// TSFunctionType +type A = ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +// TSConstructorType +type B = new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +type X = { + // TSCallSignatureDeclaration + ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; + + // TSConstructSignatureDeclaration + new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; +}; + +=====================================output===================================== +// TSFunctionType +type A = ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +// TSConstructorType +type B = new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +type X = { + // TSCallSignatureDeclaration + ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; + + // TSConstructSignatureDeclaration + new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; +}; + +================================================================================ +`; + +exports[`single-parameter.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type X = (options:{ a: string; b: AbstractCompositeThingamabobberFactoryProvider}) => {}; +type Y = new (options:{ a: string; b: AbstractCompositeThingamabobberFactoryProvider}) => {}; +=====================================output===================================== +type X = (options: { + a: string; + b: AbstractCompositeThingamabobberFactoryProvider; +}) => {}; +type Y = new (options: { + a: string; + b: AbstractCompositeThingamabobberFactoryProvider; +}) => {}; + +================================================================================ +`; + +exports[`type-annotation.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo = (): () => void => (): void => null; +const bar = (): (() => void) => (): void => null; +const baz = (): ((() => void)) => (): void => null; + +=====================================output===================================== +const foo = (): (() => void) => (): void => null; +const bar = (): (() => void) => (): void => null; +const baz = (): (() => void) => (): void => null; + +================================================================================ +`; diff --git a/tests/format/typescript/function-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/function-type/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4c2eb69921d4..000000000000 --- a/tests/format/typescript/function-type/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,40 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`single-parameter.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type X = (options:{ a: string; b: AbstractCompositeThingamabobberFactoryProvider}) => {}; -type Y = new (options:{ a: string; b: AbstractCompositeThingamabobberFactoryProvider}) => {}; -=====================================output===================================== -type X = (options: { - a: string; - b: AbstractCompositeThingamabobberFactoryProvider; -}) => {}; -type Y = new (options: { - a: string; - b: AbstractCompositeThingamabobberFactoryProvider; -}) => {}; - -================================================================================ -`; - -exports[`type-annotation.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo = (): () => void => (): void => null; -const bar = (): (() => void) => (): void => null; -const baz = (): ((() => void)) => (): void => null; - -=====================================output===================================== -const foo = (): (() => void) => (): void => null; -const bar = (): (() => void) => (): void => null; -const baz = (): (() => void) => (): void => null; - -================================================================================ -`; diff --git a/tests/format/typescript/function-type/consistent.ts b/tests/format/typescript/function-type/consistent.ts new file mode 100644 index 000000000000..bb661226cd88 --- /dev/null +++ b/tests/format/typescript/function-type/consistent.ts @@ -0,0 +1,25 @@ +// TSFunctionType +type A = ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +// TSConstructorType +type B = new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> +) => (replacements?: PublicReplacements) => T; + +type X = { + // TSCallSignatureDeclaration + ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; + + // TSConstructSignatureDeclaration + new ( + tpl: TemplateStringsArray, + ...args: Array<unknown> + ): (replacements?: PublicReplacements) => T; +}; diff --git a/tests/format/typescript/function-type/format.test.js b/tests/format/typescript/function-type/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/function-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/function-type/jsfmt.spec.js b/tests/format/typescript/function-type/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/function-type/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/function/__snapshots__/format.test.js.snap b/tests/format/typescript/function/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5d044ea7669c --- /dev/null +++ b/tests/format/typescript/function/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`single_expand.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +function onDidInsertSuggestion({ + editor, + triggerPosition, + re +}): Promise<void> { +} + +class X { + async onDidInsertSuggestion({editor, triggerPosition, suggestion}): Promise< + void + > { + } +} + +=====================================output===================================== +function onDidInsertSuggestion({ + editor, + triggerPosition, + re, +}): Promise<void> {} + +class X { + async onDidInsertSuggestion({ + editor, + triggerPosition, + suggestion, + }): Promise<void> {} +} + +================================================================================ +`; diff --git a/tests/format/typescript/function/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/function/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 02efd8e1743c..000000000000 --- a/tests/format/typescript/function/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,39 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`single_expand.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -function onDidInsertSuggestion({ - editor, - triggerPosition, - re -}): Promise<void> { -} - -class X { - async onDidInsertSuggestion({editor, triggerPosition, suggestion}): Promise< - void - > { - } -} - -=====================================output===================================== -function onDidInsertSuggestion({ - editor, - triggerPosition, - re, -}): Promise<void> {} - -class X { - async onDidInsertSuggestion({ - editor, - triggerPosition, - suggestion, - }): Promise<void> {} -} - -================================================================================ -`; diff --git a/tests/format/typescript/function/format.test.js b/tests/format/typescript/function/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/function/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/function/jsfmt.spec.js b/tests/format/typescript/function/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/function/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/functional-composition/__snapshots__/format.test.js.snap b/tests/format/typescript/functional-composition/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6c6a6e897fac --- /dev/null +++ b/tests/format/typescript/functional-composition/__snapshots__/format.test.js.snap @@ -0,0 +1,158 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`pipe-function-calls.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +(() => { + + pipe( + serviceEventFromMessage(msg), + TE.chain( + flow( + publishServiceEvent(analytics), + TE.mapLeft(nackFromError) + ) + ) + )() + .then(messageResponse(logger, msg)) + .catch((err: Error) => { + logger.error( + pipe( + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)) + ) + ); + process.exit(1); + }); +})(); + +=====================================output===================================== +(() => { + pipe( + serviceEventFromMessage(msg), + TE.chain(flow(publishServiceEvent(analytics), TE.mapLeft(nackFromError))), + )() + .then(messageResponse(logger, msg)) + .catch((err: Error) => { + logger.error( + pipe(O.fromNullable(err.stack), O.getOrElse(constant(err.message))), + ); + process.exit(1); + }); +})(); + +================================================================================ +`; + +exports[`pipe-function-calls-with-comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// input with some comments added to avoid reformatting + +(() => { + pipe( + // add a descriptive comment here + timelines, + everyCommitTimestamps, + A.sort(ordDate), + A.head + ); + + pipe( + // add a descriptive comment here + serviceEventFromMessage(msg), + TE.chain( + flow( + // add a descriptive comment here + publishServiceEvent(analytics), + TE.mapLeft(nackFromError) + ) + ) + )() + .then(messageResponse(logger, msg)) + .catch((err: Error) => { + logger.error( + pipe( + // add a descriptive comment here + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)) + ) + ); + process.exit(1); + }); + + pipe( + // add a descriptive comment here + Changelog.timestampOfFirstCommit([[commit]]), + O.toUndefined + ); + + chain( + flow( + // add a descriptive comment here + getUploadUrl, + E.mapLeft(Errors.unknownError), + TE.fromEither + ) + ); +})(); + +=====================================output===================================== +// input with some comments added to avoid reformatting + +(() => { + pipe( + // add a descriptive comment here + timelines, + everyCommitTimestamps, + A.sort(ordDate), + A.head, + ); + + pipe( + // add a descriptive comment here + serviceEventFromMessage(msg), + TE.chain( + flow( + // add a descriptive comment here + publishServiceEvent(analytics), + TE.mapLeft(nackFromError), + ), + ), + )() + .then(messageResponse(logger, msg)) + .catch((err: Error) => { + logger.error( + pipe( + // add a descriptive comment here + O.fromNullable(err.stack), + O.getOrElse(constant(err.message)), + ), + ); + process.exit(1); + }); + + pipe( + // add a descriptive comment here + Changelog.timestampOfFirstCommit([[commit]]), + O.toUndefined, + ); + + chain( + flow( + // add a descriptive comment here + getUploadUrl, + E.mapLeft(Errors.unknownError), + TE.fromEither, + ), + ); +})(); + +================================================================================ +`; diff --git a/tests/format/typescript/functional-composition/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/functional-composition/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 744873bf85a8..000000000000 --- a/tests/format/typescript/functional-composition/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,158 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`pipe-function-calls.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -(() => { - - pipe( - serviceEventFromMessage(msg), - TE.chain( - flow( - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err: Error) => { - logger.error( - pipe( - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); -})(); - -=====================================output===================================== -(() => { - pipe( - serviceEventFromMessage(msg), - TE.chain(flow(publishServiceEvent(analytics), TE.mapLeft(nackFromError))) - )() - .then(messageResponse(logger, msg)) - .catch((err: Error) => { - logger.error( - pipe(O.fromNullable(err.stack), O.getOrElse(constant(err.message))) - ); - process.exit(1); - }); -})(); - -================================================================================ -`; - -exports[`pipe-function-calls-with-comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -// input with some comments added to avoid reformatting - -(() => { - pipe( - // add a descriptive comment here - timelines, - everyCommitTimestamps, - A.sort(ordDate), - A.head - ); - - pipe( - // add a descriptive comment here - serviceEventFromMessage(msg), - TE.chain( - flow( - // add a descriptive comment here - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err: Error) => { - logger.error( - pipe( - // add a descriptive comment here - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); - - pipe( - // add a descriptive comment here - Changelog.timestampOfFirstCommit([[commit]]), - O.toUndefined - ); - - chain( - flow( - // add a descriptive comment here - getUploadUrl, - E.mapLeft(Errors.unknownError), - TE.fromEither - ) - ); -})(); - -=====================================output===================================== -// input with some comments added to avoid reformatting - -(() => { - pipe( - // add a descriptive comment here - timelines, - everyCommitTimestamps, - A.sort(ordDate), - A.head - ); - - pipe( - // add a descriptive comment here - serviceEventFromMessage(msg), - TE.chain( - flow( - // add a descriptive comment here - publishServiceEvent(analytics), - TE.mapLeft(nackFromError) - ) - ) - )() - .then(messageResponse(logger, msg)) - .catch((err: Error) => { - logger.error( - pipe( - // add a descriptive comment here - O.fromNullable(err.stack), - O.getOrElse(constant(err.message)) - ) - ); - process.exit(1); - }); - - pipe( - // add a descriptive comment here - Changelog.timestampOfFirstCommit([[commit]]), - O.toUndefined - ); - - chain( - flow( - // add a descriptive comment here - getUploadUrl, - E.mapLeft(Errors.unknownError), - TE.fromEither - ) - ); -})(); - -================================================================================ -`; diff --git a/tests/format/typescript/functional-composition/format.test.js b/tests/format/typescript/functional-composition/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/functional-composition/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/functional-composition/jsfmt.spec.js b/tests/format/typescript/functional-composition/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/functional-composition/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/generic/__snapshots__/format.test.js.snap b/tests/format/typescript/generic/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8cf845a8f020 --- /dev/null +++ b/tests/format/typescript/generic/__snapshots__/format.test.js.snap @@ -0,0 +1,223 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`arrow-return-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<Descriptor> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<Descriptor | undefined> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<Descriptor & undefined> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<Descriptor["attributes"]> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributessssssssssssssssssssssss"] +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<keyof Descriptor> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + keyof Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise<Descriptor[]> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string +): Promise< + Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[] +> => {}; + +=====================================output===================================== +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Descriptor> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Descriptor | undefined> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Descriptor & undefined> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Descriptor["attributes"]> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise< + Collections.Parts.PrintedCircuitBoardAssembly["attributessssssssssssssssssssssss"] +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<keyof Descriptor> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise< + keyof Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy +> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise<Descriptor[]> => {}; + +export const getVehicleDescriptor = async ( + vehicleId: string, +): Promise< + Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[] +> => {}; + +================================================================================ +`; + +exports[`issue-6899.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const getUnusedAuthorizationHoldDocuments = async (): Promise<DocumentData[]> => {} + +const firestorePersonallyIdentifiablePaths: Array< + keyof Collections.Users.Entity +> = [] + +export const SUPPORTED_VEHICLE_TYPES: Array< + Collections.VehiclesStates.Entity['type'] +> = Object.values(Collections.VehiclesStates.Type); + +=====================================output===================================== +const getUnusedAuthorizationHoldDocuments = async (): Promise< + DocumentData[] +> => {}; + +const firestorePersonallyIdentifiablePaths: Array< + keyof Collections.Users.Entity +> = []; + +export const SUPPORTED_VEHICLE_TYPES: Array< + Collections.VehiclesStates.Entity["type"] +> = Object.values(Collections.VehiclesStates.Type); + +================================================================================ +`; + +exports[`object-method.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default { + load<K, T>(k: K, t: T) { + return {k, t}; + } +} + +=====================================output===================================== +export default { + load<K, T>(k: K, t: T) { + return { k, t }; + }, +}; + +================================================================================ +`; + +exports[`ungrouped-parameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function filterTooltipWithFoo<F extends Field>(oldEncoding: Encoding<F>): { + customTooltipWithoutAggregatedField?: + | StringFieldDefWithCondition<F> + | StringValueDefWithCondition<F> + | StringFieldDef<F>[]; + filteredEncoding: Encoding<F>; +} { + const {tooltip, ...filteredEncoding} = oldEncoding; + if (!tooltip) { + return {filteredEncoding}; + } + // ... +} + +=====================================output===================================== +function filterTooltipWithFoo<F extends Field>( + oldEncoding: Encoding<F>, +): { + customTooltipWithoutAggregatedField?: + | StringFieldDefWithCondition<F> + | StringValueDefWithCondition<F> + | StringFieldDef<F>[]; + filteredEncoding: Encoding<F>; +} { + const { tooltip, ...filteredEncoding } = oldEncoding; + if (!tooltip) { + return { filteredEncoding }; + } + // ... +} + +================================================================================ +`; diff --git a/tests/format/typescript/generic/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/generic/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e6a52f240ccb..000000000000 --- a/tests/format/typescript/generic/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,223 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow-return-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor | undefined> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor & undefined> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor["attributes"]> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributessssssssssssssssssssssss"] -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<keyof Descriptor> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - keyof Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor[]> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[] -> => {}; - -=====================================output===================================== -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor | undefined> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor & undefined> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor["attributes"]> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributessssssssssssssssssssssss"] -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<keyof Descriptor> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - keyof Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy -> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise<Descriptor[]> => {}; - -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssemblyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[] -> => {}; - -================================================================================ -`; - -exports[`issue-6899.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const getUnusedAuthorizationHoldDocuments = async (): Promise<DocumentData[]> => {} - -const firestorePersonallyIdentifiablePaths: Array< - keyof Collections.Users.Entity -> = [] - -export const SUPPORTED_VEHICLE_TYPES: Array< - Collections.VehiclesStates.Entity['type'] -> = Object.values(Collections.VehiclesStates.Type); - -=====================================output===================================== -const getUnusedAuthorizationHoldDocuments = async (): Promise< - DocumentData[] -> => {}; - -const firestorePersonallyIdentifiablePaths: Array< - keyof Collections.Users.Entity -> = []; - -export const SUPPORTED_VEHICLE_TYPES: Array< - Collections.VehiclesStates.Entity["type"] -> = Object.values(Collections.VehiclesStates.Type); - -================================================================================ -`; - -exports[`object-method.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default { - load<K, T>(k: K, t: T) { - return {k, t}; - } -} - -=====================================output===================================== -export default { - load<K, T>(k: K, t: T) { - return { k, t }; - }, -}; - -================================================================================ -`; - -exports[`ungrouped-parameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function filterTooltipWithFoo<F extends Field>(oldEncoding: Encoding<F>): { - customTooltipWithoutAggregatedField?: - | StringFieldDefWithCondition<F> - | StringValueDefWithCondition<F> - | StringFieldDef<F>[]; - filteredEncoding: Encoding<F>; -} { - const {tooltip, ...filteredEncoding} = oldEncoding; - if (!tooltip) { - return {filteredEncoding}; - } - // ... -} - -=====================================output===================================== -function filterTooltipWithFoo<F extends Field>( - oldEncoding: Encoding<F> -): { - customTooltipWithoutAggregatedField?: - | StringFieldDefWithCondition<F> - | StringValueDefWithCondition<F> - | StringFieldDef<F>[]; - filteredEncoding: Encoding<F>; -} { - const { tooltip, ...filteredEncoding } = oldEncoding; - if (!tooltip) { - return { filteredEncoding }; - } - // ... -} - -================================================================================ -`; diff --git a/tests/format/typescript/generic/format.test.js b/tests/format/typescript/generic/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/generic/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/generic/jsfmt.spec.js b/tests/format/typescript/generic/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/generic/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/import-export/__snapshots__/format.test.js.snap b/tests/format/typescript/import-export/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..8fbcc19bda68 --- /dev/null +++ b/tests/format/typescript/import-export/__snapshots__/format.test.js.snap @@ -0,0 +1,140 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty-import.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +import type { } from '@types/googlemaps'; +import 'a'; +import /* comment */ 'a'; +import // comment +'a'; +import type { /* comment */ } from 'a'; +import /* comment */ type {} from 'a'; +import type {} /* comment */ from 'a'; +import type {} from /* comment */ 'a'; +import /* comment */ type {/* comment */} /* comment */ from /* comment */ 'a'; +import type { + // comment +} from 'a'; +import // comment +type {} from 'a'; +import type {} +// comment +from 'a'; +import type {} from +// comment +'a'; +import type +// comment +{ +// comment +} +// comment +from +// comment +'a'; + +import // {} from +'a'; +import type {} from // comment ends with from +'a'; +import type {} from /* comment ends with from */ 'a'; +import type {} from // comment not ends with from ___ +'a'; +import type {} from /* comment not ends with from ___ */ 'a'; + +import // comment ends with from +'a'; +import /* comment ends with from */ 'a'; +import // comment not ends with from ___ +'a'; +import /* comment not ends with from ___ */ 'a'; + +=====================================output===================================== +import type {} from "@types/googlemaps"; +import "a"; +import /* comment */ "a"; +import // comment +"a"; +import type {} from /* comment */ "a"; +import type {} from /* comment */ "a"; +import type {} from /* comment */ "a"; +import type {} from /* comment */ "a"; +import type {} from /* comment */ /* comment */ /* comment */ /* comment */ "a"; +import type {} from // comment +"a"; +import type {} from // comment +"a"; +import type {} from // comment +"a"; +import type {} from // comment +"a"; +import type {} from // comment +// comment +// comment +// comment +"a"; + +import // {} from +"a"; +import type {} from // comment ends with from +"a"; +import type {} from /* comment ends with from */ "a"; +import type {} from // comment not ends with from ___ +"a"; +import type {} from /* comment not ends with from ___ */ "a"; + +import // comment ends with from +"a"; +import /* comment ends with from */ "a"; +import // comment not ends with from ___ +"a"; +import /* comment not ends with from ___ */ "a"; + +================================================================================ +`; + +exports[`type-modifier.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type { SomeThing }; +export type { A as B }; +export type { B as C } from './a'; +export type { foo } from 'bar'; +export type { foo }; + +// this should be treated as a normal import statement +import type from './foo'; + +import type { SomeThing } from "./some-module.js"; +import type { foo, bar } from 'baz'; +import type { foo as bar } from 'baz'; +import type * as foo from './bar'; +import type foo from 'bar'; +import type foo, { bar } from 'bar'; + +=====================================output===================================== +export type { SomeThing }; +export type { A as B }; +export type { B as C } from "./a"; +export type { foo } from "bar"; +export type { foo }; + +// this should be treated as a normal import statement +import type from "./foo"; + +import type { SomeThing } from "./some-module.js"; +import type { foo, bar } from "baz"; +import type { foo as bar } from "baz"; +import type * as foo from "./bar"; +import type foo from "bar"; +import type foo, { bar } from "bar"; + +================================================================================ +`; diff --git a/tests/format/typescript/import-export/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/import-export/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ce63210d0dd7..000000000000 --- a/tests/format/typescript/import-export/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,43 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`type-modifier.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type { SomeThing }; -export type { A as B }; -export type { B as C } from './a'; -export type { foo } from 'bar'; -export type { foo }; - -// this should be treated as a normal import statement -import type from './foo'; - -import type { SomeThing } from "./some-module.js"; -import type { foo, bar } from 'baz'; -import type { foo as bar } from 'baz'; -import type * as foo from './bar'; -import type foo from 'bar'; -import type foo, { bar } from 'bar'; - -=====================================output===================================== -export type { SomeThing }; -export type { A as B }; -export type { B as C } from "./a"; -export type { foo } from "bar"; -export type { foo }; - -// this should be treated as a normal import statement -import type from "./foo"; - -import type { SomeThing } from "./some-module.js"; -import type { foo, bar } from "baz"; -import type { foo as bar } from "baz"; -import type * as foo from "./bar"; -import type foo from "bar"; -import type foo, { bar } from "bar"; - -================================================================================ -`; diff --git a/tests/format/typescript/import-export/empty-import.ts b/tests/format/typescript/import-export/empty-import.ts new file mode 100644 index 000000000000..185385b71153 --- /dev/null +++ b/tests/format/typescript/import-export/empty-import.ts @@ -0,0 +1,46 @@ +import type { } from '@types/googlemaps'; +import 'a'; +import /* comment */ 'a'; +import // comment +'a'; +import type { /* comment */ } from 'a'; +import /* comment */ type {} from 'a'; +import type {} /* comment */ from 'a'; +import type {} from /* comment */ 'a'; +import /* comment */ type {/* comment */} /* comment */ from /* comment */ 'a'; +import type { + // comment +} from 'a'; +import // comment +type {} from 'a'; +import type {} +// comment +from 'a'; +import type {} from +// comment +'a'; +import type +// comment +{ +// comment +} +// comment +from +// comment +'a'; + +import // {} from +'a'; +import type {} from // comment ends with from +'a'; +import type {} from /* comment ends with from */ 'a'; +import type {} from // comment not ends with from ___ +'a'; +import type {} from /* comment not ends with from ___ */ 'a'; + +import // comment ends with from +'a'; +import /* comment ends with from */ 'a'; +import // comment not ends with from ___ +'a'; +import /* comment not ends with from ___ */ 'a'; diff --git a/tests/format/typescript/import-export/format.test.js b/tests/format/typescript/import-export/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/import-export/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/import-export/jsfmt.spec.js b/tests/format/typescript/import-export/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/import-export/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/import-require/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/import-require/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/import-require/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/import-require/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/import-require/format.test.js b/tests/format/typescript/import-require/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/import-require/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/import-require/jsfmt.spec.js b/tests/format/typescript/import-require/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/import-require/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/import-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/import-type/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/import-type/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/import-type/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/import-type/attributes/__snapshots__/format.test.js.snap b/tests/format/typescript/import-type/attributes/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..90c3bc13029d --- /dev/null +++ b/tests/format/typescript/import-type/attributes/__snapshots__/format.test.js.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`import-type-attributes.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = import("foo", {with: {type: "json"}}) + +=====================================output===================================== +type A = import("foo", { with: { type: "json" } }); + +================================================================================ +`; diff --git a/tests/format/typescript/import-type/attributes/format.test.js b/tests/format/typescript/import-type/attributes/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/import-type/attributes/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/import-type/attributes/import-type-attributes.ts b/tests/format/typescript/import-type/attributes/import-type-attributes.ts new file mode 100644 index 000000000000..f3ab5bd83d08 --- /dev/null +++ b/tests/format/typescript/import-type/attributes/import-type-attributes.ts @@ -0,0 +1 @@ +type A = import("foo", {with: {type: "json"}}) diff --git a/tests/format/typescript/import-type/format.test.js b/tests/format/typescript/import-type/format.test.js new file mode 100644 index 000000000000..8b58e0b666c9 --- /dev/null +++ b/tests/format/typescript/import-type/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { singleQuote: true }); diff --git a/tests/format/typescript/import-type/jsfmt.spec.js b/tests/format/typescript/import-type/jsfmt.spec.js deleted file mode 100644 index ce7592185289..000000000000 --- a/tests/format/typescript/import-type/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { singleQuote: true }); diff --git a/tests/format/typescript/import-type/long-module-name/__snapshots__/format.test.js.snap b/tests/format/typescript/import-type/long-module-name/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..20d11c7d35aa --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/__snapshots__/format.test.js.snap @@ -0,0 +1,161 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`long-module-name.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const plugin = {} +export default plugin as typeof import("@babel/plugin-transform-react-jsx").default; + +=====================================output===================================== +const plugin = {}; +export default plugin as typeof import("@babel/plugin-transform-react-jsx").default; + +================================================================================ +`; + +exports[`long-module-name2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const plugin = {} +export default plugin as typeof import( +// Comment +"@babel/plugin-transform-react-jsx").default; + +=====================================output===================================== +const plugin = {}; +export default plugin as typeof import( + // Comment + "@babel/plugin-transform-react-jsx" +).default; + +================================================================================ +`; + +exports[`long-module-name3.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare const bit: import("../../../../scripts/babel-plugin-bit-decorator/types.d.ts").BitDecorator<State>; + +=====================================output===================================== +declare const bit: import("../../../../scripts/babel-plugin-bit-decorator/types.d.ts").BitDecorator<State>; + +================================================================================ +`; + +exports[`long-module-name4.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface RuleMap { + 'arrow-parens': typeof import('./long/long/long/long/long/path/to/rules/arrow-parens'); + 'consistent-return': typeof import('./long/long/long/long/long/path/to/rules/consistent-return'); + 'dot-notation': typeof import('./long/long/long/long/long/path/to/rules/dot-notation'); + 'init-declarations': typeof import('./long/long/long/long/long/path/to/rules/init-declarations'); + 'max-params': typeof import('./long/long/long/long/long/path/to/rules/max-params'); + 'no-dupe-args': typeof import('./long/long/long/long/long/path/to/rules/no-dupe-args'); + 'no-dupe-class-members': typeof import('./long/long/long/long/long/path/to/rules/no-dupe-class-members'); + 'no-empty-function': typeof import('./long/long/long/long/long/path/to/rules/no-empty-function'); + 'no-implicit-globals': typeof import('./long/long/long/long/long/path/to/rules/no-implicit-globals'); + 'no-invalid-this': typeof import('./long/long/long/long/long/path/to/rules/no-invalid-this'); + 'no-loop-func': typeof import('./long/long/long/long/long/path/to/rules/no-loop-func'); + 'no-loss-of-precision': typeof import('./long/long/long/long/long/path/to/rules/no-loss-of-precision'); + 'no-magic-numbers': typeof import('./long/long/long/long/long/path/to/rules/no-magic-numbers'); + 'no-restricted-globals': typeof import('./long/long/long/long/long/path/to/rules/no-restricted-globals'); + 'no-restricted-imports': typeof import('./long/long/long/long/long/path/to/rules/no-restricted-imports'); + 'no-undef': typeof import('./long/long/long/long/long/path/to/rules/no-undef'); + 'no-unused-expressions': typeof import('./long/long/long/long/long/path/to/rules/no-unused-expressions'); + 'no-useless-constructor': typeof import('./long/long/long/long/long/path/to/rules/no-useless-constructor'); + 'prefer-const': typeof import('./long/long/long/long/long/path/to/rules/prefer-const'); + 'prefer-destructuring': typeof import('./long/long/long/long/long/path/to/rules/prefer-destructuring'); + 'prefer-destructuring2': typeof import( +// comment +'./long/long/long/long/long/path/to/rules/prefer-destructuring'); + 'prefer-destructuring3': +// comment +typeof import( +'./long/long/long/long/long/path/to/rules/prefer-destructuring'); + strict: typeof import('./long/long/long/long/long/path/to/rules/strict'); +} + +=====================================output===================================== +interface RuleMap { + "arrow-parens": typeof import("./long/long/long/long/long/path/to/rules/arrow-parens"); + "consistent-return": typeof import("./long/long/long/long/long/path/to/rules/consistent-return"); + "dot-notation": typeof import("./long/long/long/long/long/path/to/rules/dot-notation"); + "init-declarations": typeof import("./long/long/long/long/long/path/to/rules/init-declarations"); + "max-params": typeof import("./long/long/long/long/long/path/to/rules/max-params"); + "no-dupe-args": typeof import("./long/long/long/long/long/path/to/rules/no-dupe-args"); + "no-dupe-class-members": typeof import("./long/long/long/long/long/path/to/rules/no-dupe-class-members"); + "no-empty-function": typeof import("./long/long/long/long/long/path/to/rules/no-empty-function"); + "no-implicit-globals": typeof import("./long/long/long/long/long/path/to/rules/no-implicit-globals"); + "no-invalid-this": typeof import("./long/long/long/long/long/path/to/rules/no-invalid-this"); + "no-loop-func": typeof import("./long/long/long/long/long/path/to/rules/no-loop-func"); + "no-loss-of-precision": typeof import("./long/long/long/long/long/path/to/rules/no-loss-of-precision"); + "no-magic-numbers": typeof import("./long/long/long/long/long/path/to/rules/no-magic-numbers"); + "no-restricted-globals": typeof import("./long/long/long/long/long/path/to/rules/no-restricted-globals"); + "no-restricted-imports": typeof import("./long/long/long/long/long/path/to/rules/no-restricted-imports"); + "no-undef": typeof import("./long/long/long/long/long/path/to/rules/no-undef"); + "no-unused-expressions": typeof import("./long/long/long/long/long/path/to/rules/no-unused-expressions"); + "no-useless-constructor": typeof import("./long/long/long/long/long/path/to/rules/no-useless-constructor"); + "prefer-const": typeof import("./long/long/long/long/long/path/to/rules/prefer-const"); + "prefer-destructuring": typeof import("./long/long/long/long/long/path/to/rules/prefer-destructuring"); + "prefer-destructuring2": typeof import( + // comment + "./long/long/long/long/long/path/to/rules/prefer-destructuring" + ); + "prefer-destructuring3": // comment + typeof import("./long/long/long/long/long/path/to/rules/prefer-destructuring"); + strict: typeof import("./long/long/long/long/long/path/to/rules/strict"); +} + +================================================================================ +`; + +exports[`long-module-name5.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = import("./long/long/long/long/long/long/long/long/long/long/path/to/module") +type B = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{with:{type:'json'}}) +type C = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{with:{ +type:'json'}}) +type D = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{ +with:{type:'json'}}) + +=====================================output===================================== +type A = + import("./long/long/long/long/long/long/long/long/long/long/path/to/module"); +type B = import( + "./long/long/long/long/long/long/long/long/long/long/path/to/module", + { with: { type: "json" } } +); +type C = import( + "./long/long/long/long/long/long/long/long/long/long/path/to/module", + { + with: { + type: "json", + } + } +); +type D = import( + "./long/long/long/long/long/long/long/long/long/long/path/to/module", + { + with: { type: "json" } + } +); + +================================================================================ +`; diff --git a/tests/format/typescript/import-type/long-module-name/format.test.js b/tests/format/typescript/import-type/long-module-name/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/import-type/long-module-name/long-module-name.ts b/tests/format/typescript/import-type/long-module-name/long-module-name.ts new file mode 100644 index 000000000000..9d3a761fef90 --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/long-module-name.ts @@ -0,0 +1,2 @@ +const plugin = {} +export default plugin as typeof import("@babel/plugin-transform-react-jsx").default; diff --git a/tests/format/typescript/import-type/long-module-name/long-module-name2.ts b/tests/format/typescript/import-type/long-module-name/long-module-name2.ts new file mode 100644 index 000000000000..56bb3d2e068a --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/long-module-name2.ts @@ -0,0 +1,4 @@ +const plugin = {} +export default plugin as typeof import( +// Comment +"@babel/plugin-transform-react-jsx").default; diff --git a/tests/format/typescript/import-type/long-module-name/long-module-name3.ts b/tests/format/typescript/import-type/long-module-name/long-module-name3.ts new file mode 100644 index 000000000000..1408a930bd6e --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/long-module-name3.ts @@ -0,0 +1 @@ +declare const bit: import("../../../../scripts/babel-plugin-bit-decorator/types.d.ts").BitDecorator<State>; diff --git a/tests/format/typescript/import-type/long-module-name/long-module-name4.ts b/tests/format/typescript/import-type/long-module-name/long-module-name4.ts new file mode 100644 index 000000000000..09e700657d96 --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/long-module-name4.ts @@ -0,0 +1,30 @@ +interface RuleMap { + 'arrow-parens': typeof import('./long/long/long/long/long/path/to/rules/arrow-parens'); + 'consistent-return': typeof import('./long/long/long/long/long/path/to/rules/consistent-return'); + 'dot-notation': typeof import('./long/long/long/long/long/path/to/rules/dot-notation'); + 'init-declarations': typeof import('./long/long/long/long/long/path/to/rules/init-declarations'); + 'max-params': typeof import('./long/long/long/long/long/path/to/rules/max-params'); + 'no-dupe-args': typeof import('./long/long/long/long/long/path/to/rules/no-dupe-args'); + 'no-dupe-class-members': typeof import('./long/long/long/long/long/path/to/rules/no-dupe-class-members'); + 'no-empty-function': typeof import('./long/long/long/long/long/path/to/rules/no-empty-function'); + 'no-implicit-globals': typeof import('./long/long/long/long/long/path/to/rules/no-implicit-globals'); + 'no-invalid-this': typeof import('./long/long/long/long/long/path/to/rules/no-invalid-this'); + 'no-loop-func': typeof import('./long/long/long/long/long/path/to/rules/no-loop-func'); + 'no-loss-of-precision': typeof import('./long/long/long/long/long/path/to/rules/no-loss-of-precision'); + 'no-magic-numbers': typeof import('./long/long/long/long/long/path/to/rules/no-magic-numbers'); + 'no-restricted-globals': typeof import('./long/long/long/long/long/path/to/rules/no-restricted-globals'); + 'no-restricted-imports': typeof import('./long/long/long/long/long/path/to/rules/no-restricted-imports'); + 'no-undef': typeof import('./long/long/long/long/long/path/to/rules/no-undef'); + 'no-unused-expressions': typeof import('./long/long/long/long/long/path/to/rules/no-unused-expressions'); + 'no-useless-constructor': typeof import('./long/long/long/long/long/path/to/rules/no-useless-constructor'); + 'prefer-const': typeof import('./long/long/long/long/long/path/to/rules/prefer-const'); + 'prefer-destructuring': typeof import('./long/long/long/long/long/path/to/rules/prefer-destructuring'); + 'prefer-destructuring2': typeof import( +// comment +'./long/long/long/long/long/path/to/rules/prefer-destructuring'); + 'prefer-destructuring3': +// comment +typeof import( +'./long/long/long/long/long/path/to/rules/prefer-destructuring'); + strict: typeof import('./long/long/long/long/long/path/to/rules/strict'); +} diff --git a/tests/format/typescript/import-type/long-module-name/long-module-name5.ts b/tests/format/typescript/import-type/long-module-name/long-module-name5.ts new file mode 100644 index 000000000000..5bc6eebb8cac --- /dev/null +++ b/tests/format/typescript/import-type/long-module-name/long-module-name5.ts @@ -0,0 +1,6 @@ +type A = import("./long/long/long/long/long/long/long/long/long/long/path/to/module") +type B = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{with:{type:'json'}}) +type C = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{with:{ +type:'json'}}) +type D = import("./long/long/long/long/long/long/long/long/long/long/path/to/module",{ +with:{type:'json'}}) diff --git a/tests/format/typescript/index-signature/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/index-signature/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/index-signature/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/index-signature/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/index-signature/format.test.js b/tests/format/typescript/index-signature/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/index-signature/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/index-signature/jsfmt.spec.js b/tests/format/typescript/index-signature/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/index-signature/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/infer-extends/__snapshots__/format.test.js.snap b/tests/format/typescript/infer-extends/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9d0b6275df2b --- /dev/null +++ b/tests/format/typescript/infer-extends/__snapshots__/format.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type X3<T> = T extends [infer U extends number] ? MustBeNumber<U> : never; +type X4<T> = T extends [infer U extends number, infer U extends number] ? MustBeNumber<U> : never; +type X5<T> = T extends [infer U extends number, infer U] ? MustBeNumber<U> : never; +type X6<T> = T extends [infer U, infer U extends number] ? MustBeNumber<U> : never; +type X7<T> = T extends [infer U extends string, infer U extends number] ? U : never; +type X8<U, T> = T extends infer U extends number ? U : T; +type X9<U, T> = T extends (infer U extends number ? U : T) ? U : T; +type X10<T> = T extends (infer U extends number) | { a: infer U extends number } ? U : never +type X11<T> = T extends (infer U extends number) & { a: infer U extends number } ? U : never + +=====================================output===================================== +type X3<T> = T extends [infer U extends number] ? MustBeNumber<U> : never; +type X4<T> = T extends [infer U extends number, infer U extends number] + ? MustBeNumber<U> + : never; +type X5<T> = T extends [infer U extends number, infer U] + ? MustBeNumber<U> + : never; +type X6<T> = T extends [infer U, infer U extends number] + ? MustBeNumber<U> + : never; +type X7<T> = T extends [infer U extends string, infer U extends number] + ? U + : never; +type X8<U, T> = T extends infer U extends number ? U : T; +type X9<U, T> = T extends (infer U extends number ? U : T) ? U : T; +type X10<T> = T extends (infer U extends number) | { a: infer U extends number } + ? U + : never; +type X11<T> = T extends (infer U extends number) & { a: infer U extends number } + ? U + : never; + +================================================================================ +`; diff --git a/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 53d6048d8481..000000000000 --- a/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type X3<T> = T extends [infer U extends number] ? MustBeNumber<U> : never; -type X4<T> = T extends [infer U extends number, infer U extends number] ? MustBeNumber<U> : never; -type X5<T> = T extends [infer U extends number, infer U] ? MustBeNumber<U> : never; -type X6<T> = T extends [infer U, infer U extends number] ? MustBeNumber<U> : never; -type X7<T> = T extends [infer U extends string, infer U extends number] ? U : never; -type X8<U, T> = T extends infer U extends number ? U : T; -type X9<U, T> = T extends (infer U extends number ? U : T) ? U : T; - -=====================================output===================================== -type X3<T> = T extends [infer U extends number] ? MustBeNumber<U> : never; -type X4<T> = T extends [infer U extends number, infer U extends number] - ? MustBeNumber<U> - : never; -type X5<T> = T extends [infer U extends number, infer U] - ? MustBeNumber<U> - : never; -type X6<T> = T extends [infer U, infer U extends number] - ? MustBeNumber<U> - : never; -type X7<T> = T extends [infer U extends string, infer U extends number] - ? U - : never; -type X8<U, T> = T extends infer U extends number ? U : T; -type X9<U, T> = T extends (infer U extends number ? U : T) ? U : T; - -================================================================================ -`; diff --git a/tests/format/typescript/infer-extends/basic.ts b/tests/format/typescript/infer-extends/basic.ts index d75c58eb15cb..728724c4014a 100644 --- a/tests/format/typescript/infer-extends/basic.ts +++ b/tests/format/typescript/infer-extends/basic.ts @@ -5,3 +5,5 @@ type X6<T> = T extends [infer U, infer U extends number] ? MustBeNumber<U> : nev type X7<T> = T extends [infer U extends string, infer U extends number] ? U : never; type X8<U, T> = T extends infer U extends number ? U : T; type X9<U, T> = T extends (infer U extends number ? U : T) ? U : T; +type X10<T> = T extends (infer U extends number) | { a: infer U extends number } ? U : never +type X11<T> = T extends (infer U extends number) & { a: infer U extends number } ? U : never diff --git a/tests/format/typescript/infer-extends/format.test.js b/tests/format/typescript/infer-extends/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/infer-extends/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/infer-extends/jsfmt.spec.js b/tests/format/typescript/infer-extends/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/infer-extends/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/instantiation-expression/__snapshots__/format.test.js.snap b/tests/format/typescript/instantiation-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..718f3e56909f --- /dev/null +++ b/tests/format/typescript/instantiation-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,158 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// basic +const foo = bar<T>; + +=====================================output===================================== +// basic +const foo = bar<T>; + +================================================================================ +`; + +exports[`binary-expr.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new A < B > +C + +=====================================output===================================== +new A<B>(); +C; + +================================================================================ +`; + +exports[`inferface-asi.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface Example { + (a: number): typeof a + + <T>(): void +}; + +=====================================output===================================== +interface Example { + (a: number): typeof a; + + <T>(): void; +} + +================================================================================ +`; + +exports[`logical-expr.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export class Foo<T> { + message: string; +} + +function sample(error: unknown) { + if (!(error instanceof Foo<'some-type'> || error instanceof Error) || !error.message) { + return 'something'; + } +} + +=====================================output===================================== +export class Foo<T> { + message: string; +} + +function sample(error: unknown) { + if ( + !(error instanceof Foo<"some-type"> || error instanceof Error) || + !error.message + ) { + return "something"; + } +} + +================================================================================ +`; + +exports[`new.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// new +new A<T>; + +=====================================output===================================== +// new +new A<T>(); + +================================================================================ +`; + +exports[`property-access.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(Array<string>).name; +(fn1<string>).bind(obj); +(fn2<string, number>).bind(obj); +a[(Array<string>)]; +a[(Array<string>).name]; +(Array<string>).a; +(Array<string>)?.a; +(Array<string>)[a]; +(Array<string>)?.[a]; +(Array<string>)["a"]; +(Array<string>)?.["a"]; +(Array<string>)[\`a\`]; +(Array<string>)?.[\`a\`]; +(Array<string>)[(Array<string>)]; + +=====================================output===================================== +(Array<string>).name; +(fn1<string>).bind(obj); +(fn2<string, number>).bind(obj); +a[Array<string>]; +a[(Array<string>).name]; +(Array<string>).a; +(Array<string>)?.a; +(Array<string>)[a]; +(Array<string>)?.[a]; +(Array<string>)["a"]; +(Array<string>)?.["a"]; +(Array<string>)[\`a\`]; +(Array<string>)?.[\`a\`]; +(Array<string>)[Array<string>]; + +================================================================================ +`; + +exports[`typeof.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let x: typeof y.z<w>; + +=====================================output===================================== +let x: typeof y.z<w>; + +================================================================================ +`; diff --git a/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fe5691ab3600..000000000000 --- a/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,118 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// basic -const foo = bar<T>; - -=====================================output===================================== -// basic -const foo = bar<T>; - -================================================================================ -`; - -exports[`binary-expr.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new A < B > -C - -=====================================output===================================== -new A<B>(); -C; - -================================================================================ -`; - -exports[`inferface-asi.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Example { - (a: number): typeof a - - <T>(): void -}; - -=====================================output===================================== -interface Example { - (a: number): typeof a; - - <T>(): void; -} - -================================================================================ -`; - -exports[`logical-expr.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export class Foo<T> { - message: string; -} - -function sample(error: unknown) { - if (!(error instanceof Foo<'some-type'> || error instanceof Error) || !error.message) { - return 'something'; - } -} - -=====================================output===================================== -export class Foo<T> { - message: string; -} - -function sample(error: unknown) { - if ( - !(error instanceof Foo<"some-type"> || error instanceof Error) || - !error.message - ) { - return "something"; - } -} - -================================================================================ -`; - -exports[`new.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// new -new A<T>; - -=====================================output===================================== -// new -new A<T>(); - -================================================================================ -`; - -exports[`typeof.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let x: typeof y.z<w>; - -=====================================output===================================== -let x: typeof y.z<w>; - -================================================================================ -`; diff --git a/tests/format/typescript/instantiation-expression/format.test.js b/tests/format/typescript/instantiation-expression/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/instantiation-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/instantiation-expression/jsfmt.spec.js b/tests/format/typescript/instantiation-expression/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/instantiation-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/instantiation-expression/property-access.ts b/tests/format/typescript/instantiation-expression/property-access.ts new file mode 100644 index 000000000000..e2d51e8820e7 --- /dev/null +++ b/tests/format/typescript/instantiation-expression/property-access.ts @@ -0,0 +1,14 @@ +(Array<string>).name; +(fn1<string>).bind(obj); +(fn2<string, number>).bind(obj); +a[(Array<string>)]; +a[(Array<string>).name]; +(Array<string>).a; +(Array<string>)?.a; +(Array<string>)[a]; +(Array<string>)?.[a]; +(Array<string>)["a"]; +(Array<string>)?.["a"]; +(Array<string>)[`a`]; +(Array<string>)?.[`a`]; +(Array<string>)[(Array<string>)]; diff --git a/tests/format/typescript/interface/__snapshots__/format.test.js.snap b/tests/format/typescript/interface/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5f011e5b2674 --- /dev/null +++ b/tests/format/typescript/interface/__snapshots__/format.test.js.snap @@ -0,0 +1,948 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +interface ScreenObject { + // I make things weird. + at(point: Point): Screen | undefined; +} + +=====================================output===================================== +interface ScreenObject { + // I make things weird. + at(point: Point): Screen | undefined +} + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface ScreenObject { + // I make things weird. + at(point: Point): Screen | undefined; +} + +=====================================output===================================== +interface ScreenObject { + // I make things weird. + at(point: Point): Screen | undefined; +} + +================================================================================ +`; + +exports[`comments-generic.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +extends BaseInterface {} + +interface ReallyReallyLongName2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +// 2 +extends BaseInterface {} + +interface ReallyReallyLongName3< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +// 2 +extends BaseInterface // 3 +{} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO +> // comments + extends Foo {} + +=====================================output===================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + extends BaseInterface {} + +interface ReallyReallyLongName2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + // 2 + extends BaseInterface {} + +interface ReallyReallyLongName3< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + // 2 + extends BaseInterface { + // 3 +} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + > // comments + extends Foo {} + +================================================================================ +`; + +exports[`comments-generic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +extends BaseInterface {} + +interface ReallyReallyLongName2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +// 2 +extends BaseInterface {} + +interface ReallyReallyLongName3< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree +> // 1 +// 2 +extends BaseInterface // 3 +{} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO +> // comments + extends Foo {} + +=====================================output===================================== +interface ReallyReallyLongName< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + extends BaseInterface {} + +interface ReallyReallyLongName2< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + // 2 + extends BaseInterface {} + +interface ReallyReallyLongName3< + TypeArgumentNumberOne, + TypeArgumentNumberTwo, + TypeArgumentNumberThree, + > // 1 + // 2 + extends BaseInterface { + // 3 +} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + > // comments + extends Foo {} + +================================================================================ +`; + +exports[`generic.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO,FOOOOOOOOOOOOOOOOOOOOOOO> + extends Foo {} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO +> extends Foo {} + +=====================================output===================================== +interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOO> + extends Foo {} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, +> extends Foo {} + +================================================================================ +`; + +exports[`generic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO,FOOOOOOOOOOOOOOOOOOOOOOO> + extends Foo {} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO +> extends Foo {} + +=====================================output===================================== +interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOO> + extends Foo {} + +interface Foo< + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, + FOOOOOOOOOOOOOOOOOOOOOOOOOO, +> extends Foo {} + +================================================================================ +`; + +exports[`ignore.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +interface Interface { + // prettier-ignore + prop: type + // prettier-ignore + prop: type; + prop: type; +} + +// Last element +interface Interface { + // prettier-ignore + prop: type + prop: type +} + +interface foo extends bar { + // prettier-ignore + f(): void; + // prettier-ignore + g(): void; + h(): void; +} + +interface T<T> { + // prettier-ignore + new<T>(): T<T>; + new<T>(): T<T>; +} + +interface I { + // prettier-ignore + x: y; +} + +interface I { + // prettier-ignore + x: y, +} + +interface I { + // prettier-ignore + x: y +} + +interface I { + // prettier-ignore + x: y; + y: x +} + +interface I { + // prettier-ignore + x: y, + y: x +} + +interface I { + // prettier-ignore + x: y + y: x +} + +interface I { + // prettier-ignore + (): void; +} + +interface I { + // prettier-ignore + (): void, +} + +interface I { + // prettier-ignore + (): void +} + +interface I { + // prettier-ignore + foo(): void; +} + +interface I { + // prettier-ignore + foo(): void, +} + +interface I { + // prettier-ignore + foo(): void +} + +interface I { + // prettier-ignore + new (); +} + +interface I { + // prettier-ignore + new (), +} + +interface I { + // prettier-ignore + new () +} + +=====================================output===================================== +interface Interface { + // prettier-ignore + prop: type + // prettier-ignore + prop: type; + prop: type +} + +// Last element +interface Interface { + // prettier-ignore + prop: type + prop: type +} + +interface foo extends bar { + // prettier-ignore + f(): void; + // prettier-ignore + g(): void; + h(): void +} + +interface T<T> { + // prettier-ignore + new<T>(): T<T>; + new <T>(): T<T> +} + +interface I { + // prettier-ignore + x: y; +} + +interface I { + // prettier-ignore + x: y, +} + +interface I { + // prettier-ignore + x: y +} + +interface I { + // prettier-ignore + x: y; + y: x +} + +interface I { + // prettier-ignore + x: y, + y: x +} + +interface I { + // prettier-ignore + x: y + y: x +} + +interface I { + // prettier-ignore + (): void; +} + +interface I { + // prettier-ignore + (): void, +} + +interface I { + // prettier-ignore + (): void +} + +interface I { + // prettier-ignore + foo(): void; +} + +interface I { + // prettier-ignore + foo(): void, +} + +interface I { + // prettier-ignore + foo(): void +} + +interface I { + // prettier-ignore + new (); +} + +interface I { + // prettier-ignore + new (), +} + +interface I { + // prettier-ignore + new () +} + +================================================================================ +`; + +exports[`ignore.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface Interface { + // prettier-ignore + prop: type + // prettier-ignore + prop: type; + prop: type; +} + +// Last element +interface Interface { + // prettier-ignore + prop: type + prop: type +} + +interface foo extends bar { + // prettier-ignore + f(): void; + // prettier-ignore + g(): void; + h(): void; +} + +interface T<T> { + // prettier-ignore + new<T>(): T<T>; + new<T>(): T<T>; +} + +interface I { + // prettier-ignore + x: y; +} + +interface I { + // prettier-ignore + x: y, +} + +interface I { + // prettier-ignore + x: y +} + +interface I { + // prettier-ignore + x: y; + y: x +} + +interface I { + // prettier-ignore + x: y, + y: x +} + +interface I { + // prettier-ignore + x: y + y: x +} + +interface I { + // prettier-ignore + (): void; +} + +interface I { + // prettier-ignore + (): void, +} + +interface I { + // prettier-ignore + (): void +} + +interface I { + // prettier-ignore + foo(): void; +} + +interface I { + // prettier-ignore + foo(): void, +} + +interface I { + // prettier-ignore + foo(): void +} + +interface I { + // prettier-ignore + new (); +} + +interface I { + // prettier-ignore + new (), +} + +interface I { + // prettier-ignore + new () +} + +=====================================output===================================== +interface Interface { + // prettier-ignore + prop: type + // prettier-ignore + prop: type; + prop: type; +} + +// Last element +interface Interface { + // prettier-ignore + prop: type + prop: type; +} + +interface foo extends bar { + // prettier-ignore + f(): void; + // prettier-ignore + g(): void; + h(): void; +} + +interface T<T> { + // prettier-ignore + new<T>(): T<T>; + new <T>(): T<T>; +} + +interface I { + // prettier-ignore + x: y; +} + +interface I { + // prettier-ignore + x: y, +} + +interface I { + // prettier-ignore + x: y +} + +interface I { + // prettier-ignore + x: y; + y: x; +} + +interface I { + // prettier-ignore + x: y, + y: x; +} + +interface I { + // prettier-ignore + x: y + y: x; +} + +interface I { + // prettier-ignore + (): void; +} + +interface I { + // prettier-ignore + (): void, +} + +interface I { + // prettier-ignore + (): void +} + +interface I { + // prettier-ignore + foo(): void; +} + +interface I { + // prettier-ignore + foo(): void, +} + +interface I { + // prettier-ignore + foo(): void +} + +interface I { + // prettier-ignore + new (); +} + +interface I { + // prettier-ignore + new (), +} + +interface I { + // prettier-ignore + new () +} + +================================================================================ +`; + +exports[`long-extends.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +export interface I extends A, B, C { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName, AnotherLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends AVeryLongAndBoringInterfaceName, AnotherVeryLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends A_AVeryLongAndBoringInterfaceName, B_AVeryLongAndBoringInterfaceName, C_AVeryLongAndBoringInterfaceName { + c: string; +} + +=====================================output===================================== +export interface I extends A, B, C { + c: string +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends ALongAndBoringInterfaceName { + c: string +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends ALongAndBoringInterfaceName, + AnotherLongAndBoringInterfaceName { + c: string +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends AVeryLongAndBoringInterfaceName, + AnotherVeryLongAndBoringInterfaceName { + c: string +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends A_AVeryLongAndBoringInterfaceName, + B_AVeryLongAndBoringInterfaceName, + C_AVeryLongAndBoringInterfaceName { + c: string +} + +================================================================================ +`; + +exports[`long-extends.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export interface I extends A, B, C { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName, AnotherLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends AVeryLongAndBoringInterfaceName, AnotherVeryLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName extends A_AVeryLongAndBoringInterfaceName, B_AVeryLongAndBoringInterfaceName, C_AVeryLongAndBoringInterfaceName { + c: string; +} + +=====================================output===================================== +export interface I extends A, B, C { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends ALongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends ALongAndBoringInterfaceName, + AnotherLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends AVeryLongAndBoringInterfaceName, + AnotherVeryLongAndBoringInterfaceName { + c: string; +} + +export interface ThirdVeryLongAndBoringInterfaceName + extends A_AVeryLongAndBoringInterfaceName, + B_AVeryLongAndBoringInterfaceName, + C_AVeryLongAndBoringInterfaceName { + c: string; +} + +================================================================================ +`; + +exports[`pattern-parameters.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +interface B { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +} + +=====================================output===================================== +interface B { + foo([]?): void + bar({}, []?): any + baz(a: string, b: number, []?): void +} + +================================================================================ +`; + +exports[`pattern-parameters.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface B { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +} + +=====================================output===================================== +interface B { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +} + +================================================================================ +`; + +exports[`separator.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +declare module 'selenium-webdriver' { + export const until: { + ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; + alertIsPresent(): Condition<Alert>; + }; +} + +export interface Edge { + cursor: {}; + node: { + id: {}; + }; +} + +interface Test { one: string, two: any[] } + +=====================================output===================================== +declare module "selenium-webdriver" { + export const until: { + ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean> + alertIsPresent(): Condition<Alert> + } +} + +export interface Edge { + cursor: {} + node: { + id: {} + } +} + +interface Test { + one: string + two: any[] +} + +================================================================================ +`; + +exports[`separator.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module 'selenium-webdriver' { + export const until: { + ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; + alertIsPresent(): Condition<Alert>; + }; +} + +export interface Edge { + cursor: {}; + node: { + id: {}; + }; +} + +interface Test { one: string, two: any[] } + +=====================================output===================================== +declare module "selenium-webdriver" { + export const until: { + ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; + alertIsPresent(): Condition<Alert>; + }; +} + +export interface Edge { + cursor: {}; + node: { + id: {}; + }; +} + +interface Test { + one: string; + two: any[]; +} + +================================================================================ +`; diff --git a/tests/format/typescript/interface/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/interface/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6c3b914cd00c..000000000000 --- a/tests/format/typescript/interface/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,981 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abstract.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -abstract interface I { - -} - -=====================================output===================================== -abstract interface I {} - -================================================================================ -`; - -exports[`abstract.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -abstract interface I { - -} - -=====================================output===================================== -abstract interface I {} - -================================================================================ -`; - -exports[`comments.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface ScreenObject { - // I make things weird. - at(point: Point): Screen | undefined; -} - -=====================================output===================================== -interface ScreenObject { - // I make things weird. - at(point: Point): Screen | undefined -} - -================================================================================ -`; - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface ScreenObject { - // I make things weird. - at(point: Point): Screen | undefined; -} - -=====================================output===================================== -interface ScreenObject { - // I make things weird. - at(point: Point): Screen | undefined; -} - -================================================================================ -`; - -exports[`comments-generic.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -extends BaseInterface {} - -interface ReallyReallyLongName2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -// 2 -extends BaseInterface {} - -interface ReallyReallyLongName3< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -// 2 -extends BaseInterface // 3 -{} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> // comments - extends Foo {} - -=====================================output===================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - extends BaseInterface {} - -interface ReallyReallyLongName2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - // 2 - extends BaseInterface {} - -interface ReallyReallyLongName3< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - // 2 - extends BaseInterface { - // 3 -} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO - > // comments - extends Foo {} - -================================================================================ -`; - -exports[`comments-generic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -extends BaseInterface {} - -interface ReallyReallyLongName2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -// 2 -extends BaseInterface {} - -interface ReallyReallyLongName3< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree -> // 1 -// 2 -extends BaseInterface // 3 -{} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> // comments - extends Foo {} - -=====================================output===================================== -interface ReallyReallyLongName< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - extends BaseInterface {} - -interface ReallyReallyLongName2< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - // 2 - extends BaseInterface {} - -interface ReallyReallyLongName3< - TypeArgumentNumberOne, - TypeArgumentNumberTwo, - TypeArgumentNumberThree - > // 1 - // 2 - extends BaseInterface { - // 3 -} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO - > // comments - extends Foo {} - -================================================================================ -`; - -exports[`generic.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO,FOOOOOOOOOOOOOOOOOOOOOOO> - extends Foo {} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> extends Foo {} - -=====================================output===================================== -interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOO> - extends Foo {} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> extends Foo {} - -================================================================================ -`; - -exports[`generic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO,FOOOOOOOOOOOOOOOOOOOOOOO> - extends Foo {} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> extends Foo {} - -=====================================output===================================== -interface Foo<FOOOOOOOOOOOOOOOOOOOOOOOOOO, FOOOOOOOOOOOOOOOOOOOOOOO> - extends Foo {} - -interface Foo< - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO, - FOOOOOOOOOOOOOOOOOOOOOOOOOO -> extends Foo {} - -================================================================================ -`; - -exports[`ignore.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface Interface { - // prettier-ignore - prop: type - // prettier-ignore - prop: type; - prop: type; -} - -// Last element -interface Interface { - // prettier-ignore - prop: type - prop: type -} - -interface foo extends bar { - // prettier-ignore - f(): void; - // prettier-ignore - g(): void; - h(): void; -} - -interface T<T> { - // prettier-ignore - new<T>(): T<T>; - new<T>(): T<T>; -} - -interface I { - // prettier-ignore - x: y; -} - -interface I { - // prettier-ignore - x: y, -} - -interface I { - // prettier-ignore - x: y -} - -interface I { - // prettier-ignore - x: y; - y: x -} - -interface I { - // prettier-ignore - x: y, - y: x -} - -interface I { - // prettier-ignore - x: y - y: x -} - -interface I { - // prettier-ignore - (): void; -} - -interface I { - // prettier-ignore - (): void, -} - -interface I { - // prettier-ignore - (): void -} - -interface I { - // prettier-ignore - foo(): void; -} - -interface I { - // prettier-ignore - foo(): void, -} - -interface I { - // prettier-ignore - foo(): void -} - -interface I { - // prettier-ignore - new (); -} - -interface I { - // prettier-ignore - new (), -} - -interface I { - // prettier-ignore - new () -} - -=====================================output===================================== -interface Interface { - // prettier-ignore - prop: type - // prettier-ignore - prop: type; - prop: type -} - -// Last element -interface Interface { - // prettier-ignore - prop: type - prop: type -} - -interface foo extends bar { - // prettier-ignore - f(): void; - // prettier-ignore - g(): void; - h(): void -} - -interface T<T> { - // prettier-ignore - new<T>(): T<T>; - new <T>(): T<T> -} - -interface I { - // prettier-ignore - x: y; -} - -interface I { - // prettier-ignore - x: y, -} - -interface I { - // prettier-ignore - x: y -} - -interface I { - // prettier-ignore - x: y; - y: x -} - -interface I { - // prettier-ignore - x: y, - y: x -} - -interface I { - // prettier-ignore - x: y - y: x -} - -interface I { - // prettier-ignore - (): void; -} - -interface I { - // prettier-ignore - (): void, -} - -interface I { - // prettier-ignore - (): void -} - -interface I { - // prettier-ignore - foo(): void; -} - -interface I { - // prettier-ignore - foo(): void, -} - -interface I { - // prettier-ignore - foo(): void -} - -interface I { - // prettier-ignore - new (); -} - -interface I { - // prettier-ignore - new (), -} - -interface I { - // prettier-ignore - new () -} - -================================================================================ -`; - -exports[`ignore.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface Interface { - // prettier-ignore - prop: type - // prettier-ignore - prop: type; - prop: type; -} - -// Last element -interface Interface { - // prettier-ignore - prop: type - prop: type -} - -interface foo extends bar { - // prettier-ignore - f(): void; - // prettier-ignore - g(): void; - h(): void; -} - -interface T<T> { - // prettier-ignore - new<T>(): T<T>; - new<T>(): T<T>; -} - -interface I { - // prettier-ignore - x: y; -} - -interface I { - // prettier-ignore - x: y, -} - -interface I { - // prettier-ignore - x: y -} - -interface I { - // prettier-ignore - x: y; - y: x -} - -interface I { - // prettier-ignore - x: y, - y: x -} - -interface I { - // prettier-ignore - x: y - y: x -} - -interface I { - // prettier-ignore - (): void; -} - -interface I { - // prettier-ignore - (): void, -} - -interface I { - // prettier-ignore - (): void -} - -interface I { - // prettier-ignore - foo(): void; -} - -interface I { - // prettier-ignore - foo(): void, -} - -interface I { - // prettier-ignore - foo(): void -} - -interface I { - // prettier-ignore - new (); -} - -interface I { - // prettier-ignore - new (), -} - -interface I { - // prettier-ignore - new () -} - -=====================================output===================================== -interface Interface { - // prettier-ignore - prop: type - // prettier-ignore - prop: type; - prop: type; -} - -// Last element -interface Interface { - // prettier-ignore - prop: type - prop: type; -} - -interface foo extends bar { - // prettier-ignore - f(): void; - // prettier-ignore - g(): void; - h(): void; -} - -interface T<T> { - // prettier-ignore - new<T>(): T<T>; - new <T>(): T<T>; -} - -interface I { - // prettier-ignore - x: y; -} - -interface I { - // prettier-ignore - x: y, -} - -interface I { - // prettier-ignore - x: y -} - -interface I { - // prettier-ignore - x: y; - y: x; -} - -interface I { - // prettier-ignore - x: y, - y: x; -} - -interface I { - // prettier-ignore - x: y - y: x; -} - -interface I { - // prettier-ignore - (): void; -} - -interface I { - // prettier-ignore - (): void, -} - -interface I { - // prettier-ignore - (): void -} - -interface I { - // prettier-ignore - foo(): void; -} - -interface I { - // prettier-ignore - foo(): void, -} - -interface I { - // prettier-ignore - foo(): void -} - -interface I { - // prettier-ignore - new (); -} - -interface I { - // prettier-ignore - new (), -} - -interface I { - // prettier-ignore - new () -} - -================================================================================ -`; - -exports[`long-extends.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -export interface I extends A, B, C { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName, AnotherLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends AVeryLongAndBoringInterfaceName, AnotherVeryLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends A_AVeryLongAndBoringInterfaceName, B_AVeryLongAndBoringInterfaceName, C_AVeryLongAndBoringInterfaceName { - c: string; -} - -=====================================output===================================== -export interface I extends A, B, C { - c: string -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends ALongAndBoringInterfaceName { - c: string -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends ALongAndBoringInterfaceName, - AnotherLongAndBoringInterfaceName { - c: string -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends AVeryLongAndBoringInterfaceName, - AnotherVeryLongAndBoringInterfaceName { - c: string -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends A_AVeryLongAndBoringInterfaceName, - B_AVeryLongAndBoringInterfaceName, - C_AVeryLongAndBoringInterfaceName { - c: string -} - -================================================================================ -`; - -exports[`long-extends.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export interface I extends A, B, C { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends ALongAndBoringInterfaceName, AnotherLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends AVeryLongAndBoringInterfaceName, AnotherVeryLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName extends A_AVeryLongAndBoringInterfaceName, B_AVeryLongAndBoringInterfaceName, C_AVeryLongAndBoringInterfaceName { - c: string; -} - -=====================================output===================================== -export interface I extends A, B, C { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends ALongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends ALongAndBoringInterfaceName, - AnotherLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends AVeryLongAndBoringInterfaceName, - AnotherVeryLongAndBoringInterfaceName { - c: string; -} - -export interface ThirdVeryLongAndBoringInterfaceName - extends A_AVeryLongAndBoringInterfaceName, - B_AVeryLongAndBoringInterfaceName, - C_AVeryLongAndBoringInterfaceName { - c: string; -} - -================================================================================ -`; - -exports[`pattern-parameters.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -interface B { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -} - -=====================================output===================================== -interface B { - foo([]?): void - bar({}, []?): any - baz(a: string, b: number, []?): void -} - -================================================================================ -`; - -exports[`pattern-parameters.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface B { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -} - -=====================================output===================================== -interface B { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -} - -================================================================================ -`; - -exports[`separator.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -declare module 'selenium-webdriver' { - export const until: { - ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; - alertIsPresent(): Condition<Alert>; - }; -} - -export interface Edge { - cursor: {}; - node: { - id: {}; - }; -} - -interface Test { one: string, two: any[] } - -=====================================output===================================== -declare module "selenium-webdriver" { - export const until: { - ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean> - alertIsPresent(): Condition<Alert> - } -} - -export interface Edge { - cursor: {} - node: { - id: {} - } -} - -interface Test { - one: string - two: any[] -} - -================================================================================ -`; - -exports[`separator.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module 'selenium-webdriver' { - export const until: { - ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; - alertIsPresent(): Condition<Alert>; - }; -} - -export interface Edge { - cursor: {}; - node: { - id: {}; - }; -} - -interface Test { one: string, two: any[] } - -=====================================output===================================== -declare module "selenium-webdriver" { - export const until: { - ableToSwitchToFrame(frame: number | WebElement | By): Condition<boolean>; - alertIsPresent(): Condition<Alert>; - }; -} - -export interface Edge { - cursor: {}; - node: { - id: {}; - }; -} - -interface Test { - one: string; - two: any[]; -} - -================================================================================ -`; diff --git a/tests/format/typescript/interface/abstract.ts b/tests/format/typescript/interface/abstract.ts deleted file mode 100644 index e5e1cb201116..000000000000 --- a/tests/format/typescript/interface/abstract.ts +++ /dev/null @@ -1,3 +0,0 @@ -abstract interface I { - -} diff --git a/tests/format/typescript/interface/format.test.js b/tests/format/typescript/interface/format.test.js new file mode 100644 index 000000000000..6976ef8a8f74 --- /dev/null +++ b/tests/format/typescript/interface/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["typescript"], {}); +runFormatTest(import.meta, ["typescript"], { + semi: false, +}); diff --git a/tests/format/typescript/interface/jsfmt.spec.js b/tests/format/typescript/interface/jsfmt.spec.js deleted file mode 100644 index c75e14433bde..000000000000 --- a/tests/format/typescript/interface/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["typescript"], {}); -run_spec(__dirname, ["typescript"], { - semi: false, -}); diff --git a/tests/format/typescript/interface/long-type-parameters/__snapshots__/format.test.js.snap b/tests/format/typescript/interface/long-type-parameters/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..280c074a2560 --- /dev/null +++ b/tests/format/typescript/interface/long-type-parameters/__snapshots__/format.test.js.snap @@ -0,0 +1,79 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`long-type-parameters.ts - {"printWidth":109} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 109 + | printWidth +=====================================input====================================== +// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 +export interface MarkDef< + M extends string | Mark = Mark, + ES extends ExprRef | SignalRef = ExprRef | SignalRef +> extends GenericMarkDef<M>, + Omit< + MarkConfig<ES> & + AreaConfig<ES> & + BarConfig<ES> & // always extends RectConfig + LineConfig<ES> & + TickConfig<ES>, + 'startAngle' | 'endAngle' | 'width' | 'height' + >, + MarkDefMixins<ES> {} + +=====================================output===================================== +// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 +export interface MarkDef< + M extends string | Mark = Mark, + ES extends ExprRef | SignalRef = ExprRef | SignalRef, +> extends GenericMarkDef<M>, + Omit< + MarkConfig<ES> & + AreaConfig<ES> & + BarConfig<ES> & // always extends RectConfig + LineConfig<ES> & + TickConfig<ES>, + "startAngle" | "endAngle" | "width" | "height" + >, + MarkDefMixins<ES> {} + +================================================================================ +`; + +exports[`long-type-parameters.ts - {"printWidth":110} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 110 + | printWidth +=====================================input====================================== +// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 +export interface MarkDef< + M extends string | Mark = Mark, + ES extends ExprRef | SignalRef = ExprRef | SignalRef +> extends GenericMarkDef<M>, + Omit< + MarkConfig<ES> & + AreaConfig<ES> & + BarConfig<ES> & // always extends RectConfig + LineConfig<ES> & + TickConfig<ES>, + 'startAngle' | 'endAngle' | 'width' | 'height' + >, + MarkDefMixins<ES> {} + +=====================================output===================================== +// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 +export interface MarkDef<M extends string | Mark = Mark, ES extends ExprRef | SignalRef = ExprRef | SignalRef> + extends GenericMarkDef<M>, + Omit< + MarkConfig<ES> & + AreaConfig<ES> & + BarConfig<ES> & // always extends RectConfig + LineConfig<ES> & + TickConfig<ES>, + "startAngle" | "endAngle" | "width" | "height" + >, + MarkDefMixins<ES> {} + +================================================================================ +`; diff --git a/tests/format/typescript/interface/long-type-parameters/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/interface/long-type-parameters/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index cd6e58aef9bf..000000000000 --- a/tests/format/typescript/interface/long-type-parameters/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,79 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`long-type-parameters.ts - {"printWidth":109} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 109 - | printWidth -=====================================input====================================== -// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 -export interface MarkDef< - M extends string | Mark = Mark, - ES extends ExprRef | SignalRef = ExprRef | SignalRef -> extends GenericMarkDef<M>, - Omit< - MarkConfig<ES> & - AreaConfig<ES> & - BarConfig<ES> & // always extends RectConfig - LineConfig<ES> & - TickConfig<ES>, - 'startAngle' | 'endAngle' | 'width' | 'height' - >, - MarkDefMixins<ES> {} - -=====================================output===================================== -// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 -export interface MarkDef< - M extends string | Mark = Mark, - ES extends ExprRef | SignalRef = ExprRef | SignalRef -> extends GenericMarkDef<M>, - Omit< - MarkConfig<ES> & - AreaConfig<ES> & - BarConfig<ES> & // always extends RectConfig - LineConfig<ES> & - TickConfig<ES>, - "startAngle" | "endAngle" | "width" | "height" - >, - MarkDefMixins<ES> {} - -================================================================================ -`; - -exports[`long-type-parameters.ts - {"printWidth":110} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 110 - | printWidth -=====================================input====================================== -// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 -export interface MarkDef< - M extends string | Mark = Mark, - ES extends ExprRef | SignalRef = ExprRef | SignalRef -> extends GenericMarkDef<M>, - Omit< - MarkConfig<ES> & - AreaConfig<ES> & - BarConfig<ES> & // always extends RectConfig - LineConfig<ES> & - TickConfig<ES>, - 'startAngle' | 'endAngle' | 'width' | 'height' - >, - MarkDefMixins<ES> {} - -=====================================output===================================== -// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602 -export interface MarkDef<M extends string | Mark = Mark, ES extends ExprRef | SignalRef = ExprRef | SignalRef> - extends GenericMarkDef<M>, - Omit< - MarkConfig<ES> & - AreaConfig<ES> & - BarConfig<ES> & // always extends RectConfig - LineConfig<ES> & - TickConfig<ES>, - "startAngle" | "endAngle" | "width" | "height" - >, - MarkDefMixins<ES> {} - -================================================================================ -`; diff --git a/tests/format/typescript/interface/long-type-parameters/format.test.js b/tests/format/typescript/interface/long-type-parameters/format.test.js new file mode 100644 index 000000000000..1ed6e194e20b --- /dev/null +++ b/tests/format/typescript/interface/long-type-parameters/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"], { printWidth: 109 }); +runFormatTest(import.meta, ["typescript"], { printWidth: 110 }); diff --git a/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js b/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js deleted file mode 100644 index 03ff9aee6579..000000000000 --- a/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"], { printWidth: 109 }); -run_spec(__dirname, ["typescript"], { printWidth: 110 }); diff --git a/tests/format/typescript/interface2/__snapshots__/format.test.js.snap b/tests/format/typescript/interface2/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..965593b3a98a --- /dev/null +++ b/tests/format/typescript/interface2/__snapshots__/format.test.js.snap @@ -0,0 +1,122 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +interface A1 // comment +{ foo(): bar;} + +interface A2 // comment +extends Base +{ foo(): bar;} + +interface A3 // comment1 +extends Base // comment2 +{ foo(): bar;} + +interface A4 // comment1 +extends Base // comment2 + // comment3 +{ foo(): bar;} + +interface A5 // comment1 +extends Base // comment2 + // comment3 +{ // comment4 +foo(): bar;} + +interface A6 // comment1 +extends Base // comment2 + // comment3 +{ +// comment4 +foo(): bar;} + +=====================================output===================================== +interface A1 { + // comment + foo(): bar; +} + +interface A2 // comment + extends Base { + foo(): bar; +} + +interface A3 // comment1 + extends Base { + // comment2 + foo(): bar; +} + +interface A4 // comment1 + extends Base { + // comment2 + // comment3 + foo(): bar; +} + +interface A5 // comment1 + extends Base { + // comment2 + // comment3 + // comment4 + foo(): bar; +} + +interface A6 // comment1 + extends Base { + // comment2 + // comment3 + // comment4 + foo(): bar; +} + +================================================================================ +`; + +exports[`comments-declare.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +declare interface a // 1 + extends b // 2 +{ foo: boolean} + +=====================================output===================================== +declare interface a // 1 + extends b { + // 2 + foo: boolean; +} + +================================================================================ +`; + +exports[`module.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +declare module X { + declare interface Y { x: number; } +} + +=====================================output===================================== +declare module X { + declare interface Y { + x: number; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/interface2/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/interface2/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fe4284233272..000000000000 --- a/tests/format/typescript/interface2/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export interface Environment1 extends GenericEnvironment< - SomeType, - AnotherType, - YetAnotherType, -> { - m(): void; -}; -export class Environment2 extends GenericEnvironment< - SomeType, - AnotherType, - YetAnotherType, - DifferentType1, - DifferentType2, - DifferentType3, - DifferentType4, -> { - m() {}; -}; - -// Declare Interface Break -declare interface ExtendsOne extends ASingleInterface { - x: string; -} - -declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { - x: string; -} - -declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { - x: string; -} - -// Interface declaration break -interface ExtendsOne extends ASingleInterface { - x: string; -} - -interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { - x: string; -} - -interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { - s: string; -} - -// Generic Types -interface ExtendsOne extends ASingleInterface<string> { - x: string; -} - -interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { - x: string; -} - -interface ExtendsMany - extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { - x: string; -} - -interface ExtendsManyWithGenerics - extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { - - x: string; - } - -export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} - -=====================================output===================================== -export interface Environment1 - extends GenericEnvironment<SomeType, AnotherType, YetAnotherType> { - m(): void; -} -export class Environment2 extends GenericEnvironment< - SomeType, - AnotherType, - YetAnotherType, - DifferentType1, - DifferentType2, - DifferentType3, - DifferentType4 -> { - m() {} -} - -// Declare Interface Break -declare interface ExtendsOne extends ASingleInterface { - x: string; -} - -declare interface ExtendsLarge - extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { - x: string; -} - -declare interface ExtendsMany - extends Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7 { - x: string; -} - -// Interface declaration break -interface ExtendsOne extends ASingleInterface { - x: string; -} - -interface ExtendsLarge - extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { - x: string; -} - -interface ExtendsMany - extends Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7 { - s: string; -} - -// Generic Types -interface ExtendsOne extends ASingleInterface<string> { - x: string; -} - -interface ExtendsLarge - extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { - x: string; -} - -interface ExtendsMany - extends ASingleGenericInterface< - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7 - > { - x: string; -} - -interface ExtendsManyWithGenerics - extends InterfaceOne, - InterfaceTwo, - ASingleGenericInterface< - Interface1, - Interface2, - Interface3, - Interface4, - Interface5, - Interface6, - Interface7 - >, - InterfaceThree { - x: string; -} - -export interface ExtendsLongOneWithGenerics - extends Bar< - SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, - ToBreakLineToBreakLineToBreakLine - > {} - -================================================================================ -`; - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface A1 // comment -{ foo(): bar;} - -interface A2 // comment -extends Base -{ foo(): bar;} - -interface A3 // comment1 -extends Base // comment2 -{ foo(): bar;} - -interface A4 // comment1 -extends Base // comment2 - // comment3 -{ foo(): bar;} - -interface A5 // comment1 -extends Base // comment2 - // comment3 -{ // comment4 -foo(): bar;} - -interface A6 // comment1 -extends Base // comment2 - // comment3 -{ -// comment4 -foo(): bar;} - -=====================================output===================================== -interface A1 { - // comment - foo(): bar; -} - -interface A2 // comment - extends Base { - foo(): bar; -} - -interface A3 // comment1 - extends Base { - // comment2 - foo(): bar; -} - -interface A4 // comment1 - extends Base { - // comment2 - // comment3 - foo(): bar; -} - -interface A5 // comment1 - extends Base { - // comment2 - // comment3 - // comment4 - foo(): bar; -} - -interface A6 // comment1 - extends Base { - // comment2 - // comment3 - // comment4 - foo(): bar; -} - -================================================================================ -`; - -exports[`comments-declare.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare interface a // 1 - extends b // 2 -{ foo: boolean} - -=====================================output===================================== -declare interface a // 1 - extends b { - // 2 - foo: boolean; -} - -================================================================================ -`; - -exports[`module.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module X { - declare interface Y { x: number; } -} - -=====================================output===================================== -declare module X { - declare interface Y { - x: number; - } -} - -================================================================================ -`; diff --git a/tests/format/typescript/interface2/break/__snapshots__/format.test.js.snap b/tests/format/typescript/interface2/break/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..38e0de3d9d47 --- /dev/null +++ b/tests/format/typescript/interface2/break/__snapshots__/format.test.js.snap @@ -0,0 +1,544 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +export interface Environment1 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, +> { + m(): void; +}; +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4, +> { + m() {}; +}; + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { + + x: string; + } + +export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} + +=====================================output===================================== +export interface Environment1 + extends GenericEnvironment<SomeType, AnotherType, YetAnotherType> { + m(): void; +} +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4 +> { + m() {} +} + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + > { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, + InterfaceTwo, + ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + >, + InterfaceThree { + x: string; +} + +export interface ExtendsLongOneWithGenerics + extends Bar< + SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, + ToBreakLineToBreakLineToBreakLine + > {} + +================================================================================ +`; + +exports[`break.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +export interface Environment1 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, +> { + m(): void; +}; +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4, +> { + m() {}; +}; + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { + + x: string; + } + +export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} + +=====================================output===================================== +export interface Environment1 + extends GenericEnvironment<SomeType, AnotherType, YetAnotherType> { + m(): void; +} +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4 +> { + m() {} +} + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + > { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, + InterfaceTwo, + ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + >, + InterfaceThree { + x: string; +} + +export interface ExtendsLongOneWithGenerics + extends Bar< + SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, + ToBreakLineToBreakLineToBreakLine + > {} + +================================================================================ +`; + +exports[`break.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +export interface Environment1 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, +> { + m(): void; +}; +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4, +> { + m() {}; +}; + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { + + x: string; + } + +export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} + +=====================================output===================================== +export interface Environment1 + extends GenericEnvironment<SomeType, AnotherType, YetAnotherType> { + m(): void; +} +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4 +> { + m() {} +} + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany + extends Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge + extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + > { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, + InterfaceTwo, + ASingleGenericInterface< + Interface1, + Interface2, + Interface3, + Interface4, + Interface5, + Interface6, + Interface7 + >, + InterfaceThree { + x: string; +} + +export interface ExtendsLongOneWithGenerics + extends Bar< + SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, + ToBreakLineToBreakLineToBreakLine + > {} + +================================================================================ +`; diff --git a/tests/format/typescript/interface2/break/break.ts b/tests/format/typescript/interface2/break/break.ts new file mode 100644 index 000000000000..3bf95b1df837 --- /dev/null +++ b/tests/format/typescript/interface2/break/break.ts @@ -0,0 +1,66 @@ +export interface Environment1 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, +> { + m(): void; +}; +export class Environment2 extends GenericEnvironment< + SomeType, + AnotherType, + YetAnotherType, + DifferentType1, + DifferentType2, + DifferentType3, + DifferentType4, +> { + m() {}; +}; + +// Declare Interface Break +declare interface ExtendsOne extends ASingleInterface { + x: string; +} + +declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + x: string; +} + +// Interface declaration break +interface ExtendsOne extends ASingleInterface { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { + x: string; +} + +interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { + s: string; +} + +// Generic Types +interface ExtendsOne extends ASingleInterface<string> { + x: string; +} + +interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { + x: string; +} + +interface ExtendsMany + extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { + x: string; +} + +interface ExtendsManyWithGenerics + extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { + + x: string; + } + +export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} diff --git a/tests/format/typescript/interface2/break/format.test.js b/tests/format/typescript/interface2/break/format.test.js new file mode 100644 index 000000000000..4fe8f803b6c7 --- /dev/null +++ b/tests/format/typescript/interface2/break/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/interface2/format.test.js b/tests/format/typescript/interface2/format.test.js new file mode 100644 index 000000000000..85f987cdaa9d --- /dev/null +++ b/tests/format/typescript/interface2/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript", "flow"], { + trailingComma: "es5", +}); diff --git a/tests/format/typescript/interface2/jsfmt.spec.js b/tests/format/typescript/interface2/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/interface2/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/intersection/__snapshots__/format.test.js.snap b/tests/format/typescript/intersection/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..ece35baef844 --- /dev/null +++ b/tests/format/typescript/intersection/__snapshots__/format.test.js.snap @@ -0,0 +1,773 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`intersection-parens.ts - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export type A = ( + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type B = ( + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type C = + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): (string & number) {} + +var x: (string & number); +var y: ((string & number)); + +class Foo<T extends (string & number)> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<(X & Y)>; +} + +type State = { + sharedProperty: any; +} & ( + & { discriminant: "FOO"; foo: any } + & { discriminant: "BAR"; bar: any } + & { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + & string + & undefined +)[]; + +const foo2: ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + & foo + & ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1 : C; +let a2 : & C; +let a3 : (& C); +let a4 : & (C); +let a5 : (& (C)); +let a6 : /*1*/ & C; +let a7 : /*1*/ & (C); +let a8 : /*1*/ (& C); +let a9 : (/*1*/ & C); +let a10: /*1*/ & /*2*/ C; +let a11: /*1*/ (& /*2*/ C); + +let aa1: /*1*/ & /*2*/ C & D; +let aa2: /*1*/ & /*2*/ C & /*3*/ D; +let aa3: /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = & C; +type A3 = (& C); +type A4 = & (C); +type A5 = (& (C)); +type A6 = /*1*/ & C; +type A7 = /*1*/ & (C); +type A8 = /*1*/ (& C); +type A9 = (/*1*/ & C); +type A10 = /*1*/ & /*2*/ C; +type A11 = /*1*/ (& /*2*/ C); +type A12 = /*1*/ & ( (C)); +type A13 = /*1*/ ( (C)); + +type Aa1 = /*1*/ & /*2*/ C & D; +type Aa2 = /*1*/ & /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type C1 = /*1*/ | a & b; +type C2 = /*1*/ | a & (b); +type C3 = /*1*/ | a & (| b); +type C4 = /*1*/ | (a & b); +type C5 = /*1*/ (| a & b); +type C6 /*0*/ = /*1*/ (| a & b); + +type Ctor = (new () => X) & Y; + +=====================================output===================================== +export type A = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type B = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type C = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): string & number {} + +var x: string & number; +var y: string & number; + +class Foo<T extends string & number> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<X & Y>; +} + +type State = { + sharedProperty: any; +} & ({ discriminant: "FOO"; foo: any } & { discriminant: "BAR"; bar: any } & { + discriminant: "BAZ"; + baz: any; +}); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as (string + & undefined)[]; + +const foo2: (AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD)[] = []; + +const foo3: keyof (AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD) = bar; + +const foo4: foo + & (AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD) = bar; + +let a1: C; +let a2: C; +let a3: C; +let a4: C; +let a5: C; +let a6: /*1*/ C; +let a7: /*1*/ C; +let a8: /*1*/ C; +let a9: /*1*/ C; +let a10: /*1*/ /*2*/ C; +let a11: /*1*/ /*2*/ C; + +let aa1: /*1*/ /*2*/ C & D; +let aa2: /*1*/ /*2*/ C & /*3*/ D; +let aa3: /*1*/ /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = C; +type A3 = C; +type A4 = C; +type A5 = C; +type A6 /*1*/ = C; +type A7 /*1*/ = C; +type A8 /*1*/ = C; +type A9 /*1*/ = C; +type A10 /*1*/ = /*2*/ C; +type A11 /*1*/ = /*2*/ C; +type A12 /*1*/ = C; +type A13 = /*1*/ C; + +type Aa1 = /*1*/ /*2*/ C & D; +type Aa2 = /*1*/ /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ /*2*/ C & /*3*/ D /*4*/; + +type C1 /*1*/ = a & b; +type C2 /*1*/ = a & b; +type C3 /*1*/ = a & b; +type C4 /*1*/ = a & b; +type C5 /*1*/ = a & b; +type C6 /*0*/ /*1*/ = a & b; + +type Ctor = (new () => X) & Y; + +================================================================================ +`; + +exports[`intersection-parens.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + +export type A = ( + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type B = ( + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type C = + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): (string & number) {} + +var x: (string & number); +var y: ((string & number)); + +class Foo<T extends (string & number)> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<(X & Y)>; +} + +type State = { + sharedProperty: any; +} & ( + & { discriminant: "FOO"; foo: any } + & { discriminant: "BAR"; bar: any } + & { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + & string + & undefined +)[]; + +const foo2: ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + & foo + & ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1 : C; +let a2 : & C; +let a3 : (& C); +let a4 : & (C); +let a5 : (& (C)); +let a6 : /*1*/ & C; +let a7 : /*1*/ & (C); +let a8 : /*1*/ (& C); +let a9 : (/*1*/ & C); +let a10: /*1*/ & /*2*/ C; +let a11: /*1*/ (& /*2*/ C); + +let aa1: /*1*/ & /*2*/ C & D; +let aa2: /*1*/ & /*2*/ C & /*3*/ D; +let aa3: /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = & C; +type A3 = (& C); +type A4 = & (C); +type A5 = (& (C)); +type A6 = /*1*/ & C; +type A7 = /*1*/ & (C); +type A8 = /*1*/ (& C); +type A9 = (/*1*/ & C); +type A10 = /*1*/ & /*2*/ C; +type A11 = /*1*/ (& /*2*/ C); +type A12 = /*1*/ & ( (C)); +type A13 = /*1*/ ( (C)); + +type Aa1 = /*1*/ & /*2*/ C & D; +type Aa2 = /*1*/ & /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type C1 = /*1*/ | a & b; +type C2 = /*1*/ | a & (b); +type C3 = /*1*/ | a & (| b); +type C4 = /*1*/ | (a & b); +type C5 = /*1*/ (| a & b); +type C6 /*0*/ = /*1*/ (| a & b); + +type Ctor = (new () => X) & Y; + +=====================================output===================================== +export type A = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + +export type B = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + +export type C = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + +export type D = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + +export type Multi = (string & number)[] + +function f(): string & number {} + +var x: string & number +var y: string & number + +class Foo<T extends string & number> {} + +interface Interface { + i: (X & Y) | Z + j: Partial<X & Y> +} + +type State = { + sharedProperty: any +} & ({ discriminant: "FOO"; foo: any } & { discriminant: "BAR"; bar: any } & { + discriminant: "BAZ" + baz: any +}) + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as (string & + undefined)[] + +const foo2: (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD)[] = [] + +const foo3: keyof (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD) = bar + +const foo4: foo & + (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD) = bar + +let a1: C +let a2: C +let a3: C +let a4: C +let a5: C +let a6: /*1*/ C +let a7: /*1*/ C +let a8: /*1*/ C +let a9: /*1*/ C +let a10: /*1*/ /*2*/ C +let a11: /*1*/ /*2*/ C + +let aa1: /*1*/ /*2*/ C & D +let aa2: /*1*/ /*2*/ C & /*3*/ D +let aa3: /*1*/ /*2*/ C & /*3*/ D /*4*/ + +type A1 = C +type A2 = C +type A3 = C +type A4 = C +type A5 = C +type A6 /*1*/ = C +type A7 /*1*/ = C +type A8 /*1*/ = C +type A9 /*1*/ = C +type A10 /*1*/ = /*2*/ C +type A11 /*1*/ = /*2*/ C +type A12 /*1*/ = C +type A13 = /*1*/ C + +type Aa1 = /*1*/ /*2*/ C & D +type Aa2 = /*1*/ /*2*/ C & /*3*/ D +type Aa3 = /*1*/ /*2*/ C & /*3*/ D /*4*/ + +type C1 /*1*/ = a & b +type C2 /*1*/ = a & b +type C3 /*1*/ = a & b +type C4 /*1*/ = a & b +type C5 /*1*/ = a & b +type C6 /*0*/ /*1*/ = a & b + +type Ctor = (new () => X) & Y + +================================================================================ +`; + +exports[`intersection-parens.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export type A = ( + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type B = ( + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type C = + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): (string & number) {} + +var x: (string & number); +var y: ((string & number)); + +class Foo<T extends (string & number)> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<(X & Y)>; +} + +type State = { + sharedProperty: any; +} & ( + & { discriminant: "FOO"; foo: any } + & { discriminant: "BAR"; bar: any } + & { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + & string + & undefined +)[]; + +const foo2: ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + & foo + & ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1 : C; +let a2 : & C; +let a3 : (& C); +let a4 : & (C); +let a5 : (& (C)); +let a6 : /*1*/ & C; +let a7 : /*1*/ & (C); +let a8 : /*1*/ (& C); +let a9 : (/*1*/ & C); +let a10: /*1*/ & /*2*/ C; +let a11: /*1*/ (& /*2*/ C); + +let aa1: /*1*/ & /*2*/ C & D; +let aa2: /*1*/ & /*2*/ C & /*3*/ D; +let aa3: /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = & C; +type A3 = (& C); +type A4 = & (C); +type A5 = (& (C)); +type A6 = /*1*/ & C; +type A7 = /*1*/ & (C); +type A8 = /*1*/ (& C); +type A9 = (/*1*/ & C); +type A10 = /*1*/ & /*2*/ C; +type A11 = /*1*/ (& /*2*/ C); +type A12 = /*1*/ & ( (C)); +type A13 = /*1*/ ( (C)); + +type Aa1 = /*1*/ & /*2*/ C & D; +type Aa2 = /*1*/ & /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type C1 = /*1*/ | a & b; +type C2 = /*1*/ | a & (b); +type C3 = /*1*/ | a & (| b); +type C4 = /*1*/ | (a & b); +type C5 = /*1*/ (| a & b); +type C6 /*0*/ = /*1*/ (| a & b); + +type Ctor = (new () => X) & Y; + +=====================================output===================================== +export type A = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type B = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type C = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): string & number {} + +var x: string & number; +var y: string & number; + +class Foo<T extends string & number> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<X & Y>; +} + +type State = { + sharedProperty: any; +} & ({ discriminant: "FOO"; foo: any } & { discriminant: "BAR"; bar: any } & { + discriminant: "BAZ"; + baz: any; +}); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as (string & + undefined)[]; + +const foo2: (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD)[] = []; + +const foo3: keyof (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD) = bar; + +const foo4: foo & + (AAAAAAAAAAAAAAAAAAAAAA & + BBBBBBBBBBBBBBBBBBBBBB & + CCCCCCCCCCCCCCCCCCCCCC & + DDDDDDDDDDDDDDDDDDDDDD) = bar; + +let a1: C; +let a2: C; +let a3: C; +let a4: C; +let a5: C; +let a6: /*1*/ C; +let a7: /*1*/ C; +let a8: /*1*/ C; +let a9: /*1*/ C; +let a10: /*1*/ /*2*/ C; +let a11: /*1*/ /*2*/ C; + +let aa1: /*1*/ /*2*/ C & D; +let aa2: /*1*/ /*2*/ C & /*3*/ D; +let aa3: /*1*/ /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = C; +type A3 = C; +type A4 = C; +type A5 = C; +type A6 /*1*/ = C; +type A7 /*1*/ = C; +type A8 /*1*/ = C; +type A9 /*1*/ = C; +type A10 /*1*/ = /*2*/ C; +type A11 /*1*/ = /*2*/ C; +type A12 /*1*/ = C; +type A13 = /*1*/ C; + +type Aa1 = /*1*/ /*2*/ C & D; +type Aa2 = /*1*/ /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ /*2*/ C & /*3*/ D /*4*/; + +type C1 /*1*/ = a & b; +type C2 /*1*/ = a & b; +type C3 /*1*/ = a & b; +type C4 /*1*/ = a & b; +type C5 /*1*/ = a & b; +type C6 /*0*/ /*1*/ = a & b; + +type Ctor = (new () => X) & Y; + +================================================================================ +`; + +exports[`type-arguments.ts - {"experimentalOperatorPosition":"start"} format 1`] = ` +====================================options===================================== +experimentalOperatorPosition: "start" +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {} + +=====================================output===================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent< + ALongNamedInterface1 & ALongNamedInterface2 +> = (props) => {}; + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent< + ALongNamedInterface1 | ALongNamedInterface2 +> = (props) => {}; + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent< + ALongNamedInterface1, + ALongNamedInterface2 +> = (props) => {}; + +================================================================================ +`; + +exports[`type-arguments.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {} + +=====================================output===================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent< + ALongNamedInterface1 & ALongNamedInterface2 +> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent< + ALongNamedInterface1 | ALongNamedInterface2 +> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent< + ALongNamedInterface1, + ALongNamedInterface2 +> = (props) => {} + +================================================================================ +`; + +exports[`type-arguments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {} + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {} + +=====================================output===================================== +// #6988 + +// functional component with ugly linebreak +export const MyLongNamedReactFunctionalComponent1: FunctionComponent< + ALongNamedInterface1 & ALongNamedInterface2 +> = (props) => {}; + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent2: FunctionComponent< + ALongNamedInterface1 | ALongNamedInterface2 +> = (props) => {}; + +// functional component with valid linebreak +export const MyLongNamedReactFunctionalComponent3: FunctionComponent< + ALongNamedInterface1, + ALongNamedInterface2 +> = (props) => {}; + +================================================================================ +`; diff --git a/tests/format/typescript/intersection/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/intersection/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1a258900c36d..000000000000 --- a/tests/format/typescript/intersection/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,277 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`intersection-parens.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -type A = (number | string) & boolean; -type B = ((number | string)) & boolean; -type C = (((number | string))) & boolean; -type D = ((((number | string)))) & boolean; - -let b1 : C; -let b2 : & C; -let b3 : (& C); -let b4 : & (C); -let b5 : (& (C)); -let b6 : /*1*/ & C; -let b7 : /*1*/ & (C); -let b8 : /*1*/ (& C); -let b9 : (/*1*/ & C); -let b10: /*1*/ & /*2*/ C; -let b11: /*1*/ (& /*2*/ C); - -let bb1: /*1*/ & /*2*/ C & D; -let bb2: /*1*/ & /*2*/ C & /*3*/ D; -let bb3: /*1*/ & /*2*/ C & /*3*/ D /*5*/; - -type B2 = & C; -type B3 = (& C); -type B4 = & (C); -type B5 = (& (C)); -type B6 = /*1*/ & C; -type B7 = /*1*/ & (C); -type B8 = /*1*/ (& C); -type B9 = (/*1*/ & C); -type B10 = /*1*/ & /*2*/ C; -type B11 = /*1*/ (& /*2*/ C); -type B12 = /*1*/ & ( (C)); - -type Bb1 = /*1*/ & /*2*/ C & D; -type Bb2 = /*1*/ & /*2*/ C & /*3*/ D; -type Bb3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; - -type D1 = /*1*/ | a & b; -type D2 = /*1*/ | a & (b); -type D3 = /*1*/ | a & (| b); -type D4 = /*1*/ | (a & b); -type D5 = /*1*/ (| a & b); -type D6 /*0*/ = /*1*/ (| a & b); - -=====================================output===================================== -type A = (number | string) & boolean -type B = (number | string) & boolean -type C = (number | string) & boolean -type D = (number | string) & boolean - -let b1: C -let b2: C -let b3: C -let b4: C -let b5: C -let b6: /*1*/ C -let b7: /*1*/ C -let b8: /*1*/ C -let b9: /*1*/ C -let b10: /*1*/ /*2*/ C -let b11: /*1*/ /*2*/ C - -let bb1: /*1*/ /*2*/ C & D -let bb2: /*1*/ /*2*/ C & /*3*/ D -let bb3: /*1*/ /*2*/ C & /*3*/ D /*5*/ - -type B2 = C -type B3 = C -type B4 = C -type B5 = C -type B6 = /*1*/ C -type B7 = /*1*/ C -type B8 = /*1*/ C -type B9 = /*1*/ C -type B10 = /*1*/ /*2*/ C -type B11 = /*1*/ /*2*/ C -type B12 = /*1*/ C - -type Bb1 = /*1*/ /*2*/ C & D -type Bb2 = /*1*/ /*2*/ C & /*3*/ D -type Bb3 = /*1*/ /*2*/ C & /*3*/ D /*4*/ - -type D1 = /*1*/ a & b -type D2 = /*1*/ a & b -type D3 = /*1*/ a & b -type D4 = /*1*/ a & b -type D5 = /*1*/ a & b -type D6 /*0*/ = /*1*/ a & b - -================================================================================ -`; - -exports[`intersection-parens.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A = (number | string) & boolean; -type B = ((number | string)) & boolean; -type C = (((number | string))) & boolean; -type D = ((((number | string)))) & boolean; - -let b1 : C; -let b2 : & C; -let b3 : (& C); -let b4 : & (C); -let b5 : (& (C)); -let b6 : /*1*/ & C; -let b7 : /*1*/ & (C); -let b8 : /*1*/ (& C); -let b9 : (/*1*/ & C); -let b10: /*1*/ & /*2*/ C; -let b11: /*1*/ (& /*2*/ C); - -let bb1: /*1*/ & /*2*/ C & D; -let bb2: /*1*/ & /*2*/ C & /*3*/ D; -let bb3: /*1*/ & /*2*/ C & /*3*/ D /*5*/; - -type B2 = & C; -type B3 = (& C); -type B4 = & (C); -type B5 = (& (C)); -type B6 = /*1*/ & C; -type B7 = /*1*/ & (C); -type B8 = /*1*/ (& C); -type B9 = (/*1*/ & C); -type B10 = /*1*/ & /*2*/ C; -type B11 = /*1*/ (& /*2*/ C); -type B12 = /*1*/ & ( (C)); - -type Bb1 = /*1*/ & /*2*/ C & D; -type Bb2 = /*1*/ & /*2*/ C & /*3*/ D; -type Bb3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; - -type D1 = /*1*/ | a & b; -type D2 = /*1*/ | a & (b); -type D3 = /*1*/ | a & (| b); -type D4 = /*1*/ | (a & b); -type D5 = /*1*/ (| a & b); -type D6 /*0*/ = /*1*/ (| a & b); - -=====================================output===================================== -type A = (number | string) & boolean; -type B = (number | string) & boolean; -type C = (number | string) & boolean; -type D = (number | string) & boolean; - -let b1: C; -let b2: C; -let b3: C; -let b4: C; -let b5: C; -let b6: /*1*/ C; -let b7: /*1*/ C; -let b8: /*1*/ C; -let b9: /*1*/ C; -let b10: /*1*/ /*2*/ C; -let b11: /*1*/ /*2*/ C; - -let bb1: /*1*/ /*2*/ C & D; -let bb2: /*1*/ /*2*/ C & /*3*/ D; -let bb3: /*1*/ /*2*/ C & /*3*/ D /*5*/; - -type B2 = C; -type B3 = C; -type B4 = C; -type B5 = C; -type B6 = /*1*/ C; -type B7 = /*1*/ C; -type B8 = /*1*/ C; -type B9 = /*1*/ C; -type B10 = /*1*/ /*2*/ C; -type B11 = /*1*/ /*2*/ C; -type B12 = /*1*/ C; - -type Bb1 = /*1*/ /*2*/ C & D; -type Bb2 = /*1*/ /*2*/ C & /*3*/ D; -type Bb3 = /*1*/ /*2*/ C & /*3*/ D /*4*/; - -type D1 = /*1*/ a & b; -type D2 = /*1*/ a & b; -type D3 = /*1*/ a & b; -type D4 = /*1*/ a & b; -type D5 = /*1*/ a & b; -type D6 /*0*/ = /*1*/ a & b; - -================================================================================ -`; - -exports[`type-arguments.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// #6988 - -// functional component with ugly linebreak -export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {} - -=====================================output===================================== -// #6988 - -// functional component with ugly linebreak -export const MyLongNamedReactFunctionalComponent1: FunctionComponent< - ALongNamedInterface1 & ALongNamedInterface2 -> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent2: FunctionComponent< - ALongNamedInterface1 | ALongNamedInterface2 -> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent3: FunctionComponent< - ALongNamedInterface1, - ALongNamedInterface2 -> = (props) => {} - -================================================================================ -`; - -exports[`type-arguments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// #6988 - -// functional component with ugly linebreak -export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {} - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {} - -=====================================output===================================== -// #6988 - -// functional component with ugly linebreak -export const MyLongNamedReactFunctionalComponent1: FunctionComponent< - ALongNamedInterface1 & ALongNamedInterface2 -> = (props) => {}; - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent2: FunctionComponent< - ALongNamedInterface1 | ALongNamedInterface2 -> = (props) => {}; - -// functional component with valid linebreak -export const MyLongNamedReactFunctionalComponent3: FunctionComponent< - ALongNamedInterface1, - ALongNamedInterface2 -> = (props) => {}; - -================================================================================ -`; diff --git a/tests/format/typescript/intersection/consistent-with-flow/__snapshots__/format.test.js.snap b/tests/format/typescript/intersection/consistent-with-flow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..6dd205cef2b4 --- /dev/null +++ b/tests/format/typescript/intersection/consistent-with-flow/__snapshots__/format.test.js.snap @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = /* 4 */ ( + & A + & B +)[] + +=====================================output===================================== +type A1 = /* 4 */ (A & B)[]; + +================================================================================ +`; + +exports[`intersection-parens.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = (number | string) & boolean; +type B = ((number | string)) & boolean; +type C = (((number | string))) & boolean; +type D = ((((number | string)))) & boolean; + +let b1 : C; +let b2 : & C; +let b3 : (& C); +let b4 : & (C); +let b5 : (& (C)); +let b6 : /*1*/ & C; +let b7 : /*1*/ & (C); +let b8 : /*1*/ (& C); +let b9 : (/*1*/ & C); +let b10: /*1*/ & /*2*/ C; +let b11: /*1*/ (& /*2*/ C); + +let bb1: /*1*/ & /*2*/ C & D; +let bb2: /*1*/ & /*2*/ C & /*3*/ D; +let bb3: /*1*/ & /*2*/ C & /*3*/ D /*5*/; + +type B2 = & C; +type B3 = (& C); +type B4 = & (C); +type B5 = (& (C)); +type B6 = /*1*/ & C; +type B7 = /*1*/ & (C); +type B8 = /*1*/ (& C); +type B9 = (/*1*/ & C); +type B10 = /*1*/ & /*2*/ C; +type B11 = /*1*/ (& /*2*/ C); +type B12 = /*1*/ & ( (C)); + +type Bb1 = /*1*/ & /*2*/ C & D; +type Bb2 = /*1*/ & /*2*/ C & /*3*/ D; +type Bb3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type D1 = /*1*/ | a & b; +type D2 = /*1*/ | a & (b); +type D3 = /*1*/ | a & (| b); +type D4 = /*1*/ | (a & b); +type D5 = /*1*/ (| a & b); +type D6 /*0*/ = /*1*/ (| a & b); + +=====================================output===================================== +type A = (number | string) & boolean; +type B = (number | string) & boolean; +type C = (number | string) & boolean; +type D = (number | string) & boolean; + +let b1: C; +let b2: C; +let b3: C; +let b4: C; +let b5: C; +let b6: /*1*/ C; +let b7: /*1*/ C; +let b8: /*1*/ C; +let b9: /*1*/ C; +let b10: /*1*/ /*2*/ C; +let b11: /*1*/ /*2*/ C; + +let bb1: /*1*/ /*2*/ C & D; +let bb2: /*1*/ /*2*/ C & /*3*/ D; +let bb3: /*1*/ /*2*/ C & /*3*/ D /*5*/; + +type B2 = C; +type B3 = C; +type B4 = C; +type B5 = C; +type B6 /*1*/ = C; +type B7 /*1*/ = C; +type B8 /*1*/ = C; +type B9 /*1*/ = C; +type B10 /*1*/ = /*2*/ C; +type B11 /*1*/ = /*2*/ C; +type B12 /*1*/ = C; + +type Bb1 = /*1*/ /*2*/ C & D; +type Bb2 = /*1*/ /*2*/ C & /*3*/ D; +type Bb3 = /*1*/ /*2*/ C & /*3*/ D /*4*/; + +type D1 /*1*/ = a & b; +type D2 /*1*/ = a & b; +type D3 /*1*/ = a & b; +type D4 /*1*/ = a & b; +type D5 /*1*/ = a & b; +type D6 /*0*/ /*1*/ = a & b; + +================================================================================ +`; diff --git a/tests/format/typescript/intersection/consistent-with-flow/comment.ts b/tests/format/typescript/intersection/consistent-with-flow/comment.ts new file mode 100644 index 000000000000..ecc2f934ea00 --- /dev/null +++ b/tests/format/typescript/intersection/consistent-with-flow/comment.ts @@ -0,0 +1,4 @@ +type A1 = /* 4 */ ( + & A + & B +)[] diff --git a/tests/format/typescript/intersection/consistent-with-flow/format.test.js b/tests/format/typescript/intersection/consistent-with-flow/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/intersection/consistent-with-flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/intersection/consistent-with-flow/intersection-parens.ts b/tests/format/typescript/intersection/consistent-with-flow/intersection-parens.ts new file mode 100644 index 000000000000..b19671acd128 --- /dev/null +++ b/tests/format/typescript/intersection/consistent-with-flow/intersection-parens.ts @@ -0,0 +1,43 @@ +type A = (number | string) & boolean; +type B = ((number | string)) & boolean; +type C = (((number | string))) & boolean; +type D = ((((number | string)))) & boolean; + +let b1 : C; +let b2 : & C; +let b3 : (& C); +let b4 : & (C); +let b5 : (& (C)); +let b6 : /*1*/ & C; +let b7 : /*1*/ & (C); +let b8 : /*1*/ (& C); +let b9 : (/*1*/ & C); +let b10: /*1*/ & /*2*/ C; +let b11: /*1*/ (& /*2*/ C); + +let bb1: /*1*/ & /*2*/ C & D; +let bb2: /*1*/ & /*2*/ C & /*3*/ D; +let bb3: /*1*/ & /*2*/ C & /*3*/ D /*5*/; + +type B2 = & C; +type B3 = (& C); +type B4 = & (C); +type B5 = (& (C)); +type B6 = /*1*/ & C; +type B7 = /*1*/ & (C); +type B8 = /*1*/ (& C); +type B9 = (/*1*/ & C); +type B10 = /*1*/ & /*2*/ C; +type B11 = /*1*/ (& /*2*/ C); +type B12 = /*1*/ & ( (C)); + +type Bb1 = /*1*/ & /*2*/ C & D; +type Bb2 = /*1*/ & /*2*/ C & /*3*/ D; +type Bb3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type D1 = /*1*/ | a & b; +type D2 = /*1*/ | a & (b); +type D3 = /*1*/ | a & (| b); +type D4 = /*1*/ | (a & b); +type D5 = /*1*/ (| a & b); +type D6 /*0*/ = /*1*/ (| a & b); diff --git a/tests/format/typescript/intersection/format.test.js b/tests/format/typescript/intersection/format.test.js new file mode 100644 index 000000000000..5ee9f29fd0a6 --- /dev/null +++ b/tests/format/typescript/intersection/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); +runFormatTest(import.meta, ["typescript"], { + experimentalOperatorPosition: "start", +}); diff --git a/tests/format/typescript/intersection/intersection-parens.ts b/tests/format/typescript/intersection/intersection-parens.ts index b19671acd128..b7aa04603e7b 100644 --- a/tests/format/typescript/intersection/intersection-parens.ts +++ b/tests/format/typescript/intersection/intersection-parens.ts @@ -1,43 +1,111 @@ -type A = (number | string) & boolean; -type B = ((number | string)) & boolean; -type C = (((number | string))) & boolean; -type D = ((((number | string)))) & boolean; - -let b1 : C; -let b2 : & C; -let b3 : (& C); -let b4 : & (C); -let b5 : (& (C)); -let b6 : /*1*/ & C; -let b7 : /*1*/ & (C); -let b8 : /*1*/ (& C); -let b9 : (/*1*/ & C); -let b10: /*1*/ & /*2*/ C; -let b11: /*1*/ (& /*2*/ C); - -let bb1: /*1*/ & /*2*/ C & D; -let bb2: /*1*/ & /*2*/ C & /*3*/ D; -let bb3: /*1*/ & /*2*/ C & /*3*/ D /*5*/; - -type B2 = & C; -type B3 = (& C); -type B4 = & (C); -type B5 = (& (C)); -type B6 = /*1*/ & C; -type B7 = /*1*/ & (C); -type B8 = /*1*/ (& C); -type B9 = (/*1*/ & C); -type B10 = /*1*/ & /*2*/ C; -type B11 = /*1*/ (& /*2*/ C); -type B12 = /*1*/ & ( (C)); - -type Bb1 = /*1*/ & /*2*/ C & D; -type Bb2 = /*1*/ & /*2*/ C & /*3*/ D; -type Bb3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; - -type D1 = /*1*/ | a & b; -type D2 = /*1*/ | a & (b); -type D3 = /*1*/ | a & (| b); -type D4 = /*1*/ | (a & b); -type D5 = /*1*/ (| a & b); -type D6 /*0*/ = /*1*/ (| a & b); + +export type A = ( + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type B = ( + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type C = + & aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + & bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa & + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string & number)[]; + +function f(): (string & number) {} + +var x: (string & number); +var y: ((string & number)); + +class Foo<T extends (string & number)> {} + +interface Interface { + i: (X & Y) | Z; + j: Partial<(X & Y)>; +} + +type State = { + sharedProperty: any; +} & ( + & { discriminant: "FOO"; foo: any } + & { discriminant: "BAR"; bar: any } + & { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + & string + & undefined +)[]; + +const foo2: ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + & foo + & ( + & AAAAAAAAAAAAAAAAAAAAAA + & BBBBBBBBBBBBBBBBBBBBBB + & CCCCCCCCCCCCCCCCCCCCCC + & DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1 : C; +let a2 : & C; +let a3 : (& C); +let a4 : & (C); +let a5 : (& (C)); +let a6 : /*1*/ & C; +let a7 : /*1*/ & (C); +let a8 : /*1*/ (& C); +let a9 : (/*1*/ & C); +let a10: /*1*/ & /*2*/ C; +let a11: /*1*/ (& /*2*/ C); + +let aa1: /*1*/ & /*2*/ C & D; +let aa2: /*1*/ & /*2*/ C & /*3*/ D; +let aa3: /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type A1 = C; +type A2 = & C; +type A3 = (& C); +type A4 = & (C); +type A5 = (& (C)); +type A6 = /*1*/ & C; +type A7 = /*1*/ & (C); +type A8 = /*1*/ (& C); +type A9 = (/*1*/ & C); +type A10 = /*1*/ & /*2*/ C; +type A11 = /*1*/ (& /*2*/ C); +type A12 = /*1*/ & ( (C)); +type A13 = /*1*/ ( (C)); + +type Aa1 = /*1*/ & /*2*/ C & D; +type Aa2 = /*1*/ & /*2*/ C & /*3*/ D; +type Aa3 = /*1*/ & /*2*/ C & /*3*/ D /*4*/; + +type C1 = /*1*/ | a & b; +type C2 = /*1*/ | a & (b); +type C3 = /*1*/ | a & (| b); +type C4 = /*1*/ | (a & b); +type C5 = /*1*/ (| a & b); +type C6 /*0*/ = /*1*/ (| a & b); + +type Ctor = (new () => X) & Y; diff --git a/tests/format/typescript/intersection/jsfmt.spec.js b/tests/format/typescript/intersection/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/typescript/intersection/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/intersection/mutiple-comments/17192.ts b/tests/format/typescript/intersection/mutiple-comments/17192.ts new file mode 100644 index 000000000000..3309dd0863ed --- /dev/null +++ b/tests/format/typescript/intersection/mutiple-comments/17192.ts @@ -0,0 +1,12 @@ +export type ErrorLike = + SerializedProps<Error> & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +export type ErrorLike2 = + SerializedProps<Error> & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; diff --git a/tests/format/typescript/intersection/mutiple-comments/__snapshots__/format.test.js.snap b/tests/format/typescript/intersection/mutiple-comments/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..888c3c5beac1 --- /dev/null +++ b/tests/format/typescript/intersection/mutiple-comments/__snapshots__/format.test.js.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`17192.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type ErrorLike = + SerializedProps<Error> & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +export type ErrorLike2 = + SerializedProps<Error> & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +=====================================output===================================== +export type ErrorLike = SerializedProps<Error> & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +export type ErrorLike2 = SerializedProps<Error> & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +================================================================================ +`; diff --git a/tests/format/typescript/intersection/mutiple-comments/format.test.js b/tests/format/typescript/intersection/mutiple-comments/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/intersection/mutiple-comments/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/intrinsic/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/intrinsic/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/intrinsic/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/intrinsic/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/intrinsic/format.test.js b/tests/format/typescript/intrinsic/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/intrinsic/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/intrinsic/jsfmt.spec.js b/tests/format/typescript/intrinsic/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/intrinsic/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/key-remapping-in-mapped-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/key-remapping-in-mapped-types/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/key-remapping-in-mapped-types/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/key-remapping-in-mapped-types/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/key-remapping-in-mapped-types/format.test.js b/tests/format/typescript/key-remapping-in-mapped-types/format.test.js new file mode 100644 index 000000000000..083abcf04619 --- /dev/null +++ b/tests/format/typescript/key-remapping-in-mapped-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts", "typescript"]); diff --git a/tests/format/typescript/key-remapping-in-mapped-types/jsfmt.spec.js b/tests/format/typescript/key-remapping-in-mapped-types/jsfmt.spec.js deleted file mode 100644 index 92b81c22bdc0..000000000000 --- a/tests/format/typescript/key-remapping-in-mapped-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel-ts", "typescript"]); diff --git a/tests/format/typescript/keyof/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/keyof/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/keyof/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/keyof/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/keyof/format.test.js b/tests/format/typescript/keyof/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/keyof/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/keyof/jsfmt.spec.js b/tests/format/typescript/keyof/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/keyof/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/keyword-types/__snapshots__/format.test.js.snap b/tests/format/typescript/keyword-types/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..50980ca3860a --- /dev/null +++ b/tests/format/typescript/keyword-types/__snapshots__/format.test.js.snap @@ -0,0 +1,125 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`conditional-types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type UnwrappedResultRow<T> = { + [P in keyof T]: ( + T[P] extends Req<infer a> ? ( + a + ) : ( + T[P] extends Opt<infer b> ? ( + b + ) : ( + // TEST + never + ) + ) + ); +}; + +=====================================output===================================== +export type UnwrappedResultRow<T> = { + [P in keyof T]: T[P] extends Req<infer a> + ? a + : T[P] extends Opt<infer b> + ? b + : // TEST + never; +}; + +================================================================================ +`; + +exports[`keyword-types-with-parens-comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let foo: ( + // comment + any +); +let foo: ( + // comment + null +); +let foo: ( + // comment + this +); +let foo: ( + // comment + number +); +let foo: ( + // comment + void +); +let foo: ( + // comment + boolean +); +let foo: ( + // comment + bigint +); +let foo: ( + // comment + symbol +); +let foo: ( + // comment + string +); +let foo: ( + // comment + never +); +let foo: ( + // comment + object +); +let foo: ( + // comment + undefined +); +let foo: ( + // comment + unknown +); + +=====================================output===================================== +let foo: // comment +any; +let foo: // comment +null; +let foo: // comment +this; +let foo: // comment +number; +let foo: // comment +void; +let foo: // comment +boolean; +let foo: // comment +bigint; +let foo: // comment +symbol; +let foo: // comment +string; +let foo: // comment +never; +let foo: // comment +object; +let foo: // comment +undefined; +let foo: // comment +unknown; + +================================================================================ +`; diff --git a/tests/format/typescript/keyword-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/keyword-types/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8f2097f3bc95..000000000000 --- a/tests/format/typescript/keyword-types/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,125 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`conditional-types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type UnwrappedResultRow<T> = { - [P in keyof T]: ( - T[P] extends Req<infer a> ? ( - a - ) : ( - T[P] extends Opt<infer b> ? ( - b - ) : ( - // TEST - never - ) - ) - ); -}; - -=====================================output===================================== -export type UnwrappedResultRow<T> = { - [P in keyof T]: T[P] extends Req<infer a> - ? a - : T[P] extends Opt<infer b> - ? b - : // TEST - never; -}; - -================================================================================ -`; - -exports[`keyword-types-with-parens-comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let foo: ( - // comment - any -); -let foo: ( - // comment - null -); -let foo: ( - // comment - this -); -let foo: ( - // comment - number -); -let foo: ( - // comment - void -); -let foo: ( - // comment - boolean -); -let foo: ( - // comment - bigint -); -let foo: ( - // comment - symbol -); -let foo: ( - // comment - string -); -let foo: ( - // comment - never -); -let foo: ( - // comment - object -); -let foo: ( - // comment - undefined -); -let foo: ( - // comment - unknown -); - -=====================================output===================================== -let foo: // comment -any; -let foo: // comment -null; -let foo: // comment -this; -let foo: // comment -number; -let foo: // comment -void; -let foo: // comment -boolean; -let foo: // comment -bigint; -let foo: // comment -symbol; -let foo: // comment -string; -let foo: // comment -never; -let foo: // comment -object; -let foo: // comment -undefined; -let foo: // comment -unknown; - -================================================================================ -`; diff --git a/tests/format/typescript/keyword-types/format.test.js b/tests/format/typescript/keyword-types/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/keyword-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/keyword-types/jsfmt.spec.js b/tests/format/typescript/keyword-types/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/keyword-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/keywords/__snapshots__/format.test.js.snap b/tests/format/typescript/keywords/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..40e0486589f0 --- /dev/null +++ b/tests/format/typescript/keywords/__snapshots__/format.test.js.snap @@ -0,0 +1,189 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`keywords.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module Y4 { + enum Color { Blue, Red } +} + +module YY3 { + module Module { + class A { s: string } + } +} + +module YY4 { + enum Color { Blue, Red } +} + +module YYY3 { + module Module { + class A { s: string } + } +} + +module YYY4 { + enum Color { Blue, Red } +} + +=====================================output===================================== +module Y4 { + enum Color { + Blue, + Red, + } +} + +module YY3 { + module Module { + class A { + s: string; + } + } +} + +module YY4 { + enum Color { + Blue, + Red, + } +} + +module YYY3 { + module Module { + class A { + s: string; + } + } +} + +module YYY4 { + enum Color { + Blue, + Red, + } +} + +================================================================================ +`; + +exports[`keywords-2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/12356 + +class C { + private *a() {} + public *b() {} + static *c() {} + protected *g() {} +} + +class D { + declare<T>() {} + readonly<T>() {} + abstract<T>() {} + static<T>() {} + private<T>() {} + public<T>() {} + protected<T>() {} +} + +class E { + public + private() {} +} + +class Foo { + constructor(private, public, static) { + } +} + +class F { + constructor(public []) {} +} +class G { + constructor(public {}) {} +} + +=====================================output===================================== +// https://github.com/babel/babel/pull/12356 + +class C { + private *a() {} + public *b() {} + static *c() {} + protected *g() {} +} + +class D { + declare<T>() {} + readonly<T>() {} + abstract<T>() {} + static<T>() {} + private<T>() {} + public<T>() {} + protected<T>() {} +} + +class E { + public; + private() {} +} + +class Foo { + constructor(private, public, static) {} +} + +class F { + constructor(public []) {} +} +class G { + constructor(public {}) {} +} + +================================================================================ +`; + +exports[`module.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module Y3 { + module Module { + class A { s: string } + } + + export enum X { } + + interface x { + readonly [x: any]: any; + } +} + +=====================================output===================================== +module Y3 { + module Module { + class A { + s: string; + } + } + + export enum X {} + + interface x { + readonly [x: any]: any; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index e3ee77eac067..000000000000 --- a/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,245 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`keywords.ts [babel-ts] format 1`] = ` -"Unexpected token, expected "{" (9:12) - 7 | - 8 | // Apparently this parses :P -> 9 | export private public protected static readonly abstract async enum X { } - | ^ - 10 | - 11 | interface x { - 12 | export private static readonly [x: any]: any;" -`; - -exports[`keywords.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// All of these should be an error - -module Y3 { - public module Module { - class A { s: string } - } - - // Apparently this parses :P - export private public protected static readonly abstract async enum X { } - - interface x { - export private static readonly [x: any]: any; - } -} - -module Y4 { - public enum Color { Blue, Red } -} - -module YY3 { - private module Module { - class A { s: string } - } -} - -module YY4 { - private enum Color { Blue, Red } -} - -module YYY3 { - static module Module { - class A { s: string } - } -} - -module YYY4 { - static enum Color { Blue, Red } -} - -=====================================output===================================== -// All of these should be an error - -module Y3 { - public module Module { - class A { - s: string; - } - } - - // Apparently this parses :P - export private public protected static readonly abstract async enum X {} - - interface x { - export private static readonly [x: any]: any; - } -} - -module Y4 { - public enum Color { - Blue, - Red, - } -} - -module YY3 { - private module Module { - class A { - s: string; - } - } -} - -module YY4 { - private enum Color { - Blue, - Red, - } -} - -module YYY3 { - static module Module { - class A { - s: string; - } - } -} - -module YYY4 { - static enum Color { - Blue, - Red, - } -} - -================================================================================ -`; - -exports[`keywords-2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/12356 - -class C { - private *a() {} - public *b() {} - static *c() {} - protected *g() {} -} - -class D { - declare<T>() {} - readonly<T>() {} - abstract<T>() {} - static<T>() {} - private<T>() {} - public<T>() {} - protected<T>() {} -} - -class E { - public - private() {} -} - -class Foo { - constructor(private, public, static) { - } -} - -class F { - constructor(public []) {} -} -class G { - constructor(public {}) {} -} - -=====================================output===================================== -// https://github.com/babel/babel/pull/12356 - -class C { - private *a() {} - public *b() {} - static *c() {} - protected *g() {} -} - -class D { - declare<T>() {} - readonly<T>() {} - abstract<T>() {} - static<T>() {} - private<T>() {} - public<T>() {} - protected<T>() {} -} - -class E { - public; - private() {} -} - -class Foo { - constructor(private, public, static) {} -} - -class F { - constructor(public []) {} -} -class G { - constructor(public {}) {} -} - -================================================================================ -`; - -exports[`module.ts [babel-ts] format 1`] = ` -"Unexpected token, expected "{" (7:10) - 5 | - 6 | // Apparently this parses :P -> 7 | export private public protected static readonly abstract async enum X { } - | ^ - 8 | - 9 | interface x { - 10 | export private static readonly [x: any]: any;" -`; - -exports[`module.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -module Y3 { - public module Module { - class A { s: string } - } - - // Apparently this parses :P - export private public protected static readonly abstract async enum X { } - - interface x { - export private static readonly [x: any]: any; - } -} - -=====================================output===================================== -module Y3 { - public module Module { - class A { - s: string; - } - } - - // Apparently this parses :P - export private public protected static readonly abstract async enum X {} - - interface x { - export private static readonly [x: any]: any; - } -} - -================================================================================ -`; diff --git a/tests/format/typescript/keywords/format.test.js b/tests/format/typescript/keywords/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/keywords/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/keywords/jsfmt.spec.js b/tests/format/typescript/keywords/jsfmt.spec.js deleted file mode 100644 index c8b902d7da97..000000000000 --- a/tests/format/typescript/keywords/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { "babel-ts": ["module.ts", "keywords.ts"] }, -}); diff --git a/tests/format/typescript/keywords/keywords.ts b/tests/format/typescript/keywords/keywords.ts index 9dd210282767..343303c6285e 100644 --- a/tests/format/typescript/keywords/keywords.ts +++ b/tests/format/typescript/keywords/keywords.ts @@ -1,38 +1,23 @@ -// All of these should be an error - -module Y3 { - public module Module { - class A { s: string } - } - - // Apparently this parses :P - export private public protected static readonly abstract async enum X { } - - interface x { - export private static readonly [x: any]: any; - } -} - module Y4 { - public enum Color { Blue, Red } + enum Color { Blue, Red } } module YY3 { - private module Module { + module Module { class A { s: string } } } module YY4 { - private enum Color { Blue, Red } + enum Color { Blue, Red } } module YYY3 { - static module Module { + module Module { class A { s: string } } } module YYY4 { - static enum Color { Blue, Red } + enum Color { Blue, Red } } diff --git a/tests/format/typescript/keywords/module.ts b/tests/format/typescript/keywords/module.ts index f4bd5c9f5618..d9e253d35f34 100644 --- a/tests/format/typescript/keywords/module.ts +++ b/tests/format/typescript/keywords/module.ts @@ -1,12 +1,11 @@ module Y3 { - public module Module { + module Module { class A { s: string } } - // Apparently this parses :P - export private public protected static readonly abstract async enum X { } + export enum X { } interface x { - export private static readonly [x: any]: any; + readonly [x: any]: any; } } diff --git a/tests/format/typescript/last-argument-expansion/__snapshots__/format.test.js.snap b/tests/format/typescript/last-argument-expansion/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3b7f037b84b9 --- /dev/null +++ b/tests/format/typescript/last-argument-expansion/__snapshots__/format.test.js.snap @@ -0,0 +1,265 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default class AddAssetHtmlPlugin { + apply(compiler: WebpackCompilerType) { + compiler.plugin('compilation', (compilation: WebpackCompilationType) => { + compilation.plugin('html-webpack-plugin-before-html', (callback: Callback<any>) => { + addAllAssetsToCompilation(this.assets, compilation, htmlPluginData, callback); + }); + }); + } +} + +=====================================output===================================== +export default class AddAssetHtmlPlugin { + apply(compiler: WebpackCompilerType) { + compiler.plugin("compilation", (compilation: WebpackCompilationType) => { + compilation.plugin( + "html-webpack-plugin-before-html", + (callback: Callback<any>) => { + addAllAssetsToCompilation( + this.assets, + compilation, + htmlPluginData, + callback, + ); + }, + ); + }); + } +} + +================================================================================ +`; + +exports[`decorated-function.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const Counter = decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + const p = useDefault(props, { + initialCount: 0, + label: "Counter", + }); + + const [s, set] = useState({ count: p.initialCount }); + const onClick = () => set("count", (it) => it + 1); + + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); + } +); + +const Counter2 = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); + } +); + +export default decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +export = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +module.exports = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +const Counter = + decorator("foo")( + decorator("bar")( + (props: { + loremFoo1: Array<Promise<any>>, + ipsumBarr2: Promise<number>, + }) => { + return <div/>; + })); + +=====================================output===================================== +const Counter = decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + const p = useDefault(props, { + initialCount: 0, + label: "Counter", + }); + + const [s, set] = useState({ count: p.initialCount }); + const onClick = () => set("count", (it) => it + 1); + + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); +}); + +const Counter2 = decorators.decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); +}); + +export default decorators.decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + return foo; +}); + +export = decorators.decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + return foo; +}); + +module.exports = decorators.decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + return foo; +}); + +const Counter = decorator("foo")( + decorator("bar")( + (props: { + loremFoo1: Array<Promise<any>>; + ipsumBarr2: Promise<number>; + }) => { + return <div />; + }, + ), +); + +================================================================================ +`; + +exports[`edge_case.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var listener = DOM.listen( + introCard, + 'click', + sigil, + (event: JavelinEvent): void => + BanzaiLogger.log( + config, + {...logData, ...DataStore.get(event.getNode(sigil))}, + ), +); + +=====================================output===================================== +var listener = DOM.listen( + introCard, + "click", + sigil, + (event: JavelinEvent): void => + BanzaiLogger.log(config, { + ...logData, + ...DataStore.get(event.getNode(sigil)), + }), +); + +================================================================================ +`; + +exports[`forward-ref.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const Link = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +export const LinkWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +export const Arrow = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; +}); + +export const ArrowWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + (props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +const Link = React.forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); + +=====================================output===================================== +export const Link = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); + +export const LinkWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); + +export const Arrow = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; +}); + +export const ArrowWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + (props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); + +const Link = React.forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); + +================================================================================ +`; diff --git a/tests/format/typescript/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 5e065cd2222f..000000000000 --- a/tests/format/typescript/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,71 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`break.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default class AddAssetHtmlPlugin { - apply(compiler: WebpackCompilerType) { - compiler.plugin('compilation', (compilation: WebpackCompilationType) => { - compilation.plugin('html-webpack-plugin-before-html', (callback: Callback<any>) => { - addAllAssetsToCompilation(this.assets, compilation, htmlPluginData, callback); - }); - }); - } -} - -=====================================output===================================== -export default class AddAssetHtmlPlugin { - apply(compiler: WebpackCompilerType) { - compiler.plugin("compilation", (compilation: WebpackCompilationType) => { - compilation.plugin( - "html-webpack-plugin-before-html", - (callback: Callback<any>) => { - addAllAssetsToCompilation( - this.assets, - compilation, - htmlPluginData, - callback - ); - } - ); - }); - } -} - -================================================================================ -`; - -exports[`edge_case.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -var listener = DOM.listen( - introCard, - 'click', - sigil, - (event: JavelinEvent): void => - BanzaiLogger.log( - config, - {...logData, ...DataStore.get(event.getNode(sigil))}, - ), -); - -=====================================output===================================== -var listener = DOM.listen( - introCard, - "click", - sigil, - (event: JavelinEvent): void => - BanzaiLogger.log(config, { - ...logData, - ...DataStore.get(event.getNode(sigil)), - }) -); - -================================================================================ -`; diff --git a/tests/format/typescript/last-argument-expansion/decorated-function.tsx b/tests/format/typescript/last-argument-expansion/decorated-function.tsx new file mode 100644 index 000000000000..125c2708cea4 --- /dev/null +++ b/tests/format/typescript/last-argument-expansion/decorated-function.tsx @@ -0,0 +1,55 @@ +const Counter = decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + const p = useDefault(props, { + initialCount: 0, + label: "Counter", + }); + + const [s, set] = useState({ count: p.initialCount }); + const onClick = () => set("count", (it) => it + 1); + + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); + } +); + +const Counter2 = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return () => ( + <button onclick={onClick}> + {p.label}: {s.count} + </button> + ); + } +); + +export default decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +export = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +module.exports = decorators.decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + return foo; + } +); + +const Counter = + decorator("foo")( + decorator("bar")( + (props: { + loremFoo1: Array<Promise<any>>, + ipsumBarr2: Promise<number>, + }) => { + return <div/>; + })); diff --git a/tests/format/typescript/last-argument-expansion/format.test.js b/tests/format/typescript/last-argument-expansion/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/last-argument-expansion/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/last-argument-expansion/forward-ref.tsx b/tests/format/typescript/last-argument-expansion/forward-ref.tsx new file mode 100644 index 000000000000..7cf00124d9cc --- /dev/null +++ b/tests/format/typescript/last-argument-expansion/forward-ref.tsx @@ -0,0 +1,27 @@ +export const Link = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +export const LinkWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +export const Arrow = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; +}); + +export const ArrowWithLongName = forwardRef<HTMLAnchorElement, LinkProps>( + (props, ref) => { + return <ThemeUILink ref={ref} variant="default" {...props} />; + } +); + +const Link = React.forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); diff --git a/tests/format/typescript/last-argument-expansion/jsfmt.spec.js b/tests/format/typescript/last-argument-expansion/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/last-argument-expansion/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/literal/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/literal/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/literal/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/literal/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/literal/format.test.js b/tests/format/typescript/literal/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/literal/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/literal/jsfmt.spec.js b/tests/format/typescript/literal/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/literal/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/mapped-type/__snapshots__/format.test.js.snap b/tests/format/typescript/mapped-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..32308d7d6735 --- /dev/null +++ b/tests/format/typescript/mapped-type/__snapshots__/format.test.js.snap @@ -0,0 +1,155 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`intersection.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Example = { + [A in B]: T; +} & { + [A in B]: T; +}; + +=====================================output===================================== +type Example = { + [A in B]: T; +} & { + [A in B]: T; +}; + +================================================================================ +`; + +exports[`issue-11098.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Type = { + // comment + readonly [T in number]; +}; + +type Type = { + // comment1 + // comment2 + readonly [T in number]; +}; + +type Type = { + // comment + +readonly [T in number]; +}; + +type Type = { + // comment + -readonly [T in number]; +}; + +type Type = { + // comment + + readonly [T in number]; +}; + +type Type = { + // comment + +readonly [T in number]; +}; + +type Type = { + // comment + readonly [T in number]; +}; + +type Type = { + // comment + [T in number]; +}; + +type Type = { + readonly + // comment + [T in number]; +}; + +type Type = { + readonly // foo + /* bar */ [T in number]; +}; + +=====================================output===================================== +type Type = { + // comment + readonly [T in number]; +}; + +type Type = { + // comment1 + // comment2 + readonly [T in number]; +}; + +type Type = { + // comment + +readonly [T in number]; +}; + +type Type = { + // comment + -readonly [T in number]; +}; + +type Type = { + // comment + +readonly [T in number]; +}; + +type Type = { + // comment + +readonly [T in number]; +}; + +type Type = { + // comment + readonly [T in number]; +}; + +type Type = { + // comment + [T in number]; +}; + +type Type = { + // comment + readonly [T in number]; +}; + +type Type = { + // foo + /* bar */ + readonly [T in number]; +}; + +================================================================================ +`; + +exports[`mapped-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Keys = 'option1' | 'option2'; +type A = { [K in Keys] }; +type B = { [K in Keys]+? }; + +=====================================output===================================== +type Keys = "option1" | "option2"; +type A = { [K in Keys] }; +type B = { [K in Keys]+? }; + +================================================================================ +`; diff --git a/tests/format/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index fe565652cc5f..000000000000 --- a/tests/format/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,154 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`intersection.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Example = { - [A in B]: T; -} & { - [A in B]: T; -}; - -=====================================output===================================== -type Example = { - [A in B]: T; -} & { - [A in B]: T; -}; - -================================================================================ -`; - -exports[`issue-11098.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Type = { - // comment - readonly [T in number]; -}; - -type Type = { - // comment1 - // comment2 - readonly [T in number]; -}; - -type Type = { - // comment - +readonly [T in number]; -}; - -type Type = { - // comment - -readonly [T in number]; -}; - -type Type = { - // comment - + readonly [T in number]; -}; - -type Type = { - // comment - +readonly [T in number]; -}; - -type Type = { - // comment - readonly [T in number]; -}; - -type Type = { - // comment - [T in number]; -}; - -type Type = { - readonly - // comment - [T in number]; -}; - -type Type = { - readonly // foo - /* bar */ [T in number]; -}; - -=====================================output===================================== -type Type = { - // comment - readonly [T in number]; -}; - -type Type = { - // comment1 - // comment2 - readonly [T in number]; -}; - -type Type = { - // comment - +readonly [T in number]; -}; - -type Type = { - // comment - -readonly [T in number]; -}; - -type Type = { - // comment - +readonly [T in number]; -}; - -type Type = { - // comment - +readonly [T in number]; -}; - -type Type = { - // comment - readonly [T in number]; -}; - -type Type = { - // comment - [T in number]; -}; - -type Type = { - // comment - readonly [T in number]; -}; - -type Type = { - // foo - /* bar */ readonly [T in number]; -}; - -================================================================================ -`; - -exports[`mapped-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Keys = 'option1' | 'option2'; -type A = { [K in Keys] }; -type B = { [K in Keys]+? }; - -=====================================output===================================== -type Keys = "option1" | "option2"; -type A = { [K in Keys] }; -type B = { [K in Keys]+? }; - -================================================================================ -`; diff --git a/tests/format/typescript/mapped-type/break-mode/__snapshots__/format.test.js.snap b/tests/format/typescript/mapped-type/break-mode/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..34b8d2c0d0cf --- /dev/null +++ b/tests/format/typescript/mapped-type/break-mode/__snapshots__/format.test.js.snap @@ -0,0 +1,91 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`break-mode.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = { readonly [A in B]: T} +type A2 = { +readonly [A in B]: T} +type A3 = { readonly + [A in B]: T} +type A4 = { readonly [ +A in B]: T} +type A5 = { readonly [A in B] +: T} +type A6 = { readonly [A in B]: +T} +type A7 = { readonly [A in B]: T +} + +type B1 = { [A in B]: T} +type B2 = { + [A in B]: T} +type B4 = { [ +A in B]: T} + +type C1 = { +readonly [A in B]: T} +type C2 = {+ +readonly [A in B]: T} +type C3 = { ++readonly [A in B]: T} + + +type D1 = { -readonly [A in B]: T} +type D2 = {- +readonly [A in B]: T} +type D3 = { +-readonly [A in B]: T} + +=====================================output===================================== +type A1 = { readonly [A in B]: T }; +type A2 = { + readonly [A in B]: T; +}; +type A3 = { readonly [A in B]: T }; +type A4 = { readonly [A in B]: T }; +type A5 = { readonly [A in B]: T }; +type A6 = { readonly [A in B]: T }; +type A7 = { readonly [A in B]: T }; + +type B1 = { [A in B]: T }; +type B2 = { + [A in B]: T; +}; +type B4 = { [A in B]: T }; + +type C1 = { +readonly [A in B]: T }; +type C2 = { +readonly [A in B]: T }; +type C3 = { + +readonly [A in B]: T; +}; + +type D1 = { -readonly [A in B]: T }; +type D2 = { -readonly [A in B]: T }; +type D3 = { + -readonly [A in B]: T; +}; + +================================================================================ +`; + +exports[`issue-10571.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function foo() { + return obj as {[K in any]: any; + }; +} + +=====================================output===================================== +function foo() { + return obj as { [K in any]: any }; +} + +================================================================================ +`; diff --git a/tests/format/typescript/mapped-type/break-mode/break-mode.ts b/tests/format/typescript/mapped-type/break-mode/break-mode.ts new file mode 100644 index 000000000000..c071fd190f86 --- /dev/null +++ b/tests/format/typescript/mapped-type/break-mode/break-mode.ts @@ -0,0 +1,32 @@ +type A1 = { readonly [A in B]: T} +type A2 = { +readonly [A in B]: T} +type A3 = { readonly + [A in B]: T} +type A4 = { readonly [ +A in B]: T} +type A5 = { readonly [A in B] +: T} +type A6 = { readonly [A in B]: +T} +type A7 = { readonly [A in B]: T +} + +type B1 = { [A in B]: T} +type B2 = { + [A in B]: T} +type B4 = { [ +A in B]: T} + +type C1 = { +readonly [A in B]: T} +type C2 = {+ +readonly [A in B]: T} +type C3 = { ++readonly [A in B]: T} + + +type D1 = { -readonly [A in B]: T} +type D2 = {- +readonly [A in B]: T} +type D3 = { +-readonly [A in B]: T} diff --git a/tests/format/typescript/mapped-type/break-mode/format.test.js b/tests/format/typescript/mapped-type/break-mode/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/mapped-type/break-mode/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/mapped-type/break-mode/issue-10571.ts b/tests/format/typescript/mapped-type/break-mode/issue-10571.ts new file mode 100644 index 000000000000..a830223d0c8b --- /dev/null +++ b/tests/format/typescript/mapped-type/break-mode/issue-10571.ts @@ -0,0 +1,4 @@ +function foo() { + return obj as {[K in any]: any; + }; +} diff --git a/tests/format/typescript/mapped-type/format.test.js b/tests/format/typescript/mapped-type/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/mapped-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/mapped-type/jsfmt.spec.js b/tests/format/typescript/mapped-type/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/mapped-type/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/method-chain/__snapshots__/format.test.js.snap b/tests/format/typescript/method-chain/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c86a53e741ee --- /dev/null +++ b/tests/format/typescript/method-chain/__snapshots__/format.test.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +this.firebase.object(\`/shops/\${shopLocation.shop}\`) + // keep distance info + .first((shop: ShopQueryResult, index: number, source: Observable<ShopQueryResult>): any => { + // add distance to result + const s = shop; + s.distance = shopLocation.distance; + return s; + }); + +=====================================output===================================== +this.firebase + .object(\`/shops/\${shopLocation.shop}\`) + // keep distance info + .first( + ( + shop: ShopQueryResult, + index: number, + source: Observable<ShopQueryResult>, + ): any => { + // add distance to result + const s = shop; + s.distance = shopLocation.distance; + return s; + }, + ); + +================================================================================ +`; diff --git a/tests/format/typescript/method-chain/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/method-chain/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 370577bc4d39..000000000000 --- a/tests/format/typescript/method-chain/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - -this.firebase.object(\`/shops/\${shopLocation.shop}\`) - // keep distance info - .first((shop: ShopQueryResult, index: number, source: Observable<ShopQueryResult>): any => { - // add distance to result - const s = shop; - s.distance = shopLocation.distance; - return s; - }); - -=====================================output===================================== -this.firebase - .object(\`/shops/\${shopLocation.shop}\`) - // keep distance info - .first( - ( - shop: ShopQueryResult, - index: number, - source: Observable<ShopQueryResult> - ): any => { - // add distance to result - const s = shop; - s.distance = shopLocation.distance; - return s; - } - ); - -================================================================================ -`; diff --git a/tests/format/typescript/method-chain/format.test.js b/tests/format/typescript/method-chain/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/method-chain/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/method-chain/jsfmt.spec.js b/tests/format/typescript/method-chain/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/method-chain/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/method/__snapshots__/format.test.js.snap b/tests/format/typescript/method/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4f9f73ebdf22 --- /dev/null +++ b/tests/format/typescript/method/__snapshots__/format.test.js.snap @@ -0,0 +1,169 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-10352-consistency.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export interface Store { + getRecord(collectionName: string, documentPath: string): TaskEither<Error, Option<GenericRecord>>; +} + +export default class StoreImpl extends Service implements Store { + getRecord(collectionName: string, documentPath: string): TaskEither<Error, Option<GenericRecord>> { + // Do some stuff. + } +} + +export function loadPlugin( + name: string, + dirname: string, +): { filepath: string, value: mixed } { + // ... +} + +=====================================output===================================== +export interface Store { + getRecord( + collectionName: string, + documentPath: string, + ): TaskEither<Error, Option<GenericRecord>>; +} + +export default class StoreImpl extends Service implements Store { + getRecord( + collectionName: string, + documentPath: string, + ): TaskEither<Error, Option<GenericRecord>> { + // Do some stuff. + } +} + +export function loadPlugin( + name: string, + dirname: string, +): { filepath: string; value: mixed } { + // ... +} + +================================================================================ +`; + +exports[`method-signature.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = { + get(key: "foo"): \` + \`; +}; +type Foo = { + get(key: "foo"): \`\`; +}; + +type Bar = { + get(key: "bar"): { + bar: "bar" + }; +} +type Bar = { + get(key: "bar"): { bar: "bar" }; +} + +=====================================output===================================== +type Foo = { + get(key: "foo"): \` + \`; +}; +type Foo = { + get(key: "foo"): \`\`; +}; + +type Bar = { + get(key: "bar"): { + bar: "bar"; + }; +}; +type Bar = { + get(key: "bar"): { bar: "bar" }; +}; + +================================================================================ +`; + +exports[`method-signature-with-wrapped-return-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type ReleaseToolConfig = { + get(key: "changelog"): { + get(key: "repo"): string; + get(key: "labels"): Map<string, string>; + }; +}; + +type ReleaseToolConfig2 = { + get(key: "changelog"): \` + \` +}; + +=====================================output===================================== +type ReleaseToolConfig = { + get(key: "changelog"): { + get(key: "repo"): string; + get(key: "labels"): Map<string, string>; + }; +}; + +type ReleaseToolConfig2 = { + get(key: "changelog"): \` + \`; +}; + +================================================================================ +`; + +exports[`semi.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module 'foo' { + function foo(namespace: string): void; + function bar(namespace: string): void; +} + +function pickCard(x: {suit: string; card: number; }[]): number; +function pickCard(x: number): {suit: string; card: number; }; + +=====================================output===================================== +declare module "foo" { + function foo(namespace: string): void; + function bar(namespace: string): void; +} + +function pickCard(x: { suit: string; card: number }[]): number; +function pickCard(x: number): { suit: string; card: number }; + +================================================================================ +`; + +exports[`type_literal_optional_method.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +var v: { e?(): number }; + +=====================================output===================================== +var v: { e?(): number }; + +================================================================================ +`; diff --git a/tests/format/typescript/method/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/method/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a444d144e65f..000000000000 --- a/tests/format/typescript/method/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,169 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-10352-consistency.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export interface Store { - getRecord(collectionName: string, documentPath: string): TaskEither<Error, Option<GenericRecord>>; -} - -export default class StoreImpl extends Service implements Store { - getRecord(collectionName: string, documentPath: string): TaskEither<Error, Option<GenericRecord>> { - // Do some stuff. - } -} - -export function loadPlugin( - name: string, - dirname: string, -): { filepath: string, value: mixed } { - // ... -} - -=====================================output===================================== -export interface Store { - getRecord( - collectionName: string, - documentPath: string - ): TaskEither<Error, Option<GenericRecord>>; -} - -export default class StoreImpl extends Service implements Store { - getRecord( - collectionName: string, - documentPath: string - ): TaskEither<Error, Option<GenericRecord>> { - // Do some stuff. - } -} - -export function loadPlugin( - name: string, - dirname: string -): { filepath: string; value: mixed } { - // ... -} - -================================================================================ -`; - -exports[`method-signature.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Foo = { - get(key: "foo"): \` - \`; -}; -type Foo = { - get(key: "foo"): \`\`; -}; - -type Bar = { - get(key: "bar"): { - bar: "bar" - }; -} -type Bar = { - get(key: "bar"): { bar: "bar" }; -} - -=====================================output===================================== -type Foo = { - get(key: "foo"): \` - \`; -}; -type Foo = { - get(key: "foo"): \`\`; -}; - -type Bar = { - get(key: "bar"): { - bar: "bar"; - }; -}; -type Bar = { - get(key: "bar"): { bar: "bar" }; -}; - -================================================================================ -`; - -exports[`method-signature-with-wrapped-return-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type ReleaseToolConfig = { - get(key: "changelog"): { - get(key: "repo"): string; - get(key: "labels"): Map<string, string>; - }; -}; - -type ReleaseToolConfig2 = { - get(key: "changelog"): \` - \` -}; - -=====================================output===================================== -type ReleaseToolConfig = { - get(key: "changelog"): { - get(key: "repo"): string; - get(key: "labels"): Map<string, string>; - }; -}; - -type ReleaseToolConfig2 = { - get(key: "changelog"): \` - \`; -}; - -================================================================================ -`; - -exports[`semi.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module 'foo' { - function foo(namespace: string): void; - function bar(namespace: string): void; -} - -function pickCard(x: {suit: string; card: number; }[]): number; -function pickCard(x: number): {suit: string; card: number; }; - -=====================================output===================================== -declare module "foo" { - function foo(namespace: string): void; - function bar(namespace: string): void; -} - -function pickCard(x: { suit: string; card: number }[]): number; -function pickCard(x: number): { suit: string; card: number }; - -================================================================================ -`; - -exports[`type_literal_optional_method.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -var v: { e?(): number }; - -=====================================output===================================== -var v: { e?(): number }; - -================================================================================ -`; diff --git a/tests/format/typescript/method/format.test.js b/tests/format/typescript/method/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/method/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/method/jsfmt.spec.js b/tests/format/typescript/method/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/method/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/module/__snapshots__/format.test.js.snap b/tests/format/typescript/module/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f2f567fb77f8 --- /dev/null +++ b/tests/format/typescript/module/__snapshots__/format.test.js.snap @@ -0,0 +1,227 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`empty.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module 'autoprefixer'; + +=====================================output===================================== +declare module "autoprefixer"; + +================================================================================ +`; + +exports[`global.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +namespace global {} +module global {} +global {} +declare global {} +declare /* module */ global {} +declare /* namespace */ global {} +declare module global {} +declare namespace global {} + +=====================================output===================================== +namespace global {} +module global {} +global {} +declare global {} +declare /* module */ global {} +declare /* namespace */ global {} +declare module global {} +declare namespace global {} + +================================================================================ +`; + +exports[`keyword.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +module X {} + +module X { + const x = 1; +} + +module X { + module X {} +} + +module X { + module X { + const x = 1; + } +} + +namespace X {} + +namespace X { + const x = 1; +} + +namespace X { + namespace X {} +} + +namespace X { + namespace X { + const x = 1; + } +} + +namespace /* module */ X {} +module /* namespace */ X {} +module /* namespace */ "x" {} + +=====================================output===================================== +module X {} + +module X { + const x = 1; +} + +module X { + module X {} +} + +module X { + module X { + const x = 1; + } +} + +namespace X {} + +namespace X { + const x = 1; +} + +namespace X { + namespace X {} +} + +namespace X { + namespace X { + const x = 1; + } +} + +namespace /* module */ X {} +module /* namespace */ X {} +module /* namespace */ "x" {} + +================================================================================ +`; + +exports[`module_nested.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare module abc1.def {} + +export declare module abc2.def {} + +export module abc3.def {} + +module abc4.def {} + +declare module abc5.def.ghi {} + +export declare module abc2.def.ghi {} + +export module abc3.def.ghi {} + +module abc4.def.ghi {} + +=====================================output===================================== +declare module abc1.def {} + +export declare module abc2.def {} + +export module abc3.def {} + +module abc4.def {} + +declare module abc5.def.ghi {} + +export declare module abc2.def.ghi {} + +export module abc3.def.ghi {} + +module abc4.def.ghi {} + +================================================================================ +`; + +exports[`namespace_function.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +namespace X { + declare function f(); +} + +=====================================output===================================== +namespace X { + declare function f(); +} + +================================================================================ +`; + +exports[`namespace_nested.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +declare namespace abc1.def {} + +export declare namespace abc2.def {} + +export namespace abc3.def {} + +namespace abc4.def {} + +declare namespace abc5.def.ghi {} + +export declare namespace abc2.def.ghi {} + +export namespace abc3.def.ghi {} + +namespace abc4.def.ghi {} + +=====================================output===================================== +declare namespace abc1.def {} + +export declare namespace abc2.def {} + +export namespace abc3.def {} + +namespace abc4.def {} + +declare namespace abc5.def.ghi {} + +export declare namespace abc2.def.ghi {} + +export namespace abc3.def.ghi {} + +namespace abc4.def.ghi {} + +================================================================================ +`; diff --git a/tests/format/typescript/module/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/module/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a757b619bb35..000000000000 --- a/tests/format/typescript/module/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,127 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`empty.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -declare module 'autoprefixer'; - -=====================================output===================================== -declare module "autoprefixer"; - -================================================================================ -`; - -exports[`global.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -namespace global {} -module global {} -global {} -declare global {} - -=====================================output===================================== -namespace global {} -module global {} -global {} -declare global {} - -================================================================================ -`; - -exports[`keyword.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -module X {} - -module X { - const x = 1; -} - -module X { - module X {} -} - -module X { - module X { - const x = 1; - } -} - -namespace X {} - -namespace X { - const x = 1; -} - -namespace X { - namespace X {} -} - -namespace X { - namespace X { - const x = 1; - } -} - -=====================================output===================================== -module X {} - -module X { - const x = 1; -} - -module X { - module X {} -} - -module X { - module X { - const x = 1; - } -} - -namespace X {} - -namespace X { - const x = 1; -} - -namespace X { - namespace X {} -} - -namespace X { - namespace X { - const x = 1; - } -} - -================================================================================ -`; - -exports[`namespace_function.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -namespace X { - declare function f(); -} - -=====================================output===================================== -namespace X { - declare function f(); -} - -================================================================================ -`; diff --git a/tests/format/typescript/module/format.test.js b/tests/format/typescript/module/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/module/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/module/global.ts b/tests/format/typescript/module/global.ts index 24b44687f8ce..e509f69e333b 100644 --- a/tests/format/typescript/module/global.ts +++ b/tests/format/typescript/module/global.ts @@ -2,3 +2,7 @@ namespace global {} module global {} global {} declare global {} +declare /* module */ global {} +declare /* namespace */ global {} +declare module global {} +declare namespace global {} diff --git a/tests/format/typescript/module/jsfmt.spec.js b/tests/format/typescript/module/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/module/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/module/keyword.ts b/tests/format/typescript/module/keyword.ts index d533a618796e..83792a6b8516 100644 --- a/tests/format/typescript/module/keyword.ts +++ b/tests/format/typescript/module/keyword.ts @@ -29,3 +29,7 @@ namespace X { const x = 1; } } + +namespace /* module */ X {} +module /* namespace */ X {} +module /* namespace */ "x" {} diff --git a/tests/format/typescript/module/module_nested.ts b/tests/format/typescript/module/module_nested.ts new file mode 100644 index 000000000000..b9fb4126ae08 --- /dev/null +++ b/tests/format/typescript/module/module_nested.ts @@ -0,0 +1,15 @@ +declare module abc1.def {} + +export declare module abc2.def {} + +export module abc3.def {} + +module abc4.def {} + +declare module abc5.def.ghi {} + +export declare module abc2.def.ghi {} + +export module abc3.def.ghi {} + +module abc4.def.ghi {} diff --git a/tests/format/typescript/module/namespace_nested.ts b/tests/format/typescript/module/namespace_nested.ts new file mode 100644 index 000000000000..2292366343c3 --- /dev/null +++ b/tests/format/typescript/module/namespace_nested.ts @@ -0,0 +1,15 @@ +declare namespace abc1.def {} + +export declare namespace abc2.def {} + +export namespace abc3.def {} + +namespace abc4.def {} + +declare namespace abc5.def.ghi {} + +export declare namespace abc2.def.ghi {} + +export namespace abc3.def.ghi {} + +namespace abc4.def.ghi {} diff --git a/tests/format/typescript/multiparser-css/__snapshots__/format.test.js.snap b/tests/format/typescript/multiparser-css/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..79f0be9fd01c --- /dev/null +++ b/tests/format/typescript/multiparser-css/__snapshots__/format.test.js.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-6259.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const yesFrame = ( + ...args: Interpolation<ThemedStyledProps<{}, Theme>>[] +) => css\` + \${ChatRoot}[data-frame="yes"] & { + \${css({}, ...args)} + } +\` + +=====================================output===================================== +const yesFrame = ( + ...args: Interpolation<ThemedStyledProps<{}, Theme>>[] +) => css\` + \${ChatRoot}[data-frame="yes"] & { + \${css({}, ...args)} + } +\`; + +================================================================================ +`; diff --git a/tests/format/typescript/multiparser-css/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/multiparser-css/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4c345399073d..000000000000 --- a/tests/format/typescript/multiparser-css/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,27 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-6259.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const yesFrame = ( - ...args: Interpolation<ThemedStyledProps<{}, Theme>>[] -) => css\` - \${ChatRoot}[data-frame="yes"] & { - \${css({}, ...args)} - } -\` - -=====================================output===================================== -const yesFrame = ( - ...args: Interpolation<ThemedStyledProps<{}, Theme>>[] -) => css\` - \${ChatRoot}[data-frame="yes"] & { - \${css({}, ...args)} - } -\`; - -================================================================================ -`; diff --git a/tests/format/typescript/multiparser-css/format.test.js b/tests/format/typescript/multiparser-css/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/multiparser-css/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/multiparser-css/jsfmt.spec.js b/tests/format/typescript/multiparser-css/jsfmt.spec.js deleted file mode 100644 index 2cc2617c4dc1..000000000000 --- a/tests/format/typescript/multiparser-css/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); diff --git a/tests/format/typescript/namespace/__snapshots__/format.test.js.snap b/tests/format/typescript/namespace/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f76f739e4534 --- /dev/null +++ b/tests/format/typescript/namespace/__snapshots__/format.test.js.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid-await.ts [babel-ts] format 1`] = ` +"'await' is only allowed within async functions and at the top levels of modules. (2:13) + 1 | namespace N { +> 2 | const x = await 42; + | ^ + 3 | } + 4 | +Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:12)" +`; + +exports[`invalid-await.ts [oxc-ts] format 1`] = ` +"\`await\` is only allowed within async functions and at the top levels of modules (2:13) + 1 | namespace N { +> 2 | const x = await 42; + | ^^^^^ + 3 | } + 4 |" +`; + +exports[`invalid-await.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +namespace N { + const x = await 42; +} + +=====================================output===================================== +namespace N { + const x = await 42; +} + +================================================================================ +`; diff --git a/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4138f8288e77..000000000000 --- a/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,28 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid-await.ts [babel-ts] format 1`] = ` -"'await' is only allowed within async functions and at the top levels of modules. (2:13) - 1 | namespace N { -> 2 | const x = await 42; - | ^ - 3 | } - 4 |" -`; - -exports[`invalid-await.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -namespace N { - const x = await 42; -} - -=====================================output===================================== -namespace N { - const x = await 42; -} - -================================================================================ -`; diff --git a/tests/format/typescript/namespace/format.test.js b/tests/format/typescript/namespace/format.test.js new file mode 100644 index 000000000000..a65268a06a24 --- /dev/null +++ b/tests/format/typescript/namespace/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { "babel-ts": true, "oxc-ts": true }, +}); diff --git a/tests/format/typescript/namespace/jsfmt.spec.js b/tests/format/typescript/namespace/jsfmt.spec.js deleted file mode 100644 index 4c48f7a811fd..000000000000 --- a/tests/format/typescript/namespace/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"], { errors: { "babel-ts": true } }); diff --git a/tests/format/typescript/never/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/never/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/never/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/never/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/never/format.test.js b/tests/format/typescript/never/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/never/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/never/jsfmt.spec.js b/tests/format/typescript/never/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/never/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/new/__snapshots__/format.test.js.snap b/tests/format/typescript/new/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..05d69bb0784d --- /dev/null +++ b/tests/format/typescript/new/__snapshots__/format.test.js.snap @@ -0,0 +1,142 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`new-signature.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface FooConstructor { + new ( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number + ): Foo; +} + +interface BarConstructor { + new <A, B, C>( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number + ): Foo; +} + +type BazConstructor = { + new ( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number + ): Foo; +} + + +interface ConstructorBigGenerics { + // comment + new <AAAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAAA>( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number + ): Foo; +} + +interface ConstructorInline { + // https://github.com/prettier/prettier/issues/2163 + (i): any; +} + +interface TimerConstructor { + // Line-splitting comment + new (interval: number, callback: (handler: Timer) => void): Timer; +} + +=====================================output===================================== +interface FooConstructor { + new ( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number, + ): Foo; +} + +interface BarConstructor { + new <A, B, C>( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number, + ): Foo; +} + +type BazConstructor = { + new ( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number, + ): Foo; +}; + +interface ConstructorBigGenerics { + // comment + new < + AAAAAAAAAAAAAAAAAAAAAAAA, + AAAAAAAAAAAAAAAAAAAAAAAA, + AAAAAAAAAAAAAAAAAAAAAAAA, + >( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number, + ): Foo; +} + +interface ConstructorInline { + // https://github.com/prettier/prettier/issues/2163 + (i): any; +} + +interface TimerConstructor { + // Line-splitting comment + new (interval: number, callback: (handler: Timer) => void): Timer; +} + +================================================================================ +`; diff --git a/tests/format/typescript/new/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/new/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 7259f8c7683b..000000000000 --- a/tests/format/typescript/new/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,142 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`new-signature.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface FooConstructor { - new ( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -interface BarConstructor { - new <A, B, C>( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -type BazConstructor = { - new ( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - - -interface ConstructorBigGenerics { - // comment - new <AAAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAAA, AAAAAAAAAAAAAAAAAAAAAAAA>( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -interface ConstructorInline { - // https://github.com/prettier/prettier/issues/2163 - (i): any; -} - -interface TimerConstructor { - // Line-splitting comment - new (interval: number, callback: (handler: Timer) => void): Timer; -} - -=====================================output===================================== -interface FooConstructor { - new ( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -interface BarConstructor { - new <A, B, C>( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -type BazConstructor = { - new ( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -}; - -interface ConstructorBigGenerics { - // comment - new < - AAAAAAAAAAAAAAAAAAAAAAAA, - AAAAAAAAAAAAAAAAAAAAAAAA, - AAAAAAAAAAAAAAAAAAAAAAAA - >( - a: number, - b: number, - c: number, - d: number, - e: number, - f: number, - g: number, - h: number - ): Foo; -} - -interface ConstructorInline { - // https://github.com/prettier/prettier/issues/2163 - (i): any; -} - -interface TimerConstructor { - // Line-splitting comment - new (interval: number, callback: (handler: Timer) => void): Timer; -} - -================================================================================ -`; diff --git a/tests/format/typescript/new/format.test.js b/tests/format/typescript/new/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/new/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/new/jsfmt.spec.js b/tests/format/typescript/new/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/new/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/no-semi/__snapshots__/format.test.js.snap b/tests/format/typescript/no-semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..36ef55ac7b00 --- /dev/null +++ b/tests/format/typescript/no-semi/__snapshots__/format.test.js.snap @@ -0,0 +1,107 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`no-semi.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +class A { + bar: A; + [baz] + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + bar: A; + private [baz] + readonly [qux] +} + +=====================================output===================================== +class A { + bar: A; + [baz] + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + bar: A + private [baz] + readonly [qux] +} + +================================================================================ +`; + +exports[`no-semi.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + bar: A; + [baz] + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + bar: A; + private [baz] + readonly [qux] +} + +=====================================output===================================== +class A { + bar: A; + [baz]; + + // none of the semicolons above this comment can be omitted. + // none of the semicolons below this comment are necessary. + + bar: A; + private [baz]; + readonly [qux]; +} + +================================================================================ +`; + +exports[`non-null.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el as HTMLElement)!.style.cursor = 'pointer' + +=====================================output===================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el as HTMLElement)!.style.cursor = "pointer" + +================================================================================ +`; + +exports[`non-null.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el as HTMLElement)!.style.cursor = 'pointer' + +=====================================output===================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref); +(el as HTMLElement)!.style.cursor = "pointer"; + +================================================================================ +`; diff --git a/tests/format/typescript/no-semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/no-semi/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 4e9ca3903cc6..000000000000 --- a/tests/format/typescript/no-semi/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,103 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`no-semi.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -class A { - bar: A; - [baz] - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - bar: A; - private [baz] -} - -=====================================output===================================== -class A { - bar: A; - [baz] - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - bar: A - private [baz] -} - -================================================================================ -`; - -exports[`no-semi.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -class A { - bar: A; - [baz] - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - bar: A; - private [baz] -} - -=====================================output===================================== -class A { - bar: A; - [baz]; - - // none of the semicolons above this comment can be omitted. - // none of the semicolons below this comment are necessary. - - bar: A; - private [baz]; -} - -================================================================================ -`; - -exports[`non-null.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el as HTMLElement)!.style.cursor = 'pointer' - -=====================================output===================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el as HTMLElement)!.style.cursor = "pointer" - -================================================================================ -`; - -exports[`non-null.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el as HTMLElement)!.style.cursor = 'pointer' - -=====================================output===================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref); -(el as HTMLElement)!.style.cursor = "pointer"; - -================================================================================ -`; diff --git a/tests/format/typescript/no-semi/format.test.js b/tests/format/typescript/no-semi/format.test.js new file mode 100644 index 000000000000..ca21c10853c1 --- /dev/null +++ b/tests/format/typescript/no-semi/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/no-semi/jsfmt.spec.js b/tests/format/typescript/no-semi/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/typescript/no-semi/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/no-semi/no-semi.ts b/tests/format/typescript/no-semi/no-semi.ts index 19134b85802c..2ef89445a30c 100644 --- a/tests/format/typescript/no-semi/no-semi.ts +++ b/tests/format/typescript/no-semi/no-semi.ts @@ -7,4 +7,5 @@ class A { bar: A; private [baz] + readonly [qux] } diff --git a/tests/format/typescript/non-null/__snapshots__/format.test.js.snap b/tests/format/typescript/non-null/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a53b7e617edf --- /dev/null +++ b/tests/format/typescript/non-null/__snapshots__/format.test.js.snap @@ -0,0 +1,183 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`braces.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const myFunction2 = (key: string): number => + ({ + a: 42, + b: 42, + }[key]!) + +const myFunction3 = key => ({}!.a); + +const f = ((a) => {log(a)})!; + +if (a) ({ a, ...b }.a())!.c(); + +(function() {})!() + +class a extends ({}!) {} + +=====================================output===================================== +const myFunction2 = (key: string): number => + ({ + a: 42, + b: 42, + })[key]!; + +const myFunction3 = (key) => ({})!.a; + +const f = ((a) => { + log(a); +})!; + +if (a) ({ a, ...b }).a()!.c(); + +(function () {})!(); + +class a extends ({}!) {} + +================================================================================ +`; + +exports[`member-chain.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const { somePropThatHasAReallyLongName, anotherPropThatHasALongName } = this.props.imReallySureAboutThis!; + +const { somePropThatHasAReallyLongName2, anotherPropThatHasALongName2 } = this.props.imReallySureAboutThis!.anotherObject; + +this.foo.get("bar")!.doThings().more(); + +foo!.bar().baz().what(); + +=====================================output===================================== +const { somePropThatHasAReallyLongName, anotherPropThatHasALongName } = + this.props.imReallySureAboutThis!; + +const { somePropThatHasAReallyLongName2, anotherPropThatHasALongName2 } = + this.props.imReallySureAboutThis!.anotherObject; + +this.foo.get("bar")!.doThings().more(); + +foo!.bar().baz().what(); + +================================================================================ +`; + +exports[`optional-chain.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a?.b!.c; +a?.b!.c.d; +a?.b.c!.d; +a!.b?.c; +a?.b!?.c; +a?.b!.c?.c; +(a?.b!).c; +(a?.b)!.c; + +a?.().b!.c; +a?.().b!.c.d; +a?.().b.c!.d; +a?.().b!?.c; +a?.().b!.c?.c; +(a?.().b!).c; +(a?.().b)!.c; + +(a?.b)![c?.d!] + +=====================================output===================================== +a?.b!.c; +a?.b!.c.d; +a?.b.c!.d; +a!.b?.c; +a?.b!?.c; +a?.b!.c?.c; +(a?.b)!.c; +(a?.b)!.c; + +a?.().b!.c; +a?.().b!.c.d; +a?.().b.c!.d; +a?.().b!?.c; +a?.().b!.c?.c; +(a?.().b)!.c; +(a?.().b)!.c; + +(a?.b)![c?.d!]; + +================================================================================ +`; + +exports[`parens.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a ? b : c) ![tokenKey]; +(a || b) ![tokenKey]; +(void 0)!; + +async function f() { + return (await foo())!; +} + +function* g() { + return (yield * foo())!; +} + +const a = (b()!)(); // parens aren't necessary +const b = c!(); + +// parens are necessary if the expression result is called as a constructor +const c1 = new (d()!)(); +const c2 = new (d()!); +const c3 = new (d()!.e)(); +new (x()\`\`.y!)(); +new (x()\`\`!.y)(); +new (x()!\`\`.y)(); +new (x!()\`\`.y)(); + +xyz.a(b!).a(b!).a(b!) + +=====================================output===================================== +(a ? b : c)![tokenKey]; +(a || b)![tokenKey]; +(void 0)!; + +async function f() { + return (await foo())!; +} + +function* g() { + return (yield* foo())!; +} + +const a = b()!(); // parens aren't necessary +const b = c!(); + +// parens are necessary if the expression result is called as a constructor +const c1 = new (d()!)(); +const c2 = new (d()!)(); +const c3 = new (d()!.e)(); +new (x()\`\`.y!)(); +new (x()\`\`!.y)(); +new (x()!\`\`.y)(); +new (x!()\`\`.y)(); + +xyz.a(b!).a(b!).a(b!); + +================================================================================ +`; diff --git a/tests/format/typescript/non-null/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/non-null/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 69c079c618be..000000000000 --- a/tests/format/typescript/non-null/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,183 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`braces.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const myFunction2 = (key: string): number => - ({ - a: 42, - b: 42, - }[key]!) - -const myFunction3 = key => ({}!.a); - -const f = ((a) => {log(a)})!; - -if (a) ({ a, ...b }.a())!.c(); - -(function() {})!() - -class a extends ({}!) {} - -=====================================output===================================== -const myFunction2 = (key: string): number => - ({ - a: 42, - b: 42, - }[key]!); - -const myFunction3 = (key) => ({}!.a); - -const f = ((a) => { - log(a); -})!; - -if (a) ({ a, ...b }).a()!.c(); - -(function () {})!(); - -class a extends ({}!) {} - -================================================================================ -`; - -exports[`member-chain.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const { somePropThatHasAReallyLongName, anotherPropThatHasALongName } = this.props.imReallySureAboutThis!; - -const { somePropThatHasAReallyLongName2, anotherPropThatHasALongName2 } = this.props.imReallySureAboutThis!.anotherObject; - -this.foo.get("bar")!.doThings().more(); - -foo!.bar().baz().what(); - -=====================================output===================================== -const { somePropThatHasAReallyLongName, anotherPropThatHasALongName } = - this.props.imReallySureAboutThis!; - -const { somePropThatHasAReallyLongName2, anotherPropThatHasALongName2 } = - this.props.imReallySureAboutThis!.anotherObject; - -this.foo.get("bar")!.doThings().more(); - -foo!.bar().baz().what(); - -================================================================================ -`; - -exports[`optional-chain.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -a?.b!.c; -a?.b!.c.d; -a?.b.c!.d; -a!.b?.c; -a?.b!?.c; -a?.b!.c?.c; -(a?.b!).c; -(a?.b)!.c; - -a?.().b!.c; -a?.().b!.c.d; -a?.().b.c!.d; -a?.().b!?.c; -a?.().b!.c?.c; -(a?.().b!).c; -(a?.().b)!.c; - -(a?.b)![c?.d!] - -=====================================output===================================== -a?.b!.c; -a?.b!.c.d; -a?.b.c!.d; -a!.b?.c; -a?.b!?.c; -a?.b!.c?.c; -(a?.b)!.c; -(a?.b)!.c; - -a?.().b!.c; -a?.().b!.c.d; -a?.().b.c!.d; -a?.().b!?.c; -a?.().b!.c?.c; -(a?.().b)!.c; -(a?.().b)!.c; - -(a?.b)![c?.d!]; - -================================================================================ -`; - -exports[`parens.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a ? b : c) ![tokenKey]; -(a || b) ![tokenKey]; -(void 0)!; - -async function f() { - return (await foo())!; -} - -function* g() { - return (yield * foo())!; -} - -const a = (b()!)(); // parens aren't necessary -const b = c!(); - -// parens are necessary if the expression result is called as a constructor -const c1 = new (d()!)(); -const c2 = new (d()!); -const c3 = new (d()!.e)(); -new (x()\`\`.y!)(); -new (x()\`\`!.y)(); -new (x()!\`\`.y)(); -new (x!()\`\`.y)(); - -xyz.a(b!).a(b!).a(b!) - -=====================================output===================================== -(a ? b : c)![tokenKey]; -(a || b)![tokenKey]; -(void 0)!; - -async function f() { - return (await foo())!; -} - -function* g() { - return (yield* foo())!; -} - -const a = b()!(); // parens aren't necessary -const b = c!(); - -// parens are necessary if the expression result is called as a constructor -const c1 = new (d()!)(); -const c2 = new (d()!)(); -const c3 = new (d()!.e)(); -new (x()\`\`.y!)(); -new (x()\`\`!.y)(); -new (x()!\`\`.y)(); -new (x!()\`\`.y)(); - -xyz.a(b!).a(b!).a(b!); - -================================================================================ -`; diff --git a/tests/format/typescript/non-null/format.test.js b/tests/format/typescript/non-null/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/non-null/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/non-null/jsfmt.spec.js b/tests/format/typescript/non-null/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/non-null/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/nosemi/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/nosemi/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/nosemi/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/nosemi/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/nosemi/format.test.js b/tests/format/typescript/nosemi/format.test.js new file mode 100644 index 000000000000..f0c848e5a9fe --- /dev/null +++ b/tests/format/typescript/nosemi/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/nosemi/jsfmt.spec.js b/tests/format/typescript/nosemi/jsfmt.spec.js deleted file mode 100644 index 4ec9f897e85f..000000000000 --- a/tests/format/typescript/nosemi/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/object-multiline/__snapshots__/format.test.js.snap b/tests/format/typescript/object-multiline/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..38955d19df90 --- /dev/null +++ b/tests/format/typescript/object-multiline/__snapshots__/format.test.js.snap @@ -0,0 +1,152 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`multiline.ts - {"objectWrap":"collapse"} format 1`] = ` +====================================options===================================== +objectWrap: "collapse" +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = { + name1: 'value1', + name2: 'value2', +}; + +const a: A = { + name1: 'value1', + name2: 'value2', +}; + +type B = { name1: 'value1', + name2: 'value2', +}; + +const b: B = { name1: 'value1', + name2: 'value2', +}; + +type C = { + name1: 'value1', name2: 'value2', +}; + +const c: C = { + name1: 'value1', name2: 'value2', +}; + +type D = { + name1: 'value1', name2: 'value2', }; + +const d: D = { + name1: 'value1', name2: 'value2', }; + + type E = { name1: 'value1', name2: 'value2', }; + +const e: E = { name1: 'value1', name2: 'value2', }; + +=====================================output===================================== +type A = { name1: "value1"; name2: "value2" }; + +const a: A = { name1: "value1", name2: "value2" }; + +type B = { name1: "value1"; name2: "value2" }; + +const b: B = { name1: "value1", name2: "value2" }; + +type C = { name1: "value1"; name2: "value2" }; + +const c: C = { name1: "value1", name2: "value2" }; + +type D = { name1: "value1"; name2: "value2" }; + +const d: D = { name1: "value1", name2: "value2" }; + +type E = { name1: "value1"; name2: "value2" }; + +const e: E = { name1: "value1", name2: "value2" }; + +================================================================================ +`; + +exports[`multiline.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = { + name1: 'value1', + name2: 'value2', +}; + +const a: A = { + name1: 'value1', + name2: 'value2', +}; + +type B = { name1: 'value1', + name2: 'value2', +}; + +const b: B = { name1: 'value1', + name2: 'value2', +}; + +type C = { + name1: 'value1', name2: 'value2', +}; + +const c: C = { + name1: 'value1', name2: 'value2', +}; + +type D = { + name1: 'value1', name2: 'value2', }; + +const d: D = { + name1: 'value1', name2: 'value2', }; + + type E = { name1: 'value1', name2: 'value2', }; + +const e: E = { name1: 'value1', name2: 'value2', }; + +=====================================output===================================== +type A = { + name1: "value1"; + name2: "value2"; +}; + +const a: A = { + name1: "value1", + name2: "value2", +}; + +type B = { name1: "value1"; name2: "value2" }; + +const b: B = { name1: "value1", name2: "value2" }; + +type C = { + name1: "value1"; + name2: "value2"; +}; + +const c: C = { + name1: "value1", + name2: "value2", +}; + +type D = { + name1: "value1"; + name2: "value2"; +}; + +const d: D = { + name1: "value1", + name2: "value2", +}; + +type E = { name1: "value1"; name2: "value2" }; + +const e: E = { name1: "value1", name2: "value2" }; + +================================================================================ +`; diff --git a/tests/format/typescript/object-multiline/format.test.js b/tests/format/typescript/object-multiline/format.test.js new file mode 100644 index 000000000000..81ab09ce404b --- /dev/null +++ b/tests/format/typescript/object-multiline/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { objectWrap: "collapse" }); diff --git a/tests/format/typescript/object-multiline/multiline.ts b/tests/format/typescript/object-multiline/multiline.ts new file mode 100644 index 000000000000..7c0b86aa8ee2 --- /dev/null +++ b/tests/format/typescript/object-multiline/multiline.ts @@ -0,0 +1,35 @@ +type A = { + name1: 'value1', + name2: 'value2', +}; + +const a: A = { + name1: 'value1', + name2: 'value2', +}; + +type B = { name1: 'value1', + name2: 'value2', +}; + +const b: B = { name1: 'value1', + name2: 'value2', +}; + +type C = { + name1: 'value1', name2: 'value2', +}; + +const c: C = { + name1: 'value1', name2: 'value2', +}; + +type D = { + name1: 'value1', name2: 'value2', }; + +const d: D = { + name1: 'value1', name2: 'value2', }; + + type E = { name1: 'value1', name2: 'value2', }; + +const e: E = { name1: 'value1', name2: 'value2', }; diff --git a/tests/format/typescript/optional-call/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/optional-call/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/optional-call/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/optional-call/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/optional-call/format.test.js b/tests/format/typescript/optional-call/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/optional-call/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/optional-call/jsfmt.spec.js b/tests/format/typescript/optional-call/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/optional-call/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/optional-chaining/__snapshots__/format.test.js.snap b/tests/format/typescript/optional-chaining/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..63a73c703fbc --- /dev/null +++ b/tests/format/typescript/optional-chaining/__snapshots__/format.test.js.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`as-key.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class A { + [a?.b]?= 1; + + [a?.b]?() {}; + [a?.b]?= function () {}; + + // https://github.com/babel/babel/issues/17310 + // *[a?.b]?() {}; + [a?.b]?= function *() {}; + + async [a?.b]?() {}; + [a?.b]?= async function () {}; + + async * [a?.b]?() {}; + [a?.b]?= async function *() {}; +} + +class B { + static [a?.b]?= 1; + + static [a?.b]?() {}; + static [a?.b]?= function () {}; + + static *[a?.b]?() {}; + static [a?.b]?= function *() {}; + + static async [a?.b]?() {}; + static [a?.b]?= async function () {}; + + static async * [a?.b]?() {}; + static [a?.b]?= async function *() {}; +} + +=====================================output===================================== +class A { + [a?.b]? = 1; + + [a?.b]?() {} + [a?.b]? = function () {}; + + // https://github.com/babel/babel/issues/17310 + // *[a?.b]?() {}; + [a?.b]? = function* () {}; + + async [a?.b]?() {} + [a?.b]? = async function () {}; + + async *[a?.b]?() {} + [a?.b]? = async function* () {}; +} + +class B { + static [a?.b]? = 1; + + static [a?.b]?() {} + static [a?.b]? = function () {}; + + static *[a?.b]?() {} + static [a?.b]? = function* () {}; + + static async [a?.b]?() {} + static [a?.b]? = async function () {}; + + static async *[a?.b]?() {} + static [a?.b]? = async function* () {}; +} + +================================================================================ +`; diff --git a/tests/format/typescript/optional-chaining/as-key.ts b/tests/format/typescript/optional-chaining/as-key.ts new file mode 100644 index 000000000000..6aa6a8e61da7 --- /dev/null +++ b/tests/format/typescript/optional-chaining/as-key.ts @@ -0,0 +1,32 @@ +class A { + [a?.b]?= 1; + + [a?.b]?() {}; + [a?.b]?= function () {}; + + // https://github.com/babel/babel/issues/17310 + // *[a?.b]?() {}; + [a?.b]?= function *() {}; + + async [a?.b]?() {}; + [a?.b]?= async function () {}; + + async * [a?.b]?() {}; + [a?.b]?= async function *() {}; +} + +class B { + static [a?.b]?= 1; + + static [a?.b]?() {}; + static [a?.b]?= function () {}; + + static *[a?.b]?() {}; + static [a?.b]?= function *() {}; + + static async [a?.b]?() {}; + static [a?.b]?= async function () {}; + + static async * [a?.b]?() {}; + static [a?.b]?= async function *() {}; +} diff --git a/tests/format/typescript/optional-chaining/format.test.js b/tests/format/typescript/optional-chaining/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/optional-chaining/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/optional-method/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/optional-method/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/optional-method/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/optional-method/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/optional-method/format.test.js b/tests/format/typescript/optional-method/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/optional-method/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/optional-method/jsfmt.spec.js b/tests/format/typescript/optional-method/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/optional-method/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/optional-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/optional-type/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/optional-type/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/optional-type/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/optional-type/format.test.js b/tests/format/typescript/optional-type/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/optional-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/optional-type/jsfmt.spec.js b/tests/format/typescript/optional-type/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/optional-type/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/optional-variance/__snapshots__/format.test.js.snap b/tests/format/typescript/optional-variance/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..566dc26e0e69 --- /dev/null +++ b/tests/format/typescript/optional-variance/__snapshots__/format.test.js.snap @@ -0,0 +1,269 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Covariant<out T> = { + x: T; +} +type Contravariant<in T> = { + f: (x: T) => void; +} +type Invariant<in out T> = { + f: (x: T) => T; +} +type T10<out T> = T; +type T11<in T> = keyof T; +type T12<out T, out K extends keyof T> = T[K]; +type T13<in out T> = T[keyof T]; + +type Covariant1<in T> = { + x: T; +} + +type Contravariant1<out T> = keyof T; + +type Contravariant2<out T> = { + f: (x: T) => void; +} + +type Invariant1<in T> = { + f: (x: T) => T; +} + +type Invariant2<out T> = { + f: (x: T) => T; +} +type Foo1<in T> = { + x: T; + f: FooFn1<T>; +} + +type Foo2<out T> = { + x: T; + f: FooFn2<T>; +} + +type Foo3<in out T> = { + x: T; + f: FooFn3<T>; +} + +type T21<in out T> = T; + +interface Baz<out T> {} +interface Baz<in T> {} + +interface Parent<out A> { + child: Child<A> | null; + parent: Parent<A> | null; +} + +declare class StateNode<TContext, in out TEvent extends { type: string }> { + _storedEvent: TEvent; + _action: ActionObject<TEvent>; + _state: StateNode<TContext, any>; +} + +=====================================output===================================== +type Covariant<out T> = { + x: T; +}; +type Contravariant<in T> = { + f: (x: T) => void; +}; +type Invariant<in out T> = { + f: (x: T) => T; +}; +type T10<out T> = T; +type T11<in T> = keyof T; +type T12<out T, out K extends keyof T> = T[K]; +type T13<in out T> = T[keyof T]; + +type Covariant1<in T> = { + x: T; +}; + +type Contravariant1<out T> = keyof T; + +type Contravariant2<out T> = { + f: (x: T) => void; +}; + +type Invariant1<in T> = { + f: (x: T) => T; +}; + +type Invariant2<out T> = { + f: (x: T) => T; +}; +type Foo1<in T> = { + x: T; + f: FooFn1<T>; +}; + +type Foo2<out T> = { + x: T; + f: FooFn2<T>; +}; + +type Foo3<in out T> = { + x: T; + f: FooFn3<T>; +}; + +type T21<in out T> = T; + +interface Baz<out T> {} +interface Baz<in T> {} + +interface Parent<out A> { + child: Child<A> | null; + parent: Parent<A> | null; +} + +declare class StateNode<TContext, in out TEvent extends { type: string }> { + _storedEvent: TEvent; + _action: ActionObject<TEvent>; + _state: StateNode<TContext, any>; +} + +================================================================================ +`; + +exports[`with-jsx.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Covariant<out T> = { + x: T; +} +type Contravariant<in T> = { + f: (x: T) => void; +} +type Invariant<in out T> = { + f: (x: T) => T; +} +type T10<out T> = T; +type T11<in T> = keyof T; +type T12<out T, out K extends keyof T> = T[K]; +type T13<in out T> = T[keyof T]; + +type Covariant1<in T> = { + x: T; +} + +type Contravariant1<out T> = keyof T; + +type Contravariant2<out T> = { + f: (x: T) => void; +} + +type Invariant1<in T> = { + f: (x: T) => T; +} + +type Invariant2<out T> = { + f: (x: T) => T; +} +type Foo1<in T> = { + x: T; + f: FooFn1<T>; +} + +type Foo2<out T> = { + x: T; + f: FooFn2<T>; +} + +type Foo3<in out T> = { + x: T; + f: FooFn3<T>; +} + +type T21<in out T> = T; + +interface Baz<out T> {} +interface Baz<in T> {} + +interface Parent<out A> { + child: Child<A> | null; + parent: Parent<A> | null; +} + +declare class StateNode<TContext, in out TEvent extends { type: string }> { + _storedEvent: TEvent; + _action: ActionObject<TEvent>; + _state: StateNode<TContext, any>; +} + +=====================================output===================================== +type Covariant<out T> = { + x: T; +}; +type Contravariant<in T> = { + f: (x: T) => void; +}; +type Invariant<in out T> = { + f: (x: T) => T; +}; +type T10<out T> = T; +type T11<in T> = keyof T; +type T12<out T, out K extends keyof T> = T[K]; +type T13<in out T> = T[keyof T]; + +type Covariant1<in T> = { + x: T; +}; + +type Contravariant1<out T> = keyof T; + +type Contravariant2<out T> = { + f: (x: T) => void; +}; + +type Invariant1<in T> = { + f: (x: T) => T; +}; + +type Invariant2<out T> = { + f: (x: T) => T; +}; +type Foo1<in T> = { + x: T; + f: FooFn1<T>; +}; + +type Foo2<out T> = { + x: T; + f: FooFn2<T>; +}; + +type Foo3<in out T> = { + x: T; + f: FooFn3<T>; +}; + +type T21<in out T> = T; + +interface Baz<out T> {} +interface Baz<in T> {} + +interface Parent<out A> { + child: Child<A> | null; + parent: Parent<A> | null; +} + +declare class StateNode<TContext, in out TEvent extends { type: string }> { + _storedEvent: TEvent; + _action: ActionObject<TEvent>; + _state: StateNode<TContext, any>; +} + +================================================================================ +`; diff --git a/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ff238fb554f1..000000000000 --- a/tests/format/typescript/optional-variance/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,285 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Covariant<out T> = { - x: T; -} -type Contravariant<in T> = { - f: (x: T) => void; -} -type Invariant<in out T> = { - f: (x: T) => T; -} -type T10<out T> = T; -type T11<in T> = keyof T; -type T12<out T, out K extends keyof T> = T[K]; -type T13<in out T> = T[keyof T]; - -type Covariant1<in T> = { - x: T; -} - -type Contravariant1<out T> = keyof T; - -type Contravariant2<out T> = { - f: (x: T) => void; -} - -type Invariant1<in T> = { - f: (x: T) => T; -} - -type Invariant2<out T> = { - f: (x: T) => T; -} -type Foo1<in T> = { - x: T; - f: FooFn1<T>; -} - -type Foo2<out T> = { - x: T; - f: FooFn2<T>; -} - -type Foo3<in out T> = { - x: T; - f: FooFn3<T>; -} - -type T21<in out T> = T; - -interface Baz<out T> {} -interface Baz<in T> {} - -interface Parent<out A> { - child: Child<A> | null; - parent: Parent<A> | null; -} - -declare class StateNode<TContext, in out TEvent extends { type: string }> { - _storedEvent: TEvent; - _action: ActionObject<TEvent>; - _state: StateNode<TContext, any>; -} - -=====================================output===================================== -type Covariant<out T> = { - x: T; -}; -type Contravariant<in T> = { - f: (x: T) => void; -}; -type Invariant<in out T> = { - f: (x: T) => T; -}; -type T10<out T> = T; -type T11<in T> = keyof T; -type T12<out T, out K extends keyof T> = T[K]; -type T13<in out T> = T[keyof T]; - -type Covariant1<in T> = { - x: T; -}; - -type Contravariant1<out T> = keyof T; - -type Contravariant2<out T> = { - f: (x: T) => void; -}; - -type Invariant1<in T> = { - f: (x: T) => T; -}; - -type Invariant2<out T> = { - f: (x: T) => T; -}; -type Foo1<in T> = { - x: T; - f: FooFn1<T>; -}; - -type Foo2<out T> = { - x: T; - f: FooFn2<T>; -}; - -type Foo3<in out T> = { - x: T; - f: FooFn3<T>; -}; - -type T21<in out T> = T; - -interface Baz<out T> {} -interface Baz<in T> {} - -interface Parent<out A> { - child: Child<A> | null; - parent: Parent<A> | null; -} - -declare class StateNode<TContext, in out TEvent extends { type: string }> { - _storedEvent: TEvent; - _action: ActionObject<TEvent>; - _state: StateNode<TContext, any>; -} - -================================================================================ -`; - -exports[`with-jsx.tsx [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// valid JSX -<in T>() => {}</in>; - -type Covariant<out T> = { - x: T; -} -type Contravariant<in T> = { - f: (x: T) => void; -} -type Invariant<in out T> = { - f: (x: T) => T; -} -type T10<out T> = T; -type T11<in T> = keyof T; -type T12<out T, out K extends keyof T> = T[K]; -type T13<in out T> = T[keyof T]; - -type Covariant1<in T> = { - x: T; -} - -type Contravariant1<out T> = keyof T; - -type Contravariant2<out T> = { - f: (x: T) => void; -} - -type Invariant1<in T> = { - f: (x: T) => T; -} - -type Invariant2<out T> = { - f: (x: T) => T; -} -type Foo1<in T> = { - x: T; - f: FooFn1<T>; -} - -type Foo2<out T> = { - x: T; - f: FooFn2<T>; -} - -type Foo3<in out T> = { - x: T; - f: FooFn3<T>; -} - -type T21<in out T> = T; - -interface Baz<out T> {} -interface Baz<in T> {} - -interface Parent<out A> { - child: Child<A> | null; - parent: Parent<A> | null; -} - -declare class StateNode<TContext, in out TEvent extends { type: string }> { - _storedEvent: TEvent; - _action: ActionObject<TEvent>; - _state: StateNode<TContext, any>; -} - -=====================================output===================================== -// valid JSX -<in T>() => {}</in>; - -type Covariant<out T> = { - x: T; -}; -type Contravariant<in T> = { - f: (x: T) => void; -}; -type Invariant<in out T> = { - f: (x: T) => T; -}; -type T10<out T> = T; -type T11<in T> = keyof T; -type T12<out T, out K extends keyof T> = T[K]; -type T13<in out T> = T[keyof T]; - -type Covariant1<in T> = { - x: T; -}; - -type Contravariant1<out T> = keyof T; - -type Contravariant2<out T> = { - f: (x: T) => void; -}; - -type Invariant1<in T> = { - f: (x: T) => T; -}; - -type Invariant2<out T> = { - f: (x: T) => T; -}; -type Foo1<in T> = { - x: T; - f: FooFn1<T>; -}; - -type Foo2<out T> = { - x: T; - f: FooFn2<T>; -}; - -type Foo3<in out T> = { - x: T; - f: FooFn3<T>; -}; - -type T21<in out T> = T; - -interface Baz<out T> {} -interface Baz<in T> {} - -interface Parent<out A> { - child: Child<A> | null; - parent: Parent<A> | null; -} - -declare class StateNode<TContext, in out TEvent extends { type: string }> { - _storedEvent: TEvent; - _action: ActionObject<TEvent>; - _state: StateNode<TContext, any>; -} - -================================================================================ -`; - -exports[`with-jsx.tsx [typescript] format 1`] = ` -"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (2:11) - 1 | // valid JSX -> 2 | <in T>() => {}</in>; - | ^ - 3 | - 4 | type Covariant<out T> = { - 5 | x: T;" -`; diff --git a/tests/format/typescript/optional-variance/format.test.js b/tests/format/typescript/optional-variance/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/optional-variance/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/optional-variance/jsfmt.spec.js b/tests/format/typescript/optional-variance/jsfmt.spec.js deleted file mode 100644 index a156e3b55d18..000000000000 --- a/tests/format/typescript/optional-variance/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { typescript: ["with-jsx.tsx"] }, -}); diff --git a/tests/format/typescript/optional-variance/with-jsx.tsx b/tests/format/typescript/optional-variance/with-jsx.tsx index bd14abc7a9e5..9210edb034ae 100644 --- a/tests/format/typescript/optional-variance/with-jsx.tsx +++ b/tests/format/typescript/optional-variance/with-jsx.tsx @@ -1,6 +1,3 @@ -// valid JSX -<in T>() => {}</in>; - type Covariant<out T> = { x: T; } diff --git a/tests/format/typescript/override-modifiers/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/override-modifiers/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/override-modifiers/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/override-modifiers/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/override-modifiers/format.test.js b/tests/format/typescript/override-modifiers/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/override-modifiers/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/override-modifiers/jsfmt.spec.js b/tests/format/typescript/override-modifiers/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/override-modifiers/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/predicate-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/predicate-types/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/predicate-types/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/predicate-types/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/predicate-types/format.test.js b/tests/format/typescript/predicate-types/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/predicate-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/predicate-types/jsfmt.spec.js b/tests/format/typescript/predicate-types/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/predicate-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/prettier-ignore/__snapshots__/format.test.js.snap b/tests/format/typescript/prettier-ignore/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..367e8cf4fc4a --- /dev/null +++ b/tests/format/typescript/prettier-ignore/__snapshots__/format.test.js.snap @@ -0,0 +1,260 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-14238.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const foo = ( + // prettier-ignore + bar as Baz +).qux; + +=====================================output===================================== +export const foo = // prettier-ignore +(bar as Baz).qux; + +================================================================================ +`; + +exports[`issue-16927.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = { + // prettier-ignore + [key: string]: bar; +}; + +=====================================output===================================== +type Foo = { + // prettier-ignore + [key: string]: bar; +}; + +================================================================================ +`; + +exports[`mapped-types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type a= { + // prettier-ignore + [A in B]: C | D + } + +type a= { + [ + // prettier-ignore + A in B + ]: C | D + } + +type a= { + [ + A in + // prettier-ignore + B + ]: C | D + } + +type a= { + [A in B]: + // prettier-ignore + C | D + } + +type a= { + [ + /* prettier-ignore */ + A in B + ]: C | D + } + +type a= { + [ + A in + /* prettier-ignore */ + B + ]: C | D + } + +type a= { + [A in B]: + /* prettier-ignore */ + C | D + } + + +type a= { + /* prettier-ignore */ [A in B]: C | D + } + +type a= { + [/* prettier-ignore */ A in B ]: C | D + } + +type a= { + [A in /* prettier-ignore */ B]: C | D + } + +type a= { + [A in B]: /* prettier-ignore */ C | D + } + +type a= { + /* prettier-ignore */ + [A in B]: C | D + } + +=====================================output===================================== +type a = { + // prettier-ignore + [A in B]: C | D + }; + +type a = { + [ + // prettier-ignore + A in B + ]: C | D + }; + +type a = { + [A in // prettier-ignore + B]: C | D; +}; + +type a = { + [A in B]: // prettier-ignore + C | D; +}; + +type a = { + [ + /* prettier-ignore */ + A in B + ]: C | D + }; + +type a = { + [A in /* prettier-ignore */ + B]: C | D; +}; + +type a = { + [A in B]: /* prettier-ignore */ + C | D; +}; + +type a = { + /* prettier-ignore */ [A in B]: C | D + }; + +type a = { + [/* prettier-ignore */ A in B ]: C | D + }; + +type a = { + [A in /* prettier-ignore */ B]: C | D; +}; + +type a = { + [A in B]: /* prettier-ignore */ C | D; +}; + +type a = { + /* prettier-ignore */ + [A in B]: C | D + }; + +================================================================================ +`; + +exports[`prettier-ignore-nested-unions.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type a = + // foo + | foo1&foo2 + // bar + | bar1&bar2 + // prettier-ignore + | ( + | aaaaaaaaaaaaa&1 + // b + | bbbbbbbbbbbbb&2 + ) + // baz + | baz1&baz2; + +export type b = + // foo + | foo1&foo2 + // bar + | bar1&bar2 + | ( + // prettier-ignore + | aaaaaaaaaaaaa&1 + // b + | bbbbbbbbbbbbb&2 + ) + // baz + | baz1&baz2; + +=====================================output===================================== +export type a = + // foo + | (foo1 & foo2) + // bar + | (bar1 & bar2) + // prettier-ignore + | (| aaaaaaaaaaaaa&1 + // b + | bbbbbbbbbbbbb&2) + // baz + | (baz1 & baz2); + +export type b = + // foo + | (foo1 & foo2) + // bar + | (bar1 & bar2) + // prettier-ignore + | (| aaaaaaaaaaaaa&1 + // b + | bbbbbbbbbbbbb&2) + // baz + | (baz1 & baz2); + +================================================================================ +`; + +exports[`prettier-ignore-parenthesized-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = + // prettier-ignore + ( + aa + ); + +=====================================output===================================== +type Foo = + // prettier-ignore + aa; + +================================================================================ +`; diff --git a/tests/format/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 60bdf3b3f3d5..000000000000 --- a/tests/format/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,140 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`mapped-types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type a= { - // prettier-ignore - [A in B]: C | D - } - -type a= { - [ - // prettier-ignore - A in B - ]: C | D - } - -type a= { - [ - A in - // prettier-ignore - B - ]: C | D - } - -type a= { - [A in B]: - // prettier-ignore - C | D - } - -type a= { - [ - /* prettier-ignore */ - A in B - ]: C | D - } - -type a= { - [ - A in - /* prettier-ignore */ - B - ]: C | D - } - -type a= { - [A in B]: - /* prettier-ignore */ - C | D - } - - -type a= { - /* prettier-ignore */ [A in B]: C | D - } - -type a= { - [/* prettier-ignore */ A in B ]: C | D - } - -type a= { - [A in /* prettier-ignore */ B]: C | D - } - -type a= { - [A in B]: /* prettier-ignore */ C | D - } - -type a= { - /* prettier-ignore */ - [A in B]: C | D - } - -=====================================output===================================== -type a = { - // prettier-ignore - [A in B]: C | D - }; - -type a = { - [ - // prettier-ignore - A in B - ]: C | D - }; - -type a = { - [A in // prettier-ignore - B]: C | D; -}; - -type a = { - [A in B]: // prettier-ignore - C | D; -}; - -type a = { - [ - /* prettier-ignore */ - A in B - ]: C | D - }; - -type a = { - [A in /* prettier-ignore */ - B]: C | D; -}; - -type a = { - [A in B]: /* prettier-ignore */ - C | D; -}; - -type a = { - /* prettier-ignore */ [A in B]: C | D - }; - -type a = { - [/* prettier-ignore */ A in B ]: C | D - }; - -type a = { - [A in /* prettier-ignore */ B]: C | D; -}; - -type a = { - [A in B /* prettier-ignore */]: C | D; -}; - -type a = { - /* prettier-ignore */ - [A in B]: C | D - }; - -================================================================================ -`; diff --git a/tests/format/typescript/prettier-ignore/format.test.js b/tests/format/typescript/prettier-ignore/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/prettier-ignore/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/prettier-ignore/issue-14238.ts b/tests/format/typescript/prettier-ignore/issue-14238.ts new file mode 100644 index 000000000000..4cdef795995f --- /dev/null +++ b/tests/format/typescript/prettier-ignore/issue-14238.ts @@ -0,0 +1,4 @@ +export const foo = ( + // prettier-ignore + bar as Baz +).qux; diff --git a/tests/format/typescript/prettier-ignore/issue-16927.ts b/tests/format/typescript/prettier-ignore/issue-16927.ts new file mode 100644 index 000000000000..1ec77ded62de --- /dev/null +++ b/tests/format/typescript/prettier-ignore/issue-16927.ts @@ -0,0 +1,4 @@ +type Foo = { + // prettier-ignore + [key: string]: bar; +}; diff --git a/tests/format/typescript/prettier-ignore/jsfmt.spec.js b/tests/format/typescript/prettier-ignore/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/prettier-ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/misc/typescript-babel-only/prettier-ignore-nested-unions.ts b/tests/format/typescript/prettier-ignore/prettier-ignore-nested-unions.ts similarity index 100% rename from tests/format/misc/typescript-babel-only/prettier-ignore-nested-unions.ts rename to tests/format/typescript/prettier-ignore/prettier-ignore-nested-unions.ts diff --git a/tests/format/misc/typescript-babel-only/prettier-ignore-parenthesized-type.ts b/tests/format/typescript/prettier-ignore/prettier-ignore-parenthesized-type.ts similarity index 100% rename from tests/format/misc/typescript-babel-only/prettier-ignore-parenthesized-type.ts rename to tests/format/typescript/prettier-ignore/prettier-ignore-parenthesized-type.ts diff --git a/tests/format/typescript/private-fields-in-in/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/private-fields-in-in/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/private-fields-in-in/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/private-fields-in-in/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/private-fields-in-in/format.test.js b/tests/format/typescript/private-fields-in-in/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/private-fields-in-in/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/private-fields-in-in/jsfmt.spec.js b/tests/format/typescript/private-fields-in-in/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/private-fields-in-in/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/quote-props/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/quote-props/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/quote-props/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/quote-props/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/quote-props/format.test.js b/tests/format/typescript/quote-props/format.test.js new file mode 100644 index 000000000000..c2884d5b0ae0 --- /dev/null +++ b/tests/format/typescript/quote-props/format.test.js @@ -0,0 +1,11 @@ +runFormatTest(import.meta, ["typescript"], { + quoteProps: "as-needed", +}); + +runFormatTest(import.meta, ["typescript"], { + quoteProps: "preserve", +}); + +runFormatTest(import.meta, ["typescript"], { + quoteProps: "consistent", +}); diff --git a/tests/format/typescript/quote-props/jsfmt.spec.js b/tests/format/typescript/quote-props/jsfmt.spec.js deleted file mode 100644 index c17eda737d71..000000000000 --- a/tests/format/typescript/quote-props/jsfmt.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -run_spec(__dirname, ["typescript"], { - quoteProps: "as-needed", -}); - -run_spec(__dirname, ["typescript"], { - quoteProps: "preserve", -}); - -run_spec(__dirname, ["typescript"], { - quoteProps: "consistent", -}); diff --git a/tests/format/typescript/range/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/range/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/range/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/range/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/range/format.test.js b/tests/format/typescript/range/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/range/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/range/jsfmt.spec.js b/tests/format/typescript/range/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/range/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/readonly/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/readonly/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/readonly/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/readonly/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/readonly/format.test.js b/tests/format/typescript/readonly/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/readonly/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/readonly/jsfmt.spec.js b/tests/format/typescript/readonly/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/readonly/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/rest-type/__snapshots__/format.test.js.snap b/tests/format/typescript/rest-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..81b0ea50e6df --- /dev/null +++ b/tests/format/typescript/rest-type/__snapshots__/format.test.js.snap @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`complex.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; + +=====================================output===================================== +type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; + +================================================================================ +`; + +exports[`infer-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never; + +// should remove parens from this, to avoid a type issue with TypeScript 4.0: +type Tail2<T extends any[]> = T extends [infer U, ...(infer R)] ? R : never; + +// but not remove parens from this: +type Tail3<T extends any[]> = T extends [infer U, ...(infer R)[]] ? R : never; + +type ReduceNextElement< + T extends readonly unknown[] +> = T extends readonly [infer V, ...infer R] ? [V, R] : never + +=====================================output===================================== +type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never; + +// should remove parens from this, to avoid a type issue with TypeScript 4.0: +type Tail2<T extends any[]> = T extends [infer U, ...infer R] ? R : never; + +// but not remove parens from this: +type Tail3<T extends any[]> = T extends [infer U, ...(infer R)[]] ? R : never; + +type ReduceNextElement<T extends readonly unknown[]> = T extends readonly [ + infer V, + ...infer R, +] + ? [V, R] + : never; + +================================================================================ +`; + +exports[`simple.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type X = [...number[]]; + +=====================================output===================================== +type X = [...number[]]; + +================================================================================ +`; diff --git a/tests/format/typescript/rest-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/rest-type/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 202a13072a7f..000000000000 --- a/tests/format/typescript/rest-type/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,66 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`complex.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; - -=====================================output===================================== -type TupleWithRest = [number, ...(1 extends 2 ? string[] : number[])]; - -================================================================================ -`; - -exports[`infer-type.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never; - -// should remove parens from this, to avoid a type issue with TypeScript 4.0: -type Tail2<T extends any[]> = T extends [infer U, ...(infer R)] ? R : never; - -// but not remove parens from this: -type Tail3<T extends any[]> = T extends [infer U, ...(infer R)[]] ? R : never; - -type ReduceNextElement< - T extends readonly unknown[] -> = T extends readonly [infer V, ...infer R] ? [V, R] : never - -=====================================output===================================== -type Tail<T extends any[]> = T extends [infer U, ...infer R] ? R : never; - -// should remove parens from this, to avoid a type issue with TypeScript 4.0: -type Tail2<T extends any[]> = T extends [infer U, ...infer R] ? R : never; - -// but not remove parens from this: -type Tail3<T extends any[]> = T extends [infer U, ...(infer R)[]] ? R : never; - -type ReduceNextElement<T extends readonly unknown[]> = T extends readonly [ - infer V, - ...infer R -] - ? [V, R] - : never; - -================================================================================ -`; - -exports[`simple.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type X = [...number[]]; - -=====================================output===================================== -type X = [...number[]]; - -================================================================================ -`; diff --git a/tests/format/typescript/rest-type/format.test.js b/tests/format/typescript/rest-type/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/rest-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/rest-type/jsfmt.spec.js b/tests/format/typescript/rest-type/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/rest-type/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/rest/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/rest/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/rest/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/rest/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/rest/format.test.js b/tests/format/typescript/rest/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/rest/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/rest/jsfmt.spec.js b/tests/format/typescript/rest/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/rest/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/satisfies-operators/__snapshots__/format.test.js.snap b/tests/format/typescript/satisfies-operators/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..0c3db9cd4565 --- /dev/null +++ b/tests/format/typescript/satisfies-operators/__snapshots__/format.test.js.snap @@ -0,0 +1,1299 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`argument-expansion.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const bar1 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([] satisfies unknown) satisfies number[]); + +const bar2 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([1, 2, 3] satisfies unknown) satisfies number[]); + +const bar3 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({} satisfies unknown) satisfies {[key: number]: boolean}); + +const bar4 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean}); + +const bar5 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, [] satisfies foo); + +=====================================output===================================== +const bar1 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value] + }, + [] satisfies unknown satisfies number[], +) + +const bar2 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value] + }, + [1, 2, 3] satisfies unknown satisfies number[], +) + +const bar3 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true } + }, + {} satisfies unknown satisfies { [key: number]: boolean }, +) + +const bar4 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true } + }, + { 1: true } satisfies unknown satisfies { [key: number]: boolean }, +) + +const bar5 = [1, 2, 3].reduce((carry, value) => { + return [...carry, value] +}, [] satisfies foo) + +================================================================================ +`; + +exports[`argument-expansion.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const bar1 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([] satisfies unknown) satisfies number[]); + +const bar2 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, ([1, 2, 3] satisfies unknown) satisfies number[]); + +const bar3 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({} satisfies unknown) satisfies {[key: number]: boolean}); + +const bar4 = [1,2,3].reduce((carry, value) => { + return {...carry, [value]: true}; +}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean}); + +const bar5 = [1,2,3].reduce((carry, value) => { + return [...carry, value]; +}, [] satisfies foo); + +=====================================output===================================== +const bar1 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + [] satisfies unknown satisfies number[], +); + +const bar2 = [1, 2, 3].reduce( + (carry, value) => { + return [...carry, value]; + }, + [1, 2, 3] satisfies unknown satisfies number[], +); + +const bar3 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + {} satisfies unknown satisfies { [key: number]: boolean }, +); + +const bar4 = [1, 2, 3].reduce( + (carry, value) => { + return { ...carry, [value]: true }; + }, + { 1: true } satisfies unknown satisfies { [key: number]: boolean }, +); + +const bar5 = [1, 2, 3].reduce((carry, value) => { + return [...carry, value]; +}, [] satisfies foo); + +================================================================================ +`; + +exports[`assignment.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) satisfies FieldService.RendererAttributes; + +const annotate = (angular.injector satisfies any).$$annotate satisfies ( + fn: Function +) => string[]; + +const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget, + propertyToServiceName = originalPrototype._inject; + +this.previewPlayerHandle = (setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews(); + this.currentPreviewIndex++; + } +}, this.refreshDelay) satisfies unknown) satisfies number; + +this.intervalID = (setInterval(() => { + self.step(); +}, 30) satisfies unknown) satisfies number; + +=====================================output===================================== +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) satisfies FieldService.RendererAttributes + +const annotate = (angular.injector satisfies any).$$annotate satisfies ( + fn: Function, +) => string[] + +const originalPrototype = originalConstructor.prototype satisfies TComponent & + InjectionTarget, + propertyToServiceName = originalPrototype._inject + +this.previewPlayerHandle = setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews() + this.currentPreviewIndex++ + } +}, this.refreshDelay) satisfies unknown satisfies number + +this.intervalID = setInterval(() => { + self.step() +}, 30) satisfies unknown satisfies number + +================================================================================ +`; + +exports[`assignment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) satisfies FieldService.RendererAttributes; + +const annotate = (angular.injector satisfies any).$$annotate satisfies ( + fn: Function +) => string[]; + +const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget, + propertyToServiceName = originalPrototype._inject; + +this.previewPlayerHandle = (setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews(); + this.currentPreviewIndex++; + } +}, this.refreshDelay) satisfies unknown) satisfies number; + +this.intervalID = (setInterval(() => { + self.step(); +}, 30) satisfies unknown) satisfies number; + +=====================================output===================================== +const extraRendererAttrs = ((attrs.rendererAttrs && + this.utils.safeParseJsonString(attrs.rendererAttrs)) || + Object.create(null)) satisfies FieldService.RendererAttributes; + +const annotate = (angular.injector satisfies any).$$annotate satisfies ( + fn: Function, +) => string[]; + +const originalPrototype = originalConstructor.prototype satisfies TComponent & + InjectionTarget, + propertyToServiceName = originalPrototype._inject; + +this.previewPlayerHandle = setInterval(async () => { + if (this.previewIsPlaying) { + await this.fetchNextPreviews(); + this.currentPreviewIndex++; + } +}, this.refreshDelay) satisfies unknown satisfies number; + +this.intervalID = setInterval(() => { + self.step(); +}, 30) satisfies unknown satisfies number; + +================================================================================ +`; + +exports[`basic.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const t1 = { a: 1 } satisfies I1; +const t2 = { a: 1, b: 1 } satisfies I1; +const t3 = { } satisfies I1; +const t4: T1 = { a: "a" } satisfies T1; +const t5 = (m => m.substring(0)) satisfies T2; +const t6 = [1, 2] satisfies [number, number]; +let t7 = { a: 'test' } satisfies A; +let t8 = { a: 'test', b: 'test' } satisfies A; + +const p = { + isEven: n => n % 2 === 0, + isOdd: n => n % 2 === 1 +} satisfies Predicates; + +let obj: { f(s: string): void } & Record<string, unknown> = { + f(s) { }, + g(s) { } +} satisfies { g(s: string): void } & Record<string, unknown>; + +({ f(x) { } }) satisfies { f(s: string): void }; + +const car = { + start() { }, + move(d) { + // d should be number + }, + stop() { } +} satisfies Movable & Record<string, unknown>; + +var v = undefined satisfies 1; + +=====================================output===================================== +const t1 = { a: 1 } satisfies I1 +const t2 = { a: 1, b: 1 } satisfies I1 +const t3 = {} satisfies I1 +const t4: T1 = { a: "a" } satisfies T1 +const t5 = ((m) => m.substring(0)) satisfies T2 +const t6 = [1, 2] satisfies [number, number] +let t7 = { a: "test" } satisfies A +let t8 = { a: "test", b: "test" } satisfies A + +const p = { + isEven: (n) => n % 2 === 0, + isOdd: (n) => n % 2 === 1, +} satisfies Predicates + +let obj: { f(s: string): void } & Record<string, unknown> = { + f(s) {}, + g(s) {}, +} satisfies { g(s: string): void } & Record<string, unknown> + +;({ f(x) {} }) satisfies { f(s: string): void } + +const car = { + start() {}, + move(d) { + // d should be number + }, + stop() {}, +} satisfies Movable & Record<string, unknown> + +var v = undefined satisfies 1 + +================================================================================ +`; + +exports[`basic.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const t1 = { a: 1 } satisfies I1; +const t2 = { a: 1, b: 1 } satisfies I1; +const t3 = { } satisfies I1; +const t4: T1 = { a: "a" } satisfies T1; +const t5 = (m => m.substring(0)) satisfies T2; +const t6 = [1, 2] satisfies [number, number]; +let t7 = { a: 'test' } satisfies A; +let t8 = { a: 'test', b: 'test' } satisfies A; + +const p = { + isEven: n => n % 2 === 0, + isOdd: n => n % 2 === 1 +} satisfies Predicates; + +let obj: { f(s: string): void } & Record<string, unknown> = { + f(s) { }, + g(s) { } +} satisfies { g(s: string): void } & Record<string, unknown>; + +({ f(x) { } }) satisfies { f(s: string): void }; + +const car = { + start() { }, + move(d) { + // d should be number + }, + stop() { } +} satisfies Movable & Record<string, unknown>; + +var v = undefined satisfies 1; + +=====================================output===================================== +const t1 = { a: 1 } satisfies I1; +const t2 = { a: 1, b: 1 } satisfies I1; +const t3 = {} satisfies I1; +const t4: T1 = { a: "a" } satisfies T1; +const t5 = ((m) => m.substring(0)) satisfies T2; +const t6 = [1, 2] satisfies [number, number]; +let t7 = { a: "test" } satisfies A; +let t8 = { a: "test", b: "test" } satisfies A; + +const p = { + isEven: (n) => n % 2 === 0, + isOdd: (n) => n % 2 === 1, +} satisfies Predicates; + +let obj: { f(s: string): void } & Record<string, unknown> = { + f(s) {}, + g(s) {}, +} satisfies { g(s: string): void } & Record<string, unknown>; + +({ f(x) {} }) satisfies { f(s: string): void }; + +const car = { + start() {}, + move(d) { + // d should be number + }, + stop() {}, +} satisfies Movable & Record<string, unknown>; + +var v = undefined satisfies 1; + +================================================================================ +`; + +exports[`comments.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const t2 = {} /* comment */ satisfies {}; +const t3 = {} satisfies /* comment */ {}; +const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; + +=====================================output===================================== +const t2 = {} /* comment */ satisfies {} +const t3 = {} satisfies /* comment */ {} +const t4 = {} /* comment1 */ satisfies /* comment2 */ {} + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const t2 = {} /* comment */ satisfies {}; +const t3 = {} satisfies /* comment */ {}; +const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; + +=====================================output===================================== +const t2 = {} /* comment */ satisfies {}; +const t3 = {} satisfies /* comment */ {}; +const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; + +================================================================================ +`; + +exports[`comments-unstable.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const t1 = { + prop1: 1, + prop2: 2, + prop3: 3 +} satisfies +// Comment +Record<string, number>; + +=====================================output===================================== +const t1 = { + prop1: 1, + prop2: 2, + prop3: 3, +} satisfies // Comment +Record<string, number> + +================================================================================ +`; + +exports[`comments-unstable.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const t1 = { + prop1: 1, + prop2: 2, + prop3: 3 +} satisfies +// Comment +Record<string, number>; + +=====================================output===================================== +const t1 = { + prop1: 1, + prop2: 2, + prop3: 3, +} satisfies // Comment +Record<string, number>; + +================================================================================ +`; + +exports[`export-default-as.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +export default (function log() {} satisfies typeof console.log) + +=====================================output===================================== +export default (function log() {} satisfies typeof console.log) + +================================================================================ +`; + +exports[`export-default-as.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export default (function log() {} satisfies typeof console.log) + +=====================================output===================================== +export default (function log() {} satisfies typeof console.log); + +================================================================================ +`; + +exports[`expression-statement.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== + +let type: 'foo' | 'bar' = 'foo'; + +// demonstrating how "satisfies" expression can be practically used as expression statement. +const _ = () => { +switch (type) { + case 'foo': + return 1; + case 'bar': + return 2; + default: + // exhaustiveness check idiom + (type) satisfies never; + throw new Error('unreachable'); +} +} + +function needParens() { +(let) satisfies unknown; +(interface) satisfies unknown; +(module) satisfies unknown; +(using) satisfies unknown; +(yield) satisfies unknown; +(await) satisfies unknown; +} + +function noNeedParens() { +async satisfies unknown; +satisfies satisfies unknown; +as satisfies unknown; + +abc satisfies unknown; // not a keyword +} + +function satisfiesChain() { +satisfies satisfies satisfies satisfies satisfies; +(type) satisfies never satisfies unknown; +} + +=====================================output===================================== +let type: "foo" | "bar" = "foo" + +// demonstrating how "satisfies" expression can be practically used as expression statement. +const _ = () => { + switch (type) { + case "foo": + return 1 + case "bar": + return 2 + default: + // exhaustiveness check idiom + ;(type) satisfies never + throw new Error("unreachable") + } +} + +function needParens() { + ;(let) satisfies unknown + ;(interface) satisfies unknown + ;(module) satisfies unknown + ;(using) satisfies unknown + ;(yield) satisfies unknown + ;(await) satisfies unknown +} + +function noNeedParens() { + async satisfies unknown + satisfies satisfies unknown + as satisfies unknown + + abc satisfies unknown // not a keyword +} + +function satisfiesChain() { + satisfies satisfies satisfies satisfies satisfies + ;(type) satisfies never satisfies unknown +} + +================================================================================ +`; + +exports[`expression-statement.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +let type: 'foo' | 'bar' = 'foo'; + +// demonstrating how "satisfies" expression can be practically used as expression statement. +const _ = () => { +switch (type) { + case 'foo': + return 1; + case 'bar': + return 2; + default: + // exhaustiveness check idiom + (type) satisfies never; + throw new Error('unreachable'); +} +} + +function needParens() { +(let) satisfies unknown; +(interface) satisfies unknown; +(module) satisfies unknown; +(using) satisfies unknown; +(yield) satisfies unknown; +(await) satisfies unknown; +} + +function noNeedParens() { +async satisfies unknown; +satisfies satisfies unknown; +as satisfies unknown; + +abc satisfies unknown; // not a keyword +} + +function satisfiesChain() { +satisfies satisfies satisfies satisfies satisfies; +(type) satisfies never satisfies unknown; +} + +=====================================output===================================== +let type: "foo" | "bar" = "foo"; + +// demonstrating how "satisfies" expression can be practically used as expression statement. +const _ = () => { + switch (type) { + case "foo": + return 1; + case "bar": + return 2; + default: + // exhaustiveness check idiom + (type) satisfies never; + throw new Error("unreachable"); + } +}; + +function needParens() { + (let) satisfies unknown; + (interface) satisfies unknown; + (module) satisfies unknown; + (using) satisfies unknown; + (yield) satisfies unknown; + (await) satisfies unknown; +} + +function noNeedParens() { + async satisfies unknown; + satisfies satisfies unknown; + as satisfies unknown; + + abc satisfies unknown; // not a keyword +} + +function satisfiesChain() { + satisfies satisfies satisfies satisfies satisfies; + (type) satisfies never satisfies unknown; +} + +================================================================================ +`; + +exports[`gt-lt.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +x satisfies boolean <= y; // (x satisfies boolean) <= y; +x satisfies boolean ?? y; // (x satisfies boolean) ?? y; + +=====================================output===================================== +;(x satisfies boolean) <= y // (x satisfies boolean) <= y; +;(x satisfies boolean) ?? y // (x satisfies boolean) ?? y; + +================================================================================ +`; + +exports[`gt-lt.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +x satisfies boolean <= y; // (x satisfies boolean) <= y; +x satisfies boolean ?? y; // (x satisfies boolean) ?? y; + +=====================================output===================================== +(x satisfies boolean) <= y; // (x satisfies boolean) <= y; +(x satisfies boolean) ?? y; // (x satisfies boolean) ?? y; + +================================================================================ +`; + +exports[`hug-args.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +window.postMessage( + { + context: item.context, + topic: item.topic + } satisfies IActionMessage + ); + +=====================================output===================================== +window.postMessage({ + context: item.context, + topic: item.topic, +} satisfies IActionMessage) + +================================================================================ +`; + +exports[`hug-args.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +window.postMessage( + { + context: item.context, + topic: item.topic + } satisfies IActionMessage + ); + +=====================================output===================================== +window.postMessage({ + context: item.context, + topic: item.topic, +} satisfies IActionMessage); + +================================================================================ +`; + +exports[`lhs.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +(a satisfies number) = 42; +({ a: (b satisfies any) = 2000 } = x); +(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined; +(this.configuration satisfies any) = (this.editor satisfies any) = (this + .editorBody satisfies any) = undefined; + +=====================================output===================================== +;(a satisfies number) = 42 +;({ a: (b satisfies any) = 2000 } = x) +;(this.selectorElem satisfies any) = + this.multiselectWidget = + this.initialValues = + undefined +;(this.configuration satisfies any) = + (this.editor satisfies any) = + (this.editorBody satisfies any) = + undefined + +================================================================================ +`; + +exports[`lhs.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(a satisfies number) = 42; +({ a: (b satisfies any) = 2000 } = x); +(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined; +(this.configuration satisfies any) = (this.editor satisfies any) = (this + .editorBody satisfies any) = undefined; + +=====================================output===================================== +(a satisfies number) = 42; +({ a: (b satisfies any) = 2000 } = x); +(this.selectorElem satisfies any) = + this.multiselectWidget = + this.initialValues = + undefined; +(this.configuration satisfies any) = + (this.editor satisfies any) = + (this.editorBody satisfies any) = + undefined; + +================================================================================ +`; + +exports[`nested-await-and-satisfies.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const getAccountCount = async () => + (await + ((await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) satisfies TreeItem + ).getChildren() + ).length + +=====================================output===================================== +const getAccountCount = async () => + ( + await ( + (await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) satisfies TreeItem + ).getChildren() + ).length + +================================================================================ +`; + +exports[`nested-await-and-satisfies.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const getAccountCount = async () => + (await + ((await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) satisfies TreeItem + ).getChildren() + ).length + +=====================================output===================================== +const getAccountCount = async () => + ( + await ( + (await ( + await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) + ).findItem("My bookmarks")) satisfies TreeItem + ).getChildren() + ).length; + +================================================================================ +`; + +exports[`non-null.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el satisfies HTMLElement)!.style.cursor = 'pointer' + +=====================================output===================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el satisfies HTMLElement)!.style.cursor = "pointer" + +================================================================================ +`; + +exports[`non-null.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref) +;(el satisfies HTMLElement)!.style.cursor = 'pointer' + +=====================================output===================================== +// the 2nd line needs ASI protection +const el = ReactDOM.findDOMNode(ref); +(el satisfies HTMLElement)!.style.cursor = "pointer"; + +================================================================================ +`; + +exports[`satisfies.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +({}) satisfies {}; +({}) satisfies X; +() => ({}) satisfies X; +this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); + +'current' in (props.pagination satisfies Object); +('current' in props.pagination) satisfies Object; +start + (yearSelectTotal satisfies number); +(start + yearSelectTotal) satisfies number; +scrollTop > (visibilityHeight satisfies number); +(scrollTop > visibilityHeight) satisfies number; +(bValue satisfies boolean) ? 0 : -1; + +async function g1() { + const test = (await 'foo') satisfies number; +} + +var x = (v => v) satisfies (x: number) => string; + +foo satisfies unknown satisfies Bar; +foo satisfies unknown as Bar; +foo as unknown satisfies Bar; + +=====================================output===================================== +;({}) satisfies {} +;({}) satisfies X +;() => ({}) satisfies X +this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement) + +"current" in (props.pagination satisfies Object) +;("current" in props.pagination) satisfies Object +start + (yearSelectTotal satisfies number) +;(start + yearSelectTotal) satisfies number +scrollTop > (visibilityHeight satisfies number) +;(scrollTop > visibilityHeight) satisfies number +;(bValue satisfies boolean) ? 0 : -1 + +async function g1() { + const test = (await "foo") satisfies number +} + +var x = ((v) => v) satisfies (x: number) => string + +foo satisfies unknown satisfies Bar +foo satisfies unknown as Bar +foo as unknown satisfies Bar + +================================================================================ +`; + +exports[`satisfies.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +({}) satisfies {}; +({}) satisfies X; +() => ({}) satisfies X; +this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); + +'current' in (props.pagination satisfies Object); +('current' in props.pagination) satisfies Object; +start + (yearSelectTotal satisfies number); +(start + yearSelectTotal) satisfies number; +scrollTop > (visibilityHeight satisfies number); +(scrollTop > visibilityHeight) satisfies number; +(bValue satisfies boolean) ? 0 : -1; + +async function g1() { + const test = (await 'foo') satisfies number; +} + +var x = (v => v) satisfies (x: number) => string; + +foo satisfies unknown satisfies Bar; +foo satisfies unknown as Bar; +foo as unknown satisfies Bar; + +=====================================output===================================== +({}) satisfies {}; +({}) satisfies X; +() => ({}) satisfies X; +this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); + +"current" in (props.pagination satisfies Object); +("current" in props.pagination) satisfies Object; +start + (yearSelectTotal satisfies number); +(start + yearSelectTotal) satisfies number; +scrollTop > (visibilityHeight satisfies number); +(scrollTop > visibilityHeight) satisfies number; +(bValue satisfies boolean) ? 0 : -1; + +async function g1() { + const test = (await "foo") satisfies number; +} + +var x = ((v) => v) satisfies (x: number) => string; + +foo satisfies unknown satisfies Bar; +foo satisfies unknown as Bar; +foo as unknown satisfies Bar; + +================================================================================ +`; + +exports[`template-literal.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +const a = \`\${(foo + bar) satisfies baz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\`; +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\`; +const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; + +=====================================output===================================== +const a = \`\${(foo + bar) satisfies baz}\` +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\` +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\` +const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\` +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\` + +================================================================================ +`; + +exports[`template-literal.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = \`\${(foo + bar) satisfies baz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\`; +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\`; +const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; + +=====================================output===================================== +const a = \`\${(foo + bar) satisfies baz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\`; +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\`; +const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; + +================================================================================ +`; + +exports[`ternary.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; + +foo = (condition ? firstValue : secondValue) satisfies SomeType; + +const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; + +function foo() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; +} + +function foo() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; +} + +function foo() { + void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo); +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +=====================================output===================================== +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) satisfies Fooooooooooo + +foo = (condition ? firstValue : secondValue) satisfies SomeType + +const foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) satisfies Fooooooooooo + +function foo() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo +} + +function foo() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo +} + +function foo() { + void (( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo) +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay) + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay) + +================================================================================ +`; + +exports[`ternary.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; + +foo = (condition ? firstValue : secondValue) satisfies SomeType; + +const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; + +function foo() { + return (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; +} + +function foo() { + throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; +} + +function foo() { + void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo); +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +=====================================output===================================== +foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) satisfies Fooooooooooo; + +foo = (condition ? firstValue : secondValue) satisfies SomeType; + +const foo = ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz +) satisfies Fooooooooooo; + +function foo() { + return ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo; +} + +function foo() { + throw ( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo; +} + +function foo() { + void (( + coooooooooooooooooooooooooooooooooooooooooooooooooooond + ? baaaaaaaaaaaaaaaaaaaaar + : baaaaaaaaaaaaaaaaaaaaaz + ) satisfies Fooooooooooo); +} + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +bifornCringerMoshedPerplexSawder = + askTrovenaBeenaDependsRowans + + ((glimseGlyphsHazardNoopsTieTie === 0 && + kochabCooieGameOnOboleUnweave === Math.PI + ? averredBathersBoxroomBuggyNurl + : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); + +================================================================================ +`; + +exports[`types-comments.ts - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +(() => { + // swallow error and fallback to using directory as path +}) satisfies string[]; + +=====================================output===================================== +;(() => { + // swallow error and fallback to using directory as path +}) satisfies string[] + +================================================================================ +`; + +exports[`types-comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(() => { + // swallow error and fallback to using directory as path +}) satisfies string[]; + +=====================================output===================================== +(() => { + // swallow error and fallback to using directory as path +}) satisfies string[]; + +================================================================================ +`; diff --git a/tests/format/typescript/satisfies-operators/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/satisfies-operators/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 18ab6ef363fe..000000000000 --- a/tests/format/typescript/satisfies-operators/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1130 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`argument-expansion.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const bar1 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([] satisfies unknown) satisfies number[]); - -const bar2 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([1, 2, 3] satisfies unknown) satisfies number[]); - -const bar3 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({} satisfies unknown) satisfies {[key: number]: boolean}); - -const bar4 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean}); - -const bar5 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, [] satisfies foo); - -=====================================output===================================== -const bar1 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value] -}, [] satisfies unknown satisfies number[]) - -const bar2 = [1, 2, 3].reduce( - (carry, value) => { - return [...carry, value] - }, - [1, 2, 3] satisfies unknown satisfies number[] -) - -const bar3 = [1, 2, 3].reduce((carry, value) => { - return { ...carry, [value]: true } -}, {} satisfies unknown satisfies { [key: number]: boolean }) - -const bar4 = [1, 2, 3].reduce( - (carry, value) => { - return { ...carry, [value]: true } - }, - { 1: true } satisfies unknown satisfies { [key: number]: boolean } -) - -const bar5 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value] -}, [] satisfies foo) - -================================================================================ -`; - -exports[`argument-expansion.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const bar1 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([] satisfies unknown) satisfies number[]); - -const bar2 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, ([1, 2, 3] satisfies unknown) satisfies number[]); - -const bar3 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({} satisfies unknown) satisfies {[key: number]: boolean}); - -const bar4 = [1,2,3].reduce((carry, value) => { - return {...carry, [value]: true}; -}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean}); - -const bar5 = [1,2,3].reduce((carry, value) => { - return [...carry, value]; -}, [] satisfies foo); - -=====================================output===================================== -const bar1 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value]; -}, [] satisfies unknown satisfies number[]); - -const bar2 = [1, 2, 3].reduce( - (carry, value) => { - return [...carry, value]; - }, - [1, 2, 3] satisfies unknown satisfies number[] -); - -const bar3 = [1, 2, 3].reduce((carry, value) => { - return { ...carry, [value]: true }; -}, {} satisfies unknown satisfies { [key: number]: boolean }); - -const bar4 = [1, 2, 3].reduce( - (carry, value) => { - return { ...carry, [value]: true }; - }, - { 1: true } satisfies unknown satisfies { [key: number]: boolean } -); - -const bar5 = [1, 2, 3].reduce((carry, value) => { - return [...carry, value]; -}, [] satisfies foo); - -================================================================================ -`; - -exports[`assignment.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) satisfies FieldService.RendererAttributes; - -const annotate = (angular.injector satisfies any).$$annotate satisfies ( - fn: Function -) => string[]; - -const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget, - propertyToServiceName = originalPrototype._inject; - -this.previewPlayerHandle = (setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews(); - this.currentPreviewIndex++; - } -}, this.refreshDelay) satisfies unknown) satisfies number; - -this.intervalID = (setInterval(() => { - self.step(); -}, 30) satisfies unknown) satisfies number; - -=====================================output===================================== -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) satisfies FieldService.RendererAttributes - -const annotate = (angular.injector satisfies any).$$annotate satisfies ( - fn: Function -) => string[] - -const originalPrototype = originalConstructor.prototype satisfies TComponent & - InjectionTarget, - propertyToServiceName = originalPrototype._inject - -this.previewPlayerHandle = setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews() - this.currentPreviewIndex++ - } -}, this.refreshDelay) satisfies unknown satisfies number - -this.intervalID = setInterval(() => { - self.step() -}, 30) satisfies unknown satisfies number - -================================================================================ -`; - -exports[`assignment.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) satisfies FieldService.RendererAttributes; - -const annotate = (angular.injector satisfies any).$$annotate satisfies ( - fn: Function -) => string[]; - -const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget, - propertyToServiceName = originalPrototype._inject; - -this.previewPlayerHandle = (setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews(); - this.currentPreviewIndex++; - } -}, this.refreshDelay) satisfies unknown) satisfies number; - -this.intervalID = (setInterval(() => { - self.step(); -}, 30) satisfies unknown) satisfies number; - -=====================================output===================================== -const extraRendererAttrs = ((attrs.rendererAttrs && - this.utils.safeParseJsonString(attrs.rendererAttrs)) || - Object.create(null)) satisfies FieldService.RendererAttributes; - -const annotate = (angular.injector satisfies any).$$annotate satisfies ( - fn: Function -) => string[]; - -const originalPrototype = originalConstructor.prototype satisfies TComponent & - InjectionTarget, - propertyToServiceName = originalPrototype._inject; - -this.previewPlayerHandle = setInterval(async () => { - if (this.previewIsPlaying) { - await this.fetchNextPreviews(); - this.currentPreviewIndex++; - } -}, this.refreshDelay) satisfies unknown satisfies number; - -this.intervalID = setInterval(() => { - self.step(); -}, 30) satisfies unknown satisfies number; - -================================================================================ -`; - -exports[`basic.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const t1 = { a: 1 } satisfies I1; -const t2 = { a: 1, b: 1 } satisfies I1; -const t3 = { } satisfies I1; -const t4: T1 = { a: "a" } satisfies T1; -const t5 = (m => m.substring(0)) satisfies T2; -const t6 = [1, 2] satisfies [number, number]; -let t7 = { a: 'test' } satisfies A; -let t8 = { a: 'test', b: 'test' } satisfies A; - -const p = { - isEven: n => n % 2 === 0, - isOdd: n => n % 2 === 1 -} satisfies Predicates; - -let obj: { f(s: string): void } & Record<string, unknown> = { - f(s) { }, - g(s) { } -} satisfies { g(s: string): void } & Record<string, unknown>; - -({ f(x) { } }) satisfies { f(s: string): void }; - -const car = { - start() { }, - move(d) { - // d should be number - }, - stop() { } -} satisfies Movable & Record<string, unknown>; - -var v = undefined satisfies 1; - -=====================================output===================================== -const t1 = { a: 1 } satisfies I1 -const t2 = { a: 1, b: 1 } satisfies I1 -const t3 = {} satisfies I1 -const t4: T1 = { a: "a" } satisfies T1 -const t5 = ((m) => m.substring(0)) satisfies T2 -const t6 = [1, 2] satisfies [number, number] -let t7 = { a: "test" } satisfies A -let t8 = { a: "test", b: "test" } satisfies A - -const p = { - isEven: (n) => n % 2 === 0, - isOdd: (n) => n % 2 === 1, -} satisfies Predicates - -let obj: { f(s: string): void } & Record<string, unknown> = { - f(s) {}, - g(s) {}, -} satisfies { g(s: string): void } & Record<string, unknown> - -;({ f(x) {} }) satisfies { f(s: string): void } - -const car = { - start() {}, - move(d) { - // d should be number - }, - stop() {}, -} satisfies Movable & Record<string, unknown> - -var v = undefined satisfies 1 - -================================================================================ -`; - -exports[`basic.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const t1 = { a: 1 } satisfies I1; -const t2 = { a: 1, b: 1 } satisfies I1; -const t3 = { } satisfies I1; -const t4: T1 = { a: "a" } satisfies T1; -const t5 = (m => m.substring(0)) satisfies T2; -const t6 = [1, 2] satisfies [number, number]; -let t7 = { a: 'test' } satisfies A; -let t8 = { a: 'test', b: 'test' } satisfies A; - -const p = { - isEven: n => n % 2 === 0, - isOdd: n => n % 2 === 1 -} satisfies Predicates; - -let obj: { f(s: string): void } & Record<string, unknown> = { - f(s) { }, - g(s) { } -} satisfies { g(s: string): void } & Record<string, unknown>; - -({ f(x) { } }) satisfies { f(s: string): void }; - -const car = { - start() { }, - move(d) { - // d should be number - }, - stop() { } -} satisfies Movable & Record<string, unknown>; - -var v = undefined satisfies 1; - -=====================================output===================================== -const t1 = { a: 1 } satisfies I1; -const t2 = { a: 1, b: 1 } satisfies I1; -const t3 = {} satisfies I1; -const t4: T1 = { a: "a" } satisfies T1; -const t5 = ((m) => m.substring(0)) satisfies T2; -const t6 = [1, 2] satisfies [number, number]; -let t7 = { a: "test" } satisfies A; -let t8 = { a: "test", b: "test" } satisfies A; - -const p = { - isEven: (n) => n % 2 === 0, - isOdd: (n) => n % 2 === 1, -} satisfies Predicates; - -let obj: { f(s: string): void } & Record<string, unknown> = { - f(s) {}, - g(s) {}, -} satisfies { g(s: string): void } & Record<string, unknown>; - -({ f(x) {} }) satisfies { f(s: string): void }; - -const car = { - start() {}, - move(d) { - // d should be number - }, - stop() {}, -} satisfies Movable & Record<string, unknown>; - -var v = undefined satisfies 1; - -================================================================================ -`; - -exports[`comments.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const t2 = {} /* comment */ satisfies {}; -const t3 = {} satisfies /* comment */ {}; -const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; - -=====================================output===================================== -const t2 = {} /* comment */ satisfies {} -const t3 = {} satisfies /* comment */ {} -const t4 = {} /* comment1 */ satisfies /* comment2 */ {} - -================================================================================ -`; - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const t2 = {} /* comment */ satisfies {}; -const t3 = {} satisfies /* comment */ {}; -const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; - -=====================================output===================================== -const t2 = {} /* comment */ satisfies {}; -const t3 = {} satisfies /* comment */ {}; -const t4 = {} /* comment1 */ satisfies /* comment2 */ {}; - -================================================================================ -`; - -exports[`comments-unstable.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const t1 = { - prop1: 1, - prop2: 2, - prop3: 3 -} satisfies -// Comment -Record<string, number>; - -=====================================output===================================== -const t1 = { - prop1: 1, - prop2: 2, - prop3: 3, -} satisfies // Comment -Record<string, number> - -================================================================================ -`; - -exports[`comments-unstable.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const t1 = { - prop1: 1, - prop2: 2, - prop3: 3 -} satisfies -// Comment -Record<string, number>; - -=====================================output===================================== -const t1 = { - prop1: 1, - prop2: 2, - prop3: 3, -} satisfies // Comment -Record<string, number>; - -================================================================================ -`; - -exports[`export-default-as.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -export default (function log() {} satisfies typeof console.log) - -=====================================output===================================== -export default (function log() {} satisfies typeof console.log) - -================================================================================ -`; - -exports[`export-default-as.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export default (function log() {} satisfies typeof console.log) - -=====================================output===================================== -export default (function log() {} satisfies typeof console.log); - -================================================================================ -`; - -exports[`gt-lt.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -x satisfies boolean <= y; // (x satisfies boolean) <= y; -x satisfies boolean ?? y; // (x satisfies boolean) ?? y; - -=====================================output===================================== -;(x satisfies boolean) <= y // (x satisfies boolean) <= y; -;(x satisfies boolean) ?? y // (x satisfies boolean) ?? y; - -================================================================================ -`; - -exports[`gt-lt.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -x satisfies boolean <= y; // (x satisfies boolean) <= y; -x satisfies boolean ?? y; // (x satisfies boolean) ?? y; - -=====================================output===================================== -(x satisfies boolean) <= y; // (x satisfies boolean) <= y; -(x satisfies boolean) ?? y; // (x satisfies boolean) ?? y; - -================================================================================ -`; - -exports[`hug-args.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -window.postMessage( - { - context: item.context, - topic: item.topic - } satisfies IActionMessage - ); - -=====================================output===================================== -window.postMessage({ - context: item.context, - topic: item.topic, -} satisfies IActionMessage) - -================================================================================ -`; - -exports[`hug-args.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -window.postMessage( - { - context: item.context, - topic: item.topic - } satisfies IActionMessage - ); - -=====================================output===================================== -window.postMessage({ - context: item.context, - topic: item.topic, -} satisfies IActionMessage); - -================================================================================ -`; - -exports[`lhs.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -(a satisfies number) = 42; -({ a: (b satisfies any) = 2000 } = x); -(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined; -(this.configuration satisfies any) = (this.editor satisfies any) = (this - .editorBody satisfies any) = undefined; - -=====================================output===================================== -;(a satisfies number) = 42 -;({ a: (b satisfies any) = 2000 } = x) -;(this.selectorElem satisfies any) = - this.multiselectWidget = - this.initialValues = - undefined -;(this.configuration satisfies any) = - (this.editor satisfies any) = - (this.editorBody satisfies any) = - undefined - -================================================================================ -`; - -exports[`lhs.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(a satisfies number) = 42; -({ a: (b satisfies any) = 2000 } = x); -(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined; -(this.configuration satisfies any) = (this.editor satisfies any) = (this - .editorBody satisfies any) = undefined; - -=====================================output===================================== -(a satisfies number) = 42; -({ a: (b satisfies any) = 2000 } = x); -(this.selectorElem satisfies any) = - this.multiselectWidget = - this.initialValues = - undefined; -(this.configuration satisfies any) = - (this.editor satisfies any) = - (this.editorBody satisfies any) = - undefined; - -================================================================================ -`; - -exports[`nested-await-and-satisfies.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const getAccountCount = async () => - (await - ((await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) satisfies TreeItem - ).getChildren() - ).length - -=====================================output===================================== -const getAccountCount = async () => - ( - await ( - (await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) satisfies TreeItem - ).getChildren() - ).length - -================================================================================ -`; - -exports[`nested-await-and-satisfies.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const getAccountCount = async () => - (await - ((await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) satisfies TreeItem - ).getChildren() - ).length - -=====================================output===================================== -const getAccountCount = async () => - ( - await ( - (await ( - await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME) - ).findItem("My bookmarks")) satisfies TreeItem - ).getChildren() - ).length; - -================================================================================ -`; - -exports[`non-null.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el satisfies HTMLElement)!.style.cursor = 'pointer' - -=====================================output===================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el satisfies HTMLElement)!.style.cursor = "pointer" - -================================================================================ -`; - -exports[`non-null.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref) -;(el satisfies HTMLElement)!.style.cursor = 'pointer' - -=====================================output===================================== -// the 2nd line needs ASI protection -const el = ReactDOM.findDOMNode(ref); -(el satisfies HTMLElement)!.style.cursor = "pointer"; - -================================================================================ -`; - -exports[`satisfies.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -({}) satisfies {}; -({}) satisfies X; -() => ({}) satisfies X; -this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); - -'current' in (props.pagination satisfies Object); -('current' in props.pagination) satisfies Object; -start + (yearSelectTotal satisfies number); -(start + yearSelectTotal) satisfies number; -scrollTop > (visibilityHeight satisfies number); -(scrollTop > visibilityHeight) satisfies number; -(bValue satisfies boolean) ? 0 : -1; - -async function g1() { - const test = (await 'foo') satisfies number; -} - -var x = (v => v) satisfies (x: number) => string; - -foo satisfies unknown satisfies Bar; -foo satisfies unknown as Bar; -foo as unknown satisfies Bar; - -=====================================output===================================== -;({}) satisfies {} -;({}) satisfies X -;() => ({} satisfies X) -this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement) - -"current" in (props.pagination satisfies Object) -;("current" in props.pagination) satisfies Object -start + (yearSelectTotal satisfies number) -;(start + yearSelectTotal) satisfies number -scrollTop > (visibilityHeight satisfies number) -;(scrollTop > visibilityHeight) satisfies number -;(bValue satisfies boolean) ? 0 : -1 - -async function g1() { - const test = (await "foo") satisfies number -} - -var x = ((v) => v) satisfies (x: number) => string - -foo satisfies unknown satisfies Bar -foo satisfies unknown as Bar -foo as unknown satisfies Bar - -================================================================================ -`; - -exports[`satisfies.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -({}) satisfies {}; -({}) satisfies X; -() => ({}) satisfies X; -this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); - -'current' in (props.pagination satisfies Object); -('current' in props.pagination) satisfies Object; -start + (yearSelectTotal satisfies number); -(start + yearSelectTotal) satisfies number; -scrollTop > (visibilityHeight satisfies number); -(scrollTop > visibilityHeight) satisfies number; -(bValue satisfies boolean) ? 0 : -1; - -async function g1() { - const test = (await 'foo') satisfies number; -} - -var x = (v => v) satisfies (x: number) => string; - -foo satisfies unknown satisfies Bar; -foo satisfies unknown as Bar; -foo as unknown satisfies Bar; - -=====================================output===================================== -({}) satisfies {}; -({}) satisfies X; -() => ({} satisfies X); -this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement); - -"current" in (props.pagination satisfies Object); -("current" in props.pagination) satisfies Object; -start + (yearSelectTotal satisfies number); -(start + yearSelectTotal) satisfies number; -scrollTop > (visibilityHeight satisfies number); -(scrollTop > visibilityHeight) satisfies number; -(bValue satisfies boolean) ? 0 : -1; - -async function g1() { - const test = (await "foo") satisfies number; -} - -var x = ((v) => v) satisfies (x: number) => string; - -foo satisfies unknown satisfies Bar; -foo satisfies unknown as Bar; -foo as unknown satisfies Bar; - -================================================================================ -`; - -exports[`template-literal.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -const a = \`\${(foo + bar) satisfies baz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\`; -const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\`; -const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; - -=====================================output===================================== -const a = \`\${(foo + bar) satisfies baz}\` -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz -}\` -const b = \`\${ - (foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz -}\` -const b = \`\${ - (foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\` -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\` - -================================================================================ -`; - -exports[`template-literal.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = \`\${(foo + bar) satisfies baz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}\`; -const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}\`; -const b = \`\${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; - -=====================================output===================================== -const a = \`\${(foo + bar) satisfies baz}\`; -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz -}\`; -const b = \`\${ - (foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz -}\`; -const b = \`\${ - (foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\`; -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\`; - -================================================================================ -`; - -exports[`ternary.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; - -foo = (condition ? firstValue : secondValue) satisfies SomeType; - -const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; - -function foo() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; -} - -function foo() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; -} - -function foo() { - void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo); -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -=====================================output===================================== -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) satisfies Fooooooooooo - -foo = (condition ? firstValue : secondValue) satisfies SomeType - -const foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) satisfies Fooooooooooo - -function foo() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo -} - -function foo() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo -} - -function foo() { - void (( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo) -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay) - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay) - -================================================================================ -`; - -exports[`ternary.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; - -foo = (condition ? firstValue : secondValue) satisfies SomeType; - -const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; - -function foo() { - return (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; -} - -function foo() { - throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo; -} - -function foo() { - void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo); -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -=====================================output===================================== -foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) satisfies Fooooooooooo; - -foo = (condition ? firstValue : secondValue) satisfies SomeType; - -const foo = ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz -) satisfies Fooooooooooo; - -function foo() { - return ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo; -} - -function foo() { - throw ( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo; -} - -function foo() { - void (( - coooooooooooooooooooooooooooooooooooooooooooooooooooond - ? baaaaaaaaaaaaaaaaaaaaar - : baaaaaaaaaaaaaaaaaaaaaz - ) satisfies Fooooooooooo); -} - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -bifornCringerMoshedPerplexSawder = - askTrovenaBeenaDependsRowans + - ((glimseGlyphsHazardNoopsTieTie === 0 && - kochabCooieGameOnOboleUnweave === Math.PI - ? averredBathersBoxroomBuggyNurl - : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay); - -================================================================================ -`; - -exports[`types-comments.ts - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -(() => { - // swallow error and fallback to using directory as path -}) satisfies string[]; - -=====================================output===================================== -;(() => { - // swallow error and fallback to using directory as path -}) satisfies string[] - -================================================================================ -`; - -exports[`types-comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(() => { - // swallow error and fallback to using directory as path -}) satisfies string[]; - -=====================================output===================================== -(() => { - // swallow error and fallback to using directory as path -}) satisfies string[]; - -================================================================================ -`; diff --git a/tests/format/typescript/satisfies-operators/expression-statement.ts b/tests/format/typescript/satisfies-operators/expression-statement.ts new file mode 100644 index 000000000000..bf9a9845abd0 --- /dev/null +++ b/tests/format/typescript/satisfies-operators/expression-statement.ts @@ -0,0 +1,38 @@ + +let type: 'foo' | 'bar' = 'foo'; + +// demonstrating how "satisfies" expression can be practically used as expression statement. +const _ = () => { +switch (type) { + case 'foo': + return 1; + case 'bar': + return 2; + default: + // exhaustiveness check idiom + (type) satisfies never; + throw new Error('unreachable'); +} +} + +function needParens() { +(let) satisfies unknown; +(interface) satisfies unknown; +(module) satisfies unknown; +(using) satisfies unknown; +(yield) satisfies unknown; +(await) satisfies unknown; +} + +function noNeedParens() { +async satisfies unknown; +satisfies satisfies unknown; +as satisfies unknown; + +abc satisfies unknown; // not a keyword +} + +function satisfiesChain() { +satisfies satisfies satisfies satisfies satisfies; +(type) satisfies never satisfies unknown; +} diff --git a/tests/format/typescript/satisfies-operators/format.test.js b/tests/format/typescript/satisfies-operators/format.test.js new file mode 100644 index 000000000000..ca21c10853c1 --- /dev/null +++ b/tests/format/typescript/satisfies-operators/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["typescript"]); +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/satisfies-operators/jsfmt.spec.js b/tests/format/typescript/satisfies-operators/jsfmt.spec.js deleted file mode 100644 index ba52aeb62efa..000000000000 --- a/tests/format/typescript/satisfies-operators/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/semi/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/semi/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/semi/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/semi/format.test.js b/tests/format/typescript/semi/format.test.js new file mode 100644 index 000000000000..f0c848e5a9fe --- /dev/null +++ b/tests/format/typescript/semi/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/semi/jsfmt.spec.js b/tests/format/typescript/semi/jsfmt.spec.js deleted file mode 100644 index 4ec9f897e85f..000000000000 --- a/tests/format/typescript/semi/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"], { semi: false }); diff --git a/tests/format/typescript/static-blocks/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/static-blocks/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/static-blocks/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/static-blocks/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/static-blocks/format.test.js b/tests/format/typescript/static-blocks/format.test.js new file mode 100644 index 000000000000..d9c10157d5dc --- /dev/null +++ b/tests/format/typescript/static-blocks/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "babel-ts"]); diff --git a/tests/format/typescript/static-blocks/jsfmt.spec.js b/tests/format/typescript/static-blocks/jsfmt.spec.js deleted file mode 100644 index aff59cd2fbce..000000000000 --- a/tests/format/typescript/static-blocks/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "babel-ts"]); diff --git a/tests/format/typescript/symbol/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/symbol/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/symbol/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/symbol/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/symbol/format.test.js b/tests/format/typescript/symbol/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/symbol/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/symbol/jsfmt.spec.js b/tests/format/typescript/symbol/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/symbol/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/template-literal-types/__snapshots__/format.test.js.snap b/tests/format/typescript/template-literal-types/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1f2d3a8f1add --- /dev/null +++ b/tests/format/typescript/template-literal-types/__snapshots__/format.test.js.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`template-literal-types.ts format 1`] = ` +====================================options===================================== +parsers: ["babel-ts", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +let x: \`foo-\${infer bar}\`; +type HelloWorld = \`\${Hello}, \${World}\` +type SeussFish = \`\${Quantity | Color} fish\`; +declare function setAlignment(value: \`\${VerticalAlignment}-\${HorizontalAlignment}\`): void; +type PropEventSource<T> = { + on(eventName: \`\${string & keyof T}Changed\`, callback: () => void): void; +}; +type PropEventSource<T> = { + on<K extends string & keyof T> + (eventName: \`\${K}Changed\`, callback: (newValue: T[K]) => void ): void; +}; + +=====================================output===================================== +let x: \`foo-\${infer bar}\`; +type HelloWorld = \`\${Hello}, \${World}\`; +type SeussFish = \`\${Quantity | Color} fish\`; +declare function setAlignment( + value: \`\${VerticalAlignment}-\${HorizontalAlignment}\`, +): void; +type PropEventSource<T> = { + on(eventName: \`\${string & keyof T}Changed\`, callback: () => void): void; +}; +type PropEventSource<T> = { + on<K extends string & keyof T>( + eventName: \`\${K}Changed\`, + callback: (newValue: T[K]) => void, + ): void; +}; + +================================================================================ +`; diff --git a/tests/format/typescript/template-literal-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/template-literal-types/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8c44481543a2..000000000000 --- a/tests/format/typescript/template-literal-types/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,39 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`template-literal-types.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts", "typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -let x: \`foo-\${infer bar}\`; -type HelloWorld = \`\${Hello}, \${World}\` -type SeussFish = \`\${Quantity | Color} fish\`; -declare function setAlignment(value: \`\${VerticalAlignment}-\${HorizontalAlignment}\`): void; -type PropEventSource<T> = { - on(eventName: \`\${string & keyof T}Changed\`, callback: () => void): void; -}; -type PropEventSource<T> = { - on<K extends string & keyof T> - (eventName: \`\${K}Changed\`, callback: (newValue: T[K]) => void ): void; -}; - -=====================================output===================================== -let x: \`foo-\${infer bar}\`; -type HelloWorld = \`\${Hello}, \${World}\`; -type SeussFish = \`\${Quantity | Color} fish\`; -declare function setAlignment( - value: \`\${VerticalAlignment}-\${HorizontalAlignment}\` -): void; -type PropEventSource<T> = { - on(eventName: \`\${string & keyof T}Changed\`, callback: () => void): void; -}; -type PropEventSource<T> = { - on<K extends string & keyof T>( - eventName: \`\${K}Changed\`, - callback: (newValue: T[K]) => void - ): void; -}; - -================================================================================ -`; diff --git a/tests/format/typescript/template-literal-types/format.test.js b/tests/format/typescript/template-literal-types/format.test.js new file mode 100644 index 000000000000..083abcf04619 --- /dev/null +++ b/tests/format/typescript/template-literal-types/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["babel-ts", "typescript"]); diff --git a/tests/format/typescript/template-literal-types/jsfmt.spec.js b/tests/format/typescript/template-literal-types/jsfmt.spec.js deleted file mode 100644 index 92b81c22bdc0..000000000000 --- a/tests/format/typescript/template-literal-types/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["babel-ts", "typescript"]); diff --git a/tests/format/typescript/template-literals/__snapshots__/format.test.js.snap b/tests/format/typescript/template-literals/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..bdca348b2416 --- /dev/null +++ b/tests/format/typescript/template-literals/__snapshots__/format.test.js.snap @@ -0,0 +1,36 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`as-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const a = \`\${(foo + bar) as baz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) as baz}\`; +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as baz}\`; +const b = \`\${(foo + bar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; + +=====================================output===================================== +const a = \`\${(foo + bar) as baz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) as baz}\`; +const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as baz}\`; +const b = \`\${(foo + bar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; +const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; + +================================================================================ +`; + +exports[`expressions.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const bar = tag<number>\`but where will prettier wrap such a long tagged template literal? \${foo.bar.baz} long long long long long long long long long long long long long long\`; +=====================================output===================================== +const bar = tag<number>\`but where will prettier wrap such a long tagged template literal? \${foo.bar.baz} long long long long long long long long long long long long long long\`; + +================================================================================ +`; diff --git a/tests/format/typescript/template-literals/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/template-literals/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index f56f6190cf10..000000000000 --- a/tests/format/typescript/template-literals/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,45 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`as-expression.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const a = \`\${(foo + bar) as baz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) as baz}\`; -const b = \`\${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as baz}\`; -const b = \`\${(foo + bar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; -const b = \`\${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}\`; - -=====================================output===================================== -const a = \`\${(foo + bar) as baz}\`; -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) as baz -}\`; -const b = \`\${ - (foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as baz -}\`; -const b = \`\${ - (foo + bar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\`; -const b = \`\${ - (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + - veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) as veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz -}\`; - -================================================================================ -`; - -exports[`expressions.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -const bar = tag<number>\`but where will prettier wrap such a long tagged template literal? \${foo.bar.baz} long long long long long long long long long long long long long long\`; -=====================================output===================================== -const bar = tag<number>\`but where will prettier wrap such a long tagged template literal? \${foo.bar.baz} long long long long long long long long long long long long long long\`; - -================================================================================ -`; diff --git a/tests/format/typescript/template-literals/format.test.js b/tests/format/typescript/template-literals/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/template-literals/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/template-literals/jsfmt.spec.js b/tests/format/typescript/template-literals/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/template-literals/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/ternaries/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/ternaries/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/ternaries/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/ternaries/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/ternaries/format.test.js b/tests/format/typescript/ternaries/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/ternaries/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/ternaries/jsfmt.spec.js b/tests/format/typescript/ternaries/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/ternaries/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/test-declarations/__snapshots__/format.test.js.snap b/tests/format/typescript/test-declarations/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5d95aae0544e --- /dev/null +++ b/tests/format/typescript/test-declarations/__snapshots__/format.test.js.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test_declarations.ts - {"arrowParens":"avoid"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { + console.log("hello!"); +}); + +=====================================output===================================== +test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { + console.log("hello!"); +}); + +================================================================================ +`; + +exports[`test_declarations.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { + console.log("hello!"); +}); + +=====================================output===================================== +test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { + console.log("hello!"); +}); + +================================================================================ +`; diff --git a/tests/format/typescript/test-declarations/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/test-declarations/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 92f1e92454c0..000000000000 --- a/tests/format/typescript/test-declarations/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,38 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`test_declarations.ts - {"arrowParens":"avoid"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { - console.log("hello!"); -}); - -=====================================output===================================== -test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { - console.log("hello!"); -}); - -================================================================================ -`; - -exports[`test_declarations.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "babel", "flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { - console.log("hello!"); -}); - -=====================================output===================================== -test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => { - console.log("hello!"); -}); - -================================================================================ -`; diff --git a/tests/format/typescript/test-declarations/format.test.js b/tests/format/typescript/test-declarations/format.test.js new file mode 100644 index 000000000000..91397d4e423a --- /dev/null +++ b/tests/format/typescript/test-declarations/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["typescript", "flow"]); +runFormatTest(import.meta, ["typescript", "flow"], { + arrowParens: "avoid", +}); diff --git a/tests/format/typescript/test-declarations/jsfmt.spec.js b/tests/format/typescript/test-declarations/jsfmt.spec.js deleted file mode 100644 index c5f800e9c3df..000000000000 --- a/tests/format/typescript/test-declarations/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["typescript", "babel", "flow"]); -run_spec(__dirname, ["typescript", "babel", "flow"], { - arrowParens: "avoid", -}); diff --git a/tests/format/typescript/top-level-await/__snapshots__/format.test.js.snap b/tests/format/typescript/top-level-await/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..84f20d71c583 --- /dev/null +++ b/tests/format/typescript/top-level-await/__snapshots__/format.test.js.snap @@ -0,0 +1,57 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test.cts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await(1); + +================================================================================ +`; + +exports[`test.mts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; + +exports[`test.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; + +exports[`test.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +await(1); + +=====================================output===================================== +await 1; + +================================================================================ +`; diff --git a/tests/format/typescript/top-level-await/format.test.js b/tests/format/typescript/top-level-await/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/top-level-await/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/top-level-await/test.cts b/tests/format/typescript/top-level-await/test.cts new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/typescript/top-level-await/test.cts @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/typescript/top-level-await/test.mts b/tests/format/typescript/top-level-await/test.mts new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/typescript/top-level-await/test.mts @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/typescript/top-level-await/test.ts b/tests/format/typescript/top-level-await/test.ts new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/typescript/top-level-await/test.ts @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/typescript/top-level-await/test.tsx b/tests/format/typescript/top-level-await/test.tsx new file mode 100644 index 000000000000..f3d5b23bd46f --- /dev/null +++ b/tests/format/typescript/top-level-await/test.tsx @@ -0,0 +1 @@ +await(1); diff --git a/tests/format/typescript/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/typescript/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..b846f5f591c2 --- /dev/null +++ b/tests/format/typescript/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,442 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`arrow-functions.tsx - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +=====================================output===================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +================================================================================ +`; + +exports[`arrow-functions.tsx - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +=====================================output===================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +================================================================================ +`; + +exports[`arrow-functions.tsx - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +=====================================output===================================== +const f1 = <T,>() => 1; +const f2 = < + Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, +>() => 1; + +================================================================================ +`; + +exports[`trailing.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode, +> { +} + +enum Enum { + x = 1, + y = 2, +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest, +} = something; + +=====================================output===================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode, +> {} + +enum Enum { + x = 1, + y = 2, +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest +} = something; + +================================================================================ +`; + +exports[`trailing.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode, +> { +} + +enum Enum { + x = 1, + y = 2, +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest, +} = something; + +=====================================output===================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode, +> {} + +enum Enum { + x = 1, + y = 2, +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest +} = something; + +================================================================================ +`; + +exports[`trailing.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode, +> { +} + +enum Enum { + x = 1, + y = 2, +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest, +} = something; + +=====================================output===================================== +export class BaseSingleLevelProfileTargeting< + T extends ValidSingleLevelProfileNode +> {} + +enum Enum { + x = 1, + y = 2 +} + +const { + longKeySoThisWillGoOnMultipleLines, + longKeySoThisWillGoOnMultipleLines2, + longKeySoThisWillGoOnMultipleLines3, + ...rest +} = something; + +================================================================================ +`; + +exports[`type-arguments.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +=====================================output===================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +================================================================================ +`; + +exports[`type-arguments.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +=====================================output===================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +================================================================================ +`; + +exports[`type-arguments.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +=====================================output===================================== +var bar: Bar< + AAAAAAA, + BBBBBBB, + CCCCCCC, + DDDDDDD, + EEEEEEE, + FFFFFFF, + GGGGGGG, + HHHHHHH +>; + +const baz = new Array< + FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, + BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar +>(); + +================================================================================ +`; + +exports[`type-parameters-vs-arguments.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +class FooClass< + A, + B, + C, +> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string, // [ts] Trailing comma not allowed. + >(); + +=====================================output===================================== +class FooClass<A, B, C> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string // [ts] Trailing comma not allowed. +>(); + +================================================================================ +`; + +exports[`type-parameters-vs-arguments.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +class FooClass< + A, + B, + C, +> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string, // [ts] Trailing comma not allowed. + >(); + +=====================================output===================================== +class FooClass<A, B, C> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string // [ts] Trailing comma not allowed. +>(); + +================================================================================ +`; + +exports[`type-parameters-vs-arguments.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +class FooClass< + A, + B, + C, +> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string, // [ts] Trailing comma not allowed. + >(); + +=====================================output===================================== +class FooClass<A, B, C> { + a: A; + b: B; + c: C; +} + +const instance = new FooClass< + boolean, + number, + string // [ts] Trailing comma not allowed. +>(); + +================================================================================ +`; diff --git a/tests/format/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 8651c7ad2746..000000000000 --- a/tests/format/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,442 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`arrow-functions.tsx - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -=====================================output===================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -================================================================================ -`; - -exports[`arrow-functions.tsx - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -=====================================output===================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -================================================================================ -`; - -exports[`arrow-functions.tsx - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -=====================================output===================================== -const f1 = <T,>() => 1; -const f2 = < - Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt, ->() => 1; - -================================================================================ -`; - -exports[`trailing.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode, -> { -} - -enum Enum { - x = 1, - y = 2, -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest, -} = something; - -=====================================output===================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode, -> {} - -enum Enum { - x = 1, - y = 2, -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest -} = something; - -================================================================================ -`; - -exports[`trailing.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode, -> { -} - -enum Enum { - x = 1, - y = 2, -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest, -} = something; - -=====================================output===================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode -> {} - -enum Enum { - x = 1, - y = 2, -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest -} = something; - -================================================================================ -`; - -exports[`trailing.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode, -> { -} - -enum Enum { - x = 1, - y = 2, -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest, -} = something; - -=====================================output===================================== -export class BaseSingleLevelProfileTargeting< - T extends ValidSingleLevelProfileNode -> {} - -enum Enum { - x = 1, - y = 2 -} - -const { - longKeySoThisWillGoOnMultipleLines, - longKeySoThisWillGoOnMultipleLines2, - longKeySoThisWillGoOnMultipleLines3, - ...rest -} = something; - -================================================================================ -`; - -exports[`type-arguments.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -=====================================output===================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -================================================================================ -`; - -exports[`type-arguments.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -=====================================output===================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -================================================================================ -`; - -exports[`type-arguments.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -=====================================output===================================== -var bar: Bar< - AAAAAAA, - BBBBBBB, - CCCCCCC, - DDDDDDD, - EEEEEEE, - FFFFFFF, - GGGGGGG, - HHHHHHH ->; - -const baz = new Array< - FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo, - BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar ->(); - -================================================================================ -`; - -exports[`type-parameters-vs-arguments.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -class FooClass< - A, - B, - C, -> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string, // [ts] Trailing comma not allowed. - >(); - -=====================================output===================================== -class FooClass<A, B, C> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string // [ts] Trailing comma not allowed. ->(); - -================================================================================ -`; - -exports[`type-parameters-vs-arguments.ts - {"trailingComma":"es5"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "es5" - | printWidth -=====================================input====================================== -class FooClass< - A, - B, - C, -> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string, // [ts] Trailing comma not allowed. - >(); - -=====================================output===================================== -class FooClass<A, B, C> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string // [ts] Trailing comma not allowed. ->(); - -================================================================================ -`; - -exports[`type-parameters-vs-arguments.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -class FooClass< - A, - B, - C, -> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string, // [ts] Trailing comma not allowed. - >(); - -=====================================output===================================== -class FooClass<A, B, C> { - a: A; - b: B; - c: C; -} - -const instance = new FooClass< - boolean, - number, - string // [ts] Trailing comma not allowed. ->(); - -================================================================================ -`; diff --git a/tests/format/typescript/trailing-comma/format.test.js b/tests/format/typescript/trailing-comma/format.test.js new file mode 100644 index 000000000000..255526bea18b --- /dev/null +++ b/tests/format/typescript/trailing-comma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "all" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); diff --git a/tests/format/typescript/trailing-comma/jsfmt.spec.js b/tests/format/typescript/trailing-comma/jsfmt.spec.js deleted file mode 100644 index 87950996e597..000000000000 --- a/tests/format/typescript/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { trailingComma: "all" }); -run_spec(__dirname, ["typescript"], { trailingComma: "es5" }); -run_spec(__dirname, ["typescript"], { trailingComma: "none" }); diff --git a/tests/format/typescript/tsx/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/tsx/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/tsx/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/tsx/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/tsx/comma/__snapshots__/format.test.js.snap b/tests/format/typescript/tsx/comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..98a3127bf3df --- /dev/null +++ b/tests/format/typescript/tsx/comma/__snapshots__/format.test.js.snap @@ -0,0 +1,131 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`snippet: test.cjs format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.cts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.js format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.jsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.mjs format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.mts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T>() => {}; + +================================================================================ +`; + +exports[`snippet: test.tsx format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: test.unknown format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; + +exports[`snippet: unnamed format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const A = <T,>() => {} +=====================================output===================================== +const A = <T,>() => {}; + +================================================================================ +`; diff --git a/tests/format/typescript/tsx/comma/format.test.js b/tests/format/typescript/tsx/comma/format.test.js new file mode 100644 index 000000000000..f69e9b5b8da6 --- /dev/null +++ b/tests/format/typescript/tsx/comma/format.test.js @@ -0,0 +1,20 @@ +const code = "const A = <T,>() => {}"; + +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "test.js", + "test.cjs", + "test.mjs", + "test.ts", + "test.jsx", + "test.mts", + "test.cts", + "test.tsx", + "test.unknown", + undefined, + ].map((filename) => ({ code, filename, name: filename ?? "unnamed" })), + }, + ["typescript"], +); diff --git a/tests/format/typescript/tsx/format.test.js b/tests/format/typescript/tsx/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/tsx/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/tsx/jsfmt.spec.js b/tests/format/typescript/tsx/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/tsx/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/tuple/__snapshots__/format.test.js.snap b/tests/format/typescript/tuple/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1d0384ddef8c --- /dev/null +++ b/tests/format/typescript/tuple/__snapshots__/format.test.js.snap @@ -0,0 +1,751 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`dangling-comments.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +type Foo1 = [/* comment */]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + + /* comment2 */ +]; + + +=====================================output===================================== +type Foo1 = [ + /* comment */ +]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + /* comment2 */ +]; + +================================================================================ +`; + +exports[`dangling-comments.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +type Foo1 = [/* comment */]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + + /* comment2 */ +]; + + +=====================================output===================================== +type Foo1 = [ + /* comment */ +]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + /* comment2 */ +]; + +================================================================================ +`; + +exports[`dangling-comments.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +type Foo1 = [/* comment */]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + + /* comment2 */ +]; + + +=====================================output===================================== +type Foo1 = [ + /* comment */ +]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + /* comment2 */ +]; + +================================================================================ +`; + +exports[`trailing-comma.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string, + to: string, + }, // <== this one + ]; + shop: string; + distance: number; +} + +=====================================output===================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string; + to: string; + }, // <== this one + ]; + shop: string; + distance: number; +} + +================================================================================ +`; + +exports[`trailing-comma.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string, + to: string, + }, // <== this one + ]; + shop: string; + distance: number; +} + +=====================================output===================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string; + to: string; + }, // <== this one + ]; + shop: string; + distance: number; +} + +================================================================================ +`; + +exports[`trailing-comma.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string, + to: string, + }, // <== this one + ]; + shop: string; + distance: number; +} + +=====================================output===================================== +export interface ShopQueryResult { + chic: boolean; + location: number[]; + menus: Menu[]; + openingDays: number[]; + closingDays: [ + { + from: string; + to: string; + } // <== this one + ]; + shop: string; + distance: number; +} + +================================================================================ +`; + +exports[`trailing-comma-for-empty-tuples.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] + +type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; +=====================================output===================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = + []; + +type Foo = + Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] + ? Foo3 + : Foo4; + +================================================================================ +`; + +exports[`trailing-comma-for-empty-tuples.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] + +type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; +=====================================output===================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = + []; + +type Foo = + Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] + ? Foo3 + : Foo4; + +================================================================================ +`; + +exports[`trailing-comma-for-empty-tuples.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] + +type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; +=====================================output===================================== +type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = + []; + +type Foo = + Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] + ? Foo3 + : Foo4; + +================================================================================ +`; + +exports[`trailing-comma-trailing-rest.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[], +]; + +=====================================output===================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[], +]; + +================================================================================ +`; + +exports[`trailing-comma-trailing-rest.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[], +]; + +=====================================output===================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[], +]; + +================================================================================ +`; + +exports[`trailing-comma-trailing-rest.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[], +]; + +=====================================output===================================== +type ValidateArgs = [ + { + [key: string]: any; + }, + string, + string, + ...string[] +]; + +================================================================================ +`; + +exports[`tuple.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== + +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/ +]; + +=====================================output===================================== +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/, +]; + +================================================================================ +`; + +exports[`tuple.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== + +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/ +]; + +=====================================output===================================== +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/, +]; + +================================================================================ +`; + +exports[`tuple.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== + +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/ +]; + +=====================================output===================================== +export type SCMRawResource = [ + number /*handle*/, + string /*resourceUri*/, + modes.Command /*command*/, + string[] /*icons: light, dark*/, + boolean /*strike through*/, + boolean /*faded*/ +]; + +================================================================================ +`; + +exports[`tuple-labeled.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]] + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +=====================================output===================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]]; + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +================================================================================ +`; + +exports[`tuple-labeled.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]] + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +=====================================output===================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]]; + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +================================================================================ +`; + +exports[`tuple-labeled.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]] + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +=====================================output===================================== +// https://github.com/babel/babel/pull/11754 + +type T = [x: A, y?: B, ...z: C]; + +type T = [A, y: B]; + +let x: [A: string, ...B: number[]]; + +type T = [foo: string, bar?: number]; + +type T = [x?: A, y: B]; + +type T = [x: A, ...B]; + +type T = [...B, x: A]; + +================================================================================ +`; + +exports[`tuple-rest-not-last.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string] + +=====================================output===================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string]; + +================================================================================ +`; + +exports[`tuple-rest-not-last.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string] + +=====================================output===================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string]; + +================================================================================ +`; + +exports[`tuple-rest-not-last.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string] + +=====================================output===================================== +// https://github.com/babel/babel/pull/11753 + +let x: [...[number, string], string]; + +================================================================================ +`; diff --git a/tests/format/typescript/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/tuple/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 3f38b0853d38..000000000000 --- a/tests/format/typescript/tuple/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,547 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`trailing-comma.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string, - to: string, - }, // <== this one - ]; - shop: string; - distance: number; -} - -=====================================output===================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string; - to: string; - }, // <== this one - ]; - shop: string; - distance: number; -} - -================================================================================ -`; - -exports[`trailing-comma.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string, - to: string, - }, // <== this one - ]; - shop: string; - distance: number; -} - -=====================================output===================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string; - to: string; - } // <== this one - ]; - shop: string; - distance: number; -} - -================================================================================ -`; - -exports[`trailing-comma.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string, - to: string, - }, // <== this one - ]; - shop: string; - distance: number; -} - -=====================================output===================================== -export interface ShopQueryResult { - chic: boolean; - location: number[]; - menus: Menu[]; - openingDays: number[]; - closingDays: [ - { - from: string; - to: string; - } // <== this one - ]; - shop: string; - distance: number; -} - -================================================================================ -`; - -exports[`trailing-comma-for-empty-tuples.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] - -type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; -=====================================output===================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = - []; - -type Foo = - Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] - ? Foo3 - : Foo4; - -================================================================================ -`; - -exports[`trailing-comma-for-empty-tuples.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] - -type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; -=====================================output===================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = - []; - -type Foo = - Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] - ? Foo3 - : Foo4; - -================================================================================ -`; - -exports[`trailing-comma-for-empty-tuples.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = [] - -type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] ? Foo3 : Foo4; -=====================================output===================================== -type Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong = - []; - -type Foo = - Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [] - ? Foo3 - : Foo4; - -================================================================================ -`; - -exports[`trailing-comma-trailing-rest.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[], -]; - -=====================================output===================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[], -]; - -================================================================================ -`; - -exports[`trailing-comma-trailing-rest.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[], -]; - -=====================================output===================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[] -]; - -================================================================================ -`; - -exports[`trailing-comma-trailing-rest.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[], -]; - -=====================================output===================================== -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - string, - ...string[] -]; - -================================================================================ -`; - -exports[`tuple.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== - -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/ -]; - -=====================================output===================================== -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/, -]; - -================================================================================ -`; - -exports[`tuple.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== - -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/ -]; - -=====================================output===================================== -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/ -]; - -================================================================================ -`; - -exports[`tuple.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/ -]; - -=====================================output===================================== -export type SCMRawResource = [ - number /*handle*/, - string /*resourceUri*/, - modes.Command /*command*/, - string[] /*icons: light, dark*/, - boolean /*strike through*/, - boolean /*faded*/ -]; - -================================================================================ -`; - -exports[`tuple-labeled.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]] - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -=====================================output===================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]]; - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -================================================================================ -`; - -exports[`tuple-labeled.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]] - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -=====================================output===================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]]; - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -================================================================================ -`; - -exports[`tuple-labeled.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]] - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -=====================================output===================================== -// https://github.com/babel/babel/pull/11754 - -type T = [x: A, y?: B, ...z: C]; - -type T = [A, y: B]; - -let x: [A: string, ...B: number[]]; - -type T = [foo: string, bar?: number]; - -type T = [x?: A, y: B]; - -type T = [x: A, ...B]; - -type T = [...B, x: A]; - -================================================================================ -`; - -exports[`tuple-rest-not-last.ts - {"trailingComma":"all"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string] - -=====================================output===================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string]; - -================================================================================ -`; - -exports[`tuple-rest-not-last.ts - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string] - -=====================================output===================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string]; - -================================================================================ -`; - -exports[`tuple-rest-not-last.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string] - -=====================================output===================================== -// https://github.com/babel/babel/pull/11753 - -let x: [...[number, string], string]; - -================================================================================ -`; diff --git a/tests/format/typescript/tuple/dangling-comments.ts b/tests/format/typescript/tuple/dangling-comments.ts new file mode 100644 index 000000000000..9681fc1c6d34 --- /dev/null +++ b/tests/format/typescript/tuple/dangling-comments.ts @@ -0,0 +1,27 @@ +type Foo1 = [/* comment */]; + +type Foo2 = [ + // comment +]; + +type Foo3 = [ + // comment1 + // comment2 +]; + +type Foo4 = [ + // comment1 + + // comment2 +]; + +type Foo5 = [ + /* comment1 */ +]; + +type Foo6 = [ + /* comment1 */ + + /* comment2 */ +]; + diff --git a/tests/format/typescript/tuple/format.test.js b/tests/format/typescript/tuple/format.test.js new file mode 100644 index 000000000000..4fe8f803b6c7 --- /dev/null +++ b/tests/format/typescript/tuple/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/tuple/jsfmt.spec.js b/tests/format/typescript/tuple/jsfmt.spec.js deleted file mode 100644 index 31c3b0a4ff6b..000000000000 --- a/tests/format/typescript/tuple/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { trailingComma: "none" }); -run_spec(__dirname, ["typescript"]); -run_spec(__dirname, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/type-alias/__snapshots__/format.test.js.snap b/tests/format/typescript/type-alias/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4d3e792ea435 --- /dev/null +++ b/tests/format/typescript/type-alias/__snapshots__/format.test.js.snap @@ -0,0 +1,204 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`conditional.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type FallbackFlags<F extends Flags | undefined> = + Equals<NonNullableFlag<F>["flags"], {}> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; + +export type UnPromise<Type extends Promise<unknown>> = + Type extends Promise<infer Generic> + ? Generic + : never; + +export type Equals<X, Y> = + (<T>() => T extends X ? 1 : 2) extends + (<T>() => T extends Y ? 1 : 2) + ? true + : false; + +export type _Repeat<A extends any, N extends number, L extends List = []> = + __Repeat<N, A, L> extends infer X + ? Cast<X, List> + : never + +export type Repeat<A extends any, N extends number, L extends List = []> = + N extends unknown + ? L extends unknown + ? _Repeat<A, N, L> + : never + : never + +export type Intersect<U1 extends any, U2 extends any> = + U1 extends unknown + ? U2 extends unknown + ? {1: U1, 0: never}[Equals<U1, U2>] + : never + : never + +=====================================output===================================== +type FallbackFlags<F extends Flags | undefined> = + Equals<NonNullableFlag<F>["flags"], {}> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; + +export type UnPromise<Type extends Promise<unknown>> = + Type extends Promise<infer Generic> ? Generic : never; + +export type Equals<X, Y> = + (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 + ? true + : false; + +export type _Repeat<A extends any, N extends number, L extends List = []> = + __Repeat<N, A, L> extends infer X ? Cast<X, List> : never; + +export type Repeat< + A extends any, + N extends number, + L extends List = [], +> = N extends unknown ? (L extends unknown ? _Repeat<A, N, L> : never) : never; + +export type Intersect<U1 extends any, U2 extends any> = U1 extends unknown + ? U2 extends unknown + ? { 1: U1; 0: never }[Equals<U1, U2>] + : never + : never; + +================================================================================ +`; + +exports[`issue-9874.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type RequestNextDealAction = BaseAction<DealsActionTypes.REQUEST_NEXT_DEAL>; + +=====================================output===================================== +export type RequestNextDealAction = + BaseAction<DealsActionTypes.REQUEST_NEXT_DEAL>; + +================================================================================ +`; + +exports[`issue-100857.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type FieldLayoutWith< + T extends string, + S extends unknown = { width: string } +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + T extends string, + S extends unknown, +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + S extends unknown = { width: string } +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + T extends stringggggggggggg, + T extends stringggggggggggg +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + T extends stringggggggggggg, + S = stringggggggggggggggggg +> = { + type: T; + code: string; + size: S; +}; + +=====================================output===================================== +type FieldLayoutWith< + T extends string, + S extends unknown = { width: string }, +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith<T extends string, S extends unknown> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith<S extends unknown = { width: string }> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + T extends stringggggggggggg, + T extends stringggggggggggg, +> = { + type: T; + code: string; + size: S; +}; + +type FieldLayoutWith< + T extends stringggggggggggg, + S = stringggggggggggggggggg, +> = { + type: T; + code: string; + size: S; +}; + +================================================================================ +`; + +exports[`pattern-parameter.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type C = { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +}; + +=====================================output===================================== +type C = { + foo([]?): void; + bar({}, []?): any; + baz(a: string, b: number, []?): void; +}; + +================================================================================ +`; diff --git a/tests/format/typescript/type-alias/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/type-alias/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 9da037d1066c..000000000000 --- a/tests/format/typescript/type-alias/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,131 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-9874.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type RequestNextDealAction = BaseAction<DealsActionTypes.REQUEST_NEXT_DEAL>; - -=====================================output===================================== -export type RequestNextDealAction = - BaseAction<DealsActionTypes.REQUEST_NEXT_DEAL>; - -================================================================================ -`; - -exports[`issue-100857.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type FieldLayoutWith< - T extends string, - S extends unknown = { width: string } -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - T extends string, - S extends unknown, -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - S extends unknown = { width: string } -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - T extends stringggggggggggg, - T extends stringggggggggggg -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - T extends stringggggggggggg, - S = stringggggggggggggggggg -> = { - type: T; - code: string; - size: S; -}; - -=====================================output===================================== -type FieldLayoutWith< - T extends string, - S extends unknown = { width: string } -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith<T extends string, S extends unknown> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith<S extends unknown = { width: string }> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - T extends stringggggggggggg, - T extends stringggggggggggg -> = { - type: T; - code: string; - size: S; -}; - -type FieldLayoutWith< - T extends stringggggggggggg, - S = stringggggggggggggggggg -> = { - type: T; - code: string; - size: S; -}; - -================================================================================ -`; - -exports[`pattern-parameter.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type C = { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -}; - -=====================================output===================================== -type C = { - foo([]?): void; - bar({}, []?): any; - baz(a: string, b: number, []?): void; -}; - -================================================================================ -`; diff --git a/tests/format/typescript/type-alias/conditional.ts b/tests/format/typescript/type-alias/conditional.ts new file mode 100644 index 000000000000..c209d644f9a5 --- /dev/null +++ b/tests/format/typescript/type-alias/conditional.ts @@ -0,0 +1,34 @@ +type FallbackFlags<F extends Flags | undefined> = + Equals<NonNullableFlag<F>["flags"], {}> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; + +export type UnPromise<Type extends Promise<unknown>> = + Type extends Promise<infer Generic> + ? Generic + : never; + +export type Equals<X, Y> = + (<T>() => T extends X ? 1 : 2) extends + (<T>() => T extends Y ? 1 : 2) + ? true + : false; + +export type _Repeat<A extends any, N extends number, L extends List = []> = + __Repeat<N, A, L> extends infer X + ? Cast<X, List> + : never + +export type Repeat<A extends any, N extends number, L extends List = []> = + N extends unknown + ? L extends unknown + ? _Repeat<A, N, L> + : never + : never + +export type Intersect<U1 extends any, U2 extends any> = + U1 extends unknown + ? U2 extends unknown + ? {1: U1, 0: never}[Equals<U1, U2>] + : never + : never diff --git a/tests/format/typescript/type-alias/format.test.js b/tests/format/typescript/type-alias/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/type-alias/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/type-alias/jsfmt.spec.js b/tests/format/typescript/type-alias/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/type-alias/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3baf0f90326b --- /dev/null +++ b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap @@ -0,0 +1,118 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`1.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f<<<T>(x) + +=====================================output===================================== +f << (<T>x); + +================================================================================ +`; + +exports[`2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +f<<T>(v: T) => void>(); + +=====================================output===================================== +f<<T>(v: T) => void>(); + +================================================================================ +`; + +exports[`3.ts [babel-ts] format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(class extends f<<T>(v: T) => void> {}); + +=====================================output===================================== +(class extends f<<T>(v: T) => void> {}); + +================================================================================ +`; + +exports[`3.ts [oxc-ts] format 1`] = ` +"Expected \`{\` but found \`<<\` (1:17) +> 1 | (class extends f<<T>(v: T) => void> {}); + | ^^ + 2 |" +`; + +exports[`3.ts [typescript] format 1`] = ` +"',' expected. (1:17) +> 1 | (class extends f<<T>(v: T) => void> {}); + | ^ + 2 | +Cause: ',' expected." +`; + +exports[`4.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +(@f<<T>(v: T) => void>() class {}); + +=====================================output===================================== +( + @f<<T>(v: T) => void>() + class {} +); + +================================================================================ +`; + +exports[`5.tsx [babel-ts] format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +<Component<<T>(v: T) => void> /> + +=====================================output===================================== +<Component<<T>(v: T) => void> />; + +================================================================================ +`; + +exports[`5.tsx [oxc-ts] format 1`] = ` +"Unexpected token (1:11) +> 1 | <Component<<T>(v: T) => void> /> + | ^^ + 2 |" +`; + +exports[`5.tsx [typescript] format 1`] = ` +"Identifier expected. (1:11) +> 1 | <Component<<T>(v: T) => void> /> + | ^ + 2 | +Cause: Identifier expected." +`; + +exports[`6.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +new f<<T>(v: T) => void>(); + +=====================================output===================================== +new f<<T>(v: T) => void>(); + +================================================================================ +`; diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 409110a22a02..000000000000 --- a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,102 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`1.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -f<<<T>(x) - -=====================================output===================================== -f << (<T>x); - -================================================================================ -`; - -exports[`2.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -f<<T>(v: T) => void>(); - -=====================================output===================================== -f<<T>(v: T) => void>(); - -================================================================================ -`; - -exports[`3.ts [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(class extends f<<T>(v: T) => void> {}); - -=====================================output===================================== -(class extends f<<T>(v: T) => void> {}); - -================================================================================ -`; - -exports[`3.ts [typescript] format 1`] = ` -"',' expected. (1:17) -> 1 | (class extends f<<T>(v: T) => void> {}); - | ^ - 2 |" -`; - -exports[`4.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -(@f<<T>(v: T) => void>() class {}); - -=====================================output===================================== -( - @f<<T>(v: T) => void>() - class {} -); - -================================================================================ -`; - -exports[`5.tsx [babel-ts] format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -<Component<<T>(v: T) => void> /> - -=====================================output===================================== -<Component<<T>(v: T) => void> />; - -================================================================================ -`; - -exports[`5.tsx [typescript] format 1`] = ` -"Identifier expected. (1:11) -> 1 | <Component<<T>(v: T) => void> /> - | ^ - 2 |" -`; - -exports[`6.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -new f<<T>(v: T) => void>(); - -=====================================output===================================== -new f<<T>(v: T) => void>(); - -================================================================================ -`; diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/format.test.js b/tests/format/typescript/type-arguments-bit-shift-left-like/format.test.js new file mode 100644 index 000000000000..c4908e90deb7 --- /dev/null +++ b/tests/format/typescript/type-arguments-bit-shift-left-like/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { + errors: { typescript: ["3.ts", "5.tsx"], "oxc-ts": ["3.ts", "5.tsx"] }, +}); diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js b/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js deleted file mode 100644 index b3acebe65b16..000000000000 --- a/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["typescript"], { - errors: { typescript: ["3.ts", "5.tsx"] }, -}); diff --git a/tests/format/typescript/type-member-get-set/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/type-member-get-set/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/type-member-get-set/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/type-member-get-set/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/type-member-get-set/format.test.js b/tests/format/typescript/type-member-get-set/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/type-member-get-set/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/type-member-get-set/jsfmt.spec.js b/tests/format/typescript/type-member-get-set/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/type-member-get-set/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/type-only-module-specifiers/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/type-only-module-specifiers/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/type-only-module-specifiers/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/type-only-module-specifiers/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/type-only-module-specifiers/format.test.js b/tests/format/typescript/type-only-module-specifiers/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/type-only-module-specifiers/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/type-only-module-specifiers/jsfmt.spec.js b/tests/format/typescript/type-only-module-specifiers/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/type-only-module-specifiers/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/type-params/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1caed20f2316 --- /dev/null +++ b/tests/format/typescript/type-params/__snapshots__/format.test.js.snap @@ -0,0 +1,552 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class-method.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/prettier/prettier/issues/4070 +export class Thing implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => {}); +} + +export class Thing2 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); +} + +export class Thing3 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type) => { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); +} + +export class Thing4 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => type.doSomething()); +} + +export class Thing5 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => <any>type.doSomething()); +} + +export class Thing6 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => <Provider<Opts>>type.doSomething()); +} + +export class Thing7 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => <Provider<Opts>>type.doSomething()); +} + +export class Thing8 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => <Provider<Opts>>type.doSomething(withArgs, soIt, does, not, fit).extraCall()); +} + +export class Thing9 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => type.doSomething()); +} + +export class Thing10 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((veryLongArgName: ObjectType): Provider<Options, MoreOptions> => veryLongArgName ); +} + +export class Thing11 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider => {}); +} + +// regular non-arrow functions + +export class Thing12 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return type}); +} + +export class Thing13 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); +} + +export class Thing14 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type) { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); +} + +export class Thing15 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return type.doSomething()}); +} + +export class Thing16 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return <any>type.doSomething()}); +} + +export class Thing17 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return <Provider<Opts>>type.doSomething()}); +} + +export class Thing18 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) {return <Provider<Opts>>type.doSomething()}); +} + +export class Thing19 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) { return <Provider<Opts>>type.doSomething(withArgs, soIt, does, not, fit).extraCall()}); +} + +export class Thing20 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) {return type.doSomething()}); +} + +export class Thing21 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(veryLongArgName: ObjectType): Provider<Options, MoreOptions> { return veryLongArgName }); +} + +export class Thing22 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider {}); +} + + +// case from https://github.com/prettier/prettier/issues/2581 + +const appIDs = createSelector( + PubXURLParams.APP_IDS, + (rawAppIDs): Array<AppID> => deserializeList(rawAppIDs), +); +=====================================output===================================== +// https://github.com/prettier/prettier/issues/4070 +export class Thing implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider<Opts> => {}, + ); +} + +export class Thing2 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider<Opts> => { + const someVar = doSomething(type); + if (someVar) { + return someVar.method(); + } + return false; + }, + ); +} + +export class Thing3 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type) => { + const someVar = doSomething(type); + if (someVar) { + return someVar.method(); + } + return false; + }); +} + +export class Thing4 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider<Opts> => type.doSomething(), + ); +} + +export class Thing5 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider<Opts> => <any>type.doSomething(), + ); +} + +export class Thing6 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider<Opts> => <Provider<Opts>>type.doSomething(), + ); +} + +export class Thing7 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType) => <Provider<Opts>>type.doSomething(), + ); +} + +export class Thing8 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType) => + <Provider<Opts>>( + type.doSomething(withArgs, soIt, does, not, fit).extraCall() + ), + ); +} + +export class Thing9 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => + type.doSomething(), + ); +} + +export class Thing10 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (veryLongArgName: ObjectType): Provider<Options, MoreOptions> => + veryLongArgName, + ); +} + +export class Thing11 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize( + (type: ObjectType): Provider => {}, + ); +} + +// regular non-arrow functions + +export class Thing12 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider<Opts> { + return type; + }); +} + +export class Thing13 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider<Opts> { + const someVar = doSomething(type); + if (someVar) { + return someVar.method(); + } + return false; + }); +} + +export class Thing14 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function (type) { + const someVar = doSomething(type); + if (someVar) { + return someVar.method(); + } + return false; + }); +} + +export class Thing15 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider<Opts> { + return type.doSomething(); + }); +} + +export class Thing16 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider<Opts> { + return <any>type.doSomething(); + }); +} + +export class Thing17 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider<Opts> { + return <Provider<Opts>>type.doSomething(); + }); +} + +export class Thing18 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { + return <Provider<Opts>>type.doSomething(); + }); +} + +export class Thing19 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { + return <Provider<Opts>>( + type.doSomething(withArgs, soIt, does, not, fit).extraCall() + ); + }); +} + +export class Thing20 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { + return type.doSomething(); + }); +} + +export class Thing21 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + veryLongArgName: ObjectType, + ): Provider<Options, MoreOptions> { + return veryLongArgName; + }); +} + +export class Thing22 implements OtherThing { + do: (type: Type) => Provider<Prop> = memoize(function ( + type: ObjectType, + ): Provider {}); +} + +// case from https://github.com/prettier/prettier/issues/2581 + +const appIDs = createSelector( + PubXURLParams.APP_IDS, + (rawAppIDs): Array<AppID> => deserializeList(rawAppIDs), +); + +================================================================================ +`; + +exports[`const.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +function a<const T>() {} +function b<const T extends U>() {} +function c<T, const U>() {} +declare function d<const T>(); +<const T>() => {}; +<const T extends U>() => {}; +(function <const T>() {}); +(function <const T extends U>() {}); +(function <T, const U>() {}); + +class A<const T> {} +class B<const T extends U> {} +class C<T, const U> {} +class D<in const T> {} +class E<const in T> {} +(class <const T> {}); +(class <const T extends U> {}); +(class <T, const U> {}); +(class <in const T> {}); +(class <const in T> {}); + +interface I<const T> {} +interface J<const T extends U> {} +interface K<T, const U> {} +interface L<in const T> {} +interface M<const in T> {} + +class _ { + method<const T>() {} + method<const T extends U>() {} + method<T, const U>() {} +} + +=====================================output===================================== +function a<const T>() {} +function b<const T extends U>() {} +function c<T, const U>() {} +declare function d<const T>(); +<const T>() => {}; +<const T extends U>() => {}; +(function <const T>() {}); +(function <const T extends U>() {}); +(function <T, const U>() {}); + +class A<const T> {} +class B<const T extends U> {} +class C<T, const U> {} +class D<const in T> {} +class E<const in T> {} +(class<const T> {}); +(class<const T extends U> {}); +(class<T, const U> {}); +(class<const in T> {}); +(class<const in T> {}); + +interface I<const T> {} +interface J<const T extends U> {} +interface K<T, const U> {} +interface L<const in T> {} +interface M<const in T> {} + +class _ { + method<const T>() {} + method<const T extends U>() {} + method<T, const U>() {} +} + +================================================================================ +`; + +exports[`line-breaking-after-extends.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type OuterType1< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerOtherType<OneMoreType> +> = { a: 1 }; + +export type OuterType2< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLongerLongerLongerOtherType +> = { a: 1 }; + +export type OuterType3< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLo.ngerLongerLongerOtherType +> = { a: 1 }; + +export type OuterType4< + LongerLongerLongerLongerInnerType extends + | LongerLongerLongerLongerLongerLo + | ngerLongerLongerOtherType +> = { a: 1 }; + +=====================================output===================================== +export type OuterType1< + LongerLongerLongerLongerInnerType extends + LongerLongerLongerLongerOtherType<OneMoreType>, +> = { a: 1 }; + +export type OuterType2< + LongerLongerLongerLongerInnerType extends + LongerLongerLongerLongerLongerLongerLongerLongerOtherType, +> = { a: 1 }; + +export type OuterType3< + LongerLongerLongerLongerInnerType extends + LongerLongerLongerLongerLongerLo.ngerLongerLongerOtherType, +> = { a: 1 }; + +export type OuterType4< + LongerLongerLongerLongerInnerType extends + | LongerLongerLongerLongerLongerLo + | ngerLongerLongerOtherType, +> = { a: 1 }; + +================================================================================ +`; + +exports[`line-breaking-after-extends-2.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +a = { + parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod, + >() {} +} + +function parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod + | Foo + | Bar + | Baz +>(); + +function parseFunctionBodyAndFinish< + T extends // comment + N.Function | N.TSDeclareMethod | Baz +>(); + +function makeChainWalker< + ArgT extends { + options: ValidatedOptions; + dirname: string; + filepath?: string; + }, +>() {} + +=====================================output===================================== +a = { + parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod, + >() {}, +}; + +function parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod + | Foo + | Bar + | Baz, +>(); + +function parseFunctionBodyAndFinish< + T extends // comment + N.Function | N.TSDeclareMethod | Baz, +>(); + +function makeChainWalker< + ArgT extends { + options: ValidatedOptions; + dirname: string; + filepath?: string; + }, +>() {} + +================================================================================ +`; + +exports[`long-function-arg.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const forwardS = R.curry( + <V,T>(prop: string, reducer: ReducerFunction<V, T>, value: V, state: {[name: string]: T}) => + R.assoc(prop, reducer(value, state[prop]), state) +) + +export const forwardS1 = R.curry( + <VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV, TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT>(prop: string, reducer: ReducerFunction<V, T>, value: V, state: {[name: string]: T}) => + R.assoc(prop, reducer(value, state[prop]), state) +) + + +=====================================output===================================== +export const forwardS = R.curry( + <V, T>( + prop: string, + reducer: ReducerFunction<V, T>, + value: V, + state: { [name: string]: T }, + ) => R.assoc(prop, reducer(value, state[prop]), state), +); + +export const forwardS1 = R.curry( + < + VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV, + TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + >( + prop: string, + reducer: ReducerFunction<V, T>, + value: V, + state: { [name: string]: T }, + ) => R.assoc(prop, reducer(value, state[prop]), state), +); + +================================================================================ +`; + +exports[`tagged-template-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +export const RedBox = styled.div<{foo: string}>\` + background: red; + \${props => props.foo} +\`; + +=====================================output===================================== +export const RedBox = styled.div<{ foo: string }>\` + background: red; + \${(props) => props.foo} +\`; + +================================================================================ +`; diff --git a/tests/format/typescript/typeparams/class-method.ts b/tests/format/typescript/type-params/class-method.ts similarity index 100% rename from tests/format/typescript/typeparams/class-method.ts rename to tests/format/typescript/type-params/class-method.ts diff --git a/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..47aa28d03e20 --- /dev/null +++ b/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap @@ -0,0 +1,149 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`flow-only.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== + +const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<empty> = a; +const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<mixed> = a; + +=====================================output===================================== +const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<empty> = + a; +const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<mixed> = + a; + +================================================================================ +`; + +exports[`issue-9501.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const name: SomeGeneric< + Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP"> +> = null; + +=====================================output===================================== +const name: SomeGeneric<Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP">> = + null; + +================================================================================ +`; + +exports[`simple-types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<any> = a; +const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<null> = a; +const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<this> = a; +const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<void> = a; +const foo5: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = a; +const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<false> = a; +const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = a; +const foo8: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = a; +const foo9: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; +const foo10: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; +const foo11: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xDeeD_Beef> = a; +const foo12: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xDeeD_Beefn> = a; + +=====================================output===================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<any> = + a; +const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<null> = + a; +const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<this> = + a; +const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<void> = + a; +const foo5: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = + a; +const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<false> = + a; +const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = + a; +const foo8: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = + a; +const foo9: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = + a; +const foo10: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = + a; +const foo11: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xdeed_beef> = + a; +const foo12: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xdeed_beefn> = + a; + +================================================================================ +`; + +exports[`template-literal-types.ts [babel-flow] format 1`] = ` +"Unexpected token (1:84) +> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; + | ^ + 2 | +Cause: Unexpected token (1:83)" +`; + +exports[`template-literal-types.ts [flow] format 1`] = ` +"Flow does not support template literal types. (1:84) +> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; + | ^ + 2 |" +`; + +exports[`template-literal-types.ts [hermes] format 1`] = ` +"unexpected token in type annotation (1:83) +> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; + | ^ + 2 | +Cause: unexpected token in type annotation (1:83) +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; + ^" +`; + +exports[`template-literal-types.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; + +=====================================output===================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = + a; + +================================================================================ +`; + +exports[`typescript-only.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<never> = a; +const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<object> = a; +const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<undefined> = a; +const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<unknown> = a; + +=====================================output===================================== +const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<never> = + a; +const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<object> = + a; +const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<undefined> = + a; +const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<unknown> = + a; + +================================================================================ +`; diff --git a/tests/format/typescript/typeparams/consistent/flow-only.ts b/tests/format/typescript/type-params/consistent/flow-only.ts similarity index 100% rename from tests/format/typescript/typeparams/consistent/flow-only.ts rename to tests/format/typescript/type-params/consistent/flow-only.ts diff --git a/tests/format/typescript/type-params/consistent/format.test.js b/tests/format/typescript/type-params/consistent/format.test.js new file mode 100644 index 000000000000..41298863a02d --- /dev/null +++ b/tests/format/typescript/type-params/consistent/format.test.js @@ -0,0 +1,7 @@ +runFormatTest(import.meta, ["typescript", "flow"], { + errors: { + flow: ["template-literal-types.ts"], + hermes: ["template-literal-types.ts"], + "babel-flow": ["template-literal-types.ts"], + }, +}); diff --git a/tests/format/typescript/typeparams/consistent/issue-9501.ts b/tests/format/typescript/type-params/consistent/issue-9501.ts similarity index 100% rename from tests/format/typescript/typeparams/consistent/issue-9501.ts rename to tests/format/typescript/type-params/consistent/issue-9501.ts diff --git a/tests/format/typescript/typeparams/consistent/simple-types.ts b/tests/format/typescript/type-params/consistent/simple-types.ts similarity index 100% rename from tests/format/typescript/typeparams/consistent/simple-types.ts rename to tests/format/typescript/type-params/consistent/simple-types.ts diff --git a/tests/format/typescript/typeparams/consistent/template-literal-types.ts b/tests/format/typescript/type-params/consistent/template-literal-types.ts similarity index 100% rename from tests/format/typescript/typeparams/consistent/template-literal-types.ts rename to tests/format/typescript/type-params/consistent/template-literal-types.ts diff --git a/tests/format/typescript/typeparams/consistent/typescript-only.ts b/tests/format/typescript/type-params/consistent/typescript-only.ts similarity index 100% rename from tests/format/typescript/typeparams/consistent/typescript-only.ts rename to tests/format/typescript/type-params/consistent/typescript-only.ts diff --git a/tests/format/typescript/typeparams/const.ts b/tests/format/typescript/type-params/const.ts similarity index 100% rename from tests/format/typescript/typeparams/const.ts rename to tests/format/typescript/type-params/const.ts diff --git a/tests/format/typescript/type-params/empty-parameters-with-arrow-function/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..be69c5e7830e --- /dev/null +++ b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/__snapshots__/format.test.js.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-13817.ts - {"arrowParens":"avoid","trailingComma":"all"} format 1`] = ` +====================================options===================================== +arrowParens: "avoid" +parsers: ["typescript", "flow"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1: xxxxxxxxxxxxxxxxxxxxxx<> = + arg => null; + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = + arg => null; + + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3: xxxxxxxxxxxxxxxxxxxxxx< + // comment +> = + arg => null; + +=====================================output===================================== +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1: xxxxxxxxxxxxxxxxxxxxxx<> = + arg => null; + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = + arg => null; + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3: xxxxxxxxxxxxxxxxxxxxxx< + // comment +> = arg => null; + +================================================================================ +`; diff --git a/tests/format/typescript/type-params/empty-parameters-with-arrow-function/format.test.js b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/format.test.js new file mode 100644 index 000000000000..f7338aaecf5d --- /dev/null +++ b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/format.test.js @@ -0,0 +1,6 @@ +runFormatTest( + import.meta, + ["typescript", "flow"], + // #13817 require those options to reproduce + { arrowParens: "avoid", trailingComma: "all" }, +); diff --git a/tests/format/typescript/type-params/empty-parameters-with-arrow-function/issue-13817.ts b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/issue-13817.ts new file mode 100644 index 000000000000..d7392c76371d --- /dev/null +++ b/tests/format/typescript/type-params/empty-parameters-with-arrow-function/issue-13817.ts @@ -0,0 +1,11 @@ +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1: xxxxxxxxxxxxxxxxxxxxxx<> = + arg => null; + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = + arg => null; + + +const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3: xxxxxxxxxxxxxxxxxxxxxx< + // comment +> = + arg => null; diff --git a/tests/format/typescript/type-params/format.test.js b/tests/format/typescript/type-params/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/type-params/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/type-params/line-breaking-after-extends-2.ts b/tests/format/typescript/type-params/line-breaking-after-extends-2.ts new file mode 100644 index 000000000000..75922ce660ee --- /dev/null +++ b/tests/format/typescript/type-params/line-breaking-after-extends-2.ts @@ -0,0 +1,33 @@ +a = { + parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod, + >() {} +} + +function parseFunctionBodyAndFinish< + T extends + | N.Function + | N.TSDeclareMethod + | N.TSDeclareFunction + | N.ClassPrivateMethod + | Foo + | Bar + | Baz +>(); + +function parseFunctionBodyAndFinish< + T extends // comment + N.Function | N.TSDeclareMethod | Baz +>(); + +function makeChainWalker< + ArgT extends { + options: ValidatedOptions; + dirname: string; + filepath?: string; + }, +>() {} diff --git a/tests/format/typescript/type-params/line-breaking-after-extends.ts b/tests/format/typescript/type-params/line-breaking-after-extends.ts new file mode 100644 index 000000000000..678990b47632 --- /dev/null +++ b/tests/format/typescript/type-params/line-breaking-after-extends.ts @@ -0,0 +1,17 @@ +export type OuterType1< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerOtherType<OneMoreType> +> = { a: 1 }; + +export type OuterType2< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLongerLongerLongerOtherType +> = { a: 1 }; + +export type OuterType3< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLo.ngerLongerLongerOtherType +> = { a: 1 }; + +export type OuterType4< + LongerLongerLongerLongerInnerType extends + | LongerLongerLongerLongerLongerLo + | ngerLongerLongerOtherType +> = { a: 1 }; diff --git a/tests/format/typescript/typeparams/long-function-arg.ts b/tests/format/typescript/type-params/long-function-arg.ts similarity index 100% rename from tests/format/typescript/typeparams/long-function-arg.ts rename to tests/format/typescript/type-params/long-function-arg.ts diff --git a/tests/format/typescript/type-params/print-width-120/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/print-width-120/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f90f92763eeb --- /dev/null +++ b/tests/format/typescript/type-params/print-width-120/__snapshots__/format.test.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`issue-7542.tsx - {"printWidth":120} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 120 + | printWidth +=====================================input====================================== +export const Foo = forwardRef((props: FooProps, ref: Ref<HTMLElement>): JSX.Element => { + return <div />; +}); + +export const Bar = forwardRef((props: BarProps, ref: Ref<HTMLElement>): JSX.Element | null => { + return <div />; +}); + +users.map((user: User): User => { + return user; +}) + +users.map((user: User): User => { + ; // comment +}) + +users.map((user: User): User => { + // comment +}) + +=====================================output===================================== +export const Foo = forwardRef((props: FooProps, ref: Ref<HTMLElement>): JSX.Element => { + return <div />; +}); + +export const Bar = forwardRef((props: BarProps, ref: Ref<HTMLElement>): JSX.Element | null => { + return <div />; +}); + +users.map((user: User): User => { + return user; +}); + +users.map((user: User): User => { + // comment +}); + +users.map((user: User): User => { + // comment +}); + +================================================================================ +`; diff --git a/tests/format/typescript/type-params/print-width-120/format.test.js b/tests/format/typescript/type-params/print-width-120/format.test.js new file mode 100644 index 000000000000..c9638f6efd3a --- /dev/null +++ b/tests/format/typescript/type-params/print-width-120/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"], { printWidth: 120 }); diff --git a/tests/format/typescript/typeparams/print-width-120/issue-7542.ts b/tests/format/typescript/type-params/print-width-120/issue-7542.tsx similarity index 100% rename from tests/format/typescript/typeparams/print-width-120/issue-7542.ts rename to tests/format/typescript/type-params/print-width-120/issue-7542.tsx diff --git a/tests/format/typescript/typeparams/tagged-template-expression.ts b/tests/format/typescript/type-params/tagged-template-expression.ts similarity index 100% rename from tests/format/typescript/typeparams/tagged-template-expression.ts rename to tests/format/typescript/type-params/tagged-template-expression.ts diff --git a/tests/format/typescript/type-params/trailing-comma/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/trailing-comma/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a2f4e64c876b --- /dev/null +++ b/tests/format/typescript/type-params/trailing-comma/__snapshots__/format.test.js.snap @@ -0,0 +1,61 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`type-paramters.ts - {"trailingComma":"all"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "all" + | printWidth +=====================================input====================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something<FirstParam, SecondParam>; +type ShortName = Something<FirstParam, SecondParam>; + +=====================================output===================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something< + FirstParam, + SecondParam +>; +type ShortName = Something<FirstParam, SecondParam>; + +================================================================================ +`; + +exports[`type-paramters.ts - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something<FirstParam, SecondParam>; +type ShortName = Something<FirstParam, SecondParam>; + +=====================================output===================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something< + FirstParam, + SecondParam +>; +type ShortName = Something<FirstParam, SecondParam>; + +================================================================================ +`; + +exports[`type-paramters.ts - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something<FirstParam, SecondParam>; +type ShortName = Something<FirstParam, SecondParam>; + +=====================================output===================================== +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something< + FirstParam, + SecondParam +>; +type ShortName = Something<FirstParam, SecondParam>; + +================================================================================ +`; diff --git a/tests/format/typescript/type-params/trailing-comma/format.test.js b/tests/format/typescript/type-params/trailing-comma/format.test.js new file mode 100644 index 000000000000..4fe8f803b6c7 --- /dev/null +++ b/tests/format/typescript/type-params/trailing-comma/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["typescript"], { trailingComma: "none" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["typescript"], { trailingComma: "all" }); diff --git a/tests/format/typescript/type-params/trailing-comma/type-paramters.ts b/tests/format/typescript/type-params/trailing-comma/type-paramters.ts new file mode 100644 index 000000000000..4d2c96c92a53 --- /dev/null +++ b/tests/format/typescript/type-params/trailing-comma/type-paramters.ts @@ -0,0 +1,2 @@ +type FooThisNameIsVeryLongSoThatItBreaksToTheNextLine = Something<FirstParam, SecondParam>; +type ShortName = Something<FirstParam, SecondParam>; diff --git a/tests/format/typescript/typeof-this/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeof-this/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/typeof-this/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/typeof-this/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/typeof-this/format.test.js b/tests/format/typescript/typeof-this/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/typeof-this/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/typeof-this/jsfmt.spec.js b/tests/format/typescript/typeof-this/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/typeof-this/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/typeof/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeof/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/typeof/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/typeof/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/typeof/format.test.js b/tests/format/typescript/typeof/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/typeof/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/typeof/jsfmt.spec.js b/tests/format/typescript/typeof/jsfmt.spec.js deleted file mode 100644 index f7bac65988e0..000000000000 --- a/tests/format/typescript/typeof/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript", "flow"]); diff --git a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 43e06f60cdd0..000000000000 --- a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,425 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`class-method.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -// https://github.com/prettier/prettier/issues/4070 -export class Thing implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => {}); -} - -export class Thing2 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); -} - -export class Thing3 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type) => { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); -} - -export class Thing4 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => type.doSomething()); -} - -export class Thing5 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => <any>type.doSomething()); -} - -export class Thing6 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider<Opts> => <Provider<Opts>>type.doSomething()); -} - -export class Thing7 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => <Provider<Opts>>type.doSomething()); -} - -export class Thing8 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => <Provider<Opts>>type.doSomething(withArgs, soIt, does, not, fit).extraCall()); -} - -export class Thing9 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => type.doSomething()); -} - -export class Thing10 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((veryLongArgName: ObjectType): Provider<Options, MoreOptions> => veryLongArgName ); -} - -export class Thing11 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType): Provider => {}); -} - -// regular non-arrow functions - -export class Thing12 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return type}); -} - -export class Thing13 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); -} - -export class Thing14 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type) { const someVar = doSomething(type); if (someVar) {return someVar.method()} return false;}); -} - -export class Thing15 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return type.doSomething()}); -} - -export class Thing16 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return <any>type.doSomething()}); -} - -export class Thing17 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider<Opts> {return <Provider<Opts>>type.doSomething()}); -} - -export class Thing18 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) {return <Provider<Opts>>type.doSomething()}); -} - -export class Thing19 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) { return <Provider<Opts>>type.doSomething(withArgs, soIt, does, not, fit).extraCall()}); -} - -export class Thing20 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType) {return type.doSomething()}); -} - -export class Thing21 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(veryLongArgName: ObjectType): Provider<Options, MoreOptions> { return veryLongArgName }); -} - -export class Thing22 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function(type: ObjectType): Provider {}); -} - - -// case from https://github.com/prettier/prettier/issues/2581 - -const appIDs = createSelector( - PubXURLParams.APP_IDS, - (rawAppIDs): Array<AppID> => deserializeList(rawAppIDs), -); -=====================================output===================================== -// https://github.com/prettier/prettier/issues/4070 -export class Thing implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider<Opts> => {} - ); -} - -export class Thing2 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider<Opts> => { - const someVar = doSomething(type); - if (someVar) { - return someVar.method(); - } - return false; - } - ); -} - -export class Thing3 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type) => { - const someVar = doSomething(type); - if (someVar) { - return someVar.method(); - } - return false; - }); -} - -export class Thing4 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider<Opts> => type.doSomething() - ); -} - -export class Thing5 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider<Opts> => <any>type.doSomething() - ); -} - -export class Thing6 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider<Opts> => <Provider<Opts>>type.doSomething() - ); -} - -export class Thing7 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType) => <Provider<Opts>>type.doSomething() - ); -} - -export class Thing8 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType) => - <Provider<Opts>>( - type.doSomething(withArgs, soIt, does, not, fit).extraCall() - ) - ); -} - -export class Thing9 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize((type: ObjectType) => - type.doSomething() - ); -} - -export class Thing10 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (veryLongArgName: ObjectType): Provider<Options, MoreOptions> => - veryLongArgName - ); -} - -export class Thing11 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize( - (type: ObjectType): Provider => {} - ); -} - -// regular non-arrow functions - -export class Thing12 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider<Opts> { - return type; - }); -} - -export class Thing13 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider<Opts> { - const someVar = doSomething(type); - if (someVar) { - return someVar.method(); - } - return false; - }); -} - -export class Thing14 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function (type) { - const someVar = doSomething(type); - if (someVar) { - return someVar.method(); - } - return false; - }); -} - -export class Thing15 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider<Opts> { - return type.doSomething(); - }); -} - -export class Thing16 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider<Opts> { - return <any>type.doSomething(); - }); -} - -export class Thing17 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider<Opts> { - return <Provider<Opts>>type.doSomething(); - }); -} - -export class Thing18 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { - return <Provider<Opts>>type.doSomething(); - }); -} - -export class Thing19 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { - return <Provider<Opts>>( - type.doSomething(withArgs, soIt, does, not, fit).extraCall() - ); - }); -} - -export class Thing20 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function (type: ObjectType) { - return type.doSomething(); - }); -} - -export class Thing21 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - veryLongArgName: ObjectType - ): Provider<Options, MoreOptions> { - return veryLongArgName; - }); -} - -export class Thing22 implements OtherThing { - do: (type: Type) => Provider<Prop> = memoize(function ( - type: ObjectType - ): Provider {}); -} - -// case from https://github.com/prettier/prettier/issues/2581 - -const appIDs = createSelector( - PubXURLParams.APP_IDS, - (rawAppIDs): Array<AppID> => deserializeList(rawAppIDs) -); - -================================================================================ -`; - -exports[`const.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -function a<const T>() {} -function b<const T extends U>() {} -function c<T, const U>() {} -declare function d<const T>(); -<const T>() => {}; -<const T extends U>() => {}; -(function <const T>() {}); -(function <const T extends U>() {}); -(function <T, const U>() {}); - -class A<const T> {} -class B<const T extends U> {} -class C<T, const U> {} -class D<in const T> {} -class E<const in T> {} -(class <const T> {}); -(class <const T extends U> {}); -(class <T, const U> {}); -(class <in const T> {}); -(class <const in T> {}); - -interface I<const T> {} -interface J<const T extends U> {} -interface K<T, const U> {} -interface L<in const T> {} -interface M<const in T> {} - -class _ { - method<const T>() {} - method<const T extends U>() {} - method<T, const U>() {} -} - -=====================================output===================================== -function a<const T>() {} -function b<const T extends U>() {} -function c<T, const U>() {} -declare function d<const T>(); -<const T>() => {}; -<const T extends U>() => {}; -(function <const T>() {}); -(function <const T extends U>() {}); -(function <T, const U>() {}); - -class A<const T> {} -class B<const T extends U> {} -class C<T, const U> {} -class D<const in T> {} -class E<const in T> {} -(class<const T> {}); -(class<const T extends U> {}); -(class<T, const U> {}); -(class<const in T> {}); -(class<const in T> {}); - -interface I<const T> {} -interface J<const T extends U> {} -interface K<T, const U> {} -interface L<const in T> {} -interface M<const in T> {} - -class _ { - method<const T>() {} - method<const T extends U>() {} - method<T, const U>() {} -} - -================================================================================ -`; - -exports[`long-function-arg.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const forwardS = R.curry( - <V,T>(prop: string, reducer: ReducerFunction<V, T>, value: V, state: {[name: string]: T}) => - R.assoc(prop, reducer(value, state[prop]), state) -) - -export const forwardS1 = R.curry( - <VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV, TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT>(prop: string, reducer: ReducerFunction<V, T>, value: V, state: {[name: string]: T}) => - R.assoc(prop, reducer(value, state[prop]), state) -) - - -=====================================output===================================== -export const forwardS = R.curry( - <V, T>( - prop: string, - reducer: ReducerFunction<V, T>, - value: V, - state: { [name: string]: T } - ) => R.assoc(prop, reducer(value, state[prop]), state) -); - -export const forwardS1 = R.curry( - < - VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV, - TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT - >( - prop: string, - reducer: ReducerFunction<V, T>, - value: V, - state: { [name: string]: T } - ) => R.assoc(prop, reducer(value, state[prop]), state) -); - -================================================================================ -`; - -exports[`tagged-template-expression.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export const RedBox = styled.div<{foo: string}>\` - background: red; - \${props => props.foo} -\`; - -=====================================output===================================== -export const RedBox = styled.div<{ foo: string }>\` - background: red; - \${(props) => props.foo} -\`; - -================================================================================ -`; diff --git a/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d8a5c91d4ae9..000000000000 --- a/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`flow-only.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== - -const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<empty> = a; -const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<mixed> = a; - -=====================================output===================================== -const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<empty> = - a; -const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<mixed> = - a; - -================================================================================ -`; - -exports[`issue-9501.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const name: SomeGeneric< - Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP"> -> = null; - -=====================================output===================================== -const name: SomeGeneric<Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP">> = - null; - -================================================================================ -`; - -exports[`simple-types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<any> = a; -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<null> = a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<this> = a; -const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<void> = a; -const foo5: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = a; -const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<false> = a; -const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = a; -const foo8: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = a; -const foo9: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; -const foo10: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; -const foo11: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xDeeD_Beef> = a; -const foo12: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xDeeD_Beefn> = a; - -=====================================output===================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<any> = - a; -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<null> = - a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<this> = - a; -const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<void> = - a; -const foo5: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = - a; -const foo6: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<false> = - a; -const foo7: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = - a; -const foo8: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<true> = - a; -const foo9: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = - a; -const foo10: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = - a; -const foo11: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xdeed_beef> = - a; -const foo12: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0xdeed_beefn> = - a; - -================================================================================ -`; - -exports[`template-literal-types.ts [babel-flow] format 1`] = ` -"Unexpected token (1:84) -> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; - | ^ - 2 |" -`; - -exports[`template-literal-types.ts [flow] format 1`] = ` -"Unexpected token \`\`\`, expected a type (1:84) -> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; - | ^ - 2 |" -`; - -exports[`template-literal-types.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; - -=====================================output===================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = - a; - -================================================================================ -`; - -exports[`typescript-only.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 - | printWidth -=====================================input====================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<never> = a; -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<object> = a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<undefined> = a; -const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<unknown> = a; - -=====================================output===================================== -const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<never> = - a; -const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<object> = - a; -const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<undefined> = - a; -const foo4: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<unknown> = - a; - -================================================================================ -`; diff --git a/tests/format/typescript/typeparams/consistent/jsfmt.spec.js b/tests/format/typescript/typeparams/consistent/jsfmt.spec.js deleted file mode 100644 index e590e7f2ad52..000000000000 --- a/tests/format/typescript/typeparams/consistent/jsfmt.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -run_spec(__dirname, ["typescript", "flow", "babel-flow"], { - errors: { - flow: ["template-literal-types.ts"], - "babel-flow": ["template-literal-types.ts"], - }, -}); diff --git a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index b3ba94b7dfa8..000000000000 --- a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-13817.ts - {"arrowParens":"avoid","trailingComma":"all"} format 1`] = ` -====================================options===================================== -arrowParens: "avoid" -parsers: ["typescript", "flow", "babel-flow"] -printWidth: 80 -trailingComma: "all" - | printWidth -=====================================input====================================== -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<> = - arg => null; - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = - arg => null; - - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx< - // comment -> = - arg => null; - -=====================================output===================================== -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<> = - arg => null; - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = - arg => null; - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx< - // comment -> = arg => null; - -================================================================================ -`; diff --git a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/issue-13817.ts b/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/issue-13817.ts deleted file mode 100644 index de3013df4f94..000000000000 --- a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/issue-13817.ts +++ /dev/null @@ -1,11 +0,0 @@ -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx<> = - arg => null; - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx</* comment */> = - arg => null; - - -const xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxx< - // comment -> = - arg => null; diff --git a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js b/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js deleted file mode 100644 index 4938c4f38220..000000000000 --- a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js +++ /dev/null @@ -1,6 +0,0 @@ -run_spec( - __dirname, - ["typescript", "flow", "babel-flow"], - // #13817 require those options to reproduce - { arrowParens: "avoid", trailingComma: "all" } -); diff --git a/tests/format/typescript/typeparams/jsfmt.spec.js b/tests/format/typescript/typeparams/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/typeparams/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 666c9bb037c4..000000000000 --- a/tests/format/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,51 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`issue-7542.ts - {"printWidth":120} format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 120 - | printWidth -=====================================input====================================== -export const Foo = forwardRef((props: FooProps, ref: Ref<HTMLElement>): JSX.Element => { - return <div />; -}); - -export const Bar = forwardRef((props: BarProps, ref: Ref<HTMLElement>): JSX.Element | null => { - return <div />; -}); - -users.map((user: User): User => { - return user; -}) - -users.map((user: User): User => { - ; // comment -}) - -users.map((user: User): User => { - // comment -}) - -=====================================output===================================== -export const Foo = forwardRef((props: FooProps, ref: Ref<HTMLElement>): JSX.Element => { - return <div />; -}); - -export const Bar = forwardRef((props: BarProps, ref: Ref<HTMLElement>): JSX.Element | null => { - return <div />; -}); - -users.map((user: User): User => { - return user; -}); - -users.map((user: User): User => { - // comment -}); - -users.map((user: User): User => { - // comment -}); - -================================================================================ -`; diff --git a/tests/format/typescript/typeparams/print-width-120/jsfmt.spec.js b/tests/format/typescript/typeparams/print-width-120/jsfmt.spec.js deleted file mode 100644 index fabcb10c9c8d..000000000000 --- a/tests/format/typescript/typeparams/print-width-120/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"], { printWidth: 120 }); diff --git a/tests/format/typescript/union/__snapshots__/format.test.js.snap b/tests/format/typescript/union/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1328eb465979 --- /dev/null +++ b/tests/format/typescript/union/__snapshots__/format.test.js.snap @@ -0,0 +1,442 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +)[]; // Final comment1 + +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +) & Bar; // Final comment2 + +=====================================output===================================== +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +)[]; // Final comment1 + +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +) & + Bar; // Final comment2 + +================================================================================ +`; + +exports[`inlining.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +interface RelayProps { + articles: a | null, +} +interface RelayProps { + articles: Array<{ + __id: string, + } | null> | null | void, +} + +interface RelayProps { + articles: Array<{ + __id: string, + } | null> + | null // articles type may be null + | void, // articles type may be void +} + +type FooBar = null // null +| { /** x **/ + y: number; + z: string; +} // this documents the first option + | void // this documents the second option + ; + +type FooBarWithoutComment = null + | { + y: number; + z: string; +} + | void + ; + +type FooBar2 = + | Number // this documents the first option + | void // this documents the second option + ; + +type UploadState<E, EM, D> + // The upload hasnt begun yet + = {type: "Not_begun"} + // The upload timed out + | {type: "Timed_out"} + // Failed somewhere on the line + | {type: "Failed", error: E, errorMsg: EM} + // Uploading to aws3 and CreatePostMutation succeeded + | {type: "Success", data: D}; + +type UploadState2<E, EM, D> + // The upload hasnt begun yet + = A + // The upload timed out + | B + // Failed somewhere on the line + | C + // Uploading to aws3 and CreatePostMutation succeeded + | D; + +type window = Window & { + __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function; +}; + +type T1 = (number | string)["toString"]; +type T2 = ((number | string))["toString"]; +type T3 = (((number | string)))["toString"]; +type T4 = ((((number | string))))["toString"]; +type T5 = number | ((arg: any) => void); +type T6 = number | (((arg: any) => void)); +type T7 = number | ((((arg: any) => void))); +type T8 = number | (((((arg: any) => void)))); + +=====================================output===================================== +interface RelayProps { + articles: a | null; +} +interface RelayProps { + articles: Array<{ + __id: string; + } | null> | null | void; +} + +interface RelayProps { + articles: + | Array<{ + __id: string; + } | null> + | null // articles type may be null + | void; // articles type may be void +} + +type FooBar = + | null // null + | { + /** x **/ y: number; + z: string; + } // this documents the first option + | void; // this documents the second option + +type FooBarWithoutComment = null | { + y: number; + z: string; +} | void; + +type FooBar2 = + | Number // this documents the first option + | void; // this documents the second option + +type UploadState<E, EM, D> = + // The upload hasnt begun yet + | { type: "Not_begun" } + // The upload timed out + | { type: "Timed_out" } + // Failed somewhere on the line + | { type: "Failed"; error: E; errorMsg: EM } + // Uploading to aws3 and CreatePostMutation succeeded + | { type: "Success"; data: D }; + +type UploadState2<E, EM, D> = + // The upload hasnt begun yet + | A + // The upload timed out + | B + // Failed somewhere on the line + | C + // Uploading to aws3 and CreatePostMutation succeeded + | D; + +type window = Window & { + __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function; +}; + +type T1 = (number | string)["toString"]; +type T2 = (number | string)["toString"]; +type T3 = (number | string)["toString"]; +type T4 = (number | string)["toString"]; +type T5 = number | ((arg: any) => void); +type T6 = number | ((arg: any) => void); +type T7 = number | ((arg: any) => void); +type T8 = number | ((arg: any) => void); + +================================================================================ +`; + +exports[`union-parens.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== + +export type A = ( + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type B = ( + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +); + +export type C = + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string | number)[]; + +function f(): (string | number) {} + +var x: (string | number); +var y: ((string | number)); + +class Foo<T extends (string | number)> {} + +interface Interface { + i: (X | Y) & Z; + j: Partial<(X | Y)>; +} + +type State = { + sharedProperty: any; +} & ( + | { discriminant: "FOO"; foo: any } + | { discriminant: "BAR"; bar: any } + | { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + | string + | undefined +)[]; + +const foo2: ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + | foo + | ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1 : C; +let a2 : | C; +let a3 : (| C); +let a4 : | (C); +let a5 : (| (C)); +let a6 : /*1*/ | C; +let a7 : /*1*/ | (C); +let a8 : /*1*/ (| C); +let a9 : (/*1*/ | C); +let a10: /*1*/ | /*2*/ C; +let a11: /*1*/ (| /*2*/ C); + +let aa1: /*1*/ | /*2*/ C | D; +let aa2: /*1*/ | /*2*/ C | /*3*/ D; +let aa3: /*1*/ | /*2*/ C | /*3*/ D /*4*/; + +type A1 = C; +type A2 = | C; +type A3 = (| C); +type A4 = | (C); +type A5 = (| (C)); +type A6 = /*1*/ | C; +type A7 = /*1*/ | (C); +type A8 = /*1*/ (| C); +type A9 = (/*1*/ | C); +type A10 = /*1*/ | /*2*/ C; +type A11 = /*1*/ (| /*2*/ C); +type A12 = /*1*/ | ( (C)); +type A13 = /*1*/ ( (C)); + +type Aa1 = /*1*/ | /*2*/ C | D; +type Aa2 = /*1*/ | /*2*/ C | /*3*/ D; +type Aa3 = /*1*/ | /*2*/ C | /*3*/ D /*4*/; + +type C1 = /*1*/ & a | b; +type C2 = /*1*/ & a | (b); +type C3 = /*1*/ & a | (& b); +type C4 = /*1*/ & (a | b); +type C5 = /*1*/ (& a | b); +type C6 /*0*/ = /*1*/ (& a | b); + +type Ctor = (new () => X) | Y; + +=====================================output===================================== +export type A = + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type B = + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type C = + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type D = + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; + +export type Multi = (string | number)[]; + +function f(): string | number {} + +var x: string | number; +var y: string | number; + +class Foo<T extends string | number> {} + +interface Interface { + i: (X | Y) & Z; + j: Partial<X | Y>; +} + +type State = { + sharedProperty: any; +} & ( + | { discriminant: "FOO"; foo: any } + | { discriminant: "BAR"; bar: any } + | { discriminant: "BAZ"; baz: any } +); + +const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( + | string + | undefined +)[]; + +const foo2: ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +)[] = []; + +const foo3: keyof ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +) = bar; + +const foo4: + | foo + | ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ) = bar; + +let a1: C; +let a2: C; +let a3: C; +let a4: C; +let a5: C; +let a6: /*1*/ C; +let a7: /*1*/ C; +let a8: /*1*/ C; +let a9: /*1*/ C; +let a10: /*1*/ /*2*/ C; +let a11: /*1*/ /*2*/ C; + +let aa1: /*1*/ /*2*/ C | D; +let aa2: /*1*/ /*2*/ C | /*3*/ D; +let aa3: /*1*/ /*2*/ C | /*3*/ D /*4*/; + +type A1 = C; +type A2 = C; +type A3 = C; +type A4 = C; +type A5 = C; +type A6 /*1*/ = C; +type A7 /*1*/ = C; +type A8 /*1*/ = C; +type A9 /*1*/ = C; +type A10 /*1*/ = /*2*/ C; +type A11 /*1*/ = /*2*/ C; +type A12 /*1*/ = C; +type A13 = /*1*/ C; + +type Aa1 = /*1*/ /*2*/ C | D; +type Aa2 = /*1*/ /*2*/ C | /*3*/ D; +type Aa3 = /*1*/ /*2*/ C | /*3*/ D /*4*/; + +type C1 = /*1*/ a | b; +type C2 = /*1*/ a | b; +type C3 = /*1*/ a | b; +type C4 /*1*/ = a | b; +type C5 = /*1*/ a | b; +type C6 /*0*/ = /*1*/ a | b; + +type Ctor = (new () => X) | Y; + +================================================================================ +`; + +exports[`with-type-params.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type GetChatsSagaEffects = + | CallEffect + | PutEffect< + | GetUsersRequestedAction + | GetChatsSucceededAction + | GetChatsFailedAction + | GetChatsStartedAction + > + | SelectEffect + +=====================================output===================================== +type GetChatsSagaEffects = + | CallEffect + | PutEffect< + | GetUsersRequestedAction + | GetChatsSucceededAction + | GetChatsFailedAction + | GetChatsStartedAction + > + | SelectEffect; + +================================================================================ +`; diff --git a/tests/format/typescript/union/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/union/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d623a247629f..000000000000 --- a/tests/format/typescript/union/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,618 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`comments.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A1 = a /* 1 */ | b; -type A2 = a | /* 1 */ b; -type A3 = (a /* 1 */) | b; -type A4 = a | (/* 1 */ b); -type A5 = (a) /* 1 */ | b; -type A6 = a | /* 1 */ (b); - -type B1 = a /* 1 */ /* 2 */ | b; -type B2 = a /* 1 */ | /* 2 */ b; -type B3 = a | /* 1 */ /* 2 */ b; - -=====================================output===================================== -type A1 = a /* 1 */ | b; -type A2 = a | /* 1 */ b; -type A3 = a /* 1 */ | b; -type A4 = a | /* 1 */ b; -type A5 = a /* 1 */ | b; -type A6 = a | /* 1 */ b; - -type B1 = a /* 1 */ /* 2 */ | b; -type B2 = a /* 1 */ | /* 2 */ b; -type B3 = a | /* 1 */ /* 2 */ b; - -================================================================================ -`; - -exports[`inlining.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -interface RelayProps { - articles: a | null, -} -interface RelayProps { - articles: Array<{ - __id: string, - } | null> | null | void, -} - -type UploadState<E, EM, D> - // The upload hasnt begun yet - = {type: "Not_begun"} - // The upload timed out - | {type: "Timed_out"} - // Failed somewhere on the line - | {type: "Failed", error: E, errorMsg: EM} - // Uploading to aws3 and CreatePostMutation succeeded - | {type: "Success", data: D}; - -type UploadState2<E, EM, D> - // The upload hasnt begun yet - = A - // The upload timed out - | B - // Failed somewhere on the line - | C - // Uploading to aws3 and CreatePostMutation succeeded - | D; - -type window = Window & { - __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function; -}; - -type T1 = (number | string)["toString"]; -type T2 = ((number | string))["toString"]; -type T3 = (((number | string)))["toString"]; -type T4 = ((((number | string))))["toString"]; -type T5 = number | ((arg: any) => void); -type T6 = number | (((arg: any) => void)); -type T7 = number | ((((arg: any) => void))); -type T8 = number | (((((arg: any) => void)))); - -=====================================output===================================== -interface RelayProps { - articles: a | null; -} -interface RelayProps { - articles: Array<{ - __id: string; - } | null> | null | void; -} - -type UploadState<E, EM, D> = - // The upload hasnt begun yet - | { type: "Not_begun" } - // The upload timed out - | { type: "Timed_out" } - // Failed somewhere on the line - | { type: "Failed"; error: E; errorMsg: EM } - // Uploading to aws3 and CreatePostMutation succeeded - | { type: "Success"; data: D }; - -type UploadState2<E, EM, D> = - // The upload hasnt begun yet - | A - // The upload timed out - | B - // Failed somewhere on the line - | C - // Uploading to aws3 and CreatePostMutation succeeded - | D; - -type window = Window & { - __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function; -}; - -type T1 = (number | string)["toString"]; -type T2 = (number | string)["toString"]; -type T3 = (number | string)["toString"]; -type T4 = (number | string)["toString"]; -type T5 = number | ((arg: any) => void); -type T6 = number | ((arg: any) => void); -type T7 = number | ((arg: any) => void); -type T8 = number | ((arg: any) => void); - -================================================================================ -`; - -exports[`prettier-ignore.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -export type a = - // foo - | foo1&foo2 - // bar - | bar1&bar2 - // prettier-ignore - | qux1&qux2; - -export type a = - // foo - | foo1&foo2 - // bar - | bar1&bar2 - // prettier-ignore - | qux1&qux2 - // baz - | baz1&baz2; - -export type a = - // prettier-ignore - | foo1&foo2 - // bar - | bar1&bar2 - // qux - | qux1&qux2; - -=====================================output===================================== -export type a = - // foo - | (foo1 & foo2) - // bar - | (bar1 & bar2) - // prettier-ignore - | qux1&qux2; - -export type a = - // foo - | (foo1 & foo2) - // bar - | (bar1 & bar2) - // prettier-ignore - | qux1&qux2 - // baz - | (baz1 & baz2); - -export type a = - // prettier-ignore - | foo1&foo2 - // bar - | (bar1 & bar2) - // qux - | (qux1 & qux2); - -================================================================================ -`; - -exports[`union-parens.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== - -export type A = ( - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -); - -export type B = ( - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -); - -export type C = - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type D = - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type Multi = (string | number)[]; - -function f(): (string | number) {} - -var x: (string | number); -var y: ((string | number)); - -class Foo<T extends (string | number)> {} - -interface Interface { - i: (X | Y) & Z; - j: Partial<(X | Y)>; -} - -type State = { - sharedProperty: any; -} & ( - | { discriminant: "FOO"; foo: any } - | { discriminant: "BAR"; bar: any } - | { discriminant: "BAZ"; baz: any } -); - -const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( - | string - | undefined -)[]; - -const foo2: ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -)[] = []; - -const foo3: keyof ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -) = bar; - -const foo4: - | foo - | ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) = bar; - -let a1 : C; -let a2 : | C; -let a3 : (| C); -let a4 : | (C); -let a5 : (| (C)); -let a6 : /*1*/ | C; -let a7 : /*1*/ | (C); -let a8 : /*1*/ (| C); -let a9 : (/*1*/ | C); -let a10: /*1*/ | /*2*/ C; -let a11: /*1*/ (| /*2*/ C); - -let aa1: /*1*/ | /*2*/ C | D; -let aa2: /*1*/ | /*2*/ C | /*3*/ D; -let aa3: /*1*/ | /*2*/ C | /*3*/ D /*4*/; - -type A1 = C; -type A2 = | C; -type A3 = (| C); -type A4 = | (C); -type A5 = (| (C)); -type A6 = /*1*/ | C; -type A7 = /*1*/ | (C); -type A8 = /*1*/ (| C); -type A9 = (/*1*/ | C); -type A10 = /*1*/ | /*2*/ C; -type A11 = /*1*/ (| /*2*/ C); -type A12 = /*1*/ | ( (C)); -type A13 = /*1*/ ( (C)); - -type Aa1 = /*1*/ | /*2*/ C | D; -type Aa2 = /*1*/ | /*2*/ C | /*3*/ D; -type Aa3 = /*1*/ | /*2*/ C | /*3*/ D /*4*/; - -type C1 = /*1*/ & a | b; -type C2 = /*1*/ & a | (b); -type C3 = /*1*/ & a | (& b); -type C4 = /*1*/ & (a | b); -type C5 = /*1*/ (& a | b); -type C6 /*0*/ = /*1*/ (& a | b); - -type Ctor = (new () => X) | Y; - -=====================================output===================================== -export type A = - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type B = - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type C = - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type D = - | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; - -export type Multi = (string | number)[]; - -function f(): string | number {} - -var x: string | number; -var y: string | number; - -class Foo<T extends string | number> {} - -interface Interface { - i: (X | Y) & Z; - j: Partial<X | Y>; -} - -type State = { - sharedProperty: any; -} & ( - | { discriminant: "FOO"; foo: any } - | { discriminant: "BAR"; bar: any } - | { discriminant: "BAZ"; baz: any } -); - -const foo1 = [abc, def, ghi, jkl, mno, pqr, stu, vwx, yz] as ( - | string - | undefined -)[]; - -const foo2: ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -)[] = []; - -const foo3: keyof ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -) = bar; - -const foo4: - | foo - | ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) = bar; - -let a1: C; -let a2: C; -let a3: C; -let a4: C; -let a5: C; -let a6: /*1*/ C; -let a7: /*1*/ C; -let a8: /*1*/ C; -let a9: /*1*/ C; -let a10: /*1*/ /*2*/ C; -let a11: /*1*/ /*2*/ C; - -let aa1: /*1*/ /*2*/ C | D; -let aa2: /*1*/ /*2*/ C | /*3*/ D; -let aa3: /*1*/ /*2*/ C | /*3*/ D /*4*/; - -type A1 = C; -type A2 = C; -type A3 = C; -type A4 = C; -type A5 = C; -type A6 = /*1*/ C; -type A7 = /*1*/ C; -type A8 = /*1*/ C; -type A9 = /*1*/ C; -type A10 = /*1*/ /*2*/ C; -type A11 = /*1*/ /*2*/ C; -type A12 = /*1*/ C; -type A13 = /*1*/ C; - -type Aa1 = /*1*/ /*2*/ C | D; -type Aa2 = /*1*/ /*2*/ C | /*3*/ D; -type Aa3 = /*1*/ /*2*/ C | /*3*/ D /*4*/; - -type C1 = /*1*/ a | b; -type C2 = /*1*/ a | b; -type C3 = /*1*/ a | b; -type C4 = /*1*/ a | b; -type C5 = /*1*/ a | b; -type C6 /*0*/ = /*1*/ a | b; - -type Ctor = (new () => X) | Y; - -================================================================================ -`; - -exports[`with-type-params.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type GetChatsSagaEffects = - | CallEffect - | PutEffect< - | GetUsersRequestedAction - | GetChatsSucceededAction - | GetChatsFailedAction - | GetChatsStartedAction - > - | SelectEffect - -=====================================output===================================== -type GetChatsSagaEffects = - | CallEffect - | PutEffect< - | GetUsersRequestedAction - | GetChatsSucceededAction - | GetChatsFailedAction - | GetChatsStartedAction - > - | SelectEffect; - -================================================================================ -`; - -exports[`within-tuple.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -type A = [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] - -type B = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -] - -type B1 = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) -] - -type C = [ - | [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] - | [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] -] - -type D = [ - (AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD), - (AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD) -] - -type D1 = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ), - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) -] - -type D2 = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD, - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -] - -type E = [ AA | BB, AA | BB ] - -type F = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD, - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB -] - -=====================================output===================================== -type A = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -]; - -type B = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -]; - -type B1 = [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD -]; - -type C = [ - | [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ] - | [ - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ] -]; - -type D = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ), - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) -]; - -type D1 = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ), - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) -]; - -type D2 = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ), - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ) -]; - -type E = [AA | BB, AA | BB]; - -type F = [ - ( - | AAAAAAAAAAAAAAAAAAAAAA - | BBBBBBBBBBBBBBBBBBBBBB - | CCCCCCCCCCCCCCCCCCCCCC - | DDDDDDDDDDDDDDDDDDDDDD - ), - AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB -]; - -================================================================================ -`; diff --git a/tests/format/typescript/union/comments.ts b/tests/format/typescript/union/comments.ts index d3f32ddd12d9..fac6e0706aaf 100644 --- a/tests/format/typescript/union/comments.ts +++ b/tests/format/typescript/union/comments.ts @@ -1,10 +1,9 @@ -type A1 = a /* 1 */ | b; -type A2 = a | /* 1 */ b; -type A3 = (a /* 1 */) | b; -type A4 = a | (/* 1 */ b); -type A5 = (a) /* 1 */ | b; -type A6 = a | /* 1 */ (b); +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +)[]; // Final comment1 -type B1 = a /* 1 */ /* 2 */ | b; -type B2 = a /* 1 */ | /* 2 */ b; -type B3 = a | /* 1 */ /* 2 */ b; +type Foo = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +) & Bar; // Final comment2 diff --git a/tests/format/typescript/union/consistent-with-flow/__snapshots__/format.test.js.snap b/tests/format/typescript/union/consistent-with-flow/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5e7e3dec0f4d --- /dev/null +++ b/tests/format/typescript/union/consistent-with-flow/__snapshots__/format.test.js.snap @@ -0,0 +1,412 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`comment.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = /* 4 */ ( + | A + | B +)[] + +=====================================output===================================== +type A1 = /* 4 */ (A | B)[]; + +================================================================================ +`; + +exports[`comments.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = a /* 1 */ | b; +type A2 = a | /* 1 */ b; +type A3 = (a /* 1 */) | b; +type A4 = a | (/* 1 */ b); +type A5 = (a) /* 1 */ | b; +type A6 = a | /* 1 */ (b); + +type B1 = a /* 1 */ /* 2 */ | b; +type B2 = a /* 1 */ | /* 2 */ b; +type B3 = a | /* 1 */ /* 2 */ b; + +=====================================output===================================== +type A1 = a /* 1 */ | b; +type A2 = a | /* 1 */ b; +type A3 = a /* 1 */ | b; +type A4 = a | /* 1 */ b; +type A5 = a /* 1 */ | b; +type A6 = a | /* 1 */ b; + +type B1 = a /* 1 */ /* 2 */ | b; +type B2 = a /* 1 */ | /* 2 */ b; +type B3 = a | /* 1 */ /* 2 */ b; + +================================================================================ +`; + +exports[`prettier-ignore.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +export type a = + // foo + | foo1&foo2 + // bar + | bar1&bar2 + // prettier-ignore + | qux1&qux2; + +export type b = + // foo + | foo1&foo2 + // bar + | bar1&bar2 + // prettier-ignore + | qux1&qux2 + // baz + | baz1&baz2; + +export type c = + // prettier-ignore + | foo1&foo2 + // bar + | bar1&bar2 + // qux + | qux1&qux2; + +=====================================output===================================== +export type a = + // foo + | (foo1 & foo2) + // bar + | (bar1 & bar2) + // prettier-ignore + | (qux1&qux2); + +export type b = + // foo + | (foo1 & foo2) + // bar + | (bar1 & bar2) + // prettier-ignore + | (qux1&qux2) + // baz + | (baz1 & baz2); + +export type c = + // prettier-ignore + | (foo1&foo2) + // bar + | (bar1 & bar2) + // qux + | (qux1 & qux2); + +================================================================================ +`; + +exports[`single-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = + | ( + | ( + | ( + | A + // A comment to force break + | B + ) + ) + ); +type A2 = + | ( + | ( + | A + // A comment to force break + | B + ) + | ( + | A + // A comment to force break + | B + ) + ); +type A3 = + | ( | ( + | A + // A comment to force break + | B + ) ); +type A4 = + | ( | ( | ( + | A + // A comment to force break + | B + ) ) ); +type A5 = + | ( + | ( + | { key: string } + | { key: string } + | { key: string } + | { key: string } + ) + | { key: string } + | { key: string } + ); +type A6 = | ( + /*1*/ | ( + | ( + | A + // A comment to force break + | B + ) + ) + ); + +type B1 = + | ( + & ( + ( + | A + // A comment to force break + | B + ) + ) + ); +type B2 = + | ( + & ( + | ( + & ( + ( + | A + // A comment to force break + | B + ) + ) + ) + ) + ); + +=====================================output===================================== +type A1 = + | A + // A comment to force break + | B; +type A2 = + | ( + | A + // A comment to force break + | B + ) + | ( + | A + // A comment to force break + | B + ); +type A3 = + | A + // A comment to force break + | B; +type A4 = + | A + // A comment to force break + | B; +type A5 = + | ({ key: string } | { key: string } | { key: string } | { key: string }) + | { key: string } + | { key: string }; +type A6 = /*1*/ + | A + // A comment to force break + | B; + +type B1 = + | A + // A comment to force break + | B; +type B2 = + | A + // A comment to force break + | B; + +================================================================================ +`; + +exports[`within-tuple.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A = [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] + +type B = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +] + +type B1 = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ) +] + +type C = [ + | [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] + | [AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD] +] + +type D = [ + (AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD), + (AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB | CCCCCCCCCCCCCCCCCCCCCC | DDDDDDDDDDDDDDDDDDDDDD) +] + +type D1 = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ) +] + +type D2 = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD +] + +type E = [ AA | BB, AA | BB ] + +type F = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB +] + +=====================================output===================================== +type A = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, +]; + +type B = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, +]; + +type B1 = [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, +]; + +type C = [ + | [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, + ] + | [ + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD, + ], +]; + +type D = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), +]; + +type D1 = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), +]; + +type D2 = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), +]; + +type E = [AA | BB, AA | BB]; + +type F = [ + ( + | AAAAAAAAAAAAAAAAAAAAAA + | BBBBBBBBBBBBBBBBBBBBBB + | CCCCCCCCCCCCCCCCCCCCCC + | DDDDDDDDDDDDDDDDDDDDDD + ), + AAAAAAAAAAAAAAAAAAAAAA | BBBBBBBBBBBBBBBBBBBBBB, +]; + +================================================================================ +`; diff --git a/tests/format/typescript/union/consistent-with-flow/comment.ts b/tests/format/typescript/union/consistent-with-flow/comment.ts new file mode 100644 index 000000000000..72ae3933979f --- /dev/null +++ b/tests/format/typescript/union/consistent-with-flow/comment.ts @@ -0,0 +1,4 @@ +type A1 = /* 4 */ ( + | A + | B +)[] diff --git a/tests/format/typescript/union/consistent-with-flow/comments.ts b/tests/format/typescript/union/consistent-with-flow/comments.ts new file mode 100644 index 000000000000..d3f32ddd12d9 --- /dev/null +++ b/tests/format/typescript/union/consistent-with-flow/comments.ts @@ -0,0 +1,10 @@ +type A1 = a /* 1 */ | b; +type A2 = a | /* 1 */ b; +type A3 = (a /* 1 */) | b; +type A4 = a | (/* 1 */ b); +type A5 = (a) /* 1 */ | b; +type A6 = a | /* 1 */ (b); + +type B1 = a /* 1 */ /* 2 */ | b; +type B2 = a /* 1 */ | /* 2 */ b; +type B3 = a | /* 1 */ /* 2 */ b; diff --git a/tests/format/typescript/union/consistent-with-flow/format.test.js b/tests/format/typescript/union/consistent-with-flow/format.test.js new file mode 100644 index 000000000000..0e7a632d1a9b --- /dev/null +++ b/tests/format/typescript/union/consistent-with-flow/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript", "flow"]); diff --git a/tests/format/typescript/union/prettier-ignore.ts b/tests/format/typescript/union/consistent-with-flow/prettier-ignore.ts similarity index 89% rename from tests/format/typescript/union/prettier-ignore.ts rename to tests/format/typescript/union/consistent-with-flow/prettier-ignore.ts index 786b59686337..3927f292e6dc 100644 --- a/tests/format/typescript/union/prettier-ignore.ts +++ b/tests/format/typescript/union/consistent-with-flow/prettier-ignore.ts @@ -6,7 +6,7 @@ export type a = // prettier-ignore | qux1&qux2; -export type a = +export type b = // foo | foo1&foo2 // bar @@ -16,7 +16,7 @@ export type a = // baz | baz1&baz2; -export type a = +export type c = // prettier-ignore | foo1&foo2 // bar diff --git a/tests/format/typescript/union/consistent-with-flow/single-type.ts b/tests/format/typescript/union/consistent-with-flow/single-type.ts new file mode 100644 index 000000000000..dcf1b7132c2a --- /dev/null +++ b/tests/format/typescript/union/consistent-with-flow/single-type.ts @@ -0,0 +1,80 @@ +type A1 = + | ( + | ( + | ( + | A + // A comment to force break + | B + ) + ) + ); +type A2 = + | ( + | ( + | A + // A comment to force break + | B + ) + | ( + | A + // A comment to force break + | B + ) + ); +type A3 = + | ( | ( + | A + // A comment to force break + | B + ) ); +type A4 = + | ( | ( | ( + | A + // A comment to force break + | B + ) ) ); +type A5 = + | ( + | ( + | { key: string } + | { key: string } + | { key: string } + | { key: string } + ) + | { key: string } + | { key: string } + ); +type A6 = | ( + /*1*/ | ( + | ( + | A + // A comment to force break + | B + ) + ) + ); + +type B1 = + | ( + & ( + ( + | A + // A comment to force break + | B + ) + ) + ); +type B2 = + | ( + & ( + | ( + & ( + ( + | A + // A comment to force break + | B + ) + ) + ) + ) + ); diff --git a/tests/format/typescript/union/within-tuple.ts b/tests/format/typescript/union/consistent-with-flow/within-tuple.ts similarity index 100% rename from tests/format/typescript/union/within-tuple.ts rename to tests/format/typescript/union/consistent-with-flow/within-tuple.ts diff --git a/tests/format/typescript/union/format.test.js b/tests/format/typescript/union/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/union/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/union/inlining.ts b/tests/format/typescript/union/inlining.ts index 76f7dfb18201..c32c9d9c5cae 100644 --- a/tests/format/typescript/union/inlining.ts +++ b/tests/format/typescript/union/inlining.ts @@ -7,6 +7,35 @@ interface RelayProps { } | null> | null | void, } +interface RelayProps { + articles: Array<{ + __id: string, + } | null> + | null // articles type may be null + | void, // articles type may be void +} + +type FooBar = null // null +| { /** x **/ + y: number; + z: string; +} // this documents the first option + | void // this documents the second option + ; + +type FooBarWithoutComment = null + | { + y: number; + z: string; +} + | void + ; + +type FooBar2 = + | Number // this documents the first option + | void // this documents the second option + ; + type UploadState<E, EM, D> // The upload hasnt begun yet = {type: "Not_begun"} diff --git a/tests/format/typescript/union/jsfmt.spec.js b/tests/format/typescript/union/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/union/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/union/single-type/__snapshots__/format.test.js.snap b/tests/format/typescript/union/single-type/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e0479624bbda --- /dev/null +++ b/tests/format/typescript/union/single-type/__snapshots__/format.test.js.snap @@ -0,0 +1,22 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`single-type.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +type A1 = + /* 1 */ | /* 2 */ ( + /* 3 */ | /* 4 */ { + key: string; + } + ); + +=====================================output===================================== +type A1 /* 2 */ = /* 1 */ /* 3 */ /* 4 */ { + key: string; +}; + +================================================================================ +`; diff --git a/tests/format/typescript/union/single-type/format.test.js b/tests/format/typescript/union/single-type/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/union/single-type/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/union/single-type/single-type.ts b/tests/format/typescript/union/single-type/single-type.ts new file mode 100644 index 000000000000..a8ed5cc4f72c --- /dev/null +++ b/tests/format/typescript/union/single-type/single-type.ts @@ -0,0 +1,6 @@ +type A1 = + /* 1 */ | /* 2 */ ( + /* 3 */ | /* 4 */ { + key: string; + } + ); diff --git a/tests/format/typescript/unique-symbol/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/unique-symbol/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/unique-symbol/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/unique-symbol/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/unique-symbol/format.test.js b/tests/format/typescript/unique-symbol/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/unique-symbol/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/unique-symbol/jsfmt.spec.js b/tests/format/typescript/unique-symbol/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/unique-symbol/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/unknown/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/unknown/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/typescript/unknown/__snapshots__/jsfmt.spec.js.snap rename to tests/format/typescript/unknown/__snapshots__/format.test.js.snap diff --git a/tests/format/typescript/unknown/format.test.js b/tests/format/typescript/unknown/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/unknown/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/unknown/jsfmt.spec.js b/tests/format/typescript/unknown/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/unknown/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/typescript/update-expression/__snapshots__/format.test.js.snap b/tests/format/typescript/update-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..e5766386e623 --- /dev/null +++ b/tests/format/typescript/update-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`update-expressions.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/typescript-eslint/typescript-eslint/blob/c3767edf65716be08df25723d7dbb770de0e7037/packages/ast-spec/src/expression/UpdateExpression/fixtures/valid-assignment/fixture.ts +class F { + #a; + + m() { + this.#a++; + this.m().a++; + this[1] = 1; + F++; + (this.#a)++; + (<number>this.#a)++; + (this.#a satisfies number)++; + (this.#a as number)++; + this.#a!++; + } +} + +=====================================output===================================== +// https://github.com/typescript-eslint/typescript-eslint/blob/c3767edf65716be08df25723d7dbb770de0e7037/packages/ast-spec/src/expression/UpdateExpression/fixtures/valid-assignment/fixture.ts +class F { + #a; + + m() { + this.#a++; + this.m().a++; + this[1] = 1; + F++; + this.#a++; + (<number>this.#a)++; + (this.#a satisfies number)++; + (this.#a as number)++; + this.#a!++; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/update-expression/format.test.js b/tests/format/typescript/update-expression/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/update-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/update-expression/update-expressions.ts b/tests/format/typescript/update-expression/update-expressions.ts new file mode 100644 index 000000000000..18d495c9a555 --- /dev/null +++ b/tests/format/typescript/update-expression/update-expressions.ts @@ -0,0 +1,16 @@ +// https://github.com/typescript-eslint/typescript-eslint/blob/c3767edf65716be08df25723d7dbb770de0e7037/packages/ast-spec/src/expression/UpdateExpression/fixtures/valid-assignment/fixture.ts +class F { + #a; + + m() { + this.#a++; + this.m().a++; + this[1] = 1; + F++; + (this.#a)++; + (<number>this.#a)++; + (this.#a satisfies number)++; + (this.#a as number)++; + this.#a!++; + } +} diff --git a/tests/format/typescript/webhost/__snapshots__/format.test.js.snap b/tests/format/typescript/webhost/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4968e145366c --- /dev/null +++ b/tests/format/typescript/webhost/__snapshots__/format.test.js.snap @@ -0,0 +1,226 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`webtsc.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +/// <reference path='..\\..\\src\\compiler\\tsc.ts'/> + +namespace TypeScript.WebTsc { + + declare var RealActiveXObject: { new (s: string): any }; + + function getWScriptSystem() { + const fso = new RealActiveXObject("Scripting.FileSystemObject"); + + const fileStream = new ActiveXObject("ADODB.Stream"); + fileStream.Type = 2 /*text*/; + + const args: string[] = []; + for (let i = 0; i < WScript.Arguments.length; i++) { + args[i] = WScript.Arguments.Item(i); + } + return { + args: args, + newLine: "\\r\\n", + write(s: string): void { + WScript.StdOut.Write(s); + }, + writeErr(s: string): void { + WScript.StdErr.Write(s); + }, + readFile(fileName: string, encoding?: string): string { + if (!fso.FileExists(fileName)) { + return undefined; + } + fileStream.Open(); + try { + if (encoding) { + fileStream.Charset = encoding; + fileStream.LoadFromFile(fileName); + } + else { + // Load file and read the first two bytes into a string with no interpretation + fileStream.Charset = "x-ansi"; + fileStream.LoadFromFile(fileName); + const bom = fileStream.ReadText(2) || ""; + // Position must be at 0 before encoding can be changed + fileStream.Position = 0; + // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 + fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; + } + // ReadText method always strips byte order mark from resulting string + return fileStream.ReadText(); + } + catch (e) { + throw e; + } + finally { + fileStream.Close(); + } + }, + writeFile(fileName: string, data: string): boolean { + const f = fso.CreateTextFile(fileName, true); + f.Write(data); + f.Close(); + return true; + }, + resolvePath(path: string): string { + return fso.GetAbsolutePathName(path); + }, + fileExists(path: string): boolean { + return fso.FileExists(path); + }, + directoryExists(path: string) { + return fso.FolderExists(path); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + fso.CreateFolder(directoryName); + } + }, + getExecutingFilePath() { + return WScript.ScriptFullName; + }, + getCurrentDirectory() { + return ""; + }, + getMemoryUsage() { + return 0; + }, + exit(exitCode?: number): void { + WScript.Quit(exitCode); + }, + useCaseSensitiveFileNames: false + }; + } + + export function prepareCompiler(currentDir: string, stdOut: ITextWriter, stdErr: ITextWriter) { + const shell = new RealActiveXObject("WScript.Shell"); + shell.CurrentDirectory = currentDir; + WScript.ScriptFullName = currentDir + "\\\\tc.js"; + WScript.StdOut = stdOut; + WScript.StdErr = stdErr; + sys = getWScriptSystem(); + + return (commandLine: string) => { + ts.executeCommandLine(commandLine.split(" ")); + }; + } +} + +=====================================output===================================== +/// <reference path='..\\..\\src\\compiler\\tsc.ts'/> + +namespace TypeScript.WebTsc { + declare var RealActiveXObject: { new (s: string): any }; + + function getWScriptSystem() { + const fso = new RealActiveXObject("Scripting.FileSystemObject"); + + const fileStream = new ActiveXObject("ADODB.Stream"); + fileStream.Type = 2 /*text*/; + + const args: string[] = []; + for (let i = 0; i < WScript.Arguments.length; i++) { + args[i] = WScript.Arguments.Item(i); + } + return { + args: args, + newLine: "\\r\\n", + write(s: string): void { + WScript.StdOut.Write(s); + }, + writeErr(s: string): void { + WScript.StdErr.Write(s); + }, + readFile(fileName: string, encoding?: string): string { + if (!fso.FileExists(fileName)) { + return undefined; + } + fileStream.Open(); + try { + if (encoding) { + fileStream.Charset = encoding; + fileStream.LoadFromFile(fileName); + } else { + // Load file and read the first two bytes into a string with no interpretation + fileStream.Charset = "x-ansi"; + fileStream.LoadFromFile(fileName); + const bom = fileStream.ReadText(2) || ""; + // Position must be at 0 before encoding can be changed + fileStream.Position = 0; + // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 + fileStream.Charset = + bom.length >= 2 && + ((bom.charCodeAt(0) === 0xff && bom.charCodeAt(1) === 0xfe) || + (bom.charCodeAt(0) === 0xfe && bom.charCodeAt(1) === 0xff)) + ? "unicode" + : "utf-8"; + } + // ReadText method always strips byte order mark from resulting string + return fileStream.ReadText(); + } catch (e) { + throw e; + } finally { + fileStream.Close(); + } + }, + writeFile(fileName: string, data: string): boolean { + const f = fso.CreateTextFile(fileName, true); + f.Write(data); + f.Close(); + return true; + }, + resolvePath(path: string): string { + return fso.GetAbsolutePathName(path); + }, + fileExists(path: string): boolean { + return fso.FileExists(path); + }, + directoryExists(path: string) { + return fso.FolderExists(path); + }, + createDirectory(directoryName: string) { + if (!this.directoryExists(directoryName)) { + fso.CreateFolder(directoryName); + } + }, + getExecutingFilePath() { + return WScript.ScriptFullName; + }, + getCurrentDirectory() { + return ""; + }, + getMemoryUsage() { + return 0; + }, + exit(exitCode?: number): void { + WScript.Quit(exitCode); + }, + useCaseSensitiveFileNames: false, + }; + } + + export function prepareCompiler( + currentDir: string, + stdOut: ITextWriter, + stdErr: ITextWriter, + ) { + const shell = new RealActiveXObject("WScript.Shell"); + shell.CurrentDirectory = currentDir; + WScript.ScriptFullName = currentDir + "\\\\tc.js"; + WScript.StdOut = stdOut; + WScript.StdErr = stdErr; + sys = getWScriptSystem(); + + return (commandLine: string) => { + ts.executeCommandLine(commandLine.split(" ")); + }; + } +} + +================================================================================ +`; diff --git a/tests/format/typescript/webhost/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/webhost/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1a9af80920a0..000000000000 --- a/tests/format/typescript/webhost/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,226 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`webtsc.ts format 1`] = ` -====================================options===================================== -parsers: ["typescript"] -printWidth: 80 - | printWidth -=====================================input====================================== -/// <reference path='..\\..\\src\\compiler\\tsc.ts'/> - -namespace TypeScript.WebTsc { - - declare var RealActiveXObject: { new (s: string): any }; - - function getWScriptSystem() { - const fso = new RealActiveXObject("Scripting.FileSystemObject"); - - const fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; - - const args: string[] = []; - for (let i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - return { - args: args, - newLine: "\\r\\n", - write(s: string): void { - WScript.StdOut.Write(s); - }, - writeErr(s: string): void { - WScript.StdErr.Write(s); - }, - readFile(fileName: string, encoding?: string): string { - if (!fso.FileExists(fileName)) { - return undefined; - } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); - } - else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - const bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } - catch (e) { - throw e; - } - finally { - fileStream.Close(); - } - }, - writeFile(fileName: string, data: string): boolean { - const f = fso.CreateTextFile(fileName, true); - f.Write(data); - f.Close(); - return true; - }, - resolvePath(path: string): string { - return fso.GetAbsolutePathName(path); - }, - fileExists(path: string): boolean { - return fso.FileExists(path); - }, - directoryExists(path: string) { - return fso.FolderExists(path); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath() { - return WScript.ScriptFullName; - }, - getCurrentDirectory() { - return ""; - }, - getMemoryUsage() { - return 0; - }, - exit(exitCode?: number): void { - WScript.Quit(exitCode); - }, - useCaseSensitiveFileNames: false - }; - } - - export function prepareCompiler(currentDir: string, stdOut: ITextWriter, stdErr: ITextWriter) { - const shell = new RealActiveXObject("WScript.Shell"); - shell.CurrentDirectory = currentDir; - WScript.ScriptFullName = currentDir + "\\\\tc.js"; - WScript.StdOut = stdOut; - WScript.StdErr = stdErr; - sys = getWScriptSystem(); - - return (commandLine: string) => { - ts.executeCommandLine(commandLine.split(" ")); - }; - } -} - -=====================================output===================================== -/// <reference path='..\\..\\src\\compiler\\tsc.ts'/> - -namespace TypeScript.WebTsc { - declare var RealActiveXObject: { new (s: string): any }; - - function getWScriptSystem() { - const fso = new RealActiveXObject("Scripting.FileSystemObject"); - - const fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; - - const args: string[] = []; - for (let i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - return { - args: args, - newLine: "\\r\\n", - write(s: string): void { - WScript.StdOut.Write(s); - }, - writeErr(s: string): void { - WScript.StdErr.Write(s); - }, - readFile(fileName: string, encoding?: string): string { - if (!fso.FileExists(fileName)) { - return undefined; - } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); - } else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - const bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = - bom.length >= 2 && - ((bom.charCodeAt(0) === 0xff && bom.charCodeAt(1) === 0xfe) || - (bom.charCodeAt(0) === 0xfe && bom.charCodeAt(1) === 0xff)) - ? "unicode" - : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } catch (e) { - throw e; - } finally { - fileStream.Close(); - } - }, - writeFile(fileName: string, data: string): boolean { - const f = fso.CreateTextFile(fileName, true); - f.Write(data); - f.Close(); - return true; - }, - resolvePath(path: string): string { - return fso.GetAbsolutePathName(path); - }, - fileExists(path: string): boolean { - return fso.FileExists(path); - }, - directoryExists(path: string) { - return fso.FolderExists(path); - }, - createDirectory(directoryName: string) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath() { - return WScript.ScriptFullName; - }, - getCurrentDirectory() { - return ""; - }, - getMemoryUsage() { - return 0; - }, - exit(exitCode?: number): void { - WScript.Quit(exitCode); - }, - useCaseSensitiveFileNames: false, - }; - } - - export function prepareCompiler( - currentDir: string, - stdOut: ITextWriter, - stdErr: ITextWriter - ) { - const shell = new RealActiveXObject("WScript.Shell"); - shell.CurrentDirectory = currentDir; - WScript.ScriptFullName = currentDir + "\\\\tc.js"; - WScript.StdOut = stdOut; - WScript.StdErr = stdErr; - sys = getWScriptSystem(); - - return (commandLine: string) => { - ts.executeCommandLine(commandLine.split(" ")); - }; - } -} - -================================================================================ -`; diff --git a/tests/format/typescript/webhost/format.test.js b/tests/format/typescript/webhost/format.test.js new file mode 100644 index 000000000000..116dcbd78bc4 --- /dev/null +++ b/tests/format/typescript/webhost/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["typescript"]); diff --git a/tests/format/typescript/webhost/jsfmt.spec.js b/tests/format/typescript/webhost/jsfmt.spec.js deleted file mode 100644 index 2ea3bb6eb2e4..000000000000 --- a/tests/format/typescript/webhost/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["typescript"]); diff --git a/tests/format/vue/bracket-same-line/__snapshots__/format.test.js.snap b/tests/format/vue/bracket-same-line/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..930c2ebc068b --- /dev/null +++ b/tests/format/vue/bracket-same-line/__snapshots__/format.test.js.snap @@ -0,0 +1,359 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`vue.html - {"bracketSameLine":false} format 1`] = ` +====================================options===================================== +bracketSameLine: false +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<template> + <div id="js-app"> +<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> +text +</div> +<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"></div> +<span :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> +text +</span> +<span :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> +<img :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> +<div class="a"> +text +</div> +<span class="a"> +text +</span> +<img class="a"/> + </div> +</template> + +<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">new Vue({el: '#js-app'})</script> +<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <template> + <div id="js-app"> + <div + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + " + > + text + </div> + <div + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + " + ></div> + <span + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + " + > + text + </span> + <span + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + " + ></span> + <img + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + " + /> + <div class="a">text</div> + <span class="a"> text </span> + <img class="a" /> + </div> + </template> + + <script + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" + > + new Vue({ el: "#js-app" }); + </script> + <style + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" + > + .a { + color: #f00; + } + </style> + </body> +</html> + +================================================================================ +`; + +exports[`vue.html - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> +</head> +<body> +<template> + <div id="js-app"> +<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> +text +</div> +<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"></div> +<span :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> +text +</span> +<span :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> +<img :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> +<div class="a"> +text +</div> +<span class="a"> +text +</span> +<img class="a"/> + </div> +</template> + +<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">new Vue({el: '#js-app'})</script> +<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> +</body> +</html> + +=====================================output===================================== +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>Document</title> + </head> + <body> + <template> + <div id="js-app"> + <div + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + "> + text + </div> + <div + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + "></div> + <span + :click=" + long_long_long_long_long_long_long_long_long_long_long_long_long_long_value + "> + text + </span> + <span + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + "></span> + <img + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + " /> + <div class="a">text</div> + <span class="a"> text </span> + <img class="a" /> + </div> + </template> + + <script + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> + new Vue({ el: "#js-app" }); + </script> + <style + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> + .a { + color: #f00; + } + </style> + </body> +</html> + +================================================================================ +`; + +exports[`vue.vue - {"bracketSameLine":false} format 1`] = ` +====================================options===================================== +bracketSameLine: false +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div> +<div :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +text +</div> +<div v-on:long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></div> +<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +text +</span> +<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> +<img long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> +<div class="a"> +text +</div> +<span class="a"> +text +</span> +<img class="a"/> + </div> +</template> + +<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">export default {}</script> +<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> + +=====================================output===================================== +<template> + <div> + <div + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + " + > + text + </div> + <div + v-on:long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + " + ></div> + <span + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" + > + text + </span> + <span + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" + ></span> + <img + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" + /> + <div class="a">text</div> + <span class="a"> text </span> + <img class="a" /> + </div> +</template> + +<script + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" +> +export default {}; +</script> +<style + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" +> +.a { + color: #f00; +} +</style> + +================================================================================ +`; + +exports[`vue.vue - {"bracketSameLine":true} format 1`] = ` +====================================options===================================== +bracketSameLine: true +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div> +<div :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +text +</div> +<div v-on:long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></div> +<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +text +</span> +<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> +<img long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> +<div class="a"> +text +</div> +<span class="a"> +text +</span> +<img class="a"/> + </div> +</template> + +<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">export default {}</script> +<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> + +=====================================output===================================== +<template> + <div> + <div + :long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + "> + text + </div> + <div + v-on:long_long_attribute=" + long_long_long_long_long_long_long_long_long_long_long_value + "></div> + <span + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> + text + </span> + <span + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> + <img + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" /> + <div class="a">text</div> + <span class="a"> text </span> + <img class="a" /> + </div> +</template> + +<script + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +export default {}; +</script> +<style + long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> +.a { + color: #f00; +} +</style> + +================================================================================ +`; diff --git a/tests/format/vue/bracket-same-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/bracket-same-line/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 623280a03ccc..000000000000 --- a/tests/format/vue/bracket-same-line/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,359 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`vue.html - {"bracketSameLine":false} format 1`] = ` -====================================options===================================== -bracketSameLine: false -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Document</title> -</head> -<body> -<template> - <div id="js-app"> -<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> -text -</div> -<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"></div> -<span :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> -text -</span> -<span :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> -<img :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> -<div class="a"> -text -</div> -<span class="a"> -text -</span> -<img class="a"/> - </div> -</template> - -<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">new Vue({el: '#js-app'})</script> -<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> -</body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Document</title> - </head> - <body> - <template> - <div id="js-app"> - <div - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - " - > - text - </div> - <div - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - " - ></div> - <span - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - " - > - text - </span> - <span - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - " - ></span> - <img - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - " - /> - <div class="a">text</div> - <span class="a"> text </span> - <img class="a" /> - </div> - </template> - - <script - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" - > - new Vue({ el: "#js-app" }); - </script> - <style - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" - > - .a { - color: #f00; - } - </style> - </body> -</html> - -================================================================================ -`; - -exports[`vue.html - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Document</title> -</head> -<body> -<template> - <div id="js-app"> -<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> -text -</div> -<div :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"></div> -<span :click="long_long_long_long_long_long_long_long_long_long_long_long_long_long_value"> -text -</span> -<span :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> -<img :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> -<div class="a"> -text -</div> -<span class="a"> -text -</span> -<img class="a"/> - </div> -</template> - -<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">new Vue({el: '#js-app'})</script> -<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> -</body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Document</title> - </head> - <body> - <template> - <div id="js-app"> - <div - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - "> - text - </div> - <div - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - "></div> - <span - :click=" - long_long_long_long_long_long_long_long_long_long_long_long_long_long_value - "> - text - </span> - <span - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - "></span> - <img - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - " /> - <div class="a">text</div> - <span class="a"> text </span> - <img class="a" /> - </div> - </template> - - <script - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> - new Vue({ el: "#js-app" }); - </script> - <style - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> - .a { - color: #f00; - } - </style> - </body> -</html> - -================================================================================ -`; - -exports[`vue.vue - {"bracketSameLine":false} format 1`] = ` -====================================options===================================== -bracketSameLine: false -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div> -<div :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -text -</div> -<div v-on:long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></div> -<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -text -</span> -<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> -<img long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> -<div class="a"> -text -</div> -<span class="a"> -text -</span> -<img class="a"/> - </div> -</template> - -<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">export default {}</script> -<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> - -=====================================output===================================== -<template> - <div> - <div - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - " - > - text - </div> - <div - v-on:long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - " - ></div> - <span - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" - > - text - </span> - <span - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" - ></span> - <img - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" - /> - <div class="a">text</div> - <span class="a"> text </span> - <img class="a" /> - </div> -</template> - -<script - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" -> -export default {}; -</script> -<style - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" -> -.a { - color: #f00; -} -</style> - -================================================================================ -`; - -exports[`vue.vue - {"bracketSameLine":true} format 1`] = ` -====================================options===================================== -bracketSameLine: true -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div> -<div :long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -text -</div> -<div v-on:long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></div> -<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -text -</span> -<span long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> -<img long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"/> -<div class="a"> -text -</div> -<span class="a"> -text -</span> -<img class="a"/> - </div> -</template> - -<script long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">export default {}</script> -<style long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value">.a {color: #f00}</style> - -=====================================output===================================== -<template> - <div> - <div - :long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - "> - text - </div> - <div - v-on:long_long_attribute=" - long_long_long_long_long_long_long_long_long_long_long_value - "></div> - <span - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> - text - </span> - <span - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"></span> - <img - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value" /> - <div class="a">text</div> - <span class="a"> text </span> - <img class="a" /> - </div> -</template> - -<script - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -export default {}; -</script> -<style - long_long_attribute="long_long_long_long_long_long_long_long_long_long_long_value"> -.a { - color: #f00; -} -</style> - -================================================================================ -`; diff --git a/tests/format/vue/bracket-same-line/format.test.js b/tests/format/vue/bracket-same-line/format.test.js new file mode 100644 index 000000000000..9a53b9232154 --- /dev/null +++ b/tests/format/vue/bracket-same-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["vue"], { bracketSameLine: true }); +runFormatTest(import.meta, ["vue"], { bracketSameLine: false }); diff --git a/tests/format/vue/bracket-same-line/jsfmt.spec.js b/tests/format/vue/bracket-same-line/jsfmt.spec.js deleted file mode 100644 index 09150d4497fd..000000000000 --- a/tests/format/vue/bracket-same-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["vue"], { bracketSameLine: true }); -run_spec(__dirname, ["vue"], { bracketSameLine: false }); diff --git a/tests/format/vue/broken-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/broken-plugins/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/broken-plugins/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/broken-plugins/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/broken-plugins/format.test.js b/tests/format/vue/broken-plugins/format.test.js new file mode 100644 index 000000000000..0ebf0ae8b443 --- /dev/null +++ b/tests/format/vue/broken-plugins/format.test.js @@ -0,0 +1,9 @@ +import createEsmUtils from "esm-utils"; + +const { require } = createEsmUtils(import.meta); + +const plugins = [ + require("../../../config/prettier-plugins/prettier-plugin-missing-comments/index.cjs"), +]; + +runFormatTest(import.meta, ["vue"], { plugins }); diff --git a/tests/format/vue/broken-plugins/jsfmt.spec.js b/tests/format/vue/broken-plugins/jsfmt.spec.js deleted file mode 100644 index decac9184bce..000000000000 --- a/tests/format/vue/broken-plugins/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -const plugins = [ - require("../../../config/prettier-plugins/prettier-plugin-missing-comments/index.js"), -]; - -run_spec(__dirname, ["vue"], { plugins }); diff --git a/tests/format/vue/custom_block/__snapshots__/format.test.js.snap b/tests/format/vue/custom_block/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..7a354ab845dc --- /dev/null +++ b/tests/format/vue/custom_block/__snapshots__/format.test.js.snap @@ -0,0 +1,1675 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`graphql.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +=====================================output===================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +================================================================================ +`; + +exports[`graphql.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +=====================================output===================================== +<page-query lang="graphql"> +query { + posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +================================================================================ +`; + +exports[`graphql.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +=====================================output===================================== +<page-query lang="graphql"> +query { + posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +================================================================================ +`; + +exports[`graphql.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +=====================================output===================================== +<page-query lang="graphql"> +query { + posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +================================================================================ +`; + +exports[`graphql.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<page-query lang="graphql"> +query { posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +=====================================output===================================== +<page-query lang="graphql"> +query { + posts: allWordPressPost { + edges { + node { + id + title + } + } + } +} +</page-query> + +================================================================================ +`; + +exports[`handlebars.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +=====================================output===================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +================================================================================ +`; + +exports[`handlebars.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +=====================================output===================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{doesWhat}}</b> +</custom> + +================================================================================ +`; + +exports[`handlebars.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +=====================================output===================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{doesWhat}}</b> +</custom> + +================================================================================ +`; + +exports[`handlebars.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +=====================================output===================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{doesWhat}}</b> +</custom> + +================================================================================ +`; + +exports[`handlebars.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{ doesWhat}}</b> +</custom> + +=====================================output===================================== +<custom type="text/x-handlebars-template"> +Handlebars <b>{{doesWhat}}</b> +</custom> + +================================================================================ +`; + +exports[`json.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +=====================================output===================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +================================================================================ +`; + +exports[`json.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +=====================================output===================================== +<i18n lang="json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +================================================================================ +`; + +exports[`json.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +=====================================output===================================== +<i18n lang="json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +================================================================================ +`; + +exports[`json.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +=====================================output===================================== +<i18n lang="json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +================================================================================ +`; + +exports[`json.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<i18n lang="json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ "en": { + "hello": "hello world!" + + + }, "ja": { + + + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json">{ + "a": 1 +}</custom> + +<custom lang="json">{ + "a": 1 +} +</custom> + +=====================================output===================================== +<i18n lang="json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<i18n type="application/json"> +{ + "en": { + "hello": "hello world!" + }, + "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +<custom lang="json"> +{ + "a": 1 +} +</custom> + +================================================================================ +`; + +exports[`lang-attribute.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +=====================================output===================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +================================================================================ +`; + +exports[`lang-attribute.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +=====================================output===================================== +<custom lang="js"> +const foo = "foo" +</custom> + +================================================================================ +`; + +exports[`lang-attribute.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +=====================================output===================================== +<custom lang="js"> +const foo = "foo"; +</custom> + +================================================================================ +`; + +exports[`lang-attribute.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +=====================================output===================================== +<custom lang="js"> +const foo = "foo"; +</custom> + +================================================================================ +`; + +exports[`lang-attribute.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<custom lang="js"> +const foo + = 'foo' +</custom> + +=====================================output===================================== +<custom lang="js"> +const foo = "foo"; +</custom> + +================================================================================ +`; + +exports[`markdown.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +=====================================output===================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +================================================================================ +`; + +exports[`markdown.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +=====================================output===================================== +<docs lang="markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +================================================================================ +`; + +exports[`markdown.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +=====================================output===================================== +<docs lang="markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +================================================================================ +`; + +exports[`markdown.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +=====================================output===================================== +<docs lang="markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +================================================================================ +`; + +exports[`markdown.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<docs lang="markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo +- bar +- baz + +| Age | Time | Food | Gold | Requirement | + | ------------ | ----- | ---- | ---- | ----------------------- | + | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | + | Castle Age | 02:40 | 800 | 200 |- | + | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +=====================================output===================================== +<docs lang="markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +<docs type="text/markdown"> +# Foo + +- bar +- baz + +| Age | Time | Food | Gold | Requirement | +| ------------ | ----- | ---- | ---- | ----------------------- | +| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | +| Castle Age | 02:40 | 800 | 200 | - | +| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | +</docs> + +================================================================================ +`; + +exports[`tag_like.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +=====================================output===================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +================================================================================ +`; + +exports[`tag_like.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +=====================================output===================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +================================================================================ +`; + +exports[`tag_like.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +=====================================output===================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</"; +</custom> + +================================================================================ +`; + +exports[`tag_like.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +=====================================output===================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</"; +</custom> + +================================================================================ +`; + +exports[`tag_like.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</" +</custom> + +=====================================output===================================== +<docs> +This component takes an \`items\` prop (\`Array<Object>\`). + or +This component should be placed inside a \`<my-component>\`. +</docs> + +<custom lang="javascript"> +const foo = "</"; +</custom> + +================================================================================ +`; + +exports[`unknown.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +=====================================output===================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +================================================================================ +`; + +exports[`unknown.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +=====================================output===================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +================================================================================ +`; + +exports[`unknown.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +=====================================output===================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +================================================================================ +`; + +exports[`unknown.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +=====================================output===================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +================================================================================ +`; + +exports[`unknown.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +=====================================output===================================== +<i18n lang="foooo"> +{"en": { + "hello": "hello world!" + }, "ja": { + "hello": "こんにちは、世界!" + } +} +</i18n> + +<custom> +const foo = + + + "foo"; +</custom> + +<custom lang="zzz"> +const foo = "foo"; + const foo = "foo";</custom> + +<custom lang="zzz">123</custom> + +<custom>{ + foo: "bar" +}</custom> + +================================================================================ +`; + +exports[`yaml.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +=====================================output===================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +================================================================================ +`; + +exports[`yaml.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +=====================================output===================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +================================================================================ +`; + +exports[`yaml.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +=====================================output===================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +================================================================================ +`; + +exports[`yaml.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +=====================================output===================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +================================================================================ +`; + +exports[`yaml.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +vueIndentScriptAndStyle: true + | printWidth +=====================================input====================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +=====================================output===================================== +<i18n lang="yaml"> +en: + hello: "hello world!" +ja: + hello: "こんにちは、世界!" +</i18n> + +================================================================================ +`; diff --git a/tests/format/vue/custom_block/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/custom_block/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a3701eace693..000000000000 --- a/tests/format/vue/custom_block/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,1746 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`graphql.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -=====================================output===================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -================================================================================ -`; - -exports[`graphql.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -=====================================output===================================== -<page-query lang="graphql"> -query { - posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -================================================================================ -`; - -exports[`graphql.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -=====================================output===================================== -<page-query lang="graphql"> -query { - posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -================================================================================ -`; - -exports[`graphql.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -=====================================output===================================== -<page-query lang="graphql"> -query { - posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -================================================================================ -`; - -exports[`graphql.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<page-query lang="graphql"> -query { posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -=====================================output===================================== -<page-query lang="graphql"> -query { - posts: allWordPressPost { - edges { - node { - id - title - } - } - } -} -</page-query> - -================================================================================ -`; - -exports[`handlebars.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -=====================================output===================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -================================================================================ -`; - -exports[`handlebars.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -=====================================output===================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{doesWhat}}</b> -</custom> - -================================================================================ -`; - -exports[`handlebars.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -=====================================output===================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{doesWhat}}</b> -</custom> - -================================================================================ -`; - -exports[`handlebars.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -=====================================output===================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{doesWhat}}</b> -</custom> - -================================================================================ -`; - -exports[`handlebars.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{ doesWhat}}</b> -</custom> - -=====================================output===================================== -<custom type="text/x-handlebars-template"> -Handlebars <b>{{doesWhat}}</b> -</custom> - -================================================================================ -`; - -exports[`json.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -=====================================output===================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -================================================================================ -`; - -exports[`json.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -=====================================output===================================== -<i18n lang="json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -================================================================================ -`; - -exports[`json.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -=====================================output===================================== -<i18n lang="json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -================================================================================ -`; - -exports[`json.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -=====================================output===================================== -<i18n lang="json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -================================================================================ -`; - -exports[`json.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ "en": { - "hello": "hello world!" - - - }, "ja": { - - - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json">{ - "a": 1 -}</custom> - -<custom lang="json">{ - "a": 1 -} -</custom> - -=====================================output===================================== -<i18n lang="json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<i18n type="application/json"> -{ - "en": { - "hello": "hello world!" - }, - "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -<custom lang="json"> -{ - "a": 1 -} -</custom> - -================================================================================ -`; - -exports[`lang-attribute.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -=====================================output===================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -================================================================================ -`; - -exports[`lang-attribute.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -=====================================output===================================== -<custom lang="js"> -const foo = "foo" -</custom> - -================================================================================ -`; - -exports[`lang-attribute.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -=====================================output===================================== -<custom lang="js"> -const foo = "foo"; -</custom> - -================================================================================ -`; - -exports[`lang-attribute.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -=====================================output===================================== -<custom lang="js"> -const foo = "foo"; -</custom> - -================================================================================ -`; - -exports[`lang-attribute.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="js"> -const foo - = 'foo' -</custom> - -=====================================output===================================== -<custom lang="js"> -const foo = "foo"; -</custom> - -================================================================================ -`; - -exports[`markdown.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -=====================================output===================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -================================================================================ -`; - -exports[`markdown.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -=====================================output===================================== -<docs lang="markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -================================================================================ -`; - -exports[`markdown.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -=====================================output===================================== -<docs lang="markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -================================================================================ -`; - -exports[`markdown.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -=====================================output===================================== -<docs lang="markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -================================================================================ -`; - -exports[`markdown.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs lang="markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo -- bar -- baz - -| Age | Time | Food | Gold | Requirement | - | ------------ | ----- | ---- | ---- | ----------------------- | - | Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | - | Castle Age | 02:40 | 800 | 200 |- | - | Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -=====================================output===================================== -<docs lang="markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -<docs type="text/markdown"> -# Foo - -- bar -- baz - -| Age | Time | Food | Gold | Requirement | -| ------------ | ----- | ---- | ---- | ----------------------- | -| Feudal Age | 02:10 | 500 | 0 | Dark Age building x 2 | -| Castle Age | 02:40 | 800 | 200 | - | -| Imperial Age | 03:30 | 1000 | 800 | Castle Age building x 2 | -</docs> - -================================================================================ -`; - -exports[`one-line.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs lang=unknown></docs><docs lang=unknown></docs> - -=====================================output===================================== -<docs lang="unknown"></docs> -<docs lang="unknown"></docs> - -================================================================================ -`; - -exports[`one-line.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<docs lang=unknown></docs><docs lang=unknown></docs> - -=====================================output===================================== -<docs lang="unknown"></docs> -<docs lang="unknown"></docs> - -================================================================================ -`; - -exports[`one-line.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<docs lang=unknown></docs><docs lang=unknown></docs> - -=====================================output===================================== -<docs lang="unknown"></docs> -<docs lang="unknown"></docs> - -================================================================================ -`; - -exports[`one-line.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<docs lang=unknown></docs><docs lang=unknown></docs> - -=====================================output===================================== -<docs lang="unknown"></docs> -<docs lang="unknown"></docs> - -================================================================================ -`; - -exports[`one-line.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs lang=unknown></docs><docs lang=unknown></docs> - -=====================================output===================================== -<docs lang="unknown"></docs> -<docs lang="unknown"></docs> - -================================================================================ -`; - -exports[`tag_like.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -=====================================output===================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -================================================================================ -`; - -exports[`tag_like.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -=====================================output===================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -================================================================================ -`; - -exports[`tag_like.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -=====================================output===================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</"; -</custom> - -================================================================================ -`; - -exports[`tag_like.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -=====================================output===================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</"; -</custom> - -================================================================================ -`; - -exports[`tag_like.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</" -</custom> - -=====================================output===================================== -<docs> -This component takes an \`items\` prop (\`Array<Object>\`). - or -This component should be placed inside a \`<my-component>\`. -</docs> - -<custom lang="javascript"> -const foo = "</"; -</custom> - -================================================================================ -`; - -exports[`unknown.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -=====================================output===================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -================================================================================ -`; - -exports[`unknown.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -=====================================output===================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -================================================================================ -`; - -exports[`unknown.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -=====================================output===================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -================================================================================ -`; - -exports[`unknown.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -=====================================output===================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -================================================================================ -`; - -exports[`unknown.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -=====================================output===================================== -<i18n lang="foooo"> -{"en": { - "hello": "hello world!" - }, "ja": { - "hello": "こんにちは、世界!" - } -} -</i18n> - -<custom> -const foo = - - - "foo"; -</custom> - -<custom lang="zzz"> -const foo = "foo"; - const foo = "foo";</custom> - -<custom lang="zzz">123</custom> - -<custom>{ - foo: "bar" -}</custom> - -================================================================================ -`; - -exports[`yaml.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -=====================================output===================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -================================================================================ -`; - -exports[`yaml.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -=====================================output===================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -================================================================================ -`; - -exports[`yaml.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -=====================================output===================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -================================================================================ -`; - -exports[`yaml.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -vueIndentScriptAndStyle: true - | printWidth -=====================================input====================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -=====================================output===================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -================================================================================ -`; - -exports[`yaml.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -=====================================output===================================== -<i18n lang="yaml"> -en: - hello: "hello world!" -ja: - hello: "こんにちは、世界!" -</i18n> - -================================================================================ -`; diff --git a/tests/format/vue/custom_block/format.test.js b/tests/format/vue/custom_block/format.test.js new file mode 100644 index 000000000000..619b64274e9d --- /dev/null +++ b/tests/format/vue/custom_block/format.test.js @@ -0,0 +1,5 @@ +runFormatTest(import.meta, ["vue"], { trailingComma: "none" }); +runFormatTest(import.meta, ["vue"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["vue"], { semi: false }); +runFormatTest(import.meta, ["vue"], { vueIndentScriptAndStyle: true }); +runFormatTest(import.meta, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/vue/custom_block/html-whitespace-sensitivity/__snapshots__/format.test.js.snap b/tests/format/vue/custom_block/html-whitespace-sensitivity/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..2d8a2e0b5e54 --- /dev/null +++ b/tests/format/vue/custom_block/html-whitespace-sensitivity/__snapshots__/format.test.js.snap @@ -0,0 +1,76 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`one-line.vue - {"htmlWhitespaceSensitivity":"css"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "css" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> + +=====================================output===================================== +<docs lang="unknown"></docs> +<docs lang="unknown"></docs> +<!-- display: inline --> +<docs lang="unknown"></docs> +<docs lang="unknown" style="display: inline"></docs> + +================================================================================ +`; + +exports[`one-line.vue - {"htmlWhitespaceSensitivity":"ignore"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "ignore" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> + +=====================================output===================================== +<docs lang="unknown"></docs> +<docs lang="unknown"></docs> +<!-- display: inline --> +<docs lang="unknown"></docs> +<docs lang="unknown" style="display: inline"></docs> + +================================================================================ +`; + +exports[`one-line.vue - {"htmlWhitespaceSensitivity":"strict"} format 1`] = ` +====================================options===================================== +htmlWhitespaceSensitivity: "strict" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> + +=====================================output===================================== +<docs lang="unknown"></docs> +<docs lang="unknown"></docs> +<!-- display: inline --> +<docs lang="unknown"></docs> +<docs lang="unknown" style="display: inline"></docs> + +================================================================================ +`; + +exports[`one-line.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> + +=====================================output===================================== +<docs lang="unknown"></docs> +<docs lang="unknown"></docs> +<!-- display: inline --> +<docs lang="unknown"></docs> +<docs lang="unknown" style="display: inline"></docs> + +================================================================================ +`; diff --git a/tests/format/vue/custom_block/html-whitespace-sensitivity/format.test.js b/tests/format/vue/custom_block/html-whitespace-sensitivity/format.test.js new file mode 100644 index 000000000000..2eb6e3a966ba --- /dev/null +++ b/tests/format/vue/custom_block/html-whitespace-sensitivity/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["vue"], { htmlWhitespaceSensitivity: "strict" }); +runFormatTest(import.meta, ["vue"]); +runFormatTest(import.meta, ["vue"], { htmlWhitespaceSensitivity: "ignore" }); +runFormatTest(import.meta, ["vue"], { htmlWhitespaceSensitivity: "css" }); diff --git a/tests/format/vue/custom_block/html-whitespace-sensitivity/one-line.vue b/tests/format/vue/custom_block/html-whitespace-sensitivity/one-line.vue new file mode 100644 index 000000000000..7ba2436e0c2a --- /dev/null +++ b/tests/format/vue/custom_block/html-whitespace-sensitivity/one-line.vue @@ -0,0 +1 @@ +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> diff --git a/tests/format/vue/custom_block/jsfmt.spec.js b/tests/format/vue/custom_block/jsfmt.spec.js deleted file mode 100644 index 92d15124ac23..000000000000 --- a/tests/format/vue/custom_block/jsfmt.spec.js +++ /dev/null @@ -1,5 +0,0 @@ -run_spec(__dirname, ["vue"], { trailingComma: "none" }); -run_spec(__dirname, ["vue"]); -run_spec(__dirname, ["vue"], { semi: false }); -run_spec(__dirname, ["vue"], { vueIndentScriptAndStyle: true }); -run_spec(__dirname, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/vue/custom_block/one-line.vue b/tests/format/vue/custom_block/one-line.vue deleted file mode 100644 index 7ce7921399e3..000000000000 --- a/tests/format/vue/custom_block/one-line.vue +++ /dev/null @@ -1 +0,0 @@ -<docs lang=unknown></docs><docs lang=unknown></docs> diff --git a/tests/format/vue/event-binding/__snapshots__/format.test.js.snap b/tests/format/vue/event-binding/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..4a464de731df --- /dev/null +++ b/tests/format/vue/event-binding/__snapshots__/format.test.js.snap @@ -0,0 +1,237 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`assignment.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div> + <button @click=" foo = 1 "></button> + <button @click=" foo = 1; "></button> + <button @click=" foo += 1 "></button> + <button @click=" foo += 1; "></button> + <button @click=" foo -= 1 "></button> + <button @click=" foo -= 1; "></button> + <button @click=" foo *= 1 "></button> + <button @click=" foo *= 1; "></button> + <button @click=" foo /= 1 "></button> + <button @click=" foo /= 1; "></button> + <button @click=" foo %= 1 "></button> + <button @click=" foo %= 1; "></button> + <button @click=" foo <<= 1 "></button> + <button @click=" foo <<= 1; "></button> + <button @click=" foo >>= 1 "></button> + <button @click=" foo >>= 1; "></button> + <button @click=" foo >>>= 1 "></button> + <button @click=" foo >>>= 1; "></button> + <button @click=" foo |= 1 "></button> + <button @click=" foo |= 1; "></button> + <button @click=" foo ^= 1 "></button> + <button @click=" foo ^= 1; "></button> + <button @click=" foo &= 1 "></button> + <button @click=" foo &= 1; "></button> + <button @click=" foo ||= 1 "></button> + <button @click=" foo ||= 1; "></button> + <button @click=" foo &&= 1 "></button> + <button @click=" foo &&= 1; "></button> + <button @click=" foo ??= 1 "></button> + <button @click=" foo ??= 1; "></button> + </div> +</template> + +=====================================output===================================== +<template> + <div> + <button @click="foo = 1"></button> + <button @click="foo = 1"></button> + <button @click="foo += 1"></button> + <button @click="foo += 1"></button> + <button @click="foo -= 1"></button> + <button @click="foo -= 1"></button> + <button @click="foo *= 1"></button> + <button @click="foo *= 1"></button> + <button @click="foo /= 1"></button> + <button @click="foo /= 1"></button> + <button @click="foo %= 1"></button> + <button @click="foo %= 1"></button> + <button @click="foo <<= 1"></button> + <button @click="foo <<= 1"></button> + <button @click="foo >>= 1"></button> + <button @click="foo >>= 1"></button> + <button @click="foo >>>= 1"></button> + <button @click="foo >>>= 1"></button> + <button @click="foo |= 1"></button> + <button @click="foo |= 1"></button> + <button @click="foo ^= 1"></button> + <button @click="foo ^= 1"></button> + <button @click="foo &= 1"></button> + <button @click="foo &= 1"></button> + <button @click="foo ||= 1"></button> + <button @click="foo ||= 1"></button> + <button @click="foo &&= 1"></button> + <button @click="foo &&= 1"></button> + <button @click="foo ??= 1"></button> + <button @click="foo ??= 1"></button> + </div> +</template> + +================================================================================ +`; + +exports[`basic-ts.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup lang="ts"> +let x = 1; +function log(...args) { + console.log(...args); +} +</script> + +<template> + <div @click="if (x === 1 as number) { log('hello') } else { log('nonhello') };">{{ x }}</div> +</template> + +=====================================output===================================== +<script setup lang="ts"> +let x = 1; +function log(...args) { + console.log(...args); +} +</script> + +<template> + <div + @click=" + if (x === (1 as number)) { + log('hello'); + } else { + log('nonhello'); + } + " + > + {{ x }} + </div> +</template> + +================================================================================ +`; + +exports[`function-expression-ts.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup lang="ts"></script> + +<template> + <div @click=" ( x : never) => null">arrow</div> + <div @click=" function( a : unknown[]) { + console.log( 'abcdefg'); + return; + }">anonymous function</div> +</template> + +=====================================output===================================== +<script setup lang="ts"></script> + +<template> + <div @click="(x: never) => null">arrow</div> + <div + @click=" + function (a: unknown[]) { + console.log('abcdefg'); + return; + } + " + > + anonymous function + </div> +</template> + +================================================================================ +`; + +exports[`non-ascii-expression.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div @click=" 我 " /> + <div @click=" me " /> +</template> + +=====================================output===================================== +<template> + <div @click="我" /> + <div @click="me" /> +</template> + +================================================================================ +`; + +exports[`non-ascii-expression-ts.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup lang="ts"> +const 我 = () => {} +const me = () => {} + +type Foo = () => void +</script> + +<template> + <div @click=" 我 " /> + <div @click=" me " /> + <div @click="我 as Foo" /> + <div @click="me as Foo" /> + <div @click="我 satisfies Foo" /> + <div @click="me satisfies Foo" /> + <div @click=" (<number>我)" /> + <div @click=" (<number>me)" /> + <div @click=" 我!" /> + <div @click=" me!" /> + <div @click="我< string>" /> + <div @click="me< string>" /> + <div @click="我! as unknown satisfies Foo" /> + <div @click="me! as unknown satisfies Foo" /> +</template> + +=====================================output===================================== +<script setup lang="ts"> +const 我 = () => {}; +const me = () => {}; + +type Foo = () => void; +</script> + +<template> + <div @click="我" /> + <div @click="me" /> + <div @click="我 as Foo" /> + <div @click="me as Foo" /> + <div @click="我 satisfies Foo" /> + <div @click="me satisfies Foo" /> + <div @click="<number>我" /> + <div @click="<number>me" /> + <div @click="我!" /> + <div @click="me!" /> + <div @click="我<string>" /> + <div @click="me<string>" /> + <div @click="我! as unknown satisfies Foo" /> + <div @click="me! as unknown satisfies Foo" /> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/event-binding/assignment.vue b/tests/format/vue/event-binding/assignment.vue new file mode 100644 index 000000000000..f06f462109ff --- /dev/null +++ b/tests/format/vue/event-binding/assignment.vue @@ -0,0 +1,34 @@ +<template> + <div> + <button @click=" foo = 1 "></button> + <button @click=" foo = 1; "></button> + <button @click=" foo += 1 "></button> + <button @click=" foo += 1; "></button> + <button @click=" foo -= 1 "></button> + <button @click=" foo -= 1; "></button> + <button @click=" foo *= 1 "></button> + <button @click=" foo *= 1; "></button> + <button @click=" foo /= 1 "></button> + <button @click=" foo /= 1; "></button> + <button @click=" foo %= 1 "></button> + <button @click=" foo %= 1; "></button> + <button @click=" foo <<= 1 "></button> + <button @click=" foo <<= 1; "></button> + <button @click=" foo >>= 1 "></button> + <button @click=" foo >>= 1; "></button> + <button @click=" foo >>>= 1 "></button> + <button @click=" foo >>>= 1; "></button> + <button @click=" foo |= 1 "></button> + <button @click=" foo |= 1; "></button> + <button @click=" foo ^= 1 "></button> + <button @click=" foo ^= 1; "></button> + <button @click=" foo &= 1 "></button> + <button @click=" foo &= 1; "></button> + <button @click=" foo ||= 1 "></button> + <button @click=" foo ||= 1; "></button> + <button @click=" foo &&= 1 "></button> + <button @click=" foo &&= 1; "></button> + <button @click=" foo ??= 1 "></button> + <button @click=" foo ??= 1; "></button> + </div> +</template> diff --git a/tests/format/vue/ts-event-binding/basic.vue b/tests/format/vue/event-binding/basic-ts.vue similarity index 100% rename from tests/format/vue/ts-event-binding/basic.vue rename to tests/format/vue/event-binding/basic-ts.vue diff --git a/tests/format/vue/event-binding/format.test.js b/tests/format/vue/event-binding/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/event-binding/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/event-binding/function-expression-ts.vue b/tests/format/vue/event-binding/function-expression-ts.vue new file mode 100644 index 000000000000..ffb1d01ff3b5 --- /dev/null +++ b/tests/format/vue/event-binding/function-expression-ts.vue @@ -0,0 +1,9 @@ +<script setup lang="ts"></script> + +<template> + <div @click=" ( x : never) => null">arrow</div> + <div @click=" function( a : unknown[]) { + console.log( 'abcdefg'); + return; + }">anonymous function</div> +</template> diff --git a/tests/format/vue/event-binding/no-semi/__snapshots__/format.test.js.snap b/tests/format/vue/event-binding/no-semi/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3ce4925f7ae9 --- /dev/null +++ b/tests/format/vue/event-binding/no-semi/__snapshots__/format.test.js.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`single-expression.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <foo-bar + @click="[foo, bar].forEach(fn => void fn())" + @loaded="(map = $event) && initMap()" + ></foo-bar> +</template> + +=====================================output===================================== +<template> + <foo-bar + @click="[foo, bar].forEach((fn) => void fn())" + @loaded="(map = $event) && initMap()" + ></foo-bar> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/event-binding/no-semi/format.test.js b/tests/format/vue/event-binding/no-semi/format.test.js new file mode 100644 index 000000000000..cfbe97f3f7ea --- /dev/null +++ b/tests/format/vue/event-binding/no-semi/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"], { semi: false }); diff --git a/tests/format/vue/event-binding/no-semi/single-expression.vue b/tests/format/vue/event-binding/no-semi/single-expression.vue new file mode 100644 index 000000000000..16c7e545b7d2 --- /dev/null +++ b/tests/format/vue/event-binding/no-semi/single-expression.vue @@ -0,0 +1,6 @@ +<template> + <foo-bar + @click="[foo, bar].forEach(fn => void fn())" + @loaded="(map = $event) && initMap()" + ></foo-bar> +</template> diff --git a/tests/format/vue/event-binding/non-ascii-expression-ts.vue b/tests/format/vue/event-binding/non-ascii-expression-ts.vue new file mode 100644 index 000000000000..96d0cf453977 --- /dev/null +++ b/tests/format/vue/event-binding/non-ascii-expression-ts.vue @@ -0,0 +1,23 @@ +<script setup lang="ts"> +const 我 = () => {} +const me = () => {} + +type Foo = () => void +</script> + +<template> + <div @click=" 我 " /> + <div @click=" me " /> + <div @click="我 as Foo" /> + <div @click="me as Foo" /> + <div @click="我 satisfies Foo" /> + <div @click="me satisfies Foo" /> + <div @click=" (<number>我)" /> + <div @click=" (<number>me)" /> + <div @click=" 我!" /> + <div @click=" me!" /> + <div @click="我< string>" /> + <div @click="me< string>" /> + <div @click="我! as unknown satisfies Foo" /> + <div @click="me! as unknown satisfies Foo" /> +</template> diff --git a/tests/format/vue/event-binding/non-ascii-expression.vue b/tests/format/vue/event-binding/non-ascii-expression.vue new file mode 100644 index 000000000000..7fb474a79548 --- /dev/null +++ b/tests/format/vue/event-binding/non-ascii-expression.vue @@ -0,0 +1,4 @@ +<template> + <div @click=" 我 " /> + <div @click=" me " /> +</template> diff --git a/tests/format/vue/html-vue/__snapshots__/format.test.js.snap b/tests/format/vue/html-vue/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..5d01ba4b2b20 --- /dev/null +++ b/tests/format/vue/html-vue/__snapshots__/format.test.js.snap @@ -0,0 +1,439 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`elastic-header.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- https://github.com/vuejs/vue/blob/dev/examples/elastic-header/index.html --> +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> + <title>Vue.js elastic header example</title> + <!-- Delete ".min" for console warnings in development --> + <script src="../../dist/vue.min.js"></script> + <script src="http://dynamicsjs.com/lib/dynamics.js"></script> + <link rel="stylesheet" href="style.css"> + <!-- template for the component --> + <script type="text/x-template" id="header-view-template"> + <div class="draggable-header-view" + @mousedown="startDrag" @touchstart="startDrag" + @mousemove="onDrag" @touchmove="onDrag" + @mouseup="stopDrag" @touchend="stopDrag" @mouseleave="stopDrag"> + <svg class="bg" width="320" height="560"> + <path :d="headerPath" fill="#3F51B5"></path> + </svg> + <div class="header"> + <slot name="header"></slot> + </div> + <div class="content" :style="contentPosition"> + <slot name="content"></slot> + </div> + </div> + </script> + </head> + <body> + + <div id="app" @touchmove.prevent> + <draggable-header-view> + <template slot="header"> + <h1>Elastic Draggable SVG Header</h1> + <p>with <a href="https://vuejs.org">Vue.js</a> + <a href="http://dynamicsjs.com">dynamics.js</a></p> + </template> + <template slot="content"> + <p>Note this is just an effect demo - there are of course many additional details if you want to use this in production, e.g. handling responsive sizes, reload threshold and content scrolling. Those are out of scope for this quick little hack. However, the idea is that you can hide them as internal details of a Vue.js component and expose a simple Web-Component-like interface.</p> + </template> + </draggable-header-view> + </div> + + <script> + Vue.component('draggable-header-view', { + template: '#header-view-template', + data: function () { + return { + dragging: false, + // quadratic bezier control point + c: { x: 160, y: 160 }, + // record drag start point + start: { x: 0, y: 0 } + } + }, + computed: { + headerPath: function () { + return 'M0,0 L320,0 320,160' + + 'Q' + this.c.x + ',' + this.c.y + + ' 0,160' + }, + contentPosition: function () { + var dy = this.c.y - 160 + var dampen = dy > 0 ? 2 : 4 + return { + transform: 'translate3d(0,' + dy / dampen + 'px,0)' + } + } + }, + methods: { + startDrag: function (e) { + e = e.changedTouches ? e.changedTouches[0] : e + this.dragging = true + this.start.x = e.pageX + this.start.y = e.pageY + }, + onDrag: function (e) { + e = e.changedTouches ? e.changedTouches[0] : e + if (this.dragging) { + this.c.x = 160 + (e.pageX - this.start.x) + // dampen vertical drag by a factor + var dy = e.pageY - this.start.y + var dampen = dy > 0 ? 1.5 : 4 + this.c.y = 160 + dy / dampen + } + }, + stopDrag: function () { + if (this.dragging) { + this.dragging = false + dynamics.animate(this.c, { + x: 160, + y: 160 + }, { + type: dynamics.spring, + duration: 700, + friction: 280 + }) + } + } + } + }) + + new Vue({ el: '#app' }) + </script> + </body> +</html> + +=====================================output===================================== +<!-- https://github.com/vuejs/vue/blob/dev/examples/elastic-header/index.html --> +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta + name="viewport" + content="initial-scale=1, maximum-scale=1, user-scalable=no" + /> + <title>Vue.js elastic header example</title> + <!-- Delete ".min" for console warnings in development --> + <script src="../../dist/vue.min.js"></script> + <script src="http://dynamicsjs.com/lib/dynamics.js"></script> + <link rel="stylesheet" href="style.css" /> + <!-- template for the component --> + <script type="text/x-template" id="header-view-template"> + <div class="draggable-header-view" + @mousedown="startDrag" @touchstart="startDrag" + @mousemove="onDrag" @touchmove="onDrag" + @mouseup="stopDrag" @touchend="stopDrag" @mouseleave="stopDrag"> + <svg class="bg" width="320" height="560"> + <path :d="headerPath" fill="#3F51B5"></path> + </svg> + <div class="header"> + <slot name="header"></slot> + </div> + <div class="content" :style="contentPosition"> + <slot name="content"></slot> + </div> + </div> + </script> + </head> + <body> + <div id="app" @touchmove.prevent> + <draggable-header-view> + <template slot="header"> + <h1>Elastic Draggable SVG Header</h1> + <p> + with <a href="https://vuejs.org">Vue.js</a> + + <a href="http://dynamicsjs.com">dynamics.js</a> + </p> + </template> + <template slot="content"> + <p> + Note this is just an effect demo - there are of course many + additional details if you want to use this in production, e.g. + handling responsive sizes, reload threshold and content scrolling. + Those are out of scope for this quick little hack. However, the idea + is that you can hide them as internal details of a Vue.js component + and expose a simple Web-Component-like interface. + </p> + </template> + </draggable-header-view> + </div> + + <script> + Vue.component("draggable-header-view", { + template: "#header-view-template", + data: function () { + return { + dragging: false, + // quadratic bezier control point + c: { x: 160, y: 160 }, + // record drag start point + start: { x: 0, y: 0 }, + }; + }, + computed: { + headerPath: function () { + return ( + "M0,0 L320,0 320,160" + "Q" + this.c.x + "," + this.c.y + " 0,160" + ); + }, + contentPosition: function () { + var dy = this.c.y - 160; + var dampen = dy > 0 ? 2 : 4; + return { + transform: "translate3d(0," + dy / dampen + "px,0)", + }; + }, + }, + methods: { + startDrag: function (e) { + e = e.changedTouches ? e.changedTouches[0] : e; + this.dragging = true; + this.start.x = e.pageX; + this.start.y = e.pageY; + }, + onDrag: function (e) { + e = e.changedTouches ? e.changedTouches[0] : e; + if (this.dragging) { + this.c.x = 160 + (e.pageX - this.start.x); + // dampen vertical drag by a factor + var dy = e.pageY - this.start.y; + var dampen = dy > 0 ? 1.5 : 4; + this.c.y = 160 + dy / dampen; + } + }, + stopDrag: function () { + if (this.dragging) { + this.dragging = false; + dynamics.animate( + this.c, + { + x: 160, + y: 160, + }, + { + type: dynamics.spring, + duration: 700, + friction: 280, + }, + ); + } + }, + }, + }); + + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`hello-world.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- Hello World example from https://github.com/vuejs/vuejs.org/blob/master/src/v2/examples/vue-20-hello-world/index.html --> +<!DOCTYPE html> +<html> +<head> + <title>My first Vue app</title> + <script src="https://unpkg.com/vue"></script> +</head> +<body> + <div id="app"> + {{ message }} + </div> + + <script> + var app = new Vue({ + el: '#app', + data: { + message: 'Hello Vue!' + } + }) + </script> +</body> +</html> + +=====================================output===================================== +<!-- Hello World example from https://github.com/vuejs/vuejs.org/blob/master/src/v2/examples/vue-20-hello-world/index.html --> +<!doctype html> +<html> + <head> + <title>My first Vue app</title> + <script src="https://unpkg.com/vue"></script> + </head> + <body> + <div id="app"> + {{ message }} + </div> + + <script> + var app = new Vue({ + el: "#app", + data: { + message: "Hello Vue!", + }, + }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`upper-case-2.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!-- issue #8162 --> + +<!DOCTYPE html><HTML> + <body> + <div v-if="foo === 'foo'"> + + </div> + <script> + new Vue({el: '#app'}) + </script> + </body> + </HTML> + +=====================================output===================================== +<!-- issue #8162 --> + +<!doctype html> +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`upper-case-html-tag.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!doctype html><HTML></HTML> + +=====================================output===================================== +<!doctype html> +<html></html> + +================================================================================ +`; + +exports[`upper-case-html-tag-2.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<!DOCTYPE html><HTML> + <body> + <div v-if="foo === 'foo'"> + +</div> + <script> +new Vue({el: '#app'}) + </script> + </body> +</HTML> + +=====================================output===================================== +<!doctype html> +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`upper-case-html-tag-3.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<HTML><head></head><body></body></HTML> + +=====================================output===================================== +<html> + <head></head> + <body></body> +</html> + +================================================================================ +`; + +exports[`upper-case-html-tag-4.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<hTml> + <body> + <div v-if="foo === 'foo'"> + + </div> + <script> + new Vue({el: '#app'}) + </script> + </body> + </hTml> + +=====================================output===================================== +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`void-element.html format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<img> + +=====================================output===================================== +<img /> + +================================================================================ +`; diff --git a/tests/format/vue/html-vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/html-vue/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index eed584d7d324..000000000000 --- a/tests/format/vue/html-vue/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,425 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`elastic-header.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- https://github.com/vuejs/vue/blob/dev/examples/elastic-header/index.html --> -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> - <title>Vue.js elastic header example</title> - <!-- Delete ".min" for console warnings in development --> - <script src="../../dist/vue.min.js"></script> - <script src="http://dynamicsjs.com/lib/dynamics.js"></script> - <link rel="stylesheet" href="style.css"> - <!-- template for the component --> - <script type="text/x-template" id="header-view-template"> - <div class="draggable-header-view" - @mousedown="startDrag" @touchstart="startDrag" - @mousemove="onDrag" @touchmove="onDrag" - @mouseup="stopDrag" @touchend="stopDrag" @mouseleave="stopDrag"> - <svg class="bg" width="320" height="560"> - <path :d="headerPath" fill="#3F51B5"></path> - </svg> - <div class="header"> - <slot name="header"></slot> - </div> - <div class="content" :style="contentPosition"> - <slot name="content"></slot> - </div> - </div> - </script> - </head> - <body> - - <div id="app" @touchmove.prevent> - <draggable-header-view> - <template slot="header"> - <h1>Elastic Draggable SVG Header</h1> - <p>with <a href="https://vuejs.org">Vue.js</a> + <a href="http://dynamicsjs.com">dynamics.js</a></p> - </template> - <template slot="content"> - <p>Note this is just an effect demo - there are of course many additional details if you want to use this in production, e.g. handling responsive sizes, reload threshold and content scrolling. Those are out of scope for this quick little hack. However, the idea is that you can hide them as internal details of a Vue.js component and expose a simple Web-Component-like interface.</p> - </template> - </draggable-header-view> - </div> - - <script> - Vue.component('draggable-header-view', { - template: '#header-view-template', - data: function () { - return { - dragging: false, - // quadratic bezier control point - c: { x: 160, y: 160 }, - // record drag start point - start: { x: 0, y: 0 } - } - }, - computed: { - headerPath: function () { - return 'M0,0 L320,0 320,160' + - 'Q' + this.c.x + ',' + this.c.y + - ' 0,160' - }, - contentPosition: function () { - var dy = this.c.y - 160 - var dampen = dy > 0 ? 2 : 4 - return { - transform: 'translate3d(0,' + dy / dampen + 'px,0)' - } - } - }, - methods: { - startDrag: function (e) { - e = e.changedTouches ? e.changedTouches[0] : e - this.dragging = true - this.start.x = e.pageX - this.start.y = e.pageY - }, - onDrag: function (e) { - e = e.changedTouches ? e.changedTouches[0] : e - if (this.dragging) { - this.c.x = 160 + (e.pageX - this.start.x) - // dampen vertical drag by a factor - var dy = e.pageY - this.start.y - var dampen = dy > 0 ? 1.5 : 4 - this.c.y = 160 + dy / dampen - } - }, - stopDrag: function () { - if (this.dragging) { - this.dragging = false - dynamics.animate(this.c, { - x: 160, - y: 160 - }, { - type: dynamics.spring, - duration: 700, - friction: 280 - }) - } - } - } - }) - - new Vue({ el: '#app' }) - </script> - </body> -</html> - -=====================================output===================================== -<!-- https://github.com/vuejs/vue/blob/dev/examples/elastic-header/index.html --> -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8" /> - <meta - name="viewport" - content="initial-scale=1, maximum-scale=1, user-scalable=no" - /> - <title>Vue.js elastic header example</title> - <!-- Delete ".min" for console warnings in development --> - <script src="../../dist/vue.min.js"></script> - <script src="http://dynamicsjs.com/lib/dynamics.js"></script> - <link rel="stylesheet" href="style.css" /> - <!-- template for the component --> - <script type="text/x-template" id="header-view-template"> - <div class="draggable-header-view" - @mousedown="startDrag" @touchstart="startDrag" - @mousemove="onDrag" @touchmove="onDrag" - @mouseup="stopDrag" @touchend="stopDrag" @mouseleave="stopDrag"> - <svg class="bg" width="320" height="560"> - <path :d="headerPath" fill="#3F51B5"></path> - </svg> - <div class="header"> - <slot name="header"></slot> - </div> - <div class="content" :style="contentPosition"> - <slot name="content"></slot> - </div> - </div> - </script> - </head> - <body> - <div id="app" @touchmove.prevent> - <draggable-header-view> - <template slot="header"> - <h1>Elastic Draggable SVG Header</h1> - <p> - with <a href="https://vuejs.org">Vue.js</a> + - <a href="http://dynamicsjs.com">dynamics.js</a> - </p> - </template> - <template slot="content"> - <p> - Note this is just an effect demo - there are of course many - additional details if you want to use this in production, e.g. - handling responsive sizes, reload threshold and content scrolling. - Those are out of scope for this quick little hack. However, the idea - is that you can hide them as internal details of a Vue.js component - and expose a simple Web-Component-like interface. - </p> - </template> - </draggable-header-view> - </div> - - <script> - Vue.component("draggable-header-view", { - template: "#header-view-template", - data: function () { - return { - dragging: false, - // quadratic bezier control point - c: { x: 160, y: 160 }, - // record drag start point - start: { x: 0, y: 0 }, - }; - }, - computed: { - headerPath: function () { - return ( - "M0,0 L320,0 320,160" + "Q" + this.c.x + "," + this.c.y + " 0,160" - ); - }, - contentPosition: function () { - var dy = this.c.y - 160; - var dampen = dy > 0 ? 2 : 4; - return { - transform: "translate3d(0," + dy / dampen + "px,0)", - }; - }, - }, - methods: { - startDrag: function (e) { - e = e.changedTouches ? e.changedTouches[0] : e; - this.dragging = true; - this.start.x = e.pageX; - this.start.y = e.pageY; - }, - onDrag: function (e) { - e = e.changedTouches ? e.changedTouches[0] : e; - if (this.dragging) { - this.c.x = 160 + (e.pageX - this.start.x); - // dampen vertical drag by a factor - var dy = e.pageY - this.start.y; - var dampen = dy > 0 ? 1.5 : 4; - this.c.y = 160 + dy / dampen; - } - }, - stopDrag: function () { - if (this.dragging) { - this.dragging = false; - dynamics.animate( - this.c, - { - x: 160, - y: 160, - }, - { - type: dynamics.spring, - duration: 700, - friction: 280, - } - ); - } - }, - }, - }); - - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`hello-world.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- Hello World example from https://github.com/vuejs/vuejs.org/blob/master/src/v2/examples/vue-20-hello-world/index.html --> -<!DOCTYPE html> -<html> -<head> - <title>My first Vue app</title> - <script src="https://unpkg.com/vue"></script> -</head> -<body> - <div id="app"> - {{ message }} - </div> - - <script> - var app = new Vue({ - el: '#app', - data: { - message: 'Hello Vue!' - } - }) - </script> -</body> -</html> - -=====================================output===================================== -<!-- Hello World example from https://github.com/vuejs/vuejs.org/blob/master/src/v2/examples/vue-20-hello-world/index.html --> -<!DOCTYPE html> -<html> - <head> - <title>My first Vue app</title> - <script src="https://unpkg.com/vue"></script> - </head> - <body> - <div id="app"> - {{ message }} - </div> - - <script> - var app = new Vue({ - el: "#app", - data: { - message: "Hello Vue!", - }, - }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`upper-case-2.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- issue #8162 --> - -<!DOCTYPE html><HTML> - <body> - <div v-if="foo === 'foo'"> - - </div> - <script> - new Vue({el: '#app'}) - </script> - </body> - </HTML> - -=====================================output===================================== -<!-- issue #8162 --> - -<!DOCTYPE html> -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`upper-case-html-tag.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!doctype html><HTML></HTML> - -=====================================output===================================== -<!DOCTYPE html> -<html></html> - -================================================================================ -`; - -exports[`upper-case-html-tag-2.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html><HTML> - <body> - <div v-if="foo === 'foo'"> - -</div> - <script> -new Vue({el: '#app'}) - </script> - </body> -</HTML> - -=====================================output===================================== -<!DOCTYPE html> -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`upper-case-html-tag-3.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<HTML><head></head><body></body></HTML> - -=====================================output===================================== -<html> - <head></head> - <body></body> -</html> - -================================================================================ -`; - -exports[`upper-case-html-tag-4.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<hTml> - <body> - <div v-if="foo === 'foo'"> - - </div> - <script> - new Vue({el: '#app'}) - </script> - </body> - </hTml> - -=====================================output===================================== -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; diff --git a/tests/format/vue/html-vue/format.test.js b/tests/format/vue/html-vue/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/html-vue/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/html-vue/jsfmt.spec.js b/tests/format/vue/html-vue/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/html-vue/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/html-vue/void-element.html b/tests/format/vue/html-vue/void-element.html new file mode 100644 index 000000000000..4740ec98c495 --- /dev/null +++ b/tests/format/vue/html-vue/void-element.html @@ -0,0 +1 @@ +<img> diff --git a/tests/format/vue/indent/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/indent/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/indent/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/indent/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/indent/format.test.js b/tests/format/vue/indent/format.test.js new file mode 100644 index 000000000000..7d55fccbfe5a --- /dev/null +++ b/tests/format/vue/indent/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["vue"], { vueIndentScriptAndStyle: true }); +runFormatTest(import.meta, ["vue"], { vueIndentScriptAndStyle: false }); diff --git a/tests/format/vue/indent/jsfmt.spec.js b/tests/format/vue/indent/jsfmt.spec.js deleted file mode 100644 index 7f407e46e2d8..000000000000 --- a/tests/format/vue/indent/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["vue"], { vueIndentScriptAndStyle: true }); -run_spec(__dirname, ["vue"], { vueIndentScriptAndStyle: false }); diff --git a/tests/format/vue/interpolation/__snapshots__/format.test.js.snap b/tests/format/vue/interpolation/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..9ec43f217bae --- /dev/null +++ b/tests/format/vue/interpolation/__snapshots__/format.test.js.snap @@ -0,0 +1,88 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`bitwise-or-operator.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div> + {{ + fn( + bitwise | or | operator | a_long_long_long_long_long_long_long_long_long_long_variable + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> + +=====================================output===================================== +<template> + <div> + {{ + fn( + bitwise | + or | + operator | + a_long_long_long_long_long_long_long_long_long_long_variable, + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> + +================================================================================ +`; + +exports[`parenthesized.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> +<span>{{(a|| b)}} {{z&&(a&&b)}}</span> +</template> + +=====================================output===================================== +<template> + <span>{{ a || b }} {{ z && a && b }}</span> +</template> + +================================================================================ +`; + +exports[`template.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <root> +<div class="red"> + We are going to add this simple card here + </div> + <div class="red"> + What is going on {{ prop1 }} and {{ prop2 }} + </div> + </root> +</template> + +=====================================output===================================== +<template> + <root> + <div class="red">We are going to add this simple card here</div> + <div class="red">What is going on {{ prop1 }} and {{ prop2 }}</div> + </root> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/interpolation/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/interpolation/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 91b44d2b1c20..000000000000 --- a/tests/format/vue/interpolation/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,47 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`parenthesized.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<span>{{(a|| b)}} {{z&&(a&&b)}}</span> -</template> - -=====================================output===================================== -<template> - <span>{{ a || b }} {{ z && a && b }}</span> -</template> - -================================================================================ -`; - -exports[`template.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <root> -<div class="red"> - We are going to add this simple card here - </div> - <div class="red"> - What is going on {{ prop1 }} and {{ prop2 }} - </div> - </root> -</template> - -=====================================output===================================== -<template> - <root> - <div class="red">We are going to add this simple card here</div> - <div class="red">What is going on {{ prop1 }} and {{ prop2 }}</div> - </root> -</template> - -================================================================================ -`; diff --git a/tests/format/vue/interpolation/bitwise-or-operator.vue b/tests/format/vue/interpolation/bitwise-or-operator.vue new file mode 100644 index 000000000000..ddfac4f11987 --- /dev/null +++ b/tests/format/vue/interpolation/bitwise-or-operator.vue @@ -0,0 +1,13 @@ +<template> + <div> + {{ + fn( + bitwise | or | operator | a_long_long_long_long_long_long_long_long_long_long_variable + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> diff --git a/tests/format/vue/interpolation/format.test.js b/tests/format/vue/interpolation/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/interpolation/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/interpolation/jsfmt.spec.js b/tests/format/vue/interpolation/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/interpolation/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/invalid/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/invalid/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/invalid/format.test.js b/tests/format/vue/invalid/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/invalid/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/invalid/jsfmt.spec.js b/tests/format/vue/invalid/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/invalid/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/multiparser/__snapshots__/format.test.js.snap b/tests/format/vue/multiparser/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..41aad2937b9f --- /dev/null +++ b/tests/format/vue/multiparser/__snapshots__/format.test.js.snap @@ -0,0 +1,422 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`lang-empty.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang=""> +should. +be. well.formatted( + +);</script> + +=====================================output===================================== +<script lang=""> +should.be.well.formatted(); +</script> + +================================================================================ +`; + +exports[`lang-js.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="js"> +should. +be. well.formatted( + +);</script> + +=====================================output===================================== +<script lang="js"> +should.be.well.formatted(); +</script> + +================================================================================ +`; + +exports[`lang-jsx.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="jsx"> +export default { + data: () => ({ + message: 'hello with jsx' + }), + render(h) { + + + + return <div>{this.message}</div> + } +} +</script> + +=====================================output===================================== +<script lang="jsx"> +export default { + data: () => ({ + message: "hello with jsx", + }), + render(h) { + return <div>{this.message}</div>; + }, +}; +</script> + +================================================================================ +`; + +exports[`lang-none.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script> +should. +be. well.formatted( + +);</script> + +=====================================output===================================== +<script> +should.be.well.formatted(); +</script> + +================================================================================ +`; + +exports[`lang-ts.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div>{{foo}}</div> +</template> + +<script lang="ts"> +export default { + computed: { foo( ): string { return "foo"; }, }, +} +</script> + + +=====================================output===================================== +<template> + <div>{{ foo }}</div> +</template> + +<script lang="ts"> +export default { + computed: { + foo(): string { + return "foo"; + }, + }, +}; +</script> + +================================================================================ +`; + +exports[`lang-ts-multiple-script-tags.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script setup lang="ts"> +let x: string | number = 1 +</script> +<script></script> +<script></script> +<script></script> +<template> + <span + v-if=" (x as string).length > 0" + v-for="a in [1,2, 3,4,5].map( (x : number) => x * x)" + :foo=" (x as number).toFixed( 2) " + > + {{ (x as number).toFixed(2) }} + </span> +</template> + +=====================================output===================================== +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script setup lang="ts"> +let x: string | number = 1; +</script> +<script></script> +<script></script> +<script></script> +<template> + <span + v-if="(x as string).length > 0" + v-for="a in [1, 2, 3, 4, 5].map((x: number) => x * x)" + :foo="(x as number).toFixed(2)" + > + {{ (x as number).toFixed(2) }} + </span> +</template> + +================================================================================ +`; + +exports[`lang-tsx.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="tsx"> +import {VNode} from "vue" +export default { + computed: { foo( ):string { return "foo" }, }, + render(h):VNode { return <div>{ this.foo }</div> }, +} +</script> + +=====================================output===================================== +<script lang="tsx"> +import { VNode } from "vue"; +export default { + computed: { + foo(): string { + return "foo"; + }, + }, + render(h): VNode { + return <div>{this.foo}</div>; + }, +}; +</script> + +================================================================================ +`; + +exports[`snippet: empty format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="markdown"></custom> +=====================================output===================================== +<custom lang="markdown"></custom> + +================================================================================ +`; + +exports[`snippet: new line format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="markdown"> + +</custom> +=====================================output===================================== +<custom lang="markdown"></custom> + +================================================================================ +`; + +exports[`snippet: non-space format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="markdown"> +   +</custom> +=====================================output===================================== +<custom lang="markdown"></custom> + +================================================================================ +`; + +exports[`snippet: spaces format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="markdown"> </custom> +=====================================output===================================== +<custom lang="markdown"></custom> + +================================================================================ +`; + +exports[`template-bind.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div v-bind:id=" 'list-' + id "></div> + <div v-bind:id=" &quot;list-&quot; + id "></div> + <div v-bind:id=" &apos;list-&apos; + id "></div> + <div v-bind:id=" &apos;&quot;&apos; + id "></div> + <div v-bind:id=" rawId | formatId "></div> + <div v-bind:id=" ok ? 'YES' : 'NO' "></div> + + + <button :disabled=" a &&b "></button> + <button .disabled=" a &&b "></button> + + <button @click=" foo ( arg, 'string' ) "></button> +</template> + + +=====================================output===================================== +<template> + <div v-bind:id="'list-' + id"></div> + <div v-bind:id="'list-' + id"></div> + <div v-bind:id="'list-' + id"></div> + <div v-bind:id="'&quot;' + id"></div> + <div v-bind:id="rawId | formatId"></div> + <div v-bind:id="ok ? 'YES' : 'NO'"></div> + + <button :disabled="a && b"></button> + <button .disabled="a && b"></button> + + <button @click="foo(arg, 'string')"></button> +</template> + +================================================================================ +`; + +exports[`template-class.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <h2 + class="title" + :class="{ 'issue-realtime-pre-pulse': preAnimation, + 'issue-realtime-trigger-pulse': pulseAnimation}" + v-html="titleHtml" + > + </h2> +</template> + +=====================================output===================================== +<template> + <h2 + class="title" + :class="{ + 'issue-realtime-pre-pulse': preAnimation, + 'issue-realtime-trigger-pulse': pulseAnimation, + }" + v-html="titleHtml" + ></h2> +</template> + +================================================================================ +`; + +exports[`void-element.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="markdown" /> + +=====================================output===================================== +<custom lang="markdown" /> + +================================================================================ +`; + +exports[`vue-component.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template > + <h1 >{{greeting}} world</h1 > + <script>kikoo ( ) </script> +</template > + +<script> +module . exports = +{data : function () {return { + greeting: "Hello" +}} +} +</script> + +<style scoped > +p { font-size : 2em ; text-align : center ; } + + </style > + +<style lang="postcss" > +p { font-size : 2em ; text-align : center ; } + + </style > + +=====================================output===================================== +<template> + <h1>{{ greeting }} world</h1> + <script> + kikoo(); + </script> +</template> + +<script> +module.exports = { + data: function () { + return { + greeting: "Hello", + }; + }, +}; +</script> + +<style scoped> +p { + font-size: 2em; + text-align: center; +} +</style> + +<style lang="postcss"> +p { + font-size: 2em; + text-align: center; +} +</style> + +================================================================================ +`; diff --git a/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a921d3a0dbee..000000000000 --- a/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`lang-jsx.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script lang="jsx"> -export default { - data: () => ({ - message: 'hello with jsx' - }), - render(h) { - - - - return <div>{this.message}</div> - } -} -</script> - -=====================================output===================================== -<script lang="jsx"> -export default { - data: () => ({ - message: "hello with jsx", - }), - render(h) { - return <div>{this.message}</div>; - }, -}; -</script> - -================================================================================ -`; - -exports[`lang-ts.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div>{{foo}}</div> -</template> - -<script lang="ts"> -export default { - computed: { foo( ): string { return "foo"; }, }, -} -</script> - - -=====================================output===================================== -<template> - <div>{{ foo }}</div> -</template> - -<script lang="ts"> -export default { - computed: { - foo(): string { - return "foo"; - }, - }, -}; -</script> - -================================================================================ -`; - -exports[`lang-tsx.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script lang="tsx"> -import {VNode} from "vue" -export default { - computed: { foo( ):string { return "foo" }, }, - render(h):VNode { return <div>{ this.foo }</div> }, -} -</script> - -=====================================output===================================== -<script lang="tsx"> -import { VNode } from "vue"; -export default { - computed: { - foo(): string { - return "foo"; - }, - }, - render(h): VNode { - return <div>{this.foo}</div>; - }, -}; -</script> - -================================================================================ -`; - -exports[`snippet: empty format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="markdown"></custom> -=====================================output===================================== -<custom lang="markdown"></custom> - -================================================================================ -`; - -exports[`snippet: new line format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="markdown"> - -</custom> -=====================================output===================================== -<custom lang="markdown"></custom> - -================================================================================ -`; - -exports[`snippet: non-space format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="markdown"> -   -</custom> -=====================================output===================================== -<custom lang="markdown"></custom> - -================================================================================ -`; - -exports[`snippet: spaces format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="markdown"> </custom> -=====================================output===================================== -<custom lang="markdown"></custom> - -================================================================================ -`; - -exports[`template-bind.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div v-bind:id=" 'list-' + id "></div> - <div v-bind:id=" &quot;list-&quot; + id "></div> - <div v-bind:id=" &apos;list-&apos; + id "></div> - <div v-bind:id=" &apos;&quot;&apos; + id "></div> - <div v-bind:id=" rawId | formatId "></div> - <div v-bind:id=" ok ? 'YES' : 'NO' "></div> - <button @click=" foo ( arg, 'string' ) "></button> -</template> - - -=====================================output===================================== -<template> - <div v-bind:id="'list-' + id"></div> - <div v-bind:id="'list-' + id"></div> - <div v-bind:id="'list-' + id"></div> - <div v-bind:id="'&quot;' + id"></div> - <div v-bind:id="rawId | formatId"></div> - <div v-bind:id="ok ? 'YES' : 'NO'"></div> - <button @click="foo(arg, 'string')"></button> -</template> - -================================================================================ -`; - -exports[`template-class.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <h2 - class="title" - :class="{ 'issue-realtime-pre-pulse': preAnimation, - 'issue-realtime-trigger-pulse': pulseAnimation}" - v-html="titleHtml" - > - </h2> -</template> - -=====================================output===================================== -<template> - <h2 - class="title" - :class="{ - 'issue-realtime-pre-pulse': preAnimation, - 'issue-realtime-trigger-pulse': pulseAnimation, - }" - v-html="titleHtml" - ></h2> -</template> - -================================================================================ -`; - -exports[`void-element.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="markdown" /> - -=====================================output===================================== -<custom lang="markdown" /> - -================================================================================ -`; - -exports[`vue-component.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template > - <h1 >{{greeting}} world</h1 > - <script>kikoo ( ) </script> -</template > - -<script> -module . exports = -{data : function () {return { - greeting: "Hello" -}} -} -</script> - -<style scoped > -p { font-size : 2em ; text-align : center ; } - - </style > - -<style lang="postcss" > -p { font-size : 2em ; text-align : center ; } - - </style > - -=====================================output===================================== -<template> - <h1>{{ greeting }} world</h1> - <script> - kikoo(); - </script> -</template> - -<script> -module.exports = { - data: function () { - return { - greeting: "Hello", - }; - }, -}; -</script> - -<style scoped> -p { - font-size: 2em; - text-align: center; -} -</style> - -<style lang="postcss"> -p { - font-size: 2em; - text-align: center; -} -</style> - -================================================================================ -`; diff --git a/tests/format/vue/multiparser/format.test.js b/tests/format/vue/multiparser/format.test.js new file mode 100644 index 000000000000..adca1ffc80ea --- /dev/null +++ b/tests/format/vue/multiparser/format.test.js @@ -0,0 +1,24 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + { + name: "empty", + code: '<custom lang="markdown"></custom>', + }, + { + name: "spaces", + code: '<custom lang="markdown"> </custom>', + }, + { + name: "new line", + code: '<custom lang="markdown">\n \n</custom>', + }, + { + name: "non-space", + code: '<custom lang="markdown">\n \u2005 \n</custom>', + }, + ], + }, + ["vue"], +); diff --git a/tests/format/vue/multiparser/jsfmt.spec.js b/tests/format/vue/multiparser/jsfmt.spec.js deleted file mode 100644 index ca3a7b5ccebe..000000000000 --- a/tests/format/vue/multiparser/jsfmt.spec.js +++ /dev/null @@ -1,24 +0,0 @@ -run_spec( - { - dirname: __dirname, - snippets: [ - { - name: "empty", - code: '<custom lang="markdown"></custom>', - }, - { - name: "spaces", - code: '<custom lang="markdown"> </custom>', - }, - { - name: "new line", - code: '<custom lang="markdown">\n \n</custom>', - }, - { - name: "non-space", - code: '<custom lang="markdown">\n \u2005 \n</custom>', - }, - ], - }, - ["vue"] -); diff --git a/tests/format/vue/multiparser/lang-empty.vue b/tests/format/vue/multiparser/lang-empty.vue new file mode 100644 index 000000000000..808269a44755 --- /dev/null +++ b/tests/format/vue/multiparser/lang-empty.vue @@ -0,0 +1,5 @@ +<script lang=""> +should. +be. well.formatted( + +);</script> diff --git a/tests/format/vue/multiparser/lang-js.vue b/tests/format/vue/multiparser/lang-js.vue new file mode 100644 index 000000000000..4cb7c5e7c928 --- /dev/null +++ b/tests/format/vue/multiparser/lang-js.vue @@ -0,0 +1,5 @@ +<script lang="js"> +should. +be. well.formatted( + +);</script> diff --git a/tests/format/vue/multiparser/lang-none.vue b/tests/format/vue/multiparser/lang-none.vue new file mode 100644 index 000000000000..68e3f73d1678 --- /dev/null +++ b/tests/format/vue/multiparser/lang-none.vue @@ -0,0 +1,5 @@ +<script> +should. +be. well.formatted( + +);</script> diff --git a/tests/format/vue/multiparser/lang-ts-multiple-script-tags.vue b/tests/format/vue/multiparser/lang-ts-multiple-script-tags.vue new file mode 100644 index 000000000000..d60027bb2f07 --- /dev/null +++ b/tests/format/vue/multiparser/lang-ts-multiple-script-tags.vue @@ -0,0 +1,21 @@ +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script></script> +<script setup lang="ts"> +let x: string | number = 1 +</script> +<script></script> +<script></script> +<script></script> +<template> + <span + v-if=" (x as string).length > 0" + v-for="a in [1,2, 3,4,5].map( (x : number) => x * x)" + :foo=" (x as number).toFixed( 2) " + > + {{ (x as number).toFixed(2) }} + </span> +</template> diff --git a/tests/format/vue/multiparser/template-bind.vue b/tests/format/vue/multiparser/template-bind.vue index 3c1f9dc7cade..4a60b83d7bea 100644 --- a/tests/format/vue/multiparser/template-bind.vue +++ b/tests/format/vue/multiparser/template-bind.vue @@ -5,6 +5,11 @@ <div v-bind:id=" &apos;&quot;&apos; + id "></div> <div v-bind:id=" rawId | formatId "></div> <div v-bind:id=" ok ? 'YES' : 'NO' "></div> + + + <button :disabled=" a &&b "></button> + <button .disabled=" a &&b "></button> + <button @click=" foo ( arg, 'string' ) "></button> </template> diff --git a/tests/format/vue/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/multiparser/unknown/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/multiparser/unknown/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/multiparser/unknown/format.test.js b/tests/format/vue/multiparser/unknown/format.test.js new file mode 100644 index 000000000000..ee9050d75ec0 --- /dev/null +++ b/tests/format/vue/multiparser/unknown/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["vue"]); +runFormatTest(import.meta, ["vue"], { vueIndentScriptAndStyle: true }); +runFormatTest(import.meta, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/vue/multiparser/unknown/jsfmt.spec.js b/tests/format/vue/multiparser/unknown/jsfmt.spec.js deleted file mode 100644 index e188873aa9d8..000000000000 --- a/tests/format/vue/multiparser/unknown/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["vue"]); -run_spec(__dirname, ["vue"], { vueIndentScriptAndStyle: true }); -run_spec(__dirname, ["vue"], { embeddedLanguageFormatting: "off" }); diff --git a/tests/format/vue/range/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/range/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/range/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/range/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/range/format.test.js b/tests/format/vue/range/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/range/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/range/jsfmt.spec.js b/tests/format/vue/range/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/range/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/single-attribute-per-line/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/vue/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap rename to tests/format/vue/single-attribute-per-line/__snapshots__/format.test.js.snap diff --git a/tests/format/vue/single-attribute-per-line/format.test.js b/tests/format/vue/single-attribute-per-line/format.test.js new file mode 100644 index 000000000000..a359eee84988 --- /dev/null +++ b/tests/format/vue/single-attribute-per-line/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["vue"]); +runFormatTest(import.meta, ["vue"], { singleAttributePerLine: true }); diff --git a/tests/format/vue/single-attribute-per-line/jsfmt.spec.js b/tests/format/vue/single-attribute-per-line/jsfmt.spec.js deleted file mode 100644 index b0c54a27902e..000000000000 --- a/tests/format/vue/single-attribute-per-line/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["vue"]); -run_spec(__dirname, ["vue"], { singleAttributePerLine: true }); diff --git a/tests/format/vue/style/__snapshots__/format.test.js.snap b/tests/format/vue/style/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..77f51c145ad5 --- /dev/null +++ b/tests/format/vue/style/__snapshots__/format.test.js.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`mj-style.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> +<mjml> + +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + +</mjml> +</template> + +=====================================output===================================== +<template> + <mjml> + <mj-style> .should-not-format{ as: 'css' }</mj-style> + </mjml> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/style/format.test.js b/tests/format/vue/style/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/style/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/style/mj-style.vue b/tests/format/vue/style/mj-style.vue new file mode 100644 index 000000000000..c0e88705ef66 --- /dev/null +++ b/tests/format/vue/style/mj-style.vue @@ -0,0 +1,9 @@ +<template> +<mjml> + +<mj-style> .should-not-format{ + as: 'css' +}</mj-style> + +</mjml> +</template> diff --git a/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index d5c6398483e4..000000000000 --- a/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,43 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script setup lang="ts"> -let x = 1; -function log(...args) { - console.log(...args); -} -</script> - -<template> - <div @click="if (x === 1 as number) { log('hello') } else { log('nonhello') };">{{ x }}</div> -</template> - -=====================================output===================================== -<script setup lang="ts"> -let x = 1; -function log(...args) { - console.log(...args); -} -</script> - -<template> - <div - @click=" - if (x === (1 as number)) { - log('hello'); - } else { - log('nonhello'); - } - " - > - {{ x }} - </div> -</template> - -================================================================================ -`; diff --git a/tests/format/vue/ts-event-binding/jsfmt.spec.js b/tests/format/vue/ts-event-binding/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/ts-event-binding/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/ts-expression/__snapshots__/format.test.js.snap b/tests/format/vue/ts-expression/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..317e9e56b847 --- /dev/null +++ b/tests/format/vue/ts-expression/__snapshots__/format.test.js.snap @@ -0,0 +1,202 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`attribute-expr.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="ts"></script> + +<template> + <comp :foo=" (a:string)=>1"/> + <comp :foo=" <X extends Something & AnothoerOne, Y extends unknown[]>(x:X,y:Y)=>y.length + x.foobar.abcdefg"/> + <comp :foo="(myFunction<T |U>(qwerty,qwerty.qwerty?.qwerty)as any) + x.filter(abcdefg as never).join(xxx)"/> +</template> + +=====================================output===================================== +<script lang="ts"></script> + +<template> + <comp :foo="(a: string) => 1" /> + <comp + :foo=" + <X extends Something & AnothoerOne, Y extends unknown[]>(x: X, y: Y) => + y.length + x.foobar.abcdefg + " + /> + <comp + :foo=" + (myFunction<T | U>(qwerty, qwerty.qwerty?.qwerty) as any) + + x.filter(abcdefg as never).join(xxx) + " + /> +</template> + +================================================================================ +`; + +exports[`basic.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> + <prettier :format=" myFunc( o as unknown )" /> +</template> + +<script lang="ts"></script> + +=====================================output===================================== +<template> + <p v-if="isFolder(file)">{{ (file as mymodule.Folder).deadline }}</p> + <prettier :format="myFunc(o as unknown)" /> +</template> + +<script lang="ts"></script> + +================================================================================ +`; + +exports[`comment.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <div v-if=" + // leading comment + isFolder( /* NOTE: I like pizza */file) + // trailing comment + " + :format=" /* leading comment */ myFunc( /* NOTE: I like banana */ o as unknown ) /* trailing comment */" + >{{ /* leading comment */ ( file as /* NOTE: I like sushi */ mymodule.Folder ).deadline /* trailing comment */ }}</div> +</template> + +<script lang="ts"></script> + +=====================================output===================================== +<template> + <div + v-if=" + // leading comment + isFolder(/* NOTE: I like pizza */ file) + // trailing comment + " + :format=" + /* leading comment */ myFunc( + /* NOTE: I like banana */ o as unknown, + ) /* trailing comment */ + " + > + {{ + /* leading comment */ (file as /* NOTE: I like sushi */ mymodule.Folder) + .deadline /* trailing comment */ + }} + </div> +</template> + +<script lang="ts"></script> + +================================================================================ +`; + +exports[`filter.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup lang="ts"></script> + +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div> + <div class="allowed">{{ + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird + }}</div> + <div class="allowed" v-bind:something=' + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird + '></div> + <div class="allowed" :class=' + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird' + ></div> + <div class="not-allowed" v-if=' + value | thisIsARealSuperLongBitwiseOr("arg1", arg2 as unknown) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird + '></div> + </div> +</template> + +=====================================output===================================== +<script setup lang="ts"></script> + +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div> + <div class="allowed"> + {{ + value + | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) + | anotherPipeLongJustForFun + | pipeTheThird + }} + </div> + <div + class="allowed" + v-bind:something=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2 as unknown) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="allowed" + :class=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2 as unknown) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="not-allowed" + v-if=" + value | + thisIsARealSuperLongBitwiseOr('arg1', arg2 as unknown) | + anotherBitwiseOrLongJustForFun | + bitwiseOrTheThird + " + ></div> + </div> +</template> + +================================================================================ +`; + +exports[`not-working-with-non-ts-script.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> + <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> + <prettier :format=" myFunc( o as unknown )" /> +</template> + +<script></script> + +=====================================output===================================== +<template> + <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> + <prettier :format=" myFunc( o as unknown )" /> +</template> + +<script></script> + +================================================================================ +`; diff --git a/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 004db1fc1fb6..000000000000 --- a/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,45 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`basic.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> -</template> - -<script lang="ts"></script> - -=====================================output===================================== -<template> - <p v-if="isFolder(file)">{{ (file as mymodule.Folder).deadline }}</p> -</template> - -<script lang="ts"></script> - -================================================================================ -`; - -exports[`not-working-with-non-ts-script.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> -</template> - -<script></script> - -=====================================output===================================== -<template> - <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> -</template> - -<script></script> - -================================================================================ -`; diff --git a/tests/format/vue/ts-expression/attribute-expr.vue b/tests/format/vue/ts-expression/attribute-expr.vue new file mode 100644 index 000000000000..25747b3ac4cc --- /dev/null +++ b/tests/format/vue/ts-expression/attribute-expr.vue @@ -0,0 +1,7 @@ +<script lang="ts"></script> + +<template> + <comp :foo=" (a:string)=>1"/> + <comp :foo=" <X extends Something & AnothoerOne, Y extends unknown[]>(x:X,y:Y)=>y.length + x.foobar.abcdefg"/> + <comp :foo="(myFunction<T |U>(qwerty,qwerty.qwerty?.qwerty)as any) + x.filter(abcdefg as never).join(xxx)"/> +</template> diff --git a/tests/format/vue/ts-expression/basic.vue b/tests/format/vue/ts-expression/basic.vue index 397f810cc541..8fa91cce59b3 100644 --- a/tests/format/vue/ts-expression/basic.vue +++ b/tests/format/vue/ts-expression/basic.vue @@ -1,5 +1,6 @@ <template> <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> + <prettier :format=" myFunc( o as unknown )" /> </template> <script lang="ts"></script> diff --git a/tests/format/vue/ts-expression/comment.vue b/tests/format/vue/ts-expression/comment.vue new file mode 100644 index 000000000000..6dd32e52a05b --- /dev/null +++ b/tests/format/vue/ts-expression/comment.vue @@ -0,0 +1,11 @@ +<template> + <div v-if=" + // leading comment + isFolder( /* NOTE: I like pizza */file) + // trailing comment + " + :format=" /* leading comment */ myFunc( /* NOTE: I like banana */ o as unknown ) /* trailing comment */" + >{{ /* leading comment */ ( file as /* NOTE: I like sushi */ mymodule.Folder ).deadline /* trailing comment */ }}</div> +</template> + +<script lang="ts"></script> diff --git a/tests/format/vue/ts-expression/filter.vue b/tests/format/vue/ts-expression/filter.vue new file mode 100644 index 000000000000..db99030e171a --- /dev/null +++ b/tests/format/vue/ts-expression/filter.vue @@ -0,0 +1,19 @@ +<script setup lang="ts"></script> + +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div> + <div class="allowed">{{ + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird + }}</div> + <div class="allowed" v-bind:something=' + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird + '></div> + <div class="allowed" :class=' + value | thisIsARealSuperLongFilterPipe("arg1", arg2 as unknown) | anotherPipeLongJustForFun | pipeTheThird' + ></div> + <div class="not-allowed" v-if=' + value | thisIsARealSuperLongBitwiseOr("arg1", arg2 as unknown) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird + '></div> + </div> +</template> diff --git a/tests/format/vue/ts-expression/format.test.js b/tests/format/vue/ts-expression/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/ts-expression/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/ts-expression/jsfmt.spec.js b/tests/format/vue/ts-expression/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/ts-expression/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue b/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue index 06afe1962e1c..6b9163183f04 100644 --- a/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue +++ b/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue @@ -1,5 +1,6 @@ <template> <p v-if="isFolder(file)">{{ ( file as mymodule.Folder ).deadline }}</p> + <prettier :format=" myFunc( o as unknown )" /> </template> <script></script> diff --git a/tests/format/vue/v-for/__snapshots__/format.test.js.snap b/tests/format/vue/v-for/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..3afb13bbb0db --- /dev/null +++ b/tests/format/vue/v-for/__snapshots__/format.test.js.snap @@ -0,0 +1,75 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`invalid.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template> +<div + v-for=" item instanceof items " +></div> +</template> + +=====================================output===================================== +<template> + <div v-for=" item instanceof items "></div> +</template> + +================================================================================ +`; + +exports[`ts.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="ts"></script> +<template> +<div +v-for="a:number of x as number[]" +v-for="[ a , b] : [ string,string ] of x as Array< [string, string]>" +v-for=" a of list.map( (x:any): unknown => x.foo.bar)" +v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" +> +</div> +</template> + +=====================================output===================================== +<script lang="ts"></script> +<template> + <div + v-for="a: number of x as number[]" + v-for="[a, b]: [string, string] of x as Array<[string, string]>" + v-for="a of list.map((x: any): unknown => x.foo.bar)" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp = 'Hello, Prettier!', + [ + longLongProp, + longLongProp, + anotherLongLongProp = [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + ></div> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/v-for/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/v-for/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 41fbb87e97cd..000000000000 --- a/tests/format/vue/v-for/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,21 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`invalid.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<div - v-for=" item instanceof items " -></div> -</template> - -=====================================output===================================== -<template> - <div v-for=" item instanceof items "></div> -</template> - -================================================================================ -`; diff --git a/tests/format/vue/v-for/format.test.js b/tests/format/vue/v-for/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/v-for/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/v-for/jsfmt.spec.js b/tests/format/vue/v-for/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/v-for/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/v-for/ts.vue b/tests/format/vue/v-for/ts.vue new file mode 100644 index 000000000000..f2d695c6a73f --- /dev/null +++ b/tests/format/vue/v-for/ts.vue @@ -0,0 +1,10 @@ +<script lang="ts"></script> +<template> +<div +v-for="a:number of x as number[]" +v-for="[ a , b] : [ string,string ] of x as Array< [string, string]>" +v-for=" a of list.map( (x:any): unknown => x.foo.bar)" +v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" +> +</div> +</template> diff --git a/tests/format/vue/vue-3/__snapshots__/format.test.js.snap b/tests/format/vue/vue-3/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..1575d398a1a5 --- /dev/null +++ b/tests/format/vue/vue-3/__snapshots__/format.test.js.snap @@ -0,0 +1,219 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`script-generic.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup lang="ts" generic="T"></script> + +<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U"></script> + +<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script> + +<script setup lang="ts" generic="T extends | 'loooooooooooooooooooooooooooooooooong' | 'looooooooooooooooooooooooooooooooooong', U extends LooooooooooooooooooooooooooooooooongType<AnotherLoooooooooooooooongType<NonNullable<Record<string, (Type1 & Type2 & (LoooooooooooooooooooooongType3 | LoooooooooooooooooooooongType4)) | null>[string]>>>, C" ></script> + +<script setup lang="ts" generic=" + + + // comment 1: +T +extends string & + +'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong', +/** + * comment 2 + */ + U extends number, // comment 3 + + /** comment 4 */ C extends MyType + + + "></script> + +<template> + <!-- should not format it here --> + <not-script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></not-script> +</template> + + +=====================================output===================================== +<script setup lang="ts" generic="T"></script> + +<script + setup + lang="ts" + generic="T extends Type1 & Type2 & (Type3 | Type4), U" +></script> + +<script + setup + lang="ts" + generic=" + T extends Type1 & Type2 & (Type3 | Type4), + U extends string | number | boolean + " +></script> + +<script + setup + lang="ts" + generic=" + T extends + | 'loooooooooooooooooooooooooooooooooong' + | 'looooooooooooooooooooooooooooooooooong', + U extends LooooooooooooooooooooooooooooooooongType< + AnotherLoooooooooooooooongType< + NonNullable< + Record< + string, + | (Type1 & + Type2 & + ( + | LoooooooooooooooooooooongType3 + | LoooooooooooooooooooooongType4 + )) + | null + >[string] + > + > + >, + C + " +></script> + +<script + setup + lang="ts" + generic=" + // comment 1: + T extends string & + 'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong', + /** + * comment 2 + */ + U extends number, // comment 3 + /** comment 4 */ C extends MyType + " +></script> + +<template> + <!-- should not format it here --> + <not-script + setup + lang="ts" + generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean" + ></not-script> +</template> + +================================================================================ +`; + +exports[`script-setup.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script setup></script> +<script setup=" foo"></script> +<script setup=" {row }"></script> +<script setup="{destructuring:{ a:{b}}}"></script> + +<!-- Not script --> +<custom setup=" {row }">Not A script</custom> +<style setup=" {row }"></style> + +<!-- Not root block --> +<template> +<script setup=" {row }"></script> +</template> + +<!-- Not attribute --> +<script> +<setup>{not:{a:attribute}}</setup> +</script> + +=====================================output===================================== +<script setup></script> +<script setup="foo"></script> +<script setup="{ row }"></script> +<script + setup="{ + destructuring: { + a: { b }, + }, + }" +></script> + +<!-- Not script --> +<custom setup=" {row }">Not A script</custom> +<style setup=" {row }"></style> + +<!-- Not root block --> +<template> + <script setup=" {row }"></script> +</template> + +<!-- Not attribute --> +<script> +<setup>{not:{a:attribute}}</setup> +</script> + +================================================================================ +`; + +exports[`style-variables.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style vars></style> +<style vars=" foo"></style> +<style vars=" {row }"></style> +<style vars="{destructuring:{ a:{b}}}"></style> + +<!-- Not style --> +<custom vars=" {row }">Not A style</custom> +<script vars=" {row }"></script> + +<!-- Not root block --> +<template> +<style vars=" {row }"></style> +</template> + +<!-- Not attribute --> +<style> +<vars>{not:{a:attribute}}</vars> +</style> + +=====================================output===================================== +<style vars></style> +<style vars="foo"></style> +<style vars="{ row }"></style> +<style + vars="{ + destructuring: { + a: { b }, + }, + }" +></style> + +<!-- Not style --> +<custom vars=" {row }">Not A style</custom> +<script vars=" {row }"></script> + +<!-- Not root block --> +<template> + <style vars=" {row }"></style> +</template> + +<!-- Not attribute --> +<style> +<vars>{not:{a:attribute}}</vars> +</style> + +================================================================================ +`; diff --git a/tests/format/vue/vue-3/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/vue-3/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 6a6a69f9caa2..000000000000 --- a/tests/format/vue/vue-3/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,109 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`script-setup.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script setup></script> -<script setup=" foo"></script> -<script setup=" {row }"></script> -<script setup="{destructuring:{ a:{b}}}"></script> - -<!-- Not script --> -<custom setup=" {row }">Not A script</custom> -<style setup=" {row }"></style> - -<!-- Not root block --> -<template> -<script setup=" {row }"></script> -</template> - -<!-- Not attribute --> -<script> -<setup>{not:{a:attribute}}</setup> -</script> - -=====================================output===================================== -<script setup></script> -<script setup="foo"></script> -<script setup="{ row }"></script> -<script - setup="{ - destructuring: { - a: { b }, - }, - }" -></script> - -<!-- Not script --> -<custom setup=" {row }">Not A script</custom> -<style setup=" {row }"></style> - -<!-- Not root block --> -<template> - <script setup=" {row }"></script> -</template> - -<!-- Not attribute --> -<script> -<setup>{not:{a:attribute}}</setup> -</script> - -================================================================================ -`; - -exports[`style-variables.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<style vars></style> -<style vars=" foo"></style> -<style vars=" {row }"></style> -<style vars="{destructuring:{ a:{b}}}"></style> - -<!-- Not style --> -<custom vars=" {row }">Not A style</custom> -<script vars=" {row }"></script> - -<!-- Not root block --> -<template> -<style vars=" {row }"></style> -</template> - -<!-- Not attribute --> -<style> -<vars>{not:{a:attribute}}</vars> -</style> - -=====================================output===================================== -<style vars></style> -<style vars="foo"></style> -<style vars="{ row }"></style> -<style - vars="{ - destructuring: { - a: { b }, - }, - }" -></style> - -<!-- Not style --> -<custom vars=" {row }">Not A style</custom> -<script vars=" {row }"></script> - -<!-- Not root block --> -<template> - <style vars=" {row }"></style> -</template> - -<!-- Not attribute --> -<style> -<vars>{not:{a:attribute}}</vars> -</style> - -================================================================================ -`; diff --git a/tests/format/vue/vue-3/format.test.js b/tests/format/vue/vue-3/format.test.js new file mode 100644 index 000000000000..9e63dc1d3a63 --- /dev/null +++ b/tests/format/vue/vue-3/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["vue"]); diff --git a/tests/format/vue/vue-3/jsfmt.spec.js b/tests/format/vue/vue-3/jsfmt.spec.js deleted file mode 100644 index 2fd7eede986d..000000000000 --- a/tests/format/vue/vue-3/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/vue-3/script-generic.vue b/tests/format/vue/vue-3/script-generic.vue new file mode 100644 index 000000000000..c6de13813e76 --- /dev/null +++ b/tests/format/vue/vue-3/script-generic.vue @@ -0,0 +1,31 @@ +<script setup lang="ts" generic="T"></script> + +<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U"></script> + +<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script> + +<script setup lang="ts" generic="T extends | 'loooooooooooooooooooooooooooooooooong' | 'looooooooooooooooooooooooooooooooooong', U extends LooooooooooooooooooooooooooooooooongType<AnotherLoooooooooooooooongType<NonNullable<Record<string, (Type1 & Type2 & (LoooooooooooooooooooooongType3 | LoooooooooooooooooooooongType4)) | null>[string]>>>, C" ></script> + +<script setup lang="ts" generic=" + + + // comment 1: +T +extends string & + +'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong', +/** + * comment 2 + */ + U extends number, // comment 3 + + /** comment 4 */ C extends MyType + + + "></script> + +<template> + <!-- should not format it here --> + <not-script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></not-script> +</template> + diff --git a/tests/format/vue/vue/__snapshots__/format.test.js.snap b/tests/format/vue/vue/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..a56f6b750641 --- /dev/null +++ b/tests/format/vue/vue/__snapshots__/format.test.js.snap @@ -0,0 +1,4984 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`attributes.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> +<div + v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for=" item in items " + v-for=" item of items " + v-for="( item , index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value , key, index) in object" + v-for=" n in evenNumbers" + v-for=" n in even ( numbers) " + v-for=" n in 10" + v-for=" { a } in [0].map(()=>({a:1})) " + v-for=" ({ a }, [c ]) in [0].map(()=>1) " + v-for=" n in items.map(x => { return x }) " + @click=" /* hello */ " + @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " + @click=" $emit( 'click' ) " + @click=" $emit( 'click' ) ;" + @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" + slot-scope=" foo" + slot-scope=" {row }" + slot-scope="{destructuring:{ a:{b}}}" + #default=" foo" + #default=" {row }" + #default="{destructuring:{ a:{b}}}" + v-slot=" foo" + v-slot=" {row }" + v-slot="{destructuring:{ a:{b}}}" + v-slot:name=" foo" + v-slot:name=" {row }" + v-slot:name="{destructuring:{ a:{b}}}" + :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" + :class="(() => { return 'hello' })()" + :key="index /* hello */ " + :key="index // hello " + @click="() => {console.log(test)}" + @click=" + () => { + console.log(test); + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{foo:{bar:{baz}}}" +></div> +</template> + +=====================================output===================================== +<template> + <div + v-for="( + { longLongProp, longLongProp }, index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { longLongProp = 42, longLongProp = 'Hello, World!' }, index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp, + } of longLongLongLongLongLongLongLongList" + v-for="( + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + } of longLongLongLongLongLongLongLongList" + v-for="( + [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp = 42, + anotherLongLongProp, + yetAnotherLongLongProp = 'Hello, World!', + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp = 'Hello, Prettier!', + [ + longLongProp, + longLongProp, + anotherLongLongProp = [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + { longLongProp, longLongProp }, + { longLongProp, longLongProp }, + [ + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + longLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { + firstValue, + secondValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue = { longLongProp, longLongProp }, secondValue }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue: { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp = { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="item in items" + v-for="item of items" + v-for="(item, index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value, key, index) in object" + v-for="n in evenNumbers" + v-for="n in even(numbers)" + v-for="n in 10" + v-for="{ a } in [0].map(() => ({ a: 1 }))" + v-for="({ a }, [c]) in [0].map(() => 1)" + v-for="n in items.map((x) => { + return x + })" + @click="/* hello */" + @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" + @click="$emit('click')" + @click="$emit('click')" + @click=" + $emit('click') + if (something) { + for (let i = j; i < 100; i++) {} + } else { + } + " + slot-scope="foo" + slot-scope="{ row }" + slot-scope="{ + destructuring: { + a: { b }, + }, + }" + #default="foo" + #default="{ row }" + #default="{ + destructuring: { + a: { b }, + }, + }" + v-slot="foo" + v-slot="{ row }" + v-slot="{ + destructuring: { + a: { b }, + }, + }" + v-slot:name="foo" + v-slot:name="{ row }" + v-slot:name="{ + destructuring: { + a: { b }, + }, + }" + :class="{ + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true, + }" + :class=" + (() => { + return 'hello' + })() + " + :key="index /* hello */" + :key=" + index // hello + " + @click=" + () => { + console.log(test) + } + " + @click=" + () => { + console.log(test) + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{ + foo: { + bar: { baz }, + }, + }" + ></div> +</template> + +================================================================================ +`; + +exports[`attributes.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> +<div + v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for=" item in items " + v-for=" item of items " + v-for="( item , index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value , key, index) in object" + v-for=" n in evenNumbers" + v-for=" n in even ( numbers) " + v-for=" n in 10" + v-for=" { a } in [0].map(()=>({a:1})) " + v-for=" ({ a }, [c ]) in [0].map(()=>1) " + v-for=" n in items.map(x => { return x }) " + @click=" /* hello */ " + @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " + @click=" $emit( 'click' ) " + @click=" $emit( 'click' ) ;" + @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" + slot-scope=" foo" + slot-scope=" {row }" + slot-scope="{destructuring:{ a:{b}}}" + #default=" foo" + #default=" {row }" + #default="{destructuring:{ a:{b}}}" + v-slot=" foo" + v-slot=" {row }" + v-slot="{destructuring:{ a:{b}}}" + v-slot:name=" foo" + v-slot:name=" {row }" + v-slot:name="{destructuring:{ a:{b}}}" + :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" + :class="(() => { return 'hello' })()" + :key="index /* hello */ " + :key="index // hello " + @click="() => {console.log(test)}" + @click=" + () => { + console.log(test); + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{foo:{bar:{baz}}}" +></div> +</template> + +=====================================output===================================== +<template> + <div + v-for="( + { longLongProp, longLongProp }, index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { longLongProp = 42, longLongProp = 'Hello, World!' }, index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp, + } of longLongLongLongLongLongLongLongList" + v-for="( + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + } of longLongLongLongLongLongLongLongList" + v-for="( + [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp = 42, + anotherLongLongProp, + yetAnotherLongLongProp = 'Hello, World!', + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp = 'Hello, Prettier!', + [ + longLongProp, + longLongProp, + anotherLongLongProp = [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + { longLongProp, longLongProp }, + { longLongProp, longLongProp }, + [ + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + longLongProp, + ], + yetAnotherLongLongProp, + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { + firstValue, + secondValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue = { longLongProp, longLongProp }, secondValue }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue: { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp = { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp, + }, + yetAnotherLongLongProp, + }, + sixthValue, + seventhValue, + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="item in items" + v-for="item of items" + v-for="(item, index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value, key, index) in object" + v-for="n in evenNumbers" + v-for="n in even(numbers)" + v-for="n in 10" + v-for="{ a } in [0].map(() => ({ a: 1 }))" + v-for="({ a }, [c]) in [0].map(() => 1)" + v-for="n in items.map((x) => { + return x; + })" + @click="/* hello */" + @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" + @click="$emit('click')" + @click="$emit('click')" + @click=" + $emit('click'); + if (something) { + for (let i = j; i < 100; i++) {} + } else { + } + " + slot-scope="foo" + slot-scope="{ row }" + slot-scope="{ + destructuring: { + a: { b }, + }, + }" + #default="foo" + #default="{ row }" + #default="{ + destructuring: { + a: { b }, + }, + }" + v-slot="foo" + v-slot="{ row }" + v-slot="{ + destructuring: { + a: { b }, + }, + }" + v-slot:name="foo" + v-slot:name="{ row }" + v-slot:name="{ + destructuring: { + a: { b }, + }, + }" + :class="{ + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true, + }" + :class=" + (() => { + return 'hello'; + })() + " + :key="index /* hello */" + :key=" + index // hello + " + @click=" + () => { + console.log(test); + } + " + @click=" + () => { + console.log(test); + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{ + foo: { + bar: { baz }, + }, + }" + ></div> +</template> + +================================================================================ +`; + +exports[`attributes.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> +<div + v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" + v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" + v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" + v-for=" item in items " + v-for=" item of items " + v-for="( item , index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value , key, index) in object" + v-for=" n in evenNumbers" + v-for=" n in even ( numbers) " + v-for=" n in 10" + v-for=" { a } in [0].map(()=>({a:1})) " + v-for=" ({ a }, [c ]) in [0].map(()=>1) " + v-for=" n in items.map(x => { return x }) " + @click=" /* hello */ " + @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " + @click=" $emit( 'click' ) " + @click=" $emit( 'click' ) ;" + @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" + slot-scope=" foo" + slot-scope=" {row }" + slot-scope="{destructuring:{ a:{b}}}" + #default=" foo" + #default=" {row }" + #default="{destructuring:{ a:{b}}}" + v-slot=" foo" + v-slot=" {row }" + v-slot="{destructuring:{ a:{b}}}" + v-slot:name=" foo" + v-slot:name=" {row }" + v-slot:name="{destructuring:{ a:{b}}}" + :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" + :class="(() => { return 'hello' })()" + :key="index /* hello */ " + :key="index // hello " + @click="() => {console.log(test)}" + @click=" + () => { + console.log(test); + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{foo:{bar:{baz}}}" +></div> +</template> + +=====================================output===================================== +<template> + <div + v-for="( + { longLongProp, longLongProp }, index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { longLongProp = 42, longLongProp = 'Hello, World!' }, index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp + } of longLongLongLongLongLongLongLongList" + v-for="( + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + index + ) of longLongLongLongLongLongLongLongList" + v-for="{ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + } of longLongLongLongLongLongLongLongList" + v-for="( + [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp = 42, + anotherLongLongProp, + yetAnotherLongLongProp = 'Hello, World!' + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + ], + yetAnotherLongLongProp + ], + yetAnotherLongLongProp + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + longLongProp, + longLongProp, + [ + longLongProp, + longLongProp = 'Hello, Prettier!', + [ + longLongProp, + longLongProp, + anotherLongLongProp = [ + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + ], + yetAnotherLongLongProp + ], + yetAnotherLongLongProp + ], + yetAnotherLongLongProp + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + [ + { longLongProp, longLongProp }, + { longLongProp, longLongProp }, + [ + { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + longLongProp + ], + yetAnotherLongLongProp + ], + index + ) of longLongLongLongLongLongLongLongList" + v-for="( + { + firstValue, + secondValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + } + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue = { longLongProp, longLongProp }, secondValue }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + sixthValue, + seventhValue + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + sixthValue: { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + sixthValue, + seventhValue + }, + seventhValue + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="( + { + firstValue, + secondValue, + thirdValue, + fourthValue, + fifthValue: { + longLongProp, + longLongProp, + anotherLongLongProp = { + longLongProp, + longLongProp, + anotherLongLongProp, + yetAnotherLongLongProp + }, + yetAnotherLongLongProp + }, + sixthValue, + seventhValue + }, + objectKey, + index + ) in objectWithAVeryVeryVeryVeryLongName" + v-for="item in items" + v-for="item of items" + v-for="(item, index) in items" + v-for="value in object" + v-for="(value, key) in object" + v-for="(value, key) of object" + v-for="(value, key, index) in object" + v-for="n in evenNumbers" + v-for="n in even(numbers)" + v-for="n in 10" + v-for="{ a } in [0].map(() => ({ a: 1 }))" + v-for="({ a }, [c]) in [0].map(() => 1)" + v-for="n in items.map((x) => { + return x; + })" + @click="/* hello */" + @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" + @click="$emit('click')" + @click="$emit('click')" + @click=" + $emit('click'); + if (something) { + for (let i = j; i < 100; i++) {} + } else { + } + " + slot-scope="foo" + slot-scope="{ row }" + slot-scope="{ + destructuring: { + a: { b } + } + }" + #default="foo" + #default="{ row }" + #default="{ + destructuring: { + a: { b } + } + }" + v-slot="foo" + v-slot="{ row }" + v-slot="{ + destructuring: { + a: { b } + } + }" + v-slot:name="foo" + v-slot:name="{ row }" + v-slot:name="{ + destructuring: { + a: { b } + } + }" + :class="{ + longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true + }" + :class=" + (() => { + return 'hello'; + })() + " + :key="index /* hello */" + :key=" + index // hello + " + @click=" + () => { + console.log(test); + } + " + @click=" + () => { + console.log(test); + } + " + @click="doSomething()" + @click="doSomething;" + @click="a.b;" + @click="a[1];" + @click="a['b'];" + @click="a[null];" + #default="{ + foo: { + bar: { baz } + } + }" + ></div> +</template> + +================================================================================ +`; + +exports[`board_card.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<script> +import './issue_card_inner'; +import eventHub from '../eventhub'; + +const Store = gl.issueBoards.BoardsStore; + +export default { + name: 'BoardsIssueCard', + components: { + 'issue-card-inner': gl.issueBoards.IssueCardInner, + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String, + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail, + }; + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ); + }, + }, + methods: { + mouseDown() { + this.showDetail = true; + }, + mouseMove() { + this.showDetail = false; + }, + showIssue(e) { + if (e.target.classList.contains('js-no-trigger')) return; + + if (this.showDetail) { + this.showDetail = false; + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit('clearDetailIssue'); + } else { + eventHub.$emit('newDetailIssue', this.issue); + Store.detail.list = this.list; + } + } + }, + }, +}; +</script> + +<template> + <li class="card" + :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)"> + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" /> + </li> +</template> + +=====================================output===================================== +<script> +import "./issue_card_inner" +import eventHub from "../eventhub" + +const Store = gl.issueBoards.BoardsStore + +export default { + name: "BoardsIssueCard", + components: { + "issue-card-inner": gl.issueBoards.IssueCardInner, + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String, + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail, + } + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ) + }, + }, + methods: { + mouseDown() { + this.showDetail = true + }, + mouseMove() { + this.showDetail = false + }, + showIssue(e) { + if (e.target.classList.contains("js-no-trigger")) return + + if (this.showDetail) { + this.showDetail = false + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit("clearDetailIssue") + } else { + eventHub.$emit("newDetailIssue", this.issue) + Store.detail.list = this.list + } + } + }, + }, +} +</script> + +<template> + <li + class="card" + :class="{ + 'user-can-drag': !disabled && issue.id, + 'is-disabled': disabled || !issue.id, + 'is-active': issueDetailVisible, + }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)" + > + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" + /> + </li> +</template> + +================================================================================ +`; + +exports[`board_card.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<script> +import './issue_card_inner'; +import eventHub from '../eventhub'; + +const Store = gl.issueBoards.BoardsStore; + +export default { + name: 'BoardsIssueCard', + components: { + 'issue-card-inner': gl.issueBoards.IssueCardInner, + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String, + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail, + }; + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ); + }, + }, + methods: { + mouseDown() { + this.showDetail = true; + }, + mouseMove() { + this.showDetail = false; + }, + showIssue(e) { + if (e.target.classList.contains('js-no-trigger')) return; + + if (this.showDetail) { + this.showDetail = false; + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit('clearDetailIssue'); + } else { + eventHub.$emit('newDetailIssue', this.issue); + Store.detail.list = this.list; + } + } + }, + }, +}; +</script> + +<template> + <li class="card" + :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)"> + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" /> + </li> +</template> + +=====================================output===================================== +<script> +import "./issue_card_inner"; +import eventHub from "../eventhub"; + +const Store = gl.issueBoards.BoardsStore; + +export default { + name: "BoardsIssueCard", + components: { + "issue-card-inner": gl.issueBoards.IssueCardInner, + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String, + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail, + }; + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ); + }, + }, + methods: { + mouseDown() { + this.showDetail = true; + }, + mouseMove() { + this.showDetail = false; + }, + showIssue(e) { + if (e.target.classList.contains("js-no-trigger")) return; + + if (this.showDetail) { + this.showDetail = false; + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit("clearDetailIssue"); + } else { + eventHub.$emit("newDetailIssue", this.issue); + Store.detail.list = this.list; + } + } + }, + }, +}; +</script> + +<template> + <li + class="card" + :class="{ + 'user-can-drag': !disabled && issue.id, + 'is-disabled': disabled || !issue.id, + 'is-active': issueDetailVisible, + }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)" + > + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" + /> + </li> +</template> + +================================================================================ +`; + +exports[`board_card.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<script> +import './issue_card_inner'; +import eventHub from '../eventhub'; + +const Store = gl.issueBoards.BoardsStore; + +export default { + name: 'BoardsIssueCard', + components: { + 'issue-card-inner': gl.issueBoards.IssueCardInner, + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String, + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail, + }; + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ); + }, + }, + methods: { + mouseDown() { + this.showDetail = true; + }, + mouseMove() { + this.showDetail = false; + }, + showIssue(e) { + if (e.target.classList.contains('js-no-trigger')) return; + + if (this.showDetail) { + this.showDetail = false; + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit('clearDetailIssue'); + } else { + eventHub.$emit('newDetailIssue', this.issue); + Store.detail.list = this.list; + } + } + }, + }, +}; +</script> + +<template> + <li class="card" + :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)"> + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" /> + </li> +</template> + +=====================================output===================================== +<script> +import "./issue_card_inner"; +import eventHub from "../eventhub"; + +const Store = gl.issueBoards.BoardsStore; + +export default { + name: "BoardsIssueCard", + components: { + "issue-card-inner": gl.issueBoards.IssueCardInner + }, + props: { + list: Object, + issue: Object, + issueLinkBase: String, + disabled: Boolean, + index: Number, + rootPath: String + }, + data() { + return { + showDetail: false, + detailIssue: Store.detail + }; + }, + computed: { + issueDetailVisible() { + return ( + this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id + ); + } + }, + methods: { + mouseDown() { + this.showDetail = true; + }, + mouseMove() { + this.showDetail = false; + }, + showIssue(e) { + if (e.target.classList.contains("js-no-trigger")) return; + + if (this.showDetail) { + this.showDetail = false; + + if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { + eventHub.$emit("clearDetailIssue"); + } else { + eventHub.$emit("newDetailIssue", this.issue); + Store.detail.list = this.list; + } + } + } + } +}; +</script> + +<template> + <li + class="card" + :class="{ + 'user-can-drag': !disabled && issue.id, + 'is-disabled': disabled || !issue.id, + 'is-active': issueDetailVisible + }" + :index="index" + :data-issue-id="issue.id" + @mousedown="mouseDown" + @mousemove="mouseMove" + @mouseup="showIssue($event)" + > + <issue-card-inner + :list="list" + :issue="issue" + :issue-link-base="issueLinkBase" + :root-path="rootPath" + :update-filters="true" + /> + </li> +</template> + +================================================================================ +`; + +exports[`case-sensitive-tags.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <Input></Input> +</template> + +=====================================output===================================== +<template> + <Input></Input> +</template> + +================================================================================ +`; + +exports[`case-sensitive-tags.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <Input></Input> +</template> + +=====================================output===================================== +<template> + <Input></Input> +</template> + +================================================================================ +`; + +exports[`case-sensitive-tags.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <Input></Input> +</template> + +=====================================output===================================== +<template> + <Input></Input> +</template> + +================================================================================ +`; + +exports[`custom-block.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html><head></head><body></body></html> + +=====================================output===================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html> + <head></head> + <body></body> +</html> + +================================================================================ +`; + +exports[`custom-block.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html><head></head><body></body></html> + +=====================================output===================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html> + <head></head> + <body></body> +</html> + +================================================================================ +`; + +exports[`custom-block.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html><head></head><body></body></html> + +=====================================output===================================== +<i18n> + en: + one: One + two: Two +</i18n> + +<html> + <head></head> + <body></body> +</html> + +================================================================================ +`; + +exports[`expression-binding.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> + +================================================================================ +`; + +exports[`expression-binding.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> + +================================================================================ +`; + +exports[`expression-binding.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> + +================================================================================ +`; + +exports[`expression-binding-ts.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> +<script lang="ts"></script> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> +<script lang="ts"></script> + +================================================================================ +`; + +exports[`expression-binding-ts.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> +<script lang="ts"></script> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> +<script lang="ts"></script> + +================================================================================ +`; + +exports[`expression-binding-ts.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<!-- #7396 --> +<template> +<MyComponent +:foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" +:bar="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` ++\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`" +:baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> +<script lang="ts"></script> + +=====================================output===================================== +<!-- #7396 --> +<template> + <MyComponent + :foo="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" + :bar=" + \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + + \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + " + :baz="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`" + :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" + :add=" + 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + " + :num=" + 100000000000000000000000000000000000000000000000000000000000000000000000000 + " + /> +</template> +<script lang="ts"></script> + +================================================================================ +`; + +exports[`filter.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> + <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="not-allowed" v-if='value | thisIsARealSuperLongBitwiseOr("arg1", arg2) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird'></div> +</template> + +=====================================output===================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed"> + {{ + value + | thisIsARealSuperLongFilterPipe("arg1", arg2) + | anotherPipeLongJustForFun + | pipeTheThird + }} + </div> + <div + class="allowed" + v-bind:something=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="allowed" + :class=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="not-allowed" + v-if=" + value | + thisIsARealSuperLongBitwiseOr('arg1', arg2) | + anotherBitwiseOrLongJustForFun | + bitwiseOrTheThird + " + ></div> +</template> + +================================================================================ +`; + +exports[`filter.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> + <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="not-allowed" v-if='value | thisIsARealSuperLongBitwiseOr("arg1", arg2) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird'></div> +</template> + +=====================================output===================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed"> + {{ + value + | thisIsARealSuperLongFilterPipe("arg1", arg2) + | anotherPipeLongJustForFun + | pipeTheThird + }} + </div> + <div + class="allowed" + v-bind:something=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="allowed" + :class=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="not-allowed" + v-if=" + value | + thisIsARealSuperLongBitwiseOr('arg1', arg2) | + anotherBitwiseOrLongJustForFun | + bitwiseOrTheThird + " + ></div> +</template> + +================================================================================ +`; + +exports[`filter.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> + <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="not-allowed" v-if='value | thisIsARealSuperLongBitwiseOr("arg1", arg2) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird'></div> +</template> + +=====================================output===================================== +<!-- vue filters are only allowed in v-bind and interpolation --> +<template> + <div class="allowed"> + {{ + value + | thisIsARealSuperLongFilterPipe("arg1", arg2) + | anotherPipeLongJustForFun + | pipeTheThird + }} + </div> + <div + class="allowed" + v-bind:something=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="allowed" + :class=" + value + | thisIsARealSuperLongFilterPipe('arg1', arg2) + | anotherPipeLongJustForFun + | pipeTheThird + " + ></div> + <div + class="not-allowed" + v-if=" + value | + thisIsARealSuperLongBitwiseOr('arg1', arg2) | + anotherBitwiseOrLongJustForFun | + bitwiseOrTheThird + " + ></div> +</template> + +================================================================================ +`; + +exports[`interpolations.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> +<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ + + +x => { + const hello = 'world' + return hello; +} + + + +}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ + + + some_variable + + + +}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ + + preserve + + invalid + + interpolation + +}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> + +<script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; +</script> + +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 +</div> +</template> + +=====================================output===================================== +<template> + <div> + Fuga magnam facilis. Voluptatem quaerat porro.{{ + (x) => { + const hello = "world" + return hello + } + }} + Magni consectetur in et molestias neque esse voluptatibus voluptas. + {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est + error + {{ + + preserve + + invalid + + interpolation + + }} + reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. + </div> + + <script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; + </script> + + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }} + 1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }} 1234567890 + </div> +</template> + +================================================================================ +`; + +exports[`interpolations.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> +<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ + + +x => { + const hello = 'world' + return hello; +} + + + +}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ + + + some_variable + + + +}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ + + preserve + + invalid + + interpolation + +}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> + +<script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; +</script> + +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 +</div> +</template> + +=====================================output===================================== +<template> + <div> + Fuga magnam facilis. Voluptatem quaerat porro.{{ + (x) => { + const hello = "world"; + return hello; + } + }} + Magni consectetur in et molestias neque esse voluptatibus voluptas. + {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est + error + {{ + + preserve + + invalid + + interpolation + + }} + reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. + </div> + + <script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; + </script> + + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }} + 1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }} 1234567890 + </div> +</template> + +================================================================================ +`; + +exports[`interpolations.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> +<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ + + +x => { + const hello = 'world' + return hello; +} + + + +}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ + + + some_variable + + + +}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ + + preserve + + invalid + + interpolation + +}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> + +<script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; +</script> + +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 +</div> +<div> + 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 +</div> +</template> + +=====================================output===================================== +<template> + <div> + Fuga magnam facilis. Voluptatem quaerat porro.{{ + (x) => { + const hello = "world"; + return hello; + } + }} + Magni consectetur in et molestias neque esse voluptatibus voluptas. + {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est + error + {{ + + preserve + + invalid + + interpolation + + }} + reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. + </div> + + <script type="text/jsx"> + export default { + render (h) { + return ( + <ul + class={{ + 'a': b, + 'c': d, + "e": f + }} + > + { this.xyz } + </ul> + ) + }; + </script> + + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }}1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890{{ + something + }} + 1234567890 + </div> + <div> + 1234567890123456789012345678901234567890123456789012345678901234567890 + {{ something }} 1234567890 + </div> +</template> + +================================================================================ +`; + +exports[`multiple-template1.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +cloned. + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +cloned. + +================================================================================ +`; + +exports[`multiple-template1.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +cloned. + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +cloned. + +================================================================================ +`; + +exports[`multiple-template1.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +cloned. + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +cloned. + +================================================================================ +`; + +exports[`multiple-template2.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +<template></template > + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +<template></template> + +================================================================================ +`; + +exports[`multiple-template2.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +<template></template > + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +<template></template> + +================================================================================ +`; + +exports[`multiple-template2.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template></template> +<template lang=unknown> +<a> +</template> +<template></template > + +=====================================output===================================== +<template></template> +<template lang="unknown"> +<a> +</template> +<template></template> + +================================================================================ +`; + +exports[`nested-template.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <div> + <template> + <div></div> + </template> + <div> + Do not go out, you'll got yourself cloned by bad bad people. + </div> + </div> +</template> + +=====================================output===================================== +<template> + <div> + <template> + <div></div> + </template> + <div>Do not go out, you'll got yourself cloned by bad bad people.</div> + </div> +</template> + +================================================================================ +`; + +exports[`nested-template.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <div> + <template> + <div></div> + </template> + <div> + Do not go out, you'll got yourself cloned by bad bad people. + </div> + </div> +</template> + +=====================================output===================================== +<template> + <div> + <template> + <div></div> + </template> + <div>Do not go out, you'll got yourself cloned by bad bad people.</div> + </div> +</template> + +================================================================================ +`; + +exports[`nested-template.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <div> + <template> + <div></div> + </template> + <div> + Do not go out, you'll got yourself cloned by bad bad people. + </div> + </div> +</template> + +=====================================output===================================== +<template> + <div> + <template> + <div></div> + </template> + <div>Do not go out, you'll got yourself cloned by bad bad people.</div> + </div> +</template> + +================================================================================ +`; + +exports[`one-line-template1.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template><p>foo</p><div>foo</div></template> + +=====================================output===================================== +<template> + <p>foo</p> + <div>foo</div> +</template> + +================================================================================ +`; + +exports[`one-line-template1.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template><p>foo</p><div>foo</div></template> + +=====================================output===================================== +<template> + <p>foo</p> + <div>foo</div> +</template> + +================================================================================ +`; + +exports[`one-line-template1.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template><p>foo</p><div>foo</div></template> + +=====================================output===================================== +<template> + <p>foo</p> + <div>foo</div> +</template> + +================================================================================ +`; + +exports[`one-line-template2.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template><div><p>foo</p><div>bar</div></div></template> + +=====================================output===================================== +<template> + <div> + <p>foo</p> + <div>bar</div> + </div> +</template> + +================================================================================ +`; + +exports[`one-line-template2.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template><div><p>foo</p><div>bar</div></div></template> + +=====================================output===================================== +<template> + <div> + <p>foo</p> + <div>bar</div> + </div> +</template> + +================================================================================ +`; + +exports[`one-line-template2.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template><div><p>foo</p><div>bar</div></div></template> + +=====================================output===================================== +<template> + <div> + <p>foo</p> + <div>bar</div> + </div> +</template> + +================================================================================ +`; + +exports[`pre-child.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> +<pre + ref="buildTrace" + class="build-trace mb-0 h-100" + @scroll="scrollBuildLog" +> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> +<pre class='woot'> + {{ stuff }} + </pre> +</template> + +<template> +<pre class='woot'> + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + </pre> +</template> + +=====================================output===================================== +<template> + <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> + <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> + <pre class="woot"> + {{ stuff }} + </pre> +</template> + +<template> + <pre class="woot"> + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + </pre + > +</template> + +================================================================================ +`; + +exports[`pre-child.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> +<pre + ref="buildTrace" + class="build-trace mb-0 h-100" + @scroll="scrollBuildLog" +> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> +<pre class='woot'> + {{ stuff }} + </pre> +</template> + +<template> +<pre class='woot'> + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + </pre> +</template> + +=====================================output===================================== +<template> + <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> + <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> + <pre class="woot"> + {{ stuff }} + </pre> +</template> + +<template> + <pre class="woot"> + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + </pre + > +</template> + +================================================================================ +`; + +exports[`pre-child.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> +<pre + ref="buildTrace" + class="build-trace mb-0 h-100" + @scroll="scrollBuildLog" +> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> +<pre class='woot'> + {{ stuff }} + </pre> +</template> + +<template> +<pre class='woot'> + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 + </pre> +</template> + +=====================================output===================================== +<template> + <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> + <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> + <code + v-show="!detailJob.isLoading" + class="bash" + v-html="jobOutput" + > + </code> + <div + v-show="detailJob.isLoading" + class="build-loader-animation" + > + <div class="dot"></div> + <div class="dot"></div> + <div class="dot"></div> + </div> +</pre> +</template> + +<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> +<template> + <pre class="code-block rounded"> + <code class="d-block">{{ code }}</code> + </pre> +</template> + +<template> + <pre class="woot"> + {{ stuff }} + </pre> +</template> + +<template> + <pre class="woot"> + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + 123{{ + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq || + wqeqwwqwqweqweqwewwq + }}123 + </pre + > +</template> + +================================================================================ +`; + +exports[`script_src.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +=====================================output===================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +================================================================================ +`; + +exports[`script_src.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +=====================================output===================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +================================================================================ +`; + +exports[`script_src.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +=====================================output===================================== +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> +<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> + +================================================================================ +`; + +exports[`self_closing.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <div /> +</template> + +<script> +foo( ) +</script> + +<template> +<div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> +</div> +</template> + +<template> + <Foo><Bar + attr + /></Foo> +</template> + +=====================================output===================================== +<template> + <div /> +</template> + +<script> +foo() +</script> + +<template> + <div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> + </div> +</template> + +<template> + <Foo><Bar attr /></Foo> +</template> + +================================================================================ +`; + +exports[`self_closing.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <div /> +</template> + +<script> +foo( ) +</script> + +<template> +<div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> +</div> +</template> + +<template> + <Foo><Bar + attr + /></Foo> +</template> + +=====================================output===================================== +<template> + <div /> +</template> + +<script> +foo(); +</script> + +<template> + <div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> + </div> +</template> + +<template> + <Foo><Bar attr /></Foo> +</template> + +================================================================================ +`; + +exports[`self_closing.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <div /> +</template> + +<script> +foo( ) +</script> + +<template> +<div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> +</div> +</template> + +<template> + <Foo><Bar + attr + /></Foo> +</template> + +=====================================output===================================== +<template> + <div /> +</template> + +<script> +foo(); +</script> + +<template> + <div class="container"> + <HomeH /> + <HomeA /> + <HomeX /> + <HomeY /> + </div> +</template> + +<template> + <Foo><Bar attr /></Foo> +</template> + +================================================================================ +`; + +exports[`self_closing_style.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +=====================================output===================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +================================================================================ +`; + +exports[`self_closing_style.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +=====================================output===================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +================================================================================ +`; + +exports[`self_closing_style.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +=====================================output===================================== +<template> + <span :class="$style.root"><slot /></span> +</template> + +<style src="./style.css" module /> + +================================================================================ +`; + +exports[`slot-ts.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown []" + v-slot:named=" y : never" + slot-scope=" { des: {truc: tured } } : any " + #shorthand=" abc : string " + > + {{ x[1] }} + </template> + </comp> +</template> + +=====================================output===================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown[]" + v-slot:named="y: never" + slot-scope="{ des: { truc: tured } }: any" + #shorthand="abc: string" + > + {{ x[1] }} + </template> + </comp> +</template> + +================================================================================ +`; + +exports[`slot-ts.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown []" + v-slot:named=" y : never" + slot-scope=" { des: {truc: tured } } : any " + #shorthand=" abc : string " + > + {{ x[1] }} + </template> + </comp> +</template> + +=====================================output===================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown[]" + v-slot:named="y: never" + slot-scope="{ des: { truc: tured } }: any" + #shorthand="abc: string" + > + {{ x[1] }} + </template> + </comp> +</template> + +================================================================================ +`; + +exports[`slot-ts.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown []" + v-slot:named=" y : never" + slot-scope=" { des: {truc: tured } } : any " + #shorthand=" abc : string " + > + {{ x[1] }} + </template> + </comp> +</template> + +=====================================output===================================== +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown[]" + v-slot:named="y: never" + slot-scope="{ des: { truc: tured } }: any" + #shorthand="abc: string" + > + {{ x[1] }} + </template> + </comp> +</template> + +================================================================================ +`; + +exports[`style.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<script> +</script> + +<style> +#foo1{ color: #f00; +} +</style> +<style scoped> +#foo2{ color: #f00; +} +</style> + +<style lang="css"> +#foo3{ color: #f00; +} +</style> +<style lang="css" scoped> +#foo4{ color: #f00; +} +</style> + +<style lang="less"> +#foo5{ color: #f00; +} +</style> +<style lang="less" scoped> +#foo6{ + @color: #f00; + color: @color; +} +</style> + + +<style lang="scss"> +#foo8{ + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8{ + $color: #f00; + color: $color; +} +</style> + + +=====================================output===================================== +<script></script> + +<style> +#foo1 { + color: #f00; +} +</style> +<style scoped> +#foo2 { + color: #f00; +} +</style> + +<style lang="css"> +#foo3 { + color: #f00; +} +</style> +<style lang="css" scoped> +#foo4 { + color: #f00; +} +</style> + +<style lang="less"> +#foo5 { + color: #f00; +} +</style> +<style lang="less" scoped> +#foo6 { + @color: #f00; + color: @color; +} +</style> + +<style lang="scss"> +#foo8 { + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8 { + $color: #f00; + color: $color; +} +</style> + +================================================================================ +`; + +exports[`style.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<script> +</script> + +<style> +#foo1{ color: #f00; +} +</style> +<style scoped> +#foo2{ color: #f00; +} +</style> + +<style lang="css"> +#foo3{ color: #f00; +} +</style> +<style lang="css" scoped> +#foo4{ color: #f00; +} +</style> + +<style lang="less"> +#foo5{ color: #f00; +} +</style> +<style lang="less" scoped> +#foo6{ + @color: #f00; + color: @color; +} +</style> + + +<style lang="scss"> +#foo8{ + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8{ + $color: #f00; + color: $color; +} +</style> + + +=====================================output===================================== +<script></script> + +<style> +#foo1 { + color: #f00; +} +</style> +<style scoped> +#foo2 { + color: #f00; +} +</style> + +<style lang="css"> +#foo3 { + color: #f00; +} +</style> +<style lang="css" scoped> +#foo4 { + color: #f00; +} +</style> + +<style lang="less"> +#foo5 { + color: #f00; +} +</style> +<style lang="less" scoped> +#foo6 { + @color: #f00; + color: @color; +} +</style> + +<style lang="scss"> +#foo8 { + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8 { + $color: #f00; + color: $color; +} +</style> + +================================================================================ +`; + +exports[`style.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<script> +</script> + +<style> +#foo1{ color: #f00; +} +</style> +<style scoped> +#foo2{ color: #f00; +} +</style> + +<style lang="css"> +#foo3{ color: #f00; +} +</style> +<style lang="css" scoped> +#foo4{ color: #f00; +} +</style> + +<style lang="less"> +#foo5{ color: #f00; +} +</style> +<style lang="less" scoped> +#foo6{ + @color: #f00; + color: @color; +} +</style> + + +<style lang="scss"> +#foo8{ + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8{ + $color: #f00; + color: $color; +} +</style> + + +=====================================output===================================== +<script></script> + +<style> +#foo1 { + color: #f00; +} +</style> +<style scoped> +#foo2 { + color: #f00; +} +</style> + +<style lang="css"> +#foo3 { + color: #f00; +} +</style> +<style lang="css" scoped> +#foo4 { + color: #f00; +} +</style> + +<style lang="less"> +#foo5 { + color: #f00; +} +</style> +<style lang="less" scoped> +#foo6 { + @color: #f00; + color: @color; +} +</style> + +<style lang="scss"> +#foo8 { + $color: #f00; + color: $color; +} +</style> +<style lang="scss" scoped> +#foo8 { + $color: #f00; + color: $color; +} +</style> + +================================================================================ +`; + +exports[`tag-name.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> + <Table></Table> +</template> + +=====================================output===================================== +<template> + <Table></Table> +</template> + +================================================================================ +`; + +exports[`tag-name.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> + <Table></Table> +</template> + +=====================================output===================================== +<template> + <Table></Table> +</template> + +================================================================================ +`; + +exports[`tag-name.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> + <Table></Table> +</template> + +=====================================output===================================== +<template> + <Table></Table> +</template> + +================================================================================ +`; + +exports[`template.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick"/> + <p + v-if="renderInfo" + class="file-info prepend-top-10"> + <template v-if="fileSize>0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize>0 && width && height"> + | + </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +=====================================output===================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick" + /> + <p v-if="renderInfo" class="file-info prepend-top-10"> + <template v-if="fileSize > 0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize > 0 && width && height"> | </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +================================================================================ +`; + +exports[`template.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick"/> + <p + v-if="renderInfo" + class="file-info prepend-top-10"> + <template v-if="fileSize>0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize>0 && width && height"> + | + </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +=====================================output===================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick" + /> + <p v-if="renderInfo" class="file-info prepend-top-10"> + <template v-if="fileSize > 0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize > 0 && width && height"> | </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +================================================================================ +`; + +exports[`template.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick"/> + <p + v-if="renderInfo" + class="file-info prepend-top-10"> + <template v-if="fileSize>0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize>0 && width && height"> + | + </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +=====================================output===================================== +<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> +<template> + <div class="file-container"> + <div class="file-content image_file"> + <img + ref="contentImg" + :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" + :src="path" + :alt="path" + @load="onImgLoad" + @click="onImgClick" + /> + <p v-if="renderInfo" class="file-info prepend-top-10"> + <template v-if="fileSize > 0"> + {{ fileSizeReadable }} + </template> + <template v-if="fileSize > 0 && width && height"> | </template> + <template v-if="width && height"> + W: {{ width }} | H: {{ height }} + </template> + </p> + </div> + </div> +</template> + +================================================================================ +`; + +exports[`template-dom.html - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<!DOCTYPE html><html> + <body> + <div v-if="foo === 'foo'"> + +</div> + <script> +new Vue({el: '#app'}) + </script> + </body> +</html> + +=====================================output===================================== +<!doctype html> +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }) + </script> + </body> +</html> + +================================================================================ +`; + +exports[`template-dom.html - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<!DOCTYPE html><html> + <body> + <div v-if="foo === 'foo'"> + +</div> + <script> +new Vue({el: '#app'}) + </script> + </body> +</html> + +=====================================output===================================== +<!doctype html> +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`template-dom.html - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<!DOCTYPE html><html> + <body> + <div v-if="foo === 'foo'"> + +</div> + <script> +new Vue({el: '#app'}) + </script> + </body> +</html> + +=====================================output===================================== +<!doctype html> +<html> + <body> + <div v-if="foo === 'foo'"></div> + <script> + new Vue({ el: "#app" }); + </script> + </body> +</html> + +================================================================================ +`; + +exports[`template-lang.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template + + + + lang='pug'> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +=====================================output===================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +================================================================================ +`; + +exports[`template-lang.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template + + + + lang='pug'> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +=====================================output===================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +================================================================================ +`; + +exports[`template-lang.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template + + + + lang='pug'> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +=====================================output===================================== +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="pug"> + .test + #foo + .bla +</template> + +<template lang="unknown"> + #container + some-component(tag='<some-tag>') +</template> + +<template lang=""> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +<template lang> + <v-app-bar> + <v-menu offset-y> + <template></template> + </v-menu> + </v-app-bar> +</template> + +================================================================================ +`; + +exports[`test.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<script> +</script> + +<template> + <br /> + <footer> + foo + <br/> + </footer> +</template> + +=====================================output===================================== +<script></script> + +<template> + <br /> + <footer> + foo + <br /> + </footer> +</template> + +================================================================================ +`; + +exports[`test.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<script> +</script> + +<template> + <br /> + <footer> + foo + <br/> + </footer> +</template> + +=====================================output===================================== +<script></script> + +<template> + <br /> + <footer> + foo + <br /> + </footer> +</template> + +================================================================================ +`; + +exports[`test.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<script> +</script> + +<template> + <br /> + <footer> + foo + <br/> + </footer> +</template> + +=====================================output===================================== +<script></script> + +<template> + <br /> + <footer> + foo + <br /> + </footer> +</template> + +================================================================================ +`; + +exports[`v-if.vue - {"semi":false} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +semi: false + | printWidth +=====================================input====================================== +<template> +<root> + <and v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <and v-if=" +(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <or v-if=" +long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></or> + <or v-if=" +(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || +long_long_long_long_long_long_long_condition_3) || +long_long_long_long_long_long_long_condition_4 +"></or> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4) +"></mixed> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></mixed> +</root> +</template> + +=====================================output===================================== +<template> + <root> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4) + " + ></mixed> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3) || + long_long_long_long_long_long_long_condition_4 + " + ></mixed> + </root> +</template> + +================================================================================ +`; + +exports[`v-if.vue - {"trailingComma":"es5"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "es5" + | printWidth +=====================================input====================================== +<template> +<root> + <and v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <and v-if=" +(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <or v-if=" +long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></or> + <or v-if=" +(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || +long_long_long_long_long_long_long_condition_3) || +long_long_long_long_long_long_long_condition_4 +"></or> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4) +"></mixed> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></mixed> +</root> +</template> + +=====================================output===================================== +<template> + <root> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4) + " + ></mixed> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3) || + long_long_long_long_long_long_long_condition_4 + " + ></mixed> + </root> +</template> + +================================================================================ +`; + +exports[`v-if.vue - {"trailingComma":"none"} format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 +trailingComma: "none" + | printWidth +=====================================input====================================== +<template> +<root> + <and v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <and v-if=" +(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4 +"></and> + <or v-if=" +long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></or> + <or v-if=" +(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || +long_long_long_long_long_long_long_condition_3) || +long_long_long_long_long_long_long_condition_4 +"></or> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && +long_long_long_long_long_long_long_condition_3 && +long_long_long_long_long_long_long_condition_4) +"></mixed> + <mixed v-if=" +long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && +long_long_long_long_long_long_long_condition_3 || +long_long_long_long_long_long_long_condition_4 +"></mixed> +</root> +</template> + +=====================================output===================================== +<template> + <root> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <and + v-if=" + long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2 && + short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4 + " + ></and> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <or + v-if=" + long_long_long_long_long_long_long_condition_1 || + long_long_long_long_long_long_long_condition_2 || + short_1 || + short_2 || + long_long_long_long_long_long_long_condition_3 || + long_long_long_long_long_long_long_condition_4 + " + ></or> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3 && + long_long_long_long_long_long_long_condition_4) + " + ></mixed> + <mixed + v-if=" + (long_long_long_long_long_long_long_condition_1 && + long_long_long_long_long_long_long_condition_2) || + (short_1 && + short_2 && + long_long_long_long_long_long_long_condition_3) || + long_long_long_long_long_long_long_condition_4 + " + ></mixed> + </root> +</template> + +================================================================================ +`; diff --git a/tests/format/vue/vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/vue/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 572405782423..000000000000 --- a/tests/format/vue/vue/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,4796 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`attributes.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> -<div - v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for=" item in items " - v-for=" item of items " - v-for="( item , index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value , key, index) in object" - v-for=" n in evenNumbers" - v-for=" n in even ( numbers) " - v-for=" n in 10" - v-for=" { a } in [0].map(()=>({a:1})) " - v-for=" ({ a }, [c ]) in [0].map(()=>1) " - v-for=" n in items.map(x => { return x }) " - @click=" /* hello */ " - @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " - @click=" $emit( 'click' ) " - @click=" $emit( 'click' ) ;" - @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" - slot-scope=" foo" - slot-scope=" {row }" - slot-scope="{destructuring:{ a:{b}}}" - #default=" foo" - #default=" {row }" - #default="{destructuring:{ a:{b}}}" - v-slot=" foo" - v-slot=" {row }" - v-slot="{destructuring:{ a:{b}}}" - v-slot:name=" foo" - v-slot:name=" {row }" - v-slot:name="{destructuring:{ a:{b}}}" - :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" - :class="(() => { return 'hello' })()" - :key="index /* hello */ " - :key="index // hello " - @click="() => {console.log(test)}" - @click=" - () => { - console.log(test); - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null];" - #default="{foo:{bar:{baz}}}" -></div> -</template> - -=====================================output===================================== -<template> - <div - v-for="( - { longLongProp, longLongProp }, index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { longLongProp = 42, longLongProp = 'Hello, World!' }, index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp, - } of longLongLongLongLongLongLongLongList" - v-for="( - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - } of longLongLongLongLongLongLongLongList" - v-for="( - [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp = 42, - anotherLongLongProp, - yetAnotherLongLongProp = 'Hello, World!', - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp = 'Hello, Prettier!', - [ - longLongProp, - longLongProp, - anotherLongLongProp = [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - { longLongProp, longLongProp }, - { longLongProp, longLongProp }, - [ - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - longLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { - firstValue, - secondValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue = { longLongProp, longLongProp }, secondValue }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue: { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp = { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="item in items" - v-for="item of items" - v-for="(item, index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value, key, index) in object" - v-for="n in evenNumbers" - v-for="n in even(numbers)" - v-for="n in 10" - v-for="{ a } in [0].map(() => ({ a: 1 }))" - v-for="({ a }, [c]) in [0].map(() => 1)" - v-for="n in items.map((x) => { - return x - })" - @click="/* hello */" - @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" - @click="$emit('click')" - @click="$emit('click')" - @click=" - $emit('click') - if (something) { - for (let i = j; i < 100; i++) {} - } else { - } - " - slot-scope="foo" - slot-scope="{ row }" - slot-scope="{ - destructuring: { - a: { b }, - }, - }" - #default="foo" - #default="{ row }" - #default="{ - destructuring: { - a: { b }, - }, - }" - v-slot="foo" - v-slot="{ row }" - v-slot="{ - destructuring: { - a: { b }, - }, - }" - v-slot:name="foo" - v-slot:name="{ row }" - v-slot:name="{ - destructuring: { - a: { b }, - }, - }" - :class="{ - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true, - }" - :class=" - (() => { - return 'hello' - })() - " - :key="index /* hello */" - :key=" - index // hello - " - @click=" - () => { - console.log(test) - } - " - @click=" - () => { - console.log(test) - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null]" - #default="{ - foo: { - bar: { baz }, - }, - }" - ></div> -</template> - -================================================================================ -`; - -exports[`attributes.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> -<div - v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for=" item in items " - v-for=" item of items " - v-for="( item , index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value , key, index) in object" - v-for=" n in evenNumbers" - v-for=" n in even ( numbers) " - v-for=" n in 10" - v-for=" { a } in [0].map(()=>({a:1})) " - v-for=" ({ a }, [c ]) in [0].map(()=>1) " - v-for=" n in items.map(x => { return x }) " - @click=" /* hello */ " - @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " - @click=" $emit( 'click' ) " - @click=" $emit( 'click' ) ;" - @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" - slot-scope=" foo" - slot-scope=" {row }" - slot-scope="{destructuring:{ a:{b}}}" - #default=" foo" - #default=" {row }" - #default="{destructuring:{ a:{b}}}" - v-slot=" foo" - v-slot=" {row }" - v-slot="{destructuring:{ a:{b}}}" - v-slot:name=" foo" - v-slot:name=" {row }" - v-slot:name="{destructuring:{ a:{b}}}" - :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" - :class="(() => { return 'hello' })()" - :key="index /* hello */ " - :key="index // hello " - @click="() => {console.log(test)}" - @click=" - () => { - console.log(test); - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null];" - #default="{foo:{bar:{baz}}}" -></div> -</template> - -=====================================output===================================== -<template> - <div - v-for="( - { longLongProp, longLongProp }, index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { longLongProp = 42, longLongProp = 'Hello, World!' }, index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp - } of longLongLongLongLongLongLongLongList" - v-for="( - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - } of longLongLongLongLongLongLongLongList" - v-for="( - [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp = 42, - anotherLongLongProp, - yetAnotherLongLongProp = 'Hello, World!' - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - ], - yetAnotherLongLongProp - ], - yetAnotherLongLongProp - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp = 'Hello, Prettier!', - [ - longLongProp, - longLongProp, - anotherLongLongProp = [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - ], - yetAnotherLongLongProp - ], - yetAnotherLongLongProp - ], - yetAnotherLongLongProp - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - { longLongProp, longLongProp }, - { longLongProp, longLongProp }, - [ - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - longLongProp - ], - yetAnotherLongLongProp - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { - firstValue, - secondValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - } - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue = { longLongProp, longLongProp }, secondValue }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - sixthValue, - seventhValue - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - sixthValue: { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - sixthValue, - seventhValue - }, - seventhValue - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp = { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp - }, - yetAnotherLongLongProp - }, - sixthValue, - seventhValue - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="item in items" - v-for="item of items" - v-for="(item, index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value, key, index) in object" - v-for="n in evenNumbers" - v-for="n in even(numbers)" - v-for="n in 10" - v-for="{ a } in [0].map(() => ({ a: 1 }))" - v-for="({ a }, [c]) in [0].map(() => 1)" - v-for="n in items.map((x) => { - return x; - })" - @click="/* hello */" - @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" - @click="$emit('click')" - @click="$emit('click')" - @click=" - $emit('click'); - if (something) { - for (let i = j; i < 100; i++) {} - } else { - } - " - slot-scope="foo" - slot-scope="{ row }" - slot-scope="{ - destructuring: { - a: { b } - } - }" - #default="foo" - #default="{ row }" - #default="{ - destructuring: { - a: { b } - } - }" - v-slot="foo" - v-slot="{ row }" - v-slot="{ - destructuring: { - a: { b } - } - }" - v-slot:name="foo" - v-slot:name="{ row }" - v-slot:name="{ - destructuring: { - a: { b } - } - }" - :class="{ - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true - }" - :class=" - (() => { - return 'hello'; - })() - " - :key="index /* hello */" - :key=" - index // hello - " - @click=" - () => { - console.log(test); - } - " - @click=" - () => { - console.log(test); - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null]" - #default="{ - foo: { - bar: { baz } - } - }" - ></div> -</template> - -================================================================================ -`; - -exports[`attributes.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<div - v-for="({ longLongProp, longLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp=42, longLongProp='Hello, World!' }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp }) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, index) of longLongLongLongLongLongLongLongList" - v-for="({ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp=42, anotherLongLongProp, yetAnotherLongLongProp='Hello, World!'], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp, [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([longLongProp, longLongProp, [longLongProp, longLongProp='Hello, Prettier!', [longLongProp, longLongProp, anotherLongLongProp=[longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="([{ longLongProp, longLongProp }, { longLongProp, longLongProp }, [{ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, longLongProp], yetAnotherLongLongProp], index) of longLongLongLongLongLongLongLongList" - v-for="({firstValue, secondValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue={ longLongProp, longLongProp }, secondValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue: {firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, sixthValue, seventhValue}, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for="({firstValue, secondValue, thirdValue, fourthValue, fifthValue: { longLongProp, longLongProp, anotherLongLongProp={ longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp }, yetAnotherLongLongProp }, sixthValue, seventhValue}, objectKey, index) in objectWithAVeryVeryVeryVeryLongName" - v-for=" item in items " - v-for=" item of items " - v-for="( item , index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value , key, index) in object" - v-for=" n in evenNumbers" - v-for=" n in even ( numbers) " - v-for=" n in 10" - v-for=" { a } in [0].map(()=>({a:1})) " - v-for=" ({ a }, [c ]) in [0].map(()=>1) " - v-for=" n in items.map(x => { return x }) " - @click=" /* hello */ " - @click=" /* 1 */ $emit( /* 2 */ 'click' /* 3 */ ) /* 4 */ ; /* 5 */ " - @click=" $emit( 'click' ) " - @click=" $emit( 'click' ) ;" - @click=" $emit( 'click' ) ;if(something){for(let i=j;i<100;i++){}}else{}" - slot-scope=" foo" - slot-scope=" {row }" - slot-scope="{destructuring:{ a:{b}}}" - #default=" foo" - #default=" {row }" - #default="{destructuring:{ a:{b}}}" - v-slot=" foo" - v-slot=" {row }" - v-slot="{destructuring:{ a:{b}}}" - v-slot:name=" foo" - v-slot:name=" {row }" - v-slot:name="{destructuring:{ a:{b}}}" - :class="{ longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true }" - :class="(() => { return 'hello' })()" - :key="index /* hello */ " - :key="index // hello " - @click="() => {console.log(test)}" - @click=" - () => { - console.log(test); - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null];" - #default="{foo:{bar:{baz}}}" -></div> -</template> - -=====================================output===================================== -<template> - <div - v-for="( - { longLongProp, longLongProp }, index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { longLongProp = 42, longLongProp = 'Hello, World!' }, index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp, - } of longLongLongLongLongLongLongLongList" - v-for="( - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - index - ) of longLongLongLongLongLongLongLongList" - v-for="{ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - } of longLongLongLongLongLongLongLongList" - v-for="( - [longLongProp, longLongProp, anotherLongLongProp, yetAnotherLongLongProp], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp = 42, - anotherLongLongProp, - yetAnotherLongLongProp = 'Hello, World!', - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - longLongProp, - longLongProp, - [ - longLongProp, - longLongProp = 'Hello, Prettier!', - [ - longLongProp, - longLongProp, - anotherLongLongProp = [ - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - [ - { longLongProp, longLongProp }, - { longLongProp, longLongProp }, - [ - { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - longLongProp, - ], - yetAnotherLongLongProp, - ], - index - ) of longLongLongLongLongLongLongLongList" - v-for="( - { - firstValue, - secondValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue = { longLongProp, longLongProp }, secondValue }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { firstValue, secondValue, thirdValue, fourthValue }, objectKey, index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue: { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="( - { - firstValue, - secondValue, - thirdValue, - fourthValue, - fifthValue: { - longLongProp, - longLongProp, - anotherLongLongProp = { - longLongProp, - longLongProp, - anotherLongLongProp, - yetAnotherLongLongProp, - }, - yetAnotherLongLongProp, - }, - sixthValue, - seventhValue, - }, - objectKey, - index - ) in objectWithAVeryVeryVeryVeryLongName" - v-for="item in items" - v-for="item of items" - v-for="(item, index) in items" - v-for="value in object" - v-for="(value, key) in object" - v-for="(value, key) of object" - v-for="(value, key, index) in object" - v-for="n in evenNumbers" - v-for="n in even(numbers)" - v-for="n in 10" - v-for="{ a } in [0].map(() => ({ a: 1 }))" - v-for="({ a }, [c]) in [0].map(() => 1)" - v-for="n in items.map((x) => { - return x; - })" - @click="/* hello */" - @click="/* 1 */ $emit(/* 2 */ 'click' /* 3 */) /* 4 */ /* 5 */" - @click="$emit('click')" - @click="$emit('click')" - @click=" - $emit('click'); - if (something) { - for (let i = j; i < 100; i++) {} - } else { - } - " - slot-scope="foo" - slot-scope="{ row }" - slot-scope="{ - destructuring: { - a: { b }, - }, - }" - #default="foo" - #default="{ row }" - #default="{ - destructuring: { - a: { b }, - }, - }" - v-slot="foo" - v-slot="{ row }" - v-slot="{ - destructuring: { - a: { b }, - }, - }" - v-slot:name="foo" - v-slot:name="{ row }" - v-slot:name="{ - destructuring: { - a: { b }, - }, - }" - :class="{ - longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: true, - }" - :class=" - (() => { - return 'hello'; - })() - " - :key="index /* hello */" - :key=" - index // hello - " - @click=" - () => { - console.log(test); - } - " - @click=" - () => { - console.log(test); - } - " - @click="doSomething()" - @click="doSomething;" - @click="a.b;" - @click="a[1];" - @click="a['b'];" - @click="a[null]" - #default="{ - foo: { - bar: { baz }, - }, - }" - ></div> -</template> - -================================================================================ -`; - -exports[`board_card.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<script> -import './issue_card_inner'; -import eventHub from '../eventhub'; - -const Store = gl.issueBoards.BoardsStore; - -export default { - name: 'BoardsIssueCard', - components: { - 'issue-card-inner': gl.issueBoards.IssueCardInner, - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String, - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail, - }; - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ); - }, - }, - methods: { - mouseDown() { - this.showDetail = true; - }, - mouseMove() { - this.showDetail = false; - }, - showIssue(e) { - if (e.target.classList.contains('js-no-trigger')) return; - - if (this.showDetail) { - this.showDetail = false; - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit('clearDetailIssue'); - } else { - eventHub.$emit('newDetailIssue', this.issue); - Store.detail.list = this.list; - } - } - }, - }, -}; -</script> - -<template> - <li class="card" - :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)"> - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" /> - </li> -</template> - -=====================================output===================================== -<script> -import "./issue_card_inner" -import eventHub from "../eventhub" - -const Store = gl.issueBoards.BoardsStore - -export default { - name: "BoardsIssueCard", - components: { - "issue-card-inner": gl.issueBoards.IssueCardInner, - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String, - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail, - } - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ) - }, - }, - methods: { - mouseDown() { - this.showDetail = true - }, - mouseMove() { - this.showDetail = false - }, - showIssue(e) { - if (e.target.classList.contains("js-no-trigger")) return - - if (this.showDetail) { - this.showDetail = false - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit("clearDetailIssue") - } else { - eventHub.$emit("newDetailIssue", this.issue) - Store.detail.list = this.list - } - } - }, - }, -} -</script> - -<template> - <li - class="card" - :class="{ - 'user-can-drag': !disabled && issue.id, - 'is-disabled': disabled || !issue.id, - 'is-active': issueDetailVisible, - }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)" - > - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" - /> - </li> -</template> - -================================================================================ -`; - -exports[`board_card.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<script> -import './issue_card_inner'; -import eventHub from '../eventhub'; - -const Store = gl.issueBoards.BoardsStore; - -export default { - name: 'BoardsIssueCard', - components: { - 'issue-card-inner': gl.issueBoards.IssueCardInner, - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String, - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail, - }; - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ); - }, - }, - methods: { - mouseDown() { - this.showDetail = true; - }, - mouseMove() { - this.showDetail = false; - }, - showIssue(e) { - if (e.target.classList.contains('js-no-trigger')) return; - - if (this.showDetail) { - this.showDetail = false; - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit('clearDetailIssue'); - } else { - eventHub.$emit('newDetailIssue', this.issue); - Store.detail.list = this.list; - } - } - }, - }, -}; -</script> - -<template> - <li class="card" - :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)"> - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" /> - </li> -</template> - -=====================================output===================================== -<script> -import "./issue_card_inner"; -import eventHub from "../eventhub"; - -const Store = gl.issueBoards.BoardsStore; - -export default { - name: "BoardsIssueCard", - components: { - "issue-card-inner": gl.issueBoards.IssueCardInner - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail - }; - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ); - } - }, - methods: { - mouseDown() { - this.showDetail = true; - }, - mouseMove() { - this.showDetail = false; - }, - showIssue(e) { - if (e.target.classList.contains("js-no-trigger")) return; - - if (this.showDetail) { - this.showDetail = false; - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit("clearDetailIssue"); - } else { - eventHub.$emit("newDetailIssue", this.issue); - Store.detail.list = this.list; - } - } - } - } -}; -</script> - -<template> - <li - class="card" - :class="{ - 'user-can-drag': !disabled && issue.id, - 'is-disabled': disabled || !issue.id, - 'is-active': issueDetailVisible - }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)" - > - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" - /> - </li> -</template> - -================================================================================ -`; - -exports[`board_card.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script> -import './issue_card_inner'; -import eventHub from '../eventhub'; - -const Store = gl.issueBoards.BoardsStore; - -export default { - name: 'BoardsIssueCard', - components: { - 'issue-card-inner': gl.issueBoards.IssueCardInner, - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String, - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail, - }; - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ); - }, - }, - methods: { - mouseDown() { - this.showDetail = true; - }, - mouseMove() { - this.showDetail = false; - }, - showIssue(e) { - if (e.target.classList.contains('js-no-trigger')) return; - - if (this.showDetail) { - this.showDetail = false; - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit('clearDetailIssue'); - } else { - eventHub.$emit('newDetailIssue', this.issue); - Store.detail.list = this.list; - } - } - }, - }, -}; -</script> - -<template> - <li class="card" - :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, 'is-active': issueDetailVisible }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)"> - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" /> - </li> -</template> - -=====================================output===================================== -<script> -import "./issue_card_inner"; -import eventHub from "../eventhub"; - -const Store = gl.issueBoards.BoardsStore; - -export default { - name: "BoardsIssueCard", - components: { - "issue-card-inner": gl.issueBoards.IssueCardInner, - }, - props: { - list: Object, - issue: Object, - issueLinkBase: String, - disabled: Boolean, - index: Number, - rootPath: String, - }, - data() { - return { - showDetail: false, - detailIssue: Store.detail, - }; - }, - computed: { - issueDetailVisible() { - return ( - this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id - ); - }, - }, - methods: { - mouseDown() { - this.showDetail = true; - }, - mouseMove() { - this.showDetail = false; - }, - showIssue(e) { - if (e.target.classList.contains("js-no-trigger")) return; - - if (this.showDetail) { - this.showDetail = false; - - if (Store.detail.issue && Store.detail.issue.id === this.issue.id) { - eventHub.$emit("clearDetailIssue"); - } else { - eventHub.$emit("newDetailIssue", this.issue); - Store.detail.list = this.list; - } - } - }, - }, -}; -</script> - -<template> - <li - class="card" - :class="{ - 'user-can-drag': !disabled && issue.id, - 'is-disabled': disabled || !issue.id, - 'is-active': issueDetailVisible, - }" - :index="index" - :data-issue-id="issue.id" - @mousedown="mouseDown" - @mousemove="mouseMove" - @mouseup="showIssue($event)" - > - <issue-card-inner - :list="list" - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath" - :update-filters="true" - /> - </li> -</template> - -================================================================================ -`; - -exports[`case-sensitive-tags.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <Input></Input> -</template> - -=====================================output===================================== -<template> - <Input></Input> -</template> - -================================================================================ -`; - -exports[`case-sensitive-tags.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <Input></Input> -</template> - -=====================================output===================================== -<template> - <Input></Input> -</template> - -================================================================================ -`; - -exports[`case-sensitive-tags.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <Input></Input> -</template> - -=====================================output===================================== -<template> - <Input></Input> -</template> - -================================================================================ -`; - -exports[`custom-block.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html><head></head><body></body></html> - -=====================================output===================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html> - <head></head> - <body></body> -</html> - -================================================================================ -`; - -exports[`custom-block.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html><head></head><body></body></html> - -=====================================output===================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html> - <head></head> - <body></body> -</html> - -================================================================================ -`; - -exports[`custom-block.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html><head></head><body></body></html> - -=====================================output===================================== -<i18n> - en: - one: One - two: Two -</i18n> - -<html> - <head></head> - <body></body> -</html> - -================================================================================ -`; - -exports[`expression-binding.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<!-- #7396 --> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`"/> -</template> -<template> -<MyComponent :attr="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` -+\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`"/> -</template> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`"/> -</template> -<template> -<MyComponent :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'"/> -</template> -<template> -<MyComponent :src="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'"/> -</template> -<template> -<MyComponent :src="100000000000000000000000000000000000000000000000000000000000000000000000000"/> -</template> - -=====================================output===================================== -<!-- #7396 --> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" - /> -</template> -<template> - <MyComponent - :attr=" - \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + - \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` - " - /> -</template> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${ - foo + bar - } template literal value\`" - /> -</template> -<template> - <MyComponent - :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" - /> -</template> -<template> - <MyComponent - :src=" - 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + - 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' - " - /> -</template> -<template> - <MyComponent - :src=" - 100000000000000000000000000000000000000000000000000000000000000000000000000 - " - /> -</template> - -================================================================================ -`; - -exports[`expression-binding.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<!-- #7396 --> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`"/> -</template> -<template> -<MyComponent :attr="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` -+\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`"/> -</template> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`"/> -</template> -<template> -<MyComponent :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'"/> -</template> -<template> -<MyComponent :src="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'"/> -</template> -<template> -<MyComponent :src="100000000000000000000000000000000000000000000000000000000000000000000000000"/> -</template> - -=====================================output===================================== -<!-- #7396 --> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" - /> -</template> -<template> - <MyComponent - :attr=" - \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + - \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` - " - /> -</template> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${ - foo + bar - } template literal value\`" - /> -</template> -<template> - <MyComponent - :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" - /> -</template> -<template> - <MyComponent - :src=" - 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + - 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' - " - /> -</template> -<template> - <MyComponent - :src=" - 100000000000000000000000000000000000000000000000000000000000000000000000000 - " - /> -</template> - -================================================================================ -`; - -exports[`expression-binding.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- #7396 --> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`"/> -</template> -<template> -<MyComponent :attr="\`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` -+\`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\`"/> -</template> -<template> -<MyComponent :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo + bar} template literal value\`"/> -</template> -<template> -<MyComponent :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'"/> -</template> -<template> -<MyComponent :src="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'"/> -</template> -<template> -<MyComponent :src="100000000000000000000000000000000000000000000000000000000000000000000000000"/> -</template> - -=====================================output===================================== -<!-- #7396 --> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${foo} template literal value\`" - /> -</template> -<template> - <MyComponent - :attr=" - \`\${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` + - \`\${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${template} \${literal}\` - " - /> -</template> -<template> - <MyComponent - :attr="\`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog \${ - foo + bar - } template literal value\`" - /> -</template> -<template> - <MyComponent - :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" - /> -</template> -<template> - <MyComponent - :src=" - 'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + - 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' - " - /> -</template> -<template> - <MyComponent - :src=" - 100000000000000000000000000000000000000000000000000000000000000000000000000 - " - /> -</template> - -================================================================================ -`; - -exports[`filter.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> - <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="not-allowed" v-if='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> -</template> - -=====================================output===================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed"> - {{ - value - | thisIsARealSuperLongFilterPipe("arg1", arg2) - | anotherPipeLongJustForFun - | pipeTheThird - }} - </div> - <div - class="allowed" - v-bind:something=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="allowed" - :class=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="not-allowed" - v-if=" - value | - thisIsARealSuperLongFilterPipe('arg1', arg2) | - anotherPipeLongJustForFun | - pipeTheThird - " - ></div> -</template> - -================================================================================ -`; - -exports[`filter.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> - <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="not-allowed" v-if='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> -</template> - -=====================================output===================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed"> - {{ - value - | thisIsARealSuperLongFilterPipe("arg1", arg2) - | anotherPipeLongJustForFun - | pipeTheThird - }} - </div> - <div - class="allowed" - v-bind:something=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="allowed" - :class=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="not-allowed" - v-if=" - value | - thisIsARealSuperLongFilterPipe('arg1', arg2) | - anotherPipeLongJustForFun | - pipeTheThird - " - ></div> -</template> - -================================================================================ -`; - -exports[`filter.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> - <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="not-allowed" v-if='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> -</template> - -=====================================output===================================== -<!-- vue filters are only allowed in v-bind and interpolation --> -<template> - <div class="allowed"> - {{ - value - | thisIsARealSuperLongFilterPipe("arg1", arg2) - | anotherPipeLongJustForFun - | pipeTheThird - }} - </div> - <div - class="allowed" - v-bind:something=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="allowed" - :class=" - value - | thisIsARealSuperLongFilterPipe('arg1', arg2) - | anotherPipeLongJustForFun - | pipeTheThird - " - ></div> - <div - class="not-allowed" - v-if=" - value | - thisIsARealSuperLongFilterPipe('arg1', arg2) | - anotherPipeLongJustForFun | - pipeTheThird - " - ></div> -</template> - -================================================================================ -`; - -exports[`interpolations.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> -<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ - - -x => { - const hello = 'world' - return hello; -} - - - -}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ - - - some_variable - - - -}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ - - preserve - - invalid - - interpolation - -}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> - -<script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; -</script> - -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 -</div> -</template> - -=====================================output===================================== -<template> - <div> - Fuga magnam facilis. Voluptatem quaerat porro.{{ - (x) => { - const hello = "world" - return hello - } - }} - Magni consectetur in et molestias neque esse voluptatibus voluptas. - {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est - error - {{ - - preserve - - invalid - - interpolation - - }} - reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. - </div> - - <script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; - </script> - - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }} - 1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }} 1234567890 - </div> -</template> - -================================================================================ -`; - -exports[`interpolations.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> -<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ - - -x => { - const hello = 'world' - return hello; -} - - - -}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ - - - some_variable - - - -}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ - - preserve - - invalid - - interpolation - -}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> - -<script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; -</script> - -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 -</div> -</template> - -=====================================output===================================== -<template> - <div> - Fuga magnam facilis. Voluptatem quaerat porro.{{ - (x) => { - const hello = "world"; - return hello; - } - }} - Magni consectetur in et molestias neque esse voluptatibus voluptas. - {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est - error - {{ - - preserve - - invalid - - interpolation - - }} - reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. - </div> - - <script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; - </script> - - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }} - 1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }} 1234567890 - </div> -</template> - -================================================================================ -`; - -exports[`interpolations.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<div>Fuga magnam facilis. Voluptatem quaerat porro.{{ - - -x => { - const hello = 'world' - return hello; -} - - - -}} Magni consectetur in et molestias neque esse voluptatibus voluptas. {{ - - - some_variable - - - -}} Eum quia nihil nulla esse. Dolorem asperiores vero est error {{ - - preserve - - invalid - - interpolation - -}} reprehenderit voluptates minus {{console.log( short_interpolation )}} nemo.</div> - -<script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; -</script> - -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }}1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ something }} 1234567890 -</div> -<div> - 1234567890123456789012345678901234567890123456789012345678901234567890 {{ something }} 1234567890 -</div> -</template> - -=====================================output===================================== -<template> - <div> - Fuga magnam facilis. Voluptatem quaerat porro.{{ - (x) => { - const hello = "world"; - return hello; - } - }} - Magni consectetur in et molestias neque esse voluptatibus voluptas. - {{ some_variable }} Eum quia nihil nulla esse. Dolorem asperiores vero est - error - {{ - - preserve - - invalid - - interpolation - - }} - reprehenderit voluptates minus {{ console.log(short_interpolation) }} nemo. - </div> - - <script type="text/jsx"> - export default { - render (h) { - return ( - <ul - class={{ - 'a': b, - 'c': d, - "e": f - }} - > - { this.xyz } - </ul> - ) - }; - </script> - - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }}1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890{{ - something - }} - 1234567890 - </div> - <div> - 1234567890123456789012345678901234567890123456789012345678901234567890 - {{ something }} 1234567890 - </div> -</template> - -================================================================================ -`; - -exports[`multiple-template1.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -cloned. - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -cloned. - -================================================================================ -`; - -exports[`multiple-template1.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -cloned. - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -cloned. - -================================================================================ -`; - -exports[`multiple-template1.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -cloned. - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -cloned. - -================================================================================ -`; - -exports[`multiple-template2.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -<template></template > - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -<template></template> - -================================================================================ -`; - -exports[`multiple-template2.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -<template></template > - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -<template></template> - -================================================================================ -`; - -exports[`multiple-template2.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template></template> -<template lang=unknown> -<a> -</template> -<template></template > - -=====================================output===================================== -<template></template> -<template lang="unknown"> -<a> -</template> -<template></template> - -================================================================================ -`; - -exports[`nested-template.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <div> - <template> - <div></div> - </template> - <div> - Do not go out, you'll got yourself cloned by bad bad people. - </div> - </div> -</template> - -=====================================output===================================== -<template> - <div> - <template> - <div></div> - </template> - <div>Do not go out, you'll got yourself cloned by bad bad people.</div> - </div> -</template> - -================================================================================ -`; - -exports[`nested-template.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <div> - <template> - <div></div> - </template> - <div> - Do not go out, you'll got yourself cloned by bad bad people. - </div> - </div> -</template> - -=====================================output===================================== -<template> - <div> - <template> - <div></div> - </template> - <div>Do not go out, you'll got yourself cloned by bad bad people.</div> - </div> -</template> - -================================================================================ -`; - -exports[`nested-template.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div> - <template> - <div></div> - </template> - <div> - Do not go out, you'll got yourself cloned by bad bad people. - </div> - </div> -</template> - -=====================================output===================================== -<template> - <div> - <template> - <div></div> - </template> - <div>Do not go out, you'll got yourself cloned by bad bad people.</div> - </div> -</template> - -================================================================================ -`; - -exports[`one-line-template1.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template><p>foo</p><div>foo</div></template> - -=====================================output===================================== -<template> - <p>foo</p> - <div>foo</div> -</template> - -================================================================================ -`; - -exports[`one-line-template1.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template><p>foo</p><div>foo</div></template> - -=====================================output===================================== -<template> - <p>foo</p> - <div>foo</div> -</template> - -================================================================================ -`; - -exports[`one-line-template1.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template><p>foo</p><div>foo</div></template> - -=====================================output===================================== -<template> - <p>foo</p> - <div>foo</div> -</template> - -================================================================================ -`; - -exports[`one-line-template2.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template><div><p>foo</p><div>bar</div></div></template> - -=====================================output===================================== -<template> - <div> - <p>foo</p> - <div>bar</div> - </div> -</template> - -================================================================================ -`; - -exports[`one-line-template2.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template><div><p>foo</p><div>bar</div></div></template> - -=====================================output===================================== -<template> - <div> - <p>foo</p> - <div>bar</div> - </div> -</template> - -================================================================================ -`; - -exports[`one-line-template2.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template><div><p>foo</p><div>bar</div></div></template> - -=====================================output===================================== -<template> - <div> - <p>foo</p> - <div>bar</div> - </div> -</template> - -================================================================================ -`; - -exports[`pre-child.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> -<pre - ref="buildTrace" - class="build-trace mb-0 h-100" - @scroll="scrollBuildLog" -> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> -<pre class='woot'> - {{ stuff }} - </pre> -</template> - -<template> -<pre class='woot'> - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - </pre> -</template> - -=====================================output===================================== -<template> - <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> - <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> - <pre class="woot"> - {{ stuff }} - </pre> -</template> - -<template> - <pre class="woot"> - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - </pre - > -</template> - -================================================================================ -`; - -exports[`pre-child.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> -<pre - ref="buildTrace" - class="build-trace mb-0 h-100" - @scroll="scrollBuildLog" -> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> -<pre class='woot'> - {{ stuff }} - </pre> -</template> - -<template> -<pre class='woot'> - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - </pre> -</template> - -=====================================output===================================== -<template> - <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> - <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> - <pre class="woot"> - {{ stuff }} - </pre> -</template> - -<template> - <pre class="woot"> - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - </pre - > -</template> - -================================================================================ -`; - -exports[`pre-child.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> -<pre - ref="buildTrace" - class="build-trace mb-0 h-100" - @scroll="scrollBuildLog" -> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> -<pre class='woot'> - {{ stuff }} - </pre> -</template> - -<template> -<pre class='woot'> - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - 123{{ wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq || wqeqwwqwqweqweqwewwq }}123 - </pre> -</template> - -=====================================output===================================== -<template> - <!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/ide/components/jobs/detail.vue --> - <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> - <code - v-show="!detailJob.isLoading" - class="bash" - v-html="jobOutput" - > - </code> - <div - v-show="detailJob.isLoading" - class="build-loader-animation" - > - <div class="dot"></div> - <div class="dot"></div> - <div class="dot"></div> - </div> -</pre> -</template> - -<!-- copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/code_block.vue --> -<template> - <pre class="code-block rounded"> - <code class="d-block">{{ code }}</code> - </pre> -</template> - -<template> - <pre class="woot"> - {{ stuff }} - </pre> -</template> - -<template> - <pre class="woot"> - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - 123{{ - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq || - wqeqwwqwqweqweqwewwq - }}123 - </pre - > -</template> - -================================================================================ -`; - -exports[`script_src.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -=====================================output===================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -================================================================================ -`; - -exports[`script_src.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -=====================================output===================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -================================================================================ -`; - -exports[`script_src.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -=====================================output===================================== -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script> -<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script> - -================================================================================ -`; - -exports[`self_closing.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <div /> -</template> - -<script> -foo( ) -</script> - -<template> -<div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> -</div> -</template> - -<template> - <Foo><Bar - attr - /></Foo> -</template> - -=====================================output===================================== -<template> - <div /> -</template> - -<script> -foo() -</script> - -<template> - <div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> - </div> -</template> - -<template> - <Foo><Bar attr /></Foo> -</template> - -================================================================================ -`; - -exports[`self_closing.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <div /> -</template> - -<script> -foo( ) -</script> - -<template> -<div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> -</div> -</template> - -<template> - <Foo><Bar - attr - /></Foo> -</template> - -=====================================output===================================== -<template> - <div /> -</template> - -<script> -foo(); -</script> - -<template> - <div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> - </div> -</template> - -<template> - <Foo><Bar attr /></Foo> -</template> - -================================================================================ -`; - -exports[`self_closing.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <div /> -</template> - -<script> -foo( ) -</script> - -<template> -<div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> -</div> -</template> - -<template> - <Foo><Bar - attr - /></Foo> -</template> - -=====================================output===================================== -<template> - <div /> -</template> - -<script> -foo(); -</script> - -<template> - <div class="container"> - <HomeH /> - <HomeA /> - <HomeX /> - <HomeY /> - </div> -</template> - -<template> - <Foo><Bar attr /></Foo> -</template> - -================================================================================ -`; - -exports[`self_closing_style.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -=====================================output===================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -================================================================================ -`; - -exports[`self_closing_style.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -=====================================output===================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -================================================================================ -`; - -exports[`self_closing_style.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -=====================================output===================================== -<template> - <span :class="$style.root"><slot /></span> -</template> - -<style src="./style.css" module /> - -================================================================================ -`; - -exports[`style.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<script> -</script> - -<style> -#foo1{ color: #f00; -} -</style> -<style scoped> -#foo2{ color: #f00; -} -</style> - -<style lang="css"> -#foo3{ color: #f00; -} -</style> -<style lang="css" scoped> -#foo4{ color: #f00; -} -</style> - -<style lang="less"> -#foo5{ color: #f00; -} -</style> -<style lang="less" scoped> -#foo6{ - @color: #f00; - color: @color; -} -</style> - - -<style lang="scss"> -#foo8{ - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8{ - $color: #f00; - color: $color; -} -</style> - - -=====================================output===================================== -<script></script> - -<style> -#foo1 { - color: #f00; -} -</style> -<style scoped> -#foo2 { - color: #f00; -} -</style> - -<style lang="css"> -#foo3 { - color: #f00; -} -</style> -<style lang="css" scoped> -#foo4 { - color: #f00; -} -</style> - -<style lang="less"> -#foo5 { - color: #f00; -} -</style> -<style lang="less" scoped> -#foo6 { - @color: #f00; - color: @color; -} -</style> - -<style lang="scss"> -#foo8 { - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8 { - $color: #f00; - color: $color; -} -</style> - -================================================================================ -`; - -exports[`style.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<script> -</script> - -<style> -#foo1{ color: #f00; -} -</style> -<style scoped> -#foo2{ color: #f00; -} -</style> - -<style lang="css"> -#foo3{ color: #f00; -} -</style> -<style lang="css" scoped> -#foo4{ color: #f00; -} -</style> - -<style lang="less"> -#foo5{ color: #f00; -} -</style> -<style lang="less" scoped> -#foo6{ - @color: #f00; - color: @color; -} -</style> - - -<style lang="scss"> -#foo8{ - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8{ - $color: #f00; - color: $color; -} -</style> - - -=====================================output===================================== -<script></script> - -<style> -#foo1 { - color: #f00; -} -</style> -<style scoped> -#foo2 { - color: #f00; -} -</style> - -<style lang="css"> -#foo3 { - color: #f00; -} -</style> -<style lang="css" scoped> -#foo4 { - color: #f00; -} -</style> - -<style lang="less"> -#foo5 { - color: #f00; -} -</style> -<style lang="less" scoped> -#foo6 { - @color: #f00; - color: @color; -} -</style> - -<style lang="scss"> -#foo8 { - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8 { - $color: #f00; - color: $color; -} -</style> - -================================================================================ -`; - -exports[`style.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script> -</script> - -<style> -#foo1{ color: #f00; -} -</style> -<style scoped> -#foo2{ color: #f00; -} -</style> - -<style lang="css"> -#foo3{ color: #f00; -} -</style> -<style lang="css" scoped> -#foo4{ color: #f00; -} -</style> - -<style lang="less"> -#foo5{ color: #f00; -} -</style> -<style lang="less" scoped> -#foo6{ - @color: #f00; - color: @color; -} -</style> - - -<style lang="scss"> -#foo8{ - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8{ - $color: #f00; - color: $color; -} -</style> - - -=====================================output===================================== -<script></script> - -<style> -#foo1 { - color: #f00; -} -</style> -<style scoped> -#foo2 { - color: #f00; -} -</style> - -<style lang="css"> -#foo3 { - color: #f00; -} -</style> -<style lang="css" scoped> -#foo4 { - color: #f00; -} -</style> - -<style lang="less"> -#foo5 { - color: #f00; -} -</style> -<style lang="less" scoped> -#foo6 { - @color: #f00; - color: @color; -} -</style> - -<style lang="scss"> -#foo8 { - $color: #f00; - color: $color; -} -</style> -<style lang="scss" scoped> -#foo8 { - $color: #f00; - color: $color; -} -</style> - -================================================================================ -`; - -exports[`tag-name.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> - <Table></Table> -</template> - -=====================================output===================================== -<template> - <Table></Table> -</template> - -================================================================================ -`; - -exports[`tag-name.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> - <Table></Table> -</template> - -=====================================output===================================== -<template> - <Table></Table> -</template> - -================================================================================ -`; - -exports[`tag-name.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> - <Table></Table> -</template> - -=====================================output===================================== -<template> - <Table></Table> -</template> - -================================================================================ -`; - -exports[`template.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick"/> - <p - v-if="renderInfo" - class="file-info prepend-top-10"> - <template v-if="fileSize>0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize>0 && width && height"> - | - </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -=====================================output===================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick" - /> - <p v-if="renderInfo" class="file-info prepend-top-10"> - <template v-if="fileSize > 0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize > 0 && width && height"> | </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -================================================================================ -`; - -exports[`template.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick"/> - <p - v-if="renderInfo" - class="file-info prepend-top-10"> - <template v-if="fileSize>0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize>0 && width && height"> - | - </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -=====================================output===================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick" - /> - <p v-if="renderInfo" class="file-info prepend-top-10"> - <template v-if="fileSize > 0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize > 0 && width && height"> | </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -================================================================================ -`; - -exports[`template.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick"/> - <p - v-if="renderInfo" - class="file-info prepend-top-10"> - <template v-if="fileSize>0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize>0 && width && height"> - | - </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -=====================================output===================================== -<!--copied from https://github.com/gitlabhq/gitlabhq/blob/master/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue--> -<template> - <div class="file-container"> - <div class="file-content image_file"> - <img - ref="contentImg" - :class="{ 'is-zoomable': isZoomable, 'is-zoomed': isZoomed }" - :src="path" - :alt="path" - @load="onImgLoad" - @click="onImgClick" - /> - <p v-if="renderInfo" class="file-info prepend-top-10"> - <template v-if="fileSize > 0"> - {{ fileSizeReadable }} - </template> - <template v-if="fileSize > 0 && width && height"> | </template> - <template v-if="width && height"> - W: {{ width }} | H: {{ height }} - </template> - </p> - </div> - </div> -</template> - -================================================================================ -`; - -exports[`template-dom.html - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<!DOCTYPE html><html> - <body> - <div v-if="foo === 'foo'"> - -</div> - <script> -new Vue({el: '#app'}) - </script> - </body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }) - </script> - </body> -</html> - -================================================================================ -`; - -exports[`template-dom.html - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<!DOCTYPE html><html> - <body> - <div v-if="foo === 'foo'"> - -</div> - <script> -new Vue({el: '#app'}) - </script> - </body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`template-dom.html format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<!DOCTYPE html><html> - <body> - <div v-if="foo === 'foo'"> - -</div> - <script> -new Vue({el: '#app'}) - </script> - </body> -</html> - -=====================================output===================================== -<!DOCTYPE html> -<html> - <body> - <div v-if="foo === 'foo'"></div> - <script> - new Vue({ el: "#app" }); - </script> - </body> -</html> - -================================================================================ -`; - -exports[`template-lang.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template - - - - lang='pug'> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -=====================================output===================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -================================================================================ -`; - -exports[`template-lang.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template - - - - lang='pug'> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -=====================================output===================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -================================================================================ -`; - -exports[`template-lang.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template - - - - lang='pug'> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -=====================================output===================================== -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="pug"> - .test - #foo - .bla -</template> - -<template lang="unknown"> - #container - some-component(tag='<some-tag>') -</template> - -<template lang=""> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -<template lang> - <v-app-bar> - <v-menu offset-y> - <template></template> - </v-menu> - </v-app-bar> -</template> - -================================================================================ -`; - -exports[`test.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<script> -</script> - -<template> - <br /> - <footer> - foo - <br/> - </footer> -</template> - -=====================================output===================================== -<script></script> - -<template> - <br /> - <footer> - foo - <br /> - </footer> -</template> - -================================================================================ -`; - -exports[`test.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<script> -</script> - -<template> - <br /> - <footer> - foo - <br/> - </footer> -</template> - -=====================================output===================================== -<script></script> - -<template> - <br /> - <footer> - foo - <br /> - </footer> -</template> - -================================================================================ -`; - -exports[`test.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script> -</script> - -<template> - <br /> - <footer> - foo - <br/> - </footer> -</template> - -=====================================output===================================== -<script></script> - -<template> - <br /> - <footer> - foo - <br /> - </footer> -</template> - -================================================================================ -`; - -exports[`v-if.vue - {"semi":false} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -semi: false - | printWidth -=====================================input====================================== -<template> -<root> - <and v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <and v-if=" -(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <or v-if=" -long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></or> - <or v-if=" -(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || -long_long_long_long_long_long_long_condition_3) || -long_long_long_long_long_long_long_condition_4 -"></or> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4) -"></mixed> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></mixed> -</root> -</template> - -=====================================output===================================== -<template> - <root> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4) - " - ></mixed> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3) || - long_long_long_long_long_long_long_condition_4 - " - ></mixed> - </root> -</template> - -================================================================================ -`; - -exports[`v-if.vue - {"trailingComma":"none"} format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 -trailingComma: "none" - | printWidth -=====================================input====================================== -<template> -<root> - <and v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <and v-if=" -(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <or v-if=" -long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></or> - <or v-if=" -(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || -long_long_long_long_long_long_long_condition_3) || -long_long_long_long_long_long_long_condition_4 -"></or> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4) -"></mixed> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></mixed> -</root> -</template> - -=====================================output===================================== -<template> - <root> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4) - " - ></mixed> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3) || - long_long_long_long_long_long_long_condition_4 - " - ></mixed> - </root> -</template> - -================================================================================ -`; - -exports[`v-if.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template> -<root> - <and v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <and v-if=" -(long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 && (short_1 && short_2) ) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4 -"></and> - <or v-if=" -long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 ||short_1 || short_2 || -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></or> - <or v-if=" -(long_long_long_long_long_long_long_condition_1 || long_long_long_long_long_long_long_condition_2 || (short_1 || short_2) || -long_long_long_long_long_long_long_condition_3) || -long_long_long_long_long_long_long_condition_4 -"></or> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || ((short_1 && short_2) && -long_long_long_long_long_long_long_condition_3 && -long_long_long_long_long_long_long_condition_4) -"></mixed> - <mixed v-if=" -long_long_long_long_long_long_long_condition_1 && long_long_long_long_long_long_long_condition_2 || short_1 && short_2 && -long_long_long_long_long_long_long_condition_3 || -long_long_long_long_long_long_long_condition_4 -"></mixed> -</root> -</template> - -=====================================output===================================== -<template> - <root> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <and - v-if=" - long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2 && - short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4 - " - ></and> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <or - v-if=" - long_long_long_long_long_long_long_condition_1 || - long_long_long_long_long_long_long_condition_2 || - short_1 || - short_2 || - long_long_long_long_long_long_long_condition_3 || - long_long_long_long_long_long_long_condition_4 - " - ></or> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3 && - long_long_long_long_long_long_long_condition_4) - " - ></mixed> - <mixed - v-if=" - (long_long_long_long_long_long_long_condition_1 && - long_long_long_long_long_long_long_condition_2) || - (short_1 && - short_2 && - long_long_long_long_long_long_long_condition_3) || - long_long_long_long_long_long_long_condition_4 - " - ></mixed> - </root> -</template> - -================================================================================ -`; diff --git a/tests/format/vue/vue/expression-binding-ts.vue b/tests/format/vue/vue/expression-binding-ts.vue new file mode 100644 index 000000000000..66bc2f04514e --- /dev/null +++ b/tests/format/vue/vue/expression-binding-ts.vue @@ -0,0 +1,13 @@ +<!-- #7396 --> +<template> +<MyComponent +:foo="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo} template literal value`" +:bar="`${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}` ++`${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}`" +:baz="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo + bar} template literal value`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> +</template> +<script lang="ts"></script> diff --git a/tests/format/vue/vue/expression-binding.vue b/tests/format/vue/vue/expression-binding.vue index 30622df13e66..e55a4caf6e2d 100644 --- a/tests/format/vue/vue/expression-binding.vue +++ b/tests/format/vue/vue/expression-binding.vue @@ -1,20 +1,12 @@ <!-- #7396 --> <template> -<MyComponent :attr="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo} template literal value`"/> -</template> -<template> -<MyComponent :attr="`${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}` -+`${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}`"/> -</template> -<template> -<MyComponent :attr="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo + bar} template literal value`"/> -</template> -<template> -<MyComponent :src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'"/> -</template> -<template> -<MyComponent :src="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'"/> -</template> -<template> -<MyComponent :src="100000000000000000000000000000000000000000000000000000000000000000000000000"/> +<MyComponent +:foo="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo} template literal value`" +:bar="`${first} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}` ++`${second} loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${template} ${literal}`" +:baz="`loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog ${foo + bar} template literal value`" +:src="'loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog literal string value'" +:add="'first loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog' + 'second loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog'" +:num="100000000000000000000000000000000000000000000000000000000000000000000000000" +/> </template> diff --git a/tests/format/vue/vue/filter.vue b/tests/format/vue/vue/filter.vue index 3ab5f8ba7d2a..a425be2b9928 100644 --- a/tests/format/vue/vue/filter.vue +++ b/tests/format/vue/vue/filter.vue @@ -3,5 +3,5 @@ <div class="allowed">{{value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird}}</div> <div class="allowed" v-bind:something='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> <div class="allowed" :class='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> - <div class="not-allowed" v-if='value | thisIsARealSuperLongFilterPipe("arg1", arg2) | anotherPipeLongJustForFun | pipeTheThird'></div> + <div class="not-allowed" v-if='value | thisIsARealSuperLongBitwiseOr("arg1", arg2) | anotherBitwiseOrLongJustForFun | bitwiseOrTheThird'></div> </template> diff --git a/tests/format/vue/vue/format.test.js b/tests/format/vue/vue/format.test.js new file mode 100644 index 000000000000..7957288474a0 --- /dev/null +++ b/tests/format/vue/vue/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["vue"], { trailingComma: "none" }); +runFormatTest(import.meta, ["vue"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["vue"], { semi: false }); diff --git a/tests/format/vue/vue/jsfmt.spec.js b/tests/format/vue/vue/jsfmt.spec.js deleted file mode 100644 index e916f769e8ab..000000000000 --- a/tests/format/vue/vue/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["vue"], { trailingComma: "none" }); -run_spec(__dirname, ["vue"]); -run_spec(__dirname, ["vue"], { semi: false }); diff --git a/tests/format/vue/vue/slot-ts.vue b/tests/format/vue/vue/slot-ts.vue new file mode 100644 index 000000000000..3ff4dc348b3d --- /dev/null +++ b/tests/format/vue/vue/slot-ts.vue @@ -0,0 +1,13 @@ +<script lang="ts"></script> +<template> + <comp> + <template + v-slot="x: unknown []" + v-slot:named=" y : never" + slot-scope=" { des: {truc: tured } } : any " + #shorthand=" abc : string " + > + {{ x[1] }} + </template> + </comp> +</template> diff --git a/tests/format/vue/with-plugins/__snapshots__/format.test.js.snap b/tests/format/vue/with-plugins/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..f93e4aa39070 --- /dev/null +++ b/tests/format/vue/with-plugins/__snapshots__/format.test.js.snap @@ -0,0 +1,384 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`custom-block-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks"> +hello, +world! +</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks"> +hello, +world! +</custom> + +================================================================================ +`; + +exports[`custom-block-lang.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks"> +hello, +world! +</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks"> +HELLO, +WORLD! +</custom> + +================================================================================ +`; + +exports[`inline.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks">hello, world!</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks">hello, world!</custom> + +================================================================================ +`; + +exports[`inline.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks">hello, world!</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks"> +HELLO, WORLD! +</custom> + +================================================================================ +`; + +exports[`script-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="uppercase-rocks"> +hello, +world! +</script> + +=====================================output===================================== +<script lang="uppercase-rocks"> +hello, +world! +</script> + +================================================================================ +`; + +exports[`script-lang.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<script lang="uppercase-rocks"> +hello, +world! +</script> + +=====================================output===================================== +<script lang="uppercase-rocks"> +HELLO, +WORLD! +</script> + +================================================================================ +`; + +exports[`style-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style lang="uppercase-rocks"> +/* Should be uppercased */ +hello, +world! +</style> + +=====================================output===================================== +<style lang="uppercase-rocks"> +/* Should be uppercased */ +hello, +world! +</style> + +================================================================================ +`; + +exports[`style-lang.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<style lang="uppercase-rocks"> +/* Should be uppercased */ +hello, +world! +</style> + +=====================================output===================================== +<style lang="uppercase-rocks"> +/* SHOULD BE UPPERCASED */ +HELLO, +WORLD! +</style> + +================================================================================ +`; + +exports[`template-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template lang="uppercase-rocks"> +hello, +world! +</template> + +=====================================output===================================== +<template lang="uppercase-rocks"> +hello, +world! +</template> + +================================================================================ +`; + +exports[`template-lang.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template lang="uppercase-rocks"> +hello, +world! +</template> + +=====================================output===================================== +<template lang="uppercase-rocks"> +HELLO, +WORLD! +</template> + +================================================================================ +`; + +exports[`whitspace.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks"> + hello, + world! +</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks"> + hello, + world! +</custom> + +================================================================================ +`; + +exports[`whitspace.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<custom lang="uppercase-rocks"> + hello, + world! +</custom> + +=====================================output===================================== +<custom lang="uppercase-rocks"> + HELLO, + WORLD! +</custom> + +================================================================================ +`; + +exports[`with-src.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` +====================================options===================================== +embeddedLanguageFormatting: "off" +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> +<template lang="uppercase-rocks" src></template> +<template lang="uppercase-rocks" src=""></template> +<template lang="uppercase-rocks" src>PrEtTiEr</template> +<template lang="uppercase-rocks" src="">PrEtTiEr</template> +<template lang="uppercase-rocks" src> + + </template> +<template lang="uppercase-rocks" src=""> + + </template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"> +PrEtTiEr +</template> + + +<template lang="uppercase-rocks" :src="">PrEtTiEr</template> +<template lang="uppercase-rocks" @src="">PrEtTiEr</template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<custom lang="uppercase-rocks" src/> +<template lang="uppercase-rocks" src=""/> + +=====================================output===================================== +<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> +<template lang="uppercase-rocks" src></template> +<template lang="uppercase-rocks" src=""></template> +<template lang="uppercase-rocks" src>PrEtTiEr</template> +<template lang="uppercase-rocks" src="">PrEtTiEr</template> +<template lang="uppercase-rocks" src> + + </template> +<template lang="uppercase-rocks" src=""> + + </template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"> +PrEtTiEr +</template> + +<template lang="uppercase-rocks" :src="">PrEtTiEr</template> +<template lang="uppercase-rocks" @src="">PrEtTiEr</template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<style lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<script lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<custom lang="uppercase-rocks" src /> +<template lang="uppercase-rocks" src="" /> + +================================================================================ +`; + +exports[`with-src.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== +<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> +<template lang="uppercase-rocks" src></template> +<template lang="uppercase-rocks" src=""></template> +<template lang="uppercase-rocks" src>PrEtTiEr</template> +<template lang="uppercase-rocks" src="">PrEtTiEr</template> +<template lang="uppercase-rocks" src> + + </template> +<template lang="uppercase-rocks" src=""> + + </template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"> +PrEtTiEr +</template> + + +<template lang="uppercase-rocks" :src="">PrEtTiEr</template> +<template lang="uppercase-rocks" @src="">PrEtTiEr</template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"/> +<custom lang="uppercase-rocks" src/> +<template lang="uppercase-rocks" src=""/> + +=====================================output===================================== +<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> +<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> +<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> +<template lang="uppercase-rocks" src></template> +<template lang="uppercase-rocks" src=""></template> +<template lang="uppercase-rocks" src>PrEtTiEr</template> +<template lang="uppercase-rocks" src="">PrEtTiEr</template> +<template lang="uppercase-rocks" src> + + </template> +<template lang="uppercase-rocks" src=""> + + </template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks"> +PrEtTiEr +</template> + +<template lang="uppercase-rocks" :src=""> +PRETTIER +</template> +<template lang="uppercase-rocks" @src=""> +PRETTIER +</template> + +<template lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<style lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<script lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<custom lang="uppercase-rocks" src="foo.uppercase-rocks" /> +<custom lang="uppercase-rocks" src /> +<template lang="uppercase-rocks" src="" /> + +================================================================================ +`; diff --git a/tests/format/vue/with-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/with-plugins/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index 1234cf816523..000000000000 --- a/tests/format/vue/with-plugins/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,409 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`custom-block-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks"> -hello, -world! -</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks"> -hello, -world! -</custom> - -================================================================================ -`; - -exports[`custom-block-lang.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks"> -hello, -world! -</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks"> -HELLO, -WORLD! -</custom> - -================================================================================ -`; - -exports[`inline.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks">hello, world!</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks">hello, world!</custom> - -================================================================================ -`; - -exports[`inline.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks">hello, world!</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks"> -HELLO, WORLD! -</custom> - -================================================================================ -`; - -exports[`script-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script lang="uppercase-rocks"> -hello, -world! -</script> - -=====================================output===================================== -<script lang="uppercase-rocks"> -hello, -world! -</script> - -================================================================================ -`; - -exports[`script-lang.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<script lang="uppercase-rocks"> -hello, -world! -</script> - -=====================================output===================================== -<script lang="uppercase-rocks"> -hello, -world! -</script> - -================================================================================ -`; - -exports[`style-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<style lang="uppercase-rocks"> -/* Should not be uppercased */ -hello, -world! -</style> - -<style lang="stylus"> -/* Should insert a comment above this line */ -a - color blue; -</style> - -=====================================output===================================== -<style lang="uppercase-rocks"> -/* Should not be uppercased */ -hello, -world! -</style> - -<style lang="stylus"> -/* Should insert a comment above this line */ -a - color blue; -</style> - -================================================================================ -`; - -exports[`style-lang.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<style lang="uppercase-rocks"> -/* Should not be uppercased */ -hello, -world! -</style> - -<style lang="stylus"> -/* Should insert a comment above this line */ -a - color blue; -</style> - -=====================================output===================================== -<style lang="uppercase-rocks"> -/* Should not be uppercased */ -hello, -world! -</style> - -<style lang="stylus"> -/* Formatted by stylus plugin */ -/* Should insert a comment above this line */ -a - color blue; -</style> - -================================================================================ -`; - -exports[`template-lang.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template lang="uppercase-rocks"> -hello, -world! -</template> - -=====================================output===================================== -<template lang="uppercase-rocks"> -hello, -world! -</template> - -================================================================================ -`; - -exports[`template-lang.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template lang="uppercase-rocks"> -hello, -world! -</template> - -=====================================output===================================== -<template lang="uppercase-rocks"> -HELLO, -WORLD! -</template> - -================================================================================ -`; - -exports[`whitspace.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks"> - hello, - world! -</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks"> - hello, - world! -</custom> - -================================================================================ -`; - -exports[`whitspace.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<custom lang="uppercase-rocks"> - hello, - world! -</custom> - -=====================================output===================================== -<custom lang="uppercase-rocks"> - HELLO, - WORLD! -</custom> - -================================================================================ -`; - -exports[`with-src.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` -====================================options===================================== -embeddedLanguageFormatting: "off" -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> -<template lang="uppercase-rocks" src></template> -<template lang="uppercase-rocks" src=""></template> -<template lang="uppercase-rocks" src>PrEtTiEr</template> -<template lang="uppercase-rocks" src="">PrEtTiEr</template> -<template lang="uppercase-rocks" src> - - </template> -<template lang="uppercase-rocks" src=""> - - </template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"> -PrEtTiEr -</template> - - -<template lang="uppercase-rocks" :src="">PrEtTiEr</template> -<template lang="uppercase-rocks" @src="">PrEtTiEr</template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<custom lang="uppercase-rocks" src/> -<template lang="uppercase-rocks" src=""/> - -=====================================output===================================== -<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> -<template lang="uppercase-rocks" src></template> -<template lang="uppercase-rocks" src=""></template> -<template lang="uppercase-rocks" src>PrEtTiEr</template> -<template lang="uppercase-rocks" src="">PrEtTiEr</template> -<template lang="uppercase-rocks" src> - - </template> -<template lang="uppercase-rocks" src=""> - - </template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"> -PrEtTiEr -</template> - -<template lang="uppercase-rocks" :src="">PrEtTiEr</template> -<template lang="uppercase-rocks" @src="">PrEtTiEr</template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<style lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<script lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<custom lang="uppercase-rocks" src /> -<template lang="uppercase-rocks" src="" /> - -================================================================================ -`; - -exports[`with-src.vue format 1`] = ` -====================================options===================================== -parsers: ["vue"] -printWidth: 80 - | printWidth -=====================================input====================================== -<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> -<template lang="uppercase-rocks" src></template> -<template lang="uppercase-rocks" src=""></template> -<template lang="uppercase-rocks" src>PrEtTiEr</template> -<template lang="uppercase-rocks" src="">PrEtTiEr</template> -<template lang="uppercase-rocks" src> - - </template> -<template lang="uppercase-rocks" src=""> - - </template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"> -PrEtTiEr -</template> - - -<template lang="uppercase-rocks" :src="">PrEtTiEr</template> -<template lang="uppercase-rocks" @src="">PrEtTiEr</template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"/> -<custom lang="uppercase-rocks" src/> -<template lang="uppercase-rocks" src=""/> - -=====================================output===================================== -<template lang="uppercase-rocks" src="foo.uppercase-rocks"></template> -<style lang="uppercase-rocks" src="foo.uppercase-rocks"></style> -<script lang="uppercase-rocks" src="foo.uppercase-rocks"></script> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks"></custom> -<template lang="uppercase-rocks" src></template> -<template lang="uppercase-rocks" src=""></template> -<template lang="uppercase-rocks" src>PrEtTiEr</template> -<template lang="uppercase-rocks" src="">PrEtTiEr</template> -<template lang="uppercase-rocks" src> - - </template> -<template lang="uppercase-rocks" src=""> - - </template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks"> -PrEtTiEr -</template> - -<template lang="uppercase-rocks" :src=""> -PRETTIER -</template> -<template lang="uppercase-rocks" @src=""> -PRETTIER -</template> - -<template lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<style lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<script lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<custom lang="uppercase-rocks" src="foo.uppercase-rocks" /> -<custom lang="uppercase-rocks" src /> -<template lang="uppercase-rocks" src="" /> - -================================================================================ -`; diff --git a/tests/format/vue/with-plugins/format.test.js b/tests/format/vue/with-plugins/format.test.js new file mode 100644 index 000000000000..810f262ccfff --- /dev/null +++ b/tests/format/vue/with-plugins/format.test.js @@ -0,0 +1,11 @@ +const plugins = await Promise.all( + [ + "../../../config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js", + ].map(async (plugin) => (await import(plugin)).default), +); + +runFormatTest(import.meta, ["vue"], { plugins }); +runFormatTest(import.meta, ["vue"], { + plugins, + embeddedLanguageFormatting: "off", +}); diff --git a/tests/format/vue/with-plugins/jsfmt.spec.js b/tests/format/vue/with-plugins/jsfmt.spec.js deleted file mode 100644 index 3a210855690f..000000000000 --- a/tests/format/vue/with-plugins/jsfmt.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -const plugins = [ - require("../../../config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js"), - require("../../../config/prettier-plugins/prettier-plugin-dummy-stylus/index.cjs"), -]; - -run_spec(__dirname, ["vue"], { plugins }); -run_spec(__dirname, ["vue"], { plugins, embeddedLanguageFormatting: "off" }); diff --git a/tests/format/vue/with-plugins/style-lang.vue b/tests/format/vue/with-plugins/style-lang.vue index 4996e4d30f76..ca88524501f8 100644 --- a/tests/format/vue/with-plugins/style-lang.vue +++ b/tests/format/vue/with-plugins/style-lang.vue @@ -1,11 +1,5 @@ <style lang="uppercase-rocks"> -/* Should not be uppercased */ +/* Should be uppercased */ hello, world! </style> - -<style lang="stylus"> -/* Should insert a comment above this line */ -a - color blue; -</style> diff --git a/tests/format/yaml/alias/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/alias/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/alias/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/alias/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/alias/format.test.js b/tests/format/yaml/alias/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/alias/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/alias/jsfmt.spec.js b/tests/format/yaml/alias/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/alias/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/ansible/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/ansible/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/ansible/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/ansible/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/ansible/format.test.js b/tests/format/yaml/ansible/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/ansible/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/ansible/jsfmt.spec.js b/tests/format/yaml/ansible/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/ansible/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/block-folded/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/block-folded/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/block-folded/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/block-folded/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/block-folded/format.test.js b/tests/format/yaml/block-folded/format.test.js new file mode 100644 index 000000000000..53b7e02d8d87 --- /dev/null +++ b/tests/format/yaml/block-folded/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/block-folded/jsfmt.spec.js b/tests/format/yaml/block-folded/jsfmt.spec.js deleted file mode 100644 index bedc8dbb953c..000000000000 --- a/tests/format/yaml/block-folded/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/block-literal/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/block-literal/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/block-literal/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/block-literal/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/block-literal/format.test.js b/tests/format/yaml/block-literal/format.test.js new file mode 100644 index 000000000000..9dd47f545c4f --- /dev/null +++ b/tests/format/yaml/block-literal/format.test.js @@ -0,0 +1,19 @@ +import { outdent } from "outdent"; + +const snippets = [ + { + code: outdent` + block_with_ideographic_space: | + \u{3000}x + `, + output: outdent` + block_with_ideographic_space: | + \u{3000}x + `, + }, +].map((test) => ({ ...test, output: test.output + "\n" })); + +runFormatTest({ importMeta: import.meta, snippets }, ["yaml"]); +runFormatTest({ importMeta: import.meta, snippets }, ["yaml"], { + proseWrap: "always", +}); diff --git a/tests/format/yaml/block-literal/jsfmt.spec.js b/tests/format/yaml/block-literal/jsfmt.spec.js deleted file mode 100644 index 0c58d76174eb..000000000000 --- a/tests/format/yaml/block-literal/jsfmt.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -const { outdent } = require("outdent"); - -const snippets = [ - { - code: outdent` - block_with_ideographic_space: | - \u{3000}x - `, - output: outdent` - block_with_ideographic_space: | - \u{3000}x - `, - }, -].map((test) => ({ ...test, output: test.output + "\n" })); - -run_spec({ dirname: __dirname, snippets }, ["yaml"]); -run_spec({ dirname: __dirname, snippets }, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/comment/__snapshots__/format.test.js.snap b/tests/format/yaml/comment/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..c30efb37fc9c --- /dev/null +++ b/tests/format/yaml/comment/__snapshots__/format.test.js.snap @@ -0,0 +1,681 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`collection.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +a: # a.trailingComment + 123 + # implicitMappingValue + +? b + # explicitMappingKey +: c + # explicitMappingValue + +d: + - 123 + # sequence + +e: + - 123 + # sequenceItem + +f: + - a + # b.leadingComments + - b + # b.endComments + - c + # c.endComments + # sequence.endComments +# documentBody.children + +empty_content: + # hello world + +=====================================output===================================== +a: # a.trailingComment + 123 + # implicitMappingValue + +? b + # explicitMappingKey +: c + # explicitMappingValue + +d: + - 123 + # sequence + +e: + - 123 + # sequenceItem + +f: + - a + # b.leadingComments + - b + # b.endComments + - c + # c.endComments + # sequence.endComments +# documentBody.children + +empty_content: + # hello world + +================================================================================ +`; + +exports[`end-comment.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +parent: + one: 1 + # two: 2 + +a: + b: + #b + #a + +A: + B: + #A + #A + +=====================================output===================================== +parent: + one: 1 + # two: 2 + +a: + b: + #b + #a + +A: + B: + #A + #A + +================================================================================ +`; + +exports[`flow-sequence-mapping.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== + a: + [ + check-format, check-lint, + check-spelling, + # coverage, + # install-and-run-from-git, + ] + + b: + { + a: check-format, b: check-lint, + c: check-spelling, + # d: coverage, + # e: install-and-run-from-git, + } + + d: + # prettier-ignore + [ + check-format, check-lint, + check-spelling, + # coverage, + # install-and-run-from-git, + ] + + e: + # prettier-ignore + { + a: check-format, b: check-lint, + c: check-spelling, + # d: coverage, + # e: install-and-run-from-git, + } + +=====================================output===================================== +a: [ + check-format, + check-lint, + check-spelling, + # coverage, + # install-and-run-from-git, + ] + +b: { + a: check-format, + b: check-lint, + c: check-spelling, + # d: coverage, + # e: install-and-run-from-git, + } + +d: + # prettier-ignore + [ + check-format, check-lint, + check-spelling, + # coverage, + # install-and-run-from-git, + ] + +e: + # prettier-ignore + { + a: check-format, b: check-lint, + c: check-spelling, + # d: coverage, + # e: install-and-run-from-git, + } + +================================================================================ +`; + +exports[`in-empty-item-without-newlline.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +a: + #123 +=====================================output===================================== +a: + #123 + +================================================================================ +`; + +exports[`issue-8378.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +# --- comments --- + +=====================================output===================================== +# --- comments --- + +================================================================================ +`; + +exports[`issue-9130.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +- foo: 0 + bar: 1 + + # baz: 2 +- quux: 3 + +- foo: 0 + bar: 1 + + # baz: 2 + + # baz: 3 +- quux: 3 + +=====================================output===================================== +- foo: 0 + bar: 1 + + # baz: 2 +- quux: 3 + +- foo: 0 + bar: 1 + + # baz: 2 + + # baz: 3 +- quux: 3 + +================================================================================ +`; + +exports[`issue-16074.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- +myDict: {} + # exampleKey1: value + # exampleKey2: value + +myList: [] + # - name: example + # value: example + +myOtherMap: + 1: example + 2: example + # 3: example + +myOtherList: + - example1 + - example2 + # - example3 + +=====================================output===================================== +--- +myDict: {} + # exampleKey1: value + # exampleKey2: value + +myList: [] + # - name: example + # value: example + +myOtherMap: + 1: example + 2: example + # 3: example + +myOtherList: + - example1 + - example2 + # - example3 + +================================================================================ +`; + +exports[`map.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo1: + - foo: item1 + bar: item1 + + # - foo: item2 + # bar: item2 + + # - foo: item3 + # bar: item3 + + - foo: item4 + bar: item4 + +foo2: + - foo: item11 + bar: item11 + + # - foo: item22 + # bar: item22 + + # - foo: item33 + # bar: item33 + +=====================================output===================================== +foo1: + - foo: item1 + bar: item1 + + # - foo: item2 + # bar: item2 + + # - foo: item3 + # bar: item3 + + - foo: item4 + bar: item4 + +foo2: + - foo: item11 + bar: item11 + + # - foo: item22 + # bar: item22 + + # - foo: item33 + # bar: item33 + +================================================================================ +`; + +exports[`map-2.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo1: + - foo + + # - foo + + # - foo + + - foo + +foo2: + - foo2 + + # - foo2 + + + + + + + # - foo2 + # - foo2 + +=====================================output===================================== +foo1: + - foo + + # - foo + + # - foo + + - foo + +foo2: + - foo2 + + # - foo2 + + # - foo2 + # - foo2 + +================================================================================ +`; + +exports[`map-3.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +foo1: + - foo + + # - foo + + # - foo + + - foo + +foo2: + - foo2 + + # first line + # next line + +=====================================output===================================== +foo1: + - foo + + # - foo + + # - foo + + - foo + +foo2: + - foo2 + + # first line + # next line + +================================================================================ +`; + +exports[`map-4.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +before: + + # before.comment +after: + # after.comment + +before-after: + + # before-after.comment + +none: + # none.comment +before(2 line): + + + # before.comment +after(2 line): + # after.comment + + +before-after(2 line): + + + # before-after.comment + + +none(2): + # none.comment +=====================================output===================================== +before: + + # before.comment +after: + # after.comment + +before-after: + + # before-after.comment + +none: + # none.comment +before(2 line): + + # before.comment +after(2 line): + # after.comment + +before-after(2 line): + + # before-after.comment + +none(2): + # none.comment + +================================================================================ +`; + +exports[`object.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +#6445 + +obj: + # before + + + # before + + + key: value + + + # after + + + # after + +=====================================output===================================== +#6445 + +obj: + # before + + # before + + key: value + + # after + + # after + +================================================================================ +`; + +exports[`root.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +#hello world + +=====================================output===================================== +#hello world + +================================================================================ +`; + +exports[`sequence.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +- - a + + # - b + + # - c + + - e + +- - a + + # - b + + # - c + +=====================================output===================================== +- - a + + # - b + + # - c + + - e + +- - a + + # - b + + # - c + +================================================================================ +`; + +exports[`sequence-2.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +- before + + # before.comment +- after + # after.comment + +- before-after + + # before-after.comment + +- none: + # none.comment +- before(2 line) + + + # before.comment +- after(2 line) + # after.comment + + +- before-after(2 line) + + + # before-after.comment + + +- none(2) + # none.comment +=====================================output===================================== +- before + + # before.comment +- after + # after.comment + +- before-after + + # before-after.comment + +- none: + # none.comment +- before(2 line) + + # before.comment +- after(2 line) + # after.comment + +- before-after(2 line) + + # before-after.comment + +- none(2) + # none.comment + +================================================================================ +`; + +exports[`set.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +- 123 + # 456 + +=====================================output===================================== +- 123 + # 456 + +================================================================================ +`; diff --git a/tests/format/yaml/comment/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/comment/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index db44b1163099..000000000000 --- a/tests/format/yaml/comment/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,633 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`collection.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -a: # a.trailingComment - 123 - # implicitMappingValue - -? b - # explicitMappingKey -: c - # explicitMappingValue - -d: - - 123 - # sequence - -e: - - 123 - # sequenceItem - -f: - - a - # b.leadingComments - - b - # b.endComments - - c - # c.endComments - # sequence.endComments -# documentBody.children - -empty_content: - # hello world - -=====================================output===================================== -a: # a.trailingComment - 123 - # implicitMappingValue - -? b - # explicitMappingKey -: c - # explicitMappingValue - -d: - - 123 - # sequence - -e: - - 123 - # sequenceItem - -f: - - a - # b.leadingComments - - b - # b.endComments - - c - # c.endComments - # sequence.endComments -# documentBody.children - -empty_content: - # hello world - -================================================================================ -`; - -exports[`end-comment.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -parent: - one: 1 - # two: 2 - -a: - b: - #b - #a - -A: - B: - #A - #A - -=====================================output===================================== -parent: - one: 1 - # two: 2 - -a: - b: - #b - #a - -A: - B: - #A - #A - -================================================================================ -`; - -exports[`flow-sequence-mapping.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== - a: - [ - check-format, check-lint, - check-spelling, - # coverage, - # install-and-run-from-git, - ] - - b: - { - a: check-format, b: check-lint, - c: check-spelling, - # d: coverage, - # e: install-and-run-from-git, - } - - d: - # prettier-ignore - [ - check-format, check-lint, - check-spelling, - # coverage, - # install-and-run-from-git, - ] - - e: - # prettier-ignore - { - a: check-format, b: check-lint, - c: check-spelling, - # d: coverage, - # e: install-and-run-from-git, - } - -=====================================output===================================== -a: [ - check-format, - check-lint, - check-spelling, - # coverage, - # install-and-run-from-git, - ] - -b: { - a: check-format, - b: check-lint, - c: check-spelling, - # d: coverage, - # e: install-and-run-from-git, - } - -d: - # prettier-ignore - [ - check-format, check-lint, - check-spelling, - # coverage, - # install-and-run-from-git, - ] - -e: - # prettier-ignore - { - a: check-format, b: check-lint, - c: check-spelling, - # d: coverage, - # e: install-and-run-from-git, - } - -================================================================================ -`; - -exports[`in-empty-item-without-newlline.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -a: - #123 -=====================================output===================================== -a: - #123 - -================================================================================ -`; - -exports[`issue-8378.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -# --- comments --- - -=====================================output===================================== -# --- comments --- - -================================================================================ -`; - -exports[`issue-9130.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -- foo: 0 - bar: 1 - - # baz: 2 -- quux: 3 - -- foo: 0 - bar: 1 - - # baz: 2 - - # baz: 3 -- quux: 3 - -=====================================output===================================== -- foo: 0 - bar: 1 - - # baz: 2 -- quux: 3 - -- foo: 0 - bar: 1 - - # baz: 2 - - # baz: 3 -- quux: 3 - -================================================================================ -`; - -exports[`map.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo1: - - foo: item1 - bar: item1 - - # - foo: item2 - # bar: item2 - - # - foo: item3 - # bar: item3 - - - foo: item4 - bar: item4 - -foo2: - - foo: item11 - bar: item11 - - # - foo: item22 - # bar: item22 - - # - foo: item33 - # bar: item33 - -=====================================output===================================== -foo1: - - foo: item1 - bar: item1 - - # - foo: item2 - # bar: item2 - - # - foo: item3 - # bar: item3 - - - foo: item4 - bar: item4 - -foo2: - - foo: item11 - bar: item11 - - # - foo: item22 - # bar: item22 - - # - foo: item33 - # bar: item33 - -================================================================================ -`; - -exports[`map-2.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo1: - - foo - - # - foo - - # - foo - - - foo - -foo2: - - foo2 - - # - foo2 - - - - - - - # - foo2 - # - foo2 - -=====================================output===================================== -foo1: - - foo - - # - foo - - # - foo - - - foo - -foo2: - - foo2 - - # - foo2 - - # - foo2 - # - foo2 - -================================================================================ -`; - -exports[`map-3.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -foo1: - - foo - - # - foo - - # - foo - - - foo - -foo2: - - foo2 - - # first line - # next line - -=====================================output===================================== -foo1: - - foo - - # - foo - - # - foo - - - foo - -foo2: - - foo2 - - # first line - # next line - -================================================================================ -`; - -exports[`map-4.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -before: - - # before.comment -after: - # after.comment - -before-after: - - # before-after.comment - -none: - # none.comment -before(2 line): - - - # before.comment -after(2 line): - # after.comment - - -before-after(2 line): - - - # before-after.comment - - -none(2): - # none.comment -=====================================output===================================== -before: - - # before.comment -after: - # after.comment - -before-after: - - # before-after.comment - -none: - # none.comment -before(2 line): - - # before.comment -after(2 line): - # after.comment - -before-after(2 line): - - # before-after.comment - -none(2): - # none.comment - -================================================================================ -`; - -exports[`object.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -#6445 - -obj: - # before - - - # before - - - key: value - - - # after - - - # after - -=====================================output===================================== -#6445 - -obj: - # before - - # before - - key: value - - # after - - # after - -================================================================================ -`; - -exports[`root.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -#hello world - -=====================================output===================================== -#hello world - -================================================================================ -`; - -exports[`sequence.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -- - a - - # - b - - # - c - - - e - -- - a - - # - b - - # - c - -=====================================output===================================== -- - a - - # - b - - # - c - - - e - -- - a - - # - b - - # - c - -================================================================================ -`; - -exports[`sequence-2.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -- before - - # before.comment -- after - # after.comment - -- before-after - - # before-after.comment - -- none: - # none.comment -- before(2 line) - - - # before.comment -- after(2 line) - # after.comment - - -- before-after(2 line) - - - # before-after.comment - - -- none(2) - # none.comment -=====================================output===================================== -- before - - # before.comment -- after - # after.comment - -- before-after - - # before-after.comment - -- none: - # none.comment -- before(2 line) - - # before.comment -- after(2 line) - # after.comment - -- before-after(2 line) - - # before-after.comment - -- none(2) - # none.comment - -================================================================================ -`; - -exports[`set.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -- 123 - # 456 - -=====================================output===================================== -- 123 - # 456 - -================================================================================ -`; diff --git a/tests/format/yaml/comment/format.test.js b/tests/format/yaml/comment/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/comment/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/comment/issue-16074.yml b/tests/format/yaml/comment/issue-16074.yml new file mode 100644 index 000000000000..a7ec10f960d7 --- /dev/null +++ b/tests/format/yaml/comment/issue-16074.yml @@ -0,0 +1,18 @@ +--- +myDict: {} + # exampleKey1: value + # exampleKey2: value + +myList: [] + # - name: example + # value: example + +myOtherMap: + 1: example + 2: example + # 3: example + +myOtherList: + - example1 + - example2 + # - example3 diff --git a/tests/format/yaml/comment/jsfmt.spec.js b/tests/format/yaml/comment/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/comment/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/directive/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/directive/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/directive/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/directive/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/directive/format.test.js b/tests/format/yaml/directive/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/directive/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/directive/jsfmt.spec.js b/tests/format/yaml/directive/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/directive/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/document/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/document/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/document/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/document/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/document/format.test.js b/tests/format/yaml/document/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/document/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/document/jsfmt.spec.js b/tests/format/yaml/document/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/document/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/flow-mapping/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/flow-mapping/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/flow-mapping/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/flow-mapping/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/flow-mapping/format.test.js b/tests/format/yaml/flow-mapping/format.test.js new file mode 100644 index 000000000000..d1f6bd22e933 --- /dev/null +++ b/tests/format/yaml/flow-mapping/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { tabWidth: 4 }); +runFormatTest(import.meta, ["yaml"], { bracketSpacing: false }); diff --git a/tests/format/yaml/flow-mapping/jsfmt.spec.js b/tests/format/yaml/flow-mapping/jsfmt.spec.js deleted file mode 100644 index 755b6ecb2817..000000000000 --- a/tests/format/yaml/flow-mapping/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { tabWidth: 4 }); -run_spec(__dirname, ["yaml"], { bracketSpacing: false }); diff --git a/tests/format/yaml/flow-mapping/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/flow-mapping/trailing-comma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/flow-mapping/trailing-comma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/flow-mapping/trailing-comma/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/flow-mapping/trailing-comma/format.test.js b/tests/format/yaml/flow-mapping/trailing-comma/format.test.js new file mode 100644 index 000000000000..02ba5b27a67c --- /dev/null +++ b/tests/format/yaml/flow-mapping/trailing-comma/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { trailingComma: "none" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/flow-mapping/trailing-comma/jsfmt.spec.js b/tests/format/yaml/flow-mapping/trailing-comma/jsfmt.spec.js deleted file mode 100644 index 6bdc1ebe60bf..000000000000 --- a/tests/format/yaml/flow-mapping/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { trailingComma: "none" }); -run_spec(__dirname, ["yaml"], { trailingComma: "es5" }); -run_spec(__dirname, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/flow-sequence/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/flow-sequence/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/flow-sequence/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/flow-sequence/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/flow-sequence/format.test.js b/tests/format/yaml/flow-sequence/format.test.js new file mode 100644 index 000000000000..d1f6bd22e933 --- /dev/null +++ b/tests/format/yaml/flow-sequence/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { tabWidth: 4 }); +runFormatTest(import.meta, ["yaml"], { bracketSpacing: false }); diff --git a/tests/format/yaml/flow-sequence/jsfmt.spec.js b/tests/format/yaml/flow-sequence/jsfmt.spec.js deleted file mode 100644 index 755b6ecb2817..000000000000 --- a/tests/format/yaml/flow-sequence/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { tabWidth: 4 }); -run_spec(__dirname, ["yaml"], { bracketSpacing: false }); diff --git a/tests/format/yaml/flow-sequence/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/flow-sequence/trailing-comma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/flow-sequence/trailing-comma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/flow-sequence/trailing-comma/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/flow-sequence/trailing-comma/format.test.js b/tests/format/yaml/flow-sequence/trailing-comma/format.test.js new file mode 100644 index 000000000000..02ba5b27a67c --- /dev/null +++ b/tests/format/yaml/flow-sequence/trailing-comma/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { trailingComma: "none" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/flow-sequence/trailing-comma/jsfmt.spec.js b/tests/format/yaml/flow-sequence/trailing-comma/jsfmt.spec.js deleted file mode 100644 index 6bdc1ebe60bf..000000000000 --- a/tests/format/yaml/flow-sequence/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { trailingComma: "none" }); -run_spec(__dirname, ["yaml"], { trailingComma: "es5" }); -run_spec(__dirname, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/home-assistant/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/home-assistant/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/home-assistant/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/home-assistant/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/home-assistant/format.test.js b/tests/format/yaml/home-assistant/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/home-assistant/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/home-assistant/jsfmt.spec.js b/tests/format/yaml/home-assistant/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/home-assistant/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/inline-extend-syntax/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/inline-extend-syntax/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/inline-extend-syntax/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/inline-extend-syntax/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/inline-extend-syntax/format.test.js b/tests/format/yaml/inline-extend-syntax/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/inline-extend-syntax/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/inline-extend-syntax/jsfmt.spec.js b/tests/format/yaml/inline-extend-syntax/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/inline-extend-syntax/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/insert-pragma/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/insert-pragma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/insert-pragma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/insert-pragma/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/insert-pragma/format.test.js b/tests/format/yaml/insert-pragma/format.test.js new file mode 100644 index 000000000000..17c1abaf8cd9 --- /dev/null +++ b/tests/format/yaml/insert-pragma/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"], { insertPragma: true }); diff --git a/tests/format/yaml/insert-pragma/jsfmt.spec.js b/tests/format/yaml/insert-pragma/jsfmt.spec.js deleted file mode 100644 index 06adadff2c85..000000000000 --- a/tests/format/yaml/insert-pragma/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"], { insertPragma: true }); diff --git a/tests/format/yaml/json/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/json/trailing-comma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/json/trailing-comma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/json/trailing-comma/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/json/trailing-comma/format.test.js b/tests/format/yaml/json/trailing-comma/format.test.js new file mode 100644 index 000000000000..02ba5b27a67c --- /dev/null +++ b/tests/format/yaml/json/trailing-comma/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { trailingComma: "none" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "es5" }); +runFormatTest(import.meta, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/json/trailing-comma/jsfmt.spec.js b/tests/format/yaml/json/trailing-comma/jsfmt.spec.js deleted file mode 100644 index 6bdc1ebe60bf..000000000000 --- a/tests/format/yaml/json/trailing-comma/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { trailingComma: "none" }); -run_spec(__dirname, ["yaml"], { trailingComma: "es5" }); -run_spec(__dirname, ["yaml"], { trailingComma: "all" }); diff --git a/tests/format/yaml/mapping/__snapshots__/format.test.js.snap b/tests/format/yaml/mapping/__snapshots__/format.test.js.snap new file mode 100644 index 000000000000..aed27f30a5fc --- /dev/null +++ b/tests/format/yaml/mapping/__snapshots__/format.test.js.snap @@ -0,0 +1,863 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`3-style.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +=====================================output===================================== +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +? [ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + ] +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +================================================================================ +`; + +exports[`3-style.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +=====================================output===================================== +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +? [ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + ] +: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +================================================================================ +`; + +exports[`anchor.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key1: &default + + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`anchor.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key1: &default + + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`anchor2.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key1: &default + + # This key ... + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default # This key ... + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`anchor2.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key1: &default + + # This key ... + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default # This key ... + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`anchor3.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key1: &default +# This key + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default # This key + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`anchor3.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key1: &default +# This key + subkey1: value1 + +key2: + <<: *default + +=====================================output===================================== +key1: &default # This key + subkey1: value1 + +key2: + <<: *default + +================================================================================ +`; + +exports[`array-key.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +[1, 2, 3]: 123 + +=====================================output===================================== +[1, 2, 3]: 123 + +================================================================================ +`; + +exports[`array-key.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +[1, 2, 3]: 123 + +=====================================output===================================== +[1, 2, 3]: 123 + +================================================================================ +`; + +exports[`array-value.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +123: [1, 2, 3] + +=====================================output===================================== +123: [1, 2, 3] + +================================================================================ +`; + +exports[`array-value.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +123: [1, 2, 3] + +=====================================output===================================== +123: [1, 2, 3] + +================================================================================ +`; + +exports[`comment.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +? key +# comment +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +=====================================output===================================== +? key +# comment +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +================================================================================ +`; + +exports[`comment.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +? key +# comment +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +=====================================output===================================== +? key +# comment +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +================================================================================ +`; + +exports[`comment-value.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +123: # hello + +=====================================output===================================== +123: # hello + +================================================================================ +`; + +exports[`comment-value.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +123: # hello + +=====================================output===================================== +123: # hello + +================================================================================ +`; + +exports[`comment-value-align.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +123: # hello + # comment + +=====================================output===================================== +123: # hello + # comment + +================================================================================ +`; + +exports[`comment-value-align.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +123: # hello + # comment + +=====================================output===================================== +123: # hello + # comment + +================================================================================ +`; + +exports[`common.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +=====================================output===================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +================================================================================ +`; + +exports[`common.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +=====================================output===================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong + +================================================================================ +`; + +exports[`explicit-key.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +? key1 +: value +? key2 +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +? longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +: value +? solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +: # Comment + foo: bar +? multiline + scalar + key +: value + +=====================================output===================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: value +solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: + # Comment + foo: bar +? multiline + scalar + key +: value + +================================================================================ +`; + +exports[`explicit-key.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +? key1 +: value +? key2 +: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +? longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +: value +? solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +: # Comment + foo: bar +? multiline + scalar + key +: value + +=====================================output===================================== +key1: value +key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong +longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: value +solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: + # Comment + foo: bar +? multiline + scalar + key +: value + +================================================================================ +`; + +exports[`in-sequence.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +- a: b + c: d + +=====================================output===================================== +- a: b + c: d + +================================================================================ +`; + +exports[`in-sequence.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +- a: b + c: d + +=====================================output===================================== +- a: b + c: d + +================================================================================ +`; + +exports[`key-with-leading-comment.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +? # comment + key +: value + +=====================================output===================================== +? # comment + key +: value + +================================================================================ +`; + +exports[`key-with-leading-comment.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +? # comment + key +: value + +=====================================output===================================== +? # comment + key +: value + +================================================================================ +`; + +exports[`mapping.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key: + key: value + +=====================================output===================================== +key: + key: value + +================================================================================ +`; + +exports[`mapping.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key: + key: value + +=====================================output===================================== +key: + key: value + +================================================================================ +`; + +exports[`merge-twice.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +.anchors: + - &anchor1 + key: value + - &anchor2 + another: prop + +foo: + bar: baz + <<: *anchor1 + <<: *anchor2 + +=====================================output===================================== +.anchors: + - &anchor1 + key: value + - &anchor2 + another: prop + +foo: + bar: baz + <<: *anchor1 + <<: *anchor2 + +================================================================================ +`; + +exports[`merge-twice.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +.anchors: + - &anchor1 + key: value + - &anchor2 + another: prop + +foo: + bar: baz + <<: *anchor1 + <<: *anchor2 + +=====================================output===================================== +.anchors: + - &anchor1 + key: value + - &anchor2 + another: prop + +foo: + bar: baz + <<: *anchor1 + <<: *anchor2 + +================================================================================ +`; + +exports[`middle-comment.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +!!map # comment +a: 123 + +=====================================output===================================== +!!map # comment +a: 123 + +================================================================================ +`; + +exports[`middle-comment.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +!!map # comment +a: 123 + +=====================================output===================================== +!!map # comment +a: 123 + +================================================================================ +`; + +exports[`middle-comments.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +!!map # comment 1 +# comment 2 +a: 123 + +=====================================output===================================== +!!map +# comment 1 +# comment 2 +a: 123 + +================================================================================ +`; + +exports[`middle-comments.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +!!map # comment 1 +# comment 2 +a: 123 + +=====================================output===================================== +!!map +# comment 1 +# comment 2 +a: 123 + +================================================================================ +`; + +exports[`props.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +--- !!map &anchor +a: 123 + +=====================================output===================================== +--- +!!map &anchor +a: 123 + +================================================================================ +`; + +exports[`props.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +--- !!map &anchor +a: 123 + +=====================================output===================================== +--- +!!map &anchor +a: 123 + +================================================================================ +`; + +exports[`props-in-map.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +a: !!map &anchor + a: 123 + +=====================================output===================================== +a: !!map &anchor + a: 123 + +================================================================================ +`; + +exports[`props-in-map.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +a: !!map &anchor + a: 123 + +=====================================output===================================== +a: !!map &anchor + a: 123 + +================================================================================ +`; + +exports[`quote-key.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +"a": 123 +'b': 123 + +=====================================output===================================== +"a": 123 +"b": 123 + +================================================================================ +`; + +exports[`quote-key.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +"a": 123 +'b': 123 + +=====================================output===================================== +"a": 123 +"b": 123 + +================================================================================ +`; + +exports[`sequence.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +key: +- value + +=====================================output===================================== +key: + - value + +================================================================================ +`; + +exports[`sequence.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +key: +- value + +=====================================output===================================== +key: + - value + +================================================================================ +`; + +exports[`tag-key.yml - {"tabWidth":4} format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 +tabWidth: 4 + | printWidth +=====================================input====================================== +? !!tag key +: value + +=====================================output===================================== +!!tag key: value + +================================================================================ +`; + +exports[`tag-key.yml format 1`] = ` +====================================options===================================== +parsers: ["yaml"] +printWidth: 80 + | printWidth +=====================================input====================================== +? !!tag key +: value + +=====================================output===================================== +!!tag key: value + +================================================================================ +`; diff --git a/tests/format/yaml/mapping/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/mapping/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index ffb14a8ab951..000000000000 --- a/tests/format/yaml/mapping/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,830 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`3-style.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -=====================================output===================================== -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -? [ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - ] -: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -================================================================================ -`; - -exports[`3-style.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -=====================================output===================================== -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]: - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -? [ - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - ] -: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -================================================================================ -`; - -exports[`anchor.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key1: &default - - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`anchor.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key1: &default - - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`anchor2.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key1: &default - - # This key ... - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default # This key ... - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`anchor2.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key1: &default - - # This key ... - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default # This key ... - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`anchor3.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key1: &default -# This key - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default # This key - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`anchor3.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key1: &default -# This key - subkey1: value1 - -key2: - <<: *default - -=====================================output===================================== -key1: &default # This key - subkey1: value1 - -key2: - <<: *default - -================================================================================ -`; - -exports[`array-key.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -[1, 2, 3]: 123 - -=====================================output===================================== -[1, 2, 3]: 123 - -================================================================================ -`; - -exports[`array-key.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -[1, 2, 3]: 123 - -=====================================output===================================== -[1, 2, 3]: 123 - -================================================================================ -`; - -exports[`array-value.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -123: [1, 2, 3] - -=====================================output===================================== -123: [1, 2, 3] - -================================================================================ -`; - -exports[`array-value.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -123: [1, 2, 3] - -=====================================output===================================== -123: [1, 2, 3] - -================================================================================ -`; - -exports[`comment.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -? key -# comment -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -=====================================output===================================== -? key -# comment -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -================================================================================ -`; - -exports[`comment.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -? key -# comment -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -=====================================output===================================== -? key -# comment -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -================================================================================ -`; - -exports[`comment-value.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -123: # hello - -=====================================output===================================== -123: # hello - -================================================================================ -`; - -exports[`comment-value.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -123: # hello - -=====================================output===================================== -123: # hello - -================================================================================ -`; - -exports[`common.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -=====================================output===================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -================================================================================ -`; - -exports[`common.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -=====================================output===================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong - -================================================================================ -`; - -exports[`explicit-key.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -? key1 -: value -? key2 -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -? longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -: value -? solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -: # Comment - foo: bar -? multiline - scalar - key -: value - -=====================================output===================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: value -solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: - # Comment - foo: bar -? multiline - scalar - key -: value - -================================================================================ -`; - -exports[`explicit-key.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -? key1 -: value -? key2 -: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -? longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -: value -? solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -: # Comment - foo: bar -? multiline - scalar - key -: value - -=====================================output===================================== -key1: value -key2: longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong -longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: value -solongitshouldbreakbutitcannot_longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong: - # Comment - foo: bar -? multiline - scalar - key -: value - -================================================================================ -`; - -exports[`in-sequence.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -- a: b - c: d - -=====================================output===================================== -- a: b - c: d - -================================================================================ -`; - -exports[`in-sequence.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -- a: b - c: d - -=====================================output===================================== -- a: b - c: d - -================================================================================ -`; - -exports[`key-with-leading-comment.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -? # comment - key -: value - -=====================================output===================================== -? # comment - key -: value - -================================================================================ -`; - -exports[`key-with-leading-comment.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -? # comment - key -: value - -=====================================output===================================== -? # comment - key -: value - -================================================================================ -`; - -exports[`mapping.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key: - key: value - -=====================================output===================================== -key: - key: value - -================================================================================ -`; - -exports[`mapping.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key: - key: value - -=====================================output===================================== -key: - key: value - -================================================================================ -`; - -exports[`merge-twice.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -.anchors: - - &anchor1 - key: value - - &anchor2 - another: prop - -foo: - bar: baz - <<: *anchor1 - <<: *anchor2 - -=====================================output===================================== -.anchors: - - &anchor1 - key: value - - &anchor2 - another: prop - -foo: - bar: baz - <<: *anchor1 - <<: *anchor2 - -================================================================================ -`; - -exports[`merge-twice.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -.anchors: - - &anchor1 - key: value - - &anchor2 - another: prop - -foo: - bar: baz - <<: *anchor1 - <<: *anchor2 - -=====================================output===================================== -.anchors: - - &anchor1 - key: value - - &anchor2 - another: prop - -foo: - bar: baz - <<: *anchor1 - <<: *anchor2 - -================================================================================ -`; - -exports[`middle-comment.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -!!map # comment -a: 123 - -=====================================output===================================== -!!map # comment -a: 123 - -================================================================================ -`; - -exports[`middle-comment.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -!!map # comment -a: 123 - -=====================================output===================================== -!!map # comment -a: 123 - -================================================================================ -`; - -exports[`middle-comments.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -!!map # comment 1 -# comment 2 -a: 123 - -=====================================output===================================== -!!map -# comment 1 -# comment 2 -a: 123 - -================================================================================ -`; - -exports[`middle-comments.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -!!map # comment 1 -# comment 2 -a: 123 - -=====================================output===================================== -!!map -# comment 1 -# comment 2 -a: 123 - -================================================================================ -`; - -exports[`props.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== ---- !!map &anchor -a: 123 - -=====================================output===================================== ---- -!!map &anchor -a: 123 - -================================================================================ -`; - -exports[`props.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== ---- !!map &anchor -a: 123 - -=====================================output===================================== ---- -!!map &anchor -a: 123 - -================================================================================ -`; - -exports[`props-in-map.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -a: !!map &anchor - a: 123 - -=====================================output===================================== -a: !!map &anchor - a: 123 - -================================================================================ -`; - -exports[`props-in-map.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -a: !!map &anchor - a: 123 - -=====================================output===================================== -a: !!map &anchor - a: 123 - -================================================================================ -`; - -exports[`quote-key.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -"a": 123 -'b': 123 - -=====================================output===================================== -"a": 123 -"b": 123 - -================================================================================ -`; - -exports[`quote-key.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -"a": 123 -'b': 123 - -=====================================output===================================== -"a": 123 -"b": 123 - -================================================================================ -`; - -exports[`sequence.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -key: -- value - -=====================================output===================================== -key: - - value - -================================================================================ -`; - -exports[`sequence.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -key: -- value - -=====================================output===================================== -key: - - value - -================================================================================ -`; - -exports[`tag-key.yml - {"tabWidth":4} format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 -tabWidth: 4 - | printWidth -=====================================input====================================== -? !!tag key -: value - -=====================================output===================================== -!!tag key: value - -================================================================================ -`; - -exports[`tag-key.yml format 1`] = ` -====================================options===================================== -parsers: ["yaml"] -printWidth: 80 - | printWidth -=====================================input====================================== -? !!tag key -: value - -=====================================output===================================== -!!tag key: value - -================================================================================ -`; diff --git a/tests/format/yaml/mapping/comment-value-align.yml b/tests/format/yaml/mapping/comment-value-align.yml new file mode 100644 index 000000000000..58cfb6489882 --- /dev/null +++ b/tests/format/yaml/mapping/comment-value-align.yml @@ -0,0 +1,2 @@ +123: # hello + # comment diff --git a/tests/format/yaml/mapping/format.test.js b/tests/format/yaml/mapping/format.test.js new file mode 100644 index 000000000000..3d682043ee27 --- /dev/null +++ b/tests/format/yaml/mapping/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { tabWidth: 4 }); diff --git a/tests/format/yaml/mapping/jsfmt.spec.js b/tests/format/yaml/mapping/jsfmt.spec.js deleted file mode 100644 index 6fbe16994ead..000000000000 --- a/tests/format/yaml/mapping/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { tabWidth: 4 }); diff --git a/tests/format/yaml/plain/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/plain/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/plain/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/plain/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/plain/format.test.js b/tests/format/yaml/plain/format.test.js new file mode 100644 index 000000000000..b77d9e6e0a32 --- /dev/null +++ b/tests/format/yaml/plain/format.test.js @@ -0,0 +1,3 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { proseWrap: "never" }); +runFormatTest(import.meta, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/plain/jsfmt.spec.js b/tests/format/yaml/plain/jsfmt.spec.js deleted file mode 100644 index 6d2ad095f4bc..000000000000 --- a/tests/format/yaml/plain/jsfmt.spec.js +++ /dev/null @@ -1,3 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { proseWrap: "never" }); -run_spec(__dirname, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/prettier-ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/prettier-ignore/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/prettier-ignore/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/prettier-ignore/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/prettier-ignore/format.test.js b/tests/format/yaml/prettier-ignore/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/prettier-ignore/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/prettier-ignore/jsfmt.spec.js b/tests/format/yaml/prettier-ignore/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/prettier-ignore/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/quote/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/quote/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/quote/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/quote/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/quote/format.test.js b/tests/format/yaml/quote/format.test.js new file mode 100644 index 000000000000..a0bf2e44329d --- /dev/null +++ b/tests/format/yaml/quote/format.test.js @@ -0,0 +1,4 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { singleQuote: true }); +runFormatTest(import.meta, ["yaml"], { proseWrap: "never" }); +runFormatTest(import.meta, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/quote/jsfmt.spec.js b/tests/format/yaml/quote/jsfmt.spec.js deleted file mode 100644 index 43b247bd0d7f..000000000000 --- a/tests/format/yaml/quote/jsfmt.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { singleQuote: true }); -run_spec(__dirname, ["yaml"], { proseWrap: "never" }); -run_spec(__dirname, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/require-pragma/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/require-pragma/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/require-pragma/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/require-pragma/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/require-pragma/format.test.js b/tests/format/yaml/require-pragma/format.test.js new file mode 100644 index 000000000000..86f06653fa2e --- /dev/null +++ b/tests/format/yaml/require-pragma/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"], { requirePragma: true }); diff --git a/tests/format/yaml/require-pragma/jsfmt.spec.js b/tests/format/yaml/require-pragma/jsfmt.spec.js deleted file mode 100644 index f219135fc82c..000000000000 --- a/tests/format/yaml/require-pragma/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"], { requirePragma: true }); diff --git a/tests/format/yaml/root/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/root/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/root/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/root/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/root/format.test.js b/tests/format/yaml/root/format.test.js new file mode 100644 index 000000000000..49e3f4bbfe1b --- /dev/null +++ b/tests/format/yaml/root/format.test.js @@ -0,0 +1 @@ +runFormatTest(import.meta, ["yaml"]); diff --git a/tests/format/yaml/root/jsfmt.spec.js b/tests/format/yaml/root/jsfmt.spec.js deleted file mode 100644 index 89d18c0073bd..000000000000 --- a/tests/format/yaml/root/jsfmt.spec.js +++ /dev/null @@ -1 +0,0 @@ -run_spec(__dirname, ["yaml"]); diff --git a/tests/format/yaml/sequence/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/sequence/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/sequence/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/sequence/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/sequence/format.test.js b/tests/format/yaml/sequence/format.test.js new file mode 100644 index 000000000000..3d682043ee27 --- /dev/null +++ b/tests/format/yaml/sequence/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["yaml"]); +runFormatTest(import.meta, ["yaml"], { tabWidth: 4 }); diff --git a/tests/format/yaml/sequence/jsfmt.spec.js b/tests/format/yaml/sequence/jsfmt.spec.js deleted file mode 100644 index 6fbe16994ead..000000000000 --- a/tests/format/yaml/sequence/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["yaml"]); -run_spec(__dirname, ["yaml"], { tabWidth: 4 }); diff --git a/tests/format/yaml/spec/__snapshots__/jsfmt.spec.js.snap b/tests/format/yaml/spec/__snapshots__/format.test.js.snap similarity index 100% rename from tests/format/yaml/spec/__snapshots__/jsfmt.spec.js.snap rename to tests/format/yaml/spec/__snapshots__/format.test.js.snap diff --git a/tests/format/yaml/spec/format.test.js b/tests/format/yaml/spec/format.test.js new file mode 100644 index 000000000000..36d29829801d --- /dev/null +++ b/tests/format/yaml/spec/format.test.js @@ -0,0 +1,2 @@ +runFormatTest(import.meta, ["yaml"], { useTabs: true }); +runFormatTest(import.meta, ["yaml"], { proseWrap: "always" }); diff --git a/tests/format/yaml/spec/jsfmt.spec.js b/tests/format/yaml/spec/jsfmt.spec.js deleted file mode 100644 index 0d5398694aa6..000000000000 --- a/tests/format/yaml/spec/jsfmt.spec.js +++ /dev/null @@ -1,2 +0,0 @@ -run_spec(__dirname, ["yaml"], { useTabs: true }); -run_spec(__dirname, ["yaml"], { proseWrap: "always" }); diff --git a/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap b/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap index 2dc09e6ea6e8..58cb29f51436 100644 --- a/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap +++ b/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap @@ -1,110 +1,102 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`allow overriding flags (stderr) 1`] = `""`; - -exports[`allow overriding flags (write) 1`] = `[]`; - -exports[`boolean flags do not swallow the next argument (stderr) 1`] = `""`; - -exports[`boolean flags do not swallow the next argument (stdout) 1`] = ` -"console.log('could be single quote and without semi'); -" +exports[`allow overriding flags 1`] = ` +{ + "stderr": "", + "write": [], +} `; -exports[`boolean flags do not swallow the next argument (write) 1`] = `[]`; - -exports[`deprecated option values are warned (stderr) 1`] = ` -"[warn] --jsx-bracket-same-line is deprecated. -" +exports[`boolean flags do not swallow the next argument 1`] = ` +{ + "stderr": "", + "stdout": "console.log('could be single quote and without semi');", + "write": [], +} `; -exports[`deprecated option values are warned (stdout) 1`] = ` -"console.log("could be single quote and without semi"); -" +exports[`deprecated option values are warned 1`] = ` +{ + "stderr": "[warn] --jsx-bracket-same-line is deprecated.", + "stdout": "console.log("could be single quote and without semi");", + "write": [], +} `; -exports[`deprecated option values are warned (write) 1`] = `[]`; - -exports[`negated options work (stderr) 1`] = `""`; - -exports[`negated options work (stdout) 1`] = ` -"console.log("could be single quote and without semi") -" +exports[`negated options work 1`] = ` +{ + "stderr": "", + "stdout": "console.log("could be single quote and without semi")", + "write": [], +} `; -exports[`negated options work (write) 1`] = `[]`; - -exports[`number file/dir (stdout) 1`] = ` -"1/file-in-dir-named-1.js -" +exports[`number file/dir 1`] = ` +{ + "stdout": "1/file-in-dir-named-1.js", +} `; -exports[`number file/dir (stdout) 2`] = ` -"2.2/file-in-dir-named-2.2.js -" +exports[`number file/dir 2`] = ` +{ + "stdout": "2.2/file-in-dir-named-2.2.js", +} `; -exports[`number file/dir (stdout) 3`] = ` -"3 -" +exports[`number file/dir 3`] = ` +{ + "stdout": "3", +} `; -exports[`number file/dir (stdout) 4`] = ` -"4.44 -" +exports[`number file/dir 4`] = ` +{ + "stdout": "4.44", +} `; -exports[`number file/dir (stdout) 5`] = ` -"1/file-in-dir-named-1.js +exports[`number file/dir 5`] = ` +{ + "stdout": "1/file-in-dir-named-1.js 2.2/file-in-dir-named-2.2.js 3 -4.44 -" -`; - -exports[`options with \`cliName\` should not allow to pass directly (stderr) 1`] = ` -"[warn] Ignored unknown option --filepath=file.js. -[error] No parser and no file path given, couldn't infer a parser. -" -`; - -exports[`options with \`cliName\` should not allow to pass directly (stdout) 1`] = ` -"prettier(); -" -`; - -exports[`options with \`cliName\` should not allow to pass directly (stdout) 2`] = `""`; - -exports[`unknown negated options are warned (stderr) 1`] = ` -"[warn] Ignored unknown option --no-unknown. -" +4.44", +} `; -exports[`unknown negated options are warned (stdout) 1`] = ` -"console.log("could be single quote and without semi"); -" +exports[`options with \`cliName\` should not allow to pass directly 1`] = ` +{ + "stdout": "prettier();", +} `; -exports[`unknown negated options are warned (write) 1`] = `[]`; - -exports[`unknown options are warned (stderr) 1`] = ` -"[warn] Ignored unknown option --unknown. -" +exports[`options with \`cliName\` should not allow to pass directly 2`] = ` +{ + "stderr": "[warn] Ignored unknown option --filepath=file.js. +[error] No parser and no file path given, couldn't infer a parser.", + "stdout": "", +} `; -exports[`unknown options are warned (stdout) 1`] = ` -"console.log("could be single quote and without semi"); -" +exports[`unknown negated options are warned 1`] = ` +{ + "stderr": "[warn] Ignored unknown option --no-unknown.", + "stdout": "console.log("could be single quote and without semi");", + "write": [], +} `; -exports[`unknown options are warned (write) 1`] = `[]`; - -exports[`unknown options not suggestion \`_\` (stderr) 1`] = ` -"[warn] Ignored unknown option -a. Did you mean -c? -" +exports[`unknown options are warned 1`] = ` +{ + "stderr": "[warn] Ignored unknown option --unknown.", + "stdout": "console.log("could be single quote and without semi");", + "write": [], +} `; -exports[`unknown options not suggestion \`_\` (stdout) 1`] = ` -"console.log("could be single quote and without semi"); -" +exports[`unknown options not suggestion \`_\` 1`] = ` +{ + "stderr": "[warn] Ignored unknown option -a. Did you mean -c?", + "stdout": "console.log("could be single quote and without semi");", +} `; diff --git a/tests/integration/__tests__/__snapshots__/check.js.snap b/tests/integration/__tests__/__snapshots__/check.js.snap index dff357f96360..39b0e8fb2fc5 100644 --- a/tests/integration/__tests__/__snapshots__/check.js.snap +++ b/tests/integration/__tests__/__snapshots__/check.js.snap @@ -1,45 +1,41 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`--checks should print the number of files that need formatting (stderr) 1`] = ` -"[warn] unformatted.js +exports[`--checks should print the number of files that need formatting 1`] = ` +{ + "stderr": "[warn] unformatted.js [warn] unformatted2.js -[warn] Code style issues found in 2 files. Forgot to run Prettier? -" +[warn] Code style issues found in 2 files. Run Prettier with --write to fix.", + "stdout": "Checking formatting...", + "write": [], +} `; -exports[`--checks should print the number of files that need formatting (stdout) 1`] = ` -"Checking formatting... -" +exports[`--checks works in CI just as in a non-TTY mode 1`] = ` +{ + "stderr": "[warn] unformatted.js +[warn] Code style issues found in the above file. Run Prettier with --write to fix.", + "stdout": "Checking formatting...", + "write": [], +} `; -exports[`--checks should print the number of files that need formatting (write) 1`] = `[]`; - -exports[`--checks works in CI just as in a non-TTY mode (stderr) 1`] = ` -"[warn] unformatted.js -[warn] Code style issues found in the above file. Forgot to run Prettier? -" -`; - -exports[`--checks works in CI just as in a non-TTY mode (stderr) 2`] = ` -"[warn] unformatted.js -[warn] Code style issues found in the above file. Forgot to run Prettier? -" +exports[`--checks works in CI just as in a non-TTY mode 2`] = ` +{ + "stderr": "[warn] unformatted.js +[warn] Code style issues found in the above file. Run Prettier with --write to fix.", + "stdout": "Checking formatting...", + "write": [], +} `; -exports[`--checks works in CI just as in a non-TTY mode (stdout) 1`] = ` -"Checking formatting... -" +exports[`checks stdin with --check 1`] = ` +{ + "write": [], +} `; -exports[`--checks works in CI just as in a non-TTY mode (stdout) 2`] = ` -"Checking formatting... -" +exports[`checks stdin with -c (alias for --check) 1`] = ` +{ + "write": [], +} `; - -exports[`--checks works in CI just as in a non-TTY mode (write) 1`] = `[]`; - -exports[`--checks works in CI just as in a non-TTY mode (write) 2`] = `[]`; - -exports[`checks stdin with --check (write) 1`] = `[]`; - -exports[`checks stdin with -c (alias for --check) (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/config-invalid.js.snap b/tests/integration/__tests__/__snapshots__/config-invalid.js.snap index 15556a9fa2fd..0723a9fdcbac 100644 --- a/tests/integration/__tests__/__snapshots__/config-invalid.js.snap +++ b/tests/integration/__tests__/__snapshots__/config-invalid.js.snap @@ -1,81 +1,97 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`resolves external configuration from package.json (stderr) 1`] = ` -"[error] Invalid configuration file \`syntax-error.js\`: THIS ERROR MESSAGE MUST COME FROM THIS syntax-error.js FILE -" +exports[`resolves external configuration from package.json 1`] = ` +{ + "stderr": "[error] Invalid configuration for file "<cli>/config-external-config-syntax-error/syntax-error.js": +[error] THIS ERROR MESSAGE MUST COME FROM THIS syntax-error.js FILE", + "stdout": "", + "write": [], +} `; -exports[`resolves external configuration from package.json (stdout) 1`] = `""`; - -exports[`resolves external configuration from package.json (write) 1`] = `[]`; - -exports[`show warning with kebab-case option key (stderr) 1`] = ` -"[warn] Ignored unknown option { "print-width": 3 }. Did you mean printWidth? -" +exports[`show warning with kebab-case option key 1`] = ` +{ + "stderr": "[warn] Ignored unknown option { "print-width": 3 }. Did you mean printWidth?", + "stdout": "", + "write": [], +} `; -exports[`show warning with kebab-case option key (stdout) 1`] = `""`; - -exports[`show warning with kebab-case option key (write) 1`] = `[]`; - -exports[`show warning with unknown option (stderr) 1`] = ` -"[warn] Ignored unknown option { hello: "world" }. -" +exports[`show warning with unknown option 1`] = ` +{ + "stderr": "[warn] Ignored unknown option { hello: "world" }.", + "stdout": "", + "write": [], +} `; -exports[`show warning with unknown option (stdout) 1`] = `""`; - -exports[`show warning with unknown option (write) 1`] = `[]`; - -exports[`throw error for unsupported extension (stderr) 1`] = ` -"[error] Invalid configuration file \`<cwd>/tests/integration/cli/config/invalid\`: No loader specified for extension ".unsupported" -" +exports[`throw error for unsupported extension 1`] = ` +{ + "stderr": "[error] Invalid configuration: +[error] No loader specified for extension ".unsupported"", + "stdout": "", + "write": [], +} `; -exports[`throw error for unsupported extension (stdout) 1`] = `""`; - -exports[`throw error for unsupported extension (write) 1`] = `[]`; - -exports[`throw error with invalid config format (stdout) 1`] = `""`; - -exports[`throw error with invalid config format (stdout) 2`] = `""`; - -exports[`throw error with invalid config format (write) 1`] = `[]`; - -exports[`throw error with invalid config format (write) 2`] = `[]`; - -exports[`throw error with invalid config option (int) (stderr) 1`] = ` -"[error] Invalid tabWidth value. Expected an integer, but received 0.5. -" +exports[`throw error if both --config and --no-config are submitted 1`] = ` +{ + "stderr": "[error] Cannot use --no-config and --config together.", +} `; -exports[`throw error with invalid config option (int) (stdout) 1`] = `""`; - -exports[`throw error with invalid config option (int) (write) 1`] = `[]`; - -exports[`throw error with invalid config option (trailingComma) (stderr) 1`] = ` -"[error] Invalid trailingComma value. Expected "all", "es5" or "none", but received "wow". -" +exports[`throw error if both --config and --no-config are submitted 2`] = ` +{ + "stderr": "[error] Cannot use --no-config and --config together.", +} `; -exports[`throw error with invalid config option (trailingComma) (stdout) 1`] = `""`; - -exports[`throw error with invalid config option (trailingComma) (write) 1`] = `[]`; - -exports[`throw error with invalid config precedence option (configPrecedence) (stderr) 1`] = ` -"[error] Invalid --config-precedence value. Expected "cli-override", "file-override" or "prefer-file", but received "option/configPrecedence". -" +exports[`throw error with invalid config format 1`] = ` +{ + "stdout": "", + "write": [], +} `; -exports[`throw error with invalid config precedence option (configPrecedence) (stdout) 1`] = `""`; +exports[`throw error with invalid config format 2`] = ` +{ + "stdout": "", + "write": [], +} +`; -exports[`throw error with invalid config precedence option (configPrecedence) (write) 1`] = `[]`; +exports[`throw error with invalid config option (int) 1`] = ` +{ + "stderr": "[error] Invalid tabWidth value. Expected an integer, but received 0.5.", + "stdout": "", + "write": [], +} +`; -exports[`throw error with invalid config target (directory) (stderr) 1`] = ` -"[error] Invalid configuration file \`<cwd>/tests/integration/cli/config/invalid\`: EISDIR: illegal operation on a directory, read -" +exports[`throw error with invalid config option (trailingComma) 1`] = ` +{ + "stderr": "[error] Invalid trailingComma value. Expected "all", "es5" or "none", but received "wow".", + "stdout": "", + "write": [], +} `; -exports[`throw error with invalid config target (directory) (stdout) 1`] = `""`; +exports[`throw error with invalid config precedence option (configPrecedence) 1`] = ` +{ + "stderr": "[error] Invalid --config-precedence value. Expected one of the following values, but received "option/configPrecedence". +[error] - "cli-override" +[error] - "file-override" +[error] - "prefer-file"", + "stdout": "", + "write": [], +} +`; -exports[`throw error with invalid config target (directory) (write) 1`] = `[]`; +exports[`throw error with invalid config target (directory) 1`] = ` +{ + "stderr": "[error] Invalid configuration: +[error] Unable to read '<cli>/config/invalid/folder/.prettierrc': EISDIR: illegal operation on a directory, read", + "stdout": "", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/config-resolution.js.snap b/tests/integration/__tests__/__snapshots__/config-resolution.js.snap index 8cce4f521a23..a86f36b2e646 100644 --- a/tests/integration/__tests__/__snapshots__/config-resolution.js.snap +++ b/tests/integration/__tests__/__snapshots__/config-resolution.js.snap @@ -1,240 +1,74 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CLI overrides take precedence (stderr) 1`] = `""`; - -exports[`CLI overrides take precedence (stdout) 1`] = ` -"function f() { - console.log( - "should have tab width 8" - ) -} -function f() { - console.log( - "should have space width 2" - ) -} -function f() { - console.log( - "should have space width 8" - ) -} -function f() { - console.log( - "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" - ) -} -console.log( - "should have no semi" -) -console.log( - "jest/__best-tests__/.file.js should have semi" -); -console.log( - "jest/__best-tests__/file.js should have semi" -); -console.log( - "jest/Component.js should not have semi" -) -console.log( - "jest/Component.test.js should have semi" -); -function js() { - console.log( - "js/file.js should have tab width 8 (1 if CLI)" - ); -} -"use strict"; - -module.exports = - { - endOfLine: "auto", - tabWidth: 8, - }; -function noConfigJs() { - console.log( - "no-config/file.js should have no semicolons" - ) -} -function packageJs() { - console.log( - "package/file.js should have tab width 3" - ); -} -function rcJson() { - console.log.apply( - null, - [ - 'rc-json/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -function rcToml() { - console.log.apply( - null, - [ - 'rc-toml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -function rcYaml() { - console.log.apply( - null, - [ - 'rc-yaml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -" -`; - -exports[`CLI overrides take precedence (write) 1`] = `[]`; - -exports[`accepts configuration from --config (stderr) 1`] = `""`; - -exports[`accepts configuration from --config (stdout) 1`] = ` -"function js() { +exports[`accepts configuration from --config 1`] = ` +{ + "stderr": "", + "stdout": "function js() { console.log("js/file.js should have tab width 8 (1 if CLI)") +}", + "write": [], } -" `; -exports[`accepts configuration from --config (write) 1`] = `[]`; - -exports[`prints error message when no file found with --find-config-path (stderr) 1`] = ` -"[error] Can not find configure file for ".." -" +exports[`prints error message when no file found with --find-config-path 1`] = ` +{ + "stderr": "[error] Can not find configure file for "../--non-exits-filename--".", + "write": [], +} `; -exports[`prints error message when no file found with --find-config-path (write) 1`] = `[]`; - -exports[`resolves configuration file with --find-config-path file (stderr) 1`] = `""`; - -exports[`resolves configuration file with --find-config-path file (stdout) 1`] = ` -".prettierrc -" +exports[`resolves configuration file with --find-config-path file 1`] = ` +{ + "stderr": "", + "stdout": ".prettierrc", + "write": [], +} `; -exports[`resolves configuration file with --find-config-path file (write) 1`] = `[]`; - -exports[`resolves configuration from external files (stderr) 1`] = `""`; - -exports[`resolves configuration from external files (stdout) 1`] = ` -"function f() { - console.log("should have tab width 8") -} -function f() { - console.log("should have space width 2") +exports[`resolves external configuration from package.json (cjs package) 1`] = ` +{ + "stdout": "console.log("should have no semi")", } -function f() { - console.log("should have space width 8") -} -function f() { - console.log( - "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" - ) -} -console.log("should have no semi") -console.log("jest/__best-tests__/.file.js should have semi"); -console.log("jest/__best-tests__/file.js should have semi"); -console.log("jest/Component.js should not have semi") -console.log("jest/Component.test.js should have semi"); -function js() { - console.log("js/file.js should have tab width 8 (1 if CLI)"); -} -"use strict"; +`; -module.exports = { - endOfLine: "auto", - tabWidth: 8, -}; -function noConfigJs() { - console.log("no-config/file.js should have no semicolons") -} -function packageJs() { - console.log("package/file.js should have tab width 3"); -} -function rcJson() { - console.log.apply(null, [ - 'rc-json/file.js', - 'should have trailing comma', - 'and single quotes', - ]); +exports[`resolves external configuration from package.json (esm file) 1`] = ` +{ + "stdout": "console.log("should have no semi")", } -function rcToml() { - console.log.apply(null, [ - 'rc-toml/file.js', - 'should have trailing comma', - 'and single quotes', - ]); -} -function rcYaml() { - console.log.apply(null, [ - 'rc-yaml/file.js', - 'should have trailing comma', - 'and single quotes', - ]); -} -" `; -exports[`resolves configuration from external files (write) 1`] = `[]`; - -exports[`resolves configuration from external files and overrides by extname (stderr) 1`] = `""`; - -exports[`resolves configuration from external files and overrides by extname (stdout) 1`] = ` -"function noConfigTs() { - console.log( - "no-config/file.ts should have semicolons because it has a .ts extension" - ); -} -function packageTs() { - console.log( - "package/file.ts should have tab width 5 because it has .ts extension" - ); +exports[`resolves external configuration from package.json (esm package with TLA) 1`] = ` +{ + "stdout": "console.log("should have no semi")", } -" `; -exports[`resolves configuration from external files and overrides by extname (write) 1`] = `[]`; - -exports[`resolves external configuration from package.json (stderr) 1`] = `""`; - -exports[`resolves external configuration from package.json (stdout) 1`] = ` -"console.log("should have no semi") -" +exports[`resolves external configuration from package.json (esm package) 1`] = ` +{ + "stdout": "console.log("should have no semi")", +} `; -exports[`resolves external configuration from package.json (write) 1`] = `[]`; - -exports[`resolves json configuration file with --find-config-path file (stderr) 1`] = `""`; - -exports[`resolves json configuration file with --find-config-path file (stdout) 1`] = ` -"rc-json/.prettierrc.json -" +exports[`resolves json configuration file with --find-config-path file 1`] = ` +{ + "stderr": "", + "stdout": "rc-json/.prettierrc.json", + "write": [], +} `; -exports[`resolves json configuration file with --find-config-path file (write) 1`] = `[]`; - -exports[`resolves toml configuration file with --find-config-path file (stderr) 1`] = `""`; - -exports[`resolves toml configuration file with --find-config-path file (stdout) 1`] = ` -"rc-toml/.prettierrc.toml -" +exports[`resolves toml configuration file with --find-config-path file 1`] = ` +{ + "stderr": "", + "stdout": "rc-toml/.prettierrc.toml", + "write": [], +} `; -exports[`resolves toml configuration file with --find-config-path file (write) 1`] = `[]`; - -exports[`resolves yaml configuration file with --find-config-path file (stderr) 1`] = `""`; - -exports[`resolves yaml configuration file with --find-config-path file (stdout) 1`] = ` -"rc-yaml/.prettierrc.yaml -" +exports[`resolves yaml configuration file with --find-config-path file 1`] = ` +{ + "stderr": "", + "stdout": "rc-yaml/.prettierrc.yaml", + "write": [], +} `; - -exports[`resolves yaml configuration file with --find-config-path file (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap b/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap index 21bce4862299..a0c2b2fdf213 100644 --- a/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap +++ b/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cursorOffset should not be affected by full-width character (stdout) 1`] = ` -"const x = [ +exports[`cursorOffset should not be affected by full-width character 1`] = ` +{ + "stdout": "const x = [ "中文", "中文", "中文", @@ -13,20 +14,15 @@ exports[`cursorOffset should not be affected by full-width character (stdout) 1` "中文", "中文", "中文", -]; -" +];", + "write": [], +} `; -exports[`cursorOffset should not be affected by full-width character (write) 1`] = `[]`; - -exports[`write cursorOffset to stderr with --cursor-offset <int> (stderr) 1`] = ` -"1 -" -`; - -exports[`write cursorOffset to stderr with --cursor-offset <int> (stdout) 1`] = ` -"1; -" +exports[`write cursorOffset to stderr with --cursor-offset <int> 1`] = ` +{ + "stderr": "1", + "stdout": "1;", + "write": [], +} `; - -exports[`write cursorOffset to stderr with --cursor-offset <int> (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/debug-check.js.snap b/tests/integration/__tests__/__snapshots__/debug-check.js.snap index 827da81851a3..e2142a52e178 100644 --- a/tests/integration/__tests__/__snapshots__/debug-check.js.snap +++ b/tests/integration/__tests__/__snapshots__/debug-check.js.snap @@ -1,31 +1,46 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`checks stdin with --debug-check (write) 1`] = `[]`; - -exports[`doesn't crash when --debug-check is passed (write) 1`] = `[]`; +exports[`checks stdin with --debug-check 1`] = ` +{ + "write": [], +} +`; -exports[`should not exit non-zero for already prettified code with --debug-check + --check (stderr) 1`] = `""`; +exports[`doesn't crash when --debug-check is passed 1`] = ` +{ + "write": [], +} +`; -exports[`should not exit non-zero for already prettified code with --debug-check + --check (stdout) 1`] = ` -"Checking formatting... +exports[`should not exit non-zero for already prettified code with --debug-check + --check 1`] = ` +{ + "stderr": "", + "stdout": "Checking formatting... issue-4599.js -All matched files use Prettier code style! -" +All matched files use Prettier code style!", + "write": [], +} `; -exports[`should not exit non-zero for already prettified code with --debug-check + --check (write) 1`] = `[]`; - -exports[`should not exit non-zero for already prettified code with --debug-check + --list-different (stderr) 1`] = `""`; - -exports[`should not exit non-zero for already prettified code with --debug-check + --list-different (stdout) 1`] = ` -"issue-4599.js -" +exports[`should not exit non-zero for already prettified code with --debug-check + --list-different 1`] = ` +{ + "stderr": "", + "stdout": "issue-4599.js", + "write": [], +} `; -exports[`should not exit non-zero for already prettified code with --debug-check + --list-different (write) 1`] = `[]`; +exports[`should not exit non-zero for jsx style element with spread attribute 1`] = ` +{ + "stderr": "", + "stdout": "issue-15094.jsx", + "write": [], +} +`; -exports[`show diff for 2+ error files with --debug-check (stderr) 1`] = ` -"[error] a.debug-check: prettier(input) !== prettier(prettier(input)) +exports[`show diff for 2+ error files with --debug-check 1`] = ` +{ + "stderr": "[error] a.debug-check: prettier(input) !== prettier(prettier(input)) [error] Index: [error] =================================================================== [error] --- @@ -46,10 +61,8 @@ exports[`show diff for 2+ error files with --debug-check (stderr) 1`] = ` [error] world [error] +world [error] +world -[error] -" +[error] ", + "stdout": "", + "write": [], +} `; - -exports[`show diff for 2+ error files with --debug-check (stdout) 1`] = `""`; - -exports[`show diff for 2+ error files with --debug-check (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap b/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap deleted file mode 100644 index 4a0ac898b9aa..000000000000 --- a/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`prints information for debugging AST --debug-print-ast (stdout) 1`] = `"{"type":"File","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"errors":[],"program":{"type":"Program","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"sourceType":"module","interpreter":null,"body":[{"type":"VariableDeclaration","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"declarations":[{"type":"VariableDeclarator","start":6,"end":17,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":17,"index":17}},"range":[6,17],"id":{"type":"Identifier","start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"foo"},"range":[6,9],"name":"foo"},"init":{"type":"StringLiteral","start":12,"end":17,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":17,"index":17}},"range":[12,17],"extra":{"rawValue":"foo","raw":"'foo'"},"value":"foo"}}],"kind":"const"}],"directives":[]},"comments":[],"tokens":[{"type":{"label":"const","keyword":"const","beforeExpr":false,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"const","start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5}}},{"type":{"label":"name","beforeExpr":false,"startsExpr":true,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"foo","start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9}}},{"type":{"label":"=","beforeExpr":true,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":true,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"=","start":10,"end":11,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":11,"index":11}}},{"type":{"label":"string","beforeExpr":false,"startsExpr":true,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"foo","start":12,"end":17,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":17,"index":17}}},{"type":{"label":";","beforeExpr":true,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"start":17,"end":18,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":18,"index":18}}},{"type":{"label":"eof","beforeExpr":false,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"start":18,"end":18,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":18,"index":18}}}]}"`; - -exports[`prints information for debugging AST --debug-print-ast (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap b/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap index c5980a035810..2b5693202a0c 100644 --- a/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap +++ b/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`prints information for debugging comment attachment with --debug-print-comments (stdout) 1`] = ` -"[ +exports[`prints information for debugging comment attachment with --debug-print-comments 1`] = ` +{ + "stdout": "[ { "type": "CommentBlock", "value": " 1 ", @@ -44,8 +45,7 @@ exports[`prints information for debugging comment attachment with --debug-print- "trailing": true, "nodeDescription": "ExpressionStatement" } -] -" +]", + "write": [], +} `; - -exports[`prints information for debugging comment attachment with --debug-print-comments (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/early-exit.js.snap b/tests/integration/__tests__/__snapshots__/early-exit.js.snap index d7886195e236..d04a83b9ed6b 100644 --- a/tests/integration/__tests__/__snapshots__/early-exit.js.snap +++ b/tests/integration/__tests__/__snapshots__/early-exit.js.snap @@ -1,50 +1,33 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`show detailed usage with --help l (alias) (stderr) 1`] = `""`; - -exports[`show detailed usage with --help l (alias) (stdout) 1`] = ` -"-l, --list-different - - Print the names of files that are different from Prettier's formatting (see also --check). -" -`; - -exports[`show detailed usage with --help l (alias) (write) 1`] = `[]`; - -exports[`show detailed usage with plugin options (automatic resolution) (stderr) 1`] = `""`; - -exports[`show detailed usage with plugin options (automatic resolution) (stdout) 1`] = ` -"--tab-width <int> - - Number of spaces per indentation level. - -Default: 2 -Plugin defaults: -* prettier-plugin-bar: 4 -" +exports[`show detailed usage with --help l (alias) 1`] = ` +{ + "stderr": "", + "stdout": "-l, --list-different + + Print the names of files that are different from Prettier's formatting (see also --check).", + "write": [], +} `; -exports[`show detailed usage with plugin options (automatic resolution) (write) 1`] = `[]`; - -exports[`show detailed usage with plugin options (manual resolution) (stderr) 1`] = `""`; - -exports[`show detailed usage with plugin options (manual resolution) (stdout) 1`] = ` -"--tab-width <int> +exports[`show detailed usage with plugin options (manual resolution) 1`] = ` +{ + "stderr": "", + "stdout": "--tab-width <int> Number of spaces per indentation level. Default: 2 Plugin defaults: -* ../plugins/automatic/node_modules/prettier-plugin-bar: 4 -" +* ../plugins/automatic/node_modules/prettier-plugin-bar/index.js: 4", + "write": [], +} `; -exports[`show detailed usage with plugin options (manual resolution) (write) 1`] = `[]`; - -exports[`show usage with --help (stderr) 1`] = `""`; - -exports[`show usage with --help (stdout) 1`] = ` -"Usage: prettier [options] [file/dir/glob ...] +exports[`show usage with --help 1`] = ` +{ + "stderr": "", + "stdout": "Usage: prettier [options] [file/dir/glob ...] By default, output is written to stdout. Stdin is read if it is piped to Prettier and no files are given. @@ -70,12 +53,20 @@ Format options: --end-of-line <lf|crlf|cr|auto> Which end of line characters to apply. Defaults to lf. + --experimental-operator-position <start|end> + Where to print operators when binary expressions wrap lines. + Defaults to end. + --no-experimental-ternaries + Default behavior of ternaries; keep question marks on the same line as the consequent. --html-whitespace-sensitivity <css|strict|ignore> How to handle whitespaces in HTML. Defaults to css. --jsx-single-quote Use single quotes in JSX. Defaults to false. - --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> + --object-wrap <preserve|collapse> + How to wrap object literals. + Defaults to preserve. + --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> Which parser to use. --print-width <int> The line length where Prettier will try wrap. Defaults to 80. @@ -93,9 +84,9 @@ Format options: Defaults to false. --tab-width <int> Number of spaces per indentation level. Defaults to 2. - --trailing-comma <es5|none|all> + --trailing-comma <all|es5|none> Print trailing commas wherever possible when multi-line. - Defaults to es5. + Defaults to all. --use-tabs Indent with tabs instead of spaces. Defaults to false. --vue-indent-script-and-style @@ -113,28 +104,21 @@ Config options: --find-config-path <path> Find and print the path to a configuration file for the given input file. --ignore-path <path> Path to a file with patterns describing files to ignore. - Defaults to .prettierignore. - --plugin <path> Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s. - Defaults to []. - --plugin-search-dir <path> - Custom directory that contains prettier plugins in node_modules subdirectory. - Overrides default behavior when plugins are searched relatively to the location of Prettier. Multiple values are accepted. + Defaults to [.gitignore, .prettierignore]. + --plugin <path> Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s. Defaults to []. --with-node-modules Process files inside 'node_modules' directory. Editor options: --cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting. - This option cannot be used with --range-start and --range-end. Defaults to -1. --range-end <int> Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement. - This option cannot be used with --cursor-offset. Defaults to Infinity. --range-start <int> Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement. - This option cannot be used with --cursor-offset. Defaults to 0. Other options: @@ -144,6 +128,8 @@ Other options: --cache-location <path> Path to the cache file. --cache-strategy <metadata|content> Strategy for the cache to use for detecting changed files. + --check-ignore-pragma Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted. + Defaults to false. --no-color Do not colorize error messages. --no-error-on-unmatched-pattern Prevent errors when pattern is unmatched. @@ -155,34 +141,31 @@ Other options: -u, --ignore-unknown Ignore unknown files. --insert-pragma Insert @format pragma into file's first docblock comment. Defaults to false. - --loglevel <silent|error|warn|log|debug> + --log-level <silent|error|warn|log|debug> What level of logs to report. Defaults to log. - --no-plugin-search Disable plugin autoloading. - --require-pragma Require either '@prettier' or '@format' to be present in the file's first docblock comment - in order for it to be formatted. + --require-pragma Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted. Defaults to false. --stdin-filepath <path> Path to the file to pretend that stdin comes from. --support-info Print support information as JSON. -v, --version Print Prettier version. - -" +", + "write": [], +} `; -exports[`show usage with --help (write) 1`] = `[]`; - -exports[`show version with --version (stderr) 1`] = `""`; - -exports[`show version with --version (write) 1`] = `[]`; - -exports[`show warning with --help not-found (typo) (stderr) 1`] = ` -"[warn] Unknown flag "parserr", did you mean "parser"? -" +exports[`show version with --version 1`] = ` +{ + "stderr": "", + "write": [], +} `; -exports[`show warning with --help not-found (typo) (stdout) 1`] = ` -"--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> +exports[`show warning with --help not-found (typo) 1`] = ` +{ + "stderr": "[warn] Unknown flag "parserr", did you mean "parser"?", + "stdout": "--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> Which parser to use. @@ -201,6 +184,7 @@ Valid options: scss SCSS json JSON json5 JSON5 + jsonc JSON with Comments json-stringify JSON.stringify graphql GraphQL markdown Markdown @@ -211,15 +195,15 @@ Valid options: html HTML angular Angular lwc Lightning Web Components -" + mjml MJML", + "write": [], +} `; -exports[`show warning with --help not-found (typo) (write) 1`] = `[]`; - -exports[`throw error and show usage with something unexpected (stderr) 1`] = `""`; - -exports[`throw error and show usage with something unexpected (stdout) 1`] = ` -"Usage: prettier [options] [file/dir/glob ...] +exports[`throw error and show usage with something unexpected 1`] = ` +{ + "stderr": "", + "stdout": "Usage: prettier [options] [file/dir/glob ...] By default, output is written to stdout. Stdin is read if it is piped to Prettier and no files are given. @@ -245,12 +229,20 @@ Format options: --end-of-line <lf|crlf|cr|auto> Which end of line characters to apply. Defaults to lf. + --experimental-operator-position <start|end> + Where to print operators when binary expressions wrap lines. + Defaults to end. + --no-experimental-ternaries + Default behavior of ternaries; keep question marks on the same line as the consequent. --html-whitespace-sensitivity <css|strict|ignore> How to handle whitespaces in HTML. Defaults to css. --jsx-single-quote Use single quotes in JSX. Defaults to false. - --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> + --object-wrap <preserve|collapse> + How to wrap object literals. + Defaults to preserve. + --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> Which parser to use. --print-width <int> The line length where Prettier will try wrap. Defaults to 80. @@ -268,9 +260,9 @@ Format options: Defaults to false. --tab-width <int> Number of spaces per indentation level. Defaults to 2. - --trailing-comma <es5|none|all> + --trailing-comma <all|es5|none> Print trailing commas wherever possible when multi-line. - Defaults to es5. + Defaults to all. --use-tabs Indent with tabs instead of spaces. Defaults to false. --vue-indent-script-and-style @@ -288,28 +280,21 @@ Config options: --find-config-path <path> Find and print the path to a configuration file for the given input file. --ignore-path <path> Path to a file with patterns describing files to ignore. - Defaults to .prettierignore. - --plugin <path> Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s. - Defaults to []. - --plugin-search-dir <path> - Custom directory that contains prettier plugins in node_modules subdirectory. - Overrides default behavior when plugins are searched relatively to the location of Prettier. Multiple values are accepted. + Defaults to [.gitignore, .prettierignore]. + --plugin <path> Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s. Defaults to []. --with-node-modules Process files inside 'node_modules' directory. Editor options: --cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting. - This option cannot be used with --range-start and --range-end. Defaults to -1. --range-end <int> Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement. - This option cannot be used with --cursor-offset. Defaults to Infinity. --range-start <int> Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement. - This option cannot be used with --cursor-offset. Defaults to 0. Other options: @@ -319,6 +304,8 @@ Other options: --cache-location <path> Path to the cache file. --cache-strategy <metadata|content> Strategy for the cache to use for detecting changed files. + --check-ignore-pragma Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted. + Defaults to false. --no-color Do not colorize error messages. --no-error-on-unmatched-pattern Prevent errors when pattern is unmatched. @@ -330,64 +317,56 @@ Other options: -u, --ignore-unknown Ignore unknown files. --insert-pragma Insert @format pragma into file's first docblock comment. Defaults to false. - --loglevel <silent|error|warn|log|debug> + --log-level <silent|error|warn|log|debug> What level of logs to report. Defaults to log. - --no-plugin-search Disable plugin autoloading. - --require-pragma Require either '@prettier' or '@format' to be present in the file's first docblock comment - in order for it to be formatted. + --require-pragma Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted. Defaults to false. --stdin-filepath <path> Path to the file to pretend that stdin comes from. --support-info Print support information as JSON. -v, --version Print Prettier version. - -" +", + "write": [], +} `; -exports[`throw error and show usage with something unexpected (write) 1`] = `[]`; - -exports[`throw error with --check + --list-different (stderr) 1`] = ` -"[error] Cannot use --check and --list-different together. -" +exports[`throw error with --check + --list-different 1`] = ` +{ + "stderr": "[error] Cannot use --check and --list-different together.", + "stdout": "", + "write": [], +} `; -exports[`throw error with --check + --list-different (stdout) 1`] = `""`; - -exports[`throw error with --check + --list-different (write) 1`] = `[]`; - -exports[`throw error with --file-info + multiple files (stderr) 1`] = ` -"[error] Cannot use --file-info with multiple files -" +exports[`throw error with --file-info + multiple files 1`] = ` +{ + "stderr": "[error] Cannot use --file-info with multiple files", + "stdout": "", + "write": [], +} `; -exports[`throw error with --file-info + multiple files (stdout) 1`] = `""`; - -exports[`throw error with --file-info + multiple files (write) 1`] = `[]`; - -exports[`throw error with --find-config-path + multiple files (stderr) 1`] = ` -"[error] Cannot use --find-config-path with multiple files -" +exports[`throw error with --find-config-path + multiple files 1`] = ` +{ + "stderr": "[error] Cannot use --find-config-path with multiple files", + "stdout": "", + "write": [], +} `; -exports[`throw error with --find-config-path + multiple files (stdout) 1`] = `""`; - -exports[`throw error with --find-config-path + multiple files (write) 1`] = `[]`; - -exports[`throw error with --help not-found (stderr) 1`] = ` -"[error] Invalid --help value. Expected a flag, but received "not-found". -" +exports[`throw error with --help not-found 1`] = ` +{ + "stderr": "[error] Invalid --help value. Expected a flag, but received "not-found".", + "stdout": "", + "write": [], +} `; -exports[`throw error with --help not-found (stdout) 1`] = `""`; - -exports[`throw error with --help not-found (write) 1`] = `[]`; - -exports[`throw error with --write + --debug-check (stderr) 1`] = ` -"[error] Cannot use --write and --debug-check together. -" +exports[`throw error with --write + --debug-check 1`] = ` +{ + "stderr": "[error] Cannot use --write and --debug-check together.", + "stdout": "", + "write": [], +} `; - -exports[`throw error with --write + --debug-check (stdout) 1`] = `""`; - -exports[`throw error with --write + --debug-check (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap b/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap index e8a274c60031..0a1d40ec9c76 100644 --- a/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap +++ b/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap @@ -1,48 +1,41 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`error on unmatched pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: "**/*.toml". -" -`; - -exports[`error on unmatched pattern (stdout) 1`] = `""`; - -exports[`error on unmatched pattern (write) 1`] = `[]`; - -exports[`error on unmatched pattern when 2nd glob has no match (stderr) 1`] = ` -"[error] No files matching the pattern were found: "**/*.toml". -" +exports[`error on unmatched pattern 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "**/*.toml".", + "stdout": "", + "write": [], +} `; -exports[`error on unmatched pattern when 2nd glob has no match (stdout) 1`] = ` -"const hello = "there"; +exports[`error on unmatched pattern when 2nd glob has no match 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "**/*.toml".", + "stdout": "const hello = "there"; { "hello": "there" } -hello: there -" +hello: there", + "write": [], +} `; -exports[`error on unmatched pattern when 2nd glob has no match (write) 1`] = `[]`; - -exports[`no error on unmatched pattern (stderr) 1`] = `""`; - -exports[`no error on unmatched pattern (stdout) 1`] = ` -"const hello = "there"; -" +exports[`no error on unmatched pattern 1`] = ` +{ + "stderr": "", + "stdout": "const hello = "there";", + "write": [], +} `; -exports[`no error on unmatched pattern (write) 1`] = `[]`; - -exports[`no error on unmatched pattern when 2nd glob has no match (stderr) 1`] = `""`; - -exports[`no error on unmatched pattern when 2nd glob has no match (stdout) 1`] = ` -"const hello = "there"; +exports[`no error on unmatched pattern when 2nd glob has no match 1`] = ` +{ + "stderr": "", + "stdout": "const hello = "there"; { "hello": "there" } -hello: there -" +hello: there", + "write": [], +} `; - -exports[`no error on unmatched pattern when 2nd glob has no match (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/experimental-cli.js.snap b/tests/integration/__tests__/__snapshots__/experimental-cli.js.snap new file mode 100644 index 000000000000..a80ecf4426a7 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/experimental-cli.js.snap @@ -0,0 +1,47 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`experimental cli --check --no-parallel 1`] = ` +{ + "status": 1, + "stderr": "[warn] test-1/should-format.js +[warn] Code style issues found in 1 file. Run Prettier with --write to fix.", + "stdout": "Checking formatting... +", + "write": [], +} +`; + +exports[`experimental cli --check 1`] = ` +{ + "status": 1, + "stderr": "[warn] test-0/should-format.js +[warn] Code style issues found in 1 file. Run Prettier with --write to fix.", + "stdout": "Checking formatting... +", + "write": [], +} +`; + +exports[`experimental cli --parser=meriyah 1`] = ` +{ + "stdout": "foo();", +} +`; + +exports[`experimental cli --write --no-parallel 1`] = ` +{ + "status": 0, + "stderr": "", + "stdout": "test-3/should-format.js", + "write": [], +} +`; + +exports[`experimental cli --write 1`] = ` +{ + "status": 0, + "stderr": "", + "stdout": "test-2/should-format.js", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/file-info.js.snap b/tests/integration/__tests__/__snapshots__/file-info.js.snap index e9d535992e5f..0f67b388589b 100644 --- a/tests/integration/__tests__/__snapshots__/file-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/file-info.js.snap @@ -1,147 +1,103 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`extracts file-info for a file in not_node_modules (stderr) 1`] = `""`; - -exports[`extracts file-info for a file in not_node_modules (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" -`; - -exports[`extracts file-info for a file in not_node_modules (write) 1`] = `[]`; - -exports[`extracts file-info for a js file (stderr) 1`] = `""`; - -exports[`extracts file-info for a js file (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" -`; - -exports[`extracts file-info for a js file (write) 1`] = `[]`; - -exports[`extracts file-info for a known markdown file with no extension (stderr) 1`] = `""`; - -exports[`extracts file-info for a known markdown file with no extension (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "markdown" } - -" +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`extracts file-info for a file in not_node_modules 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "babel" }", + "write": [], +} `; -exports[`extracts file-info for a known markdown file with no extension (write) 1`] = `[]`; - -exports[`extracts file-info for a markdown file (stderr) 1`] = `""`; - -exports[`extracts file-info for a markdown file (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "markdown" } - -" +exports[`extracts file-info for a js file 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "babel" }", + "write": [], +} `; -exports[`extracts file-info for a markdown file (write) 1`] = `[]`; - -exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided (stderr) 1`] = `""`; - -exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" +exports[`extracts file-info for a known markdown file with no extension 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "markdown" }", + "write": [], +} `; -exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided (write) 1`] = `[]`; - -exports[`extracts file-info with ignored=true for a file in .prettierignore (stderr) 1`] = `""`; - -exports[`extracts file-info with ignored=true for a file in .prettierignore (stdout) 1`] = ` -"{ "ignored": true, "inferredParser": null } - -" +exports[`extracts file-info for a markdown file 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "markdown" }", + "write": [], +} `; -exports[`extracts file-info with ignored=true for a file in .prettierignore (write) 1`] = `[]`; - -exports[`extracts file-info with ignored=true for a file in a hand-picked .prettierignore (stderr) 1`] = `""`; - -exports[`extracts file-info with ignored=true for a file in a hand-picked .prettierignore (stdout) 1`] = ` -"{ "ignored": true, "inferredParser": null } - -" +exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "babel" }", + "write": [], +} `; -exports[`extracts file-info with ignored=true for a file in a hand-picked .prettierignore (write) 1`] = `[]`; - -exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked (stderr) 1`] = `""`; - -exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "foo" } - -" +exports[`extracts file-info with ignored=true for a file in .prettierignore 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": true, "inferredParser": null }", + "write": [], +} `; -exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked (write) 1`] = `[]`; - -exports[`extracts file-info with inferredParser=foo when plugins are autoloaded (stderr) 1`] = `""`; - -exports[`extracts file-info with inferredParser=foo when plugins are autoloaded (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "foo" } - -" +exports[`extracts file-info with ignored=true for a file in a hand-picked ignore file 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": true, "inferredParser": null }", + "write": [], +} `; -exports[`extracts file-info with inferredParser=foo when plugins are autoloaded (write) 1`] = `[]`; - -exports[`extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir (stderr) 1`] = `""`; - -exports[`extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "foo" } - -" +exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "foo" }", + "write": [], +} `; -exports[`extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir (write) 1`] = `[]`; - -exports[`extracts file-info with inferredParser=null for file.foo (stderr) 1`] = `""`; - -exports[`extracts file-info with inferredParser=null for file.foo (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": null } - -" +exports[`extracts file-info with inferredParser=null for file.foo 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": null }", + "write": [], +} `; -exports[`extracts file-info with inferredParser=null for file.foo (write) 1`] = `[]`; - -exports[`extracts file-info with with ignored=true for a file in node_modules (stderr) 1`] = `""`; - -exports[`extracts file-info with with ignored=true for a file in node_modules (stdout) 1`] = ` -"{ "ignored": true, "inferredParser": null } - -" +exports[`extracts file-info with with ignored=true for a file in node_modules 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": true, "inferredParser": null }", + "write": [], +} `; -exports[`extracts file-info with with ignored=true for a file in node_modules (write) 1`] = `[]`; - -exports[`file-info should not try resolve config with --no-config (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" +exports[`file-info should not try resolve config with --no-config 1`] = ` +{ + "stdout": "{ "ignored": false, "inferredParser": "babel" }", +} `; -exports[`file-info should try resolve config (stderr) 1`] = `""`; - -exports[`file-info should try resolve config (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "override-js-parser" } - -" +exports[`file-info should try resolve config 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "override-js-parser" }", + "write": [], +} `; -exports[`file-info should try resolve config (write) 1`] = `[]`; - -exports[`non-exists ignore path (stderr) 1`] = `""`; - -exports[`non-exists ignore path (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" +exports[`non-exists ignore path 1`] = ` +{ + "stderr": "", + "stdout": "{ "ignored": false, "inferredParser": "babel" }", + "write": [], +} `; - -exports[`non-exists ignore path (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/format.js.snap b/tests/integration/__tests__/__snapshots__/format.js.snap index fc7cb935da07..5446f531d6e7 100644 --- a/tests/integration/__tests__/__snapshots__/format.js.snap +++ b/tests/integration/__tests__/__snapshots__/format.js.snap @@ -4,7 +4,8 @@ exports[`'Adjacent JSX' error should not be swallowed by Babel's error recovery "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (2:1) 1 | <a></a> > 2 | <b></b> - | ^" + | ^ +Cause: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (2:0)" `; exports[`html parser should handle CRLF correctly 1`] = `""<!--\\r\\n test\\r\\n test\\r\\n-->\\r\\n""`; @@ -16,7 +17,8 @@ exports[`typescript parser should throw the first error when both JSX and non-JS 6 | ); 7 | > 8 | label: - | ^" + | ^ +Cause: Expression expected." `; exports[`yaml parser should handle CRLF correctly 1`] = `""a: 123\\r\\n""`; diff --git a/tests/integration/__tests__/__snapshots__/help-options.js.snap b/tests/integration/__tests__/__snapshots__/help-options.js.snap index 5574c326f2cc..ae0086b7189e 100644 --- a/tests/integration/__tests__/__snapshots__/help-options.js.snap +++ b/tests/integration/__tests__/__snapshots__/help-options.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`show detailed usage with --help arrow-parens (stderr) 1`] = `""`; - -exports[`show detailed usage with --help arrow-parens (stdout) 1`] = ` -"--arrow-parens <always|avoid> +exports[`show detailed usage with --help arrow-parens 1`] = ` +{ + "stderr": "", + "stdout": "--arrow-parens <always|avoid> Include parentheses around a sole arrow function parameter. @@ -12,118 +12,121 @@ Valid options: always Always include parens. Example: \`(x) => x\` avoid Omit parens when possible. Example: \`x => x\` -Default: always -" +Default: always", + "write": [], +} `; -exports[`show detailed usage with --help arrow-parens (write) 1`] = `[]`; - -exports[`show detailed usage with --help bracket-same-line (stderr) 1`] = `""`; - -exports[`show detailed usage with --help bracket-same-line (stdout) 1`] = ` -"--bracket-same-line +exports[`show detailed usage with --help bracket-same-line 1`] = ` +{ + "stderr": "", + "stdout": "--bracket-same-line Put > of opening tags on the last line instead of on a new line. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help bracket-same-line (write) 1`] = `[]`; - -exports[`show detailed usage with --help bracket-spacing (stderr) 1`] = `""`; - -exports[`show detailed usage with --help bracket-spacing (stdout) 1`] = ` -"--bracket-spacing +exports[`show detailed usage with --help bracket-spacing 1`] = ` +{ + "stderr": "", + "stdout": "--bracket-spacing Print spaces between brackets. -Default: true -" +Default: true", + "write": [], +} `; -exports[`show detailed usage with --help bracket-spacing (write) 1`] = `[]`; - -exports[`show detailed usage with --help cache (stderr) 1`] = `""`; - -exports[`show detailed usage with --help cache (stdout) 1`] = ` -"--cache +exports[`show detailed usage with --help cache 1`] = ` +{ + "stderr": "", + "stdout": "--cache Only format changed files. Cannot use with --stdin-filepath. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help cache (write) 1`] = `[]`; - -exports[`show detailed usage with --help cache-location (stderr) 1`] = `""`; +exports[`show detailed usage with --help cache-location 1`] = ` +{ + "stderr": "", + "stdout": "--cache-location <path> -exports[`show detailed usage with --help cache-location (stdout) 1`] = ` -"--cache-location <path> - - Path to the cache file. -" + Path to the cache file.", + "write": [], +} `; -exports[`show detailed usage with --help cache-location (write) 1`] = `[]`; - -exports[`show detailed usage with --help cache-strategy (stderr) 1`] = `""`; - -exports[`show detailed usage with --help cache-strategy (stdout) 1`] = ` -"--cache-strategy <metadata|content> +exports[`show detailed usage with --help cache-strategy 1`] = ` +{ + "stderr": "", + "stdout": "--cache-strategy <metadata|content> Strategy for the cache to use for detecting changed files. Valid options: metadata Use the file metadata such as timestamps as cache keys - content Use the file content as cache keys -" + content Use the file content as cache keys", + "write": [], +} `; -exports[`show detailed usage with --help cache-strategy (write) 1`] = `[]`; - -exports[`show detailed usage with --help check (stderr) 1`] = `""`; - -exports[`show detailed usage with --help check (stdout) 1`] = ` -"-c, --check +exports[`show detailed usage with --help check 1`] = ` +{ + "stderr": "", + "stdout": "-c, --check Check if the given files are formatted, print a human-friendly summary - message and paths to unformatted files (see also --list-different). -" + message and paths to unformatted files (see also --list-different).", + "write": [], +} `; -exports[`show detailed usage with --help check (write) 1`] = `[]`; - -exports[`show detailed usage with --help color (stderr) 1`] = `""`; +exports[`show detailed usage with --help check-ignore-pragma 1`] = ` +{ + "stderr": "", + "stdout": "--check-ignore-pragma -exports[`show detailed usage with --help color (stdout) 1`] = ` -"--color + Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted. - Colorize error messages. - -Default: true -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help color (write) 1`] = `[]`; - -exports[`show detailed usage with --help config (stderr) 1`] = `""`; +exports[`show detailed usage with --help color 1`] = ` +{ + "stderr": "", + "stdout": "--color -exports[`show detailed usage with --help config (stdout) 1`] = ` -"--config <path> + Colorize error messages. - Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js). -" +Default: true", + "write": [], +} `; -exports[`show detailed usage with --help config (write) 1`] = `[]`; +exports[`show detailed usage with --help config 1`] = ` +{ + "stderr": "", + "stdout": "--config <path> -exports[`show detailed usage with --help config-precedence (stderr) 1`] = `""`; + Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", + "write": [], +} +`; -exports[`show detailed usage with --help config-precedence (stdout) 1`] = ` -"--config-precedence <cli-override|file-override|prefer-file> +exports[`show detailed usage with --help config-precedence 1`] = ` +{ + "stderr": "", + "stdout": "--config-precedence <cli-override|file-override|prefer-file> Define in which order config files and CLI options should be evaluated. @@ -134,43 +137,39 @@ Valid options: prefer-file If a config file is found will evaluate it and ignore other CLI options. If no config file is found CLI options will evaluate as normal. -Default: cli-override -" +Default: cli-override", + "write": [], +} `; -exports[`show detailed usage with --help config-precedence (write) 1`] = `[]`; - -exports[`show detailed usage with --help cursor-offset (stderr) 1`] = `""`; - -exports[`show detailed usage with --help cursor-offset (stdout) 1`] = ` -"--cursor-offset <int> +exports[`show detailed usage with --help cursor-offset 1`] = ` +{ + "stderr": "", + "stdout": "--cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting. - This option cannot be used with --range-start and --range-end. -Default: -1 -" +Default: -1", + "write": [], +} `; -exports[`show detailed usage with --help cursor-offset (write) 1`] = `[]`; - -exports[`show detailed usage with --help editorconfig (stderr) 1`] = `""`; - -exports[`show detailed usage with --help editorconfig (stdout) 1`] = ` -"--editorconfig +exports[`show detailed usage with --help editorconfig 1`] = ` +{ + "stderr": "", + "stdout": "--editorconfig Take .editorconfig into account when parsing configuration. -Default: true -" +Default: true", + "write": [], +} `; -exports[`show detailed usage with --help editorconfig (write) 1`] = `[]`; - -exports[`show detailed usage with --help embedded-language-formatting (stderr) 1`] = `""`; - -exports[`show detailed usage with --help embedded-language-formatting (stdout) 1`] = ` -"--embedded-language-formatting <auto|off> +exports[`show detailed usage with --help embedded-language-formatting 1`] = ` +{ + "stderr": "", + "stdout": "--embedded-language-formatting <auto|off> Control how Prettier formats quoted code embedded in the file. @@ -179,16 +178,15 @@ Valid options: auto Format embedded code if Prettier can automatically identify it. off Never automatically format embedded code. -Default: auto -" +Default: auto", + "write": [], +} `; -exports[`show detailed usage with --help embedded-language-formatting (write) 1`] = `[]`; - -exports[`show detailed usage with --help end-of-line (stderr) 1`] = `""`; - -exports[`show detailed usage with --help end-of-line (stdout) 1`] = ` -"--end-of-line <lf|crlf|cr|auto> +exports[`show detailed usage with --help end-of-line 1`] = ` +{ + "stderr": "", + "stdout": "--end-of-line <lf|crlf|cr|auto> Which end of line characters to apply. @@ -200,52 +198,77 @@ Valid options: auto Maintain existing (mixed values within one file are normalised by looking at what's used after the first line) -Default: lf -" +Default: lf", + "write": [], +} `; -exports[`show detailed usage with --help end-of-line (write) 1`] = `[]`; +exports[`show detailed usage with --help experimental-operator-position 1`] = ` +{ + "stderr": "", + "stdout": "--experimental-operator-position <start|end> -exports[`show detailed usage with --help file-info (stderr) 1`] = `""`; + Where to print operators when binary expressions wrap lines. -exports[`show detailed usage with --help file-info (stdout) 1`] = ` -"--file-info <path> +Valid options: - Extract the following info (as JSON) for a given file path. Reported fields: - * ignored (boolean) - true if file path is filtered by --ignore-path - * inferredParser (string | null) - name of parser inferred from file path -" -`; + start Print operators at the start of new lines. + end Print operators at the end of previous lines. -exports[`show detailed usage with --help file-info (write) 1`] = `[]`; +Default: end", + "write": [], +} +`; -exports[`show detailed usage with --help find-config-path (stderr) 1`] = `""`; +exports[`show detailed usage with --help experimental-ternaries 1`] = ` +{ + "stderr": "", + "stdout": "--experimental-ternaries -exports[`show detailed usage with --help find-config-path (stdout) 1`] = ` -"--find-config-path <path> + Use curious ternaries, with the question mark after the condition. - Find and print the path to a configuration file for the given input file. -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help find-config-path (write) 1`] = `[]`; +exports[`show detailed usage with --help file-info 1`] = ` +{ + "stderr": "", + "stdout": "--file-info <path> -exports[`show detailed usage with --help help (stderr) 1`] = `""`; + Extract the following info (as JSON) for a given file path. Reported fields: + * ignored (boolean) - true if file path is filtered by --ignore-path + * inferredParser (string | null) - name of parser inferred from file path", + "write": [], +} +`; -exports[`show detailed usage with --help help (stdout) 1`] = ` -"-h, --help <flag> +exports[`show detailed usage with --help find-config-path 1`] = ` +{ + "stderr": "", + "stdout": "--find-config-path <path> - Show CLI usage, or details about the given flag. - Example: --help write -" + Find and print the path to a configuration file for the given input file.", + "write": [], +} `; -exports[`show detailed usage with --help help (write) 1`] = `[]`; +exports[`show detailed usage with --help help 1`] = ` +{ + "stderr": "", + "stdout": "-h, --help <flag> -exports[`show detailed usage with --help html-whitespace-sensitivity (stderr) 1`] = `""`; + Show CLI usage, or details about the given flag. + Example: --help write", + "write": [], +} +`; -exports[`show detailed usage with --help html-whitespace-sensitivity (stdout) 1`] = ` -"--html-whitespace-sensitivity <css|strict|ignore> +exports[`show detailed usage with --help html-whitespace-sensitivity 1`] = ` +{ + "stderr": "", + "stdout": "--html-whitespace-sensitivity <css|strict|ignore> How to handle whitespaces in HTML. @@ -255,77 +278,72 @@ Valid options: strict Whitespaces are considered sensitive. ignore Whitespaces are considered insensitive. -Default: css -" +Default: css", + "write": [], +} `; -exports[`show detailed usage with --help html-whitespace-sensitivity (write) 1`] = `[]`; - -exports[`show detailed usage with --help ignore-path (stderr) 1`] = `""`; - -exports[`show detailed usage with --help ignore-path (stdout) 1`] = ` -"--ignore-path <path> +exports[`show detailed usage with --help ignore-path 1`] = ` +{ + "stderr": "", + "stdout": "--ignore-path <path> Path to a file with patterns describing files to ignore. + Multiple values are accepted. -Default: .prettierignore -" +Default: [.gitignore, .prettierignore]", + "write": [], +} `; -exports[`show detailed usage with --help ignore-path (write) 1`] = `[]`; - -exports[`show detailed usage with --help ignore-unknown (stderr) 1`] = `""`; - -exports[`show detailed usage with --help ignore-unknown (stdout) 1`] = ` -"-u, --ignore-unknown +exports[`show detailed usage with --help ignore-unknown 1`] = ` +{ + "stderr": "", + "stdout": "-u, --ignore-unknown - Ignore unknown files. -" + Ignore unknown files.", + "write": [], +} `; -exports[`show detailed usage with --help ignore-unknown (write) 1`] = `[]`; - -exports[`show detailed usage with --help insert-pragma (stderr) 1`] = `""`; - -exports[`show detailed usage with --help insert-pragma (stdout) 1`] = ` -"--insert-pragma +exports[`show detailed usage with --help insert-pragma 1`] = ` +{ + "stderr": "", + "stdout": "--insert-pragma Insert @format pragma into file's first docblock comment. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help insert-pragma (write) 1`] = `[]`; - -exports[`show detailed usage with --help jsx-single-quote (stderr) 1`] = `""`; - -exports[`show detailed usage with --help jsx-single-quote (stdout) 1`] = ` -"--jsx-single-quote +exports[`show detailed usage with --help jsx-single-quote 1`] = ` +{ + "stderr": "", + "stdout": "--jsx-single-quote Use single quotes in JSX. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help jsx-single-quote (write) 1`] = `[]`; +exports[`show detailed usage with --help list-different 1`] = ` +{ + "stderr": "", + "stdout": "-l, --list-different -exports[`show detailed usage with --help list-different (stderr) 1`] = `""`; - -exports[`show detailed usage with --help list-different (stdout) 1`] = ` -"-l, --list-different - - Print the names of files that are different from Prettier's formatting (see also --check). -" + Print the names of files that are different from Prettier's formatting (see also --check).", + "write": [], +} `; -exports[`show detailed usage with --help list-different (write) 1`] = `[]`; - -exports[`show detailed usage with --help loglevel (stderr) 1`] = `""`; - -exports[`show detailed usage with --help loglevel (stdout) 1`] = ` -"--loglevel <silent|error|warn|log|debug> +exports[`show detailed usage with --help log-level 1`] = ` +{ + "stderr": "", + "stdout": "--log-level <silent|error|warn|log|debug> What level of logs to report. @@ -337,93 +355,102 @@ Valid options: log debug -Default: log -" +Default: log", + "write": [], +} `; -exports[`show detailed usage with --help loglevel (write) 1`] = `[]`; - -exports[`show detailed usage with --help no-bracket-spacing (stderr) 1`] = `""`; +exports[`show detailed usage with --help no-bracket-spacing 1`] = ` +{ + "stderr": "", + "stdout": "--no-bracket-spacing -exports[`show detailed usage with --help no-bracket-spacing (stdout) 1`] = ` -"--no-bracket-spacing - - Do not print spaces between brackets. -" + Do not print spaces between brackets.", + "write": [], +} `; -exports[`show detailed usage with --help no-bracket-spacing (write) 1`] = `[]`; - -exports[`show detailed usage with --help no-color (stderr) 1`] = `""`; +exports[`show detailed usage with --help no-color 1`] = ` +{ + "stderr": "", + "stdout": "--no-color -exports[`show detailed usage with --help no-color (stdout) 1`] = ` -"--no-color - - Do not colorize error messages. -" + Do not colorize error messages.", + "write": [], +} `; -exports[`show detailed usage with --help no-color (write) 1`] = `[]`; - -exports[`show detailed usage with --help no-config (stderr) 1`] = `""`; - -exports[`show detailed usage with --help no-config (stdout) 1`] = ` -"--no-config +exports[`show detailed usage with --help no-config 1`] = ` +{ + "stderr": "", + "stdout": "--no-config - Do not look for a configuration file. -" + Do not look for a configuration file.", + "write": [], +} `; -exports[`show detailed usage with --help no-config (write) 1`] = `[]`; +exports[`show detailed usage with --help no-editorconfig 1`] = ` +{ + "stderr": "", + "stdout": "--no-editorconfig -exports[`show detailed usage with --help no-editorconfig (stderr) 1`] = `""`; - -exports[`show detailed usage with --help no-editorconfig (stdout) 1`] = ` -"--no-editorconfig - - Don't take .editorconfig into account when parsing configuration. -" + Don't take .editorconfig into account when parsing configuration.", + "write": [], +} `; -exports[`show detailed usage with --help no-editorconfig (write) 1`] = `[]`; - -exports[`show detailed usage with --help no-error-on-unmatched-pattern (stderr) 1`] = `""`; - -exports[`show detailed usage with --help no-error-on-unmatched-pattern (stdout) 1`] = ` -"--no-error-on-unmatched-pattern +exports[`show detailed usage with --help no-error-on-unmatched-pattern 1`] = ` +{ + "stderr": "", + "stdout": "--no-error-on-unmatched-pattern - Prevent errors when pattern is unmatched. -" + Prevent errors when pattern is unmatched.", + "write": [], +} `; -exports[`show detailed usage with --help no-error-on-unmatched-pattern (write) 1`] = `[]`; +exports[`show detailed usage with --help no-experimental-ternaries 1`] = ` +{ + "stderr": "", + "stdout": "--no-experimental-ternaries -exports[`show detailed usage with --help no-plugin-search (stderr) 1`] = `""`; + Default behavior of ternaries; keep question marks on the same line as the consequent.", + "write": [], +} +`; -exports[`show detailed usage with --help no-plugin-search (stdout) 1`] = ` -"--no-plugin-search +exports[`show detailed usage with --help no-semi 1`] = ` +{ + "stderr": "", + "stdout": "--no-semi - Disable plugin autoloading. -" + Do not print semicolons, except at the beginning of lines which may need them.", + "write": [], +} `; -exports[`show detailed usage with --help no-plugin-search (write) 1`] = `[]`; - -exports[`show detailed usage with --help no-semi (stderr) 1`] = `""`; +exports[`show detailed usage with --help object-wrap 1`] = ` +{ + "stderr": "", + "stdout": "--object-wrap <preserve|collapse> -exports[`show detailed usage with --help no-semi (stdout) 1`] = ` -"--no-semi + How to wrap object literals. - Do not print semicolons, except at the beginning of lines which may need them. -" -`; +Valid options: -exports[`show detailed usage with --help no-semi (write) 1`] = `[]`; + preserve Keep as multi-line, if there is a newline between the opening brace and first property. + collapse Fit to a single line when possible. -exports[`show detailed usage with --help parser (stderr) 1`] = `""`; +Default: preserve", + "write": [], +} +`; -exports[`show detailed usage with --help parser (stdout) 1`] = ` -"--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> +exports[`show detailed usage with --help parser 1`] = ` +{ + "stderr": "", + "stdout": "--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> Which parser to use. @@ -442,6 +469,7 @@ Valid options: scss SCSS json JSON json5 JSON5 + jsonc JSON with Comments json-stringify JSON.stringify graphql GraphQL markdown Markdown @@ -452,56 +480,39 @@ Valid options: html HTML angular Angular lwc Lightning Web Components -" + mjml MJML", + "write": [], +} `; -exports[`show detailed usage with --help parser (write) 1`] = `[]`; - -exports[`show detailed usage with --help plugin (stderr) 1`] = `""`; - -exports[`show detailed usage with --help plugin (stdout) 1`] = ` -"--plugin <path> +exports[`show detailed usage with --help plugin 1`] = ` +{ + "stderr": "", + "stdout": "--plugin <path> Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s. -Default: [] -" +Default: []", + "write": [], +} `; -exports[`show detailed usage with --help plugin (write) 1`] = `[]`; - -exports[`show detailed usage with --help plugin-search-dir (stderr) 1`] = `""`; - -exports[`show detailed usage with --help plugin-search-dir (stdout) 1`] = ` -"--plugin-search-dir <path> - - Custom directory that contains prettier plugins in node_modules subdirectory. - Overrides default behavior when plugins are searched relatively to the location of Prettier. - Multiple values are accepted. - -Default: [] -" -`; - -exports[`show detailed usage with --help plugin-search-dir (write) 1`] = `[]`; - -exports[`show detailed usage with --help print-width (stderr) 1`] = `""`; - -exports[`show detailed usage with --help print-width (stdout) 1`] = ` -"--print-width <int> +exports[`show detailed usage with --help print-width 1`] = ` +{ + "stderr": "", + "stdout": "--print-width <int> The line length where Prettier will try wrap. -Default: 80 -" +Default: 80", + "write": [], +} `; -exports[`show detailed usage with --help print-width (write) 1`] = `[]`; - -exports[`show detailed usage with --help prose-wrap (stderr) 1`] = `""`; - -exports[`show detailed usage with --help prose-wrap (stdout) 1`] = ` -"--prose-wrap <always|never|preserve> +exports[`show detailed usage with --help prose-wrap 1`] = ` +{ + "stderr": "", + "stdout": "--prose-wrap <always|never|preserve> How to wrap prose. @@ -511,16 +522,15 @@ Valid options: never Do not wrap prose. preserve Wrap prose as-is. -Default: preserve -" +Default: preserve", + "write": [], +} `; -exports[`show detailed usage with --help prose-wrap (write) 1`] = `[]`; - -exports[`show detailed usage with --help quote-props (stderr) 1`] = `""`; - -exports[`show detailed usage with --help quote-props (stdout) 1`] = ` -"--quote-props <as-needed|consistent|preserve> +exports[`show detailed usage with --help quote-props 1`] = ` +{ + "stderr": "", + "stdout": "--quote-props <as-needed|consistent|preserve> Change when properties in objects are quoted. @@ -530,204 +540,185 @@ Valid options: consistent If at least one property in an object requires quotes, quote all properties. preserve Respect the input use of quotes in object properties. -Default: as-needed -" +Default: as-needed", + "write": [], +} `; -exports[`show detailed usage with --help quote-props (write) 1`] = `[]`; - -exports[`show detailed usage with --help range-end (stderr) 1`] = `""`; - -exports[`show detailed usage with --help range-end (stdout) 1`] = ` -"--range-end <int> +exports[`show detailed usage with --help range-end 1`] = ` +{ + "stderr": "", + "stdout": "--range-end <int> Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement. - This option cannot be used with --cursor-offset. -Default: Infinity -" +Default: Infinity", + "write": [], +} `; -exports[`show detailed usage with --help range-end (write) 1`] = `[]`; - -exports[`show detailed usage with --help range-start (stderr) 1`] = `""`; - -exports[`show detailed usage with --help range-start (stdout) 1`] = ` -"--range-start <int> +exports[`show detailed usage with --help range-start 1`] = ` +{ + "stderr": "", + "stdout": "--range-start <int> Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement. - This option cannot be used with --cursor-offset. -Default: 0 -" +Default: 0", + "write": [], +} `; -exports[`show detailed usage with --help range-start (write) 1`] = `[]`; - -exports[`show detailed usage with --help require-pragma (stderr) 1`] = `""`; +exports[`show detailed usage with --help require-pragma 1`] = ` +{ + "stderr": "", + "stdout": "--require-pragma -exports[`show detailed usage with --help require-pragma (stdout) 1`] = ` -"--require-pragma + Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted. - Require either '@prettier' or '@format' to be present in the file's first docblock comment - in order for it to be formatted. - -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help require-pragma (write) 1`] = `[]`; - -exports[`show detailed usage with --help semi (stderr) 1`] = `""`; - -exports[`show detailed usage with --help semi (stdout) 1`] = ` -"--semi +exports[`show detailed usage with --help semi 1`] = ` +{ + "stderr": "", + "stdout": "--semi Print semicolons. -Default: true -" +Default: true", + "write": [], +} `; -exports[`show detailed usage with --help semi (write) 1`] = `[]`; - -exports[`show detailed usage with --help single-attribute-per-line (stderr) 1`] = `""`; - -exports[`show detailed usage with --help single-attribute-per-line (stdout) 1`] = ` -"--single-attribute-per-line +exports[`show detailed usage with --help single-attribute-per-line 1`] = ` +{ + "stderr": "", + "stdout": "--single-attribute-per-line Enforce single attribute per line in HTML, Vue and JSX. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help single-attribute-per-line (write) 1`] = `[]`; - -exports[`show detailed usage with --help single-quote (stderr) 1`] = `""`; - -exports[`show detailed usage with --help single-quote (stdout) 1`] = ` -"--single-quote +exports[`show detailed usage with --help single-quote 1`] = ` +{ + "stderr": "", + "stdout": "--single-quote Use single quotes instead of double quotes. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help single-quote (write) 1`] = `[]`; +exports[`show detailed usage with --help stdin-filepath 1`] = ` +{ + "stderr": "", + "stdout": "--stdin-filepath <path> -exports[`show detailed usage with --help stdin-filepath (stderr) 1`] = `""`; - -exports[`show detailed usage with --help stdin-filepath (stdout) 1`] = ` -"--stdin-filepath <path> - - Path to the file to pretend that stdin comes from. -" + Path to the file to pretend that stdin comes from.", + "write": [], +} `; -exports[`show detailed usage with --help stdin-filepath (write) 1`] = `[]`; - -exports[`show detailed usage with --help support-info (stderr) 1`] = `""`; - -exports[`show detailed usage with --help support-info (stdout) 1`] = ` -"--support-info +exports[`show detailed usage with --help support-info 1`] = ` +{ + "stderr": "", + "stdout": "--support-info - Print support information as JSON. -" + Print support information as JSON.", + "write": [], +} `; -exports[`show detailed usage with --help support-info (write) 1`] = `[]`; - -exports[`show detailed usage with --help tab-width (stderr) 1`] = `""`; - -exports[`show detailed usage with --help tab-width (stdout) 1`] = ` -"--tab-width <int> +exports[`show detailed usage with --help tab-width 1`] = ` +{ + "stderr": "", + "stdout": "--tab-width <int> Number of spaces per indentation level. -Default: 2 -" +Default: 2", + "write": [], +} `; -exports[`show detailed usage with --help tab-width (write) 1`] = `[]`; - -exports[`show detailed usage with --help trailing-comma (stderr) 1`] = `""`; - -exports[`show detailed usage with --help trailing-comma (stdout) 1`] = ` -"--trailing-comma <es5|none|all> +exports[`show detailed usage with --help trailing-comma 1`] = ` +{ + "stderr": "", + "stdout": "--trailing-comma <all|es5|none> Print trailing commas wherever possible when multi-line. Valid options: + all Trailing commas wherever possible (including function arguments). es5 Trailing commas where valid in ES5 (objects, arrays, etc.) none No trailing commas. - all Trailing commas wherever possible (including function arguments). -Default: es5 -" +Default: all", + "write": [], +} `; -exports[`show detailed usage with --help trailing-comma (write) 1`] = `[]`; - -exports[`show detailed usage with --help use-tabs (stderr) 1`] = `""`; - -exports[`show detailed usage with --help use-tabs (stdout) 1`] = ` -"--use-tabs +exports[`show detailed usage with --help use-tabs 1`] = ` +{ + "stderr": "", + "stdout": "--use-tabs Indent with tabs instead of spaces. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help use-tabs (write) 1`] = `[]`; - -exports[`show detailed usage with --help version (stderr) 1`] = `""`; - -exports[`show detailed usage with --help version (stdout) 1`] = ` -"-v, --version +exports[`show detailed usage with --help version 1`] = ` +{ + "stderr": "", + "stdout": "-v, --version - Print Prettier version. -" + Print Prettier version.", + "write": [], +} `; -exports[`show detailed usage with --help version (write) 1`] = `[]`; - -exports[`show detailed usage with --help vue-indent-script-and-style (stderr) 1`] = `""`; - -exports[`show detailed usage with --help vue-indent-script-and-style (stdout) 1`] = ` -"--vue-indent-script-and-style +exports[`show detailed usage with --help vue-indent-script-and-style 1`] = ` +{ + "stderr": "", + "stdout": "--vue-indent-script-and-style Indent script and style tags in Vue files. -Default: false -" +Default: false", + "write": [], +} `; -exports[`show detailed usage with --help vue-indent-script-and-style (write) 1`] = `[]`; - -exports[`show detailed usage with --help with-node-modules (stderr) 1`] = `""`; - -exports[`show detailed usage with --help with-node-modules (stdout) 1`] = ` -"--with-node-modules +exports[`show detailed usage with --help with-node-modules 1`] = ` +{ + "stderr": "", + "stdout": "--with-node-modules - Process files inside 'node_modules' directory. -" + Process files inside 'node_modules' directory.", + "write": [], +} `; -exports[`show detailed usage with --help with-node-modules (write) 1`] = `[]`; +exports[`show detailed usage with --help write 1`] = ` +{ + "stderr": "", + "stdout": "-w, --write -exports[`show detailed usage with --help write (stderr) 1`] = `""`; - -exports[`show detailed usage with --help write (stdout) 1`] = ` -"-w, --write - - Edit files in-place. (Beware!) -" + Edit files in-place. (Beware!)", + "write": [], +} `; - -exports[`show detailed usage with --help write (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-absolute-path.js.snap b/tests/integration/__tests__/__snapshots__/ignore-absolute-path.js.snap index 120016090ada..2e6692d95e52 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-absolute-path.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-absolute-path.js.snap @@ -1,10 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`support absolute filename (stderr) 1`] = `""`; - -exports[`support absolute filename (stdout) 1`] = ` -"regular-module.js -" +exports[`support absolute filename 1`] = ` +{ + "stderr": "", + "stdout": "regular-module.js", + "write": [], +} `; - -exports[`support absolute filename (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-emoji.js.snap b/tests/integration/__tests__/__snapshots__/ignore-emoji.js.snap deleted file mode 100644 index ea1e698c2abe..000000000000 --- a/tests/integration/__tests__/__snapshots__/ignore-emoji.js.snap +++ /dev/null @@ -1,16 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignores file name contains emoji (stderr) 1`] = `""`; - -exports[`ignores file name contains emoji (stdout) 1`] = ` -"not-ignored.js -" -`; - -exports[`ignores file name contains emoji (write) 1`] = `[]`; - -exports[`stdin (stderr) 1`] = `""`; - -exports[`stdin (stdout) 1`] = `".name { display: none; }"`; - -exports[`stdin (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-in-subdirectories.js.snap b/tests/integration/__tests__/__snapshots__/ignore-in-subdirectories.js.snap index ab13f5025f2b..1b5e10523581 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-in-subdirectories.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-in-subdirectories.js.snap @@ -1,39 +1,47 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`formats files when executing in a subdirectory (stderr) 1`] = `""`; - -exports[`formats files when executing in a subdirectory (stderr) 2`] = `""`; - -exports[`formats files when executing in a subdirectory (stdout) 1`] = ` -"should-not-ignore.js -" +exports[`formats files when executing in a subdirectory 1`] = ` +{ + "stderr": "", + "stdout": "should-not-ignore.js", + "write": [], +} `; -exports[`formats files when executing in a subdirectory (stdout) 2`] = ` -"should-not-ignore.js -" +exports[`formats files when executing in a subdirectory 2`] = ` +{ + "stderr": "", + "stdout": "should-not-ignore.js", + "write": [], +} `; -exports[`formats files when executing in a subdirectory (write) 1`] = `[]`; - -exports[`formats files when executing in a subdirectory (write) 2`] = `[]`; - -exports[`formats files when executing in a subdirectory and using stdin (stderr) 1`] = `""`; - -exports[`formats files when executing in a subdirectory and using stdin (write) 1`] = `[]`; - -exports[`ignore files when executing in a subdirectory and using stdin (stderr) 1`] = `""`; - -exports[`ignore files when executing in a subdirectory and using stdin (write) 1`] = `[]`; - -exports[`ignores files when executing in a subdirectory (stderr) 1`] = `""`; - -exports[`ignores files when executing in a subdirectory (stderr) 2`] = `""`; - -exports[`ignores files when executing in a subdirectory (stdout) 1`] = `""`; +exports[`formats files when executing in a subdirectory and using stdin 1`] = ` +{ + "stderr": "", + "write": [], +} +`; -exports[`ignores files when executing in a subdirectory (stdout) 2`] = `""`; +exports[`ignore files when executing in a subdirectory and using stdin 1`] = ` +{ + "stderr": "", + "write": [], +} +`; -exports[`ignores files when executing in a subdirectory (write) 1`] = `[]`; +exports[`ignores files when executing in a subdirectory 1`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} +`; -exports[`ignores files when executing in a subdirectory (write) 2`] = `[]`; +exports[`ignores files when executing in a subdirectory 2`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-path.js.snap b/tests/integration/__tests__/__snapshots__/ignore-path.js.snap deleted file mode 100644 index e5655fe8dd5f..000000000000 --- a/tests/integration/__tests__/__snapshots__/ignore-path.js.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ignore file when using --debug-check (stderr) 1`] = `""`; - -exports[`ignore file when using --debug-check (stdout) 1`] = ` -"other-regular-modules.js -" -`; - -exports[`ignore file when using --debug-check (write) 1`] = `[]`; - -exports[`ignore path (stderr) 1`] = `""`; - -exports[`ignore path (stdout) 1`] = ` -"regular-module.js -" -`; - -exports[`ignore path (write) 1`] = `[]`; - -exports[`outputs files as-is if no --write (stderr) 1`] = `""`; - -exports[`outputs files as-is if no --write (stdout) 1`] = ` -"'use strict'; -" -`; - -exports[`outputs files as-is if no --write (write) 1`] = `[]`; - -exports[`support .prettierignore (stderr) 1`] = `""`; - -exports[`support .prettierignore (stdout) 1`] = ` -"other-regular-modules.js -" -`; - -exports[`support .prettierignore (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-relative-path.js.snap b/tests/integration/__tests__/__snapshots__/ignore-relative-path.js.snap index 6b1d6b92a68c..484ba15620df 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-relative-path.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-relative-path.js.snap @@ -1,12 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`support relative paths (stderr) 1`] = `""`; - -exports[`support relative paths (stdout) 1`] = ` -"shouldNotBeIgnored.js +exports[`support relative paths 1`] = ` +{ + "stderr": "", + "stdout": "shouldNotBeIgnored.js level1-glob/level2-glob/level3-glob/shouldNotBeIgnored.scss -level1-glob/shouldNotBeIgnored.js -" +level1-glob/shouldNotBeIgnored.js", + "write": [], +} `; - -exports[`support relative paths (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap index 285b799cc11e..89d9bc6e710d 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap @@ -1,69 +1,75 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Ignored file (stderr) 1`] = `""`; - -exports[`Ignored file (stdout) 1`] = `""`; - -exports[`Ignored file (write) 1`] = `[]`; - -exports[`None exist file (stderr) 1`] = ` -"[error] No files matching the pattern were found: "non-exist-file". -" +exports[`Ignored file 1`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} `; -exports[`None exist file (stdout) 1`] = `""`; - -exports[`None exist file (write) 1`] = `[]`; - -exports[`Not matching pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: "*.non-exist-pattern". -" +exports[`None exist file 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "non-exist-file".", + "stdout": "", + "write": [], +} `; -exports[`Not matching pattern (stdout) 1`] = `""`; - -exports[`Not matching pattern (write) 1`] = `[]`; - -exports[`ignore-unknown alias (stdout) 1`] = ` -"javascript.js -" +exports[`Not matching pattern 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "*.non-exist-pattern".", + "stdout": "", + "write": [], +} `; -exports[`ignore-unknown check (stderr) 1`] = ` -"[warn] javascript.js -[warn] Code style issues found in the above file. Forgot to run Prettier? -" +exports[`ignore-unknown alias 1`] = ` +{ + "stdout": "javascript.js +override.as-js-file", +} `; -exports[`ignore-unknown check (stdout) 1`] = ` -"Checking formatting... -" +exports[`ignore-unknown check 1`] = ` +{ + "stderr": "[warn] javascript.js +[warn] override.as-js-file +[warn] Code style issues found in 2 files. Run Prettier with --write to fix.", + "stdout": "Checking formatting...", + "write": [], +} `; -exports[`ignore-unknown check (write) 1`] = `[]`; - -exports[`ignore-unknown dir (stdout) 1`] = ` -"javascript.js -" +exports[`ignore-unknown dir 1`] = ` +{ + "stdout": "javascript.js +override.as-js-file", +} `; -exports[`ignore-unknown pattern (stdout) 1`] = ` -"javascript.js -override.as-js-file -" +exports[`ignore-unknown pattern 1`] = ` +{ + "stdout": "javascript.js +override.as-js-file", +} `; -exports[`ignore-unknown write (stdout) 1`] = ` -"javascript.js -" -`; - -exports[`ignore-unknown write (write) 1`] = ` -[ - { - "content": "const foo = "bar"; +exports[`ignore-unknown write 1`] = ` +{ + "stdout": "javascript.js +override.as-js-file", + "write": [ + { + "content": "const foo = "bar"; +", + "filename": "javascript.js", + }, + { + "content": "const foo = "bar"; ", - "filename": "javascript.js", - }, -] + "filename": "override.as-js-file", + }, + ], +} `; diff --git a/tests/integration/__tests__/__snapshots__/ignore-vcs-files.js.snap b/tests/integration/__tests__/__snapshots__/ignore-vcs-files.js.snap index 612c4c62e7b0..b3b5cad0d5b0 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-vcs-files.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-vcs-files.js.snap @@ -1,10 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ignores files in version control systems (stderr) 1`] = `""`; - -exports[`ignores files in version control systems (stdout) 1`] = ` -"file.js -" +exports[`ignores files in version control systems 1`] = ` +{ + "stderr": "", + "stdout": "file.js", + "write": [], +} `; - -exports[`ignores files in version control systems (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap index 9e75d1a6cf8f..da01365cecb4 100644 --- a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap +++ b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap @@ -1,185 +1,178 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`--check with unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -[warn] foo.js -[warn] Code style issues found in the above file. Forgot to run Prettier? -" -`; - -exports[`--check with unknown path and no parser multiple files (stdout) 1`] = ` -"Checking formatting... -" -`; - -exports[`--check with unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" -`; - -exports[`--check with unknown path and no parser specific file (stdout) 1`] = ` -"Checking formatting... -All matched files use Prettier code style! -" -`; - -exports[`--list-different with unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" -`; - -exports[`--list-different with unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" -`; - -exports[`--write and --check with unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -[warn] foo.js -[warn] Code style issues fixed in the above file. -" -`; - -exports[`--write and --check with unknown path and no parser multiple files (stdout) 1`] = ` -"Checking formatting... -" -`; - -exports[`--write and --check with unknown path and no parser multiple files (write) 1`] = ` -[ - { - "content": "foo(); +exports[`--check with unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO". +[warn] foo.js", + "stdout": "Checking formatting... +Error occurred when checking code style in the above file.", +} +`; + +exports[`--check with unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", + "stdout": "Checking formatting... +Error occurred when checking code style in the above file.", +} +`; + +exports[`--list-different with unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", +} +`; + +exports[`--list-different with unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", +} +`; + +exports[`--write and --check with unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO". +[warn] foo.js", + "stdout": "Checking formatting... +Error occurred when checking code style in the above file.", + "write": [ + { + "content": "foo(); ", - "filename": "foo.js", - }, -] -`; - -exports[`--write and --check with unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" -`; - -exports[`--write and --check with unknown path and no parser specific file (stdout) 1`] = ` -"Checking formatting... -All matched files use Prettier code style! -" -`; - -exports[`--write and --list-different with unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" -`; - -exports[`--write and --list-different with unknown path and no parser multiple files (stdout) 1`] = ` -"foo.js -" -`; - -exports[`--write and --list-different with unknown path and no parser multiple files (write) 1`] = ` -[ - { - "content": "foo(); + "filename": "foo.js", + }, + ], +} +`; + +exports[`--write and --check with unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", + "stdout": "Checking formatting... +Error occurred when checking code style in the above file.", +} +`; + +exports[`--write and --list-different with unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", + "stdout": "foo.js", + "write": [ + { + "content": "foo(); ", - "filename": "foo.js", - }, -] -`; - -exports[`--write and --list-different with unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" + "filename": "foo.js", + }, + ], +} `; -exports[`--write with unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" +exports[`--write and --list-different with unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", +} `; -exports[`--write with unknown path and no parser multiple files (stdout) 1`] = ` -"foo.js 0ms -" -`; - -exports[`--write with unknown path and no parser multiple files (write) 1`] = ` -[ - { - "content": "foo(); +exports[`--write with unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", + "stdout": "foo.js 0ms", + "write": [ + { + "content": "foo(); ", - "filename": "foo.js", - }, -] + "filename": "foo.js", + }, + ], +} `; -exports[`--write with unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" +exports[`--write with unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", +} `; -exports[`API with no path and no parser prettier.check 1`] = ` -[ - "No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.", -] +exports[`Interpreters 1`] = ` +{ + "stdout": "{ "ignored": false, "inferredParser": "babel" }", +} `; -exports[`API with no path and no parser prettier.format 1`] = ` -[ - "No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.", -] +exports[`Known/Unknown 1`] = ` +{ + "stdout": "known.js", +} `; -exports[`Interpreters (stdout) 1`] = ` -"{ "ignored": false, "inferredParser": "babel" } - -" +exports[`isSupported 1`] = ` +{ + "stdout": "{ + "ignored": false, + "inferredParser": "parser-name-inferred-from-language-is-supported" +}", +} `; -exports[`Known/Unknown (stdout) 1`] = ` -"known.js -" +exports[`isSupported 2`] = ` +{ + "stdout": "content from file +formatted by 'parser-name-inferred-from-language-is-supported' parser", +} `; -exports[`stdin no path and no parser --check logs error but exits with 0 (stderr) 1`] = ` -"[error] No parser and no file path given, couldn't infer a parser. -" +exports[`isSupported 3`] = ` +{ + "stdout": "content from stdin +formatted by 'parser-name-inferred-from-language-is-supported' parser", +} `; -exports[`stdin no path and no parser --list-different logs error but exits with 0 (stderr) 1`] = ` -"[error] No parser and no file path given, couldn't infer a parser. -" +exports[`stdin no path and no parser --check logs error but exits with 0 1`] = ` +{ + "stderr": "[error] No parser and no file path given, couldn't infer a parser.", +} `; -exports[`stdin no path and no parser logs error and exits with 2 (stderr) 1`] = ` -"[error] No parser and no file path given, couldn't infer a parser. -" +exports[`stdin no path and no parser --list-different logs error but exits with 0 1`] = ` +{ + "stderr": "[error] No parser and no file path given, couldn't infer a parser.", +} `; -exports[`stdin with unknown path and no parser --check logs error but exits with 0 (stderr) 1`] = ` -"[error] No parser could be inferred for file: foo -" +exports[`stdin no path and no parser logs error and exits with 2 1`] = ` +{ + "stderr": "[error] No parser and no file path given, couldn't infer a parser.", +} `; -exports[`stdin with unknown path and no parser --list-different logs error but exits with 0 (stderr) 1`] = ` -"[error] No parser could be inferred for file: foo -" +exports[`stdin with unknown path and no parser --check logs error but exits with 0 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/foo".", +} `; -exports[`stdin with unknown path and no parser logs error and exits with 2 (stderr) 1`] = ` -"[error] No parser could be inferred for file: foo -" +exports[`stdin with unknown path and no parser --list-different logs error but exits with 0 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/foo".", +} `; -exports[`unknown path and no parser multiple files (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" +exports[`stdin with unknown path and no parser logs error and exits with 2 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/foo".", +} `; -exports[`unknown path and no parser multiple files (stdout) 1`] = ` -"foo(); -" +exports[`unknown path and no parser multiple files 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", + "stdout": "foo();", +} `; -exports[`unknown path and no parser specific file (stderr) 1`] = ` -"[error] No parser could be inferred for file: FOO -" +exports[`unknown path and no parser specific file 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/infer-parser/FOO".", +} `; diff --git a/tests/integration/__tests__/__snapshots__/infer-plugins-ext-dir.js.snap b/tests/integration/__tests__/__snapshots__/infer-plugins-ext-dir.js.snap new file mode 100644 index 000000000000..881e1405eb92 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/infer-plugins-ext-dir.js.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`infer file ext that supported by only plugins basic 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with config option 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with defaultOptions 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with multiple config for nested dir 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with multiple config for nested dir 2 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with multiple config for nested dir 2 2`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with overrides and defaultOptions 1`] = ` +{ + "stderr": "", +} +`; + +exports[`infer file ext that supported by only plugins with overrides options 1`] = ` +{ + "stderr": "", +} +`; diff --git a/tests/integration/__tests__/__snapshots__/invalid-ignore.js.snap b/tests/integration/__tests__/__snapshots__/invalid-ignore.js.snap index 6cb6cf17650c..c75f612f887f 100644 --- a/tests/integration/__tests__/__snapshots__/invalid-ignore.js.snap +++ b/tests/integration/__tests__/__snapshots__/invalid-ignore.js.snap @@ -1,10 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`throw error with invalid ignore (stderr) 1`] = ` -"[error] Unable to read <cwd>/tests/integration/cli/invalid-ignore/.prettierignore: EISDIR: illegal operation on a directory, read -" +exports[`throw error with invalid ignore 1`] = ` +{ + "stderr": "[error] Unable to read '.prettierignore': EISDIR: illegal operation on a directory, read", + "stdout": "", + "write": [], +} `; - -exports[`throw error with invalid ignore (stdout) 1`] = `""`; - -exports[`throw error with invalid ignore (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap new file mode 100644 index 000000000000..14b4c4f2b43d --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap @@ -0,0 +1,85 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Line breaking after filepath with errors 1`] = ` +{ + "stderr": "[error] invalid-1.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] invalid-2.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] No parser could be inferred for file "<cli>/syntax-errors/invalid-2.unknown".", + "stdout": "invalid-1.js +invalid-2.js +invalid-2.unknown +valid-1.js +[[Clear text(process.stdout): valid-1.js]] +function foo() {}", + "write": [], +} +`; + +exports[`Line breaking after filepath with errors 2`] = ` +{ + "stderr": "[error] invalid-1.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] invalid-2.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] No parser could be inferred for file "<cli>/syntax-errors/invalid-2.unknown".", + "stdout": "invalid-1.js +invalid-2.js +invalid-2.unknown +valid-1.js +[[Clear text(process.stdout): valid-1.js]]", + "write": [], +} +`; + +exports[`Line breaking after filepath with errors 3`] = ` +{ + "stderr": "[error] invalid-1.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] invalid-2.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] No parser could be inferred for file "<cli>/syntax-errors/invalid-2.unknown".", + "stdout": "Checking formatting... +invalid-1.js +invalid-2.js +invalid-2.unknown +valid-1.js +[[Clear text(process.stdout): valid-1.js]] +Error occurred when checking code style in 3 files.", + "write": [], +} +`; + +exports[`Line breaking after filepath with errors 4`] = ` +{ + "stderr": "[error] invalid-1.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] invalid-2.js: SyntaxError: Unexpected token (1:8) +[error] > 1 | foo (+-) bar +[error] | ^ +[error] 2 | +[error] No parser could be inferred for file "<cli>/syntax-errors/invalid-2.unknown".", + "stdout": "invalid-1.js +invalid-2.js +invalid-2.unknown +valid-1.js +[[Clear text(process.stdout): valid-1.js]] +valid-1.js 0ms (unchanged)", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/list-different.js.snap b/tests/integration/__tests__/__snapshots__/list-different.js.snap index 1fd48596b77f..57e59986660e 100644 --- a/tests/integration/__tests__/__snapshots__/list-different.js.snap +++ b/tests/integration/__tests__/__snapshots__/list-different.js.snap @@ -1,23 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`--list-different works in CI just as in a non-TTY mode (stderr) 1`] = `""`; - -exports[`--list-different works in CI just as in a non-TTY mode (stderr) 2`] = `""`; - -exports[`--list-different works in CI just as in a non-TTY mode (stdout) 1`] = ` -"unformatted.js -" +exports[`--list-different works in CI just as in a non-TTY mode 1`] = ` +{ + "stderr": "", + "stdout": "unformatted.js", + "write": [], +} `; -exports[`--list-different works in CI just as in a non-TTY mode (stdout) 2`] = ` -"unformatted.js -" +exports[`--list-different works in CI just as in a non-TTY mode 2`] = ` +{ + "stderr": "", + "stdout": "unformatted.js", + "write": [], +} `; -exports[`--list-different works in CI just as in a non-TTY mode (write) 1`] = `[]`; - -exports[`--list-different works in CI just as in a non-TTY mode (write) 2`] = `[]`; - -exports[`checks stdin with --list-different (write) 1`] = `[]`; +exports[`checks stdin with --list-different 1`] = ` +{ + "write": [], +} +`; -exports[`checks stdin with -l (alias for --list-different) (write) 1`] = `[]`; +exports[`checks stdin with -l (alias for --list-different) 1`] = ` +{ + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/load-toml.js.snap b/tests/integration/__tests__/__snapshots__/load-toml.js.snap deleted file mode 100644 index c0ef4d032714..000000000000 --- a/tests/integration/__tests__/__snapshots__/load-toml.js.snap +++ /dev/null @@ -1,30 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TOML loads toml successfully 1`] = ` -{ - "database": { - "connection_max": 5000, - "enabled": true, - "ports": [ - 8001, - 8001, - 8002, - ], - "server": "192.168.1.1", - }, - "owner": { - "dob": 1979-05-27T15:32:00.000Z, - "name": "Tom Preston-Werner", - }, - "title": "TOML Example", -} -`; - -exports[`TOML throws error on incorrect toml 1`] = ` -"TOML Error in example.toml: -Unknown character "47" at row 1, col 2, pos 1: -1> ///ERROR/// - ^ - -" -`; diff --git a/tests/integration/__tests__/__snapshots__/log-level.js.snap b/tests/integration/__tests__/__snapshots__/log-level.js.snap new file mode 100644 index 000000000000..f11b8c0665a6 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/log-level.js.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`--write with --log-level=silent doesn't log filenames 1`] = ` +{ + "stderr": "", + "stdout": "", + "write": [ + { + "content": "var x = 1; +", + "filename": "unformatted.js", + }, + ], +} +`; + +exports[`Should use default level logger to log \`--log-level\` error 1`] = ` +{ + "stderr": "[error] Invalid --log-level value. Expected one of the following values, but received "a-unknown-log-level". +[error] - "debug" +[error] - "error" +[error] - "log" +[error] - "silent" +[error] - "warn"", +} +`; diff --git a/tests/integration/__tests__/__snapshots__/loglevel.js.snap b/tests/integration/__tests__/__snapshots__/loglevel.js.snap deleted file mode 100644 index e5d13422ee3d..000000000000 --- a/tests/integration/__tests__/__snapshots__/loglevel.js.snap +++ /dev/null @@ -1,20 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`--write with --loglevel=silent doesn't log filenames (stderr) 1`] = `""`; - -exports[`--write with --loglevel=silent doesn't log filenames (stdout) 1`] = `""`; - -exports[`--write with --loglevel=silent doesn't log filenames (write) 1`] = ` -[ - { - "content": "var x = 1; -", - "filename": "unformatted.js", - }, -] -`; - -exports[`Should use default level logger to log \`--loglevel\` error (stderr) 1`] = ` -"[error] Invalid --loglevel value. Expected "debug", "error", "log", "silent" or "warn", but received "a-unknown-log-level". -" -`; diff --git a/tests/integration/__tests__/__snapshots__/parser-api.js.snap b/tests/integration/__tests__/__snapshots__/parser-api.js.snap deleted file mode 100644 index 4ee558265fd8..000000000000 --- a/tests/integration/__tests__/__snapshots__/parser-api.js.snap +++ /dev/null @@ -1,11 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`allows passing a string to resolve a parser (stderr) 1`] = `""`; - -exports[`allows passing a string to resolve a parser (stdout) 1`] = ` -"/* eslint-disable */ -bar(); -" -`; - -exports[`allows passing a string to resolve a parser (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap index c52084b2b994..7c39e8e56a6e 100644 --- a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap +++ b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`1: prettier dir1 dir2 (stdout) 1`] = ` -"dir1/a1.js +exports[`1: prettier dir1 dir2 1`] = ` +{ + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js @@ -10,11 +11,13 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`1a - with *.foo plugin: prettier dir1 dir2 --plugin=../../plugins/extensions/plugin (stdout) 1`] = ` -"dir1/a1.foo +exports[`1a - with *.foo plugin: prettier dir1 dir2 --plugin=../../plugins/extensions/plugin.cjs 1`] = ` +{ + "stdout": "dir1/a1.foo dir1/a1.js dir1/b1.js dir1/nested1/an1.css @@ -25,30 +28,25 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`1c: prettier dir1 empty (stderr) 1`] = ` -"[error] No supported files were found in the directory: "empty". -" -`; - -exports[`1c: prettier dir1 empty (stdout) 1`] = ` -"dir1/a1.js +exports[`1c: prettier dir1 empty 1`] = ` +{ + "stderr": "", + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js -dir1/nested1/bn1.js -" +dir1/nested1/bn1.js", +} `; -exports[`2: prettier dir1 'dir2/**/*' (stderr) 1`] = ` -"[error] No parser could be inferred for file: dir2/a2.foo -" -`; - -exports[`2: prettier dir1 'dir2/**/*' (stdout) 1`] = ` -"dir1/a1.js +exports[`2: prettier dir1 'dir2/**/*' 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/patterns-dirs/dir2/a2.foo".", + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js @@ -57,32 +55,26 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -dir2/node-shebang -" +dir2/node-shebang", +} `; -exports[`3: prettier nonexistent-dir 'dir2/**/*' (stderr) 1`] = ` -"[error] No files matching the pattern were found: "nonexistent-dir". -[error] No parser could be inferred for file: dir2/a2.foo -" -`; - -exports[`3: prettier nonexistent-dir 'dir2/**/*' (stdout) 1`] = ` -"dir2/a2.js +exports[`3: prettier nonexistent-dir 'dir2/**/*' 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "nonexistent-dir". +[error] No parser could be inferred for file "<cli>/patterns-dirs/dir2/a2.foo".", + "stdout": "dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -dir2/node-shebang -" -`; - -exports[`4: prettier . 'dir2/**/*' (stderr) 1`] = ` -"[error] No parser could be inferred for file: dir2/a2.foo -" +dir2/node-shebang", +} `; -exports[`4: prettier . 'dir2/**/*' (stdout) 1`] = ` -"!dir/a.js +exports[`4: prettier . 'dir2/**/*' 1`] = ` +{ + "stderr": "", + "stdout": "!dir/a.js dir1/a1.js dir1/b1.js dir1/nested1/an1.css @@ -92,35 +84,40 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -dir2/node-shebang -" +dir2/node-shebang", +} `; -exports[`Negative patterns 1: prettier dir1 '!dir1/nested1' (stdout) 1`] = ` -"dir1/a1.js -dir1/b1.js -" +exports[`Negative patterns 1: prettier dir1 '!dir1/nested1' 1`] = ` +{ + "stdout": "dir1/a1.js +dir1/b1.js", +} `; -exports[`Negative patterns 1a: prettier dir1 '!dir1/nested1/*' (stdout) 1`] = ` -"dir1/a1.js -dir1/b1.js -" +exports[`Negative patterns 1a: prettier dir1 '!dir1/nested1/*' 1`] = ` +{ + "stdout": "dir1/a1.js +dir1/b1.js", +} `; -exports[`Negative patterns 2: prettier . '!dir1/nested1' (stdout) 1`] = ` -"!dir/a.js +exports[`Negative patterns 2: prettier . '!dir1/nested1' 1`] = ` +{ + "stdout": "!dir/a.js dir1/a1.js dir1/b1.js dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`Negative patterns 3: prettier . '!dir1/nested1/an1.js' (stdout) 1`] = ` -"!dir/a.js +exports[`Negative patterns 3: prettier . '!dir1/nested1/an1.js' 1`] = ` +{ + "stdout": "!dir/a.js dir1/a1.js dir1/b1.js dir1/nested1/an1.css @@ -129,28 +126,27 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`Negative patterns 4: prettier '!nonexistent-dir1 !nonexistent-dir2' (stderr) 1`] = ` -"[error] No matching files. Patterns: !nonexistent-dir1 !nonexistent-dir2 -" +exports[`Negative patterns 4: prettier '!nonexistent-dir1 !nonexistent-dir2' 1`] = ` +{ + "stderr": "[error] No matching files. Patterns: !nonexistent-dir1 !nonexistent-dir2", + "stdout": "", +} `; -exports[`Negative patterns 4: prettier '!nonexistent-dir1 !nonexistent-dir2' (stdout) 1`] = `""`; - -exports[`Negative patterns with explicit files: prettier dir1/a1.js dir2/a2.js '!dir1/*' (stderr) 1`] = ` -"[error] Explicitly specified file was ignored due to negative glob patterns: "dir1/a1.js". -" -`; - -exports[`Negative patterns with explicit files: prettier dir1/a1.js dir2/a2.js '!dir1/*' (stdout) 1`] = ` -"dir2/a2.js -" +exports[`Negative patterns with explicit files: prettier dir1/a1.js dir2/a2.js '!dir1/*' 1`] = ` +{ + "stderr": "[error] Explicitly specified file was ignored due to negative glob patterns: "dir1/a1.js".", + "stdout": "dir2/a2.js", +} `; -exports[`Trailing slash 1: prettier ./ (stdout) 1`] = ` -"!dir/a.js +exports[`Trailing slash 1: prettier ./ 1`] = ` +{ + "stdout": "!dir/a.js dir1/a1.js dir1/b1.js dir1/nested1/an1.css @@ -160,11 +156,13 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`Trailing slash 2: prettier .// (stdout) 1`] = ` -"!dir/a.js +exports[`Trailing slash 2: prettier .// 1`] = ` +{ + "stdout": "!dir/a.js dir1/a1.js dir1/b1.js dir1/nested1/an1.css @@ -174,38 +172,43 @@ dir2/a2.js dir2/b2.js dir2/nested2/an2.js dir2/nested2/bn2.js -" +dir2/node-shebang", +} `; -exports[`Trailing slash 3: prettier dir1/ (stdout) 1`] = ` -"dir1/a1.js +exports[`Trailing slash 3: prettier dir1/ 1`] = ` +{ + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js -dir1/nested1/bn1.js -" +dir1/nested1/bn1.js", +} `; -exports[`Trailing slash 4: prettier dir1// (stdout) 1`] = ` -"dir1/a1.js +exports[`Trailing slash 4: prettier dir1// 1`] = ` +{ + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js -dir1/nested1/bn1.js -" +dir1/nested1/bn1.js", +} `; -exports[`Trailing slash 5: prettier .//dir2/..//./dir1// (stdout) 1`] = ` -"dir1/a1.js +exports[`Trailing slash 5: prettier .//dir2/..//./dir1// 1`] = ` +{ + "stdout": "dir1/a1.js dir1/b1.js dir1/nested1/an1.css dir1/nested1/an1.js -dir1/nested1/bn1.js -" +dir1/nested1/bn1.js", +} `; -exports[`Trailing slash run in sub dir 1: prettier .. (stdout) 1`] = ` -"../!dir/a.js +exports[`Trailing slash run in sub dir 1: prettier .. 1`] = ` +{ + "stdout": "../!dir/a.js ../dir1/a1.js ../dir1/b1.js ../dir1/nested1/an1.css @@ -215,11 +218,13 @@ a2.js b2.js nested2/an2.js nested2/bn2.js -" +node-shebang", +} `; -exports[`Trailing slash run in sub dir 2: prettier ../ (stdout) 1`] = ` -"../!dir/a.js +exports[`Trailing slash run in sub dir 2: prettier ../ 1`] = ` +{ + "stdout": "../!dir/a.js ../dir1/a1.js ../dir1/b1.js ../dir1/nested1/an1.css @@ -229,40 +234,41 @@ a2.js b2.js nested2/an2.js nested2/bn2.js -" +node-shebang", +} `; -exports[`Trailing slash run in sub dir 3: prettier ../dir1 (stdout) 1`] = ` -"../dir1/a1.js +exports[`Trailing slash run in sub dir 3: prettier ../dir1 1`] = ` +{ + "stdout": "../dir1/a1.js ../dir1/b1.js ../dir1/nested1/an1.css ../dir1/nested1/an1.js -../dir1/nested1/bn1.js -" +../dir1/nested1/bn1.js", +} `; -exports[`Trailing slash run in sub dir 4: prettier ../dir1/ (stdout) 1`] = ` -"../dir1/a1.js +exports[`Trailing slash run in sub dir 4: prettier ../dir1/ 1`] = ` +{ + "stdout": "../dir1/a1.js ../dir1/b1.js ../dir1/nested1/an1.css ../dir1/nested1/an1.js -../dir1/nested1/bn1.js -" -`; - -exports[`plugins \`*\` (stderr) 1`] = ` -"[error] No parser could be inferred for file: unknown.unknown -" +../dir1/nested1/bn1.js", +} `; -exports[`plugins \`*\` (stdout) 1`] = ` -"javascript.js -plugin.uppercase-rocks -" +exports[`plugins \`*\` 1`] = ` +{ + "stderr": "[error] No parser could be inferred for file "<cli>/dirs/plugins/unknown.unknown".", + "stdout": "javascript.js +plugin.uppercase-rocks", +} `; -exports[`plugins \`.\` (stdout) 1`] = ` -"javascript.js -plugin.uppercase-rocks -" +exports[`plugins \`.\` 1`] = ` +{ + "stdout": "javascript.js +plugin.uppercase-rocks", +} `; diff --git a/tests/integration/__tests__/__snapshots__/patterns-glob.js.snap b/tests/integration/__tests__/__snapshots__/patterns-glob.js.snap index f64e341d2027..8d3ec1a16a8a 100644 --- a/tests/integration/__tests__/__snapshots__/patterns-glob.js.snap +++ b/tests/integration/__tests__/__snapshots__/patterns-glob.js.snap @@ -1,128 +1,115 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fixtures-1: Should match all files (stderr) 1`] = `""`; - -exports[`fixtures-1: Should match all files (stdout) 1`] = ` -"!file.js +exports[`fixtures-1: Should match all files 1`] = ` +{ + "stderr": "", + "stdout": "!file.js a.js -b.js -" +b.js", + "write": [], +} `; -exports[`fixtures-1: Should match all files (write) 1`] = `[]`; - -exports[`fixtures-1: Should match files except \`a.js\` (stderr) 1`] = `""`; - -exports[`fixtures-1: Should match files except \`a.js\` (stdout) 1`] = ` -"!file.js -b.js -" +exports[`fixtures-1: Should match files except \`a.js\` 1`] = ` +{ + "stderr": "", + "stdout": "!file.js +b.js", + "write": [], +} `; -exports[`fixtures-1: Should match files except \`a.js\` (write) 1`] = `[]`; - -exports[`fixtures-2: Should match \`a.js\` and \`!b.js\` (stderr) 1`] = `""`; - -exports[`fixtures-2: Should match \`a.js\` and \`!b.js\` (stdout) 1`] = ` -"!b.js -a.js -" +exports[`fixtures-2: Should match \`a.js\` and \`!b.js\` 1`] = ` +{ + "stderr": "", + "stdout": "!b.js +a.js", + "write": [], +} `; -exports[`fixtures-2: Should match \`a.js\` and \`!b.js\` (write) 1`] = `[]`; - -exports[`fixtures-2: Should match all js files and all supported files in the '!dir.js' directory (stderr) 1`] = `""`; - -exports[`fixtures-2: Should match all js files and all supported files in the '!dir.js' directory (stdout) 1`] = ` -"!b.js +exports[`fixtures-2: Should match all js files and all supported files in the '!dir.js' directory 1`] = ` +{ + "stderr": "", + "stdout": "!b.js a.js !dir.js/1.css -!dir.js/2.css -" +!dir.js/2.css", + "write": [], +} `; -exports[`fixtures-2: Should match all js files and all supported files in the '!dir.js' directory (write) 1`] = `[]`; - -exports[`fixtures-2: Should only match \`!b.js\` (stderr) 1`] = `""`; - -exports[`fixtures-2: Should only match \`!b.js\` (stdout) 1`] = ` -"!b.js -" +exports[`fixtures-2: Should only match \`!b.js\` 1`] = ` +{ + "stderr": "", + "stdout": "!b.js", + "write": [], +} `; -exports[`fixtures-2: Should only match \`!b.js\` (write) 1`] = `[]`; - -exports[`fixtures-3: Should exclude \`.svn\` (existing) (stderr) 1`] = `""`; - -exports[`fixtures-3: Should exclude \`.svn\` (existing) (stdout) 1`] = ` -"outside.js -" +exports[`fixtures-3: Should exclude \`.svn\` (existing) 1`] = ` +{ + "stderr": "", + "stdout": "outside.js", + "write": [], +} `; -exports[`fixtures-3: Should exclude \`.svn\` (existing) (write) 1`] = `[]`; - -exports[`fixtures-3: Should exclude \`.svn\` (nonexisting) (stderr) 1`] = `""`; - -exports[`fixtures-3: Should exclude \`.svn\` (nonexisting) (stdout) 1`] = ` -"outside.js -" +exports[`fixtures-3: Should exclude \`.svn\` (nonexisting) 1`] = ` +{ + "stderr": "", + "stdout": "outside.js", + "write": [], +} `; -exports[`fixtures-3: Should exclude \`.svn\` (nonexisting) (write) 1`] = `[]`; - -exports[`fixtures-3: Should match \`outside.js\`, \`dir/inside.js\` and \`dir/node_modules/in-node_modules.js\` (stderr) 1`] = `""`; - -exports[`fixtures-3: Should match \`outside.js\`, \`dir/inside.js\` and \`dir/node_modules/in-node_modules.js\` (stdout) 1`] = ` -"dir/inside.js +exports[`fixtures-3: Should match \`outside.js\`, \`dir/inside.js\` and \`dir/node_modules/in-node_modules.js\` 1`] = ` +{ + "stderr": "", + "stdout": "dir/inside.js dir/node_modules/in-node_modules.js -outside.js -" +outside.js", + "write": [], +} `; -exports[`fixtures-3: Should match \`outside.js\`, \`dir/inside.js\` and \`dir/node_modules/in-node_modules.js\` (write) 1`] = `[]`; - -exports[`fixtures-3: Should only match \`outside.js\` and \`dir/inside.js\` (stderr) 1`] = `""`; - -exports[`fixtures-3: Should only match \`outside.js\` and \`dir/inside.js\` (stdout) 1`] = ` -"dir/inside.js -outside.js -" +exports[`fixtures-3: Should only match \`outside.js\` and \`dir/inside.js\` 1`] = ` +{ + "stderr": "", + "stdout": "dir/inside.js +outside.js", + "write": [], +} `; -exports[`fixtures-3: Should only match \`outside.js\` and \`dir/inside.js\` (write) 1`] = `[]`; - -exports[`fixtures-4: Should match \`level-1.js\` #2 (stderr) 1`] = `""`; - -exports[`fixtures-4: Should match \`level-1.js\` #2 (stdout) 1`] = ` -"0/level-1.js -" +exports[`fixtures-4: Should match \`level-1.js\` 1`] = ` +{ + "stderr": "", + "stdout": "0/level-1.js", + "write": [], +} `; -exports[`fixtures-4: Should match \`level-1.js\` #2 (write) 1`] = `[]`; - -exports[`fixtures-4: Should match \`level-1.js\` #3 (stderr) 1`] = `""`; - -exports[`fixtures-4: Should match \`level-1.js\` #3 (stdout) 1`] = ` -"0/level-1.js -" +exports[`fixtures-4: Should match \`level-1.js\` #2 1`] = ` +{ + "stderr": "", + "stdout": "0/level-1.js", + "write": [], +} `; -exports[`fixtures-4: Should match \`level-1.js\` #3 (write) 1`] = `[]`; - -exports[`fixtures-4: Should match \`level-1.js\` (stderr) 1`] = `""`; - -exports[`fixtures-4: Should match \`level-1.js\` (stdout) 1`] = ` -"0/level-1.js -" +exports[`fixtures-4: Should match \`level-1.js\` #3 1`] = ` +{ + "stderr": "", + "stdout": "0/level-1.js", + "write": [], +} `; -exports[`fixtures-4: Should match \`level-1.js\` (write) 1`] = `[]`; - -exports[`should not ignore file paths contains object prototype keys (stderr) 1`] = `""`; - -exports[`should not ignore file paths contains object prototype keys (stdout) 1`] = ` -"constructor/should-be-formatted.js -" +exports[`should not ignore file paths contains object prototype keys 1`] = ` +{ + "stderr": "", + "stdout": "constructor/should-be-formatted.js", + "write": [], +} `; - -exports[`should not ignore file paths contains object prototype keys (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/patterns.js.snap b/tests/integration/__tests__/__snapshots__/patterns.js.snap index e8cd416464fb..34d65b1c4374 100644 --- a/tests/integration/__tests__/__snapshots__/patterns.js.snap +++ b/tests/integration/__tests__/__snapshots__/patterns.js.snap @@ -1,91 +1,83 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`multiple patterns (stderr) 1`] = `""`; - -exports[`multiple patterns (stdout) 1`] = ` -"directory/file.js +exports[`multiple patterns 1`] = ` +{ + "stderr": "", + "stdout": "directory/file.js directory/nested-directory/nested-directory-file.js other-directory/file.js -other-directory/nested-directory/nested-directory-file.js -" +other-directory/nested-directory/nested-directory-file.js", + "write": [], +} `; -exports[`multiple patterns (write) 1`] = `[]`; - -exports[`multiple patterns by with ignore pattern, doesn't ignore node_modules with --with-node-modules flag (stderr) 1`] = `""`; - -exports[`multiple patterns by with ignore pattern, doesn't ignore node_modules with --with-node-modules flag (stdout) 1`] = ` -"node_modules/node-module.js +exports[`multiple patterns by with ignore pattern, doesn't ignore node_modules with --with-node-modules flag 1`] = ` +{ + "stderr": "", + "stdout": "node_modules/node-module.js other-directory/file.js other-directory/nested-directory/nested-directory-file.js other-regular-modules.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`multiple patterns by with ignore pattern, doesn't ignore node_modules with --with-node-modules flag (write) 1`] = `[]`; - -exports[`multiple patterns by with ignore pattern, ignores node_modules by default (stderr) 1`] = `""`; - -exports[`multiple patterns by with ignore pattern, ignores node_modules by default (stdout) 1`] = ` -"other-directory/file.js +exports[`multiple patterns by with ignore pattern, ignores node_modules by default 1`] = ` +{ + "stderr": "", + "stdout": "other-directory/file.js other-directory/nested-directory/nested-directory-file.js other-regular-modules.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`multiple patterns by with ignore pattern, ignores node_modules by default (write) 1`] = `[]`; - -exports[`multiple patterns by with ignore pattern, ignores node_modules by with ./**/*.js (stderr) 1`] = `""`; - -exports[`multiple patterns by with ignore pattern, ignores node_modules by with ./**/*.js (stdout) 1`] = ` -"other-directory/file.js +exports[`multiple patterns by with ignore pattern, ignores node_modules by with ./**/*.js 1`] = ` +{ + "stderr": "", + "stdout": "other-directory/file.js other-directory/nested-directory/nested-directory-file.js other-regular-modules.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`multiple patterns by with ignore pattern, ignores node_modules by with ./**/*.js (write) 1`] = `[]`; - -exports[`multiple patterns with ignore nested directories pattern (stderr) 1`] = `""`; - -exports[`multiple patterns with ignore nested directories pattern (stdout) 1`] = ` -"directory/file.js +exports[`multiple patterns with ignore nested directories pattern 1`] = ` +{ + "stderr": "", + "stdout": "directory/file.js other-directory/file.js other-regular-modules.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`multiple patterns with ignore nested directories pattern (write) 1`] = `[]`; - -exports[`multiple patterns with non exists pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: "non-existent.js". -" +exports[`multiple patterns with non exists pattern 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "non-existent.js".", + "stdout": "directory/file.js +directory/nested-directory/nested-directory-file.js", + "write": [], +} `; -exports[`multiple patterns with non exists pattern (stdout) 1`] = ` -"directory/file.js -directory/nested-directory/nested-directory-file.js -" +exports[`multiple patterns, throw error and exit with non zero code on non existing files 1`] = ` +{ + "stderr": "[error] No files matching the pattern were found: "non-existent.js". +[error] No files matching the pattern were found: "other-non-existent.js".", + "stdout": "", + "write": [], +} `; -exports[`multiple patterns with non exists pattern (write) 1`] = `[]`; - -exports[`multiple patterns, throw error and exit with non zero code on non existing files (stderr) 1`] = ` -"[error] No files matching the pattern were found: "non-existent.js". -[error] No files matching the pattern were found: "other-non-existent.js". -" +exports[`no errors on empty patterns 1`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} `; - -exports[`multiple patterns, throw error and exit with non zero code on non existing files (stdout) 1`] = `""`; - -exports[`multiple patterns, throw error and exit with non zero code on non existing files (write) 1`] = `[]`; - -exports[`no errors on empty patterns (stderr) 1`] = `""`; - -exports[`no errors on empty patterns (stdout) 1`] = `""`; - -exports[`no errors on empty patterns (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/piped-output.js.snap b/tests/integration/__tests__/__snapshots__/piped-output.js.snap index da11285f72fd..238b7c08761a 100644 --- a/tests/integration/__tests__/__snapshots__/piped-output.js.snap +++ b/tests/integration/__tests__/__snapshots__/piped-output.js.snap @@ -1,109 +1,100 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no file diffs with --check + formatted file (stderr) 1`] = `""`; - -exports[`no file diffs with --check + formatted file (stderr) 2`] = `""`; - -exports[`no file diffs with --check + formatted file (stdout) 1`] = ` -"Checking formatting... -formatted.jsAll matched files use Prettier code style! -" -`; - -exports[`no file diffs with --check + formatted file (stdout) 2`] = ` -"Checking formatting... -All matched files use Prettier code style! -" -`; - -exports[`no file diffs with --check + formatted file (write) 1`] = `[]`; - -exports[`no file diffs with --check + formatted file (write) 2`] = `[]`; - -exports[`no file diffs with --list-different + formatted file (stderr) 1`] = `""`; - -exports[`no file diffs with --list-different + formatted file (stderr) 2`] = `""`; - -exports[`no file diffs with --list-different + formatted file (stdout) 1`] = `"formatted.js"`; - -exports[`no file diffs with --list-different + formatted file (stdout) 2`] = `""`; - -exports[`no file diffs with --list-different + formatted file (write) 1`] = `[]`; - -exports[`no file diffs with --list-different + formatted file (write) 2`] = `[]`; - -exports[`output with --check + unformatted differs when piped (stderr) 1`] = ` -"[warn] unformatted.js -[warn] Code style issues fixed in the above file. -" +exports[`no file diffs with --check + formatted file 1`] = ` +{ + "stderr": "", + "stdout": "Checking formatting... +formatted.js +[[Clear text(process.stdout): formatted.js]] +All matched files use Prettier code style!", + "write": [], +} `; -exports[`output with --check + unformatted differs when piped (stderr) 2`] = ` -"[warn] unformatted.js -[warn] Code style issues fixed in the above file. -" +exports[`no file diffs with --check + formatted file 2`] = ` +{ + "stderr": "", + "stdout": "Checking formatting... +All matched files use Prettier code style!", + "write": [], +} `; -exports[`output with --check + unformatted differs when piped (stdout) 1`] = ` -"Checking formatting... -unformatted.js" +exports[`no file diffs with --list-different + formatted file 1`] = ` +{ + "stderr": "", + "stdout": "formatted.js +[[Clear text(process.stdout): formatted.js]]", + "write": [], +} `; -exports[`output with --check + unformatted differs when piped (stdout) 2`] = ` -"Checking formatting... -" +exports[`no file diffs with --list-different + formatted file 2`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} `; -exports[`output with --check + unformatted differs when piped (write) 1`] = ` -[ - { - "content": "var x = 1; +exports[`output with --check + unformatted differs when piped 1`] = ` +{ + "stderr": "[warn] unformatted.js +[warn] Code style issues fixed in the above file.", + "stdout": "Checking formatting... +unformatted.js +[[Clear text(process.stdout): unformatted.js]]", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] + "filename": "unformatted.js", + }, + ], +} `; -exports[`output with --check + unformatted differs when piped (write) 2`] = ` -[ - { - "content": "var x = 1; +exports[`output with --check + unformatted differs when piped 2`] = ` +{ + "stderr": "[warn] unformatted.js +[warn] Code style issues fixed in the above file.", + "stdout": "Checking formatting...", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] -`; - -exports[`output with --list-different + unformatted differs when piped (stderr) 1`] = `""`; - -exports[`output with --list-different + unformatted differs when piped (stderr) 2`] = `""`; - -exports[`output with --list-different + unformatted differs when piped (stdout) 1`] = ` -"unformatted.jsunformatted.js -" -`; - -exports[`output with --list-different + unformatted differs when piped (stdout) 2`] = ` -"unformatted.js -" + "filename": "unformatted.js", + }, + ], +} `; -exports[`output with --list-different + unformatted differs when piped (write) 1`] = ` -[ - { - "content": "var x = 1; +exports[`output with --list-different + unformatted differs when piped 1`] = ` +{ + "stderr": "", + "stdout": "unformatted.js +[[Clear text(process.stdout): unformatted.js]] +unformatted.js", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] + "filename": "unformatted.js", + }, + ], +} `; -exports[`output with --list-different + unformatted differs when piped (write) 2`] = ` -[ - { - "content": "var x = 1; +exports[`output with --list-different + unformatted differs when piped 2`] = ` +{ + "stderr": "", + "stdout": "unformatted.js", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] + "filename": "unformatted.js", + }, + ], +} `; diff --git a/tests/integration/__tests__/__snapshots__/plugin-api-embed.js.snap b/tests/integration/__tests__/__snapshots__/plugin-api-embed.js.snap new file mode 100644 index 000000000000..86bf2f6a8f55 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/plugin-api-embed.js.snap @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`embed API in plugins with new signature should work 1`] = ` +"abcdef +{ "foo": "bar" } +1234 +" +`; + +exports[`embed API in plugins with outdated signature should cause error 1`] = `"printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed"`; diff --git a/tests/integration/__tests__/__snapshots__/plugin-options-string.js.snap b/tests/integration/__tests__/__snapshots__/plugin-options-string.js.snap index fe098f7aa73c..8d7b6797769a 100644 --- a/tests/integration/__tests__/__snapshots__/plugin-options-string.js.snap +++ b/tests/integration/__tests__/__snapshots__/plugin-options-string.js.snap @@ -1,29 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`show detailed external option with \`--help foo-string\` (stderr) 1`] = `""`; - -exports[`show detailed external option with \`--help foo-string\` (stdout) 1`] = ` -"--foo-string <string> +exports[`show detailed external option with \`--help foo-string\` 1`] = ` +{ + "stderr": "", + "stdout": "--foo-string <string> foo description -Default: bar -" +Default: bar", + "write": [], +} `; -exports[`show detailed external option with \`--help foo-string\` (write) 1`] = `[]`; - exports[`show external options with \`--help\` 1`] = ` "Snapshot Diff: - First value + Second value -@@ -22,16 +22,18 @@ - Control how Prettier formats quoted code embedded in the file. - Defaults to auto. - --end-of-line <lf|crlf|cr|auto> - Which end of line characters to apply. - Defaults to lf. +@@ -27,19 +27,21 @@ + --experimental-operator-position <start|end> + Where to print operators when binary expressions wrap lines. + Defaults to end. + --no-experimental-ternaries + Default behavior of ternaries; keep question marks on the same line as the consequent. + --foo-string <string> foo description + Defaults to bar. --html-whitespace-sensitivity <css|strict|ignore> @@ -31,8 +30,11 @@ exports[`show external options with \`--help\` 1`] = ` Defaults to css. --jsx-single-quote Use single quotes in JSX. Defaults to false. -- --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> -+ --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|foo-parser> + --object-wrap <preserve|collapse> + How to wrap object literals. + Defaults to preserve. +- --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> ++ --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml|foo-parser> Which parser to use. --print-width <int> The line length where Prettier will try wrap. Defaults to 80. diff --git a/tests/integration/__tests__/__snapshots__/plugin-options.js.snap b/tests/integration/__tests__/__snapshots__/plugin-options.js.snap index eef9fd7e29ba..dd11d788fec1 100644 --- a/tests/integration/__tests__/__snapshots__/plugin-options.js.snap +++ b/tests/integration/__tests__/__snapshots__/plugin-options.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`include plugin's parsers to the values of the \`parser\` option\` (stderr) 1`] = `""`; - -exports[`include plugin's parsers to the values of the \`parser\` option\` (stdout) 1`] = ` -"--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|foo-parser> +exports[`include plugin's parsers to the values of the \`parser\` option\` 1`] = ` +{ + "stderr": "", + "stdout": "--parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml|foo-parser> Which parser to use. @@ -22,6 +22,7 @@ Valid options: scss SCSS json JSON json5 JSON5 + jsonc JSON with Comments json-stringify JSON.stringify graphql GraphQL markdown Markdown @@ -32,16 +33,16 @@ Valid options: html HTML angular Angular lwc Lightning Web Components - foo-parser foo (plugin: ./plugin) -" + mjml MJML + foo-parser foo (plugin: ./plugin.cjs)", + "write": [], +} `; -exports[`include plugin's parsers to the values of the \`parser\` option\` (write) 1`] = `[]`; - -exports[`show detailed external option with \`--help foo-option\` (stderr) 1`] = `""`; - -exports[`show detailed external option with \`--help foo-option\` (stdout) 1`] = ` -"--foo-option <bar|baz> +exports[`show detailed external option with \`--help foo-option\` 1`] = ` +{ + "stderr": "", + "stdout": "--foo-option <bar|baz> foo description @@ -50,23 +51,22 @@ Valid options: bar bar description baz baz description -Default: bar -" +Default: bar", + "write": [], +} `; -exports[`show detailed external option with \`--help foo-option\` (write) 1`] = `[]`; - exports[`show external options with \`--help\` 1`] = ` "Snapshot Diff: - First value + Second value -@@ -22,16 +22,18 @@ - Control how Prettier formats quoted code embedded in the file. - Defaults to auto. - --end-of-line <lf|crlf|cr|auto> - Which end of line characters to apply. - Defaults to lf. +@@ -27,19 +27,21 @@ + --experimental-operator-position <start|end> + Where to print operators when binary expressions wrap lines. + Defaults to end. + --no-experimental-ternaries + Default behavior of ternaries; keep question marks on the same line as the consequent. + --foo-option <bar|baz> foo description + Defaults to bar. --html-whitespace-sensitivity <css|strict|ignore> @@ -74,8 +74,11 @@ exports[`show external options with \`--help\` 1`] = ` Defaults to css. --jsx-single-quote Use single quotes in JSX. Defaults to false. -- --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc> -+ --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|foo-parser> + --object-wrap <preserve|collapse> + How to wrap object literals. + Defaults to preserve. +- --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml> ++ --parser <flow|babel|babel-flow|babel-ts|typescript|acorn|espree|meriyah|css|less|scss|json|json5|jsonc|json-stringify|graphql|markdown|mdx|vue|yaml|glimmer|html|angular|lwc|mjml|foo-parser> Which parser to use. --print-width <int> The line length where Prettier will try wrap. Defaults to 80. diff --git a/tests/integration/__tests__/__snapshots__/print-code.js.snap b/tests/integration/__tests__/__snapshots__/print-code.js.snap new file mode 100644 index 000000000000..c2f8e2d43e07 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/print-code.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Line breaking after filepath with errors 1`] = ` +{ + "stdout": "ignored.js +[[Clear text(process.stdout): ignored.js]] +foo( +)", +} +`; + +exports[`Line breaking after filepath with errors 2`] = ` +{ + "stdout": "not-ignored.js +[[Clear text(process.stdout): not-ignored.js]] +foo();", +} +`; diff --git a/tests/integration/__tests__/__snapshots__/print-doc-to-string.js.snap b/tests/integration/__tests__/__snapshots__/print-doc-to-string.js.snap new file mode 100644 index 000000000000..ee987ed35f6f --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/print-doc-to-string.js.snap @@ -0,0 +1,179 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Throw error on invalid doc 1`] = ` +"Unexpected doc 'boolean', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 2`] = ` +"Unexpected doc 'boolean', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 3`] = ` +"Unexpected doc 'boolean', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 4`] = ` +"Unexpected doc 'boolean', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 5`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 6`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 7`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 8`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 9`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 10`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 11`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 12`] = ` +"Unexpected doc 'number', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 13`] = ` +"Unexpected doc 'bigint', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 14`] = ` +"Unexpected doc 'bigint', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 15`] = ` +"Unexpected doc 'symbol', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 16`] = ` +"Unexpected doc 'symbol', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 17`] = ` +"Unexpected doc 'function', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 18`] = ` +"Unexpected doc 'function', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 19`] = ` +"Unexpected doc 'function', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 20`] = ` +"Unexpected doc 'function', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 21`] = ` +"Unexpected doc.type 'undefined'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; + +exports[`Throw error on invalid doc 22`] = ` +"Unexpected doc.type 'undefined'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; + +exports[`Throw error on invalid doc 23`] = ` +"Unexpected doc 'undefined', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 24`] = ` +"Unexpected doc 'undefined', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 25`] = ` +"Unexpected doc 'null', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 26`] = ` +"Unexpected doc 'null', +Expected it to be 'string' or 'object'." +`; + +exports[`Throw error on invalid doc 27`] = `"Unexpected doc '[object Promise]'."`; + +exports[`Throw error on invalid doc 28`] = `"Unexpected doc '[object Promise]'."`; + +exports[`Throw error on invalid doc 29`] = `"Unexpected doc '[object Generator]'."`; + +exports[`Throw error on invalid doc 30`] = `"Unexpected doc '[object Generator]'."`; + +exports[`Throw error on invalid doc 31`] = `"Unexpected doc '[object RegExp]'."`; + +exports[`Throw error on invalid doc 32`] = `"Unexpected doc '[object RegExp]'."`; + +exports[`Throw error on invalid doc 33`] = `"Unexpected doc '[object Date]'."`; + +exports[`Throw error on invalid doc 34`] = `"Unexpected doc '[object Date]'."`; + +exports[`Throw error on invalid doc 35`] = `"Unexpected doc '[object Error]'."`; + +exports[`Throw error on invalid doc 36`] = `"Unexpected doc '[object Error]'."`; + +exports[`Throw error on invalid doc 37`] = `"Unexpected doc '[object Uint8Array]'."`; + +exports[`Throw error on invalid doc 38`] = `"Unexpected doc '[object Uint8Array]'."`; + +exports[`Throw error on invalid doc 39`] = `"Unexpected doc '[object Uint8Array]'."`; + +exports[`Throw error on invalid doc 40`] = `"Unexpected doc '[object Uint8Array]'."`; + +exports[`Throw error on invalid doc 41`] = ` +"Unexpected doc.type 'invalid-type'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; + +exports[`Throw error on invalid doc 42`] = ` +"Unexpected doc.type 'invalid-type'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; + +exports[`Throw error on invalid doc 43`] = ` +"Unexpected doc.type 'undefined'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; + +exports[`Throw error on invalid doc 44`] = ` +"Unexpected doc.type 'undefined'. +Expected it to be 'cursor', 'indent', 'align', 'trim', 'group', 'fill', 'if-break', 'indent-if-break', 'line-suffix', 'line-suffix-boundary', 'line', 'label', or 'break-parent'." +`; diff --git a/tests/integration/__tests__/__snapshots__/schema.js.snap b/tests/integration/__tests__/__snapshots__/schema.js.snap index 520c9fa2f2a9..ffc13de67175 100644 --- a/tests/integration/__tests__/__snapshots__/schema.js.snap +++ b/tests/integration/__tests__/__snapshots__/schema.js.snap @@ -2,7 +2,8 @@ exports[`schema 1`] = ` { - "$schema": "http://json-schema.org/draft-04/schema#", + "$id": "https://json.schemastore.org/prettierrc.json", + "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "optionsDefinition": { "properties": { @@ -34,10 +35,14 @@ exports[`schema 1`] = ` "description": "Print spaces between brackets.", "type": "boolean", }, + "checkIgnorePragma": { + "default": false, + "description": "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", + "type": "boolean", + }, "cursorOffset": { "default": -1, - "description": "Print (to stderr) where a cursor at the given position would move to after formatting. -This option cannot be used with --range-start and --range-end.", + "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", "type": "integer", }, "embeddedLanguageFormatting": { @@ -89,6 +94,29 @@ This option cannot be used with --range-start and --range-end.", }, ], }, + "experimentalOperatorPosition": { + "default": "end", + "description": "Where to print operators when binary expressions wrap lines.", + "oneOf": [ + { + "description": "Print operators at the start of new lines.", + "enum": [ + "start", + ], + }, + { + "description": "Print operators at the end of previous lines.", + "enum": [ + "end", + ], + }, + ], + }, + "experimentalTernaries": { + "default": false, + "description": "Use curious ternaries, with the question mark after the condition.", + "type": "boolean", + }, "filepath": { "default": undefined, "description": "Specify the input filepath. This will be used to do parser inference.", @@ -128,6 +156,24 @@ This option cannot be used with --range-start and --range-end.", "description": "Use single quotes in JSX.", "type": "boolean", }, + "objectWrap": { + "default": "preserve", + "description": "How to wrap object literals.", + "oneOf": [ + { + "description": "Keep as multi-line, if there is a newline between the opening brace and first property.", + "enum": [ + "preserve", + ], + }, + { + "description": "Fit to a single line when possible.", + "enum": [ + "collapse", + ], + }, + ], + }, "parser": { "anyOf": [ { @@ -208,6 +254,12 @@ This option cannot be used with --range-start and --range-end.", "json5", ], }, + { + "description": "JSON with Comments", + "enum": [ + "jsonc", + ], + }, { "description": "JSON.stringify", "enum": [ @@ -268,6 +320,12 @@ This option cannot be used with --range-start and --range-end.", "lwc", ], }, + { + "description": "MJML", + "enum": [ + "mjml", + ], + }, { "description": "Custom parser", "type": "string", @@ -276,26 +334,6 @@ This option cannot be used with --range-start and --range-end.", "default": undefined, "description": "Which parser to use.", }, - "pluginSearchDirs": { - "default": [], - "description": "Custom directory that contains prettier plugins in node_modules subdirectory. -Overrides default behavior when plugins are searched relatively to the location of Prettier. -Multiple values are accepted.", - "oneOf": [ - { - "items": { - "type": "string", - }, - "type": "array", - }, - { - "description": "Disable plugin autoloading.", - "enum": [ - false, - ], - }, - ], - }, "plugins": { "default": [], "description": "Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.", @@ -360,21 +398,18 @@ Multiple values are accepted.", "rangeEnd": { "default": Infinity, "description": "Format code ending at a given character offset (exclusive). -The range will extend forwards to the end of the selected statement. -This option cannot be used with --cursor-offset.", +The range will extend forwards to the end of the selected statement.", "type": "integer", }, "rangeStart": { "default": 0, "description": "Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement. -This option cannot be used with --cursor-offset.", +The range will extend backwards to the start of the first line containing the selected statement.", "type": "integer", }, "requirePragma": { "default": false, - "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.", + "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", "type": "boolean", }, "semi": { @@ -398,25 +433,25 @@ in order for it to be formatted.", "type": "integer", }, "trailingComma": { - "default": "es5", + "default": "all", "description": "Print trailing commas wherever possible when multi-line.", "oneOf": [ { - "description": "Trailing commas where valid in ES5 (objects, arrays, etc.)", + "description": "Trailing commas wherever possible (including function arguments).", "enum": [ - "es5", + "all", ], }, { - "description": "No trailing commas.", + "description": "Trailing commas where valid in ES5 (objects, arrays, etc.)", "enum": [ - "none", + "es5", ], }, { - "description": "Trailing commas wherever possible (including function arguments).", + "description": "No trailing commas.", "enum": [ - "all", + "none", ], }, ], diff --git a/tests/integration/__tests__/__snapshots__/skip-folders.js.snap b/tests/integration/__tests__/__snapshots__/skip-folders.js.snap index a5cedb9e7785..b386f801a2eb 100644 --- a/tests/integration/__tests__/__snapshots__/skip-folders.js.snap +++ b/tests/integration/__tests__/__snapshots__/skip-folders.js.snap @@ -1,17 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`skip folders passed specifically (stdout) 1`] = ` -"a/file.js -b/file.js -" +exports[`skip folders passed specifically 1`] = ` +{ + "stdout": "a/file.js +b/file.js", + "write": [], +} `; -exports[`skip folders passed specifically (write) 1`] = `[]`; - -exports[`skips folders in glob (stdout) 1`] = ` -"a/file.js -b/file.js -" +exports[`skips folders in glob 1`] = ` +{ + "stdout": "a/file.js +b/file.js", + "write": [], +} `; - -exports[`skips folders in glob (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/special-characters-in-path.js.snap b/tests/integration/__tests__/__snapshots__/special-characters-in-path.js.snap new file mode 100644 index 000000000000..f77342e553f0 --- /dev/null +++ b/tests/integration/__tests__/__snapshots__/special-characters-in-path.js.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ignores file name contains emoji 1`] = ` +{ + "stderr": "", + "stdout": "not-ignored.js", + "write": [], +} +`; + +exports[`square-brackets-and-dash 1`] = ` +{ + "status": 2, + "stderr": "[error] Invalid configuration for file "<cli>/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/.editorconfig": +[error] Invalid regular expression: /^(?=.)username[repo-name]$/: Range out of order in character class", + "stdout": "", + "write": [], +} +`; + +exports[`stdin 1`] = ` +{ + "stderr": "", + "stdout": ".name { display: none; }", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap b/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap index bd8822c042f4..c973fe43e2e5 100644 --- a/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap +++ b/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap @@ -1,93 +1,88 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`apply editorconfig for stdin-filepath with a deep path (stderr) 1`] = `""`; - -exports[`apply editorconfig for stdin-filepath with a deep path (stderr) 2`] = `""`; - -exports[`apply editorconfig for stdin-filepath with a deep path (stdout) 1`] = ` -"function f() { +exports[`apply editorconfig for stdin-filepath with a deep path 1`] = ` +{ + "stderr": "", + "stdout": "function f() { console.log("should be indented with a tab") +}", + "write": [], } -" `; -exports[`apply editorconfig for stdin-filepath with a deep path (stdout) 2`] = ` -"function f() { +exports[`apply editorconfig for stdin-filepath with a deep path 2`] = ` +{ + "stderr": "", + "stdout": "function f() { console.log("should be indented with a tab") +}", + "write": [], } -" `; -exports[`apply editorconfig for stdin-filepath with a deep path (write) 1`] = `[]`; - -exports[`apply editorconfig for stdin-filepath with a deep path (write) 2`] = `[]`; - -exports[`apply editorconfig for stdin-filepath with nonexistent directory (stderr) 1`] = `""`; - -exports[`apply editorconfig for stdin-filepath with nonexistent directory (stdout) 1`] = ` -"function f() { +exports[`apply editorconfig for stdin-filepath with nonexistent directory 1`] = ` +{ + "stderr": "", + "stdout": "function f() { console.log("should be indented with a tab") +}", + "write": [], } -" `; -exports[`apply editorconfig for stdin-filepath with nonexistent directory (write) 1`] = `[]`; - -exports[`apply editorconfig for stdin-filepath with nonexistent file (stderr) 1`] = `""`; - -exports[`apply editorconfig for stdin-filepath with nonexistent file (stdout) 1`] = ` -"function f() { +exports[`apply editorconfig for stdin-filepath with nonexistent file 1`] = ` +{ + "stderr": "", + "stdout": "function f() { console.log("should be indented with a tab") +}", + "write": [], } -" `; -exports[`apply editorconfig for stdin-filepath with nonexistent file (write) 1`] = `[]`; - -exports[`don’t apply editorconfig outside project for stdin-filepath with nonexistent directory (stderr) 1`] = `""`; - -exports[`don’t apply editorconfig outside project for stdin-filepath with nonexistent directory (stdout) 1`] = ` -"function f() { +exports[`don’t apply editorconfig outside project for stdin-filepath with nonexistent directory 1`] = ` +{ + "stderr": "", + "stdout": "function f() { console.log("should be indented with 2 spaces") +}", + "write": [], } -" `; -exports[`don’t apply editorconfig outside project for stdin-filepath with nonexistent directory (write) 1`] = `[]`; - -exports[`format correctly if stdin content compatible with stdin-filepath (stderr) 1`] = `""`; - -exports[`format correctly if stdin content compatible with stdin-filepath (stdout) 1`] = ` -".name { +exports[`format correctly if stdin content compatible with stdin-filepath 1`] = ` +{ + "stderr": "", + "stdout": ".name { display: none; +}", + "write": [], } -" `; -exports[`format correctly if stdin content compatible with stdin-filepath (write) 1`] = `[]`; - -exports[`gracefully handle stdin-filepath with nonexistent directory (stderr) 1`] = `""`; - -exports[`gracefully handle stdin-filepath with nonexistent directory (stdout) 1`] = ` -".name { +exports[`gracefully handle stdin-filepath with nonexistent directory 1`] = ` +{ + "stderr": "", + "stdout": ".name { display: none; +}", + "write": [], } -" `; -exports[`gracefully handle stdin-filepath with nonexistent directory (write) 1`] = `[]`; - -exports[`output file as-is if stdin-filepath matched patterns in ignore-path (stderr) 1`] = `""`; - -exports[`output file as-is if stdin-filepath matched patterns in ignore-path (write) 1`] = `[]`; +exports[`output file as-is if stdin-filepath matched patterns in ignore-path 1`] = ` +{ + "stderr": "", + "write": [], +} +`; -exports[`throw error if stdin content incompatible with stdin-filepath (stderr) 1`] = ` -"[error] abc.js: SyntaxError: Unexpected token (1:1) +exports[`throw error if stdin content incompatible with stdin-filepath 1`] = ` +{ + "stderr": "[error] abc.js: SyntaxError: Unexpected token (1:1) [error] > 1 | .name { display: none; } -[error] | ^ -" +[error] | ^", + "stdout": "", + "write": [], +} `; - -exports[`throw error if stdin content incompatible with stdin-filepath (stdout) 1`] = `""`; - -exports[`throw error if stdin content incompatible with stdin-filepath (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/support-info.js.snap b/tests/integration/__tests__/__snapshots__/support-info.js.snap index fa53d09824fe..3aeda971d369 100644 --- a/tests/integration/__tests__/__snapshots__/support-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/support-info.js.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`API getSupportInfo() 1`] = ` { @@ -26,7 +26,7 @@ exports[`API getSupportInfo() 1`] = ` "json", ], "JSON with Comments": [ - "json", + "jsonc", ], "JSON.stringify": [ "json-stringify", @@ -62,6 +62,9 @@ exports[`API getSupportInfo() 1`] = ` "MDX": [ "mdx", ], + "MJML": [ + "mjml", + ], "Markdown": [ "markdown", ], @@ -103,6 +106,10 @@ exports[`API getSupportInfo() 1`] = ` "default": true, "type": "boolean", }, + "checkIgnorePragma": { + "default": false, + "type": "boolean", + }, "cursorOffset": { "default": -1, "range": { @@ -130,6 +137,18 @@ exports[`API getSupportInfo() 1`] = ` "default": "lf", "type": "choice", }, + "experimentalOperatorPosition": { + "choices": [ + "start", + "end", + ], + "default": "end", + "type": "choice", + }, + "experimentalTernaries": { + "default": false, + "type": "boolean", + }, "filepath": { "default": undefined, "type": "path", @@ -151,6 +170,14 @@ exports[`API getSupportInfo() 1`] = ` "default": false, "type": "boolean", }, + "objectWrap": { + "choices": [ + "preserve", + "collapse", + ], + "default": "preserve", + "type": "choice", + }, "parser": { "choices": [ "flow", @@ -166,6 +193,7 @@ exports[`API getSupportInfo() 1`] = ` "scss", "json", "json5", + "jsonc", "json-stringify", "graphql", "markdown", @@ -176,14 +204,11 @@ exports[`API getSupportInfo() 1`] = ` "html", "angular", "lwc", + "mjml", ], "default": undefined, "type": "choice", }, - "pluginSearchDirs": { - "default": [], - "type": "path", - }, "plugins": { "default": [], "type": "path", @@ -260,11 +285,11 @@ exports[`API getSupportInfo() 1`] = ` }, "trailingComma": { "choices": [ + "all", "es5", "none", - "all", ], - "default": "es5", + "default": "all", "type": "choice", }, "useTabs": { @@ -279,17 +304,110 @@ exports[`API getSupportInfo() 1`] = ` } `; -exports[`CLI --support-info (stderr) 1`] = `""`; - -exports[`CLI --support-info (stdout) 1`] = ` -"{ +exports[`CLI --support-info 1`] = ` +{ + "stderr": "", + "stdout": "{ "languages": [ + { + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "extensions": [".component.html"], + "filenames": [], + "linguistLanguageId": 146, + "name": "Angular", + "parsers": ["angular"], + "tmScope": "text.html.basic", + "type": "markup", + "vscodeLanguageIds": ["html"] + }, + { + "aceMode": "css", + "codemirrorMimeType": "text/css", + "codemirrorMode": "css", + "extensions": [".css", ".wxss"], + "linguistLanguageId": 50, + "name": "CSS", + "parsers": ["css"], + "tmScope": "source.css", + "type": "markup", + "vscodeLanguageIds": ["css"] + }, + { + "aceMode": "javascript", + "aliases": [], + "codemirrorMimeType": "text/javascript", + "codemirrorMode": "javascript", + "extensions": [".js.flow"], + "filenames": [], + "interpreters": [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell" + ], + "linguistLanguageId": 183, + "name": "Flow", + "parsers": ["flow", "babel-flow"], + "tmScope": "source.js", + "type": "programming", + "vscodeLanguageIds": ["javascript"] + }, + { + "aceMode": "text", + "extensions": [".graphql", ".gql", ".graphqls"], + "linguistLanguageId": 139, + "name": "GraphQL", + "parsers": ["graphql"], + "tmScope": "source.graphql", + "type": "data", + "vscodeLanguageIds": ["graphql"] + }, + { + "aceMode": "handlebars", + "aliases": ["hbs", "htmlbars"], + "extensions": [".handlebars", ".hbs"], + "linguistLanguageId": 155, + "name": "Handlebars", + "parsers": ["glimmer"], + "tmScope": "text.html.handlebars", + "type": "markup", + "vscodeLanguageIds": ["handlebars"] + }, + { + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "extensions": [ + ".html", + ".hta", + ".htm", + ".html.hl", + ".inc", + ".xht", + ".xhtml" + ], + "linguistLanguageId": 146, + "name": "HTML", + "parsers": ["html"], + "tmScope": "text.html.basic", + "type": "markup", + "vscodeLanguageIds": ["html"] + }, { "aceMode": "javascript", "aliases": ["js", "node"], "codemirrorMimeType": "text/javascript", "codemirrorMode": "javascript", - "color": "#f1e05a", "extensions": [ ".js", "._js", @@ -297,7 +415,6 @@ exports[`CLI --support-info (stdout) 1`] = ` ".cjs", ".es", ".es6", - ".frag", ".gs", ".jake", ".javascript", @@ -315,9 +432,11 @@ exports[`CLI --support-info (stdout) 1`] = ` ".ssjs", ".xsjs", ".xsjslib", + ".start.frag", + ".end.frag", ".wxs" ], - "filenames": ["Jakefile"], + "filenames": ["Jakefile", "start.frag", "end.frag"], "interpreters": [ "chakra", "d8", @@ -343,114 +462,15 @@ exports[`CLI --support-info (stdout) 1`] = ` "flow", "typescript" ], - "since": "0.0.0", "tmScope": "source.js", "type": "programming", "vscodeLanguageIds": ["javascript", "mongo"] }, - { - "aceMode": "javascript", - "aliases": [], - "codemirrorMimeType": "text/javascript", - "codemirrorMode": "javascript", - "color": "#f1e05a", - "extensions": [".js.flow"], - "filenames": [], - "interpreters": [ - "chakra", - "d8", - "gjs", - "js", - "node", - "nodejs", - "qjs", - "rhino", - "v8", - "v8-shell" - ], - "linguistLanguageId": 183, - "name": "Flow", - "parsers": ["flow", "babel-flow"], - "since": "0.0.0", - "tmScope": "source.js", - "type": "programming", - "vscodeLanguageIds": ["javascript"] - }, - { - "aceMode": "javascript", - "codemirrorMimeType": "text/jsx", - "codemirrorMode": "jsx", - "extensions": [".jsx"], - "group": "JavaScript", - "linguistLanguageId": 183, - "name": "JSX", - "parsers": [ - "babel", - "babel-flow", - "babel-ts", - "flow", - "typescript", - "espree", - "meriyah" - ], - "since": "0.0.0", - "tmScope": "source.js.jsx", - "type": "programming", - "vscodeLanguageIds": ["javascriptreact"] - }, - { - "aceMode": "typescript", - "aliases": ["ts"], - "codemirrorMimeType": "application/typescript", - "codemirrorMode": "javascript", - "color": "#3178c6", - "extensions": [".ts", ".cts", ".mts"], - "interpreters": ["deno", "ts-node"], - "linguistLanguageId": 378, - "name": "TypeScript", - "parsers": ["typescript", "babel-ts"], - "since": "1.4.0", - "tmScope": "source.ts", - "type": "programming", - "vscodeLanguageIds": ["typescript"] - }, - { - "aceMode": "javascript", - "codemirrorMimeType": "text/jsx", - "codemirrorMode": "jsx", - "color": "#3178c6", - "extensions": [".tsx"], - "group": "TypeScript", - "linguistLanguageId": 94901924, - "name": "TSX", - "parsers": ["typescript", "babel-ts"], - "since": "1.4.0", - "tmScope": "source.tsx", - "type": "programming", - "vscodeLanguageIds": ["typescriptreact"] - }, - { - "aceMode": "json", - "aliases": ["geojson", "jsonl", "topojson"], - "codemirrorMimeType": "application/json", - "codemirrorMode": "javascript", - "color": "#292929", - "extensions": [".importmap"], - "filenames": ["package.json", "package-lock.json", "composer.json"], - "linguistLanguageId": 174, - "name": "JSON.stringify", - "parsers": ["json-stringify"], - "since": "1.13.0", - "tmScope": "source.json", - "type": "data", - "vscodeLanguageIds": ["json"] - }, { "aceMode": "json", - "aliases": ["geojson", "jsonl", "topojson"], + "aliases": ["geojson", "jsonl", "sarif", "topojson"], "codemirrorMimeType": "application/json", "codemirrorMode": "javascript", - "color": "#292929", "extensions": [ ".json", ".4DForm", @@ -461,7 +481,10 @@ exports[`CLI --support-info (stdout) 1`] = ` ".har", ".ice", ".JSON-tmLanguage", + ".json.example", ".mcmeta", + ".sarif", + ".tact", ".tfstate", ".tfstate.backup", ".topojson", @@ -471,6 +494,7 @@ exports[`CLI --support-info (stdout) 1`] = ` ".yyp" ], "filenames": [ + ".all-contributorsrc", ".arcconfig", ".auto-changelog", ".c8rc", @@ -480,14 +504,15 @@ exports[`CLI --support-info (stdout) 1`] = ` ".tern-config", ".tern-project", ".watchmanconfig", - "Pipfile.lock", - "composer.lock", - "mcmod.info" + ".babelrc", + ".jscsrc", + ".jshintrc", + ".jslintrc", + ".swcrc" ], "linguistLanguageId": 174, "name": "JSON", "parsers": ["json"], - "since": "1.5.0", "tmScope": "source.json", "type": "data", "vscodeLanguageIds": ["json"] @@ -497,11 +522,12 @@ exports[`CLI --support-info (stdout) 1`] = ` "aliases": ["jsonc"], "codemirrorMimeType": "text/javascript", "codemirrorMode": "javascript", - "color": "#292929", "extensions": [ ".jsonc", ".code-snippets", + ".code-workspace", ".sublime-build", + ".sublime-color-scheme", ".sublime-commands", ".sublime-completions", ".sublime-keymap", @@ -515,132 +541,94 @@ exports[`CLI --support-info (stdout) 1`] = ` ".sublime_metrics", ".sublime_session" ], - "filenames": [ - ".babelrc", - ".devcontainer.json", - ".eslintrc.json", - ".jscsrc", - ".jshintrc", - ".jslintrc", - "api-extractor.json", - "devcontainer.json", - "jsconfig.json", - "language-configuration.json", - "tsconfig.json", - "tslint.json", - ".eslintrc", - ".swcrc" - ], + "filenames": [], "group": "JSON", "linguistLanguageId": 423, "name": "JSON with Comments", - "parsers": ["json"], - "since": "1.5.0", - "tmScope": "source.js", + "parsers": ["jsonc"], + "tmScope": "source.json.comments", "type": "data", "vscodeLanguageIds": ["jsonc"] }, + { + "aceMode": "json", + "aliases": ["geojson", "jsonl", "sarif", "topojson"], + "codemirrorMimeType": "application/json", + "codemirrorMode": "javascript", + "extensions": [".importmap"], + "filenames": ["package.json", "package-lock.json", "composer.json"], + "linguistLanguageId": 174, + "name": "JSON.stringify", + "parsers": ["json-stringify"], + "tmScope": "source.json", + "type": "data", + "vscodeLanguageIds": ["json"] + }, { "aceMode": "javascript", "codemirrorMimeType": "application/json", "codemirrorMode": "javascript", - "color": "#267CB9", "extensions": [".json5"], "linguistLanguageId": 175, "name": "JSON5", "parsers": ["json5"], - "since": "1.13.0", "tmScope": "source.js", "type": "data", "vscodeLanguageIds": ["json5"] }, { - "aceMode": "css", - "codemirrorMimeType": "text/css", - "codemirrorMode": "css", - "color": "#563d7c", - "extensions": [".css", ".wxss"], - "linguistLanguageId": 50, - "name": "CSS", - "parsers": ["css"], - "since": "1.4.0", - "tmScope": "source.css", - "type": "markup", - "vscodeLanguageIds": ["css"] - }, - { - "aceMode": "text", - "color": "#dc3a0c", - "extensions": [".pcss", ".postcss"], - "group": "CSS", - "linguistLanguageId": 262764437, - "name": "PostCSS", - "parsers": ["css"], - "since": "1.4.0", - "tmScope": "source.postcss", - "type": "markup", - "vscodeLanguageIds": ["postcss"] + "aceMode": "javascript", + "codemirrorMimeType": "text/jsx", + "codemirrorMode": "jsx", + "extensions": [".jsx"], + "group": "JavaScript", + "linguistLanguageId": 183, + "name": "JSX", + "parsers": [ + "babel", + "babel-flow", + "babel-ts", + "flow", + "typescript", + "espree", + "meriyah" + ], + "tmScope": "source.js.jsx", + "type": "programming", + "vscodeLanguageIds": ["javascriptreact"] }, { "aceMode": "less", "aliases": ["less-css"], "codemirrorMimeType": "text/css", "codemirrorMode": "css", - "color": "#1d365d", "extensions": [".less"], "linguistLanguageId": 198, "name": "Less", "parsers": ["less"], - "since": "1.4.0", "tmScope": "source.css.less", "type": "markup", "vscodeLanguageIds": ["less"] }, { - "aceMode": "scss", - "codemirrorMimeType": "text/x-scss", - "codemirrorMode": "css", - "color": "#c6538c", - "extensions": [".scss"], - "linguistLanguageId": 329, - "name": "SCSS", - "parsers": ["scss"], - "since": "1.4.0", - "tmScope": "source.css.scss", - "type": "markup", - "vscodeLanguageIds": ["scss"] - }, - { - "aceMode": "handlebars", - "aliases": ["hbs", "htmlbars"], - "color": "#f7931e", - "extensions": [".handlebars", ".hbs"], - "linguistLanguageId": 155, - "name": "Handlebars", - "parsers": ["glimmer"], - "since": "2.3.0", - "tmScope": "text.html.handlebars", + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "extensions": [], + "filenames": [], + "linguistLanguageId": 146, + "name": "Lightning Web Components", + "parsers": ["lwc"], + "tmScope": "text.html.basic", "type": "markup", - "vscodeLanguageIds": ["handlebars"] - }, - { - "aceMode": "text", - "color": "#e10098", - "extensions": [".graphql", ".gql", ".graphqls"], - "linguistLanguageId": 139, - "name": "GraphQL", - "parsers": ["graphql"], - "since": "1.5.0", - "tmScope": "source.graphql", - "type": "data", - "vscodeLanguageIds": ["graphql"] + "vscodeLanguageIds": ["html"] }, { "aceMode": "markdown", - "aliases": ["pandoc"], + "aliases": ["md", "pandoc"], "codemirrorMimeType": "text/x-gfm", "codemirrorMode": "gfm", - "color": "#083fa1", "extensions": [ ".md", ".livemd", @@ -658,94 +646,97 @@ exports[`CLI --support-info (stdout) 1`] = ` "linguistLanguageId": 222, "name": "Markdown", "parsers": ["markdown"], - "since": "1.8.0", - "tmScope": "source.gfm", + "tmScope": "text.md", "type": "prose", "vscodeLanguageIds": ["markdown"], "wrap": true }, { "aceMode": "markdown", - "aliases": ["pandoc"], + "aliases": ["md", "pandoc"], "codemirrorMimeType": "text/x-gfm", "codemirrorMode": "gfm", - "color": "#083fa1", "extensions": [".mdx"], "filenames": [], "linguistLanguageId": 222, "name": "MDX", "parsers": ["mdx"], - "since": "1.15.0", - "tmScope": "source.gfm", + "tmScope": "text.md", "type": "prose", "vscodeLanguageIds": ["mdx"], "wrap": true }, { "aceMode": "html", - "aliases": ["xhtml"], + "aliases": ["MJML", "mjml"], "codemirrorMimeType": "text/html", "codemirrorMode": "htmlmixed", - "color": "#e34c26", - "extensions": [".component.html"], + "extensions": [".mjml"], "filenames": [], "linguistLanguageId": 146, - "name": "Angular", - "parsers": ["angular"], - "since": "1.15.0", - "tmScope": "text.html.basic", + "name": "MJML", + "parsers": ["mjml"], + "tmScope": "text.mjml.basic", "type": "markup", - "vscodeLanguageIds": ["html"] + "vscodeLanguageIds": ["mjml"] }, { - "aceMode": "html", - "aliases": ["xhtml"], - "codemirrorMimeType": "text/html", - "codemirrorMode": "htmlmixed", - "color": "#e34c26", - "extensions": [ - ".html", - ".hta", - ".htm", - ".html.hl", - ".inc", - ".xht", - ".xhtml", - ".mjml" - ], - "linguistLanguageId": 146, - "name": "HTML", - "parsers": ["html"], - "since": "1.15.0", - "tmScope": "text.html.basic", + "aceMode": "text", + "extensions": [".pcss", ".postcss"], + "group": "CSS", + "linguistLanguageId": 262764437, + "name": "PostCSS", + "parsers": ["css"], + "tmScope": "source.postcss", "type": "markup", - "vscodeLanguageIds": ["html"] + "vscodeLanguageIds": ["postcss"] }, { - "aceMode": "html", - "aliases": ["xhtml"], - "codemirrorMimeType": "text/html", - "codemirrorMode": "htmlmixed", - "color": "#e34c26", - "extensions": [], - "filenames": [], - "linguistLanguageId": 146, - "name": "Lightning Web Components", - "parsers": ["lwc"], - "since": "1.17.0", - "tmScope": "text.html.basic", + "aceMode": "scss", + "codemirrorMimeType": "text/x-scss", + "codemirrorMode": "css", + "extensions": [".scss"], + "linguistLanguageId": 329, + "name": "SCSS", + "parsers": ["scss"], + "tmScope": "source.css.scss", "type": "markup", - "vscodeLanguageIds": ["html"] + "vscodeLanguageIds": ["scss"] + }, + { + "aceMode": "javascript", + "codemirrorMimeType": "text/jsx", + "codemirrorMode": "jsx", + "extensions": [".tsx"], + "group": "TypeScript", + "linguistLanguageId": 94901924, + "name": "TSX", + "parsers": ["typescript", "babel-ts"], + "tmScope": "source.tsx", + "type": "programming", + "vscodeLanguageIds": ["typescriptreact"] + }, + { + "aceMode": "typescript", + "aliases": ["ts"], + "codemirrorMimeType": "application/typescript", + "codemirrorMode": "javascript", + "extensions": [".ts", ".cts", ".mts"], + "interpreters": ["bun", "deno", "ts-node", "tsx"], + "linguistLanguageId": 378, + "name": "TypeScript", + "parsers": ["typescript", "babel-ts"], + "tmScope": "source.ts", + "type": "programming", + "vscodeLanguageIds": ["typescript"] }, { "aceMode": "html", - "color": "#41b883", "extensions": [".vue"], "linguistLanguageId": 391, "name": "Vue", "parsers": ["vue"], - "since": "1.10.0", - "tmScope": "text.html.vue", + "tmScope": "source.vue", "type": "markup", "vscodeLanguageIds": ["vue"] }, @@ -754,7 +745,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "aliases": ["yml"], "codemirrorMimeType": "text/x-yaml", "codemirrorMode": "yaml", - "color": "#cb171e", "extensions": [ ".yml", ".mir", @@ -770,9 +760,11 @@ exports[`CLI --support-info (stdout) 1`] = ` "filenames": [ ".clang-format", ".clang-tidy", + ".clangd", ".gemrc", "CITATION.cff", "glide.lock", + "pixi.lock", ".prettierrc", ".stylelintrc", ".lintstagedrc" @@ -780,10 +772,15 @@ exports[`CLI --support-info (stdout) 1`] = ` "linguistLanguageId": 407, "name": "YAML", "parsers": ["yaml"], - "since": "1.14.0", "tmScope": "source.yaml", "type": "data", - "vscodeLanguageIds": ["yaml", "ansible", "home-assistant"] + "vscodeLanguageIds": [ + "yaml", + "ansible", + "dockercompose", + "github-actions-workflow", + "home-assistant" + ] } ], "options": [ @@ -803,7 +800,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Include parentheses around a sole arrow function parameter.", "name": "arrowParens", "pluginDefaults": {}, - "since": "1.9.0", "type": "choice" }, { @@ -812,7 +808,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Put > of opening tags on the last line instead of on a new line.", "name": "bracketSameLine", "pluginDefaults": {}, - "since": "2.4.0", "type": "boolean" }, { @@ -822,17 +817,23 @@ exports[`CLI --support-info (stdout) 1`] = ` "name": "bracketSpacing", "oppositeDescription": "Do not print spaces between brackets.", "pluginDefaults": {}, - "since": "0.0.0", + "type": "boolean" + }, + { + "category": "Special", + "default": false, + "description": "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", + "name": "checkIgnorePragma", + "pluginDefaults": {}, "type": "boolean" }, { "category": "Special", "default": -1, - "description": "Print (to stderr) where a cursor at the given position would move to after formatting.\\nThis option cannot be used with --range-start and --range-end.", + "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", "name": "cursorOffset", "pluginDefaults": {}, "range": { "end": null, "start": -1, "step": 1 }, - "since": "1.4.0", "type": "int" }, { @@ -851,7 +852,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Control how Prettier formats quoted code embedded in the file.", "name": "embeddedLanguageFormatting", "pluginDefaults": {}, - "since": "2.1.0", "type": "choice" }, { @@ -878,15 +878,40 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Which end of line characters to apply.", "name": "endOfLine", "pluginDefaults": {}, - "since": "1.15.0", "type": "choice" }, + { + "category": "JavaScript", + "choices": [ + { + "description": "Print operators at the start of new lines.", + "value": "start" + }, + { + "description": "Print operators at the end of previous lines.", + "value": "end" + } + ], + "default": "end", + "description": "Where to print operators when binary expressions wrap lines.", + "name": "experimentalOperatorPosition", + "pluginDefaults": {}, + "type": "choice" + }, + { + "category": "JavaScript", + "default": false, + "description": "Use curious ternaries, with the question mark after the condition.", + "name": "experimentalTernaries", + "oppositeDescription": "Default behavior of ternaries; keep question marks on the same line as the consequent.", + "pluginDefaults": {}, + "type": "boolean" + }, { "category": "Special", "description": "Specify the input filepath. This will be used to do parser inference.", "name": "filepath", "pluginDefaults": {}, - "since": "1.4.0", "type": "path" }, { @@ -909,7 +934,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "How to handle whitespaces in HTML.", "name": "htmlWhitespaceSensitivity", "pluginDefaults": {}, - "since": "1.15.0", "type": "choice" }, { @@ -918,7 +942,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Insert @format pragma into file's first docblock comment.", "name": "insertPragma", "pluginDefaults": {}, - "since": "1.8.0", "type": "boolean" }, { @@ -927,67 +950,59 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Use single quotes in JSX.", "name": "jsxSingleQuote", "pluginDefaults": {}, - "since": "1.15.0", "type": "boolean" }, { - "category": "Global", + "category": "Common", "choices": [ - { "description": "Flow", "value": "flow" }, - { "description": "JavaScript", "since": "1.16.0", "value": "babel" }, - { "description": "Flow", "since": "1.16.0", "value": "babel-flow" }, - { "description": "TypeScript", "since": "2.0.0", "value": "babel-ts" }, - { - "description": "TypeScript", - "since": "1.4.0", - "value": "typescript" - }, - { "description": "JavaScript", "since": "2.6.0", "value": "acorn" }, - { "description": "JavaScript", "since": "2.2.0", "value": "espree" }, - { "description": "JavaScript", "since": "2.2.0", "value": "meriyah" }, - { "description": "CSS", "since": "1.7.1", "value": "css" }, - { "description": "Less", "since": "1.7.1", "value": "less" }, - { "description": "SCSS", "since": "1.7.1", "value": "scss" }, - { "description": "JSON", "since": "1.5.0", "value": "json" }, - { "description": "JSON5", "since": "1.13.0", "value": "json5" }, - { - "description": "JSON.stringify", - "since": "1.13.0", - "value": "json-stringify" - }, - { "description": "GraphQL", "since": "1.5.0", "value": "graphql" }, - { "description": "Markdown", "since": "1.8.0", "value": "markdown" }, - { "description": "MDX", "since": "1.15.0", "value": "mdx" }, - { "description": "Vue", "since": "1.10.0", "value": "vue" }, - { "description": "YAML", "since": "1.14.0", "value": "yaml" }, { - "description": "Ember / Handlebars", - "since": "2.3.0", - "value": "glimmer" + "description": "Keep as multi-line, if there is a newline between the opening brace and first property.", + "value": "preserve" }, - { "description": "HTML", "since": "1.15.0", "value": "html" }, - { "description": "Angular", "since": "1.15.0", "value": "angular" }, { - "description": "Lightning Web Components", - "since": "1.17.0", - "value": "lwc" + "description": "Fit to a single line when possible.", + "value": "collapse" } ], - "description": "Which parser to use.", - "name": "parser", + "default": "preserve", + "description": "How to wrap object literals.", + "name": "objectWrap", "pluginDefaults": {}, - "since": "0.0.10", "type": "choice" }, { - "array": true, "category": "Global", - "default": [], - "description": "Custom directory that contains prettier plugins in node_modules subdirectory.\\nOverrides default behavior when plugins are searched relatively to the location of Prettier.\\nMultiple values are accepted.", - "name": "pluginSearchDirs", + "choices": [ + { "description": "Flow", "value": "flow" }, + { "description": "JavaScript", "value": "babel" }, + { "description": "Flow", "value": "babel-flow" }, + { "description": "TypeScript", "value": "babel-ts" }, + { "description": "TypeScript", "value": "typescript" }, + { "description": "JavaScript", "value": "acorn" }, + { "description": "JavaScript", "value": "espree" }, + { "description": "JavaScript", "value": "meriyah" }, + { "description": "CSS", "value": "css" }, + { "description": "Less", "value": "less" }, + { "description": "SCSS", "value": "scss" }, + { "description": "JSON", "value": "json" }, + { "description": "JSON5", "value": "json5" }, + { "description": "JSON with Comments", "value": "jsonc" }, + { "description": "JSON.stringify", "value": "json-stringify" }, + { "description": "GraphQL", "value": "graphql" }, + { "description": "Markdown", "value": "markdown" }, + { "description": "MDX", "value": "mdx" }, + { "description": "Vue", "value": "vue" }, + { "description": "YAML", "value": "yaml" }, + { "description": "Ember / Handlebars", "value": "glimmer" }, + { "description": "HTML", "value": "html" }, + { "description": "Angular", "value": "angular" }, + { "description": "Lightning Web Components", "value": "lwc" }, + { "description": "MJML", "value": "mjml" } + ], + "description": "Which parser to use.", + "name": "parser", "pluginDefaults": {}, - "since": "1.13.0", - "type": "path" + "type": "choice" }, { "array": true, @@ -996,7 +1011,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.", "name": "plugins", "pluginDefaults": {}, - "since": "1.10.0", "type": "path" }, { @@ -1006,7 +1020,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "name": "printWidth", "pluginDefaults": {}, "range": { "end": null, "start": 0, "step": 1 }, - "since": "0.0.0", "type": "int" }, { @@ -1014,25 +1027,15 @@ exports[`CLI --support-info (stdout) 1`] = ` "choices": [ { "description": "Wrap prose if it exceeds the print width.", - "since": "1.9.0", "value": "always" }, - { - "description": "Do not wrap prose.", - "since": "1.9.0", - "value": "never" - }, - { - "description": "Wrap prose as-is.", - "since": "1.9.0", - "value": "preserve" - } + { "description": "Do not wrap prose.", "value": "never" }, + { "description": "Wrap prose as-is.", "value": "preserve" } ], "default": "preserve", "description": "How to wrap prose.", "name": "proseWrap", "pluginDefaults": {}, - "since": "1.8.2", "type": "choice" }, { @@ -1055,36 +1058,32 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Change when properties in objects are quoted.", "name": "quoteProps", "pluginDefaults": {}, - "since": "1.17.0", "type": "choice" }, { "category": "Special", "default": null, - "description": "Format code ending at a given character offset (exclusive).\\nThe range will extend forwards to the end of the selected statement.\\nThis option cannot be used with --cursor-offset.", + "description": "Format code ending at a given character offset (exclusive).\\nThe range will extend forwards to the end of the selected statement.", "name": "rangeEnd", "pluginDefaults": {}, "range": { "end": null, "start": 0, "step": 1 }, - "since": "1.4.0", "type": "int" }, { "category": "Special", "default": 0, - "description": "Format code starting at a given character offset.\\nThe range will extend backwards to the start of the first line containing the selected statement.\\nThis option cannot be used with --cursor-offset.", + "description": "Format code starting at a given character offset.\\nThe range will extend backwards to the start of the first line containing the selected statement.", "name": "rangeStart", "pluginDefaults": {}, "range": { "end": null, "start": 0, "step": 1 }, - "since": "1.4.0", "type": "int" }, { "category": "Special", "default": false, - "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment\\nin order for it to be formatted.", + "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", "name": "requirePragma", "pluginDefaults": {}, - "since": "1.7.0", "type": "boolean" }, { @@ -1094,7 +1093,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "name": "semi", "oppositeDescription": "Do not print semicolons, except at the beginning of lines which may need them.", "pluginDefaults": {}, - "since": "1.0.0", "type": "boolean" }, { @@ -1103,7 +1101,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Enforce single attribute per line in HTML, Vue and JSX.", "name": "singleAttributePerLine", "pluginDefaults": {}, - "since": "2.6.0", "type": "boolean" }, { @@ -1112,7 +1109,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Use single quotes instead of double quotes.", "name": "singleQuote", "pluginDefaults": {}, - "since": "0.0.0", "type": "boolean" }, { @@ -1127,21 +1123,20 @@ exports[`CLI --support-info (stdout) 1`] = ` { "category": "JavaScript", "choices": [ + { + "description": "Trailing commas wherever possible (including function arguments).", + "value": "all" + }, { "description": "Trailing commas where valid in ES5 (objects, arrays, etc.)", "value": "es5" }, - { "description": "No trailing commas.", "value": "none" }, - { - "description": "Trailing commas wherever possible (including function arguments).", - "value": "all" - } + { "description": "No trailing commas.", "value": "none" } ], - "default": "es5", + "default": "all", "description": "Print trailing commas wherever possible when multi-line.", "name": "trailingComma", "pluginDefaults": {}, - "since": "0.0.0", "type": "choice" }, { @@ -1150,7 +1145,6 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Indent with tabs instead of spaces.", "name": "useTabs", "pluginDefaults": {}, - "since": "1.0.0", "type": "boolean" }, { @@ -1159,13 +1153,10 @@ exports[`CLI --support-info (stdout) 1`] = ` "description": "Indent script and style tags in Vue files.", "name": "vueIndentScriptAndStyle", "pluginDefaults": {}, - "since": "1.19.0", "type": "boolean" } ] +}", + "write": [], } - -" `; - -exports[`CLI --support-info (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/syntax-error.js.snap b/tests/integration/__tests__/__snapshots__/syntax-error.js.snap index 337d3602d15f..6296e8fbe89a 100644 --- a/tests/integration/__tests__/__snapshots__/syntax-error.js.snap +++ b/tests/integration/__tests__/__snapshots__/syntax-error.js.snap @@ -1,12 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`exits with non-zero code when input has a syntax error (stderr) 1`] = ` -"[error] stdin: SyntaxError: Missing semicolon. (1:2) +exports[`exits with non-zero code when input has a syntax error 1`] = ` +{ + "stderr": "[error] stdin: SyntaxError: Missing semicolon. (1:2) [error] > 1 | a.2 -[error] | ^ -" +[error] | ^", + "stdout": "", + "write": [], +} `; - -exports[`exits with non-zero code when input has a syntax error (stdout) 1`] = `""`; - -exports[`exits with non-zero code when input has a syntax error (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/third-party.js.snap b/tests/integration/__tests__/__snapshots__/third-party.js.snap deleted file mode 100644 index d9088f3a7bd8..000000000000 --- a/tests/integration/__tests__/__snapshots__/third-party.js.snap +++ /dev/null @@ -1,16 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`cosmiconfig Invalid json file 1`] = ` -"JSON Error in <cwd>/tests/integration/cli/config/invalid/broken-json/.prettierrc.json: - -> 1 | {a':} - | ^ - 2 | - -Unexpected token "a" (0x61) in JSON at position 1 while parsing "{a':}/n" - -> 1 | {a':} - | ^ - 2 | -" -`; diff --git a/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap b/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap index f073f91357a5..53dcae0d92ef 100644 --- a/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap @@ -1,297 +1,78 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CLI --stdin-filepath works with --config-precedence cli-override (stdout) 1`] = ` -"let x: keyof Y = foo<typeof X>() -" +exports[`CLI --stdin-filepath works with --config-precedence cli-override 1`] = ` +{ + "stdout": "let x: keyof Y = foo<typeof X>()", + "write": [], +} `; -exports[`CLI --stdin-filepath works with --config-precedence cli-override (write) 1`] = `[]`; - -exports[`CLI --stdin-filepath works with --config-precedence file-override (stdout) 1`] = ` -"let x: keyof Y = foo<typeof X>(); -" +exports[`CLI --stdin-filepath works with --config-precedence file-override 1`] = ` +{ + "stdout": "let x: keyof Y = foo<typeof X>();", + "write": [], +} `; -exports[`CLI --stdin-filepath works with --config-precedence file-override (write) 1`] = `[]`; - -exports[`CLI --stdin-filepath works with --config-precedence prefer-file (stdout) 1`] = ` -"let x: keyof Y = foo<typeof X>(); -" +exports[`CLI --stdin-filepath works with --config-precedence prefer-file 1`] = ` +{ + "stdout": "let x: keyof Y = foo<typeof X>();", + "write": [], +} `; -exports[`CLI --stdin-filepath works with --config-precedence prefer-file (write) 1`] = `[]`; - -exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (stderr) 1`] = `""`; - -exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (stdout) 1`] = ` -"function noConfigJs() { +exports[`CLI overrides are still applied when no config is found with --config-precedence file-override 1`] = ` +{ + "stderr": "", + "stdout": "function noConfigJs() { console.log("no-config/file.js should have no semicolons") +}", + "write": [], } -" `; -exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (write) 1`] = `[]`; - -exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (stderr) 1`] = `""`; - -exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (stdout) 1`] = ` -"function noConfigJs() { +exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file 1`] = ` +{ + "stderr": "", + "stdout": "function noConfigJs() { console.log( - "no-config/file.js should have no semicolons" + "no-config/file.js should have no semicolons", ); +}", + "write": [], } -" `; -exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (write) 1`] = `[]`; - -exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (stderr) 1`] = `""`; - -exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (stdout) 1`] = ` -"function js() { +exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file 1`] = ` +{ + "stderr": "", + "stdout": "function js() { console.log("js/file.js should have tab width 8 (1 if CLI)"); +}", + "write": [], } -"use strict"; - -module.exports = { - endOfLine: "auto", - tabWidth: 8, -}; -" `; -exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (write) 1`] = `[]`; - -exports[`CLI overrides take lower precedence with --config-precedence file-override (stderr) 1`] = `""`; - -exports[`CLI overrides take lower precedence with --config-precedence file-override (stdout) 1`] = ` -"function js() { - console.log("js/file.js should have tab width 8 (1 if CLI)"); +exports[`CLI validate options with --config-precedence cli-override 1`] = ` +{ + "stderr": "[error] Invalid printWidth value. Expected an integer, but received 0.5.", + "stdout": "", + "write": [], } -"use strict"; - -module.exports = { - endOfLine: "auto", - tabWidth: 8, -}; -" `; -exports[`CLI overrides take lower precedence with --config-precedence file-override (write) 1`] = `[]`; - -exports[`CLI overrides take precedence with --config-precedence cli-override (stderr) 1`] = `""`; - -exports[`CLI overrides take precedence with --config-precedence cli-override (stdout) 1`] = ` -"function f() { - console.log( - "should have tab width 8" - ) -} -function f() { - console.log( - "should have space width 2" - ) -} -function f() { - console.log( - "should have space width 8" - ) -} -function f() { - console.log( - "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" - ) -} -console.log( - "should have no semi" -) -console.log( - "jest/__best-tests__/.file.js should have semi" -); -console.log( - "jest/__best-tests__/file.js should have semi" -); -console.log( - "jest/Component.js should not have semi" -) -console.log( - "jest/Component.test.js should have semi" -); -function js() { - console.log( - "js/file.js should have tab width 8 (1 if CLI)" - ); -} -"use strict"; - -module.exports = - { - endOfLine: "auto", - tabWidth: 8, - }; -function noConfigJs() { - console.log( - "no-config/file.js should have no semicolons" - ) -} -function packageJs() { - console.log( - "package/file.js should have tab width 3" - ); -} -function rcJson() { - console.log.apply( - null, - [ - 'rc-json/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -function rcToml() { - console.log.apply( - null, - [ - 'rc-toml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); +exports[`CLI validate options with --config-precedence file-override 1`] = ` +{ + "stderr": "[error] Invalid printWidth value. Expected an integer, but received 0.5.", + "stdout": "", + "write": [], } -function rcYaml() { - console.log.apply( - null, - [ - 'rc-yaml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -" `; -exports[`CLI overrides take precedence with --config-precedence cli-override (write) 1`] = `[]`; - -exports[`CLI overrides take precedence without --config-precedence (stderr) 1`] = `""`; - -exports[`CLI overrides take precedence without --config-precedence (stdout) 1`] = ` -"function f() { - console.log( - "should have tab width 8" - ) -} -function f() { - console.log( - "should have space width 2" - ) -} -function f() { - console.log( - "should have space width 8" - ) -} -function f() { - console.log( - "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" - ) -} -console.log( - "should have no semi" -) -console.log( - "jest/__best-tests__/.file.js should have semi" -); -console.log( - "jest/__best-tests__/file.js should have semi" -); -console.log( - "jest/Component.js should not have semi" -) -console.log( - "jest/Component.test.js should have semi" -); -function js() { - console.log( - "js/file.js should have tab width 8 (1 if CLI)" - ); -} -"use strict"; - -module.exports = - { - endOfLine: "auto", - tabWidth: 8, - }; -function noConfigJs() { - console.log( - "no-config/file.js should have no semicolons" - ) -} -function packageJs() { - console.log( - "package/file.js should have tab width 3" - ); -} -function rcJson() { - console.log.apply( - null, - [ - 'rc-json/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -function rcToml() { - console.log.apply( - null, - [ - 'rc-toml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); -} -function rcYaml() { - console.log.apply( - null, - [ - 'rc-yaml/file.js', - 'should have trailing comma', - 'and single quotes', - ], - ); +exports[`CLI validate options with --config-precedence prefer-file 1`] = ` +{ + "stderr": "[error] Invalid printWidth value. Expected an integer, but received 0.5.", + "stdout": "", + "write": [], } -" `; - -exports[`CLI overrides take precedence without --config-precedence (write) 1`] = `[]`; - -exports[`CLI validate options with --config-precedence cli-override (stderr) 1`] = ` -"[error] Invalid printWidth value. Expected an integer, but received 0.5. -" -`; - -exports[`CLI validate options with --config-precedence cli-override (stdout) 1`] = `""`; - -exports[`CLI validate options with --config-precedence cli-override (write) 1`] = `[]`; - -exports[`CLI validate options with --config-precedence file-override (stderr) 1`] = ` -"[error] Invalid printWidth value. Expected an integer, but received 0.5. -" -`; - -exports[`CLI validate options with --config-precedence file-override (stdout) 1`] = `""`; - -exports[`CLI validate options with --config-precedence file-override (write) 1`] = `[]`; - -exports[`CLI validate options with --config-precedence prefer-file (stderr) 1`] = ` -"[error] Invalid printWidth value. Expected an integer, but received 0.5. -" -`; - -exports[`CLI validate options with --config-precedence prefer-file (stdout) 1`] = `""`; - -exports[`CLI validate options with --config-precedence prefer-file (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/with-node-modules.js.snap b/tests/integration/__tests__/__snapshots__/with-node-modules.js.snap index 7cf2d3fb31a7..5e8abe0ddfbd 100644 --- a/tests/integration/__tests__/__snapshots__/with-node-modules.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-node-modules.js.snap @@ -1,55 +1,50 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`doesn't ignore node_modules with --with-node-modules flag (stderr) 1`] = `""`; - -exports[`doesn't ignore node_modules with --with-node-modules flag (stdout) 1`] = ` -"nested/node_modules/node-module.js +exports[`doesn't ignore node_modules with --with-node-modules flag 1`] = ` +{ + "stderr": "", + "stdout": "nested/node_modules/node-module.js node_modules/node-module.js not_node_modules/file.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`doesn't ignore node_modules with --with-node-modules flag (write) 1`] = `[]`; - -exports[`doesn't ignore node_modules with --with-node-modules flag for file list (stderr) 1`] = `""`; - -exports[`doesn't ignore node_modules with --with-node-modules flag for file list (stdout) 1`] = ` -"node_modules/node-module.js +exports[`doesn't ignore node_modules with --with-node-modules flag for file list 1`] = ` +{ + "stderr": "", + "stdout": "node_modules/node-module.js not_node_modules/file.js nested/node_modules/node-module.js -regular-module.js -" +regular-module.js", + "write": [], +} `; -exports[`doesn't ignore node_modules with --with-node-modules flag for file list (write) 1`] = `[]`; - -exports[`ignores node_modules by default (stderr) 1`] = `""`; - -exports[`ignores node_modules by default (stdout) 1`] = ` -"not_node_modules/file.js -regular-module.js -" +exports[`ignores node_modules by default 1`] = ` +{ + "stderr": "", + "stdout": "not_node_modules/file.js +regular-module.js", + "write": [], +} `; -exports[`ignores node_modules by default (write) 1`] = `[]`; - -exports[`ignores node_modules by default for file list (stderr) 1`] = `""`; - -exports[`ignores node_modules by default for file list (stdout) 1`] = ` -"not_node_modules/file.js -regular-module.js -" +exports[`ignores node_modules by default for file list 1`] = ` +{ + "stderr": "", + "stdout": "not_node_modules/file.js +regular-module.js", + "write": [], +} `; -exports[`ignores node_modules by default for file list (write) 1`] = `[]`; - -exports[`ignores node_modules by with ./**/*.js (stderr) 1`] = `""`; - -exports[`ignores node_modules by with ./**/*.js (stdout) 1`] = ` -"not_node_modules/file.js -regular-module.js -" +exports[`ignores node_modules by with ./**/*.js 1`] = ` +{ + "stderr": "", + "stdout": "not_node_modules/file.js +regular-module.js", + "write": [], +} `; - -exports[`ignores node_modules by with ./**/*.js (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap b/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap index 26f84ade7dcd..5a32a72f092c 100644 --- a/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap @@ -1,31 +1,31 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`infers postcss parser (stderr) 1`] = `""`; - -exports[`infers postcss parser (stdout) 1`] = ` -"/* JavaScript */ +exports[`infers postcss parser 1`] = ` +{ + "stderr": "", + "stdout": "/* JavaScript */ "use strict"; /* Stylesheet */ * { outline: none; +}", + "write": [], } -" `; -exports[`infers postcss parser (write) 1`] = `[]`; - -exports[`infers postcss parser with --check (stderr) 1`] = `""`; - -exports[`infers postcss parser with --check (stdout) 1`] = ` -"Checking formatting... -All matched files use Prettier code style! -" +exports[`infers postcss parser with --check 1`] = ` +{ + "stderr": "", + "stdout": "Checking formatting... +All matched files use Prettier code style!", + "write": [], +} `; -exports[`infers postcss parser with --check (write) 1`] = `[]`; - -exports[`infers postcss parser with --list-different (stderr) 1`] = `""`; - -exports[`infers postcss parser with --list-different (stdout) 1`] = `""`; - -exports[`infers postcss parser with --list-different (write) 1`] = `[]`; +exports[`infers postcss parser with --list-different 1`] = ` +{ + "stderr": "", + "stdout": "", + "write": [], +} +`; diff --git a/tests/integration/__tests__/__snapshots__/with-shebang.js.snap b/tests/integration/__tests__/__snapshots__/with-shebang.js.snap index b93745658d4b..4f57f17a6547 100644 --- a/tests/integration/__tests__/__snapshots__/with-shebang.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-shebang.js.snap @@ -1,11 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`preserves shebang (stderr) 1`] = `""`; - -exports[`preserves shebang (stdout) 1`] = ` -"#!/usr/bin/env node -"use strict"; -" +exports[`preserves shebang 1`] = ` +{ + "stderr": "", + "stdout": "#!/usr/bin/env node +"use strict";", + "write": [], +} `; - -exports[`preserves shebang (write) 1`] = `[]`; diff --git a/tests/integration/__tests__/__snapshots__/write.js.snap b/tests/integration/__tests__/__snapshots__/write.js.snap index c83ebede0b14..ddeed125f9e8 100644 --- a/tests/integration/__tests__/__snapshots__/write.js.snap +++ b/tests/integration/__tests__/__snapshots__/write.js.snap @@ -1,54 +1,45 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`do not write file with --write + formatted file (stderr) 1`] = `""`; - -exports[`do not write file with --write + formatted file (stdout) 1`] = ` -"formatted.js 0ms -" +exports[`do not write file with --write + formatted file 1`] = ` +{ + "stderr": "", + "stdout": "formatted.js 0ms (unchanged)", +} `; -exports[`do not write file with --write + invalid file (stderr) 1`] = ` -"[error] invalid.js: SyntaxError: Unexpected token (1:17) +exports[`do not write file with --write + invalid file 1`] = ` +{ + "stderr": "[error] invalid.js: SyntaxError: Unexpected token (1:17) [error] > 1 | this is invalid! -[error] | ^ -" -`; - -exports[`do not write file with --write + invalid file (stdout) 1`] = ` -" -" +[error] | ^", + "stdout": "", +} `; -exports[`write file with --write + unformatted file (stderr) 1`] = `""`; - -exports[`write file with --write + unformatted file (stdout) 1`] = ` -"unformatted.js 0ms -" -`; - -exports[`write file with --write + unformatted file (write) 1`] = ` -[ - { - "content": "var x = 1; +exports[`write file with --write + unformatted file 1`] = ` +{ + "stderr": "", + "stdout": "unformatted.js 0ms", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] -`; - -exports[`write file with -w + unformatted file (stderr) 1`] = `""`; - -exports[`write file with -w + unformatted file (stdout) 1`] = ` -"unformatted.js 0ms -" + "filename": "unformatted.js", + }, + ], +} `; -exports[`write file with -w + unformatted file (write) 1`] = ` -[ - { - "content": "var x = 1; +exports[`write file with -w + unformatted file 1`] = ` +{ + "stderr": "", + "stdout": "unformatted.js 0ms", + "write": [ + { + "content": "var x = 1; ", - "filename": "unformatted.js", - }, -] + "filename": "unformatted.js", + }, + ], +} `; diff --git a/tests/integration/__tests__/arg-parsing.js b/tests/integration/__tests__/arg-parsing.js index 433def782052..fa5a0c72a73f 100644 --- a/tests/integration/__tests__/arg-parsing.js +++ b/tests/integration/__tests__/arg-parsing.js @@ -1,10 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("boolean flags do not swallow the next argument", () => { - runPrettier("cli/arg-parsing", [ + runCli("cli/arg-parsing", [ "--end-of-line", "lf", "--single-quote", @@ -15,7 +10,7 @@ describe("boolean flags do not swallow the next argument", () => { }); describe("negated options work", () => { - runPrettier("cli/arg-parsing", [ + runCli("cli/arg-parsing", [ "--end-of-line", "lf", "--no-semi", @@ -26,7 +21,7 @@ describe("negated options work", () => { }); describe("unknown options are warned", () => { - runPrettier("cli/arg-parsing", [ + runCli("cli/arg-parsing", [ "--end-of-line", "lf", "file.js", @@ -37,7 +32,7 @@ describe("unknown options are warned", () => { }); describe("unknown negated options are warned", () => { - runPrettier("cli/arg-parsing", [ + runCli("cli/arg-parsing", [ "--end-of-line", "lf", "file.js", @@ -48,19 +43,19 @@ describe("unknown negated options are warned", () => { }); describe("unknown options not suggestion `_`", () => { - runPrettier("cli/arg-parsing", ["file.js", "-a"]).test({ + runCli("cli/arg-parsing", ["file.js", "-a"]).test({ status: 0, write: [], }); }); describe("allow overriding flags", () => { - runPrettier( + runCli( "cli/arg-parsing", ["--tab-width=1", "--tab-width=3", "--parser=babel"], - { input: "function a() { b }" } + { input: "function a() { b }" }, ).test({ - stdout: "function a() {\n b;\n}\n", + stdout: "function a() {\n b;\n}", status: 0, }); }); @@ -68,7 +63,7 @@ describe("allow overriding flags", () => { describe("number file/dir", () => { const patterns = ["1", "2.2", "3", "4.44"]; for (const pattern of patterns) { - runPrettier("cli/arg-parsing/number", [ + runCli("cli/arg-parsing/number", [ "--parser=babel", "--list-different", pattern, @@ -78,7 +73,7 @@ describe("number file/dir", () => { write: [], }); } - runPrettier("cli/arg-parsing/number", [ + runCli("cli/arg-parsing/number", [ "--parser=babel", "--list-different", ...patterns, @@ -90,19 +85,19 @@ describe("number file/dir", () => { }); describe("deprecated option values are warned", () => { - runPrettier("cli/arg-parsing", ["file.js", "--jsx-bracket-same-line"]).test({ + runCli("cli/arg-parsing", ["file.js", "--jsx-bracket-same-line"]).test({ status: 0, }); }); describe("options with `cliName` should not allow to pass directly", () => { // `filepath` can only pass through `--stdin-filepath` - // `plugins` and `pluginSearchDirs` works the same - runPrettier("cli/arg-parsing", ["--stdin-filepath", "file.js"], { + // `plugins` works the same + runCli("cli/arg-parsing", ["--stdin-filepath", "file.js"], { isTTY: false, input: "prettier()", }).test({ status: 0, stderr: "", write: [] }); - runPrettier("cli/arg-parsing", ["--filepath", "file.js"], { + runCli("cli/arg-parsing", ["--filepath", "file.js"], { isTTY: false, input: "prettier()", }).test({ status: 2, write: [] }); diff --git a/tests/integration/__tests__/bundle.js b/tests/integration/__tests__/bundle.js index dacaf2edd994..9e60e8708b52 100644 --- a/tests/integration/__tests__/bundle.js +++ b/tests/integration/__tests__/bundle.js @@ -1,18 +1,17 @@ -"use strict"; - -const path = require("path"); -const fs = require("fs"); -const fastGlob = require("fast-glob"); -const { projectRoot } = require("../env.js"); -const createSandBox = require("../../config/utils/create-sandbox.js"); -const coreOptions = require("../../../src/main/core-options.js"); -const codeSamples = - require("../../../website/playground/codeSamples.js").default; - -const parserNames = coreOptions.options.parser.choices.map( - ({ value }) => value -); -const distDirectory = path.join(projectRoot, "dist"); +import fs from "node:fs/promises"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import fastGlob from "fast-glob"; +import coreOptions from "../../../src/main/core-options.evaluate.js"; +import codeSamples from "../../../website/playground/codeSamples.mjs"; +import prettier from "../../config/prettier-entry.js"; +import createSandBox from "../../config/utils/create-sandbox.cjs"; +import { projectRoot } from "../env.js"; + +const { require, importModule } = createEsmUtils(import.meta); + +const parserNames = coreOptions.parser.choices.map(({ value }) => value); +const distDirectory = path.join(projectRoot, "dist/prettier"); // Files including U+FFEE can't load in Chrome Extension // `prettier-chrome-extension` https://github.com/prettier/prettier-chrome-extension @@ -24,7 +23,7 @@ test("code", async () => { }); for (const file of files) { - const text = await fs.promises.readFile(file, "utf8"); + const text = await fs.readFile(file, "utf8"); expect(text.includes("\ufffe")).toBe(false); } }); @@ -32,21 +31,29 @@ test("code", async () => { describe("standalone", () => { const standalone = require(path.join(distDirectory, "standalone.js")); const plugins = fastGlob - .sync(["parser-*.js"], { cwd: distDirectory, absolute: true }) + .sync(["plugins/*.js"], { cwd: distDirectory, absolute: true }) .map((file) => require(file)); - const esmStandalone = require(path.join( - distDirectory, - "esm/standalone.mjs" - )).default; - const esmPlugins = fastGlob - .sync(["esm/parser-*.mjs"], { cwd: distDirectory, absolute: true }) - .map((file) => require(file).default); + let esmStandalone; + let esmPlugins; + beforeAll(async () => { + esmStandalone = await importModule( + path.join(distDirectory, "standalone.mjs"), + ); + esmPlugins = await Promise.all( + fastGlob + .sync(["plugins/*.mjs"], { cwd: distDirectory, absolute: true }) + .map(async (file) => { + const plugin = await importModule(file); + return plugin.default ?? plugin; + }), + ); + }); for (const parser of parserNames) { - test(parser, () => { + test(parser, async () => { const input = codeSamples(parser); - const umdOutput = standalone.format(input, { + const umdOutput = await standalone.format(input, { parser, plugins, }); @@ -55,7 +62,7 @@ describe("standalone", () => { expect(typeof umdOutput).toBe("string"); expect(umdOutput).not.toBe(input); - const esmOutput = esmStandalone.format(input, { + const esmOutput = await esmStandalone.format(input, { parser, plugins: esmPlugins, }); @@ -66,7 +73,7 @@ describe("standalone", () => { }); test("global objects", async () => { - const files = await fastGlob(["standalone.js", "parser-*.js"], { + const files = await fastGlob(["standalone.js", "plugins/*.js"], { cwd: distDirectory, absolute: true, }); @@ -76,8 +83,8 @@ test("global objects", async () => { const sandbox = createSandBox({ files: [file] }); return Object.fromEntries( Object.entries(sandbox).filter( - ([property]) => !allowedGlobalObjects.has(property) - ) + ([property]) => !allowedGlobalObjects.has(property), + ), ); }; @@ -87,3 +94,35 @@ test("global objects", async () => { expect(globalObjects).toStrictEqual({}); } }); + +test("Commonjs version", () => { + const prettierCommonjsVersion = require( + path.join(distDirectory, "index.cjs"), + ); + + expect(Object.keys(prettierCommonjsVersion).sort()).toEqual( + Object.keys(prettier) + .filter((key) => key !== "default" && key !== "__internal") + .sort(), + ); + expect(typeof prettierCommonjsVersion.format).toBe("function"); + + expect(Object.keys(prettierCommonjsVersion.doc)).toEqual( + Object.keys(prettier.doc).filter((key) => key !== "default"), + ); + expect(typeof prettierCommonjsVersion.doc.builders.fill).toBe("function"); + + expect(Object.keys(prettierCommonjsVersion.util)).toEqual( + Object.keys(prettier.util), + ); + expect(typeof prettierCommonjsVersion.util.getStringWidth).toBe("function"); + + expect(Object.keys(prettierCommonjsVersion.__debug).sort()).toEqual( + Object.keys(prettier.__debug) + .filter((key) => key !== "mockable") + .sort(), + ); + expect(typeof prettierCommonjsVersion.__debug.parse).toBe("function"); + + expect(prettierCommonjsVersion.version).toBe(prettier.version); +}); diff --git a/tests/integration/__tests__/cache.js b/tests/integration/__tests__/cache.js index 62fc80be232e..6eced1075957 100644 --- a/tests/integration/__tests__/cache.js +++ b/tests/integration/__tests__/cache.js @@ -1,88 +1,109 @@ -"use strict"; - -const path = require("path"); -const { promises: fs } = require("fs"); -const rimraf = require("rimraf"); -const { default: stripAnsi } = require("../../../vendors/strip-ansi.js"); - -const runPrettier = require("../run-prettier.js"); +import fs from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; function resolveDir(dir) { - return path.join(__dirname, "..", dir); + return fileURLToPath(new URL(`../${dir}/`, import.meta.url)); } +const runCliWithoutGitignore = (dir, args, options) => + runCli(dir, [...args, "--ignore-path", ".prettierignore"], options); + describe("--cache option", () => { const dir = resolveDir("cli/cache"); const defaultCacheFile = path.join( dir, - "node_modules/.cache/prettier/.prettier-cache" + "node_modules/.cache/prettier/.prettier-cache", ); const nonDefaultCacheFileName = ".non-default-cache-file"; + const directoryNameAsCacheFile = "directory-as-cache-file"; const nonDefaultCacheFilePath = path.join(dir, nonDefaultCacheFileName); - let contentA; - let contentB; + const contentA = `function a() { + console.log("this is a.js") +} +`; + const contentB = `function b() { + console.log("this is b.js"); +} +`; + + const clean = async () => { + await fs.rm(path.join(dir, directoryNameAsCacheFile), { + force: true, + recursive: true, + }); + await fs.rm(nonDefaultCacheFilePath, { force: true }); + await fs.rm(path.join(dir, "a.js"), { force: true }); + await fs.rm(path.join(dir, "b.js"), { force: true }); + }; beforeAll(async () => { - contentA = await fs.readFile(path.join(dir, "a.js"), "utf8"); - contentB = await fs.readFile(path.join(dir, "b.js"), "utf8"); + await clean(); + await fs.mkdir(path.join(dir, directoryNameAsCacheFile)); + await fs.writeFile(path.join(dir, "a.js"), contentA); + await fs.writeFile(path.join(dir, "b.js"), contentB); }); afterEach(async () => { - rimraf.sync(path.join(dir, "node_modules")); - rimraf.sync(nonDefaultCacheFilePath); + await fs.rm(path.join(dir, "node_modules"), { + force: true, + recursive: true, + }); + await fs.rm(nonDefaultCacheFilePath, { force: true }); await fs.writeFile(path.join(dir, "a.js"), contentA); await fs.writeFile(path.join(dir, "b.js"), contentB); }); + afterAll(clean); it("throw error when cache-strategy is invalid", async () => { - const { stderr } = await runPrettier(dir, [ + const { stderr } = await runCliWithoutGitignore(dir, [ "--cache", "--cache-strategy", "invalid", - ".", + "*.js", ]); - expect(stripAnsi(stderr.trim())).toBe( - '[error] Invalid --cache-strategy value. Expected "content" or "metadata", but received "invalid".' + expect(stderr.trim()).toBe( + '[error] Invalid --cache-strategy value. Expected "content" or "metadata", but received "invalid".', ); }); it("throws error when use with --stdin-filepath", async () => { - const { stderr } = await runPrettier( + const { stderr } = await runCliWithoutGitignore( dir, ["--cache", "--stdin-filepath", "foo.js"], - { input: "const a = a;" } + { input: "const a = a;" }, ); - expect(stripAnsi(stderr.trim())).toBe( - "[error] `--cache` cannot be used with stdin." + expect(stderr.trim()).toBe( + "[error] `--cache` cannot be used when formatting stdin.", ); }); it("throws error when use `--cache-strategy` without `--cache`.", async () => { - const { stderr } = await runPrettier( + const { stderr } = await runCliWithoutGitignore( dir, ["foo.js", "--cache-strategy", "content"], { input: "const a = a;", - } + }, ); - expect(stripAnsi(stderr.trim())).toBe( - "[error] `--cache-strategy` cannot be used without `--cache`." + expect(stderr.trim()).toBe( + "[error] `--cache-strategy` cannot be used without `--cache`.", ); }); it("throws error when `--cache-location` is a directory.", async () => { - const { stderr } = await runPrettier(dir, [ + const { stderr } = await runCliWithoutGitignore(dir, [ "foo.js", "--cache", "--cache-location", - "dir", + directoryNameAsCacheFile, ]); - expect(stripAnsi(stderr.trim())).toEqual( + expect(stderr.trim()).toEqual( expect.stringMatching( - /\[error] Resolved --cache-location '.+' is a directory/ - ) + /\[error\] Resolved --cache-location '.+' is a directory/u, + ), ); }); @@ -90,39 +111,44 @@ describe("--cache option", () => { it("creates default cache file named `node_modules/.cache/prettier/.prettier-cache`", async () => { await expect(fs.stat(defaultCacheFile)).rejects.toHaveProperty( "code", - "ENOENT" + "ENOENT", ); - await runPrettier(dir, ["--cache", "--cache-strategy", "metadata", "."]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "metadata", + "*.js", + ]); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); }); it("doesn't format when cache is available", async () => { - const { stdout: firstStdout } = await runPrettier(dir, [ + const { stdout: firstStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms \(cached\)$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms \(unchanged\) \(cached\)$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -132,26 +158,32 @@ describe("--cache option", () => { "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); // Update `a.js` await fs.writeFile(path.join(dir, "a.js"), "const a = `a`;"); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( // the cache of `b.js` is only available. expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -161,77 +193,88 @@ describe("--cache option", () => { "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); // update timestamp const time = new Date(); await fs.utimes(path.join(dir, "a.js"), time, time); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( // the cache of `b.js` is only available. expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); it("re-formats when options has been updated.", async () => { - const { stdout: firstStdout } = await runPrettier(dir, [ + const { stdout: firstStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--cache-strategy", "metadata", "--write", "--trailing-comma", "all", - ".", + "*.js", ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); }); it("re-formats after execution without write.", async () => { - await runPrettier(dir, ["--cache", "--cache-strategy", "metadata", "."]); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "metadata", + "*.js", + ]); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--write", "--cache", "--cache-strategy", "metadata", - ".", + "*.js", ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -241,9 +284,9 @@ describe("--cache option", () => { "--cache", "--cache-strategy", "metadata", - ".", + "*.js", ]; - await runPrettier(dir, cliArguments); + await runCliWithoutGitignore(dir, cliArguments); // Update `a.js` to unformatted await fs.writeFile(path.join(dir, "a.js"), "const a = `a`; "); @@ -252,14 +295,22 @@ describe("--cache option", () => { const time = new Date(); await fs.utimes(path.join(dir, "b.js"), time, time); - await runPrettier(dir, ["--cache", "--cache-strategy", "metadata", "."]); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "metadata", + "*.js", + ]); - const { stdout: thirdStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(thirdStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: thirdStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(thirdStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -268,50 +319,48 @@ describe("--cache option", () => { stdout: firstStdout, stderr: firstStderr, status: firstStatus, - } = await runPrettier( + } = await runCliWithoutGitignore( dir, - ["--write", "--cache", "--cache-strategy", "metadata", "."], + ["--write", "--cache", "--cache-strategy", "metadata", "*.js"], { mockWriteFileErrors: { - "a.js": "EACCES: permission denied (mock error)", + "a.js": "EACCES: permission denied.", }, - } + }, ); expect(firstStatus).toBe(2); - expect(stripAnsi(firstStderr).split("\n").filter(Boolean)).toEqual([ - "[error] Unable to write file: a.js", - "[error] EACCES: permission denied (mock error)", - ]); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + expect(firstStderr).toBe( + '[error] Unable to write file "a.js":\n' + + "[error] EACCES: permission denied. (mocked error)", + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--list-different", "--cache", "--cache-strategy", "metadata", - ".", - ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual([ - "a.js", + "*.js", ]); + expect(secondStdout).toBe("a.js"); }); it("removes cache file when run Prettier without `--cache` option", async () => { - await runPrettier(dir, [ + await runCliWithoutGitignore(dir, [ "--cache", "--write", "--cache-strategy", "metadata", - ".", + "*.js", ]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); - await runPrettier(dir, ["--write", "."]); - await expect(fs.stat(defaultCacheFile)).rejects.toThrowError(); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); + await runCliWithoutGitignore(dir, ["--write", "*.js"]); + await expect(fs.stat(defaultCacheFile)).rejects.toThrow(); }); }); @@ -319,10 +368,15 @@ describe("--cache option", () => { it("creates default cache file named `node_modules/.cache/prettier/.prettier-cache`", async () => { await expect(fs.stat(defaultCacheFile)).rejects.toHaveProperty( "code", - "ENOENT" + "ENOENT", ); - await runPrettier(dir, ["--cache", "--cache-strategy", "content", "."]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "content", + "*.js", + ]); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); }); it("doesn't format when cache is available", async () => { @@ -331,22 +385,28 @@ describe("--cache option", () => { "--cache-strategy", "content", "--write", - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms \(cached\)$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms \(unchanged\) \(cached\)$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -356,105 +416,122 @@ describe("--cache option", () => { "--cache-strategy", "content", "--write", - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); // Update `a.js` await fs.writeFile(path.join(dir, "a.js"), "const a = `a`;"); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( // the cache of `b.js` is only available. expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); - it("doesn't re-format when timestamp has been updated", async () => { + it("doesn't when timestamp has been updated", async () => { const cliArguments = [ "--cache", "--cache-strategy", "content", "--write", - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); // update timestamp const time = new Date(); await fs.utimes(path.join(dir, "a.js"), time, time); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms \(cached\)$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms \(unchanged\) \(cached\)$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); it("re-formats when options has been updated.", async () => { - const { stdout: firstStdout } = await runPrettier(dir, [ + const { stdout: firstStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--cache-strategy", "content", "--write", - ".", + "*.js", ]); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--cache", "--write", "--cache-strategy", "content", "--trailing-comma", "all", - ".", + "*.js", ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); }); it("re-formats after execution without write.", async () => { - await runPrettier(dir, ["--cache", "--cache-strategy", "content", "."]); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "content", + "*.js", + ]); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--write", "--cache", "--cache-strategy", "content", - ".", + "*.js", ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -464,9 +541,9 @@ describe("--cache option", () => { "--cache", "--cache-strategy", "content", - ".", + "*.js", ]; - await runPrettier(dir, cliArguments); + await runCliWithoutGitignore(dir, cliArguments); // Update `a.js` to unformatted await fs.writeFile(path.join(dir, "a.js"), "const a = `a`; "); @@ -475,14 +552,22 @@ describe("--cache option", () => { const time = new Date(); await fs.utimes(path.join(dir, "b.js"), time, time); - await runPrettier(dir, ["--cache", "--cache-strategy", "content", "."]); + await runCliWithoutGitignore(dir, [ + "--cache", + "--cache-strategy", + "content", + "*.js", + ]); - const { stdout: thirdStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(thirdStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: thirdStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(thirdStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); @@ -491,44 +576,42 @@ describe("--cache option", () => { stdout: firstStdout, stderr: firstStderr, status: firstStatus, - } = await runPrettier( + } = await runCliWithoutGitignore( dir, - ["--write", "--cache", "--cache-strategy", "content", "."], + ["--write", "--cache", "--cache-strategy", "content", "*.js"], { mockWriteFileErrors: { - "a.js": "EACCES: permission denied (mock error)", + "a.js": "EACCES: permission denied.", }, - } + }, ); expect(firstStatus).toBe(2); - expect(stripAnsi(firstStderr).split("\n").filter(Boolean)).toEqual([ - "[error] Unable to write file: a.js", - "[error] EACCES: permission denied (mock error)", - ]); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + expect(firstStderr).toBe( + '[error] Unable to write file "a.js":\n' + + "[error] EACCES: permission denied. (mocked error)", + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, [ + const { stdout: secondStdout } = await runCliWithoutGitignore(dir, [ "--list-different", "--cache", "--cache-strategy", "content", - ".", - ]); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual([ - "a.js", + "*.js", ]); + expect(secondStdout).toBe("a.js"); }); it("removes cache file when run Prettier without `--cache` option", async () => { - await runPrettier(dir, ["--cache", "--write", "."]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); - await runPrettier(dir, ["--write", "."]); - await expect(fs.stat(defaultCacheFile)).rejects.toThrowError(); + await runCliWithoutGitignore(dir, ["--cache", "--write", "*.js"]); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); + await runCliWithoutGitignore(dir, ["--write", "*.js"]); + await expect(fs.stat(defaultCacheFile)).rejects.toThrow(); }); }); @@ -536,29 +619,29 @@ describe("--cache option", () => { it("doesn't create default cache file when `--cache-location` exists", async () => { await expect(fs.stat(defaultCacheFile)).rejects.toHaveProperty( "code", - "ENOENT" + "ENOENT", ); - await runPrettier(dir, [ + await runCliWithoutGitignore(dir, [ "--cache", "--cache-location", nonDefaultCacheFileName, - ".", + "*.js", ]); await expect(fs.stat(defaultCacheFile)).rejects.toHaveProperty( "code", - "ENOENT" + "ENOENT", ); }); it("throws error for invalid JSON file", async () => { - const { stderr } = await runPrettier(dir, [ + const { stderr } = await runCliWithoutGitignore(dir, [ "--cache", "--cache-location", "a.js", - ".", + "*.js", ]); - expect(stripAnsi(stderr).trim()).toEqual( - expect.stringMatching(/\[error] '.+' isn't a valid JSON file/) + expect(stderr.trim()).toEqual( + expect.stringMatching(/\[error\] '.+' isn't a valid JSON file/u), ); }); @@ -566,17 +649,15 @@ describe("--cache option", () => { it("creates the cache file at location specified by `--cache-location`", async () => { await expect(fs.stat(nonDefaultCacheFilePath)).rejects.toHaveProperty( "code", - "ENOENT" + "ENOENT", ); - await runPrettier(dir, [ + await runCliWithoutGitignore(dir, [ "--cache", "--cache-location", nonDefaultCacheFileName, - ".", + "*.js", ]); - await expect( - fs.stat(nonDefaultCacheFilePath) - ).resolves.not.toThrowError(); + await expect(fs.stat(nonDefaultCacheFilePath)).resolves.not.toThrow(); }); it("does'nt format when cache is available", async () => { @@ -585,22 +666,28 @@ describe("--cache option", () => { "--write", "--cache-location", nonDefaultCacheFileName, - ".", + "*.js", ]; - const { stdout: firstStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(firstStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: firstStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(firstStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms$/), - expect.stringMatching(/^b\.js .+ms$/), - ]) + expect.stringMatching(/^a\.js .+ms$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\)$/u), + ]), ); - const { stdout: secondStdout } = await runPrettier(dir, cliArguments); - expect(stripAnsi(secondStdout).split("\n").filter(Boolean)).toEqual( + const { stdout: secondStdout } = await runCliWithoutGitignore( + dir, + cliArguments, + ); + expect(secondStdout.split("\n")).toEqual( expect.arrayContaining([ - expect.stringMatching(/^a\.js .+ms \(cached\)$/), - expect.stringMatching(/^b\.js .+ms \(cached\)$/), - ]) + expect.stringMatching(/^a\.js .+ms \(unchanged\) \(cached\)$/u), + expect.stringMatching(/^b\.js .+ms \(unchanged\) \(cached\)$/u), + ]), ); }); }); diff --git a/tests/integration/__tests__/check.js b/tests/integration/__tests__/check.js index 183c48e8eb94..f84e395797e5 100644 --- a/tests/integration/__tests__/check.js +++ b/tests/integration/__tests__/check.js @@ -1,45 +1,41 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("checks stdin with --check", () => { - runPrettier("cli/with-shebang", ["--check", "--parser", "babel"], { + runCli("cli/with-shebang", ["--check", "--parser", "babel"], { input: "0", }).test({ - stdout: "(stdin)\n", + stdout: "(stdin)", stderr: "", status: "non-zero", }); }); describe("checks stdin with -c (alias for --check)", () => { - runPrettier("cli/with-shebang", ["-c", "--parser", "babel"], { + runCli("cli/with-shebang", ["-c", "--parser", "babel"], { input: "0", }).test({ - stdout: "(stdin)\n", + stdout: "(stdin)", stderr: "", status: "non-zero", }); }); describe("--checks works in CI just as in a non-TTY mode", () => { - const result0 = runPrettier( + const result0 = runCli( "cli/write", ["--check", "formatted.js", "unformatted.js"], { stdoutIsTTY: true, ci: true, - } + }, ).test({ status: 1, }); - const result1 = runPrettier( + const result1 = runCli( "cli/write", ["--check", "formatted.js", "unformatted.js"], { stdoutIsTTY: false, - } + }, ).test({ status: 1, }); @@ -50,7 +46,7 @@ describe("--checks works in CI just as in a non-TTY mode", () => { }); describe("--checks should print the number of files that need formatting", () => { - runPrettier("cli/write", ["--check", "unformatted.js", "unformatted2.js"], { + runCli("cli/write", ["--check", "unformatted.js", "unformatted2.js"], { input: "0", }).test({ status: 1, diff --git a/tests/integration/__tests__/cli.js b/tests/integration/__tests__/cli.js index 362b4e5d2dcd..3f442e7386d3 100644 --- a/tests/integration/__tests__/cli.js +++ b/tests/integration/__tests__/cli.js @@ -1,9 +1,10 @@ -"use strict"; -const fs = require("fs"); -const { prettierCli } = require("../env.js"); +import fs from "node:fs"; +import { prettierCliEntry } from "../env.js"; describe("CLI", () => { test("CLI should be executable.", () => { - expect(() => fs.accessSync(prettierCli, fs.constants.X_OK)).not.toThrow(); + expect(() => + fs.accessSync(prettierCliEntry, fs.constants.X_OK), + ).not.toThrow(); }); }); diff --git a/tests/integration/__tests__/config-file-typescript.js b/tests/integration/__tests__/config-file-typescript.js new file mode 100644 index 000000000000..d1962f3ae0b4 --- /dev/null +++ b/tests/integration/__tests__/config-file-typescript.js @@ -0,0 +1,95 @@ +import { outdent } from "outdent"; +import jestPathSerializer from "../path-serializer.js"; + +expect.addSnapshotSerializer(jestPathSerializer); + +const NODE_TS_SUPPORT_FLAGS = ["--experimental-strip-types"]; +const NODE_JS_MAJOR_VERSION = Number(process.versions.node.split(".")[0]); + +const getOutputTabWidth = (code) => + code.match(/\n(?<indention>\s+)return/u).groups.indention.length; +const code = "function foo() {return bar}"; + +const TAB_WIDTH_3_OUTPUT = outdent` + function foo() { + ${" ".repeat(3)}return bar; + } +`; + +// Node.js>=22 supports ts files, 22 requires experimental flag, 23 doesn't +if (NODE_JS_MAJOR_VERSION >= 22) { + const nodeOptions = NODE_JS_MAJOR_VERSION === 22 ? NODE_TS_SUPPORT_FLAGS : []; + + test("Should support typescript config files", async () => { + const output = await runCli( + "cli/config/ts/auto-discovery/", + ["--stdin-filepath", "foo.js"], + { + input: code, + nodeOptions, + }, + ).stdout; + + expect(output).toBe(TAB_WIDTH_3_OUTPUT); + }); + + describe("Config file names", () => { + for (const { configFileName, expectedTabWidth } of [ + { configFileName: ".prettierrc.cts", expectedTabWidth: 8 }, + { configFileName: ".prettierrc.mts", expectedTabWidth: 3 }, + { configFileName: ".prettierrc.ts", expectedTabWidth: 4 }, + { configFileName: "prettier.config.cts", expectedTabWidth: 7 }, + { configFileName: "prettier.config.mts", expectedTabWidth: 6 }, + { configFileName: "prettier.config.ts", expectedTabWidth: 5 }, + ]) { + test(`Should format file with tabWidth: ${expectedTabWidth} with config file '${configFileName}'.`, async () => { + const output = await runCli( + "cli/config/ts/config-file-names/", + ["--stdin-filepath", "foo.js", "--config", configFileName], + { + input: code, + nodeOptions, + }, + ).stdout; + + expect(getOutputTabWidth(output)).toBe(expectedTabWidth); + }); + } + }); +} + +if (NODE_JS_MAJOR_VERSION === 22) { + test("Should throw errors when flags are missing", () => { + runCli("cli/config/ts/auto-discovery/", ["--stdin-filepath", "foo.js"], { + input: code, + }).test({ + status: "non-zero", + stdout: "", + write: [], + stderr: expect.stringMatching(/Unknown file extension ".ts" for/u), + }); + }); +} + +if (NODE_JS_MAJOR_VERSION < 22) { + test("Should throw errors when Node.js < 22", () => { + runCli("cli/config/ts/auto-discovery/", ["--stdin-filepath", "foo.js"], { + input: code, + }).test({ + status: "non-zero", + stdout: "", + write: [], + stderr: expect.stringMatching(/Unknown file extension ".ts" for/u), + }); + + runCli("cli/config/ts/auto-discovery/", ["--stdin-filepath", "foo.js"], { + input: code, + nodeOptions: NODE_TS_SUPPORT_FLAGS, + }).test({ + status: "non-zero", + stdout: "", + write: [], + stderr: expect.stringMatching(/bad option: --experimental-strip-types/u), + }); + }); +} diff --git a/tests/integration/__tests__/config-invalid.js b/tests/integration/__tests__/config-invalid.js index c2790298273d..d6840ae62046 100644 --- a/tests/integration/__tests__/config-invalid.js +++ b/tests/integration/__tests__/config-invalid.js @@ -1,11 +1,11 @@ -"use strict"; +import fs from "node:fs/promises"; +import outdent from "outdent"; +import jestPathSerializer from "../path-serializer.js"; -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); +expect.addSnapshotSerializer(jestPathSerializer); describe("throw error for unsupported extension", () => { - runPrettier("cli/config/invalid", [ + runCli("cli/config/invalid", [ "--config", "file/.prettierrc.unsupported", ]).test({ @@ -14,28 +14,23 @@ describe("throw error for unsupported extension", () => { }); describe("throw error with invalid config format", () => { - runPrettier("cli/config/invalid", ["--config", "file/.prettierrc"]).test({ + runCli("cli/config/invalid", ["--config", "file/.prettierrc"]).test({ status: "non-zero", - stderr: expect.stringMatching( - /Cannot (?:resolve|find) module '--invalid--' from/ - ), + stderr: expect.stringMatching(/Cannot find package '--invalid--'/u), }); }); describe("throw error with invalid config format", () => { - runPrettier("cli/config/invalid", [ - "--config", - "type-error/.prettierrc", - ]).test({ + runCli("cli/config/invalid", ["--config", "type-error/.prettierrc"]).test({ status: "non-zero", - stderr: expect.stringMatching( - "Config is only allowed to be an object, but received number in" + stderr: expect.stringContaining( + "Config is only allowed to be an object, but received number in", ), }); }); describe("throw error with invalid config target (directory)", () => { - runPrettier("cli/config/invalid", [ + runCli("cli/config/invalid", [ "--config", "folder/.prettierrc", // this is a directory ]).test({ @@ -44,19 +39,19 @@ describe("throw error with invalid config target (directory)", () => { }); describe("throw error with invalid config option (int)", () => { - runPrettier("cli/config/invalid", ["--config", "option/int"]).test({ + runCli("cli/config/invalid", ["--config", "option/int"]).test({ status: "non-zero", }); }); describe("throw error with invalid config option (trailingComma)", () => { - runPrettier("cli/config/invalid", ["--config", "option/trailingComma"]).test({ + runCli("cli/config/invalid", ["--config", "option/trailingComma"]).test({ status: "non-zero", }); }); describe("throw error with invalid config precedence option (configPrecedence)", () => { - runPrettier("cli/config/invalid", [ + runCli("cli/config/invalid", [ "--config-precedence", "option/configPrecedence", ]).test({ @@ -65,17 +60,32 @@ describe("throw error with invalid config precedence option (configPrecedence)", }); describe("resolves external configuration from package.json", () => { - runPrettier("cli/config-external-config-syntax-error", [ - "syntax-error.js", - ]).test({ + runCli("cli/config-external-config-syntax-error", ["syntax-error.js"]).test({ status: 2, }); }); +describe("throw error if both --config and --no-config are submitted", () => { + runCli("cli/config/invalid", ["--config", ".prettierrc", "--no-config"]).test( + { + status: 1, + write: [], + stdout: "", + }, + ); + runCli("cli/config/invalid", ["--no-config", "--config", ".prettierrc"]).test( + { + status: 1, + write: [], + stdout: "", + }, + ); +}); + // Tests below require --parser to prevent an error (no parser/filepath specified) describe("show warning with unknown option", () => { - runPrettier("cli/config/invalid", [ + runCli("cli/config/invalid", [ "--config", "option/unknown", "--parser", @@ -86,7 +96,7 @@ describe("show warning with unknown option", () => { }); describe("show warning with kebab-case option key", () => { - runPrettier("cli/config/invalid", [ + runCli("cli/config/invalid", [ "--config", "option/kebab-case", "--parser", @@ -95,3 +105,116 @@ describe("show warning with kebab-case option key", () => { status: 0, }); }); + +// #8815, please make sure this error contains code frame +describe("Invalid json file", () => { + runCli("cli/config/invalid", [ + "--config", + "broken-json/.prettierrc.json", + "--parser", + "babel", + ]).test({ + status: 2, + stdout: "", + write: [], + stderr: expect.stringContaining( + outdent` + > 1 | {a':} + | ^ + 2 | + ` + .split("\n") + .map((line) => `[error] ${line}`) + .join("\n"), + ), + }); +}); + +describe("Invalid toml file", () => { + runCli("cli/config/invalid", [ + "--config", + "broken-toml/.prettierrc.toml", + "--parser", + "babel", + ]).test({ + status: 2, + stdout: "", + write: [], + stderr: expect.stringContaining( + outdent` + Invalid TOML document: incomplete key-value declaration: no value specified + + 1: a= + ^ + 2: b!= + ` + .split("\n") + .map((line) => `[error] ${line}`) + .join("\n"), + ), + }); +}); + +describe("Invalid yaml file", () => { + runCli("cli/config/invalid", [ + "--config", + "broken-yaml/.prettierrc.yaml", + "--parser", + "babel", + ]).test({ + status: 2, + stdout: "", + write: [], + stderr: expect.stringContaining( + // Keep the outdent, since error message changes between versions + outdent` + Map keys must be unique; "a" is repeated + ` + .split("\n") + .map((line) => `[error] ${line}`) + .join("\n"), + ), + }); +}); + +describe("Invalid config value", () => { + runCli("cli/config/invalid", [ + "--config", + "invalid-config-value/prettier.config.mjs", + "--parser", + "babel", + ]).test({ + status: 0, + stdout: "", + write: [], + stderr: "", + }); +}); + +// Can't put a invalid `package.json` file in the test dir +test("Invalid package.json", async () => { + const packageJsonFile = new URL( + "../cli/config/invalid/broken-package-json/package.json", + import.meta.url, + ); + + try { + await fs.writeFile(packageJsonFile, '{"prettier":{}}'); + const { stdout: configFileForValidPackageJson } = await runCli( + "cli/config/invalid/broken-package-json", + ["--find-config-path", "foo.js"], + ); + + expect(configFileForValidPackageJson).toBe("package.json"); + + await fs.writeFile(packageJsonFile, '{"prettier":{'); + const { stdout: configFileForInvalidPackageJson } = await runCli( + "cli/config/invalid/broken-package-json", + ["--find-config-path", "foo.js"], + ); + + expect(configFileForInvalidPackageJson).toBe(".prettierrc"); + } finally { + await fs.rm(packageJsonFile, { force: true }); + } +}); diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js index 71d0d9877df7..b2f733dd7bfc 100644 --- a/tests/integration/__tests__/config-resolution.js +++ b/tests/integration/__tests__/config-resolution.js @@ -1,226 +1,169 @@ -"use strict"; +import path from "node:path"; +import url from "node:url"; +import prettier from "../../config/prettier-entry.js"; -const path = require("path"); - -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); +test("resolves configuration from external files and overrides by extname", async () => { + await expect( + prettier.resolveConfig( + new URL("../cli/config/external-overrides/file.js", import.meta.url), + ), + ).resolves.toEqual({ tabWidth: 3, semi: false }); + await expect( + prettier.resolveConfig( + new URL("../cli/config/external-overrides/file.ts", import.meta.url), + ), + ).resolves.toEqual({ tabWidth: 3, semi: true }); +}); -expect.addSnapshotSerializer(require("../path-serializer.js")); +describe("accepts configuration from --config", () => { + runCli("cli/config/", ["--config", ".prettierrc", "./js/file.js"]).test({ + status: 0, + }); +}); -describe("resolves configuration from external files", () => { - runPrettier("cli/config/", ["--end-of-line", "lf", "**/*.js"]).test({ +describe("resolves external configuration from package.json (cjs package)", () => { + runCli("cli/config/external-config/cjs-package", ["index.js"]).test({ status: 0, + stderr: "", + write: [], }); }); -describe("resolves configuration from external files and overrides by extname", () => { - runPrettier("cli/config/", ["--end-of-line", "lf", "**/*.ts"]).test({ +describe("resolves external configuration from package.json (esm package)", () => { + runCli("cli/config/external-config/esm-package", ["index.js"]).test({ status: 0, + stderr: "", + write: [], }); }); -describe("accepts configuration from --config", () => { - runPrettier("cli/config/", ["--config", ".prettierrc", "./js/file.js"]).test({ +describe("resolves external configuration from package.json (esm package with TLA)", () => { + runCli("cli/config/external-config/esm-package-with-tla", ["index.js"]).test({ status: 0, + stderr: "", + write: [], }); }); -describe("resolves external configuration from package.json", () => { - runPrettier("cli/config/", ["external-config/index.js"]).test({ +describe("resolves external configuration from package.json (esm file)", () => { + runCli("cli/config/external-config/esm-package", ["index.js"]).test({ status: 0, + stderr: "", + write: [], }); }); describe("resolves configuration file with --find-config-path file", () => { - runPrettier("cli/config/", ["--find-config-path", "no-config/file.js"]).test({ + runCli("cli/config/", ["--find-config-path", "no-config/file.js"]).test({ status: 0, }); }); describe("resolves json configuration file with --find-config-path file", () => { - runPrettier("cli/config/", ["--find-config-path", "rc-json/file.js"]).test({ + runCli("cli/config/", ["--find-config-path", "rc-json/file.js"]).test({ status: 0, }); }); describe("resolves yaml configuration file with --find-config-path file", () => { - runPrettier("cli/config/", ["--find-config-path", "rc-yaml/file.js"]).test({ + runCli("cli/config/", ["--find-config-path", "rc-yaml/file.js"]).test({ status: 0, }); }); describe("resolves toml configuration file with --find-config-path file", () => { - runPrettier("cli/config/", ["--find-config-path", "rc-toml/file.js"]).test({ + runCli("cli/config/", ["--find-config-path", "rc-toml/file.js"]).test({ status: 0, }); }); describe("prints error message when no file found with --find-config-path", () => { - runPrettier("cli/config/", [ + runCli("cli/config/", [ "--end-of-line", "lf", "--find-config-path", - "..", + "../--non-exits-filename--", ]).test({ stdout: "", status: 1, }); }); -describe("CLI overrides take precedence", () => { - runPrettier("cli/config/", [ - "--end-of-line", - "lf", - "--print-width", - "1", - "**/*.js", - ]).test({ - status: 0, - }); -}); - -test("API resolveConfig with no args", () => - prettier.resolveConfig().then((result) => { - expect(result).toEqual({}); - })); - -test("API resolveConfig.sync with no args", () => { - expect(prettier.resolveConfig.sync()).toEqual({}); -}); - -test("API resolveConfig with file arg", () => { - const file = path.resolve(path.join(__dirname, "../cli/config/js/file.js")); - return prettier.resolveConfig(file).then((result) => { - expect(result).toMatchObject({ - tabWidth: 8, - }); - }); +test("API resolveConfig with no args", async () => { + await expect(prettier.resolveConfig()).resolves.toEqual({}); }); -test("API resolveConfig.sync with file arg", () => { - const file = path.resolve(path.join(__dirname, "../cli/config/js/file.js")); - expect(prettier.resolveConfig.sync(file)).toMatchObject({ +test("API resolveConfig with file arg", async () => { + const file = new URL("../cli/config/js/file.js", import.meta.url); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ tabWidth: 8, }); }); -test("API resolveConfig with file arg and extension override", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/no-config/file.ts") - ); - return prettier.resolveConfig(file).then((result) => { - expect(result).toMatchObject({ - semi: true, - }); - }); -}); - -test("API resolveConfig.sync with file arg and extension override", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/no-config/file.ts") - ); - expect(prettier.resolveConfig.sync(file)).toMatchObject({ +test("API resolveConfig with file arg and extension override", async () => { + const file = new URL("../cli/config/no-config/file.ts", import.meta.url); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ semi: true, }); }); -test("API resolveConfig with file arg and .editorconfig", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/file.js") - ); - return prettier.resolveConfig(file, { editorconfig: true }).then((result) => { - expect(result).toMatchObject({ - useTabs: true, - tabWidth: 8, - printWidth: 100, - }); - }); -}); - -test("API resolveConfig.sync with file arg and .editorconfig", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/file.js") - ); - - expect(prettier.resolveConfig.sync(file)).toMatchObject({ +test("API resolveConfig with file arg and .editorconfig", async () => { + const file = new URL("../cli/config/editorconfig/file.js", import.meta.url); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ semi: false, }); - expect( - prettier.resolveConfig.sync(file, { editorconfig: true }) - ).toMatchObject({ + await expect( + prettier.resolveConfig(file, { editorconfig: true }), + ).resolves.toMatchObject({ useTabs: true, tabWidth: 8, printWidth: 100, }); }); -test("API resolveConfig.sync with file arg and .editorconfig (key = unset)", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/tab_width=unset.js") - ); - - expect( - prettier.resolveConfig.sync(file, { editorconfig: true }) - ).not.toMatchObject({ tabWidth: "unset" }); -}); - -test("API resolveConfig with nested file arg and .editorconfig", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/lib/file.js") +test("API resolveConfig with file arg and .editorconfig (key = unset)", async () => { + const file = new URL( + "../cli/config/editorconfig/tab_width=unset.js", + import.meta.url, ); - return prettier.resolveConfig(file, { editorconfig: true }).then((result) => { - expect(result).toMatchObject({ - useTabs: false, - tabWidth: 2, - printWidth: 100, - }); - }); + await expect( + prettier.resolveConfig(file, { editorconfig: true }), + ).resolves.not.toMatchObject({ tabWidth: "unset" }); }); -test("API resolveConfig.sync with nested file arg and .editorconfig", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/lib/file.js") +test("API resolveConfig with nested file arg and .editorconfig", async () => { + const file = new URL( + "../cli/config/editorconfig/lib/file.js", + import.meta.url, ); - expect(prettier.resolveConfig.sync(file)).toMatchObject({ + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ semi: false, }); - expect( - prettier.resolveConfig.sync(file, { editorconfig: true }) - ).toMatchObject({ + await expect( + prettier.resolveConfig(file, { editorconfig: true }), + ).resolves.toMatchObject({ useTabs: false, tabWidth: 2, printWidth: 100, }); }); -test("API resolveConfig with nested file arg and .editorconfig and indent_size = tab", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/lib/indent_size=tab.js") - ); - return prettier.resolveConfig(file, { editorconfig: true }).then((result) => { - expect(result).toMatchObject({ - useTabs: false, - tabWidth: 8, - printWidth: 100, - }); - }); -}); - -test("API resolveConfig.sync with nested file arg and .editorconfig and indent_size = tab", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/editorconfig/lib/indent_size=tab.js") +test("API resolveConfig with nested file arg and .editorconfig and indent_size = tab", async () => { + const file = new URL( + "../cli/config/editorconfig/lib/indent_size=tab.js", + import.meta.url, ); - expect(prettier.resolveConfig.sync(file)).toMatchObject({ + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ semi: false, }); - expect( - prettier.resolveConfig.sync(file, { editorconfig: true }) - ).toMatchObject({ + await expect( + prettier.resolveConfig(file, { editorconfig: true }), + ).resolves.toMatchObject({ useTabs: false, tabWidth: 8, printWidth: 100, @@ -228,102 +171,152 @@ test("API resolveConfig.sync with nested file arg and .editorconfig and indent_s }); test("API clearConfigCache", () => { - expect(() => prettier.clearConfigCache()).not.toThrowError(); + expect(() => prettier.clearConfigCache()).not.toThrow(); }); test("API resolveConfig overrides work with dotfiles", async () => { - const folder = path.join(__dirname, "../cli/config/dot-overrides"); - await expect( - prettier.resolveConfig(path.join(folder, ".foo.json")) - ).resolves.toMatchObject({ + const file = new URL( + "../cli/config/dot-overrides/.foo.json", + import.meta.url, + ); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ tabWidth: 4, }); }); -test("API resolveConfig.sync overrides work with absolute paths", () => { +test("API resolveConfig overrides work with absolute paths", async () => { // Absolute path - const file = path.join(__dirname, "../cli/config/filepath/subfolder/file.js"); - expect(prettier.resolveConfig.sync(file)).toMatchObject({ + const file = url.fileURLToPath( + new URL("../cli/config/filepath/subfolder/file.js", import.meta.url), + ); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ tabWidth: 6, }); }); -test("API resolveConfig.sync overrides excludeFiles", () => { - const notOverride = path.join( - __dirname, - "../cli/config/overrides-exclude-files/foo" +test("API resolveConfig overrides excludeFiles", async () => { + const notOverride = new URL( + "../cli/config/overrides-exclude-files/foo", + import.meta.url, ); - expect(prettier.resolveConfig.sync(notOverride)).toMatchObject({ + await expect(prettier.resolveConfig(notOverride)).resolves.toMatchObject({ singleQuote: true, trailingComma: "all", }); - const singleQuote = path.join( - __dirname, - "../cli/config/overrides-exclude-files/single-quote.js" + const singleQuote = new URL( + "../cli/config/overrides-exclude-files/single-quote.js", + import.meta.url, ); - expect(prettier.resolveConfig.sync(singleQuote)).toMatchObject({ + await expect(prettier.resolveConfig(singleQuote)).resolves.toMatchObject({ singleQuote: true, trailingComma: "es5", }); - const doubleQuote = path.join( - __dirname, - "../cli/config/overrides-exclude-files/double-quote.js" + const doubleQuote = new URL( + "../cli/config/overrides-exclude-files/double-quote.js", + import.meta.url, ); - expect(prettier.resolveConfig.sync(doubleQuote)).toMatchObject({ + await expect(prettier.resolveConfig(doubleQuote)).resolves.toMatchObject({ singleQuote: false, trailingComma: "es5", }); }); -test("API resolveConfig removes $schema option", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/$schema/index.js") - ); - return prettier.resolveConfig(file).then((result) => { - expect(result).toEqual({ - tabWidth: 42, - }); - }); -}); - -test("API resolveConfig.sync removes $schema option", () => { - const file = path.resolve( - path.join(__dirname, "../cli/config/$schema/index.js") - ); - expect(prettier.resolveConfig.sync(file)).toEqual({ +test("API resolveConfig removes $schema option", async () => { + const file = new URL("../cli/config/$schema/index.js", import.meta.url); + await expect(prettier.resolveConfig(file)).resolves.toEqual({ tabWidth: 42, }); }); -test("API resolveConfig resolves relative path values based on config filepath", () => { - const currentDir = path.join(__dirname, "../cli/config/resolve-relative"); - const parentDir = path.resolve(currentDir, ".."); - expect(prettier.resolveConfig.sync(`${currentDir}/index.js`)).toMatchObject({ +test("API resolveConfig resolves relative path values based on config filepath", async () => { + const currentDir = new URL( + "../cli/config/resolve-relative/", + import.meta.url, + ); + const parentDir = path.resolve(url.fileURLToPath(currentDir), ".."); + await expect( + prettier.resolveConfig(new URL("index.js", currentDir)), + ).resolves.toMatchObject({ plugins: [path.join(parentDir, "path-to-plugin")], - pluginSearchDirs: [path.join(parentDir, "path-to-plugin-search-dir")], }); +}); - expect( - prettier.resolveConfig.sync( - path.join(__dirname, "../cli/config/plugin-search-dirs/index.js") - ) - ).toMatchObject({ - pluginSearchDirs: false, - }); +test("API resolveConfig de-references to an external module", async () => { + const config = { printWidth: 77, semi: false }; + await expect( + prettier.resolveConfig( + new URL( + "../cli/config/external-config/cjs-package/index.js", + import.meta.url, + ), + ), + ).resolves.toEqual(config); + await expect( + prettier.resolveConfig( + new URL( + "../cli/config/external-config/esm-package/index.js", + import.meta.url, + ), + ), + ).resolves.toEqual(config); + await expect( + prettier.resolveConfig( + new URL( + "../cli/config/external-config/esm-file/index.js", + import.meta.url, + ), + ), + ).resolves.toEqual(config); }); -test("API resolveConfig de-references to an external module", () => { - const currentDir = path.join(__dirname, "../cli/config/external-config"); - expect(prettier.resolveConfig.sync(`${currentDir}/index.js`)).toEqual({ - printWidth: 77, - semi: false, - }); +test(".js config file", async () => { + const parentDirectory = new URL("../cli/config/rc-js/", import.meta.url); + + const config = { + trailingComma: "all", + singleQuote: true, + }; + + for (const directoryName of [ + "cjs-prettier-config-js-in-type-commonjs", + "cjs-prettier-config-js-in-type-none", + "cjs-prettierrc-js-in-type-commonjs", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "cjs-prettierrc-js-in-type-none", + "mjs-prettier-config-js-in-type-module", + "mjs-prettierrc-js-in-type-module", + ]) { + const file = new URL(`${directoryName}/foo.js`, parentDirectory); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config); + } + + const cjsError = /module is not defined in ES module scope/u; + for (const directoryName of [ + "cjs-prettier-config-js-in-type-module", + "cjs-prettierrc-js-in-type-module", + ]) { + const file = new URL(`./${directoryName}/foo.js`, parentDirectory); + await expect(prettier.resolveConfig(file)).rejects.toThrow(cjsError); + } + + const mjsError = /Unexpected token 'export'/u; + for (const directoryName of [ + "mjs-prettier-config-js-in-type-commonjs", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "mjs-prettier-config-js-in-type-none", + "mjs-prettierrc-js-in-type-commonjs", + // Node.js v22.7 throws `MODULE_TYPELESS_PACKAGE_JSON` when `type` missed in package.json + // "mjs-prettierrc-js-in-type-none", + ]) { + const file = new URL(`./${directoryName}/foo.js`, parentDirectory); + await expect(prettier.resolveConfig(file)).rejects.toThrow(mjsError); + } }); test(".cjs config file", async () => { - const parentDirectory = path.join(__dirname, "../cli/config/rc-cjs"); + const parentDirectory = new URL("../cli/config/rc-cjs/", import.meta.url); const config = { trailingComma: "all", @@ -338,33 +331,149 @@ test(".cjs config file", async () => { "prettier-config-cjs-in-type-none", "prettier-config-cjs-in-type-module", ]) { - const file = path.join(parentDirectory, directoryName, "foo.js"); + const file = new URL(`./${directoryName}/foo.js`, parentDirectory); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config); + } +}); + +test(".mjs config file", async () => { + const parentDirectory = new URL("../cli/config/rc-mjs/", import.meta.url); + + const config = { + trailingComma: "all", + singleQuote: true, + }; - expect(prettier.resolveConfig.sync(file)).toEqual(config); + for (const directoryName of [ + "prettierrc-mjs-in-type-module", + "prettierrc-mjs-in-type-commonjs", + "prettierrc-mjs-in-type-none", + "prettier-config-mjs-in-type-commonjs", + "prettier-config-mjs-in-type-none", + "prettier-config-mjs-in-type-module", + ]) { + const file = new URL(`./${directoryName}/foo.js`, parentDirectory); await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config); } }); test(".json5 config file", async () => { - const parentDirectory = path.join(__dirname, "../cli/config/rc-json5"); + const parentDirectory = new URL("../cli/config/rc-json5/", import.meta.url); const config = { trailingComma: "all", printWidth: 81, tabWidth: 3, }; - const file = path.join(parentDirectory, "json5/foo.js"); - - expect(prettier.resolveConfig.sync(file)).toEqual(config); + const file = new URL("./json5/foo.js", parentDirectory); await expect(prettier.resolveConfig(file)).resolves.toMatchObject(config); }); test(".json5 config file(invalid)", async () => { - const parentDirectory = path.join(__dirname, "../cli/config/rc-json5"); - const file = path.join(parentDirectory, "invalid/foo.js"); - const error = /JSON5: invalid end of input at 2:1/; - - expect(() => { - prettier.resolveConfig.sync(file); - }).toThrowError(error); + const parentDirectory = new URL("../cli/config/rc-json5/", import.meta.url); + const file = new URL("./invalid/foo.js", parentDirectory); + const error = /JSON5: invalid end of input at 2:1/u; await expect(prettier.resolveConfig(file)).rejects.toThrow(error); }); + +test("support external module with `module` only `exports`", async () => { + const file = new URL( + "../cli/config/external-config/esm-package-forbids-require/index.js", + import.meta.url, + ); + await expect(prettier.resolveConfig(file)).resolves.toMatchObject({ + printWidth: 79, + }); +}); + +test("API resolveConfig accepts path or URL", async () => { + const fileUrl = new URL("../cli/config/js/file.js", import.meta.url); + const expectedResult = { tabWidth: 8 }; + + const resultByUrl = await prettier.resolveConfig(fileUrl); + const resultByUrlHref = await prettier.resolveConfig(fileUrl.href); + const resultByPath = await prettier.resolveConfig(url.fileURLToPath(fileUrl)); + const resultByRelativePath = await prettier.resolveConfig( + path.relative(process.cwd(), url.fileURLToPath(fileUrl)), + ); + expect(resultByUrl).toMatchObject(expectedResult); + expect(resultByUrlHref).toMatchObject(expectedResult); + expect(resultByPath).toMatchObject(expectedResult); + expect(resultByRelativePath).toMatchObject(expectedResult); +}); + +test("Search from directory, not treat file as directory", async () => { + // CLI + const getConfigFileByCli = async (file) => { + const { stdout: configFile } = await runCli("cli/config/config-position/", [ + "--find-config-path", + file, + ]); + return configFile; + }; + + expect(await getConfigFileByCli("file.js")).toBe(".prettierrc"); + expect(await getConfigFileByCli("directory/file-in-child-directory.js")).toBe( + "directory/.prettierrc", + ); + + // Api + const directory = new URL("../cli/config/config-position/", import.meta.url); + const getConfigFileByApi = async (file) => { + const configFile = await prettier.resolveConfigFile( + new URL(file, directory), + ); + return url.pathToFileURL(configFile).href.slice(directory.href.length); + }; + expect(await getConfigFileByApi("file.js")).toBe(".prettierrc"); + expect(await getConfigFileByApi("directory/file-in-child-directory.js")).toBe( + "directory/.prettierrc", + ); +}); + +test("package.json/package.yaml", async () => { + await expect( + prettier.resolveConfig( + new URL("../cli/config/package/file.js", import.meta.url), + ), + ).resolves.toMatchInlineSnapshot(` + { + "tabWidth": 3, + } + `); + await expect( + prettier.resolveConfig( + new URL("../cli/config/package/file.ts", import.meta.url), + ), + ).resolves.toMatchInlineSnapshot(` + { + "tabWidth": 5, + } + `); + await expect( + prettier.resolveConfig( + new URL("../cli/config/package-yaml/file.ts", import.meta.url), + ), + ).resolves.toMatchInlineSnapshot(` + { + "printWidth": 101, + } + `); +}); + +test("'config' option should accept `URL` and `string`", async () => { + const configFileUrl = new URL( + "../cli/config/custom-config-file-location/my-prettier-config.mjs", + import.meta.url, + ); + const file = new URL("./file.js", configFileUrl); + + for (const configFile of [ + configFileUrl, + configFileUrl.href, + url.fileURLToPath(configFileUrl), + ]) { + await expect( + prettier.resolveConfig(file, { config: configFile }), + ).resolves.toEqual({ tabWidth: 7 }); + } +}); diff --git a/tests/integration/__tests__/cursor-offset.js b/tests/integration/__tests__/cursor-offset.js index 38f8fc7ebdd7..384014141b3d 100644 --- a/tests/integration/__tests__/cursor-offset.js +++ b/tests/integration/__tests__/cursor-offset.js @@ -1,9 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("write cursorOffset to stderr with --cursor-offset <int>", () => { - runPrettier("cli", ["--cursor-offset", "2", "--parser", "babel"], { + runCli("cli", ["--cursor-offset", "2", "--parser", "babel"], { input: " 1", }).test({ status: 0, @@ -11,7 +7,7 @@ describe("write cursorOffset to stderr with --cursor-offset <int>", () => { }); describe("cursorOffset should not be affected by full-width character", () => { - runPrettier("cli", ["--cursor-offset", "21", "--parser", "babel"], { + runCli("cli", ["--cursor-offset", "21", "--parser", "babel"], { input: 'const x = ["中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文", "中文"];', // ^ offset = 21 ^ width = 80 @@ -32,7 +28,7 @@ describe("cursorOffset should not be affected by full-width character", () => { * "中文" * ]; */ - stderr: "26\n", + stderr: "26", status: 0, }); }); diff --git a/tests/integration/__tests__/debug-api.js b/tests/integration/__tests__/debug-api.js index 3cdcab0177c4..81c68c2e8570 100644 --- a/tests/integration/__tests__/debug-api.js +++ b/tests/integration/__tests__/debug-api.js @@ -1,13 +1,13 @@ -"use strict"; +import { outdent } from "outdent"; +import prettier from "../../config/prettier-entry.js"; const { __debug: { parse, formatAST, formatDoc, printToDoc, printDocToString }, doc: { builders, - utils: { cleanDoc }, + utils: { findInDoc }, }, -} = require("prettier-local"); -const { outdent } = require("outdent"); +} = prettier; const code = outdent` const foo = 'bar' @@ -16,48 +16,66 @@ const formatted = 'const foo = "bar";\n'; const options = { parser: "babel", originalText: code }; describe("API", () => { - const { ast } = parse(code, options); + let ast; + let doc; + beforeAll(async () => { + ({ ast } = await parse(code, options)); + doc = await printToDoc(code, options); + }); + test("prettier.parse", () => { expect(Array.isArray(ast.program.body)).toBe(true); }); - const { formatted: formatResultFromAST } = formatAST(ast, options); - test("prettier.formatAST", () => { + test("prettier.formatAST", async () => { + const { formatted: formatResultFromAST } = await formatAST(ast, options); expect(formatResultFromAST).toBe(formatted); }); - const doc = printToDoc(code, options); - test("prettier.printToDoc", (done) => { - // If it's array, it's a `concat` - if (!Array.isArray(doc)) { - expect(doc.type).toBe("concat"); - expect(Array.isArray(doc.parts)).toBe(true); - } - done(); + test("prettier.printDocToString", async () => { + const { formatted: stringFromDoc } = await printDocToString(doc, options); + expect(stringFromDoc).toBe(formatted); }); - const formatResultFromDoc = formatDoc(doc, options); - test("prettier.formatDoc", () => { - expect(formatResultFromDoc).toMatchSnapshot(); - }); + test("prettier.printToDoc", async () => { + const hasCursor = (doc) => + findInDoc(doc, (doc) => (doc.type === "cursor" ? true : undefined)) ?? + false; - const { formatted: stringFromDoc } = printDocToString(doc, options); - test("prettier.printDocToString", () => { - expect(stringFromDoc).toBe(formatted); + expect(hasCursor(doc)).toBe(false); + + const optionsWithCursorOffset = { + ...options, + cursorOffset: code.indexOf("bar"), + }; + const docWithCursorOffset = await printToDoc(code, optionsWithCursorOffset); + expect(hasCursor(docWithCursorOffset)).toBe(true); + const formatResultWithCursorOffset = await printDocToString( + docWithCursorOffset, + optionsWithCursorOffset, + ); + expect(formatResultWithCursorOffset.formatted).toBe(formatted); + expect(typeof formatResultWithCursorOffset.cursorNodeStart).toBe("number"); + expect(formatResultWithCursorOffset.cursorNodeText).toBe('"bar"'); }); - const doc2 = new Function( - `{ ${Object.keys(builders)} }`, - `return ${formatResultFromDoc}` - )(builders); - const { formatted: stringFromDoc2 } = printDocToString(doc2, options); - const formatResultFromDoc2 = formatDoc(doc2, options); - test("output of prettier.formatDoc can be reused as code", () => { + test("prettier.formatDoc", async () => { + const formatResultFromDoc = await formatDoc(doc, options); + expect(formatResultFromDoc).toMatchSnapshot(); + + const doc2 = new Function( + `{ ${Object.keys(builders)} }`, + `return ${formatResultFromDoc}`, + )(builders); + + const { formatted: stringFromDoc2 } = await printDocToString(doc2, options); expect(stringFromDoc2).toBe(formatted); + + const formatResultFromDoc2 = await formatDoc(doc2, options); expect(formatResultFromDoc2).toBe(formatResultFromDoc); }); - test("prettier.formatDoc prints things as expected", () => { + test("prettier.formatDoc prints things as expected", async () => { const { indent, hardline, @@ -70,31 +88,24 @@ describe("API", () => { label, } = builders; - expect(formatDoc([indent(hardline), indent(literalline)])).toBe( - "[indent(hardline), indent(literalline)]" - ); - - expect(formatDoc(fill(["foo", hardline, "bar", literalline, "baz"]))).toBe( - 'fill(["foo", hardline, "bar", literalline, "baz"])' + expect(await formatDoc([indent(hardline), indent(literalline)])).toBe( + "[indent(hardline), indent(literalline)]", ); expect( - formatDoc( - // The argument of fill must not be passed to cleanDoc because it's not a doc - fill(cleanDoc(["foo", literalline, "bar"])) // invalid fill - ) - ).toBe('fill(["foo", literallineWithoutBreakParent, breakParent, "bar"])'); + await formatDoc(fill(["foo", hardline, "bar", literalline, "baz"])), + ).toBe('fill(["foo", hardline, "bar", literalline, "baz"])'); expect( - formatDoc(indentIfBreak(group(["1", line, "2"]), { groupId: "Q" })) + await formatDoc(indentIfBreak(group(["1", line, "2"]), { groupId: "Q" })), ).toBe('indentIfBreak(group(["1", line, "2"]), { groupId: "Q" })'); - expect(formatDoc(label("foo", group(["1", line, "2"])))).toBe( - 'label("foo", group(["1", line, "2"]))' + expect(await formatDoc(label("foo", group(["1", line, "2"])))).toBe( + 'label("foo", group(["1", line, "2"]))', ); - expect(formatDoc([ifBreak("a", "b"), ifBreak("a"), ifBreak("", "b")])).toBe( - '[ifBreak("a", "b"), ifBreak("a"), ifBreak("", "b")]' - ); + expect( + await formatDoc([ifBreak("a", "b"), ifBreak("a"), ifBreak("", "b")]), + ).toBe('[ifBreak("a", "b"), ifBreak("a"), ifBreak("", "b")]'); }); }); diff --git a/tests/integration/__tests__/debug-check.js b/tests/integration/__tests__/debug-check.js index bd96aa85cf98..16131b4e32d2 100644 --- a/tests/integration/__tests__/debug-check.js +++ b/tests/integration/__tests__/debug-check.js @@ -1,50 +1,44 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("doesn't crash when --debug-check is passed", () => { - runPrettier("cli/with-shebang", ["issue1890.js", "--debug-check"]).test({ - stdout: "issue1890.js\n", + runCli("cli/with-shebang", ["issue1890.js", "--debug-check"]).test({ + stdout: "issue1890.js", stderr: "", status: 0, }); }); describe("checks stdin with --debug-check", () => { - runPrettier("cli/with-shebang", ["--debug-check", "--parser", "babel"], { + runCli("cli/with-shebang", ["--debug-check", "--parser", "babel"], { input: "0", }).test({ - stdout: "(stdin)\n", + stdout: "(stdin)", stderr: "", status: 0, }); }); describe("show diff for 2+ error files with --debug-check", () => { - runPrettier("cli/debug-check", [ + runCli("cli/debug-check", [ "--end-of-line", "lf", "*.debug-check", "--debug-check", "--plugin", - "./plugin-for-testing-debug-check", + "./plugin-for-testing-debug-check.cjs", ]).test({ status: "non-zero", }); }); describe("should not exit non-zero for already prettified code with --debug-check + --check", () => { - runPrettier("cli/debug-check", [ - "issue-4599.js", - "--debug-check", - "--check", - ]).test({ - status: 0, - }); + runCli("cli/debug-check", ["issue-4599.js", "--debug-check", "--check"]).test( + { + status: 0, + }, + ); }); describe("should not exit non-zero for already prettified code with --debug-check + --list-different", () => { - runPrettier("cli/debug-check", [ + runCli("cli/debug-check", [ "issue-4599.js", "--debug-check", "--list-different", @@ -52,3 +46,9 @@ describe("should not exit non-zero for already prettified code with --debug-chec status: 0, }); }); + +describe("should not exit non-zero for jsx style element with spread attribute", () => { + runCli("cli/debug-check", ["issue-15094.jsx", "--debug-check"]).test({ + status: 0, + }); +}); diff --git a/tests/integration/__tests__/debug-print-ast.js b/tests/integration/__tests__/debug-print-ast.js index 7927bff34bc0..9361d7db0584 100644 --- a/tests/integration/__tests__/debug-print-ast.js +++ b/tests/integration/__tests__/debug-print-ast.js @@ -1,12 +1,14 @@ -"use strict"; +test("prints information for debugging AST --debug-print-ast", async () => { + const { stdout } = await runCli( + "cli/with-shebang", + ["--debug-print-ast", "--parser", "babel"], + { + input: "const foo = 'foo';", + }, + ); -const runPrettier = require("../run-prettier.js"); + const data = JSON.parse(stdout); -describe("prints information for debugging AST --debug-print-ast", () => { - runPrettier("cli/with-shebang", ["--debug-print-ast", "--parser", "babel"], { - input: "const foo = 'foo';", - }).test({ - stderr: "", - status: 0, - }); + expect(data).toHaveProperty("type", "File"); + expect(data).toHaveProperty("program.type", "Program"); }); diff --git a/tests/integration/__tests__/debug-print-comments.js b/tests/integration/__tests__/debug-print-comments.js index 2b1f1f99fb6b..6f31ca1d5430 100644 --- a/tests/integration/__tests__/debug-print-comments.js +++ b/tests/integration/__tests__/debug-print-comments.js @@ -1,13 +1,7 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("prints information for debugging comment attachment with --debug-print-comments", () => { - runPrettier( - "cli/with-shebang", - ["--debug-print-comments", "--parser", "babel"], - { input: "/* 1 */\nconsole.log(foo /* 2 */); // 3" } - ).test({ + runCli("cli/with-shebang", ["--debug-print-comments", "--parser", "babel"], { + input: "/* 1 */\nconsole.log(foo /* 2 */); // 3", + }).test({ stderr: "", status: 0, }); diff --git a/tests/integration/__tests__/debug-print-doc.js b/tests/integration/__tests__/debug-print-doc.js index 4954bb4480be..359d38312e83 100644 --- a/tests/integration/__tests__/debug-print-doc.js +++ b/tests/integration/__tests__/debug-print-doc.js @@ -1,12 +1,8 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("prints doc with --debug-print-doc", () => { - runPrettier("cli/with-shebang", ["--debug-print-doc", "--parser", "babel"], { + runCli("cli/with-shebang", ["--debug-print-doc", "--parser", "babel"], { input: "0", }).test({ - stdout: '["0", ";", hardline]\n', + stdout: '["0", ";", hardline]', stderr: "", status: 0, write: [], diff --git a/tests/integration/__tests__/doc-builders.js b/tests/integration/__tests__/doc-builders.js index 47f25516f5a2..2d42d26c895d 100644 --- a/tests/integration/__tests__/doc-builders.js +++ b/tests/integration/__tests__/doc-builders.js @@ -1,13 +1,11 @@ -"use strict"; - -const prettier = require("prettier-local"); +import prettier from "../../config/prettier-entry.js"; const { - concat, join, hardline, literalline, group, fill, + line, lineSuffix, breakParent, ifBreak, @@ -15,53 +13,18 @@ const { align, } = prettier.doc.builders; -// TODO: Make these builders to use array if possible in 3.0.0 describe("doc builders", () => { test.each([ - ["concat", concat(["1", "2"]), { type: "concat", parts: ["1", "2"] }], - [ - "join", - join(concat(["1"]), ["2", concat(["3"])]), - { - type: "concat", - parts: [ - "2", - { type: "concat", parts: ["1"] }, - { type: "concat", parts: ["3"] }, - ], - }, - ], - [ - "join(array)", - join(["1"], ["2", concat(["3"])]), - { type: "concat", parts: ["2", ["1"], { type: "concat", parts: ["3"] }] }, - ], - [ - "hardline", - hardline, - { type: "concat", parts: [{ type: "line", hard: true }, breakParent] }, - ], + ["concat", ["1", "2"], ["1", "2"]], + ["join", join(["1"], ["2", ["3"]]), ["2", ["1"], ["3"]]], + ["hardline", hardline, [{ type: "line", hard: true }, breakParent]], [ "literalline", literalline, - { - type: "concat", - parts: [{ type: "line", hard: true, literal: true }, breakParent], - }, + [{ type: "line", hard: true, literal: true }, breakParent], ], [ "group", - group(concat(["1"])), - { - type: "group", - id: undefined, - contents: { type: "concat", parts: ["1"] }, - break: false, - expandedStates: undefined, - }, - ], - [ - "group (array)", group(["1"]), { type: "group", @@ -71,17 +34,9 @@ describe("doc builders", () => { expandedStates: undefined, }, ], - ["fill", fill(["1", "2"]), { type: "fill", parts: ["1", "2"] }], + ["fill", fill(["1", line, "2"]), { type: "fill", parts: ["1", line, "2"] }], [ "line-suffix", - lineSuffix(concat(["1"])), - { - type: "line-suffix", - contents: { type: "concat", parts: ["1"] }, - }, - ], - [ - "line-suffix(array)", lineSuffix(["1"]), { type: "line-suffix", @@ -90,24 +45,16 @@ describe("doc builders", () => { ], [ "if-break", - ifBreak(concat(["1"]), ["2"]), + ifBreak(["1"], ["2"]), { type: "if-break", - breakContents: { type: "concat", parts: ["1"] }, + breakContents: ["1"], flatContents: ["2"], groupId: undefined, }, ], [ "indent", - indent(concat(["1"])), - { - type: "indent", - contents: { type: "concat", parts: ["1"] }, - }, - ], - [ - "indent(array)", indent(["1"]), { type: "indent", @@ -116,15 +63,6 @@ describe("doc builders", () => { ], [ "align", - align(" ", concat(["1"])), - { - type: "align", - contents: { type: "concat", parts: ["1"] }, - n: " ", - }, - ], - [ - "align(array)", align(" ", ["1"]), { type: "align", diff --git a/tests/integration/__tests__/doc-mark-as-root.js b/tests/integration/__tests__/doc-mark-as-root.js index 4f13688ac89d..fa9b6715aa06 100644 --- a/tests/integration/__tests__/doc-mark-as-root.js +++ b/tests/integration/__tests__/doc-mark-as-root.js @@ -1,27 +1,25 @@ -"use strict"; - -const prettier = require("prettier-local"); +import prettier from "../../config/prettier-entry.js"; const docPrinter = prettier.doc.printer; const docBuilders = prettier.doc.builders; const { printDocToString } = docPrinter; -const { concat, hardline, literalline, trim, indent, markAsRoot } = docBuilders; +const { hardline, literalline, trim, indent, markAsRoot } = docBuilders; describe("markAsRoot", () => { test.each([ [ "with hardline will insert a newline with current indentation", - concat([indent(markAsRoot(indent(hardline))), "123"]), + [indent(markAsRoot(indent(hardline))), "123"], "\n 123", ], [ "with literalline will insert a newline with root indentation", - concat([indent(markAsRoot(indent(literalline))), "123"]), + [indent(markAsRoot(indent(literalline))), "123"], "\n 123", ], [ - "followed by trim will trims up to the the first column, ignoring indented root", - concat([indent(markAsRoot(indent(literalline))), trim, "123"]), + "followed by trim will trims up to the first column, ignoring indented root", + [indent(markAsRoot(indent(literalline))), trim, "123"], "\n123", ], ])("%s", (_, doc, expected) => { diff --git a/tests/integration/__tests__/doc-printer.js b/tests/integration/__tests__/doc-printer.js index 04493142bc09..84d3a0834259 100644 --- a/tests/integration/__tests__/doc-printer.js +++ b/tests/integration/__tests__/doc-printer.js @@ -1,6 +1,4 @@ -"use strict"; - -const prettier = require("prettier-local"); +import prettier from "../../config/prettier-entry.js"; const { group, ifBreak } = prettier.doc.builders; const { printDocToString } = prettier.doc.printer; const docToString = (doc, options) => @@ -22,6 +20,6 @@ test("`ifBreak` inside `group`", () => { ]; expect( - docs.map((doc) => docToString(doc, { printWidth: FLAT_TEXT.length })) + docs.map((doc) => docToString(doc, { printWidth: FLAT_TEXT.length })), ).toStrictEqual(Array.from({ length: docs.length }, () => FLAT_TEXT)); }); diff --git a/tests/integration/__tests__/doc-trim.js b/tests/integration/__tests__/doc-trim.js index 0a0b4678ba0b..d3e1ab45feb7 100644 --- a/tests/integration/__tests__/doc-trim.js +++ b/tests/integration/__tests__/doc-trim.js @@ -1,40 +1,35 @@ -"use strict"; +import { outdent } from "outdent"; +import prettier from "../../config/prettier-entry.js"; -const prettier = require("prettier-local"); -const { outdent } = require("outdent"); const docPrinter = prettier.doc.printer; const docBuilders = prettier.doc.builders; const { printDocToString } = docPrinter; -const { concat, line, trim, group, indent } = docBuilders; +const { line, trim, group, indent } = docBuilders; -// These tests don't use `runPrettier` because `trim` is not used by any +// These tests don't use `runCli` because `trim` is not used by any // bundled parser (only third-party plugins). describe("trim", () => { test.each([ - ["trims the current line", group(concat(["hello ", trim])), "hello"], + ["trims the current line", group(["hello ", trim]), "hello"], [ "trims existing indentation", - group( - concat([ - "function()", + group([ + "function()", + line, + "{", + indent([ line, - "{", - indent( - concat([ - line, - group(concat([trim, "#if DEBUG"])), - line, - "alert(42);", - line, - group(concat([trim, "#endif"])), - ]) - ), + group([trim, "#if DEBUG"]), line, - "}", - ]) - ), + "alert(42);", + line, + group([trim, "#endif"]), + ]), + line, + "}", + ]), outdent` function() { @@ -46,7 +41,7 @@ describe("trim", () => { ], [ "ignores trimmed characters when fitting the line", - group(concat(["hello ", " ", trim, line, "world!"])), + group(["hello ", " ", trim, line, "world!"]), "hello world!", ], ])("%s", (_, doc, expected) => { diff --git a/tests/integration/__tests__/doc-utils-clean-doc.js b/tests/integration/__tests__/doc-utils-clean-doc.js index 69f8e9b0a5d4..699832780c62 100644 --- a/tests/integration/__tests__/doc-utils-clean-doc.js +++ b/tests/integration/__tests__/doc-utils-clean-doc.js @@ -1,67 +1,61 @@ -"use strict"; - -const prettier = require("prettier-local"); -const docBuilders = prettier.doc.builders; -const docUtils = prettier.doc.utils; - -const { cleanDoc } = docUtils; -const { group, concat, align, indent, lineSuffix, ifBreak, fill } = docBuilders; +import { + align, + fill, + group, + ifBreak, + indent, + line, + lineSuffix, +} from "../../../src/document/builders.js"; +import { cleanDoc } from "../../../src/document/utils.js"; describe("cleanDoc", () => { test.each([ [ "fill", - concat([fill(["", ""]), fill([]), fill(["1"]), fill(["2", "3"])]), - concat([fill(["1"]), fill(["2", "3"])]), + [fill([""]), fill([]), fill(["1"]), fill(["2", line, "3"])], + [fill(["1"]), fill(["2", line, "3"])], ], ["nested group", group(group("_")), group("_")], [ "empty group", - concat([ + [ group(""), - group(concat([""])), + group([""]), group("_", { id: "id" }), group("_", { shouldBreak: true }), group("_", { expandedStates: ["_"] }), - ]), - concat([ + ], + [ group("_", { id: "id" }), group("_", { shouldBreak: true }), group("_", { expandedStates: ["_"] }), - ]), + ], ], [ "removes empty align/indent/line-suffix", - concat([ - group( - concat([ - align(" ", concat([""])), - indent(concat([""])), - concat([""]), - "", - lineSuffix(concat([""])), - ifBreak("", concat([""])), - ]) - ), + [ + group([ + align(" ", [""]), + indent([""]), + [""], + "", + lineSuffix([""]), + ifBreak("", [""]), + ]), "_", - ]), - "_", - ], - [ - "removes empty string/concat", - concat(["", concat(["", concat([concat(["", "_", ""]), ""])]), ""]), + ], "_", ], + ["removes empty string/", ["", ["", [["", "_", ""], ""]], ""], "_"], [ "concat string & flat concat", - group( - concat([ - group("1"), - concat(["2", "3", group("4"), "5", "6"]), - concat(["7", "8", group("9"), "10", "11"]), - ]) - ), - group(concat([group("1"), "23", group("4"), "5678", group("9"), "1011"])), + group([ + group("1"), + ["2", "3", group("4"), "5", "6"], + ["7", "8", group("9"), "10", "11"], + ]), + group([group("1"), "23", group("4"), "5678", group("9"), "1011"]), ], ])("%s", (_, doc, expected) => { const result = cleanDoc(doc); diff --git a/tests/integration/__tests__/early-exit.js b/tests/integration/__tests__/early-exit.js index 8aa37ec9c19a..f24ce3597602 100644 --- a/tests/integration/__tests__/early-exit.js +++ b/tests/integration/__tests__/early-exit.js @@ -1,43 +1,29 @@ -"use strict"; - -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); +import prettier from "../../config/prettier-entry.js"; describe("show version with --version", () => { - runPrettier("cli/with-shebang", ["--version"]).test({ - stdout: prettier.version + "\n", + runCli("cli/with-shebang", ["--version"]).test({ + stdout: prettier.version, status: 0, }); }); describe("show usage with --help", () => { - runPrettier("cli", ["--help"]).test({ + runCli("cli", ["--help"]).test({ status: 0, }); }); describe("show detailed usage with --help l (alias)", () => { - runPrettier("cli", ["--help", "l"]).test({ - status: 0, - }); -}); - -describe("show detailed usage with plugin options (automatic resolution)", () => { - runPrettier("plugins/automatic", [ - "--help", - "tab-width", - "--parser=bar", - "--plugin-search-dir=.", - ]).test({ + runCli("cli", ["--help", "l"]).test({ status: 0, }); }); describe("show detailed usage with plugin options (manual resolution)", () => { - runPrettier("cli", [ + runCli("cli", [ "--help", "tab-width", - "--plugin=../plugins/automatic/node_modules/prettier-plugin-bar", + "--plugin=../plugins/automatic/node_modules/prettier-plugin-bar/index.js", "--parser=bar", ]).test({ status: 0, @@ -45,13 +31,13 @@ describe("show detailed usage with plugin options (manual resolution)", () => { }); describe("throw error with --help not-found", () => { - runPrettier("cli", ["--help", "not-found"]).test({ + runCli("cli", ["--help", "not-found"]).test({ status: 1, }); }); describe("show warning with --help not-found (typo)", () => { - runPrettier("cli", [ + runCli("cli", [ "--help", // cspell:disable-next-line "parserr", @@ -61,31 +47,31 @@ describe("show warning with --help not-found (typo)", () => { }); describe("throw error with --check + --list-different", () => { - runPrettier("cli", ["--check", "--list-different"]).test({ + runCli("cli", ["--check", "--list-different"]).test({ status: 1, }); }); describe("throw error with --write + --debug-check", () => { - runPrettier("cli", ["--write", "--debug-check"]).test({ + runCli("cli", ["--write", "--debug-check"]).test({ status: 1, }); }); describe("throw error with --find-config-path + multiple files", () => { - runPrettier("cli", ["--find-config-path", "abc.js", "def.js"]).test({ + runCli("cli", ["--find-config-path", "abc.js", "def.js"]).test({ status: 1, }); }); describe("throw error with --file-info + multiple files", () => { - runPrettier("cli", ["--file-info", "abc.js", "def.js"]).test({ + runCli("cli", ["--file-info", "abc.js", "def.js"]).test({ status: 1, }); }); describe("throw error and show usage with something unexpected", () => { - runPrettier("cli", [], { isTTY: true }).test({ + runCli("cli", [], { isTTY: true }).test({ status: "non-zero", }); }); diff --git a/tests/integration/__tests__/error-on-unmatched-pattern.js b/tests/integration/__tests__/error-on-unmatched-pattern.js index 36bf16aedd2b..9c98262176a5 100644 --- a/tests/integration/__tests__/error-on-unmatched-pattern.js +++ b/tests/integration/__tests__/error-on-unmatched-pattern.js @@ -1,9 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("no error on unmatched pattern", () => { - runPrettier("cli/error-on-unmatched-pattern", [ + runCli("cli/error-on-unmatched-pattern", [ "--no-error-on-unmatched-pattern", "**/*.js", ]).test({ @@ -12,13 +8,13 @@ describe("no error on unmatched pattern", () => { }); describe("error on unmatched pattern", () => { - runPrettier("cli/error-on-unmatched-pattern", ["**/*.toml"]).test({ + runCli("cli/error-on-unmatched-pattern", ["**/*.toml"]).test({ status: 2, }); }); describe("no error on unmatched pattern when 2nd glob has no match", () => { - runPrettier("cli/error-on-unmatched-pattern", [ + runCli("cli/error-on-unmatched-pattern", [ "--no-error-on-unmatched-pattern", "**/*.{json,js,yml}", "**/*.toml", @@ -28,7 +24,7 @@ describe("no error on unmatched pattern when 2nd glob has no match", () => { }); describe("error on unmatched pattern when 2nd glob has no match", () => { - runPrettier("cli/error-on-unmatched-pattern", [ + runCli("cli/error-on-unmatched-pattern", [ "**/*.{json,js,yml}", "**/*.toml", ]).test({ diff --git a/tests/integration/__tests__/experimental-cli.js b/tests/integration/__tests__/experimental-cli.js new file mode 100644 index 000000000000..b713eaebc82b --- /dev/null +++ b/tests/integration/__tests__/experimental-cli.js @@ -0,0 +1,95 @@ +import fs from "node:fs/promises"; +import { createRequire } from "node:module"; +import path from "node:path"; + +const require = createRequire(import.meta.url); + +function runExperimentalCli(args, options) { + return runCli("cli/experimental-cli", [...args, "--no-cache"], { + title: args.join(" "), + ...options, + env: { ...options?.env, PRETTIER_EXPERIMENTAL_CLI: 1 }, + }); +} + +const code = 'console.log("Hello, world!");\n'; +const unformatted = ` + console.log( +"Hello, world!" + + + ) +`; + +describe("experimental cli", () => { + const expectedVersion = + process.env.NODE_ENV === "production" || + (process.env.PRETTIER_INSTALLED_DIR && + process.env.PRETTIER_INSTALL_NPM_CLIENT !== "npm") + ? require(path.join(process.env.PRETTIER_DIR, "package.json")).version + : createRequire(require.resolve("@prettier/cli/package.json"))( + "prettier/package.json", + ).version; + + runExperimentalCli(["--version"]).test({ + stderr: "", + status: 0, + write: [], + stdout: expectedVersion, + }); + + runExperimentalCli(["--version", "--experimental-cli"]).test({ + stderr: "", + status: 0, + write: [], + stdout: expectedVersion, + }); + + // Stdin format + runExperimentalCli(["--parser=meriyah"], { input: "foo( )" }).test({ + stderr: "", + status: 0, + write: [], + }); + + for (const [index, args] of [ + // File check + ["--check"], + // File format + ["--write"], + ] + .flatMap((args) => [args, [...args, "--no-parallel"]]) + .entries()) { + test(args.join(" "), async () => { + // Since we are not able to mock file write, so we just let the CLI actually write it + const directory = new URL( + `../cli/experimental-cli/test-${index}/`, + import.meta.url, + ); + const fileShouldNotFormat = new URL("./should-not-format.js", directory); + const fileShouldFormat = new URL("./should-format.js", directory); + await fs.rm(directory, { force: true, recursive: true }); + await fs.mkdir(directory); + await fs.writeFile(fileShouldNotFormat, code); + await fs.writeFile(fileShouldFormat, unformatted); + + const result = await runExperimentalCli([ + `./test-${index}`, + ...args, + "--ignore-path=do-not-ignore", + "--no-cache", + ]); + + { + const content = await fs.readFile(fileShouldNotFormat, "utf8"); + expect(content).toBe(code); + } + { + const content = await fs.readFile(fileShouldFormat, "utf8"); + expect(content).toBe(args.includes("--write") ? code : unformatted); + } + + expect(result).toMatchSnapshot(); + }); + } +}); diff --git a/tests/integration/__tests__/file-info.js b/tests/integration/__tests__/file-info.js index d0d8f993812a..a9d209645f6a 100644 --- a/tests/integration/__tests__/file-info.js +++ b/tests/integration/__tests__/file-info.js @@ -1,47 +1,47 @@ -"use strict"; +import fs from "node:fs"; +import path from "node:path"; +import url from "node:url"; +import createEsmUtils from "esm-utils"; +import { temporaryDirectory as getTemporaryDirectory } from "tempy"; +import prettier from "../../config/prettier-entry.js"; -const path = require("path"); -const fs = require("fs"); - -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); - -const { default: tempy } = require("../../../vendors/tempy.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); +const { __dirname } = createEsmUtils(import.meta); describe("extracts file-info for a js file", () => { - runPrettier("cli/", ["--file-info", "something.js"]).test({ + runCli("cli/", ["--file-info", "something.js"]).test({ status: 0, }); }); describe("extracts file-info for a markdown file", () => { - runPrettier("cli/", ["--file-info", "README.md"]).test({ + runCli("cli/", ["--file-info", "README.md"]).test({ status: 0, }); }); describe("extracts file-info for a known markdown file with no extension", () => { - runPrettier("cli/", ["--file-info", "README"]).test({ + runCli("cli/", ["--file-info", "README"]).test({ status: 0, }); }); describe("extracts file-info with ignored=true for a file in .prettierignore", () => { - runPrettier("cli/ignore-path/", ["--file-info", "regular-module.js"]).test({ + runCli("cli/ignore-path/file-info-test/", [ + "--file-info", + "ignored-by-prettierignore.js", + ]).test({ status: 0, }); }); describe("file-info should try resolve config", () => { - runPrettier("cli/with-resolve-config/", ["--file-info", "file.js"]).test({ + runCli("cli/with-resolve-config/", ["--file-info", "file.js"]).test({ status: 0, }); }); describe("file-info should not try resolve config with --no-config", () => { - runPrettier("cli/with-resolve-config/", [ + runCli("cli/with-resolve-config/", [ "--file-info", "file.js", "--no-config", @@ -52,28 +52,28 @@ describe("file-info should not try resolve config with --no-config", () => { }); }); -describe("extracts file-info with ignored=true for a file in a hand-picked .prettierignore", () => { - runPrettier("cli/", [ +describe("extracts file-info with ignored=true for a file in a hand-picked ignore file", () => { + runCli("cli/", [ "--file-info", - "regular-module.js", - "--ignore-path=ignore-path/.prettierignore", + "ignored-by-customignore.js", + "--ignore-path=ignore-path/file-info-test/.customignore", ]).test({ status: 0, }); }); describe("non-exists ignore path", () => { - runPrettier("cli/", [ + runCli("cli/", [ "--file-info", "regular-module.js", - "--ignore-path=ignore-path/non-exists/.prettierignore", + "--ignore-path=ignore-path/file-info-test/.non-exists-ignore-file", ]).test({ status: 0, }); }); describe("extracts file-info for a file in not_node_modules", () => { - runPrettier("cli/with-node-modules/", [ + runCli("cli/with-node-modules/", [ "--file-info", "not_node_modules/file.js", ]).test({ @@ -82,7 +82,7 @@ describe("extracts file-info for a file in not_node_modules", () => { }); describe("extracts file-info with with ignored=true for a file in node_modules", () => { - runPrettier("cli/with-node-modules/", [ + runCli("cli/with-node-modules/", [ "--file-info", "node_modules/file.js", ]).test({ @@ -91,7 +91,7 @@ describe("extracts file-info with with ignored=true for a file in node_modules", }); describe("extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided", () => { - runPrettier("cli/with-node-modules/", [ + runCli("cli/with-node-modules/", [ "--file-info", "node_modules/file.js", "--with-node-modules", @@ -101,34 +101,17 @@ describe("extracts file-info with ignored=false for a file in node_modules when }); describe("extracts file-info with inferredParser=null for file.foo", () => { - runPrettier("cli/", ["--file-info", "file.foo"]).test({ - status: 0, - }); -}); - -describe("extracts file-info with inferredParser=foo when plugins are autoloaded", () => { - runPrettier("plugins/automatic/", ["--file-info", "file.foo"]).test({ - status: 0, - }); -}); - -describe("extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir", () => { - runPrettier("cli/", [ - "--file-info", - "file.foo", - "--plugin-search-dir", - "../plugins/automatic", - ]).test({ + runCli("cli/", ["--file-info", "file.foo"]).test({ status: 0, }); }); describe("extracts file-info with inferredParser=foo when a plugin is hand-picked", () => { - runPrettier("cli/", [ + runCli("cli/", [ "--file-info", "file.foo", "--plugin", - "../plugins/automatic/node_modules/@prettier/plugin-foo", + "../plugins/automatic/node_modules/@prettier/plugin-foo/index.js", ]).test({ status: 0, }); @@ -136,27 +119,20 @@ describe("extracts file-info with inferredParser=foo when a plugin is hand-picke test("API getFileInfo with no args", async () => { await expect(prettier.getFileInfo()).rejects.toThrow( - new TypeError("expect `filePath` to be a string, got `undefined`") - ); -}); - -test("API getFileInfo.sync with no args", () => { - expect(() => prettier.getFileInfo.sync()).toThrow( - new TypeError("expect `filePath` to be a string, got `undefined`") + new TypeError("expect `file` to be a string or URL, got `undefined`"), ); }); test("API getFileInfo with filepath only", async () => { - await expect(prettier.getFileInfo("README")).resolves.toMatchObject({ + await expect(prettier.getFileInfo("README")).resolves.toEqual({ ignored: false, inferredParser: "markdown", }); -}); - -test("API getFileInfo.sync with filepath only", () => { - expect(prettier.getFileInfo.sync("README")).toMatchObject({ + await expect( + prettier.getFileInfo("tsconfig.json", { resolveConfig: false }), + ).resolves.toEqual({ ignored: false, - inferredParser: "markdown", + inferredParser: "json", }); }); @@ -164,103 +140,49 @@ describe("API getFileInfo resolveConfig", () => { const files = Object.fromEntries( ["foo", "js", "bar", "css"].map((ext) => [ ext, - path.resolve( - path.join(__dirname, `../cli/with-resolve-config/file.${ext}`) - ), - ]) + new URL(`../cli/with-resolve-config/file.${ext}`, import.meta.url), + ]), ); test("{resolveConfig: undefined}", async () => { - await expect(prettier.getFileInfo(files.foo)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.foo)).resolves.toEqual({ ignored: false, - inferredParser: null, + inferredParser: "foo-parser", }); - await expect(prettier.getFileInfo(files.js)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.js)).resolves.toEqual({ ignored: false, - inferredParser: "babel", + inferredParser: "override-js-parser", }); - await expect(prettier.getFileInfo(files.bar)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.bar)).resolves.toEqual({ ignored: false, inferredParser: null, }); - await expect(prettier.getFileInfo(files.css)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.css)).resolves.toEqual({ ignored: false, inferredParser: "css", }); }); test("{resolveConfig: true}", async () => { await expect( - prettier.getFileInfo(files.foo, { resolveConfig: true }) - ).resolves.toMatchObject({ + prettier.getFileInfo(files.foo, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: "foo-parser", }); await expect( - prettier.getFileInfo(files.js, { resolveConfig: true }) - ).resolves.toMatchObject({ + prettier.getFileInfo(files.js, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: "override-js-parser", }); await expect( - prettier.getFileInfo(files.bar, { resolveConfig: true }) - ).resolves.toMatchObject({ + prettier.getFileInfo(files.bar, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: null, }); await expect( - prettier.getFileInfo(files.css, { resolveConfig: true }) - ).resolves.toMatchObject({ - ignored: false, - inferredParser: "css", - }); - }); - test("sync {resolveConfig: undefined}", () => { - expect(prettier.getFileInfo.sync(files.foo)).toMatchObject({ - ignored: false, - inferredParser: null, - }); - expect(prettier.getFileInfo.sync(files.js)).toMatchObject({ - ignored: false, - inferredParser: "babel", - }); - expect(prettier.getFileInfo.sync(files.bar)).toMatchObject({ - ignored: false, - inferredParser: null, - }); - expect(prettier.getFileInfo.sync(files.css)).toMatchObject({ - ignored: false, - inferredParser: "css", - }); - }); - test("sync {resolveConfig: true}", () => { - expect( - prettier.getFileInfo.sync(files.foo, { - resolveConfig: true, - }) - ).toMatchObject({ - ignored: false, - inferredParser: "foo-parser", - }); - expect( - prettier.getFileInfo.sync(files.js, { - resolveConfig: true, - }) - ).toMatchObject({ - ignored: false, - inferredParser: "override-js-parser", - }); - expect( - prettier.getFileInfo.sync(files.bar, { - resolveConfig: true, - }) - ).toMatchObject({ - ignored: false, - inferredParser: null, - }); - expect( - prettier.getFileInfo.sync(files.css, { - resolveConfig: true, - }) - ).toMatchObject({ + prettier.getFileInfo(files.css, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: "css", }); @@ -271,53 +193,29 @@ describe("API getFileInfo resolveConfig when no config is present", () => { const files = Object.fromEntries( ["foo", "js"].map((ext) => [ ext, - path.resolve(path.join(__dirname, `../cli/non-exists-dir/file.${ext}`)), - ]) + new URL(`../cli/non-exists-dir/file.${ext}`, import.meta.url), + ]), ); test("{resolveConfig: undefined}", async () => { - await expect(prettier.getFileInfo(files.foo)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.foo)).resolves.toEqual({ ignored: false, inferredParser: null, }); - await expect(prettier.getFileInfo(files.js)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(files.js)).resolves.toEqual({ ignored: false, inferredParser: "babel", }); }); test("{resolveConfig: true}", async () => { await expect( - prettier.getFileInfo(files.foo, { resolveConfig: true }) - ).resolves.toMatchObject({ + prettier.getFileInfo(files.foo, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: null, }); await expect( - prettier.getFileInfo(files.js, { resolveConfig: true }) - ).resolves.toMatchObject({ - ignored: false, - inferredParser: "babel", - }); - }); - test("sync {resolveConfig: undefined}", () => { - expect(prettier.getFileInfo.sync(files.foo)).toMatchObject({ - ignored: false, - inferredParser: null, - }); - expect(prettier.getFileInfo.sync(files.js)).toMatchObject({ - ignored: false, - inferredParser: "babel", - }); - }); - test("sync {resolveConfig: true}", () => { - expect( - prettier.getFileInfo.sync(files.foo, { resolveConfig: true }) - ).toMatchObject({ - ignored: false, - inferredParser: null, - }); - expect( - prettier.getFileInfo.sync(files.js, { resolveConfig: true }) - ).toMatchObject({ + prettier.getFileInfo(files.js, { resolveConfig: true }), + ).resolves.toEqual({ ignored: false, inferredParser: "babel", }); @@ -325,80 +223,54 @@ describe("API getFileInfo resolveConfig when no config is present", () => { }); test("API getFileInfo with ignorePath", async () => { - const file = path.resolve( - path.join(__dirname, "../cli/ignore-path/regular-module.js") + const file = new URL( + "../cli/ignore-path/file-info-test/ignored-by-customignore.js", + import.meta.url, ); - const ignorePath = path.resolve( - path.join(__dirname, "../cli/ignore-path/.prettierignore") + const ignorePath = new URL( + "../cli/ignore-path/file-info-test/.customignore", + import.meta.url, ); - await expect(prettier.getFileInfo(file)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(file)).resolves.toEqual({ ignored: false, inferredParser: "babel", }); - await expect( - prettier.getFileInfo(file, { ignorePath }) - ).resolves.toMatchObject({ + await expect(prettier.getFileInfo(file, { ignorePath })).resolves.toEqual({ ignored: true, inferredParser: null, }); }); test("API getFileInfo with ignorePath containing relative paths", async () => { - const file = path.resolve( - path.join( - __dirname, - "../cli/ignore-relative-path/level1-glob/level2-glob/level3-glob/shouldNotBeFormat.js" - ) - ); - const ignorePath = path.resolve( - path.join(__dirname, "../cli/ignore-relative-path/.prettierignore") - ); - - await expect(prettier.getFileInfo(file)).resolves.toMatchObject({ - ignored: false, - inferredParser: "babel", - }); - - await expect( - prettier.getFileInfo(file, { ignorePath }) - ).resolves.toMatchObject({ - ignored: true, - inferredParser: null, - }); -}); - -test("API getFileInfo.sync with ignorePath", () => { - const file = path.resolve( - path.join(__dirname, "../cli/ignore-path/regular-module.js") + const file = new URL( + "../cli/ignore-relative-path/level1-glob/level2-glob/level3-glob/shouldNotBeFormat.js", + import.meta.url, ); - const ignorePath = path.resolve( - path.join(__dirname, "../cli/ignore-path/.prettierignore") + const ignorePath = new URL( + "../cli/ignore-relative-path/.prettierignore", + import.meta.url, ); - expect(prettier.getFileInfo.sync(file)).toMatchObject({ + await expect(prettier.getFileInfo(file)).resolves.toEqual({ ignored: false, inferredParser: "babel", }); - expect( - prettier.getFileInfo.sync(file, { - ignorePath, - }) - ).toMatchObject({ + await expect(prettier.getFileInfo(file, { ignorePath })).resolves.toEqual({ ignored: true, inferredParser: null, }); }); -describe("API getFileInfo.sync with ignorePath", () => { +describe("API getFileInfo with ignorePath", () => { let cwd; let filePath; let options; beforeAll(() => { cwd = process.cwd(); - const tempDir = tempy.directory(); + const tempDir = getTemporaryDirectory(); process.chdir(tempDir); const fileDir = "src"; filePath = `${fileDir}/should-be-ignored.js`; @@ -409,84 +281,66 @@ describe("API getFileInfo.sync with ignorePath", () => { afterAll(() => { process.chdir(cwd); }); - test("with relative filePath", () => { - expect( - prettier.getFileInfo.sync(filePath, options).ignored - ).toMatchInlineSnapshot("true"); + test("with relative filePath", async () => { + const { ignored } = await prettier.getFileInfo(filePath, options); + expect(ignored).toBe(true); }); - test("with relative filePath starts with dot", () => { - expect( - prettier.getFileInfo.sync(`./${filePath}`, options).ignored - ).toMatchInlineSnapshot("true"); + test("with relative filePath starts with dot", async () => { + const { ignored } = await prettier.getFileInfo(`./${filePath}`, options); + expect(ignored).toBe(true); }); - test("with absolute filePath", () => { - expect( - prettier.getFileInfo.sync(path.resolve(filePath), options).ignored - ).toMatchInlineSnapshot("true"); + test("with absolute filePath", async () => { + const { ignored } = await prettier.getFileInfo( + path.resolve(filePath), + options, + ); + expect(ignored).toBe(true); }); }); test("API getFileInfo with withNodeModules", async () => { - const file = path.resolve( - path.join(__dirname, "../cli/with-node-modules/node_modules/file.js") + const file = new URL( + "../cli/with-node-modules/node_modules/file.js", + import.meta.url, ); - await expect(prettier.getFileInfo(file)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(file)).resolves.toEqual({ ignored: true, inferredParser: null, }); await expect( prettier.getFileInfo(file, { withNodeModules: true, - }) - ).resolves.toMatchObject({ + }), + ).resolves.toEqual({ ignored: false, inferredParser: "babel", }); }); -describe("extracts file-info for a JS file with no extension but a standard shebang", () => { - expect( - prettier.getFileInfo.sync("tests/integration/cli/shebang/node-shebang") - ).toMatchObject({ +test("extracts file-info for a JS file with no extension but a standard shebang", async () => { + await expect( + prettier.getFileInfo("tests/integration/cli/shebang/node-shebang"), + ).resolves.toEqual({ ignored: false, inferredParser: "babel", }); }); -describe("extracts file-info for a JS file with no extension but an env-based shebang", () => { - expect( - prettier.getFileInfo.sync("tests/integration/cli/shebang/env-node-shebang") - ).toMatchObject({ +test("extracts file-info for a JS file with no extension but an env-based shebang", async () => { + await expect( + prettier.getFileInfo("tests/integration/cli/shebang/env-node-shebang"), + ).resolves.toEqual({ ignored: false, inferredParser: "babel", }); }); -describe("returns null parser for unknown shebang", () => { - expect( - prettier.getFileInfo.sync("tests/integration/cli/shebang/nonsense-shebang") - ).toMatchObject({ - ignored: false, - inferredParser: null, - }); -}); - -test("API getFileInfo with plugins loaded using pluginSearchDir", async () => { - const file = "file.foo"; - const pluginsPath = path.resolve( - path.join(__dirname, "../plugins/automatic") - ); - await expect(prettier.getFileInfo(file)).resolves.toMatchObject({ - ignored: false, - inferredParser: null, - }); +test("returns null parser for unknown shebang", async () => { await expect( - prettier.getFileInfo(file, { - pluginSearchDirs: [pluginsPath], - }) - ).resolves.toMatchObject({ + prettier.getFileInfo("tests/integration/cli/shebang/nonsense-shebang"), + ).resolves.toEqual({ ignored: false, - inferredParser: "foo", + inferredParser: null, }); }); @@ -495,39 +349,139 @@ test("API getFileInfo with hand-picked plugins", async () => { const pluginPath = path.resolve( path.join( __dirname, - "../plugins/automatic/node_modules/@prettier/plugin-foo" - ) + "../plugins/automatic/node_modules/@prettier/plugin-foo/index.js", + ), ); - await expect(prettier.getFileInfo(file)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(file)).resolves.toEqual({ ignored: false, inferredParser: null, }); await expect( prettier.getFileInfo(file, { plugins: [pluginPath], - }) - ).resolves.toMatchObject({ + }), + ).resolves.toEqual({ ignored: false, inferredParser: "foo", }); }); test("API getFileInfo with ignorePath and resolveConfig should infer parser with correct filepath", async () => { - const dir = path.join(__dirname, "../cli/ignore-and-config/"); - const filePath = path.join(dir, "config-dir/foo"); - const ignorePath = path.join(dir, "ignore-path-dir/.prettierignore"); + const directory = new URL("../cli/ignore-and-config/", import.meta.url); + const file = new URL("./config-dir/foo", directory); + const ignorePath = new URL("./ignore-path-dir/.prettierignore", directory); const options = { resolveConfig: true, ignorePath, }; - await expect(prettier.getFileInfo(filePath, options)).resolves.toMatchObject({ + await expect(prettier.getFileInfo(file, options)).resolves.toEqual({ ignored: false, inferredParser: "parser-for-config-dir", }); +}); - expect(prettier.getFileInfo.sync(filePath, options)).toMatchObject({ - ignored: false, - inferredParser: "parser-for-config-dir", +test("API getFileInfo accepts path or URL", async () => { + const fileUrl = new URL("../../../README.md", import.meta.url); + const expectedResult = { ignored: false, inferredParser: "markdown" }; + + const resultByUrl = await prettier.getFileInfo(fileUrl); + const resultByUrlHref = await prettier.getFileInfo(fileUrl.href); + const resultByPath = await prettier.getFileInfo(url.fileURLToPath(fileUrl)); + const resultByRelativePath = await prettier.getFileInfo( + path.relative(process.cwd(), url.fileURLToPath(fileUrl)), + ); + expect(resultByUrl).toEqual(expectedResult); + expect(resultByUrlHref).toEqual(expectedResult); + expect(resultByPath).toEqual(expectedResult); + expect(resultByRelativePath).toEqual(expectedResult); +}); + +test("getFileInfo should support `parser` and `plugins` in options", async () => { + { + const { inferredParser: parser } = await prettier.getFileInfo( + new URL("../cli/file-info/empty-config/foo.js", import.meta.url), + { + parser: "parser-from-options", + }, + ); + expect(parser).toBe("parser-from-options"); + } + + { + const { inferredParser: parser } = await prettier.getFileInfo( + new URL("../cli/file-info/empty-config/foo.js", import.meta.url), + ); + expect(parser).toBe("babel"); + } + + { + const { inferredParser: parser } = await prettier.getFileInfo( + new URL("../cli/file-info/config-with-parser/foo.js", import.meta.url), + ); + expect(parser).toBe("parser-from-prettierrc"); + } + + { + const { inferredParser: parser } = await prettier.getFileInfo( + new URL("../cli/file-info/config-with-plugin/file.foo", import.meta.url), + ); + expect(parser).toBe("parser-for-foo-file-from-plugin"); + } + + { + const { stdout } = await runCli("cli/file-info/config-with-plugin", [ + "--file-info", + "file.foo", + ]); + const { inferredParser: parser } = JSON.parse(stdout); + expect(parser).toBe("parser-for-foo-file-from-plugin"); + } + + { + const { inferredParser: parser } = await prettier.getFileInfo( + new URL("../cli/file-info/empty-config/file.bar", import.meta.url), + { + plugins: [new URL("../cli/file-info/plugin.js", import.meta.url)], + }, + ); + expect(parser).toBe("parser-for-bar-file-from-plugin"); + } +}); + +test("API getFileInfo accepts path or URL as ignorePath", async () => { + const file = new URL( + "../cli/ignore-path/file-info-test/ignored-by-customignore.js", + import.meta.url, + ); + const ignoreFileUrl = new URL( + "../cli/ignore-path/file-info-test/.customignore", + import.meta.url, + ); + const expectedResult = { ignored: true, inferredParser: null }; + + const resultByUrl = await prettier.getFileInfo(file, { + ignorePath: ignoreFileUrl, + }); + const resultByUrlArray = await prettier.getFileInfo(file, { + ignorePath: [ignoreFileUrl], + }); + const resultByUrlHref = await prettier.getFileInfo(file, { + ignorePath: ignoreFileUrl.href, + }); + const resultByUrlHrefArray = await prettier.getFileInfo(file, { + ignorePath: [ignoreFileUrl.href], + }); + const resultByPath = await prettier.getFileInfo(file, { + ignorePath: url.fileURLToPath(ignoreFileUrl), + }); + const resultByPathArray = await prettier.getFileInfo(file, { + ignorePath: [url.fileURLToPath(ignoreFileUrl)], }); + expect(resultByUrl).toEqual(expectedResult); + expect(resultByUrlArray).toEqual(expectedResult); + expect(resultByUrlHref).toEqual(expectedResult); + expect(resultByUrlHrefArray).toEqual(expectedResult); + expect(resultByPath).toEqual(expectedResult); + expect(resultByPathArray).toEqual(expectedResult); }); diff --git a/tests/integration/__tests__/format-ast.js b/tests/integration/__tests__/format-ast.js index 4ca37ee2fdce..02723dcc9fe5 100644 --- a/tests/integration/__tests__/format-ast.js +++ b/tests/integration/__tests__/format-ast.js @@ -1,12 +1,17 @@ -"use strict"; - -const { - __debug: { formatAST }, -} = require("prettier-local"); +import prettier from "../../config/prettier-entry.js"; +const { formatAST } = prettier.__debug; describe("formatAST", () => { - const formatExportSpecifier = (specifier) => { - const { formatted } = formatAST( + const originalNodeEnv = process.env.NODE_ENV; + beforeAll(() => { + process.env.NODE_ENV = "production"; + }); + afterAll(() => { + process.env.NODE_ENV = originalNodeEnv; + }); + + const formatExportSpecifier = async (specifier) => { + const { formatted } = await formatAST( { type: "Program", body: [ @@ -16,15 +21,15 @@ describe("formatAST", () => { }, ], }, - { parser: "meriyah" } + { parser: "meriyah" }, ); return formatted; }; - test("Shorthand specifier", () => { + test("Shorthand specifier", async () => { expect( - formatExportSpecifier({ + await formatExportSpecifier({ type: "ExportSpecifier", local: { type: "Identifier", @@ -34,13 +39,13 @@ describe("formatAST", () => { type: "Identifier", name: "specifier2", }, - }) + }), ).toMatchSnapshot(); }); - test("Shorthand specifier 2", () => { + test("Shorthand specifier 2", async () => { expect( - formatExportSpecifier({ + await formatExportSpecifier({ type: "ExportSpecifier", local: { type: "Identifier", @@ -52,13 +57,13 @@ describe("formatAST", () => { name: "specifier2", range: [0, 0], }, - }) + }), ).toMatchSnapshot(); }); - test("Shorthand specifier 3", () => { + test("Shorthand specifier 3", async () => { expect( - formatExportSpecifier({ + await formatExportSpecifier({ type: "ExportSpecifier", local: { type: "Literal", @@ -71,13 +76,13 @@ describe("formatAST", () => { name: "specifier", range: [0, 0], }, - }) + }), ).toMatchSnapshot(); }); - test("Shorthand specifier 4", () => { + test("Shorthand specifier 4", async () => { expect( - formatExportSpecifier({ + await formatExportSpecifier({ type: "ExportSpecifier", local: { type: "Literal", @@ -91,7 +96,7 @@ describe("formatAST", () => { raw: "'specifier'", range: [0, 0], }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/tests/integration/__tests__/format.js b/tests/integration/__tests__/format.js index 5f2d2dd2f1c2..8608c0cdd22b 100644 --- a/tests/integration/__tests__/format.js +++ b/tests/integration/__tests__/format.js @@ -1,20 +1,18 @@ -"use strict"; +import { outdent } from "outdent"; +import prettier from "../../config/prettier-entry.js"; +import fooPlugin from "../plugins/defaultOptions/plugin.cjs"; -const prettier = require("prettier-local"); -const { outdent } = require("outdent"); -const fooPlugin = require("../plugins/defaultOptions/plugin.js"); - -test("yaml parser should handle CRLF correctly", () => { +test("yaml parser should handle CRLF correctly", async () => { const input = "a:\r\n 123\r\n"; expect( // use JSON.stringify to observe CRLF JSON.stringify( - prettier.format(input, { parser: "yaml", endOfLine: "auto" }) - ) + await prettier.format(input, { parser: "yaml", endOfLine: "auto" }), + ), ).toMatchSnapshot(); }); -test("typescript parser should throw the first error when both JSX and non-JSX mode failed", () => { +test("typescript parser should throw the first error when both JSX and non-JSX mode failed", async () => { const input = outdent` import React from "react"; @@ -25,43 +23,48 @@ test("typescript parser should throw the first error when both JSX and non-JSX m label: `; - expect(() => - prettier.format(input, { parser: "typescript" }) - ).toThrowErrorMatchingSnapshot(); + await expect( + prettier.format(input, { parser: "typescript", filepath: "foo.unknown" }), + ).rejects.toThrowErrorMatchingSnapshot(); }); -test("html parser should handle CRLF correctly", () => { +test("html parser should handle CRLF correctly", async () => { const input = "<!--\r\n test\r\n test\r\n-->"; expect( // use JSON.stringify to observe CRLF JSON.stringify( - prettier.format(input, { parser: "html", endOfLine: "auto" }) - ) + await prettier.format(input, { parser: "html", endOfLine: "auto" }), + ), ).toMatchSnapshot(); }); -test("markdown parser should handle CRLF correctly", () => { +test("markdown parser should handle CRLF correctly", async () => { const input = "```\r\n\r\n\r\n```"; expect( // use JSON.stringify to observe CRLF JSON.stringify( - prettier.format(input, { parser: "markdown", endOfLine: "auto" }) - ) + await prettier.format(input, { parser: "markdown", endOfLine: "auto" }), + ), ).toMatchSnapshot(); }); -test("should work with foo plugin instance", () => { +test("should work with foo plugin instance", async () => { const input = "a:\r\n 123\r\n"; expect( JSON.stringify( - prettier.format(input, { parser: "foo-parser", plugins: [fooPlugin] }) - ) - ).toMatchInlineSnapshot('""{\\"tabWidth\\":8,\\"bracketSpacing\\":false}""'); + await prettier.format(input, { + parser: "foo-parser", + plugins: [fooPlugin], + }), + ), + ).toMatchInlineSnapshot( + String.raw`""{\"tabWidth\":8,\"bracketSpacing\":false}""`, + ); }); -test("'Adjacent JSX' error should not be swallowed by Babel's error recovery", () => { +test("'Adjacent JSX' error should not be swallowed by Babel's error recovery", async () => { const input = "<a></a>\n<b></b>"; - expect(() => - prettier.format(input, { parser: "babel" }) - ).toThrowErrorMatchingSnapshot(); + await expect( + prettier.format(input, { parser: "babel" }), + ).rejects.toThrowErrorMatchingSnapshot(); }); diff --git a/tests/integration/__tests__/help-options.js b/tests/integration/__tests__/help-options.js index fb03f529ec83..30d373c64e3b 100644 --- a/tests/integration/__tests__/help-options.js +++ b/tests/integration/__tests__/help-options.js @@ -1,27 +1,8 @@ -"use strict"; +import { getContextOptions } from "../../../src/cli/options/get-context-options.js"; -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); -const constant = require("../../../src/cli/constant.js"); -const { - createDetailedOptionMap, - normalizeDetailedOptionMap, -} = require("../../../src/cli/options/option-map.js"); -const arrayify = require("../../../src/utils/arrayify.js"); +const { detailedOptions } = await getContextOptions(); -for (const option of arrayify( - { - ...createDetailedOptionMap( - prettier.getSupportInfo({ - showDeprecated: true, - showUnreleased: true, - showInternal: true, - }).options - ), - ...normalizeDetailedOptionMap(constant.options), - }, - "name" -)) { +for (const option of detailedOptions) { const optionNames = [ option.description ? option.name : null, option.oppositeDescription ? `no-${option.name}` : null, @@ -29,7 +10,7 @@ for (const option of arrayify( for (const optionName of optionNames) { describe(`show detailed usage with --help ${optionName}`, () => { - runPrettier("cli", ["--help", optionName]).test({ + runCli("cli", ["--help", optionName]).test({ status: 0, }); }); diff --git a/tests/integration/__tests__/ignore-absolute-path.js b/tests/integration/__tests__/ignore-absolute-path.js index 23749ded2c1c..2209aa76415c 100644 --- a/tests/integration/__tests__/ignore-absolute-path.js +++ b/tests/integration/__tests__/ignore-absolute-path.js @@ -1,10 +1,9 @@ -"use strict"; - -const path = require("path"); -const runPrettier = require("../run-prettier.js"); +import path from "node:path"; +import createEsmUtils from "esm-utils"; +const { __dirname } = createEsmUtils(import.meta); describe("support absolute filename", () => { - runPrettier("cli/ignore-absolute-path", [ + runCli("cli/ignore-absolute-path", [ path.resolve(__dirname, "../cli/ignore-absolute-path/ignored/module.js"), path.resolve(__dirname, "../cli/ignore-absolute-path/depth1/ignored/*.js"), path.resolve(__dirname, "../cli/ignore-absolute-path/regular-module.js"), diff --git a/tests/integration/__tests__/ignore-emoji.js b/tests/integration/__tests__/ignore-emoji.js deleted file mode 100644 index 41939a4cf3ad..000000000000 --- a/tests/integration/__tests__/ignore-emoji.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - -describe("ignores file name contains emoji", () => { - runPrettier("cli/ignore-emoji", ["**/*.js", "-l"]).test({ - status: 1, - }); -}); - -describe("stdin", () => { - runPrettier( - "cli/ignore-emoji", - ["--stdin-filepath", "ignored/我的样式.css"], - { input: ".name { display: none; }" } - ).test({ - status: 0, - }); -}); diff --git a/tests/integration/__tests__/ignore-in-subdirectories.js b/tests/integration/__tests__/ignore-in-subdirectories.js index 59c2b80b7eca..626962ee9b45 100644 --- a/tests/integration/__tests__/ignore-in-subdirectories.js +++ b/tests/integration/__tests__/ignore-in-subdirectories.js @@ -1,11 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("ignores files when executing in a subdirectory", () => { - runPrettier("cli/ignore-in-subdirectories/web1", [ + runCli("cli/ignore-in-subdirectories/web1", [ "ignore-me/should-ignore.js", "--ignore-path", "../.prettierignore", @@ -14,7 +8,7 @@ describe("ignores files when executing in a subdirectory", () => { status: 0, }); - runPrettier("cli/ignore-in-subdirectories/web1", [ + runCli("cli/ignore-in-subdirectories/web1", [ "ignore-me/subdirectory/should-ignore.js", "--ignore-path", "../.prettierignore", @@ -25,7 +19,7 @@ describe("ignores files when executing in a subdirectory", () => { }); describe("formats files when executing in a subdirectory", () => { - runPrettier("cli/ignore-in-subdirectories/web1", [ + runCli("cli/ignore-in-subdirectories/web1", [ "should-not-ignore.js", "--ignore-path", "../.prettierignore", @@ -34,7 +28,7 @@ describe("formats files when executing in a subdirectory", () => { status: 1, }); - runPrettier("cli/ignore-in-subdirectories/web2", [ + runCli("cli/ignore-in-subdirectories/web2", [ "should-not-ignore.js", "--ignore-path", "../.prettierignore", @@ -45,7 +39,7 @@ describe("formats files when executing in a subdirectory", () => { }); describe("ignore files when executing in a subdirectory and using stdin", () => { - runPrettier( + runCli( "cli/ignore-in-subdirectories/web1", [ "--ignore-path", @@ -55,7 +49,7 @@ describe("ignore files when executing in a subdirectory and using stdin", () => ], { input: "hello_world( );", - } + }, ).test({ stdout: "hello_world( );", status: 0, @@ -63,14 +57,14 @@ describe("ignore files when executing in a subdirectory and using stdin", () => }); describe("formats files when executing in a subdirectory and using stdin", () => { - runPrettier( + runCli( "cli/ignore-in-subdirectories/web1", ["--ignore-path", "../.prettierignore", "--stdin-filepath", "example.js"], { input: "hello_world( );", - } + }, ).test({ - stdout: "hello_world();\n", + stdout: "hello_world();", status: 0, }); }); diff --git a/tests/integration/__tests__/ignore-path.js b/tests/integration/__tests__/ignore-path.js index 63dd2451f937..50ef8186f19b 100644 --- a/tests/integration/__tests__/ignore-path.js +++ b/tests/integration/__tests__/ignore-path.js @@ -1,42 +1,76 @@ -"use strict"; +import fs from "node:fs/promises"; -const fs = require("fs"); -const path = require("path"); -const runPrettier = require("../run-prettier.js"); - -fs.writeFileSync( - // This file is in `.gitignore`, just copy from `regular-module.js` - path.join(__dirname, "../cli/ignore-path/other-regular-modules.js"), - fs.readFileSync(path.join(__dirname, "../cli/ignore-path/regular-module.js")) +// `.js` files are ignored in `.gitignore` +const files = [ + "ignored-by-customignore.js", + "ignored-by-gitignore.js", + "ignored-by-prettierignore.js", +].map( + (file) => + new URL(`../cli/ignore-path/ignore-path-test/${file}`, import.meta.url), ); +const clean = () => + Promise.all(files.map((file) => fs.rm(file, { force: true }))); +const setup = () => + Promise.all(files.map((file) => fs.writeFile(file, " a+ b"))); + +beforeAll(async () => { + await clean(); + await setup(); +}); +afterAll(clean); -describe("ignore path", () => { - runPrettier("cli/ignore-path", [ +const getUnformattedFiles = async (args) => { + const { stdout } = await runCli("cli/ignore-path/ignore-path-test/", [ "**/*.js", - "--ignore-path", - ".gitignore", "-l", - ]).test({ - status: 1, - }); + ...args, + ]); + return stdout ? stdout.split("\n").sort() : []; +}; + +test("custom ignore path", async () => { + expect(await getUnformattedFiles(["--ignore-path", ".customignore"])).toEqual( + ["ignored-by-gitignore.js", "ignored-by-prettierignore.js"], + ); }); -describe("support .prettierignore", () => { - runPrettier("cli/ignore-path", ["**/*.js", "-l"]).test({ - status: 1, - }); +test("ignore files by .prettierignore and .gitignore by default", async () => { + expect( + await getUnformattedFiles(["--ignore-path", ".non-exists-ignore-file"]), + ).toEqual([ + "ignored-by-customignore.js", + "ignored-by-gitignore.js", + "ignored-by-prettierignore.js", + ]); + expect(await getUnformattedFiles([])).toEqual([]); }); describe("ignore file when using --debug-check", () => { - runPrettier("cli/ignore-path", ["**/*.js", "--debug-check"]).test({ + runCli("cli/ignore-path/ignore-path-test/", [ + "**/*.js", + "--debug-check", + "--ignore-path", + ".prettierignore", + ]).test({ status: 0, + stderr: "", + stdout: ["ignored-by-customignore.js", "ignored-by-gitignore.js"].join( + "\n", + ), + write: [], }); }); -describe("outputs files as-is if no --write", () => { - runPrettier("cli/ignore-path", ["regular-module.js"], { - ignoreLineEndings: true, - }).test({ - status: 0, - }); +test("multiple `--ignore-path`", async () => { + expect( + await getUnformattedFiles([ + "--ignore-path", + ".customignore", + "--ignore-path", + ".prettierignore", + "--ignore-path", + ".non-exists-ignore-file", + ]), + ).toEqual(["ignored-by-gitignore.js"]); }); diff --git a/tests/integration/__tests__/ignore-relative-path.js b/tests/integration/__tests__/ignore-relative-path.js index 8bb7525a5ae4..e08cc7700a73 100644 --- a/tests/integration/__tests__/ignore-relative-path.js +++ b/tests/integration/__tests__/ignore-relative-path.js @@ -1,11 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("support relative paths", () => { - runPrettier("cli/ignore-relative-path", [ + runCli("cli/ignore-relative-path", [ "./shouldNotBeIgnored.js", "./level1/level2/level3/shouldNotBeFormat.js", "level1-glob/level2-glob/level3-glob/shouldNotBeFormat.js", diff --git a/tests/integration/__tests__/ignore-unknown.js b/tests/integration/__tests__/ignore-unknown.js index 68967e173556..1fe9762fd0df 100644 --- a/tests/integration/__tests__/ignore-unknown.js +++ b/tests/integration/__tests__/ignore-unknown.js @@ -1,9 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("ignore-unknown dir", () => { - runPrettier("cli/ignore-unknown", [ + runCli("cli/ignore-unknown", [ ".", "--ignore-unknown", "--list-different", @@ -15,7 +11,7 @@ describe("ignore-unknown dir", () => { }); describe("ignore-unknown alias", () => { - runPrettier("cli/ignore-unknown", [".", "-u", "--list-different"]).test({ + runCli("cli/ignore-unknown", [".", "-u", "--list-different"]).test({ status: "non-zero", stderr: "", write: [], @@ -23,7 +19,7 @@ describe("ignore-unknown alias", () => { }); describe("ignore-unknown pattern", () => { - runPrettier("cli/ignore-unknown", [ + runCli("cli/ignore-unknown", [ "*", "--ignore-unknown", "--list-different", @@ -35,7 +31,7 @@ describe("ignore-unknown pattern", () => { }); describe("ignore-unknown write", () => { - runPrettier("cli/ignore-unknown", [ + runCli("cli/ignore-unknown", [ ".", "--ignore-unknown", "--write", @@ -47,22 +43,19 @@ describe("ignore-unknown write", () => { }); describe("ignore-unknown check", () => { - runPrettier("cli/ignore-unknown", [".", "--ignore-unknown", "--check"]).test({ + runCli("cli/ignore-unknown", [".", "--ignore-unknown", "--check"]).test({ status: 1, }); }); describe("None exist file", () => { - runPrettier("cli/ignore-unknown", [ - "non-exist-file", - "--ignore-unknown", - ]).test({ + runCli("cli/ignore-unknown", ["non-exist-file", "--ignore-unknown"]).test({ status: 2, }); }); describe("Not matching pattern", () => { - runPrettier("cli/ignore-unknown", [ + runCli("cli/ignore-unknown", [ "*.non-exist-pattern", "--ignore-unknown", ]).test({ @@ -71,7 +64,7 @@ describe("Not matching pattern", () => { }); describe("Ignored file", () => { - runPrettier("cli/ignore-unknown", ["ignored.js", "--ignore-unknown"]).test({ + runCli("cli/ignore-unknown", ["ignored.js", "--ignore-unknown"]).test({ status: 0, }); }); diff --git a/tests/integration/__tests__/ignore-vcs-files.js b/tests/integration/__tests__/ignore-vcs-files.js index a6416647bf78..7e80793cb897 100644 --- a/tests/integration/__tests__/ignore-vcs-files.js +++ b/tests/integration/__tests__/ignore-vcs-files.js @@ -1,13 +1,8 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("ignores files in version control systems", () => { - runPrettier("cli/ignore-vcs-files", [ + runCli("cli/ignore-vcs-files", [ ".svn/file.js", ".hg/file.js", + ".jj/file.js", "file.js", "-l", ]).test({ diff --git a/tests/integration/__tests__/infer-parser.js b/tests/integration/__tests__/infer-parser.js index 029a5abf6749..b80d452b0b5e 100644 --- a/tests/integration/__tests__/infer-parser.js +++ b/tests/integration/__tests__/infer-parser.js @@ -1,11 +1,12 @@ -"use strict"; +import url from "node:url"; +import prettier from "../../config/prettier-entry.js"; +import jestPathSerializer from "../path-serializer.js"; -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); +expect.addSnapshotSerializer(jestPathSerializer); describe("stdin no path and no parser", () => { describe("logs error and exits with 2", () => { - runPrettier("cli/infer-parser/", [], { input: "foo" }).test({ + runCli("cli/infer-parser/", [], { input: "foo" }).test({ status: 2, stdout: "", write: [], @@ -13,7 +14,7 @@ describe("stdin no path and no parser", () => { }); describe("--check logs error but exits with 0", () => { - runPrettier("cli/infer-parser/", ["--check"], { + runCli("cli/infer-parser/", ["--check"], { input: "foo", }).test({ status: 0, @@ -23,7 +24,7 @@ describe("stdin no path and no parser", () => { }); describe("--list-different logs error but exits with 0", () => { - runPrettier("cli/infer-parser/", ["--list-different"], { + runCli("cli/infer-parser/", ["--list-different"], { input: "foo", }).test({ status: 0, @@ -35,7 +36,7 @@ describe("stdin no path and no parser", () => { describe("stdin with unknown path and no parser", () => { describe("logs error and exits with 2", () => { - runPrettier("cli/infer-parser/", ["--stdin-filepath", "foo"], { + runCli("cli/infer-parser/", ["--stdin-filepath", "foo"], { input: "foo", }).test({ status: 2, @@ -45,7 +46,7 @@ describe("stdin with unknown path and no parser", () => { }); describe("--check logs error but exits with 0", () => { - runPrettier("cli/infer-parser/", ["--check", "--stdin-filepath", "foo"], { + runCli("cli/infer-parser/", ["--check", "--stdin-filepath", "foo"], { input: "foo", }).test({ status: 0, @@ -55,10 +56,10 @@ describe("stdin with unknown path and no parser", () => { }); describe("--list-different logs error but exits with 0", () => { - runPrettier( + runCli( "cli/infer-parser/", ["--list-different", "--stdin-filepath", "foo"], - { input: "foo" } + { input: "foo" }, ).test({ status: 0, stdout: "", @@ -69,7 +70,7 @@ describe("stdin with unknown path and no parser", () => { describe("unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", ["--end-of-line", "lf", "FOO"]).test({ + runCli("cli/infer-parser/", ["--end-of-line", "lf", "FOO"]).test({ status: 2, stdout: "", write: [], @@ -77,7 +78,7 @@ describe("unknown path and no parser", () => { }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--end-of-line", "lf", "*"]).test({ + runCli("cli/infer-parser/", ["--end-of-line", "lf", "*"]).test({ status: 2, write: [], }); @@ -86,15 +87,15 @@ describe("unknown path and no parser", () => { describe("--check with unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", ["--check", "FOO"]).test({ - status: 0, + runCli("cli/infer-parser/", ["--check", "FOO"]).test({ + status: 2, write: [], }); }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--check", "*"]).test({ - status: 1, + runCli("cli/infer-parser/", ["--check", "*"]).test({ + status: 2, write: [], }); }); @@ -102,17 +103,17 @@ describe("--check with unknown path and no parser", () => { describe("--list-different with unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", ["--list-different", "FOO"]).test({ - status: 0, + runCli("cli/infer-parser/", ["--list-different", "FOO"]).test({ + status: 2, stdout: "", write: [], }); }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--list-different", "*"]).test({ - status: 1, - stdout: "foo.js\n", + runCli("cli/infer-parser/", ["--list-different", "*"]).test({ + status: 2, + stdout: "foo.js", write: [], }); }); @@ -120,7 +121,7 @@ describe("--list-different with unknown path and no parser", () => { describe("--write with unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", ["--write", "FOO"]).test({ + runCli("cli/infer-parser/", ["--write", "FOO"]).test({ status: 2, stdout: "", write: [], @@ -128,7 +129,7 @@ describe("--write with unknown path and no parser", () => { }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--write", "*"]).test({ + runCli("cli/infer-parser/", ["--write", "*"]).test({ status: 2, }); }); @@ -136,65 +137,73 @@ describe("--write with unknown path and no parser", () => { describe("--write and --check with unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", ["--check", "--write", "FOO"]).test({ - status: 0, + runCli("cli/infer-parser/", ["--check", "--write", "FOO"]).test({ + status: 2, write: [], }); }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--check", "--write", "*"]).test({ - status: 0, + runCli("cli/infer-parser/", ["--check", "--write", "*"]).test({ + status: 2, }); }); }); describe("--write and --list-different with unknown path and no parser", () => { describe("specific file", () => { - runPrettier("cli/infer-parser/", [ - "--list-different", - "--write", - "FOO", - ]).test({ - status: 0, + runCli("cli/infer-parser/", ["--list-different", "--write", "FOO"]).test({ + status: 2, stdout: "", write: [], }); }); describe("multiple files", () => { - runPrettier("cli/infer-parser/", ["--list-different", "--write", "*"]).test( - { status: 0 } - ); + runCli("cli/infer-parser/", ["--list-different", "--write", "*"]).test({ + status: 2, + }); }); }); -describe("API with no path and no parser", () => { - const _console = global.console; - - beforeEach(() => { - global.console = { warn: jest.fn() }; - }); - - afterEach(() => { - global.console = _console; +describe("Allow plugin to override builtin plugins", () => { + runCli( + "cli/infer-parser/override-builtin-plugin-languages", + ["--stdin-filepath=foo.js"], + { + input: "foo( )", + }, + ).test({ write: [], status: 0, stderr: "", stdout: "foo();" }); + runCli( + "cli/infer-parser/override-builtin-plugin-languages", + ["--stdin-filepath=foo.js", "--plugin=./dummy-js-plugin.js"], + { + input: "foo( )", + }, + ).test({ + write: [], + status: 0, + stderr: "", + stdout: "foo( )\nformatted by 'dummy-js-parser' parser", }); +}); - test("prettier.format", () => { - expect(prettier.format(" foo ( )")).toBe("foo();\n"); - expect(global.console.warn).toHaveBeenCalledTimes(1); - expect(global.console.warn.mock.calls[0]).toMatchSnapshot(); +describe("API with no path and no parser", () => { + test("prettier.format", async () => { + await expect(prettier.format(" foo ( )")).rejects.toThrow( + /No parser and no file path given, couldn't infer a parser\./u, + ); }); - test("prettier.check", () => { - expect(prettier.check(" foo ( )")).toBe(false); - expect(global.console.warn).toHaveBeenCalledTimes(1); - expect(global.console.warn.mock.calls[0]).toMatchSnapshot(); + test("prettier.check", async () => { + await expect(prettier.check(" foo ( )")).rejects.toThrow( + /No parser and no file path given, couldn't infer a parser\./u, + ); }); }); describe("Known/Unknown", () => { - runPrettier("cli/infer-parser/known-unknown", [ + runCli("cli/infer-parser/known-unknown", [ "--end-of-line", "lf", "--list-different", @@ -207,12 +216,135 @@ describe("Known/Unknown", () => { }); describe("Interpreters", () => { - runPrettier("cli/infer-parser/interpreters", [ + runCli("cli/infer-parser/interpreters", ["--file-info", "zx-script"]).test({ + status: 0, + stderr: "", + write: [], + }); +}); + +describe("isSupported", () => { + runCli("cli/infer-parser", [ + "--plugin", + "../../plugins/languages/is-supported.js", "--file-info", - "zx-script", + ".husky/pre-commit", + ]).test({ + status: 0, + stderr: "", + write: [], + }); + + runCli("cli/infer-parser", [ + "--plugin", + "../../plugins/languages/is-supported.js", + ".husky/pre-commit", ]).test({ status: 0, stderr: "", write: [], }); + + runCli( + "cli/infer-parser", + [ + "--plugin", + "../../plugins/languages/is-supported.js", + "--stdin-filepath", + ".husky/pre-commit", + ], + { input: "content from stdin" }, + ).test({ + status: 0, + stderr: "", + write: [], + }); + + test("API", async () => { + const fileUrl = new URL("foo.unknown", import.meta.url); + const filePath = url.fileURLToPath(fileUrl); + expect(await getIsSupportedReceivedFilepath({ filepath: fileUrl })).toBe( + filePath, + ); + expect( + await getIsSupportedReceivedFilepath({ filepath: fileUrl.href }), + ).toBe(filePath); + expect(await getIsSupportedReceivedFilepath({ filepath: filePath })).toBe( + filePath, + ); + + // Relative path + expect( + await getIsSupportedReceivedFilepath({ filepath: "./foo.unknown" }), + ).toBe("./foo.unknown"); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: "", + }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: Buffer.from("foo.unknown"), + }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: { toString: () => "foo.unknown" }, + }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: new (class { + toString() { + return "foo.unknown"; + } + })(), + }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ filepath: "file://%0" }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: new URL("https://example.com/foo.unknown"), + }), + ).toBeUndefined(); + + expect( + await getIsSupportedReceivedFilepath({ + filepath: "https://example.com/foo.unknown", + }), + ).toBe("https://example.com/foo.unknown"); + }); }); + +const getIsSupportedReceivedFilepath = async (options) => { + let received; + try { + await prettier.format("foo", { + plugins: [ + { + languages: [ + { + isSupported({ filepath }) { + received = filepath; + }, + }, + ], + }, + ], + ...options, + }); + } catch (error) { + if (error.name !== "UndefinedParserError") { + throw error; + } + } + return received; +}; diff --git a/tests/integration/__tests__/infer-plugins-ext-dir.js b/tests/integration/__tests__/infer-plugins-ext-dir.js new file mode 100644 index 000000000000..dd06456208c6 --- /dev/null +++ b/tests/integration/__tests__/infer-plugins-ext-dir.js @@ -0,0 +1,208 @@ +import { outdent } from "outdent"; + +describe("infer file ext that supported by only plugins", () => { + describe("basic", () => { + runCli("cli/infer-plugins-ext-dir/", ["--write", "src"]).test({ + status: 0, + stdout: "src/file.foo 0ms", + write: [ + { + content: "!contents\n", + filename: "src/file.foo", + }, + ], + }); + }); + + describe("with config option", () => { + runCli("cli/infer-plugins-ext-dir-with-config/", [ + "--config", + "foo.mjs", + "--write", + "src", + ]).test({ + status: 0, + stdout: "src/file.foo 0ms", + write: [ + { + content: "!contents\n", + filename: "src/file.foo", + }, + ], + }); + }); + + describe("with overrides options", () => { + runCli("cli/infer-plugins-ext-dir-with-overrides/", [ + "--write", + "src", + ]).test({ + status: 0, + stdout: "src/file.bar 0ms\nsrc/file.foo 0ms", + write: [ + { + content: "!contents\n", + filename: "src/file.bar", + }, + { + content: "!contents\n", + filename: "src/file.foo", + }, + ], + }); + }); + + describe("with defaultOptions", () => { + runCli("cli/infer-plugins-ext-dir-with-default-options/", [ + "--write", + "--no-editorconfig", + "src", + ]).test({ + status: 0, + stdout: "src/file.foo 0ms\nsrc/index.js 0ms", + write: [ + { + content: '{"tabWidth":8,"bracketSpacing":false}', + filename: "src/file.foo", + }, + { + // formatted with `tabWidth: 2` + content: outdent` + function main() { + console.log("Hello, World!"); + }\n + `, + filename: "src/index.js", + }, + ], + }); + }); + + describe("with overrides and defaultOptions", () => { + runCli("cli/infer-plugins-ext-dir-with-overrides-and-default-options/", [ + "--write", + "--no-editorconfig", + "src", + ]).test({ + status: 0, + stdout: "src/file.foo 0ms\nsrc/index.js 0ms", + write: [ + { + content: '{"tabWidth":8,"bracketSpacing":false}', + filename: "src/file.foo", + }, + { + // formatted with `tabWidth: 2` + content: outdent` + function main() { + console.log("Hello, World!"); + }\n + `, + filename: "src/index.js", + }, + ], + }); + }); + + describe("with multiple config for nested dir", () => { + runCli("cli/infer-plugins-with-multiple-config", [ + "--write", + "--no-editorconfig", + ".", + ]).test({ + status: 0, + stdout: outdent` + dir/.prettierrc.mjs 0ms + dir/subdir/.prettierrc.mjs 0ms + dir/subdir/2.foo 0ms + `, + write: [ + { + content: "export default {};\n", + filename: "dir/.prettierrc.mjs", + }, + { + content: outdent` + export default { + plugins: ["../../../../plugins/defaultOptions/plugin.cjs"], + };\n + `, + filename: "dir/subdir/.prettierrc.mjs", + }, + { + content: '{"tabWidth":8,"bracketSpacing":false}', + filename: "dir/subdir/2.foo", + }, + ], + }); + }); + + describe("with multiple config for nested dir 2", () => { + runCli("cli/infer-plugins-with-multiple-config", [ + "--write", + "--no-editorconfig", + "dir", + "dir/subdir", + ]).test({ + status: 0, + stdout: outdent` + dir/.prettierrc.mjs 0ms + dir/subdir/.prettierrc.mjs 0ms + dir/subdir/2.foo 0ms + `, + write: [ + { + content: "export default {};\n", + filename: "dir/.prettierrc.mjs", + }, + { + content: outdent` + export default { + plugins: ["../../../../plugins/defaultOptions/plugin.cjs"], + };\n + `, + filename: "dir/subdir/.prettierrc.mjs", + }, + { + content: '{"tabWidth":8,"bracketSpacing":false}', + filename: "dir/subdir/2.foo", + }, + ], + }); + }); + + describe("with multiple config for nested dir 2", () => { + runCli("cli/infer-plugins-ext-dir-with-complex-overrides", [ + "--write", + "--no-editorconfig", + ".", + ]).test({ + status: 0, + stdout: outdent` + .prettierrc.mjs 0ms + dir/2.foo 0ms + `, + write: [ + { + content: outdent` + export default { + overrides: [ + { + files: ["dir/*.foo"], + options: { + plugins: ["../../plugins/extensions/plugin.cjs"], + }, + }, + ], + };\n + `, + filename: ".prettierrc.mjs", + }, + { + content: "!2.foo\n", + filename: "dir/2.foo", + }, + ], + }); + }); +}); diff --git a/tests/integration/__tests__/invalid-ignore.js b/tests/integration/__tests__/invalid-ignore.js index 6902461bdf9c..7df8708f7975 100644 --- a/tests/integration/__tests__/invalid-ignore.js +++ b/tests/integration/__tests__/invalid-ignore.js @@ -1,13 +1,11 @@ -"use strict"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import prettier from "../../config/prettier-entry.js"; -const path = require("path"); -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); +const { __dirname } = createEsmUtils(import.meta); describe("throw error with invalid ignore", () => { - runPrettier("cli/invalid-ignore", ["something.js"]).test({ + runCli("cli/invalid-ignore", ["something.js"]).test({ status: "non-zero", }); @@ -16,9 +14,9 @@ describe("throw error with invalid ignore", () => { prettier.getFileInfo("something.js", { ignorePath: path.join( __dirname, - "../cli/invalid-ignore/.prettierignore" + "../cli/invalid-ignore/.prettierignore", ), - }) - ).rejects.toThrow(/EISDIR: illegal operation on a directory/); + }), + ).rejects.toThrow(/EISDIR: illegal operation on a directory/u); }); }); diff --git a/tests/integration/__tests__/line-after-filepath-with-errors.js b/tests/integration/__tests__/line-after-filepath-with-errors.js new file mode 100644 index 000000000000..3f7dacaad3fb --- /dev/null +++ b/tests/integration/__tests__/line-after-filepath-with-errors.js @@ -0,0 +1,18 @@ +import jestPathSerializer from "../path-serializer.js"; + +expect.addSnapshotSerializer(jestPathSerializer); + +describe("Line breaking after filepath with errors", () => { + runCli("cli/syntax-errors", ["./*.{js,unknown}"], { + stdoutIsTTY: true, + }).test({ status: 2 }); + runCli("cli/syntax-errors", ["--list-different", "./*.{js,unknown}"], { + stdoutIsTTY: true, + }).test({ status: 2 }); + runCli("cli/syntax-errors", ["--check", "./*.{js,unknown}"], { + stdoutIsTTY: true, + }).test({ status: 2 }); + runCli("cli/syntax-errors", ["--write", "./*.{js,unknown}"], { + stdoutIsTTY: true, + }).test({ status: 2 }); +}); diff --git a/tests/integration/__tests__/line-suffix-boundary.js b/tests/integration/__tests__/line-suffix-boundary.js index 449b886461b8..15ba376635e4 100644 --- a/tests/integration/__tests__/line-suffix-boundary.js +++ b/tests/integration/__tests__/line-suffix-boundary.js @@ -1,16 +1,13 @@ -"use strict"; - +import { outdent } from "outdent"; /** @type {import('prettier')} */ -const prettier = require("prettier-local"); -const { outdent } = require("outdent"); +import prettier from "../../config/prettier-entry.js"; +import printDoc from "../print-doc.js"; const { group, indent, line, lineSuffix, lineSuffixBoundary, softline } = prettier.doc.builders; -const printDoc = require("../print-doc.js"); - describe("lineSuffixBoundary", () => { - test("should be correctly treated as a potential line break in `fits`", () => { + test("should be correctly treated as a potential line break in `fits`", async () => { const doc = group([ "let foo = [", indent([ @@ -33,6 +30,6 @@ describe("lineSuffixBoundary", () => { ]; `; - expect(printDoc(doc)).toBe(expected); + expect(await printDoc(doc)).toBe(expected); }); }); diff --git a/tests/integration/__tests__/list-different.js b/tests/integration/__tests__/list-different.js index 4eada375517b..6576770da5fd 100644 --- a/tests/integration/__tests__/list-different.js +++ b/tests/integration/__tests__/list-different.js @@ -1,45 +1,41 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("checks stdin with --list-different", () => { - runPrettier("cli/with-shebang", ["--list-different", "--parser", "babel"], { + runCli("cli/with-shebang", ["--list-different", "--parser", "babel"], { input: "0", }).test({ - stdout: "(stdin)\n", + stdout: "(stdin)", stderr: "", status: "non-zero", }); }); describe("checks stdin with -l (alias for --list-different)", () => { - runPrettier("cli/with-shebang", ["-l", "--parser", "babel"], { + runCli("cli/with-shebang", ["-l", "--parser", "babel"], { input: "0", }).test({ - stdout: "(stdin)\n", + stdout: "(stdin)", stderr: "", status: "non-zero", }); }); describe("--list-different works in CI just as in a non-TTY mode", () => { - const result0 = runPrettier( + const result0 = runCli( "cli/write", ["--list-different", "formatted.js", "unformatted.js"], { stdoutIsTTY: true, ci: true, - } + }, ).test({ status: 1, }); - const result1 = runPrettier( + const result1 = runCli( "cli/write", ["--list-different", "formatted.js", "unformatted.js"], { stdoutIsTTY: false, - } + }, ).test({ status: 1, }); diff --git a/tests/integration/__tests__/load-toml.js b/tests/integration/__tests__/load-toml.js deleted file mode 100644 index dd4bf2200157..000000000000 --- a/tests/integration/__tests__/load-toml.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -const { outdent } = require("outdent"); -const loadToml = require("../../../src/utils/load-toml.js"); - -describe("TOML", () => { - const exampleFilePath = "example.toml"; - - const exampleToml = outdent` - # This is a TOML document. - title = "TOML Example" - [owner] - name = "Tom Preston-Werner" - dob = 1979-05-27T07:32:00-08:00 # First class dates - [database] - server = "192.168.1.1" - ports = [ 8001, 8001, 8002 ] - connection_max = 5000 - enabled = true - `; - - const wrongToml = "///ERROR///"; - - test("loads toml successfully", () => { - const parsedToml = loadToml(exampleFilePath, exampleToml); - expect(parsedToml).toMatchSnapshot(); - }); - - test("throws error on incorrect toml", () => { - expect(() => { - loadToml(exampleFilePath, wrongToml); - }).toThrow(); - - expect(() => { - loadToml(exampleFilePath, wrongToml); - }).toThrowErrorMatchingSnapshot(); - }); -}); diff --git a/tests/integration/__tests__/log-level.js b/tests/integration/__tests__/log-level.js new file mode 100644 index 000000000000..ba51ac3eefa2 --- /dev/null +++ b/tests/integration/__tests__/log-level.js @@ -0,0 +1,133 @@ +test("do not show logs with --log-level silent", async () => { + await runCliWithLogLevel("silent", null); +}); + +test("do not show warnings with --log-level error", async () => { + await runCliWithLogLevel("error", ["[error]"]); +}); + +test("show errors and warnings with --log-level warn", async () => { + await runCliWithLogLevel("warn", ["[error]", "[warn]"]); +}); + +test("show all logs with --log-level debug", async () => { + await runCliWithLogLevel("debug", ["[error]", "[warn]", "[debug]"]); +}); + +describe("--write with --log-level=silent doesn't log filenames", () => { + runCli("cli/write", ["--write", "unformatted.js", "--log-level=silent"]).test( + { + status: 0, + }, + ); +}); + +describe("Should use default level logger to log `--log-level` error", () => { + runCli("cli/log-level", ["--log-level", "a-unknown-log-level"]).test({ + status: "non-zero", + write: [], + stdout: "", + }); +}); + +describe("log-level should not effect information print", () => { + for (const { argv, runOptions, assertOptions } of [ + { + argv: ["--version"], + assertOptions: { + stdout(value) { + expect(value).not.toBe(""); + }, + }, + }, + { + argv: ["--help"], + assertOptions: { + stdout(value) { + expect(value.includes("-v, --version")).toBe(true); + }, + }, + }, + { + argv: ["--help", "write"], + assertOptions: { + stdout(value) { + expect(value.startsWith("-w, --write")).toBe(true); + }, + }, + }, + { + argv: ["--support-info"], + assertOptions: { + stdout(value) { + expect(JSON.parse(value)).toBeDefined(); + }, + }, + }, + { + argv: ["--find-config-path", "any-file"], + assertOptions: { + stdout: ".prettierrc", + }, + }, + { + argv: ["--file-info", "any-js-file.js"], + assertOptions: { + stdout(value) { + expect(JSON.parse(value)).toEqual({ + ignored: false, + inferredParser: "babel", + }); + }, + }, + }, + { + argv: [], + runOptions: { isTTY: true }, + assertOptions: { + status: "non-zero", + stdout(value) { + expect(value.includes("-v, --version")).toBe(true); + }, + }, + }, + { + argv: ["--parser", "babel"], + runOptions: { input: "foo" }, + assertOptions: { stdout: "foo;" }, + }, + ]) { + runCli("cli/log-level", ["--log-level", "silent", ...argv], { + ...runOptions, + title: argv.join(" "), + }).test({ + stderr: "", + status: 0, + write: [], + ...assertOptions, + }); + } +}); + +async function runCliWithLogLevel(logLevel, patterns) { + const result = await runCli("cli/log-level", [ + "--log-level", + logLevel, + "--unknown-option", + "--parser", + "unknown-parser", + "not-found.js", + ]); + + expect(result.status).toBe(2); + + const { stderr } = result; + + if (patterns) { + for (const pattern of patterns) { + expect(stderr).toMatch(pattern); + } + } else { + expect(stderr).toMatch(/^\s*$/u); + } +} diff --git a/tests/integration/__tests__/loglevel.js b/tests/integration/__tests__/loglevel.js deleted file mode 100644 index 3fe029ca214d..000000000000 --- a/tests/integration/__tests__/loglevel.js +++ /dev/null @@ -1,140 +0,0 @@ -"use strict"; - -const { default: stripAnsi } = require("../../../vendors/strip-ansi.js"); -const runPrettier = require("../run-prettier.js"); - -test("do not show logs with --loglevel silent", async () => { - await runPrettierWithLogLevel("silent", null); -}); - -test("do not show warnings with --loglevel error", async () => { - await runPrettierWithLogLevel("error", ["[error]"]); -}); - -test("show errors and warnings with --loglevel warn", async () => { - await runPrettierWithLogLevel("warn", ["[error]", "[warn]"]); -}); - -test("show all logs with --loglevel debug", async () => { - await runPrettierWithLogLevel("debug", ["[error]", "[warn]", "[debug]"]); -}); - -describe("--write with --loglevel=silent doesn't log filenames", () => { - runPrettier("cli/write", [ - "--write", - "unformatted.js", - "--loglevel=silent", - ]).test({ - status: 0, - }); -}); - -describe("Should use default level logger to log `--loglevel` error", () => { - runPrettier("cli/loglevel", ["--loglevel", "a-unknown-log-level"]).test({ - status: "non-zero", - write: [], - stdout: "", - }); -}); - -describe("loglevel should not effect information print", () => { - for (const { argv, runOptions, assertOptions } of [ - { - argv: ["--version"], - assertOptions: { - stdout(value) { - expect(value).not.toBe(""); - }, - }, - }, - { - argv: ["--help"], - assertOptions: { - stdout(value) { - expect(value.includes("-v, --version")).toBe(true); - }, - }, - }, - { - argv: ["--help", "write"], - assertOptions: { - stdout(value) { - expect(value.startsWith("-w, --write")).toBe(true); - }, - }, - }, - { - argv: ["--support-info"], - assertOptions: { - stdout(value) { - expect(JSON.parse(value)).toBeDefined(); - }, - }, - }, - { - argv: ["--find-config-path", "any-file"], - assertOptions: { - stdout: ".prettierrc\n", - }, - }, - { - argv: ["--file-info", "any-js-file.js"], - assertOptions: { - stdout(value) { - expect(JSON.parse(value)).toEqual({ - ignored: false, - inferredParser: "babel", - }); - }, - }, - }, - { - argv: [], - runOptions: { isTTY: true }, - assertOptions: { - status: "non-zero", - stdout(value) { - expect(value.includes("-v, --version")).toBe(true); - }, - }, - }, - { - argv: ["--parser", "babel"], - runOptions: { input: "foo" }, - assertOptions: { stdout: "foo;\n" }, - }, - ]) { - runPrettier("cli/loglevel", ["--loglevel", "silent", ...argv], { - ...runOptions, - title: argv.join(" "), - }).test({ - stderr: "", - status: 0, - write: [], - ...assertOptions, - }); - } -}); - -async function runPrettierWithLogLevel(logLevel, patterns) { - const result = await runPrettier("cli/loglevel", [ - "--loglevel", - logLevel, - "--unknown-option", - "--parser", - "unknown-parser", - "not-found.js", - ]); - - expect(result.status).toBe(2); - - const stderr = stripAnsi(result.stderr); - - if (patterns) { - for (const pattern of patterns) { - expect(stderr).toMatch(pattern); - } - } else { - expect(stderr).toMatch(/^\s*$/); - } -} diff --git a/tests/integration/__tests__/mockable.js b/tests/integration/__tests__/mockable.js new file mode 100644 index 000000000000..c4e34e484965 --- /dev/null +++ b/tests/integration/__tests__/mockable.js @@ -0,0 +1,12 @@ +import url from "node:url"; +import { prettierCliMockableEntry } from "../env.js"; + +async function getCliMockable() { + const cli = await import(url.pathToFileURL(prettierCliMockableEntry)); + return cli.mockable; +} + +test("isCI", async () => { + const mockable = await getCliMockable(); + expect(typeof mockable.implementations.isCI()).toBe("boolean"); +}); diff --git a/tests/integration/__tests__/normalize-doc.js b/tests/integration/__tests__/normalize-doc.js deleted file mode 100644 index 62342c62eef3..000000000000 --- a/tests/integration/__tests__/normalize-doc.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -const prettier = require("prettier-local"); -const docBuilders = prettier.doc.builders; -const docUtils = prettier.doc.utils; - -const { normalizeDoc } = docUtils; -const { group, concat, fill } = docBuilders; - -describe("normalizeDoc", () => { - test.each([ - [ - "removes empty strings", - concat(["", "foo", fill(["", "bar", ""]), ""]), - concat(["foo", fill(["bar"])]), - ], - [ - "flattens nested concat", - concat(["foo ", "", concat(["bar ", "", concat(["baz", ""])])]), - concat(["foo bar baz"]), - ], - [ - "flattens nested concat in other docs", - group(concat(["foo ", concat(["bar ", "", concat(["baz", ""])])])), - group(concat(["foo bar baz"])), - ], - [ - "keeps groups", - concat([group("foo"), group("bar"), group("baz")]), - concat([group("foo"), group("bar"), group("baz")]), - ], - [ - "keeps fills", - fill(["foo", fill(["bar", fill(["baz"])])]), - fill(["foo", fill(["bar", fill(["baz"])])]), - ], - ])("%s", (_, doc, expected) => { - const result = normalizeDoc(doc); - - expect(result).toEqual(expected); - }); -}); diff --git a/tests/integration/__tests__/parser-api.js b/tests/integration/__tests__/parser-api.js index b9e69de25d7b..a77483b74d8d 100644 --- a/tests/integration/__tests__/parser-api.js +++ b/tests/integration/__tests__/parser-api.js @@ -1,86 +1,58 @@ -"use strict"; +import prettier from "../../config/prettier-entry.js"; -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); - -test("allows custom parser provided as object", () => { - const output = prettier.format("1", { - parser(text) { - expect(text).toBe("1"); - return { - type: "Literal", - value: 2, - raw: "2", - }; - }, - }); - expect(output).toBe("2"); +const createParsePlugin = (name, parse) => ({ + parsers: { [name]: { parse, astFormat: name } }, + printers: { [name]: { print: () => "printed" } }, }); -test("allows usage of prettier's supported parsers", () => { - const output = prettier.format("foo ( )", { - parser(text, parsers) { - expect(typeof parsers.babel).toBe("function"); - const ast = parsers.babel(text); - ast.program.body[0].expression.callee.name = "bar"; - return ast; - }, +test("parsers should allow omit optional arguments", async () => { + const originalText = "a\r\nb"; + let parseFunctionArguments; + const dummyPlugin = createParsePlugin("__dummy", (...args) => { + parseFunctionArguments = args; + return { parsed: true }; }); - expect(output).toBe("bar();\n"); -}); -test("parsers should allow omit optional arguments", () => { - let parsers; - try { - prettier.format("{}", { - parser(text, builtinParsers) { - parsers = builtinParsers; - }, - }); - } catch { - // noop - } + await prettier.format(originalText, { + plugins: [dummyPlugin], + parser: "__dummy", + }); - expect(typeof parsers.babel).toBe("function"); + // Prettier pass `options` as 2nd and 3rd argument + expect(parseFunctionArguments.length).toBe(3); + expect(parseFunctionArguments[1]).toBe(parseFunctionArguments[2]); + expect(parseFunctionArguments[0]).not.toBe(originalText); + expect(parseFunctionArguments[0]).toBe("a\nb"); + + const [, { plugins }] = parseFunctionArguments; + + const parsers = await Promise.all( + plugins + .flatMap((plugin) => + plugin.parsers + ? Object.entries(plugin.parsers).map(([name, parser]) => [ + name, + parser, + ]) + : [], + ) + // Private parser should not be used by users + .filter(([name]) => !name.startsWith("__")) + .map(async ([name, parser]) => [ + name, + typeof parser === "function" ? await parser() : parser, + ]), + ); + + expect(typeof parsers[0][1].parse).toBe("function"); const code = { graphql: "type A {hero: Character}", - default: "{}", + angular: "<div></div>", }; - for (const [name, parse] of Object.entries(parsers)) { - // Private parser should not be used by users - if (name.startsWith("__")) { - continue; - } - - expect(() => parse(code[name] || code.default)).not.toThrow(); + for (const [name, { parse }] of parsers) { + await expect( + // eslint-disable-next-line require-await + (async () => parse(code[name] ?? "{}"))(), + ).resolves.not.toThrow(); } }); - -test("allows add empty `trailingComments` array", () => { - const output = prettier.format("(foo /* comment */)( )", { - parser(text, parsers) { - const ast = parsers.babel(text); - - // This may happens in this use case https://github.com/prettier/prettier/pull/5497#issuecomment-439841965 - // Simply simulate it - const callExpression = ast.program.body[0].expression; - callExpression.extra = { parenthesized: true }; - callExpression.trailingComments = []; - - return ast; - }, - }); - expect(output).toBe("foo(/* comment */);\n"); -}); - -describe("allows passing a string to resolve a parser", () => { - runPrettier("./custom-parsers/", [ - "--end-of-line", - "lf", - "./custom-rename-input.js", - "--parser", - "./custom-rename-parser", - ]).test({ - status: 0, - }); -}); diff --git a/tests/integration/__tests__/patterns-dirs.js b/tests/integration/__tests__/patterns-dirs.js index 3d8546bc50e7..7cafa6c3edf0 100644 --- a/tests/integration/__tests__/patterns-dirs.js +++ b/tests/integration/__tests__/patterns-dirs.js @@ -1,29 +1,36 @@ -"use strict"; +import fs from "node:fs"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; +import { projectRoot } from "../env.js"; +import jestPathSerializer from "../path-serializer.js"; -const path = require("path"); -const fs = require("fs"); -const runPrettier = require("../run-prettier.js"); -const { projectRoot } = require("../env.js"); +const { __dirname } = createEsmUtils(import.meta); -expect.addSnapshotSerializer(require("../path-serializer.js")); +expect.addSnapshotSerializer(jestPathSerializer); + +const runCliWithoutGitignore = (dir, args, options) => + runCli(dir, [...args, "--ignore-path", ".prettierignore"], options); // ESLint-like behavior +// // https://github.com/prettier/prettier/pull/6639#issuecomment-548949954 // +// Since 3.0: https://github.com/prettier/prettier/pull/15155#issuecomment-1723654981 +// // 1. `prettier dir1 dir2` – prettify all files with supported extensions inside `dir1` and `dir2`. // // 2. `prettier dir1 "dir2/**/*"` – prettify all files with supported extensions inside `dir1` // as well as all files matched by the `dir2/**/*` glob. -// If any of the latter files have unknown extensions – log an error for them. (*) +// Unsupported files are ignored as with `--ignore-unknown`. // // 3. `prettier non-exists-dir "dir2/**/*""` – log an error that `non-exists-dir` resulted in 0 files // and prettify all files matched by the `dir2/**/*` glob. -// If any of the latter files have unknown extensions – log an error for them. (*) +// Unsupported files are ignored as with `--ignore-unknown`. // (Note: ESLint just prints an error and doesn't process anything.) // // 4. `prettier . "dir2/**/*"` – prettify all files with supported extensions in `.` // and all files matched by the `dir2/**/*` glob. -// If any of the latter files have unknown extensions – log an error for them. (*) +// Unsupported files are ignored as with `--ignore-unknown`. // // (*) That error ("No parser could be inferred for file") doesn't affect the error code. @@ -31,14 +38,14 @@ testPatterns("1", ["dir1", "dir2"]); testPatterns("1a - with *.foo plugin", [ "dir1", "dir2", - "--plugin=../../plugins/extensions/plugin", + "--plugin=../../plugins/extensions/plugin.cjs", ]); testPatterns("1b - special characters in dir name", ["dir1", "!dir"], { - stdout: expect.stringMatching(/!dir[/\\]a\.js/), + stdout: expect.stringMatching(/!dir[/\\]a\.js/u), }); -testPatterns("1c", ["dir1", "empty"], { status: 2 }); +testPatterns("1c", ["dir1", "empty"], { status: 1 }); -testPatterns("2", ["dir1", "dir2/**/*"], { status: 1 }); +testPatterns("2", ["dir1", "dir2/**/*"], { status: 2 }); testPatterns("3", ["nonexistent-dir", "dir2/**/*"], { status: 2 }); @@ -54,25 +61,25 @@ describe("Trailing slash", () => { "run in sub dir 1", [".."], { status: 1, stderr: "" }, - "cli/patterns-dirs/dir2" + "cli/patterns-dirs/dir2", ); testPatterns( "run in sub dir 2", ["../"], { status: 1, stderr: "" }, - "cli/patterns-dirs/dir2" + "cli/patterns-dirs/dir2", ); testPatterns( "run in sub dir 3", ["../dir1"], { status: 1, stderr: "" }, - "cli/patterns-dirs/dir2" + "cli/patterns-dirs/dir2", ); testPatterns( "run in sub dir 4", ["../dir1/"], { status: 1, stderr: "" }, - "cli/patterns-dirs/dir2" + "cli/patterns-dirs/dir2", ); }); @@ -93,10 +100,10 @@ testPatterns("Exclude yarn.lock when expanding directories", ["."], { const uppercaseRocksPlugin = path.join( projectRoot, - "tests/config/prettier-plugins/prettier-plugin-uppercase-rocks" + "tests/config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js", ); describe("plugins `.`", () => { - runPrettier("cli/dirs/plugins", [ + runCliWithoutGitignore("cli/dirs/plugins", [ ".", "-l", "--plugin", @@ -108,64 +115,272 @@ describe("plugins `.`", () => { }); }); describe("plugins `*`", () => { - runPrettier("cli/dirs/plugins", [ + runCliWithoutGitignore("cli/dirs/plugins", [ "*", "-l", "--plugin", uppercaseRocksPlugin, ]).test({ write: [], - status: 1, + status: 2, }); }); if (path.sep === "/") { // Don't use snapshots in these tests as they're conditionally executed on non-Windows only. - const base = path.resolve(__dirname, "../cli/patterns-dirs"); + const base = path.resolve(__dirname, "../cli/patterns-backslashes"); + const directoryA = path.join(base, "test-a\\"); + const directoryB = path.join(base, String.raw`test-b\?`); + + fs.rmSync(directoryA, { force: true, recursive: true }); + fs.rmSync(directoryB, { force: true, recursive: true }); + for (const directory of [directoryA, directoryB]) { + fs.mkdirSync(directory); + fs.writeFileSync(path.join(directory, "test.js"), "x"); + } describe("Backslashes in names", () => { - // We can't commit these dirs without causing problems on Windows. + testPatterns( + "", + [String.raw`test-a\/test.js`], + { + stdout: String.raw`test-a\/test.js`, + }, + base, + ); + testPatterns( + "", + ["test-a\\"], + { stdout: String.raw`test-a\/test.js` }, + base, + ); + testPatterns( + "", + ["test-a*/*"], + { stdout: String.raw`test-a\/test.js` }, + base, + ); - beforeAll(() => { - fs.mkdirSync(path.resolve(base, "test-a\\")); - fs.writeFileSync(path.resolve(base, "test-a\\", "test.js"), "x"); - fs.mkdirSync(path.resolve(base, "test-b\\?")); - fs.writeFileSync(path.resolve(base, "test-b\\?", "test.js"), "x"); - }); + testPatterns( + "", + [String.raw`test-b\?/test.js`], + { + stdout: String.raw`test-b\?/test.js`, + }, + base, + ); + testPatterns( + "", + [String.raw`test-b\?`], + { + stdout: String.raw`test-b\?/test.js`, + }, + base, + ); + testPatterns( + "", + ["test-b*/*"], + { stdout: String.raw`test-b\?/test.js` }, + base, + ); + }); +} - afterAll(() => { - fs.unlinkSync(path.resolve(base, "test-a\\", "test.js")); - fs.rmdirSync(path.resolve(base, "test-a\\")); - fs.unlinkSync(path.resolve(base, "test-b\\?", "test.js")); - fs.rmdirSync(path.resolve(base, "test-b\\?")); - }); +function isSymlinkSupported() { + if (process.platform !== "win32") { + return true; + } - testPatterns("", ["test-a\\/test.js"], { stdout: "test-a\\/test.js\n" }); - testPatterns("", ["test-a\\"], { stdout: "test-a\\/test.js\n" }); - testPatterns("", ["test-a*/*"], { stdout: "test-a\\/test.js\n" }); + const target = path.join( + __dirname, + "../cli/patterns-symlinks/test-symlink-feature-detect", + ); + fs.rmSync(target, { force: true, recursive: true }); + fs.mkdirSync(target); + const symlink = path.join(target, "symlink"); + try { + fs.symlinkSync(target, symlink); + } catch { + return false; + } + return fs.lstatSync(symlink).isSymbolicLink(); +} + +(isSymlinkSupported() ? describe : describe.skip)("Ignore symlinks", () => { + const base = path.join(__dirname, "../cli/patterns-symlinks"); + const directoryA = path.join(base, "test-a"); + const directoryB = path.join(base, "test-b"); - testPatterns("", ["test-b\\?/test.js"], { stdout: "test-b\\?/test.js\n" }); - testPatterns("", ["test-b\\?"], { stdout: "test-b\\?/test.js\n" }); - testPatterns("", ["test-b*/*"], { stdout: "test-b\\?/test.js\n" }); + fs.rmSync(directoryA, { force: true, recursive: true }); + fs.rmSync(directoryB, { force: true, recursive: true }); + fs.mkdirSync(directoryA); + fs.mkdirSync(directoryB); + fs.writeFileSync(path.join(directoryA, "a.js"), "x"); + fs.writeFileSync(path.join(directoryB, "b.js"), "x"); + fs.symlinkSync(directoryA, path.join(directoryA, "symlink-to-directory-a")); + fs.symlinkSync(directoryB, path.join(directoryA, "symlink-to-directory-b")); + fs.symlinkSync( + path.join(directoryA, "a.js"), + path.join(directoryA, "symlink-to-file-a"), + ); + fs.symlinkSync( + path.join(directoryB, "b.js"), + path.join(directoryA, "symlink-to-file-b"), + ); + + test("file struct", async () => { + const getFileStruct = async (directory) => + (await fs.promises.readdir(directory, { withFileTypes: true })) + .map((dirent) => ({ + name: dirent.name, + isSymbolicLink: dirent.isSymbolicLink(), + })) + .sort((a, b) => a.name.localeCompare(b.name)); + + expect(await getFileStruct(directoryA)).toMatchInlineSnapshot(` + [ + { + "isSymbolicLink": false, + "name": "a.js", + }, + { + "isSymbolicLink": true, + "name": "symlink-to-directory-a", + }, + { + "isSymbolicLink": true, + "name": "symlink-to-directory-b", + }, + { + "isSymbolicLink": true, + "name": "symlink-to-file-a", + }, + { + "isSymbolicLink": true, + "name": "symlink-to-file-b", + }, + ] + `); + expect(await getFileStruct(directoryB)).toMatchInlineSnapshot(` + [ + { + "isSymbolicLink": false, + "name": "b.js", + }, + ] + `); }); -} + + testPatterns("", ["test-a/*"], { stdout: "test-a/a.js" }, base); + testPatterns( + "", + ["test-a/symlink-to-directory-a"], + { + status: 2, + stdout: "", + stderr: + '[error] Explicitly specified pattern "test-a/symlink-to-directory-a" is a symbolic link.', + }, + base, + ); + testPatterns( + "", + ["test-a/symlink-to-directory-b"], + { + status: 2, + stdout: "", + stderr: + '[error] Explicitly specified pattern "test-a/symlink-to-directory-b" is a symbolic link.', + }, + base, + ); + testPatterns( + "", + ["test-a/symlink-to-file-a"], + { + status: 2, + stdout: "", + stderr: + '[error] Explicitly specified pattern "test-a/symlink-to-file-a" is a symbolic link.', + }, + base, + ); + testPatterns( + "", + ["test-a/symlink-to-file-b"], + { + status: 2, + stdout: "", + stderr: + '[error] Explicitly specified pattern "test-a/symlink-to-file-b" is a symbolic link.', + }, + base, + ); + testPatterns( + "", + ["test-a/symlink-*"], + { + status: 2, + stdout: "", + stderr: + '[error] No files matching the pattern were found: "test-a/symlink-*".', + }, + base, + ); + testPatterns( + "", + ["test-a/*", "test-a/symlink-to-file-b"], + { + status: 2, + stdout: "test-a/a.js", + stderr: + '[error] Explicitly specified pattern "test-a/symlink-to-file-b" is a symbolic link.', + }, + base, + ); + testPatterns( + "", + ["test-a/symlink-to-directory-b/*"], + { stdout: "test-a/symlink-to-directory-b/b.js" }, + base, + ); + + testPatterns( + "", + [ + "test-a/symlink-to-file-b", + "--no-error-on-unmatched-pattern", + "--log-level", + "debug", + ], + { + status: 0, + stdout: "", + stderr: + '[debug] normalized argv: {"":["test-a/symlink-to-file-b"],"cache":false,"color":true,"editorconfig":true,"errorOnUnmatchedPattern":false,"logLevel":"debug","ignorePath":[".prettierignore"],"configPrecedence":"cli-override","debugRepeat":0,"plugins":[],"listDifferent":true,"_":["test-a/symlink-to-file-b"],"__raw":{"_":["test-a/symlink-to-file-b"],"cache":false,"color":true,"editorconfig":true,"error-on-unmatched-pattern":false,"l":true,"log-level":"debug","ignore-path":".prettierignore","config-precedence":"cli-override","debug-repeat":0,"plugin":[]}}' + + "\n" + + '[debug] Skipping pattern "test-a/symlink-to-file-b", as it is a symbolic link.', + }, + base, + ); +}); function testPatterns( namePrefix, cliArgs, expected = {}, - cwd = "cli/patterns-dirs" + cwd = "cli/patterns-dirs", ) { const testName = (namePrefix ? namePrefix + ": " : "") + "prettier " + cliArgs - .map((arg) => (/^[\w./=-]+$/.test(arg) ? arg : `'${arg}'`)) + .map((arg) => (/^[\w./=-]+$/u.test(arg) ? arg : `'${arg}'`)) .join(" "); describe(testName, () => { - runPrettier(cwd, [...cliArgs, "-l"]).test({ + runCliWithoutGitignore(cwd, [...cliArgs, "-l"]).test({ write: [], ...(!("status" in expected) && { stderr: "", status: 1 }), ...expected, diff --git a/tests/integration/__tests__/patterns-glob.js b/tests/integration/__tests__/patterns-glob.js index e69acf18f14a..574d1b693e29 100644 --- a/tests/integration/__tests__/patterns-glob.js +++ b/tests/integration/__tests__/patterns-glob.js @@ -1,9 +1,3 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - /* fixtures-1/ ├─ !file.js @@ -12,13 +6,13 @@ fixtures-1/ */ describe("fixtures-1: Should match all files", () => { - runPrettier("cli/patterns-glob/fixtures-1", ["*.js", "!file.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-1", ["*.js", "!file.js", "-l"]).test({ status: 1, }); }); describe("fixtures-1: Should match files except `a.js`", () => { - runPrettier("cli/patterns-glob/fixtures-1", ["*.js", "!a.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-1", ["*.js", "!a.js", "-l"]).test({ status: 1, }); }); @@ -33,19 +27,19 @@ fixtures-2/ */ describe("fixtures-2: Should match all js files and all supported files in the '!dir.js' directory", () => { - runPrettier("cli/patterns-glob/fixtures-2", ["*.js", "!dir.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-2", ["*.js", "!dir.js", "-l"]).test({ status: 1, }); }); describe("fixtures-2: Should match `a.js` and `!b.js`", () => { - runPrettier("cli/patterns-glob/fixtures-2", ["*.js", "!b.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-2", ["*.js", "!b.js", "-l"]).test({ status: 1, }); }); describe("fixtures-2: Should only match `!b.js`", () => { - runPrettier("cli/patterns-glob/fixtures-2", ["*.js", "!a.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-2", ["*.js", "!a.js", "-l"]).test({ status: 1, }); }); @@ -62,7 +56,7 @@ fixtures-3/ */ describe("fixtures-3: Should match `outside.js`, `dir/inside.js` and `dir/node_modules/in-node_modules.js`", () => { - runPrettier("cli/patterns-glob/fixtures-3", [ + runCli("cli/patterns-glob/fixtures-3", [ "**/*.js", "-l", "--with-node-modules", @@ -72,14 +66,14 @@ describe("fixtures-3: Should match `outside.js`, `dir/inside.js` and `dir/node_m }); describe("fixtures-3: Should only match `outside.js` and `dir/inside.js`", () => { - runPrettier("cli/patterns-glob/fixtures-3", ["**/*.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-3", ["**/*.js", "-l"]).test({ status: 1, }); }); describe("fixtures-3: Should exclude `.svn`", () => { describe("(existing)", () => { - runPrettier("cli/patterns-glob/fixtures-3", [ + runCli("cli/patterns-glob/fixtures-3", [ "*.js", "dir/.svn/in-svn.js", "-l", @@ -89,7 +83,7 @@ describe("fixtures-3: Should exclude `.svn`", () => { }); describe("(nonexisting)", () => { - runPrettier("cli/patterns-glob/fixtures-3", [ + runCli("cli/patterns-glob/fixtures-3", [ "*.js", ".svn/in-svn.js", "-l", @@ -111,13 +105,13 @@ fixtures-4/ */ describe("fixtures-4: Should match `level-1.js`", () => { - runPrettier("cli/patterns-glob/fixtures-4", ["./0/./level-1.js", "-l"]).test({ + runCli("cli/patterns-glob/fixtures-4", ["./0/./level-1.js", "-l"]).test({ status: 1, }); }); describe("fixtures-4: Should match `level-1.js` #2", () => { - runPrettier("cli/patterns-glob/fixtures-4", [ + runCli("cli/patterns-glob/fixtures-4", [ "./0/1/2/../../level-1.js", "-l", ]).test({ @@ -126,7 +120,7 @@ describe("fixtures-4: Should match `level-1.js` #2", () => { }); describe("fixtures-4: Should match `level-1.js` #3", () => { - runPrettier("cli/patterns-glob/fixtures-4", [ + runCli("cli/patterns-glob/fixtures-4", [ "./0/non-exists-dir/2/../../level-1.js", "-l", ]).test({ @@ -135,7 +129,7 @@ describe("fixtures-4: Should match `level-1.js` #3", () => { }); describe("should not ignore file paths contains object prototype keys", () => { - runPrettier("cli/patterns-glob/fixtures-5", [ + runCli("cli/patterns-glob/fixtures-5", [ "./constructor/should-be-formatted.js", "-l", ]).test({ status: 1 }); diff --git a/tests/integration/__tests__/patterns.js b/tests/integration/__tests__/patterns.js index ccf494aaf417..89c3cbf12896 100644 --- a/tests/integration/__tests__/patterns.js +++ b/tests/integration/__tests__/patterns.js @@ -1,11 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("multiple patterns", () => { - runPrettier("cli/patterns", [ + runCli("cli/patterns", [ "directory/**/*.js", "other-directory/**/*.js", "-l", @@ -15,39 +9,31 @@ describe("multiple patterns", () => { }); describe("multiple patterns with non exists pattern", () => { - runPrettier("cli/patterns", [ - "directory/**/*.js", - "non-existent.js", - "-l", - ]).test({ + runCli("cli/patterns", ["directory/**/*.js", "non-existent.js", "-l"]).test({ status: 2, }); }); describe("multiple patterns with ignore nested directories pattern", () => { - runPrettier("cli/patterns", [ - "**/*.js", - "!**/nested-directory/**", - "-l", - ]).test({ + runCli("cli/patterns", ["**/*.js", "!**/nested-directory/**", "-l"]).test({ status: 1, }); }); describe("multiple patterns by with ignore pattern, ignores node_modules by default", () => { - runPrettier("cli/patterns", ["**/*.js", "!directory/**", "-l"]).test({ + runCli("cli/patterns", ["**/*.js", "!directory/**", "-l"]).test({ status: 1, }); }); describe("multiple patterns by with ignore pattern, ignores node_modules by with ./**/*.js", () => { - runPrettier("cli/patterns", ["./**/*.js", "!./directory/**", "-l"]).test({ + runCli("cli/patterns", ["./**/*.js", "!./directory/**", "-l"]).test({ status: 1, }); }); describe("multiple patterns by with ignore pattern, doesn't ignore node_modules with --with-node-modules flag", () => { - runPrettier("cli/patterns", [ + runCli("cli/patterns", [ "**/*.js", "!directory/**", "-l", @@ -59,13 +45,13 @@ describe("multiple patterns by with ignore pattern, doesn't ignore node_modules describe("no errors on empty patterns", () => { // --parser is mandatory if no filepath is passed - runPrettier("cli/patterns", ["--parser", "babel"]).test({ + runCli("cli/patterns", ["--parser", "babel"]).test({ status: 0, }); }); describe("multiple patterns, throw error and exit with non zero code on non existing files", () => { - runPrettier("cli/patterns", [ + runCli("cli/patterns", [ "non-existent.js", "other-non-existent.js", "-l", @@ -73,3 +59,24 @@ describe("multiple patterns, throw error and exit with non zero code on non exis status: 2, }); }); + +describe("file names with special characters", () => { + runCli("cli/patterns-special-characters/square-brackets/", [ + "[with-square-brackets].js", + "-l", + ]).test({ + status: 1, + write: [], + stderr: "", + stdout: "[with-square-brackets].js", + }); + runCli("cli/patterns-special-characters/dots/", [ + "[...with-square-and-dots-brackets].js", + "-l", + ]).test({ + status: 1, + write: [], + stderr: "", + stdout: "[...with-square-and-dots-brackets].js", + }); +}); diff --git a/tests/integration/__tests__/performance-flags.js b/tests/integration/__tests__/performance-flags.js index edac5e6ac8c2..20b9cc662ed7 100644 --- a/tests/integration/__tests__/performance-flags.js +++ b/tests/integration/__tests__/performance-flags.js @@ -1,43 +1,39 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("should not write file or print code when `--debug-benchmark` or `--debug-repeat` found", () => { const assertStderr = (message) => { expect( message.includes( - "'--debug-repeat' option found, running formatWithCursor 2 times" - ) + "'--debug-repeat' found, running formatWithCursor 2 times", + ), ).toBe(true); }; - // Can't test `--debug-benchmark`, since it requires `benchmark` package - runPrettier( + // Can't test `--debug-benchmark`, since it requires `tinybench` package + runCli( "cli/performance-flags", ["--debug-repeat", "2", "--parser", "babel"], - { input: "foo( bar )" } + { input: "foo( bar )" }, ).test({ stderr: assertStderr, status: 0, - stdout: "'--debug-repeat' option found, skipped print code to screen.\n", + stdout: "'--debug-repeat' option found, skipped print code to screen.", write: [], }); // The log level is always `debug` for (const logLevel of ["warn", "error", "debug", "log"]) { - runPrettier( + runCli( "cli/performance-flags", - ["--debug-repeat", "2", "--parser", "babel", "--loglevel", logLevel], - { input: "foo( bar )" } + ["--debug-repeat", "2", "--parser", "babel", "--log-level", logLevel], + { input: "foo( bar )" }, ).test({ stderr: assertStderr, status: 0, - stdout: "'--debug-repeat' option found, skipped print code to screen.\n", + stdout: "'--debug-repeat' option found, skipped print code to screen.", write: [], }); } - runPrettier("cli/performance-flags", [ + runCli("cli/performance-flags", [ "fixture.js", "--debug-repeat", "2", @@ -46,12 +42,11 @@ describe("should not write file or print code when `--debug-benchmark` or `--deb ]).test({ stderr: assertStderr, status: 0, - stdout: - "'--debug-repeat' option found, skipped print code or write files.\n", + stdout: "'--debug-repeat' option found, skipped print code or write files.", write: [], }); - runPrettier("cli/performance-flags", [ + runCli("cli/performance-flags", [ "fixture.js", "--debug-repeat", "2", @@ -61,12 +56,11 @@ describe("should not write file or print code when `--debug-benchmark` or `--deb ]).test({ stderr: assertStderr, status: 0, - stdout: - "'--debug-repeat' option found, skipped print code or write files.\n", + stdout: "'--debug-repeat' option found, skipped print code or write files.", write: [], }); - runPrettier("cli/performance-flags", [ + runCli("cli/performance-flags", [ "fixture.js", "--debug-repeat", "2", @@ -76,8 +70,7 @@ describe("should not write file or print code when `--debug-benchmark` or `--deb ]).test({ stderr: assertStderr, status: 0, - stdout: - "'--debug-repeat' option found, skipped print code or write files.\n", + stdout: "'--debug-repeat' option found, skipped print code or write files.", write: [], }); }); diff --git a/tests/integration/__tests__/piped-output.js b/tests/integration/__tests__/piped-output.js index fdadb0dbbe58..5edeba26bfd4 100644 --- a/tests/integration/__tests__/piped-output.js +++ b/tests/integration/__tests__/piped-output.js @@ -1,20 +1,16 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("output with --check + unformatted differs when piped", () => { - const cli0 = runPrettier( + const cli0 = runCli( "cli/write", ["--write", "--check", "--no-color", "unformatted.js"], - { stdoutIsTTY: true } + { stdoutIsTTY: true }, ).test({ status: 0, }); - const cli1 = runPrettier( + const cli1 = runCli( "cli/write", ["--write", "--check", "--no-color", "unformatted.js"], - { stdoutIsTTY: false } + { stdoutIsTTY: false }, ).test({ status: 0, }); @@ -29,18 +25,18 @@ describe("output with --check + unformatted differs when piped", () => { }); describe("no file diffs with --check + formatted file", () => { - const cli0 = runPrettier( + const cli0 = runCli( "cli/write", ["--write", "--check", "--no-color", "formatted.js"], - { stdoutIsTTY: true } + { stdoutIsTTY: true }, ).test({ status: 0, }); - const cli1 = runPrettier( + const cli1 = runCli( "cli/write", ["--write", "--check", "--no-color", "formatted.js"], - { stdoutIsTTY: false } + { stdoutIsTTY: false }, ).test({ status: 0, }); @@ -56,18 +52,18 @@ describe("no file diffs with --check + formatted file", () => { }); describe("output with --list-different + unformatted differs when piped", () => { - const cli0 = runPrettier( + const cli0 = runCli( "cli/write", ["--write", "--list-different", "--no-color", "unformatted.js"], - { stdoutIsTTY: true } + { stdoutIsTTY: true }, ).test({ status: 0, }); - const cli1 = runPrettier( + const cli1 = runCli( "cli/write", ["--write", "--list-different", "--no-color", "unformatted.js"], - { stdoutIsTTY: false } + { stdoutIsTTY: false }, ).test({ status: 0, }); @@ -82,18 +78,18 @@ describe("output with --list-different + unformatted differs when piped", () => }); describe("no file diffs with --list-different + formatted file", () => { - const cli0 = runPrettier( + const cli0 = runCli( "cli/write", ["--write", "--list-different", "--no-color", "formatted.js"], - { stdoutIsTTY: true } + { stdoutIsTTY: true }, ).test({ status: 0, }); - const cli1 = runPrettier( + const cli1 = runCli( "cli/write", ["--write", "--list-different", "--no-color", "formatted.js"], - { stdoutIsTTY: false } + { stdoutIsTTY: false }, ).test({ status: 0, }); diff --git a/tests/integration/__tests__/plugin-api-embed.js b/tests/integration/__tests__/plugin-api-embed.js new file mode 100644 index 000000000000..ad8510bb6b16 --- /dev/null +++ b/tests/integration/__tests__/plugin-api-embed.js @@ -0,0 +1,92 @@ +import prettier from "../../config/prettier-entry.js"; + +const { + doc: { + builders: { hardline }, + }, + format, +} = prettier; + +function makePlugin(withOutdatedApi = false) { + return { + parsers: { + // parsers leak across tests, so the name needs to be unique + [withOutdatedApi ? "baz-parser-outdated" : "baz-parser"]: { + parse: (text) => ({ + type: "root", + lines: text + .trim() + .split("\n") + .map((line) => ({ + type: line.startsWith("{") ? "json" : "plain", + text: line, + })), + }), + astFormat: "baz-ast", + }, + }, + printers: { + "baz-ast": { + print(path, options, print) { + const { type, text } = path.getValue(); + switch (type) { + case "root": + return path.map(print, "lines"); + case "json": + case "plain": + return [text, hardline]; + } + }, + embed: withOutdatedApi + ? (path, print, textToDoc) => { + const { type, text } = path.getValue(); + if (type === "json") { + return [ + textToDoc(text, { + parser: "json", + printWidth: Number.POSITIVE_INFINITY, + }), + hardline, + ]; + } + } + : (path) => { + const { type, text } = path.getValue(); + if (type === "json") { + return async (textToDoc) => [ + await textToDoc(text, { + parser: "json", + printWidth: Number.POSITIVE_INFINITY, + }), + hardline, + ]; + } + }, + }, + }, + }; +} + +const input = `abcdef +{ "foo": "bar"} +1234`; + +describe("embed API in plugins", () => { + test("with new signature should work", async () => { + expect( + await format(input, { + plugins: [makePlugin()], + parser: "baz-parser", + }), + ).toMatchSnapshot(); + }); + + test("with outdated signature should cause error", async () => { + await expect( + format(input, { + plugins: [makePlugin(true)], + parser: "baz-parser-outdated", + }), + ).rejects.toThrowErrorMatchingSnapshot(); + }); +}); diff --git a/tests/integration/__tests__/plugin-cache.js b/tests/integration/__tests__/plugin-cache.js new file mode 100644 index 000000000000..8fdc62dbee14 --- /dev/null +++ b/tests/integration/__tests__/plugin-cache.js @@ -0,0 +1,21 @@ +import prettier from "../../config/prettier-entry.js"; + +// #13235 +test("Plugin instance should not cached", async () => { + expect([ + await prettier.format(".", { + plugins: [ + { parsers: { baz: { parse: () => ({}), astFormat: "baz-ast" } } }, + { printers: { "baz-ast": { print: () => "1" } } }, + ], + parser: "baz", + }), + await prettier.format(".", { + plugins: [ + { parsers: { baz: { parse: () => ({}), astFormat: "baz-ast" } } }, + { printers: { "baz-ast": { print: () => "2" } } }, + ], + parser: "baz", + }), + ]).toEqual(["1", "2"]); +}); diff --git a/tests/integration/__tests__/plugin-default-options.js b/tests/integration/__tests__/plugin-default-options.js index 31e28e85e2f7..eca10383c352 100644 --- a/tests/integration/__tests__/plugin-default-options.js +++ b/tests/integration/__tests__/plugin-default-options.js @@ -1,17 +1,13 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("plugin default options should work", () => { - runPrettier( + runCli( "plugins/defaultOptions", [ "--stdin-filepath", "example.foo", - "--plugin=./plugin", + "--plugin=./plugin.cjs", "--no-editorconfig", ], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: JSON.stringify({ tabWidth: 8, @@ -24,10 +20,15 @@ describe("plugin default options should work", () => { }); describe("overriding plugin default options should work", () => { - runPrettier( + runCli( "plugins/defaultOptions", - ["--stdin-filepath", "example.foo", "--plugin=./plugin", "--tab-width=4"], - { input: "hello-world" } + [ + "--stdin-filepath", + "example.foo", + "--plugin=./plugin.cjs", + "--tab-width=4", + ], + { input: "hello-world" }, ).test({ stdout: JSON.stringify({ tabWidth: 4, diff --git a/tests/integration/__tests__/plugin-extensions.js b/tests/integration/__tests__/plugin-extensions.js index d9ab5a6f13f7..34ac94d3b7dc 100644 --- a/tests/integration/__tests__/plugin-extensions.js +++ b/tests/integration/__tests__/plugin-extensions.js @@ -1,13 +1,8 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); -const EOL = "\n"; - describe("uses 'extensions' from languages to determine parser", () => { - runPrettier("plugins/extensions", ["*.foo", "--plugin=./plugin"], { + runCli("plugins/extensions", ["*.foo", "--plugin=./plugin.cjs"], { ignoreLineEndings: true, }).test({ - stdout: "!contents" + EOL, + stdout: "!contents", stderr: "", status: 0, write: [], diff --git a/tests/integration/__tests__/plugin-flush-line-suffix.js b/tests/integration/__tests__/plugin-flush-line-suffix.js index 7487783fd151..183a1f0c98fd 100644 --- a/tests/integration/__tests__/plugin-flush-line-suffix.js +++ b/tests/integration/__tests__/plugin-flush-line-suffix.js @@ -1,9 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("flush all line-suffix content", () => { - runPrettier("plugins/flushLineSuffix", ["*.foo", "--plugin=./plugin"], { + runCli("plugins/flushLineSuffix", ["*.foo", "--plugin=./plugin.cjs"], { ignoreLineEndings: true, }).test({ stdout: "contents", diff --git a/tests/integration/__tests__/plugin-options-string.js b/tests/integration/__tests__/plugin-options-string.js index dea3b778a4e2..0107883c5435 100644 --- a/tests/integration/__tests__/plugin-options-string.js +++ b/tests/integration/__tests__/plugin-options-string.js @@ -1,21 +1,17 @@ -"use strict"; - -const snapshotDiff = require("snapshot-diff"); -const runPrettier = require("../run-prettier.js"); - +import snapshotDiff from "snapshot-diff"; test("show external options with `--help`", async () => { - const originalStdout = await runPrettier("plugins/options-string", ["--help"]) + const originalStdout = await runCli("plugins/options-string", ["--help"]) .stdout; - const pluggedStdout = await runPrettier("plugins/options-string", [ + const pluggedStdout = await runCli("plugins/options-string", [ "--help", - "--plugin=./plugin", + "--plugin=./plugin.cjs", ]).stdout; expect(snapshotDiff(originalStdout, pluggedStdout)).toMatchSnapshot(); }); describe("show detailed external option with `--help foo-string`", () => { - runPrettier("plugins/options-string", [ - "--plugin=./plugin", + runCli("plugins/options-string", [ + "--plugin=./plugin.cjs", "--help", "foo-string", ]).test({ @@ -24,16 +20,16 @@ describe("show detailed external option with `--help foo-string`", () => { }); describe("external options from CLI should work", () => { - runPrettier( + runCli( "plugins/options-string", [ - "--plugin=./plugin", + "--plugin=./plugin.cjs", "--stdin-filepath", "example.foo", "--foo-string", "baz", ], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: "foo:baz", stderr: "", @@ -43,10 +39,10 @@ describe("external options from CLI should work", () => { }); describe("external options from config file should work", () => { - runPrettier( + runCli( "plugins/options-string", ["--config=./config.json", "--stdin-filepath", "example.foo"], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: "foo:baz", stderr: "", @@ -56,15 +52,13 @@ describe("external options from config file should work", () => { }); describe("Non exists plugin", () => { - runPrettier( + runCli( "plugins/options-string", ["--plugin=--invalid--", "--stdin-filepath", "example.foo"], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: "", - stderr: expect.stringMatching( - /Cannot (?:resolve|find) module '--invalid--' from/ - ), + stderr: expect.stringMatching(/Cannot find package '--invalid--'/u), status: 1, write: [], }); diff --git a/tests/integration/__tests__/plugin-options.js b/tests/integration/__tests__/plugin-options.js index 4e9f699981fc..9f7b1b0fb2a8 100644 --- a/tests/integration/__tests__/plugin-options.js +++ b/tests/integration/__tests__/plugin-options.js @@ -1,22 +1,17 @@ -"use strict"; - -const snapshotDiff = require("snapshot-diff"); -const runPrettier = require("../run-prettier.js"); - +import snapshotDiff from "snapshot-diff"; test("show external options with `--help`", async () => { - const originalStdout = await runPrettier("plugins/options", ["--help"]) - .stdout; - const pluggedStdout = await runPrettier("plugins/options", [ + const originalStdout = await runCli("plugins/options", ["--help"]).stdout; + const pluggedStdout = await runCli("plugins/options", [ "--help", - "--plugin=./plugin", + "--plugin=./plugin.cjs", ]).stdout; expect(snapshotDiff(originalStdout, pluggedStdout)).toMatchSnapshot(); }); describe("show detailed external option with `--help foo-option`", () => { - runPrettier("plugins/options", [ - "--plugin=./plugin", + runCli("plugins/options", [ + "--plugin=./plugin.cjs", "--help", "foo-option", ]).test({ @@ -25,26 +20,24 @@ describe("show detailed external option with `--help foo-option`", () => { }); describe("include plugin's parsers to the values of the `parser` option`", () => { - runPrettier("plugins/options", [ - "--plugin=./plugin", - "--help", - "parser", - ]).test({ - status: 0, - }); + runCli("plugins/options", ["--plugin=./plugin.cjs", "--help", "parser"]).test( + { + status: 0, + }, + ); }); describe("external options from CLI should work", () => { - runPrettier( + runCli( "plugins/options", [ - "--plugin=./plugin", + "--plugin=./plugin.cjs", "--stdin-filepath", "example.foo", "--foo-option", "baz", ], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: "foo:baz", stderr: "", @@ -54,10 +47,10 @@ describe("external options from CLI should work", () => { }); describe("external options from config file should work", () => { - runPrettier( + runCli( "plugins/options", ["--config=./config.json", "--stdin-filepath", "example.foo"], - { input: "hello-world" } + { input: "hello-world" }, ).test({ stdout: "foo:baz", stderr: "", diff --git a/tests/integration/__tests__/plugin-override-buitin-plugins.js b/tests/integration/__tests__/plugin-override-buitin-plugins.js new file mode 100644 index 000000000000..9bc08ff03073 --- /dev/null +++ b/tests/integration/__tests__/plugin-override-buitin-plugins.js @@ -0,0 +1,17 @@ +import prettier from "../../config/prettier-entry.js"; +import createPlugin from "../../config/utils/create-plugin.cjs"; + +test("plugins can override builtin plugins", async () => { + const outputWithoutPlugin = await prettier.format("foo()", { + parser: "babel", + }); + const outputWithPlugin = await prettier.format("foo()", { + parser: "babel", + plugins: [ + createPlugin({ name: "babel", print: () => "fake-babel-output" }), + ], + }); + + expect(outputWithoutPlugin).not.toBe(outputWithPlugin); + expect(outputWithPlugin).toBe("fake-babel-output\n"); +}); diff --git a/tests/integration/__tests__/plugin-precedence.js b/tests/integration/__tests__/plugin-precedence.js index e22985324579..570a9dd19317 100644 --- a/tests/integration/__tests__/plugin-precedence.js +++ b/tests/integration/__tests__/plugin-precedence.js @@ -1,14 +1,10 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("json-stringify takes precedence over json for package.json", () => { - runPrettier("plugins", ["--stdin-filepath=package.json"], { + runCli("plugins", ["--stdin-filepath=package.json"], { input: '{ "a": "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong" }', }).test({ stdout: - '{\n "a": "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong"\n}\n', + '{\n "a": "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong"\n}', stderr: "", status: 0, write: [], diff --git a/tests/integration/__tests__/plugin-preprocess.js b/tests/integration/__tests__/plugin-preprocess.js index 2d0457b19675..9affc78c664b 100644 --- a/tests/integration/__tests__/plugin-preprocess.js +++ b/tests/integration/__tests__/plugin-preprocess.js @@ -1,13 +1,8 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); -const EOL = "\n"; - describe("parser preprocess function is used to reshape input text", () => { - runPrettier("plugins/preprocess", ["*.foo", "--plugin=./plugin"], { + runCli("plugins/preprocess", ["*.foo", "--plugin=./plugin.cjs"], { ignoreLineEndings: true, }).test({ - stdout: "preprocessed:contents" + EOL, + stdout: "preprocessed:contents", stderr: "", status: 0, write: [], diff --git a/tests/integration/__tests__/plugin-resolution.js b/tests/integration/__tests__/plugin-resolution.js index da596eb2600b..bfbf163c32cc 100644 --- a/tests/integration/__tests__/plugin-resolution.js +++ b/tests/integration/__tests__/plugin-resolution.js @@ -1,140 +1,10 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); -const EOL = "\n"; - -describe("automatically loads 'prettier-plugin-*'", () => { - runPrettier("plugins/automatic", ["file.txt", "--parser=bar"]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads '@prettier/plugin-*'", () => { - runPrettier("plugins/automatic", ["file.txt", "--parser=foo"]).test({ - stdout: "foo+contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads '@<name>/prettier-plugin-*'", () => { - runPrettier("plugins/automatic", ["file.txt", "--parser=foobar"]).test({ - stdout: "foobar+contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads 'prettier-plugin-*' from --plugin-search-dir (same as autoload dir)", () => { - runPrettier("plugins/automatic", [ - "file.txt", - "--parser=foo", - "--plugin-search-dir=.", - ]).test({ - stdout: "foo+contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads '@prettier/plugin-*' from --plugin-search-dir (same as autoload dir)", () => { - runPrettier("plugins/automatic", [ - "file.txt", - "--parser=bar", - "--plugin-search-dir=.", - ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads '@<name>/prettier-plugin-*' from --plugin-search-dir (same as autoload dir)", () => { - runPrettier("plugins/automatic", [ - "file.txt", - "--parser=foobar", - "--plugin-search-dir=.", - ]).test({ - stdout: "foobar+contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads 'prettier-plugin-*' from --plugin-search-dir (different to autoload dir)", () => { - runPrettier("plugins", [ - "automatic/file.txt", - "--parser=foo", - "--plugin-search-dir=automatic", - ]).test({ - stdout: "foo+contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("automatically loads '@prettier/plugin-*' from --plugin-search-dir (different to autoload dir)", () => { - runPrettier("plugins", [ - "automatic/file.txt", - "--parser=bar", - "--plugin-search-dir=automatic", - ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("does not crash when --plugin-search-dir does not contain node_modules", () => { - runPrettier( - "plugins/extensions", - [ - "file.foo", - "--end-of-line", - "lf", - "--plugin=./plugin", - "--plugin-search-dir=.", - ], - { ignoreLineEndings: true } - ).test({ - stdout: "!contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("crashes when one of --plugin-search-dir does not exist", () => { - runPrettier("plugins/automatic", [ - "file.txt", - "--parser=foo", - "--plugin-search-dir=non-existing-dir", - "--plugin-search-dir=.", - ]).test({ - stdout: "", - stderr: "[error] non-existing-dir does not exist or is not a directory\n", - status: 1, - write: [], - }); -}); - describe("loads --plugin by its relative path", () => { - runPrettier("plugins", [ + runCli("plugins", [ "automatic/file.txt", "--parser=bar", "--plugin=./automatic/node_modules/prettier-plugin-bar/index.js", ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, + stdout: "content from `prettier-plugin-bar` package + contents", stderr: "", status: 0, write: [], @@ -142,51 +12,38 @@ describe("loads --plugin by its relative path", () => { }); describe("loads --plugin by its relative path without leading ./", () => { - runPrettier("plugins", [ + runCli("plugins", [ "automatic/file.txt", "--parser=bar", "--plugin=automatic/node_modules/prettier-plugin-bar/index.js", ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, + stdout: "content from `prettier-plugin-bar` package + contents", stderr: "", status: 0, write: [], }); }); -describe("loads --plugin by relative path to its directory (assuming index.js)", () => { - runPrettier("plugins", [ - "automatic/file.txt", - "--parser=bar", - "--plugin=./automatic/node_modules/prettier-plugin-bar", - ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, - stderr: "", - status: 0, - write: [], - }); -}); - -describe("loads --plugin by relative path to its directory without leading ./ (assuming index.js)", () => { - runPrettier("plugins", [ - "automatic/file.txt", - "--parser=bar", - "--plugin=automatic/node_modules/prettier-plugin-bar", +describe("loads --plugin by package name", () => { + runCli("plugins/automatic", [ + "file.txt", + "--parser=foobar", + "--plugin=@user/prettier-plugin-foobar", ]).test({ - stdout: "content from `prettier-plugin-bar` package + contents" + EOL, + stdout: "foobar+contents", stderr: "", status: 0, write: [], }); }); -describe("loads --plugin by filename without leading ./ and ext, should resolve to file, not package", () => { - runPrettier("plugins/automatic", [ +describe("loads --plugin by filename without leading ./, should resolve to file, not package", () => { + runCli("plugins/automatic", [ "file.txt", - "--parser=bar", - "--plugin=prettier-plugin-bar", + "--parser=baz", + "--plugin=prettier-plugin-baz.js", ]).test({ - stdout: "content from `prettier-plugin-bar.js` file + contents" + EOL, + stdout: "content from `prettier-plugin-baz.js` file + contents", stderr: "", status: 0, write: [], @@ -194,81 +51,25 @@ describe("loads --plugin by filename without leading ./ and ext, should resolve }); describe("loads --plugin by bespoke plugin name (assuming it is installed in cwd)", () => { - runPrettier("plugins/bespoke", [ + runCli("plugins/bespoke", [ "../automatic/file.txt", "--parser=bespoke", - "--plugin=@company/prettier-plugin-bespoke", + "--plugin=@company/prettier-plugin-bespoke/main.js", ]).test({ - stdout: "bespoke+contents" + EOL, + stdout: "bespoke+contents", stderr: "", status: 0, write: [], }); }); -test("--no-plugin-search", async () => { - async function getParser(args = []) { - const { stdout } = await runPrettier("plugins/automatic", [ - "--file-info=file.foo", - ...args, - ]); - return JSON.parse(stdout).inferredParser; - } - - expect(await getParser()).toBe("foo"); - expect(await getParser(["--plugin-search-dir=."])).toBe("foo"); - expect(await getParser(["--no-plugin-search"])).toBeNull(); -}); - -test("--no-plugin-search still allow use --plugin", async () => { - const args = ["file.txt", "--parser=bar"]; - const { stdout: stdoutWithoutPlugin } = await runPrettier( - "plugins/automatic", - args - ); - const argsWithPlugin = [...args, "--plugin=./prettier-plugin-bar.js"]; - const { stdout: stdoutWithPlugin } = await runPrettier( - "plugins/automatic", - argsWithPlugin - ); - const { stdout: stdoutWithoutPluginAndNoPluginSearch } = await runPrettier( - "plugins/automatic", - [...args, "--no-plugin-search"] - ); - const { stdout: stdoutWithPluginButNoPluginSearch } = await runPrettier( - "plugins/automatic", - [...argsWithPlugin, "--no-plugin-search"] - ); - - expect(stdoutWithoutPlugin).not.toBe(stdoutWithPlugin); - expect(stdoutWithoutPluginAndNoPluginSearch).toBe(""); - expect(stdoutWithPlugin).toBe(stdoutWithPluginButNoPluginSearch); -}); - -test("--no-plugin-search together with --plugin-search-dir", async () => { - const result1 = await runPrettier("plugins/automatic", [ - "--no-plugin-search", - "--plugin-search-dir", - ]); - const result2 = await runPrettier("plugins/automatic", [ - "--no-plugin-search", - "--plugin-search-dir=foo", - ]); - const result3 = await runPrettier("plugins/automatic", [ - "--no-plugin-search", - "--plugin-search-dir=foo", - "--plugin-search-dir=bar", - ]); - - expect(result1).toMatchInlineSnapshot(` - { - "status": 1, - "stderr": "[error] Cannot use --no-plugin-search and --plugin-search-dir together. - ", - "stdout": "", - "write": [], - } - `); - expect(result2).toEqual(result1); - expect(result3).toEqual(result1); +describe.only("support absolute path in config file", () => { + runCli("cli/config/plugins/absolute-path", ["--parser=uppercase-rocks"], { + input: "prettier should be uppercase", + }).test({ + stdout: "PRETTIER SHOULD BE UPPERCASE", + stderr: "", + status: 0, + write: [], + }); }); diff --git a/tests/integration/__tests__/plugin-virtual-directory.js b/tests/integration/__tests__/plugin-virtual-directory.js deleted file mode 100644 index 280562d4b4d1..000000000000 --- a/tests/integration/__tests__/plugin-virtual-directory.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -describe("plugin search should not crash when prettier isn't inside a directory", () => { - runPrettier( - "plugins/virtualDirectory", - ["--stdin-filepath", "example.js", "--plugin-search-dir=."], - { input: "" } - ).test({ - stdout: "", - stderr: "", - status: 0, - write: [], - }); -}); diff --git a/tests/integration/__tests__/plugins.js b/tests/integration/__tests__/plugins.js new file mode 100644 index 000000000000..5ee34bf2c495 --- /dev/null +++ b/tests/integration/__tests__/plugins.js @@ -0,0 +1,32 @@ +import url from "node:url"; +import prettier from "../../config/prettier-entry.js"; + +const pluginUrl = new URL( + "../../config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js", + import.meta.url, +); + +test("plugins", async () => { + const input = "foo"; + const expectedOutput = "FOO\n"; + + await expect( + prettier.format(input, { + parser: "uppercase-rocks", + plugins: [pluginUrl], + }), + ).resolves.toEqual(expectedOutput); + + await expect( + prettier.format(input, { + parser: "uppercase-rocks", + plugins: [pluginUrl.href], + }), + ).resolves.toEqual(expectedOutput); + await expect( + prettier.format(input, { + parser: "uppercase-rocks", + plugins: [url.fileURLToPath(pluginUrl)], + }), + ).resolves.toEqual(expectedOutput); +}); diff --git a/tests/integration/__tests__/print-code.js b/tests/integration/__tests__/print-code.js new file mode 100644 index 000000000000..f29741a3a488 --- /dev/null +++ b/tests/integration/__tests__/print-code.js @@ -0,0 +1,8 @@ +describe("Line breaking after filepath with errors", () => { + runCli("cli/print-code", ["./ignored.js"], { + stdoutIsTTY: true, + }).test({ status: 0, write: [], stderr: "" }); + runCli("cli/print-code", ["./not-ignored.js"], { + stdoutIsTTY: true, + }).test({ status: 0, write: [], stderr: "" }); +}); diff --git a/tests/integration/__tests__/print-doc-to-string.js b/tests/integration/__tests__/print-doc-to-string.js new file mode 100644 index 000000000000..deb2987d693b --- /dev/null +++ b/tests/integration/__tests__/print-doc-to-string.js @@ -0,0 +1,38 @@ +import prettier from "../../config/prettier-entry.js"; + +const { printDocToString } = prettier.doc.printer; + +test("Throw error on invalid doc", () => { + const printDocToStringOptions = { printWidth: 80, tabWidth: 2 }; + for (const doc of [ + true, + false, + 0, + 1, + Number.NaN, + Number.POSITIVE_INFINITY, + 1n, + Symbol("symbol"), + function () {}, + () => {}, + {}, + undefined, + null, + Promise.resolve("1"), + (function* () {})(), + /regexp/gu, + new Date(), + new Error("error"), + Buffer.from("buffer"), + new Uint8Array(2), + { type: "invalid-type" }, + { "without-type": true }, + ]) { + expect(() => + printDocToString(doc, printDocToStringOptions), + ).toThrowErrorMatchingSnapshot(); + expect(() => + printDocToString([doc], printDocToStringOptions), + ).toThrowErrorMatchingSnapshot(); + } +}); diff --git a/tests/integration/__tests__/printer-and-parser.js b/tests/integration/__tests__/printer-and-parser.js new file mode 100644 index 000000000000..811ab0ecff54 --- /dev/null +++ b/tests/integration/__tests__/printer-and-parser.js @@ -0,0 +1,45 @@ +import prettier from "../../config/prettier-entry.js"; + +test("Should use printer and parser from the same plugin", async () => { + const createPlugin = (name) => ({ + name, + parsers: { + foo: { + parse: () => ({ parsedBy: name }), + astFormat: "foo", + }, + }, + printers: { + foo: { + print: ({ node }) => + JSON.stringify({ parsedBy: node.parsedBy, printedBy: name }), + }, + }, + }); + + const pluginA = createPlugin("plugin A"); + const pluginB = createPlugin("plugin B"); + + const result = JSON.parse( + await prettier.format("_", { plugins: [pluginA, pluginB], parser: "foo" }), + ); + expect(result).toEqual({ parsedBy: "plugin B", printedBy: "plugin B" }); +}); + +test("Should not apply default options from unused plugin", async () => { + const pluginA = { defaultOptions: { tabWidth: 10 } }; + const pluginB = { + parsers: { foo: { parse: () => ({}), astFormat: "foo" } }, + printers: { + foo: { + print: (path, options) => + JSON.stringify({ tabWidth: options.tabWidth }), + }, + }, + }; + + const result = JSON.parse( + await prettier.format("_", { plugins: [pluginA, pluginB], parser: "foo" }), + ); + expect(result).toEqual({ tabWidth: 2 }); +}); diff --git a/tests/integration/__tests__/resolve-config-file.js b/tests/integration/__tests__/resolve-config-file.js index 274cc7b129b0..aa3d922caf73 100644 --- a/tests/integration/__tests__/resolve-config-file.js +++ b/tests/integration/__tests__/resolve-config-file.js @@ -1,15 +1,25 @@ -"use strict"; - -const path = require("path"); - -const prettier = require("prettier-local"); +import url from "node:url"; +import prettier from "../../config/prettier-entry.js"; test("API resolveConfigFile", async () => { const result = await prettier.resolveConfigFile(); - expect(result).toEqual(path.join(__dirname, "../../../.prettierrc")); + expect(result).toEqual( + url.fileURLToPath(new URL("../../../.prettierrc", import.meta.url)), + ); }); -test("API resolveConfigFile.sync", () => { - const result = prettier.resolveConfigFile.sync(); - expect(result).toEqual(path.join(__dirname, "../../../.prettierrc")); +test("API resolveConfigFile accepts path or URL", async () => { + const fileUrl = new URL("../cli/config/filepath/foo.js", import.meta.url); + const expectedConfigFilePath = url.fileURLToPath( + new URL("./.prettierrc", fileUrl), + ); + + const resultByUrl = await prettier.resolveConfigFile(fileUrl); + const resultByUrlHref = await prettier.resolveConfigFile(fileUrl.href); + const resultByPath = await prettier.resolveConfigFile( + url.fileURLToPath(fileUrl), + ); + expect(resultByUrl).toEqual(expectedConfigFilePath); + expect(resultByUrlHref).toEqual(expectedConfigFilePath); + expect(resultByPath).toEqual(expectedConfigFilePath); }); diff --git a/tests/integration/__tests__/schema.js b/tests/integration/__tests__/schema.js index 2fdddde97521..31f8b51dbdec 100644 --- a/tests/integration/__tests__/schema.js +++ b/tests/integration/__tests__/schema.js @@ -1,8 +1,9 @@ -"use strict"; +import { generateSchemaData } from "../../../scripts/utils/generate-schema.js"; +import prettier from "../../config/prettier-entry.js"; -const prettier = require("prettier-local"); -const generateSchema = require("../../../scripts/utils/generate-schema.js"); +test("schema", async () => { + const { options } = await prettier.getSupportInfo(); + const schema = generateSchemaData(options); -test("schema", () => { - expect(generateSchema(prettier.getSupportInfo().options)).toMatchSnapshot(); + expect(schema).toMatchSnapshot(); }); diff --git a/tests/integration/__tests__/skip-folders.js b/tests/integration/__tests__/skip-folders.js index fda9a2efb7ec..43d43fa074b4 100644 --- a/tests/integration/__tests__/skip-folders.js +++ b/tests/integration/__tests__/skip-folders.js @@ -1,22 +1,13 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("skips folders in glob", () => { - runPrettier("cli/skip-folders", ["**/*", "-l"]).test({ + runCli("cli/skip-folders", ["**/*", "-l"]).test({ status: 1, stderr: "", }); }); describe("skip folders passed specifically", () => { - runPrettier("cli/skip-folders", [ - "a", - "a/file.js", - "b", - "b/file.js", - "-l", - ]).test({ status: 1, stderr: "" }); + runCli("cli/skip-folders", ["a", "a/file.js", "b", "b/file.js", "-l"]).test({ + status: 1, + stderr: "", + }); }); diff --git a/tests/integration/__tests__/special-characters-in-path.js b/tests/integration/__tests__/special-characters-in-path.js new file mode 100644 index 000000000000..9e3710a8d5b4 --- /dev/null +++ b/tests/integration/__tests__/special-characters-in-path.js @@ -0,0 +1,30 @@ +import jestPathSerializer from "../path-serializer.js"; + +expect.addSnapshotSerializer(jestPathSerializer); + +describe("ignores file name contains emoji", () => { + runCli("cli/special-characters-in-path/ignore-emoji", ["**/*.js", "-l"]).test( + { + status: 1, + }, + ); +}); + +describe("stdin", () => { + runCli( + "cli/special-characters-in-path/ignore-emoji", + ["--stdin-filepath", "ignored/我的样式.css"], + { + input: ".name { display: none; }", + }, + ).test({ + status: 0, + }); +}); + +// This is a failed test for #15188 +describe("square-brackets-and-dash", () => { + runCli("cli/special-characters-in-path/square-brackets-and-dash", [ + "test", + ]).test({}); +}); diff --git a/tests/integration/__tests__/stdin-filepath.js b/tests/integration/__tests__/stdin-filepath.js index c0778c55b852..cd1bee759e0a 100644 --- a/tests/integration/__tests__/stdin-filepath.js +++ b/tests/integration/__tests__/stdin-filepath.js @@ -1,57 +1,50 @@ -"use strict"; - -const { isCI } = require("ci-info"); -const { outdent } = require("outdent"); -const runPrettier = require("../run-prettier.js"); +import { isCI } from "ci-info"; +import { outdent } from "outdent"; describe("format correctly if stdin content compatible with stdin-filepath", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "abc.css"], - { input: ".name { display: none; }" } // css + { input: ".name { display: none; }" }, // css ).test({ status: 0, }); }); describe("throw error if stdin content incompatible with stdin-filepath", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "abc.js"], - { input: ".name { display: none; }" } // css + { input: ".name { display: none; }" }, // css ).test({ status: "non-zero", }); }); describe("gracefully handle stdin-filepath with nonexistent directory", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "definitely/nonexistent/path.css"], - { input: ".name { display: none; }" } // css + { input: ".name { display: none; }" }, // css ).test({ status: 0, }); }); describe("apply editorconfig for stdin-filepath with nonexistent file", () => { - runPrettier( - "cli", - ["--stdin-filepath", "config/editorconfig/nonexistent.js"], - { - input: outdent` - function f() { - console.log("should be indented with a tab"); - } - `, // js - } - ).test({ + runCli("cli", ["--stdin-filepath", "config/editorconfig/nonexistent.js"], { + input: outdent` + function f() { + console.log("should be indented with a tab"); + } + `, // js + }).test({ status: 0, }); }); describe("apply editorconfig for stdin-filepath with nonexistent directory", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "config/editorconfig/nonexistent/one/two/three.js"], { @@ -60,14 +53,14 @@ describe("apply editorconfig for stdin-filepath with nonexistent directory", () console.log("should be indented with a tab"); } `, // js - } + }, ).test({ status: 0, }); }); describe("apply editorconfig for stdin-filepath with a deep path", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "config/editorconfig/" + "a/".repeat(30) + "three.js"], { @@ -76,7 +69,7 @@ describe("apply editorconfig for stdin-filepath with a deep path", () => { console.log("should be indented with a tab"); } `, // js - } + }, ).test({ status: 0, }); @@ -89,11 +82,11 @@ if (isCI) { console.log("should be indented with a tab"); } `; - runPrettier("cli", ["--stdin-filepath", "/foo.js"], { + runCli("cli", ["--stdin-filepath", "/foo.js"], { input: code, // js }).test({ status: 0, - stdout: code + "\n", + stdout: code, stderr: "", write: [], }); @@ -101,7 +94,7 @@ if (isCI) { } describe("apply editorconfig for stdin-filepath with a deep path", () => { - runPrettier( + runCli( "cli", ["--stdin-filepath", "config/editorconfig/" + "a/".repeat(30) + "three.js"], { @@ -110,14 +103,14 @@ describe("apply editorconfig for stdin-filepath with a deep path", () => { console.log("should be indented with a tab"); } `, // js - } + }, ).test({ status: 0, }); }); describe("don’t apply editorconfig outside project for stdin-filepath with nonexistent directory", () => { - runPrettier( + runCli( "cli", [ "--stdin-filepath", @@ -129,17 +122,28 @@ describe("don’t apply editorconfig outside project for stdin-filepath with non console.log("should be indented with 2 spaces"); } `, // js - } + }, ).test({ status: 0, }); }); describe("output file as-is if stdin-filepath matched patterns in ignore-path", () => { - runPrettier("cli/stdin-ignore", ["--stdin-filepath", "ignore/example.js"], { + runCli("cli/stdin-ignore", ["--stdin-filepath", "ignore/example.js"], { input: "hello_world( );", }).test({ stdout: "hello_world( );", status: 0, }); }); + +describe("Should format stdin even if it's empty", () => { + runCli("cli", ["--stdin-filepath", "example.js"], { + isTTY: true, + }).test({ + stdout: "", + status: 0, + stderr: "", + write: [], + }); +}); diff --git a/tests/integration/__tests__/support-info.js b/tests/integration/__tests__/support-info.js index 017d6af5d499..3a354aa32539 100644 --- a/tests/integration/__tests__/support-info.js +++ b/tests/integration/__tests__/support-info.js @@ -1,20 +1,17 @@ -"use strict"; +import prettier from "../../config/prettier-entry.js"; -const prettier = require("prettier-local"); -const runPrettier = require("../run-prettier.js"); - -test("API getSupportInfo()", () => { - expect(getCoreInfo()).toMatchSnapshot(); +test("API getSupportInfo()", async () => { + expect(await getCoreInfo()).toMatchSnapshot(); }); describe("CLI --support-info", () => { - runPrettier("cli", "--support-info").test({ status: 0 }); + runCli("cli", "--support-info").test({ status: 0 }); }); -function getCoreInfo() { - const supportInfo = prettier.getSupportInfo(); +async function getCoreInfo() { + const supportInfo = await prettier.getSupportInfo(); const languages = Object.fromEntries( - supportInfo.languages.map(({ name, parsers }) => [name, parsers]) + supportInfo.languages.map(({ name, parsers }) => [name, parsers]), ); const options = Object.fromEntries( @@ -26,10 +23,10 @@ function getCoreInfo() { ...(option.type === "int" ? { range: option.range } : option.type === "choice" - ? { choices: option.choices.map((choice) => choice.value) } - : null), + ? { choices: option.choices.map((choice) => choice.value) } + : null), }, - ]) + ]), ); return { languages, options }; diff --git a/tests/integration/__tests__/syntax-error.js b/tests/integration/__tests__/syntax-error.js index a4d0430684c4..6ad67a7700dc 100644 --- a/tests/integration/__tests__/syntax-error.js +++ b/tests/integration/__tests__/syntax-error.js @@ -1,9 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("exits with non-zero code when input has a syntax error", () => { - runPrettier("cli/with-shebang", ["--parser", "babel"], { + runCli("cli/with-shebang", ["--parser", "babel"], { input: "a.2", }).test({ status: 2, diff --git a/tests/integration/__tests__/third-party.js b/tests/integration/__tests__/third-party.js deleted file mode 100644 index a93477d23c59..000000000000 --- a/tests/integration/__tests__/third-party.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -const path = require("path"); -const { thirdParty } = require("../env.js"); -const { cosmiconfig, cosmiconfigSync, isCI } = require(thirdParty); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - -// This don't has to be the same result as `prettier.resolveConfig`, -// Because we are testing with default `cosmiconfigOptions` -describe("cosmiconfig", () => { - const configs = [ - { - title: "prettier.config.js", - dirname: path.join(__dirname, "../cli/config/js/"), - file: path.join(__dirname, "../cli/config/js/prettier.config.js"), - value: { - endOfLine: "auto", - tabWidth: 8, - }, - }, - { - title: "package.json", - dirname: path.join(__dirname, "../cli/config/package/"), - file: path.join(__dirname, "../cli/config/package/package.json"), - value: { - tabWidth: 3, - overrides: [ - { - files: "*.ts", - options: { - tabWidth: 5, - }, - }, - ], - }, - }, - ]; - - for (const { title, dirname, file, value } of configs) { - test(`async version ${title}`, async () => { - const { config, filepath } = await cosmiconfig("prettier").search( - dirname - ); - expect(config).toEqual(value); - expect(filepath).toBe(file); - }); - - test(`sync version ${title}`, () => { - const { config, filepath } = cosmiconfigSync("prettier").search(dirname); - expect(config).toEqual(value); - expect(filepath).toBe(file); - }); - } - - // #8815, please make sure this error contains code frame - test("Invalid json file", () => { - expect(() => { - cosmiconfigSync("prettier").search( - path.join(__dirname, "../cli/config/invalid/broken-json") - ); - }).toThrowErrorMatchingSnapshot(); - }); -}); - -test("isCI", () => { - expect(typeof isCI()).toBe("boolean"); -}); diff --git a/tests/integration/__tests__/util-shared.js b/tests/integration/__tests__/util-shared.js index 05b75c4c8c32..4fdf3ab37f3b 100644 --- a/tests/integration/__tests__/util-shared.js +++ b/tests/integration/__tests__/util-shared.js @@ -1,6 +1,6 @@ -"use strict"; +import prettier from "../../config/prettier-entry.js"; -const sharedUtil = require("../../../src/common/util-shared.js"); +const sharedUtil = prettier.util; test("shared util has correct structure", () => { expect(typeof sharedUtil.getMaxContinuousCount).toBe("function"); @@ -21,10 +21,12 @@ test("shared util has correct structure", () => { expect(typeof sharedUtil.isNextLineEmpty).toBe("function"); expect(typeof sharedUtil.isNextLineEmptyAfterIndex).toBe("function"); expect(typeof sharedUtil.isPreviousLineEmpty).toBe("function"); + expect(typeof sharedUtil.getNextNonSpaceNonCommentCharacter).toBe("function"); expect(typeof sharedUtil.getNextNonSpaceNonCommentCharacterIndex).toBe( - "function" + "function", ); expect(typeof sharedUtil.makeString).toBe("function"); + expect(typeof sharedUtil.getPreferredQuote).toBe("function"); }); test("sharedUtil.getMaxContinuousCount", () => { @@ -42,37 +44,49 @@ test("sharedUtil.getMaxContinuousCount", () => { expect(getMaxContinuousCount(fixture, "([a-f])")).toBe(2); expect(getMaxContinuousCount(fixture, "[a-f]")).toBe(3); expect(getMaxContinuousCount(fixture, "a-f")).toBe(4); - expect(getMaxContinuousCount(fixture, "([a\\-f])")).toBe(0); - expect(getMaxContinuousCount(fixture, "[a\\-f]")).toBe(0); - expect(getMaxContinuousCount(fixture, "a\\-f")).toBe(0); + expect(getMaxContinuousCount(fixture, String.raw`([a\-f])`)).toBe(0); + expect(getMaxContinuousCount(fixture, String.raw`[a\-f]`)).toBe(0); + expect(getMaxContinuousCount(fixture, String.raw`a\-f`)).toBe(0); }); test("sharedUtil.getStringWidth", () => { const { getStringWidth } = sharedUtil; - // From https://github.com/sindresorhus/string-width/blob/master/test.js + // From https://github.com/sindresorhus/string-width/blob/main/test.js expect(getStringWidth("abcde")).toBe(5); expect(getStringWidth("古池や")).toBe(6); expect(getStringWidth("あいうabc")).toBe(9); + expect(getStringWidth("あいう★")).toBe(7); + expect(getStringWidth("±")).toBe(1); expect(getStringWidth("ノード.js")).toBe(9); expect(getStringWidth("你好")).toBe(4); expect(getStringWidth("안녕하세요")).toBe(10); expect(getStringWidth("A\uD83C\uDE00BC")).toBe(5); - expect(getStringWidth("\u001B[31m\u001B[39m")).toBe(0); - expect( - getStringWidth("\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007") - ).toBe(5); + // We don't strip ansi + // expect(getStringWidth("\u001B[31m\u001B[39m")).toBe(0); + // expect( + // getStringWidth("\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007") + // ).toBe(5); expect(getStringWidth("\u{231A}")).toBe(2); expect(getStringWidth("\u{2194}\u{FE0F}")).toBe(2); expect(getStringWidth("\u{1F469}")).toBe(2); expect(getStringWidth("\u{1F469}\u{1F3FF}")).toBe(2); + // Ideally this should be `2`, switch to use `Intl.Segmenter` will fix it + // https://github.com/prettier/prettier/pull/14793#discussion_r1185840038 + expect(getStringWidth("\u{845B}\u{E0100}")).toBe(3); + expect(getStringWidth(String.fromCharCode(0))).toBe(0); expect(getStringWidth(String.fromCharCode(31))).toBe(0); // expect(getStringWidth(String.fromCharCode(127))).toBe(0); // Different with `string-width` expect(getStringWidth(String.fromCharCode(134))).toBe(0); expect(getStringWidth(String.fromCharCode(159))).toBe(0); expect(getStringWidth("\u001B")).toBe(0); - // expect(getStringWidth("x\u0300"), 1); // Different with `string-width` + expect(getStringWidth("x\u0300")).toBe(1); + + expect(getStringWidth("👶")).toBe(2); + expect(getStringWidth("👶🏽")).toBe(2); + expect(getStringWidth("👩‍👩‍👦‍👦")).toBe(2); + expect(getStringWidth("👨‍❤️‍💋‍👨")).toBe(2); }); test("sharedUtil.getAlignmentSize", () => { @@ -82,7 +96,7 @@ test("sharedUtil.getAlignmentSize", () => { expect(getAlignmentSize("\t\t", /* tabWidth */ 2)).toBe(4); expect(getAlignmentSize("\t\t", /* tabWidth */ 3)).toBe(6); expect(getAlignmentSize("\t\t", /* tabWidth */ 3, /* startIndex */ 1)).toBe( - 3 + 3, ); }); @@ -97,6 +111,104 @@ test("sharedUtil.getIndentSize", () => { expect(getIndentSize(" \n\t\t\n", /* tabWidth */ 2)).toBe(0); }); +test("sharedUtil.getNextNonSpaceNonCommentCharacter and sharedUtil.getNextNonSpaceNonCommentCharacterIndex", () => { + const { + getNextNonSpaceNonCommentCharacter, + getNextNonSpaceNonCommentCharacterIndex, + } = sharedUtil; + const FAKE_NODE = { type: "Identifier", name: "a" }; + + { + const text = "/* comment 1 */ a /* comment 2 */ b"; + const endOfIdentifierA = text.indexOf("a") + 1; + const indexOfIdentifierB = text.indexOf("b"); + const locEnd = () => endOfIdentifierA; + + expect(getNextNonSpaceNonCommentCharacter(text, endOfIdentifierA)).toBe( + "b", + ); + expect( + getNextNonSpaceNonCommentCharacterIndex(text, endOfIdentifierA), + ).toBe(indexOfIdentifierB); + expect( + getNextNonSpaceNonCommentCharacterIndex(text, FAKE_NODE, locEnd), + ).toBe(indexOfIdentifierB); + } + + { + const text = "/* comment 1 */ a /* comment 2 */"; + const endOfIdentifierA = text.indexOf("a") + 1; + const locEnd = () => endOfIdentifierA; + + expect(getNextNonSpaceNonCommentCharacter(text, endOfIdentifierA)).toBe(""); + expect( + getNextNonSpaceNonCommentCharacterIndex(text, endOfIdentifierA), + ).toBe(text.length); + expect( + getNextNonSpaceNonCommentCharacterIndex(text, FAKE_NODE, locEnd), + ).toBe(text.length); + } + + { + const text = "/* comment 1 */ a /* comment 2 */"; + const startIndex = false; + const locEnd = () => startIndex; + + expect(getNextNonSpaceNonCommentCharacter(text, startIndex)).toBe(""); + expect(getNextNonSpaceNonCommentCharacterIndex(text, startIndex)).toBe( + false, + ); + expect( + getNextNonSpaceNonCommentCharacterIndex(text, FAKE_NODE, locEnd), + ).toBe(false); + } +}); + +test("sharedUtil.isPreviousLineEmpty, sharedUtil.isNextLineEmpty and sharedUtil.isNextLineEmptyAfterIndex", () => { + const { isPreviousLineEmpty, isNextLineEmpty, isNextLineEmptyAfterIndex } = + sharedUtil; + const FAKE_NODE_A = { type: "Identifier", name: "a" }; + const FAKE_NODE_B = { type: "Identifier", name: "b" }; + + { + const text = "a\n \t \t \nb"; + const endOfIdentifierA = text.indexOf("a") + 1; + const startOfIdentifierB = text.indexOf("b"); + + expect(isPreviousLineEmpty(text, startOfIdentifierB)).toBe(true); + expect( + isPreviousLineEmpty(text, FAKE_NODE_B, () => startOfIdentifierB), + ).toBe(true); + expect(isNextLineEmpty(text, endOfIdentifierA)).toBe(true); + expect(isNextLineEmptyAfterIndex(text, endOfIdentifierA)).toBe(true); + expect(isNextLineEmpty(text, FAKE_NODE_A, () => endOfIdentifierA)).toBe( + true, + ); + } + + { + const text = "a\n \t NON_SPACE \t \nb"; + const endOfIdentifierA = text.indexOf("a") + 1; + const startOfIdentifierB = text.indexOf("b"); + + expect(isPreviousLineEmpty(text, startOfIdentifierB)).toBe(false); + expect( + isPreviousLineEmpty(text, FAKE_NODE_B, () => startOfIdentifierB), + ).toBe(false); + expect(isNextLineEmpty(text, endOfIdentifierA)).toBe(false); + expect(isNextLineEmptyAfterIndex(text, endOfIdentifierA)).toBe(false); + expect(isNextLineEmpty(text, FAKE_NODE_A, () => endOfIdentifierA)).toBe( + false, + ); + } + + let called = false; + isNextLineEmptyAfterIndex("text", {}, () => { + called = true; + }); + expect(called).toBe(false); +}); + test("sharedUtil.makeString", () => { const { makeString } = sharedUtil; const DOUBLE_QUOTE = '"'; @@ -105,12 +217,43 @@ test("sharedUtil.makeString", () => { expect(makeString("a", DOUBLE_QUOTE)).toBe(`${DOUBLE_QUOTE}a${DOUBLE_QUOTE}`); expect(makeString("a", SINGLE_QUOTE)).toBe(`${SINGLE_QUOTE}a${SINGLE_QUOTE}`); expect(makeString(`a${DOUBLE_QUOTE}`, DOUBLE_QUOTE)).toBe( - `${DOUBLE_QUOTE}a\\${DOUBLE_QUOTE}${DOUBLE_QUOTE}` + `${DOUBLE_QUOTE}a\\${DOUBLE_QUOTE}${DOUBLE_QUOTE}`, ); expect(makeString(`a${DOUBLE_QUOTE}`, SINGLE_QUOTE)).toBe( - `${SINGLE_QUOTE}a${DOUBLE_QUOTE}${SINGLE_QUOTE}` + `${SINGLE_QUOTE}a${DOUBLE_QUOTE}${SINGLE_QUOTE}`, ); expect( - makeString("\\a", SINGLE_QUOTE, /* unescapeUnnecessaryEscapes */ true) + makeString( + String.raw`\a`, + SINGLE_QUOTE, + /* unescapeUnnecessaryEscapes */ true, + ), ).toBe(`${SINGLE_QUOTE}a${SINGLE_QUOTE}`); }); + +test("sharedUtil.getPreferredQuote", () => { + const { getPreferredQuote } = sharedUtil; + const DOUBLE_QUOTE = '"'; + const SINGLE_QUOTE = "'"; + + expect(getPreferredQuote(``, true)).toBe(SINGLE_QUOTE); + expect(getPreferredQuote(``, false)).toBe(DOUBLE_QUOTE); + expect(getPreferredQuote(``, DOUBLE_QUOTE)).toBe(DOUBLE_QUOTE); + expect(getPreferredQuote(``, SINGLE_QUOTE)).toBe(SINGLE_QUOTE); + expect(getPreferredQuote(`'Hello' "World" 'Test'`, SINGLE_QUOTE)).toBe( + DOUBLE_QUOTE, + ); + expect(getPreferredQuote(`"Hello" 'World' "Test"`, DOUBLE_QUOTE)).toBe( + SINGLE_QUOTE, + ); + expect(getPreferredQuote(`"Hello" "World" "Test"`, SINGLE_QUOTE)).toBe( + SINGLE_QUOTE, + ); + expect(getPreferredQuote(`'Hello' 'World' 'Test'`, DOUBLE_QUOTE)).toBe( + DOUBLE_QUOTE, + ); + expect(getPreferredQuote(`'Hello' "World"`, SINGLE_QUOTE)).toBe(SINGLE_QUOTE); + expect(getPreferredQuote(`"Hello" 'World'`, DOUBLE_QUOTE)).toBe(DOUBLE_QUOTE); + expect(getPreferredQuote(`Hello World`, true)).toBe(SINGLE_QUOTE); + expect(getPreferredQuote(`Hello World`, false)).toBe(DOUBLE_QUOTE); +}); diff --git a/tests/integration/__tests__/with-config-precedence.js b/tests/integration/__tests__/with-config-precedence.js index ff1d0592bba5..03af01648366 100644 --- a/tests/integration/__tests__/with-config-precedence.js +++ b/tests/integration/__tests__/with-config-precedence.js @@ -1,56 +1,75 @@ -"use strict"; +import { outdent } from "outdent"; -const runPrettier = require("../run-prettier.js"); +const TAB_WIDTH_3_OUTPUT = outdent` + function foo() { + ${" ".repeat(3)}return bar; + } +`; +const TAB_WIDTH_5_OUTPUT = outdent` + function foo() { + ${" ".repeat(5)}return bar; + } +`; -describe("CLI overrides take precedence without --config-precedence", () => { - runPrettier("cli/config/", [ - "--end-of-line", - "lf", - "--print-width", - "1", - "**/*.js", - ]).test({ - status: 0, - }); +test("CLI overrides take precedence --config-precedence", async () => { + const withoutFlag = await runCli("cli/config-precedence/valid-config", [ + "foo.js", + ]).stdout; + expect(withoutFlag).toBe(TAB_WIDTH_3_OUTPUT); + + const withFlag = await runCli("cli/config-precedence/valid-config", [ + "--tab-width", + "5", + "foo.js", + ]).stdout; + expect(withFlag).toBe(TAB_WIDTH_5_OUTPUT); }); -describe("CLI overrides take precedence with --config-precedence cli-override", () => { - runPrettier("cli/config/", [ - "--end-of-line", - "lf", - "--print-width", - "1", +test("CLI overrides take precedence with --config-precedence cli-override", async () => { + const withoutFlag = await runCli("cli/config-precedence/valid-config", [ "--config-precedence", "cli-override", - "**/*.js", - ]).test({ - status: 0, - }); -}); + "foo.js", + ]).stdout; + expect(withoutFlag).toBe(TAB_WIDTH_3_OUTPUT); -describe("CLI overrides take lower precedence with --config-precedence file-override", () => { - runPrettier("cli/config/js/", [ - "--end-of-line", - "crlf", + const withFlag = await runCli("cli/config-precedence/valid-config", [ + "--config-precedence", + "cli-override", "--tab-width", - "1", + "5", + "foo.js", + ]).stdout; + expect(withFlag).toBe(TAB_WIDTH_5_OUTPUT); +}); + +test("CLI overrides take lower precedence with --config-precedence file-override", async () => { + const withoutFlag = await runCli("cli/config-precedence/valid-config", [ "--config-precedence", "file-override", - "**/*.js", - ]).test({ - status: 0, - }); + "foo.js", + ]).stdout; + expect(withoutFlag).toBe(TAB_WIDTH_3_OUTPUT); + + const withFlag = await runCli("cli/config-precedence/valid-config", [ + "--config-precedence", + "file-override", + "--tab-width", + "5", + "foo.js", + ]).stdout; + expect(withFlag).toBe(TAB_WIDTH_3_OUTPUT); }); describe("CLI overrides are still applied when no config is found with --config-precedence file-override", () => { - runPrettier("cli/config/no-config/", [ + runCli("cli/config/no-config/", [ "--end-of-line", "lf", "--tab-width", "6", "--config-precedence", "file-override", - "**/*.js", + "file.js", "--no-editorconfig", ]).test({ status: 0, @@ -58,21 +77,21 @@ describe("CLI overrides are still applied when no config is found with --config- }); describe("CLI overrides gets ignored when config exists with --config-precedence prefer-file", () => { - runPrettier("cli/config/js/", [ + runCli("cli/config/js/", [ "--print-width", "1", "--tab-width", "1", "--config-precedence", "prefer-file", - "**/*.js", + "file.js", ]).test({ status: 0, }); }); describe("CLI overrides gets applied when no config exists with --config-precedence prefer-file", () => { - runPrettier("cli/config/no-config/", [ + runCli("cli/config/no-config/", [ "--end-of-line", "lf", "--print-width", @@ -82,14 +101,14 @@ describe("CLI overrides gets applied when no config exists with --config-precede "--no-config", "--config-precedence", "prefer-file", - "**/*.js", + "file.js", ]).test({ status: 0, }); }); describe("CLI validate options with --config-precedence cli-override", () => { - runPrettier("cli/config-precedence", [ + runCli("cli/config-precedence/invalid-config", [ "--config-precedence", "cli-override", ]).test({ @@ -98,7 +117,7 @@ describe("CLI validate options with --config-precedence cli-override", () => { }); describe("CLI validate options with --config-precedence file-override", () => { - runPrettier("cli/config-precedence", [ + runCli("cli/config-precedence/invalid-config", [ "--config-precedence", "file-override", ]).test({ @@ -107,7 +126,7 @@ describe("CLI validate options with --config-precedence file-override", () => { }); describe("CLI validate options with --config-precedence prefer-file", () => { - runPrettier("cli/config-precedence", [ + runCli("cli/config-precedence/invalid-config", [ "--config-precedence", "prefer-file", ]).test({ @@ -116,10 +135,10 @@ describe("CLI validate options with --config-precedence prefer-file", () => { }); describe("CLI --stdin-filepath works with --config-precedence prefer-file", () => { - runPrettier( - "cli/config/", + runCli( + "cli/config-precedence/overrides", ["--stdin-filepath=abc.ts", "--no-semi", "--config-precedence=prefer-file"], - { input: "let x: keyof Y = foo<typeof X>()" } // typescript + { input: "let x: keyof Y = foo<typeof X>()" }, // typescript ).test({ stderr: "", status: 0, @@ -127,14 +146,14 @@ describe("CLI --stdin-filepath works with --config-precedence prefer-file", () = }); describe("CLI --stdin-filepath works with --config-precedence file-override", () => { - runPrettier( - "cli/config/", + runCli( + "cli/config-precedence/overrides", [ "--stdin-filepath=abc.ts", "--no-semi", "--config-precedence=file-override", ], - { input: "let x: keyof Y = foo<typeof X>()" } // typescript + { input: "let x: keyof Y = foo<typeof X>()" }, // typescript ).test({ stderr: "", status: 0, @@ -142,14 +161,14 @@ describe("CLI --stdin-filepath works with --config-precedence file-override", () }); describe("CLI --stdin-filepath works with --config-precedence cli-override", () => { - runPrettier( - "cli/config/", + runCli( + "cli/config-precedence/overrides", [ "--stdin-filepath=abc.ts", "--no-semi", "--config-precedence=cli-override", ], - { input: "let x: keyof Y = foo<typeof X>()" } // typescript + { input: "let x: keyof Y = foo<typeof X>()" }, // typescript ).test({ stderr: "", status: 0, diff --git a/tests/integration/__tests__/with-node-modules.js b/tests/integration/__tests__/with-node-modules.js index a9cb5ef56033..b1618df20f7d 100644 --- a/tests/integration/__tests__/with-node-modules.js +++ b/tests/integration/__tests__/with-node-modules.js @@ -1,23 +1,17 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - -expect.addSnapshotSerializer(require("../path-serializer.js")); - describe("ignores node_modules by default", () => { - runPrettier("cli/with-node-modules", ["**/*.js", "-l"]).test({ + runCli("cli/with-node-modules", ["**/*.js", "-l"]).test({ status: 1, }); }); describe("ignores node_modules by with ./**/*.js", () => { - runPrettier("cli/with-node-modules", ["./**/*.js", "-l"]).test({ + runCli("cli/with-node-modules", ["./**/*.js", "-l"]).test({ status: 1, }); }); describe("doesn't ignore node_modules with --with-node-modules flag", () => { - runPrettier("cli/with-node-modules", [ + runCli("cli/with-node-modules", [ "**/*.js", "-l", "--with-node-modules", @@ -27,7 +21,7 @@ describe("doesn't ignore node_modules with --with-node-modules flag", () => { }); describe("ignores node_modules by default for file list", () => { - runPrettier("cli/with-node-modules", [ + runCli("cli/with-node-modules", [ "node_modules/node-module.js", "not_node_modules/file.js", "nested/node_modules/node-module.js", @@ -39,7 +33,7 @@ describe("ignores node_modules by default for file list", () => { }); describe("doesn't ignore node_modules with --with-node-modules flag for file list", () => { - runPrettier("cli/with-node-modules", [ + runCli("cli/with-node-modules", [ "node_modules/node-module.js", "not_node_modules/file.js", "nested/node_modules/node-module.js", diff --git a/tests/integration/__tests__/with-parser-inference.js b/tests/integration/__tests__/with-parser-inference.js index f503eef40fbd..c85c83401b75 100644 --- a/tests/integration/__tests__/with-parser-inference.js +++ b/tests/integration/__tests__/with-parser-inference.js @@ -1,55 +1,56 @@ -"use strict"; - -const prettier = require("prettier-local"); -const { outdent } = require("outdent"); -const runPrettier = require("../run-prettier.js"); +import { outdent } from "outdent"; +import prettier from "../../config/prettier-entry.js"; describe("infers postcss parser", () => { - runPrettier("cli/with-parser-inference", ["--end-of-line", "lf", "*"]).test({ + runCli("cli/with-parser-inference", ["--end-of-line", "lf", "*"]).test({ status: 0, }); }); describe("infers postcss parser with --check", () => { - runPrettier("cli/with-parser-inference", ["--check", "*"]).test({ + runCli("cli/with-parser-inference", ["--check", "*"]).test({ status: 0, }); }); describe("infers postcss parser with --list-different", () => { - runPrettier("cli/with-parser-inference", ["--list-different", "*"]).test({ + runCli("cli/with-parser-inference", ["--list-different", "*"]).test({ status: 0, }); }); describe("infers parser from filename", () => { - test("json from .prettierrc", () => { - expect(prettier.format(" { } ", { filepath: "x/y/.prettierrc" })).toBe( - "{}\n" - ); + test("json from .prettierrc", async () => { + expect( + await prettier.format(" { } ", { filepath: "x/y/.prettierrc" }), + ).toBe("{}\n"); }); - test("json from .stylelintrc", () => { - expect(prettier.format(" { } ", { filepath: "x/y/.stylelintrc" })).toBe( - "{}\n" - ); + test("json from .stylelintrc", async () => { + expect( + await prettier.format(" { } ", { filepath: "x/y/.stylelintrc" }), + ).toBe("{}\n"); }); - test("yaml from .stylelintrc", () => { + test("yaml from .stylelintrc", async () => { expect( - prettier.format(" extends: '' ", { filepath: "x/y/.stylelintrc" }) + await prettier.format(" extends: '' ", { + filepath: "x/y/.stylelintrc", + }), ).toBe('extends: ""\n'); }); - test("babel from Jakefile", () => { + test("babel from Jakefile", async () => { expect( - prettier.format("let foo = ( x = 1 ) => x", { filepath: "x/y/Jakefile" }) + await prettier.format("let foo = ( x = 1 ) => x", { + filepath: "x/y/Jakefile", + }), ).toBe("let foo = (x = 1) => x;\n"); }); - test("json from .swcrc", () => { + test("json from .swcrc", async () => { expect( - prettier.format( + await prettier.format( /* indent */ ` { "jsc": { @@ -57,8 +58,8 @@ describe("infers parser from filename", () => { "keepClassNames": false }} `, - { filepath: "/path/to/.swcrc" } - ) + { filepath: "/path/to/.swcrc" }, + ), ).toBe( outdent` { @@ -67,32 +68,32 @@ describe("infers parser from filename", () => { "keepClassNames": false } } - ` + "\n" + ` + "\n", ); }); - test("json from .lintstagedrc", () => { + test("json from .lintstagedrc", async () => { expect( - prettier.format(" { '*': 'your-cmd' } ", { + await prettier.format(" { '*': 'your-cmd' } ", { filepath: "/path/to/.lintstagedrc", - }) + }), ).toBe('{ "*": "your-cmd" }\n'); }); - test("yaml from .lintstagedrc", () => { + test("yaml from .lintstagedrc", async () => { expect( - prettier.format( + await prettier.format( /* indent */ ` '*': - your-cmd `, - { filepath: "/path/to/.lintstagedrc" } - ) + { filepath: "/path/to/.lintstagedrc" }, + ), ).toBe( outdent` "*": - your-cmd - ` + "\n" + ` + "\n", ); }); }); diff --git a/tests/integration/__tests__/with-shebang.js b/tests/integration/__tests__/with-shebang.js index 7b4fe264db7d..fffd23d6c083 100644 --- a/tests/integration/__tests__/with-shebang.js +++ b/tests/integration/__tests__/with-shebang.js @@ -1,11 +1,5 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("preserves shebang", () => { - runPrettier("cli/with-shebang", ["--end-of-line", "lf", "issue1890.js"]).test( - { - status: 0, - } - ); + runCli("cli/with-shebang", ["--end-of-line", "lf", "issue1890.js"]).test({ + status: 0, + }); }); diff --git a/tests/integration/__tests__/write.js b/tests/integration/__tests__/write.js index ae702be37ac8..fbc38818c0da 100644 --- a/tests/integration/__tests__/write.js +++ b/tests/integration/__tests__/write.js @@ -1,28 +1,24 @@ -"use strict"; - -const runPrettier = require("../run-prettier.js"); - describe("write file with --write + unformatted file", () => { - runPrettier("cli/write", ["--write", "unformatted.js"]).test({ + runCli("cli/write", ["--write", "unformatted.js"]).test({ status: 0, }); }); describe("write file with -w + unformatted file", () => { - runPrettier("cli/write", ["-w", "unformatted.js"]).test({ + runCli("cli/write", ["-w", "unformatted.js"]).test({ status: 0, }); }); describe("do not write file with --write + formatted file", () => { - runPrettier("cli/write", ["--write", "formatted.js"]).test({ + runCli("cli/write", ["--write", "formatted.js"]).test({ write: [], status: 0, }); }); describe("do not write file with --write + invalid file", () => { - runPrettier("cli/write", ["--write", "invalid.js"]).test({ + runCli("cli/write", ["--write", "invalid.js"]).test({ write: [], status: "non-zero", }); diff --git a/tests/integration/cli-worker.js b/tests/integration/cli-worker.js new file mode 100644 index 000000000000..a70c802bb599 --- /dev/null +++ b/tests/integration/cli-worker.js @@ -0,0 +1,115 @@ +import path from "node:path"; +import url from "node:url"; +import { + prettierCliEntry, + prettierCliMockableEntry, + prettierMainEntry, +} from "./env.js"; + +const normalizeToPosix = + path.sep === "\\" + ? (filepath) => replaceAll(filepath, "\\", "/") + : (filepath) => filepath; +const hasOwn = + Object.hasOwn ?? + ((object, property) => + // eslint-disable-next-line prefer-object-has-own + Object.prototype.hasOwnProperty.call(object, property)); +const replaceAll = (text, find, replacement) => + text.replaceAll + ? text.replaceAll(find, replacement) + : text.split(find).join(replacement); + +async function getApiMockable() { + const prettier = await import(url.pathToFileURL(prettierMainEntry)); + return prettier.__debug.mockable; +} + +async function getCliMockable() { + const cli = await import(url.pathToFileURL(prettierCliMockableEntry)); + return cli.mockable; +} + +async function mockImplementations(options) { + const [apiMockable, cliMockable] = await Promise.all([ + getApiMockable(), + getCliMockable(), + ]); + + cliMockable.mockImplementations({ + clearStreamText(stream, text) { + const streamName = + stream === process.stdout + ? "process.stdout" + : stream === process.stderr + ? "process.stderr" + : "unknown stream"; + stream.write(`\n[[Clear text(${streamName}): ${text}]]\n`); + }, + // Time measure in format test + getTimestamp: () => 0, + isCI: () => Boolean(options.ci), + isStreamTTY: (stream) => + stream === process.stdin + ? Boolean(options.isTTY) + : stream === process.stdout + ? Boolean(options.stdoutIsTTY) + : stream.isTTY, + // eslint-disable-next-line require-await + async writeFormattedFile(filename, content) { + filename = normalizeToPosix(path.relative(process.cwd(), filename)); + if ( + options.mockWriteFileErrors && + hasOwn(options.mockWriteFileErrors, filename) + ) { + throw new Error( + options.mockWriteFileErrors[filename] + " (mocked error)", + ); + } + process.send({ + type: "cli:write-file", + data: { filename, content }, + }); + }, + }); + + apiMockable.mockImplementations({ + getPrettierConfigSearchStopDirectory: () => + url.fileURLToPath(new URL("./cli", import.meta.url)), + }); +} + +async function run(options) { + await mockImplementations(options); + + const { __promise: promise } = await import( + url.pathToFileURL(prettierCliEntry) + ); + await promise; +} + +process.once("message", async (data) => { + try { + await run(data); + } catch (error) { + // For easier debugging + // eslint-disable-next-line no-console + console.error(error); + process.send({ type: "worker:fault", error }); + throw error; + } finally { + // On MacOS, if we exit too quick the stdio won't received on main thread + if (process.platform === "darwin") { + await Promise.all( + ["stdout", "stderr"].map( + (stream) => + new Promise((resolve) => { + process[stream].once("finish", resolve); + process[stream].end(); + }), + ), + ); + } + process.exit(); + } +}); diff --git a/tests/integration/cli/cache/.gitignore b/tests/integration/cli/cache/.gitignore new file mode 100644 index 000000000000..03a22858bae4 --- /dev/null +++ b/tests/integration/cli/cache/.gitignore @@ -0,0 +1,6 @@ +# These files are generated by tests +node_modules +directory-as-cache-file +.non-default-cache-file +a.js +b.js diff --git a/tests/integration/cli/cache/a.js b/tests/integration/cli/cache/a.js deleted file mode 100644 index b824ea0f9278..000000000000 --- a/tests/integration/cli/cache/a.js +++ /dev/null @@ -1,3 +0,0 @@ -function a() { - console.log("this is a.js") -} diff --git a/tests/integration/cli/cache/b.js b/tests/integration/cli/cache/b.js deleted file mode 100644 index 4bc80d22e7a9..000000000000 --- a/tests/integration/cli/cache/b.js +++ /dev/null @@ -1,3 +0,0 @@ -function b() { - console.log("this is b.js"); -} diff --git a/tests/integration/cli/config-precedence/.prettierrc b/tests/integration/cli/config-precedence/invalid-config/.prettierrc similarity index 100% rename from tests/integration/cli/config-precedence/.prettierrc rename to tests/integration/cli/config-precedence/invalid-config/.prettierrc diff --git a/tests/integration/cli/config-precedence/invalid-config/foo.js b/tests/integration/cli/config-precedence/invalid-config/foo.js new file mode 100644 index 000000000000..89d793a3dc84 --- /dev/null +++ b/tests/integration/cli/config-precedence/invalid-config/foo.js @@ -0,0 +1,3 @@ +function foo () { +return bar; +} diff --git a/tests/integration/cli/config-precedence/overrides/.prettierrc b/tests/integration/cli/config-precedence/overrides/.prettierrc new file mode 100644 index 000000000000..43de9b5e69ce --- /dev/null +++ b/tests/integration/cli/config-precedence/overrides/.prettierrc @@ -0,0 +1,8 @@ +endOfLine: 'auto' +overrides: +- files: "*.js" + options: + semi: false +- files: "*.ts" + options: + semi: true diff --git a/tests/integration/cli/config-precedence/valid-config/.prettierrc b/tests/integration/cli/config-precedence/valid-config/.prettierrc new file mode 100644 index 000000000000..b612e027c753 --- /dev/null +++ b/tests/integration/cli/config-precedence/valid-config/.prettierrc @@ -0,0 +1 @@ +{"tabWidth": 3} diff --git a/tests/integration/cli/config-precedence/valid-config/foo.js b/tests/integration/cli/config-precedence/valid-config/foo.js new file mode 100644 index 000000000000..89d793a3dc84 --- /dev/null +++ b/tests/integration/cli/config-precedence/valid-config/foo.js @@ -0,0 +1,3 @@ +function foo () { +return bar; +} diff --git a/tests/integration/cli/config/$schema/.prettierrc b/tests/integration/cli/config/$schema/.prettierrc index f56ab2778844..7d9c35f7a61a 100644 --- a/tests/integration/cli/config/$schema/.prettierrc +++ b/tests/integration/cli/config/$schema/.prettierrc @@ -1,4 +1,4 @@ { - "$schema": "http://json.schemastore.org/prettierrc", + "$schema": "https://json.schemastore.org/prettierrc", "tabWidth": 42 } diff --git a/scripts/build/empty-tsconfig.json b/tests/integration/cli/config/config-position/.prettierrc similarity index 100% rename from scripts/build/empty-tsconfig.json rename to tests/integration/cli/config/config-position/.prettierrc diff --git a/tests/integration/plugins/automatic/package.json b/tests/integration/cli/config/config-position/directory/.prettierrc similarity index 100% rename from tests/integration/plugins/automatic/package.json rename to tests/integration/cli/config/config-position/directory/.prettierrc diff --git a/tests/integration/cli/config/config-position/directory/file-indirectory.js b/tests/integration/cli/config/config-position/directory/file-indirectory.js new file mode 100644 index 000000000000..a1f5e65d40c3 --- /dev/null +++ b/tests/integration/cli/config/config-position/directory/file-indirectory.js @@ -0,0 +1,2 @@ +Hello +.prettier() diff --git a/tests/integration/cli/config/config-position/file.js b/tests/integration/cli/config/config-position/file.js new file mode 100644 index 000000000000..a1f5e65d40c3 --- /dev/null +++ b/tests/integration/cli/config/config-position/file.js @@ -0,0 +1,2 @@ +Hello +.prettier() diff --git a/tests/integration/cli/config/custom-config-file-location/my-prettier-config.mjs b/tests/integration/cli/config/custom-config-file-location/my-prettier-config.mjs new file mode 100644 index 000000000000..56a0c7c1c453 --- /dev/null +++ b/tests/integration/cli/config/custom-config-file-location/my-prettier-config.mjs @@ -0,0 +1,3 @@ +export default { + tabWidth: 7 +} diff --git a/tests/integration/cli/config/editorconfig/repo-root/.hg b/tests/integration/cli/config/editorconfig/repo-root/.hg/.gitkeep similarity index 100% rename from tests/integration/cli/config/editorconfig/repo-root/.hg rename to tests/integration/cli/config/editorconfig/repo-root/.hg/.gitkeep diff --git a/tests/integration/cli/config/external-config/index.js b/tests/integration/cli/config/external-config/cjs-package/index.js similarity index 100% rename from tests/integration/cli/config/external-config/index.js rename to tests/integration/cli/config/external-config/cjs-package/index.js diff --git a/tests/integration/cli/config/external-config/node_modules/@company/prettier-config/index.json b/tests/integration/cli/config/external-config/cjs-package/node_modules/@company/prettier-config/index.json similarity index 100% rename from tests/integration/cli/config/external-config/node_modules/@company/prettier-config/index.json rename to tests/integration/cli/config/external-config/cjs-package/node_modules/@company/prettier-config/index.json diff --git a/tests/integration/cli/config/external-config/node_modules/@company/prettier-config/package.json b/tests/integration/cli/config/external-config/cjs-package/node_modules/@company/prettier-config/package.json similarity index 100% rename from tests/integration/cli/config/external-config/node_modules/@company/prettier-config/package.json rename to tests/integration/cli/config/external-config/cjs-package/node_modules/@company/prettier-config/package.json diff --git a/tests/integration/cli/config/external-config/package.json b/tests/integration/cli/config/external-config/cjs-package/package.json similarity index 100% rename from tests/integration/cli/config/external-config/package.json rename to tests/integration/cli/config/external-config/cjs-package/package.json diff --git a/tests/integration/cli/config/external-config/esm-file/index.js b/tests/integration/cli/config/external-config/esm-file/index.js new file mode 100644 index 000000000000..b4639445c510 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-file/index.js @@ -0,0 +1 @@ +console.log("should have no semi"); diff --git a/tests/integration/cli/config/external-config/esm-file/my-prettier-config-file.js b/tests/integration/cli/config/external-config/esm-file/my-prettier-config-file.js new file mode 100644 index 000000000000..c8fc71441c78 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-file/my-prettier-config-file.js @@ -0,0 +1,4 @@ +export default { + printWidth: 77, + semi: false, +}; diff --git a/tests/integration/cli/config/external-config/esm-file/package.json b/tests/integration/cli/config/external-config/esm-file/package.json new file mode 100644 index 000000000000..93334b67608a --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-file/package.json @@ -0,0 +1,5 @@ +{ + "prettier": "./my-prettier-config-file.js", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/external-config/esm-package-forbids-require/index.js b/tests/integration/cli/config/external-config/esm-package-forbids-require/index.js new file mode 100644 index 000000000000..b4639445c510 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-forbids-require/index.js @@ -0,0 +1 @@ +console.log("should have no semi"); diff --git a/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/index.js b/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/index.js new file mode 100644 index 000000000000..613d68ff361d --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/index.js @@ -0,0 +1 @@ +export default { printWidth: 79 } diff --git a/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/package.json b/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/package.json new file mode 100644 index 000000000000..70af1f920ddc --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-forbids-require/node_modules/prettier-config-forbids-require/package.json @@ -0,0 +1,9 @@ +{ + "name": "prettier-config-forbids-require", + "private": true, + "version": "0.0.0", + "type": "module", + "exports": { + "import": "./index.js" + } +} diff --git a/tests/integration/cli/config/external-config/esm-package-forbids-require/package.json b/tests/integration/cli/config/external-config/esm-package-forbids-require/package.json new file mode 100644 index 000000000000..47197b278eaf --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-forbids-require/package.json @@ -0,0 +1,3 @@ +{ + "prettier": "prettier-config-forbids-require" +} diff --git a/tests/integration/cli/config/external-config/esm-package-with-tla/index.js b/tests/integration/cli/config/external-config/esm-package-with-tla/index.js new file mode 100644 index 000000000000..b4639445c510 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-with-tla/index.js @@ -0,0 +1 @@ +console.log("should have no semi"); diff --git a/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/index.js b/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/index.js new file mode 100644 index 000000000000..2587ec9e8f08 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/index.js @@ -0,0 +1,4 @@ +export default await Promise.resolve({ + "printWidth": await Promise.resolve(77), + "semi": await Promise.resolve(false) +}) diff --git a/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/package.json b/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/package.json new file mode 100644 index 000000000000..fb040ee6eed0 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-with-tla/node_modules/@company/prettier-config/package.json @@ -0,0 +1,7 @@ +{ + "name": "@company/prettier-config", + "private": true, + "version": "0.0.0", + "type": "module", + "exports": "./index.js" +} diff --git a/tests/integration/cli/config/external-config/esm-package-with-tla/package.json b/tests/integration/cli/config/external-config/esm-package-with-tla/package.json new file mode 100644 index 000000000000..58ab00285687 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package-with-tla/package.json @@ -0,0 +1,3 @@ +{ + "prettier": "@company/prettier-config" +} diff --git a/tests/integration/cli/config/external-config/esm-package/index.js b/tests/integration/cli/config/external-config/esm-package/index.js new file mode 100644 index 000000000000..b4639445c510 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package/index.js @@ -0,0 +1 @@ +console.log("should have no semi"); diff --git a/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/index.js b/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/index.js new file mode 100644 index 000000000000..09f9623fc183 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/index.js @@ -0,0 +1,4 @@ +export default { + "printWidth": 77, + "semi": false +} diff --git a/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/package.json b/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/package.json new file mode 100644 index 000000000000..fb040ee6eed0 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package/node_modules/@company/prettier-config/package.json @@ -0,0 +1,7 @@ +{ + "name": "@company/prettier-config", + "private": true, + "version": "0.0.0", + "type": "module", + "exports": "./index.js" +} diff --git a/tests/integration/cli/config/external-config/esm-package/package.json b/tests/integration/cli/config/external-config/esm-package/package.json new file mode 100644 index 000000000000..58ab00285687 --- /dev/null +++ b/tests/integration/cli/config/external-config/esm-package/package.json @@ -0,0 +1,3 @@ +{ + "prettier": "@company/prettier-config" +} diff --git a/tests/integration/cli/config/external-overrides/.prettierrc b/tests/integration/cli/config/external-overrides/.prettierrc new file mode 100644 index 000000000000..ddd7a0726b1a --- /dev/null +++ b/tests/integration/cli/config/external-overrides/.prettierrc @@ -0,0 +1 @@ +"./real-config.cjs" diff --git a/tests/integration/cli/config/external-overrides/real-config.cjs b/tests/integration/cli/config/external-overrides/real-config.cjs new file mode 100644 index 000000000000..7924b427865a --- /dev/null +++ b/tests/integration/cli/config/external-overrides/real-config.cjs @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + tabWidth: 3, + overrides: [ + { files: "*.js", options: { semi: false } }, + { files: "*.ts", options: { semi: true } }, + ], +}; diff --git a/tests/integration/cli/config/invalid/broken-package-json/.prettierignore b/tests/integration/cli/config/invalid/broken-package-json/.prettierignore new file mode 100644 index 000000000000..396a8fc231d2 --- /dev/null +++ b/tests/integration/cli/config/invalid/broken-package-json/.prettierignore @@ -0,0 +1,2 @@ +# will be created by test +package.json diff --git a/tests/integration/cli/config/invalid/broken-package-json/.prettierrc b/tests/integration/cli/config/invalid/broken-package-json/.prettierrc new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/tests/integration/cli/config/invalid/broken-package-json/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/tests/integration/cli/config/invalid/broken-toml/.prettierrc.toml b/tests/integration/cli/config/invalid/broken-toml/.prettierrc.toml new file mode 100644 index 000000000000..14f0cd983259 --- /dev/null +++ b/tests/integration/cli/config/invalid/broken-toml/.prettierrc.toml @@ -0,0 +1,2 @@ +a= + b!= diff --git a/tests/integration/cli/config/invalid/broken-yaml/.prettierrc.yaml b/tests/integration/cli/config/invalid/broken-yaml/.prettierrc.yaml new file mode 100644 index 000000000000..341bbd84a87b --- /dev/null +++ b/tests/integration/cli/config/invalid/broken-yaml/.prettierrc.yaml @@ -0,0 +1,2 @@ +a: +a: diff --git a/tests/integration/cli/config/invalid/invalid-config-value/prettier.config.mjs b/tests/integration/cli/config/invalid/invalid-config-value/prettier.config.mjs new file mode 100644 index 000000000000..edb72725b9e7 --- /dev/null +++ b/tests/integration/cli/config/invalid/invalid-config-value/prettier.config.mjs @@ -0,0 +1 @@ +export default undefined diff --git a/tests/integration/cli/config/js/prettier.config.js b/tests/integration/cli/config/js/prettier.config.cjs similarity index 100% rename from tests/integration/cli/config/js/prettier.config.js rename to tests/integration/cli/config/js/prettier.config.cjs diff --git a/tests/integration/cli/config/package-yaml/package.yaml b/tests/integration/cli/config/package-yaml/package.yaml new file mode 100644 index 000000000000..8d6296bb4444 --- /dev/null +++ b/tests/integration/cli/config/package-yaml/package.yaml @@ -0,0 +1,4 @@ +name: my-package +version: 1.0.0 +prettier: + printWidth: 101 diff --git a/tests/integration/cli/config/plugin-search-dirs/.prettierrc b/tests/integration/cli/config/plugin-search-dirs/.prettierrc index d5f6d95b096a..2c63c0851048 100644 --- a/tests/integration/cli/config/plugin-search-dirs/.prettierrc +++ b/tests/integration/cli/config/plugin-search-dirs/.prettierrc @@ -1,3 +1,2 @@ { - "pluginSearchDirs": false } diff --git a/tests/integration/cli/config/plugins/absolute-path/prettier.config.mjs b/tests/integration/cli/config/plugins/absolute-path/prettier.config.mjs new file mode 100644 index 000000000000..da9d1a4dfc1b --- /dev/null +++ b/tests/integration/cli/config/plugins/absolute-path/prettier.config.mjs @@ -0,0 +1,7 @@ +import path from 'node:path' + +export default { + plugins: [ + path.resolve('../../../../../config/prettier-plugins/prettier-plugin-uppercase-rocks/index.js') + ] +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/package.json b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/package.json new file mode 100644 index 000000000000..f2ce3c95d6bf --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "cjs-prettier-config-js-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/prettier.config.js b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/prettier.config.js new file mode 100644 index 000000000000..dcea73b27d72 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-commonjs/prettier.config.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/package.json b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/package.json new file mode 100644 index 000000000000..47908701ac81 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "cjs-prettier-config-js-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/prettier.config.js b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/prettier.config.js new file mode 100644 index 000000000000..0310f489582a --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-module/prettier.config.js @@ -0,0 +1,4 @@ +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/package.json b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/package.json new file mode 100644 index 000000000000..ab34267d3520 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "cjs-prettier-config-js-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/prettier.config.js b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/prettier.config.js new file mode 100644 index 000000000000..dcea73b27d72 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettier-config-js-in-type-none/prettier.config.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/.prettierrc.js b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/.prettierrc.js new file mode 100644 index 000000000000..dcea73b27d72 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/.prettierrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/package.json b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/package.json new file mode 100644 index 000000000000..622710c7b8c2 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "cjs-prettierrc-js-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/.prettierrc.js b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/.prettierrc.js new file mode 100644 index 000000000000..dcea73b27d72 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/.prettierrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/package.json b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/package.json new file mode 100644 index 000000000000..ad68a5cba300 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "cjs-prettierrc-js-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/.prettierrc.js b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/.prettierrc.js new file mode 100644 index 000000000000..dcea73b27d72 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/.prettierrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/package.json b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/package.json new file mode 100644 index 000000000000..1e73e4349b46 --- /dev/null +++ b/tests/integration/cli/config/rc-js/cjs-prettierrc-js-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "prettierrc-js-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/package.json b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/package.json new file mode 100644 index 000000000000..1775526933dd --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "mjs-prettier-config-js-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/prettier.config.js b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/prettier.config.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-commonjs/prettier.config.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/package.json b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/package.json new file mode 100644 index 000000000000..bc7900e3aceb --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "mjs-prettier-config-js-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/prettier.config.js b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/prettier.config.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-module/prettier.config.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/package.json b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/package.json new file mode 100644 index 000000000000..8787c2ede17c --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "mjs-prettier-config-js-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/prettier.config.js b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/prettier.config.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettier-config-js-in-type-none/prettier.config.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/.prettierrc.js b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/.prettierrc.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/.prettierrc.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/package.json b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/package.json new file mode 100644 index 000000000000..a3faf105cd12 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "mjs-prettierrc-js-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/.prettierrc.js b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/.prettierrc.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/.prettierrc.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/package.json b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/package.json new file mode 100644 index 000000000000..e8a749525bbb --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "mjs-prettierrc-js-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/.prettierrc.js b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/.prettierrc.js new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/.prettierrc.js @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/package.json b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/package.json new file mode 100644 index 000000000000..0583e76e4541 --- /dev/null +++ b/tests/integration/cli/config/rc-js/mjs-prettierrc-js-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "mjs-prettierrc-js-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/package.json b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/package.json new file mode 100644 index 000000000000..194da1d28d7f --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "prettier-config-mjs-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/prettier.config.mjs b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/prettier.config.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-commonjs/prettier.config.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/package.json b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/package.json new file mode 100644 index 000000000000..94f8379c9568 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "prettier-config-mjs-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/prettier.config.mjs b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/prettier.config.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-module/prettier.config.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/package.json b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/package.json new file mode 100644 index 000000000000..86189ffcf9c4 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "prettier-config-mjs-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/prettier.config.mjs b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/prettier.config.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettier-config-mjs-in-type-none/prettier.config.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/.prettierrc.mjs b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/.prettierrc.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/.prettierrc.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/package.json b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/package.json new file mode 100644 index 000000000000..b3e79661d5d0 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-commonjs/package.json @@ -0,0 +1,5 @@ +{ + "name": "prettierrc-mjs-in-type-commonjs", + "private": true, + "type": "commonjs" +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/.prettierrc.mjs b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/.prettierrc.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/.prettierrc.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/package.json b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/package.json new file mode 100644 index 000000000000..f0fe03436d22 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-module/package.json @@ -0,0 +1,5 @@ +{ + "name": "prettierrc-mjs-in-type-module", + "private": true, + "type": "module" +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/.prettierrc.mjs b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/.prettierrc.mjs new file mode 100644 index 000000000000..867b88006095 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/.prettierrc.mjs @@ -0,0 +1,4 @@ +export default { + "trailingComma": "all", + "singleQuote": true +} diff --git a/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/package.json b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/package.json new file mode 100644 index 000000000000..b494509c0ab2 --- /dev/null +++ b/tests/integration/cli/config/rc-mjs/prettierrc-mjs-in-type-none/package.json @@ -0,0 +1,4 @@ +{ + "name": "prettierrc-mjs-in-type-none", + "private": true +} diff --git a/tests/integration/cli/config/resolve-relative/.prettierrc b/tests/integration/cli/config/resolve-relative/.prettierrc index 8d56196422e4..5bc6e54f7124 100644 --- a/tests/integration/cli/config/resolve-relative/.prettierrc +++ b/tests/integration/cli/config/resolve-relative/.prettierrc @@ -1,4 +1,3 @@ { - "plugins": ["../path-to-plugin"], - "pluginSearchDirs": ["../path-to-plugin-search-dir"] + "plugins": ["../path-to-plugin"] } diff --git a/tests/integration/cli/config/ts/auto-discovery/.prettierrc.ts b/tests/integration/cli/config/ts/auto-discovery/.prettierrc.ts new file mode 100644 index 000000000000..497bc5d5c5aa --- /dev/null +++ b/tests/integration/cli/config/ts/auto-discovery/.prettierrc.ts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 3}; + +export default config; diff --git a/tests/integration/cli/config/ts/config-file-names/.prettierrc.cts b/tests/integration/cli/config/ts/config-file-names/.prettierrc.cts new file mode 100644 index 000000000000..103becdf1418 --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/.prettierrc.cts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 8}; + +module.exports = config; diff --git a/tests/integration/cli/config/ts/config-file-names/.prettierrc.mts b/tests/integration/cli/config/ts/config-file-names/.prettierrc.mts new file mode 100644 index 000000000000..497bc5d5c5aa --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/.prettierrc.mts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 3}; + +export default config; diff --git a/tests/integration/cli/config/ts/config-file-names/.prettierrc.ts b/tests/integration/cli/config/ts/config-file-names/.prettierrc.ts new file mode 100644 index 000000000000..547d1aaa6e9b --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/.prettierrc.ts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 4}; + +export default config; diff --git a/tests/integration/cli/config/ts/config-file-names/file-to-format.js b/tests/integration/cli/config/ts/config-file-names/file-to-format.js new file mode 100644 index 000000000000..83ee44af7894 --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/file-to-format.js @@ -0,0 +1,3 @@ +function foo() { + return bar; +} diff --git a/tests/integration/cli/config/ts/config-file-names/prettier.config.cts b/tests/integration/cli/config/ts/config-file-names/prettier.config.cts new file mode 100644 index 000000000000..c222a151ed2c --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/prettier.config.cts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 7}; + +module.exports = config; diff --git a/tests/integration/cli/config/ts/config-file-names/prettier.config.mts b/tests/integration/cli/config/ts/config-file-names/prettier.config.mts new file mode 100644 index 000000000000..16e89d3027de --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/prettier.config.mts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 6}; + +export default config; diff --git a/tests/integration/cli/config/ts/config-file-names/prettier.config.ts b/tests/integration/cli/config/ts/config-file-names/prettier.config.ts new file mode 100644 index 000000000000..a420cff4a28a --- /dev/null +++ b/tests/integration/cli/config/ts/config-file-names/prettier.config.ts @@ -0,0 +1,7 @@ +type PrettierConfig = { + tabWidth: number +}; + +const config: PrettierConfig = {tabWidth: 5}; + +export default config; diff --git a/tests/integration/cli/debug-check/issue-15094.jsx b/tests/integration/cli/debug-check/issue-15094.jsx new file mode 100644 index 000000000000..d23790019df3 --- /dev/null +++ b/tests/integration/cli/debug-check/issue-15094.jsx @@ -0,0 +1 @@ +<style {...a}/>; diff --git a/tests/integration/cli/debug-check/plugin-for-testing-debug-check.js b/tests/integration/cli/debug-check/plugin-for-testing-debug-check.cjs similarity index 100% rename from tests/integration/cli/debug-check/plugin-for-testing-debug-check.js rename to tests/integration/cli/debug-check/plugin-for-testing-debug-check.cjs diff --git a/tests/integration/cli/experimental-cli/.gitignore b/tests/integration/cli/experimental-cli/.gitignore new file mode 100644 index 000000000000..e53c48ff5ab1 --- /dev/null +++ b/tests/integration/cli/experimental-cli/.gitignore @@ -0,0 +1,2 @@ +# dynamically created by tests +test-* diff --git a/tests/integration/cli/experimental-cli/test-0/should-format.js b/tests/integration/cli/experimental-cli/test-0/should-format.js new file mode 100644 index 000000000000..994d8a206d0c --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-0/should-format.js @@ -0,0 +1,6 @@ + + console.log( +"Hello, world!" + + + ) diff --git a/tests/integration/cli/experimental-cli/test-0/should-not-format.js b/tests/integration/cli/experimental-cli/test-0/should-not-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-0/should-not-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/experimental-cli/test-1/should-format.js b/tests/integration/cli/experimental-cli/test-1/should-format.js new file mode 100644 index 000000000000..994d8a206d0c --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-1/should-format.js @@ -0,0 +1,6 @@ + + console.log( +"Hello, world!" + + + ) diff --git a/tests/integration/cli/experimental-cli/test-1/should-not-format.js b/tests/integration/cli/experimental-cli/test-1/should-not-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-1/should-not-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/experimental-cli/test-2/should-format.js b/tests/integration/cli/experimental-cli/test-2/should-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-2/should-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/experimental-cli/test-2/should-not-format.js b/tests/integration/cli/experimental-cli/test-2/should-not-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-2/should-not-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/experimental-cli/test-3/should-format.js b/tests/integration/cli/experimental-cli/test-3/should-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-3/should-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/experimental-cli/test-3/should-not-format.js b/tests/integration/cli/experimental-cli/test-3/should-not-format.js new file mode 100644 index 000000000000..a8141d3b18d3 --- /dev/null +++ b/tests/integration/cli/experimental-cli/test-3/should-not-format.js @@ -0,0 +1 @@ +console.log("Hello, world!"); diff --git a/tests/integration/cli/file-info/config-with-parser/.prettierrc b/tests/integration/cli/file-info/config-with-parser/.prettierrc new file mode 100644 index 000000000000..945a5f3af242 --- /dev/null +++ b/tests/integration/cli/file-info/config-with-parser/.prettierrc @@ -0,0 +1 @@ +parser: parser-from-prettierrc diff --git a/tests/integration/cli/file-info/config-with-plugin/.prettierrc b/tests/integration/cli/file-info/config-with-plugin/.prettierrc new file mode 100644 index 000000000000..64bbc899a9ff --- /dev/null +++ b/tests/integration/cli/file-info/config-with-plugin/.prettierrc @@ -0,0 +1,2 @@ +plugins: + - ../plugin.js diff --git a/tests/integration/cli/file-info/empty-config/.prettierrc b/tests/integration/cli/file-info/empty-config/.prettierrc new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/tests/integration/cli/file-info/empty-config/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/tests/integration/cli/file-info/plugin.js b/tests/integration/cli/file-info/plugin.js new file mode 100644 index 000000000000..60027eb1b42b --- /dev/null +++ b/tests/integration/cli/file-info/plugin.js @@ -0,0 +1,10 @@ +export const languages = [ + { + parsers: ['parser-for-foo-file-from-plugin'], + extensions: ['.foo'] + }, + { + parsers: ['parser-for-bar-file-from-plugin'], + extensions: ['.bar'] + } +] diff --git a/tests/integration/cli/ignore-path/.gitignore b/tests/integration/cli/ignore-path/.gitignore deleted file mode 100644 index 507af97f1831..000000000000 --- a/tests/integration/cli/ignore-path/.gitignore +++ /dev/null @@ -1 +0,0 @@ -other-regular-modules.js diff --git a/tests/integration/cli/ignore-path/.prettierignore b/tests/integration/cli/ignore-path/.prettierignore deleted file mode 100644 index ca3fffe643a4..000000000000 --- a/tests/integration/cli/ignore-path/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -regular-module.js diff --git a/tests/integration/cli/ignore-path/file-info-test/.customignore b/tests/integration/cli/ignore-path/file-info-test/.customignore new file mode 100644 index 000000000000..b1f93ab82ab3 --- /dev/null +++ b/tests/integration/cli/ignore-path/file-info-test/.customignore @@ -0,0 +1 @@ +ignored-by-customignore.js diff --git a/tests/integration/cli/ignore-path/file-info-test/.prettierignore b/tests/integration/cli/ignore-path/file-info-test/.prettierignore new file mode 100644 index 000000000000..34fe7c38381a --- /dev/null +++ b/tests/integration/cli/ignore-path/file-info-test/.prettierignore @@ -0,0 +1 @@ +ignored-by-prettierignore.js diff --git a/tests/integration/cli/ignore-path/ignore-path-test/.customignore b/tests/integration/cli/ignore-path/ignore-path-test/.customignore new file mode 100644 index 000000000000..b1f93ab82ab3 --- /dev/null +++ b/tests/integration/cli/ignore-path/ignore-path-test/.customignore @@ -0,0 +1 @@ +ignored-by-customignore.js diff --git a/tests/integration/cli/ignore-path/ignore-path-test/.gitignore b/tests/integration/cli/ignore-path/ignore-path-test/.gitignore new file mode 100644 index 000000000000..a6c7c2852d06 --- /dev/null +++ b/tests/integration/cli/ignore-path/ignore-path-test/.gitignore @@ -0,0 +1 @@ +*.js diff --git a/tests/integration/cli/ignore-path/ignore-path-test/.prettierignore b/tests/integration/cli/ignore-path/ignore-path-test/.prettierignore new file mode 100644 index 000000000000..34fe7c38381a --- /dev/null +++ b/tests/integration/cli/ignore-path/ignore-path-test/.prettierignore @@ -0,0 +1 @@ +ignored-by-prettierignore.js diff --git a/tests/integration/cli/ignore-path/regular-module.js b/tests/integration/cli/ignore-vcs-files/.jj/file.js similarity index 100% rename from tests/integration/cli/ignore-path/regular-module.js rename to tests/integration/cli/ignore-vcs-files/.jj/file.js diff --git a/tests/integration/cli/infer-parser/.husky/pre-commit b/tests/integration/cli/infer-parser/.husky/pre-commit new file mode 100644 index 000000000000..f221ff072173 --- /dev/null +++ b/tests/integration/cli/infer-parser/.husky/pre-commit @@ -0,0 +1 @@ +content from file diff --git a/tests/integration/cli/infer-parser/override-builtin-plugin-languages/.prettierrc b/tests/integration/cli/infer-parser/override-builtin-plugin-languages/.prettierrc new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/tests/integration/cli/infer-parser/override-builtin-plugin-languages/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/tests/integration/cli/infer-parser/override-builtin-plugin-languages/dummy-js-plugin.js b/tests/integration/cli/infer-parser/override-builtin-plugin-languages/dummy-js-plugin.js new file mode 100644 index 000000000000..ed9c1f03cef4 --- /dev/null +++ b/tests/integration/cli/infer-parser/override-builtin-plugin-languages/dummy-js-plugin.js @@ -0,0 +1,21 @@ + +import createPlugin from "../../../../config/utils/create-plugin.cjs"; + +const PARSER_NAME = 'dummy-js-parser' +const PRINT_MARK = `formatted by '${PARSER_NAME}' parser` + +const languages = [ + { + parsers: [PARSER_NAME], + extensions: ['.js'] + } +] + +export default { + ...createPlugin({ + name: PARSER_NAME, + print: (content) => `${content.replace(PRINT_MARK,"").trim()}\n${PRINT_MARK}`, + finalNewLine: false, + }), + languages, +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/.prettierrc.mjs b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/.prettierrc.mjs new file mode 100644 index 000000000000..9413137935be --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/.prettierrc.mjs @@ -0,0 +1,10 @@ +export default { + overrides: [ + { + files: ["dir/*.foo"], + options: { + plugins: ["../../plugins/extensions/plugin.cjs"] + } + }, + ] +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/1.foo b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/1.foo new file mode 100644 index 000000000000..6d1f6b86c00f --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/1.foo @@ -0,0 +1 @@ +1.foo diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/dir/2.foo b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/dir/2.foo new file mode 100644 index 000000000000..e2b9e4725012 --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-complex-overrides/dir/2.foo @@ -0,0 +1 @@ +2.foo diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-config/foo.mjs b/tests/integration/cli/infer-plugins-ext-dir-with-config/foo.mjs new file mode 100644 index 000000000000..42554749d054 --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-config/foo.mjs @@ -0,0 +1,3 @@ +export default { + plugins: ["../../plugins/extensions/plugin.cjs"], +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-config/src/file.foo b/tests/integration/cli/infer-plugins-ext-dir-with-config/src/file.foo new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-config/src/file.foo @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-default-options/.prettierrc.mjs b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/.prettierrc.mjs new file mode 100644 index 000000000000..4a601c971556 --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/.prettierrc.mjs @@ -0,0 +1,3 @@ +export default { + plugins: ["../../plugins/defaultOptions/plugin.cjs"] +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/file.foo b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/file.foo new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/file.foo @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/index.js b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/index.js new file mode 100644 index 000000000000..9e449a2d9d1b --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-default-options/src/index.js @@ -0,0 +1,3 @@ +function main() { + console.log("Hello, World!"); +} diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/.prettierrc.mjs b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/.prettierrc.mjs new file mode 100644 index 000000000000..68a4dfd2e63a --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/.prettierrc.mjs @@ -0,0 +1,10 @@ +export default { + overrides: [ + { + files: ["*.foo"], + options: { + plugins: ["../../plugins/defaultOptions/plugin.cjs"] + } + } + ] +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/file.foo b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/file.foo new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/file.foo @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/index.js b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/index.js new file mode 100644 index 000000000000..9e449a2d9d1b --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides-and-default-options/src/index.js @@ -0,0 +1,3 @@ +function main() { + console.log("Hello, World!"); +} diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides/.prettierrc.mjs b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/.prettierrc.mjs new file mode 100644 index 000000000000..5849cbf6e631 --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/.prettierrc.mjs @@ -0,0 +1,16 @@ +export default { + overrides: [ + { + files: ["*.foo"], + options: { + plugins: ["../../plugins/extensions/plugin.cjs"] + } + }, + { + files: ["*.bar"], + options: { + plugins: ["../../plugins/extensions2/plugin.cjs"] + } + } + ] +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.bar b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.bar new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.bar @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.foo b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.foo new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir-with-overrides/src/file.foo @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-ext-dir/.prettierrc.mjs b/tests/integration/cli/infer-plugins-ext-dir/.prettierrc.mjs new file mode 100644 index 000000000000..42554749d054 --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir/.prettierrc.mjs @@ -0,0 +1,3 @@ +export default { + plugins: ["../../plugins/extensions/plugin.cjs"], +}; diff --git a/tests/integration/cli/infer-plugins-ext-dir/src/file.foo b/tests/integration/cli/infer-plugins-ext-dir/src/file.foo new file mode 100644 index 000000000000..12f00e90b6ef --- /dev/null +++ b/tests/integration/cli/infer-plugins-ext-dir/src/file.foo @@ -0,0 +1 @@ +contents diff --git a/tests/integration/cli/infer-plugins-with-multiple-config/dir/.prettierrc.mjs b/tests/integration/cli/infer-plugins-with-multiple-config/dir/.prettierrc.mjs new file mode 100644 index 000000000000..da14dc46d6ee --- /dev/null +++ b/tests/integration/cli/infer-plugins-with-multiple-config/dir/.prettierrc.mjs @@ -0,0 +1 @@ +export default { }; diff --git a/tests/integration/cli/infer-plugins-with-multiple-config/dir/1.foo b/tests/integration/cli/infer-plugins-with-multiple-config/dir/1.foo new file mode 100644 index 000000000000..6d1f6b86c00f --- /dev/null +++ b/tests/integration/cli/infer-plugins-with-multiple-config/dir/1.foo @@ -0,0 +1 @@ +1.foo diff --git a/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/.prettierrc.mjs b/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/.prettierrc.mjs new file mode 100644 index 000000000000..6804e840cc87 --- /dev/null +++ b/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/.prettierrc.mjs @@ -0,0 +1,3 @@ +export default { + plugins: ["../../../../plugins/defaultOptions/plugin.cjs"] +} diff --git a/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/2.foo b/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/2.foo new file mode 100644 index 000000000000..e2b9e4725012 --- /dev/null +++ b/tests/integration/cli/infer-plugins-with-multiple-config/dir/subdir/2.foo @@ -0,0 +1 @@ +2.foo diff --git a/tests/integration/cli/loglevel/.prettierrc b/tests/integration/cli/log-level/.prettierrc similarity index 100% rename from tests/integration/cli/loglevel/.prettierrc rename to tests/integration/cli/log-level/.prettierrc diff --git a/tests/integration/cli/patterns-backslashes/.gitignore b/tests/integration/cli/patterns-backslashes/.gitignore new file mode 100644 index 000000000000..e53c48ff5ab1 --- /dev/null +++ b/tests/integration/cli/patterns-backslashes/.gitignore @@ -0,0 +1,2 @@ +# dynamically created by tests +test-* diff --git a/tests/integration/cli/patterns-special-characters/dots/[...with-square-and-dots-brackets].js b/tests/integration/cli/patterns-special-characters/dots/[...with-square-and-dots-brackets].js new file mode 100644 index 000000000000..ad4733619455 --- /dev/null +++ b/tests/integration/cli/patterns-special-characters/dots/[...with-square-and-dots-brackets].js @@ -0,0 +1,4 @@ +foo( + + +) diff --git a/tests/integration/cli/patterns-special-characters/square-brackets/[with-square-brackets].js b/tests/integration/cli/patterns-special-characters/square-brackets/[with-square-brackets].js new file mode 100644 index 000000000000..ad4733619455 --- /dev/null +++ b/tests/integration/cli/patterns-special-characters/square-brackets/[with-square-brackets].js @@ -0,0 +1,4 @@ +foo( + + +) diff --git a/tests/integration/cli/patterns-symlinks/.gitignore b/tests/integration/cli/patterns-symlinks/.gitignore new file mode 100644 index 000000000000..e53c48ff5ab1 --- /dev/null +++ b/tests/integration/cli/patterns-symlinks/.gitignore @@ -0,0 +1,2 @@ +# dynamically created by tests +test-* diff --git a/tests/integration/cli/print-code/.prettierignore b/tests/integration/cli/print-code/.prettierignore new file mode 100644 index 000000000000..1615b0c68a90 --- /dev/null +++ b/tests/integration/cli/print-code/.prettierignore @@ -0,0 +1 @@ +ignored.js diff --git a/tests/integration/cli/print-code/ignored.js b/tests/integration/cli/print-code/ignored.js new file mode 100644 index 000000000000..d495fd9e7dcf --- /dev/null +++ b/tests/integration/cli/print-code/ignored.js @@ -0,0 +1,2 @@ +foo( +) diff --git a/tests/integration/cli/print-code/not-ignored.js b/tests/integration/cli/print-code/not-ignored.js new file mode 100644 index 000000000000..d495fd9e7dcf --- /dev/null +++ b/tests/integration/cli/print-code/not-ignored.js @@ -0,0 +1,2 @@ +foo( +) diff --git a/tests/integration/cli/ignore-emoji/.prettierignore b/tests/integration/cli/special-characters-in-path/ignore-emoji/.prettierignore similarity index 100% rename from tests/integration/cli/ignore-emoji/.prettierignore rename to tests/integration/cli/special-characters-in-path/ignore-emoji/.prettierignore diff --git a/tests/integration/cli/ignore-emoji/ignored/1.js b/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/1.js similarity index 100% rename from tests/integration/cli/ignore-emoji/ignored/1.js rename to tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/1.js diff --git "a/tests/integration/cli/ignore-emoji/ignored/\344\270\255\346\226\207.js" "b/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/\344\270\255\346\226\207.js" similarity index 100% rename from "tests/integration/cli/ignore-emoji/ignored/\344\270\255\346\226\207.js" rename to "tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/\344\270\255\346\226\207.js" diff --git "a/tests/integration/cli/ignore-emoji/ignored/\360\237\230\201.js" "b/tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/\360\237\230\201.js" similarity index 100% rename from "tests/integration/cli/ignore-emoji/ignored/\360\237\230\201.js" rename to "tests/integration/cli/special-characters-in-path/ignore-emoji/ignored/\360\237\230\201.js" diff --git a/tests/integration/cli/ignore-emoji/not-ignored.js b/tests/integration/cli/special-characters-in-path/ignore-emoji/not-ignored.js similarity index 100% rename from tests/integration/cli/ignore-emoji/not-ignored.js rename to tests/integration/cli/special-characters-in-path/ignore-emoji/not-ignored.js diff --git a/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/readme.md b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/readme.md new file mode 100644 index 000000000000..5071803aae7d --- /dev/null +++ b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/readme.md @@ -0,0 +1,11 @@ +This is a test fixture for an existing issue. + +Issue link: + +https://github.com/prettier/prettier/issues/15188 + +Can debug with this command + +```sh +node ../../../../../bin/prettier test +``` diff --git a/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/.editorconfig b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/.editorconfig new file mode 100644 index 000000000000..2a611d770897 --- /dev/null +++ b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +indent_size = 4 diff --git a/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/test.js b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/test.js new file mode 100644 index 000000000000..4fe137a90451 --- /dev/null +++ b/tests/integration/cli/special-characters-in-path/square-brackets-and-dash/test/username[repo-name]/test.js @@ -0,0 +1,5 @@ +function a() { +const foo += 'bar' +; +} diff --git a/tests/integration/cli/syntax-errors/invalid-1.js b/tests/integration/cli/syntax-errors/invalid-1.js new file mode 100644 index 000000000000..fe569e81405a --- /dev/null +++ b/tests/integration/cli/syntax-errors/invalid-1.js @@ -0,0 +1 @@ +foo (+-) bar diff --git a/tests/integration/cli/syntax-errors/invalid-2.js b/tests/integration/cli/syntax-errors/invalid-2.js new file mode 100644 index 000000000000..fe569e81405a --- /dev/null +++ b/tests/integration/cli/syntax-errors/invalid-2.js @@ -0,0 +1 @@ +foo (+-) bar diff --git a/tests/integration/cli/syntax-errors/invalid-2.unknown b/tests/integration/cli/syntax-errors/invalid-2.unknown new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/integration/cli/syntax-errors/valid-1.js b/tests/integration/cli/syntax-errors/valid-1.js new file mode 100644 index 000000000000..b0400ee9b26e --- /dev/null +++ b/tests/integration/cli/syntax-errors/valid-1.js @@ -0,0 +1 @@ +function foo() {} diff --git a/tests/integration/create-path-serializer.js b/tests/integration/create-path-serializer.js new file mode 100644 index 000000000000..f2e4a808d415 --- /dev/null +++ b/tests/integration/create-path-serializer.js @@ -0,0 +1,47 @@ +import { fileURLToPath } from "node:url"; + +const isWindows = process.platform === "win32"; +const replaceAll = (text, find, replacement) => + text.replaceAll + ? text.replaceAll(find, replacement) + : text.split(find).join(replacement); + +function createPathSerializer(options) { + const replacements = []; + for (const [url, replacement] of options.replacements.entries()) { + const path = fileURLToPath(url); + + for (const find of isWindows + ? [ + path.charAt(0).toLowerCase() + path.slice(1), + path.charAt(0).toUpperCase() + path.slice(1), + ] + : [path]) { + replacements.push({ find, replacement }); + } + } + + function replace(text) { + for (const { find, replacement } of replacements) { + text = replaceAll(text, find, replacement); + } + + return replaceAll(text, "\\", "/"); + } + + function test(value) { + return ( + typeof value === "string" && + (value.includes("\\") || + replacements.some(({ find }) => value.includes(find))) + ); + } + + function print(value, serializer) { + return serializer(replace(value)); + } + + return { test, print }; +} + +export default createPathSerializer; diff --git a/tests/integration/custom-parsers/custom-rename-input.js b/tests/integration/custom-parsers/custom-rename-input.js deleted file mode 100644 index 9d954e2ade19..000000000000 --- a/tests/integration/custom-parsers/custom-rename-input.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -foo ( ) diff --git a/tests/integration/custom-parsers/custom-rename-parser.js b/tests/integration/custom-parsers/custom-rename-parser.js deleted file mode 100644 index 900161184228..000000000000 --- a/tests/integration/custom-parsers/custom-rename-parser.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function (text, parsers) { - const ast = parsers.babel(text); - ast.program.body[0].expression.callee.name = "bar"; - return ast; -}; diff --git a/tests/integration/env.js b/tests/integration/env.js index 6d3eb472c203..cd6ade912f92 100644 --- a/tests/integration/env.js +++ b/tests/integration/env.js @@ -1,23 +1,30 @@ -"use strict"; +import path from "node:path"; +import createEsmUtils from "esm-utils"; + +const { __dirname, require } = createEsmUtils(import.meta); -const path = require("path"); const isProduction = process.env.NODE_ENV === "production"; const { PRETTIER_DIR } = process.env; const { bin } = require(path.join(PRETTIER_DIR, "package.json")); -const prettierCli = path.join( +const prettierCliEntry = path.join( PRETTIER_DIR, - typeof bin === "object" ? bin.prettier : bin + typeof bin === "object" ? bin.prettier : bin, ); -const thirdParty = isProduction - ? path.join(PRETTIER_DIR, "./third-party") - : path.join(PRETTIER_DIR, "./src/common/third-party"); +const prettierMainEntry = isProduction + ? path.join(PRETTIER_DIR, "./index.mjs") + : path.join(PRETTIER_DIR, "./src/index.js"); const projectRoot = path.join(__dirname, "../.."); -module.exports = { +const prettierCliMockableEntry = isProduction + ? path.join(PRETTIER_DIR, "./internal/legacy-cli.mjs") + : path.join(PRETTIER_DIR, "./src/cli/index.js"); + +export { isProduction, - thirdParty, - prettierCli, + prettierCliEntry, + prettierCliMockableEntry, + prettierMainEntry, projectRoot, }; diff --git a/tests/integration/integration-test-setup.js b/tests/integration/integration-test-setup.js new file mode 100644 index 000000000000..19c2d2160029 --- /dev/null +++ b/tests/integration/integration-test-setup.js @@ -0,0 +1,3 @@ +import runCli from "./run-cli.js"; + +globalThis.runCli = runCli; diff --git a/tests/integration/path-serializer.js b/tests/integration/path-serializer.js index e1d6592b1061..8704ea23ee28 100644 --- a/tests/integration/path-serializer.js +++ b/tests/integration/path-serializer.js @@ -1,28 +1,8 @@ -"use strict"; - -const replaceCWD = (text) => { - const cwd = process.cwd(); - - const variants = /^[a-z]:\\/i.test(cwd) - ? [ - cwd.charAt(0).toLowerCase() + cwd.slice(1), - cwd.charAt(0).toUpperCase() + cwd.slice(1), - ] - : [cwd]; - - for (const variant of variants) { - while (text.includes(variant)) { - text = text.replace(variant, "<cwd>"); - } - } - - return text; -}; - -module.exports = { - test: (value) => - typeof value === "string" && - (value.includes("\\") || value.includes(process.cwd())), - print: (value, serializer) => - serializer(replaceCWD(value).replace(/\\/g, "/")), -}; +import createPathSerializer from "./create-path-serializer.js"; + +export default createPathSerializer({ + replacements: new Map([ + [new URL("./cli/", import.meta.url), "<cli>/"], + [new URL("./plugins/", import.meta.url), "<plugins>/"], + ]), +}); diff --git a/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/index.js b/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/index.js index 710a3696fa84..6fd8b0c5f13c 100644 --- a/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/index.js +++ b/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/index.js @@ -1,25 +1,24 @@ "use strict"; -const prettier = require("prettier-local"); -const concat = prettier.doc.builders.concat; - module.exports = { languages: [ { name: "foo", parsers: ["foo"], - extensions: [".foo"] - } + extensions: [".foo"], + }, ], parsers: { foo: { parse: text => ({ text }), - astFormat: "foo" - } + astFormat: "foo", + }, }, printers: { foo: { - print: path => concat(["foo+", path.getValue().text]) - } - } + print(path) { + return ["foo+", path.getValue().text]; + }, + }, + }, }; diff --git a/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/package.json b/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/package.json index 0967ef424bce..b731bd61b9ce 100644 --- a/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/package.json +++ b/tests/integration/plugins/automatic/node_modules/@prettier/plugin-foo/package.json @@ -1 +1 @@ -{} +{"type": "commonjs"} diff --git a/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js b/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js index 750826efcaa4..bd7f142131b9 100644 --- a/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js +++ b/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js @@ -1,25 +1,24 @@ "use strict"; -const prettier = require("prettier-local"); -const concat = prettier.doc.builders.concat; - module.exports = { languages: [ { name: "foobar", parsers: ["foobar"], - extensions: [".foobar"] - } + extensions: [".foobar"], + }, ], parsers: { foobar: { parse: text => ({ text }), - astFormat: "foobar" - } + astFormat: "foobar", + }, }, printers: { foobar: { - print: path => concat(["foobar+", path.getValue().text]) - } - } + print(path) { + return ["foobar+", path.getValue().text]; + }, + }, + }, }; diff --git a/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/package.json b/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/package.json index 0967ef424bce..b731bd61b9ce 100644 --- a/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/package.json +++ b/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/package.json @@ -1 +1 @@ -{} +{"type": "commonjs"} diff --git a/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js b/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js index a0e9e70b5245..e4bf5c919f8e 100644 --- a/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js +++ b/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/index.js @@ -1,31 +1,26 @@ "use strict"; -const prettier = require("prettier-local"); -const { concat } = prettier.doc.builders; - module.exports = { languages: [ { name: "bar", - parsers: ["bar"] - } + parsers: ["bar"], + }, ], parsers: { bar: { parse: text => ({ text }), - astFormat: "bar" - } + astFormat: "bar", + }, }, printers: { bar: { - print: path => - concat([ - "content from `prettier-plugin-bar` package + ", - path.getValue().text - ]) - } + print(path) { + return ["content from `prettier-plugin-bar` package + ", path.getValue().text]; + }, + }, }, defaultOptions: { - tabWidth: 4 - } + tabWidth: 4, + }, }; diff --git a/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/package.json b/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/package.json index 0967ef424bce..b731bd61b9ce 100644 --- a/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/package.json +++ b/tests/integration/plugins/automatic/node_modules/prettier-plugin-bar/package.json @@ -1 +1 @@ -{} +{"type": "commonjs"} diff --git a/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/index.js b/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/index.js new file mode 100644 index 000000000000..04dbc89d2864 --- /dev/null +++ b/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/index.js @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "baz", + parsers: ["baz"], + }, + ], + parsers: { + baz: { + parse: text => ({ text }), + astFormat: "baz", + }, + }, + printers: { + baz: { + async print(path) { + const { default: prettier } = await import( + "../../../../../config/prettier-entry.js" + ); + const { concat } = prettier.doc.builders; + return concat(["content from `prettier-plugin-baz.js` package + ", path.getValue().text]); + }, + }, + }, + defaultOptions: { + tabWidth: 4, + }, +}; diff --git a/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/package.json b/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/package.json new file mode 100644 index 000000000000..b731bd61b9ce --- /dev/null +++ b/tests/integration/plugins/automatic/node_modules/prettier-plugin-baz.js/package.json @@ -0,0 +1 @@ +{"type": "commonjs"} diff --git a/tests/integration/plugins/automatic/prettier-plugin-bar.js b/tests/integration/plugins/automatic/prettier-plugin-bar.js deleted file mode 100644 index 500bcf2d577e..000000000000 --- a/tests/integration/plugins/automatic/prettier-plugin-bar.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -const prettier = require("prettier-local"); -const { concat } = prettier.doc.builders; - -module.exports = { - languages: [ - { - name: "bar", - parsers: ["bar"] - } - ], - parsers: { - bar: { - parse: text => ({ text }), - astFormat: "bar" - } - }, - printers: { - bar: { - print: path => - concat([ - "content from `prettier-plugin-bar.js` file + ", - path.getValue().text - ]) - } - }, - defaultOptions: { - tabWidth: 4 - } -}; diff --git a/tests/integration/plugins/automatic/prettier-plugin-baz.js b/tests/integration/plugins/automatic/prettier-plugin-baz.js new file mode 100644 index 000000000000..61fa15fb7aac --- /dev/null +++ b/tests/integration/plugins/automatic/prettier-plugin-baz.js @@ -0,0 +1,9 @@ +import createPlugin from "../../../config/utils/create-plugin.cjs"; + +const plugin = createPlugin({ + name: "baz", + print: (text) => `content from \`prettier-plugin-baz.js\` file + ${text}`, + finalNewLine: false, +}); + +export default plugin; diff --git a/tests/integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js b/tests/integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js index 2e99a9bad3d0..7af4f0273ff0 100644 --- a/tests/integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js +++ b/tests/integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js @@ -1,24 +1,23 @@ "use strict"; -const prettier = require("prettier-local"); -const concat = prettier.doc.builders.concat; - module.exports = { languages: [ { name: "bespoke", - parsers: ["bespoke"] - } + parsers: ["bespoke"], + }, ], parsers: { bespoke: { parse: text => ({ text }), astFormat: "bespoke" - } + }, }, printers: { bespoke: { - print: path => concat(["bespoke+", path.getValue().text]) - } - } + print(path) { + return ["bespoke+", path.getValue().text]; + }, + }, + }, }; diff --git a/tests/integration/plugins/defaultOptions/plugin.cjs b/tests/integration/plugins/defaultOptions/plugin.cjs new file mode 100644 index 000000000000..3f08e6fcfd4c --- /dev/null +++ b/tests/integration/plugins/defaultOptions/plugin.cjs @@ -0,0 +1,30 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + }, + ], + defaultOptions: { + tabWidth: 8, + bracketSpacing: false, + }, + parsers: { + "foo-parser": { + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print: (path, options) => + JSON.stringify({ + tabWidth: options.tabWidth, + bracketSpacing: options.bracketSpacing, + }), + }, + }, +}; diff --git a/tests/integration/plugins/defaultOptions/plugin.js b/tests/integration/plugins/defaultOptions/plugin.js deleted file mode 100644 index 1c72441cc245..000000000000 --- a/tests/integration/plugins/defaultOptions/plugin.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"] - } - ], - defaultOptions: { - tabWidth: 8, - bracketSpacing: false - }, - parsers: { - "foo-parser": { - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: (path, options) => - JSON.stringify({ - tabWidth: options.tabWidth, - bracketSpacing: options.bracketSpacing - }) - } - } -}; diff --git a/tests/integration/plugins/extensions/plugin.cjs b/tests/integration/plugins/extensions/plugin.cjs new file mode 100644 index 000000000000..be9f6c96a141 --- /dev/null +++ b/tests/integration/plugins/extensions/plugin.cjs @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + }, + ], + parsers: { + "foo-parser": { + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print(path) { + return ["!", path.getValue().text]; + }, + }, + }, +}; diff --git a/tests/integration/plugins/extensions/plugin.js b/tests/integration/plugins/extensions/plugin.js deleted file mode 100644 index 5e397a8b47d1..000000000000 --- a/tests/integration/plugins/extensions/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -const prettier = require("prettier-local"); -const { concat } = prettier.doc.builders; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"] - } - ], - parsers: { - "foo-parser": { - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: path => concat(["!", path.getValue().text]) - } - } -}; diff --git a/tests/integration/plugins/extensions2/plugin.cjs b/tests/integration/plugins/extensions2/plugin.cjs new file mode 100644 index 000000000000..50dfd3a53a81 --- /dev/null +++ b/tests/integration/plugins/extensions2/plugin.cjs @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "bar", + parsers: ["bar-parser"], + extensions: [".bar"], + }, + ], + parsers: { + "bar-parser": { + parse: (text) => ({ text }), + astFormat: "bar-ast", + }, + }, + printers: { + "bar-ast": { + print(path) { + return ["!", path.getValue().text]; + }, + }, + }, +}; diff --git a/tests/integration/plugins/flushLineSuffix/plugin.cjs b/tests/integration/plugins/flushLineSuffix/plugin.cjs new file mode 100644 index 000000000000..059e3475b7a3 --- /dev/null +++ b/tests/integration/plugins/flushLineSuffix/plugin.cjs @@ -0,0 +1,25 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + }, + ], + parsers: { + "foo-parser": { + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print(path) { + // TODO[@fisker]: Use `lineSuffix` after we support ESM plugin + return { type: "line-suffix", contents: path.getValue().text.trim() }; + }, + }, + }, +}; diff --git a/tests/integration/plugins/flushLineSuffix/plugin.js b/tests/integration/plugins/flushLineSuffix/plugin.js deleted file mode 100644 index 4690948ab2c4..000000000000 --- a/tests/integration/plugins/flushLineSuffix/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -const prettier = require("prettier-local"); -const { lineSuffix } = prettier.doc.builders; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"] - } - ], - parsers: { - "foo-parser": { - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: path => lineSuffix(path.getValue().text.trim()) - } - } -}; diff --git a/tests/integration/plugins/languages/is-supported.js b/tests/integration/plugins/languages/is-supported.js new file mode 100644 index 000000000000..60e8470508fb --- /dev/null +++ b/tests/integration/plugins/languages/is-supported.js @@ -0,0 +1,29 @@ +import path from "node:path"; +import createPlugin from "../../../config/utils/create-plugin.cjs"; + +const PARSER_NAME = "parser-name-inferred-from-language-is-supported"; +const PRINT_MARK = `formatted by '${PARSER_NAME}' parser` + +const languages = [ + { + name: "language-name-does-not-matter", + parsers: [PARSER_NAME], + isSupported({filepath}) { + // This is only true when running from CLI + if (!path.isAbsolute(filepath)) { + throw new Error("Unexpected non absolute path"); + } + + return /(?<separator>[\\/])\.husky\k<separator>[^\\/]+$/u.test(filepath); + }, + }, +]; + +export default { + ...createPlugin({ + name: PARSER_NAME, + print: (content) => `${content.replace(PRINT_MARK,"").trim()}\n${PRINT_MARK}`, + finalNewLine: false, + }), + languages, +}; diff --git a/tests/integration/plugins/options-string/config.json b/tests/integration/plugins/options-string/config.json index b6cca6ceb11a..a1d519299aeb 100644 --- a/tests/integration/plugins/options-string/config.json +++ b/tests/integration/plugins/options-string/config.json @@ -1,4 +1,4 @@ { - "plugins": ["./plugin"], + "plugins": ["./plugin.cjs"], "fooString": "baz" -} \ No newline at end of file +} diff --git a/tests/integration/plugins/options-string/plugin.cjs b/tests/integration/plugins/options-string/plugin.cjs new file mode 100644 index 000000000000..85f5cc5c24bd --- /dev/null +++ b/tests/integration/plugins/options-string/plugin.cjs @@ -0,0 +1,31 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + since: "1.0.0", + }, + ], + options: { + fooString: { + type: "string", + default: "bar", + description: "foo description", + }, + }, + parsers: { + "foo-parser": { + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print: (path, options) => + options.fooString ? `foo:${options.fooString}` : path.getValue().text, + }, + }, +}; diff --git a/tests/integration/plugins/options-string/plugin.js b/tests/integration/plugins/options-string/plugin.js deleted file mode 100644 index 110902001d91..000000000000 --- a/tests/integration/plugins/options-string/plugin.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"], - since: "1.0.0" - } - ], - options: { - fooString: { - type: "string", - default: "bar", - description: "foo description" - } - }, - parsers: { - "foo-parser": { - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: (path, options) => - options.fooString ? `foo:${options.fooString}` : path.getValue().text - } - } -}; diff --git a/tests/integration/plugins/options/config.json b/tests/integration/plugins/options/config.json index 4ee69abca43d..9eb8fce8c155 100644 --- a/tests/integration/plugins/options/config.json +++ b/tests/integration/plugins/options/config.json @@ -1,4 +1,4 @@ { - "plugins": ["./plugin"], + "plugins": ["./plugin.cjs"], "fooOption": "baz" -} \ No newline at end of file +} diff --git a/tests/integration/plugins/options/plugin.cjs b/tests/integration/plugins/options/plugin.cjs new file mode 100644 index 000000000000..2191f6994f76 --- /dev/null +++ b/tests/integration/plugins/options/plugin.cjs @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + since: "1.0.0", + }, + ], + options: { + fooOption: { + type: "choice", + default: "bar", + description: "foo description", + choices: [ + { + value: "bar", + description: "bar description", + }, + { + value: "baz", + description: "baz description", + }, + ], + }, + }, + parsers: { + "foo-parser": { + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print: (path, options) => + options.fooOption ? `foo:${options.fooOption}` : path.getValue().text, + }, + }, +}; diff --git a/tests/integration/plugins/options/plugin.js b/tests/integration/plugins/options/plugin.js deleted file mode 100644 index 2357369fb63e..000000000000 --- a/tests/integration/plugins/options/plugin.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"], - since: "1.0.0" - } - ], - options: { - fooOption: { - type: "choice", - default: "bar", - description: "foo description", - choices: [ - { - value: "bar", - description: "bar description" - }, - { - value: "baz", - description: "baz description" - } - ] - } - }, - parsers: { - "foo-parser": { - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: (path, options) => - options.fooOption ? `foo:${options.fooOption}` : path.getValue().text - } - } -}; diff --git a/tests/integration/plugins/preprocess/plugin.cjs b/tests/integration/plugins/preprocess/plugin.cjs new file mode 100644 index 000000000000..0e11e2138287 --- /dev/null +++ b/tests/integration/plugins/preprocess/plugin.cjs @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + languages: [ + { + name: "foo", + parsers: ["foo-parser"], + extensions: [".foo"], + since: "1.0.0", + }, + ], + parsers: { + "foo-parser": { + preprocess: (text) => `preprocessed:${text}`, + parse: (text) => ({ text }), + astFormat: "foo-ast", + }, + }, + printers: { + "foo-ast": { + print: (path) => path.getValue().text, + }, + }, +}; diff --git a/tests/integration/plugins/preprocess/plugin.js b/tests/integration/plugins/preprocess/plugin.js deleted file mode 100644 index 2405c6c12ddb..000000000000 --- a/tests/integration/plugins/preprocess/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -module.exports = { - languages: [ - { - name: "foo", - parsers: ["foo-parser"], - extensions: [".foo"], - since: "1.0.0" - } - ], - parsers: { - "foo-parser": { - preprocess: text => `preprocessed:${text}`, - parse: text => ({ text }), - astFormat: "foo-ast" - } - }, - printers: { - "foo-ast": { - print: path => path.getValue().text - } - } -}; diff --git a/tests/integration/print-doc.js b/tests/integration/print-doc.js index 08e58b2f4ee8..9ca0d5343777 100644 --- a/tests/integration/print-doc.js +++ b/tests/integration/print-doc.js @@ -1,7 +1,5 @@ -"use strict"; - /** @type {import('prettier')} */ -const prettier = require("prettier-local"); +import prettier from "../config/prettier-entry.js"; function printDoc(doc) { // This dummy plugin ignores the input and simply returns the given doc. @@ -27,4 +25,4 @@ function printDoc(doc) { }); } -module.exports = printDoc; +export default printDoc; diff --git a/tests/integration/run-cli.js b/tests/integration/run-cli.js new file mode 100644 index 000000000000..4959bfaa7598 --- /dev/null +++ b/tests/integration/run-cli.js @@ -0,0 +1,216 @@ +import childProcess from "node:child_process"; +import path from "node:path"; +import url from "node:url"; + +/** +@typedef {{ + isTTY?: boolean, + stdoutIsTTY?: boolean, + ci?: boolean, + mockWriteFileErrors?: Record<string, string>, + nodeOptions?: string[], + input?: string, +}} CliTestOptions +*/ + +// Though the doc says `childProcess.fork` accepts `URL`, but seems not true +// TODO: Use `URL` directly when we drop support for Node.js v14 +const CLI_WORKER_FILE = url.fileURLToPath( + new URL("./cli-worker.js", import.meta.url), +); +const INTEGRATION_TEST_DIRECTORY = url.fileURLToPath( + new URL("./", import.meta.url), +); +const IS_CI = Boolean(process.env.CI); +const removeFinalNewLine = (string) => + string.endsWith("\n") ? string.slice(0, -1) : string; +const SUPPORTS_DISABLE_WARNING_FLAG = + Number(process.versions.node.split(".")[0]) >= 20; +const promiseWithResolvers = Promise.withResolvers + ? Promise.withResolvers.bind(Promise) + : () => { + let resolve; + let reject; + const promise = new Promise( + (_resolve, _reject) => ([resolve, reject] = [_resolve, _reject]), + ); + return { promise, resolve, reject }; + }; + +/** + * @param {string} dir + * @param {string[]} args + * @param {CliTestOptions} options + */ +function runCliWorker(dir, args, options) { + const result = { + status: undefined, + stdout: "", + stderr: "", + write: [], + }; + const { promise, resolve, reject } = promiseWithResolvers(); + const createEpipeErrorHandler = (event) => (error) => { + if (!error) { + return; + } + + // It can fail with `write EPIPE` error when running node with unsupported flags like `--experimental-strip-types` + // Let's ignore and wait for the `close` event + if ( + error.code === "EPIPE" && + error.syscall === "write" && + nodeOptions.length > 0 + ) { + if (IS_CI) { + // eslint-disable-next-line no-console + console.error( + Object.assign(error, { event, dir, args, options, worker }), + ); + } + return; + } + + reject(error); + }; + + const nodeOptions = options?.nodeOptions ?? []; + const env = { + ...process.env, + ...options.env, + NO_COLOR: "1", + }; + delete env.FORCE_COLOR; + + const worker = childProcess.fork(CLI_WORKER_FILE, args, { + cwd: dir, + execArgv: [ + "--trace-deprecation", + ...(SUPPORTS_DISABLE_WARNING_FLAG + ? ["--disable-warning=ExperimentalWarning"] + : []), + ...nodeOptions, + ], + stdio: [options.input ? "pipe" : "ignore", "pipe", "pipe", "ipc"], + env, + serialization: "advanced", + }); + + worker.on("message", (message) => { + if (message.type === "cli:write-file") { + result.write.push(message.data); + } else if (message.type === "worker:fault") { + reject(message.error); + } + }); + + for (const stream of ["stdout", "stderr"]) { + worker[stream].on("data", (data) => { + result[stream] += data.toString(); + }); + } + + const removeStdioFinalNewLine = () => { + for (const stream of ["stdout", "stderr"]) { + result[stream] = removeFinalNewLine(result[stream]); + } + }; + + worker.once("close", (code) => { + result.status = code; + removeStdioFinalNewLine(); + resolve(result); + }); + + worker.once("error", (error) => { + reject(error); + }); + + worker.once("spawn", () => { + if (options.input) { + worker.stdin.once("error", createEpipeErrorHandler("worker.stdin.end()")); + worker.stdin.end(options.input); + } + + worker.send(options, createEpipeErrorHandler("worker.send()")); + }); + + return promise; +} + +function runPrettierCli(dir, args, options) { + dir = path.resolve(INTEGRATION_TEST_DIRECTORY, dir); + args = Array.isArray(args) ? args : [args]; + + return runCliWorker(dir, args, options); +} + +/** + * @param {string} dir + * @param {string[]} [args] + * @param {CliTestOptions} [options] + */ +function runCli(dir, args = [], options = {}) { + const promise = runPrettierCli(dir, args, options); + const getters = { + get status() { + return promise.then(({ status }) => status); + }, + get stdout() { + return promise.then(({ stdout }) => stdout); + }, + get stderr() { + return promise.then(({ stderr }) => stderr); + }, + get write() { + return promise.then(({ write }) => write); + }, + test: testResult, + then(onFulfilled, onRejected) { + return promise.then(onFulfilled, onRejected); + }, + }; + + return getters; + + function testResult(testOptions) { + test(options.title || "", async () => { + const result = await promise; + + let snapshot; + for (const name of ["status", "stdout", "stderr", "write"]) { + let value = result[name]; + // \r is trimmed from jest snapshots by default; + // manually replacing this character with /*CR*/ to test its true presence + // If ignoreLineEndings is specified, \r is simply deleted instead + if (name === "stdout" || name === "stderr") { + value = result[name].replace( + /\r/gu, + options.ignoreLineEndings ? "" : "/*CR*/", + ); + } + + if (name in testOptions) { + if (name === "status" && testOptions[name] === "non-zero") { + expect(value).not.toBe(0); + } else if (typeof testOptions[name] === "function") { + testOptions[name](value); + } else { + expect(value).toEqual(testOptions[name]); + } + } else { + snapshot = snapshot ?? {}; + snapshot[name] = value; + } + } + + if (snapshot) { + expect(snapshot).toMatchSnapshot(); + } + }); + + return getters; + } +} + +export default runCli; diff --git a/tests/integration/run-prettier.js b/tests/integration/run-prettier.js deleted file mode 100644 index 88b9ab9cfd51..000000000000 --- a/tests/integration/run-prettier.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const { default: stripAnsi } = require("../../vendors/strip-ansi.js"); -const { prettierCli, thirdParty } = require("./env.js"); - -async function run(dir, args, options) { - args = Array.isArray(args) ? args : [args]; - - let status; - let stdout = ""; - let stderr = ""; - - jest.spyOn(process, "exit").mockImplementation((exitCode) => { - if (status === undefined) { - status = exitCode || 0; - } - }); - - jest - .spyOn(process.stdout, "write") - .mockImplementation((text) => appendStdout(text)); - - jest - .spyOn(process.stderr, "write") - .mockImplementation((text) => appendStderr(text)); - - jest - .spyOn(console, "log") - .mockImplementation((text) => appendStdout(text + "\n")); - - jest - .spyOn(console, "warn") - .mockImplementation((text) => appendStderr(text + "\n")); - - jest - .spyOn(console, "error") - .mockImplementation((text) => appendStderr(text + "\n")); - - jest.spyOn(Date, "now").mockImplementation(() => 0); - - const write = []; - - jest - .spyOn(fs.promises, "writeFile") - // eslint-disable-next-line require-await - .mockImplementation(async (filename, content) => { - const error = (options.mockWriteFileErrors || {})[filename]; - if (error) { - throw new Error(error); - } - write.push({ filename, content }); - }); - - /* - A fake non-existing directory to test plugin search won't crash. - - See: - - `isDirectory` function in `src/common/load-plugins.js` - - Test file `./__tests__/plugin-virtual-directory.js` - - Pull request #5819 - */ - const originalStatSync = fs.statSync; - jest - .spyOn(fs, "statSync") - .mockImplementation((filename) => - originalStatSync( - path.basename(filename) === "virtualDirectory" ? __filename : filename - ) - ); - - const originalCwd = process.cwd(); - const originalArgv = process.argv; - const originalExitCode = process.exitCode; - const originalStdinIsTTY = process.stdin.isTTY; - const originalStdoutIsTTY = process.stdout.isTTY; - - process.chdir(normalizeDir(dir)); - process.stdin.isTTY = Boolean(options.isTTY); - process.stdout.isTTY = Boolean(options.stdoutIsTTY); - process.argv = ["path/to/node", "path/to/prettier/bin", ...args]; - - jest.resetModules(); - - // We cannot use `jest.setMock("get-stream", impl)` here, because in the - // production build everything is bundled into one file so there is no - // "get-stream" module to mock. - jest - .spyOn(require(thirdParty), "getStdin") - // eslint-disable-next-line require-await - .mockImplementation(async () => options.input || ""); - jest - .spyOn(require(thirdParty), "isCI") - .mockImplementation(() => Boolean(options.ci)); - jest - .spyOn(require(thirdParty), "cosmiconfig") - .mockImplementation((moduleName, options) => - require("cosmiconfig").cosmiconfig(moduleName, { - ...options, - stopDir: path.join(__dirname, "cli"), - }) - ); - jest - .spyOn(require(thirdParty), "cosmiconfigSync") - .mockImplementation((moduleName, options) => - require("cosmiconfig").cosmiconfigSync(moduleName, { - ...options, - stopDir: path.join(__dirname, "cli"), - }) - ); - jest - .spyOn(require(thirdParty), "findParentDir") - .mockImplementation(() => process.cwd()); - - try { - await require(prettierCli); - status = (status === undefined ? process.exitCode : status) || 0; - } catch (error) { - status = 1; - stderr += error.message; - } finally { - process.chdir(originalCwd); - process.argv = originalArgv; - process.exitCode = originalExitCode; - process.stdin.isTTY = originalStdinIsTTY; - process.stdout.isTTY = originalStdoutIsTTY; - jest.restoreAllMocks(); - } - - return { status, stdout, stderr, write }; - - function appendStdout(text) { - if (status === undefined) { - stdout += text; - } - } - function appendStderr(text) { - if (status === undefined) { - stderr += text; - } - } -} - -let hasRunningCli = false; -function runPrettier(dir, args = [], options = {}) { - let promise; - const getters = { - get status() { - return runCli().then(({ status }) => status); - }, - get stdout() { - return runCli().then(({ stdout }) => stdout); - }, - get stderr() { - return runCli().then(({ stderr }) => stderr); - }, - get write() { - return runCli().then(({ write }) => write); - }, - test: testResult, - then(onFulfilled, onRejected) { - return runCli().then(onFulfilled, onRejected); - }, - }; - - return getters; - - function runCli() { - if (hasRunningCli) { - throw new Error("Please wait for previous CLI to exit."); - } - - if (!promise) { - hasRunningCli = true; - promise = run(dir, args, options).finally(() => { - hasRunningCli = false; - }); - } - return promise; - } - - function testResult(testOptions) { - for (const name of ["status", "stdout", "stderr", "write"]) { - test(`${options.title || ""}(${name})`, async () => { - const result = await runCli(); - const value = - // \r is trimmed from jest snapshots by default; - // manually replacing this character with /*CR*/ to test its true presence - // If ignoreLineEndings is specified, \r is simply deleted instead - typeof result[name] === "string" - ? options.ignoreLineEndings - ? stripAnsi(result[name]).replace(/\r/g, "") - : stripAnsi(result[name]).replace(/\r/g, "/*CR*/") - : result[name]; - if (name in testOptions) { - if (name === "status" && testOptions[name] === "non-zero") { - expect(value).not.toBe(0); - } else if (typeof testOptions[name] === "function") { - testOptions[name](value); - } else { - expect(value).toEqual(testOptions[name]); - } - } else { - expect(value).toMatchSnapshot(); - } - }); - } - - return getters; - } -} - -function normalizeDir(dir) { - const isRelative = dir[0] !== "/"; - return isRelative ? path.resolve(__dirname, dir) : dir; -} - -module.exports = runPrettier; diff --git a/tests/unit/__snapshots__/html-elements.js.snap b/tests/unit/__snapshots__/html-elements.js.snap new file mode 100644 index 000000000000..cff6e7fa0010 --- /dev/null +++ b/tests/unit/__snapshots__/html-elements.js.snap @@ -0,0 +1,746 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`htmlTagNames 1`] = ` +[ + { + "display": "inline", + "tagName": "a", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "abbr", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "acronym", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "address", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "applet", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "area", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "article", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "aside", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "audio", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "b", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "base", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "basefont", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "bdi", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "bdo", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "bgsound", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "big", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "blink", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "blockquote", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "body", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "br", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "button", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "canvas", + "whiteSpace": "normal", + }, + { + "display": "table-caption", + "tagName": "caption", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "center", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "cite", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "code", + "whiteSpace": "normal", + }, + { + "display": "table-column", + "tagName": "col", + "whiteSpace": "normal", + }, + { + "display": "table-column-group", + "tagName": "colgroup", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "command", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "content", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "data", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "datalist", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "dd", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "del", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "details", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "dfn", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "dialog", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "dir", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "div", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "dl", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "dt", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "em", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "embed", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "fieldset", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "figcaption", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "figure", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "font", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "footer", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "form", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "frame", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "frameset", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h1", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h2", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h3", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h4", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h5", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "h6", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "head", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "header", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "hgroup", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "hr", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "html", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "i", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "iframe", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "image", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "img", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "input", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "ins", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "isindex", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "kbd", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "keygen", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "label", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "legend", + "whiteSpace": "normal", + }, + { + "display": "list-item", + "tagName": "li", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "link", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "listing", + "whiteSpace": "pre", + }, + { + "display": "block", + "tagName": "main", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "map", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "mark", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "marquee", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "math", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "menu", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "menuitem", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "meta", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "meter", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "multicol", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "nav", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "nextid", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "nobr", + "whiteSpace": "nowrap", + }, + { + "display": "none", + "tagName": "noembed", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "noframes", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "noscript", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "object", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "ol", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "optgroup", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "option", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "output", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "p", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "param", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "picture", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "plaintext", + "whiteSpace": "pre", + }, + { + "display": "block", + "tagName": "pre", + "whiteSpace": "pre", + }, + { + "display": "inline-block", + "tagName": "progress", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "q", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "rb", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "rbc", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "rp", + "whiteSpace": "normal", + }, + { + "display": "ruby-text", + "tagName": "rt", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "rtc", + "whiteSpace": "normal", + }, + { + "display": "ruby", + "tagName": "ruby", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "s", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "samp", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "script", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "search", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "section", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "select", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "shadow", + "whiteSpace": "normal", + }, + { + "display": "contents", + "tagName": "slot", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "small", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "source", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "spacer", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "span", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "strike", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "strong", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "style", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "sub", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "summary", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "sup", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "svg", + "whiteSpace": "normal", + }, + { + "display": "table", + "tagName": "table", + "whiteSpace": "initial", + }, + { + "display": "table-row-group", + "tagName": "tbody", + "whiteSpace": "normal", + }, + { + "display": "table-cell", + "tagName": "td", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "template", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "textarea", + "whiteSpace": "pre-wrap", + }, + { + "display": "table-footer-group", + "tagName": "tfoot", + "whiteSpace": "normal", + }, + { + "display": "table-cell", + "tagName": "th", + "whiteSpace": "normal", + }, + { + "display": "table-header-group", + "tagName": "thead", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "time", + "whiteSpace": "normal", + }, + { + "display": "none", + "tagName": "title", + "whiteSpace": "normal", + }, + { + "display": "table-row", + "tagName": "tr", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "track", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "tt", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "u", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "ul", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "var", + "whiteSpace": "normal", + }, + { + "display": "inline-block", + "tagName": "video", + "whiteSpace": "normal", + }, + { + "display": "inline", + "tagName": "wbr", + "whiteSpace": "normal", + }, + { + "display": "block", + "tagName": "xmp", + "whiteSpace": "pre", + }, +] +`; diff --git a/tests/unit/__snapshots__/visitor-keys.js.snap b/tests/unit/__snapshots__/visitor-keys.js.snap new file mode 100644 index 000000000000..35763cb938f3 --- /dev/null +++ b/tests/unit/__snapshots__/visitor-keys.js.snap @@ -0,0 +1,1868 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`visitor keys estree 1`] = ` +{ + "AccessorProperty": [ + "decorators", + "key", + "typeAnnotation", + "value", + ], + "AnyTypeAnnotation": [], + "ArgumentPlaceholder": [], + "ArrayExpression": [ + "elements", + ], + "ArrayPattern": [ + "decorators", + "elements", + "typeAnnotation", + ], + "ArrayTypeAnnotation": [ + "elementType", + ], + "ArrowFunctionExpression": [ + "body", + "params", + "predicate", + "returnType", + "typeParameters", + ], + "AsConstExpression": [ + "expression", + ], + "AsExpression": [ + "expression", + "typeAnnotation", + ], + "AssignmentExpression": [ + "left", + "right", + ], + "AssignmentPattern": [ + "decorators", + "left", + "right", + "typeAnnotation", + ], + "AwaitExpression": [ + "argument", + ], + "BigIntLiteral": [], + "BigIntLiteralTypeAnnotation": [], + "BigIntTypeAnnotation": [], + "BinaryExpression": [ + "left", + "right", + ], + "BindExpression": [ + "callee", + "object", + ], + "BlockStatement": [ + "body", + "directives", + ], + "BooleanLiteral": [], + "BooleanLiteralTypeAnnotation": [], + "BooleanTypeAnnotation": [], + "BreakStatement": [ + "label", + ], + "CallExpression": [ + "arguments", + "callee", + "typeArguments", + "typeParameters", + ], + "CatchClause": [ + "body", + "param", + ], + "ChainExpression": [ + "expression", + ], + "ClassAccessorProperty": [ + "decorators", + "key", + "typeAnnotation", + "value", + ], + "ClassBody": [ + "body", + ], + "ClassDeclaration": [ + "body", + "decorators", + "id", + "implements", + "mixins", + "superClass", + "superTypeArguments", + "superTypeParameters", + "typeParameters", + ], + "ClassExpression": [ + "body", + "decorators", + "id", + "implements", + "mixins", + "superClass", + "superTypeArguments", + "superTypeParameters", + "typeParameters", + ], + "ClassImplements": [ + "id", + "typeParameters", + ], + "ClassMethod": [ + "body", + "decorators", + "key", + "params", + "returnType", + "typeParameters", + ], + "ClassPrivateMethod": [ + "body", + "decorators", + "key", + "params", + "returnType", + "typeParameters", + ], + "ClassPrivateProperty": [ + "decorators", + "key", + "typeAnnotation", + "value", + "variance", + ], + "ClassProperty": [ + "decorators", + "key", + "typeAnnotation", + "value", + "variance", + ], + "ComponentDeclaration": [ + "body", + "id", + "params", + "rendersType", + "typeParameters", + ], + "ComponentParameter": [ + "local", + "name", + ], + "ComponentTypeAnnotation": [ + "params", + "rendersType", + "rest", + "typeParameters", + ], + "ComponentTypeParameter": [ + "name", + "typeAnnotation", + ], + "ConditionalExpression": [ + "alternate", + "consequent", + "test", + ], + "ConditionalTypeAnnotation": [ + "checkType", + "extendsType", + "falseType", + "trueType", + ], + "ContinueStatement": [ + "label", + ], + "DebuggerStatement": [], + "DeclareClass": [ + "body", + "extends", + "id", + "implements", + "mixins", + "typeParameters", + ], + "DeclareComponent": [ + "id", + "params", + "rendersType", + "rest", + "typeParameters", + ], + "DeclareEnum": [ + "body", + "id", + ], + "DeclareExportAllDeclaration": [ + "attributes", + "source", + ], + "DeclareExportDeclaration": [ + "attributes", + "declaration", + "source", + "specifiers", + ], + "DeclareFunction": [ + "id", + "predicate", + ], + "DeclareHook": [ + "id", + ], + "DeclareInterface": [ + "body", + "extends", + "id", + "typeParameters", + ], + "DeclareModule": [ + "body", + "id", + ], + "DeclareModuleExports": [ + "typeAnnotation", + ], + "DeclareNamespace": [ + "body", + "id", + ], + "DeclareOpaqueType": [ + "id", + "supertype", + "typeParameters", + ], + "DeclareTypeAlias": [ + "id", + "right", + "typeParameters", + ], + "DeclareVariable": [ + "id", + ], + "DeclaredPredicate": [ + "value", + ], + "Decorator": [ + "expression", + ], + "Directive": [ + "value", + ], + "DirectiveLiteral": [], + "DoExpression": [ + "body", + ], + "DoWhileStatement": [ + "body", + "test", + ], + "EmptyStatement": [], + "EmptyTypeAnnotation": [], + "EnumBigIntBody": [ + "members", + ], + "EnumBigIntMember": [ + "id", + "init", + ], + "EnumBooleanBody": [ + "members", + ], + "EnumBooleanMember": [ + "id", + "init", + ], + "EnumDeclaration": [ + "body", + "id", + ], + "EnumDefaultedMember": [ + "id", + ], + "EnumNumberBody": [ + "members", + ], + "EnumNumberMember": [ + "id", + "init", + ], + "EnumStringBody": [ + "members", + ], + "EnumStringMember": [ + "id", + "init", + ], + "EnumSymbolBody": [ + "members", + ], + "ExistsTypeAnnotation": [], + "ExperimentalRestProperty": [ + "argument", + ], + "ExperimentalSpreadProperty": [ + "argument", + ], + "ExportAllDeclaration": [ + "attributes", + "exported", + "source", + ], + "ExportDefaultDeclaration": [ + "declaration", + ], + "ExportDefaultSpecifier": [ + "exported", + ], + "ExportNamedDeclaration": [ + "attributes", + "declaration", + "source", + "specifiers", + ], + "ExportNamespaceSpecifier": [ + "exported", + ], + "ExportSpecifier": [ + "exported", + "local", + ], + "ExpressionStatement": [ + "expression", + ], + "File": [ + "program", + ], + "ForInStatement": [ + "body", + "left", + "right", + ], + "ForOfStatement": [ + "body", + "left", + "right", + ], + "ForStatement": [ + "body", + "init", + "test", + "update", + ], + "FunctionDeclaration": [ + "body", + "id", + "params", + "predicate", + "returnType", + "typeParameters", + ], + "FunctionExpression": [ + "body", + "id", + "params", + "returnType", + "typeParameters", + ], + "FunctionTypeAnnotation": [ + "params", + "rest", + "returnType", + "this", + "typeParameters", + ], + "FunctionTypeParam": [ + "name", + "typeAnnotation", + ], + "GenericTypeAnnotation": [ + "id", + "typeParameters", + ], + "HookDeclaration": [ + "body", + "id", + "params", + "returnType", + "typeParameters", + ], + "HookTypeAnnotation": [ + "params", + "rest", + "returnType", + "typeParameters", + ], + "Identifier": [ + "decorators", + "typeAnnotation", + ], + "IfStatement": [ + "alternate", + "consequent", + "test", + ], + "ImportAttribute": [ + "key", + "value", + ], + "ImportDeclaration": [ + "attributes", + "source", + "specifiers", + ], + "ImportDefaultSpecifier": [ + "local", + ], + "ImportExpression": [ + "options", + "source", + ], + "ImportNamespaceSpecifier": [ + "local", + ], + "ImportSpecifier": [ + "imported", + "local", + ], + "IndexedAccessType": [ + "indexType", + "objectType", + ], + "InferTypeAnnotation": [ + "typeParameter", + ], + "InferredPredicate": [], + "InterfaceDeclaration": [ + "body", + "extends", + "id", + "typeParameters", + ], + "InterfaceExtends": [ + "id", + "typeParameters", + ], + "InterfaceTypeAnnotation": [ + "body", + "extends", + ], + "InterpreterDirective": [], + "IntersectionTypeAnnotation": [ + "types", + ], + "JSXAttribute": [ + "name", + "value", + ], + "JSXClosingElement": [ + "name", + ], + "JSXClosingFragment": [], + "JSXElement": [ + "children", + "closingElement", + "openingElement", + ], + "JSXEmptyExpression": [], + "JSXExpressionContainer": [ + "expression", + ], + "JSXFragment": [ + "children", + "closingFragment", + "openingFragment", + ], + "JSXIdentifier": [], + "JSXMemberExpression": [ + "object", + "property", + ], + "JSXNamespacedName": [ + "name", + "namespace", + ], + "JSXOpeningElement": [ + "attributes", + "name", + "typeArguments", + "typeParameters", + ], + "JSXOpeningFragment": [], + "JSXSpreadAttribute": [ + "argument", + ], + "JSXSpreadChild": [ + "expression", + ], + "JSXText": [], + "JsExpressionRoot": [ + "node", + ], + "JsonRoot": [ + "node", + ], + "KeyofTypeAnnotation": [ + "argument", + ], + "LabeledStatement": [ + "body", + "label", + ], + "Literal": [], + "LogicalExpression": [ + "left", + "right", + ], + "MemberExpression": [ + "object", + "property", + ], + "MetaProperty": [ + "meta", + "property", + ], + "MethodDefinition": [ + "decorators", + "key", + "value", + ], + "MixedTypeAnnotation": [], + "ModuleExpression": [ + "body", + ], + "NGChainedExpression": [ + "expressions", + ], + "NGEmptyExpression": [], + "NGMicrosyntax": [ + "body", + ], + "NGMicrosyntaxAs": [ + "alias", + "key", + ], + "NGMicrosyntaxExpression": [ + "alias", + "expression", + ], + "NGMicrosyntaxKey": [], + "NGMicrosyntaxKeyedExpression": [ + "expression", + "key", + ], + "NGMicrosyntaxLet": [ + "key", + "value", + ], + "NGPipeExpression": [ + "arguments", + "left", + "right", + ], + "NGRoot": [ + "node", + ], + "NeverTypeAnnotation": [], + "NewExpression": [ + "arguments", + "callee", + "typeArguments", + "typeParameters", + ], + "Noop": [], + "NullLiteral": [], + "NullLiteralTypeAnnotation": [], + "NullableTypeAnnotation": [ + "typeAnnotation", + ], + "NumberLiteralTypeAnnotation": [], + "NumberTypeAnnotation": [], + "NumericLiteral": [], + "ObjectExpression": [ + "properties", + ], + "ObjectMethod": [ + "body", + "decorators", + "key", + "params", + "returnType", + "typeParameters", + ], + "ObjectPattern": [ + "decorators", + "properties", + "typeAnnotation", + ], + "ObjectProperty": [ + "decorators", + "key", + "value", + ], + "ObjectTypeAnnotation": [ + "callProperties", + "indexers", + "internalSlots", + "properties", + ], + "ObjectTypeCallProperty": [ + "value", + ], + "ObjectTypeIndexer": [ + "id", + "key", + "value", + "variance", + ], + "ObjectTypeInternalSlot": [ + "id", + "value", + ], + "ObjectTypeMappedTypeProperty": [ + "keyTparam", + "propType", + "sourceType", + "variance", + ], + "ObjectTypeProperty": [ + "key", + "value", + "variance", + ], + "ObjectTypeSpreadProperty": [ + "argument", + ], + "OpaqueType": [ + "id", + "impltype", + "supertype", + "typeParameters", + ], + "OptionalCallExpression": [ + "arguments", + "callee", + "typeArguments", + "typeParameters", + ], + "OptionalIndexedAccessType": [ + "indexType", + "objectType", + ], + "OptionalMemberExpression": [ + "object", + "property", + ], + "ParenthesizedExpression": [ + "expression", + ], + "PipelineBareFunction": [ + "callee", + ], + "PipelinePrimaryTopicReference": [], + "PipelineTopicExpression": [ + "expression", + ], + "Placeholder": [], + "PrivateIdentifier": [], + "PrivateName": [ + "id", + ], + "Program": [ + "body", + "directives", + ], + "Property": [ + "key", + "value", + ], + "PropertyDefinition": [ + "decorators", + "key", + "typeAnnotation", + "value", + "variance", + ], + "QualifiedTypeIdentifier": [ + "id", + "qualification", + ], + "QualifiedTypeofIdentifier": [ + "id", + "qualification", + ], + "RegExpLiteral": [], + "RestElement": [ + "argument", + "decorators", + "typeAnnotation", + ], + "ReturnStatement": [ + "argument", + ], + "SatisfiesExpression": [ + "expression", + "typeAnnotation", + ], + "SequenceExpression": [ + "expressions", + ], + "SpreadElement": [ + "argument", + ], + "StaticBlock": [ + "body", + ], + "StringLiteral": [], + "StringLiteralTypeAnnotation": [], + "StringTypeAnnotation": [], + "Super": [], + "SwitchCase": [ + "consequent", + "test", + ], + "SwitchStatement": [ + "cases", + "discriminant", + ], + "SymbolTypeAnnotation": [], + "TSAbstractAccessorProperty": [ + "decorators", + "key", + "typeAnnotation", + ], + "TSAbstractKeyword": [], + "TSAbstractMethodDefinition": [ + "key", + "value", + ], + "TSAbstractPropertyDefinition": [ + "decorators", + "key", + "typeAnnotation", + ], + "TSAnyKeyword": [], + "TSArrayType": [ + "elementType", + ], + "TSAsExpression": [ + "expression", + "typeAnnotation", + ], + "TSAsyncKeyword": [], + "TSBigIntKeyword": [], + "TSBooleanKeyword": [], + "TSCallSignatureDeclaration": [ + "parameters", + "params", + "returnType", + "typeAnnotation", + "typeParameters", + ], + "TSClassImplements": [ + "expression", + "typeArguments", + "typeParameters", + ], + "TSConditionalType": [ + "checkType", + "extendsType", + "falseType", + "trueType", + ], + "TSConstructSignatureDeclaration": [ + "parameters", + "params", + "returnType", + "typeAnnotation", + "typeParameters", + ], + "TSConstructorType": [ + "parameters", + "params", + "returnType", + "typeAnnotation", + "typeParameters", + ], + "TSDeclareFunction": [ + "body", + "id", + "params", + "returnType", + "typeParameters", + ], + "TSDeclareKeyword": [], + "TSDeclareMethod": [ + "decorators", + "key", + "params", + "returnType", + "typeParameters", + ], + "TSEmptyBodyFunctionExpression": [ + "id", + "params", + "returnType", + "typeParameters", + ], + "TSEnumBody": [ + "members", + ], + "TSEnumDeclaration": [ + "body", + "id", + ], + "TSEnumMember": [ + "id", + "initializer", + ], + "TSExportAssignment": [ + "expression", + ], + "TSExportKeyword": [], + "TSExpressionWithTypeArguments": [ + "expression", + "typeParameters", + ], + "TSExternalModuleReference": [ + "expression", + ], + "TSFunctionType": [ + "parameters", + "params", + "returnType", + "typeAnnotation", + "typeParameters", + ], + "TSImportEqualsDeclaration": [ + "id", + "moduleReference", + ], + "TSImportType": [ + "argument", + "options", + "qualifier", + "typeArguments", + "typeParameters", + ], + "TSIndexSignature": [ + "parameters", + "typeAnnotation", + ], + "TSIndexedAccessType": [ + "indexType", + "objectType", + ], + "TSInferType": [ + "typeParameter", + ], + "TSInstantiationExpression": [ + "expression", + "typeArguments", + "typeParameters", + ], + "TSInterfaceBody": [ + "body", + ], + "TSInterfaceDeclaration": [ + "body", + "extends", + "id", + "typeParameters", + ], + "TSInterfaceHeritage": [ + "expression", + "typeArguments", + "typeParameters", + ], + "TSIntersectionType": [ + "types", + ], + "TSIntrinsicKeyword": [], + "TSJSDocAllType": [], + "TSJSDocNonNullableType": [ + "typeAnnotation", + ], + "TSJSDocNullableType": [ + "typeAnnotation", + ], + "TSJSDocUnknownType": [], + "TSLiteralType": [ + "literal", + ], + "TSMappedType": [ + "constraint", + "key", + "nameType", + "typeAnnotation", + ], + "TSMethodSignature": [ + "key", + "parameters", + "params", + "returnType", + "typeAnnotation", + "typeParameters", + ], + "TSModuleBlock": [ + "body", + ], + "TSModuleDeclaration": [ + "body", + "id", + ], + "TSNamedTupleMember": [ + "elementType", + "label", + ], + "TSNamespaceExportDeclaration": [ + "id", + ], + "TSNeverKeyword": [], + "TSNonNullExpression": [ + "expression", + ], + "TSNullKeyword": [], + "TSNumberKeyword": [], + "TSObjectKeyword": [], + "TSOptionalType": [ + "typeAnnotation", + ], + "TSParameterProperty": [ + "decorators", + "parameter", + ], + "TSParenthesizedType": [ + "typeAnnotation", + ], + "TSPrivateKeyword": [], + "TSPropertySignature": [ + "key", + "typeAnnotation", + ], + "TSProtectedKeyword": [], + "TSPublicKeyword": [], + "TSQualifiedName": [ + "left", + "right", + ], + "TSReadonlyKeyword": [], + "TSRestType": [ + "typeAnnotation", + ], + "TSSatisfiesExpression": [ + "expression", + "typeAnnotation", + ], + "TSStaticKeyword": [], + "TSStringKeyword": [], + "TSSymbolKeyword": [], + "TSTemplateLiteralType": [ + "quasis", + "types", + ], + "TSThisType": [], + "TSTupleType": [ + "elementTypes", + ], + "TSTypeAliasDeclaration": [ + "id", + "typeAnnotation", + "typeParameters", + ], + "TSTypeAnnotation": [ + "typeAnnotation", + ], + "TSTypeAssertion": [ + "expression", + "typeAnnotation", + ], + "TSTypeLiteral": [ + "members", + ], + "TSTypeOperator": [ + "typeAnnotation", + ], + "TSTypeParameter": [ + "constraint", + "default", + "name", + ], + "TSTypeParameterDeclaration": [ + "params", + ], + "TSTypeParameterInstantiation": [ + "params", + ], + "TSTypePredicate": [ + "parameterName", + "typeAnnotation", + ], + "TSTypeQuery": [ + "exprName", + "typeArguments", + "typeParameters", + ], + "TSTypeReference": [ + "typeArguments", + "typeName", + "typeParameters", + ], + "TSUndefinedKeyword": [], + "TSUnionType": [ + "types", + ], + "TSUnknownKeyword": [], + "TSVoidKeyword": [], + "TaggedTemplateExpression": [ + "quasi", + "tag", + "typeArguments", + "typeParameters", + ], + "TemplateElement": [], + "TemplateLiteral": [ + "expressions", + "quasis", + ], + "ThisExpression": [], + "ThisTypeAnnotation": [], + "ThrowStatement": [ + "argument", + ], + "TopicReference": [], + "TryStatement": [ + "block", + "finalizer", + "handler", + ], + "TupleTypeAnnotation": [ + "elementTypes", + "types", + ], + "TupleTypeLabeledElement": [ + "elementType", + "label", + "variance", + ], + "TupleTypeSpreadElement": [ + "label", + "typeAnnotation", + ], + "TypeAlias": [ + "id", + "right", + "typeParameters", + ], + "TypeAnnotation": [ + "typeAnnotation", + ], + "TypeCastExpression": [ + "expression", + "typeAnnotation", + ], + "TypeOperator": [ + "typeAnnotation", + ], + "TypeParameter": [ + "bound", + "default", + "variance", + ], + "TypeParameterDeclaration": [ + "params", + ], + "TypeParameterInstantiation": [ + "params", + ], + "TypePredicate": [ + "asserts", + "parameterName", + "typeAnnotation", + ], + "TypeofTypeAnnotation": [ + "argument", + "typeArguments", + ], + "UnaryExpression": [ + "argument", + ], + "UndefinedTypeAnnotation": [], + "UnionTypeAnnotation": [ + "types", + ], + "UnknownTypeAnnotation": [], + "UpdateExpression": [ + "argument", + ], + "V8IntrinsicIdentifier": [], + "VariableDeclaration": [ + "declarations", + ], + "VariableDeclarator": [ + "id", + "init", + ], + "Variance": [], + "VoidTypeAnnotation": [], + "WhileStatement": [ + "body", + "test", + ], + "WithStatement": [ + "body", + "object", + ], + "YieldExpression": [ + "argument", + ], +} +`; + +exports[`visitor keys estree-json 1`] = ` +{ + "ArrayExpression": [ + "elements", + ], + "BooleanLiteral": [], + "Identifier": [], + "JsonRoot": [ + "node", + ], + "NullLiteral": [], + "NumericLiteral": [], + "ObjectExpression": [ + "properties", + ], + "ObjectProperty": [ + "key", + "value", + ], + "StringLiteral": [], + "TemplateElement": [], + "TemplateLiteral": [ + "quasis", + ], + "UnaryExpression": [ + "argument", + ], +} +`; + +exports[`visitor keys glimmer 1`] = ` +{ + "AttrNode": [ + "value", + ], + "Block": [ + "body", + ], + "BlockStatement": [ + "hash", + "inverse", + "params", + "path", + "program", + ], + "BooleanLiteral": [], + "CommentStatement": [], + "ConcatStatement": [ + "parts", + ], + "ElementModifierStatement": [ + "hash", + "params", + "path", + ], + "ElementNode": [ + "attributes", + "children", + "comments", + "modifiers", + ], + "Hash": [ + "pairs", + ], + "HashPair": [ + "value", + ], + "MustacheCommentStatement": [], + "MustacheStatement": [ + "hash", + "params", + "path", + ], + "NullLiteral": [], + "NumberLiteral": [], + "PathExpression": [], + "StringLiteral": [], + "SubExpression": [ + "hash", + "params", + "path", + ], + "Template": [ + "body", + ], + "TextNode": [], + "UndefinedLiteral": [], +} +`; + +exports[`visitor keys graphql 1`] = ` +{ + "Argument": [ + "name", + "value", + ], + "BooleanValue": [], + "Directive": [ + "arguments", + "name", + ], + "DirectiveDefinition": [ + "arguments", + "description", + "locations", + "name", + ], + "Document": [ + "definitions", + ], + "EnumTypeDefinition": [ + "description", + "directives", + "name", + "values", + ], + "EnumTypeExtension": [ + "directives", + "name", + "values", + ], + "EnumValue": [], + "EnumValueDefinition": [ + "description", + "directives", + "name", + ], + "Field": [ + "alias", + "arguments", + "directives", + "name", + "selectionSet", + ], + "FieldDefinition": [ + "arguments", + "description", + "directives", + "name", + "type", + ], + "FloatValue": [], + "FragmentDefinition": [ + "directives", + "name", + "selectionSet", + "typeCondition", + "variableDefinitions", + ], + "FragmentSpread": [ + "directives", + "name", + ], + "InlineFragment": [ + "directives", + "selectionSet", + "typeCondition", + ], + "InputObjectTypeDefinition": [ + "description", + "directives", + "fields", + "name", + ], + "InputObjectTypeExtension": [ + "directives", + "fields", + "name", + ], + "InputValueDefinition": [ + "defaultValue", + "description", + "directives", + "name", + "type", + ], + "IntValue": [], + "InterfaceTypeDefinition": [ + "description", + "directives", + "fields", + "interfaces", + "name", + ], + "InterfaceTypeExtension": [ + "directives", + "fields", + "interfaces", + "name", + ], + "ListType": [ + "type", + ], + "ListValue": [ + "values", + ], + "Name": [], + "NamedType": [ + "name", + ], + "NonNullType": [ + "type", + ], + "NullValue": [], + "ObjectField": [ + "name", + "value", + ], + "ObjectTypeDefinition": [ + "description", + "directives", + "fields", + "interfaces", + "name", + ], + "ObjectTypeExtension": [ + "directives", + "fields", + "interfaces", + "name", + ], + "ObjectValue": [ + "fields", + ], + "OperationDefinition": [ + "directives", + "name", + "selectionSet", + "variableDefinitions", + ], + "OperationTypeDefinition": [ + "type", + ], + "ScalarTypeDefinition": [ + "description", + "directives", + "name", + ], + "ScalarTypeExtension": [ + "directives", + "name", + ], + "SchemaDefinition": [ + "description", + "directives", + "operationTypes", + ], + "SchemaExtension": [ + "directives", + "operationTypes", + ], + "SelectionSet": [ + "selections", + ], + "StringValue": [], + "UnionTypeDefinition": [ + "description", + "directives", + "name", + "types", + ], + "UnionTypeExtension": [ + "directives", + "name", + "types", + ], + "Variable": [ + "name", + ], + "VariableDefinition": [ + "defaultValue", + "directives", + "type", + "variable", + ], +} +`; + +exports[`visitor keys html 1`] = ` +{ + "angularControlFlowBlock": [ + "children", + "parameters", + ], + "angularControlFlowBlockParameter": [], + "angularControlFlowBlockParameters": [ + "children", + ], + "angularIcuCase": [ + "expression", + ], + "angularIcuExpression": [ + "cases", + ], + "angularLetDeclaration": [ + "init", + ], + "angularLetDeclarationInitializer": [], + "attribute": [], + "cdata": [], + "comment": [], + "docType": [], + "element": [ + "attrs", + "children", + ], + "front-matter": [], + "ieConditionalComment": [ + "children", + ], + "ieConditionalEndComment": [], + "ieConditionalStartComment": [], + "interpolation": [ + "children", + ], + "root": [ + "children", + ], + "text": [ + "children", + ], +} +`; + +exports[`visitor keys postcss 1`] = ` +{ + "css-atrule": [ + "nodes", + "params", + "selector", + "value", + ], + "css-comment": [], + "css-decl": [ + "nodes", + "selector", + "value", + ], + "css-root": [ + "frontMatter", + "nodes", + ], + "css-rule": [ + "nodes", + "selector", + ], + "front-matter": [], + "media-colon": [], + "media-feature": [], + "media-feature-expression": [ + "nodes", + ], + "media-keyword": [], + "media-query": [ + "nodes", + ], + "media-query-list": [ + "nodes", + ], + "media-type": [], + "media-unknown": [], + "media-url": [], + "media-value": [], + "selector-attribute": [], + "selector-class": [], + "selector-combinator": [ + "nodes", + ], + "selector-comment": [], + "selector-id": [], + "selector-nesting": [], + "selector-pseudo": [ + "nodes", + ], + "selector-root": [ + "nodes", + ], + "selector-selector": [ + "nodes", + ], + "selector-string": [], + "selector-tag": [], + "selector-universal": [], + "selector-unknown": [], + "value-atword": [], + "value-colon": [], + "value-comma": [], + "value-comma_group": [ + "groups", + ], + "value-comment": [], + "value-func": [ + "group", + ], + "value-number": [], + "value-operator": [], + "value-paren": [], + "value-paren_group": [ + "close", + "groups", + "open", + ], + "value-root": [ + "group", + ], + "value-string": [], + "value-unicode-range": [], + "value-unknown": [], + "value-value": [ + "group", + ], + "value-word": [], +} +`; + +exports[`visitor keys remark 1`] = ` +{ + "blockquote": [ + "children", + ], + "break": [], + "code": [], + "definition": [], + "delete": [ + "children", + ], + "emphasis": [ + "children", + ], + "esComment": [], + "export": [], + "footnote": [ + "children", + ], + "footnoteDefinition": [ + "children", + ], + "footnoteReference": [], + "front-matter": [], + "heading": [ + "children", + ], + "html": [], + "image": [], + "imageReference": [], + "import": [], + "inlineCode": [], + "inlineMath": [], + "jsx": [], + "link": [ + "children", + ], + "linkReference": [ + "children", + ], + "liquidNode": [], + "list": [ + "children", + ], + "listItem": [ + "children", + ], + "math": [], + "paragraph": [ + "children", + ], + "root": [ + "children", + ], + "sentence": [ + "children", + ], + "strong": [ + "children", + ], + "table": [ + "children", + ], + "tableCell": [ + "children", + ], + "tableRow": [ + "children", + ], + "text": [], + "thematicBreak": [], + "whitespace": [], + "wikiLink": [], + "word": [], +} +`; + +exports[`visitor keys yaml 1`] = ` +{ + "alias": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "anchor": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "blockFolded": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "blockLiteral": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "comment": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "directive": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "document": [ + "anchor", + "body", + "children", + "endComments", + "head", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "documentBody": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "documentHead": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "flowMapping": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "flowMappingItem": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "key", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + "value", + ], + "flowSequence": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "flowSequenceItem": [ + "anchor", + "children", + "content", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "mapping": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "mappingItem": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "key", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + "value", + ], + "mappingKey": [ + "anchor", + "children", + "content", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "mappingValue": [ + "anchor", + "children", + "content", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "plain": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "quoteDouble": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "quoteSingle": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "root": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "sequence": [ + "anchor", + "children", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "sequenceItem": [ + "anchor", + "children", + "content", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], + "tag": [ + "anchor", + "endComments", + "indicatorComment", + "leadingComments", + "middleComments", + "tag", + "trailingComment", + ], +} +`; diff --git a/tests/unit/ast-path.js b/tests/unit/ast-path.js new file mode 100644 index 000000000000..a7916b289bdc --- /dev/null +++ b/tests/unit/ast-path.js @@ -0,0 +1,76 @@ +import AstPath from "../../src/common/ast-path.js"; + +const error = new Error("A dummy error"); +const throwError = () => { + throw error; +}; + +describe("AstPath", () => { + const ast = { + property: { + deep: { name: "deep" }, + }, + children: [{ index: 0 }, { index: 1 }], + }; + + test("AstPath#call()", () => { + const path = new AstPath(ast); + + expect(path.call(() => path.getValue(), "property")).toBe(ast.property); + expect(() => path.call(throwError, "property")).toThrow(error); + expect(path.stack.length).toBe(1); + }); + + test("AstPath#callParent()", () => { + const path = new AstPath(ast); + path.stack.push("property", ast.property, "deep", ast.property.deep); + + expect(path.callParent(() => path.getValue())).toBe(ast.property); + expect(() => path.callParent(throwError)).toThrow(error); + expect(path.stack.length).toBe(5); + }); + + test("AstPath#each()", () => { + const path = new AstPath(ast); + + { + const called = []; + path.each(() => called.push(path.getValue()), "children"); + expect(called).toEqual(ast.children); + } + + { + const called = []; + expect(() => { + path.each((_, index) => { + if (index === 1) { + throwError(); + } + called.push(path.getValue()); + }, "children"); + }).toThrow(error); + expect(called.length).toBe(1); + expect(path.stack.length).toBe(1); + } + }); + + test("AstPath#map()", () => { + const path = new AstPath(ast); + + expect(path.map(() => path.getValue(), "children")).toEqual(ast.children); + + { + let result; + expect(() => { + result = path.map((_, index) => { + if (index === 1) { + throwError(); + } + return path.getValue(); + }, "children"); + }).toThrow(error); + expect(result).toBeUndefined(); + expect(path.stack.length).toBe(1); + } + }); +}); diff --git a/tests/unit/builtin-plugins.js b/tests/unit/builtin-plugins.js new file mode 100644 index 000000000000..31a11629d31b --- /dev/null +++ b/tests/unit/builtin-plugins.js @@ -0,0 +1,50 @@ +import loadBuiltinPlugins from "../../src/main/plugins/load-builtin-plugins.js"; + +// Snapshot to prevent mistakes +test("builtin parsers", async () => { + const parserNames = (await loadBuiltinPlugins()) + .flatMap((plugin) => (plugin.parsers ? Object.keys(plugin.parsers) : [])) + .sort(); + + expect(parserNames).toMatchInlineSnapshot(` + [ + "__babel_estree", + "__js_expression", + "__ng_action", + "__ng_binding", + "__ng_directive", + "__ng_interpolation", + "__ts_expression", + "__vue_event_binding", + "__vue_expression", + "__vue_ts_event_binding", + "__vue_ts_expression", + "acorn", + "angular", + "babel", + "babel-flow", + "babel-ts", + "css", + "espree", + "flow", + "glimmer", + "graphql", + "html", + "json", + "json-stringify", + "json5", + "jsonc", + "less", + "lwc", + "markdown", + "mdx", + "meriyah", + "mjml", + "remark", + "scss", + "typescript", + "vue", + "yaml", + ] + `); +}); diff --git a/tests/unit/doc-builders.js b/tests/unit/doc-builders.js new file mode 100644 index 000000000000..da5e14c6677e --- /dev/null +++ b/tests/unit/doc-builders.js @@ -0,0 +1,109 @@ +import { + addAlignmentToDoc, + align, + conditionalGroup, + dedent, + dedentToRoot, + fill, + group, + ifBreak, + indent, + indentIfBreak, + join, + label, + line, + lineSuffix, + markAsRoot, +} from "../../src/document/builders.js"; +import InvalidDocError from "../../src/document/invalid-doc-error.js"; + +const invalidDoc = { type: "invalid-type" }; +const validDoc = "string"; +const notArray = {}; +describe("doc builders", () => { + const invalid = [ + () => indent(), + () => indent(invalidDoc), + + () => align(2), + () => align(2, invalidDoc), + + () => group(), + () => group(invalidDoc), + [() => group(validDoc, { expandedStates: notArray }), TypeError], + () => group(validDoc, { expandedStates: [invalidDoc] }), + + () => dedentToRoot(), + () => dedentToRoot(invalidDoc), + + () => markAsRoot(), + () => markAsRoot(invalidDoc), + + () => dedent(), + () => dedent(invalidDoc), + + [() => conditionalGroup(), TypeError], + () => conditionalGroup([]), + () => conditionalGroup([invalidDoc]), + () => conditionalGroup([validDoc, invalidDoc]), + + [() => fill(), TypeError], + [() => fill(notArray), TypeError], + () => fill([invalidDoc]), + [() => fill(["abc", "abc"]), Error], + [() => fill(["abc", line, "def", "ghi"]), Error], + [() => fill(["abc", [line, "def"], "ghi"]), Error], + [() => fill(["abc", "", "def"]), Error], + + () => ifBreak(), + () => ifBreak(invalidDoc), + () => ifBreak(validDoc, 0), + () => ifBreak(validDoc, null), + () => ifBreak(validDoc, invalidDoc), + + () => indentIfBreak(), + () => indentIfBreak(invalidDoc), + + () => lineSuffix(), + () => lineSuffix(invalidDoc), + + () => join(), + () => join(invalidDoc), + () => join(invalidDoc, []), + [() => join(validDoc, notArray), TypeError], + () => join(validDoc, [invalidDoc]), + + () => addAlignmentToDoc(), + () => addAlignmentToDoc(invalidDoc), + + () => label(), + () => label({}, invalidDoc), + ]; + + const valid = [ + group(validDoc), + group(validDoc, { expandedStates: undefined }), + + ifBreak(validDoc), + // eslint-disable-next-line unicorn/no-useless-undefined + ifBreak(validDoc, undefined), + ]; + + describe("Invalid usage", () => { + for (let invalidCase of invalid) { + if (!Array.isArray(invalidCase)) { + invalidCase = [invalidCase, InvalidDocError]; + } + + test(invalidCase[0].toString(), () => { + expect(invalidCase[0]).toThrow(invalidCase[1]); + }); + } + }); + + test("Valid usage", () => { + for (const doc of valid) { + expect(doc).toBeDefined(); + } + }); +}); diff --git a/tests/unit/doc-printer.js b/tests/unit/doc-printer.js new file mode 100644 index 000000000000..86988d9227a6 --- /dev/null +++ b/tests/unit/doc-printer.js @@ -0,0 +1,70 @@ +// TODO: Find a better way to test the performance +import { fill, join, line } from "../../src/document/builders.js"; +import { printDocToString } from "../../src/document/printer.js"; + +test("`printDocToString` should not manipulate docs", () => { + const printOptions = { printWidth: 40, tabWidth: 2 }; + const doc = fill( + join( + line, + Array.from({ length: 255 }, (_, index) => String(index + 1)), + ), + ); + + expect(doc.parts.length).toBe(255 + 254); + + const { formatted: firstPrint } = printDocToString(doc, printOptions); + + expect(doc.parts.length).toBe(255 + 254); + + const { formatted: secondPrint } = printDocToString(doc, printOptions); + + expect(firstPrint).toBe(secondPrint); + + { + // About 1000 lines, #3263 + const WORD = "word"; + const hugeParts = join( + line, + Array.from( + { length: 1000 * Math.ceil(printOptions.printWidth / WORD.length) }, + () => WORD, + ), + ); + const orignalLength = hugeParts.length; + + const startTime = performance.now(); + const { formatted } = printDocToString(fill(hugeParts), printOptions); + const endTime = performance.now(); + expect(hugeParts.length).toBe(orignalLength); + + const lines = formatted.split("\n"); + expect(lines.length).toBeGreaterThan(1000); + expect(endTime - startTime).toBeLessThan(150); + } +}); + +describe("`printDocToString` has linear time complexity at most to print fill()", () => { + const baseSize = 3_000; + const relativeMargin = 0.7; + const baseTime = time(makeFill(baseSize)); + test.each([20_000, 40_000, 60_000])("numWords=%d", (numWords) => { + const doc = makeFill(numWords); + const ellapsed = time(doc); + const ratio = numWords / baseSize; + expect(ellapsed).toBeLessThan(baseTime * ratio * (1 + relativeMargin)); + }); + + function makeFill(numWords) { + const WORD = "word"; + const parts = Array.from({ length: numWords }, () => WORD); + return fill(join(line, parts)); + } + + function time(doc) { + const printOptions = { printWidth: 40, tabWidth: 2 }; + const start = performance.now(); + printDocToString(doc, printOptions); + return performance.now() - start; + } +}); diff --git a/tests/unit/editorconfig-to-prettier.js b/tests/unit/editorconfig-to-prettier.js new file mode 100644 index 000000000000..c12c8801966e --- /dev/null +++ b/tests/unit/editorconfig-to-prettier.js @@ -0,0 +1,139 @@ +import editorconfigToPrettier from "../../src/config/editorconfig/editorconfig-to-prettier.js"; + +test("editorconfigToPrettier", () => { + expect( + editorconfigToPrettier({ + indent_style: "tab", + tab_width: 8, + indent_size: 2, + max_line_length: 100, + }), + ).toStrictEqual({ + useTabs: true, + tabWidth: 8, + printWidth: 100, + }); + + expect( + editorconfigToPrettier({ + indent_style: "space", + tab_width: 8, + indent_size: 2, + max_line_length: 100, + }), + ).toStrictEqual({ + useTabs: false, + tabWidth: 2, + printWidth: 100, + }); + + expect( + editorconfigToPrettier({ + indent_style: "space", + tab_width: 8, + indent_size: 8, + max_line_length: 100, + }), + ).toStrictEqual({ + useTabs: false, + tabWidth: 8, + printWidth: 100, + }); + + expect( + editorconfigToPrettier({ + tab_width: 4, + indent_size: "tab", + }), + ).toStrictEqual({ + tabWidth: 4, + useTabs: true, + }); + + expect( + editorconfigToPrettier({ + indent_size: "tab", + }), + ).toStrictEqual({ + useTabs: true, + }); + + expect( + editorconfigToPrettier({ + tab_width: 0, + indent_size: 0, + }), + ).toStrictEqual({ + tabWidth: 0, + }); + + expect( + editorconfigToPrettier({ + quote_type: "single", + }), + ).toStrictEqual({ + singleQuote: true, + }); + + expect( + editorconfigToPrettier({ + quote_type: "double", + }), + ).toStrictEqual({ + singleQuote: false, + }); + + expect( + editorconfigToPrettier({ + quote_type: "double", + max_line_length: "off", + }), + ).toStrictEqual({ + printWidth: Number.POSITIVE_INFINITY, + singleQuote: false, + }); + + expect( + editorconfigToPrettier({ + end_of_line: "cr", + }), + ).toStrictEqual({ + endOfLine: "cr", + }); + + expect( + editorconfigToPrettier({ + end_of_line: "crlf", + }), + ).toStrictEqual({ + endOfLine: "crlf", + }); + + expect( + editorconfigToPrettier({ + end_of_line: "lf", + }), + ).toStrictEqual({ + endOfLine: "lf", + }); + + expect( + editorconfigToPrettier({ + endOfLine: 123, + }), + ).toStrictEqual({}); + + expect( + editorconfigToPrettier({ + indent_style: "space", + indent_size: 2, + max_line_length: "unset", + }), + ).toStrictEqual({ + useTabs: false, + tabWidth: 2, + }); + + expect(editorconfigToPrettier({})).toBeNull(); + expect(editorconfigToPrettier(null)).toBeNull(); +}); diff --git a/tests/unit/errors.js b/tests/unit/errors.js new file mode 100644 index 000000000000..c5f256be16c5 --- /dev/null +++ b/tests/unit/errors.js @@ -0,0 +1,23 @@ +import { + ArgExpansionBailout, + ConfigError, + UndefinedParserError, +} from "../../src/common/errors.js"; + +it("ConfigError", () => { + const error = new ConfigError("foo"); + expect(error.name).toBe("ConfigError"); + expect(error.message).toBe("foo"); +}); + +it("UndefinedParserError", () => { + const error = new UndefinedParserError("foo"); + expect(error.name).toBe("UndefinedParserError"); + expect(error.message).toBe("foo"); +}); + +it("ArgExpansionBailout", () => { + const error = new ArgExpansionBailout("foo"); + expect(error.name).toBe("ArgExpansionBailout"); + expect(error.message).toBe("foo"); +}); diff --git a/tests/unit/get-descendants.js b/tests/unit/get-descendants.js new file mode 100644 index 000000000000..521d5999c6a5 --- /dev/null +++ b/tests/unit/get-descendants.js @@ -0,0 +1,41 @@ +import { getDescendants } from "../../src/utils/ast-utils.js"; + +const tree = { + id: "tree", + list: [ + { id: "tree.list.1", leaf: { id: "tree.list.1.leaf" } }, + { id: "tree.list.2", list: [{ id: "tree.list.2.list.1" }], leaf: null }, + "not-an-object", + ], + leaf: { id: "tree.leaf" }, +}; +const getVisitorKeys = () => ["list", "leaf"]; + +test("Breadth-first", () => { + expect([...getDescendants(tree, { getVisitorKeys })].map((node) => node.id)) + .toMatchInlineSnapshot(` + [ + "tree.list.1", + "tree.list.2", + "tree.leaf", + "tree.list.1.leaf", + "tree.list.2.list.1", + ] + `); +}); + +test("options.filter", () => { + expect( + [ + ...getDescendants(tree, { + getVisitorKeys, + filter: (node) => node.id.includes("2"), + }), + ].map((node) => node.id), + ).toMatchInlineSnapshot(` + [ + "tree.list.2", + "tree.list.2.list.1", + ] + `); +}); diff --git a/tests/unit/get-parser-plugin-by-parser-name.js b/tests/unit/get-parser-plugin-by-parser-name.js new file mode 100644 index 000000000000..cf3fdd2a4963 --- /dev/null +++ b/tests/unit/get-parser-plugin-by-parser-name.js @@ -0,0 +1,65 @@ +import { ConfigError } from "../../src/common/errors.js"; +import { getParserPluginByParserName } from "../../src/main/parser-and-printer.js"; +import createPlugin from "../config/utils/create-plugin.cjs"; + +describe("unit tests for getParserPluginByParserName", () => { + const getMockPlugins = (name) => [ + { name: "prettier-plugin-do-not-have-parsers" }, + createPlugin({ name, print: () => "test" }), + ]; + + const { env } = process; + + beforeEach(() => { + process.env = { ...env }; + }); + + afterEach(() => { + process.env = env; + }); + + test.each([ + { falsyValue: "" }, + { falsyValue: 0 }, + { falsyValue: -0 }, + { falsyValue: 0n }, + { falsyValue: Number.NaN }, + { falsyValue: null }, + { falsyValue: undefined }, + { falsyValue: false }, + ])("throws an error when parserName is $falsyValue", ({ falsyValue }) => { + const plugins = getMockPlugins(`${falsyValue}`); + expect(() => getParserPluginByParserName(plugins, falsyValue)).toThrow( + "parserName is required.", + ); + }); + + it("throws a ConfigError when no matching plugin is found", () => { + const func = () => getParserPluginByParserName(getMockPlugins("a"), "b"); + expect(process.env.PRETTIER_TARGET).not.toBe("universal"); + expect(func).toThrow(ConfigError); + expect(func).toThrow(`Couldn't resolve parser "b".`); + // When PRETTIER_TARGET is not set to universal, the message below should not be added. + expect(func).not.toThrow( + "Plugins must be explicitly added to the standalone bundle.", + ); + }); + + it(`has a specific ConfigError message when process.env.PRETTIER_TARGET === "universal" and no matching plugin is found`, () => { + process.env.PRETTIER_TARGET = "universal"; + const func = () => getParserPluginByParserName(getMockPlugins("a"), "b"); + expect(func).toThrow(ConfigError); + expect(func).toThrow(`Couldn't resolve parser "b".`); + expect(func).toThrow( + "Plugins must be explicitly added to the standalone bundle.", + ); + }); + + it("returns the last plugin with a matching parser name", () => { + const name = "somePlugin"; + const plugins = [...getMockPlugins(name), ...getMockPlugins(name)]; + const lastMatchingPlugin = plugins.at(-1); + + expect(getParserPluginByParserName(plugins, name)).toBe(lastMatchingPlugin); + }); +}); diff --git a/tests/unit/get-printer-plugin-by-ast-format.js b/tests/unit/get-printer-plugin-by-ast-format.js new file mode 100644 index 000000000000..61f75e735a62 --- /dev/null +++ b/tests/unit/get-printer-plugin-by-ast-format.js @@ -0,0 +1,65 @@ +import { ConfigError } from "../../src/common/errors.js"; +import { getPrinterPluginByAstFormat } from "../../src/main/parser-and-printer.js"; +import createPlugin from "../config/utils/create-plugin.cjs"; + +describe("unit tests for getPrinterPluginByAstFormat", () => { + const getMockPlugins = (name) => [ + { name: "prettier-plugin-do-not-have-parsers" }, + createPlugin({ name, print: () => "test" }), + ]; + + const { env } = process; + + beforeEach(() => { + process.env = { ...env }; + }); + + afterEach(() => { + process.env = env; + }); + + test.each([ + { falsyValue: "" }, + { falsyValue: 0 }, + { falsyValue: -0 }, + { falsyValue: 0n }, + { falsyValue: Number.NaN }, + { falsyValue: null }, + { falsyValue: undefined }, + { falsyValue: false }, + ])("throws an error when astFormat is $falsyValue", ({ falsyValue }) => { + const plugins = getMockPlugins(`${falsyValue}`); + expect(() => getPrinterPluginByAstFormat(plugins, falsyValue)).toThrow( + "astFormat is required.", + ); + }); + + it("throws a ConfigError when no matching plugin is found", () => { + const func = () => getPrinterPluginByAstFormat(getMockPlugins("a"), "b"); + expect(process.env.PRETTIER_TARGET).not.toBe("universal"); + expect(func).toThrow(ConfigError); + expect(func).toThrow(`Couldn't find plugin for AST format "b".`); + // When PRETTIER_TARGET is not set to universal, the message below should not be added. + expect(func).not.toThrow( + "Plugins must be explicitly added to the standalone bundle.", + ); + }); + + it(`has a specific ConfigError message when process.env.PRETTIER_TARGET === "universal" and no matching plugin is found`, () => { + process.env.PRETTIER_TARGET = "universal"; + const func = () => getPrinterPluginByAstFormat(getMockPlugins("a"), "b"); + expect(func).toThrow(ConfigError); + expect(func).toThrow(`Couldn't find plugin for AST format "b".`); + expect(func).toThrow( + "Plugins must be explicitly added to the standalone bundle.", + ); + }); + + it("returns the last plugin with a matching printer & astFormat", () => { + const name = "somePlugin"; + const plugins = [...getMockPlugins(name), ...getMockPlugins(name)]; + const lastMatchingPlugin = plugins.at(-1); + + expect(getPrinterPluginByAstFormat(plugins, name)).toBe(lastMatchingPlugin); + }); +}); diff --git a/tests/unit/html-elements.js b/tests/unit/html-elements.js new file mode 100644 index 000000000000..bef14cb100f7 --- /dev/null +++ b/tests/unit/html-elements.js @@ -0,0 +1,18 @@ +import htmlTags from "@prettier/html-tags"; +import { + CSS_DISPLAY_DEFAULT, + CSS_DISPLAY_TAGS, + CSS_WHITE_SPACE_DEFAULT, + CSS_WHITE_SPACE_TAGS, +} from "../../src/language-html/constants.evaluate.js"; + +// Snapshot to notify changes +test("htmlTagNames", () => { + const data = htmlTags.map((tagName) => ({ + tagName, + display: CSS_DISPLAY_TAGS[tagName] ?? CSS_DISPLAY_DEFAULT, + whiteSpace: CSS_WHITE_SPACE_TAGS[tagName] ?? CSS_WHITE_SPACE_DEFAULT, + })); + + expect(data).toMatchSnapshot(); +}); diff --git a/tests/unit/is-empty-doc.js b/tests/unit/is-empty-doc.js new file mode 100644 index 000000000000..d7cb5ff43fc1 --- /dev/null +++ b/tests/unit/is-empty-doc.js @@ -0,0 +1,30 @@ +import { + breakParent, + fill, + group, + line, + lineSuffix, +} from "../../src/document/builders.js"; +import { cleanDoc, isEmptyDoc } from "../../src/document/utils.js"; + +it.each([ + { name: "empty string", doc: "" }, + { name: "non-empty string", doc: "a" }, + { name: "empty array", doc: [] }, + { name: "nested empty array", doc: [[[]]] }, + { name: "array with empty string", doc: [""] }, + { name: "non-empty array", doc: ["", "a", ""] }, + { name: "empty group", doc: group([]) }, + { name: "nested empty group", doc: group([group([])]) }, + { name: "group with empty string", doc: group([""]) }, + { name: "non-empty group", doc: group(["a"]) }, + { name: "empty fill", doc: fill([]) }, + { name: "fill with empty content", doc: fill([["", ""]]) }, + { name: "non-empty fill", doc: fill(["", line]) }, + { name: "empty line", doc: line }, + { name: "empty lineSuffix", doc: lineSuffix([]) }, + { name: "breakParent", doc: breakParent }, +])("isEmptyDoc: $name", ({ doc }) => { + const expected = cleanDoc(doc) === ""; + expect(isEmptyDoc(doc)).toBe(expected); +}); diff --git a/tests/unit/massage-ast.js b/tests/unit/massage-ast.js new file mode 100644 index 000000000000..f41574f67d9c --- /dev/null +++ b/tests/unit/massage-ast.js @@ -0,0 +1,28 @@ +import massageAst from "../../src/main/massage-ast.js"; + +test("massageAst", () => { + const nonNodeObject = { foo: "foo" }; + const nodeObject = { type: "child" }; + const ast = { + type: "root", + nodeObject, + nonNodeObject, + comments: [{ type: "comment" }], + ignored: "ignored", + }; + + const result = massageAst(ast, { + printer: { + massageAstNode: Object.assign(() => {}, { + ignoredProperties: new Set(["ignored"]), + }), + getVisitorKeys: () => ["nodeObject"], + }, + }); + + expect(result).not.toBe(ast); + expect(result.ignored).toBeUndefined(); + expect(result.nonNodeObject).toBe(nonNodeObject); + expect(result.nodeObject).not.toBe(nodeObject); + expect(result.nodeObject).toEqual(nodeObject); +}); diff --git a/tests/unit/print-doc-to-string.js b/tests/unit/print-doc-to-string.js new file mode 100644 index 000000000000..bb72dcfda5b4 --- /dev/null +++ b/tests/unit/print-doc-to-string.js @@ -0,0 +1,30 @@ +import { cursor, hardline } from "../../src/document/builders.js"; +import { printDocToString } from "../../src/document/printer.js"; + +const options = { printWidth: 80, tabWidth: 2 }; + +test("Should reject if too many cursor in doc", () => { + expect(() => { + printDocToString([cursor, cursor, cursor], options); + }).toThrow({ message: "There are too many 'cursor' in doc." }); +}); + +test("Should trim blank first line", () => { + expect( + printDocToString([" ", hardline, "Prettier", hardline], options) + .formatted, + ).toBe("\nPrettier\n"); +}); + +test("Should properly trim with cursor", () => { + expect( + printDocToString( + ["123", cursor, "Prettier \t", cursor, "\t \t", hardline], + options, + ), + ).toEqual({ + formatted: "123Prettier\n", + cursorNodeStart: 3, + cursorNodeText: "Prettier", + }); +}); diff --git a/tests/unit/resolve-parser.js b/tests/unit/resolve-parser.js new file mode 100644 index 000000000000..ed37db166d18 --- /dev/null +++ b/tests/unit/resolve-parser.js @@ -0,0 +1,48 @@ +import { resolveParser } from "../../src/main/parser-and-printer.js"; + +test("resolveParser should not trigger the plugin.parsers getters", async () => { + const gettersCalledTimes = {}; + const rightParser = {}; + const wrongParser = {}; + const createParserDescriptors = (names) => + Object.fromEntries( + names.map((name) => { + gettersCalledTimes[name] = 0; + return [ + name, + { + get() { + gettersCalledTimes[name]++; + return rightParser; + }, + }, + ]; + }), + ); + const creatParsers = (names) => + Object.defineProperties( + Object.create(null), + createParserDescriptors(names), + ); + + const options = { + plugins: [ + { + parsers: new (class { + get d() { + return wrongParser; + } + })(), + }, + { name: "prettier-plugin-do-not-have-parsers" }, + { parsers: creatParsers(["a", "b"]) }, + { parsers: creatParsers(["c", "d", "e"]) }, + ], + parser: "d", + }; + + const result = await resolveParser(options); + expect(gettersCalledTimes).toStrictEqual({ a: 0, b: 0, c: 0, d: 1, e: 0 }); + expect(result).toBe(rightParser); + expect(options.plugins[0].parsers.d).toBe(wrongParser); +}); diff --git a/tests/unit/strip-trailing-hardline.js b/tests/unit/strip-trailing-hardline.js new file mode 100644 index 000000000000..e0a7d74847de --- /dev/null +++ b/tests/unit/strip-trailing-hardline.js @@ -0,0 +1,20 @@ +import { fill, hardline } from "../../src/document/builders.js"; +import { stripTrailingHardline } from "../../src/document/utils.js"; + +test("Should not mutate doc", () => { + { + const original = fill(["text", [hardline]]); + expect(stripTrailingHardline(original)).toStrictEqual(fill(["text", []])); + expect(original.parts.length).toBe(2); + } + + { + const original = ["text", [hardline]]; + expect(stripTrailingHardline(original)).toStrictEqual(["text"]); + expect(original.length).toBe(2); + } +}); + +test("Should work for strings", () => { + expect(stripTrailingHardline("\ntext\n\n\r\r\r\n\r\n")).toBe("\ntext"); +}); diff --git a/tests/unit/syntax-transform.js b/tests/unit/syntax-transform.js new file mode 100644 index 000000000000..968db53e6e94 --- /dev/null +++ b/tests/unit/syntax-transform.js @@ -0,0 +1,111 @@ +import path from "node:path"; +import url from "node:url"; +import transformCode from "../../scripts/build/transform/index.js"; + +const file = url.fileURLToPath( + new URL("../../src/__dummy.js", import.meta.url), +); +const shimsDirectory = url.fileURLToPath( + new URL("../../scripts/build/shims", import.meta.url), +); +const transform = (code) => + transformCode(code, file).replaceAll( + JSON.stringify(shimsDirectory + path.sep).slice(1, -1), + "<SHIMS>/", + ); + +test("Object.hasOwn", () => { + expect(transform("Object.hasOwn(foo, bar)")).toMatchInlineSnapshot( + `"Object.prototype.hasOwnProperty.call(foo,bar)"`, + ); +}); + +test(".at", () => { + expect(transform("foo.at(-1)")).toMatchInlineSnapshot(` + "import __at from "<SHIMS>/at.js"; + + __at (/* isOptionalObject */false,foo,-1)" + `); + + expect(transform("foo?.at(-1)")).toMatchInlineSnapshot(` + "import __at from "<SHIMS>/at.js"; + + __at (/* isOptionalObject */true,foo,-1)" + `); + + expect(transform("foo?.bar.baz.at(-1)")).toMatchInlineSnapshot(` + "import __at from "<SHIMS>/at.js"; + + __at (/* isOptionalObject */true,foo?.bar.baz,-1)" + `); + + expect(transform("foo.at(-1)?.bar")).toMatchInlineSnapshot(` + "import __at from "<SHIMS>/at.js"; + + __at (/* isOptionalObject */false,foo,-1)?.bar" + `); + + // Optional call not supported + expect(transform("foo.at?.(-1)")).toMatchInlineSnapshot(`"foo.at?.(-1)"`); +}); + +test("String#replaceAll", () => { + expect(transform("foo.replaceAll('a', 'b')")).toMatchInlineSnapshot(` + "import __stringReplaceAll from "<SHIMS>/string-replace-all.js"; + + __stringReplaceAll(/* isOptionalObject */false,foo,'a','b')" + `); +}); + +test("Array#findLast", () => { + expect(transform("foo.findLast(callback)")).toMatchInlineSnapshot(` + "import __arrayFindLast from "<SHIMS>/array-find-last.js"; + + __arrayFindLast(/* isOptionalObject */false,foo,callback)" + `); + expect(transform("foo?.findLast(callback)")).toMatchInlineSnapshot(` + "import __arrayFindLast from "<SHIMS>/array-find-last.js"; + + __arrayFindLast(/* isOptionalObject */true,foo,callback)" + `); + + // Not supported + expect( + transform("foo.findLast(callback, thisArgument)"), + ).toMatchInlineSnapshot(`"foo.findLast(callback, thisArgument)"`); +}); + +test("Array#findLastIndex", () => { + expect(transform("foo.findLastIndex(callback)")).toMatchInlineSnapshot(` + "import __arrayFindLastIndex from "<SHIMS>/array-find-last-index.js"; + + __arrayFindLastIndex(/* isOptionalObject */false,foo,callback)" + `); + expect(transform("foo?.findLastIndex(callback)")).toMatchInlineSnapshot(` + "import __arrayFindLastIndex from "<SHIMS>/array-find-last-index.js"; + + __arrayFindLastIndex(/* isOptionalObject */true,foo,callback)" + `); + + // Not supported + expect( + transform("foo.findLastIndex(callback, thisArgument)"), + ).toMatchInlineSnapshot(`"foo.findLastIndex(callback, thisArgument)"`); +}); + +test("Array#toReversed", () => { + expect(transform("foo.toReversed()")).toMatchInlineSnapshot(` + "import __arrayToReversed from "<SHIMS>/array-to-reversed.js"; + + __arrayToReversed(/* isOptionalObject */false,foo)" + `); + expect(transform("foo?.toReversed()")).toMatchInlineSnapshot(` + "import __arrayToReversed from "<SHIMS>/array-to-reversed.js"; + + __arrayToReversed(/* isOptionalObject */true,foo)" + `); + + expect(transform("foo.toReversed(extraArgument)")).toMatchInlineSnapshot( + `"foo.toReversed(extraArgument)"`, + ); +}); diff --git a/tests/unit/traverse-doc.js b/tests/unit/traverse-doc.js new file mode 100644 index 000000000000..b622e49c1206 --- /dev/null +++ b/tests/unit/traverse-doc.js @@ -0,0 +1,58 @@ +import InvalidDocError from "../../src/document/invalid-doc-error.js"; +import { findInDoc, traverseDoc } from "../../src/document/utils.js"; + +test("traverse", () => { + const doc = [["a", "b"]]; + + { + const visited = []; + traverseDoc(doc, (doc) => { + visited.push(doc); + }); + + expect(visited).toEqual([doc, doc[0], doc[0][0], doc[0][1]]); + } + + { + const visited = []; + traverseDoc(doc, (doc) => { + visited.push(doc); + return false; + }); + + // Should skip children + expect(visited).toEqual([doc]); + } + + { + const visited = []; + traverseDoc(doc, (doc) => { + visited.push(doc); + if (doc === "a") { + return false; + } + }); + + // Still visiting siblings + expect(visited).toEqual([doc, doc[0], doc[0][0], doc[0][1]]); + } + + { + const visited = []; + findInDoc(doc, (doc) => { + visited.push(doc); + if (doc === "a") { + return true; + } + }); + + // Should stop visiting siblings when found + expect(visited).toEqual([doc, doc[0], doc[0][0]]); + } +}); + +test("Invalid doc", () => { + expect(() => { + traverseDoc({ type: "invalid-type" }, () => {}); + }).toThrow(InvalidDocError); +}); diff --git a/tests/unit/visitor-keys.js b/tests/unit/visitor-keys.js new file mode 100644 index 000000000000..5411b42b79f4 --- /dev/null +++ b/tests/unit/visitor-keys.js @@ -0,0 +1,30 @@ +import postcssVisitorKeys from "../../src/language-css/visitor-keys.js"; +import graphqlVisitorKeys from "../../src/language-graphql/visitor-keys.js"; +import glimmerVisitorKeys from "../../src/language-handlebars/visitor-keys.evaluate.js"; +import htmlVisitorKeys from "../../src/language-html/visitor-keys.js"; +import estreeVisitorKeys from "../../src/language-js/traverse/visitor-keys.evaluate.js"; +import jsonVisitorKeys from "../../src/language-json/visitor-keys.js"; +import remarkVisitorKeys from "../../src/language-markdown/visitor-keys.js"; +import yamlVisitorKeys from "../../src/language-yaml/visitor-keys.js"; + +// Keep eye on package change +describe("visitor keys", () => { + test.each([ + { name: "estree", visitorKeys: estreeVisitorKeys }, + { name: "estree-json", visitorKeys: jsonVisitorKeys }, + { name: "postcss", visitorKeys: postcssVisitorKeys }, + { name: "graphql", visitorKeys: graphqlVisitorKeys }, + { name: "glimmer", visitorKeys: glimmerVisitorKeys }, + { name: "html", visitorKeys: htmlVisitorKeys }, + { name: "remark", visitorKeys: remarkVisitorKeys }, + { name: "yaml", visitorKeys: yamlVisitorKeys }, + ])("$name", ({ visitorKeys }) => { + visitorKeys = Object.fromEntries( + Object.entries(visitorKeys).map(([type, keys]) => [ + type, + [...keys].sort(), + ]), + ); + expect(visitorKeys).toMatchSnapshot(); + }); +}); diff --git a/tests/unit/whitespace-utils.js b/tests/unit/whitespace-utils.js new file mode 100644 index 000000000000..47193ce46b74 --- /dev/null +++ b/tests/unit/whitespace-utils.js @@ -0,0 +1,115 @@ +import WhitespaceUtils from "../../src/utils/whitespace-utils.js"; + +it("constructor", () => { + expect(() => new WhitespaceUtils()).toThrow(TypeError); + expect(() => new WhitespaceUtils(1)).toThrow(TypeError); + expect(() => new WhitespaceUtils("")).toThrow(TypeError); + expect(() => new WhitespaceUtils([])).toThrow(TypeError); + expect(() => new WhitespaceUtils([""])).toThrow(TypeError); + expect(() => new WhitespaceUtils(["a"])).toThrow(TypeError); + expect(() => new WhitespaceUtils("a")).toThrow(TypeError); + expect(() => new WhitespaceUtils(["\r\n"])).toThrow(TypeError); + + expect(new WhitespaceUtils("\r\n")).toBeInstanceOf(WhitespaceUtils); + expect(new WhitespaceUtils(["\r", "\n"])).toBeInstanceOf(WhitespaceUtils); +}); + +const utils = new WhitespaceUtils(" "); +describe("trimStart", () => { + for (const [string, expected] of [ + ["", ""], + [" ", ""], + [" ".repeat(3), ""], + ["a", "a"], + ["a" + " ".repeat(3), "a "], + [" ".repeat(3) + "a", "a"], + [" ".repeat(3) + "a" + " ".repeat(3), "a "], + ]) { + it(JSON.stringify(string), () => { + expect(utils.trimStart(string)).toBe(expected); + }); + } +}); + +describe("trimEnd", () => { + for (const [string, expected] of [ + ["", ""], + [" ", ""], + [" ".repeat(3), ""], + ["a", "a"], + ["a" + " ".repeat(3), "a"], + [" ".repeat(3) + "a", " a"], + [" ".repeat(3) + "a" + " ".repeat(3), " a"], + ]) { + it(JSON.stringify(string), () => { + expect(utils.trimEnd(string)).toBe(expected); + }); + } +}); + +describe("trim", () => { + for (const [string, expected] of [ + ["", ""], + [" ", ""], + [" ".repeat(3), ""], + ["a", "a"], + ["a" + " ".repeat(3), "a"], + [" ".repeat(3) + "a", "a"], + [" ".repeat(3) + "a" + " ".repeat(3), "a"], + ]) { + it(JSON.stringify(string), () => { + expect(utils.trim(string)).toBe(expected); + }); + } +}); + +describe("getLeadingWhitespaceCount", () => { + for (const [string, expected] of [ + ["", 0], + [" ", 1], + [" ".repeat(3), 3], + ["a", 0], + ["a" + " ".repeat(3), 0], + [" ".repeat(3) + "a", 3], + [" ".repeat(3) + "a" + " ".repeat(3), 3], + ]) { + it(JSON.stringify(string), () => { + expect(utils.getLeadingWhitespaceCount(string)).toBe(expected); + }); + } +}); + +describe("getTrailingWhitespaceCount", () => { + for (const [string, expected] of [ + ["", 0], + [" ", 1], + [" ".repeat(3), 3], + ["a", 0], + ["a" + " ".repeat(3), 3], + [" ".repeat(3) + "a", 0], + [" ".repeat(3) + "a" + " ".repeat(3), 3], + ]) { + it(JSON.stringify(string), () => { + expect(utils.getTrailingWhitespaceCount(string)).toBe(expected); + }); + } +}); + +describe("split", () => { + for (const string of [ + "", + " ", + " ".repeat(3), + " a", + " ".repeat(3) + "a", + "a ", + "a" + " ".repeat(3), + " a ", + " ".repeat(3) + "a" + " ".repeat(3), + " a a a ", + ]) { + it(JSON.stringify(string), () => { + expect(utils.split(string)).toEqual(string.split(/ +/u)); + }); + } +}); diff --git a/tsconfig.json b/tsconfig.json index d2fab7aa00c8..325011ab8bd6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,21 +3,24 @@ "allowJs": true, "checkJs": true, "noEmit": true, - "target": "es2015", - "module": "commonjs", + "target": "esnext", + "module": "NodeNext", "resolveJsonModule": true, + "strict": true, + "skipLibCheck": true, // TBD it is desired to enabled strict type checking at some point: - "strict": false, - "typeRoots": ["./types", "./node_modules/@types"] + "noImplicitAny": false, + "strictNullChecks": false, + + "typeRoots": ["./types", "./node_modules/@types"], }, "exclude": [ "coverage/", "test*.*", - "vendors/*.js", + "jest.config.js", // [TBD] JavaScript sources *not* affected by src/language-*: "src/main/ast-to-doc.js", "src/main/core.js", - "src/common/create-ignorer.js", "src/config/resolve-config.js", "src/main/options-normalizer.js", "src/common/get-file-info.js", @@ -42,13 +45,14 @@ "src/index.js", "src/standalone.js", "index.js", + "src/index.cjs", "standalone.js", "bin/", - "dist/", + "dist*/", "docs/", "scripts/", "tests/", "website/", - "types/" - ] + "types/", + ], } diff --git a/types/angular-html-parser/index.d.ts b/types/angular-html-parser/index.d.ts index 4dccb8e543aa..80f2af966376 100644 --- a/types/angular-html-parser/index.d.ts +++ b/types/angular-html-parser/index.d.ts @@ -1,7 +1,7 @@ import "angular-html-parser/lib/compiler/src/ml_parser/ast"; -import { HtmlTagDefinition } from "angular-html-parser/lib/compiler/src/ml_parser/html_tags"; +import { HtmlTagDefinition } from "angular-html-parser/lib/compiler/src/ml_parser/html_tags.js"; -declare module "angular-html-parser/lib/compiler/src/ml_parser/ast" { +declare module "angular-html-parser/lib/compiler/src/ml_parser/ast.js" { interface Attribute { startSourceSpan: never; endSourceSpan: never; diff --git a/types/espree/index.d.ts b/types/espree/index.d.ts index 96db4c47c5aa..ba96d9bd1b87 100644 --- a/types/espree/index.d.ts +++ b/types/espree/index.d.ts @@ -5,25 +5,7 @@ declare module "espree" { loc?: boolean; comment?: boolean; tokens?: boolean; - ecmaVersion?: - | 3 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 - | 2015 - | 2016 - | 2017 - | 2018 - | 2019 - | 2020 - | 2021 - | 2022 - | "latest"; + ecmaVersion?: "latest"; sourceType?: "script" | "module"; ecmaFeatures?: { jsx?: boolean; diff --git a/vendors/README.md b/vendors/README.md deleted file mode 100644 index a86bb314b74e..000000000000 --- a/vendors/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# `./vendors` - -**JavaScript Files that included in this directory are auto generated by [`/scripts/vendor/bundle-vendors.mjs`](../scripts/vendors/bundle-vendors.mjs).** - -See [`/scripts/vendors/README.md`](../scripts/vendors/README.md) for the context. diff --git a/vendors/chalk.d.ts b/vendors/chalk.d.ts deleted file mode 100644 index abeda7fb9ce0..000000000000 --- a/vendors/chalk.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "chalk"; -export * from "chalk"; diff --git a/vendors/chalk.js b/vendors/chalk.js deleted file mode 100644 index 794fc5b4031e..000000000000 --- a/vendors/chalk.js +++ /dev/null @@ -1,516 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/chalk/source/index.js -var source_exports = {}; -__export(source_exports, { - Chalk: () => Chalk, - chalkStderr: () => chalkStderr, - default: () => source_default, - supportsColor: () => stdoutColor, - supportsColorStderr: () => stderrColor -}); -module.exports = __toCommonJS(source_exports); - -// node_modules/chalk/source/vendor/ansi-styles/index.js -var ANSI_BACKGROUND_OFFSET = 10; -var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; -var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; -var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; -function assembleStyles() { - const codes = /* @__PURE__ */ new Map(); - const styles2 = { - modifier: { - reset: [0, 0], - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - styles2.color.gray = styles2.color.blackBright; - styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright; - styles2.color.grey = styles2.color.blackBright; - styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright; - for (const [groupName, group] of Object.entries(styles2)) { - for (const [styleName, style] of Object.entries(group)) { - styles2[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles2[styleName]; - codes.set(style[0], style[1]); - } - Object.defineProperty(styles2, groupName, { - value: group, - enumerable: false - }); - } - Object.defineProperty(styles2, "codes", { - value: codes, - enumerable: false - }); - styles2.color.close = "\x1B[39m"; - styles2.bgColor.close = "\x1B[49m"; - styles2.color.ansi = wrapAnsi16(); - styles2.color.ansi256 = wrapAnsi256(); - styles2.color.ansi16m = wrapAnsi16m(); - styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - Object.defineProperties(styles2, { - rgbToAnsi256: { - value: (red, green, blue) => { - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - if (red > 248) { - return 231; - } - return Math.round((red - 8) / 247 * 24) + 232; - } - return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); - }, - enumerable: false - }, - hexToRgb: { - value: (hex) => { - const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - let { colorString } = matches.groups; - if (colorString.length === 3) { - colorString = [...colorString].map((character) => character + character).join(""); - } - const integer = Number.parseInt(colorString, 16); - return [ - integer >> 16 & 255, - integer >> 8 & 255, - integer & 255 - ]; - }, - enumerable: false - }, - hexToAnsi256: { - value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)), - enumerable: false - }, - ansi256ToAnsi: { - value: (code) => { - if (code < 8) { - return 30 + code; - } - if (code < 16) { - return 90 + (code - 8); - } - let red; - let green; - let blue; - if (code >= 232) { - red = ((code - 232) * 10 + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - const remainder = code % 36; - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = remainder % 6 / 5; - } - const value = Math.max(red, green, blue) * 2; - if (value === 0) { - return 30; - } - let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); - if (value === 2) { - result += 60; - } - return result; - }, - enumerable: false - }, - rgbToAnsi: { - value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)), - enumerable: false - }, - hexToAnsi: { - value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)), - enumerable: false - } - }); - return styles2; -} -var ansiStyles = assembleStyles(); -var ansi_styles_default = ansiStyles; - -// node_modules/chalk/source/vendor/supports-color/index.js -var import_node_process = __toESM(require("process"), 1); -var import_node_os = __toESM(require("os"), 1); -var import_node_tty = __toESM(require("tty"), 1); -function hasFlag(flag, argv = import_node_process.default.argv) { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -} -var { env } = import_node_process.default; -var flagForceColor; -if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - flagForceColor = 0; -} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - flagForceColor = 1; -} -function envForceColor() { - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - return 1; - } - if (env.FORCE_COLOR === "false") { - return 0; - } - return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); - } -} -function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} -function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { - const noFlagForceColor = envForceColor(); - if (noFlagForceColor !== void 0) { - flagForceColor = noFlagForceColor; - } - const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; - if (forceColor === 0) { - return 0; - } - if (sniffFlags) { - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (import_node_process.default.platform === "win32") { - const osRelease = import_node_os.default.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; - } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if ("TF_BUILD" in env && "AGENT_NAME" in env) { - return 1; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; -} -function createSupportsColor(stream, options = {}) { - const level = _supportsColor(stream, { - streamIsTTY: stream && stream.isTTY, - ...options - }); - return translateLevel(level); -} -var supportsColor = { - stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }), - stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) }) -}; -var supports_color_default = supportsColor; - -// node_modules/chalk/source/utilities.js -function stringReplaceAll(string, substring, replacer) { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ""; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} -function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { - let endIndex = 0; - let returnValue = ""; - do { - const gotCR = string[index - 1] === "\r"; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix; - endIndex = index + 1; - index = string.indexOf("\n", endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} - -// node_modules/chalk/source/index.js -var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; -var GENERATOR = Symbol("GENERATOR"); -var STYLER = Symbol("STYLER"); -var IS_EMPTY = Symbol("IS_EMPTY"); -var levelMapping = [ - "ansi", - "ansi", - "ansi256", - "ansi16m" -]; -var styles = /* @__PURE__ */ Object.create(null); -var applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error("The `level` option should be an integer from 0 to 3"); - } - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === void 0 ? colorLevel : options.level; -}; -var Chalk = class { - constructor(options) { - return chalkFactory(options); - } -}; -var chalkFactory = (options) => { - const chalk2 = (...strings) => strings.join(" "); - applyOptions(chalk2, options); - Object.setPrototypeOf(chalk2, createChalk.prototype); - return chalk2; -}; -function createChalk(options) { - return chalkFactory(options); -} -Object.setPrototypeOf(createChalk.prototype, Function.prototype); -for (const [styleName, style] of Object.entries(ansi_styles_default)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); - Object.defineProperty(this, styleName, { value: builder }); - return builder; - } - }; -} -styles.visible = { - get() { - const builder = createBuilder(this, this[STYLER], true); - Object.defineProperty(this, "visible", { value: builder }); - return builder; - } -}; -var getModelAnsi = (model, level, type, ...arguments_) => { - if (model === "rgb") { - if (level === "ansi16m") { - return ansi_styles_default[type].ansi16m(...arguments_); - } - if (level === "ansi256") { - return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); - } - return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); - } - if (model === "hex") { - return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)); - } - return ansi_styles_default[type][model](...arguments_); -}; -var usedModels = ["rgb", "hex", "ansi256"]; -for (const model of usedModels) { - styles[model] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - } - }; - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - } - }; -} -var proto = Object.defineProperties(() => { -}, { - ...styles, - level: { - enumerable: true, - get() { - return this[GENERATOR].level; - }, - set(level) { - this[GENERATOR].level = level; - } - } -}); -var createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === void 0) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - return { - open, - close, - openAll, - closeAll, - parent - }; -}; -var createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); - Object.setPrototypeOf(builder, proto); - builder[GENERATOR] = self; - builder[STYLER] = _styler; - builder[IS_EMPTY] = _isEmpty; - return builder; -}; -var applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self[IS_EMPTY] ? "" : string; - } - let styler = self[STYLER]; - if (styler === void 0) { - return string; - } - const { openAll, closeAll } = styler; - if (string.includes("\x1B")) { - while (styler !== void 0) { - string = stringReplaceAll(string, styler.close, styler.open); - styler = styler.parent; - } - } - const lfIndex = string.indexOf("\n"); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - return openAll + string + closeAll; -}; -Object.defineProperties(createChalk.prototype, styles); -var chalk = createChalk(); -var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); -var source_default = chalk; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Chalk, - chalkStderr, - supportsColor, - supportsColorStderr -}); diff --git a/vendors/css-units-list.json b/vendors/css-units-list.json deleted file mode 100644 index ca86a44bc3dd..000000000000 --- a/vendors/css-units-list.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "absoluteLengths": [ - "cm", - "mm", - "Q", - "in", - "pt", - "pc", - "px" - ], - "angleUnits": [ - "deg", - "grad", - "rad", - "turn" - ], - "default": [ - "em", - "rem", - "ex", - "rex", - "cap", - "rcap", - "ch", - "rch", - "ic", - "ric", - "lh", - "rlh", - "vw", - "svw", - "lvw", - "dvw", - "vh", - "svh", - "lvh", - "dvh", - "vi", - "svi", - "lvi", - "dvi", - "vb", - "svb", - "lvb", - "dvb", - "vmin", - "svmin", - "lvmin", - "dvmin", - "vmax", - "svmax", - "lvmax", - "dvmax", - "cm", - "mm", - "Q", - "in", - "pt", - "pc", - "px", - "deg", - "grad", - "rad", - "turn", - "s", - "ms", - "Hz", - "kHz", - "dpi", - "dpcm", - "dppx", - "x" - ], - "durationUnits": [ - "s", - "ms" - ], - "fontRelativeLengths": [ - "em", - "rem", - "ex", - "rex", - "cap", - "rcap", - "ch", - "rch", - "ic", - "ric", - "lh", - "rlh" - ], - "frequencyUnits": [ - "Hz", - "kHz" - ], - "relativeLengths": [ - "em", - "rem", - "ex", - "rex", - "cap", - "rcap", - "ch", - "rch", - "ic", - "ric", - "lh", - "rlh", - "vw", - "svw", - "lvw", - "dvw", - "vh", - "svh", - "lvh", - "dvh", - "vi", - "svi", - "lvi", - "dvi", - "vb", - "svb", - "lvb", - "dvb", - "vmin", - "svmin", - "lvmin", - "dvmin", - "vmax", - "svmax", - "lvmax", - "dvmax" - ], - "resolutionUnits": [ - "dpi", - "dpcm", - "dppx", - "x" - ], - "viewportPercentageLengths": [ - "vw", - "svw", - "lvw", - "dvw", - "vh", - "svh", - "lvh", - "dvh", - "vi", - "svi", - "lvi", - "dvi", - "vb", - "svb", - "lvb", - "dvb", - "vmin", - "svmin", - "lvmin", - "dvmin", - "vmax", - "svmax", - "lvmax", - "dvmax" - ] -} diff --git a/vendors/escape-string-regexp.d.ts b/vendors/escape-string-regexp.d.ts deleted file mode 100644 index 91dfbd94b8f1..000000000000 --- a/vendors/escape-string-regexp.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "escape-string-regexp"; -export * from "escape-string-regexp"; diff --git a/vendors/escape-string-regexp.js b/vendors/escape-string-regexp.js deleted file mode 100644 index 52534604cada..000000000000 --- a/vendors/escape-string-regexp.js +++ /dev/null @@ -1,34 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/escape-string-regexp/index.js -var escape_string_regexp_exports = {}; -__export(escape_string_regexp_exports, { - default: () => escapeStringRegexp -}); -module.exports = __toCommonJS(escape_string_regexp_exports); -function escapeStringRegexp(string) { - if (typeof string !== "string") { - throw new TypeError("Expected a string"); - } - return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); diff --git a/vendors/execa.d.ts b/vendors/execa.d.ts deleted file mode 100644 index 0e3ab4788517..000000000000 --- a/vendors/execa.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// This file is generated automatically. -export * from "execa"; diff --git a/vendors/execa.js b/vendors/execa.js deleted file mode 100644 index 7022e5e6372e..000000000000 --- a/vendors/execa.js +++ /dev/null @@ -1,1897 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/isexe/windows.js -var require_windows = __commonJS({ - "node_modules/isexe/windows.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs = require("fs"); - function checkPathExt(path3, options) { - var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; - if (!pathext) { - return true; - } - pathext = pathext.split(";"); - if (pathext.indexOf("") !== -1) { - return true; - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase(); - if (p && path3.substr(-p.length).toLowerCase() === p) { - return true; - } - } - return false; - } - function checkStat(stat, path3, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false; - } - return checkPathExt(path3, options); - } - function isexe(path3, options, cb) { - fs.stat(path3, function(er, stat) { - cb(er, er ? false : checkStat(stat, path3, options)); - }); - } - function sync(path3, options) { - return checkStat(fs.statSync(path3), path3, options); - } - } -}); - -// node_modules/isexe/mode.js -var require_mode = __commonJS({ - "node_modules/isexe/mode.js"(exports, module2) { - module2.exports = isexe; - isexe.sync = sync; - var fs = require("fs"); - function isexe(path3, options, cb) { - fs.stat(path3, function(er, stat) { - cb(er, er ? false : checkStat(stat, options)); - }); - } - function sync(path3, options) { - return checkStat(fs.statSync(path3), options); - } - function checkStat(stat, options) { - return stat.isFile() && checkMode(stat, options); - } - function checkMode(stat, options) { - var mod = stat.mode; - var uid = stat.uid; - var gid = stat.gid; - var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); - var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); - var u = parseInt("100", 8); - var g = parseInt("010", 8); - var o = parseInt("001", 8); - var ug = u | g; - var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; - return ret; - } - } -}); - -// node_modules/isexe/index.js -var require_isexe = __commonJS({ - "node_modules/isexe/index.js"(exports, module2) { - var fs = require("fs"); - var core; - if (process.platform === "win32" || global.TESTING_WINDOWS) { - core = require_windows(); - } else { - core = require_mode(); - } - module2.exports = isexe; - isexe.sync = sync; - function isexe(path3, options, cb) { - if (typeof options === "function") { - cb = options; - options = {}; - } - if (!cb) { - if (typeof Promise !== "function") { - throw new TypeError("callback not provided"); - } - return new Promise(function(resolve, reject) { - isexe(path3, options || {}, function(er, is) { - if (er) { - reject(er); - } else { - resolve(is); - } - }); - }); - } - core(path3, options || {}, function(er, is) { - if (er) { - if (er.code === "EACCES" || options && options.ignoreErrors) { - er = null; - is = false; - } - } - cb(er, is); - }); - } - function sync(path3, options) { - try { - return core.sync(path3, options || {}); - } catch (er) { - if (options && options.ignoreErrors || er.code === "EACCES") { - return false; - } else { - throw er; - } - } - } - } -}); - -// node_modules/which/which.js -var require_which = __commonJS({ - "node_modules/which/which.js"(exports, module2) { - var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; - var path3 = require("path"); - var COLON = isWindows ? ";" : ":"; - var isexe = require_isexe(); - var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); - var getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON; - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ - ...isWindows ? [process.cwd()] : [], - ...(opt.path || process.env.PATH || "").split(colon) - ]; - const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; - const pathExt = isWindows ? pathExtExe.split(colon) : [""]; - if (isWindows) { - if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") - pathExt.unshift(""); - } - return { - pathEnv, - pathExt, - pathExtExe - }; - }; - var which = (cmd, opt, cb) => { - if (typeof opt === "function") { - cb = opt; - opt = {}; - } - if (!opt) - opt = {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - const step = (i) => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path3.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - resolve(subStep(p, i, 0)); - }); - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)); - const ext = pathExt[ii]; - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext); - else - return resolve(p + ext); - } - return resolve(subStep(p, i, ii + 1)); - }); - }); - return cb ? step(0).then((res) => cb(null, res), cb) : step(0); - }; - var whichSync = (cmd, opt) => { - opt = opt || {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (let i = 0; i < pathEnv.length; i++) { - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path3.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - for (let j = 0; j < pathExt.length; j++) { - const cur = p + pathExt[j]; - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }); - if (is) { - if (opt.all) - found.push(cur); - else - return cur; - } - } catch (ex) { - } - } - } - if (opt.all && found.length) - return found; - if (opt.nothrow) - return null; - throw getNotFoundError(cmd); - }; - module2.exports = which; - which.sync = whichSync; - } -}); - -// node_modules/path-key/index.js -var require_path_key = __commonJS({ - "node_modules/path-key/index.js"(exports, module2) { - "use strict"; - var pathKey2 = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - if (platform !== "win32") { - return "PATH"; - } - return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; - }; - module2.exports = pathKey2; - module2.exports.default = pathKey2; - } -}); - -// node_modules/cross-spawn/lib/util/resolveCommand.js -var require_resolveCommand = __commonJS({ - "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) { - "use strict"; - var path3 = require("path"); - var which = require_which(); - var getPathKey = require_path_key(); - function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - } - } - let resolved; - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path3.delimiter : void 0 - }); - } catch (e) { - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - if (resolved) { - resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); - } - return resolved; - } - function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); - } - module2.exports = resolveCommand; - } -}); - -// node_modules/cross-spawn/lib/util/escape.js -var require_escape = __commonJS({ - "node_modules/cross-spawn/lib/util/escape.js"(exports, module2) { - "use strict"; - var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - function escapeCommand(arg) { - arg = arg.replace(metaCharsRegExp, "^$1"); - return arg; - } - function escapeArgument(arg, doubleEscapeMetaChars) { - arg = `${arg}`; - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - arg = arg.replace(/(\\*)$/, "$1$1"); - arg = `"${arg}"`; - arg = arg.replace(metaCharsRegExp, "^$1"); - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, "^$1"); - } - return arg; - } - module2.exports.command = escapeCommand; - module2.exports.argument = escapeArgument; - } -}); - -// node_modules/shebang-regex/index.js -var require_shebang_regex = __commonJS({ - "node_modules/shebang-regex/index.js"(exports, module2) { - "use strict"; - module2.exports = /^#!(.*)/; - } -}); - -// node_modules/shebang-command/index.js -var require_shebang_command = __commonJS({ - "node_modules/shebang-command/index.js"(exports, module2) { - "use strict"; - var shebangRegex = require_shebang_regex(); - module2.exports = (string = "") => { - const match = string.match(shebangRegex); - if (!match) { - return null; - } - const [path3, argument] = match[0].replace(/#! ?/, "").split(" "); - const binary = path3.split("/").pop(); - if (binary === "env") { - return argument; - } - return argument ? `${binary} ${argument}` : binary; - }; - } -}); - -// node_modules/cross-spawn/lib/util/readShebang.js -var require_readShebang = __commonJS({ - "node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) { - "use strict"; - var fs = require("fs"); - var shebangCommand = require_shebang_command(); - function readShebang(command) { - const size = 150; - const buffer = Buffer.alloc(size); - let fd; - try { - fd = fs.openSync(command, "r"); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { - } - return shebangCommand(buffer.toString()); - } - module2.exports = readShebang; - } -}); - -// node_modules/cross-spawn/lib/parse.js -var require_parse = __commonJS({ - "node_modules/cross-spawn/lib/parse.js"(exports, module2) { - "use strict"; - var path3 = require("path"); - var resolveCommand = require_resolveCommand(); - var escape = require_escape(); - var readShebang = require_readShebang(); - var isWin = process.platform === "win32"; - var isExecutableRegExp = /\.(?:com|exe)$/i; - var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - const shebang = parsed.file && readShebang(parsed.file); - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - return resolveCommand(parsed); - } - return parsed.file; - } - function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - const commandFile = detectShebang(parsed); - const needsShell = !isExecutableRegExp.test(commandFile); - if (parsed.options.forceShell || needsShell) { - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path3.normalize(parsed.command); - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - const shellCommand = [parsed.command].concat(parsed.args).join(" "); - parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; - parsed.command = process.env.comspec || "cmd.exe"; - parsed.options.windowsVerbatimArguments = true; - } - return parsed; - } - function parse(command, args, options) { - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - args = args ? args.slice(0) : []; - options = Object.assign({}, options); - const parsed = { - command, - args, - options, - file: void 0, - original: { - command, - args - } - }; - return options.shell ? parsed : parseNonShell(parsed); - } - module2.exports = parse; - } -}); - -// node_modules/cross-spawn/lib/enoent.js -var require_enoent = __commonJS({ - "node_modules/cross-spawn/lib/enoent.js"(exports, module2) { - "use strict"; - var isWin = process.platform === "win32"; - function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: "ENOENT", - errno: "ENOENT", - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args - }); - } - function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - const originalEmit = cp.emit; - cp.emit = function(name, arg1) { - if (name === "exit") { - const err = verifyENOENT(arg1, parsed, "spawn"); - if (err) { - return originalEmit.call(cp, "error", err); - } - } - return originalEmit.apply(cp, arguments); - }; - } - function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawn"); - } - return null; - } - function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, "spawnSync"); - } - return null; - } - module2.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError - }; - } -}); - -// node_modules/cross-spawn/index.js -var require_cross_spawn = __commonJS({ - "node_modules/cross-spawn/index.js"(exports, module2) { - "use strict"; - var cp = require("child_process"); - var parse = require_parse(); - var enoent = require_enoent(); - function spawn(command, args, options) { - const parsed = parse(command, args, options); - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - enoent.hookChildProcess(spawned, parsed); - return spawned; - } - function spawnSync(command, args, options) { - const parsed = parse(command, args, options); - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - return result; - } - module2.exports = spawn; - module2.exports.spawn = spawn; - module2.exports.sync = spawnSync; - module2.exports._parse = parse; - module2.exports._enoent = enoent; - } -}); - -// node_modules/signal-exit/signals.js -var require_signals = __commonJS({ - "node_modules/signal-exit/signals.js"(exports, module2) { - module2.exports = [ - "SIGABRT", - "SIGALRM", - "SIGHUP", - "SIGINT", - "SIGTERM" - ]; - if (process.platform !== "win32") { - module2.exports.push( - "SIGVTALRM", - "SIGXCPU", - "SIGXFSZ", - "SIGUSR2", - "SIGTRAP", - "SIGSYS", - "SIGQUIT", - "SIGIOT" - ); - } - if (process.platform === "linux") { - module2.exports.push( - "SIGIO", - "SIGPOLL", - "SIGPWR", - "SIGSTKFLT", - "SIGUNUSED" - ); - } - } -}); - -// node_modules/signal-exit/index.js -var require_signal_exit = __commonJS({ - "node_modules/signal-exit/index.js"(exports, module2) { - var process4 = global.process; - var processOk = function(process5) { - return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function"; - }; - if (!processOk(process4)) { - module2.exports = function() { - return function() { - }; - }; - } else { - assert = require("assert"); - signals = require_signals(); - isWin = /^win/i.test(process4.platform); - EE = require("events"); - if (typeof EE !== "function") { - EE = EE.EventEmitter; - } - if (process4.__signal_exit_emitter__) { - emitter = process4.__signal_exit_emitter__; - } else { - emitter = process4.__signal_exit_emitter__ = new EE(); - emitter.count = 0; - emitter.emitted = {}; - } - if (!emitter.infinite) { - emitter.setMaxListeners(Infinity); - emitter.infinite = true; - } - module2.exports = function(cb, opts) { - if (!processOk(global.process)) { - return function() { - }; - } - assert.equal(typeof cb, "function", "a callback must be provided for exit handler"); - if (loaded === false) { - load(); - } - var ev = "exit"; - if (opts && opts.alwaysLast) { - ev = "afterexit"; - } - var remove = function() { - emitter.removeListener(ev, cb); - if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { - unload(); - } - }; - emitter.on(ev, cb); - return remove; - }; - unload = function unload2() { - if (!loaded || !processOk(global.process)) { - return; - } - loaded = false; - signals.forEach(function(sig) { - try { - process4.removeListener(sig, sigListeners[sig]); - } catch (er) { - } - }); - process4.emit = originalProcessEmit; - process4.reallyExit = originalProcessReallyExit; - emitter.count -= 1; - }; - module2.exports.unload = unload; - emit = function emit2(event, code, signal) { - if (emitter.emitted[event]) { - return; - } - emitter.emitted[event] = true; - emitter.emit(event, code, signal); - }; - sigListeners = {}; - signals.forEach(function(sig) { - sigListeners[sig] = function listener() { - if (!processOk(global.process)) { - return; - } - var listeners = process4.listeners(sig); - if (listeners.length === emitter.count) { - unload(); - emit("exit", null, sig); - emit("afterexit", null, sig); - if (isWin && sig === "SIGHUP") { - sig = "SIGINT"; - } - process4.kill(process4.pid, sig); - } - }; - }); - module2.exports.signals = function() { - return signals; - }; - loaded = false; - load = function load2() { - if (loaded || !processOk(global.process)) { - return; - } - loaded = true; - emitter.count += 1; - signals = signals.filter(function(sig) { - try { - process4.on(sig, sigListeners[sig]); - return true; - } catch (er) { - return false; - } - }); - process4.emit = processEmit; - process4.reallyExit = processReallyExit; - }; - module2.exports.load = load; - originalProcessReallyExit = process4.reallyExit; - processReallyExit = function processReallyExit2(code) { - if (!processOk(global.process)) { - return; - } - process4.exitCode = code || 0; - emit("exit", process4.exitCode, null); - emit("afterexit", process4.exitCode, null); - originalProcessReallyExit.call(process4, process4.exitCode); - }; - originalProcessEmit = process4.emit; - processEmit = function processEmit2(ev, arg) { - if (ev === "exit" && processOk(global.process)) { - if (arg !== void 0) { - process4.exitCode = arg; - } - var ret = originalProcessEmit.apply(this, arguments); - emit("exit", process4.exitCode, null); - emit("afterexit", process4.exitCode, null); - return ret; - } else { - return originalProcessEmit.apply(this, arguments); - } - }; - } - var assert; - var signals; - var isWin; - var EE; - var emitter; - var unload; - var emit; - var sigListeners; - var loaded; - var load; - var originalProcessReallyExit; - var processReallyExit; - var originalProcessEmit; - var processEmit; - } -}); - -// node_modules/get-stream/buffer-stream.js -var require_buffer_stream = __commonJS({ - "node_modules/get-stream/buffer-stream.js"(exports, module2) { - "use strict"; - var { PassThrough: PassThroughStream } = require("stream"); - module2.exports = (options) => { - options = { ...options }; - const { array } = options; - let { encoding } = options; - const isBuffer = encoding === "buffer"; - let objectMode = false; - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || "utf8"; - } - if (isBuffer) { - encoding = null; - } - const stream = new PassThroughStream({ objectMode }); - if (encoding) { - stream.setEncoding(encoding); - } - let length = 0; - const chunks = []; - stream.on("data", (chunk) => { - chunks.push(chunk); - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - stream.getBufferedValue = () => { - if (array) { - return chunks; - } - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); - }; - stream.getBufferedLength = () => length; - return stream; - }; - } -}); - -// node_modules/get-stream/index.js -var require_get_stream = __commonJS({ - "node_modules/get-stream/index.js"(exports, module2) { - "use strict"; - var { constants: BufferConstants } = require("buffer"); - var stream = require("stream"); - var { promisify } = require("util"); - var bufferStream = require_buffer_stream(); - var streamPipelinePromisified = promisify(stream.pipeline); - var MaxBufferError = class extends Error { - constructor() { - super("maxBuffer exceeded"); - this.name = "MaxBufferError"; - } - }; - async function getStream2(inputStream, options) { - if (!inputStream) { - throw new Error("Expected a stream"); - } - options = { - maxBuffer: Infinity, - ...options - }; - const { maxBuffer } = options; - const stream2 = bufferStream(options); - await new Promise((resolve, reject) => { - const rejectPromise = (error) => { - if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) { - error.bufferedData = stream2.getBufferedValue(); - } - reject(error); - }; - (async () => { - try { - await streamPipelinePromisified(inputStream, stream2); - resolve(); - } catch (error) { - rejectPromise(error); - } - })(); - stream2.on("data", () => { - if (stream2.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }); - return stream2.getBufferedValue(); - } - module2.exports = getStream2; - module2.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" }); - module2.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: true }); - module2.exports.MaxBufferError = MaxBufferError; - } -}); - -// node_modules/merge-stream/index.js -var require_merge_stream = __commonJS({ - "node_modules/merge-stream/index.js"(exports, module2) { - "use strict"; - var { PassThrough } = require("stream"); - module2.exports = function() { - var sources = []; - var output = new PassThrough({ objectMode: true }); - output.setMaxListeners(0); - output.add = add; - output.isEmpty = isEmpty; - output.on("unpipe", remove); - Array.prototype.slice.call(arguments).forEach(add); - return output; - function add(source) { - if (Array.isArray(source)) { - source.forEach(add); - return this; - } - sources.push(source); - source.once("end", remove.bind(null, source)); - source.once("error", output.emit.bind(output, "error")); - source.pipe(output, { end: false }); - return this; - } - function isEmpty() { - return sources.length == 0; - } - function remove(source) { - sources = sources.filter(function(it) { - return it !== source; - }); - if (!sources.length && output.readable) { - output.end(); - } - } - }; - } -}); - -// node_modules/execa/index.js -var execa_exports = {}; -__export(execa_exports, { - execa: () => execa, - execaCommand: () => execaCommand, - execaCommandSync: () => execaCommandSync, - execaNode: () => execaNode, - execaSync: () => execaSync -}); -module.exports = __toCommonJS(execa_exports); -var import_node_buffer = require("buffer"); -var import_node_path2 = __toESM(require("path"), 1); -var import_node_child_process = __toESM(require("child_process"), 1); -var import_node_process2 = __toESM(require("process"), 1); -var import_cross_spawn = __toESM(require_cross_spawn(), 1); - -// node_modules/strip-final-newline/index.js -function stripFinalNewline(input) { - const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); - const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); - if (input[input.length - 1] === LF) { - input = input.slice(0, -1); - } - if (input[input.length - 1] === CR) { - input = input.slice(0, -1); - } - return input; -} - -// node_modules/npm-run-path/index.js -var import_node_process = __toESM(require("process"), 1); -var import_node_path = __toESM(require("path"), 1); -var import_node_url = __toESM(require("url"), 1); - -// node_modules/npm-run-path/node_modules/path-key/index.js -function pathKey(options = {}) { - const { - env = process.env, - platform = process.platform - } = options; - if (platform !== "win32") { - return "PATH"; - } - return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; -} - -// node_modules/npm-run-path/index.js -function npmRunPath(options = {}) { - const { - cwd = import_node_process.default.cwd(), - path: path_ = import_node_process.default.env[pathKey()], - execPath = import_node_process.default.execPath - } = options; - let previous; - const cwdString = cwd instanceof URL ? import_node_url.default.fileURLToPath(cwd) : cwd; - let cwdPath = import_node_path.default.resolve(cwdString); - const result = []; - while (previous !== cwdPath) { - result.push(import_node_path.default.join(cwdPath, "node_modules/.bin")); - previous = cwdPath; - cwdPath = import_node_path.default.resolve(cwdPath, ".."); - } - result.push(import_node_path.default.resolve(cwdString, execPath, "..")); - return [...result, path_].join(import_node_path.default.delimiter); -} -function npmRunPathEnv({ env = import_node_process.default.env, ...options } = {}) { - env = { ...env }; - const path3 = pathKey({ env }); - options.path = env[path3]; - env[path3] = npmRunPath(options); - return env; -} - -// node_modules/mimic-fn/index.js -var copyProperty = (to, from, property, ignoreNonConfigurable) => { - if (property === "length" || property === "prototype") { - return; - } - if (property === "arguments" || property === "caller") { - return; - } - const toDescriptor = Object.getOwnPropertyDescriptor(to, property); - const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); - if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { - return; - } - Object.defineProperty(to, property, fromDescriptor); -}; -var canCopyProperty = function(toDescriptor, fromDescriptor) { - return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); -}; -var changePrototype = (to, from) => { - const fromPrototype = Object.getPrototypeOf(from); - if (fromPrototype === Object.getPrototypeOf(to)) { - return; - } - Object.setPrototypeOf(to, fromPrototype); -}; -var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ -${fromBody}`; -var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); -var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); -var changeToString = (to, from, name) => { - const withName = name === "" ? "" : `with ${name.trim()}() `; - const newToString = wrappedToString.bind(null, withName, from.toString()); - Object.defineProperty(newToString, "name", toStringName); - Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); -}; -function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { - const { name } = to; - for (const property of Reflect.ownKeys(from)) { - copyProperty(to, from, property, ignoreNonConfigurable); - } - changePrototype(to, from); - changeToString(to, from, name); - return to; -} - -// node_modules/onetime/index.js -var calledFunctions = /* @__PURE__ */ new WeakMap(); -var onetime = (function_, options = {}) => { - if (typeof function_ !== "function") { - throw new TypeError("Expected a function"); - } - let returnValue; - let callCount = 0; - const functionName = function_.displayName || function_.name || "<anonymous>"; - const onetime2 = function(...arguments_) { - calledFunctions.set(onetime2, ++callCount); - if (callCount === 1) { - returnValue = function_.apply(this, arguments_); - function_ = null; - } else if (options.throw === true) { - throw new Error(`Function \`${functionName}\` can only be called once`); - } - return returnValue; - }; - mimicFunction(onetime2, function_); - calledFunctions.set(onetime2, callCount); - return onetime2; -}; -onetime.callCount = (function_) => { - if (!calledFunctions.has(function_)) { - throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); - } - return calledFunctions.get(function_); -}; -var onetime_default = onetime; - -// node_modules/human-signals/build/src/main.js -var import_os2 = require("os"); - -// node_modules/human-signals/build/src/realtime.js -var getRealtimeSignals = function() { - const length = SIGRTMAX - SIGRTMIN + 1; - return Array.from({ length }, getRealtimeSignal); -}; -var getRealtimeSignal = function(value, index) { - return { - name: `SIGRT${index + 1}`, - number: SIGRTMIN + index, - action: "terminate", - description: "Application-specific signal (realtime)", - standard: "posix" - }; -}; -var SIGRTMIN = 34; -var SIGRTMAX = 64; - -// node_modules/human-signals/build/src/signals.js -var import_os = require("os"); - -// node_modules/human-signals/build/src/core.js -var SIGNALS = [ - { - name: "SIGHUP", - number: 1, - action: "terminate", - description: "Terminal closed", - standard: "posix" - }, - { - name: "SIGINT", - number: 2, - action: "terminate", - description: "User interruption with CTRL-C", - standard: "ansi" - }, - { - name: "SIGQUIT", - number: 3, - action: "core", - description: "User interruption with CTRL-\\", - standard: "posix" - }, - { - name: "SIGILL", - number: 4, - action: "core", - description: "Invalid machine instruction", - standard: "ansi" - }, - { - name: "SIGTRAP", - number: 5, - action: "core", - description: "Debugger breakpoint", - standard: "posix" - }, - { - name: "SIGABRT", - number: 6, - action: "core", - description: "Aborted", - standard: "ansi" - }, - { - name: "SIGIOT", - number: 6, - action: "core", - description: "Aborted", - standard: "bsd" - }, - { - name: "SIGBUS", - number: 7, - action: "core", - description: "Bus error due to misaligned, non-existing address or paging error", - standard: "bsd" - }, - { - name: "SIGEMT", - number: 7, - action: "terminate", - description: "Command should be emulated but is not implemented", - standard: "other" - }, - { - name: "SIGFPE", - number: 8, - action: "core", - description: "Floating point arithmetic error", - standard: "ansi" - }, - { - name: "SIGKILL", - number: 9, - action: "terminate", - description: "Forced termination", - standard: "posix", - forced: true - }, - { - name: "SIGUSR1", - number: 10, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGSEGV", - number: 11, - action: "core", - description: "Segmentation fault", - standard: "ansi" - }, - { - name: "SIGUSR2", - number: 12, - action: "terminate", - description: "Application-specific signal", - standard: "posix" - }, - { - name: "SIGPIPE", - number: 13, - action: "terminate", - description: "Broken pipe or socket", - standard: "posix" - }, - { - name: "SIGALRM", - number: 14, - action: "terminate", - description: "Timeout or timer", - standard: "posix" - }, - { - name: "SIGTERM", - number: 15, - action: "terminate", - description: "Termination", - standard: "ansi" - }, - { - name: "SIGSTKFLT", - number: 16, - action: "terminate", - description: "Stack is empty or overflowed", - standard: "other" - }, - { - name: "SIGCHLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "posix" - }, - { - name: "SIGCLD", - number: 17, - action: "ignore", - description: "Child process terminated, paused or unpaused", - standard: "other" - }, - { - name: "SIGCONT", - number: 18, - action: "unpause", - description: "Unpaused", - standard: "posix", - forced: true - }, - { - name: "SIGSTOP", - number: 19, - action: "pause", - description: "Paused", - standard: "posix", - forced: true - }, - { - name: "SIGTSTP", - number: 20, - action: "pause", - description: 'Paused using CTRL-Z or "suspend"', - standard: "posix" - }, - { - name: "SIGTTIN", - number: 21, - action: "pause", - description: "Background process cannot read terminal input", - standard: "posix" - }, - { - name: "SIGBREAK", - number: 21, - action: "terminate", - description: "User interruption with CTRL-BREAK", - standard: "other" - }, - { - name: "SIGTTOU", - number: 22, - action: "pause", - description: "Background process cannot write to terminal output", - standard: "posix" - }, - { - name: "SIGURG", - number: 23, - action: "ignore", - description: "Socket received out-of-band data", - standard: "bsd" - }, - { - name: "SIGXCPU", - number: 24, - action: "core", - description: "Process timed out", - standard: "bsd" - }, - { - name: "SIGXFSZ", - number: 25, - action: "core", - description: "File too big", - standard: "bsd" - }, - { - name: "SIGVTALRM", - number: 26, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGPROF", - number: 27, - action: "terminate", - description: "Timeout or timer", - standard: "bsd" - }, - { - name: "SIGWINCH", - number: 28, - action: "ignore", - description: "Terminal window size changed", - standard: "bsd" - }, - { - name: "SIGIO", - number: 29, - action: "terminate", - description: "I/O is available", - standard: "other" - }, - { - name: "SIGPOLL", - number: 29, - action: "terminate", - description: "Watched event", - standard: "other" - }, - { - name: "SIGINFO", - number: 29, - action: "ignore", - description: "Request for process information", - standard: "other" - }, - { - name: "SIGPWR", - number: 30, - action: "terminate", - description: "Device running out of power", - standard: "systemv" - }, - { - name: "SIGSYS", - number: 31, - action: "core", - description: "Invalid system call", - standard: "other" - }, - { - name: "SIGUNUSED", - number: 31, - action: "terminate", - description: "Invalid system call", - standard: "other" - } -]; - -// node_modules/human-signals/build/src/signals.js -var getSignals = function() { - const realtimeSignals = getRealtimeSignals(); - const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal); - return signals; -}; -var normalizeSignal = function({ - name, - number: defaultNumber, - description, - action, - forced = false, - standard -}) { - const { - signals: { [name]: constantSignal } - } = import_os.constants; - const supported = constantSignal !== void 0; - const number = supported ? constantSignal : defaultNumber; - return { name, number, description, supported, action, forced, standard }; -}; - -// node_modules/human-signals/build/src/main.js -var getSignalsByName = function() { - const signals = getSignals(); - return signals.reduce(getSignalByName, {}); -}; -var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) { - return { - ...signalByNameMemo, - [name]: { name, number, description, supported, action, forced, standard } - }; -}; -var signalsByName = getSignalsByName(); -var getSignalsByNumber = function() { - const signals = getSignals(); - const length = SIGRTMAX + 1; - const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); - return Object.assign({}, ...signalsA); -}; -var getSignalByNumber = function(number, signals) { - const signal = findSignalByNumber(number, signals); - if (signal === void 0) { - return {}; - } - const { name, description, supported, action, forced, standard } = signal; - return { - [number]: { - name, - number, - description, - supported, - action, - forced, - standard - } - }; -}; -var findSignalByNumber = function(number, signals) { - const signal = signals.find(({ name }) => import_os2.constants.signals[name] === number); - if (signal !== void 0) { - return signal; - } - return signals.find((signalA) => signalA.number === number); -}; -var signalsByNumber = getSignalsByNumber(); - -// node_modules/execa/lib/error.js -var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - if (isCanceled) { - return "was canceled"; - } - if (errorCode !== void 0) { - return `failed with ${errorCode}`; - } - if (signal !== void 0) { - return `was killed with ${signal} (${signalDescription})`; - } - if (exitCode !== void 0) { - return `failed with exit code ${exitCode}`; - } - return "failed"; -}; -var makeError = ({ - stdout, - stderr, - all, - error, - signal, - exitCode, - command, - escapedCommand, - timedOut, - isCanceled, - killed, - parsed: { options: { timeout } } -}) => { - exitCode = exitCode === null ? void 0 : exitCode; - signal = signal === null ? void 0 : signal; - const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; - const errorCode = error && error.code; - const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }); - const execaMessage = `Command ${prefix}: ${command}`; - const isError = Object.prototype.toString.call(error) === "[object Error]"; - const shortMessage = isError ? `${execaMessage} -${error.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n"); - if (isError) { - error.originalMessage = error.message; - error.message = message; - } else { - error = new Error(message); - } - error.shortMessage = shortMessage; - error.command = command; - error.escapedCommand = escapedCommand; - error.exitCode = exitCode; - error.signal = signal; - error.signalDescription = signalDescription; - error.stdout = stdout; - error.stderr = stderr; - if (all !== void 0) { - error.all = all; - } - if ("bufferedData" in error) { - delete error.bufferedData; - } - error.failed = true; - error.timedOut = Boolean(timedOut); - error.isCanceled = isCanceled; - error.killed = killed && !timedOut; - return error; -}; - -// node_modules/execa/lib/stdio.js -var aliases = ["stdin", "stdout", "stderr"]; -var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); -var normalizeStdio = (options) => { - if (!options) { - return; - } - const { stdio } = options; - if (stdio === void 0) { - return aliases.map((alias) => options[alias]); - } - if (hasAlias(options)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); - } - if (typeof stdio === "string") { - return stdio; - } - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - const length = Math.max(stdio.length, aliases.length); - return Array.from({ length }, (value, index) => stdio[index]); -}; -var normalizeStdioNode = (options) => { - const stdio = normalizeStdio(options); - if (stdio === "ipc") { - return "ipc"; - } - if (stdio === void 0 || typeof stdio === "string") { - return [stdio, stdio, stdio, "ipc"]; - } - if (stdio.includes("ipc")) { - return stdio; - } - return [...stdio, "ipc"]; -}; - -// node_modules/execa/lib/kill.js -var import_node_os = __toESM(require("os"), 1); -var import_signal_exit = __toESM(require_signal_exit(), 1); -var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; -var spawnedKill = (kill, signal = "SIGTERM", options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; -}; -var setKillTimeout = (kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - const timeout = getForceKillAfterTimeout(options); - const t = setTimeout(() => { - kill("SIGKILL"); - }, timeout); - if (t.unref) { - t.unref(); - } -}; -var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; -var isSigterm = (signal) => signal === import_node_os.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; -var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - return forceKillAfterTimeout; -}; -var spawnedCancel = (spawned, context) => { - const killResult = spawned.kill(); - if (killResult) { - context.isCanceled = true; - } -}; -var timeoutKill = (spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error("Timed out"), { timedOut: true, signal })); -}; -var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { - if (timeout === 0 || timeout === void 0) { - return spawnedPromise; - } - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - return Promise.race([timeoutPromise, safeSpawnedPromise]); -}; -var validateTimeout = ({ timeout }) => { - if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } -}; -var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - const removeExitHandler = (0, import_signal_exit.default)(() => { - spawned.kill(); - }); - return timedPromise.finally(() => { - removeExitHandler(); - }); -}; - -// node_modules/is-stream/index.js -function isStream(stream) { - return stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; -} - -// node_modules/execa/lib/stream.js -var import_get_stream = __toESM(require_get_stream(), 1); -var import_merge_stream = __toESM(require_merge_stream(), 1); -var handleInput = (spawned, input) => { - if (input === void 0 || spawned.stdin === void 0) { - return; - } - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -}; -var makeAllStream = (spawned, { all }) => { - if (!all || !spawned.stdout && !spawned.stderr) { - return; - } - const mixed = (0, import_merge_stream.default)(); - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - return mixed; -}; -var getBufferedData = async (stream, streamPromise) => { - if (!stream) { - return; - } - stream.destroy(); - try { - return await streamPromise; - } catch (error) { - return error.bufferedData; - } -}; -var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { - if (!stream || !buffer) { - return; - } - if (encoding) { - return (0, import_get_stream.default)(stream, { encoding, maxBuffer }); - } - return import_get_stream.default.buffer(stream, { maxBuffer }); -}; -var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { - const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }); - const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }); - const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 }); - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error) { - return Promise.all([ - { error, signal: error.signal, timedOut: error.timedOut }, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all, allPromise) - ]); - } -}; -var validateInputSync = ({ input }) => { - if (isStream(input)) { - throw new TypeError("The `input` option cannot be a stream in sync mode"); - } -}; - -// node_modules/execa/lib/promise.js -var nativePromisePrototype = (async () => { -})().constructor.prototype; -var descriptors = ["then", "catch", "finally"].map((property) => [ - property, - Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) -]); -var mergePromise = (spawned, promise) => { - for (const [property, descriptor] of descriptors) { - const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); - Reflect.defineProperty(spawned, property, { ...descriptor, value }); - } - return spawned; -}; -var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => { - spawned.on("exit", (exitCode, signal) => { - resolve({ exitCode, signal }); - }); - spawned.on("error", (error) => { - reject(error); - }); - if (spawned.stdin) { - spawned.stdin.on("error", (error) => { - reject(error); - }); - } -}); - -// node_modules/execa/lib/command.js -var normalizeArgs = (file, args = []) => { - if (!Array.isArray(args)) { - return [file]; - } - return [file, ...args]; -}; -var NO_ESCAPE_REGEXP = /^[\w.-]+$/; -var DOUBLE_QUOTES_REGEXP = /"/g; -var escapeArg = (arg) => { - if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) { - return arg; - } - return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; -}; -var joinCommand = (file, args) => normalizeArgs(file, args).join(" "); -var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); -var SPACES_REGEXP = / +/g; -var parseCommand = (command) => { - const tokens = []; - for (const token of command.trim().split(SPACES_REGEXP)) { - const previousToken = tokens[tokens.length - 1]; - if (previousToken && previousToken.endsWith("\\")) { - tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; - } else { - tokens.push(token); - } - } - return tokens; -}; - -// node_modules/execa/index.js -var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; -var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { - const env = extendEnv ? { ...import_node_process2.default.env, ...envOption } : envOption; - if (preferLocal) { - return npmRunPathEnv({ env, cwd: localDir, execPath }); - } - return env; -}; -var handleArguments = (file, args, options = {}) => { - const parsed = import_cross_spawn.default._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || import_node_process2.default.cwd(), - execPath: import_node_process2.default.execPath, - encoding: "utf8", - reject: true, - cleanup: true, - all: false, - windowsHide: true, - ...options - }; - options.env = getEnv(options); - options.stdio = normalizeStdio(options); - if (import_node_process2.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") { - args.unshift("/q"); - } - return { file, args, options, parsed }; -}; -var handleOutput = (options, value, error) => { - if (typeof value !== "string" && !import_node_buffer.Buffer.isBuffer(value)) { - return error === void 0 ? void 0 : ""; - } - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - return value; -}; -function execa(file, args, options) { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - validateTimeout(parsed.options); - let spawned; - try { - spawned = import_node_child_process.default.spawn(parsed.file, parsed.args, parsed.options); - } catch (error) { - const dummySpawned = new import_node_child_process.default.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error, - stdout: "", - stderr: "", - all: "", - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - return mergePromise(dummySpawned, errorPromise); - } - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - const context = { isCanceled: false }; - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context); - const handlePromise = async () => { - const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all = handleOutput(parsed.options, allResult); - if (error || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error, - exitCode, - signal, - stdout, - stderr, - all, - command, - escapedCommand, - parsed, - timedOut, - isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false), - killed: spawned.killed - }); - if (!parsed.options.reject) { - return returnedError; - } - throw returnedError; - } - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - all, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - const handlePromiseOnce = onetime_default(handlePromise); - handleInput(spawned, parsed.options.input); - spawned.all = makeAllStream(spawned, parsed.options); - return mergePromise(spawned, handlePromiseOnce); -} -function execaSync(file, args, options) { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - validateInputSync(parsed.options); - let result; - try { - result = import_node_child_process.default.spawnSync(parsed.file, parsed.args, parsed.options); - } catch (error) { - throw makeError({ - error, - stdout: "", - stderr: "", - all: "", - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command, - escapedCommand, - parsed, - timedOut: result.error && result.error.code === "ETIMEDOUT", - isCanceled: false, - killed: result.signal !== null - }); - if (!parsed.options.reject) { - return error; - } - throw error; - } - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -} -function execaCommand(command, options) { - const [file, ...args] = parseCommand(command); - return execa(file, args, options); -} -function execaCommandSync(command, options) { - const [file, ...args] = parseCommand(command); - return execaSync(file, args, options); -} -function execaNode(scriptPath, args, options = {}) { - if (args && !Array.isArray(args) && typeof args === "object") { - options = args; - args = []; - } - const stdio = normalizeStdioNode(options); - const defaultExecArgv = import_node_process2.default.execArgv.filter((arg) => !arg.startsWith("--inspect")); - const { - nodePath = import_node_process2.default.execPath, - nodeOptions = defaultExecArgv - } = options; - return execa( - nodePath, - [ - ...nodeOptions, - scriptPath, - ...Array.isArray(args) ? args : [] - ], - { - ...options, - stdin: void 0, - stdout: void 0, - stderr: void 0, - stdio, - shell: false - } - ); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - execa, - execaCommand, - execaCommandSync, - execaNode, - execaSync -}); diff --git a/vendors/html-element-attributes.json b/vendors/html-element-attributes.json deleted file mode 100644 index a35506d79db4..000000000000 --- a/vendors/html-element-attributes.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "htmlElementAttributes": { - "*": [ - "accesskey", - "autocapitalize", - "autofocus", - "class", - "contenteditable", - "dir", - "draggable", - "enterkeyhint", - "hidden", - "id", - "inputmode", - "is", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "nonce", - "slot", - "spellcheck", - "style", - "tabindex", - "title", - "translate" - ], - "a": [ - "charset", - "coords", - "download", - "href", - "hreflang", - "name", - "ping", - "referrerpolicy", - "rel", - "rev", - "shape", - "target", - "type" - ], - "applet": [ - "align", - "alt", - "archive", - "code", - "codebase", - "height", - "hspace", - "name", - "object", - "vspace", - "width" - ], - "area": [ - "alt", - "coords", - "download", - "href", - "hreflang", - "nohref", - "ping", - "referrerpolicy", - "rel", - "shape", - "target", - "type" - ], - "audio": [ - "autoplay", - "controls", - "crossorigin", - "loop", - "muted", - "preload", - "src" - ], - "base": [ - "href", - "target" - ], - "basefont": [ - "color", - "face", - "size" - ], - "blockquote": [ - "cite" - ], - "body": [ - "alink", - "background", - "bgcolor", - "link", - "text", - "vlink" - ], - "br": [ - "clear" - ], - "button": [ - "disabled", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "name", - "type", - "value" - ], - "canvas": [ - "height", - "width" - ], - "caption": [ - "align" - ], - "col": [ - "align", - "char", - "charoff", - "span", - "valign", - "width" - ], - "colgroup": [ - "align", - "char", - "charoff", - "span", - "valign", - "width" - ], - "data": [ - "value" - ], - "del": [ - "cite", - "datetime" - ], - "details": [ - "open" - ], - "dialog": [ - "open" - ], - "dir": [ - "compact" - ], - "div": [ - "align" - ], - "dl": [ - "compact" - ], - "embed": [ - "height", - "src", - "type", - "width" - ], - "fieldset": [ - "disabled", - "form", - "name" - ], - "font": [ - "color", - "face", - "size" - ], - "form": [ - "accept", - "accept-charset", - "action", - "autocomplete", - "enctype", - "method", - "name", - "novalidate", - "target" - ], - "frame": [ - "frameborder", - "longdesc", - "marginheight", - "marginwidth", - "name", - "noresize", - "scrolling", - "src" - ], - "frameset": [ - "cols", - "rows" - ], - "h1": [ - "align" - ], - "h2": [ - "align" - ], - "h3": [ - "align" - ], - "h4": [ - "align" - ], - "h5": [ - "align" - ], - "h6": [ - "align" - ], - "head": [ - "profile" - ], - "hr": [ - "align", - "noshade", - "size", - "width" - ], - "html": [ - "manifest", - "version" - ], - "iframe": [ - "align", - "allow", - "allowfullscreen", - "allowpaymentrequest", - "allowusermedia", - "frameborder", - "height", - "loading", - "longdesc", - "marginheight", - "marginwidth", - "name", - "referrerpolicy", - "sandbox", - "scrolling", - "src", - "srcdoc", - "width" - ], - "img": [ - "align", - "alt", - "border", - "crossorigin", - "decoding", - "height", - "hspace", - "ismap", - "loading", - "longdesc", - "name", - "referrerpolicy", - "sizes", - "src", - "srcset", - "usemap", - "vspace", - "width" - ], - "input": [ - "accept", - "align", - "alt", - "autocomplete", - "checked", - "dirname", - "disabled", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "height", - "ismap", - "list", - "max", - "maxlength", - "min", - "minlength", - "multiple", - "name", - "pattern", - "placeholder", - "readonly", - "required", - "size", - "src", - "step", - "type", - "usemap", - "value", - "width" - ], - "ins": [ - "cite", - "datetime" - ], - "isindex": [ - "prompt" - ], - "label": [ - "for", - "form" - ], - "legend": [ - "align" - ], - "li": [ - "type", - "value" - ], - "link": [ - "as", - "charset", - "color", - "crossorigin", - "disabled", - "href", - "hreflang", - "imagesizes", - "imagesrcset", - "integrity", - "media", - "referrerpolicy", - "rel", - "rev", - "sizes", - "target", - "type" - ], - "map": [ - "name" - ], - "menu": [ - "compact" - ], - "meta": [ - "charset", - "content", - "http-equiv", - "media", - "name", - "scheme" - ], - "meter": [ - "high", - "low", - "max", - "min", - "optimum", - "value" - ], - "object": [ - "align", - "archive", - "border", - "classid", - "codebase", - "codetype", - "data", - "declare", - "form", - "height", - "hspace", - "name", - "standby", - "type", - "typemustmatch", - "usemap", - "vspace", - "width" - ], - "ol": [ - "compact", - "reversed", - "start", - "type" - ], - "optgroup": [ - "disabled", - "label" - ], - "option": [ - "disabled", - "label", - "selected", - "value" - ], - "output": [ - "for", - "form", - "name" - ], - "p": [ - "align" - ], - "param": [ - "name", - "type", - "value", - "valuetype" - ], - "pre": [ - "width" - ], - "progress": [ - "max", - "value" - ], - "q": [ - "cite" - ], - "script": [ - "async", - "charset", - "crossorigin", - "defer", - "integrity", - "language", - "nomodule", - "referrerpolicy", - "src", - "type" - ], - "select": [ - "autocomplete", - "disabled", - "form", - "multiple", - "name", - "required", - "size" - ], - "slot": [ - "name" - ], - "source": [ - "height", - "media", - "sizes", - "src", - "srcset", - "type", - "width" - ], - "style": [ - "media", - "type" - ], - "table": [ - "align", - "bgcolor", - "border", - "cellpadding", - "cellspacing", - "frame", - "rules", - "summary", - "width" - ], - "tbody": [ - "align", - "char", - "charoff", - "valign" - ], - "td": [ - "abbr", - "align", - "axis", - "bgcolor", - "char", - "charoff", - "colspan", - "headers", - "height", - "nowrap", - "rowspan", - "scope", - "valign", - "width" - ], - "textarea": [ - "autocomplete", - "cols", - "dirname", - "disabled", - "form", - "maxlength", - "minlength", - "name", - "placeholder", - "readonly", - "required", - "rows", - "wrap" - ], - "tfoot": [ - "align", - "char", - "charoff", - "valign" - ], - "th": [ - "abbr", - "align", - "axis", - "bgcolor", - "char", - "charoff", - "colspan", - "headers", - "height", - "nowrap", - "rowspan", - "scope", - "valign", - "width" - ], - "thead": [ - "align", - "char", - "charoff", - "valign" - ], - "time": [ - "datetime" - ], - "tr": [ - "align", - "bgcolor", - "char", - "charoff", - "valign" - ], - "track": [ - "default", - "kind", - "label", - "src", - "srclang" - ], - "ul": [ - "compact", - "type" - ], - "video": [ - "autoplay", - "controls", - "crossorigin", - "height", - "loop", - "muted", - "playsinline", - "poster", - "preload", - "src", - "width" - ] - } -} diff --git a/vendors/html-tag-names.json b/vendors/html-tag-names.json deleted file mode 100644 index 9089e7a7c1ae..000000000000 --- a/vendors/html-tag-names.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "htmlTagNames": [ - "a", - "abbr", - "acronym", - "address", - "applet", - "area", - "article", - "aside", - "audio", - "b", - "base", - "basefont", - "bdi", - "bdo", - "bgsound", - "big", - "blink", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "center", - "cite", - "code", - "col", - "colgroup", - "command", - "content", - "data", - "datalist", - "dd", - "del", - "details", - "dfn", - "dialog", - "dir", - "div", - "dl", - "dt", - "element", - "em", - "embed", - "fieldset", - "figcaption", - "figure", - "font", - "footer", - "form", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hgroup", - "hr", - "html", - "i", - "iframe", - "image", - "img", - "input", - "ins", - "isindex", - "kbd", - "keygen", - "label", - "legend", - "li", - "link", - "listing", - "main", - "map", - "mark", - "marquee", - "math", - "menu", - "menuitem", - "meta", - "meter", - "multicol", - "nav", - "nextid", - "nobr", - "noembed", - "noframes", - "noscript", - "object", - "ol", - "optgroup", - "option", - "output", - "p", - "param", - "picture", - "plaintext", - "pre", - "progress", - "q", - "rb", - "rbc", - "rp", - "rt", - "rtc", - "ruby", - "s", - "samp", - "script", - "section", - "select", - "shadow", - "slot", - "small", - "source", - "spacer", - "span", - "strike", - "strong", - "style", - "sub", - "summary", - "sup", - "svg", - "table", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "tt", - "u", - "ul", - "var", - "video", - "wbr", - "xmp" - ] -} diff --git a/vendors/leven.d.ts b/vendors/leven.d.ts deleted file mode 100644 index 31a132da699c..000000000000 --- a/vendors/leven.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "leven"; -export * from "leven"; diff --git a/vendors/leven.js b/vendors/leven.js deleted file mode 100644 index b22ff5a5960b..000000000000 --- a/vendors/leven.js +++ /dev/null @@ -1,76 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/leven/index.js -var leven_exports = {}; -__export(leven_exports, { - default: () => leven -}); -module.exports = __toCommonJS(leven_exports); -var array = []; -var characterCodeCache = []; -function leven(first, second) { - if (first === second) { - return 0; - } - const swap = first; - if (first.length > second.length) { - first = second; - second = swap; - } - let firstLength = first.length; - let secondLength = second.length; - while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) { - firstLength--; - secondLength--; - } - let start = 0; - while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) { - start++; - } - firstLength -= start; - secondLength -= start; - if (firstLength === 0) { - return secondLength; - } - let bCharacterCode; - let result; - let temporary; - let temporary2; - let index = 0; - let index2 = 0; - while (index < firstLength) { - characterCodeCache[index] = first.charCodeAt(start + index); - array[index] = ++index; - } - while (index2 < secondLength) { - bCharacterCode = second.charCodeAt(start + index2); - temporary = index2++; - result = index2; - for (index = 0; index < firstLength; index++) { - temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1; - temporary = array[index]; - result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2; - } - } - return result; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); diff --git a/vendors/mem.d.ts b/vendors/mem.d.ts deleted file mode 100644 index b45991ef860f..000000000000 --- a/vendors/mem.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "mem"; -export * from "mem"; diff --git a/vendors/mem.js b/vendors/mem.js deleted file mode 100644 index 089ace7caf0c..000000000000 --- a/vendors/mem.js +++ /dev/null @@ -1,259 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/p-defer/index.js -var require_p_defer = __commonJS({ - "node_modules/p-defer/index.js"(exports, module2) { - "use strict"; - module2.exports = () => { - const ret = {}; - ret.promise = new Promise((resolve, reject) => { - ret.resolve = resolve; - ret.reject = reject; - }); - return ret; - }; - } -}); - -// node_modules/map-age-cleaner/dist/index.js -var require_dist = __commonJS({ - "node_modules/map-age-cleaner/dist/index.js"(exports, module2) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : new P(function(resolve2) { - resolve2(result.value); - }).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var p_defer_1 = __importDefault(require_p_defer()); - function mapAgeCleaner2(map, property = "maxAge") { - let processingKey; - let processingTimer; - let processingDeferred; - const cleanup = () => __awaiter(this, void 0, void 0, function* () { - if (processingKey !== void 0) { - return; - } - const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { - processingDeferred = p_defer_1.default(); - const delay = item[1][property] - Date.now(); - if (delay <= 0) { - map.delete(item[0]); - processingDeferred.resolve(); - return; - } - processingKey = item[0]; - processingTimer = setTimeout(() => { - map.delete(item[0]); - if (processingDeferred) { - processingDeferred.resolve(); - } - }, delay); - if (typeof processingTimer.unref === "function") { - processingTimer.unref(); - } - return processingDeferred.promise; - }); - try { - for (const entry of map) { - yield setupTimer(entry); - } - } catch (_a) { - } - processingKey = void 0; - }); - const reset = () => { - processingKey = void 0; - if (processingTimer !== void 0) { - clearTimeout(processingTimer); - processingTimer = void 0; - } - if (processingDeferred !== void 0) { - processingDeferred.reject(void 0); - processingDeferred = void 0; - } - }; - const originalSet = map.set.bind(map); - map.set = (key, value) => { - if (map.has(key)) { - map.delete(key); - } - const result = originalSet(key, value); - if (processingKey && processingKey === key) { - reset(); - } - cleanup(); - return result; - }; - cleanup(); - return map; - } - exports.default = mapAgeCleaner2; - module2.exports = mapAgeCleaner2; - module2.exports.default = mapAgeCleaner2; - } -}); - -// node_modules/mem/dist/index.js -var dist_exports = {}; -__export(dist_exports, { - default: () => mem, - memClear: () => memClear, - memDecorator: () => memDecorator -}); -module.exports = __toCommonJS(dist_exports); - -// node_modules/mimic-fn/index.js -var copyProperty = (to, from, property, ignoreNonConfigurable) => { - if (property === "length" || property === "prototype") { - return; - } - if (property === "arguments" || property === "caller") { - return; - } - const toDescriptor = Object.getOwnPropertyDescriptor(to, property); - const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); - if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { - return; - } - Object.defineProperty(to, property, fromDescriptor); -}; -var canCopyProperty = function(toDescriptor, fromDescriptor) { - return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); -}; -var changePrototype = (to, from) => { - const fromPrototype = Object.getPrototypeOf(from); - if (fromPrototype === Object.getPrototypeOf(to)) { - return; - } - Object.setPrototypeOf(to, fromPrototype); -}; -var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ -${fromBody}`; -var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); -var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); -var changeToString = (to, from, name) => { - const withName = name === "" ? "" : `with ${name.trim()}() `; - const newToString = wrappedToString.bind(null, withName, from.toString()); - Object.defineProperty(newToString, "name", toStringName); - Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); -}; -function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { - const { name } = to; - for (const property of Reflect.ownKeys(from)) { - copyProperty(to, from, property, ignoreNonConfigurable); - } - changePrototype(to, from); - changeToString(to, from, name); - return to; -} - -// node_modules/mem/dist/index.js -var import_map_age_cleaner = __toESM(require_dist(), 1); -var cacheStore = /* @__PURE__ */ new WeakMap(); -function mem(fn, { cacheKey, cache = /* @__PURE__ */ new Map(), maxAge } = {}) { - if (typeof maxAge === "number") { - (0, import_map_age_cleaner.default)(cache); - } - const memoized = function(...arguments_) { - const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; - const cacheItem = cache.get(key); - if (cacheItem) { - return cacheItem.data; - } - const result = fn.apply(this, arguments_); - cache.set(key, { - data: result, - maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY - }); - return result; - }; - mimicFunction(memoized, fn, { - ignoreNonConfigurable: true - }); - cacheStore.set(memoized, cache); - return memoized; -} -function memDecorator(options = {}) { - const instanceMap = /* @__PURE__ */ new WeakMap(); - return (target, propertyKey, descriptor) => { - const input = target[propertyKey]; - if (typeof input !== "function") { - throw new TypeError("The decorated value must be a function"); - } - delete descriptor.value; - delete descriptor.writable; - descriptor.get = function() { - if (!instanceMap.has(this)) { - const value = mem(input, options); - instanceMap.set(this, value); - return value; - } - return instanceMap.get(this); - }; - }; -} -function memClear(fn) { - const cache = cacheStore.get(fn); - if (!cache) { - throw new TypeError("Can't clear a function that was not memoized!"); - } - if (typeof cache.clear !== "function") { - throw new TypeError("The cache Map can't be cleared!"); - } - cache.clear(); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - memClear, - memDecorator -}); diff --git a/vendors/sdbm.d.ts b/vendors/sdbm.d.ts deleted file mode 100644 index 812356628a7f..000000000000 --- a/vendors/sdbm.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "sdbm"; -export * from "sdbm"; diff --git a/vendors/sdbm.js b/vendors/sdbm.js deleted file mode 100644 index d867062988b5..000000000000 --- a/vendors/sdbm.js +++ /dev/null @@ -1,35 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/sdbm/index.js -var sdbm_exports = {}; -__export(sdbm_exports, { - default: () => sdbm -}); -module.exports = __toCommonJS(sdbm_exports); -function sdbm(string) { - let hash = 0; - for (let i = 0; i < string.length; i++) { - hash = string.charCodeAt(i) + (hash << 6) + (hash << 16) - hash; - } - return hash >>> 0; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); diff --git a/vendors/string-width.d.ts b/vendors/string-width.d.ts deleted file mode 100644 index 55e7c60a0672..000000000000 --- a/vendors/string-width.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "string-width"; -export * from "string-width"; diff --git a/vendors/string-width.js b/vendors/string-width.js deleted file mode 100644 index 2404894283ad..000000000000 --- a/vendors/string-width.js +++ /dev/null @@ -1,100 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/emoji-regex/index.js -var require_emoji_regex = __commonJS({ - "node_modules/emoji-regex/index.js"(exports, module2) { - "use strict"; - module2.exports = function() { - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; - }; - } -}); - -// node_modules/string-width/index.js -var string_width_exports = {}; -__export(string_width_exports, { - default: () => stringWidth -}); -module.exports = __toCommonJS(string_width_exports); - -// node_modules/strip-ansi/node_modules/ansi-regex/index.js -function ansiRegex({ onlyFirst = false } = {}) { - const pattern = [ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" - ].join("|"); - return new RegExp(pattern, onlyFirst ? void 0 : "g"); -} - -// node_modules/strip-ansi/index.js -function stripAnsi(string) { - if (typeof string !== "string") { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - return string.replace(ansiRegex(), ""); -} - -// node_modules/is-fullwidth-code-point/index.js -function isFullwidthCodePoint(codePoint) { - if (!Number.isInteger(codePoint)) { - return false; - } - return codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141); -} - -// node_modules/string-width/index.js -var import_emoji_regex = __toESM(require_emoji_regex(), 1); -function stringWidth(string) { - if (typeof string !== "string" || string.length === 0) { - return 0; - } - string = stripAnsi(string); - if (string.length === 0) { - return 0; - } - string = string.replace((0, import_emoji_regex.default)(), " "); - let width = 0; - for (let index = 0; index < string.length; index++) { - const codePoint = string.codePointAt(index); - if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) { - continue; - } - if (codePoint >= 768 && codePoint <= 879) { - continue; - } - if (codePoint > 65535) { - index++; - } - width += isFullwidthCodePoint(codePoint) ? 2 : 1; - } - return width; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); diff --git a/vendors/strip-ansi.d.ts b/vendors/strip-ansi.d.ts deleted file mode 100644 index 07389334ca60..000000000000 --- a/vendors/strip-ansi.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "strip-ansi"; -export * from "strip-ansi"; diff --git a/vendors/strip-ansi.js b/vendors/strip-ansi.js deleted file mode 100644 index 1c3a4e564683..000000000000 --- a/vendors/strip-ansi.js +++ /dev/null @@ -1,45 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/strip-ansi/index.js -var strip_ansi_exports = {}; -__export(strip_ansi_exports, { - default: () => stripAnsi -}); -module.exports = __toCommonJS(strip_ansi_exports); - -// node_modules/strip-ansi/node_modules/ansi-regex/index.js -function ansiRegex({ onlyFirst = false } = {}) { - const pattern = [ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" - ].join("|"); - return new RegExp(pattern, onlyFirst ? void 0 : "g"); -} - -// node_modules/strip-ansi/index.js -function stripAnsi(string) { - if (typeof string !== "string") { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - return string.replace(ansiRegex(), ""); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); diff --git a/vendors/tempy.d.ts b/vendors/tempy.d.ts deleted file mode 100644 index b5e9800e5c99..000000000000 --- a/vendors/tempy.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is generated automatically. -export {default} from "tempy"; -export * from "tempy"; diff --git a/vendors/tempy.js b/vendors/tempy.js deleted file mode 100644 index 493719575e8f..000000000000 --- a/vendors/tempy.js +++ /dev/null @@ -1,10039 +0,0 @@ -// @ts-nocheck -// This file is generated automatically -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// node_modules/temp-dir/index.js -var require_temp_dir = __commonJS({ - "node_modules/temp-dir/index.js"(exports, module2) { - "use strict"; - var fs2 = require("fs"); - var os = require("os"); - var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__"); - if (!global[tempDirectorySymbol]) { - Object.defineProperty(global, tempDirectorySymbol, { - value: fs2.realpathSync(os.tmpdir()) - }); - } - module2.exports = global[tempDirectorySymbol]; - } -}); - -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.splitWhen = exports.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.isEnoentCodeError = void 0; - function isEnoentCodeError(error) { - return error.code === "ENOENT"; - } - exports.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; - var path2 = require("path"); - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path2.resolve(cwd, filepath); - } - exports.makeAbsolute = makeAbsolute; - function escape(pattern) { - return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports.escape = escape; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports.removeLeadingDotSegment = removeLeadingDotSegment; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports, module2) { - module2.exports = function isExtglob(str) { - if (typeof str !== "string" || str === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { - if (match[2]) - return true; - str = str.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str) { - if (str[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === "*") { - return true; - } - if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) { - return true; - } - if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { - closeCurlyIndex = str.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") { - closeParenIndex = str.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str.indexOf("|", index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { - closeParenIndex = str.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str[index] === "\\") { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str) { - if (str[0] === "!") { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - if (str[index] === "\\") { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str, options) { - if (typeof str !== "string" || str === "") { - return false; - } - if (isExtglob(str)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - if (enclosure.test(str)) { - str += slash; - } - str += "a"; - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - return str.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils = __commonJS({ - "node_modules/braces/lib/utils.js"(exports) { - "use strict"; - exports.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports.find = (node, type) => node.nodes.find((node2) => node2.type === type); - exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) - return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) - return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports.escapeNode = (block, n = 0, type) => { - let node = block.nodes[n]; - if (!node) - return; - if (type && node.type === type || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports.encloseBrace = (node) => { - if (node.type !== "brace") - return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports.isInvalidBrace = (block) => { - if (block.type !== "brace") - return false; - if (block.invalid === true || block.dollar) - return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") - acc.push(node.value); - if (node.type === "range") - node.type = "text"; - return acc; - }, []); - exports.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - let ele = arr[i]; - Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports, module2) { - "use strict"; - var utils = require_utils(); - module2.exports = (ast, options = {}) => { - let stringify = (node, parent = {}) => { - let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (let child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) - arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val) { - return arr.some((ele) => ele[key] === val); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str) { - return /^-?(0+)\d/.test(str); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") - value = value.slice(1); - if (value === "0") - return false; - while (value[++index] === "0") - ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) - input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) - input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) - return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) - throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) - throw rangeError([start, end]); - return []; - } - if (a === 0) - a = 0; - if (b === 0) - b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val) => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) - opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject(step)) - return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils(); - var compile = (ast, options = {}) => { - let walk = (node, parent = {}) => { - let invalidBlock = utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let invalid = invalidBlock === true || invalidNode === true; - let prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - let range = fill(...args, { ...options, wrap: false, toRegex: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (let child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils(); - var append = (queue = "", stash = "", enclose = false) => { - let result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) - return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (let item of queue) { - if (Array.isArray(item)) { - for (let value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") - ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - let walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - let enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) - queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants = __commonJS({ - "node_modules/braces/lib/constants.js"(exports, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1024 * 64, - CHAR_0: "0", - CHAR_9: "9", - CHAR_UPPERCASE_A: "A", - CHAR_LOWERCASE_A: "a", - CHAR_UPPERCASE_Z: "Z", - CHAR_LOWERCASE_Z: "z", - CHAR_LEFT_PARENTHESES: "(", - CHAR_RIGHT_PARENTHESES: ")", - CHAR_ASTERISK: "*", - CHAR_AMPERSAND: "&", - CHAR_AT: "@", - CHAR_BACKSLASH: "\\", - CHAR_BACKTICK: "`", - CHAR_CARRIAGE_RETURN: "\r", - CHAR_CIRCUMFLEX_ACCENT: "^", - CHAR_COLON: ":", - CHAR_COMMA: ",", - CHAR_DOLLAR: "$", - CHAR_DOT: ".", - CHAR_DOUBLE_QUOTE: '"', - CHAR_EQUAL: "=", - CHAR_EXCLAMATION_MARK: "!", - CHAR_FORM_FEED: "\f", - CHAR_FORWARD_SLASH: "/", - CHAR_HASH: "#", - CHAR_HYPHEN_MINUS: "-", - CHAR_LEFT_ANGLE_BRACKET: "<", - CHAR_LEFT_CURLY_BRACE: "{", - CHAR_LEFT_SQUARE_BRACKET: "[", - CHAR_LINE_FEED: "\n", - CHAR_NO_BREAK_SPACE: "\xA0", - CHAR_PERCENT: "%", - CHAR_PLUS: "+", - CHAR_QUESTION_MARK: "?", - CHAR_RIGHT_ANGLE_BRACKET: ">", - CHAR_RIGHT_CURLY_BRACE: "}", - CHAR_RIGHT_SQUARE_BRACKET: "]", - CHAR_SEMICOLON: ";", - CHAR_SINGLE_QUOTE: "'", - CHAR_SPACE: " ", - CHAR_TAB: " ", - CHAR_UNDERSCORE: "_", - CHAR_VERTICAL_LINE: "|", - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse = __commonJS({ - "node_modules/braces/lib/parse.js"(exports, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - CHAR_BACKTICK, - CHAR_COMMA, - CHAR_DOT, - CHAR_LEFT_PARENTHESES, - CHAR_RIGHT_PARENTHESES, - CHAR_LEFT_CURLY_BRACE, - CHAR_RIGHT_CURLY_BRACE, - CHAR_LEFT_SQUARE_BRACKET, - CHAR_RIGHT_SQUARE_BRACKET, - CHAR_DOUBLE_QUOTE, - CHAR_SINGLE_QUOTE, - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - let opts = options || {}; - let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - let ast = { type: "root", input, nodes: [] }; - let stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - let length = input.length; - let index = 0; - let depth = 0; - let value; - let memo = {}; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - let closed = true; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - let open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) - value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - let brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - let type = "close"; - block = stack.pop(); - block.close = true; - push({ type, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - let open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - let siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - let before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") - node.isOpen = true; - if (node.type === "close") - node.isClose = true; - if (!node.nodes) - node.type = "text"; - node.invalid = true; - } - }); - let parent = stack[stack.length - 1]; - let index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (let pattern of input) { - let result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants2 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports, module2) { - "use strict"; - var path2 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - CHAR_0: 48, - CHAR_9: 57, - CHAR_UPPERCASE_A: 65, - CHAR_LOWERCASE_A: 97, - CHAR_UPPERCASE_Z: 90, - CHAR_LOWERCASE_Z: 122, - CHAR_LEFT_PARENTHESES: 40, - CHAR_RIGHT_PARENTHESES: 41, - CHAR_ASTERISK: 42, - CHAR_AMPERSAND: 38, - CHAR_AT: 64, - CHAR_BACKWARD_SLASH: 92, - CHAR_CARRIAGE_RETURN: 13, - CHAR_CIRCUMFLEX_ACCENT: 94, - CHAR_COLON: 58, - CHAR_COMMA: 44, - CHAR_DOT: 46, - CHAR_DOUBLE_QUOTE: 34, - CHAR_EQUAL: 61, - CHAR_EXCLAMATION_MARK: 33, - CHAR_FORM_FEED: 12, - CHAR_FORWARD_SLASH: 47, - CHAR_GRAVE_ACCENT: 96, - CHAR_HASH: 35, - CHAR_HYPHEN_MINUS: 45, - CHAR_LEFT_ANGLE_BRACKET: 60, - CHAR_LEFT_CURLY_BRACE: 123, - CHAR_LEFT_SQUARE_BRACKET: 91, - CHAR_LINE_FEED: 10, - CHAR_NO_BREAK_SPACE: 160, - CHAR_PERCENT: 37, - CHAR_PLUS: 43, - CHAR_QUESTION_MARK: 63, - CHAR_RIGHT_ANGLE_BRACKET: 62, - CHAR_RIGHT_CURLY_BRACE: 125, - CHAR_RIGHT_SQUARE_BRACKET: 93, - CHAR_SEMICOLON: 59, - CHAR_SINGLE_QUOTE: 39, - CHAR_SPACE: 32, - CHAR_TAB: 9, - CHAR_UNDERSCORE: 95, - CHAR_VERTICAL_LINE: 124, - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - SEP: path2.sep, - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils2 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports) { - "use strict"; - var path2 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants2(); - exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); - exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); - exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); - exports.removeBackslashes = (str) => { - return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path2.sep === "\\"; - }; - exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) - return input; - if (input[idx - 1] === "\\") - return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports, module2) { - "use strict"; - var utils = require_utils2(); - var { - CHAR_ASTERISK, - CHAR_AT, - CHAR_BACKWARD_SLASH, - CHAR_COMMA, - CHAR_DOT, - CHAR_EXCLAMATION_MARK, - CHAR_FORWARD_SLASH, - CHAR_LEFT_CURLY_BRACE, - CHAR_LEFT_PARENTHESES, - CHAR_LEFT_SQUARE_BRACKET, - CHAR_PLUS, - CHAR_QUESTION_MARK, - CHAR_RIGHT_CURLY_BRACE, - CHAR_RIGHT_PARENTHESES, - CHAR_RIGHT_SQUARE_BRACKET - } = require_constants2(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) - continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) - isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob = str; - } else { - base = str; - } - if (base && base !== "" && base !== "/" && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob) - glob = utils.removeBackslashes(glob); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports, module2) { - "use strict"; - var constants = require_constants2(); - var utils = require_utils2(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type) => { - state[type]++; - stack.push(type); - }; - const decrement = (type) => { - state[type]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) - append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") - prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) - return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create = (str) => { - switch (str) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) - return; - const source2 = create(match[1]); - if (!source2) - return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports, module2) { - "use strict"; - var path2 = require("path"); - var scan = require_scan(); - var parse = require_parse2(); - var utils = require_utils2(); - var constants = require_constants2(); - var isObject = (val) => val && typeof val === "object" && !Array.isArray(val); - var picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str) => { - for (const isMatch of fns) { - const state2 = isMatch(str); - if (state2) - return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject(glob) && glob.tokens && glob.input; - if (glob === "" || typeof glob !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path2.basename(input)); - }; - picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) - return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) - throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils2(); - var isEmptyString = (val) => val === "" || val === "./"; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) - negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) - continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) - options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str, pattern, options) => { - if (typeof str !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) - res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str, patterns, options) => { - if (typeof str !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str)); - }; - micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") - throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") - throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; - var path2 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path2.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - return micromatch.braces(pattern, { - expand: true, - nodupes: true - }); - } - exports.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports.matchAny = matchAny; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.merge = void 0; - var merge2 = require_merge2(); - function merge(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream2) => { - stream2.once("error", (error) => mergedStream.emit("error", error)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports.merge = merge; - function propagateCloseEventToSources(streams) { - streams.forEach((stream2) => stream2.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.isEmpty = exports.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils3 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; - var array = require_array(); - exports.array = array; - var errno = require_errno(); - exports.errno = errno; - var fs2 = require_fs(); - exports.fs = fs2; - var path2 = require_path(); - exports.path = path2; - var pattern = require_pattern(); - exports.pattern = pattern; - var stream2 = require_stream(); - exports.stream = stream2; - var string = require_string(); - exports.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; - var utils = require_utils3(); - function generate(patterns, settings) { - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); - const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); - return staticTasks.concat(dynamicTasks); - } - exports.generate = generate; - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/fast-glob/out/managers/patterns.js -var require_patterns = __commonJS({ - "node_modules/fast-glob/out/managers/patterns.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.removeDuplicateSlashes = exports.transform = void 0; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function transform(patterns) { - return patterns.map((pattern) => removeDuplicateSlashes(pattern)); - } - exports.transform = transform; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports.removeDuplicateSlashes = removeDuplicateSlashes; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.read = void 0; - function read(path2, settings, callback) { - settings.fs.lstat(path2, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path2, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports.read = read; - function callFailureCallback(callback, error) { - callback(error); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.read = void 0; - function read(path2, settings) { - const lstat = settings.fs.lstatSync(path2); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path2); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error; - } - } - exports.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var fs2 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.statSync = exports.stat = exports.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports.Settings = settings_1.default; - function stat(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports.stat = stat; - function statSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) - cb(err, results); - cb = null; - } - if (isSync) - queueMicrotask2(end); - else - end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.fs = void 0; - var fs2 = require_fs3(); - exports.fs = fs2; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants3(); - var utils = require_utils4(); - var common = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path2 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path2, settings.fsStatSettings, (error, stats) => { - if (error !== null) { - done(error); - return; - } - const entry = { - name, - path: path2, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports.readdir = readdir; - function callFailureCallback(callback, error) { - callback(error); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants3(); - var utils = require_utils4(); - var common = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error; - } - } - } - return entry; - }); - } - exports.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var fs2 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Settings = exports.scandirSync = exports.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports.Settings = settings_1.default; - function scandir(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports.scandir = scandir; - function scandirSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context, worker, concurrency) { - if (typeof context === "function") { - concurrency = worker; - worker = context; - context = null; - } - if (concurrency < 1) { - throw new Error("fastqueue concurrency must be greater than 1"); - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var errorHandler = null; - var self = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain, - error - }; - return self; - function running() { - return _running; - } - function pause() { - self.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self.paused) - return; - self.paused = false; - for (var i = 0; i < self.concurrency; i++) { - _running++; - release(); - } - } - function idle() { - return _running === 0 && self.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context; - current.release = release; - current.value = value; - current.callback = done || noop; - current.errorHandler = errorHandler; - if (_running === self.concurrency || self.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self.saturated(); - } - } else { - _running++; - worker.call(context, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self.concurrency || self.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self.saturated(); - } - } else { - _running++; - worker.call(context, current.value, current.worked); - } - } - function release(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context, next.value, next.worked); - if (queueTail === null) { - self.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self.drain(); - self.drain = noop; - } - function error(handler) { - errorHandler = handler; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - this.errorHandler = null; - var self = this; - this.worked = function worked(err, result) { - var callback = self.callback; - var errorHandler = self.errorHandler; - var val = self.value; - self.value = null; - self.callback = noop; - if (self.errorHandler) { - errorHandler(err, val); - } - callback.call(self.context, err, result); - self.release(self); - }; - } - function queueAsPromised(context, worker, concurrency) { - if (typeof context === "function") { - concurrency = worker; - worker = context; - context = null; - } - function asyncWrapper(arg, cb) { - worker.call(this, arg).then(function(res) { - cb(null, res); - }, cb); - } - var queue = fastqueue(context, asyncWrapper, concurrency); - var pushCb = queue.push; - var unshiftCb = queue.unshift; - queue.push = push; - queue.unshift = unshift; - queue.drained = drained; - return queue; - function push(value) { - var p = new Promise(function(resolve, reject) { - pushCb(value, function(err, result) { - if (err) { - reject(err); - return; - } - resolve(result); - }); - }); - p.catch(noop); - return p; - } - function unshift(value) { - var p = new Promise(function(resolve, reject) { - unshiftCb(value, function(err, result) { - if (err) { - reject(err); - return; - } - resolve(result); - }); - }); - p.catch(noop); - return p; - } - function drained() { - var previousDrain = queue.drain; - var p = new Promise(function(resolve) { - queue.drain = function() { - previousDrain(); - resolve(); - }; - }); - return p; - } - } - module2.exports = fastqueue; - module2.exports.promise = queueAsPromised; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; - function isFatalError(settings, error) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error); - } - exports.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var common = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error) => { - if (error !== null) { - this._handleError(error); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { - if (error !== null) { - done(error, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error) { - if (this._isDestroyed || !common.isFatalError(this._settings, error)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error) => { - callFailureCallback(callback, error); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports.default = AsyncProvider; - function callFailureCallback(callback, error) { - callback(error); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error) => { - this._stream.emit("error", error); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error) { - this._handleError(error); - } - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - throw error; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var path2 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var utils = require_utils3(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path2.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error) { - return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; - } - }; - exports.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { - if (options.errorFilter(error)) { - return null; - } - throw error; - }); - } - _getStat(filepath) { - return new Promise((resolve, reject) => { - this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve(stats) : reject(error); - }); - }); - } - }; - exports.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve, reject) => { - this._walkAsync(root, options, (error, entries) => { - if (error === null) { - resolve(entries); - } else { - reject(error); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve(entries)); - }); - } - }; - exports.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var utils = require_utils3(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); - for (const pattern of patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var utils = require_utils3(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var utils = require_utils3(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); - const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); - return (entry) => this._filter(entry, positiveRe, negativeRe); - } - _filter(entry, positiveRe, negativeRe) { - if (this._settings.unique && this._isDuplicateEntry(entry)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { - return false; - } - const filepath = this._settings.baseNameMatch ? entry.name : entry.path; - const isDirectory = entry.dirent.isDirectory(); - const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(entry.path, negativeRe, isDirectory); - if (this._settings.unique && isMatched) { - this._createIndexRecord(entry); - } - return isMatched; - } - _isDuplicateEntry(entry) { - return this.index.has(entry.path); - } - _createIndexRecord(entry) { - this.index.set(entry.path, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { - if (!this._settings.absolute) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); - return utils.pattern.matchAny(fullpath, patternsRe); - } - _isMatchToPatterns(entryPath, patternsRe, isDirectory) { - const filepath = utils.path.removeLeadingDotSegment(entryPath); - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var utils = require_utils3(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error) => this._isNonFatalError(error); - } - _isNonFatalError(error) { - return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; - } - }; - exports.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var utils = require_utils3(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var path2 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path2.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error) { - if (options.errorFilter(error)) { - return null; - } - throw error; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - var os = require("os"); - var CPU_COUNT = Math.max(os.cpus().length, 1); - exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - lstatSync: fs2.lstatSync, - stat: fs2.stat, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports, module2) { - "use strict"; - var taskManager = require_tasks(); - var patternManager = require_patterns(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils3(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = patternManager.transform([].concat(source)); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = patternManager.transform([].concat(source)); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports) { - "use strict"; - var { promisify: promisify3 } = require("util"); - var fs2 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify3(fs2[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error) { - if (error.code === "ENOENT") { - return false; - } - throw error; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs2[fsStatType](filePath)[statsMethodName](); - } catch (error) { - if (error.code === "ENOENT") { - return false; - } - throw error; - } - } - exports.isFile = isType.bind(null, "stat", "isFile"); - exports.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports, module2) { - "use strict"; - var path2 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath2 = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path2.isAbsolute(pth) ? pth : path2.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path2.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path2.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path2.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path2.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath2(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath2(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/globby/node_modules/ignore/index.js"(exports, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - [ - /\\\s/g, - () => SPACE - ], - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - /(?!\\)\?/g, - () => "[^/]" - ], - [ - /^\//, - () => "^" - ], - [ - /\//g, - () => "\\/" - ], - [ - /^\^*\\\*\\\*\\\//, - () => "^(?:.*\\/)?" - ], - [ - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - [ - /\\\/\\\*\\\*(?=\\\/|$)/g, - (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - [ - /(^|[^\\]+)(\\\*)+(?=.+)/g, - (_, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - /\\\\/g, - () => ESCAPE - ], - [ - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - [ - /(?:[^*])$/, - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path2, originalPath, doThrow) => { - if (!isString(path2)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path2) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path2)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - addPattern(pattern) { - return this.add(pattern); - } - _testOne(path2, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path2); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - _test(originalPath, cache, checkUnignored, slices) { - const path2 = originalPath && checkPath.convert(originalPath); - checkPath( - path2, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError - ); - return this._t(path2, cache, checkUnignored, slices); - } - _t(path2, cache, checkUnignored, slices) { - if (path2 in cache) { - return cache[path2]; - } - if (!slices) { - slices = path2.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path2] = this._testOne(path2, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored); - } - ignores(path2) { - return this._test(path2, this._ignoreCache, false).ignored; - } - createFilter() { - return (path2) => !this.ignores(path2); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - test(path2) { - return this._test(path2, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) { - const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports, module2) { - "use strict"; - module2.exports = (path2) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path2); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path2); - if (isExtendedLengthPath || hasNonAscii) { - return path2; - } - return path2.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports, module2) { - "use strict"; - var { promisify: promisify3 } = require("util"); - var fs2 = require("fs"); - var path2 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify3(fs2.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path2.posix.join(base, ignore.slice(1)); - } - return path2.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path2.relative(options.cwd, path2.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path2.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path2.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path2.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = fs2.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports, module2) { - "use strict"; - var fs2 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs2.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs2.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) - Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs2) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs2); - } - if (!fs2.lutimes) { - patchLutimes(fs2); - } - fs2.chown = chownFix(fs2.chown); - fs2.fchown = chownFix(fs2.fchown); - fs2.lchown = chownFix(fs2.lchown); - fs2.chmod = chmodFix(fs2.chmod); - fs2.fchmod = chmodFix(fs2.fchmod); - fs2.lchmod = chmodFix(fs2.lchmod); - fs2.chownSync = chownFixSync(fs2.chownSync); - fs2.fchownSync = chownFixSync(fs2.fchownSync); - fs2.lchownSync = chownFixSync(fs2.lchownSync); - fs2.chmodSync = chmodFixSync(fs2.chmodSync); - fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); - fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); - fs2.stat = statFix(fs2.stat); - fs2.fstat = statFix(fs2.fstat); - fs2.lstat = statFix(fs2.lstat); - fs2.statSync = statFixSync(fs2.statSync); - fs2.fstatSync = statFixSync(fs2.fstatSync); - fs2.lstatSync = statFixSync(fs2.lstatSync); - if (fs2.chmod && !fs2.lchmod) { - fs2.lchmod = function(path2, mode, cb) { - if (cb) - process.nextTick(cb); - }; - fs2.lchmodSync = function() { - }; - } - if (fs2.chown && !fs2.lchown) { - fs2.lchown = function(path2, uid, gid, cb) { - if (cb) - process.nextTick(cb); - }; - fs2.lchownSync = function() { - }; - } - if (platform === "win32") { - fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs2.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) - cb(er); - }); - } - if (Object.setPrototypeOf) - Object.setPrototypeOf(rename, fs$rename); - return rename; - }(fs2.rename); - } - fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) - Object.setPrototypeOf(read, fs$read); - return read; - }(fs2.read); - fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs2, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - }(fs2.readSync); - function patchLchmod(fs3) { - fs3.lchmod = function(path2, mode, callback) { - fs3.open( - path2, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) - callback(err); - return; - } - fs3.fchmod(fd, mode, function(err2) { - fs3.close(fd, function(err22) { - if (callback) - callback(err2 || err22); - }); - }); - } - ); - }; - fs3.lchmodSync = function(path2, mode) { - var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs3.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs3) { - if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { - fs3.lutimes = function(path2, at, mt, cb) { - fs3.open(path2, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) - cb(er); - return; - } - fs3.futimes(fd, at, mt, function(er2) { - fs3.close(fd, function(er22) { - if (cb) - cb(er2 || er22); - }); - }); - }); - }; - fs3.lutimesSync = function(path2, at, mt) { - var fd = fs3.openSync(path2, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs3.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } else if (fs3.futimes) { - fs3.lutimes = function(_a, _b, _c, cb) { - if (cb) - process.nextTick(cb); - }; - fs3.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) - return orig; - return function(target, mode, cb) { - return orig.call(fs2, target, mode, function(er) { - if (chownErOk(er)) - er = null; - if (cb) - cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) - return orig; - return function(target, mode) { - try { - return orig.call(fs2, target, mode); - } catch (er) { - if (!chownErOk(er)) - throw er; - } - }; - } - function chownFix(orig) { - if (!orig) - return orig; - return function(target, uid, gid, cb) { - return orig.call(fs2, target, uid, gid, function(er) { - if (chownErOk(er)) - er = null; - if (cb) - cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) - return orig; - return function(target, uid, gid) { - try { - return orig.call(fs2, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) - throw er; - } - }; - } - function statFix(orig) { - if (!orig) - return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) - stats.uid += 4294967296; - if (stats.gid < 0) - stats.gid += 4294967296; - } - if (cb) - cb.apply(this, arguments); - } - return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) - return orig; - return function(target, options) { - var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); - if (stats) { - if (stats.uid < 0) - stats.uid += 4294967296; - if (stats.gid < 0) - stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs2) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path2, options) { - if (!(this instanceof ReadStream)) - return new ReadStream(path2, options); - Stream.call(this); - var self = this; - this.path = path2; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) - this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - fs2.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self.emit("error", err); - self.readable = false; - return; - } - self.fd = fd; - self.emit("open", fd); - self._read(); - }); - } - function WriteStream(path2, options) { - if (!(this instanceof WriteStream)) - return new WriteStream(path2, options); - Stream.call(this); - this.path = path2; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs2.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports, module2) { - var fs2 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context, queue2) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug = noop; - if (util.debuglog) - debug = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs2[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs2, queue); - fs2.close = function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs2, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - }(fs2.close); - fs2.closeSync = function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs2, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - }(fs2.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug(fs2[gracefulQueue]); - require("assert").equal(fs2[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs2[gracefulQueue]); - } - module2.exports = patch(clone(fs2)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { - module2.exports = patch(fs2); - fs2.__patched = true; - } - function patch(fs3) { - polyfills(fs3); - fs3.gracefulify = patch; - fs3.createReadStream = createReadStream; - fs3.createWriteStream = createWriteStream; - var fs$readFile = fs3.readFile; - fs3.readFile = readFile; - function readFile(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path2, options, cb); - function go$readFile(path3, options2, cb2, startTime) { - return fs$readFile(path3, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs3.writeFile; - fs3.writeFile = writeFile; - function writeFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path2, data, options, cb); - function go$writeFile(path3, data2, options2, cb2, startTime) { - return fs$writeFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs3.appendFile; - if (fs$appendFile) - fs3.appendFile = appendFile; - function appendFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path2, data, options, cb); - function go$appendFile(path3, data2, options2, cb2, startTime) { - return fs$appendFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs3.copyFile; - if (fs$copyFile) - fs3.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs3.readdir; - fs3.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - } : function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, options2, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - }; - return go$readdir(path2, options, cb); - function fs$readdirCallback(path3, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path3, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs3); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs3.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs3.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs3, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val) { - ReadStream = val; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs3, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val) { - WriteStream = val; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs3, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val) { - FileReadStream = val; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs3, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val) { - FileWriteStream = val; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path2, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path2, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path2, options) { - return new fs3.ReadStream(path2, options); - } - function createWriteStream(path2, options) { - return new fs3.WriteStream(path2, options); - } - var fs$open = fs3.open; - fs3.open = open; - function open(path2, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path2, flags, mode, cb); - function go$open(path3, flags2, mode2, cb2, startTime) { - return fs$open(path3, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs3; - } - function enqueue(elem) { - debug("ENQUEUE", elem[0].name, elem[1]); - fs2[gracefulQueue].push(elem); - retry(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs2[gracefulQueue].length; ++i) { - if (fs2[gracefulQueue][i].length > 2) { - fs2[gracefulQueue][i][3] = now; - fs2[gracefulQueue][i][4] = now; - } - } - retry(); - } - function retry() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs2[gracefulQueue].length === 0) - return; - var elem = fs2[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs2[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path2.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path2.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path2.sep}`) && relation !== path2.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs2 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs2.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) - cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs2.statSync(base); - linkTarget = fs2.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) - cache[base] = resolvedLink; - if (!isWindows) - seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) - cache[original] = p; - return p; - }; - exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstat(base, function(err) { - if (err) - return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) - cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs2.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) - return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) - cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs2.stat(base, function(err2) { - if (err2) - return cb(err2); - fs2.readlink(base, function(err3, target) { - if (!isWindows) - seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) - return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) - cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs2 = require("fs"); - var origRealpath = fs2.realpath; - var origRealpathSync = fs2.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs2.realpath = realpath; - fs2.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs2.realpath = origRealpath; - fs2.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) - res.push.apply(res, x); - else - res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str) { - if (a instanceof RegExp) - a = maybeMatch(a, str); - if (b instanceof RegExp) - b = maybeMatch(b, str); - var r = range(a, b, str); - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - if (a === b) { - return [ai, bi]; - } - begs = []; - left = str.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str) { - return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); - } - function escapeBraces(str) { - return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str) { - return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str) { - if (!str) - return [""]; - var parts = []; - var m = balanced("{", "}", str); - if (!m) - return str.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str) { - if (!str) - return []; - if (str.substr(0, 2) === "{}") { - str = "\\{\\}" + str.substr(2); - } - return expand(escapeBraces(str), true).map(unescapeBraces); - } - function embrace(str) { - return "{" + str + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte(i, y) { - return i >= y; - } - function expand(str, isTop) { - var expansions = []; - var m = balanced("{", "}", str); - if (!m || /\$$/.test(m.pre)) - return [str]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str = m.pre + "{" + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path2 = function() { - try { - return require("path"); - } catch (e) { - } - }() || { - sep: "/" - }; - minimatch.sep = path2.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set, c) { - set[c] = true; - return set; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) - options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) - options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path2.sep !== "/") { - pattern = pattern.split(path2.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set = this.globSet = this.braceExpand(); - if (options.debug) - this.debug = function debug() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set); - set = this.globParts = set.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set); - set = set.map(function(s, si, set2) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set); - set = set.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set); - this.set = set; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) - return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) - this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") - return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) - c = "^"; - re += c; - continue; - } - self.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) - clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) - return this.regexp; - var set = this.set; - if (!set.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) - re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") - partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) - return false; - if (this.empty) - return f === ""; - if (f === "/" && partial) - return true; - var options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set = this.set; - this.debug(this.pattern, "set", set); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) - break; - } - for (i = 0; i < set.length; i++) { - var pattern = set[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) - return true; - return !this.negate; - } - } - if (options.flipNegate) - return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) - return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") - return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) - return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) - return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - } - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") - throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports, module2) { - "use strict"; - function posix(path2) { - return path2.charAt(0) === "/"; - } - function win32(path2) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path2); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/glob/common.js"(exports) { - exports.setopts = setopts; - exports.ownProp = ownProp; - exports.makeAbs = makeAbs; - exports.finish = finish; - exports.mark = mark; - exports.isIgnored = isIgnored; - exports.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs2 = require("fs"); - var path2 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self, options) { - self.ignore = options.ignore || []; - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore]; - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self.silent = !!options.silent; - self.pattern = pattern; - self.strict = options.strict !== false; - self.realpath = !!options.realpath; - self.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self.follow = !!options.follow; - self.dot = !!options.dot; - self.mark = !!options.mark; - self.nodir = !!options.nodir; - if (self.nodir) - self.mark = true; - self.sync = !!options.sync; - self.nounique = !!options.nounique; - self.nonull = !!options.nonull; - self.nosort = !!options.nosort; - self.nocase = !!options.nocase; - self.stat = !!options.stat; - self.noprocess = !!options.noprocess; - self.absolute = !!options.absolute; - self.fs = options.fs || fs2; - self.maxLength = options.maxLength || Infinity; - self.cache = options.cache || /* @__PURE__ */ Object.create(null); - self.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self, options); - self.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self.cwd = cwd; - else { - self.cwd = path2.resolve(options.cwd); - self.changedCwd = self.cwd !== cwd; - } - self.root = options.root || path2.resolve(self.cwd, "/"); - self.root = path2.resolve(self.root); - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/"); - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd); - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/"); - self.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - options.allowWindowsEscape = false; - self.minimatch = new Minimatch(pattern, options); - self.options = self.minimatch.options; - } - function finish(self) { - var nou = self.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self.matches.length; i < l; i++) { - var matches = self.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - var literal = self.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self.nosort) - all = all.sort(alphasort); - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]); - } - if (self.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self.cache[e] || self.cache[makeAbs(self, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self, m2); - }); - self.found = all; - } - function mark(self, p) { - var abs = makeAbs(self, p); - var c = self.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self, m); - self.statCache[mabs] = self.statCache[abs]; - self.cache[mabs] = self.cache[abs]; - } - } - return m; - } - function makeAbs(self, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path2.join(self.root, f); - } else if (isAbsolute(f) || f === "") { - abs = f; - } else if (self.changedCwd) { - abs = path2.resolve(self.cwd, f); - } else { - abs = path2.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self, path3) { - if (!self.ignore.length) - return false; - return self.ignore.some(function(item) { - return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - function childrenIgnored(self, path3) { - if (!self.ignore.length) - return false; - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - } -}); - -// node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/glob/sync.js"(exports, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var common = require_common3(); - var setopts = common.setopts; - var ownProp = common.ownProp; - var childrenIgnored = common.childrenIgnored; - var isIgnored = common.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert.ok(this instanceof GlobSync); - if (this.realpath) { - var self = this; - this.matches.forEach(function(matchset, index) { - var set = self.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self._makeAbs(p); - var real = rp.realpathSync(p, self.realpathCache); - set[real] = true; - } catch (er) { - if (er.syscall === "stat") - set[self._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert.ok(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { - return typeof p === "string" ? p : "[*]"; - }).join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error = new Error(er.code + " invalid cwd " + this.cwd); - error.path = this.cwd; - error.code = er.code; - throw error; - } - break; - case "ENOENT": - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common.makeAbs(this, f); - }; - } -}); - -// node_modules/wrappy/wrappy.js -var require_wrappy = __commonJS({ - "node_modules/wrappy/wrappy.js"(exports, module2) { - module2.exports = wrappy; - function wrappy(fn, cb) { - if (fn && cb) - return wrappy(fn)(cb); - if (typeof fn !== "function") - throw new TypeError("need wrapper function"); - Object.keys(fn).forEach(function(k) { - wrapper[k] = fn[k]; - }); - return wrapper; - function wrapper() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - var ret = fn.apply(this, args); - var cb2 = args[args.length - 1]; - if (typeof ret === "function" && ret !== cb2) { - Object.keys(cb2).forEach(function(k) { - ret[k] = cb2[k]; - }); - } - return ret; - } - } - } -}); - -// node_modules/once/once.js -var require_once = __commonJS({ - "node_modules/once/once.js"(exports, module2) { - var wrappy = require_wrappy(); - module2.exports = wrappy(once); - module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { - Object.defineProperty(Function.prototype, "once", { - value: function() { - return once(this); - }, - configurable: true - }); - Object.defineProperty(Function.prototype, "onceStrict", { - value: function() { - return onceStrict(this); - }, - configurable: true - }); - }); - function once(fn) { - var f = function() { - if (f.called) - return f.value; - f.called = true; - return f.value = fn.apply(this, arguments); - }; - f.called = false; - return f; - } - function onceStrict(fn) { - var f = function() { - if (f.called) - throw new Error(f.onceError); - f.called = true; - return f.value = fn.apply(this, arguments); - }; - var name = fn.name || "Function wrapped with `once`"; - f.onceError = name + " shouldn't be called more than once"; - f.called = false; - return f; - } - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) - array[i] = args[i]; - return array; - } - } -}); - -// node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/glob/glob.js"(exports, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var globSync = require_sync7(); - var common = require_common3(); - var setopts = common.setopts; - var ownProp = common.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common.childrenIgnored; - var isIgnored = common.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") - cb = options, options = {}; - if (!options) - options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set = g.minimatch.set; - if (!pattern) - return false; - if (set.length > 1) - return true; - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self._processing; - if (self._processing <= 0) { - if (sync) { - process.nextTick(function() { - self._finish(); - }); - } else { - self._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self = this; - var n = found.length; - if (n === 0) - return cb(); - var set = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self._makeAbs(p); - rp.realpath(p, self.realpathCache, function(er, real) { - if (!er) - set[real] = true; - else if (er.syscall === "stat") - set[p] = true; - else - self.emit("error", er); - if (--n === 0) { - self.matches[index] = set; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { - return typeof p === "string" ? p : "[*]"; - }).join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = "FILE"; - cb(); - } else - self._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self = this; - self.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self, abs, cb) { - return function(er, entries) { - if (er) - self._readdirError(abs, er, cb); - else - self._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error = new Error(er.code + " invalid cwd " + this.cwd); - error.path = this.cwd; - error.code = er.code; - this.emit("error", error); - this.abort(); - } - break; - case "ENOENT": - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self = this; - this._stat(prefix, function(er, exists) { - self._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type === "FILE") - return cb(); - else - return cb(null, type, stat); - } - } - var self = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self.fs.stat(abs, function(er2, stat2) { - if (er2) - self._stat2(f, abs, null, lstat, cb); - else - self._stat2(f, abs, er2, stat2, cb); - }); - } else { - self._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports, module2) { - var assert = require("assert"); - var path2 = require("path"); - var fs2 = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs2[m]; - m = m + "Sync"; - options[m] = options[m] || fs2[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") - er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path2.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path2.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/indent-string/index.js"(exports, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/clean-stack/index.js"(exports, module2) { - "use strict"; - var os = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/aggregate-error/index.js"(exports, module2) { - "use strict"; - var indentString = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error) => { - if (error instanceof Error) { - return error; - } - if (error !== null && typeof error === "object") { - return Object.assign(new Error(error.message), error); - } - return new Error(error); - }); - let message = errors.map((error) => { - return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error); - }).join("\n"); - message = "\n" + indentString(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error of this._errors) { - yield error; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/p-map/index.js"(exports, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error) { - if (stopOnError) { - isRejected = true; - reject(error); - } else { - errors.push(error); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports, module2) { - "use strict"; - var { promisify: promisify3 } = require("util"); - var path2 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify3(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - -// node_modules/tempy/index.js -var tempy_exports = {}; -__export(tempy_exports, { - default: () => tempy_default -}); -module.exports = __toCommonJS(tempy_exports); -var import_node_fs = __toESM(require("fs"), 1); -var import_node_path = __toESM(require("path"), 1); -var import_node_stream = __toESM(require("stream"), 1); -var import_node_util = require("util"); - -// node_modules/crypto-random-string/index.js -var import_util = require("util"); -var import_crypto = __toESM(require("crypto"), 1); -var randomBytesAsync = (0, import_util.promisify)(import_crypto.default.randomBytes); -var urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""); -var numericCharacters = "0123456789".split(""); -var distinguishableCharacters = "CDEHKMPRTUWXY012458".split(""); -var asciiPrintableCharacters = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""); -var alphanumericCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""); -var generateForCustomCharacters = (length, characters) => { - const characterCount = characters.length; - const maxValidSelector = Math.floor(65536 / characterCount) * characterCount - 1; - const entropyLength = 2 * Math.ceil(1.1 * length); - let string = ""; - let stringLength = 0; - while (stringLength < length) { - const entropy = import_crypto.default.randomBytes(entropyLength); - let entropyPosition = 0; - while (entropyPosition < entropyLength && stringLength < length) { - const entropyValue = entropy.readUInt16LE(entropyPosition); - entropyPosition += 2; - if (entropyValue > maxValidSelector) { - continue; - } - string += characters[entropyValue % characterCount]; - stringLength++; - } - } - return string; -}; -var generateForCustomCharactersAsync = async (length, characters) => { - const characterCount = characters.length; - const maxValidSelector = Math.floor(65536 / characterCount) * characterCount - 1; - const entropyLength = 2 * Math.ceil(1.1 * length); - let string = ""; - let stringLength = 0; - while (stringLength < length) { - const entropy = await randomBytesAsync(entropyLength); - let entropyPosition = 0; - while (entropyPosition < entropyLength && stringLength < length) { - const entropyValue = entropy.readUInt16LE(entropyPosition); - entropyPosition += 2; - if (entropyValue > maxValidSelector) { - continue; - } - string += characters[entropyValue % characterCount]; - stringLength++; - } - } - return string; -}; -var generateRandomBytes = (byteLength, type, length) => import_crypto.default.randomBytes(byteLength).toString(type).slice(0, length); -var generateRandomBytesAsync = async (byteLength, type, length) => { - const buffer = await randomBytesAsync(byteLength); - return buffer.toString(type).slice(0, length); -}; -var allowedTypes = /* @__PURE__ */ new Set([ - void 0, - "hex", - "base64", - "url-safe", - "numeric", - "distinguishable", - "ascii-printable", - "alphanumeric" -]); -var createGenerator = (generateForCustomCharacters2, generateRandomBytes2) => ({ length, type, characters }) => { - if (!(length >= 0 && Number.isFinite(length))) { - throw new TypeError("Expected a `length` to be a non-negative finite number"); - } - if (type !== void 0 && characters !== void 0) { - throw new TypeError("Expected either `type` or `characters`"); - } - if (characters !== void 0 && typeof characters !== "string") { - throw new TypeError("Expected `characters` to be string"); - } - if (!allowedTypes.has(type)) { - throw new TypeError(`Unknown type: ${type}`); - } - if (type === void 0 && characters === void 0) { - type = "hex"; - } - if (type === "hex" || type === void 0 && characters === void 0) { - return generateRandomBytes2(Math.ceil(length * 0.5), "hex", length); - } - if (type === "base64") { - return generateRandomBytes2(Math.ceil(length * 0.75), "base64", length); - } - if (type === "url-safe") { - return generateForCustomCharacters2(length, urlSafeCharacters); - } - if (type === "numeric") { - return generateForCustomCharacters2(length, numericCharacters); - } - if (type === "distinguishable") { - return generateForCustomCharacters2(length, distinguishableCharacters); - } - if (type === "ascii-printable") { - return generateForCustomCharacters2(length, asciiPrintableCharacters); - } - if (type === "alphanumeric") { - return generateForCustomCharacters2(length, alphanumericCharacters); - } - if (characters.length === 0) { - throw new TypeError("Expected `characters` string length to be greater than or equal to 1"); - } - if (characters.length > 65536) { - throw new TypeError("Expected `characters` string length to be less or equal to 65536"); - } - return generateForCustomCharacters2(length, characters.split("")); -}; -var cryptoRandomString = createGenerator(generateForCustomCharacters, generateRandomBytes); -cryptoRandomString.async = createGenerator(generateForCustomCharactersAsync, generateRandomBytesAsync); -var crypto_random_string_default = cryptoRandomString; - -// node_modules/unique-string/index.js -function uniqueString() { - return crypto_random_string_default({ length: 32 }); -} - -// node_modules/tempy/index.js -var import_temp_dir = __toESM(require_temp_dir(), 1); - -// node_modules/is-stream/index.js -function isStream(stream2) { - return stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function"; -} - -// node_modules/tempy/index.js -var import_del = __toESM(require_del(), 1); -var pipeline = (0, import_node_util.promisify)(import_node_stream.default.pipeline); -var getPath = (prefix = "") => import_node_path.default.join(import_temp_dir.default, prefix + uniqueString()); -var writeStream = async (filePath, data) => pipeline(data, import_node_fs.default.createWriteStream(filePath)); -var createTask = (tempyFunction, { extraArguments = 0 } = {}) => async (...arguments_) => { - const [callback, options] = arguments_.slice(extraArguments); - const result = await tempyFunction(...arguments_.slice(0, extraArguments), options); - try { - return await callback(result); - } finally { - await (0, import_del.default)(result, { force: true }); - } -}; -var tempy = {}; -tempy.file = (options) => { - options = { - ...options - }; - if (options.name) { - if (options.extension !== void 0 && options.extension !== null) { - throw new Error("The `name` and `extension` options are mutually exclusive"); - } - return import_node_path.default.join(tempy.directory(), options.name); - } - return getPath() + (options.extension === void 0 || options.extension === null ? "" : "." + options.extension.replace(/^\./, "")); -}; -tempy.file.task = createTask(tempy.file); -tempy.directory = ({ prefix = "" } = {}) => { - const directory = getPath(prefix); - import_node_fs.default.mkdirSync(directory); - return directory; -}; -tempy.directory.task = createTask(tempy.directory); -tempy.write = async (data, options) => { - const filename = tempy.file(options); - const write = isStream(data) ? writeStream : import_node_fs.promises.writeFile; - await write(filename, data); - return filename; -}; -tempy.write.task = createTask(tempy.write, { extraArguments: 1 }); -tempy.writeSync = (data, options) => { - const filename = tempy.file(options); - import_node_fs.default.writeFileSync(filename, data); - return filename; -}; -Object.defineProperty(tempy, "root", { - get() { - return import_temp_dir.default; - } -}); -var tempy_default = tempy; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = {}); -/*! Bundled license information: - -is-extglob/index.js: - (*! - * is-extglob <https://github.com/jonschlinkert/is-extglob> - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob <https://github.com/jonschlinkert/is-glob> - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number <https://github.com/jonschlinkert/is-number> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range <https://github.com/micromatch/to-regex-range> - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range <https://github.com/jonschlinkert/fill-range> - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *) -*/ diff --git a/website/README.md b/website/README.md index 33a2e507be65..8125a8f19026 100644 --- a/website/README.md +++ b/website/README.md @@ -22,15 +22,15 @@ https://prettier.io/ This starts a server hosting the website locally at `http://localhost:3000/`. Any changes to the site's source files are reflected after refreshing the page, i.e. the server does not need to be restarted to show changes. - When working on the docs, you need to go to `http://localhost:3000/docs/en/next/index.html` (note “next”) to see your changes. + When working on the docs, you need to go to `http://localhost:3000/docs/next/index.html` (note “next”) to see your changes. ## Docusaurus The site is built on [Docusaurus](https://docusaurus.io/), a static site generator for documentation sites. -Its main configuration file is `siteConfig.js` ([docs](https://docusaurus.io/docs/en/site-config)). +Its main configuration file is `docusaurus.config.js` ([docs](https://docusaurus.io/docs/configuration)). -Pages can be added to the site by putting `.js` files with React components in `pages/`. If you want to use code from other files in these pages, be aware of [how `require` works in Docusaurus](https://docusaurus.io/docs/en/api-pages#page-require-paths). It’s also possible to include `.html` files directly. They are served as is and don’t have any of the header, footer, or styles shared by the rest of Docusaurus. This is the way the Playground is hooked up (`pages/playground/index.html`). +Pages can be added to the site by putting `.jsx` files with React components in `src/pages/`. It’s also possible to include `.md` files directly. ([docs](https://docusaurus.io/docs/creating-pages)) Images and other static assets are placed inside the `static` directory: `static/img/your-image.png` is mapped to `http://prettier.io/img/your-image.png`. Any `.css` files in `static/` are concatenated to the standard styles provided by Docusaurus and used site-wide. @@ -38,9 +38,11 @@ Images and other static assets are placed inside the `static` directory: `static The Playground is not integrated with the Docusaurus infrastructure. Its UI (`website/playground/`) is built separately with webpack configured to put the resulting bundle in Docusaurus’s `static` directory. The `yarn start` command (in `website/`) concurrently starts both Docusaurus’s local server and webpack in the watch mode for the Playground. -Another part of the Playground is a web worker where formatting happens. It’s not managed by webpack and resides directly in `static/worker.js`. It expects to find the [UMD bundles of Prettier](https://prettier.io/docs/en/browser.html) in `static/lib/`. That’s why running `yarn build:website` or `PULL_REQUEST=true yarn build:website` in the project root is a required step. +The entry point of the playground is at `static/playground/index.html`. -Finally, there is a service worker that caches Prettier’s relatively heavy bundles (`static/service-worker.js`). +Another part of the Playground is a web worker where formatting happens. It’s not managed by webpack and resides directly in `static/worker.mjs`. It expects to find the [UMD bundles of Prettier](https://prettier.io/docs/browser) in `static/lib/`. That’s why running `yarn build:website` or `PULL_REQUEST=true yarn build:website` in the project root is a required step. + +Finally, there is a service worker that caches Prettier’s relatively heavy bundles (`static/service-worker.mjs`). ## Documentation @@ -52,14 +54,14 @@ id: doc1 # used for docs to find each other and to map links title: Document Title layout: docs1 # used to determine different sidebar groupings category: Sidebar Category 1 # Category on the sidebar under which this doc goes -permalink: docs/en/doc1.html # link to the document that is used for site +permalink: docs/doc1.html # link to the document that is used for site previous: doc0 # previous doc on sidebar for navigation next: doc2 # next doc on the sidebar for navigation # don’t include next if this is the last doc; don’t include previous if first doc --- ``` -The docs from `docs/` are published to `https://prettier.io/docs/en/next/` and are considered to be the docs of the next (not yet released) version of Prettier. When a release happens, the docs from `docs/` are copied to the `website/versioned_docs/version-stable` directory, whose content is published to `https://prettier.io/docs/en`. +The docs from `docs/` are published to `https://prettier.io/docs/next/` and are considered to be the docs of the next (not yet released) version of Prettier. When a release happens, the docs from `docs/` are copied to the `website/versioned_docs/version-stable` directory, whose content is published to `https://prettier.io/docs/`. ## Blog @@ -67,12 +69,11 @@ The `website/blog` directory contains blog posts written in Markdown. Their fron ```yaml title: Blog Post Title -author: Author Name -authorURL: http://github.com/author # (or some other link) +authors: author declared in `blog/authors.yml` --- ``` -In the blog post, you should include a line `<!--truncate-->`. This determines under which point text will be ignored when generating the preview of your blog post. Blog posts should have the file name format: `yyyy-mm-dd-your-file-name.md`. +In the blog post, you should include a line `<!-- truncate -->`. This determines under which point text will be ignored when generating the preview of your blog post. Blog posts should have the file name format: `yyyy-mm-dd-your-file-name.md`. ## Static Build diff --git a/website/blog/2017-04-13-1.0.0.md b/website/blog/2017-04-13-1.0.0.md index e5579fb3c4c8..4141c4668681 100644 --- a/website/blog/2017-04-13-1.0.0.md +++ b/website/blog/2017-04-13-1.0.0.md @@ -1,6 +1,5 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: Releasing Prettier 1.0 --- @@ -13,7 +12,7 @@ solve the problem of wasting time formatting your code. It started as an experiment but it clearly resonated with a lot of people, amassing ~7000 GitHub stars and over 100,000 monthly `npm downloads` in just two months. -<!--truncate--> +<!-- truncate --> In case you don't know, prettier is a JavaScript formatter that works by compiling your code to an AST, and then pretty-printing the AST. Like browsers @@ -877,7 +876,7 @@ function f( ```ts // Before type UploadState<E, EM, D> = - // The upload hasnt begun yet + // The upload hasn't begun yet | A | // The upload timed out B @@ -886,7 +885,7 @@ type UploadState<E, EM, D> = // After type UploadState<E, EM, D> = - // The upload hasnt begun yet + // The upload hasn't begun yet | A // The upload timed out | B diff --git a/website/blog/2017-04-20-1.2.0.md b/website/blog/2017-04-20-1.2.0.md index d20f82b3b656..bf249a3fbd7d 100644 --- a/website/blog/2017-04-20-1.2.0.md +++ b/website/blog/2017-04-20-1.2.0.md @@ -1,12 +1,11 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: Prettier 1.2 --- 1.0 is not the end of prettier, we're going to continue to work on the long tail of formatting issues in order to make it an awesome JavaScript code formatter. You should expect minor version releases like this one to change small things and edge cases but nothing major or controversial. -<!--truncate--> +<!-- truncate --> ### Format diff --git a/website/blog/2017-05-03-1.3.0.md b/website/blog/2017-05-03-1.3.0.md index 6026f8e48991..4254867b1fa0 100644 --- a/website/blog/2017-05-03-1.3.0.md +++ b/website/blog/2017-05-03-1.3.0.md @@ -1,12 +1,11 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: Prettier 1.3 --- This post provides an update to Facebook's adoption or Prettier, outlines our progress on TypeScript, and details some of the improvements and fixes included in the 1.3.0 release of Prettier. -<!--truncate--> +<!-- truncate --> ### Facebook Adoption Update @@ -234,7 +233,7 @@ Template literals are very hard to deal with for a pretty printer because the sp insertRule( `*, *:before, *:after { box-sizing: inherit; - }` + }`, ); // After diff --git a/website/blog/2017-06-03-1.4.0.md b/website/blog/2017-06-03-1.4.0.md index ab5ee4606bbf..1430ce0954de 100644 --- a/website/blog/2017-06-03-1.4.0.md +++ b/website/blog/2017-06-03-1.4.0.md @@ -1,14 +1,13 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: "Prettier 1.4: TypeScript and CSS support" --- This release introduces support for TypeScript, CSS, Less, and SCSS languages to Prettier! -<!--truncate--> +<!-- truncate --> -[![prettier-revolution-conf](/blog/assets/prettier-revolution-conf.png)](https://revolutionconf.com/talk/a-prettier-printer) +[![prettier-revolution-conf](./assets/prettier-revolution-conf.png)](https://revolutionconf.com/talk/a-prettier-printer) ## TypeScript Support diff --git a/website/blog/2017-06-28-1.5.0.md b/website/blog/2017-06-28-1.5.0.md index f17500699d58..e653a9f386a8 100644 --- a/website/blog/2017-06-28-1.5.0.md +++ b/website/blog/2017-06-28-1.5.0.md @@ -1,12 +1,11 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: "Prettier 1.5: GraphQL, CSS-in-JS & JSON" --- This release adds GraphQL formatting support, CSS-in-JS (including styled-components), and JSON support to Prettier. -<!--truncate--> +<!-- truncate --> This is the release I've been waiting for a very long time: one that has only minimal changes to JavaScript! diff --git a/website/blog/2017-08-29-1.6.0.md b/website/blog/2017-08-29-1.6.0.md index 0b1ae7c27d0a..b0c1abff1bbe 100644 --- a/website/blog/2017-08-29-1.6.0.md +++ b/website/blog/2017-08-29-1.6.0.md @@ -1,12 +1,11 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: "Prettier 1.6: Config File, JSX" --- This release adds configuration file support to Prettier, as well as some significant enhancements to JSX printing. -<!--truncate--> +<!-- truncate --> I want to give a special shout out to [@azz](https://github.com/azz) who has been maintaining the repository and implementing a bunch of the changes in this release as I had less time to devote to prettier due to vacation and switching team :) @@ -496,7 +495,7 @@ global { } ``` -#### Fix <this.Component /> ([#2472](https://github.com/prettier/prettier/pull/2472)) by [@backus](https://github.com/backus) +#### Fix \<this.Component /> ([#2472](https://github.com/prettier/prettier/pull/2472)) by [@backus](https://github.com/backus) Thanks to the untyped and permissive nature of JavaScript, we've been able to concat undefined to a string and get some interesting code as a result. Now fixed for this case :) diff --git a/website/blog/2017-09-15-1.7.0.md b/website/blog/2017-09-15-1.7.0.md index 9a0f0ef29b32..15abe1eaeaa4 100644 --- a/website/blog/2017-09-15-1.7.0.md +++ b/website/blog/2017-09-15-1.7.0.md @@ -1,12 +1,11 @@ --- -author: @suchipi -authorURL: https://twitter.com/suchipi +authors: "suchipi" title: "Prettier 1.7: JSX tweaks, Pragma, TypeScript and CSS fixes" --- This release features some bugfixes and tweaks around JSX, TypeScript, CSS, and JavaScript formatting, as well as a couple new features. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -55,7 +54,7 @@ We should print a ternary using JSX mode if: ``` However, this heuristic caused some [unexpected formatting](https://github.com/prettier/prettier/issues/2729): -![GitHub Diff showing a ternary containing internationalization strings appearing inside a JSX element being converted to use JSX-mode style ternaries](/blog/assets/github-diff-ternary-in-jsx.png) +![GitHub Diff showing a ternary containing internationalization strings appearing inside a JSX element being converted to use JSX-mode style ternaries](./assets/github-diff-ternary-in-jsx.png) So, in 1.7.0, we have revised our heuristic to just be: diff --git a/website/blog/2017-11-07-1.8.0.md b/website/blog/2017-11-07-1.8.0.md index 1632239830ea..fe467eebb20f 100644 --- a/website/blog/2017-11-07-1.8.0.md +++ b/website/blog/2017-11-07-1.8.0.md @@ -1,12 +1,11 @@ --- -author: Lucas Azzola (@azz) -authorURL: https://twitter.com/lucasazzola +authors: "azz" title: "Prettier 1.8: Markdown Support" --- This release adds Markdown support, a new `--insert-pragma` flag, fixes a number of formatting issues, adds support for some new _experimental_ operators, and improves our editor integration support. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -44,7 +43,7 @@ you and you may call me V. ``` > ~~Note: We're considering adding an option for this, check [#3183](https://github.com/prettier/prettier/pull/3183) for discussion.~~ -> Update: We've added an option in `1.8.2` called [`--no-prose-wrap`](https://prettier.io/docs/en/options.html#prose-wrap) +> Update: We've added an option in `1.8.2` called [`--no-prose-wrap`](https://prettier.io/docs/options#prose-wrap) > Note for CJK users: If your markdown renderer does not support CJK line ending, you'll have to use plugin like [markdown-it-perfect-newline-for-cjk](https://www.npmjs.com/package/markdown-it-perfect-newline-for-cjk), [hexo-filter-fix-cjk-spacing](https://www.npmjs.com/package/hexo-filter-fix-cjk-spacing), etc. to remove additional spaces. > @@ -108,7 +107,7 @@ reallyUgly(javascript); When rearranging list items, after running Prettier all the numbers will be fixed! -![Markdown Lists](/blog/assets/markdown-lists.gif) +![Markdown Lists](./assets/markdown-lists.gif) > Note: you can actually opt out of this by using `1.` for all list items if you want to optimize for cleaner diffs. @@ -116,7 +115,7 @@ When rearranging list items, after running Prettier all the numbers will be fixe Tables will also automatically be adjusted to fit their contents. This could be completely unmaintainable without an automated tool. -![Markdown Tables](/blog/assets/markdown-tables.gif) +![Markdown Tables](./assets/markdown-tables.gif) **Markdown-in-JS** @@ -135,7 +134,7 @@ const markdown = md` #### Add option to insert `@format` to first docblock if absent ([#2865](https://github.com/prettier/prettier/pull/2865)) by [@samouri](https://github.com/samouri) -In 1.7, we added an option called `--require-pragma` to require files contain an `/** @format */` pragma to be formatted. In order to add this pragma to a large set of files you can now use [`--insert-pragma`](https://prettier.io/docs/en/cli.html#insert-pragma) flag. +In 1.7, we added an option called `--require-pragma` to require files contain an `/** @format */` pragma to be formatted. In order to add this pragma to a large set of files you can now use [`--insert-pragma`](https://prettier.io/docs/cli#insert-pragma) flag. ``` prettier --write "folder/**/*.js" --insert-pragma @@ -143,7 +142,7 @@ prettier --write "folder/**/*.js" --insert-pragma #### Add `--loglevel` option ([#2992](https://github.com/prettier/prettier/pull/2992)) by [@ikatyang](https://github.com/ikatyang) -This [nifty feature](https://prettier.io/docs/en/cli.html#loglevel) allows you to opt in (or out) of Prettier's logging. We've also cleaned up the logging substantially since 1.7. +This [nifty feature](https://prettier.io/docs/cli#loglevel) allows you to opt in (or out) of Prettier's logging. We've also cleaned up the logging substantially since 1.7. <!-- prettier-ignore --> ```bash diff --git a/website/blog/2017-12-05-1.9.0.md b/website/blog/2017-12-05-1.9.0.md index 87b0922fd861..18208d7a19fe 100644 --- a/website/blog/2017-12-05-1.9.0.md +++ b/website/blog/2017-12-05-1.9.0.md @@ -1,12 +1,11 @@ --- -author: Lucas Duailibe (@duailibe) -authorURL: https://twitter.com/duailibe +authors: "duailibe" title: "Prettier 1.9: JSX Fragments, EditorConfig and Arrow Parens" --- This release adds an option for arrow function parens in arguments, support for the [new JSX fragment syntax (`<>`)](https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html), support for `.editorconfig` files, and nice additions to our GraphQL and Markdown support. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -220,7 +219,7 @@ const { We were omitting parens around type assertions inside decorators: <!-- prettier-ignore --> -```typescript +```ts @(bind as ClassDecorator) class Decorated {} ``` diff --git a/website/blog/2018-01-10-1.10.0.md b/website/blog/2018-01-10-1.10.0.md index 9976a04d1ec7..a5d2b4202f43 100644 --- a/website/blog/2018-01-10-1.10.0.md +++ b/website/blog/2018-01-10-1.10.0.md @@ -1,6 +1,5 @@ --- -author: Christopher Chedeau (@vjeux) -authorURL: https://twitter.com/vjeux +authors: "vjeux" title: "Prettier 1.10: One Year of Prettier 🎂" --- @@ -8,7 +7,7 @@ Happy Prettier-versary! It's pretty incredible that Prettier was only released a It's also an exciting release in itself because Prettier now has partial support for `.vue` files and the internals have been refactored such that there's a proper plugin API in order to support different languages! -<!--truncate--> +<!-- truncate --> ## Retrospective @@ -425,7 +424,7 @@ Similarly, "JSON with comments" will also be detected. --- -<h1 style="padding: 0; margin-bottom: -2rem">🎂</h1> +<h1 style={{padding: 0, marginBottom: "-2rem"}}>🎂</h1> [@azz]: https://github.com/azz [@ardevelop]: https://github.com/ardevelop @@ -457,4 +456,4 @@ Similarly, "JSON with comments" will also be detected. [#3643]: https://github.com/prettier/prettier/pull/3643 [#3649]: https://github.com/prettier/prettier/pull/3649 [#3694]: https://github.com/prettier/prettier/pull/3694 -[plugin api]: https://prettier.io/docs/en/plugins.html +[plugin api]: https://prettier.io/docs/plugins diff --git a/website/blog/2018-02-26-1.11.0.md b/website/blog/2018-02-26-1.11.0.md index af1619ded134..633d1bd28a69 100644 --- a/website/blog/2018-02-26-1.11.0.md +++ b/website/blog/2018-02-26-1.11.0.md @@ -1,6 +1,5 @@ --- -author: Suchipi (@suchipi) -authorURL: https://github.com/suchipi +authors: "suchipi" title: "Prettier 1.11: CSS fixes and new TypeScript feature support" --- @@ -14,7 +13,7 @@ Another exciting announcement is that all the JavaScript files in the Facebook c In 8 months, 75% of the codebase was organically converted and last week we did a final push to convert the rest and enforce that every file from now on is using Prettier! It shows that Prettier is robust to support all the crazy edge cases you can imagine and also that it provides a lot of value given the crazy adoption rate. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -335,7 +334,7 @@ Prettier was mistakenly adding a comma after `@import` urls. This is no longer a Prettier was printing the `!default` directive in an odd way: <!-- prettier-ignore --> -```css +```scss $theme-checkbox-colors: ( default: $theme-color-border, checked: $theme-color-checked, @@ -348,7 +347,7 @@ $theme-checkbox-colors: ( It's now handled properly: <!-- prettier-ignore --> -```css +```scss $theme-checkbox-colors: ( default: $theme-color-border, checked: $theme-color-checked, @@ -923,7 +922,7 @@ Links whose URL contained HTML entities were mistakenly being changed when run t Indentation of JS tagged template string content within markdown code blocks was being calculated incorrectly: <!-- prettier-ignore --> -```md +``````md <!-- Unformatted code: --> - 1 - 2 @@ -954,12 +953,12 @@ asd asd `; ``` -``` +`````` It has been fixed in Prettier 1.11.0: <!-- prettier-ignore --> -```md +``````md <!-- Formatted code (Prettier 1.11.0): --> * 1 @@ -976,7 +975,7 @@ It has been fixed in Prettier 1.11.0: asd `; ``` -``` +`````` #### Print multiline content correctly in footnoteDefinition ([#3787] by [@ikatyang]) @@ -1007,15 +1006,17 @@ fn main() { ``` <!-- Formatted code (Prettier 1.11.0): --> + Some text.[^fn] [^fn]: Here is a footnote which includes code. - ```rs - fn main() { - println!("this is some Rust!"); - } - ``` +```rs +fn main() { + println!("this is some Rust!"); +} +``` + `````` #### Respect `tabWidth` for list items ([#3990] by [@ikatyang]) @@ -1037,7 +1038,7 @@ We've discovered that CommonMark diverges from the original Markdown syntax for This change should also improve indentation in text editors: -![](/blog/assets/markdown-list-indent.gif) +![](./assets/markdown-list-indent.gif) ### API @@ -1077,7 +1078,7 @@ This was not intended to be allowed, and has been reverted (in this case, you wo #### Respect EditorConfig when `--config` is passed ([#3992] by [@josephfrazier]) -This is a minor change to the the way `.editorconfig` files are handled. Previously when `--config` was provided, `.editorconfig` was ignored. +This is a minor change to the way `.editorconfig` files are handled. Previously when `--config` was provided, `.editorconfig` was ignored. --- diff --git a/website/blog/2018-04-09-plugin-php-0.1.md b/website/blog/2018-04-09-plugin-php-0.1.md index c13fd937a4e7..2cefbe1ed45b 100644 --- a/website/blog/2018-04-09-plugin-php-0.1.md +++ b/website/blog/2018-04-09-plugin-php-0.1.md @@ -1,12 +1,11 @@ --- -author: Christian Zosel (@chrzosel) -authorURL: https://twitter.com/chrzosel -title: Prettier for PHP 0.1: First alpha release 🎉 +authors: "czosel" +title: "Prettier for PHP 0.1: First alpha release 🎉" --- After more than 200 merged pull requests since mid December 2017, we're happy to announce the first alpha release of [Prettier for PHP](https://github.com/prettier/plugin-php). In this blog post, we'd like to give a short overview of how the plugin works, its philosophy, and what to expect in the future. -<!--truncate--> +<!-- truncate --> ## How does it work? @@ -18,7 +17,7 @@ Adding support for a new language to Prettier requires two things: While we could benefit from existing work on the parsing side, the printer had to be developed from scratch to support all of PHP's various AST node types. Our first alpha release today means that we are confident that the printer can re-print your code without breaking it. -If you'd like to read more about the plugin API, see [the docs](https://prettier.io/docs/en/plugins.html). +If you'd like to read more about the plugin API, see [the docs](https://prettier.io/docs/plugins). ## Philosophy diff --git a/website/blog/2018-04-11-1.12.0.md b/website/blog/2018-04-11-1.12.0.md index 0f9fb28337b7..25ea7e0814ba 100644 --- a/website/blog/2018-04-11-1.12.0.md +++ b/website/blog/2018-04-11-1.12.0.md @@ -1,12 +1,11 @@ --- -author: Suchipi (@suchipi) -authorURL: https://twitter.com/suchipi +authors: "suchipi" title: "Prettier 1.12: Fixes, Features, and Formatting, Oh My!" --- Hello everyone, and welcome to Prettier 1.12.0! This release contains a lot of bugfixes, formatting adjustments, new features for our plugin API, and new Markdown features. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -219,7 +218,7 @@ const { #### Support hasPragma/insertPragma ([#4275](https://github.com/prettier/prettier/pull/4275) by [@ikatyang](https://github.com/ikatyang)) -Prettier 1.7.0 and 1.8.0 introduced two new options, [`--require-pragma`](https://prettier.io/docs/en/options.html#require-pragma) and [`--insert-pragma`](https://prettier.io/docs/en/options.html#insert-pragma). However, these options were only supported in JavaScript. Now these options are available in Markdown, too! +Prettier 1.7.0 and 1.8.0 introduced two new options, [`--require-pragma`](https://prettier.io/docs/options#require-pragma) and [`--insert-pragma`](https://prettier.io/docs/options#insert-pragma). However, these options were only supported in JavaScript. Now these options are available in Markdown, too! ```md <!-- @prettier --> @@ -233,7 +232,7 @@ A long time ago, in my hometown of Ericsburgh... When using tools such as [all-contributors](https://github.com/kentcdodds/all-contributors) or [markdown-toc](https://github.com/jonschlinkert/markdown-toc), users were running into situations where autogenerated Markdown content was formatted oddly by Prettier, or Prettier's `--list-different` mode was flagging autogenerated content that the user didn't care about formatting. -To solve these problems, we have added a new type of ignore comment to Markdown, called [Range Ignore](https://prettier.io/docs/en/ignore.html#range-ignore): +To solve these problems, we have added a new type of ignore comment to Markdown, called [Range Ignore](https://prettier.io/docs/ignore#range-ignore): <!-- prettier-ignore --> ```md @@ -268,7 +267,7 @@ Prettier 1.11.1 failed to parse the new style; we now support both styles. #### Move pragma detection/insertion to plugins ([#3685](https://github.com/prettier/prettier/pull/3685) by [@duailibe](https://github.com/duailibe)) -Prettier plugins can now include a `hasPragma` function in their [parser](https://prettier.io/docs/en/plugins.html#parsers) and an `insertPragma` function in their [printer](https://prettier.io/docs/en/plugins.html#printers) to opt-in to `--insert-pragma` and `--require-pragma` support. These are their signatures: +Prettier plugins can now include a `hasPragma` function in their [parser](https://prettier.io/docs/plugins#parsers) and an `insertPragma` function in their [printer](https://prettier.io/docs/plugins#printers) to opt-in to `--insert-pragma` and `--require-pragma` support. These are their signatures: ```ts function hasPragma(text: string): boolean; @@ -438,11 +437,11 @@ In Prettier 1.11.1, there was an issue where the indentation level for binary ex ```js // Input: class EnterpriseQualityClass { - foobar = + foobar = // we get foo and multiply by 3 this.foo * 3 + // then add bar and multiply by 90 time foo plus 2 - (this.bar * 90) * (this.foo + 2) + (this.bar * 90) * (this.foo + 2) } // Formatted (Prettier 1.11.1): @@ -884,7 +883,7 @@ Prettier 1.11.1 did not handle self-closing style or script tags correctly in vu #### Fix printing ignored files with --debug-check ([#4066](https://github.com/prettier/prettier/pull/4066) by [@duailibe](https://github.com/duailibe)) -Prettier 1.11.1 was mistakenly outputting the contents of ignored files when the [`--debug-check`](https://prettier.io/docs/en/cli.html#debug-check) flag was used. In Prettier 1.12.0, the contents of ignored files are no longer written to stdout. +Prettier 1.11.1 was mistakenly outputting the contents of ignored files when the [`--debug-check`](https://prettier.io/docs/cli#debug-check) flag was used. In Prettier 1.12.0, the contents of ignored files are no longer written to stdout. --- diff --git a/website/blog/2018-05-27-1.13.0.md b/website/blog/2018-05-27-1.13.0.md index 9d6f8879d8e0..287c2273c03f 100644 --- a/website/blog/2018-05-27-1.13.0.md +++ b/website/blog/2018-05-27-1.13.0.md @@ -1,12 +1,11 @@ --- -author: Lucas Duailibe (@duailibe) -authorURL: https://twitter.com/duailibe +authors: "duailibe" title: "Prettier 1.13: Conquering the web!" --- This releases adds support for several new syntax features, formatting fixes and first-class support for working in the browser. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -33,7 +32,7 @@ formatButton.addEventListener("click", function() { });</script> ``` -Read more about it in the [docs](https://prettier.io/docs/en/browser.html) or try it on this [JS Bin](https://jsbin.com/vabiyomoso/edit?html,output). +Read more about it in the [docs](https://prettier.io/docs/browser) or try it on this [JS Bin](https://jsbin.com/vabiyomoso/edit?html,output). #### Don't default to the JavaScript parser ([#4528] by [@duailibe]) @@ -52,13 +51,13 @@ When using the JavaScript API, `prettier.format` and `prettier.formatWithCursor` When invoking Prettier from the API, there was no way to find out if a file should be ignored or not (for `.prettierignore`) so editor integration plugins would have to implement this logic. Also, there was no way to find out if a file was supported by Prettier, so users would need to call Prettier anyway. In 1.13 there's a way to check if a parser will be inferred (and which one) and if the file is ignored or not before actually calling `format`. -You can read more about this in the [docs](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath-options). +You can read more about this in the [docs](https://prettier.io/docs/api#prettiergetfileinfofilepath-options). #### Support for global Prettier and plugins ([#4192] by [@kachkaev]) When installing Prettier and plugins globally, Prettier was not able to automatically load plugins because it searched for them in the nearest `package.json`. Now Prettier will look for plugins in the `node_modules` directory it's installed in. Additionally, for cases where Prettier can't find the plugins automatically (because of other setups we haven't added support for), a new `--plugin-search-dir` option was added so you can specify where Prettier should search for plugins. -You can read more about this in the [Plugin docs](https://prettier.io/docs/en/plugins.html#using-plugins). +You can read more about this in the [Plugin docs](https://prettier.io/docs/plugins#using-plugins). #### Improve cursor offset tracking ([#4397] by [@ds300]) @@ -134,7 +133,7 @@ d3.select("body") #### Format new `describe.each` table in Jest 23 ([#4423] by [@ikatyang]) -Jest 23 introduced a new feature called [data driven tests](https://facebook.github.io/jest/docs/en/api.html#describeeachtable-name-fn) where you can describe examples to test in a table. Prettier 1.13 includes support for this feature, and will automatically indent the table when using data driven tests. +Jest 23 introduced a new feature called [data driven tests](https://jestjs.io/docs/api#describename-fn) where you can describe examples to test in a table. Prettier 1.13 includes support for this feature, and will automatically indent the table when using data driven tests. <!-- prettier-ignore --> ```js @@ -608,7 +607,7 @@ When passing `--plugin=path/to/plugin` Prettier 1.12 and earlier would crash bec #### Adding plugin interface for isBlockComment ([#4347] by [@mgrip]) -A block comment is a comment that can be printed inline (for JS, it's `/* comment */`) with code. Since Prettier is responsible for printing comments we needed to let plugins determine if a comment is a block comment. Read more in our [docs](plugins.md). +A block comment is a comment that can be printed inline (for JS, it's `/* comment */`) with code. Since Prettier is responsible for printing comments we needed to let plugins determine if a comment is a block comment. Read more in our [docs](/docs/plugins). ### JavaScript diff --git a/website/blog/2018-07-29-1.14.0.md b/website/blog/2018-07-29-1.14.0.md index d1033d0d1853..01c6399c120e 100644 --- a/website/blog/2018-07-29-1.14.0.md +++ b/website/blog/2018-07-29-1.14.0.md @@ -1,12 +1,11 @@ --- -author: Ika (@ikatyang) -authorURL: https://github.com/ikatyang +authors: "ikatyang" title: "Prettier 1.14: YAML Support" --- This release adds YAML support, pragma (i.e. `/** @prettier */`) support for every language, and improves performance on large files. It also adds support for several new syntax features, and has a few formatting tweaks to make your code even prettier. ✨ -<!--truncate--> +<!-- truncate --> ## Highlights @@ -47,7 +46,7 @@ Output: (`--prose-wrap always`) that it’s my very good honour to meet you and you may call me V. ``` -> Note: the [`proseWrap`](https://prettier.io/docs/en/options.html#prose-wrap) option is set to `preserve` by default so you’ll have to specify `always` or `never` to enable this feature. +> Note: the [`proseWrap`](https://prettier.io/docs/options#prose-wrap) option is set to `preserve` by default so you’ll have to specify `always` or `never` to enable this feature. ##### Ignore a portion of the file @@ -97,8 +96,8 @@ content #### Support `requirePragma`/`insertPragma` in every language ([#4688], [#4699], [#4713] by [@ikatyang]) Prettier 1.7.0 and 1.8.0 introduced two new options: -[`--require-pragma`](https://prettier.io/docs/en/options.html#require-pragma) and -[`--insert-pragma`](https://prettier.io/docs/en/options.html#insert-pragma). +[`--require-pragma`](https://prettier.io/docs/options#require-pragma) and +[`--insert-pragma`](https://prettier.io/docs/options#insert-pragma). However, these options were only supported in a few languages. Now these options are available in every language, including YAML! @@ -663,7 +662,7 @@ const doBothThings = async () => { #### Allow top level `super` and `await` ([#4823] by [@ikatyang]) `super` and `await` are not allowed to be in places other than classes and async functions, respectively, -but our [range format](https://prettier.io/docs/en/options.html#range) option didn’t quite work properly when selecting the contents of a function. +but our [range format](https://prettier.io/docs/options#range) option didn’t quite work properly when selecting the contents of a function. Prettier 1.14 allows them to be everywhere. <!-- prettier-ignore --> @@ -959,7 +958,7 @@ Prettier 1.14 correctly recognizes these characters so they won’t be transform #### Support range format for Vue files ([#4868] by [@ikatyang]) -Previously, [range formatting](https://prettier.io/docs/en/options.html#range) was not available in Vue, +Previously, [range formatting](https://prettier.io/docs/options#range) was not available in Vue, but Prettier 1.14 adds support for it. ### GraphQL diff --git a/website/blog/2018-11-07-1.15.0.md b/website/blog/2018-11-07-1.15.0.md index 26ed13a7310f..677c7ad59cdc 100644 --- a/website/blog/2018-11-07-1.15.0.md +++ b/website/blog/2018-11-07-1.15.0.md @@ -1,6 +1,5 @@ --- -author: Ika (@ikatyang) -authorURL: https://github.com/ikatyang +authors: "ikatyang" title: "Prettier 1.15: HTML, Vue, Angular and MDX Support" --- @@ -10,7 +9,7 @@ adds an option for JSX single quotes, allows parser inference via shebang, adds support for several new syntax features, and has a few formatting tweaks. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -117,7 +116,7 @@ Prettier uses filename to infer which parser to use. Here's the default patterns Make sure your filename matches the correct parser (especially for Angular users); if it does not, you will have to manually specify which parser to use via the [overrides] field. -[overrides]: https://prettier.io/docs/en/configuration.html#configuration-overrides +[overrides]: https://prettier.io/docs/configuration#configuration-overrides Note that framework-specific formatting won't be triggered in `--parser html`. @@ -166,7 +165,7 @@ The following Angular-specific syntax structures are supported: - `[(something)]` - `*something` - inline template - - `` @Component({ template: `<div>Hello World</div>` }) `` + - ``@Component({ template: `<div>Hello World</div>` })`` ### MDX @@ -179,15 +178,15 @@ You can now use Prettier to format it, and we’ll format both the Markdown and ```jsx <!-- Input --> -import { - colors } from +import { + colors } from './theme' import Palette from './components/palette' # Colors <Palette colors={ - colors} + colors} /> <!-- Output --> @@ -223,7 +222,7 @@ const example2 = ? someValue === 'c' ? 'hello world, branch a && b && c' : 'hello world, branch a && b && !c' - : 'hello world, branch a && !b' + : 'hello world, branch a && !b' : null; // Output (Prettier 1.14) @@ -289,7 +288,7 @@ class Hello { @decorator ownLine = 'value'; - + @decorator({ hello: 'world' }) multiLine = 'value'; @@ -491,18 +490,18 @@ we'll look at the first line of the file, and if there's a shebang, we'll use it to infer which parser to use. -<code style="display: block; background: #282a36; color: #f1f1f0"> -<span style="color: #686868"># Input</span><br /> -$ <span style="color: #5af78e">cat</span> <u>bin/example</u><br /> +<code style={{display: "block", background: "#282a36", color: "#f1f1f0"}}> +<span style={{color: "#686868"}}># Input</span><br /> +$ <span style={{color: "#5af78e"}}>cat</span> <u>bin/example</u><br /> \#!/usr/bin/env node<br /> &nbsp;&nbsp;require ( "../src/cli" ) . run ( )<br /> -<br /> -$ <span style="color: #5af78e">prettier</span> <u>bin/example</u><br /> -<br /> -<span style="color: #686868"># Output (Prettier 1.14)</span><br /> -[<span style="color: #ff5c57">error</span>] No parser could be inferred for file: bin/example<br /> -<br /> -<span style="color: #686868"># Output (Prettier 1.15)</span><br /> + +$ <span style={{color: "#5af78e"}}>prettier</span> <u>bin/example</u><br /> + +<span style={{color: "#686868"}}># Output (Prettier 1.14)</span><br /> +[<span style={{color: "#ff5c57"}}>error</span>] No parser could be inferred for file: bin/example<br /> + +<span style={{color: "#686868"}}># Output (Prettier 1.15)</span><br /> #!/usr/bin/env node<br /> require("../src/cli").run(); </code> @@ -521,15 +520,15 @@ Previously, there was no color for the option validation error message, so it wasn’t easy to see what option had an invalid value passed to it, and what the valid values were. In Prettier 1.15, you should be able to understand what's going on at a glance. -<code style="display: block; background: #282a36; color: #f1f1f0"> -<span style="color: #686868"># Input</span><br /> -$ <span style="color: #5af78e">prettier</span> <u>filename.js</u> --trailing-comma wow<br /> -<br /> -<span style="color: #686868"># Output (Prettier 1.14)</span><br /> -[<span style="color: #ff5c57">error</span>] Invalid \`\`--trailing-comma\`\` value. Expected "all", "es5" or "none", but received \`"wow"\`. -<br /><br /> -<span style="color: #686868"># Output (Prettier 1.15)</span><br /> -[<span style="color: #ff5c57">error</span>] Invalid <span style="color: #ff5c57">--trailing-comma</span> value. Expected <span style="color: #57c7ff">"all", "es5" or "none"</span>, but received <span style="color: #ff5c57">"wow"</span>. +<code style={{display: "block", background: "#282a36", color: "#f1f1f0"}}> +<span style={{color: "#686868"}}># Input</span><br /> +$ <span style={{color: "#5af78e"}}>prettier</span> <u>filename.js</u> --trailing-comma wow<br /> + +<span style={{color: "#686868"}}># Output (Prettier 1.14)</span><br /> +[<span style={{color: "#ff5c57"}}>error</span>] Invalid \`\`--trailing-comma\`\` value. Expected "all", "es5" or "none", but received \`"wow"\`. + +<span style={{color: "#686868"}}># Output (Prettier 1.15)</span><br /> +[<span style={{color: "#ff5c57"}}>error</span>] Invalid <span style={{color: "#ff5c57"}}>--trailing-comma</span> value. Expected <span style={{color: "#57c7ff"}}>"all", "es5" or "none"</span>, but received <span style={{color: "#ff5c57"}}>"wow"</span>. </code> #### Allow printer to preprocess the AST ([#5041] by [@ikatyang]) @@ -550,15 +549,15 @@ interface Printer { Previously, loading a config file of an unsupported format would throw an error message that looks like a bug in Prettier, so we improved the message in Prettier 1.15. -<code style="display: block; background: #282a36; color: #f1f1f0"> -<span style="color: #686868"># Input</span><br /> -$ <span style="color: #5af78e">prettier</span> <u>filename.js</u> --config <u>.prettierrc.wow</u><br /> -<br /> -<span style="color: #686868"># Output (Prettier 1.14)</span><br /> -[<span style="color: #ff5c57">error</span>] Invalid configuration file: Cannot read property 'sync' of undefined -<br /><br /> -<span style="color: #686868"># Output (Prettier 1.15)</span><br /> -[<span style="color: #ff5c57">error</span>] Invalid configuration file: No sync loader specified for extension ".wow" +<code style={{display: "block", background: "#282a36", color: "#f1f1f0"}}> +<span style={{color: "#686868"}}># Input</span><br /> +$ <span style={{color: "#5af78e"}}>prettier</span> <u>filename.js</u> --config <u>.prettierrc.wow</u><br /> + +<span style={{color: "#686868"}}># Output (Prettier 1.14)</span><br /> +[<span style={{color: "#ff5c57"}}>error</span>] Invalid configuration file: Cannot read property 'sync' of undefined + +<span style={{color: "#686868"}}># Output (Prettier 1.15)</span><br /> +[<span style={{color: "#ff5c57"}}>error</span>] Invalid configuration file: No sync loader specified for extension ".wow" </code> #### Add an option to enforce line endings ([#5327] by [@kachkaev]) diff --git a/website/blog/2019-01-20-1.16.0.md b/website/blog/2019-01-20-1.16.0.md index 1465ab0c3de2..36ebc1d4dcce 100644 --- a/website/blog/2019-01-20-1.16.0.md +++ b/website/blog/2019-01-20-1.16.0.md @@ -1,13 +1,12 @@ --- -author: Ika (@ikatyang) -authorURL: https://github.com/ikatyang +authors: "ikatyang" title: "Prettier 1.16: HTML improvements and better CRLF handling" --- This release improves HTML formatting and contains better CRLF handling, new syntax features, and fixes several bugs. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -101,7 +100,7 @@ The `babylon` parser name is now deprecated but it still works. If you need to change your config due to this change, please take a second to read [our docs on the `parser` option], especially the note at the bottom. -[our docs on the `parser` option]: https://prettier.io/docs/en/configuration.html#setting-the-parser-docs-en-optionshtml-parser-option +[our docs on the `parser` option]: https://prettier.io/docs/configuration#setting-the-parser-docs-en-optionshtml-parser-option ### Flow @@ -136,13 +135,13 @@ in the output except for the files which aren’t properly formatted. This isn very friendly for new contributors and users in general, so we added a `--check` option that produces more human-friendly output. -<code style="display: block; background: #282a36; color: #f1f1f0"> -<span style="color: #686868"># Prettier 1.15</span><br /> -$ <span style="color: #5af78e">prettier</span> <span style="color: #57c7ff">\*.js</span> --list-different<br /> +<code style={{display: "block", background: "#282a36", color: "#f1f1f0"}}> +<span style={{color: "#686868"}}># Prettier 1.15</span><br /> +$ <span style={{color: "#5af78e"}}>prettier</span> <span style={{color: "#57c7ff"}}>\*.js</span> --list-different<br /> unformatted.js<br /> -<br /> -<span style="color: #686868"># Prettier 1.16</span><br /> -$ <span style="color: #5af78e">prettier</span> <span style="color: #57c7ff">\*.js</span> --check<br /> + +<span style={{color: "#686868"}}># Prettier 1.16</span><br /> +$ <span style={{color: "#5af78e"}}>prettier</span> <span style={{color: "#57c7ff"}}>\*.js</span> --check<br /> Checking formatting...<br /> unformatted.js<br /> Code style issues found in the above file(s). Forgot to run Prettier?<br /> diff --git a/website/blog/2019-04-12-1.17.0.md b/website/blog/2019-04-12-1.17.0.md index f674cb1904e7..91d9fd8bbc05 100644 --- a/website/blog/2019-04-12-1.17.0.md +++ b/website/blog/2019-04-12-1.17.0.md @@ -1,6 +1,5 @@ --- -author: Lucas Duailibe (@duailibe) -authorURL: https://github.com/duailibe +authors: "duailibe" title: "Prettier 1.17: More quotes options and support for shared configs" --- @@ -8,7 +7,7 @@ This release brings long-requested flexibility to quotes around object propertie [lwc]: https://developer.salesforce.com/docs/component-library/documentation/lwc -<!--truncate--> +<!-- truncate --> ## Highlights @@ -75,14 +74,18 @@ If you don't want to use `package.json`, you can use any of the supported extens [@azz] has created an example configuration package. You can [see the source on GitHub](https://github.com/azz/prettier-config) or [install it via npm](https://www.npmjs.com/package/@azz/prettier-config). -> Note: This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications, e.g: -> -> ```js -> module.exports = { -> ...require("@company/prettier-config"), -> semi: false, -> }; -> ``` +:::note + +This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications, e.g: + +```js +module.exports = { + ...require("@company/prettier-config"), + semi: false, +}; +``` + +::: ## General diff --git a/website/blog/2019-06-06-1.18.0.md b/website/blog/2019-06-06-1.18.0.md index 1a782cfba58a..3d9d1dee4581 100644 --- a/website/blog/2019-06-06-1.18.0.md +++ b/website/blog/2019-06-06-1.18.0.md @@ -1,6 +1,5 @@ --- -author: Lucas Duailibe (@duailibe) -authorURL: https://github.com/duailibe +authors: "duailibe" title: "Prettier 1.18: Lots of fixes and OpenCollective" --- @@ -8,7 +7,7 @@ This release doesn't include shiny new features, but has lots of fixes for JavaS It's also a good opportunity to remind that Prettier is now accepting donations! If you enjoy Prettier and would like to support our work, head to our [OpenCollective](https://opencollective.com/prettier). -<!--truncate--> +<!-- truncate --> ## Highlights diff --git a/website/blog/2019-11-09-1.19.0.md b/website/blog/2019-11-09-1.19.0.md index d66c706fef5a..7ab4e097ec28 100644 --- a/website/blog/2019-11-09-1.19.0.md +++ b/website/blog/2019-11-09-1.19.0.md @@ -1,12 +1,11 @@ --- -author: Simon Lydell (@lydell) -authorURL: https://github.com/lydell +authors: "lydell" title: "Prettier 1.19: Long awaited Vue option, TypeScript 3.7 and new JavaScript features" --- This release adds the long awaited `--vue-indent-script-and-style` option, support for TypeScript 3.7 and some cutting edge JavaScript syntax. Not to mention a whole bunch of bug fixes and improvements! -<!--truncate--> +<!-- truncate --> ## Highlights @@ -14,7 +13,7 @@ This release adds the long awaited `--vue-indent-script-and-style` option, suppo #### Add `--vue-indent-script-and-style` ([#6157] by [@kamilic]) -The new [`--vue-indent-script-and-style`](https://prettier.io/docs/en/options.html#vue-files-script-and-style-tags-indentation) option controls whether or not to indent the code inside `<script>` and `<style>` tags in Vue files. Some people (like [the creator of Vue](https://github.com/prettier/prettier/issues/3888#issuecomment-459521863)) don’t indent to save an indentation level, but this might break code folding in your editor. This closes our most commented issue so far, and should improve lots of Vue coders’ editing experience! +The new [`--vue-indent-script-and-style`](https://prettier.io/docs/options#vue-files-script-and-style-tags-indentation) option controls whether or not to indent the code inside `<script>` and `<style>` tags in Vue files. Some people (like [the creator of Vue](https://github.com/prettier/prettier/issues/3888#issuecomment-459521863)) don’t indent to save an indentation level, but this might break code folding in your editor. This closes our most commented issue so far, and should improve lots of Vue coders’ editing experience! ### TypeScript @@ -1104,7 +1103,7 @@ Previously, even if the line length was shorter than `printWidth`, Prettier woul #### Script tags are now treated as blocks for the purposes of formatting ([#6423] by [@thorn0]) -Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/en/options.html#html-whitespace-sensitivity), they were formatted as if they were inline. +Previously, in the [whitespace-sensitive mode](https://prettier.io/docs/options#html-whitespace-sensitivity), they were formatted as if they were inline. <!-- prettier-ignore --> ```html @@ -1142,7 +1141,7 @@ Previously, Prettier only supported the most common HTML entities, such as `&nbs [error] stdin: SyntaxError: Unknown entity "excl" - use the "&#<decimal>;" or "&#x<hex>;" syntax (1:6) [error] > 1 | <p>Hi&excl;</p> [error] | ^ -[error] 2 | +[error] 2 | --> <!-- Prettier 1.19 --> @@ -1497,7 +1496,7 @@ Previously, `<style>` elements with `lang="css"` were not formatted, while omitt ```html <!-- Input --> <style lang="css"> - a { + a { color: #F00 }</style> diff --git a/website/blog/2020-03-21-2.0.0.md b/website/blog/2020-03-21-2.0.0.md index b2e94e421710..69c379601450 100644 --- a/website/blog/2020-03-21-2.0.0.md +++ b/website/blog/2020-03-21-2.0.0.md @@ -1,6 +1,5 @@ --- -author: "Georgii Dolzhykov (@thorn0)" -authorURL: "https://github.com/thorn0" +authors: "thorn0" title: "Prettier 2.0 “2020”" --- @@ -8,7 +7,7 @@ Better defaults, a better CLI and better heuristics. Oh, and TypeScript 3.8. After a long and careful consideration, we decided to change the default values for the `trailingComma`, `arrowParens`, and `endOfLine` options. We made the CLI more intuitive. And we've finally dropped support for Node versions older than 10, which had grown to become a huge maintenance hassle and an obstacle for contributors. Read below in details. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -18,7 +17,7 @@ After a long and careful consideration, we decided to change the default values Previously, any method call chain of length three or longer would be automatically broken into multiple lines. The new heuristic is based on the complexity of the call arguments in the chain, rather than simply on the chain's length. Now, if chained method calls have arguments which aren't easy to understand at a glance (e.g. functions or deeply-nested objects), the chain is broken. Otherwise, they're allowed to remain on one line. See prior issues [#3197](https://github.com/prettier/prettier/issues/3107), [#4765](https://github.com/prettier/prettier/pull/4765), [#1565](https://github.com/prettier/prettier/issues/1565) and [#4125](https://github.com/prettier/prettier/pull/4125) for context and examples. -To get best results, make sure your value for the [`printWidth` option](/docs/en/options.html#print-width) isn't too high. +To get best results, make sure your value for the [`printWidth` option](/docs/options#print-width) isn't too high. <!-- prettier-ignore --> ```javascript @@ -101,7 +100,7 @@ In Prettier 2.0, the CLI also prints such errors for individual patterns. #### Fix config overrides pattern matching to include dot files ([#5813](https://github.com/prettier/prettier/pull/5813) by [@chrisblossom](https://github.com/chrisblossom)) -Previously, [configuration overrides](/docs/en/configuration.html#configuration-overrides) weren't applied to files whose name had a leading dot. +Previously, [configuration overrides](/docs/configuration#configuration-overrides) weren't applied to files whose name had a leading dot. #### Drop support for Node versions older than 10 ([#6908](https://github.com/prettier/prettier/pull/6908) by [@fisker](https://github.com/fisker)) @@ -112,7 +111,7 @@ The minimal required Node version now is 10.13.0. For our contributors, this mea Before version 2.0, Prettier was avoiding trailing commas by default where possible. This made the resulting JavaScript compatible with now very old environments such as IE8, but implied [some missed opportunities](https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8). -Prettier has included an [option to configure trailing commas](https://prettier.io/docs/en/options.html#trailing-commas) since its early days, and an initiative to change the default value has been out there [for over three years](https://github.com/prettier/prettier/issues/68). +Prettier has included an [option to configure trailing commas](https://prettier.io/docs/options#trailing-commas) since its early days, and an initiative to change the default value has been out there [for over three years](https://github.com/prettier/prettier/issues/68). Finally, the default value becomes `es5` instead of `none` in Prettier v2.0. If the old behavior is still preferred, please configure Prettier with `{ "trailingComma": "none" }`. @@ -120,18 +119,18 @@ There is a possibility that the default value will change to `all` (meaning even #### Plugin API: changes in `prettier.util` ([#6993](https://github.com/prettier/prettier/pull/6993) by [@fisker](https://github.com/fisker)) -- `prettier.util.mapDoc` has been removed.<br> +- `prettier.util.mapDoc` has been removed.<br /> Use `prettier.doc.utils.mapDoc` instead. -- `prettier.util.isNextLineEmpty` has been updated.<br> +- `prettier.util.isNextLineEmpty` has been updated.<br /> Use `isNextLineEmpty(text, node, locEnd)` instead of `isNextLineEmpty(text, node, options)`. -- `prettier.util.isPreviousLineEmpty` has been updated.<br> +- `prettier.util.isPreviousLineEmpty` has been updated.<br /> Use `isPreviousLineEmpty(text, node, locStart)` instead of `isPreviousLineEmpty(text, node, options)`. -- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` has been updated.<br> +- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` has been updated.<br /> Use `getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)` instead of `getNextNonSpaceNonCommentCharacterIndex(text, node, options)`. #### Change default value for `arrowParens` to `always` ([#7430](https://github.com/prettier/prettier/pull/7430) by [@kachkaev](https://github.com/kachkaev)) -[Since version 1.9](https://prettier.io/blog/2017/12/05/1.9.0.html#option-to-add-parens-in-arrow-function-arguments-3324httpsgithubcomprettierprettierpull3324-by-rattrayalexhttpsgithubcomrattrayalex-and-suchipihttpsgithubcomsuchipi), Prettier has had an [option](https://prettier.io/docs/en/options.html#arrow-function-parentheses) to always wrap arrow function arguments with parentheses. +[Since version 1.9](https://prettier.io/blog/2017/12/05/1.9.0.html#option-to-add-parens-in-arrow-function-arguments-3324httpsgithubcomprettierprettierpull3324-by-rattrayalexhttpsgithubcomrattrayalex-and-suchipihttpsgithubcomsuchipi), Prettier has had an [option](https://prettier.io/docs/options#arrow-function-parentheses) to always wrap arrow function arguments with parentheses. In version 2.0, this behavior has become the default. <!-- prettier-ignore --> @@ -166,7 +165,7 @@ Besides, contributors on different operating systems could accidentally change l Doing so would produce a large `git diff` and thus make the line-by-line history for a file (`git blame`) harder to explore. You are encouraged to use the new default value for `endOfLine`, which is now `lf`. -It may be also worth [checking the option docs](https://prettier.io/docs/en/options.html#end-of-line) to ensure your project repository is configured correctly. +It may be also worth [checking the option docs](https://prettier.io/docs/options#end-of-line) to ensure your project repository is configured correctly. This will help you avoid a mix of line endings in the repo and a broken `git blame`. If the old behavior is still preferred, please configure Prettier with `{ "endOfLine": "auto" }`. @@ -754,13 +753,13 @@ type A = { [key in B] }; #### Fix edge cases of printing index signatures ([#7228](https://github.com/prettier/prettier/pull/7228) by [@cola119](https://github.com/cola119)) -Even though index signatures without type annotations or with multiple parameters aren't valid TypeScript, the TypeScript parser supports this syntax. In line with the [previous error recovery efforts](https://prettier.io/blog/2019/11/09/1.19.0.html#enable-formatting-even-if-there-are-parse-errors-in-some-cases-6816-by-thorn0-and-the-babel-team), Prettier now makes sure its output still can be parsed in these cases. Previous versions produced unparseable code. +Even though index signatures without type annotations or with multiple parameters aren't valid TypeScript, the TypeScript parser supports this syntax. In line with the [previous error recovery efforts](https://prettier.io/blog/2019/11/09/1.19.0.html#enable-formatting-even-if-there-are-parse-errors-in-some-cases-6816-by-thorn0-and-the-babel-team), Prettier now makes sure its output still can be parsed in these cases. Previous versions produced unparsable code. <!-- prettier-ignore --> ```ts // Input type A = { [key: string] }; -type B = { [a: string, b: string]: string; }; +type B = { [a: string, b: string]: string; }; // Prettier 1.19 type A = { [key: string]: }; @@ -1063,7 +1062,7 @@ Error: Mixed descriptor in srcset is not supported <!-- prettier-ignore --> ```html <!-- Input --> -<pre><br></pre> +<pre><br /></pre> <pre><hr></pre> <!-- Prettier 1.19 --> diff --git a/website/blog/2020-08-24-2.1.0.md b/website/blog/2020-08-24-2.1.0.md index 215b2102cd9d..fa49eefca2f9 100644 --- a/website/blog/2020-08-24-2.1.0.md +++ b/website/blog/2020-08-24-2.1.0.md @@ -1,18 +1,17 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.1: new --embedded-language-formatting option and new JavaScript/TypeScript features!" --- This release adds a new `--embedded-language-formatting` option, supports new JavaScript/TypeScript features, and includes many bug fixes and improvements! -<!--truncate--> +<!-- truncate --> ## Highlights ### API -#### Add --embedded-language-formatting={auto,off} option ([#7875](https://github.com/prettier/prettier/pull/7875) by [@bakkot](https://github.com/bakkot), [#8825](https://github.com/prettier/prettier/pull/8825) by [@fisker](https://github.com/fisker)) +#### Add --embedded-language-formatting=\{auto,off\} option ([#7875](https://github.com/prettier/prettier/pull/7875) by [@bakkot](https://github.com/bakkot), [#8825](https://github.com/prettier/prettier/pull/8825) by [@fisker](https://github.com/fisker)) When Prettier identifies cases where it looks like you've placed some code it knows how to format within a string in another file, like in a tagged template in JavaScript with a tag named `html` or in code blocks in Markdown, it will try to format that code by default. @@ -143,7 +142,7 @@ If a comments line had trailing whitespaces, comments were not detected as end-o <!-- prettier-ignore --> ```jsx // Input -var a = { /* extra whitespace --> */ +var a = { /* extra whitespace --> */ b }; var a = { /* no whitespace --> */ @@ -397,7 +396,7 @@ export default class Foo { #### Improve detection of source elements for range formatting ([#8419](https://github.com/prettier/prettier/pull/8419) by [@thorn0](https://github.com/thorn0)) -Not all statement types were detected (read [here](https://prettier.io/docs/en/options.html#range) how range formatting works in Prettier). +Not all statement types were detected (read [here](https://prettier.io/docs/options#range) how range formatting works in Prettier). <!-- prettier-ignore --> ```jsx @@ -427,7 +426,7 @@ Support Stage-2 proposal [Private Fields in `in`](https://github.com/tc39/propos SyntaxError: Unexpected token (1:1) > 1 | #prop in obj; | ^ - 2 | + 2 | // Prettier 2.1 #prop in obj; @@ -502,7 +501,7 @@ SyntaxError: Unexpected token (1:1) }; ``` -#### Wrap jsx element on the left of "<" with parentheses ([#8461](https://github.com/prettier/prettier/pull/8461) by [@sosukesuzuki](https://github.com/sosukesuzuki)) +#### Wrap jsx element on the left of "\<" with parentheses ([#8461](https://github.com/prettier/prettier/pull/8461) by [@sosukesuzuki](https://github.com/sosukesuzuki)) <!-- prettier-ignore --> ```jsx @@ -512,11 +511,11 @@ SyntaxError: Unexpected token (1:1) // Prettier 2.0 <div/> < 5; -// Prettier 2.0 second outout +// Prettier 2.0 second output SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:9) > 1 | <div /> < 5; | ^ - 2 | + 2 | // Prettier 2.1 (<div />) < 5; @@ -982,7 +981,7 @@ modify URLs. } ``` -#### Add support for @supports selector(<custom-selector>) ([#8545](https://github.com/prettier/prettier/pull/8545) by [@boyenn](https://github.com/boyenn)) +#### Add support for @supports selector(\<custom-selector>) ([#8545](https://github.com/prettier/prettier/pull/8545) by [@boyenn](https://github.com/boyenn)) <!-- prettier-ignore --> ```css @@ -1037,7 +1036,7 @@ body { /* Prettier 2.0 */ body { test: function($list...); - foo: bar(returns-list($list) ...); + foo: bar(returns-list($list) ...); background-color: rgba(50 50 50 50..); } @@ -1252,7 +1251,7 @@ Non-ASCII whitespace characters like `U+00A0` `U+2005` etc. are not considered w #### Support legacy HTML-like comments script blocks ([#8173](https://github.com/prettier/prettier/pull/8173) by [@fisker](https://github.com/fisker), [#8394](https://github.com/prettier/prettier/pull/8394) by [@fisker](https://github.com/fisker)) -Previously we parse html `<script>` blocks as "module"([ECMAScript Module grammar](https://babeljs.io/docs/en/options#sourcetype)), this is why we can't parse comments starts with `<!--`(aka [HTML-like comments](https://tc39.es/ecma262/#sec-html-like-comments)), now we parse `<script>` blocks as "script", unless this `<script>` +Previously we parse html `<script>` blocks as "module"([ECMAScript Module grammar](https://babeljs.io/docs/options#sourcetype)), this is why we can't parse comments starts with `<!--`(aka [HTML-like comments](https://tc39.es/ecma262/#sec-html-like-comments)), now we parse `<script>` blocks as "script", unless this `<script>` 1. `type="module"` 2. `type="text/babel"` and `data-type="module"`, [introduced in babel@v7.10.0](https://github.com/babel/babel/pull/11466) @@ -1507,7 +1506,7 @@ Previously, Prettier always [preserved line breaks][#5596] around inline nodes ( #### Improve formatting Vue SFC root blocks ([#8023](https://github.com/prettier/prettier/pull/8023) by [@sosukesuzuki](https://github.com/sosukesuzuki), [#8465](https://github.com/prettier/prettier/pull/8465) by [@fisker](https://github.com/fisker)) -Support formatting all [language blocks](https://vue-loader.vuejs.org/spec.html#language-blocks)(including [custom blocks](https://vue-loader.vuejs.org/spec.html#custom-blocks) with `lang` attribute) with [builtin parsers](https://prettier.io/docs/en/options.html#parser) and [plugins](https://prettier.io/docs/en/plugins.html). +Support formatting all [language blocks](https://vue-loader.vuejs.org/spec.html#language-blocks)(including [custom blocks](https://vue-loader.vuejs.org/spec.html#custom-blocks) with `lang` attribute) with [builtin parsers](https://prettier.io/docs/options#parser) and [plugins](https://prettier.io/docs/plugins). <!-- prettier-ignore --> ```html @@ -2134,7 +2133,7 @@ SyntaxError: Merge nodes can only have Alias nodes as values (2:2) | ^^^^^^^^^^^^ > 4 | K2: "Two" | ^^^^^^^^^^^^ -> 5 | +> 5 | | ^ 6 | bar: 7 | <<: *anchor diff --git a/website/blog/2020-11-20-2.2.0.md b/website/blog/2020-11-20-2.2.0.md index b110f0c385e9..0ad02913087c 100644 --- a/website/blog/2020-11-20-2.2.0.md +++ b/website/blog/2020-11-20-2.2.0.md @@ -1,12 +1,11 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.2: new JavaScript parsers, TS 4.1 and ESM standalone bundles" --- This release supports new JavaScript parsers [espree](https://github.com/eslint/espree) and [meriyah](https://github.com/meriyah/meriyah), supports [TypeScript 4.1](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-rc/), ships ESM standalone bundles for modern browsers, and includes many bug fixes and improvements! -<!--truncate--> +<!-- truncate --> ## Highlights diff --git a/website/blog/2020-12-11-plugin-ruby-1.0.md b/website/blog/2020-12-11-plugin-ruby-1.0.md index cd788e384541..4bd6e11050f1 100644 --- a/website/blog/2020-12-11-plugin-ruby-1.0.md +++ b/website/blog/2020-12-11-plugin-ruby-1.0.md @@ -1,16 +1,15 @@ --- -author: Kevin Newton (@kddnewton) -authorURL: https://twitter.com/kddnewton +authors: kddnewton title: Prettier for Ruby goes v1.0 🎉 --- After 1500 commits and 50 releases since July 2018, we're happy to announce that we've just released v1.0 of [Prettier for Ruby](https://github.com/prettier/plugin-ruby). In this blog post, we'd like to give a short overview of how the plugin works, its philosophy, and what to expect in the future. -<!--truncate--> +<!-- truncate --> ## How does it work? -Prettier for Ruby works through Prettier's [plugin API](https://prettier.io/docs/en/plugins.html). Its `parse` function works by spawning a Ruby process and using Ruby's own parser (known as `Ripper`). After tracking all of the various node types, comments, location information, and other various metadata, it returns a built abstract syntax tree (AST) to the Prettier process. Finally it converts that AST into Prettier's intermediate representation (known as `Doc`) before allowing Prettier to handle printing it back out. +Prettier for Ruby works through Prettier's [plugin API](https://prettier.io/docs/plugins). Its `parse` function works by spawning a Ruby process and using Ruby's own parser (known as `Ripper`). After tracking all of the various node types, comments, location information, and other various metadata, it returns a built abstract syntax tree (AST) to the Prettier process. Finally it converts that AST into Prettier's intermediate representation (known as `Doc`) before allowing Prettier to handle printing it back out. ## Philosophy diff --git a/website/blog/2021-05-09-2.3.0.md b/website/blog/2021-05-09-2.3.0.md index b2494ae1ef1c..f0ebe593fff3 100644 --- a/website/blog/2021-05-09-2.3.0.md +++ b/website/blog/2021-05-09-2.3.0.md @@ -1,6 +1,5 @@ --- -author: "Georgii Dolzhykov (@thorn0)" -authorURL: "https://github.com/thorn0" +authors: "thorn0" title: "Prettier 2.3. In which assignments are consistent, short keys non-breaking, and Handlebars official" --- @@ -12,9 +11,9 @@ We are grateful to our financial contributors: [Salesforce](https://engineering. Most of the changes in this release are thanks to the hard work of [Fisker Cheung](https://github.com/fisker), [Georgii Dolzhykov](https://github.com/thorn0), and [Sosuke Suzuki](https://github.com/sosukesuzuki), along with many other contributors. -And just a reminder, when Prettier is installed or updated, it’s [strongly recommended](https://prettier.io/docs/en/install.html#summary) to specify the exact version in `package.json`: `"2.3.0"`, not `"^2.3.0"`. +And just a reminder, when Prettier is installed or updated, it’s [strongly recommended](https://prettier.io/docs/install#summary) to specify the exact version in `package.json`: `"2.3.0"`, not `"^2.3.0"`. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -98,16 +97,16 @@ The [`--html-whitespace-sensitivity`][hws-option] option is supported and defaul The feature is called “Ember / Handlebars” and not just “Handlebars” because Glimmer doesn’t support some syntax and use cases of Handlebars. This is mostly due to the fact that [Handlebars], being a template engine (a preprocessor), doesn’t care about the underlying syntax of the content it processes whereas Glimmer parses two syntaxes – HTML and Handlebars – at the same time and combines the result into a single tree, which Prettier can print. This means Prettier won’t format Handlebars files that can’t be parsed into such a tree, either because the underlying syntax isn’t HTML or because template directives and tags overlap in a way that can’t be represented in a tree (e.g., `{{#if foo}}<div>{{/if}`). Even with these restrictions, the formatter still seems to be useful enough to non-Ember Handlebars users. As for the syntax unsupported by Ember, there is a good chance to see support for it in future versions of Prettier as Glimmer uses a full-fledged Handlebars parser under the hood. -Files with the extensions `.hbs` and `.handlebars` are recognized as Handlebars by default. For other extensions, the [`--parser`](parser-option) option with the value `glimmer` has to be specified – for example, using command line or, better yet, [configuration overrides]. +Files with the extensions `.hbs` and `.handlebars` are recognized as Handlebars by default. For other extensions, the [`--parser`](/docs/configuration#setting-the-parser-option) option with the value `glimmer` has to be specified – for example, using command line or, better yet, [configuration overrides]. See the formatter in action on the [playground][playground-glimmer]! [glimmer]: https://www.npmjs.com/package/@glimmer/syntax [ember]: https://emberjs.com -[hws-option]: https://prettier.io/docs/en/options.html#html-whitespace-sensitivity +[hws-option]: https://prettier.io/docs/options#html-whitespace-sensitivity [handlebars]: https://handlebarsjs.com/ -[parser-option]: https://prettier.io/docs/en/options.html#parser -[configuration overrides]: https://prettier.io/docs/en/configuration.html#configuration-overrides +[parser-option]: https://prettier.io/docs/options#parser +[configuration overrides]: https://prettier.io/docs/configuration#configuration-overrides [playground-glimmer]: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACVAeAJgSwG7qFgA2AhgM7kC8AOiAjAE4CedhqAfDVOhgBYBGDsGDoYOGMTjsAvjIwB6QVx6ZcBdCQrU6AIwhZWIFe1OERhfYbOE53Reo6YFjkABoQEAA7jo5ZKCkjIwQAO4ACkEI-iikxKGkzP4euoykYADWcDAAyl7pOFAA5shMAK5wHnAAtrpwWFj1ADKkxWWkRXAAYhCM1aQw4sXIIKRlMBDuIHww1cQA6nwScOT5YHA50RL4Eswj5Ew4YDBTheRwjDDhaUX9yABmceceAFbkAB4AQmmZ2Tmk1TgTUKcAeT0qIDe7xyhSKUgAimUIPAwcRniB8oxzowRnCcNVATiPF5GIUYPMcFgYHxkAAOAAMxJC53maS8IxJKwueFBHgAjkj4NdvDFRuQALRQOD1epTRhwAU4eXXDp3JCPNEQ87VHClRgVDzkWEIwWg9XgjwwUi6ClUmlIABMlrSOGIsIAwhACaQRisAKxTMrnAAq1piGvReAqAEkoI1YDkwKSfABBOM5GDMKSo85yIA ## Formatting Improvements @@ -379,7 +378,7 @@ b; #### Don’t format nodes that end just before `rangeStart` ([#9704](https://github.com/prettier/prettier/pull/9704) by [@fisker](https://github.com/fisker)) -Previously, when [range formatting](https://prettier.io/docs/en/options.html#range) was performed, such nodes were considered part of the range, now they're excluded. This affects other languages that the range formatting feature supports, not only JavaScript. +Previously, when [range formatting](https://prettier.io/docs/options#range) was performed, such nodes were considered part of the range, now they're excluded. This affects other languages that the range formatting feature supports, not only JavaScript. <!-- prettier-ignore --> ```js @@ -819,7 +818,7 @@ const x = async do { `typescript` parser only, `babel-ts` doesn't have this issue. <!-- prettier-ignore --> -```typescript +```ts // Input class Foo { bar() /* bat */; @@ -1064,8 +1063,6 @@ interface Foo { #### Fix missing semicolon in `declare export * from …` ([#9767](https://github.com/prettier/prettier/pull/9767) by [@fisker](https://github.com/fisker)) -<!-- Optional description if it makes sense. --> - <!-- prettier-ignore --> ```jsx // Input @@ -1692,7 +1689,7 @@ The `.prettierrc` file can be written in either JSON or YAML. Previously, when P To simplify the code of AST printers, the data structure for the concatenation command has been changed from `{ type: 'concat', parts: Doc[] }` to `Doc[]`. The old format is deprecated, but for compatibility, the doc printer still supports it, and `doc.builders.concat` (as well as some other builder functions) will keep using it until the next major version of Prettier. -If you're a plugin author, this change should only concern you if your plugin introspects or modifies composed docs. If it happens to be the case, please make your plugin compatible with future versions of Prettier by tweaking the introspecting code to support the new format. There also is an off-chance where this change can break things, namely if a plugin calls another plugin to [print an embedded language](https://prettier.io/docs/en/plugins.html#optional-embed) and then introspects the returned doc. There seems to be no reason for plugins to do that though. +If you're a plugin author, this change should only concern you if your plugin introspects or modifies composed docs. If it happens to be the case, please make your plugin compatible with future versions of Prettier by tweaking the introspecting code to support the new format. There also is an off-chance where this change can break things, namely if a plugin calls another plugin to [print an embedded language](https://prettier.io/docs/plugins#optional-embed) and then introspects the returned doc. There seems to be no reason for plugins to do that though. To replace `concat(…)` calls in your plugins, you can try auto-fix by this ESLint rule [`prettier-doc/no-concat`](https://github.com/fisker/eslint-plugin-prettier-doc#no-concat). @@ -1779,7 +1776,7 @@ To print a sub-property of the current node, use `["property1", "property2"]`: } ``` -See also an example in the [docs](https://prettier.io/docs/en/plugins.html#print). +See also an example in the [docs](https://prettier.io/docs/plugins#print). ### CLI diff --git a/website/blog/2021-09-09-2.4.0.md b/website/blog/2021-09-09-2.4.0.md index ce1109438655..ee8c2e8b926c 100644 --- a/website/blog/2021-09-09-2.4.0.md +++ b/website/blog/2021-09-09-2.4.0.md @@ -1,6 +1,5 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.4: new bracketSameLine option and TypeScript 4.4 support!" --- @@ -10,7 +9,7 @@ We’ve also added support for [TypeScript 4.4](https://www.typescriptlang.org/d If you enjoy Prettier and would like to support our work, consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, including [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). -<!--truncate--> +<!-- truncate --> ## Highlights @@ -165,7 +164,7 @@ foo1(/叱叱叱/) The proposed [hack-style pipeline syntax](https://github.com/js-choi/proposal-hack-pipes) is now supported by Prettier. We are using `%` as the topic token, following the official explainer — although this may change in future releases as the proposal progresses. -As part of this change, support for the [“smart” pipeline syntax](https://github.com/js-choi/proposal-smart-pipelines) has been removed. See [our policy on non-standardized syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) for the rationale behind this decision. +As part of this change, support for the [“smart” pipeline syntax](https://github.com/js-choi/proposal-smart-pipelines) has been removed. See [our policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) for the rationale behind this decision. ```js // Input diff --git a/website/blog/2021-11-25-2.5.0.md b/website/blog/2021-11-25-2.5.0.md index db69b66a6c47..b12d12cc5852 100644 --- a/website/blog/2021-11-25-2.5.0.md +++ b/website/blog/2021-11-25-2.5.0.md @@ -1,6 +1,5 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.5: TypeScript 4.5 and MDX v2 comment syntax!" --- @@ -8,7 +7,7 @@ This release adds support for [TypeScript 4.5](https://devblogs.microsoft.com/ty If you enjoy Prettier and would like to support our work, consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, including [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). -<!--truncate--> +<!-- truncate --> ## Highlights @@ -16,7 +15,7 @@ If you enjoy Prettier and would like to support our work, consider sponsoring us #### Avoid extra offset in arrow function body when using long types ([#11515](https://github.com/prettier/prettier/pull/11515) by [@kachkaev](https://github.com/kachkaev) and [@thorn0](https://github.com/thorn0)) -Starting with Prettier 2.3.0, type declarations in arrow functions could affect function body indentation. Changing the length of the type annotation could produce large diffs and thus increased the chance of git conflicts. To prevent this, function body offset was stabilized.<br> +Starting with Prettier 2.3.0, type declarations in arrow functions could affect function body indentation. Changing the length of the type annotation could produce large diffs and thus increased the chance of git conflicts. To prevent this, function body offset was stabilized.<br /> **Note**: This change may affect a large number of lines in your codebase. <!-- prettier-ignore --> diff --git a/website/blog/2022-01-06-prettier-begins-paying-maintainers.md b/website/blog/2022-01-06-prettier-begins-paying-maintainers.md deleted file mode 100644 index c2049b7bba66..000000000000 --- a/website/blog/2022-01-06-prettier-begins-paying-maintainers.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -author: "Christopher Chedeau (@vjeux)" -authorURL: "https://github.com/vjeux" -title: "Prettier begins paying maintainers" ---- - -Prettier, an opinionated code formatter for JavaScript and many web languages, has been accepting donations at [OpenCollective](https://opencollective.com/prettier) since 2019 and thanks to many generous donations we now have \$50,000 in the bank! As a result, we are now able to pay the two active maintainers \$1,500/month each. This funding will ensure that they will be able to continue consistent maintenance of Prettier into the future. - -<!--truncate--> - -<blockquote class="twitter-tweet"><p lang="en" dir="ltr">📣 Prettier is now accepting donations! 🎉 If you &#39;d like to support our work, head to our OpenCollective! 🙏<a href="https://t.co/etDqkYLm4H">https://t.co/etDqkYLm4H</a></p>&mdash; Prettier (@PrettierCode) <a href="https://twitter.com/PrettierCode/status/1132012865416781824?ref_src=twsrc%5Etfw">May 24, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> - -Open Source and Money has always been a tricky topic. We've tried many things with Prettier. Right after the project was open sourced, Facebook contracted [James Long](https://twitter.com/jlongster) for 2 weeks in order to polish it. Facebook also paid Christopher Chedeau ([vjeux](https://twitter.com/Vjeux)) for 9 months to work on it full time. Once there was \$10,000 in contributions, we gave everyone that contributed significantly the opportunity to redeem \$1,000 but due to the complexities in collecting the money, few people did. - -We now have \$50,000 which is a sizable sum but not enough for someone with the skills to work on it to do it full time. But at the same time we shouldn't let it sit unused. So after a lot of thinking, we decided to provide a recurring \$1,500 to the two current maintainers of the project. They have been amazing stewards for the project for the past 2 years! - -- [Fisker Cheung](https://github.com/fisker) -- [Sosuke Suzuki](https://github.com/sosukesuzuki) - -As you can imagine, maintaining a project that is [used by 60% of all JavaScript developers](https://twitter.com/vjeux/status/1349383134010200068) is not a simple task. We are planning to release Prettier 3.0, including a migration to ECMAScript Modules, support for formatting new language features in, and fixing new edge cases as they are identified. - -If Prettier has been useful for you or your company, there has never been a better time to [donate to Prettier](https://opencollective.com/prettier). We will now be much more able to use that money to make Prettier better! diff --git a/website/blog/2022-01-06-prettier-begins-paying-maintainers.mdx b/website/blog/2022-01-06-prettier-begins-paying-maintainers.mdx new file mode 100644 index 000000000000..ded01b4b36fa --- /dev/null +++ b/website/blog/2022-01-06-prettier-begins-paying-maintainers.mdx @@ -0,0 +1,23 @@ +--- +authors: "vjeux" +title: "Prettier begins paying maintainers" +--- + +Prettier, an opinionated code formatter for JavaScript and many web languages, has been accepting donations at [OpenCollective](https://opencollective.com/prettier) since 2019 and thanks to many generous donations we now have \$50,000 in the bank! As a result, we are now able to pay the two active maintainers \$1,500/month each. This funding will ensure that they will be able to continue consistent maintenance of Prettier into the future. + +{/* truncate */} + +import { Tweet } from "react-tweet"; + +<Tweet id="1132012865416781824" /> + +Open Source and Money has always been a tricky topic. We've tried many things with Prettier. Right after the project was open sourced, Facebook contracted [James Long](https://twitter.com/jlongster) for 2 weeks in order to polish it. Facebook also paid Christopher Chedeau ([vjeux](https://twitter.com/Vjeux)) for 9 months to work on it full time. Once there was \$10,000 in contributions, we gave everyone that contributed significantly the opportunity to redeem \$1,000 but due to the complexities in collecting the money, few people did. + +We now have \$50,000 which is a sizable sum but not enough for someone with the skills to work on it to do it full time. But at the same time we shouldn't let it sit unused. So after a lot of thinking, we decided to provide a recurring \$1,500 to the two current maintainers of the project. They have been amazing stewards for the project for the past 2 years! + +- [Fisker Cheung](https://github.com/fisker) +- [Sosuke Suzuki](https://github.com/sosukesuzuki) + +As you can imagine, maintaining a project that is [used by 60% of all JavaScript developers](https://twitter.com/vjeux/status/1349383134010200068) is not a simple task. We are planning to release Prettier 3.0, including a migration to ECMAScript Modules, support for formatting new language features in, and fixing new edge cases as they are identified. + +If Prettier has been useful for you or your company, there has never been a better time to [donate to Prettier](https://opencollective.com/prettier). We will now be much more able to use that money to make Prettier better! diff --git a/website/blog/2022-03-16-2.6.0.md b/website/blog/2022-03-16-2.6.0.md index 0689d84c53fb..d036334276f8 100644 --- a/website/blog/2022-03-16-2.6.0.md +++ b/website/blog/2022-03-16-2.6.0.md @@ -1,14 +1,13 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.6: new singleAttributePerLine option and new JavaScript features!" --- -This release includes a new `singleAttributePerLine` option. This is an option to print only one attribute per line in Vue SFC templates, HTML, and JSX. Per our [Option Philosophy](https://prettier.io/docs/en/option-philosophy.html), we would prefer not to add such an option. However, there are many users who want this feature, and major style guides like [Airbnb’s JavaScript Style Guide](https://github.com/airbnb/javascript/blob/274c8d570155a05b016980294d4204c5711bce86/packages/eslint-config-airbnb/rules/react.js#L97-L99) and [Vue’s style guide](https://vuejs.org/style-guide/rules-strongly-recommended.html#multi-attribute-elements) recommend the single attribute per line style. A [PR](https://github.com/prettier/prettier/pull/6644) to add this feature was opened in October 2019, and both it and the [corresponding issue](https://github.com/prettier/prettier/issues/5501) have received a significant amount of support from users. For us it was a hard decision to add this option. We hope the addition of this option will benefit many users without significantly harming our principles. +This release includes a new `singleAttributePerLine` option. This is an option to print only one attribute per line in Vue SFC templates, HTML, and JSX. Per our [Option Philosophy](https://prettier.io/docs/option-philosophy), we would prefer not to add such an option. However, there are many users who want this feature, and major style guides like [Airbnb’s JavaScript Style Guide](https://github.com/airbnb/javascript/blob/274c8d570155a05b016980294d4204c5711bce86/packages/eslint-config-airbnb/rules/react.js#L97-L99) and [Vue’s style guide](https://vuejs.org/style-guide/rules-strongly-recommended.html#multi-attribute-elements) recommend the single attribute per line style. A [PR](https://github.com/prettier/prettier/pull/6644) to add this feature was opened in October 2019, and both it and the [corresponding issue](https://github.com/prettier/prettier/issues/5501) have received a significant amount of support from users. For us it was a hard decision to add this option. We hope the addition of this option will benefit many users without significantly harming our principles. We've also added support formatting for some new JavaScript syntax proposals via Babel. -<!--truncate--> +<!-- truncate --> ## Thanks to our sponsors! @@ -30,7 +29,7 @@ As discussed in [a blog post from earlier this year](https://prettier.io/blog/20 If you enjoy Prettier and would like to support our work, consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, including [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). -<!--truncate--> +<!-- truncate --> ## Highlights @@ -306,7 +305,7 @@ class Foo extends /** @type {Type} */ (Bar) {} The Stage 3 proposal for [Unicode Set Notation](https://github.com/tc39/proposal-regexp-set-notation/) in regular expressions is now supported via [Babel 7.17.0](https://babeljs.io/blog/2022/02/02/7.17.0). -See [the release blog post of Babel v7.17.0](https://babeljs.io/blog/2022/02/02/7.17.0#regexp-set-notation-and-properties-of-strings-14125httpsgithubcombabelbabelpull14125) and [the README of this proposal](https://github.com/tc39/proposal-regexp-set-notation/) for details. Also keep in mind our [policy on non-standardized syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) before using this proposed syntax feature with Prettier. +See [the release blog post of Babel v7.17.0](https://babeljs.io/blog/2022/02/02/7.17.0#regexp-set-notation-and-properties-of-strings-14125httpsgithubcombabelbabelpull14125) and [the README of this proposal](https://github.com/tc39/proposal-regexp-set-notation/) for details. Also keep in mind our [policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) before using this proposed syntax feature with Prettier. <!-- prettier-ignore --> ```jsx @@ -401,7 +400,7 @@ type Props = #### Add support for destructuring of private fields ([#12276](https://github.com/prettier/prettier/pull/12276) by [@sosukesuzuki](https://github.com/sosukesuzuki)) -The Stage 2 TC39 proposal for [destructuring of private fields](https://github.com/tc39/proposal-destructuring-private) is now supported via [Babel 7.17](https://babeljs.io/blog/2022/02/02/7.17.0). Please read our [policy on non-standardized syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) before you decide to use this proposed syntax feature with Prettier. +The Stage 2 TC39 proposal for [destructuring of private fields](https://github.com/tc39/proposal-destructuring-private) is now supported via [Babel 7.17](https://babeljs.io/blog/2022/02/02/7.17.0). Please read our [policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) before you decide to use this proposed syntax feature with Prettier. <!-- prettier-ignore --> ```jsx @@ -417,7 +416,7 @@ class Foo { #### Support decorator auto accessors syntax ([#12299](https://github.com/prettier/prettier/pull/12299) by [@sosukesuzuki](https://github.com/sosukesuzuki)) -Support auto accessors syntax that is introduced in [new decorators proposal](https://github.com/tc39/proposal-decorators). Please read our [policy on non-standardized syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) before you decide to use this proposed syntax feature with Prettier. +Support auto accessors syntax that is introduced in [new decorators proposal](https://github.com/tc39/proposal-decorators). Please read our [policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) before you decide to use this proposed syntax feature with Prettier. <!-- prettier-ignore --> ```jsx @@ -788,7 +787,7 @@ schema { <!-- prettier-ignore --> ```yaml -# Input +# Input block_with_ideographic_space: |  line-content # This line starts with U+3000 diff --git a/website/blog/2022-06-14-2.7.0.md b/website/blog/2022-06-14-2.7.0.md index f56fa544e2f9..fcb9c32ea9df 100644 --- a/website/blog/2022-06-14-2.7.0.md +++ b/website/blog/2022-06-14-2.7.0.md @@ -1,6 +1,5 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.7: new --cache CLI option and TypeScript 4.7 syntax!" --- @@ -10,7 +9,7 @@ We've also added support formatting for TypeScript 4.7 syntax! If you enjoy Prettier and would like to support our work, consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, including [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). -<!--truncate--> +<!-- truncate --> ## Highlights @@ -63,7 +62,7 @@ type FirstString<T> = T extends [infer S extends string, ...unknown[]] Two new CLI options have been added for a caching system similar to [ESLint's one](https://eslint.org/docs/user-guide/command-line-interface#caching). -Please see [the doc](https://prettier.io/docs/en/cli.html#--cache) for more details. +Please see [the doc](https://prettier.io/docs/cli#--cache) for more details. ##### `--cache` @@ -214,14 +213,14 @@ Although this change does not affect the comments format in `import`, follows ch // Input export { foo, - + bar as // comment baz, } import { foo, - + bar as // comment baz, } from 'foo' diff --git a/website/blog/2022-11-23-2.8.0.md b/website/blog/2022-11-23-2.8.0.md index 0445b6ca64d8..b331299c86df 100644 --- a/website/blog/2022-11-23-2.8.0.md +++ b/website/blog/2022-11-23-2.8.0.md @@ -1,6 +1,5 @@ --- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" +authors: "sosukesuzuki" title: "Prettier 2.8: improve --cache CLI option and TypeScript 4.9 satisfies operator!" --- @@ -12,7 +11,7 @@ If you enjoy Prettier and would like to support our work, consider sponsoring us The Prettier team plans to release 3.0 within the next few months. If you are a plugin developer, get ready for the migration. Visit [the migration guide](https://github.com/prettier/prettier/wiki/How-to-migrate-my-plugin-to-support-Prettier-v3%3F) and issue [#13606](https://github.com/prettier/prettier/issues/13616) for more information. -<!--truncate--> +<!-- truncate --> ## Highlights @@ -205,7 +204,7 @@ Pseudo-selectors like `:is`, `:where`, and `:not` that can take multiple selecto ### SCSS -#### Fix: extra space between '#' and '{' ([#13286](https://github.com/prettier/prettier/pull/13286) by [@jspereiramoura](https://github.com/jspereiramoura)) +#### Fix: extra space between '#' and '\{' ([#13286](https://github.com/prettier/prettier/pull/13286) by [@jspereiramoura](https://github.com/jspereiramoura)) <!-- prettier-ignore --> ```scss @@ -299,7 +298,7 @@ incididunt` ut labore et dolore magna aliqua. #### Improve MDX range ignore support ([#12208](https://github.com/prettier/prettier/pull/12208) by [@nickrttn](https://github.com/nickrttn)) -Adds support for using Markdown [range ignore](https://prettier.io/docs/en/ignore.html#range-ignore) directives in MDX, using JSX comments. +Adds support for using Markdown [range ignore](https://prettier.io/docs/ignore#range-ignore) directives in MDX, using JSX comments. <!-- prettier-ignore --> ```mdx diff --git a/website/blog/2023-07-05-3.0.0.md b/website/blog/2023-07-05-3.0.0.md new file mode 100644 index 000000000000..fdf99b40ec6c --- /dev/null +++ b/website/blog/2023-07-05-3.0.0.md @@ -0,0 +1,2148 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.0: Hello, ECMAScript Modules!" +--- + +We are excited to announce the release of the new version of Prettier! + +We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. + +This update comes with several breaking changes. One notable example is the alteration in markdown formatting - spaces are no longer inserted between Latin characters and Chinese or Japanese characters. We'd like to extend our gratitude to [Tatsunori Uchino](https://github.com/tats-u), who has made significant contributions to Prettier over the past year, particularly with this feature. Additionally, the default value of `trailingComma` has been changed to `"all"`. + +Another important change in this release is the significant overhaul of the plugin interface. Prettier now supports plugins written using ECMAScript Modules and async parsers. If you're a plugin developer, please exercise caution while updating. You can find [the migration guide](https://github.com/prettier/prettier/wiki/How-to-migrate-my-plugin-to-support-Prettier-v3%3F) here. As always, we welcome bug reports and feedback! + +This release also includes numerous formatting improvements and bug fixes. + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +<!-- truncate --> + +## Highlights + +### Markdown + +#### Improve handling of whitespace for Chinese, Japanese, and Korean ([#11597](https://github.com/prettier/prettier/pull/11597) by [@tats-u](https://github.com/tats-u)) + +##### Stop inserting spaces between Chinese or Japanese and Western characters + +Previously, Prettier would insert spaces between Chinese or Japanese and Western characters (letters and digits). While some people prefer this style, it isn’t standard, and is in fact contrary to official guidelines. Please see [here](https://github.com/tats-u/prettier-plugin-md-nocjsp#why-this-plugin-is-needed) for more details. We decided it’s not Prettier’s job to enforce a particular style in this case, so spaces aren’t inserted anymore, while existing ones are preserved. If you need a tool for enforcing spacing style, consider [textlint-ja](https://github.com/textlint-ja/textlint-rule-preset-ja-spacing/tree/master/packages/textlint-rule-ja-space-between-half-and-full-width) or [lint-md](https://github.com/lint-md/lint-md) (rules `space-round-alphabet` and `space-round-number`). + +The tricky part of this change were ambiguous line breaks between Chinese or Japanese and Western characters. When Prettier unwraps text, it needs to decide whether such a line break should be simply removed or replaced with a space. For that Prettier examines the surrounding text and infers the preferred style. + +<!-- prettier-ignore --> +```markdown +<!-- Input --> +漢字 +Alphabetsひらがな12345カタカナ67890 + +漢字 Alphabets ひらがな 12345 カタカナ 67890 + +<!-- Prettier 2.8 --> +漢字 Alphabets ひらがな 12345 カタカナ 67890 + +漢字 Alphabets ひらがな 12345 カタカナ 67890 + +<!-- Prettier 3.0 --> +漢字Alphabetsひらがな12345カタカナ67890 + +漢字 Alphabets ひらがな 12345 カタカナ 67890 +``` + +##### Comply to line breaking rules in Chinese and Japanese + +There are rules that prohibit certain characters from appearing at the beginning or the end of a line in [Chinese](https://www.w3.org/TR/clreq/#prohibition_rules_for_line_start_end) and [Japanese](https://www.w3.org/TR/jlreq/#characters_not_starting_a_line). E.g., full stop characters `。`, `.`, and `.` shouldn’t start a line whereas `(` shouldn’t end a line. Prettier now follows these rules when it wraps text, that is when `proseWrap` is set to `always`. + +<!-- prettier-ignore --> +```markdown +<!-- Input --> +HTCPCPのエラー418は、ティーポットにコーヒーを淹(い)れさせようとしたときに返されるステータスコードだ。 + +<!-- Prettier 2.8 with --prose-wrap always --print-width 8 --> +HTCPCP の +エラー +418 は、 +ティーポ +ットにコ +ーヒーを +淹(い) +れさせよ +うとした +ときに返 +されるス +テータス +コードだ +。 + +<!-- Prettier 3.0 with the same options --> +HTCPCPの +エラー +418は、 +ティー +ポットに +コーヒー +を淹 +(い)れ +させよう +としたと +きに返さ +れるス +テータス +コード +だ。 +``` + +##### Do not break lines inside Korean words + +Korean uses spaces to divide words, and an inappropriate division may change the meaning of a sentence: + +- `노래를 못해요.`: I’m not good at singing. +- `노래를 못 해요.`: I can’t sing (for some reason). + +Previously, when `proseWrap` was set to `always`, successive Hangul characters could get split by a line break, which could later be converted to a space when the document is edited and reformatted. This doesn’t happen anymore. Korean text is now wrapped like English. + +<!-- prettier-ignore --> +```markdown +<!-- Input --> +노래를 못해요. + +<!-- Prettier 2.8 with --prose-wrap always --print-width 9 --> +노래를 못 +해요. + +<!-- Prettier 2.8, subsequent reformat with --prose-wrap always --print-width 80 --> +노래를 못 해요. + +<!-- Prettier 3.0 with --prose-wrap always --print-width 9 --> +노래를 +못해요. + +<!-- Prettier 3.0, subsequent reformat with --prose-wrap always --print-width 80 --> +노래를 못해요. +``` + +A line break between Hangul and non-Hangul letters and digits is converted to a space when Prettier unwraps the text. Consider this example: + +> 3분 기다려 주지. + +In this sentence, if you break the line between “3” and “분”, a space will be inserted there when the text gets unwrapped. + +### API + +#### Support plugins with async parsers ([#12748](https://github.com/prettier/prettier/pull/12748) by [@fisker](https://github.com/fisker), [#13211](https://github.com/prettier/prettier/pull/13211) by [@thorn0](https://github.com/thorn0) and [@fisker](https://github.com/fisker)) + +[`parse` function](https://prettier.io/docs/plugins#parsers) in a plugin can return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) now. + +In order to support async parsers for embedded languages, we had to introduce a breaking change to the plugin API. Namely, the `embed` method of a printer has now to match a completely new signature, incompatible with previous versions. If you're a plugin author and your plugins don't define `embed`, you have nothing to worry about, otherwise see the [docs](https://prettier.io/docs/plugins#optional-embed) for details. + +Also, the `preprocess` method of a printer can return a promise now. + +#### Support config files in ESM ([#13130](https://github.com/prettier/prettier/pull/13130) by [@fisker](https://github.com/fisker)) + +Config files in ESM are supported, supported config file names: + +- `prettier.config.js` (in place with `{"type": "module"}` in `package.json`) +- `.prettierrc.js` (same as above) +- `prettier.config.mjs` +- `.prettierrc.mjs`. + +```js +export default { + trailingComma: "es5", + tabWidth: 4, + semi: false, + singleQuote: true, +}; +``` + +**[Shareable config package](https://prettier.io/docs/configuration#sharing-configurations) can also be a pure ESM package.** + +## Breaking Changes + +### JavaScript + +#### Change the default value for `trailingComma` to `all` ([#11479](https://github.com/prettier/prettier/pull/11479) by [@fisker](https://github.com/fisker), [#13143](https://github.com/prettier/prettier/pull/13143) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Since version 2.0. we've changed the default value for `trailingComma` to `es5`. + +[Internet Explorer, the last browser to not allow trailing commas in function calls, has been unsupported on June 15, 2022.](https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support) Accordingly, change the default value for `trailingComma` to `all`. + +If the old behavior is still preferred, please configure Prettier with `{ "trailingComma": "es5" }`. + +#### Remove Flow syntax support from `babel` parser ([#14314](https://github.com/prettier/prettier/pull/14314) by [@fisker](https://github.com/fisker), [@thorn0](https://github.com/thorn0)) + +For historical reasons, Prettier used to recognize Flow syntax in JS files when the `parser` option was set to `babel` even if the file didn't include the `@flow` pragma. This support was limited and bad for performance, so it has been removed in Prettier 3.0. Prettier with the `babel` parser still automatically switches to the Flow syntax if it finds the `@flow` pragma or the file has the `.js.flow` extension. + +### Flow + +#### Remove support for Flow comments ([#13687](https://github.com/prettier/prettier/pull/13687), [#13703](https://github.com/prettier/prettier/pull/13703) by [@thorn0](https://github.com/thorn0)) + +Being a kind of preprocessor, [Flow comments](https://flow.org/blog/2015/02/20/Flow-Comments/) AKA [comment types](https://flow.org/en/docs/types/comments/) are processed on the token level and can't be represented in an AST in the general case. Flow builds the AST as if these special comment tokens didn't exist. Example: + +<!-- prettier-ignore --> +```js +/*:: if */ (x) + y; +``` + +This is parsed as `if (x) +y;` by Flow and as `x + y;` by JS parsers that don't support Flow. + +Previously, for some special cases, Prettier tried to detect that this syntax was used and to preserve it. As an attempt to solve an unsolvable problem, this limited support was fragile and riddled with bugs, so it has been removed. Now if the `parser` option is set to `flow` or `babel-flow`, Flow comments will be parsed and reprinted like normal code. If a parser that doesn't support Flow is used, they will be treated like usual comments. + +<!-- prettier-ignore --> +```js +// Input +let a /*: foo */ = b; + +// Prettier 2.8 +let a /*: foo */ = b; + +// Prettier 3.0 with --parser flow +let a: foo = b; + +// Prettier 3.0 with --parser babel +let a /*: foo */ = b; +``` + +#### Print trailing comma in type parameters and tuple types when `--trailing-comma=es5` ([#14086](https://github.com/prettier/prettier/pull/14086), [#14085](https://github.com/prettier/prettier/pull/14085) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```js +// Input +type Foo = [ + { + from: string, + to: string, + }, // <- 1 +]; +type Foo = Promise< + | { ok: true, bar: string, baz: SomeOtherLongType } + | { ok: false, bar: SomeOtherLongType }, // <- 2 +>; + +// Prettier 2.8 +type Foo = [ + { + from: string, + to: string, + } // <- 1 +]; +type Foo = Promise< + | { ok: true, bar: string, baz: SomeOtherLongType } + | { ok: false, bar: SomeOtherLongType } // <- 2 +>; + +// Prettier 3.0 +type Foo = [ + { + from: string, + to: string, + }, // <- 1 +]; +type Foo = Promise< + | { ok: true, bar: string, baz: SomeOtherLongType } + | { ok: false, bar: SomeOtherLongType }, // <- 2 +>; +``` + +### CSS + +#### Add the pure `css` parser ([#7933](https://github.com/prettier/prettier/pull/7933), [#9092](https://github.com/prettier/prettier/pull/9092), [#9093](https://github.com/prettier/prettier/pull/9093) by [@fisker](https://github.com/fisker)) + +Previously, when `--parser=css` was passed, Prettier tried to parse the content using `postcss-scss` and `postcss-less`. This caused confusion, and made syntax errors difficult to spot. Now `--parser=css` works only with the vanilla CSS syntax. + +_If you use `parser="css"` for your `.less`/`.scss` files, update it to the correct parser or remove the `parser` option to let Prettier auto-detect the parser by the file extension._ + +<!-- prettier-ignore --> +```less +/* Input */ +/* Less Syntax with `--parser=css` */ +a {.bordered();} + +/* Prettier 2.8 */ +/* Less Syntax with `--parser=css` */ +a { + .bordered(); +} + +/* Prettier 3.0 */ +SyntaxError: (postcss) CssSyntaxError Unknown word (2:4) + 1 | /* Less Syntax with `--parser=css` */ +> 2 | a {.bordered();} +``` + +<!-- prettier-ignore --> +```scss +/* Input */ +/* Scss Syntax with `--parser=css` */ +::before {content: #{$foo}} + +/* Prettier 2.8 */ +/* Scss Syntax with `--parser=css` */ +::before { + content: #{$foo}; +} + +/* Prettier 3.0 */ +SyntaxError: (postcss) CssSyntaxError Unknown word (2:22) + 1 | /* Scss Syntax with `--parser=css` */ +> 2 | ::before {content: #{$foo}} +``` + +### GraphQL + +#### Drop support for "comma separated interfaces" syntax ([#12835](https://github.com/prettier/prettier/pull/12835) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```graphql +# Input +type Type1 implements A, B {a: a} + +# Prettier 2.8 +type Type1 implements A, B { + a: a +} + +# Prettier 3.0 +SyntaxError: Syntax Error: Unexpected Name "B". (1:26) +> 1 | type Type1 implements A, B {a: a} +``` + +### API + +#### Drop support for Node.js 10 and 12 ([#11830](https://github.com/prettier/prettier/pull/11830) by [@fisker](https://github.com/fisker), [#13118](https://github.com/prettier/prettier/pull/13118) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +The minimal required Node.js version is v14 + +#### Change public APIs to asynchronous ([#12574](https://github.com/prettier/prettier/pull/12574), [#12788](https://github.com/prettier/prettier/pull/12788), [#12790](https://github.com/prettier/prettier/pull/12790), [#13265](https://github.com/prettier/prettier/pull/13265) by [@fisker](https://github.com/fisker)) + +- `prettier.format()` returns `Promise<string>` +- `prettier.formatWithCursor()` returns `Promise<{formatted: string, cursorOffset: number}>` +- `prettier.formatAST()` returns `Promise<string>` +- `prettier.check()` returns `Promise<boolean>` +- `prettier.getSupportInfo()` returns `Promise` +- `prettier.clearConfigCache()` returns `Promise<void>` +- `prettier.resolveConfig.sync` is removed +- `prettier.resolveConfigFile.sync` is removed +- `prettier.getFileInfo.sync` is removed + +If you still need sync APIs, you can try [`@prettier/sync`](https://github.com/prettier/prettier-synchronized) + +#### Npm package file structures changed ([#12740](https://github.com/prettier/prettier/pull/12740) by [@fisker](https://github.com/fisker), [#13530](https://github.com/prettier/prettier/pull/13530) by [@fisker](https://github.com/fisker), [#14570](https://github.com/prettier/prettier/pull/14570) by [@fisker](https://github.com/fisker)) + +File structures changes: + +- `bin-prettier.js` -> `bin/prettier.cjs` +- `esm/standalone.mjs` -> `standalone.mjs` +- `esm/parser-angular.mjs` -> `plugins/angular.mjs` +- `parser-angular.js` -> `plugins/angular.js` +- `esm/parser-babel.mjs` -> `plugins/babel.mjs` +- `parser-babel.js` -> `plugins/babel.js` +- `esm/parser-espree.mjs` -> `plugins/acorn-and-espree.mjs` +- `parser-espree.js` -> `plugins/acorn.js`\ + global object renamed `prettierPlugins.espree` -> `prettierPlugins.acorn` +- `esm/parser-flow.mjs` -> `plugins/flow.mjs` +- `parser-flow.js` -> `plugins/flow.js` +- `esm/parser-glimmer.mjs` -> `plugins/glimmer.mjs` +- `parser-glimmer.js` -> `plugins/glimmer.js` +- `esm/parser-graphql.mjs` -> `plugins/graphql.mjs` +- `parser-graphql.js` -> `plugins/graphql.js` +- `esm/parser-html.mjs` -> `plugins/html.mjs` +- `parser-html.js` -> `plugins/html.js` +- `esm/parser-markdown.mjs` -> `plugins/markdown.mjs` +- `parser-markdown.js` -> `plugins/markdown.js` +- `esm/parser-meriyah.mjs` -> `plugins/meriyah.mjs` +- `parser-meriyah.js` -> `plugins/meriyah.js` +- `esm/parser-postcss.mjs` -> `plugins/postcss.mjs` +- `parser-postcss.js` -> `plugins/postcss.js` +- `esm/parser-typescript.mjs` -> `plugins/typescript.mjs` +- `parser-typescript.js` -> `plugins/typescript.js` +- `esm/parser-yaml.mjs` -> `plugins/yaml.mjs` +- `parser-yaml.js` -> `plugins/yaml.js` + +Check full list on https://unpkg.com/browse/prettier@3.0.0/. + +A new plugin has been added: + +- `plugins/estree.mjs` (ESM version) +- `plugins/estree.js` (UMD version) + +If you use standalone version, this plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. + +```diff +import { format } from "prettier/standalone"; +- import prettierPluginBabel from "prettier/parser-babel"; ++ import * as prettierPluginBabel from "prettier/plugins/babel"; ++ import * as prettierPluginEstree from "prettier/plugins/estree"; + +console.log( +- format(code, { ++ await format(code, { + parser: "babel", +- plugins: [prettierPluginBabel], ++ plugins: [prettierPluginBabel, prettierPluginEstree], + }) +); +``` + +```diff +- node ./node_modules/prettier/bin-prettier.js . --write ++ node ./node_modules/prettier/bin/prettier.cjs . --write +``` + +#### Support plugins in ESM ([#13201](https://github.com/prettier/prettier/pull/13201) by [@fisker](https://github.com/fisker)) + +Since v3.0.0, we load plugins via `import()` instead of `require()`, plugins can be ESM modules now. + +If you use `--plugin` by directory path, or file path without extensions, the plugin may not able to load. + +```diff +- prettier . --plugin=path/to/my-plugin-directory ++ prettier . --plugin=path/to/my-plugin-directory/index.js +``` + +```diff +- prettier . --plugin=path/to/my-plugin-file ++ prettier . --plugin=path/to/my-plugin-file.js +``` + +#### Update `prettier.doc` ([#13203](https://github.com/prettier/prettier/pull/13203), [#14456](https://github.com/prettier/prettier/pull/14456) by [@fisker](https://github.com/fisker)) + +`prettier.doc.builders.concat` [was deprecated in v2.3.0](https://prettier.io/blog/2021/05/09/2.3.0.html#use-arrays-instead-of-concat-9733httpsgithubcomprettierprettierpull9733-by-fiskerhttpsgithubcomfisker-thorn0httpsgithubcomthorn0), now it's removed. + +The following apis are never documented, they mean to only use internally, now they are removed. + +- `prettier.doc.utils.getDocParts` +- `prettier.doc.utils.propagateBreaks` +- `prettier.doc.utils.cleanDoc` +- `prettier.doc.utils.getDocType` +- `prettier.doc.debug.printDocToDebug` + +#### `textToDoc` trims trailing hard lines ([#13220](https://github.com/prettier/prettier/pull/13220) by [@fisker](https://github.com/fisker)) + +Previously, in all core languages, after embedded code printed to `Doc`, we call `prettier.doc.utils.stripTrailingHardline()` to remove the trailing hard lines. + +We believe make `textToDoc` return docs without trailing hard lines makes the plugins easier to do `embed` print. + +#### Removed support for custom parser api ([#13250](https://github.com/prettier/prettier/pull/13250) by [@fisker](https://github.com/fisker) and [@thorn0](https://github.com/thorn0)) + +Before [plugins](/docs/plugins) were a thing, Prettier had a similar but more limited feature called custom parsers. It’s been removed in v3.0.0 as its functionality was a subset of what the Plugin API did. If you used it, please check [how to migrate](/docs/api#custom-parser-api-removed). + +#### The second argument `parsers` passed to `parsers.parse` has been removed ([#13268](https://github.com/prettier/prettier/pull/13268) by [@fisker](https://github.com/fisker)) + +The plugin's `print` function signature changed from + +```ts +function parse(text: string, parsers: object, options: object): AST; +``` + +to + +```ts +function parse(text: string, options: object): Promise<AST> | AST; +``` + +The second argument `parsers` has been removed, if you still need other parser during parse process, you can: + +1. Import the plugin yourself (recommended) + + ```js + import * as prettierPluginBabel from "prettier/plugins/babel"; + + const myCustomPlugin = { + parsers: { + "my-custom-parser": { + async parse(text) { + const ast = await prettierPluginBabel.parsers.babel.parse(text); + ast.program.body[0].expression.callee.name = "_"; + return ast; + }, + astFormat: "estree", + }, + }, + }; + ``` + +1. Get the parser from the `options` argument + + ```js + function getParserFromOptions(options, parserName) { + const parserOrParserInitFunction = options.plugins.find( + (plugin) => plugin.parsers && Object.hasOwn(plugin.parsers, parserName), + )?.parsers[parserName]; + return typeof parserOrParserInitFunction === "function" + ? parserOrParserInitFunction() + : parserOrParserInitFunction; + } + + const myCustomPlugin = { + parsers: { + "my-custom-parser": { + async parse(text, options) { + const babelParser = await getParserFromOptions(options, "babel"); + const ast = await babelParser.parse(text); + ast.program.body[0].expression.callee.name = "_"; + return ast; + }, + astFormat: "estree", + }, + }, + }; + ``` + +#### `undefined` and `null` are not passed to plugin's `print` function ([#13397](https://github.com/prettier/prettier/pull/13397) by [@fisker](https://github.com/fisker)) + +If your plugin happened to use `print` to print them, please check them in the parent node instead. + +```diff +function print(path, print) { +- const value = path.getValue(); +- if (!value?.type) { +- return String(value); +- } + +- return path.map(print, "values"); + ++ return path.map(({node}) => (node?.type ? print() : String(node)), "values"); +} +``` + +#### Allow using arbitrary truthy values for `label` docs ([#13532](https://github.com/prettier/prettier/pull/13532) by [@thorn0](https://github.com/thorn0)) + +The `label` doc builder has been changed. See the [documentation](https://github.com/prettier/prettier/blob/main/commands.md#label). + +#### `getFileInfo()` resolves config by default ([#14108](https://github.com/prettier/prettier/pull/14108) by [@fisker](https://github.com/fisker)) + +`options.resolveConfig` default to `true` now, see the [documentation](https://prettier.io/docs/api#prettiergetfileinfofilepath--options). + +#### Plugin search feature has been removed ([#14759](https://github.com/prettier/prettier/pull/14759) by [@fisker](https://github.com/fisker)) + +The plugin auto search feature didn't work well when using pnpm, and cause slowness. + +`--plugin-search-dir`, `--no-plugin-search` flags for CLI and `pluginSearchDirs` in API options has been removed in Prettier 3.0. + +`--plugin` flag and `plugins` option should be used instead, see [documentation](https://prettier.io/docs/plugins#using-plugins). + +### CLI + +#### Ignore `.gitignore`d files by default ([#14731](https://github.com/prettier/prettier/pull/14731) by [@fisker](https://github.com/fisker)) + +Prettier ignores files ignored by `.gitignore` by default. +If you want the old behavior(only ignore files ignored by `.prettierignore`), use + +```console +prettier . --write --ignore-path=.prettierignore +``` + +## Other Changes + +### JavaScript + +#### Support the "decorated function" pattern ([#10714](https://github.com/prettier/prettier/pull/10714) by [@thorn0](https://github.com/thorn0)) + +In this case the developer is usually willing to sacrifice the readability of the arrow function's signature to get less indentation in its body. Prettier now recognizes this pattern and keeps the arrow function hugged even if the signature breaks. + +<!-- prettier-ignore --> +```ts +// Prettier 2.8 +const Counter = decorator("my-counter")( + (props: { initialCount?: number; label?: string }) => { + // ... + } +); + +// Prettier 3.0 +const Counter = decorator("my-counter")((props: { + initialCount?: number; + label?: string; +}) => { + // ... +}); +``` + +#### Fix cursor positioning for files containing emoji ([#13340](https://github.com/prettier/prettier/pull/13340) by [@fisker](https://github.com/fisker)) + +```console +$ cat test.js +const { formatWithCursor } = await import("prettier"); +const code = "'😀😀😀😀'"; +await formatWithCursor(code, {parser: "babel", cursorOffset: 9}) + +# Prettier 2.8 +$ node test.js +{ formatted: '"😀😀😀😀";\n', cursorOffset: 5, comments: [] } + +# Prettier 3.0 +$ node test.js +{ formatted: '"😀😀😀😀";\n', cursorOffset: 9, comments: [] } +``` + +#### Fix edge cases of the first call argument expansion ([#13341](https://github.com/prettier/prettier/pull/13341) by [@thorn0](https://github.com/thorn0)) + +<!-- prettier-ignore --> +```jsx +// Input +export default whatever(function (a: { + aaaaaaaaa: string; + bbbbbbbbb: string; + ccccccccc: string; +}) { + return null; +}, "xyz"); + +call( + function() { + return 1; + }, + $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? $var ?? 'test' +); + +// Prettier 2.8 +export default whatever(function (a: { + aaaaaaaaa: string; + bbbbbbbbb: string; + ccccccccc: string; +}) { + return null; +}, +"xyz"); + +call(function () { + return 1; +}, $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + "test"); + +// Prettier 3.0 +export default whatever(function (a: { + aaaaaaaaa: string, + bbbbbbbbb: string, + ccccccccc: string, +}) { + return null; +}, "xyz"); + +call( + function () { + return 1; + }, + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + $var ?? + "test", +); +``` + +#### Fix indentation of arrow function chains in call arguments and binary expressions ([#13391](https://github.com/prettier/prettier/pull/13391) by [@thorn0](https://github.com/thorn0)) + +The motivation behind the chosen formatting is to make it clear how many arguments the call has. +However, there was a bug with the indentation of the first signature in the chain if that signature didn't fit on one line. + +<!-- prettier-ignore --> +```js +// Prettier 2.8 +askTrovenaBeenaDependsRowans( + glimseGlyphsHazardNoopsTieTie, + ( + averredBathersBoxroomBuggyNurl, + anodyneCondosMalateOverateRetinol = "default" + ) => + (annularCooeedSplicesWalksWayWay) => + (kochabCooieGameOnOboleUnweave) => + abugidicRomanocastorProvider, + weaponizedStellatedOctahedron +); + +// Prettier 3.0 +askTrovenaBeenaDependsRowans( + glimseGlyphsHazardNoopsTieTie, + ( + averredBathersBoxroomBuggyNurl, + anodyneCondosMalateOverateRetinol = "default", + ) => + (annularCooeedSplicesWalksWayWay) => + (kochabCooieGameOnOboleUnweave) => + abugidicRomanocastorProvider, + weaponizedStellatedOctahedron, +); +``` + +#### Don't break signature of hugged function expression if parameters are identifiers without types ([#13410](https://github.com/prettier/prettier/pull/13410) by [@thorn0](https://github.com/thorn0)) + +<!-- prettier-ignore --> +```tsx +// Prettier 2.8 +export const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link( + props, + ref +) { + return <ThemeUILink ref={ref} variant="default" {...props} />; +}); + +// Prettier 3.0 +export const Link = forwardRef<HTMLAnchorElement, LinkProps>( + function Link(props, ref) { + return <ThemeUILink ref={ref} variant="default" {...props} />; + }, +); +``` + +#### Fix interleaved comments ([#13438](https://github.com/prettier/prettier/pull/13438) by [@thorn0](https://github.com/thorn0)) + +<!-- prettier-ignore --> +```js +// Input +function x() { +} // first +; // second + +// Prettier 2.8 +function x() {} // first // second + +// Prettier 3.0 +function x() {} // first +// second +``` + +#### Support nestled JSDoc comments ([#13445](https://github.com/prettier/prettier/pull/13445) by [@thorn0](https://github.com/thorn0)) + +This kind of comments is used to document overloaded functions (see https://github.com/jsdoc/jsdoc/issues/1017). + +<!-- prettier-ignore --> +```jsx +// Input +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +// Prettier 2.8 +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + */ /** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} + +// Prettier 3.0 +/** + * @template T + * @param {Type} type + * @param {T} value + * @return {Value} + *//** + * @param {Type} type + * @return {Value} + */ +function value(type, value) { + if (arguments.length === 2) { + return new ConcreteValue(type, value); + } else { + return new Value(type); + } +} +``` + +#### Fix unstable template literals with embedded languages ([#13532](https://github.com/prettier/prettier/pull/13532) by [@thorn0](https://github.com/thorn0)) + +If a template literal with embedded syntax is the only argument of a call or the body of an arrow function and has leading and trailing whitespace, it won't be printed on a new line. + +<!-- prettier-ignore --> +```js +// Input +foo(/* HTML */ ` <!-- bar1 --> bar <!-- bar2 --> `); + +// Prettier 2.8 (first output) +foo( + /* HTML */ ` + <!-- bar1 --> + bar + <!-- bar2 --> + ` +); + +// Prettier 2.8 (second output) +foo(/* HTML */ ` + <!-- bar1 --> + bar + <!-- bar2 --> +`); + +// Prettier 3.0 (first output) +foo(/* HTML */ ` + <!-- bar1 --> + bar + <!-- bar2 --> +`); +``` + +#### Fix indention of expressions in template literals ([#13621](https://github.com/prettier/prettier/pull/13621) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```js +// Input +` + 1. Go to ${chalk.green.underline(FOO_LINK)} + 2. Click "${chalk.green( + "Run workflow" + )}" button, type "${chalk.yellow.underline( + version + )}", hit the "${chalk.bgGreen("Run workflow")}" button. +` + +// Prettier 2.8 +` + 1. Go to ${chalk.green.underline(FOO_LINK)} + 2. Click "${chalk.green( + "Run workflow" + )}" button, type "${chalk.yellow.underline( + version +)}", hit the "${chalk.bgGreen("Run workflow")}" button. +`; + +// Prettier 3.0 +` + 1. Go to ${chalk.green.underline(FOO_LINK)} + 2. Click "${chalk.green( + "Run workflow", + )}" button, type "${chalk.yellow.underline( + version, + )}", hit the "${chalk.bgGreen("Run workflow")}" button. +`; +``` + +#### Add support for "Explicit Resource Management" proposal ([#13752](https://github.com/prettier/prettier/pull/13752) by [@fisker](https://github.com/fisker), [#14862](https://github.com/prettier/prettier/pull/14862) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +The Stage 2 proposal ["Explicit Resource Management"](https://github.com/tc39/proposal-explicit-resource-management/) is now supported via Babel [7.20.0](https://babeljs.io/blog/2022/10/27/7.20.0) and [7.22.0](https://babeljs.io/blog/2023/05/26/7.22.0). + +Also keep in mind our [policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) before using this proposed syntax feature with Prettier. + +<!-- prettier-ignore --> +```js +// Examples +{ + using obj = g(); // block-scoped declaration + const r = obj.next(); +} // calls finally blocks in `g` + +{ + await using obj = g(); // block-scoped declaration + const r = obj.next(); +} // calls finally blocks in `g` +``` + +#### Add support for "Import Reflection" proposal ([#13771](https://github.com/prettier/prettier/pull/13771) by [@fisker](https://github.com/fisker)) + +The Stage 2 proposal ["Import Reflection"](https://github.com/tc39/proposal-import-reflection) is now supported via Babel 7.20.0. Also keep in mind our [policy on non-standardized syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) before using this proposed syntax feature with Prettier. + +<!-- prettier-ignore --> +```js +// Examples +import module x from "<specifier>"; +``` + +#### Fix inconsistent between array/tuple and object/record ([#14065](https://github.com/prettier/prettier/pull/14065) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +foo.a().b().c([n, o]) +foo.a().b().c(#[n, o]) +foo.a().b().c({n, o}) +foo.a().b().c(#{n, o}) + +// Prettier 2.8 +foo.a().b().c([n, o]); +foo + .a() + .b() + .c(#[n, o]); +foo.a().b().c({ n, o }); +foo + .a() + .b() + .c(#{ n, o }); + +// Prettier 3.0 +foo.a().b().c([n, o]); +foo.a().b().c(#[n, o]); +foo.a().b().c({ n, o }); +foo.a().b().c(#{ n, o }); +``` + +#### Fix cursor tracking inside JSX Text ([#14163](https://github.com/prettier/prettier/pull/14163) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```js +// Prettier 2.8 +formatWithCursor( + ["<>a", " <div>hi</div>", "</>"].join("\n"), + { cursorOffset: 3, parser: "babel" } +).cursorOffset; +// -> 2 + +// Prettier 3.0 +(await formatWithCursor( + ["<>a", " <div>hi</div>", "</>"].join("\n"), + { cursorOffset: 3, parser: "babel" } +)).cursorOffset; +// -> 6 +``` + +#### Avoid unnecessarily indenting nested `await` expressions ([#14192](https://github.com/prettier/prettier/pull/14192) by [@thorn0](https://github.com/thorn0)) + +A refinement of [this change in v2.3](https://prettier.io/blog/2021/05/09/2.3.0.html#improve-formatting-for-nested-await-expressions-in-heads-of-member-and-call-expressions-10342httpsgithubcomprettierprettierpull10342-by-thorn0httpsgithubcomthorn0). Sometimes there is no need to force indentation of nested `await` expressions. + +<!-- prettier-ignore --> +```jsx +// Prettier 2.8 +await Promise.all( + ( + await readdir("src") + ).map((path) => { + import(`./${path}`); + }) +); + +// Prettier 3.0 +await Promise.all( + (await readdir("src")).map((path) => { + import(`./${path}`); + }), +); +``` + +#### Support regexp modifiers proposal ([#14391](https://github.com/prettier/prettier/pull/14391) by [@fisker](https://github.com/fisker)) + +See [Regular Expression Pattern Modifiers for ECMAScript](https://github.com/tc39/proposal-regexp-modifiers). + +#### Fix missing parentheses and semicolons around `prettier-ignore`d nodes ([#14406](https://github.com/prettier/prettier/pull/14406) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```js +// Input +async function request(url) { + return ( + // prettier-ignore + await fetch(url) + ).json() +} + +// Prettier 2.8 +async function request(url) { + return ( + // prettier-ignore + await fetch(url).json() + ); +} + +// Prettier 3.0 +async function request(url) { + return ( + // prettier-ignore + (await fetch(url)).json() + ); +} +``` + +<!-- prettier-ignore --> +```js +// Input +foo(); +// prettier-ignore +[bar, baz].forEach(console.log) + +// Prettier 2.8 (--no-semi) +foo() +// prettier-ignore +[bar, baz].forEach(console.log) + +// Prettier 3.0 +foo() +// prettier-ignore +;[bar, baz].forEach(console.log) +``` + +#### Remove unnecessary parentheses around class expression ([#14409](https://github.com/prettier/prettier/pull/14409) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +call( + @dec class {} +); + +// Prettier 2.8 +call( + ( + @dec + class {} + ) +); + +// Prettier 3.0 +call( + @dec + class {}, +); +``` + +#### Add parentheses to head of `ExpressionStatement` instead of the whole statement ([#14599](https://github.com/prettier/prettier/pull/14599) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +const isArray = (object) => ({}).toString.call(foo) === "[object Array]"; + +// Prettier 2.8 +const isArray = (object) => ({}.toString.call(foo) === "[object Array]"); + +// Prettier 3.0 +const isArray = (object) => ({}).toString.call(foo) === "[object Array]"; +``` + +#### Improve consistency between curried and non-curried arrow function ([#14633](https://github.com/prettier/prettier/pull/14633) by [@seiyab](https://github.com/seiyab), [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +Y(() => a ? b : c); +Y(() => () => a ? b : c); + +// Prettier 2.8 +Y(() => (a ? b : c)); +Y(() => () => a ? b : c); + +// Prettier 3.0 +Y(() => (a ? b : c)); +Y(() => () => (a ? b : c)); +``` + +#### Fix empty line check between array elements ([#14736](https://github.com/prettier/prettier/pull/14736) by [@solarized-fox](https://github.com/solarized-fox)) + +<!-- prettier-ignore --> +```jsx +// Input +[ + (a = b), + + c // comment +] + +// Prettier 2.8 +[ + (a = b), + c, // comment +]; + +// Prettier 3.0 +[ + (a = b), + + c, // comment +]; +``` + +#### Support trailing comments in function parameters for all param types ([#14835](https://github.com/prettier/prettier/pull/14835) by [@pieterv](https://github.com/pieterv)) + +Support function parameter trailing comments for `RestElement`, `ArrayPattern` and `ObjectPattern` parameter node types. + +<!-- prettier-ignore --> +```js +// Input +function Foo( + ...bar + // Trailing comment +) {} + +// Prettier 2.8 +function Foo(...bar) // Trailing comment +{} + +// Prettier 3.0 +function Foo( + ...bar + // Trailing comment +) {} +``` + +#### Support Import Attributes ([#14861](https://github.com/prettier/prettier/pull/14861), [#14863](https://github.com/prettier/prettier/pull/14863) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Support [Import Attributes](https://github.com/tc39/proposal-import-attributes) proposal. + +<!-- prettier-ignore --> +```jsx +import json from "./foo.json" with { type: "json" }; +import("./foo.json", { with: { type: "json" } }); +``` + +### TypeScript + +#### Fix leading comments in mapped types with `readonly` ([#13427](https://github.com/prettier/prettier/pull/13427) by [@thorn0](https://github.com/thorn0), [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```tsx +// Input +type Type = { + // comment + readonly [key in Foo]; +}; + +// Prettier 2.8 +type Type = { + readonly // comment + [key in Foo]; +}; + +// Prettier 3.0 +type Type = { + // comment + readonly [key in Foo]; +}; +``` + +#### Consistent dangling comments formatting for tuple types and arrays ([#13608](https://github.com/prettier/prettier/pull/13608) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```tsx +// Input +type Foo = [ + // comment +]; +const bar = [ + // comment +]; + +// Prettier 2.8 +type Foo = [// comment]; +const bar = [ + // comment +]; + +// Prettier 3.0 +type Foo = [ + // comment +]; +const bar = [ + // comment +]; + +``` + +#### Fix union type should be printed in the multi-line variant when there are comments ([#13860](https://github.com/prettier/prettier/pull/13860) by [@PerfectPan](https://github.com/PerfectPan)) + +<!-- prettier-ignore --> +```tsx +// Input +type FooBar = + | Number // this documents the first option + | void // this documents the second option + ; + +// Prettier 2.8 +type FooBar = Number | void; // this documents the first option // this documents the second option + +// Prettier 3.0 +type FooBar = + | Number // this documents the first option + | void; // this documents the second option +``` + +#### Improve comment print and cursor tracking around type annotation ([#14171](https://github.com/prettier/prettier/pull/14171) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```tsx +// Input +let foo /* comment */ : number; + +// Prettier 2.8 +let foo: /* comment */ number; + +// Prettier 3.0 +<Same as input> +``` + +```js +// Prettier 2.8 +prettier.formatWithCursor("let foo: number", { + cursorOffset: 7, + parser: "babel", +}).cursorOffset; + +// -> 9 + +// Prettier 3.0 +( + await prettier.formatWithCursor("let foo: number", { + cursorOffset: 7, + parser: "babel", + }) +).cursorOffset; + +// -> 7 +``` + +#### Break on TypeScript parameter properties ([#14402](https://github.com/prettier/prettier/pull/14402) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```ts +// Input +class MyClass { + constructor( + protected x: number, + private y: string + ) {} +} + +// Prettier 2.8 +class MyClass { + constructor(protected x: number, private y: string) {} +} + +// Prettier 3.0 +class MyClass { + constructor( + protected x: number, + private y: string, + ) {} +} +``` + +#### Fix formatting of union type with single type ([#14654](https://github.com/prettier/prettier/pull/14654) by [@fisker](https://github.com/fisker) and [@auvred](https://github.com/auvred)) + +<!-- prettier-ignore --> +```ts +// Input +type T = + | ( + | { + value: number + } + | { + value: string + } + ) + +// Prettier 2.8 +type T = + | + | { + value: number; + } + | { + value: string; + }; + +// Prettier 3.0 +type T = + | { + value: number; + } + | { + value: string; + }; +``` + +#### Improve new line detection in mapped type ([#14659](https://github.com/prettier/prettier/pull/14659) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```ts +// Input +type A1 = { [A in B]: +T} +type A2 = { + [A in B]:T} + +// Prettier 2.8 +type A1 = { + [A in B]: T; +}; +type A2 = { + [A in B]: T; +}; + +// Prettier 3.0 +type A1 = { [A in B]: T }; +type A2 = { + [A in B]: T; +}; +``` + +#### Line breaking after `extends` in type parameters ([#14672](https://github.com/prettier/prettier/pull/14672), [#14858](https://github.com/prettier/prettier/pull/14858) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```tsx +// Input +export type OuterType2< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLongerLongerLongerOtherType +> = { a: 1 }; + +// Prettier 2.8 +export type OuterType2< + LongerLongerLongerLongerInnerType extends LongerLongerLongerLongerLongerLongerLongerLongerOtherType +> = { a: 1 }; + +// Prettier 3.0 +export type OuterType2< + LongerLongerLongerLongerInnerType extends + LongerLongerLongerLongerLongerLongerLongerLongerOtherType, +> = { a: 1 }; +``` + +#### Fix missing required comma in type parameters ([#14688](https://github.com/prettier/prettier/pull/14688) by [@fisker](https://github.com/fisker), [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Previously, we only print trailing comma when file extension is `.tsx`, turns out `.mts`, `.cts` files requires it to parse too. + +<!-- prettier-ignore --> +```tsx +// Input +export const unsafeCoerce = <T,>(u: unknown): T => u as T + +// Prettier 2.8 +export const unsafeCoerce = <T>(u: unknown): T => u as T; + +// Prettier 3.0 +export const unsafeCoerce = <T,>(u: unknown): T => u as T; +``` + +#### Keep parentheses around `TSInstantiationExpression` followed by a property access ([#14701](https://github.com/prettier/prettier/pull/14701) by [@morsko1](https://github.com/morsko1)) + +<!-- prettier-ignore --> +```ts +// Input +(Array<string>).a; +(Array<string>)?.a; +(Array<string>)[a]; +(Array<string>)?.[a]; + +// Prettier 2.8 +Array<string>.a; +Array<string>?.a; +Array<string>[a]; +Array<string>?.[a]; + +// Prettier 3.0 +(Array<string>).a; +(Array<string>)?.a; +(Array<string>)[a]; +(Array<string>)?.[a]; +``` + +#### Fix issue with double semicolon caused by `// prettier-ignore` on a call signature line ([#14830](https://github.com/prettier/prettier/pull/14830) by [@ot07](https://github.com/ot07)) + +<!-- prettier-ignore --> +```ts +// Input +type Foo = { + (): void; // prettier-ignore + second: string; +}; + +// Prettier 2.8 +type Foo = { + (): void;; // prettier-ignore + second: string; +}; + +// Prettier 3.0 +type Foo = { + (): void; // prettier-ignore + second: string; +}; +``` + +### Flow + +#### An object type in a `declare function` signature now breaks before the return type ([#13396](https://github.com/prettier/prettier/pull/13396) by [@thorn0](https://github.com/thorn0)) + +This behavior has been unified with how TypeScript is formatted. + +<!-- prettier-ignore --> +```jsx +// Input +declare function bla (props: { a: boolean, b: string, c: number }): Promise<Array<foo>> + +// Prettier 2.8 +declare function bla(props: { a: boolean, b: string, c: number }): Promise< + Array<foo> +>; + +// Prettier 3.0 +declare function bla(props: { + a: boolean; + b: string; + c: number; +}): Promise<Array<foo>>; +``` + +#### Support conditional type and infer type ([#14573](https://github.com/prettier/prettier/pull/14573) by [@SamChou19815](https://github.com/SamChou19815)) + +<!-- prettier-ignore --> +```jsx +// Input +type TestReturnType<T extends (...args: any[]) => any> = T extends (...args: any[]) => infer R ? R : any; + +// Prettier 2.8 +// Does not parse + +// Prettier 3.0 +type TestReturnType<T extends (...args: any[]) => any> = T extends ( + ...args: any[] +) => infer R + ? R + : any; +``` + +#### Support Mapped Types and keyof ([#14619](https://github.com/prettier/prettier/pull/14619) by [@jbrown215](https://github.com/jbrown215)) + +```jsx +// Input +type Mapped = {[key in keyof O]:number}; + +// Prettier 2.8 +// Does not parse + +// Prettier 3.0 +type Mapped = { [key in keyof O]: number }; +``` + +#### Support type guards ([#14767](https://github.com/prettier/prettier/pull/14767) by [@panagosg7](https://github.com/panagosg7)) + +<!-- prettier-ignore --> +```jsx +// Input +function isString (x: mixed): x is string { return typeof x === "string"; } + +// Prettier 2.8 +// Does not parse + +// Prettier 3.0 +function isString(x: mixed): x is string { + return typeof x === 'string'; +} +``` + +### CSS + +#### Improve custom properties format ([#9209](https://github.com/prettier/prettier/pull/9209) by [@fisker](https://github.com/fisker)) + +Thanks to [`PostCSS 8.0`](https://github.com/postcss/postcss/releases/tag/8.0.0), we can handle these edge cases on custom properties. + +<!-- prettier-ignore --> +```css +/* Input */ +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a":1}}, [4]]; + --javascript: function(rule) { console.log(rule) }; +} + +@supports (--element(".minwidth", { "minWidth": 300 })) { + [--self] { + background: greenyellow; + } +} + +/* Prettier 2.8 */ +SyntaxError: (postcss) CssSyntaxError Missed semicolon (3:20) + 1 | :root { + 2 | --empty: ; +> 3 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + 4 | --javascript: function(rule) { console.log(rule) }; + 5 | } + 6 | + +/* Prettier 3.0 */ +:root { + --empty: ; + --JSON: [1, "2", {"three": {"a": 1}}, [4]]; + --javascript: function(rule) {console.log(rule)}; +} + +@supports (--element(".minwidth", {"minWidth": 300})) { + [--self] { + background: greenyellow; + } +} +``` + +#### Keep trailing-comma for `var` function ([#13402](https://github.com/prettier/prettier/pull/13402) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```css +/* Input */ +.foo { + --bar: var(--baz,); +} + +/* Prettier 2.8 */ +.foo { + --bar: var(--baz); +} + +/* Prettier 3.0 */ +.foo { + --bar: var(--baz,); +} +``` + +#### Fix line break in CSS declaration with comma ([#14208](https://github.com/prettier/prettier/pull/14208) by [@mvorisek](https://github.com/mvorisek)) + +<!-- prettier-ignore --> +```css +// Input +.myclass { + box-shadow: + inset 0 0 10px #555, + 0 0 20px black; +} + +// Prettier 2.8 +.myclass { + box-shadow: inset 0 0 10px #555, 0 0 20px black; +} + +// Prettier 3.0 +.myclass { + box-shadow: + inset 0 0 10px #555, + 0 0 20px black; +} +``` + +#### Fix url contains comma ([#14476](https://github.com/prettier/prettier/pull/14476) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```css +/* Input */ +@font-face { + src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); +} + +/* Prettier 2.8 */ +@font-face { + src: url(RobotoFlex-VariableFont_GRADXTRAYOPQYTASYTDEYTFIYTLCYTUCopszslntwdthwght.ttf); +} + +/* Prettier 3.0 */ +@font-face { + src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf); +} +``` + +### SCSS + +#### Fix formatting string value that includes escape `\` ([#13487](https://github.com/prettier/prettier/pull/13487) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```scss +/* Input */ +$description: "Lorem ipsum dolor sit \"amet\", consectetur adipiscing elit, " + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +/* Prettier 2.8 */ +$description: 'Lorem ipsum dolor sit "amet", consectetur adipiscing elit, '+ "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +/* Prettier 3.0 */ +$description: 'Lorem ipsum dolor sit "amet", consectetur adipiscing elit, ' + + "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; + +``` + +### Less + +#### Fix interpolation parse error ([#11343](https://github.com/prettier/prettier/pull/11343) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```less +// Input +@{selector}-title{ @{prop}-size: @{color} } + +// Prettier 2.8 +SyntaxError: CssSyntaxError: Unknown word (1:20) +> 1 | @{selector}-title{ @{prop}-size: @{color} } + +// Prettier 3.0 +@{selector}-title { + @{prop}-size: @{color}; +} +``` + +#### Keep inline JavaScript code as it is ([#14109](https://github.com/prettier/prettier/pull/14109) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```less +// Input +.calcPxMixin() { + @functions: ~`(function() { + const designWidth = 3840 + const actualWidth = 5760 + this.calcPx = function(_) { + return _ * actualWidth / designWidth + 'px' + } + })()`; +} + +// Prettier 2.8 +.calcPxMixin() { + @functions: ~`( + function() {const designWidth = 3840 const actualWidth = 5760 this.calcPx = + function(_) {return _ * actualWidth / designWidth + "px"}} + ) + () `; +} + +// Prettier 3.0 +<Same as input> +``` + +### HTML + +#### Print HTML5 `doctype` in lowercase ([#7391](https://github.com/prettier/prettier/pull/7391) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<!DocType html> +<html><head></head><body></body></html> + +<!-- Prettier 2.8 --> +<!DOCTYPE html> +<html> + <head></head> + <body></body> +</html> + +<!-- Prettier 3.0 --> +<!doctype html> +<html> + <head></head> + <body></body> +</html> +``` + +#### Update angular-html-parser ([#13578](https://github.com/prettier/prettier/pull/13578) by [@thorn0](https://github.com/thorn0)) + +Prettier's fork of Angular's HTML parser was synced with the upstream. + +#### Format `<script>` inside SVG ([#14400](https://github.com/prettier/prettier/pull/14400) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> +<script> +document.addEventListener( +'DOMContentLoaded', () => { + const element = document.getElementById('foo') + if (element) { +element.fillStyle = 'currentColor' +} +}); +</script> +</svg> + +<!-- Prettier 2.8 --> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener( 'DOMContentLoaded', () => { const element = + document.getElementById('foo') if (element) { element.fillStyle = + 'currentColor' } }); + </script> +</svg> + +<!-- Prettier 3.0 --> +<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> + <script> + document.addEventListener("DOMContentLoaded", () => { + const element = document.getElementById("foo"); + if (element) { + element.fillStyle = "currentColor"; + } + }); + </script> +</svg> +``` + +#### Recognize `<search>` element ([#14615](https://github.com/prettier/prettier/pull/14615) by [@fisker](https://github.com/fisker)) + +HTML spec added [`<search>` element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element). + +<!-- prettier-ignore --> +```html +<!-- Input --> +<SEARCH title="Website"> + ... +</SEARCH> + +<!-- Prettier 2.8 --> +<SEARCH title="Website"> ... </SEARCH> + +<!-- Prettier 3.0 --> +<search title="Website">...</search> +``` + +### Vue + +#### Ignore `htmlWhitespaceSensitivity` when formatting Vue SFC root blocks ([#14401](https://github.com/prettier/prettier/pull/14401) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<docs lang=unknown></docs><docs lang=unknown></docs><!-- display: inline --><docs lang=unknown></docs><docs lang=unknown style="display: inline"></docs> + +<!-- Prettier 2.8 (--html-whitespace-sensitivity=strict) --> +<docs lang="unknown"></docs>><docs lang="unknown"></docs +><!-- display: inline --><docs lang="unknown"></docs +>><docs lang="unknown" style="display: inline"></docs> + +<!-- Prettier 3.0 --> +<docs lang="unknown"></docs> +<docs lang="unknown"></docs> +<!-- display: inline --> +<docs lang="unknown"></docs> +<docs lang="unknown" style="display: inline"></docs> +``` + +#### Format TypeScript expression in attribute bindings ([#14506](https://github.com/prettier/prettier/pull/14506) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<script lang="ts"></script> +<template> + <comp :foo=" (a:string)=>1"/> +</template> + +<!-- Prettier 2.8 --> +<script lang="ts"></script> +<template> + <comp :foo=" (a:string)=>1" /> +</template> + +<!-- Prettier 3.0 --> +<script lang="ts"></script> +<template> + <comp :foo="(a: string) => 1" /> +</template> +``` + +#### Fix Vue filter detection ([#14542](https://github.com/prettier/prettier/pull/14542) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<template> + <div> + {{ + fn( + bitwise | or | operator | a_long_long_long_long_long_long_long_long_long_long_variable + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> + +<!-- Prettier 2.8 --> +<template> + <div> + {{ + fn( + bitwise + | or + | operator + | a_long_long_long_long_long_long_long_long_long_long_variable + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> + +<!-- Prettier 3.0 --> +<template> + <div> + {{ + fn( + bitwise | + or | + operator | + a_long_long_long_long_long_long_long_long_long_long_variable, + ) + | filter1 + | filter2 + | filter3 + | filter4 + }} + </div> +</template> +``` + +#### Avoid unnecessary leading semicolon ([#14557](https://github.com/prettier/prettier/pull/14557) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<template> + <div @click="[foo, bar].forEach(fn => void fn())"></div> +</template> + +<!-- Prettier 2.8 (With `--no-semi` option) --> +<template> + <div @click=";[foo, bar].forEach((fn) => void fn())"></div> +</template> + +<!-- Prettier 3.0 --> +<template> + <div @click="[foo, bar].forEach((fn) => void fn())"></div> +</template> +``` + +#### Format TS expressions when any script tag has `lang="ts"` ([#14587](https://github.com/prettier/prettier/pull/14587) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<script></script> +<script setup lang="ts"></script> +<template> + {{ (x as number).toFixed(2) }} +</template> + +<!-- Prettier 2.8 --> +<script></script> +<script setup lang="ts"></script> +<template> + {{ (x as number).toFixed(2) }} +</template> + +<!-- Prettier 3.0 --> +<script></script> +<script setup lang="ts"></script> +<template> + {{ (x as number).toFixed(2) }} +</template> +``` + +### Angular + +#### Update `@angular/compiler` to v14 ([#13609](https://github.com/prettier/prettier/pull/13609) by [@fisker](https://github.com/fisker)) + +- Support shorthand object +- [Drop support for quote expressions](https://github.com/angular/angular/pull/44915) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<div [input]="{a, b : 2 }"></div> + +<!-- Prettier 2.8 --> +Error: Cannot find front char /:/ from index 0 in "{a, b : 2 }" + +<!-- Prettier 3.0 --> +<div [input]="{ a, b: 2 }"></div> +``` + +<!-- prettier-ignore --> +```html +<!-- Input --> +<a [href]="http://google.com">Click me</a> + +<!-- Prettier 2.8 --> +<a [href]="http: //google.com">Click me</a> + +<!-- Prettier 3.0 --> +<a [href]="http://google.com">Click me</a> +``` + +#### Fix parentheses with nullish coalescing operator ([#14216](https://github.com/prettier/prettier/pull/14216) by [@thron0](https://github.com/thron0)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<img [src]="(x && y) ?? z" /> + +<!-- Prettier 2.8 --> +<img [src]="x && y ?? z" /> + +<!-- Prettier 3.0 --> +<img [src]="(x && y) ?? z" /> +``` + +#### Support computed optional chaining ([#14658](https://github.com/prettier/prettier/pull/14658) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<img [src]=" a?.[0]" /> + +<!-- Prettier 2.8 --> +<img [src]=" a?.[0]" /> + +<!-- Prettier 3.0 --> +<img [src]="a?.[0]" /> +``` + +#### Remove space after pipe name ([#14961](https://github.com/prettier/prettier/pull/14961) by [@waterplea](https://github.com/waterplea)) + +We introduced [a new format for pipe in Prettier 2.8](https://prettier.io/blog/2022/11/23/2.8.0.html#insert-spaces-in-pipe-13100httpsgithubcomprettierprettierpull13100-by-sosukesuzukihttpsgithubcomsosukesuzuki), but this was not accepted by the community. + +Therefore, we are introducing a new format that reflects community input. + +For more information on the discussion, please see https://github.com/prettier/prettier/issues/13887. + +<!-- prettier-ignore --> +```html +<!-- Input --> +<my-component + [value]="value | transform: arg1 : arg2 | format: arg3 : arg4" +></my-component> + +<!-- Prettier 2.8 --> +<my-component + [value]="value | transform : arg1 : arg2 | format : arg3 : arg4" +></my-component> + +<!-- Prettier 3.0 --> +<my-component + [value]="value | transform: arg1 : arg2 | format: arg3 : arg4" +></my-component> +``` + +### Markdown + +#### Preserve multiple spaces in inline code ([#13590](https://github.com/prettier/prettier/pull/13590) by [@kachkaev](https://github.com/kachkaev) and [@thorn0](https://github.com/thorn0)) + +Previously, multiple whitespace characters in inline code were collapsed into a single space. This is no longer happening to match [CommonMark spec](https://spec.commonmark.org/0.30/#backtick-string). + +<!-- prettier-ignore --> +```markdown +<!-- Input --> +` foo bar baz ` + +<!-- Prettier 2.8 --> +` foo bar baz ` + +<!-- Prettier 3.0 --> +` foo bar baz ` +``` + +### API + +#### Add `.d.ts` files ([#14212](https://github.com/prettier/prettier/pull/14212) by [@sosukesuzuki](https://github.com/sosukesuzuki), [@fisker](https://github.com/fisker)) + +Add type definition files required to use Prettier's JavaScript API from TypeScript. This eliminates the need for users to install `@types/prettier`. + +#### Update `prettier.util` ([#14317](https://github.com/prettier/prettier/pull/14317), [#14320](https://github.com/prettier/prettier/pull/14320) by [@fisker](https://github.com/fisker)) + +- Added `prettier.util.getNextNonSpaceNonCommentCharacter` +- Changed `prettier.util.getNextNonSpaceNonCommentCharacter` + + Signature changed from + + ```ts + function getNextNonSpaceNonCommentCharacterIndex<N>( + text: string, + node: N, + locEnd: (node: N) => number, + ): number | false; + ``` + + to + + ```ts + function getNextNonSpaceNonCommentCharacterIndex( + text: string, + startIndex: number, + ): number | false; + ``` + +- Changed `prettier.util.isPreviousLineEmpty` + + Signature changed from + + ```ts + function isPreviousLineEmpty<N>( + text: string, + node: N, + locStart: (node: N) => number, + ): boolean; + ``` + + to + + ```ts + function isPreviousLineEmpty(text: string, startIndex: number): boolean; + ``` + +- Changed `prettier.util.isNextLineEmpty` + + Signature changed from + + ```ts + function isNextLineEmpty<N>( + text: string, + node: N, + locEnd: (node: N) => number, + ): boolean; + ``` + + to + + ```ts + function isNextLineEmpty(text: string, startIndex: number): boolean; + ``` + +- Deprecated `prettier.util.isNextLineEmptyAfterIndex` + + Use `prettier.util.isNextLineEmpty` instead. + +See the [documentation](https://prettier.io/docs/plugins#utility-functions) for details. + +#### Fix plugin loading cache ([#14576](https://github.com/prettier/prettier/pull/14576) by [@fisker](https://github.com/fisker)) + +Plugin instances are incorrectly memoized, check this [issue](https://github.com/prettier/prettier/issues/13235) for details. + +#### Stop formatting unknown code with `babel` parser ([#14718](https://github.com/prettier/prettier/pull/14718) by [@fisker](https://github.com/fisker)) + +```console +await prettier.format("foo") + +// Prettier 2.8 +No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred. +'foo;\n' + +// Prettier 3.0 +UndefinedParserError: No parser and no file path given, couldn't infer a parser. +``` + +### CLI + +#### Updated failure message to be more informative ([#11369](https://github.com/prettier/prettier/pull/11369) by [@webark](https://github.com/webark)) + +Updated the "Forgot to run Prettier?" to "Run Prettier with --write to fix." + +This keeps the same spirit of the message, but is less likely to be +misinterpreted as it's a more formal message rather than being +somewhat familial. + +#### Change `--loglevel` to `--log-level` ([#13204](https://github.com/prettier/prettier/pull/13204) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```sh +# Prettier 2.8 +prettier test.js --loglevel=debug + +# Prettier 3.0 +prettier test.js --log-level=debug +``` + +#### Accept multiple `--ignore-path` ([#14332](https://github.com/prettier/prettier/pull/14332) by [@fisker](https://github.com/fisker)) + +You can now pass multiple `--ignore-path`. + +```console +prettier . --ignore-path=.prettier-ignore --ignore-path=.eslintignore +``` + +#### Display posix style paths on Windows ([#14333](https://github.com/prettier/prettier/pull/14333) by [@fisker](https://github.com/fisker)) + +Align with other tools like ESLint and Stylelint. + +<!-- prettier-ignore --> +```jsx +// Prettier 2.8 +Checking formatting... +[warn] src\utils\create-get-visitor-keys.js +[warn] src\utils\unexpected-node-error.js +[warn] Code style issues found in 2 files. Forgot to run Prettier? + +// Prettier 3.0 +Checking formatting... +[warn] src/utils/create-get-visitor-keys.js +[warn] src/utils/unexpected-node-error.js +[warn] Code style issues found in 2 files. Forgot to run Prettier? +``` + +#### Don’t expand globs via symbolic links ([#14627](https://github.com/prettier/prettier/pull/14627) by [@andersk](https://github.com/andersk)) + +Prettier no longer follows symbolic links while expanding command line +arguments. This avoids problems in many scenarios such as symlinks +outside the source tree, symlinks to ignored files, and cycles of +symlinks. + +#### Print line breaking after file path with errors ([#14788](https://github.com/prettier/prettier/pull/14788) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Previously, only the `--write` option printed a newline before the error, but other options and no options print a newline as well. + +<!-- prettier-ignore --> +```sh +# Input +prettier ./test.js + +# Prettier 2.8 +test.js[error] test.js: SyntaxError: Unexpected token: ')' (1:6) +[error] > 1 | 1 (+-) hoge +[error] | ^ + +# Prettier 3.0 +test.js +[error] test.js: SyntaxError: Unexpected token: ')' (1:6) +[error] > 1 | 1 (+-) hoge +[error] | +``` + +#### Clear filename before print ignored file code to screen ([#14794](https://github.com/prettier/prettier/pull/14794) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```sh +# Input +echo test.js > .prettierignore +echo code > test.js +prettier ./test.js + +# Prettier 2.8 +test.jscode + +# Prettier 3.0 +code +``` diff --git a/website/blog/2023-11-13-3.1.0.md b/website/blog/2023-11-13-3.1.0.md new file mode 100644 index 000000000000..2749ce46effd --- /dev/null +++ b/website/blog/2023-11-13-3.1.0.md @@ -0,0 +1,683 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.1: New experimental ternaries formatting and Angular control flow syntax!" +--- + +This release adds indentation back to nested ternaries along with a new `--experimental-ternaries` flag to try a more novel "curious ternary" format that scales better to deeply nested conditionals. We are keen for [your feedback](https://forms.gle/vwEuboCobTVhEkt66) on the experimental format before it rolls out as the default behavior later this year! + +We have also added support for the control flow syntax in Angular v17. For details on the syntax, please read [the official Angular release post](https://blog.angular.io/introducing-angular-v17-4d7033312e4b). + +<!-- truncate --> + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +## Highlights + +### JavaScript + +#### Add indentation back to nested ternaries ([#9559](https://github.com/prettier/prettier/pull/9559) by [@rattrayalex](https://github.com/rattrayalex)) + +<!-- prettier-ignore --> +```js +// Input +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + + +// Prettier 3.0 +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); + +// Prettier 3.1 +const message = + i % 3 === 0 && i % 5 === 0 + ? "fizzbuzz" + : i % 3 === 0 + ? "fizz" + : i % 5 === 0 + ? "buzz" + : String(i); +``` + +#### New Experimental Ternary Formatting: A Curious Case of the Ternaries ([#13183](https://github.com/prettier/prettier/pull/13183) by [@rattrayalex](https://github.com/rattrayalex)) + +This is implemented behind a `--experimental-ternaries` flag. + +We move the `?` in multiline ternaries to the end of the first line instead of the start of the second, along with several related changes. + +While it might look weird at first, beta-testing shows that after a few hours of use, developers find it makes nested ternaries much more readable and useful. + +This PR resolves one of our [a highly-upvoted issue](https://github.com/prettier/prettier/issues/5814) without the problems its proposed solution would reintroduce. + +Please see [A curious case of the ternaries](https://prettier.io/blog/2023/11/13/curious-ternaries) for more details. + +##### Example + +<!-- prettier-ignore --> +```js +// "Questioning" ternaries for simple ternaries: +const content = + children && !isEmptyChildren(children) ? + render(children) + : renderDefaultChildren(); + +// "Case-style" ternaries for chained ternaries: +const message = + i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" + : i % 3 === 0 ? "fizz" + : i % 5 === 0 ? "buzz" + : String(i); + +// Smoothly transitions between "case-style" and "questioning" when things get complicated: +const reactRouterResult = + children && !isEmptyChildren(children) ? children + : props.match ? + component ? React.createElement(component, props) + : render ? render(props) + : null + : null +``` + +#### Support new syntaxes supported by Babel 7.23.0 ([#15485](https://github.com/prettier/prettier/pull/15485), [#15486](https://github.com/prettier/prettier/pull/15486), [#15487](https://github.com/prettier/prettier/pull/15487), [#15488](https://github.com/prettier/prettier/pull/15488) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +We support new JS syntax supported by [Babel 7.23.0](https://babeljs.io/blog/2023/09/25/7.23.0)! + +##### Source Phase Imports + +Please see https://github.com/tc39/proposal-source-phase-imports for more details. + +```js +import source x from "mod"; +``` + +##### Deferred Import Evaluation + +Please see https://github.com/tc39/proposal-defer-import-eval for more details. + +```js +import defer * as ns from "mod"; +``` + +##### Optional Chaining Assignments + +Please see https://github.com/tc39/proposal-optional-chaining-assignment for more details. + +```js +maybeObj?.prop1 = value; +``` + +### Angular + +#### Support Angular control flow ([#15606](https://github.com/prettier/prettier/pull/15606) by [@DingWeizhe](https://github.com/DingWeizhe), [@fisker](https://github.com/fisker)) + +Added support for built-in control flow in Angular 17. Please give us feedback if you find any bugs. + +For more details about control flow, please check this article on the official blog. + +https://blog.angular.io/introducing-angular-v17-4d7033312e4b + +## Other Changes + +### JavaScript + +#### Fix comment between parentheses and function body ([#15326](https://github.com/prettier/prettier/pull/15326) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +function function_declaration() +// this is a function +{ + return 42 +} + +(function function_expression() +// this is a function +{ + return 42 +})(); + +// Prettier 3.0 +function function_declaration() { + // this is a function + return 42; +} + +(function function_expression() // this is a function +{ + return 42; +})(); + +// Prettier 3.1 +function function_declaration() { + // this is a function + return 42; +} + +(function function_expression() { + // this is a function + return 42; +})(); +``` + +<!-- prettier-ignore --> +```jsx +// Input +function function_declaration() +// this is a function +{ + return 42 +} + +export default function() +// this is a function +{ + return 42 +} + +// Prettier 3.0 +TypeError: Cannot read properties of null (reading 'range') + +// Prettier 3.1 +function function_declaration() { + // this is a function + return 42; +} + +export default function () { + // this is a function + return 42; +} +``` + +#### Disambiguate unary expressions on left hand side of instanceof and in ([#15468](https://github.com/prettier/prettier/pull/15468) by [@lucacasonato](https://github.com/lucacasonato)) + +Parentheses are now added around unary expression on the left hand side of +`instanceof` and `in` expressions, to disambiguate the unary on the left hand +side with a unary applying to the entire binary expression. + +This helps catch a common mistake where a user intends to write `!("x" in y)` +but instead writes `!"x" in y`, which is really parsed as the nonsensical +`(!"x") in y`. + +<!-- prettier-ignore --> +```js +// Input +!"x" in y; +!("x" in y); + +// Prettier 3.0 +!"x" in y; +!("x" in y); + +// Prettier 3.1 +(!"x") in y; +!("x" in y); +``` + +#### Fix name case of selectors in styled components interpolation ([#15472](https://github.com/prettier/prettier/pull/15472) by [@lucasols](https://github.com/lucasols)) + +<!-- prettier-ignore --> +```js +// Input +const StyledComponent = styled.div` + margin-right: -4px; + + ${Container}.isExpanded & { + transform: rotate(-180deg); + } +`; + +const StyledComponent2 = styled.div` + margin-right: -4px; + + ${abc}.camelCase + ${def}.camelCase & { + transform: rotate(-180deg); + } +`; + +// Prettier 3.0 +const StyledComponent = styled.div` + margin-right: -4px; + + ${Container}.isexpanded & { + transform: rotate(-180deg); + } +`; + +const StyledComponent2 = styled.div` + margin-right: -4px; + + ${abc}.camelcase + ${def}.camelCase & { + transform: rotate(-180deg); + } +`; + +// Prettier 3.1 -- same as input +``` + +#### Consistently format strings containing escapes ([#15525](https://github.com/prettier/prettier/pull/15525) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```jsx +// Input +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg("That\'s all we know"); + +// Prettier 3.0 +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = goog.getMsg( + "That's all we know", +); + +// Prettier 3.1 +export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = + goog.getMsg("That's all we know"); + +export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = + goog.getMsg("That's all we know"); +``` + +#### Improve formatting for assignment its left can break ([#15547](https://github.com/prettier/prettier/pull/15547) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```jsx +// Input +params["redirectTo"] = + `${window.location.pathname}${window.location.search}${window.location.hash}`; + +// Prettier 3.0 +params[ + "redirectTo" +] = `${window.location.pathname}${window.location.search}${window.location.hash}`; + +// Prettier 3.1 +params["redirectTo"] = + `${window.location.pathname}${window.location.search}${window.location.hash}`; + +``` + +### TypeScript + +#### Fix unstable comment after the last parameter property ([#15324](https://github.com/prettier/prettier/pull/15324) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```tsx +// Input +class Class { + constructor( + private readonly paramProp: Type, + // comment + ) { + } +} + +// Prettier 3.0 +class Class { + constructor(private readonly paramProp: Type) // comment + {} +} + +// Prettier 3.0 (Second format) +class Class { + constructor( + private readonly paramProp: Type, // comment + ) {} +} + +// Prettier 3.1 +class Class { + constructor( + private readonly paramProp: Type, + // comment + ) {} +} +``` + +#### Support embedded formatting in template literals annotated with `as const` ([#15408](https://github.com/prettier/prettier/pull/15408) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```tsx +// Input +const GQL_QUERY_WITH_CONST = /* GraphQL */ ` + query S { shop } +` as const; + +// Prettier 3.0 +const GQL_QUERY_WITH_CONST = /* GraphQL */ ` + query S { shop } +` as const; + +// Prettier 3.1 +const GQL_QUERY_WITH_CONST = /* GraphQL */ ` + query S { + shop + } +` as const; +``` + +#### Fix printing comment for the last operand of union types ([#15409](https://github.com/prettier/prettier/pull/15409) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```tsx +// Input +type Foo1 = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +)[]; // Final comment1 +type Foo2 = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +) & Bar; // Final comment2 + +// Prettier 3.0 +type Foo1 = ( + | "thing1" // Comment1 + | "thing2" +)[]; // Comment2 // Final comment1 +type Foo2 = ( + | "thing1" // Comment1 + | "thing2" +) & // Comment2 + Bar; // Final comment2 + +// Prettier 3.1 +type Foo1 = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +)[]; // Final comment1 +type Foo2 = ( + | "thing1" // Comment1 + | "thing2" // Comment2 +) & + Bar; // Final comment2 +``` + +#### Keep required parenthesis around some specific keyword like identifiers in expression statement of satisfies / as expression ([#15514](https://github.com/prettier/prettier/pull/15514) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```ts +// Input +(type) satisfies never; + + +// Prettier 3.0 +type satisfies never; + + +// Prettier 3.1 +(type) satisfies never; +``` + +### Flow + +#### Support `as` and `satisfies` expressions for Flow ([#15130](https://github.com/prettier/prettier/pull/15130) by [@gkz](https://github.com/gkz)) + +<!-- prettier-ignore --> +```jsx +// Input +const x = y as T; + +// Prettier 3.0 +// <error: unsupported> + +// Prettier 3.1 +const x = y as T; +``` + +#### Support type arguments on jsx opening elements for Flow ([#15429](https://github.com/prettier/prettier/pull/15429) by [@SamChou19815](https://github.com/SamChou19815)) + +<!-- prettier-ignore --> +```jsx +// Input +<Foo<bar> />; + +// Prettier 3.0 +<Foo />; + +// Prettier 3.1 +<Foo<bar> />; +``` + +#### Support type arguments after `typeof` ([#15466](https://github.com/prettier/prettier/pull/15466) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Supports type arguments after `typeof` syntax supported since [Flow v0.127.0](https://github.com/facebook/flow/blob/HEAD/Changelog.md#02170): + +<!-- prettier-ignore --> +```jsx +type Foo = typeof MyGenericClass<string, number>; +``` + +### SCSS + +#### Do not split call of scss function with leading dash ([#15370](https://github.com/prettier/prettier/pull/15370) by [@auvred](https://github.com/auvred)) + +<!-- prettier-ignore --> +```scss +/* Input */ +div { + width: -double(-double(3)); +} + +/* Prettier 3.0 */ +div { + width: -double(- double(3)); +} + +/* Prettier 3.1 */ +div { + width: -double(-double(3)); +} +``` + +### HTML + +#### Fix formatting of `menu` and `marquee` elements ([#15334](https://github.com/prettier/prettier/pull/15334) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<menu><li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li></menu> +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border:solid"><marquee behavior="alternate"> This text will bounce </marquee></marquee> + +<!-- Prettier 3.0 --> +<menu + ><li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li></menu +> +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border: solid" + ><marquee behavior="alternate"> This text will bounce </marquee></marquee +> + +<!-- Prettier 3.1 --> +<menu> + <li><button onclick="copy()">Copy</button></li> + <li><button onclick="cut()">Cut</button></li> + <li><button onclick="paste()">Paste</button></li> +</menu> +<marquee + direction="down" + width="250" + height="200" + behavior="alternate" + style="border: solid" +> + <marquee behavior="alternate">This text will bounce</marquee> +</marquee> +``` + +### Markdown + +#### Encoding `<` and `>` in markdown urls ([#15400](https://github.com/prettier/prettier/pull/15400) by [@vivekjoshi556](https://github.com/vivekjoshi556)) + +<!-- prettier-ignore --> +```md +<!-- Input --> +[link](https://www.google.fr/()foo->bar) + +<!-- Prettier 3.0 --> +[link](<https://www.google.fr/()foo->bar>) + +<!-- Prettier 3.1 --> +[link](<https://www.google.fr/()foo-%3Ebar>) +``` + +<!-- prettier-ignore --> +```md +<!-- Input --> +![link](<https://www.google.fr/()foo->bar>) + +<!-- Prettier 3.0 --> +![link](<https://www.google.fr/()foo->bar>) + +<!-- Prettier 3.1 --> +![link](<https://www.google.fr/()foo-%3Ebar>) +``` + +#### Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK ([#15411](https://github.com/prettier/prettier/pull/15411) by [@tats-u](https://github.com/tats-u)) + +This PR fixes [#15410](https://github.com/prettier/prettier/issues/15410). + +Japanese (semi-)voiced kana characters can be split into two code points. For example, the following hiragana character /ka/ can be represented as: + +が (U+304C) → か (U+304B) + ゙ (U+3099) → が (U+304C U+3099) + +Most users do not use or meet expressions like this except for file paths in macOS. However, there are some characters that can only be represented in this way. Some Japanese text that have to tell /ŋa̠/ (there are not a few Japanese that do not use it these days though) from the common /ga/ use a expression ["か゚" (U+304B U+309A)](https://en.wiktionary.org/wiki/%E3%81%8B%E3%82%9A). + +```markdown +nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚ +``` + +The above Markdown is formatted as in Prettier 3.0: + +```markdown +nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け +゚こ゚ +``` + +The semi-voiced sound mark goes to the next line but it is not correct. By this PR, the source Markdown is now formatted as: + +```markdown +nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚ +け゚こ゚ +``` + +The semi-voiced sound mark now keeps attached to the hiragana "け". + +### API + +#### Accept `URL` in `prettier.{resolveConfig,resolveConfigFile,getFileInfo}()` ([#15332](https://github.com/prettier/prettier/pull/15332), [#15354](https://github.com/prettier/prettier/pull/15354), [#15360](https://github.com/prettier/prettier/pull/15360), [#15364](https://github.com/prettier/prettier/pull/15364) by [@fisker](https://github.com/fisker)) + +[`prettier.resolveConfig()`](https://prettier.io/docs/api#prettierresolveconfigfileurlorpath--options), [`prettier.resolveConfigFile()`](https://prettier.io/docs/api#prettierresolveconfigfilefileurlorpath), and [`prettier.getFileInfo()`](https://prettier.io/docs/api#prettiergetfileinfofileurlorpath--options) now accepts an [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string starts with `file://`. + +```js +// `URL` +await prettier.resolveConfig(new URL("./path/to/file", import.meta.url)); +await prettier.resolveConfigFile(new URL("./path/to/file", import.meta.url)); +await prettier.getFileInfo(new URL("./path/to/file", import.meta.url)); +await prettier.getFileInfo("/path/to/file", { + ignorePath: new URL("./.eslintignore", import.meta.url), +}); + +// URL string +await prettier.resolveConfig("file:///path/to/file"); +await prettier.resolveConfigFile("file:///path/to/file"); +await prettier.getFileInfo("file:///path/to/file"); +await prettier.getFileInfo("/path/to/file", { + ignorePath: "file:///path/to/.eslintignore", +}); +``` + +### CLI + +#### Process files only supported by plugins ([#15433](https://github.com/prettier/prettier/pull/15433) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +In Prettier 3.0, when specifying a directory from the CLI, only files with default supported extensions were processed. + +In the following scenario, not just `foo.js` but also `foo.astro` should be formatted: + +``` +# Prettier 3.0 version + +$ ls . +foo.js foo.astro + +$ cat .prettierrc +{ "plugins": ["prettier-plugin-astro"] } + +$ prettier --write . +foo.js 20ms +``` + +With this update, both `foo.js` and `foo.astro` will now be formatted: + +``` +# Prettier 3.1 branch + +$ prettier --write . +foo.js 20ms +foo.astro 32ms +``` + +You can replace `prettier "**/*" --ignore-unknown` with `prettier .` since they are equivalent now. + +#### Show `(unchanged)` keyword for accessibility in CLI `--write` ([#15467](https://github.com/prettier/prettier/pull/15467) by [@ADTC](https://github.com/ADTC)) + +Previously, the only distinction between a changed file and an unchanged file was the grey color of the file name. In the example below, we can't distinguish between `a.js` and `b.js` as the color is missing. This issue is fixed by adding the `(unchanged)` keyword which makes the distinction accessible without color. + +<!-- prettier-ignore --> +```sh +prettier --write . + +# Prettier 3.0 +a.js 0ms +b.js 0ms +c.js 0ms (cached) + +# Prettier 3.1 +a.js 0ms +b.js 0ms (unchanged) +c.js 0ms (unchanged) (cached) +``` + +#### Fix error when formatting file names contains special characters ([#15597](https://github.com/prettier/prettier/pull/15597) by [@fisker](https://github.com/fisker)) + +```sh +prettier "[with-square-brackets].js" --list + +# Prettier 3.0 +[error] Explicitly specified file was ignored due to negative glob patterns: "[with-square-brackets].js". + +# Prettier 3.1 +[with-square-brackets].js +``` diff --git a/website/blog/2023-11-13-curious-ternaries.md b/website/blog/2023-11-13-curious-ternaries.md new file mode 100644 index 000000000000..adf88ed38050 --- /dev/null +++ b/website/blog/2023-11-13-curious-ternaries.md @@ -0,0 +1,128 @@ +--- +authors: "rattrayalex" +title: "A curious case of the ternaries" +--- + +Ternary formatting has always been a challenge, and we're finally addressing it in v3.1.0 with the introduction of a novel formatting style. + +Read on for our journey and the motivation behind this change, along with early developer feedback and an overview of the "curious ternaries" style. + +Please give the `--experimental-ternaries` option a try and let us know what you think! + +_For a quick tl;dr, [see the release post](/blog/2023/11/13/3.1.0)._ + +<!-- truncate --> + +## Introduction + +Formatting nested ternaries nicely in a wide variety of scenarios is a surprisingly tricky challenge. + +Developers have long found them so confusing to read that they end up just refactoring their code to an ugly series of `if`-`else` statements, often with a `let` declaration, an iife, or a separate function entirely. + +According to beta testers, the new formatting style we've developed can take some getting used to, but ultimately allows ternaries to be practically used as a concise form of `if`-`else`-expressions in modern codebases. + +## Historical background + +Prettier's original, naïve approach – just add indentation to each level of a nested ternary – worked fine in simple cases, but obviously doesn't scale to long chains of nested ternaries and [had other problems](https://github.com/prettier/prettier/issues/737). + +So in 2018, we [replaced that with flat ternaries](https://github.com/prettier/prettier/pull/5039), which [seemed](https://github.com/prettier/prettier/pull/4767#issuecomment-401764876) like a good idea at the time, but was [not received well](https://github.com/prettier/prettier/issues/5814) – the issue asking it to be reverted had well over 500 upvotes. + +While we did ultimately [revert back to indented ternaries](https://github.com/prettier/prettier/pull/9559), we wanted to find a better way. + +Over the last few years, we [explored](https://github.com/prettier/prettier/issues/9561) and experimented with many, many possible solutions which would be as readable as indented ternaries in common cases, but also scale to work well in a wider variety of situations. + +## Challenging criteria + +Ideally, we'd find one scheme that would meet our criteria: + +1. In all cases, it should be easy to follow "what's the `if`", "what's the `then`", and "what's the `else`" – and what they map to. +2. The code should fluidly flow from a single ternary, to a chain of 2, to a long chain of simple cases, to something more complex with a few nested conditions. (Most alternatives we explored failed this test). +3. The syntax in JSX, TypeScript conditional expressions (which cannot be expressed with `if`), and normal JS should all look and feel the same. +4. It should scale to nested ternary chains of arbitrary length (imagine a TypeScript conditional type with dozens of alternative cases). + +Indented ternaries clearly [failed (4)](https://github.com/prettier/prettier/pull/9559#issuecomment-720736156), arguably (1), and even (3) – we have almost always printed JSX ternaries in a flat-but-readable format that unfortunately [felt unnatural](https://github.com/prettier/prettier/pull/9552) outside of JSX. + +Many people in the community were excited about a "case-style", drawing inspiration from the `match` syntax from languages like Rust or OCaml, but it did not meet (2) and [other goals](https://github.com/prettier/prettier/issues/9561#goals:~:text=on%20that%20below.-,Goals,-I%27d%20like%20to). + +## A surprising solution + +The good news is that we found a formatting algorithm that met our criteria. The bad news is that it's novel, and thus unfamiliar to most developers. + +In beta testing this feature, we found developers were quite skeptical when they first saw it: + +!["I'm not convinced the new version is simpler to read here."](https://user-images.githubusercontent.com/704302/205551054-122f2fc0-fee3-4254-912a-1b97b5cf0c04.png) + +But then, after using it for a bit, they didn't want to go back: + +!["I'm liking the ternaries! I think it makes sense to have them formatted like this. I also got used to them quite quickly as well. \nI agree with this, it takes a very short time to get used to it."](https://user-images.githubusercontent.com/704302/205550887-b780f6ba-b678-4620-a454-255bd5083096.png) + +Another developer had this to say: + +> My first hour with the rule on, it felt a little odd. But by hour two, I’d used it a few times to solve problems that otherwise would have been ugly refactors to `if` statements. I’m not going back. + +> I used to hate nested ternaries, but I also hate restructuring a nice line of code into `if-else` statements. The new rule adds an understandable, linear `if-else`, `if-else` expression to the language and is much nicer than multiple ternaries as nested branches. + +So we felt we had a winning formula, but we knew it could be a jarring introduction to the community. + +As a result, we decided to put this new formatting behind a temporary `--experimental-ternaries` option for a few months, and in the meantime go ahead and ship what the community has been clamoring for: [indented ternaries](https://github.com/prettier/prettier/pull/9559). + +## Styling Overview + +So what does this new style look like, anyway? + +Here's a quick, contrived example to show the thinking behind "curious" ternaries: + +<!-- prettier-ignore --> +```ts +const animalName = + pet.canBark() ? + pet.isScary() ? + 'wolf' + : 'dog' + : pet.canMeow() ? 'cat' + : 'probably a bunny'; +``` + +1. Every line that ends with a question mark is an **"if"**. + - If you see `foo ?` it's like asking a question about foo – "if foo? then, …". +2. Every line that starts with a `:` is an **"else"**. + - If you see `: foo` that means, "else, foo". + - If you see `: foo ?` that means "else, if foo?". +3. Every line without `:` or `?` is a **"then"**. + - If you just see `foo`, that means, "then foo". + +And here's the code rewritten to demonstrate "case-style" ternaries: + +<!-- prettier-ignore --> +```ts +const animalName = + pet.isScary() ? 'wolf' + : pet.canBark() ? 'dog' + : pet.canMeow() ? 'cat' + : 'probably a bunny'; +``` + +You can see this is a nice concise way to get something approaching `match`-style syntax in JavaScript, with just the humble ternary operator (albeit missing several features). + +Our new formatting is a fluid blend of "curious" ternaries (where the question mark is always at the end of the line), and "case-style" ternaries, where the question mark is in the middle of the line. + +For example: + +<!-- prettier-ignore --> +```ts +const animalName = + pet.canSqueak() ? 'mouse' + : pet.canBark() ? + pet.isScary() ? + 'wolf' + : 'dog' + : pet.canMeow() ? 'cat' + : pet.canSqueak() ? 'mouse' + : 'probably a bunny'; +``` + +## Give us your feedback! + +We hope you like the more readable new default, and we **really** hope you give the new `--experimental-ternaries` option a try for a few weeks and let us know what you think. + +Please give us feedback via Google Forms: https://forms.gle/vwEuboCobTVhEkt66 diff --git a/website/blog/2023-11-27-20k-bounty-was-claimed.md b/website/blog/2023-11-27-20k-bounty-was-claimed.md new file mode 100644 index 000000000000..3133db7470eb --- /dev/null +++ b/website/blog/2023-11-27-20k-bounty-was-claimed.md @@ -0,0 +1,42 @@ +--- +authors: "vjeux" +title: "$20k Bounty was Claimed!" +--- + +Prettier, a JavaScript code formatter, has seen an incredible adoption thanks to its careful handling of the very, very, long tail of ways people can write code. At this point, the formatting logic has been solid and after our work on [ternaries](https://prettier.io/blog/2023/11/13/curious-ternaries) lands, it will be in a happy state. + +This means that we can now focus on the next important aspect: Performance. Prettier has never been fast per se, but fast enough for most use cases. This has always felt unsatisfying so we wanted to do something about it. What better way than a friendly competition. + +On November 9th, we put up a [$10k bounty](https://twitter.com/Vjeux/status/1722733472522142022) for any project written in Rust that would pass 95% of Prettier test suite. Guillermo Rauch, CEO of Vercel, matched it to bring it to $20k and [napi.rs](https://napi.rs) added another $2.5k. The folks at Algora even made an amazing landing page for it. + +[![](https://console.algora.io/prettier/og.png)](https://console.algora.io/challenges/prettier) + +<!-- truncate --> + +## Winner Winner Chicken Dinner + +**I'm so excited to report that the [Biome project](https://biomejs.dev/) claimed the bounty!** It has been so epic to see a dozen people come together to improve compatibility in only a short 3 weeks. You can read their [full report](https://biomejs.dev/blog/biome-wins-prettier-challenge) for the details. + +One question you are probably wondering is why would the Prettier team fund another project!? In practice, Prettier has been the dominant code formatter for JavaScript and as a result of a lack of competition, there has been little incentive to push on performance and fix various edge cases. + +There is now a Prettier-compatible and way faster implementation in Biome that people can switch to. So Prettier has to step up its game! Thankfully Fabio Spampinato got nerd sniped with the challenge and found many extreme inefficiencies in Prettier's CLI by doing proper profiling. He will fix them by the end of the year. + +By matching all the tests, the Biome project also found a lot of [bugs and questionable decisions](https://github.com/biomejs/biome/issues/739) in Prettier that we will be able to improve upon. + +## Money, Money, Money + +I want to start by acknowledging that this bounty and the continued success of Prettier have been possible thanks to various people making significant donations. Companies: Indeed ($20,000), Frontend Masters ($10,850), Sentry ($10,529), Salesforce ($10,025), Airbnb ($8,426), Cybozu ($6,086). Individuals: Shintaro Kaneko ($1,635), Suhail Doshi ($1,000), icchiman ($500), Mariusz Nowak ($270), Benoît Burgener ($270), Jeremy Combs ($270), f_subal ($230). + +You may not be aware but thanks to all those donations, we've been able to [pay two people $1.5k/month](https://prettier.io/blog/2022/01/06/prettier-begins-paying-maintainers) for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! + +With the current budget, we only have 8 months of runway left, so this is a good time to solicit your donations. + +**Consider donating if you or your company are using Prettier and it has been helpful to you: [https://opencollective.com/prettier](https://opencollective.com/prettier)** + +I would also like to give a big shout-out to [Open Collective](https://opencollective.com/prettier). It has been incredible for the project. From a maintainer perspective, it has been amazing as you can sign up without giving any personal information and it acts as a bank. It lets people give and receive money all around the world and handles all the tax documents properly which is a huge deal. + +Prettier raised a total of $110k and redistributed $75k. + +## Conclusion + +While this was a one time bounty, the goal is to give an energy boost to the space of code formatting so that as an ecosystem we can make the best developer experience possible! It's been heartwarming to see so many people coming together and we hope they'll only achieve bigger things from now. diff --git a/website/blog/2023-11-30-cli-deep-dive.md b/website/blog/2023-11-30-cli-deep-dive.md new file mode 100644 index 000000000000..1728ae13fd9b --- /dev/null +++ b/website/blog/2023-11-30-cli-deep-dive.md @@ -0,0 +1,281 @@ +--- +authors: "fabiospampinato" +title: "Prettier's CLI: A Performance Deep Dive" +--- + +Hey, I'm [Fabio](https://twitter.com/fabiospampinato) and I've been contracted by the Prettier team to speed up Prettier's command line interface (CLI). In this post we'll take a look at the optimizations I've discovered, the process that lead to finding them, some exciting numbers comparing the current CLI with the new one, and some guesses about what could be optimized next. + +<!-- truncate --> + +## Installation + +The new work-in-progress CLI for Prettier has just been [released](https://github.com/prettier/prettier-cli), and you can install it now: + +```sh +npm install prettier@next +``` + +It should be largely backwards compatible: + +```sh +prettier . --check # Like before, but faster +``` + +If you find any issues you can temporarily use the old CLI using an environment variable: + +```sh +PRETTIER_LEGACY_CLI=1 prettier . --check +``` + +You can also try it via `npx`, though `npx` itself is pretty slow: + +```sh +npx prettier@next . --check +``` + +The goal is to make it close to ~100% backwards compatible, and then just ship it in a future stable release of the `prettier` package, replacing the current CLI. + +## Overview + +![](./assets/prettier-architecture.png) + +Prettier's CLI works roughly like in the diagram above: + +1. There's some action we want to execute on files, for example checking if they are formatted properly. +2. We need to actually find all the files to execute this action on. +3. We need to resolve `.gitignore` and `.prettierignore` files, to figure out if some of those files are to be ignored. +4. We need to resolve `.editorconfig` files, for [EditorConfig](https://editorconfig.org)-specific formatting configurations for those files. +5. We need to resolve `.prettierrc` files, and [~10 more](https://prettier.io/docs/configuration), for Prettier-specific formatting configurations for those files. +6. We need to check if each of the files matches its formatting configuration. +7. Finally we need to output some kind of result to the terminal. + +After this high-level look at the CLI's architecture I think there are mainly 3 observations to make: + +1. The amount of work to do scales with the number of target files, but most files are completely unchanged between runs of the CLI, because for example a commit in a large-enough repository generally only touches a fraction of the files, so if we could only remember work done in the previous run most of the work on the current run could be skipped. +2. There are potentially a huge number of configuration files to resolve, since our repository could have thousands of folders and each folder could have some configuration files in it, moreover if for example we find 10 different `.editorconfig` files, each of them could define different settings for files matching specific [globs](<https://en.wikipedia.org/wiki/Glob_(programming)>), so they all need to be combined together in a file-specific way, for each target file. But, in almost every case a repository is only going to contain just one or a handful of `.editorconfig` files, even if the repo has thousands of folders, so somehow this shouldn't be _that_ expensive. +3. This isn't a particularly insightful observation, but if everything a program is doing is necessary, and everything done is done efficiently, then the program itself must execute efficiently as a result, so we are generally just going to try to skip unnecessary work as much as possible, and what we can't skip we'll try to make efficient. + +From these observations I started writing a new CLI for Prettier from scratch, as it's often easier to rewrite things with performance in mind from the start than to patch them to be performant. + +I'll use [Babel](https://github.com/babel/babel)'s monorepo to take measurements throughout this post, as it provides a good sort of benchmark, and it should give you a sense of what the improvement will be in practice for a real, fairly large, monorepo. + +## Finding files fast + +First of all we need to find our target files. Prettier's current CLI uses [`fast-glob`](https://github.com/mrmlnc/fast-glob) for that, and the code for using it may look like this: + +```js +import fastGlob from "fast-glob"; + +const files = await fastGlob("packages/**/*.{js,cjs,mjs}", { + ignore: ["**/.git", "**/.sl", "**/.svn", "**/.hg", "**/node_modules"], + absolute: true, + dot: true, + followSymbolicLinks: false, + onlyFiles: true, + unique: true, +}); +``` + +If we run that on Babel's monorepo we'll see that it takes some ~220ms to find ~17k files matching our globs, out of ~30k total files found, which seems reasonably good, considering that Babel's monorepo contains over 13k folders also. + +With a quick profiling we can spot that a significant amount of time is being spent checking if the found files match any of our "ignore" globs, which seem internally converted to regexes and matched one by one. So I tried merging the globs into a single one: `"**/{.git,.sl,.svn,.hg,node_modules}"`, but it seems to get internally split up again for some reason, so that didn't change anything. + +By commenting our ignore globs out entirely we can find pretty much the same files, because almost none of them got actually ignored, in just around ~180ms, which is ~20% less time. So if we could match those globs differently, in a faster way, we could lower times a bit. + +This is probably a good time to mention that `fast-glob` does a pretty cool optimization, if our glob looks like this: `packages/**/*.{js,cjs,mjs}`, then it can spot that the beginning of it is entirely static, what we are actually asking it to do is to search for `**/*.{js,cjs.mjs}` inside the `packages` folder only. This optimization can be significant if there are lots of files in other folders we don't actually care about, because they will just never be scanned at all. + +That got me thinking: our ignore globs are basically the same, but the static part is at the end, rather than at the start. So I wrote another [library](https://github.com/fabiospampinato/tiny-readdir-glob) for finding files with a glob that is able to take advantage of globs with a static end too. The equivalent code for finding files with that would be this: + +```js +import readdir from "tiny-readdir-glob"; + +const { files } = await readdir("packages/**/*.{js,cjs,mjs}", { + ignore: "**/{.git,.sl,.svn,.hg,node_modules}", + followSymlinks: false, +}); +``` + +And it finds the same files in just around ~130ms. By commenting out the ignore glob, just to check how much overhead that adds, it seems to take about the same amount of time, so that got optimized enough that it's hard to measure its cost in this scenario. + +It got faster than we perhaps expected, for a few reasons: + +1. Other than the ignore glob, the `**/*.{js,cjs,mjs}` portion of the main glob ended up getting optimized too. +2. Globs are matched against the relative path of a file from the root folder we started searching from, so there would be a bunch of `path.relative` calls in there, but if our glob looks like this: `**/.git`, then it doesn't matter if we calculate the relative path or not, we'll effectively be looking at the end of that string for a child path anyway, so I'm just skipping those `path.relative` calls completely. +3. Node's [`fs.readdir`](https://nodejs.org/api/fs.html#fsreaddirpath-options-callback) API is used internally in both libraries to scan directories, and it gives us the names of the found files and folders, not their absolute paths, which is what we actually want, but we can generate that more manually, by joining the parent path and the name with the path separator, rather than by calling `path.join`, which speeds things up a bit more. + +Additionally this new library is ~90% smaller, about 65kb of minified code is no longer needed, which speeds up startup for the entire CLI. In much smaller repos than Babel's the new CLI might be able to find all the target files by the time the old one just finished parsing `fast-glob`. + +Rewriting this part of the CLI may seem a little heavy-handed for the kind of speed up that we got, but the main reason for the rewrite is actually another. It would seem that there should be nothing that we could do here that would speed up the CLI by multiple seconds, since finding all the files takes less than half a second to begin with, but, the crucial point to highlight here is that for the entire CLI we not only need to find files to format, but we also need to find configuration files, and knowing every single file and folder that was found, even if they didn't match our globs, is very valuable information that will allow us to shave multiple seconds later. `tiny-readdir-glob` can give us that information more or less for free, so it seemed worth writing it even just for that alone. + +To summarize the perhaps interesting points from this section: + +1. If you can, always tell Prettier the extensions to look for, for example with a glob like `packages/**/*.{js,cjs,mjs}`. If you used `packages/**/*` or just `packages` instead in this scenario 13k extra files would need to be processed, and it would be more expensive for Prettier to discard them later on. +2. There's always something left to optimize or special-case for performance, even in already optimized libraries, if one has the time to look into it. +3. It's worth thinking about what kind of information is being thrown away, or made somewhat expensive to reconstruct. Here the glob library has to know the found files and folders just to do its work, exposing that information to the caller unlocks additional performance basically for free, in some cases. + +Guesses on how to speed this up further: + +1. This seems to be bottlenecked by the performance of `fs.promises.readdir` in Node, and/or the overhead of creating a Promise for each found folder. It may be worth looking into using the callback-style version of that API, and into optimization opportunities in Node itself. + +## Resolving configurations fast + +This is possibly the most impactful optimization behind the new CLI, and it's basically about finding configuration files as fast as possible, for each folder only ever checking once if it contains configuration files, and parsing the found configuration files only once. + +A major problem behind the current CLI is that it caches resolved configurations by file path, rather than by folder path, so for example Babel's monorepo has ~17k files to format, but only 1 `.editorconfig` file in the whole repo, we should be parsing that file once, but instead it got parsed ~17k times. Additionally if you imagine those ~17k files being under the same folder, that folder got asked if it contained an `.editorconfig` file ~17k times, so actually the deeper nested into folders files to format were, the slower the entire CLI would get. + +This problem got largely solved in two steps: + +1. Resolved configuration files are cached by folder path, so it doesn't matter anymore how many files each folder contains, or how deep they are into folders. +2. The found folders are now being asked basically 0 times if they contain each of the ~15 supported configuration files, because we know from the previous section every single file in the repo, so we can just do a lookup in there, which ends up being a lot faster than asking the filesystem. This wouldn't matter much in most small repos, but Babel's for example has ~13k folders, and 13k \* 15 checks with the filesystem ~~added~~ multiplied up quickly enough. + +Let's now take a deeper look into how each specific supported type of configuration is resolved. + +#### Resolving EditorConfig configurations + +Assuming from the previous step that we've parsed every `.editorconfig` file in the repo and that we can fetch the relevant ones for any target file in constant time, what we now want to do is to merge them together into a single configuration object, for each target file, basically. + +Right away this idea kinda goes out of the window, because the [`editorconfig`](https://www.npmjs.com/package/editorconfig) package doesn't provide a function for doing this. The closest one seems the one called `parseFromFiles`, which besides being deprecated it seems to do what we want, but it wants configurations as strings, so it will presumably parse them by itself after each call, which is the thing we wanted to avoid in the first place, we only want to ever parse those once. + +So that package got rewritten for Prettier's needs, [`tiny-editorconfig`](https://github.com/fabiospampinato/tiny-editorconfig) provides exactly the `resolve` function we need, and it leaves the logic for finding configuration files to us, which is what we want anyway because we need to cache these files in a custom way. + +While I was at it I've rewritten the [INI parser](https://github.com/fabiospampinato/ini-simple-parser) behind it too, and it seems to be ~9x faster. It shouldn't matter much, because most repos will only have 1 `.editorconfig` file in them, but I enjoy writing these little parsers, and hey if you happen to have thousands of `.editorconfig` files in your repo you'll notice the extra performance boost! + +Additionally this new library is ~82% smaller, ~50kb of minified code got deleted, which speeds up startup for the whole CLI. Also it uses the same glob library that `tiny-readdir-glob` uses, while in the current CLI `fast-glob` and `editorconfig` use different ones, so actually a bit more code than that got effectively deleted. + +Previously it would have taken multiple seconds to resolve these files for Babel's monorepo, now it takes roughly ~100ms. + +Guesses on how to speed this up further: + +1. It should be possible in some (most?) cases to pre-resolve these configuration files for any possible file path we could encounter, for example depending on the globs in them it may be possible that we can end up with 3 possible resolved configurations at most, one for files that don't match any of the globs, one for files that match the `**/*.js` glob, and one for files that match the `**/*.md` glob. It's a bit complicated to implement though, and unclear what the speedup will be in practice, but it's something to think about for the future. + +#### Resolving Prettier configurations + +For Prettier-specific configurations, like the `.prettierrc` file, we are also assuming that we've resolved all the found configuration files, and can retrieve them in constant time for any target file. + +It's basically an identical situation to what we had for EditorConfig-specific configurations, so we'll basically do the same, this time hard-coding the logic for merging the configurations inside the CLI itself, as making a standalone package for it seems of basically no utility to the ecosystem. + +The main aspects to consider here for the future are, in my opinion: + +1. A large number of [different configuration files](https://prettier.io/docs/configuration) are supported. In Babel's monorepo this translates to ~150k lookups in the object of known paths we created in the first step, which while not super expensive it's not free either. If this number could be reduced by a lot it would speed things up a bit. +2. Also some of the parsers required to parse those configuration files are relatively expensive, the [`json5`](https://npmjs.com/package/json5) parser requires ~100x as much code as the smallest [JSONC](https://code.visualstudio.com/docs/languages/json) (JSON with Comments) parser that I know of for JavaScript, while being in some cases ~50x slower at parsing also. If fewer formats could be supported the CLI would be leaner as a result. +3. If we could check just once if a file named for example `.prettierrc.json5` got found anywhere in the repo we could reduce the number of checks for these configuration files by an order of magnitude, because if no file with that name was found anywhere in the repo then we don't need to ask each of Babel's ~13k folders if they have it. The list of all known file names is another piece of valuable information that the glob library we are using could give us for free. + +#### Resolving Ignore configurations + +Lastly we need to resolve `.gitignore` and `.prettierignore` files, to understand which found files to ignore. We are also assuming that we resolved all the found ones already and can fetch them in constant time for any target file. + +I'm not doing any major optimizations here, I'm largely just asking [`node-ignore`](https://github.com/kaelzhang/node-ignore) to make us a function that we can call to check if a file should be ignored. + +A small optimization though is skipping calling `path.relative`, and the `ignore` function itself in some cases. Ignore files match more or less the relative path of found files from the folder where the ignore file exist in, and since we know that all the paths we are dealing with are normalized, if the absolute path of a target file doesn't start with the absolute path of the folder where each ignore file existed in then that file exists outside of the folder that the ignore file manages, so we don't have to call the `ignore` function that `node-ignore` made for us. + +A decent amount of time seems spent matching the globs in these files against the found files though, hundreds of milliseconds for thousands of files, because there can just be a large number of globs in these files and a large number of files to match, which multiplied together gives us roughly the number of glob matches that will be attempted in the worst case. + +The nice thing about `.gitignore` and `.prettierignore` files though is that they often repay for themselves, because the time spent parsing them and matching files against them is often less than the time needed to process every file that would have gotten discarded by them. + +Guesses on how to speed this up further: + +1. Maybe most of those globs could be sort of merged together into a single more complicated glob, and matched all together in one go by the engine, since we are not interested in knowing which exact glob matched, only if any of them did. +2. Maybe globs could be executed in a different order, perhaps executing cheaper and broader globs first allows us to spend less time matching globs, on average. This wouldn't make a difference if most found files are not ignored though. +3. Perhaps we could just remember which file paths matched or not with a cache, but it feels like this could be sped up a lot without caching too. + +## Caching + +At this point we've found all the files, and we've parsed all the configurations, what's left to do is doing the actual potentially expensive work of formatting each target file, and that's where caching comes in. + +The current CLI has support for some form of caching, but it's opt-in, requiring an explicit `--cache` flag, and it doesn't remember if a file in the previous run was found to _not_ be formatted properly, only if it was formatted properly, which can cause some unnecessary overhead in some cases, as those unformatted files would get formatted again to check if they are formatted, when we could have just remembered from the previous run that they aren't. + +What we want to do here is skip the most amount of work possible, by remembering if a file was formatted or not, while generating reasonably small cache files, and while not introducing much overhead with the caching mechanism itself. + +The new CLI has opt-out caching instead, so caching is always turned on, unless you explicitly disable it with a `--no-cache` flag, this way its benefits should reach a much higher number of people by default. Also the cache is now turned on by default because it takes everything into account, so it shouldn't be realistic for the cache to tell the CLI something that's actually incorrect. If any of the following change, then the cache, or parts of it, get invalidated automatically: Prettier's version, all resolved EditorConfig/Prettier/Ignore configurations files and their paths, formatting options provided via CLI flags, the actual content of each file, and the file path of each file. + +The main trick here is that we don't want to have the cache for each file to be _directly_ dependent on its resolved formatting configuration, because that would require merging those configuration files for each target file, serializing the resulting object, and hashing that, which can be more expensive than we'd like. + +What the new CLI is doing instead is just parsing all found configurations files, and then just serializing and hashing them, which takes a constant amount of time to do no matter how many files we need to format later, and it only requires a single hash to be remembered in the cache file to account _indirectly_ for configuration files. This is safe to do because if the paths to configuration files _and_ their contents don't change, then any file with the same path from the previous run will necessarily be formatted with the same resolved formatting configuration object. The only potential issue is if any dependency used to parse those configuration files is actually buggy, but worst case scenario Prettier's own version can be bumped along with the buggy dependency's. + +To give some numbers the current CLI checks Babel's monorepo without a cache in around ~29 seconds, the new CLI needs ~7.5s to do the same without a cache and without parallelization. If the cache file is enabled and it exists though the current CLI still needs ~22 seconds, while the new CLI needs ~1.3 seconds, and this number can probably be cut in half with more optimizations in the future. + +If there's anything to remember from this long post is that if you want the CLI to go as fast as it can, you need to **remember the cache file**. The cache file is stored under `./node_modules/.cache/prettier` by default, and its location can be customized by passing the `--cache-location <path>` flag. I'll say it again: if performance matters for your scenario the single biggest thing to do to speed things up here is to remember the cache file between runs. + +Guesses on how to speed this up further: + +1. An optimization opportunity would be speeding up hashing in Node. Calculating the same hashes in Bun seems ~3x faster, so surely there's some room for optimization there. I've [reported](https://github.com/nodejs/performance/issues/136) that to Node, no PR has been submitted yet to address it, it seems complicated. +2. Potentially the parsed configuration files could be cached too, rather than just remembering their hash, but there should usually only be a handful of them, so it probably wouldn't matter too much. +3. Potentially more code could be deleted or lazy-loaded, speeding up the fully cached path a bit more. + +## Formatting + +We've now almost reached the end of the pipeline, we know which files we need to format, and we've just gotta do it. + +I haven't looked into optimizing the core formatting function itself much, since for few files it seems reasonably fast already, and most of the slowdown for the CLI seemed to come from resolving configurations inefficiently and not remembering work done in the past, but that could be one of the major things to look into next. There may just not be any major and/or easy optimizations opportunities in there though, with some quick profiling I didn't spot any at least. + +I've tried a couple of other things though. + +First of all multiple files can be formatted in parallel, that's the default now and a `--no-parallel` flag is supported to opt-out of it. The `--parallel-workers <int>` flag can also be used to set a custom number of workers to use, for some manual fine-tuning. On my 10 core computer with parallelization the time needed to check Babel's monorepo goes down from ~7.5s to ~5.5s, which doesn't seem particularly impressive, I'm not sure why I'm not getting better scaling than that, I'd like to look deeper into this eventually. There are much larger repos and CI machines with hundreds of cores though, it may make a much bigger difference for your use case, on top of all the other optimizations. + +Lastly I tried quickly replacing Prettier's format function with [`@wasm-fmt/biome_fmt`](https://www.npmjs.com/package/@wasm-fmt/biome_fmt), which is [Biome](https://biomejs.dev)'s format function compiled to WASM, and I see ~3.5s for checking Babel's monorepo without parallelization, and ~2.2s with parallelization. So roughly 2x better numbers than I'm seeing with Prettier's own formatter. Potentially the improvement could be even larger if Biome's format function was compiled to a native Node module, I'm not sure. + +Guesses on how to speed this up further: + +1. I haven't done much work on the core formatting, which seems roughly at least 2x slower than optimal, but the work required to get there may be major, we'll see. There's definitely some room for improvement though. +2. The `--parallel` flag, while enabled by default, has one minor issue: if you don't have many files to format, but you have many cores to feed, you could end up feeding few files to each core, which can actually slow things down a bit. This can probably be addressed by dynamically sizing the pool depending on some heuristics. It's currently enabled by default because it slows things down a bit only in scenarios where things are pretty fast anyway, while providing a significant improvement in scenarios that would be much slower otherwise. + +## Outputting to the terminal + +Lastly the final step is just to output the result of the command that the CLI was asked to execute to the terminal. + +There wasn't much to do here, but there were a couple of optimizations possible: + +1. First of all in some cases, like when formatting many small files, the current CLI would very quickly output the current file's path it was formatting, just to delete it a millisecond later, after formatting was done. Doing that for thousands of files is actually surprisingly expensive because `console.log` calls are synchronous and block the main thread, moreover if we do that 100 times within 16ms it's a bit pointless because our screen maybe got refreshed only once or twice in that amount of time, whatever was logged we didn't even see it. The new CLI at the moment doesn't log files that are currently being formatted, shaving some hundreds of milliseconds in some cases. +2. Lastly the current CLI may call `console.log` thousands of times, depending on how many files are being formatted, while the new CLI batches logs and just performs a single `console.log` at the end, which in some cases can be surprisingly faster also. + +I think the main room for improvement in this area is doing something visually interesting, which keeps the user busy looking at it, since perceived performance can be even more important than actual performance, but doing it in a way that doesn't keep the computer busy nearly as much. + +## Results + +![](./assets/prettier-bench.png) + +Before we wrap up, here are some numbers I see when checking files in Babel's monorepo, with all files formatted, but 9 erroring files, with various flags, and with the current and new CLI: + +```sh +prettier packages --check # 29s +prettier packages --check --cache # 20s + +prettier@next packages --check --no-cache --no-parallel # 7.3s +prettier@next packages --check --no-cache # 5.5s +prettier@next packages --check # 1.3s +``` + +By default times for the same command go from ~29s to ~1.3s, for a ~22x speedup. This requires the cache file to be remembered between executions. We can probably get much closer to a 50x speedup in the future also. + +If the cache file is not remembered, or if you explicitly turn caching off, or if this is the first run, then times go from ~29s to ~5.5s with parallelization, on my computer, for a ~5x speedup, which should still be pretty significant. + +Worth noting again that this improvement is achieved without changing anything in Prettier's `format` function itself. + +## Results compared to Biome + +It's interesting to compare the numbers we got with the numbers that [Biome](https://github.com/biomejs/biome), the leading Rust formatter and probably performance champion, would give us: + +```sh +biome format packages +# Diagnostics not shown: 25938. +# Compared 28703 file(s) in 869ms +# Skipped 4770 file(s) +``` + +Here Biome is checking the formatting for ~11k more files compared to our CLI, since they don't seem to be implementing `.gitignore` and/or `.prettierignore` resolution yet. There may be other, potentially significant, differences in behavior also, I'm not sure. + +Manually patching our CLI to disable support for ignore files, to try to more closely mimic Biome's behavior, gives us the following number: + +```sh +prettier@next packages --check --no-cache # 15s +``` + +Comparison to take with a pinch of salt because the two tools aren't doing exactly the same thing, but it's interesting to see the speed at which Biome is able to check the formatting of many files. Speed that we probably need a cache file to match. + +Different approaches to try to speed things up massively for users. + +## Wrapping up + +The new CLI is still a work in progress, but we are excited for you to give it a try! You can [install](#installation) it today. + +I'd be interesting to see the speedup that the new CLI enables for you, feel free to tweet those results at [`@PrettierCode`](https://twitter.com/PrettierCode) or at [`@fabiospampinato`](https://twitter.com/fabiospampinato) directly, especially if you have some questions or ideas on how to speed things up further. diff --git a/website/blog/2024-01-12-3.2.0.md b/website/blog/2024-01-12-3.2.0.md new file mode 100644 index 000000000000..dea51f6cd76d --- /dev/null +++ b/website/blog/2024-01-12-3.2.0.md @@ -0,0 +1,386 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.2: Support JSONC and Angular’s ICU expression" +--- + +This release includes new features such as adding a JSONC parser, adding Angular’s ICU expressions, and many bug fixes. + +We are still seeking feedback for the `--experimental-ternaries` option released in Prettier 3.1. Please read [A curious case of the ternaries](https://prettier.io/blog/2023/11/13/curious-ternaries) and respond via the Google Forms link provided. + +Additionally, we recommend reading [Prettier's CLI: A Performance Deep Dive](https://prettier.io/blog/2023/11/30/cli-deep-dive) by [Fabio Spampinato](https://github.com/fabiospampinato). This faster CLI is slated to be released as version 4.0. + +<!-- truncate --> + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +## Highlights + +### JSON + +#### New `jsonc` parser added ([#15831](https://github.com/prettier/prettier/pull/15831) by [@fisker](https://github.com/fisker)) + +Previously, we infer the parser of `.jsonc` files to be `json`, but if we want keep the trailing comma, we'll have to use a hacky workaround config `{parser: "json5", quoteProps: "preserve", singleQuote: false}`. + +The new added `jsonc` parser: + +- Always quote the object keys. +- Wrap strings with double quotes. +- Of course, respect the [`trailingComma`](https://prettier.io/docs/options#trailing-commas) option. + +### Angular + +#### Support formatting for Angular ICU expression ([#15777](https://github.com/prettier/prettier/pull/15777) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Support two kinds of Angular ICU expressions: [`plural`](https://angular.dev/guide/i18n/translation-files#translate-plurals) and [`select`](https://angular.dev/guide/i18n/translation-files#translate-alternate-expressions). + +<!-- prettier-ignore --> +```html +<span i18n> + Updated: + {minutes, plural, + =0 {just now} + =1 {one minute ago} + other {{{minutes}} minutes ago} + } +</span> + +<span i18n> + The author is {gender, select, male {male} female {female} other {other}} +</span> +``` + +## Other Changes + +### JavaScript + +#### Avoid introducing linebreaks in template interpolations ([#15209](https://github.com/prettier/prettier/pull/15209) by [@bakkot](https://github.com/bakkot)) + +In a template string like + +<!-- prettier-ignore --> +```js +`this is a long message which contains an interpolation: ${format(data)} <- like this`; +``` + +avoid adding a linebreak when formatting the expression unless one is already present or it's unavoidable due to e.g. a nested function. Previously a linebreak could be introduced whenever some interpolation in the template was sufficiently "not simple": + +<!-- prettier-ignore --> +```js +`this is a long message which contains an interpolation: ${format( + data, +)} <- like this`; +``` + +Now it will instead be left alone. + +If a linebreak is already present within the `${...}`, format as normal. + +#### Fix non-idempotent formatting of method chain with empty line ([#15522](https://github.com/prettier/prettier/pull/15522) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```js +// Input +Foo.a() + +.b(); + +// Prettier 3.1 (first format) +Foo.a() +.b(); + +// Prettier 3.1 (second format) +Foo.a().b(); + + +// Prettier 3.2 +Foo.a() + + .b(); +``` + +#### Fix formatting of ternary in function call ([#15677](https://github.com/prettier/prettier/pull/15677) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +stopDirectory = await (useCache + ? memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); + +// Prettier 3.1 +stopDirectory = await (useCache + ? memoizedFindProjectRoot + : findProjectRootWithoutCache)(path.dirname(path.resolve(filePath))); + +// Prettier 3.2 +stopDirectory = await ( + useCache ? memoizedFindProjectRoot : findProjectRootWithoutCache +)(path.dirname(path.resolve(filePath))); +``` + +#### Fix inconsistencies for optional-chaining ([#15806](https://github.com/prettier/prettier/pull/15806) by [@fisker](https://github.com/fisker)) + +Only happens when using `typescript`, `meriyah` or other ESTree parsers except `babel`. + +<!-- prettier-ignore --> +```js +// Input +function someFunctionName() { + return isEqual(a.map(([t, _]) => t?.id), b.map(([t, _]) => t?.id)); + return isEqual(a?.map(([t, _]) => t?.id), b?.map(([t, _]) => t?.id)); +} +theValue = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere.includes(listingId), +); +theValue = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere?.includes(listingId), +); + +// Prettier 3.1 +function someFunctionName() { + return isEqual( + a.map(([t, _]) => t?.id), + b.map(([t, _]) => t?.id), + ); + return isEqual(a?.map(([t, _]) => t?.id), b?.map(([t, _]) => t?.id)); +} +theValue = Object.entries(someLongObjectName).filter(([listingId]) => + someListToCompareToHere.includes(listingId), +); +theValue = Object.entries(someLongObjectName).filter( + ([listingId]) => someListToCompareToHere?.includes(listingId), +); + +// Prettier 3.2 +function someFunctionName() { + return isEqual( + a.map(([t, _]) => t?.id), + b.map(([t, _]) => t?.id), + ); + return isEqual( + a?.map(([t, _]) => t?.id), + b?.map(([t, _]) => t?.id), + ); +} +theValue = Object.entries(someLongObjectName).filter(([listingId]) => + someListToCompareToHere.includes(listingId), +); +theValue = Object.entries(someLongObjectName).filter(([listingId]) => + someListToCompareToHere?.includes(listingId), +); +``` + +#### Fix comments in `if` ([#15826](https://github.com/prettier/prettier/pull/15826) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```js +// Input +if (foo) for (i = 2; i > 0; i--) console.log(i); // comment 1 +else bar(); + +for (;;){ + if (foo) continue; // comment 2 + else bar(); +} + +// Prettier 3.1 +Error: Comment "comment 2" was not printed. Please report this error! + +// Prettier 3.2 +if (foo) + for (i = 2; i > 0; i--) console.log(i); // comment 1 +else bar(); + +for (;;) { + if (foo) + continue; // comment 2 + else bar(); +} +``` + +### TypeScript + +#### Improve conditional type alias layout ([#15811](https://github.com/prettier/prettier/pull/15811) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```ts +// Input +type FallbackFlags<F extends Flags | undefined> = + Equals<NonNullableFlag<F>["flags"], {}> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; + +// Prettier 3.1 +type FallbackFlags<F extends Flags | undefined> = Equals< + NonNullableFlag<F>["flags"], + {} +> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; + +// Prettier 3.2 +type FallbackFlags<F extends Flags | undefined> = + Equals<NonNullableFlag<F>["flags"], {}> extends true + ? Dict<any> + : NonNullableFlag<F>["flags"]; +``` + +### HTML + +#### Fix formatting of prettier-ignored unclosed elements ([#15748](https://github.com/prettier/prettier/pull/15748) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<!-- prettier-ignore --> +<h1> +Hello <span>world! + +<!-- Prettier 3.1 --> +<!-- prettier-ignore --> +<h1> + +<!-- Prettier 3.2 --> +<!-- prettier-ignore --> +<h1> +Hello <span>world! +``` + +### Angular + +#### Fix `prettier-ignore`d angular control flow block ([#15827](https://github.com/prettier/prettier/pull/15827) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<!-- prettier-ignore --> +@if (condition) { + Foo +} @else { + Other +} + +<!-- Prettier 3.1 --> +<!-- prettier-ignore --> +@if (condition) { + Foo +} +} @else { + Other +} + +<!-- Prettier 3.2 --> +<!-- prettier-ignore --> +@if (condition) { + Foo +} +@else { + Other +} +``` + +#### Avoid adding colon for `track` in 3rd expression of `for` blocks ([#15887](https://github.com/prettier/prettier/pull/15887) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +@for (item of items; let i = $index; track block) {} + +<!-- Prettier 3.1 --> +@for (item of items; let i = $index; track: block) {} + +<!-- Prettier 3.2 --> +@for (item of items; let i = $index; track block) {} +``` + +### Ember / Handlebars + +#### Preserve path literal segments ([#15605](https://github.com/prettier/prettier/pull/15605) by [@maxpowa](https://github.com/maxpowa)) + +Fixes scenarios where an input handlebars file containing literal segments would be reformatted to unwrap the literal segments, causing syntax errors in the resulting output. + +<!-- prettier-ignore --> +```hbs +<!-- Input --> +{{input.[funky<api!response]}} +{{input.[this one has spaces]}} +{{input.[anotherone].[0]}} + +<!-- Prettier 3.1 --> +{{input.funky<api!response}} +{{input.this one has spaces}} +{{input.anotherone.0}} + +<!-- Prettier 3.2 --> +{{input.[funky<api!response]}} +{{input.[this one has spaces]}} +{{input.anotherone.[0]}} +``` + +### GraphQL + +#### Improve GraphQL union types formatting ([#15870](https://github.com/prettier/prettier/pull/15870) by [@ArchitGajjar](https://github.com/ArchitGajjar)) + +<!-- prettier-ignore --> +```gql +# Input +union SearchResult = Conference| Festival | Concert | Venue | Conference| Festival | Concert | Venue + +# Prettier 3.1 +union SearchResult = + Conference + | Festival + | Concert + | Venue + | Conference + | Festival + | Concert + | Venue + +# Prettier 3.2 +union SearchResult = + | Conference + | Festival + | Concert + | Venue + | Conference + | Festival + | Concert + | Venue +``` + +### API + +#### Support absolute path as plugin in config file ([#15666](https://github.com/prettier/prettier/pull/15666) by [@fisker](https://github.com/fisker)) + +```js +// prettier.config.cjs +module.exports = { + plugins: [ + // posix style + "/path/to/plugin.js", + // Windows style + "D:\\\\path\\to\\plugin.js", + // Use `require.resolve` + require.resolve("my-awesome-prettier-plugin"), + ], +}; +``` + +#### Fix `getFileInfo` and `getSupportInfo` type definitions ([#15854](https://github.com/prettier/prettier/pull/15854) by [@auvred](https://github.com/auvred)) + +```ts +const plugin: Plugin = {}; + +prettier.getFileInfo("./file.ext", { + plugins: [plugin], +}); + +prettier.getSupportInfo({ plugins: [plugin], showDeprecated: true }); +``` + +### Miscellaneous + +#### Fix false claim in docs that cursorOffset is incompatible with rangeStart/rangeEnd ([#15750](https://github.com/prettier/prettier/pull/15750) by [@ExplodingCabbage](https://github.com/ExplodingCabbage)) + +The cursorOffset option has in fact been compatible with rangeStart/rangeEnd for over 5 years, thanks to work by @ds300. However, Prettier's documentation (including the CLI `--help` text) continued to claim otherwise, falsely. The documentation is now fixed. diff --git a/website/blog/2024-06-01-3.3.0.md b/website/blog/2024-06-01-3.3.0.md new file mode 100644 index 000000000000..62f3df2b728e --- /dev/null +++ b/website/blog/2024-06-01-3.3.0.md @@ -0,0 +1,428 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.3: New Flow features and a lot of bug fixes" +--- + +This release includes support for new Flow features such as component and hook declarations. All of these features were implemented by the engineers on the Flow team, thank you. + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +<!-- truncate --> + +## Highlights + +### Flow + +#### `declare namespace` printing support ([#16066](https://github.com/prettier/prettier/pull/16066) by [@SamChou19815](https://github.com/SamChou19815)) + +<!-- prettier-ignore --> +```jsx +// Input +declare namespace foo { + declare var bar: string; +} + +// Prettier 3.2 +// does not parse + +// Prettier 3.3 +declare namespace foo { + declare var bar: string; +} +``` + +#### Component syntax printing support ([#16191](https://github.com/prettier/prettier/pull/16191) by [@SamChou19815](https://github.com/SamChou19815)) + +<!-- prettier-ignore --> +```jsx +// Input +component MyComponent(a: string, b: number) renders SomeComponent { + return <OtherComponent />; +} +hook useMyHook(a: string) { + return useState(a); +} + +// Prettier 3.2 +// does not parse + +// Prettier 3.3 +component MyComponent(a: string, b: number) renders SomeComponent { + return <OtherComponent />; +} +hook useMyHook(a: string) { + return useState(a); +} +``` + +#### Support big int Enums ([#16268](https://github.com/prettier/prettier/pull/16268) by [@gkz](https://github.com/gkz)) + +Adds support for big int [Flow Enums](https://flow.org/en/docs/enums/). + +<!-- prettier-ignore --> +```jsx +// Input +enum E { + A = 0n, + B = 1n, +} + +// Prettier 3.2 +// error + +// Prettier 3.3 +enum E { + A = 0n, + B = 1n, +} +``` + +#### Support inexact tuple types ([#16271](https://github.com/prettier/prettier/pull/16271) by [@gkz](https://github.com/gkz)) + +Adds support for Flow's inexact tuple types. + +<!-- prettier-ignore --> +```jsx +// Input +type T = [number, ...]; + +// Prettier 3.2 +type T = [number]; + +// Prettier 3.3 +type T = [number, ...]; +``` + +#### Support 'implies' type guard variant ([#16272](https://github.com/prettier/prettier/pull/16272) by [@gkz](https://github.com/gkz)) + +Adds support for Flow's `implies` type guard variant. Also updates the `flow-parser` dependency. + +<!-- prettier-ignore --> +```jsx +// Input +declare function f(x: mixed): implies x is T; + +// Prettier 3.2 +// error + +// Prettier 3.3 +declare function f(x: mixed): implies x is T; +``` + +## Other Changes + +### JavaScript + +#### Unquote keys in import attributes ([#15888](https://github.com/prettier/prettier/pull/15888) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```jsx +// Input +import json from "./mod.json" with { "type": "json" }; + +// Prettier 3.2 +import json from "./mod.json" with { "type": "json" }; + +// Prettier 3.3 +import json from "./mod.json" with { type: "json" }; +``` + +#### Fix unstable object print ([#16058](https://github.com/prettier/prettier/pull/16058) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +a = {"\a": 1, "b": 2} + +// Prettier 3.2 (--quote-props consistent) +a = { "a": 1, "b": 2 }; + +// Prettier 3.2 (--quote-props as-needed) +a = { "a": 1, b: 2 }; + +// Prettier 3.3 +a = { a: 1, b: 2 }; +``` + +#### Format embedded GQL in template literal statements ([#16064](https://github.com/prettier/prettier/pull/16064) by [@keithlayne](https://github.com/keithlayne)) + +<!-- prettier-ignore --> +```jsx +// Input +/* GraphQL */ ` + query foo { id } +`; + +// Prettier 3.2 +/* GraphQL */ ` + query foo { id } +`; + +// Prettier 3.3 +/* GraphQL */ ` + query foo { + id + } +`; +``` + +#### Improve formatting of React `useImperativeHandle` hook ([#16070](https://github.com/prettier/prettier/pull/16070) by [@Jaswanth-Sriram-Veturi](https://github.com/Jaswanth-Sriram-Veturi)) + +<!-- prettier-ignore --> +```jsx +// Input +useImperativeHandle(ref, () => { + /* Function body */ +}, []); + +// Prettier 3.2 +useImperativeHandle( + ref, + () => { + /* Function body */ + }, + [], +); + +// Prettier 3.3 +useImperativeHandle(ref, () => { + /* Function body */ +}, []); +``` + +#### Allow linebreaks in member expressions in template interpolations ([#16116](https://github.com/prettier/prettier/pull/16116) by [@bakkot](https://github.com/bakkot)) + +When there is already a linebreak in a template interpolation, allow it to stay there even if it is a member expression. Note that (as of [#15209](https://github.com/prettier/prettier/pull/15209)) Prettier will not insert a linebreak inside an interpolation when one is not already present. + +<!-- prettier-ignore --> +```jsx +// Input +`template with ${ + very.very.very.very.very.very.very.very.very.very.very.long.chain +}`; + +// Prettier 3.2 +`template with ${very.very.very.very.very.very.very.very.very.very.very.long.chain}`; + +// Prettier 3.3 +`template with ${ + very.very.very.very.very.very.very.very.very.very.very.long.chain +}`; +``` + +#### Fix dynamic import when the module source is a template string ([#16267](https://github.com/prettier/prettier/pull/16267) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +const module = await import(`data:text/javascript, + console.log("RUN"); +`); + +// Prettier 3.2 +const module = await (`data:text/javascript, + console.log("RUN"); +`); + +// Prettier 3.3 +const module = await import(`data:text/javascript, + console.log("RUN"); +`); +``` + +### TypeScript + +#### Add missing parentheses to `TSInferType` ([#16031](https://github.com/prettier/prettier/pull/16031) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```jsx +// Input +type Foo<T> = T extends (infer U extends number) | { a: infer U extends number } + ? U + : never; + +// Prettier 3.2 +type Foo<T> = T extends infer U extends number | { a: infer U extends number } + ? U + : never; + +// Prettier 3.3 +type Foo<T> = T extends (infer U extends number) | { a: infer U extends number } + ? U + : never; +``` + +#### Throw errors for duplicated accessibility modifiers ([#16040](https://github.com/prettier/prettier/pull/16040) by [@fisker](https://github.com/fisker), [@auvred](https://github.com/auvred)) + +<!-- prettier-ignore --> +```jsx +// Input +class Foo { + public public bar() {}; +} + +// Prettier 3.2 +class Foo { + public bar() {} +} + +// Prettier 3.3 +SyntaxError: Accessibility modifier already seen. (2:10) + 1 | class Foo { +> 2 | public public bar() {}; + | ^^^^^^ + 3 | } +``` + +#### Respect `--no-semi` for readonly class field ([#16133](https://github.com/prettier/prettier/pull/16133) by [@sxzz](https://github.com/sxzz)) + +<!-- prettier-ignore --> +```tsx +// Input +class A { + field + readonly [expr] = true +} + +// Prettier 3.2 +class A { + field; + readonly [expr] = true +} + +// Prettier 3.3 +class A { + field + readonly [expr] = true +} +``` + +#### Add necessary parentheses to yield expressions ([#16194](https://github.com/prettier/prettier/pull/16194) by [@kirkwaiblinger](https://github.com/kirkwaiblinger)) + +Add parentheses around yield expressions if parent is an angle-bracket type assertion. + +<!-- prettier-ignore --> +```ts +// Input +function* g() { + const y = <T>(yield x); +} + +// Prettier 3.2 +function* g() { + const y = <T>yield x; +} + +// Prettier 3.3 +function* g() { + const y = <T>(yield x); +} +``` + +### Markdown + +#### Improve wrapping for code block in markdown and jsx in mdx ([#15993](https://github.com/prettier/prettier/pull/15993) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +````md +<!-- Input --> +```css +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(210deg 100% 50%) +) + drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(30deg 100% 50%) + ); +} +``` + +<!-- Prettier 3.2 --> +```css +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(210deg 100% 50%) + ) + drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) drop-shadow( + -2px -2px 0 hsl(30deg 100% 50%) + ); +} +``` + +<!-- Prettier 3.3 --> +```css +img { + filter: drop-shadow(2px 2px 0 hsl(300deg 100% 50%)) + drop-shadow(-2px -2px 0 hsl(210deg 100% 50%)) + drop-shadow(2px 2px 0 hsl(120deg 100% 50%)) + drop-shadow(-2px -2px 0 hsl(30deg 100% 50%)); +} +``` +```` + +<!-- prettier-ignore --> +```md +<!-- Input --> +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +<!-- Prettier 3.2 --> +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors + +<!-- Prettier 3.3 --> +<ExternalLink href="http://example.com">Prettier</ExternalLink> is an +opinionated-code-formatter-that-support-many-languages-and-integrate-with-most-editors +``` + +#### Add newline between markdown footnote definitions ([#16063](https://github.com/prettier/prettier/pull/16063) by [@Atema](https://github.com/Atema)) + +<!-- prettier-ignore --> +```md +<!-- Input --> +[^a]: Footnote A + +[^b]: Footnote B + +<!-- Prettier 3.2 --> +[^a]: Footnote A +[^b]: Footnote B + +<!-- Prettier 3.3 --> +[^a]: Footnote A + +[^b]: Footnote B +``` + +#### Improve wrapping for markdown / mdx ([#16158](https://github.com/prettier/prettier/pull/16158) by [@seiyab](https://github.com/seiyab)) + +```json +{ "proseWrap": "always" } +``` + +<!-- prettier-ignore --> +```md +<!-- Input --> +\ +word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word + +<!-- Prettier 3.2 --> +\ +word very-very-very-very-very-very-very-very-very-very-long-word very-very-very-very-very-very-very-very-very-very-long-word + +<!-- Prettier 3.3 --> +\ +word very-very-very-very-very-very-very-very-very-very-long-word +very-very-very-very-very-very-very-very-very-very-long-word +``` + +### API + +#### Add support for `package.yaml` config ([#16157](https://github.com/prettier/prettier/pull/16157) by [@danielbayley](https://github.com/danielbayley)) + +Enable support for reading `prettier` configuration from [`package.yaml`](https://github.com/pnpm/pnpm/pull/1799). + +```yaml +# package.yaml +prettier: + semi: false + singleQuote: true +``` diff --git a/website/blog/2024-11-26-3.4.0.md b/website/blog/2024-11-26-3.4.0.md new file mode 100644 index 000000000000..acc541e306d3 --- /dev/null +++ b/website/blog/2024-11-26-3.4.0.md @@ -0,0 +1,853 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.4: A lot of bug fixes" +--- + +This release includes numerous bug fixes and other improvements. + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +<!-- truncate --> + +## Other Changes + +### JavaScript + +#### Fix template literal print with array ([#13315](https://github.com/prettier/prettier/pull/13315) by [@fisker](https://github.com/fisker), [@syi0808](https://github.com/syi0808)) + +<!-- prettier-ignore --> +```jsx +// Input +const string = `${[[1, 2], [3, 4]]}` + +// Prettier 3.3 +const string = `${[ + [2], + [4], +]}`; + +// Prettier 3.4 +const string = `${[ + [1, 2], + [3, 4], +]}`; +``` + +#### Add missing parentheses in tagged template literals ([#16500](https://github.com/prettier/prettier/pull/16500) by [@syi0808](https://github.com/syi0808)) + +<!-- prettier-ignore --> +```jsx +// Input +(String?.raw)``; +(getTag?.())``; + +// Prettier 3.3 +String?.raw``; +getTag?.()``; + +// Prettier 3.4 +(String?.raw)``; +(getTag?.())``; +``` + +#### Don't remove useless `\` in string literals ([#16563](https://github.com/prettier/prettier/pull/16563) by [@sosukesuzuki](https://github.com/sosukesuzuki), [#16763](https://github.com/prettier/prettier/pull/16763) by [@fisker](https://github.com/fisker)) + +Previously, Prettier would remove useless escape characters (`\`) from string literals. However, this behavior was inconsistent as it did not apply to template literals, which was reported in [issue #16542](https://github.com/prettier/prettier/issues/16542). + +This issue is a feature request to extend this behavior to template literals as well. + +After discussing this internally, the Prettier team concluded that removing useless escape characters, whether in string literals or template literals, is the responsibility of a linter, not a formatter. + +This change disables the removal of useless escape characters in string literals across all languages supported by Prettier. To keep the previous behavior, we recommend using ESLint rules like [`no-useless-escape`](https://eslint.org/docs/latest/rules/no-useless-escape). + +Escaped quotes (e.g. `"\"\'"`) may get unescaped when changing between different quotes. This is explained on the [Rationale](https://prettier.io/docs/rationale#strings) page of the official documentation. + +<!-- prettier-ignore --> +```jsx +// Input +const str = "\a"; + +// Prettier 3.3 +const str = "a"; + +// Prettier 3.4 +const str = "\a"; +``` + +#### Improve comment formatting for logical expression in unary expression ([#16593](https://github.com/prettier/prettier/pull/16593) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +<!-- prettier-ignore --> +```jsx +// Input +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); + +// Prettier 3.3 +!( + ( + cond1 || // foo + cond2 || // bar + cond3 + ) // baz +); + +// Prettier 3.4 +!( + cond1 || // foo + cond2 || // bar + cond3 // baz +); +``` + +#### Removed support for experimental syntax ([#16643](https://github.com/prettier/prettier/pull/16643), [#16705](https://github.com/prettier/prettier/pull/16705) by [@fisker](https://github.com/fisker)) + +- `DecimalLiteral` - The [Decimal proposal](https://github.com/tc39/proposal-decimal) decided not to introduce new syntax. The `decimal` plugin will be removed from Babel 8. +- `importReflection` - The "Import Reflection" proposal has been renamed to ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports) + +- [Disclaimer about non-standard syntax](https://prettier.io/docs/rationale#disclaimer-about-non-standard-syntax) + +### TypeScript + +#### Add missing parentheses in tagged template literals ([#16500](https://github.com/prettier/prettier/pull/16500) by [@syi0808](https://github.com/syi0808)) + +<!-- prettier-ignore --> +```jsx +// Input +(String?.raw!)``; +(String?.raw)!``; + +// Prettier 3.3 +String?.raw!``; +String?.raw!``; + +// Prettier 3.4 +(String?.raw)!``; +(String?.raw)!``; +``` + +#### Preserve a comment on between decorator and modified parameter property ([#16574](https://github.com/prettier/prettier/pull/16574) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +The current version of Prettier unexpectedly moves a line comment between a parameter property modified by `readonly`, `private`, `public`, etc and a decorator. This output results in invalid TypeScript code. + +This change ensures that the original format is preserved. + +<!-- prettier-ignore --> +```ts +// Input +class Foo { + constructor( + @decorator + // comment + readonly foo, + ) {} +} + +// Prettier 3.3 +class Foo { + constructor( + @decorator + readonly // comment + foo, + ) {} +} + +// Prettier 3.4 +class Foo { + constructor( + @decorator + // comment + readonly foo, + ) {} +} +``` + +#### Preserve a comment between modifier and the decorated property name ([#16578](https://github.com/prettier/prettier/pull/16578) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +There was a bug where block comments between the modifier and the name of a decorated property were being treated as trailing comments of the decorator. This behavior was not only unexpected but also lacked idempotency. + +With this change, the position of the block comment between the modifier and the property name is preserved. + +<!-- prettier-ignore --> +```ts +// Input +class Foo { + @decorator + readonly /* comment */ propertyName; +} + +// Prettier 3.3 +class Foo { + @decorator /* comment */ + readonly propertyName; +} + +// Prettier 3.3 (second output) +class Foo { + @decorator /* comment */ readonly propertyName; +} + +// Prettier 3.4 +class Foo { + @decorator + readonly /* comment */ propertyName; +} +``` + +#### Don't print an extra line break for arrow function with type parameter in assignment ([#16586](https://github.com/prettier/prettier/pull/16586) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +There was a bug where an extra line was inserted when assigning a chained arrow function with type parameters to a variable if there was a line comment above it. + +This change ensures that the extra line is no longer inserted. + +<!-- prettier-ignore --> +```ts +// Input +const foo1 = + // comment + <T,>() => () => 1; + +// Prettier 3.3 +const foo1 = + // comment + + <T,>() => + () => + 1; + +// Prettier 3.4 +const foo1 = + // comment + <T,>() => + () => + 1; +``` + +#### Support "Top-level await statements" ([#16729](https://github.com/prettier/prettier/pull/16729) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```ts +// Input +(await (await fetch()).json()).foo + +// Prettier 3.3 +await(await fetch()).json().foo; + +// Prettier 3.4 +(await (await fetch()).json()).foo; +``` + +#### Fix class heritage breaks even though it remains inside the line width ([#16730](https://github.com/prettier/prettier/pull/16730) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```ts +// Input +export class JiraCreatePixFraudDetectionGateway + implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} + +// Prettier 3.3 +export class JiraCreatePixFraudDetectionGateway + implements + Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} + +// Prettier 3.4 +export class JiraCreatePixFraudDetectionGateway + implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue"> +{ + constructor(private readonly logger: Logger) { + this.logger = logger.child({ + context: JiraCreatePixFraudDetectionGateway.name, + }); + } +} +``` + +#### Print `declare` before accessibility in class properties ([#16731](https://github.com/prettier/prettier/pull/16731) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```ts +// Input +class A { + declare private readonly name: string; +} + +// Prettier 3.3 +class A { + private declare readonly name: string; +} + +// Prettier 3.4 +class A { + declare private readonly name: string; +} +``` + +### CSS + +#### Resolve some types of overrun in CSS ([#16570](https://github.com/prettier/prettier/pull/16570) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```css +/* Input */ +@media (prefers-reduced-data: no-preference) { + @font-face { + unicode-range: U+0000-00FF, U+0131, +U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } +} + +/* Prettier 3.3 */ +@media (prefers-reduced-data: no-preference) { + @font-face { + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, + U+2215, U+FEFF, U+FFFD; + } +} + +/* Prettier 3.4 */ +@media (prefers-reduced-data: no-preference) { + @font-face { + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, + U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, + U+2212, U+2215, U+FEFF, U+FFFD; + } +} +``` + +#### Remove extra indentation in pseudo-class function ([#16572](https://github.com/prettier/prettier/pull/16572) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +This change fixes a bug where extra indentation was added when line breaks were included in the argument list of pseudo-class functions like [`:where()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:where), [`:is()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:is), and [`:not`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not). + +<!-- prettier-ignore --> +```css +/* Input */ +:where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) { + /* CSS here */ +} + +/* Prettier 3.3 */ +:where( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select + ) { + /* CSS here */ +} + +/* Prettier 3.4 */ +:where( + input:not([type="button"], [type="reset"], [type="submit"]), + textarea, + select +) { + /* CSS here */ +} + +``` + +#### Fix formatting of incomplete CSS value comments ([#16583](https://github.com/prettier/prettier/pull/16583) by [@sosukesuzuki](https://github.com/sosukesuzuki), [@fisker](https://github.com/fisker)) + +When formatting CSS value comments, the trailing `/` may be lost, resulting in an invalid comment. + +This change ensures that value comments are not truncated. + +<!-- prettier-ignore --> +```css +/* Input */ +h1 { + --OFF: /* OFF */; +} + +/* Prettier 3.3 */ +h1 { + --OFF: /* OFF *; +} + +/* Prettier 3.4 */ +h1 { + --OFF: /* OFF */; +} +``` + +### SCSS + +#### Fix error thrown when formatting SCSS file ([#16607](https://github.com/prettier/prettier/pull/16607) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```scss +// Input +@if true { + $newKey: ($key: ( $theme-name: $value )) +} + +// Prettier 3.3 +Error + +// Prettier 3.4 +@if true { + $newKey: ( + $key: + ( + $theme-name: $value, + ), + ); +} +``` + +#### Fix wrong trailing comma position after comment in SCSS ([#16617](https://github.com/prettier/prettier/pull/16617) by [@Ma-hawaj](https://github.com/Ma-hawaj), [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```scss +/* Input */ +$z-indexes: ( + header: 1035, + overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed +); + +/* Prettier 3.3 */ +$z-indexes: ( + header: 1035, + overlay: 1202 // TODO: change to 1050 after bootstrap modals will be removed, +); + +/* Prettier 3.4 */ +$z-indexes: ( + header: 1035, + overlay: 1202, // TODO: change to 1050 after bootstrap modals will be removed +); +``` + +### HTML + +#### Keep doctype in non-html files unchanged ([#16765](https://github.com/prettier/prettier/pull/16765) by [@fisker](https://github.com/fisker)) + +In Prettier v3, [we print HTML5 doctype in lowercase](https://prettier.io/blog/2023/07/05/3.0.0#print-html5-doctype-in-lowercase-7391httpsgithubcomprettierprettierpull7391-by-fiskerhttpsgithubcomfisker), it's safe for HTML files, however users may use the `html` parser to format other files eg: XHTML files, lowercase the `doctype` will break XHTML documents. + +Starting with Prettier 3.4, we'll only lowercase [HTML5 doctype (`<!doctype html>`)](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/HTML#doctype) when the file extension is `.html` or `.htm`, otherwise they will be untouched. + +<!-- prettier-ignore --> +```html +<!-- Input --> +<!-- foo.xhtml --> +<!DOCTYPE html> + +<!-- Prettier 3.3 --> +<!doctype html> + +<!-- Prettier 3.4 --> +<!DOCTYPE html> +``` + +### Vue + +#### Fix extra semicolon inserted in Vue event binding with non-ascii characters ([#16733](https://github.com/prettier/prettier/pull/16733) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<template> + <button @click="点击事件">点击!</button> + <button @click="onClick">Click!</button> +</template> + +<!-- Prettier 3.3 --> +<template> + <button @click="点击事件;">点击!</button> + <button @click="onClick">Click!</button> +</template> + +<!-- Prettier 3.4 --> +<template> + <button @click="点击事件">点击!</button> + <button @click="onClick">Click!</button> +</template> +``` + +### Angular + +#### Support Angular 19 ([#16862](https://github.com/prettier/prettier/pull/16862) by [@fisker](https://github.com/fisker)) + +Angular 19 added [support for `typeof` keyword in template expressions](https://github.com/angular/angular/pull/58183). + +<!-- prettier-ignore --> +```html +<!-- Input --> +<div>{{ typeof + x === + 'object' ? 'Y' : 'N'}}</div> + +<!-- Prettier 3.3 --> +<div> + {{ typeof + x === + 'object' ? 'Y' : 'N'}} +</div> + +// Prettier 3.4 +<div>{{ typeof x === "object" ? "Y" : "N" }}</div> +``` + +### Markdown + +#### Remove excessive spaces after line prefixes for unordered lists in Markdown ([#15526](https://github.com/prettier/prettier/pull/15526) by [@TomasLudvik](https://github.com/TomasLudvik)) + +<!-- prettier-ignore --> +```md +<!-- Input --> +- first line + - second line indented +- third line + - fourth line + - fifth line + +<!-- Prettier 3.3 --> +- first line + - second line indented +- third line + - fourth line + - fifth line + +<!-- Prettier 3.4 --> +- first line + - second line indented +- third line + - fourth line + - fifth line +``` + +#### Fix incorrect wrap in sentence with linkReference ([#16546](https://github.com/prettier/prettier/pull/16546) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```md +<!-- Input (--prose-wrap=always) --> +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run them, install VHS from main (the theme and screenshot commands are not yet released). + +<!-- Prettier 3.3 --> +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To run +them, install VHS from main (the theme and screenshot commands are not yet released). + +<!-- Prettier 3.4 --> +This folder has [VHS] tape files to create gifs for the [Widget Showcase]. To +run them, install VHS from main (the theme and screenshot commands are not yet +released). +``` + +#### Preserve non-ASCII whitespaces at the end of the line and beginning of the next line ([#16619](https://github.com/prettier/prettier/pull/16619) by [@tats-u](https://github.com/tats-u)) + +Prettier removes non-ASCII spaces at the end of the line and beginning of the next line. However, this behavior is not consistent with the CommonMark spec. + +https://spec.commonmark.org/0.31.2/#soft-line-breaks + +> Spaces at the end of the line and beginning of the next line are removed: + +https://spec.commonmark.org/0.31.2/#unicode-whitespace-character + +> A Unicode whitespace character is a character in the Unicode Zs general category, or a tab (U+0009), line feed (U+000A), form feed (U+000C), or carriage return (U+000D). + +> Unicode whitespace is a sequence of one or more Unicode whitespace characters. + +> A space is U+0020. + +The CommonMark spec doesn't mention non-ASCII spaces here, so removing them changes the content of the Markdown document. + +<!-- prettier-ignore --> +```md +<!-- Input --> + EM Space (U+2003) EM Space + + 全角スペース (U+3000) 全形空白 + +<!-- Prettier 3.3 --> +EM Space (U+2003) EM Space + +全角スペース (U+3000) 全形空白 + +<!-- Prettier 3.4 --> + EM Space (U+2003) EM Space + + 全角スペース (U+3000) 全形空白 +``` + +#### Don't break a line a between Chinese or Japanese and others ([#16691](https://github.com/prettier/prettier/pull/16691) by [@tats-u](https://github.com/tats-u)) + +Markdown documents are mainly converted to HTML or components of JavaScript-based frameworks. This means that paragraphs in Markdown are eventually processed by the browser according to [CSS rules](https://drafts.csswg.org/css-text-4/). This is because many Markdown converter preserve line breaks in paragraphs in input Markdown and HTML itself does not specify how browsers should handle line breaks in text in HTML. + +According to [CSS rules (CSS Text Module Level 3 or later)](https://drafts.csswg.org/css-text-4/#line-break-transform), browsers should remove line breaks between Chinese/Japanese characters instead of replacing them with spaces. However, this rule has been ignored by WebKit-based or Webkit-derived browsers (Chrome, Safari, and so on) for long time. + +For example, the following HTML paragraph: + +<!-- prettier-ignore --> +```html +<p> +日本語 +汉语 +漢語 +<p> +``` + +generated from the following Markdown: + +```md +日本語 +汉语 +漢語 +``` + +should be rendered as follows according to CSS rules and actually is rendered such by Firefox: + +```md +日本語汉语漢語 +``` + +However, Chrome and Safari render it as follows: + +```md +日本語 汉语 漢語 +``` + +This is why we should stop Prettier from line breaking between Chinese/Japanese characters. We decided to stop Prettier from forcing users to use a plugin for a Markdown converter that concatenates lines that start or end with Chinese/Japanese characters ([remark-join-cjk-lines](https://www.npmjs.com/package/remark-join-cjk-lines), for example). + +Also, [a line break between Chinese/Japanese and others are equivalent to a space](https://github.com/w3c/csswg-drafts/blob/076914a198bf3ac642001619e08acefdf607d61d/css-text/Overview.bs#L712) according to before [the commit suspending a concrete rule in CSS Text Module Level 3 by commenting it out](https://github.com/w3c/csswg-drafts/commit/b3bb0ed18b3168981c54c437bcfb5881ef49975b) fixing [an issue on the CSS Working Group Editor Drafts](https://github.com/w3c/csswg-drafts/issues/5086). Firefox follows this rule. Therefore, all browsers render the following paragraph: + +````html +<!-- prettier-ignore --> +```html +<p>日本語 English 汉语 한국어 漢語</p> + +<p></p> +```` + +as follows: + +```md +日本語 English 汉语 한국어 漢語 +``` + +However, Prettier has broken a line between Chinese/Japanese characters in Markdown for a long time, and between Chinese/Japanese and latin characters in some cases since 3.0.0. For example, the following Markdown paragraph: + +```md +日本語English汉语 +English +漢語 +``` + +is formatted as follows if `--prose-wrap` is set to the other value than `preserve` in Prettier 3.x: + +```md +日本語English汉语English漢語 +``` + +However, the following HTML, which is generated by a Markdown-to-HTML converter based on the above Markdown: + +<!-- prettier-ignore --> +```html +<p> +日本語English汉语 +English +漢語 +</p> +``` + +is rendered as follows by all browsers: + +```md +日本語English汉语 English 漢語 +``` + +This is why we should stop Prettier from line breaking al so around Chinese/Japanese characters in Markdown. We are going to conform Prettier's behavior to this rule in a future version. After that, line breaks between Chinese/Japanese and others will be allowed again under certain rules. + +One of the few exceptions is spaces and line breaks between Chinese/Japanese and Korean letters. The following Markdown paragraphs are equivalent even in the current Prettier version: + +```md +현재 韓國의 大統領은 尹錫悅이다. +``` + +```md +현재 +韓國의 +大統領은 +尹錫悅이다. +``` + +You get the former if you format the latter with `--prose-wrap=always` and a sufficiently long `--print-width` value or with `--prose-wrap=never`, and you get the latter if you format the former with `--prose-wrap=always` with a extremely short `--print-width` value. Therefore, we do not have to touch such spaces and line breaks. + +Another exception is those between a Chinese/Japanese character and a meaningful symbol in Markdown like `*`, `` ` ``, `[`, and `]`. For example, the following Markdown paragraph is equivalent even in the current Prettier version: + +```md +**Yarn** のCLI経由でフォーマットするには `yarn prettier -w ` を実行してください。 +``` + +```md +**Yarn** +のCLI経由でフォーマットするには +`yarn prettier -w .` +を実行してください。 +``` + +<!-- prettier-ignore --> +```md +<!-- Input (--prose-wrap=always --print-width=20) --> +日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 日本語 汉语 漢語 English 한국어 + +日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어 + +<!-- Prettier 3.3 --> +日本語 汉语 漢語 +English 한국어 日本 +語 汉语 漢語 English +한국어 日本語 汉语 +漢語 English 한국어 +日本語 汉语 漢語 +English 한국어 + +日本語汉语漢語 +English한국어日本語 +汉语漢語 +English한국어日本語 +汉语漢語 +English한국어日本語 +汉语漢語 +English한국어 + +<!-- Prettier 3.4 --> +日本語 汉语 漢語 English +한국어 +日本語 汉语 漢語 English +한국어 +日本語 汉语 漢語 English +한국어 +日本語 汉语 漢語 English +한국어 + +日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어日本語汉语漢語English한국어 +``` + +#### Tell regexp-util to generate regex compatible with u flag ([#16816](https://github.com/prettier/prettier/pull/16816) by [@tats-u](https://github.com/tats-u)) + +CJK characters outside of BMP and Ideographic Variation Sequences (IVS; variation selectors dedicated for han/kanji), which consume 2 characters in JavaScript string, have not been treated as CJK. This is due to the fact that Prettier has not passed the appropriate flag `"u"` to the `regexp-util` package. + +In the following example, “𠮷” (U+20BB7) is out of BMP, and “葛󠄀” is a combination of a han “葛” (U+845B) in BMP and an IVS U+E0100. The latter requires a font with the support of Adobe Japan-1 (e.g. Yu Gothic UI and Source Han Sans) to be rendered as a form different from that of the character without IVS (葛). + +<!-- prettier-ignore --> +```md +<!-- Input (--prose-wrap=never) --> +a 字 a 字 a 字 +𠮷 +𠮷 +葛󠄀 +葛󠄀 +終 + +<!-- Prettier 3.3 --> +a 字 a 字 a 字 𠮷 𠮷 葛󠄀 葛󠄀 終 + +<!-- Prettier 3.4 --> +a 字 a 字 a 字𠮷𠮷葛󠄀葛󠄀終 + +``` + +### YAML + +#### Fix yaml comment in non-singleline items missing space before `#` ([#16489](https://github.com/prettier/prettier/pull/16489) by [@fyc09](https://github.com/fyc09)) + +<!-- prettier-ignore --> +```yaml +# Input +123: # hello + # comment + +# Prettier 3.3 +123:# hello + # comment + +# Prettier 3.4 +123: # hello + # comment +``` + +### API + +#### Stop doc mutation in `prettier.doc.printDocToString` ([#13315](https://github.com/prettier/prettier/pull/13315) by [@fisker](https://github.com/fisker)) + +For performance reason, `prettier.doc.printDocToString` used to mutate `.parts` of the [`fill`](https://github.com/prettier/prettier/blob/main/commands.md#fill) command during print. It was converted to a [pure function](https://en.wikipedia.org/wiki/Pure_function) to ensure output correctness. + +#### Make `getPreferredQuote` public ([#16567](https://github.com/prettier/prettier/pull/16567) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +This change makes the internal `getPreferredQuote` function a part of the public API. + +In languages like JavaScript, both single quotes and double quotes can be used for string literals. Prettier determines the quote to enclose a string literal based on the number of quotes within the string and the value of the [`singleQuote`](https://prettier.io/docs/options#quotes) option. For more details, please refer to the [Rationale](https://prettier.io/docs/rationale#strings) page. + +The `getPreferredQuote` function determines the appropriate quote to enclose a string literal and has the following interface: + +```ts +type Quote = '"' | "'"; +function getPreferredQuote( + text: string, + preferredQuoteOrPreferSingleQuote: Quote | boolean, +): Quote; +``` + +Here are some examples of how to use it: + +<!-- prettier-ignore --> +```jsx +import * as prettier from "prettier"; + +const SINGLE_QUOTE = `'`; +const DOUBLE_QUOTE = `"`; + +console.log(prettier.util.getPreferredQuote(`Hello World Test`, SINGLE_QUOTE)); // ' +console.log(prettier.util.getPreferredQuote(`Hello World Test`, DOUBLE_QUOTE)); // " +console.log(prettier.util.getPreferredQuote(`'Hello' "World" 'Test'`, SINGLE_QUOTE)); // " +console.log(prettier.util.getPreferredQuote(`"Hello" 'World' "Test"`, DOUBLE_QUOTE)); // ' +console.log(prettier.util.getPreferredQuote(`"Hello" "World" "Test"`, SINGLE_QUOTE)); // ' +console.log(prettier.util.getPreferredQuote(`'Hello' 'World' 'Test'`, DOUBLE_QUOTE)); // " +``` + +Making this function public will benefit plugin developers. Since the function is relatively short, you can find more details in the [implementation](https://github.com/prettier/prettier/blob/509a0cc10f12cbfa5304737965f99284449aca88/src/utils/get-preferred-quote.js). + +#### Fix loading ESM-style shared config file in Node.js 23 ([#16857](https://github.com/prettier/prettier/pull/16857) by [@sosukesuzuki](https://github.com/sosukesuzuki)) + +In Prettier 3.3, attempting to load an ESM-style [shared config file](https://prettier.io/docs/sharing-configurations) in Node.js 23 resulted in the following warnings, preventing the options from being loaded: + +``` +[warn] Ignored unknown option { __esModule: true }. +[warn] Ignored unknown option { default: { trailingComma: "es5", tabWidth: 4, singleQuote: true } }. +``` + +This issue was caused by a new module feature in Node.js 23, known as [`require(ESM)`](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require). Prettier 3.4 resolves this problem, allowing the options to load correctly. + +For more details, please see https://github.com/prettier/prettier/issues/16812. + +### CLI + +#### Ignore files in the Jujutsu directory ([#16684](https://github.com/prettier/prettier/pull/16684) by [@marcusirgens](https://github.com/marcusirgens)) + +The Jujutsu VCS uses the `.jj` directory, similarly to how Git uses `.git`. + +This change adds `.jj` to the list of directories which are silently ignored by prettier. + +### Miscellaneous + +#### Fix `cursorOffset` feature sometimes being catastrophically slow ([#15709](https://github.com/prettier/prettier/pull/15709) by [@ExplodingCabbage](https://github.com/ExplodingCabbage)) + +Previously, Prettier's `cursorOffset` feature would be spectacularly slow in certain unfortunate circumstances (namely when the user's cursor was not contained within a leaf node of the AST, and the non-leaf node containing it was very large and being significantly reformatted by Prettier). As a consequence, if you used Prettier via an editor integration that used `cursorOffset` under the hood, your editor would sometimes inexplicably hang when you tried to format a file. + +All examples of this phenomenon that we are aware of should now be fixed, but bug reports of any further pathological examples would be welcome. diff --git a/website/blog/2025-02-09-3.5.0.md b/website/blog/2025-02-09-3.5.0.md new file mode 100644 index 000000000000..2b06723b9468 --- /dev/null +++ b/website/blog/2025-02-09-3.5.0.md @@ -0,0 +1,409 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.5: New objectWrap option, experimentalOperatorPosition option and TS config file support!" +--- + +This release includes a lot of bug fixes and the following new features: + +- Support for the new `objectWrap` option +- Support for the new experimental `experimentalOperatorPosition` option +- Support for TypeScript configuration file + +See each section for details. + +<!-- truncate --> + +If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! + +## Why We Added Two New Options + +This release introduces two new options. If you’re familiar with Prettier’s [Option Philosophy](https://prettier.io/docs/option-philosophy/), you might be wondering: “Why add new options?” Rest assured, these aren’t your typical options, nor do they violate our option philosophy. + +As the name suggests, `experimentalOperatorPosition` is experimental. We have a [policy for experimental options](https://github.com/prettier/prettier/issues/14527), which means it will eventually be removed. In the future, the new behavior could become the default, or this option might be dropped entirely. If you’ve been following Prettier for a while, you may recall we once added an `experimentalTernaries` option, and this follows the same approach. + +`objectWrap` is a bit special. For a long time, we’ve struggled with how to print multi-line objects. We haven’t yet found the perfect solution, so we’ve resorted to a semi-manual approach. For more details, see our [Rationale](https://prettier.io/docs/rationale/#multi-line-objects). The current behavior isn’t ideal because the final output can vary based on how the user writes their code. To provide a more consistent format, we’ve decided to introduce the `objectWrap` option. + +Although this release includes two new options, **we want to emphasize that we haven’t forgotten Prettier’s option philosophy**. These options address specific, long-standing formatting challenges without compromising our option philosophy. + +## Highlights + +### JavaScript + +#### Add experimental option for breaking lines before binary operators ([#7111](https://github.com/prettier/prettier/pull/7111) by [@btmills](https://github.com/btmills)) + +This is implemented behind the `--experimental-operator-position <start|end>` flag. + +When binary expressions wrap lines, `start` prints the operators at the start of new lines. Placing binary operators at the beginning of wrapped lines can make the operators more prominent and easier to scan. + +<!-- prettier-ignore --> +```jsx +// Input +var a = Math.random() * (yRange * (1 - minVerticalFraction)) + minVerticalFraction * yRange - offset; + +// `experimentalOperatorPosition: end` (default behavior) +var a = + Math.random() * (yRange * (1 - minVerticalFraction)) + + minVerticalFraction * yRange - + offset; + +// `experimentalOperatorPosition: start` +var a = + Math.random() * (yRange * (1 - minVerticalFraction)) + + minVerticalFraction * yRange + - offset; +``` + +#### Implement `objectWrap` config option ([#16163](https://github.com/prettier/prettier/pull/16163) by [@pauldraper](https://github.com/pauldraper), [@sosukesuzuki](https://github.com/sosukesuzuki)) + +Prettier has historically done semi-manual formatting of multi-line JavaScript object literals. + +Namely, an object is kept on multiple lines if there is a newline prior to the first property, even if it could fit on a single line. See [Multi-line objects](https://prettier.io/docs/rationale#multi-line-objects) for more details. + +While this behavior continues to be the default, `--object-wrap=collapse` instead ignores whitespace when formatting object literals. + +<!-- prettier-ignore --> +```js +// Input +const obj1 = { + name1: "value1", name2: "value2", +}; + +const obj2 = { name1: "value1", + name2: "value2", +}; + +// Prettier 3.4 +const obj1 = { + name1: "value1", + name2: "value2", +}; + +const obj2 = { name1: "value1", name2: "value2" }; + +// Prettier 3.5 (with `--object-wrapping=collapse`) +const obj1 = { name1: "value1", name2: "value2" }; + +const obj2 = { name1: "value1", name2: "value2" }; +``` + +### API + +#### Add support for TypeScript config files ([#16828](https://github.com/prettier/prettier/pull/16828) by [@itsyoboieltr](https://github.com/itsyoboieltr) & [@fisker](https://github.com/fisker)) + +Added new format of configuration files: + +- `.prettierrc.ts` +- `.prettierrc.mts` +- `.prettierrc.cts` +- `prettier.config.ts` +- `prettier.config.mts` +- `prettier.config.cts` + +Note: + +Currently TypeScript support in Node.js is experimental. + +To make TypeScript config files work, Node.js>=22.6.0 is required and Node.js v22 requires `--experimental-strip-types`. + +You can run prettier with + +```sh +node --experimental-strip-types node_modules/prettier/bin/prettier.cjs . --write +``` + +or + +```sh +NODE_OPTIONS="--experimental-strip-types" prettier . --write +``` + +Other TS loaders should also work, but not tested, use at your own risk. + +For example, with [`tsx`](https://tsx.is/), you can + +```sh +node --import tsx node_modules/prettier/bin/prettier.cjs . --write +``` + +or + +```sh +tsx node_modules/prettier/bin/prettier.cjs . --write +``` + +## Other Changes + +### JavaScript + +#### Improve word wrapping edge cases in JSX ([#16700](https://github.com/prettier/prettier/pull/16700) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```jsx +// Input +br_triggers_expression_break = + <div><br /> + text text text text text text text text text text text {this.props.type} </div> + +// Prettier 3.4 +br_triggers_expression_break = ( + <div> + <br /> + text text text text text text text text text text text { + this.props.type + }{" "} + </div> +); + +// Prettier 3.5 +br_triggers_expression_break = ( + <div> + <br /> + text text text text text text text text text text text{" "} + {this.props.type}{" "} + </div> +); +``` + +### Flow + +#### Support `const` type parameters in Flow ([#16947](https://github.com/prettier/prettier/pull/16947) by [@gkz](https://github.com/gkz)) + +<!-- prettier-ignore --> +```jsx +function f<const T>(): void {} + +// Prettier 3.4 +// Parse error + +// Prettier 3.5 +function f<const T>(): void {} +``` + +### CSS + +#### Break before breaking comma separated values ([#16907](https://github.com/prettier/prettier/pull/16907) by [@seiyab](https://github.com/seiyab)) + +<!-- prettier-ignore --> +```css +/* Input */ +a { + background-image: + linear-gradient(to bottom, rgb(255 255 0 / 50%), rgb(0 0 255 / 50%)), + url("catfront.png"); +} + +/* Prettier 3.4 */ +a { + background-image: linear-gradient( + to bottom, + rgb(255 255 0 / 50%), + rgb(0 0 255 / 50%) + ), + url("catfront.png"); +} + +/* Prettier 3.5 */ +a { + background-image: + linear-gradient(to bottom, rgb(255 255 0 / 50%), rgb(0 0 255 / 50%)), + url("catfront.png"); +} +``` + +### Vue + +#### Support `.prop` shorthand ([#16920](https://github.com/prettier/prettier/pull/16920) by [@fisker](https://github.com/fisker)) + +`.foo` is shorthand for `v-bind:foo.prop`. See [`v-bind` builtin directive](https://vuejs.org/api/built-in-directives.html#v-bind) for details. + +<!-- prettier-ignore --> +```vue +<!-- Input --> +<template> + <button .disabled=" a &&b ">Click!</button> +</template> + +<!-- Prettier 3.4 --> +<template> + <button .disabled=" a &&b ">Click!</button> +</template> + +<!-- Prettier 3.5 --> +<template> + <button .disabled="a && b">Click!</button> +</template> +``` + +### Angular + +#### Improve line breaks inside ICU blocks ([#16922](https://github.com/prettier/prettier/pull/16922) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +<span>The author is {gender, select, male {male} female {female} other {other}}</span> +<span>The author is <span>male consectetur adipiscing elit, sed do eiusmod</span></span> + +<!-- Prettier 3.4 --> +<span + >The author is {gender, select, male {male} female {female} other {other} +}</span> +<span + >The author is + <span>male consectetur adipiscing elit, sed do eiusmod</span></span +> + +<!-- Prettier 3.5 --> +<span + >The author is + {gender, select, male {male} female {female} other {other}}</span +> +<span + >The author is + <span>male consectetur adipiscing elit, sed do eiusmod</span></span +> +``` + +#### Fix extra new line inside ICU blocks ([#16922](https://github.com/prettier/prettier/pull/16922) by [@fisker](https://github.com/fisker)) + +<!-- prettier-ignore --> +```html +<!-- Input --> +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } +} + +<!-- Prettier 3.4 --> +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + + } +} + +<!-- Prettier 3.5 --> +{active, select, + true { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } + false { + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod temp + } +} +``` + +### Ember / Handlebars + +#### Handle `<style>` and `<pre>` tags in Handlebars/Glimmer ([#15087](https://github.com/prettier/prettier/pull/15087) by [@jurgenwerk](https://github.com/jurgenwerk)) + +<!-- prettier-ignore --> +```handlebars +{{!-- Input --}} +<pre> + cd ~ + ls + echo "hey" +</pre> +<style> + .red { color: red } + .blue { + color: red + } +</style> + +{{!-- Prettier 3.4 --}} +<pre> + cd ~ ls echo "hey" +</pre> +<style> + .red { color: red } .blue { color: blue } +</style> + +{{!-- Prettier 3.5 --}} +<pre> + cd ~ + ls + echo "hey" +</pre> +<style> + .red { + color: red; + } + .blue { + color: red; + } +</style> +``` + +### Markdown + +#### U+FF5E as CJK punctuation ([#16832](https://github.com/prettier/prettier/pull/16832) by [@tats-u](https://github.com/tats-u)) + +U+FF5E FULLWIDTH TILDE (~) is commonly used as a substitute for U+301C WAVE DASH (〜) in Windows for Japanese. Full width alphabets are less used in Markdown documents comparing to other types of documents (e.g. Microsoft Office documents), and the full width tilde is much less used as this purpose compared to full width alphabets and digits. Therefore, we can assume that the full width tilde in Markdown documents in the wild are a alternative form of the wave dash and a part of CJK punctuation. + +<!-- prettier-ignore --> +```markdown +<!-- Input (--prose-wrap=never) --> +a 字 a 字 a 字 +60~ +100点 +60〜 +100点 + +<!-- Prettier 3.4 --> +a 字 a 字 a 字 60~ 100点 60〜10点 + + +<!-- Prettier 3.5 --> +a 字 a 字 a 字 60~10点 60〜100点 +``` + +The first symbol between 60 and 100 in the above example is U+FF5E FULLWIDTH TILDE (~) and the second one is U+301C WAVE DASH (〜). + +### API + +#### Support read config from `package.json` with JSONC syntax on Bun ([#17041](https://github.com/prettier/prettier/pull/17041) by [@fisker](https://github.com/fisker)) + +[Bun 1.2 added JSONC support in `package.json`](https://bun.sh/blog/bun-v1.2#jsonc-support-in-package-json), in previous version of Prettier, it will ignore `prettier` config in it. Since Prettier 3.5, we can read `prettier` config from it without error. + +However, since it's just a Bun feature and not supported by Node.js, it can only work when running Prettier with Bun. + +Important note: Prettier uses [`json-stringify` parser](https://prettier.io/docs/options#parser) to format `package.json` file by default, to support formatting `package.json` file with JSONC syntax, you need override the parser option + +```js +export default { + overrides: [ + { + files: ["package.json"], + options: { + parser: "jsonc", + }, + }, + ], +}; +``` + +If you can't upgrade Prettier for some reason, you can still use JSONC syntax in `package.json`, but don't put your `prettier` config in it, you'll have to use another [configuration file](https://prettier.io/docs/configuration). + +### Miscellaneous + +#### Use ESM entrypoint for `require(ESM)` ([#16958](https://github.com/prettier/prettier/pull/16958) by [@tats-u](https://github.com/tats-u)) + +:::info + +This change has been reverted in v3.5.2, check [#17139](https://github.com/prettier/prettier/pull/17139) for details. + +::: + +Node.js 22.12 or later [can (experimentally) load ESM modules with `require` function](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require) without runtime flags. This change enables `require` to load Prettier without the CommonJS entrypoint with almost only the ability to import the ESM entrypoint. + +The feature to load ES modules with `require` is not completely stable but can be used without ExperimentalWarning as of Node 22.13. diff --git a/website/blog/2025-06-23-3.6.0.md b/website/blog/2025-06-23-3.6.0.md new file mode 100644 index 000000000000..6093f27f3504 --- /dev/null +++ b/website/blog/2025-06-23-3.6.0.md @@ -0,0 +1,1118 @@ +--- +authors: "sosukesuzuki" +title: "Prettier 3.6: Experimental fast CLI and new OXC and Hermes plugins!" +--- + +This release includes several important feature additions that we're excited to share with you. + +First, we're shipping a new experimental high-performance CLI behind a feature flag (`--experimental-cli`). This CLI was previously only available in `prettier@next`, but now you can enable it simply by using a flag. We encourage you to try it out and share your feedback! If you are interested in the internal implementation, please read [Prettier's CLI: Performance Deep Dive by Fabio](https://prettier.io/blog/2023/11/30/cli-deep-dive). + +Additionally, we're releasing two new official plugins: [`@prettier/plugin-oxc`](https://github.com/prettier/prettier/tree/main/packages/plugin-oxc) and [`@prettier/plugin-hermes`](https://github.com/prettier/prettier/tree/main/packages/plugin-hermes). These plugins are provided separately from Prettier's core. + +We want to extend our heartfelt gratitude to everyone who made this amazing release possible: [@fabiospampinato](https://github.com/fabiospampinato), [@43081j](https://github.com/43081j), and [@pralkarz](https://github.com/pralkarz) along with the new CLI contributors, [@boshen](https://github.com/boshen) and [@overlookmotel](https://github.com/overlookmotel) along with other OXC contributors, the [Flow](https://flow.org/) and [Hermes](https://github.com/facebook/hermes/blob/main/README.md) teams at Meta. Thank you all for your incredible contributions! + +We're excited to see how these new features enhance your development experience. Happy formatting! + +<!-- truncate --> + +## Highlights + +### CLI + +#### Support experimental CLI ([#17151](https://github.com/prettier/prettier/pull/17151), [#17396](https://github.com/prettier/prettier/pull/17396) by [@fisker](https://github.com/fisker)) {#change-17151} + +You may have already heard of or used our new [performance improved CLI](https://prettier.io/blog/2023/11/30/cli-deep-dive). From Prettier 3.6, you can now use it without installing unstable v4 version. + +```sh +# Run CLI with `--experimental-cli` +prettier . --check --experimental-cli + +# Or use environment variable `PRETTIER_EXPERIMENTAL_CLI=1` +PRETTIER_EXPERIMENTAL_CLI=1 prettier . --check +``` + +### JavaScript + +#### Added a new official plugin `@prettier/plugin-oxc` ([#17472](https://github.com/prettier/prettier/pull/17472), [#17483](https://github.com/prettier/prettier/pull/17483) by [@fisker](https://github.com/fisker)) {#change-17472} + +`@prettier/plugin-oxc` is based on [OXC](https://oxc.rs/)(A **fast** JavaScript and TypeScript parser in Rust). + +This plugin includes two new parsers `oxc` (JavaScript syntax) and `oxc-ts` (TypeScript syntax), to use this plugin: + +1. Install the plugin + + ```sh + yarn add --dev prettier @prettier/plugin-oxc + ``` + +2. Add the following to your `.prettierrc` file + + ```yaml + plugins: + - "@prettier/plugin-oxc" + ``` + +Due to package size limitations, this plugin is not included in the `prettier` package, it needs to be installed separately. + +For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-oxc). + +Many thanks to the OXC team([@boshen](https://github.com/boshen), [@overlookmotel](https://github.com/overlookmotel), and other contributors). + +### Flow + +#### Added a new official plugin `@prettier/plugin-hermes` ([#17520](https://github.com/prettier/prettier/pull/17520) by [@fisker](https://github.com/fisker)) {#change-17520} + +`@prettier/plugin-hermes` is based on [Hermes JS Engine](https://github.com/facebook/hermes/blob/main/README.md). + +This plugin includes a new parser `hermes` (Flow syntax), to use this plugin: + +1. Install the plugin + + ```sh + yarn add --dev prettier @prettier/plugin-hermes + ``` + +2. Add the following to your `.prettierrc` file + + ```yaml + plugins: + - "@prettier/plugin-hermes" + ``` + +Due to package size limitations, this plugin is not included in the `prettier` package, it needs to be installed separately. + +**We plan to make this as the default parser for Flow syntax support in v4, we'll also remove `babel-flow` parser in v4, please give it a try.** + +For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-hermes). + +Many thanks to the Hermes team. + +## Other Changes + +### JavaScript + +#### Add parentheses to `SequenceExpression` in `ReturnStatement` and `ExpressionStatement` ([#17085](https://github.com/prettier/prettier/pull/17085) by [@TYKevin](https://github.com/TYKevin)) {#change-17085} + +<!-- prettier-ignore --> +```jsx +// Input +function a() { + return ( a, b) +} + +(a(), b()); + +// Prettier 3.5 +function a() { + return a, b; +} + +a(), b(); + +// Prettier 3.6 +function a() { + return (a, b); +} + +(a(), b()); +``` + +#### Add parentheses to `AssignmentExpression` in class property keys ([#17145](https://github.com/prettier/prettier/pull/17145) by [@fisker](https://github.com/fisker)) {#change-17145} + +Previously we only add parentheses to `AssignmentExpression` in object keys, but not in class property keys. Thanks to [Biome](https://biomejs.dev/formatter/differences-with-prettier/#prettier-has-an-inconsistent-behavior-for-assignment-in-computed-keys) for bringing our attention to this inconsistency. + +<!-- prettier-ignore --> +```jsx +// Input +a = { + [(x = "key")]: 1, +} + +class A { + [(x = "property")] = 1; + [(x = "method")]() {} +} + +// Prettier 3.5 +a = { + [(x = "key")]: 1, +}; + +class A { + [x = "property"] = 1; + [(x = "method")]() {} +} + +// Prettier 3.6 +a = { + [(x = "key")]: 1, +}; + +class A { + [(x = "property")] = 1; + [(x = "method")]() {} +} +``` + +#### Add parentheses to numbers in optional member expression ([#17190](https://github.com/prettier/prettier/pull/17190) by [@fisker](https://github.com/fisker)) {#change-17190} + +There is an inconsistency when formatting member expression where the object is a number before Prettier 3.6. + +When using `babel` parser(and other Babel based parsers), we print the number as unparenthesized, when using `typescript` parser(and other ESTree parsers), we print it as parenthesized. + +Technically parentheses are not needed, but if we print it as `1?.toString()` and later users realize it's unnecessary to use `?.`, users can't simply remove the question mark because `1.toString()` will raise a `SyntaxError`, for this reason, we decide to always put parentheses around it. + +<!-- prettier-ignore --> +```jsx +// Input +(1)?.toString(); +(1.5)?.toString(); + +// Prettier 3.5 (--parser=babel) +1?.toString(); +1.5?.toString(); + +// Prettier 3.5 (--parser=typescript) +(1)?.toString(); +(1.5)?.toString(); + +// Prettier 3.6 +(1)?.toString(); +(1.5)?.toString(); +``` + +#### Removed support for experimental `Records & Tuples` ([#17363](https://github.com/prettier/prettier/pull/17363) by [@fisker](https://github.com/fisker)) {#change-17363} + +The ES proposal [JavaScript Records & Tuples Proposal](https://github.com/tc39/proposal-record-tuple) has been withdrawn. + +- [Disclaimer about non-standard syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) + +#### Preserve spaces between CSS words and embedded expression ([#17398](https://github.com/prettier/prettier/pull/17398) by [@sosukesuzuki](https://github.com/sosukesuzuki)) {#change-17398} + +<!-- prettier-ignore --> +```jsx +// Input +const Heading = styled.h1` + font-size: var(--font-size-h${level}); +`; + +// Prettier 3.5 +const Heading = styled.h1` + font-size: var(--font-size-h ${level}); +`; + +// Prettier 3.6 +const Heading = styled.h1` + font-size: var(--font-size-h${level}); +`; +``` + +#### Fix inconsistent assignment format ([#17469](https://github.com/prettier/prettier/pull/17469) by [@fisker](https://github.com/fisker)) {#change-17469} + +<!-- prettier-ignore --> +```jsx +// Input +didScheduleRenderPhaseUpdateDuringThisPassFoo = didScheduleRenderPhaseUpdate = true + +// Prettier 3.5 (--parser=babel) +didScheduleRenderPhaseUpdateDuringThisPassFoo = + didScheduleRenderPhaseUpdate = true; + +// Prettier 3.5 (--parser=typescript) +didScheduleRenderPhaseUpdateDuringThisPassFoo = didScheduleRenderPhaseUpdate = + true; + +// Prettier 3.6 +didScheduleRenderPhaseUpdateDuringThisPassFoo = + didScheduleRenderPhaseUpdate = true; +``` + +#### Fix inconsistent member chain format ([#17470](https://github.com/prettier/prettier/pull/17470) by [@fisker](https://github.com/fisker)) {#change-17470} + +<!-- prettier-ignore --> +```jsx +// Input +s.get(u)?.trigger({ triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123 }); + +// Prettier 3.5 (--parser=babel) +s.get(u)?.trigger({ + triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123, +}); + +// Prettier 3.5 (--parser=typescript) +s + .get(u) + ?.trigger({ triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123 }); + +// Prettier 3.6 +s.get(u)?.trigger({ + triggerKind: y.SignatureHelpTriggerKind.InvokeFooBarBaz123, +}); +``` + +#### Fix optional chaining as computed key ([#17486](https://github.com/prettier/prettier/pull/17486) by [@fisker](https://github.com/fisker)) {#change-17486} + +<!-- prettier-ignore --> +```jsx +// Input +const a = { [y?.z]() {} }; +class A { [y?.z]() {} }; + +// Prettier 3.5 +const a = { [y?.z]?() {} }; +class A { + [y?.z]?() {} +} + +// Prettier 3.6 +const a = { [y?.z]() {} }; +class A { + [y?.z]() {} +} +``` + +#### Support type cast comments for `acorn` and `meriyah` parser ([#17491](https://github.com/prettier/prettier/pull/17491), [#17566](https://github.com/prettier/prettier/pull/17566) by [@ArnaudBarre](https://github.com/ArnaudBarre), [#17600](https://github.com/prettier/prettier/pull/17600) by #fisker) {#change-17491} + +This was previously only supported by the Babel parser. + +<!-- prettier-ignore --> +```js +// Input +/** @type {MyType} */ (x).foo; + +// Prettier 3.5 (--parser=acorn|meriyah) +/** @type {MyType} */ x.foo; + +// Prettier 3.6 +/** @type {MyType} */ (x).foo; +``` + +#### Fix unstable comment format in tagged template literal ([#17510](https://github.com/prettier/prettier/pull/17510) by [@fisker](https://github.com/fisker)) {#change-17510} + +<!-- prettier-ignore --> +```js +// Input +foo + // Comment + `x` + +// Prettier 3.5 (First format) +foo// Comment +`x`; + +// Prettier 3.5 (Second format) +foo // Comment +`x`; + +// Prettier 3.6 +foo // Comment +`x`; +``` + +#### Improve consistency for JSX in optional method call ([#17616](https://github.com/prettier/prettier/pull/17616) by [@seiyab](https://github.com/seiyab)) {#change-17616} + +<!-- prettier-ignore --> +```jsx +// Input +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + ?.map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +// Prettier 3.5 (ESTree based parsers like espree and typescript) +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + ?.map((_, i) => <h2 key={i}>{i + 1}</h2>)} + </div> +</SuspendyTree>; + +// Prettier 3.5 (babel and babel-ts parser) +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + ?.map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; + +// Prettier 3.6 (parsers of both types) +<SuspendyTree> + <div style={{ height: 200, overflow: "scroll" }}> + {Array(20) + .fill() + ?.map((_, i) => ( + <h2 key={i}>{i + 1}</h2> + ))} + </div> +</SuspendyTree>; +``` + +### TypeScript + +#### Support import type attribute in `TSImportType` ([#16881](https://github.com/prettier/prettier/pull/16881) by [@fisker](https://github.com/fisker)) {#change-16881} + +<!-- prettier-ignore --> +```jsx +// Input +type A = import("foo", {with: {type: "json"}}) + +// Prettier 3.5 +type A = import("foo") + +// Prettier 3.6 +type A = import("foo", { with: { type: "json" } }); +``` + +#### Fix comments in logical expression and intersection type ([#17193](https://github.com/prettier/prettier/pull/17193) by [@fisker](https://github.com/fisker)) {#change-17193} + +<!-- prettier-ignore --> +```jsx +// Input +export type ErrorLike = + SerializedProps<Error> & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +// Prettier 3.5 +export type ErrorLike = + SerializedProps<Error> & // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +// Prettier 3.5 (second format) +export type ErrorLike = + SerializedProps<Error> & // it to try and pinpoint additional reasoning for failures such as Node's fetch. // cause is a new addition to Error that is not yet available in all runtimes. We have added + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; + +// Prettier 3.6 +export type ErrorLike = SerializedProps<Error> & + // cause is a new addition to Error that is not yet available in all runtimes. We have added + // it to try and pinpoint additional reasoning for failures such as Node's fetch. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + { cause?: unknown }; +``` + +#### Improve new line detect in mapped type ([#17498](https://github.com/prettier/prettier/pull/17498) by [@fisker](https://github.com/fisker)) {#change-17498} + +<!-- prettier-ignore --> +```jsx +// Input +type A = { readonly + [A in B]: T} + +// Prettier 3.5 +type A = { + readonly [A in B]: T; +}; + +// Prettier 3.6 +type A = { readonly [A in B]: T }; +``` + +#### Don't print extra semicolon after `prettier-ignore`d index-signature ([#17538](https://github.com/prettier/prettier/pull/17538) by [@sosukesuzuki](https://github.com/sosukesuzuki)) {#change-17538} + +<!-- prettier-ignore --> +```tsx +// Input +type foo = { + // prettier-ignore + [key: string]: bar; +}; + +// Prettier 3.5 +type foo = { + // prettier-ignore + [key: string]: bar;; +}; + +// Prettier 3.6 +type foo = { + // prettier-ignore + [key: string]: bar; +}; +``` + +### Flow + +#### Fix missing parentheses in `ConditionalTypeAnnotation` ([#17196](https://github.com/prettier/prettier/pull/17196) by [@fisker](https://github.com/fisker)) {#change-17196} + +<!-- prettier-ignore --> +```jsx +// Input +type T<U> = 'a' | ('b' extends U ? 'c' : empty); +type T<U> = 'a' & ('b' extends U ? 'c' : empty); + +// Prettier 3.5 +type T<U> = "a" | "b" extends U ? "c" : empty; +type T<U> = "a" & "b" extends U ? "c" : empty; + +// Prettier 3.6 +type T<U> = "a" | ("b" extends U ? "c" : empty); +type T<U> = "a" & ("b" extends U ? "c" : empty); +``` + +### JSON + +#### Allow format comment-only JSONC files ([#17269](https://github.com/prettier/prettier/pull/17269) by [@fisker](https://github.com/fisker)) {#change-17269} + +<!-- prettier-ignore --> +```jsonc +// Input +// Comment + +// Prettier 3.5 +SyntaxError: Unexpected token (1:11) +> 1 | // Comment + | ^ + +// Prettier 3.6 +// Comment +``` + +#### Forbid parenthesized expressions ([#17598](https://github.com/prettier/prettier/pull/17598) by [@fisker](https://github.com/fisker)) {#change-17598} + +<!-- prettier-ignore --> +```json +// Input +[1, (2)] + +// Prettier 3.5 +[1, 2] + +// Prettier 3.6 +SyntaxError: 'ParenthesizedExpression' is not allowed in JSON. (1:5) +> 1 | [1, (2)] + | ^^^ +``` + +### CSS + +#### Support `@utility` directive for Tailwind ([#17362](https://github.com/prettier/prettier/pull/17362) by [@sosukesuzuki](https://github.com/sosukesuzuki)) {#change-17362} + +This change supports `@utility` directive for Tailwind CSS V4. + +<!-- prettier-ignore --> +```css +/* Input */ +@utility tab-* { + tab-size: --value(--tab-size-*); +} + +/* Prettier 3.5 */ +@utility tab-* { + tab-size: --value(--tab-size- *); +} + +/* Prettier 3.6 */ +@utility tab-* { + tab-size: --value(--tab-size-*); +} +``` + +#### Remove extra indentation for `:has` pseudo call ([#17541](https://github.com/prettier/prettier/pull/17541) by [@sosukesuzuki](https://github.com/sosukesuzuki)) {#change-17541} + +<!-- prettier-ignore --> +```css +/* Input */ +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] +) { + display: none; +} + +/* Prettier 3.5 */ +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] + ) { + display: none; +} + +/* Prettier 3.6 */ +li:has( + path[d="M544,272H480V150.627L523.314,107.314A16,16,0,0,0,500.686,84.687L457.373,128H415a127.00381,127.00381,0,1,0-254,0H118.627L75.314,84.687A16,16,0,1,0,52.686,107.314L96,150.627V272H32a16,16,0,0,0,0,32H96v24a174.98856,174.98856,0,0,0,30.484,98.889L68.687,484.686a15.99972,15.99972,0,1,0,22.627,22.627l55.616-55.616A175.45165,175.45165,0,0,0,272,504h32a175.45165,175.45165,0,0,0,125.07-52.303l55.616,55.616a15.99972,15.99972,0,0,0,22.627-22.627l-57.797-57.797A174.98856,174.98856,0,0,0,480,328V304h64a16,16,0,0,0,0-32ZM288,32.01263A95.99568,95.99568,0,0,1,383,128H193A95.99568,95.99568,0,0,1,288,32.01263ZM448,328c0,79.401-64.598,144-144,144V236a12.00052,12.00052,0,0,0-12-12h-8a12.00052,12.00052,0,0,0-12,12V472c-79.402,0-144-64.599-144-144V160H448Z"] +) { + display: none; +} +``` + +### Less + +#### Fix function argument incorrectly lowercased ([#17502](https://github.com/prettier/prettier/pull/17502) by [@fisker](https://github.com/fisker)) {#change-17502} + +<!-- prettier-ignore --> +```less +// Input +.what { + .make-modifier(1A, "1a.png"); + .make-modifier(AA, "1a.png"); +} + +// Prettier 3.5 +.what { + .make-modifier(1a, "1a.png"); + .make-modifier(AA, "1a.png"); +} + +// Prettier 3.6 +.what { + .make-modifier(1A, "1a.png"); + .make-modifier(AA, "1a.png"); +} +``` + +### HTML + +#### Fix formatting when tag name is an object prototype property ([#17501](https://github.com/prettier/prettier/pull/17501) by [@fisker](https://github.com/fisker)) {#change-17501} + +<!-- prettier-ignore --> +```html +<!-- Input --> +<constructor> + text +</constructor> + +<!-- Prettier 3.5 --> +TypeError: Vn(...).startsWith is not a function + +<!-- Prettier 3.6 --> +<constructor> text </constructor> +``` + +### Angular + +#### Support `TemplateLiteral` introduced in Angular 19.2 ([#17238](https://github.com/prettier/prettier/pull/17238) by [@fisker](https://github.com/fisker)) {#change-17238} + +Angular 19.2 added [support for `TemplateLiteral`](https://blog.angular.dev/angular-19-2-is-now-available-673ec70aea12#ed7b). + +<!-- prettier-ignore --> +```html +<!-- Input --> +<div>{{ `Hello, ${ +getName('world')}` }}</div> + +<!-- Prettier 3.5 --> +<div> + {{ `Hello, ${ +getName('world')}` }} +</div> + +<!-- Prettier 3.6 --> +<div>{{ `Hello, ${getName("world")}` }}</div> +``` + +#### Remove extra colon after `track` in angular `@for` control-flow ([#17280](https://github.com/prettier/prettier/pull/17280) by [@claudio-herger](https://github.com/claudio-herger)) {#change-17280} + +<!-- prettier-ignore --> +```angular +// Input +@for (item of items; let i = $index; let count = $count; track block) {} + +// Prettier 3.5 +@for (item of items; let i = $index; let count = $count; track: block) {} + +// Prettier 3.6 +@for (item of items; let i = $index; let count = $count; track block) {} +``` + +#### Support Angular 20 ([#17534](https://github.com/prettier/prettier/pull/17534) by [@fisker](https://github.com/fisker)) {#change-17534} + +<!-- prettier-ignore --> +```angular +// Input +{{ + ( (a in (b))) +}} +{{ + ( (tag ` a ${ b } \u0063 `)) +}} +{{ + ( (` a ${ b } \u0063 `)) +}} +{{ void(1 + 2) }} + +// Prettier 3.5 +The new syntax is not correctly recognized. + +// Prettier 3.6 +{{ a in b }} +{{ tag` a ${b} \u0063 ` }} +{{ ` a ${b} \u0063 ` }} +{{ void (1 + 2) }} +``` + +### MJML + +#### Enabling CSS formatting within `<mj-style>` tag ([#17338](https://github.com/prettier/prettier/pull/17338) by [@iryusa](https://github.com/iryusa)) {#change-17338} + +<!-- prettier-ignore --> +```mjml +<!-- Input --> +<mj-style> +.hello { + color: blue; + border: 1px solid blue; +font-size:12px; +} p { font-size: 14px; } +</mj-style> + +<!-- Prettier 3.5 --> +<mj-style> + .hello { color: blue; border: 1px solid blue; font-size:12px; } p { font-size: + 14px; } +</mj-style> + +<!-- Prettier 3.6 --> +<mj-style> + .hello { + color: blue; + border: 1px solid blue; + font-size: 12px; + } + p { + font-size: 14px; + } +</mj-style> +``` + +#### Correctly parse `<mj-style>` and `<mj-raw>` ([#17400](https://github.com/prettier/prettier/pull/17400) by [@fisker](https://github.com/fisker)) {#change-17400} + +<!-- prettier-ignore --> +```html +<!-- Input --> +<mj-style> + a::before { + content: "</p>"; + } +</mj-style> + +<!-- Prettier 3.5 --> +SyntaxError: Unexpected closing tag "p". + +<!-- Prettier 3.6 --> +Correctly parsed as CSS. +``` + +### Markdown + +#### Fix adjacent markdown syntax in blockquote ([#16596](https://github.com/prettier/prettier/pull/16596) by [@fiji-flo](https://github.com/fiji-flo)) {#change-16596} + +<!-- prettier-ignore --> +```md +<!-- Input --> +> `x` +> `y` + +> _x_ +> _y_ + +> [foo](http://foo) +> [bar](http://bar) + +> `this` behaves +> `correctly` + +<!-- Prettier 3.5 --> +> `x` > `y` + +> _x_ > _y_ + +> [foo](http://foo) > [bar](http://bar) + +> `this` behaves `correctly` + +<!-- Prettier 3.6 --> +> `x` `y` + +> _x_ _y_ + +> [foo](http://foo) [bar](http://bar) + +> `this` behaves `correctly` +``` + +#### Fix markdown inserts unexpected newline in lists ([#16637](https://github.com/prettier/prettier/pull/16637) by [@byplayer](https://github.com/byplayer)) {#change-16637} + +<!-- prettier-ignore --> +```md +<!-- Input --> +- Level 1 + - Level 1-1 + +- Level 2 + +<!-- Prettier 3.5 --> +- Level 1 + + - Level 1-1 + +- Level 2 + + +<!-- Prettier 3.6 --> +- Level 1 + - Level 1-1 + +- Level 2 + +``` + +#### Fix strong emphasis ([#17143](https://github.com/prettier/prettier/pull/17143) by [@fiji-flo](https://github.com/fiji-flo)) {#change-17143} + +Most markdown implementations don't support `1**_2_**3` so prefer `1***2***3`. + +<!-- prettier-ignore --> +```md +<!-- Input --> +1***2***3 +1**_2_**3 + +<!-- Prettier 3.5 --> +1**_2_**3 +1**_2_**3 + +<!-- Prettier 3.6 --> +1***2***3 +1***2***3 +``` + +### YAML + +#### Do not add line break before empty map or sequence ([#16074](https://github.com/prettier/prettier/pull/16074) by [@BapRx](https://github.com/BapRx)) {#change-16074} + +<!-- prettier-ignore --> +```yaml +# Input +--- +myDict: {} + # comment +myList: [] + # comment + +# Prettier 3.5 +--- +myDict: + {} + # comment +myList: + [] + # comment + +# Prettier 3.6 +--- +myDict: {} + # comment +myList: [] + # comment +``` + +### API + +#### Accept `URL` in `plugins` option ([#17166](https://github.com/prettier/prettier/pull/17166) by [@fisker](https://github.com/fisker)) {#change-17166} + +`plugins` option now accepts [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string that starts with `file:` in all public APIs. + +```js +// `URL` +await prettier.check("foo", { + parser: "my-cool-parser", + plugins: [new URL("./path/to/plugin.js", import.meta.url)], +}); +await prettier.format("foo", { + parser: "my-cool-parser", + plugins: [new URL("./path/to/plugin.js", import.meta.url)], +}); +await prettier.formatWithCursor("foo", { + parser: "my-cool-parser", + cursorOffset: 2, + plugins: [new URL("./path/to/plugin.js", import.meta.url)], +}); +await prettier.getFileInfo("/path/to/file", { + plugins: [new URL("./path/to/plugin.js", import.meta.url)], +}); +await prettier.getSupportInfo({ + plugins: [new URL("./path/to/plugin.js", import.meta.url)], +}); + +// URL string +await prettier.check("foo", { + parser: "my-cool-parser", + plugins: ["file:///path/to/plugin.js"], +}); +await prettier.format("foo", { + parser: "my-cool-parser", + plugins: ["file:///path/to/plugin.js"], +}); +await prettier.formatWithCursor("foo", { + parser: "my-cool-parser", + cursorOffset: 2, + plugins: ["file:///path/to/plugin.js"], +}); +await prettier.getFileInfo("/path/to/file", { + plugins: ["file:///path/to/plugin.js"], +}); +await prettier.getSupportInfo({ + plugins: ["file:///path/to/plugin.js"], +}); +``` + +#### Accept `URL` as custom config file in `resolveConfig` ([#17167](https://github.com/prettier/prettier/pull/17167) by [@fisker](https://github.com/fisker)) {#change-17167} + +[`prettier.resolveConfig()`](https://prettier.io/docs/api#prettierresolveconfigfileurlorpath--options) now accepts an [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string that starts with `file:` as custom config file location. + +```js +// `URL` +await prettier.resolveConfig("path/to/file", { + config: new URL("/path/to/prettier-config-file", import.meta.url), +}); + +// URL string +await prettier.resolveConfig("path/to/file", { + config: "file:///path/to/prettier-config-file", +}); +``` + +#### Stop interpret `*.frag` files as JavaScript files ([#17178](https://github.com/prettier/prettier/pull/17178) by [@fisker](https://github.com/fisker)) {#change-17178} + +`*.frag` was interpreted as JavaScript files, but `.frag` is also used in GLSL([OpenGL Shading Language](https://en.wikipedia.org/wiki/OpenGL_Shading_Language)). It causes error when Prettier try to format them as JavaScript files. + +Since Prettier 3.6, `*.frag` files except `*.start.frag`, `*.end.frag`, `start.frag`, and `end.frag` are no longer treated as JavaScript files. + +If you have JavaScript files with `.frag` that do not match the patterns mentioned above, you can config with `overrides`. + +```js +export default { + overrides: { + files: "**/*.frag", + options: { + parser: "babel", + }, + }, +}; +``` + +#### Add `isSupported` function support for `languages` API ([#17331](https://github.com/prettier/prettier/pull/17331) by [@JounQin](https://github.com/JounQin), [#17490](https://github.com/prettier/prettier/pull/17490) by [@fisker](https://github.com/fisker)) {#change-17331} + +Previously, `languages` API for custom plugins only supported inferring parser based on the file basename or extension. + +Prettier 3.6 added `isSupported: (options: { filepath: string }) => boolean` function to allow plugin check if file is supported based on the full path (eg: files in a specific directory). + +:::note + +Prettier can not ensure that `filepath` exists on disk.\ +When using from APIs(eg: `prettier.format()`), Prettier can not ensure it's a valid path either. + +::: + +If no `isSupported` provided, it just behaves the same way as before. + +```js +export const languages = [ + { + name: "foo", + parsers: ["foo"], + isSupported: ({ filepath }) => filepath.includes(".foo"), + }, +]; +``` + +#### Add `mjml` parser ([#17339](https://github.com/prettier/prettier/pull/17339) by [@fisker](https://github.com/fisker)) {#change-17339} + +We already support [MJML](https://mjml.io/) in previous version with `html` parser, in order to distinguish MJML-specific a new `mjml` parser added. + +#### Ignore files with `--check-ignore-pragma` ([#17344](https://github.com/prettier/prettier/pull/17344) by [@wnayes](https://github.com/wnayes)) {#change-17344} + +Individual files can now opt out of formatting via `@noformat` or `@noprettier` "pragma" comments at the top of the file. + +To enable this feature, use the new option [`--check-ignore-pragma`](https://prettier.io/docs/options#check-ignore-pragma) (`checkIgnorePragma` via configuration or API). + +Language plugins can [implement support](https://prettier.io/docs/plugins#parsers) for this feature. Most built-in parsers, including JavaScript (TypeScript), CSS, HTML, JSON, Markdown (MDX), YAML, and GraphQL, were updated to support this feature. + +<!-- prettier-ignore --> +```jsx +/** + * @noformat + */ + +export default matrix( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 +); +``` + +#### Fix plugin loading in `prettier.getFileInfo()` ([#17548](https://github.com/prettier/prettier/pull/17548) by [@fisker](https://github.com/fisker)) {#change-17548} + +In previous version, `prettier.getFileInfo()` only read `parser` config from `.prettierrc`, but doesn't load plugins to infer parser from plugin `languages`, Prettier 3.6 fixed it. + +```js +// prettier-plugin-foo +export const languages = [ + { + parsers: ["foo"], + extensions: [".foo"], + }, +]; +``` + +```yaml +# .prettierrc +plugins: + - prettier-plugin-foo +``` + +```console +prettier --file-info file.foo + +# Prettier 3.5 +{ "ignored": false, "inferredParser": null } + +# Prettier 3.6 +{ "ignored": false, "inferredParser": "foo" } +``` + +#### Allow plugin to override builtin parsers when inferring parser ([#17549](https://github.com/prettier/prettier/pull/17549) by [@fisker](https://github.com/fisker)) {#change-17549} + +Previously when inferring parser for file, builtin plugins are checked first, so plugins are not able to override parsers for files like `.js`. + +```js +// prettier-plugin-foo +export const languages = [ + { + parsers: ["foo"], + extensions: [".js"], + }, +]; +``` + +```js +// prettier.config.js +import * as prettierPluginFoo from "prettier-plugin-foo"; + +export default { + plugins: [prettierPluginFoo], +}; +``` + +```console +prettier --file-info file.js + +# Prettier 3.5 +{ "ignored": false, "inferredParser": "babel" } + +# Prettier 3.6 +{ "ignored": false, "inferredParser": "foo" } +``` + +### CLI + +#### Forbid use `--config` and `--no-config` together ([#12221](https://github.com/prettier/prettier/pull/12221) by [@Balastrong](https://github.com/Balastrong)) {#change-12221} + +```console +$ prettier --config=.prettierrc --no-config . +[error] Cannot use --no-config and --config together. +``` + +#### Ignore file modified time when `--cache-strategy=content` ([#17438](https://github.com/prettier/prettier/pull/17438) by [@fisker](https://github.com/fisker)) {#change-17438} + +In previous version, when using `--cache-strategy=content`, if the file modified time changed, it still gets re-formatted even the file content didn't change, Prettier 3.6 fixed it. + +#### Fix result message for files can not be formatted ([#17505](https://github.com/prettier/prettier/pull/17505) by [@fisker](https://github.com/fisker)) {#change-17505-2} + +```console +touch unknown +prettier --check unknown + +# Prettier 3.5 +Checking formatting... +unknown +[error] No parser could be inferred for file "</path/to/unknown>". +All matched files use Prettier code style! + +# Prettier 3.6 +Checking formatting... +unknown +[error] No parser could be inferred for file "</path/to/unknown>". +Error occurred when checking code style in the above file. +``` + +#### Fix exitCode when parser cannot infer ([#17505](https://github.com/prettier/prettier/pull/17505) by [@fisker](https://github.com/fisker)) {#change-17505} + +```console +touch unknown +prettier --check unknown > /dev/null;echo $? + +# Prettier 3.5 +[error] No parser could be inferred for file "</path/to/unknown>". +0 + +# Prettier 3.6 +[error] No parser could be inferred for file "</path/to/unknown>". +2 +``` + +### Miscellaneous + +#### Fix embedded format with `cursorOffset` ([#17254](https://github.com/prettier/prettier/pull/17254) by [@fisker](https://github.com/fisker)) {#change-17254} + +<!-- prettier-ignore --> +````md +<!-- Input (--cursor-offset=1) --> +# Angular note + +```typescript + import {Component} from '@angular/core'; + + @Component({ + selector: 'app-root', + standalone: true, + imports: [], + template: ` + <h1> + + {{ title }}</h1> + `, + styleUrls: ['./app.component.css'], + }) + export class AppComponent { + title = 'default'; + } +``` + +<!-- Prettier 3.5 --> +Error: There are too many 'cursor' in doc. + +<!-- Prettier 3.6 --> +# Angular note + +```typescript +import { Component } from "@angular/core"; + +@Component({ + selector: "app-root", + standalone: true, + imports: [], + template: ` + <h1> + {{ title }} + </h1> + `, + styleUrls: ["./app.component.css"], +}) +export class AppComponent { + title = "default"; +} +``` +```` diff --git a/website/blog/assets/markdown-tables.gif b/website/blog/assets/markdown-tables.gif index 39439fccea04..c3c9f79c251d 100644 Binary files a/website/blog/assets/markdown-tables.gif and b/website/blog/assets/markdown-tables.gif differ diff --git a/website/blog/assets/prettier-architecture.png b/website/blog/assets/prettier-architecture.png new file mode 100644 index 000000000000..ca5f0cb10b71 Binary files /dev/null and b/website/blog/assets/prettier-architecture.png differ diff --git a/website/blog/assets/prettier-bench.png b/website/blog/assets/prettier-bench.png new file mode 100644 index 000000000000..06aa5b5a4daf Binary files /dev/null and b/website/blog/assets/prettier-bench.png differ diff --git a/website/blog/authors.yml b/website/blog/authors.yml new file mode 100644 index 000000000000..06708f6f5f71 --- /dev/null +++ b/website/blog/authors.yml @@ -0,0 +1,95 @@ +vjeux: + name: Christopher Chedeau + url: https://github.com/vjeux + image_url: https://github.com/vjeux.png + socials: + x: vjeux + github: vjeux + +suchipi: + name: Lily Skye + url: https://github.com/suchipi + image_url: https://github.com/suchipi.png + socials: + x: suchipi + github: suchipi + +azz: + name: Lucas Azzola + url: https://github.com/azz + image_url: https://github.com/azz.png + socials: + x: lucasazzola + github: suchipi + +duailibe: + name: Lucas Duailibe + url: https://github.com/duailibe + image_url: https://github.com/duailibe.png + socials: + x: duailibe + github: duailibe + +czosel: + name: Christian Zosel + url: https://github.com/czosel + image_url: https://github.com/czosel.png + socials: + x: chrzosel + github: czosel + +ikatyang: + name: Ika + url: https://github.com/ikatyang + image_url: https://github.com/ikatyang.png + socials: + x: ikatyang + github: ikatyang + +lydell: + name: Simon Lydell + url: https://github.com/lydell + image_url: https://github.com/lydell.png + socials: + x: SimonLydell + github: lydell + +thorn0: + name: Georgii Dolzhykov + url: https://github.com/thorn0 + image_url: https://github.com/thorn0.png + socials: + x: thorn0 + github: thorn0 + +sosukesuzuki: + name: Sosuke Suzuki + url: https://github.com/sosukesuzuki + image_url: https://github.com/sosukesuzuki.png + socials: + x: __sosukesuzuki + github: sosukesuzuki + +kddnewton: + name: Kevin Newton + url: https://github.com/kddnewton + image_url: https://github.com/kddnewton.png + socials: + x: kddnewton + github: kddnewton + +rattrayalex: + name: Alex Rattray + url: https://github.com/rattrayalex + image_url: https://github.com/rattrayalex.png + socials: + x: RattrayAlex + github: rattrayalex + +fabiospampinato: + name: Fabio Spampinato + url: https://github.com/fabiospampinato + image_url: https://github.com/fabiospampinato.png + socials: + x: fabiospampinato + github: fabiospampinato diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100644 index 97a5846c8b9d..000000000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; - -const React = require("react"); -const PropTypes = require("prop-types"); - -const GithubButton = (props) => ( - <a - className="github-button" - href={props.config.githubUrl} - data-icon="octicon-star" - data-show-count="true" - aria-label="Star this project on GitHub" - > - Star - </a> -); - -GithubButton.propTypes = { - config: PropTypes.object, -}; - -class Footer extends React.Component { - url(path) { - const language = this.props.language || "en"; - return `${this.props.config.baseUrl}docs/${language}${path}`; - } - - usersUrl() { - const language = this.props.language || "en"; - return `${this.props.config.baseUrl}${language}/users`; - } - - render() { - return ( - <footer className="footerSection nav-footer" id="footer"> - <section className="sitemap"> - <a href={this.props.config.baseUrl} className="nav-home"> - <img - src={this.props.config.baseUrl + this.props.config.footerIcon} - alt={this.props.config.title} - /> - </a> - <div> - <h5>Docs</h5> - <a href={this.url("/index.html")}>About</a> - <a href={this.url("/install.html")}>Usage</a> - <br /> - <a href="https://www.netlify.com"> - <img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" /> - </a> - </div> - <div> - <h5>Community</h5> - <a href={this.usersUrl()}>User Showcase</a> - <a - href="http://stackoverflow.com/questions/tagged/prettier" - target="_blank" - rel="noopener noreferrer" - > - Stack Overflow - </a> - <a href="https://twitter.com/PrettierCode"> - @PrettierCode on Twitter - </a> - <object - type="image/svg+xml" - data="https://img.shields.io/twitter/follow/prettiercode.svg?label=Follow+Prettier&style=social" - > - <a href="https://twitter.com/intent/follow?screen_name=prettiercode"> - <img - alt="Follow Prettier on Twitter" - src="https://img.shields.io/twitter/follow/prettiercode.png?label=Follow+Prettier&style=social" - /> - </a> - </object> - </div> - <div> - <h5>More</h5> - <a href={this.props.config.baseUrl + "blog"}>Blog</a> - <a href={this.props.config.githubUrl}>GitHub</a> - <a href={this.props.config.githubUrl + "/issues"}>Issues</a> - <GithubButton config={this.props.config} /> - </div> - </section> - </footer> - ); - } -} - -Footer.propTypes = { - language: PropTypes.string, - config: PropTypes.object, -}; - -module.exports = Footer; diff --git a/website/data/editors.yml b/website/data/editors.yml index 0515ac978d2b..6d14b8f82fb0 100644 --- a/website/data/editors.yml +++ b/website/data/editors.yml @@ -1,9 +1,3 @@ -- image: /images/editors/editor_atom.svg - name: Atom - content: | - [`prettier-atom`](https://github.com/prettier/prettier-atom) - [`mprettier`](https://github.com/t9md/atom-mprettier) - [`miniprettier`](https://github.com/duailibe/atom-miniprettier) - image: "/images/editors/editor_emacs.svg" name: Emacs content: | @@ -17,7 +11,8 @@ - image: /images/editors/editor_nova.svg name: Nova content: | - [`Prettier`](https://extensions.panic.com/extensions/alexanderweiss/alexanderweiss.prettier) + [`Prettier`](https://extensions.panic.com/extensions/alexanderweiss/alexanderweiss.prettier/) + [`Prettier⁺`](https://extensions.panic.com/extensions/stonerl/stonerl.prettier/) - image: /images/editors/editor_sublime.svg name: Sublime Text content: | @@ -40,4 +35,4 @@ - image: /images/editors/editor_webstorm.svg name: WebStorm content: | - [Built-in support](https://prettier.io/docs/en/webstorm.html) + [Built-in support](https://prettier.io/docs/webstorm) diff --git a/website/data/languages.yml b/website/data/languages.yml index 0e2d60412475..17a22c8a575c 100644 --- a/website/data/languages.yml +++ b/website/data/languages.yml @@ -1,5 +1,4 @@ - name: JavaScript - showName: true image: /images/languages/tools_js.svg variants: - "[JSX](https://facebook.github.io/jsx/)" @@ -7,14 +6,12 @@ - "[TypeScript](https://www.typescriptlang.org)" - "[JSON](https://json.org)" - name: HTML - showName: true image: /images/languages/tools_html.svg variants: - "[Vue](https://vuejs.org)" - "[Angular](https://angular.io)" - "[Ember / Handlebars](https://emberjs.com)" - name: CSS - showName: true image: /images/languages/tools_css.svg variants: - "[Less](http://lesscss.org)" @@ -23,25 +20,21 @@ - "[`styled-jsx`](https://npmjs.com/styled-jsx)" - name: GraphQL nameLink: https://graphql.org - showName: true image: /images/languages/tools_gql.svg variants: - "[GraphQL Schemas](https://graphql.org/learn/schema/)" - name: Markdown - showName: true image: /images/languages/tools_md.svg variants: - "[CommonMark](https://commonmark.org)" - "[GitHub-Flavored Markdown](https://github.github.com/gfm/)" - - "[MDX](https://mdxjs.com)" + - "[MDX v1](https://mdxjs.com)" - name: YAML nameLink: https://yaml.org - showName: true image: /images/languages/tools_yaml.svg variants: [] - name: Community Plugins - nameLink: ./docs/en/plugins.html#community-plugins - showName: true + nameLink: ./docs/plugins#community-plugins image: /images/languages/tools_wip.svg variants: - "[Apex](https://github.com/dangmai/prettier-plugin-apex)" @@ -52,4 +45,4 @@ - "[Rust](https://github.com/jinxdash/prettier-plugin-rust)" - "[TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml)" - "[XML](https://github.com/prettier/plugin-xml)" - - "[And more...](./docs/en/plugins.html#community-plugins)" + - "[And more...](/docs/plugins#community-plugins)" diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js new file mode 100644 index 000000000000..a2d2b8767ea6 --- /dev/null +++ b/website/docusaurus.config.js @@ -0,0 +1,277 @@ +// @ts-check + +import fs from "node:fs"; +import { createRequire } from "node:module"; +import { load as parseYaml } from "js-yaml"; +import { themes as prismThemes } from "prism-react-renderer"; +import llmsTxtPlugin from "./plugins/llms-txt-plugin.mjs"; + +const require = createRequire(import.meta.url); + +const packageJsonFile = new URL("../package.json", import.meta.url); +const packageJson = JSON.parse(fs.readFileSync(packageJsonFile, "utf8")); +const GITHUB_URL = `https://github.com/${packageJson.repository}`; + +/** + * + * @param {string} fsPath + */ +function loadYaml(fsPath) { + return parseYaml(fs.readFileSync(new URL(fsPath, import.meta.url), "utf8")); +} + +const users = loadYaml("./data/users.yml"); +const editors = loadYaml("./data/editors.yml"); +const supportedLanguages = loadYaml("./data/languages.yml"); + +/** @type {import('@docusaurus/types').Config} */ +const config = { + title: "Prettier", + tagline: "Opinionated Code Formatter", + favicon: "icon.png", + titleDelimiter: "·", + + // Set the production url of your site here + url: packageJson.homepage, + // Set the /<baseUrl>/ pathname under which your site is served + // For GitHub pages deployment, it is often '/<projectName>/' + baseUrl: "/", + + // GitHub pages deployment config. + // If you aren't using GitHub pages, you don't need these. + organizationName: "prettier", // Usually your GitHub org/user name. + projectName: packageJson.name, // Usually your repo name. + + customFields: { + users, + editors, + supportedLanguages, + githubUrl: GITHUB_URL, + tideliftUrl: + "https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=website", + }, + + stylesheets: [ + "https://unpkg.com/@sandhose/prettier-animated-logo@1.0.3/dist/wide.css", + ], + + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", + + // Even if you don't use internationalization, you can use this field to set + // useful metadata like html lang. For example, if your site is Chinese, you + // may want to replace "en" with "zh-Hans". + i18n: { + defaultLocale: "en", + locales: ["en"], + }, + + presets: [ + [ + "classic", + /** @type {import('@docusaurus/preset-classic').Options} */ + { + docs: { + sidebarPath: "./sidebars.json", + /** @type {import('@docusaurus/plugin-content-docs').EditUrlFunction} */ + editUrl: ({ docPath }) => `${GITHUB_URL}/edit/main/docs/${docPath}`, + path: "../docs", + sidebarCollapsed: false, + breadcrumbs: false, + versions: { + current: { + label: "next", + badge: false, + }, + stable: { + label: "stable", + badge: false, + }, + }, + }, + blog: { + feedOptions: { + type: ["rss", "atom"], + xslt: true, + }, + blogTitle: "Prettier blog", + blogDescription: "Read blog posts about Prettier from the team", + editUrl: `${GITHUB_URL}/edit/main/website/`, + blogSidebarCount: 10, + blogSidebarTitle: "Recent posts", + postsPerPage: 10, + onInlineTags: "warn", + onInlineAuthors: "warn", + onUntruncatedBlogPosts: "throw", + }, + theme: { + customCss: [ + "./src/css/custom.css", + require.resolve("react-tweet/theme.css"), + ], + }, + gtag: { + trackingID: "G-T57CP1SG02", + anonymizeIP: true, + }, + }, + ], + ], + + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + { + // Replace with your project's social card + image: "icon.png", + colorMode: { + respectPrefersColorScheme: true, + }, + navbar: { + title: "Prettier", + logo: { + alt: "", + src: "icon.png", + }, + style: "dark", + items: [ + { + type: "docsVersionDropdown", + }, + { + href: + process.env.NODE_ENV === "production" + ? "pathname:///playground/" + : "http://localhost:5173/", + label: "Playground", + position: "right", + target: "_self", + }, + { + type: "docSidebar", + sidebarId: "docs", + label: "Docs", + position: "right", + }, + { to: "/blog", label: "Blog", position: "right" }, + { + href: "https://opencollective.com/prettier", + label: "Donate", + position: "right", + }, + { + "aria-label": "GitHub repository", + className: "header-github-link", + href: GITHUB_URL, + position: "right", + }, + ], + }, + footer: { + style: "dark", + links: [ + { + title: "Docs", + items: [ + { + label: "About", + to: "/docs", + }, + { + label: "Usage", + to: "/docs/install", + }, + { + html: /*html*/ ` + <a href="https://www.netlify.com" target="_blank" rel="noreferrer noopener" aria-label="Deploys by Netlify"> + <img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" width="114" height="51" style="margin-top: 8px;" /> + </a> + `, + }, + ], + }, + { + title: "Community", + items: [ + { + label: "User Showcase", + to: "/users", + }, + { + label: "Stack Overflow", + href: "http://stackoverflow.com/questions/tagged/prettier", + }, + { + label: "@PrettierCode on X", + href: "https://x.com/PrettierCode", + }, + ], + }, + { + title: "More", + items: [ + { + label: "Blog", + to: "/blog", + }, + { + label: "GitHub", + href: GITHUB_URL, + }, + { + label: "Issues", + href: `${GITHUB_URL}/issues`, + }, + { + html: /*html*/ ` + <a + href="https://github.com/prettier/prettier" + target="_blank" + rel="noreferrer noopener" + aria-label="Star this project on GitHub" + class="footer__github-stars" + > + <img src="https://img.shields.io/github/stars/prettier/prettier?style=social" loading="lazy" alt="Star this project on GitHub" /> + </a> + `, + }, + ], + }, + ], + }, + algolia: { + appId: "OHFQ1H5TQS", + apiKey: "ecfff8a35d82ecff7e911d57d7be8510", + indexName: "prettier", + }, + prism: { + additionalLanguages: [ + "bash", + "diff", + "handlebars", + "markup-templating", // Required for "handlebars" + "toml", + "ini", + "vim", + "scss", + "less", + ], + theme: prismThemes.github, + darkTheme: prismThemes.dracula, + }, + }, + plugins: [llmsTxtPlugin], + future: { + experimental_faster: { + swcJsLoader: true, + swcHtmlMinimizer: true, + lightningCssMinimizer: true, + mdxCrossCompilerCache: true, + + // https://github.com/facebook/docusaurus/issues/11047 + swcJsMinimizer: false, + rspackBundler: false, + }, + }, +}; + +export default config; diff --git a/website/index.html b/website/index.html new file mode 100644 index 000000000000..9d038506d6eb --- /dev/null +++ b/website/index.html @@ -0,0 +1,219 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>Prettier</title> + + <link rel="manifest" href="/manifest.json" /> + + <meta name="mobile-web-app-capable" content="yes" /> + <meta name="apple-mobile-web-app-capable" content="yes" /> + <meta name="application-name" content="Prettier" /> + <meta name="apple-mobile-web-app-title" content="Prettier" /> + <meta name="theme-color" content="#1a2b34" /> + <meta name="msapplication-navbutton-color" content="#1a2b34" /> + <meta + name="apple-mobile-web-app-status-bar-style" + content="black-translucent" + /> + <meta name="msapplication-starturl" content="/" /> + <meta + name="viewport" + content="width=device-width, initial-scale=1, shrink-to-fit=no" + /> + + <link rel="icon" href="/icon.png" /> + <link rel="apple-touch-icon" href="/icon.png" /> + + <link + rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/codemirror.min.css" + integrity="sha512-uf06llspW44/LZpHzHT6qBOIVODjWtv4MxCricRxkzvopAlSWnTf6hpZTFxuuZcuNE9CBQhqE0Seu1CoRk84nQ==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + /> + <link + rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/fold/foldgutter.min.css" + integrity="sha512-YwkMTlTHn8dBnwa47IF+cKsS00HPiiVhQ4DpwT1KF2gUftfFR7aefepabSPLAs6zrMyD89M3w0Ow6mQ5XJEUCw==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + /> + + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/codemirror.min.js" + integrity="sha512-6cPYokihlrofMNApz7OXVQNObWjLiKGIBBb7+UB+AuMiRCLKmFKgrwms21sHq3bdFFZWpfHYRJBJvMFMPj1S9g==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/mode/javascript/javascript.min.js" + integrity="sha512-Cbz+kvn+l5pi5HfXsEB/FYgZVKjGIhOgYNBwj4W2IHP2y8r3AdyDCQRnEUqIQ+6aJjygKPTyaNT2eIihaykJlw==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/mode/xml/xml.min.js" + integrity="sha512-LarNmzVokUmcA7aUDtqZ6oTS+YXmUKzpGdm8DxC46A6AHu+PQiYCUlwEGWidjVYMo/QXZMFMIadZtrkfApYp/g==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/mode/jsx/jsx.min.js" + integrity="sha512-jlNQWdDsv1W4EG4blPl9HPp+5AXT/uozlC1HWLydcdG9gT8qM2PtWbk5sCZb8eZTX+lT/oHlXKn1SU6LXogFow==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/mode/css/css.js" + integrity="sha512-kbf0gMc1+KPTTDWkjkGwf3h2Nx4djnWBVtcCKJcwLQpQ/TIMAjRBKM9f0ZDgj9kT5WTs1Qzsq+5Si2p7j9whkg==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/mode/markdown/markdown.min.js" + integrity="sha512-DmMao0nRIbyDjbaHc8fNd3kxGsZj9PCU6Iu/CeidLQT9Py8nYVA5n0PqXYmvqNdU+lCiTHOM/4E7bM/G8BttJg==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/display/placeholder.min.js" + integrity="sha512-acBo6sW2h2GZQ9BqU9v5RyYGPUEr1a9jrukJg825Y0ahxAg/7aqTNPtcalloqnf4DfsRVdcdNmcBNWPD8b8W8Q==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/display/rulers.min.js" + integrity="sha512-sF+AF3zpVOHMt4f4mN1dVS2/Hon6pr/7h1gc7rDHtga0SeD9z0UiL1J0k3umDFEz5qkY06ARcNzi45NkJ9GsYw==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/search/searchcursor.min.js" + integrity="sha512-+ZfZDC9gi1y9Xoxi9UUsSp+5k+AcFE0TRNjI0pfaAHQ7VZTaaoEpBZp9q9OvHdSomOze/7s5w27rcsYpT6xU6g==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/edit/matchbrackets.min.js" + integrity="sha512-GSYCbN/le5gNmfAWVEjg1tKnOH7ilK6xCLgA7c48IReoIR2g2vldxTM6kZlN6o3VtWIe6fHu/qhwxIt11J8EBA==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/edit/closebrackets.min.js" + integrity="sha512-tsjcYO5hFvViRssxiM7Jhd8601epWOx1He3Hl4yuI5dKKPxr43KxkOhc9GZeeqzlYJm9ABb7UPA9697NiqZZ7Q==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/comment/comment.min.js" + integrity="sha512-UaJ8Lcadz5cc5mkWmdU8cJr0wMn7d8AZX5A24IqVGUd1MZzPJTq9dLLW6I102iljTcdB39YvVcCgBhM0raGAZQ==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/wrap/hardwrap.min.js" + integrity="sha512-ZPPL1o5pyZOIF/+PL/pRRBdxrYENhEbcNas/6PJcXMM1aBu5wI2yeFzJY6Jv+fJjH8o48HBYomInIYsYvFlXig==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/fold/foldcode.min.js" + integrity="sha512-Q2qfEJEU257Qlqc4/5g6iKuJNnn5L0xu2D48p8WHe9YC/kLj2UfkdGD01qfxWk+XIcHsZngcA8WuKcizF8MAHA==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/fold/foldgutter.js" + integrity="sha512-tGjjnhNOLvNMtP2S/fpsalcaJofEksE83moo23We+afRBd1kx3JtSSDn9CDmEyKhwk4N7dJqLq3iUWyVOs9ejQ==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/addon/fold/brace-fold.min.js" + integrity="sha512-5MuaB1PVXvhsYVG0Ozb0bwauN7/D1VU4P8dwo5E/xiB9SXY+VSEhIyxt1ggYk2xaB/RKqKL7rPXpm1o1IlTQDA==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.18/keymap/sublime.min.js" + integrity="sha512-SV3qeFFtzcmGtUQPLM7HLy/7GKJ/x3c2PdiF5GZQnbHzIlI2q7r77y0IgLLbBDeHiNfCSBYDQt898Xp0tcZOeA==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + + <script + src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js" + integrity="sha512-7O5pXpc0oCRrxk8RUfDYFgn0nO1t+jLuIOQdOMRp4APB7uZ4vSjspzp5y6YDtDs4VzUSTbWzBFZ/LKJhnyFOKw==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.5.0/lz-string.min.js" + integrity="sha512-qtX0GLM3qX8rxJN1gyDfcnMFFrKvixfoEOwbBib9VafR5vbChV5LeE5wSI/x+IlCkTY5ZFddFDCCfaVJJNnuKQ==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js" + integrity="sha512-QVs8Lo43F9lSuBykadDb0oSXDL/BbZ588urWVCRwSIoewQv/Ewg1f84mK3U790bZ0FfhFa1YSQUmIhG+pIRKeg==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <script + src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js" + integrity="sha512-6a1107rTlA4gYpgHAqbwLAtxmWipBdJFcq8y5S/aTge3Bp+VAklABm2LO+Kg51vOWR9JMZq1Ovjl5tpluNpTeQ==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + <link rel="stylesheet" href="./playground/playground.css" /> + + <!-- Google tag (gtag.js) --> + <script + async + src="https://www.googletagmanager.com/gtag/js?id=G-T57CP1SG02" + ></script> + <script> + window.dataLayer = window.dataLayer || []; + function gtag() { + dataLayer.push(arguments); + } + gtag("js", new Date()); + gtag("config", "G-T57CP1SG02"); + </script> + </head> + + <body> + <header> + <a href="/" class="logo-wrapper"> + <img class="logo" src="/icon.png" alt="" /> + <h1>Prettier <span id="version"></span></h1> + </a> + + <span class="links"> + <a + class="github-button" + href="https://github.com/prettier/prettier" + data-show-count="true" + aria-label="Star prettier on GitHub" + > + GitHub + </a> + </span> + </header> + + <div id="root" class="playground-container"></div> + + <script type="module" src="./playground/index.jsx"></script> + + <script + async + defer + src="https://buttons.github.io/buttons.js" + crossorigin="anonymous" + referrerpolicy="no-referrer" + ></script> + </body> +</html> diff --git a/website/package.json b/website/package.json index 56de6daf808d..d1bfe752fbd6 100644 --- a/website/package.json +++ b/website/package.json @@ -1,26 +1,53 @@ { + "private": true, "license": "MIT", "scripts": { - "build": "webpack --mode=production && docusaurus-build", - "start": "concurrently \"docusaurus-start\" \"webpack --mode=development --watch\"", - "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" + "playground:build": "vite build", + "playground:watch": "vite", + "docusaurus": "docusaurus", + "start": "concurrently \"yarn playground:watch\" \"docusaurus start\"", + "build": "yarn playground:build && docusaurus build", + "swizzle": "docusaurus swizzle", + "clear": "docusaurus clear", + "serve": "docusaurus serve", + "write-translations": "docusaurus write-translations", + "write-heading-ids": "docusaurus write-heading-ids", + "update-stable-docs": "node ./scripts/update-stable-docs.mjs" }, "dependencies": { - "clipboard": "2.0.11", - "codemirror-graphql": "1.3.2", - "lz-string": "1.4.4", - "prop-types": "15.8.1", - "react": "18.2.0", - "react-dom": "18.2.0" + "@docusaurus/core": "3.8.1", + "@docusaurus/preset-classic": "3.8.1", + "@mdx-js/react": "3.1.0", + "@sandhose/prettier-animated-logo": "1.0.3", + "clsx": "2.1.1", + "codemirror-graphql": "2.2.2", + "prism-react-renderer": "2.4.1", + "react": "18.3.1", + "react-dom": "18.3.1", + "react-markdown": "10.1.0", + "react-tweet": "3.2.2" }, "devDependencies": { - "@babel/preset-react": "7.18.6", - "@sandhose/prettier-animated-logo": "1.0.3", - "babel-loader": "8.2.5", - "concurrently": "7.2.2", - "docusaurus": "1.14.7", + "@docusaurus/faster": "3.8.1", + "@docusaurus/module-type-aliases": "3.8.1", + "@docusaurus/types": "3.8.1", + "@types/js-yaml": "4.0.9", + "@vitejs/plugin-react": "4.6.0", + "concurrently": "9.2.0", "js-yaml": "4.1.0", - "webpack": "5.76.0", - "webpack-cli": "4.10.0" - } + "vite": "7.0.0" + }, + "browserslist": { + "production": [ + ">0.5%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 3 chrome version", + "last 3 firefox version", + "last 5 safari version" + ] + }, + "packageManager": "yarn@4.9.2" } diff --git a/website/pages/en/help/index.js b/website/pages/en/help/index.js deleted file mode 100755 index ce9059eda879..000000000000 --- a/website/pages/en/help/index.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -const React = require("react"); -const { Container, GridBlock } = require("../../../core/CompLibrary.js"); - -class Help extends React.Component { - render() { - const supportLinks = [ - { - content: - "Learn more using the [documentation on this site.](/docs/en/why-prettier.html)\n", - title: "Browse Docs", - }, - { - content: "Ask questions about the documentation and project\n", - title: "Join the community", - }, - { - content: "Find out what's new with this project\n", - title: "Stay up to date", - }, - ]; - - return ( - <div> - <div className="docMainWrapper wrapper"> - <Container className="mainContainer documentContainer postContainer"> - <div className="post"> - <header className="postHeader"> - <h2>Need help?</h2> - </header> - <p>This project is maintained by a dedicated group of people;</p> - <GridBlock contents={supportLinks} layout="threeColumn" /> - </div> - </Container> - </div> - </div> - ); - } -} - -Help.defaultProps = { - language: "en", -}; - -module.exports = Help; diff --git a/website/pages/en/index.js b/website/pages/en/index.js deleted file mode 100755 index ee108ed5c2c3..000000000000 --- a/website/pages/en/index.js +++ /dev/null @@ -1,379 +0,0 @@ -"use strict"; - -const React = require("react"); -const PropTypes = require("prop-types"); -const AnimatedLogo = require("@sandhose/prettier-animated-logo"); -const { MarkdownBlock, Container } = require("../../core/CompLibrary.js"); - -const siteConfig = require(process.cwd() + "/siteConfig.js"); - -const ButtonGroup = (props) => ( - <div className="buttonGroup buttonWrapper">{props.children}</div> -); - -ButtonGroup.propTypes = { - children: PropTypes.node, -}; - -class Button extends React.Component { - render() { - return ( - <div className="pluginWrapper buttonWrapper"> - <a className="button" href={this.props.href} target={this.props.target}> - {this.props.children} - </a> - </div> - ); - } -} - -Button.defaultProps = { - target: "_self", -}; - -Button.propTypes = { - href: PropTypes.string, - target: PropTypes.string, - children: PropTypes.any, -}; - -function Tidelift() { - return ( - <a className="tidelift" href={siteConfig.tideliftUrl}> - PRETTIER FOR ENTERPRISE - </a> - ); -} - -const HomeSplash = (props) => ( - <div className="homeContainer"> - <Tidelift /> - <div className="homeSplashFade"> - <div className="wrapper homeWrapper"> - <div className="animatedLogoWrapper"> - <AnimatedLogo version="wide" /> - </div> - <div className="inner"> - <div className="section promoSection"> - <div className="promoRow"> - <div className="pluginRowBlock"> - <Button href="/playground/">Try It Online</Button>&nbsp; - <Button href={"/docs/" + props.language + "/install.html"}> - Install Prettier - </Button> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -); - -HomeSplash.propTypes = { - language: PropTypes.string, -}; - -const TldrSection = ({ language }) => ( - <div className="tldrSection productShowcaseSection lightBackground"> - <Container> - <div - style={{ - display: "flex", - flexFlow: "row wrap", - justifyContent: "space-evenly", - }} - > - <div style={{ display: "flex", flexDirection: "column" }}> - <h2>What is Prettier?</h2> - <ul style={{ flex: "1" }}> - <li>An opinionated code formatter</li> - <li>Supports many languages</li> - <li>Integrates with most editors</li> - <li>Has few options</li> - </ul> - </div> - <div style={{ display: "flex", flexDirection: "column" }}> - <h2>Why?</h2> - <ul style={{ flex: "1" }}> - <li>Your code is formatted on save</li> - <li>No need to discuss style in code review</li> - <li>Saves you time and energy</li> - <li> - <a - style={{ color: "inherit !important", fontSize: "inherit" }} - href={"/docs/" + language + "/why-prettier.html"} - > - And more &raquo; - </a> - </li> - </ul> - </div> - </div> - </Container> - </div> -); - -TldrSection.propTypes = { - language: PropTypes.string, -}; - -const Language = ({ name, nameLink, showName, image, variants }) => ( - <div - className="languageCategory" - style={{ - display: "flex", - alignItems: "flex-start", - paddingBottom: "1em", - }} - > - <img src={image} style={{ width: "50px", padding: "0 20px" }} /> - <ul> - {showName && ( - <li className="accented"> - {nameLink ? <a href={nameLink}>{name}</a> : name} - </li> - )} - {variants.map((variant) => ( - <li key={variant}> - <MarkdownBlock>{variant}</MarkdownBlock> - </li> - ))} - </ul> - </div> -); - -Language.propTypes = { - name: PropTypes.string, - nameLink: PropTypes.string, - showName: PropTypes.bool, - image: PropTypes.string, - variants: PropTypes.array, -}; - -const LanguagesSection = () => { - const languageChunks = siteConfig.supportedLanguages.reduce( - (acc, language) => { - const last = acc[acc.length - 1]; - if ( - last && - last.length < 2 && - last.reduce((sum, lang) => sum + lang.variants.length, 0) + - language.variants.length < - 9 - ) { - last.push(language); - } else { - acc.push([language]); - } - return acc; - }, - [] - ); - - return ( - <div - className="languagesSection productShowcaseSection" - style={{ textAlign: "center" }} - > - <Container> - <h2>Works with the Tools You Use</h2> - <div - style={{ - display: "flex", - flexFlow: "row wrap", - justifyContent: "space-around", - }} - > - {languageChunks.map((languageChunk, index) => ( - <div key={index} style={{ flex: "1 1 auto" }}> - {languageChunk.map((language) => ( - <Language key={language.name} {...language} /> - ))} - </div> - ))} - </div> - </Container> - </div> - ); -}; - -const Editor = ({ content = "", image, name }) => ( - <div className="editor"> - <img className="editorImage" src={image} /> - <div className="editorInfo"> - <h3 className="editorName">{name}</h3> - <MarkdownBlock>{content.replace(/\n/g, " \n")}</MarkdownBlock> - </div> - </div> -); - -Editor.propTypes = { - content: PropTypes.string, - image: PropTypes.string.isRequired, - name: PropTypes.string.isRequired, -}; - -const EditorSupportSection = () => ( - <div className="editorSupportSection productShowcaseSection lightBackground"> - <Container> - <h2>Editor Support</h2> - <div - style={{ - display: "flex", - flexFlow: "row wrap", - justifyContent: "space-around", - }} - > - {siteConfig.editors.map((editor) => ( - <Editor key={editor.name} {...editor} /> - ))} - </div> - </Container> - - <div style={{ float: "right" }}> - <span>Got more? </span> - <a - href={`${siteConfig.githubUrl}/edit/main/website/data/editors.yml`} - className="button" - > - Send a PR - </a> - </div> - </div> -); - -const UsersSection = ({ language }) => { - const showcase = siteConfig.users - .filter((user) => user.pinned) - .map((user, i) => ( - <a key={i} className="growOnHover alignCenter" href={user.infoLink}> - <img className="user" src={user.greyImage} title={user.caption} /> - </a> - )); - - return ( - <div className="usersSection productShowcaseSection"> - <Container> - <h2>Used By People You Rely On</h2> - <div style={{ textAlign: "right" }} /> - <div - style={{ - display: "flex", - flexFlow: "row wrap", - justifyContent: "space-around", - }} - > - {showcase} - </div> - <div className="more-users"> - <a - className="button" - href={siteConfig.baseUrl + language + "/users/"} - target="_self" - style={{ marginRight: "10px" }} - > - See Others - </a> - </div> - - <h2 className="ecosystemSubHeader">Established in the Ecosystem</h2> - <div - className="ecosystemSubSection" - style={{ - display: "flex", - justifyContent: "space-around", - flexFlow: "row wrap", - }} - > - <div style={{ display: "flex", marginTop: "22px" }}> - <a - href="https://2021.stateofjs.com/en-US/other-tools/utilities" - style={{ marginTop: "15px" }} - > - <img - src="/images/state_of_js_grey.svg" - style={{ width: "80px" }} - /> - </a> - <div style={{ marginLeft: ".7em", width: "260px" }}> - <p>Regularly used by:</p> - <ul style={{ marginBottom: "0" }}> - <li> - <a href="https://2021.stateofjs.com/en-US/other-tools/#utilities"> - More than 83% of respondents to State of JS 2021. - </a> - </li> - <li> - <a href="https://2020.stateofjs.com/en-US/other-tools/#utilities"> - More than 70% of respondents to State of JS 2020. - </a> - </li> - </ul> - </div> - </div> - - <div style={{ display: "flex", marginTop: "22px" }}> - <a href="https://github.com/prettier/prettier"> - <img src="/images/github_grey.svg" style={{ width: "80px" }} /> - </a> - <div style={{ marginLeft: ".7em", width: "260px" }}> - <p> - More than{" "} - <strong data-placeholder="dependent-github">5.2 million</strong>{" "} - dependent repositories on GitHub - </p> - <Button href="https://github.com/prettier/prettier/network/dependents"> - Check Them Out - </Button> - </div> - </div> - - <div style={{ display: "flex", marginTop: "22px" }}> - <a href="https://npmjs.com/package/prettier"> - <img src="/images/npm_grey.svg" style={{ width: "80px" }} /> - </a> - <div style={{ marginLeft: ".7em", width: "260px" }}> - <p> - More than <strong data-placeholder="dependent-npm">13k</strong>{" "} - dependent packages on npm - </p> - <Button href="https://www.npmjs.com/browse/depended/prettier"> - See them all - </Button> - </div> - </div> - </div> - </Container> - </div> - ); -}; - -UsersSection.propTypes = { - language: PropTypes.string, -}; - -class Index extends React.Component { - render() { - const language = this.props.language || "en"; - - return ( - <div> - <script src="landing.js" /> - <HomeSplash language={language} /> - <div className="mainContainer landingContainer"> - <TldrSection language={language} /> - <LanguagesSection /> - <EditorSupportSection /> - <UsersSection language={language} /> - </div> - </div> - ); - } -} - -Index.propTypes = { - language: PropTypes.string, -}; - -module.exports = Index; diff --git a/website/pages/en/users/index.js b/website/pages/en/users/index.js deleted file mode 100644 index da4ade80c68a..000000000000 --- a/website/pages/en/users/index.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -const React = require("react"); -const { Container } = require("../../../core/CompLibrary.js"); - -const siteConfig = require(process.cwd() + "/siteConfig.js"); - -class Users extends React.Component { - render() { - const showcase = siteConfig.users.map((user, i) => ( - <a key={i} href={user.infoLink}> - <img src={user.image} title={user.caption} /> - </a> - )); - - return ( - <div> - <div className="mainContainer"> - <Container padding={["bottom", "top"]}> - <div className="showcaseSection"> - <div className="prose"> - <h1>Who’s Using This?</h1> - </div> - <blockquote - style={{ - fontSize: "125%", - textAlign: "left", - }} - > - <p>Prettier is regularly used by:</p> - <ul> - <li> - <a href="https://2021.stateofjs.com/en-US/other-tools/#utilities"> - More than <strong>83%</strong> of respondents to State of - JS 2021 (10282 developers out of 12360). - </a> - </li> - <li> - <a href="https://2020.stateofjs.com/en-US/other-tools/#utilities"> - More than <strong>70%</strong> of respondents to State of - JS 2020 (14880 developers out of 20974). - </a> - </li> - </ul> - </blockquote> - <div className="logos">{showcase}</div> - <div className="prose"> - ...and{" "} - <a href="https://www.npmjs.com/browse/depended/prettier"> - many more projects - </a> - </div> - </div> - </Container> - </div> - </div> - ); - } -} - -Users.defaultProps = { - language: "en", -}; - -Users.title = "Who's using Prettier?"; - -module.exports = Users; diff --git a/website/pages/en/versions.js b/website/pages/en/versions.js deleted file mode 100755 index e3c349e692a4..000000000000 --- a/website/pages/en/versions.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; - -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require("react"); -const { Container } = require("../../core/CompLibrary.js"); - -const CWD = process.cwd(); - -const versions = require(`${CWD}/versions.json`); - -const rootPackageJson = require(`${CWD}/../package.json`); -const defaultBranchVersion = rootPackageJson.version; -const isDefaultBranchDevVersion = defaultBranchVersion.endsWith("-dev"); -const devVersion = isDefaultBranchDevVersion ? defaultBranchVersion : null; -const latestVersion = isDefaultBranchDevVersion - ? rootPackageJson.devDependencies.prettier - : defaultBranchVersion; -const [latestDocsVersion, ...pastDocsVersions] = versions; - -function Versions(props) { - const { config: siteConfig } = props; - return ( - <div className="docMainWrapper wrapper"> - <Container className="mainContainer versionsContainer"> - <div className="post"> - <header className="postHeader"> - <h1>{siteConfig.title} Versions</h1> - </header> - <table className="versions"> - <tbody> - <tr> - <th>Version</th> - <th>Install with</th> - <th>Documentation</th> - </tr> - <tr> - <td>{latestVersion}</td> - <td> - <code>npm install prettier</code> - </td> - <td> - <a href={`${siteConfig.baseUrl}docs/en/index.html`}> - {latestDocsVersion} - </a>{" "} - (latest) - </td> - </tr> - <tr> - <td>{devVersion}</td> - <td> - <code>npm install prettier/prettier</code> - </td> - <td> - <a href={`${siteConfig.baseUrl}docs/en/next/index.html`}> - next - </a>{" "} - (main) - </td> - </tr> - {pastDocsVersions.length > 0 && - pastDocsVersions.map((pastDocsVersion, index) => { - const pastMajorVersion = pastDocsVersion.replace(/^v/, ""); - return ( - <tr key={index}> - <td>{pastMajorVersion}.x</td> - <td> - <code> - npm install prettier@ - {pastMajorVersion} - </code> - </td> - <td> - <a - href={`${siteConfig.baseUrl}docs/en/${pastDocsVersion}/index.html`} - > - {pastDocsVersion} - </a> - </td> - </tr> - ); - })} - </tbody> - </table> - </div> - </Container> - </div> - ); -} - -module.exports = Versions; diff --git a/website/pages/playground/index.html b/website/pages/playground/index.html deleted file mode 100644 index e59632057bd6..000000000000 --- a/website/pages/playground/index.html +++ /dev/null @@ -1,108 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <title>Prettier</title> - - <link rel="manifest" href="/manifest.json" /> - - <meta name="mobile-web-app-capable" content="yes" /> - <meta name="apple-mobile-web-app-capable" content="yes" /> - <meta name="application-name" content="Prettier" /> - <meta name="apple-mobile-web-app-title" content="Prettier" /> - <meta name="theme-color" content="#1a2b34" /> - <meta name="msapplication-navbutton-color" content="#1a2b34" /> - <meta - name="apple-mobile-web-app-status-bar-style" - content="black-translucent" - /> - <meta name="msapplication-starturl" content="/" /> - <meta - name="viewport" - content="width=device-width, initial-scale=1, shrink-to-fit=no" - /> - - <link rel="icon" href="/icon.png" /> - <link rel="apple-touch-icon" href="/icon.png" /> - - <link - rel="stylesheet" - crossorigin - href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/codemirror.min.css" - /> - - <link - rel="stylesheet" - crossorigin - href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldgutter.min.css" - /> - - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/codemirror.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/javascript/javascript.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/xml/xml.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/jsx/jsx.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/css/css.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/markdown/markdown.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/display/placeholder.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/display/rulers.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/search/searchcursor.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/edit/matchbrackets.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/edit/closebrackets.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/comment/comment.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/wrap/hardwrap.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldcode.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldgutter.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/brace-fold.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/keymap/sublime.min.js"></script> - - <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js"></script> - - <link rel="stylesheet" href="/separate-css/playground.css" /> - - <!-- Global site tag (gtag.js) - Google Analytics --> - <script - async - src="https://www.googletagmanager.com/gtag/js?id=UA-111350464-1" - ></script> - <script> - window.dataLayer = window.dataLayer || []; - function gtag() { - dataLayer.push(arguments); - } - gtag("js", new Date()); - gtag("config", "UA-111350464-1"); - </script> - </head> - - <body> - <header> - <a href="/" class="logo-wrapper"> - <img class="logo" src="/icon.png" alt="" /> - <h1>Prettier <span id="version"></span></h1> - </a> - - <span class="links"> - <a - class="github-button" - href="https://github.com/prettier/prettier" - data-show-count="true" - aria-label="Star prettier on GitHub" - > - GitHub - </a> - </span> - </header> - - <div id="root" class="playground-container"></div> - - <script src="/playground.js"></script> - - <script src="/install-service-worker.js"></script> - - <script async defer src="https://buttons.github.io/buttons.js"></script> - </body> -</html> diff --git a/website/playground/BottomBar.js b/website/playground/BottomBar.js deleted file mode 100644 index 85ae212ae84e..000000000000 --- a/website/playground/BottomBar.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -const root = document.getElementById("bottom-bar"); - -export default function BottomBar({ left, right }) { - return ReactDOM.createPortal( - <React.Fragment> - <div className="bottom-bar-buttons">{left}</div> - <div className="bottom-bar-buttons bottom-bar-buttons-right">{right}</div> - </React.Fragment>, - root - ); -} diff --git a/website/playground/EditorState.js b/website/playground/EditorState.js index 0ad15dc01c8e..0b58765985c7 100644 --- a/website/playground/EditorState.js +++ b/website/playground/EditorState.js @@ -1,14 +1,15 @@ -import * as React from "react"; - -import { stateToggler, shallowEqual } from "./helpers.js"; +import { shallowEqual, stateToggler } from "./helpers.js"; import * as storage from "./storage.js"; +const { React } = window; + export default class EditorState extends React.Component { constructor() { super(); this.state = { showSidebar: window.innerWidth > window.innerHeight, showAst: false, + showPreprocessedAst: false, showDoc: false, showComments: false, showSecondFormat: false, @@ -17,6 +18,8 @@ export default class EditorState extends React.Component { rethrowEmbedErrors: false, toggleSidebar: () => this.setState(stateToggler("showSidebar")), toggleAst: () => this.setState(stateToggler("showAst")), + togglePreprocessedAst: () => + this.setState(stateToggler("showPreprocessedAst")), toggleDoc: () => this.setState(stateToggler("showDoc")), toggleComments: () => this.setState(stateToggler("showComments")), toggleSecondFormat: () => this.setState(stateToggler("showSecondFormat")), diff --git a/website/playground/Playground.js b/website/playground/Playground.js deleted file mode 100644 index e19f9e2f9680..000000000000 --- a/website/playground/Playground.js +++ /dev/null @@ -1,465 +0,0 @@ -import * as React from "react"; - -import { Button, ClipboardButton } from "./buttons.js"; -import EditorState from "./EditorState.js"; -import { DebugPanel, InputPanel, OutputPanel } from "./panels.js"; -import PrettierFormat from "./PrettierFormat.js"; -import { shallowEqual } from "./helpers.js"; -import * as urlHash from "./urlHash.js"; -import formatMarkdown from "./markdown.js"; -import * as util from "./util.js"; -import getCodeSample from "./codeSamples.js"; - -import { Sidebar, SidebarCategory } from "./sidebar/components.js"; -import SidebarOptions from "./sidebar/SidebarOptions.js"; -import Option from "./sidebar/options.js"; -import { Checkbox } from "./sidebar/inputs.js"; - -const CATEGORIES_ORDER = [ - "Global", - "Common", - "JavaScript", - "Markdown", - "HTML", - "Special", -]; -const ISSUES_URL = "https://github.com/prettier/prettier/issues/new?body="; -const MAX_LENGTH = 8000 - ISSUES_URL.length; // it seems that GitHub limit is 8195 -const COPY_MESSAGE = - "<!-- The issue body has been saved to the clipboard. Please paste it after this line! 👇 -->\n"; - -const ENABLED_OPTIONS = [ - "parser", - "printWidth", - "tabWidth", - "useTabs", - "semi", - "singleQuote", - "bracketSpacing", - "jsxSingleQuote", - "quoteProps", - "arrowParens", - "trailingComma", - "proseWrap", - "htmlWhitespaceSensitivity", - "insertPragma", - "requirePragma", - "vueIndentScriptAndStyle", - "embeddedLanguageFormatting", - "bracketSameLine", - "singleAttributePerLine", -]; - -class Playground extends React.Component { - constructor(props) { - super(); - - const original = urlHash.read(); - - const defaultOptions = util.getDefaults( - props.availableOptions, - ENABLED_OPTIONS - ); - - const options = Object.assign(defaultOptions, original.options); - - // backwards support for old parser `babylon` - if (options.parser === "babylon") { - options.parser = "babel"; - } - - const codeSample = getCodeSample(options.parser); - const content = original.content || codeSample; - const needsClickForFirstRun = - options.parser === "doc-explorer" && content !== codeSample; - const selection = {}; - - this.state = { content, options, selection, needsClickForFirstRun }; - - this.handleOptionValueChange = this.handleOptionValueChange.bind(this); - - this.setContent = (content) => this.setState({ content }); - this.clearContent = this.setContent.bind(this, ""); - this.resetOptions = () => this.setState({ options: defaultOptions }); - this.setSelection = (selection) => this.setState({ selection }); - this.setSelectionAsRange = () => { - const { selection, content, options } = this.state; - const [rangeStart, rangeEnd] = util.convertSelectionToRange( - selection, - content - ); - const updatedOptions = { ...options, rangeStart, rangeEnd }; - if (rangeStart === rangeEnd) { - delete updatedOptions.rangeStart; - delete updatedOptions.rangeEnd; - } - this.setState({ options: updatedOptions }); - }; - - this.enabledOptions = orderOptions(props.availableOptions, ENABLED_OPTIONS); - this.rangeStartOption = props.availableOptions.find( - (opt) => opt.name === "rangeStart" - ); - this.rangeEndOption = props.availableOptions.find( - (opt) => opt.name === "rangeEnd" - ); - - this.handleInputPanelFormat = this.handleInputPanelFormat.bind(this); - } - - componentDidUpdate(_, prevState) { - const { content, options } = this.state; - if ( - !shallowEqual(prevState.options, this.state.options) || - prevState.content !== content - ) { - urlHash.replace({ content, options }); - } - } - - handleOptionValueChange(option, value) { - this.setState((state) => { - const options = { ...state.options }; - - if (option.type === "int" && Number.isNaN(value)) { - delete options[option.name]; - } else { - options[option.name] = value; - } - - const content = - state.content === "" || - state.content === getCodeSample(state.options.parser) - ? getCodeSample(options.parser) - : state.content; - - if (option.name === "parser") { - state.needsClickForFirstRun = false; - } - - return { options, content }; - }); - } - - getMarkdown({ formatted, reformatted, full, doc }) { - const { content, options } = this.state; - const { availableOptions, version } = this.props; - const orderedOptions = orderOptions(availableOptions, [ - ...ENABLED_OPTIONS, - "rangeStart", - "rangeEnd", - ]); - const cliOptions = util.buildCliArgs(orderedOptions, options); - - return formatMarkdown({ - input: content, - output: formatted, - output2: reformatted, - doc, - version, - url: window.location.href, - options, - cliOptions, - full, - }); - } - - handleInputPanelFormat() { - if (this.state.options.parser !== "doc-explorer") { - return; - } - - const { content, selection } = this.state; - - return this.props.worker - .format(content, { - parser: "__js_expression", - cursorOffset: util.convertSelectionToRange(selection, content)[0], - }) - .then(({ error, formatted, cursorOffset }) => { - if (error) { - return; - } - - return { - value: formatted, - cursor: util.convertOffsetToPosition(cursorOffset, formatted), - }; - }); - } - - render() { - const { worker, version } = this.props; - const { content, options } = this.state; - - // TODO: remove this when v2.3.0 is released - const [major, minor] = version.split(".", 2).map(Number); - const showShowComments = - Number.isNaN(major) || (major === 2 && minor >= 3) || major > 2; - - return ( - <EditorState> - {(editorState) => ( - <PrettierFormat - enabled={!this.state.needsClickForFirstRun} - worker={worker} - code={content} - options={options} - debugAst={editorState.showAst} - debugDoc={editorState.showDoc} - debugComments={showShowComments && editorState.showComments} - reformat={editorState.showSecondFormat} - rethrowEmbedErrors={editorState.rethrowEmbedErrors} - > - {({ formatted, debug }) => { - const fullReport = this.getMarkdown({ - formatted, - reformatted: debug.reformatted, - full: true, - }); - const showFullReport = - encodeURIComponent(fullReport).length < MAX_LENGTH; - return ( - <React.Fragment> - <div className="editors-container"> - <Sidebar visible={editorState.showSidebar}> - <SidebarOptions - categories={CATEGORIES_ORDER} - availableOptions={this.enabledOptions} - optionValues={options} - onOptionValueChange={this.handleOptionValueChange} - /> - <SidebarCategory title="Range"> - <label> - The selected range will be highlighted in yellow in - the input editor - </label> - <Option - option={this.rangeStartOption} - value={ - typeof options.rangeStart === "number" - ? options.rangeStart - : "" - } - onChange={this.handleOptionValueChange} - /> - <Option - option={this.rangeEndOption} - value={ - typeof options.rangeEnd === "number" - ? options.rangeEnd - : "" - } - overrideMax={content.length} - onChange={this.handleOptionValueChange} - /> - - <Button onClick={this.setSelectionAsRange}> - Set selected text as range - </Button> - </SidebarCategory> - <SidebarCategory title="Debug"> - <Checkbox - label="show input" - checked={editorState.showInput} - onChange={editorState.toggleInput} - /> - <Checkbox - label="show AST" - checked={editorState.showAst} - onChange={editorState.toggleAst} - /> - <Checkbox - label="show doc" - checked={editorState.showDoc} - onChange={editorState.toggleDoc} - /> - {showShowComments && ( - <Checkbox - label="show comments" - checked={editorState.showComments} - onChange={editorState.toggleComments} - /> - )} - <Checkbox - label="show output" - checked={editorState.showOutput} - onChange={editorState.toggleOutput} - /> - <Checkbox - label="show second format" - checked={editorState.showSecondFormat} - onChange={editorState.toggleSecondFormat} - /> - <Checkbox - label="rethrow embed errors" - checked={editorState.rethrowEmbedErrors} - onChange={editorState.toggleEmbedErrors} - /> - {editorState.showDoc && ( - <ClipboardButton - copy={() => this.getMarkdown({ doc: debug.doc })} - disabled={!debug.doc} - > - Copy doc - </ClipboardButton> - )} - </SidebarCategory> - <div className="sub-options"> - <Button onClick={this.resetOptions}> - Reset to defaults - </Button> - </div> - </Sidebar> - <div className="editors"> - {editorState.showInput ? ( - <InputPanel - mode={util.getCodemirrorMode(options.parser)} - ruler={options.printWidth} - value={content} - codeSample={getCodeSample(options.parser)} - overlayStart={options.rangeStart} - overlayEnd={options.rangeEnd} - onChange={this.setContent} - onSelectionChange={this.setSelection} - onFormat={this.handleInputPanelFormat} - /> - ) : null} - {editorState.showAst ? ( - <DebugPanel - value={debug.ast || ""} - autoFold={util.getAstAutoFold(options.parser)} - /> - ) : null} - {editorState.showDoc ? ( - <DebugPanel value={debug.doc || ""} /> - ) : null} - {showShowComments && editorState.showComments ? ( - <DebugPanel - value={debug.comments || ""} - autoFold={util.getAstAutoFold(options.parser)} - /> - ) : null} - {editorState.showOutput ? ( - this.state.needsClickForFirstRun ? ( - <div className="editor disabled-output-panel"> - <div className="explanation"> - <code>doc-explorer</code> involves running code - provided by users. - </div> - <div className="explanation"> - To stay on the safe side and prevent abuse, an - explicit user action is required when a direct - link to a <code>doc-explorer</code> playground is - opened. - </div> - <div className="explanation"> - Click the button below to start the playground. - </div> - <Button - onClick={() => - this.setState({ needsClickForFirstRun: false }) - } - > - Start - </Button> - </div> - ) : ( - <OutputPanel - mode={util.getCodemirrorMode(options.parser)} - value={formatted} - ruler={options.printWidth} - /> - ) - ) : null} - {editorState.showSecondFormat ? ( - <OutputPanel - mode={util.getCodemirrorMode(options.parser)} - value={getSecondFormat(formatted, debug.reformatted)} - ruler={options.printWidth} - /> - ) : null} - </div> - </div> - <div className="bottom-bar"> - <div className="bottom-bar-buttons"> - <Button onClick={editorState.toggleSidebar}> - {editorState.showSidebar ? "Hide" : "Show"} options - </Button> - <Button onClick={this.clearContent}>Clear</Button> - <ClipboardButton - copy={JSON.stringify( - // Remove `parser` since people usually paste this - // into their .prettierrc and specifying a top-level - // parser there is an anti-pattern. Note: - // `JSON.stringify` omits keys whose values are - // `undefined`. - { ...options, parser: undefined }, - null, - 2 - )} - > - Copy config JSON - </ClipboardButton> - </div> - <div className="bottom-bar-buttons bottom-bar-buttons-right"> - <ClipboardButton copy={window.location.href}> - Copy link - </ClipboardButton> - <ClipboardButton - copy={() => - this.getMarkdown({ - formatted, - reformatted: debug.reformatted, - }) - } - > - Copy markdown - </ClipboardButton> - <a - href={getReportLink( - showFullReport ? fullReport : COPY_MESSAGE - )} - target="_blank" - rel="noopener noreferrer" - > - <ClipboardButton - copy={() => (showFullReport ? "" : fullReport)} - > - Report issue - </ClipboardButton> - </a> - </div> - </div> - </React.Fragment> - ); - }} - </PrettierFormat> - )} - </EditorState> - ); - } -} - -function orderOptions(availableOptions, order) { - const optionsByName = {}; - for (const option of availableOptions) { - optionsByName[option.name] = option; - } - - return order.map((name) => optionsByName[name]); -} - -function getReportLink(reportBody) { - return `${ISSUES_URL}${encodeURIComponent(reportBody)}`; -} - -function getSecondFormat(formatted, reformatted) { - return formatted === "" - ? "" - : formatted === reformatted - ? "✓ Second format is unchanged." - : reformatted; -} - -export default Playground; diff --git a/website/playground/Playground.jsx b/website/playground/Playground.jsx new file mode 100644 index 000000000000..0357fd8374e6 --- /dev/null +++ b/website/playground/Playground.jsx @@ -0,0 +1,602 @@ +import { Button, ClipboardButton } from "./buttons.jsx"; +import getCodeSample from "./codeSamples.mjs"; +import generateDummyId from "./dummyId.js"; +import EditorState from "./EditorState.js"; +import { shallowEqual } from "./helpers.js"; +import formatMarkdown from "./markdown.js"; +import { DebugPanel, InputPanel, OutputPanel } from "./panels.jsx"; +import PrettierFormat from "./PrettierFormat.js"; +import { Sidebar, SidebarCategory } from "./sidebar/components.jsx"; +import { Checkbox } from "./sidebar/inputs.jsx"; +import Option from "./sidebar/options.jsx"; +import SidebarOptions from "./sidebar/SidebarOptions.jsx"; +import * as urlHash from "./urlHash.js"; +import * as util from "./util.js"; + +const { React } = window; + +const CATEGORIES_ORDER = [ + "Global", + "Common", + "JavaScript", + "Markdown", + "HTML", + "Special", +]; +const ISSUES_URL = "https://github.com/prettier/prettier/issues/new?body="; +const MAX_LENGTH = 8000 - ISSUES_URL.length; // it seems that GitHub limit is 8195 +const COPY_MESSAGE = + "<!-- The issue body has been saved to the clipboard. Please paste it after this line! 👇 -->\n"; + +const ENABLED_OPTIONS = [ + "parser", + "printWidth", + "tabWidth", + "useTabs", + "semi", + "singleQuote", + "bracketSpacing", + "jsxSingleQuote", + "objectWrap", + "quoteProps", + "arrowParens", + "trailingComma", + "proseWrap", + "htmlWhitespaceSensitivity", + "insertPragma", + "requirePragma", + // TODO: Enable this after release 3.6 + // "checkIgnorePragma", + "vueIndentScriptAndStyle", + "embeddedLanguageFormatting", + "bracketSameLine", + "singleAttributePerLine", + "experimentalTernaries", + "experimentalOperatorPosition", +]; + +class Playground extends React.Component { + constructor(props) { + super(); + + const original = urlHash.read(); + + const defaultOptions = util.getDefaults( + props.availableOptions, + ENABLED_OPTIONS, + ); + + const options = Object.assign(defaultOptions, original.options); + + // 0.0.0 ~ 0.0.10 + if (options.parser === "babylon") { + options.parser = "babel"; + } + + // 0.0.0 ~ 0.0.10 + if (options.useFlowParser) { + options.parser ??= "flow"; + } + + // 1.8.2 ~ 1.9.0 + if (typeof options.proseWrap === "boolean") { + options.proseWrap = options.proseWrap ? "always" : "never"; + } + + // 0.0.0 ~ 1.9.0 + if (typeof options.trailingComma === "boolean") { + options.trailingComma = options.trailingComma ? "es5" : "none"; + } + + // 0.17.0 ~ 2.4.0 + if (options.jsxBracketSameLine) { + delete options.jsxBracketSameLine; + options.bracketSameLine ??= options.jsxBracketSameLine; + } + + const codeSample = getCodeSample(options.parser); + const content = original.content || codeSample; + const isDocExplorer = options.parser === "doc-explorer"; + const needsClickForFirstRun = isDocExplorer && content !== codeSample; + const selection = {}; + + this.state = { content, options, selection, needsClickForFirstRun }; + + this.handleOptionValueChange = this.handleOptionValueChange.bind(this); + + this.setContent = (content) => this.setState({ content }); + this.clearContent = this.setContent.bind(this, ""); + this.resetOptions = () => this.setState({ options: defaultOptions }); + this.setSelection = (selection) => { + this.setState({ selection }); + if (this.state.trackCursorOffset) { + this.handleOptionValueChange( + this.cursorOffsetOption, + util.convertSelectionToRange(selection, this.state.content)[0], + ); + } + }; + this.setSelectionAsRange = () => { + const { selection, content, options } = this.state; + const [rangeStart, rangeEnd] = util.convertSelectionToRange( + selection, + content, + ); + const updatedOptions = { ...options, rangeStart, rangeEnd }; + if (rangeStart === rangeEnd) { + delete updatedOptions.rangeStart; + delete updatedOptions.rangeEnd; + } + this.setState({ options: updatedOptions }); + }; + + this.enabledOptions = orderOptions(props.availableOptions, ENABLED_OPTIONS); + this.rangeStartOption = props.availableOptions.find( + (opt) => opt.name === "rangeStart", + ); + this.rangeEndOption = props.availableOptions.find( + (opt) => opt.name === "rangeEnd", + ); + this.cursorOffsetOption = props.availableOptions.find( + (opt) => opt.name === "cursorOffset", + ); + + this.formatInput = this.formatInput.bind(this); + this.insertDummyId = this.insertDummyId.bind(this); + } + + componentDidUpdate(_, prevState) { + const { content, options } = this.state; + if ( + !shallowEqual(prevState.options, this.state.options) || + prevState.content !== content + ) { + urlHash.replace({ content, options }); + } + } + + handleOptionValueChange(option, value) { + this.setState((state) => { + const options = { ...state.options }; + + if (option.type === "int" && Number.isNaN(value)) { + delete options[option.name]; + } else { + options[option.name] = value; + } + + const content = + state.content === "" || + state.content === getCodeSample(state.options.parser) + ? getCodeSample(options.parser) + : state.content; + + if (option.name === "parser") { + state.needsClickForFirstRun = false; + } + + return { options, content }; + }); + } + + getMarkdown({ formatted, reformatted, full, doc }) { + const { content, options } = this.state; + const { availableOptions, version } = this.props; + const orderedOptions = orderOptions(availableOptions, [ + ...ENABLED_OPTIONS, + "rangeStart", + "rangeEnd", + "cursorOffset", + ]); + const cliOptions = util.buildCliArgs(orderedOptions, options); + + return formatMarkdown({ + input: content, + output: formatted, + output2: reformatted, + doc, + version, + url: window.location.href, + options, + cliOptions, + full, + }); + } + + formatInput() { + if (this.state.options.parser !== "doc-explorer") { + return; + } + + const { content, selection } = this.state; + + return this.props.worker + .format(content, { + parser: "__js_expression", + cursorOffset: util.convertSelectionToRange(selection, content)[0], + }) + .then(({ error, formatted, cursorOffset }) => { + if (error) { + return; + } + + this.setState({ + content: formatted, + selection: util.convertOffsetToSelection(cursorOffset, formatted), + }); + }); + } + + insertDummyId() { + const { content, selection } = this.state; + const dummyId = generateDummyId(); + const range = util.convertSelectionToRange(selection, content); + const modifiedContent = + content.slice(0, range[0]) + dummyId + content.slice(range[1]); + + this.setState({ + content: modifiedContent, + selection: util.convertOffsetToSelection( + range[0] + dummyId.length, + modifiedContent, + ), + }); + } + + render() { + const { worker } = this.props; + const { content, options } = this.state; + + return ( + <EditorState> + {(editorState) => ( + <PrettierFormat + enabled={!this.state.needsClickForFirstRun} + worker={worker} + code={content} + options={options} + debugAst={editorState.showAst} + debugPreprocessedAst={editorState.showPreprocessedAst} + debugDoc={editorState.showDoc} + debugComments={editorState.showComments} + reformat={editorState.showSecondFormat} + rethrowEmbedErrors={editorState.rethrowEmbedErrors} + > + {({ formatted, debug, cursorOffset }) => { + const fullReport = this.getMarkdown({ + formatted, + reformatted: debug.reformatted, + full: true, + }); + const showFullReport = + encodeURIComponent(fullReport).length < MAX_LENGTH; + const isDocExplorer = options.parser === "doc-explorer"; + + return ( + <> + <div className="editors-container"> + <Sidebar visible={editorState.showSidebar}> + <SidebarOptions + categories={CATEGORIES_ORDER} + availableOptions={this.enabledOptions} + optionValues={options} + onOptionValueChange={this.handleOptionValueChange} + /> + {isDocExplorer ? null : ( + <SidebarCategory title="Range"> + <label> + The selected range will be highlighted in yellow in + the input editor + </label> + <Option + option={this.rangeStartOption} + value={ + typeof options.rangeStart === "number" + ? options.rangeStart + : "" + } + onChange={this.handleOptionValueChange} + /> + <Option + option={this.rangeEndOption} + value={ + typeof options.rangeEnd === "number" + ? options.rangeEnd + : "" + } + overrideMax={content.length} + onChange={this.handleOptionValueChange} + /> + + <Button onClick={this.setSelectionAsRange}> + Set selected text as range + </Button> + </SidebarCategory> + )} + {isDocExplorer ? null : ( + <SidebarCategory title="Cursor"> + <Option + option={this.cursorOffsetOption} + value={ + options.cursorOffset >= 0 + ? options.cursorOffset + : "" + } + onChange={this.handleOptionValueChange} + /> + <div + style={{ + display: "flex", + alignItems: "baseline", + gap: "10px", + }} + > + <Checkbox + label="track" + checked={Boolean(this.state.trackCursorOffset)} + onChange={() => + this.setState((state) => ({ + trackCursorOffset: !state.trackCursorOffset, + })) + } + /> + {options.cursorOffset >= 0 ? ( + <> + <Button + onClick={() => { + this.handleOptionValueChange( + this.cursorOffsetOption, + -1, + ); + }} + > + Reset + </Button> + <label>Result: {cursorOffset}</label> + </> + ) : null} + </div> + </SidebarCategory> + )} + <SidebarCategory title="Debug"> + <Checkbox + label="show input" + checked={editorState.showInput} + onChange={editorState.toggleInput} + /> + <Checkbox + label="show AST" + checked={editorState.showAst} + onChange={editorState.toggleAst} + /> + {isDocExplorer ? null : ( + <Checkbox + label="show preprocessed AST" + checked={editorState.showPreprocessedAst} + onChange={editorState.togglePreprocessedAst} + /> + )} + {isDocExplorer ? null : ( + <Checkbox + label="show doc" + checked={editorState.showDoc} + onChange={editorState.toggleDoc} + /> + )} + {isDocExplorer ? null : ( + <Checkbox + label="show comments" + checked={editorState.showComments} + onChange={editorState.toggleComments} + /> + )} + <Checkbox + label="show output" + checked={editorState.showOutput} + onChange={editorState.toggleOutput} + /> + {isDocExplorer ? null : ( + <Checkbox + label="show second format" + checked={editorState.showSecondFormat} + onChange={editorState.toggleSecondFormat} + /> + )} + {isDocExplorer ? null : ( + <Checkbox + label="rethrow embed errors" + checked={editorState.rethrowEmbedErrors} + onChange={editorState.toggleEmbedErrors} + /> + )} + {editorState.showDoc && !isDocExplorer ? ( + <ClipboardButton + copy={() => this.getMarkdown({ doc: debug.doc })} + disabled={!debug.doc} + > + Copy doc + </ClipboardButton> + ) : null} + </SidebarCategory> + <div className="sub-options"> + <Button onClick={this.resetOptions}> + Reset to defaults + </Button> + </div> + </Sidebar> + <div className="editors"> + {editorState.showInput ? ( + <InputPanel + mode={util.getCodemirrorMode(options.parser)} + ruler={options.printWidth} + value={content} + selection={this.state.selection} + codeSample={getCodeSample(options.parser)} + overlayStart={options.rangeStart} + overlayEnd={options.rangeEnd} + onChange={this.setContent} + onSelectionChange={this.setSelection} + extraKeys={{ + "Shift-Alt-F": this.formatInput, + "Ctrl-Q": this.insertDummyId, + }} + foldGutter={options.parser === "doc-explorer"} + /> + ) : null} + {editorState.showAst ? ( + <DebugPanel + value={debug.ast || ""} + autoFold={util.getAstAutoFold(options.parser)} + /> + ) : null} + {editorState.showPreprocessedAst && !isDocExplorer ? ( + <DebugPanel + value={debug.preprocessedAst || ""} + autoFold={util.getAstAutoFold(options.parser)} + /> + ) : null} + {editorState.showDoc && !isDocExplorer ? ( + <DebugPanel value={debug.doc || ""} /> + ) : null} + {editorState.showComments && !isDocExplorer ? ( + <DebugPanel + value={debug.comments || ""} + autoFold={util.getAstAutoFold(options.parser)} + /> + ) : null} + {editorState.showOutput ? ( + this.state.needsClickForFirstRun ? ( + <div className="editor disabled-output-panel"> + <div className="explanation"> + <code>doc-explorer</code> involves running code + provided by users. + </div> + <div className="explanation"> + To stay on the safe side and prevent abuse, an + explicit user action is required when a direct + link to a <code>doc-explorer</code> playground is + opened. + </div> + <div className="explanation"> + Click the button below to start the playground. + </div> + <Button + onClick={() => + this.setState({ needsClickForFirstRun: false }) + } + > + Start + </Button> + </div> + ) : ( + <OutputPanel + mode={util.getCodemirrorMode(options.parser)} + value={formatted} + ruler={options.printWidth} + overlayStart={ + cursorOffset === -1 ? undefined : cursorOffset + } + overlayEnd={ + cursorOffset === -1 ? undefined : cursorOffset + 1 + } + /> + ) + ) : null} + {editorState.showSecondFormat && !isDocExplorer ? ( + <OutputPanel + mode={util.getCodemirrorMode(options.parser)} + value={getSecondFormat(formatted, debug.reformatted)} + ruler={options.printWidth} + /> + ) : null} + </div> + </div> + <div className="bottom-bar"> + <div className="bottom-bar-buttons"> + <Button onClick={editorState.toggleSidebar}> + {editorState.showSidebar ? "Hide" : "Show"} options + </Button> + <Button onClick={this.clearContent}>Clear</Button> + <ClipboardButton + copy={JSON.stringify( + // Remove `parser` since people usually paste this + // into their .prettierrc and specifying a top-level + // parser there is an anti-pattern. Note: + // `JSON.stringify` omits keys whose values are + // `undefined`. + { ...options, parser: undefined }, + null, + 2, + )} + > + Copy config JSON + </ClipboardButton> + <Button + onClick={this.insertDummyId} + onMouseDown={(event) => event.preventDefault()} // prevent button from focusing + title="Generate a nonsense variable name (Ctrl-Q)" + > + Insert dummy id + </Button> + </div> + <div className="bottom-bar-buttons bottom-bar-buttons-right"> + <ClipboardButton copy={window.location.href}> + Copy link + </ClipboardButton> + <ClipboardButton + copy={() => + this.getMarkdown({ + formatted, + reformatted: debug.reformatted, + }) + } + > + Copy markdown + </ClipboardButton> + <a + href={getReportLink( + showFullReport ? fullReport : COPY_MESSAGE, + )} + target="_blank" + rel="noopener noreferrer" + > + <ClipboardButton + copy={() => (showFullReport ? "" : fullReport)} + > + Report issue + </ClipboardButton> + </a> + </div> + </div> + </> + ); + }} + </PrettierFormat> + )} + </EditorState> + ); + } +} + +function orderOptions(availableOptions, order) { + const optionsByName = {}; + for (const option of availableOptions) { + optionsByName[option.name] = option; + } + + return order.map((name) => optionsByName[name]); +} + +function getReportLink(reportBody) { + return `${ISSUES_URL}${encodeURIComponent(reportBody)}`; +} + +function getSecondFormat(formatted, reformatted) { + return formatted === "" + ? "" + : formatted === reformatted + ? "✓ Second format is unchanged." + : reformatted; +} + +export default Playground; diff --git a/website/playground/PrettierFormat.js b/website/playground/PrettierFormat.js index d66828be37d5..87af04566f1c 100644 --- a/website/playground/PrettierFormat.js +++ b/website/playground/PrettierFormat.js @@ -1,4 +1,4 @@ -import * as React from "react"; +const { React } = window; export default class PrettierFormat extends React.Component { constructor() { @@ -16,6 +16,7 @@ export default class PrettierFormat extends React.Component { "code", "options", "debugAst", + "debugPreprocessedAst", "debugDoc", "debugComments", "reformat", @@ -28,13 +29,14 @@ export default class PrettierFormat extends React.Component { } } - format() { + async format() { const { enabled, worker, code, options, debugAst: ast, + debugPreprocessedAst: preprocessedAst, debugDoc: doc, debugComments: comments, reformat, @@ -45,15 +47,16 @@ export default class PrettierFormat extends React.Component { return; } - worker - .format(code, options, { - ast, - doc, - comments, - reformat, - rethrowEmbedErrors, - }) - .then((result) => this.setState(result)); + const result = await worker.format(code, options, { + ast, + preprocessedAst, + doc, + comments, + reformat, + rethrowEmbedErrors, + }); + + this.setState(result); } render() { diff --git a/website/playground/VersionLink.js b/website/playground/VersionLink.js deleted file mode 100644 index 9b32adf0aa5e..000000000000 --- a/website/playground/VersionLink.js +++ /dev/null @@ -1,33 +0,0 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -const root = document.getElementById("version"); - -export default function VersionLink({ version }) { - const match = version.match(/^pr-(\d+)$/); - let href; - if (match) { - href = `pull/${match[1]}`; - } else if (/\.0$/.test(version)) { - href = `releases/tag/${version}`; - } else { - href = `blob/main/CHANGELOG.md#${version.replace(/\./g, "")}`; - } - - const formattedVersion = match ? `PR #${match[1]}` : `v${version}`; - - React.useEffect(() => { - document.title = `Prettier ${formattedVersion}`; - }, [formattedVersion]); - - return ReactDOM.createPortal( - <a - href={`https://github.com/prettier/prettier/${href}`} - target="_blank" - rel="noreferrer noopener" - > - {formattedVersion} - </a>, - root - ); -} diff --git a/website/playground/VersionLink.jsx b/website/playground/VersionLink.jsx new file mode 100644 index 000000000000..c5a23e09f5a5 --- /dev/null +++ b/website/playground/VersionLink.jsx @@ -0,0 +1,32 @@ +const { React, ReactDOM } = window; + +const root = document.getElementById("version"); + +export default function VersionLink({ version }) { + const match = version.match(/^pr-(\d+)$/u); + let href; + if (match) { + href = `pull/${match[1]}`; + } else if (/\.0$/u.test(version)) { + href = `releases/tag/${version}`; + } else { + href = `blob/main/CHANGELOG.md#${version.replaceAll(".", "")}`; + } + + const formattedVersion = match ? `PR #${match[1]}` : `v${version}`; + + React.useEffect(() => { + document.title = `Prettier ${formattedVersion}`; + }, [formattedVersion]); + + return ReactDOM.createPortal( + <a + href={`https://github.com/prettier/prettier/${href}`} + target="_blank" + rel="noreferrer noopener" + > + {formattedVersion} + </a>, + root, + ); +} diff --git a/website/playground/WorkerApi.js b/website/playground/WorkerApi.js index 23928ffebb9d..e57b7495139b 100644 --- a/website/playground/WorkerApi.js +++ b/website/playground/WorkerApi.js @@ -1,5 +1,5 @@ -export default function WorkerApi(source) { - const worker = new Worker(source); +export default function WorkerApi() { + const worker = new Worker("/worker.mjs", { type: "module" }); let counter = 0; const handlers = {}; @@ -35,6 +35,5 @@ export default function WorkerApi(source) { format(code, options, debug = {}) { return postMessage({ type: "format", code, options, debug }); }, - postMessage, }; } diff --git a/website/playground/buttons.js b/website/playground/buttons.js deleted file mode 100644 index f73174bc5b3f..000000000000 --- a/website/playground/buttons.js +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from "react"; -import ClipboardJS from "clipboard"; - -export const Button = React.forwardRef((props, ref) => ( - <button type="button" className="btn" ref={ref} {...props} /> -)); - -export class ClipboardButton extends React.Component { - constructor() { - super(); - this.state = { showTooltip: false, tooltipText: "" }; - this.timer = null; - this.ref = React.createRef(); - } - - componentDidMount() { - this.clipboard = new ClipboardJS(this.ref.current, { - text: () => { - const { copy } = this.props; - return typeof copy === "function" ? copy() : copy; - }, - }); - this.clipboard.on("success", () => this.showTooltip("Copied!")); - this.clipboard.on("error", () => this.showTooltip("Press ctrl+c to copy")); - } - - showTooltip(text) { - this.setState({ showTooltip: true, tooltipText: text }, () => { - if (this.timer) { - clearTimeout(this.timer); - } - this.timer = setTimeout(() => { - this.timer = null; - this.setState({ showTooltip: false }); - }, 2000); - }); - } - - render() { - const { children, copy, ...rest } = this.props; - const { showTooltip, tooltipText } = this.state; - - return ( - <Button ref={this.ref} {...rest}> - {showTooltip ? <span className="tooltip">{tooltipText}</span> : null} - {children} - </Button> - ); - } -} diff --git a/website/playground/buttons.jsx b/website/playground/buttons.jsx new file mode 100644 index 000000000000..1227e54d31fa --- /dev/null +++ b/website/playground/buttons.jsx @@ -0,0 +1,49 @@ +const { ClipboardJS, React } = window; + +export const Button = React.forwardRef((props, ref) => ( + <button type="button" className="btn" ref={ref} {...props} /> +)); + +export class ClipboardButton extends React.Component { + constructor() { + super(); + this.state = { showTooltip: false, tooltipText: "" }; + this.timer = null; + this.ref = React.createRef(); + } + + componentDidMount() { + this.clipboard = new ClipboardJS(this.ref.current, { + text: () => { + const { copy } = this.props; + return typeof copy === "function" ? copy() : copy; + }, + }); + this.clipboard.on("success", () => this.showTooltip("Copied!")); + this.clipboard.on("error", () => this.showTooltip("Press ctrl+c to copy")); + } + + showTooltip(text) { + this.setState({ showTooltip: true, tooltipText: text }, () => { + if (this.timer) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.timer = null; + this.setState({ showTooltip: false }); + }, 2000); + }); + } + + render() { + const { children, copy, ...rest } = this.props; + const { showTooltip, tooltipText } = this.state; + + return ( + <Button ref={this.ref} {...rest}> + {showTooltip ? <span className="tooltip">{tooltipText}</span> : null} + {children} + </Button> + ); + } +} diff --git a/website/playground/codeSamples.js b/website/playground/codeSamples.js deleted file mode 100644 index 3038fbca396e..000000000000 --- a/website/playground/codeSamples.js +++ /dev/null @@ -1,332 +0,0 @@ -export default function getCodeSamples(parser) { - switch (parser) { - case "babel": - case "acorn": - case "espree": - case "meriyah": - return [ - 'function HelloWorld({greeting = "hello", greeted = \'"World"\', silent = false, onMouseOver,}) {', - "", - " if(!greeting){return null};", - "", - " // TODO: Don't use random in render", - ' let num = Math.floor (Math.random() * 1E+7).toString().replace(/\\.\\d+/ig, "")', - "", - " return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}>", - "", - " <strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong>", - ' {greeting.endsWith(",") ? " " : <span style={{color: \'\\grey\'}}>", "</span> }', - " <em>", - "\t{ greeted }", - "\t</em>", - " { (silent)", - ' ? "."', - ' : "!"}', - "", - " </div>;", - "", - "}", - ].join("\n"); - case "flow": - case "babel-flow": - return [ - "declare export function graphql<Props, Variables, Component: React$ComponentType<Props>>", - " (query: GQLDocument, config?: Config<Props, QueryConfigOptions<Variables>>):", - " (Component: Component) => React$ComponentType<$Diff<React$ElementConfig<Component>, {", - " data: Object|void,", - " mutate: Function|void", - " }>>", - "", - 'declare type FetchPolicy = "cache-first" | "cache-and-network" | "network-only" | "cache-only"', - ].join("\n"); - case "typescript": - case "babel-ts": - return [ - "interface MyInterface {", - " foo(): string,", - " bar: Array<number>,", - "}", - "", - "export abstract class Foo implements MyInterface {", - " foo() {", - " // TODO: return an actual value here", - " return 'hello'", - " }", - " get bar() {", - " return [ 1,", - "", - " 2, 3,", - " ]", - " }", - "}", - "", - "type RequestType = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'OPTIONS' | 'CONNECT' | 'DELETE' | 'TRACE'", - ].join("\n"); - case "css": - // Excerpted from the Bootstrap source, which is licensed under the MIT license: - // https://github.com/twbs/bootstrap/blob/v4.0.0-beta.3/LICENSE - return [ - "@media (max-width: 480px) {", - " .bd-examples {margin-right: -.75rem;margin-left: -.75rem", - " }", - " ", - ' .bd-examples>[class^="col-"] {', - " padding-right: .75rem;", - " padding-left: .75rem;", - " ", - " }", - "}", - ].join("\n"); - case "scss": - // Excerpted from the Bootstrap source, which is licensed under the MIT license: - // https://github.com/twbs/bootstrap/blob/v4.0.0-beta.3/LICENSE - return [ - "@function color-yiq($color) {", - " $r: red($color);$g: green($color);$b: blue($color);", - "", - " $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;", - "", - " @if ($yiq >= $yiq-contrasted-threshold) {", - " @return $yiq-text-dark;", - "} @else {", - " @return $yiq-text-light;", - " }", - "}", - "", - "@each $color, $value in $colors {", - " .swatch-#{$color} {", - " color: color-yiq($value);", - " background-color: #{$value};", - " }", - "}", - ].join("\n"); - case "less": - // Copied from http://lesscss.org/features/#detached-rulesets-feature - return [ - "@my-ruleset: {", - " .my-selector {", - " @media tv {", - " background-color: black;", - " }", - " }", - " };", - "@media (orientation:portrait) {", - " @my-ruleset();", - "}", - ].join("\n"); - case "json": - case "json5": - case "json-stringify": - // Excerpted & adapted from Wikipedia, under the Creative Commons Attribution-ShareAlike License - // https://en.wikipedia.org/wiki/JSON#Example - return [ - '{"allOn": "Single", "Line": "example",', - '"noSpace":true,', - ' "quote": {', - " 'singleQuote': 'example',", - ' "indented": true,', - " },", - ' "phoneNumbers": [', - ' {"type": "home",', - ' "number": "212 555-1234"},', - ' {"type": "office",', - ' "trailing": "commas by accident"},', - " ],", - "}", - ].join("\n"); - case "graphql": - return [ - "query Browse($offset: Int, $limit: Int, $categories: [String!], $search: String) {", - " browse(limit: $limit, offset: $offset, categories: $categories, search: $search) {", - " total,", - " results {", - " title", - " price", - " }", - " }", - "}", - ].join("\n"); - case "markdown": - return [ - "Header", - "======", - "", - "_Look,_ code blocks are formatted *too!*", - "", - "``` js", - "function identity(x) { return x }", - "```", - "", - "Pilot|Airport|Hours", - "--|:--:|--:", - "John Doe|SKG|1338", - "Jane Roe|JFK|314", - "", - "- - - - - - - - - - - - - - -", - "", - "+ List", - " + with a [link] (/to/somewhere)", - "+ and [another one]", - "", - "", - " [another one]: http://example.com 'Example title'", - "", - "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - "Curabitur consectetur maximus risus, sed maximus tellus tincidunt et.", - ].join("\n"); - case "mdx": - // modified from https://github.com/mdx-js/mdx/blob/master/packages/mdx/test/fixtures/blog-post.md - return [ - "import { Baz } from './Fixture'", - "import { Buz } from './Fixture'", - "", - "export const foo = {", - " hi: `Fudge ${Baz.displayName || 'Baz'}`,", - " authors: [", - " 'fred',", - " 'sally'", - " ]", - "}", - "", - "# Hello, world!", - "", - "", - " I'm an awesome paragraph.", - "", - "<!-- I'm a comment -->", - "", - "<Foo bg='red'>", - " <Bar >hi </Bar>", - " { hello }", - " { /* another comment */}", - "</Foo>", - "", - "```", - "test codeblock", - "```", - "", - "```js", - "module.exports = 'test'", - "```", - "", - "```sh", - "npm i -g foo", - "```", - "", - "| Test | Table |", - "| :--- | :---- |", - "| Col1 | Col2 |", - "", - "export default ({children }) => < div>{ children}</div>", - "", - ].join("\n"); - case "vue": - return [ - "<template>", - " <p>Templates are formatted as well...", - " </p>", - "</template>", - "", - "<script>", - "let Prettier = format => { your.js('though') }", - "</script>", - "", - "<style>", - ".and { css: too !important }", - "</style>", - ].join("\n"); - case "yaml": - // modified from http://yaml.org/start.html - return [ - "---", - "invoice : 34843", - "date : 2001-01-23", - "bill-to: &id001", - " given : Chris", - " family : Dumars", - " address:", - " lines: |", - " 458 Walkman Dr.", - " Suite #292", - " city : Royal Oak", - " state : MI", - " postal : 48046", - "ship-to: *id001", - "product:", - " - ", - " ", - " sku : BL394D", - " ? quantity ", - " : 4", - " description : Basketball", - " ? price ", - " : 450.00", - " ", - " ", - " - ", - " sku : BL4438H", - " quantity : 1", - " description: Super Hoop", - " price : 2392.00", - " ", - " ", - "tax : 251.42", - "total : 4443.52", - "comments: >", - " Late afternoon is best.", - " Backup contact is Nancy", - " Billsmer @ 338-4338.", - "", - ].join("\n"); - case "glimmer": - // modified from http://handlebarsjs.com/ - return [ - ' <div class="entry" >', - " <h1>{{ title }}</h1>", - ' <div class="body">', - " {{ body }}", - "</div> </div>", - ].join("\n"); - case "html": - case "angular": - case "lwc": - return [ - "<!DOCTYPE html>", - '<HTML CLASS="no-js mY-ClAsS">', - " <HEAD>", - ' <META CHARSET="utf-8">', - " <TITLE>My tITlE</TITLE>", - ' <META NAME="description" content="My CoNtEnT">', - " </HEAD>", - " <body>", - " <P>Hello world!<BR> This is HTML5 Boilerplate.</P>", - " <SCRIPT>", - " window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;", - " ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')", - " </SCRIPT>", - ' <SCRIPT src="https://www.google-analytics.com/analytics.js" ASYNC DEFER></SCRIPT>', - " </body>", - "</HTML>", - ].join("\n"); - case "doc-explorer": - return [ - "group([", - ' "(*",', - " indent([", - " line,", - ' "Prettier:",', - " line,", - ' "Opinionated,",', - " line,", - ' "Code,",', - " line,", - ' "Formatter",', - " ]),", - " line,", - ' "*)",', - "])", - ].join("\n"); - default: - return ""; - } -} diff --git a/website/playground/codeSamples.mjs b/website/playground/codeSamples.mjs new file mode 100644 index 000000000000..af2a8efdb779 --- /dev/null +++ b/website/playground/codeSamples.mjs @@ -0,0 +1,346 @@ +export default function getCodeSamples(parser) { + switch (parser) { + case "babel": + case "acorn": + case "espree": + case "meriyah": + return [ + 'function HelloWorld({greeting = "hello", greeted = \'"World"\', silent = false, onMouseOver,}) {', + "", + " if(!greeting){return null};", + "", + " // TODO: Don't use random in render", + String.raw` let num = Math.floor (Math.random() * 1E+7).toString().replace(/\.\d+/ig, "")`, + "", + " return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}>", + "", + " <strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong>", + String.raw` {greeting.endsWith(",") ? " " : <span style={{color: '\grey'}}>", "</span> }`, + " <em>", + "\t{ greeted }", + "\t</em>", + " { (silent)", + ' ? "."', + ' : "!"}', + "", + " </div>;", + "", + "}", + ].join("\n"); + case "flow": + case "hermes": + case "babel-flow": + return [ + "declare export function graphql<Props, Variables, Component: React$ComponentType<Props>>", + " (query: GQLDocument, config?: Config<Props, QueryConfigOptions<Variables>>):", + " (Component: Component) => React$ComponentType<$Diff<React$ElementConfig<Component>, {", + " data: Object|void,", + " mutate: Function|void", + " }>>", + "", + 'declare type FetchPolicy = "cache-first" | "cache-and-network" | "network-only" | "cache-only"', + ].join("\n"); + case "typescript": + case "babel-ts": + return [ + "interface MyInterface {", + " foo(): string,", + " bar: Array<number>,", + "}", + "", + "export abstract class Foo implements MyInterface {", + " foo() {", + " // TODO: return an actual value here", + " return 'hello'", + " }", + " get bar() {", + " return [ 1,", + "", + " 2, 3,", + " ]", + " }", + "}", + "", + "type RequestType = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'OPTIONS' | 'CONNECT' | 'DELETE' | 'TRACE'", + ].join("\n"); + case "css": + // Excerpted from the Bootstrap source, which is licensed under the MIT license: + // https://github.com/twbs/bootstrap/blob/v4.0.0-beta.3/LICENSE + return [ + "@media (max-width: 480px) {", + " .bd-examples {margin-right: -.75rem;margin-left: -.75rem", + " }", + " ", + ' .bd-examples>[class^="col-"] {', + " padding-right: .75rem;", + " padding-left: .75rem;", + " ", + " }", + "}", + ].join("\n"); + case "scss": + // Excerpted from the Bootstrap source, which is licensed under the MIT license: + // https://github.com/twbs/bootstrap/blob/v4.0.0-beta.3/LICENSE + return [ + "@function color-yiq($color) {", + " $r: red($color);$g: green($color);$b: blue($color);", + "", + " $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;", + "", + " @if ($yiq >= $yiq-contrasted-threshold) {", + " @return $yiq-text-dark;", + "} @else {", + " @return $yiq-text-light;", + " }", + "}", + "", + "@each $color, $value in $colors {", + " .swatch-#{$color} {", + " color: color-yiq($value);", + " background-color: #{$value};", + " }", + "}", + ].join("\n"); + case "less": + // Copied from http://lesscss.org/features/#detached-rulesets-feature + return [ + "@my-ruleset: {", + " .my-selector {", + " @media tv {", + " background-color: black;", + " }", + " }", + " };", + "@media (orientation:portrait) {", + " @my-ruleset();", + "}", + ].join("\n"); + case "json": + case "json5": + case "jsonc": + case "json-stringify": + // Excerpted & adapted from Wikipedia, under the Creative Commons Attribution-ShareAlike License + // https://en.wikipedia.org/wiki/JSON#Example + return [ + '{"allOn": "Single", "Line": "example",', + '"noSpace":true,', + ' "quote": {', + " 'singleQuote': 'example',", + ' "indented": true,', + " },", + ' "phoneNumbers": [', + ' {"type": "home",', + ' "number": "212 555-1234"},', + ' {"type": "office",', + ' "trailing": "commas by accident"},', + " ],", + "}", + ].join("\n"); + case "graphql": + return [ + "query Browse($offset: Int, $limit: Int, $categories: [String!], $search: String) {", + " browse(limit: $limit, offset: $offset, categories: $categories, search: $search) {", + " total,", + " results {", + " title", + " price", + " }", + " }", + "}", + ].join("\n"); + case "markdown": + return [ + "Header", + "======", + "", + "_Look,_ code blocks are formatted *too!*", + "", + "``` js", + "function identity(x) { return x }", + "```", + "", + "Pilot|Airport|Hours", + "--|:--:|--:", + "John Doe|SKG|1338", + "Jane Roe|JFK|314", + "", + "- - - - - - - - - - - - - - -", + "", + "+ List", + " + with a [link] (/to/somewhere)", + "+ and [another one]", + "", + "", + " [another one]: http://example.com 'Example title'", + "", + "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "Curabitur consectetur maximus risus, sed maximus tellus tincidunt et.", + ].join("\n"); + case "mdx": + // modified from https://github.com/mdx-js/mdx/blob/master/packages/mdx/test/fixtures/blog-post.md + return [ + "import { Baz } from './Fixture'", + "import { Buz } from './Fixture'", + "", + "export const foo = {", + " hi: `Fudge ${Baz.displayName || 'Baz'}`,", + " authors: [", + " 'fred',", + " 'sally'", + " ]", + "}", + "", + "# Hello, world!", + "", + "", + " I'm an awesome paragraph.", + "", + "<!-- I'm a comment -->", + "", + "<Foo bg='red'>", + " <Bar >hi </Bar>", + " { hello }", + " { /* another comment */}", + "</Foo>", + "", + "```", + "test codeblock", + "```", + "", + "```js", + "module.exports = 'test'", + "```", + "", + "```sh", + "npm i -g foo", + "```", + "", + "| Test | Table |", + "| :--- | :---- |", + "| Col1 | Col2 |", + "", + "export default ({children }) => < div>{ children}</div>", + "", + ].join("\n"); + case "vue": + return [ + "<template>", + " <p>Templates are formatted as well...", + " </p>", + "</template>", + "", + "<script>", + "let Prettier = format => { your.js('though') }", + "</script>", + "", + "<style>", + ".and { css: too !important }", + "</style>", + ].join("\n"); + case "yaml": + // modified from http://yaml.org/start.html + return [ + "---", + "invoice : 34843", + "date : 2001-01-23", + "bill-to: &id001", + " given : Chris", + " family : Dumars", + " address:", + " lines: |", + " 458 Walkman Dr.", + " Suite #292", + " city : Royal Oak", + " state : MI", + " postal : 48046", + "ship-to: *id001", + "product:", + " - ", + " ", + " sku : BL394D", + " ? quantity ", + " : 4", + " description : Basketball", + " ? price ", + " : 450.00", + " ", + " ", + " - ", + " sku : BL4438H", + " quantity : 1", + " description: Super Hoop", + " price : 2392.00", + " ", + " ", + "tax : 251.42", + "total : 4443.52", + "comments: >", + " Late afternoon is best.", + " Backup contact is Nancy", + " Billsmer @ 338-4338.", + "", + ].join("\n"); + case "glimmer": + // modified from http://handlebarsjs.com/ + return [ + ' <div class="entry" >', + " <h1>{{ title }}</h1>", + ' <div class="body">', + " {{ body }}", + "</div> </div>", + ].join("\n"); + case "html": + case "angular": + case "lwc": + return [ + "<!DOCTYPE html>", + '<HTML CLASS="no-js mY-ClAsS">', + " <HEAD>", + ' <META CHARSET="utf-8">', + " <TITLE>My tITlE</TITLE>", + ' <META NAME="description" content="My CoNtEnT">', + " </HEAD>", + " <body>", + " <P>Hello world!<BR> This is HTML5 Boilerplate.</P>", + " <SCRIPT>", + " window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;", + " ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')", + " </SCRIPT>", + ' <SCRIPT src="https://www.google-analytics.com/analytics.js" ASYNC DEFER></SCRIPT>', + " </body>", + "</HTML>", + ].join("\n"); + case "mjml": + return [ + "<mjml> <mj-body>", + " <mj-section>", + " <mj-column>", + "<mj-text> Hello World!", + " </mj-text>", + " </mj-column>", + " </mj-section>", + " </mj-body>", + " </mjml>", + ].join("\n"); + case "doc-explorer": + return [ + "group([", + ' "(*",', + " indent([", + " line,", + ' "Prettier:",', + " line,", + ' "Opinionated,",', + " line,", + ' "Code,",', + " line,", + ' "Formatter",', + " ]),", + " line,", + ' "*)",', + "])", + ].join("\n"); + default: + return ""; + } +} diff --git a/website/playground/dummyId.js b/website/playground/dummyId.js new file mode 100644 index 000000000000..7bf01a9bb002 --- /dev/null +++ b/website/playground/dummyId.js @@ -0,0 +1,60 @@ +/* cSpell:disable */ +const dummyAdjectives = [ + "annular", + "abugidic", + "cantilevered", + "equidistant", + "hippopotamic", + "octahedral", + "particolored", + "quadrupedal", + "stellated", + "transdecimal", +]; + +const dummyNouns = [ + "anteater", + "dingbat", + "dinosaur", + "fossil", + "kangaroo", + "palimpsest", + "platypus", + "rhinoceros", + "rhubarb", + "romanocastor", + "smorgasbord", + "thingamabob", + "weevil", + "zamazingo", +]; + +const dummyFinalNouns = [ + "factory", + "generator", + "mutator", + "processor", + "provider", + "replacer", + "resolver", + "service", + "transformer", + "wrapper", +]; +// cSpell:enable + +function getRandomElement(array) { + return array[Math.floor(Math.random() * array.length)]; +} + +function camelCase(string) { + return string.replaceAll(/_(\w)/gu, (_, c) => c.toUpperCase()); +} + +export default function generateDummyId() { + return camelCase( + [dummyAdjectives, dummyNouns, dummyFinalNouns] + .map(getRandomElement) + .join("_"), + ); +} diff --git a/website/playground/index.js b/website/playground/index.js deleted file mode 100644 index 67d42705a75e..000000000000 --- a/website/playground/index.js +++ /dev/null @@ -1,61 +0,0 @@ -import "codemirror-graphql/mode"; - -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -import Playground from "./Playground.js"; -import VersionLink from "./VersionLink.js"; -import WorkerApi from "./WorkerApi.js"; -import { fixPrettierVersion } from "./util.js"; - -class App extends React.Component { - constructor() { - super(); - this.state = { loaded: false }; - this.worker = new WorkerApi("/worker.js"); - } - - componentDidMount() { - this.worker.getMetadata().then(({ supportInfo, version }) => { - this.setState({ - loaded: true, - availableOptions: supportInfo.options.map(augmentOption), - version: fixPrettierVersion(version), - }); - }); - } - - render() { - const { loaded, availableOptions, version } = this.state; - - if (!loaded) { - return "Loading..."; - } - - return ( - <React.Fragment> - <VersionLink version={version} /> - <Playground - worker={this.worker} - availableOptions={availableOptions} - version={version} - /> - </React.Fragment> - ); - } -} - -function augmentOption(option) { - if (option.type === "boolean" && option.default === true) { - option.inverted = true; - } - - option.cliName = - "--" + - (option.inverted ? "no-" : "") + - option.name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); - - return option; -} - -ReactDOM.render(<App />, document.getElementById("root")); diff --git a/website/playground/index.jsx b/website/playground/index.jsx new file mode 100644 index 000000000000..382ebf746917 --- /dev/null +++ b/website/playground/index.jsx @@ -0,0 +1,67 @@ +import "codemirror-graphql/cm6-legacy/mode.esm.js"; +import "./install-service-worker.js"; + +import Playground from "./Playground.jsx"; +import { fixPrettierVersion } from "./util.js"; +import VersionLink from "./VersionLink.jsx"; +import WorkerApi from "./WorkerApi.js"; + +const { + React, + ReactDOM: { createRoot }, +} = window; + +class App extends React.Component { + constructor() { + super(); + this.state = { loaded: false }; + this.worker = new WorkerApi(); + } + + async componentDidMount() { + const { supportInfo, version } = await this.worker.getMetadata(); + + // eslint-disable-next-line @eslint-react/no-set-state-in-component-did-mount + this.setState({ + loaded: true, + availableOptions: supportInfo.options.map(augmentOption), + version: fixPrettierVersion(version), + }); + } + + render() { + const { loaded, availableOptions, version } = this.state; + + if (!loaded) { + return "Loading..."; + } + + return ( + <> + <VersionLink version={version} /> + <Playground + worker={this.worker} + availableOptions={availableOptions} + version={version} + /> + </> + ); + } +} + +function augmentOption(option) { + if (option.type === "boolean" && option.default === true) { + option.inverted = true; + } + + option.cliName = + "--" + + (option.inverted ? "no-" : "") + + option.name.replaceAll(/(?<=[a-z])(?=[A-Z])/gu, "-").toLowerCase(); + + return option; +} + +const container = document.getElementById("root"); +const root = createRoot(container); +root.render(<App />); diff --git a/website/playground/install-service-worker.js b/website/playground/install-service-worker.js new file mode 100644 index 000000000000..7b14ab3bd736 --- /dev/null +++ b/website/playground/install-service-worker.js @@ -0,0 +1,6 @@ +if ("serviceWorker" in navigator) { + navigator.serviceWorker.register("/service-worker.mjs", { + type: "module", + scope: "/playground/", + }); +} diff --git a/website/playground/markdown.js b/website/playground/markdown.js index ec2c412e3a17..af0339e58d41 100644 --- a/website/playground/markdown.js +++ b/website/playground/markdown.js @@ -27,7 +27,10 @@ function formatMarkdown({ ...(isIdempotent ? [] : ["", "**Second Output:**", codeBlock(output2, syntax)]), - ...(full ? ["", "**Expected behavior:**", ""] : []), + ...(full ? ["", "**Expected output:**", codeBlock("", syntax)] : []), + ...(full + ? ["", "**Why?**", "", "<!-- short explanation of expected output -->"] + : []), ] .filter((part) => part !== null) .join("\n"); @@ -38,6 +41,7 @@ function getMarkdownSyntax(options) { case "babel": case "babel-flow": case "flow": + case "hermes": case "acorn": case "espree": case "meriyah": @@ -53,6 +57,7 @@ function getMarkdownSyntax(options) { return "hbs"; case "angular": case "lwc": + case "mjml": return "html"; default: return options.parser; @@ -66,16 +71,16 @@ function formatCLIOptions(cliOptions) { } function codeBlock(content, syntax) { - const backtickSequences = content.match(/`+/g) || []; + const backtickSequences = content.match(/`+/gu) || []; const longestBacktickSequenceLength = Math.max( - ...backtickSequences.map(({ length }) => length) + ...backtickSequences.map(({ length }) => length), ); const prettierIgnoreComment = "<!-- prettier-ignore -->"; const fenceLength = Math.max(3, longestBacktickSequenceLength + 1); const fence = "`".repeat(fenceLength); return [prettierIgnoreComment, fence + (syntax || ""), content, fence].join( - "\n" + "\n", ); } -module.exports = formatMarkdown; +export default formatMarkdown; diff --git a/website/playground/panels.js b/website/playground/panels.js deleted file mode 100644 index 41b32693f653..000000000000 --- a/website/playground/panels.js +++ /dev/null @@ -1,230 +0,0 @@ -import CodeMirror from "codemirror"; -import * as React from "react"; - -class CodeMirrorPanel extends React.Component { - constructor() { - super(); - this._textareaRef = React.createRef(); - this._codeMirror = null; - this._cached = ""; - this._overlay = null; - this.handleChange = this.handleChange.bind(this); - this.handleFocus = this.handleFocus.bind(this); - this.handleSelectionChange = this.handleSelectionChange.bind(this); - } - - componentDidMount() { - const options = { ...this.props }; - delete options.ruler; - delete options.rulerColor; - delete options.value; - delete options.onChange; - delete options.onFormat; - - options.rulers = [makeRuler(this.props)]; - - if (options.foldGutter) { - options.gutters = ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]; - } - - if (this.props.onFormat) { - options.extraKeys = { - "Shift-Alt-F": this.handleFormat.bind(this), - }; - } - - this._codeMirror = CodeMirror.fromTextArea( - this._textareaRef.current, - options - ); - this._codeMirror.on("change", this.handleChange); - this._codeMirror.on("focus", this.handleFocus); - this._codeMirror.on("beforeSelectionChange", this.handleSelectionChange); - - window.CodeMirror.keyMap.pcSublime["Ctrl-L"] = false; - window.CodeMirror.keyMap.sublime["Ctrl-L"] = false; - - this.updateValue(this.props.value || ""); - this.updateOverlay(); - } - - componentWillUnmount() { - this._codeMirror && this._codeMirror.toTextArea(); - } - - componentDidUpdate(prevProps) { - if (this.props.value !== this._cached) { - this.updateValue(this.props.value); - } - if ( - this.props.overlayStart !== prevProps.overlayStart || - this.props.overlayEnd !== prevProps.overlayEnd - ) { - this.updateOverlay(); - } - if (this.props.mode !== prevProps.mode) { - this._codeMirror.setOption("mode", this.props.mode); - } - if (this.props.ruler !== prevProps.ruler) { - this._codeMirror.setOption("rulers", [makeRuler(this.props)]); - } - } - - updateValue(value) { - this._cached = value; - this._codeMirror.setValue(value); - - if (this.props.autoFold instanceof RegExp) { - const lines = value.split("\n"); - // going backwards to prevent unfolding folds created earlier - for (let i = lines.length - 1; i >= 0; i--) { - if (this.props.autoFold.test(lines[i])) { - this._codeMirror.foldCode(i); - } - } - } - } - - updateOverlay() { - if (!this.props.readOnly) { - if (this._overlay) { - this._codeMirror.removeOverlay(this._overlay); - } - const [start, end] = getIndexPosition(this.props.value, [ - this.props.overlayStart, - this.props.overlayEnd, - ]); - this._overlay = createOverlay(start, end); - this._codeMirror.addOverlay(this._overlay); - } - } - - handleFocus(/* codeMirror, event */) { - if (this._codeMirror.getValue() === this.props.codeSample) { - this._codeMirror.execCommand("selectAll"); - } - } - - handleChange(doc, change) { - if (change.origin !== "setValue") { - this._cached = doc.getValue(); - this.props.onChange(this._cached); - this.updateOverlay(); - } - } - - handleSelectionChange(doc, change) { - if (this.props.onSelectionChange) { - this.props.onSelectionChange(change.ranges[0]); - } - } - - handleFormat() { - const result = this.props.onFormat(); - if (!result) { - return; - } - Promise.resolve(result).then(({ value, cursor }) => { - this.props.onChange(value); - this._codeMirror.setCursor(cursor); - }); - } - - render() { - return ( - <div className="editor input"> - <textarea ref={this._textareaRef} /> - </div> - ); - } -} - -function getIndexPosition(text, indexes) { - indexes = [...indexes]; - let line = 0; - let count = 0; - let lineStart = 0; - const result = []; - - while (indexes.length > 0) { - const index = indexes.shift(); - - while (count < index && count < text.length) { - if (text[count] === "\n") { - line++; - lineStart = count + 1; - } - count++; - } - - result.push({ line, pos: count - lineStart }); - } - - return result; -} - -function createOverlay(start, end) { - return { - token(stream) { - const { line } = stream.lineOracle; - - if (line < start.line || line > end.line) { - stream.skipToEnd(); - } else if (line === start.line && stream.pos < start.pos) { - stream.pos = start.pos; - } else if (line === end.line) { - if (stream.pos < end.pos) { - stream.pos = end.pos; - return "searching"; - } - stream.skipToEnd(); - } else { - stream.skipToEnd(); - return "searching"; - } - }, - }; -} - -function makeRuler(props) { - return { column: props.ruler, color: props.rulerColor }; -} - -export function InputPanel(props) { - return ( - <CodeMirrorPanel - lineNumbers={true} - keyMap="sublime" - autoCloseBrackets={true} - matchBrackets={true} - showCursorWhenSelecting={true} - tabSize={4} - rulerColor="#eeeeee" - {...props} - /> - ); -} - -export function OutputPanel(props) { - return ( - <CodeMirrorPanel - readOnly={true} - lineNumbers={true} - rulerColor="#444444" - {...props} - /> - ); -} - -export function DebugPanel({ value, autoFold }) { - return ( - <CodeMirrorPanel - readOnly={true} - lineNumbers={false} - foldGutter={true} - autoFold={autoFold} - mode="jsx" - value={value} - /> - ); -} diff --git a/website/playground/panels.jsx b/website/playground/panels.jsx new file mode 100644 index 000000000000..1d3d238a884c --- /dev/null +++ b/website/playground/panels.jsx @@ -0,0 +1,246 @@ +const { React, CodeMirror } = window; + +class CodeMirrorPanel extends React.Component { + constructor() { + super(); + this._textareaRef = React.createRef(); + this._codeMirror = null; + this._cached = ""; + this._overlay = null; + this.handleChange = this.handleChange.bind(this); + this.handleFocus = this.handleFocus.bind(this); + this.handleSelectionChange = this.handleSelectionChange.bind(this); + } + + componentDidMount() { + const options = { ...this.props }; + delete options.ruler; + delete options.rulerColor; + delete options.value; + delete options.selection; + delete options.onChange; + + options.rulers = [makeRuler(this.props)]; + options.gutters = makeGutters(this.props); + + this._codeMirror = CodeMirror.fromTextArea( + this._textareaRef.current, + options, + ); + this._codeMirror.on("change", this.handleChange); + this._codeMirror.on("focus", this.handleFocus); + this._codeMirror.on("beforeSelectionChange", this.handleSelectionChange); + + window.CodeMirror.keyMap.pcSublime["Ctrl-L"] = false; + window.CodeMirror.keyMap.sublime["Ctrl-L"] = false; + + this.updateValue(this.props.value || ""); + this.updateSelection(); + this.updateOverlay(); + } + + componentWillUnmount() { + this._codeMirror && this._codeMirror.toTextArea(); + } + + componentDidUpdate(prevProps) { + if (this.props.value !== this._cached) { + this.updateValue(this.props.value); + } + if ( + !isEqualSelection(this.props.selection, prevProps.selection) && + !isEqualSelection( + this.props.selection, + this._codeMirror.listSelections()[0], + ) + ) { + this.updateSelection(); + } + if ( + this.props.overlayStart !== prevProps.overlayStart || + this.props.overlayEnd !== prevProps.overlayEnd + ) { + this.updateOverlay(); + } + if (this.props.mode !== prevProps.mode) { + this._codeMirror.setOption("mode", this.props.mode); + } + if (this.props.ruler !== prevProps.ruler) { + this._codeMirror.setOption("rulers", [makeRuler(this.props)]); + } + if (this.props.foldGutter !== prevProps.foldGutter) { + this._codeMirror.setOption("gutters", makeGutters(this.props)); + } + } + + updateValue(value) { + this._cached = value; + this._codeMirror.setValue(value); + + if (this.props.autoFold instanceof RegExp) { + const lines = value.split("\n"); + // going backwards to prevent unfolding folds created earlier + for (let i = lines.length - 1; i >= 0; i--) { + if (this.props.autoFold.test(lines[i])) { + this._codeMirror.foldCode(i); + } + } + } + } + + updateSelection() { + this._codeMirror.setSelection( + this.props.selection?.anchor ?? { line: 0, ch: 0 }, + this.props.selection?.head, + ); + } + + updateOverlay() { + if (this._overlay) { + this._codeMirror.removeOverlay(this._overlay); + } + if (this.props.overlayStart !== undefined) { + const [start, end] = getIndexPosition(this.props.value, [ + this.props.overlayStart, + this.props.overlayEnd, + ]); + this._overlay = createOverlay(start, end); + this._codeMirror.addOverlay(this._overlay); + } + } + + handleFocus(/* codeMirror, event */) { + if (this._codeMirror.getValue() === this.props.codeSample) { + this._codeMirror.execCommand("selectAll"); + } + } + + handleChange(doc, change) { + if (change.origin !== "setValue") { + this._cached = doc.getValue(); + this.props.onChange(this._cached); + this.updateOverlay(); + } + } + + handleSelectionChange(doc, change) { + this.props.onSelectionChange?.(change.ranges[0]); + } + + render() { + return ( + <div className="editor input"> + <textarea ref={this._textareaRef} /> + </div> + ); + } +} + +function getIndexPosition(text, indexes) { + indexes = [...indexes]; + let line = 0; + let count = 0; + let lineStart = 0; + const result = []; + + while (indexes.length > 0) { + const index = indexes.shift(); + + while (count < index && count < text.length) { + if (text[count] === "\n") { + line++; + lineStart = count + 1; + } + count++; + } + + result.push({ line, pos: count - lineStart }); + } + + return result; +} + +function createOverlay(start, end) { + return { + token(stream) { + const { line } = stream.lineOracle; + + if (line < start.line || line > end.line) { + stream.skipToEnd(); + } else if (line === start.line && stream.pos < start.pos) { + stream.pos = start.pos; + } else if (line === end.line) { + if (stream.pos < end.pos) { + stream.pos = end.pos; + return "searching"; + } + stream.skipToEnd(); + } else { + stream.skipToEnd(); + return "searching"; + } + }, + }; +} + +function makeRuler(props) { + return { column: props.ruler, color: props.rulerColor }; +} + +function makeGutters(props) { + return props.foldGutter + ? ["CodeMirror-linenumbers", "CodeMirror-foldgutter"] + : []; +} + +function isEqualSelection(selection1, selection2) { + const anchor1 = selection1?.anchor ?? { line: 0, ch: 0 }; + const head1 = selection1?.head ?? anchor1; + const anchor2 = selection2?.anchor ?? { line: 0, ch: 0 }; + const head2 = selection2?.head ?? anchor2; + return ( + head1.line === head2.line && + head1.ch === head2.ch && + anchor1.line === anchor2.line && + anchor1.ch === anchor2.ch + ); +} + +export function InputPanel(props) { + return ( + <CodeMirrorPanel + lineNumbers={true} + keyMap="sublime" + autoCloseBrackets={true} + matchBrackets={true} + showCursorWhenSelecting={true} + tabSize={4} + rulerColor="#eeeeee" + {...props} + /> + ); +} + +export function OutputPanel(props) { + return ( + <CodeMirrorPanel + readOnly={true} + lineNumbers={true} + rulerColor="#444444" + {...props} + /> + ); +} + +export function DebugPanel({ value, autoFold }) { + return ( + <CodeMirrorPanel + readOnly={true} + lineNumbers={false} + foldGutter={true} + autoFold={autoFold} + mode="jsx" + value={value} + /> + ); +} diff --git a/website/static/separate-css/playground.css b/website/playground/playground.css similarity index 94% rename from website/static/separate-css/playground.css rename to website/playground/playground.css index 030b1baceb31..3d0200663abd 100644 --- a/website/static/separate-css/playground.css +++ b/website/playground/playground.css @@ -6,9 +6,10 @@ html { background-color: #fafafa; color: #6a6a6a; - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", - Arial, sans-serif; + font-family: + -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, + Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, + sans-serif; font-size: 12px; line-height: 1.25; } @@ -244,7 +245,11 @@ header h1 { } label { - font-family: Consolas, Courier New, Courier, monospace; + font-family: + Consolas, + Courier New, + Courier, + monospace; margin: 10px 0; display: block; } diff --git a/website/playground/sidebar/SidebarOptions.js b/website/playground/sidebar/SidebarOptions.js deleted file mode 100644 index 51d3704f1eac..000000000000 --- a/website/playground/sidebar/SidebarOptions.js +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from "react"; -import { groupBy } from "../util.js"; - -import { SidebarCategory } from "./components.js"; -import Option from "./options.js"; - -export default function SidebarOptions({ - categories, - availableOptions, - optionValues, - onOptionValueChange, -}) { - const options = groupBy(availableOptions, (option) => option.category); - return categories.map((category) => - options[category] ? ( - <SidebarCategory key={category} title={category}> - {options[category].map((option) => ( - <Option - key={option.name} - option={option} - value={optionValues[option.name]} - onChange={onOptionValueChange} - /> - ))} - </SidebarCategory> - ) : null - ); -} diff --git a/website/playground/sidebar/SidebarOptions.jsx b/website/playground/sidebar/SidebarOptions.jsx new file mode 100644 index 000000000000..f3f8bdbc70d1 --- /dev/null +++ b/website/playground/sidebar/SidebarOptions.jsx @@ -0,0 +1,42 @@ +import { SidebarCategory } from "./components.jsx"; +import Option from "./options.jsx"; + +// Copied from `/src/cli/utils.js` +function groupBy(array, iteratee) { + const result = Object.create(null); + + for (const value of array) { + const key = iteratee(value); + + if (Array.isArray(result[key])) { + result[key].push(value); + } else { + result[key] = [value]; + } + } + + return result; +} + +export default function SidebarOptions({ + categories, + availableOptions, + optionValues, + onOptionValueChange, +}) { + const options = groupBy(availableOptions, (option) => option.category); + return categories.map((category) => + options[category] ? ( + <SidebarCategory key={category} title={category}> + {options[category].map((option) => ( + <Option + key={option.name} + option={option} + value={optionValues[option.name]} + onChange={onOptionValueChange} + /> + ))} + </SidebarCategory> + ) : null, + ); +} diff --git a/website/playground/sidebar/components.js b/website/playground/sidebar/components.js deleted file mode 100644 index 5725ba98be8f..000000000000 --- a/website/playground/sidebar/components.js +++ /dev/null @@ -1,18 +0,0 @@ -import * as React from "react"; - -export function Sidebar({ visible, children }) { - return ( - <div className={`options-container ${visible ? "open" : ""}`}> - <div className="options">{children}</div> - </div> - ); -} - -export function SidebarCategory({ title, children }) { - return ( - <details className="sub-options" open="true"> - <summary>{title}</summary> - {children} - </details> - ); -} diff --git a/website/playground/sidebar/components.jsx b/website/playground/sidebar/components.jsx new file mode 100644 index 000000000000..5f9570cd19ed --- /dev/null +++ b/website/playground/sidebar/components.jsx @@ -0,0 +1,16 @@ +export function Sidebar({ visible, children }) { + return ( + <div className={`options-container ${visible ? "open" : ""}`}> + <div className="options">{children}</div> + </div> + ); +} + +export function SidebarCategory({ title, children }) { + return ( + <details className="sub-options" open> + <summary>{title}</summary> + {children} + </details> + ); +} diff --git a/website/playground/sidebar/inputs.js b/website/playground/sidebar/inputs.js deleted file mode 100644 index b4c15099c030..000000000000 --- a/website/playground/sidebar/inputs.js +++ /dev/null @@ -1,53 +0,0 @@ -import * as React from "react"; - -export function Checkbox({ label: _label, title, checked, onChange }) { - return ( - <label title={title}> - <input - type="checkbox" - checked={checked} - onChange={(ev) => onChange(ev.target.checked)} - />{" "} - {_label} - </label> - ); -} - -export function Select({ label: _label, title, values, selected, onChange }) { - return ( - <label title={title}> - {_label}{" "} - <select value={selected} onChange={(ev) => onChange(ev.target.value)}> - {values.map((val) => ( - <option key={val} value={val}> - {val} - </option> - ))} - </select> - </label> - ); -} - -export function NumberInput({ - label: _label, - title, - value, - min, - max, - step, - onChange, -}) { - return ( - <label title={title}> - {_label}{" "} - <input - type="number" - min={min} - max={max} - step={step} - value={value} - onChange={(ev) => onChange(Number.parseInt(ev.target.value, 10))} - /> - </label> - ); -} diff --git a/website/playground/sidebar/inputs.jsx b/website/playground/sidebar/inputs.jsx new file mode 100644 index 000000000000..814ec766474a --- /dev/null +++ b/website/playground/sidebar/inputs.jsx @@ -0,0 +1,51 @@ +export function Checkbox({ label: _label, title, checked, onChange }) { + return ( + <label title={title}> + <input + type="checkbox" + checked={checked} + onChange={(ev) => onChange(ev.target.checked)} + />{" "} + {_label} + </label> + ); +} + +export function Select({ label: _label, title, values, selected, onChange }) { + return ( + <label title={title}> + {_label}{" "} + <select value={selected} onChange={(ev) => onChange(ev.target.value)}> + {values.map((val) => ( + <option key={val} value={val}> + {val} + </option> + ))} + </select> + </label> + ); +} + +export function NumberInput({ + label: _label, + title, + value, + min, + max, + step, + onChange, +}) { + return ( + <label title={title}> + {_label}{" "} + <input + type="number" + min={min} + max={max} + step={step} + value={value} + onChange={(ev) => onChange(Number.parseInt(ev.target.value, 10))} + /> + </label> + ); +} diff --git a/website/playground/sidebar/options.js b/website/playground/sidebar/options.js deleted file mode 100644 index 7dd4450549fc..000000000000 --- a/website/playground/sidebar/options.js +++ /dev/null @@ -1,63 +0,0 @@ -import * as React from "react"; - -import { Checkbox, Select, NumberInput } from "./inputs.js"; - -export function BooleanOption({ option, value, onChange }) { - function maybeInvert(value) { - return option.inverted ? !value : value; - } - return ( - <Checkbox - label={option.cliName} - title={getDescription(option)} - checked={maybeInvert(value)} - onChange={(checked) => onChange(option, maybeInvert(checked))} - /> - ); -} - -export function ChoiceOption({ option, value, onChange }) { - return ( - <Select - label={option.cliName} - title={getDescription(option)} - values={option.choices.map((choice) => choice.value)} - selected={value} - onChange={(val) => onChange(option, val)} - /> - ); -} - -export function NumberOption({ option, value, onChange }) { - return ( - <NumberInput - label={option.cliName} - title={getDescription(option)} - min={option.range.start} - max={option.range.end} - step={option.range.step} - value={value} - onChange={(val) => onChange(option, val)} - /> - ); -} - -export default function Option(props) { - switch (props.option.type) { - case "boolean": - return <BooleanOption {...props} />; - case "int": - return <NumberOption {...props} />; - case "choice": - return <ChoiceOption {...props} />; - default: - throw new Error("unsupported type"); - } -} - -function getDescription(option) { - const description = option.inverted - ? option.oppositeDescription - : option.description; - return description && description.replace(/\n/g, " "); -} diff --git a/website/playground/sidebar/options.jsx b/website/playground/sidebar/options.jsx new file mode 100644 index 000000000000..34f411d0eeef --- /dev/null +++ b/website/playground/sidebar/options.jsx @@ -0,0 +1,61 @@ +import { Checkbox, NumberInput, Select } from "./inputs.jsx"; + +function BooleanOption({ option, value, onChange }) { + function maybeInvert(value) { + return option.inverted ? !value : value; + } + return ( + <Checkbox + label={option.cliName} + title={getDescription(option)} + checked={maybeInvert(value)} + onChange={(checked) => onChange(option, maybeInvert(checked))} + /> + ); +} + +function ChoiceOption({ option, value, onChange }) { + return ( + <Select + label={option.cliName} + title={getDescription(option)} + values={option.choices.map((choice) => choice.value)} + selected={value} + onChange={(val) => onChange(option, val)} + /> + ); +} + +function NumberOption({ option, value, onChange }) { + return ( + <NumberInput + label={option.cliName} + title={getDescription(option)} + min={option.range.start} + max={option.range.end} + step={option.range.step} + value={value} + onChange={(val) => onChange(option, val)} + /> + ); +} + +export default function Option(props) { + switch (props.option.type) { + case "boolean": + return <BooleanOption {...props} />; + case "int": + return <NumberOption {...props} />; + case "choice": + return <ChoiceOption {...props} />; + default: + throw new Error("unsupported type"); + } +} + +function getDescription(option) { + const description = option.inverted + ? option.oppositeDescription + : option.description; + return description && description.replaceAll("\n", " "); +} diff --git a/website/playground/urlHash.js b/website/playground/urlHash.js index 892f9a9ccbe0..158c3332e77b 100644 --- a/website/playground/urlHash.js +++ b/website/playground/urlHash.js @@ -1,4 +1,4 @@ -import LZString from "lz-string"; +const { LZString } = window; export function read() { const hash = document.location.hash.slice(1); diff --git a/website/playground/util.js b/website/playground/util.js index 592336c28770..2a954ff32c1c 100644 --- a/website/playground/util.js +++ b/website/playground/util.js @@ -1,5 +1,5 @@ export function fixPrettierVersion(version) { - const match = version.match(/^\d+\.\d+\.\d+-pr.(\d+)$/); + const match = version.match(/^\d+\.\d+\.\d+-pr.(\d+)$/u); if (match) { return `pr-${match[1]}`; } @@ -22,7 +22,7 @@ export function buildCliArgs(availableOptions, options) { for (const option of availableOptions) { const value = options[option.name]; - if (typeof value === "undefined") { + if (value === undefined) { continue; } @@ -53,18 +53,19 @@ export function getCodemirrorMode(parser) { } const astAutoFold = { - estree: - /^\s*"(loc|start|end|tokens|leadingComments|trailingComments|innerComments)":/, - postcss: /^\s*"(source|input|raws|file)":/, - html: /^\s*"(sourceSpan|valueSpan|nameSpan|startSourceSpan|endSourceSpan|tagDefinition)":/, - mdast: /^\s*"position":/, - yaml: /^\s*"position":/, - glimmer: /^\s*"loc":/, + estree: /^\s*"(loc|start|end|tokens|\w+Comments|comments)":/u, + postcss: /^\s*"(source|input|raws|file)":/u, + html: /^\s*"(\w+Span|valueTokens|tokens|file|tagDefinition)":/u, + mdast: /^\s*"position":/u, + yaml: /^\s*"position":/u, + glimmer: /^\s*"loc":/u, + graphql: /^\s*"loc":/u, }; export function getAstAutoFold(parser) { switch (parser) { case "flow": + case "hermes": case "babel": case "babel-flow": case "babel-ts": @@ -84,14 +85,15 @@ export function getAstAutoFold(parser) { case "angular": case "vue": case "lwc": + case "mjml": return astAutoFold.html; case "markdown": case "mdx": return astAutoFold.mdast; case "yaml": return astAutoFold.yaml; - case "glimmer": - return astAutoFold.glimmer; + default: + return astAutoFold[parser]; } } @@ -100,12 +102,12 @@ export function convertSelectionToRange({ head, anchor }, content) { return [head, anchor] .map( ({ ch, line }) => - lines.slice(0, line).join("\n").length + ch + (line ? 1 : 0) + lines.slice(0, line).join("\n").length + ch + (line ? 1 : 0), ) .sort((a, b) => a - b); } -export function convertOffsetToPosition(offset, content) { +export function convertOffsetToSelection(offset, content) { let line = 0; let ch = 0; for (let i = 0; i < offset && i <= content.length; i++) { @@ -116,29 +118,5 @@ export function convertOffsetToPosition(offset, content) { ch++; } } - return { line, ch }; -} - -/** - * Copied from https://github.com/prettier/prettier/blob/6fe21780115cf5f74f83876d64b03a727fbab220/src/cli/utils.js#L6-L27 - * @template Obj - * @template Key - * @param {Array<Obj>} array - * @param {(value: Obj) => Key} iteratee - * @returns {{[p in Key]: T}} - */ -export function groupBy(array, iteratee) { - const result = Object.create(null); - - for (const value of array) { - const key = iteratee(value); - - if (Array.isArray(result[key])) { - result[key].push(value); - } else { - result[key] = [value]; - } - } - - return result; + return { anchor: { line, ch } }; } diff --git a/website/plugins/llms-txt-plugin.mjs b/website/plugins/llms-txt-plugin.mjs new file mode 100644 index 000000000000..dd60b5c9cd63 --- /dev/null +++ b/website/plugins/llms-txt-plugin.mjs @@ -0,0 +1,100 @@ +// https://github.com/facebook/docusaurus/issues/10899 +// https://github.com/defi-wonderland/handbook/blob/dev/plugins/llmsTxtPlugin.ts +import fs from "node:fs/promises"; +import path from "node:path"; + +export default function llmsTxtPlugin(context) { + return { + name: "llms-txt-plugin", + async loadContent() { + const { siteDir } = context; + const contentDir = path.join(siteDir, "versioned_docs/version-stable"); + const allMdx = []; + const docsRecords = []; + + const getMdxFiles = async (dir, relativePath = "", depth = 0) => { + const entries = await fs.readdir(dir, { + withFileTypes: true, + }); + + entries.sort((a, b) => { + if (a.isDirectory() && !b.isDirectory()) { + return -1; + } + if (!a.isDirectory() && b.isDirectory()) { + return 1; + } + return a.name.localeCompare(b.name); + }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + const currentRelativePath = path.join(relativePath, entry.name); + + if (entry.isDirectory()) { + const dirName = entry.name + .split("-") + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" "); + const headingLevel = "#".repeat(depth + 2); + allMdx.push(`\n${headingLevel} ${dirName}\n`); + await getMdxFiles(fullPath, currentRelativePath, depth + 1); + } else if (entry.name.endsWith(".md")) { + const content = await fs.readFile(fullPath, "utf8"); + let title = entry.name.replace(".md", ""); + let description = ""; + + const frontmatterMatch = content.match(/^---\n(.*?)\n---/su); + if (frontmatterMatch) { + const titleMatch = frontmatterMatch[1].match(/title:\s*(.+)/u); + const descriptionMatch = + frontmatterMatch[1].match(/description:\s*(.+)/u); + + if (titleMatch) { + title = titleMatch[1].trim(); + } + if (descriptionMatch) { + description = descriptionMatch[1].trim(); + } + } + + const headingLevel = "#".repeat(depth + 3); + allMdx.push(`\n${headingLevel} ${title}\n\n${content}`); + + // Add to docs records for llms.txt + docsRecords.push({ + title, + path: currentRelativePath.replaceAll("\\", "/"), + description, + }); + } + } + }; + + await getMdxFiles(contentDir); + return { allMdx, docsRecords }; + }, + async postBuild({ content, outDir }) { + const { allMdx, docsRecords } = content; + + // Write concatenated MDX content + const concatenatedPath = path.join(outDir, "llms-full.txt"); + await fs.writeFile(concatenatedPath, allMdx.join("\n\n---\n\n")); + + // Create llms.txt with the requested format + const llmsTxt = `# ${ + context.siteConfig.title + }\n\n## Documentation\n\n${docsRecords + .map( + (doc) => + `- [${doc.title}](${context.siteConfig.url}/docs/${doc.path.replace( + ".md", + "", + )}): ${doc.description}`, + ) + .join("\n")}`; + const llmsTxtPath = path.join(outDir, "llms.txt"); + await fs.writeFile(llmsTxtPath, llmsTxt); + }, + }; +} diff --git a/website/scripts/update-stable-docs.mjs b/website/scripts/update-stable-docs.mjs new file mode 100644 index 000000000000..b6df665d75a4 --- /dev/null +++ b/website/scripts/update-stable-docs.mjs @@ -0,0 +1,55 @@ +import fs from "node:fs/promises"; + +const version = await getPrettierVersion(); + +// Copy sidebar config +const STABLE_SIDEBAR = relativeURL( + "../versioned_sidebars/version-stable-sidebars.json", +); +const CURRENT_SIDEBAR = relativeURL("../sidebars.json"); + +await fs.copyFile(CURRENT_SIDEBAR, STABLE_SIDEBAR); + +// Copy docs +const STABLE_DOCS_DIRECTORY = relativeURL("../versioned_docs/version-stable/"); +const CURRENT_DOCS_DIRECTORY = relativeURL("../../docs/"); + +await fs.rm(STABLE_DOCS_DIRECTORY, { recursive: true, force: true }); +await fs.mkdir(STABLE_DOCS_DIRECTORY, { recursive: true, force: true }); +await fs.cp(CURRENT_DOCS_DIRECTORY, STABLE_DOCS_DIRECTORY, { recursive: true }); + +// Replace version placeholders +await Promise.all( + ["browser.md"].map(async (file) => { + file = new URL(file, STABLE_DOCS_DIRECTORY); + await replaceVersionPlaceholder(file, version); + }), +); + +async function getPrettierVersion() { + const version = process.env.PRETTIER_VERSION; + + if (!version) { + const packageJsonFile = new URL("../../package.json", import.meta.url); + const packageJson = JSON.parse(await fs.readFile(packageJsonFile)); + return packageJson.version; + } + return version; +} + +/** + * @param {import("fs").PathLike} path + */ +function relativeURL(path) { + return new URL(path, import.meta.url); +} + +/** + * @param {import("fs").PathLike} path + * @param {string} version + */ +async function replaceVersionPlaceholder(path, version) { + let content = await fs.readFile(path, "utf8"); + content = content.replaceAll("%PRETTIER_VERSION%", version); + await fs.writeFile(path, content); +} diff --git a/website/sidebars.json b/website/sidebars.json index 0ee5055266f5..5604ffebc389 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -15,9 +15,14 @@ "plugins", "cli", "api", - "browser" + "browser", + "ci" + ], + "Configuring Prettier": [ + "options", + "configuration", + "sharing-configurations" ], - "Configuring Prettier": ["options", "configuration"], "Editors": ["editors", "webstorm", "vim", "watching-files"], "Misc": ["technical-details", "related-projects", "for-enterprise"] } diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index a8046d438bde..000000000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; - -// Docs: https://docusaurus.io/docs/en/site-config.html - -const path = require("path"); -const fs = require("fs"); -const { load: parseYaml } = require("js-yaml"); - -const PACKAGE = require("../package.json"); -const GITHUB_URL = `https://github.com/${PACKAGE.repository}`; - -function loadYaml(fsPath) { - return parseYaml(fs.readFileSync(path.join(__dirname, fsPath), "utf8")); -} - -const users = loadYaml("./data/users.yml"); -const editors = loadYaml("./data/editors.yml"); -const supportedLanguages = loadYaml("./data/languages.yml"); - -const siteConfig = { - title: "Prettier", - tagline: "Opinionated Code Formatter", - githubUrl: GITHUB_URL, - url: PACKAGE.homepage, - baseUrl: "/", - projectName: PACKAGE.name, - repo: PACKAGE.repository, - cname: "prettier.io", - users, - editors, - supportedLanguages, - tideliftUrl: - "https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=website", - /* base url for editing docs, usage example: editUrl + 'en/doc1.md' */ - editUrl: `${GITHUB_URL}/edit/main/docs/`, - headerLinks: [ - { href: "/playground/", label: "Playground" }, - { doc: "index", label: "Docs" }, - { blog: true, label: "Blog" }, - { search: true }, - { href: "https://opencollective.com/prettier", label: "Donate" }, - { href: GITHUB_URL, label: "GitHub" }, - ], - /* path to images for header/footer */ - headerIcon: "icon.png", - footerIcon: "icon.png", - favicon: "icon.png", - /* colors for website */ - colors: { - primaryColor: "#1A2B34", - secondaryColor: "#808080", - }, - highlight: { - theme: "default", - version: require("highlight.js/package.json").version, - }, - usePrism: ["javascript", "jsx", "typescript", "ts", "js", "html", "css"], - useEnglishUrl: true, - scripts: [ - "https://buttons.github.io/buttons.js", - "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js", - "/js/code-block-buttons.js", - ], - stylesheets: [ - "//unpkg.com/@sandhose/prettier-animated-logo@1.0.3/dist/wide.css", - ], - algolia: { - apiKey: process.env.ALGOLIA_PRETTIER_API_KEY, - indexName: "prettier", - }, - markdownPlugins: [ - // ignore `<!-- prettier-ignore -->` before passing into Docusaurus to avoid mis-parsing (#3322) - (md) => { - md.block.ruler.before( - "htmlblock", - "prettierignore", - (state, startLine) => { - const pos = state.bMarks[startLine]; - const max = state.eMarks[startLine]; - if (/<!-- prettier-ignore -->/.test(state.src.slice(pos, max))) { - state.line += 1; - return true; - } - return false; - } - ); - }, - ], - separateCss: ["static/separate-css"], - gaTrackingId: "UA-111350464-1", - twitter: true, - twitterUsername: "PrettierCode", - twitterImage: "icon.png", - ogImage: "icon.png", - onPageNav: "separate", -}; - -module.exports = siteConfig; diff --git a/website/src/css/custom.css b/website/src/css/custom.css new file mode 100644 index 000000000000..2b84d0b7d2b5 --- /dev/null +++ b/website/src/css/custom.css @@ -0,0 +1,99 @@ +/** + * Any CSS included here will be global. The classic template + * bundles Infima by default. Infima is a CSS framework designed to + * work well for content-centric websites. + */ + +/* You can override the default Infima variables here. */ +:root { + --ifm-color-primary: #19828a; + --ifm-color-primary-dark: #16757c; + --ifm-color-primary-darker: #156e75; + --ifm-color-primary-darkest: #115b61; + --ifm-color-primary-light: #1b8f98; + --ifm-color-primary-lighter: #1d959f; + --ifm-color-primary-lightest: #21a9b3; + --ifm-code-font-size: 90%; + --ifm-button-border-radius: calc(0.8rem * var(--ifm-button-size-multiplier)); + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + + --navbar-color: #1a2b34; + + --color-yellow: #f8bc45; + --color-yellow-dark: #f7b126; + --color-yellow-darker: #f6ab17; + --color-yellow-darkest: #d69108; + --color-yellow-light: #f9c764; + --color-yellow-lighter: #facd73; + --color-yellow-lightest: #fbdda1; + + --color-pink: #c596c7; + --color-pink-dark: #b87fbb; + --color-pink-darker: #b274b5; + --color-pink-darkest: #9c559f; + --color-pink-light: #d2add3; + --color-pink-lighter: #d8b8d9; + --color-pink-lightest: #ebdaeb; +} + +[data-theme="dark"] { + --ifm-color-primary: #56b3b4; + --ifm-color-primary-dark: #4aa5a6; + --ifm-color-primary-darker: #459c9d; + --ifm-color-primary-darkest: #398081; + --ifm-color-primary-light: #68bbbc; + --ifm-color-primary-lighter: #72bfc0; + --ifm-color-primary-lightest: #8dcccd; + + --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); +} + +.button--primary:active, +.button--primary.button--active { + --ifm-button-background-color: var(--ifm-color-primary-dark); + --ifm-button-border-color: var(--ifm-color-primary-dark); +} + +.button--secondary:active, +.button--secondary.button--active { + --ifm-button-background-color: var(--ifm-color-secondary-dark); + --ifm-button-border-color: var(--ifm-color-secondary-dark); +} + +.navbar { + --ifm-navbar-background-color: var(--navbar-color); + --ifm-navbar-link-hover-color: #68bbbc; +} + +.hero { + --ifm-hero-background-color: var(--navbar-color); +} + +.footer { + --ifm-footer-background-color: #20232a; + --ifm-heading-margin-bottom: 1rem; +} + +.header-github-link::before { + content: ""; + width: 24px; + height: 24px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + +.header-github-link:hover::before { + background-color: var(--ifm-navbar-link-hover-color); +} + +.menu__link { + line-height: 1.15; +} + +.footer__github-stars { + display: block; + margin-top: 8px; +} diff --git a/website/src/pages/help/index.jsx b/website/src/pages/help/index.jsx new file mode 100644 index 000000000000..1ad6ae7f3699 --- /dev/null +++ b/website/src/pages/help/index.jsx @@ -0,0 +1,55 @@ +import Link from "@docusaurus/Link"; +import Layout from "@theme/Layout"; + +import Heading from "@theme/Heading"; + +/** + * + * @param {object} props + * @param {string} props.title + * @param {ReactNode} props.children + */ +function Card({ title, children }) { + return ( + <div class="card margin-vert--sm"> + <div class="card__header"> + <h2>{title}</h2> + </div> + <div class="card__body"> + <p>{children}</p> + </div> + </div> + ); +} + +export default function Help() { + return ( + <Layout title="Prettier · Opinionated Code Formatter"> + <main className="margin-vert--xl container"> + <div className="margin-bottom--lg"> + <Heading as="h1">Need help?</Heading> + <div>This project is maintained by a dedicated group of people;</div> + </div> + + <div className="row"> + <div className="col"> + <Card title="Browse Docs"> + Learn more using the{" "} + <Link to="/docs">documentation on this site</Link>. + </Card> + </div> + <div className="col"> + <Card title="Join the community"> + Ask questions about the documentation and project. + </Card> + </div> + <div className="col"> + <Card title="Stay up to date"> + Find out what's new with this project. + </Card> + </div> + </div> + </main> + </Layout> + ); +} diff --git a/website/src/pages/index.jsx b/website/src/pages/index.jsx new file mode 100644 index 000000000000..a012c257c971 --- /dev/null +++ b/website/src/pages/index.jsx @@ -0,0 +1,376 @@ +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import AnimatedLogo from "@sandhose/prettier-animated-logo"; +import Heading from "@theme/Heading"; +import styles from "./index.module.css"; +import { useState } from "react"; +import Markdown from "react-markdown"; + +const playgroundLink = + process.env.NODE_ENV === "production" + ? "pathname:///playground/" + : "http://localhost:5173/"; + +function DraggableLogo() { + const [rolling, setRolling] = useState(false); + + /** + * + * @param {DragEvent} event + */ + const onDragStart = (event) => { + event.preventDefault(); + setRolling(true); + }; + + return ( + <div + className={styles.logoWrapper} + draggable="true" + onDragStart={onDragStart} + onTouchStart={onDragStart} + > + <AnimatedLogo + version="wide" + rolling={rolling} + onAnimationEnd={() => setRolling(false)} + /> + </div> + ); +} + +function Tidelift() { + const { siteConfig } = useDocusaurusContext(); + const tideliftUrl = siteConfig.customFields.tideliftUrl; + + return ( + <Link className={styles.tidelift} to={tideliftUrl}> + PRETTIER FOR ENTERPRISE + </Link> + ); +} + +function HomepageHeader() { + return ( + <header className={clsx("hero hero--dark", styles.heroBanner)}> + <Tidelift /> + + <div className="container"> + <div className={styles.logoWrapperContainer}> + <DraggableLogo /> + </div> + <div className={styles.heroButtonContainer}> + <Link + className={clsx( + "button button--primary button--lg", + styles.heroButton, + )} + to={playgroundLink} + target="_self" + > + Try It Online + </Link> + <Link + className={clsx( + "button button--secondary button--lg", + styles.heroButton, + )} + to="/docs/install" + > + Install Prettier + </Link> + </div> + </div> + </header> + ); +} + +function SyntaxSection() { + return ( + <section className={styles.syntaxSection}> + <Link + to="https://sentry.shop/products/syntax-prettier-tee" + className={clsx(styles.syntaxLink, "container")} + > + <div className="margin-bottom--md"> + Limited edition tshirts are now available to buy! $10 per tshirt goes + to maintain the project. + </div> + <img width={860} alt="" src="/images/syntaxfm/1.webp" /> + </Link> + </section> + ); +} + +function TldrSection() { + return ( + <div className={clsx(styles.tldrSection, styles.sectionPadding)}> + <div className={clsx("container", styles.tldrSectionInner)}> + <div className={styles.tldrSectionColumn}> + <Heading as="h2">What is Prettier?</Heading> + <ul> + <li>An opinionated code formatter</li> + <li>Supports many languages</li> + <li>Integrates with most editors</li> + <li> + <a href={"/docs/option-philosophy"}>Has few options &raquo;</a> + </li> + </ul> + </div> + <div className={styles.tldrSectionColumn}> + <Heading as="h2">Why?</Heading> + <ul> + <li>Your code is formatted on save</li> + <li>No need to discuss style in code review</li> + <li>Saves you time and energy</li> + <li> + <Link to={"/docs/why-prettier"}>And more &raquo;</Link> + </li> + </ul> + </div> + </div> + </div> + ); +} + +function LanguagesSection() { + const { siteConfig } = useDocusaurusContext(); + const languages = siteConfig.customFields.supportedLanguages; + + const languageChunks = languages.reduce((acc, language) => { + const last = acc.at(-1); + if ( + last && + last.length < 2 && + last.reduce((sum, lang) => sum + lang.variants.length, 0) + + language.variants.length < + 9 + ) { + last.push(language); + } else { + acc.push([language]); + } + return acc; + }, []); + + return ( + <section className={clsx(styles.sectionPadding, styles.languageSection)}> + <div className="container"> + <Heading as="h2">Works with the Tools You Use</Heading> + <div className={styles.languageSectionGrid}> + {languageChunks.map((languageChunk, index) => ( + <div key={index}> + {languageChunk.map((language) => ( + <LanguageItem key={language.name} {...language} /> + ))} + </div> + ))} + </div> + </div> + </section> + ); +} + +/** + * + * @param {object} props + * @param {string} props.name + * @param {string?} props.nameLink + * @param {string} props.image + * @param {string[]} props.variants + */ +function LanguageItem({ name, nameLink, image, variants }) { + return ( + <div className={styles.languageItem}> + <img src={image} className={styles.languageItemImage} alt="" /> + <ul className={styles.languageItemList}> + <li>{nameLink ? <a href={nameLink}>{name}</a> : name}</li> + + {variants.map((variant) => ( + <li key={variant}> + <Markdown>{variant}</Markdown> + </li> + ))} + </ul> + </div> + ); +} + +function EditorSupportSection() { + const { siteConfig } = useDocusaurusContext(); + const editors = siteConfig.customFields.editors; + const githubUrl = siteConfig.customFields.githubUrl; + + return ( + <div className={clsx(styles.sectionPadding, styles.editorSection)}> + <div className="container"> + <Heading as="h2">Editor Support</Heading> + <div className={styles.editorSectionGrid}> + {editors.map((editor) => ( + <Editor key={editor.name} {...editor} /> + ))} + </div> + + <div className={styles.editorSectionButtonContainer}> + <div> + <span className="margin-right--sm">Got more?</span> + <Link + to={`${githubUrl}/edit/main/website/data/editors.yml`} + className={clsx("button button--outline button--primary")} + > + Send a PR + </Link> + </div> + </div> + </div> + </div> + ); +} + +/** + * + * @param {object} props + * @param {string} props.content + * @param {string} props.image + * @param {string} props.name + */ +function Editor({ content = "", image, name }) { + return ( + <div className={styles.editorItem}> + <img src={image} className={styles.editorItemImage} alt="" /> + <div> + <Heading as="h3">{name}</Heading> + <Markdown>{content.replaceAll("\n", " \n")}</Markdown> + </div> + </div> + ); +} + +function UsersSection() { + const { siteConfig } = useDocusaurusContext(); + const users = siteConfig.customFields.users; + const showcase = users + .filter((user) => user.pinned) + .map((user, i) => ( + <a key={i} href={user.infoLink} className={styles.userItem}> + <img + src={user.greyImage} + title={user.caption} + className={styles.userItemImage} + /> + </a> + )); + + return ( + <div className={clsx(styles.sectionPadding, styles.userSection)}> + <div className="container padding-bottom--md"> + <Heading as="h2">Used By People You Rely On</Heading> + <div className={styles.userSectionGrid}>{showcase}</div> + <div className={styles.userSectionButtonContainer}> + <div> + <Link to="/users" className={clsx("button button--primary")}> + See others + </Link> + </div> + </div> + </div> + + <div className="container"> + <Heading as="h2">Established in the Ecosystem</Heading> + + <div className={styles.ecosystemGrid}> + <div className={styles.ecosystemGridItem}> + <Link + to="https://2021.stateofjs.com/en-US/other-tools/utilities" + style={{ marginTop: "15px" }} + aria-label="Statistic for utility tools in the State of JavaScript survey" + > + <img src="/images/state_of_js_grey.svg" alt="" /> + </Link> + <div> + <p>Regularly used by:</p> + <ul> + <li> + <Link to="https://2021.stateofjs.com/en-US/other-tools/#utilities"> + More than 83% of respondents to State of JS 2021. + </Link> + </li> + <li> + <Link to="https://2020.stateofjs.com/en-US/other-tools/#utilities"> + More than 70% of respondents to State of JS 2020. + </Link> + </li> + </ul> + </div> + </div> + + <div className={styles.ecosystemGridItem}> + <Link + to="https://github.com/prettier/prettier" + aria-label="Prettier on GitHub" + > + <img src="/images/github_grey.svg" alt="" /> + </Link> + <div> + <p> + More than{" "} + <strong data-placeholder="dependent-github">9.8 million</strong>{" "} + dependent repositories on GitHub + </p> + <Link + className="button button--primary" + to="https://github.com/prettier/prettier/network/dependents" + > + Check Them Out + </Link> + </div> + </div> + + <div className={styles.ecosystemGridItem}> + <Link + to="https://npmjs.com/package/prettier" + aria-label="Prettier on NPM" + > + <img src="/images/npm_grey.svg" alt="" /> + </Link> + <div> + <p> + More than{" "} + <strong data-placeholder="dependent-npm">19.8k</strong>{" "} + dependent packages on npm + </p> + <Link + className="button button--primary" + to="https://www.npmjs.com/browse/depended/prettier" + aria-label="See every dependent npm packages" + > + See them all + </Link> + </div> + </div> + </div> + </div> + </div> + ); +} + +export default function Home() { + const { siteConfig } = useDocusaurusContext(); + return ( + <div className="home"> + <Layout + title="Prettier · Opinionated Code Formatter" + description={siteConfig.tagline} + > + <HomepageHeader /> + <SyntaxSection /> + <TldrSection /> + <LanguagesSection /> + <EditorSupportSection /> + <UsersSection /> + </Layout> + </div> + ); +} diff --git a/website/src/pages/index.module.css b/website/src/pages/index.module.css new file mode 100644 index 000000000000..9b652bfa1588 --- /dev/null +++ b/website/src/pages/index.module.css @@ -0,0 +1,329 @@ +:global(.home) { + --ifm-navbar-shadow: none; + + --color-tidelift: #f6914d; + --color-tidelift-darker: #e67c36; + + --ifm-h2-font-size: 2.125rem; + --ifm-heading-font-weight: 500; + --ifm-heading-margin-top: 1.25rem; + --ifm-heading-margin-bottom: 2.75rem; + + --ifm-list-margin: 0; + --ifm-list-left-padding: 0; +} + +.heroBanner { + --ifm-color-primary: var(--color-yellow); + --ifm-color-primary-dark: var(--color-yellow-dark); + --ifm-color-secondary: var(--color-pink); + --ifm-color-secondary-dark: var(--color-pink-dark); + + padding: 3rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding-top: 4rem; + padding-bottom: 2.5rem; + } +} + +.logoWrapperContainer { + display: flex; + justify-content: center; + margin-bottom: 2rem; +} + +.logoWrapper > svg { + cursor: ew-resize; + height: auto; + max-width: calc(100vw - 30px); +} + +.heroButtonContainer { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; +} + +@media screen and (max-width: 443px) { + .heroButtonContainer { + flex-direction: column; + } +} + +.heroButton { + --ifm-button-color: var(--ifm-color-gray-900); +} + +.tidelift { + --ifm-link-hover-decoration: none; + --ifm-link-hover-color: var(--ifm-color-gray-900); + + background: var(--color-tidelift) url(/images/tidelift-small.png) 10px + no-repeat; + background-size: 24px; + color: var(--ifm-color-gray-900); + position: absolute; + top: 16px; + right: 0; + font-size: 12px; + border-radius: 14px 0 0 14px; + padding: 6px 14px 6px 44px; + z-index: 10; + font-weight: 500; + transition-property: color, background, border-color; + transition-duration: var(--ifm-button-transition-duration); + transition-timing-function: var(--ifm-transition-timing-default); +} + +.tidelift:hover { + background-color: var(--color-tidelift-darker); +} + +.syntaxSection { + --ifm-color-primary: var(--color-yellow); + --ifm-color-primary-dark: var(--color-yellow-dark); + + background-color: var(--ifm-color-primary); + display: flex; + justify-content: center; +} + +.syntaxLink { + --ifm-link-hover-color: var(--ifm-color-gray-900); + --ifm-container-width: 860px; + --ifm-container-width-xl: 860px; + + color: var(--ifm-color-gray-900); + font-size: 1.25rem; + font-weight: bold; + + justify-content: center; + display: flex; + flex-direction: column; + padding-top: 1.25rem; + padding-bottom: 1.25rem; +} + +.sectionPadding { + padding-top: 3rem; + padding-bottom: 3rem; +} + +.tldrSection { + --ifm-color-primary: var(--color-yellow); + --ifm-color-primary-dark: var(--color-yellow-dark); + --ifm-link-color: var(--ifm-color-primary); + --ifm-link-hover-color: var(--ifm-color-primary); + + background-color: #182025; + color: var(--ifm-color-primary); +} + +.tldrSectionInner { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 1rem; + justify-content: space-evenly; +} + +.tldrSectionColumn { + display: flex; + flex-direction: column; +} + +.tldrSection h2:before { + content: "# "; +} + +.tldrSectionColumn ul li { + list-style: none; + list-style-position: inside; +} + +.tldrSectionColumn li::before { + content: "* "; + vertical-align: sub; +} + +.languageSection { + --ifm-color-primary: var(--color-pink); + --ifm-color-primary-dark: var(--color-pink-dark); + --ifm-link-color: var(--ifm-color-white); + --ifm-link-hover-color: var(--ifm-color-white); + color: var(--ifm-color-white); + background-color: var(--navbar-color); +} + +.languageSection h2 { + color: var(--ifm-color-primary); +} + +.languageSectionGrid { + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} + +.languageSectionGrid > * { + flex: 1 1 auto; +} + +.languageItem { + display: flex; + align-items: flex-start; + padding-bottom: 1em; +} + +.languageItemImage { + width: 50px; + margin: 0 1.25rem; +} + +.languageItemList { + list-style: none; + --ifm-paragraph-margin-bottom: 0; +} + +.languageItemList li:first-of-type { + --ifm-link-color: var(--ifm-color-primary); + --ifm-link-hover-color: var(--ifm-color-primary); + color: var(--ifm-color-primary); +} + +.languageItemList li + li { + margin-bottom: 0.25rem; +} + +.languageItem code, +.editorItem code { + background-color: transparent; + border: none; +} + +.editorSection { + --ifm-color-primary: #56b3b4; + --ifm-link-color: var(--ifm-color-white); + --ifm-link-hover-color: var(--ifm-color-white); + color: var(--ifm-color-white); + background-color: #182025; +} + +.editorSection h2 { + color: var(--ifm-color-primary); +} + +.editorSectionGrid { + display: grid; + gap: 3.75rem 1.25rem; + grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); +} + +.editorItem { + --ifm-heading-margin-top: 1.25rem; + --ifm-heading-margin-bottom: 0px; + --ifm-paragraph-margin-bottom: 0; + + display: flex; + gap: 0.75rem; +} + +.editorItemImage { + width: 100px; + height: 100px; +} + +.editorSectionButtonContainer { + display: flex; + justify-content: flex-end; + margin-top: 3.75rem; + + --ifm-font-color-base-inverse: var(--ifm-color-gray-1000); +} + +.userSection { + --ifm-color-primary: #6f7b81; + --ifm-color-primary-dark: #637075; + --ifm-button-color: #1a2b34; + background-color: var(--navbar-color); +} + +.userSection h2 { + color: var(--ifm-color-primary); +} + +.userSectionGrid { + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} + +.userItem { + display: flex; + align-items: center; + padding: 1em; + transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1); +} + +.userItem:hover { + transform: scale(1.2); +} + +.userItemImage { + width: 200px; + max-height: 100px; +} + +@media only screen and (max-width: 736px) { + .userItemImage { + max-height: 50px; + width: 100px; + } +} + +.userSectionButtonContainer { + display: flex; + justify-content: center; + margin-top: 1.25rem; +} + +.ecosystemGrid { + display: flex; + justify-content: space-around; + flex-wrap: wrap; + gap: 1.5rem 1rem; +} + +@media only screen and (max-width: 736px) { + .ecosystemGrid { + gap: 2rem 1rem; + } +} + +.ecosystemGridItem { + display: grid; + grid-template-columns: auto 260px; + gap: 0.8rem; + font-size: 14px; + line-height: 1.4; + color: #b0c4ce; + --ifm-link-color: #b0c4ce; + --ifm-link-hover-color: var(--ifm-color-white); + --ifm-list-left-padding: 2rem; + --ifm-paragraph-margin-bottom: 1rem; +} + +.ecosystemGridItem img { + width: 80px; +} + +.ecosystemGridItem li + li { + margin-top: 0.5rem; +} diff --git a/website/src/pages/users/index.jsx b/website/src/pages/users/index.jsx new file mode 100644 index 000000000000..2ca2133dc6c1 --- /dev/null +++ b/website/src/pages/users/index.jsx @@ -0,0 +1,63 @@ +import Layout from "@theme/Layout"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Heading from "@theme/Heading"; +import Admonition from "@theme/Admonition"; +import styles from "./index.module.css"; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; + +export default function Users() { + const { siteConfig } = useDocusaurusContext(); + const users = siteConfig.customFields.users; + + const showcase = users.map((user, i) => ( + <div key={i} className={styles.logoItem}> + <Link to={user.infoLink}> + <img src={user.image} title={user.caption} /> + </Link> + </div> + )); + + return ( + <Layout title="Who's using Prettier?"> + <main className={clsx("margin-vert--xl", styles.main)}> + <div className="container"> + <Heading as="h1" className="text--center"> + Who’s Using This? + </Heading> + + <Admonition + type="info" + title="Prettier is regularly used by:" + className="margin-vert--lg" + > + <ul> + <li> + <Link to="https://2021.stateofjs.com/en-US/other-tools/#utilities"> + More than <strong>83%</strong> of respondents to State of JS + 2021 (10282 developers out of 12360). + </Link> + </li> + <li> + <Link to="https://2020.stateofjs.com/en-US/other-tools/#utilities"> + More than <strong>70%</strong> of respondents to State of JS + 2020 (14880 developers out of 20974). + </Link> + </li> + </ul> + </Admonition> + + <section> + <div className={styles.logoGrid}>{showcase}</div> + <div className="text--center margin-bottom--lg"> + ...and{" "} + <Link to="https://www.npmjs.com/browse/depended/prettier"> + many more projects + </Link> + </div> + </section> + </div> + </main> + </Layout> + ); +} diff --git a/website/src/pages/users/index.module.css b/website/src/pages/users/index.module.css new file mode 100644 index 000000000000..730b2ff6729c --- /dev/null +++ b/website/src/pages/users/index.module.css @@ -0,0 +1,31 @@ +.main { + --ifm-container-width: 990px; + --ifm-container-width-xl: 990px; +} + +.logoGrid { + --min-item-size: 168px; + + display: flex; + flex-wrap: wrap; +} + +.logoGrid > * { + flex: 1 1 var(--min-item-size); +} + +.logoItem, +.logoItem > a { + display: flex; + align-items: center; + justify-content: center; +} + +.logoItem a { + padding: 20px; +} + +.logoItem img { + max-height: 64px; + width: 128px; +} diff --git a/website/static/.nojekyll b/website/static/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/website/static/CNAME b/website/static/CNAME new file mode 100644 index 000000000000..e6a23e1c5c73 --- /dev/null +++ b/website/static/CNAME @@ -0,0 +1 @@ +prettier.io diff --git a/website/static/_redirects b/website/static/_redirects index 64adb1cba0b7..321e2fbb0a1a 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -5,3 +5,9 @@ # Broken blog link /blog/2018/05/23/1.13.0.html /blog/2018/05/27/1.13.0.html +/blog/2023/07/05/3.1.0.html /blog/2023/07/05/3.0.0.html + +# English language redirects +/en / +/en/* /:splat +/docs/en/* /docs/:splat diff --git a/website/static/css/code-block-buttons.css b/website/static/css/code-block-buttons.css deleted file mode 100644 index 73207981c241..000000000000 --- a/website/static/css/code-block-buttons.css +++ /dev/null @@ -1,63 +0,0 @@ -/* "Copy" code block button, style from docusaurus v2 */ - -.code-block-with-actions { - position: relative; -} - -.code-block-actions { - position: absolute; - top: 10px; - right: 10px; -} - -.code-block-copy-button { - width: 32px; - height: 32px; - border: 1px solid #dadde1; - border-radius: 6px; - display: flex; - transition: opacity 0.2s ease-in-out; - opacity: 0; - position: relative; - cursor: pointer; - color: #393a34; - background-color: #f6f8fa; -} - -.code-block-with-actions:hover .code-block-copy-button { - opacity: 0.4; -} - -.code-block-with-actions:hover .code-block-copy-button:hover { - opacity: 1; -} - -.code-block-copy-button__icon { - fill: currentColor; - position: absolute; - width: 18px; - height: 18px; - left: 0; - right: 0; - top: 0; - bottom: 0; - margin: auto; - transition: 0.15s; -} - -.code-block-copy-button__icon--copied { - color: #00d600; - opacity: 0; - transform: scale(0.33); -} - -.code-block-copy-button--copied .code-block-copy-button__icon--copy { - opacity: 0; - transform: scale(0.33); -} - -.code-block-copy-button--copied .code-block-copy-button__icon--copied { - transition-delay: 75ms; - transform: scale(1); - opacity: 1; -} diff --git a/website/pages/googlefe164a33bda4034b.html b/website/static/googlefe164a33bda4034b.html similarity index 100% rename from website/pages/googlefe164a33bda4034b.html rename to website/static/googlefe164a33bda4034b.html diff --git a/website/static/images/editors/atom-128px.png b/website/static/images/editors/atom-128px.png deleted file mode 100644 index 1ff2effbeb2a..000000000000 Binary files a/website/static/images/editors/atom-128px.png and /dev/null differ diff --git a/website/static/images/editors/editor_atom.svg b/website/static/images/editors/editor_atom.svg deleted file mode 100644 index 83cb7452302f..000000000000 --- a/website/static/images/editors/editor_atom.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104 95"><g fill="none" fill-rule="evenodd"><g stroke="#56b3b4" stroke-linecap="round" stroke-width="3"><path d="M82.213 22.714c1.663-8.514.733-14.976-3.199-17.543-1.31-.856-2.882-1.23-4.65-1.163-9.55.364-24.959 13.587-37.548 33.082C21.895 60.195 16.592 83.35 24.98 88.828c3.982 2.6 10.327.757 17.495-4.38"/><path d="M90.22 60c7.147-2.774 11.542-6.57 11.77-10.931.529-10.085-21.41-19.422-49.021-20.87a137.05 137.05 0 00-7.624-.198c-24.07.08-42.857 6.686-43.336 15.825-.228 4.353 3.736 8.573 10.53 12.075"/><path d="M45.162 7.999c-4.897-4.068-9.49-6.253-13.18-5.976a7.111 7.111 0 00-2.736.747c-9.007 4.595-6.13 28.357 6.441 53.055 12.571 24.7 30.063 40.994 39.07 36.4 8.663-4.419 6.325-26.56-5.048-50.217"/></g><path fill="#56b3b4" fill-rule="nonzero" d="M60 48a8 8 0 11-16 0 8 8 0 0116 0z"/></g></svg> \ No newline at end of file diff --git a/website/static/images/editors/editor_emacs.svg b/website/static/images/editors/editor_emacs.svg index 8670bb9a6eb3..6c04f70e997a 100644 --- a/website/static/images/editors/editor_emacs.svg +++ b/website/static/images/editors/editor_emacs.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 92 93"><g fill="none" fill-rule="evenodd"><path fill="#56B3B4" fill-rule="nonzero" d="M92 46.5C92 72.181 71.405 93 46 93S0 72.181 0 46.5 20.595 0 46 0s46 20.819 46 46.5z"/><path fill="#000" d="M32.522 72.933s3.089.218 7.062-.131c1.61-.142 7.72-.74 12.288-1.74 0 0 5.57-1.187 8.55-2.282 3.117-1.146 4.814-2.118 5.578-3.496-.034-.282.235-1.283-1.203-1.884-3.676-1.537-7.94-1.26-16.375-1.438-9.355-.32-12.467-1.881-14.125-3.139-1.59-1.275-.79-4.804 6.021-7.913C43.75 49.255 57.2 46.2 57.2 46.2c-4.53-2.232-12.977-6.156-14.713-7.004-1.523-.743-3.96-1.862-4.488-3.216-.599-1.3 1.414-2.42 2.54-2.74 3.621-1.042 8.734-1.69 13.388-1.762 2.34-.037 2.719-.187 2.719-.187 3.228-.534 5.352-2.735 4.467-6.222-.795-3.56-4.986-5.65-8.97-4.926-3.75.681-12.791 3.3-12.791 3.3 11.175-.097 13.045.09 13.88 1.254.494.687-.223 1.63-3.204 2.116-3.244.528-9.99 1.164-9.99 1.164-6.47.383-11.027.409-12.394 3.294-.893 1.885.952 3.552 1.761 4.595 3.418 3.79 8.355 5.834 11.533 7.34 1.196.566 4.704 1.635 4.704 1.635-10.31-.565-17.747 2.59-22.11 6.225-4.933 4.55-2.75 9.974 7.358 13.313 5.97 1.973 8.932 2.9 17.838 2.1 5.246-.281 6.073-.113 6.125.316.073.604-5.827 2.105-7.437 2.568-4.098 1.179-14.84 3.558-14.894 3.57z"/></g></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 92 93"><g fill="none" fill-rule="evenodd"><path fill="#56B3B4" fill-rule="nonzero" d="M92 46.5C92 72.181 71.405 93 46 93S0 72.181 0 46.5 20.595 0 46 0s46 20.819 46 46.5z"/><path fill="#182025" d="M32.522 72.933s3.089.218 7.062-.131c1.61-.142 7.72-.74 12.288-1.74 0 0 5.57-1.187 8.55-2.282 3.117-1.146 4.814-2.118 5.578-3.496-.034-.282.235-1.283-1.203-1.884-3.676-1.537-7.94-1.26-16.375-1.438-9.355-.32-12.467-1.881-14.125-3.139-1.59-1.275-.79-4.804 6.021-7.913C43.75 49.255 57.2 46.2 57.2 46.2c-4.53-2.232-12.977-6.156-14.713-7.004-1.523-.743-3.96-1.862-4.488-3.216-.599-1.3 1.414-2.42 2.54-2.74 3.621-1.042 8.734-1.69 13.388-1.762 2.34-.037 2.719-.187 2.719-.187 3.228-.534 5.352-2.735 4.467-6.222-.795-3.56-4.986-5.65-8.97-4.926-3.75.681-12.791 3.3-12.791 3.3 11.175-.097 13.045.09 13.88 1.254.494.687-.223 1.63-3.204 2.116-3.244.528-9.99 1.164-9.99 1.164-6.47.383-11.027.409-12.394 3.294-.893 1.885.952 3.552 1.761 4.595 3.418 3.79 8.355 5.834 11.533 7.34 1.196.566 4.704 1.635 4.704 1.635-10.31-.565-17.747 2.59-22.11 6.225-4.933 4.55-2.75 9.974 7.358 13.313 5.97 1.973 8.932 2.9 17.838 2.1 5.246-.281 6.073-.113 6.125.316.073.604-5.827 2.105-7.437 2.568-4.098 1.179-14.84 3.558-14.894 3.57z"/></g></svg> \ No newline at end of file diff --git a/website/static/images/editors/emacs-128px.png b/website/static/images/editors/emacs-128px.png deleted file mode 100644 index 9559bc406818..000000000000 Binary files a/website/static/images/editors/emacs-128px.png and /dev/null differ diff --git a/website/static/images/editors/espresso-128px.png b/website/static/images/editors/espresso-128px.png deleted file mode 100644 index 5285554ec681..000000000000 Binary files a/website/static/images/editors/espresso-128px.png and /dev/null differ diff --git a/website/static/images/editors/sublimetext-128px.png b/website/static/images/editors/sublimetext-128px.png deleted file mode 100644 index 875f6a0ab3d7..000000000000 Binary files a/website/static/images/editors/sublimetext-128px.png and /dev/null differ diff --git a/website/static/images/editors/vim-128px.png b/website/static/images/editors/vim-128px.png deleted file mode 100644 index 0d06a5ef8717..000000000000 Binary files a/website/static/images/editors/vim-128px.png and /dev/null differ diff --git a/website/static/images/editors/visualstudio-128px.png b/website/static/images/editors/visualstudio-128px.png deleted file mode 100644 index bfe84761f03c..000000000000 Binary files a/website/static/images/editors/visualstudio-128px.png and /dev/null differ diff --git a/website/static/images/editors/vscode-128px.png b/website/static/images/editors/vscode-128px.png deleted file mode 100644 index 98cfcbf13d43..000000000000 Binary files a/website/static/images/editors/vscode-128px.png and /dev/null differ diff --git a/website/static/images/editors/webstorm-128px.png b/website/static/images/editors/webstorm-128px.png deleted file mode 100644 index 8c7c31251821..000000000000 Binary files a/website/static/images/editors/webstorm-128px.png and /dev/null differ diff --git a/website/static/images/syntaxfm/1.webp b/website/static/images/syntaxfm/1.webp new file mode 100644 index 000000000000..7b465befc81b Binary files /dev/null and b/website/static/images/syntaxfm/1.webp differ diff --git a/website/static/images/syntaxfm/2.webp b/website/static/images/syntaxfm/2.webp new file mode 100644 index 000000000000..9f434d9241cc Binary files /dev/null and b/website/static/images/syntaxfm/2.webp differ diff --git a/website/static/images/syntaxfm/3.webp b/website/static/images/syntaxfm/3.webp new file mode 100644 index 000000000000..de1280750562 Binary files /dev/null and b/website/static/images/syntaxfm/3.webp differ diff --git a/website/static/images/syntaxfm/4.webp b/website/static/images/syntaxfm/4.webp new file mode 100644 index 000000000000..5459007c46c8 Binary files /dev/null and b/website/static/images/syntaxfm/4.webp differ diff --git a/docs/assets/webstorm/external-tool-prettier.png b/website/static/images/webstorm/external-tool-prettier.png similarity index 100% rename from docs/assets/webstorm/external-tool-prettier.png rename to website/static/images/webstorm/external-tool-prettier.png diff --git a/docs/assets/webstorm/prettier-settings.png b/website/static/images/webstorm/prettier-settings.png similarity index 100% rename from docs/assets/webstorm/prettier-settings.png rename to website/static/images/webstorm/prettier-settings.png diff --git a/docs/assets/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png b/website/static/images/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png similarity index 100% rename from docs/assets/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png rename to website/static/images/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png diff --git a/docs/assets/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png b/website/static/images/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png similarity index 100% rename from docs/assets/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png rename to website/static/images/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png diff --git a/website/static/install-service-worker.js b/website/static/install-service-worker.js deleted file mode 100644 index a54511afdc26..000000000000 --- a/website/static/install-service-worker.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -if ("serviceWorker" in navigator) { - navigator.serviceWorker.register("/service-worker.js", { - scope: "/playground/", - }); -} diff --git a/website/static/js/code-block-buttons.js b/website/static/js/code-block-buttons.js deleted file mode 100644 index dd09911f34b6..000000000000 --- a/website/static/js/code-block-buttons.js +++ /dev/null @@ -1,57 +0,0 @@ -/* global ClipboardJS */ - -"use strict"; - -(function () { - const CONTAINER_CLASS_NAME = "code-block-with-actions"; - const ACTIONS_CONTAINER_CLASS_NAME = "code-block-actions"; - const COPY_BUTTON_CLASS_NAME = "code-block-copy-button"; - const COPY_BUTTON_COPIED_CLASS_NAME = `${COPY_BUTTON_CLASS_NAME}--copied`; - const COPY_BUTTON_ICON_CLASS_NAME = `${COPY_BUTTON_CLASS_NAME}__icon`; - const COPY_BUTTON_COPY_ICON_CLASS_NAME = `${COPY_BUTTON_ICON_CLASS_NAME}--copy`; - const COPY_BUTTON_COPIED_ICON_CLASS_NAME = `${COPY_BUTTON_ICON_CLASS_NAME}--copied`; - const ARIA_LABEL = "Copy code to clipboard"; - const ARIA_LABEL_COPIED = "Copied"; - - function init(codeBlock) { - const container = codeBlock.parentNode; - container.classList.add(CONTAINER_CLASS_NAME); - - const actionsContainer = Object.assign(document.createElement("div"), { - className: ACTIONS_CONTAINER_CLASS_NAME, - }); - const copyButton = Object.assign(document.createElement("button"), { - className: COPY_BUTTON_CLASS_NAME, - type: "button", - innerHTML: - `<svg class="${COPY_BUTTON_ICON_CLASS_NAME} ${COPY_BUTTON_COPY_ICON_CLASS_NAME}" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg>` + - `<svg class="${COPY_BUTTON_ICON_CLASS_NAME} ${COPY_BUTTON_COPIED_ICON_CLASS_NAME}" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg>`, - }); - copyButton.setAttribute("aria-label", ARIA_LABEL); - - new ClipboardJS(copyButton, { target: () => codeBlock }).on( - "success", - (event) => { - event.clearSelection(); - copyButton.classList.add(COPY_BUTTON_COPIED_CLASS_NAME); - copyButton.setAttribute("aria-label", ARIA_LABEL_COPIED); - copyButton.disabled = true; - - setTimeout(() => { - copyButton.classList.remove(COPY_BUTTON_COPIED_CLASS_NAME); - copyButton.setAttribute("aria-label", ARIA_LABEL); - copyButton.disabled = false; - }, 2000); - } - ); - - actionsContainer.appendChild(copyButton); - container.appendChild(actionsContainer); - } - - window.addEventListener("load", () => { - for (const codeBlock of document.querySelectorAll("pre > code.hljs")) { - init(codeBlock); - } - }); -})(); diff --git a/website/static/landing.js b/website/static/landing.js deleted file mode 100644 index df1d64dd3a56..000000000000 --- a/website/static/landing.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -if (location.hash.slice(1).startsWith(encodeURIComponent("{"))) { - location.pathname = "/playground/"; -} - -window.addEventListener("load", () => { - // We don't have access to a unique body css attribute for just the homepage - // so instead it is set on load. It's only really visible on a vertical overscroll - document.body.style.backgroundColor = "rgb(24, 32, 37)"; - - const logoWrapper = document.querySelector(".animatedLogoWrapper"); - const logo = document.querySelector(".prettier-logo-wide"); - const lastDash = logo.querySelector("g:last-of-type path:last-of-type"); - - function handleLogoDrag(event) { - logo.classList.add("rolling"); - event.preventDefault(); - } - - logoWrapper.setAttribute("draggable", "true"); - logoWrapper.addEventListener("touchstart", handleLogoDrag); - logoWrapper.addEventListener("dragstart", handleLogoDrag); - - lastDash.addEventListener("animationend", (event) => { - if (/roll/.test(event.animationName)) { - logo.classList.remove("rolling"); - } - }); -}); diff --git a/website/static/overrides.css b/website/static/overrides.css deleted file mode 100644 index d3347ad1d63a..000000000000 --- a/website/static/overrides.css +++ /dev/null @@ -1,595 +0,0 @@ -html body { - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, - Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; - - overflow-x: hidden; -} - -em { - font-style: italic; -} - -.mainContainer .wrapper a:hover, -.mainContainer .wrapper a:focus, -.inner .projectIntro a:hover, -.inner .projectIntro a:focus { - text-decoration: underline; -} - -.tidelift { - background: #f6914d url(/images/tidelift-small.png) 10px center no-repeat; - background-size: 24px; - color: #000000; - position: absolute; - margin-top: -15px; - right: 0; - font-size: 13px; - border-radius: 13px 0 0px 13px; - padding: 7px 15px 5px 45px; - z-index: 9999 !important; -} - -/* Note: CSS on body bg-color for index page is set inside landing.js, not here */ - -.post p a { - text-decoration: underline !important; -} -.post a { - font-weight: 600; -} - -.animatedLogoWrapper > svg { - max-width: calc(100vw - 30px); - height: auto; - cursor: ew-resize; - margin-bottom: 30px; -} - -@media screen and (max-width: 735px) { - footer .sitemap { - display: block; - margin-left: 20px; - } - footer .sitemap .nav-home { - margin: 0 auto; - } - - footer .sitemap > div { - margin-bottom: 20px; - } - - footer .sitemap > div h5 { - margin: 0; - } -} - -.buttonGroup .button:not(:first-of-type) { - margin-left: -2px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.buttonGroup .button:not(:last-of-type) { - margin-right: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.button { - font-weight: 600; - font-size: 18px; - padding-top: 9px; - padding-bottom: 8px; - padding-left: 2rem; - padding-right: 2rem; - border-radius: 8px; -} - -.pluginRowBlock .button { - border-radius: 16px; -} - -.pluginRowBlock .buttonWrapper:nth-of-type(1) .button { - background: #f8bc45; -} -.pluginRowBlock .buttonWrapper:nth-of-type(2) .button { - background: #c596c7; -} -.pluginRowBlock .buttonWrapper:nth-of-type(3) .button { - background: #5ab3b3; -} - -.homeContainer { - background: #1a2b34; - padding-top: 30px; -} - -.mainContainer.landingContainer { - padding: 0; -} - -.productShowcaseSection { - background: #1a2b34; - padding-top: 50px; - padding-bottom: 50px; -} - -.productShowcaseSection.lightBackground { - background: #182025; -} - -.productShowcaseSection h2 { - text-align: left; - font-weight: 500; - margin-bottom: 1.5em; - font-size: 34px !important; -} - -.productShowcaseSection h3 { - color: #f9f9f9 !important; - font-weight: 400; -} - -.productShowcaseSection p, -.productShowcaseSection span, -.productShowcaseSection a, -.productShowcaseSection code { - color: #f9f9f9 !important; - font-size: 14px; -} - -.tldrSection h2, -.tldrSection ul { - color: #f8bc45 !important; - padding: 0 !important; -} - -.tldrSection h2::before { - content: "# "; -} - -.mainContainer .tldrSection ul li { - list-style: none; - list-style-position: inside; - line-height: 1; -} - -.mainContainer .tldrSection ul li a { - font-size: 18px; -} - -.tldrSection li::before { - content: "* "; - vertical-align: sub; -} - -.languagesSection h2, -.languagesSection .accented, -.languagesSection .accented a { - color: #c596c7 !important; -} - -.languagesSection .languageCategory ul { - margin: 0; - padding: 0; - list-style-type: none; -} -.languagesSection .languageCategory p, -.languagesSection .languageCategory a { - font-size: 1rem; - padding: 0; -} -.languagesSection .languageCategory code { - font-size: 0.8rem; -} - -.editorSupportSection h2 { - color: #5ab3b3 !important; -} - -.editor { - padding: 0 20px 60px 0; - display: flex; - min-width: 262px; - flex: 1; - flex-grow: 0; - flex-basis: 22%; -} - -.editor code { - white-space: nowrap; -} - -.editorImage { - width: 100px; - height: 100px; -} - -.editorInfo { - padding-left: 12px; - flex-shrink: 0; -} - -.editorInfo .editorName { - margin-bottom: 0; - margin-top: 1em; -} - -.productShowcaseSection code, -.editorInfo code { - white-space: normal; - padding-left: 0; - padding-right: 0; -} - -.editorInfo p { - line-height: 1.7; - padding: 0; -} - -@media only screen and (min-width: 360px) and (max-width: 590px) { - .editor { - flex-direction: column; - min-width: 140px; - padding-right: 0; - } - - .editorInfo { - padding-left: 0px !important; - } - - .editorImage { - margin: 0; - width: 50px; - height: 50px; - } -} - -@media only screen and (max-width: 736px) { - .editor { - padding-bottom: 30px; - } - - .editorImage { - width: 75px; - height: 75px; - } -} - -.getStartedSection h2 { - color: #e85f61 !important; -} - -.getStartedSection { - text-align: left; -} - -.getStartedSection--npm .yarnOnly { - display: none; -} -.getStartedSection:not(.getStartedSection--npm) .npmOnly { - display: none; -} - -.getStartedSection .button { - border: 1px solid #e85f61; - color: #e85f61 !important; - line-height: 1em; -} - -.getStartedSection .button.active { - background: #e85f61; - color: #1a2b34 !important; -} - -.getStartedSection ol { - list-style: none; - color: #f9f9f9; - margin-top: 48px; - margin-left: 48px; -} - -.getStartedSection ol li { - margin: 0 0 22px 0 !important; - min-height: 110px; - padding-left: 46px; - position: relative; -} - -.getStartedSection ol li::before { - color: #e85f61; - font-size: 58px; - position: absolute; - left: -24px; - top: -44px; - width: 58px; - text-align: right; -} - -.getStartedSection ol li:nth-of-type(1)::before { - content: "1."; -} -.getStartedSection ol li:nth-of-type(2)::before { - content: "2."; -} -.getStartedSection ol li:nth-of-type(3)::before { - content: "3."; -} - -.decorativeRects { - min-width: 400px; - width: 400px; -} - -@media screen and (max-width: 960px) { - .decorativeRects { - min-width: 300px; - width: 300px; - } -} -@media screen and (max-width: 875px) { - .decorativeRects { - display: none; - } -} - -@media only screen and (max-width: 736px) { - .getStartedSection ol { - margin: 0 0 0 -12px !important; - padding: 0 !important; - } - - .getStartedSection ol li::before { - font-size: 36px; - top: -22px; - } - - .getStartedFlexContainer { - flex-wrap: wrap-reverse !important; - } -} - -.getStartedFlexContainer pre { - overflow: hidden; -} - -.getStartedSection code { - font-weight: 500; - font-size: 100%; - overflow-x: auto; -} - -.getStartedSection .hljs { - background: transparent !important; - font-size: 130%; -} - -.getStartedSteps { - overflow: auto; -} - -.usersSection h2, -.usersSection h3 { - color: #6f7b81 !important; -} -.usersSection a { - color: #f9f9f9 !important; -} -.usersSection a:hover { - color: white !important; -} -.usersSection .alignCenter { - display: flex; - align-items: center; -} -.usersSection p { - font-size: 1em; - margin: 4px; -} - -.usersSection .button { - background: #6f7b81; - color: #1a2b34 !important; -} - -.usersSection .user { - max-height: 100px; - width: 200px; - flex-grow: 1; - padding: 1em; -} - -.usersSection .more-users { - margin-top: 20px; -} - -@media only screen and (max-width: 736px) { - .usersSection .user { - max-height: 50px !important; - width: 100px !important; - } -} - -.ecosystemSubHeader { - margin-top: 40px !important; - margin-bottom: 20px !important; -} - -.ecosystemSubSection p { - padding-top: 0 !important; - font-size: 0.9em; - color: rgb(176, 196, 206) !important; - line-height: 1.2em !important; -} - -.ecosystemSubSection ul, -.ecosystemSubSection ul a { - color: rgb(176, 196, 206) !important; -} - -.growOnHover { - transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1); -} - -.growOnHover:hover { - transform: scale(1.2); -} - -.mainContainer .wrapper .post h2 { - font-size: 2em; -} - -.mainContainer .wrapper .post h3 { - font-size: 1.5em; - font-weight: 400; -} - -.mainContainer .wrapper .post h4 { - font-size: 1.25em; - font-weight: 400; -} - -pre { - overflow-x: auto; -} - -@media only screen and (min-width: 736px) { - .mainContainer .wrapper .post .postHeader h1 { - font-size: 32px; - } -} - -h1 a { - color: #24292e; -} - -a { - color: #56b3b4; -} - -.post p a { - text-decoration: inherit !important; -} -.post p a:hover { - text-decoration: underline !important; -} -.post a { - font-weight: inherit; -} - -.post, -.post-content { - font-size: 16px; -} - -.post-meta { - float: left; - margin-right: 10px; - font-size: 14px; -} - -.blogContainer .postHeader { - margin-bottom: 0; -} - -.read-more { - margin-top: 10px; -} - -.blogContainer .posts .post { - border-bottom: 1px solid #1b2b35; - border-radius: 0; -} - -.mainContainer .wrapper .post h2, -.mainContainer .wrapper .post h3 { - padding-bottom: 0.3em; - border-bottom: 1px solid #1b2b35; - margin-top: 14px; - margin-bottom: 16px; - font-weight: 600; - line-height: 1.25; -} - -.mainContainer .wrapper .post h4 { - font-size: 1.25em; - line-height: 24px; - font-weight: 500; - margin-bottom: 20px; - margin-top: 10px; -} - -.mainContainer .wrapper .post h5 { - font-size: 1.125em; -} - -.hljs { - padding: 16px; - overflow: auto; - font-size: 13.6px; - line-height: 1.45; - border-radius: 3px; - border-left-color: #eb5d5d; -} - -.hljs, -.hljs-subst { - color: #1b2b35; -} - -.hljs-type, -.hljs-string, -.hljs-number, -.hljs-selector-id, -.hljs-selector-class, -.hljs-quote, -.hljs-template-tag, -.hljs-deletion, -.hljs-title, -.hljs-section { - color: #eb5d5d; -} - -.hljs-built_in, -.hljs-bullet, -.hljs-code, -.hljs-addition, -.hljs-literal { - color: #56b3b4; -} - -.hljs-keyword, -.hljs-attribute, -.hljs-selector-tag, -.hljs-meta-keyword, -.hljs-doctag, -.hljs-name, -.hljs-title, -.hljs-section { - font-weight: normal; -} - -.hljs-regexp, -.hljs-symbol, -.hljs-variable, -.hljs-template-variable, -.hljs-link, -.hljs-selector-attr, -.hljs-selector-pseudo, -.hljs-comment { - color: #cda144; -} - -.showcaseSection .logos img { - max-height: 64px; -} - -/* DOCUSAURUS_CODE_TABS */ -.tabs { - border-top: none; -} -.nav-tabs { - border-bottom: none; -} -.tabs .nav-tabs > div { - padding: 4px 12px; -} diff --git a/website/pages/playground-redirect.html b/website/static/playground-redirect.html similarity index 90% rename from website/pages/playground-redirect.html rename to website/static/playground-redirect.html index f03a9a573a04..f4f447a2cc89 100644 --- a/website/pages/playground-redirect.html +++ b/website/static/playground-redirect.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html> <head> <meta charset="utf-8" /> @@ -18,12 +18,12 @@ <h1>Redirecting…</h1> <script> const match = /^https:\/\/github\.com\/prettier\/prettier\/pull\/(\d+)/.exec( - document.referrer + document.referrer, ); if (match != null) { const [, /* url */ pr] = match; location.replace( - `https://deploy-preview-${pr}--prettier.netlify.app/playground` + `https://deploy-preview-${pr}--prettier.netlify.app/playground`, ); } else { const el = document.createElement("p"); @@ -33,3 +33,4 @@ <h1>Redirecting…</h1> </script> </body> </html> +<!-- TODO: Remove this once PRs not linked to this page --> diff --git a/website/static/service-worker.js b/website/static/service-worker.js deleted file mode 100644 index cbea4fee8372..000000000000 --- a/website/static/service-worker.js +++ /dev/null @@ -1,53 +0,0 @@ -/* global toolbox parsersLocation */ - -"use strict"; - -importScripts("lib/parsers-location.js"); -importScripts("https://unpkg.com/sw-toolbox@3.6.0/sw-toolbox.js"); - -const parsers = Object.keys(parsersLocation).map((file) => `lib/${file}`); - -toolbox.precache([ - // Scripts - "lib/standalone.js", - "lib/parsers-location.js", - ...parsers, - "playground.js", - "https://unpkg.com/sw-toolbox@3.6.0/sw-toolbox.js", - - // CodeMirror; keep this in sync with website/pages/playground/index.html - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/codemirror.min.css", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldgutter.min.css", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/codemirror.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/javascript/javascript.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/xml/xml.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/jsx/jsx.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/css/css.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/mode/markdown/markdown.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/display/placeholder.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/display/rulers.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/search/searchcursor.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/edit/matchbrackets.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/edit/closebrackets.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/comment/comment.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/wrap/hardwrap.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldcode.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/foldgutter.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/addon/fold/brace-fold.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.1/keymap/sublime.min.js", - - "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js", - - // Images - "/prettier.png", -]); - -// Default to hit the cache only if there's a network error -toolbox.router.default = toolbox.networkFirst; - -// For scripts, stylesheets and images, we can use the "fastest" strategy -// This means you need to reload twice to get new changes -toolbox.router.get(/\.(js|css|png|svg)$/, toolbox.fastest); diff --git a/website/static/service-worker.mjs b/website/static/service-worker.mjs new file mode 100644 index 000000000000..c0ca3d4d45d4 --- /dev/null +++ b/website/static/service-worker.mjs @@ -0,0 +1,52 @@ +import "https://cdnjs.cloudflare.com/ajax/libs/sw-toolbox/3.6.0/sw-toolbox.js"; + +import prettierPackageManifest from "./lib/package-manifest.mjs"; + +const { toolbox } = self; +const packageFiles = [ + prettierPackageManifest.prettier, + ...prettierPackageManifest.plugins, +].map(({ file }) => `./lib/${file}`); + +toolbox.precache([ + // Scripts + "lib/package-manifest.mjs", + ...packageFiles, + "https://cdnjs.cloudflare.com/ajax/libs/sw-toolbox/3.6.0/sw-toolbox.js", + + // CodeMirror; keep this in sync with website/pages/playground/index.html + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.css", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/fold/foldgutter.min.css", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/javascript/javascript.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/xml/xml.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/jsx/jsx.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/css/css.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/markdown/markdown.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/display/placeholder.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/display/rulers.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/search/searchcursor.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/edit/matchbrackets.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/edit/closebrackets.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/comment/comment.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/wrap/hardwrap.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/fold/foldcode.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/fold/foldgutter.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/addon/fold/brace-fold.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/keymap/sublime.min.js", + + "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js", + "https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js", + + // Images + "/prettier.png", +]); + +// Default to hit the cache only if there's a network error +toolbox.router.default = toolbox.networkFirst; + +// For scripts, stylesheets and images, we can use the "fastest" strategy +// This means you need to reload twice to get new changes +toolbox.router.get(/\.(js|css|png|svg)$/u, toolbox.fastest); diff --git a/website/static/worker.js b/website/static/worker.js deleted file mode 100644 index 5d70c5585448..000000000000 --- a/website/static/worker.js +++ /dev/null @@ -1,198 +0,0 @@ -/* globals prettier prettierPlugins parsersLocation */ - -"use strict"; - -const imported = Object.create(null); -function importScriptOnce(url) { - if (!imported[url]) { - imported[url] = true; - importScripts(url); - } -} - -importScripts("lib/parsers-location.js"); -importScripts("lib/standalone.js"); - -// this is required to only load parsers when we need them -const parsers = Object.create(null); -for (const file in parsersLocation) { - const { parsers: moduleParsers, property } = parsersLocation[file]; - const url = `lib/${file}`; - for (const parserName of moduleParsers) { - Object.defineProperty(parsers, parserName, { - get() { - importScriptOnce(url); - return prettierPlugins[property].parsers[parserName]; - }, - }); - } -} - -const docExplorerPlugin = { - parsers: { - "doc-explorer": { - parse: (text) => - new Function( - `{ ${Object.keys(prettier.doc.builders)} }`, - `const result = (${text || "''"}\n); return result;` - )(prettier.doc.builders), - astFormat: "doc-explorer", - }, - }, - printers: { - "doc-explorer": { - print: (path) => path.getValue(), - }, - }, - languages: [{ name: "doc-explorer", parsers: ["doc-explorer"] }], -}; - -self.onmessage = function (event) { - self.postMessage({ - uid: event.data.uid, - message: handleMessage(event.data.message), - }); -}; - -function serializeAst(ast) { - return JSON.stringify( - ast, - (_, value) => - value instanceof Error - ? { name: value.name, message: value.message, ...value } - : typeof value === "bigint" - ? `BigInt('${String(value)}')` - : typeof value === "symbol" - ? String(value) - : value, - 2 - ); -} - -function handleMessage(message) { - switch (message.type) { - case "meta": - return handleMetaMessage(); - case "format": - return handleFormatMessage(message); - } -} - -function handleMetaMessage() { - return { - type: "meta", - supportInfo: JSON.parse( - JSON.stringify( - prettier.getSupportInfo({ - showUnreleased: true, - plugins: [docExplorerPlugin], - }) - ) - ), - version: prettier.version, - }; -} - -function handleFormatMessage(message) { - const plugins = [{ parsers }, docExplorerPlugin]; - const options = { ...message.options, plugins }; - - delete options.ast; - delete options.doc; - delete options.output2; - - const formatResult = formatCode( - message.code, - options, - message.debug.rethrowEmbedErrors - ); - - const response = { - formatted: formatResult.formatted, - cursorOffset: formatResult.cursorOffset, - error: formatResult.error, - debug: { - ast: null, - doc: null, - comments: null, - reformatted: null, - }, - }; - - if (message.debug.ast) { - let ast; - let errored = false; - try { - ast = serializeAst(prettier.__debug.parse(message.code, options).ast); - } catch (e) { - errored = true; - ast = String(e); - } - - if (!errored) { - try { - ast = formatCode(ast, { parser: "json", plugins }).formatted; - } catch { - ast = serializeAst(ast); - } - } - response.debug.ast = ast; - } - - if (message.debug.doc) { - try { - response.debug.doc = prettier.__debug.formatDoc( - prettier.__debug.printToDoc(message.code, options), - { plugins } - ); - } catch { - response.debug.doc = ""; - } - } - - if (message.debug.comments) { - response.debug.comments = formatCode( - JSON.stringify(formatResult.comments || []), - { parser: "json", plugins } - ).formatted; - } - - if (message.debug.reformat) { - response.debug.reformatted = formatCode( - response.formatted, - options - ).formatted; - } - - return response; -} - -function formatCode(text, options, rethrowEmbedErrors) { - try { - self.PRETTIER_DEBUG = rethrowEmbedErrors; - return prettier.formatWithCursor(text, options); - } catch (e) { - if (e.constructor && e.constructor.name === "SyntaxError") { - // Likely something wrong with the user's code - return { formatted: String(e), error: true }; - } - // Likely a bug in Prettier - // Provide the whole stack for debugging - return { formatted: stringifyError(e), error: true }; - } finally { - self.PRETTIER_DEBUG = undefined; - } -} - -function stringifyError(e) { - const stringified = String(e); - if (typeof e.stack !== "string") { - return stringified; - } - if (e.stack.includes(stringified)) { - // Chrome - return e.stack; - } - // Firefox - return stringified + "\n" + e.stack; -} diff --git a/website/static/worker.mjs b/website/static/worker.mjs new file mode 100644 index 000000000000..6f318ae34ccc --- /dev/null +++ b/website/static/worker.mjs @@ -0,0 +1,233 @@ +import prettierPackageManifest from "./lib/package-manifest.mjs"; +import * as prettier from "./lib/prettier/standalone.mjs"; + +const pluginLoadPromises = new Map(); +async function importPlugin(plugin) { + if (!pluginLoadPromises.has(plugin)) { + pluginLoadPromises.set(plugin, import(`./lib/${plugin.file}`)); + } + + try { + return await pluginLoadPromises.get(plugin); + } catch { + throw new Error(`Load plugin '${plugin.file}' failed.`); + } +} + +// Similar to `createParsersAndPrinters` in `src/plugins/builtin-plugins-proxy.js` +function createPlugin(pluginManifest) { + const { languages, options, defaultOptions } = pluginManifest; + + const parsers = Object.create(null); + const printers = Object.create(null); + const plugin = { languages, options, defaultOptions, parsers, printers }; + + const loadPlugin = async () => { + const plugin = await importPlugin(pluginManifest); + Object.assign(parsers, plugin.parsers); + Object.assign(printers, plugin.printers); + return plugin; + }; + + for (const property of ["parsers", "printers"]) { + for (const name of pluginManifest[property] ?? []) { + plugin[property][name] = async () => (await loadPlugin())[property][name]; + } + } + + return plugin; +} + +const docExplorerPlugin = { + parsers: { + "doc-explorer": { + parse: (text) => + new Function( + `{ ${Object.keys(prettier.doc.builders)} }`, + `const result = (${text || "''"}\n); return result;`, + )(prettier.doc.builders), + astFormat: "doc-explorer", + }, + }, + printers: { + "doc-explorer": { + print: (path) => path.getValue(), + }, + }, + languages: [{ name: "doc-explorer", parsers: ["doc-explorer"] }], +}; + +const plugins = [ + ...prettierPackageManifest.plugins.map((plugin) => createPlugin(plugin)), + docExplorerPlugin, +]; + +self.onmessage = async function (event) { + self.postMessage({ + uid: event.data.uid, + message: await handleMessage(event.data.message), + }); +}; + +function serializeAst(ast) { + return JSON.stringify( + ast, + (_, value) => + value instanceof Error + ? { name: value.name, message: value.message, ...value } + : typeof value === "bigint" + ? `BigInt('${String(value)}')` + : typeof value === "symbol" + ? String(value) + : value, + 2, + ); +} + +function handleMessage(message) { + switch (message.type) { + case "meta": + return handleMetaMessage(); + case "format": + return handleFormatMessage(message); + } +} + +async function handleMetaMessage() { + const supportInfo = await prettier.getSupportInfo({ plugins }); + + return { + type: "meta", + // eslint-disable-next-line unicorn/prefer-structured-clone + supportInfo: JSON.parse(JSON.stringify(supportInfo)), + version: prettier.version, + }; +} + +async function handleFormatMessage(message) { + const options = { ...message.options, plugins }; + + delete options.ast; + delete options.doc; + delete options.output2; + + const isDocExplorer = options.parser === "doc-explorer"; + + const formatResult = await formatCode( + message.code, + options, + message.debug.rethrowEmbedErrors, + ); + + const response = { + formatted: formatResult.formatted, + cursorOffset: formatResult.cursorOffset, + error: formatResult.error, + debug: { + ast: null, + doc: null, + comments: null, + reformatted: null, + }, + }; + + for (const key of ["ast", "preprocessedAst"]) { + if (!message.debug[key]) { + continue; + } + + const preprocessForPrint = key === "preprocessedAst"; + + if (isDocExplorer && preprocessForPrint) { + continue; + } + + let ast; + let errored = false; + try { + const parsed = await prettier.__debug.parse(message.code, options, { + preprocessForPrint, + }); + ast = serializeAst(parsed.ast); + } catch (e) { + errored = true; + ast = String(e); + } + + if (!errored) { + try { + ast = (await formatCode(ast, { parser: "json", plugins })).formatted; + } catch { + ast = serializeAst(ast); + } + } + response.debug[key] = ast; + } + + if (!isDocExplorer && message.debug.doc) { + try { + response.debug.doc = await prettier.__debug.formatDoc( + await prettier.__debug.printToDoc(message.code, options), + { plugins }, + ); + } catch { + response.debug.doc = ""; + } + } + + if (!isDocExplorer && message.debug.comments) { + response.debug.comments = ( + await formatCode(JSON.stringify(formatResult.comments || []), { + parser: "json", + plugins, + }) + ).formatted; + } + + if (!isDocExplorer && message.debug.reformat) { + response.debug.reformatted = ( + await formatCode(response.formatted, options) + ).formatted; + } + + return response; +} + +async function formatCode(text, options, rethrowEmbedErrors) { + if (options.parser === "doc-explorer") { + options = { + ...options, + cursorOffset: undefined, + rangeStart: undefined, + rangeEnd: undefined, + }; + } + + try { + self.PRETTIER_DEBUG = rethrowEmbedErrors; + return await prettier.formatWithCursor(text, options); + } catch (error) { + if (error.constructor?.name === "SyntaxError") { + // Likely something wrong with the user's code + return { formatted: String(error), error: true }; + } + // Likely a bug in Prettier + // Provide the whole stack for debugging + return { formatted: stringifyError(error), error: true }; + } finally { + self.PRETTIER_DEBUG = undefined; + } +} + +function stringifyError(error) { + const stringified = String(error); + if (typeof error.stack !== "string") { + return stringified; + } + if (error.stack.includes(stringified)) { + // Chrome + return error.stack; + } + // Firefox + return stringified + "\n" + error.stack; +} diff --git a/website/versioned_docs/version-stable/api.md b/website/versioned_docs/version-stable/api.md index a8288f272bcb..6f6e987c36a8 100644 --- a/website/versioned_docs/version-stable/api.md +++ b/website/versioned_docs/version-stable/api.md @@ -1,42 +1,43 @@ --- -id: version-stable-api +id: api title: API -original_id: api --- If you want to run Prettier programmatically, check this page out. ```js -const prettier = require("prettier"); +import * as prettier from "prettier"; ``` +Our public APIs are all asynchronous, if you must use synchronous version for some reason, you can try [`@prettier/sync`](https://github.com/prettier/prettier-synchronized). + ## `prettier.format(source, options)` `format` is used to format text using Prettier. `options.parser` must be set according to the language you are formatting (see the [list of available parsers](options.md#parser)). Alternatively, `options.filepath` can be specified for Prettier to infer the parser from the file extension. Other [options](options.md) may be provided to override the defaults. ```js -prettier.format("foo ( );", { semi: false, parser: "babel" }); -// -> "foo()" +await prettier.format("foo ( );", { semi: false, parser: "babel" }); +// -> 'foo()\n' ``` ## `prettier.check(source [, options])` -`check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`. This is similar to the `--check` or `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. +`check` checks to see if the file has been formatted with Prettier given those options and returns a `Promise<boolean>`. This is similar to the `--check` or `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. ## `prettier.formatWithCursor(source [, options])` `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code. This is useful for editor integrations, to prevent the cursor from moving when code is formatted. -The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`. +The `cursorOffset` option should be provided, to specify where the cursor is. ```js -prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); +await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); // -> { formatted: '1;\n', cursorOffset: 1 } ``` -## `prettier.resolveConfig(filePath [, options])` +## `prettier.resolveConfig(fileUrlOrPath [, options])` -`resolveConfig` can be used to resolve configuration for a given source file, passing its path as the first argument. The config search will start at the file path and continue to search up the directory (you can use `process.cwd()` to start searching from the current directory). Or you can pass directly the path of the config file as `options.config` if you don’t wish to search for it. A promise is returned which will resolve to: +`resolveConfig` can be used to resolve configuration for a given source file, passing its path or url as the first argument. The config search will start at the directory of the file location and continue to search up the directory. Or you can pass directly the path of the config file as `options.config` if you don’t wish to search for it. A promise is returned which will resolve to: - An options object, providing a [config file](configuration.md) was found. - `null`, if no file was found. @@ -46,9 +47,11 @@ The promise will be rejected if there was an error parsing the configuration fil If `options.useCache` is `false`, all caching will be bypassed. ```js -const text = fs.readFileSync(filePath, "utf8"); -prettier.resolveConfig(filePath).then((options) => { - const formatted = prettier.format(text, options); +const text = await fs.readFile(filePath, "utf8"); +const options = await prettier.resolveConfig(filePath); +const formatted = await prettier.format(text, { + ...options, + filepath: filePath, }); ``` @@ -59,9 +62,7 @@ If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editor - `indent_size`/`tab_width` - `max_line_length` -Use `prettier.resolveConfig.sync(filePath [, options])` if you’d like to use sync version. - -## `prettier.resolveConfigFile([filePath])` +## `prettier.resolveConfigFile([fileUrlOrPath])` `resolveConfigFile` can be used to find the path of the Prettier configuration file that will be used when resolving the config (i.e. when calling `resolveConfig`). A promise is returned which will resolve to: @@ -70,54 +71,48 @@ Use `prettier.resolveConfig.sync(filePath [, options])` if you’d like to use s The promise will be rejected if there was an error parsing the configuration file. -The search starts at `process.cwd()`, or at `filePath` if provided. Please see the [cosmiconfig docs](https://github.com/davidtheclark/cosmiconfig#explorersearch) for details on how the resolving works. +The search starts at `process.cwd()`, or at the directory of `fileUrlOrPath` if provided. ```js -prettier.resolveConfigFile(filePath).then((configFile) => { - // you got the path of the configuration file -}); +const configFile = await prettier.resolveConfigFile(filePath); +// you got the path of the configuration file ``` -Use `prettier.resolveConfigFile.sync([filePath])` if you’d like to use sync version. - ## `prettier.clearConfigCache()` When Prettier loads configuration files and plugins, the file system structure is cached for performance. This function will clear the cache. Generally this is only needed for editor integrations that know that the file system has changed since the last format took place. -## `prettier.getFileInfo(filePath [, options])` +## `prettier.getFileInfo(fileUrlOrPath [, options])` `getFileInfo` can be used by editor extensions to decide if a particular file needs to be formatted. This method returns a promise, which resolves to an object with the following properties: -```typescript +```ts { - ignored: boolean, - inferredParser: string | null, + ignored: boolean; + inferredParser: string | null; } ``` -The promise will be rejected if the type of `filePath` is not `string`. +The promise will be rejected if the type of `fileUrlOrPath` is not `string` or `URL`. -Setting `options.ignorePath` (`string`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). +Setting `options.ignorePath` (`string | URL | (string | URL)[]`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). -If the given `filePath` is ignored, the `inferredParser` is always `null`. +If the given `fileUrlOrPath` is ignored, the `inferredParser` is always `null`. -Providing [plugin](plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. +Providing [plugin](plugins.md) paths in `options.plugins` (`(string | URL | Plugin)[]`) helps extract `inferredParser` for files that are not supported by Prettier core. -When setting `options.resolveConfig` (`boolean`, default `false`), Prettier will resolve the configuration for the given `filePath`. This is useful, for example, when the `inferredParser` might be overridden for a subset of files. - -Use `prettier.getFileInfo.sync(filePath [, options])` if you’d like to use sync version. +When setting `options.resolveConfig` (`boolean`, default `true`) to `false`, Prettier will not search for configuration file. This can be useful if this function is only used to check if file is ignored. ## `prettier.getSupportInfo()` -Returns an object representing the options, parsers, languages and file types Prettier supports. +Returns a promise which resolves to an object representing the options, parsers, languages and file types Prettier supports. The support information looks like this: -```typescript +```ts { languages: Array<{ name: string; - since?: string; parsers: string[]; group?: string; tmScope?: string; @@ -129,22 +124,31 @@ The support information looks like this: filenames?: string[]; linguistLanguageId?: number; vscodeLanguageIds?: string[]; + isSupported?(options: { filepath: string }): boolean; }>; } ``` +:::note + +Prettier can not ensure that `filepath` exists on disk.\ +When using from APIs(eg: `prettier.format()`), Prettier can not ensure it's a valid path either. + +::: + <a name="custom-parser-api"></a> -## Custom Parser API (deprecated) +## Custom Parser API (removed) -_Will be removed in v3.0.0 (superseded by the Plugin API)_ +_Removed in v3.0.0 (superseded by the Plugin API)_ -Before [plugins](plugins.md) were a thing, Prettier had a similar but more limited feature called custom parsers. It will be removed in v3.0.0 as its functionality is a subset of what the Plugin API does. If you used it, please check the example below on how to migrate. +Before [plugins](plugins.md) were a thing, Prettier had a similar but more limited feature called custom parsers. It’s been removed in v3.0.0 as its functionality was a subset of what the Plugin API did. If you used it, please check the example below on how to migrate. -❌ Custom parser API (deprecated): +❌ Custom parser API (removed): ```js import { format } from "prettier"; + format("lodash ( )", { parser(text, { babel }) { const ast = babel(text); @@ -159,12 +163,13 @@ format("lodash ( )", { ```js import { format } from "prettier"; -import parserBabel from "prettier/parser-babel.js"; +import * as prettierPluginBabel from "prettier/plugins/babel"; + const myCustomPlugin = { parsers: { "my-custom-parser": { - parse(text) { - const ast = parserBabel.parsers.babel.parse(text); + async parse(text) { + const ast = await prettierPluginBabel.parsers.babel.parse(text); ast.program.body[0].expression.callee.name = "_"; return ast; }, @@ -172,13 +177,18 @@ const myCustomPlugin = { }, }, }; -format("lodash ( )", { + +await format("lodash ( )", { parser: "my-custom-parser", plugins: [myCustomPlugin], }); // -> "_();\n" ``` -> Note: Overall, doing codemods this way isn’t recommended. Prettier uses the location data of AST nodes for many things like preserving blank lines and attaching comments. When the AST is modified after the parsing, the location data often gets out of sync, which may lead to unpredictable results. Consider using [jscodeshift](https://github.com/facebook/jscodeshift) if you need codemods. +:::note + +Overall, doing codemods this way isn’t recommended. Prettier uses the location data of AST nodes for many things like preserving blank lines and attaching comments. When the AST is modified after the parsing, the location data often gets out of sync, which may lead to unpredictable results. Consider using [jscodeshift](https://github.com/facebook/jscodeshift) if you need codemods. + +::: -As part of the deprecated Custom parser API, it is possible to pass a path to a module exporting a `parse` function via the `--parser` option. Use the `--plugin` CLI option or the `plugins` API option instead to [load plugins](plugins.md#using-plugins). +As part of the removed Custom parser API, it was previously possible to pass a path to a module exporting a `parse` function via the `--parser` option. Use the `--plugin` CLI option or the `plugins` API option instead to [load plugins](plugins.md#using-plugins). diff --git a/website/versioned_docs/version-stable/browser.md b/website/versioned_docs/version-stable/browser.md index 5676516583b8..51b1a18b2f8c 100644 --- a/website/versioned_docs/version-stable/browser.md +++ b/website/versioned_docs/version-stable/browser.md @@ -1,14 +1,16 @@ --- -id: version-stable-browser +id: browser title: Browser -original_id: browser --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Run Prettier in the browser using its **standalone** version. This version doesn’t depend on Node.js. It only formats the code and has no support for config files, ignore files, CLI usage, or automatic loading of plugins. The standalone version comes as: -- ES modules: `esm/standalone.mjs`, starting in version 2.2 +- ES modules: `standalone.mjs`, starting in version 3.0 (In version 2, `esm/standalone.mjs`.) - UMD: `standalone.js`, starting in version 1.13 The [`browser` field](https://github.com/defunctzombie/package-browser-field-spec) in Prettier’s `package.json` points to `standalone.js`. That’s why you can just `import` or `require` the `prettier` module to access Prettier’s API, and your code can stay compatible with both Node and the browser as long as webpack or another bundler that supports the `browser` field is used. This is especially convenient for [plugins](plugins.md). @@ -19,10 +21,7 @@ Required options: - **[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use. -- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named - - - `parser-*.js` in <https://unpkg.com/browse/prettier@2.8.8/> and - - `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.8.8/esm/> +- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource-options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in [https://unpkg.com/browse/prettier@3.6.2/plugins](https://unpkg.com/browse/prettier@3.6.2/plugins). Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON. You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option. @@ -33,13 +32,15 @@ See below for examples. ### Global ```html -<script src="https://unpkg.com/prettier@2.8.8/standalone.js"></script> -<script src="https://unpkg.com/prettier@2.8.8/parser-graphql.js"></script> +<script src="https://unpkg.com/prettier@3.6.2/standalone.js"></script> +<script src="https://unpkg.com/prettier@3.6.2/plugins/graphql.js"></script> <script> - prettier.format("type Query { hello: String }", { - parser: "graphql", - plugins: prettierPlugins, - }); + (async () => { + const formatted = await prettier.format("type Query { hello: String }", { + parser: "graphql", + plugins: prettierPlugins, + }); + })(); </script> ``` @@ -49,12 +50,12 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack ```html <script type="module"> - import prettier from "https://unpkg.com/prettier@2.8.8/esm/standalone.mjs"; - import parserGraphql from "https://unpkg.com/prettier@2.8.8/esm/parser-graphql.mjs"; + import * as prettier from "https://unpkg.com/prettier@3.6.2/standalone.mjs"; + import * as prettierPluginGraphql from "https://unpkg.com/prettier@3.6.2/plugins/graphql.mjs"; - prettier.format("type Query { hello: String }", { + const formatted = await prettier.format("type Query { hello: String }", { parser: "graphql", - plugins: [parserGraphql], + plugins: [prettierPluginGraphql], }); </script> ``` @@ -63,10 +64,10 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack ```js define([ - "https://unpkg.com/prettier@2.8.8/standalone.js", - "https://unpkg.com/prettier@2.8.8/parser-graphql.js", -], (prettier, ...plugins) => { - prettier.format("type Query { hello: String }", { + "https://unpkg.com/prettier@3.6.2/standalone.js", + "https://unpkg.com/prettier@3.6.2/plugins/graphql.js", +], async (prettier, ...plugins) => { + const formatted = await prettier.format("type Query { hello: String }", { parser: "graphql", plugins, }); @@ -77,40 +78,68 @@ define([ ```js const prettier = require("prettier/standalone"); -const plugins = [require("prettier/parser-graphql")]; -prettier.format("type Query { hello: String }", { - parser: "graphql", - plugins, -}); +const plugins = [require("prettier/plugins/graphql")]; + +(async () => { + const formatted = await prettier.format("type Query { hello: String }", { + parser: "graphql", + plugins, + }); +})(); ``` This syntax doesn’t necessarily work in the browser, but it can be used when bundling the code with browserify, Rollup, webpack, or another bundler. ### Worker +<Tabs groupId="worker-type"> +<TabItem value="module" label="Module worker"> + ```js -importScripts("https://unpkg.com/prettier@2.8.8/standalone.js"); -importScripts("https://unpkg.com/prettier@2.8.8/parser-graphql.js"); -prettier.format("type Query { hello: String }", { +import * as prettier from "https://unpkg.com/prettier@3.6.2/standalone.mjs"; +import * as prettierPluginGraphql from "https://unpkg.com/prettier@3.6.21/plugins/graphql.mjs"; + +const formatted = await prettier.format("type Query { hello: String }", { parser: "graphql", - plugins: prettierPlugins, + plugins: [prettierPluginGraphql], }); ``` +</TabItem> +<TabItem value="classic" label="Classic worker"> + +```js +importScripts( + "https://unpkg.com/prettier@3.6.2/standalone.js", + "https://unpkg.com/prettier@3.6.2/plugins/graphql.js", +); + +(async () => { + const formatted = await prettier.format("type Query { hello: String }", { + parser: "graphql", + plugins: prettierPlugins, + }); +})(); +``` + +</TabItem> +</Tabs> + ## Parser plugins for embedded code If you want to format [embedded code](options.md#embedded-language-formatting), you need to load related plugins too. For example: ```html <script type="module"> - import prettier from "https://unpkg.com/prettier@2.8.8/esm/standalone.mjs"; - import parserBabel from "https://unpkg.com/prettier@2.8.8/esm/parser-babel.mjs"; + import * as prettier from "https://unpkg.com/prettier@3.6.2/standalone.mjs"; + import * as prettierPluginBabel from "https://unpkg.com/prettier@3.6.2/plugins/babel.mjs"; + import * as prettierPluginEstree from "https://unpkg.com/prettier@3.6.2/plugins/estree.mjs"; console.log( - prettier.format("const html=/* HTML */ `<DIV> </DIV>`", { + await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", { parser: "babel", - plugins: [parserBabel], - }) + plugins: [prettierPluginBabel, prettierPluginEstree], + }), ); // Output: const html = /* HTML */ `<DIV> </DIV>`; </script> @@ -120,15 +149,16 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser ```html <script type="module"> - import prettier from "https://unpkg.com/prettier@2.8.8/esm/standalone.mjs"; - import parserBabel from "https://unpkg.com/prettier@2.8.8/esm/parser-babel.mjs"; - import parserHtml from "https://unpkg.com/prettier@2.8.8/esm/parser-html.mjs"; + import * as prettier from "https://unpkg.com/prettier@3.6.2/standalone.mjs"; + import * as prettierPluginBabel from "https://unpkg.com/prettier@3.6.2/plugins/babel.mjs"; + import * as prettierPluginEstree from "https://unpkg.com/prettier@3.6.2/plugins/estree.mjs"; + import * as prettierPluginHtml from "https://unpkg.com/prettier@3.6.2/plugins/html.mjs"; console.log( - prettier.format("const html=/* HTML */ `<DIV> </DIV>`", { + await prettier.format("const html=/* HTML */ `<DIV> </DIV>`", { parser: "babel", - plugins: [parserBabel, parserHtml], - }) + plugins: [prettierPluginBabel, prettierPluginEstree, prettierPluginHtml], + }), ); // Output: const html = /* HTML */ `<div></div>`; </script> diff --git a/website/versioned_docs/version-stable/ci.md b/website/versioned_docs/version-stable/ci.md new file mode 100644 index 000000000000..57834ed05efb --- /dev/null +++ b/website/versioned_docs/version-stable/ci.md @@ -0,0 +1,34 @@ +--- +id: ci +title: Run Prettier on CI +--- + +## GitHub Actions + +To apply autofix for Prettier from GitHub Actions, do the following: + +1. Install the [`autofix.ci`](https://github.com/apps/autofix-ci) GitHub App. +1. Make sure you have a **pinned** version of Prettier installed in your repository. +1. Create `.github/workflows/prettier.yml` with following content: + + ```yaml title=".github/workflows/prettier.yml" + name: autofix.ci + on: + pull_request: + push: + permissions: {} + jobs: + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: | + yarn + yarn prettier . --write + - uses: autofix-ci/action@v1 + with: + commit-message: "Apply Prettier format" + ``` + +For more information see [autofix.ci](https://autofix.ci/) website. diff --git a/website/versioned_docs/version-stable/cli.md b/website/versioned_docs/version-stable/cli.md index 4b24b2c93930..51ed8b8bc453 100644 --- a/website/versioned_docs/version-stable/cli.md +++ b/website/versioned_docs/version-stable/cli.md @@ -1,7 +1,6 @@ --- -id: version-stable-cli +id: cli title: CLI -original_id: cli --- Use the `prettier` command to run Prettier from the command line. @@ -10,14 +9,18 @@ Use the `prettier` command to run Prettier from the command line. prettier [options] [file/dir/glob ...] ``` -> To run your locally installed version of Prettier, prefix the command with `npx` or `yarn` (if you use Yarn), i.e. `npx prettier --help`, or `yarn prettier --help`. +:::note + +To run your locally installed version of Prettier, prefix the command with `npx`, `yarn exec`, `pnpm exec`, or `bunx`, i.e. `npx prettier --help`, `yarn exec prettier --help`, `pnpm exec prettier --help`, or `bunx prettier --help`. + +::: To format a file in-place, use `--write`. (Note: This overwrites your files!) In practice, this may look something like: ```bash -prettier --write . +prettier . --write ``` This command formats all files supported by Prettier in the current directory and its subdirectories. @@ -27,12 +30,20 @@ It’s recommended to always make sure that `prettier --write .` only formats wh A more complicated example: ```bash -prettier --single-quote --trailing-comma all --write docs package.json "{app,__{tests,mocks}__}/**/*.js" +prettier docs package.json "{app,__{tests,mocks}__}/**/*.js" --write --single-quote --trailing-comma all ``` -> Don’t forget the **quotes** around the globs! The quotes make sure that Prettier CLI expands the globs rather than your shell, which is important for cross-platform usage. +:::warning + +Don’t forget the **quotes** around the globs! The quotes make sure that Prettier CLI expands the globs rather than your shell, which is important for cross-platform usage. + +::: -> It’s better to use a [configuration file](configuration.md) for formatting options like `--single-quote` and `--trailing-comma` instead of passing them as CLI flags. This way the Prettier CLI, [editor integrations](editors.md), and other tooling can all know what options you use. +:::note + +It’s better to use a [configuration file](configuration.md) for formatting options like `--single-quote` and `--trailing-comma` instead of passing them as CLI flags. This way the Prettier CLI, [editor integrations](editors.md), and other tooling can all know what options you use. + +::: ## File patterns @@ -46,6 +57,8 @@ Given a list of paths/patterns, the Prettier CLI first treats every entry in it Prettier CLI will ignore files located in `node_modules` directory. To opt out from this behavior, use `--with-node-modules` flag. +Prettier CLI will not follow symbolic links when expanding arguments. + To escape special characters in globs, one of the two escaping syntaxes can be used: `prettier "\[my-dir]/*.js"` or `prettier "[[]my-dir]/*.js"`. Both match all JS files in a directory named `[my-dir]`, however the latter syntax is preferable as the former doesn’t work on Windows, where backslashes are treated as path separators. ## `--check` @@ -54,7 +67,7 @@ When you want to check if your files are formatted, you can run Prettier with th This will output a human-friendly message and a list of unformatted files, if any. ```bash -prettier --check "src/**/*.js" +prettier . --check ``` Console output if all files are formatted: @@ -70,7 +83,7 @@ Console output if some of the files require re-formatting: Checking formatting... [warn] src/fileA.js [warn] src/fileB.js -[warn] Code style issues found in 2 files. Forgot to run Prettier? +[warn] Code style issues found in 2 files. Run Prettier with --write to fix. ``` The command will return exit code `1` in the second case, which is helpful inside the CI pipelines. @@ -96,15 +109,15 @@ If you're worried that Prettier will change the correctness of your code, add `- If you are repeatedly formatting individual files with `prettier`, you will incur a small performance cost when Prettier attempts to look up a [configuration file](configuration.md). In order to skip this, you may ask Prettier to find the config file once, and re-use it later on. -```bash -prettier --find-config-path ./my/file.js -./my/.prettierrc +```console +$ prettier --find-config-path path/to/file.js +path/to/.prettierrc ``` This will provide you with a path to the configuration file, which you can pass to `--config`: ```bash -prettier --config ./my/.prettierrc --write ./my/file.js +prettier path/to/file.js --write --config path/to/.prettierrc ``` You can also use `--config` if your configuration file lives somewhere where Prettier cannot find it, such as a `config/` directory. @@ -113,14 +126,15 @@ If you don’t have a configuration file, or want to ignore it if it does exist, ## `--ignore-path` -Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.prettierignore`. +Path to a file containing patterns that describe files to ignore. By default, Prettier looks for `./.gitignore` and `./.prettierignore`.\ +Multiple values are accepted. ## `--list-different` Another useful flag is `--list-different` (or `-l`) which prints the filenames of files that are different from Prettier formatting. If there are differences the script errors out, which is useful in a CI scenario. ```bash -prettier --single-quote --list-different "src/**/*.js" +prettier . --single-quote --list-different ``` You can also use [`--check`](cli.md#--check) flag, which works the same way as `--list-different`, but also prints a human-friendly summary message to stdout. @@ -159,7 +173,7 @@ Prettier CLI will ignore files located in `node_modules` directory. To opt out f This rewrites all processed files in place. This is comparable to the `eslint --fix` workflow. You can also use `-w` alias. -## `--loglevel` +## `--log-level` Change the level of logging for the CLI. Valid options are: @@ -194,18 +208,14 @@ $ cat abc.css | prettier --stdin-filepath abc.css With `--ignore-unknown` (or `-u`), prettier will ignore unknown files matched by patterns. -```console -$ prettier "**/*" --write --ignore-unknown +```bash +prettier "**/*" --write --ignore-unknown ``` ## `--no-error-on-unmatched-pattern` Prevent errors when pattern is unmatched. -## `--no-plugin-search` - -Disable plugin autoloading. - ## `--cache` If this option is enabled, the following values are used as cache keys and the file is formatted only if one of them is changed. @@ -217,14 +227,18 @@ If this option is enabled, the following values are used as cache keys and the f - (if `--cache-strategy` is `content`) content of the file ```bash -prettier --write --cache src +prettier . --write --cache ``` Running Prettier without `--cache` will delete the cache. Also, since the cache file is stored in `./node_modules/.cache/prettier/.prettier-cache`, so you can use `rm ./node_modules/.cache/prettier/.prettier-cache` to remove it manually. -> Plugins version and implementation are not used as cache keys. We recommend that you delete the cache when updating plugins. +:::warning + +Plugins version and implementation are not used as cache keys. We recommend that you delete the cache when updating plugins. + +::: ## `--cache-location` @@ -233,7 +247,7 @@ Path to the cache file location used by `--cache` flag. If you don't explicit `- If a file path is passed, that file is used as the cache file. ```bash -prettier --write --cache --cache-location=my_cache_file src +prettier . --write --cache --cache-location=path/to/cache-file ``` ## `--cache-strategy` @@ -245,5 +259,5 @@ In general, `metadata` is faster. However, `content` is useful for updating the If no strategy is specified, `content` will be used. ```bash -prettier --write --cache --cache-strategy metadata src +prettier . --write --cache --cache-strategy metadata ``` diff --git a/website/versioned_docs/version-stable/comparison.md b/website/versioned_docs/version-stable/comparison.md index 566b8aa53429..882ca74f5ad1 100644 --- a/website/versioned_docs/version-stable/comparison.md +++ b/website/versioned_docs/version-stable/comparison.md @@ -1,7 +1,6 @@ --- -id: version-stable-comparison +id: comparison title: Prettier vs. Linters -original_id: comparison --- ## How does it compare to ESLint/TSLint/stylelint, etc.? diff --git a/website/versioned_docs/version-stable/configuration.md b/website/versioned_docs/version-stable/configuration.md index 547c8bef8308..900e38ccf313 100644 --- a/website/versioned_docs/version-stable/configuration.md +++ b/website/versioned_docs/version-stable/configuration.md @@ -1,23 +1,44 @@ --- -id: version-stable-configuration +id: configuration title: Configuration File -original_id: configuration --- -Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. This means you can configure Prettier via (in order of precedence): +You can configure Prettier via (in order of precedence): -- A `"prettier"` key in your `package.json` file. +- A `"prettier"` key in your `package.json`, or [`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) file. - A `.prettierrc` file written in JSON or YAML. - A `.prettierrc.json`, `.prettierrc.yml`, `.prettierrc.yaml`, or `.prettierrc.json5` file. -- A `.prettierrc.js`, `.prettierrc.cjs`, `prettier.config.js`, or `prettier.config.cjs` file that exports an object using `module.exports`. +- A `.prettierrc.js`, `prettier.config.js`, `.prettierrc.ts`, or `prettier.config.ts` file that exports an object using `export default` or `module.exports` (depends on the [`type`](https://nodejs.org/api/packages.html#type) value in your `package.json`). +- A `.prettierrc.mjs`, `prettier.config.mjs`, `.prettierrc.mts`, or `prettier.config.mts` file that exports an object using `export default`. +- A `.prettierrc.cjs`, `prettier.config.cjs`, `.prettierrc.cts`, or `prettier.config.cts` file that exports an object using `module.exports`. - A `.prettierrc.toml` file. +:::info + +TypeScript configuration files support requires [additional setup](#typescript-configuration-files) + +::: + The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isn’t) found. Prettier intentionally doesn’t support any kind of global configuration. This is to make sure that when a project is copied to another computer, Prettier’s behavior stays the same. Otherwise, Prettier wouldn’t be able to guarantee that everybody in a team gets the same consistent results. The options you can use in the configuration file are the same as the [API options](options.md). +### TypeScript Configuration Files + +TypeScript support requires Node.js>=22.6.0, and `--experimental-strip-types` is required before Node.js v24.3.0 to run Node.js. + +```sh +node --experimental-strip-types node_modules/prettier/bin/prettier.cjs . --write +``` + +or + +```sh +NODE_OPTIONS="--experimental-strip-types" prettier . --write +``` + ## Basic Configuration JSON: @@ -31,16 +52,70 @@ JSON: } ``` -JS: +JS (ES Modules): ```js -// prettier.config.js or .prettierrc.js -module.exports = { +// prettier.config.js, .prettierrc.js, prettier.config.mjs, or .prettierrc.mjs + +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { trailingComma: "es5", tabWidth: 4, semi: false, singleQuote: true, }; + +export default config; +``` + +JS (CommonJS): + +```js +// prettier.config.js, .prettierrc.js, prettier.config.cjs, or .prettierrc.cjs + +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { + trailingComma: "es5", + tabWidth: 4, + semi: false, + singleQuote: true, +}; + +module.exports = config; +``` + +TypeScript (ES Modules): + +```ts +// prettier.config.ts, .prettierrc.ts, prettier.config.mts, or .prettierrc.mts + +import { type Config } from "prettier"; + +const config: Config = { + trailingComma: "none", +}; + +export default config; +``` + +TypeScript (CommonJS): + +```ts +// prettier.config.ts, .prettierrc.ts, prettier.config.cts, or .prettierrc.cts + +import { type Config } from "prettier"; + +const config: Config = { + trailingComma: "none", +}; + +module.exports = config; ``` YAML: @@ -108,35 +183,6 @@ overrides: `files` is required for each override, and may be a string or array of strings. `excludeFiles` may be optionally provided to exclude files for a given rule, and may also be a string or array of strings. -## Sharing configurations - -Sharing a Prettier configuration is simple: just publish a module that exports a configuration object, say `@company/prettier-config`, and reference it in your `package.json`: - -```json -{ - "name": "my-cool-library", - "version": "9000.0.1", - "prettier": "@company/prettier-config" -} -``` - -If you don’t want to use `package.json`, you can use any of the supported extensions to export a string, e.g. `.prettierrc.json`: - -```json -"@company/prettier-config" -``` - -An example configuration repository is available [here](https://github.com/azz/prettier-config). - -> Note: This method does **not** offer a way to _extend_ the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a `.prettierrc.js` file and export the modifications, e.g: -> -> ```js -> module.exports = { -> ...require("@company/prettier-config"), -> semi: false, -> }; -> ``` - ## Setting the [parser](options.md#parser) option By default, Prettier automatically infers which parser to use based on the input file extension. Combined with `overrides` you can teach Prettier how to parse files it does not recognize. @@ -173,11 +219,11 @@ You can also switch to the `flow` parser instead of the default `babel` for .js ## Configuration Schema -If you’d like a JSON schema to validate your configuration, one is available here: http://json.schemastore.org/prettierrc. +If you’d like a JSON schema to validate your configuration, one is available here: [https://json.schemastore.org/prettierrc](https://json.schemastore.org/prettierrc). ## EditorConfig -If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by `.prettierrc`, etc. +If a [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Here’s an annotated description of how different properties map to Prettier’s behavior: diff --git a/website/versioned_docs/version-stable/editors.md b/website/versioned_docs/version-stable/editors.md index 6a99e6556f8c..e057efe8b6b1 100644 --- a/website/versioned_docs/version-stable/editors.md +++ b/website/versioned_docs/version-stable/editors.md @@ -1,7 +1,6 @@ --- -id: version-stable-editors +id: editors title: Editor Integration -original_id: editors --- To get the most out of Prettier, it’s recommended to run it from your editor. @@ -26,6 +25,12 @@ Check out the [prettier-emacs](https://github.com/prettier/prettier-emacs) repo, For more details see [the Vim setup guide](vim.md). +## Helix + +A formatter can be specified in your [Helix language configuration](https://docs.helix-editor.com/languages.html#language-configuration), which will take precedence over any language servers. + +For more details see the [Helix external binary formatter configuration for Prettier](https://github.com/helix-editor/helix/wiki/External-formatter-configuration#prettier). + ## Sublime Text Sublime Text support is available through Package Control and the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plug-in. @@ -38,11 +43,6 @@ See the [WebStorm setup guide](webstorm.md). Install the [JavaScript Prettier extension](https://github.com/madskristensen/JavaScriptPrettier). -## Atom - -Atom users can install the [prettier-atom](https://github.com/prettier/prettier-atom) package, or one of the more minimalistic [mprettier](https://github.com/t9md/atom-mprettier) and -[miniprettier](https://github.com/duailibe/atom-miniprettier) packages. - ## Espresso Espresso users can install the [espresso-prettier](https://github.com/eablokker/espresso-prettier) plugin. diff --git a/website/versioned_docs/version-stable/for-enterprise.md b/website/versioned_docs/version-stable/for-enterprise.md index 46e1a343a00a..bdec9e16320f 100644 --- a/website/versioned_docs/version-stable/for-enterprise.md +++ b/website/versioned_docs/version-stable/for-enterprise.md @@ -1,17 +1,16 @@ --- -id: version-stable-for-enterprise +id: for-enterprise title: For Enterprise -original_id: for-enterprise --- ## Available as part of the Tidelift Subscription Tidelift is working with the maintainers of Prettier and thousands of other open source projects to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. -<a class="button" href="https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Learn more</a> -<a class="button" href="https://tidelift.com/subscription/request-a-demo?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Request a demo</a> +<a class="button button--primary" href="https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Learn more</a> +<a class="button button--primary" href="https://tidelift.com/subscription/request-a-demo?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Request a demo</a> -<br> +<br /> ### Enterprise-ready open source software—managed for you @@ -45,5 +44,5 @@ Tidelift works with GitHub, GitLab, BitBucket, and more. We support every cloud The end result? All of the capabilities you expect from commercial-grade software, for the full breadth of open source you use. That means less time grappling with esoteric open source trivia, and more time building your own applications—and your business. -<a class="button" href="https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Learn more</a> -<a class="button" href="https://tidelift.com/subscription/request-a-demo?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Request a demo</a> +<a class="button button--primary" href="https://tidelift.com/subscription/pkg/npm-prettier?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Learn more</a> +<a class="button button--primary" href="https://tidelift.com/subscription/request-a-demo?utm_source=npm-prettier&utm_medium=referral&utm_campaign=enterprise">Request a demo</a> diff --git a/website/versioned_docs/version-stable/ignore.md b/website/versioned_docs/version-stable/ignore.md index 24ae1b3e4299..6ba181dde2ad 100644 --- a/website/versioned_docs/version-stable/ignore.md +++ b/website/versioned_docs/version-stable/ignore.md @@ -1,7 +1,6 @@ --- -id: version-stable-ignore +id: ignore title: Ignoring Code -original_id: ignore --- Use `.prettierignore` to ignore (i.e. not reformat) certain files and folders completely. @@ -14,22 +13,22 @@ To exclude files from formatting, create a `.prettierignore` file in the root of Example: -``` +```text # Ignore artifacts: build coverage # Ignore all HTML files: -*.html +**/*.html ``` It’s recommended to have a `.prettierignore` in your project! This way you can run `prettier --write .` to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files _not_ to format! -By default prettier ignores files in version control systems directories (".git", ".svn" and ".hg") and `node_modules` (if [`--with-node-modules` CLI option](cli.md#--with-node-modules) not specified) +By default prettier ignores files in version control systems directories (".git", ".jj", ".sl", ".svn" and ".hg") and `node_modules` (unless the [`--with-node-modules` CLI option](cli.md#--with-node-modules) is specified). Prettier will also follow rules specified in the ".gitignore" file if it exists in the same directory from which it is run. So by default it will be -```js +```text **/.git **/.svn **/.hg @@ -38,7 +37,7 @@ So by default it will be and -```js +```text **/.git **/.svn **/.hg @@ -146,6 +145,8 @@ This type of ignore is only allowed to be used in top-level and aimed to disable <!-- prettier-ignore-end --> ``` +**Important:** You must have a blank line before `<!-- prettier-ignore-start -->` and `<!-- prettier-ignore-end -->` for Prettier to recognize the comments. + ## YAML To ignore a part of a YAML file, `# prettier-ignore` should be placed on the line immediately above the ignored node: @@ -187,7 +188,7 @@ hello: world For one-off commands, when you want to exclude some files without adding them to `.prettierignore`, negative patterns can come in handy: ```bash -prettier --write . '!**/*.{js,jsx,vue}' +prettier . "!**/*.{js,jsx,vue}" --write ``` -See [fast-glob](https://prettier.io/docs/en/cli.html#file-patterns) to learn more about advanced glob syntax. +See [fast-glob](https://prettier.io/docs/cli#file-patterns) to learn more about advanced glob syntax. diff --git a/website/versioned_docs/version-stable/index.md b/website/versioned_docs/version-stable/index.md index 8a38b45d13c7..a209d6b6ad0c 100644 --- a/website/versioned_docs/version-stable/index.md +++ b/website/versioned_docs/version-stable/index.md @@ -1,23 +1,22 @@ --- -id: version-stable-index +id: index title: What is Prettier? -original_id: index --- Prettier is an opinionated code formatter with support for: - JavaScript (including experimental features) - [JSX](https://facebook.github.io/jsx/) -- [Angular](https://angular.io/) +- [Angular](https://angular.dev/) - [Vue](https://vuejs.org/) - [Flow](https://flow.org/) - [TypeScript](https://www.typescriptlang.org/) -- CSS, [Less](http://lesscss.org/), and [SCSS](https://sass-lang.com) +- CSS, [Less](https://lesscss.org/), and [SCSS](https://sass-lang.com) - [HTML](https://en.wikipedia.org/wiki/HTML) - [Ember/Handlebars](https://handlebarsjs.com/) - [JSON](https://json.org/) - [GraphQL](https://graphql.org/) -- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX](https://mdxjs.com/) +- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX v1](https://mdxjs.com/) - [YAML](https://yaml.org/) It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](https://jlongster.com/A-Prettier-Formatter)) @@ -44,7 +43,7 @@ foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), - isThereSeriouslyAnotherOne() + isThereSeriouslyAnotherOne(), ); ``` @@ -52,9 +51,9 @@ Prettier enforces a consistent code **style** (i.e. code formatting that won’t If you want to learn more, these two conference talks are great introductions: -[![A Prettier Printer by James Long on React Conf 2017](/docs/assets/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png)](https://www.youtube.com/watch?v=hkfBvpEfWdA) +[![A Prettier Printer by James Long on React Conf 2017](/images/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png)](https://www.youtube.com/watch?v=hkfBvpEfWdA) -[![JavaScript Code Formatting by Christopher Chedeau on React London 2017](/docs/assets/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png)](https://www.youtube.com/watch?v=0Q4kUNx85_4) +[![JavaScript Code Formatting by Christopher Chedeau on React London 2017](/images/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png)](https://www.youtube.com/watch?v=0Q4kUNx85_4) #### Footnotes diff --git a/website/versioned_docs/version-stable/install.md b/website/versioned_docs/version-stable/install.md index 778f5ddbedc8..1ead6743aaba 100644 --- a/website/versioned_docs/version-stable/install.md +++ b/website/versioned_docs/version-stable/install.md @@ -1,75 +1,150 @@ --- -id: version-stable-install +id: install title: Install -original_id: install --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + First, install Prettier locally: -<!--DOCUSAURUS_CODE_TABS--> -<!--npm--> +<Tabs groupId="package-manager"> +<TabItem value="npm"> ```bash npm install --save-dev --save-exact prettier ``` -<!--yarn--> +</TabItem> +<TabItem value="yarn"> ```bash yarn add --dev --exact prettier ``` -<!--END_DOCUSAURUS_CODE_TABS--> +</TabItem> +<TabItem value="pnpm"> + +```bash +pnpm add --save-dev --save-exact prettier +``` + +</TabItem> +<TabItem value="bun"> + +```bash +bun add --dev --exact prettier +``` + +</TabItem> +</Tabs> Then, create an empty config file to let editors and other tools know you are using Prettier: -<!-- Note: `echo "{}" > .prettierrc.json` would result in `"{}"<SPACE>` on Windows. The below version works in cmd.exe, bash, zsh, fish. --> +<!-- +Note: +- `echo "{}" > .prettierrc` would result in `"{}"<SPACE>` on Windows. +- `echo {}> .prettierrc` would result the file in UTF-16LE encoding in PowerShell. +The below version works in cmd.exe, bash, zsh, fish, PowerShell. +--> ```bash -echo {}> .prettierrc.json +node --eval "fs.writeFileSync('.prettierrc','{}\n')" ``` Next, create a [.prettierignore](ignore.md) file to let the Prettier CLI and editors know which files to _not_ format. Here’s an example: +```bash +node --eval "fs.writeFileSync('.prettierignore','# Ignore artifacts:\nbuild\ncoverage\n')" ``` -# Ignore artifacts: -build -coverage -``` -> Tip! Base your .prettierignore on .gitignore and .eslintignore (if you have one). +:::tip + +Prettier will follow rules specified in .gitignore if it exists in the same directory from which it is run. You can also base your .prettierignore on .eslintignore (if you have one). + +::: + +:::tip[Another tip] + +If your project isn’t ready to format, say, HTML files yet, add `*.html`. -> Another tip! If your project isn’t ready to format, say, HTML files yet, add `*.html`. +::: Now, format all files with Prettier: -<!--DOCUSAURUS_CODE_TABS--> -<!--npm--> +<Tabs groupId="package-manager"> +<TabItem value="npm"> + +```bash +npx prettier . --write +``` + +:::info + +What is that `npx` thing? `npx` ships with `npm` and lets you run locally installed tools. We’ll leave off the `npx` part for brevity throughout the rest of this file! + +::: + +:::warning + +If you forget to install Prettier first, `npx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. + +::: + +</TabItem> +<TabItem value="yarn"> + +```bash +yarn exec prettier . --write +``` + +:::info + +What is `yarn exec` doing at the start? `yarn exec prettier` runs the locally installed version of Prettier. We’ll leave off the `yarn exec` part for brevity throughout the rest of this file! + +::: + +</TabItem> +<TabItem value="pnpm"> ```bash -npx prettier --write . +pnpm exec prettier . --write ``` -> What is that `npx` thing? `npx` ships with `npm` and lets you run locally installed tools. We’ll leave off the `npx` part for brevity throughout the rest of this file! -> -> Note: If you forget to install Prettier first, `npx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. +:::info + +What is `pnpm exec` doing at the start? `pnpm exec prettier` runs the locally installed version of Prettier. We’ll leave off the `pnpm exec` part for brevity throughout the rest of this file! -<!--yarn--> +::: + +</TabItem> +<TabItem value="bun"> ```bash -yarn prettier --write . +bunx prettier . --write ``` -> What is `yarn` doing at the start? `yarn prettier` runs the locally installed version of Prettier. We’ll leave off the `yarn` part for brevity throughout the rest of this file! +:::info + +What is `bunx` doing at the start? `bunx prettier` runs the locally installed version of Prettier. We’ll leave off the `bunx` part for brevity throughout the rest of this file! + +::: + +:::warning -<!--END_DOCUSAURUS_CODE_TABS--> +If you forget to install Prettier first, `bunx` will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your `package.json`. And it’s faster, too. + +::: + +</TabItem> +</Tabs> `prettier --write .` is great for formatting everything, but for a big project it might take a little while. You may run `prettier --write app/` to format a certain directory, or `prettier --write app/components/Button.js` to format a certain file. Or use a _glob_ like `prettier --write "app/**/*.test.js"` to format all tests in a directory (see [fast-glob](https://github.com/mrmlnc/fast-glob#pattern-syntax) for supported glob syntax). If you have a CI setup, run the following as part of it to make sure that everyone runs Prettier. This avoids merge conflicts and other collaboration issues! ```bash -npx prettier --check . +npx prettier . --check ``` `--check` is like `--write`, but only checks that files are already formatted, rather than overwriting them. `prettier --write` and `prettier --check` are the most common ways to run Prettier. @@ -80,9 +155,13 @@ Formatting from the command line is a good way to get started, but you get the m See [Editor Integration](editors.md) for how to set up your editor. If your editor does not support Prettier, you can instead [run Prettier with a file watcher](watching-files.md). -> **Note:** Don’t skip the regular local install! Editor plugins will pick up your local version of Prettier, making sure you use the correct version in every project. (You wouldn’t want your editor accidentally causing lots of changes because it’s using a newer version of Prettier than your project!) -> -> And being able to run Prettier from the command line is still a good fallback, and needed for CI setups. +:::note + +Don’t skip the regular local install! Editor plugins will pick up your local version of Prettier, making sure you use the correct version in every project. (You wouldn’t want your editor accidentally causing lots of changes because it’s using a newer version of Prettier than your project!) + +And being able to run Prettier from the command line is still a good fallback, and needed for CI setups. + +::: ## ESLint (and other linters) @@ -98,28 +177,50 @@ For example, you can do the following to have Prettier run before each commit: 1. Install [husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged): - <!--DOCUSAURUS_CODE_TABS--> - <!--npm--> +<Tabs groupId="package-manager"> +<TabItem value="npm"> - ```bash - npm install --save-dev husky lint-staged - npx husky install - npm pkg set scripts.prepare="husky install" - npx husky add .husky/pre-commit "npx lint-staged" - ``` +```bash +npm install --save-dev husky lint-staged +npx husky init +node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')" +``` - <!--yarn--> +</TabItem> +<TabItem value="yarn"> - ```bash - yarn add --dev husky lint-staged - npx husky install - npm pkg set scripts.prepare="husky install" - npx husky add .husky/pre-commit "npx lint-staged" - ``` +```bash +yarn add --dev husky lint-staged +npx husky init +node --eval "fs.writeFileSync('.husky/pre-commit','yarn lint-staged\n')" +``` + +:::note + +If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2 + +::: + +</TabItem> +<TabItem value="pnpm"> + +```bash +pnpm add --save-dev husky lint-staged +pnpm exec husky init +node --eval "fs.writeFileSync('.husky/pre-commit','pnpm exec lint-staged\n')" +``` - > If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2 +</TabItem> +<TabItem value="bun"> - <!--END_DOCUSAURUS_CODE_TABS--> +```bash +bun add --dev husky lint-staged +bunx husky init +bun --eval "fs.writeFileSync('.husky/pre-commit','bunx lint-staged\n')" +``` + +</TabItem> +</Tabs> 2. Add the following to your `package.json`: @@ -131,7 +232,11 @@ For example, you can do the following to have Prettier run before each commit: } ``` -> Note: If you use ESLint, make sure lint-staged runs it before Prettier, not after. +:::note + +If you use ESLint, make sure lint-staged runs it before Prettier, not after. + +::: See [Pre-commit Hook](precommit.md) for more information. @@ -140,7 +245,7 @@ See [Pre-commit Hook](precommit.md) for more information. To summarize, we have learned to: - Install an exact version of Prettier locally in your project. This makes sure that everyone in the project gets the exact same version of Prettier. Even a patch release of Prettier can result in slightly different formatting, so you wouldn’t want different team members using different versions and formatting each other’s changes back and forth. -- Add a `.prettierrc.json` to let your editor know that you are using Prettier. +- Add a `.prettierrc` to let your editor know that you are using Prettier. - Add a `.prettierignore` to let your editor know which files _not_ to touch, as well as for being able to run `prettier --write .` to format the entire project (without mangling files you don’t want, or choking on generated files). - Run `prettier --check .` in CI to make sure that your project stays formatted. - Run Prettier from your editor for the best experience. diff --git a/website/versioned_docs/version-stable/integrating-with-linters.md b/website/versioned_docs/version-stable/integrating-with-linters.md index 5099e71247bb..98ba92991519 100644 --- a/website/versioned_docs/version-stable/integrating-with-linters.md +++ b/website/versioned_docs/version-stable/integrating-with-linters.md @@ -1,7 +1,6 @@ --- -id: version-stable-integrating-with-linters +id: integrating-with-linters title: Integrating with Linters -original_id: integrating-with-linters --- Linters usually contain not only code quality rules, but also stylistic rules. Most stylistic rules are unnecessary when using Prettier, but worse – they might conflict with Prettier! Use Prettier for code formatting concerns, and linters for code-quality concerns, as outlined in [Prettier vs. Linters](comparison.md). @@ -9,7 +8,6 @@ Linters usually contain not only code quality rules, but also stylistic rules. M Luckily it’s easy to turn off rules that conflict or are unnecessary with Prettier, by using these pre-made configs: - [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) -- [stylelint-config-prettier](https://github.com/prettier/stylelint-config-prettier) Check out the above links for instructions on how to install and set things up. diff --git a/website/versioned_docs/version-stable/option-philosophy.md b/website/versioned_docs/version-stable/option-philosophy.md index 005c4e56d2d4..2c6f011bc568 100644 --- a/website/versioned_docs/version-stable/option-philosophy.md +++ b/website/versioned_docs/version-stable/option-philosophy.md @@ -1,12 +1,15 @@ --- -id: version-stable-option-philosophy +id: option-philosophy title: Option Philosophy -original_id: option-philosophy --- -> Prettier has a few options because of history. **But we won’t add more of them.** -> -> Read on to learn more. +:::info + +Prettier has a few options because of history. **But we won’t add more of them.** + +Read on to learn more. + +::: Prettier is not a kitchen-sink code formatter that attempts to print your code in any way you wish. It is _opinionated._ Quoting the [Why Prettier?](why-prettier.md) page: diff --git a/website/versioned_docs/version-stable/options.md b/website/versioned_docs/version-stable/options.md index 451a2db99337..9f5bf1afeed0 100644 --- a/website/versioned_docs/version-stable/options.md +++ b/website/versioned_docs/version-stable/options.md @@ -1,7 +1,6 @@ --- -id: version-stable-options +id: options title: Options -original_id: options --- Prettier ships with a handful of format options. @@ -10,19 +9,47 @@ Prettier ships with a handful of format options. If you change any options, it’s recommended to do it via a [configuration file](configuration.md). This way the Prettier CLI, [editor integrations](editors.md) and other tooling knows what options you use. +## Experimental Ternaries + +Try prettier's [new ternary formatting](https://github.com/prettier/prettier/pull/13183) before it becomes the default behavior. + +Valid options: + +- `true` - Use curious ternaries, with the question mark after the condition. +- `false` - Retain the default behavior of ternaries; keep question marks on the same line as the consequent. + +| Default | CLI Override | API Override | +| ------- | -------------------------- | ------------------------------- | +| `false` | `--experimental-ternaries` | `experimentalTernaries: <bool>` | + +## Experimental Operator Position + +Valid options: + +- `"start"` - When binary expressions wrap lines, print operators at the start of new lines. +- `"end"` - Default behavior; when binary expressions wrap lines, print operators at the end of previous lines. + +| Default | CLI Override | API Override | +| ------- | --------------------------------------------------------------- | -------------------------------------------------------------- | +| `"end"` | <code>--experimental-operator-position \<start&#124;end></code> | <code>experimentalOperatorPosition: "\<start&#124;end>"</code> | + ## Print Width Specify the line length that the printer will wrap on. -> **For readability we recommend against using more than 80 characters:** -> -> In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don’t strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. -> -> Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. -> -> Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. -> -> In other words, don’t try to use printWidth as if it was ESLint’s [max-len](https://eslint.org/docs/rules/max-len) – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies. +:::warning + +**For readability we recommend against using more than 80 characters:** + +In code styleguides, maximum line length rules are often set to 100 or 120. However, when humans write code, they don’t strive to reach the maximum number of columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the average line length often ends up well below the maximum. + +Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth. + +Remember, computers are dumb. You need to explicitly tell them what to do, while humans can make their own (implicit) judgements, for example on when to break a line. + +In other words, don’t try to use printWidth as if it was ESLint’s [max-len](https://eslint.org/docs/rules/max-len) – they’re not the same. max-len just says what the maximum allowed line length is, but not what the generally preferred length is – which is what printWidth specifies. + +::: | Default | CLI Override | API Override | | ------- | --------------------- | ------------------- | @@ -92,9 +119,9 @@ Valid options: - `"consistent"` - If at least one property in an object requires quotes, quote all properties. - `"preserve"` - Respect the input use of quotes in object properties. -| Default | CLI Override | API Override | -| ------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `"as-needed"` | <code>--quote-props <as-needed&#124;consistent&#124;preserve></code> | <code>quoteProps: "<as-needed&#124;consistent&#124;preserve>"</code> | +| Default | CLI Override | API Override | +| ------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `"as-needed"` | <code>--quote-props \<as-needed&#124;consistent&#124;preserve></code> | <code>quoteProps: "\<as-needed&#124;consistent&#124;preserve>"</code> | Note that Prettier never unquotes numeric property names in Angular expressions, TypeScript, and Flow because the distinction between string and numeric keys is significant in these languages. See: [Angular][quote-props-angular], [TypeScript][quote-props-typescript], [Flow][quote-props-flow]. Also Prettier doesn’t unquote numeric properties for Vue (see the [issue][quote-props-vue] about that). @@ -103,8 +130,6 @@ Note that Prettier never unquotes numeric property names in Angular expressions, [quote-props-flow]: https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjOA7AzgFzAA8wBeMAb1TDAAYAuMARlQF8g [quote-props-vue]: https://github.com/prettier/prettier/issues/10127 -If this option is set to `preserve`, `singleQuote` to `false` (default value), and `parser` to `json5`, double quotes are always used for strings. This effectively allows using the `json5` parser for “JSON with comments and trailing commas”. - ## JSX Quotes Use single quotes instead of double quotes in JSX. @@ -115,19 +140,19 @@ Use single quotes instead of double quotes in JSX. ## Trailing Commas -_Default value changed from `none` to `es5` in v2.0.0_ +_Default value changed from `es5` to `all` in v3.0.0_ Print trailing commas wherever possible in multi-line comma-separated syntactic structures. (A single-line array, for example, never gets trailing commas.) Valid options: -- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.). No trailing commas in type parameters in TypeScript. +- `"all"` - Trailing commas wherever possible (including [function parameters and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). To run, JavaScript code formatted this way needs an engine that supports ES2017 (Node.js 8+ or a modern browser) or [downlevel compilation](https://babeljs.io/docs/index). This also enables trailing commas in type parameters in TypeScript (supported since TypeScript 2.7 released in January 2018). +- `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.). Trailing commas in type parameters in TypeScript and Flow. - `"none"` - No trailing commas. -- `"all"` - Trailing commas wherever possible (including [function parameters and calls](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas#Trailing_commas_in_functions)). To run, JavaScript code formatted this way needs an engine that supports ES2017 (Node.js 8+ or a modern browser) or [downlevel compilation](https://babeljs.io/docs/en/index). This also enables trailing commas in type parameters in TypeScript (supported since TypeScript 2.7 released in January 2018). -| Default | CLI Override | API Override | -| ------- | ------------------------------------------------------ | ------------------------------------------------------ | -| `"es5"` | <code>--trailing-comma <es5&#124;none&#124;all></code> | <code>trailingComma: "<es5&#124;none&#124;all>"</code> | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `"all"` | <code>--trailing-comma \<all&#124;es5&#124;none></code> | <code>trailingComma: "\<all&#124;es5&#124;none>"</code> | ## Bracket Spacing @@ -142,6 +167,23 @@ Valid options: | ------- | ---------------------- | ------------------------ | | `true` | `--no-bracket-spacing` | `bracketSpacing: <bool>` | +## Object Wrap + +_First available in v3.5.0_ + +Configure how Prettier wraps object literals when they could fit on one line or span multiple lines. + +By default, Prettier formats objects as multi-line if there is a newline prior to the first property. Authors can use this heuristic to contextually improve readability, though it has some downsides. See [Multi-line objects](rationale.md#multi-line-objects). + +Valid options: + +- `"preserve"` - Keep as multi-line, if there is a newline between the opening brace and first property. +- `"collapse"` - Fit to a single line when possible. + +| Default | CLI Override | API Override | +| ------------ | ---------------------------------------------------- | ---------------------------------------------------- | +| `"preserve"` | <code>--object-wrap \<preserve&#124;collapse></code> | <code>objectWrap: "\<preserve&#124;collapse>"</code> | + ## Bracket Line Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). @@ -179,7 +221,11 @@ Valid options: ## [Deprecated] JSX Brackets -_This option has been deprecated in v2.4.0, use --bracket-same-line instead_ +:::danger + +This option has been deprecated in v2.4.0, use --bracket-same-line instead. + +::: Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). @@ -225,9 +271,9 @@ Valid options: - `"always"` - Always include parens. Example: `(x) => x` - `"avoid"` - Omit parens when possible. Example: `x => x` -| Default | CLI Override | API Override | -| ---------- | ----------------------------------------------- | ----------------------------------------------- | -| `"always"` | <code>--arrow-parens <always&#124;avoid></code> | <code>arrowParens: "<always&#124;avoid>"</code> | +| Default | CLI Override | API Override | +| ---------- | ------------------------------------------------ | ------------------------------------------------ | +| `"always"` | <code>--arrow-parens \<always&#124;avoid></code> | <code>arrowParens: "\<always&#124;avoid>"</code> | At first glance, avoiding parentheses may look like a better choice because of less visual noise. However, when Prettier removes parentheses, it becomes harder to add type annotations, extra arguments or default values as well as making other changes. @@ -242,8 +288,6 @@ These two options can be used to format code starting and ending at a given char - Backwards to the start of the first line containing the selected statement. - Forwards to the end of the selected statement. -These options cannot be used with `cursorOffset`. - | Default | CLI Override | API Override | | ---------- | --------------------- | ------------------- | | `0` | `--range-start <int>` | `rangeStart: <int>` | @@ -267,11 +311,12 @@ Valid options: - `"espree"` (via [espree](https://github.com/eslint/espree)) _First available in v2.2.0_ - `"meriyah"` (via [meriyah](https://github.com/meriyah/meriyah)) _First available in v2.2.0_ - `"acorn"` (via [acorn](https://github.com/acornjs/acorn)) _First available in v2.6.0_ -- `"css"` (via [postcss-scss](https://github.com/postcss/postcss-scss) and [postcss-less](https://github.com/shellscape/postcss-less), autodetects which to use) _First available in v1.7.1_ -- `"scss"` (same parsers as `"css"`, prefers postcss-scss) _First available in v1.7.1_ -- `"less"` (same parsers as `"css"`, prefers postcss-less) _First available in v1.7.1_ -- `"json"` (via [@babel/parser parseExpression](https://babeljs.io/docs/en/next/babel-parser.html#babelparserparseexpressioncode-options)) _First available in v1.5.0_ +- `"css"` (via [postcss](https://github.com/postcss/postcss)) _First available in v1.7.1_ +- `"scss"` (via [postcss-scss](https://github.com/postcss/postcss-scss)) _First available in v1.7.1_ +- `"less"` (via [postcss-less](https://github.com/shellscape/postcss-less)) _First available in v1.7.1_ +- `"json"` (via [@babel/parser parseExpression](https://babeljs.io/docs/babel-parser#babelparserparseexpressioncode-options)) _First available in v1.5.0_ - `"json5"` (same parser as `"json"`, but outputs as [json5](https://json5.org/)) _First available in v1.13.0_ +- `"jsonc"` (same parser as `"json"`, but outputs as "JSON with Comments") _First available in v3.2.0_ - `"json-stringify"` (same parser as `"json"`, but outputs like `JSON.stringify`) _First available in v1.13.0_ - `"graphql"` (via [graphql/language](https://github.com/graphql/graphql-js/tree/master/src/language)) _First available in v1.5.0_ - `"markdown"` (via [remark-parse](https://github.com/wooorm/remark/tree/main/packages/remark-parse)) _First available in v1.8.0_ @@ -280,16 +325,17 @@ Valid options: - `"vue"` (same parser as `"html"`, but also formats vue-specific syntax) _First available in 1.10.0_ - `"angular"` (same parser as `"html"`, but also formats angular-specific syntax via [angular-estree-parser](https://github.com/ikatyang/angular-estree-parser)) _First available in 1.15.0_ - `"lwc"` (same parser as `"html"`, but also formats LWC-specific syntax for unquoted template attributes) _First available in 1.17.0_ +- `"mjml"` (same parser as `"html"`, but also formats MJML-specific syntax) _First available in 3.6.0_ - `"yaml"` (via [yaml](https://github.com/eemeli/yaml) and [yaml-unist-parser](https://github.com/ikatyang/yaml-unist-parser)) _First available in 1.14.0_ -[Custom parsers](api.md#custom-parser-api) are also supported. _First available in v1.5.0. Deprecated. Will be removed in v3.0.0 (superseded by the Plugin API)_ - -| Default | CLI Override | API Override | -| ------- | ----------------------------------------------- | ---------------------------------------------------------- | -| None | `--parser <string>`<br />`--parser ./my-parser` | `parser: "<string>"`<br />`parser: require("./my-parser")` | +| Default | CLI Override | API Override | +| ------- | ------------------- | -------------------- | +| None | `--parser <string>` | `parser: "<string>"` | Note: the default value was `"babylon"` until v1.13.0. +Note: the Custom parser API has been removed in v3.0.0. Use [plugins](plugins.md) instead ([how to migrate](api.md#custom-parser-api-removed)). + <a name="filepath"></a> ## File Path @@ -348,6 +394,34 @@ Note that “in tandem” doesn’t mean “at the same time”. When the two op [adoption strategy]: https://prettier.io/blog/2017/05/03/1.3.0.html#facebook-adoption-update +## Check Ignore Pragma + +_First available in v3.6.0_ + +Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file. + +Checking for these markers incurs a small upfront cost during formatting, so it's not enabled by default. + +A file with the following as its first comment will **not** be formatted when `--check-ignore-pragma` is supplied: + +```js +/** + * @noprettier + */ +``` + +or + +```js +/** + * @noformat + */ +``` + +| Default | CLI Override | API Override | +| ------- | ----------------------- | --------------------------- | +| `false` | `--check-ignore-pragma` | `checkIgnorePragma: <bool>` | + ## Prose Wrap _First available in v1.8.2_ @@ -360,9 +434,9 @@ Valid options: - `"never"` - Un-wrap each block of prose into one line. - `"preserve"` - Do nothing, leave prose as-is. _First available in v1.9.0_ -| Default | CLI Override | API Override | -| ------------ | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `"preserve"` | <code>--prose-wrap <always&#124;never&#124;preserve></code> | <code>proseWrap: "<always&#124;never&#124;preserve>"</code> | +| Default | CLI Override | API Override | +| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `"preserve"` | <code>--prose-wrap \<always&#124;never&#124;preserve></code> | <code>proseWrap: "\<always&#124;never&#124;preserve>"</code> | ## HTML Whitespace Sensitivity @@ -378,9 +452,9 @@ Valid options: - `"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 | -| ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- | -| `"css"` | <code>--html-whitespace-sensitivity <css&#124;strict&#124;ignore></code> | <code>htmlWhitespaceSensitivity: "<css&#124;strict&#124;ignore>"</code> | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| `"css"` | <code>--html-whitespace-sensitivity \<css&#124;strict&#124;ignore></code> | <code>htmlWhitespaceSensitivity: "\<css&#124;strict&#124;ignore>"</code> | ## Vue files script and style tags indentation @@ -429,9 +503,9 @@ Valid options: - `"auto"` - Maintain existing line endings (mixed values within one file are normalised by looking at what’s used after the first line) -| Default | CLI Override | API Override | -| ------- | ----------------------------------------------------------- | ---------------------------------------------------------- | -| `"lf"` | <code>--end-of-line <lf&#124;crlf&#124;cr&#124;auto></code> | <code>endOfLine: "<lf&#124;crlf&#124;cr&#124;auto>"</code> | +| Default | CLI Override | API Override | +| ------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| `"lf"` | <code>--end-of-line \<lf&#124;crlf&#124;cr&#124;auto></code> | <code>endOfLine: "\<lf&#124;crlf&#124;cr&#124;auto>"</code> | Setting `end_of_line` in an [`.editorconfig` file](https://editorconfig.org/) will configure Prettier’s end of line usage, unless overridden. @@ -450,15 +524,15 @@ Valid options: - `"auto"` – Format embedded code if Prettier can automatically identify it. - `"off"` - Never automatically format embedded code. -| Default | CLI Override | API Override | -| -------- | ----------------------------------------------------------- | ---------------------------------------------------------- | -| `"auto"` | <code>--embedded-language-formatting=<off&#124;auto></code> | <code>embeddedLanguageFormatting: "<off&#124;auto>"</code> | +| Default | CLI Override | API Override | +| -------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| `"auto"` | <code>--embedded-language-formatting=\<off&#124;auto></code> | <code>embeddedLanguageFormatting: "\<off&#124;auto>"</code> | ## Single Attribute Per Line _First available in v2.6.0_ -Enforce single attribute per line in HTML, Vue and JSX. +Enforce single attribute per line in HTML, Vue, and JSX. Valid options: diff --git a/website/versioned_docs/version-stable/plugins.md b/website/versioned_docs/version-stable/plugins.md index babe3a7d65c3..e7e6c8864a7d 100644 --- a/website/versioned_docs/version-stable/plugins.md +++ b/website/versioned_docs/version-stable/plugins.md @@ -1,33 +1,31 @@ --- -id: version-stable-plugins +id: plugins title: Plugins -original_id: plugins --- Plugins are ways of adding new languages or formatting rules to Prettier. Prettier’s own implementations of all languages are expressed using the plugin API. The core `prettier` package contains JavaScript and other web-focused languages built in. For additional languages you’ll need to install a plugin. ## Using Plugins -Plugins are automatically loaded if you have them installed in the same `node_modules` directory where `prettier` is located. Plugin package names must start with `@prettier/plugin-` or `prettier-plugin-` or `@<scope>/prettier-plugin-` to be registered. +You can load plugins with: -> `<scope>` should be replaced by a name, read more about [NPM scope](https://docs.npmjs.com/misc/scope.html). - -When plugins cannot be found automatically, you can load them with: - -- The [CLI](cli.md), via `--plugin-search-dir` and `--plugin`: +- The [CLI](cli.md), via `--plugin`: ```bash - prettier --write main.foo --plugin-search-dir=./dir-with-plugins --plugin=prettier-plugin-foo + prettier --write main.foo --plugin=prettier-plugin-foo ``` - > Tip: You can set `--plugin-search-dir` or `--plugin` options multiple times. + :::tip + + You can set `--plugin` options multiple times. + + ::: -- The [API](api.md), via the `pluginSearchDirs` and `plugins` options: +- The [API](api.md), via the `plugins` options: ```js - prettier.format("code", { + await prettier.format("code", { parser: "foo", - pluginSearchDirs: ["./dir-with-plugins"], plugins: ["prettier-plugin-foo"], }); ``` @@ -36,18 +34,11 @@ When plugins cannot be found automatically, you can load them with: ```json { - "pluginSearchDirs": ["./dir-with-plugins"], "plugins": ["prettier-plugin-foo"] } ``` -`pluginSearchDirs` and `plugins` are independent and one does not require the other. - -The paths that are provided to `pluginSearchDirs` will be searched for `@prettier/plugin-*`, `prettier-plugin-*`, and `@*/prettier-plugin-*`. For instance, these can be your project directory, a `node_modules` directory, the location of global npm modules, or any arbitrary directory that contains plugins. - -Strings provided to `plugins` are ultimately passed to `require()`, so you can provide a module/package name, a path, or anything else `require()` takes. (`pluginSearchDirs` works the same way. That is, valid plugin paths that it finds are passed to `require()`.) - -To turn off plugin autoloading, use `--no-plugin-search` when using Prettier CLI or add `{ pluginSearchDirs: false }` to options in `prettier.format()` or to the config file. +Strings provided to `plugins` are ultimately passed to [`import()` expression](https://nodejs.org/api/esm.html#import-expressions), so you can provide a module/package name, a path, or anything else `import()` takes. ## Official Plugins @@ -62,25 +53,28 @@ To turn off plugin autoloading, use `--no-plugin-search` when using Prettier CLI - [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro) by [**@withastro contributors**](https://github.com/withastro/prettier-plugin-astro/graphs/contributors) - [`prettier-plugin-elm`](https://github.com/gicentre/prettier-plugin-elm) by [**@giCentre**](https://github.com/gicentre) - [`prettier-plugin-erb`](https://github.com/adamzapasnik/prettier-plugin-erb) by [**@adamzapasnik**](https://github.com/adamzapasnik) +- [`prettier-plugin-gherkin`](https://github.com/mapado/prettier-plugin-gherkin) by [**@mapado**](https://github.com/mapado) - [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl) by [**@NaridaL**](https://github.com/NaridaL) - [`prettier-plugin-go-template`](https://github.com/NiklasPor/prettier-plugin-go-template) by [**@NiklasPor**](https://github.com/NiklasPor) - [`prettier-plugin-java`](https://github.com/jhipster/prettier-java) by [**@JHipster**](https://github.com/jhipster) +- [`prettier-plugin-jinja-template`](https://github.com/davidodenwald/prettier-plugin-jinja-template) by [**@davidodenwald**](https://github.com/davidodenwald) - [`prettier-plugin-jsonata`](https://github.com/Stedi/prettier-plugin-jsonata) by [**@Stedi**](https://github.com/Stedi) - [`prettier-plugin-kotlin`](https://github.com/Angry-Potato/prettier-plugin-kotlin) by [**@Angry-Potato**](https://github.com/Angry-Potato) - [`prettier-plugin-motoko`](https://github.com/dfinity/prettier-plugin-motoko) by [**@dfinity**](https://github.com/dfinity) - [`prettier-plugin-nginx`](https://github.com/joedeandev/prettier-plugin-nginx) by [**@joedeandev**](https://github.com/joedeandev) - [`prettier-plugin-prisma`](https://github.com/umidbekk/prettier-plugin-prisma) by [**@umidbekk**](https://github.com/umidbekk) - [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) by [**@eemeli**](https://github.com/eemeli) +- [`prettier-plugin-rust`](https://github.com/jinxdash/prettier-plugin-rust) by [**@jinxdash**](https://github.com/jinxdash) - [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh) by [**@JounQin**](https://github.com/JounQin) - [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql) by [**@JounQin**](https://github.com/JounQin) - [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) by [**@nene**](https://github.com/nene) - [`prettier-plugin-solidity`](https://github.com/prettier-solidity/prettier-plugin-solidity) by [**@mattiaerre**](https://github.com/mattiaerre) -- [`prettier-plugin-svelte`](https://github.com/UnwrittenFun/prettier-plugin-svelte) by [**@UnwrittenFun**](https://github.com/UnwrittenFun) -- [`prettier-plugin-toml`](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml) by [**@bd82**](https://github.com/bd82) +- [`prettier-plugin-svelte`](https://github.com/sveltejs/prettier-plugin-svelte) by [**@sveltejs**](https://github.com/sveltejs) +- [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml) by [**@JounQin**](https://github.com/JounQin) and [**@so1ve**](https://github.com/so1ve) ## Developing Plugins -Prettier plugins are regular JavaScript modules with five exports: +Prettier plugins are regular JavaScript modules with the following five exports or default export with the following properties: - `languages` - `parsers` @@ -116,9 +110,10 @@ The key must match the name in the `parsers` array from `languages`. The value c export const parsers = { "dance-parse": { parse, - // The name of the AST that + // The name of the AST that the parser produces. astFormat: "dance-ast", hasPragma, + hasIgnorePragma, locStart, locEnd, preprocess, @@ -129,7 +124,7 @@ export const parsers = { The signature of the `parse` function is: ```ts -function parse(text: string, parsers: object, options: object): AST; +function parse(text: string, options: object): Promise<AST> | AST; ``` The location extraction functions (`locStart` and `locEnd`) return the starting and ending locations of a given AST node: @@ -144,6 +139,12 @@ _(Optional)_ The pragma detection function (`hasPragma`) should return if the te function hasPragma(text: string): boolean; ``` +_(Optional)_ The "ignore pragma" detection function (`hasIgnorePragma`) should return if the text contains a pragma indicating the text should not be formatted. + +```ts +function hasIgnorePragma(text: string): boolean; +``` + _(Optional)_ The preprocess function can process the input text before passing into `parse` function. ```ts @@ -162,6 +163,7 @@ export const printers = { print, embed, preprocess, + getVisitorKeys, insertPragma, canAttachComment, isBlockComment, @@ -181,14 +183,19 @@ export const printers = { Prettier uses an intermediate representation, called a Doc, which Prettier then turns into a string (based on options like `printWidth`). A _printer_'s job is to take the AST generated by `parsers[<parser name>].parse` and return a Doc. A Doc is constructed using [builder commands](https://github.com/prettier/prettier/blob/main/commands.md): ```js -const { join, line, ifBreak, group } = require("prettier").doc.builders; +import { doc } from "prettier"; + +const { join, line, ifBreak, group } = doc.builders; ``` -The printing process works as follows: +The printing process consists of the following steps: -1. `preprocess(ast: AST, options: object): AST`, if available, is called. It is passed the AST from the _parser_. The AST returned by `preprocess` will be used by Prettier. If `preprocess` is not defined, the AST returned from the _parser_ will be used. -2. Comments are attached to the AST (see _Handling comments in a printer_ for details). -3. A Doc is recursively constructed from the AST. i) `embed(path: AstPath, print, textToDoc, options: object): Doc | null` is called on each AST node. If `embed` returns a Doc, that Doc is used. ii) If `embed` is undefined or returns a falsy value, `print(path: AstPath, options: object, print): Doc` is called on each AST node. +1. **AST preprocessing** (optional). See [`preprocess`](#optional-preprocess). +2. **Comment attachment** (optional). See [Handling comments in a printer](#handling-comments-in-a-printer). +3. **Processing embedded languages** (optional). The [`embed`](#optional-embed) method, if defined, is called for each node, depth-first. While, for performance reasons, the recursion itself is synchronous, `embed` may return asynchronous functions that can call other parsers and printers to compose docs for embedded syntaxes like CSS-in-JS. These returned functions are queued up and sequentially executed before the next step. +4. **Recursive printing**. A doc is recursively constructed from the AST. Starting from the root node: + - If, from the step 3, there is an embedded language doc associated with the current node, this doc is used. + - Otherwise, the `print(path, options, print): Doc` method is called. It composes a doc for the current node, often by printing child nodes using the `print` callback. #### `print` @@ -200,25 +207,25 @@ function print( path: AstPath, options: object, // Recursively print a child node - print: (selector?: string | number | Array<string | number> | AstPath) => Doc + print: (selector?: string | number | Array<string | number> | AstPath) => Doc, ): Doc; ``` The `print` function is passed the following parameters: -- **`path`**: An object, which can be used to access nodes in the AST. It’s a stack-like data structure that maintains the current state of the recursion. It is called “path” because it represents the path to the current node from the root of the AST. The current node is returned by `path.getValue()`. +- **`path`**: An object, which can be used to access nodes in the AST. It’s a stack-like data structure that maintains the current state of the recursion. It is called “path” because it represents the path to the current node from the root of the AST. The current node is returned by `path.node`. - **`options`**: A persistent object, which contains global options and which a plugin may mutate to store contextual data. - **`print`**: A callback for printing sub-nodes. This function contains the core printing logic that consists of steps whose implementation is provided by plugins. In particular, it calls the printer’s `print` function and passes itself to it. Thus, the two `print` functions – the one from the core and the one from the plugin – call each other while descending down the AST recursively. Here’s a simplified example to give an idea of what a typical implementation of `print` looks like: ```js -const { - builders: { group, indent, join, line, softline }, -} = require("prettier").doc; +import { doc } from "prettier"; + +const { group, indent, join, line, softline } = doc.builders; function print(path, options, print) { - const node = path.getValue(); + const node = path.node; switch (node.type) { case "list": @@ -249,42 +256,112 @@ Check out [prettier-python's printer](https://github.com/prettier/prettier-pytho #### (optional) `embed` -The `embed` function is called when the plugin needs to print one language inside another. Examples of this are printing CSS-in-JS or fenced code blocks in Markdown. Its signature is: +A printer can have the `embed` method to print one language inside another. Examples of this are printing CSS-in-JS or fenced code blocks in Markdown. The signature is: ```ts function embed( // Path to the current AST node path: AstPath, - // Print a node with the current printer - print: (selector?: string | number | Array<string | number> | AstPath) => Doc, - // Parse and print some text using a different parser. - // You should set `options.parser` to specify which parser to use. - textToDoc: (text: string, options: object) => Doc, // Current options - options: object -): Doc | null; + options: Options, +): + | (( + // Parses and prints the passed text using a different parser. + // You should set `options.parser` to specify which parser to use. + textToDoc: (text: string, options: Options) => Promise<Doc>, + // Prints the current node or its descendant node with the current printer + print: ( + selector?: string | number | Array<string | number> | AstPath, + ) => Doc, + // The following two arguments are passed for convenience. + // They're the same `path` and `options` that are passed to `embed`. + path: AstPath, + options: Options, + ) => Promise<Doc | undefined> | Doc | undefined) + | Doc + | undefined; ``` -The `embed` function acts like the `print` function, except that it is passed an additional `textToDoc` function, which can be used to render a doc using a different plugin. The `embed` function returns a Doc or a falsy value. If a falsy value is returned, the `print` function is called with the current `path`. If a Doc is returned, that Doc is used in printing and the `print` function is not called. +The `embed` method is similar to the `print` method in that it maps AST nodes to docs, but unlike `print`, it has power to do async work by returning an async function. That function's first parameter, the `textToDoc` async function, can be used to render a doc using a different plugin. + +If a function returned from `embed` returns a doc or a promise that resolves to a doc, that doc will be used in printing, and the `print` method won’t be called for this node. It's also possible and, in rare situations, might be convenient to return a doc synchronously directly from `embed`, however `textToDoc` and the `print` callback aren’t available at that case. Return a function to get them. -For example, a plugin that had nodes with embedded JavaScript might have the following `embed` function: +If `embed` returns `undefined`, or if a function it returned returns `undefined` or a promise that resolves to `undefined`, the node will be printed normally with the `print` method. Same will happen if a returned function throws an error or returns a promise that rejects (e.g., if a parsing error has happened). Set the `PRETTIER_DEBUG` environment variable to a non-empty value if you want Prettier to rethrow these errors. + +For example, a plugin that has nodes with embedded JavaScript might have the following `embed` method: ```js -function embed(path, print, textToDoc, options) { - const node = path.getValue(); +function embed(path, options) { + const node = path.node; if (node.type === "javascript") { - return textToDoc(node.javaScriptText, { ...options, parser: "babel" }); + return async (textToDoc) => { + return [ + "<script>", + hardline, + await textToDoc(node.javaScriptCode, { parser: "babel" }), + hardline, + "</script>", + ]; + }; } - return false; } ``` +If the [`--embedded-language-formatting`](options.md#embedded-language-formatting) option is set to `off`, the embedding step is entirely skipped, `embed` isn’t called, and all nodes are printed with the `print` method. + #### (optional) `preprocess` -The preprocess function can process the AST from parser before passing into `print` function. +The `preprocess` method can process the AST from the parser before passing it into the `print` method. ```ts -function preprocess(ast: AST, options: object): AST; +function preprocess(ast: AST, options: Options): AST | Promise<AST>; +``` + +#### (optional) `getVisitorKeys` + +This property might come in handy if the plugin uses comment attachment or embedded languages. These features traverse the AST iterating through all the own enumerable properties of each node starting from the root. If the AST has [cycles](<https://en.wikipedia.org/wiki/Cycle_(graph_theory)>), such a traverse ends up in an infinite loop. Also, nodes might contain non-node objects (e.g., location data), iterating through which is a waste of resources. To solve these issues, the printer can define a function to return property names that should be traversed. + +Its signature is: + +```ts +function getVisitorKeys(node, nonTraversableKeys: Set<string>): string[]; +``` + +The default `getVisitorKeys`: + +```js +function getVisitorKeys(node, nonTraversableKeys) { + return Object.keys(node).filter((key) => !nonTraversableKeys.has(key)); +} +``` + +The second argument `nonTraversableKeys` is a set of common keys and keys that prettier used internal. + +If you have full list of visitor keys + +```js +const visitorKeys = { + Program: ["body"], + Identifier: [], + // ... +}; + +function getVisitorKeys(node /* , nonTraversableKeys*/) { + // Return `[]` for unknown node to prevent Prettier fallback to use `Object.keys()` + return visitorKeys[node.type] ?? []; +} +``` + +If you only need exclude a small set of keys + +```js +const ignoredKeys = new Set(["prev", "next", "range"]); + +function getVisitorKeys(node, nonTraversableKeys) { + return Object.keys(node).filter( + (key) => !nonTraversableKeys.has(key) && !ignoredKeys.has(key), + ); +} ``` #### (optional) `insertPragma` @@ -310,7 +387,7 @@ function getCommentChildNodes( // The node whose children should be returned. node: AST, // Current options - options: object + options: object, ): AST[] | undefined; ``` @@ -325,7 +402,7 @@ function printComment( // Path to the current comment node commentPath: AstPath, // Current options - options: object + options: object, ): Doc; ``` @@ -356,18 +433,18 @@ Returns whether or not the AST node is a block comment. The `handleComments` object contains three optional functions, each with signature ```ts -function( - // The AST node corresponding to the comment - comment: AST, - // The full source code text - text: string, - // The global options object - options: object, - // The AST - ast: AST, - // Whether this comment is the last comment - isLastComment: boolean -): boolean +( + // The AST node corresponding to the comment + comment: AST, + // The full source code text + text: string, + // The global options object + options: object, + // The AST + ast: AST, + // Whether this comment is the last comment + isLastComment: boolean, +) => boolean; ``` These functions are used to override Prettier's default comment attachment algorithm. `ownLine`/`endOfLine`/`remaining` is expected to either manually attach a comment to a node and return `true`, or return `false` and let Prettier attach the comment. @@ -385,7 +462,7 @@ At the time of dispatching, Prettier will have annotated each AST comment node ( The `util.addTrailingComment`/`addLeadingComment`/`addDanglingComment` functions can be used to manually attach a comment to an AST node. An example `ownLine` function that ensures a comment does not follow a "punctuation" node (made up for demonstration purposes) might look like: ```js -const { util } = require("prettier"); +import { util } from "prettier"; function ownLine(comment, text, options, ast, isLastComment) { const { precedingNode } = comment; @@ -412,54 +489,142 @@ The `--debug-print-comments` CLI flag can help with debugging comment attachment Example: ```js -options: { - openingBraceNewLine: { - type: "boolean", - category: "Global", - default: true, - description: "Move open brace for code blocks onto new line." - } -} +export default { + // ... plugin implementation + options: { + openingBraceNewLine: { + type: "boolean", + category: "Global", + default: true, + description: "Move open brace for code blocks onto new line.", + }, + }, +}; ``` ### `defaultOptions` If your plugin requires different default values for some of Prettier’s core options, you can specify them in `defaultOptions`: -``` -defaultOptions: { - tabWidth: 4 -} +```js +export default { + // ... plugin implementation + defaultOptions: { + tabWidth: 4, + }, +}; ``` ### Utility functions A `util` module from Prettier core is considered a private API and is not meant to be consumed by plugins. Instead, the `util-shared` module provides the following limited set of utility functions for plugins: -<!-- prettier-ignore --> ```ts type Quote = '"' | "'"; type SkipOptions = { backwards?: boolean }; -function getMaxContinuousCount(str: string, target: string): number; + +function getMaxContinuousCount(text: string, searchString: string): number; + function getStringWidth(text: string): number; -function getAlignmentSize(value: string, tabWidth: number, startIndex?: number): number; + +function getAlignmentSize( + text: string, + tabWidth: number, + startIndex?: number, +): number; + function getIndentSize(value: string, tabWidth: number): number; -function skip(chars: string | RegExp): (text: string, index: number | false, opts?: SkipOptions) => number | false; -function skipWhitespace(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipSpaces(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipToLineEnd(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipEverythingButNewLine(text: string, index: number | false, opts?: SkipOptions): number | false; -function skipInlineComment(text: string, index: number | false): number | false; -function skipTrailingComment(text: string, index: number | false): number | false; -function skipNewline(text: string, index: number | false, opts?: SkipOptions): number | false; -function hasNewline(text: string, index: number, opts?: SkipOptions): boolean; -function hasNewlineInRange(text: string, start: number, end: number): boolean; -function hasSpaces(text: string, index: number, opts?: SkipOptions): boolean; -function makeString(rawContent: string, enclosingQuote: Quote, unescapeUnnecessaryEscapes?: boolean): string; -function getNextNonSpaceNonCommentCharacterIndex<N>(text: string, node: N, locEnd: (node: N) => number): number | false; -function isNextLineEmptyAfterIndex(text: string, index: number): boolean; -function isNextLineEmpty<N>(text: string, node: N, locEnd: (node: N) => number): boolean; -function isPreviousLineEmpty<N>(text: string, node: N, locStart: (node: N) => number): boolean; + +function skip( + characters: string | RegExp, +): ( + text: string, + startIndex: number | false, + options?: SkipOptions, +) => number | false; + +function skipWhitespace( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipSpaces( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipToLineEnd( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipEverythingButNewLine( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function skipInlineComment( + text: string, + startIndex: number | false, +): number | false; + +function skipTrailingComment( + text: string, + startIndex: number | false, +): number | false; + +function skipNewline( + text: string, + startIndex: number | false, + options?: SkipOptions, +): number | false; + +function hasNewline( + text: string, + startIndex: number, + options?: SkipOptions, +): boolean; + +function hasNewlineInRange( + text: string, + startIndex: number, + startIndex: number, +): boolean; + +function hasSpaces( + text: string, + startIndex: number, + options?: SkipOptions, +): boolean; + +function getPreferredQuote( + text: string, + preferredQuoteOrPreferSingleQuote: Quote | boolean, +): Quote; + +function makeString( + rawText: string, + enclosingQuote: Quote, + unescapeUnnecessaryEscapes?: boolean, +): string; + +function getNextNonSpaceNonCommentCharacter( + text: string, + startIndex: number, +): string; + +function getNextNonSpaceNonCommentCharacterIndex( + text: string, + startIndex: number, +): number | false; + +function isNextLineEmpty(text: string, startIndex: number): boolean; + +function isPreviousLineEmpty(text: string, startIndex: number): boolean; ``` ### Tutorials @@ -471,9 +636,9 @@ function isPreviousLineEmpty<N>(text: string, node: N, locStart: (node: N) => nu Since plugins can be resolved using relative paths, when working on one you can do: ```js -const prettier = require("prettier"); +import * as prettier from "prettier"; const code = "(add 1 2)"; -prettier.format(code, { +await prettier.format(code, { parser: "lisp", plugins: ["."], }); diff --git a/website/versioned_docs/version-stable/precommit.md b/website/versioned_docs/version-stable/precommit.md index ef04f80c0b2f..dcaaf92c4e85 100644 --- a/website/versioned_docs/version-stable/precommit.md +++ b/website/versioned_docs/version-stable/precommit.md @@ -1,9 +1,11 @@ --- -id: version-stable-precommit +id: precommit title: Pre-commit Hook -original_id: precommit --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + You can use Prettier with a pre-commit tool. This can re-format your files that are marked as “staged” via `git add` before you commit. ## Option 1. [lint-staged](https://github.com/okonet/lint-staged) @@ -20,49 +22,54 @@ This will install [husky](https://github.com/typicode/husky) and [lint-staged](h Read more at the [lint-staged](https://github.com/okonet/lint-staged#configuration) repo. -## Option 2. [pretty-quick](https://github.com/azz/pretty-quick) +## Option 2. [pretty-quick](https://github.com/prettier/pretty-quick) **Use Case:** Great for when you want an entire file formatting on your changed/staged files. -Install it along with [husky](https://github.com/typicode/husky): +Install it along with [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks): -<!--DOCUSAURUS_CODE_TABS--> -<!--npm--> +<Tabs groupId="package-manager"> +<TabItem value="npm"> ```bash -npx husky-init -npm install --save-dev pretty-quick -npx husky set .husky/pre-commit "npx pretty-quick --staged" +npm install --save-dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "npx pretty-quick --staged"\n}\n' > .simple-git-hooks.json +npx simple-git-hooks ``` -<!--yarn--> +</TabItem> +<TabItem value="yarn"> ```bash -npx husky-init # add --yarn2 for Yarn 2 -yarn add --dev pretty-quick -yarn husky set .husky/pre-commit "npx pretty-quick --staged" +yarn add --dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "yarn pretty-quick --staged"\n}\n' > .simple-git-hooks.json +yarn simple-git-hooks ``` -<!--END_DOCUSAURUS_CODE_TABS--> - -Read more at the [pretty-quick](https://github.com/azz/pretty-quick) repo. +</TabItem> +<TabItem value="pnpm"> -## Option 3. [pre-commit](https://github.com/pre-commit/pre-commit) - -**Use Case:** Great when working with multi-language projects. +```bash +pnpm add --save-dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "pnpm pretty-quick --staged"\n}\n' > .simple-git-hooks.json +pnpm simple-git-hooks +``` -Copy the following config into your `.pre-commit-config.yaml` file: +</TabItem> +<TabItem value="bun"> -```yaml -- repo: https://github.com/pre-commit/mirrors-prettier - rev: "" # Use the sha or tag you want to point at - hooks: - - id: prettier +```bash +bun add --dev simple-git-hooks pretty-quick +echo '{\n "pre-commit": "bun pretty-quick --staged"\n}\n' > .simple-git-hooks.json +bun simple-git-hooks ``` -Read more at [mirror of prettier package for pre-commit](https://github.com/pre-commit/mirrors-prettier) and the [pre-commit](https://pre-commit.com) website. +</TabItem> +</Tabs> -## Option 4. [Husky.Net](https://github.com/alirezanet/Husky.Net) +Read more at the [pretty-quick](https://github.com/prettier/pretty-quick) repo. + +## Option 3. [Husky.Net](https://github.com/alirezanet/Husky.Net) **Use Case:** A dotnet solution to use Prettier along with other code quality tools (e.g. dotnet-format, ESLint, Stylelint, etc.). It supports multiple file states (staged - last-commit, git-files etc.) @@ -83,7 +90,7 @@ after installation you can add prettier task to the `task-runner.json`. } ``` -## Option 5. [git-format-staged](https://github.com/hallettj/git-format-staged) +## Option 4. [git-format-staged](https://github.com/hallettj/git-format-staged) **Use Case:** Great for when you want to format partially-staged files, and other options do not provide a good fit for your project. @@ -96,30 +103,50 @@ Git-format-staged is used to run any formatter that can accept file content via Git-format-staged requires Python v3 or v2.7. Python is usually pre-installed on Linux and macOS, but not on Windows. Use git-format-staged with [husky](https://github.com/typicode/husky): -<!--DOCUSAURUS_CODE_TABS--> -<!--npm--> +<Tabs groupId="package-manager"> +<TabItem value="npm"> ```bash -npx husky-init +npx husky init npm install --save-dev git-format-staged -npx husky set .husky/pre-commit "git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' ." +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" ``` -<!--yarn--> +</TabItem> +<TabItem value="yarn"> ```bash -npx husky-init # add --yarn2 for Yarn 2 +yarn husky init yarn add --dev git-format-staged -yarn husky set .husky/pre-commit "git-format-staged -f 'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"' ." +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" +``` + +</TabItem> +<TabItem value="pnpm"> + +```bash +pnpm exec husky init +pnpm add --save-dev git-format-staged +node --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" +``` + +</TabItem> +<TabItem value="bun"> + +```bash +bunx husky init +bun add --dev git-format-staged +bun --eval "fs.writeFileSync('.husky/pre-commit', 'git-format-staged -f \'prettier --ignore-unknown --stdin --stdin-filepath \"{}\"\' .\n')" ``` -<!--END_DOCUSAURUS_CODE_TABS--> +</TabItem> +</Tabs> Add or remove file extensions to suit your project. Note that regardless of which extensions you list formatting will respect any `.prettierignore` files in your project. To read about how git-format-staged works see [Automatic Code Formatting for Partially-Staged Files](https://www.olioapps.com/blog/automatic-code-formatting/). -## Option 6. Shell script +## Option 5. Shell script Alternately you can save this script as `.git/hooks/pre-commit` and give it execute permission: diff --git a/website/versioned_docs/version-stable/rationale.md b/website/versioned_docs/version-stable/rationale.md index 83967597e1dd..8884cb0a44e1 100644 --- a/website/versioned_docs/version-stable/rationale.md +++ b/website/versioned_docs/version-stable/rationale.md @@ -1,7 +1,6 @@ --- -id: version-stable-rationale +id: rationale title: Rationale -original_id: rationale --- Prettier is an opinionated code formatter. This document explains some of its choices. @@ -14,9 +13,9 @@ The first requirement of Prettier is to output valid code that has the exact sam ### Strings -Double or single quotes? Prettier chooses the one which results in the fewest number of escapes. `"It's gettin' better!"`, not `'It\'s gettin\' better!'`. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes (but that can be changed via the [singleQuote](options.html#quotes) option). +Double or single quotes? Prettier chooses the one which results in the fewest number of escapes. `"It's gettin' better!"`, not `'It\'s gettin\' better!'`. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes (but that can be changed via the [singleQuote](/docs/options#quotes) option). -JSX has its own option for quotes: [jsxSingleQuote](options.html#jsx-quotes). +JSX has its own option for quotes: [jsxSingleQuote](/docs/options#jsx-quotes). JSX takes its roots from HTML, where the dominant use of quotes for attributes is double quotes. Browser developer tools also follow this convention by always displaying HTML with double quotes, even if the source code uses single quotes. A separate option allows using single quotes for JS and double quotes for "HTML" (JSX). Prettier maintains the way your string is escaped. For example, `"🙂"` won’t be formatted into `"\uD83D\uDE42"` and vice versa. @@ -30,9 +29,11 @@ It turns out that empty lines are very hard to automatically generate. The appro ### Multi-line objects -By default, Prettier’s printing algorithm prints expressions on a single line if they fit. Objects are used for a lot of different things in JavaScript, though, and sometimes it really helps readability if they stay multiline. See [object lists], [nested configs], [stylesheets] and [keyed methods], for example. We haven’t been able to find a good rule for all those cases, so Prettier instead keeps objects multiline if there’s a newline between the `{` and the first key in the original source code. A consequence of this is that long singleline objects are automatically expanded, but short multiline objects are never collapsed. +By default, Prettier’s printing algorithm prints expressions on a single line if they fit. Objects are used for a lot of different things in JavaScript, though, and sometimes it really helps readability if they stay multiline. See [object lists], [nested configs], [stylesheets] and [keyed methods], for example. We haven’t been able to find a good rule for all those cases, so by default Prettier keeps objects multi-line if there’s a newline between the `{` and the first key in the original source code. Consequently, long single-line objects are automatically expanded, but short multi-line objects are never collapsed. -**Tip:** If you have a multiline object that you’d like to join up into a single line: +You can disable this conditional behavior with the [`objectWrap`](options.md#object-wrap) option. + +**Tip:** If you have a multi-line object that you’d like to join up into a single line: ```js const user = { @@ -56,7 +57,7 @@ const user = { name: "John Doe", const user = { name: "John Doe", age: 30 }; ``` -And if you’d like to go multiline again, add in a newline after `{`: +And if you’d like to go multi-line again, add in a newline after `{`: <!-- prettier-ignore --> ```js @@ -78,17 +79,19 @@ 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. +:::note[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. -```js +```ts @Component({ selector: "hero-button", template: `<button>{{ label }}</button>`, @@ -109,14 +112,14 @@ class HeroButtonComponent { There’s one exception: classes. We don’t think it ever makes sense to inline the decorators for them, so they are always moved to their own line. <!-- prettier-ignore --> -```js +```ts // Before running Prettier: @observer class OrderLine { @observable price: number = 0; } ``` -```js +```ts // After running Prettier: @observer class OrderLine { @@ -126,7 +129,7 @@ class OrderLine { Note: Prettier 1.14.x and older tried to automatically move your decorators, so if you've run an older Prettier version on your code you might need to manually join up some decorators here and there to avoid inconsistencies: -```js +```ts @observer class OrderLine { @observable price: number = 0; @@ -135,15 +138,21 @@ class OrderLine { } ``` -One final thing: TC39 has [not yet decided if decorators come before or after `export`](https://github.com/tc39/proposal-decorators/issues/69). In the meantime, Prettier supports both: +### Template literals + +Template literals can contain interpolations. Deciding whether it's appropriate to insert a linebreak within an interpolation unfortunately depends on the semantic content of the template - for example, introducing a linebreak in the middle of a natural-language sentence is usually undesirable. Since Prettier doesn't have enough information to make this decision itself, it uses a heuristic similar to that used for objects: it will only split an interpolation expression across multiple lines if there was already a linebreak within that interpolation. + +This means that a literal like the following will not be broken onto multiple lines, even if it exceeds the print width: <!-- prettier-ignore --> ```js -@decorator export class Foo {} - -export @decorator class Foo {} +`this is a long message which contains an interpolation: ${format(data)} <- like this`; ``` +If you want Prettier to split up an interpolation, you'll need to ensure there's a linebreak somewhere within the `${...}`. Otherwise it will keep everything on a single line, no matter how long it is. + +The team would prefer not to depend on the original formatting in this way, but it's the best heuristic we have at the moment. + ### Semicolons This is about using the [noSemi](options.md#semicolons) option. @@ -212,7 +221,7 @@ console.log("Running a background task")(async () => { The [printWidth](options.md#print-width) option is more of a guideline to Prettier than a hard rule. It is not the upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified print width. -There are some edge cases, such as really long string literals, regexps, comments and variable names, which cannot be broken across lines (without using code transforms which [Prettier doesn’t do](#what-prettier-is-_not_-concerned-about)). Or if you nest your code 50 levels deep your lines are of course going to be mostly indentation :) +There are some edge cases, such as really long string literals, regexps, comments and variable names, which cannot be broken across lines (without using code transforms which [Prettier doesn’t do](#what-prettier-is-not-concerned-about)). Or if you nest your code 50 levels deep your lines are of course going to be mostly indentation :) Apart from that, there are a few cases where Prettier intentionally exceeds the print width. @@ -332,6 +341,10 @@ If possible, prefer comments that operate on line ranges (e.g. `eslint-disable` Prettier is often able to recognize and format non-standard syntax such as ECMAScript early-stage proposals and Markdown syntax extensions not defined by any specification. The support for such syntax is considered best-effort and experimental. Incompatibilities may be introduced in any release and should not be viewed as breaking changes. +## Disclaimer about machine-generated files + +Some files, like `package.json` or `composer.lock`, are machine-generated and regularly updated by the package manager. If Prettier were to use the same JSON formatting rules as with other files, it would regularly conflict with these other tools. To avoid this inconvenience, Prettier will use a formatter based on `JSON.stringify` on such files instead. You may notice these differences, such as the removal of vertical whitespace, but this is an intended behavior. + ## What Prettier is _not_ concerned about Prettier only _prints_ code. It does not transform it. This is to limit the scope of Prettier. Let’s focus on the printing and do it really well! diff --git a/website/versioned_docs/version-stable/related-projects.md b/website/versioned_docs/version-stable/related-projects.md index b8f20133098d..32c1fdedfba2 100644 --- a/website/versioned_docs/version-stable/related-projects.md +++ b/website/versioned_docs/version-stable/related-projects.md @@ -1,7 +1,6 @@ --- -id: version-stable-related-projects +id: related-projects title: Related Projects -original_id: related-projects --- ## ESLint Integrations @@ -31,3 +30,4 @@ original_id: related-projects - [prettier-chrome](https://github.com/u3u/prettier-chrome) is an extension that runs Prettier in the browser - [spotless](https://github.com/diffplug/spotless) lets you run prettier from [gradle](https://github.com/diffplug/spotless/tree/main/plugin-gradle#prettier) or [maven](https://github.com/diffplug/spotless/tree/main/plugin-maven#prettier). - [csharpier](https://github.com/belav/csharpier) is a port of Prettier for C# +- [reviewdog-action-prettier](https://github.com/EPMatt/reviewdog-action-prettier) runs Prettier in GitHub Actions CI/CD workflows diff --git a/website/versioned_docs/version-stable/sharing-configurations.md b/website/versioned_docs/version-stable/sharing-configurations.md new file mode 100644 index 000000000000..50490bb29a31 --- /dev/null +++ b/website/versioned_docs/version-stable/sharing-configurations.md @@ -0,0 +1,223 @@ +--- +id: sharing-configurations +title: Sharing configurations +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +In case you have many different projects, it can be helpful to have a **shared configuration** which can be used in all of them, instead of copy-pasting the same config for every project. + +This page explains how to create, publish and consume a shareable config. + +## Creating a Shareable Config + +Sharable configs are just [npm packages](https://docs.npmjs.com/about-packages-and-modules#about-packages) that export a single [prettier config file](./configuration.md). + +Before we start, make sure you have: + +- An account for [npmjs.com](https://www.npmjs.com/) to publish the package +- Basic understating about [how to create a Node.js module](https://docs.npmjs.com/creating-node-js-modules) + +First, create a new package. We recommend creating a [scoped package](https://docs.npmjs.com/cli/v10/using-npm/scope) with the name `@username/prettier-config`. + +A minimal package should have at least two files. A `package.json` for the package configuration and an `index.js` which holds the shared prettier configuration object: + +```text +prettier-config/ +├── index.js +└── package.json +``` + +Example `package.json`: + +```json +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "prettier": ">=3.0.0" + } +} +``` + +`index.js` is where you put the shared configuration. This file just exports a [regular prettier configuration](./configuration.md) with the same syntax and same options: + +```js +const config = { + trailingComma: "es5", + tabWidth: 4, + singleQuote: true, +}; + +export default config; +``` + +An example shared configuration repository is available [here](https://github.com/azz/prettier-config). + +## Publishing a Shareable Config + +Once you are ready, you can [publish your package to npm](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages#publishing-scoped-public-packages): + +```bash +npm publish +``` + +## Using a Shareable Config + +You first need to install your published configuration, for example: + +<Tabs groupId="package-manager"> +<TabItem value="npm"> + +```bash +npm install --save-dev @username/prettier-config +``` + +</TabItem> +<TabItem value="yarn"> + +```bash +yarn add --dev @username/prettier-config +``` + +</TabItem> +<TabItem value="pnpm"> + +```bash +pnpm add --save-dev @username/prettier-config +``` + +</TabItem> +<TabItem value="bun"> + +```bash +bun add --dev @username/prettier-config +``` + +</TabItem> +</Tabs> + +Then, you can reference it in your `package.json`: + +```json +{ + "name": "my-cool-library", + "version": "1.0.0", + "prettier": "@username/prettier-config" +} +``` + +If you don’t want to use `package.json`, you can use any of the supported extensions to export a string, e.g. `.prettierrc`: + +```json +"@company/prettier-config" +``` + +### Extending a Sharable Config + +To _extend_ the configuration to overwrite some properties from the shared configuration, import the file in a `.prettierrc.mjs` file and export the modifications, e.g: + +```js +import usernamePrettierConfig from "@username/prettier-config"; + +/** + * @type {import("prettier").Config} + */ +const config = { + ...usernamePrettierConfig, + semi: false, +}; + +export default config; +``` + +## Other examples + +### Using Type Annotation in the Shared Config + +You can get type safety and autocomplete support in your shared configuration by using a `jsdoc` type annotation: + +```js +/** + * @type {import("prettier").Config} + */ +const config = { + trailingComma: "es5", + tabWidth: 4, + semi: false, + singleQuote: true, +}; + +export default config; +``` + +In order to make this work, you have to [install `prettier`](./install.md) for the project. + +After that, your `package.json` file should look like this: + +```diff +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "peerDependencies": { + "prettier": ">=3.0.0" + }, ++ "devDependencies": { ++ "prettier": "^3.3.3" ++ } +} +``` + +### Include Plugins in Shareable Configurations + +In case you want to use [plugins](./plugins.md) in your shared configuration, you need to declare those plugins in the config file's `plugin` array and as `dependencies` in `package.json`: + +```js +// index.js +const config = { + singleQuote: true, + plugins: ["prettier-plugin-xml"], +}; + +export default config; +``` + +```diff +// package.json +{ + "name": "@username/prettier-config", + "version": "1.0.0", + "description": "My personal Prettier config", + "type": "module", + "exports": "./index.js", + "license": "MIT", + "publishConfig": { + "access": "public" + }, ++ "dependencies": { ++ "prettier-plugin-xml": "3.4.1" ++ }, + "peerDependencies": { + "prettier": ">=3.0.0" + } +} +``` + +An example repository can be found [here](https://github.com/kachkaev/routine-npm-packages/tree/bc3e658f88c0b41beb118c7a1b9b91ec647f8478/packages/prettier-config) + +**Note:** You can use [`peerDependencies`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#peerdependencies) instead of [`dependencies`](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies). To learn about their differences, you can read [this blog post from Domenic Denicola about peer dependencies](https://nodejs.org/en/blog/npm/peer-dependencies) diff --git a/website/versioned_docs/version-stable/technical-details.md b/website/versioned_docs/version-stable/technical-details.md index ca5742eb1bca..249b4f39b453 100644 --- a/website/versioned_docs/version-stable/technical-details.md +++ b/website/versioned_docs/version-stable/technical-details.md @@ -1,7 +1,6 @@ --- -id: version-stable-technical-details +id: technical-details title: Technical Details -original_id: technical-details --- This printer is a fork of [recast](https://github.com/benjamn/recast)’s printer with its algorithm replaced by the one described by Wadler in "[A prettier printer](https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". There still may be leftover code from recast that needs to be cleaned up. diff --git a/website/versioned_docs/version-stable/vim.md b/website/versioned_docs/version-stable/vim.md index 18dfb76e7d07..3e3787f687f6 100644 --- a/website/versioned_docs/version-stable/vim.md +++ b/website/versioned_docs/version-stable/vim.md @@ -1,7 +1,6 @@ --- -id: version-stable-vim +id: vim title: Vim Setup -original_id: vim --- Vim users can install either [vim-prettier](https://github.com/prettier/vim-prettier), which is Prettier specific, or [Neoformat](https://github.com/sbdchd/neoformat) or [ALE](https://github.com/dense-analysis/ale) which are generalized lint/format engines with support for Prettier. diff --git a/website/versioned_docs/version-stable/watching-files.md b/website/versioned_docs/version-stable/watching-files.md index 3fc9165b5afe..b4cb93d70190 100644 --- a/website/versioned_docs/version-stable/watching-files.md +++ b/website/versioned_docs/version-stable/watching-files.md @@ -1,7 +1,6 @@ --- -id: version-stable-watching-files +id: watching-files title: Watching For Changes -original_id: watching-files --- You can have Prettier watch for changes from the command line by using [onchange](https://www.npmjs.com/package/onchange). For example: diff --git a/website/versioned_docs/version-stable/webstorm.md b/website/versioned_docs/version-stable/webstorm.md index de3ad1963776..262cad7b29d2 100644 --- a/website/versioned_docs/version-stable/webstorm.md +++ b/website/versioned_docs/version-stable/webstorm.md @@ -1,7 +1,6 @@ --- -id: version-stable-webstorm +id: webstorm title: WebStorm Setup -original_id: webstorm --- ## JetBrains IDEs (WebStorm, IntelliJ IDEA, PyCharm, etc.) @@ -14,7 +13,7 @@ Once it’s done, you can do a few things in your IDE. You can use the **Reforma You can also configure WebStorm to run Prettier on save (_Cmd+S/Ctrl+S_) or use it as the default formatter (_Opt+Cmd+L/Ctrl+Alt+L_). For this, open _Preferences / Settings | Languages & Frameworks | JavaScript | Prettier_ and tick the corresponding checkbox: **On save** and/or **On ‘Reformat Code’** action. -![Example](/docs/assets/webstorm/prettier-settings.png) +![Example](/images/webstorm/prettier-settings.png) By default, WebStorm will apply formatting to all _.js, .ts, .jsx_, and _.tsx_ files that you’ve edited in your project. To apply the formatting to other file types, or to limit formatting to files located only in specific directories, you can customize the default configuration by using [glob patterns](https://github.com/isaacs/node-glob). diff --git a/website/versioned_docs/version-stable/why-prettier.md b/website/versioned_docs/version-stable/why-prettier.md index 14e120574659..ec2f49bd1852 100644 --- a/website/versioned_docs/version-stable/why-prettier.md +++ b/website/versioned_docs/version-stable/why-prettier.md @@ -1,7 +1,6 @@ --- -id: version-stable-why-prettier +id: why-prettier title: Why Prettier? -original_id: why-prettier --- ## Building and enforcing a style guide diff --git a/website/versioned_sidebars/version-stable-sidebars.json b/website/versioned_sidebars/version-stable-sidebars.json index 719e0d077ea2..5604ffebc389 100644 --- a/website/versioned_sidebars/version-stable-sidebars.json +++ b/website/versioned_sidebars/version-stable-sidebars.json @@ -1,36 +1,29 @@ { - "version-stable-docs": { + "docs": { "About": [ - "version-stable-index", - "version-stable-why-prettier", - "version-stable-comparison", - "version-stable-option-philosophy", - "version-stable-rationale" + "index", + "why-prettier", + "comparison", + "option-philosophy", + "rationale" ], "Usage": [ - "version-stable-install", - "version-stable-ignore", - "version-stable-integrating-with-linters", - "version-stable-precommit", - "version-stable-plugins", - "version-stable-cli", - "version-stable-api", - "version-stable-browser" + "install", + "ignore", + "integrating-with-linters", + "precommit", + "plugins", + "cli", + "api", + "browser", + "ci" ], "Configuring Prettier": [ - "version-stable-options", - "version-stable-configuration" + "options", + "configuration", + "sharing-configurations" ], - "Editors": [ - "version-stable-editors", - "version-stable-webstorm", - "version-stable-vim", - "version-stable-watching-files" - ], - "Misc": [ - "version-stable-technical-details", - "version-stable-related-projects", - "version-stable-for-enterprise" - ] + "Editors": ["editors", "webstorm", "vim", "watching-files"], + "Misc": ["technical-details", "related-projects", "for-enterprise"] } } diff --git a/website/vite.config.mjs b/website/vite.config.mjs new file mode 100644 index 000000000000..07028e17ac04 --- /dev/null +++ b/website/vite.config.mjs @@ -0,0 +1,14 @@ +import react from "@vitejs/plugin-react"; +import { defineConfig } from "vite"; + +const IS_PRODUCTION = process.env.NODE_ENV === "production"; + +// https://vite.dev/config/ +export default defineConfig({ + base: IS_PRODUCTION ? "/playground/" : undefined, + publicDir: IS_PRODUCTION ? undefined : "./static/", + plugins: [react()], + build: { + outDir: "./static/playground/", + }, +}); diff --git a/website/webpack.config.js b/website/webpack.config.js deleted file mode 100644 index e15b454297aa..000000000000 --- a/website/webpack.config.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -module.exports = { - entry: { - playground: "./playground/index.js", - }, - output: { - filename: "[name].js", - path: __dirname + "/static/", - }, - module: { - rules: [ - { - test: /\.js$/, - exclude: /node_modules/, - loader: "babel-loader", - options: { - presets: ["@babel/env", "@babel/react"], - }, - }, - ], - }, - externals: { - clipboard: "ClipboardJS", - codemirror: "CodeMirror", - react: "React", - "react-dom": "ReactDOM", - }, -}; diff --git a/website/yarn.lock b/website/yarn.lock index 37965cb22838..0cbca226fa62 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1,8038 +1,13834 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/code-frame@^7.18.6", "@babel/code-frame@^7.5.5": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" - integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== - -"@babel/core@^7.12.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" - integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helpers" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.18.6", "@babel/generator@^7.18.7": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" - integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== - dependencies: - "@babel/types" "^7.18.7" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz#f14d640ed1ee9246fb33b8255f08353acfe70e6a" - integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" - integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== - dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.20.2" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" - integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz#3e35f4e04acbbf25f1b3534a657610a000543d3c" - integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.1.0" - -"@babel/helper-define-polyfill-provider@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz#52411b445bdb2e676869e5a74960d2d3826d2665" - integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== - dependencies: - "@babel/helper-compilation-targets" "^7.13.0" - "@babel/helper-module-imports" "^7.12.13" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/traverse" "^7.13.0" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" - integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" - integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== - dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" - integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" - integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.8" - "@babel/types" "^7.18.8" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" - integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== - -"@babel/helper-remap-async-to-generator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz#fa1f81acd19daee9d73de297c0308783cd3cfc23" - integrity sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-wrap-function" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/helper-replace-supers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" - integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== - dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-member-expression-to-functions" "^7.18.6" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/helper-simple-access@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" - integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-skip-transparent-expression-wrappers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz#7dff00a5320ca4cf63270e5a0eca4b268b7380d9" - integrity sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-validator-identifier@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" - integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helper-wrap-function@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz#ec44ea4ad9d8988b90c3e465ba2382f4de81a073" - integrity sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw== - dependencies: - "@babel/helper-function-name" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/helpers@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" - integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== - dependencies: - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.18.6", "@babel/parser@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" - integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz#b4e4dbc2cd1acd0133479918f7c6412961c9adb8" - integrity sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.6" - -"@babel/plugin-proposal-async-generator-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz#aedac81e6fc12bb643374656dd5f2605bf743d17" - integrity sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w== - dependencies: - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-remap-async-to-generator" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" - integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz#1016f0aa5ab383bbf8b3a85a2dcaedf6c8ee7491" - integrity sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz#3b9cac6f1ffc2aa459d111df80c12020dfc6b665" - integrity sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.12.1", "@babel/plugin-proposal-object-rest-spread@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz#ec93bba06bfb3e15ebd7da73e953d84b094d5daf" - integrity sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw== - dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.18.6" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz#46d4f2ffc20e87fad1d98bc4fa5d466366f6aa0b" - integrity sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" - integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4" - integrity sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" - integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" - integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-remap-async-to-generator" "^7.18.6" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz#b5f78318914615397d86a731ef2cc668796a726c" - integrity sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-classes@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" - integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz#5d15eb90e22e69604f3348344c91165c5395d032" - integrity sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-destructuring@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz#a98b0e42c7ffbf5eefcbcf33280430f230895c6f" - integrity sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-duplicate-keys@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz#e6c94e8cd3c9dd8a88144f7b78ae22975a7ff473" - integrity sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-function-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz#6a7e4ae2893d336fd1b8f64c9f92276391d0f1b4" - integrity sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA== - dependencies: - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz#9d6af353b5209df72960baf4492722d56f39a205" - integrity sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz#8c91f8c5115d2202f277549848874027d7172d21" - integrity sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-commonjs@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" - integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-systemjs@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz#026511b7657d63bf5d4cf2fd4aeb963139914a54" - integrity sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g== - dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-identifier" "^7.18.6" - babel-plugin-dynamic-import-node "^2.3.3" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz#c89bfbc7cc6805d692f3a49bc5fc1b630007246d" - integrity sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-parameters@^7.18.6": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" - integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-display-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" - integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" - integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz#2721e96d31df96e3b7ad48ff446995d26bc028ff" - integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/plugin-transform-react-pure-annotations@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" - integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" - integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - regenerator-transform "^0.15.0" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz#82b080241965f1689f0a60ecc6f1f6575dbdb9d6" - integrity sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz#b763f4dc9d11a7cce58cf9a490d82e80547db9c2" - integrity sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-typeof-symbol@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz#486bb39d5a18047358e0d04dc0d2f322f0b92e92" - integrity sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-unicode-escapes@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz#0d01fb7fb2243ae1c033f65f6e3b4be78db75f27" - integrity sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/polyfill@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" - integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== - dependencies: - core-js "^2.6.5" - regenerator-runtime "^0.13.4" - -"@babel/preset-env@^7.12.1": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.6.tgz#953422e98a5f66bc56cd0b9074eaea127ec86ace" - integrity sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw== - dependencies: - "@babel/compat-data" "^7.18.6" - "@babel/helper-compilation-targets" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.6" - "@babel/plugin-proposal-async-generator-functions" "^7.18.6" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.6" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.6" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.18.6" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.6" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.18.6" - "@babel/plugin-transform-classes" "^7.18.6" - "@babel/plugin-transform-computed-properties" "^7.18.6" - "@babel/plugin-transform-destructuring" "^7.18.6" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.6" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.6" - "@babel/plugin-transform-function-name" "^7.18.6" - "@babel/plugin-transform-literals" "^7.18.6" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.18.6" - "@babel/plugin-transform-modules-commonjs" "^7.18.6" - "@babel/plugin-transform-modules-systemjs" "^7.18.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.18.6" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.18.6" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.18.6" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.6" - "@babel/plugin-transform-typeof-symbol" "^7.18.6" - "@babel/plugin-transform-unicode-escapes" "^7.18.6" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.6" - babel-plugin-polyfill-corejs2 "^0.3.1" - babel-plugin-polyfill-corejs3 "^0.5.2" - babel-plugin-polyfill-regenerator "^0.3.1" - core-js-compat "^3.22.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/preset-react@7.18.6", "@babel/preset-react@^7.12.5": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" - integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-react-display-name" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.18.6" - "@babel/plugin-transform-react-jsx-development" "^7.18.6" - "@babel/plugin-transform-react-pure-annotations" "^7.18.6" - -"@babel/register@^7.12.1": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.6.tgz#48a4520f1b2a7d7ac861e8148caeb0cefe6c59db" - integrity sha512-tkYtONzaO8rQubZzpBnvZPFcHgh8D9F55IjOsYton4X2IBoyRn2ZSWQqySTZnUn2guZbxbQiAB27hJEbvXamhQ== - dependencies: - clone-deep "^4.0.1" - find-cache-dir "^2.0.0" - make-dir "^2.1.0" - pirates "^4.0.5" - source-map-support "^0.5.16" - -"@babel/runtime@^7.8.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" - integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" - integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/traverse@^7.12.5", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" - integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.7" - "@babel/helper-environment-visitor" "^7.18.6" - "@babel/helper-function-name" "^7.18.6" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.8" - "@babel/types" "^7.18.8" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.12.6", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8", "@babel/types@^7.4.4": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" - integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - to-fast-properties "^2.0.0" - -"@discoveryjs/json-ext@^0.5.0": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@mrmlnc/readdir-enhanced@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" - integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== - dependencies: - call-me-maybe "^1.0.1" - glob-to-regexp "^0.3.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.stat@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" - integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@sandhose/prettier-animated-logo@1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@sandhose/prettier-animated-logo/-/prettier-animated-logo-1.0.3.tgz#45f34ca71bbf49826042c165236e6b7cb24f8c3f" - integrity sha512-lJNxGBkwfqfAhM8ES89RuQtogjDokapE852runPIxisRJE9i0OMABAFRd/9rIPRNS0+ZZG5h5MKAZmI18h/2HQ== - dependencies: - react "^16.2.0" - react-dom "^16.2.0" - -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - -"@types/cheerio@^0.22.8": - version "0.22.31" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.31.tgz#b8538100653d6bb1b08a1e46dec75b4f2a5d5eb6" - integrity sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.4.5" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.5.tgz#acdfb7dd36b91cc5d812d7c093811a8f3d9b31e4" - integrity sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/node@*": - version "18.0.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.4.tgz#48aedbf35efb3af1248e4cd4d792c730290cd5d6" - integrity sha512-M0+G6V0Y4YV8cqzHssZpaNCqvYwlCiulmm0PwpNLF55r/+cT8Ol42CHRU1SEaYFH2rTwiiE1aYg/2g2rrtGdPA== - -"@types/q@^1.5.1": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" - integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ== - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== - -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" - integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== - -"@webpack-cli/info@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" - integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== - dependencies: - envinfo "^7.7.3" - -"@webpack-cli/serve@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" - integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn@^8.5.0, acorn@^8.7.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" - integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== - -address@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.0.tgz#d352a62c92fee90f89a693eccd2a8b2139ab02d9" - integrity sha512-tNEZYz5G/zYunxFm7sfhAxkXEuLj3K6BKwv6ZURlsF6yiUQ65z0Q2wZW9L5cPUl9ocofGvXOdFYbFHp0+6MOig== - -airbnb-prop-types@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz#b96274cefa1abb14f623f804173ee97c13971dc2" - integrity sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg== - dependencies: - array.prototype.find "^2.1.1" - function.prototype.name "^1.1.2" - is-regex "^1.1.0" - object-is "^1.1.2" - object.assign "^4.1.0" - object.entries "^1.1.2" - prop-types "^15.7.2" - prop-types-exact "^1.2.0" - react-is "^16.13.1" - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -alphanum-sort@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - integrity sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ== - -ansi-red@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" - integrity sha512-ewaIr5y+9CUTGFwZfpECUbFlGcC0GCw1oqR9RI6h1gQCd9Aj2GxSckCnPsVJnmfMZbwFYE+leZGASgkWl06Jow== - dependencies: - ansi-wrap "0.1.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - -ansi-regex@^5.0.0, ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-wrap@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw== - -arch@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -archive-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" - integrity sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA== - dependencies: - file-type "^4.2.0" - -argparse@^1.0.10, argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - 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" - integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw== - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - integrity sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng== - dependencies: - array-uniq "^1.0.1" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== - -array.prototype.filter@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz#20688792acdb97a09488eaaee9eebbf3966aae21" - integrity sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -array.prototype.find@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.2.0.tgz#153b8a28ad8965cd86d3117b07e6596af6f2880d" - integrity sha512-sn40qmUiLYAcRb/1HsIQjTTZ1kCy8II8VtZJpMn2Aoen9twULhbWXisfh3HimGqMlHGUul0/TfKCnXg42LuPpQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flat@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" - integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-shim-unscopables "^1.0.0" - -array.prototype.reduce@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.4.tgz#8167e80089f78bff70a99e20bd4201d4663b0a6f" - integrity sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== - -async@^2.6.2: - version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autolinker@^3.11.0: - version "3.15.0" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-3.15.0.tgz#03956088648f236642a5783612f9ca16adbbed38" - integrity sha512-N/5Dk5AZnqL9k6kkHdFIGLm/0/rRuSnJwqYYhLCJjU7ZtiaJwCBzNTvjzy1zzJADngv/wvtHYcrPHytPnASeFA== - dependencies: - tslib "^2.3.0" - -autolinker@~0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" - integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== - dependencies: - gulp-header "^1.7.1" - -autoprefixer@^9.7.5: - version "9.8.8" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a" - integrity sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA== - dependencies: - browserslist "^4.12.0" - caniuse-lite "^1.0.30001109" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - picocolors "^0.2.1" - postcss "^7.0.32" - postcss-value-parser "^4.1.0" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -babel-loader@8.2.5: - version "8.2.5" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" - integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== - dependencies: - find-cache-dir "^3.3.1" - loader-utils "^2.0.0" - make-dir "^3.1.0" - schema-utils "^2.6.5" - -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - -babel-plugin-polyfill-corejs2@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz#440f1b70ccfaabc6b676d196239b138f8a2cfba5" - integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== - dependencies: - "@babel/compat-data" "^7.13.11" - "@babel/helper-define-polyfill-provider" "^0.3.1" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz#aabe4b2fa04a6e038b688c5e55d44e78cd3a5f72" - integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.1" - core-js-compat "^3.21.0" - -babel-plugin-polyfill-regenerator@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" - integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.1" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -big-integer@^1.6.17: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bin-build@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" - integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== - dependencies: - decompress "^4.0.0" - download "^6.2.2" - execa "^0.7.0" - p-map-series "^1.0.0" - tempfile "^2.0.0" - -bin-check@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-4.1.0.tgz#fc495970bdc88bb1d5a35fc17e65c4a149fc4a49" - integrity sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA== - dependencies: - execa "^0.7.0" - executable "^4.1.0" - -bin-version-check@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-4.0.0.tgz#7d819c62496991f80d893e6e02a3032361608f71" - integrity sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ== - dependencies: - bin-version "^3.0.0" - semver "^5.6.0" - semver-truncate "^1.1.2" - -bin-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-3.1.0.tgz#5b09eb280752b1bd28f0c9db3f96f2f43b6c0839" - integrity sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ== - dependencies: - execa "^1.0.0" - find-versions "^3.0.0" - -bin-wrapper@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-4.1.0.tgz#99348f2cf85031e3ef7efce7e5300aeaae960605" - integrity sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q== - dependencies: - bin-check "^4.1.0" - bin-version-check "^4.0.0" - download "^7.1.0" - import-lazy "^3.1.0" - os-filter-obj "^2.0.0" - pify "^4.0.1" - -binary@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" - integrity sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg== - dependencies: - buffers "~0.1.1" - chainsaw "~0.1.0" - -bl@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" - integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bluebird@~3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" - integrity sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA== - -body-parser@1.20.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" - integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.10.3" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" - integrity sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ== - dependencies: - continuable-cache "^0.3.1" - error "^7.0.0" - raw-body "~1.1.0" - safe-json-parse "~1.0.1" - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@4.14.2: - version "4.14.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.14.2.tgz#1b3cec458a1ba87588cc5e9be62f19b6d48813ce" - integrity sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw== - dependencies: - caniuse-lite "^1.0.30001125" - electron-to-chromium "^1.3.564" - escalade "^3.0.2" - node-releases "^1.1.61" - -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.20.2, browserslist@^4.21.1: - version "4.21.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" - integrity sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA== - dependencies: - caniuse-lite "^1.0.30001366" - electron-to-chromium "^1.4.188" - node-releases "^2.0.6" - update-browserslist-db "^1.0.4" - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-indexof-polyfill@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz#d2732135c5999c64b277fcf9b1abe3498254729c" - integrity sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A== - -buffer@^5.2.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -buffers@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb" - integrity sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ== - -bytes@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" - integrity sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ== - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ== - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -call-me-maybe@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" - integrity sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw== - -caller-callsite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== - dependencies: - callsites "^2.0.0" - -caller-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== - dependencies: - caller-callsite "^2.0.0" - -callsites@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ== - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw== - -caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001366: - version "1.0.30001366" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001366.tgz#c73352c83830a9eaf2dea0ff71fb4b9a4bbaa89c" - integrity sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -caw@^2.0.0, caw@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" - integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== - dependencies: - get-proxy "^2.0.0" - isurl "^1.0.0-alpha5" - tunnel-agent "^0.6.0" - url-to-options "^1.0.1" - -chainsaw@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/chainsaw/-/chainsaw-0.1.0.tgz#5eab50b28afe58074d0d58291388828b5e5fbc98" - integrity sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ== - dependencies: - traverse ">=0.3.0 <0.4" - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha512-8/MzidM6G/TgRelkzDG13y3Y9LxBjCb+8yOEZ9+wwq5gVF2w2pV0wmHvjfT0RvuxGyR7UEuK36r+yYMbT4uKgA== - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -cheerio@^1.0.0-rc.3: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -classnames@^2.2.6: - version "2.3.1" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e" - integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== - -clipboard@2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.11.tgz#62180360b97dd668b6b3a84ec226975762a70be5" - integrity sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q== - dependencies: - mimic-response "^1.0.0" - -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - -codemirror-graphql@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-1.3.2.tgz#e9d1d18b4a160f0016a28465805284636ee42d2a" - integrity sha512-glwFsEVlH5TvxjSKGymZ1sNy37f3Mes58CB4fXOd0zy9+JzDL08Wti1b5ycy4vFZYghMDK1/Or/zRSjMAGtC2w== - dependencies: - graphql-language-service "^5.0.6" - -coffee-script@^1.12.4: - version "1.12.7" - resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" - integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0, color-convert@^1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@^1.0.0, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-string@^1.6.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" - integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" - integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== - dependencies: - color-convert "^1.9.3" - color-string "^1.6.0" - -colorette@^2.0.14: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.19.0, commander@^2.20.0, commander@^2.8.1: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - -commander@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-with-sourcemaps@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - -concurrently@7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.2.2.tgz#4ad4a4dfd3945f668d727379de2a29502e6a531c" - integrity sha512-DcQkI0ruil5BA/g7Xy3EWySGrFJovF5RYAYxwGvv9Jf9q9B1v3jPFP2tl6axExNf1qgF30kjoNYrangZ0ey4Aw== - dependencies: - chalk "^4.1.0" - date-fns "^2.16.1" - lodash "^4.17.21" - rxjs "^7.0.0" - shell-quote "^1.7.3" - spawn-command "^0.0.2-1" - supports-color "^8.1.0" - tree-kill "^1.2.2" - yargs "^17.3.1" - -config-chain@^1.1.11: - version "1.1.13" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" - integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - -console-stream@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" - integrity sha512-QC/8l9e6ofi6nqZ5PawlDgzmMw3OxIXtvolBzap/F4UDBJlDaZRSNbL/lb41C29FcbSJncBFlJFj2WJoNyZRfQ== - -content-disposition@0.5.4, content-disposition@^0.5.2: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -continuable-cache@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" - integrity sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA== - -convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== - -core-js-compat@^3.21.0, core-js-compat@^3.22.1: - version "3.23.4" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.4.tgz#56ad4a352884317a15f6b04548ff7139d23b917f" - integrity sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q== - dependencies: - browserslist "^4.21.1" - semver "7.0.0" - -core-js@^2.6.5: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cosmiconfig@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" - integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - dependencies: - import-fresh "^2.0.0" - is-directory "^0.3.1" - js-yaml "^3.13.1" - parse-json "^4.0.0" - -cross-spawn@7.0.3, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -crowdin-cli@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" - integrity sha512-s1vSRqWalCqd+vW7nF4oZo1a2pMpEgwIiwVlPRD0HmGY3HjJwQKXqZ26NpX5qCDVN8UdEsScy+2jle0PPQBmAg== - dependencies: - request "^2.53.0" - yamljs "^0.2.1" - yargs "^2.3.0" - -css-color-names@0.0.4, css-color-names@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - integrity sha512-zj5D7X1U2h2zsXOAM8EyUREBnnts6H+Jm+d1M2DbiQQcUtnqgQsMrdo8JW9R80YFUmIdBZeMu5wvYM7hcgWP/Q== - -css-declaration-sorter@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" - integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== - dependencies: - postcss "^7.0.1" - timsort "^0.3.0" - -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha512-dUQOBoqdR7QwV90WysXPLXG5LO7nhYBgiWVfxF80DKPF8zx1t/pUd2FYy73emg3zrjtM6dzmYgbHKfV2rxiHQA== - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - -css-tree@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" - integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== - dependencies: - mdn-data "2.0.14" - source-map "^0.6.1" - -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cssnano-preset-default@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" - integrity sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ== - dependencies: - css-declaration-sorter "^4.0.1" - cssnano-util-raw-cache "^4.0.1" - postcss "^7.0.0" - postcss-calc "^7.0.1" - postcss-colormin "^4.0.3" - postcss-convert-values "^4.0.1" - postcss-discard-comments "^4.0.2" - postcss-discard-duplicates "^4.0.2" - postcss-discard-empty "^4.0.1" - postcss-discard-overridden "^4.0.1" - postcss-merge-longhand "^4.0.11" - postcss-merge-rules "^4.0.3" - postcss-minify-font-values "^4.0.2" - postcss-minify-gradients "^4.0.2" - postcss-minify-params "^4.0.2" - postcss-minify-selectors "^4.0.2" - postcss-normalize-charset "^4.0.1" - postcss-normalize-display-values "^4.0.2" - postcss-normalize-positions "^4.0.2" - postcss-normalize-repeat-style "^4.0.2" - postcss-normalize-string "^4.0.2" - postcss-normalize-timing-functions "^4.0.2" - postcss-normalize-unicode "^4.0.1" - postcss-normalize-url "^4.0.1" - postcss-normalize-whitespace "^4.0.2" - postcss-ordered-values "^4.1.2" - postcss-reduce-initial "^4.0.3" - postcss-reduce-transforms "^4.0.2" - postcss-svgo "^4.0.3" - postcss-unique-selectors "^4.0.1" - -cssnano-util-get-arguments@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" - integrity sha512-6RIcwmV3/cBMG8Aj5gucQRsJb4vv4I4rn6YjPbVWd5+Pn/fuG+YseGvXGk00XLkoZkaj31QOD7vMUpNPC4FIuw== - -cssnano-util-get-match@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" - integrity sha512-JPMZ1TSMRUPVIqEalIBNoBtAYbi8okvcFns4O0YIhcdGebeYZK7dMyHJiQ6GqNBA9kE0Hym4Aqym5rPdsV/4Cw== - -cssnano-util-raw-cache@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" - integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - dependencies: - postcss "^7.0.0" - -cssnano-util-same-parent@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" - integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - -cssnano@^4.1.10: - version "4.1.11" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.11.tgz#c7b5f5b81da269cb1fd982cb960c1200910c9a99" - integrity sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g== - dependencies: - cosmiconfig "^5.0.0" - cssnano-preset-default "^4.0.8" - is-resolvable "^1.0.0" - postcss "^7.0.0" - -csso@^4.0.2: - version "4.2.0" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" - integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== - dependencies: - css-tree "^1.1.2" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng== - dependencies: - array-find-index "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -date-fns@^2.16.1: - version "2.29.3" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" - integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -debug@^3.1.0, debug@^3.1.1: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== - dependencies: - mimic-response "^1.0.0" - -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw== - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.0.0, decompress@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" - integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-port-alt@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" - integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== - dependencies: - address "^1.0.1" - debug "^2.6.0" - -diacritics-map@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" - integrity sha512-3omnDTYrGigU0i4cJjvaKwD52B8aoqyX/NEIkukFFkogBemsIbhSa1O414fpTp5nuszJG6lvQ5vBvDVNCbSsaQ== - -dir-glob@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" - integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== - dependencies: - arrify "^1.0.1" - path-type "^3.0.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -discontinuous-range@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" - integrity sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ== - -docusaurus@1.14.7: - version "1.14.7" - resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.14.7.tgz#f51858ab643b29ec52264d6dd85e0d629e5b3a4a" - integrity sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ== - dependencies: - "@babel/core" "^7.12.3" - "@babel/plugin-proposal-class-properties" "^7.12.1" - "@babel/plugin-proposal-object-rest-spread" "^7.12.1" - "@babel/polyfill" "^7.12.1" - "@babel/preset-env" "^7.12.1" - "@babel/preset-react" "^7.12.5" - "@babel/register" "^7.12.1" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.6" - autoprefixer "^9.7.5" - babylon "^6.18.0" - chalk "^3.0.0" - classnames "^2.2.6" - commander "^4.0.1" - crowdin-cli "^0.3.0" - cssnano "^4.1.10" - enzyme "^3.10.0" - enzyme-adapter-react-16 "^1.15.1" - escape-string-regexp "^2.0.0" - express "^4.17.1" - feed "^4.2.1" - fs-extra "^9.0.1" - gaze "^1.1.3" - github-slugger "^1.3.0" - glob "^7.1.6" - highlight.js "^9.16.2" - imagemin "^6.0.0" - imagemin-gifsicle "^6.0.1" - imagemin-jpegtran "^6.0.0" - imagemin-optipng "^6.0.0" - imagemin-svgo "^7.0.0" - lodash "^4.17.20" - markdown-toc "^1.2.0" - mkdirp "^0.5.1" - portfinder "^1.0.28" - postcss "^7.0.23" - prismjs "^1.22.0" - react "^16.8.4" - react-dev-utils "^11.0.1" - react-dom "^16.8.4" - remarkable "^2.0.0" - request "^2.88.0" - shelljs "^0.8.4" - sitemap "^3.2.2" - tcp-port-used "^1.0.1" - tiny-lr "^1.1.1" - tree-node-cli "^1.2.5" - truncate-html "^1.0.3" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1, domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.0.1.tgz#696b3875238338cb186b6c0612bd4901c89a4f1c" - integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.1" - -dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -download@^6.2.2: - version "6.2.5" - resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" - integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== - dependencies: - caw "^2.0.0" - content-disposition "^0.5.2" - decompress "^4.0.0" - ext-name "^5.0.0" - file-type "5.2.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^7.0.0" - make-dir "^1.0.0" - p-event "^1.0.0" - pify "^3.0.0" - -download@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/download/-/download-7.1.0.tgz#9059aa9d70b503ee76a132897be6dec8e5587233" - integrity sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ== - dependencies: - archive-type "^4.0.0" - caw "^2.0.1" - content-disposition "^0.5.2" - decompress "^4.2.0" - ext-name "^5.0.0" - file-type "^8.1.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^8.3.1" - make-dir "^1.2.0" - p-event "^2.1.0" - pify "^3.0.0" - -duplexer2@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - integrity sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA== - dependencies: - readable-stream "^2.0.2" - -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - -duplexer@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -electron-to-chromium@^1.3.564, electron-to-chromium@^1.4.188: - version "1.4.191" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.191.tgz#01dd4bf32502a48ce24bf3890b5553a1c5f93539" - integrity sha512-MeEaiuoSFh4G+rrN+Ilm1KJr8pTTZloeLurcZ+PRcthvdK1gWThje+E6baL7/7LoNctrzCncavAG/j/vpES9jg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - -entities@^4.2.0, entities@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.3.1.tgz#c34062a94c865c322f9d67b4384e4169bcede6a4" - integrity sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg== - -envinfo@^7.7.3: - version "7.8.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" - integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== - -enzyme-adapter-react-16@^1.15.1: - version "1.15.6" - resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz#fd677a658d62661ac5afd7f7f541f141f8085901" - integrity sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g== - dependencies: - enzyme-adapter-utils "^1.14.0" - enzyme-shallow-equal "^1.0.4" - has "^1.0.3" - object.assign "^4.1.2" - object.values "^1.1.2" - prop-types "^15.7.2" - react-is "^16.13.1" - react-test-renderer "^16.0.0-0" - semver "^5.7.0" - -enzyme-adapter-utils@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz#afbb0485e8033aa50c744efb5f5711e64fbf1ad0" - integrity sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg== - dependencies: - airbnb-prop-types "^2.16.0" - function.prototype.name "^1.1.3" - has "^1.0.3" - object.assign "^4.1.2" - object.fromentries "^2.0.3" - prop-types "^15.7.2" - semver "^5.7.1" - -enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz#b9256cb25a5f430f9bfe073a84808c1d74fced2e" - integrity sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q== - dependencies: - has "^1.0.3" - object-is "^1.1.2" - -enzyme@^3.10.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.11.0.tgz#71d680c580fe9349f6f5ac6c775bc3e6b7a79c28" - integrity sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw== - dependencies: - array.prototype.flat "^1.2.3" - cheerio "^1.0.0-rc.3" - enzyme-shallow-equal "^1.0.1" - function.prototype.name "^1.1.2" - has "^1.0.3" - html-element-map "^1.2.0" - is-boolean-object "^1.0.1" - is-callable "^1.1.5" - is-number-object "^1.0.4" - is-regex "^1.0.5" - is-string "^1.0.5" - is-subset "^0.1.1" - lodash.escape "^4.0.1" - lodash.isequal "^4.5.0" - object-inspect "^1.7.0" - object-is "^1.0.2" - object.assign "^4.1.0" - object.entries "^1.1.1" - object.values "^1.1.1" - raf "^3.4.1" - rst-selector-parser "^2.2.3" - string.prototype.trim "^1.2.1" - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -error@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" - integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== - dependencies: - string-template "~0.2.1" - -es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.4, es-abstract@^1.19.5, es-abstract@^1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" - integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - regexp.prototype.flags "^1.4.3" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escalade@^3.0.2, escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -exec-buffer@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" - integrity sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA== - dependencies: - execa "^0.7.0" - p-finally "^1.0.0" - pify "^3.0.0" - rimraf "^2.5.4" - tempfile "^2.0.0" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw== - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -executable@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" - integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== - dependencies: - pify "^2.2.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA== - dependencies: - fill-range "^2.1.0" - -express@^4.17.1: - version "4.18.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" - integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.0" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.10.3" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext-list@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" - integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== - dependencies: - mime-db "^1.28.0" - -ext-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" - integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== - dependencies: - ext-list "^2.0.0" - sort-keys-length "^1.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-folder-size@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/fast-folder-size/-/fast-folder-size-1.7.0.tgz#b9bed525c94dd8c610920ddbab0e9370bee4dd49" - integrity sha512-NtU4r7WOKYtU6sinhjgvRw3KoY6fUHp1UVfu6EUiX65HanN/JnZjCYBY+h2J9xLpKti/3UtvyfcKLwvzNkTHOw== - dependencies: - unzipper "^0.10.11" - -fast-glob@^2.0.2: - version "2.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" - integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== - dependencies: - "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.1.2" - glob-parent "^3.1.0" - is-glob "^4.0.0" - merge2 "^1.2.3" - micromatch "^3.1.10" - -fast-glob@^3.1.1: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-xml-parser@^3.19.0: - version "3.21.1" - resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz#152a1d51d445380f7046b304672dd55d15c9e736" - integrity sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg== - dependencies: - strnum "^1.0.4" - -fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - -fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== - dependencies: - reusify "^1.0.4" - -faye-websocket@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" - integrity sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ== - dependencies: - websocket-driver ">=0.5.1" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - dependencies: - pend "~1.2.0" - -feed@^4.2.1: - version "4.2.2" - resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e" - integrity sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ== - dependencies: - xml-js "^1.6.11" - -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ== - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -file-type@5.2.0, file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== - -file-type@^10.4.0, file-type@^10.7.0: - version "10.11.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.11.0.tgz#2961d09e4675b9fb9a3ee6b69e9cd23f43fd1890" - integrity sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== - -file-type@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== - -file-type@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" - integrity sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ== - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - -file-type@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-8.1.0.tgz#244f3b7ef641bbe0cca196c7276e4b332399f68c" - integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== - -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ== - -filenamify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" - integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.0" - trim-repeated "^1.0.0" - -filesize@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.1.0.tgz#e81bdaa780e2451d714d71c0d7a4f3238d37ad00" - integrity sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg== - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-cache-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - -find-cache-dir@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@4.1.0, find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-versions@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -fork-ts-checker-webpack-plugin@4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-4.1.6.tgz#5055c703febcf37fa06405d400c122b905167fc5" - integrity sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw== - dependencies: - "@babel/code-frame" "^7.5.5" - chalk "^2.4.1" - micromatch "^3.1.10" - minimatch "^3.0.4" - semver "^5.6.0" - tapable "^1.0.0" - worker-rpc "^0.1.0" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fstream@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" - integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.2, function.prototype.name@^1.1.3, function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gaze@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" - integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== - dependencies: - globule "^1.0.0" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" - integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-proxy@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" - integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== - dependencies: - npm-conf "^1.1.0" - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw== - -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA== - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -gifsicle@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-4.0.1.tgz#30e1e61e3ee4884ef702641b2e98a15c2127b2e2" - integrity sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - execa "^1.0.0" - logalot "^2.0.0" - -github-slugger@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.4.0.tgz#206eb96cdb22ee56fdc53a28d5a302338463444e" - integrity sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ== - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA== - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-to-regexp@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" - integrity sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig== - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@~7.1.1: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globby@11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -globby@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" - integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== - dependencies: - array-union "^1.0.1" - dir-glob "2.0.0" - fast-glob "^2.0.2" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -globule@^1.0.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.4.tgz#7c11c43056055a75a6e68294453c17f2796170fb" - integrity sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg== - dependencies: - glob "~7.1.1" - lodash "^4.17.21" - minimatch "~3.0.2" - -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw== - dependencies: - delegate "^3.1.2" - -got@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -got@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -graphql-language-service@^5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/graphql-language-service/-/graphql-language-service-5.0.6.tgz#7fd1e6479e5c3074b070c760fa961d9ad1ed7c72" - integrity sha512-FjE23aTy45Lr5metxCv3ZgSKEZOzN7ERR+OFC1isV5mHxI0Ob8XxayLTYjQKrs8b3kOpvgTYmSmu6AyXOzYslg== - dependencies: - nullthrows "^1.0.0" - vscode-languageserver-types "^3.15.1" - -gray-matter@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-2.1.1.tgz#3042d9adec2a1ded6a7707a9ed2380f8a17a430e" - integrity sha512-vbmvP1Fe/fxuT2QuLVcqb2BfK7upGhhbLIt9/owWEvPYrZZEkelLcq2HqzxosV+PQ67dUFLaAeNpH7C4hhICAA== - dependencies: - ansi-red "^0.1.1" - coffee-script "^1.12.4" - extend-shallow "^2.0.1" - js-yaml "^3.8.1" - toml "^2.3.2" - -gulp-header@^1.7.1: - version "1.8.12" - resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" - integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== - dependencies: - concat-with-sourcemaps "*" - lodash.template "^4.4.0" - through2 "^2.0.0" - -gzip-size@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" - integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== - dependencies: - duplexer "^0.1.1" - pify "^4.0.1" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.0, has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hex-color-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" - integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - -highlight.js@^9.16.2: - version "9.18.5" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" - integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -hsl-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" - integrity sha512-M5ezZw4LzXbBKMruP+BNANf0k+19hDQMgpzBIYnya//Al+fjNct9Wf3b1WedLqdEs2hKBvxq/jh+DsHJLj0F9A== - -hsla-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" - integrity sha512-7Wn5GMLuHBjZCb2bTmnDOycho0p/7UVaAeqXZGbHrBCl6Yd/xDhQJAXe6Ga9AXJH2I5zY1dEdYw2u1UptnSBJA== - -html-element-map@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-element-map/-/html-element-map-1.3.1.tgz#44b2cbcfa7be7aa4ff59779e47e51012e1c73c08" - integrity sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg== - dependencies: - array.prototype.filter "^1.0.0" - call-bind "^1.0.2" - -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -htmlparser2@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.1.tgz#abaa985474fcefe269bc761a779b544d7196d010" - integrity sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - domutils "^3.0.1" - entities "^4.3.0" - -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-parser-js@>=0.5.1: - version "0.5.8" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" - integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^3.3.5: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" - integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== - -ignore@^5.1.4: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -imagemin-gifsicle@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz#6abad4e95566d52e5a104aba1c24b4f3b48581b3" - integrity sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng== - dependencies: - exec-buffer "^3.0.0" - gifsicle "^4.0.0" - is-gif "^3.0.0" - -imagemin-jpegtran@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz#c8d3bcfb6ec9c561c20a987142854be70d90b04f" - integrity sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g== - dependencies: - exec-buffer "^3.0.0" - is-jpg "^2.0.0" - jpegtran-bin "^4.0.0" - -imagemin-optipng@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz#a6bfc7b542fc08fc687e83dfb131249179a51a68" - integrity sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A== - dependencies: - exec-buffer "^3.0.0" - is-png "^1.0.0" - optipng-bin "^5.0.0" - -imagemin-svgo@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz#528a42fd3d55eff5d4af8fd1113f25fb61ad6d9a" - integrity sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg== - dependencies: - is-svg "^4.2.1" - svgo "^1.3.2" - -imagemin@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-6.1.0.tgz#62508b465728fea36c03cdc07d915fe2d8cf9e13" - integrity sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A== - dependencies: - file-type "^10.7.0" - globby "^8.0.1" - make-dir "^1.0.0" - p-pipe "^1.1.0" - pify "^4.0.1" - replace-ext "^1.0.0" - -immer@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" - integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA== - -import-fresh@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== - dependencies: - caller-path "^2.0.0" - resolve-from "^3.0.0" - -import-lazy@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" - integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg== - dependencies: - repeating "^2.0.0" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.4, ini@^1.3.5: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ== - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -ip-regex@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - integrity sha512-vOx7VprsKyllwjSkLV79NIhpyLfr3jAp7VaTCMXOJHu4m0Ew1CZ2fcjASwmV1jI3BWuWHB013M48eyeldk9gYg== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-boolean-object@^1.0.1, is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== - -is-color-stop@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" - integrity sha512-H1U8Vz0cfXNujrJzEcvvwMDW9Ra+biSYA3ThdQvAnMLJkEHQXn6bWzLkxHtVYJ+Sdbx0b6finn3jZiaVe7MAHA== - dependencies: - css-color-names "^0.0.4" - hex-color-regex "^1.1.0" - hsl-regex "^1.0.0" - hsla-regex "^1.0.0" - rgb-regex "^1.0.1" - rgba-regex "^1.0.0" - -is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-directory@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-gif@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-3.0.0.tgz#c4be60b26a301d695bb833b20d9b5d66c6cf83b1" - integrity sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw== - dependencies: - file-type "^10.4.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw== - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-jpg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-2.0.0.tgz#2e1997fa6e9166eaac0242daae443403e4ef1d97" - integrity sha512-ODlO0ruzhkzD3sdynIainVP5eoOFNN85rxA1+cwwnPe4dKyX0r5+hxNO5XpCrxlHcmb9vkOit9mhRD2JVuimHg== - -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ== - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" - integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-png@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" - integrity sha512-23Rmps8UEx3Bzqr0JqAtQo0tYP6sDfIfMt1rL9rzlla/zbteftI9LSJoqsIoGgL06sJboDGdVns4RTakAW/WTw== - -is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-resolvable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - -is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-root@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" - integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - integrity sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw== - -is-svg@^4.2.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-4.3.2.tgz#a119e9932e1af53f6be1969d1790d6cc5fd947d3" - integrity sha512-mM90duy00JGMyjqIVHu9gNTjywdZV+8qNasX8cm/EEYZ53PHDgajvbBwNVvty5dwSAxLUD3p3bdo+7sR/UMrpw== - dependencies: - fast-xml-parser "^3.19.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-url@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -is2@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.7.tgz#d084e10cab3bd45d6c9dfde7a48599fcbb93fcac" - integrity sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA== - dependencies: - deep-is "^0.1.3" - ip-regex "^4.1.0" - is-url "^1.2.4" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jpegtran-bin@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz#d00aed809fba7aa6f30817e59eee4ddf198f8f10" - integrity sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - logalot "^2.0.0" - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - 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== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^2.1.2, json5@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -lazy-cache@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" - integrity sha512-7vp2Acd2+Kz4XkzxGxaB1FWOi8KjWIWsgdfD5MCb86DWvlLqhRPM+d6Pro3iNEL5VT9mstz5hKAlcd+QR6H3aA== - dependencies: - set-getter "^0.1.0" - -list-item@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/list-item/-/list-item-1.1.1.tgz#0c65d00e287cb663ccb3cb3849a77e89ec268a56" - integrity sha512-S3D0WZ4J6hyM8o5SNKWaMYB1ALSacPZ2nHGEuCjmHZ+dc03gFeNZoNDcqfcnO4vDhTZmNrqrpYZCdXsRh22bzw== - dependencies: - expand-range "^1.8.1" - extend-shallow "^2.0.1" - is-number "^2.1.0" - repeat-string "^1.5.2" - -listenercount@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" - integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== - -livereload-js@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" - integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -loader-utils@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -loader-utils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" - integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha512-yX/rx6d/UTVh7sSVWVSIMjfnz95evAgDFdb1ZozC35I9mSFCkmzptOzevxjgbQUsc78NR44LVHWjsoMQXy9FDg== - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha512-lxdsn7xxlCymgLYo1gGvVrfHmkjDiyqVv62FAeF2i5ta72BipE1SLxw8hPEPLhD4/247Ijw07UQH7Hq/chT5LA== - -lodash.chunk@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" - integrity sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w== - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - -lodash.defaults@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== - -lodash.escape@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" - integrity sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha512-pXYUy7PR8BCLwX5mgJ/aNtyOvuJTdZAo9EQFUvMIYugqmJxnrYaANvTbgndOzHSCSR0wnlBBfRXJL5SbWxo3FQ== - -lodash.flatten@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ== - -lodash.isequal@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== - -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q== - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.merge@^4.4.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.padstart@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" - integrity sha512-sW73O6S8+Tg66eY56DBk85aQzzUJDtpoXFBgELMd5P/SotAguo+1kYO6RuYgXxA4HJH3LFTFPASX6ET6bjfriw== - -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw== - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha512-qkTuvgEzYdyhiJBx42YPzPo71R1aEr0z79kAv7Ixg8wPFEjgRgJdUsGMG3Hf3OYSF/kHI79XhNlt+5Ar6OzwxQ== - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha512-j7MJE+TuT51q9ggt4fSgVqro163BEFjAt3u97IqU+JA2DkWl80nFTrowzLpZ/BnpN7rrl0JA/593NAdd8p/scQ== - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== - -lodash.template@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== - -lodash@^4.17.14, lodash@^4.17.20, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -logalot@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" - integrity sha512-Ah4CgdSRfeCJagxQhcVNMi9BfGYyEKLa6d7OA6xSbld/Hg3Cf2QiOa1mDpmG7Ve8LOH6DN3mdttzjQAvWTyVkw== - dependencies: - figures "^1.3.5" - squeak "^1.0.0" - -longest@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg== - -loose-envify@^1.1.0, loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ== - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A== - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lpad-align@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" - integrity sha512-MMIcFmmR9zlGZtBcFOows6c2COMekHCIFJz3ew/rRpKZ1wR4mXDPzvcVqLarux8M33X4TPSq2Jdw8WJj0q0KbQ== - dependencies: - get-stdin "^4.0.1" - indent-string "^2.1.0" - longest "^1.0.0" - meow "^3.3.0" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lz-string@1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" - integrity sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ== - -make-dir@^1.0.0, make-dir@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.0.0, make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.2, make-dir@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== - dependencies: - object-visit "^1.0.0" - -markdown-link@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/markdown-link/-/markdown-link-0.1.1.tgz#32c5c65199a6457316322d1e4229d13407c8c7cf" - integrity sha512-TurLymbyLyo+kAUUAV9ggR9EPcDjP/ctlv9QAFiqUH7c+t6FlsbivPo9OKTU8xdOx9oNd2drW/Fi5RRElQbUqA== - -markdown-toc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/markdown-toc/-/markdown-toc-1.2.0.tgz#44a15606844490314afc0444483f9e7b1122c339" - integrity sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg== - dependencies: - concat-stream "^1.5.2" - diacritics-map "^0.1.0" - gray-matter "^2.1.0" - lazy-cache "^2.0.2" - list-item "^1.1.1" - markdown-link "^0.1.1" - minimist "^1.2.0" - mixin-deep "^1.1.3" - object.pick "^1.2.0" - remarkable "^1.7.1" - repeat-string "^1.6.1" - strip-color "^0.1.0" - -math-random@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" - integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== - -mdn-data@2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" - integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== - -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA== - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.2.3, merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -microevent.ts@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" - integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== - -micromatch@^3.1.10: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0, mime-db@^1.28.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@~3.0.2: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -mixin-deep@^1.1.3, mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -moo@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4" - integrity sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -nearley@^2.7.10: - version "2.20.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" - integrity sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ== - dependencies: - commander "^2.19.0" - moo "^0.5.0" - railroad-diagrams "^1.0.0" - randexp "0.4.6" - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-releases@^1.1.61: - version "1.1.77" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" - integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== - -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -normalize-url@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" - integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - -npm-conf@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== - dependencies: - path-key "^2.0.0" - -nth-check@^1.0.2, nth-check@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nullthrows@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" - integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.12.0, object-inspect@^1.7.0, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-is@^1.0.2, object-is@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.entries@^1.1.1, object.entries@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" - integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.fromentries@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" - integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -object.getownpropertydescriptors@^2.1.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.4.tgz#7965e6437a57278b587383831a9b829455a4bc37" - integrity sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ== - dependencies: - array.prototype.reduce "^1.0.4" - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.1" - -object.pick@^1.2.0, object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== - dependencies: - isobject "^3.0.1" - -object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -open@^7.0.2: - version "7.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" - integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== - dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" - -optipng-bin@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-5.1.0.tgz#a7c7ab600a3ab5a177dae2f94c2d800aa386b5a9" - integrity sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA== - dependencies: - bin-build "^3.0.0" - bin-wrapper "^4.0.0" - logalot "^2.0.0" - -os-filter-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" - integrity sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg== - dependencies: - arch "^2.1.0" - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - -p-event@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" - integrity sha512-hV1zbA7gwqPVFcapfeATaNjQ3J0NuzorHPyG8GPL9g/Y/TplWVBVoCKCXL6Ej2zscrCEv195QNWJXuBH6XZuzA== - dependencies: - p-timeout "^1.1.1" - -p-event@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" - integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== - dependencies: - p-timeout "^2.0.1" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== - -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg== - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha512-4k9LlvY6Bo/1FcIdV33wqZQES0Py+iKISU9Uc8p8AjWoZPnFKMpVIVD3s0EYn4jzLh1I+WeUZkJ0Yoa4Qfw3Kg== - dependencies: - p-reduce "^1.0.0" - -p-pipe@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" - integrity sha512-IA8SqjIGA8l9qOksXJvsvkeQ+VGb0TAzNCzvKvz9wt5wWLqfWbV6fXy43gpR2L4Te8sOq3S+Ql9biAaMKPdbtw== - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha512-3Tx1T3oM1xO/Y8Gj0sWyE78EIJZ+t+aEmXUdvQgvGmSMri7aPTHoovbXEreWKkL5j21Er60XAWLTzKbAKYOujQ== - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA== - dependencies: - p-finally "^1.0.0" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.0.0.tgz#51f74a5257f5fcc536389e8c2d0b3802e1bfa91a" - integrity sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g== - dependencies: - entities "^4.3.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picocolors@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" - integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== - -pirates@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.1.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-up@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - -portfinder@^1.0.28: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== - -postcss-calc@^7.0.1: - version "7.0.5" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" - integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== - dependencies: - postcss "^7.0.27" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" - -postcss-colormin@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" - integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== - dependencies: - browserslist "^4.0.0" - color "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-convert-values@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" - integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-discard-comments@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" - integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - dependencies: - postcss "^7.0.0" - -postcss-discard-duplicates@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" - integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - dependencies: - postcss "^7.0.0" - -postcss-discard-empty@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" - integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - dependencies: - postcss "^7.0.0" - -postcss-discard-overridden@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" - integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - dependencies: - postcss "^7.0.0" - -postcss-merge-longhand@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" - integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== - dependencies: - css-color-names "0.0.4" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - stylehacks "^4.0.0" - -postcss-merge-rules@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" - integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - cssnano-util-same-parent "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - vendors "^1.0.0" - -postcss-minify-font-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" - integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-gradients@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" - integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - is-color-stop "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-minify-params@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" - integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== - dependencies: - alphanum-sort "^1.0.0" - browserslist "^4.0.0" - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - uniqs "^2.0.0" - -postcss-minify-selectors@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" - integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== - dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -postcss-normalize-charset@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" - integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - dependencies: - postcss "^7.0.0" - -postcss-normalize-display-values@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" - integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-positions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" - integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== - dependencies: - cssnano-util-get-arguments "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-repeat-style@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" - integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== - dependencies: - cssnano-util-get-arguments "^4.0.0" - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-string@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" - integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== - dependencies: - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-timing-functions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" - integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== - dependencies: - cssnano-util-get-match "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-unicode@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" - integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-url@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" - integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^3.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-normalize-whitespace@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" - integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-ordered-values@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" - integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== - dependencies: - cssnano-util-get-arguments "^4.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-reduce-initial@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" - integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== - dependencies: - browserslist "^4.0.0" - caniuse-api "^3.0.0" - has "^1.0.0" - postcss "^7.0.0" - -postcss-reduce-transforms@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" - integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - dependencies: - cssnano-util-get-match "^4.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - -postcss-selector-parser@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" - integrity sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - dependencies: - dot-prop "^5.2.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-selector-parser@^6.0.2: - version "6.0.10" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" - integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-svgo@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" - integrity sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== - dependencies: - postcss "^7.0.0" - postcss-value-parser "^3.0.0" - svgo "^1.0.0" - -postcss-unique-selectors@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" - integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== - dependencies: - alphanum-sort "^1.0.0" - postcss "^7.0.0" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" - integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== - -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.27, postcss@^7.0.32: - version "7.0.39" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" - integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== - dependencies: - picocolors "^0.2.1" - source-map "^0.6.1" - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== - -pretty-bytes@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" - integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== - -prismjs@^1.22.0: - version "1.28.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.28.0.tgz#0d8f561fa0f7cf6ebca901747828b149147044b6" - integrity sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -prompts@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7" - integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -prop-types-exact@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" - integrity sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== - dependencies: - has "^1.0.3" - object.assign "^4.1.0" - reflect.ownkeys "^0.2.0" - -prop-types@15.8.1, prop-types@^15.6.2, prop-types@^15.7.2: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== - -qs@6.10.3: - version "6.10.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" - integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== - dependencies: - side-channel "^1.0.4" - -qs@^6.4.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -raf@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" - integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== - dependencies: - performance-now "^2.1.0" - -railroad-diagrams@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" - integrity sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A== - -randexp@0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" - integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== - dependencies: - discontinuous-range "1.0.0" - ret "~0.1.10" - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" - integrity sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg== - dependencies: - bytes "1" - string_decoder "0.10" - -react-dev-utils@^11.0.1: - version "11.0.4" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-11.0.4.tgz#a7ccb60257a1ca2e0efe7a83e38e6700d17aa37a" - integrity sha512-dx0LvIGHcOPtKbeiSUM4jqpBl3TcY7CDjZdfOIcKeznE7BWr9dg0iPG90G5yfVQ+p/rGNMXdbfStvzQZEVEi4A== - dependencies: - "@babel/code-frame" "7.10.4" - address "1.1.2" - browserslist "4.14.2" - chalk "2.4.2" - cross-spawn "7.0.3" - detect-port-alt "1.1.6" - escape-string-regexp "2.0.0" - filesize "6.1.0" - find-up "4.1.0" - fork-ts-checker-webpack-plugin "4.1.6" - global-modules "2.0.0" - globby "11.0.1" - gzip-size "5.1.1" - immer "8.0.1" - is-root "2.1.0" - loader-utils "2.0.0" - open "^7.0.2" - pkg-up "3.1.0" - prompts "2.4.0" - react-error-overlay "^6.0.9" - recursive-readdir "2.2.2" - shell-quote "1.7.2" - strip-ansi "6.0.0" - text-table "0.2.0" - -react-dom@18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" - integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.0" - -react-dom@^16.2.0, react-dom@^16.8.4: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" - integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - -react-error-overlay@^6.0.9: - version "6.0.11" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" - integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== - -react-is@^16.13.1, react-is@^16.8.6: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-test-renderer@^16.0.0-0: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae" - integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg== - dependencies: - object-assign "^4.1.1" - prop-types "^15.6.2" - react-is "^16.8.6" - scheduler "^0.19.1" - -react@18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== - dependencies: - loose-envify "^1.1.0" - -react@^16.2.0, react@^16.8.4: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" - integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== - dependencies: - resolve "^1.1.6" - -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== - dependencies: - resolve "^1.9.0" - -recursive-readdir@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" - integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== - dependencies: - minimatch "3.0.4" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g== - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -reflect.ownkeys@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" - integrity sha512-qOLsBKHCpSOFKK1NUOCGC5VyeufB6lEsFe92AL2bhIJsacZS1qdoOZSbPk3MYKuT2cFlRDnulKXuuElIrMjGUg== - -regenerate-unicode-properties@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56" - integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw== - dependencies: - regenerate "^1.4.2" - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== - -regenerator-transform@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537" - integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg== - dependencies: - "@babel/runtime" "^7.8.4" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpu-core@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.1.0.tgz#2f8504c3fd0ebe11215783a41541e21c79942c6d" - integrity sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA== - dependencies: - regenerate "^1.4.2" - regenerate-unicode-properties "^10.0.1" - regjsgen "^0.6.0" - regjsparser "^0.8.2" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.0.0" - -regjsgen@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d" - integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== - -regjsparser@^0.8.2: - version "0.8.4" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f" - integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA== - dependencies: - jsesc "~0.5.0" - -remarkable@^1.7.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" - integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== - dependencies: - argparse "^1.0.10" - autolinker "~0.28.0" - -remarkable@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-2.0.1.tgz#280ae6627384dfb13d98ee3995627ca550a12f31" - integrity sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA== - dependencies: - argparse "^1.0.10" - autolinker "^3.11.0" - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A== - dependencies: - is-finite "^1.0.0" - -replace-ext@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" - integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== - -request@^2.53.0, request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== - -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.9.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ== - dependencies: - lowercase-keys "^1.0.0" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rgb-regex@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" - integrity sha512-gDK5mkALDFER2YLqH6imYvK6g02gpNGM4ILDZ472EwWfXZnC2ZEpoB2ECXTyOVUKuk/bPJZMzwQPBYICzP+D3w== - -rgba-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" - integrity sha512-zgn5OjNQXLUTdq8m17KdaicF6w89TZs8ZU8y0AYENIU6wG8GG6LLm0yLSiPY8DmaYmHdgRW8rnApjoT0fQRfMg== - -rimraf@2, rimraf@^2.5.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rst-selector-parser@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" - integrity sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA== - dependencies: - lodash.flattendeep "^4.4.0" - nearley "^2.7.10" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rxjs@^7.0.0: - version "7.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" - integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== - dependencies: - tslib "^2.1.0" - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-json-parse@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" - integrity sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sax@^1.2.4, sax@~1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -scheduler@^0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" - integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - -scheduler@^0.23.0: - version "0.23.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" - integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== - dependencies: - loose-envify "^1.1.0" - -schema-utils@^2.6.5: - version "2.7.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" - integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== - dependencies: - "@types/json-schema" "^7.0.5" - ajv "^6.12.4" - ajv-keywords "^3.5.2" - -schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -seek-bzip@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" - integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== - dependencies: - commander "^2.8.1" - -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA== - -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - -semver-truncate@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" - integrity sha512-V1fGg9i4CL3qesB6U0L6XAm4xOJiHmt4QAacazumuasc03BvtFGIMCduv01JWQ69Nv+JST9TqhSCiJoxoY031w== - dependencies: - semver "^5.3.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -set-getter@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.1.tgz#a3110e1b461d31a9cfc8c5c9ee2e9737ad447102" - integrity sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw== - dependencies: - to-object-path "^0.3.0" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@~1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" - integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== - -shell-quote@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" - integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== - -shelljs@^0.8.4: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" - integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== - dependencies: - is-arrayish "^0.3.1" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -sitemap@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" - integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== - dependencies: - lodash.chunk "^4.2.0" - lodash.padstart "^4.6.1" - whatwg-url "^7.0.0" - xmlbuilder "^13.0.0" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sort-keys-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" - integrity sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw== - dependencies: - sort-keys "^1.0.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg== - dependencies: - is-plain-obj "^1.0.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg== - dependencies: - is-plain-obj "^1.0.0" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.16, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spawn-command@^0.0.2-1: - version "0.0.2-1" - resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" - integrity sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" - integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -squeak@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" - integrity sha512-YQL1ulInM+ev8nXX7vfXsCsDh6IqXlrremc1hzi77776BtpWgYJUMto3UM05GSAaGzJgWekszjoKDrVNB5XG+A== - dependencies: - chalk "^1.0.0" - console-stream "^0.1.1" - lpad-align "^1.0.1" - -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stable@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" - integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -string-template@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" - integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.trim@^1.2.1: - version "1.2.6" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz#824960787db37a9e24711802ed0c1d1c0254f83e" - integrity sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string_decoder@0.10: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== - dependencies: - is-utf8 "^0.2.0" - -strip-color@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b" - integrity sha512-p9LsUieSjWNNAxVCXLeilaDlmuUOrDS5/dF9znM1nZc7EGX5+zEFC0bEevsNIaldjlks+2jns5Siz6F9iK6jwA== - -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA== - dependencies: - get-stdin "^4.0.1" - -strip-outer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - -strnum@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" - integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== - -stylehacks@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" - integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== - dependencies: - browserslist "^4.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0, supports-color@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svgo@^1.0.0, svgo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tcp-port-used@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.2.tgz#9652b7436eb1f4cfae111c79b558a25769f6faea" - integrity sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA== - dependencies: - debug "4.3.1" - is2 "^2.0.6" - -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== - -tempfile@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" - integrity sha512-ZOn6nJUgvgC09+doCEF3oB+r3ag7kUvlsXEGX069QRD60p+P3uP7XG9N2/at+EyIRGSN//ZY3LyEotA1YpmjuA== - dependencies: - temp-dir "^1.0.0" - uuid "^3.0.1" - -terser-webpack-plugin@^5.1.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz#8033db876dd5875487213e87c627bca323e5ed90" - integrity sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ== - dependencies: - "@jridgewell/trace-mapping" "^0.3.7" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.0" - terser "^5.7.2" - -terser@^5.7.2: - version "5.14.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" - integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -text-table@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== - -timsort@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" - integrity sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A== - -tiny-emitter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" - integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== - -tiny-lr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" - integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== - dependencies: - body "^5.1.0" - debug "^3.1.0" - faye-websocket "~0.10.0" - livereload-js "^2.3.0" - object-assign "^4.1.0" - qs "^6.4.0" - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -toml@^2.3.2: - version "2.3.6" - resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b" - integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== - dependencies: - punycode "^2.1.0" - -"traverse@>=0.3.0 <0.4": - version "0.3.9" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" - integrity sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ== - -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - -tree-node-cli@^1.2.5: - version "1.5.2" - resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.5.2.tgz#c684fb9e7c2b9b29aa023eebaa9a095b6f93bf93" - integrity sha512-lBUNLk3NpRDkdsneWxa6mj5zfV/RZ5TWUniGuGprgmhijatHPcSMxyCs7bKpAqCLfPLZq7moQYLIiuVaWG/FOQ== - dependencies: - commander "^5.0.0" - fast-folder-size "^1.6.1" - pretty-bytes "^5.6.0" - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw== - -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg== - dependencies: - escape-string-regexp "^1.0.2" - -truncate-html@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.4.tgz#268de7ba2650d697d748f1692a78197a88886e9d" - integrity sha512-FpDAlPzpJ3jlZiNEahRs584FS3jOSQafgj4cC9DmAYPct6uMZDLY625+eErRd43G35vGDrNq3i7b4aYUQ/Bxqw== - dependencies: - "@types/cheerio" "^0.22.8" - cheerio "0.22.0" - -tslib@^2.1.0, tslib@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unbzip2-stream@^1.0.9: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" - integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" - integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA== - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha512-mZdDpf3vBV5Efh29kMw5tXoup/buMgxLzOt/XKFKcVmi+15ManNQWr6HfZ2aiZTYlYixbdNJ0KFmIZIv52tHSQ== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg== - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -unzipper@^0.10.11: - version "0.10.11" - resolved "https://registry.yarnpkg.com/unzipper/-/unzipper-0.10.11.tgz#0b4991446472cbdb92ee7403909f26c2419c782e" - integrity sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw== - dependencies: - big-integer "^1.6.17" - binary "~0.3.0" - bluebird "~3.4.1" - buffer-indexof-polyfill "~1.0.0" - duplexer2 "~0.1.4" - fstream "^1.0.12" - graceful-fs "^4.2.2" - listenercount "~1.0.1" - readable-stream "~2.3.6" - setimmediate "~1.0.4" - -update-browserslist-db@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" - integrity sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA== - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ== - dependencies: - prepend-http "^2.0.0" - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A== - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^3.0.1, uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -vendors@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" - integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vscode-languageserver-types@^3.15.1: - version "3.17.2" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2" - integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -webpack-cli@4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" - integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.2.0" - "@webpack-cli/info" "^1.5.0" - "@webpack-cli/serve" "^1.7.0" - colorette "^2.0.14" - commander "^7.0.0" - cross-spawn "^7.0.3" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" - webpack-merge "^5.7.3" - -webpack-merge@^5.7.3: - version "5.8.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack@5.76.0: - version "5.76.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.0.tgz#f9fb9fb8c4a7dbdcd0d56a98e56b8a942ee2692c" - integrity sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1: - version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which@^1.2.9, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q== - -worker-rpc@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" - integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== - dependencies: - microevent.ts "~0.1.1" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -xml-js@^1.6.11: - version "1.6.11" - resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" - integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== - dependencies: - sax "^1.2.4" - -xmlbuilder@^13.0.0: - version "13.0.2" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" - integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== - -xtend@^4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - -yamljs@^0.2.1: - version "0.2.10" - resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f" - integrity sha512-sbkbOosewjeRmJ23Hjee1RgTxn+xa7mt4sew3tfD0SdH0LTcswnZC9dhSNq4PIz15roQMzb84DjECyQo5DWIww== - dependencies: - argparse "^1.0.7" - glob "^7.0.5" - -yargs-parser@^21.0.0: - version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== - -yargs@^17.3.1: - version "17.5.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" - integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - -yargs@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-2.3.0.tgz#e900c87250ec5cd080db6009fe3dd63156f1d7fb" - integrity sha512-w48USdbTdaVMcE3CnXsEtSY9zYSN7dTyVnLBgrJF2quA5rLwobC9zixxfexereLGFaxjxtR3oWdydC0qoayakw== - dependencies: - wordwrap "0.0.2" - -yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@algolia/autocomplete-core@npm:1.17.9": + version: 1.17.9 + resolution: "@algolia/autocomplete-core@npm:1.17.9" + dependencies: + "@algolia/autocomplete-plugin-algolia-insights": "npm:1.17.9" + "@algolia/autocomplete-shared": "npm:1.17.9" + checksum: 10/cf4f0f1d9e0ca4e7f1ea25291b270e47315385cbda4a01bbc0c56c3659d21f2357ec2026a1b828f063d4cd1d13509b6f76960f0bfd51acafd76a487a752eec3c + languageName: node + linkType: hard + +"@algolia/autocomplete-plugin-algolia-insights@npm:1.17.9": + version: 1.17.9 + resolution: "@algolia/autocomplete-plugin-algolia-insights@npm:1.17.9" + dependencies: + "@algolia/autocomplete-shared": "npm:1.17.9" + peerDependencies: + search-insights: ">= 1 < 3" + checksum: 10/5cd16d91aff4e5eb0823387d480d04d4cc0e8f1ebf9970f91f0c0bc88a358b09112218d6c9762e35f444a22251a3bbe0934a82fcd55eab32fc2701c9399f3baf + languageName: node + linkType: hard + +"@algolia/autocomplete-preset-algolia@npm:1.17.9": + version: 1.17.9 + resolution: "@algolia/autocomplete-preset-algolia@npm:1.17.9" + dependencies: + "@algolia/autocomplete-shared": "npm:1.17.9" + peerDependencies: + "@algolia/client-search": ">= 4.9.1 < 6" + algoliasearch: ">= 4.9.1 < 6" + checksum: 10/7343b54aa6a7d9a75acf4dfbcc007bf328d1ae991f6bb4a92893bf5492b64ba52b331e9edd2da05008db080aaa6c91889d7ea2ccf0cc99ef44d55440bf22de38 + languageName: node + linkType: hard + +"@algolia/autocomplete-shared@npm:1.17.9": + version: 1.17.9 + resolution: "@algolia/autocomplete-shared@npm:1.17.9" + peerDependencies: + "@algolia/client-search": ">= 4.9.1 < 6" + algoliasearch: ">= 4.9.1 < 6" + checksum: 10/32f74fa2efb0a67def376a0a040b553c9109fb0891f6d4dd525048388b613a6ea1440aeff672b7b67da47b0b584f40c37826c34b5346f0a35bd64c08d559acb6 + languageName: node + linkType: hard + +"@algolia/client-abtesting@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-abtesting@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/0a01a3c6ab40ebbf1f4f546ecbc6e9729957434babf433fa14f01046129d5bf98930d16b5ff2a418e8ae0941074c212c6d5394593c568f90ae2102fee7db2bed + languageName: node + linkType: hard + +"@algolia/client-analytics@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-analytics@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/ef9020626705b263be635c6ed05bcbf97851afd50c57776de66e71e4abfd8071b0d65da4a765ab78d289a2c7d3016554d6bf99a21dc443c7658aa0e4636127db + languageName: node + linkType: hard + +"@algolia/client-common@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-common@npm:5.21.0" + checksum: 10/b2f1080901c3d5829e4475607e6c52e4af0b1325ee0381cc42ac434e173526c787ea25e3274a64bd2e7f9690cab5268b5e7f9ba7e1a0b4f116b4abb4e6ebfa04 + languageName: node + linkType: hard + +"@algolia/client-insights@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-insights@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/055a99217fc105199b985e60bc1d635de27c60d15093c60a62029825ef0493afabcd870a88173d99d81e82daf65d0792c2620677783b51a09c759662da06aa66 + languageName: node + linkType: hard + +"@algolia/client-personalization@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-personalization@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/84cf5ed658f6c8ca6f06bbd68337a84bb70a0c382a6f6a4a29a92b744334d82ebad8ffb434960fdf43db843520107effaade2cb4a9c1f93b694f87b4f3e1015b + languageName: node + linkType: hard + +"@algolia/client-query-suggestions@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-query-suggestions@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/aef9a2d4b73c8c2da3df2fac9520c325154e0e6df7b169d923b4d279afcaf65ddb392c9445a0ead424fc9563d05950bef3fa4ebf614325ae2b185fb27ef8b6b1 + languageName: node + linkType: hard + +"@algolia/client-search@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/client-search@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/2abf60095319312a8c274f164a5367ea0845964b76b7785e4aa5d3cd38f6a8bccc539a8ca8c621e079056b3eae33408a18554e90cafc8b2780c4f52a89e2ef84 + languageName: node + linkType: hard + +"@algolia/events@npm:^4.0.1": + version: 4.0.1 + resolution: "@algolia/events@npm:4.0.1" + checksum: 10/98d239899a9dac9398f751221369523f2d7706fc4b3bc3167b66a101773d57380fc52733467c0a12be36bce969577fd4010d6ccbd08c410f9c7adc088dadf4c6 + languageName: node + linkType: hard + +"@algolia/ingestion@npm:1.21.0": + version: 1.21.0 + resolution: "@algolia/ingestion@npm:1.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/b13db69d04224a8a7cf6a2685714b94630388c0edfbbac995daf85c58436749d049e186afb77c8f3cc66c899b7741c2ec5c6b8c74e52186c2fb11a135f62f592 + languageName: node + linkType: hard + +"@algolia/monitoring@npm:1.21.0": + version: 1.21.0 + resolution: "@algolia/monitoring@npm:1.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/f43d6c57731549df7ee0afc15d17dd3cb1d654a5d1f589d5067e45a4ef2bc7efb77f82262e18e1a2ab7b5d2de3a7de1314854e370a2eb1515d372f6578ed3077 + languageName: node + linkType: hard + +"@algolia/recommend@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/recommend@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/95df35182571c24498234c9d003a8098c1d36b0864b20900e8a7e5ca4196bcb0341f5839a7494dd76e07ab0588e2eda7b7a5f6b9d73d5de404875ef772b7f7fc + languageName: node + linkType: hard + +"@algolia/requester-browser-xhr@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/requester-browser-xhr@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + checksum: 10/d2033252590d2a71eb7e4d8cc0d218fadbc499e578aa59eafbdb69f57c6547ab2edaa5f26627c54658527469a5d0f50672881f51107562002b182fbc7411bbae + languageName: node + linkType: hard + +"@algolia/requester-fetch@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/requester-fetch@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + checksum: 10/4f3917eeaacfa1dc85a766ee5f9bf19c281ce762a0082598945b43013b1524da995998ff2e25e3917a933796aba5a336f323aadb148cdd0ae8ab7f3d8242ffca + languageName: node + linkType: hard + +"@algolia/requester-node-http@npm:5.21.0": + version: 5.21.0 + resolution: "@algolia/requester-node-http@npm:5.21.0" + dependencies: + "@algolia/client-common": "npm:5.21.0" + checksum: 10/5548fa12430be6552905222d520aea3950ca24e7212a41383a1947f93690502e586be3c818e4807a54ea5d8d96809f48bc007937e22cf3f02896e8cbbb0cebfe + languageName: node + linkType: hard + +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/code-frame@npm:7.27.1" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.27.1" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.1.1" + checksum: 10/721b8a6e360a1fa0f1c9fe7351ae6c874828e119183688b533c477aa378f1010f37cc9afbfc4722c686d1f5cdd00da02eab4ba7278a0c504fa0d7a321dcd4fdf + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.26.8, @babel/compat-data@npm:^7.27.2": + version: 7.27.5 + resolution: "@babel/compat-data@npm:7.27.5" + checksum: 10/04c343b8a25955bbbe1569564c63ac481a74710eb2e7989b97bd10baf2f0f3b1aa1b6c6122749806e92d70cfc22c10c757ff62336eb10a28ea98ab2b82bc0c2c + languageName: node + linkType: hard + +"@babel/core@npm:^7.21.3, @babel/core@npm:^7.25.9, @babel/core@npm:^7.27.4": + version: 7.27.4 + resolution: "@babel/core@npm:7.27.4" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.27.3" + "@babel/helper-compilation-targets": "npm:^7.27.2" + "@babel/helper-module-transforms": "npm:^7.27.3" + "@babel/helpers": "npm:^7.27.4" + "@babel/parser": "npm:^7.27.4" + "@babel/template": "npm:^7.27.2" + "@babel/traverse": "npm:^7.27.4" + "@babel/types": "npm:^7.27.3" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/28c01186d5f2599e41f92c94fd14a02cfdcf4b74429b4028a8d16e45c1b08d3924c4275e56412f30fcd2664e5ddc2200f1c06cee8bffff4bba628ff1f20c6e70 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.27.3": + version: 7.27.5 + resolution: "@babel/generator@npm:7.27.5" + dependencies: + "@babel/parser": "npm:^7.27.5" + "@babel/types": "npm:^7.27.3" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10/f5e6942670cb32156b3ac2d75ce09b373558823387f15dd1413c27fe9eb5756a7c6011fc7f956c7acc53efb530bfb28afffa24364d46c4e9ffccc4e5c8b3b094 + languageName: node + linkType: hard + +"@babel/helper-annotate-as-pure@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + checksum: 10/41edda10df1ae106a9b4fe617bf7c6df77db992992afd46192534f5cff29f9e49a303231733782dd65c5f9409714a529f215325569f14282046e9d3b7a1ffb6c + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.25.9, @babel/helper-compilation-targets@npm:^7.26.5, @babel/helper-compilation-targets@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/helper-compilation-targets@npm:7.27.2" + dependencies: + "@babel/compat-data": "npm:^7.27.2" + "@babel/helper-validator-option": "npm:^7.27.1" + browserslist: "npm:^4.24.0" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/bd53c30a7477049db04b655d11f4c3500aea3bcbc2497cf02161de2ecf994fec7c098aabbcebe210ffabc2ecbdb1e3ffad23fb4d3f18723b814f423ea1749fe8 + languageName: node + linkType: hard + +"@babel/helper-create-class-features-plugin@npm:^7.25.9": + version: 7.26.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.26.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.26.5" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/traverse": "npm:^7.26.9" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/28bca407847563cabcafcbd84a06c8b3d53d36d2e113cc7b7c15e3377fbfdb4b6b7c73ef76a7c4c9908cc71ee3f350c4bb16a86a4380c6812e17690f792264fe + languageName: node + linkType: hard + +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.25.9": + version: 7.26.3 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.26.3" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + regexpu-core: "npm:^6.2.0" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/4c44122ea11c4253ee78a9c083b7fbce96c725e2cb43cc864f0e8ea2749f7b6658617239c6278df9f132d09a7545c8fe0336ed2895ad7c80c71507828a7bc8ba + languageName: node + linkType: hard + +"@babel/helper-define-polyfill-provider@npm:^0.6.3": + version: 0.6.3 + resolution: "@babel/helper-define-polyfill-provider@npm:0.6.3" + dependencies: + "@babel/helper-compilation-targets": "npm:^7.22.6" + "@babel/helper-plugin-utils": "npm:^7.22.5" + debug: "npm:^4.1.1" + lodash.debounce: "npm:^4.0.8" + resolve: "npm:^1.14.2" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 10/b79a77ac8fbf1aaf6c7f99191871760508e87d75a374ff3c39c6599a17d9bb82284797cd451769305764e504546caf22ae63367b22d6e45e32d0a8f4a34aab53 + languageName: node + linkType: hard + +"@babel/helper-member-expression-to-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/ef8cc1c1e600b012b312315f843226545a1a89f25d2f474ce2503fd939ca3f8585180f291a3a13efc56cf13eddc1d41a3a040eae9a521838fd59a6d04cc82490 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.25.9, @babel/helper-module-imports@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-module-imports@npm:7.27.1" + dependencies: + "@babel/traverse": "npm:^7.27.1" + "@babel/types": "npm:^7.27.1" + checksum: 10/58e792ea5d4ae71676e0d03d9fef33e886a09602addc3bd01388a98d87df9fcfd192968feb40ac4aedb7e287ec3d0c17b33e3ecefe002592041a91d8a1998a8d + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0, @babel/helper-module-transforms@npm:^7.27.3": + version: 7.27.3 + resolution: "@babel/helper-module-transforms@npm:7.27.3" + dependencies: + "@babel/helper-module-imports": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.27.1" + "@babel/traverse": "npm:^7.27.3" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/47abc90ceb181b4bdea9bf1717adf536d1b5e5acb6f6d8a7a4524080318b5ca8a99e6d58677268c596bad71077d1d98834d2c3815f2443e6d3f287962300f15d + languageName: node + linkType: hard + +"@babel/helper-optimise-call-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" + dependencies: + "@babel/types": "npm:^7.25.9" + checksum: 10/f09d0ad60c0715b9a60c31841b3246b47d67650c512ce85bbe24a3124f1a4d66377df793af393273bc6e1015b0a9c799626c48e53747581c1582b99167cc65dc + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.25.9, @babel/helper-plugin-utils@npm:^7.26.5, @babel/helper-plugin-utils@npm:^7.27.1, @babel/helper-plugin-utils@npm:^7.8.0": + version: 7.27.1 + resolution: "@babel/helper-plugin-utils@npm:7.27.1" + checksum: 10/96136c2428888e620e2ec493c25888f9ceb4a21099dcf3dd4508ea64b58cdedbd5a9fb6c7b352546de84d6c24edafe482318646932a22c449ebd16d16c22d864 + languageName: node + linkType: hard + +"@babel/helper-remap-async-to-generator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-remap-async-to-generator@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-wrap-function": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/ea37ad9f8f7bcc27c109963b8ebb9d22bac7a5db2a51de199cb560e251d5593fe721e46aab2ca7d3e7a24b0aa4aff0eaf9c7307af9c2fd3a1d84268579073052 + languageName: node + linkType: hard + +"@babel/helper-replace-supers@npm:^7.25.9, @babel/helper-replace-supers@npm:^7.26.5": + version: 7.26.5 + resolution: "@babel/helper-replace-supers@npm:7.26.5" + dependencies: + "@babel/helper-member-expression-to-functions": "npm:^7.25.9" + "@babel/helper-optimise-call-expression": "npm:^7.25.9" + "@babel/traverse": "npm:^7.26.5" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/cfb911d001a8c3d2675077dbb74ee8d7d5533b22d74f8d775cefabf19c604f6cbc22cfeb94544fe8efa626710d920f04acb22923017e68f46f5fdb1cb08b32ad + languageName: node + linkType: hard + +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" + dependencies: + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/fdbb5248932198bc26daa6abf0d2ac42cab9c2dbb75b7e9f40d425c8f28f09620b886d40e7f9e4e08ffc7aaa2cefe6fc2c44be7c20e81f7526634702fb615bdc + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-string-parser@npm:7.27.1" + checksum: 10/0ae29cc2005084abdae2966afdb86ed14d41c9c37db02c3693d5022fba9f5d59b011d039380b8e537c34daf117c549f52b452398f576e908fb9db3c7abbb3a00 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.25.9, @babel/helper-validator-identifier@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-validator-identifier@npm:7.27.1" + checksum: 10/75041904d21bdc0cd3b07a8ac90b11d64cd3c881e89cb936fa80edd734bf23c35e6bd1312611e8574c4eab1f3af0f63e8a5894f4699e9cfdf70c06fcf4252320 + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.25.9, @babel/helper-validator-option@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-validator-option@npm:7.27.1" + checksum: 10/db73e6a308092531c629ee5de7f0d04390835b21a263be2644276cb27da2384b64676cab9f22cd8d8dbd854c92b1d7d56fc8517cf0070c35d1c14a8c828b0903 + languageName: node + linkType: hard + +"@babel/helper-wrap-function@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-wrap-function@npm:7.25.9" + dependencies: + "@babel/template": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + checksum: 10/988dcf49159f1c920d6b9486762a93767a6e84b5e593a6342bc235f3e47cc1cb0c048d8fca531a48143e6b7fce1ff12ddbf735cf5f62cb2f07192cf7c27b89cf + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.27.4": + version: 7.27.6 + resolution: "@babel/helpers@npm:7.27.6" + dependencies: + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.27.6" + checksum: 10/33c1ab2b42f05317776a4d67c5b00d916dbecfbde38a9406a1300ad3ad6e0380a2f6fcd3361369119a82a7d3c20de6e66552d147297f17f656cf17912605aa97 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.27.4, @babel/parser@npm:^7.27.5": + version: 7.27.5 + resolution: "@babel/parser@npm:7.27.5" + dependencies: + "@babel/types": "npm:^7.27.3" + bin: + parser: ./bin/babel-parser.js + checksum: 10/0ad671be7994dba7d31ec771bd70ea5090aa34faf73e93b1b072e3c0a704ab69f4a7a68ebfb9d6a7fa455e0aa03dfa65619c4df6bae1cf327cba925b1d233fc4 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/3c23ef34e3fd7da3578428cb488180ab6b7b96c9c141438374b6d87fa814d87de099f28098e5fc64726c19193a1da397e4d2351d40b459bcd2489993557e2c74 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/d3e14ab1cb9cb50246d20cab9539f2fbd1e7ef1ded73980c8ad7c0561b4d5e0b144d362225f0976d47898e04cbd40f2000e208b0913bd788346cf7791b96af91 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/a9d1ee3fd100d3eb6799a2f2bbd785296f356c531d75c9369f71541811fa324270258a374db103ce159156d006da2f33370330558d0133e6f7584152c34997ca + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.13.0 + checksum: 10/5b298b28e156f64de51cdb03a2c5b80c7f978815ef1026f3ae8b9fc48d28bf0a83817d8fbecb61ef8fb94a7201f62cca5103cc6e7b9e8f28e38f766d7905b378 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/cb893e5deb9312a0120a399835b6614a016c036714de7123c8edabccc56a09c4455016e083c5c4dd485248546d4e5e55fc0e9132b3c3a9bd16abf534138fe3f2 + languageName: node + linkType: hard + +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/fab70f399aa869275690ec6c7cedb4ef361d4e8b6f55c3d7b04bfee61d52fb93c87cec2c65d73cddbaca89fb8ef5ec0921fce675c9169d9d51f18305ab34e78a + languageName: node + linkType: hard + +"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-assertions@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.26.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/b58f2306df4a690ca90b763d832ec05202c50af787158ff8b50cdf3354359710bce2e1eb2b5135fcabf284756ac8eadf09ca74764aa7e76d12a5cac5f6b21e67 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-attributes@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/c122aa577166c80ee67f75aebebeef4150a132c4d3109d25d7fc058bf802946f883e330f20b78c1d3e3a5ada631c8780c263d2d01b5dbaecc69efefeedd42916 + languageName: node + linkType: hard + +"@babel/plugin-syntax-jsx@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bb609d1ffb50b58f0c1bac8810d0e46a4f6c922aa171c458f3a19d66ee545d36e782d3bffbbc1fed0dc65a558bdce1caf5279316583c0fff5a2c1658982a8563 + languageName: node + linkType: hard + +"@babel/plugin-syntax-typescript@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-syntax-typescript@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/0e9821e8ba7d660c36c919654e4144a70546942ae184e85b8102f2322451eae102cbfadbcadd52ce077a2b44b400ee52394c616feab7b5b9f791b910e933fd33 + languageName: node + linkType: hard + +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" + "@babel/helper-plugin-utils": "npm:^7.18.6" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c + languageName: node + linkType: hard + +"@babel/plugin-transform-arrow-functions@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/c29f081224859483accf55fb4d091db2aac0dcd0d7954bac5ca889030cc498d3f771aa20eb2e9cd8310084ec394d85fa084b97faf09298b6bc9541182b3eb5bb + languageName: node + linkType: hard + +"@babel/plugin-transform-async-generator-functions@npm:^7.26.8": + version: 7.26.8 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.26.8" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + "@babel/helper-remap-async-to-generator": "npm:^7.25.9" + "@babel/traverse": "npm:^7.26.8" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/8fb43823f56281b041dbd358de4f59fccb3e20aac133a439caaeb5aaa30671b3482da9a8515b169fef108148e937c1248b7d6383979c3b30f9348e3fabd29b8e + languageName: node + linkType: hard + +"@babel/plugin-transform-async-to-generator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.25.9" + dependencies: + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-remap-async-to-generator": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/b3ad50fb93c171644d501864620ed23952a46648c4df10dc9c62cc9ad08031b66bd272cfdd708faeee07c23b6251b16f29ce0350473e4c79f0c32178d38ce3a6 + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoped-functions@npm:^7.26.5": + version: 7.26.5 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.26.5" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/f2046c09bf8e588bfb1a6342d0eee733189102cf663ade27adb0130f3865123af5816b40a55ec8d8fa09271b54dfdaf977cd2f8e0b3dc97f18e690188d5a2174 + languageName: node + linkType: hard + +"@babel/plugin-transform-block-scoping@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-block-scoping@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/89dcdd7edb1e0c2f44e3c568a8ad8202e2574a8a8308248550a9391540bc3f5c9fbd8352c60ae90769d46f58d3ab36f2c3a0fbc1c3620813d92ff6fccdfa79c8 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/a8d69e2c285486b63f49193cbcf7a15e1d3a5f632c1c07d7a97f65306df7f554b30270b7378dde143f8b557d1f8f6336c643377943dec8ec405e4cd11e90b9ea + languageName: node + linkType: hard + +"@babel/plugin-transform-class-static-block@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-transform-class-static-block@npm:7.26.0" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.12.0 + checksum: 10/60cba3f125a7bc4f90706af0a011697c7ffd2eddfba336ed6f84c5f358c44c3161af18b0202475241a96dee7964d96dd3a342f46dbf85b75b38bb789326e1766 + languageName: node + linkType: hard + +"@babel/plugin-transform-classes@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-classes@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + globals: "npm:^11.1.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/1914ebe152f35c667fba7bf17ce0d9d0f33df2fb4491990ce9bb1f9ec5ae8cbd11d95b0dc371f7a4cc5e7ce4cf89467c3e34857302911fc6bfb6494a77f7b37e + languageName: node + linkType: hard + +"@babel/plugin-transform-computed-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-computed-properties@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/aa1a9064d6a9d3b569b8cae6972437315a38a8f6553ee618406da5122500a06c2f20b9fa93aeed04dd895923bf6f529c09fc79d4be987ec41785ceb7d2203122 + languageName: node + linkType: hard + +"@babel/plugin-transform-destructuring@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-destructuring@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/51b24fbead910ad0547463b2d214dd08076b22a66234b9f878b8bac117603dd23e05090ff86e9ffc373214de23d3e5bf1b095fe54cce2ca16b010264d90cf4f5 + languageName: node + linkType: hard + +"@babel/plugin-transform-dotall-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/8bdf1bb9e6e3a2cc8154ae88a3872faa6dc346d6901994505fb43ac85f858728781f1219f40b67f7bb0687c507450236cb7838ac68d457e65637f98500aa161b + languageName: node + linkType: hard + +"@babel/plugin-transform-duplicate-keys@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/10dbb87bc09582416f9f97ca6c40563655abf33e3fd0fee25eeaeff28e946a06651192112a2bc2b18c314a638fa15c55b8365a677ef67aa490848cefdc57e1d8 + languageName: node + linkType: hard + +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/f7233cf596be8c6843d31951afaf2464a62a610cb89c72c818c044765827fab78403ab8a7d3a6386f838c8df574668e2a48f6c206b1d7da965aff9c6886cb8e6 + languageName: node + linkType: hard + +"@babel/plugin-transform-dynamic-import@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/aaca1ccda819be9b2b85af47ba08ddd2210ff2dbea222f26e4cd33f97ab020884bf81a66197e50872721e9daf36ceb5659502c82199884ea74d5d75ecda5c58b + languageName: node + linkType: hard + +"@babel/plugin-transform-exponentiation-operator@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.26.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/0d8da2e552a50a775fe8e6e3c32621d20d3c5d1af7ab40ca2f5c7603de057b57b1b5850f74040e4ecbe36c09ac86d92173ad1e223a2a3b3df3cc359ca4349738 + languageName: node + linkType: hard + +"@babel/plugin-transform-export-namespace-from@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/4dfe8df86c5b1d085d591290874bb2d78a9063090d71567ed657a418010ad333c3f48af2c974b865f53bbb718987a065f89828d43279a7751db1a56c9229078d + languageName: node + linkType: hard + +"@babel/plugin-transform-for-of@npm:^7.26.9": + version: 7.26.9 + resolution: "@babel/plugin-transform-for-of@npm:7.26.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/25df1ea3bcecc1bcef99f273fbd8f4a73a509ab7ef3db93629817cb02f9d24868ca3760347f864c8fa4ab79ffa86fb09b2f2de1f2ba1f73f27dbe0c3973c6868 + languageName: node + linkType: hard + +"@babel/plugin-transform-function-name@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-function-name@npm:7.25.9" + dependencies: + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/a8d7c8d019a6eb57eab5ca1be3e3236f175557d55b1f3b11f8ad7999e3fbb1cf37905fd8cb3a349bffb4163a558e9f33b63f631597fdc97c858757deac1b2fd7 + languageName: node + linkType: hard + +"@babel/plugin-transform-json-strings@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-json-strings@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/e2498d84761cfd05aaea53799933d55af309c9d6204e66b38778792d171e4d1311ad34f334259a3aa3407dd0446f6bd3e390a1fcb8ce2e42fe5aabed0e41bee1 + languageName: node + linkType: hard + +"@babel/plugin-transform-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-literals@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3cca75823a38aab599bc151b0fa4d816b5e1b62d6e49c156aa90436deb6e13649f5505973151a10418b64f3f9d1c3da53e38a186402e0ed7ad98e482e70c0c14 + languageName: node + linkType: hard + +"@babel/plugin-transform-logical-assignment-operators@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/8c6febb4ac53852314d28b5e2c23d5dbbff7bf1e57d61f9672e0d97531ef7778b3f0ad698dcf1179f5486e626c77127508916a65eb846a89e98a92f70ed3537b + languageName: node + linkType: hard + +"@babel/plugin-transform-member-expression-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/db92041ae87b8f59f98b50359e0bb172480f6ba22e5e76b13bdfe07122cbf0daa9cd8ad2e78dcb47939938fed88ad57ab5989346f64b3a16953fc73dea3a9b1f + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-amd@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-amd@npm:7.25.9" + dependencies: + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/75d34c6e709a23bcfa0e06f722c9a72b1d9ac3e7d72a07ef54a943d32f65f97cbbf0e387d874eb9d9b4c8d33045edfa8e8441d0f8794f3c2b9f1d71b928acf2c + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-commonjs@npm:^7.25.9, @babel/plugin-transform-modules-commonjs@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.26.3" + dependencies: + "@babel/helper-module-transforms": "npm:^7.26.0" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/f817f02fa04d13f1578f3026239b57f1003bebcf9f9b8d854714bed76a0e4986c79bd6d2e0ac14282c5d309454a8dab683c179709ca753b0152a69c69f3a78e3 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-systemjs@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.9" + dependencies: + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/03145aa89b7c867941a03755216cfb503df6d475a78df84849a157fa5f2fcc17ba114a968d0579ae34e7c61403f35d1ba5d188fdfb9ad05f19354eb7605792f9 + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-umd@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-modules-umd@npm:7.25.9" + dependencies: + "@babel/helper-module-transforms": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/47d03485fedac828832d9fee33b3b982a6db8197e8651ceb5d001890e276150b5a7ee3e9780749e1ba76453c471af907a159108832c24f93453dd45221788e97 + languageName: node + linkType: hard + +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/434346ba05cf74e3f4704b3bdd439287b95cd2a8676afcdc607810b8c38b6f4798cd69c1419726b2e4c7204e62e4a04d31b0360e91ca57a930521c9211e07789 + languageName: node + linkType: hard + +"@babel/plugin-transform-new-target@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-new-target@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/07bb3a09028ee7b8e8ede6e6390e3b3aecc5cf9adb2fc5475ff58036c552b8a3f8e63d4c43211a60545f3307cdc15919f0e54cb5455d9546daed162dc54ff94e + languageName: node + linkType: hard + +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.26.6": + version: 7.26.6 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.26.6" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3832609f043dd1cd8076ab6a00a201573ef3f95bb2144d57787e4a973b3189884c16b4e77ff8e84a6ca47bc3b65bb7df10dca2f6163dfffc316ac96c37b0b5a6 + languageName: node + linkType: hard + +"@babel/plugin-transform-numeric-separator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/0528ef041ed88e8c3f51624ee87b8182a7f246fe4013f0572788e0727d20795b558f2b82e3989b5dd416cbd339500f0d88857de41b6d3b6fdacb1d5344bcc5b1 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-rest-spread@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.25.9" + dependencies: + "@babel/helper-compilation-targets": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-transform-parameters": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/a157ac5af2721090150858f301d9c0a3a0efb8ef66b90fce326d6cc0ae45ab97b6219b3e441bf8d72a2287e95eb04dd6c12544da88ea2345e70b3fac2c0ac9e2 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-super@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-object-super@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-replace-supers": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/1817b5d8b80e451ae1ad9080cca884f4f16df75880a158947df76a2ed8ab404d567a7dce71dd8051ef95f90fbe3513154086a32aba55cc76027f6cbabfbd7f98 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-catch-binding@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/b46a8d1e91829f3db5c252583eb00d05a779b4660abeea5500fda0f8ffa3584fd18299443c22f7fddf0ed9dfdb73c782c43b445dc468d4f89803f2356963b406 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-chaining@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bc838a499fd9892e163b8bc9bfbc4bf0b28cc3232ee0a6406ae078257c8096518f871d09b4a32c11f4a2d6953c3bc1984619ef748f7ad45aed0b0d9689a8eb36 + languageName: node + linkType: hard + +"@babel/plugin-transform-parameters@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-parameters@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/014009a1763deb41fe9f0dbca2c4489ce0ac83dd87395f488492e8eb52399f6c883d5bd591bae3b8836f2460c3937fcebd07e57dce1e0bfe30cdbc63fdfc9d3a + languageName: node + linkType: hard + +"@babel/plugin-transform-private-methods@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-private-methods@npm:7.25.9" + dependencies: + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/6e3671b352c267847c53a170a1937210fa8151764d70d25005e711ef9b21969aaf422acc14f9f7fb86bc0e4ec43e7aefcc0ad9196ae02d262ec10f509f126a58 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-property-in-object@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/aa45bb5669b610afa763d774a4b5583bb60ce7d38e4fd2dedfd0703e73e25aa560e6c6124e155aa90b101601743b127d9e5d3eb00989a7e4b4ab9c2eb88475ba + languageName: node + linkType: hard + +"@babel/plugin-transform-property-literals@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-property-literals@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/436046ab07d54a9b44a384eeffec701d4e959a37a7547dda72e069e751ca7ff753d1782a8339e354b97c78a868b49ea97bf41bf5a44c6d7a3c0a05ad40eeb49c + languageName: node + linkType: hard + +"@babel/plugin-transform-react-constant-elements@npm:^7.21.3": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-constant-elements@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/d5843135107486c34320c4174fcd69e57335cc99a333a1d702a805675b22001be7f1b42b060faa745fd12af2c97f3825978ccbc94d12491e6b31b5c3b7c4632e + languageName: node + linkType: hard + +"@babel/plugin-transform-react-display-name@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-display-name@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/dc7affde0ed98e40f629ee92a2fc44fbd8008aabda1ddb3f5bd2632699d3289b08dff65b26cf3b89dab46397ec440f453d19856bbb3a9a83df5b4ac6157c5c39 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-development@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx-development@npm:7.25.9" + dependencies: + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/537d38369537f1eb56041c4b770bc0733fde1801a7f5ffef40a1217ea448f33ee2fa8e6098a58a82fd00e432c1b9426a66849496da419020c9eca3b1b1a23779 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-self@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.27.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.27.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/72cbae66a58c6c36f7e12e8ed79f292192d858dd4bb00e9e89d8b695e4c5cb6ef48eec84bffff421a5db93fd10412c581f1cccdb00264065df76f121995bdb68 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx-source@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.27.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.27.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/e2843362adb53692be5ee9fa07a386d2d8883daad2063a3575b3c373fc14cdf4ea7978c67a183cb631b4c9c8d77b2f48c24c088f8e65cc3600cb8e97d72a7161 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-jsx@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-jsx@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/eb179ecdf0ae19aed254105cf78fbac35f9983f51ed04b7b67c863a4820a70a879bd5da250ac518321f86df20eac010e53e3411c8750c386d51da30e4814bfb6 + languageName: node + linkType: hard + +"@babel/plugin-transform-react-pure-annotations@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.25.9" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/9995c0fc7c25d3aaaa0ce84233de02eab2564ea111d0813ec5baa538eb21520402879cc787ad1ad4c2061b99cebc3beb09910e64c9592e8ccb42ae62d9e4fd9a + languageName: node + linkType: hard + +"@babel/plugin-transform-regenerator@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-regenerator@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + regenerator-transform: "npm:^0.15.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/1c09e8087b476c5967282c9790fb8710e065eda77c60f6cb5da541edd59ded9d003d96f8ef640928faab4a0b35bf997673499a194973da4f0c97f0935807a482 + languageName: node + linkType: hard + +"@babel/plugin-transform-regexp-modifiers@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.26.0" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/726deca486bbd4b176f8a966eb0f4aabc19d9def3b8dabb8b3a656778eca0df1fda3f3c92b213aa5a184232fdafd5b7bd73b4e24ca4345c498ef6baff2bda4e1 + languageName: node + linkType: hard + +"@babel/plugin-transform-reserved-words@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-reserved-words@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/8beda04481b25767acbd1f6b9ef7b3a9c12fbd9dcb24df45a6ad120e1dc4b247c073db60ac742f9093657d6d8c050501fc0606af042f81a3bb6a3ff862cddc47 + languageName: node + linkType: hard + +"@babel/plugin-transform-runtime@npm:^7.25.9": + version: 7.26.10 + resolution: "@babel/plugin-transform-runtime@npm:7.26.10" + dependencies: + "@babel/helper-module-imports": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.26.5" + babel-plugin-polyfill-corejs2: "npm:^0.4.10" + babel-plugin-polyfill-corejs3: "npm:^0.11.0" + babel-plugin-polyfill-regenerator: "npm:^0.6.1" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/452c7ef0fd18518d19c3c75922650bbfb1a0e6390ca54198294bb84ad697e1380989ed9ee1727d278c8c39b0e6f97320081a84f57256edf3781741c6568721b2 + languageName: node + linkType: hard + +"@babel/plugin-transform-shorthand-properties@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/f774995d58d4e3a992b732cf3a9b8823552d471040e280264dd15e0735433d51b468fef04d75853d061309389c66bda10ce1b298297ce83999220eb0ad62741d + languageName: node + linkType: hard + +"@babel/plugin-transform-spread@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-spread@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/fe72c6545267176cdc9b6f32f30f9ced37c1cafa1290e4436b83b8f377b4f1c175dad404228c96e3efdec75da692f15bfb9db2108fcd9ad260bc9968778ee41e + languageName: node + linkType: hard + +"@babel/plugin-transform-sticky-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/7454b00844dbe924030dd15e2b3615b36e196500c4c47e98dabc6b37a054c5b1038ecd437e910aabf0e43bf56b973cb148d3437d50f6e2332d8309568e3e979b + languageName: node + linkType: hard + +"@babel/plugin-transform-template-literals@npm:^7.26.8": + version: 7.26.8 + resolution: "@babel/plugin-transform-template-literals@npm:7.26.8" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/65874c8844ce906507cd5b9c78950d6173f8339b6416a2a9e763021db5a7045315a6f0e58976ec4af5e960c003ef322576c105130a644addb8f94d1a0821a972 + languageName: node + linkType: hard + +"@babel/plugin-transform-typeof-symbol@npm:^7.26.7": + version: 7.26.7 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.26.7" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.26.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/c4ed244c9f252f941f4dff4b6ad06f6d6f5860e9aa5a6cccb5725ead670f2dab58bba4bad9c2b7bd25685e5205fde810857df964d417072c5c282bbfa4f6bf7a + languageName: node + linkType: hard + +"@babel/plugin-transform-typescript@npm:^7.25.9": + version: 7.26.8 + resolution: "@babel/plugin-transform-typescript@npm:7.26.8" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + "@babel/helper-create-class-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.26.5" + "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/plugin-syntax-typescript": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/42741f21aad5b9182f9d05bdef4a04e422f4dbff1c9f9cd16e3d07de985510da024b58d86d2de88d9c3534bc4f1404a288f02d4f7b8e720e757664846a88a83b + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-escapes@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.25.9" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/f138cbee539963fb3da13f684e6f33c9f7495220369ae12a682b358f1e25ac68936825562c38eae87f01ac9992b2129208b35ec18533567fc805ce5ed0ffd775 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-property-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/201f6f46c1beb399e79aa208b94c5d54412047511795ce1e790edcd189cef73752e6a099fdfc01b3ad12205f139ae344143b62f21f44bbe02338a95e8506a911 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/e8baae867526e179467c6ef5280d70390fa7388f8763a19a27c21302dd59b121032568be080749514b097097ceb9af716bf4b90638f1b3cf689aa837ba20150f + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-sets-regex@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.9" + dependencies: + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/4445ef20de687cb4dcc95169742a8d9013d680aa5eee9186d8e25875bbfa7ee5e2de26a91177ccf70b1db518e36886abcd44750d28db5d7a9539f0efa6839f4b + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.25.9": + version: 7.26.9 + resolution: "@babel/preset-env@npm:7.26.9" + dependencies: + "@babel/compat-data": "npm:^7.26.8" + "@babel/helper-compilation-targets": "npm:^7.26.5" + "@babel/helper-plugin-utils": "npm:^7.26.5" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.9" + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.9" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.9" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.25.9" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.9" + "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-import-assertions": "npm:^7.26.0" + "@babel/plugin-syntax-import-attributes": "npm:^7.26.0" + "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" + "@babel/plugin-transform-arrow-functions": "npm:^7.25.9" + "@babel/plugin-transform-async-generator-functions": "npm:^7.26.8" + "@babel/plugin-transform-async-to-generator": "npm:^7.25.9" + "@babel/plugin-transform-block-scoped-functions": "npm:^7.26.5" + "@babel/plugin-transform-block-scoping": "npm:^7.25.9" + "@babel/plugin-transform-class-properties": "npm:^7.25.9" + "@babel/plugin-transform-class-static-block": "npm:^7.26.0" + "@babel/plugin-transform-classes": "npm:^7.25.9" + "@babel/plugin-transform-computed-properties": "npm:^7.25.9" + "@babel/plugin-transform-destructuring": "npm:^7.25.9" + "@babel/plugin-transform-dotall-regex": "npm:^7.25.9" + "@babel/plugin-transform-duplicate-keys": "npm:^7.25.9" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.9" + "@babel/plugin-transform-dynamic-import": "npm:^7.25.9" + "@babel/plugin-transform-exponentiation-operator": "npm:^7.26.3" + "@babel/plugin-transform-export-namespace-from": "npm:^7.25.9" + "@babel/plugin-transform-for-of": "npm:^7.26.9" + "@babel/plugin-transform-function-name": "npm:^7.25.9" + "@babel/plugin-transform-json-strings": "npm:^7.25.9" + "@babel/plugin-transform-literals": "npm:^7.25.9" + "@babel/plugin-transform-logical-assignment-operators": "npm:^7.25.9" + "@babel/plugin-transform-member-expression-literals": "npm:^7.25.9" + "@babel/plugin-transform-modules-amd": "npm:^7.25.9" + "@babel/plugin-transform-modules-commonjs": "npm:^7.26.3" + "@babel/plugin-transform-modules-systemjs": "npm:^7.25.9" + "@babel/plugin-transform-modules-umd": "npm:^7.25.9" + "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.25.9" + "@babel/plugin-transform-new-target": "npm:^7.25.9" + "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.26.6" + "@babel/plugin-transform-numeric-separator": "npm:^7.25.9" + "@babel/plugin-transform-object-rest-spread": "npm:^7.25.9" + "@babel/plugin-transform-object-super": "npm:^7.25.9" + "@babel/plugin-transform-optional-catch-binding": "npm:^7.25.9" + "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" + "@babel/plugin-transform-parameters": "npm:^7.25.9" + "@babel/plugin-transform-private-methods": "npm:^7.25.9" + "@babel/plugin-transform-private-property-in-object": "npm:^7.25.9" + "@babel/plugin-transform-property-literals": "npm:^7.25.9" + "@babel/plugin-transform-regenerator": "npm:^7.25.9" + "@babel/plugin-transform-regexp-modifiers": "npm:^7.26.0" + "@babel/plugin-transform-reserved-words": "npm:^7.25.9" + "@babel/plugin-transform-shorthand-properties": "npm:^7.25.9" + "@babel/plugin-transform-spread": "npm:^7.25.9" + "@babel/plugin-transform-sticky-regex": "npm:^7.25.9" + "@babel/plugin-transform-template-literals": "npm:^7.26.8" + "@babel/plugin-transform-typeof-symbol": "npm:^7.26.7" + "@babel/plugin-transform-unicode-escapes": "npm:^7.25.9" + "@babel/plugin-transform-unicode-property-regex": "npm:^7.25.9" + "@babel/plugin-transform-unicode-regex": "npm:^7.25.9" + "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.9" + "@babel/preset-modules": "npm:0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2: "npm:^0.4.10" + babel-plugin-polyfill-corejs3: "npm:^0.11.0" + babel-plugin-polyfill-regenerator: "npm:^0.6.1" + core-js-compat: "npm:^3.40.0" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/ac6fad331760c0bc25ed428b7696b297bad7046a75f30e544b392acfb33709f12316b9a5b0c8606f933d5756e1b9d527b46fda09693db52e851325443dd6a574 + languageName: node + linkType: hard + +"@babel/preset-modules@npm:0.1.6-no-external-plugins": + version: 0.1.6-no-external-plugins + resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.0.0" + "@babel/types": "npm:^7.4.4" + esutils: "npm:^2.0.2" + peerDependencies: + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 10/039aba98a697b920d6440c622aaa6104bb6076d65356b29dad4b3e6627ec0354da44f9621bafbeefd052cd4ac4d7f88c9a2ab094efcb50963cb352781d0c6428 + languageName: node + linkType: hard + +"@babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.25.9": + version: 7.26.3 + resolution: "@babel/preset-react@npm:7.26.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-transform-react-display-name": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx": "npm:^7.25.9" + "@babel/plugin-transform-react-jsx-development": "npm:^7.25.9" + "@babel/plugin-transform-react-pure-annotations": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/88cb78c402b79f32389ee06451da51698d5b1da7641d9a47482883f537fe5441a138bd4c077d8533fd6d557406b08911c47b94402cea843db598e020bdd9a373 + languageName: node + linkType: hard + +"@babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9": + version: 7.26.0 + resolution: "@babel/preset-typescript@npm:7.26.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + "@babel/plugin-syntax-jsx": "npm:^7.25.9" + "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" + "@babel/plugin-transform-typescript": "npm:^7.25.9" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/81a60826160163a3daae017709f42147744757b725b50c9024ef3ee5a402ee45fd2e93eaecdaaa22c81be91f7940916249cfb7711366431cfcacc69c95878c03 + languageName: node + linkType: hard + +"@babel/runtime-corejs3@npm:^7.25.9": + version: 7.26.10 + resolution: "@babel/runtime-corejs3@npm:7.26.10" + dependencies: + core-js-pure: "npm:^3.30.2" + regenerator-runtime: "npm:^0.14.0" + checksum: 10/6da4663c8b1c46410fb698188754ef69d7600c90b47e997a5a002fe069af9bbe5075f7f8c88df3559222536383b47406613e3158d5dcc08b013fc4bcc287324f + languageName: node + linkType: hard + +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.25.9, @babel/runtime@npm:^7.8.4": + version: 7.26.10 + resolution: "@babel/runtime@npm:7.26.10" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: 10/9d7ff8e96abe3791047c1138789c742411e3ef19c4d7ca18ce916f83cec92c06ec5dc64401759f6dd1e377cf8a01bbd2c62e033eb7550f435cf6579768d0d4a5 + languageName: node + linkType: hard + +"@babel/template@npm:^7.25.9, @babel/template@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/template@npm:7.27.2" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@babel/parser": "npm:^7.27.2" + "@babel/types": "npm:^7.27.1" + checksum: 10/fed15a84beb0b9340e5f81566600dbee5eccd92e4b9cc42a944359b1aa1082373391d9d5fc3656981dff27233ec935d0bc96453cf507f60a4b079463999244d8 + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.26.5, @babel/traverse@npm:^7.26.8, @babel/traverse@npm:^7.26.9, @babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.27.3, @babel/traverse@npm:^7.27.4": + version: 7.27.4 + resolution: "@babel/traverse@npm:7.27.4" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.27.3" + "@babel/parser": "npm:^7.27.4" + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.27.3" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/4debb80b9068a46e188e478272f3b6820e16d17e2651e82d0a0457176b0c3b2489994f0a0d6e8941ee90218b0a8a69fe52ba350c1aa66eb4c72570d6b2405f91 + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.25.9, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.27.6, @babel/types@npm:^7.4.4": + version: 7.27.6 + resolution: "@babel/types@npm:7.27.6" + dependencies: + "@babel/helper-string-parser": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.27.1" + checksum: 10/174741c667775680628a09117828bbeffb35ea543f59bf80649d0d60672f7815a0740ddece3cca87516199033a039166a6936434131fce2b6a820227e64f91ae + languageName: node + linkType: hard + +"@colors/colors@npm:1.5.0": + version: 1.5.0 + resolution: "@colors/colors@npm:1.5.0" + checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 + languageName: node + linkType: hard + +"@csstools/cascade-layer-name-parser@npm:^2.0.5": + version: 2.0.5 + resolution: "@csstools/cascade-layer-name-parser@npm:2.0.5" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.5 + "@csstools/css-tokenizer": ^3.0.4 + checksum: 10/fb26ae1db6f7a71ee0c3fdaea89f5325f88d7a0b2505fcf4b75e94f2c816ef1edb2961eecbc397df06f67d696ccc6bc99588ea9ee07dd7632bf10febf6b67ed9 + languageName: node + linkType: hard + +"@csstools/color-helpers@npm:^5.0.2": + version: 5.0.2 + resolution: "@csstools/color-helpers@npm:5.0.2" + checksum: 10/8763079c54578bd2215c68de0795edb9cfa29bffa29625bff89f3c47d9df420d86296ff3a6fa8c29ca037bbaa64dc10a963461233341de0516a3161a3b549e7b + languageName: node + linkType: hard + +"@csstools/css-calc@npm:^2.1.4": + version: 2.1.4 + resolution: "@csstools/css-calc@npm:2.1.4" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.5 + "@csstools/css-tokenizer": ^3.0.4 + checksum: 10/06975b650c0f44c60eeb7afdb3fd236f2dd607b2c622e0bc908d3f54de39eb84e0692833320d03dac04bd6c1ab0154aa3fa0dd442bd9e5f917cf14d8e2ba8d74 + languageName: node + linkType: hard + +"@csstools/css-color-parser@npm:^3.0.10": + version: 3.0.10 + resolution: "@csstools/css-color-parser@npm:3.0.10" + dependencies: + "@csstools/color-helpers": "npm:^5.0.2" + "@csstools/css-calc": "npm:^2.1.4" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.5 + "@csstools/css-tokenizer": ^3.0.4 + checksum: 10/d5619639f067c0a6ac95ecce6ad6adce55a5500599a4444817ac6bb5ed2a9928a08f0978a148d4687de7ebf05c068c1a1c7f9eaa039984830a84148e011cbc05 + languageName: node + linkType: hard + +"@csstools/css-parser-algorithms@npm:^3.0.5": + version: 3.0.5 + resolution: "@csstools/css-parser-algorithms@npm:3.0.5" + peerDependencies: + "@csstools/css-tokenizer": ^3.0.4 + checksum: 10/e93083b5cb36a3c1e7a47ce10cf62961d05bd1e4c608bb3ee50186ff740157ab0ec16a3956f7b86251efd10703034d849693201eea858ae904848c68d2d46ada + languageName: node + linkType: hard + +"@csstools/css-tokenizer@npm:^3.0.4": + version: 3.0.4 + resolution: "@csstools/css-tokenizer@npm:3.0.4" + checksum: 10/eb6c84c086312f6bb8758dfe2c85addd7475b0927333c5e39a4d59fb210b9810f8c346972046f95e60a721329cffe98895abe451e51de753ad1ca7a8c24ec65f + languageName: node + linkType: hard + +"@csstools/media-query-list-parser@npm:^4.0.3": + version: 4.0.3 + resolution: "@csstools/media-query-list-parser@npm:4.0.3" + peerDependencies: + "@csstools/css-parser-algorithms": ^3.0.5 + "@csstools/css-tokenizer": ^3.0.4 + checksum: 10/ac4e34c21a1c7fc8b788274f316c29ff2f07e7a08996d27b9beb06454666591be9946362c1b7c4d342558c278c8e7d0e35655043e47a9ffd94c3fdb292fbe020 + languageName: node + linkType: hard + +"@csstools/postcss-cascade-layers@npm:^5.0.1": + version: 5.0.1 + resolution: "@csstools/postcss-cascade-layers@npm:5.0.1" + dependencies: + "@csstools/selector-specificity": "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/ca0a3e324d914567f36e9ec48da290c9d10e9315dc77632f14ec8a8c608fd3b573ca146eb8aa81382013d998c4896f6ac53af48c71b23d0b3fa1b4ea5441b599 + languageName: node + linkType: hard + +"@csstools/postcss-color-function@npm:^4.0.10": + version: 4.0.10 + resolution: "@csstools/postcss-color-function@npm:4.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/bf7650eab21784bfd3ed5618e1df081a989cedccf54b80accc72819dd463c4c57d99b9c4e5479cac5d889f39d09cc8ad610b82148300591e6bc547b238464056 + languageName: node + linkType: hard + +"@csstools/postcss-color-mix-function@npm:^3.0.10": + version: 3.0.10 + resolution: "@csstools/postcss-color-mix-function@npm:3.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/ea52be6f45979297de77310a095d2df105e0da064300f489572cb9b78e4906e9e6bbbe8fdfc82cf2e01a8bdb2473c36a234852ad5c5ea1eda580b9bc222159b4 + languageName: node + linkType: hard + +"@csstools/postcss-color-mix-variadic-function-arguments@npm:^1.0.0": + version: 1.0.0 + resolution: "@csstools/postcss-color-mix-variadic-function-arguments@npm:1.0.0" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/f12bf1d63eaf348ebe2ef9c79ddb1a63df3370a556f02d11cbe3ab8540016bd47fd7384948a426207f92131e0f5981d3695fbd046b5768c0ec63e45cc92e31a7 + languageName: node + linkType: hard + +"@csstools/postcss-content-alt-text@npm:^2.0.6": + version: 2.0.6 + resolution: "@csstools/postcss-content-alt-text@npm:2.0.6" + dependencies: + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/2edca1f35b9d59cc3933a318db8cdeaed435169c35d1b0e9fb394349d4633c544ca03243b21be849c8d9f0986a9b10125635e7ed33ef89c28c1346cdb05fdab6 + languageName: node + linkType: hard + +"@csstools/postcss-exponential-functions@npm:^2.0.9": + version: 2.0.9 + resolution: "@csstools/postcss-exponential-functions@npm:2.0.9" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/80d5847d747fc67c32ee3ba49f9c9290654fb086c58b2f13256b14124b7349dac68ba8e107f631248cef2448ca57ef18adbbbc816dd63a54ba91826345373f39 + languageName: node + linkType: hard + +"@csstools/postcss-font-format-keywords@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/postcss-font-format-keywords@npm:4.0.0" + dependencies: + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/63091d4748cfc5a51e3c288cd620f058a4e776ba15da6180edaee94aaad9c4e92076f575d064dabc00b28966b33dd1e59f84a6ca6a66aed59556ef92a0dfed45 + languageName: node + linkType: hard + +"@csstools/postcss-gamut-mapping@npm:^2.0.10": + version: 2.0.10 + resolution: "@csstools/postcss-gamut-mapping@npm:2.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/371449cc8c3db29a27b75afeb500777150f9f9e4edca71f63f2de12bc2c68f4157450ed6a6fdddfaa5596f4a17922176b862d14458a7ce6c15c81d06a0e9fc12 + languageName: node + linkType: hard + +"@csstools/postcss-gradients-interpolation-method@npm:^5.0.10": + version: 5.0.10 + resolution: "@csstools/postcss-gradients-interpolation-method@npm:5.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/dcc18133442b8c72e94b77277d2213a3571526682fc351fd0126cc2490e317438d2dff5101374992b251cb3a25edfe86f79f7fe9cc88c96372aeffd80ba75194 + languageName: node + linkType: hard + +"@csstools/postcss-hwb-function@npm:^4.0.10": + version: 4.0.10 + resolution: "@csstools/postcss-hwb-function@npm:4.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/b2a003fe844b0d5b44a1ba46754afdb298be94a771e2b4109391e774b07a04bfad0bc8d9e833bb862567bed533f54cdc146cdc5b869b69bdd3e5526e2651c200 + languageName: node + linkType: hard + +"@csstools/postcss-ic-unit@npm:^4.0.2": + version: 4.0.2 + resolution: "@csstools/postcss-ic-unit@npm:4.0.2" + dependencies: + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/4242221d9c1ed5f6062b6816a5cbbfb121aa919a0468bb786ff84e8eaf4e7656754b4587c51e9b2ae5bc6a7e53ac17ce05297b095866c8a02edb3b31ce74e18e + languageName: node + linkType: hard + +"@csstools/postcss-initial@npm:^2.0.1": + version: 2.0.1 + resolution: "@csstools/postcss-initial@npm:2.0.1" + peerDependencies: + postcss: ^8.4 + checksum: 10/d0e7205d1db23f7957472738f039c9029f2cc80a7ed03a47d459a543f687327e3a92e75ad871dd0ca0522999e00cd834c4b225e3fbee72edffbb051ea6cec014 + languageName: node + linkType: hard + +"@csstools/postcss-is-pseudo-class@npm:^5.0.1": + version: 5.0.1 + resolution: "@csstools/postcss-is-pseudo-class@npm:5.0.1" + dependencies: + "@csstools/selector-specificity": "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/2f7cedf387f54cd061c4f4c2689fc9cac0dfe8f2c8d527e49ce49b810abccbb17a67f0b536de31486472609da5ae9bdef372ea9be1079231a3a1d87f5a48c173 + languageName: node + linkType: hard + +"@csstools/postcss-light-dark-function@npm:^2.0.9": + version: 2.0.9 + resolution: "@csstools/postcss-light-dark-function@npm:2.0.9" + dependencies: + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/98a68dc44dfc053b8afddf96bcf8790703d58455bc36475908255f716b88a1e87e49807ff7ae8ecf9c7345ee88524eadd2a872c8ab347348dee1a37f58c58bc4 + languageName: node + linkType: hard + +"@csstools/postcss-logical-float-and-clear@npm:^3.0.0": + version: 3.0.0 + resolution: "@csstools/postcss-logical-float-and-clear@npm:3.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/793d9a89c28d4809a83b6111d321f60947a59f119d61046e5c4023ce2caedbb221298e69b6df38995e51b763545807db7b03da47e47461622f32928fec92b65f + languageName: node + linkType: hard + +"@csstools/postcss-logical-overflow@npm:^2.0.0": + version: 2.0.0 + resolution: "@csstools/postcss-logical-overflow@npm:2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/bf73ea1d7754f59773af5a7b434e9eaa2ce05c8fe7aa26a726dce8f2a42abb0f5686fbf9672d25912250226174c35f2c5737ca072d21f8b68420500b7449fe58 + languageName: node + linkType: hard + +"@csstools/postcss-logical-overscroll-behavior@npm:^2.0.0": + version: 2.0.0 + resolution: "@csstools/postcss-logical-overscroll-behavior@npm:2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/bf043fdad02b9578fc2dcddb409b014a15dee65a9813ceb583237dff1caf807e18101f68bde2b0d8b685139d823114ab8deed6da3027878d11a945755824d3b1 + languageName: node + linkType: hard + +"@csstools/postcss-logical-resize@npm:^3.0.0": + version: 3.0.0 + resolution: "@csstools/postcss-logical-resize@npm:3.0.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/3be1133a9ac27e0a0d73b19d573adc00ad78a697522eaf6c9de90260882ba8ff0904c7ab3e68379ee7724e28661c4b497cb665e258214bc8355f4a0d91021c46 + languageName: node + linkType: hard + +"@csstools/postcss-logical-viewport-units@npm:^3.0.4": + version: 3.0.4 + resolution: "@csstools/postcss-logical-viewport-units@npm:3.0.4" + dependencies: + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/ddb8d9b473c55cce1c1261652d657d33d9306d80112eac578d53b05dd48a5607ea2064fcf6bc298ccc1e63143e11517d35230bad6063dae14d445530c45a81ec + languageName: node + linkType: hard + +"@csstools/postcss-media-minmax@npm:^2.0.9": + version: 2.0.9 + resolution: "@csstools/postcss-media-minmax@npm:2.0.9" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/media-query-list-parser": "npm:^4.0.3" + peerDependencies: + postcss: ^8.4 + checksum: 10/ddd35129dc482a2cffe44cc75c48844cee56370f551e7e3abcfa0a158c3a2a48d8a2196e82e223fdf794a066688d423558e211f69010cfbc6044c989464d3899 + languageName: node + linkType: hard + +"@csstools/postcss-media-queries-aspect-ratio-number-values@npm:^3.0.5": + version: 3.0.5 + resolution: "@csstools/postcss-media-queries-aspect-ratio-number-values@npm:3.0.5" + dependencies: + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/media-query-list-parser": "npm:^4.0.3" + peerDependencies: + postcss: ^8.4 + checksum: 10/b0124a071c7880327b23ebcd77e2c74594a852bf9193f2f552630d9e8b0996789884c05cf4ebff4dbf5c3bfb5e6cb70e9e52a740f150034bfae87208898d3d9d + languageName: node + linkType: hard + +"@csstools/postcss-nested-calc@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/postcss-nested-calc@npm:4.0.0" + dependencies: + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/f334861687d7e3a4b9c26940e767a06f07e0095cab405a5b086fca407d6f743c57b552d4504ba7d5b1700a97da3507a41bf3bc2d126a26028b79f96ea38b6af5 + languageName: node + linkType: hard + +"@csstools/postcss-normalize-display-values@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/postcss-normalize-display-values@npm:4.0.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/750093837486da6dd0cc66183fe9909a18485f23610669806b708ab9942c721a773997cde37fd7ee085aca3d6de065ffd5609c77df5e2f303d67af106e53726e + languageName: node + linkType: hard + +"@csstools/postcss-oklab-function@npm:^4.0.10": + version: 4.0.10 + resolution: "@csstools/postcss-oklab-function@npm:4.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/d07821fa22def72faa2d2979dd129898e7282682d194f6c043d17103582f161220272c46c45cb0c12ccb9bcfefcb4356df5b7af6b688e9c6340a320dfef2faec + languageName: node + linkType: hard + +"@csstools/postcss-progressive-custom-properties@npm:^4.1.0": + version: 4.1.0 + resolution: "@csstools/postcss-progressive-custom-properties@npm:4.1.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/8936ea4afd420befe9e86a912fb4b64462cfb8a2d743ca1de5432d2980facf5d3fa2115ef3350732f70f835cc2a98d1667b050235d6f5c32873b2845ca7885c8 + languageName: node + linkType: hard + +"@csstools/postcss-random-function@npm:^2.0.1": + version: 2.0.1 + resolution: "@csstools/postcss-random-function@npm:2.0.1" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/d421a790b11675edf493f3e48259636beca164c494ed2883042118b35674d26f04e1a46f9e89203a179e20acc2a1f5912078ec81b330a2c1a1abef7e7387e587 + languageName: node + linkType: hard + +"@csstools/postcss-relative-color-syntax@npm:^3.0.10": + version: 3.0.10 + resolution: "@csstools/postcss-relative-color-syntax@npm:3.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/d09d0e559a538f3e0c120f1c660de799ada6f9f77423b945faf6648d914f8c6a3a6d8647ab6c895e5edaade4dfcceb207d6a44ff5e7e63998330677bf304cb08 + languageName: node + linkType: hard + +"@csstools/postcss-scope-pseudo-class@npm:^4.0.1": + version: 4.0.1 + resolution: "@csstools/postcss-scope-pseudo-class@npm:4.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/043667ad54b3a26e619d6c16129c1f4d8f8c7cd1c52443475aa7782dbc411390c23bd2fe41ea9c6a3f280594abbcdd9d4117a3d7c27cd2a77e31e6fd11e29fc0 + languageName: node + linkType: hard + +"@csstools/postcss-sign-functions@npm:^1.1.4": + version: 1.1.4 + resolution: "@csstools/postcss-sign-functions@npm:1.1.4" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/0afcb008142a0a41df51267d79cf950f4f314394dca7c041e3a0be87df56517ac5400861630a979b5bef49f01c296025106622110384039e3c8f82802d6adcde + languageName: node + linkType: hard + +"@csstools/postcss-stepped-value-functions@npm:^4.0.9": + version: 4.0.9 + resolution: "@csstools/postcss-stepped-value-functions@npm:4.0.9" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/6465a883be42d4cc4a4e83be2626a1351de4bfe84a63641c53e7c39d3c0e109152489ca2d8235625cdf6726341c676b9fbbca18fe80bb5eae8d488a0e42fc5e4 + languageName: node + linkType: hard + +"@csstools/postcss-text-decoration-shorthand@npm:^4.0.2": + version: 4.0.2 + resolution: "@csstools/postcss-text-decoration-shorthand@npm:4.0.2" + dependencies: + "@csstools/color-helpers": "npm:^5.0.2" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/c67b9c6582f7cd05d8a0df5ba98531ca07721c80f3ddf8ec69d1b9da5c6e1fd9313e25ce9ed378bbdf11c6dcd37367f3ebf1d4fabb6af99232e11bb662bfa1f9 + languageName: node + linkType: hard + +"@csstools/postcss-trigonometric-functions@npm:^4.0.9": + version: 4.0.9 + resolution: "@csstools/postcss-trigonometric-functions@npm:4.0.9" + dependencies: + "@csstools/css-calc": "npm:^2.1.4" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + peerDependencies: + postcss: ^8.4 + checksum: 10/c746cd986df061a87de4f2d0129aa2d2e98a2948e5005fe6fe419a9e9ec7a0f7382461847cbd3f67f8f66169bdf23a1d7f53ca6b9922ddd235ec45f2867a8825 + languageName: node + linkType: hard + +"@csstools/postcss-unset-value@npm:^4.0.0": + version: 4.0.0 + resolution: "@csstools/postcss-unset-value@npm:4.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/af65b1c59fe93fa15ad6e5a6edbfd6fe89a3c6e19118a4729592f623c1f55b14518f2de3e8ef2bb6838b1540ebffc9df1a4f1e097dea44abf0faeefeb93d1f58 + languageName: node + linkType: hard + +"@csstools/selector-resolve-nested@npm:^3.0.0": + version: 3.0.0 + resolution: "@csstools/selector-resolve-nested@npm:3.0.0" + peerDependencies: + postcss-selector-parser: ^7.0.0 + checksum: 10/2059b6d1931d157162fb4a79ebdea614cf2b0024609f5e5cba4aa44a80367b25503c22c49bff99de4fa5fa921ce713cc642fa8aa562f3535e8d0126e6b41778e + languageName: node + linkType: hard + +"@csstools/selector-specificity@npm:^5.0.0": + version: 5.0.0 + resolution: "@csstools/selector-specificity@npm:5.0.0" + peerDependencies: + postcss-selector-parser: ^7.0.0 + checksum: 10/8df1a01a1fa52b66c7ba0286e1c77d1faff45009876f09ddcac542a1c4bca9f34ee92a10acf056b8e7b7ac93679c1635496c6cdfd7d88dbaff2b6afd1eb823ec + languageName: node + linkType: hard + +"@csstools/utilities@npm:^2.0.0": + version: 2.0.0 + resolution: "@csstools/utilities@npm:2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/c9c8d82063ec5156d56b056c9124fed95714f05d7c1a64043174b0559aa099989f17a826579f22045384defe152e32d6355b7a9660cfed96819f43fccf277941 + languageName: node + linkType: hard + +"@discoveryjs/json-ext@npm:0.5.7": + version: 0.5.7 + resolution: "@discoveryjs/json-ext@npm:0.5.7" + checksum: 10/b95682a852448e8ef50d6f8e3b7ba288aab3fd98a2bafbe46881a3db0c6e7248a2debe9e1ee0d4137c521e4743ca5bbcb1c0765c9d7b3e0ef53231506fec42b4 + languageName: node + linkType: hard + +"@docsearch/css@npm:3.9.0": + version: 3.9.0 + resolution: "@docsearch/css@npm:3.9.0" + checksum: 10/088a05f7e7d5192feee1f5c8bfffcba13c87de2c45588080513be238ee974406ca9ad2fe7434082ad0ca23f54c0d39d486903da780904a03cbbfbe05db488cfe + languageName: node + linkType: hard + +"@docsearch/react@npm:^3.9.0": + version: 3.9.0 + resolution: "@docsearch/react@npm:3.9.0" + dependencies: + "@algolia/autocomplete-core": "npm:1.17.9" + "@algolia/autocomplete-preset-algolia": "npm:1.17.9" + "@docsearch/css": "npm:3.9.0" + algoliasearch: "npm:^5.14.2" + peerDependencies: + "@types/react": ">= 16.8.0 < 20.0.0" + react: ">= 16.8.0 < 20.0.0" + react-dom: ">= 16.8.0 < 20.0.0" + search-insights: ">= 1 < 3" + peerDependenciesMeta: + "@types/react": + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + checksum: 10/26f8dbb7bb88ac2b07c41104ab4f13054495feaea613eb8274ba637435eadce9d192f6b52526ef1d3d36da740015b1f213aeb94cc58497718bd4ac32c1ed974b + languageName: node + linkType: hard + +"@docusaurus/babel@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/babel@npm:3.8.1" + dependencies: + "@babel/core": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" + "@babel/plugin-transform-runtime": "npm:^7.25.9" + "@babel/preset-env": "npm:^7.25.9" + "@babel/preset-react": "npm:^7.25.9" + "@babel/preset-typescript": "npm:^7.25.9" + "@babel/runtime": "npm:^7.25.9" + "@babel/runtime-corejs3": "npm:^7.25.9" + "@babel/traverse": "npm:^7.25.9" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + babel-plugin-dynamic-import-node: "npm:^2.3.3" + fs-extra: "npm:^11.1.1" + tslib: "npm:^2.6.0" + checksum: 10/3294c488a3d6ee4569ecc7782b200af52fbfbb3f5a3dce505f8e7d2bd5979c206a245e7fb83ac1302b23035075b5c09943049f8cfe0a582032fcb9542ea180a0 + languageName: node + linkType: hard + +"@docusaurus/bundler@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/bundler@npm:3.8.1" + dependencies: + "@babel/core": "npm:^7.25.9" + "@docusaurus/babel": "npm:3.8.1" + "@docusaurus/cssnano-preset": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + babel-loader: "npm:^9.2.1" + clean-css: "npm:^5.3.3" + copy-webpack-plugin: "npm:^11.0.0" + css-loader: "npm:^6.11.0" + css-minimizer-webpack-plugin: "npm:^5.0.1" + cssnano: "npm:^6.1.2" + file-loader: "npm:^6.2.0" + html-minifier-terser: "npm:^7.2.0" + mini-css-extract-plugin: "npm:^2.9.2" + null-loader: "npm:^4.0.1" + postcss: "npm:^8.5.4" + postcss-loader: "npm:^7.3.4" + postcss-preset-env: "npm:^10.2.1" + terser-webpack-plugin: "npm:^5.3.9" + tslib: "npm:^2.6.0" + url-loader: "npm:^4.1.1" + webpack: "npm:^5.95.0" + webpackbar: "npm:^6.0.1" + peerDependencies: + "@docusaurus/faster": "*" + peerDependenciesMeta: + "@docusaurus/faster": + optional: true + checksum: 10/2373bb954020185e97c74a35de4c89f70f603bf1cd6679dcd4d04a5dfaf7336a9d42fb303d221c3b1c540dbd4f5b97a380e570d3e1971a9acd456d151798d1dd + languageName: node + linkType: hard + +"@docusaurus/core@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/core@npm:3.8.1" + dependencies: + "@docusaurus/babel": "npm:3.8.1" + "@docusaurus/bundler": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + boxen: "npm:^6.2.1" + chalk: "npm:^4.1.2" + chokidar: "npm:^3.5.3" + cli-table3: "npm:^0.6.3" + combine-promises: "npm:^1.1.0" + commander: "npm:^5.1.0" + core-js: "npm:^3.31.1" + detect-port: "npm:^1.5.1" + escape-html: "npm:^1.0.3" + eta: "npm:^2.2.0" + eval: "npm:^0.1.8" + execa: "npm:5.1.1" + fs-extra: "npm:^11.1.1" + html-tags: "npm:^3.3.1" + html-webpack-plugin: "npm:^5.6.0" + leven: "npm:^3.1.0" + lodash: "npm:^4.17.21" + open: "npm:^8.4.0" + p-map: "npm:^4.0.0" + prompts: "npm:^2.4.2" + react-helmet-async: "npm:@slorber/react-helmet-async@1.3.0" + react-loadable: "npm:@docusaurus/react-loadable@6.0.0" + react-loadable-ssr-addon-v5-slorber: "npm:^1.0.1" + react-router: "npm:^5.3.4" + react-router-config: "npm:^5.1.1" + react-router-dom: "npm:^5.3.4" + semver: "npm:^7.5.4" + serve-handler: "npm:^6.1.6" + tinypool: "npm:^1.0.2" + tslib: "npm:^2.6.0" + update-notifier: "npm:^6.0.2" + webpack: "npm:^5.95.0" + webpack-bundle-analyzer: "npm:^4.10.2" + webpack-dev-server: "npm:^4.15.2" + webpack-merge: "npm:^6.0.1" + peerDependencies: + "@mdx-js/react": ^3.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + bin: + docusaurus: bin/docusaurus.mjs + checksum: 10/278f194d0107ebe07169845293dc01dda3fa816881dffd1a02b5481676f97e69d2801819765baec4ea5a44101ce1cf82b34e17083754878ce886f6203cd61cb2 + languageName: node + linkType: hard + +"@docusaurus/cssnano-preset@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/cssnano-preset@npm:3.8.1" + dependencies: + cssnano-preset-advanced: "npm:^6.1.2" + postcss: "npm:^8.5.4" + postcss-sort-media-queries: "npm:^5.2.0" + tslib: "npm:^2.6.0" + checksum: 10/4fada596bedf182007ec12ca4e4af373fa7763724d9219ea695a71f9325f2984c0b76a4dbbeb39f2fea14b174ff7e285915c463156f7cd02fe583c44e361c2ba + languageName: node + linkType: hard + +"@docusaurus/faster@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/faster@npm:3.8.1" + dependencies: + "@docusaurus/types": "npm:3.8.1" + "@rspack/core": "npm:^1.3.15" + "@swc/core": "npm:^1.7.39" + "@swc/html": "npm:^1.7.39" + browserslist: "npm:^4.24.2" + lightningcss: "npm:^1.27.0" + swc-loader: "npm:^0.2.6" + tslib: "npm:^2.6.0" + webpack: "npm:^5.95.0" + peerDependencies: + "@docusaurus/types": "*" + checksum: 10/4dfd690a410f6a8a2508e6f7391bf56a787163e49da3ed74ac122d6b044f628f88e56d5179454f09ed4a6916cdf1c841de8e96a6d63b4ff477f055de1056f5f4 + languageName: node + linkType: hard + +"@docusaurus/logger@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/logger@npm:3.8.1" + dependencies: + chalk: "npm:^4.1.2" + tslib: "npm:^2.6.0" + checksum: 10/040d67de6d096fa251f277c3fc343797030a19858de4da08bd3dc304c2f5261ed03aa95b17d4d0b53a3b48681e7f867745db6a66855c2c6ab78852598e187821 + languageName: node + linkType: hard + +"@docusaurus/mdx-loader@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/mdx-loader@npm:3.8.1" + dependencies: + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + "@mdx-js/mdx": "npm:^3.0.0" + "@slorber/remark-comment": "npm:^1.0.0" + escape-html: "npm:^1.0.3" + estree-util-value-to-estree: "npm:^3.0.1" + file-loader: "npm:^6.2.0" + fs-extra: "npm:^11.1.1" + image-size: "npm:^2.0.2" + mdast-util-mdx: "npm:^3.0.0" + mdast-util-to-string: "npm:^4.0.0" + rehype-raw: "npm:^7.0.0" + remark-directive: "npm:^3.0.0" + remark-emoji: "npm:^4.0.0" + remark-frontmatter: "npm:^5.0.0" + remark-gfm: "npm:^4.0.0" + stringify-object: "npm:^3.3.0" + tslib: "npm:^2.6.0" + unified: "npm:^11.0.3" + unist-util-visit: "npm:^5.0.0" + url-loader: "npm:^4.1.1" + vfile: "npm:^6.0.1" + webpack: "npm:^5.88.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/7d59879ff5a39947b9cfd28e58217af4e86963fcf1ecfbe2809a9edacb459e5d439fec70770dd8907d06cddfddcbea8eb93ca1fd2ede401569e72a3f6e5446f5 + languageName: node + linkType: hard + +"@docusaurus/module-type-aliases@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/module-type-aliases@npm:3.8.1" + dependencies: + "@docusaurus/types": "npm:3.8.1" + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + "@types/react-router-config": "npm:*" + "@types/react-router-dom": "npm:*" + react-helmet-async: "npm:@slorber/react-helmet-async@1.3.0" + react-loadable: "npm:@docusaurus/react-loadable@6.0.0" + peerDependencies: + react: "*" + react-dom: "*" + checksum: 10/db3a23763837fc0155ec25053d36179ddd213cca2aeba5f1372894f0e5be82719d625f53057d5e9c5cef1fa862e37fe754a1a83a3005c9e1d22b6bb80c313024 + languageName: node + linkType: hard + +"@docusaurus/plugin-content-blog@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-content-blog@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/theme-common": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + cheerio: "npm:1.0.0-rc.12" + feed: "npm:^4.2.2" + fs-extra: "npm:^11.1.1" + lodash: "npm:^4.17.21" + schema-dts: "npm:^1.1.2" + srcset: "npm:^4.0.0" + tslib: "npm:^2.6.0" + unist-util-visit: "npm:^5.0.0" + utility-types: "npm:^3.10.0" + webpack: "npm:^5.88.1" + peerDependencies: + "@docusaurus/plugin-content-docs": "*" + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/9141122c8b86a3be74d4c7a0401bf8477ad49039d4ac29d750e424ceda14f343af0c43d8ad87fb712dd3d5c0f2b7ddb40969a7a1a6f9886f89ce401118a4203b + languageName: node + linkType: hard + +"@docusaurus/plugin-content-docs@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-content-docs@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/module-type-aliases": "npm:3.8.1" + "@docusaurus/theme-common": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + "@types/react-router-config": "npm:^5.0.7" + combine-promises: "npm:^1.1.0" + fs-extra: "npm:^11.1.1" + js-yaml: "npm:^4.1.0" + lodash: "npm:^4.17.21" + schema-dts: "npm:^1.1.2" + tslib: "npm:^2.6.0" + utility-types: "npm:^3.10.0" + webpack: "npm:^5.88.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/525f75a3938f6fc9b6bae5ebc973a041cfafdc41f0d7a4d7bb39cfe6904a8bba6fa7a977dc8c01b09799a907faf1b0d3b051077da69291597479e54e237a1102 + languageName: node + linkType: hard + +"@docusaurus/plugin-content-pages@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-content-pages@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + fs-extra: "npm:^11.1.1" + tslib: "npm:^2.6.0" + webpack: "npm:^5.88.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/e17916f204c49711b02c2293fb29c410eb08ebdcdd7c617e540a094ecbd2f58e26dbed09fd594d9895f7a1215b7c973ecbbcce9f0561084947a3a08007c92a84 + languageName: node + linkType: hard + +"@docusaurus/plugin-css-cascade-layers@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-css-cascade-layers@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + tslib: "npm:^2.6.0" + checksum: 10/90af36fe53be54fe8f569203ccf19d59e18003fda2435a3770787a13d2affb7e2545ed028c33e94397e91fb3ce951527410ccc99589e3fe9aeb37c8d6ba5cfe7 + languageName: node + linkType: hard + +"@docusaurus/plugin-debug@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-debug@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + fs-extra: "npm:^11.1.1" + react-json-view-lite: "npm:^2.3.0" + tslib: "npm:^2.6.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/89fac8490c6fbcd048a069c848fc51bc0e815dfc462dbb2fa6b4143b6b156cf9742cc1a73ff86491bbbeab91ecdef8f0d2fa71578fda343682b559eb216813e8 + languageName: node + linkType: hard + +"@docusaurus/plugin-google-analytics@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-google-analytics@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + tslib: "npm:^2.6.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/fb140f94f93f4b2a690af7daf09330027dbdf55559e312776b23670009f6e51e7830f12f87ab0ae67e038723088bd43e0f1cbeed94bdac03db781e2915dcf253 + languageName: node + linkType: hard + +"@docusaurus/plugin-google-gtag@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-google-gtag@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + "@types/gtag.js": "npm:^0.0.12" + tslib: "npm:^2.6.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/5f2cd8f602e4f003dde7377f4ff771a7431a5e914bb5b49854ed39ab97ec013521866f53b12527a1cabd49a5a0513513db6554f4591f87b32577980475d07332 + languageName: node + linkType: hard + +"@docusaurus/plugin-google-tag-manager@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-google-tag-manager@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + tslib: "npm:^2.6.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/c4b8dd30e21634bfb7609919ba04be54ff19c9e7c4657eef2cba622886b5d223e9f586239b52b3ccb464db77c0a87827cd804cd23f2c000f3309ccde06af296b + languageName: node + linkType: hard + +"@docusaurus/plugin-sitemap@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-sitemap@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + fs-extra: "npm:^11.1.1" + sitemap: "npm:^7.1.1" + tslib: "npm:^2.6.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/e37741a6b0aeb429410b586bd8113fc39d065ae163fca550fa5651dba9b89ce65266e6e1e14b2c5098c51d31c61a85107ac4fb86793dcf4dee599a3d19c9a0d9 + languageName: node + linkType: hard + +"@docusaurus/plugin-svgr@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/plugin-svgr@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + "@svgr/core": "npm:8.1.0" + "@svgr/webpack": "npm:^8.1.0" + tslib: "npm:^2.6.0" + webpack: "npm:^5.88.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/b64f4788f789f5831be7deb1303e4a96a577b2acbb2634d3e1c02c6a1833a6449d1d8a6152c7ae17bfd81307f6a0fd4c8ec7e38d170b1a2a87cf862632e492af + languageName: node + linkType: hard + +"@docusaurus/preset-classic@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/preset-classic@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/plugin-content-blog": "npm:3.8.1" + "@docusaurus/plugin-content-docs": "npm:3.8.1" + "@docusaurus/plugin-content-pages": "npm:3.8.1" + "@docusaurus/plugin-css-cascade-layers": "npm:3.8.1" + "@docusaurus/plugin-debug": "npm:3.8.1" + "@docusaurus/plugin-google-analytics": "npm:3.8.1" + "@docusaurus/plugin-google-gtag": "npm:3.8.1" + "@docusaurus/plugin-google-tag-manager": "npm:3.8.1" + "@docusaurus/plugin-sitemap": "npm:3.8.1" + "@docusaurus/plugin-svgr": "npm:3.8.1" + "@docusaurus/theme-classic": "npm:3.8.1" + "@docusaurus/theme-common": "npm:3.8.1" + "@docusaurus/theme-search-algolia": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/cb6776d1c31727ff17b9b7114ea148e907391839ee8a4702f2fd97098671d7781f81f2f8eab0da434c36ec4b6e79d99b5d6a4178f2876c05b1dadb8edc5e45d3 + languageName: node + linkType: hard + +"@docusaurus/theme-classic@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/theme-classic@npm:3.8.1" + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/module-type-aliases": "npm:3.8.1" + "@docusaurus/plugin-content-blog": "npm:3.8.1" + "@docusaurus/plugin-content-docs": "npm:3.8.1" + "@docusaurus/plugin-content-pages": "npm:3.8.1" + "@docusaurus/theme-common": "npm:3.8.1" + "@docusaurus/theme-translations": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + "@mdx-js/react": "npm:^3.0.0" + clsx: "npm:^2.0.0" + copy-text-to-clipboard: "npm:^3.2.0" + infima: "npm:0.2.0-alpha.45" + lodash: "npm:^4.17.21" + nprogress: "npm:^0.2.0" + postcss: "npm:^8.5.4" + prism-react-renderer: "npm:^2.3.0" + prismjs: "npm:^1.29.0" + react-router-dom: "npm:^5.3.4" + rtlcss: "npm:^4.1.0" + tslib: "npm:^2.6.0" + utility-types: "npm:^3.10.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/e5c272d117009ae2976ba029a46e550723d447a771b7afcc8b967b3f9ceed1c25f8c243d8fca410ca2b1444f372652b3e76c8f4f4added6945b50683d31b96ca + languageName: node + linkType: hard + +"@docusaurus/theme-common@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/theme-common@npm:3.8.1" + dependencies: + "@docusaurus/mdx-loader": "npm:3.8.1" + "@docusaurus/module-type-aliases": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + "@types/react-router-config": "npm:*" + clsx: "npm:^2.0.0" + parse-numeric-range: "npm:^1.3.0" + prism-react-renderer: "npm:^2.3.0" + tslib: "npm:^2.6.0" + utility-types: "npm:^3.10.0" + peerDependencies: + "@docusaurus/plugin-content-docs": "*" + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/c1a1ebe04991b7c23bdda91378c0550e0a046e13fb0c2885a7e18305c8662f294b87ac5bd74ad0c307be30b6e17e74e9a76ae911ee10124287f2ce55a7f0501c + languageName: node + linkType: hard + +"@docusaurus/theme-search-algolia@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/theme-search-algolia@npm:3.8.1" + dependencies: + "@docsearch/react": "npm:^3.9.0" + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/plugin-content-docs": "npm:3.8.1" + "@docusaurus/theme-common": "npm:3.8.1" + "@docusaurus/theme-translations": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-validation": "npm:3.8.1" + algoliasearch: "npm:^5.17.1" + algoliasearch-helper: "npm:^3.22.6" + clsx: "npm:^2.0.0" + eta: "npm:^2.2.0" + fs-extra: "npm:^11.1.1" + lodash: "npm:^4.17.21" + tslib: "npm:^2.6.0" + utility-types: "npm:^3.10.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/0d435e1e269929a4fc79d5a965079f5057619a52d9eb2331f58a1b495df759989f12b0d76971e6df0c46a860c7e001f7110bcf422e71713e7bfc0ffd5bd1f6dc + languageName: node + linkType: hard + +"@docusaurus/theme-translations@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/theme-translations@npm:3.8.1" + dependencies: + fs-extra: "npm:^11.1.1" + tslib: "npm:^2.6.0" + checksum: 10/1f995edfc6a19598f5b87bf8cff674094990d7a42ee08745f87d4e28b1741898b334f755347716a8abd7dec1933856244a6dc9ee5c8552fe5f81085c15ddd98d + languageName: node + linkType: hard + +"@docusaurus/types@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/types@npm:3.8.1" + dependencies: + "@mdx-js/mdx": "npm:^3.0.0" + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + commander: "npm:^5.1.0" + joi: "npm:^17.9.2" + react-helmet-async: "npm:@slorber/react-helmet-async@1.3.0" + utility-types: "npm:^3.10.0" + webpack: "npm:^5.95.0" + webpack-merge: "npm:^5.9.0" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/5c1ad8f888d650edd56f57284a6913c2f69aaa201b4757c81f1e71ee41b3b9957db7a1d3f1d243326d1000d3b3157487f91ca1f3a7c1970ea2aa18f88aa4b011 + languageName: node + linkType: hard + +"@docusaurus/utils-common@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/utils-common@npm:3.8.1" + dependencies: + "@docusaurus/types": "npm:3.8.1" + tslib: "npm:^2.6.0" + checksum: 10/2720815d2b96a9d419a3355ce727bb5bf4bd0554f3aab6f62f2510d77b30724745b08da4ebaae7c4d409af0192d92052718d9059902b3a37d83606ade80a62ac + languageName: node + linkType: hard + +"@docusaurus/utils-validation@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/utils-validation@npm:3.8.1" + dependencies: + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/utils": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + fs-extra: "npm:^11.2.0" + joi: "npm:^17.9.2" + js-yaml: "npm:^4.1.0" + lodash: "npm:^4.17.21" + tslib: "npm:^2.6.0" + checksum: 10/00982c3df405376576e32e96f9a056d2483ef589cadd1b5707e473b52a454567e926e461024b0d9bde4c307172eace5d8a27b0030fd2fefe238d2415360caa9a + languageName: node + linkType: hard + +"@docusaurus/utils@npm:3.8.1": + version: 3.8.1 + resolution: "@docusaurus/utils@npm:3.8.1" + dependencies: + "@docusaurus/logger": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@docusaurus/utils-common": "npm:3.8.1" + escape-string-regexp: "npm:^4.0.0" + execa: "npm:5.1.1" + file-loader: "npm:^6.2.0" + fs-extra: "npm:^11.1.1" + github-slugger: "npm:^1.5.0" + globby: "npm:^11.1.0" + gray-matter: "npm:^4.0.3" + jiti: "npm:^1.20.0" + js-yaml: "npm:^4.1.0" + lodash: "npm:^4.17.21" + micromatch: "npm:^4.0.5" + p-queue: "npm:^6.6.2" + prompts: "npm:^2.4.2" + resolve-pathname: "npm:^3.0.0" + tslib: "npm:^2.6.0" + url-loader: "npm:^4.1.1" + utility-types: "npm:^3.10.0" + webpack: "npm:^5.88.1" + checksum: 10/c9622591dd5f76c6dd50711bdf0dbcda26ce68ef676092900f33052bea897ffe6b60d2a25d425364a5ddfe3531b7f4759865dc4463118c2f954a6a82fadd23ec + languageName: node + linkType: hard + +"@esbuild/aix-ppc64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/aix-ppc64@npm:0.25.1" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/android-arm64@npm:0.25.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/android-arm@npm:0.25.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/android-x64@npm:0.25.1" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/darwin-arm64@npm:0.25.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/darwin-x64@npm:0.25.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/freebsd-arm64@npm:0.25.1" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/freebsd-x64@npm:0.25.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-arm64@npm:0.25.1" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-arm@npm:0.25.1" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-ia32@npm:0.25.1" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-loong64@npm:0.25.1" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-mips64el@npm:0.25.1" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-ppc64@npm:0.25.1" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-riscv64@npm:0.25.1" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-s390x@npm:0.25.1" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/linux-x64@npm:0.25.1" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/netbsd-arm64@npm:0.25.1" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/netbsd-x64@npm:0.25.1" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/openbsd-arm64@npm:0.25.1" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/openbsd-x64@npm:0.25.1" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/sunos-x64@npm:0.25.1" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/win32-arm64@npm:0.25.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/win32-ia32@npm:0.25.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.25.1": + version: 0.25.1 + resolution: "@esbuild/win32-x64@npm:0.25.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0": + version: 9.3.0 + resolution: "@hapi/hoek@npm:9.3.0" + checksum: 10/ad83a223787749f3873bce42bd32a9a19673765bf3edece0a427e138859ff729469e68d5fdf9ff6bbee6fb0c8e21bab61415afa4584f527cfc40b59ea1957e70 + languageName: node + linkType: hard + +"@hapi/topo@npm:^5.1.0": + version: 5.1.0 + resolution: "@hapi/topo@npm:5.1.0" + dependencies: + "@hapi/hoek": "npm:^9.0.0" + checksum: 10/084bfa647015f4fd3fdd51fadb2747d09ef2f5e1443d6cbada2988b0c88494f85edf257ec606c790db146ac4e34ff57f3fcb22e3299b8e06ed5c87ba7583495c + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10/4412e9e6713c89c1e66d80bb0bb5a2a93192f10477623a27d08f228ba0316bb880affabc5bfe7f838f58a34d26c2c190da726e576cdfc18c49a72e89adabdcf5 + languageName: node + linkType: hard + +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": "npm:^0.27.8" + checksum: 10/910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + +"@jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" + dependencies: + "@jest/schemas": "npm:^29.6.3" + "@types/istanbul-lib-coverage": "npm:^2.0.0" + "@types/istanbul-reports": "npm:^3.0.0" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.8" + chalk: "npm:^4.0.0" + checksum: 10/f74bf512fd09bbe2433a2ad460b04668b7075235eea9a0c77d6a42222c10a79b9747dc2b2a623f140ed40d6865a2ed8f538f3cbb75169120ea863f29a7ed76cd + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.8 + resolution: "@jridgewell/gen-mapping@npm:0.3.8" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/9d3a56ab3612ab9b85d38b2a93b87f3324f11c5130859957f6500e4ac8ce35f299d5ccc3ecd1ae87597601ecf83cee29e9afd04c18777c24011073992ff946df + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + checksum: 10/0a9aca9320dc9044014ba0ef989b3a8411b0d778895553e3b7ca2ac0a75a20af4a5ad3f202acfb1879fa40466036a4417e1d5b38305baed8b9c1ebe6e4b3e7f5 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@leichtgewicht/ip-codec@npm:^2.0.1": + version: 2.0.5 + resolution: "@leichtgewicht/ip-codec@npm:2.0.5" + checksum: 10/cb98c608392abe59457a14e00134e7dfa57c0c9b459871730cd4e907bb12b834cbd03e08ad8663fea9e486f260da7f1293ccd9af0376bf5524dd8536192f248c + languageName: node + linkType: hard + +"@mdx-js/mdx@npm:^3.0.0": + version: 3.1.0 + resolution: "@mdx-js/mdx@npm:3.1.0" + dependencies: + "@types/estree": "npm:^1.0.0" + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdx": "npm:^2.0.0" + collapse-white-space: "npm:^2.0.0" + devlop: "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + estree-util-scope: "npm:^1.0.0" + estree-walker: "npm:^3.0.0" + hast-util-to-jsx-runtime: "npm:^2.0.0" + markdown-extensions: "npm:^2.0.0" + recma-build-jsx: "npm:^1.0.0" + recma-jsx: "npm:^1.0.0" + recma-stringify: "npm:^1.0.0" + rehype-recma: "npm:^1.0.0" + remark-mdx: "npm:^3.0.0" + remark-parse: "npm:^11.0.0" + remark-rehype: "npm:^11.0.0" + source-map: "npm:^0.7.0" + unified: "npm:^11.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + unist-util-stringify-position: "npm:^4.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + checksum: 10/4bd4e1160e2b2bc9ea2b5b93246ce0e34a11ac5fd420ec025e82fb1120a72b80025d9cb205cce6394bb5f0013f209b9ea453cbda4c0ca4f97a2169df60084742 + languageName: node + linkType: hard + +"@mdx-js/react@npm:3.1.0, @mdx-js/react@npm:^3.0.0": + version: 3.1.0 + resolution: "@mdx-js/react@npm:3.1.0" + dependencies: + "@types/mdx": "npm:^2.0.0" + peerDependencies: + "@types/react": ">=16" + react: ">=16" + checksum: 10/cf89d6392c76091622fb647f205e1ab5cbdf5edd4401dde7092138cefc9fbb6d61428aa63557de0bccca3695d5a8854dd4a93b34a27cb8e27369da7eaeaa3e73 + languageName: node + linkType: hard + +"@module-federation/error-codes@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/error-codes@npm:0.14.3" + checksum: 10/3b6c25940d966648c2531b80edabafd36eddccdd8f68ba6702686a1e4fd2dbaa4a34ef6fb22a4d8a615b907e907e233dd0fd312c49a7369a49669bc1ab414a19 + languageName: node + linkType: hard + +"@module-federation/runtime-core@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/runtime-core@npm:0.14.3" + dependencies: + "@module-federation/error-codes": "npm:0.14.3" + "@module-federation/sdk": "npm:0.14.3" + checksum: 10/7e974a8c051334929e28231fe1552489258ab1b545f0f5ad59644b0288765642f3e908b48c3cc59bc74a326f4f92325788b1a898f89d8f795f8036aa812b2bb6 + languageName: node + linkType: hard + +"@module-federation/runtime-tools@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/runtime-tools@npm:0.14.3" + dependencies: + "@module-federation/runtime": "npm:0.14.3" + "@module-federation/webpack-bundler-runtime": "npm:0.14.3" + checksum: 10/09bc9d482ead7d38d5f9f6e1d45c85f257833302315447b2a17c26dc44046f8aa0563ffdb2f5addbddbf5f8f972c13dc8e80932a8a34780738232332bbdf5ce9 + languageName: node + linkType: hard + +"@module-federation/runtime@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/runtime@npm:0.14.3" + dependencies: + "@module-federation/error-codes": "npm:0.14.3" + "@module-federation/runtime-core": "npm:0.14.3" + "@module-federation/sdk": "npm:0.14.3" + checksum: 10/b7009953998f2624f5ece3da4174d8427d30b2af3b108154f0fa2365aa6c08d167e23b9771508f2c6038a397f21e0e26b93dd09f3d4b7b90eac6b0ee7f1b9ee2 + languageName: node + linkType: hard + +"@module-federation/sdk@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/sdk@npm:0.14.3" + checksum: 10/f359fa15ecebe6e1e80e8fbd4d4969ae2d2d92f0d3e338443c45fba4772327368e086b108adcec585763d974e7462227a9e51b0531826292e2249f2612d0f822 + languageName: node + linkType: hard + +"@module-federation/webpack-bundler-runtime@npm:0.14.3": + version: 0.14.3 + resolution: "@module-federation/webpack-bundler-runtime@npm:0.14.3" + dependencies: + "@module-federation/runtime": "npm:0.14.3" + "@module-federation/sdk": "npm:0.14.3" + checksum: 10/016d1c51e82e230b2d33f67aba7c9ff2cd9f939306a48dfa3aeb0f3939dd82f797e06b478c009459d7516fadbf43024cd0fc13618555a64c470192d9b87ab926 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10/6ab2a9b8a1d67b067922c36f259e3b3dfd6b97b219c540877a4944549a4d49ea5ceba5663905ab5289682f1f3c15ff441d02f0447f620a42e1cb5e1937174d4b + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10/012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10/40033e33e96e97d77fba5a238e4bba4487b8284678906a9f616b5579ddaf868a18874c0054a75402c9fbaaa033a25ceae093af58c9c30278e35c23c9479e79b0 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^3.0.0": + version: 3.0.0 + resolution: "@npmcli/agent@npm:3.0.0" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/775c9a7eb1f88c195dfb3bce70c31d0fe2a12b28b754e25c08a3edb4bc4816bfedb7ac64ef1e730579d078ca19dacf11630e99f8f3c3e0fd7b23caa5fd6d30a6 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/fs@npm:4.0.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/405c4490e1ff11cf299775449a3c254a366a4b1ffc79d87159b0ee7d5558ac9f6a2f8c0735fd6ff3873cef014cb1a44a5f9127cb6a1b2dbc408718cca9365b5a + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + +"@pnpm/config.env-replace@npm:^1.1.0": + version: 1.1.0 + resolution: "@pnpm/config.env-replace@npm:1.1.0" + checksum: 10/fabe35cede1b72ad12877b8bed32f7c2fcd89e94408792c4d69009b886671db7988a2132bc18b7157489d2d0fd4266a06c9583be3d2e10c847bf06687420cb2a + languageName: node + linkType: hard + +"@pnpm/network.ca-file@npm:^1.0.1": + version: 1.0.2 + resolution: "@pnpm/network.ca-file@npm:1.0.2" + dependencies: + graceful-fs: "npm:4.2.10" + checksum: 10/d8d0884646500576bd5390464d13db1bb9a62e32a1069293e5bddb2ad8354b354b7e2d2a35e12850025651e795e6a80ce9e601c66312504667b7e3ee7b52becc + languageName: node + linkType: hard + +"@pnpm/npm-conf@npm:^2.1.0": + version: 2.3.1 + resolution: "@pnpm/npm-conf@npm:2.3.1" + dependencies: + "@pnpm/config.env-replace": "npm:^1.1.0" + "@pnpm/network.ca-file": "npm:^1.0.1" + config-chain: "npm:^1.1.11" + checksum: 10/44fbb0b166eee3e3631ef0e92b1bed6489aa6975e3e722c16577cc0181b81374f5ae90c6e4da183c8160f996e6b4863325525b00542f42d1b757b51ef62bc4e7 + languageName: node + linkType: hard + +"@polka/url@npm:^1.0.0-next.24": + version: 1.0.0-next.28 + resolution: "@polka/url@npm:1.0.0-next.28" + checksum: 10/7402aaf1de781d0eb0870d50cbcd394f949aee11b38a267a5c3b4e3cfee117e920693e6e93ce24c87ae2d477a59634f39d9edde8e86471cae756839b07c79af7 + languageName: node + linkType: hard + +"@rolldown/pluginutils@npm:1.0.0-beta.19": + version: 1.0.0-beta.19 + resolution: "@rolldown/pluginutils@npm:1.0.0-beta.19" + checksum: 10/3b09ebf03e0f30b48770bcd7075c3092c6be09f60e6cb320142a37ae651cfc03974186b24cd7df5bd8110561c1da9d3e8bb4ecff0f2459ca4370da3d62c6806e + languageName: node + linkType: hard + +"@rollup/rollup-android-arm-eabi@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.44.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-android-arm64@npm:4.44.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.44.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.44.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-arm64@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.44.0" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-freebsd-x64@npm:4.44.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.44.0" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-musleabihf@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.44.0" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.44.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.44.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-loongarch64-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.44.0" + conditions: os=linux & cpu=loong64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.44.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.44.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-musl@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.44.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-s390x-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.44.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.44.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.44.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.44.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.44.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.44.0": + version: 4.44.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.44.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding-darwin-arm64@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-darwin-arm64@npm:1.3.15" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-darwin-x64@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-darwin-x64@npm:1.3.15" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-gnu@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-linux-arm64-gnu@npm:1.3.15" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-musl@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-linux-arm64-musl@npm:1.3.15" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-gnu@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-linux-x64-gnu@npm:1.3.15" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-musl@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-linux-x64-musl@npm:1.3.15" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-win32-arm64-msvc@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-win32-arm64-msvc@npm:1.3.15" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-win32-ia32-msvc@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-win32-ia32-msvc@npm:1.3.15" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rspack/binding-win32-x64-msvc@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding-win32-x64-msvc@npm:1.3.15" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding@npm:1.3.15": + version: 1.3.15 + resolution: "@rspack/binding@npm:1.3.15" + dependencies: + "@rspack/binding-darwin-arm64": "npm:1.3.15" + "@rspack/binding-darwin-x64": "npm:1.3.15" + "@rspack/binding-linux-arm64-gnu": "npm:1.3.15" + "@rspack/binding-linux-arm64-musl": "npm:1.3.15" + "@rspack/binding-linux-x64-gnu": "npm:1.3.15" + "@rspack/binding-linux-x64-musl": "npm:1.3.15" + "@rspack/binding-win32-arm64-msvc": "npm:1.3.15" + "@rspack/binding-win32-ia32-msvc": "npm:1.3.15" + "@rspack/binding-win32-x64-msvc": "npm:1.3.15" + dependenciesMeta: + "@rspack/binding-darwin-arm64": + optional: true + "@rspack/binding-darwin-x64": + optional: true + "@rspack/binding-linux-arm64-gnu": + optional: true + "@rspack/binding-linux-arm64-musl": + optional: true + "@rspack/binding-linux-x64-gnu": + optional: true + "@rspack/binding-linux-x64-musl": + optional: true + "@rspack/binding-win32-arm64-msvc": + optional: true + "@rspack/binding-win32-ia32-msvc": + optional: true + "@rspack/binding-win32-x64-msvc": + optional: true + checksum: 10/d4918ee41eecbc6d27739d21b674fe64ea7d45433e0f038618475a7cfd91a68d470d6e05d68e109ae917b88c541059c368b7734b2dca3791d7be001a5804030e + languageName: node + linkType: hard + +"@rspack/core@npm:^1.3.15": + version: 1.3.15 + resolution: "@rspack/core@npm:1.3.15" + dependencies: + "@module-federation/runtime-tools": "npm:0.14.3" + "@rspack/binding": "npm:1.3.15" + "@rspack/lite-tapable": "npm:1.0.1" + peerDependencies: + "@swc/helpers": ">=0.5.1" + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 10/9708d4b5112f9a1c23f691e544e9b690cdc7275145772932e6ea0683b6c71d3f304c0f21513b23a01f00cebe8607adc54c23e3ed4ac9dd566e8d9d02b35f5f4e + languageName: node + linkType: hard + +"@rspack/lite-tapable@npm:1.0.1": + version: 1.0.1 + resolution: "@rspack/lite-tapable@npm:1.0.1" + checksum: 10/240b7832965bca5a52d1f03a8539dab5810958ce24b5a670405b2505d81350f10d668f4055648f5918bc18ac033e637bcb7f92189345f0f2f671b546019c2f9e + languageName: node + linkType: hard + +"@sandhose/prettier-animated-logo@npm:1.0.3": + version: 1.0.3 + resolution: "@sandhose/prettier-animated-logo@npm:1.0.3" + dependencies: + react: "npm:^16.2.0" + react-dom: "npm:^16.2.0" + checksum: 10/aa1fe4013a8b4a129fbcaaf8dfcb4f34158a553916f2bea7b60cea74a231a4ac5980e9846dce3f90d290c5e06351016bfddfbad9d5fd5ad181d634c98c0f5f49 + languageName: node + linkType: hard + +"@sideway/address@npm:^4.1.5": + version: 4.1.5 + resolution: "@sideway/address@npm:4.1.5" + dependencies: + "@hapi/hoek": "npm:^9.0.0" + checksum: 10/c4c73ac0339504f34e016d3a687118e7ddf197c1c968579572123b67b230be84caa705f0f634efdfdde7f2e07a6e0224b3c70665dc420d8bc95bf400cfc4c998 + languageName: node + linkType: hard + +"@sideway/formula@npm:^3.0.1": + version: 3.0.1 + resolution: "@sideway/formula@npm:3.0.1" + checksum: 10/8d3ee7f80df4e5204b2cbe92a2a711ca89684965a5c9eb3b316b7051212d3522e332a65a0bb2a07cc708fcd1d0b27fcb30f43ff0bcd5089d7006c7160a89eefe + languageName: node + linkType: hard + +"@sideway/pinpoint@npm:^2.0.0": + version: 2.0.0 + resolution: "@sideway/pinpoint@npm:2.0.0" + checksum: 10/1ed21800128b2b23280ba4c9db26c8ff6142b97a8683f17639fd7f2128aa09046461574800b30fb407afc5b663c2331795ccf3b654d4b38fa096e41a5c786bf8 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 10/297f95ff77c82c54de8c9907f186076e715ff2621c5222ba50b8d40a170661c0c5242c763cba2a4791f0f91cb1d8ffa53ea1d7294570cf8cd4694c0e383e484d + languageName: node + linkType: hard + +"@sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 + languageName: node + linkType: hard + +"@sindresorhus/is@npm:^5.2.0": + version: 5.6.0 + resolution: "@sindresorhus/is@npm:5.6.0" + checksum: 10/b077c325acec98e30f7d86df158aaba2e7af2acb9bb6a00fda4b91578539fbff4ecebe9b934e24fec0e6950de3089d89d79ec02d9062476b20ce185be0e01bd6 + languageName: node + linkType: hard + +"@slorber/remark-comment@npm:^1.0.0": + version: 1.0.0 + resolution: "@slorber/remark-comment@npm:1.0.0" + dependencies: + micromark-factory-space: "npm:^1.0.0" + micromark-util-character: "npm:^1.1.0" + micromark-util-symbol: "npm:^1.0.1" + checksum: 10/c96f1533d09913c57381859966f10a706afd8eb680923924af1c451f3b72f22c31e394028d7535131c10f8682d3c60206da95c50fb4f016fbbd04218c853cc88 + languageName: node + linkType: hard + +"@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3fc8e35d16f5abe0af5efe5851f27581225ac405d6a1ca44cda0df064cddfcc29a428c48c2e4bef6cebf627c9ac2f652a096030edb02cf5a120ce28d3c234710 + languageName: node + linkType: hard + +"@svgr/babel-plugin-remove-jsx-attribute@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-remove-jsx-attribute@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/ff992893c6c4ac802713ba3a97c13be34e62e6d981c813af40daabcd676df68a72a61bd1e692bb1eda3587f1b1d700ea462222ae2153bb0f46886632d4f88d08 + languageName: node + linkType: hard + +"@svgr/babel-plugin-remove-jsx-empty-expression@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-remove-jsx-empty-expression@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/0fb691b63a21bac00da3aa2dccec50d0d5a5b347ff408d60803b84410d8af168f2656e4ba1ee1f24dab0ae4e4af77901f2928752bb0434c1f6788133ec599ec8 + languageName: node + linkType: hard + +"@svgr/babel-plugin-replace-jsx-attribute-value@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-replace-jsx-attribute-value@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/1edda65ef4f4dd8f021143c8ec276a08f6baa6f733b8e8ee2e7775597bf6b97afb47fdeefd579d6ae6c959fe2e634f55cd61d99377631212228c8cfb351b8921 + languageName: node + linkType: hard + +"@svgr/babel-plugin-svg-dynamic-title@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-svg-dynamic-title@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/876cec891488992e6a9aebb8155e2bea4ec461b4718c51de36e988e00e271c6d9d01ef6be17b9effd44b2b3d7db0b41c161a5904a46ae6f38b26b387ad7f3709 + languageName: node + linkType: hard + +"@svgr/babel-plugin-svg-em-dimensions@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-svg-em-dimensions@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/be0e2d391164428327d9ec469a52cea7d93189c6b0e2c290999e048f597d777852f701c64dca44cd45b31ed14a7f859520326e2e4ad7c3a4545d0aa235bc7e9a + languageName: node + linkType: hard + +"@svgr/babel-plugin-transform-react-native-svg@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/babel-plugin-transform-react-native-svg@npm:8.1.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/85b434a57572f53bd2b9f0606f253e1fcf57b4a8c554ec3f2d43ed17f50d8cae200cb3aaf1ec9d626e1456e8b135dce530ae047eb0bed6d4bf98a752d6640459 + languageName: node + linkType: hard + +"@svgr/babel-plugin-transform-svg-component@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-transform-svg-component@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/86ca139c0be0e7df05f103c5f10874387ada1434ca0286584ba9cd367c259d74bf9c86700b856449f46cf674bd6f0cf18f8f034f6d3f0e2ce5e5435c25dbff4b + languageName: node + linkType: hard + +"@svgr/babel-preset@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/babel-preset@npm:8.1.0" + dependencies: + "@svgr/babel-plugin-add-jsx-attribute": "npm:8.0.0" + "@svgr/babel-plugin-remove-jsx-attribute": "npm:8.0.0" + "@svgr/babel-plugin-remove-jsx-empty-expression": "npm:8.0.0" + "@svgr/babel-plugin-replace-jsx-attribute-value": "npm:8.0.0" + "@svgr/babel-plugin-svg-dynamic-title": "npm:8.0.0" + "@svgr/babel-plugin-svg-em-dimensions": "npm:8.0.0" + "@svgr/babel-plugin-transform-react-native-svg": "npm:8.1.0" + "@svgr/babel-plugin-transform-svg-component": "npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3a67930f080b8891e1e8e2595716b879c944d253112bae763dce59807ba23454d162216c8d66a0a0e3d4f38a649ecd6c387e545d1e1261dd69a68e9a3392ee08 + languageName: node + linkType: hard + +"@svgr/core@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/core@npm:8.1.0" + dependencies: + "@babel/core": "npm:^7.21.3" + "@svgr/babel-preset": "npm:8.1.0" + camelcase: "npm:^6.2.0" + cosmiconfig: "npm:^8.1.3" + snake-case: "npm:^3.0.4" + checksum: 10/bc98cd5fc349ab9dcf0c13c2279164726d45878cdac8999090765379c6e897a1b24aca641c12a3c33f578d06f7a09252fb090962a4695c753fb02b627a56bfe6 + languageName: node + linkType: hard + +"@svgr/hast-util-to-babel-ast@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/hast-util-to-babel-ast@npm:8.0.0" + dependencies: + "@babel/types": "npm:^7.21.3" + entities: "npm:^4.4.0" + checksum: 10/243aa9c92d66aa3f1fc82851fe1fa376808a08fcc02719fed38ebfb4e25cf3e3c1282c185300c29953d047c36acb9e3ac588d46b0af55a3b7a5186a6badec8a9 + languageName: node + linkType: hard + +"@svgr/plugin-jsx@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/plugin-jsx@npm:8.1.0" + dependencies: + "@babel/core": "npm:^7.21.3" + "@svgr/babel-preset": "npm:8.1.0" + "@svgr/hast-util-to-babel-ast": "npm:8.0.0" + svg-parser: "npm:^2.0.4" + peerDependencies: + "@svgr/core": "*" + checksum: 10/0418a9780753d3544912ee2dad5d2cf8d12e1ba74df8053651b3886aeda54d5f0f7d2dece0af5e0d838332c4f139a57f0dabaa3ca1afa4d1a765efce6a7656f2 + languageName: node + linkType: hard + +"@svgr/plugin-svgo@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/plugin-svgo@npm:8.1.0" + dependencies: + cosmiconfig: "npm:^8.1.3" + deepmerge: "npm:^4.3.1" + svgo: "npm:^3.0.2" + peerDependencies: + "@svgr/core": "*" + checksum: 10/59d9d214cebaacca9ca71a561f463d8b7e5a68ca9443e4792a42d903acd52259b1790c0680bc6afecc3f00a255a6cbd7ea278a9f625bac443620ea58a590c2d0 + languageName: node + linkType: hard + +"@svgr/webpack@npm:^8.1.0": + version: 8.1.0 + resolution: "@svgr/webpack@npm:8.1.0" + dependencies: + "@babel/core": "npm:^7.21.3" + "@babel/plugin-transform-react-constant-elements": "npm:^7.21.3" + "@babel/preset-env": "npm:^7.20.2" + "@babel/preset-react": "npm:^7.18.6" + "@babel/preset-typescript": "npm:^7.21.0" + "@svgr/core": "npm:8.1.0" + "@svgr/plugin-jsx": "npm:8.1.0" + "@svgr/plugin-svgo": "npm:8.1.0" + checksum: 10/c6eec5b0cf2fb2ecd3a7a362d272eda35330b17c76802a3481f499b5d07ff8f87b31d2571043bff399b051a1767b1e2e499dbf186104d1c06d76f9f1535fac01 + languageName: node + linkType: hard + +"@swc/core-darwin-arm64@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-darwin-arm64@npm:1.11.11" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-darwin-x64@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-darwin-x64@npm:1.11.11" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@swc/core-linux-arm-gnueabihf@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.11.11" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@swc/core-linux-arm64-gnu@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-linux-arm64-gnu@npm:1.11.11" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-arm64-musl@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-linux-arm64-musl@npm:1.11.11" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-linux-x64-gnu@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-linux-x64-gnu@npm:1.11.11" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-x64-musl@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-linux-x64-musl@npm:1.11.11" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-win32-arm64-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-win32-arm64-msvc@npm:1.11.11" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-win32-ia32-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-win32-ia32-msvc@npm:1.11.11" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@swc/core-win32-x64-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/core-win32-x64-msvc@npm:1.11.11" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@swc/core@npm:^1.7.39": + version: 1.11.11 + resolution: "@swc/core@npm:1.11.11" + dependencies: + "@swc/core-darwin-arm64": "npm:1.11.11" + "@swc/core-darwin-x64": "npm:1.11.11" + "@swc/core-linux-arm-gnueabihf": "npm:1.11.11" + "@swc/core-linux-arm64-gnu": "npm:1.11.11" + "@swc/core-linux-arm64-musl": "npm:1.11.11" + "@swc/core-linux-x64-gnu": "npm:1.11.11" + "@swc/core-linux-x64-musl": "npm:1.11.11" + "@swc/core-win32-arm64-msvc": "npm:1.11.11" + "@swc/core-win32-ia32-msvc": "npm:1.11.11" + "@swc/core-win32-x64-msvc": "npm:1.11.11" + "@swc/counter": "npm:^0.1.3" + "@swc/types": "npm:^0.1.19" + peerDependencies: + "@swc/helpers": "*" + dependenciesMeta: + "@swc/core-darwin-arm64": + optional: true + "@swc/core-darwin-x64": + optional: true + "@swc/core-linux-arm-gnueabihf": + optional: true + "@swc/core-linux-arm64-gnu": + optional: true + "@swc/core-linux-arm64-musl": + optional: true + "@swc/core-linux-x64-gnu": + optional: true + "@swc/core-linux-x64-musl": + optional: true + "@swc/core-win32-arm64-msvc": + optional: true + "@swc/core-win32-ia32-msvc": + optional: true + "@swc/core-win32-x64-msvc": + optional: true + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 10/35c005637c8f3dac8c9718852057f81d39541b848d36a9b46b9aa5300b5d11e3e7911704da2eb025d36b0e334caf646af37ff98a3dee8d4f0fcc5f21e60f551a + languageName: node + linkType: hard + +"@swc/counter@npm:^0.1.3": + version: 0.1.3 + resolution: "@swc/counter@npm:0.1.3" + checksum: 10/df8f9cfba9904d3d60f511664c70d23bb323b3a0803ec9890f60133954173047ba9bdeabce28cd70ba89ccd3fd6c71c7b0bd58be85f611e1ffbe5d5c18616598 + languageName: node + linkType: hard + +"@swc/helpers@npm:^0.5.3": + version: 0.5.15 + resolution: "@swc/helpers@npm:0.5.15" + dependencies: + tslib: "npm:^2.8.0" + checksum: 10/e3f32c6deeecfb0fa3f22edff03a7b358e7ce16d27b0f1c8b5cdc3042c5c4ce4da6eac0b781ab7cc4f54696ece657467d56734fb26883439fb00017385364c4c + languageName: node + linkType: hard + +"@swc/html-darwin-arm64@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-darwin-arm64@npm:1.11.11" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@swc/html-darwin-x64@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-darwin-x64@npm:1.11.11" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@swc/html-linux-arm-gnueabihf@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-linux-arm-gnueabihf@npm:1.11.11" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@swc/html-linux-arm64-gnu@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-linux-arm64-gnu@npm:1.11.11" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@swc/html-linux-arm64-musl@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-linux-arm64-musl@npm:1.11.11" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@swc/html-linux-x64-gnu@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-linux-x64-gnu@npm:1.11.11" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@swc/html-linux-x64-musl@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-linux-x64-musl@npm:1.11.11" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@swc/html-win32-arm64-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-win32-arm64-msvc@npm:1.11.11" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@swc/html-win32-ia32-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-win32-ia32-msvc@npm:1.11.11" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@swc/html-win32-x64-msvc@npm:1.11.11": + version: 1.11.11 + resolution: "@swc/html-win32-x64-msvc@npm:1.11.11" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@swc/html@npm:^1.7.39": + version: 1.11.11 + resolution: "@swc/html@npm:1.11.11" + dependencies: + "@swc/counter": "npm:^0.1.3" + "@swc/html-darwin-arm64": "npm:1.11.11" + "@swc/html-darwin-x64": "npm:1.11.11" + "@swc/html-linux-arm-gnueabihf": "npm:1.11.11" + "@swc/html-linux-arm64-gnu": "npm:1.11.11" + "@swc/html-linux-arm64-musl": "npm:1.11.11" + "@swc/html-linux-x64-gnu": "npm:1.11.11" + "@swc/html-linux-x64-musl": "npm:1.11.11" + "@swc/html-win32-arm64-msvc": "npm:1.11.11" + "@swc/html-win32-ia32-msvc": "npm:1.11.11" + "@swc/html-win32-x64-msvc": "npm:1.11.11" + dependenciesMeta: + "@swc/html-darwin-arm64": + optional: true + "@swc/html-darwin-x64": + optional: true + "@swc/html-linux-arm-gnueabihf": + optional: true + "@swc/html-linux-arm64-gnu": + optional: true + "@swc/html-linux-arm64-musl": + optional: true + "@swc/html-linux-x64-gnu": + optional: true + "@swc/html-linux-x64-musl": + optional: true + "@swc/html-win32-arm64-msvc": + optional: true + "@swc/html-win32-ia32-msvc": + optional: true + "@swc/html-win32-x64-msvc": + optional: true + checksum: 10/317a15b4c0962f4982a2d0413aa12e2678ab40fcecb317bcfa002ea11de5e4a95f13f446b73a61b2bc7af84c262497aa6f5ffd0ab34fe717e49947f7e1d7b949 + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.19": + version: 0.1.19 + resolution: "@swc/types@npm:0.1.19" + dependencies: + "@swc/counter": "npm:^0.1.3" + checksum: 10/693147cc9b23147164ddff9cb89477c369fbeb103319584779352a9ff1c72e0a70b97a89dfd97629040db8956d668d7b7a8fed328ffea46a3e8c18577e396994 + languageName: node + linkType: hard + +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" + dependencies: + defer-to-connect: "npm:^2.0.1" + checksum: 10/fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 + languageName: node + linkType: hard + +"@trysound/sax@npm:0.2.0": + version: 0.2.0 + resolution: "@trysound/sax@npm:0.2.0" + checksum: 10/7379713eca480ac0d9b6c7b063e06b00a7eac57092354556c81027066eb65b61ea141a69d0cc2e15d32e05b2834d4c9c2184793a5e36bbf5daf05ee5676af18c + languageName: node + linkType: hard + +"@types/acorn@npm:^4.0.0": + version: 4.0.6 + resolution: "@types/acorn@npm:4.0.6" + dependencies: + "@types/estree": "npm:*" + checksum: 10/e00671d5055d06b07feccb8c2841467a4bdd1ab95a29e191d51cacc08c496e1ba1f54edeefab274bb2ba51cb45b0aaaa662a63897650e9d02e9997ad82124ae4 + languageName: node + linkType: hard + +"@types/babel__core@npm:^7.20.5": + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" + dependencies: + "@babel/parser": "npm:^7.20.7" + "@babel/types": "npm:^7.20.7" + "@types/babel__generator": "npm:*" + "@types/babel__template": "npm:*" + "@types/babel__traverse": "npm:*" + checksum: 10/c32838d280b5ab59d62557f9e331d3831f8e547ee10b4f85cb78753d97d521270cebfc73ce501e9fb27fe71884d1ba75e18658692c2f4117543f0fc4e3e118b3 + languageName: node + linkType: hard + +"@types/babel__generator@npm:*": + version: 7.6.8 + resolution: "@types/babel__generator@npm:7.6.8" + dependencies: + "@babel/types": "npm:^7.0.0" + checksum: 10/b53c215e9074c69d212402990b0ca8fa57595d09e10d94bda3130aa22b55d796e50449199867879e4ea0ee968f3a2099e009cfb21a726a53324483abbf25cd30 + languageName: node + linkType: hard + +"@types/babel__template@npm:*": + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" + dependencies: + "@babel/parser": "npm:^7.1.0" + "@babel/types": "npm:^7.0.0" + checksum: 10/d7a02d2a9b67e822694d8e6a7ddb8f2b71a1d6962dfd266554d2513eefbb205b33ca71a0d163b1caea3981ccf849211f9964d8bd0727124d18ace45aa6c9ae29 + languageName: node + linkType: hard + +"@types/babel__traverse@npm:*": + version: 7.20.6 + resolution: "@types/babel__traverse@npm:7.20.6" + dependencies: + "@babel/types": "npm:^7.20.7" + checksum: 10/63d13a3789aa1e783b87a8b03d9fb2c2c90078de7782422feff1631b8c2a25db626e63a63ac5a1465d47359201c73069dacb4b52149d17c568187625da3064ae + languageName: node + linkType: hard + +"@types/body-parser@npm:*": + version: 1.19.5 + resolution: "@types/body-parser@npm:1.19.5" + dependencies: + "@types/connect": "npm:*" + "@types/node": "npm:*" + checksum: 10/1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82 + languageName: node + linkType: hard + +"@types/bonjour@npm:^3.5.9": + version: 3.5.13 + resolution: "@types/bonjour@npm:3.5.13" + dependencies: + "@types/node": "npm:*" + checksum: 10/e827570e097bd7d625a673c9c208af2d1a22fa3885c0a1646533cf24394c839c3e5f60ac1bc60c0ddcc69c0615078c9fb2c01b42596c7c582d895d974f2409ee + languageName: node + linkType: hard + +"@types/codemirror@npm:^0.0.90": + version: 0.0.90 + resolution: "@types/codemirror@npm:0.0.90" + dependencies: + "@types/tern": "npm:*" + checksum: 10/def1264aacd18b5d933b5c4e5378d7a29418df785cc485df6e750730957cea22c9b392d314fb2bfa664ebf2c541b067190618c8826c8e382901b9ed928d647d0 + languageName: node + linkType: hard + +"@types/connect-history-api-fallback@npm:^1.3.5": + version: 1.5.4 + resolution: "@types/connect-history-api-fallback@npm:1.5.4" + dependencies: + "@types/express-serve-static-core": "npm:*" + "@types/node": "npm:*" + checksum: 10/e1dee43b8570ffac02d2d47a2b4ba80d3ca0dd1840632dafb221da199e59dbe3778d3d7303c9e23c6b401f37c076935a5bc2aeae1c4e5feaefe1c371fe2073fd + languageName: node + linkType: hard + +"@types/connect@npm:*": + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" + dependencies: + "@types/node": "npm:*" + checksum: 10/7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 + languageName: node + linkType: hard + +"@types/debug@npm:^4.0.0": + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" + dependencies: + "@types/ms": "npm:*" + checksum: 10/47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 + languageName: node + linkType: hard + +"@types/eslint-scope@npm:^3.7.7": + version: 3.7.7 + resolution: "@types/eslint-scope@npm:3.7.7" + dependencies: + "@types/eslint": "npm:*" + "@types/estree": "npm:*" + checksum: 10/e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e + languageName: node + linkType: hard + +"@types/eslint@npm:*": + version: 9.6.1 + resolution: "@types/eslint@npm:9.6.1" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 10/719fcd255760168a43d0e306ef87548e1e15bffe361d5f4022b0f266575637acc0ecb85604ac97879ee8ae83c6a6d0613b0ed31d0209ddf22a0fe6d608fc56fe + languageName: node + linkType: hard + +"@types/estree-jsx@npm:^1.0.0": + version: 1.0.5 + resolution: "@types/estree-jsx@npm:1.0.5" + dependencies: + "@types/estree": "npm:*" + checksum: 10/a028ab0cd7b2950168a05c6a86026eb3a36a54a4adfae57f13911d7b49dffe573d9c2b28421b2d029b49b3d02fcd686611be2622dc3dad6d9791166c083f6008 + languageName: node + linkType: hard + +"@types/estree@npm:*, @types/estree@npm:1.0.8, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": + version: 1.0.8 + resolution: "@types/estree@npm:1.0.8" + checksum: 10/25a4c16a6752538ffde2826c2cc0c6491d90e69cd6187bef4a006dd2c3c45469f049e643d7e516c515f21484dc3d48fd5c870be158a5beb72f5baf3dc43e4099 + languageName: node + linkType: hard + +"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0": + version: 5.0.6 + resolution: "@types/express-serve-static-core@npm:5.0.6" + dependencies: + "@types/node": "npm:*" + "@types/qs": "npm:*" + "@types/range-parser": "npm:*" + "@types/send": "npm:*" + checksum: 10/9dc51bdee7da9ad4792e97dd1be5b3071b5128f26d3b87a753070221bb36c8f9d16074b95a8b972acc965641e987b1e279a44675e7312ac8f3e18ec9abe93940 + languageName: node + linkType: hard + +"@types/express-serve-static-core@npm:^4.17.33": + version: 4.19.6 + resolution: "@types/express-serve-static-core@npm:4.19.6" + dependencies: + "@types/node": "npm:*" + "@types/qs": "npm:*" + "@types/range-parser": "npm:*" + "@types/send": "npm:*" + checksum: 10/a2e00b6c5993f0dd63ada2239be81076fe0220314b9e9fde586e8946c9c09ce60f9a2dd0d74410ee2b5fd10af8c3e755a32bb3abf134533e2158142488995455 + languageName: node + linkType: hard + +"@types/express@npm:*": + version: 5.0.0 + resolution: "@types/express@npm:5.0.0" + dependencies: + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:^5.0.0" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/45b199ab669caa33e6badafeebf078e277ea95042309d325a04b1ec498f33d33fd5a4ae9c8e358342367b178fe454d7323c5dfc8002bf27070b210a2c6cc11f0 + languageName: node + linkType: hard + +"@types/express@npm:^4.17.13": + version: 4.17.21 + resolution: "@types/express@npm:4.17.21" + dependencies: + "@types/body-parser": "npm:*" + "@types/express-serve-static-core": "npm:^4.17.33" + "@types/qs": "npm:*" + "@types/serve-static": "npm:*" + checksum: 10/7a6d26cf6f43d3151caf4fec66ea11c9d23166e4f3102edfe45a94170654a54ea08cf3103d26b3928d7ebcc24162c90488e33986b7e3a5f8941225edd5eb18c7 + languageName: node + linkType: hard + +"@types/gtag.js@npm:^0.0.12": + version: 0.0.12 + resolution: "@types/gtag.js@npm:0.0.12" + checksum: 10/f78217dd0485aa6c34f1e74e21a8fed1f58e1dcaeed7841df12ab2df2438d6015910424307945a886f101176bc95078da859b101666bfbd9437e75b63883fd36 + languageName: node + linkType: hard + +"@types/hast@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/hast@npm:3.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10/732920d81bb7605895776841b7658b4d8cc74a43a8fa176017cc0fb0ecc1a4c82a2b75a4fe6b71aa262b649d3fb62858c6789efa3793ea1d40269953af96ecb5 + languageName: node + linkType: hard + +"@types/history@npm:^4.7.11": + version: 4.7.11 + resolution: "@types/history@npm:4.7.11" + checksum: 10/1da529a3485f3015daf794effa3185493bf7dd2551c26932389c614f5a0aab76ab97645897d1eef9c74ead216a3848fcaa019f165bbd6e4b71da6eff164b4c68 + languageName: node + linkType: hard + +"@types/html-minifier-terser@npm:^6.0.0": + version: 6.1.0 + resolution: "@types/html-minifier-terser@npm:6.1.0" + checksum: 10/06bb3e1e8ebff43602c826d67f53f1fd3a6b9c751bfbc67d7ea4e85679446a639e20e60adad8c9d44ab4baf1337b3861b91e7e5e2be798575caf0cc1a5712552 + languageName: node + linkType: hard + +"@types/http-cache-semantics@npm:^4.0.2": + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 10/a59566cff646025a5de396d6b3f44a39ab6a74f2ed8150692e0f31cc52f3661a68b04afe3166ebe0d566bd3259cb18522f46e949576d5204781cd6452b7fe0c5 + languageName: node + linkType: hard + +"@types/http-errors@npm:*": + version: 2.0.4 + resolution: "@types/http-errors@npm:2.0.4" + checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 + languageName: node + linkType: hard + +"@types/http-proxy@npm:^1.17.8": + version: 1.17.16 + resolution: "@types/http-proxy@npm:1.17.16" + dependencies: + "@types/node": "npm:*" + checksum: 10/a054ac8f5301acfcfdcec3a775f52dc371180bbe60037906534312f10cceb3799b4a16e46c56c22f9925d078e11dcda1723c38f1ddd124be8169a4cccca69c8c + languageName: node + linkType: hard + +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0": + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 10/3feac423fd3e5449485afac999dcfcb3d44a37c830af898b689fadc65d26526460bedb889db278e0d4d815a670331796494d073a10ee6e3a6526301fe7415778 + languageName: node + linkType: hard + +"@types/istanbul-lib-report@npm:*": + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" + dependencies: + "@types/istanbul-lib-coverage": "npm:*" + checksum: 10/b91e9b60f865ff08cb35667a427b70f6c2c63e88105eadd29a112582942af47ed99c60610180aa8dcc22382fa405033f141c119c69b95db78c4c709fbadfeeb4 + languageName: node + linkType: hard + +"@types/istanbul-reports@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" + dependencies: + "@types/istanbul-lib-report": "npm:*" + checksum: 10/93eb18835770b3431f68ae9ac1ca91741ab85f7606f310a34b3586b5a34450ec038c3eed7ab19266635499594de52ff73723a54a72a75b9f7d6a956f01edee95 + languageName: node + linkType: hard + +"@types/js-yaml@npm:4.0.9": + version: 4.0.9 + resolution: "@types/js-yaml@npm:4.0.9" + checksum: 10/a0ce595db8a987904badd21fc50f9f444cb73069f4b95a76cc222e0a17b3ff180669059c763ec314bc4c3ce284379177a9da80e83c5f650c6c1310cafbfaa8e6 + languageName: node + linkType: hard + +"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 + languageName: node + linkType: hard + +"@types/mdast@npm:^4.0.0, @types/mdast@npm:^4.0.2": + version: 4.0.4 + resolution: "@types/mdast@npm:4.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10/efe3ec11b9ee0015a396c4fb4cd1b6f31b51b8ae9783c59560e6fc0bf6c2fa1dcc7fccaf45fa09a6c8b3397fab9dc8d431433935cae3835caa70a18f7fc775f8 + languageName: node + linkType: hard + +"@types/mdx@npm:^2.0.0": + version: 2.0.13 + resolution: "@types/mdx@npm:2.0.13" + checksum: 10/b73ed5f08114879b9590dc6a9ee8b648643c57c708583cd24b2bc3cc8961361fc63139ac7e9291e7b3b6e6b45707749d01d6f9727ddec5533df75dc3b90871a4 + languageName: node + linkType: hard + +"@types/mime@npm:^1": + version: 1.3.5 + resolution: "@types/mime@npm:1.3.5" + checksum: 10/e29a5f9c4776f5229d84e525b7cd7dd960b51c30a0fb9a028c0821790b82fca9f672dab56561e2acd9e8eed51d431bde52eafdfef30f643586c4162f1aecfc78 + languageName: node + linkType: hard + +"@types/ms@npm:*": + version: 2.1.0 + resolution: "@types/ms@npm:2.1.0" + checksum: 10/532d2ebb91937ccc4a89389715e5b47d4c66e708d15942fe6cc25add6dc37b2be058230a327dd50f43f89b8b6d5d52b74685a9e8f70516edfc9bdd6be910eff4 + languageName: node + linkType: hard + +"@types/node-forge@npm:^1.3.0": + version: 1.3.11 + resolution: "@types/node-forge@npm:1.3.11" + dependencies: + "@types/node": "npm:*" + checksum: 10/670c9b377c48189186ec415e3c8ed371f141ecc1a79ab71b213b20816adeffecba44dae4f8406cc0d09e6349a4db14eb8c5893f643d8e00fa19fc035cf49dee0 + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 22.13.10 + resolution: "@types/node@npm:22.13.10" + dependencies: + undici-types: "npm:~6.20.0" + checksum: 10/57dc6a5e0110ca9edea8d7047082e649fa7fa813f79e4a901653b9174141c622f4336435648baced5b38d9f39843f404fa2d8d7a10981610da26066bc8caab48 + languageName: node + linkType: hard + +"@types/node@npm:^17.0.5": + version: 17.0.45 + resolution: "@types/node@npm:17.0.45" + checksum: 10/b45fff7270b5e81be19ef91a66b764a8b21473a97a8d211218a52e3426b79ad48f371819ab9153370756b33ba284e5c875463de4d2cf48a472e9098d7f09e8a2 + languageName: node + linkType: hard + +"@types/prismjs@npm:^1.26.0": + version: 1.26.5 + resolution: "@types/prismjs@npm:1.26.5" + checksum: 10/617099479db9550119d0f84272dc79d64b2cf3e0d7a17167fe740d55fdf0f155697d935409464392d164e62080c2c88d649cf4bc4fdd30a87127337536657277 + languageName: node + linkType: hard + +"@types/qs@npm:*": + version: 6.9.18 + resolution: "@types/qs@npm:6.9.18" + checksum: 10/152fab96efd819cc82ae67c39f089df415da6deddb48f1680edaaaa4e86a2a597de7b2ff0ad391df66d11a07006a08d52c9405e86b8cb8f3d5ba15881fe56cc7 + languageName: node + linkType: hard + +"@types/range-parser@npm:*": + version: 1.2.7 + resolution: "@types/range-parser@npm:1.2.7" + checksum: 10/95640233b689dfbd85b8c6ee268812a732cf36d5affead89e806fe30da9a430767af8ef2cd661024fd97e19d61f3dec75af2df5e80ec3bea000019ab7028629a + languageName: node + linkType: hard + +"@types/react-router-config@npm:*, @types/react-router-config@npm:^5.0.7": + version: 5.0.11 + resolution: "@types/react-router-config@npm:5.0.11" + dependencies: + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + "@types/react-router": "npm:^5.1.0" + checksum: 10/4b72d9b71e0576e193c11e5085bbdac43f31debfa3b6ebc24666f3d646ef25c1f57f16c29b1ddd3051c881e85f8e0d4ab5a7bbd5fc215b9377f57675b210be7c + languageName: node + linkType: hard + +"@types/react-router-dom@npm:*": + version: 5.3.3 + resolution: "@types/react-router-dom@npm:5.3.3" + dependencies: + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + "@types/react-router": "npm:*" + checksum: 10/28c4ea48909803c414bf5a08502acbb8ba414669b4b43bb51297c05fe5addc4df0b8fd00e0a9d1e3535ec4073ef38aaafac2c4a2b95b787167d113bc059beff3 + languageName: node + linkType: hard + +"@types/react-router@npm:*, @types/react-router@npm:^5.1.0": + version: 5.1.20 + resolution: "@types/react-router@npm:5.1.20" + dependencies: + "@types/history": "npm:^4.7.11" + "@types/react": "npm:*" + checksum: 10/72d78d2f4a4752ec40940066b73d7758a0824c4d0cbeb380ae24c8b1cdacc21a6fc835a99d6849b5b295517a3df5466fc28be038f1040bd870f8e39e5ded43a4 + languageName: node + linkType: hard + +"@types/react@npm:*": + version: 19.0.10 + resolution: "@types/react@npm:19.0.10" + dependencies: + csstype: "npm:^3.0.2" + checksum: 10/10b592d212ebe4b4e0bd42a95c58af3d8dfcb8b3fa4b412d686c2ff8810d5dd3e3a30ebedb31d7b738e33a39c43503e24fe4e6ca8a21d842870043793f4eda98 + languageName: node + linkType: hard + +"@types/retry@npm:0.12.0": + version: 0.12.0 + resolution: "@types/retry@npm:0.12.0" + checksum: 10/bbd0b88f4b3eba7b7acfc55ed09c65ef6f2e1bcb4ec9b4dca82c66566934351534317d294a770a7cc6c0468d5573c5350abab6e37c65f8ef254443e1b028e44d + languageName: node + linkType: hard + +"@types/sax@npm:^1.2.1": + version: 1.2.7 + resolution: "@types/sax@npm:1.2.7" + dependencies: + "@types/node": "npm:*" + checksum: 10/7ece5fbb5d9c8fc76ab0de2f99d705edf92f18e701d4f9d9b0647275e32eb65e656c1badf9dfaa12f4e1ff3e250561c8c9cfe79e8b5f33dd1417ac0f1804f6cc + languageName: node + linkType: hard + +"@types/send@npm:*": + version: 0.17.4 + resolution: "@types/send@npm:0.17.4" + dependencies: + "@types/mime": "npm:^1" + "@types/node": "npm:*" + checksum: 10/28320a2aa1eb704f7d96a65272a07c0bf3ae7ed5509c2c96ea5e33238980f71deeed51d3631927a77d5250e4091b3e66bce53b42d770873282c6a20bb8b0280d + languageName: node + linkType: hard + +"@types/serve-index@npm:^1.9.1": + version: 1.9.4 + resolution: "@types/serve-index@npm:1.9.4" + dependencies: + "@types/express": "npm:*" + checksum: 10/72727c88d54da5b13275ebfb75dcdc4aa12417bbe9da1939e017c4c5f0c906fae843aa4e0fbfe360e7ee9df2f3d388c21abfc488f77ce58693fb57809f8ded92 + languageName: node + linkType: hard + +"@types/serve-static@npm:*, @types/serve-static@npm:^1.13.10": + version: 1.15.7 + resolution: "@types/serve-static@npm:1.15.7" + dependencies: + "@types/http-errors": "npm:*" + "@types/node": "npm:*" + "@types/send": "npm:*" + checksum: 10/c5a7171d5647f9fbd096ed1a26105759f3153ccf683824d99fee4c7eb9cde2953509621c56a070dd9fb1159e799e86d300cbe4e42245ebc5b0c1767e8ca94a67 + languageName: node + linkType: hard + +"@types/sockjs@npm:^0.3.33": + version: 0.3.36 + resolution: "@types/sockjs@npm:0.3.36" + dependencies: + "@types/node": "npm:*" + checksum: 10/b4b5381122465d80ea8b158537c00bc82317222d3fb31fd7229ff25b31fa89134abfbab969118da55622236bf3d8fee75759f3959908b5688991f492008f29bc + languageName: node + linkType: hard + +"@types/tern@npm:*": + version: 0.23.9 + resolution: "@types/tern@npm:0.23.9" + dependencies: + "@types/estree": "npm:*" + checksum: 10/72d26a1abc2b13aa7ee6a34abc0558bfbff1f977beb1c9f2554c4193c6cfc7e1677e4f84663d3f971135b436c5b847f170c74c3b1d6c320e08a1aba7e83cc3c2 + languageName: node + linkType: hard + +"@types/unist@npm:*, @types/unist@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/unist@npm:3.0.3" + checksum: 10/96e6453da9e075aaef1dc22482463898198acdc1eeb99b465e65e34303e2ec1e3b1ed4469a9118275ec284dc98019f63c3f5d49422f0e4ac707e5ab90fb3b71a + languageName: node + linkType: hard + +"@types/unist@npm:^2.0.0": + version: 2.0.11 + resolution: "@types/unist@npm:2.0.11" + checksum: 10/6d436e832bc35c6dde9f056ac515ebf2b3384a1d7f63679d12358766f9b313368077402e9c1126a14d827f10370a5485e628bf61aa91117cf4fc882423191a4e + languageName: node + linkType: hard + +"@types/ws@npm:^8.5.5": + version: 8.18.0 + resolution: "@types/ws@npm:8.18.0" + dependencies: + "@types/node": "npm:*" + checksum: 10/2a3bbf27690532627bfde8a215c0cf3a56680f339f972785b30d0b4665528275b9270c0a0839244610b0a3f2da4218c6dd741ceba1d173fde5c5091f2034b823 + languageName: node + linkType: hard + +"@types/yargs-parser@npm:*": + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: 10/a794eb750e8ebc6273a51b12a0002de41343ffe46befef460bdbb57262d187fdf608bc6615b7b11c462c63c3ceb70abe2564c8dd8ee0f7628f38a314f74a9b9b + languageName: node + linkType: hard + +"@types/yargs@npm:^17.0.8": + version: 17.0.33 + resolution: "@types/yargs@npm:17.0.33" + dependencies: + "@types/yargs-parser": "npm:*" + checksum: 10/16f6681bf4d99fb671bf56029141ed01db2862e3db9df7fc92d8bea494359ac96a1b4b1c35a836d1e95e665fb18ad753ab2015fc0db663454e8fd4e5d5e2ef91 + languageName: node + linkType: hard + +"@ungap/structured-clone@npm:^1.0.0": + version: 1.3.0 + resolution: "@ungap/structured-clone@npm:1.3.0" + checksum: 10/80d6910946f2b1552a2406650051c91bbd1f24a6bf854354203d84fe2714b3e8ce4618f49cc3410494173a1c1e8e9777372fe68dce74bd45faf0a7a1a6ccf448 + languageName: node + linkType: hard + +"@vitejs/plugin-react@npm:4.6.0": + version: 4.6.0 + resolution: "@vitejs/plugin-react@npm:4.6.0" + dependencies: + "@babel/core": "npm:^7.27.4" + "@babel/plugin-transform-react-jsx-self": "npm:^7.27.1" + "@babel/plugin-transform-react-jsx-source": "npm:^7.27.1" + "@rolldown/pluginutils": "npm:1.0.0-beta.19" + "@types/babel__core": "npm:^7.20.5" + react-refresh: "npm:^0.17.0" + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0 + checksum: 10/f05479b74070bcaa7aedfc0aefcfb40f732ccd0126b30885113719ff0c471b7a09626546c0a6b9404ce66245689b11cb3103c42e59c211ea518713d73c028b02 + languageName: node + linkType: hard + +"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/ast@npm:1.14.1" + dependencies: + "@webassemblyjs/helper-numbers": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + checksum: 10/f83e6abe38057f5d87c1fb356513a371a8b43c9b87657f2790741a66b1ef8ecf958d1391bc42f27c5fb33f58ab8286a38ea849fdd21f433cd4df1307424bab45 + languageName: node + linkType: hard + +"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" + checksum: 10/e866ec8433f4a70baa511df5e8f2ebcd6c24f4e2cc6274c7c5aabe2bcce3459ea4680e0f35d450e1f3602acf3913b6b8e4f15069c8cfd34ae8609fb9a7d01795 + languageName: node + linkType: hard + +"@webassemblyjs/helper-api-error@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" + checksum: 10/48b5df7fd3095bb252f59a139fe2cbd999a62ac9b488123e9a0da3906ad8a2f2da7b2eb21d328c01a90da987380928706395c2897d1f3ed9e2125b6d75a920d0 + languageName: node + linkType: hard + +"@webassemblyjs/helper-buffer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" + checksum: 10/9690afeafa5e765a34620aa6216e9d40f9126d4e37e9726a2594bf60cab6b211ef20ab6670fd3c4449dd4a3497e69e49b2b725c8da0fb213208c7f45f15f5d5b + languageName: node + linkType: hard + +"@webassemblyjs/helper-numbers@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" + dependencies: + "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@xtuc/long": "npm:4.2.2" + checksum: 10/e4c7d0b09811e1cda8eec644a022b560b28f4e974f50195375ccd007df5ee48a922a6dcff5ac40b6a8ec850d56d0ea6419318eee49fec7819ede14e90417a6a4 + languageName: node + linkType: hard + +"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" + checksum: 10/3edd191fff7296df1ef3b023bdbe6cb5ea668f6386fd197ccfce46015c6f2a8cc9763cfb86503a0b94973ad27996645afff2252ee39a236513833259a47af6ed + languageName: node + linkType: hard + +"@webassemblyjs/helper-wasm-section@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + checksum: 10/6b73874f906532512371181d7088460f767966f26309e836060c5a8e4e4bfe6d523fb5f4c034b34aa22ebb1192815f95f0e264298769485c1f0980fdd63ae0ce + languageName: node + linkType: hard + +"@webassemblyjs/ieee754@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/ieee754@npm:1.13.2" + dependencies: + "@xtuc/ieee754": "npm:^1.2.0" + checksum: 10/d7e3520baa37a7309fa7db4d73d69fb869878853b1ebd4b168821bd03fcc4c0e1669c06231315b0039035d9a7a462e53de3ad982da4a426a4b0743b5888e8673 + languageName: node + linkType: hard + +"@webassemblyjs/leb128@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/leb128@npm:1.13.2" + dependencies: + "@xtuc/long": "npm:4.2.2" + checksum: 10/3a10542c86807061ec3230bac8ee732289c852b6bceb4b88ebd521a12fbcecec7c432848284b298154f28619e2746efbed19d6904aef06c49ef20a0b85f650cf + languageName: node + linkType: hard + +"@webassemblyjs/utf8@npm:1.13.2": + version: 1.13.2 + resolution: "@webassemblyjs/utf8@npm:1.13.2" + checksum: 10/27885e5d19f339501feb210867d69613f281eda695ac508f04d69fa3398133d05b6870969c0242b054dc05420ed1cc49a64dea4fe0588c18d211cddb0117cc54 + languageName: node + linkType: hard + +"@webassemblyjs/wasm-edit@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/helper-wasm-section": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-opt": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + "@webassemblyjs/wast-printer": "npm:1.14.1" + checksum: 10/c62c50eadcf80876713f8c9f24106b18cf208160ab842fcb92060fd78c37bf37e7fcf0b7cbf1afc05d230277c2ce0f3f728432082c472dd1293e184a95f9dbdd + languageName: node + linkType: hard + +"@webassemblyjs/wasm-gen@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/6085166b0987d3031355fe17a4f9ef0f412e08098d95454059aced2bd72a4c3df2bc099fa4d32d640551fc3eca1ac1a997b44432e46dc9d84642688e42c17ed4 + languageName: node + linkType: hard + +"@webassemblyjs/wasm-opt@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-buffer": "npm:1.14.1" + "@webassemblyjs/wasm-gen": "npm:1.14.1" + "@webassemblyjs/wasm-parser": "npm:1.14.1" + checksum: 10/fa5d1ef8d2156e7390927f938f513b7fb4440dd6804b3d6c8622b7b1cf25a3abf1a5809f615896d4918e04b27b52bc3cbcf18faf2d563cb563ae0a9204a492db + languageName: node + linkType: hard + +"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@webassemblyjs/helper-api-error": "npm:1.13.2" + "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" + "@webassemblyjs/ieee754": "npm:1.13.2" + "@webassemblyjs/leb128": "npm:1.13.2" + "@webassemblyjs/utf8": "npm:1.13.2" + checksum: 10/07d9805fda88a893c984ed93d5a772d20d671e9731358ab61c6c1af8e0e58d1c42fc230c18974dfddebc9d2dd7775d514ba4d445e70080b16478b4b16c39c7d9 + languageName: node + linkType: hard + +"@webassemblyjs/wast-printer@npm:1.14.1": + version: 1.14.1 + resolution: "@webassemblyjs/wast-printer@npm:1.14.1" + dependencies: + "@webassemblyjs/ast": "npm:1.14.1" + "@xtuc/long": "npm:4.2.2" + checksum: 10/cef09aad2fcd291bfcf9efdae2ea1e961a1ba0f925d1d9dcdd8c746d32fbaf431b6d26a0241699c0e39f82139018aa720b4ceb84ac6f4c78f13072747480db69 + languageName: node + linkType: hard + +"@xtuc/ieee754@npm:^1.2.0": + version: 1.2.0 + resolution: "@xtuc/ieee754@npm:1.2.0" + checksum: 10/ab033b032927d77e2f9fa67accdf31b1ca7440974c21c9cfabc8349e10ca2817646171c4f23be98d0e31896d6c2c3462a074fe37752e523abc3e45c79254259c + languageName: node + linkType: hard + +"@xtuc/long@npm:4.2.2": + version: 4.2.2 + resolution: "@xtuc/long@npm:4.2.2" + checksum: 10/7217bae9fe240e0d804969e7b2af11cb04ec608837c78b56ca88831991b287e232a0b7fce8d548beaff42aaf0197ffa471d81be6ac4c4e53b0148025a2c076ec + languageName: node + linkType: hard + +"abbrev@npm:^3.0.0": + version: 3.0.0 + resolution: "abbrev@npm:3.0.0" + checksum: 10/2ceee14efdeda42ef7355178c1069499f183546ff7112b3efe79c1edef09d20ad9c17939752215fb8f7fcf48d10e6a7c0aa00136dc9cf4d293d963718bb1d200 + languageName: node + linkType: hard + +"accepts@npm:~1.3.4, accepts@npm:~1.3.8": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" + dependencies: + mime-types: "npm:~2.1.34" + negotiator: "npm:0.6.3" + checksum: 10/67eaaa90e2917c58418e7a9b89392002d2b1ccd69bcca4799135d0c632f3b082f23f4ae4ddeedbced5aa59bcc7bdf4699c69ebed4593696c922462b7bc5744d6 + languageName: node + linkType: hard + +"acorn-jsx@npm:^5.0.0": + version: 5.3.2 + resolution: "acorn-jsx@npm:5.3.2" + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10/d4371eaef7995530b5b5ca4183ff6f062ca17901a6d3f673c9ac011b01ede37e7a1f7f61f8f5cfe709e88054757bb8f3277dc4061087cdf4f2a1f90ccbcdb977 + languageName: node + linkType: hard + +"acorn-walk@npm:^8.0.0": + version: 8.3.4 + resolution: "acorn-walk@npm:8.3.4" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10/871386764e1451c637bb8ab9f76f4995d408057e9909be6fb5ad68537ae3375d85e6a6f170b98989f44ab3ff6c74ad120bc2779a3d577606e7a0cd2b4efcaf77 + languageName: node + linkType: hard + +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.8.2": + version: 8.14.1 + resolution: "acorn@npm:8.14.1" + bin: + acorn: bin/acorn + checksum: 10/d1379bbee224e8d44c3c3946e6ba6973e999fbdd4e22e41c3455d7f9b6f72f7ce18d3dc218002e1e48eea789539cf1cb6d1430c81838c6744799c712fb557d92 + languageName: node + linkType: hard + +"address@npm:^1.0.1": + version: 1.2.2 + resolution: "address@npm:1.2.2" + checksum: 10/57d80a0c6ccadc8769ad3aeb130c1599e8aee86a8d25f671216c40df9b8489d6c3ef879bc2752b40d1458aa768f947c2d91e5b2fedfe63cf702c40afdfda9ba9 + languageName: node + linkType: hard + +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": + version: 7.1.3 + resolution: "agent-base@npm:7.1.3" + checksum: 10/3db6d8d4651f2aa1a9e4af35b96ab11a7607af57a24f3bc721a387eaa3b5f674e901f0a648b0caefd48f3fd117c7761b79a3b55854e2aebaa96c3f32cf76af84 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv-formats@npm:^2.1.1": + version: 2.1.1 + resolution: "ajv-formats@npm:2.1.1" + dependencies: + ajv: "npm:^8.0.0" + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 10/70c263ded219bf277ffd9127f793b625f10a46113b2e901e150da41931fcfd7f5592da6d66862f4449bb157ffe65867c3294a7df1d661cc232c4163d5a1718ed + languageName: node + linkType: hard + +"ajv-keywords@npm:^3.5.2": + version: 3.5.2 + resolution: "ajv-keywords@npm:3.5.2" + peerDependencies: + ajv: ^6.9.1 + checksum: 10/d57c9d5bf8849bddcbd801b79bc3d2ddc736c2adb6b93a6a365429589dd7993ddbd5d37c6025ed6a7f89c27506b80131d5345c5b1fa6a97e40cd10a96bcd228c + languageName: node + linkType: hard + +"ajv-keywords@npm:^5.1.0": + version: 5.1.0 + resolution: "ajv-keywords@npm:5.1.0" + dependencies: + fast-deep-equal: "npm:^3.1.3" + peerDependencies: + ajv: ^8.8.2 + checksum: 10/5021f96ab7ddd03a4005326bd06f45f448ebfbb0fe7018b1b70b6c28142fa68372bda2057359814b83fd0b2d4c8726c297f0a7557b15377be7b56ce5344533d8 + languageName: node + linkType: hard + +"ajv@npm:^6.12.5": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + +"ajv@npm:^8.0.0, ajv@npm:^8.9.0": + version: 8.17.1 + resolution: "ajv@npm:8.17.1" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^3.0.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + checksum: 10/ee3c62162c953e91986c838f004132b6a253d700f1e51253b99791e2dbfdb39161bc950ebdc2f156f8568035bb5ed8be7bd78289cd9ecbf3381fe8f5b82e3f33 + languageName: node + linkType: hard + +"algoliasearch-helper@npm:^3.22.6": + version: 3.24.2 + resolution: "algoliasearch-helper@npm:3.24.2" + dependencies: + "@algolia/events": "npm:^4.0.1" + peerDependencies: + algoliasearch: ">= 3.1 < 6" + checksum: 10/f9c6aceb466c5143ac646c69f17f976fe324cf1b774a3be849cde0ec21a3e25505d7cf477a575561234d2d45c5b4c4b83f5778dbecf9a49631c98e3b76611116 + languageName: node + linkType: hard + +"algoliasearch@npm:^5.14.2, algoliasearch@npm:^5.17.1": + version: 5.21.0 + resolution: "algoliasearch@npm:5.21.0" + dependencies: + "@algolia/client-abtesting": "npm:5.21.0" + "@algolia/client-analytics": "npm:5.21.0" + "@algolia/client-common": "npm:5.21.0" + "@algolia/client-insights": "npm:5.21.0" + "@algolia/client-personalization": "npm:5.21.0" + "@algolia/client-query-suggestions": "npm:5.21.0" + "@algolia/client-search": "npm:5.21.0" + "@algolia/ingestion": "npm:1.21.0" + "@algolia/monitoring": "npm:1.21.0" + "@algolia/recommend": "npm:5.21.0" + "@algolia/requester-browser-xhr": "npm:5.21.0" + "@algolia/requester-fetch": "npm:5.21.0" + "@algolia/requester-node-http": "npm:5.21.0" + checksum: 10/188b451be234396889d84b48db9ae5196804343c845e9d7c16b28f7d19fe638c5ee0ce44996fcca12c3aa4acf30f7aa9b7db3cc2ca116dd09e824f59728f47fb + languageName: node + linkType: hard + +"ansi-align@npm:^3.0.1": + version: 3.0.1 + resolution: "ansi-align@npm:3.0.1" + dependencies: + string-width: "npm:^4.1.0" + checksum: 10/4c7e8b6a10eaf18874ecee964b5db62ac86d0b9266ad4987b3a1efcb5d11a9e12c881ee40d14951833135a8966f10a3efe43f9c78286a6e632f53d85ad28b9c0 + languageName: node + linkType: hard + +"ansi-escapes@npm:^4.3.2": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: "npm:^0.21.3" + checksum: 10/8661034456193ffeda0c15c8c564a9636b0c04094b7f78bd01517929c17c504090a60f7a75f949f5af91289c264d3e1001d91492c1bd58efc8e100500ce04de2 + languageName: node + linkType: hard + +"ansi-html-community@npm:^0.0.8": + version: 0.0.8 + resolution: "ansi-html-community@npm:0.0.8" + bin: + ansi-html: bin/ansi-html + checksum: 10/08df3696720edacd001a8d53b197bb5728242c55484680117dab9f7633a6320e961a939bddd88ee5c71d4a64f3ddb49444d1c694bd0668adbb3f95ba114f2386 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.1.0 + resolution: "ansi-regex@npm:6.1.0" + checksum: 10/495834a53b0856c02acd40446f7130cb0f8284f4a39afdab20d5dc42b2e198b1196119fe887beed8f9055c4ff2055e3b2f6d4641d0be018cdfb64fedf6fc1aac + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"arg@npm:^5.0.0": + version: 5.0.2 + resolution: "arg@npm:5.0.2" + checksum: 10/92fe7de222054a060fd2329e92e867410b3ea260328147ee3fb7855f78efae005f4087e698d4e688a856893c56bb09951588c40f2c901cf6996cd8cd7bcfef2c + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + +"array-flatten@npm:1.1.1": + version: 1.1.1 + resolution: "array-flatten@npm:1.1.1" + checksum: 10/e13c9d247241be82f8b4ec71d035ed7204baa82fae820d4db6948d30d3c4a9f2b3905eb2eec2b937d4aa3565200bd3a1c500480114cff649fa748747d2a50feb + languageName: node + linkType: hard + +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 10/5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d + languageName: node + linkType: hard + +"astring@npm:^1.8.0": + version: 1.9.0 + resolution: "astring@npm:1.9.0" + bin: + astring: bin/astring + checksum: 10/ee88f71d8534557b27993d6d035ae85d78488d8dbc6429cd8e8fdfcafec3c65928a3bdc518cf69767a1298d3361490559a4819cd4b314007edae1e94cf1f9e4c + languageName: node + linkType: hard + +"autoprefixer@npm:^10.4.19, autoprefixer@npm:^10.4.21": + version: 10.4.21 + resolution: "autoprefixer@npm:10.4.21" + dependencies: + browserslist: "npm:^4.24.4" + caniuse-lite: "npm:^1.0.30001702" + fraction.js: "npm:^4.3.7" + normalize-range: "npm:^0.1.2" + picocolors: "npm:^1.1.1" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.1.0 + bin: + autoprefixer: bin/autoprefixer + checksum: 10/5d7aeee78ef362a6838e12312908516a8ac5364414175273e5cff83bbff67612755b93d567f3aa01ce318342df48aeab4b291847b5800c780e58c458f61a98a6 + languageName: node + linkType: hard + +"babel-loader@npm:^9.2.1": + version: 9.2.1 + resolution: "babel-loader@npm:9.2.1" + dependencies: + find-cache-dir: "npm:^4.0.0" + schema-utils: "npm:^4.0.0" + peerDependencies: + "@babel/core": ^7.12.0 + webpack: ">=5" + checksum: 10/f1f24ae3c22d488630629240b0eba9c935545f82ff843c214e8f8df66e266492b7a3d4cb34ef9c9721fb174ca222e900799951c3fd82199473bc6bac52ec03a3 + languageName: node + linkType: hard + +"babel-plugin-dynamic-import-node@npm:^2.3.3": + version: 2.3.3 + resolution: "babel-plugin-dynamic-import-node@npm:2.3.3" + dependencies: + object.assign: "npm:^4.1.0" + checksum: 10/c9d24415bcc608d0db7d4c8540d8002ac2f94e2573d2eadced137a29d9eab7e25d2cbb4bc6b9db65cf6ee7430f7dd011d19c911a9a778f0533b4a05ce8292c9b + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs2@npm:^0.4.10": + version: 0.4.12 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.12" + dependencies: + "@babel/compat-data": "npm:^7.22.6" + "@babel/helper-define-polyfill-provider": "npm:^0.6.3" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 10/38b8cd69f0ba6a35f7f1cc08960f79fbc4572fe80e60aced719dab33a77c7872ee0faebc72da95852ae0d86df1aeaa54660bf309871db1934c5a4904f0744327 + languageName: node + linkType: hard + +"babel-plugin-polyfill-corejs3@npm:^0.11.0": + version: 0.11.1 + resolution: "babel-plugin-polyfill-corejs3@npm:0.11.1" + dependencies: + "@babel/helper-define-polyfill-provider": "npm:^0.6.3" + core-js-compat: "npm:^3.40.0" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 10/19a2978ee3462cc3b98e7d36e6537bf9fb1fb61f42fd96cb41e9313f2ac6f2c62380d94064366431eff537f342184720fe9bce73eb65fd57c5311d15e8648f62 + languageName: node + linkType: hard + +"babel-plugin-polyfill-regenerator@npm:^0.6.1": + version: 0.6.3 + resolution: "babel-plugin-polyfill-regenerator@npm:0.6.3" + dependencies: + "@babel/helper-define-polyfill-provider": "npm:^0.6.3" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 10/d12696e6b3f280eb78fac551619ca4389262db62c7352cd54bf679d830df8b35596eef2de77cf00db6648eada1c99d49c4f40636dbc9c335a1e5420cfef96750 + languageName: node + linkType: hard + +"bail@npm:^2.0.0": + version: 2.0.2 + resolution: "bail@npm:2.0.2" + checksum: 10/aab4e8ccdc8d762bf3fdfce8e706601695620c0c2eda256dd85088dc0be3cfd7ff126f6e99c2bee1f24f5d418414aacf09d7f9702f16d6963df2fa488cda8824 + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"batch@npm:0.6.1": + version: 0.6.1 + resolution: "batch@npm:0.6.1" + checksum: 10/61f9934c7378a51dce61b915586191078ef7f1c3eca707fdd58b96ff2ff56d9e0af2bdab66b1462301a73c73374239e6542d9821c0af787f3209a23365d07e7f + languageName: node + linkType: hard + +"big.js@npm:^5.2.2": + version: 5.2.2 + resolution: "big.js@npm:5.2.2" + checksum: 10/c04416aeb084f4aa1c5857722439c327cc0ada9bd99ab80b650e3f30e2e4f1b92a04527ed1e7df8ffcd7c0ea311745a04af12d53e2f091bf09a06f1292003827 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" + dependencies: + bytes: "npm:3.1.2" + content-type: "npm:~1.0.5" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + destroy: "npm:1.2.0" + http-errors: "npm:2.0.0" + iconv-lite: "npm:0.4.24" + on-finished: "npm:2.4.1" + qs: "npm:6.13.0" + raw-body: "npm:2.5.2" + type-is: "npm:~1.6.18" + unpipe: "npm:1.0.0" + checksum: 10/8723e3d7a672eb50854327453bed85ac48d045f4958e81e7d470c56bf111f835b97e5b73ae9f6393d0011cc9e252771f46fd281bbabc57d33d3986edf1e6aeca + languageName: node + linkType: hard + +"bonjour-service@npm:^1.0.11": + version: 1.3.0 + resolution: "bonjour-service@npm:1.3.0" + dependencies: + fast-deep-equal: "npm:^3.1.3" + multicast-dns: "npm:^7.2.5" + checksum: 10/63d516d88f15fa4b89e247e6ff7d81c21a3ef5ed035b0b043c2b38e0c839f54f4ce58fbf9b7668027bf538ac86de366939dbb55cca63930f74eeea1e278c9585 + languageName: node + linkType: hard + +"boolbase@npm:^1.0.0": + version: 1.0.0 + resolution: "boolbase@npm:1.0.0" + checksum: 10/3e25c80ef626c3a3487c73dbfc70ac322ec830666c9ad915d11b701142fab25ec1e63eff2c450c74347acfd2de854ccde865cd79ef4db1683f7c7b046ea43bb0 + languageName: node + linkType: hard + +"boxen@npm:^6.2.1": + version: 6.2.1 + resolution: "boxen@npm:6.2.1" + dependencies: + ansi-align: "npm:^3.0.1" + camelcase: "npm:^6.2.0" + chalk: "npm:^4.1.2" + cli-boxes: "npm:^3.0.0" + string-width: "npm:^5.0.1" + type-fest: "npm:^2.5.0" + widest-line: "npm:^4.0.1" + wrap-ansi: "npm:^8.0.1" + checksum: 10/519e2bb5b2daa7abe52ac2ba4d20df6e21c808dca6139b26b73d4c6748f4f0a87678d89419ea030ab70b0efe707818efeca9867da99e40337e030a3d15889fdb + languageName: node + linkType: hard + +"boxen@npm:^7.0.0": + version: 7.1.1 + resolution: "boxen@npm:7.1.1" + dependencies: + ansi-align: "npm:^3.0.1" + camelcase: "npm:^7.0.1" + chalk: "npm:^5.2.0" + cli-boxes: "npm:^3.0.0" + string-width: "npm:^5.1.2" + type-fest: "npm:^2.13.0" + widest-line: "npm:^4.0.1" + wrap-ansi: "npm:^8.1.0" + checksum: 10/a21d514435ccdd51f11088ad42e6298e3ff6be1bc2801699dcc1d3d79a2c5b005b5384dd03742e91a1ce2d9aedf99996efb36ed5fc7c5c392e19de2404bcfa37 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.12 + resolution: "brace-expansion@npm:1.1.12" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/12cb6d6310629e3048cadb003e1aca4d8c9bb5c67c3c321bafdd7e7a50155de081f78ea3e0ed92ecc75a9015e784f301efc8132383132f4f7904ad1ac529c562 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:^3.0.3, braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"browserslist@npm:^4.0.0, browserslist@npm:^4.23.0, browserslist@npm:^4.24.0, browserslist@npm:^4.24.2, browserslist@npm:^4.24.4, browserslist@npm:^4.25.0": + version: 4.25.0 + resolution: "browserslist@npm:4.25.0" + dependencies: + caniuse-lite: "npm:^1.0.30001718" + electron-to-chromium: "npm:^1.5.160" + node-releases: "npm:^2.0.19" + update-browserslist-db: "npm:^1.1.3" + bin: + browserslist: cli.js + checksum: 10/4a5442b1a0d09c4c64454f184b8fed17d8c3e202034bf39de28f74497d7bd28dddee121b2bab4e34825fe0ed4c166d84e32a39f576c76fce73c1f8f05e4b6ee6 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"bytes@npm:3.0.0": + version: 3.0.0 + resolution: "bytes@npm:3.0.0" + checksum: 10/a2b386dd8188849a5325f58eef69c3b73c51801c08ffc6963eddc9be244089ba32d19347caf6d145c86f315ae1b1fc7061a32b0c1aa6379e6a719090287ed101 + languageName: node + linkType: hard + +"bytes@npm:3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: 10/a10abf2ba70c784471d6b4f58778c0beeb2b5d405148e66affa91f23a9f13d07603d0a0354667310ae1d6dc141474ffd44e2a074be0f6e2254edb8fc21445388 + languageName: node + linkType: hard + +"cacache@npm:^19.0.1": + version: 19.0.1 + resolution: "cacache@npm:19.0.1" + dependencies: + "@npmcli/fs": "npm:^4.0.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^7.0.2" + ssri: "npm:^12.0.0" + tar: "npm:^7.4.3" + unique-filename: "npm:^4.0.0" + checksum: 10/ea026b27b13656330c2bbaa462a88181dcaa0435c1c2e705db89b31d9bdf7126049d6d0445ba746dca21454a0cfdf1d6f47fd39d34c8c8435296b30bc5738a13 + languageName: node + linkType: hard + +"cacheable-lookup@npm:^7.0.0": + version: 7.0.0 + resolution: "cacheable-lookup@npm:7.0.0" + checksum: 10/69ea78cd9f16ad38120372e71ba98b64acecd95bbcbcdad811f857dc192bad81ace021f8def012ce19178583db8d46afd1a00b3e8c88527e978e049edbc23252 + languageName: node + linkType: hard + +"cacheable-request@npm:^10.2.8": + version: 10.2.14 + resolution: "cacheable-request@npm:10.2.14" + dependencies: + "@types/http-cache-semantics": "npm:^4.0.2" + get-stream: "npm:^6.0.1" + http-cache-semantics: "npm:^4.1.1" + keyv: "npm:^4.5.3" + mimic-response: "npm:^4.0.0" + normalize-url: "npm:^8.0.0" + responselike: "npm:^3.0.0" + checksum: 10/102f454ac68eb66f99a709c5cf65e90ed89f1b9269752578d5a08590b3986c3ea47a5d9dff208fe7b65855a29da129a2f23321b88490106898e0ba70b807c912 + languageName: node + linkType: hard + +"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind-apply-helpers@npm:1.0.2" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + checksum: 10/00482c1f6aa7cfb30fb1dbeb13873edf81cfac7c29ed67a5957d60635a56b2a4a480f1016ddbdb3395cc37900d46037fb965043a51c5c789ffeab4fc535d18b5 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.8": + version: 1.0.8 + resolution: "call-bind@npm:1.0.8" + dependencies: + call-bind-apply-helpers: "npm:^1.0.0" + es-define-property: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + set-function-length: "npm:^1.2.2" + checksum: 10/659b03c79bbfccf0cde3a79e7d52570724d7290209823e1ca5088f94b52192dc1836b82a324d0144612f816abb2f1734447438e38d9dafe0b3f82c2a1b9e3bce + languageName: node + linkType: hard + +"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": + version: 1.0.4 + resolution: "call-bound@npm:1.0.4" + dependencies: + call-bind-apply-helpers: "npm:^1.0.2" + get-intrinsic: "npm:^1.3.0" + checksum: 10/ef2b96e126ec0e58a7ff694db43f4d0d44f80e641370c21549ed911fecbdbc2df3ebc9bddad918d6bbdefeafb60bb3337902006d5176d72bcd2da74820991af7 + languageName: node + linkType: hard + +"callsites@npm:^3.0.0": + version: 3.1.0 + resolution: "callsites@npm:3.1.0" + checksum: 10/072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 + languageName: node + linkType: hard + +"camel-case@npm:^4.1.2": + version: 4.1.2 + resolution: "camel-case@npm:4.1.2" + dependencies: + pascal-case: "npm:^3.1.2" + tslib: "npm:^2.0.3" + checksum: 10/bcbd25cd253b3cbc69be3f535750137dbf2beb70f093bdc575f73f800acc8443d34fd52ab8f0a2413c34f1e8203139ffc88428d8863e4dfe530cfb257a379ad6 + languageName: node + linkType: hard + +"camelcase@npm:^6.2.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"camelcase@npm:^7.0.1": + version: 7.0.1 + resolution: "camelcase@npm:7.0.1" + checksum: 10/86ab8f3ebf08bcdbe605a211a242f00ed30d8bfb77dab4ebb744dd36efbc84432d1c4adb28975ba87a1b8be40a80fbd1e60e2f06565315918fa7350011a26d3d + languageName: node + linkType: hard + +"caniuse-api@npm:^3.0.0": + version: 3.0.0 + resolution: "caniuse-api@npm:3.0.0" + dependencies: + browserslist: "npm:^4.0.0" + caniuse-lite: "npm:^1.0.0" + lodash.memoize: "npm:^4.1.2" + lodash.uniq: "npm:^4.5.0" + checksum: 10/db2a229383b20d0529b6b589dde99d7b6cb56ba371366f58cbbfa2929c9f42c01f873e2b6ef641d4eda9f0b4118de77dbb2805814670bdad4234bf08e720b0b4 + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001702, caniuse-lite@npm:^1.0.30001718": + version: 1.0.30001721 + resolution: "caniuse-lite@npm:1.0.30001721" + checksum: 10/88fa7ecb5b9a4c1393d7793fc6d35552340beba9a898b4f7b05f9ae266b230ffa35aef5da0d33d1872fb1fcb32d860dfd00298d7b4da8eeea5e6eb3cfa029a18 + languageName: node + linkType: hard + +"ccount@npm:^2.0.0": + version: 2.0.1 + resolution: "ccount@npm:2.0.1" + checksum: 10/48193dada54c9e260e0acf57fc16171a225305548f9ad20d5471e0f7a8c026aedd8747091dccb0d900cde7df4e4ddbd235df0d8de4a64c71b12f0d3303eeafd4 + languageName: node + linkType: hard + +"chalk@npm:^4.0.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"chalk@npm:^5.0.1, chalk@npm:^5.2.0": + version: 5.4.1 + resolution: "chalk@npm:5.4.1" + checksum: 10/29df3ffcdf25656fed6e95962e2ef86d14dfe03cd50e7074b06bad9ffbbf6089adbb40f75c00744d843685c8d008adaf3aed31476780312553caf07fa86e5bc7 + languageName: node + linkType: hard + +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 + languageName: node + linkType: hard + +"character-entities-html4@npm:^2.0.0": + version: 2.1.0 + resolution: "character-entities-html4@npm:2.1.0" + checksum: 10/7034aa7c7fa90309667f6dd50499c8a760c3d3a6fb159adb4e0bada0107d194551cdbad0714302f62d06ce4ed68565c8c2e15fdef2e8f8764eb63fa92b34b11d + languageName: node + linkType: hard + +"character-entities-legacy@npm:^3.0.0": + version: 3.0.0 + resolution: "character-entities-legacy@npm:3.0.0" + checksum: 10/7582af055cb488b626d364b7d7a4e46b06abd526fb63c0e4eb35bcb9c9799cc4f76b39f34fdccef2d1174ac95e53e9ab355aae83227c1a2505877893fce77731 + languageName: node + linkType: hard + +"character-entities@npm:^2.0.0": + version: 2.0.2 + resolution: "character-entities@npm:2.0.2" + checksum: 10/c8dd1f4bf1a92fccf7d2fad9673660a88b37854557d30f6076c32fedfb92d1420208298829ff1d3b6b4fa1c7012e8326c45e7f5c3ed1e9a09ec177593c521b2f + languageName: node + linkType: hard + +"character-reference-invalid@npm:^2.0.0": + version: 2.0.1 + resolution: "character-reference-invalid@npm:2.0.1" + checksum: 10/98d3b1a52ae510b7329e6ee7f6210df14f1e318c5415975d4c9e7ee0ef4c07875d47c6e74230c64551f12f556b4a8ccc24d9f3691a2aa197019e72a95e9297ee + languageName: node + linkType: hard + +"cheerio-select@npm:^2.1.0": + version: 2.1.0 + resolution: "cheerio-select@npm:2.1.0" + dependencies: + boolbase: "npm:^1.0.0" + css-select: "npm:^5.1.0" + css-what: "npm:^6.1.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + checksum: 10/b5d89208c23468c3a32d1e04f88b9e8c6e332e3649650c5cd29255e2cebc215071ae18563f58c3dc3f6ef4c234488fc486035490fceb78755572288245e2931a + languageName: node + linkType: hard + +"cheerio@npm:1.0.0-rc.12": + version: 1.0.0-rc.12 + resolution: "cheerio@npm:1.0.0-rc.12" + dependencies: + cheerio-select: "npm:^2.1.0" + dom-serializer: "npm:^2.0.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + htmlparser2: "npm:^8.0.1" + parse5: "npm:^7.0.0" + parse5-htmlparser2-tree-adapter: "npm:^7.0.0" + checksum: 10/812fed61aa4b669bbbdd057d0d7f73ba4649cabfd4fc3a8f1d5c7499e4613b430636102716369cbd6bbed8f1bdcb06387ae8342289fb908b2743184775f94f18 + languageName: node + linkType: hard + +"chokidar@npm:^3.5.3": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/c327fb07704443f8d15f7b4a7ce93b2f0bc0e6cea07ec28a7570aa22cd51fcf0379df589403976ea956c369f25aa82d84561947e227cd925902e1751371658df + languageName: node + linkType: hard + +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10/b63cb1f73d171d140a2ed8154ee6566c8ab775d3196b0e03a2a94b5f6a0ce7777ee5685ca56849403c8d17bd457a6540672f9a60696a6137c7a409097495b82c + languageName: node + linkType: hard + +"chrome-trace-event@npm:^1.0.2": + version: 1.0.4 + resolution: "chrome-trace-event@npm:1.0.4" + checksum: 10/1762bed739774903bf5915fe3045c3120fc3c7f7d929d88e566447ea38944937a6370ccb687278318c43c24f837ad22dac780bed67c066336815557b8cf558c6 + languageName: node + linkType: hard + +"ci-info@npm:^3.2.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 10/75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397 + languageName: node + linkType: hard + +"clean-css@npm:^5.2.2, clean-css@npm:^5.3.3, clean-css@npm:~5.3.2": + version: 5.3.3 + resolution: "clean-css@npm:5.3.3" + dependencies: + source-map: "npm:~0.6.0" + checksum: 10/2db1ae37b384c8ff0a06a12bfa80f56cc02b4abcaaf340db98c0ae88a61dd67c856653fd8135ace6eb0ec13aeab3089c425d2e4238d2a2ad6b6917e6ccc74729 + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cli-boxes@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-boxes@npm:3.0.0" + checksum: 10/637d84419d293a9eac40a1c8c96a2859e7d98b24a1a317788e13c8f441be052fc899480c6acab3acc82eaf1bccda6b7542d7cdcf5c9c3cc39227175dc098d5b2 + languageName: node + linkType: hard + +"cli-table3@npm:^0.6.3": + version: 0.6.5 + resolution: "cli-table3@npm:0.6.5" + dependencies: + "@colors/colors": "npm:1.5.0" + string-width: "npm:^4.2.0" + dependenciesMeta: + "@colors/colors": + optional: true + checksum: 10/8dca71256f6f1367bab84c33add3f957367c7c43750a9828a4212ebd31b8df76bd7419d386e3391ac7419698a8540c25f1a474584028f35b170841cde2e055c5 + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: "npm:^2.0.4" + kind-of: "npm:^6.0.2" + shallow-clone: "npm:^3.0.0" + checksum: 10/770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 + languageName: node + linkType: hard + +"clsx@npm:2.1.1, clsx@npm:^2.0.0": + version: 2.1.1 + resolution: "clsx@npm:2.1.1" + checksum: 10/cdfb57fa6c7649bbff98d9028c2f0de2f91c86f551179541cf784b1cfdc1562dcb951955f46d54d930a3879931a980e32a46b598acaea274728dbe068deca919 + languageName: node + linkType: hard + +"codemirror-graphql@npm:2.2.2": + version: 2.2.2 + resolution: "codemirror-graphql@npm:2.2.2" + dependencies: + "@types/codemirror": "npm:^0.0.90" + graphql-language-service: "npm:5.4.0" + peerDependencies: + "@codemirror/language": 6.0.0 + codemirror: ^5.65.3 + graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 + checksum: 10/91376251edc9e831f3b42ebe1374a94bda6d7290c4abda51d5d4187d1ff49c6922dfaff76af4505a48024639a1b3e01b0e37d98a6d061b4625e3da9e92fa6fc2 + languageName: node + linkType: hard + +"collapse-white-space@npm:^2.0.0": + version: 2.1.0 + resolution: "collapse-white-space@npm:2.1.0" + checksum: 10/c1424ae7c5ff370ec06bbff5990382c54ae6e14a021c7568151e4889e514667e110cc3a051fe5d8e17b117f76304fffcfe9f0360cda642cf0201a5ac398bf0e7 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"colord@npm:^2.9.3": + version: 2.9.3 + resolution: "colord@npm:2.9.3" + checksum: 10/907a4506d7307e2f580b471b581e992181ed75ab0c6925ece9ca46d88161d2fc50ed15891cd0556d0d9321237ca75afc9d462e4c050b939ef88428517f047f30 + languageName: node + linkType: hard + +"colorette@npm:^2.0.10": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: 10/0b8de48bfa5d10afc160b8eaa2b9938f34a892530b2f7d7897e0458d9535a066e3998b49da9d21161c78225b272df19ae3a64d6df28b4c9734c0e55bbd02406f + languageName: node + linkType: hard + +"combine-promises@npm:^1.1.0": + version: 1.2.0 + resolution: "combine-promises@npm:1.2.0" + checksum: 10/ddce91436e24da03d5dc360c59cd55abfc9da5e949a26255aa42761925c574797c43138f0aabfc364e184e738e5e218a94ac6e88ebc459045bcf048ac7fe5f07 + languageName: node + linkType: hard + +"comma-separated-tokens@npm:^2.0.0": + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: 10/e3bf9e0332a5c45f49b90e79bcdb4a7a85f28d6a6f0876a94f1bb9b2bfbdbbb9292aac50e1e742d8c0db1e62a0229a106f57917e2d067fca951d81737651700d + languageName: node + linkType: hard + +"commander@npm:^10.0.0": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 10/8799faa84a30da985802e661cc9856adfaee324d4b138413013ef7f087e8d7924b144c30a1f1405475f0909f467665cd9e1ce13270a2f41b141dab0b7a58f3fb + languageName: node + linkType: hard + +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + +"commander@npm:^5.1.0": + version: 5.1.0 + resolution: "commander@npm:5.1.0" + checksum: 10/3e2ef5c003c5179250161e42ce6d48e0e69a54af970c65b7f985c70095240c260fd647453efd4c2c5a31b30ce468f373dc70f769c2f54a2c014abc4792aaca28 + languageName: node + linkType: hard + +"commander@npm:^7.2.0": + version: 7.2.0 + resolution: "commander@npm:7.2.0" + checksum: 10/9973af10727ad4b44f26703bf3e9fdc323528660a7590efe3aa9ad5042b4584c0deed84ba443f61c9d6f02dade54a5a5d3c95e306a1e1630f8374ae6db16c06d + languageName: node + linkType: hard + +"commander@npm:^8.3.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 10/6b7b5d334483ce24bd73c5dac2eab901a7dbb25fd983ea24a1eeac6e7166bb1967f641546e8abf1920afbde86a45fbfe5812fbc69d0dc451bb45ca416a12a3a3 + languageName: node + linkType: hard + +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10/09c180e8d8495d42990d617f4d4b7522b5da20f6b236afe310192d401d1da8147a7835ae1ea37797ba0c2238ef3d06f3492151591451df34539fdb4b2630f2b3 + languageName: node + linkType: hard + +"compressible@npm:~2.0.18": + version: 2.0.18 + resolution: "compressible@npm:2.0.18" + dependencies: + mime-db: "npm:>= 1.43.0 < 2" + checksum: 10/58321a85b375d39230405654721353f709d0c1442129e9a17081771b816302a012471a9b8f4864c7dbe02eef7f2aaac3c614795197092262e94b409c9be108f0 + languageName: node + linkType: hard + +"compression@npm:^1.7.4": + version: 1.8.0 + resolution: "compression@npm:1.8.0" + dependencies: + bytes: "npm:3.1.2" + compressible: "npm:~2.0.18" + debug: "npm:2.6.9" + negotiator: "npm:~0.6.4" + on-headers: "npm:~1.0.2" + safe-buffer: "npm:5.2.1" + vary: "npm:~1.1.2" + checksum: 10/ca213b9bd03e56c7c3596399d846237b5f0b31ca4cdeaa76a9547cd3c1465fbcfcb0fe93a5d7ff64eff28383fc65b53f1ef8bb2720d11bb48ad8c0836c502506 + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + +"concurrently@npm:9.2.0": + version: 9.2.0 + resolution: "concurrently@npm:9.2.0" + dependencies: + chalk: "npm:^4.1.2" + lodash: "npm:^4.17.21" + rxjs: "npm:^7.8.1" + shell-quote: "npm:^1.8.1" + supports-color: "npm:^8.1.1" + tree-kill: "npm:^1.2.2" + yargs: "npm:^17.7.2" + bin: + conc: dist/bin/concurrently.js + concurrently: dist/bin/concurrently.js + checksum: 10/fdf5d3b583640b11ef84fab3ffdf77ed9c6878fa0a56f6787b6cd46b7011305c71d9e0067a814ca4fa52bea6f20ddb466bb97a13d61999628e43e550ddad7c93 + languageName: node + linkType: hard + +"config-chain@npm:^1.1.11": + version: 1.1.13 + resolution: "config-chain@npm:1.1.13" + dependencies: + ini: "npm:^1.3.4" + proto-list: "npm:~1.2.1" + checksum: 10/83d22cabf709e7669f6870021c4d552e4fc02e9682702b726be94295f42ce76cfed00f70b2910ce3d6c9465d9758e191e28ad2e72ff4e3331768a90da6c1ef03 + languageName: node + linkType: hard + +"configstore@npm:^6.0.0": + version: 6.0.0 + resolution: "configstore@npm:6.0.0" + dependencies: + dot-prop: "npm:^6.0.1" + graceful-fs: "npm:^4.2.6" + unique-string: "npm:^3.0.0" + write-file-atomic: "npm:^3.0.3" + xdg-basedir: "npm:^5.0.1" + checksum: 10/81995351c10bc04c58507f17748477aeac6f47465109d20e3534cebc881d22e927cfd29e73dd852c46c55f62c2b7be4cd1fe6eb3a93ba51f7f9813c218f9bae0 + languageName: node + linkType: hard + +"connect-history-api-fallback@npm:^2.0.0": + version: 2.0.0 + resolution: "connect-history-api-fallback@npm:2.0.0" + checksum: 10/3b26bf4041fdb33deacdcb3af9ae11e9a0b413fb14c95844d74a460b55e407625b364955dcf965c654605cde9d24ad5dad423c489aa430825aab2035859aba0c + languageName: node + linkType: hard + +"consola@npm:^3.2.3": + version: 3.4.0 + resolution: "consola@npm:3.4.0" + checksum: 10/99d4a8131f4cc42ff6bb8e4fd8c9dbd428d6b949f3ec25d9d24892a7b0603b0aabeee8213e13ad74439b5078fdb204f9377bcdd401949c33fff672d91f05c4ec + languageName: node + linkType: hard + +"content-disposition@npm:0.5.2": + version: 0.5.2 + resolution: "content-disposition@npm:0.5.2" + checksum: 10/97c5e7c8c72a0524c5d92866ecd3da28d4596925321aa3252d7ce3122d354b099d73cc1981fec8f24848d74314089928f626af8f9d7b51c3bc625d47f11e1d90 + languageName: node + linkType: hard + +"content-disposition@npm:0.5.4": + version: 0.5.4 + resolution: "content-disposition@npm:0.5.4" + dependencies: + safe-buffer: "npm:5.2.1" + checksum: 10/b7f4ce176e324f19324be69b05bf6f6e411160ac94bc523b782248129eb1ef3be006f6cff431aaea5e337fe5d176ce8830b8c2a1b721626ead8933f0cbe78720 + languageName: node + linkType: hard + +"content-type@npm:~1.0.4, content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 10/585847d98dc7fb8035c02ae2cb76c7a9bd7b25f84c447e5ed55c45c2175e83617c8813871b4ee22f368126af6b2b167df655829007b21aa10302873ea9c62662 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + +"cookie-signature@npm:1.0.6": + version: 1.0.6 + resolution: "cookie-signature@npm:1.0.6" + checksum: 10/f4e1b0a98a27a0e6e66fd7ea4e4e9d8e038f624058371bf4499cfcd8f3980be9a121486995202ba3fca74fbed93a407d6d54d43a43f96fd28d0bd7a06761591a + languageName: node + linkType: hard + +"cookie@npm:0.7.1": + version: 0.7.1 + resolution: "cookie@npm:0.7.1" + checksum: 10/aec6a6aa0781761bf55d60447d6be08861d381136a0fe94aa084fddd4f0300faa2b064df490c6798adfa1ebaef9e0af9b08a189c823e0811b8b313b3d9a03380 + languageName: node + linkType: hard + +"copy-text-to-clipboard@npm:^3.2.0": + version: 3.2.0 + resolution: "copy-text-to-clipboard@npm:3.2.0" + checksum: 10/df7115c197a166d51f59e4e20ab2a68a855ae8746d25ff149b5465c694d9a405c7e6684b73a9f87ba8d653070164e229c15dfdb9fd77c30be1ff0da569661060 + languageName: node + linkType: hard + +"copy-webpack-plugin@npm:^11.0.0": + version: 11.0.0 + resolution: "copy-webpack-plugin@npm:11.0.0" + dependencies: + fast-glob: "npm:^3.2.11" + glob-parent: "npm:^6.0.1" + globby: "npm:^13.1.1" + normalize-path: "npm:^3.0.0" + schema-utils: "npm:^4.0.0" + serialize-javascript: "npm:^6.0.0" + peerDependencies: + webpack: ^5.1.0 + checksum: 10/dc103be79ef72a4bb0bc8ce498b2cca964e3771326b009a1f3cb2d17960fca17538a725b09427161eccf485e2badbbd5490ddf2570f7976938e4e7338f1fd7e9 + languageName: node + linkType: hard + +"core-js-compat@npm:^3.40.0": + version: 3.41.0 + resolution: "core-js-compat@npm:3.41.0" + dependencies: + browserslist: "npm:^4.24.4" + checksum: 10/a59da111fc437cc7ed1a1448dae6883617cabebd7731433d27ad75e0ff77df5f411204979bd8eb5668d2600f99db46eedf6f87e123109b6de728bef489d4229a + languageName: node + linkType: hard + +"core-js-pure@npm:^3.30.2": + version: 3.41.0 + resolution: "core-js-pure@npm:3.41.0" + checksum: 10/69cc1d966d8a177be3d8ddbb4460c778dbfa5a458f74069b55322428524a54544a787fc15fe905aa84e93e0eab0d6a6501fb7026a885b7a8553c8542b01e79fb + languageName: node + linkType: hard + +"core-js@npm:^3.31.1": + version: 3.41.0 + resolution: "core-js@npm:3.41.0" + checksum: 10/a06ebae2264dd24c8e4b331a68412f7d0730557c41901f80fa910a9398dbef4670482d9ef5a41fef7efd41307c612d3d4051df7640ac4c01ff6feda45f8b92be + languageName: node + linkType: hard + +"core-util-is@npm:~1.0.0": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 10/9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + +"cosmiconfig@npm:^8.1.3, cosmiconfig@npm:^8.3.5": + version: 8.3.6 + resolution: "cosmiconfig@npm:8.3.6" + dependencies: + import-fresh: "npm:^3.3.0" + js-yaml: "npm:^4.1.0" + parse-json: "npm:^5.2.0" + path-type: "npm:^4.0.0" + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/91d082baca0f33b1c085bf010f9ded4af43cbedacba8821da0fb5667184d0a848addc52c31fadd080007f904a555319c238cf5f4c03e6d58ece2e4876b2e73d6 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/0d52657d7ae36eb130999dffff1168ec348687b48dd38e2ff59992ed916c88d328cf1d07ff4a4a10bc78de5e1c23f04b306d569e42f7a2293915c081e4dfee86 + languageName: node + linkType: hard + +"crypto-random-string@npm:^4.0.0": + version: 4.0.0 + resolution: "crypto-random-string@npm:4.0.0" + dependencies: + type-fest: "npm:^1.0.1" + checksum: 10/cd5d7ae13803de53680aaed4c732f67209af5988cbeec5f6b29082020347c2d8849ca921b2008be7d6bd1d9d198c3c3697e7441d6d0d3da1bf51e9e4d2032149 + languageName: node + linkType: hard + +"css-blank-pseudo@npm:^7.0.1": + version: 7.0.1 + resolution: "css-blank-pseudo@npm:7.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/bbe45955d0cb5a803f63f44f68b565cd1df41e737aca391262f9e9c8f2b86600fad18fbf9c5f48ba0cf10891647662831bc29019c02bcfc697c65ba649d18a1b + languageName: node + linkType: hard + +"css-declaration-sorter@npm:^7.2.0": + version: 7.2.0 + resolution: "css-declaration-sorter@npm:7.2.0" + peerDependencies: + postcss: ^8.0.9 + checksum: 10/2acb9c13f556fc8f05e601e66ecae4cfdec0ed50ca69f18177718ad5a86c3929f7d0a2cae433fd831b2594670c6e61d3a25c79aa7830be5828dcd9d29219d387 + languageName: node + linkType: hard + +"css-has-pseudo@npm:^7.0.2": + version: 7.0.2 + resolution: "css-has-pseudo@npm:7.0.2" + dependencies: + "@csstools/selector-specificity": "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/6032539b0dda70c77e39791a090d668cf1508ad1db65bfb044b5fc311298ac033244893494962191a1f74c4d74b1525c8969e06aaacbc0f50021da48bc65753e + languageName: node + linkType: hard + +"css-loader@npm:^6.11.0": + version: 6.11.0 + resolution: "css-loader@npm:6.11.0" + dependencies: + icss-utils: "npm:^5.1.0" + postcss: "npm:^8.4.33" + postcss-modules-extract-imports: "npm:^3.1.0" + postcss-modules-local-by-default: "npm:^4.0.5" + postcss-modules-scope: "npm:^3.2.0" + postcss-modules-values: "npm:^4.0.0" + postcss-value-parser: "npm:^4.2.0" + semver: "npm:^7.5.4" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.0.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10/9e3665509f6786d46683de5c5f5c4bdd4aa62396b4017b41dbbb41ea5ada4012c80ee1e3302b79b504bc24da7fa69e3552d99006cecc953e0d9eef4a3053b929 + languageName: node + linkType: hard + +"css-minimizer-webpack-plugin@npm:^5.0.1": + version: 5.0.1 + resolution: "css-minimizer-webpack-plugin@npm:5.0.1" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.18" + cssnano: "npm:^6.0.1" + jest-worker: "npm:^29.4.3" + postcss: "npm:^8.4.24" + schema-utils: "npm:^4.0.1" + serialize-javascript: "npm:^6.0.1" + peerDependencies: + webpack: ^5.0.0 + peerDependenciesMeta: + "@parcel/css": + optional: true + "@swc/css": + optional: true + clean-css: + optional: true + csso: + optional: true + esbuild: + optional: true + lightningcss: + optional: true + checksum: 10/da5cbdf7be7a91ad2121d778e7c19f800b1fb00b398859cea6b3ab49f468fb1bf4d9fb0cc8c7912ae948977b3dde5890bc0729512b660e7d410a6cadba6a2af8 + languageName: node + linkType: hard + +"css-prefers-color-scheme@npm:^10.0.0": + version: 10.0.0 + resolution: "css-prefers-color-scheme@npm:10.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/b09055fdb8250c5f83b396bb310f7df48955cac6ff5dedb52f271af089a568b0c7b442461a24c533ffbe3f406ab39a043713264c32b9c75a625c8aaa48551714 + languageName: node + linkType: hard + +"css-select@npm:^4.1.3": + version: 4.3.0 + resolution: "css-select@npm:4.3.0" + dependencies: + boolbase: "npm:^1.0.0" + css-what: "npm:^6.0.1" + domhandler: "npm:^4.3.1" + domutils: "npm:^2.8.0" + nth-check: "npm:^2.0.1" + checksum: 10/8f7310c9af30ccaba8f72cb4a54d32232c53bf9ba05d019b693e16bfd7ba5df0affc1f4d74b1ee55923643d23b80a837eedcf60938c53356e479b04049ff9994 + languageName: node + linkType: hard + +"css-select@npm:^5.1.0": + version: 5.1.0 + resolution: "css-select@npm:5.1.0" + dependencies: + boolbase: "npm:^1.0.0" + css-what: "npm:^6.1.0" + domhandler: "npm:^5.0.2" + domutils: "npm:^3.0.1" + nth-check: "npm:^2.0.1" + checksum: 10/d486b1e7eb140468218a5ab5af53257e01f937d2173ac46981f6b7de9c5283d55427a36715dc8decfc0c079cf89259ac5b41ef58f6e1a422eee44ab8bfdc78da + languageName: node + linkType: hard + +"css-tree@npm:^2.3.1": + version: 2.3.1 + resolution: "css-tree@npm:2.3.1" + dependencies: + mdn-data: "npm:2.0.30" + source-map-js: "npm:^1.0.1" + checksum: 10/e5e39b82eb4767c664fa5c2cd9968c8c7e6b7fd2c0079b52680a28466d851e2826d5e64699c449d933c0e8ca0554beca43c41a9fcb09fb6a46139d462dbdf0df + languageName: node + linkType: hard + +"css-tree@npm:~2.2.0": + version: 2.2.1 + resolution: "css-tree@npm:2.2.1" + dependencies: + mdn-data: "npm:2.0.28" + source-map-js: "npm:^1.0.1" + checksum: 10/1959c4b0e268bf8db1b3a1776a5ba9ae3a464ccd1226bfa62799cb0a3d0039006e21fb95cec4dec9d687a9a9b90f692dff2d230b631527ece700f4bfb419aaf3 + languageName: node + linkType: hard + +"css-what@npm:^6.0.1, css-what@npm:^6.1.0": + version: 6.1.0 + resolution: "css-what@npm:6.1.0" + checksum: 10/c67a3a2d0d81843af87f8bf0a4d0845b0f952377714abbb2884e48942409d57a2110eabee003609d02ee487b054614bdfcfc59ee265728ff105bd5aa221c1d0e + languageName: node + linkType: hard + +"cssdb@npm:^8.3.0": + version: 8.3.0 + resolution: "cssdb@npm:8.3.0" + checksum: 10/f27a17d127739bb7bd7fc70f1f3b3ee7986070a895e6f1d6923f401c39be0aa21a6bac48331f76eec4bb82dfa1a4cc45827273328b11eae4402b85e709c8fdee + languageName: node + linkType: hard + +"cssesc@npm:^3.0.0": + version: 3.0.0 + resolution: "cssesc@npm:3.0.0" + bin: + cssesc: bin/cssesc + checksum: 10/0e161912c1306861d8f46e1883be1cbc8b1b2879f0f509287c0db71796e4ddfb97ac96bdfca38f77f452e2c10554e1bb5678c99b07a5cf947a12778f73e47e12 + languageName: node + linkType: hard + +"cssnano-preset-advanced@npm:^6.1.2": + version: 6.1.2 + resolution: "cssnano-preset-advanced@npm:6.1.2" + dependencies: + autoprefixer: "npm:^10.4.19" + browserslist: "npm:^4.23.0" + cssnano-preset-default: "npm:^6.1.2" + postcss-discard-unused: "npm:^6.0.5" + postcss-merge-idents: "npm:^6.0.3" + postcss-reduce-idents: "npm:^6.0.3" + postcss-zindex: "npm:^6.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/2cdc4cb44e36cb08acef585c998d50caf7bdf1ef142cab179ebf5ad7831254380ee842fd17b72cb8d3be4cc39c27a45a2648a13f3dc02d28cce8aa33f1bcd556 + languageName: node + linkType: hard + +"cssnano-preset-default@npm:^6.1.2": + version: 6.1.2 + resolution: "cssnano-preset-default@npm:6.1.2" + dependencies: + browserslist: "npm:^4.23.0" + css-declaration-sorter: "npm:^7.2.0" + cssnano-utils: "npm:^4.0.2" + postcss-calc: "npm:^9.0.1" + postcss-colormin: "npm:^6.1.0" + postcss-convert-values: "npm:^6.1.0" + postcss-discard-comments: "npm:^6.0.2" + postcss-discard-duplicates: "npm:^6.0.3" + postcss-discard-empty: "npm:^6.0.3" + postcss-discard-overridden: "npm:^6.0.2" + postcss-merge-longhand: "npm:^6.0.5" + postcss-merge-rules: "npm:^6.1.1" + postcss-minify-font-values: "npm:^6.1.0" + postcss-minify-gradients: "npm:^6.0.3" + postcss-minify-params: "npm:^6.1.0" + postcss-minify-selectors: "npm:^6.0.4" + postcss-normalize-charset: "npm:^6.0.2" + postcss-normalize-display-values: "npm:^6.0.2" + postcss-normalize-positions: "npm:^6.0.2" + postcss-normalize-repeat-style: "npm:^6.0.2" + postcss-normalize-string: "npm:^6.0.2" + postcss-normalize-timing-functions: "npm:^6.0.2" + postcss-normalize-unicode: "npm:^6.1.0" + postcss-normalize-url: "npm:^6.0.2" + postcss-normalize-whitespace: "npm:^6.0.2" + postcss-ordered-values: "npm:^6.0.2" + postcss-reduce-initial: "npm:^6.1.0" + postcss-reduce-transforms: "npm:^6.0.2" + postcss-svgo: "npm:^6.0.3" + postcss-unique-selectors: "npm:^6.0.4" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/ea7515a8ee82df8ffecdaa39d5a7778264d215e56bef675daec8d0eedbbe7fe70853a4a4538ff6731c2260ca47c192eaf194883265a5abfd6abd006494611bc7 + languageName: node + linkType: hard + +"cssnano-utils@npm:^4.0.2": + version: 4.0.2 + resolution: "cssnano-utils@npm:4.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/f04c6854e75d847c7a43aff835e003d5bc7387ddfc476f0ad3a2d63663d0cec41047d46604c1717bf6b5a8e24e54bb519e465ff78d62c7e073c7cbe2279bebaf + languageName: node + linkType: hard + +"cssnano@npm:^6.0.1, cssnano@npm:^6.1.2": + version: 6.1.2 + resolution: "cssnano@npm:6.1.2" + dependencies: + cssnano-preset-default: "npm:^6.1.2" + lilconfig: "npm:^3.1.1" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/65aad92c5ee0089ffd4cd933c18c65edbf7634f7c3cd833a499dc948aa7e4168be22130dfe83bde07fcdc87f7c45a02d09040b7f439498208bc90b8d5a9abcc8 + languageName: node + linkType: hard + +"csso@npm:^5.0.5": + version: 5.0.5 + resolution: "csso@npm:5.0.5" + dependencies: + css-tree: "npm:~2.2.0" + checksum: 10/4036fb2b9f8ed6b948349136b39e0b19ffb5edee934893a37b55e9a116186c4ae2a9d3ba66fbdbc07fa44a853fb478cd2d8733e4743473dcd364e7f21444ff34 + languageName: node + linkType: hard + +"csstype@npm:^3.0.2": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade + languageName: node + linkType: hard + +"debounce-promise@npm:^3.1.2": + version: 3.1.2 + resolution: "debounce-promise@npm:3.1.2" + checksum: 10/9a06b4f4674abf92ccda608510ba896f1a6f25c594d6288b787f40e99de836461ad8122f6cd8ce335816b693a678dfb37b7470961888ea4b08863208f3eea348 + languageName: node + linkType: hard + +"debounce@npm:^1.2.1": + version: 1.2.1 + resolution: "debounce@npm:1.2.1" + checksum: 10/0b95b2a9d80ed69117d890f8dab8c0f2d6066f8d20edd1d810ae51f8f366a6d4c8b1d56e97dcb9304e93d57de4d5db440d34a03def7dad50403fc3f22bf16808 + languageName: node + linkType: hard + +"debug@npm:2.6.9": + version: 2.6.9 + resolution: "debug@npm:2.6.9" + dependencies: + ms: "npm:2.0.0" + checksum: 10/e07005f2b40e04f1bd14a3dd20520e9c4f25f60224cb006ce9d6781732c917964e9ec029fc7f1a151083cd929025ad5133814d4dc624a9aaf020effe4914ed14 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/1847944c2e3c2c732514b93d11886575625686056cd765336212dc15de2d2b29612b6cd80e1afba767bb8e1803b778caf9973e98169ef1a24a7a7009e1820367 + languageName: node + linkType: hard + +"decode-named-character-reference@npm:^1.0.0": + version: 1.1.0 + resolution: "decode-named-character-reference@npm:1.1.0" + dependencies: + character-entities: "npm:^2.0.0" + checksum: 10/102970fde2d011f307d3789776e68defd75ba4ade1a34951affd1fabb86cd32026fd809f2658c2b600d839a57b6b6a84e2b3a45166d38c8625d66ca11cd702b8 + languageName: node + linkType: hard + +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: "npm:^3.1.0" + checksum: 10/d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 + languageName: node + linkType: hard + +"deep-extend@npm:^0.6.0": + version: 0.6.0 + resolution: "deep-extend@npm:0.6.0" + checksum: 10/7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7 + languageName: node + linkType: hard + +"deepmerge@npm:^4.3.1": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 + languageName: node + linkType: hard + +"default-gateway@npm:^6.0.3": + version: 6.0.3 + resolution: "default-gateway@npm:6.0.3" + dependencies: + execa: "npm:^5.0.0" + checksum: 10/126f8273ecac8ee9ff91ea778e8784f6cd732d77c3157e8c5bdd6ed03651b5291f71446d05bc02d04073b1e67583604db5394ea3cf992ede0088c70ea15b7378 + languageName: node + linkType: hard + +"defer-to-connect@npm:^2.0.1": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.0.1" + checksum: 10/abdcb2505d80a53524ba871273e5da75e77e52af9e15b3aa65d8aad82b8a3a424dad7aee2cc0b71470ac7acf501e08defac362e8b6a73cdb4309f028061df4ae + languageName: node + linkType: hard + +"define-lazy-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "define-lazy-prop@npm:2.0.0" + checksum: 10/0115fdb065e0490918ba271d7339c42453d209d4cb619dfe635870d906731eff3e1ade8028bb461ea27ce8264ec5e22c6980612d332895977e89c1bbc80fcee2 + languageName: node + linkType: hard + +"define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.0" + object-keys: "npm:^1.1.1" + checksum: 10/b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + +"depd@npm:2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: 10/c0c8ff36079ce5ada64f46cc9d6fd47ebcf38241105b6e0c98f412e8ad91f084bcf906ff644cc3a4bd876ca27a62accb8b0fff72ea6ed1a414b89d8506f4a5ca + languageName: node + linkType: hard + +"depd@npm:~1.1.2": + version: 1.1.2 + resolution: "depd@npm:1.1.2" + checksum: 10/2ed6966fc14463a9e85451db330ab8ba041efed0b9a1a472dbfc6fbf2f82bab66491915f996b25d8517dddc36c8c74e24c30879b34877f3c4410733444a51d1d + languageName: node + linkType: hard + +"dequal@npm:^2.0.0, dequal@npm:^2.0.3": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 10/6ff05a7561f33603df87c45e389c9ac0a95e3c056be3da1a0c4702149e3a7f6fe5ffbb294478687ba51a9e95f3a60e8b6b9005993acd79c292c7d15f71964b6b + languageName: node + linkType: hard + +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 10/0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + +"detect-libc@npm:^2.0.3": + version: 2.0.3 + resolution: "detect-libc@npm:2.0.3" + checksum: 10/b4ea018d623e077bd395f168a9e81db77370dde36a5b01d067f2ad7989924a81d31cb547ff764acb2aa25d50bb7fdde0b0a93bec02212b0cb430621623246d39 + languageName: node + linkType: hard + +"detect-node@npm:^2.0.4": + version: 2.1.0 + resolution: "detect-node@npm:2.1.0" + checksum: 10/832184ec458353e41533ac9c622f16c19f7c02d8b10c303dfd3a756f56be93e903616c0bb2d4226183c9351c15fc0b3dba41a17a2308262afabcfa3776e6ae6e + languageName: node + linkType: hard + +"detect-port@npm:^1.5.1": + version: 1.6.1 + resolution: "detect-port@npm:1.6.1" + dependencies: + address: "npm:^1.0.1" + debug: "npm:4" + bin: + detect: bin/detect-port.js + detect-port: bin/detect-port.js + checksum: 10/0429fa423abb15fc453face64e6ffa406e375f51f5b4421a7886962e680dc05824eae9b6ee4594ba273685c3add415ad00982b5da54802ac3de6f846173284c3 + languageName: node + linkType: hard + +"devlop@npm:^1.0.0, devlop@npm:^1.1.0": + version: 1.1.0 + resolution: "devlop@npm:1.1.0" + dependencies: + dequal: "npm:^2.0.0" + checksum: 10/3cc5f903d02d279d6dc4aa71ab6ed9898b9f4d1f861cc5421ce7357893c21b9520de78afb203c92bd650a6977ad0ca98195453a0707a39958cf5fea3b0a8ddd8 + languageName: node + linkType: hard + +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: "npm:^4.0.0" + checksum: 10/fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 + languageName: node + linkType: hard + +"dns-packet@npm:^5.2.2": + version: 5.6.1 + resolution: "dns-packet@npm:5.6.1" + dependencies: + "@leichtgewicht/ip-codec": "npm:^2.0.1" + checksum: 10/ef5496dd5a906e22ed262cbe1a6f5d532c0893c4f1884a7aa37d4d0d8b8376a2b43f749aab087c8bb1354d67b40444f7fca8de4017b161a4cea468543061aed3 + languageName: node + linkType: hard + +"dom-converter@npm:^0.2.0": + version: 0.2.0 + resolution: "dom-converter@npm:0.2.0" + dependencies: + utila: "npm:~0.4" + checksum: 10/71b22f56bce6255a963694a72860a99f08763cf500f02ff38ce4c7489f95b07e7a0069f10b04c7d200e21375474abe01232833ca1600f104bdee7173e493a5b9 + languageName: node + linkType: hard + +"dom-serializer@npm:^1.0.1": + version: 1.4.1 + resolution: "dom-serializer@npm:1.4.1" + dependencies: + domelementtype: "npm:^2.0.1" + domhandler: "npm:^4.2.0" + entities: "npm:^2.0.0" + checksum: 10/53b217bcfed4a0f90dd47f34f239b1c81fff53ffa39d164d722325817fdb554903b145c2d12c8421ce0df7d31c1b180caf7eacd3c86391dd925f803df8027dcc + languageName: node + linkType: hard + +"dom-serializer@npm:^2.0.0": + version: 2.0.0 + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.2" + entities: "npm:^4.2.0" + checksum: 10/e3bf9027a64450bca0a72297ecdc1e3abb7a2912268a9f3f5d33a2e29c1e2c3502c6e9f860fc6625940bfe0cfb57a44953262b9e94df76872fdfb8151097eeb3 + languageName: node + linkType: hard + +"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0, domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 + languageName: node + linkType: hard + +"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": + version: 4.3.1 + resolution: "domhandler@npm:4.3.1" + dependencies: + domelementtype: "npm:^2.2.0" + checksum: 10/e0d2af7403997a3ca040a9ace4a233b75ebe321e0ef628b417e46d619d65d47781b2f2038b6c2ef6e56e73e66aec99caf6a12c7e687ecff18ef74af6dfbde5de + languageName: node + linkType: hard + +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" + dependencies: + domelementtype: "npm:^2.3.0" + checksum: 10/809b805a50a9c6884a29f38aec0a4e1b4537f40e1c861950ed47d10b049febe6b79ab72adaeeebb3cc8fc1cd33f34e97048a72a9265103426d93efafa78d3e96 + languageName: node + linkType: hard + +"domutils@npm:^2.5.2, domutils@npm:^2.8.0": + version: 2.8.0 + resolution: "domutils@npm:2.8.0" + dependencies: + dom-serializer: "npm:^1.0.1" + domelementtype: "npm:^2.2.0" + domhandler: "npm:^4.2.0" + checksum: 10/1f316a03f00b09a8893d4a25d297d5cbffd02c564509dede28ef72d5ce38d93f6d61f1de88d439f31b14a1d9b42f587ed711b9e8b1b4d3bf6001399832bfc4e0 + languageName: node + linkType: hard + +"domutils@npm:^3.0.1": + version: 3.2.2 + resolution: "domutils@npm:3.2.2" + dependencies: + dom-serializer: "npm:^2.0.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + checksum: 10/2e08842151aa406f50fe5e6d494f4ec73c2373199fa00d1f77b56ec604e566b7f226312ae35ab8160bb7f27a27c7285d574c8044779053e499282ca9198be210 + languageName: node + linkType: hard + +"dot-case@npm:^3.0.4": + version: 3.0.4 + resolution: "dot-case@npm:3.0.4" + dependencies: + no-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: 10/a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 + languageName: node + linkType: hard + +"dot-prop@npm:^6.0.1": + version: 6.0.1 + resolution: "dot-prop@npm:6.0.1" + dependencies: + is-obj: "npm:^2.0.0" + checksum: 10/1200a4f6f81151161b8526c37966d60738cf12619b0ed1f55be01bdb55790bf0a5cd1398b8f2c296dcc07d0a7c2dd0e650baf0b069c367e74bb5df2f6603aba0 + languageName: node + linkType: hard + +"dunder-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "dunder-proto@npm:1.0.1" + dependencies: + call-bind-apply-helpers: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.2.0" + checksum: 10/5add88a3d68d42d6e6130a0cac450b7c2edbe73364bbd2fc334564418569bea97c6943a8fcd70e27130bf32afc236f30982fc4905039b703f23e9e0433c29934 + languageName: node + linkType: hard + +"duplexer@npm:^0.1.2": + version: 0.1.2 + resolution: "duplexer@npm:0.1.2" + checksum: 10/62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 10/1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.5.160": + version: 1.5.165 + resolution: "electron-to-chromium@npm:1.5.165" + checksum: 10/697f96f3791a0be2902306fbb84462e2060f0e420d2e5845e37a9983939c265a580781967bf14014124d3742cfacbbd1a37dd47c536a12412e374e1959155be4 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + +"emojilib@npm:^2.4.0": + version: 2.4.0 + resolution: "emojilib@npm:2.4.0" + checksum: 10/bef767eca49acaa881388d91bee6936ea57ae367d603d5227ff0a9da3e2d1e774a61c447e5f2f4901797d023c4b5239bc208285b6172a880d3655024a0f44980 + languageName: node + linkType: hard + +"emojis-list@npm:^3.0.0": + version: 3.0.0 + resolution: "emojis-list@npm:3.0.0" + checksum: 10/114f47d6d45612621497d2b1556c8f142c35332a591780a54e863e42d281e72d6c7d7c419f2e419319d4eb7f6ebf1db82d9744905d90f275db20d06a763b5e19 + languageName: node + linkType: hard + +"emoticon@npm:^4.0.1": + version: 4.1.0 + resolution: "emoticon@npm:4.1.0" + checksum: 10/7d88dffa04f2f8c7e1e99a62a2c7232bf057e736b281f51ad75d4e111d20459e2fca2362a7f022a6281e7e5b3ad5fa78d3720da8ba409c1c09d3dcb8938c55d0 + languageName: node + linkType: hard + +"encodeurl@npm:~1.0.2": + version: 1.0.2 + resolution: "encodeurl@npm:1.0.2" + checksum: 10/e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c + languageName: node + linkType: hard + +"encodeurl@npm:~2.0.0": + version: 2.0.0 + resolution: "encodeurl@npm:2.0.0" + checksum: 10/abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"enhanced-resolve@npm:^5.17.1": + version: 5.18.1 + resolution: "enhanced-resolve@npm:5.18.1" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/50e81c7fe2239fba5670ebce78a34709906ed3a79274aa416434f7307b252e0b7824d76a7dd403eca795571dc6afd9a44183fc45a68475e8f2fdfbae6e92fcc3 + languageName: node + linkType: hard + +"entities@npm:^2.0.0": + version: 2.2.0 + resolution: "entities@npm:2.2.0" + checksum: 10/2c765221ee324dbe25e1b8ca5d1bf2a4d39e750548f2e85cbf7ca1d167d709689ddf1796623e66666ae747364c11ed512c03b48c5bbe70968d30f2a4009509b7 + languageName: node + linkType: hard + +"entities@npm:^4.2.0, entities@npm:^4.4.0, entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: "npm:^0.2.1" + checksum: 10/d547740aa29c34e753fb6fed2c5de81802438529c12b3673bd37b6bb1fe49b9b7abdc3c11e6062fe625d8a296b3cf769a80f878865e25e685f787763eede3ffb + languageName: node + linkType: hard + +"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": + version: 1.0.1 + resolution: "es-define-property@npm:1.0.1" + checksum: 10/f8dc9e660d90919f11084db0a893128f3592b781ce967e4fccfb8f3106cb83e400a4032c559184ec52ee1dbd4b01e7776c7cd0b3327b1961b1a4a7008920fe78 + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 + languageName: node + linkType: hard + +"es-module-lexer@npm:^1.2.1": + version: 1.6.0 + resolution: "es-module-lexer@npm:1.6.0" + checksum: 10/807ee7020cc46a9c970c78cad1f2f3fc139877e5ebad7f66dbfbb124d451189ba1c48c1c632bd5f8ce1b8af2caef3fca340ba044a410fa890d17b080a59024bb + languageName: node + linkType: hard + +"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": + version: 1.1.1 + resolution: "es-object-atoms@npm:1.1.1" + dependencies: + es-errors: "npm:^1.3.0" + checksum: 10/54fe77de288451dae51c37bfbfe3ec86732dc3778f98f3eb3bdb4bf48063b2c0b8f9c93542656986149d08aa5be3204286e2276053d19582b76753f1a2728867 + languageName: node + linkType: hard + +"esast-util-from-estree@npm:^2.0.0": + version: 2.0.0 + resolution: "esast-util-from-estree@npm:2.0.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + devlop: "npm:^1.0.0" + estree-util-visit: "npm:^2.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + checksum: 10/b11a13df70e51e0306a8097d691eb2dbde52388bb4d29f89c080fccd00c9fb22a624fad8683ca2ce01761cbf289d3fd480852aec8f5e5a3f0a2abd30aa8dfbe7 + languageName: node + linkType: hard + +"esast-util-from-js@npm:^2.0.0": + version: 2.0.1 + resolution: "esast-util-from-js@npm:2.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + acorn: "npm:^8.0.0" + esast-util-from-estree: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/ad3ff18de45d981a19ae35ecd7f47a2954399c2d901f3d9f22ab58309c327215b6e2e39f9c0a8ff58d3fd0435fe81a3ff4257754e1a12bdc590a0b68c9d6e085 + languageName: node + linkType: hard + +"esbuild@npm:^0.25.0": + version: 0.25.1 + resolution: "esbuild@npm:0.25.1" + dependencies: + "@esbuild/aix-ppc64": "npm:0.25.1" + "@esbuild/android-arm": "npm:0.25.1" + "@esbuild/android-arm64": "npm:0.25.1" + "@esbuild/android-x64": "npm:0.25.1" + "@esbuild/darwin-arm64": "npm:0.25.1" + "@esbuild/darwin-x64": "npm:0.25.1" + "@esbuild/freebsd-arm64": "npm:0.25.1" + "@esbuild/freebsd-x64": "npm:0.25.1" + "@esbuild/linux-arm": "npm:0.25.1" + "@esbuild/linux-arm64": "npm:0.25.1" + "@esbuild/linux-ia32": "npm:0.25.1" + "@esbuild/linux-loong64": "npm:0.25.1" + "@esbuild/linux-mips64el": "npm:0.25.1" + "@esbuild/linux-ppc64": "npm:0.25.1" + "@esbuild/linux-riscv64": "npm:0.25.1" + "@esbuild/linux-s390x": "npm:0.25.1" + "@esbuild/linux-x64": "npm:0.25.1" + "@esbuild/netbsd-arm64": "npm:0.25.1" + "@esbuild/netbsd-x64": "npm:0.25.1" + "@esbuild/openbsd-arm64": "npm:0.25.1" + "@esbuild/openbsd-x64": "npm:0.25.1" + "@esbuild/sunos-x64": "npm:0.25.1" + "@esbuild/win32-arm64": "npm:0.25.1" + "@esbuild/win32-ia32": "npm:0.25.1" + "@esbuild/win32-x64": "npm:0.25.1" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/f1dcaa7c72133c4e130dc7a6c05158d48d7ccf6643efb12fd0c5a9727226a9249d3ea4a4ea34f879c4559819d9dd706a968fd34d5c180ae019ea0403246c5564 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1, escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10/9d7169e3965b2f9ae46971afa392f6e5a25545ea30f2e2dd99c9b0a95a3f52b5653681a84f5b2911a413ddad2d7a93d3514165072f349b5ffc59c75a899970d6 + languageName: node + linkType: hard + +"escape-goat@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-goat@npm:4.0.0" + checksum: 10/515f4c5427118a8513ef12ad3fbc194b2a0239a6bc8d923b8ebd885c97f3518ce54f911007e6c9424387d68b0f54cd72aa277cfc2ca44da8cb1bd6a880cfd13c + languageName: node + linkType: hard + +"escape-html@npm:^1.0.3, escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 10/6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10/20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e + languageName: node + linkType: hard + +"eslint-scope@npm:5.1.1": + version: 5.1.1 + resolution: "eslint-scope@npm:5.1.1" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^4.1.1" + checksum: 10/c541ef384c92eb5c999b7d3443d80195fcafb3da335500946f6db76539b87d5826c8f2e1d23bf6afc3154ba8cd7c8e566f8dc00f1eea25fdf3afc8fb9c87b238 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" + dependencies: + estraverse: "npm:^5.2.0" + checksum: 10/44ffcd89e714ea6b30143e7f119b104fc4d75e77ee913f34d59076b40ef2d21967f84e019f84e1fd0465b42cdbf725db449f232b5e47f29df29ed76194db8e16 + languageName: node + linkType: hard + +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: 10/3f67ad02b6dbfaddd9ea459cf2b6ef4ecff9a6082a7af9d22e445b9abc082ad9ca47e1825557b293fcdae477f4714e561123e30bb6a5b2f184fb2bad4a9497eb + languageName: node + linkType: hard + +"estraverse@npm:^5.2.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e + languageName: node + linkType: hard + +"estree-util-attach-comments@npm:^3.0.0": + version: 3.0.0 + resolution: "estree-util-attach-comments@npm:3.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10/a788b5bb7ab98311ab5e96628e40d2fc5d74eae5e5a1ca9769b4749ec5bf9747b00e200c597dc22b8d492a311933e78989930ef3a753556e375a41c360df19ac + languageName: node + linkType: hard + +"estree-util-build-jsx@npm:^3.0.0": + version: 3.0.1 + resolution: "estree-util-build-jsx@npm:3.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + devlop: "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + estree-walker: "npm:^3.0.0" + checksum: 10/08b43edd1d97ecbaa8e3be891b75bdab426734e68a9520bafd67ee61d04dc1680a6a7cb331b61b3b323952016cce7d947562bf3ed51d7ec6701a4463a3bacdb5 + languageName: node + linkType: hard + +"estree-util-is-identifier-name@npm:^3.0.0": + version: 3.0.0 + resolution: "estree-util-is-identifier-name@npm:3.0.0" + checksum: 10/cdc9187614fdb269d714eddfdf72c270a79daa9ed51e259bb78527983be6dcc68da6a914ccc41175b662194c67fbd2a1cd262f85fac1eef7111cfddfaf6f77f8 + languageName: node + linkType: hard + +"estree-util-scope@npm:^1.0.0": + version: 1.0.0 + resolution: "estree-util-scope@npm:1.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + checksum: 10/7807aaaf8651150fefee19cb60a670884f677959cc05513369c0b9646a329b132bccc9d6bbf19411a8a55a0840530f4e93cef5bba92ae9f347ac7c2ceef37cdd + languageName: node + linkType: hard + +"estree-util-to-js@npm:^2.0.0": + version: 2.0.0 + resolution: "estree-util-to-js@npm:2.0.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + astring: "npm:^1.8.0" + source-map: "npm:^0.7.0" + checksum: 10/4a1673d9c859d8fa8a3d87d83c770390ce3cde70978891f3ef1692d57b4f852e0d5a94d18c656bd6431e0be29a64fd041a1fb8e2a579a4484d47142d2a1addb5 + languageName: node + linkType: hard + +"estree-util-value-to-estree@npm:^3.0.1": + version: 3.3.3 + resolution: "estree-util-value-to-estree@npm:3.3.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10/68c42de34bb44a2c90a0e1cc977a5f7545423a5165439c6bd080f17bbc5bd45892cc6c11857ad83726305cf35631ad2e1f29cdae854331e3159bcbb1f1c70c70 + languageName: node + linkType: hard + +"estree-util-visit@npm:^2.0.0": + version: 2.0.0 + resolution: "estree-util-visit@npm:2.0.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/unist": "npm:^3.0.0" + checksum: 10/e3c39d34c8b42fc2067dfa64d460f754b43cca4b573b031a5e5bb185e02c4efc753353197815bbb094b8149a781ab76f18116bec8056b5ff375162e68bffa0bd + languageName: node + linkType: hard + +"estree-walker@npm:^3.0.0": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10/a65728d5727b71de172c5df323385755a16c0fdab8234dc756c3854cfee343261ddfbb72a809a5660fac8c75d960bb3e21aa898c2d7e9b19bb298482ca58a3af + languageName: node + linkType: hard + +"esutils@npm:^2.0.2": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10/b23acd24791db11d8f65be5ea58fd9a6ce2df5120ae2da65c16cfc5331ff59d5ac4ef50af66cd4bde238881503ec839928a0135b99a036a9cdfa22d17fd56cdb + languageName: node + linkType: hard + +"eta@npm:^2.2.0": + version: 2.2.0 + resolution: "eta@npm:2.2.0" + checksum: 10/31b0fd11f47ec7c626048f7bc6d95f0255a9aa21af059263d35d286aad7597b17c04ac0d92d49bbb62c430f5cb6920efbd93aabd527a5957f78c67150d33ccc3 + languageName: node + linkType: hard + +"etag@npm:~1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 10/571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff + languageName: node + linkType: hard + +"eval@npm:^0.1.8": + version: 0.1.8 + resolution: "eval@npm:0.1.8" + dependencies: + "@types/node": "npm:*" + require-like: "npm:>= 0.1.1" + checksum: 10/27366ad289e679135387e8030a3b4ccfc5cc7719137e4b3192a2fa045924d8f0acecaf62602db490505d18731fbe605cb46a970490dcd3c5647a359441c1a70c + languageName: node + linkType: hard + +"eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.4": + version: 4.0.7 + resolution: "eventemitter3@npm:4.0.7" + checksum: 10/8030029382404942c01d0037079f1b1bc8fed524b5849c237b80549b01e2fc49709e1d0c557fa65ca4498fc9e24cff1475ef7b855121fcc15f9d61f93e282346 + languageName: node + linkType: hard + +"events@npm:^3.2.0": + version: 3.3.0 + resolution: "events@npm:3.3.0" + checksum: 10/a3d47e285e28d324d7180f1e493961a2bbb4cad6412090e4dec114f4db1f5b560c7696ee8e758f55e23913ede856e3689cd3aa9ae13c56b5d8314cd3b3ddd1be + languageName: node + linkType: hard + +"execa@npm:5.1.1, execa@npm:^5.0.0": + version: 5.1.1 + resolution: "execa@npm:5.1.1" + dependencies: + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^6.0.0" + human-signals: "npm:^2.1.0" + is-stream: "npm:^2.0.0" + merge-stream: "npm:^2.0.0" + npm-run-path: "npm:^4.0.1" + onetime: "npm:^5.1.2" + signal-exit: "npm:^3.0.3" + strip-final-newline: "npm:^2.0.0" + checksum: 10/8ada91f2d70f7dff702c861c2c64f21dfdc1525628f3c0454fd6f02fce65f7b958616cbd2b99ca7fa4d474e461a3d363824e91b3eb881705231abbf387470597 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.2 + resolution: "exponential-backoff@npm:3.1.2" + checksum: 10/ca2f01f1aa4dafd3f3917bd531ab5be08c6f5f4b2389d2e974f903de3cbeb50b9633374353516b6afd70905775e33aba11afab1232d3acf0aa2963b98a611c51 + languageName: node + linkType: hard + +"express@npm:^4.17.3": + version: 4.21.2 + resolution: "express@npm:4.21.2" + dependencies: + accepts: "npm:~1.3.8" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.20.3" + content-disposition: "npm:0.5.4" + content-type: "npm:~1.0.4" + cookie: "npm:0.7.1" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + encodeurl: "npm:~2.0.0" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:1.3.1" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + merge-descriptors: "npm:1.0.3" + methods: "npm:~1.1.2" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.12" + proxy-addr: "npm:~2.0.7" + qs: "npm:6.13.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.2.1" + send: "npm:0.19.0" + serve-static: "npm:1.16.2" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10/34571c442fc8c9f2c4b442d2faa10ea1175cf8559237fc6a278f5ce6254a8ffdbeb9a15d99f77c1a9f2926ab183e3b7ba560e3261f1ad4149799e3412ab66bd1 + languageName: node + linkType: hard + +"extend-shallow@npm:^2.0.1": + version: 2.0.1 + resolution: "extend-shallow@npm:2.0.1" + dependencies: + is-extendable: "npm:^0.1.0" + checksum: 10/8fb58d9d7a511f4baf78d383e637bd7d2e80843bd9cd0853649108ea835208fb614da502a553acc30208e1325240bb7cc4a68473021612496bb89725483656d8 + languageName: node + linkType: hard + +"extend@npm:^3.0.0": + version: 3.0.2 + resolution: "extend@npm:3.0.2" + checksum: 10/59e89e2dc798ec0f54b36d82f32a27d5f6472c53974f61ca098db5d4648430b725387b53449a34df38fd0392045434426b012f302b3cc049a6500ccf82877e4e + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.8" + checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + +"fast-uri@npm:^3.0.1": + version: 3.0.6 + resolution: "fast-uri@npm:3.0.6" + checksum: 10/43c87cd03926b072a241590e49eca0e2dfe1d347ddffd4b15307613b42b8eacce00a315cf3c7374736b5f343f27e27ec88726260eb03a758336d507d6fbaba0a + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.19.1 + resolution: "fastq@npm:1.19.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10/75679dc226316341c4f2a6b618571f51eac96779906faecd8921b984e844d6ae42fabb2df69b1071327d398d5716693ea9c9c8941f64ac9e89ec2032ce59d730 + languageName: node + linkType: hard + +"fault@npm:^2.0.0": + version: 2.0.1 + resolution: "fault@npm:2.0.1" + dependencies: + format: "npm:^0.2.0" + checksum: 10/c9b30f47d95769177130a9409976a899ed31eb598450fbad5b0d39f2f5f56d5f4a9ff9257e0bee8407cb0fc3ce37165657888c6aa6d78472e403893104329b72 + languageName: node + linkType: hard + +"faye-websocket@npm:^0.11.3": + version: 0.11.4 + resolution: "faye-websocket@npm:0.11.4" + dependencies: + websocket-driver: "npm:>=0.5.1" + checksum: 10/22433c14c60925e424332d2794463a8da1c04848539b5f8db5fced62a7a7c71a25335a4a8b37334e3a32318835e2b87b1733d008561964121c4a0bd55f0878c3 + languageName: node + linkType: hard + +"fdir@npm:^6.4.4, fdir@npm:^6.4.6": + version: 6.4.6 + resolution: "fdir@npm:6.4.6" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10/c186ba387e7b75ccf874a098d9bc5fe0af0e9c52fc56f8eac8e80aa4edb65532684bf2bf769894ff90f53bf221d6136692052d31f07a9952807acae6cbe7ee50 + languageName: node + linkType: hard + +"feed@npm:^4.2.2": + version: 4.2.2 + resolution: "feed@npm:4.2.2" + dependencies: + xml-js: "npm:^1.6.11" + checksum: 10/6aeee26b92037d9b49e89513696cd9d487ada84b31d707f92ab6d579f5cf347353474722727ec0a2d7bcf4ea0829a02d9c7774aacae7709de35c2ea48a8a0d80 + languageName: node + linkType: hard + +"figures@npm:^3.2.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" + dependencies: + escape-string-regexp: "npm:^1.0.5" + checksum: 10/a3bf94e001be51d3770500789157f067218d4bc681a65e1f69d482de15120bcac822dceb1a7b3803f32e4e3a61a46df44f7f2c8ba95d6375e7491502e0dd3d97 + languageName: node + linkType: hard + +"file-loader@npm:^6.2.0": + version: 6.2.0 + resolution: "file-loader@npm:6.2.0" + dependencies: + loader-utils: "npm:^2.0.0" + schema-utils: "npm:^3.0.0" + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + checksum: 10/3a854be3a7501bdb0fd8a1c0d45c156c0dc8f0afced07cbdac0b13a79c2f2a03f7770d68cb555ff30b5ea7c20719df34e1b2bd896c93e3138ee31f0bdc560310 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"finalhandler@npm:1.3.1": + version: 1.3.1 + resolution: "finalhandler@npm:1.3.1" + dependencies: + debug: "npm:2.6.9" + encodeurl: "npm:~2.0.0" + escape-html: "npm:~1.0.3" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + statuses: "npm:2.0.1" + unpipe: "npm:~1.0.0" + checksum: 10/4babe72969b7373b5842bc9f75c3a641a4d0f8eb53af6b89fa714d4460ce03fb92b28de751d12ba415e96e7e02870c436d67412120555e2b382640535697305b + languageName: node + linkType: hard + +"find-cache-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "find-cache-dir@npm:4.0.0" + dependencies: + common-path-prefix: "npm:^3.0.0" + pkg-dir: "npm:^7.0.0" + checksum: 10/52a456a80deeb27daa3af6e06059b63bdb9cc4af4d845fc6d6229887e505ba913cd56000349caa60bc3aa59dacdb5b4c37903d4ba34c75102d83cab330b70d2f + languageName: node + linkType: hard + +"find-up@npm:^6.3.0": + version: 6.3.0 + resolution: "find-up@npm:6.3.0" + dependencies: + locate-path: "npm:^7.1.0" + path-exists: "npm:^5.0.0" + checksum: 10/4f3bdc30d41778c647e53f4923e72de5e5fb055157031f34501c5b36c2eb59f77b997edf9cb00165c6060cda7eaa2e3da82cb6be2e61d68ad3e07c4bc4cce67e + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + +"follow-redirects@npm:^1.0.0": + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" + peerDependenciesMeta: + debug: + optional: true + checksum: 10/e3ab42d1097e90d28b913903841e6779eb969b62a64706a3eb983e894a5db000fbd89296f45f08885a0e54cd558ef62e81be1165da9be25a6c44920da10f424c + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.3.1 + resolution: "foreground-child@npm:3.3.1" + dependencies: + cross-spawn: "npm:^7.0.6" + signal-exit: "npm:^4.0.1" + checksum: 10/427b33f997a98073c0424e5c07169264a62cda806d8d2ded159b5b903fdfc8f0a1457e06b5fc35506497acb3f1e353f025edee796300209ac6231e80edece835 + languageName: node + linkType: hard + +"form-data-encoder@npm:^2.1.2": + version: 2.1.4 + resolution: "form-data-encoder@npm:2.1.4" + checksum: 10/3778e7db3c21457296e6fdbc4200642a6c01e8be9297256e845ee275f9ddaecb5f49bfb0364690ad216898c114ec59bf85f01ec823a70670b8067273415d62f6 + languageName: node + linkType: hard + +"format@npm:^0.2.0": + version: 0.2.2 + resolution: "format@npm:0.2.2" + checksum: 10/5f878b8fc1a672c8cbefa4f293bdd977c822862577d70d53456a48b4169ec9b51677c0c995bf62c633b4e5cd673624b7c273f57923b28735a6c0c0a72c382a4a + languageName: node + linkType: hard + +"forwarded@npm:0.2.0": + version: 0.2.0 + resolution: "forwarded@npm:0.2.0" + checksum: 10/29ba9fd347117144e97cbb8852baae5e8b2acb7d1b591ef85695ed96f5b933b1804a7fac4a15dd09ca7ac7d0cdc104410e8102aae2dd3faa570a797ba07adb81 + languageName: node + linkType: hard + +"fraction.js@npm:^4.3.7": + version: 4.3.7 + resolution: "fraction.js@npm:4.3.7" + checksum: 10/bb5ebcdeeffcdc37b68ead3bdfc244e68de188e0c64e9702197333c72963b95cc798883ad16adc21588088b942bca5b6a6ff4aeb1362d19f6f3b629035dc15f5 + languageName: node + linkType: hard + +"fresh@npm:0.5.2": + version: 0.5.2 + resolution: "fresh@npm:0.5.2" + checksum: 10/64c88e489b5d08e2f29664eb3c79c705ff9a8eb15d3e597198ef76546d4ade295897a44abb0abd2700e7ef784b2e3cbf1161e4fbf16f59129193fd1030d16da1 + languageName: node + linkType: hard + +"fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0": + version: 11.3.0 + resolution: "fs-extra@npm:11.3.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/c9fe7b23dded1efe7bbae528d685c3206477e20cc60e9aaceb3f024f9b9ff2ee1f62413c161cb88546cc564009ab516dec99e9781ba782d869bb37e4fe04a97f + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + +"fs-monkey@npm:^1.0.4": + version: 1.0.6 + resolution: "fs-monkey@npm:1.0.6" + checksum: 10/a0502a23aa0b467f671cd5c7f989ff48611cce1f23deb8f6924862b49234ff37de6828f739a4f2c1acf8f20e80cb426bf6a9d135c401f3df1e7089b7de04c815 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin<compat/fsevents>": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.3.0": + version: 1.3.0 + resolution: "get-intrinsic@npm:1.3.0" + dependencies: + call-bind-apply-helpers: "npm:^1.0.2" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + function-bind: "npm:^1.1.2" + get-proto: "npm:^1.0.1" + gopd: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + math-intrinsics: "npm:^1.1.0" + checksum: 10/6e9dd920ff054147b6f44cb98104330e87caafae051b6d37b13384a45ba15e71af33c3baeac7cb630a0aaa23142718dcf25b45cfdd86c184c5dcb4e56d953a10 + languageName: node + linkType: hard + +"get-own-enumerable-property-symbols@npm:^3.0.0": + version: 3.0.2 + resolution: "get-own-enumerable-property-symbols@npm:3.0.2" + checksum: 10/8f0331f14159f939830884799f937343c8c0a2c330506094bc12cbee3665d88337fe97a4ea35c002cc2bdba0f5d9975ad7ec3abb925015cdf2a93e76d4759ede + languageName: node + linkType: hard + +"get-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "get-proto@npm:1.0.1" + dependencies: + dunder-proto: "npm:^1.0.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/4fc96afdb58ced9a67558698b91433e6b037aaa6f1493af77498d7c85b141382cf223c0e5946f334fb328ee85dfe6edd06d218eaf09556f4bc4ec6005d7f5f7b + languageName: node + linkType: hard + +"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: 10/781266d29725f35c59f1d214aedc92b0ae855800a980800e2923b3fbc4e56b3cb6e462c42e09a1cf1a00c64e056a78fa407cbe06c7c92b7e5cd49b4b85c2a497 + languageName: node + linkType: hard + +"github-slugger@npm:^1.5.0": + version: 1.5.0 + resolution: "github-slugger@npm:1.5.0" + checksum: 10/c70988224578b3bdaa25df65973ffc8c24594a77a28550c3636e495e49d17aef5cdb04c04fa3f1744babef98c61eecc6a43299a13ea7f3cc33d680bf9053ffbe + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"glob-parent@npm:^6.0.1": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: "npm:^4.0.3" + checksum: 10/c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + +"glob-to-regexp@npm:^0.4.1": + version: 0.4.1 + resolution: "glob-to-regexp@npm:0.4.1" + checksum: 10/9009529195a955c40d7b9690794aeff5ba665cc38f1519e111c58bb54366fd0c106bde80acf97ba4e533208eb53422c83b136611a54c5fefb1edd8dc267cb62e + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + languageName: node + linkType: hard + +"glob@npm:^7.1.3": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + +"global-dirs@npm:^3.0.0": + version: 3.0.1 + resolution: "global-dirs@npm:3.0.1" + dependencies: + ini: "npm:2.0.0" + checksum: 10/70147b80261601fd40ac02a104581432325c1c47329706acd773f3a6ce99bb36d1d996038c85ccacd482ad22258ec233c586b6a91535b1a116b89663d49d6438 + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + +"globby@npm:^11.1.0": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: "npm:^2.1.0" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.9" + ignore: "npm:^5.2.0" + merge2: "npm:^1.4.1" + slash: "npm:^3.0.0" + checksum: 10/288e95e310227bbe037076ea81b7c2598ccbc3122d87abc6dab39e1eec309aa14f0e366a98cdc45237ffcfcbad3db597778c0068217dcb1950fef6249104e1b1 + languageName: node + linkType: hard + +"globby@npm:^13.1.1": + version: 13.2.2 + resolution: "globby@npm:13.2.2" + dependencies: + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.3.0" + ignore: "npm:^5.2.4" + merge2: "npm:^1.4.1" + slash: "npm:^4.0.0" + checksum: 10/4494a9d2162a7e4d327988b26be66d8eab87d7f59a83219e74b065e2c3ced23698f68fb10482bf9337133819281803fb886d6ae06afbb2affa743623eb0b1949 + languageName: node + linkType: hard + +"gopd@npm:^1.0.1, gopd@npm:^1.2.0": + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10/94e296d69f92dc1c0768fcfeecfb3855582ab59a7c75e969d5f96ce50c3d201fd86d5a2857c22565764d5bb8a816c7b1e58f133ec318cd56274da36c5e3fb1a1 + languageName: node + linkType: hard + +"got@npm:^12.1.0": + version: 12.6.1 + resolution: "got@npm:12.6.1" + dependencies: + "@sindresorhus/is": "npm:^5.2.0" + "@szmarczak/http-timer": "npm:^5.0.1" + cacheable-lookup: "npm:^7.0.0" + cacheable-request: "npm:^10.2.8" + decompress-response: "npm:^6.0.0" + form-data-encoder: "npm:^2.1.2" + get-stream: "npm:^6.0.1" + http2-wrapper: "npm:^2.1.10" + lowercase-keys: "npm:^3.0.0" + p-cancelable: "npm:^3.0.0" + responselike: "npm:^3.0.0" + checksum: 10/6c22f1449f4574d79a38e0eba0b753ce2f9030d61838a1ae1e25d3ff5b0db7916aa21023ac369c67d39d17f87bba9283a0b0cb88590de77926c968630aacae75 + languageName: node + linkType: hard + +"graceful-fs@npm:4.2.10": + version: 4.2.10 + resolution: "graceful-fs@npm:4.2.10" + checksum: 10/0c83c52b62c68a944dcfb9d66b0f9f10f7d6e3d081e8067b9bfdc9e5f3a8896584d576036f82915773189eec1eba599397fc620e75c03c0610fb3d67c6713c1a + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"graphql-language-service@npm:5.4.0": + version: 5.4.0 + resolution: "graphql-language-service@npm:5.4.0" + dependencies: + debounce-promise: "npm:^3.1.2" + nullthrows: "npm:^1.0.0" + vscode-languageserver-types: "npm:^3.17.1" + peerDependencies: + graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 + bin: + graphql: dist/temp-bin.js + checksum: 10/d1489f40a67c45f1e3888cc0779d339dbc1eb409e12fe5961abb68ec2a7036eeef3532b355a34da87d45df7ac46b9b817f165d745178df6c657152c3d2a0aa7d + languageName: node + linkType: hard + +"gray-matter@npm:^4.0.3": + version: 4.0.3 + resolution: "gray-matter@npm:4.0.3" + dependencies: + js-yaml: "npm:^3.13.1" + kind-of: "npm:^6.0.2" + section-matter: "npm:^1.0.0" + strip-bom-string: "npm:^1.0.0" + checksum: 10/9a8f146a7a918d2524d5d60e0b4d45729f5bca54aa41247f971d9e4bc984943fda58159435763d463ec2abc8a0e238e807bd9b05e3a48f4a613a325c9dd5ad0c + languageName: node + linkType: hard + +"gzip-size@npm:^6.0.0": + version: 6.0.0 + resolution: "gzip-size@npm:6.0.0" + dependencies: + duplexer: "npm:^0.1.2" + checksum: 10/2df97f359696ad154fc171dcb55bc883fe6e833bca7a65e457b9358f3cb6312405ed70a8da24a77c1baac0639906cd52358dc0ce2ec1a937eaa631b934c94194 + languageName: node + linkType: hard + +"handle-thing@npm:^2.0.0": + version: 2.0.1 + resolution: "handle-thing@npm:2.0.1" + checksum: 10/441ec98b07f26819c70c702f6c874088eebeb551b242fe8fae4eab325746b82bf84ae7a1f6419547698accb3941fa26806c5f5f93c50e19f90e499065a711d61 + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: "npm:^1.0.0" + checksum: 10/2d8c9ab8cebb572e3362f7d06139a4592105983d4317e68f7adba320fe6ddfc8874581e0971e899e633fd5f72e262830edce36d5a0bc863dad17ad20572484b2 + languageName: node + linkType: hard + +"has-symbols@npm:^1.1.0": + version: 1.1.0 + resolution: "has-symbols@npm:1.1.0" + checksum: 10/959385c98696ebbca51e7534e0dc723ada325efa3475350951363cce216d27373e0259b63edb599f72eb94d6cde8577b4b2375f080b303947e560f85692834fa + languageName: node + linkType: hard + +"has-yarn@npm:^3.0.0": + version: 3.0.0 + resolution: "has-yarn@npm:3.0.0" + checksum: 10/b9e14e78e0a37bc070550c862b201534287bc10e62a86ec9c1f455ffb082db42817ce9aed914bd73f1d589bbf268520e194629ff2f62ff6b98a482c4bd2dcbfb + languageName: node + linkType: hard + +"hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + +"hast-util-from-parse5@npm:^8.0.0": + version: 8.0.3 + resolution: "hast-util-from-parse5@npm:8.0.3" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + devlop: "npm:^1.0.0" + hastscript: "npm:^9.0.0" + property-information: "npm:^7.0.0" + vfile: "npm:^6.0.0" + vfile-location: "npm:^5.0.0" + web-namespaces: "npm:^2.0.0" + checksum: 10/539c945c550cfef394a89dcff6e4de26768a748a7288ddce6f59554dd271b663b8398d58ace434264e965aaf3828fdbff86f9109d7fa639b3fe34dedcad4a5df + languageName: node + linkType: hard + +"hast-util-parse-selector@npm:^4.0.0": + version: 4.0.0 + resolution: "hast-util-parse-selector@npm:4.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10/76087670d3b0b50b23a6cb70bca53a6176d6608307ccdbb3ed18b650b82e7c3513bfc40348f1389dc0c5ae872b9a768851f4335f44654abd7deafd6974c52402 + languageName: node + linkType: hard + +"hast-util-raw@npm:^9.0.0": + version: 9.1.0 + resolution: "hast-util-raw@npm:9.1.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + hast-util-from-parse5: "npm:^8.0.0" + hast-util-to-parse5: "npm:^8.0.0" + html-void-elements: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + parse5: "npm:^7.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + web-namespaces: "npm:^2.0.0" + zwitch: "npm:^2.0.0" + checksum: 10/fa304d08a9fce0f54b2baa18d15c45cb5cac695cbee3567b8ccbd9a57fa295c0fb23d238daca1cf0135ad8d538bb341dcd7d9da03f8b7d12e6980a9f8c4340ae + languageName: node + linkType: hard + +"hast-util-to-estree@npm:^3.0.0": + version: 3.1.3 + resolution: "hast-util-to-estree@npm:3.1.3" + dependencies: + "@types/estree": "npm:^1.0.0" + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + comma-separated-tokens: "npm:^2.0.0" + devlop: "npm:^1.0.0" + estree-util-attach-comments: "npm:^3.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + hast-util-whitespace: "npm:^3.0.0" + mdast-util-mdx-expression: "npm:^2.0.0" + mdast-util-mdx-jsx: "npm:^3.0.0" + mdast-util-mdxjs-esm: "npm:^2.0.0" + property-information: "npm:^7.0.0" + space-separated-tokens: "npm:^2.0.0" + style-to-js: "npm:^1.0.0" + unist-util-position: "npm:^5.0.0" + zwitch: "npm:^2.0.0" + checksum: 10/efe69c8af68f021d853e70916c6e940765be519aec8703765898c1c3814424b0470f70c0272cf4ac06dcaf6d6f3cc781ebf034701ed240a33ac691d1f5eaf65b + languageName: node + linkType: hard + +"hast-util-to-jsx-runtime@npm:^2.0.0": + version: 2.3.6 + resolution: "hast-util-to-jsx-runtime@npm:2.3.6" + dependencies: + "@types/estree": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + comma-separated-tokens: "npm:^2.0.0" + devlop: "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + hast-util-whitespace: "npm:^3.0.0" + mdast-util-mdx-expression: "npm:^2.0.0" + mdast-util-mdx-jsx: "npm:^3.0.0" + mdast-util-mdxjs-esm: "npm:^2.0.0" + property-information: "npm:^7.0.0" + space-separated-tokens: "npm:^2.0.0" + style-to-js: "npm:^1.0.0" + unist-util-position: "npm:^5.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/111bd69f482952c7591cb4e1d3face25f1c18849b310a4d6cacc91e2d2cbc965d455fad35c059b8f0cfd762e933b826a7090b6f3098dece08307a6569de8f1d8 + languageName: node + linkType: hard + +"hast-util-to-parse5@npm:^8.0.0": + version: 8.0.0 + resolution: "hast-util-to-parse5@npm:8.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + comma-separated-tokens: "npm:^2.0.0" + devlop: "npm:^1.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + web-namespaces: "npm:^2.0.0" + zwitch: "npm:^2.0.0" + checksum: 10/ba59d0913ba7e914d8b0a50955c06806a6868445c56796ac9129d58185e86d7ff24037246767aba2ea904d9dee8c09b8ff303630bcd854431fdc1bbee2164c36 + languageName: node + linkType: hard + +"hast-util-whitespace@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-whitespace@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10/8c7e9eeb8131fc18702f3a42623eb6b0b09d470347aa8badacac70e6d91f79657ab8c6b57c4c6fee3658cff405fac30e816d1cdfb3ed1fbf6045d0a4555cf4d4 + languageName: node + linkType: hard + +"hastscript@npm:^9.0.0": + version: 9.0.1 + resolution: "hastscript@npm:9.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + comma-separated-tokens: "npm:^2.0.0" + hast-util-parse-selector: "npm:^4.0.0" + property-information: "npm:^7.0.0" + space-separated-tokens: "npm:^2.0.0" + checksum: 10/9aa8135faf0307807cca4075bef4e3403ae1ce959ad4b9e6720892ba957d58ff98b2f60b5eb3ac67d88ae897dc918997299cd4249d7ac602a0066dd46442c5d4 + languageName: node + linkType: hard + +"he@npm:^1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + +"history@npm:^4.9.0": + version: 4.10.1 + resolution: "history@npm:4.10.1" + dependencies: + "@babel/runtime": "npm:^7.1.2" + loose-envify: "npm:^1.2.0" + resolve-pathname: "npm:^3.0.0" + tiny-invariant: "npm:^1.0.2" + tiny-warning: "npm:^1.0.0" + value-equal: "npm:^1.0.1" + checksum: 10/042373f69dad6419a4d551b995ef40f449a8854775a1157c4e9f077ee39aea6ca7ed8f45ec3e1762ef1891357a724d17dad11f2fe7d0edeebcbcf9f48ed3e4d4 + languageName: node + linkType: hard + +"hoist-non-react-statics@npm:^3.1.0": + version: 3.3.2 + resolution: "hoist-non-react-statics@npm:3.3.2" + dependencies: + react-is: "npm:^16.7.0" + checksum: 10/1acbe85f33e5a39f90c822ad4d28b24daeb60f71c545279431dc98c312cd28a54f8d64788e477fe21dc502b0e3cf58589ebe5c1ad22af27245370391c2d24ea6 + languageName: node + linkType: hard + +"hpack.js@npm:^2.1.6": + version: 2.1.6 + resolution: "hpack.js@npm:2.1.6" + dependencies: + inherits: "npm:^2.0.1" + obuf: "npm:^1.0.0" + readable-stream: "npm:^2.0.1" + wbuf: "npm:^1.1.0" + checksum: 10/6910e4b9d943a78fd8e84ac42729fdab9bd406789d6204ad160af9dc5aa4750fc01f208249bf7116c11dc0678207a387b4ade24e4b628b95385b251ceeeb719c + languageName: node + linkType: hard + +"html-entities@npm:^2.3.2": + version: 2.5.2 + resolution: "html-entities@npm:2.5.2" + checksum: 10/4ec12ebdf2d5ba8192c68e1aef3c1e4a4f36b29246a0a88464fe278a54517d0196d3489af46a3145c7ecacb4fc5fd50497be19eb713b810acab3f0efcf36fdc2 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.2": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + +"html-minifier-terser@npm:^6.0.2": + version: 6.1.0 + resolution: "html-minifier-terser@npm:6.1.0" + dependencies: + camel-case: "npm:^4.1.2" + clean-css: "npm:^5.2.2" + commander: "npm:^8.3.0" + he: "npm:^1.2.0" + param-case: "npm:^3.0.4" + relateurl: "npm:^0.2.7" + terser: "npm:^5.10.0" + bin: + html-minifier-terser: cli.js + checksum: 10/a244fa944e002b57c66cc829a3f2dfdb9514b1833c2d838ada624964bf8c0afaf61d36c371758c7e44dedae95cea740a84d8d1067b916ed204f35175184d0e27 + languageName: node + linkType: hard + +"html-minifier-terser@npm:^7.2.0": + version: 7.2.0 + resolution: "html-minifier-terser@npm:7.2.0" + dependencies: + camel-case: "npm:^4.1.2" + clean-css: "npm:~5.3.2" + commander: "npm:^10.0.0" + entities: "npm:^4.4.0" + param-case: "npm:^3.0.4" + relateurl: "npm:^0.2.7" + terser: "npm:^5.15.1" + bin: + html-minifier-terser: cli.js + checksum: 10/7320095dbf08c361b45e855bd840d1d21fe86326afee775503594163532ebaaed9bb1c9dc98232b03c169dc24b56f30c294d559bca0cade59f9c950a1992db82 + languageName: node + linkType: hard + +"html-tags@npm:^3.3.1": + version: 3.3.1 + resolution: "html-tags@npm:3.3.1" + checksum: 10/d0e808544b92d8b999cbcc86d539577255a2f0f2f4f73110d10749d1d36e6fe6ad706a0355a8477afb6e000ecdc93d8455b3602951f9a2b694ac9e28f1b52878 + languageName: node + linkType: hard + +"html-url-attributes@npm:^3.0.0": + version: 3.0.1 + resolution: "html-url-attributes@npm:3.0.1" + checksum: 10/494074c2f730c5c0e517aa1b10111fb36732534a2d2b70427582c4a615472b47da472cf3a17562cc653826d378d20960f2783e0400f4f7cf0c3c2d91c6188d13 + languageName: node + linkType: hard + +"html-void-elements@npm:^3.0.0": + version: 3.0.0 + resolution: "html-void-elements@npm:3.0.0" + checksum: 10/59be397525465a7489028afa064c55763d9cccd1d7d9f630cca47137317f0e897a9ca26cef7e745e7cff1abc44260cfa407742b243a54261dfacd42230e94fce + languageName: node + linkType: hard + +"html-webpack-plugin@npm:^5.6.0": + version: 5.6.3 + resolution: "html-webpack-plugin@npm:5.6.3" + dependencies: + "@types/html-minifier-terser": "npm:^6.0.0" + html-minifier-terser: "npm:^6.0.2" + lodash: "npm:^4.17.21" + pretty-error: "npm:^4.0.0" + tapable: "npm:^2.0.0" + peerDependencies: + "@rspack/core": 0.x || 1.x + webpack: ^5.20.0 + peerDependenciesMeta: + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10/fd2bf1ac04823526c8b609555d027b38b9d61b4ba9f5c8116a37cc6b62d5b86cab1f478616e8c5344fee13663d2566f5c470c66265ecb1e9574dc38d0459889d + languageName: node + linkType: hard + +"htmlparser2@npm:^6.1.0": + version: 6.1.0 + resolution: "htmlparser2@npm:6.1.0" + dependencies: + domelementtype: "npm:^2.0.1" + domhandler: "npm:^4.0.0" + domutils: "npm:^2.5.2" + entities: "npm:^2.0.0" + checksum: 10/c9c34b0b722f5923c4ae05e59268aeb768582152969e3338a1cd3342b87f8dd2c0420f4745e46d2fd87f1b677ea2f314c3a93436ed8831905997e6347e081a5d + languageName: node + linkType: hard + +"htmlparser2@npm:^8.0.1": + version: 8.0.2 + resolution: "htmlparser2@npm:8.0.2" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + entities: "npm:^4.4.0" + checksum: 10/ea5512956eee06f5835add68b4291d313c745e8407efa63848f4b8a90a2dee45f498a698bca8614e436f1ee0cfdd609938b71d67c693794545982b76e53e6f11 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + +"http-deceiver@npm:^1.2.7": + version: 1.2.7 + resolution: "http-deceiver@npm:1.2.7" + checksum: 10/9ae293b0acbfad6ed45d52c1f85f58ab062465872fd9079c80d78c6527634002d73c2a9d8c0296cc12d178a0b689bb5291d9979aad3ce71ab17a7517588adbf7 + languageName: node + linkType: hard + +"http-errors@npm:2.0.0": + version: 2.0.0 + resolution: "http-errors@npm:2.0.0" + dependencies: + depd: "npm:2.0.0" + inherits: "npm:2.0.4" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + toidentifier: "npm:1.0.1" + checksum: 10/0e7f76ee8ff8a33e58a3281a469815b893c41357378f408be8f6d4aa7d1efafb0da064625518e7078381b6a92325949b119dc38fcb30bdbc4e3a35f78c44c439 + languageName: node + linkType: hard + +"http-errors@npm:~1.6.2": + version: 1.6.3 + resolution: "http-errors@npm:1.6.3" + dependencies: + depd: "npm:~1.1.2" + inherits: "npm:2.0.3" + setprototypeof: "npm:1.1.0" + statuses: "npm:>= 1.4.0 < 2" + checksum: 10/e48732657ea0b4a09853d2696a584fa59fa2a8c1ba692af7af3137b5491a997d7f9723f824e7e08eb6a87098532c09ce066966ddf0f9f3dd30905e52301acadb + languageName: node + linkType: hard + +"http-parser-js@npm:>=0.5.1": + version: 0.5.9 + resolution: "http-parser-js@npm:0.5.9" + checksum: 10/65e6ef5e063b4f67c590bdd122b255e9b70c5bf3429718f8b72951fe98f4f968c55a58ec88cc96a11357a437d75c4af9302b8026c0b53c525065ff4eb0cd969e + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + +"http-proxy-middleware@npm:^2.0.3": + version: 2.0.9 + resolution: "http-proxy-middleware@npm:2.0.9" + dependencies: + "@types/http-proxy": "npm:^1.17.8" + http-proxy: "npm:^1.18.1" + is-glob: "npm:^4.0.1" + is-plain-obj: "npm:^3.0.0" + micromatch: "npm:^4.0.2" + peerDependencies: + "@types/express": ^4.17.13 + peerDependenciesMeta: + "@types/express": + optional: true + checksum: 10/4ece416a91d52e96f8136c5f4abfbf7ac2f39becbad21fa8b158a12d7e7d8f808287ff1ae342b903fd1f15f2249dee87fabc09e1f0e73106b83331c496d67660 + languageName: node + linkType: hard + +"http-proxy@npm:^1.18.1": + version: 1.18.1 + resolution: "http-proxy@npm:1.18.1" + dependencies: + eventemitter3: "npm:^4.0.0" + follow-redirects: "npm:^1.0.0" + requires-port: "npm:^1.0.0" + checksum: 10/2489e98aba70adbfd8b9d41ed1ff43528be4598c88616c558b109a09eaffe4bb35e551b6c75ac42ed7d948bb7530a22a2be6ef4f0cecacb5927be139f4274594 + languageName: node + linkType: hard + +"http2-wrapper@npm:^2.1.10": + version: 2.2.1 + resolution: "http2-wrapper@npm:2.2.1" + dependencies: + quick-lru: "npm:^5.1.1" + resolve-alpn: "npm:^1.2.0" + checksum: 10/e7a5ac6548318e83fc0399cd832cdff6bbf902b165d211cad47a56ee732922e0aa1107246dd884b12532a1c4649d27c4d44f2480911c65202e93c90bde8fa29d + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:4" + checksum: 10/784b628cbd55b25542a9d85033bdfd03d4eda630fb8b3c9477959367f3be95dc476ed2ecbb9836c359c7c698027fc7b45723a302324433590f45d6c1706e8c13 + languageName: node + linkType: hard + +"human-signals@npm:^2.1.0": + version: 2.1.0 + resolution: "human-signals@npm:2.1.0" + checksum: 10/df59be9e0af479036798a881d1f136c4a29e0b518d4abb863afbd11bf30efa3eeb1d0425fc65942dcc05ab3bf40205ea436b0ff389f2cd20b75b8643d539bf86 + languageName: node + linkType: hard + +"iconv-lite@npm:0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3" + checksum: 10/6d3a2dac6e5d1fb126d25645c25c3a1209f70cceecc68b8ef51ae0da3cdc078c151fade7524a30b12a3094926336831fca09c666ef55b37e2c69638b5d6bd2e3 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + +"icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": + version: 5.1.0 + resolution: "icss-utils@npm:5.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/5c324d283552b1269cfc13a503aaaa172a280f914e5b81544f3803bc6f06a3b585fb79f66f7c771a2c052db7982c18bf92d001e3b47282e3abbbb4c4cc488d68 + languageName: node + linkType: hard + +"ignore@npm:^5.2.0, ignore@npm:^5.2.4": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 + languageName: node + linkType: hard + +"image-size@npm:^2.0.2": + version: 2.0.2 + resolution: "image-size@npm:2.0.2" + bin: + image-size: bin/image-size.js + checksum: 10/d15203279fe7ada01252d8c56ba97516385d6d5ac2cbf3d734580fc88db4f5272b9b3f7f378ad63abc7d06b5500c43b90d9f84626e2bda1cab403c16eb469592 + languageName: node + linkType: hard + +"import-fresh@npm:^3.3.0": + version: 3.3.1 + resolution: "import-fresh@npm:3.3.1" + dependencies: + parent-module: "npm:^1.0.0" + resolve-from: "npm:^4.0.0" + checksum: 10/a06b19461b4879cc654d46f8a6244eb55eb053437afd4cbb6613cad6be203811849ed3e4ea038783092879487299fda24af932b86bdfff67c9055ba3612b8c87 + languageName: node + linkType: hard + +"import-lazy@npm:^4.0.0": + version: 4.0.0 + resolution: "import-lazy@npm:4.0.0" + checksum: 10/943309cc8eb01ada12700448c288b0384f77a1bc33c7e00fa4cb223c665f467a13ce9aaceb8d2e4cf586b07c1d2828040263dcc069873ce63cfc2ac6fd087971 + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + +"infima@npm:0.2.0-alpha.45": + version: 0.2.0-alpha.45 + resolution: "infima@npm:0.2.0-alpha.45" + checksum: 10/5e620f52d4787a0d4f96fd428411138ec09042d2a7e9adc7fc38612a9c57e49dd485ccc4f35bbbcd07f66e63bb2f6fbb6dde35a8351e9a978a7e4e1ebb7f0af0 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:~2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + +"inherits@npm:2.0.3": + version: 2.0.3 + resolution: "inherits@npm:2.0.3" + checksum: 10/8771303d66c51be433b564427c16011a8e3fbc3449f1f11ea50efb30a4369495f1d0e89f0fc12bdec0bd7e49102ced5d137e031d39ea09821cb3c717fcf21e69 + languageName: node + linkType: hard + +"ini@npm:2.0.0": + version: 2.0.0 + resolution: "ini@npm:2.0.0" + checksum: 10/04e24ba05c4f6947e15560824e153b4610bceea2f5a3ab68651d221a4aab3c77d4e3e90a917ebc8bf5ad71a30a8575de56c39d6b4c4b1375a28016b9f3625f9d + languageName: node + linkType: hard + +"ini@npm:^1.3.4, ini@npm:~1.3.0": + version: 1.3.8 + resolution: "ini@npm:1.3.8" + checksum: 10/314ae176e8d4deb3def56106da8002b462221c174ddb7ce0c49ee72c8cd1f9044f7b10cc555a7d8850982c3b9ca96fc212122749f5234bc2b6fb05fb942ed566 + languageName: node + linkType: hard + +"inline-style-parser@npm:0.2.4": + version: 0.2.4 + resolution: "inline-style-parser@npm:0.2.4" + checksum: 10/80814479d1f3c9cbd102f9de4cd6558cf43cc2e48640e81c4371c3634f1e8b6dfeb2f21063cfa31d46cc83e834c20cd59ed9eeed9bfd45ef5bc02187ad941faf + languageName: node + linkType: hard + +"invariant@npm:^2.2.4": + version: 2.2.4 + resolution: "invariant@npm:2.2.4" + dependencies: + loose-envify: "npm:^1.0.0" + checksum: 10/cc3182d793aad82a8d1f0af697b462939cb46066ec48bbf1707c150ad5fad6406137e91a262022c269702e01621f35ef60269f6c0d7fd178487959809acdfb14 + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + +"ipaddr.js@npm:1.9.1": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: 10/864d0cced0c0832700e9621913a6429ccdc67f37c1bd78fb8c6789fff35c9d167cb329134acad2290497a53336813ab4798d2794fd675d5eb33b5fdf0982b9ca + languageName: node + linkType: hard + +"ipaddr.js@npm:^2.0.1": + version: 2.2.0 + resolution: "ipaddr.js@npm:2.2.0" + checksum: 10/9e1cdd9110b3bca5d910ab70d7fb1933e9c485d9b92cb14ef39f30c412ba3fe02a553921bf696efc7149cc653453c48ccf173adb996ec27d925f1f340f872986 + languageName: node + linkType: hard + +"is-alphabetical@npm:^2.0.0": + version: 2.0.1 + resolution: "is-alphabetical@npm:2.0.1" + checksum: 10/56207db8d9de0850f0cd30f4966bf731eb82cedfe496cbc2e97e7c3bacaf66fc54a972d2d08c0d93bb679cb84976a05d24c5ad63de56fabbfc60aadae312edaa + languageName: node + linkType: hard + +"is-alphanumerical@npm:^2.0.0": + version: 2.0.1 + resolution: "is-alphanumerical@npm:2.0.1" + dependencies: + is-alphabetical: "npm:^2.0.0" + is-decimal: "npm:^2.0.0" + checksum: 10/87acc068008d4c9c4e9f5bd5e251041d42e7a50995c77b1499cf6ed248f971aadeddb11f239cabf09f7975ee58cac7a48ffc170b7890076d8d227b24a68663c9 + languageName: node + linkType: hard + +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: 10/73ced84fa35e59e2c57da2d01e12cd01479f381d7f122ce41dcbb713f09dbfc651315832cd2bf8accba7681a69e4d6f1e03941d94dd10040d415086360e7005e + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + +"is-ci@npm:^3.0.1": + version: 3.0.1 + resolution: "is-ci@npm:3.0.1" + dependencies: + ci-info: "npm:^3.2.0" + bin: + is-ci: bin.js + checksum: 10/192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e + languageName: node + linkType: hard + +"is-core-module@npm:^2.16.0": + version: 2.16.1 + resolution: "is-core-module@npm:2.16.1" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/452b2c2fb7f889cbbf7e54609ef92cf6c24637c568acc7e63d166812a0fb365ae8a504c333a29add8bdb1686704068caa7f4e4b639b650dde4f00a038b8941fb + languageName: node + linkType: hard + +"is-decimal@npm:^2.0.0": + version: 2.0.1 + resolution: "is-decimal@npm:2.0.1" + checksum: 10/97132de7acdce77caa7b797632970a2ecd649a88e715db0e4dbc00ab0708b5e7574ba5903962c860cd4894a14fd12b100c0c4ac8aed445cf6f55c6cf747a4158 + languageName: node + linkType: hard + +"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": + version: 2.2.1 + resolution: "is-docker@npm:2.2.1" + bin: + is-docker: cli.js + checksum: 10/3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 + languageName: node + linkType: hard + +"is-extendable@npm:^0.1.0": + version: 0.1.1 + resolution: "is-extendable@npm:0.1.1" + checksum: 10/3875571d20a7563772ecc7a5f36cb03167e9be31ad259041b4a8f73f33f885441f778cee1f1fe0085eb4bc71679b9d8c923690003a36a6a5fdf8023e6e3f0672 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-hexadecimal@npm:^2.0.0": + version: 2.0.1 + resolution: "is-hexadecimal@npm:2.0.1" + checksum: 10/66a2ea85994c622858f063f23eda506db29d92b52580709eb6f4c19550552d4dcf3fb81952e52f7cf972097237959e00adc7bb8c9400cd12886e15bf06145321 + languageName: node + linkType: hard + +"is-installed-globally@npm:^0.4.0": + version: 0.4.0 + resolution: "is-installed-globally@npm:0.4.0" + dependencies: + global-dirs: "npm:^3.0.0" + is-path-inside: "npm:^3.0.2" + checksum: 10/5294d21c82cb9beedd693ce1dfb12117c4db36d6e35edc9dc6bf06cb300d23c96520d1bfb063386b054268ae3d7255c3f09393b52218cc26ace99b217bf37c93 + languageName: node + linkType: hard + +"is-npm@npm:^6.0.0": + version: 6.0.0 + resolution: "is-npm@npm:6.0.0" + checksum: 10/fafe1ddc772345f5460514891bb8014376904ccdbddd59eee7525c9adcc08d426933f28b087bef3e17524da7ebf35c03ef484ff3b6ba9d5fecd8c6e6a7d4bf11 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"is-obj@npm:^1.0.1": + version: 1.0.1 + resolution: "is-obj@npm:1.0.1" + checksum: 10/3ccf0efdea12951e0b9c784e2b00e77e87b2f8bd30b42a498548a8afcc11b3287342a2030c308e473e93a7a19c9ea7854c99a8832a476591c727df2a9c79796c + languageName: node + linkType: hard + +"is-obj@npm:^2.0.0": + version: 2.0.0 + resolution: "is-obj@npm:2.0.0" + checksum: 10/c9916ac8f4621962a42f5e80e7ffdb1d79a3fab7456ceaeea394cd9e0858d04f985a9ace45be44433bf605673c8be8810540fe4cc7f4266fc7526ced95af5a08 + languageName: node + linkType: hard + +"is-path-inside@npm:^3.0.2": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 + languageName: node + linkType: hard + +"is-plain-obj@npm:^3.0.0": + version: 3.0.0 + resolution: "is-plain-obj@npm:3.0.0" + checksum: 10/a6ebdf8e12ab73f33530641972a72a4b8aed6df04f762070d823808303e4f76d87d5ea5bd76f96a7bbe83d93f04ac7764429c29413bd9049853a69cb630fb21c + languageName: node + linkType: hard + +"is-plain-obj@npm:^4.0.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 10/6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce + languageName: node + linkType: hard + +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: "npm:^3.0.1" + checksum: 10/2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca + languageName: node + linkType: hard + +"is-regexp@npm:^1.0.0": + version: 1.0.0 + resolution: "is-regexp@npm:1.0.0" + checksum: 10/be692828e24cba479ec33644326fa98959ec68ba77965e0291088c1a741feaea4919d79f8031708f85fd25e39de002b4520622b55460660b9c369e6f7187faef + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + +"is-wsl@npm:^2.2.0": + version: 2.2.0 + resolution: "is-wsl@npm:2.2.0" + dependencies: + is-docker: "npm:^2.0.0" + checksum: 10/20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 + languageName: node + linkType: hard + +"is-yarn-global@npm:^0.4.0": + version: 0.4.1 + resolution: "is-yarn-global@npm:0.4.1" + checksum: 10/79ec4e6f581c53d4fefdf5f6c237f9a3ad8db29c85cdc4659e76ae345659317552052a97b7e56952aa5d94a23c798ebec8ccad72fb14d3b26dc647ddceddd716 + languageName: node + linkType: hard + +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + +"isarray@npm:~1.0.0": + version: 1.0.0 + resolution: "isarray@npm:1.0.0" + checksum: 10/f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isobject@npm:^3.0.1": + version: 3.0.1 + resolution: "isobject@npm:3.0.1" + checksum: 10/db85c4c970ce30693676487cca0e61da2ca34e8d4967c2e1309143ff910c207133a969f9e4ddb2dc6aba670aabce4e0e307146c310350b298e74a31f7d464703 + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + languageName: node + linkType: hard + +"jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" + dependencies: + "@jest/types": "npm:^29.6.3" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + graceful-fs: "npm:^4.2.9" + picomatch: "npm:^2.2.3" + checksum: 10/30d58af6967e7d42bd903ccc098f3b4d3859ed46238fbc88d4add6a3f10bea00c226b93660285f058bc7a65f6f9529cf4eb80f8d4707f79f9e3a23686b4ab8f3 + languageName: node + linkType: hard + +"jest-worker@npm:^27.4.5": + version: 27.5.1 + resolution: "jest-worker@npm:27.5.1" + dependencies: + "@types/node": "npm:*" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/06c6e2a84591d9ede704d5022fc13791e8876e83397c89d481b0063332abbb64c0f01ef4ca7de520b35c7a1058556078d6bdc3631376f4e9ffb42316c1a8488e + languageName: node + linkType: hard + +"jest-worker@npm:^29.4.3": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" + dependencies: + "@types/node": "npm:*" + jest-util: "npm:^29.7.0" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/364cbaef00d8a2729fc760227ad34b5e60829e0869bd84976bdfbd8c0d0f9c2f22677b3e6dd8afa76ed174765351cd12bae3d4530c62eefb3791055127ca9745 + languageName: node + linkType: hard + +"jiti@npm:^1.20.0": + version: 1.21.7 + resolution: "jiti@npm:1.21.7" + bin: + jiti: bin/jiti.js + checksum: 10/6a182521532126e4b7b5ad64b64fb2e162718fc03bc6019c21aa2222aacde6c6dfce4fc3bce9f69561a73b24ab5f79750ad353c37c3487a220d5869a39eae3a2 + languageName: node + linkType: hard + +"joi@npm:^17.9.2": + version: 17.13.3 + resolution: "joi@npm:17.13.3" + dependencies: + "@hapi/hoek": "npm:^9.3.0" + "@hapi/topo": "npm:^5.1.0" + "@sideway/address": "npm:^4.1.5" + "@sideway/formula": "npm:^3.0.1" + "@sideway/pinpoint": "npm:^2.0.0" + checksum: 10/4c150db0c820c3a52f4a55c82c1fc5e144a5b5f4da9ffebc7339a15469d1a447ebb427ced446efcb9709ab56bd71a06c4c67c9381bc1b9f9ae63fc7c89209bdf + languageName: node + linkType: hard + +"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + +"jsesc@npm:^3.0.2": + version: 3.1.0 + resolution: "jsesc@npm:3.1.0" + bin: + jsesc: bin/jsesc + checksum: 10/20bd37a142eca5d1794f354db8f1c9aeb54d85e1f5c247b371de05d23a9751ecd7bd3a9c4fc5298ea6fa09a100dafb4190fa5c98c6610b75952c3487f3ce7967 + languageName: node + linkType: hard + +"jsesc@npm:~3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10/8e5a7de6b70a8bd71f9cb0b5a7ade6a73ae6ab55e697c74cc997cede97417a3a65ed86c36f7dd6125fe49766e8386c845023d9e213916ca92c9dfdd56e2babf3 + languageName: node + linkType: hard + +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 10/82876154521b7b68ba71c4f969b91572d1beabadd87bd3a6b236f85fbc7dc4695089191ed60bb59f9340993c51b33d479f45b6ba9f3548beb519705281c32c3c + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 10/5f3a99009ed5f2a5a67d06e2f298cc97bc86d462034173308156f15b43a6e850be8511dc204b9b94566305da2947f7d90289657237d210351a39059ff9d666cf + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 10/02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad + languageName: node + linkType: hard + +"json5@npm:^2.1.2, json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" + dependenciesMeta: + graceful-fs: + optional: true + checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 + languageName: node + linkType: hard + +"keyv@npm:^4.5.3": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: "npm:3.0.1" + checksum: 10/167eb6ef64cc84b6fa0780ee50c9de456b422a1e18802209234f7c2cf7eae648c7741f32e50d7e24ccb22b24c13154070b01563d642755b156c357431a191e75 + languageName: node + linkType: hard + +"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 + languageName: node + linkType: hard + +"kleur@npm:^3.0.3": + version: 3.0.3 + resolution: "kleur@npm:3.0.3" + checksum: 10/0c0ecaf00a5c6173d25059c7db2113850b5457016dfa1d0e3ef26da4704fbb186b4938d7611246d86f0ddf1bccf26828daa5877b1f232a65e7373d0122a83e7f + languageName: node + linkType: hard + +"latest-version@npm:^7.0.0": + version: 7.0.0 + resolution: "latest-version@npm:7.0.0" + dependencies: + package-json: "npm:^8.1.0" + checksum: 10/1f0deba00d5a34394cce4463c938811f51bbb539b131674f4bb2062c63f2cc3b80bccd56ecade3bd5932d04a34cf0a5a8a2ccc4ec9e5e6b285a9a7b3e27d0d66 + languageName: node + linkType: hard + +"launch-editor@npm:^2.6.0": + version: 2.10.0 + resolution: "launch-editor@npm:2.10.0" + dependencies: + picocolors: "npm:^1.0.0" + shell-quote: "npm:^1.8.1" + checksum: 10/2ef26369d89ad22938c1f5c343a622ff2e8e2f7709901c739ef38319a103b7da400afc147005e765fc0c22fd467eeb5f63f98568b3882e21f7782a4061fdeb60 + languageName: node + linkType: hard + +"leven@npm:^3.1.0": + version: 3.1.0 + resolution: "leven@npm:3.1.0" + checksum: 10/638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 + languageName: node + linkType: hard + +"lightningcss-darwin-arm64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-darwin-arm64@npm:1.29.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"lightningcss-darwin-x64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-darwin-x64@npm:1.29.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"lightningcss-freebsd-x64@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-freebsd-x64@npm:1.29.3" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"lightningcss-linux-arm-gnueabihf@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm-gnueabihf@npm:1.29.3" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"lightningcss-linux-arm64-gnu@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm64-gnu@npm:1.29.3" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"lightningcss-linux-arm64-musl@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-arm64-musl@npm:1.29.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"lightningcss-linux-x64-gnu@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-x64-gnu@npm:1.29.3" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"lightningcss-linux-x64-musl@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-linux-x64-musl@npm:1.29.3" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"lightningcss-win32-arm64-msvc@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-win32-arm64-msvc@npm:1.29.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"lightningcss-win32-x64-msvc@npm:1.29.3": + version: 1.29.3 + resolution: "lightningcss-win32-x64-msvc@npm:1.29.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"lightningcss@npm:^1.27.0": + version: 1.29.3 + resolution: "lightningcss@npm:1.29.3" + dependencies: + detect-libc: "npm:^2.0.3" + lightningcss-darwin-arm64: "npm:1.29.3" + lightningcss-darwin-x64: "npm:1.29.3" + lightningcss-freebsd-x64: "npm:1.29.3" + lightningcss-linux-arm-gnueabihf: "npm:1.29.3" + lightningcss-linux-arm64-gnu: "npm:1.29.3" + lightningcss-linux-arm64-musl: "npm:1.29.3" + lightningcss-linux-x64-gnu: "npm:1.29.3" + lightningcss-linux-x64-musl: "npm:1.29.3" + lightningcss-win32-arm64-msvc: "npm:1.29.3" + lightningcss-win32-x64-msvc: "npm:1.29.3" + dependenciesMeta: + lightningcss-darwin-arm64: + optional: true + lightningcss-darwin-x64: + optional: true + lightningcss-freebsd-x64: + optional: true + lightningcss-linux-arm-gnueabihf: + optional: true + lightningcss-linux-arm64-gnu: + optional: true + lightningcss-linux-arm64-musl: + optional: true + lightningcss-linux-x64-gnu: + optional: true + lightningcss-linux-x64-musl: + optional: true + lightningcss-win32-arm64-msvc: + optional: true + lightningcss-win32-x64-msvc: + optional: true + checksum: 10/90933a666975f8e4f2b1bed1ec698a0072f96d2cd118e358932456a46105d62b72b701e4a5da5bd66f0b6e3beac2c65d0be2306acdf3f30603d86143502cce88 + languageName: node + linkType: hard + +"lilconfig@npm:^3.1.1": + version: 3.1.3 + resolution: "lilconfig@npm:3.1.3" + checksum: 10/b932ce1af94985f0efbe8896e57b1f814a48c8dbd7fc0ef8469785c6303ed29d0090af3ccad7e36b626bfca3a4dc56cc262697e9a8dd867623cf09a39d54e4c3 + languageName: node + linkType: hard + +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 10/0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + +"loader-runner@npm:^4.2.0": + version: 4.3.0 + resolution: "loader-runner@npm:4.3.0" + checksum: 10/555ae002869c1e8942a0efd29a99b50a0ce6c3296efea95caf48f00d7f6f7f659203ed6613688b6181aa81dc76de3e65ece43094c6dffef3127fe1a84d973cd3 + languageName: node + linkType: hard + +"loader-utils@npm:^2.0.0": + version: 2.0.4 + resolution: "loader-utils@npm:2.0.4" + dependencies: + big.js: "npm:^5.2.2" + emojis-list: "npm:^3.0.0" + json5: "npm:^2.1.2" + checksum: 10/28bd9af2025b0cb2fc6c9c2d8140a75a3ab61016e5a86edf18f63732216e985a50bf2479a662555beb472a54d12292e380423705741bfd2b54cab883aa067f18 + languageName: node + linkType: hard + +"locate-path@npm:^7.1.0": + version: 7.2.0 + resolution: "locate-path@npm:7.2.0" + dependencies: + p-locate: "npm:^6.0.0" + checksum: 10/1c6d269d4efec555937081be964e8a9b4a136319c79ca1d45ac6382212a8466113c75bd89e44521ca8ecd1c47fb08523b56eee5c0712bc7d14fec5f729deeb42 + languageName: node + linkType: hard + +"lodash.debounce@npm:^4.0.8": + version: 4.0.8 + resolution: "lodash.debounce@npm:4.0.8" + checksum: 10/cd0b2819786e6e80cb9f5cda26b1a8fc073daaf04e48d4cb462fa4663ec9adb3a5387aa22d7129e48eed1afa05b482e2a6b79bfc99b86886364449500cbb00fd + languageName: node + linkType: hard + +"lodash.memoize@npm:^4.1.2": + version: 4.1.2 + resolution: "lodash.memoize@npm:4.1.2" + checksum: 10/192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da + languageName: node + linkType: hard + +"lodash.uniq@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.uniq@npm:4.5.0" + checksum: 10/86246ca64ac0755c612e5df6d93cfe92f9ecac2e5ff054b965efbbb1d9a647b6310969e78545006f70f52760554b03233ad0103324121ae31474c20d5f7a2812 + languageName: node + linkType: hard + +"lodash@npm:^4.17.20, lodash@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 + languageName: node + linkType: hard + +"longest-streak@npm:^3.0.0": + version: 3.1.0 + resolution: "longest-streak@npm:3.1.0" + checksum: 10/d7f952ed004cbdb5c8bcfc4f7f5c3d65449e6c5a9e9be4505a656e3df5a57ee125f284286b4bf8ecea0c21a7b3bf2b8f9001ad506c319b9815ad6a63a47d0fd0 + languageName: node + linkType: hard + +"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.2.0, loose-envify@npm:^1.3.1, loose-envify@npm:^1.4.0": + version: 1.4.0 + resolution: "loose-envify@npm:1.4.0" + dependencies: + js-tokens: "npm:^3.0.0 || ^4.0.0" + bin: + loose-envify: cli.js + checksum: 10/6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 + languageName: node + linkType: hard + +"lower-case@npm:^2.0.2": + version: 2.0.2 + resolution: "lower-case@npm:2.0.2" + dependencies: + tslib: "npm:^2.0.3" + checksum: 10/83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 + languageName: node + linkType: hard + +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 10/67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^14.0.3": + version: 14.0.3 + resolution: "make-fetch-happen@npm:14.0.3" + dependencies: + "@npmcli/agent": "npm:^3.0.0" + cacache: "npm:^19.0.1" + http-cache-semantics: "npm:^4.1.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^4.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^1.0.0" + proc-log: "npm:^5.0.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^12.0.0" + checksum: 10/fce0385840b6d86b735053dfe941edc2dd6468fda80fe74da1eeff10cbd82a75760f406194f2bc2fa85b99545b2bc1f84c08ddf994b21830775ba2d1a87e8bdf + languageName: node + linkType: hard + +"markdown-extensions@npm:^2.0.0": + version: 2.0.0 + resolution: "markdown-extensions@npm:2.0.0" + checksum: 10/ec4ffcb0768f112e778e7ac74cb8ef22a966c168c3e6c29829f007f015b0a0b5c79c73ee8599a0c72e440e7f5cfdbf19e80e2d77b9a313b8f66e180a330cf1b2 + languageName: node + linkType: hard + +"markdown-table@npm:^2.0.0": + version: 2.0.0 + resolution: "markdown-table@npm:2.0.0" + dependencies: + repeat-string: "npm:^1.0.0" + checksum: 10/8018cd1a1733ffda916a0548438e50f3d21b6c6b71fb23696b33c0b5922a8cc46035eb4b204a59c6054f063076f934461ae094599656a63f87c1c3a80bd3c229 + languageName: node + linkType: hard + +"markdown-table@npm:^3.0.0": + version: 3.0.4 + resolution: "markdown-table@npm:3.0.4" + checksum: 10/bc699819e6a15607e5def0f21aa862aa061cf1f49877baa93b0185574f6ab143591afe0e18b94d9b15ea80c6a693894150dbccfacf4f6767160dc32ae393dfe0 + languageName: node + linkType: hard + +"math-intrinsics@npm:^1.1.0": + version: 1.1.0 + resolution: "math-intrinsics@npm:1.1.0" + checksum: 10/11df2eda46d092a6035479632e1ec865b8134bdfc4bd9e571a656f4191525404f13a283a515938c3a8de934dbfd9c09674d9da9fa831e6eb7e22b50b197d2edd + languageName: node + linkType: hard + +"mdast-util-directive@npm:^3.0.0": + version: 3.1.0 + resolution: "mdast-util-directive@npm:3.1.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + parse-entities: "npm:^4.0.0" + stringify-entities: "npm:^4.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10/5aabd777ae8752cb9d09c7827a6690887536da8a9f85e833d5399ab8f47e5aadaa3eea78985efd041f50c658bf91b4579800dae79b20549240f52bbc2bc26335 + languageName: node + linkType: hard + +"mdast-util-find-and-replace@npm:^3.0.0, mdast-util-find-and-replace@npm:^3.0.1": + version: 3.0.2 + resolution: "mdast-util-find-and-replace@npm:3.0.2" + dependencies: + "@types/mdast": "npm:^4.0.0" + escape-string-regexp: "npm:^5.0.0" + unist-util-is: "npm:^6.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10/446561aa950341ef6828069cef05566256cb6836b77ea498e648102411f96fdfa342c78b82c9d813b51a1dac80b030ce80c055e044bc285a3d52d8558fc3d65e + languageName: node + linkType: hard + +"mdast-util-from-markdown@npm:^2.0.0": + version: 2.0.2 + resolution: "mdast-util-from-markdown@npm:2.0.2" + dependencies: + "@types/mdast": "npm:^4.0.0" + "@types/unist": "npm:^3.0.0" + decode-named-character-reference: "npm:^1.0.0" + devlop: "npm:^1.0.0" + mdast-util-to-string: "npm:^4.0.0" + micromark: "npm:^4.0.0" + micromark-util-decode-numeric-character-reference: "npm:^2.0.0" + micromark-util-decode-string: "npm:^2.0.0" + micromark-util-normalize-identifier: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unist-util-stringify-position: "npm:^4.0.0" + checksum: 10/69b207913fbcc0469f8c59d922af4d5509b79e809d77c9bd4781543a907fe2ecc8e6433ce0707066a27b117b13f38af3aae4f2d085e18ebd2d3ad5f1a5647902 + languageName: node + linkType: hard + +"mdast-util-frontmatter@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-frontmatter@npm:2.0.1" + dependencies: + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + escape-string-regexp: "npm:^5.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + micromark-extension-frontmatter: "npm:^2.0.0" + checksum: 10/afd9486af6ea74a94d84a225c367ab810ad4439683ecafc1ce9fc7bb0ecacaafac82e0af529974489c145824b242509f9387f833fc01a14a83a978049772ef80 + languageName: node + linkType: hard + +"mdast-util-gfm-autolink-literal@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-gfm-autolink-literal@npm:2.0.1" + dependencies: + "@types/mdast": "npm:^4.0.0" + ccount: "npm:^2.0.0" + devlop: "npm:^1.0.0" + mdast-util-find-and-replace: "npm:^3.0.0" + micromark-util-character: "npm:^2.0.0" + checksum: 10/d933b42feb126bd094d4be4a4955326c4a9e727a5d0dbe3c824534a19d831996fcf16f67df3dd29550a7d2ac4ac568c80485bee380151ebb42c62848ab20dfa6 + languageName: node + linkType: hard + +"mdast-util-gfm-footnote@npm:^2.0.0": + version: 2.1.0 + resolution: "mdast-util-gfm-footnote@npm:2.1.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.1.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + micromark-util-normalize-identifier: "npm:^2.0.0" + checksum: 10/5fac0f64d1233f7c533c2bb99a95c56f8f5dab553ae3a83f87c1fd6e4f28e0050e3240ae32ba77b4f5df0b84404932c66fd00c852a0925059bfa5d876f155854 + languageName: node + linkType: hard + +"mdast-util-gfm-strikethrough@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-gfm-strikethrough@npm:2.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/b1abc137d78270540585ad94a7a4ed1630683312690b902389dae0ede50a6832e26d1be053687f49728e14fa8a379da9384342725d3beb4480fc30b12866ab37 + languageName: node + linkType: hard + +"mdast-util-gfm-table@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-gfm-table@npm:2.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + markdown-table: "npm:^3.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/a043d60d723a86f79c49cbdd1d98b80c89f4a8f9f5fa84b3880c53e132f40150972460aba9be1f44a612ef5abd6810d122c5e7e5d9c54f3ac7560cce8c305c75 + languageName: node + linkType: hard + +"mdast-util-gfm-task-list-item@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-gfm-task-list-item@npm:2.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/679a3ff09b52015c0088cd0616ccecc7cc9d250d56a8762aafdffc640f3f607bbd9fe047d3e7e7078e6a996e83f677be3bfcad7ac7260563825fa80a04f8e09d + languageName: node + linkType: hard + +"mdast-util-gfm@npm:^3.0.0": + version: 3.1.0 + resolution: "mdast-util-gfm@npm:3.1.0" + dependencies: + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-gfm-autolink-literal: "npm:^2.0.0" + mdast-util-gfm-footnote: "npm:^2.0.0" + mdast-util-gfm-strikethrough: "npm:^2.0.0" + mdast-util-gfm-table: "npm:^2.0.0" + mdast-util-gfm-task-list-item: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/d66809a07000ee63661ae9044f550989d96101e3c11557a84e12038ed28490667244432dbb1f8b7d9ebb4936cc8770d3de118aff85b7474f33693b4c07a1ffda + languageName: node + linkType: hard + +"mdast-util-mdx-expression@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-mdx-expression@npm:2.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/70e860f8ee22c4f478449942750055d649d4380bf43b235d0710af510189d285fb057e401d20b59596d9789f4e270fce08ca892dc849676f9e3383b991d52485 + languageName: node + linkType: hard + +"mdast-util-mdx-jsx@npm:^3.0.0": + version: 3.2.0 + resolution: "mdast-util-mdx-jsx@npm:3.2.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + devlop: "npm:^1.1.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + parse-entities: "npm:^4.0.0" + stringify-entities: "npm:^4.0.0" + unist-util-stringify-position: "npm:^4.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/62cd650a522e5d72ea6afd6d4a557fc86525b802d097a29a2fbe17d22e7b97c502a580611873e4d685777fe77c6ff8d39fb6e37d026b3acbc86c3b24927f4ad9 + languageName: node + linkType: hard + +"mdast-util-mdx@npm:^3.0.0": + version: 3.0.0 + resolution: "mdast-util-mdx@npm:3.0.0" + dependencies: + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-mdx-expression: "npm:^2.0.0" + mdast-util-mdx-jsx: "npm:^3.0.0" + mdast-util-mdxjs-esm: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/547d928f0d1e60d9087cd8ad301cdf2e1d14b094d2662a00292874b923bcb59323bdad3a29804c7f323ad78f4d3954361bfdaf4a9be765c4e6fe47a815df50c2 + languageName: node + linkType: hard + +"mdast-util-mdxjs-esm@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-mdxjs-esm@npm:2.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/05474226e163a3f407fccb5780b0d8585a95e548e5da4a85227df43f281b940c7941a9a9d4af1be4f885fe554731647addb057a728e87aa1f503ff9cc72c9163 + languageName: node + linkType: hard + +"mdast-util-phrasing@npm:^4.0.0": + version: 4.1.0 + resolution: "mdast-util-phrasing@npm:4.1.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10/3a97533e8ad104a422f8bebb34b3dde4f17167b8ed3a721cf9263c7416bd3447d2364e6d012a594aada40cac9e949db28a060bb71a982231693609034ed5324e + languageName: node + linkType: hard + +"mdast-util-to-hast@npm:^13.0.0": + version: 13.2.0 + resolution: "mdast-util-to-hast@npm:13.2.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + trim-lines: "npm:^3.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + checksum: 10/b17ee338f843af31a1c7a2ebf0df6f0b41c9380b7119a63ab521d271df665456578e1234bb7617883e8d860fe878038dcf2b76ab2f21e0f7451215a096d26cce + languageName: node + linkType: hard + +"mdast-util-to-markdown@npm:^2.0.0": + version: 2.1.2 + resolution: "mdast-util-to-markdown@npm:2.1.2" + dependencies: + "@types/mdast": "npm:^4.0.0" + "@types/unist": "npm:^3.0.0" + longest-streak: "npm:^3.0.0" + mdast-util-phrasing: "npm:^4.0.0" + mdast-util-to-string: "npm:^4.0.0" + micromark-util-classify-character: "npm:^2.0.0" + micromark-util-decode-string: "npm:^2.0.0" + unist-util-visit: "npm:^5.0.0" + zwitch: "npm:^2.0.0" + checksum: 10/ab494a32f1ec90f0a502970b403b1847a10f3ba635adddb66ce70994cc47b4924c6c05078ddd29a8c2c5c9bc8c0bcc20e5fc1ef0fcb9b0cb9c0589a000817f1c + languageName: node + linkType: hard + +"mdast-util-to-string@npm:^4.0.0": + version: 4.0.0 + resolution: "mdast-util-to-string@npm:4.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + checksum: 10/f4a5dbb9ea03521d7d3e26a9ba5652a1d6fbd55706dddd2155427517085688830e0ecd3f12418cfd40892640886eb39a4034c3c967d85e01e2fa64cfb53cff05 + languageName: node + linkType: hard + +"mdn-data@npm:2.0.28": + version: 2.0.28 + resolution: "mdn-data@npm:2.0.28" + checksum: 10/aec475e0c078af00498ce2f9434d96a1fdebba9814d14b8f72cd6d5475293f4b3972d0538af2d5c5053d35e1b964af08b7d162b98e9846e9343990b75e4baef1 + languageName: node + linkType: hard + +"mdn-data@npm:2.0.30": + version: 2.0.30 + resolution: "mdn-data@npm:2.0.30" + checksum: 10/e4944322bf3e0461a2daa2aee7e14e208960a036289531e4ef009e53d32bd41528350c070c4a33be867980443fe4c0523518d99318423cffa7c825fe7b1154e2 + languageName: node + linkType: hard + +"media-typer@npm:0.3.0": + version: 0.3.0 + resolution: "media-typer@npm:0.3.0" + checksum: 10/38e0984db39139604756903a01397e29e17dcb04207bb3e081412ce725ab17338ecc47220c1b186b6bbe79a658aad1b0d41142884f5a481f36290cdefbe6aa46 + languageName: node + linkType: hard + +"memfs@npm:^3.4.3": + version: 3.5.3 + resolution: "memfs@npm:3.5.3" + dependencies: + fs-monkey: "npm:^1.0.4" + checksum: 10/7c9cdb453a6b06e87f11e2dbe6c518fd3c1c1581b370ffa24f42f3fd5b1db8c2203f596e43321a0032963f3e9b66400f2c3cf043904ac496d6ae33eafd0878fe + languageName: node + linkType: hard + +"merge-descriptors@npm:1.0.3": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 10/52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 10/6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 + languageName: node + linkType: hard + +"methods@npm:~1.1.2": + version: 1.1.2 + resolution: "methods@npm:1.1.2" + checksum: 10/a385dd974faa34b5dd021b2bbf78c722881bf6f003bfe6d391d7da3ea1ed625d1ff10ddd13c57531f628b3e785be38d3eed10ad03cebd90b76932413df9a1820 + languageName: node + linkType: hard + +"micromark-core-commonmark@npm:^2.0.0": + version: 2.0.3 + resolution: "micromark-core-commonmark@npm:2.0.3" + dependencies: + decode-named-character-reference: "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-factory-destination: "npm:^2.0.0" + micromark-factory-label: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-factory-title: "npm:^2.0.0" + micromark-factory-whitespace: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-chunked: "npm:^2.0.0" + micromark-util-classify-character: "npm:^2.0.0" + micromark-util-html-tag-name: "npm:^2.0.0" + micromark-util-normalize-identifier: "npm:^2.0.0" + micromark-util-resolve-all: "npm:^2.0.0" + micromark-util-subtokenize: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/2b98b9eba1463850ebd8f338f966bd2113dafe764b490ebee3dccab3764d3c48b53fe67673297530e56bf54f58de27dfd1952ed79c5b4e32047cb7f29bd807f2 + languageName: node + linkType: hard + +"micromark-extension-directive@npm:^3.0.0": + version: 3.0.2 + resolution: "micromark-extension-directive@npm:3.0.2" + dependencies: + devlop: "npm:^1.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-factory-whitespace: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + parse-entities: "npm:^4.0.0" + checksum: 10/63dbaa209722c1a77ffea6c6d5ea0f873f5e795ef08a2039f3d795320c889e5ce10fe1162500b0ff3063f8ceb1f7d727ec1d29d2df6271cbe90ec0646e061c8d + languageName: node + linkType: hard + +"micromark-extension-frontmatter@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-extension-frontmatter@npm:2.0.0" + dependencies: + fault: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/55873937494e9bfe1cc8cba3c8710e14e85ad0c9f3bb859d367268fc2204f3fe2eb70f9f83e496de0d3ea79c468fe6df879f9d475c716644c2daa90056cc8374 + languageName: node + linkType: hard + +"micromark-extension-gfm-autolink-literal@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-extension-gfm-autolink-literal@npm:2.1.0" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/933b9b96ca62cd50732d9e58ae90ba446f4314e0ecbff3127e9aae430d9a295346f88fb33b5532acaf648d659b0db92e0c00c2e9f504c0d7b8bb4553318cac50 + languageName: node + linkType: hard + +"micromark-extension-gfm-footnote@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-extension-gfm-footnote@npm:2.1.0" + dependencies: + devlop: "npm:^1.0.0" + micromark-core-commonmark: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-normalize-identifier: "npm:^2.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/7e019414e31ab53c49c909b7068adbbcb1726433fce82bf735219276fe6e00a42b66288acb5c8831f80e77480fac34880eeeb60b1dc09d5885862b31db4b9ea2 + languageName: node + linkType: hard + +"micromark-extension-gfm-strikethrough@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-extension-gfm-strikethrough@npm:2.1.0" + dependencies: + devlop: "npm:^1.0.0" + micromark-util-chunked: "npm:^2.0.0" + micromark-util-classify-character: "npm:^2.0.0" + micromark-util-resolve-all: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/eaf2c7b1e3eb2a7d7f405e8abe561be083cc52b8e027225ed286490939f527d18c120df59c8d8e17fdcf284f8d014502bf3db45d8e36e3109457ece8fb1db29b + languageName: node + linkType: hard + +"micromark-extension-gfm-table@npm:^2.0.0": + version: 2.1.1 + resolution: "micromark-extension-gfm-table@npm:2.1.1" + dependencies: + devlop: "npm:^1.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/0391ead408d79a183a9bba325b0e660b85aef2cd6e442a9214afc4e0bdc3105cd7dbf41fc75465acf152883a4050b6203107c2a80bcadb304235581a1340fd8c + languageName: node + linkType: hard + +"micromark-extension-gfm-tagfilter@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-extension-gfm-tagfilter@npm:2.0.0" + dependencies: + micromark-util-types: "npm:^2.0.0" + checksum: 10/c5e3f8cdf22e184de3f55968e6b010876a100dff31f509b7d2975f2b981a7fdda6c2d9e452238b9fe54dc51f5d7b069e86de509d421d4efbdfc9194749b3f132 + languageName: node + linkType: hard + +"micromark-extension-gfm-task-list-item@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-extension-gfm-task-list-item@npm:2.1.0" + dependencies: + devlop: "npm:^1.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/c5f72929f0dca77df01442b721356624de6657364e2264ef50fc7226305976f302a49b670836f9494ce70a9b0335d974b5ef8e6457553c4c200bfc06d6951964 + languageName: node + linkType: hard + +"micromark-extension-gfm@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-gfm@npm:3.0.0" + dependencies: + micromark-extension-gfm-autolink-literal: "npm:^2.0.0" + micromark-extension-gfm-footnote: "npm:^2.0.0" + micromark-extension-gfm-strikethrough: "npm:^2.0.0" + micromark-extension-gfm-table: "npm:^2.0.0" + micromark-extension-gfm-tagfilter: "npm:^2.0.0" + micromark-extension-gfm-task-list-item: "npm:^2.0.0" + micromark-util-combine-extensions: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/8493d1041756bf21f9421fa6d357056bff6112aeccebc20595604686cdd908a6816765de297206457ae4c00f85fc58672bdbcbbc36820c25d561b1737af89055 + languageName: node + linkType: hard + +"micromark-extension-mdx-expression@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdx-expression@npm:3.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-factory-mdx-expression: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/a5592160319d4617362f6b72a6fc44b5570466afa07419d44bcfdd9398a77a5693d7c5f8da7b3ff4682edf6209d4781835f5d2e3166fdf6bba37db456fd2d091 + languageName: node + linkType: hard + +"micromark-extension-mdx-jsx@npm:^3.0.0": + version: 3.0.1 + resolution: "micromark-extension-mdx-jsx@npm:3.0.1" + dependencies: + "@types/acorn": "npm:^4.0.0" + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + micromark-factory-mdx-expression: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/2cc0277d91c3c85d52e88755d17d021b5eab6fa03a578a9965f9d3d2c184dbc1accce63e7f8437a092ceeb602840ef451d4dce6dc9e8c13df0bc76e741080a89 + languageName: node + linkType: hard + +"micromark-extension-mdx-md@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-extension-mdx-md@npm:2.0.0" + dependencies: + micromark-util-types: "npm:^2.0.0" + checksum: 10/8b364a69b23196075258143c8c19fa58d7d5a91f6811ec0f881b75cf024a4869994be29f84f4d281147275c5a104af8b6a7fcd98abd8fde9f5b534a1acb254e8 + languageName: node + linkType: hard + +"micromark-extension-mdxjs-esm@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdxjs-esm@npm:3.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-core-commonmark: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/f2e0977f9a65284b0c765d1175d55ec5d1928dae3ae90f65cc36f293cda152a97fe2007977aaf5595b1bc02298b34c96e8ce8b647c9c647c75f1ea53e92d14d2 + languageName: node + linkType: hard + +"micromark-extension-mdxjs@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdxjs@npm:3.0.0" + dependencies: + acorn: "npm:^8.0.0" + acorn-jsx: "npm:^5.0.0" + micromark-extension-mdx-expression: "npm:^3.0.0" + micromark-extension-mdx-jsx: "npm:^3.0.0" + micromark-extension-mdx-md: "npm:^2.0.0" + micromark-extension-mdxjs-esm: "npm:^3.0.0" + micromark-util-combine-extensions: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/66e0df7b2db05b9c88796600e354e0753594f06760abfddcac706afcd5754586c9085adb89e15447ce1450e6a5f2fa66a75f6da394e0eceb919e9c364475593e + languageName: node + linkType: hard + +"micromark-factory-destination@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-factory-destination@npm:2.0.1" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/9c4baa9ca2ed43c061bbf40ddd3d85154c2a0f1f485de9dea41d7dd2ad994ebb02034a003b2c1dbe228ba83a0576d591f0e90e0bf978713f84ee7d7f3aa98320 + languageName: node + linkType: hard + +"micromark-factory-label@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-factory-label@npm:2.0.1" + dependencies: + devlop: "npm:^1.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/bd03f5a75f27cdbf03b894ddc5c4480fc0763061fecf9eb927d6429233c930394f223969a99472df142d570c831236134de3dc23245d23d9f046f9d0b623b5c2 + languageName: node + linkType: hard + +"micromark-factory-mdx-expression@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-factory-mdx-expression@npm:2.0.2" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/d5285fa98018f14a058c7cd4a961aacedd2d3c4f4fddd4c58c16f1e640d1284a8f581f4d00fa3e18c06ed302ce23bca23f6a01edd66064c23c9057e65385a62d + languageName: node + linkType: hard + +"micromark-factory-space@npm:^1.0.0": + version: 1.1.0 + resolution: "micromark-factory-space@npm:1.1.0" + dependencies: + micromark-util-character: "npm:^1.0.0" + micromark-util-types: "npm:^1.0.0" + checksum: 10/b58435076b998a7e244259a4694eb83c78915581206b6e7fc07b34c6abd36a1726ade63df8972fbf6c8fa38eecb9074f4e17be8d53f942e3b3d23d1a0ecaa941 + languageName: node + linkType: hard + +"micromark-factory-space@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-factory-space@npm:2.0.1" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/1bd68a017c1a66f4787506660c1e1c5019169aac3b1cb075d49ac5e360e0b2065e984d4e1d6e9e52a9d44000f2fa1c98e66a743d7aae78b4b05616bf3242ed71 + languageName: node + linkType: hard + +"micromark-factory-title@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-factory-title@npm:2.0.1" + dependencies: + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/b4d2e4850a8ba0dff25ce54e55a3eb0d43dda88a16293f53953153288f9d84bcdfa8ca4606b2cfbb4f132ea79587bbb478a73092a349f893f5264fbcdbce2ee1 + languageName: node + linkType: hard + +"micromark-factory-whitespace@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-factory-whitespace@npm:2.0.1" + dependencies: + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/67b3944d012a42fee9e10e99178254a04d48af762b54c10a50fcab988688799993efb038daf9f5dbc04001a97b9c1b673fc6f00e6a56997877ab25449f0c8650 + languageName: node + linkType: hard + +"micromark-util-character@npm:^1.0.0, micromark-util-character@npm:^1.1.0": + version: 1.2.0 + resolution: "micromark-util-character@npm:1.2.0" + dependencies: + micromark-util-symbol: "npm:^1.0.0" + micromark-util-types: "npm:^1.0.0" + checksum: 10/88cf80f9b4c95266f24814ef587fb4180454668dcc3be4ac829e1227188cf349c8981bfca29e3eab1682f324c2c47544c0b0b799a26fbf9df5f156c6a84c970c + languageName: node + linkType: hard + +"micromark-util-character@npm:^2.0.0": + version: 2.1.1 + resolution: "micromark-util-character@npm:2.1.1" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/85da8f8e5f7ed16046575bef5b0964ca3fca3162b87b74ae279f1e48eb7160891313eb64f04606baed81c58b514dbdb64f1a9d110a51baaaa79225d72a7b1852 + languageName: node + linkType: hard + +"micromark-util-chunked@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-chunked@npm:2.0.1" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/f8cb2a67bcefe4bd2846d838c97b777101f0043b9f1de4f69baf3e26bb1f9885948444e3c3aec66db7595cad8173bd4567a000eb933576c233d54631f6323fe4 + languageName: node + linkType: hard + +"micromark-util-classify-character@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-classify-character@npm:2.0.1" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/4d8bbe3a6dbf69ac0fc43516866b5bab019fe3f4568edc525d4feaaaf78423fa54e6b6732b5bccbeed924455279a3758ffc9556954aafb903982598a95a02704 + languageName: node + linkType: hard + +"micromark-util-combine-extensions@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-combine-extensions@npm:2.0.1" + dependencies: + micromark-util-chunked: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/5d22fb9ee37e8143adfe128a72b50fa09568c2cc553b3c76160486c96dbbb298c5802a177a10a215144a604b381796071b5d35be1f2c2b2ee17995eda92f0c8e + languageName: node + linkType: hard + +"micromark-util-decode-numeric-character-reference@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-util-decode-numeric-character-reference@npm:2.0.2" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/ee11c8bde51e250e302050474c4a2adca094bca05c69f6cdd241af12df285c48c88d19ee6e022b9728281c280be16328904adca994605680c43af56019f4b0b6 + languageName: node + linkType: hard + +"micromark-util-decode-string@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-decode-string@npm:2.0.1" + dependencies: + decode-named-character-reference: "npm:^1.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-decode-numeric-character-reference: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/2f517e4c613609445db4b9a17f8c77832f55fb341620a8fd598f083c1227027485d601c2021c2f8f9883210b8671e7b3990f0c6feeecd49a136475465808c380 + languageName: node + linkType: hard + +"micromark-util-encode@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-encode@npm:2.0.1" + checksum: 10/be890b98e78dd0cdd953a313f4148c4692cc2fb05533e56fef5f421287d3c08feee38ca679f318e740530791fc251bfe8c80efa926fcceb4419b269c9343d226 + languageName: node + linkType: hard + +"micromark-util-events-to-acorn@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-util-events-to-acorn@npm:2.0.2" + dependencies: + "@types/acorn": "npm:^4.0.0" + "@types/estree": "npm:^1.0.0" + "@types/unist": "npm:^3.0.0" + devlop: "npm:^1.0.0" + estree-util-visit: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/475367e716c4d24f2a57464a7f2c8aa507ae36c05b7767fd652895525f3f0a1179ea3219cabccc0f3038bb5e4f9cce5390d530dc56decaa5f1786bda42739810 + languageName: node + linkType: hard + +"micromark-util-html-tag-name@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-html-tag-name@npm:2.0.1" + checksum: 10/dea365f5ad28ad74ff29fcb581f7b74fc1f80271c5141b3b2bc91c454cbb6dfca753f28ae03730d657874fcbd89d0494d0e3965dfdca06d9855f467c576afa9d + languageName: node + linkType: hard + +"micromark-util-normalize-identifier@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-normalize-identifier@npm:2.0.1" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/1eb9a289d7da067323df9fdc78bfa90ca3207ad8fd893ca02f3133e973adcb3743b233393d23d95c84ccaf5d220ae7f5a28402a644f135dcd4b8cfa60a7b5f84 + languageName: node + linkType: hard + +"micromark-util-resolve-all@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-resolve-all@npm:2.0.1" + dependencies: + micromark-util-types: "npm:^2.0.0" + checksum: 10/9275f3ddb6c26f254dd2158e66215d050454b279707a7d9ce5a3cd0eba23201021cedcb78ae1a746c1b23227dcc418ee40dd074ade195359506797a5493550cc + languageName: node + linkType: hard + +"micromark-util-sanitize-uri@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-sanitize-uri@npm:2.0.1" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-encode: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/064c72abfc9777864ca0521a016dde62ab3e7af5215d10fd27e820798500d5d305da638459c589275c1a093cf588f493cc2f65273deac5a5331ecefc6c9ea78a + languageName: node + linkType: hard + +"micromark-util-subtokenize@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-util-subtokenize@npm:2.1.0" + dependencies: + devlop: "npm:^1.0.0" + micromark-util-chunked: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/5f18c70cb952a414a4d161f5d6a5254d33c7dfcd56577e592ef2e172a0414058d3531a3554f43538f14e243592fffbc2e68ddaf6a41c54577b3ba7beb555d3dc + languageName: node + linkType: hard + +"micromark-util-symbol@npm:^1.0.0, micromark-util-symbol@npm:^1.0.1": + version: 1.1.0 + resolution: "micromark-util-symbol@npm:1.1.0" + checksum: 10/a26b6b1efd77a715a4d9bbe0a5338eaf3d04ea5e85733e34fee56dfeabf64495c0afc5438fe5220316884cd3a5eae1f17768e0ff4e117827ea4a653897466f86 + languageName: node + linkType: hard + +"micromark-util-symbol@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-symbol@npm:2.0.1" + checksum: 10/497e6d95fc21c2bb5265b78a6a60db518c376dc438739b2e7d4aee6f9f165222711724b456c63163314f32b8eea68a064687711d41e986262926eab23ddb9229 + languageName: node + linkType: hard + +"micromark-util-types@npm:^1.0.0": + version: 1.1.0 + resolution: "micromark-util-types@npm:1.1.0" + checksum: 10/287ac5de4a3802bb6f6c3842197c294997a488db1c0486e03c7a8e674d9eb7720c17dda1bcb814814b8343b338c4826fcbc0555f3e75463712a60dcdb53a028e + languageName: node + linkType: hard + +"micromark-util-types@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-util-types@npm:2.0.2" + checksum: 10/a9eb067bd9384eab61942285d53738aa22f3fef4819eaf20249bec6ec13f1e4da2800230fd0ceb7e705108987aa9062fe3e9a8e5e48aa60180db80b9489dc3e2 + languageName: node + linkType: hard + +"micromark@npm:^4.0.0": + version: 4.0.2 + resolution: "micromark@npm:4.0.2" + dependencies: + "@types/debug": "npm:^4.0.0" + debug: "npm:^4.0.0" + decode-named-character-reference: "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-core-commonmark: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-chunked: "npm:^2.0.0" + micromark-util-combine-extensions: "npm:^2.0.0" + micromark-util-decode-numeric-character-reference: "npm:^2.0.0" + micromark-util-encode: "npm:^2.0.0" + micromark-util-normalize-identifier: "npm:^2.0.0" + micromark-util-resolve-all: "npm:^2.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + micromark-util-subtokenize: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/1b85e49c8f71013df2d07a59e477deb72cd325d41cc15f35b2aa52b8b7a93fed45498ce3e18ed34464a9afa9ba8a9210b2509454b2a2d16ac06c7429f562bfac + languageName: node + linkType: hard + +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/6bf2a01672e7965eb9941d1f02044fad2bd12486b5553dc1116ff24c09a8723157601dc992e74c911d896175918448762df3b3fd0a6b61037dd1a9766ddfbf58 + languageName: node + linkType: hard + +"mime-db@npm:1.52.0": + version: 1.52.0 + resolution: "mime-db@npm:1.52.0" + checksum: 10/54bb60bf39e6f8689f6622784e668a3d7f8bed6b0d886f5c3c446cb3284be28b30bf707ed05d0fe44a036f8469976b2629bbea182684977b084de9da274694d7 + languageName: node + linkType: hard + +"mime-db@npm:>= 1.43.0 < 2": + version: 1.53.0 + resolution: "mime-db@npm:1.53.0" + checksum: 10/82409c568a20254cc67a763a25e581d2213e1ef5d070a0af805239634f8a655f5d8a15138200f5f81c5b06fc6623d27f6168c612d447642d59e37eb7f20f7412 + languageName: node + linkType: hard + +"mime-db@npm:~1.33.0": + version: 1.33.0 + resolution: "mime-db@npm:1.33.0" + checksum: 10/b3b89cff1d3569d02280f8d5b3b6e3c6df4dd340647b48228b2624293a73da0a7c784712aec8eac0aaccd353ac04b4d50309ab9f6a87d7ee79b4dca0ebb70ed8 + languageName: node + linkType: hard + +"mime-types@npm:2.1.18": + version: 2.1.18 + resolution: "mime-types@npm:2.1.18" + dependencies: + mime-db: "npm:~1.33.0" + checksum: 10/65d69085abda6732d4372e9874018fbe491894ff25f7329b8c8815fe40989599488567e08dcee39f1bb54729c4311fb660195ab551603d1cb97d7f2bf33ca8a2 + languageName: node + linkType: hard + +"mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": + version: 2.1.35 + resolution: "mime-types@npm:2.1.35" + dependencies: + mime-db: "npm:1.52.0" + checksum: 10/89aa9651b67644035de2784a6e665fc685d79aba61857e02b9c8758da874a754aed4a9aced9265f5ed1171fd934331e5516b84a7f0218031b6fa0270eca1e51a + languageName: node + linkType: hard + +"mime@npm:1.6.0": + version: 1.6.0 + resolution: "mime@npm:1.6.0" + bin: + mime: cli.js + checksum: 10/b7d98bb1e006c0e63e2c91b590fe1163b872abf8f7ef224d53dd31499c2197278a6d3d0864c45239b1a93d22feaf6f9477e9fc847eef945838150b8c02d03170 + languageName: node + linkType: hard + +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: 10/d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a + languageName: node + linkType: hard + +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 10/7e719047612411fe071332a7498cf0448bbe43c485c0d780046c76633a771b223ff49bd00267be122cedebb897037fdb527df72335d0d0f74724604ca70b37ad + languageName: node + linkType: hard + +"mimic-response@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-response@npm:4.0.0" + checksum: 10/33b804cc961efe206efdb1fca6a22540decdcfce6c14eb5c0c50e5ae9022267ab22ce8f5568b1f7247ba67500fe20d523d81e0e9f009b321ccd9d472e78d1850 + languageName: node + linkType: hard + +"mini-css-extract-plugin@npm:^2.9.2": + version: 2.9.2 + resolution: "mini-css-extract-plugin@npm:2.9.2" + dependencies: + schema-utils: "npm:^4.0.0" + tapable: "npm:^2.2.1" + peerDependencies: + webpack: ^5.0.0 + checksum: 10/db6ddb8ba56affa1a295b57857d66bad435d36e48e1f95c75d16fadd6c70e3ba33e8c4141c3fb0e22b4d875315b41c4f58550c6ac73b50bdbe429f768297e3ff + languageName: node + linkType: hard + +"minimalistic-assert@npm:^1.0.0": + version: 1.0.1 + resolution: "minimalistic-assert@npm:1.0.1" + checksum: 10/cc7974a9268fbf130fb055aff76700d7e2d8be5f761fb5c60318d0ed010d839ab3661a533ad29a5d37653133385204c503bfac995aaa4236f4e847461ea32ba7 + languageName: node + linkType: hard + +"minimatch@npm:3.1.2, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 + languageName: node + linkType: hard + +"minimist@npm:^1.2.0": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^4.0.0": + version: 4.0.1 + resolution: "minipass-fetch@npm:4.0.1" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^3.0.1" + dependenciesMeta: + encoding: + optional: true + checksum: 10/7ddfebdbb87d9866e7b5f7eead5a9e3d9d507992af932a11d275551f60006cf7d9178e66d586dbb910894f3e3458d27c0ddf93c76e94d49d0a54a541ddc1263d + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + +"minizlib@npm:^3.0.1": + version: 3.0.1 + resolution: "minizlib@npm:3.0.1" + dependencies: + minipass: "npm:^7.0.4" + rimraf: "npm:^5.0.5" + checksum: 10/622cb85f51e5c206a080a62d20db0d7b4066f308cb6ce82a9644da112367c3416ae7062017e631eb7ac8588191cfa4a9a279b8651c399265202b298e98c4acef + languageName: node + linkType: hard + +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba + languageName: node + linkType: hard + +"mrmime@npm:^2.0.0": + version: 2.0.1 + resolution: "mrmime@npm:2.0.1" + checksum: 10/1f966e2c05b7264209c4149ae50e8e830908eb64dd903535196f6ad72681fa109b794007288a3c2814f7a1ecf9ca192769909c0c374d974d604a8de5fc095d4a + languageName: node + linkType: hard + +"ms@npm:2.0.0": + version: 2.0.0 + resolution: "ms@npm:2.0.0" + checksum: 10/0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"multicast-dns@npm:^7.2.5": + version: 7.2.5 + resolution: "multicast-dns@npm:7.2.5" + dependencies: + dns-packet: "npm:^5.2.2" + thunky: "npm:^1.0.2" + bin: + multicast-dns: cli.js + checksum: 10/e9add8035fb7049ccbc87b1b069f05bb3b31e04fe057bf7d0116739d81295165afc2568291a4a962bee01a5074e475996816eed0f50c8110d652af5abb74f95a + languageName: node + linkType: hard + +"nanoid@npm:^3.3.11": + version: 3.3.11 + resolution: "nanoid@npm:3.3.11" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/73b5afe5975a307aaa3c95dfe3334c52cdf9ae71518176895229b8d65ab0d1c0417dd081426134eb7571c055720428ea5d57c645138161e7d10df80815527c48 + languageName: node + linkType: hard + +"negotiator@npm:0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10/b5734e87295324fabf868e36fb97c84b7d7f3156ec5f4ee5bf6e488079c11054f818290fc33804cef7b1ee21f55eeb14caea83e7dafae6492a409b3e573153e5 + languageName: node + linkType: hard + +"negotiator@npm:~0.6.4": + version: 0.6.4 + resolution: "negotiator@npm:0.6.4" + checksum: 10/d98c04a136583afd055746168f1067d58ce4bfe6e4c73ca1d339567f81ea1f7e665b5bd1e81f4771c67b6c2ea89b21cb2adaea2b16058c7dc31317778f931dab + languageName: node + linkType: hard + +"neo-async@npm:^2.6.2": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: 10/1a7948fea86f2b33ec766bc899c88796a51ba76a4afc9026764aedc6e7cde692a09067031e4a1bf6db4f978ccd99e7f5b6c03fe47ad9865c3d4f99050d67e002 + languageName: node + linkType: hard + +"no-case@npm:^3.0.4": + version: 3.0.4 + resolution: "no-case@npm:3.0.4" + dependencies: + lower-case: "npm:^2.0.2" + tslib: "npm:^2.0.3" + checksum: 10/0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c + languageName: node + linkType: hard + +"node-emoji@npm:^2.1.0": + version: 2.2.0 + resolution: "node-emoji@npm:2.2.0" + dependencies: + "@sindresorhus/is": "npm:^4.6.0" + char-regex: "npm:^1.0.2" + emojilib: "npm:^2.4.0" + skin-tone: "npm:^2.0.0" + checksum: 10/2548668f5cc9f781c94dc39971a630b2887111e0970c29fc523e924819d1b39b53a2694a4d1046861adf538c4462d06ee0269c48717ccad30336a918d9a911d5 + languageName: node + linkType: hard + +"node-forge@npm:^1": + version: 1.3.1 + resolution: "node-forge@npm:1.3.1" + checksum: 10/05bab6868633bf9ad4c3b1dd50ec501c22ffd69f556cdf169a00998ca1d03e8107a6032ba013852f202035372021b845603aeccd7dfcb58cdb7430013b3daa8d + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 11.1.0 + resolution: "node-gyp@npm:11.1.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^14.0.3" + nopt: "npm:^8.0.0" + proc-log: "npm:^5.0.0" + semver: "npm:^7.3.5" + tar: "npm:^7.4.3" + which: "npm:^5.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/3314ebfeb99dbcdf9e8c810df1ee52294045399873d4ab1e6740608c4fbe63adaf6580c0610b23c6eda125e298536553f5bb6fb0df714016a5c721ed31095e42 + languageName: node + linkType: hard + +"node-releases@npm:^2.0.19": + version: 2.0.19 + resolution: "node-releases@npm:2.0.19" + checksum: 10/c2b33b4f0c40445aee56141f13ca692fa6805db88510e5bbb3baadb2da13e1293b738e638e15e4a8eb668bb9e97debb08e7a35409b477b5cc18f171d35a83045 + languageName: node + linkType: hard + +"nopt@npm:^8.0.0": + version: 8.1.0 + resolution: "nopt@npm:8.1.0" + dependencies: + abbrev: "npm:^3.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/26ab456c51a96f02a9e5aa8d1b80ef3219f2070f3f3528a040e32fb735b1e651e17bdf0f1476988d3a46d498f35c65ed662d122f340d38ce4a7e71dd7b20c4bc + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"normalize-range@npm:^0.1.2": + version: 0.1.2 + resolution: "normalize-range@npm:0.1.2" + checksum: 10/9b2f14f093593f367a7a0834267c24f3cb3e887a2d9809c77d8a7e5fd08738bcd15af46f0ab01cc3a3d660386f015816b5c922cea8bf2ee79777f40874063184 + languageName: node + linkType: hard + +"normalize-url@npm:^8.0.0": + version: 8.0.1 + resolution: "normalize-url@npm:8.0.1" + checksum: 10/ae392037584fc5935b663ae4af475351930a1fc39e107956cfac44f42d5127eec2d77d9b7b12ded4696ca78103bafac5b6206a0ea8673c7bffecbe13544fcc5a + languageName: node + linkType: hard + +"npm-run-path@npm:^4.0.1": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: "npm:^3.0.0" + checksum: 10/5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 + languageName: node + linkType: hard + +"nprogress@npm:^0.2.0": + version: 0.2.0 + resolution: "nprogress@npm:0.2.0" + checksum: 10/1870a74c054c01899f89e85122d7548832d083b5fa5d3cc6aafc2d4f92901e15face402ef557be5b103aed7b6e1406c656b842dec32b553b4b052031ea1b0935 + languageName: node + linkType: hard + +"nth-check@npm:^2.0.1": + version: 2.1.1 + resolution: "nth-check@npm:2.1.1" + dependencies: + boolbase: "npm:^1.0.0" + checksum: 10/5afc3dafcd1573b08877ca8e6148c52abd565f1d06b1eb08caf982e3fa289a82f2cae697ffb55b5021e146d60443f1590a5d6b944844e944714a5b549675bcd3 + languageName: node + linkType: hard + +"null-loader@npm:^4.0.1": + version: 4.0.1 + resolution: "null-loader@npm:4.0.1" + dependencies: + loader-utils: "npm:^2.0.0" + schema-utils: "npm:^3.0.0" + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + checksum: 10/eeb4c4dd2f8f41e46f5665e4500359109e95ec1028a178a60e0161984906572da7dd87644bcc3cb29f0125d77e2b2508fb4f3813cfb1c6604a15865beb4b987b + languageName: node + linkType: hard + +"nullthrows@npm:^1.0.0": + version: 1.1.1 + resolution: "nullthrows@npm:1.1.1" + checksum: 10/c7cf377a095535dc301d81cf7959d3784d090a609a2a4faa40b6121a0c1d7f70d3a3aa534a34ab852e8553b66848ec503c28f2c19efd617ed564dc07dfbb6d33 + languageName: node + linkType: hard + +"object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + +"object-inspect@npm:^1.13.3": + version: 1.13.4 + resolution: "object-inspect@npm:1.13.4" + checksum: 10/aa13b1190ad3e366f6c83ad8a16ed37a19ed57d267385aa4bfdccda833d7b90465c057ff6c55d035a6b2e52c1a2295582b294217a0a3a1ae7abdd6877ef781fb + languageName: node + linkType: hard + +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: 10/3d81d02674115973df0b7117628ea4110d56042e5326413e4b4313f0bcdf7dd78d4a3acef2c831463fa3796a66762c49daef306f4a0ea1af44877d7086d73bde + languageName: node + linkType: hard + +"object.assign@npm:^4.1.0": + version: 4.1.7 + resolution: "object.assign@npm:4.1.7" + dependencies: + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.3" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + has-symbols: "npm:^1.1.0" + object-keys: "npm:^1.1.1" + checksum: 10/3fe28cdd779f2a728a9a66bd688679ba231a2b16646cd1e46b528fe7c947494387dda4bc189eff3417f3717ef4f0a8f2439347cf9a9aa3cef722fbfd9f615587 + languageName: node + linkType: hard + +"obuf@npm:^1.0.0, obuf@npm:^1.1.2": + version: 1.1.2 + resolution: "obuf@npm:1.1.2" + checksum: 10/53ff4ab3a13cc33ba6c856cf281f2965c0aec9720967af450e8fd06cfd50aceeefc791986a16bcefa14e7898b3ca9acdfcf15b9d9a1b9c7e1366581a8ad6e65e + languageName: node + linkType: hard + +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: "npm:1.1.1" + checksum: 10/8e81472c5028125c8c39044ac4ab8ba51a7cdc19a9fbd4710f5d524a74c6d8c9ded4dd0eed83f28d3d33ac1d7a6a439ba948ccb765ac6ce87f30450a26bfe2ea + languageName: node + linkType: hard + +"on-headers@npm:~1.0.2": + version: 1.0.2 + resolution: "on-headers@npm:1.0.2" + checksum: 10/870766c16345855e2012e9422ba1ab110c7e44ad5891a67790f84610bd70a72b67fdd71baf497295f1d1bf38dd4c92248f825d48729c53c0eae5262fb69fa171 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"onetime@npm:^5.1.2": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: "npm:^2.1.0" + checksum: 10/e9fd0695a01cf226652f0385bf16b7a24153dbbb2039f764c8ba6d2306a8506b0e4ce570de6ad99c7a6eb49520743afdb66edd95ee979c1a342554ed49a9aadd + languageName: node + linkType: hard + +"open@npm:^8.0.9, open@npm:^8.4.0": + version: 8.4.2 + resolution: "open@npm:8.4.2" + dependencies: + define-lazy-prop: "npm:^2.0.0" + is-docker: "npm:^2.1.1" + is-wsl: "npm:^2.2.0" + checksum: 10/acd81a1d19879c818acb3af2d2e8e9d81d17b5367561e623248133deb7dd3aefaed527531df2677d3e6aaf0199f84df57b6b2262babff8bf46ea0029aac536c9 + languageName: node + linkType: hard + +"opener@npm:^1.5.2": + version: 1.5.2 + resolution: "opener@npm:1.5.2" + bin: + opener: bin/opener-bin.js + checksum: 10/0504efcd6546e14c016a261f58a68acf9f2e5c23d84865d7d5470d5169788327ceaa5386253682f533b3fba4821748aa37ecb395f3dae7acb3261b9b22e36814 + languageName: node + linkType: hard + +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 10/a5eab7cf5ac5de83222a014eccdbfde65ecfb22005ee9bc242041f0b4441e07fac7629432c82f48868aa0f8413fe0df6c6067c16f76bf9217cd8dc651923c93d + languageName: node + linkType: hard + +"p-finally@npm:^1.0.0": + version: 1.0.0 + resolution: "p-finally@npm:1.0.0" + checksum: 10/93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 + languageName: node + linkType: hard + +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" + dependencies: + yocto-queue: "npm:^1.0.0" + checksum: 10/01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b + languageName: node + linkType: hard + +"p-locate@npm:^6.0.0": + version: 6.0.0 + resolution: "p-locate@npm:6.0.0" + dependencies: + p-limit: "npm:^4.0.0" + checksum: 10/2bfe5234efa5e7a4e74b30a5479a193fdd9236f8f6b4d2f3f69e3d286d9a7d7ab0c118a2a50142efcf4e41625def635bd9332d6cbf9cc65d85eb0718c579ab38 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + +"p-map@npm:^7.0.2": + version: 7.0.3 + resolution: "p-map@npm:7.0.3" + checksum: 10/2ef48ccfc6dd387253d71bf502604f7893ed62090b2c9d73387f10006c342606b05233da0e4f29388227b61eb5aeface6197e166520c465c234552eeab2fe633 + languageName: node + linkType: hard + +"p-queue@npm:^6.6.2": + version: 6.6.2 + resolution: "p-queue@npm:6.6.2" + dependencies: + eventemitter3: "npm:^4.0.4" + p-timeout: "npm:^3.2.0" + checksum: 10/60fe227ffce59fbc5b1b081305b61a2f283ff145005853702b7d4d3f99a0176bd21bb126c99a962e51fe1e01cb8aa10f0488b7bbe73b5dc2e84b5cc650b8ffd2 + languageName: node + linkType: hard + +"p-retry@npm:^4.5.0": + version: 4.6.2 + resolution: "p-retry@npm:4.6.2" + dependencies: + "@types/retry": "npm:0.12.0" + retry: "npm:^0.13.1" + checksum: 10/45c270bfddaffb4a895cea16cb760dcc72bdecb6cb45fef1971fa6ea2e91ddeafddefe01e444ac73e33b1b3d5d29fb0dd18a7effb294262437221ddc03ce0f2e + languageName: node + linkType: hard + +"p-timeout@npm:^3.2.0": + version: 3.2.0 + resolution: "p-timeout@npm:3.2.0" + dependencies: + p-finally: "npm:^1.0.0" + checksum: 10/3dd0eaa048780a6f23e5855df3dd45c7beacff1f820476c1d0d1bcd6648e3298752ba2c877aa1c92f6453c7dd23faaf13d9f5149fc14c0598a142e2c5e8d649c + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 10/58ee9538f2f762988433da00e26acc788036914d57c71c246bf0be1b60cdbd77dd60b6a3e1a30465f0b248aeb80079e0b34cb6050b1dfa18c06953bb1cbc7602 + languageName: node + linkType: hard + +"package-json@npm:^8.1.0": + version: 8.1.1 + resolution: "package-json@npm:8.1.1" + dependencies: + got: "npm:^12.1.0" + registry-auth-token: "npm:^5.0.1" + registry-url: "npm:^6.0.0" + semver: "npm:^7.3.7" + checksum: 10/d97ce9539e1ed4aacaf7c2cb754f16afc10937fa250bd09b4d61181d2e36a30cf8a4cff2f8f831f0826b0ac01a355f26204c7e57ca0e450da6ccec3e34fc889a + languageName: node + linkType: hard + +"param-case@npm:^3.0.4": + version: 3.0.4 + resolution: "param-case@npm:3.0.4" + dependencies: + dot-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: 10/b34227fd0f794e078776eb3aa6247442056cb47761e9cd2c4c881c86d84c64205f6a56ef0d70b41ee7d77da02c3f4ed2f88e3896a8fefe08bdfb4deca037c687 + languageName: node + linkType: hard + +"parent-module@npm:^1.0.0": + version: 1.0.1 + resolution: "parent-module@npm:1.0.1" + dependencies: + callsites: "npm:^3.0.0" + checksum: 10/6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff + languageName: node + linkType: hard + +"parse-entities@npm:^4.0.0": + version: 4.0.2 + resolution: "parse-entities@npm:4.0.2" + dependencies: + "@types/unist": "npm:^2.0.0" + character-entities-legacy: "npm:^3.0.0" + character-reference-invalid: "npm:^2.0.0" + decode-named-character-reference: "npm:^1.0.0" + is-alphanumerical: "npm:^2.0.0" + is-decimal: "npm:^2.0.0" + is-hexadecimal: "npm:^2.0.0" + checksum: 10/b0ce693d0b3d7ed1cea6fe814e6e077c71532695f01178e846269e9a2bc2f7ff34ca4bb8db80b48af0451100f25bb010df6591c9bb6306e4680ccb423d1e4038 + languageName: node + linkType: hard + +"parse-json@npm:^5.2.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + error-ex: "npm:^1.3.1" + json-parse-even-better-errors: "npm:^2.3.0" + lines-and-columns: "npm:^1.1.6" + checksum: 10/62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + +"parse-numeric-range@npm:^1.3.0": + version: 1.3.0 + resolution: "parse-numeric-range@npm:1.3.0" + checksum: 10/289ca126d5b8ace7325b199218de198014f58ea6895ccc88a5247491d07f0143bf047f80b4a31784f1ca8911762278d7d6ecb90a31dfae31da91cc1a2524c8ce + languageName: node + linkType: hard + +"parse5-htmlparser2-tree-adapter@npm:^7.0.0": + version: 7.1.0 + resolution: "parse5-htmlparser2-tree-adapter@npm:7.1.0" + dependencies: + domhandler: "npm:^5.0.3" + parse5: "npm:^7.0.0" + checksum: 10/75910af9137451e9c53e1e0d712f7393f484e89e592b1809ee62ad6cedd61b98daeaa5206ff5d9f06778002c91fac311afedde4880e1916fdb44fa71199dae73 + languageName: node + linkType: hard + +"parse5@npm:^7.0.0": + version: 7.2.1 + resolution: "parse5@npm:7.2.1" + dependencies: + entities: "npm:^4.5.0" + checksum: 10/fd1a8ad1540d871e1ad6ca9bf5b67e30280886f1ce4a28052c0cb885723aa984d8cb1ec3da998349a6146960c8a84aa87b1a42600eb3b94495c7303476f2f88e + languageName: node + linkType: hard + +"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 10/407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 + languageName: node + linkType: hard + +"pascal-case@npm:^3.1.2": + version: 3.1.2 + resolution: "pascal-case@npm:3.1.2" + dependencies: + no-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: 10/ba98bfd595fc91ef3d30f4243b1aee2f6ec41c53b4546bfa3039487c367abaa182471dcfc830a1f9e1a0df00c14a370514fa2b3a1aacc68b15a460c31116873e + languageName: node + linkType: hard + +"path-exists@npm:^5.0.0": + version: 5.0.0 + resolution: "path-exists@npm:5.0.0" + checksum: 10/8ca842868cab09423994596eb2c5ec2a971c17d1a3cb36dbf060592c730c725cd524b9067d7d2a1e031fef9ba7bd2ac6dc5ec9fb92aa693265f7be3987045254 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-is-inside@npm:1.0.2": + version: 1.0.2 + resolution: "path-is-inside@npm:1.0.2" + checksum: 10/0b5b6c92d3018b82afb1f74fe6de6338c4c654de4a96123cb343f2b747d5606590ac0c890f956ed38220a4ab59baddfd7b713d78a62d240b20b14ab801fa02cb + languageName: node + linkType: hard + +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + +"path-to-regexp@npm:0.1.12": + version: 0.1.12 + resolution: "path-to-regexp@npm:0.1.12" + checksum: 10/2e30f6a0144679c1f95c98e166b96e6acd1e72be9417830fefc8de7ac1992147eb9a4c7acaa59119fb1b3c34eec393b2129ef27e24b2054a3906fc4fb0d1398e + languageName: node + linkType: hard + +"path-to-regexp@npm:3.3.0": + version: 3.3.0 + resolution: "path-to-regexp@npm:3.3.0" + checksum: 10/8d256383af8db66233ee9027cfcbf8f5a68155efbb4f55e784279d3ab206dcaee554ddb72ff0dae97dd2882af9f7fa802634bb7cffa2e796927977e31b829259 + languageName: node + linkType: hard + +"path-to-regexp@npm:^1.7.0": + version: 1.9.0 + resolution: "path-to-regexp@npm:1.9.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/67f0f4823f7aab356523d93a83f9f8222bdd119fa0b27a8f8b587e8e6c9825294bb4ccd16ae619def111ff3fe5d15ff8f658cdd3b0d58b9c882de6fd15bc1b76 + languageName: node + linkType: hard + +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 10/5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10/e1cf46bf84886c79055fdfa9dcb3e4711ad259949e3565154b004b260cd356c5d54b31a1437ce9782624bf766272fe6b0154f5f0c744fb7af5d454d2b60db045 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717 + languageName: node + linkType: hard + +"pkg-dir@npm:^7.0.0": + version: 7.0.0 + resolution: "pkg-dir@npm:7.0.0" + dependencies: + find-up: "npm:^6.3.0" + checksum: 10/94298b20a446bfbbd66604474de8a0cdd3b8d251225170970f15d9646f633e056c80520dd5b4c1d1050c9fed8f6a9e5054b141c93806439452efe72e57562c03 + languageName: node + linkType: hard + +"postcss-attribute-case-insensitive@npm:^7.0.1": + version: 7.0.1 + resolution: "postcss-attribute-case-insensitive@npm:7.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/18829dfc6dd2f6b1ca82afa8555f07ec8ac5687fe95612e353aa601b842bdec05ca78fc96016dba2b7d32607b31e085e5087fda00e1e0dfdc6c2a1b07b1b15c2 + languageName: node + linkType: hard + +"postcss-calc@npm:^9.0.1": + version: 9.0.1 + resolution: "postcss-calc@npm:9.0.1" + dependencies: + postcss-selector-parser: "npm:^6.0.11" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.2.2 + checksum: 10/a0a3e71a28e7f81f07fb9438362d95df3e3e671b34a38a4070d80a9762040c721b830e0b70f28bbe7fea2a5ba2da43637d7594be5835bbe828c0c493f0c5f052 + languageName: node + linkType: hard + +"postcss-clamp@npm:^4.1.0": + version: 4.1.0 + resolution: "postcss-clamp@npm:4.1.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.6 + checksum: 10/fb38286d3e607a8b11ef28c89272bd572a077f5a496e2838c3996697bbc4cfb8f7a5be4b4a8987e6b0223db48c9ce5683c9d840f7afe54210ab0f77127628415 + languageName: node + linkType: hard + +"postcss-color-functional-notation@npm:^7.0.10": + version: 7.0.10 + resolution: "postcss-color-functional-notation@npm:7.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/af873fbd4899bd863aeed7b40753ab3e6028bf7b8eef53b54de1cbd1b83d92b1007a9a90db314781c2bc0ec204537ca423d17cdc37aee46ed1308d7406b81729 + languageName: node + linkType: hard + +"postcss-color-hex-alpha@npm:^10.0.0": + version: 10.0.0 + resolution: "postcss-color-hex-alpha@npm:10.0.0" + dependencies: + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/2dbbd66d76522c7d281c292589360f21806b6dd31a582484e7e4a848e5244d645d5c5e1b6c6219dd5fb7333808cd94a27dd0d2e1db093d043668ed7b42db59ad + languageName: node + linkType: hard + +"postcss-color-rebeccapurple@npm:^10.0.0": + version: 10.0.0 + resolution: "postcss-color-rebeccapurple@npm:10.0.0" + dependencies: + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/8ca0ee2b6b45ff62abdfc9b6757d8832d398c2e47dd705759485b685f544eaed81ec00f050a1bad67ffb5e6243332085a09807d47526ce3b43456b027119e0ae + languageName: node + linkType: hard + +"postcss-colormin@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-colormin@npm:6.1.0" + dependencies: + browserslist: "npm:^4.23.0" + caniuse-api: "npm:^3.0.0" + colord: "npm:^2.9.3" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/55a1525de345d953bc7f32ecaa5ee6275ef0277c27d1f97ff06a1bd1a2fedf7f254e36dc1500621f1df20c25a6d2485a74a0b527d8ff74eb90726c76efe2ac8e + languageName: node + linkType: hard + +"postcss-convert-values@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-convert-values@npm:6.1.0" + dependencies: + browserslist: "npm:^4.23.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/43e9f66af9bdec3c76695f9dde36885abc01f662c370c490b45d895459caab2c5792f906f3ddad107129133e41485a65634da7f699eef916a636e47f6a37a299 + languageName: node + linkType: hard + +"postcss-custom-media@npm:^11.0.6": + version: 11.0.6 + resolution: "postcss-custom-media@npm:11.0.6" + dependencies: + "@csstools/cascade-layer-name-parser": "npm:^2.0.5" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/media-query-list-parser": "npm:^4.0.3" + peerDependencies: + postcss: ^8.4 + checksum: 10/0fa7ec309065590ce9921bb455947b0a2b8354a1e2f04dae1b3b01e1e4832fd0bb01c983d2bdfc886ceb7ba5d90ffaffc7082afa696aac350f55de0f960c3786 + languageName: node + linkType: hard + +"postcss-custom-properties@npm:^14.0.6": + version: 14.0.6 + resolution: "postcss-custom-properties@npm:14.0.6" + dependencies: + "@csstools/cascade-layer-name-parser": "npm:^2.0.5" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/fe57781d58990f8061aac2a07c6aedb66c5715b3350af11f4eb26121ff27a735610228a7e18b243a0cfeb24bd10cb5a2359e3056d693ba69c3a09bbef8a8c461 + languageName: node + linkType: hard + +"postcss-custom-selectors@npm:^8.0.5": + version: 8.0.5 + resolution: "postcss-custom-selectors@npm:8.0.5" + dependencies: + "@csstools/cascade-layer-name-parser": "npm:^2.0.5" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/191cfe62ad3eaf3d8bff75ed461baebbb3b9a52de9c1c75bded61da4ed2302d7c53c457e9febfa7cffc9a1fb7f6ed98cab8c4b2a071a1097e487e0117018e6cf + languageName: node + linkType: hard + +"postcss-dir-pseudo-class@npm:^9.0.1": + version: 9.0.1 + resolution: "postcss-dir-pseudo-class@npm:9.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/7f6212fe7f2a83e95d85df14208df3edb75b6b8f89ad865fdfbd1abf5765b6649ff46bb7ff56f7788ff8cfe60546ff305cc2fd2f9b1f9e1647a4386507714070 + languageName: node + linkType: hard + +"postcss-discard-comments@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-discard-comments@npm:6.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/c1731ccc8d1e3d910412a61395988d3033365e6532d9e5432ad7c74add8c9dcb0af0c03d4e901bf0d2b59ea4e7297a0c77a547ff2ed1b1cc065559cc0de43b4e + languageName: node + linkType: hard + +"postcss-discard-duplicates@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-discard-duplicates@npm:6.0.3" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/308e3fb84c35e4703532de1efa5d6e8444cc5f167d0e40f42d7ea3fa3a37d9d636fd10729847d078e0c303eee16f8548d14b6f88a3fce4e38a2b452648465175 + languageName: node + linkType: hard + +"postcss-discard-empty@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-discard-empty@npm:6.0.3" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/bad305572faa066026a295faab37e718cee096589ab827b19c990c55620b2b2a1ce9f0145212651737a66086db01b2676c1927bbb8408c5f9cb42686d5959f00 + languageName: node + linkType: hard + +"postcss-discard-overridden@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-discard-overridden@npm:6.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/a38e0fe7a36f83cb9b73c1ba9ee2a48cf93c69ec0ea5753935824ffb71e958e58ae0393171c0f3d0014a397469d09bbb0d56bb5ab80f0280722967e2e273aebb + languageName: node + linkType: hard + +"postcss-discard-unused@npm:^6.0.5": + version: 6.0.5 + resolution: "postcss-discard-unused@npm:6.0.5" + dependencies: + postcss-selector-parser: "npm:^6.0.16" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/7962640773240186de38125f142a6555b7f9b2493c4968e0f0b11c6629b2bf43ac70b9fc4ee78aa732d82670ad8bf802b2febc9a9864b022eb68530eded26836 + languageName: node + linkType: hard + +"postcss-double-position-gradients@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-double-position-gradients@npm:6.0.2" + dependencies: + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/cc0302e2850334566ca7b85bddfbf6f5e839132d542d41eb8c380194048e35656aa4b7b9ea9e557747e4924a90fbd590d5abaea799e5c7493b0f239eb3d27721 + languageName: node + linkType: hard + +"postcss-focus-visible@npm:^10.0.1": + version: 10.0.1 + resolution: "postcss-focus-visible@npm:10.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/47c038ccf139bad6a4c12cf59c5ac78acbac96ae0517ae08d5db676680d585ae7943e22328bd0d31876d6bacc24e4b717b5f809d26218d76989f7b9a44369793 + languageName: node + linkType: hard + +"postcss-focus-within@npm:^9.0.1": + version: 9.0.1 + resolution: "postcss-focus-within@npm:9.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/cfaef831e370b25787953450271096fc4dbf61de70291e38c2a3e355cb183432bcb6f4cbd8ebef34617d20cd711982a2918b8d5688ed179f43d1d2cc4cb58c7e + languageName: node + linkType: hard + +"postcss-font-variant@npm:^5.0.0": + version: 5.0.0 + resolution: "postcss-font-variant@npm:5.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/738328282cf71750f6efc72d72017f938a6e76c9c49602aae4cc4337beac6d13e72a4ade608567293cb87cad2af502e6aaef652fdcc500e09b4aba38c3e32fc6 + languageName: node + linkType: hard + +"postcss-gap-properties@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-gap-properties@npm:6.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/8fa8a208fe254ddfcb0442072a6232576efa1fc3deea917be6d3a0c25dfcb855cc6806572e42a098aa0276a5ad3917f19b269409f5ce1f22d233c0072d72f823 + languageName: node + linkType: hard + +"postcss-image-set-function@npm:^7.0.0": + version: 7.0.0 + resolution: "postcss-image-set-function@npm:7.0.0" + dependencies: + "@csstools/utilities": "npm:^2.0.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/44c1e7d8586b36e9a55cc63dde4cc9f2b2632861d51bc8aebc1aca9045de2052b243bed3d0f9838334f3584d19bf04a4d308ed3fea671af30dd404e319fae252 + languageName: node + linkType: hard + +"postcss-lab-function@npm:^7.0.10": + version: 7.0.10 + resolution: "postcss-lab-function@npm:7.0.10" + dependencies: + "@csstools/css-color-parser": "npm:^3.0.10" + "@csstools/css-parser-algorithms": "npm:^3.0.5" + "@csstools/css-tokenizer": "npm:^3.0.4" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/utilities": "npm:^2.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/5d6622bb82882e16d5718d59aa0bf243537ac77239fc3727124e8b58f6bf5f768b3e1cdce886ddea1a3dc33a574dcc342d8be4ee6d2be41fb883b937f273aec1 + languageName: node + linkType: hard + +"postcss-loader@npm:^7.3.4": + version: 7.3.4 + resolution: "postcss-loader@npm:7.3.4" + dependencies: + cosmiconfig: "npm:^8.3.5" + jiti: "npm:^1.20.0" + semver: "npm:^7.5.4" + peerDependencies: + postcss: ^7.0.0 || ^8.0.1 + webpack: ^5.0.0 + checksum: 10/234b01149a966a6190290c6d265b8e3df10f43262dd679451c1e7370bae74e27b746b02e660d204b901e3cf1ad28759c2679a93c64a3eb499169d8dec39df1c1 + languageName: node + linkType: hard + +"postcss-logical@npm:^8.1.0": + version: 8.1.0 + resolution: "postcss-logical@npm:8.1.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/495ce49a1fb831eb30d848909a54430b0170ec7681dcd84da9f1cb531cad167b9fa358dc242b70c2cae5c92b1a3fbbf43e625a54c3e615ea9dcce8d15cee5926 + languageName: node + linkType: hard + +"postcss-merge-idents@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-merge-idents@npm:6.0.3" + dependencies: + cssnano-utils: "npm:^4.0.2" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/b45780d6d103b8e45a580032747ee6e1842f81863672341a6b4961397e243ca896217bf1f3ee732376a766207d5f610ba8924cf08cf6d5bbd4b093133fd05d70 + languageName: node + linkType: hard + +"postcss-merge-longhand@npm:^6.0.5": + version: 6.0.5 + resolution: "postcss-merge-longhand@npm:6.0.5" + dependencies: + postcss-value-parser: "npm:^4.2.0" + stylehacks: "npm:^6.1.1" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/d284ca09bbd8c77714b6901d1f8b3a4f6f8f2c6e2a6fb35d76f4e230bb93e8abaf4b401dc089c86e4123115d30a39d267b209d58c5b178a93c0310def9a8f997 + languageName: node + linkType: hard + +"postcss-merge-rules@npm:^6.1.1": + version: 6.1.1 + resolution: "postcss-merge-rules@npm:6.1.1" + dependencies: + browserslist: "npm:^4.23.0" + caniuse-api: "npm:^3.0.0" + cssnano-utils: "npm:^4.0.2" + postcss-selector-parser: "npm:^6.0.16" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/6984b6d1c423a5ab89371a07b48c9d353acc37977d421b3266ac70377b0029ef6bd223b617103afa2024474cd8167308a90c114a3260b826f82a62b38190211a + languageName: node + linkType: hard + +"postcss-minify-font-values@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-minify-font-values@npm:6.1.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/c3a5f20e583b32b5a7428080056bdef6f7c5f8d9d9e2793019122e1200ab6b1b039558ad1c87a5e037eb8e015da2b7c96eb9287c4fff573e1558b513545e5947 + languageName: node + linkType: hard + +"postcss-minify-gradients@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-minify-gradients@npm:6.0.3" + dependencies: + colord: "npm:^2.9.3" + cssnano-utils: "npm:^4.0.2" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/696387df1736b951fbc93c10949e7a1bb85bc12564c506c55e704ae483749f52a9ec919dbca461afa91798373041b840976dbdad031b374a4cf4cf96ad8cd4d0 + languageName: node + linkType: hard + +"postcss-minify-params@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-minify-params@npm:6.1.0" + dependencies: + browserslist: "npm:^4.23.0" + cssnano-utils: "npm:^4.0.2" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/1e1cc3057d9bcc532c70e40628e96e3aea0081d8072dffe983a270a8cd59c03ac585e57d036b70e43d4ee725f274a05a6a8efac5a715f448284e115c13f82a46 + languageName: node + linkType: hard + +"postcss-minify-selectors@npm:^6.0.4": + version: 6.0.4 + resolution: "postcss-minify-selectors@npm:6.0.4" + dependencies: + postcss-selector-parser: "npm:^6.0.16" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/2c5c1aba609a71cf2fb24956f9d7220809cb827ca3c22fc50bdca0d259ad808171395c3529ddb873b8849b3e0f5642a7e04a9826db5dfe0ea1bbb0c80bf1dfe7 + languageName: node + linkType: hard + +"postcss-modules-extract-imports@npm:^3.1.0": + version: 3.1.0 + resolution: "postcss-modules-extract-imports@npm:3.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/00bfd3aff045fc13ded8e3bbfd8dfc73eff9a9708db1b2a132266aef6544c8d2aee7a5d7e021885f6f9bbd5565a9a9ab52990316e21ad9468a2534f87df8e849 + languageName: node + linkType: hard + +"postcss-modules-local-by-default@npm:^4.0.5": + version: 4.2.0 + resolution: "postcss-modules-local-by-default@npm:4.2.0" + dependencies: + icss-utils: "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + postcss-value-parser: "npm:^4.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/552329aa39fbf229b8ac5a04f8aed0b1553e7a3c10b165ee700d1deb020c071875b3df7ab5e3591f6af33d461df66d330ec9c1256229e45fc618a47c60f41536 + languageName: node + linkType: hard + +"postcss-modules-scope@npm:^3.2.0": + version: 3.2.1 + resolution: "postcss-modules-scope@npm:3.2.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/51c747fa15cedf1b2856da472985ea7a7bb510a63daf30f95f250f34fce9e28ef69b802e6cc03f9c01f69043d171bc33279109a9235847c2d3a75c44eac67334 + languageName: node + linkType: hard + +"postcss-modules-values@npm:^4.0.0": + version: 4.0.0 + resolution: "postcss-modules-values@npm:4.0.0" + dependencies: + icss-utils: "npm:^5.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 10/18021961a494e69e65da9e42b4436144c9ecee65845c9bfeff2b7a26ea73d60762f69e288be8bb645447965b8fd6b26a264771136810dc0172bd31b940aee4f2 + languageName: node + linkType: hard + +"postcss-nesting@npm:^13.0.1": + version: 13.0.1 + resolution: "postcss-nesting@npm:13.0.1" + dependencies: + "@csstools/selector-resolve-nested": "npm:^3.0.0" + "@csstools/selector-specificity": "npm:^5.0.0" + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/80ab17f5269bfda988b87e18dd387be84436e3215fd509745b91b3f5569fe522462521da1ad4204415de0fa16ac1c1cfebcb50e4963cf1ee8c28f6cc48505fc8 + languageName: node + linkType: hard + +"postcss-normalize-charset@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-charset@npm:6.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/5b8aeb17d61578a8656571cd5d5eefa8d4ee7126a99a41fdd322078002a06f2ae96f649197b9c01067a5f3e38a2e4b03e0e3fda5a0ec9e3d7ad056211ce86156 + languageName: node + linkType: hard + +"postcss-normalize-display-values@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-display-values@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/f7bf1e9684d83274861857a0c039b3c293cf46dbfcc69fa68be17f3b69ea87becf872e46cfe4bd3136e45eada73f36ddbb4fe27b074c522455919e9675c078de + languageName: node + linkType: hard + +"postcss-normalize-positions@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-positions@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/44fb77583fae4d71b76e38226cf770570876bcf5af6940dc9aeac7a7e2252896b361e0249044766cff8dad445f925378f06a005d6541597573c20e599a62b516 + languageName: node + linkType: hard + +"postcss-normalize-repeat-style@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-repeat-style@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/7edcea262870315d2c75a5348ea0da24a27f7b34aefaea18cbce8c3419c570b428cfaedd51a32994b0a85a65ef715c219730f8f66d5853769426a3bc09dfff3f + languageName: node + linkType: hard + +"postcss-normalize-string@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-string@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/916b8a3b4115592e4db259467119e71b30feed11437d7d54ee395376e911bd1d13afeb9be4459a0f5d4ac15a4cd8706571b58d67537d3bafbd41dce00cfd77b8 + languageName: node + linkType: hard + +"postcss-normalize-timing-functions@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-timing-functions@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/1970f5aad04be11f99d51c59e27debb6fd7b49d0fa4a8879062b42c82113f8e520a284448727add3b54de85deefb8bd5fe554f618406586e9ad8fc9d060609f1 + languageName: node + linkType: hard + +"postcss-normalize-unicode@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-normalize-unicode@npm:6.1.0" + dependencies: + browserslist: "npm:^4.23.0" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/69ef35d06242061f0c504c128b83752e0f8daa30ebb26734de7d090460910be0b2efd8b17b1d64c3c85b95831a041faad9ad0aaba80e239406a79cfad3d63568 + languageName: node + linkType: hard + +"postcss-normalize-url@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-url@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/bef51a18bbfee4fbf0381fec3c91e6c0dace36fca053bbd5f228e653d2732b6df3985525d79c4f7fc89f840ed07eb6d226e9d7503ecdc6f16d6d80cacae9df33 + languageName: node + linkType: hard + +"postcss-normalize-whitespace@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-normalize-whitespace@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/6081eb3a4b305749eec02c00a95c2d236336a77ee636bb1d939f18d5dfa5ba82b7cf7fa072e83f9133d0bc984276596af3fe468bdd67c742ce69e9c63dbc218d + languageName: node + linkType: hard + +"postcss-opacity-percentage@npm:^3.0.0": + version: 3.0.0 + resolution: "postcss-opacity-percentage@npm:3.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/dc813113f05f91f1c87ab3c125911f9e5989d1f3fc7cc5586a165901a63c0d02077d134df844391ea5624088680c6b3cee75bc33b8efdcaf340a91046e47e4e1 + languageName: node + linkType: hard + +"postcss-ordered-values@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-ordered-values@npm:6.0.2" + dependencies: + cssnano-utils: "npm:^4.0.2" + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/c3f0f4a27b7c50ea4be18019bd203a7c62b741eaeca86a592ccfabdb1ab14043dbb407f0ede90c64997d62144daa4159cedd1d13a6249e85de5da7f708d92724 + languageName: node + linkType: hard + +"postcss-overflow-shorthand@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-overflow-shorthand@npm:6.0.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/80f07e0beb97b7ac5dac590802591fc93392b0d7a9678e17998b4d34ee0cca637665232c7ea88b3a4342192bc9a2a4f5c757ad86b837a5fd59d083d37cc7da16 + languageName: node + linkType: hard + +"postcss-page-break@npm:^3.0.4": + version: 3.0.4 + resolution: "postcss-page-break@npm:3.0.4" + peerDependencies: + postcss: ^8 + checksum: 10/a7d08c945fc691f62c77ac701e64722218b14ec5c8fc1972b8af9c21553492d40808cf95e61b9697b1dacaf7e6180636876d7fee314f079e6c9e39ac1b1edc6f + languageName: node + linkType: hard + +"postcss-place@npm:^10.0.0": + version: 10.0.0 + resolution: "postcss-place@npm:10.0.0" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/738cd0dc2412cf573bcfb2f7dce8e1cd21887f61c8808f55114f08fb8fbf03715e957fdd8859241eecebe400a5202771f513610b04e0f17c7742f6a5ea3bafb3 + languageName: node + linkType: hard + +"postcss-preset-env@npm:^10.2.1": + version: 10.2.1 + resolution: "postcss-preset-env@npm:10.2.1" + dependencies: + "@csstools/postcss-cascade-layers": "npm:^5.0.1" + "@csstools/postcss-color-function": "npm:^4.0.10" + "@csstools/postcss-color-mix-function": "npm:^3.0.10" + "@csstools/postcss-color-mix-variadic-function-arguments": "npm:^1.0.0" + "@csstools/postcss-content-alt-text": "npm:^2.0.6" + "@csstools/postcss-exponential-functions": "npm:^2.0.9" + "@csstools/postcss-font-format-keywords": "npm:^4.0.0" + "@csstools/postcss-gamut-mapping": "npm:^2.0.10" + "@csstools/postcss-gradients-interpolation-method": "npm:^5.0.10" + "@csstools/postcss-hwb-function": "npm:^4.0.10" + "@csstools/postcss-ic-unit": "npm:^4.0.2" + "@csstools/postcss-initial": "npm:^2.0.1" + "@csstools/postcss-is-pseudo-class": "npm:^5.0.1" + "@csstools/postcss-light-dark-function": "npm:^2.0.9" + "@csstools/postcss-logical-float-and-clear": "npm:^3.0.0" + "@csstools/postcss-logical-overflow": "npm:^2.0.0" + "@csstools/postcss-logical-overscroll-behavior": "npm:^2.0.0" + "@csstools/postcss-logical-resize": "npm:^3.0.0" + "@csstools/postcss-logical-viewport-units": "npm:^3.0.4" + "@csstools/postcss-media-minmax": "npm:^2.0.9" + "@csstools/postcss-media-queries-aspect-ratio-number-values": "npm:^3.0.5" + "@csstools/postcss-nested-calc": "npm:^4.0.0" + "@csstools/postcss-normalize-display-values": "npm:^4.0.0" + "@csstools/postcss-oklab-function": "npm:^4.0.10" + "@csstools/postcss-progressive-custom-properties": "npm:^4.1.0" + "@csstools/postcss-random-function": "npm:^2.0.1" + "@csstools/postcss-relative-color-syntax": "npm:^3.0.10" + "@csstools/postcss-scope-pseudo-class": "npm:^4.0.1" + "@csstools/postcss-sign-functions": "npm:^1.1.4" + "@csstools/postcss-stepped-value-functions": "npm:^4.0.9" + "@csstools/postcss-text-decoration-shorthand": "npm:^4.0.2" + "@csstools/postcss-trigonometric-functions": "npm:^4.0.9" + "@csstools/postcss-unset-value": "npm:^4.0.0" + autoprefixer: "npm:^10.4.21" + browserslist: "npm:^4.25.0" + css-blank-pseudo: "npm:^7.0.1" + css-has-pseudo: "npm:^7.0.2" + css-prefers-color-scheme: "npm:^10.0.0" + cssdb: "npm:^8.3.0" + postcss-attribute-case-insensitive: "npm:^7.0.1" + postcss-clamp: "npm:^4.1.0" + postcss-color-functional-notation: "npm:^7.0.10" + postcss-color-hex-alpha: "npm:^10.0.0" + postcss-color-rebeccapurple: "npm:^10.0.0" + postcss-custom-media: "npm:^11.0.6" + postcss-custom-properties: "npm:^14.0.6" + postcss-custom-selectors: "npm:^8.0.5" + postcss-dir-pseudo-class: "npm:^9.0.1" + postcss-double-position-gradients: "npm:^6.0.2" + postcss-focus-visible: "npm:^10.0.1" + postcss-focus-within: "npm:^9.0.1" + postcss-font-variant: "npm:^5.0.0" + postcss-gap-properties: "npm:^6.0.0" + postcss-image-set-function: "npm:^7.0.0" + postcss-lab-function: "npm:^7.0.10" + postcss-logical: "npm:^8.1.0" + postcss-nesting: "npm:^13.0.1" + postcss-opacity-percentage: "npm:^3.0.0" + postcss-overflow-shorthand: "npm:^6.0.0" + postcss-page-break: "npm:^3.0.4" + postcss-place: "npm:^10.0.0" + postcss-pseudo-class-any-link: "npm:^10.0.1" + postcss-replace-overflow-wrap: "npm:^4.0.0" + postcss-selector-not: "npm:^8.0.1" + peerDependencies: + postcss: ^8.4 + checksum: 10/ea9ab524829a84c4900153a53e8210d4d3c612c0670a88e9aa04917358e92f487a1c3ce48a7e0bf557dc7eeb47c738d1e67950dfdd1a8599d965b56a50f3130e + languageName: node + linkType: hard + +"postcss-pseudo-class-any-link@npm:^10.0.1": + version: 10.0.1 + resolution: "postcss-pseudo-class-any-link@npm:10.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/376525d1a6fa223d908deb884b93d5cb76f4fa7431c090a8ada63e5ee9657bec7bf8e23eff1c36264c051c5a653928e38392165a862b7c5bf5e39e9364383fce + languageName: node + linkType: hard + +"postcss-reduce-idents@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-reduce-idents@npm:6.0.3" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/1b56331e6202639128b097014fa3875022a2a441bb1f578da6b80d925617ad6537e4e6afb8d86ee916c6230659eafb723146bb4dfbebdf6167ec9e497b3c205f + languageName: node + linkType: hard + +"postcss-reduce-initial@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-reduce-initial@npm:6.1.0" + dependencies: + browserslist: "npm:^4.23.0" + caniuse-api: "npm:^3.0.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/41a4c53c76b00a656d3e4c487585f83dd1605cb7c38633042ecbf52b95934b101d6b94d0145f8b5093c3fde699f8e2477206c144af29cd94b1b669d6e387086f + languageName: node + linkType: hard + +"postcss-reduce-transforms@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-reduce-transforms@npm:6.0.2" + dependencies: + postcss-value-parser: "npm:^4.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/822730a524159ab7dc91ff5842f6026bcfbcf4ad10d3b3dbca3c26b92a78311b13723550a79bf691f4e6efdf21719e9c263ea25ea13eb3ec0ec830dad4f572c8 + languageName: node + linkType: hard + +"postcss-replace-overflow-wrap@npm:^4.0.0": + version: 4.0.0 + resolution: "postcss-replace-overflow-wrap@npm:4.0.0" + peerDependencies: + postcss: ^8.0.3 + checksum: 10/0629ec17deae65e27dc3059ecec1c6bc833ee65291093b476fce151ab0af45c9e1a56ce250eb9ec4bbc306c19ab318cc982fdbcca8651d347d7dfaa3c9fc9201 + languageName: node + linkType: hard + +"postcss-selector-not@npm:^8.0.1": + version: 8.0.1 + resolution: "postcss-selector-not@npm:8.0.1" + dependencies: + postcss-selector-parser: "npm:^7.0.0" + peerDependencies: + postcss: ^8.4 + checksum: 10/28c1f7863ac85016ecd695304ee1eb21b1128eacba333d6d4540fd93691c58ff6329ac323b6a640f2da918e95c7b58e8f534c8b6e2ed016f6e31cdfdc743edbc + languageName: node + linkType: hard + +"postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.16": + version: 6.1.2 + resolution: "postcss-selector-parser@npm:6.1.2" + dependencies: + cssesc: "npm:^3.0.0" + util-deprecate: "npm:^1.0.2" + checksum: 10/190034c94d809c115cd2f32ee6aade84e933450a43ec3899c3e78e7d7b33efd3a2a975bb45d7700b6c5b196c06a7d9acf3f1ba6f1d87032d9675a29d8bca1dd3 + languageName: node + linkType: hard + +"postcss-selector-parser@npm:^7.0.0": + version: 7.1.0 + resolution: "postcss-selector-parser@npm:7.1.0" + dependencies: + cssesc: "npm:^3.0.0" + util-deprecate: "npm:^1.0.2" + checksum: 10/2caf09e66e2be81d45538f8afdc5439298c89bea71e9943b364e69dce9443d9c5ab33f4dd8b237f1ed7d2f38530338dcc189c1219d888159e6afb5b0afe58b19 + languageName: node + linkType: hard + +"postcss-sort-media-queries@npm:^5.2.0": + version: 5.2.0 + resolution: "postcss-sort-media-queries@npm:5.2.0" + dependencies: + sort-css-media-queries: "npm:2.2.0" + peerDependencies: + postcss: ^8.4.23 + checksum: 10/15e06d3f86d24ffd798943e26e15af275a9473bfc8b60b20175369f1a68d40bc216900598085699dbda30e1e053da99746b882ae714f3d36c5b991c700484f03 + languageName: node + linkType: hard + +"postcss-svgo@npm:^6.0.3": + version: 6.0.3 + resolution: "postcss-svgo@npm:6.0.3" + dependencies: + postcss-value-parser: "npm:^4.2.0" + svgo: "npm:^3.2.0" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/1a7d1c8dea555884a7791e28ec2c22ea92331731067584ff5a23042a0e615f88fefde04e1140f11c262a728ef9fab6851423b40b9c47f9ae05353bd3c0ff051a + languageName: node + linkType: hard + +"postcss-unique-selectors@npm:^6.0.4": + version: 6.0.4 + resolution: "postcss-unique-selectors@npm:6.0.4" + dependencies: + postcss-selector-parser: "npm:^6.0.16" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/b09df9943b4e858e88b30f3d279ce867a0490df806f1f947d286b0a4e95ba923f1229c385e5bf365f4f124f1edccda41ec18ccad4ba8798d829279d6dc971203 + languageName: node + linkType: hard + +"postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0": + version: 4.2.0 + resolution: "postcss-value-parser@npm:4.2.0" + checksum: 10/e4e4486f33b3163a606a6ed94f9c196ab49a37a7a7163abfcd469e5f113210120d70b8dd5e33d64636f41ad52316a3725655421eb9a1094f1bcab1db2f555c62 + languageName: node + linkType: hard + +"postcss-zindex@npm:^6.0.2": + version: 6.0.2 + resolution: "postcss-zindex@npm:6.0.2" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/394119e47b0fb098dc53d1bcf71b5500ab29605fe106526b2e81290bff179174ee00a82a4d4be5a42d4ef4138e8a3d6aabeef3b06cf7cb15b851848c8585d53b + languageName: node + linkType: hard + +"postcss@npm:^8.4.21, postcss@npm:^8.4.24, postcss@npm:^8.4.33, postcss@npm:^8.5.4, postcss@npm:^8.5.6": + version: 8.5.6 + resolution: "postcss@npm:8.5.6" + dependencies: + nanoid: "npm:^3.3.11" + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10/9e4fbe97574091e9736d0e82a591e29aa100a0bf60276a926308f8c57249698935f35c5d2f4e80de778d0cbb8dcffab4f383d85fd50c5649aca421c3df729b86 + languageName: node + linkType: hard + +"pretty-error@npm:^4.0.0": + version: 4.0.0 + resolution: "pretty-error@npm:4.0.0" + dependencies: + lodash: "npm:^4.17.20" + renderkid: "npm:^3.0.0" + checksum: 10/0212ad8742f8bb6f412f95b07d7f6874c55514ac4384f4f7de0defe77e767cca99f667c2316529f62a041fa654194a99c1ee7e321e1b7f794b5cc700777634d6 + languageName: node + linkType: hard + +"pretty-time@npm:^1.1.0": + version: 1.1.0 + resolution: "pretty-time@npm:1.1.0" + checksum: 10/ed5783ea5225680672c53ff104343256037a0e2296387d2f71afecce9e10e83f9131291e6809d4405c0dc25c53f2949dce0233349589762ca499e380d3df2f8a + languageName: node + linkType: hard + +"prism-react-renderer@npm:2.4.1, prism-react-renderer@npm:^2.3.0": + version: 2.4.1 + resolution: "prism-react-renderer@npm:2.4.1" + dependencies: + "@types/prismjs": "npm:^1.26.0" + clsx: "npm:^2.0.0" + peerDependencies: + react: ">=16.0.0" + checksum: 10/f76ea89b8b18c477eb74e9ddda2571b5c4d21142731f6733160723aa03567b17df315d7db68ffb1122c199750ece65578ecacb488559229b26db5474d6aae55b + languageName: node + linkType: hard + +"prismjs@npm:^1.29.0": + version: 1.30.0 + resolution: "prismjs@npm:1.30.0" + checksum: 10/6b48a2439a82e5c6882f48ebc1564c3890e16463ba17ac10c3ad4f62d98dea5b5c915b172b63b83023a70ad4f5d7be3e8a60304420db34a161fae69dd4e3e2da + languageName: node + linkType: hard + +"proc-log@npm:^5.0.0": + version: 5.0.0 + resolution: "proc-log@npm:5.0.0" + checksum: 10/35610bdb0177d3ab5d35f8827a429fb1dc2518d9e639f2151ac9007f01a061c30e0c635a970c9b00c39102216160f6ec54b62377c92fac3b7bfc2ad4b98d195c + languageName: node + linkType: hard + +"process-nextick-args@npm:~2.0.0": + version: 2.0.1 + resolution: "process-nextick-args@npm:2.0.1" + checksum: 10/1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + +"prompts@npm:^2.4.2": + version: 2.4.2 + resolution: "prompts@npm:2.4.2" + dependencies: + kleur: "npm:^3.0.3" + sisteransi: "npm:^1.0.5" + checksum: 10/c52536521a4d21eff4f2f2aa4572446cad227464066365a7167e52ccf8d9839c099f9afec1aba0eed3d5a2514b3e79e0b3e7a1dc326b9acde6b75d27ed74b1a9 + languageName: node + linkType: hard + +"prop-types@npm:^15.6.2, prop-types@npm:^15.7.2": + version: 15.8.1 + resolution: "prop-types@npm:15.8.1" + dependencies: + loose-envify: "npm:^1.4.0" + object-assign: "npm:^4.1.1" + react-is: "npm:^16.13.1" + checksum: 10/7d959caec002bc964c86cdc461ec93108b27337dabe6192fb97d69e16a0c799a03462713868b40749bfc1caf5f57ef80ac3e4ffad3effa636ee667582a75e2c0 + languageName: node + linkType: hard + +"property-information@npm:^6.0.0": + version: 6.5.0 + resolution: "property-information@npm:6.5.0" + checksum: 10/fced94f3a09bf651ad1824d1bdc8980428e3e480e6d01e98df6babe2cc9d45a1c52eee9a7736d2006958f9b394eb5964dedd37e23038086ddc143fc2fd5e426c + languageName: node + linkType: hard + +"property-information@npm:^7.0.0": + version: 7.0.0 + resolution: "property-information@npm:7.0.0" + checksum: 10/55f443088456cddc2fe499d6f5895e68cbd465e39dc318ecc63a0d2432d1b918f51fb6d13f8b1adf8a78337bc4e608baa6e46afbe0c6d50d2e38588b2c409f86 + languageName: node + linkType: hard + +"proto-list@npm:~1.2.1": + version: 1.2.4 + resolution: "proto-list@npm:1.2.4" + checksum: 10/9cc3b46d613fa0d637033b225db1bc98e914c3c05864f7adc9bee728192e353125ef2e49f71129a413f6333951756000b0e54f299d921f02d3e9e370cc994100 + languageName: node + linkType: hard + +"proxy-addr@npm:~2.0.7": + version: 2.0.7 + resolution: "proxy-addr@npm:2.0.7" + dependencies: + forwarded: "npm:0.2.0" + ipaddr.js: "npm:1.9.1" + checksum: 10/f24a0c80af0e75d31e3451398670d73406ec642914da11a2965b80b1898ca6f66a0e3e091a11a4327079b2b268795f6fa06691923fef91887215c3d0e8ea3f68 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + +"pupa@npm:^3.1.0": + version: 3.1.0 + resolution: "pupa@npm:3.1.0" + dependencies: + escape-goat: "npm:^4.0.0" + checksum: 10/32784254b76e455e92169ab88339cf3df8b5d63e52b7e6d0568f065e53946659d4c30e4b75de435c37033b7902bd1c785f142be4afb8aa984a86cf2d7e9a8421 + languageName: node + linkType: hard + +"qs@npm:6.13.0": + version: 6.13.0 + resolution: "qs@npm:6.13.0" + dependencies: + side-channel: "npm:^1.0.6" + checksum: 10/f548b376e685553d12e461409f0d6e5c59ec7c7d76f308e2a888fd9db3e0c5e89902bedd0754db3a9038eda5f27da2331a6f019c8517dc5e0a16b3c9a6e9cef8 + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10/72900df0616e473e824202113c3df6abae59150dfb73ed13273503127235320e9c8ca4aaaaccfd58cf417c6ca92a6e68ee9a5c3182886ae949a768639b388a7b + languageName: node + linkType: hard + +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: 10/a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"range-parser@npm:1.2.0": + version: 1.2.0 + resolution: "range-parser@npm:1.2.0" + checksum: 10/1a561fef1feae1cee3a3cb2440d4d9d3ab96cf2eebaf0d3a5cf06aecf91bc869f273ca0e2f05f73a4c530e751e4af0ed2723b7b86aeef296e3eaea7cfd0a5bfb + languageName: node + linkType: hard + +"range-parser@npm:^1.2.1, range-parser@npm:~1.2.1": + version: 1.2.1 + resolution: "range-parser@npm:1.2.1" + checksum: 10/ce21ef2a2dd40506893157970dc76e835c78cf56437e26e19189c48d5291e7279314477b06ac38abd6a401b661a6840f7b03bd0b1249da9b691deeaa15872c26 + languageName: node + linkType: hard + +"raw-body@npm:2.5.2": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" + dependencies: + bytes: "npm:3.1.2" + http-errors: "npm:2.0.0" + iconv-lite: "npm:0.4.24" + unpipe: "npm:1.0.0" + checksum: 10/863b5171e140546a4d99f349b720abac4410338e23df5e409cfcc3752538c9caf947ce382c89129ba976f71894bd38b5806c774edac35ebf168d02aa1ac11a95 + languageName: node + linkType: hard + +"rc@npm:1.2.8": + version: 1.2.8 + resolution: "rc@npm:1.2.8" + dependencies: + deep-extend: "npm:^0.6.0" + ini: "npm:~1.3.0" + minimist: "npm:^1.2.0" + strip-json-comments: "npm:~2.0.1" + bin: + rc: ./cli.js + checksum: 10/5c4d72ae7eec44357171585938c85ce066da8ca79146b5635baf3d55d74584c92575fa4e2c9eac03efbed3b46a0b2e7c30634c012b4b4fa40d654353d3c163eb + languageName: node + linkType: hard + +"react-dom@npm:18.3.1": + version: 18.3.1 + resolution: "react-dom@npm:18.3.1" + dependencies: + loose-envify: "npm:^1.1.0" + scheduler: "npm:^0.23.2" + peerDependencies: + react: ^18.3.1 + checksum: 10/3f4b73a3aa083091173b29812b10394dd06f4ac06aff410b74702cfb3aa29d7b0ced208aab92d5272919b612e5cda21aeb1d54191848cf6e46e9e354f3541f81 + languageName: node + linkType: hard + +"react-dom@npm:^16.2.0": + version: 16.14.0 + resolution: "react-dom@npm:16.14.0" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + prop-types: "npm:^15.6.2" + scheduler: "npm:^0.19.1" + peerDependencies: + react: ^16.14.0 + checksum: 10/d59f3376ab41ee874fbb9bd738160f6d70f619b4cba40531d5c60dfa289c216cff4d5e6552babdf59843a1a8e7f08faf4a746bf4df6c68d2b406a6c13bdbd92b + languageName: node + linkType: hard + +"react-fast-compare@npm:^3.2.0": + version: 3.2.2 + resolution: "react-fast-compare@npm:3.2.2" + checksum: 10/a6826180ba75cefba1c8d3ac539735f9b627ca05d3d307fe155487f5d0228d376dac6c9708d04a283a7b9f9aee599b637446635b79c8c8753d0b4eece56c125c + languageName: node + linkType: hard + +"react-helmet-async@npm:@slorber/react-helmet-async@1.3.0": + version: 1.3.0 + resolution: "@slorber/react-helmet-async@npm:1.3.0" + dependencies: + "@babel/runtime": "npm:^7.12.5" + invariant: "npm:^2.2.4" + prop-types: "npm:^15.7.2" + react-fast-compare: "npm:^3.2.0" + shallowequal: "npm:^1.1.0" + peerDependencies: + react: ^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10/76854c3a9220e1adc7b4aece55926146583d43b6bf08905d8cb6a7e3ee0ac60f7a03b285c2bb6c4aa3110e8d048e5dee4e3bdcea9c4b9b5c00db67ba002b95ce + languageName: node + linkType: hard + +"react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0": + version: 16.13.1 + resolution: "react-is@npm:16.13.1" + checksum: 10/5aa564a1cde7d391ac980bedee21202fc90bdea3b399952117f54fb71a932af1e5902020144fb354b4690b2414a0c7aafe798eb617b76a3d441d956db7726fdf + languageName: node + linkType: hard + +"react-json-view-lite@npm:^2.3.0": + version: 2.4.1 + resolution: "react-json-view-lite@npm:2.4.1" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + checksum: 10/1c8700362198f433874650cf6063e6ba459294caf1e4d39c9e847b3b0de1b9a1de61c9eea1517e35e9c7c1ba8cb245682e115d9c0f60ec6b505af599fdafa09d + languageName: node + linkType: hard + +"react-loadable-ssr-addon-v5-slorber@npm:^1.0.1": + version: 1.0.1 + resolution: "react-loadable-ssr-addon-v5-slorber@npm:1.0.1" + dependencies: + "@babel/runtime": "npm:^7.10.3" + peerDependencies: + react-loadable: "*" + webpack: ">=4.41.1 || 5.x" + checksum: 10/d419ff4085ed38e6433e86a2a4c2b58c3b8df6b5d890f5fd5d768fdd3729bd50af31a47e39a40a55c6f508f71c273deb2d964e3ee1362f981cfae9a72ad188cc + languageName: node + linkType: hard + +"react-loadable@npm:@docusaurus/react-loadable@6.0.0": + version: 6.0.0 + resolution: "@docusaurus/react-loadable@npm:6.0.0" + dependencies: + "@types/react": "npm:*" + peerDependencies: + react: "*" + checksum: 10/f7cca3dbc16403c426a6ab843210937caab0ea9b3880b4dee7923ebb55ff5dbbac2110ffd7d241894deab07dd74a2e18df3ed2509111036f24ac8dedb5ec92c2 + languageName: node + linkType: hard + +"react-markdown@npm:10.1.0": + version: 10.1.0 + resolution: "react-markdown@npm:10.1.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + hast-util-to-jsx-runtime: "npm:^2.0.0" + html-url-attributes: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + remark-parse: "npm:^11.0.0" + remark-rehype: "npm:^11.0.0" + unified: "npm:^11.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + peerDependencies: + "@types/react": ">=18" + react: ">=18" + checksum: 10/886c037d18266e94750abbc00c6096435bccd4da5f2d1727984bcbdf83e9f2a5cc9a6b0eecfe6c30456dc26546fee41c7f6aecbf176e6d7453963df4abefd7df + languageName: node + linkType: hard + +"react-refresh@npm:^0.17.0": + version: 0.17.0 + resolution: "react-refresh@npm:0.17.0" + checksum: 10/5e94f07d43bb1cfdc9b0c6e0c8c73e754005489950dcff1edb53aa8451d1d69a47b740b195c7c80fb4eb511c56a3585dc55eddd83f0097fb5e015116a1460467 + languageName: node + linkType: hard + +"react-router-config@npm:^5.1.1": + version: 5.1.1 + resolution: "react-router-config@npm:5.1.1" + dependencies: + "@babel/runtime": "npm:^7.1.2" + peerDependencies: + react: ">=15" + react-router: ">=5" + checksum: 10/f7f078665873926e7ca34973035ec39cb8bb2cdcd0b453549b522adf4047869ed0c5fa2bed8b15d79ef86890ccb2c96632672f22636e8c7a8b1c52e36a7a4d4e + languageName: node + linkType: hard + +"react-router-dom@npm:^5.3.4": + version: 5.3.4 + resolution: "react-router-dom@npm:5.3.4" + dependencies: + "@babel/runtime": "npm:^7.12.13" + history: "npm:^4.9.0" + loose-envify: "npm:^1.3.1" + prop-types: "npm:^15.6.2" + react-router: "npm:5.3.4" + tiny-invariant: "npm:^1.0.2" + tiny-warning: "npm:^1.0.0" + peerDependencies: + react: ">=15" + checksum: 10/5e0696ae2d86f466ff700944758a227e1dcd79b48797d567776506e4e3b4a08b81336155feb86a33be9f38c17c4d3d94212b5c60c8ee9a086022e4fd3961db29 + languageName: node + linkType: hard + +"react-router@npm:5.3.4, react-router@npm:^5.3.4": + version: 5.3.4 + resolution: "react-router@npm:5.3.4" + dependencies: + "@babel/runtime": "npm:^7.12.13" + history: "npm:^4.9.0" + hoist-non-react-statics: "npm:^3.1.0" + loose-envify: "npm:^1.3.1" + path-to-regexp: "npm:^1.7.0" + prop-types: "npm:^15.6.2" + react-is: "npm:^16.6.0" + tiny-invariant: "npm:^1.0.2" + tiny-warning: "npm:^1.0.0" + peerDependencies: + react: ">=15" + checksum: 10/99d54a99af6bc6d7cad2e5ea7eee9485b62a8b8e16a1182b18daa7fad7dafa5e526850eaeebff629848b297ae055a9cb5b4aba8760e81af8b903efc049d48f5c + languageName: node + linkType: hard + +"react-tweet@npm:3.2.2": + version: 3.2.2 + resolution: "react-tweet@npm:3.2.2" + dependencies: + "@swc/helpers": "npm:^0.5.3" + clsx: "npm:^2.0.0" + swr: "npm:^2.2.4" + peerDependencies: + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + checksum: 10/5266529508be0ea35a50dd44f2f3c169e270141203a7678eef8a30ba58f2289bd5a1b000db37b06066daf1fb851e61ab70033eec524e9fdd79d30403d9e9468a + languageName: node + linkType: hard + +"react@npm:18.3.1": + version: 18.3.1 + resolution: "react@npm:18.3.1" + dependencies: + loose-envify: "npm:^1.1.0" + checksum: 10/261137d3f3993eaa2368a83110466fc0e558bc2c7f7ae7ca52d94f03aac945f45146bd85e5f481044db1758a1dbb57879e2fcdd33924e2dde1bdc550ce73f7bf + languageName: node + linkType: hard + +"react@npm:^16.2.0": + version: 16.14.0 + resolution: "react@npm:16.14.0" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + prop-types: "npm:^15.6.2" + checksum: 10/ee04c82f5ecb70fe15a48d8cfc3fb20ce2f7e65277d4adcb56a0ac2b82c54550d4c65eabce0d5dc0cc90d053831b9586d72ee515b11cdf0c5436c7f95aafdcda + languageName: node + linkType: hard + +"readable-stream@npm:^2.0.1": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" + dependencies: + core-util-is: "npm:~1.0.0" + inherits: "npm:~2.0.3" + isarray: "npm:~1.0.0" + process-nextick-args: "npm:~2.0.0" + safe-buffer: "npm:~5.1.1" + string_decoder: "npm:~1.1.1" + util-deprecate: "npm:~1.0.1" + checksum: 10/8500dd3a90e391d6c5d889256d50ec6026c059fadee98ae9aa9b86757d60ac46fff24fafb7a39fa41d54cb39d8be56cc77be202ebd4cd8ffcf4cb226cbaa40d4 + languageName: node + linkType: hard + +"readable-stream@npm:^3.0.6": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + +"recma-build-jsx@npm:^1.0.0": + version: 1.0.0 + resolution: "recma-build-jsx@npm:1.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-util-build-jsx: "npm:^3.0.0" + vfile: "npm:^6.0.0" + checksum: 10/ba82fe08efdf5ecd178ab76a08a4acac792a41d9f38aea99f93cb3d9e577ba8952620c547e730ba6717c13efa08fdb3dfe893bccfa9717f5a81d3fb2ab20c572 + languageName: node + linkType: hard + +"recma-jsx@npm:^1.0.0": + version: 1.0.0 + resolution: "recma-jsx@npm:1.0.0" + dependencies: + acorn-jsx: "npm:^5.0.0" + estree-util-to-js: "npm:^2.0.0" + recma-parse: "npm:^1.0.0" + recma-stringify: "npm:^1.0.0" + unified: "npm:^11.0.0" + checksum: 10/dd9183f1f053bff136d710e62429ee7ca3ab5f41598ab6ea6a07cc00103b0ed356cb8ece578c0e9d19cba6dbfd6ecaace644cd0d9bf40d8af2fbe059d26c5d80 + languageName: node + linkType: hard + +"recma-parse@npm:^1.0.0": + version: 1.0.0 + resolution: "recma-parse@npm:1.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + esast-util-from-js: "npm:^2.0.0" + unified: "npm:^11.0.0" + vfile: "npm:^6.0.0" + checksum: 10/8854f830ee7b7a21934f9ac2108412a2bdd9c41465e617ac8d6edd158ff05c70dca121bf87d3716d863545b387d39e67ff011d5cb0c3d1fdba9d5a48140e12ee + languageName: node + linkType: hard + +"recma-stringify@npm:^1.0.0": + version: 1.0.0 + resolution: "recma-stringify@npm:1.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-util-to-js: "npm:^2.0.0" + unified: "npm:^11.0.0" + vfile: "npm:^6.0.0" + checksum: 10/4ab6f0416296fd6b1a6180e74e19ec110b3fa6f0b3a434468e84092e8c36db99a3a77bd6412cf7a4c8d69b1701ab38aed7d0fd466588802ca295765892d2d361 + languageName: node + linkType: hard + +"regenerate-unicode-properties@npm:^10.2.0": + version: 10.2.0 + resolution: "regenerate-unicode-properties@npm:10.2.0" + dependencies: + regenerate: "npm:^1.4.2" + checksum: 10/9150eae6fe04a8c4f2ff06077396a86a98e224c8afad8344b1b656448e89e84edcd527e4b03aa5476774129eb6ad328ed684f9c1459794a935ec0cc17ce14329 + languageName: node + linkType: hard + +"regenerate@npm:^1.4.2": + version: 1.4.2 + resolution: "regenerate@npm:1.4.2" + checksum: 10/dc6c95ae4b3ba6adbd7687cafac260eee4640318c7a95239d5ce847d9b9263979758389e862fe9c93d633b5792ea4ada5708df75885dc5aa05a309fa18140a87 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 10/5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471 + languageName: node + linkType: hard + +"regenerator-transform@npm:^0.15.2": + version: 0.15.2 + resolution: "regenerator-transform@npm:0.15.2" + dependencies: + "@babel/runtime": "npm:^7.8.4" + checksum: 10/c4fdcb46d11bbe32605b4b9ed76b21b8d3f241a45153e9dc6f5542fed4c7744fed459f42701f650d5d5956786bf7de57547329d1c05a9df2ed9e367b9d903302 + languageName: node + linkType: hard + +"regexpu-core@npm:^6.2.0": + version: 6.2.0 + resolution: "regexpu-core@npm:6.2.0" + dependencies: + regenerate: "npm:^1.4.2" + regenerate-unicode-properties: "npm:^10.2.0" + regjsgen: "npm:^0.8.0" + regjsparser: "npm:^0.12.0" + unicode-match-property-ecmascript: "npm:^2.0.0" + unicode-match-property-value-ecmascript: "npm:^2.1.0" + checksum: 10/4d054ffcd98ca4f6ca7bf0df6598ed5e4a124264602553308add41d4fa714a0c5bcfb5bc868ac91f7060a9c09889cc21d3180a3a14c5f9c5838442806129ced3 + languageName: node + linkType: hard + +"registry-auth-token@npm:^5.0.1": + version: 5.1.0 + resolution: "registry-auth-token@npm:5.1.0" + dependencies: + "@pnpm/npm-conf": "npm:^2.1.0" + checksum: 10/620c897167e2e0e9308b9cdd0288f70d651d9ec554348c39a96d398bb91d444e8cb4b3c0dc1e19d4a8f1c10ade85163baf606e5c09959baa31179bdfb1f7434e + languageName: node + linkType: hard + +"registry-url@npm:^6.0.0": + version: 6.0.1 + resolution: "registry-url@npm:6.0.1" + dependencies: + rc: "npm:1.2.8" + checksum: 10/33712aa1b489aab7aba2191c1cdadfdd71f5bf166d4792d81744a6be332c160bd7d9273af8269d8a01284b9562f14a5b31b7abcf7ad9306c44887ecff51c89ab + languageName: node + linkType: hard + +"regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "regjsgen@npm:0.8.0" + checksum: 10/b930f03347e4123c917d7b40436b4f87f625b8dd3e705b447ddd44804e4616c3addb7453f0902d6e914ab0446c30e816e445089bb641a4714237fe8141a0ef9d + languageName: node + linkType: hard + +"regjsparser@npm:^0.12.0": + version: 0.12.0 + resolution: "regjsparser@npm:0.12.0" + dependencies: + jsesc: "npm:~3.0.2" + bin: + regjsparser: bin/parser + checksum: 10/c2d6506b3308679de5223a8916984198e0493649a67b477c66bdb875357e3785abbf3bedf7c5c2cf8967d3b3a7bdf08b7cbd39e65a70f9e1ffad584aecf5f06a + languageName: node + linkType: hard + +"rehype-raw@npm:^7.0.0": + version: 7.0.0 + resolution: "rehype-raw@npm:7.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-raw: "npm:^9.0.0" + vfile: "npm:^6.0.0" + checksum: 10/65dd5809f95410ca5056efe50f5b16cb08a69c0785c6d4ec80c9280487efbaec81d342084f6cfdca5624134c1c4018705d97c37b5c0a21d9625ed8a3c88700f1 + languageName: node + linkType: hard + +"rehype-recma@npm:^1.0.0": + version: 1.0.0 + resolution: "rehype-recma@npm:1.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + hast-util-to-estree: "npm:^3.0.0" + checksum: 10/d3d544ad4a18485ec6b03a194b40473f96e2169c63d6a8ee3ce9af5e87b946c308fb9549b53e010c7dd39740337e387bb1a8856ce1b47f3e957b696f1d5b2d0c + languageName: node + linkType: hard + +"relateurl@npm:^0.2.7": + version: 0.2.7 + resolution: "relateurl@npm:0.2.7" + checksum: 10/f5d6ba58f2a5d5076389090600c243a0ba7072bcf347490a09e4241e2427ccdb260b4e22cea7be4f1fcd3c2bf05908b1e0d0bc9605e3199d4ecf37af1d5681fa + languageName: node + linkType: hard + +"remark-directive@npm:^3.0.0": + version: 3.0.1 + resolution: "remark-directive@npm:3.0.1" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-directive: "npm:^3.0.0" + micromark-extension-directive: "npm:^3.0.0" + unified: "npm:^11.0.0" + checksum: 10/819073621cb645fc7d4e6a8e28d3d3c4dcf877fd87d4f931008b9e7e68a4e80c6c11b0345be595111b32b1f16e5868e2c1d48c1b2fb02a8313a3fefa208047a1 + languageName: node + linkType: hard + +"remark-emoji@npm:^4.0.0": + version: 4.0.1 + resolution: "remark-emoji@npm:4.0.1" + dependencies: + "@types/mdast": "npm:^4.0.2" + emoticon: "npm:^4.0.1" + mdast-util-find-and-replace: "npm:^3.0.1" + node-emoji: "npm:^2.1.0" + unified: "npm:^11.0.4" + checksum: 10/2c02d8c0b694535a9f0c4fe39180cb89a8fbd07eb873c94842c34dfde566b8a6703df9d28fe175a8c28584f96252121de722862baa756f2d875f2f1a4352c1f4 + languageName: node + linkType: hard + +"remark-frontmatter@npm:^5.0.0": + version: 5.0.0 + resolution: "remark-frontmatter@npm:5.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-frontmatter: "npm:^2.0.0" + micromark-extension-frontmatter: "npm:^2.0.0" + unified: "npm:^11.0.0" + checksum: 10/5d859f336e9cd6f6ed02139a76781b35a8cabbbb240d30dd8048e1c74d7b8e8335b98f27290c9787baab3bc5eb935347a046fa85ad307cf0f7ea6c1ecfde8dc4 + languageName: node + linkType: hard + +"remark-gfm@npm:^4.0.0": + version: 4.0.1 + resolution: "remark-gfm@npm:4.0.1" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-gfm: "npm:^3.0.0" + micromark-extension-gfm: "npm:^3.0.0" + remark-parse: "npm:^11.0.0" + remark-stringify: "npm:^11.0.0" + unified: "npm:^11.0.0" + checksum: 10/86899862cf4ae1466664d3f88c6113e30b5e84e35480aef4093890aed2297ab9872506ff1f614c63963bba7d075c326d0027a1591c11bb493f6776dad21b95f6 + languageName: node + linkType: hard + +"remark-mdx@npm:^3.0.0": + version: 3.1.0 + resolution: "remark-mdx@npm:3.1.0" + dependencies: + mdast-util-mdx: "npm:^3.0.0" + micromark-extension-mdxjs: "npm:^3.0.0" + checksum: 10/9a0a1ba9433f0a9a13ec6b9b185244cb431d3205cc0034ff474b60a13b76095870b8cb6a466cfacf35199ee98e92413fec86fbeb75de3ec3d7bb8f486efc7484 + languageName: node + linkType: hard + +"remark-parse@npm:^11.0.0": + version: 11.0.0 + resolution: "remark-parse@npm:11.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unified: "npm:^11.0.0" + checksum: 10/59d584be56ebc7c05524989c4ed86eb8a7b6e361942b705ca13a37349f60740a6073aedf7783af46ce920d09dd156148942d5e33e8be3dbcd47f818cb4bc410c + languageName: node + linkType: hard + +"remark-rehype@npm:^11.0.0": + version: 11.1.1 + resolution: "remark-rehype@npm:11.1.1" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + mdast-util-to-hast: "npm:^13.0.0" + unified: "npm:^11.0.0" + vfile: "npm:^6.0.0" + checksum: 10/39404bd19c57b2b69660be7e3d587ddb2240495845d42fad3bcc506c9c132d07abacb0a20182b73c530857b2da0c463ad5658382b448243ce432152ab49af08d + languageName: node + linkType: hard + +"remark-stringify@npm:^11.0.0": + version: 11.0.0 + resolution: "remark-stringify@npm:11.0.0" + dependencies: + "@types/mdast": "npm:^4.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + unified: "npm:^11.0.0" + checksum: 10/32b2f6093ba08e713183629b37e633e0999b6981560eec41f04fe957f76fc6f56dcc14c87c6b45419863be844c6f1130eb2dc055085fc0adc0775b1df7340348 + languageName: node + linkType: hard + +"renderkid@npm:^3.0.0": + version: 3.0.0 + resolution: "renderkid@npm:3.0.0" + dependencies: + css-select: "npm:^4.1.3" + dom-converter: "npm:^0.2.0" + htmlparser2: "npm:^6.1.0" + lodash: "npm:^4.17.21" + strip-ansi: "npm:^6.0.1" + checksum: 10/434bd56d9930dd344bcba3ef7683f3dd893396b6bc7e8caa551a4cacbe75a9466dc6cf3d75bc324a5979278a73ef968d7854f8f660dbf1a52c38a73f1fb59b20 + languageName: node + linkType: hard + +"repeat-string@npm:^1.0.0": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: 10/839a3a890102a658f4cb3e7b2aa13a1f80a3a976b512020c3d1efc418491c48a886b6e481ea56afc6c4cb5eef678f23b2a4e70575e7534eccadf5e30ed2e56eb + languageName: node + linkType: hard + +"require-like@npm:>= 0.1.1": + version: 0.1.2 + resolution: "require-like@npm:0.1.2" + checksum: 10/e16b623a980a99f51f90d20ab53eb11958e2f6c988c3b6d09893f602ad5daecd65813fcbd2427fda3fbfca4bdd21855d31b19e38ba4625dfe2a56be0c9ec10bb + languageName: node + linkType: hard + +"requires-port@npm:^1.0.0": + version: 1.0.0 + resolution: "requires-port@npm:1.0.0" + checksum: 10/878880ee78ccdce372784f62f52a272048e2d0827c29ae31e7f99da18b62a2b9463ea03a75f277352f4697c100183debb0532371ad515a2d49d4bfe596dd4c20 + languageName: node + linkType: hard + +"resolve-alpn@npm:^1.2.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec + languageName: node + linkType: hard + +"resolve-from@npm:^4.0.0": + version: 4.0.0 + resolution: "resolve-from@npm:4.0.0" + checksum: 10/91eb76ce83621eea7bbdd9b55121a5c1c4a39e54a9ce04a9ad4517f102f8b5131c2cf07622c738a6683991bf54f2ce178f5a42803ecbd527ddc5105f362cc9e3 + languageName: node + linkType: hard + +"resolve-pathname@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-pathname@npm:3.0.0" + checksum: 10/6147241ba42c423dbe83cb067a2b4af4f60908c3af57e1ea567729cc71416c089737fe2a73e9e79e7a60f00f66c91e4b45ad0d37cd4be2d43fec44963ef14368 + languageName: node + linkType: hard + +"resolve@npm:^1.14.2": + version: 1.22.10 + resolution: "resolve@npm:1.22.10" + dependencies: + is-core-module: "npm:^2.16.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/0a398b44da5c05e6e421d70108822c327675febb880eebe905587628de401854c61d5df02866ff34fc4cb1173a51c9f0e84a94702738df3611a62e2acdc68181 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>": + version: 1.22.10 + resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin<compat/resolve>::version=1.22.10&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.16.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/d4d878bfe3702d215ea23e75e0e9caf99468e3db76f5ca100d27ebdc527366fee3877e54bce7d47cc72ca8952fc2782a070d238bfa79a550eeb0082384c3b81a + languageName: node + linkType: hard + +"responselike@npm:^3.0.0": + version: 3.0.0 + resolution: "responselike@npm:3.0.0" + dependencies: + lowercase-keys: "npm:^3.0.0" + checksum: 10/e0cc9be30df4f415d6d83cdede3c5c887cd4a73e7cc1708bcaab1d50a28d15acb68460ac5b02bcc55a42f3d493729c8856427dcf6e57e6e128ad05cba4cfb95e + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + +"retry@npm:^0.13.1": + version: 0.13.1 + resolution: "retry@npm:0.13.1" + checksum: 10/6125ec2e06d6e47e9201539c887defba4e47f63471db304c59e4b82fc63c8e89ca06a77e9d34939a9a42a76f00774b2f46c0d4a4cbb3e287268bd018ed69426d + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.1.0 + resolution: "reusify@npm:1.1.0" + checksum: 10/af47851b547e8a8dc89af144fceee17b80d5beaf5e6f57ed086432d79943434ff67ca526e92275be6f54b6189f6920a24eace75c2657eed32d02c400312b21ec + languageName: node + linkType: hard + +"rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + +"rimraf@npm:^5.0.5": + version: 5.0.10 + resolution: "rimraf@npm:5.0.10" + dependencies: + glob: "npm:^10.3.7" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10/f3b8ce81eecbde4628b07bdf9e2fa8b684e0caea4999acb1e3b0402c695cd41f28cd075609a808e61ce2672f528ca079f675ab1d8e8d5f86d56643a03e0b8d2e + languageName: node + linkType: hard + +"rollup@npm:^4.40.0": + version: 4.44.0 + resolution: "rollup@npm:4.44.0" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.44.0" + "@rollup/rollup-android-arm64": "npm:4.44.0" + "@rollup/rollup-darwin-arm64": "npm:4.44.0" + "@rollup/rollup-darwin-x64": "npm:4.44.0" + "@rollup/rollup-freebsd-arm64": "npm:4.44.0" + "@rollup/rollup-freebsd-x64": "npm:4.44.0" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.44.0" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.44.0" + "@rollup/rollup-linux-arm64-gnu": "npm:4.44.0" + "@rollup/rollup-linux-arm64-musl": "npm:4.44.0" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.44.0" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.44.0" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.44.0" + "@rollup/rollup-linux-riscv64-musl": "npm:4.44.0" + "@rollup/rollup-linux-s390x-gnu": "npm:4.44.0" + "@rollup/rollup-linux-x64-gnu": "npm:4.44.0" + "@rollup/rollup-linux-x64-musl": "npm:4.44.0" + "@rollup/rollup-win32-arm64-msvc": "npm:4.44.0" + "@rollup/rollup-win32-ia32-msvc": "npm:4.44.0" + "@rollup/rollup-win32-x64-msvc": "npm:4.44.0" + "@types/estree": "npm:1.0.8" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-loongarch64-gnu": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-riscv64-musl": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10/2182fc751734277972c011bf62a07cd01de44aaa408f29d3be51b6c7373aa179c9e20d5b9b9fa46268c7d65fc8edb033243f501495465b13dd05d1f99635a7fa + languageName: node + linkType: hard + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + "@docusaurus/core": "npm:3.8.1" + "@docusaurus/faster": "npm:3.8.1" + "@docusaurus/module-type-aliases": "npm:3.8.1" + "@docusaurus/preset-classic": "npm:3.8.1" + "@docusaurus/types": "npm:3.8.1" + "@mdx-js/react": "npm:3.1.0" + "@sandhose/prettier-animated-logo": "npm:1.0.3" + "@types/js-yaml": "npm:4.0.9" + "@vitejs/plugin-react": "npm:4.6.0" + clsx: "npm:2.1.1" + codemirror-graphql: "npm:2.2.2" + concurrently: "npm:9.2.0" + js-yaml: "npm:4.1.0" + prism-react-renderer: "npm:2.4.1" + react: "npm:18.3.1" + react-dom: "npm:18.3.1" + react-markdown: "npm:10.1.0" + react-tweet: "npm:3.2.2" + vite: "npm:7.0.0" + languageName: unknown + linkType: soft + +"rtlcss@npm:^4.1.0": + version: 4.3.0 + resolution: "rtlcss@npm:4.3.0" + dependencies: + escalade: "npm:^3.1.1" + picocolors: "npm:^1.0.0" + postcss: "npm:^8.4.21" + strip-json-comments: "npm:^3.1.1" + bin: + rtlcss: bin/rtlcss.js + checksum: 10/0a1e6b566b027e2b6ea1f436b67bd1c19cda48c2d768fecef821f53264c3e62947b7535a8221492056ea471df0596af1cd79c59dc0c7b14f184049707667c452 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10/cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + languageName: node + linkType: hard + +"rxjs@npm:^7.8.1": + version: 7.8.2 + resolution: "rxjs@npm:7.8.2" + dependencies: + tslib: "npm:^2.1.0" + checksum: 10/03dff09191356b2b87d94fbc1e97c4e9eb3c09d4452399dddd451b09c2f1ba8d56925a40af114282d7bc0c6fe7514a2236ca09f903cf70e4bbf156650dddb49d + languageName: node + linkType: hard + +"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": + version: 5.1.2 + resolution: "safe-buffer@npm:5.1.2" + checksum: 10/7eb5b48f2ed9a594a4795677d5a150faa7eb54483b2318b568dc0c4fc94092a6cce5be02c7288a0500a156282f5276d5688bce7259299568d1053b2150ef374a + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + +"sax@npm:^1.2.4": + version: 1.4.1 + resolution: "sax@npm:1.4.1" + checksum: 10/b1c784b545019187b53a0c28edb4f6314951c971e2963a69739c6ce222bfbc767e54d320e689352daba79b7d5e06d22b5d7113b99336219d6e93718e2f99d335 + languageName: node + linkType: hard + +"scheduler@npm:^0.19.1": + version: 0.19.1 + resolution: "scheduler@npm:0.19.1" + dependencies: + loose-envify: "npm:^1.1.0" + object-assign: "npm:^4.1.1" + checksum: 10/2bf42cd56994dd8a97bad0ecb6fbd720674f640c4a95957f9ab453dda28133d5f56755d842e6a0b203efef89a49c52354d151946f50e5c0b633d97d718285c8d + languageName: node + linkType: hard + +"scheduler@npm:^0.23.2": + version: 0.23.2 + resolution: "scheduler@npm:0.23.2" + dependencies: + loose-envify: "npm:^1.1.0" + checksum: 10/e8d68b89d18d5b028223edf090092846868a765a591944760942b77ea1f69b17235f7e956696efbb62c8130ab90af7e0949bfb8eba7896335507317236966bc9 + languageName: node + linkType: hard + +"schema-dts@npm:^1.1.2": + version: 1.1.5 + resolution: "schema-dts@npm:1.1.5" + checksum: 10/74f8376449241f008349cbd938e30e2174f0c974bb5155c852bdbbb4873a0f151a12601cf2fe115ae0811a0f7ccaefd3525e21c2a8f0fab7ada9c0309230db0a + languageName: node + linkType: hard + +"schema-utils@npm:^3.0.0": + version: 3.3.0 + resolution: "schema-utils@npm:3.3.0" + dependencies: + "@types/json-schema": "npm:^7.0.8" + ajv: "npm:^6.12.5" + ajv-keywords: "npm:^3.5.2" + checksum: 10/2c7bbb1da967fdfd320e6cea538949006ec6e8c13ea560a4f94ff2c56809a8486fa5ec419e023452501a6befe1ca381e409c2798c24f4993c7c4094d97fdb258 + languageName: node + linkType: hard + +"schema-utils@npm:^4.0.0, schema-utils@npm:^4.0.1, schema-utils@npm:^4.3.0": + version: 4.3.0 + resolution: "schema-utils@npm:4.3.0" + dependencies: + "@types/json-schema": "npm:^7.0.9" + ajv: "npm:^8.9.0" + ajv-formats: "npm:^2.1.1" + ajv-keywords: "npm:^5.1.0" + checksum: 10/86c5a7c72a275c56f140bc3cdd832d56efb11428c88ad588127db12cb9b2c83ccaa9540e115d7baa9c6175b5e360094457e29c44e6fb76787c9498c2eb6df5d6 + languageName: node + linkType: hard + +"section-matter@npm:^1.0.0": + version: 1.0.0 + resolution: "section-matter@npm:1.0.0" + dependencies: + extend-shallow: "npm:^2.0.1" + kind-of: "npm:^6.0.0" + checksum: 10/cedfda3a9238f66942d92531fe043dd134702a462cdc9e254cd6aa418c66ca0d229900e4da78ffd1a07051e7b239251c4dc4748e9d1c76bf41a37bff7a478556 + languageName: node + linkType: hard + +"select-hose@npm:^2.0.0": + version: 2.0.0 + resolution: "select-hose@npm:2.0.0" + checksum: 10/08cdd629a394d20e9005e7956f0624307c702cf950cc0458953e9b87ea961d3b1b72ac02266bdb93ac1eec4fcf42b41db9cabe93aa2b7683d71513d133c44fb5 + languageName: node + linkType: hard + +"selfsigned@npm:^2.1.1": + version: 2.4.1 + resolution: "selfsigned@npm:2.4.1" + dependencies: + "@types/node-forge": "npm:^1.3.0" + node-forge: "npm:^1" + checksum: 10/52536623f1cfdeb2f8b9198377f2ce7931c677ea69421238d1dc1ea2983bbe258e56c19e7d1af87035cad7270f19b7e996eaab1212e724d887722502f68e17f2 + languageName: node + linkType: hard + +"semver-diff@npm:^4.0.0": + version: 4.0.0 + resolution: "semver-diff@npm:4.0.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/4a958d6f76c7e7858268e1e2cf936712542441c9e003e561b574167279eee0a9bd55cc7eae1bfb31d3e7ad06a9fc370e7dd412fcfefec8c0daf1ce5aea623559 + languageName: node + linkType: hard + +"semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.4": + version: 7.7.1 + resolution: "semver@npm:7.7.1" + bin: + semver: bin/semver.js + checksum: 10/4cfa1eb91ef3751e20fc52e47a935a0118d56d6f15a837ab814da0c150778ba2ca4f1a4d9068b33070ea4273629e615066664c2cfcd7c272caf7a8a0f6518b2c + languageName: node + linkType: hard + +"send@npm:0.19.0": + version: 0.19.0 + resolution: "send@npm:0.19.0" + dependencies: + debug: "npm:2.6.9" + depd: "npm:2.0.0" + destroy: "npm:1.2.0" + encodeurl: "npm:~1.0.2" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + mime: "npm:1.6.0" + ms: "npm:2.1.3" + on-finished: "npm:2.4.1" + range-parser: "npm:~1.2.1" + statuses: "npm:2.0.1" + checksum: 10/1f6064dea0ae4cbe4878437aedc9270c33f2a6650a77b56a16b62d057527f2766d96ee282997dd53ec0339082f2aad935bc7d989b46b48c82fc610800dc3a1d0 + languageName: node + linkType: hard + +"serialize-javascript@npm:^6.0.0, serialize-javascript@npm:^6.0.1, serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/445a420a6fa2eaee4b70cbd884d538e259ab278200a2ededd73253ada17d5d48e91fb1f4cd224a236ab62ea7ba0a70c6af29fc93b4f3d3078bf7da1c031fde58 + languageName: node + linkType: hard + +"serve-handler@npm:^6.1.6": + version: 6.1.6 + resolution: "serve-handler@npm:6.1.6" + dependencies: + bytes: "npm:3.0.0" + content-disposition: "npm:0.5.2" + mime-types: "npm:2.1.18" + minimatch: "npm:3.1.2" + path-is-inside: "npm:1.0.2" + path-to-regexp: "npm:3.3.0" + range-parser: "npm:1.2.0" + checksum: 10/7e7d93eb7e69fcd9f9c5afc2ef2b46cb0072b4af13cbabef9bca725afb350ddae6857d8c8be2c256f7ce1f7677c20347801399c11caa5805c0090339f894e8f2 + languageName: node + linkType: hard + +"serve-index@npm:^1.9.1": + version: 1.9.1 + resolution: "serve-index@npm:1.9.1" + dependencies: + accepts: "npm:~1.3.4" + batch: "npm:0.6.1" + debug: "npm:2.6.9" + escape-html: "npm:~1.0.3" + http-errors: "npm:~1.6.2" + mime-types: "npm:~2.1.17" + parseurl: "npm:~1.3.2" + checksum: 10/2adce2878d7e30f197e66f30e39f4a404d9ae39295c0c13849bb25e7cf976b93e883204739efd1510559588bed56f8101e32191cbe75f374c6e1e803852194cb + languageName: node + linkType: hard + +"serve-static@npm:1.16.2": + version: 1.16.2 + resolution: "serve-static@npm:1.16.2" + dependencies: + encodeurl: "npm:~2.0.0" + escape-html: "npm:~1.0.3" + parseurl: "npm:~1.3.3" + send: "npm:0.19.0" + checksum: 10/7fa9d9c68090f6289976b34fc13c50ac8cd7f16ae6bce08d16459300f7fc61fbc2d7ebfa02884c073ec9d6ab9e7e704c89561882bbe338e99fcacb2912fde737 + languageName: node + linkType: hard + +"set-function-length@npm:^1.2.2": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" + dependencies: + define-data-property: "npm:^1.1.4" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + checksum: 10/505d62b8e088468917ca4e3f8f39d0e29f9a563b97dbebf92f4bd2c3172ccfb3c5b8e4566d5fcd00784a00433900e7cb8fbc404e2dbd8c3818ba05bb9d4a8a6d + languageName: node + linkType: hard + +"setprototypeof@npm:1.1.0": + version: 1.1.0 + resolution: "setprototypeof@npm:1.1.0" + checksum: 10/02d2564e02a260551bab3ec95358dcfde775fe61272b1b7c488de3676a4bb79f280b5668a324aebe0ec73f0d8ba408bc2d816a609ee5d93b1a7936b9d4ba1208 + languageName: node + linkType: hard + +"setprototypeof@npm:1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: 10/fde1630422502fbbc19e6844346778f99d449986b2f9cdcceb8326730d2f3d9964dbcb03c02aaadaefffecd0f2c063315ebea8b3ad895914bf1afc1747fc172e + languageName: node + linkType: hard + +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" + dependencies: + kind-of: "npm:^6.0.2" + checksum: 10/e066bd540cfec5e1b0f78134853e0d892d1c8945fb9a926a579946052e7cb0c70ca4fc34f875a8083aa7910d751805d36ae64af250a6de6f3d28f9fa7be6c21b + languageName: node + linkType: hard + +"shallowequal@npm:^1.1.0": + version: 1.1.0 + resolution: "shallowequal@npm:1.1.0" + checksum: 10/f4c1de0837f106d2dbbfd5d0720a5d059d1c66b42b580965c8f06bb1db684be8783538b684092648c981294bf817869f743a066538771dbecb293df78f765e00 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"shell-quote@npm:^1.8.1": + version: 1.8.2 + resolution: "shell-quote@npm:1.8.2" + checksum: 10/3ae4804fd80a12ba07650d0262804ae3b479a62a6b6971a6dc5fa12995507aa63d3de3e6a8b7a8d18f4ce6eb118b7d75db7fcb2c0acbf016f210f746b10cfe02 + languageName: node + linkType: hard + +"side-channel-list@npm:^1.0.0": + version: 1.0.0 + resolution: "side-channel-list@npm:1.0.0" + dependencies: + es-errors: "npm:^1.3.0" + object-inspect: "npm:^1.13.3" + checksum: 10/603b928997abd21c5a5f02ae6b9cc36b72e3176ad6827fab0417ead74580cc4fb4d5c7d0a8a2ff4ead34d0f9e35701ed7a41853dac8a6d1a664fcce1a044f86f + languageName: node + linkType: hard + +"side-channel-map@npm:^1.0.1": + version: 1.0.1 + resolution: "side-channel-map@npm:1.0.1" + dependencies: + call-bound: "npm:^1.0.2" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.5" + object-inspect: "npm:^1.13.3" + checksum: 10/5771861f77feefe44f6195ed077a9e4f389acc188f895f570d56445e251b861754b547ea9ef73ecee4e01fdada6568bfe9020d2ec2dfc5571e9fa1bbc4a10615 + languageName: node + linkType: hard + +"side-channel-weakmap@npm:^1.0.2": + version: 1.0.2 + resolution: "side-channel-weakmap@npm:1.0.2" + dependencies: + call-bound: "npm:^1.0.2" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.5" + object-inspect: "npm:^1.13.3" + side-channel-map: "npm:^1.0.1" + checksum: 10/a815c89bc78c5723c714ea1a77c938377ea710af20d4fb886d362b0d1f8ac73a17816a5f6640f354017d7e292a43da9c5e876c22145bac00b76cfb3468001736 + languageName: node + linkType: hard + +"side-channel@npm:^1.0.6": + version: 1.1.0 + resolution: "side-channel@npm:1.1.0" + dependencies: + es-errors: "npm:^1.3.0" + object-inspect: "npm:^1.13.3" + side-channel-list: "npm:^1.0.0" + side-channel-map: "npm:^1.0.1" + side-channel-weakmap: "npm:^1.0.2" + checksum: 10/7d53b9db292c6262f326b6ff3bc1611db84ece36c2c7dc0e937954c13c73185b0406c56589e2bb8d071d6fee468e14c39fb5d203ee39be66b7b8174f179afaba + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + +"sirv@npm:^2.0.3": + version: 2.0.4 + resolution: "sirv@npm:2.0.4" + dependencies: + "@polka/url": "npm:^1.0.0-next.24" + mrmime: "npm:^2.0.0" + totalist: "npm:^3.0.0" + checksum: 10/24f42cf06895017e589c9d16fc3f1c6c07fe8b0dbafce8a8b46322cfba67b7f2498610183954cb0e9d089c8cb60002a7ee7e8bca6a91a0d7042bfbc3473c95c3 + languageName: node + linkType: hard + +"sisteransi@npm:^1.0.5": + version: 1.0.5 + resolution: "sisteransi@npm:1.0.5" + checksum: 10/aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 + languageName: node + linkType: hard + +"sitemap@npm:^7.1.1": + version: 7.1.2 + resolution: "sitemap@npm:7.1.2" + dependencies: + "@types/node": "npm:^17.0.5" + "@types/sax": "npm:^1.2.1" + arg: "npm:^5.0.0" + sax: "npm:^1.2.4" + bin: + sitemap: dist/cli.js + checksum: 10/f4edeaaa49511b034b73cc1b1e7b218d1faee8ca05398f30810b8f4662fcff2a20670a9b81470a9445fcdfb40abb602f962c61fdfeaca0fcce9aa99215b0ddc6 + languageName: node + linkType: hard + +"skin-tone@npm:^2.0.0": + version: 2.0.0 + resolution: "skin-tone@npm:2.0.0" + dependencies: + unicode-emoji-modifier-base: "npm:^1.0.0" + checksum: 10/19de157586b8019cacc55eb25d9d640f00fc02415761f3e41a4527142970fd4e7f6af0333bc90e879858766c20a976107bb386ffd4c812289c01d51f2c8d182c + languageName: node + linkType: hard + +"slash@npm:^3.0.0": + version: 3.0.0 + resolution: "slash@npm:3.0.0" + checksum: 10/94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c + languageName: node + linkType: hard + +"slash@npm:^4.0.0": + version: 4.0.0 + resolution: "slash@npm:4.0.0" + checksum: 10/da8e4af73712253acd21b7853b7e0dbba776b786e82b010a5bfc8b5051a1db38ed8aba8e1e8f400dd2c9f373be91eb1c42b66e91abb407ff42b10feece5e1d2d + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + +"snake-case@npm:^3.0.4": + version: 3.0.4 + resolution: "snake-case@npm:3.0.4" + dependencies: + dot-case: "npm:^3.0.4" + tslib: "npm:^2.0.3" + checksum: 10/0a7a79900bbb36f8aaa922cf111702a3647ac6165736d5dc96d3ef367efc50465cac70c53cd172c382b022dac72ec91710608e5393de71f76d7142e6fd80e8a3 + languageName: node + linkType: hard + +"sockjs@npm:^0.3.24": + version: 0.3.24 + resolution: "sockjs@npm:0.3.24" + dependencies: + faye-websocket: "npm:^0.11.3" + uuid: "npm:^8.3.2" + websocket-driver: "npm:^0.7.4" + checksum: 10/36312ec9772a0e536b69b72e9d1c76bd3d6ecf885c5d8fd6e59811485c916b8ce75f46ec57532f436975815ee14aa9a0e22ae3d9e5c0b18ea37b56d0aaaf439c + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.5 + resolution: "socks-proxy-agent@npm:8.0.5" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10/ee99e1dacab0985b52cbe5a75640be6e604135e9489ebdc3048635d186012fbaecc20fbbe04b177dee434c319ba20f09b3e7dfefb7d932466c0d707744eac05c + languageName: node + linkType: hard + +"socks@npm:^2.8.3": + version: 2.8.4 + resolution: "socks@npm:2.8.4" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ab3af97aeb162f32c80e176c717ccf16a11a6ebb4656a62b94c0f96495ea2a1f4a8206c04b54438558485d83d0c5f61920c07a1a5d3963892a589b40cc6107dd + languageName: node + linkType: hard + +"sort-css-media-queries@npm:2.2.0": + version: 2.2.0 + resolution: "sort-css-media-queries@npm:2.2.0" + checksum: 10/d4d8115d6fe1a522a76237d2ae81601bb2c553318562c884f6f76b247334aeeecc39194658374c3ff933ba4f4561c05140123d98476a310ab88dcd47f0a5314e + languageName: node + linkType: hard + +"source-map-js@npm:^1.0.1, source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10/ff9d8c8bf096d534a5b7707e0382ef827b4dd360a577d3f34d2b9f48e12c9d230b5747974ee7c607f0df65113732711bb701fe9ece3c7edbd43cb2294d707df3 + languageName: node + linkType: hard + +"source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:~0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"source-map@npm:^0.7.0": + version: 0.7.4 + resolution: "source-map@npm:0.7.4" + checksum: 10/a0f7c9b797eda93139842fd28648e868a9a03ea0ad0d9fa6602a0c1f17b7fb6a7dcca00c144476cccaeaae5042e99a285723b1a201e844ad67221bf5d428f1dc + languageName: node + linkType: hard + +"space-separated-tokens@npm:^2.0.0": + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 10/202e97d7ca1ba0758a0aa4fe226ff98142073bcceeff2da3aad037968878552c3bbce3b3231970025375bbba5aee00c5b8206eda408da837ab2dc9c0f26be990 + languageName: node + linkType: hard + +"spdy-transport@npm:^3.0.0": + version: 3.0.0 + resolution: "spdy-transport@npm:3.0.0" + dependencies: + debug: "npm:^4.1.0" + detect-node: "npm:^2.0.4" + hpack.js: "npm:^2.1.6" + obuf: "npm:^1.1.2" + readable-stream: "npm:^3.0.6" + wbuf: "npm:^1.7.3" + checksum: 10/b93b606b209ca785456bd850b8925f21a76522ee5b46701235ecff3eba17686560c27575f91863842dc843a39772f6d2f5a8755df9eaff0924d20598df18828d + languageName: node + linkType: hard + +"spdy@npm:^4.0.2": + version: 4.0.2 + resolution: "spdy@npm:4.0.2" + dependencies: + debug: "npm:^4.1.0" + handle-thing: "npm:^2.0.0" + http-deceiver: "npm:^1.2.7" + select-hose: "npm:^2.0.0" + spdy-transport: "npm:^3.0.0" + checksum: 10/d29b89e48e7d762e505a2f83b1bc2c92268bd518f1b411864ab42a9e032e387d10467bbce0d8dbf8647bf4914a063aa1d303dff85e248f7a57f81a7b18ac34ef + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + +"srcset@npm:^4.0.0": + version: 4.0.0 + resolution: "srcset@npm:4.0.0" + checksum: 10/903c951fbf7afb9a73bb5356f2e7c714e67d03f9dd48dccf63da2a70b108f7ba07b944d529eeed56a36c8dd194d979ef92fe75e798611a575a41cf730be582aa + languageName: node + linkType: hard + +"ssri@npm:^12.0.0": + version: 12.0.0 + resolution: "ssri@npm:12.0.0" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/7024c1a6e39b3f18aa8f1c8290e884fe91b0f9ca5a6c6d410544daad54de0ba664db879afe16412e187c6c292fd60b937f047ee44292e5c2af2dcc6d8e1a9b48 + languageName: node + linkType: hard + +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 10/18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"statuses@npm:>= 1.4.0 < 2": + version: 1.5.0 + resolution: "statuses@npm:1.5.0" + checksum: 10/c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c + languageName: node + linkType: hard + +"std-env@npm:^3.7.0": + version: 3.8.1 + resolution: "std-env@npm:3.8.1" + checksum: 10/ee119570e2e449be86aa4972f119f9086a918307cc524f6e891b7a7c1327a5c970cf1b7d5898c881777845292a7e3380cf7d80ad34aee355d2c22ac5eb628542 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + +"string_decoder@npm:~1.1.1": + version: 1.1.1 + resolution: "string_decoder@npm:1.1.1" + dependencies: + safe-buffer: "npm:~5.1.0" + checksum: 10/7c41c17ed4dea105231f6df208002ebddd732e8e9e2d619d133cecd8e0087ddfd9587d2feb3c8caf3213cbd841ada6d057f5142cae68a4e62d3540778d9819b4 + languageName: node + linkType: hard + +"stringify-entities@npm:^4.0.0": + version: 4.0.4 + resolution: "stringify-entities@npm:4.0.4" + dependencies: + character-entities-html4: "npm:^2.0.0" + character-entities-legacy: "npm:^3.0.0" + checksum: 10/42bd2f37528795a7b4386bd39dc4699515fb0f0b8c418a6bb29ae205ce66eaff9e8801a2bee65b8049c918c9475a71c7e5911f6a88c19f1d84ebdcba3d881a2d + languageName: node + linkType: hard + +"stringify-object@npm:^3.3.0": + version: 3.3.0 + resolution: "stringify-object@npm:3.3.0" + dependencies: + get-own-enumerable-property-symbols: "npm:^3.0.0" + is-obj: "npm:^1.0.1" + is-regexp: "npm:^1.0.0" + checksum: 10/973782f09a3df3f39a2cf07dbf43fb9ba6cb32976f3616cd0f6c10e0a5c5415dd72b7b700e72920e8da2bf57c3001b8e37b5af7174bab9a748ce0416989e19b1 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + +"strip-bom-string@npm:^1.0.0": + version: 1.0.0 + resolution: "strip-bom-string@npm:1.0.0" + checksum: 10/5635a3656d8512a2c194d6c8d5dee7ef0dde6802f7be9413b91e201981ad4132506656d9cf14137f019fd50f0269390d91c7f6a2601b1bee039a4859cfce4934 + languageName: node + linkType: hard + +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 10/69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 + languageName: node + linkType: hard + +"strip-json-comments@npm:^3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"strip-json-comments@npm:~2.0.1": + version: 2.0.1 + resolution: "strip-json-comments@npm:2.0.1" + checksum: 10/1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1 + languageName: node + linkType: hard + +"style-to-js@npm:^1.0.0": + version: 1.1.16 + resolution: "style-to-js@npm:1.1.16" + dependencies: + style-to-object: "npm:1.0.8" + checksum: 10/a876cc49a29ac90c7723b4d6f002ac6c1ac5ccc6b5bc963d9c607cfc74b15927b704c9324df6f824f576c65689fe4b4ff79caabcd44a13d8a02641f721f1b316 + languageName: node + linkType: hard + +"style-to-object@npm:1.0.8": + version: 1.0.8 + resolution: "style-to-object@npm:1.0.8" + dependencies: + inline-style-parser: "npm:0.2.4" + checksum: 10/530b067325e3119bfaf75bdbe25cc86b02b559db00d881a74b98a2d5bb10ac953d1b455ed90c825963cf3b4bdaa1bda45f406d78d987391434b8d8ab3835df4e + languageName: node + linkType: hard + +"stylehacks@npm:^6.1.1": + version: 6.1.1 + resolution: "stylehacks@npm:6.1.1" + dependencies: + browserslist: "npm:^4.23.0" + postcss-selector-parser: "npm:^6.0.16" + peerDependencies: + postcss: ^8.4.31 + checksum: 10/e22766db1d3a723e21e63af3d27b2623caf43af81c97c571944c0f420d51a629784ece4e5cc146cc79d800e1fe56c53f50666635c1fe8a640f68db91371bf06f + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + +"svg-parser@npm:^2.0.4": + version: 2.0.4 + resolution: "svg-parser@npm:2.0.4" + checksum: 10/ec196da6ea21481868ab26911970e35488361c39ead1c6cdd977ba16c885c21a91ddcbfd113bfb01f79a822e2a751ef85b2f7f95e2cb9245558ebce12c34af1f + languageName: node + linkType: hard + +"svgo@npm:^3.0.2, svgo@npm:^3.2.0": + version: 3.3.2 + resolution: "svgo@npm:3.3.2" + dependencies: + "@trysound/sax": "npm:0.2.0" + commander: "npm:^7.2.0" + css-select: "npm:^5.1.0" + css-tree: "npm:^2.3.1" + css-what: "npm:^6.1.0" + csso: "npm:^5.0.5" + picocolors: "npm:^1.0.0" + bin: + svgo: ./bin/svgo + checksum: 10/82fdea9b938884d808506104228e4d3af0050d643d5b46ff7abc903ff47a91bbf6561373394868aaf07a28f006c4057b8fbf14bbd666298abdd7cc590d4f7700 + languageName: node + linkType: hard + +"swc-loader@npm:^0.2.6": + version: 0.2.6 + resolution: "swc-loader@npm:0.2.6" + dependencies: + "@swc/counter": "npm:^0.1.3" + peerDependencies: + "@swc/core": ^1.2.147 + webpack: ">=2" + checksum: 10/fe90948c02a51bb8ffcff1ce3590e01dc12860b0bb7c9e22052b14fa846ed437781ae265614a5e14344bea22001108780f00a6e350e28c0b3499bc4cd11335fb + languageName: node + linkType: hard + +"swr@npm:^2.2.4": + version: 2.3.3 + resolution: "swr@npm:2.3.3" + dependencies: + dequal: "npm:^2.0.3" + use-sync-external-store: "npm:^1.4.0" + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10/11cd5d1acbc62cf0e092e0d19f1d67b2e6ecb542602250f3277eb235750cd3285291bae9a8264c1f5b3973890f75234c104a0baf1ac6059aadc700ecba100fcc + languageName: node + linkType: hard + +"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a + languageName: node + linkType: hard + +"tar@npm:^7.4.3": + version: 7.4.3 + resolution: "tar@npm:7.4.3" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.0.1" + mkdirp: "npm:^3.0.1" + yallist: "npm:^5.0.0" + checksum: 10/12a2a4fc6dee23e07cc47f1aeb3a14a1afd3f16397e1350036a8f4cdfee8dcac7ef5978337a4e7b2ac2c27a9a6d46388fc2088ea7c80cb6878c814b1425f8ecf + languageName: node + linkType: hard + +"terser-webpack-plugin@npm:^5.3.11, terser-webpack-plugin@npm:^5.3.9": + version: 5.3.14 + resolution: "terser-webpack-plugin@npm:5.3.14" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.25" + jest-worker: "npm:^27.4.5" + schema-utils: "npm:^4.3.0" + serialize-javascript: "npm:^6.0.2" + terser: "npm:^5.31.1" + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: 10/5b7290f7edb179b83cefb8827c12371ddddc088cf251cf58a1c738d82628331ae6604273b61fe991d77411d4bb6b7178c3826aa47edf01b4ee21f973d6c8b8fb + languageName: node + linkType: hard + +"terser@npm:^5.10.0, terser@npm:^5.15.1, terser@npm:^5.31.1": + version: 5.39.0 + resolution: "terser@npm:5.39.0" + dependencies: + "@jridgewell/source-map": "npm:^0.3.3" + acorn: "npm:^8.8.2" + commander: "npm:^2.20.0" + source-map-support: "npm:~0.5.20" + bin: + terser: bin/terser + checksum: 10/d84aff642398329f7179bbeaca28cac76a86100e2372d98d39d9b86c48023b6b9f797d983d6e7c0610b3f957c53d01ada1befa25d625614cb2ccd20714f1e98b + languageName: node + linkType: hard + +"thunky@npm:^1.0.2": + version: 1.1.0 + resolution: "thunky@npm:1.1.0" + checksum: 10/825e3bd07ab3c9fd6f753c457a60957c628cacba5dd0656fd93b037c445e2828b43cf0805a9f2b16b0c5f5a10fd561206271acddb568df4f867f0aea0eb2772f + languageName: node + linkType: hard + +"tiny-invariant@npm:^1.0.2": + version: 1.3.3 + resolution: "tiny-invariant@npm:1.3.3" + checksum: 10/5e185c8cc2266967984ce3b352a4e57cb89dad5a8abb0dea21468a6ecaa67cd5bb47a3b7a85d08041008644af4f667fb8b6575ba38ba5fb00b3b5068306e59fe + languageName: node + linkType: hard + +"tiny-warning@npm:^1.0.0": + version: 1.0.3 + resolution: "tiny-warning@npm:1.0.3" + checksum: 10/da62c4acac565902f0624b123eed6dd3509bc9a8d30c06e017104bedcf5d35810da8ff72864400ad19c5c7806fc0a8323c68baf3e326af7cb7d969f846100d71 + languageName: node + linkType: hard + +"tinyglobby@npm:^0.2.14": + version: 0.2.14 + resolution: "tinyglobby@npm:0.2.14" + dependencies: + fdir: "npm:^6.4.4" + picomatch: "npm:^4.0.2" + checksum: 10/3d306d319718b7cc9d79fb3f29d8655237aa6a1f280860a217f93417039d0614891aee6fc47c5db315f4fcc6ac8d55eb8e23e2de73b2c51a431b42456d9e5764 + languageName: node + linkType: hard + +"tinypool@npm:^1.0.2": + version: 1.1.0 + resolution: "tinypool@npm:1.1.0" + checksum: 10/2e99e76f01699bb3244463a4b1b473fb9a166473d417b5ce373bbd12ef4626c221100533540d90f6bddbc83149ebf97e7ce052c0d1c5ae1a5066c5690cfee538 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + +"toidentifier@npm:1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 10/952c29e2a85d7123239b5cfdd889a0dde47ab0497f0913d70588f19c53f7e0b5327c95f4651e413c74b785147f9637b17410ac8c846d5d4a20a5a33eb6dc3a45 + languageName: node + linkType: hard + +"totalist@npm:^3.0.0": + version: 3.0.1 + resolution: "totalist@npm:3.0.1" + checksum: 10/5132d562cf88ff93fd710770a92f31dbe67cc19b5c6ccae2efc0da327f0954d211bbfd9456389655d726c624f284b4a23112f56d1da931ca7cfabbe1f45e778a + languageName: node + linkType: hard + +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 + languageName: node + linkType: hard + +"trim-lines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-lines@npm:3.0.1" + checksum: 10/7a1325e4ce8ff7e9e52007600e9c9862a166d0db1f1cf0c9357e359e410acab1278fcd91cc279dfa5123fc37b69f080de02f471e91dbbc61b155b9ca92597929 + languageName: node + linkType: hard + +"trough@npm:^2.0.0": + version: 2.2.0 + resolution: "trough@npm:2.2.0" + checksum: 10/999c1cb3db6ec63e1663f911146a90125065da37f66ba342b031d53edb22a62f56c1f934bbc61a55b2b29dd74207544cfd78875b414665c1ffadcd9a9a009eeb + languageName: node + linkType: hard + +"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.6.0, tslib@npm:^2.8.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 + languageName: node + linkType: hard + +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: 10/f4254070d9c3d83a6e573bcb95173008d73474ceadbbf620dd32d273940ca18734dff39c2b2480282df9afe5d1675ebed5499a00d791758748ea81f61a38961f + languageName: node + linkType: hard + +"type-fest@npm:^1.0.1": + version: 1.4.0 + resolution: "type-fest@npm:1.4.0" + checksum: 10/89875c247564601c2650bacad5ff80b859007fbdb6c9e43713ae3ffa3f584552eea60f33711dd762e16496a1ab4debd409822627be14097d9a17e39c49db591a + languageName: node + linkType: hard + +"type-fest@npm:^2.13.0, type-fest@npm:^2.5.0": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: 10/7bf9e8fdf34f92c8bb364c0af14ca875fac7e0183f2985498b77be129dc1b3b1ad0a6b3281580f19e48c6105c037fb966ad9934520c69c6434d17fd0af4eed78 + languageName: node + linkType: hard + +"type-is@npm:~1.6.18": + version: 1.6.18 + resolution: "type-is@npm:1.6.18" + dependencies: + media-typer: "npm:0.3.0" + mime-types: "npm:~2.1.24" + checksum: 10/0bd9eeae5efd27d98fd63519f999908c009e148039d8e7179a074f105362d4fcc214c38b24f6cda79c87e563cbd12083a4691381ed28559220d4a10c2047bed4 + languageName: node + linkType: hard + +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + +"undici-types@npm:~6.20.0": + version: 6.20.0 + resolution: "undici-types@npm:6.20.0" + checksum: 10/583ac7bbf4ff69931d3985f4762cde2690bb607844c16a5e2fbb92ed312fe4fa1b365e953032d469fa28ba8b224e88a595f0b10a449332f83fa77c695e567dbe + languageName: node + linkType: hard + +"unicode-canonical-property-names-ecmascript@npm:^2.0.0": + version: 2.0.1 + resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.1" + checksum: 10/3c3dabdb1d22aef4904399f9e810d0b71c0b12b3815169d96fac97e56d5642840c6071cf709adcace2252bc6bb80242396c2ec74b37224eb015c5f7aca40bad7 + languageName: node + linkType: hard + +"unicode-emoji-modifier-base@npm:^1.0.0": + version: 1.0.0 + resolution: "unicode-emoji-modifier-base@npm:1.0.0" + checksum: 10/6e1521d35fa69493207eb8b41f8edb95985d8b3faf07c01d820a1830b5e8403e20002563e2f84683e8e962a49beccae789f0879356bf92a4ec7a4dd8e2d16fdb + languageName: node + linkType: hard + +"unicode-match-property-ecmascript@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-match-property-ecmascript@npm:2.0.0" + dependencies: + unicode-canonical-property-names-ecmascript: "npm:^2.0.0" + unicode-property-aliases-ecmascript: "npm:^2.0.0" + checksum: 10/1f34a7434a23df4885b5890ac36c5b2161a809887000be560f56ad4b11126d433c0c1c39baf1016bdabed4ec54829a6190ee37aa24919aa116dc1a5a8a62965a + languageName: node + linkType: hard + +"unicode-match-property-value-ecmascript@npm:^2.1.0": + version: 2.2.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.2.0" + checksum: 10/9fd53c657aefe5d3cb8208931b4c34fbdb30bb5aa9a6c6bf744e2f3036f00b8889eeaf30cb55a873b76b6ee8b5801ea770e1c49b3352141309f58f0ebb3011d8 + languageName: node + linkType: hard + +"unicode-property-aliases-ecmascript@npm:^2.0.0": + version: 2.1.0 + resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" + checksum: 10/243524431893649b62cc674d877bd64ef292d6071dd2fd01ab4d5ad26efbc104ffcd064f93f8a06b7e4ec54c172bf03f6417921a0d8c3a9994161fe1f88f815b + languageName: node + linkType: hard + +"unified@npm:^11.0.0, unified@npm:^11.0.3, unified@npm:^11.0.4": + version: 11.0.5 + resolution: "unified@npm:11.0.5" + dependencies: + "@types/unist": "npm:^3.0.0" + bail: "npm:^2.0.0" + devlop: "npm:^1.0.0" + extend: "npm:^3.0.0" + is-plain-obj: "npm:^4.0.0" + trough: "npm:^2.0.0" + vfile: "npm:^6.0.0" + checksum: 10/d9e6e88900a075f391b6bbf06f34062d41fa6257798110d1647753cfc2c6a6e2c1d016434e8ee35706c50485f9fb9ae4707a6a4790bd8dc461ec7e7315ed908b + languageName: node + linkType: hard + +"unique-filename@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-filename@npm:4.0.0" + dependencies: + unique-slug: "npm:^5.0.0" + checksum: 10/6a62094fcac286b9ec39edbd1f8f64ff92383baa430af303dfed1ffda5e47a08a6b316408554abfddd9730c78b6106bef4ca4d02c1231a735ddd56ced77573df + languageName: node + linkType: hard + +"unique-slug@npm:^5.0.0": + version: 5.0.0 + resolution: "unique-slug@npm:5.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/beafdf3d6f44990e0a5ce560f8f881b4ee811be70b6ba0db25298c31c8cf525ed963572b48cd03be1c1349084f9e339be4241666d7cf1ebdad20598d3c652b27 + languageName: node + linkType: hard + +"unique-string@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-string@npm:3.0.0" + dependencies: + crypto-random-string: "npm:^4.0.0" + checksum: 10/1a1e2e7d02eab1bb10f720475da735e1990c8a5ff34edd1a3b6bc31590cb4210b7a1233d779360cc622ce11c211e43afa1628dd658f35d3e6a89964b622940df + languageName: node + linkType: hard + +"unist-util-is@npm:^6.0.0": + version: 6.0.0 + resolution: "unist-util-is@npm:6.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/edd6a93fb2255addf4b9eeb304c1da63c62179aef793169dd64ab955cf2f6814885fe25f95f8105893e3562dead348af535718d7a84333826e0491c04bf42511 + languageName: node + linkType: hard + +"unist-util-position-from-estree@npm:^2.0.0": + version: 2.0.0 + resolution: "unist-util-position-from-estree@npm:2.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/d3b3048a5727c2367f64ef6dcc5b20c4717215ef8b1372ff9a7c426297c5d1e5776409938acd01531213e2cd2543218d16e73f9f862f318e9496e2c73bb18354 + languageName: node + linkType: hard + +"unist-util-position@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-position@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/89d4da00e74618d7562ac7ac288961df9bcd4ccca6df3b5a90650f018eceb6b95de6e771e88bdbef46cc9d96861d456abe57b7ad1108921e0feb67c6292aa29d + languageName: node + linkType: hard + +"unist-util-stringify-position@npm:^4.0.0": + version: 4.0.0 + resolution: "unist-util-stringify-position@npm:4.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/d15c88aca7a31902d95d5b5355bbe09583cf6f6ff6e59e134ef76c76d3c30bc1021f2d7ea5b7897c6d0858ed5f3770c1b19de9c78274f50d72f95a0d05f1af71 + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^6.0.0": + version: 6.0.1 + resolution: "unist-util-visit-parents@npm:6.0.1" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10/645b3cbc5e923bc692b1eb1a9ca17bffc5aabc25e6090ff3f1489bff8effd1890b28f7a09dc853cb6a7fa0da8581bfebc9b670a68b53c4c086cb9610dfd37701 + languageName: node + linkType: hard + +"unist-util-visit@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-visit@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10/f2bbde23641e9ade7640358c06ddeec0f38342322eb8e7819d9ee380b0f859d25d084dde22bf63db0280b3b2f36575f15aa1d6c23acf276c91c2493cf799e3b0 + languageName: node + linkType: hard + +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + languageName: node + linkType: hard + +"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": + version: 1.0.0 + resolution: "unpipe@npm:1.0.0" + checksum: 10/4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.1.3": + version: 1.1.3 + resolution: "update-browserslist-db@npm:1.1.3" + dependencies: + escalade: "npm:^3.2.0" + picocolors: "npm:^1.1.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/87af2776054ffb9194cf95e0201547d041f72ee44ce54b144da110e65ea7ca01379367407ba21de5c9edd52c74d95395366790de67f3eb4cc4afa0fe4424e76f + languageName: node + linkType: hard + +"update-notifier@npm:^6.0.2": + version: 6.0.2 + resolution: "update-notifier@npm:6.0.2" + dependencies: + boxen: "npm:^7.0.0" + chalk: "npm:^5.0.1" + configstore: "npm:^6.0.0" + has-yarn: "npm:^3.0.0" + import-lazy: "npm:^4.0.0" + is-ci: "npm:^3.0.1" + is-installed-globally: "npm:^0.4.0" + is-npm: "npm:^6.0.0" + is-yarn-global: "npm:^0.4.0" + latest-version: "npm:^7.0.0" + pupa: "npm:^3.1.0" + semver: "npm:^7.3.7" + semver-diff: "npm:^4.0.0" + xdg-basedir: "npm:^5.1.0" + checksum: 10/8e8f2092c9acbfd32be77558ce2aef25bc47c9ead347845bc8cd1984eb57e458d223bceee2bb58c60cfaef5f81eb026c5609c9c26ade042aadfe6904bd5d8c2e + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + +"url-loader@npm:^4.1.1": + version: 4.1.1 + resolution: "url-loader@npm:4.1.1" + dependencies: + loader-utils: "npm:^2.0.0" + mime-types: "npm:^2.1.27" + schema-utils: "npm:^3.0.0" + peerDependencies: + file-loader: "*" + webpack: ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + file-loader: + optional: true + checksum: 10/f7e7258156f607bdd74469d22868a3522177bd895bb0eb1919363e32116ad7ed0c666b076d32dd700f1681c53d2edf046382bd9f6d9e77a19d4dd8ea36511da2 + languageName: node + linkType: hard + +"use-sync-external-store@npm:^1.4.0": + version: 1.4.0 + resolution: "use-sync-external-store@npm:1.4.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10/08bf581a8a2effaefc355e9d18ed025d436230f4cc973db2f593166df357cf63e47b9097b6e5089b594758bde322e1737754ad64905e030d70f8ff7ee671fd01 + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"utila@npm:~0.4": + version: 0.4.0 + resolution: "utila@npm:0.4.0" + checksum: 10/b068d8cb140588da0d0c80ee3c14c6b75d3f68760d8a1c6c3908d0270e9e4056454ff16189586481b7382926c44674f6929d08e06eaf9ec8f62736cd900169c5 + languageName: node + linkType: hard + +"utility-types@npm:^3.10.0": + version: 3.11.0 + resolution: "utility-types@npm:3.11.0" + checksum: 10/a3c51463fc807ed04ccc8b5d0fa6e31f3dcd7a4cbd30ab4bc6d760ce5319dd493d95bf04244693daf316f97e9ab2a37741edfed8748ad38572a595398ad0fdaf + languageName: node + linkType: hard + +"utils-merge@npm:1.0.1": + version: 1.0.1 + resolution: "utils-merge@npm:1.0.1" + checksum: 10/5d6949693d58cb2e636a84f3ee1c6e7b2f9c16cb1d42d0ecb386d8c025c69e327205aa1c69e2868cc06a01e5e20681fbba55a4e0ed0cce913d60334024eae798 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + +"value-equal@npm:^1.0.1": + version: 1.0.1 + resolution: "value-equal@npm:1.0.1" + checksum: 10/bb7ae1facc76b5cf8071aeb6c13d284d023fdb370478d10a5d64508e0e6e53bb459c4bbe34258df29d82e6f561f874f0105eba38de0e61fe9edd0bdce07a77a2 + languageName: node + linkType: hard + +"vary@npm:~1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: 10/31389debef15a480849b8331b220782230b9815a8e0dbb7b9a8369559aed2e9a7800cd904d4371ea74f4c3527db456dc8e7ac5befce5f0d289014dbdf47b2242 + languageName: node + linkType: hard + +"vfile-location@npm:^5.0.0": + version: 5.0.3 + resolution: "vfile-location@npm:5.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile: "npm:^6.0.0" + checksum: 10/f481d592fd507fe242da9a00d7400ded3c91587931f24e64c54f24752d7b30321721a1c99c0d949be1f6ed5fa7f8b169054fd07c744705b65dbdd10a9e4ebfe0 + languageName: node + linkType: hard + +"vfile-message@npm:^4.0.0": + version: 4.0.2 + resolution: "vfile-message@npm:4.0.2" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-stringify-position: "npm:^4.0.0" + checksum: 10/1a5a72bf4945a7103750a3001bd979088ce42f6a01efa8590e68b2425e1afc61ddc5c76f2d3c4a7053b40332b24c09982b68743223e99281158fe727135719fc + languageName: node + linkType: hard + +"vfile@npm:^6.0.0, vfile@npm:^6.0.1": + version: 6.0.3 + resolution: "vfile@npm:6.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/a5a85293c9eb8787aa42e180edaef00c13199a493d6ed82fecf13ab29a68526850788e22434d77808ea6b17a74e03ff899b9b4711df5b9eee75afcddd7c2e1fb + languageName: node + linkType: hard + +"vite@npm:7.0.0": + version: 7.0.0 + resolution: "vite@npm:7.0.0" + dependencies: + esbuild: "npm:^0.25.0" + fdir: "npm:^6.4.6" + fsevents: "npm:~2.3.3" + picomatch: "npm:^4.0.2" + postcss: "npm:^8.5.6" + rollup: "npm:^4.40.0" + tinyglobby: "npm:^0.2.14" + peerDependencies: + "@types/node": ^20.19.0 || >=22.12.0 + jiti: ">=1.21.0" + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: ">=0.54.8" + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + bin: + vite: bin/vite.js + checksum: 10/2501b706dc481529efb16c6241794a66d68ea7a074d49f22e45b701769fbeeccc721c58272c9fce743d3b1472a3de497f85ca18cb059b1b8b906b2b295e524dc + languageName: node + linkType: hard + +"vscode-languageserver-types@npm:^3.17.1": + version: 3.17.5 + resolution: "vscode-languageserver-types@npm:3.17.5" + checksum: 10/900d0b81df5bef8d90933e75be089142f6989cc70fdb2d5a3a5f11fa20feb396aaea23ccffc8fbcc83a2f0e1b13c6ee48ff8151f236cbd6e61a4f856efac1a58 + languageName: node + linkType: hard + +"watchpack@npm:^2.4.1": + version: 2.4.2 + resolution: "watchpack@npm:2.4.2" + dependencies: + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.1.2" + checksum: 10/6bd4c051d9af189a6c781c3158dcb3069f432a0c144159eeb0a44117412105c61b2b683a5c9eebc4324625e0e9b76536387d0ba354594fa6cbbdf1ef60bee4c3 + languageName: node + linkType: hard + +"wbuf@npm:^1.1.0, wbuf@npm:^1.7.3": + version: 1.7.3 + resolution: "wbuf@npm:1.7.3" + dependencies: + minimalistic-assert: "npm:^1.0.0" + checksum: 10/c18b51c4e1fb19705c94b93c0cf093ba014606abceee949399d56074ef1863bf4897a8d884be24e8d224d18c9ce411cf6924006d0a5430492729af51256e067a + languageName: node + linkType: hard + +"web-namespaces@npm:^2.0.0": + version: 2.0.1 + resolution: "web-namespaces@npm:2.0.1" + checksum: 10/b6d9f02f1a43d0ef0848a812d89c83801d5bbad57d8bb61f02eb6d7eb794c3736f6cc2e1191664bb26136594c8218ac609f4069722c6f56d9fc2d808fa9271c6 + languageName: node + linkType: hard + +"webpack-bundle-analyzer@npm:^4.10.2": + version: 4.10.2 + resolution: "webpack-bundle-analyzer@npm:4.10.2" + dependencies: + "@discoveryjs/json-ext": "npm:0.5.7" + acorn: "npm:^8.0.4" + acorn-walk: "npm:^8.0.0" + commander: "npm:^7.2.0" + debounce: "npm:^1.2.1" + escape-string-regexp: "npm:^4.0.0" + gzip-size: "npm:^6.0.0" + html-escaper: "npm:^2.0.2" + opener: "npm:^1.5.2" + picocolors: "npm:^1.0.0" + sirv: "npm:^2.0.3" + ws: "npm:^7.3.1" + bin: + webpack-bundle-analyzer: lib/bin/analyzer.js + checksum: 10/cb7ff9d01dc04ef23634f439ab9fe739e022cce5595cb340e01d106ed474605ce4ef50b11b47e444507d341b16650dcb3610e88944020ca6c1c38e88072d43ba + languageName: node + linkType: hard + +"webpack-dev-middleware@npm:^5.3.4": + version: 5.3.4 + resolution: "webpack-dev-middleware@npm:5.3.4" + dependencies: + colorette: "npm:^2.0.10" + memfs: "npm:^3.4.3" + mime-types: "npm:^2.1.31" + range-parser: "npm:^1.2.1" + schema-utils: "npm:^4.0.0" + peerDependencies: + webpack: ^4.0.0 || ^5.0.0 + checksum: 10/3004374130f31c2910da39b80e24296009653bb11caa0b8449d962b67e003d7e73d01fbcfda9be1f1f04179f66a9c39f4caf7963df54303b430e39ba5a94f7c2 + languageName: node + linkType: hard + +"webpack-dev-server@npm:^4.15.2": + version: 4.15.2 + resolution: "webpack-dev-server@npm:4.15.2" + dependencies: + "@types/bonjour": "npm:^3.5.9" + "@types/connect-history-api-fallback": "npm:^1.3.5" + "@types/express": "npm:^4.17.13" + "@types/serve-index": "npm:^1.9.1" + "@types/serve-static": "npm:^1.13.10" + "@types/sockjs": "npm:^0.3.33" + "@types/ws": "npm:^8.5.5" + ansi-html-community: "npm:^0.0.8" + bonjour-service: "npm:^1.0.11" + chokidar: "npm:^3.5.3" + colorette: "npm:^2.0.10" + compression: "npm:^1.7.4" + connect-history-api-fallback: "npm:^2.0.0" + default-gateway: "npm:^6.0.3" + express: "npm:^4.17.3" + graceful-fs: "npm:^4.2.6" + html-entities: "npm:^2.3.2" + http-proxy-middleware: "npm:^2.0.3" + ipaddr.js: "npm:^2.0.1" + launch-editor: "npm:^2.6.0" + open: "npm:^8.0.9" + p-retry: "npm:^4.5.0" + rimraf: "npm:^3.0.2" + schema-utils: "npm:^4.0.0" + selfsigned: "npm:^2.1.1" + serve-index: "npm:^1.9.1" + sockjs: "npm:^0.3.24" + spdy: "npm:^4.0.2" + webpack-dev-middleware: "npm:^5.3.4" + ws: "npm:^8.13.0" + peerDependencies: + webpack: ^4.37.0 || ^5.0.0 + peerDependenciesMeta: + webpack: + optional: true + webpack-cli: + optional: true + bin: + webpack-dev-server: bin/webpack-dev-server.js + checksum: 10/86ca4fb49d2a264243b2284c6027a9a91fd7d47737bbb4096e873be8a3f8493a9577b1535d7cc84de1ee991da7da97686c85788ccac547b0f5cf5c7686aacee9 + languageName: node + linkType: hard + +"webpack-merge@npm:^5.9.0": + version: 5.10.0 + resolution: "webpack-merge@npm:5.10.0" + dependencies: + clone-deep: "npm:^4.0.1" + flat: "npm:^5.0.2" + wildcard: "npm:^2.0.0" + checksum: 10/fa46ab200f17d06c7cb49fc37ad91f15769753953c9724adac1061fa305a2a223cb37c3ed25a5f501580c91f11a0800990fe3814c70a77bf1aa5b3fca45a2ac6 + languageName: node + linkType: hard + +"webpack-merge@npm:^6.0.1": + version: 6.0.1 + resolution: "webpack-merge@npm:6.0.1" + dependencies: + clone-deep: "npm:^4.0.1" + flat: "npm:^5.0.2" + wildcard: "npm:^2.0.1" + checksum: 10/39ab911c26237922295d9b3d0617c8ea0c438c35a3b21b05506616a10423f5ece1962bccbedec932c5db61af57999b6d055d56d1f1755c63e2701bd4a55c3887 + languageName: node + linkType: hard + +"webpack-sources@npm:^3.2.3": + version: 3.2.3 + resolution: "webpack-sources@npm:3.2.3" + checksum: 10/a661f41795d678b7526ae8a88cd1b3d8ce71a7d19b6503da8149b2e667fc7a12f9b899041c1665d39e38245ed3a59ab68de648ea31040c3829aa695a5a45211d + languageName: node + linkType: hard + +"webpack@npm:^5.88.1, webpack@npm:^5.95.0": + version: 5.98.0 + resolution: "webpack@npm:5.98.0" + dependencies: + "@types/eslint-scope": "npm:^3.7.7" + "@types/estree": "npm:^1.0.6" + "@webassemblyjs/ast": "npm:^1.14.1" + "@webassemblyjs/wasm-edit": "npm:^1.14.1" + "@webassemblyjs/wasm-parser": "npm:^1.14.1" + acorn: "npm:^8.14.0" + browserslist: "npm:^4.24.0" + chrome-trace-event: "npm:^1.0.2" + enhanced-resolve: "npm:^5.17.1" + es-module-lexer: "npm:^1.2.1" + eslint-scope: "npm:5.1.1" + events: "npm:^3.2.0" + glob-to-regexp: "npm:^0.4.1" + graceful-fs: "npm:^4.2.11" + json-parse-even-better-errors: "npm:^2.3.1" + loader-runner: "npm:^4.2.0" + mime-types: "npm:^2.1.27" + neo-async: "npm:^2.6.2" + schema-utils: "npm:^4.3.0" + tapable: "npm:^2.1.1" + terser-webpack-plugin: "npm:^5.3.11" + watchpack: "npm:^2.4.1" + webpack-sources: "npm:^3.2.3" + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 10/eb16a58b3eb02bfb538c7716e28d7f601a03922e975c74007b41ba5926071ae70302d9acae9800fbd7ddd0c66a675b1069fc6ebb88123b87895a52882e2dc06a + languageName: node + linkType: hard + +"webpackbar@npm:^6.0.1": + version: 6.0.1 + resolution: "webpackbar@npm:6.0.1" + dependencies: + ansi-escapes: "npm:^4.3.2" + chalk: "npm:^4.1.2" + consola: "npm:^3.2.3" + figures: "npm:^3.2.0" + markdown-table: "npm:^2.0.0" + pretty-time: "npm:^1.1.0" + std-env: "npm:^3.7.0" + wrap-ansi: "npm:^7.0.0" + peerDependencies: + webpack: 3 || 4 || 5 + checksum: 10/9da47f8dcbc9173b19e41e3e1049fa451b0c02095ffa003e8c09c56aa2cc544334d1c6fff0797162a807b29090db9cf9a269cd5ec453196142543f9275cbbf70 + languageName: node + linkType: hard + +"websocket-driver@npm:>=0.5.1, websocket-driver@npm:^0.7.4": + version: 0.7.4 + resolution: "websocket-driver@npm:0.7.4" + dependencies: + http-parser-js: "npm:>=0.5.1" + safe-buffer: "npm:>=5.1.0" + websocket-extensions: "npm:>=0.1.1" + checksum: 10/17197d265d5812b96c728e70fd6fe7d067471e121669768fe0c7100c939d997ddfc807d371a728556e24fc7238aa9d58e630ea4ff5fd4cfbb40f3d0a240ef32d + languageName: node + linkType: hard + +"websocket-extensions@npm:>=0.1.1": + version: 0.1.4 + resolution: "websocket-extensions@npm:0.1.4" + checksum: 10/b5399b487d277c78cdd2aef63764b67764aa9899431e3a2fa272c6ad7236a0fb4549b411d89afa76d5afd664c39d62fc19118582dc937e5bb17deb694f42a0d1 + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + +"which@npm:^5.0.0": + version: 5.0.0 + resolution: "which@npm:5.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/6ec99e89ba32c7e748b8a3144e64bfc74aa63e2b2eacbb61a0060ad0b961eb1a632b08fb1de067ed59b002cec3e21de18299216ebf2325ef0f78e0f121e14e90 + languageName: node + linkType: hard + +"widest-line@npm:^4.0.1": + version: 4.0.1 + resolution: "widest-line@npm:4.0.1" + dependencies: + string-width: "npm:^5.0.1" + checksum: 10/64c48cf27171221be5f86fc54b94dd29879165bdff1a7aa92dde723d9a8c99fb108312768a5d62c8c2b80b701fa27bbd36a1ddc58367585cd45c0db7920a0cba + languageName: node + linkType: hard + +"wildcard@npm:^2.0.0, wildcard@npm:^2.0.1": + version: 2.0.1 + resolution: "wildcard@npm:2.0.1" + checksum: 10/e0c60a12a219e4b12065d1199802d81c27b841ed6ad6d9d28240980c73ceec6f856771d575af367cbec2982d9ae7838759168b551776577f155044f5a5ba843c + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.0.1, wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^3.0.3": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + +"ws@npm:^7.3.1": + version: 7.5.10 + resolution: "ws@npm:7.5.10" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10/9c796b84ba80ffc2c2adcdfc9c8e9a219ba99caa435c9a8d45f9ac593bba325563b3f83edc5eb067cc6d21b9a6bf2c930adf76dd40af5f58a5ca6859e81858f0 + languageName: node + linkType: hard + +"ws@npm:^8.13.0": + version: 8.18.1 + resolution: "ws@npm:8.18.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10/3f38e9594f2af5b6324138e86b74df7d77bbb8e310bf8188679dd80bac0d1f47e51536a1923ac3365f31f3d8b25ea0b03e4ade466aa8292a86cd5defca64b19b + languageName: node + linkType: hard + +"xdg-basedir@npm:^5.0.1, xdg-basedir@npm:^5.1.0": + version: 5.1.0 + resolution: "xdg-basedir@npm:5.1.0" + checksum: 10/b60e8a2c663ccb1dac77c2d913f3b96de48dafbfa083657171d3d50e10820b8a04bb4edfe9f00808c8c20e5f5355e1927bea9029f03136e29265cb98291e1fea + languageName: node + linkType: hard + +"xml-js@npm:^1.6.11": + version: 1.6.11 + resolution: "xml-js@npm:1.6.11" + dependencies: + sax: "npm:^1.2.4" + bin: + xml-js: ./bin/cli.js + checksum: 10/55ce342a47bf14a138a3fcea0c9e325b81484cfc1a8aac78df13b4d6ca01f20e32820572bc3e927cd9b61b9da9cdee4657cb2f304e460343d8d85d6a3659d749 + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10/1884d272d485845ad04759a255c71775db0fac56308764b4c77ea56a20d56679fad340213054c8c9c9c26fcfd4c4b2a90df993b7e0aaf3cdb73c618d1d1a802a + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + +"yocto-queue@npm:^1.0.0": + version: 1.2.0 + resolution: "yocto-queue@npm:1.2.0" + checksum: 10/6154113e60285f75c9d59c65056ea3842d3d5c999a4c692568155dcc5b9c038850374eae1f04507090eeee8129b8110d9c7259d1aa9fe323957fd46892b655fc + languageName: node + linkType: hard + +"zwitch@npm:^2.0.0": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: 10/f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 + languageName: node + linkType: hard diff --git a/yarn.lock b/yarn.lock index 42c327c8433d..86ebbd22e90e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,6954 +1,9325 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.1.0", "@ampproject/remapping@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@angular/compiler@12.2.16": - version "12.2.16" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-12.2.16.tgz#1aa9b3fbd3fe900118ab371d30c090fbc137a15f" - integrity sha512-nsYEw+yu8QyeqPf9nAmG419i1mtGM4v8+U+S3eQHQFXTgJzLymMykWHYu2ETdjUpNSLK6xcIQDBWtWnWSfJjAA== - dependencies: - tslib "^2.2.0" - -"@babel/code-frame@7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/code-frame@7.18.6", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" - integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== - -"@babel/core@7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" - integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.3" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.3" - "@babel/types" "^7.21.3" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" - integrity sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.7" - "@babel/helpers" "^7.20.7" - "@babel/parser" "^7.20.7" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.20.7", "@babel/generator@^7.7.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" - integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw== - dependencies: - "@babel/types" "^7.20.7" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/generator@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" - integrity sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA== - dependencies: - "@babel/types" "^7.21.3" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.7.tgz#d0e1f8d7e4ed5dac0389364d9c0c191d948ade6f" - integrity sha512-LtoWbDXOaidEf50hmdDqn9g8VEzsorMexoWMQdQODbvmqYmaF23pBP5VNPAGIFHsFQCIeKokDiz3CH5Y2jlY6w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz#5ea79b59962a09ec2acf20a963a01ab4d076ccca" - integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.2.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz#a6f26e919582275a93c3aa6594756d71b0bb7f05" - integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw== - dependencies: - "@babel/types" "^7.20.7" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.7.tgz#7a6c9a1155bef55e914af574153069c9d9470c43" - integrity sha512-FNdu7r67fqMUSVuQpFQGE6BPdhJIhitoxhGzDbAXNcA07uoVG37fOiMk3OSV8rEICuyG6t8LGkd9EE64qIEoIA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-module-transforms@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" - integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.2" - "@babel/types" "^7.21.2" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" - integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helpers@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" - integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" - -"@babel/highlight@^7.0.0", "@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@7.21.3", "@babel/parser@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" - integrity sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ== - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" - integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz#92592e9029b13b15be0f7ce6a7aedc2879ca45a7" - integrity sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz#49f2b372519ab31728cc14115bb0998b15bfda55" - integrity sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz#309c7668f2263f1c711aa399b5a9a6291eef6135" - integrity sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" - integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.20.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.9.tgz#2034307073e243fd476dddb5472ec35d13802853" - integrity sha512-hwZN0kr16UkIF/kR9F9x8gd1kTkQl1vyAF2lkUmlTuCtTKOGLE5blQctuxEeKXwz0dkArQ9RYL8+HLb/75KGMA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz#f438216f094f6bb31dc266ebfab8ff05aecad073" - integrity sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" - -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz#8bda578f71620c7de7c93af590154ba331415454" - integrity sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== - dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.7.tgz#1e5cfeb4e5f9b392e86f85698896336b442f8760" - integrity sha512-+1IVLD+dHOzRZWNFFSoyPZz4ffsVmOP+OhhjeahLKpU97v/52LcCb9RabRl5eHM1/HAuH5Dl0q9Pyzrq1v2otQ== - dependencies: - "@babel/helper-module-transforms" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.7.tgz#abb5f84695e74d46acf48244082f6cbf8bb23120" - integrity sha512-76jqqFiFdCD+RJwEdtBHUG2/rEKQAmpejPbAKyQECEE3/y4U5CMPc9IXvipS990vgQhzq+ZRw6WJ+q4xJ/P24w== - dependencies: - "@babel/helper-module-transforms" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" - -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz#59e2a84064b5736a4471b1aa7b13d4431d327e0d" - integrity sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ== - dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/helper-validator-identifier" "^7.19.1" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz#0ee349e9d1bc96e78e3b37a7af423a4078a7083f" - integrity sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-env@7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/runtime@^7.8.4": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" - integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2": - version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.10.tgz#2bf98239597fcec12f842756f186a9dde6d09230" - integrity sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.3.tgz#4747c5e7903d224be71f90788b06798331896f67" - integrity sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.21.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.3" - "@babel/types" "^7.21.3" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@7.20.7", "@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" - integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" - integrity sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@cspell/cspell-bundled-dicts@^5.21.2": - version "5.21.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.21.2.tgz#2254c392e2a617b5ffe591a438840028fe8dc4b8" - integrity sha512-Y5TU6wV/H+RV1VOB32MowiKofBsEZId4x4ReWCyw4KUtJegeljajCfhHwiQaZuvA69E13cJnOMDwi9qozj4kjw== - dependencies: - "@cspell/dict-ada" "^2.0.0" - "@cspell/dict-aws" "^2.0.0" - "@cspell/dict-bash" "^2.0.2" - "@cspell/dict-companies" "^2.0.4" - "@cspell/dict-cpp" "^3.1.0" - "@cspell/dict-cryptocurrencies" "^2.0.0" - "@cspell/dict-csharp" "^3.0.1" - "@cspell/dict-css" "^2.0.0" - "@cspell/dict-dart" "^1.1.0" - "@cspell/dict-django" "^2.0.0" - "@cspell/dict-dotnet" "^2.0.1" - "@cspell/dict-elixir" "^2.0.1" - "@cspell/dict-en-gb" "^1.1.33" - "@cspell/dict-en_us" "^2.2.5" - "@cspell/dict-filetypes" "^2.0.1" - "@cspell/dict-fonts" "^2.0.0" - "@cspell/dict-fullstack" "^2.0.5" - "@cspell/dict-git" "^1.0.1" - "@cspell/dict-golang" "^3.0.1" - "@cspell/dict-haskell" "^2.0.0" - "@cspell/dict-html" "^3.0.1" - "@cspell/dict-html-symbol-entities" "^3.0.0" - "@cspell/dict-java" "^2.0.0" - "@cspell/dict-latex" "^2.0.3" - "@cspell/dict-lorem-ipsum" "^2.0.0" - "@cspell/dict-lua" "^2.0.0" - "@cspell/dict-node" "^2.0.1" - "@cspell/dict-npm" "^2.0.3" - "@cspell/dict-php" "^2.0.0" - "@cspell/dict-powershell" "^2.0.0" - "@cspell/dict-public-licenses" "^1.0.4" - "@cspell/dict-python" "^3.0.5" - "@cspell/dict-r" "^1.0.2" - "@cspell/dict-ruby" "^2.0.1" - "@cspell/dict-rust" "^2.0.0" - "@cspell/dict-scala" "^2.0.0" - "@cspell/dict-software-terms" "^2.1.7" - "@cspell/dict-swift" "^1.0.2" - "@cspell/dict-typescript" "^2.0.0" - "@cspell/dict-vue" "^2.0.2" - -"@cspell/cspell-pipe@^5.19.7", "@cspell/cspell-pipe@^5.21.2": - version "5.21.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-pipe/-/cspell-pipe-5.21.2.tgz#7adfbc66426ee28549fd72a39deec7b98a76b320" - integrity sha512-MN1SXeqqurWYNknbUMPHRFyTvURbO53/1Aw3zEoCeVUSiGbD5rrb1N+t0YDbOphWrkkrJAZk82/2ZBJ2USE/vg== - -"@cspell/cspell-types@^5.21.2": - version "5.21.2" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.21.2.tgz#899b4c41b59ca6e0b81c12f1973fda63535e6f3e" - integrity sha512-g2h4qNR6C53IcSM3KR0DZ9gsqp+2FyKD371htJOmSJGmWb4s45QY0hsPr12A2J8/bT+E3uMtHn9KxJeQ7t0SzA== - -"@cspell/dict-ada@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-ada/-/dict-ada-2.0.1.tgz#662e1f459531298e7c3f1ff7e63fd36c2b311d5b" - integrity sha512-vopTJ1oHrrFYV5GU55Sr+AzItR78Uj5YbCaspYABmYKlq4NRrcUAUsr4bWgymDcspMIHO7e7IFcj48OKs1fndA== - -"@cspell/dict-aws@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-2.0.0.tgz#9af72af4e59e96029dd4335271d87784843cb7dd" - integrity sha512-NKz7pDZ7pwj/b33i3f4WLpC1rOOUMmENwYgftxU+giU2YBeKM2wZbMTSEIzsrel56r0UlQYmdIVlP/B4nnVaoQ== - -"@cspell/dict-bash@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-2.0.4.tgz#93f0ff159d96b8823fed9282f803e4f3447af33d" - integrity sha512-uK/ehmp5LYrmRH2Gv3nbvdPswpkybJUn34WYKLpeuYHQktmi+pOI1A9uPdBPnSbMDffSvwQlQohIyKawz+X8Ag== - -"@cspell/dict-companies@^2.0.4": - version "2.0.14" - resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-2.0.14.tgz#2b31941107e3aa41d3d122d40c3f3daae9eaa7f2" - integrity sha512-Sq1X29Z05OZ/UNqTwVhf3/WaqvJQy4/S6gS8qYI5AQRX45gVe8CPhNBLmZOTC6z8m716bfQCxa5rRT9YNSdTZg== - -"@cspell/dict-cpp@^3.1.0": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-3.2.1.tgz#2c8c232c53c22c69b73802a26480203e1d9b6fbf" - integrity sha512-XcmzrKIghqFfrYLLaHtWKOp9rupiuGdc5ODONk+emsq0W5CIc3Abn27IQHwUzxzF+Cm5IfKAIJ5Kpe6hkzm0HQ== - -"@cspell/dict-cryptocurrencies@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-2.0.0.tgz#a74eecb42a46a96d08b6613fdb5c554529d3afff" - integrity sha512-nREysmmfOp7L2YCRAUufQahwD5/Punzb5AZ6eyg4zUamdRWHgBFphb5/9h2flt1vgdUfhc6hZcML21Ci7iXjaA== - -"@cspell/dict-csharp@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-csharp/-/dict-csharp-3.0.1.tgz#94a673e02bb7cc03c25bc699bc1b5bd786c2c5fd" - integrity sha512-xkfQu03F388w4sdVQSSjrVMkxAxpTYB2yW7nw0XYtTjl3L/jBgvTr/j1BTjdFbQhdNf10Lg0Ak1kXOjmHodVqA== - -"@cspell/dict-css@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-css/-/dict-css-2.1.0.tgz#799708a8e59cb58077b21b1f37aacdc75c240efb" - integrity sha512-glASAELcGhh4Ru0rTQ4G9mTQxSyPwsZOON/5BYflB6Kks8YC8nUvKrtMCoo5W7CPKPfSEa8zUNctFQ1+IUYDHA== - -"@cspell/dict-dart@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-dart/-/dict-dart-1.1.1.tgz#d4da9cf72e5df369b6d9ebe588f9c1474adf3556" - integrity sha512-XBOCpezXrgFN18kGEwqMpTUGZdw4BjCoJrNOo6qBdcdZySCrEHLwELraLOkcSba2kM4stmTp0t59FkwtP8TKOA== - -"@cspell/dict-django@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-django/-/dict-django-2.0.0.tgz#a5f5f693a686e5873f9dfb547ee3b3142ef760b1" - integrity sha512-GkJdJv6cmzrKcmq2/oxTXjKF5uv71r4eTqnFmgPbNBW1t+G4VYpzOf0QrVQrhx2RC4DdW5XfcTf+iS0FxHOTmw== - -"@cspell/dict-dotnet@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-dotnet/-/dict-dotnet-2.0.1.tgz#8ef56df758b63f0a2ba4d8681a427a6861ed34d5" - integrity sha512-b1n4crJRW0WZVf9Gp/52j/tDtjYiZ3N81fIyfqPlBrjsh/5AivfA697DYwQ2mr8ngNX7RsqRtYNQjealA1rEnQ== - -"@cspell/dict-elixir@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-elixir/-/dict-elixir-2.0.1.tgz#1a9b422215b5edabb84568cfa5c0c70bc164a2ce" - integrity sha512-eTTTxZt1FqGkM780yFDxsGHvTbWqvlK8YISSccK8FyrB6ULW+uflQlNS5AnWg3uWKC48b7pQott+odYCsPJ+Ow== - -"@cspell/dict-en-gb@^1.1.33": - version "1.1.33" - resolved "https://registry.yarnpkg.com/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz#7f1fd90fc364a5cb77111b5438fc9fcf9cc6da0e" - integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== - -"@cspell/dict-en_us@^2.2.5": - version "2.3.3" - resolved "https://registry.yarnpkg.com/@cspell/dict-en_us/-/dict-en_us-2.3.3.tgz#4b20b5aa91151a4fb6f40425436b3b4c54ddaef4" - integrity sha512-csyKeaNktfpvMkmE2GOPTwsrQm3wWhLKVaDRaGU0qTcIjDiCvqv/iYgrVrKRkoddA3kdNTZ8YNCcix7lb6VkOg== - -"@cspell/dict-filetypes@^2.0.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-filetypes/-/dict-filetypes-2.1.1.tgz#f778ad814ff6d7050f81bbd7c856b6f555ba6bae" - integrity sha512-Oo0/mUbFHzsaATqRLdkV1RMoYns3aGzeKFIpVJg415GYtJ8EABXtEArYTXeMwlboyGTPvEk+PR2hBSTSfQTqmg== - -"@cspell/dict-fonts@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-fonts/-/dict-fonts-2.1.0.tgz#89b32b41bc66a38b6fbf9c970540e2f7ebd6e8b1" - integrity sha512-hk7xsbfWEUhc136Xj7I2TD7ouKAfWwzCVAQaHBxcVXAsVxu7bDOGj4FvE2jBzlkSUY8A9Ww8qS0GOFvowJshVg== - -"@cspell/dict-fullstack@^2.0.5": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-2.0.6.tgz#0bec93306cba070ed6aa0b619d8080c86310ab5d" - integrity sha512-R2E2xvbHvvRwwurxfpBJDRIJjXBMfEPF5WNV3LTOEMRqkZtoYCeJK9aqc8LHlmJMtAbnN1cx//BCDIyTJ0rO0A== - -"@cspell/dict-git@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-git/-/dict-git-1.0.1.tgz#9de5ab2532abcdc8b10bd83ccb1f5e5dae0b6067" - integrity sha512-Rk+eTof/9inF11lvxmkCRK+gODatA3qai8kSASv6OG/JfPvpj7fTHErx/rdgPw/LOTDUafnoTjTYmj7B2MOQXg== - -"@cspell/dict-golang@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-golang/-/dict-golang-3.0.1.tgz#acde95eb340c4512d132586a8326b1b3d971c0f7" - integrity sha512-0KNfXTbxHW2l8iVjxeOf+KFv9Qrw3z5cyKnkuYJWlBTSB5KcUBfeKCb4fsds26VdANqiy6U91b4gDx5kNEmBjQ== - -"@cspell/dict-haskell@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-haskell/-/dict-haskell-2.0.1.tgz#941aa5eed0eb5e327e1a2b04dcad4f0e60f663c0" - integrity sha512-ooA23qIG7InOOxlLm67CNH5O2J85QsPHEAzEU9KEqVfYG5ovFs5tx6n9pHekDVk3MpQULpqfNUYDR0KigPLg5g== - -"@cspell/dict-html-symbol-entities@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-3.0.0.tgz#55d5d96c37ecbde00492c4238e229908eea9cedb" - integrity sha512-04K7cPTcbYXmHICfiob4gZA1yaj4hpfM+Nl5WIJ1EAZsSGHdqmGEF28GuCjyQ8ZeKiJAsPt/vXuLBbjxkHqZyQ== - -"@cspell/dict-html@^3.0.1": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@cspell/dict-html/-/dict-html-3.3.2.tgz#5b5fa6b2b8a1d51f8f735dc3fd5310ff287c29bf" - integrity sha512-cM5pQSEiqjrdk6cRFLrlLdWNT/J8399f/A6DjwjfYhHrGy0e/Rsjv76HZT0GlE1OqMoq9eG9jdQsfoYYgWTIpQ== - -"@cspell/dict-java@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-java/-/dict-java-2.0.0.tgz#76252cee8f04e099ac6dae0f45f22257088060a7" - integrity sha512-9f5LDATlAiXRGqxLxgqbOLlQxuMW2zcN7tBgxwtN+4u90vM03ZUOR/gKIuDV/y0ZuAiWBIjA73cjk8DJ13Q1eA== - -"@cspell/dict-latex@^2.0.3": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@cspell/dict-latex/-/dict-latex-2.0.9.tgz#ba376b2ae8c4b9fad14e8ed293df027a8b08348f" - integrity sha512-d1kTK6dJb5z6UcfASQWjqQlsjZvnoVOvMWxYtLpGksYf6gM4IgqoPVNMLYYK6xBS4T/uAnLIj975A6YuAeyZpg== - -"@cspell/dict-lorem-ipsum@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-2.0.1.tgz#694ffe36ea9cdb7bce35066a850f9d4e4811c5d9" - integrity sha512-s7Ft8UiloUJwgz4z8uLeFvCkeTcZ43HQl7mSAlZd76eW+keLSsdeGmLDx2zaciqo+MftPGyzygVCwaJjTGxiew== - -"@cspell/dict-lua@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-lua/-/dict-lua-2.0.0.tgz#b96d0363a28ac7e0483ad03edb21705c4f951459" - integrity sha512-7WUEBEspSKtsq104WdIys1+DLqAxpJPzw74Py1TuE3fI5GvlzeSZkRFP2ya54GB2lCO4C3mq4M8EnitpibVDfw== - -"@cspell/dict-node@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-node/-/dict-node-2.0.1.tgz#eda891ebdbce83f20829cb6c85cd209da8cf5cdd" - integrity sha512-ztBWzhvI+YaMehICSJ65cohhjQqoztxf9vrS3YckOiVGBFvUMaFVNdX9klQkvrLcS/O4+2PzoGeIEkmf99amLA== - -"@cspell/dict-npm@^2.0.3": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@cspell/dict-npm/-/dict-npm-2.0.5.tgz#d5b77025fcb46db843091e002409faffcfccade0" - integrity sha512-KuPL5fKaqyG9ACrrinNt84FhVdh23VRtxDLO8MtGUdStca9tjfjPdmP2YF/5VkEKmpKYkfFKVcBUk9RgVkx5bw== - -"@cspell/dict-php@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-php/-/dict-php-2.0.0.tgz#5d42f7df7c1da89fe19c2ccfe1bf61231d183990" - integrity sha512-29WgU77eTO985LvMHwPi1pcpfopfCWfTdffDyqya0JIfOSaFUrlYKzGPkE4mRxcz2G3hXsaM0SRvBNdIRwEdUg== - -"@cspell/dict-powershell@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-powershell/-/dict-powershell-2.0.0.tgz#6e8ae7381b1928dfaf8f5a625f8fae6e8d93f224" - integrity sha512-6uvEhLiGmG3u9TFkM1TYcky6aL9Yk7Sk3KJwoTYBaQJY2KqrprgyQtW6yxIw9oU52VRHlq3KKvSAA9Q26+SIkQ== - -"@cspell/dict-public-licenses@^1.0.4": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@cspell/dict-public-licenses/-/dict-public-licenses-1.0.6.tgz#e296be04dfa8db9596ea1874d26dfd0ec3d62e80" - integrity sha512-Z9IUFPkkOpOsEdgPUfQOJNQ+qU6+iBAZWS/CR5sUqTX+s5VkPNVwQyVC2kdmgmE2U5qwzAPewG6nVKr2MVogwg== - -"@cspell/dict-python@^3.0.5": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@cspell/dict-python/-/dict-python-3.0.6.tgz#884f398e053a5d500adc9de47d1f1049a7afcc9c" - integrity sha512-tzxJ4sd9ZGhAUKg/WJJpQGDNtoHvM8Wn+iS2+PnQj2/LTHBW4mnaCogsGsBtYu8C4b2+BEQs+tc5808AeEfLug== - -"@cspell/dict-r@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@cspell/dict-r/-/dict-r-1.0.3.tgz#1480016695ee119cf63fa8c71b161d033bbb9029" - integrity sha512-u2qeXd4cx/TvTVcmkvA+sK6f4K1uMAMO6QPMSr1pSvqGElPRP1mIBXmuiSuBzLO3LbsJuUEHw5Cp3/bxIB6rNA== - -"@cspell/dict-ruby@^2.0.1": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@cspell/dict-ruby/-/dict-ruby-2.0.2.tgz#a0e9737832047e146e113f72268e198defda4e71" - integrity sha512-vVnUpSmGDbPjs7MHq741DsLHhQcoA4CnUCM9wsTorQ9AQRDAkDTbK/LcY8nM19MoXCb3eF8PFku5Jq+gqH0u7w== - -"@cspell/dict-rust@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-rust/-/dict-rust-2.0.1.tgz#2923392a41784e76ee00b9456d581f86a83097fb" - integrity sha512-ATDpIh0VWpQdUIZa8zqqJY4wQz3q00BTXlQCodeOmObYSb23+L6KWWzJ8mKLgpbc1lqTkogWrqxiCxlrCmqNmg== - -"@cspell/dict-scala@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-scala/-/dict-scala-2.0.0.tgz#b8098103bb03a13406c1c79f1769052353aafac4" - integrity sha512-MUwA2YKpqaQOSR4V1/CVGRNk8Ii5kf6I8Ch+4/BhRZRQXuwWbi21rDRYWPqdQWps7VNzAbbMA+PQDWsD5YY38g== - -"@cspell/dict-software-terms@^2.1.7": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-software-terms/-/dict-software-terms-2.3.0.tgz#1953b6be012fe6bb6849ad51bafa04b3661e57bc" - integrity sha512-rl+quUw68IxjWgeX/QDMgQsImZ1DaKzFyYMSGrCNcNPp4b4SMLwHCKoJ97/uOnUnw0jaBxueXoqp2iyN/QiOVw== - -"@cspell/dict-swift@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@cspell/dict-swift/-/dict-swift-1.0.3.tgz#b819da0ca2c5dfecdd61bec55181636a06d23677" - integrity sha512-yOBLSaRD0AnkkkndJ8PuB82Evp6lA2xItf2AWsnPfCCgxp5Ojk6uUBC/WQBSkzkCAOGbXyHsu9D97tsOx2c6cw== - -"@cspell/dict-typescript@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-2.0.2.tgz#2cf4aa7a4e9c0a336fe442d8734a6f6dee273611" - integrity sha512-OIoSJsCw9WHX4eDikoF5/0QbptMPZjElOcMYdYCyV03nqV5n4ot72ysTexW95yW4+fQU6uDPNQvnrUnhXXEkTA== - -"@cspell/dict-vue@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@cspell/dict-vue/-/dict-vue-2.0.2.tgz#8618b9f4825b3d80e1788082c19ac9c15832463e" - integrity sha512-/MB0RS0Gn01s4pgmjy0FvsLfr3RRMrRphEuvTRserNcM8XVtoIVAtrjig/Gg0DPwDrN8Clm0L1j7iQay6S8D0g== - -"@esbuild-plugins/node-modules-polyfill@0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.1.4.tgz#eb2f55da11967b2986c913f1a7957d1c868849c0" - integrity sha512-uZbcXi0zbmKC/050p3gJnne5Qdzw8vkXIv+c2BW0Lsc1ji1SkrxbKPUy5Efr0blbTu1SL8w4eyfpnSdPg3G0Qg== - dependencies: - escape-string-regexp "^4.0.0" - rollup-plugin-node-polyfills "^0.2.1" - -"@esbuild/android-arm64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz#d784d8f13dbef50492ea55456fb50651e4036fbf" - integrity sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw== - -"@esbuild/android-arm@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.16.10.tgz#becf6b5647c091b039121db8c17300a7dfd1ab4a" - integrity sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ== - -"@esbuild/android-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.16.10.tgz#648cacbb13a5047380a038e5d6d895015e31b525" - integrity sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg== - -"@esbuild/darwin-arm64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.16.10.tgz#3ca7fd9a456d11752df77df6c030f2d08f27bda9" - integrity sha512-bH/bpFwldyOKdi9HSLCLhhKeVgRYr9KblchwXgY2NeUHBB/BzTUHtUSBgGBmpydB1/4E37m+ggXXfSrnD7/E7g== - -"@esbuild/darwin-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz#7eb71b8da4106627f01553def517d3c5e5942592" - integrity sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ== - -"@esbuild/freebsd-arm64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz#c69c78ee1d17d35ad2cf76a1bb67788000a84b43" - integrity sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ== - -"@esbuild/freebsd-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz#a9804ab1b9366f915812af24ad5cfc1c0db01441" - integrity sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA== - -"@esbuild/linux-arm64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz#d9a9ddfcb28ed8cced688bc112ef66283d6fa77f" - integrity sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA== - -"@esbuild/linux-arm@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz#f32cdac1d3319c83ae7f9f31238dd1284ee6bba2" - integrity sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA== - -"@esbuild/linux-ia32@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz#1e023478e42f3a01cad48f4af50120d4b639af03" - integrity sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw== - -"@esbuild/linux-loong64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz#f9098865a69d1d6e2f8bda51c7f9d4240f20b771" - integrity sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg== - -"@esbuild/linux-mips64el@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz#574725ad2ea81b7783b7ba7d1ab3475f8fdd8d32" - integrity sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA== - -"@esbuild/linux-ppc64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz#11da658c54514a693813af56bb28951d563a90c3" - integrity sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg== - -"@esbuild/linux-riscv64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz#3af4600adbd6c5a4a6f1da05771f4aa6774baab2" - integrity sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw== - -"@esbuild/linux-s390x@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz#9e3377aaf0191a9d6628e806a279085ec4391f3e" - integrity sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw== - -"@esbuild/linux-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz#7c41d4d697ce674e0083e7baa6231468f4650d85" - integrity sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA== - -"@esbuild/netbsd-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz#ebac59e3986834af04bbafcee7b0c1f31cd477c6" - integrity sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA== - -"@esbuild/openbsd-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz#9eaa6cac3b80db45090c0946e62de5b5689c61d1" - integrity sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA== - -"@esbuild/sunos-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz#31e5e4b814ef43d300e26511e486a4716a390d5f" - integrity sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg== - -"@esbuild/win32-arm64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz#ca58472dc03ca79e6d03f8a31113979ff253d94f" - integrity sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw== - -"@esbuild/win32-ia32@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz#c572df2c65ab118feed0a5da5a4a193846d74e43" - integrity sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg== - -"@esbuild/win32-x64@0.16.10": - version "0.16.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz#0e9c6a5e69c10d96aff2386b7ee9646138c2a831" - integrity sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw== - -"@eslint-community/eslint-utils@^4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz#a831e6e468b4b2b5ae42bf658bea015bf10bc518" - integrity sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" - integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== - -"@eslint/eslintrc@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.0.tgz#8ec64e0df3e7a1971ee1ff5158da87389f167a63" - integrity sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.4.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@glimmer/env@0.1.7", "@glimmer/env@^0.1.7": - version "0.1.7" - resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07" - integrity sha512-JKF/a9I9jw6fGoz8kA7LEQslrwJ5jms5CXhu/aqkBWk+PmZ6pTl8mlb/eJ/5ujBGTiQzBhy5AIWF712iA+4/mw== - -"@glimmer/global-context@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.84.2.tgz#cd4612925dbd68787b9270e91b213691150c307f" - integrity sha512-6FycLh/Eq0P3LA94bJL6WHPJyOTKeQD4KBWhowZ9TbeO3p4/WUr+POKPVEyfIx6YHybhpL9MGj45Y2r0hqVigw== - dependencies: - "@glimmer/env" "^0.1.7" - -"@glimmer/interfaces@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.2.tgz#764cf92c954adcd1a851e5dc68ec1f6b654dc3bd" - integrity sha512-tMZxQpOddUVmHEOuripkNqVR7ba0K4doiYnFd4WyswqoHPlxqpBujbIamQ+bWCWEF0U4yxsXKa31ekS/JHkiBQ== - dependencies: - "@simple-dom/interface" "^1.4.0" - -"@glimmer/reference@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.2.tgz#c8d91a3ba0b92a9430b6023d7b6f39dd56c79af1" - integrity sha512-hH0VD76OXMsGSHbqaqD64u1aBEqy//jhZtIaHGwAHNpTEX+zDtW3ka298KbAn2CZyDDrNAnuc2U1Vy4COR3zlA== - dependencies: - "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.84.2" - "@glimmer/interfaces" "0.84.2" - "@glimmer/util" "0.84.2" - "@glimmer/validator" "0.84.2" - -"@glimmer/syntax@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.84.2.tgz#a3f65e51eec20f6adb79c6159d1ad1166fa5bccd" - integrity sha512-SPBd1tpIR9XeaXsXsMRCnKz63eLnIZ0d5G9QC4zIBFBC3pQdtG0F5kWeuRVCdfTIFuR+5WBMfk5jvg+3gbQhjg== - dependencies: - "@glimmer/interfaces" "0.84.2" - "@glimmer/util" "0.84.2" - "@handlebars/parser" "~2.0.0" - simple-html-tokenizer "^0.5.11" - -"@glimmer/util@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.2.tgz#2711ba40f25f44b2ea309cad49f5c2622c6211bc" - integrity sha512-VbhzE2s4rmU+qJF3gGBTL1IDjq+/G2Th51XErS8MQVMCmE4CU2pdwSzec8PyOowqCGUOrVIWuMzEI6VoPM4L4w== - dependencies: - "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.84.2" - "@simple-dom/interface" "^1.4.0" - -"@glimmer/validator@0.84.2": - version "0.84.2" - resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.2.tgz#29394d262cf8373fe20f4e225c1adc9857a4164b" - integrity sha512-9tpSmwiktsJDqriNEiFfyP+9prMSdk08THA6Ik71xS/sudBKxoDpul678uvyEYST/+Z23F8MxwKccC+QxCMXNA== - dependencies: - "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.84.2" - -"@handlebars/parser@~2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-2.0.0.tgz#5e8b7298f31ff8f7b260e6b7363c7e9ceed7d9c5" - integrity sha512-EP9uEDZv/L5Qh9IWuMUGJRfwhXJ4h1dqKTT4/3+tY0eu7sPis7xh23j61SYUnNF4vqCQvvUXpDo9Bh/+q1zASA== - -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@iarna/toml@2.2.5": - version "2.2.5" - resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" - integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" - slash "^3.0.0" - -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.8.1" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" - micromatch "^4.0.4" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== - dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== - dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" - "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" - -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" - -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" - -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.9" - source-map "^0.6.0" - -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== - dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== - dependencies: - "@jest/test-result" "^27.5.1" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" - -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@mdn/browser-compat-data@^3.3.14": - version "3.3.14" - resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-3.3.14.tgz#b72a37c654e598f9ae6f8335faaee182bebc6b28" - integrity sha512-n2RC9d6XatVbWFdHLimzzUJxJ1KY8LdjqrW6YvGPiRmsHkhOUx74/Ct10x5Yo7bC/Jvqx7cDEW8IMPv/+vwEzA== - -"@mdn/browser-compat-data@^4.1.5": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz#1fead437f3957ceebe2e8c3f46beccdb9bc575b8" - integrity sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@simple-dom/interface@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@simple-dom/interface/-/interface-1.4.0.tgz#e8feea579232017f89b0138e2726facda6fbb71f" - integrity sha512-l5qumKFWU0S+4ZzMaLXFU8tQZsicHEMEyAxI5kDFGhJsRqDwe0a7/iPA/GdxlGyDKseQQAgIz5kzU7eXTrlSpA== - -"@sinonjs/commons@^1.7.0": - version "1.8.6" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" - integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.1.20" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" - integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.3.tgz#dfc508a85781e5698d5b33443416b6268c4b3e8d" - integrity sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w== - dependencies: - "@babel/types" "^7.3.0" - -"@types/estree@0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/file-entry-cache@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@types/file-entry-cache/-/file-entry-cache-5.0.2.tgz#3d31097d34fb5ff6bd9951f80d4082bda52feece" - integrity sha512-6uLb9gNrW+e4JivzglLQ2eJSyd7xvu5gSkwKIlOZOmuFgz8U7O9ddTwWjmWgUaIeukdQhoWefI5fQ5/MRTw8XA== - dependencies: - "@types/node" "*" - -"@types/find-cache-dir@3.2.1": - version "3.2.1" - resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-3.2.1.tgz#7b959a4b9643a1e6a1a5fe49032693cc36773501" - integrity sha512-frsJrz2t/CeGifcu/6uRo4b+SzAwT4NYCVPu1GN8IB9XTzrpPkGuV0tmh9mN+/L0PklAlsC3u5Fxt0ju00LXIw== - -"@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@27.4.1": - version "27.4.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.4.1.tgz#185cbe2926eaaf9662d340cc02e548ce9e11ab6d" - integrity sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw== - dependencies: - jest-matcher-utils "^27.0.0" - pretty-format "^27.0.0" - -"@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/node@*": - version "18.11.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.17.tgz#5c009e1d9c38f4a2a9d45c0b0c493fe6cdb4bcb5" - integrity sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng== - -"@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== - -"@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/prettier@^2.1.5": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" - integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== - -"@types/semver@^7.3.12": - version "7.3.13" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" - integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/unist@^2.0.0", "@types/unist@^2.0.2": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== - -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" - -"@typescript-eslint/eslint-plugin@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.55.0.tgz#bc2400c3a23305e8c9a9c04aa40933868aaaeb47" - integrity sha512-IZGc50rtbjk+xp5YQoJvmMPmJEYoC53SiKPXyqWfv15XoD2Y5Kju6zN0DwlmaGJp1Iw33JsWJcQ7nw0lGCGjVg== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.55.0" - "@typescript-eslint/type-utils" "5.55.0" - "@typescript-eslint/utils" "5.55.0" - debug "^4.3.4" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/scope-manager@5.47.0": - version "5.47.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz#f58144a6b0ff58b996f92172c488813aee9b09df" - integrity sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw== - dependencies: - "@typescript-eslint/types" "5.47.0" - "@typescript-eslint/visitor-keys" "5.47.0" - -"@typescript-eslint/scope-manager@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.55.0.tgz#e863bab4d4183ddce79967fe10ceb6c829791210" - integrity sha512-OK+cIO1ZGhJYNCL//a3ROpsd83psf4dUJ4j7pdNVzd5DmIk+ffkuUIX2vcZQbEW/IR41DYsfJTB19tpCboxQuw== - dependencies: - "@typescript-eslint/types" "5.55.0" - "@typescript-eslint/visitor-keys" "5.55.0" - -"@typescript-eslint/type-utils@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.55.0.tgz#74bf0233523f874738677bb73cb58094210e01e9" - integrity sha512-ObqxBgHIXj8rBNm0yh8oORFrICcJuZPZTqtAFh0oZQyr5DnAHZWfyw54RwpEEH+fD8suZaI0YxvWu5tYE/WswA== - dependencies: - "@typescript-eslint/typescript-estree" "5.55.0" - "@typescript-eslint/utils" "5.55.0" - debug "^4.3.4" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.47.0": - version "5.47.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.47.0.tgz#67490def406eaa023dbbd8da42ee0d0c9b5229d3" - integrity sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg== - -"@typescript-eslint/types@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.55.0.tgz#9830f8d3bcbecf59d12f821e5bc6960baaed41fd" - integrity sha512-M4iRh4AG1ChrOL6Y+mETEKGeDnT7Sparn6fhZ5LtVJF1909D5O4uqK+C5NPbLmpfZ0XIIxCdwzKiijpZUOvOug== - -"@typescript-eslint/typescript-estree@5.47.0": - version "5.47.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz#ed971a11c5c928646d6ba7fc9dfdd6e997649aca" - integrity sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q== - dependencies: - "@typescript-eslint/types" "5.47.0" - "@typescript-eslint/visitor-keys" "5.47.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.55.0.tgz#8db7c8e47ecc03d49b05362b8db6f1345ee7b575" - integrity sha512-I7X4A9ovA8gdpWMpr7b1BN9eEbvlEtWhQvpxp/yogt48fy9Lj3iE3ild/1H3jKBBIYj5YYJmS2+9ystVhC7eaQ== - dependencies: - "@typescript-eslint/types" "5.55.0" - "@typescript-eslint/visitor-keys" "5.55.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.55.0.tgz#34e97322e7ae5b901e7a870aabb01dad90023341" - integrity sha512-FkW+i2pQKcpDC3AY6DU54yl8Lfl14FVGYDgBTyGKB75cCwV3KpkpTMFi9d9j2WAJ4271LR2HeC5SEWF/CZmmfw== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.55.0" - "@typescript-eslint/types" "5.55.0" - "@typescript-eslint/typescript-estree" "5.55.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/utils@^5.10.0": - version "5.47.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.47.0.tgz#b5005f7d2696769a1fdc1e00897005a25b3a0ec7" - integrity sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw== - dependencies: - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.47.0" - "@typescript-eslint/types" "5.47.0" - "@typescript-eslint/typescript-estree" "5.47.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.47.0": - version "5.47.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz#4aca4efbdf6209c154df1f7599852d571b80bb45" - integrity sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg== - dependencies: - "@typescript-eslint/types" "5.47.0" - eslint-visitor-keys "^3.3.0" - -"@typescript-eslint/visitor-keys@5.55.0": - version "5.55.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.55.0.tgz#01ad414fca8367706d76cdb94adf788dc5b664a2" - integrity sha512-q2dlHHwWgirKh1D3acnuApXG+VNXpEY5/AwRxDVuEQpxWaB0jCDe0jFMVMALJ3ebSfuOVE8/rMS+9ZOYGg1GWw== - dependencies: - "@typescript-eslint/types" "5.55.0" - eslint-visitor-keys "^3.3.0" - -abab@^2.0.3, abab@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - -acorn-jsx@5.3.2, acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn@8.8.1, acorn@^8.2.4, acorn@^8.8.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - -acorn@^7.1.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.10.0, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -angular-estree-parser@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/angular-estree-parser/-/angular-estree-parser-2.5.1.tgz#a08791f64f1a9453ecb99be5379f7f282e46c6ca" - integrity sha512-QP+1HEp9sUV3/ADU02IRc+Vn9vvWZS2rRkxiXCpSpZZx3BqcYTm2Eg/gWwLG3H9XASXnf9i1KyNOIYyRy5Ja+w== - dependencies: - lines-and-columns "^1.1.6" - tslib "^2.0.3" - -angular-html-parser@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/angular-html-parser/-/angular-html-parser-1.8.0.tgz#bd315b74e8069135a046902078c73d959d1cc51c" - integrity sha512-n5ZowjJJs1OPG3DHDSyUXZvscQzy7uQG227ncL1NzbJEPzfb2XtBZ9qT0PW7cbD7MViho3ijawXoRLCM0ih1rw== - dependencies: - tslib "^1.9.3" - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.2.1, ansi-escapes@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - 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== - -array-find-index@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw== - -array-includes@^3.1.4, array-includes@^3.1.5: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - is-string "^1.0.7" - -array-timsort@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-timsort/-/array-timsort-1.0.3.tgz#3c9e4199e54fb2b9c3fe5976396a21614ef0d926" - integrity sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array.prototype.flat@^1.2.5: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.2.5: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -ast-metadata-inferer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/ast-metadata-inferer/-/ast-metadata-inferer-0.7.0.tgz#c45d874cbdecabea26dc5de11fc6fa1919807c66" - integrity sha512-OkMLzd8xelb3gmnp6ToFvvsHLtS6CbagTkFQvQ+ZYFe3/AIl9iKikNR9G7pY3GfOR/2Xc222hwBjzI7HLkE76Q== - dependencies: - "@mdn/browser-compat-data" "^3.3.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -babel-jest@27.5.1, babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== - dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" - -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== - dependencies: - babel-plugin-jest-hoist "^27.5.1" - babel-preset-current-node-syntax "^1.0.0" - -bail@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" - integrity sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -benchmark@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" - integrity sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ== - dependencies: - lodash "^4.17.4" - platform "^1.3.3" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - -browserslist-to-esbuild@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserslist-to-esbuild/-/browserslist-to-esbuild-1.2.0.tgz#5c5b9ca73106da02e0168007396c4ec4c1e6d643" - integrity sha512-ftrrbI/VHBgEnmnSyhkqvQVMp6jAKybfs0qMIlm7SLBrQTGMsdCIP4q3BoKeLsZTBQllIQtY9kbxgRYV2WU47g== - dependencies: - browserslist "^4.17.3" - -browserslist@^4.16.8, browserslist@^4.17.3, browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== - dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -builtin-modules@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" - integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0, callsites@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@6.3.0, camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30001304, caniuse-lite@^1.0.30001400: - version "1.0.30001441" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e" - integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg== - -ccount@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" - integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== - -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" - integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== - -chalk@^4.0.0, chalk@^4.1.1, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -char-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-2.0.1.tgz#6dafdb25f9d3349914079f010ba8d0e6ff9cd01e" - integrity sha512-oSvEeo6ZUD7NepqAat3RqoucZ5SeqLJgOvVIwkafu6IP3V0pO38s/ypdVUmDDK6qIIHNlYHJAKX9E7R7HoKElw== - -character-entities-legacy@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" - integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== - -character-entities@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" - integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== - -character-reference-invalid@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" - integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== - -ci-info@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" - integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== - -ci-info@^3.2.0, ci-info@^3.3.2: - version "3.7.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef" - integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog== - -cjk-regex@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/cjk-regex/-/cjk-regex-2.0.1.tgz#98cca187aa67931db14f0d9dde556150c8116d95" - integrity sha512-4YTL4Zxzy33EhD2YMBQg6qavT+3OrYYu45RHcLANXhbVTXmVcwNQIv0vL1TUWjOS7bH0n0dVcGAdJAGzWSAa3A== - dependencies: - regexp-util "^1.2.1" - unicode-regex "^2.0.0" - -cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== - -clean-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7" - integrity sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw== - dependencies: - escape-string-regexp "^1.0.5" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -clear-module@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/clear-module/-/clear-module-4.1.2.tgz#5a58a5c9f8dccf363545ad7284cad3c887352a80" - integrity sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw== - dependencies: - parent-module "^2.0.0" - resolve-from "^5.0.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collapse-white-space@1.0.6, collapse-white-space@^1.0.2: - version "1.0.6" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" - integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== - -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.19.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^9.1.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" - integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== - -comment-json@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.2.3.tgz#50b487ebbf43abe44431f575ebda07d30d015365" - integrity sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw== - dependencies: - array-timsort "^1.0.3" - core-util-is "^1.0.3" - esprima "^4.0.1" - has-own-prop "^2.0.0" - repeat-string "^1.6.1" - -comment-parser@^1.1.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" - integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== - -commenting@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/commenting/-/commenting-1.1.0.tgz#fae14345c6437b8554f30bc6aa6c1e1633033590" - integrity sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -configstore@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" - integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== - dependencies: - dot-prop "^5.2.0" - graceful-fs "^4.1.2" - make-dir "^3.0.0" - unique-string "^2.0.0" - write-file-atomic "^3.0.0" - xdg-basedir "^4.0.0" - -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -core-js-compat@^3.25.1: - version "3.26.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df" - integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A== - dependencies: - browserslist "^4.21.4" - -core-js@3.26.1, core-js@^3.16.2: - version "3.26.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.1.tgz#7a9816dabd9ee846c1c0fe0e8fcad68f3709134e" - integrity sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA== - -core-util-is@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cosmiconfig@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" - integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cosmiconfig@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" - integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - -cross-env@7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" - integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== - dependencies: - cross-spawn "^7.0.1" - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - -crypto-random-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" - integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== - dependencies: - type-fest "^1.0.1" - -cspell-gitignore@^5.19.7: - version "5.21.2" - resolved "https://registry.yarnpkg.com/cspell-gitignore/-/cspell-gitignore-5.21.2.tgz#f2e93addbc459098ea2d23cd29d9e645478d6907" - integrity sha512-MdNmRRbglmCi20LU7ORZM1gyPSe1gL+4A8Pn+Jm+W5ropSbotzCqiO8BcyhRMNb3lAdMGGrj7gmYtiQ5C/fXIQ== - dependencies: - cspell-glob "^5.21.2" - find-up "^5.0.0" - -cspell-glob@^5.19.7, cspell-glob@^5.21.2: - version "5.21.2" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.21.2.tgz#ef56578b561ab67efd3c2c84c2fbd85a7072ba61" - integrity sha512-AabqzG31UWy4CSz1xJIK4qzXcarxuRFP9OD2EX8iDtEo0tQJLGoTHE+UpNDBPWTHearE0BZPhpMDF/radtZAgw== - dependencies: - micromatch "^4.0.5" - -cspell-io@^5.21.2: - version "5.21.2" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.21.2.tgz#d9087163b1c8ad11c6f94cb7dddf8c57eb97fabe" - integrity sha512-3J4cLuN59R7ARiRZ8ke5QwlC5uPfzHLVELOtEAmsTIjuUMvr7BpbrdCuTsUvLkAqYE9NA5eqolqQm3GLXnECNw== - -cspell-lib@^5.19.7: - version "5.21.2" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.21.2.tgz#77e81b4f134441e11c0434dee7532c00ea116268" - integrity sha512-emAFXtDfs84FoMlhOxZYxYVvbCoCN0LxN0obIRvCsvFCLUPj9y7vHv/Tu/01ZyAPeo2r6gkqhanJpQyoIDA1yg== - dependencies: - "@cspell/cspell-bundled-dicts" "^5.21.2" - "@cspell/cspell-pipe" "^5.21.2" - "@cspell/cspell-types" "^5.21.2" - clear-module "^4.1.2" - comment-json "^4.2.2" - configstore "^5.0.1" - cosmiconfig "^7.0.1" - cspell-glob "^5.21.2" - cspell-io "^5.21.2" - cspell-trie-lib "^5.21.2" - fast-equals "^3.0.2" - find-up "^5.0.0" - fs-extra "^10.1.0" - gensequence "^3.1.1" - import-fresh "^3.3.0" - resolve-from "^5.0.0" - resolve-global "^1.0.0" - vscode-languageserver-textdocument "^1.0.4" - vscode-uri "^3.0.3" - -cspell-trie-lib@^5.21.2: - version "5.21.2" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.21.2.tgz#5d00667754c02695a00fc98f2c6bd467f7945951" - integrity sha512-iux2F+85jDlBEJZgikfPT5SUZMwuFjNqEJiO1SO+xfQG+2MFV9CaHTsoRJIGNy3udMm1mw0GMY5UIVAodwlnhg== - dependencies: - "@cspell/cspell-pipe" "^5.21.2" - fs-extra "^10.1.0" - gensequence "^3.1.1" - -cspell@5.19.7: - version "5.19.7" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.19.7.tgz#4f6c6ff8baac1f3ace6693c63280a3b7a6b669ff" - integrity sha512-7/y+k708tv68+5lpN23Ew1/djx/EnG838zZ8W2ZDWCc6uRHutqRhpxsjMZr/MT3RHN44iKUj2MgT5+sfnhr4eg== - dependencies: - "@cspell/cspell-pipe" "^5.19.7" - chalk "^4.1.2" - commander "^9.1.0" - cspell-gitignore "^5.19.7" - cspell-glob "^5.19.7" - cspell-lib "^5.19.7" - fast-json-stable-stringify "^2.1.0" - file-entry-cache "^6.0.1" - fs-extra "^10.0.1" - get-stdin "^8.0.0" - glob "^7.2.0" - imurmurhash "^0.1.4" - semver "^7.3.6" - strip-ansi "^6.0.1" - vscode-uri "^3.0.3" - -css-units-list@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/css-units-list/-/css-units-list-1.1.0.tgz#46cfb7022c9eb626d9a62589372b8439e1ddb91e" - integrity sha512-WnbCcmr1rHeUb5JbpIWyBjH0HiW6RIZRujOzVvwyE2aZGqtjLFUfiqB9nYmAPlYHNgvqvjhX8YeJv0uF25QoHg== - -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - -dashify@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dashify/-/dashify-2.0.0.tgz#fff270ca2868ca427fee571de35691d6e437a648" - integrity sha512-hpA5C/YrPjucXypHPPc0oJ1l9Hf6wWbiOL7Ik42cxnsUOhWiCB/fylKbKqqJalW9FgkNQCw16YO8uW9Hs0Iy1A== - -data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== - -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -decimal.js@^10.2.1: - version "10.4.3" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" - integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== - -deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -del@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" - integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== - dependencies: - globby "^11.0.1" - graceful-fs "^4.2.4" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.2" - p-map "^4.0.0" - rimraf "^3.0.2" - slash "^3.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - -dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -editorconfig-to-prettier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/editorconfig-to-prettier/-/editorconfig-to-prettier-1.0.0.tgz#f2bccca5877be9dea8a8022b93bcc6aba582a31c" - integrity sha512-WkBQRWxQOat9zBBhrnV0eoCRRMj0fMc/OIwTs+R3pvjsBD2fhTjGLLToGwalUwug3L5K4NvTTMfVRRHT6Hmorg== - -editorconfig@0.15.3: - version "0.15.3" - resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" - integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== - dependencies: - commander "^2.19.0" - lru-cache "^4.1.5" - semver "^5.6.0" - sigmund "^1.0.1" - -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -enquirer@2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.20.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.5.tgz#e6dc99177be37cacda5988e692c3fa8b218e95d2" - integrity sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - unbox-primitive "^1.0.2" - -es-shim-unscopables@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== - dependencies: - has "^1.0.3" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -esbuild-visualizer@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/esbuild-visualizer/-/esbuild-visualizer-0.4.0.tgz#61e57302ee051faa79281daf741a517dbdf64154" - integrity sha512-Sa1nXTxAPasvsyYKx/LVLgFy9CUY9rC4wGCkxjhB9+oL3bTYAlqAo2TcWaGS01T/KwG5qGOfyFWLTjjfokaAEA== - dependencies: - open "^8.4.0" - yargs "^17.6.2" - -esbuild@0.16.10: - version "0.16.10" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.16.10.tgz#d485c28f1626a3f9c1796c952e4cd0561f0031bb" - integrity sha512-z5dIViHoVnw2l+NCJ3zj5behdXjYvXne9gL18OOivCadXDUhyDkeSvEtLcGVAJW2fNmh33TDUpsi704XYlDodw== - optionalDependencies: - "@esbuild/android-arm" "0.16.10" - "@esbuild/android-arm64" "0.16.10" - "@esbuild/android-x64" "0.16.10" - "@esbuild/darwin-arm64" "0.16.10" - "@esbuild/darwin-x64" "0.16.10" - "@esbuild/freebsd-arm64" "0.16.10" - "@esbuild/freebsd-x64" "0.16.10" - "@esbuild/linux-arm" "0.16.10" - "@esbuild/linux-arm64" "0.16.10" - "@esbuild/linux-ia32" "0.16.10" - "@esbuild/linux-loong64" "0.16.10" - "@esbuild/linux-mips64el" "0.16.10" - "@esbuild/linux-ppc64" "0.16.10" - "@esbuild/linux-riscv64" "0.16.10" - "@esbuild/linux-s390x" "0.16.10" - "@esbuild/linux-x64" "0.16.10" - "@esbuild/netbsd-x64" "0.16.10" - "@esbuild/openbsd-x64" "0.16.10" - "@esbuild/sunos-x64" "0.16.10" - "@esbuild/win32-arm64" "0.16.10" - "@esbuild/win32-ia32" "0.16.10" - "@esbuild/win32-x64" "0.16.10" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -eslint-config-prettier@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== - -eslint-formatter-friendly@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/eslint-formatter-friendly/-/eslint-formatter-friendly-7.0.0.tgz#32a4998ababa0a39994aed629b831fda7dabc864" - integrity sha512-WXg2D5kMHcRxIZA3ulxdevi8/BGTXu72pfOO5vXHqcAfClfIWDSlOljROjCSOCcKvilgmHz1jDWbvFCZHjMQ5w== - dependencies: - "@babel/code-frame" "7.0.0" - chalk "2.4.2" - extend "3.0.2" - strip-ansi "5.2.0" - text-table "0.2.0" - -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== - dependencies: - debug "^3.2.7" - resolve "^1.20.0" - -eslint-module-utils@^2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== - dependencies: - debug "^3.2.7" - -eslint-plugin-compat@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-compat/-/eslint-plugin-compat-4.0.2.tgz#b058627a7d25d352adf0ec16dca8fcf92d9c7af7" - integrity sha512-xqvoO54CLTVaEYGMzhu35Wzwk/As7rCvz/2dqwnFiWi0OJccEtGIn+5qq3zqIu9nboXlpdBN579fZcItC73Ycg== - dependencies: - "@mdn/browser-compat-data" "^4.1.5" - ast-metadata-inferer "^0.7.0" - browserslist "^4.16.8" - caniuse-lite "^1.0.30001304" - core-js "^3.16.2" - find-up "^5.0.0" - lodash.memoize "4.1.2" - semver "7.3.5" - -eslint-plugin-import@2.26.0: - version "2.26.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" - integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== - dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.3" - has "^1.0.3" - is-core-module "^2.8.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.5" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-jest@26.1.5: - version "26.1.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.5.tgz#6cfca264818d6d6aa120b019dab4d62b6aa8e775" - integrity sha512-su89aDuljL9bTjEufTXmKUMSFe2kZUL9bi7+woq+C2ukHZordhtfPm4Vg+tdioHBaKf8v3/FXW9uV0ksqhYGFw== - dependencies: - "@typescript-eslint/utils" "^5.10.0" - -eslint-plugin-prettier-internal-rules@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier-internal-rules/-/eslint-plugin-prettier-internal-rules-2.0.1.tgz#ee6f5b4d663fd16d406f66a0d52775d05be1bd6e" - integrity sha512-6mLlbq4xl86c66Smulq2a/bIpTzXDL3LcoYQd/C+kSbjLl8L7G+3wNJs6lWsZZ5v8fyirundQBH6PP/PSAzDMw== - -eslint-plugin-react@7.29.4: - version "7.29.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz#4717de5227f55f3801a5fd51a16a4fa22b5914d2" - integrity sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ== - dependencies: - array-includes "^3.1.4" - array.prototype.flatmap "^1.2.5" - doctrine "^2.1.0" - estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.0" - object.values "^1.1.5" - prop-types "^15.8.1" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.6" - -eslint-plugin-regexp@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.7.0.tgz#19b3c98f4f4d5314242ecc8936346b1936de523e" - integrity sha512-nmhXqrEP+O+dz2z5MSkc41u/4fA8oakweoCUdfYwox7DBhzadEqZz8T+s6/UiY0NIU0kv+3UrzBfhPp4wUxbaA== - dependencies: - comment-parser "^1.1.2" - eslint-utils "^3.0.0" - grapheme-splitter "^1.0.4" - jsdoctypeparser "^9.0.0" - refa "^0.9.0" - regexp-ast-analysis "^0.5.1" - regexpp "^3.2.0" - scslre "^0.1.6" - -eslint-plugin-unicorn@43.0.0: - version "43.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-43.0.0.tgz#c26fdfd146036b3f7951fa0f8c9af2b81bd87096" - integrity sha512-Z/6HX8yry+zAjo4jHHTAbe1rfniox7qgmCReGBfTc/CVgotfScaMCc4dtSSTHlJ+7Yix5o6LPXzwwpuGGFricg== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - ci-info "^3.3.2" - clean-regexp "^1.0.0" - eslint-utils "^3.0.0" - esquery "^1.4.0" - indent-string "^4.0.0" - is-builtin-module "^3.1.0" - lodash "^4.17.21" - pluralize "^8.0.0" - read-pkg-up "^7.0.1" - regexp-tree "^0.1.24" - safe-regex "^2.1.1" - semver "^7.3.7" - strip-indent "^3.0.0" - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint@8.30.0: - version "8.30.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.30.0.tgz#83a506125d089eef7c5b5910eeea824273a33f50" - integrity sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ== - dependencies: - "@eslint/eslintrc" "^1.4.0" - "@humanwhocodes/config-array" "^0.11.8" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-sdsl "^4.1.4" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -esm-utils@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esm-utils/-/esm-utils-3.0.0.tgz#dacf1b3928da7c651982221c4d59710475cf0b93" - integrity sha512-BRGUeZ4BktoVZE8mhA/zVb6YD9Hc7sW6lidTDFgj+a+ugu/e6uDCifKUNAXUv0eEQeIvb6juSVOZ71Rv99bL8w== - dependencies: - url-or-path "2.1.0" - -espree@9.4.1, espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - -esprima@^4.0.0, esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - -esutils@2.0.3, esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -execa@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" - integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^3.0.1" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== - dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - -extend@3.0.2, extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-equals@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-3.0.3.tgz#8e6cb4e51ca1018d87dd41982ef92758b3e4197f" - integrity sha512-NCe8qxnZFARSHGztGMZOO/PC1qa5MIFB5Hp66WdzbCRAz8U8US3bx1UTgLS49efBQPcUtO9gf5oVEY8o7y/7Kg== - -fast-glob@3.2.12, fast-glob@^3.2.7, fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.14.0.tgz#107f69d7295b11e0fccc264e1fc6389f623731ce" - integrity sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -file-entry-cache@6.0.1, file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-cache-dir@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-parent-dir@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.1.tgz#c5c385b96858c3351f95d446cab866cbf9f11125" - integrity sha512-o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A== - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -flatten@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" - integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== - -flow-parser@0.180.0: - version "0.180.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.180.0.tgz#05d49a88715ceca0457607499a018e2bf5908d72" - integrity sha512-kkzsuGAhckWgn/G+JfCyEa6BYslGrjlH4CJL0LZhdn9of9ukvi7SzVQSFsrEhuhh/zQUghfUEoaeZy1wjQXpUg== - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -fs-extra@^10.0.1, fs-extra@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gensequence@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/gensequence/-/gensequence-3.1.1.tgz#95c1afc7c0680f92942c17f2d6f83f3d26ea97af" - integrity sha512-ys3h0hiteRwmY6BsvSttPmkhC0vEQHPJduANBRtH/dlDPZ0UBIb/dXy80IcckXyuQ6LKg+PloRqvGER9IS7F7g== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stdin@8.0.0, get-stdin@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" - integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== - -get-stream@^6.0.0, get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-dirs@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== - dependencies: - ini "^1.3.4" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.19.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== - dependencies: - type-fest "^0.20.2" - -globby@^11.0.1, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -graphql@15.6.1: - version "15.6.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.6.1.tgz#9125bdf057553525da251e19e96dab3d3855ddfc" - integrity sha512-3i5lu0z6dRvJ48QP9kFxBkJ7h4Kso7PS8eahyTFz5Jm6CvQfLtNIE8LX9N6JLnXTuwR+sIYnXzaWp6anOg0QQw== - -has-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-3.0.0.tgz#36077ef1d15f333484aa7fa77a28606f1c655b37" - integrity sha512-5JRDTvNq6mVkaMHQVXrGnaCXHD6JfqxwCy8LA/DQSqLLqePR9uaJVm2u3Ek/UziJFQz+d1ul99RtfIhE2aorkQ== - dependencies: - ansi-regex "^3.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-own-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af" - integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -html-element-attributes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/html-element-attributes/-/html-element-attributes-3.1.0.tgz#07869037b9020bec3bb1897263e97dd65829d15b" - integrity sha512-cHM9qM06tyWHwvGqDqVEBwoYtGgyq7X/GQt3dor38M1hYMZw1yVadaDQrwwQer6NefiYAoHaqFARI8ETMCAOYA== - -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -html-styles@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/html-styles/-/html-styles-1.0.0.tgz#a18061fd651f99c6b75c45c8e0549a3bc3e01a75" - integrity sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w== - -html-tag-names@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-2.0.1.tgz#5626263e7d7b15789fa35a9f816234156901adc6" - integrity sha512-PX8KyLG7dwsjis3NPj1u+/EJf2CgH2d+qzekQpnlCOPQ6Uu6T8+F2ZqQg+wtsP+WKhxK3QMN9Garcwr7fCRhxA== - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -human-signals@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" - integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.4: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -internal-slot@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" - integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - side-channel "^1.0.4" - -is-alphabetical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" - integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== - -is-alphanumerical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" - integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== - dependencies: - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-builtin-module@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" - integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== - dependencies: - builtin-modules "^3.3.0" - -is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.8.1, is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-decimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" - integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-fullwidth-code-point@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" - integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hexadecimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" - integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-inside@^3.0.2, is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-whitespace-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" - integrity sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w== - -is-word-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.4.tgz#ce0e73216f98599060592f62ff31354ddbeb0230" - integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== - dependencies: - "@jest/types" "^27.5.1" - execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^0.7.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - slash "^3.0.0" - stack-utils "^2.0.3" - throat "^6.0.1" - -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== - dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - prompts "^2.0.1" - yargs "^16.2.0" - -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== - dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^27.5.1" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^27.0.2, jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-docblock@28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" - integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== - dependencies: - detect-newline "^3.0.0" - -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== - dependencies: - detect-newline "^3.0.0" - -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== - dependencies: - "@jest/types" "^27.5.1" - chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" - -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== - dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" - -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== - dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^27.5.1" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^27.0.0, jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== - dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" - -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== - dependencies: - "@jest/types" "^27.5.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" - resolve "^1.20.0" - resolve.exports "^1.1.0" - slash "^3.0.0" - -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.8.1" - graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - execa "^5.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot-serializer-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jest-snapshot-serializer-ansi/-/jest-snapshot-serializer-ansi-1.0.0.tgz#7daeefe7bfa81aed44e153fd3451320b61dc2a67" - integrity sha512-nZjYxP1NZkM+Nn0Mox11ZjlEUr4zWuIDxBdQcBZUXQ9XLa9GrZKibRp4Om/NZ+xT0wiLD/oxomGZwcSONGmUUQ== - dependencies: - has-ansi "^3.0.0" - strip-ansi "^4.0.0" - -jest-snapshot-serializer-raw@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.2.0.tgz#cd67afb5e5cc39d88d518b45e7320dd01ce55148" - integrity sha512-Cnp2u7GkaXBVOOelhU94x6Kb/10WJjQtgKDvqynnYGNGQlKBj06x8QZmRkL8XWWVLQ5DKA2fT5rY9kRd512JcA== - -jest-snapshot@^27.0.4, jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== - dependencies: - "@babel/core" "^7.7.2" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^27.5.1" - graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" - natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" - -jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== - dependencies: - "@jest/types" "^27.5.1" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^27.5.1" - leven "^3.1.0" - pretty-format "^27.5.1" - -jest-watch-typeahead@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-1.0.0.tgz#4de2ca1eb596acb1889752afbab84b74fcd99173" - integrity sha512-jxoszalAb394WElmiJTFBMzie/RDCF+W7Q29n5LzOPtcoQoHWfdUtHFkbhgf5NwWe8uMOxvKb/g7ea7CshfkTw== - dependencies: - ansi-escapes "^4.3.1" - chalk "^4.0.0" - jest-regex-util "^27.0.0" - jest-watcher "^27.0.0" - slash "^4.0.0" - string-length "^5.0.1" - strip-ansi "^7.0.1" - -jest-watcher@^27.0.0, jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== - dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - jest-util "^27.5.1" - string-length "^4.0.1" - -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== - dependencies: - "@jest/core" "^27.5.1" - import-local "^3.0.2" - jest-cli "^27.5.1" - -js-sdsl@^4.1.4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" - integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.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== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsdoctypeparser@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz#8c97e2fb69315eb274b0f01377eaa5c940bd7b26" - integrity sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw== - -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== - -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@2.2.2, json5@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.2.tgz#64471c5bdcc564c18f7c1d4df2e2297f2457c5ab" - integrity sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.3" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" - integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== - dependencies: - array-includes "^3.1.5" - object.assign "^4.1.3" - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-4.0.0.tgz#b9c39c803f835950fabef9e122a9b47b95708710" - integrity sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw== - -leven@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - integrity sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lines-and-columns@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" - integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -linguist-languages@7.21.0: - version "7.21.0" - resolved "https://registry.yarnpkg.com/linguist-languages/-/linguist-languages-7.21.0.tgz#da0184f622367cb092f1f8ba435937a85534f675" - integrity sha512-KrWJJbFOvlDhjlt5OhUipVlXg+plUfRurICAyij1ZVxQcqPt/zeReb9KiUVdGUwwhS/2KS9h3TbyfYLA5MDlxQ== - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw== - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - -lodash.memoize@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash@4.17.21, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -loose-envify@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -magic-string@0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.1.tgz#ba9b651354fa9512474199acecf9c6dbe93f97fd" - integrity sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg== - dependencies: - sourcemap-codec "^1.4.8" - -magic-string@0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" - integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" - -magic-string@^0.25.3: - version "0.25.9" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - -make-dir@^3.0.0, make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -map-age-cleaner@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - -markdown-escapes@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" - integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== - -mem@9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/mem/-/mem-9.0.2.tgz#bbc2d40be045afe30749681e8f5d554cee0c0354" - integrity sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^4.0.0" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -meriyah@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-4.2.1.tgz#2a5c9ac2f4a16673afa31af1266ce491a8973bb4" - integrity sha512-Uv5sWsmjFNC6IszEmHo5bzJLL+kqjQ/VrEj9Agqsqtx7B6dcxHnHLew1ioJD19HNXrxrRZltPi+NVh12I8RLXA== - -micromatch@4.0.5, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - -min-indent@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" - integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -minimist@^1.2.0, minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== - -mkdirp@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -moment@2.29.2: - version "2.29.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4" - integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -n-readlines@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/n-readlines/-/n-readlines-1.0.1.tgz#bbb7364d38bc31a170a199f986fcacfa76b95f6e" - integrity sha512-z4SyAIVgMy7CkgsoNw7YVz40v0g4+WWvvqy8+ZdHrCtgevcEO758WQyrYcw3XPxcLxF+//RszTz/rO48nzD0wQ== - -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-actionlint@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/node-actionlint/-/node-actionlint-1.2.2.tgz#0bca592fd28274c368feed8da52a9e2e5db1587d" - integrity sha512-BUPYscLEoeKiLrWb7uFLsgDECtSgBMFOUTSL2N0EfMaVohty5DnubPDpQJnuVw7Rt11h2s+QIzg9rnNJSUCLmQ== - dependencies: - "@babel/code-frame" "^7.14.5" - chalk "^4.1.1" - fast-glob "^3.2.7" - -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@3.2.10: - version "3.2.10" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.10.tgz#e8347f94b54ae18b57c9c049ef641cef398a85c8" - integrity sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.6: - version "2.0.8" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.8.tgz#0f349cdc8fcfa39a92ac0be9bc48b7706292b9ae" - integrity sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A== - -normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-all@4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" - integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== - dependencies: - ansi-styles "^3.2.1" - chalk "^2.4.1" - cross-spawn "^6.0.5" - memorystream "^0.3.1" - minimatch "^3.0.4" - pidtree "^0.3.0" - read-pkg "^3.0.0" - shell-quote "^1.6.1" - string.prototype.padend "^3.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - -nwsapi@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" - integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== - -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.3, object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" - integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.fromentries@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.hasown@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.2.tgz#f919e21fad4eb38a57bc6345b3afd496515c3f92" - integrity sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw== - dependencies: - define-properties "^1.1.4" - es-abstract "^1.20.4" - -object.values@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -open@^8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" - integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -outdent@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.8.0.tgz#2ebc3e77bf49912543f1008100ff8e7f44428eb0" - integrity sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A== - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - 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@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -package-name-regex@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/package-name-regex/-/package-name-regex-2.0.6.tgz#b54bcb04d950e38082b7bb38fa558e01c1679334" - integrity sha512-gFL35q7kbE/zBaPA3UKhp2vSzcPYx2ecbYuwv1ucE9Il6IIgBDweBlH8D68UFGZic2MkllKa2KHCfC1IQBQUYA== - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parent-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-2.0.0.tgz#fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708" - integrity sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg== - dependencies: - callsites "^3.1.0" - -parse-entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" - integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-json@^5.0.0, parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-srcset@ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee: - version "1.0.2" - resolved "https://codeload.github.com/ikatyang/parse-srcset/tar.gz/54eb9c1cb21db5c62b4d0e275d7249516df6f0ee" - -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - -path-browserify@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picocolors@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" - integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pidtree@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" - integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== - -pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -pkg-dir@^4.1.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -platform@^1.3.3: - version "1.3.6" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" - integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== - -please-upgrade-node@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - -pluralize@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" - integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== - -postcss-less@3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.4.tgz#369f58642b5928ef898ffbc1a6e93c958304c5ad" - integrity sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA== - dependencies: - postcss "^7.0.14" - -postcss-media-query-parser@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz#27b39c6f4d94f81b1a73b8f76351c609e5cef244" - integrity sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig== - -postcss-scss@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-2.1.1.tgz#ec3a75fa29a55e016b90bf3269026c53c1d2b383" - integrity sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA== - dependencies: - postcss "^7.0.6" - -postcss-selector-parser@2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - integrity sha512-3pqyakeGhrO0BQ5+/tGTfvi5IAUAhHRayGK8WFSu06aEv2BmHoXw/Mhb+w7VY5HERIuC+QoUI7wgrCcq2hqCVA== - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-values-parser@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" - integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss@^7.0.14, postcss@^7.0.6: - version "7.0.39" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" - integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== - dependencies: - picocolors "^0.2.1" - source-map "^0.6.1" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - -prettier@2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.5.tgz#3dd8ae1ebddc4f6aa419c9b64d8c8319a7e0d982" - integrity sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ== - -pretty-bytes@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.0.0.tgz#928be2ad1f51a2e336add8ba764739f9776a8140" - integrity sha512-6UqkYefdogmzqAZWzJ7laYeJnaXDy2/J+ZqiiMtS7t7OfpXWTlaeGMwX8U6EFvPV/YWWEKRkS8hKS4k60WHTOg== - -pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -prop-types@^15.8.1: - version "15.8.1" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" - integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== - dependencies: - loose-envify "^1.4.0" - object-assign "^4.1.1" - react-is "^16.13.1" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - -psl@^1.1.33: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -react-is@^16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== - -read-pkg-up@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" - integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - dependencies: - find-up "^4.1.0" - read-pkg "^5.2.0" - type-fest "^0.8.1" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA== - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -read-pkg@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" - integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - dependencies: - "@types/normalize-package-data" "^2.4.0" - normalize-package-data "^2.5.0" - parse-json "^5.0.0" - type-fest "^0.6.0" - -refa@^0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/refa/-/refa-0.9.1.tgz#12731fce378d235731b1f73182b20083c8a75ca8" - integrity sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA== - dependencies: - regexpp "^3.2.0" - -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== - dependencies: - regenerate "^1.4.2" - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== - dependencies: - "@babel/runtime" "^7.8.4" - -regexp-ast-analysis@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.2.4.tgz#a497a7c8bfbba51438693821e4b0e3ed43e20f1b" - integrity sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg== - dependencies: - refa "^0.9.0" - regexpp "^3.2.0" - -regexp-ast-analysis@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.5.1.tgz#f7c94e6199d6752f3430ae7a1d7a5978114197fb" - integrity sha512-Ca/g9gaTNuMewLuu+mBIq4vCrGRSO8AE9bP32NMQjJ/wBTdWq0g96qLkBb0NbGwEbp7S/q+NQF3o7veeuRfg0g== - dependencies: - refa "^0.9.0" - regexpp "^3.2.0" - -regexp-tree@^0.1.24, regexp-tree@~0.1.1: - version "0.1.24" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" - integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== - -regexp-util@1.2.2, regexp-util@^1.2.0, regexp-util@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/regexp-util/-/regexp-util-1.2.2.tgz#5cf599134921eb0d776e41d41e9c0da33f0fa2fc" - integrity sha512-5/rl2UD18oAlLQEIuKBeiSIOp1hb5wCXcakl5yvHxlY1wyWI4D5cUKKzCibBeu741PA9JKvZhMqbkDQqPusX3w== - dependencies: - tslib "^1.9.0" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^5.2.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc" - integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw== - dependencies: - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.7.1.tgz#ee5ef30e18d3f09b7c369b76e7c2373ed25546f6" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== - -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - dependencies: - jsesc "~0.5.0" - -remark-footnotes@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/remark-footnotes/-/remark-footnotes-2.0.0.tgz#9001c4c2ffebba55695d2dd80ffb8b82f7e6303f" - integrity sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ== - -remark-math@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/remark-math/-/remark-math-3.0.1.tgz#85a02a15b15cad34b89a27244d4887b3a95185bb" - integrity sha512-epT77R/HK0x7NqrWHdSV75uNLwn8g9qTyMqCRCDujL0vj/6T6+yhdrR7mjELWtkse+Fw02kijAaBuVcHBor1+Q== - -remark-parse@8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1" - integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q== - dependencies: - ccount "^1.0.0" - collapse-white-space "^1.0.2" - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - is-word-character "^1.0.0" - markdown-escapes "^1.0.0" - parse-entities "^2.0.0" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - trim "0.0.1" - trim-trailing-lines "^1.0.0" - unherit "^1.0.4" - unist-util-remove-position "^2.0.0" - vfile-location "^3.0.0" - xtend "^4.0.1" - -repeat-string@^1.5.4, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-global@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255" - integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw== - dependencies: - global-dirs "^0.1.1" - -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@1.22.1, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^2.0.0-next.3: - version "2.0.0-next.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" - integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup-plugin-inject@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4" - integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w== - dependencies: - estree-walker "^0.6.1" - magic-string "^0.25.3" - rollup-pluginutils "^2.8.1" - -rollup-plugin-license@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-2.7.0.tgz#89551c371d50441612b9202f172b9935b4b1f7c8" - integrity sha512-0H1Fbuf85rvpadpmAaairdahzQHY0zHtcXkOFV5EStjX9aMCO2Hz5AQp/zZe+K/PB3o6As7R9uzcb8Pw1K94dg== - dependencies: - commenting "1.1.0" - glob "7.2.0" - lodash "4.17.21" - magic-string "0.26.1" - mkdirp "1.0.4" - moment "2.29.2" - package-name-regex "2.0.6" - spdx-expression-validate "2.0.0" - spdx-satisfies "5.0.1" - -rollup-plugin-node-polyfills@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz#53092a2744837164d5b8a28812ba5f3ff61109fd" - integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA== - dependencies: - rollup-plugin-inject "^3.0.0" - -rollup-pluginutils@^2.8.1: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -safe-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2" - integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== - dependencies: - regexp-tree "~0.1.1" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - -scslre@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/scslre/-/scslre-0.1.6.tgz#71a2832e4bf3a9254973a04fbed90aec94f75757" - integrity sha512-JORxVRlQTfjvlOAaiQKebgFElyAm5/W8b50lgaZ0OkEnKnagJW2ufDh3xRfU75UD9z3FGIu1gL1IyR3Poa6Qmw== - dependencies: - refa "^0.9.0" - regexp-ast-analysis "^0.2.3" - regexpp "^3.2.0" - -sdbm@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sdbm/-/sdbm-2.0.0.tgz#23828c1195e341d0f5810c59dfa60d86278f8718" - integrity sha512-dspMGxvHiwSTgyrmm90jHQV2sDqK46ssbDK+bQAlJ5aRuPo3C7So108V6rCuCDbm1CrNWuPeMpmTNQKPl7vO+A== - -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== - -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.2, semver@^7.3.6, semver@^7.3.7: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.6.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.4.tgz#33fe15dee71ab2a81fcbd3a52106c5cfb9fb75d8" - integrity sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -sigmund@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" - integrity sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g== - -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-html-tokenizer@^0.5.11: - version "0.5.11" - resolved "https://registry.yarnpkg.com/simple-html-tokenizer/-/simple-html-tokenizer-0.5.11.tgz#4c5186083c164ba22a7b477b7687ac056ad6b1d9" - integrity sha512-C2WEK/Z3HoSFbYq8tI7ni3eOo/NneSPRoPpcM7WdLjFOArFuyXEjAoCdOC3DgMfRyziZQ1hCNR4mrNdWEvD0og== - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - -snapshot-diff@0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/snapshot-diff/-/snapshot-diff-0.9.0.tgz#b62c7efa62beb2fb59d892541981d1d6e83e66b2" - integrity sha512-XF4TKCe3l1HWyBK7wsfzrQbCMupYkdDE+44++6D683hZXjHHQBSVRnBWu/SP5Nk5cj5vH5FbY47Z8hUbt7yq+Q== - dependencies: - jest-diff "^27.0.2" - jest-snapshot "^27.0.4" - pretty-format "^27.0.2" - -source-map-support@^0.5.6: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.3: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -spdx-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/spdx-compare/-/spdx-compare-1.0.0.tgz#2c55f117362078d7409e6d7b08ce70a857cd3ed7" - integrity sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A== - dependencies: - array-find-index "^1.0.2" - spdx-expression-parse "^3.0.0" - spdx-ranges "^2.0.0" - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-expression-validate@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-validate/-/spdx-expression-validate-2.0.0.tgz#25c9408e1c63fad94fff5517bb7101ffcd23350b" - integrity sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg== - dependencies: - spdx-expression-parse "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.12" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" - integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== - -spdx-ranges@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/spdx-ranges/-/spdx-ranges-2.1.1.tgz#87573927ba51e92b3f4550ab60bfc83dd07bac20" - integrity sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA== - -spdx-satisfies@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/spdx-satisfies/-/spdx-satisfies-5.0.1.tgz#9feeb2524686c08e5f7933c16248d4fdf07ed6a6" - integrity sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw== - dependencies: - spdx-compare "^1.0.0" - spdx-expression-parse "^3.0.0" - spdx-ranges "^2.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -state-toggle@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" - integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -string-length@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-5.0.1.tgz#3d647f497b6e8e8d41e422f7e0b23bc536c8381e" - integrity sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow== - dependencies: - char-regex "^2.0.0" - strip-ansi "^7.0.1" - -string-width@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.0.1.tgz#0d8158335a6cfd8eb95da9b6b262ce314a036ffd" - integrity sha512-5ohWO/M4//8lErlUUtrFy3b11GtNOuMOU0ysKCDXFcfXuuvUXu95akgj/i8ofmaGdN0hCqyl6uu9i8dS/mQp5g== - dependencies: - emoji-regex "^9.2.2" - is-fullwidth-code-point "^4.0.0" - strip-ansi "^7.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.matchall@^4.0.6: - version "4.0.8" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" - integrity sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.4.3" - side-channel "^1.0.4" - -string.prototype.padend@^3.0.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz#2c43bb3a89eb54b6750de5942c123d6c98dd65b6" - integrity sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -strip-ansi@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@7.0.1, strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - -strip-indent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" - integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - dependencies: - min-indent "^1.0.0" - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -tempy@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-2.0.0.tgz#c434b89486e112151d5e91ef25592c8ee6fec4f6" - integrity sha512-m+QReZVhpa0Y56fmfoLFRZN4aDFdd3qVd8a9k3RfyTw/1utVYNg+Ar4BY6l4/TlkhYCCJFfhYWt9uy0127buJg== - dependencies: - del "^6.0.0" - is-stream "^3.0.0" - temp-dir "^2.0.0" - type-fest "^2.0.0" - unique-string "^3.0.0" - -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@0.2.0, text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tough-cookie@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" - integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.2.0" - url-parse "^1.5.3" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - -trim-trailing-lines@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz#bd4abbec7cc880462f10b2c8b5ce1d8d1ec7c2c0" - integrity sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ== - -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ== - -trough@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" - integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== - -tsconfig-paths@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.3, tslib@^2.2.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" - integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-fest@^1.0.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== - -type-fest@^2.0.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typescript@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5" - integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unherit@^1.0.4: - version "1.1.3" - resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" - integrity sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ== - dependencies: - inherits "^2.0.0" - xtend "^4.0.0" - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - -unicode-regex@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unicode-regex/-/unicode-regex-3.0.0.tgz#0c20df914c6da0412b3714cd300726e0f7f24698" - integrity sha512-WiDJdORsqgxkZrjC8WsIP573130HNn7KsB0IDnUccW2BG2b19QQNloNhVe6DKk3Aef0UcoIHhNVj7IkkcYWrNw== - dependencies: - regexp-util "^1.2.0" - -unicode-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-regex/-/unicode-regex-2.0.0.tgz#ef8f6642c37dddcaa0c09af5b9456aabf6b436a3" - integrity sha512-5nbEG2YU7loyTvPABaKb+8B0u8L7vWCsVmCSsiaO249ZdMKlvrXlxR2ex4TUVAdzv/Cne/TdoXSSaJArGXaleQ== - dependencies: - regexp-util "^1.2.0" - -unified@9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.1.tgz#ae18d5674c114021bfdbdf73865ca60f410215a3" - integrity sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA== - dependencies: - bail "^1.0.0" - extend "^3.0.0" - is-buffer "^2.0.0" - is-plain-obj "^2.0.0" - trough "^1.0.0" - vfile "^4.0.0" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA== - -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== - dependencies: - crypto-random-string "^2.0.0" - -unique-string@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" - integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== - dependencies: - crypto-random-string "^4.0.0" - -unist-util-is@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797" - integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg== - -unist-util-remove-position@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz#5d19ca79fdba712301999b2b73553ca8f3b352cc" - integrity sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA== - dependencies: - unist-util-visit "^2.0.0" - -unist-util-stringify-position@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" - integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== - dependencies: - "@types/unist" "^2.0.2" - -unist-util-visit-parents@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz#65a6ce698f78a6b0f56aa0e88f13801886cdaef6" - integrity sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^4.0.0" - -unist-util-visit@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" - integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^4.0.0" - unist-util-visit-parents "^3.0.0" - -universalify@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" - integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-or-path@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/url-or-path/-/url-or-path-2.1.0.tgz#8bb39a2a2b7e8f2e31c7883d8207b0cbd07acb9f" - integrity sha512-dsBD6GbytSMj9YDb3jVzSRENwFh50oUORnWBeSHfo0Lnwv2KMm/J4npyGy1P9rivUPsUGLjTA53XqAFqpe0nww== - -url-parse@^1.5.3: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -v8-to-istanbul@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" - integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vfile-location@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c" - integrity sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA== - -vfile-message@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" - integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^2.0.0" - -vfile@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.2.1.tgz#03f1dce28fc625c625bc6514350fbdb00fa9e624" - integrity sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - unist-util-stringify-position "^2.0.0" - vfile-message "^2.0.0" - -vnopts@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vnopts/-/vnopts-1.0.2.tgz#f6a331473de0179d1679112cc090572b695202f7" - integrity sha512-d2rr2EFhAGHnTlURu49G7GWmiJV80HbAnkYdD9IFAtfhmxC+kSWEaZ6ZF064DJFTv9lQZQV1vuLTntyQpoanGQ== - dependencies: - chalk "^2.4.1" - leven "^2.1.0" - tslib "^1.9.3" - -vscode-languageserver-textdocument@^1.0.4: - version "1.0.8" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0" - integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q== - -vscode-uri@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8" - integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== - -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -wcwidth@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -ws@^7.4.6: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -xdg-basedir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" - integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - -xtend@^4.0.0, xtend@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml-unist-parser@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/yaml-unist-parser/-/yaml-unist-parser-1.3.1.tgz#4305a54d8f8750dfff782bb998ff93d0da538d1a" - integrity sha512-4aHBMpYcnByF8l2OKj5hlBJlxSYIMON8Z1Hm57ymbBL4omXMlGgY+pEf4Di6h2qNT8ZG8seTVvAQYNOa7CZ9eA== - dependencies: - lines-and-columns "^1.1.6" - tslib "^1.10.0" - yaml "^1.10.0" - -yaml@^1.10.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^17.6.2: - version "17.6.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -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== +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + +"@angular/compiler@npm:20.0.5": + version: 20.0.5 + resolution: "@angular/compiler@npm:20.0.5" + dependencies: + tslib: "npm:^2.3.0" + checksum: 10/b1f258d3cedb4c83aed47f3ba5ee50a5a19201f41d1f622719959fb78ffcb76bf53c486418e5e7bef1556c39aacb141bbdd8944413d4832aefae6d02468b3cea + languageName: node + linkType: hard + +"@babel/code-frame@npm:7.0.0": + version: 7.0.0 + resolution: "@babel/code-frame@npm:7.0.0" + dependencies: + "@babel/highlight": "npm:^7.0.0" + checksum: 10/ac4d13f8678155249e272afe22f84710c2343a863767ab5a7c3a54f0fb5f6f57b192a5cb2a625d4f7f05f33ad806d8b9ab4ce83ba9ec280119e665a8bd48123d + languageName: node + linkType: hard + +"@babel/code-frame@npm:7.27.1, @babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.26.2, @babel/code-frame@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/code-frame@npm:7.27.1" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.27.1" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.1.1" + checksum: 10/721b8a6e360a1fa0f1c9fe7351ae6c874828e119183688b533c477aa378f1010f37cc9afbfc4722c686d1f5cdd00da02eab4ba7278a0c504fa0d7a321dcd4fdf + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/compat-data@npm:7.27.2" + checksum: 10/eaa9f8aaeb9475779f4411fa397f712a6441b650d4e0b40c5535c954c891cd35c0363004db42902192aa8224532ac31ce06890478b060995286fe4fadd54e542 + languageName: node + linkType: hard + +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.23.9, @babel/core@npm:^7.27.4": + version: 7.27.4 + resolution: "@babel/core@npm:7.27.4" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.27.3" + "@babel/helper-compilation-targets": "npm:^7.27.2" + "@babel/helper-module-transforms": "npm:^7.27.3" + "@babel/helpers": "npm:^7.27.4" + "@babel/parser": "npm:^7.27.4" + "@babel/template": "npm:^7.27.2" + "@babel/traverse": "npm:^7.27.4" + "@babel/types": "npm:^7.27.3" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/28c01186d5f2599e41f92c94fd14a02cfdcf4b74429b4028a8d16e45c1b08d3924c4275e56412f30fcd2664e5ddc2200f1c06cee8bffff4bba628ff1f20c6e70 + languageName: node + linkType: hard + +"@babel/generator@npm:7.27.5, @babel/generator@npm:^7.27.3, @babel/generator@npm:^7.27.5, @babel/generator@npm:^7.7.2": + version: 7.27.5 + resolution: "@babel/generator@npm:7.27.5" + dependencies: + "@babel/parser": "npm:^7.27.5" + "@babel/types": "npm:^7.27.3" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10/f5e6942670cb32156b3ac2d75ce09b373558823387f15dd1413c27fe9eb5756a7c6011fc7f956c7acc53efb530bfb28afffa24364d46c4e9ffccc4e5c8b3b094 + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/helper-compilation-targets@npm:7.27.2" + dependencies: + "@babel/compat-data": "npm:^7.27.2" + "@babel/helper-validator-option": "npm:^7.27.1" + browserslist: "npm:^4.24.0" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/bd53c30a7477049db04b655d11f4c3500aea3bcbc2497cf02161de2ecf994fec7c098aabbcebe210ffabc2ecbdb1e3ffad23fb4d3f18723b814f423ea1749fe8 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-module-imports@npm:7.27.1" + dependencies: + "@babel/traverse": "npm:^7.27.1" + "@babel/types": "npm:^7.27.1" + checksum: 10/58e792ea5d4ae71676e0d03d9fef33e886a09602addc3bd01388a98d87df9fcfd192968feb40ac4aedb7e287ec3d0c17b33e3ecefe002592041a91d8a1998a8d + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.27.3": + version: 7.27.3 + resolution: "@babel/helper-module-transforms@npm:7.27.3" + dependencies: + "@babel/helper-module-imports": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.27.1" + "@babel/traverse": "npm:^7.27.3" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/47abc90ceb181b4bdea9bf1717adf536d1b5e5acb6f6d8a7a4524080318b5ca8a99e6d58677268c596bad71077d1d98834d2c3815f2443e6d3f287962300f15d + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.27.1, @babel/helper-plugin-utils@npm:^7.8.0": + version: 7.27.1 + resolution: "@babel/helper-plugin-utils@npm:7.27.1" + checksum: 10/96136c2428888e620e2ec493c25888f9ceb4a21099dcf3dd4508ea64b58cdedbd5a9fb6c7b352546de84d6c24edafe482318646932a22c449ebd16d16c22d864 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-string-parser@npm:7.27.1" + checksum: 10/0ae29cc2005084abdae2966afdb86ed14d41c9c37db02c3693d5022fba9f5d59b011d039380b8e537c34daf117c549f52b452398f576e908fb9db3c7abbb3a00 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.25.9, @babel/helper-validator-identifier@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-validator-identifier@npm:7.27.1" + checksum: 10/75041904d21bdc0cd3b07a8ac90b11d64cd3c881e89cb936fa80edd734bf23c35e6bd1312611e8574c4eab1f3af0f63e8a5894f4699e9cfdf70c06fcf4252320 + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-validator-option@npm:7.27.1" + checksum: 10/db73e6a308092531c629ee5de7f0d04390835b21a263be2644276cb27da2384b64676cab9f22cd8d8dbd854c92b1d7d56fc8517cf0070c35d1c14a8c828b0903 + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.27.4": + version: 7.27.4 + resolution: "@babel/helpers@npm:7.27.4" + dependencies: + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.27.3" + checksum: 10/a697280575d338afd69461a07edb6db5b8623ca66528a9d2522e7b01476f42561b9563ab688b3ebe9e6afd4d25c6e66cc29a4466c424ab0d6573180c2bfdec0f + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.0.0": + version: 7.25.9 + resolution: "@babel/highlight@npm:7.25.9" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/0d165283dd4eb312292cea8fec3ae0d376874b1885f476014f0136784ed5b564b2c2ba2d270587ed546ee92505056dab56493f7960c01c4e6394d71d1b2e7db6 + languageName: node + linkType: hard + +"@babel/parser@npm:7.27.7, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.27.4, @babel/parser@npm:^7.27.5": + version: 7.27.7 + resolution: "@babel/parser@npm:7.27.7" + dependencies: + "@babel/types": "npm:^7.27.7" + bin: + parser: ./bin/babel-parser.js + checksum: 10/ed25ccfc709e77b94afebfa8377cca2ee5d0750162a6b4e7eb7b679ccdf307d1a015dee58d94afe726ed6d278a83aa348cb3a47717222ac4c3650d077f6ca4fd + languageName: node + linkType: hard + +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/7ed1c1d9b9e5b64ef028ea5e755c0be2d4e5e4e3d6cf7df757b9a8c4cfa4193d268176d0f1f7fbecdda6fe722885c7fda681f480f3741d8a2d26854736f05367 + languageName: node + linkType: hard + +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-properties@npm:^7.12.13": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.12.13" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/24f34b196d6342f28d4bad303612d7ff566ab0a013ce89e775d98d6f832969462e7235f3e7eaf17678a533d4be0ba45d3ae34ab4e5a9dcbda5d98d49e5efa2fc + languageName: node + linkType: hard + +"@babel/plugin-syntax-class-static-block@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.14.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-attributes@npm:^7.24.7": + version: 7.27.1 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.27.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.27.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/97973982fff1bbf86b3d1df13380567042887c50e2ae13a400d02a8ff2c9742a60a75e279bfb73019e1cd9710f04be5e6ab81f896e6678dcfcec8b135e8896cf + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-meta@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/166ac1125d10b9c0c430e4156249a13858c0366d38844883d75d27389621ebe651115cb2ceb6dc011534d5055719fa1727b59f39e1ab3ca97820eef3dcab5b9b + languageName: node + linkType: hard + +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bf5aea1f3188c9a507e16efe030efb996853ca3cadd6512c51db7233cc58f3ac89ff8c6bdfb01d30843b161cfe7d321e1bf28da82f7ab8d7e6bc5464666f354a + languageName: node + linkType: hard + +"@babel/plugin-syntax-jsx@npm:^7.27.1, @babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.27.1 + resolution: "@babel/plugin-syntax-jsx@npm:7.27.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.27.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/c6d1324cff286a369aa95d99b8abd21dd07821b5d3affd5fe7d6058c84cff9190743287826463ee57a7beecd10fa1e4bc99061df532ee14e188c1c8937b13e3a + languageName: node + linkType: hard + +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/aff33577037e34e515911255cdbb1fd39efee33658aa00b8a5fd3a4b903585112d037cce1cc9e4632f0487dc554486106b79ccd5ea63a2e00df4363f6d4ff886 + languageName: node + linkType: hard + +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/87aca4918916020d1fedba54c0e232de408df2644a425d153be368313fdde40d96088feed6c4e5ab72aac89be5d07fef2ddf329a15109c5eb65df006bf2580d1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.10.4" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/01ec5547bd0497f76cc903ff4d6b02abc8c05f301c88d2622b6d834e33a5651aa7c7a3d80d8d57656a4588f7276eba357f6b7e006482f5b564b7a6488de493a1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/fddcf581a57f77e80eb6b981b10658421bc321ba5f0a5b754118c6a92a5448f12a0c336f77b8abf734841e102e5126d69110a306eadb03ca3e1547cab31f5cbf + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/910d90e72bc90ea1ce698e89c1027fed8845212d5ab588e35ef91f13b93143845f94e2539d831dc8d8ededc14ec02f04f7bd6a8179edd43a326c784e7ed7f0b9 + languageName: node + linkType: hard + +"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.8.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/eef94d53a1453361553c1f98b68d17782861a04a392840341bc91780838dd4e695209c783631cf0de14c635758beafb6a3a65399846ffa4386bff90639347f30 + languageName: node + linkType: hard + +"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.14.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda + languageName: node + linkType: hard + +"@babel/plugin-syntax-top-level-await@npm:^7.14.5": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.14.5" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/bbd1a56b095be7820029b209677b194db9b1d26691fe999856462e66b25b281f031f3dfd91b1619e9dcf95bebe336211833b854d0fb8780d618e35667c2d0d7e + languageName: node + linkType: hard + +"@babel/plugin-syntax-typescript@npm:^7.27.1, @babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.27.1 + resolution: "@babel/plugin-syntax-typescript@npm:7.27.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.27.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/87836f7e32af624c2914c73cd6b9803cf324e07d43f61dbb973c6a86f75df725e12540d91fac7141c14b697aa9268fd064220998daced156e96ac3062d7afb41 + languageName: node + linkType: hard + +"@babel/template@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/template@npm:7.27.2" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@babel/parser": "npm:^7.27.2" + "@babel/types": "npm:^7.27.1" + checksum: 10/fed15a84beb0b9340e5f81566600dbee5eccd92e4b9cc42a944359b1aa1082373391d9d5fc3656981dff27233ec935d0bc96453cf507f60a4b079463999244d8 + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.27.3, @babel/traverse@npm:^7.27.4": + version: 7.27.4 + resolution: "@babel/traverse@npm:7.27.4" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.27.3" + "@babel/parser": "npm:^7.27.4" + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.27.3" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/4debb80b9068a46e188e478272f3b6820e16d17e2651e82d0a0457176b0c3b2489994f0a0d6e8941ee90218b0a8a69fe52ba350c1aa66eb4c72570d6b2405f91 + languageName: node + linkType: hard + +"@babel/types@npm:7.27.7, @babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.27.7, @babel/types@npm:^7.3.3": + version: 7.27.7 + resolution: "@babel/types@npm:7.27.7" + dependencies: + "@babel/helper-string-parser": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.27.1" + checksum: 10/39e9f05527ef0771dfb6220213a9ef2ca35c2b6d531e3310c8ffafb53aa50362e809f75af8feb28bd6abb874a00c02b05ac00e3063ee239db5c6f1653eab19c5 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^0.2.3": + version: 0.2.3 + resolution: "@bcoe/v8-coverage@npm:0.2.3" + checksum: 10/1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^1.0.1": + version: 1.0.2 + resolution: "@bcoe/v8-coverage@npm:1.0.2" + checksum: 10/46600b2dde460269b07a8e4f12b72e418eae1337b85c979f43af3336c9a1c65b04e42508ab6b245f1e0e3c64328e1c38d8cd733e4a7cebc4fbf9cf65c6e59937 + languageName: node + linkType: hard + +"@cspell/cspell-bundled-dicts@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-bundled-dicts@npm:9.1.1" + dependencies: + "@cspell/dict-ada": "npm:^4.1.0" + "@cspell/dict-al": "npm:^1.1.0" + "@cspell/dict-aws": "npm:^4.0.10" + "@cspell/dict-bash": "npm:^4.2.0" + "@cspell/dict-companies": "npm:^3.2.1" + "@cspell/dict-cpp": "npm:^6.0.8" + "@cspell/dict-cryptocurrencies": "npm:^5.0.4" + "@cspell/dict-csharp": "npm:^4.0.6" + "@cspell/dict-css": "npm:^4.0.17" + "@cspell/dict-dart": "npm:^2.3.0" + "@cspell/dict-data-science": "npm:^2.0.8" + "@cspell/dict-django": "npm:^4.1.4" + "@cspell/dict-docker": "npm:^1.1.14" + "@cspell/dict-dotnet": "npm:^5.0.9" + "@cspell/dict-elixir": "npm:^4.0.7" + "@cspell/dict-en-common-misspellings": "npm:^2.1.1" + "@cspell/dict-en-gb-mit": "npm:^3.1.1" + "@cspell/dict-en_us": "npm:^4.4.11" + "@cspell/dict-filetypes": "npm:^3.0.12" + "@cspell/dict-flutter": "npm:^1.1.0" + "@cspell/dict-fonts": "npm:^4.0.4" + "@cspell/dict-fsharp": "npm:^1.1.0" + "@cspell/dict-fullstack": "npm:^3.2.6" + "@cspell/dict-gaming-terms": "npm:^1.1.1" + "@cspell/dict-git": "npm:^3.0.6" + "@cspell/dict-golang": "npm:^6.0.22" + "@cspell/dict-google": "npm:^1.0.8" + "@cspell/dict-haskell": "npm:^4.0.5" + "@cspell/dict-html": "npm:^4.0.11" + "@cspell/dict-html-symbol-entities": "npm:^4.0.3" + "@cspell/dict-java": "npm:^5.0.11" + "@cspell/dict-julia": "npm:^1.1.0" + "@cspell/dict-k8s": "npm:^1.0.11" + "@cspell/dict-kotlin": "npm:^1.1.0" + "@cspell/dict-latex": "npm:^4.0.3" + "@cspell/dict-lorem-ipsum": "npm:^4.0.4" + "@cspell/dict-lua": "npm:^4.0.7" + "@cspell/dict-makefile": "npm:^1.0.4" + "@cspell/dict-markdown": "npm:^2.0.11" + "@cspell/dict-monkeyc": "npm:^1.0.10" + "@cspell/dict-node": "npm:^5.0.7" + "@cspell/dict-npm": "npm:^5.2.6" + "@cspell/dict-php": "npm:^4.0.14" + "@cspell/dict-powershell": "npm:^5.0.14" + "@cspell/dict-public-licenses": "npm:^2.0.13" + "@cspell/dict-python": "npm:^4.2.18" + "@cspell/dict-r": "npm:^2.1.0" + "@cspell/dict-ruby": "npm:^5.0.8" + "@cspell/dict-rust": "npm:^4.0.11" + "@cspell/dict-scala": "npm:^5.0.7" + "@cspell/dict-shell": "npm:^1.1.0" + "@cspell/dict-software-terms": "npm:^5.1.0" + "@cspell/dict-sql": "npm:^2.2.0" + "@cspell/dict-svelte": "npm:^1.0.6" + "@cspell/dict-swift": "npm:^2.0.5" + "@cspell/dict-terraform": "npm:^1.1.1" + "@cspell/dict-typescript": "npm:^3.2.2" + "@cspell/dict-vue": "npm:^3.0.4" + checksum: 10/aa02fd19be2498d467f57b7a2a6027399b97ad02421be99ed0c482087372bff7109947ceb1e083f632f5bdad9f6779ab39ba8182e8e7ec19512fbe3b70fa618d + languageName: node + linkType: hard + +"@cspell/cspell-json-reporter@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-json-reporter@npm:9.1.1" + dependencies: + "@cspell/cspell-types": "npm:9.1.1" + checksum: 10/771f7b3a49016ef55185f50b84b00a508d7c3cd4479a55b1c830331279a735d0572fb25f1512446e67524d49c4b26cf7701f60ee1ee5998c69b5425daf8900d8 + languageName: node + linkType: hard + +"@cspell/cspell-pipe@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-pipe@npm:9.1.1" + checksum: 10/1c70ef29bee2e3c708c36d6749788f9a25340fa7082c57796ac7e4ac43f9f8eb2405c58920c0ef10849686979c2edb61f6e0926532d056f54bd6e0668caee653 + languageName: node + linkType: hard + +"@cspell/cspell-resolver@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-resolver@npm:9.1.1" + dependencies: + global-directory: "npm:^4.0.1" + checksum: 10/685998eb36cb274bfd243ccc761d4dce9908aeca2f6c0500c111e63767f39b660042bee620b832e17fb17455cdc310a8e5536ca279e44f520e120230309a56d4 + languageName: node + linkType: hard + +"@cspell/cspell-service-bus@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-service-bus@npm:9.1.1" + checksum: 10/55260fc289fa577e6573c197dd5b9d56574e61865e7afc0ca1922ac3538301a633820e9326c0223505bd5b427ecbe7a398de159425a426fb317c69f63ba103e6 + languageName: node + linkType: hard + +"@cspell/cspell-types@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/cspell-types@npm:9.1.1" + checksum: 10/8e1dfafbf20a63ba33d744bfe2b33ad0b761da64a5683aaf33d73423eb72c71f710c5507dc953862c69f2f5eaf5448f9efd08eb971bb7306fa55443527e4f17c + languageName: node + linkType: hard + +"@cspell/dict-ada@npm:^4.1.0": + version: 4.1.0 + resolution: "@cspell/dict-ada@npm:4.1.0" + checksum: 10/f91e05b1d026d2c9498e63bca5d4eb5498320a28901c5c70b90a9b70cb8579e5394e665e097566365ee2765066a777aff8495911a1ac9fef0b615eefd222bd04 + languageName: node + linkType: hard + +"@cspell/dict-al@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-al@npm:1.1.0" + checksum: 10/436269555db34f495ced8a23bda126aadff071742498173e6a5eadcf789da65e49a3308be20be657e02d1c41048d8d7d31ea3841cab4b1542a49324b4fa804de + languageName: node + linkType: hard + +"@cspell/dict-aws@npm:^4.0.10": + version: 4.0.10 + resolution: "@cspell/dict-aws@npm:4.0.10" + checksum: 10/af23b14265051c6defa774a044af7fdf32ce9f9f28882eee9146888d1059d2015ac4d0a71d830cbd8478e80b105e52c45307319335c4291223ec3ea317ad1004 + languageName: node + linkType: hard + +"@cspell/dict-bash@npm:^4.2.0": + version: 4.2.0 + resolution: "@cspell/dict-bash@npm:4.2.0" + dependencies: + "@cspell/dict-shell": "npm:1.1.0" + checksum: 10/2a87ebb5f0b1140ceeab0991411ebfe03a05cebb296d30812a3e9f78cf0a56622484fbda5212d5811e59f1b1ca4dacae77341c1f3c0c5fc2efdb19393fddd766 + languageName: node + linkType: hard + +"@cspell/dict-companies@npm:^3.2.1": + version: 3.2.1 + resolution: "@cspell/dict-companies@npm:3.2.1" + checksum: 10/c31659b9962d0f2da1b0b2c626ec9ad61fb589500c6afd6c045c54a01e5de7c0077fb272401f3bd06205a034db1a9dee16a46816b385129c4f8aa8ec793b5c3c + languageName: node + linkType: hard + +"@cspell/dict-cpp@npm:^6.0.8": + version: 6.0.8 + resolution: "@cspell/dict-cpp@npm:6.0.8" + checksum: 10/0dca36740ecd70de1692f1787780b80682c6e1c1e42ceaf98b91381968aaea56de2a015eb4193e409922c82357462b13330c5b59a7a6a8ed568460617be7b3b6 + languageName: node + linkType: hard + +"@cspell/dict-cryptocurrencies@npm:^5.0.4": + version: 5.0.4 + resolution: "@cspell/dict-cryptocurrencies@npm:5.0.4" + checksum: 10/54229c432f70320aa060c5c101a242e64f40f1f5b8404d1e2a5afc867e2f1cb862e1d84b3383c4bdfa3768302cca49f51bf8ea78c5509113b4a1e18ff00abfae + languageName: node + linkType: hard + +"@cspell/dict-csharp@npm:^4.0.6": + version: 4.0.6 + resolution: "@cspell/dict-csharp@npm:4.0.6" + checksum: 10/b86a3c0da979bbc9e0de9d4e9a83158190ac4bd454534ace3d2e48e4162eb1915e1f2f70e017e6df25eb3c017053d745897ad46a3c8d1357fdb4a2723e545154 + languageName: node + linkType: hard + +"@cspell/dict-css@npm:^4.0.17": + version: 4.0.17 + resolution: "@cspell/dict-css@npm:4.0.17" + checksum: 10/ae9a2827a5885dbc1c5c411a9fdfa6a9a09ce8a021a94d42c4fc3dba72da393bf5bd684b7786eb4ab8abbf52a01fad393775ef5d63162638e6431d17ba27df30 + languageName: node + linkType: hard + +"@cspell/dict-dart@npm:^2.3.0": + version: 2.3.0 + resolution: "@cspell/dict-dart@npm:2.3.0" + checksum: 10/9ae3c33585959bcdf2886bd2cbf81a05d36872d8d3a7bdfa72ab3c97549735abf9b82e1aa47c3590953a4621c0250b04fb1330b23d8030a1ae86ac3a6d68b26f + languageName: node + linkType: hard + +"@cspell/dict-data-science@npm:^2.0.8": + version: 2.0.8 + resolution: "@cspell/dict-data-science@npm:2.0.8" + checksum: 10/cf0e0519d0c5be29341c3333c964488b3698839d2d5b5bd7bc6e541cd3b87b1f2c19319dd486bcf6b78f9a1b40e2e056ed4296249c5cadd116a5b7cb7d73a6f5 + languageName: node + linkType: hard + +"@cspell/dict-django@npm:^4.1.4": + version: 4.1.4 + resolution: "@cspell/dict-django@npm:4.1.4" + checksum: 10/eabbc9af5795e79ea9f7e96a54590400894751618bd208ef1b2c0fd7d6b964805ab20bbc4eb699153fa4fd2b73a7e4de158d3bb0ad53a86ac719998701f8f4a4 + languageName: node + linkType: hard + +"@cspell/dict-docker@npm:^1.1.14": + version: 1.1.14 + resolution: "@cspell/dict-docker@npm:1.1.14" + checksum: 10/4eb96da9d9912bbbc8b3522ac58e5f65b77b72aa2e5b2bdffbc604b6ece9dedfa7a4643beb71ede9e15e78735f9c13ff705b7243872eaedb11a83f4f06a3d6cd + languageName: node + linkType: hard + +"@cspell/dict-dotnet@npm:^5.0.9": + version: 5.0.9 + resolution: "@cspell/dict-dotnet@npm:5.0.9" + checksum: 10/42537b3519b8d9527a2606f265204ef4a0e74e84958a695b72ebc5ab0b9895bb2af928061bd6fe376e96b04414bfeca41347a1f3d5e27c2884787d3d0c5527cb + languageName: node + linkType: hard + +"@cspell/dict-elixir@npm:^4.0.7": + version: 4.0.7 + resolution: "@cspell/dict-elixir@npm:4.0.7" + checksum: 10/c4b717617603eb6b0b9d3d785f4917b34d187fe1f97e4a65147907da440df2b0a878f6382b621914e3a40336d613d24f011fa17c32aab31ad7183e0f065d8721 + languageName: node + linkType: hard + +"@cspell/dict-en-common-misspellings@npm:^2.1.1": + version: 2.1.1 + resolution: "@cspell/dict-en-common-misspellings@npm:2.1.1" + checksum: 10/d49714b1555450c041c328ae83425c22cfa802253065f4e4dad5cda84a953d6a0186c011c91cf78640a855c33d6c47167765a803274ae06719637ef13eded479 + languageName: node + linkType: hard + +"@cspell/dict-en-gb-mit@npm:^3.1.1": + version: 3.1.1 + resolution: "@cspell/dict-en-gb-mit@npm:3.1.1" + checksum: 10/83bd4ea01dfbb3d0b0305660217447062e09a93d37031b5bfc734041b51628a376c7010a997983b536fd9fba1baa9347177ee84aabf079d6a1e438f4be769227 + languageName: node + linkType: hard + +"@cspell/dict-en_us@npm:^4.4.11": + version: 4.4.11 + resolution: "@cspell/dict-en_us@npm:4.4.11" + checksum: 10/317cefe1a6a6b285e501cecd1dc3c0c859c89c2ce4876bf14c0efbfff7e9c8f7dbf891d3d0ac70e7e282c59d1501c8463e6b1e82b7cd3ea9b6ec43499485ab18 + languageName: node + linkType: hard + +"@cspell/dict-filetypes@npm:^3.0.12": + version: 3.0.12 + resolution: "@cspell/dict-filetypes@npm:3.0.12" + checksum: 10/f60959e7b72e9a4d5e2cd0cffe80cf3335184d2a303a41aaef046905097deab627ed1e30a93b92040e1ddcb53e4bb24cd7c1547c4ae906ab1af2840d8d44d2f9 + languageName: node + linkType: hard + +"@cspell/dict-flutter@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-flutter@npm:1.1.0" + checksum: 10/b8944d7c91b8617727dcca2191e2bdea4e97a3c2e76e6b8e015805f31dac99040da8ef74035c917c77646dfb19f1efe916d51e5171c54209850daf4be0db046c + languageName: node + linkType: hard + +"@cspell/dict-fonts@npm:^4.0.4": + version: 4.0.4 + resolution: "@cspell/dict-fonts@npm:4.0.4" + checksum: 10/04eeb3558b8903b83f042d8cfe8e9047a2d804591c8877ec6e75efb4f7399c39333190a9c49dab6321c4c41ef9162cdec4e607b9b0a532d0b77a536bb2443678 + languageName: node + linkType: hard + +"@cspell/dict-fsharp@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-fsharp@npm:1.1.0" + checksum: 10/2f667bc9ef55034a603147404f9e55a29b68210acd84938695404d12ede34a060202d109a8c2deada5c863b75b8b5946c2f74e583be18c2e9727423563d914db + languageName: node + linkType: hard + +"@cspell/dict-fullstack@npm:^3.2.6": + version: 3.2.6 + resolution: "@cspell/dict-fullstack@npm:3.2.6" + checksum: 10/f76b27b1b3a35e4e68781071e87aaeff034111861b395ddf3a15a99dc30d1e7202db2deb3707d3efa7d65d4fd4ff90b0c4fa5871d7599bce9f1785f3e193f93e + languageName: node + linkType: hard + +"@cspell/dict-gaming-terms@npm:^1.1.1": + version: 1.1.1 + resolution: "@cspell/dict-gaming-terms@npm:1.1.1" + checksum: 10/9ca5a3b319924a4dd0eb53aeaa691cf2002c58a990c981a87ddbc64b0b95d1145b1b0aafca749f25f2bc0e2071efa95fe623ea17f587a79b2399da444abfce91 + languageName: node + linkType: hard + +"@cspell/dict-git@npm:^3.0.6": + version: 3.0.6 + resolution: "@cspell/dict-git@npm:3.0.6" + checksum: 10/59ea34c35efa23990946ababb1a2cd3590d4cb9bae3281961c8e77e56082843500a5ffc3d9bc1c9192c5fdc63f40edc4ab7828b597f072ef4b39d2f936c7c72e + languageName: node + linkType: hard + +"@cspell/dict-golang@npm:^6.0.22": + version: 6.0.22 + resolution: "@cspell/dict-golang@npm:6.0.22" + checksum: 10/bb0debb950409ea71d79f164794964e7a6cd691e036c38cb25a014fb31d2d8a7ba2e20b55995c0ae1df9c9e5c1c24c73dd2100a8003e24746dda604682cee6ad + languageName: node + linkType: hard + +"@cspell/dict-google@npm:^1.0.8": + version: 1.0.8 + resolution: "@cspell/dict-google@npm:1.0.8" + checksum: 10/5f60902d0b37a1f866d084cae3507e825cf026950c293d43d715caf8285a96b2b7b41642aab18a7aee76db4a2a2ae5354e312d256edb0d470dc37b7d8bbfa224 + languageName: node + linkType: hard + +"@cspell/dict-haskell@npm:^4.0.5": + version: 4.0.5 + resolution: "@cspell/dict-haskell@npm:4.0.5" + checksum: 10/4f663d904c17f760e10f457669665e2a4c205ef27389e82e61b4017c1bfd1e446db7401ee5fcca74a9441135ae17130e8f92601bdd6b0837850f0636ea170088 + languageName: node + linkType: hard + +"@cspell/dict-html-symbol-entities@npm:^4.0.3": + version: 4.0.3 + resolution: "@cspell/dict-html-symbol-entities@npm:4.0.3" + checksum: 10/0cef821bf2400a3f8b0d3c94eb8c5de531cbf3ed409d95faf5aaa7f272774ab1e6fa0f315c0902cc661d81bf52075f134b7687bec9c9f1184d176517b3781671 + languageName: node + linkType: hard + +"@cspell/dict-html@npm:^4.0.11": + version: 4.0.11 + resolution: "@cspell/dict-html@npm:4.0.11" + checksum: 10/56b44c4ccccd9f702e1108e4a271562fa36062a6cbd53fb37eceb844b88e27fcaeffc1c0452933e959dd92bed1c509377733fc3272c8d2a12b92eb2aad6614e9 + languageName: node + linkType: hard + +"@cspell/dict-java@npm:^5.0.11": + version: 5.0.11 + resolution: "@cspell/dict-java@npm:5.0.11" + checksum: 10/5ec2186ce067caa92b5af57f3f76b1d60463db2a24a6a3c605556ecd2adb7be07177e2f1b399376ad08e0dbfae4551c94df004b6c4db776f09806cd2bf525f9f + languageName: node + linkType: hard + +"@cspell/dict-julia@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-julia@npm:1.1.0" + checksum: 10/80a7acd8d81259f6d37e740528743d36ed29229d81352e1b72ca4c1bd13c4a2285f6e0e93de330f537f2fdc9ba02b25c455b7b33995204a6487eb444dbbec062 + languageName: node + linkType: hard + +"@cspell/dict-k8s@npm:^1.0.11": + version: 1.0.11 + resolution: "@cspell/dict-k8s@npm:1.0.11" + checksum: 10/b2dfc671eab70ff37f7616536585da95778b81fd97368a89de740b4c450339be8c4822f1cf5201825018df1a62407ae3e08c3749491d9afaa831a56f0e80c442 + languageName: node + linkType: hard + +"@cspell/dict-kotlin@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-kotlin@npm:1.1.0" + checksum: 10/6127b64037e9c4f0be49fd9be3435c999361001cf52dcf6f47f0467add55df4ca95c0a0056b4bfdcdd1363132892087a30475a664e2176bc487311346a22474e + languageName: node + linkType: hard + +"@cspell/dict-latex@npm:^4.0.3": + version: 4.0.3 + resolution: "@cspell/dict-latex@npm:4.0.3" + checksum: 10/9dbe412991e5323d8feca08c3fc13c3afb0b330c7c41df71ef19032d988f0bf2469e00ac7595b25c26f4962fcba03efa2eab86c3246d92dc6f86bade03d94528 + languageName: node + linkType: hard + +"@cspell/dict-lorem-ipsum@npm:^4.0.4": + version: 4.0.4 + resolution: "@cspell/dict-lorem-ipsum@npm:4.0.4" + checksum: 10/f75cca35d89aa407a21875b2c58b5c959c0a06aed1aaea4a8b91a7e42e3d83ae1604a735e184cc7b4b3c294189013be5f46888ee46526284f99b21da391a8ef6 + languageName: node + linkType: hard + +"@cspell/dict-lua@npm:^4.0.7": + version: 4.0.7 + resolution: "@cspell/dict-lua@npm:4.0.7" + checksum: 10/ef1ad0f059f5e2c99e6741633c75ed59640bd4c3b421c8c7af124facafc9c4ecb578e1bfe2a180d63e0063c508dec31db2615a864744c2737ed0d47fa4daaaad + languageName: node + linkType: hard + +"@cspell/dict-makefile@npm:^1.0.4": + version: 1.0.4 + resolution: "@cspell/dict-makefile@npm:1.0.4" + checksum: 10/1aece9d61e21aabaad8cd8048f7647739d6a48ab532b4637b72b53d4360dc6780dc4be35a14de541a3dd05b076efd9f106af83fa0e7ca3ae149c86143a72b96b + languageName: node + linkType: hard + +"@cspell/dict-markdown@npm:^2.0.11": + version: 2.0.11 + resolution: "@cspell/dict-markdown@npm:2.0.11" + peerDependencies: + "@cspell/dict-css": ^4.0.17 + "@cspell/dict-html": ^4.0.11 + "@cspell/dict-html-symbol-entities": ^4.0.3 + "@cspell/dict-typescript": ^3.2.2 + checksum: 10/c29a0343c8640b249453e36fdd4ff3a4a752d7b1a0f1deba90b6b2fdc3797245deff79ac412b409af9adb315e6de6886de004233674d053d9825b89df9557414 + languageName: node + linkType: hard + +"@cspell/dict-monkeyc@npm:^1.0.10": + version: 1.0.10 + resolution: "@cspell/dict-monkeyc@npm:1.0.10" + checksum: 10/670443bfc5be5d69a5b4bc22330191f586bbfd29220c00d69473eea4f2c0c94321b42d83c74e98fde6fc0fe4e933425dcffa2941b62111326b50effd101fb2d7 + languageName: node + linkType: hard + +"@cspell/dict-node@npm:^5.0.7": + version: 5.0.7 + resolution: "@cspell/dict-node@npm:5.0.7" + checksum: 10/8470bc2ae50a4be73a501a43b35239c0a9a0841a67364ee794ef422280bb9de6ee01f19e0bb333daac4a9e99ca746571811789a919c042dd4130b3f7803597d8 + languageName: node + linkType: hard + +"@cspell/dict-npm@npm:^5.2.6": + version: 5.2.6 + resolution: "@cspell/dict-npm@npm:5.2.6" + checksum: 10/bfa955d00c189dd6d3273f195ba17734c6914c80b1e8b5606100641efb8fb2dd39dd4d283cc9dfc7dbfd81a5ef46035642336c0206aa8b44a83121997adc722d + languageName: node + linkType: hard + +"@cspell/dict-php@npm:^4.0.14": + version: 4.0.14 + resolution: "@cspell/dict-php@npm:4.0.14" + checksum: 10/5f245f70076fe637ba89ff45dae3772cb57822d32b84c2a8f511abe22ab9ae746f64c0fa429937940c16ab6c08b41ce03f6aa233c67af11cfb505fd5c813c518 + languageName: node + linkType: hard + +"@cspell/dict-powershell@npm:^5.0.14": + version: 5.0.14 + resolution: "@cspell/dict-powershell@npm:5.0.14" + checksum: 10/7d527250933e8597ee2b694e70d7abf094b3ba5a2058b37934423cb2cb13384f7d79ca660ff723bea2c80390d5a30948e065369bfd2de1cc4281172b703d711f + languageName: node + linkType: hard + +"@cspell/dict-public-licenses@npm:^2.0.13": + version: 2.0.13 + resolution: "@cspell/dict-public-licenses@npm:2.0.13" + checksum: 10/f3aee5da76fca275c139a4a08b46cbfcb41e14cfb2c0933e413b2b3ef116f0421b34f8bd478d6fae69b199ea19ab3f46353c9aae4231492169fdf09823bcba32 + languageName: node + linkType: hard + +"@cspell/dict-python@npm:^4.2.18": + version: 4.2.18 + resolution: "@cspell/dict-python@npm:4.2.18" + dependencies: + "@cspell/dict-data-science": "npm:^2.0.8" + checksum: 10/f4152311ef3f54cc9e053773c7110666e50231b8177afc433a5b629191df091e49b5850e929dcc6a77eb3830cba94d5e12f7ef81294b473a6c9d398e135649b9 + languageName: node + linkType: hard + +"@cspell/dict-r@npm:^2.1.0": + version: 2.1.0 + resolution: "@cspell/dict-r@npm:2.1.0" + checksum: 10/5ba48ac82578feade56196fa6c236a2bbea5555ce9cade2966a0c2bbd676b37aeac06556079ca7a306189ff8e9f811ca4c1b01c58ddbcdda447a9434277792c9 + languageName: node + linkType: hard + +"@cspell/dict-ruby@npm:^5.0.8": + version: 5.0.8 + resolution: "@cspell/dict-ruby@npm:5.0.8" + checksum: 10/62734eb3a5178e6dee5feeff8e4a59b8da42e64f895191e765a2ec134c9da54480967e355766ee4440f5a912eecdfb37d97c377351c526fab7a07bc38a03659f + languageName: node + linkType: hard + +"@cspell/dict-rust@npm:^4.0.11": + version: 4.0.11 + resolution: "@cspell/dict-rust@npm:4.0.11" + checksum: 10/e336ad35129660bfde98efa9498a0b7237374ee9026baf7366a52f73f5c1a85cd0ed9dffcead7af2350155456ba8f1157d63dd17061a6187d1eabedaf33372ef + languageName: node + linkType: hard + +"@cspell/dict-scala@npm:^5.0.7": + version: 5.0.7 + resolution: "@cspell/dict-scala@npm:5.0.7" + checksum: 10/61be6c9e06e28aca7da228e4c09badcf429562fc00ad183de9320d60d21e12fb73ddb6fab7a943fab808cd00ace3cba872971a61d09c3c3bfb9b8d46592c1126 + languageName: node + linkType: hard + +"@cspell/dict-shell@npm:1.1.0, @cspell/dict-shell@npm:^1.1.0": + version: 1.1.0 + resolution: "@cspell/dict-shell@npm:1.1.0" + checksum: 10/80e17a64b69fcacda061bd0645917fdadbceeaa5a6388417c4193da062ba11eaf19839d79d0d172360eba9ab532571e8fce93cce14a9d383f2c6c56ba9112c43 + languageName: node + linkType: hard + +"@cspell/dict-software-terms@npm:^5.1.0": + version: 5.1.0 + resolution: "@cspell/dict-software-terms@npm:5.1.0" + checksum: 10/b747e36c90149e0254952306cf7169e1e4f08561b6a2f142f3e9fafd8d5f441a6aa002a22dd811e710caff0dc8910904c1a6c3fb9d888cf2a5ae60be08304c72 + languageName: node + linkType: hard + +"@cspell/dict-sql@npm:^2.2.0": + version: 2.2.0 + resolution: "@cspell/dict-sql@npm:2.2.0" + checksum: 10/46a02b2a8086802aaf5b81d7570c56a73f4bbb59ffc97823c41041521a33d85d6f0b065753bbc11776f670fc98846c28ee9496cb03c79f0b87f361f9ffd3c03d + languageName: node + linkType: hard + +"@cspell/dict-svelte@npm:^1.0.6": + version: 1.0.6 + resolution: "@cspell/dict-svelte@npm:1.0.6" + checksum: 10/b6c4fb7738cc3070d3d6aa843e9a0ef9783a8e64368d0d4e0689e4680f6640760feb03db6c20e3a997d72381938cf669359e1d2730a1d14a6daa014c324ad160 + languageName: node + linkType: hard + +"@cspell/dict-swift@npm:^2.0.5": + version: 2.0.5 + resolution: "@cspell/dict-swift@npm:2.0.5" + checksum: 10/09c84f12840f1ef000c0a775ba94ee49e7726d552744be4f21000a8fd45ac7608d4142f8cd9e28a111ac9afd0c0a657183cad35ff899178c02254c27593c3704 + languageName: node + linkType: hard + +"@cspell/dict-terraform@npm:^1.1.1": + version: 1.1.1 + resolution: "@cspell/dict-terraform@npm:1.1.1" + checksum: 10/0843bbb0e3142caa6f878bde7850683913ffc7501a7c468ba6c0ff14e98c6938c86da04d1ed9a4be161b5b0a22d16bdc7947aa2a02b6e0268939defb9ae96529 + languageName: node + linkType: hard + +"@cspell/dict-typescript@npm:^3.2.2": + version: 3.2.2 + resolution: "@cspell/dict-typescript@npm:3.2.2" + checksum: 10/07776216ffa12231e00b89204eb06276d2d1bc5b058e1e24255c28ba019701a71d7399f3c207c29f78ae32ce77e73a74592f7a9ab06915d88b2c24c16060d8a2 + languageName: node + linkType: hard + +"@cspell/dict-vue@npm:^3.0.4": + version: 3.0.4 + resolution: "@cspell/dict-vue@npm:3.0.4" + checksum: 10/53904dcaf74ac5e20814ebc2aa484ad6cc607091312c8eeaefb81ada060869c20625accda5e35939e53c148261c67c4129f859fbf50da28cfa5b30d70290ee15 + languageName: node + linkType: hard + +"@cspell/dynamic-import@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/dynamic-import@npm:9.1.1" + dependencies: + "@cspell/url": "npm:9.1.1" + import-meta-resolve: "npm:^4.1.0" + checksum: 10/537f9087bf62b79b8198834c3b34a1bf1afac1884a1afcdbf0a3bb4a624596a53f9adf054b1df9a7eb9c89c46b891264d5a9bb43463d5a3bd67258adefc040f2 + languageName: node + linkType: hard + +"@cspell/filetypes@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/filetypes@npm:9.1.1" + checksum: 10/0ad26cf2744dce5aa93413a01d9783b30cd5ea5651341479ae82222fa10209ba2f8830e064e89a7d2600e7825e8e0c7e060a84c07deeb1d1db97fb5b2ed76dc3 + languageName: node + linkType: hard + +"@cspell/strong-weak-map@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/strong-weak-map@npm:9.1.1" + checksum: 10/b3d0ac48eb9b4fd02597691630f2282845624381272dede6e0366fdec203c176b86cb2c996152059093061e702eb4dd8ec1246bd534dca48c2f1bff0bd249ba5 + languageName: node + linkType: hard + +"@cspell/url@npm:9.1.1": + version: 9.1.1 + resolution: "@cspell/url@npm:9.1.1" + checksum: 10/b67c30963ead02e46b57a42b2b21afea938a6b9cd56dee6750f3d21e42c893bde7b7bad1ff2d00bc9d4b22b235c74bcf1e0dceaf04ee9a70c9f8f14cdcd547bb + languageName: node + linkType: hard + +"@emnapi/core@npm:^1.4.3": + version: 1.4.3 + resolution: "@emnapi/core@npm:1.4.3" + dependencies: + "@emnapi/wasi-threads": "npm:1.0.2" + tslib: "npm:^2.4.0" + checksum: 10/b511f66b897d2019835391544fdf11f4fa0ce06cc1181abfa17c7d4cf03aaaa4fc8a64fcd30bb3f901de488d0a6f370b53a8de2215a898f5a4ac98015265b3b7 + languageName: node + linkType: hard + +"@emnapi/runtime@npm:^1.4.3": + version: 1.4.3 + resolution: "@emnapi/runtime@npm:1.4.3" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10/4f90852a1a5912982cc4e176b6420556971bcf6a85ee23e379e2455066d616219751367dcf43e6a6eaf41ea7e95ba9dc830665a52b5d979dfe074237d19578f8 + languageName: node + linkType: hard + +"@emnapi/wasi-threads@npm:1.0.2": + version: 1.0.2 + resolution: "@emnapi/wasi-threads@npm:1.0.2" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10/e82941776665eb958c2084728191d6b15a94383449975c4621b67a1c8217e1c0ec11056a693906c76863cb96f782f8be500510ecec6874e3f5da35a8e7968cfd + languageName: node + linkType: hard + +"@esbuild/aix-ppc64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/aix-ppc64@npm:0.25.5" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/android-arm64@npm:0.25.5" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/android-arm@npm:0.25.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/android-x64@npm:0.25.5" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/darwin-arm64@npm:0.25.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/darwin-x64@npm:0.25.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/freebsd-arm64@npm:0.25.5" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/freebsd-x64@npm:0.25.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-arm64@npm:0.25.5" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-arm@npm:0.25.5" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-ia32@npm:0.25.5" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-loong64@npm:0.25.5" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-mips64el@npm:0.25.5" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-ppc64@npm:0.25.5" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-riscv64@npm:0.25.5" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-s390x@npm:0.25.5" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/linux-x64@npm:0.25.5" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/netbsd-arm64@npm:0.25.5" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/netbsd-x64@npm:0.25.5" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/openbsd-arm64@npm:0.25.5" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/openbsd-x64@npm:0.25.5" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/sunos-x64@npm:0.25.5" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/win32-arm64@npm:0.25.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/win32-ia32@npm:0.25.5" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.25.5": + version: 0.25.5 + resolution: "@esbuild/win32-x64@npm:0.25.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.5.0, @eslint-community/eslint-utils@npm:^4.5.1, @eslint-community/eslint-utils@npm:^4.7.0": + version: 4.7.0 + resolution: "@eslint-community/eslint-utils@npm:4.7.0" + dependencies: + eslint-visitor-keys: "npm:^3.4.3" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: 10/43ed5d391526d9f5bbe452aef336389a473026fca92057cf97c576db11401ce9bcf8ef0bf72625bbaf6207ed8ba6bf0dcf4d7e809c24f08faa68a28533c491a7 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0, @eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.8.0": + version: 4.12.1 + resolution: "@eslint-community/regexpp@npm:4.12.1" + checksum: 10/c08f1dd7dd18fbb60bdd0d85820656d1374dd898af9be7f82cb00451313402a22d5e30569c150315b4385907cdbca78c22389b2a72ab78883b3173be317620cc + languageName: node + linkType: hard + +"@eslint-react/ast@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/ast@npm:1.52.2" + dependencies: + "@eslint-react/eff": "npm:1.52.2" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/typescript-estree": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + checksum: 10/ab378db1c3e29770f7b37ed839fd21e5251405232013d0ef3b7858150e68dc703334d5e9b93b28331c81906127dba421bb0055d54400f945e1716b1fb266aa0f + languageName: node + linkType: hard + +"@eslint-react/core@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/core@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + birecord: "npm:^0.1.1" + ts-pattern: "npm:^5.7.1" + checksum: 10/4ba2d70f90141079540baf269e0505d55fdb955e321eb949ca809b8dbc2cb467e24311f9c0ce5361f23c99db169142dc72117d0c384c92ebd99fcc4b0e43ed39 + languageName: node + linkType: hard + +"@eslint-react/eff@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/eff@npm:1.52.2" + checksum: 10/82b3ced0062a2df67e3b8d17b8e7319ed55f0979fef57dc9e1c1d168dc413331e19712c8ced1c1128b20343d043f76604659880402b75f41910d2c97a084e071 + languageName: node + linkType: hard + +"@eslint-react/eslint-plugin@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/eslint-plugin@npm:1.52.2" + dependencies: + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + eslint-plugin-react-debug: "npm:1.52.2" + eslint-plugin-react-dom: "npm:1.52.2" + eslint-plugin-react-hooks-extra: "npm:1.52.2" + eslint-plugin-react-naming-convention: "npm:1.52.2" + eslint-plugin-react-web-api: "npm:1.52.2" + eslint-plugin-react-x: "npm:1.52.2" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/48c49e51a258eb0c065002f29718408526780d7d832e861091c0110872fe0da8d1c21ec030fd1f85b5471470b2cde7b97c6c174e8183cc0b956cfc4bbdc9de23 + languageName: node + linkType: hard + +"@eslint-react/kit@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/kit@npm:1.52.2" + dependencies: + "@eslint-react/eff": "npm:1.52.2" + "@typescript-eslint/utils": "npm:^8.34.0" + ts-pattern: "npm:^5.7.1" + zod: "npm:^3.25.63" + checksum: 10/88bba18357afef421b254727734ad1851086e00dfa40ed2f69e5c531b40e52e34056780553c7fa8520619013fa6abbc733b1ea218752d1e5d6d2a51cd9959943 + languageName: node + linkType: hard + +"@eslint-react/shared@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/shared@npm:1.52.2" + dependencies: + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@typescript-eslint/utils": "npm:^8.34.0" + ts-pattern: "npm:^5.7.1" + zod: "npm:^3.25.63" + checksum: 10/83979ddf2da7c06aed39587b02678cd3daa8a8054f72f3f1586c6e710b601c7d000dd50dca8324f754c2165a8572e138cc2634c5831117e3c7666e24d4325371 + languageName: node + linkType: hard + +"@eslint-react/var@npm:1.52.2": + version: 1.52.2 + resolution: "@eslint-react/var@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + checksum: 10/d14a950432237fba13d18bce390c82cb0aaa2246d564263d33136757a41e43c4bde9035fbae86c26dc690f988613ca2c3ec21ae636636010603ecc07944b9a35 + languageName: node + linkType: hard + +"@eslint/config-array@npm:^0.20.1": + version: 0.20.1 + resolution: "@eslint/config-array@npm:0.20.1" + dependencies: + "@eslint/object-schema": "npm:^2.1.6" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10/d72cc90f516c5730da5f37fa04aa8ba26ea0d92c7457ee77980902158f844f3483518272ccfe16f273c3313c3bfec8da713d4e51d3da49bdeccd34e919a2b903 + languageName: node + linkType: hard + +"@eslint/config-helpers@npm:^0.2.1": + version: 0.2.2 + resolution: "@eslint/config-helpers@npm:0.2.2" + checksum: 10/55dbb0b8d63c4cb28fa2a5fd5f16c785f6bd87eb0f50d2f42ec3f7d06b5c6201e2e170846a4360ca00105578b034fba132ed54e4ee3215be240c4a43e7839189 + languageName: node + linkType: hard + +"@eslint/core@npm:^0.13.0": + version: 0.13.0 + resolution: "@eslint/core@npm:0.13.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10/737fd1c237405b62592e8daa4b7e25b45ab22108bfec65258cabd091d5717b7c9573acea1f27c4ee7198cefc5a0874f5caefe3d9636851227b1f12d28ef52cf2 + languageName: node + linkType: hard + +"@eslint/core@npm:^0.14.0": + version: 0.14.0 + resolution: "@eslint/core@npm:0.14.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10/d9b060cf97468150675ddf4fb3db55edaa32467e0adf9f80919a5bfd15d0835ad7765456f4397ec2d16b0a1bb702af63f6d4712f94194d34fea118231ae1e2db + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.3.1": + version: 3.3.1 + resolution: "@eslint/eslintrc@npm:3.3.1" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10/cc240addbab3c5fceaa65b2c8d5d4fd77ddbbf472c2f74f0270b9d33263dc9116840b6099c46b64c9680301146250439b044ed79278a1bcc557da412a4e3c1bb + languageName: node + linkType: hard + +"@eslint/js@npm:9.29.0": + version: 9.29.0 + resolution: "@eslint/js@npm:9.29.0" + checksum: 10/7f7fd586b35bd08537dd65a9bda764f474350c36b4ccbdd342462d1a26be28f7ee0ebd0611dd4762b69829674336ba04c281b9658aeccb3e6ab1d0fec7e6d08c + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.6": + version: 2.1.6 + resolution: "@eslint/object-schema@npm:2.1.6" + checksum: 10/266085c8d3fa6cd99457fb6350dffb8ee39db9c6baf28dc2b86576657373c92a568aec4bae7d142978e798b74c271696672e103202d47a0c148da39154351ed6 + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.2.7": + version: 0.2.8 + resolution: "@eslint/plugin-kit@npm:0.2.8" + dependencies: + "@eslint/core": "npm:^0.13.0" + levn: "npm:^0.4.1" + checksum: 10/2e7fe7a88ebdbbf805e9e7265347b7dcfb6bf50beec314def997572b2e8ae4a7b9504fb67b1698a70c348a0dd87251d1e9028292a96fd49b58cb5277d88bdea7 + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.3.1": + version: 0.3.1 + resolution: "@eslint/plugin-kit@npm:0.3.1" + dependencies: + "@eslint/core": "npm:^0.14.0" + levn: "npm:^0.4.1" + checksum: 10/ab0c4cecadc6c38c7ae5f71b9831d3521d08237444d8f327751d1133a4369ccd42093a1c06b26fd6c311015807a27d95a0184a761d1cdd264b090896dcf0addb + languageName: node + linkType: hard + +"@glimmer/interfaces@npm:0.94.6": + version: 0.94.6 + resolution: "@glimmer/interfaces@npm:0.94.6" + dependencies: + "@simple-dom/interface": "npm:^1.4.0" + type-fest: "npm:^4.35.0" + checksum: 10/38f7f7367d4de059892779119d60bf254ca0232d290f16b338ea84f1d0e25099c83db016e33073fd02abd854919c13b1b1692e227b22b466a7a25e3fa8f93fd5 + languageName: node + linkType: hard + +"@glimmer/syntax@npm:0.94.9": + version: 0.94.9 + resolution: "@glimmer/syntax@npm:0.94.9" + dependencies: + "@glimmer/interfaces": "npm:0.94.6" + "@glimmer/util": "npm:0.94.8" + "@glimmer/wire-format": "npm:0.94.8" + "@handlebars/parser": "npm:~2.0.0" + simple-html-tokenizer: "npm:^0.5.11" + checksum: 10/b2ed32fc4614b609f6088f8be74cad163b78835f69661a7b111c98e8a4de0e9eab481026f908e6cfd79408806a7f5f49aff08deeba859e9fcec3bef2a515154f + languageName: node + linkType: hard + +"@glimmer/util@npm:0.94.8": + version: 0.94.8 + resolution: "@glimmer/util@npm:0.94.8" + dependencies: + "@glimmer/interfaces": "npm:0.94.6" + checksum: 10/97887e287d3115dbc9b8f7b5e506c5e9bba57e79aadb8a1cf774cd7d5fd752027ca6487d65f63b61bf5da737606ccb1d834b26a7a80947e7f01699e6c54101d8 + languageName: node + linkType: hard + +"@glimmer/wire-format@npm:0.94.8": + version: 0.94.8 + resolution: "@glimmer/wire-format@npm:0.94.8" + dependencies: + "@glimmer/interfaces": "npm:0.94.6" + checksum: 10/62c833c433b41e8717d9d7eeae302abd0ac3dc1ef52641a77a4fc276d02e00b881bfadac8d1268222af9103103b80036ce22c3c69901ffd2e276df2352095c98 + languageName: node + linkType: hard + +"@handlebars/parser@npm:~2.0.0": + version: 2.0.0 + resolution: "@handlebars/parser@npm:2.0.0" + checksum: 10/1c7c7fbe5dac683483fc963a932bfa856429342ac55c4f41c91a519cb7bb0ccb81259c0aadb8b1bbe59600c8050502bec0d493fbd497ce6e310c60f2aebec58f + languageName: node + linkType: hard + +"@humanfs/core@npm:^0.19.1": + version: 0.19.1 + resolution: "@humanfs/core@npm:0.19.1" + checksum: 10/270d936be483ab5921702623bc74ce394bf12abbf57d9145a69e8a0d1c87eb1c768bd2d93af16c5705041e257e6d9cc7529311f63a1349f3678abc776fc28523 + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.6": + version: 0.16.6 + resolution: "@humanfs/node@npm:0.16.6" + dependencies: + "@humanfs/core": "npm:^0.19.1" + "@humanwhocodes/retry": "npm:^0.3.0" + checksum: 10/6d43c6727463772d05610aa05c83dab2bfbe78291022ee7a92cb50999910b8c720c76cc312822e2dea2b497aa1b3fef5fe9f68803fc45c9d4ed105874a65e339 + languageName: node + linkType: hard + +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 10/e993950e346331e5a32eefb27948ecdee2a2c4ab3f072b8f566cd213ef485dd50a3ca497050608db91006f5479e43f91a439aef68d2a313bd3ded06909c7c5b3 + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.1 + resolution: "@humanwhocodes/retry@npm:0.3.1" + checksum: 10/eb457f699529de7f07649679ec9e0353055eebe443c2efe71c6dd950258892475a038e13c6a8c5e13ed1fb538cdd0a8794faa96b24b6ffc4c87fb1fc9f70ad7f + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.4.2": + version: 0.4.3 + resolution: "@humanwhocodes/retry@npm:0.4.3" + checksum: 10/0b32cfd362bea7a30fbf80bb38dcaf77fee9c2cae477ee80b460871d03590110ac9c77d654f04ec5beaf71b6f6a89851bdf6c1e34ccdf2f686bd86fcd97d9e61 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10/4412e9e6713c89c1e66d80bb0bb5a2a93192f10477623a27d08f228ba0316bb880affabc5bfe7f838f58a34d26c2c190da726e576cdfc18c49a72e89adabdcf5 + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + +"@jest/console@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/console@npm:30.0.2" + dependencies: + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + jest-message-util: "npm:30.0.2" + jest-util: "npm:30.0.2" + slash: "npm:^3.0.0" + checksum: 10/660f8c119101666ed07e5ef33b8beb086547b646c4fd50912e1a1bc9b6234538949954de7f88c24070b6940a51b7cc6a148af5bcd45887a97719c13168bdcf3d + languageName: node + linkType: hard + +"@jest/core@npm:30.0.3": + version: 30.0.3 + resolution: "@jest/core@npm:30.0.3" + dependencies: + "@jest/console": "npm:30.0.2" + "@jest/pattern": "npm:30.0.1" + "@jest/reporters": "npm:30.0.2" + "@jest/test-result": "npm:30.0.2" + "@jest/transform": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + ansi-escapes: "npm:^4.3.2" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + exit-x: "npm:^0.2.2" + graceful-fs: "npm:^4.2.11" + jest-changed-files: "npm:30.0.2" + jest-config: "npm:30.0.3" + jest-haste-map: "npm:30.0.2" + jest-message-util: "npm:30.0.2" + jest-regex-util: "npm:30.0.1" + jest-resolve: "npm:30.0.2" + jest-resolve-dependencies: "npm:30.0.3" + jest-runner: "npm:30.0.3" + jest-runtime: "npm:30.0.3" + jest-snapshot: "npm:30.0.3" + jest-util: "npm:30.0.2" + jest-validate: "npm:30.0.2" + jest-watcher: "npm:30.0.2" + micromatch: "npm:^4.0.8" + pretty-format: "npm:30.0.2" + slash: "npm:^3.0.0" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 10/1f214b3abc7aa4a469256c062b02f1237034749d4199bf90cbc4842cd14b95970a1dd9166772bebff49c81e79dbeeeb170a8346d46eebb7d5386a5bc42692017 + languageName: node + linkType: hard + +"@jest/diff-sequences@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/diff-sequences@npm:30.0.1" + checksum: 10/0ddb7c7ba92d6057a2ee51a9cfc2155b77cca707fe959167466ea02dcb0687018cc3c22b9622f25f3a417d6ad370e2d4dcfedf9f1410dc9c02954a7484423cc7 + languageName: node + linkType: hard + +"@jest/environment@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/environment@npm:30.0.2" + dependencies: + "@jest/fake-timers": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + jest-mock: "npm:30.0.2" + checksum: 10/1494352b70b5e33c50692ccd45b506db019709dada33b8600d43c09e6ec29476aab3ea200221adec359f57556903c5ad0a36c66528c6be5bca06c2e7ca5157d4 + languageName: node + linkType: hard + +"@jest/expect-utils@npm:30.0.3": + version: 30.0.3 + resolution: "@jest/expect-utils@npm:30.0.3" + dependencies: + "@jest/get-type": "npm:30.0.1" + checksum: 10/762445f363a3293d9ad5c25b2c1a4063310492429705d6dc7d28692135e380593503643eed1846b4b274c9322154c313d98bd32f2be942b10974162a572bbb37 + languageName: node + linkType: hard + +"@jest/expect-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect-utils@npm:29.7.0" + dependencies: + jest-get-type: "npm:^29.6.3" + checksum: 10/ef8d379778ef574a17bde2801a6f4469f8022a46a5f9e385191dc73bb1fc318996beaed4513fbd7055c2847227a1bed2469977821866534593a6e52a281499ee + languageName: node + linkType: hard + +"@jest/expect@npm:30.0.3, @jest/expect@npm:^30.0.0": + version: 30.0.3 + resolution: "@jest/expect@npm:30.0.3" + dependencies: + expect: "npm:30.0.3" + jest-snapshot: "npm:30.0.3" + checksum: 10/96ea04e65b4bc2e4974dc88608d52f66b9347b59d06c257b37a6e9a23ba7f8f833423526a08a248ae95f992f3da04e6a7bdddbfe657252adb55be07fb749c450 + languageName: node + linkType: hard + +"@jest/fake-timers@npm:30.0.2, @jest/fake-timers@npm:^30.0.0": + version: 30.0.2 + resolution: "@jest/fake-timers@npm:30.0.2" + dependencies: + "@jest/types": "npm:30.0.1" + "@sinonjs/fake-timers": "npm:^13.0.0" + "@types/node": "npm:*" + jest-message-util: "npm:30.0.2" + jest-mock: "npm:30.0.2" + jest-util: "npm:30.0.2" + checksum: 10/16956bf92fde69378273e4a107e5534876a336350732e43ffd2265690649ebe524ffa47ca4deffc8f807d36d64fcaf98b98102d91282038055d4b16530d2dad4 + languageName: node + linkType: hard + +"@jest/get-type@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/get-type@npm:30.0.1" + checksum: 10/bd6cb2fe1661b652f06e5c6f7ef5aa37247a5b4bf04aad8ce6a8a8ba659efaf983bab9d52755be8cf92478f8d894c024de2fbddf4c3f6be804b808a20dfc347b + languageName: node + linkType: hard + +"@jest/globals@npm:30.0.3": + version: 30.0.3 + resolution: "@jest/globals@npm:30.0.3" + dependencies: + "@jest/environment": "npm:30.0.2" + "@jest/expect": "npm:30.0.3" + "@jest/types": "npm:30.0.1" + jest-mock: "npm:30.0.2" + checksum: 10/691ea016bc462f704313648f53dd39776e5eec648b59acbde81090048d028beefb9f3094e9512aa044bb9dc96882e914088bf97700cfbb7f7b53011fd9001508 + languageName: node + linkType: hard + +"@jest/pattern@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/pattern@npm:30.0.1" + dependencies: + "@types/node": "npm:*" + jest-regex-util: "npm:30.0.1" + checksum: 10/afd03b4d3eadc9c9970cf924955dee47984a7e767901fe6fa463b17b246f0ddeec07b3e82c09715c54bde3c8abb92074160c0d79967bd23778724f184e7f5b7b + languageName: node + linkType: hard + +"@jest/reporters@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/reporters@npm:30.0.2" + dependencies: + "@bcoe/v8-coverage": "npm:^0.2.3" + "@jest/console": "npm:30.0.2" + "@jest/test-result": "npm:30.0.2" + "@jest/transform": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@jridgewell/trace-mapping": "npm:^0.3.25" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + collect-v8-coverage: "npm:^1.0.2" + exit-x: "npm:^0.2.2" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.11" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^6.0.0" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^5.0.0" + istanbul-reports: "npm:^3.1.3" + jest-message-util: "npm:30.0.2" + jest-util: "npm:30.0.2" + jest-worker: "npm:30.0.2" + slash: "npm:^3.0.0" + string-length: "npm:^4.0.2" + v8-to-istanbul: "npm:^9.0.1" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 10/6e32a3c58e81260f2d146ad641be3257df01ed083b7c5ff4c5e848d349f7af5595ae211d4cec0d0e98f17ea585af99ddcb57605cc0730ccd0f35b30578fd34fb + languageName: node + linkType: hard + +"@jest/schemas@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/schemas@npm:30.0.1" + dependencies: + "@sinclair/typebox": "npm:^0.34.0" + checksum: 10/067d4c3f38f2d8267d3ed6cc813252c3be580035fe7e2c0fa187323ef4978233ebadb1477808aec048440a8d0f480f71f92c5f02f98bf66c59bf802da1a0b254 + languageName: node + linkType: hard + +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": "npm:^0.27.8" + checksum: 10/910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + +"@jest/snapshot-utils@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/snapshot-utils@npm:30.0.1" + dependencies: + "@jest/types": "npm:30.0.1" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + natural-compare: "npm:^1.4.0" + checksum: 10/96dd2ce7888077554759a769e670988ed9e01ae5074c5c9915284ad5b3c240b57f15e5b223fdbfc4f7121e3b7ee4d0b83d12216b0d969d46cfbeacdd122aa3c4 + languageName: node + linkType: hard + +"@jest/source-map@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/source-map@npm:30.0.1" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.25" + callsites: "npm:^3.1.0" + graceful-fs: "npm:^4.2.11" + checksum: 10/161b27cdf8d9d80fd99374d55222b90478864c6990514be6ebee72b7184a034224c9aceed12c476f3a48d48601bf8ed2e0c047a5a81bd907dc192ebe71365ed4 + languageName: node + linkType: hard + +"@jest/test-result@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/test-result@npm:30.0.2" + dependencies: + "@jest/console": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/istanbul-lib-coverage": "npm:^2.0.6" + collect-v8-coverage: "npm:^1.0.2" + checksum: 10/02ba50845a5be94edee610f0f0cb57ddf1df3352434f37c8a950383ab096b3d0c7b0e5c147898e5c99e0d52aa62d9c099fd065d30ddc5c6a824e71514c6d732d + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/test-sequencer@npm:30.0.2" + dependencies: + "@jest/test-result": "npm:30.0.2" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.0.2" + slash: "npm:^3.0.0" + checksum: 10/63eb203c5546a64a25ec460db0d839abf66e1144ef8cb7652ba49b4533723ac8c62eefcab2240824fb728d06feed3f8d5e1da64bc23780ec21f1bad06875453a + languageName: node + linkType: hard + +"@jest/transform@npm:30.0.2": + version: 30.0.2 + resolution: "@jest/transform@npm:30.0.2" + dependencies: + "@babel/core": "npm:^7.27.4" + "@jest/types": "npm:30.0.1" + "@jridgewell/trace-mapping": "npm:^0.3.25" + babel-plugin-istanbul: "npm:^7.0.0" + chalk: "npm:^4.1.2" + convert-source-map: "npm:^2.0.0" + fast-json-stable-stringify: "npm:^2.1.0" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.0.2" + jest-regex-util: "npm:30.0.1" + jest-util: "npm:30.0.2" + micromatch: "npm:^4.0.8" + pirates: "npm:^4.0.7" + slash: "npm:^3.0.0" + write-file-atomic: "npm:^5.0.1" + checksum: 10/1e41d0a8c81125e3c96eae1aa8a4f0dfd29eb914e0bee25bbf6f757dc6ea5e655f5936d103e424a3dd696a4c492aa1dbecd9df286aa6f3cdf1bf8e245bbcba08 + languageName: node + linkType: hard + +"@jest/transform@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/transform@npm:29.7.0" + dependencies: + "@babel/core": "npm:^7.11.6" + "@jest/types": "npm:^29.6.3" + "@jridgewell/trace-mapping": "npm:^0.3.18" + babel-plugin-istanbul: "npm:^6.1.1" + chalk: "npm:^4.0.0" + convert-source-map: "npm:^2.0.0" + fast-json-stable-stringify: "npm:^2.1.0" + graceful-fs: "npm:^4.2.9" + jest-haste-map: "npm:^29.7.0" + jest-regex-util: "npm:^29.6.3" + jest-util: "npm:^29.7.0" + micromatch: "npm:^4.0.4" + pirates: "npm:^4.0.4" + slash: "npm:^3.0.0" + write-file-atomic: "npm:^4.0.2" + checksum: 10/30f42293545ab037d5799c81d3e12515790bb58513d37f788ce32d53326d0d72ebf5b40f989e6896739aa50a5f77be44686e510966370d58511d5ad2637c68c1 + languageName: node + linkType: hard + +"@jest/types@npm:30.0.1": + version: 30.0.1 + resolution: "@jest/types@npm:30.0.1" + dependencies: + "@jest/pattern": "npm:30.0.1" + "@jest/schemas": "npm:30.0.1" + "@types/istanbul-lib-coverage": "npm:^2.0.6" + "@types/istanbul-reports": "npm:^3.0.4" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.33" + chalk: "npm:^4.1.2" + checksum: 10/43f4ffedfec4d88869d74c259a027e45798444c09e4c52f59a1e7124c43d54e908d7b93d81da5260075d421d6f42087b12cb6c83da580b088c987f9d18b5d879 + languageName: node + linkType: hard + +"@jest/types@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/types@npm:29.6.3" + dependencies: + "@jest/schemas": "npm:^29.6.3" + "@types/istanbul-lib-coverage": "npm:^2.0.0" + "@types/istanbul-reports": "npm:^3.0.0" + "@types/node": "npm:*" + "@types/yargs": "npm:^17.0.8" + chalk: "npm:^4.0.0" + checksum: 10/f74bf512fd09bbe2433a2ad460b04668b7075235eea9a0c77d6a42222c10a79b9747dc2b2a623f140ed40d6865a2ed8f538f3cbb75169120ea863f29a7ed76cd + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.8 + resolution: "@jridgewell/gen-mapping@npm:0.3.8" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/9d3a56ab3612ab9b85d38b2a93b87f3324f11c5130859957f6500e4ac8ce35f299d5ccc3ecd1ae87597601ecf83cee29e9afd04c18777c24011073992ff946df + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@jspm/core@npm:^2.1.0": + version: 2.1.0 + resolution: "@jspm/core@npm:2.1.0" + checksum: 10/0beee551f2b900b9f829b91e69c3f867c8483133b904dadec9bbe4b89e5b02b9556c782e4d282fcc0d0b0928abb4ee9131454d7acec81751610d2b78b7f56f67 + languageName: node + linkType: hard + +"@keyv/serialize@npm:^1.0.3": + version: 1.0.3 + resolution: "@keyv/serialize@npm:1.0.3" + dependencies: + buffer: "npm:^6.0.3" + checksum: 10/d6a9194dd781bc26cc4d55f392d843810c1fdc0da81e69203e633cb289fc0a8edc8bc6466f66c4cbb55da0a5b405e89f14a68b48d6e73919ae82f8249fb5e444 + languageName: node + linkType: hard + +"@mdn/browser-compat-data@npm:^5.5.35, @mdn/browser-compat-data@npm:^5.6.19": + version: 5.7.6 + resolution: "@mdn/browser-compat-data@npm:5.7.6" + checksum: 10/c1dbbd41f2a600dec8be0b570131e81e26aa2748e19993a87db9edfafdd53ab55a80aca7471435bf60eee8bb7215f0111f99ba6614afa905ddbf6b0ba0efc83f + languageName: node + linkType: hard + +"@napi-rs/wasm-runtime@npm:^0.2.10, @napi-rs/wasm-runtime@npm:^0.2.11": + version: 0.2.11 + resolution: "@napi-rs/wasm-runtime@npm:0.2.11" + dependencies: + "@emnapi/core": "npm:^1.4.3" + "@emnapi/runtime": "npm:^1.4.3" + "@tybys/wasm-util": "npm:^0.9.0" + checksum: 10/e30fe3060474c5018e160231df0531d62b5e22f4736ecd49c04ca6cadacb2acf59b9205435794cd5b898e41e2e3ddb6523e93b97799bd1f4d0751557de6e38e4 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10/6ab2a9b8a1d67b067922c36f259e3b3dfd6b97b219c540877a4944549a4d49ea5ceba5663905ab5289682f1f3c15ff441d02f0447f620a42e1cb5e1937174d4b + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10/012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10/40033e33e96e97d77fba5a238e4bba4487b8284678906a9f616b5579ddaf868a18874c0054a75402c9fbaaa033a25ceae093af58c9c30278e35c23c9479e79b0 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^3.0.0": + version: 3.0.0 + resolution: "@npmcli/agent@npm:3.0.0" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/775c9a7eb1f88c195dfb3bce70c31d0fe2a12b28b754e25c08a3edb4bc4816bfedb7ac64ef1e730579d078ca19dacf11630e99f8f3c3e0fd7b23caa5fd6d30a6 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/fs@npm:4.0.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/405c4490e1ff11cf299775449a3c254a366a4b1ffc79d87159b0ee7d5558ac9f6a2f8c0735fd6ff3873cef014cb1a44a5f9127cb6a1b2dbc408718cca9365b5a + languageName: node + linkType: hard + +"@oxc-parser/binding-android-arm64@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-android-arm64@npm:0.75.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-parser/binding-darwin-arm64@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-darwin-arm64@npm:0.75.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-parser/binding-darwin-x64@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-darwin-x64@npm:0.75.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-parser/binding-freebsd-x64@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-freebsd-x64@npm:0.75.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-arm-gnueabihf@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-arm-gnueabihf@npm:0.75.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-arm-musleabihf@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-arm-musleabihf@npm:0.75.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-arm64-gnu@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-arm64-gnu@npm:0.75.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-arm64-musl@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-arm64-musl@npm:0.75.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-riscv64-gnu@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-riscv64-gnu@npm:0.75.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-s390x-gnu@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-s390x-gnu@npm:0.75.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-x64-gnu@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-x64-gnu@npm:0.75.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-parser/binding-linux-x64-musl@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-linux-x64-musl@npm:0.75.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-parser/binding-wasm32-wasi@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-wasm32-wasi@npm:0.75.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^0.2.11" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-parser/binding-win32-arm64-msvc@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-win32-arm64-msvc@npm:0.75.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-parser/binding-win32-x64-msvc@npm:0.75.0": + version: 0.75.0 + resolution: "@oxc-parser/binding-win32-x64-msvc@npm:0.75.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@oxc-project/types@npm:^0.75.0": + version: 0.75.0 + resolution: "@oxc-project/types@npm:0.75.0" + checksum: 10/73e4007e43a74d87cd4232a4b1a7c32957bb47f61464d2b9cc537958a4f92ef7c9ae1765b5d416452682a4c53eb7ecfffaeb93b71921c508a9590557b7ec98fe + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-arm64@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-darwin-arm64@npm:11.2.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-x64@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-darwin-x64@npm:11.2.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-freebsd-x64@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-freebsd-x64@npm:11.2.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.2.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-gnu@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-arm64-gnu@npm:11.2.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-musl@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-arm64-musl@npm:11.2.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-riscv64-gnu@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-riscv64-gnu@npm:11.2.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-s390x-gnu@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-s390x-gnu@npm:11.2.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-gnu@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-x64-gnu@npm:11.2.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-musl@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-linux-x64-musl@npm:11.2.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-wasm32-wasi@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-wasm32-wasi@npm:11.2.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^0.2.11" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-arm64-msvc@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-win32-arm64-msvc@npm:11.2.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-x64-msvc@npm:11.2.0": + version: 11.2.0 + resolution: "@oxc-resolver/binding-win32-x64-msvc@npm:11.2.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + +"@pkgr/core@npm:^0.2.4": + version: 0.2.4 + resolution: "@pkgr/core@npm:0.2.4" + checksum: 10/8544f0346c3f7035b9e2fdf60179c68b12d3c76b3fba9533844099af67cf5c0ce5257538f5faa05953d48cc1536d046f003231f321b2f75b3fb449db8410a2b7 + languageName: node + linkType: hard + +"@prettier/cli@npm:0.9.0": + version: 0.9.0 + resolution: "@prettier/cli@npm:0.9.0" + dependencies: + atomically: "npm:^2.0.3" + fast-ignore: "npm:^1.1.3" + find-up-json: "npm:^2.0.5" + function-once: "npm:^3.0.1" + import-meta-resolve: "npm:^4.1.0" + is-binary-path: "npm:^2.0.0" + js-yaml: "npm:^4.1.0" + json-sorted-stringify: "npm:^1.0.1" + json5: "npm:^2.2.3" + kasi: "npm:^1.1.1" + lomemo: "npm:^1.0.1" + pioppo: "npm:^1.2.1" + promise-resolve-timeout: "npm:^2.0.1" + smol-toml: "npm:^1.3.4" + specialist: "npm:^1.4.5" + tiny-editorconfig: "npm:^1.0.0" + tiny-readdir: "npm:^2.7.4" + tiny-readdir-glob: "npm:^1.23.2" + tiny-spinner: "npm:^2.0.5" + worktank: "npm:^3.0.2" + zeptomatch: "npm:^2.0.2" + zeptomatch-escape: "npm:^1.0.1" + zeptomatch-is-static: "npm:^1.0.1" + peerDependencies: + prettier: ^3.1.0 || ^4.0.0-alpha + bin: + prettier-next: dist/bin.js + checksum: 10/79ab9229388419f9c002401d0f2485c8a89b06a89b0496bd050fbf1d9351f0b061f0e7320651ad45540fadec4cc04f47eaf70e99275f48333e63c2f5b8d3b51f + languageName: node + linkType: hard + +"@prettier/html-tags@npm:1.0.0": + version: 1.0.0 + resolution: "@prettier/html-tags@npm:1.0.0" + checksum: 10/46d6657640ebe806fdacfb5a1953daad45f036af980dee0d8d7e778f89738b2501aa8d5566d22c4892af6ad91e9d1ed58a04e927713be38600e842a62015c577 + languageName: node + linkType: hard + +"@prettier/parse-srcset@npm:3.1.0": + version: 3.1.0 + resolution: "@prettier/parse-srcset@npm:3.1.0" + checksum: 10/1acb8c932ea2b252f7969701a3da7b6c2cea153ecbba1155327fce9d8adb910696b1660aa3007c894cf2381ff90b51017f1cde1e6549f7dc333c43dd0c4f89fa + languageName: node + linkType: hard + +"@simple-dom/interface@npm:^1.4.0": + version: 1.4.0 + resolution: "@simple-dom/interface@npm:1.4.0" + checksum: 10/e0ce8b6174208c5a369c2650094d16080230bf90cb95cc8258f9fd6b93be8afedbffb9d63da7f1d295a4e8d901f5fff907a69e1d55556db9e8544f2615b2f1d7 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 10/297f95ff77c82c54de8c9907f186076e715ff2621c5222ba50b8d40a170661c0c5242c763cba2a4791f0f91cb1d8ffa53ea1d7294570cf8cd4694c0e383e484d + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.34.0": + version: 0.34.33 + resolution: "@sinclair/typebox@npm:0.34.33" + checksum: 10/7948758249860cb6d6d093bea5902ab2e8cfd5095f4882d5a709773f69e4678a6e8f2b384d3116c021c4ebc11727e033882b791d146691a7d388dd78f36e611d + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.1": + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/a0af217ba7044426c78df52c23cedede6daf377586f3ac58857c565769358ab1f44ebf95ba04bbe38814fba6e316ca6f02870a009328294fc2c555d0f85a7117 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^13.0.0": + version: 13.0.5 + resolution: "@sinonjs/fake-timers@npm:13.0.5" + dependencies: + "@sinonjs/commons": "npm:^3.0.1" + checksum: 10/11ee417968fc4dce1896ab332ac13f353866075a9d2a88ed1f6258f17cc4f7d93e66031b51fcddb8c203aa4d53fd980b0ae18aba06269f4682164878a992ec3f + languageName: node + linkType: hard + +"@stylistic/eslint-plugin@npm:5.0.0": + version: 5.0.0 + resolution: "@stylistic/eslint-plugin@npm:5.0.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/types": "npm:^8.34.1" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + estraverse: "npm:^5.3.0" + picomatch: "npm:^4.0.2" + peerDependencies: + eslint: ">=9.0.0" + checksum: 10/658fdcbc64a2215e43bad23d697a8447f81bc14af997d2b47a348fc52c28d71c16bcc900eaa7b86f6a2d87da405d8eb983602a7d0da9ba0c7b0e02d6480399b2 + languageName: node + linkType: hard + +"@tybys/wasm-util@npm:^0.9.0": + version: 0.9.0 + resolution: "@tybys/wasm-util@npm:0.9.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10/aa58e64753a420ad1eefaf7bacef3dda61d74f9336925943d9244132d5b48d9242f734f1e707fd5ccfa6dd1d8ec8e6debc234b4dedb3a5b0d8486d1f373350b2 + languageName: node + linkType: hard + +"@types/babel__core@npm:^7.20.5": + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" + dependencies: + "@babel/parser": "npm:^7.20.7" + "@babel/types": "npm:^7.20.7" + "@types/babel__generator": "npm:*" + "@types/babel__template": "npm:*" + "@types/babel__traverse": "npm:*" + checksum: 10/c32838d280b5ab59d62557f9e331d3831f8e547ee10b4f85cb78753d97d521270cebfc73ce501e9fb27fe71884d1ba75e18658692c2f4117543f0fc4e3e118b3 + languageName: node + linkType: hard + +"@types/babel__generator@npm:*": + version: 7.27.0 + resolution: "@types/babel__generator@npm:7.27.0" + dependencies: + "@babel/types": "npm:^7.0.0" + checksum: 10/f572e67a9a39397664350a4437d8a7fbd34acc83ff4887a8cf08349e39f8aeb5ad2f70fb78a0a0a23a280affe3a5f4c25f50966abdce292bcf31237af1c27b1a + languageName: node + linkType: hard + +"@types/babel__template@npm:*": + version: 7.4.4 + resolution: "@types/babel__template@npm:7.4.4" + dependencies: + "@babel/parser": "npm:^7.1.0" + "@babel/types": "npm:^7.0.0" + checksum: 10/d7a02d2a9b67e822694d8e6a7ddb8f2b71a1d6962dfd266554d2513eefbb205b33ca71a0d163b1caea3981ccf849211f9964d8bd0727124d18ace45aa6c9ae29 + languageName: node + linkType: hard + +"@types/babel__traverse@npm:*": + version: 7.20.7 + resolution: "@types/babel__traverse@npm:7.20.7" + dependencies: + "@babel/types": "npm:^7.20.7" + checksum: 10/d005b58e1c26bdafc1ce564f60db0ee938393c7fc586b1197bdb71a02f7f33f72bc10ae4165776b6cafc77c4b6f2e1a164dd20bc36518c471b1131b153b4baa6 + languageName: node + linkType: hard + +"@types/estree@npm:1.0.8, @types/estree@npm:^1.0.6": + version: 1.0.8 + resolution: "@types/estree@npm:1.0.8" + checksum: 10/25a4c16a6752538ffde2826c2cc0c6491d90e69cd6187bef4a006dd2c3c45469f049e643d7e516c515f21484dc3d48fd5c870be158a5beb72f5baf3dc43e4099 + languageName: node + linkType: hard + +"@types/graceful-fs@npm:^4.1.3": + version: 4.1.9 + resolution: "@types/graceful-fs@npm:4.1.9" + dependencies: + "@types/node": "npm:*" + checksum: 10/79d746a8f053954bba36bd3d94a90c78de995d126289d656fb3271dd9f1229d33f678da04d10bce6be440494a5a73438e2e363e92802d16b8315b051036c5256 + languageName: node + linkType: hard + +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1, @types/istanbul-lib-coverage@npm:^2.0.6": + version: 2.0.6 + resolution: "@types/istanbul-lib-coverage@npm:2.0.6" + checksum: 10/3feac423fd3e5449485afac999dcfcb3d44a37c830af898b689fadc65d26526460bedb889db278e0d4d815a670331796494d073a10ee6e3a6526301fe7415778 + languageName: node + linkType: hard + +"@types/istanbul-lib-report@npm:*": + version: 3.0.3 + resolution: "@types/istanbul-lib-report@npm:3.0.3" + dependencies: + "@types/istanbul-lib-coverage": "npm:*" + checksum: 10/b91e9b60f865ff08cb35667a427b70f6c2c63e88105eadd29a112582942af47ed99c60610180aa8dcc22382fa405033f141c119c69b95db78c4c709fbadfeeb4 + languageName: node + linkType: hard + +"@types/istanbul-reports@npm:^3.0.0, @types/istanbul-reports@npm:^3.0.4": + version: 3.0.4 + resolution: "@types/istanbul-reports@npm:3.0.4" + dependencies: + "@types/istanbul-lib-report": "npm:*" + checksum: 10/93eb18835770b3431f68ae9ac1ca91741ab85f7606f310a34b3586b5a34450ec038c3eed7ab19266635499594de52ff73723a54a72a75b9f7d6a956f01edee95 + languageName: node + linkType: hard + +"@types/json-schema@npm:^7.0.15": + version: 7.0.15 + resolution: "@types/json-schema@npm:7.0.15" + checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 22.15.17 + resolution: "@types/node@npm:22.15.17" + dependencies: + undici-types: "npm:~6.21.0" + checksum: 10/3f5870ec1ac16b1dd8e5817de81164df9b69e4cf19cce692cb7c9b1af1deaecfd98b591b56155fcc4aa582f7189a4fc0c8d7d3226fa0387403db615a12dd8cb6 + languageName: node + linkType: hard + +"@types/stack-utils@npm:^2.0.0, @types/stack-utils@npm:^2.0.3": + version: 2.0.3 + resolution: "@types/stack-utils@npm:2.0.3" + checksum: 10/72576cc1522090fe497337c2b99d9838e320659ac57fa5560fcbdcbafcf5d0216c6b3a0a8a4ee4fdb3b1f5e3420aa4f6223ab57b82fef3578bec3206425c6cf5 + languageName: node + linkType: hard + +"@types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": + version: 2.0.11 + resolution: "@types/unist@npm:2.0.11" + checksum: 10/6d436e832bc35c6dde9f056ac515ebf2b3384a1d7f63679d12358766f9b313368077402e9c1126a14d827f10370a5485e628bf61aa91117cf4fc882423191a4e + languageName: node + linkType: hard + +"@types/yargs-parser@npm:*": + version: 21.0.3 + resolution: "@types/yargs-parser@npm:21.0.3" + checksum: 10/a794eb750e8ebc6273a51b12a0002de41343ffe46befef460bdbb57262d187fdf608bc6615b7b11c462c63c3ceb70abe2564c8dd8ee0f7628f38a314f74a9b9b + languageName: node + linkType: hard + +"@types/yargs@npm:^17.0.33, @types/yargs@npm:^17.0.8": + version: 17.0.33 + resolution: "@types/yargs@npm:17.0.33" + dependencies: + "@types/yargs-parser": "npm:*" + checksum: 10/16f6681bf4d99fb671bf56029141ed01db2862e3db9df7fc92d8bea494359ac96a1b4b1c35a836d1e95e665fb18ad753ab2015fc0db663454e8fd4e5d5e2ef91 + languageName: node + linkType: hard + +"@typescript-eslint/eslint-plugin@npm:8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/eslint-plugin@npm:8.34.1" + dependencies: + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.34.1" + "@typescript-eslint/type-utils": "npm:8.34.1" + "@typescript-eslint/utils": "npm:8.34.1" + "@typescript-eslint/visitor-keys": "npm:8.34.1" + graphemer: "npm:^1.4.0" + ignore: "npm:^7.0.0" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + "@typescript-eslint/parser": ^8.34.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10/a4b1cffcb5f2b4f5f4c267cd4519d0e2df73c8017c93200d5a86df7882073f18cf4f5d0604aa8dafb6e4dc4ab391ae8e9a2161631fb1eca9bca32af063acdaf2 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/parser@npm:8.34.1" + dependencies: + "@typescript-eslint/scope-manager": "npm:8.34.1" + "@typescript-eslint/types": "npm:8.34.1" + "@typescript-eslint/typescript-estree": "npm:8.34.1" + "@typescript-eslint/visitor-keys": "npm:8.34.1" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10/c862baa6f5260bf4b63d79ae4d68fc09b7e094ea9f28ee461887cbb660ef1339e829119029e1e6ba40335fc9e85d134a04036965bc261f7abf4d0e605cb485ec + languageName: node + linkType: hard + +"@typescript-eslint/project-service@npm:8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/project-service@npm:8.34.1" + dependencies: + "@typescript-eslint/tsconfig-utils": "npm:^8.34.1" + "@typescript-eslint/types": "npm:^8.34.1" + debug: "npm:^4.3.4" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10/5dad268397cd2d601e5e65ab9628c59c6687a79cac31e0d0eac2b434505639fd8767f1a2d5b077b158c581f5a48bb96e7da361560fb26b70b680272e39c6f976 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:8.34.1, @typescript-eslint/scope-manager@npm:^8.34.0": + version: 8.34.1 + resolution: "@typescript-eslint/scope-manager@npm:8.34.1" + dependencies: + "@typescript-eslint/types": "npm:8.34.1" + "@typescript-eslint/visitor-keys": "npm:8.34.1" + checksum: 10/cd3f2ba811e4794c78d7f9df0ff1ad6ce33d162d87986e67c4ec409963f07384bd184dbddc613e89a5cc753a47469e7fa9d02c507b57aa9e0fdc8a97c0378353 + languageName: node + linkType: hard + +"@typescript-eslint/tsconfig-utils@npm:8.34.1, @typescript-eslint/tsconfig-utils@npm:^8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.34.1" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10/81a874a433c4e91ee2509d4eda43932b8348e9404da2d11e621bf3b8bec26a6ab84bd3870215dcb09df950182e2b5e2539be30fc262c30edff0e42ca5d707465 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:8.34.1, @typescript-eslint/type-utils@npm:^8.0.0, @typescript-eslint/type-utils@npm:^8.34.0": + version: 8.34.1 + resolution: "@typescript-eslint/type-utils@npm:8.34.1" + dependencies: + "@typescript-eslint/typescript-estree": "npm:8.34.1" + "@typescript-eslint/utils": "npm:8.34.1" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10/1c8153a5b1cf488b6d1642d752caba8631f183f17031660859355342d1139e4dea9e0dd9c97d6bad644a91ee26461ddd1993303d0542e6f1b7850af1ca71e96e + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:8.34.1, @typescript-eslint/types@npm:^8.34.0, @typescript-eslint/types@npm:^8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/types@npm:8.34.1" + checksum: 10/09cb344af38e1e0f8e60968ff6038e8b27a453dea22be433b531e2b50b45448b8646f11249279d47e153f0a5299f8f621a84e81db8bcf5421bd90c94caae6416 + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:8.34.1, @typescript-eslint/typescript-estree@npm:^8.34.0": + version: 8.34.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.34.1" + dependencies: + "@typescript-eslint/project-service": "npm:8.34.1" + "@typescript-eslint/tsconfig-utils": "npm:8.34.1" + "@typescript-eslint/types": "npm:8.34.1" + "@typescript-eslint/visitor-keys": "npm:8.34.1" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10/40ffa31d8005115fb8efe47eeea484ad8a32a55e8bc2e27e4ad7b89b9fb1b962254c4c4ec9c00b4a5d52c5fa45b25b69ef62a98135f478e486f51ea5ba0ad4e9 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:8.34.1, @typescript-eslint/utils@npm:^8.0.0, @typescript-eslint/utils@npm:^8.26.1, @typescript-eslint/utils@npm:^8.34.0": + version: 8.34.1 + resolution: "@typescript-eslint/utils@npm:8.34.1" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/scope-manager": "npm:8.34.1" + "@typescript-eslint/types": "npm:8.34.1" + "@typescript-eslint/typescript-estree": "npm:8.34.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10/7e14ef16222d48aa668c2b436b7eec893e8baf05a18c4bcdf353fa6ce4b5526db3d3945be5a7bd4dab0202805f205c4a904cf8646fa157f53b761c090d9c5e7b + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:8.34.1": + version: 8.34.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.34.1" + dependencies: + "@typescript-eslint/types": "npm:8.34.1" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10/6fbaa838dc040c6ff6d4472b9a1480f1407eb591924fb4d371fe0224dafcb40ac5476b733fea33ad0898c3174430918b0456c5209b5b7e176cb04c0c9daacbd8 + languageName: node + linkType: hard + +"@ungap/structured-clone@npm:^1.3.0": + version: 1.3.0 + resolution: "@ungap/structured-clone@npm:1.3.0" + checksum: 10/80d6910946f2b1552a2406650051c91bbd1f24a6bf854354203d84fe2714b3e8ce4618f49cc3410494173a1c1e8e9777372fe68dce74bd45faf0a7a1a6ccf448 + languageName: node + linkType: hard + +"@unrs/resolver-binding-darwin-arm64@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-darwin-arm64@npm:1.7.11" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-darwin-x64@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-darwin-x64@npm:1.7.11" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-freebsd-x64@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-freebsd-x64@npm:1.7.11" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.7.11" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm-musleabihf@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-arm-musleabihf@npm:1.7.11" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm64-gnu@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-arm64-gnu@npm:1.7.11" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-arm64-musl@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-arm64-musl@npm:1.7.11" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-ppc64-gnu@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-ppc64-gnu@npm:1.7.11" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-riscv64-gnu@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-riscv64-gnu@npm:1.7.11" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-riscv64-musl@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-riscv64-musl@npm:1.7.11" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-s390x-gnu@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-s390x-gnu@npm:1.7.11" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-x64-gnu@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-x64-gnu@npm:1.7.11" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@unrs/resolver-binding-linux-x64-musl@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-linux-x64-musl@npm:1.7.11" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@unrs/resolver-binding-wasm32-wasi@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-wasm32-wasi@npm:1.7.11" + dependencies: + "@napi-rs/wasm-runtime": "npm:^0.2.10" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-arm64-msvc@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-win32-arm64-msvc@npm:1.7.11" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-ia32-msvc@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-win32-ia32-msvc@npm:1.7.11" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@unrs/resolver-binding-win32-x64-msvc@npm:1.7.11": + version: 1.7.11 + resolution: "@unrs/resolver-binding-win32-x64-msvc@npm:1.7.11" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"abbrev@npm:^3.0.0": + version: 3.0.1 + resolution: "abbrev@npm:3.0.1" + checksum: 10/ebd2c149dda6f543b66ce3779ea612151bb3aa9d0824f169773ee9876f1ca5a4e0adbcccc7eed048c04da7998e1825e2aa76fcca92d9e67dea50ac2b0a58dc2e + languageName: node + linkType: hard + +"acorn-jsx@npm:5.3.2, acorn-jsx@npm:^5.3.2": + version: 5.3.2 + resolution: "acorn-jsx@npm:5.3.2" + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10/d4371eaef7995530b5b5ca4183ff6f062ca17901a6d3f673c9ac011b01ede37e7a1f7f61f8f5cfe709e88054757bb8f3277dc4061087cdf4f2a1f90ccbcdb977 + languageName: node + linkType: hard + +"acorn@npm:8.15.0, acorn@npm:^8.14.0, acorn@npm:^8.15.0": + version: 8.15.0 + resolution: "acorn@npm:8.15.0" + bin: + acorn: bin/acorn + checksum: 10/77f2de5051a631cf1729c090e5759148459cdb76b5f5c70f890503d629cf5052357b0ce783c0f976dd8a93c5150f59f6d18df1def3f502396a20f81282482fa4 + languageName: node + linkType: hard + +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": + version: 7.1.3 + resolution: "agent-base@npm:7.1.3" + checksum: 10/3db6d8d4651f2aa1a9e4af35b96ab11a7607af57a24f3bc721a387eaa3b5f674e901f0a648b0caefd48f3fd117c7761b79a3b55854e2aebaa96c3f32cf76af84 + languageName: node + linkType: hard + +"ajv@npm:^6.12.4": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + +"angular-estree-parser@npm:12.1.0": + version: 12.1.0 + resolution: "angular-estree-parser@npm:12.1.0" + peerDependencies: + "@angular/compiler": ^20.0.0 + checksum: 10/a24f03c49133ab07ccc6c9fac78627deddc04511387e51809f322c27afbde3816099f33e2f846ef6d3d0ed97aa819717b6c95af4dfb19a3ad8dc430043c7ee46 + languageName: node + linkType: hard + +"angular-html-parser@npm:8.1.0": + version: 8.1.0 + resolution: "angular-html-parser@npm:8.1.0" + checksum: 10/670c1937c5d95465d6594eb9e3e15495efab8c1a77e4317701ac3d1a8cf4654026376ed6de430e7873aff40f4d2ad7531398346a21fbe571d75a302acc6dd940 + languageName: node + linkType: hard + +"ansi-colors@npm:^4.1.1": + version: 4.1.3 + resolution: "ansi-colors@npm:4.1.3" + checksum: 10/43d6e2fc7b1c6e4dc373de708ee76311ec2e0433e7e8bd3194e7ff123ea6a747428fc61afdcf5969da5be3a5f0fd054602bec56fc0ebe249ce2fcde6e649e3c2 + languageName: node + linkType: hard + +"ansi-escapes@npm:^4.3.2": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: "npm:^0.21.3" + checksum: 10/8661034456193ffeda0c15c8c564a9636b0c04094b7f78bd01517929c17c504090a60f7a75f949f5af91289c264d3e1001d91492c1bd58efc8e100500ce04de2 + languageName: node + linkType: hard + +"ansi-escapes@npm:^7.0.0": + version: 7.0.0 + resolution: "ansi-escapes@npm:7.0.0" + dependencies: + environment: "npm:^1.0.0" + checksum: 10/2d0e2345087bd7ae6bf122b9cc05ee35560d40dcc061146edcdc02bc2d7c7c50143cd12a22e69a0b5c0f62b948b7bc9a4539ee888b80f5bd33cdfd82d01a70ab + languageName: node + linkType: hard + +"ansi-purge@npm:^1.0.1": + version: 1.0.1 + resolution: "ansi-purge@npm:1.0.1" + checksum: 10/5268048a4696876bfad93e33b11968ee14316667693d0909f67b3ce75c5f631d70abd11f69c5bb88654c42efb71c68cd15a6f3c3d2d96d5796acbf9a8434af36 + languageName: node + linkType: hard + +"ansi-regex@npm:^4.1.0": + version: 4.1.1 + resolution: "ansi-regex@npm:4.1.1" + checksum: 10/b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.1.0 + resolution: "ansi-regex@npm:6.1.0" + checksum: 10/495834a53b0856c02acd40446f7130cb0f8284f4a39afdab20d5dc42b2e198b1196119fe887beed8f9055c4ff2055e3b2f6d4641d0be018cdfb64fedf6fc1aac + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"ansi-styles@npm:^5.0.0, ansi-styles@npm:^5.2.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: 10/d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + +"ansi-truncate@npm:^1.2.0": + version: 1.2.0 + resolution: "ansi-truncate@npm:1.2.0" + dependencies: + fast-string-truncated-width: "npm:^1.2.0" + checksum: 10/1ea8c12863c63f989e407bd8455bfd47a0fa1e9c400770a751249ac963f86c41e33bdf953fa37de50170b0c9dee9a4041aba9dbd2601dd5b1d3013ffa6d0810a + languageName: node + linkType: hard + +"anymatch@npm:^3.0.3, anymatch@npm:^3.1.3": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + +"array-find-index@npm:^1.0.2": + version: 1.0.2 + resolution: "array-find-index@npm:1.0.2" + checksum: 10/aac128bf369e1ac6c06ff0bb330788371c0e256f71279fb92d745e26fb4b9db8920e485b4ec25e841c93146bf71a34dcdbcefa115e7e0f96927a214d237b7081 + languageName: node + linkType: hard + +"array-timsort@npm:^1.0.3": + version: 1.0.3 + resolution: "array-timsort@npm:1.0.3" + checksum: 10/f417f073b3733baec3a80decdf5d45bf763f04676ef3610b0e71f9b1d88c6e4c38154c05b28b31529d308bfd0e043d08059fcd9df966245a1276af15b5584936 + languageName: node + linkType: hard + +"ast-metadata-inferer@npm:^0.8.1": + version: 0.8.1 + resolution: "ast-metadata-inferer@npm:0.8.1" + dependencies: + "@mdn/browser-compat-data": "npm:^5.6.19" + checksum: 10/352f4a6d31324e3cf759ff20d4e2d473dfb2bab5248676f447a25e541860846c831b79b7fb38f997f1e9bfff8b5db0551ff97e4736018444967474e3b8568b2d + languageName: node + linkType: hard + +"atomically@npm:^2.0.3": + version: 2.0.3 + resolution: "atomically@npm:2.0.3" + dependencies: + stubborn-fs: "npm:^1.2.5" + when-exit: "npm:^2.1.1" + checksum: 10/c71cd27688a99199bfb441930ebdea8a289d86f210f59351d872aaaff39f4e29b7dfaf47ab593e444ef1b0e29ee5ea870285cc25a43078040c4f6cfc50bbf19a + languageName: node + linkType: hard + +"babel-jest@npm:30.0.2": + version: 30.0.2 + resolution: "babel-jest@npm:30.0.2" + dependencies: + "@jest/transform": "npm:30.0.2" + "@types/babel__core": "npm:^7.20.5" + babel-plugin-istanbul: "npm:^7.0.0" + babel-preset-jest: "npm:30.0.1" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + slash: "npm:^3.0.0" + peerDependencies: + "@babel/core": ^7.11.0 + checksum: 10/9d5b25e0fb5b082f29c90b769721ce94e102e4b58ece7a18bc2a4f9a48a68b87d7258b97e5994cca535cfdd70120fc085e8b542ec111734e2611b1d076626aca + languageName: node + linkType: hard + +"babel-plugin-istanbul@npm:^6.1.1": + version: 6.1.1 + resolution: "babel-plugin-istanbul@npm:6.1.1" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.0.0" + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-instrument: "npm:^5.0.4" + test-exclude: "npm:^6.0.0" + checksum: 10/ffd436bb2a77bbe1942a33245d770506ab2262d9c1b3c1f1da7f0592f78ee7445a95bc2efafe619dd9c1b6ee52c10033d6c7d29ddefe6f5383568e60f31dfe8d + languageName: node + linkType: hard + +"babel-plugin-istanbul@npm:^7.0.0": + version: 7.0.0 + resolution: "babel-plugin-istanbul@npm:7.0.0" + dependencies: + "@babel/helper-plugin-utils": "npm:^7.0.0" + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.3" + istanbul-lib-instrument: "npm:^6.0.2" + test-exclude: "npm:^6.0.0" + checksum: 10/4df567f29161c7f50737ed1884c7f08203f4d0cb1684c499fca374fcf5059396eacb02f8f727bf7a82bbf3e50b9f4a24bcb026a1678f63940d8f0f78546e3774 + languageName: node + linkType: hard + +"babel-plugin-jest-hoist@npm:30.0.1": + version: 30.0.1 + resolution: "babel-plugin-jest-hoist@npm:30.0.1" + dependencies: + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.27.3" + "@types/babel__core": "npm:^7.20.5" + checksum: 10/4d8d0eb3726fb16b85322449fff15fa48404ef92dae48f9b0c956f6d504208e604e4e40fe71665433cb21f35be0faf5b2b11732330f67b3add66728edcfbcb93 + languageName: node + linkType: hard + +"babel-preset-current-node-syntax@npm:^1.0.0, babel-preset-current-node-syntax@npm:^1.1.0": + version: 1.1.0 + resolution: "babel-preset-current-node-syntax@npm:1.1.0" + dependencies: + "@babel/plugin-syntax-async-generators": "npm:^7.8.4" + "@babel/plugin-syntax-bigint": "npm:^7.8.3" + "@babel/plugin-syntax-class-properties": "npm:^7.12.13" + "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" + "@babel/plugin-syntax-import-attributes": "npm:^7.24.7" + "@babel/plugin-syntax-import-meta": "npm:^7.10.4" + "@babel/plugin-syntax-json-strings": "npm:^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" + "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" + "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" + "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" + "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" + "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/46331111ae72b7121172fd9e6a4a7830f651ad44bf26dbbf77b3c8a60a18009411a3eacb5e72274004290c110371230272109957d5224d155436b4794ead2f1b + languageName: node + linkType: hard + +"babel-preset-jest@npm:30.0.1": + version: 30.0.1 + resolution: "babel-preset-jest@npm:30.0.1" + dependencies: + babel-plugin-jest-hoist: "npm:30.0.1" + babel-preset-current-node-syntax: "npm:^1.1.0" + peerDependencies: + "@babel/core": ^7.11.0 + checksum: 10/fa37b0fa11baffd983f42663c7a4db61d9b10704bd061333950c3d2a191457930e68e172a93f6675d85cd6a1315fd6954143bda5709a3ba38ef7bd87a13d0aa6 + languageName: node + linkType: hard + +"bail@npm:^1.0.0": + version: 1.0.5 + resolution: "bail@npm:1.0.5" + checksum: 10/6c334940d7eaa4e656a12fb12407b6555649b6deb6df04270fa806e0da82684ebe4a4e47815b271c794b40f8d6fa286e0c248b14ddbabb324a917fab09b7301a + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 10/669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"birecord@npm:^0.1.1": + version: 0.1.1 + resolution: "birecord@npm:0.1.1" + checksum: 10/9169bd57a9b15d08ebd8f936dcd249cebaf67bd21fae36e38723b0d40ebafa97b9b4253e4f0c58beca3446b4eff65824578803ea80fa0071495d1ce37d8da062 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.12 + resolution: "brace-expansion@npm:1.1.12" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/12cb6d6310629e3048cadb003e1aca4d8c9bb5c67c3c321bafdd7e7a50155de081f78ea3e0ed92ecc75a9015e784f301efc8132383132f4f7904ad1ac529c562 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"browserslist-to-esbuild@npm:2.1.1": + version: 2.1.1 + resolution: "browserslist-to-esbuild@npm:2.1.1" + dependencies: + meow: "npm:^13.0.0" + peerDependencies: + browserslist: "*" + bin: + browserslist-to-esbuild: cli/index.js + checksum: 10/5e91b23ba5ac47412b7456bbb74ee11b35d1083163e9e8e001e48f3a975c65758a4559ab532812d8518877a1d8f68c5b649b88a08722b9543b38e633e6943f7d + languageName: node + linkType: hard + +"browserslist@npm:4.25.1, browserslist@npm:^4.24.0, browserslist@npm:^4.24.2, browserslist@npm:^4.24.4": + version: 4.25.1 + resolution: "browserslist@npm:4.25.1" + dependencies: + caniuse-lite: "npm:^1.0.30001726" + electron-to-chromium: "npm:^1.5.173" + node-releases: "npm:^2.0.19" + update-browserslist-db: "npm:^1.1.3" + bin: + browserslist: cli.js + checksum: 10/bfb5511b425886279bbe2ea44d10e340c8aea85866c9d45083c13491d049b6362e254018c0afbf56d41ceeb64f994957ea8ae98dbba74ef1e54ef901c8732987 + languageName: node + linkType: hard + +"bser@npm:2.1.1": + version: 2.1.1 + resolution: "bser@npm:2.1.1" + dependencies: + node-int64: "npm:^0.4.0" + checksum: 10/edba1b65bae682450be4117b695997972bd9a3c4dfee029cab5bcb72ae5393a79a8f909b8bc77957eb0deec1c7168670f18f4d5c556f46cdd3bca5f3b3a8d020 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer@npm:6.0.3, buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.2.1" + checksum: 10/b6bc68237ebf29bdacae48ce60e5e28fc53ae886301f2ad9496618efac49427ed79096750033e7eab1897a4f26ae374ace49106a5758f38fb70c78c9fda2c3b1 + languageName: node + linkType: hard + +"builtin-modules@npm:^5.0.0": + version: 5.0.0 + resolution: "builtin-modules@npm:5.0.0" + checksum: 10/85ba92a4cbd794174dae48c867d27f5529a03c9c073ccb029f106e62861eb48e09231f17a7290645e16a0a22d7401ca269ff73b760a6ddb9a3b7d1b9ceba81ac + languageName: node + linkType: hard + +"c8@npm:10.1.3": + version: 10.1.3 + resolution: "c8@npm:10.1.3" + dependencies: + "@bcoe/v8-coverage": "npm:^1.0.1" + "@istanbuljs/schema": "npm:^0.1.3" + find-up: "npm:^5.0.0" + foreground-child: "npm:^3.1.1" + istanbul-lib-coverage: "npm:^3.2.0" + istanbul-lib-report: "npm:^3.0.1" + istanbul-reports: "npm:^3.1.6" + test-exclude: "npm:^7.0.1" + v8-to-istanbul: "npm:^9.0.0" + yargs: "npm:^17.7.2" + yargs-parser: "npm:^21.1.1" + peerDependencies: + monocart-coverage-reports: ^2 + peerDependenciesMeta: + monocart-coverage-reports: + optional: true + bin: + c8: bin/c8.js + checksum: 10/6fdc2097fec28a14089fb6e450a5d7532b39391de5c1fd04803430c7a27be4fff6311388ab9ca8cc570c42062bf0c0fa1d7f23558957f7ab35b781f33a5f0906 + languageName: node + linkType: hard + +"cacache@npm:^19.0.1": + version: 19.0.1 + resolution: "cacache@npm:19.0.1" + dependencies: + "@npmcli/fs": "npm:^4.0.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^7.0.2" + ssri: "npm:^12.0.0" + tar: "npm:^7.4.3" + unique-filename: "npm:^4.0.0" + checksum: 10/ea026b27b13656330c2bbaa462a88181dcaa0435c1c2e705db89b31d9bdf7126049d6d0445ba746dca21454a0cfdf1d6f47fd39d34c8c8435296b30bc5738a13 + languageName: node + linkType: hard + +"cacheable@npm:^1.10.0": + version: 1.10.0 + resolution: "cacheable@npm:1.10.0" + dependencies: + hookified: "npm:^1.8.2" + keyv: "npm:^5.3.3" + checksum: 10/463f350b31b6db2455c23e81ec178dc6f0e561aa400a2b4ad6385a8b3d6097c213914f93f50b34ff90b776431662aed3693680075e070f5bf66a12f43988c05a + languageName: node + linkType: hard + +"callsites@npm:^3.0.0, callsites@npm:^3.1.0": + version: 3.1.0 + resolution: "callsites@npm:3.1.0" + checksum: 10/072d17b6abb459c2ba96598918b55868af677154bec7e73d222ef95a8fdb9bbf7dae96a8421085cdad8cd190d86653b5b6dc55a4484f2e5b2e27d5e0c3fc15b3 + languageName: node + linkType: hard + +"camelcase@npm:8.0.0": + version: 8.0.0 + resolution: "camelcase@npm:8.0.0" + checksum: 10/6da7abe997af29e80052f17aa21628c7cce14af364cef9f07a2a44d59614dd6f361d405f121938e673424d673697a8c53ad17be8c4b03b0a727307c4db8b5b5e + languageName: node + linkType: hard + +"camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.3.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001687, caniuse-lite@npm:^1.0.30001726": + version: 1.0.30001726 + resolution: "caniuse-lite@npm:1.0.30001726" + checksum: 10/04d4bd6be8e426199aace9b4d26402bbb043358b590136417b8a1b3888c43301256bff007b30276c37c3d56e3e97aa8f547d80ffb9ac3644937b2ba4a3f9b156 + languageName: node + linkType: hard + +"ccount@npm:^1.0.0": + version: 1.1.0 + resolution: "ccount@npm:1.1.0" + checksum: 10/b335a79d0aa4308919cf7507babcfa04ac63d389ebed49dbf26990d4607c8a4713cde93cc83e707d84571ddfe1e7615dad248be9bc422ae4c188210f71b08b78 + languageName: node + linkType: hard + +"chalk-template@npm:^1.1.0": + version: 1.1.0 + resolution: "chalk-template@npm:1.1.0" + dependencies: + chalk: "npm:^5.2.0" + checksum: 10/868aae8d4e7556ad2f35de4e04fe65dbe1ea6c5c80ad783f1c156d0a5c33f444c6814f49cbb68fe348c78e99daf2bcf566b47ad7e13603e4691ca78b2f422824 + languageName: node + linkType: hard + +"chalk@npm:2.4.2, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + +"chalk@npm:^4.0.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"chalk@npm:^5.2.0, chalk@npm:^5.4.1": + version: 5.4.1 + resolution: "chalk@npm:5.4.1" + checksum: 10/29df3ffcdf25656fed6e95962e2ef86d14dfe03cd50e7074b06bad9ffbbf6089adbb40f75c00744d843685c8d008adaf3aed31476780312553caf07fa86e5bc7 + languageName: node + linkType: hard + +"char-regex@npm:^1.0.2": + version: 1.0.2 + resolution: "char-regex@npm:1.0.2" + checksum: 10/1ec5c2906adb9f84e7f6732a40baef05d7c85401b82ffcbc44b85fbd0f7a2b0c2a96f2eb9cf55cae3235dc12d4023003b88f09bcae8be9ae894f52ed746f4d48 + languageName: node + linkType: hard + +"character-entities-legacy@npm:^1.0.0": + version: 1.1.4 + resolution: "character-entities-legacy@npm:1.1.4" + checksum: 10/fe03a82c154414da3a0c8ab3188e4237ec68006cbcd681cf23c7cfb9502a0e76cd30ab69a2e50857ca10d984d57de3b307680fff5328ccd427f400e559c3a811 + languageName: node + linkType: hard + +"character-entities@npm:^1.0.0": + version: 1.2.4 + resolution: "character-entities@npm:1.2.4" + checksum: 10/7c11641c48d1891aaba7bc800d4500804d91a28f46d64e88c001c38e6ab2e7eae28873a77ae16e6c55d24cac35ddfbb15efe56c3012b86684a3c4e95c70216b7 + languageName: node + linkType: hard + +"character-reference-invalid@npm:^1.0.0": + version: 1.1.4 + resolution: "character-reference-invalid@npm:1.1.4" + checksum: 10/812ebc5e6e8d08fd2fa5245ae78c1e1a4bea4692e93749d256a135c4a442daf931ca18e067cc61ff4a58a419eae52677126a0bc4f05a511290427d60d3057805 + languageName: node + linkType: hard + +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10/b63cb1f73d171d140a2ed8154ee6566c8ab775d3196b0e03a2a94b5f6a0ce7777ee5685ca56849403c8d17bd457a6540672f9a60696a6137c7a409097495b82c + languageName: node + linkType: hard + +"ci-info@npm:4.2.0, ci-info@npm:^4.2.0": + version: 4.2.0 + resolution: "ci-info@npm:4.2.0" + checksum: 10/928d8457f3476ffc4a66dec93b9cdf1944d5e60dba69fbd6a0fc95b652386f6ef64857f6e32372533210ef6d8954634af2c7693d7c07778ee015f3629a5e0dd9 + languageName: node + linkType: hard + +"ci-info@npm:^3.2.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 10/75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397 + languageName: node + linkType: hard + +"cjk-regex@npm:3.3.0": + version: 3.3.0 + resolution: "cjk-regex@npm:3.3.0" + dependencies: + regexp-util: "npm:^2.0.1" + unicode-regex: "npm:^4.1.0" + checksum: 10/fd0a69db662ee99a383d134311f2099acf87b716ce94b2ea29b27f0d49070497bba314c0c7c1c5d6bbfe8cc08d268775b7e4ad8feb8e7b1aa5b049b62344150d + languageName: node + linkType: hard + +"cjs-module-lexer@npm:^2.1.0": + version: 2.1.0 + resolution: "cjs-module-lexer@npm:2.1.0" + checksum: 10/97cf8e7ddbf685ce0fe1a89349f42a015e89ddf02f1f0d764ddb8a07bd642d58a036c21b5cae078cdf6a96b332b95f806948d772adcd2c346ce5a897f5feefb7 + languageName: node + linkType: hard + +"clean-regexp@npm:^1.0.0": + version: 1.0.0 + resolution: "clean-regexp@npm:1.0.0" + dependencies: + escape-string-regexp: "npm:^1.0.5" + checksum: 10/0b1ce281b07da2463c6882ea2e8409119b6cabbd9f687cdbdcee942c45b2b9049a2084f7b5f228c63ef9f21e722963ae0bfe56a735dbdbdd92512867625a7e40 + languageName: node + linkType: hard + +"clear-module@npm:^4.1.2": + version: 4.1.2 + resolution: "clear-module@npm:4.1.2" + dependencies: + parent-module: "npm:^2.0.0" + resolve-from: "npm:^5.0.0" + checksum: 10/4931f0c461f5d7b9b79f62c2d1bc31c37f7f1d33b4e95eef7080a83955c0374f4c180f5a96cc4d63bbefc64a9aa5d12b155641109e8e489dfa50fd5820e5101f + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + +"co@npm:^4.6.0": + version: 4.6.0 + resolution: "co@npm:4.6.0" + checksum: 10/a5d9f37091c70398a269e625cedff5622f200ed0aa0cff22ee7b55ed74a123834b58711776eb0f1dc58eb6ebbc1185aa7567b57bd5979a948c6e4f85073e2c05 + languageName: node + linkType: hard + +"collapse-white-space@npm:1.0.6, collapse-white-space@npm:^1.0.2": + version: 1.0.6 + resolution: "collapse-white-space@npm:1.0.6" + checksum: 10/9673fb797952c5c888341435596c69388b22cd5560c8cd3f40edb72734a9c820f56a7c9525166bcb7068b5d5805372e6fd0c4b9f2869782ad070cb5d3faf26e7 + languageName: node + linkType: hard + +"collect-v8-coverage@npm:^1.0.2": + version: 1.0.2 + resolution: "collect-v8-coverage@npm:1.0.2" + checksum: 10/30ea7d5c9ee51f2fdba4901d4186c5b7114a088ef98fd53eda3979da77eed96758a2cae81cc6d97e239aaea6065868cf908b24980663f7b7e96aa291b3e12fa4 + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"commander@npm:^14.0.0": + version: 14.0.0 + resolution: "commander@npm:14.0.0" + checksum: 10/c05418bfc35a3e8b5c67bd9f75f5b773f386f9b85f83e70e7c926047f270929cb06cf13cd68f387dd6e7e23c6157de8171b28ba606abd3e6256028f1f789becf + languageName: node + linkType: hard + +"commander@npm:^2.19.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + +"comment-json@npm:^4.2.5": + version: 4.2.5 + resolution: "comment-json@npm:4.2.5" + dependencies: + array-timsort: "npm:^1.0.3" + core-util-is: "npm:^1.0.3" + esprima: "npm:^4.0.1" + has-own-prop: "npm:^2.0.0" + repeat-string: "npm:^1.6.1" + checksum: 10/dc347621de15043a16846a1697a6248b427e913ddfb57f3427ca4eedf9c92131000d5e8efc8be9fe191a74dc36b615d73207fc3585bf29ca1b8d32e90d40c801 + languageName: node + linkType: hard + +"comment-parser@npm:^1.4.0": + version: 1.4.1 + resolution: "comment-parser@npm:1.4.1" + checksum: 10/16a3260b5e77819ebd9c99b0b65c7d6723b1ff73487bac9ce2d8f016a2847dd689e8663b88e1fad1444bbea89847c42f785708ac86a2c55f614f7095249bbf6b + languageName: node + linkType: hard + +"commenting@npm:~1.1.0": + version: 1.1.0 + resolution: "commenting@npm:1.1.0" + checksum: 10/e172a2b6234c089ae826a1ff7c42811b88e8cf7166ebde461ad0b6cddd3822c16996b8175ce1d3c1a49d1475b1c1d8acdc906c18d3126cb4b0432df29529f232 + languageName: node + linkType: hard + +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10/09c180e8d8495d42990d617f4d4b7522b5da20f6b236afe310192d401d1da8147a7835ae1ea37797ba0c2238ef3d06f3492151591451df34539fdb4b2630f2b3 + languageName: node + linkType: hard + +"compare-versions@npm:^6.1.1": + version: 6.1.1 + resolution: "compare-versions@npm:6.1.1" + checksum: 10/9325c0fadfba81afa0ec17e6fc2ef823ba785c693089698b8d9374e5460509f1916a88591644d4cb4045c9a58e47fafbcc0724fe8bf446d2a875a3d6eeddf165 + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + +"confbox@npm:^0.1.8": + version: 0.1.8 + resolution: "confbox@npm:0.1.8" + checksum: 10/4ebcfb1c6a3b25276734ec5722e88768eb61fc02f98e11960b845c5c62bc27fd05f493d2a8244d9675b24ef95afe4c0d511cdcad02c72f5eeea463cc26687999 + languageName: node + linkType: hard + +"confbox@npm:^0.2.1": + version: 0.2.2 + resolution: "confbox@npm:0.2.2" + checksum: 10/988c7216f9b5aee5d8a8f32153a9164e1b58d92d8335c5daa323fd3fdee91f742ffc25f6c28b059474b6319204085eca985ab14c5a246988dc7ef1fe29414108 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + +"core-js-compat@npm:^3.41.0": + version: 3.42.0 + resolution: "core-js-compat@npm:3.42.0" + dependencies: + browserslist: "npm:^4.24.4" + checksum: 10/2052c73e500e95420d948a0595f4055e40ca6a208cc15c7981b7f202efa851bfae3de59a13009dc367cc5fbaeb8ff84a64c7c0bfc37de4b3bd2cf6b0e14290bd + languageName: node + linkType: hard + +"core-util-is@npm:^1.0.3": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 10/9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + +"cross-env@npm:7.0.3": + version: 7.0.3 + resolution: "cross-env@npm:7.0.3" + dependencies: + cross-spawn: "npm:^7.0.1" + bin: + cross-env: src/bin/cross-env.js + cross-env-shell: src/bin/cross-env-shell.js + checksum: 10/e99911f0d31c20e990fd92d6fd001f4b01668a303221227cc5cb42ed155f086351b1b3bd2699b200e527ab13011b032801f8ce638e6f09f854bdf744095e604c + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/0d52657d7ae36eb130999dffff1168ec348687b48dd38e2ff59992ed916c88d328cf1d07ff4a4a10bc78de5e1c23f04b306d569e42f7a2293915c081e4dfee86 + languageName: node + linkType: hard + +"crypto-random-string@npm:^4.0.0": + version: 4.0.0 + resolution: "crypto-random-string@npm:4.0.0" + dependencies: + type-fest: "npm:^1.0.1" + checksum: 10/cd5d7ae13803de53680aaed4c732f67209af5988cbeec5f6b29082020347c2d8849ca921b2008be7d6bd1d9d198c3c3697e7441d6d0d3da1bf51e9e4d2032149 + languageName: node + linkType: hard + +"cspell-config-lib@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-config-lib@npm:9.1.1" + dependencies: + "@cspell/cspell-types": "npm:9.1.1" + comment-json: "npm:^4.2.5" + yaml: "npm:^2.8.0" + checksum: 10/53a75d1bb79160a50c05c94a18a04429ac1ed2e994f43495425d22bf88a467946345951403a63830bcee18f70b5d5518aa88b9db056a45ec73a9bbf67a82c70c + languageName: node + linkType: hard + +"cspell-dictionary@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-dictionary@npm:9.1.1" + dependencies: + "@cspell/cspell-pipe": "npm:9.1.1" + "@cspell/cspell-types": "npm:9.1.1" + cspell-trie-lib: "npm:9.1.1" + fast-equals: "npm:^5.2.2" + checksum: 10/9d95ea3af573cd22837f3306ad61ba46c01ca2ec9083e6c5140e5b4b5afbef5c186d24ad812fbcd5e31f5b90fc0a2123e6ae7fbd45408f653cd61be5bc61b3ae + languageName: node + linkType: hard + +"cspell-gitignore@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-gitignore@npm:9.1.1" + dependencies: + "@cspell/url": "npm:9.1.1" + cspell-glob: "npm:9.1.1" + cspell-io: "npm:9.1.1" + bin: + cspell-gitignore: bin.mjs + checksum: 10/8f112c9f95bfd4215668551837a81a6c0f5a43a6a4e1b2fbc30b8a2f34eced36a9d91ab077e33f806a77ee38b902b5b2d64cd6a2f3925ed822e0b727b28ffd62 + languageName: node + linkType: hard + +"cspell-glob@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-glob@npm:9.1.1" + dependencies: + "@cspell/url": "npm:9.1.1" + picomatch: "npm:^4.0.2" + checksum: 10/b6e1eb52954364e990a6c821fd2ef21d64389300e58902ba5acf573e54e70443efc2aca28458178805a45dc4ff2932c6543379fc37428551e259e48f0488e9d8 + languageName: node + linkType: hard + +"cspell-grammar@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-grammar@npm:9.1.1" + dependencies: + "@cspell/cspell-pipe": "npm:9.1.1" + "@cspell/cspell-types": "npm:9.1.1" + bin: + cspell-grammar: bin.mjs + checksum: 10/be8d6d1eb840b30ab55d9604a8b15f2616fe5528d1f72bc48e9d8105840b4f860089d639906b4b6885bfe52cf7b96885452c65d08dc3a82e80d5c63484da6a7a + languageName: node + linkType: hard + +"cspell-io@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-io@npm:9.1.1" + dependencies: + "@cspell/cspell-service-bus": "npm:9.1.1" + "@cspell/url": "npm:9.1.1" + checksum: 10/ba19275292606ec7e0d98269cf875c4d040fa12cc54b4797f743667cb03418833a56d0254c5587e7831cda47d433df47aa23c721b798784bae3059a6102447fa + languageName: node + linkType: hard + +"cspell-lib@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-lib@npm:9.1.1" + dependencies: + "@cspell/cspell-bundled-dicts": "npm:9.1.1" + "@cspell/cspell-pipe": "npm:9.1.1" + "@cspell/cspell-resolver": "npm:9.1.1" + "@cspell/cspell-types": "npm:9.1.1" + "@cspell/dynamic-import": "npm:9.1.1" + "@cspell/filetypes": "npm:9.1.1" + "@cspell/strong-weak-map": "npm:9.1.1" + "@cspell/url": "npm:9.1.1" + clear-module: "npm:^4.1.2" + comment-json: "npm:^4.2.5" + cspell-config-lib: "npm:9.1.1" + cspell-dictionary: "npm:9.1.1" + cspell-glob: "npm:9.1.1" + cspell-grammar: "npm:9.1.1" + cspell-io: "npm:9.1.1" + cspell-trie-lib: "npm:9.1.1" + env-paths: "npm:^3.0.0" + fast-equals: "npm:^5.2.2" + gensequence: "npm:^7.0.0" + import-fresh: "npm:^3.3.1" + resolve-from: "npm:^5.0.0" + vscode-languageserver-textdocument: "npm:^1.0.12" + vscode-uri: "npm:^3.1.0" + xdg-basedir: "npm:^5.1.0" + checksum: 10/db42426dd57624fdceec46e8a8b3be3752eeb789a7f9822073a20642d92970a282ec541b944b3a643087b293a8443cdc6278e8b9d741a62b6465fe3bf8dc2d79 + languageName: node + linkType: hard + +"cspell-trie-lib@npm:9.1.1": + version: 9.1.1 + resolution: "cspell-trie-lib@npm:9.1.1" + dependencies: + "@cspell/cspell-pipe": "npm:9.1.1" + "@cspell/cspell-types": "npm:9.1.1" + gensequence: "npm:^7.0.0" + checksum: 10/7d0938087c74a6b8323ce5e7d158db73d374d6c327fadd2545f19da6102927c4d7316c631f400e1a3badb3c8af8d675b60f1306f4af0987bd2e5520c6b5f629d + languageName: node + linkType: hard + +"cspell@npm:9.1.1": + version: 9.1.1 + resolution: "cspell@npm:9.1.1" + dependencies: + "@cspell/cspell-json-reporter": "npm:9.1.1" + "@cspell/cspell-pipe": "npm:9.1.1" + "@cspell/cspell-types": "npm:9.1.1" + "@cspell/dynamic-import": "npm:9.1.1" + "@cspell/url": "npm:9.1.1" + chalk: "npm:^5.4.1" + chalk-template: "npm:^1.1.0" + commander: "npm:^14.0.0" + cspell-config-lib: "npm:9.1.1" + cspell-dictionary: "npm:9.1.1" + cspell-gitignore: "npm:9.1.1" + cspell-glob: "npm:9.1.1" + cspell-io: "npm:9.1.1" + cspell-lib: "npm:9.1.1" + fast-json-stable-stringify: "npm:^2.1.0" + file-entry-cache: "npm:^9.1.0" + semver: "npm:^7.7.2" + tinyglobby: "npm:^0.2.14" + bin: + cspell: bin.mjs + cspell-esm: bin.mjs + checksum: 10/7e25d537fef6fbee25b75c57e39cdc6a3a161563bcfaa79fd78e29a9fd7d61ae92d45feea264a68ab53580517d8aae9dcc35b73f73c635281cacd622a69eb374 + languageName: node + linkType: hard + +"css-units-list@npm:2.1.0": + version: 2.1.0 + resolution: "css-units-list@npm:2.1.0" + checksum: 10/be36dd4ba4ed3f103a544ca955c80f46bb57d471b159b81e93fae7e700092de6cc75c98abcbde4bb9e963ad6f63c72fae18dde935c0944ca48e71f277420adfc + languageName: node + linkType: hard + +"dashify@npm:2.0.0": + version: 2.0.0 + resolution: "dashify@npm:2.0.0" + checksum: 10/f13233f38fc39ea8dabe3a5bef51421906aa8a52e4403fcb56e3e6464428f5c0bdd75562706929a245c698bceccf68a82e30e9e327a0c582469868522a163f8c + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/1847944c2e3c2c732514b93d11886575625686056cd765336212dc15de2d2b29612b6cd80e1afba767bb8e1803b778caf9973e98169ef1a24a7a7009e1820367 + languageName: node + linkType: hard + +"dedent@npm:^1.6.0": + version: 1.6.0 + resolution: "dedent@npm:1.6.0" + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + checksum: 10/f100cb11001309f2185c4334c6f29e5323c1e73b7b75e3b1893bc71ef53cd13fb80534efc8fa7163a891ede633e310a9c600ba38c363cc9d14a72f238fe47078 + languageName: node + linkType: hard + +"deep-is@npm:^0.1.3": + version: 0.1.4 + resolution: "deep-is@npm:0.1.4" + checksum: 10/ec12d074aef5ae5e81fa470b9317c313142c9e8e2afe3f8efa124db309720db96d1d222b82b84c834e5f87e7a614b44a4684b6683583118b87c833b3be40d4d8 + languageName: node + linkType: hard + +"deepmerge@npm:^4.3.1": + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 10/058d9e1b0ff1a154468bf3837aea436abcfea1ba1d165ddaaf48ca93765fdd01a30d33c36173da8fbbed951dd0a267602bc782fe288b0fc4b7e1e7091afc4529 + languageName: node + linkType: hard + +"define-lazy-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "define-lazy-prop@npm:2.0.0" + checksum: 10/0115fdb065e0490918ba271d7339c42453d209d4cb619dfe635870d906731eff3e1ade8028bb461ea27ce8264ec5e22c6980612d332895977e89c1bbc80fcee2 + languageName: node + linkType: hard + +"deno-path-from-file-url@npm:0.0.3": + version: 0.0.3 + resolution: "deno-path-from-file-url@npm:0.0.3" + checksum: 10/3c42f82207216b9700b9a491e1d217d9b61d42fbaa7717632c7495ed736a072bff5014c3bd8b682d13ca854dcce65371c167b236196f81ad1ea5d03461bbb18e + languageName: node + linkType: hard + +"detect-newline@npm:^3.1.0": + version: 3.1.0 + resolution: "detect-newline@npm:3.1.0" + checksum: 10/ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 + languageName: node + linkType: hard + +"dettle@npm:^1.0.5": + version: 1.0.5 + resolution: "dettle@npm:1.0.5" + checksum: 10/6f4010a02c1a236c031aad148ff2e84104ae924b4d1d830143ed8500333e57fc1c8c938ace88ffa38e518f7657b6764feb1ba70d0122a9de0d97b738af53f8dd + languageName: node + linkType: hard + +"diff-sequences@npm:^29.6.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: 10/179daf9d2f9af5c57ad66d97cb902a538bcf8ed64963fa7aa0c329b3de3665ce2eb6ffdc2f69f29d445fa4af2517e5e55e5b6e00c00a9ae4f43645f97f7078cb + languageName: node + linkType: hard + +"diff@npm:8.0.2": + version: 8.0.2 + resolution: "diff@npm:8.0.2" + checksum: 10/82a2120d3418f97822e17a6044ccd4b99a91e26e145e8698353673d7146bd2d092bbebb79c112aae7badc7b9c526f9098cbe342f96174feb6beabdd2587b3c42 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + +"editorconfig@npm:0.15.3": + version: 0.15.3 + resolution: "editorconfig@npm:0.15.3" + dependencies: + commander: "npm:^2.19.0" + lru-cache: "npm:^4.1.5" + semver: "npm:^5.6.0" + sigmund: "npm:^1.0.1" + bin: + editorconfig: bin/editorconfig + checksum: 10/d82b32cc4e8f5a873b868aedd07056d62afb00c1453a3214bcef7799ff045c4c13146731c7648e5b8397b9efc71c1896733ad97a211d05cc8933364273321295 + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.5.173": + version: 1.5.174 + resolution: "electron-to-chromium@npm:1.5.174" + checksum: 10/bc553335de8321fd4ebb70844c251884c86830b4782cde05ddd6a3f7d952b65e0874cd09a2752b0e430834e4624c94b1d5c79b7fb8adc8b1e59737ebec1c1904 + languageName: node + linkType: hard + +"emittery@npm:^0.13.1": + version: 0.13.1 + resolution: "emittery@npm:0.13.1" + checksum: 10/fbe214171d878b924eedf1757badf58a5dce071cd1fa7f620fa841a0901a80d6da47ff05929d53163105e621ce11a71b9d8acb1148ffe1745e045145f6e69521 + languageName: node + linkType: hard + +"emoji-regex@npm:10.4.0": + version: 10.4.0 + resolution: "emoji-regex@npm:10.4.0" + checksum: 10/76bb92c5bcf0b6980d37e535156231e4a9d0aa6ab3b9f5eabf7690231d5aa5d5b8e516f36e6804cbdd0f1c23dfef2a60c40ab7bb8aedd890584281a565b97c50 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"enhanced-resolve@npm:^5.17.1": + version: 5.18.1 + resolution: "enhanced-resolve@npm:5.18.1" + dependencies: + graceful-fs: "npm:^4.2.4" + tapable: "npm:^2.2.0" + checksum: 10/50e81c7fe2239fba5670ebce78a34709906ed3a79274aa416434f7307b252e0b7824d76a7dd403eca795571dc6afd9a44183fc45a68475e8f2fdfbae6e92fcc3 + languageName: node + linkType: hard + +"enquirer@npm:2.4.1": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: "npm:^4.1.1" + strip-ansi: "npm:^6.0.1" + checksum: 10/b3726486cd98f0d458a851a03326a2a5dd4d84f37ff94ff2a2960c915e0fc865865da3b78f0877dc36ac5c1189069eca603e82ec63d5bc6b0dd9985bf6426d7a + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"env-paths@npm:^3.0.0": + version: 3.0.0 + resolution: "env-paths@npm:3.0.0" + checksum: 10/b2b0a0d0d9931a13d279c22ed94d78648a1cc5f408f05d47ff3e0c1616f0aa0c38fb33deec5e5be50497225d500607d57f9c8652c4d39c2f2b7608cd45768128 + languageName: node + linkType: hard + +"environment@npm:^1.0.0": + version: 1.1.0 + resolution: "environment@npm:1.1.0" + checksum: 10/dd3c1b9825e7f71f1e72b03c2344799ac73f2e9ef81b78ea8b373e55db021786c6b9f3858ea43a436a2c4611052670ec0afe85bc029c384cc71165feee2f4ba6 + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: "npm:^0.2.1" + checksum: 10/d547740aa29c34e753fb6fed2c5de81802438529c12b3673bd37b6bb1fe49b9b7abdc3c11e6062fe625d8a296b3cf769a80f878865e25e685f787763eede3ffb + languageName: node + linkType: hard + +"esbuild-plugins-node-modules-polyfill@npm:1.7.1": + version: 1.7.1 + resolution: "esbuild-plugins-node-modules-polyfill@npm:1.7.1" + dependencies: + "@jspm/core": "npm:^2.1.0" + local-pkg: "npm:^1.1.1" + resolve.exports: "npm:^2.0.3" + peerDependencies: + esbuild: ">=0.14.0 <=0.25.x" + checksum: 10/bcc44ea64e49e3f5dad2853416229b5e551aeb32ca98849a03ed68b1875369afb47114a09edc410517a024c561be8bc7e0013f6dc0f4d95888160aeb960c3cff + languageName: node + linkType: hard + +"esbuild-visualizer@npm:0.7.0": + version: 0.7.0 + resolution: "esbuild-visualizer@npm:0.7.0" + dependencies: + open: "npm:^8.4.0" + picomatch: "npm:^4.0.0" + yargs: "npm:^17.6.2" + bin: + esbuild-visualizer: dist/bin/cli.js + checksum: 10/dbc8c55a973f119b8e5774f2d47ee3ad42c50dcc3ed53c5457b495aa90286f1624f2ffaef82bf20c649b84703875a8844eed643f83d26f4183ee024bd69d1aff + languageName: node + linkType: hard + +"esbuild@npm:0.25.5": + version: 0.25.5 + resolution: "esbuild@npm:0.25.5" + dependencies: + "@esbuild/aix-ppc64": "npm:0.25.5" + "@esbuild/android-arm": "npm:0.25.5" + "@esbuild/android-arm64": "npm:0.25.5" + "@esbuild/android-x64": "npm:0.25.5" + "@esbuild/darwin-arm64": "npm:0.25.5" + "@esbuild/darwin-x64": "npm:0.25.5" + "@esbuild/freebsd-arm64": "npm:0.25.5" + "@esbuild/freebsd-x64": "npm:0.25.5" + "@esbuild/linux-arm": "npm:0.25.5" + "@esbuild/linux-arm64": "npm:0.25.5" + "@esbuild/linux-ia32": "npm:0.25.5" + "@esbuild/linux-loong64": "npm:0.25.5" + "@esbuild/linux-mips64el": "npm:0.25.5" + "@esbuild/linux-ppc64": "npm:0.25.5" + "@esbuild/linux-riscv64": "npm:0.25.5" + "@esbuild/linux-s390x": "npm:0.25.5" + "@esbuild/linux-x64": "npm:0.25.5" + "@esbuild/netbsd-arm64": "npm:0.25.5" + "@esbuild/netbsd-x64": "npm:0.25.5" + "@esbuild/openbsd-arm64": "npm:0.25.5" + "@esbuild/openbsd-x64": "npm:0.25.5" + "@esbuild/sunos-x64": "npm:0.25.5" + "@esbuild/win32-arm64": "npm:0.25.5" + "@esbuild/win32-ia32": "npm:0.25.5" + "@esbuild/win32-x64": "npm:0.25.5" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/0fa4c3b42c6ddf1a008e75a4bb3dcab08ce22ac0b31dd59dc01f7fe8e21380bfaec07a2fe3730a7cf430da5a30142d016714b358666325a4733547afa42be405 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1, escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10/9d7169e3965b2f9ae46971afa392f6e5a25545ea30f2e2dd99c9b0a95a3f52b5653681a84f5b2911a413ddad2d7a93d3514165072f349b5ffc59c75a899970d6 + languageName: node + linkType: hard + +"escape-string-regexp@npm:5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10/20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 10/9f8a2d5743677c16e85c810e3024d54f0c8dea6424fad3c79ef6666e81dd0846f7437f5e729dfcdac8981bc9e5294c39b4580814d114076b8d36318f46ae4395 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"eslint-compat-utils@npm:^0.5.1": + version: 0.5.1 + resolution: "eslint-compat-utils@npm:0.5.1" + dependencies: + semver: "npm:^7.5.4" + peerDependencies: + eslint: ">=6.0.0" + checksum: 10/ac65ac1c6107cf19f63f5fc17cea361c9cb1336be7356f23dbb0fac10979974b4622e13e950be43cbf431801f2c07f7dab448573181ccf6edc0b86d5b5304511 + languageName: node + linkType: hard + +"eslint-config-prettier@npm:10.1.5": + version: 10.1.5 + resolution: "eslint-config-prettier@npm:10.1.5" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 10/bc192e703e595c886c33703ebb9a8381a18179ce2ec14a24f671cb675a96b8ba1b4a862c5763680e1c918131007759afb3c874788c7d61706740147ae77f249a + languageName: node + linkType: hard + +"eslint-formatter-friendly@npm:7.0.0": + version: 7.0.0 + resolution: "eslint-formatter-friendly@npm:7.0.0" + dependencies: + "@babel/code-frame": "npm:7.0.0" + chalk: "npm:2.4.2" + extend: "npm:3.0.2" + strip-ansi: "npm:5.2.0" + text-table: "npm:0.2.0" + checksum: 10/37a383ed9ebf5027c49010a4da391d5b1d0d4b3995d5c284642cd6aabd8b2c3ffe38a8a3b963a910dcf963b56bde498614f3300d01ba9d7c609b34a6239578bf + languageName: node + linkType: hard + +"eslint-plugin-compat@npm:6.0.2": + version: 6.0.2 + resolution: "eslint-plugin-compat@npm:6.0.2" + dependencies: + "@mdn/browser-compat-data": "npm:^5.5.35" + ast-metadata-inferer: "npm:^0.8.1" + browserslist: "npm:^4.24.2" + caniuse-lite: "npm:^1.0.30001687" + find-up: "npm:^5.0.0" + globals: "npm:^15.7.0" + lodash.memoize: "npm:^4.1.2" + semver: "npm:^7.6.2" + peerDependencies: + eslint: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + checksum: 10/7be7c900ee4e460d8ebc2605331b45605f1a0f95280fe46068ff95c4c4bde9242b25a5c9a1492b3e1535e642b5c14aab66df7ca2f8247fe2520d9939e97a337f + languageName: node + linkType: hard + +"eslint-plugin-es-x@npm:^7.8.0": + version: 7.8.0 + resolution: "eslint-plugin-es-x@npm:7.8.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.1.2" + "@eslint-community/regexpp": "npm:^4.11.0" + eslint-compat-utils: "npm:^0.5.1" + peerDependencies: + eslint: ">=8" + checksum: 10/1df8d52c4fadc06854ce801af05b05f2642aa2deb918fb7d37738596eabd70b7f21a22b150b78ec9104bac6a1b6b4fb796adea2364ede91b01d20964849ce5f7 + languageName: node + linkType: hard + +"eslint-plugin-jest@npm:29.0.1": + version: 29.0.1 + resolution: "eslint-plugin-jest@npm:29.0.1" + dependencies: + "@typescript-eslint/utils": "npm:^8.0.0" + peerDependencies: + "@typescript-eslint/eslint-plugin": ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 + jest: "*" + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 10/d7b0a3fbdbf795225fbbff2c69c7711bb6502a3d4444d857c95a9d6578a65c80fd8a9fcd3ebc3d0634fe1cc70b4b77e887943945fadab6a974a736d2ffc5babf + languageName: node + linkType: hard + +"eslint-plugin-n@npm:17.20.0": + version: 17.20.0 + resolution: "eslint-plugin-n@npm:17.20.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.5.0" + "@typescript-eslint/utils": "npm:^8.26.1" + enhanced-resolve: "npm:^5.17.1" + eslint-plugin-es-x: "npm:^7.8.0" + get-tsconfig: "npm:^4.8.1" + globals: "npm:^15.11.0" + ignore: "npm:^5.3.2" + minimatch: "npm:^9.0.5" + semver: "npm:^7.6.3" + ts-declaration-location: "npm:^1.0.6" + peerDependencies: + eslint: ">=8.23.0" + checksum: 10/7c4c9fb6052158004e4290c69eff85723b51680d6bf9e5f3fa358cdbf055e0ffaf916e84a4bebc84a87a9c79823d93ce1d799e0a6471e44bd8981a8a635d7b6f + languageName: node + linkType: hard + +"eslint-plugin-react-debug@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-debug@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/c1c76b455169dab5727db9a99b43e0fdd2777ec523569070895a3e6847ce59cc24c2123f586c662659303efb981ce3a119c44559c5ae717e9dfa3693d17fedad + languageName: node + linkType: hard + +"eslint-plugin-react-dom@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-dom@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + compare-versions: "npm:^6.1.1" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/3723baf51d0d8f8236bbe0e7fb1b76c02e217809c6cbcbd5c6be82222b4da1fadce6d483db4dfaab0a13ca3565d22a24391a7c990a2ccb4fde4e9bb836c80119 + languageName: node + linkType: hard + +"eslint-plugin-react-hooks-extra@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-hooks-extra@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/66d8de7e402b7c56e8fa0af972cc4bc44e4feac039de60bb64921e9dbc57582243461640023401227f628887f278d020a1b65c674fca6ca00f61244e02e7e096 + languageName: node + linkType: hard + +"eslint-plugin-react-naming-convention@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-naming-convention@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/fe6612c170bd02f6832bcac5093e5b26c6b346b9de442ff86a8edfd9afc218035ed1d9b5ee75ac09a1f2a8c3beef8074765f54ad61ff08f1f22ebd441abc1b31 + languageName: node + linkType: hard + +"eslint-plugin-react-web-api@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-web-api@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + typescript: + optional: true + checksum: 10/82011dcf10422017a3d0d7a287379b1d227b8c49827697f5a4421f597b573de7f6cf9fbcf0f7e9ea23ebf492455a40fd165e27811c6ba470561f74ac8d5e9cd7 + languageName: node + linkType: hard + +"eslint-plugin-react-x@npm:1.52.2": + version: 1.52.2 + resolution: "eslint-plugin-react-x@npm:1.52.2" + dependencies: + "@eslint-react/ast": "npm:1.52.2" + "@eslint-react/core": "npm:1.52.2" + "@eslint-react/eff": "npm:1.52.2" + "@eslint-react/kit": "npm:1.52.2" + "@eslint-react/shared": "npm:1.52.2" + "@eslint-react/var": "npm:1.52.2" + "@typescript-eslint/scope-manager": "npm:^8.34.0" + "@typescript-eslint/type-utils": "npm:^8.34.0" + "@typescript-eslint/types": "npm:^8.34.0" + "@typescript-eslint/utils": "npm:^8.34.0" + compare-versions: "npm:^6.1.1" + is-immutable-type: "npm:^5.0.1" + string-ts: "npm:^2.2.1" + ts-pattern: "npm:^5.7.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + ts-api-utils: ^2.1.0 + typescript: ^4.9.5 || ^5.3.3 + peerDependenciesMeta: + eslint: + optional: false + ts-api-utils: + optional: true + typescript: + optional: true + checksum: 10/57506eaa70a53b17b05b954557e3134fd17fcc74af33dbe198b311fa2203cc5ff87347e7874f949f93fa8501a97ba43d23a84113a9d5ac76d5518fbddc69924a + languageName: node + linkType: hard + +"eslint-plugin-regexp@npm:2.9.0": + version: 2.9.0 + resolution: "eslint-plugin-regexp@npm:2.9.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.11.0" + comment-parser: "npm:^1.4.0" + jsdoc-type-pratt-parser: "npm:^4.0.0" + refa: "npm:^0.12.1" + regexp-ast-analysis: "npm:^0.7.1" + scslre: "npm:^0.3.0" + peerDependencies: + eslint: ">=8.44.0" + checksum: 10/5d0dd47fd9f384e53a78cf90fae94d74926cbb02da66247eb09ccb61f17cac7a84a8c3d35479cd0b3479eb3b4a58b1c393c9a25368ceeddbcd9e7a7dbbc54b77 + languageName: node + linkType: hard + +"eslint-plugin-simple-import-sort@npm:12.1.1": + version: 12.1.1 + resolution: "eslint-plugin-simple-import-sort@npm:12.1.1" + peerDependencies: + eslint: ">=5.0.0" + checksum: 10/2a690cea9243fbefa70345687bca8952f5e185fa459b7a8db687a908cc31082435cfee236c619d5245548fa5f89a2f2c4f8499f80512e048d2bedc60e3662d5a + languageName: node + linkType: hard + +"eslint-plugin-unicorn@npm:59.0.1": + version: 59.0.1 + resolution: "eslint-plugin-unicorn@npm:59.0.1" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + "@eslint-community/eslint-utils": "npm:^4.5.1" + "@eslint/plugin-kit": "npm:^0.2.7" + ci-info: "npm:^4.2.0" + clean-regexp: "npm:^1.0.0" + core-js-compat: "npm:^3.41.0" + esquery: "npm:^1.6.0" + find-up-simple: "npm:^1.0.1" + globals: "npm:^16.0.0" + indent-string: "npm:^5.0.0" + is-builtin-module: "npm:^5.0.0" + jsesc: "npm:^3.1.0" + pluralize: "npm:^8.0.0" + regexp-tree: "npm:^0.1.27" + regjsparser: "npm:^0.12.0" + semver: "npm:^7.7.1" + strip-indent: "npm:^4.0.0" + peerDependencies: + eslint: ">=9.22.0" + checksum: 10/df3e695a0eaf4cd82ccaab97494bbf2aa67b1278bae3a3b87c38129c00142e40f03fe16cdeac83717fdd9923d4ca32d55897a33556c4951abd36fa59fd8e77d0 + languageName: node + linkType: hard + +"eslint-scope@npm:^8.4.0": + version: 8.4.0 + resolution: "eslint-scope@npm:8.4.0" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10/e8e611701f65375e034c62123946e628894f0b54aa8cb11abe224816389abe5cd74cf16b62b72baa36504f22d1a958b9b8b0169b82397fe2e7997674c0d09b06 + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-visitor-keys@npm:4.2.1" + checksum: 10/3ee00fc6a7002d4b0ffd9dc99e13a6a7882c557329e6c25ab254220d71e5c9c4f89dca4695352949ea678eb1f3ba912a18ef8aac0a7fe094196fd92f441bfce2 + languageName: node + linkType: hard + +"eslint@npm:9.29.0": + version: 9.29.0 + resolution: "eslint@npm:9.29.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.20.1" + "@eslint/config-helpers": "npm:^0.2.1" + "@eslint/core": "npm:^0.14.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.29.0" + "@eslint/plugin-kit": "npm:^0.3.1" + "@humanfs/node": "npm:^0.16.6" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.6" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.4.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10/be0c8e123207c9d653fb75ddc610b85dfbf295a2bfa1cbecc78f191dcba9c421525b5befd5d499ce561eca607c9c33f455e4fff0b1c2d4202c2896dafe95094a + languageName: node + linkType: hard + +"esm-utils@npm:4.4.2": + version: 4.4.2 + resolution: "esm-utils@npm:4.4.2" + dependencies: + import-meta-resolve: "npm:^4.1.0" + url-or-path: "npm:^2.6.1" + checksum: 10/686b3744d231d706919c63a966fb4d659343d4a3ac0889308b522446a78309c6892e56c4c518306ce4785be0a0d7b16704e0cae8c19d81872f5f59101d468b79 + languageName: node + linkType: hard + +"espree@npm:10.4.0, espree@npm:^10.0.1, espree@npm:^10.4.0": + version: 10.4.0 + resolution: "espree@npm:10.4.0" + dependencies: + acorn: "npm:^8.15.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10/9b355b32dbd1cc9f57121d5ee3be258fab87ebeb7c83fc6c02e5af1a74fc8c5ba79fe8c663e69ea112c3e84a1b95e6a2067ac4443ee7813bb85ac7581acb8bf9 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0, esprima@npm:^4.0.1": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + +"esquery@npm:^1.5.0, esquery@npm:^1.6.0": + version: 1.6.0 + resolution: "esquery@npm:1.6.0" + dependencies: + estraverse: "npm:^5.1.0" + checksum: 10/c587fb8ec9ed83f2b1bc97cf2f6854cc30bf784a79d62ba08c6e358bf22280d69aee12827521cf38e69ae9761d23fb7fde593ce315610f85655c139d99b05e5a + languageName: node + linkType: hard + +"esrecurse@npm:^4.3.0": + version: 4.3.0 + resolution: "esrecurse@npm:4.3.0" + dependencies: + estraverse: "npm:^5.2.0" + checksum: 10/44ffcd89e714ea6b30143e7f119b104fc4d75e77ee913f34d59076b40ef2d21967f84e019f84e1fd0465b42cdbf725db449f232b5e47f29df29ed76194db8e16 + languageName: node + linkType: hard + +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e + languageName: node + linkType: hard + +"esutils@npm:^2.0.2": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10/b23acd24791db11d8f65be5ea58fd9a6ce2df5120ae2da65c16cfc5331ff59d5ac4ef50af66cd4bde238881503ec839928a0135b99a036a9cdfa22d17fd56cdb + languageName: node + linkType: hard + +"execa@npm:^5.1.1": + version: 5.1.1 + resolution: "execa@npm:5.1.1" + dependencies: + cross-spawn: "npm:^7.0.3" + get-stream: "npm:^6.0.0" + human-signals: "npm:^2.1.0" + is-stream: "npm:^2.0.0" + merge-stream: "npm:^2.0.0" + npm-run-path: "npm:^4.0.1" + onetime: "npm:^5.1.2" + signal-exit: "npm:^3.0.3" + strip-final-newline: "npm:^2.0.0" + checksum: 10/8ada91f2d70f7dff702c861c2c64f21dfdc1525628f3c0454fd6f02fce65f7b958616cbd2b99ca7fa4d474e461a3d363824e91b3eb881705231abbf387470597 + languageName: node + linkType: hard + +"exit-x@npm:^0.2.2": + version: 0.2.2 + resolution: "exit-x@npm:0.2.2" + checksum: 10/ee043053e6c1e237adf5ad9c4faf9f085b606f64a4ff859e2b138fab63fe642711d00c9af452a9134c4c92c55f752e818bfabab78c24d345022db163f3137027 + languageName: node + linkType: hard + +"expect@npm:30.0.3": + version: 30.0.3 + resolution: "expect@npm:30.0.3" + dependencies: + "@jest/expect-utils": "npm:30.0.3" + "@jest/get-type": "npm:30.0.1" + jest-matcher-utils: "npm:30.0.3" + jest-message-util: "npm:30.0.2" + jest-mock: "npm:30.0.2" + jest-util: "npm:30.0.2" + checksum: 10/4f15a21c1b6341d2dd3de78104601b2f594ee2c6b63e2f40be6e4deda589fad8b3873caa2cdb1452b87858b41964086c236e07826483127a7786c66d053dcb9f + languageName: node + linkType: hard + +"expect@npm:^29.7.0": + version: 29.7.0 + resolution: "expect@npm:29.7.0" + dependencies: + "@jest/expect-utils": "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + jest-matcher-utils: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + checksum: 10/63f97bc51f56a491950fb525f9ad94f1916e8a014947f8d8445d3847a665b5471b768522d659f5e865db20b6c2033d2ac10f35fcbd881a4d26407a4f6f18451a + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.2 + resolution: "exponential-backoff@npm:3.1.2" + checksum: 10/ca2f01f1aa4dafd3f3917bd531ab5be08c6f5f4b2389d2e974f903de3cbeb50b9633374353516b6afd70905775e33aba11afab1232d3acf0aa2963b98a611c51 + languageName: node + linkType: hard + +"exsolve@npm:^1.0.1": + version: 1.0.5 + resolution: "exsolve@npm:1.0.5" + checksum: 10/5bcdad5685f3435e3f1f0326cfccf727418752cb5945d7c030d48c0aaff9dd5ebd8b082ab498e576f34c391aaba7b32d35632f2f708c1ca1cdfe714aa66902bc + languageName: node + linkType: hard + +"extend@npm:3.0.2, extend@npm:^3.0.0": + version: 3.0.2 + resolution: "extend@npm:3.0.2" + checksum: 10/59e89e2dc798ec0f54b36d82f32a27d5f6472c53974f61ca098db5d4648430b725387b53449a34df38fd0392045434426b012f302b3cc049a6500ccf82877e4e + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-equals@npm:^5.2.2": + version: 5.2.2 + resolution: "fast-equals@npm:5.2.2" + checksum: 10/87939dc01c6634f844369c2d774c9bf82b6c5935eb45c698fdfd2e708439c6c94a67a41c67c7e063759394e319850ee563e717e65776c8f5997566b0cbb17c7a + languageName: node + linkType: hard + +"fast-glob@npm:3.3.3, fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.8" + checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad + languageName: node + linkType: hard + +"fast-ignore@npm:^1.1.3": + version: 1.1.3 + resolution: "fast-ignore@npm:1.1.3" + dependencies: + grammex: "npm:^3.1.2" + string-escape-regex: "npm:^1.0.0" + checksum: 10/12d33fe53e140ac902ec9f32f2c69f3a74d3412b1011007248a0a0a50d290bc1efe2c6725f5c60cb94256c34b9bff6e9ef90abce3d14a8402301bce3699296f6 + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:2.1.0, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + +"fast-levenshtein@npm:^2.0.6": + version: 2.0.6 + resolution: "fast-levenshtein@npm:2.0.6" + checksum: 10/eb7e220ecf2bab5159d157350b81d01f75726a4382f5a9266f42b9150c4523b9795f7f5d9fbbbeaeac09a441b2369f05ee02db48ea938584205530fe5693cfe1 + languageName: node + linkType: hard + +"fast-string-truncated-width@npm:^1.2.0": + version: 1.2.1 + resolution: "fast-string-truncated-width@npm:1.2.1" + checksum: 10/062ef2137af59da5717efee18797961974e8b73bc69a16dea286bf56a5cb11e1d8089cd704c6eb0a5eca35fb9ffb1454b37e6dbd40a705a03f41a7d685df908c + languageName: node + linkType: hard + +"fast-string-width@npm:^1.1.0": + version: 1.1.0 + resolution: "fast-string-width@npm:1.1.0" + dependencies: + fast-string-truncated-width: "npm:^1.2.0" + checksum: 10/0ea18158bf754e3fb613258e5a7f3adc8dced823180bda25b756b8d6849e31b4bea72175606836d64c8b2c2ce876fc02981361744742c56cac9a547be4fbefb4 + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.19.1 + resolution: "fastq@npm:1.19.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10/75679dc226316341c4f2a6b618571f51eac96779906faecd8921b984e844d6ae42fabb2df69b1071327d398d5716693ea9c9c8941f64ac9e89ec2032ce59d730 + languageName: node + linkType: hard + +"fb-watchman@npm:^2.0.0, fb-watchman@npm:^2.0.2": + version: 2.0.2 + resolution: "fb-watchman@npm:2.0.2" + dependencies: + bser: "npm:2.1.1" + checksum: 10/4f95d336fb805786759e383fd7fff342ceb7680f53efcc0ef82f502eb479ce35b98e8b207b6dfdfeea0eba845862107dc73813775fc6b56b3098c6e90a2dad77 + languageName: node + linkType: hard + +"fd-package-json@npm:^2.0.0": + version: 2.0.0 + resolution: "fd-package-json@npm:2.0.0" + dependencies: + walk-up-path: "npm:^4.0.0" + checksum: 10/e595a1a23f8e208815cdcf26c92218240da00acce80468324408dc4a5cb6c26b6efb5076f0458a02f044562a1e60253731187a627d5416b4961468ddfc0ae426 + languageName: node + linkType: hard + +"fdir@npm:^6.4.3, fdir@npm:^6.4.4": + version: 6.4.4 + resolution: "fdir@npm:6.4.4" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10/d0000d6b790059b35f4ed19acc8847a66452e0bc68b28766c929ffd523e5ec2083811fc8a545e4a1d4945ce70e887b3a610c145c681073b506143ae3076342ed + languageName: node + linkType: hard + +"file-entry-cache@npm:10.1.1": + version: 10.1.1 + resolution: "file-entry-cache@npm:10.1.1" + dependencies: + flat-cache: "npm:^6.1.10" + checksum: 10/f59cb96839d2ae3f3f24fcd8d5e46ca44b99909f8aa7e8db8244d9a0bb4e90b12a86628291920734241afd2b867ddc0e4297949058636669e7bf6dc3dc386d38 + languageName: node + linkType: hard + +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: "npm:^4.0.0" + checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 + languageName: node + linkType: hard + +"file-entry-cache@npm:^9.1.0": + version: 9.1.0 + resolution: "file-entry-cache@npm:9.1.0" + dependencies: + flat-cache: "npm:^5.0.0" + checksum: 10/fd67a9552f272ac4a1731c545e1350bd135e208659144cc5311baac6b8bbf55da7c8c3a0bf25c71ed78eff2bdd26d2a3a8f9ba3d8bec968fe8d1eeba6ab14a96 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"find-cache-directory@npm:6.0.0": + version: 6.0.0 + resolution: "find-cache-directory@npm:6.0.0" + dependencies: + common-path-prefix: "npm:^3.0.0" + pkg-dir: "npm:^8.0.0" + checksum: 10/d0864b74ac556e21b1b4dc09d37f0b85ba8620f8cecc08727e8b2348e94828595d7368095deb79e804234629db56900c0f953beecf3cf2373e615fb809cc2033 + languageName: node + linkType: hard + +"find-in-directory@npm:^3.0.0": + version: 3.0.0 + resolution: "find-in-directory@npm:3.0.0" + dependencies: + url-or-path: "npm:2.6.1" + checksum: 10/6af5a95639db23288a57b7b4a54ac83d54f01e378475ba6a2665ebf68d01f29af0aca2acedb2fae70e00f12fb2c5604f1711c72ee62d7f042fbe999e2e746af8 + languageName: node + linkType: hard + +"find-up-json@npm:^2.0.5": + version: 2.0.5 + resolution: "find-up-json@npm:2.0.5" + dependencies: + find-up-path: "npm:^1.0.1" + checksum: 10/296af8c14be6a70c212fcbd80b03e8d1814ba080c0ce5f8393ab4e2a8d35707681e89d16db1bc7315a62bb033075ad014c7aa2608408db59a36b150239938b4b + languageName: node + linkType: hard + +"find-up-path@npm:^1.0.1": + version: 1.0.1 + resolution: "find-up-path@npm:1.0.1" + checksum: 10/8e1cc4157985200f99bf9ad57ad18d6fbefdad51aba26d3c088930c8da06a142da331ea8347b92be2a30343c97ad6ff1849b30a6dd4bea8441fb19f542246142 + languageName: node + linkType: hard + +"find-up-simple@npm:^1.0.0, find-up-simple@npm:^1.0.1": + version: 1.0.1 + resolution: "find-up-simple@npm:1.0.1" + checksum: 10/6e374bffda9f8425314eab47ef79752b6e77dcc95c0ad17d257aef48c32fe07bbc41bcafbd22941c25bb94fffaaaa8e178d928867d844c58100c7fe19ec82f72 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc + languageName: node + linkType: hard + +"flat-cache@npm:^5.0.0": + version: 5.0.0 + resolution: "flat-cache@npm:5.0.0" + dependencies: + flatted: "npm:^3.3.1" + keyv: "npm:^4.5.4" + checksum: 10/42570762052b17a1dec221d73a1e417d0ba07137de6debaabb51389cac265a12a027a895dc84e1725bc5cdde04fe8b706ad836860b05488e9a04bda9301d2529 + languageName: node + linkType: hard + +"flat-cache@npm:^6.1.10": + version: 6.1.10 + resolution: "flat-cache@npm:6.1.10" + dependencies: + cacheable: "npm:^1.10.0" + flatted: "npm:^3.3.3" + hookified: "npm:^1.9.1" + checksum: 10/f066310af27739d1734df8f7398a3adfe2763b47e67b77da5b5d39750fa41ffb912b88582ae90d226d6603285312a8a6175126e5c515a9f11793af1017fddd3d + languageName: node + linkType: hard + +"flatted@npm:^3.2.9, flatted@npm:^3.3.1, flatted@npm:^3.3.3": + version: 3.3.3 + resolution: "flatted@npm:3.3.3" + checksum: 10/8c96c02fbeadcf4e8ffd0fa24983241e27698b0781295622591fc13585e2f226609d95e422bcf2ef044146ffacb6b68b1f20871454eddf75ab3caa6ee5f4a1fe + languageName: node + linkType: hard + +"flatten@npm:^1.0.2": + version: 1.0.3 + resolution: "flatten@npm:1.0.3" + checksum: 10/5c57379816f1692aaa79fbc6390e0a0644e5e8442c5783ed57c6d315468eddbc53a659eaa03c9bb1e771b0f4a9bd8dd8a2620286bf21fd6538a7857321fdfb20 + languageName: node + linkType: hard + +"flow-parser@npm:0.274.1": + version: 0.274.1 + resolution: "flow-parser@npm:0.274.1" + checksum: 10/86e481bd07d78fbffec840093b4aa3d80249e50b2eea92fa976f394c61f176513337750b7dea45271e2b453071ae0d34ff0c361e537ab3c238b7323adec9a129 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0, foreground-child@npm:^3.1.1": + version: 3.3.1 + resolution: "foreground-child@npm:3.3.1" + dependencies: + cross-spawn: "npm:^7.0.6" + signal-exit: "npm:^4.0.1" + checksum: 10/427b33f997a98073c0424e5c07169264a62cda806d8d2ded159b5b903fdfc8f0a1457e06b5fc35506497acb3f1e353f025edee796300209ac6231e80edece835 + languageName: node + linkType: hard + +"formatly@npm:^0.2.4": + version: 0.2.4 + resolution: "formatly@npm:0.2.4" + dependencies: + fd-package-json: "npm:^2.0.0" + bin: + formatly: bin/index.mjs + checksum: 10/4060d24ef35a519c1d115a05f3eeff4b03690b373591b488a8743adfe4800c9d2fc10fe47d524ddae08e69d12eb925c7eb716e2b6e3743949a268e5e0ba24c65 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + +"fsevents@npm:^2.3.2, fsevents@npm:^2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin<compat/fsevents>, fsevents@patch:fsevents@npm%3A^2.3.3#optional!builtin<compat/fsevents>": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin<compat/fsevents>::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-once@npm:^3.0.1": + version: 3.0.1 + resolution: "function-once@npm:3.0.1" + checksum: 10/11cc5e0fc669c01c4ec47f90b416444ee0ebfde80b43dd99011dcde46c9e16200a74cc078db646a60d4fbcb61736be729073ed2b4a46abdf2ed8d0e7e01d35e9 + languageName: node + linkType: hard + +"gensequence@npm:^7.0.0": + version: 7.0.0 + resolution: "gensequence@npm:7.0.0" + checksum: 10/22e404384349b17952e4102a3dd3a9476772a6fc8f05e36885b489406f710c1fe2ec3c0687a1da554ccd845ce1ab7e418a867d3a1b4cf86cda2f5a7ce4f33bc4 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-current-package@npm:^1.0.1": + version: 1.0.1 + resolution: "get-current-package@npm:1.0.1" + dependencies: + find-up-json: "npm:^2.0.5" + checksum: 10/aaa66295d7c009f2929cc1a48bbf049fc5f2fbcb0f4384cecb01b2599870876680d8b0e58535ce162f7f060ae08a7d273a74016b3327bcad9714384390cf9589 + languageName: node + linkType: hard + +"get-east-asian-width@npm:1.3.0": + version: 1.3.0 + resolution: "get-east-asian-width@npm:1.3.0" + checksum: 10/8e8e779eb28701db7fdb1c8cab879e39e6ae23f52dadd89c8aed05869671cee611a65d4f8557b83e981428623247d8bc5d0c7a4ef3ea7a41d826e73600112ad8 + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-stdin@npm:9.0.0": + version: 9.0.0 + resolution: "get-stdin@npm:9.0.0" + checksum: 10/5972bc34d05932b45512c8e2d67b040f1c1ca8afb95c56cbc480985f2d761b7e37fe90dc8abd22527f062cc5639a6930ff346e9952ae4c11a2d4275869459594 + languageName: node + linkType: hard + +"get-stream@npm:^6.0.0": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: 10/781266d29725f35c59f1d214aedc92b0ae855800a980800e2923b3fbc4e56b3cb6e462c42e09a1cf1a00c64e056a78fa407cbe06c7c92b7e5cd49b4b85c2a497 + languageName: node + linkType: hard + +"get-tsconfig@npm:^4.8.1": + version: 4.10.0 + resolution: "get-tsconfig@npm:4.10.0" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 10/5259b5c99a1957114337d9d0603b4a305ec9e29fa6cac7d2fbf634ba6754a0cc88bfd281a02416ce64e604b637d3cb239185381a79a5842b17fb55c097b38c4b + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"glob-parent@npm:^6.0.2": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: "npm:^4.0.3" + checksum: 10/c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + languageName: node + linkType: hard + +"glob@npm:^7.1.4": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + +"global-directory@npm:^4.0.1": + version: 4.0.1 + resolution: "global-directory@npm:4.0.1" + dependencies: + ini: "npm:4.1.1" + checksum: 10/5b4df24438a4e5f21e43fbdd9e54f5e12bb48dce01a0a83b415d8052ce91be2d3a97e0c8f98a535e69649b2190036155e9f0f7d3c62f9318f31bdc3fd4f235f5 + languageName: node + linkType: hard + +"globals@npm:16.2.0, globals@npm:^16.0.0": + version: 16.2.0 + resolution: "globals@npm:16.2.0" + checksum: 10/37fc33502973ebbee5a44b58939aa8574abc00ca1fc4c1d4ec0571a2c6620843ae647eff8bd082adf6bb5975ad221a887522b9a7961125764f0cb6dfab0b7483 + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 + languageName: node + linkType: hard + +"globals@npm:^15.11.0, globals@npm:^15.7.0": + version: 15.15.0 + resolution: "globals@npm:15.15.0" + checksum: 10/7f561c87b2fd381b27fc2db7df8a4ea7a9bb378667b8a7193e61fd2ca3a876479174e2a303a74345fbea6e1242e16db48915c1fd3bf35adcf4060a795b425e18 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"grammex@npm:^3.1.1, grammex@npm:^3.1.10, grammex@npm:^3.1.2": + version: 3.1.10 + resolution: "grammex@npm:3.1.10" + checksum: 10/c58cad0c4614aca3fc60e187df9e0ffa2a34e0a328ee590f48084bcb2406744ff36ebc5c49a5d552d549f8291930442c48f44e2d2a8d663a735fdca577c61a41 + languageName: node + linkType: hard + +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 + languageName: node + linkType: hard + +"graphql@npm:16.11.0": + version: 16.11.0 + resolution: "graphql@npm:16.11.0" + checksum: 10/e3e1633d0b464bbb3fa41283fae938bd3bac801c350555b3f1a129d99fb3cfe157fa69c1389229dba902731942eb08bdea4b29f1271965feee8779576b26ef01 + languageName: node + linkType: hard + +"has-ansi@npm:^6.0.0": + version: 6.0.0 + resolution: "has-ansi@npm:6.0.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/5f839cceb7d5df380aa07ca059b2281cdf327578d48738ee5e28ca2f062f9a526008e6c67dae1ee9fff86471105aa98858dbaf0620b3def1fa4f4eef8aaa2915 + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"has-own-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "has-own-prop@npm:2.0.0" + checksum: 10/ca6336e85ead2295c9603880cbc199e2d3ff7eaea0e9035d68fbc79892e9cf681abc62c0909520f112c671dad9961be2173b21dff951358cc98425c560e789e0 + languageName: node + linkType: hard + +"hermes-estree@npm:0.29.0": + version: 0.29.0 + resolution: "hermes-estree@npm:0.29.0" + checksum: 10/40fdf631c2b782975a6c578524e2be6f83bf3a84d471ad4b4582a1e8f15f0fecdca9048cec54c343a57cb4b75e060bdfc5f40d76fbba605671bce5bae7a58a74 + languageName: node + linkType: hard + +"hermes-parser@npm:0.29.0": + version: 0.29.0 + resolution: "hermes-parser@npm:0.29.0" + dependencies: + hermes-estree: "npm:0.29.0" + checksum: 10/c9aaaf5d9de59b3d8443333434091fbb527b2b751c8cf66b0797b127dd04b9c0820f8fb085d5ce3a5706f601b2a5fefc1c6a84bb1598e80468baa25a13d890fb + languageName: node + linkType: hard + +"hookified@npm:^1.8.2, hookified@npm:^1.9.1": + version: 1.9.1 + resolution: "hookified@npm:1.9.1" + checksum: 10/48814815af4130d49ccf351b4b56c54847d2aba0b05de440f3a8a00a283bb4c2bc295f9a2614b249c56b034c132b773d9f83cabdd0d40dea028fd64a62f7375d + languageName: node + linkType: hard + +"html-element-attributes@npm:3.4.0": + version: 3.4.0 + resolution: "html-element-attributes@npm:3.4.0" + checksum: 10/6a007458192e2d4579c9ead3abbfc2f6685e6f858076491b32e7fa5cd5951d95dca2aecbb0f856ef32be13604deb3c76fe8586ff9477673a1b833f09a1edeb1f + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + +"html-ua-styles@npm:0.0.8": + version: 0.0.8 + resolution: "html-ua-styles@npm:0.0.8" + checksum: 10/3c1d08af5e40c3b096bf797566e730bdaa70b7ced493e54662a9c0ff62705aaccf1c39fef58b9d48f1dd4c67355c0d4395e0a71b62ee38c78cc3f45bba4a339b + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.2.0 + resolution: "http-cache-semantics@npm:4.2.0" + checksum: 10/4efd2dfcfeea9d5e88c84af450b9980be8a43c2c8179508b1c57c7b4421c855f3e8efe92fa53e0b3f4a43c85824ada930eabbc306d1b3beab750b6dcc5187693 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:4" + checksum: 10/784b628cbd55b25542a9d85033bdfd03d4eda630fb8b3c9477959367f3be95dc476ed2ecbb9836c359c7c698027fc7b45723a302324433590f45d6c1706e8c13 + languageName: node + linkType: hard + +"human-signals@npm:^2.1.0": + version: 2.1.0 + resolution: "human-signals@npm:2.1.0" + checksum: 10/df59be9e0af479036798a881d1f136c4a29e0b518d4abb863afbd11bf30efa3eeb1d0425fc65942dcc05ab3bf40205ea436b0ff389f2cd20b75b8643d539bf86 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + +"ieee754@npm:^1.2.1": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 10/d9f2557a59036f16c282aaeb107832dc957a93d73397d89bbad4eb1130560560eb695060145e8e6b3b498b15ab95510226649a0b8f52ae06583575419fe10fc4 + languageName: node + linkType: hard + +"ignore@npm:7.0.5, ignore@npm:^7.0.0": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10/f134b96a4de0af419196f52c529d5c6120c4456ff8a6b5a14ceaaa399f883e15d58d2ce651c9b69b9388491d4669dda47285d307e827de9304a53a1824801bc6 + languageName: node + linkType: hard + +"ignore@npm:^5.2.0, ignore@npm:^5.3.2": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 + languageName: node + linkType: hard + +"immediato@npm:^1.1.0": + version: 1.1.0 + resolution: "immediato@npm:1.1.0" + checksum: 10/229072894ebc6afdcf659f80c6a0aab8680885cfbe0edea32ff3187c620efe56ff645f2f874ee59602ffa7ffb7b4d4f615c094654afdf10a3039e7c9114cfa7d + languageName: node + linkType: hard + +"import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.1": + version: 3.3.1 + resolution: "import-fresh@npm:3.3.1" + dependencies: + parent-module: "npm:^1.0.0" + resolve-from: "npm:^4.0.0" + checksum: 10/a06b19461b4879cc654d46f8a6244eb55eb053437afd4cbb6613cad6be203811849ed3e4ea038783092879487299fda24af932b86bdfff67c9055ba3612b8c87 + languageName: node + linkType: hard + +"import-local@npm:^3.2.0": + version: 3.2.0 + resolution: "import-local@npm:3.2.0" + dependencies: + pkg-dir: "npm:^4.2.0" + resolve-cwd: "npm:^3.0.0" + bin: + import-local-fixture: fixtures/cli.js + checksum: 10/0b0b0b412b2521739fbb85eeed834a3c34de9bc67e670b3d0b86248fc460d990a7b116ad056c084b87a693ef73d1f17268d6a5be626bb43c998a8b1c8a230004 + languageName: node + linkType: hard + +"import-meta-resolve@npm:4.1.0, import-meta-resolve@npm:^4.1.0": + version: 4.1.0 + resolution: "import-meta-resolve@npm:4.1.0" + checksum: 10/40162f67eb406c8d5d49266206ef12ff07b54f5fad8cfd806db9efe3a055958e9969be51d6efaf82e34b8bea6758113dcc17bb79ff148292a4badcabc3472f22 + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: 10/e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3 + languageName: node + linkType: hard + +"index-to-position@npm:1.1.0, index-to-position@npm:^1.1.0": + version: 1.1.0 + resolution: "index-to-position@npm:1.1.0" + checksum: 10/16703893c732a025786098fe77cb7e83109afe4b72633dd6feea1595c54f8406623fa7a0a2263a8e08adee7f639fbb1c4731982cd30b4bc30d787bf803f5f3d8 + languageName: node + linkType: hard + +"indexes-of@npm:^1.0.1": + version: 1.0.1 + resolution: "indexes-of@npm:1.0.1" + checksum: 10/4f9799b1739a62f3e02d09f6f4162cf9673025282af7fa36e790146e7f4e216dad3e776a25b08536c093209c9fcb5ea7bd04b082d42686a45f58ff401d6da32e + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.0": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + +"ini-simple-parser@npm:^1.0.0": + version: 1.0.1 + resolution: "ini-simple-parser@npm:1.0.1" + checksum: 10/a27350531ba8bf4ff374967e7646e3c84dcb51c3e88feaa6065b794fe9829cefa09e852beb04bdea23ecacf6064939c63a6c1c3a2fdd7e7a4068345046702c9b + languageName: node + linkType: hard + +"ini@npm:4.1.1": + version: 4.1.1 + resolution: "ini@npm:4.1.1" + checksum: 10/64c7102301742a7527bb17257d18451410eacf63b4b5648a20e108816c355c21c4e8a1761bbcbf3fe8c4ded3297f1b832b885d5e3e485d781e293ebfaf56fea6 + languageName: node + linkType: hard + +"ionstore@npm:^1.0.1": + version: 1.0.1 + resolution: "ionstore@npm:1.0.1" + checksum: 10/57af139c6202ea3fc672448dbd5fcdc945bf7553c48a2a627197e0601c0627540bac79a2edcf91f61399b0b1f597188f6f154cc8a0dcdb967a89ed9f88311b17 + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + +"is-alphabetical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphabetical@npm:1.0.4" + checksum: 10/6508cce44fd348f06705d377b260974f4ce68c74000e7da4045f0d919e568226dc3ce9685c5a2af272195384df6930f748ce9213fc9f399b5d31b362c66312cb + languageName: node + linkType: hard + +"is-alphanumerical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphanumerical@npm:1.0.4" + dependencies: + is-alphabetical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + checksum: 10/e2e491acc16fcf5b363f7c726f666a9538dba0a043665740feb45bba1652457a73441e7c5179c6768a638ed396db3437e9905f403644ec7c468fb41f4813d03f + languageName: node + linkType: hard + +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: 10/73ced84fa35e59e2c57da2d01e12cd01479f381d7f122ce41dcbb713f09dbfc651315832cd2bf8accba7681a69e4d6f1e03941d94dd10040d415086360e7005e + languageName: node + linkType: hard + +"is-binary-path@npm:^2.0.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + +"is-buffer@npm:^2.0.0": + version: 2.0.5 + resolution: "is-buffer@npm:2.0.5" + checksum: 10/3261a8b858edcc6c9566ba1694bf829e126faa88911d1c0a747ea658c5d81b14b6955e3a702d59dabadd58fdd440c01f321aa71d6547105fd21d03f94d0597e7 + languageName: node + linkType: hard + +"is-builtin-module@npm:^5.0.0": + version: 5.0.0 + resolution: "is-builtin-module@npm:5.0.0" + dependencies: + builtin-modules: "npm:^5.0.0" + checksum: 10/fcb1e458fa08e6d7e8763abaa84bc539ca943b298e15448ba92b79ab8f08c382664b8b1d5e32c59358e87026fed7b1e56e457b955436d7cc860cf0653002e4c6 + languageName: node + linkType: hard + +"is-decimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-decimal@npm:1.0.4" + checksum: 10/ed483a387517856dc395c68403a10201fddcc1b63dc56513fbe2fe86ab38766120090ecdbfed89223d84ca8b1cd28b0641b93cb6597b6e8f4c097a7c24e3fb96 + languageName: node + linkType: hard + +"is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": + version: 2.2.1 + resolution: "is-docker@npm:2.2.1" + bin: + is-docker: cli.js + checksum: 10/3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 + languageName: node + linkType: hard + +"is-es5-identifier-name@npm:1.0.0": + version: 1.0.0 + resolution: "is-es5-identifier-name@npm:1.0.0" + checksum: 10/e0f6f06dcaadd10b438fa7bb1e190283ada9b2e91f249a8e905a61649b792c3212b02280d5d1f7f6c3697416ad61962c151a398e2310025152e2acd09092073e + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-generator-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "is-generator-fn@npm:2.1.0" + checksum: 10/a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-hexadecimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-hexadecimal@npm:1.0.4" + checksum: 10/a452e047587b6069332d83130f54d30da4faf2f2ebaa2ce6d073c27b5703d030d58ed9e0b729c8e4e5b52c6f1dab26781bb77b7bc6c7805f14f320e328ff8cd5 + languageName: node + linkType: hard + +"is-immutable-type@npm:^5.0.1": + version: 5.0.1 + resolution: "is-immutable-type@npm:5.0.1" + dependencies: + "@typescript-eslint/type-utils": "npm:^8.0.0" + ts-api-utils: "npm:^2.0.0" + ts-declaration-location: "npm:^1.0.4" + peerDependencies: + eslint: "*" + typescript: ">=4.7.4" + checksum: 10/4aa22000e4ca1182faeaf2d705016ebf2a4eaccd303b8adcb4e9a1621b0b4d8e48dcba9c7683cd168a45f3782b8de61beae94c9d5ac17448af94f572b9e66edd + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.0.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 10/172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 + languageName: node + linkType: hard + +"is-whitespace-character@npm:^1.0.0": + version: 1.0.4 + resolution: "is-whitespace-character@npm:1.0.4" + checksum: 10/adab8ad9847ccfcb6f1b7000b8f622881b5ba2a09ce8be2794a6d2b10c3af325b469fc562c9fb889f468eed27be06e227ac609d0aa1e3a59b4dbcc88e2b0418e + languageName: node + linkType: hard + +"is-word-character@npm:^1.0.0": + version: 1.0.4 + resolution: "is-word-character@npm:1.0.4" + checksum: 10/1821d6c6abe5bc0b3abe3fdc565d66d7c8a74ea4e93bc77b4a47d26e2e2a306d6ab7d92b353b0d2b182869e3ecaa8f4a346c62d0e31d38ebc0ceaf7cae182c3f + languageName: node + linkType: hard + +"is-wsl@npm:^2.2.0": + version: 2.2.0 + resolution: "is-wsl@npm:2.2.0" + dependencies: + is-docker: "npm:^2.0.0" + checksum: 10/20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isoconcurrency@npm:^1.0.0": + version: 1.0.0 + resolution: "isoconcurrency@npm:1.0.0" + checksum: 10/deb49535eba24bf45845815395abfc70dc8bab9bcfc2a039415fab65029ad155454404621e493bd5eb7d8abb513f4b6ffc2ad9ef92ae45037a9ff4d142044f3a + languageName: node + linkType: hard + +"isotimer@npm:^1.0.0": + version: 1.0.0 + resolution: "isotimer@npm:1.0.0" + dependencies: + immediato: "npm:^1.1.0" + checksum: 10/fb9a863fc80d15959b9ccab3f4ca0779f9c27a8329a6dba4ffde6f135396b05527d009ae6120ac0927ff7a1b63e7c8862568ec366caa65513df137f6b6964645 + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^5.0.4": + version: 5.2.1 + resolution: "istanbul-lib-instrument@npm:5.2.1" + dependencies: + "@babel/core": "npm:^7.12.3" + "@babel/parser": "npm:^7.14.7" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.2.0" + semver: "npm:^6.3.0" + checksum: 10/bbc4496c2f304d799f8ec22202ab38c010ac265c441947f075c0f7d46bd440b45c00e46017cf9053453d42182d768b1d6ed0e70a142c95ab00df9843aa5ab80e + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^6.0.0, istanbul-lib-instrument@npm:^6.0.2": + version: 6.0.3 + resolution: "istanbul-lib-instrument@npm:6.0.3" + dependencies: + "@babel/core": "npm:^7.23.9" + "@babel/parser": "npm:^7.23.9" + "@istanbuljs/schema": "npm:^0.1.3" + istanbul-lib-coverage: "npm:^3.2.0" + semver: "npm:^7.5.4" + checksum: 10/aa5271c0008dfa71b6ecc9ba1e801bf77b49dc05524e8c30d58aaf5b9505e0cd12f25f93165464d4266a518c5c75284ecb598fbd89fec081ae77d2c9d3327695 + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^5.0.0": + version: 5.0.6 + resolution: "istanbul-lib-source-maps@npm:5.0.6" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.23" + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + checksum: 10/569dd0a392ee3464b1fe1accbaef5cc26de3479eacb5b91d8c67ebb7b425d39fd02247d85649c3a0e9c29b600809fa60b5af5a281a75a89c01f385b1e24823a2 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.3, istanbul-reports@npm:^3.1.6": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + +"iterate-directory-up@npm:^1.4.0": + version: 1.4.0 + resolution: "iterate-directory-up@npm:1.4.0" + dependencies: + url-or-path: "npm:^2.6.1" + checksum: 10/1af9e03f67cfddaf7a82e5588ecb3ff46c3067ad70ce745fde6e6b97e633cde4ebbf7c57f5639d548ddb9f7b480dada9fd836f3136cff8276a6d67b2fcb3fa67 + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + languageName: node + linkType: hard + +"jest-changed-files@npm:30.0.2": + version: 30.0.2 + resolution: "jest-changed-files@npm:30.0.2" + dependencies: + execa: "npm:^5.1.1" + jest-util: "npm:30.0.2" + p-limit: "npm:^3.1.0" + checksum: 10/34899f908f4ed5c95e9993ca31a49faaa1b641d557277238388348f875a3cb04f358ed411de6e496e353cb68c85a53819a53b6e5cfffe20b13c303d601c78ac7 + languageName: node + linkType: hard + +"jest-circus@npm:30.0.3, jest-circus@npm:^30.0.0": + version: 30.0.3 + resolution: "jest-circus@npm:30.0.3" + dependencies: + "@jest/environment": "npm:30.0.2" + "@jest/expect": "npm:30.0.3" + "@jest/test-result": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + co: "npm:^4.6.0" + dedent: "npm:^1.6.0" + is-generator-fn: "npm:^2.1.0" + jest-each: "npm:30.0.2" + jest-matcher-utils: "npm:30.0.3" + jest-message-util: "npm:30.0.2" + jest-runtime: "npm:30.0.3" + jest-snapshot: "npm:30.0.3" + jest-util: "npm:30.0.2" + p-limit: "npm:^3.1.0" + pretty-format: "npm:30.0.2" + pure-rand: "npm:^7.0.0" + slash: "npm:^3.0.0" + stack-utils: "npm:^2.0.6" + checksum: 10/ea75187fcab749efa3a3912e28dbde1875efb4a2f4bfc69830b8f055b0f52c7e2be1482bbde4c9e0ae29c2b8ddf10aa677a122c1d43d8b2dada8aa7d8a3451fb + languageName: node + linkType: hard + +"jest-cli@npm:30.0.3": + version: 30.0.3 + resolution: "jest-cli@npm:30.0.3" + dependencies: + "@jest/core": "npm:30.0.3" + "@jest/test-result": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + chalk: "npm:^4.1.2" + exit-x: "npm:^0.2.2" + import-local: "npm:^3.2.0" + jest-config: "npm:30.0.3" + jest-util: "npm:30.0.2" + jest-validate: "npm:30.0.2" + yargs: "npm:^17.7.2" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: ./bin/jest.js + checksum: 10/39c5eb4ded4f957a29d23bc94d401f54af8947a5f12c2a4a7503412a29a0a356b66c1bcfad7fcac6cb290c81448d802088735bee2239e077472dbd45b0677629 + languageName: node + linkType: hard + +"jest-config@npm:30.0.3": + version: 30.0.3 + resolution: "jest-config@npm:30.0.3" + dependencies: + "@babel/core": "npm:^7.27.4" + "@jest/get-type": "npm:30.0.1" + "@jest/pattern": "npm:30.0.1" + "@jest/test-sequencer": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + babel-jest: "npm:30.0.2" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + deepmerge: "npm:^4.3.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.11" + jest-circus: "npm:30.0.3" + jest-docblock: "npm:30.0.1" + jest-environment-node: "npm:30.0.2" + jest-regex-util: "npm:30.0.1" + jest-resolve: "npm:30.0.2" + jest-runner: "npm:30.0.3" + jest-util: "npm:30.0.2" + jest-validate: "npm:30.0.2" + micromatch: "npm:^4.0.8" + parse-json: "npm:^5.2.0" + pretty-format: "npm:30.0.2" + slash: "npm:^3.0.0" + strip-json-comments: "npm:^3.1.1" + peerDependencies: + "@types/node": "*" + esbuild-register: ">=3.4.0" + ts-node: ">=9.0.0" + peerDependenciesMeta: + "@types/node": + optional: true + esbuild-register: + optional: true + ts-node: + optional: true + checksum: 10/65daec4abe466a643d1686f90e97033b76db988a54d14ead0c8853abd79213fb45cfa83f3c3d05081631eda693b2710a8a17a9f6c495860178bf8b6b3798c12f + languageName: node + linkType: hard + +"jest-diff@npm:30.0.3": + version: 30.0.3 + resolution: "jest-diff@npm:30.0.3" + dependencies: + "@jest/diff-sequences": "npm:30.0.1" + "@jest/get-type": "npm:30.0.1" + chalk: "npm:^4.1.2" + pretty-format: "npm:30.0.2" + checksum: 10/ee196dc58bef790ddc9c2a91dd37363442530fd416630e5a2141b3ecf4ae5f0720dd2d69bb8e36ac5a0624e153da8e06df9d16d8b374212de18748d7cba99a63 + languageName: node + linkType: hard + +"jest-diff@npm:^29.0.0, jest-diff@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-diff@npm:29.7.0" + dependencies: + chalk: "npm:^4.0.0" + diff-sequences: "npm:^29.6.3" + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/6f3a7eb9cd9de5ea9e5aa94aed535631fa6f80221832952839b3cb59dd419b91c20b73887deb0b62230d06d02d6b6cf34ebb810b88d904bb4fe1e2e4f0905c98 + languageName: node + linkType: hard + +"jest-docblock@npm:30.0.1": + version: 30.0.1 + resolution: "jest-docblock@npm:30.0.1" + dependencies: + detect-newline: "npm:^3.1.0" + checksum: 10/92ebee39282e764cd64bbfffe4a1bbae323e3b01684028c7206aada198314522a8ebe6892660d2ddeeb9a4b8d270a90da8af0fc654502a428e412867d732a459 + languageName: node + linkType: hard + +"jest-each@npm:30.0.2, jest-each@npm:^30.0.0": + version: 30.0.2 + resolution: "jest-each@npm:30.0.2" + dependencies: + "@jest/get-type": "npm:30.0.1" + "@jest/types": "npm:30.0.1" + chalk: "npm:^4.1.2" + jest-util: "npm:30.0.2" + pretty-format: "npm:30.0.2" + checksum: 10/5dd3e43d657a6c779c3db665a67a2888e80c27a4d38a63763328c3b56d602f7e4414a278b536107eb0581c54fd890f14a1231946796846023640bc62947cecb2 + languageName: node + linkType: hard + +"jest-environment-node@npm:30.0.2": + version: 30.0.2 + resolution: "jest-environment-node@npm:30.0.2" + dependencies: + "@jest/environment": "npm:30.0.2" + "@jest/fake-timers": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + jest-mock: "npm:30.0.2" + jest-util: "npm:30.0.2" + jest-validate: "npm:30.0.2" + checksum: 10/e1553e5ae2d66f7d3a06e6187fbc555c38fd93b656adde653d447a87313f91b91bebbb86becdeaba43a36581f03fd6f7648ced0ac9f262bef929f6bd8beb5461 + languageName: node + linkType: hard + +"jest-get-type@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-get-type@npm:29.6.3" + checksum: 10/88ac9102d4679d768accae29f1e75f592b760b44277df288ad76ce5bf038c3f5ce3719dea8aa0f035dac30e9eb034b848ce716b9183ad7cc222d029f03e92205 + languageName: node + linkType: hard + +"jest-haste-map@npm:30.0.2": + version: 30.0.2 + resolution: "jest-haste-map@npm:30.0.2" + dependencies: + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + anymatch: "npm:^3.1.3" + fb-watchman: "npm:^2.0.2" + fsevents: "npm:^2.3.3" + graceful-fs: "npm:^4.2.11" + jest-regex-util: "npm:30.0.1" + jest-util: "npm:30.0.2" + jest-worker: "npm:30.0.2" + micromatch: "npm:^4.0.8" + walker: "npm:^1.0.8" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/7b62fff11833d7668ccb03bee6ce3fed026accb34b24cb723bbb3ebbec665509f968f2c042ab8e6402313d8d9ff02f26827d8cd1f98665f5e22765e32508d8af + languageName: node + linkType: hard + +"jest-haste-map@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-haste-map@npm:29.7.0" + dependencies: + "@jest/types": "npm:^29.6.3" + "@types/graceful-fs": "npm:^4.1.3" + "@types/node": "npm:*" + anymatch: "npm:^3.0.3" + fb-watchman: "npm:^2.0.0" + fsevents: "npm:^2.3.2" + graceful-fs: "npm:^4.2.9" + jest-regex-util: "npm:^29.6.3" + jest-util: "npm:^29.7.0" + jest-worker: "npm:^29.7.0" + micromatch: "npm:^4.0.4" + walker: "npm:^1.0.8" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/8531b42003581cb18a69a2774e68c456fb5a5c3280b1b9b77475af9e346b6a457250f9d756bfeeae2fe6cbc9ef28434c205edab9390ee970a919baddfa08bb85 + languageName: node + linkType: hard + +"jest-leak-detector@npm:30.0.2": + version: 30.0.2 + resolution: "jest-leak-detector@npm:30.0.2" + dependencies: + "@jest/get-type": "npm:30.0.1" + pretty-format: "npm:30.0.2" + checksum: 10/bb570d6aeb5187efa0a929d58104819e725ac7dbe4b57d0b9aa8a4ed456c75be64cf13ab28ced59f13a383a24ac87dcfa2867b4fcb2648f784bd2138e5756511 + languageName: node + linkType: hard + +"jest-light-runner@npm:0.7.9": + version: 0.7.9 + resolution: "jest-light-runner@npm:0.7.9" + dependencies: + "@jest/expect": "npm:^30.0.0" + "@jest/fake-timers": "npm:^30.0.0" + jest-circus: "npm:^30.0.0" + jest-each: "npm:^30.0.0" + jest-mock: "npm:^30.0.0" + jest-snapshot: "npm:^30.0.0" + p-limit: "npm:^6.2.0" + supports-color: "npm:^9.2.1" + tinypool: "npm:0.8.4" + peerDependencies: + jest: ^27.5.0 || ^28.0.0 || ^29.0.0|| ^30.0.0 + checksum: 10/60b81b73de6e0b78dbf8c6edae7309e047af8cbce0d7e76ea1ef42b709ae27311f18af21b898b7ea9054c0d1c04dbc6d46a05ead6b86859c0f63e7d7eca7a6a3 + languageName: node + linkType: hard + +"jest-matcher-utils@npm:30.0.3": + version: 30.0.3 + resolution: "jest-matcher-utils@npm:30.0.3" + dependencies: + "@jest/get-type": "npm:30.0.1" + chalk: "npm:^4.1.2" + jest-diff: "npm:30.0.3" + pretty-format: "npm:30.0.2" + checksum: 10/6cad6155335726d62b93c90830549bc38ef6e92d10fc353b34514c1c8ff5fb054b7d97951852dd1dbf62ce393a26a12cb6b2c9e3aa3227f8f746d8c34ceb2f03 + languageName: node + linkType: hard + +"jest-matcher-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-matcher-utils@npm:29.7.0" + dependencies: + chalk: "npm:^4.0.0" + jest-diff: "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + pretty-format: "npm:^29.7.0" + checksum: 10/981904a494299cf1e3baed352f8a3bd8b50a8c13a662c509b6a53c31461f94ea3bfeffa9d5efcfeb248e384e318c87de7e3baa6af0f79674e987482aa189af40 + languageName: node + linkType: hard + +"jest-message-util@npm:30.0.2": + version: 30.0.2 + resolution: "jest-message-util@npm:30.0.2" + dependencies: + "@babel/code-frame": "npm:^7.27.1" + "@jest/types": "npm:30.0.1" + "@types/stack-utils": "npm:^2.0.3" + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + micromatch: "npm:^4.0.8" + pretty-format: "npm:30.0.2" + slash: "npm:^3.0.0" + stack-utils: "npm:^2.0.6" + checksum: 10/61b67d807d18eeea114088e33e29a88e59293fd96adee52e64fddbf9523409bc5e4cf71a8c623150a4b4870337430a4b38f19622119f4dc7d06081230dd63e01 + languageName: node + linkType: hard + +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" + dependencies: + "@babel/code-frame": "npm:^7.12.13" + "@jest/types": "npm:^29.6.3" + "@types/stack-utils": "npm:^2.0.0" + chalk: "npm:^4.0.0" + graceful-fs: "npm:^4.2.9" + micromatch: "npm:^4.0.4" + pretty-format: "npm:^29.7.0" + slash: "npm:^3.0.0" + stack-utils: "npm:^2.0.3" + checksum: 10/31d53c6ed22095d86bab9d14c0fa70c4a92c749ea6ceece82cf30c22c9c0e26407acdfbdb0231435dc85a98d6d65ca0d9cbcd25cd1abb377fe945e843fb770b9 + languageName: node + linkType: hard + +"jest-mock@npm:30.0.2, jest-mock@npm:^30.0.0": + version: 30.0.2 + resolution: "jest-mock@npm:30.0.2" + dependencies: + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + jest-util: "npm:30.0.2" + checksum: 10/79d13e7374f736919d9ad82858ba59771b7452b0c40fe5452aa3f5f07b2563f9d597e007f7c0ff8ed8fa9cdf12abe049868a6dd7b76d23995532039e894184f6 + languageName: node + linkType: hard + +"jest-pnp-resolver@npm:^1.2.3": + version: 1.2.3 + resolution: "jest-pnp-resolver@npm:1.2.3" + peerDependencies: + jest-resolve: "*" + peerDependenciesMeta: + jest-resolve: + optional: true + checksum: 10/db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 + languageName: node + linkType: hard + +"jest-regex-util@npm:30.0.1, jest-regex-util@npm:^30.0.0": + version: 30.0.1 + resolution: "jest-regex-util@npm:30.0.1" + checksum: 10/fa8dac80c3e94db20d5e1e51d1bdf101cf5ede8f4e0b8f395ba8b8ea81e71804ffd747452a6bb6413032865de98ac656ef8ae43eddd18d980b6442a2764ed562 + languageName: node + linkType: hard + +"jest-regex-util@npm:^29.6.3": + version: 29.6.3 + resolution: "jest-regex-util@npm:29.6.3" + checksum: 10/0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a + languageName: node + linkType: hard + +"jest-resolve-dependencies@npm:30.0.3": + version: 30.0.3 + resolution: "jest-resolve-dependencies@npm:30.0.3" + dependencies: + jest-regex-util: "npm:30.0.1" + jest-snapshot: "npm:30.0.3" + checksum: 10/52720a12cce5f135794c184673d059b9420182566950c238b501117d211967e09532b7956ee76d6cc1413572de0952e39c2b0358abd3f5a4220819bf8168ea46 + languageName: node + linkType: hard + +"jest-resolve@npm:30.0.2": + version: 30.0.2 + resolution: "jest-resolve@npm:30.0.2" + dependencies: + chalk: "npm:^4.1.2" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.0.2" + jest-pnp-resolver: "npm:^1.2.3" + jest-util: "npm:30.0.2" + jest-validate: "npm:30.0.2" + slash: "npm:^3.0.0" + unrs-resolver: "npm:^1.7.11" + checksum: 10/364324b396f30e122f848264b3a4b23c8689673566b98cb3cfadb8ad2cf61406fefb221e6cda2842d52865b2cd6ab612fa55a3f31a15ae0efbfc1c2cbb55d681 + languageName: node + linkType: hard + +"jest-runner@npm:30.0.3": + version: 30.0.3 + resolution: "jest-runner@npm:30.0.3" + dependencies: + "@jest/console": "npm:30.0.2" + "@jest/environment": "npm:30.0.2" + "@jest/test-result": "npm:30.0.2" + "@jest/transform": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + emittery: "npm:^0.13.1" + exit-x: "npm:^0.2.2" + graceful-fs: "npm:^4.2.11" + jest-docblock: "npm:30.0.1" + jest-environment-node: "npm:30.0.2" + jest-haste-map: "npm:30.0.2" + jest-leak-detector: "npm:30.0.2" + jest-message-util: "npm:30.0.2" + jest-resolve: "npm:30.0.2" + jest-runtime: "npm:30.0.3" + jest-util: "npm:30.0.2" + jest-watcher: "npm:30.0.2" + jest-worker: "npm:30.0.2" + p-limit: "npm:^3.1.0" + source-map-support: "npm:0.5.13" + checksum: 10/2c1485a0e1219c362ce79474355619427160dd7de6c3de9cc7c192b4554371598322086144bcd1f2334bb2ef9378b71c18a8aaef90f2ffa122a58c4a3b220528 + languageName: node + linkType: hard + +"jest-runtime@npm:30.0.3": + version: 30.0.3 + resolution: "jest-runtime@npm:30.0.3" + dependencies: + "@jest/environment": "npm:30.0.2" + "@jest/fake-timers": "npm:30.0.2" + "@jest/globals": "npm:30.0.3" + "@jest/source-map": "npm:30.0.1" + "@jest/test-result": "npm:30.0.2" + "@jest/transform": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + cjs-module-lexer: "npm:^2.1.0" + collect-v8-coverage: "npm:^1.0.2" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.11" + jest-haste-map: "npm:30.0.2" + jest-message-util: "npm:30.0.2" + jest-mock: "npm:30.0.2" + jest-regex-util: "npm:30.0.1" + jest-resolve: "npm:30.0.2" + jest-snapshot: "npm:30.0.3" + jest-util: "npm:30.0.2" + slash: "npm:^3.0.0" + strip-bom: "npm:^4.0.0" + checksum: 10/6800d3561dcb93baa881599cbce3342d283661a2be8c7cf8a425db6bc1326c80514732e98159f68df4b74e6e21b6e81ccb7fa1beb29a822ed476345e75e44093 + languageName: node + linkType: hard + +"jest-snapshot-serializer-ansi@npm:2.2.1": + version: 2.2.1 + resolution: "jest-snapshot-serializer-ansi@npm:2.2.1" + dependencies: + has-ansi: "npm:^6.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10/afde3e9c51a0bfd247fb5581c7bff46b37204fdda758432a44429343b205fd33b90099c19d59929877e4058d575c60cc3b36cbb18bc8f0850adf3698de89276e + languageName: node + linkType: hard + +"jest-snapshot-serializer-raw@npm:2.0.0": + version: 2.0.0 + resolution: "jest-snapshot-serializer-raw@npm:2.0.0" + checksum: 10/2827392a8207f17ddbb4e9af7e4ab56bf0db4689afe862e75105915d49f076ebd9578d687707c458950384eac900f2a6abeb61dc0f8837a61a82737005f4a7d0 + languageName: node + linkType: hard + +"jest-snapshot@npm:30.0.3, jest-snapshot@npm:^30.0.0": + version: 30.0.3 + resolution: "jest-snapshot@npm:30.0.3" + dependencies: + "@babel/core": "npm:^7.27.4" + "@babel/generator": "npm:^7.27.5" + "@babel/plugin-syntax-jsx": "npm:^7.27.1" + "@babel/plugin-syntax-typescript": "npm:^7.27.1" + "@babel/types": "npm:^7.27.3" + "@jest/expect-utils": "npm:30.0.3" + "@jest/get-type": "npm:30.0.1" + "@jest/snapshot-utils": "npm:30.0.1" + "@jest/transform": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + babel-preset-current-node-syntax: "npm:^1.1.0" + chalk: "npm:^4.1.2" + expect: "npm:30.0.3" + graceful-fs: "npm:^4.2.11" + jest-diff: "npm:30.0.3" + jest-matcher-utils: "npm:30.0.3" + jest-message-util: "npm:30.0.2" + jest-util: "npm:30.0.2" + pretty-format: "npm:30.0.2" + semver: "npm:^7.7.2" + synckit: "npm:^0.11.8" + checksum: 10/ca08755353b1655f6524d93ca891fbb9ae3b124ac09c66d58670b005ddaa3b9f9b8dd93054e8c8ed07c5fd2310d1f0d69c169f67e7c695806bf749a0ba0c2c59 + languageName: node + linkType: hard + +"jest-snapshot@npm:^29.0.0": + version: 29.7.0 + resolution: "jest-snapshot@npm:29.7.0" + dependencies: + "@babel/core": "npm:^7.11.6" + "@babel/generator": "npm:^7.7.2" + "@babel/plugin-syntax-jsx": "npm:^7.7.2" + "@babel/plugin-syntax-typescript": "npm:^7.7.2" + "@babel/types": "npm:^7.3.3" + "@jest/expect-utils": "npm:^29.7.0" + "@jest/transform": "npm:^29.7.0" + "@jest/types": "npm:^29.6.3" + babel-preset-current-node-syntax: "npm:^1.0.0" + chalk: "npm:^4.0.0" + expect: "npm:^29.7.0" + graceful-fs: "npm:^4.2.9" + jest-diff: "npm:^29.7.0" + jest-get-type: "npm:^29.6.3" + jest-matcher-utils: "npm:^29.7.0" + jest-message-util: "npm:^29.7.0" + jest-util: "npm:^29.7.0" + natural-compare: "npm:^1.4.0" + pretty-format: "npm:^29.7.0" + semver: "npm:^7.5.3" + checksum: 10/cb19a3948256de5f922d52f251821f99657339969bf86843bd26cf3332eae94883e8260e3d2fba46129a27c3971c1aa522490e460e16c7fad516e82d10bbf9f8 + languageName: node + linkType: hard + +"jest-util@npm:30.0.2": + version: 30.0.2 + resolution: "jest-util@npm:30.0.2" + dependencies: + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + chalk: "npm:^4.1.2" + ci-info: "npm:^4.2.0" + graceful-fs: "npm:^4.2.11" + picomatch: "npm:^4.0.2" + checksum: 10/7fe3a9062ceac438e691037b0a246cee89b5f0f17e59d7226d00a6d2676c8a5cec4182e242722c2ea86863c46f2f23361e477d6039e0472ac0ec4bb6acef8551 + languageName: node + linkType: hard + +"jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" + dependencies: + "@jest/types": "npm:^29.6.3" + "@types/node": "npm:*" + chalk: "npm:^4.0.0" + ci-info: "npm:^3.2.0" + graceful-fs: "npm:^4.2.9" + picomatch: "npm:^2.2.3" + checksum: 10/30d58af6967e7d42bd903ccc098f3b4d3859ed46238fbc88d4add6a3f10bea00c226b93660285f058bc7a65f6f9529cf4eb80f8d4707f79f9e3a23686b4ab8f3 + languageName: node + linkType: hard + +"jest-validate@npm:30.0.2": + version: 30.0.2 + resolution: "jest-validate@npm:30.0.2" + dependencies: + "@jest/get-type": "npm:30.0.1" + "@jest/types": "npm:30.0.1" + camelcase: "npm:^6.3.0" + chalk: "npm:^4.1.2" + leven: "npm:^3.1.0" + pretty-format: "npm:30.0.2" + checksum: 10/9bc273b9785f955fb926a69a6316b9feb6d5fc4960683060925f21a6869194ac7156445aab92031e320880c230da2d406720cb97ea5e250a04fe88a5a401c6e8 + languageName: node + linkType: hard + +"jest-watch-typeahead@npm:3.0.1": + version: 3.0.1 + resolution: "jest-watch-typeahead@npm:3.0.1" + dependencies: + ansi-escapes: "npm:^7.0.0" + chalk: "npm:^5.2.0" + jest-regex-util: "npm:^30.0.0" + jest-watcher: "npm:^30.0.0" + slash: "npm:^5.0.0" + string-length: "npm:^6.0.0" + strip-ansi: "npm:^7.0.1" + peerDependencies: + jest: ^30.0.0 + checksum: 10/dbaaa6d9929079482655c05af9f9c8491fa04aa5a24460b540b8383e78bb6bc6580cddbf8e2b15cfc34d68e610c19f5ccb8f0b0a5aea7f00affb3d976ec152ed + languageName: node + linkType: hard + +"jest-watcher@npm:30.0.2, jest-watcher@npm:^30.0.0": + version: 30.0.2 + resolution: "jest-watcher@npm:30.0.2" + dependencies: + "@jest/test-result": "npm:30.0.2" + "@jest/types": "npm:30.0.1" + "@types/node": "npm:*" + ansi-escapes: "npm:^4.3.2" + chalk: "npm:^4.1.2" + emittery: "npm:^0.13.1" + jest-util: "npm:30.0.2" + string-length: "npm:^4.0.2" + checksum: 10/d276287ce33da9ed6d0404dddda067f7b5500c4ffd73afc20fdc69917e2290be1e5c5d7d7f83f27cc96d55ec7111b0ff179a97bef3882f9ccae5c625f18c96fa + languageName: node + linkType: hard + +"jest-worker@npm:30.0.2": + version: 30.0.2 + resolution: "jest-worker@npm:30.0.2" + dependencies: + "@types/node": "npm:*" + "@ungap/structured-clone": "npm:^1.3.0" + jest-util: "npm:30.0.2" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.1.1" + checksum: 10/d1e3dad5737de4dbe0622ab2d557ee544ab9667ae36e0ed9f459f9a56e0bd1dbdbe5184ff18f85e2ee51a468370a08ed7cc85a8a3bb41c41b43ce96c2dcf7f2c + languageName: node + linkType: hard + +"jest-worker@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" + dependencies: + "@types/node": "npm:*" + jest-util: "npm:^29.7.0" + merge-stream: "npm:^2.0.0" + supports-color: "npm:^8.0.0" + checksum: 10/364cbaef00d8a2729fc760227ad34b5e60829e0869bd84976bdfbd8c0d0f9c2f22677b3e6dd8afa76ed174765351cd12bae3d4530c62eefb3791055127ca9745 + languageName: node + linkType: hard + +"jest@npm:30.0.3": + version: 30.0.3 + resolution: "jest@npm:30.0.3" + dependencies: + "@jest/core": "npm:30.0.3" + "@jest/types": "npm:30.0.1" + import-local: "npm:^3.2.0" + jest-cli: "npm:30.0.3" + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + bin: + jest: ./bin/jest.js + checksum: 10/69b569854a92fa8ab06d97807177323997864bd2bf2b330b504a29bb8c3cfd51a914d42ccb72987ac3763b8c055dd31b80526a2d5092e1bbf101714b37611fb6 + languageName: node + linkType: hard + +"jiti@npm:^2.4.2": + version: 2.4.2 + resolution: "jiti@npm:2.4.2" + bin: + jiti: lib/jiti-cli.mjs + checksum: 10/e2b07eb2e3fbb245e29ad288dddecab31804967fc84d5e01d39858997d2743b5e248946defcecf99272275a00284ecaf7ec88b8c841331324f0c946d8274414b + languageName: node + linkType: hard + +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + +"jsdoc-type-pratt-parser@npm:^4.0.0": + version: 4.1.0 + resolution: "jsdoc-type-pratt-parser@npm:4.1.0" + checksum: 10/30d88f95f6cbb4a1aa6d4b0d0ae46eb1096e606235ecaf9bab7a3ed5da860516b5d1cd967182765002f292c627526db918f3e56d34637bcf810e6ef84d403f3f + languageName: node + linkType: hard + +"jsesc@npm:^3.0.2, jsesc@npm:^3.1.0": + version: 3.1.0 + resolution: "jsesc@npm:3.1.0" + bin: + jsesc: bin/jsesc + checksum: 10/20bd37a142eca5d1794f354db8f1c9aeb54d85e1f5c247b371de05d23a9751ecd7bd3a9c4fc5298ea6fa09a100dafb4190fa5c98c6610b75952c3487f3ce7967 + languageName: node + linkType: hard + +"jsesc@npm:~3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10/8e5a7de6b70a8bd71f9cb0b5a7ade6a73ae6ab55e697c74cc997cede97417a3a65ed86c36f7dd6125fe49766e8386c845023d9e213916ca92c9dfdd56e2babf3 + languageName: node + linkType: hard + +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 10/82876154521b7b68ba71c4f969b91572d1beabadd87bd3a6b236f85fbc7dc4695089191ed60bb59f9340993c51b33d479f45b6ba9f3548beb519705281c32c3c + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 10/5f3a99009ed5f2a5a67d06e2f298cc97bc86d462034173308156f15b43a6e850be8511dc204b9b94566305da2947f7d90289657237d210351a39059ff9d666cf + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^4.0.0": + version: 4.0.0 + resolution: "json-parse-even-better-errors@npm:4.0.0" + checksum: 10/da1ae7ef0cc9db02972a06a71322f26bdcda5d7f648c23b28ce7f158ba35707461bcbd91945d8aace10d8d79c383b896725c65ffa410242352692328aa9b5edf + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json-sorted-stringify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-sorted-stringify@npm:1.0.1" + checksum: 10/5d23777e2d9114d9b242a1ccda1041d2639ad0db7a4178abd6937ffebf1efb18b018208b29c4ec0f78632d82c64815ec73e53d96fae63930aa7ab5c216e0ad8e + languageName: node + linkType: hard + +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: 10/12786c2e2f22c27439e6db0532ba321f1d0617c27ad8cb1c352a0e9249a50182fd1ba8b52a18899291604b0c32eafa8afd09e51203f19109a0537f68db2b652d + languageName: node + linkType: hard + +"json5@npm:2.2.3, json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + +"kasi@npm:^1.1.1": + version: 1.1.1 + resolution: "kasi@npm:1.1.1" + checksum: 10/6a686901db23c872c7e5965d4e044610a9b81c988106b733eebac76a49055895d3393331dffba5ed605b85cd532b2bb507133a488ce89617098523dc0df019d0 + languageName: node + linkType: hard + +"keyv@npm:^4.5.4": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: "npm:3.0.1" + checksum: 10/167eb6ef64cc84b6fa0780ee50c9de456b422a1e18802209234f7c2cf7eae648c7741f32e50d7e24ccb22b24c13154070b01563d642755b156c357431a191e75 + languageName: node + linkType: hard + +"keyv@npm:^5.3.3": + version: 5.3.3 + resolution: "keyv@npm:5.3.3" + dependencies: + "@keyv/serialize": "npm:^1.0.3" + checksum: 10/979ed90d14584c87e9093d85426bc4ad336263b8b1523dd91a70a1ec3642e2650d12ac72f85454948996c330d6dfa71e5d4a4f55900c3a4d689d895a3e51dcf0 + languageName: node + linkType: hard + +"knip@npm:5.61.2": + version: 5.61.2 + resolution: "knip@npm:5.61.2" + dependencies: + "@nodelib/fs.walk": "npm:^1.2.3" + fast-glob: "npm:^3.3.3" + formatly: "npm:^0.2.4" + jiti: "npm:^2.4.2" + js-yaml: "npm:^4.1.0" + minimist: "npm:^1.2.8" + oxc-resolver: "npm:^11.1.0" + picocolors: "npm:^1.1.1" + picomatch: "npm:^4.0.1" + smol-toml: "npm:^1.3.4" + strip-json-comments: "npm:5.0.2" + zod: "npm:^3.22.4" + zod-validation-error: "npm:^3.0.3" + peerDependencies: + "@types/node": ">=18" + typescript: ">=5.0.4" + bin: + knip: bin/knip.js + knip-bun: bin/knip-bun.js + checksum: 10/d1deb28f631c280d4c6c35a9aa49aa7abb7eec41fa5be5698fc69349ce77c2673ad4e20ac434a82ecc50e9ea80605295d0c1da95bbe7dbf2548b15dbc0b8dacf + languageName: node + linkType: hard + +"leven@npm:4.0.0, leven@npm:^4.0.0": + version: 4.0.0 + resolution: "leven@npm:4.0.0" + checksum: 10/d70b9fef4cca487a38021bb173a5cae98d39b1c7f4a5b2439763bd89df8e389f178a3c941b6fc3fab1582f5052b5e8c91353d9607799a2ad3841e7ea22f9720f + languageName: node + linkType: hard + +"leven@npm:^3.1.0": + version: 3.1.0 + resolution: "leven@npm:3.1.0" + checksum: 10/638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55 + languageName: node + linkType: hard + +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" + dependencies: + prelude-ls: "npm:^1.2.1" + type-check: "npm:~0.4.0" + checksum: 10/2e4720ff79f21ae08d42374b0a5c2f664c5be8b6c8f565bb4e1315c96ed3a8acaa9de788ffed82d7f2378cf36958573de07ef92336cb5255ed74d08b8318c9ee + languageName: node + linkType: hard + +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 10/0c37f9f7fa212b38912b7145e1cd16a5f3cd34d782441c3e6ca653485d326f58b3caccda66efce1c5812bde4961bbde3374fae4b0d11bf1226152337f3894aa5 + languageName: node + linkType: hard + +"linguist-languages@npm:8.0.0": + version: 8.0.0 + resolution: "linguist-languages@npm:8.0.0" + checksum: 10/89e390f16b0da76666573db5cd9ad65b5046c71953b298fddef3605b7057a537dfa5c4525ddeb8b6aa6fbf3e53da52907abee7447fa7a6e500818261bf519f60 + languageName: node + linkType: hard + +"local-pkg@npm:^1.1.1": + version: 1.1.1 + resolution: "local-pkg@npm:1.1.1" + dependencies: + mlly: "npm:^1.7.4" + pkg-types: "npm:^2.0.1" + quansync: "npm:^0.2.8" + checksum: 10/e04aedda8fe30b69d763100aa0485a32815d37478e76a97d2d792138607ebfdde20db3da9f301c260117e24340d4ab4731191bcae825dc94d3f6a4960ad11706 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.memoize@npm:^4.1.2": + version: 4.1.2 + resolution: "lodash.memoize@npm:4.1.2" + checksum: 10/192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da + languageName: node + linkType: hard + +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: 10/d0ea2dd0097e6201be083865d50c3fb54fbfbdb247d9cc5950e086c991f448b7ab0cdab0d57eacccb43473d3f2acd21e134db39f22dac2d6c9ba6bf26978e3d6 + languageName: node + linkType: hard + +"lodash@npm:~4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 + languageName: node + linkType: hard + +"lomemo@npm:^1.0.1": + version: 1.0.1 + resolution: "lomemo@npm:1.0.1" + checksum: 10/6459218d0461eb59f2a0ba176b905bfb21c2a41879778b5f5ffcf4a955bbf71b66701b4641290181face7c455dcba486a05923722450b25ddc918a4a29e432c1 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + +"lru-cache@npm:^4.1.5": + version: 4.1.5 + resolution: "lru-cache@npm:4.1.5" + dependencies: + pseudomap: "npm:^1.0.2" + yallist: "npm:^2.1.2" + checksum: 10/9ec7d73f11a32cba0e80b7a58fdf29970814c0c795acaee1a6451ddfd609bae6ef9df0837f5bbeabb571ecd49c1e2d79e10e9b4ed422cfba17a0cb6145b018a9 + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + +"magic-string@npm:0.30.17, magic-string@npm:~0.30.0": + version: 0.30.17 + resolution: "magic-string@npm:0.30.17" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10/2f71af2b0afd78c2e9012a29b066d2c8ba45a9cd0c8070f7fd72de982fb1c403b4e3afdb1dae00691d56885ede66b772ef6bedf765e02e3a7066208fe2fec4aa + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-fetch-happen@npm:^14.0.3": + version: 14.0.3 + resolution: "make-fetch-happen@npm:14.0.3" + dependencies: + "@npmcli/agent": "npm:^3.0.0" + cacache: "npm:^19.0.1" + http-cache-semantics: "npm:^4.1.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^4.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^1.0.0" + proc-log: "npm:^5.0.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^12.0.0" + checksum: 10/fce0385840b6d86b735053dfe941edc2dd6468fda80fe74da1eeff10cbd82a75760f406194f2bc2fa85b99545b2bc1f84c08ddf994b21830775ba2d1a87e8bdf + languageName: node + linkType: hard + +"makeerror@npm:1.0.12": + version: 1.0.12 + resolution: "makeerror@npm:1.0.12" + dependencies: + tmpl: "npm:1.0.5" + checksum: 10/4c66ddfc654537333da952c084f507fa4c30c707b1635344eb35be894d797ba44c901a9cebe914aa29a7f61357543ba09b09dddbd7f65b4aee756b450f169f40 + languageName: node + linkType: hard + +"markdown-escapes@npm:^1.0.0": + version: 1.0.4 + resolution: "markdown-escapes@npm:1.0.4" + checksum: 10/6833a93d72d3f70a500658872312c6fa8015c20cc835a85ae6901fa232683fbc6ed7118ebe920fea7c80039a560f339c026597d96eee0e9de602a36921804997 + languageName: node + linkType: hard + +"memorystream@npm:^0.3.1": + version: 0.3.1 + resolution: "memorystream@npm:0.3.1" + checksum: 10/2e34a1e35e6eb2e342f788f75f96c16f115b81ff6dd39e6c2f48c78b464dbf5b1a4c6ebfae4c573bd0f8dbe8c57d72bb357c60523be184655260d25855c03902 + languageName: node + linkType: hard + +"meow@npm:^13.0.0": + version: 13.2.0 + resolution: "meow@npm:13.2.0" + checksum: 10/4eff5bc921fed0b8a471ad79069d741a0210036d717547d0c7f36fdaf84ef7a3036225f38b6a53830d84dc9cbf8b944b097fde62381b8b5b215119e735ce1063 + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 10/6fa4dcc8d86629705cea944a4b88ef4cb0e07656ebf223fa287443256414283dd25d91c1cd84c77987f2aec5927af1a9db6085757cb43d90eb170ebf4b47f4f4 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 + languageName: node + linkType: hard + +"meriyah@npm:6.1.3": + version: 6.1.3 + resolution: "meriyah@npm:6.1.3" + checksum: 10/72895f329d98467a3998e97efd4266b50ac203febfffe0c0db2c4a8c5564805450e19a18171b5819dd663c62833175773357f678f0a185051144411d7409c461 + languageName: node + linkType: hard + +"micromatch@npm:4.0.8, micromatch@npm:^4.0.4, micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/6bf2a01672e7965eb9941d1f02044fad2bd12486b5553dc1116ff24c09a8723157601dc992e74c911d896175918448762df3b3fd0a6b61037dd1a9766ddfbf58 + languageName: node + linkType: hard + +"mimic-fn@npm:^2.1.0": + version: 2.1.0 + resolution: "mimic-fn@npm:2.1.0" + checksum: 10/d2421a3444848ce7f84bd49115ddacff29c15745db73f54041edc906c14b131a38d05298dae3081667627a59b2eb1ca4b436ff2e1b80f69679522410418b478a + languageName: node + linkType: hard + +"min-indent@npm:^1.0.1": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: 10/bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 + languageName: node + linkType: hard + +"minimist@npm:1.2.8, minimist@npm:^1.2.8": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^4.0.0": + version: 4.0.1 + resolution: "minipass-fetch@npm:4.0.1" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^3.0.1" + dependenciesMeta: + encoding: + optional: true + checksum: 10/7ddfebdbb87d9866e7b5f7eead5a9e3d9d507992af932a11d275551f60006cf7d9178e66d586dbb910894f3e3458d27c0ddf93c76e94d49d0a54a541ddc1263d + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + +"minizlib@npm:^3.0.1": + version: 3.0.2 + resolution: "minizlib@npm:3.0.2" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10/c075bed1594f68dcc8c35122333520112daefd4d070e5d0a228bd4cf5580e9eed3981b96c0ae1d62488e204e80fd27b2b9d0068ca9a5ef3993e9565faf63ca41 + languageName: node + linkType: hard + +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba + languageName: node + linkType: hard + +"mlly@npm:^1.7.4": + version: 1.7.4 + resolution: "mlly@npm:1.7.4" + dependencies: + acorn: "npm:^8.14.0" + pathe: "npm:^2.0.1" + pkg-types: "npm:^1.3.0" + ufo: "npm:^1.5.4" + checksum: 10/1b36163d38c2331f8ae480e6a11da3d15927a2148d729fcd9df6d0059ca74869aa693931bd1f762f82eb534b84c921bdfbc036eb0e4da4faeb55f1349d254f35 + languageName: node + linkType: hard + +"moment@npm:~2.30.1": + version: 2.30.1 + resolution: "moment@npm:2.30.1" + checksum: 10/ae42d876d4ec831ef66110bdc302c0657c664991e45cf2afffc4b0f6cd6d251dde11375c982a5c0564ccc0fa593fc564576ddceb8c8845e87c15f58aa6baca69 + languageName: node + linkType: hard + +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"n-readlines@npm:1.0.1": + version: 1.0.1 + resolution: "n-readlines@npm:1.0.1" + checksum: 10/4f0ddcd26347040eb219d8fc8c3620ce086095a355e64791298822b5882fdd646d69b733f6c519bcadc5c64f540e8f13a399e39cfb22e80e25a16000eca7572e + languageName: node + linkType: hard + +"nano-spawn@npm:1.0.2": + version: 1.0.2 + resolution: "nano-spawn@npm:1.0.2" + checksum: 10/6ce9e60846d2e37c0e3cd048472683c81dbcaadef9ebe73bfc8754ee7da2a574f724436d3dcdeda5d807aedc857cc8cbc278a9882529164b5ef4b170b95cfe0b + languageName: node + linkType: hard + +"nanoid@npm:^3.3.11": + version: 3.3.11 + resolution: "nanoid@npm:3.3.11" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/73b5afe5975a307aaa3c95dfe3334c52cdf9ae71518176895229b8d65ab0d1c0417dd081426134eb7571c055720428ea5d57c645138161e7d10df80815527c48 + languageName: node + linkType: hard + +"napi-postinstall@npm:^0.2.2": + version: 0.2.4 + resolution: "napi-postinstall@npm:0.2.4" + bin: + napi-postinstall: lib/cli.js + checksum: 10/286785f884b872102fb284847ecc693101f70126b1fc7a97e19293929ce7f08802b41f89398015cce0797070ea3ce6871939a3c1e693c04cf594f7939dbe8cfb + languageName: node + linkType: hard + +"natural-compare@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare@npm:1.4.0" + checksum: 10/23ad088b08f898fc9b53011d7bb78ec48e79de7627e01ab5518e806033861bef68d5b0cd0e2205c2f36690ac9571ff6bcb05eb777ced2eeda8d4ac5b44592c3d + languageName: node + linkType: hard + +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10/b5734e87295324fabf868e36fb97c84b7d7f3156ec5f4ee5bf6e488079c11054f818290fc33804cef7b1ee21f55eeb14caea83e7dafae6492a409b3e573153e5 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 11.2.0 + resolution: "node-gyp@npm:11.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^14.0.3" + nopt: "npm:^8.0.0" + proc-log: "npm:^5.0.0" + semver: "npm:^7.3.5" + tar: "npm:^7.4.3" + tinyglobby: "npm:^0.2.12" + which: "npm:^5.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/806fd8e3adc9157e17bf0d4a2c899cf6b98a0bbe9f453f630094ce791866271f6cddcaf2133e6513715d934fcba2014d287c7053d5d7934937b3a34d5a3d84ad + languageName: node + linkType: hard + +"node-int64@npm:^0.4.0": + version: 0.4.0 + resolution: "node-int64@npm:0.4.0" + checksum: 10/b7afc2b65e56f7035b1a2eec57ae0fbdee7d742b1cdcd0f4387562b6527a011ab1cbe9f64cc8b3cca61e3297c9637c8bf61cec2e6b8d3a711d4b5267dfafbe02 + languageName: node + linkType: hard + +"node-releases@npm:^2.0.19": + version: 2.0.19 + resolution: "node-releases@npm:2.0.19" + checksum: 10/c2b33b4f0c40445aee56141f13ca692fa6805db88510e5bbb3baadb2da13e1293b738e638e15e4a8eb668bb9e97debb08e7a35409b477b5cc18f171d35a83045 + languageName: node + linkType: hard + +"node-style-text@npm:0.0.8": + version: 0.0.8 + resolution: "node-style-text@npm:0.0.8" + checksum: 10/c716b208f99ff2dcb52432f5cd0406e8f6df006bb927dd522c56406b53a64799dc155e29724fecec38c855dc62a2297b1e2530f57681c6504d7c4e5075e1478e + languageName: node + linkType: hard + +"nopt@npm:^8.0.0": + version: 8.1.0 + resolution: "nopt@npm:8.1.0" + dependencies: + abbrev: "npm:^3.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/26ab456c51a96f02a9e5aa8d1b80ef3219f2070f3f3528a040e32fb735b1e651e17bdf0f1476988d3a46d498f35c65ed662d122f340d38ce4a7e71dd7b20c4bc + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"npm-normalize-package-bin@npm:^4.0.0": + version: 4.0.0 + resolution: "npm-normalize-package-bin@npm:4.0.0" + checksum: 10/e1a0971e5640bc116c5197f9707d86dc404b6d8e13da2c7ea82baa5583b8da279a3c8607234aa1d733c2baac3b3eba87b156f021f20ae183dc4806530e61675d + languageName: node + linkType: hard + +"npm-run-all2@npm:8.0.4": + version: 8.0.4 + resolution: "npm-run-all2@npm:8.0.4" + dependencies: + ansi-styles: "npm:^6.2.1" + cross-spawn: "npm:^7.0.6" + memorystream: "npm:^0.3.1" + picomatch: "npm:^4.0.2" + pidtree: "npm:^0.6.0" + read-package-json-fast: "npm:^4.0.0" + shell-quote: "npm:^1.7.3" + which: "npm:^5.0.0" + bin: + npm-run-all: bin/npm-run-all/index.js + npm-run-all2: bin/npm-run-all/index.js + run-p: bin/run-p/index.js + run-s: bin/run-s/index.js + checksum: 10/6e485f0d71fdfcf5bd872e5bbb8440ea5816ebeed88e6e39ff6e758d76adefa516b3101ed7ddc8de117d61b499f176417c87b0c595394e15733738834ad6ef0a + languageName: node + linkType: hard + +"npm-run-path@npm:^4.0.1": + version: 4.0.1 + resolution: "npm-run-path@npm:4.0.1" + dependencies: + path-key: "npm:^3.0.0" + checksum: 10/5374c0cea4b0bbfdfae62da7bbdf1e1558d338335f4cacf2515c282ff358ff27b2ecb91ffa5330a8b14390ac66a1e146e10700440c1ab868208430f56b5f4d23 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"onetime@npm:^5.1.2": + version: 5.1.2 + resolution: "onetime@npm:5.1.2" + dependencies: + mimic-fn: "npm:^2.1.0" + checksum: 10/e9fd0695a01cf226652f0385bf16b7a24153dbbb2039f764c8ba6d2306a8506b0e4ce570de6ad99c7a6eb49520743afdb66edd95ee979c1a342554ed49a9aadd + languageName: node + linkType: hard + +"open@npm:^8.4.0": + version: 8.4.2 + resolution: "open@npm:8.4.2" + dependencies: + define-lazy-prop: "npm:^2.0.0" + is-docker: "npm:^2.1.1" + is-wsl: "npm:^2.2.0" + checksum: 10/acd81a1d19879c818acb3af2d2e8e9d81d17b5367561e623248133deb7dd3aefaed527531df2677d3e6aaf0199f84df57b6b2262babff8bf46ea0029aac536c9 + languageName: node + linkType: hard + +"optionator@npm:^0.9.3": + version: 0.9.4 + resolution: "optionator@npm:0.9.4" + dependencies: + deep-is: "npm:^0.1.3" + fast-levenshtein: "npm:^2.0.6" + levn: "npm:^0.4.1" + prelude-ls: "npm:^1.2.1" + type-check: "npm:^0.4.0" + word-wrap: "npm:^1.2.5" + checksum: 10/a8398559c60aef88d7f353a4f98dcdff6090a4e70f874c827302bf1213d9106a1c4d5fcb68dacb1feb3c30a04c4102f41047aa55d4c576b863d6fc876e001af6 + languageName: node + linkType: hard + +"outdent@npm:0.8.0": + version: 0.8.0 + resolution: "outdent@npm:0.8.0" + checksum: 10/a556c5c308705ad4e3441be435f2b2cf014cb5f9753a24cbd080eadc473b988c77d0d529a6a9a57c3931fb4178e5a81d668cc4bc49892b668191a5d0ba3df76e + languageName: node + linkType: hard + +"oxc-parser@npm:0.75.0": + version: 0.75.0 + resolution: "oxc-parser@npm:0.75.0" + dependencies: + "@oxc-parser/binding-android-arm64": "npm:0.75.0" + "@oxc-parser/binding-darwin-arm64": "npm:0.75.0" + "@oxc-parser/binding-darwin-x64": "npm:0.75.0" + "@oxc-parser/binding-freebsd-x64": "npm:0.75.0" + "@oxc-parser/binding-linux-arm-gnueabihf": "npm:0.75.0" + "@oxc-parser/binding-linux-arm-musleabihf": "npm:0.75.0" + "@oxc-parser/binding-linux-arm64-gnu": "npm:0.75.0" + "@oxc-parser/binding-linux-arm64-musl": "npm:0.75.0" + "@oxc-parser/binding-linux-riscv64-gnu": "npm:0.75.0" + "@oxc-parser/binding-linux-s390x-gnu": "npm:0.75.0" + "@oxc-parser/binding-linux-x64-gnu": "npm:0.75.0" + "@oxc-parser/binding-linux-x64-musl": "npm:0.75.0" + "@oxc-parser/binding-wasm32-wasi": "npm:0.75.0" + "@oxc-parser/binding-win32-arm64-msvc": "npm:0.75.0" + "@oxc-parser/binding-win32-x64-msvc": "npm:0.75.0" + "@oxc-project/types": "npm:^0.75.0" + dependenciesMeta: + "@oxc-parser/binding-android-arm64": + optional: true + "@oxc-parser/binding-darwin-arm64": + optional: true + "@oxc-parser/binding-darwin-x64": + optional: true + "@oxc-parser/binding-freebsd-x64": + optional: true + "@oxc-parser/binding-linux-arm-gnueabihf": + optional: true + "@oxc-parser/binding-linux-arm-musleabihf": + optional: true + "@oxc-parser/binding-linux-arm64-gnu": + optional: true + "@oxc-parser/binding-linux-arm64-musl": + optional: true + "@oxc-parser/binding-linux-riscv64-gnu": + optional: true + "@oxc-parser/binding-linux-s390x-gnu": + optional: true + "@oxc-parser/binding-linux-x64-gnu": + optional: true + "@oxc-parser/binding-linux-x64-musl": + optional: true + "@oxc-parser/binding-wasm32-wasi": + optional: true + "@oxc-parser/binding-win32-arm64-msvc": + optional: true + "@oxc-parser/binding-win32-x64-msvc": + optional: true + checksum: 10/a17fd23262990403407dd1fbb825c713866af4d42aa7f559d13d05324fa7c8d36bfdd58610332c8628e5e01287c0ab083426504c60c50ceadb7185430f1b28b3 + languageName: node + linkType: hard + +"oxc-resolver@npm:^11.1.0": + version: 11.2.0 + resolution: "oxc-resolver@npm:11.2.0" + dependencies: + "@oxc-resolver/binding-darwin-arm64": "npm:11.2.0" + "@oxc-resolver/binding-darwin-x64": "npm:11.2.0" + "@oxc-resolver/binding-freebsd-x64": "npm:11.2.0" + "@oxc-resolver/binding-linux-arm-gnueabihf": "npm:11.2.0" + "@oxc-resolver/binding-linux-arm64-gnu": "npm:11.2.0" + "@oxc-resolver/binding-linux-arm64-musl": "npm:11.2.0" + "@oxc-resolver/binding-linux-riscv64-gnu": "npm:11.2.0" + "@oxc-resolver/binding-linux-s390x-gnu": "npm:11.2.0" + "@oxc-resolver/binding-linux-x64-gnu": "npm:11.2.0" + "@oxc-resolver/binding-linux-x64-musl": "npm:11.2.0" + "@oxc-resolver/binding-wasm32-wasi": "npm:11.2.0" + "@oxc-resolver/binding-win32-arm64-msvc": "npm:11.2.0" + "@oxc-resolver/binding-win32-x64-msvc": "npm:11.2.0" + dependenciesMeta: + "@oxc-resolver/binding-darwin-arm64": + optional: true + "@oxc-resolver/binding-darwin-x64": + optional: true + "@oxc-resolver/binding-freebsd-x64": + optional: true + "@oxc-resolver/binding-linux-arm-gnueabihf": + optional: true + "@oxc-resolver/binding-linux-arm64-gnu": + optional: true + "@oxc-resolver/binding-linux-arm64-musl": + optional: true + "@oxc-resolver/binding-linux-riscv64-gnu": + optional: true + "@oxc-resolver/binding-linux-s390x-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-musl": + optional: true + "@oxc-resolver/binding-wasm32-wasi": + optional: true + "@oxc-resolver/binding-win32-arm64-msvc": + optional: true + "@oxc-resolver/binding-win32-x64-msvc": + optional: true + checksum: 10/6c9fec7248a6d28abd8c1c0f1a69d4fd8995112ddb39fb864da8ea113709200bb2f37122b172617349a8f3592824193f472c7b7e06951d800fa89b80d46e01cf + languageName: node + linkType: hard + +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-limit@npm:^6.2.0": + version: 6.2.0 + resolution: "p-limit@npm:6.2.0" + dependencies: + yocto-queue: "npm:^1.1.1" + checksum: 10/70e8df3e5f1c173c9bd9fa8390a3c5c2797505240ae42973536992b1f5f59a922153c2f35ff1bf36fb72a0f025b0f13fca062a4233e830adad446960d56b4d84 + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^7.0.2": + version: 7.0.3 + resolution: "p-map@npm:7.0.3" + checksum: 10/2ef48ccfc6dd387253d71bf502604f7893ed62090b2c9d73387f10006c342606b05233da0e4f29388227b61eb5aeface6197e166520c465c234552eeab2fe633 + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 10/58ee9538f2f762988433da00e26acc788036914d57c71c246bf0be1b60cdbd77dd60b6a3e1a30465f0b248aeb80079e0b34cb6050b1dfa18c06953bb1cbc7602 + languageName: node + linkType: hard + +"package-name-regex@npm:~2.0.6": + version: 2.0.6 + resolution: "package-name-regex@npm:2.0.6" + checksum: 10/a889d52cdd860dd4feafebb3b9a2fed47d36408fd62bfab07f6386a80395d66e89f9c913bc8ea8ff62108f23d6e6470e5342e20e660a2743465cd4c45f676d4e + languageName: node + linkType: hard + +"parent-module@npm:^1.0.0": + version: 1.0.1 + resolution: "parent-module@npm:1.0.1" + dependencies: + callsites: "npm:^3.0.0" + checksum: 10/6ba8b255145cae9470cf5551eb74be2d22281587af787a2626683a6c20fbb464978784661478dd2a3f1dad74d1e802d403e1b03c1a31fab310259eec8ac560ff + languageName: node + linkType: hard + +"parent-module@npm:^2.0.0": + version: 2.0.0 + resolution: "parent-module@npm:2.0.0" + dependencies: + callsites: "npm:^3.1.0" + checksum: 10/f131f13d687a938556a01033561fb1b274b39921eb4425c7a691f0d91dcfbe9b19759c2b8d425a3ee7c8a46874e57fa418a690643880c3c7c56827aba12f78dd + languageName: node + linkType: hard + +"parse-entities@npm:^2.0.0": + version: 2.0.0 + resolution: "parse-entities@npm:2.0.0" + dependencies: + character-entities: "npm:^1.0.0" + character-entities-legacy: "npm:^1.0.0" + character-reference-invalid: "npm:^1.0.0" + is-alphanumerical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + is-hexadecimal: "npm:^1.0.0" + checksum: 10/feb46b516722474797d72331421f3e62856750cfb4f70ba098b36447bf0b169e819cc4fdee53e022874d5f0c81b605d86e1912b9842a70e59a54de2fee81589d + languageName: node + linkType: hard + +"parse-json@npm:8.3.0": + version: 8.3.0 + resolution: "parse-json@npm:8.3.0" + dependencies: + "@babel/code-frame": "npm:^7.26.2" + index-to-position: "npm:^1.1.0" + type-fest: "npm:^4.39.1" + checksum: 10/23812dd66a8ceedfeb0fd8a92c96b88b18bc1030cf1f07cd29146b711a208ef91ac995cf14517422f908fa930f84324086bf22fdcc1013029776cc01d589bae4 + languageName: node + linkType: hard + +"parse-json@npm:^5.2.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + error-ex: "npm:^1.3.1" + json-parse-even-better-errors: "npm:^2.3.0" + lines-and-columns: "npm:^1.1.6" + checksum: 10/62085b17d64da57f40f6afc2ac1f4d95def18c4323577e1eced571db75d9ab59b297d1d10582920f84b15985cbfc6b6d450ccbf317644cfa176f3ed982ad87e2 + languageName: node + linkType: hard + +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 10/673c801d9f957ff79962d71ed5a24850163f4181a90dd30c4e3666b3a804f53b77f1f0556792e8b2adbb5d58757907d1aa51d7d7dc75997c2a56d72937cbc8b7 + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + +"pathe@npm:^2.0.1, pathe@npm:^2.0.3": + version: 2.0.3 + resolution: "pathe@npm:2.0.3" + checksum: 10/01e9a69928f39087d96e1751ce7d6d50da8c39abf9a12e0ac2389c42c83bc76f78c45a475bd9026a02e6a6f79be63acc75667df855862fe567d99a00a540d23d + languageName: node + linkType: hard + +"picocolors@npm:1.1.1, picocolors@npm:^1.0.0, picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10/e1cf46bf84886c79055fdfa9dcb3e4711ad259949e3565154b004b260cd356c5d54b31a1437ce9782624bf766272fe6b0154f5f0c744fb7af5d454d2b60db045 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"picomatch@npm:^4.0.0, picomatch@npm:^4.0.1, picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717 + languageName: node + linkType: hard + +"pidtree@npm:^0.6.0": + version: 0.6.0 + resolution: "pidtree@npm:0.6.0" + bin: + pidtree: bin/pidtree.js + checksum: 10/ea67fb3159e170fd069020e0108ba7712df9f0fd13c8db9b2286762856ddce414fb33932e08df4bfe36e91fe860b51852aee49a6f56eb4714b69634343add5df + languageName: node + linkType: hard + +"pioppo@npm:^1.2.1": + version: 1.2.1 + resolution: "pioppo@npm:1.2.1" + dependencies: + dettle: "npm:^1.0.5" + when-exit: "npm:^2.1.4" + checksum: 10/64e5ecfc57e42cd5dbb05f332854c8482bd32488235c25934e4de95a5cd92f20626c547dd36968fb7199864b0181bf113ac49415766abf7e254f3b803857a944 + languageName: node + linkType: hard + +"pirates@npm:^4.0.4, pirates@npm:^4.0.7": + version: 4.0.7 + resolution: "pirates@npm:4.0.7" + checksum: 10/2427f371366081ae42feb58214f04805d6b41d6b84d74480ebcc9e0ddbd7105a139f7c653daeaf83ad8a1a77214cf07f64178e76de048128fec501eab3305a96 + languageName: node + linkType: hard + +"pkg-dir@npm:^4.2.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"pkg-dir@npm:^8.0.0": + version: 8.0.0 + resolution: "pkg-dir@npm:8.0.0" + dependencies: + find-up-simple: "npm:^1.0.0" + checksum: 10/e589abebd1b76cbc3669a45df64f63cc1b041fd3a6588b45d4c692207df126f2a67478a804e5beeb729e75efea06cd405fb84445c879e7af346ba46a4a30b1ff + languageName: node + linkType: hard + +"pkg-types@npm:^1.3.0": + version: 1.3.1 + resolution: "pkg-types@npm:1.3.1" + dependencies: + confbox: "npm:^0.1.8" + mlly: "npm:^1.7.4" + pathe: "npm:^2.0.1" + checksum: 10/6d491f2244597b24fb59a50e3c258f27da3839555d2a4e112b31bcf536e9359fc4edc98639cd74d2cf16fcd4269e5a09d99fc05d89e2acc896a2f027c2f6ec44 + languageName: node + linkType: hard + +"pkg-types@npm:^2.0.1": + version: 2.1.0 + resolution: "pkg-types@npm:2.1.0" + dependencies: + confbox: "npm:^0.2.1" + exsolve: "npm:^1.0.1" + pathe: "npm:^2.0.3" + checksum: 10/10c9038113d2ada3cfc1fde19b6f367d50d80990f27337e78d86583c96ff2b2ce13fd19cca6bf57a59aa5230ed23e384ec92a4da4c1995c80ea75abe9a8e5dbd + languageName: node + linkType: hard + +"please-upgrade-node@npm:3.2.0": + version: 3.2.0 + resolution: "please-upgrade-node@npm:3.2.0" + dependencies: + semver-compare: "npm:^1.0.0" + checksum: 10/d87c41581a2a022fbe25965a97006238cd9b8cbbf49b39f78d262548149a9d30bd2bdf35fec3d810e0001e630cd46ef13c7e19c389dea8de7e64db271a2381bb + languageName: node + linkType: hard + +"pluralize@npm:^8.0.0": + version: 8.0.0 + resolution: "pluralize@npm:8.0.0" + checksum: 10/17877fdfdb7ddb3639ce257ad73a7c51a30a966091e40f56ea9f2f545b5727ce548d4928f8cb3ce38e7dc0c5150407d318af6a4ed0ea5265d378473b4c2c61ec + languageName: node + linkType: hard + +"postcss-less@npm:6.0.0": + version: 6.0.0 + resolution: "postcss-less@npm:6.0.0" + peerDependencies: + postcss: ^8.3.5 + checksum: 10/75db4ed39d53ff973ef17d7ed9e398f8f1da0fd2b3bc604ea59586a4fd9f7b5364204a5085500e12381326c11488c46c088b269348eb66607509d1a28971d18b + languageName: node + linkType: hard + +"postcss-media-query-parser@npm:0.2.3": + version: 0.2.3 + resolution: "postcss-media-query-parser@npm:0.2.3" + checksum: 10/39f9e9c383ec98d85103c5f3d1eb5a9088a47357ed26d3c7501aeba1302840521cffa1b851bc2d8146f1ccdef263fe3088f4d435bda1c0dc0b6f9387865574c8 + languageName: node + linkType: hard + +"postcss-scss@npm:4.0.9": + version: 4.0.9 + resolution: "postcss-scss@npm:4.0.9" + peerDependencies: + postcss: ^8.4.29 + checksum: 10/d191c771344357a28995a2f53041ec699070331b8238e076001cedde97215bd3ebf596d0a9882b22c566977c4b72816dafc00028dc09153c6f97f71cd28a70f7 + languageName: node + linkType: hard + +"postcss-selector-parser@npm:2.2.3": + version: 2.2.3 + resolution: "postcss-selector-parser@npm:2.2.3" + dependencies: + flatten: "npm:^1.0.2" + indexes-of: "npm:^1.0.1" + uniq: "npm:^1.0.1" + checksum: 10/a3d0300117abac9730b3a268c91dae6048770080c42e6504d33b3c6620efd5c60623392ffd2931a74519e10ca72d9e75d24ac25cfc3e1e109cb42993f0373e42 + languageName: node + linkType: hard + +"postcss-values-parser@npm:2.0.1": + version: 2.0.1 + resolution: "postcss-values-parser@npm:2.0.1" + dependencies: + flatten: "npm:^1.0.2" + indexes-of: "npm:^1.0.1" + uniq: "npm:^1.0.1" + checksum: 10/f69211656b90a9d2f5efb1ec4a9e5f076f968b0c1169bfddc16aa0dce2e3a2853d7875e4d8058652e9b65d084fab93bfee8da389f6a2145ac547ee9ab0a03456 + languageName: node + linkType: hard + +"postcss@npm:8.5.6": + version: 8.5.6 + resolution: "postcss@npm:8.5.6" + dependencies: + nanoid: "npm:^3.3.11" + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10/9e4fbe97574091e9736d0e82a591e29aa100a0bf60276a926308f8c57249698935f35c5d2f4e80de778d0cbb8dcffab4f383d85fd50c5649aca421c3df729b86 + languageName: node + linkType: hard + +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: 10/0b9d2c76801ca652a7f64892dd37b7e3fab149a37d2424920099bf894acccc62abb4424af2155ab36dea8744843060a2d8ddc983518d0b1e22265a22324b72ed + languageName: node + linkType: hard + +"prettier@npm:3.6.1": + version: 3.6.1 + resolution: "prettier@npm:3.6.1" + bin: + prettier: bin/prettier.cjs + checksum: 10/e2c4b47bf1bda4f932143e52e0f57239dd60cfef08296b56d4073426e2d310edc353a7daa5285a546bd3c1619c76894759cc98d82d4ac710f72a711ae2899bcc + languageName: node + linkType: hard + +"prettier@workspace:.": + version: 0.0.0-use.local + resolution: "prettier@workspace:." + dependencies: + "@angular/compiler": "npm:20.0.5" + "@babel/code-frame": "npm:7.27.1" + "@babel/generator": "npm:7.27.5" + "@babel/parser": "npm:7.27.7" + "@babel/types": "npm:7.27.7" + "@eslint-react/eslint-plugin": "npm:1.52.2" + "@eslint/js": "npm:9.29.0" + "@glimmer/syntax": "npm:0.94.9" + "@prettier/cli": "npm:0.9.0" + "@prettier/html-tags": "npm:1.0.0" + "@prettier/parse-srcset": "npm:3.1.0" + "@stylistic/eslint-plugin": "npm:5.0.0" + "@types/estree": "npm:1.0.8" + "@typescript-eslint/eslint-plugin": "npm:8.34.1" + "@typescript-eslint/parser": "npm:8.34.1" + "@typescript-eslint/typescript-estree": "npm:8.34.1" + "@typescript-eslint/visitor-keys": "npm:8.34.1" + acorn: "npm:8.15.0" + acorn-jsx: "npm:5.3.2" + angular-estree-parser: "npm:12.1.0" + angular-html-parser: "npm:8.1.0" + browserslist: "npm:4.25.1" + browserslist-to-esbuild: "npm:2.1.1" + buffer: "npm:6.0.3" + c8: "npm:10.1.3" + camelcase: "npm:8.0.0" + ci-info: "npm:4.2.0" + cjk-regex: "npm:3.3.0" + collapse-white-space: "npm:1.0.6" + cross-env: "npm:7.0.3" + cspell: "npm:9.1.1" + css-units-list: "npm:2.1.0" + dashify: "npm:2.0.0" + deno-path-from-file-url: "npm:0.0.3" + diff: "npm:8.0.2" + editorconfig: "npm:0.15.3" + emoji-regex: "npm:10.4.0" + enquirer: "npm:2.4.1" + esbuild: "npm:0.25.5" + esbuild-plugins-node-modules-polyfill: "npm:1.7.1" + esbuild-visualizer: "npm:0.7.0" + escape-string-regexp: "npm:5.0.0" + eslint: "npm:9.29.0" + eslint-config-prettier: "npm:10.1.5" + eslint-formatter-friendly: "npm:7.0.0" + eslint-plugin-compat: "npm:6.0.2" + eslint-plugin-jest: "npm:29.0.1" + eslint-plugin-n: "npm:17.20.0" + eslint-plugin-regexp: "npm:2.9.0" + eslint-plugin-simple-import-sort: "npm:12.1.1" + eslint-plugin-unicorn: "npm:59.0.1" + esm-utils: "npm:4.4.2" + espree: "npm:10.4.0" + fast-glob: "npm:3.3.3" + fast-json-stable-stringify: "npm:2.1.0" + file-entry-cache: "npm:10.1.1" + find-cache-directory: "npm:6.0.0" + flow-parser: "npm:0.274.1" + get-east-asian-width: "npm:1.3.0" + get-stdin: "npm:9.0.0" + globals: "npm:16.2.0" + graphql: "npm:16.11.0" + hermes-parser: "npm:0.29.0" + html-element-attributes: "npm:3.4.0" + html-ua-styles: "npm:0.0.8" + ignore: "npm:7.0.5" + import-meta-resolve: "npm:4.1.0" + index-to-position: "npm:1.1.0" + is-es5-identifier-name: "npm:1.0.0" + jest: "npm:30.0.3" + jest-docblock: "npm:30.0.1" + jest-light-runner: "npm:0.7.9" + jest-snapshot-serializer-ansi: "npm:2.2.1" + jest-snapshot-serializer-raw: "npm:2.0.0" + jest-watch-typeahead: "npm:3.0.1" + json5: "npm:2.2.3" + knip: "npm:5.61.2" + leven: "npm:4.0.0" + linguist-languages: "npm:8.0.0" + magic-string: "npm:0.30.17" + meriyah: "npm:6.1.3" + micromatch: "npm:4.0.8" + minimist: "npm:1.2.8" + n-readlines: "npm:1.0.1" + nano-spawn: "npm:1.0.2" + node-style-text: "npm:0.0.8" + npm-run-all2: "npm:8.0.4" + outdent: "npm:0.8.0" + oxc-parser: "npm:0.75.0" + parse-json: "npm:8.3.0" + picocolors: "npm:1.1.1" + please-upgrade-node: "npm:3.2.0" + postcss: "npm:8.5.6" + postcss-less: "npm:6.0.0" + postcss-media-query-parser: "npm:0.2.3" + postcss-scss: "npm:4.0.9" + postcss-selector-parser: "npm:2.2.3" + postcss-values-parser: "npm:2.0.1" + prettier: "npm:3.6.1" + pretty-bytes: "npm:7.0.0" + pretty-ms: "npm:9.2.0" + regexp-util: "npm:2.0.3" + remark-footnotes: "npm:2.0.0" + remark-math: "npm:3.0.1" + remark-parse: "npm:8.0.3" + rollup-plugin-license: "npm:3.6.0" + sdbm: "npm:2.0.0" + search-closest: "npm:1.1.0" + semver: "npm:7.7.2" + serialize-javascript: "npm:6.0.2" + smol-toml: "npm:1.3.4" + snapshot-diff: "npm:0.10.0" + strip-ansi: "npm:7.1.0" + tempy: "npm:3.1.0" + tinybench: "npm:4.0.1" + to-fast-properties: "npm:4.0.0" + trim-newlines: "npm:5.0.0" + ts-expect: "npm:1.3.0" + typescript: "npm:5.8.3" + unicode-regex: "npm:4.1.2" + unified: "npm:9.2.2" + url-or-path: "npm:2.6.1" + vnopts: "npm:2.0.2" + wcwidth.js: "npm:2.0.0" + yaml: "npm:1.10.2" + yaml-unist-parser: "npm:2.0.5" + bin: + prettier: ./bin/prettier.cjs + languageName: unknown + linkType: soft + +"pretty-bytes@npm:7.0.0": + version: 7.0.0 + resolution: "pretty-bytes@npm:7.0.0" + checksum: 10/1d13dd23a6e50ddcd9b6b968490c1ac93d6babea808f7e4be9bb6eab8513658fd3fec2e6b2367325acad7e14b0ca9fb06dc66a72ff7244b63216f07c5c2626e1 + languageName: node + linkType: hard + +"pretty-format@npm:30.0.2": + version: 30.0.2 + resolution: "pretty-format@npm:30.0.2" + dependencies: + "@jest/schemas": "npm:30.0.1" + ansi-styles: "npm:^5.2.0" + react-is: "npm:^18.3.1" + checksum: 10/82b2f0c8771fcf072b33ca6a748b95beac589db4f98deafda1a29579ce47adf322909ea2fff9d46672ac075dda1aba2bde7f955609bfdf76f867e0ff77b5c19d + languageName: node + linkType: hard + +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": "npm:^29.6.3" + ansi-styles: "npm:^5.0.0" + react-is: "npm:^18.0.0" + checksum: 10/dea96bc83c83cd91b2bfc55757b6b2747edcaac45b568e46de29deee80742f17bc76fe8898135a70d904f4928eafd8bb693cd1da4896e8bdd3c5e82cadf1d2bb + languageName: node + linkType: hard + +"pretty-ms@npm:9.2.0": + version: 9.2.0 + resolution: "pretty-ms@npm:9.2.0" + dependencies: + parse-ms: "npm:^4.0.0" + checksum: 10/a65a1d81560867f4f7128862fdbf0e1c2d3c5607bf75cae7758bf8111e2c4b744be46e084704125a38ba918bb43defa7a53aaff0f48c5c2d95367d3148c980d9 + languageName: node + linkType: hard + +"proc-log@npm:^5.0.0": + version: 5.0.0 + resolution: "proc-log@npm:5.0.0" + checksum: 10/35610bdb0177d3ab5d35f8827a429fb1dc2518d9e639f2151ac9007f01a061c30e0c635a970c9b00c39102216160f6ec54b62377c92fac3b7bfc2ad4b98d195c + languageName: node + linkType: hard + +"promise-make-counter@npm:^1.0.2": + version: 1.0.2 + resolution: "promise-make-counter@npm:1.0.2" + dependencies: + promise-make-naked: "npm:^3.0.2" + checksum: 10/6cad1af50601ed71070054ccef186fc7fd475ca9ed17f9f5c104b35f550eb32654a6df048b5165e4089bf4d6f4e51a26877a3d7ca53f8b13e0cb800379e73a4a + languageName: node + linkType: hard + +"promise-make-naked@npm:^3.0.2": + version: 3.0.2 + resolution: "promise-make-naked@npm:3.0.2" + checksum: 10/8f251808dc06264109e7edd5533a9db54e49ff70594ced4cb125249c1ad101452245e3addbf8c06b50d5199351b086b44450d5ef049a5e933da9e8f4fb594291 + languageName: node + linkType: hard + +"promise-resolve-timeout@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-resolve-timeout@npm:2.0.1" + checksum: 10/acfff518f185c209caa6d67f9a5bf540105d207752d2065b8d0d5579d49f04f5b2e374d2e64ac08f9459fc7feaabfbbbbb9ec66f342a82a9459db4e8bfd72a4e + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + +"pseudomap@npm:^1.0.2": + version: 1.0.2 + resolution: "pseudomap@npm:1.0.2" + checksum: 10/856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + +"pure-rand@npm:^7.0.0": + version: 7.0.1 + resolution: "pure-rand@npm:7.0.1" + checksum: 10/c61a576fda5032ec9763ecb000da4a8f19263b9e2f9ae9aa2759c8fbd9dc6b192b2ce78391ebd41abb394a5fedb7bcc4b03c9e6141ac8ab20882dd5717698b80 + languageName: node + linkType: hard + +"quansync@npm:^0.2.8": + version: 0.2.10 + resolution: "quansync@npm:0.2.10" + checksum: 10/b54d955de867e104025f2666d52b2b67befe4e0f184a96acc9adcbdc572e46dce49c69d1e79f99413beae8a974a576383806a05f85f9a826865dc589ee1bcaf2 + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10/72900df0616e473e824202113c3df6abae59150dfb73ed13273503127235320e9c8ca4aaaaccfd58cf417c6ca92a6e68ee9a5c3182886ae949a768639b388a7b + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"react-is@npm:^18.0.0, react-is@npm:^18.3.1": + version: 18.3.1 + resolution: "react-is@npm:18.3.1" + checksum: 10/d5f60c87d285af24b1e1e7eaeb123ec256c3c8bdea7061ab3932e3e14685708221bf234ec50b21e10dd07f008f1b966a2730a0ce4ff67905b3872ff2042aec22 + languageName: node + linkType: hard + +"read-package-json-fast@npm:^4.0.0": + version: 4.0.0 + resolution: "read-package-json-fast@npm:4.0.0" + dependencies: + json-parse-even-better-errors: "npm:^4.0.0" + npm-normalize-package-bin: "npm:^4.0.0" + checksum: 10/bf0becd7d0b652dcc5874b466d1dbd98313180e89505c072f35ff48a1ad6bdaf2427143301e1924d64e4af5064cda8be5df16f14de882f03130e29051bbaab87 + languageName: node + linkType: hard + +"refa@npm:^0.12.0, refa@npm:^0.12.1": + version: 0.12.1 + resolution: "refa@npm:0.12.1" + dependencies: + "@eslint-community/regexpp": "npm:^4.8.0" + checksum: 10/b89411434e31637a519c065acd8fd1ec9eabc1dec38eec58dbc69a386ec21d88f97fa175e56fb3133e21c090ddb68fe7b5653ffc4bbcc9f069abc0e88c0d290c + languageName: node + linkType: hard + +"regexp-ast-analysis@npm:^0.7.0, regexp-ast-analysis@npm:^0.7.1": + version: 0.7.1 + resolution: "regexp-ast-analysis@npm:0.7.1" + dependencies: + "@eslint-community/regexpp": "npm:^4.8.0" + refa: "npm:^0.12.1" + checksum: 10/92299636d9c941ee27db7568a775354d36024504c104c5d7981a89dda1b0ff1e2a56db16f92d7e166a50a1164593788c0849c5840ec9d79b39c1c040d59c442c + languageName: node + linkType: hard + +"regexp-tree@npm:^0.1.27": + version: 0.1.27 + resolution: "regexp-tree@npm:0.1.27" + bin: + regexp-tree: bin/regexp-tree + checksum: 10/08c70c8adb5a0d4af1061bf9eb05d3b6e1d948c433d6b7008e4b5eb12a49429c2d6ca8e9106339a432aa0d07bd6e1bccc638d8f4ab0d045f3adad22182b300a2 + languageName: node + linkType: hard + +"regexp-util@npm:2.0.3, regexp-util@npm:^2.0.1": + version: 2.0.3 + resolution: "regexp-util@npm:2.0.3" + checksum: 10/8380aa27dc61013b21a01ce1679d61323e6930ce0d3776171045c1ed73e3ba70c5da1cf02d65d9f1f97d1b944de617ff0d609eadce7832344ed8f096919a55ba + languageName: node + linkType: hard + +"regjsparser@npm:^0.12.0": + version: 0.12.0 + resolution: "regjsparser@npm:0.12.0" + dependencies: + jsesc: "npm:~3.0.2" + bin: + regjsparser: bin/parser + checksum: 10/c2d6506b3308679de5223a8916984198e0493649a67b477c66bdb875357e3785abbf3bedf7c5c2cf8967d3b3a7bdf08b7cbd39e65a70f9e1ffad584aecf5f06a + languageName: node + linkType: hard + +"remark-footnotes@npm:2.0.0": + version: 2.0.0 + resolution: "remark-footnotes@npm:2.0.0" + checksum: 10/e0a58bfc780451332d70c494765fe26c214f483e7eabae8614bc99f4f4a8088f1b368688727dc8d9729577836bbfc967154e266373ee645a136edf5ed2049213 + languageName: node + linkType: hard + +"remark-math@npm:3.0.1": + version: 3.0.1 + resolution: "remark-math@npm:3.0.1" + checksum: 10/47f33ae100e78eda68b3d684283e274c1f4bb45be41c6472b17886bd70e02640bd96a852739c5384b499a1f36e4938fb46528dadd07f5daf9cdf46f966072c08 + languageName: node + linkType: hard + +"remark-parse@npm:8.0.3": + version: 8.0.3 + resolution: "remark-parse@npm:8.0.3" + dependencies: + ccount: "npm:^1.0.0" + collapse-white-space: "npm:^1.0.2" + is-alphabetical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + is-whitespace-character: "npm:^1.0.0" + is-word-character: "npm:^1.0.0" + markdown-escapes: "npm:^1.0.0" + parse-entities: "npm:^2.0.0" + repeat-string: "npm:^1.5.4" + state-toggle: "npm:^1.0.0" + trim: "npm:0.0.1" + trim-trailing-lines: "npm:^1.0.0" + unherit: "npm:^1.0.4" + unist-util-remove-position: "npm:^2.0.0" + vfile-location: "npm:^3.0.0" + xtend: "npm:^4.0.1" + checksum: 10/795ed675ed9c0b454a858049b129394fb7678c7a08f3f2261e06119534360ec2e35cb3a188c65ad7bae6f088ba7bcdecc83ba2fa481aea8aaf6ed63d9e744490 + languageName: node + linkType: hard + +"repeat-string@npm:^1.5.4, repeat-string@npm:^1.6.1": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 10/1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: "npm:^5.0.0" + checksum: 10/546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 + languageName: node + linkType: hard + +"resolve-from@npm:^4.0.0": + version: 4.0.0 + resolution: "resolve-from@npm:4.0.0" + checksum: 10/91eb76ce83621eea7bbdd9b55121a5c1c4a39e54a9ce04a9ad4517f102f8b5131c2cf07622c738a6683991bf54f2ce178f5a42803ecbd527ddc5105f362cc9e3 + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e + languageName: node + linkType: hard + +"resolve.exports@npm:^2.0.3": + version: 2.0.3 + resolution: "resolve.exports@npm:2.0.3" + checksum: 10/536efee0f30a10fac8604e6cdc7844dbc3f4313568d09f06db4f7ed8a5b8aeb8585966fe975083d1f2dfbc87cf5f8bc7ab65a5c23385c14acbb535ca79f8398a + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.1.0 + resolution: "reusify@npm:1.1.0" + checksum: 10/af47851b547e8a8dc89af144fceee17b80d5beaf5e6f57ed086432d79943434ff67ca526e92275be6f54b6189f6920a24eace75c2657eed32d02c400312b21ec + languageName: node + linkType: hard + +"rollup-plugin-license@npm:3.6.0": + version: 3.6.0 + resolution: "rollup-plugin-license@npm:3.6.0" + dependencies: + commenting: "npm:~1.1.0" + fdir: "npm:^6.4.3" + lodash: "npm:~4.17.21" + magic-string: "npm:~0.30.0" + moment: "npm:~2.30.1" + package-name-regex: "npm:~2.0.6" + spdx-expression-validate: "npm:~2.0.0" + spdx-satisfies: "npm:~5.0.1" + peerDependencies: + rollup: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + checksum: 10/0aa7a86f9f453435bafb9db5d0dbc4d5b159e5bb9774202e7a0b879daa8f42b7ba68185379c07454460e23dea514604a31d775572070d2ee86da12b1e2571e19 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10/cb4f97ad25a75ebc11a8ef4e33bb962f8af8516bb2001082ceabd8902e15b98f4b84b4f8a9b222e5d57fc3bd1379c483886ed4619367a7680dad65316993021d + languageName: node + linkType: hard + +"safe-buffer@npm:^5.1.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + +"scslre@npm:^0.3.0": + version: 0.3.0 + resolution: "scslre@npm:0.3.0" + dependencies: + "@eslint-community/regexpp": "npm:^4.8.0" + refa: "npm:^0.12.0" + regexp-ast-analysis: "npm:^0.7.0" + checksum: 10/164ec9b9a9d819838240b1df613b6c60ae00c69c4472264f354a191f73b538c064d43c0ac3accf89f5c05880ddab33846077b0cda3ad383701623d468960c005 + languageName: node + linkType: hard + +"sdbm@npm:2.0.0": + version: 2.0.0 + resolution: "sdbm@npm:2.0.0" + checksum: 10/1a07754d5ae809230e865f54afc82c774188781c591bd19412d1f4095e43ea158e0791cb0cf66be5063d230439c67df38db56bcfebc1bfb9833dd3be604bb3fc + languageName: node + linkType: hard + +"search-closest@npm:1.1.0": + version: 1.1.0 + resolution: "search-closest@npm:1.1.0" + dependencies: + find-in-directory: "npm:^3.0.0" + iterate-directory-up: "npm:^1.4.0" + checksum: 10/41d2118be5dab2715efeb8150fbd1f0e400dfe1f37e882a159f9dfa1d95ffcbf1937019a77f32f68679d52f19efd4a46625f8c361fd03488bec5f85abe9fc9da + languageName: node + linkType: hard + +"semver-compare@npm:^1.0.0": + version: 1.0.0 + resolution: "semver-compare@npm:1.0.0" + checksum: 10/75f9c7a7786d1756f64b1429017746721e07bd7691bdad6368f7643885d3a98a27586777e9699456564f4844b407e9f186cc1d588a3f9c0be71310e517e942c3 + languageName: node + linkType: hard + +"semver@npm:7.7.2, semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.1, semver@npm:^7.7.2": + version: 7.7.2 + resolution: "semver@npm:7.7.2" + bin: + semver: bin/semver.js + checksum: 10/7a24cffcaa13f53c09ce55e05efe25cd41328730b2308678624f8b9f5fc3093fc4d189f47950f0b811ff8f3c3039c24a2c36717ba7961615c682045bf03e1dda + languageName: node + linkType: hard + +"semver@npm:^5.6.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + +"semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/445a420a6fa2eaee4b70cbd884d538e259ab278200a2ededd73253ada17d5d48e91fb1f4cd224a236ab62ea7ba0a70c6af29fc93b4f3d3078bf7da1c031fde58 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"shell-quote@npm:^1.7.3": + version: 1.8.2 + resolution: "shell-quote@npm:1.8.2" + checksum: 10/3ae4804fd80a12ba07650d0262804ae3b479a62a6b6971a6dc5fa12995507aa63d3de3e6a8b7a8d18f4ce6eb118b7d75db7fcb2c0acbf016f210f746b10cfe02 + languageName: node + linkType: hard + +"sigmund@npm:^1.0.1": + version: 1.0.1 + resolution: "sigmund@npm:1.0.1" + checksum: 10/5c199a9f7b24483bec8289dcaf72a0280382fc6ece47a19ddb3c8599b2f9126d4e113710a69fba2c70e22a7f2eadcd8adefb142700164ef19699f4ea1c02cbaa + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + +"simple-html-tokenizer@npm:^0.5.11": + version: 0.5.11 + resolution: "simple-html-tokenizer@npm:0.5.11" + checksum: 10/f8ef451617496b32e5cd5c1812197d9e8e8a07a33971d15fab23fb000c2037027ce297b48714d5c29f9be9ddb8253e554dbd948934be93706154678ee1c68d45 + languageName: node + linkType: hard + +"slash@npm:^3.0.0": + version: 3.0.0 + resolution: "slash@npm:3.0.0" + checksum: 10/94a93fff615f25a999ad4b83c9d5e257a7280c90a32a7cb8b4a87996e4babf322e469c42b7f649fd5796edd8687652f3fb452a86dc97a816f01113183393f11c + languageName: node + linkType: hard + +"slash@npm:^5.0.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 10/2c41ec6fb1414cd9bba0fa6b1dd00e8be739e3fe85d079c69d4b09ca5f2f86eafd18d9ce611c0c0f686428638a36c272a6ac14799146a8295f259c10cc45cde4 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + +"smol-toml@npm:1.3.4, smol-toml@npm:^1.3.4": + version: 1.3.4 + resolution: "smol-toml@npm:1.3.4" + checksum: 10/795db36448db6b353ea1171fad8b72ae2fea3b5f9aa48d2f4c79699e10bdca74d59202f6715ff738fae817bf1f80e0c38c4d3ddf8b812cac26cc6255eaa0caa2 + languageName: node + linkType: hard + +"snapshot-diff@npm:0.10.0": + version: 0.10.0 + resolution: "snapshot-diff@npm:0.10.0" + dependencies: + jest-diff: "npm:^29.0.0" + jest-snapshot: "npm:^29.0.0" + pretty-format: "npm:^29.0.0" + peerDependencies: + jest: ">=16" + checksum: 10/056b0e5861c52d6cc52fe595c4673af56dfb30856eb337b23977250528c405ec2f67f671cc6b1679aacb7e6ea87923cce0640bf9b9f93915aa70b7a5d0ea4864 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.5 + resolution: "socks-proxy-agent@npm:8.0.5" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10/ee99e1dacab0985b52cbe5a75640be6e604135e9489ebdc3048635d186012fbaecc20fbbe04b177dee434c319ba20f09b3e7dfefb7d932466c0d707744eac05c + languageName: node + linkType: hard + +"socks@npm:^2.8.3": + version: 2.8.4 + resolution: "socks@npm:2.8.4" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ab3af97aeb162f32c80e176c717ccf16a11a6ebb4656a62b94c0f96495ea2a1f4a8206c04b54438558485d83d0c5f61920c07a1a5d3963892a589b40cc6107dd + languageName: node + linkType: hard + +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10/ff9d8c8bf096d534a5b7707e0382ef827b4dd360a577d3f34d2b9f48e12c9d230b5747974ee7c607f0df65113732711bb701fe9ece3c7edbd43cb2294d707df3 + languageName: node + linkType: hard + +"source-map-support@npm:0.5.13": + version: 0.5.13 + resolution: "source-map-support@npm:0.5.13" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/d1514a922ac9c7e4786037eeff6c3322f461cd25da34bb9fefb15387b3490531774e6e31d95ab6d5b84a3e139af9c3a570ccaee6b47bd7ea262691ed3a8bc34e + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"spdx-compare@npm:^1.0.0": + version: 1.0.0 + resolution: "spdx-compare@npm:1.0.0" + dependencies: + array-find-index: "npm:^1.0.2" + spdx-expression-parse: "npm:^3.0.0" + spdx-ranges: "npm:^2.0.0" + checksum: 10/7d8b55b31163ba8e7abeaf69d8d7accba5aee324dd55e22a796a685ec4d5e3c3cbc2683b9a2edff5543ee6f6242f4ec22c15dc2e493eb807690fb65e1051e5eb + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10/bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10/a1c6e104a2cbada7a593eaa9f430bd5e148ef5290d4c0409899855ce8b1c39652bcc88a725259491a82601159d6dc790bedefc9016c7472f7de8de7361f8ccde + languageName: node + linkType: hard + +"spdx-expression-validate@npm:~2.0.0": + version: 2.0.0 + resolution: "spdx-expression-validate@npm:2.0.0" + dependencies: + spdx-expression-parse: "npm:^3.0.0" + checksum: 10/c100f949afeb529b3b519a70b86d64c3c35be8bf1ef30db32e48936f0c52a0339b3c88c283c97c55f372ea3c347165c9360aae7905cd8f303b817cfef49032c1 + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.21 + resolution: "spdx-license-ids@npm:3.0.21" + checksum: 10/17a033b4c3485f081fc9faa1729dde8782a85d9131b156f2397c71256c2e1663132857d3cba1457c4965f179a4dcf1b69458a31e9d3d0c766d057ef0e3a0b4f2 + languageName: node + linkType: hard + +"spdx-ranges@npm:^2.0.0": + version: 2.1.1 + resolution: "spdx-ranges@npm:2.1.1" + checksum: 10/f807bd915aa2975bcebd9c4b4805661f248efcd4953ee62557626452fcd2933183f5b1a307d65507d8be6b9519b4e46dce05b61db0fbd5fce253b8f6d69bbbad + languageName: node + linkType: hard + +"spdx-satisfies@npm:~5.0.1": + version: 5.0.1 + resolution: "spdx-satisfies@npm:5.0.1" + dependencies: + spdx-compare: "npm:^1.0.0" + spdx-expression-parse: "npm:^3.0.0" + spdx-ranges: "npm:^2.0.0" + checksum: 10/7f28a6ac492afbfc4794602b5d43957451b7afdd42506dc52dbeeed875d9b5f5b94f8f3deab1da4e2815111f57f916d135c7bd24f40245be6dab5dda09d41e91 + languageName: node + linkType: hard + +"specialist@npm:^1.4.5": + version: 1.4.5 + resolution: "specialist@npm:1.4.5" + dependencies: + tiny-bin: "npm:^1.10.3" + tiny-colors: "npm:^2.2.2" + tiny-parse-argv: "npm:^2.8.1" + tiny-updater: "npm:^3.5.3" + checksum: 10/cc2154f3f22907a570deea7d40b13f414100cafdbf83baad24dddaeb2031ba707597842ffbfbe6aac90e5178a173e2cd6dc83a552a3691bb92b110a0455e0e92 + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + +"ssri@npm:^12.0.0": + version: 12.0.0 + resolution: "ssri@npm:12.0.0" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/7024c1a6e39b3f18aa8f1c8290e884fe91b0f9ca5a6c6d410544daad54de0ba664db879afe16412e187c6c292fd60b937f047ee44292e5c2af2dcc6d8e1a9b48 + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.3, stack-utils@npm:^2.0.6": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: "npm:^2.0.0" + checksum: 10/cdc988acbc99075b4b036ac6014e5f1e9afa7e564482b687da6384eee6a1909d7eaffde85b0a17ffbe186c5247faf6c2b7544e802109f63b72c7be69b13151bb + languageName: node + linkType: hard + +"state-toggle@npm:^1.0.0": + version: 1.0.3 + resolution: "state-toggle@npm:1.0.3" + checksum: 10/17398af928413e8d8b866cf0c81fd1b1348bb7d65d8983126ff6ff2317a80d6ee023484fba0c54d8169f5aa544f125434a650ae3a71eddc935cae307d4692b4f + languageName: node + linkType: hard + +"stdin-blocker@npm:^2.0.1": + version: 2.0.1 + resolution: "stdin-blocker@npm:2.0.1" + checksum: 10/a318d419eb67b4af2dd7ec21a2995c746225de723ddebe66d12b8a8d1e68d475410dd413321274b9439b5ff5794207da97e2e92bbbc3c96d4d0863cc7bbb690b + languageName: node + linkType: hard + +"string-escape-regex@npm:^1.0.0": + version: 1.0.1 + resolution: "string-escape-regex@npm:1.0.1" + checksum: 10/183adf4e5ccd4eae90c7381158a37db773cd08a63d16b181e313338b5c3395395f8fe356bcc4b0ec2682007f9ee14d7335847e3cfb2b9a493195b209b9b0f292 + languageName: node + linkType: hard + +"string-length@npm:^4.0.2": + version: 4.0.2 + resolution: "string-length@npm:4.0.2" + dependencies: + char-regex: "npm:^1.0.2" + strip-ansi: "npm:^6.0.0" + checksum: 10/ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 + languageName: node + linkType: hard + +"string-length@npm:^6.0.0": + version: 6.0.0 + resolution: "string-length@npm:6.0.0" + dependencies: + strip-ansi: "npm:^7.1.0" + checksum: 10/b171e9e193ec292ad71f8b2a36e20478bf1bac8cd5beec062fb126942d627dfd9311959e271e9ab7b0a383d16b85b9e25a183d15786e30f22104d152e7627f99 + languageName: node + linkType: hard + +"string-ts@npm:^2.2.1": + version: 2.2.1 + resolution: "string-ts@npm:2.2.1" + checksum: 10/08fd90ff78ee6f0c3a4cb394bcaf0b11571d1191a7489bd7117983a3b0d99c070f35ee7a52427685afdcec8174e25715af5dde99f08cdfe81b2791c7dcdc0d1b + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"strip-ansi@npm:5.2.0": + version: 5.2.0 + resolution: "strip-ansi@npm:5.2.0" + dependencies: + ansi-regex: "npm:^4.1.0" + checksum: 10/bdb5f76ade97062bd88e7723aa019adbfacdcba42223b19ccb528ffb9fb0b89a5be442c663c4a3fb25268eaa3f6ea19c7c3fbae830bd1562d55adccae1fcec46 + languageName: node + linkType: hard + +"strip-ansi@npm:7.1.0, strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-final-newline@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-final-newline@npm:2.0.0" + checksum: 10/69412b5e25731e1938184b5d489c32e340605bb611d6140344abc3421b7f3c6f9984b21dff296dfcf056681b82caa3bb4cc996a965ce37bcfad663e92eae9c64 + languageName: node + linkType: hard + +"strip-indent@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-indent@npm:4.0.0" + dependencies: + min-indent: "npm:^1.0.1" + checksum: 10/06cbcd93da721c46bc13caeb1c00af93a9b18146a1c95927672d2decab6a25ad83662772417cea9317a2507fb143253ecc23c4415b64f5828cef9b638a744598 + languageName: node + linkType: hard + +"strip-json-comments@npm:5.0.2": + version: 5.0.2 + resolution: "strip-json-comments@npm:5.0.2" + checksum: 10/986064b73898edc77113cd6147b32f36e299869f3675ed81c3166492a6d8f02d918a492604d1982dab40ca727a86969cb91aa44d6632626f8d7c3c6ead1216bb + languageName: node + linkType: hard + +"strip-json-comments@npm:^3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"stubborn-fs@npm:^1.2.5": + version: 1.2.5 + resolution: "stubborn-fs@npm:1.2.5" + checksum: 10/bd811a7a33f6c7aa2656f41167affd033c8d686eccdd998e8b3b53c0bce0dc78b0e03af97b7fe426196825cd5bc0c649cc3bcc7ef4675b770f3ba47c67463a2e + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"supports-color@npm:^9.2.1": + version: 9.4.0 + resolution: "supports-color@npm:9.4.0" + checksum: 10/cb8ff8daeaf1db642156f69a9aa545b6c01dd9c4def4f90a49f46cbf24be0c245d392fcf37acd119cd1819b99dad2cc9b7e3260813f64bcfd7f5b18b5a1eefb8 + languageName: node + linkType: hard + +"synckit@npm:^0.11.8": + version: 0.11.8 + resolution: "synckit@npm:0.11.8" + dependencies: + "@pkgr/core": "npm:^0.2.4" + checksum: 10/9bb2cf11edaf31ba781f1c719dd58087323201bda6392254538aef4dea216aa02a32e25f06643bcfa1c1a2c95e0d84186d82cfb66f9a0ab3a2be4816c696a8a3 + languageName: node + linkType: hard + +"tapable@npm:^2.2.0": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a + languageName: node + linkType: hard + +"tar@npm:^7.4.3": + version: 7.4.3 + resolution: "tar@npm:7.4.3" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.0.1" + mkdirp: "npm:^3.0.1" + yallist: "npm:^5.0.0" + checksum: 10/12a2a4fc6dee23e07cc47f1aeb3a14a1afd3f16397e1350036a8f4cdfee8dcac7ef5978337a4e7b2ac2c27a9a6d46388fc2088ea7c80cb6878c814b1425f8ecf + languageName: node + linkType: hard + +"temp-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "temp-dir@npm:3.0.0" + checksum: 10/577211e995d1d584dd60f1469351d45e8a5b4524e4a9e42d3bdd12cfde1d0bb8f5898311bef24e02aaafb69514c1feb58c7b4c33dcec7129da3b0861a4ca935b + languageName: node + linkType: hard + +"tempy@npm:3.1.0": + version: 3.1.0 + resolution: "tempy@npm:3.1.0" + dependencies: + is-stream: "npm:^3.0.0" + temp-dir: "npm:^3.0.0" + type-fest: "npm:^2.12.2" + unique-string: "npm:^3.0.0" + checksum: 10/f5540bc24dcd9d41ab0b31e9eed73c3ef825080f1c8b1e854e4b73059155c889f72f5f7c15e8cd462d59aa10c9726e423c81d6a365d614b538c6cc78a1209cc6 + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + +"test-exclude@npm:^7.0.1": + version: 7.0.1 + resolution: "test-exclude@npm:7.0.1" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^10.4.1" + minimatch: "npm:^9.0.4" + checksum: 10/e6f6f4e1df2e7810e082e8d7dfc53be51a931e6e87925f5e1c2ef92cc1165246ba3bf2dae6b5d86251c16925683dba906bd41e40169ebc77120a2d1b5a0dbbe0 + languageName: node + linkType: hard + +"text-table@npm:0.2.0": + version: 0.2.0 + resolution: "text-table@npm:0.2.0" + checksum: 10/4383b5baaeffa9bb4cda2ac33a4aa2e6d1f8aaf811848bf73513a9b88fd76372dc461f6fd6d2e9cb5100f48b473be32c6f95bd983509b7d92bb4d92c10747452 + languageName: node + linkType: hard + +"tiny-bin@npm:^1.10.3": + version: 1.11.1 + resolution: "tiny-bin@npm:1.11.1" + dependencies: + ansi-purge: "npm:^1.0.1" + fast-string-width: "npm:^1.1.0" + get-current-package: "npm:^1.0.1" + tiny-colors: "npm:^2.2.2" + tiny-levenshtein: "npm:^1.0.1" + tiny-parse-argv: "npm:^2.8.2" + tiny-updater: "npm:^3.5.3" + checksum: 10/064b3fd325e06e49633f89fc7376dc89f6708f4831a9e3e20c447a76ce06760765ce80c2c91551f87baada1eb65c9d9706adf0a8643626fa85b00a811d7f5a3e + languageName: node + linkType: hard + +"tiny-colors@npm:^2.2.2": + version: 2.2.2 + resolution: "tiny-colors@npm:2.2.2" + checksum: 10/6804257b50ece54639b25b6e142836e363cd1630fcc10ac4113bcaef465be6426f010b82df7a060d0ab10d90eba57f479479db6de40d4f39d9bcade8a5f1d36e + languageName: node + linkType: hard + +"tiny-cursor@npm:^2.0.1": + version: 2.0.1 + resolution: "tiny-cursor@npm:2.0.1" + dependencies: + when-exit: "npm:^2.1.4" + checksum: 10/3225326e0501502c19e93fc61ca0020b0010a9891eaf3b6ab50a1b949894c95379079312b0874dccf4ced09722180f31d3f49adcbff0f720d6c2c1c0da4befc3 + languageName: node + linkType: hard + +"tiny-editorconfig@npm:^1.0.0": + version: 1.0.0 + resolution: "tiny-editorconfig@npm:1.0.0" + dependencies: + ini-simple-parser: "npm:^1.0.0" + zeptomatch: "npm:^1.1.3" + checksum: 10/9e46fc34d0694c36a340f536c82a7d59597f61397d5e71f87b9956b5a729b7c941b2fbd3fe65da65b9d596a36fa4a327a03e1c9bef63af51b76a255f84f794a6 + languageName: node + linkType: hard + +"tiny-levenshtein@npm:^1.0.1": + version: 1.0.1 + resolution: "tiny-levenshtein@npm:1.0.1" + checksum: 10/179d18bebc973b6d4b0415c9fcfca049b98279a2b74255a352d7de53cc6e7c52ad4e90caabc7f84c6c0ffbfded39fe8f8c011964e3ec6a101a7237b1eb08ec1e + languageName: node + linkType: hard + +"tiny-parse-argv@npm:^2.8.1, tiny-parse-argv@npm:^2.8.2": + version: 2.8.2 + resolution: "tiny-parse-argv@npm:2.8.2" + checksum: 10/b4499c3efe7541027b05c09977f43c6c25ccdba627497fc3b4c88c1cf5120ab3cb133e7cdedab842f2f12a358c2c82f18d4d1cdeae192c3c41bf89dc29c8b9b7 + languageName: node + linkType: hard + +"tiny-readdir-glob@npm:^1.23.2": + version: 1.23.2 + resolution: "tiny-readdir-glob@npm:1.23.2" + dependencies: + tiny-readdir: "npm:^2.7.0" + zeptomatch: "npm:^2.0.1" + zeptomatch-explode: "npm:^1.0.1" + zeptomatch-is-static: "npm:^1.0.1" + zeptomatch-unescape: "npm:^1.0.1" + checksum: 10/ebc0cfcbb08ef8dc137eb83569410ab809d815921b3c7fe9534956a89e5e80962435b8c034d21399bb856fd95e7cbbe9d10ebaccbd1b89f26516753e12501c76 + languageName: node + linkType: hard + +"tiny-readdir@npm:^2.7.0, tiny-readdir@npm:^2.7.4": + version: 2.7.4 + resolution: "tiny-readdir@npm:2.7.4" + dependencies: + promise-make-counter: "npm:^1.0.2" + checksum: 10/58b6614eed26ffedb806750973102e672caae00d9c255cef46d18c8d453ada3af8bdf039721dfa5a4237be8f1ba57fcfa193ff35d5605e9205d1e4e88f53374a + languageName: node + linkType: hard + +"tiny-spinner@npm:^2.0.5": + version: 2.0.5 + resolution: "tiny-spinner@npm:2.0.5" + dependencies: + stdin-blocker: "npm:^2.0.1" + tiny-colors: "npm:^2.2.2" + tiny-cursor: "npm:^2.0.1" + tiny-truncate: "npm:^1.0.3" + checksum: 10/d50257356a3c538334dfdb53bcccba7cb277c60d26c0a4e587e5dd63e78413d9c039906f3237911817ef60878eab891be2f01446fd71aa6f7882e7638b80e69b + languageName: node + linkType: hard + +"tiny-truncate@npm:^1.0.3": + version: 1.0.3 + resolution: "tiny-truncate@npm:1.0.3" + dependencies: + ansi-truncate: "npm:^1.2.0" + checksum: 10/fa494ab5a4efa27a2cf3dd73dd462318bdaf2e3f96552110f3ff1d40b47f168aba2da76b1d0b8869b78d7ad7fda9768d0e8d4bcf4e4553781da8eba7eb6434ca + languageName: node + linkType: hard + +"tiny-updater@npm:^3.5.3": + version: 3.5.3 + resolution: "tiny-updater@npm:3.5.3" + dependencies: + ionstore: "npm:^1.0.1" + tiny-colors: "npm:^2.2.2" + when-exit: "npm:^2.1.4" + checksum: 10/32bd130d776f8a61b71d5041192b00d9d654bbb365272d13cb6d82f95a703e3ac834cdfe2f8692c605316770eb451df03fa4389aed4c7cc1b8325d7d58bb1e17 + languageName: node + linkType: hard + +"tinybench@npm:4.0.1": + version: 4.0.1 + resolution: "tinybench@npm:4.0.1" + checksum: 10/d20873cc975fad29c5afe4596dd808b26dd8a5637ddfff89fd5b6b8bf99e50ae1a4c4b2e242990565f094baf7adbfb1bfe0c687f01376b8b0c5c2ba579b7cfa0 + languageName: node + linkType: hard + +"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.14": + version: 0.2.14 + resolution: "tinyglobby@npm:0.2.14" + dependencies: + fdir: "npm:^6.4.4" + picomatch: "npm:^4.0.2" + checksum: 10/3d306d319718b7cc9d79fb3f29d8655237aa6a1f280860a217f93417039d0614891aee6fc47c5db315f4fcc6ac8d55eb8e23e2de73b2c51a431b42456d9e5764 + languageName: node + linkType: hard + +"tinypool@npm:0.8.4": + version: 0.8.4 + resolution: "tinypool@npm:0.8.4" + checksum: 10/7365944c2532f240111443e7012be31a634faf1a02db08a91db3aa07361c26a374d0be00a0f2ea052c4bee39c107ba67f1f814c108d9d51dfc725c559c1a9c03 + languageName: node + linkType: hard + +"tmpl@npm:1.0.5": + version: 1.0.5 + resolution: "tmpl@npm:1.0.5" + checksum: 10/cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 + languageName: node + linkType: hard + +"to-fast-properties@npm:4.0.0": + version: 4.0.0 + resolution: "to-fast-properties@npm:4.0.0" + checksum: 10/c72297bdd126a7e7ffe9cc6230eee60182f0439a7abb19d281e73137880d87d12fc971a47ff4bd1e0dc68e17262344fbf98499400ff5e341db431715c3620346 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + +"trim-newlines@npm:5.0.0": + version: 5.0.0 + resolution: "trim-newlines@npm:5.0.0" + checksum: 10/028a42134d05f732808da53c9613091392cd8a345b38d481fa202dba35a5806b0bbdeaffa8a256b772efb03b7f22cdaa49883421d49c730c5b80d9acf0a65ecd + languageName: node + linkType: hard + +"trim-trailing-lines@npm:^1.0.0": + version: 1.1.4 + resolution: "trim-trailing-lines@npm:1.1.4" + checksum: 10/5d39d21c0d4b258667012fcd784f73129e148ea1c213b1851d8904f80499fc91df6710c94c7dd49a486a32da2b9cb86020dda79f285a9a2586cfa622f80490c2 + languageName: node + linkType: hard + +"trim@npm:1.0.1": + version: 1.0.1 + resolution: "trim@npm:1.0.1" + checksum: 10/d7593f72edc1738218e94deeff54a9b81cb52b6448ef8a4d20015bd4581dadc3a636553fb06b1ab36d14e3803fd3138bd2b6da555de926abed33b0ae24f92879 + languageName: node + linkType: hard + +"trough@npm:^1.0.0": + version: 1.0.5 + resolution: "trough@npm:1.0.5" + checksum: 10/2209753fda70516f990c33f5d573361ccd896f81aaee0378ef6dae5c753b724d75a70b40a741e55edc188db51cfd9cd753ee1a3382687b17f04348860405d6b2 + languageName: node + linkType: hard + +"ts-api-utils@npm:^2.0.0, ts-api-utils@npm:^2.1.0": + version: 2.1.0 + resolution: "ts-api-utils@npm:2.1.0" + peerDependencies: + typescript: ">=4.8.4" + checksum: 10/02e55b49d9617c6eebf8aadfa08d3ca03ca0cd2f0586ad34117fdfc7aa3cd25d95051843fde9df86665ad907f99baed179e7a117b11021417f379e4d2614eacd + languageName: node + linkType: hard + +"ts-declaration-location@npm:^1.0.4, ts-declaration-location@npm:^1.0.6": + version: 1.0.7 + resolution: "ts-declaration-location@npm:1.0.7" + dependencies: + picomatch: "npm:^4.0.2" + peerDependencies: + typescript: ">=4.0.0" + checksum: 10/a7932fc75d41f10c16089f8f5a5c1ea49d6afca30f09c91c1df14d0a8510f72bcb9f8a395c04f060b66b855b6bd7ea4df81b335fb9d21bef402969a672a4afa7 + languageName: node + linkType: hard + +"ts-expect@npm:1.3.0": + version: 1.3.0 + resolution: "ts-expect@npm:1.3.0" + checksum: 10/3f33ba17f9cdad550e9b12a23d78b19836d4fd5741da590c25426ea31ceb8f1765feeeeef2c529bab3e2350b5f9ce5fbbb207012db2c7c4b4b116d1b7fed7ec5 + languageName: node + linkType: hard + +"ts-pattern@npm:^5.7.1": + version: 5.7.1 + resolution: "ts-pattern@npm:5.7.1" + checksum: 10/010ea63fed84c4961fc8ff45cd65f58f2aec8063953fd32f825ff322c4dff83cd1f7192fd11e3095b0cd48bd6fac0eca4077881e4239775a86955e702b235a49 + languageName: node + linkType: hard + +"tslib@npm:^2.3.0, tslib@npm:^2.4.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 + languageName: node + linkType: hard + +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" + dependencies: + prelude-ls: "npm:^1.2.1" + checksum: 10/14687776479d048e3c1dbfe58a2409e00367810d6960c0f619b33793271ff2a27f81b52461f14a162f1f89a9b1d8da1b237fc7c99b0e1fdcec28ec63a86b1fec + languageName: node + linkType: hard + +"type-detect@npm:4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: 10/f4254070d9c3d83a6e573bcb95173008d73474ceadbbf620dd32d273940ca18734dff39c2b2480282df9afe5d1675ebed5499a00d791758748ea81f61a38961f + languageName: node + linkType: hard + +"type-fest@npm:^1.0.1": + version: 1.4.0 + resolution: "type-fest@npm:1.4.0" + checksum: 10/89875c247564601c2650bacad5ff80b859007fbdb6c9e43713ae3ffa3f584552eea60f33711dd762e16496a1ab4debd409822627be14097d9a17e39c49db591a + languageName: node + linkType: hard + +"type-fest@npm:^2.12.2": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: 10/7bf9e8fdf34f92c8bb364c0af14ca875fac7e0183f2985498b77be129dc1b3b1ad0a6b3281580f19e48c6105c037fb966ad9934520c69c6434d17fd0af4eed78 + languageName: node + linkType: hard + +"type-fest@npm:^4.35.0, type-fest@npm:^4.39.1": + version: 4.41.0 + resolution: "type-fest@npm:4.41.0" + checksum: 10/617ace794ac0893c2986912d28b3065ad1afb484cad59297835a0807dc63286c39e8675d65f7de08fafa339afcb8fe06a36e9a188b9857756ae1e92ee8bda212 + languageName: node + linkType: hard + +"typescript@npm:5.8.3": + version: 5.8.3 + resolution: "typescript@npm:5.8.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/65c40944c51b513b0172c6710ee62e951b70af6f75d5a5da745cb7fab132c09ae27ffdf7838996e3ed603bb015dadd099006658046941bd0ba30340cc563ae92 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>": + version: 5.8.3 + resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>::version=5.8.3&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/b9b1e73dabac5dc730c041325dbd9c99467c1b0d239f1b74ec3b90d831384af3e2ba973946232df670519147eb51a2c20f6f96163cea2b359f03de1e2091cc4f + languageName: node + linkType: hard + +"ufo@npm:^1.5.4": + version: 1.6.1 + resolution: "ufo@npm:1.6.1" + checksum: 10/088a68133b93af183b093e5a8730a40fe7fd675d3dc0656ea7512f180af45c92300c294f14d4d46d4b2b553e3e52d3b13d4856b9885e620e7001edf85531234e + languageName: node + linkType: hard + +"undici-types@npm:~6.21.0": + version: 6.21.0 + resolution: "undici-types@npm:6.21.0" + checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14 + languageName: node + linkType: hard + +"unherit@npm:^1.0.4": + version: 1.1.3 + resolution: "unherit@npm:1.1.3" + dependencies: + inherits: "npm:^2.0.0" + xtend: "npm:^4.0.0" + checksum: 10/fd7922f84fc0bfb7c4df6d1f5a50b5b94a0218e3cda98a54dbbd209226ddd4072d742d3df44d0e295ab08d5ccfd304a1e193dfe31a86d2a91b7cb9fdac093194 + languageName: node + linkType: hard + +"unicode-regex@npm:4.1.2, unicode-regex@npm:^4.1.0": + version: 4.1.2 + resolution: "unicode-regex@npm:4.1.2" + dependencies: + regexp-util: "npm:^2.0.1" + checksum: 10/c2611ab760cd6a76ab775edc47a7d68827a413fd9057f501ea051015f2573322699242b15db83199c28cdabe16428e97927ec874c2567f3bb1065d209ee74e7d + languageName: node + linkType: hard + +"unified@npm:9.2.2": + version: 9.2.2 + resolution: "unified@npm:9.2.2" + dependencies: + bail: "npm:^1.0.0" + extend: "npm:^3.0.0" + is-buffer: "npm:^2.0.0" + is-plain-obj: "npm:^2.0.0" + trough: "npm:^1.0.0" + vfile: "npm:^4.0.0" + checksum: 10/871bb5fb0c2de4b16353734563075729f6782dffa58ddc80ff6c84750b8a1cd27d597685bfaf4dafe697b6a6433437e56b46999e7b6c9aa800ce64cb0797eb09 + languageName: node + linkType: hard + +"uniq@npm:^1.0.1": + version: 1.0.1 + resolution: "uniq@npm:1.0.1" + checksum: 10/8206535f83745ea83f9da7035f3b983fd6ed5e35b8ed7745441944e4065b616bc67cf0d0a23a86b40ee0074426f0607f0a138f9b78e124eb6a7a6a6966055709 + languageName: node + linkType: hard + +"unique-filename@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-filename@npm:4.0.0" + dependencies: + unique-slug: "npm:^5.0.0" + checksum: 10/6a62094fcac286b9ec39edbd1f8f64ff92383baa430af303dfed1ffda5e47a08a6b316408554abfddd9730c78b6106bef4ca4d02c1231a735ddd56ced77573df + languageName: node + linkType: hard + +"unique-slug@npm:^5.0.0": + version: 5.0.0 + resolution: "unique-slug@npm:5.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/beafdf3d6f44990e0a5ce560f8f881b4ee811be70b6ba0db25298c31c8cf525ed963572b48cd03be1c1349084f9e339be4241666d7cf1ebdad20598d3c652b27 + languageName: node + linkType: hard + +"unique-string@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-string@npm:3.0.0" + dependencies: + crypto-random-string: "npm:^4.0.0" + checksum: 10/1a1e2e7d02eab1bb10f720475da735e1990c8a5ff34edd1a3b6bc31590cb4210b7a1233d779360cc622ce11c211e43afa1628dd658f35d3e6a89964b622940df + languageName: node + linkType: hard + +"unist-util-is@npm:^4.0.0": + version: 4.1.0 + resolution: "unist-util-is@npm:4.1.0" + checksum: 10/c046cc87c0a4f797b2afce76d917218e6a9af946a56cb5a88cb7f82be34f16c11050a10ddc4c66a3297dbb2782ca7d72a358cd77900b439ea9c683ba003ffe90 + languageName: node + linkType: hard + +"unist-util-remove-position@npm:^2.0.0": + version: 2.0.1 + resolution: "unist-util-remove-position@npm:2.0.1" + dependencies: + unist-util-visit: "npm:^2.0.0" + checksum: 10/b58f3e6e8e8e27f2c371620f09d4d29a291fd77737957fc02e42b011bd7bfca3806795625c6b531d69048ff9b3c175d8d80e6e6698bad0002c9fe4ffa7ca8c5e + languageName: node + linkType: hard + +"unist-util-stringify-position@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-stringify-position@npm:2.0.3" + dependencies: + "@types/unist": "npm:^2.0.2" + checksum: 10/affbfd151f0df055ce0dddf443fc41353ab3870cdba6b3805865bd6a41ce22d9d8e65be0ed8839a8731d05b61421d2df9fd8c35b67adf86040bf4b1f8a04a42c + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^3.0.0": + version: 3.1.1 + resolution: "unist-util-visit-parents@npm:3.1.1" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-is: "npm:^4.0.0" + checksum: 10/1b18343d88a0ad9cafaf8164ff8a1d3e3903328b3936b1565d61731f0b5778b9b9f400c455d3ad5284eeebcfdd7558ce24eb15c303a9cc0bd9218d01b2116923 + languageName: node + linkType: hard + +"unist-util-visit@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-visit@npm:2.0.3" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-is: "npm:^4.0.0" + unist-util-visit-parents: "npm:^3.0.0" + checksum: 10/1fe19d500e212128f96d8c3cfa3312846e586b797748a1fd195fe6479f06bc90a6f6904deb08eefc00dd58e83a1c8a32fb8677252d2273ad7a5e624525b69b8f + languageName: node + linkType: hard + +"unrs-resolver@npm:^1.7.11": + version: 1.7.11 + resolution: "unrs-resolver@npm:1.7.11" + dependencies: + "@unrs/resolver-binding-darwin-arm64": "npm:1.7.11" + "@unrs/resolver-binding-darwin-x64": "npm:1.7.11" + "@unrs/resolver-binding-freebsd-x64": "npm:1.7.11" + "@unrs/resolver-binding-linux-arm-gnueabihf": "npm:1.7.11" + "@unrs/resolver-binding-linux-arm-musleabihf": "npm:1.7.11" + "@unrs/resolver-binding-linux-arm64-gnu": "npm:1.7.11" + "@unrs/resolver-binding-linux-arm64-musl": "npm:1.7.11" + "@unrs/resolver-binding-linux-ppc64-gnu": "npm:1.7.11" + "@unrs/resolver-binding-linux-riscv64-gnu": "npm:1.7.11" + "@unrs/resolver-binding-linux-riscv64-musl": "npm:1.7.11" + "@unrs/resolver-binding-linux-s390x-gnu": "npm:1.7.11" + "@unrs/resolver-binding-linux-x64-gnu": "npm:1.7.11" + "@unrs/resolver-binding-linux-x64-musl": "npm:1.7.11" + "@unrs/resolver-binding-wasm32-wasi": "npm:1.7.11" + "@unrs/resolver-binding-win32-arm64-msvc": "npm:1.7.11" + "@unrs/resolver-binding-win32-ia32-msvc": "npm:1.7.11" + "@unrs/resolver-binding-win32-x64-msvc": "npm:1.7.11" + napi-postinstall: "npm:^0.2.2" + dependenciesMeta: + "@unrs/resolver-binding-darwin-arm64": + optional: true + "@unrs/resolver-binding-darwin-x64": + optional: true + "@unrs/resolver-binding-freebsd-x64": + optional: true + "@unrs/resolver-binding-linux-arm-gnueabihf": + optional: true + "@unrs/resolver-binding-linux-arm-musleabihf": + optional: true + "@unrs/resolver-binding-linux-arm64-gnu": + optional: true + "@unrs/resolver-binding-linux-arm64-musl": + optional: true + "@unrs/resolver-binding-linux-ppc64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-musl": + optional: true + "@unrs/resolver-binding-linux-s390x-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-musl": + optional: true + "@unrs/resolver-binding-wasm32-wasi": + optional: true + "@unrs/resolver-binding-win32-arm64-msvc": + optional: true + "@unrs/resolver-binding-win32-ia32-msvc": + optional: true + "@unrs/resolver-binding-win32-x64-msvc": + optional: true + checksum: 10/9a166442dcaad7083a7402c0eace7e555c20b1d29acc911241a1fb04039cf69d516fd34f1629e37d3c5eb9676d4f7b155d7f3717bc27873467fbea5eda74f865 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.1.3": + version: 1.1.3 + resolution: "update-browserslist-db@npm:1.1.3" + dependencies: + escalade: "npm:^3.2.0" + picocolors: "npm:^1.1.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/87af2776054ffb9194cf95e0201547d041f72ee44ce54b144da110e65ea7ca01379367407ba21de5c9edd52c74d95395366790de67f3eb4cc4afa0fe4424e76f + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + +"url-or-path@npm:2.6.1, url-or-path@npm:^2.6.1": + version: 2.6.1 + resolution: "url-or-path@npm:2.6.1" + checksum: 10/707d340bc72dbaccfaa0a371f8e70816518141ecbfdebddc4d6faf8e5e5afa6f33cb01e4e5701c0e76dc661bd699e00041c3b00f1a3e2fb7a0c4e144c9dd6ace + languageName: node + linkType: hard + +"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": + version: 9.3.0 + resolution: "v8-to-istanbul@npm:9.3.0" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.12" + "@types/istanbul-lib-coverage": "npm:^2.0.1" + convert-source-map: "npm:^2.0.0" + checksum: 10/fb1d70f1176cb9dc46cabbb3fd5c52c8f3e8738b61877b6e7266029aed0870b04140e3f9f4550ac32aebcfe1d0f38b0bac57e1e8fb97d68fec82f2b416148166 + languageName: node + linkType: hard + +"vfile-location@npm:^3.0.0": + version: 3.2.0 + resolution: "vfile-location@npm:3.2.0" + checksum: 10/9bb3df6d0be31b5dd2d8da0170c27b7045c64493a8ba7b6ff7af8596c524fc8896924b8dd85ae12d201eead2709217a0fbc44927b7264f4bbf0aa8027a78be9c + languageName: node + linkType: hard + +"vfile-message@npm:^2.0.0": + version: 2.0.4 + resolution: "vfile-message@npm:2.0.4" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + checksum: 10/fad3d5a3a1b1415f30c6cd433df9971df28032c8cb93f15e7132693ac616e256afe76750d4e4810afece6fff20160f2a7f397c3eac46cf43ade21950a376fe3c + languageName: node + linkType: hard + +"vfile@npm:^4.0.0": + version: 4.2.1 + resolution: "vfile@npm:4.2.1" + dependencies: + "@types/unist": "npm:^2.0.0" + is-buffer: "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + vfile-message: "npm:^2.0.0" + checksum: 10/f0de0b50df77344a6d653e0c2967edf310c154f58627a8a423bc7a67f4041c884a6716af1b60013cae180218bac7eed8244bed74d3267c596d0ebd88801663a5 + languageName: node + linkType: hard + +"vnopts@npm:2.0.2": + version: 2.0.2 + resolution: "vnopts@npm:2.0.2" + dependencies: + leven: "npm:^4.0.0" + picocolors: "npm:^1.1.1" + checksum: 10/aec69bf34f4cbb4cd426641ec30489945e823ba1e2f20d8cffa08ad82f4b05ebc92c20958c3c88b745d0ee2df588aad81cf14825c6fb77776a76a137564256c8 + languageName: node + linkType: hard + +"vscode-languageserver-textdocument@npm:^1.0.12": + version: 1.0.12 + resolution: "vscode-languageserver-textdocument@npm:1.0.12" + checksum: 10/2bc0fde952d40f35a31179623d1491b0fafdee156aaf58557f40f5d394a25fc84826763cdde55fa6ce2ed9cd35a931355ad6dd7fe5db82e7f21e5d865f0af8c6 + languageName: node + linkType: hard + +"vscode-uri@npm:^3.1.0": + version: 3.1.0 + resolution: "vscode-uri@npm:3.1.0" + checksum: 10/80c2a2421f44b64008ef1f91dfa52a2d68105cbb4dcea197dbf5b00c65ccaccf218b615e93ec587f26fc3ba04796898f3631a9406e3b04cda970c3ca8eadf646 + languageName: node + linkType: hard + +"walk-up-path@npm:^4.0.0": + version: 4.0.0 + resolution: "walk-up-path@npm:4.0.0" + checksum: 10/6a230b20e5de296895116dc12b09dafaec1f72b8060c089533d296e241aff059dfaebe0d015c77467f857e4b40c78e08f7481add76f340233a1f34fa8af9ed63 + languageName: node + linkType: hard + +"walker@npm:^1.0.8": + version: 1.0.8 + resolution: "walker@npm:1.0.8" + dependencies: + makeerror: "npm:1.0.12" + checksum: 10/ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c + languageName: node + linkType: hard + +"wcwidth.js@npm:2.0.0": + version: 2.0.0 + resolution: "wcwidth.js@npm:2.0.0" + checksum: 10/b70e308a729f4c820ff2f37bd03de9ef171eeba5e528e290642f1d103949da0f61ba51452a2865802f28ca0435381c7b17f6a9fe02509a2468d15341a6970b5b + languageName: node + linkType: hard + +"webworker-shim@npm:^1.1.4": + version: 1.1.4 + resolution: "webworker-shim@npm:1.1.4" + checksum: 10/de931e66bab9bb7be2a242fb12e17ce071713c91ce97e3bc93cca545b16ec54ffd30d5df6bae14e683b008e46643893e4ad46984f25f033ae91fe55ca63c83c7 + languageName: node + linkType: hard + +"when-exit@npm:^2.1.1, when-exit@npm:^2.1.4": + version: 2.1.4 + resolution: "when-exit@npm:2.1.4" + checksum: 10/d77635a0ed43bb63b3b41930637db16fb1e4e8630f5c6efd4aa669322c32b36ba750b7484991f806d3ac56f4e21cdf3925f82fff289b90706cc21e6745038a26 + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + +"which@npm:^5.0.0": + version: 5.0.0 + resolution: "which@npm:5.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/6ec99e89ba32c7e748b8a3144e64bfc74aa63e2b2eacbb61a0060ad0b961eb1a632b08fb1de067ed59b002cec3e21de18299216ebf2325ef0f78e0f121e14e90 + languageName: node + linkType: hard + +"word-wrap@npm:^1.2.5": + version: 1.2.5 + resolution: "word-wrap@npm:1.2.5" + checksum: 10/1ec6f6089f205f83037be10d0c4b34c9183b0b63fca0834a5b3cee55dd321429d73d40bb44c8fc8471b5203d6e8f8275717f49a8ff4b2b0ab41d7e1b563e0854 + languageName: node + linkType: hard + +"worktank@npm:^3.0.2": + version: 3.0.2 + resolution: "worktank@npm:3.0.2" + dependencies: + isoconcurrency: "npm:^1.0.0" + isotimer: "npm:^1.0.0" + promise-make-naked: "npm:^3.0.2" + webworker-shim: "npm:^1.1.4" + checksum: 10/12be3b9948f83c392a92986a9de57fdb421045982464c00f8f80218bb9215634ac58960ca324753e3e630e86cade86cb044a113d7fa007cb4f47cb8718aafff3 + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^4.0.2": + version: 4.0.2 + resolution: "write-file-atomic@npm:4.0.2" + dependencies: + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^3.0.7" + checksum: 10/3be1f5508a46c190619d5386b1ac8f3af3dbe951ed0f7b0b4a0961eed6fc626bd84b50cf4be768dabc0a05b672f5d0c5ee7f42daa557b14415d18c3a13c7d246 + languageName: node + linkType: hard + +"write-file-atomic@npm:^5.0.1": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^4.0.1" + checksum: 10/648efddba54d478d0e4330ab6f239976df3b9752b123db5dc9405d9b5af768fa9d70ce60c52fdbe61d1200d24350bc4fbcbaf09288496c2be050de126bd95b7e + languageName: node + linkType: hard + +"xdg-basedir@npm:^5.1.0": + version: 5.1.0 + resolution: "xdg-basedir@npm:5.1.0" + checksum: 10/b60e8a2c663ccb1dac77c2d913f3b96de48dafbfa083657171d3d50e10820b8a04bb4edfe9f00808c8c20e5f5355e1927bea9029f03136e29265cb98291e1fea + languageName: node + linkType: hard + +"xtend@npm:^4.0.0, xtend@npm:^4.0.1": + version: 4.0.2 + resolution: "xtend@npm:4.0.2" + checksum: 10/ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^2.1.2": + version: 2.1.2 + resolution: "yallist@npm:2.1.2" + checksum: 10/75fc7bee4821f52d1c6e6021b91b3e079276f1a9ce0ad58da3c76b79a7e47d6f276d35e206a96ac16c1cf48daee38a8bb3af0b1522a3d11c8ffe18f898828832 + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10/1884d272d485845ad04759a255c71775db0fac56308764b4c77ea56a20d56679fad340213054c8c9c9c26fcfd4c4b2a90df993b7e0aaf3cdb73c618d1d1a802a + languageName: node + linkType: hard + +"yaml-unist-parser@npm:2.0.5": + version: 2.0.5 + resolution: "yaml-unist-parser@npm:2.0.5" + dependencies: + yaml: "npm:^1.10.2" + checksum: 10/e8b820e7ecc8157ba105b73c1c6d54dda49cfb7ef0dc234c38d1c5d0e57dc83ca04abe70f99171b42709c39cf157f6bbbaeffc5f5631615576390b97a73c9729 + languageName: node + linkType: hard + +"yaml@npm:1.10.2, yaml@npm:^1.10.2": + version: 1.10.2 + resolution: "yaml@npm:1.10.2" + checksum: 10/e088b37b4d4885b70b50c9fa1b7e54bd2e27f5c87205f9deaffd1fb293ab263d9c964feadb9817a7b129a5bf30a06582cb08750f810568ecc14f3cdbabb79cb3 + languageName: node + linkType: hard + +"yaml@npm:^2.8.0": + version: 2.8.0 + resolution: "yaml@npm:2.8.0" + bin: + yaml: bin.mjs + checksum: 10/7d4bd9c10d0e467601f496193f2ac254140f8e36f96f5ff7f852b9ce37974168eb7354f4c36dc8837dde527a2043d004b6aff48818ec24a69ab2dd3c6b6c381c + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + +"yargs@npm:^17.6.2, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard + +"yocto-queue@npm:^1.1.1": + version: 1.2.1 + resolution: "yocto-queue@npm:1.2.1" + checksum: 10/0843d6c2c0558e5c06e98edf9c17942f25c769e21b519303a5c2adefd5b738c9b2054204dc856ac0cd9d134b1bc27d928ce84fd23c9e2423b7e013d5a6f50577 + languageName: node + linkType: hard + +"zeptomatch-escape@npm:^1.0.1": + version: 1.0.1 + resolution: "zeptomatch-escape@npm:1.0.1" + checksum: 10/d2b27a6d0abab50ea59e0f2d8526b1946db02e498dc2f5105ec060868fc8f1e745618d164ed170439ebb85678e5c06acb781c840eb36ec625c775e96472ff0ef + languageName: node + linkType: hard + +"zeptomatch-explode@npm:^1.0.1": + version: 1.0.1 + resolution: "zeptomatch-explode@npm:1.0.1" + checksum: 10/4424d5f58484b4e4b191f8afb17d582fbde4efcd1f25fb90a240b0f5490e7d3ab82bf0a0b6ab4e1898a918f83a9e874d611733ff0a1ddb7cf929797d870ead2c + languageName: node + linkType: hard + +"zeptomatch-is-static@npm:^1.0.1": + version: 1.0.1 + resolution: "zeptomatch-is-static@npm:1.0.1" + checksum: 10/2cc3e039034d3fa9081a2f00e50cb2932cc7d9fe061841eadef24f032ec610d32f679e28ddf6e5c50c26c567e7b6d590ded70efe1efc7d066552a0505c02d7a2 + languageName: node + linkType: hard + +"zeptomatch-unescape@npm:^1.0.1": + version: 1.0.1 + resolution: "zeptomatch-unescape@npm:1.0.1" + checksum: 10/2139c86901fd58950658b0f2c618fd0ffa4b5389d8a7c3009a17d7da362d9fa4d6a79d94e7c6d969bd72e683354ee84e24c8404bb1476bba1d2b2935a500544d + languageName: node + linkType: hard + +"zeptomatch@npm:^1.1.3": + version: 1.2.2 + resolution: "zeptomatch@npm:1.2.2" + dependencies: + grammex: "npm:^3.1.1" + checksum: 10/2a260200f857462264222c8cba1dc955e60a7f6cbcf9d57c7ac94fe874f52029a4efe8ff24b29497925a492151fe7ee56e63b3b31874c5d138ee1c11f0052f18 + languageName: node + linkType: hard + +"zeptomatch@npm:^2.0.1, zeptomatch@npm:^2.0.2": + version: 2.0.2 + resolution: "zeptomatch@npm:2.0.2" + dependencies: + grammex: "npm:^3.1.10" + checksum: 10/1ed533338d16693410ca0a8026a2a44f38db6a67e2f1eb1b4e24dbdab2d6a86756933d152d189f1daa4910af800a4f633c4b2520a246b84ba0f8eff4a86a864a + languageName: node + linkType: hard + +"zod-validation-error@npm:^3.0.3": + version: 3.4.1 + resolution: "zod-validation-error@npm:3.4.1" + peerDependencies: + zod: ^3.24.4 + checksum: 10/4975aacc1a931acdbaa3eeaf92fc89a210c6fd14a260d17688ec6302ce478c268c008c61bcdeab51c76191ac627e580f319775a7862be7b9c54c94f2f7cb6ed2 + languageName: node + linkType: hard + +"zod@npm:^3.22.4, zod@npm:^3.25.63": + version: 3.25.64 + resolution: "zod@npm:3.25.64" + checksum: 10/5538573d880291c18ff93b92879effd1673943c78c7f957b190d0ebf456a2742d6acd510c955679a269570a2d076e7608dc6aa797f5ef8cfc162893abaf9c4db + languageName: node + linkType: hard